foxclaw 0.1.3 → 0.1.4
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.
- package/index.js +1 -1
- package/package.json +1 -1
- package/python/.github/workflows/release.yml +5 -0
- package/python/CHANGELOG.md +43 -0
- package/python/CHANGELOG_CN.md +43 -0
- package/python/README.md +6 -0
- package/python/README_CN.md +6 -0
- package/python/docs/CONTENT_GUARD.md +189 -0
- package/python/docs/CONTENT_GUARD_CN.md +189 -0
- package/python/docs/RELEASE.md +74 -34
- package/python/foxclaw/__init__.py +41 -1
- package/python/foxclaw/agents/base.py +17 -0
- package/python/foxclaw/agents/mixins/memory.py +16 -2
- package/python/foxclaw/agents/mixins/prompt.py +59 -6
- package/python/foxclaw/agents/rules/finance/RULES.md +131 -0
- package/python/foxclaw/api/bootstrap.py +20 -2
- package/python/foxclaw/api/routes/memory.py +22 -0
- package/python/foxclaw/behavior/__init__.py +20 -0
- package/python/foxclaw/behavior/behavior.yaml +62 -0
- package/python/foxclaw/behavior/spec.py +287 -0
- package/python/foxclaw/core/content_guard.py +341 -0
- package/python/foxclaw/core/memory_adapter.py +24 -4
- package/python/foxclaw/core/model_router.py +38 -2
- package/python/foxclaw/core/sensitive_write.py +283 -0
- package/python/frontend/planet/planet.js +18 -0
- package/python/frontend/v3/assets/{index-D5nIsjms.css → index-JKfHlb-a.css} +1 -1
- package/python/frontend/v3/assets/index-tN90dpUH.js +34 -0
- package/python/frontend/v3/index.html +2 -2
- package/python/frontend_src/package.json +1 -1
- package/python/frontend_src/src/components/panels/MemoryPanel.vue +42 -2
- package/python/frontend_src/src/stores/panels.js +16 -3
- package/python/pyproject.toml +12 -1
- package/python/tests/run_all.py +1 -0
- package/python/tests/test_agent_rules.py +81 -0
- package/python/tests/test_behavior_spec.py +198 -0
- package/python/tests/test_conflict_dismiss.py +143 -0
- package/python/tests/test_content_guard.py +177 -0
- package/python/tests/test_sensitive_write.py +181 -0
- package/python/tools/build_content_lexicon.py +218 -0
- package/python/tools/bundle_web.py +98 -0
- package/python/tools/recheck_conflicts.py +156 -0
- package/python/tools/release_check.py +17 -8
- package/python/vendor/hkc/hkc_api/routes/ability.py +31 -0
- package/python/vendor/hkc/hkc_api/schemas.py +11 -0
- package/python/vendor/hkc/hkc_kee/kee.py +124 -3
- package/python/vendor/hkc/hkc_sdk/base.py +22 -0
- package/python/vendor/hkc/hkc_sdk/direct_client.py +10 -0
- package/python/vendor/hkc/hkc_sdk/http_client.py +19 -0
- package/python/frontend/v3/assets/index-CQSBdxk4.js +0 -34
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))n(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const r of i.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function s(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(l){if(l.ep)return;l.ep=!0;const i=s(l);fetch(l.href,i)}})();/**
|
|
2
|
-
* @vue/shared v3.5.45
|
|
3
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
-
* @license MIT
|
|
5
|
-
**/function Do(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const Ce={},_s=[],Tt=()=>{},ti=()=>!1,Nn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Dn=e=>e.startsWith("onUpdate:"),Le=Object.assign,Fo=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Lr=Object.prototype.hasOwnProperty,_e=(e,t)=>Lr.call(e,t),ie=Array.isArray,es=e=>cn(e)==="[object Map]",Bt=e=>cn(e)==="[object Set]",nl=e=>cn(e)==="[object Date]",fe=e=>typeof e=="function",Ee=e=>typeof e=="string",_t=e=>typeof e=="symbol",be=e=>e!==null&&typeof e=="object",si=e=>(be(e)||fe(e))&&fe(e.then)&&fe(e.catch),ni=Object.prototype.toString,cn=e=>ni.call(e),Rr=e=>cn(e).slice(8,-1),oi=e=>cn(e)==="[object Object]",jo=e=>Ee(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Vs=Do(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Fn=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},Nr=/-\w/g,Qe=Fn(e=>e.replace(Nr,t=>t.slice(1).toUpperCase())),Dr=/\B([A-Z])/g,is=Fn(e=>e.replace(Dr,"-$1").toLowerCase()),jn=Fn(e=>e.charAt(0).toUpperCase()+e.slice(1)),so=Fn(e=>e?`on${jn(e)}`:""),xt=(e,t)=>!Object.is(e,t),bn=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},li=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},un=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Fr=e=>{const t=Ee(e)?Number(e):NaN;return isNaN(t)?e:t};let ol;const Kn=()=>ol||(ol=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Et(e){if(ie(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],l=Ee(n)?Vr(n):Et(n);if(l)for(const i in l)t[i]=l[i]}return t}else if(Ee(e)||be(e))return e}const jr=/;(?![^(]*\))/g,Kr=/:([^]+)/,Ur=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function Vr(e){const t={};return e.replace(Ur,s=>s.startsWith("/*")?"":s).split(jr).forEach(s=>{if(s){const n=s.split(Kr);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function ae(e){let t="";if(Ee(e))t=e;else if(ie(e))for(let s=0;s<e.length;s++){const n=ae(e[s]);n&&(t+=n+" ")}else if(be(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Hr="itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly",Br=Do(Hr);function ii(e){return!!e||e===""}function qr(e,t,s){if(e.length!==t.length)return!1;let n=!0;for(let l=0;n&&l<e.length;l++)n=qt(e[l],t[l],s);return n}function ll(e,t,s){if(e.size!==t.size)return!1;const n=Array.from(t),l=new Uint8Array(n.length);for(const i of e){let r=-1;for(let a=0;a<n.length;a++)if(!l[a]&&qt(i,n[a],s)){r=a;break}if(r<0)return!1;l[r]=1}return!0}function zr(e,t,s){let n=es(e),l=es(t);if(n||l||(n=Bt(e),l=Bt(t),n||l))return n&&l?ll(e,t,s):!1;const i=Object.keys(e).length,r=Object.keys(t).length;if(i!==r)return!1;for(const a in e){const c=e.hasOwnProperty(a),d=t.hasOwnProperty(a);if(c&&!d||!c&&d||!qt(e[a],t[a],s))return!1}return String(e)===String(t)}function il(e,t,s,n){s||(s=[new Map,new Map]);const[l,i]=s;if(l.has(e)||i.has(t))return l.get(e)===t&&i.get(t)===e;l.set(e,t),i.set(t,e);const r=n(e,t,s);return l.delete(e),i.delete(t),r}function qt(e,t,s){if(e===t)return!0;let n=nl(e),l=nl(t);return n||l?n&&l?e.getTime()===t.getTime():!1:(n=_t(e),l=_t(t),n||l?e===t:(n=ie(e),l=ie(t),n||l?n&&l?il(e,t,s,qr):!1:(n=be(e),l=be(t),n||l?!n||!l?!1:il(e,t,s,zr):String(e)===String(t))))}function Ko(e,t){return e.findIndex(s=>qt(s,t))}const ri=e=>!!(e&&e.__v_isRef===!0),u=e=>Ee(e)?e:e==null?"":ie(e)||be(e)&&(e.toString===ni||!fe(e.toString))?ri(e)?u(e.value):JSON.stringify(e,ai,2):String(e),ai=(e,t)=>ri(t)?ai(e,t.value):es(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,l],i)=>(s[no(n,i)+" =>"]=l,s),{})}:Bt(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>no(s))}:_t(t)?no(t):be(t)&&!ie(t)&&!oi(t)?String(t):t,no=(e,t="")=>{var s;return _t(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
|
|
6
|
-
* @vue/reactivity v3.5.45
|
|
7
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
-
* @license MIT
|
|
9
|
-
**/let Ke;class Wr{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Ke&&(Ke.active?(this.parent=Ke,this.index=(Ke.scopes||(Ke.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes){const n=this.scopes.slice();for(t=0,s=n.length;t<s;t++)n[t].pause()}for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes){const l=this.scopes.slice();for(t=0,s=l.length;t<s;t++)l[t].resume()}const n=this.effects.slice();for(t=0,s=n.length;t<s;t++)n[t].resume()}}run(t){if(this._active){const s=Ke;try{return Ke=this,t()}finally{Ke=s}}}on(){++this._on===1&&(this.prevScope=Ke,Ke=this)}off(){if(this._on>0&&--this._on===0){if(Ke===this)Ke=this.prevScope;else{let t=Ke;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){const l=this.scopes.slice();for(s=0,n=l.length;s<n;s++)l[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const l=this.parent.scopes.pop();l&&l!==this&&(this.parent.scopes[this.index]=l,l.index=this.index)}this.parent=void 0}}}function Jr(){return Ke}let Me;const oo=new WeakSet;class ci{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ke&&(Ke.active?Ke.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,oo.has(this)&&(oo.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||di(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,rl(this),fi(this);const t=Me,s=vt;Me=this,vt=!0;try{return this.fn()}finally{pi(this),Me=t,vt=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ho(t);this.deps=this.depsTail=void 0,rl(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?oo.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){_o(this)&&this.run()}get dirty(){return _o(this)}}let ui=0,Hs,Bs;function di(e,t=!1){if(e.flags|=8,t){e.next=Bs,Bs=e;return}e.next=Hs,Hs=e}function Uo(){ui++}function Vo(){if(--ui>0)return;if(Bs){let t=Bs;for(Bs=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Hs;){let t=Hs;for(Hs=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function fi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function pi(e){let t,s=e.depsTail,n=s;for(;n;){const l=n.prevDep;n.version===-1?(n===s&&(s=l),Ho(n),Gr(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=l}e.deps=t,e.depsTail=s}function _o(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(hi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function hi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Gs)||(e.globalVersion=Gs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!_o(e))))return;e.flags|=2;const t=e.dep,s=Me,n=vt;Me=e,vt=!0;try{fi(e);const l=e.fn(e._value);(t.version===0||xt(l,e._value))&&(e.flags|=128,e._value=l,t.version++)}catch(l){throw t.version++,l}finally{Me=s,vt=n,pi(e),e.flags&=-3}}function Ho(e,t=!1){const{dep:s,prevSub:n,nextSub:l}=e;if(n&&(n.nextSub=l,e.prevSub=void 0),l&&(l.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let i=s.computed.deps;i;i=i.nextDep)Ho(i,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Gr(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let vt=!0;const gi=[];function At(){gi.push(vt),vt=!1}function Ot(){const e=gi.pop();vt=e===void 0?!0:e}function rl(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=Me;Me=void 0;try{t()}finally{Me=s}}}let Gs=0;class Yr{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Bo{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Me||!vt||Me===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==Me)s=this.activeLink=new Yr(Me,this),Me.deps?(s.prevDep=Me.depsTail,Me.depsTail.nextDep=s,Me.depsTail=s):Me.deps=Me.depsTail=s,mi(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=Me.depsTail,s.nextDep=void 0,Me.depsTail.nextDep=s,Me.depsTail=s,Me.deps===s&&(Me.deps=n)}return s}trigger(t){this.version++,Gs++,this.notify(t)}notify(t){Uo();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Vo()}}}function mi(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)mi(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const yo=new WeakMap,ys=Symbol(""),bo=Symbol(""),Ys=Symbol("");function ze(e,t,s){if(vt&&Me){let n=yo.get(e);n||yo.set(e,n=new Map);let l=n.get(s);l||(n.set(s,l=new Bo),l.map=n,l.key=s),l.track()}}function Kt(e,t,s,n,l,i){const r=yo.get(e);if(!r){Gs++;return}const a=c=>{c&&c.trigger()};if(Uo(),t==="clear")r.forEach(a);else{const c=ie(e),d=c&&jo(s);if(c&&s==="length"){const g=Number(n);r.forEach((m,b)=>{(b==="length"||b===Ys||!_t(b)&&b>=g)&&a(m)})}else switch((s!==void 0||r.has(void 0))&&a(r.get(s)),d&&a(r.get(Ys)),t){case"add":c?d&&a(r.get("length")):(a(r.get(ys)),es(e)&&a(r.get(bo)));break;case"delete":c||(a(r.get(ys)),es(e)&&a(r.get(bo)));break;case"set":es(e)&&a(r.get(ys));break}}Vo()}function Ss(e){const t=ve(e);return t===e||(ze(t,"iterate",Ys),rt(e))?t:It(e)?ts(e)?t.map(s=>os(ct(s))):t.map(os):t.map(ct)}function Un(e){return ze(e=ve(e),"iterate",Ys),e}function wt(e,t){return It(e)?os(ts(e)?ct(t):t):ct(t)}const Xr={__proto__:null,[Symbol.iterator](){return lo(this,Symbol.iterator,e=>wt(this,e))},concat(...e){return Ss(this).concat(...e.map(t=>ie(t)?Ss(t):t))},entries(){return lo(this,"entries",e=>(e[1]=wt(this,e[1]),e))},every(e,t){return Nt(this,"every",e,t,void 0,arguments)},filter(e,t){return Nt(this,"filter",e,t,s=>s.map(n=>wt(this,n)),arguments)},find(e,t){return Nt(this,"find",e,t,s=>wt(this,s),arguments)},findIndex(e,t){return Nt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Nt(this,"findLast",e,t,s=>wt(this,s),arguments)},findLastIndex(e,t){return Nt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Nt(this,"forEach",e,t,void 0,arguments)},includes(...e){return io(this,"includes",e)},indexOf(...e){return io(this,"indexOf",e)},join(e){return Ss(this).join(e)},lastIndexOf(...e){return io(this,"lastIndexOf",e)},map(e,t){return Nt(this,"map",e,t,void 0,arguments)},pop(){return Os(this,"pop")},push(...e){return Os(this,"push",e)},reduce(e,...t){return cl(this,"reduce",e,t)},reduceRight(e,...t){return cl(this,"reduceRight",e,t)},shift(){return Os(this,"shift")},some(e,t){return Nt(this,"some",e,t,void 0,arguments)},splice(...e){return Os(this,"splice",e)},toReversed(){return Ss(this).toReversed()},toSorted(e){return Ss(this).toSorted(e)},toSpliced(...e){return Ss(this).toSpliced(...e)},unshift(...e){return Os(this,"unshift",e)},values(){return lo(this,"values",e=>wt(this,e))}};function lo(e,t,s){const n=Un(e),l=n[t],i=l.call(n);if(n!==e&&!rt(e)){if(i[Symbol.toStringTag]==="Array Iterator"){const r=Object.create(Object.getPrototypeOf(i));return r.next=()=>al(i.next(),s),l!==vi[t]&&Object.defineProperties(r,{return:{get(){const a=i.return;return typeof a=="function"?a.bind(i):a}},throw:{get(){const a=i.throw;return typeof a=="function"?a.bind(i):a}}}),r}i._next=i.next,i.next=()=>al(i._next(),s)}return i}function al(e,t){return e.done||(e.value=t(e.value)),e}const vi=Array.prototype;function Nt(e,t,s,n,l,i){const r=Un(e),a=r!==e&&!rt(e),c=r[t];if(c!==vi[t]){const m=c.apply(e,i);return a?ct(m):m}let d=s;r!==e&&(a?d=function(m,b){return s.call(this,wt(e,m),b,e)}:s.length>2&&(d=function(m,b){return s.call(this,m,b,e)}));const g=c.call(r,d,n);return a&&l?l(g):g}function cl(e,t,s,n){const l=Un(e),i=l!==e&&!rt(e);let r=s,a=!1;l!==e&&(i?(a=n.length===0,r=function(d,g,m){return a&&(a=!1,d=wt(e,d)),s.call(this,d,wt(e,g),m,e)}):s.length>3&&(r=function(d,g,m){return s.call(this,d,g,m,e)}));const c=l[t](r,...n);return a?wt(e,c):c}function io(e,t,s){const n=ve(e);ze(n,"iterate",Ys);const l=n[t](...s);return(l===-1||l===!1)&&Wo(s[0])?(s[0]=ve(s[0]),n[t](...s)):l}function Os(e,t,s=[]){At(),Uo();const n=ve(e)[t].apply(e,s);return Vo(),Ot(),n}const Qr=Do("__proto__,__v_isRef,__isVue"),_i=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(_t));function Zr(e){_t(e)||(e=String(e));const t=ve(this);return ze(t,"has",e),t.hasOwnProperty(e)}class yi{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const l=this._isReadonly,i=this._isShallow;if(s==="__v_isReactive")return!l;if(s==="__v_isReadonly")return l;if(s==="__v_isShallow")return i;if(s==="__v_raw")return n===(l?i?ca:wi:i?$i:ki).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const r=ie(t);if(!l){let c;if(r&&(c=Xr[s]))return c;if(s==="hasOwnProperty")return Zr}const a=Reflect.get(t,s,He(t)?t:n);if((_t(s)?_i.has(s):Qr(s))||(l||ze(t,"get",s),i))return a;if(He(a)){const c=r&&jo(s)?a:a.value;return l&&be(c)?$o(c):c}return be(a)?l?$o(a):nt(a):a}}class bi extends yi{constructor(t=!1){super(!1,t)}set(t,s,n,l){let i=t[s];const r=ie(t)&&jo(s);if(!this._isShallow){const d=It(i);if(!rt(n)&&!It(n)&&(i=ve(i),n=ve(n)),!r&&He(i)&&!He(n))return d||(i.value=n),!0}const a=r?Number(s)<t.length:_e(t,s),c=Reflect.set(t,s,n,He(t)?t:l);return t===ve(l)&&c&&(a?xt(n,i)&&Kt(t,"set",s,n):Kt(t,"add",s,n)),c}deleteProperty(t,s){const n=_e(t,s);t[s];const l=Reflect.deleteProperty(t,s);return l&&n&&Kt(t,"delete",s,void 0),l}has(t,s){const n=Reflect.has(t,s);return(!_t(s)||!_i.has(s))&&ze(t,"has",s),n}ownKeys(t){return ze(t,"iterate",ie(t)?"length":ys),Reflect.ownKeys(t)}}class ea extends yi{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const ta=new bi,sa=new ea,na=new bi(!0);const ko=e=>e,pn=e=>Reflect.getPrototypeOf(e);function oa(e,t,s){return function(...n){const l=this.__v_raw,i=ve(l),r=es(i),a=e==="entries"||e===Symbol.iterator&&r,c=e==="keys"&&r,d=l[e](...n),g=s?ko:t?os:ct;return!t&&ze(i,"iterate",c?bo:ys),Le(Object.create(d),{next(){const{value:m,done:b}=d.next();return b?{value:m,done:b}:{value:a?[g(m[0]),g(m[1])]:g(m),done:b}}})}}function hn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function la(e,t){const s={get(l){const i=this.__v_raw,r=ve(i),a=ve(l);e||(xt(l,a)&&ze(r,"get",l),ze(r,"get",a));const{has:c}=pn(r),d=t?ko:e?os:ct;if(c.call(r,l))return d(i.get(l));if(c.call(r,a))return d(i.get(a));i!==r&&i.get(l)},get size(){const l=this.__v_raw;return!e&&ze(ve(l),"iterate",ys),l.size},has(l){const i=this.__v_raw,r=ve(i),a=ve(l);return e||(xt(l,a)&&ze(r,"has",l),ze(r,"has",a)),l===a?i.has(l):i.has(l)||i.has(a)},forEach(l,i){const r=this,a=r.__v_raw,c=ve(a),d=t?ko:e?os:ct;return!e&&ze(c,"iterate",ys),a.forEach((g,m)=>l.call(i,d(g),d(m),r))}};return Le(s,e?{add:hn("add"),set:hn("set"),delete:hn("delete"),clear:hn("clear")}:{add(l){const i=ve(this),r=pn(i),a=ve(l),c=!t&&!rt(l)&&!It(l)?a:l;return r.has.call(i,c)||xt(l,c)&&r.has.call(i,l)||xt(a,c)&&r.has.call(i,a)||(i.add(c),Kt(i,"add",c,c)),this},set(l,i){!t&&!rt(i)&&!It(i)&&(i=ve(i));const r=ve(this),{has:a,get:c}=pn(r);let d=a.call(r,l);d||(l=ve(l),d=a.call(r,l));const g=c.call(r,l);return r.set(l,i),d?xt(i,g)&&Kt(r,"set",l,i):Kt(r,"add",l,i),this},delete(l){const i=ve(this),{has:r,get:a}=pn(i);let c=r.call(i,l);c||(l=ve(l),c=r.call(i,l)),a&&a.call(i,l);const d=i.delete(l);return c&&Kt(i,"delete",l,void 0),d},clear(){const l=ve(this),i=l.size!==0,r=l.clear();return i&&Kt(l,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(l=>{s[l]=oa(l,e,t)}),s}function qo(e,t){const s=la(e,t);return(n,l,i)=>l==="__v_isReactive"?!e:l==="__v_isReadonly"?e:l==="__v_isShallow"?t:l==="__v_raw"?n:Reflect.get(_e(s,l)&&l in n?s:n,l,i)}const ia={get:qo(!1,!1)},ra={get:qo(!1,!0)},aa={get:qo(!0,!1)};const ki=new WeakMap,$i=new WeakMap,wi=new WeakMap,ca=new WeakMap;function ua(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function nt(e){return It(e)?e:zo(e,!1,ta,ia,ki)}function da(e){return zo(e,!1,na,ra,$i)}function $o(e){return zo(e,!0,sa,aa,wi)}function zo(e,t,s,n,l){if(!be(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=l.get(e);if(i)return i;const r=ua(Rr(e));if(r===0)return e;const a=new Proxy(e,r===2?n:s);return l.set(e,a),a}function ts(e){return It(e)?ts(e.__v_raw):!!(e&&e.__v_isReactive)}function It(e){return!!(e&&e.__v_isReadonly)}function rt(e){return!!(e&&e.__v_isShallow)}function Wo(e){return e?!!e.__v_raw:!1}function ve(e){const t=e&&e.__v_raw;return t?ve(t):e}function fa(e){return!_e(e,"__v_skip")&&Object.isExtensible(e)&&li(e,"__v_skip",!0),e}const ct=e=>be(e)?nt(e):e,os=e=>be(e)?$o(e):e;function He(e){return e?e.__v_isRef===!0:!1}function G(e){return pa(e,!1)}function pa(e,t){return He(e)?e:new ha(e,t)}class ha{constructor(t,s){this.dep=new Bo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:ve(t),this._value=s?t:ct(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||rt(t)||It(t);t=n?t:ve(t),xt(t,s)&&(this._rawValue=t,this._value=n?t:ct(t),this.dep.trigger())}}function f(e){return He(e)?e.value:e}const ga={get:(e,t,s)=>t==="__v_raw"?e:f(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const l=e[t];return He(l)&&!He(s)?(l.value=s,!0):Reflect.set(e,t,s,n)}};function Si(e){return ts(e)?e:new Proxy(e,ga)}class ma{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Bo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Gs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Me!==this)return di(this,!0),!0}get value(){const t=this.dep.track();return hi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function va(e,t,s=!1){let n,l;return fe(e)?n=e:(n=e.get,l=e.set),new ma(n,l,s)}const gn={},wn=new WeakMap;let hs;function _a(e,t=!1,s=hs){if(s){let n=wn.get(s);n||wn.set(s,n=[]),n.push(e)}}function ya(e,t,s=Ce){const{immediate:n,deep:l,once:i,scheduler:r,augmentJob:a,call:c}=s,d=x=>l?x:rt(x)||l===!1||l===0?Ut(x,1):Ut(x);let g,m,b,y,I=!1,_=!1;if(He(e)?(m=()=>e.value,I=rt(e)):ts(e)?(m=()=>d(e),I=!0):ie(e)?(_=!0,I=e.some(x=>ts(x)||rt(x)),m=()=>e.map(x=>{if(He(x))return x.value;if(ts(x))return d(x);if(fe(x))return c?c(x,2):x()})):fe(e)?t?m=c?()=>c(e,2):e:m=()=>{if(b){At();try{b()}finally{Ot()}}const x=hs;hs=g;try{return c?c(e,3,[y]):e(y)}finally{hs=x}}:m=Tt,t&&l){const x=m,te=l===!0?1/0:l;m=()=>Ut(x(),te)}const E=Jr(),L=()=>{g.stop(),E&&E.active&&Fo(E.effects,g)};if(i&&t){const x=t;t=(...te)=>{try{return x(...te)}finally{L()}}}let T=_?new Array(e.length).fill(gn):gn;const A=x=>{if(!(!(g.flags&1)||!g.dirty&&!x))if(t){const te=g.run();if(x||l||I||(_?te.some((Z,j)=>xt(Z,T[j])):xt(te,T))){const Z=hs;At();try{b&&b(),hs=g;const j=[te,T===gn?void 0:_&&T[0]===gn?[]:T,y];T=te,c?c(t,3,j):t(...j)}finally{hs=Z,Ot()}}}else g.run()};return a&&a(A),g=new ci(m),g.scheduler=r?()=>r(A,!1):A,y=x=>_a(x,!1,g),b=g.onStop=()=>{const x=wn.get(g);if(x){if(c)c(x,4);else for(const te of x)te();wn.delete(g)}},t?n?A(!0):T=g.run():r?r(A.bind(null,!0),!0):g.run(),L.pause=g.pause.bind(g),L.resume=g.resume.bind(g),L.stop=L,L}function Ut(e,t=1/0,s){if(t<=0||!be(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,He(e))Ut(e.value,t,s);else if(ie(e))for(let n=0;n<e.length;n++)Ut(e[n],t,s);else if(Bt(e)||es(e))e.forEach(n=>{Ut(n,t,s)});else if(oi(e)){for(const n in e)Ut(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Ut(e[n],t,s)}return e}/**
|
|
10
|
-
* @vue/runtime-core v3.5.45
|
|
11
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
-
* @license MIT
|
|
13
|
-
**/function dn(e,t,s,n){try{return n?e(...n):e()}catch(l){Vn(l,t,s)}}function ut(e,t,s,n){if(fe(e)){const l=dn(e,t,s,n);return l&&si(l)&&l.catch(i=>{Vn(i,t,s,void 0,!0)}),l}if(ie(e)){const l=[];for(let i=0;i<e.length;i++)l.push(ut(e[i],t,s,n));return l}}function Vn(e,t,s,n=!0,l=!1){const i=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||Ce;if(t){let c=t.parent;const d=t.proxy,g=`https://vuejs.org/error-reference/#runtime-${s}`;for(;c;){const m=c.ec;if(m&&!c.isUnmounted&&(!l||c.scope.active)){for(let b=0;b<m.length;b++)if(m[b](e,d,g)===!1)return}c=c.parent}if(r){At(),dn(r,null,10,[e,d,g]),Ot();return}}ba(e,s,i,n,a)}function ba(e,t,s,n=!0,l=!1){if(l)throw e;console.error(e)}const Xe=[];let gt=-1;const St=[];let Qt=null,Cs=0;const Ci=Promise.resolve();let Sn=null;function Vt(e){const t=Sn||Ci;return e?t.then(this?e.bind(this):e):t}function ka(e){let t=gt+1,s=Xe.length;for(;t<s;){const n=t+s>>>1,l=Xe[n],i=Xs(l);i<e||i===e&&l.flags&2?t=n+1:s=n}return t}function Hn(e){if(!(e.flags&1)){const t=Xs(e),s=Xe[Xe.length-1];!s||!(e.flags&2)&&t>=Xs(s)?Xe.push(e):Xe.splice(ka(t),0,e),e.flags|=1,xi()}}function xi(){Sn||(Sn=Ci.then(Ei))}function $a(e){if(!ie(e))Qt&&e.id===-1?Qt.splice(Cs+1,0,e):e.flags&1||(St.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)St.push(e[t]);xi()}function Mi(e,t,s,n=gt+1){for(;n<Xe.length;n++){const l=Xe[n];if(l&&l.flags&2){if(e&&l.id!==e.uid||t!==void 0&&!(l.id>=t))continue;Xe.splice(n,1),n=e?n-1:gt,l.flags&4&&(l.flags&=-2),l(),l.flags&4||(l.flags&=-2)}}}function Ti(e,t,s=0){if(St.length){let n=St,l=0;if(t){n=[];for(let r=0;r<St.length;r++){const a=St[r];(a.i!==void 0?!a.i||a.i.uid<s:t.has(a))?St[l++]=a:n.push(a)}}const i=[...new Set(n)].sort((r,a)=>Xs(r)-Xs(a));if(St.length=l,Qt){for(let r=0;r<i.length;r++)Qt.push(i[r]);return}for(Qt=i,Cs=0;Cs<Qt.length;Cs++){const r=Qt[Cs];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}Qt=null,Cs=0}}let ro=!1;function wa(e,t){if(ro){e();return}const s=t===void 0?void 0:new Set(St);e(),ro=!0;try{Mi(void 0,t),Ti(void 0,s,t)}finally{ro=!1}}const Xs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Ei(e){try{for(gt=0;gt<Xe.length;gt++){const t=Xe[gt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),dn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;gt<Xe.length;gt++){const t=Xe[gt];t&&(t.flags&=-2)}gt=-1,Xe.length=0,Ti(),Sn=null,(Xe.length||St.length)&&Ei()}}let Ue=null,Ai=null;function Cn(e){const t=Ue;return Ue=e,Ai=e&&e.type.__scopeId||null,t}function yt(e,t=Ue,s){if(!t||e._n)return e;const n=(...l)=>{n._d&&En(-1);const i=Cn(t),r=Ht.length;let a;try{a=e(...l)}finally{for(let c=Ht.length;c>r;c--)Xo();Cn(i),n._d&&En(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function he(e,t){if(Ue===null)return e;const s=Jn(Ue),n=e.dirs||(e.dirs=[]);for(let l=0;l<t.length;l++){let[i,r,a,c=Ce]=t[l];i&&(fe(i)&&(i={mounted:i,updated:i}),i.deep&&Ut(r),n.push({dir:i,instance:s,value:r,oldValue:void 0,arg:a,modifiers:c}))}return e}function cs(e,t,s,n){let l=e;if(n==="beforeMount")e._mount=e;else if(n==="beforeUpdate"){const a=t&&t._mount;a&&(a._latest=e,e._mount=a)}else if(n==="mounted"){const a=e._latest;e._mount=e._latest=void 0,a&&(l=a,a._mount=void 0)}const i=l.dirs,r=t&&t.dirs;for(let a=0;a<i.length;a++){let c=i[a];r?c.oldValue=r[a].value:n==="mounted"&&c.oldValue!==void 0&&(c=Le({},c,{oldValue:void 0}));let d=c.dir[n];d&&(At(),ut(d,s,8,[e.el,c,l,t]),Ot())}}function Sa(e,t){if(We){let s=We.provides;const n=We.parent&&We.parent.provides;n===s&&(s=We.provides=Object.create(n)),s[e]=t}}function kn(e,t,s=!1){const n=ar();if(n||Ts){let l=Ts?Ts._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(l&&e in l)return l[e];if(arguments.length>1)return s&&fe(t)?t.call(n&&n.proxy):t}}const Ca=Symbol.for("v-scx"),xa=()=>kn(Ca);function bs(e,t,s){return Oi(e,t,s)}function Oi(e,t,s=Ce){const{immediate:n,deep:l,flush:i,once:r}=s,a=Le({},s),c=t&&n||!t&&i!=="post";let d;if(sn){if(i==="sync"){const y=xa();d=y.__watcherHandles||(y.__watcherHandles=[])}else if(!c){const y=()=>{};return y.stop=Tt,y.resume=Tt,y.pause=Tt,y}}const g=We;a.call=(y,I,_)=>ut(y,g,I,_);let m=!1;i==="post"?a.scheduler=y=>{y.i=g,Be(y,g&&g.suspense)}:i!=="sync"&&(m=!0,a.scheduler=(y,I)=>{I?y():Hn(y)}),a.augmentJob=y=>{t&&(y.flags|=4),m&&(y.flags|=2,g&&(y.id=g.uid,y.i=g))};const b=ya(e,t,a);return sn&&(d?d.push(b):c&&b()),b}function Ma(e,t,s){const n=this.proxy,l=Ee(e)?e.includes(".")?Ii(n,e):()=>n[e]:e.bind(n,n);let i;fe(t)?i=t:(i=t.handler,s=t);const r=fn(this),a=Oi(l,i.bind(n),s);return r(),a}function Ii(e,t){const s=t.split(".");return()=>{let n=e;for(let l=0;l<s.length&&n;l++)n=n[s[l]];return n}}const Xt=new WeakMap,Pi=Symbol("_vte"),Bn=e=>e.__isTeleport,gs=e=>e&&(e.disabled||e.disabled===""),Ta=e=>e&&(e.defer||e.defer===""),ul=e=>typeof SVGElement<"u"&&e instanceof SVGElement,dl=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,wo=(e,t)=>{const s=e&&e.to;return Ee(s)?t?t(s):null:s},Ea={name:"Teleport",__isTeleport:!0,process(e,t,s,n,l,i,r,a,c,d){const{mc:g,pc:m,pbc:b,o:{insert:y,querySelector:I,createText:_,createComment:E,parentNode:L}}=d,T=gs(t.props);let{dynamicChildren:A}=t;const x=(j,$,w)=>{j.shapeFlag&16&&g(j.children,$,w,l,i,r,a,c)},te=(j=t)=>{const $=gs(j.props),w=j.target=wo(j.props,I),K=So(w,j,_,y);w&&(r!=="svg"&&ul(w)?r="svg":r!=="mathml"&&dl(w)&&(r="mathml"),l&&l.isCE&&(l.ce._teleportTargets||(l.ce._teleportTargets=new Set)).add(w),$||(x(j,w,K),Ns(j,!1)))},Z=j=>{const $=()=>{if(Xt.get(j)===$){if(Xt.delete(j),gs(j.props)){const w=L(j.el)||s;x(j,w,j.anchor),Ns(j,!0)}te(j)}};Xt.set(j,$),Be($,i)};if(e==null){const j=t.el=_(""),$=t.anchor=_("");if(y(j,s,n),y($,s,n),Ta(t.props)||i&&i.pendingBranch){Z(t);return}T&&(x(t,s,$),Ns(t,!0)),te()}else{t.el=e.el;const j=t.anchor=e.anchor,$=Xt.get(e);if($){$.flags|=8,Xt.delete(e),Z(t);return}t.targetStart=e.targetStart;const w=t.target=e.target,K=t.targetAnchor=e.targetAnchor,X=gs(e.props),F=X?s:w,pe=X?j:K;if(r==="svg"||ul(w)?r="svg":(r==="mathml"||dl(w))&&(r="mathml"),A?(b(e.dynamicChildren,A,F,l,i,r,a),Yo(e,t,!0)):c||m(e,t,F,pe,l,i,r,a,!1),T)X?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):mn(t,s,j,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const $e=wo(t.props,I);$e&&(t.target=$e,mn(t,$e,null,d,0))}else X&&mn(t,w,K,d,1);Ns(t,T)}},remove(e,t,s,{um:n,o:{remove:l}},i){const{shapeFlag:r,children:a,anchor:c,targetStart:d,targetAnchor:g,target:m,props:b}=e,y=gs(b),I=i||!y,_=Xt.get(e);if(_&&(_.flags|=8,Xt.delete(e)),m&&(l(d),l(g)),i&&l(c),!_&&(y||m)&&r&16)for(let E=0;E<a.length;E++){const L=a[E];n(L,t,s,I,!!L.dynamicChildren)}},move:mn,hydrate:Aa};function mn(e,t,s,{o:{insert:n},m:l},i=2){i===0&&(e.targetStart&&n(e.targetStart,t,s),n(e.targetAnchor,t,s),s=e.targetAnchor);const{el:r,anchor:a,shapeFlag:c,children:d,props:g}=e,m=i===2;if(m&&n(r,t,s),!Xt.has(e)&&(!m||gs(g))&&c&16)for(let b=0;b<d.length;b++)l(d[b],t,s,2);m&&n(a,t,s)}function Aa(e,t,s,n,l,i,{o:{nextSibling:r,parentNode:a,querySelector:c,insert:d,createText:g}},m){function b(E,L){let T=L;for(;T;){if(T&&T.nodeType===8){if(T.data==="teleport start anchor")t.targetStart=T;else if(T.data==="teleport anchor"){t.targetAnchor=T,E._lpa=t.targetAnchor&&r(t.targetAnchor);break}}T=r(T)}}function y(E,L){L.anchor=m(r(E),L,a(E),s,n,l,i)}const I=t.target=wo(t.props,c),_=gs(t.props);if(I){const E=I._lpa||I.firstChild;t.shapeFlag&16&&(_?(y(e,t),b(I,E),t.targetAnchor||So(I,t,g,d,a(e)===I?e:null)):(t.anchor=r(e),b(I,E),t.targetAnchor||So(I,t,g,d),m(E&&r(E),t,I,s,n,l,i))),Ns(t,_)}else _&&t.shapeFlag&16&&(y(e,t),t.targetStart=e,t.targetAnchor=r(e));return t.anchor&&r(t.anchor)}const Oa=Ea;function Ns(e,t){const s=e.ctx;if(s&&s.ut){let n,l;for(t?(n=e.el,l=e.anchor):(n=e.targetStart,l=e.targetAnchor);n&&n!==l;)n.nodeType===1&&n.setAttribute("data-v-owner",s.uid),n=n.nextSibling;s.ut()}}function So(e,t,s,n,l=null){const i=t.targetStart=s(""),r=t.targetAnchor=s("");return i[Pi]=r,e&&(n(i,e,l),n(r,e,l)),r}const it=Symbol("_leaveCb"),Is=Symbol("_enterCb");function Ia(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Re(()=>{e.isMounted=!0}),ws(()=>{e.isUnmounting=!0}),e}const lt=[Function,Array],Li={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:lt,onEnter:lt,onAfterEnter:lt,onEnterCancelled:lt,onBeforeLeave:lt,onLeave:lt,onAfterLeave:lt,onLeaveCancelled:lt,onBeforeAppear:lt,onAppear:lt,onAfterAppear:lt,onAppearCancelled:lt},Pa={name:"BaseTransition",props:Li,setup(e,{slots:t}){const s=ar(),n=Ia();return()=>{const l=t.default&&Di(t.default(),!0),i=l&&l.length?Ri(l):s.subTree?N():void 0;if(!i)return;const r=ve(e),{mode:a}=r;if(n.isLeaving)return ao(i);const c=xn(i);if(!c)return ao(i);const d=Co(c,r,n,s);c.type!==Ve&&ks(c,d);let g=s.subTree&&xn(s.subTree);if(g&&g.type!==Ve&&!ms(g,c)&&Qs(s.subTree)){let m=Co(g,r,n,s);if(ks(g,m),a==="out-in"&&c.type!==Ve)return n.isLeaving=!0,m.afterLeave=()=>{if(n.isLeaving=!1,!(s.job.flags&8))if(s.effect.flags&2){const b=()=>{s.job.flags&8||s.update()};b.i=s,Hn(b)}else s.update();delete m.afterLeave,g=void 0},ao(i);a==="in-out"&&c.type!==Ve?m.delayLeave=(b,y,I)=>{const _=Ni(n,g);_[String(g.key)]=g,b[it]=()=>{y(),b[it]=void 0,delete d.delayedLeave,g=void 0},d.delayedLeave=()=>{I(),delete d.delayedLeave,g=void 0}}:g=void 0}else g&&(g=void 0);return i}}};function Ri(e){let t=e[0];if(e.length>1){for(const s of e)if(s.type!==Ve){t=s;break}}return t}const La=Pa;function Ni(e,t){const{leavingVNodes:s}=e;let n=s.get(t.type);return n||(n=Object.create(null),s.set(t.type,n)),n}function Co(e,t,s,n){const{appear:l,mode:i,persisted:r=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:d,onEnterCancelled:g,onBeforeLeave:m,onLeave:b,onAfterLeave:y,onLeaveCancelled:I,onBeforeAppear:_,onAppear:E,onAfterAppear:L,onAppearCancelled:T}=t,A=String(e.key),x=Ni(s,e),te=($,w)=>{$&&ut($,n,9,w)},Z=($,w)=>{const K=w[1];te($,w),ie($)?$.every(X=>X.length<=1)&&K():$.length<=1&&K()},j={mode:i,persisted:r,beforeEnter($){let w=a;if(!s.isMounted)if(l)w=_||a;else return;$[it]&&$[it](!0);const K=x[A];if(K&&ms(e,K)){let X=K.el[it];if(!X){const F=Qs(K);X=F&&F.el[it]}X&&X()}te(w,[$])},enter($){if(x[A]===e)return;let w=c,K=d,X=g;if(!s.isMounted)if(l)w=E||c,K=L||d,X=T||g;else return;let F=!1;$[Is]=$e=>{F||(F=!0,$e?te(X,[$]):te(K,[$]),j.delayedLeave&&j.delayedLeave(),$[Is]=void 0)};const pe=$[Is].bind(null,!1);w?Z(w,[$,pe]):pe()},leave($,w){const K=String(e.key);if($[Is]&&$[Is](!0),s.isUnmounting)return w();te(m,[$]);let X=!1;$[it]=pe=>{X||(X=!0,w(),pe?te(I,[$]):te(y,[$]),$[it]=void 0,x[K]===e&&delete x[K])};const F=$[it].bind(null,!1);x[K]=e,b?Z(b,[$,F]):F()},clone($){const w=Co($,t,s,n);return w.afterLeave=()=>{j.afterLeave&&j.afterLeave()},w.delayLeave=(K,X,F)=>{j.delayLeave?j.delayLeave(K,X,F):F()},w.delayedLeave=()=>{j.delayedLeave&&j.delayedLeave()},w}};return j}function ao(e){if(qn(e))return e=ls(e),e.children=null,e}function xn(e){if(!qn(e))return Bn(e.type)&&e.children?Ri(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:s}=e;if(s){if(t&16)return s[0];if(t&32&&fe(s.default))return s.default()}}function ks(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const s=e.component.subTree;ks(Bn(s.type)&&xn(s)||s,t)}else if(e.shapeFlag&128){const s=e.suspense;if(s){const n=s.isHydrating?s.pendingBranch:s.activeBranch;n&&ks(n,t.clone(n))}else e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)}else if(e.transition=t,e.type===U&&ie(e.children)){const s=Wi(e.children,!1);s&&ks(s,t)}}function Di(e,t=!1,s){let n=[],l=0;for(let i=0;i<e.length;i++){let r=e[i];const a=s==null?r.key:String(s)+String(r.key!=null?r.key:i);r.type===U?(r.patchFlag&128&&l++,n=n.concat(Di(r.children,t,a))):(t||r.type!==Ve)&&n.push(a!=null?ls(r,{key:a}):r)}if(l>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function Qs(e){if(e.component)return Qs(e.component.subTree);if(e.type===U){const t=ie(e.children)&&Wi(e.children,!1);return t?Qs(t):void 0}if(e.type!==Ve)return e}function Fi(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function fl(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const Mn=new WeakMap;function qs(e,t,s,n,l=!1){if(ie(e)){e.forEach((_,E)=>qs(_,t&&(ie(t)?t[E]:t),s,n,l));return}if(Ms(n)&&!l){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&qs(e,t,s,n.component.subTree);return}const i=n.shapeFlag&4?Jn(n.component):n.el,r=l?null:i,{i:a,r:c}=e,d=t&&t.r,g=a.refs===Ce?a.refs={}:a.refs,m=a.setupState,b=ve(m),y=m===Ce?ti:_=>fl(g,_)?!1:_e(b,_),I=(_,E)=>!(E&&fl(g,E));if(d!=null&&d!==c){if(pl(t),Ee(d))g[d]=null,y(d)&&(m[d]=null);else if(He(d)){const _=t;I(d,_.k)&&(d.value=null),_.k&&(g[_.k]=null)}}if(fe(c))dn(c,a,12,[r,g]);else{const _=Ee(c),E=He(c);if(_||E){const L=()=>{if(e.f){const T=_?y(c)?m[c]:g[c]:I()||!e.k?c.value:g[e.k];if(l)ie(T)&&Fo(T,i);else if(ie(T))T.includes(i)||T.push(i);else if(_)g[c]=[i],y(c)&&(m[c]=g[c]);else{const A=[i];I(c,e.k)&&(c.value=A),e.k&&(g[e.k]=A)}}else _?(g[c]=r,y(c)&&(m[c]=r)):E&&(I(c,e.k)&&(c.value=r),e.k&&(g[e.k]=r))};if(r){const T=()=>{L(),Mn.delete(e)};T.id=-1,Mn.set(e,T),Be(T,s)}else pl(e),L()}}}function pl(e){const t=Mn.get(e);t&&(t.flags|=8,Mn.delete(e))}Kn().requestIdleCallback;Kn().cancelIdleCallback;const Ms=e=>!!e.type.__asyncLoader,qn=e=>e.type.__isKeepAlive;function Ra(e,t){ji(e,"a",t)}function Na(e,t){ji(e,"da",t)}function ji(e,t,s=We){const n=e.__wdc||(e.__wdc=()=>{let l=s;for(;l;){if(l.isDeactivated)return;l=l.parent}return e()});if(Zs(t,n,s),s){let l=s.parent;for(;l&&l.parent;)qn(l.parent.vnode)&&Da(n,t,s,l),l=l.parent}}function Da(e,t,s,n){const l=Zs(t,e,n,!0),i=Zs("um",()=>Fo(n[t],l),s);i.flags=16}function Zs(e,t,s=We,n=!1){if(s){const l=s[e]||(s[e]=[]),i=t.__weh||(t.__weh=(...r)=>{At();const a=fn(s),c=ut(t,s,e,r);return a(),Ot(),c});return n?l.unshift(i):l.push(i),i}}const Wt=e=>(t,s=We)=>{(!sn||e==="sp")&&Zs(e,(...n)=>t(...n),s)},Fa=Wt("bm"),Re=Wt("m"),ja=Wt("bu"),Ka=Wt("u"),ws=Wt("bum"),Ki=Wt("um"),Ua=Wt("sp"),Va=Wt("rtg"),Ha=Wt("rtc");function Ba(e,t=We){Zs("ec",e,t)}const qa="components",Ui=Symbol.for("v-ndc");function za(e){return Ee(e)?Wa(qa,e,!1)||e:e||Ui}function Wa(e,t,s=!0,n=!1){const l=Ue||We;if(l){const i=l.type;{const a=Ic(i,!1);if(a&&(a===t||a===Qe(t)||a===jn(Qe(t))))return i}const r=hl(l[e]||i[e],t)||hl(l.appContext[e],t);return!r&&n?i:r}}function hl(e,t){return e&&(e[t]||e[Qe(t)]||e[jn(Qe(t))])}function se(e,t,s,n){let l;const i=s,r=ie(e);if(r||Ee(e)){const a=r&&ts(e);let c=!1,d=!1;a&&(c=!rt(e),d=It(e),e=Un(e)),l=new Array(e.length);for(let g=0,m=e.length;g<m;g++)l[g]=t(c?d?os(ct(e[g])):ct(e[g]):e[g],g,void 0,i)}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)l=[];else{l=new Array(e);for(let a=0;a<e;a++)l[a]=t(a+1,a,void 0,i)}else if(be(e))if(e[Symbol.iterator])l=Array.from(e,(a,c)=>t(a,c,void 0,i));else{const a=Object.keys(e);l=new Array(a.length);for(let c=0,d=a.length;c<d;c++){const g=a[c];l[c]=t(e[g],g,c,i)}}else l=[];return l}function Ja(e,t,s,n,l,i){if(s==null&&(s={}),Ue.ce||Ue.parent&&Ms(Ue.parent)&&Ue.parent.ce){const d=s.key==null?Le({},s,{key:i}):s,g=Object.keys(d).length>0;return p(),je(U,null,[Oe("slot",d,n)],g?-2:64)}let r=e[t];r&&r._c&&(r._d=!1);const a=Ht.length;p();let c;try{const d=r&&Vi(r(s)),g=s.key||i||d&&d.key;c=je(U,{key:(g&&!_t(g)?g:`_${t}`)+(!d&&n?"_fb":"")},d||(n?n():[]),d&&e._===1?64:-2)}catch(d){for(let g=Ht.length;g>a;g--)Xo();throw d}finally{r&&r._c&&(r._d=!0)}return c}function Vi(e){return e.some(t=>Es(t)?!(t.type===Ve||t.type===U&&!Vi(t.children)):!0)?e:null}const xo=e=>e?cr(e)?Jn(e):xo(e.parent):null,zs=Le(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>xo(e.parent),$root:e=>xo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Bi(e),$forceUpdate:e=>e.f||(e.f=()=>{Hn(e.update)}),$nextTick:e=>e.n||(e.n=Vt.bind(e.proxy)),$watch:e=>Ma.bind(e)}),co=(e,t)=>e!==Ce&&!e.__isScriptSetup&&_e(e,t),Ga={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:l,props:i,accessCache:r,type:a,appContext:c}=e;if(t[0]!=="$"){const b=r[t];if(b!==void 0)switch(b){case 1:return n[t];case 2:return l[t];case 4:return s[t];case 3:return i[t]}else{if(co(n,t))return r[t]=1,n[t];if(l!==Ce&&_e(l,t))return r[t]=2,l[t];if(_e(i,t))return r[t]=3,i[t];if(s!==Ce&&_e(s,t))return r[t]=4,s[t];Mo&&(r[t]=0)}}const d=zs[t];let g,m;if(d)return t==="$attrs"&&ze(e.attrs,"get",""),d(e);if((g=a.__cssModules)&&(g=g[t]))return g;if(s!==Ce&&_e(s,t))return r[t]=4,s[t];if(m=c.config.globalProperties,_e(m,t))return m[t]},set({_:e},t,s){const{data:n,setupState:l,ctx:i}=e;return co(l,t)?(l[t]=s,!0):n!==Ce&&_e(n,t)?(n[t]=s,!0):_e(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:l,props:i,type:r}},a){let c;return!!(s[a]||e!==Ce&&a[0]!=="$"&&_e(e,a)||co(t,a)||_e(i,a)||_e(n,a)||_e(zs,a)||_e(l.config.globalProperties,a)||(c=r.__cssModules)&&c[a])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:_e(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function gl(e){return ie(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Mo=!0;function Ya(e){const t=Bi(e),s=e.proxy,n=e.ctx;Mo=!1,t.beforeCreate&&ml(t.beforeCreate,e,"bc");const{data:l,computed:i,methods:r,watch:a,provide:c,inject:d,created:g,beforeMount:m,mounted:b,beforeUpdate:y,updated:I,activated:_,deactivated:E,beforeDestroy:L,beforeUnmount:T,destroyed:A,unmounted:x,render:te,renderTracked:Z,renderTriggered:j,errorCaptured:$,serverPrefetch:w,expose:K,inheritAttrs:X,components:F,directives:pe,filters:$e}=t;if(d&&Xa(d,n,null),r)for(const we in r){const ye=r[we];fe(ye)&&(n[we]=ye.bind(s))}if(l){const we=l.call(s,s);be(we)&&(e.data=nt(we))}if(Mo=!0,i)for(const we in i){const ye=i[we],ft=fe(ye)?ye.bind(s,s):fe(ye.get)?ye.get.bind(s,s):Tt,re=!fe(ye)&&fe(ye.set)?ye.set.bind(s):Tt,Pt=Q({get:ft,set:re});Object.defineProperty(n,we,{enumerable:!0,configurable:!0,get:()=>Pt.value,set:Ze=>Pt.value=Ze})}if(a)for(const we in a)Hi(a[we],n,s,we);if(c){const we=fe(c)?c.call(s):c;Reflect.ownKeys(we).forEach(ye=>{Sa(ye,we[ye])})}g&&ml(g,e,"c");function xe(we,ye){ie(ye)?ye.forEach(ft=>we(ft.bind(s))):ye&&we(ye.bind(s))}if(xe(Fa,m),xe(Re,b),xe(ja,y),xe(Ka,I),xe(Ra,_),xe(Na,E),xe(Ba,$),xe(Ha,Z),xe(Va,j),xe(ws,T),xe(Ki,x),xe(Ua,w),ie(K))if(K.length){const we=e.exposed||(e.exposed={});K.forEach(ye=>{Object.defineProperty(we,ye,{get:()=>s[ye],set:ft=>s[ye]=ft,enumerable:!0})})}else e.exposed||(e.exposed={});te&&e.render===Tt&&(e.render=te),X!=null&&(e.inheritAttrs=X),F&&(e.components=F),pe&&(e.directives=pe),w&&Fi(e)}function Xa(e,t,s=Tt){ie(e)&&(e=To(e));for(const n in e){const l=e[n];let i;be(l)?"default"in l?i=kn(l.from||n,l.default,!0):i=kn(l.from||n):i=kn(l),He(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:r=>i.value=r}):t[n]=i}}function ml(e,t,s){ut(ie(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Hi(e,t,s,n){let l=n.includes(".")?Ii(s,n):()=>s[n];if(Ee(e)){const i=t[e];fe(i)&&bs(l,i)}else if(fe(e))bs(l,e.bind(s));else if(be(e))if(ie(e))e.forEach(i=>Hi(i,t,s,n));else{const i=fe(e.handler)?e.handler.bind(s):t[e.handler];fe(i)&&bs(l,i,e)}}function Bi(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:l,optionsCache:i,config:{optionMergeStrategies:r}}=e.appContext,a=i.get(t);let c;return a?c=a:!l.length&&!s&&!n?c=t:(c={},l.length&&l.forEach(d=>Tn(c,d,r,!0)),Tn(c,t,r)),be(t)&&i.set(t,c),c}function Tn(e,t,s,n=!1){const{mixins:l,extends:i}=t;i&&Tn(e,i,s,!0),l&&l.forEach(r=>Tn(e,r,s,!0));for(const r in t)if(!(n&&r==="expose")){const a=Qa[r]||s&&s[r];e[r]=a?a(e[r],t[r]):t[r]}return e}const Qa={data:vl,props:_l,emits:_l,methods:Ds,computed:Ds,beforeCreate:Ye,created:Ye,beforeMount:Ye,mounted:Ye,beforeUpdate:Ye,updated:Ye,beforeDestroy:Ye,beforeUnmount:Ye,destroyed:Ye,unmounted:Ye,activated:Ye,deactivated:Ye,errorCaptured:Ye,serverPrefetch:Ye,components:Ds,directives:Ds,watch:ec,provide:vl,inject:Za};function vl(e,t){return t?e?function(){return Le(fe(e)?e.call(this,this):e,fe(t)?t.call(this,this):t)}:t:e}function Za(e,t){return Ds(To(e),To(t))}function To(e){if(ie(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Ye(e,t){return e?[...new Set([].concat(e,t))]:t}function Ds(e,t){return e?Le(Object.create(null),e,t):t}function _l(e,t){return e?ie(e)&&ie(t)?[...new Set([...e,...t])]:Le(Object.create(null),gl(e),gl(t??{})):t}function ec(e,t){if(!e)return t;if(!t)return e;const s=Le(Object.create(null),e);for(const n in t)s[n]=Ye(e[n],t[n]);return s}function qi(){return{app:null,config:{isNativeTag:ti,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 tc=0;function sc(e,t){return function(n,l=null){fe(n)||(n=Le({},n)),l!=null&&!be(l)&&(l=null);const i=qi(),r=new WeakSet,a=[];let c=!1;const d=i.app={_uid:tc++,_component:n,_props:l,_container:null,_context:i,_instance:null,version:Rc,get config(){return i.config},set config(g){},use(g,...m){return r.has(g)||(g&&fe(g.install)?(r.add(g),g.install(d,...m)):fe(g)&&(r.add(g),g(d,...m))),d},mixin(g){return i.mixins.includes(g)||i.mixins.push(g),d},component(g,m){return m?(i.components[g]=m,d):i.components[g]},directive(g,m){return m?(i.directives[g]=m,d):i.directives[g]},mount(g,m,b){if(!c){const y=d._ceVNode||Oe(n,l);return y.appContext=i,b===!0?b="svg":b===!1&&(b=void 0),e(y,g,b),c=!0,d._container=g,g.__vue_app__=d,Jn(y.component)}},onUnmount(g){a.push(g)},unmount(){c&&(ut(a,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(g,m){return i.provides[g]=m,d},runWithContext(g){const m=Ts;Ts=d;try{return g()}finally{Ts=m}}};return d}}let Ts=null;const nc=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Qe(t)}Modifiers`]||e[`${is(t)}Modifiers`];function oc(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||Ce;let l=s;const i=t.startsWith("update:"),r=i&&nc(n,t.slice(7));r&&(r.trim&&(l=s.map(g=>Ee(g)?g.trim():g)),r.number&&(l=l.map(un)));let a,c=n[a=so(t)]||n[a=so(Qe(t))];!c&&i&&(c=n[a=so(is(t))]),c&&ut(c,e,6,l);const d=n[a+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,ut(d,e,6,l)}}const lc=new WeakMap;function zi(e,t,s=!1){const n=s?lc:t.emitsCache,l=n.get(e);if(l!==void 0)return l;const i=e.emits;let r={},a=!1;if(!fe(e)){const c=d=>{const g=zi(d,t,!0);g&&(a=!0,Le(r,g))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!a?(be(e)&&n.set(e,null),null):(ie(i)?i.forEach(c=>r[c]=null):Le(r,i),be(e)&&n.set(e,r),r)}function zn(e,t){return!e||!Nn(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),_e(e,t[0].toLowerCase()+t.slice(1))||_e(e,is(t))||_e(e,t))}function yl(e){const{type:t,vnode:s,proxy:n,withProxy:l,propsOptions:[i],slots:r,attrs:a,emit:c,render:d,renderCache:g,props:m,data:b,setupState:y,ctx:I,inheritAttrs:_}=e,E=Cn(e);let L,T;try{if(s.shapeFlag&4){const x=l||n,te=x;L=Ct(d.call(te,x,g,m,y,b,I)),T=a}else{const x=t;L=Ct(x.length>1?x(m,{attrs:a,slots:r,emit:c}):x(m,null)),T=t.props?a:ic(a)}}catch(x){Ht.length=0,Vn(x,e,1),L=Oe(Ve)}let A=L;if(T&&_!==!1){const x=Object.keys(T),{shapeFlag:te}=A;x.length&&te&7&&(i&&x.some(Dn)&&(T=rc(T,i)),A=ls(A,T,!1,!0))}if(s.dirs&&(A=ls(A,null,!1,!0),A.dirs=A.dirs?A.dirs.concat(s.dirs):s.dirs),s.transition){const x=Bn(A.type)&&xn(A)||A;ks(x,s.transition)}return L=A,Cn(E),L}function Wi(e,t=!0){let s;for(let n=0;n<e.length;n++){const l=e[n];if(Es(l)){if(l.type!==Ve||l.children==="v-if"){if(s)return;s=l}}else return}return s}const ic=e=>{let t;for(const s in e)(s==="class"||s==="style"||Nn(s))&&((t||(t={}))[s]=e[s]);return t},rc=(e,t)=>{const s={};for(const n in e)(!Dn(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function ac(e,t,s){const{props:n,children:l,component:i}=e,{props:r,children:a,patchFlag:c}=t,d=i.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?bl(n,r,d):!!r;if(c&8){const g=t.dynamicProps;for(let m=0;m<g.length;m++){const b=g[m];if(Ji(r,n,b)&&!zn(d,b))return!0}}}else return(l||a)&&(!a||!a.$stable)?!0:n===r?!1:n?r?bl(n,r,d):!0:!!r;return!1}function bl(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let l=0;l<n.length;l++){const i=n[l];if(!_e(e,i)||Ji(t,e,i)&&!zn(s,i))return!0}return!1}function Ji(e,t,s){const n=e[s],l=t[s];return s==="style"&&be(n)&&be(l)?!qt(n,l):n!==l}function cc({vnode:e,parent:t,suspense:s},n){for(;t;){const l=t.subTree;if(l.suspense&&l.suspense.activeBranch===e&&(l.suspense.vnode.el=l.el=n,e=l),l===e)(e=t.vnode).el=n,t=t.parent;else break}s&&s.activeBranch===e&&(s.vnode.el=n)}const Gi={},Yi=()=>Object.create(Gi),Xi=e=>Object.getPrototypeOf(e)===Gi;function uc(e,t,s,n=!1){const l={},i=Yi();e.propsDefaults=Object.create(null),Qi(e,t,l,i);for(const r in e.propsOptions[0])r in l||(l[r]=void 0);s?e.props=n?l:da(l):e.type.props?e.props=l:e.props=i,e.attrs=i}function dc(e,t,s,n){const{props:l,attrs:i,vnode:{patchFlag:r}}=e,a=ve(l),[c]=e.propsOptions;let d=!1;if((n||r>0)&&!(r&16)){if(r&8){const g=e.vnode.dynamicProps;for(let m=0;m<g.length;m++){let b=g[m];if(zn(e.emitsOptions,b))continue;const y=t[b];if(c)if(_e(i,b))y!==i[b]&&(i[b]=y,d=!0);else{const I=Qe(b);l[I]=Eo(c,a,I,y,e,!1)}else y!==i[b]&&(i[b]=y,d=!0)}}}else{Qi(e,t,l,i)&&(d=!0);let g;for(const m in a)(!t||!_e(t,m)&&((g=is(m))===m||!_e(t,g)))&&(c?s&&(s[m]!==void 0||s[g]!==void 0)&&(l[m]=Eo(c,a,m,void 0,e,!0)):delete l[m]);if(i!==a)for(const m in i)(!t||!_e(t,m))&&(delete i[m],d=!0)}d&&Kt(e.attrs,"set","")}function Qi(e,t,s,n){const[l,i]=e.propsOptions;let r=!1,a;if(t)for(let c in t){if(Vs(c))continue;const d=t[c];let g;l&&_e(l,g=Qe(c))?!i||!i.includes(g)?s[g]=d:(a||(a={}))[g]=d:zn(e.emitsOptions,c)||(!(c in n)||d!==n[c])&&(n[c]=d,r=!0)}if(i){const c=ve(s),d=a||Ce;for(let g=0;g<i.length;g++){const m=i[g];s[m]=Eo(l,c,m,d[m],e,!_e(d,m))}}return r}function Eo(e,t,s,n,l,i){const r=e[s];if(r!=null){const a=_e(r,"default");if(a&&n===void 0){const c=r.default;if(r.type!==Function&&!r.skipFactory&&fe(c)){const{propsDefaults:d}=l;if(s in d)n=d[s];else{const g=fn(l);n=d[s]=c.call(null,t),g()}}else n=c;l.ce&&l.ce._setProp(s,n)}r[0]&&(i&&!a?n=!1:r[1]&&(n===""||n===is(s))&&(n=!0))}return n}const fc=new WeakMap;function Zi(e,t,s=!1){const n=s?fc:t.propsCache,l=n.get(e);if(l)return l;const i=e.props,r={},a=[];let c=!1;if(!fe(e)){const g=m=>{c=!0;const[b,y]=Zi(m,t,!0);Le(r,b),y&&a.push(...y)};!s&&t.mixins.length&&t.mixins.forEach(g),e.extends&&g(e.extends),e.mixins&&e.mixins.forEach(g)}if(!i&&!c)return be(e)&&n.set(e,_s),_s;if(ie(i))for(let g=0;g<i.length;g++){const m=Qe(i[g]);kl(m)&&(r[m]=Ce)}else if(i)for(const g in i){const m=Qe(g);if(kl(m)){const b=i[g],y=r[m]=ie(b)||fe(b)?{type:b}:Le({},b),I=y.type;let _=!1,E=!0;if(ie(I))for(let L=0;L<I.length;++L){const T=I[L],A=fe(T)&&T.name;if(A==="Boolean"){_=!0;break}else A==="String"&&(E=!1)}else _=fe(I)&&I.name==="Boolean";y[0]=_,y[1]=E,(_||_e(y,"default"))&&a.push(m)}}const d=[r,a];return be(e)&&n.set(e,d),d}function kl(e){return e[0]!=="$"&&!Vs(e)}const Jo=e=>e==="_"||e==="_ctx"||e==="$stable",Go=e=>ie(e)?e.map(Ct):[Ct(e)],pc=(e,t,s)=>{if(t._n)return t;const n=yt((...l)=>Go(t(...l)),s);return n._c=!1,n},er=(e,t,s)=>{const n=e._ctx;for(const l in e){if(Jo(l))continue;const i=e[l];if(fe(i))t[l]=pc(l,i,n);else if(i!=null){const r=Go(i);t[l]=()=>r}}},tr=(e,t)=>{const s=Go(t);e.slots.default=()=>s},sr=(e,t,s)=>{for(const n in t)(s||!Jo(n))&&(e[n]=t[n])},hc=(e,t,s)=>{const n=e.slots=Yi();if(e.vnode.shapeFlag&32){const l=t._;l?(sr(n,t,s),s&&li(n,"_",l,!0)):er(t,n)}else t&&tr(e,t)},gc=(e,t,s)=>{const{vnode:n,slots:l}=e;let i=!0,r=Ce;if(n.shapeFlag&32){const a=t._;a?s&&a===1?i=!1:sr(l,t,s):(i=!t.$stable,er(t,l)),r=t}else t&&(tr(e,t),r={default:1});if(i)for(const a in l)!Jo(a)&&r[a]==null&&delete l[a]},Be=kc;function mc(e){return vc(e)}function vc(e,t){const s=Kn();s.__VUE__=!0;const{insert:n,remove:l,patchProp:i,createElement:r,createText:a,createComment:c,setText:d,setElementText:g,parentNode:m,nextSibling:b,setScopeId:y=Tt,insertStaticContent:I}=e,_=(v,S,O,H=null,R=null,D=null,Y=void 0,z=null,W=!!S.dynamicChildren)=>{if(v===S)return;v&&!ms(v,S)&&(H=bt(v),Ze(v,R,D,!0),v=null),S.patchFlag===-2&&(W=!1,S.dynamicChildren=null),S.dynamicChildren&&v&&v.dynamicChildren&&v.dynamicChildren.hasOnce&&(S.dynamicChildren===_s&&(S.dynamicChildren=[]),S.dynamicChildren.hasOnce=!0);const{type:P,ref:oe,shapeFlag:q}=S;switch(P){case Wn:E(v,S,O,H);break;case Ve:L(v,S,O,H);break;case fo:v==null&&T(S,O,H,Y);break;case U:F(v,S,O,H,R,D,Y,z,W);break;default:q&1?te(v,S,O,H,R,D,Y,z,W):q&6?pe(v,S,O,H,R,D,Y,z,W):(q&64||q&128)&&P.process(v,S,O,H,R,D,Y,z,W,ht)}oe!=null&&R?qs(oe,v&&v.ref,D,S||v,!S):oe==null&&v&&v.ref!=null&&qs(v.ref,null,D,v,!0)},E=(v,S,O,H)=>{if(v==null)n(S.el=a(S.children),O,H);else{const R=S.el=v.el;S.children!==v.children&&d(R,S.children)}},L=(v,S,O,H)=>{v==null?n(S.el=c(S.children||""),O,H):S.el=v.el},T=(v,S,O,H)=>{[v.el,v.anchor]=I(v.children,S,O,H,v.el,v.anchor)},A=({el:v,anchor:S},O,H)=>{let R;for(;v&&v!==S;)R=b(v),n(v,O,H),v=R;n(S,O,H)},x=({el:v,anchor:S})=>{let O;for(;v&&v!==S;)O=b(v),l(v),v=O;l(S)},te=(v,S,O,H,R,D,Y,z,W)=>{if(S.type==="svg"?Y="svg":S.type==="math"&&(Y="mathml"),v==null)Z(S,O,H,R,D,Y,z,W);else{const P=v.el&&v.el._isVueCE?v.el:null;try{P&&P._beginPatch(),w(v,S,R,D,Y,z,W)}finally{P&&P._endPatch()}}},Z=(v,S,O,H,R,D,Y,z)=>{let W,P;const{props:oe,shapeFlag:q,transition:le,dirs:ce}=v;if(W=v.el=r(v.type,D,oe&&oe.is,oe),q&8?g(W,v.children):q&16&&$(v.children,W,null,H,R,uo(v,D),Y,z),ce&&cs(v,null,H,"created"),j(W,v,v.scopeId,Y,H),oe){for(const ke in oe)ke!=="value"&&!Vs(ke)&&i(W,ke,null,oe[ke],D,H);"value"in oe&&i(W,"value",null,oe.value,D),(P=oe.onVnodeBeforeMount)&&$t(P,H,v)}ce&&cs(v,null,H,"beforeMount");const ge=_c(R,le);ge?le.beforeEnter(W):le&&!le.persisted&&(W[bc]=!0),n(W,S,O),((P=oe&&oe.onVnodeMounted)||ge||ce)&&Be(()=>{try{P&&$t(P,H,v),ge&&le.enter(W),ce&&cs(v,null,H,"mounted")}finally{}},R)},j=(v,S,O,H,R)=>{if(O&&y(v,O),H)for(let D=0;D<H.length;D++)y(v,H[D]);if(R){let D=R.subTree;if(S===D||or(D.type)&&(D.ssContent===S||D.ssFallback===S)){const Y=R.vnode;j(v,Y,Y.scopeId,Y.slotScopeIds,R.parent)}}},$=(v,S,O,H,R,D,Y,z,W=0)=>{for(let P=W;P<v.length;P++){const oe=v[P]=z?jt(v[P]):Ct(v[P]);_(null,oe,S,O,H,R,D,Y,z)}},w=(v,S,O,H,R,D,Y)=>{const z=S.el=v.el;let{patchFlag:W,dynamicChildren:P,dirs:oe}=S;W|=v.patchFlag&16;const q=v.props||Ce,le=S.props||Ce;let ce;if(O&&us(O,!1),(ce=le.onVnodeBeforeUpdate)&&$t(ce,O,S,v),oe&&cs(S,v,O,"beforeUpdate"),O&&us(O,!0),P&&(!v.dynamicChildren||v.dynamicChildren.length!==P.length)&&(W=0,Y=!1,P=null),(q.innerHTML&&le.innerHTML==null||q.textContent&&le.textContent==null)&&g(z,""),P?K(v.dynamicChildren,P,z,O,H,uo(S,R),D):Y||ye(v,S,z,null,O,H,uo(S,R),D,!1),W>0){if(W&16)X(z,q,le,O,R);else if(W&2&&q.class!==le.class&&i(z,"class",null,le.class,R),W&4&&i(z,"style",q.style,le.style,R),W&8){const ge=S.dynamicProps;for(let ke=0;ke<ge.length;ke++){const J=ge[ke],k=q[J],C=le[J];(C!==k||J==="value")&&i(z,J,k,C,R,O)}}W&1&&v.children!==S.children&&g(z,S.children)}else!Y&&P==null&&X(z,q,le,O,R);((ce=le.onVnodeUpdated)||oe)&&Be(()=>{ce&&$t(ce,O,S,v),oe&&cs(S,v,O,"updated")},H)},K=(v,S,O,H,R,D,Y)=>{for(let z=0;z<S.length;z++){const W=v[z],P=S[z],oe=W.el||Ws(W),q=oe&&(W.type===U||!ms(W,P)||W.shapeFlag&198)?m(oe):O;_(W,P,q,null,H,R,D,Y,!0)}},X=(v,S,O,H,R)=>{if(S!==O){if(S!==Ce)for(const D in S)!Vs(D)&&!(D in O)&&i(v,D,S[D],null,R,H);for(const D in O){if(Vs(D))continue;const Y=O[D],z=S[D];Y!==z&&D!=="value"&&i(v,D,z,Y,R,H)}"value"in O&&i(v,"value",S.value,O.value,R)}},F=(v,S,O,H,R,D,Y,z,W)=>{const P=S.el=v?v.el:a(""),oe=S.anchor=v?v.anchor:a("");let{patchFlag:q,dynamicChildren:le,slotScopeIds:ce}=S;ce&&(z=z?z.concat(ce):ce),v==null?(n(P,O,H),n(oe,O,H),$(S.children||[],O,oe,R,D,Y,z,W)):q>0&&q&64&&le&&v.dynamicChildren&&v.dynamicChildren.length===le.length?(K(v.dynamicChildren,le,O,R,D,Y,z),(S.key!=null||R&&S===R.subTree)&&Yo(v,S,!0)):ye(v,S,O,oe,R,D,Y,z,W)},pe=(v,S,O,H,R,D,Y,z,W)=>{S.slotScopeIds=z,v==null?S.shapeFlag&512?R.ctx.activate(S,O,H,Y,W):$e(S,O,H,R,D,Y,W):Pe(v,S,W)},$e=(v,S,O,H,R,D,Y)=>{const z=v.component=Mc(v,H,R);if(qn(v)&&(z.ctx.renderer=ht),Tc(z,!1,Y),z.asyncDep){if(R&&R.registerDep(z,xe,Y,D),!v.el){const W=z.subTree=Oe(Ve);L(null,W,S,O),v.placeholder=W.el}}else xe(z,v,S,O,R,D,Y)},Pe=(v,S,O)=>{const H=S.component=v.component;if(ac(v,S,O))if(H.asyncDep&&!H.asyncResolved){S.el=v.el,S.placeholder=v.placeholder,we(H,S,O);return}else H.next=S,H.update();else S.el=v.el,S.placeholder=v.placeholder,H.vnode=S},xe=(v,S,O,H,R,D,Y)=>{const z=()=>{if(v.isMounted){let{next:q,bu:le,u:ce,parent:ge,vnode:ke}=v;{const Se=nr(v);if(Se){q&&(q.el=ke.el,we(v,q,Y)),Se.asyncDep.then(()=>{const De=()=>{v.job.flags&8||(R&&R.pendingBranch?Be(De,R):P())};De.flags=48,Be(De,R)});return}}let J=q,k;us(v,!1),q?(q.el=ke.el,we(v,q,Y)):q=ke,le&&bn(le),(k=q.props&&q.props.onVnodeBeforeUpdate)&&$t(k,ge,q,ke),us(v,!0);const C=yl(v),ne=v.subTree;v.subTree=C,_(ne,C,m(ne.el||Ws(ne)),bt(ne),v,R,D),q.el=C.el,J===null&&cc(v,C.el),ce&&Be(ce,R),(k=q.props&&q.props.onVnodeUpdated)&&Be(()=>$t(k,ge,q,ke),R)}else{let q;const{el:le,props:ce}=S,{bm:ge,m:ke,parent:J,root:k,type:C}=v,ne=Ms(S);us(v,!1),ge&&bn(ge),!ne&&(q=ce&&ce.onVnodeBeforeMount)&&$t(q,J,S),us(v,!0);{k.ce&&k.ce._hasShadowRoot()&&k.ce._injectChildStyle(C,v.parent?v.parent.type:void 0);const Se=v.subTree=yl(v);_(null,Se,O,H,v,R,D),S.el=Se.el}if(ke&&Be(ke,R),!ne&&(q=ce&&ce.onVnodeMounted)){const Se=S;Be(()=>$t(q,J,Se),R)}(S.shapeFlag&256||J&&Ms(J.vnode)&&J.vnode.shapeFlag&256)&&v.a&&Be(v.a,R),v.isMounted=!0,S=O=H=null}};v.scope.on();const W=v.effect=new ci(z);v.scope.off();const P=v.update=W.run.bind(W),oe=v.job=W.runIfDirty.bind(W);oe.i=v,oe.id=v.uid,W.scheduler=()=>Hn(oe),us(v,!0),P()},we=(v,S,O)=>{S.component=v;const H=v.vnode.props;v.vnode=S,v.next=null,dc(v,S.props,H,O),gc(v,S.children,O),At(),Mi(v),Ot()},ye=(v,S,O,H,R,D,Y,z,W=!1)=>{const P=v&&v.children,oe=v?v.shapeFlag:0,q=S.children,{patchFlag:le,shapeFlag:ce}=S;if(le>0){if(le&128){re(P,q,O,H,R,D,Y,z,W);return}else if(le&256){ft(P,q,O,H,R,D,Y,z,W);return}}ce&8?(oe&16&&ot(P,R,D),q!==P&&g(O,q)):oe&16?ce&16?re(P,q,O,H,R,D,Y,z,W):ot(P,R,D,!0):(oe&8&&g(O,""),ce&16&&$(q,O,H,R,D,Y,z,W))},ft=(v,S,O,H,R,D,Y,z,W)=>{v=v||_s,S=S||_s;const P=v.length,oe=S.length,q=Math.min(P,oe);let le;for(le=0;le<q;le++){const ce=S[le]=W?jt(S[le]):Ct(S[le]);_(v[le],ce,O,null,R,D,Y,z,W)}P>oe?ot(v,R,D,!0,!1,q):$(S,O,H,R,D,Y,z,W,q)},re=(v,S,O,H,R,D,Y,z,W)=>{let P=0;const oe=S.length;let q=v.length-1,le=oe-1;for(;P<=q&&P<=le;){const ce=v[P],ge=S[P]=W?jt(S[P]):Ct(S[P]);if(ms(ce,ge))_(ce,ge,O,null,R,D,Y,z,W);else break;P++}for(;P<=q&&P<=le;){const ce=v[q],ge=S[le]=W?jt(S[le]):Ct(S[le]);if(ms(ce,ge))_(ce,ge,O,null,R,D,Y,z,W);else break;q--,le--}if(P>q){if(P<=le){const ce=le+1,ge=ce<oe?S[ce].el:H;for(;P<=le;)_(null,S[P]=W?jt(S[P]):Ct(S[P]),O,ge,R,D,Y,z,W),P++}}else if(P>le)for(;P<=q;)Ze(v[P],R,D,!0),P++;else{const ce=P,ge=P,ke=new Map;for(P=ge;P<=le;P++){const tt=S[P]=W?jt(S[P]):Ct(S[P]);tt.key!=null&&ke.set(tt.key,P)}let J,k=0;const C=le-ge+1;let ne=!1,Se=0;const De=new Array(C);for(P=0;P<C;P++)De[P]=0;for(P=ce;P<=q;P++){const tt=v[P];if(k>=C){Ze(tt,R,D,!0);continue}let kt;if(tt.key!=null)kt=ke.get(tt.key);else for(J=ge;J<=le;J++)if(De[J-ge]===0&&ms(tt,S[J])){kt=J;break}kt===void 0?Ze(tt,R,D,!0):(De[kt-ge]=P+1,kt>=Se?Se=kt:ne=!0,_(tt,S[kt],O,null,R,D,Y,z,W),k++)}const as=ne?yc(De):_s;for(J=as.length-1,P=C-1;P>=0;P--){const tt=ge+P,kt=S[tt],tl=S[tt+1],sl=tt+1<oe?tl.el||Ws(tl):H;De[P]===0?_(null,kt,O,sl,R,D,Y,z,W):ne&&(J<0||P!==as[J]?Pt(kt,O,sl,2):J--)}}},Pt=(v,S,O,H,R=null)=>{const{el:D,type:Y,transition:z,children:W,shapeFlag:P}=v;if(P&6){Pt(v.component.subTree,S,O,H);return}if(P&128){v.suspense.move(S,O,H);return}if(P&64){Y.move(v,S,O,ht);return}if(Y===U){n(D,S,O);for(let q=0;q<W.length;q++)Pt(W[q],S,O,H);n(v.anchor,S,O);return}if(Y===fo){A(v,S,O);return}if(H!==2&&P&1&&z)if(H===0)z.persisted&&!D[it]?n(D,S,O):(z.beforeEnter(D),n(D,S,O),Be(()=>z.enter(D),R));else{const{leave:q,delayLeave:le,afterLeave:ce}=z,ge=()=>{v.ctx.isUnmounted?l(D):n(D,S,O)},ke=()=>{const J=D._isLeaving||!!D[it];D._isLeaving&&D[it](!0),z.persisted&&!J?ge():q(D,()=>{ge(),ce&&ce()})};le?le(D,ge,ke):ke()}else n(D,S,O)},Ze=(v,S,O,H=!1,R=!1)=>{const{type:D,props:Y,ref:z,children:W,dynamicChildren:P,shapeFlag:oe,patchFlag:q,dirs:le,cacheIndex:ce,memo:ge}=v;if((q===-2||P&&P.hasOnce)&&(R=!1),z!=null&&(At(),qs(z,null,O,v,!0),Ot()),ce!=null&&(!v.ctx||v.ctx===S)&&(S.renderCache[ce]=void 0),oe&256&&S.ctx.deactivate(v))return;const ke=oe&1&&le,J=!Ms(v);let k;if(J&&(k=Y&&Y.onVnodeBeforeUnmount)&&$t(k,S,v),oe&6)pt(v.component,O,H);else{if(oe&128){v.suspense.unmount(O,H);return}ke&&cs(v,null,S,"beforeUnmount"),oe&64?v.type.remove(v,S,O,ht,H):P&&!P.hasOnce&&(D!==U||q>0&&q&64)?ot(P,S,O,!1,!0):(D===U&&q&384||!R&&oe&16)&&ot(W,S,O),H&&rs(v)}const C=ge!=null&&ce==null;(J&&(k=Y&&Y.onVnodeUnmounted)||ke||C)&&Be(()=>{k&&$t(k,S,v),ke&&cs(v,null,S,"unmounted"),C&&(v.el=null)},O)},rs=v=>{const{type:S,el:O,anchor:H,transition:R}=v,D=S===U;if(D&&!R){Lt(O,H);return}if(S===fo){x(v),R&&!R.persisted&&R.afterLeave&&R.afterLeave();return}const Y=D?Qs(v):v,z=()=>{D?m(O)&&Lt(O,H):l(O),R&&!R.persisted&&R.afterLeave&&R.afterLeave()};if(Y&&Y.shapeFlag&1&&R&&!R.persisted){const{leave:W,delayLeave:P}=R,oe=Y.el,q=()=>W(oe,z);P?P(oe,z,q):q()}else z()},Lt=(v,S)=>{let O;for(;v!==S;)O=b(v),l(v),v=O;l(S)},pt=(v,S,O)=>{const{bum:H,scope:R,job:D,subTree:Y,um:z,m:W,a:P}=v;$l(W),$l(P),H&&bn(H),R.stop(),D?(D.flags|=8,Ze(Y,v,S,O)):Y&&(Y.transition=v.vnode.transition,Ze(Y,v,S,O)),z&&Be(z,S);const oe=()=>{v.isUnmounted=!0};oe.flags=16,Be(oe,S)},ot=(v,S,O,H=!1,R=!1,D=0)=>{for(let Y=D;Y<v.length;Y++)Ze(v[Y],S,O,H,R)},bt=v=>{if(v.shapeFlag&6)return bt(v.component.subTree);if(v.shapeFlag&128)return v.suspense.next();const S=b(v.anchor||v.el),O=S&&S[Pi];return O?b(O):S},Rt=(v,S,O)=>{const H=v&&S._vnode?void 0:v&&v.component?v.component.uid:xc();wa(()=>{v==null?S._vnode&&Ze(S._vnode,null,null,!0):_(S._vnode||null,v,S,null,null,null,O),S._vnode=v},H)},ht={p:_,um:Ze,m:Pt,r:rs,mt:$e,mc:$,pc:ye,pbc:K,n:bt,o:e};return{render:Rt,hydrate:void 0,createApp:sc(Rt)}}function uo({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function us({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function _c(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Yo(e,t,s=!1){const n=e.children,l=t.children;if(ie(n)&&ie(l))for(let i=0;i<n.length;i++){const r=n[i];let a=l[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=l[i]=jt(l[i]),a.el=r.el),!s&&a.patchFlag!==-2&&Yo(r,a)),a.type===Wn&&(a.patchFlag===-1&&(a=l[i]=jt(a)),a.el=r.el),a.type===Ve&&!a.el&&(a.el=r.el)}}function yc(e){const t=e.slice(),s=[0];let n,l,i,r,a;const c=e.length;for(n=0;n<c;n++){const d=e[n];if(d!==0){if(l=s[s.length-1],e[l]<d){t[n]=l,s.push(n);continue}for(i=0,r=s.length-1;i<r;)a=i+r>>1,e[s[a]]<d?i=a+1:r=a;d<e[s[i]]&&(i>0&&(t[n]=s[i-1]),s[i]=n)}}for(i=s.length,r=s[i-1];i-- >0;)s[i]=r,r=t[r];return s}function nr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:nr(t)}function $l(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Ws(e){if(e.placeholder)return e.placeholder;const t=e.component;if(t)return Ws(t.subTree);const s=e.suspense;return s&&s.activeBranch?Ws(s.activeBranch):null}const or=e=>e.__isSuspense,bc=Symbol("_deferredEnter");function kc(e,t){t&&t.pendingBranch?ie(e)?t.effects.push(...e):t.effects.push(e):$a(e)}const U=Symbol.for("v-fgt"),Wn=Symbol.for("v-txt"),Ve=Symbol.for("v-cmt"),fo=Symbol.for("v-stc"),Ht=[];let st=null;function p(e=!1){Ht.push(st=e?null:[])}function Xo(){Ht.pop(),st=Ht[Ht.length-1]||null}let en=1;function En(e,t=!1){en+=e,e<0&&st&&t&&(st.hasOnce=!0)}function lr(e){return e.dynamicChildren=en>0?st||_s:null,Xo(),en>0&&st&&st.push(e),e}function h(e,t,s,n,l,i){return lr(o(e,t,s,n,l,i,!0))}function je(e,t,s,n,l){return lr(Oe(e,t,s,n,l,!0))}function Es(e){return e?e.__v_isVNode===!0:!1}function ms(e,t){return e.type===t.type&&e.key===t.key}const ir=({key:e})=>e??null,$n=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Ee(e)||He(e)||fe(e)?{i:Ue,r:e,k:t,f:!!s}:e:null);function o(e,t=null,s=null,n=0,l=null,i=e===U?0:1,r=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ir(t),ref:t&&$n(t),scopeId:Ai,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:l,dynamicChildren:null,appContext:null,ctx:Ue};return a?(An(c,s),i&128&&e.normalize(c)):s&&(c.shapeFlag|=Ee(s)?8:16),en>0&&!r&&st&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&st.push(c),c}const Oe=$c;function $c(e,t=null,s=null,n=0,l=null,i=!1){if((!e||e===Ui)&&(e=Ve),Es(e)){const a=ls(e,t,!0);return s&&An(a,s),en>0&&!i&&st&&(a.shapeFlag&6?st[st.indexOf(e)]=a:st.push(a)),a.patchFlag=-2,a}if(Pc(e)&&(e=e.__vccOpts),t){t=wc(t);let{class:a,style:c}=t;a&&!Ee(a)&&(t.class=ae(a)),be(c)&&(Wo(c)&&!ie(c)&&(c=Le({},c)),t.style=Et(c))}const r=Ee(e)?1:or(e)?128:Bn(e)?64:be(e)?4:fe(e)?2:0;return o(e,t,s,n,l,r,i,!0)}function wc(e){return e?Wo(e)?Le({},e):Xi(e)?Le({},e[dr]||e):e:null}function ls(e,t,s=!1,n=!1){const{props:l,ref:i,patchFlag:r,children:a,transition:c}=e,d=t?Sc(l||{},t):l,g={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&ir(d),ref:t&&t.ref?s&&i?ie(i)?i.concat($n(t)):[i,$n(t)]:$n(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==U?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ls(e.ssContent),ssFallback:e.ssFallback&&ls(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&n&&ks(g,c.clone(g)),g}function V(e=" ",t=0){return Oe(Wn,null,e,t)}function N(e="",t=!1){return t?(p(),je(Ve,null,e)):Oe(Ve,null,e)}function Ct(e){return e==null||typeof e=="boolean"?Oe(Ve):ie(e)?Oe(U,null,e.slice()):Es(e)?jt(e):Oe(Wn,null,String(e))}function jt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ls(e)}function An(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(ie(t))s=16;else if(typeof t=="object")if(n&65){const l=t.default;l&&(l._c&&(l._d=!1),An(e,l()),l._c&&(l._d=!0));return}else{s=32;const l=t._;!l&&!Xi(t)?t._ctx=Ue:l===3&&Ue&&(Ue.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(fe(t)){if(n&65){An(e,{default:t});return}t={default:t,_ctx:Ue},s=32}else t=String(t),n&64?(s=16,t=[V(t)]):s=8;e.children=t,e.shapeFlag|=s}function Sc(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const l in n)if(l==="class")t.class!==n.class&&(t.class=ae([t.class,n.class]));else if(l==="style")t.style=Et([t.style,n.style]);else if(Nn(l)){const i=t[l],r=n[l];r&&i!==r&&!(ie(i)&&i.includes(r))?t[l]=i?[].concat(i,r):r:r==null&&i==null&&!Dn(l)&&(t[l]=r)}else l!==""&&(t[l]=n[l])}return t}function $t(e,t,s,n=null){ut(e,t,7,[s,n])}const Cc=qi();let rr=0;function xc(){return rr}function Mc(e,t,s){const n=e.type,l=(t?t.appContext:e.appContext)||Cc,i={uid:rr++,vnode:e,type:n,parent:t,appContext:l,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Wr(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(l.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Zi(n,l),emitsOptions:zi(n,l),emit:null,emitted:null,propsDefaults:Ce,inheritAttrs:n.inheritAttrs,ctx:Ce,data:Ce,props:Ce,attrs:Ce,slots:Ce,refs:Ce,setupState:Ce,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 i.ctx={_:i},i.root=t?t.root:i,i.emit=oc.bind(null,i),e.ce&&e.ce(i),i}let We=null;const ar=()=>We||Ue;let On,tn;{const e=Kn(),t=(s,n)=>{let l;return(l=e[s])||(l=e[s]=[]),l.push(n),i=>{l.length>1?l.forEach(r=>r(i)):l[0](i)}};On=t("__VUE_INSTANCE_SETTERS__",s=>We=s),tn=t("__VUE_SSR_SETTERS__",s=>sn=s)}const fn=e=>{const t=We;return On(e),e.scope.on(),()=>{e.scope.off(),On(t)}},wl=()=>{We&&We.scope.off(),On(null)};function cr(e){return e.vnode.shapeFlag&4}let sn=!1;function Tc(e,t=!1,s=!1){t&&tn(t);const{props:n,children:l}=e.vnode,i=cr(e);uc(e,n,i,t),hc(e,l,s||t);const r=i?Ec(e,t):void 0;return t&&tn(!1),r}function Ec(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ga);const{setup:n}=s;if(n){At();const l=e.setupContext=n.length>1?Oc(e):null,i=fn(e),r=dn(n,e,0,[e.props,l]),a=si(r);if(Ot(),i(),(a||e.sp)&&!Ms(e)&&Fi(e),a){if(r.then(wl,wl),t)return r.then(c=>{tn(!0);try{Sl(e,c,t)}finally{tn(!1)}}).catch(c=>{Vn(c,e,0,void 0,!0),e.ssrRender=(d,g)=>g("<!---->")});e.asyncDep=r}else Sl(e,r)}else ur(e)}function Sl(e,t,s){fe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:be(t)&&(e.setupState=Si(t)),ur(e)}function ur(e,t,s){const n=e.type;e.render||(e.render=n.render||Tt);{const l=fn(e);At();try{Ya(e)}finally{Ot(),l()}}}const dr=Symbol(),Ac={get(e,t){return ze(e,"get",""),t===dr?e:e[t]}};function Oc(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,Ac),slots:e.slots,emit:e.emit,expose:t}}function Jn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Si(fa(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in zs)return zs[s](e)},has(t,s){return s in t||s in zs}})):e.proxy}function Ic(e,t=!0){return fe(e)?e.displayName||e.name:e.name||t&&e.__name}function Pc(e){return fe(e)&&"__vccOpts"in e}const Q=(e,t)=>va(e,t,sn);function Lc(e,t,s){try{En(-1);const n=arguments.length;return n===2?be(t)&&!ie(t)?Es(t)?Oe(e,null,[t]):Oe(e,t):Oe(e,null,t):(n>3?s=Array.prototype.slice.call(arguments,2):n===3&&Es(s)&&(s=[s]),Oe(e,t,s))}finally{En(1)}}const Rc="3.5.45";/**
|
|
14
|
-
* @vue/runtime-dom v3.5.45
|
|
15
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
|
-
* @license MIT
|
|
17
|
-
**/let Ao;const Cl=typeof window<"u"&&window.trustedTypes;if(Cl)try{Ao=Cl.createPolicy("vue",{createHTML:e=>e})}catch{}const fr=Ao?e=>Ao.createHTML(e):e=>e,Nc="http://www.w3.org/2000/svg",Dc="http://www.w3.org/1998/Math/MathML",Ft=typeof document<"u"?document:null,xl=Ft&&Ft.createElement("template"),Fc={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const l=t==="svg"?Ft.createElementNS(Nc,e):t==="mathml"?Ft.createElementNS(Dc,e):s?Ft.createElement(e,{is:s}):Ft.createElement(e);return e==="select"&&n&&n.multiple!=null&&l.setAttribute("multiple",n.multiple),l},createText:e=>Ft.createTextNode(e),createComment:e=>Ft.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ft.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,l,i){const r=s?s.previousSibling:t.lastChild;if(l&&(l===i||l.nextSibling))for(;t.insertBefore(l.cloneNode(!0),s),!(l===i||!(l=l.nextSibling)););else{xl.innerHTML=fr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=xl.content;if(n==="svg"||n==="mathml"){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}t.insertBefore(a,s)}return[r?r.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Yt="transition",Ps="animation",nn=Symbol("_vtc"),pr={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},jc=Le({},Li,pr),Kc=e=>(e.displayName="Transition",e.props=jc,e),Uc=Kc((e,{slots:t})=>Lc(La,Vc(e),t)),ds=(e,t=[])=>{ie(e)?e.forEach(s=>s(...t)):e&&e(...t)},Ml=e=>e?ie(e)?e.some(t=>t.length>1):e.length>1:!1;function Vc(e){const t={};for(const F in e)F in pr||(t[F]=e[F]);if(e.css===!1)return t;const{name:s="v",type:n,duration:l,enterFromClass:i=`${s}-enter-from`,enterActiveClass:r=`${s}-enter-active`,enterToClass:a=`${s}-enter-to`,appearFromClass:c=i,appearActiveClass:d=r,appearToClass:g=a,leaveFromClass:m=`${s}-leave-from`,leaveActiveClass:b=`${s}-leave-active`,leaveToClass:y=`${s}-leave-to`}=e,I=Hc(l),_=I&&I[0],E=I&&I[1],{onBeforeEnter:L,onEnter:T,onEnterCancelled:A,onLeave:x,onLeaveCancelled:te,onBeforeAppear:Z=L,onAppear:j=T,onAppearCancelled:$=A}=t,w=(F,pe,$e,Pe)=>{F._enterCancelled=Pe,fs(F,pe?g:a),fs(F,pe?d:r),$e&&$e()},K=(F,pe)=>{F._isLeaving=!1,fs(F,m),fs(F,y),fs(F,b),pe&&pe()},X=F=>(pe,$e)=>{const Pe=F?j:T,xe=()=>w(pe,F,$e);ds(Pe,[pe,xe]),Tl(()=>{fs(pe,F?c:i),Dt(pe,F?g:a),Ml(Pe)||El(pe,n,_,xe)})};return Le(t,{onBeforeEnter(F){ds(L,[F]),Dt(F,i),Dt(F,r)},onBeforeAppear(F){ds(Z,[F]),Dt(F,c),Dt(F,d)},onEnter:X(!1),onAppear:X(!0),onLeave(F,pe){F._isLeaving=!0;const $e=()=>K(F,pe);Dt(F,m),F._enterCancelled?(Dt(F,b),Il(F)):(Il(F),Dt(F,b)),Tl(()=>{F._isLeaving&&(fs(F,m),Dt(F,y),Ml(x)||El(F,n,E,$e))}),ds(x,[F,$e])},onEnterCancelled(F){w(F,!1,void 0,!0),ds(A,[F])},onAppearCancelled(F){w(F,!0,void 0,!0),ds($,[F])},onLeaveCancelled(F){K(F),ds(te,[F])}})}function Hc(e){if(e==null)return null;if(be(e))return[po(e.enter),po(e.leave)];{const t=po(e);return[t,t]}}function po(e){return Fr(e)}function Dt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e[nn]||(e[nn]=new Set)).add(t)}function fs(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const s=e[nn];s&&(s.delete(t),s.size||(e[nn]=void 0))}function Tl(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Bc=0;function El(e,t,s,n){const l=e._endId=++Bc,i=()=>{l===e._endId&&n()};if(s!=null)return setTimeout(i,s);const{type:r,timeout:a,propCount:c}=qc(e,t);if(!r)return n();const d=r+"end";let g=0;const m=()=>{e.removeEventListener(d,b),i()},b=y=>{y.target===e&&++g>=c&&m()};setTimeout(()=>{g<c&&m()},a+1),e.addEventListener(d,b)}function qc(e,t){const s=window.getComputedStyle(e),n=I=>(s[I]||"").split(", "),l=n(`${Yt}Delay`),i=n(`${Yt}Duration`),r=Al(l,i),a=n(`${Ps}Delay`),c=n(`${Ps}Duration`),d=Al(a,c);let g=null,m=0,b=0;t===Yt?r>0&&(g=Yt,m=r,b=i.length):t===Ps?d>0&&(g=Ps,m=d,b=c.length):(m=Math.max(r,d),g=m>0?r>d?Yt:Ps:null,b=g?g===Yt?i.length:c.length:0);const y=g===Yt&&/\b(?:transform|all)(?:,|$)/.test(n(`${Yt}Property`).toString());return{type:g,timeout:m,propCount:b,hasTransform:y}}function Al(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((s,n)=>Ol(s)+Ol(e[n])))}function Ol(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Il(e){return(e?e.ownerDocument:document).body.offsetHeight}function zc(e,t,s){const n=e[nn];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Pl=Symbol("_vod"),Wc=Symbol("_vsh"),Jc=Symbol(""),Gc=/(?:^|;)\s*display\s*:/;function Yc(e,t,s){const n=e.style,l=Ee(s);let i=!1;if(s&&!l){if(t)if(Ee(t))for(const r of t.split(";")){const a=r.slice(0,r.indexOf(":")).trim();s[a]==null&&Fs(n,a,"")}else for(const r in t)s[r]==null&&Fs(n,r,"");for(const r in s){r==="display"&&(i=!0);const a=s[r];a!=null?Qc(e,r,!Ee(t)&&t?t[r]:void 0,a)||Fs(n,r,a):Fs(n,r,"")}}else if(l){if(t!==s){const r=n[Jc];r&&(s+=";"+r),n.cssText=s,i=Gc.test(s)}}else t&&e.removeAttribute("style");Pl in e&&((!l||t!==s)&&(e[Pl]=i?n.display:""),e[Wc]&&(n.display="none"))}const vn=/\s*!important$/;function Fs(e,t,s){if(ie(s))s.forEach(n=>Fs(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))vn.test(s)?e.setProperty(t,s.replace(vn,""),"important"):e.setProperty(t,s);else{const n=Xc(e,t);vn.test(s)?e.setProperty(is(n),s.replace(vn,""),"important"):e[n]=s}}const Ll=["Webkit","Moz","ms"],ho={};function Xc(e,t){const s=ho[t];if(s)return s;let n=Qe(t);if(n!=="filter"&&n in e)return ho[t]=n;n=jn(n);for(let l=0;l<Ll.length;l++){const i=Ll[l]+n;if(i in e)return ho[t]=i}return t}function Qc(e,t,s,n){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Ee(n)&&s===n}const Rl="http://www.w3.org/1999/xlink";function Nl(e,t,s,n,l,i=Br(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Rl,t.slice(6,t.length)):e.setAttributeNS(Rl,t,s):s==null||i&&!ii(s)?e.removeAttribute(t):e.setAttribute(t,i?"":_t(s)?String(s):s)}function Dl(e,t,s,n,l){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?fr(s):s);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,c=s==null?e.type==="checkbox"?"on":"":String(s);(a!==c||!("_value"in e))&&(e.value=c),s==null&&e.removeAttribute(t),e._value=s;return}let r=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=ii(s):s==null&&a==="string"?(s="",r=!0):a==="number"&&(s=0,r=!0)}try{e[t]=s}catch{}r&&e.removeAttribute(l||t)}function Zt(e,t,s,n){e.addEventListener(t,s,n)}function Zc(e,t,s,n){e.removeEventListener(t,s,n)}const Fl=Symbol("_vei");function eu(e,t,s,n,l=null){const i=e[Fl]||(e[Fl]={}),r=i[t];if(n&&r)r.value=n;else{const[a,c]=nu(t);if(n){const d=i[t]=iu(n,l);Zt(e,a,d,c)}else r&&(Zc(e,a,r,c),i[t]=void 0)}}const tu=/(Once|Passive|Capture)$/,su=/^on:?(?:Once|Passive|Capture)$/;function nu(e){let t,s;for(;(s=e.match(tu))&&!su.test(e);)t||(t={}),e=e.slice(0,e.length-s[1].length),t[s[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):is(e.slice(2)),t]}let go=0;const ou=Promise.resolve(),lu=()=>go||(ou.then(()=>go=0),go=Date.now());function iu(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const l=s.value;if(ie(l)){const i=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{i.call(n),n._stopped=!0};const r=l.slice(),a=[n];for(let c=0;c<r.length&&!n._stopped;c++){const d=r[c];d&&ut(d,t,5,a)}}else ut(l,t,5,[n])};return s.value=e,s.attached=lu(),s}const jl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ru=(e,t,s,n,l,i)=>{const r=l==="svg";t==="class"?zc(e,n,r):t==="style"?Yc(e,s,n):Nn(t)?Dn(t)||eu(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):au(e,t,n,r))?(Dl(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Nl(e,t,n,r,i,t!=="value")):e._isVueCE&&(cu(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ee(n)))?Dl(e,Qe(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Nl(e,t,n,r))};function au(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&jl(t)&&fe(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const l=e.tagName;if(l==="IMG"||l==="VIDEO"||l==="CANVAS"||l==="SOURCE")return!1}return jl(t)&&Ee(s)?!1:t in e}function cu(e,t){const s=e._def.props;if(!s)return!1;const n=Qe(t);return Array.isArray(s)?s.some(l=>Qe(l)===n):Object.keys(s).some(l=>Qe(l)===n)}const As=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ie(t)?s=>bn(t,s):t};function uu(e){e.target.composing=!0}function Kl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Mt=Symbol("_assign"),_n=Symbol("_initialValue");function mo(e,t,s){return t&&(e=e.trim()),s&&(e=un(e)),e}const me={created(e,{modifiers:{lazy:t,trim:s,number:n}},l){e.parentNode&&(e.type==="text"?e[_n]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[_n]=e.defaultValue.replace(/\r\n?/g,`
|
|
18
|
-
`))),e[Mt]=As(l);const i=n||l.props&&l.props.type==="number";Zt(e,t?"change":"input",r=>{r.target.composing||e[Mt](mo(e.value,s,i))}),(s||i)&&Zt(e,"change",()=>{e.value=mo(e.value,s,i)}),t||(Zt(e,"compositionstart",uu),Zt(e,"compositionend",Kl),Zt(e,"change",Kl))},mounted(e,{value:t,modifiers:{trim:s,number:n}}){const l=t??"",i=e[_n];delete e[_n],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[Mt](mo(e.value,s,n)):e.value=l},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:l,number:i}},r){if(e[Mt]=As(r),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?un(e.value):e.value,c=t??"";if(a===c)return;const d=e.getRootNode();(d instanceof Document||d instanceof ShadowRoot)&&d.activeElement===e&&e.type!=="range"&&(n&&t===s||l&&e.value.trim()===c)||(e.value=c)}},vo={deep:!0,created(e,t,s){e[Mt]=As(s),Zt(e,"change",()=>{const n=e._modelValue,l=on(e),i=e.checked,r=e[Mt];if(ie(n)){const a=Ko(n,l),c=a!==-1;if(i&&!c)r(n.concat(l));else if(!i&&c){const d=[...n];d.splice(a,1),r(d)}}else if(Bt(n)){const a=new Set(n);i?a.add(l):a.delete(l),r(a)}else r(hr(e,i))})},mounted:Ul,beforeUpdate(e,t,s){e[Mt]=As(s),Ul(e,t,s)}};function Ul(e,{value:t,oldValue:s},n){e._modelValue=t;let l;if(ie(t))l=Ko(t,n.props.value)>-1;else if(Bt(t))l=t.has(n.props.value);else{if(t===s)return;l=qt(t,hr(e,!0))}e.checked!==l&&(e.checked=l)}const js={deep:!0,created(e,{value:t,modifiers:{number:s}},n){e._modelValue=t,Zt(e,"change",()=>{const l=Array.prototype.filter.call(e.options,c=>c.selected).map(c=>s?un(on(c)):on(c)),i=e.multiple,r=i?Bt(e._modelValue)?new Set(l):l:l[0],a=e._pendingValue=[i,i?ie(r)?l.slice():l:r];try{e[Mt](r)}finally{Vt(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[Mt]=As(n)},mounted(e,{value:t,modifiers:{number:s}}){Vl(e,t,s)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[Mt]=As(s)},updated(e,{value:t,modifiers:{number:s}}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!du(t,n[1],n[0]))&&Vl(e,t,s)}};function du(e,t,s){if(!s||ie(e))return qt(e,t);if(Bt(e)){if(e.size!==t.length)return!1;for(const n of t)if(!e.has(n))return!1;return!0}return!1}function Vl(e,t,s=!1){const n=e.multiple,l=ie(t);if(!(n&&!l&&!Bt(t))){for(let i=0,r=e.options.length;i<r;i++){const a=e.options[i],c=on(a);if(n)if(l){const d=typeof c;d==="string"||d==="number"?a.selected=t.some(g=>String(g)===String(c)):a.selected=Ko(t,c)>-1}else a.selected=t.has(c)||s&&typeof c=="string"&&t.has(un(c));else if(qt(on(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function on(e){return"_value"in e?e._value:e.value}function hr(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const fu=["ctrl","shift","alt","meta"],pu={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>fu.some(s=>e[`${s}Key`]&&!t.includes(s))},Je=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((l,...i)=>{for(let r=0;r<t.length;r++){const a=pu[t[r]];if(a&&a(l,t))return}return e(l,...i)}))},hu={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},$s=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(l=>{if(!("key"in l))return;const i=is(l.key);if(t.some(r=>r===i||hu[r]===i))return e(l)}))},gu=Le({patchProp:ru},Fc);let Hl;function mu(){return Hl||(Hl=mc(gu))}const vu=((...e)=>{const t=mu().createApp(...e),{mount:s}=t;return t.mount=n=>{const l=yu(n);if(!l)return;const i=t._component;!fe(i)&&!i.render&&!i.template&&(i.template=l.innerHTML),l.nodeType===1&&(l.textContent="");const r=s(l,!1,_u(l));return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),r},t});function _u(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function yu(e){return Ee(e)?document.querySelector(e):e}const Qo="/api";function bu(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e.reasons||e.warnings||[],s=e.error||e.message||"";return s||t.length?[s,...Array.isArray(t)?t:[t]].filter(Boolean).join(" · "):JSON.stringify(e)}return""}async function Gn(e,t){let s=`${t} -> ${e.status}`,n=null;try{const i=await e.json();i&&i.detail!==void 0&&(n=i.detail,s=bu(i.detail)||s)}catch{}const l=new Error(s);return l.status=e.status,l.detail=n,l}async function de(e,t){const s=await fetch(Qo+e,t);if(!s.ok)throw await Gn(s,e);return s.json()}async function et(e,t){return de(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function ln(e){return de(e,{method:"DELETE"})}async function ku(e,t){return de(e,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function gr(e,t){return de(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function $u(e,t){const s=await fetch(Qo+e,{method:"POST",body:t});if(!s.ok)throw await Gn(s,e);return s.json()}async function In(e,t){const s=await fetch(e,t);if(!s.ok)throw await Gn(s,e);return s.json()}async function wu(e,t){const s=await fetch(e,{method:"POST",body:t});if(!s.ok)throw await Gn(s,e);return s.json()}const Su={"nav.overview":"概览","nav.activity":"活动","nav.tasks":"定时任务","nav.agents":"代理","nav.tools":"技能·连接器","nav.usage":"使用情况","nav.knowledge":"学习库","nav.review":"复习","nav.memory":"记忆中心","nav.settings":"设置","group.workspace":"工作台","group.capability":"能力","group.knowledge":"知识","group.system":"系统","common.refresh":"刷新","common.loading":"加载中…","common.offline":"后端未连接","common.offlinePanel":"后端未连接,这个面板暂时拉不到数据","common.online":"在线","common.offlineShort":"离线","common.save":"保存","common.notSet":"未设置","common.count":"{n} 条","rail.newSession":"开一个新会话","rail.newSessionBtn":"+ 新会话","rail.more":"更多","menu.title":"更多功能","menu.close":"关闭 (Esc)","rail.otherFeatures":"其它功能","rail.history":"会话历史","rail.empty":"还没有会话 · 发一条消息即开始","rail.untitled":"新会话","rail.rename":"重命名会话","rail.delete":"删除会话","rail.sessionTitle":"会话标题","rail.open":"打开{label}","rail.deleteConfirm":`删除会话「{name}」?
|
|
19
|
-
对话历史会一起删掉,不可恢复。`,"app.expandInspector":"展开检视栏","app.inspector":"检视","topbar.systemStatus":"系统状态","topbar.newVersion":"有新版本 {latest}(当前 {current}),点这里看设置","topbar.planet":"打开 HKC 知识星球","topbar.planetBtn":"🌐 知识星球","topbar.settings":"设置 (Ctrl+,)","settings.title":"设置","settings.tag":"Settings","settings.groupModel":"模型","settings.modelProvider":"模型与供应商","settings.modelProviderSub":"切换后服务端立即生效,不用重启","settings.current":"当前","settings.unconfigured":"未配置","settings.providerNote":"「未配置」= 后端缺该厂商的 Key。自定义模型的 Key / Base URL 在输入框左侧的模型胶囊里加。","settings.usage":"使用情况","settings.usageSub":"token、调用次数、余额","settings.groupChat":"对话","settings.mode":"模式","settings.modeSub":"逐字流式 / 先出计划再逐步执行","settings.stream":"流式","settings.orchestrate":"编排","settings.nickname":"称呼","settings.nicknameSub":"模型会这么叫你","settings.nicknamePh":"例如:snow","settings.nicknameNote":"存成一条偏好,每轮对话都会带上;留空保存 = 清除。","settings.shortcuts":"快捷键","settings.shortcutsSub":"输入框里的键位","settings.groupSystem":"系统","settings.backend":"后端连接","settings.probing":"探测中…","settings.ok":"正常","settings.retry":"重试","settings.reprobe":"再探一次","settings.updates":"新版本","settings.groupUi":"界面","settings.language":"语言","settings.languageSub":"切换界面文案,立即生效","settings.languageNote":"只影响界面文字,不影响模型回复的语言。","settings.updNotEnabled":"未开启","settings.updAvailable":"新版本 {v}","settings.updLatest":"已是最新","settings.updFailed":"检查失败","settings.updPending":"待检查","settings.updHintOff":"默认关闭 · 设 FOXCLAW_UPDATE_CHECK=1 开启","settings.updHintError":"检查失败(不影响使用):{msg}","settings.updHintNew":"当前 v{cur} · 最新 v{latest}","settings.updHintOk":"当前 v{cur} · 24 小时查一次","settings.buildLocal":"本地构建","settings.buildToday":"今天","settings.buildDays":"{n} 天前","settings.errSaveNick":"保存失败:{msg}","settings.errSwitch":"切换失败:{msg}","settings.saidNick":"以后称呼你为 {name}","settings.saidNickCleared":"已清除称呼","settings.saidSwitched":"模型已切到 {label}","settings.saidStream":"流式:逐字输出","settings.saidOrchestrate":"编排:先出计划再逐步执行","settings.saidLang":"界面语言已切换为{name}","chat.cmd.new":"开一个新会话","chat.cmd.stream":"切到流式对话","chat.cmd.orchestrate":"切到编排任务","chat.cmd.search":"检索记忆/知识/联网:/搜索 关键词","chat.cmd.ingest":"选文件摄入知识库","chat.cmd.settings":"打开设置面板","chat.cmd.stop":"停止当前生成","chat.cmd.clear":"只清空当前显示,不动后端","chat.cmd.help":"列出全部命令","chat.saidStream":"已切到流式对话","chat.saidOrchestrate":"已切到编排任务","chat.hintSlash":"命令","chat.hintAt":"提及技能","chat.tagArg":"带参数","chat.tagSkill":"技能","chat.tagTool":"工具","chat.unknownCmd":"未知命令:{head}","chat.ingestFailed":"失败","chat.placeholder":"告诉我你想做什么… / 命令 · @ 技能 · Enter 发送","chat.send":"发送","chat.stopGen":"停止生成","hero.title":"问我任何事","hero.cap":"主管 Agent 会按需调度子 Agent;想让它读你的知识库,直接问就行","hero.askName":"我该怎么称呼你?","hero.namePh":"例如:snow","hero.confirm":"就这么叫","hero.skip":"跳过","hero.skipTip":"以后在设置里也能填","hero.close":"关闭","hero.resume":"继续上次","hero.untitled":"未命名会话","hero.msgs":"{n} 条消息","hero.recentKnowledge":"最近知识","hero.saidNick":"记住了,以后称呼你为 {name}","hero.errSave":"保存失败:{msg}","hero.q1":"现在系统里有哪些技能可以用?","hero.q2":"帮我把今天要做的事排个优先级","hero.q3":"用一句话说清你能帮我做什么","msg.supervisor":"主管 Agent","msg.generating":"生成中","msg.reasoning":"推理过程","msg.chars":"{n} 字","msg.plan":"执行计划","msg.steps":"{n} 步","msg.confidence":"置信度 {n}%","msg.iterations":"{n} 轮迭代","msg.evidence":"执行证据","msg.items":"{n} 项","msg.tool":"工具","msg.copied":"已复制","msg.copy":"复制","msg.retry":"重试","msg.srcMemory":"记忆","msg.srcKnowledge":"知识","msg.srcWeb":"联网","msg.srcAgent":"态势","msg.srcEvidence":"证据","key.enter":"发送","key.shiftEnter":"换行","key.slash":"命令补全(如 /搜索)","key.at":"技能补全","key.arrows":"在补全列表里选","key.esc":"关闭补全 / 浮层","key.ctrlComma":"打开设置"},Cu={"nav.overview":"Overview","nav.activity":"Activity","nav.tasks":"Scheduled","nav.agents":"Agents","nav.tools":"Skills · Connectors","nav.usage":"Usage","nav.knowledge":"Library","nav.review":"Review","nav.memory":"Memory","nav.settings":"Settings","group.workspace":"Workspace","group.capability":"Capability","group.knowledge":"Knowledge","group.system":"System","common.refresh":"Refresh","common.loading":"Loading…","common.offline":"Backend offline","common.offlinePanel":"Backend offline — this panel cannot load data right now","common.online":"Online","common.offlineShort":"Offline","common.save":"Save","common.notSet":"Not set","common.count":"{n}","rail.newSession":"Start a new session","rail.newSessionBtn":"+ New session","rail.more":"More","menu.title":"More features","menu.close":"Close (Esc)","rail.otherFeatures":"Other features","rail.history":"Sessions","rail.empty":"No sessions yet · send a message to start","rail.untitled":"New session","rail.rename":"Rename session","rail.delete":"Delete session","rail.sessionTitle":"Session title","rail.open":"Open {label}","rail.deleteConfirm":`Delete session "{name}"?
|
|
20
|
-
Its conversation history will be removed permanently.`,"app.expandInspector":"Expand inspector","app.inspector":"Inspect","topbar.systemStatus":"Status","topbar.newVersion":"Version {latest} available (current {current}) — open settings","topbar.planet":"Open HKC Knowledge Planet","topbar.planetBtn":"🌐 Planet","topbar.settings":"Settings (Ctrl+,)","settings.title":"Settings","settings.tag":"Settings","settings.groupModel":"Model","settings.modelProvider":"Model & provider","settings.modelProviderSub":"Takes effect server-side immediately, no restart","settings.current":"Active","settings.unconfigured":"No key","settings.providerNote":"“No key” means the backend has no credential for that vendor. Custom model keys and base URLs go in the model capsule left of the composer.","settings.usage":"Usage","settings.usageSub":"Tokens, calls, balance","settings.groupChat":"Chat","settings.mode":"Mode","settings.modeSub":"Token-by-token streaming / plan first, then execute","settings.stream":"Stream","settings.orchestrate":"Orchestrate","settings.nickname":"Nickname","settings.nicknameSub":"How the model addresses you","settings.nicknamePh":"e.g. snow","settings.nicknameNote":"Stored as a preference and attached to every turn; save empty to clear.","settings.shortcuts":"Shortcuts","settings.shortcutsSub":"Keys inside the composer","settings.groupSystem":"System","settings.backend":"Backend","settings.probing":"probing…","settings.ok":"OK","settings.retry":"Retry","settings.updates":"Updates","settings.groupUi":"Interface","settings.language":"Language","settings.languageSub":"Switches interface copy instantly","settings.languageNote":"Interface only — it does not change the language the model replies in.","settings.updNotEnabled":"Off","settings.updAvailable":"{v} available","settings.updLatest":"Up to date","settings.updFailed":"Check failed","settings.updPending":"Pending","settings.updHintOff":"Off by default · set FOXCLAW_UPDATE_CHECK=1 to enable","settings.updHintError":"Check failed (usage unaffected): {msg}","settings.updHintNew":"Current v{cur} · latest v{latest}","settings.updHintOk":"Current v{cur} · checked every 24h","settings.buildLocal":"local build","settings.buildToday":"today","settings.buildDays":"{n} days ago","settings.errSaveNick":"Save failed: {msg}","settings.errSwitch":"Switch failed: {msg}","settings.saidNick":"I will call you {name} from now on","settings.saidNickCleared":"Nickname cleared","settings.saidSwitched":"Model switched to {label}","settings.saidStream":"Streaming: token by token","settings.saidOrchestrate":"Orchestrate: plan first, then execute step by step","settings.saidLang":"Interface language set to {name}","chat.cmd.new":"Start a new session","chat.cmd.stream":"Switch to streaming chat","chat.cmd.orchestrate":"Switch to plan-and-execute","chat.cmd.search":"Search memory / knowledge / web: /search <query>","chat.cmd.ingest":"Pick files to ingest into the library","chat.cmd.settings":"Open settings","chat.cmd.stop":"Stop the current generation","chat.cmd.clear":"Clear this view only, backend untouched","chat.cmd.help":"List all commands","chat.saidStream":"Switched to streaming chat","chat.saidOrchestrate":"Switched to plan-and-execute","chat.hintSlash":"Commands","chat.hintAt":"Mention a skill","chat.tagArg":"takes an argument","chat.tagSkill":"skill","chat.tagTool":"tool","chat.unknownCmd":"Unknown command: {head}","chat.ingestFailed":"failed","chat.placeholder":"Tell me what you need… / commands · @ skills · Enter to send","chat.send":"Send","chat.stopGen":"Stop generating","hero.title":"Ask me anything","hero.cap":"The supervisor agent dispatches sub-agents on demand; ask directly if you want it to read your library","hero.askName":"What should I call you?","hero.namePh":"e.g. snow","hero.confirm":"Call me that","hero.skip":"Skip","hero.skipTip":"You can change this later in settings","hero.close":"Close","hero.resume":"Resume","hero.untitled":"Untitled session","hero.msgs":"{n} messages","hero.recentKnowledge":"Recent knowledge","hero.saidNick":"Got it, I will call you {name}","hero.errSave":"Save failed: {msg}","hero.q1":"What skills are available right now?","hero.q2":"Help me prioritise what I need to do today","hero.q3":"Describe in one sentence what you can do for me","msg.supervisor":"Supervisor","msg.generating":"generating","msg.reasoning":"Reasoning","msg.chars":"{n} chars","msg.plan":"Plan","msg.steps":"{n} steps","msg.confidence":"Confidence {n}%","msg.iterations":"{n} iterations","msg.evidence":"Evidence","msg.items":"{n} items","msg.tool":"tool","msg.copied":"Copied","msg.copy":"Copy","msg.retry":"Retry","msg.srcMemory":"memory","msg.srcKnowledge":"knowledge","msg.srcWeb":"web","msg.srcAgent":"agent","msg.srcEvidence":"evidence","key.enter":"Send","key.shiftEnter":"New line","key.slash":"Command completion (e.g. /search)","key.at":"Skill completion","key.arrows":"Pick from the completion list","key.esc":"Close completion / overlay","key.ctrlComma":"Open settings"},Js={zh:Su,en:Cu},mr="foxclawLang",Pn=[{id:"zh",label:"中文",tag:"Chinese",htmlLang:"zh-CN",locale:"zh-CN"},{id:"en",label:"English",tag:"English",htmlLang:"en",locale:"en-US"}],Bl=(()=>{try{return localStorage.getItem(mr)}catch{return null}})(),rn=nt({locale:Js[Bl]?Bl:"zh"}),vr=()=>Pn.find(e=>e.id===rn.locale)||Pn[0],xu=()=>vr().locale;function _r(){document.documentElement.lang=vr().htmlLang}function Mu(e){if(!(!Js[e]||e===rn.locale)){rn.locale=e;try{localStorage.setItem(mr,e)}catch{}_r()}}function M(e,t){let n=(Js[rn.locale]||Js.zh)[e];if(n===void 0&&(n=Js.zh[e]),n===void 0)return e;if(t)for(const l of Object.keys(t))n=n.split(`{${l}}`).join(String(t[l]));return n}const ee=nt({sessions:[],sessionsState:"idle",sessionId:null,module:"overview",doc:null,railOpen:!0,railMode:"progress",officeStats:{waypoints:0,conflicts:0,alerts:0,active:0,total:0}}),Yn=[{id:"overview",label:"概览",tag:"Overview",group:"",groupKey:""},{id:"activity",label:"活动",tag:"Activity",group:"工作台",groupKey:"group.workspace"},{id:"tasks",label:"定时任务",tag:"Tasks",group:"工作台",groupKey:"group.workspace",icon:"clock"},{id:"agents",label:"代理",tag:"Agents",group:"工作台",groupKey:"group.workspace",icon:"bot",beta:!0},{id:"tools",label:"技能·连接器",tag:"Tools",group:"能力",groupKey:"group.capability",icon:"plug"},{id:"usage",label:"使用情况",tag:"Usage",group:"能力",groupKey:"group.capability"},{id:"knowledge",label:"学习库",tag:"Knowledge",group:"知识",groupKey:"group.knowledge",icon:"book",quick:["review","memory"]},{id:"review",label:"复习",tag:"Review",group:"知识",groupKey:"group.knowledge",icon:"review"},{id:"memory",label:"记忆中心",tag:"Memory",group:"知识",groupKey:"group.knowledge",icon:"memory"},{id:"settings",label:"设置",tag:"Settings",group:"系统",groupKey:"group.system",icon:"gear"}],yr=["knowledge","tasks","tools","agents"],br=["settings"],Tu=()=>yr.map(e=>Yn.find(t=>t.id===e)).filter(Boolean),kr=()=>Yn.filter(e=>!yr.includes(e.id)&&!br.includes(e.id)),vs=e=>Yn.some(t=>t.id===e)?M(`nav.${e}`):e,Eu=e=>e?M(e):"",Au=e=>Yn.find(t=>t.id===e)?.icon??"dot";async function Xn(){ee.sessionsState="loading";try{const e=await de("/sessions?limit=50");ee.sessions=e.sessions||[],ee.sessionsState="ok"}catch{ee.sessions=[],ee.sessionsState="error"}}function $r(e){ee.sessionId=e.id,ee.doc=null,ee.railMode="progress"}async function Ou(){const[e,t]=await Promise.all([de("/orchestration/situation").catch(()=>null),de("/processes?limit=5").catch(()=>null)]);ee.officeStats={waypoints:e?.itinerary?.waypoints??0,conflicts:e?.itinerary?.conflicts??0,alerts:(e?.alerts||[]).length,active:t?.stats?.active??0,total:t?.stats?.total??0}}function zt(e){ee.module=e,ee.doc=null}function Qn(e){ee.doc=e,ee.railMode="context",ee.railOpen=!0}function Oo(){ee.doc=null,ee.railMode="progress"}const mt=nt({version:"",update:null,loaded:!1});let Ls=null;function Io(e=!1){return mt.loaded&&!e?Promise.resolve(mt):Ls||(Ls=de("/system/info").then(t=>(mt.version=t.version||"",mt.update=t.update||null,mt.loaded=!0,mt)).catch(()=>mt).finally(()=>{Ls=null}),Ls)}const Ne=(e,t)=>{const s=e.__vccOpts||e;for(const[n,l]of t)s[n]=l;return s},Iu={class:"topbar"},Pu={class:"brand"},Lu={key:0,class:"ver"},Ru=["title"],Nu={class:"stat"},Du={class:"lbl"},Fu=["title"],ju=["title"],Ku={__name:"TopBar",setup(e){const t=G("···"),s=G("dim"),n=Q(()=>mt.version),l=Q(()=>mt.update?.update_available?mt.update:null),i=Q(()=>t.value==="online"?M("common.online"):t.value==="offline"?M("common.offlineShort"):"···");Re(async()=>{Io();try{await de("/status"),t.value="online",s.value="ok"}catch{t.value="offline",s.value="bad"}});function r(){window.open("/planet/","_blank","noopener")}function a(){zt(ee.module==="settings"?"overview":"settings")}return(c,d)=>(p(),h("header",Iu,[o("div",Pu,[d[0]||(d[0]=o("div",{class:"logo"},"F",-1)),d[1]||(d[1]=o("h1",null,"Foxclaw",-1)),n.value?(p(),h("span",Lu,"v"+u(n.value),1)):N("",!0),l.value?(p(),h("button",{key:1,class:"upd",title:f(M)("topbar.newVersion",{latest:l.value.latest,current:l.value.current}),onClick:a},"↑",8,Ru)):N("",!0)]),d[2]||(d[2]=o("div",{class:"spacer"},null,-1)),o("div",Nu,[o("span",Du,u(f(M)("topbar.systemStatus")),1),o("span",{class:ae(["val",s.value])},u(i.value),3)]),o("button",{class:"tbtn",title:f(M)("topbar.planet"),onClick:r},u(f(M)("topbar.planetBtn")),9,Fu),o("button",{class:ae(["tbtn",{on:f(ee).module==="settings"}]),title:f(M)("topbar.settings"),onClick:a},"⚙",10,ju)]))}},Uu=Ne(Ku,[["__scopeId","data-v-c3cf2a1d"]]),Vu={class:"pop-head"},Hu=["title"],Bu={class:"pop-body"},qu={key:0,class:"pop-sec"},zu=["onClick"],Wu={class:"lbl"},Ju={class:"tag"},Gu={__name:"MenuPopover",props:{anchor:{type:Object,default:null},active:{type:String,default:"overview"}},emits:["pick","close"],setup(e,{emit:t}){const s=e,n=t,l=Q(()=>{const d=[];let g=null;for(const m of kr()){if(!m.groupKey){d.push({titleKey:"",items:[m]});continue}(!g||g.titleKey!==m.groupKey)&&(g={titleKey:m.groupKey,items:[]},d.push(g)),g.items.push(m)}return d}),i=Q(()=>{const d=s.anchor;if(!d)return{left:"16px",top:"120px"};const g=(d.bottom??0)+6;return{left:`${d.left}px`,top:`${g}px`}});function r(d){d.target.closest(".nav-pop")||d.target.closest(".rail-anchor")||n("close")}function a(d){d.key==="Escape"&&n("close")}function c(){n("close")}return Re(()=>{document.addEventListener("mousedown",r,!0),document.addEventListener("keydown",a),window.addEventListener("resize",c)}),ws(()=>{document.removeEventListener("mousedown",r,!0),document.removeEventListener("keydown",a),window.removeEventListener("resize",c)}),(d,g)=>(p(),je(Oa,{to:"body"},[o("div",{class:"nav-pop",style:Et(i.value)},[o("div",Vu,[V(u(f(M)("menu.title"))+" ",1),o("span",{class:"x",title:f(M)("menu.close"),onClick:g[0]||(g[0]=m=>d.$emit("close"))},"✕",8,Hu)]),o("div",Bu,[(p(!0),h(U,null,se(l.value,(m,b)=>(p(),h(U,{key:b},[m.titleKey?(p(),h("div",qu,u(f(Eu)(m.titleKey)),1)):N("",!0),(p(!0),h(U,null,se(m.items,y=>(p(),h("button",{key:y.id,class:ae(["pop-item",{on:y.id===e.active}]),onClick:I=>d.$emit("pick",y.id)},[o("span",Wu,u(f(vs)(y.id)),1),o("span",Ju,u(y.tag),1)],10,zu))),128))],64))),128))])],4)]))}},Yu=Ne(Gu,[["__scopeId","data-v-28d78e1a"]]),wr="sfx.chat.mode",Zn="sfx.sessionId",ql=20,B=nt({mode:localStorage.getItem(wr)||"stream",attachments:[],images:[],ingest:null,toast:"",messages:[],sessionId:null,streamState:"idle"});let zl=0;function ue(e,t=2800){B.toast=String(e),clearTimeout(zl),zl=setTimeout(()=>B.toast="",t)}function Ln(e){B.mode=e,localStorage.setItem(wr,e)}async function Xu(e){if(!e)return;if(e.size>ql*1048576)return ue(`${e.name} 超过 ${ql}MB`);const t=new FormData;t.append("file",e);try{const s=await $u("/upload",t);B.attachments.push({...s,kind:"file"}),ue(`已附加 ${s.name}${s.text?"":"(二进制,仅元数据)"}`)}catch(s){ue(`上传失败:${s.message}`)}}function Qu(e){if(!e)return;if(!e.type.startsWith("image/"))return ue("不是图片文件");const t=new FileReader;t.onload=()=>B.images.push({name:e.name,url:String(t.result)}),t.onerror=()=>ue(`读取失败:${e.name}`),t.readAsDataURL(e)}function Zu(e){B.attachments.splice(e,1)}function ed(e){B.images.splice(e,1)}async function Sr(e,t=""){if(!e)return;if(B.ingest)return ue("等当前文件摄入完成再传下一个");B.ingest={name:e.name,pct:0,status:"queued",ku:0};const s=new FormData;s.append("file",e),t&&s.append("collection",t);let n;try{n=(await wu("/knowledge/ingest/file/async",s)).job_id}catch(l){return B.ingest={...B.ingest,status:"error",msg:l.message},ue(`摄入失败:${l.message}`)}sd(n)}async function td(e){const t=[...e].filter(Boolean);for(const s of t){for(await Sr(s);B.ingest&&B.ingest.status!=="error"&&B.ingest.status!=="done";)await new Promise(n=>setTimeout(n,600));B.ingest=null}t.length&&ue(`文件夹摄入完成 · ${t.length} 个文件`)}async function sd(e){const t=Date.now()+6e5;for(;Date.now()<t;){await new Promise(s=>setTimeout(s,900));try{const s=await In(`/knowledge/ingest/jobs/${e}`),n=s.total?Math.round(s.processed/s.total*100):s.status==="done"?100:0;if(B.ingest={name:s.filename,pct:n,status:s.status,ku:s.ku_count,msg:s.error},s.status==="done")return ue(`${s.filename} 摄入完成 · ${s.ku_count} 条`);if(s.status==="error")return ue(`${s.filename} 摄入失败:${s.error||"未知"}`)}catch(s){return B.ingest=null,ue(`进度查询失败:${s.message}`)}}B.ingest=null,ue("摄入超时,后台可能仍在跑")}const nd={perceive:"感知",recall:"召回",meta_check:"自检",schedule:"排程",route:"路由",plan:"规划",dispatch:"分发",act:"执行",aggregate:"汇总",verify:"核验",reflect:"反思"};function od(e){return{role:e.role,content:e.content||"",ts:(e.ts||0)*1e3,attachments:e.attachments||[],thinking:"",evidence:[],error:"",streaming:!1}}function Zo(e){B.sessionId=e,ee.sessionId=e,localStorage.setItem(Zn,e)}async function ld(){const e=localStorage.getItem(Zn);e&&await eo(e,{quiet:!0})}async function eo(e,{quiet:t=!1}={}){if(e){xr();try{const s=await de(`/sessions/${encodeURIComponent(e)}`);Zo(e),B.messages=(s.messages||[]).map(od),B.streamState="idle"}catch(s){B.sessionId===e&&(B.sessionId=null,localStorage.removeItem(Zn)),t||ue(`会话加载失败:${s.message}`)}}}const Cr=nt({ingestTick:0});function id(){Cr.ingestTick+=1}function rd(e){B.messages.push({role:"assistant",content:e,ts:Date.now(),thinking:"",evidence:[],error:"",notice:"",streaming:!1})}async function ad(e){const t=String(e||"").trim();if(!t)return ue("用法:/搜索 关键词");if(B.streamState==="streaming")return ue("正在生成,先点停止");B.messages.push({role:"user",content:`/搜索 ${t}`,ts:Date.now(),attachments:[],thinking:"",streaming:!1}),B.messages.push({role:"assistant",content:"检索中…",ts:Date.now(),search:null,thinking:"",evidence:[],error:"",notice:"",streaming:!1,stage:"检索"});const s=B.messages[B.messages.length-1];try{const n=await et("/search/query",{query:t,agent_id:"supervisor",internal_only:!0}),l=n.graph&&n.graph.nodes||[];s.search={route:n.route||"HSR",confidence:n.confidence||0,iterations:n.iterations||0,nodes:l.slice(0,6).map(i=>({fact:i.fact,source:i.source,origin:i.origin,confidence:i.confidence}))},s.content=l.length?`命中 ${l.length} 条证据 · 整体置信度 ${Math.round((n.confidence||0)*100)}%`:"没有检索到相关证据"}catch(n){s.content="",s.error=`检索失败:${n.message}`}finally{s.stage=""}}async function to(){xr();try{const e=await et("/sessions",{});return Zo(e.id),B.messages=[],B.streamState="idle",await Xn(),e.id}catch(e){return ue(`新建会话失败:${e.message}`),null}}async function cd(e,t){const s=String(t||"").trim().slice(0,60);if(!(!e||!s))try{await et(`/sessions/${encodeURIComponent(e)}/rename`,{title:s});const n=ee.sessions.find(l=>l.id===e);n&&(n.title=s)}catch(n){ue(`重命名失败:${n.message}`)}}async function ud(e){if(!e)return;try{await ln(`/sessions/${encodeURIComponent(e)}`)}catch(s){return ue(`删除失败:${s.message}`)}if(ee.sessions=ee.sessions.filter(s=>s.id!==e),B.sessionId!==e)return;const t=ee.sessions[0];t?await eo(t.id):await to()}async function dd(e){if(B.streamState==="streaming")return ue("正在生成,先点停止");const t=B.messages.indexOf(e);if(t<0)return;let s=-1;for(let i=t;i>=0;i-=1)if(B.messages[i].role==="user"){s=i;break}if(s<0)return ue("找不到对应的提问,无法重试");const n=B.messages[s],l=n.content;B.messages.splice(s),B.attachments=(n.attachments||[]).map(i=>({...i,kind:"file"})),B.images=(n.images||[]).map(i=>({...i})),await el(l)}async function fd(){if(B.sessionId)return B.sessionId;const e=localStorage.getItem(Zn);if(e)try{return await de(`/sessions/${e}`),Zo(e),e}catch{}return to()}let ss=null,Ks=0;function xr(){if(Ks+=1,ss){try{ss.abort()}catch{}ss=null}for(const e of B.messages)e.streaming&&(e.streaming=!1);B.streamState="idle"}function Wl(){ss&&ss.abort()}function pd(e){const t=/^data:([^;]+);base64,(.*)$/.exec(e||"");return t?{media_type:t[1],data:t[2]}:null}async function el(e){const t=String(e??"").trim();if(B.streamState==="streaming")return ue("正在生成,先点停止");if(!t&&!B.attachments.length&&!B.images.length)return;const s=await fd();if(!s)return;const n=B.images.map(m=>pd(m.url)).filter(Boolean),l=B.attachments.map(m=>({name:m.name,size:m.size,mime:m.mime,url:m.url,text:m.text||""})),i=B.messages.filter(m=>m.content&&m.role&&!m.error).slice(-12).map(m=>({role:m.role,content:m.content}));B.messages.push({role:"user",content:t,ts:Date.now(),attachments:l,streaming:!1,thinking:"",images:B.images.map(m=>({...m}))}),B.messages.push({role:"assistant",content:"",thinking:"",evidence:[],error:"",notice:"",ts:Date.now(),streaming:!0,stage:"",plan:null});const r=B.messages[B.messages.length-1];B.attachments=[],B.images=[],B.streamState="streaming";const a=B.mode==="orchestrate",c=a?"/task/stream":"/chat/stream",d=a?{task:t,agent_id:"supervisor",session_id:s,context:{}}:{task:t,agent_id:"supervisor",history:i,session_id:s,images:n,attachments:l},g=++Ks;ss=new AbortController;try{const m=await fetch(Qo+c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(d),signal:ss.signal});if(!m.ok)throw new Error(`${c} -> ${m.status}`);if(await md(m,(b,y)=>hd(r,b,y)),g!==Ks)return;r.streaming=!1,B.streamState="done"}catch(m){if(g!==Ks)return;r.streaming=!1,m&&m.name==="AbortError"?(B.streamState="done",r.content||(r.error="已停止")):(r.error=m&&m.message||"请求失败",B.streamState="error")}finally{g===Ks&&(ss=null,Xn())}}function hd(e,t,s){if(t==="thinking"||s.thinking){e.thinking+=s.thinking||"";return}if(t==="evidence"||s.evidence){e.evidence=s.evidence||[];return}if(s.delta){e.content+=s.delta;return}if(s.stage){e.stage=nd[s.stage]||s.stage;return}if(s.plan){e.plan=s.plan;return}if(s.result){gd(e,s.result);return}if(s.error){e.error=s.error;return}s.done&&(e.streaming=!1)}function gd(e,t){if(!t||typeof t!="object")return;if(t.interrupted)return void(e.error="管线已中断");if(t.error==="harness_blocked")return void(e.error="被 harness 策略拦截");t.status==="needs_confirmation"&&(e.notice="需要确认后才继续");const s=t.res??t.result??t.answer;s&&!e.content&&(e.content=typeof s=="string"?s:JSON.stringify(s,null,2))}async function md(e,t){if(!e.body)throw new Error("响应无流式主体");const s=e.body.getReader(),n=new TextDecoder;let l="";for(;;){const{value:i,done:r}=await s.read();if(r)break;l+=n.decode(i,{stream:!0});let a;for(;(a=l.indexOf(`
|
|
21
|
-
|
|
22
|
-
`))>=0;){const c=l.slice(0,a);if(l=l.slice(a+2),!c.trim())continue;const d=(c.match(/^event:\s*(\S+)/m)||[])[1]||"message",g=((c.match(/^data:\s*([\s\S]*)$/m)||[])[1]||"").trim();if(!g)continue;let m;try{m=JSON.parse(g)}catch{continue}t(d,m)}}}const vd={class:"col col--left rail-left"},_d=["title"],yd={class:"rail-nav"},bd=["onClick"],kd={class:"ic"},$d={viewBox:"0 0 24 24"},wd=["d"],Sd={key:0,class:"beta"},Cd={key:0,class:"rail-acts"},xd=["title","aria-label","onClick"],Md={viewBox:"0 0 24 24"},Td=["d"],Ed=["aria-expanded","title"],Ad={class:"ic"},Od={viewBox:"0 0 24 24"},Id=["d"],Pd={key:0,class:"cur"},Ld={class:"sec-head"},Rd={class:"ns-list scroll"},Nd={key:0,class:"empty"},Dd={key:1,class:"empty"},Fd={key:2,class:"empty"},jd=["aria-label","onKeydown","onBlur"],Kd=["title","onClick"],Ud={class:"ns-acts"},Vd=["title","onClick"],Hd=["title","onClick"],Bd={class:"rail-foot"},qd=["title","onClick"],zd={class:"ic"},Wd={viewBox:"0 0 24 24"},Jd=["d"],Gd={__name:"LeftRail",setup(e){const t=G(null),s=G(!1),n=G(null),l=Q(()=>ee.sessions.length),i=Tu(),r=br.map(w=>({id:w,icon:Au(w)})),a=Q(()=>kr().some(w=>w.id===ee.module)),c=Q(()=>a.value&&ee.module!=="overview"?vs(ee.module):""),d={book:["M5 5.6A2.1 2.1 0 0 1 7.1 3.5H19v17H7.1A2.1 2.1 0 0 1 5 18.4z","M5 18.4a2.1 2.1 0 0 1 2.1-2.1H19","M9 8h6","M9 11.2h4"],clock:["M12 3.2a8.8 8.8 0 1 0 0 17.6 8.8 8.8 0 0 0 0-17.6z","M12 7.4V12l3.3 1.9"],plug:["M9 3v4.2","M15 3v4.2","M6.8 7.2h10.4v4.6a5.2 5.2 0 0 1-10.4 0z","M12 17v4"],bot:["M4.8 8.2h14.4A1.8 1.8 0 0 1 21 10v6.6a1.8 1.8 0 0 1-1.8 1.8H4.8A1.8 1.8 0 0 1 3 16.6V10a1.8 1.8 0 0 1 1.8-1.8z","M12 4.4v3.8","M8.6 12.8h.01","M15.4 12.8h.01"],more:["M6 12h.01","M12 12h.01","M18 12h.01"],review:["M20.4 12a8.4 8.4 0 0 1-14.3 5.9","M3.6 12a8.4 8.4 0 0 1 14.3-5.9","M17.9 2.6v3.6h-3.6","M6.1 21.4v-3.6h3.6"],memory:["M7.2 3.4h9.6v17.2L12 17.2l-4.8 3.4z"],gear:["M12 15.2a3.2 3.2 0 1 0 0-6.4 3.2 3.2 0 0 0 0 6.4z","M12 3.1v1.9","M12 19v1.9","M3.1 12h1.9","M19 12h1.9","M5.7 5.7l1.4 1.4","M16.9 16.9l1.4 1.4","M18.3 5.7l-1.4 1.4","M7.1 16.9l-1.4 1.4"],dot:["M12 10.6a1.4 1.4 0 1 0 0 2.8 1.4 1.4 0 0 0 0-2.8z"]},g=w=>d[w]||d.dot,m=w=>(w.quick||[]).map(K=>({id:K,label:vs(K),icon:K}));Re(Xn);function b(){if(s.value){s.value=!1;return}const w=t.value?.getBoundingClientRect();w&&(n.value={left:w.left,bottom:w.bottom}),s.value=!0}function y(w){zt(w),s.value=!1}function I(w){$r(w),eo(w.id)}const _=G(""),E=G("");let L=null;function T(w){_.value=w.id,E.value=w.title||"",Vt(()=>{L?.focus(),L?.select()})}function A(){_.value=""}async function x(w){if(_.value!==w.id)return;_.value="";const K=E.value.trim();!K||K===(w.title||"")||await cd(w.id,K)}async function te(w){const K=w.title||M("rail.untitled");confirm(M("rail.deleteConfirm",{name:K}))&&await ud(w.id)}async function Z(){await to(),zt("overview")}function j(w){return w?new Date(w*1e3).toLocaleString(xu(),{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}):""}function $(w){return[j(w.updated_at),w.message_count?M("common.count",{n:w.message_count}):""].filter(Boolean).join(" · ")}return(w,K)=>(p(),h("aside",vd,[o("button",{class:"new-sess",title:f(M)("rail.newSession"),onClick:Z},u(f(M)("rail.newSessionBtn")),9,_d),o("nav",yd,[(p(!0),h(U,null,se(f(i),X=>(p(),h("div",{key:X.id,class:ae(["rail-row",{on:f(ee).module===X.id,sub:(X.quick||[]).includes(f(ee).module)}])},[o("button",{class:"rail-item",onClick:F=>y(X.id)},[o("span",kd,[(p(),h("svg",$d,[(p(!0),h(U,null,se(g(X.icon),(F,pe)=>(p(),h("path",{key:pe,d:F},null,8,wd))),128))]))]),o("b",null,u(f(vs)(X.id)),1),X.beta?(p(),h("span",Sd,"BETA")):N("",!0)],8,bd),X.quick?(p(),h("span",Cd,[(p(!0),h(U,null,se(m(X),F=>(p(),h("button",{key:F.id,class:"act",title:f(M)("rail.open",{label:F.label}),"aria-label":F.label,onClick:Je(pe=>y(F.id),["stop"])},[(p(),h("svg",Md,[(p(!0),h(U,null,se(g(F.icon),(pe,$e)=>(p(),h("path",{key:$e,d:pe},null,8,Td))),128))]))],8,xd))),128))])):N("",!0)],2))),128)),o("div",{class:ae(["rail-row",{on:a.value}])},[o("button",{ref_key:"btnRef",ref:t,class:"rail-item rail-anchor","aria-expanded":s.value,title:f(M)("rail.otherFeatures"),onClick:b},[o("span",Ad,[(p(),h("svg",Od,[(p(!0),h(U,null,se(g("more"),(X,F)=>(p(),h("path",{key:F,d:X},null,8,Id))),128))]))]),o("b",null,u(f(M)("rail.more")),1),c.value?(p(),h("span",Pd,u(c.value),1)):N("",!0),o("span",{class:ae(["caret",{open:s.value}])},"▾",2)],8,Ed)],2)]),o("div",Ld,[V(u(f(M)("rail.history"))+" ",1),o("em",null,u(l.value),1)]),o("div",Rd,[f(ee).sessionsState==="loading"?(p(),h("div",Nd,u(f(M)("common.loading")),1)):f(ee).sessionsState==="error"?(p(),h("div",Dd,u(f(M)("common.offline")),1)):l.value?(p(!0),h(U,{key:3},se(f(ee).sessions,X=>(p(),h("div",{key:X.id,class:ae(["ns-row",{on:X.id===f(ee).sessionId}])},[_.value===X.id?he((p(),h("input",{key:0,ref_for:!0,ref:F=>He(L)?L.value=F:L=F,"onUpdate:modelValue":K[0]||(K[0]=F=>E.value=F),class:"ns-edit",maxlength:"60","aria-label":f(M)("rail.sessionTitle"),onKeydown:[$s(Je(F=>x(X),["prevent"]),["enter"]),$s(Je(A,["prevent"]),["esc"])],onBlur:F=>x(X)},null,40,jd)),[[me,E.value]]):(p(),h(U,{key:1},[o("button",{class:"ns-item",title:X.title||f(M)("rail.untitled"),onClick:F=>I(X)},[o("b",null,u(X.title||f(M)("rail.untitled")),1),o("span",null,u($(X)),1)],8,Kd),o("span",Ud,[o("button",{class:"act",title:f(M)("rail.rename"),onClick:Je(F=>T(X),["stop"])},[...K[2]||(K[2]=[o("svg",{viewBox:"0 0 24 24"},[o("path",{d:"M4.4 19.6h4l10.8-10.8-4-4L4.4 15.6z"}),o("path",{d:"M14.4 5.6l3.8 3.8"})],-1)])],8,Vd),o("button",{class:"act del",title:f(M)("rail.delete"),onClick:Je(F=>te(X),["stop"])},[...K[3]||(K[3]=[o("svg",{viewBox:"0 0 24 24"},[o("path",{d:"M5 7h14"}),o("path",{d:"M9.6 7V4.6h4.8V7"}),o("path",{d:"M6.8 7l.8 12.4h8.8L17.2 7"})],-1)])],8,Hd)])],64))],2))),128)):(p(),h("div",Fd,u(f(M)("rail.empty")),1))]),o("div",Bd,[(p(!0),h(U,null,se(f(r),X=>(p(),h("div",{key:X.id,class:ae(["rail-row",{on:f(ee).module===X.id}])},[o("button",{class:"rail-item",title:f(vs)(X.id),onClick:F=>y(X.id)},[o("span",zd,[(p(),h("svg",Wd,[(p(!0),h(U,null,se(g(X.icon),(F,pe)=>(p(),h("path",{key:pe,d:F},null,8,Jd))),128))]))]),o("b",null,u(f(vs)(X.id)),1)],8,qd)],2))),128))]),s.value?(p(),je(Yu,{key:0,anchor:n.value,active:f(ee).module,onPick:y,onClose:K[1]||(K[1]=X=>s.value=!1)},null,8,["anchor","active"])):N("",!0)]))}},Yd=Ne(Gd,[["__scopeId","data-v-310e54b3"]]),Po=e=>String(e??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),Jl=/^\s*(`{3,}|~{3,})\s*([\w+#.-]*)\s*$/,Xd=/^(#{1,6})\s+(.*)$/,Qd=/^\s*([-*_])\1{2,}\s*$/,Zd=/^\s*(?:[-*+]|\d+[.)])\s+(.*)$/,ef=/^\s*\d+[.)]\s+/,tf=/^>\s?(.*)$/,Gl=/^\s*\|.*\|\s*$/,sf=/^\s*\|?\s*:?-{1,}:?\s*(\|\s*:?-{1,}:?\s*)*\|?\s*$/;function xs(e){const t=[];let s=Po(e).replace(/`([^`]+)`/g,(n,l)=>(t.push(l),`\0${t.length-1}\0`));return s=s.replace(/\*\*([^*\n]+)\*\*/g,"<strong>$1</strong>").replace(/(^|[^\w*])\*([^*\n]+)\*(?!\*)/g,"$1<em>$2</em>").replace(/~~([^~\n]+)~~/g,"<del>$1</del>").replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g,(n,l,i)=>/^https?:\/\//i.test(i)?`<a href="${i}" target="_blank" rel="noreferrer">${l}</a>`:n),s.replace(/\u0000(\d+)\u0000/g,(n,l)=>`<code>${t[Number(l)]}</code>`)}function nf(e,t,s){const n=s?"md-code md-open":"md-code",l=e?` data-lang="${Po(e)}"`:"";return`<pre class="${n}"${l}><code>${Po(t)}</code></pre>`}function Yl(e){return e.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(t=>t.trim())}function of(e){if(!e.length)return"";const t=e[0],s=e.slice(1),n=t.map(i=>`<th>${xs(i)}</th>`).join(""),l=s.map(i=>`<tr>${i.map(r=>`<td>${xs(r)}</td>`).join("")}</tr>`).join("");return`<table><thead><tr>${n}</tr></thead>${s.length?`<tbody>${l}</tbody>`:""}</table>`}function Mr(e){const t=String(e??"").replace(/\r\n?/g,`
|
|
23
|
-
`).replace(/\n$/,"");if(!t.trim())return"";const s=t.split(`
|
|
24
|
-
`),n=[];let l=[],i=null,r=[];const a=()=>{l.length&&(n.push(`<p>${l.map(xs).join("<br>")}</p>`),l=[])},c=()=>{i&&(n.push(`<${i.tag}>${i.items.map(b=>`<li>${b}</li>`).join("")}</${i.tag}>`),i=null)},d=()=>{r.length&&(n.push(`<blockquote>${r.map(xs).join("<br>")}</blockquote>`),r=[])},g=()=>{a(),c(),d()};let m=0;for(;m<s.length;){const b=s[m].replace(/\s+$/,"");if(!b.trim()){g(),m+=1;continue}const y=Jl.exec(b);if(y){g();const L=y[1][0],T=y[2]||"",A=[];let x=!1,te=m+1;for(;te<s.length;te+=1){const Z=s[te],j=Jl.exec(Z);if(j&&j[1][0]===L){x=!0;break}A.push(Z)}n.push(nf(T,A.join(`
|
|
25
|
-
`),!x)),m=x?te+1:te;continue}if(Gl.test(b)&&m+1<s.length&&sf.test(s[m+1])&&s[m+1].includes("-")){g();const L=[Yl(b)];let T=m+2;for(;T<s.length&&Gl.test(s[T]);)L.push(Yl(s[T])),T+=1;n.push(of(L)),m=T;continue}const I=Xd.exec(b);if(I){g();const L=Math.min(I[1].length+1,5);n.push(`<h${L}>${xs(I[2])}</h${L}>`),m+=1;continue}if(Qd.test(b)){g(),n.push("<hr />"),m+=1;continue}const _=Zd.exec(b);if(_){a(),d();const L=ef.test(b)?"ol":"ul";(!i||i.tag!==L)&&(c(),i={tag:L,items:[]}),i.items.push(xs(_[1])),m+=1;continue}const E=tf.exec(b);if(E){a(),c(),r.push(E[1]),m+=1;continue}c(),d(),l.push(b.trim()),m+=1}return g(),n.join("")}const lf={key:0,class:"cli"},rf={class:"term-bar"},af={class:"path"},cf={class:"lang"},uf={class:"term-body scroll"},df={class:"no"},ff={class:"code"},pf={key:1,class:"read scroll"},hf={class:"read-head"},gf={class:"read-meta"},mf={key:0},vf={key:1},_f=["innerHTML"],yf={__name:"DocViewer",props:{doc:{type:Object,required:!0}},setup(e){const t=e,s=Q(()=>(t.doc.content||"").replace(/\n$/,"").split(`
|
|
26
|
-
`)),n=Q(()=>Mr(t.doc.content));return(l,i)=>e.doc.kind==="code"?(p(),h("div",lf,[o("div",rf,[i[0]||(i[0]=o("span",{class:"tl"},null,-1)),i[1]||(i[1]=o("span",{class:"tl"},null,-1)),i[2]||(i[2]=o("span",{class:"tl"},null,-1)),o("code",af,u(e.doc.path),1),o("span",cf,u(e.doc.lang),1)]),o("div",uf,[(p(!0),h(U,null,se(s.value,(r,a)=>(p(),h("div",{key:a,class:"row"},[o("span",df,u(a+1),1),o("span",ff,u(r||" "),1)]))),128))])])):(p(),h("article",pf,[o("header",hf,[o("h2",null,u(e.doc.title),1),o("div",gf,[e.doc.meta?(p(),h("span",mf,u(e.doc.meta),1)):N("",!0),e.doc.path?(p(),h("code",vf,u(e.doc.path),1)):N("",!0)])]),o("div",{class:"read-body md",innerHTML:n.value},null,8,_f)]))}},bf=Ne(yf,[["__scopeId","data-v-045bb22d"]]),kf={class:"ms-in"},$f={key:0,class:"u-body"},wf={key:0,class:"u-atts"},Sf={class:"u-text"},Cf={class:"u-time"},xf={key:1,class:"a-body"},Mf={class:"a-head"},Tf={class:"who"},Ef={key:0,class:"stage"},Af={key:1,class:"live-tag"},Of={class:"a-time"},If={key:0,class:"fold think"},Pf={class:"fold-body"},Lf={key:1,class:"fold plan",open:""},Rf={class:"fold-body"},Nf={key:2,class:"sres"},Df={class:"sres-h"},Ff={class:"sroute"},jf=["innerHTML"],Kf={key:4,class:"a-text waiting"},Uf={key:5,class:"notice"},Vf={key:6,class:"err"},Hf={key:7,class:"fold ev"},Bf={class:"fold-body"},qf={class:"ev-st"},zf=["href"],Wf={key:1,class:"ev-file"},Jf={key:8,class:"a-acts"},Gf=["onClick"],Yf=["onClick"],Xf={__name:"MessageStream",setup(e){const t=G(null);let s=!0;function n(){const y=t.value;y&&(s=y.scrollHeight-y.scrollTop-y.clientHeight<80)}bs(()=>B.messages.map(y=>`${(y.content||"").length}:${(y.thinking||"").length}:${y.streaming?1:0}`).join("|"),async()=>{if(!s)return;await Vt();const y=t.value;y&&(y.scrollTop=y.scrollHeight)});function l(y){return y?new Date(y).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",hour12:!1}):""}function i(y){return/^https?:\/\//i.test(y&&y.ref||"")}function r(y){return typeof y=="string"?y:y.desc||y.task||y.label||JSON.stringify(y)}const a={memory:"msg.srcMemory",knowledge:"msg.srcKnowledge",web:"msg.srcWeb",agent:"msg.srcAgent"};function c(y){return(y&&a[y]?M(a[y]):y)||M("msg.srcEvidence")}const d=G(-1);let g=0;async function m(y,I){const _=y.content||"";try{await navigator.clipboard.writeText(_)}catch{const E=document.createElement("textarea");E.value=_,E.style.position="fixed",E.style.opacity="0",document.body.appendChild(E),E.select();try{document.execCommand("copy")}catch{}E.remove()}d.value=I,clearTimeout(g),g=setTimeout(()=>d.value=-1,1600)}function b(y){return y===B.messages.length-1}return(y,I)=>(p(),h("div",{ref_key:"box",ref:t,class:"ms scroll",onScroll:n},[o("div",kf,[(p(!0),h(U,null,se(f(B).messages,(_,E)=>(p(),h("article",{key:E,class:ae(["msg",_.role])},[_.role==="user"?(p(),h("div",$f,[_.attachments&&_.attachments.length?(p(),h("div",wf,[(p(!0),h(U,null,se(_.attachments,(L,T)=>(p(),h("span",{key:T,class:"u-att"},u(L.name),1))),128))])):N("",!0),o("p",Sf,u(_.content),1),o("div",Cf,u(l(_.ts)),1)])):(p(),h("div",xf,[o("div",Mf,[o("span",{class:ae(["avatar",{live:_.streaming}])},null,2),o("span",Tf,u(f(M)("msg.supervisor")),1),_.stage?(p(),h("span",Ef,"◌ "+u(_.stage),1)):N("",!0),_.streaming?(p(),h("span",Af,u(f(M)("msg.generating")),1)):N("",!0),o("span",Of,u(l(_.ts)),1)]),_.thinking?(p(),h("details",If,[o("summary",null,[V(u(f(M)("msg.reasoning"))+" ",1),o("em",null,u(f(M)("msg.chars",{n:_.thinking.length})),1)]),o("pre",Pf,u(_.thinking),1)])):N("",!0),_.plan&&(_.plan.steps||[]).length?(p(),h("details",Lf,[o("summary",null,[V(u(f(M)("msg.plan"))+" ",1),o("em",null,u(f(M)("msg.steps",{n:_.plan.steps.length}))+" · "+u(_.plan.flow||"single"),1)]),o("ol",Rf,[(p(!0),h(U,null,se(_.plan.steps,(L,T)=>(p(),h("li",{key:T},u(r(L)),1))),128))])])):N("",!0),_.search?(p(),h("div",Nf,[o("div",Df,[o("span",Ff,u(_.search.route),1),o("span",null,u(f(M)("msg.confidence",{n:Math.round((_.search.confidence||0)*100)})),1),o("span",null,u(f(M)("msg.iterations",{n:_.search.iterations})),1)]),(p(!0),h(U,null,se(_.search.nodes,(L,T)=>(p(),h("div",{key:T,class:"srow"},[o("span",{class:ae(["ssrc",L.source])},u(c(L.source)),3),o("p",null,u(L.fact),1),o("em",null,u(Math.round((L.confidence||0)*100)),1)]))),128))])):N("",!0),_.content?(p(),h("div",{key:3,class:ae(["a-text",{streaming:_.streaming}]),innerHTML:f(Mr)(_.content)},null,10,jf)):_.streaming?(p(),h("p",Kf,[...I[0]||(I[0]=[o("span",{class:"dots"},"···",-1)])])):N("",!0),_.notice?(p(),h("div",Uf,u(_.notice),1)):N("",!0),_.error?(p(),h("div",Vf,"✕ "+u(_.error),1)):N("",!0),_.evidence&&_.evidence.length?(p(),h("details",Hf,[o("summary",null,[V(u(f(M)("msg.evidence"))+" ",1),o("em",null,u(f(M)("msg.items",{n:_.evidence.length})),1)]),o("div",Bf,[(p(!0),h(U,null,se(_.evidence,(L,T)=>(p(),h("div",{key:T,class:"ev-row"},[o("span",{class:ae(["ev-dot",L.status||"unverified"])},null,2),o("b",null,u(L.tool||L.kind||f(M)("msg.tool")),1),o("span",qf,u(L.status||L.reason||""),1),(p(!0),h(U,null,se(L.evidence||[],(A,x)=>(p(),h(U,{key:x},[i(A)?(p(),h("a",{key:0,class:"ev-link",href:A.ref,target:"_blank",rel:"noreferrer"},u(A.label||A.ref),9,zf)):(p(),h("span",Wf,u(A.label||A.ref),1))],64))),128))]))),128))])])):N("",!0),!_.streaming&&(_.content||_.error)?(p(),h("div",Jf,[_.content?(p(),h("button",{key:0,class:"mini",onClick:L=>m(_,E)},u(d.value===E?f(M)("msg.copied"):f(M)("msg.copy")),9,Gf)):N("",!0),b(E)?(p(),h("button",{key:1,class:"mini",onClick:L=>f(dd)(_)},u(f(M)("msg.retry")),9,Yf)):N("",!0)])):N("",!0)]))],2))),128))])],544))}},Qf=Ne(Xf,[["__scopeId","data-v-efc12ae7"]]),Zf={class:"panel"},ep={class:"ph"},tp={class:"tt"},sp={key:0,class:"pn-tag"},np=["title"],op={class:"pb scroll"},lp={key:0,class:"pn-st"},ip={key:1,class:"pn-st err"},rp={__name:"PanelBox",props:{title:{type:String,default:""},tag:{type:String,default:""},state:{type:String,default:"idle"},ready:{type:Boolean,default:!1}},emits:["refresh"],setup(e){const t=e;return(s,n)=>(p(),h("section",Zf,[o("header",ep,[o("div",tp,[o("h2",null,u(t.title),1),t.tag?(p(),h("span",sp,u(t.tag),1)):N("",!0)]),o("button",{class:ae(["rf",{spin:t.state==="loading"}]),title:f(M)("common.refresh"),onClick:n[0]||(n[0]=l=>s.$emit("refresh"))},u(f(M)("common.refresh")),11,np)]),o("div",op,[t.state==="loading"&&!t.ready?(p(),h("div",lp,u(f(M)("common.loading")),1)):t.state==="error"?(p(),h("div",ip,u(f(M)("common.offlinePanel")),1)):Ja(s.$slots,"default",{},void 0,!0,2)])]))}},Jt=Ne(rp,[["__scopeId","data-v-a7fcdff6"]]),Ie=e=>e.then(t=>t,()=>null),Ge=nt({activity:{state:"idle",events:[],traces:[],thought:null},tasks:{state:"idle",sched:{},processes:[],procStats:{}},agents:{state:"idle",list:[],info:null},tools:{state:"idle",skills:[],md:[],breakers:{}},usage:{state:"idle",tokens:null,gateway:{},metrics:null,slow:[]},knowledge:{state:"idle",stats:{},index:{},sources:[],abilities:[],recent:[],recentTotal:0,ingest:"idle",ingestMsg:"",ingestErr:""},memory:{state:"idle",stats:{},recent:[],prefs:[]},review:{state:"idle",stats:{cards:0,learned:0,fresh:0,due:0,avg_mastery:0,load7:{},risk:[]},queue:[],index:0,revealed:!1,session:"idle",lastMsg:""}}),Lo={async activity(e){const[t,s,n]=await Promise.all([Ie(de("/bus/history?limit=40")),Ie(de("/traces?limit=25")),Ie(de("/thoughtchain/supervisor/summary"))]);return e.events=t?.events||[],e.traces=(s?.traces||[]).slice().sort((l,i)=>(i.duration_ms||0)-(l.duration_ms||0)),e.thought=n,!!(t||s||n)},async tasks(e){const[t,s]=await Promise.all([Ie(de("/scheduler/stats")),Ie(de("/processes?limit=30"))]);return e.sched=t||{},e.processes=s?.processes||[],e.procStats=s?.stats||{},!!(t||s)},async agents(e){const[t,s]=await Promise.all([Ie(de("/status")),Ie(de("/system/info"))]);return e.list=t?Object.values(t):[],e.info=s,!!(t||s)},async tools(e){const[t,s,n]=await Promise.all([Ie(de("/ahs/skills")),Ie(de("/ahs/md-skills")),Ie(de("/ahs/breaker"))]);return e.skills=t?.skills||[],e.md=s?.skills||[],e.breakers=n?.breakers||{},!!(t||s||n)},async usage(e){const[t,s,n]=await Promise.all([Ie(de("/tokens")),Ie(de("/gateway/stats")),Ie(de("/metrics"))]);return e.tokens=t&&!t.error?t:null,e.gateway=s||{},e.metrics=n,e.slow=Object.entries(n?.endpoints||{}).map(([l,i])=>({name:l,...i})).sort((l,i)=>(i.p95_ms||0)-(l.p95_ms||0)).slice(0,6),!!(t||s||n)},async knowledge(e){const[t,s,n,l]=await Promise.all([Ie(In("/stats")),Ie(In("/knowledge/sources")),Ie(de("/knowledge/abilities")),Ie(de("/knowledge/recent?limit=50"))]);return e.stats=t||{},e.index=t?.index_build||{},e.sources=s?.sources||[],e.abilities=n?.abilities||[],e.recent=l?.kus||[],e.recentTotal=l?.total??e.recent.length,!!(t||s||n||l)},async review(e){const[t,s]=await Promise.all([Ie(de("/review/stats")),Ie(de("/review/queue?limit=20&fresh_limit=10"))]);return t&&(e.stats={...e.stats,...t}),s?.cards&&e.session!=="running"&&(e.queue=s.cards,e.index=0,e.revealed=!1,e.session==="done"&&(e.session="idle")),!!(t||s)},async memory(e){const[t,s,n]=await Promise.all([Ie(de("/memory/stats")),Ie(de("/memory/recent?limit=12")),Ie(de("/preferences"))]);return e.stats=t||{},e.recent=s?.memories||[],e.prefs=n?.preferences||[],!!(t||s||n)}};async function dt(e,t=!1){const s=Ge[e];if(!s||!Lo[e]||!t&&s.state!=="idle"&&s.state!=="error")return;s.state="loading";let n=!1;try{n=await Lo[e](s)}catch{n=!1}s.state=n?"ok":"error"}const qe=e=>dt(e,!0);async function ap(e,t){await ku(`/ahs/md-skills/${encodeURIComponent(e)}`,{enabled:t}),await qe("tools")}async function Tr({text:e,title:t="",domain:s=""}){const n=Ge.knowledge,l=(e||"").trim();if(!l)throw new Error("先写点内容再收录");n.ingest="busy",n.ingestMsg="",n.ingestErr="";try{const i=await et("/knowledge/ingest",{text:l,source_title:(t||"").trim(),domain:(s||"").trim()}),r=Object.entries(i?.counts||{}).map(([c,d])=>`${c} ${d}`).join(" · ");n.ingest="ok";const a=i?.ku_count??0;n.ingestMsg=a?`已抽取 ${a} 条知识单元${r?` · ${r}`:""}`:"模型没从这段文字里抽出知识条目 —— 试试写得更具体(谁 / 是什么 / 为什么)";try{await Lo.knowledge(n),n.state="ok"}catch{}return i}catch(i){throw n.ingest="error",n.ingestErr=String(i?.message||i),i}}async function Ro(){const e=Ge.review;e.queue.length||await dt("review",!0),e.queue.length&&(e.session="running",e.index=0,e.revealed=!1,e.lastMsg="")}function cp(){Ge.review.revealed=!0}async function up(e){const t=Ge.review,s=t.queue[t.index];if(!s)return null;const n=await et("/review/grade",{ku_id:s.ku_id,grade:e}),l=n?.next_in_days??1;t.lastMsg=`${s.name} → ${l>1?`${l} 天后`:"明天"}再复习`,t.index+=1,t.revealed=!1,t.index>=t.queue.length&&(t.session="done");const i=await de("/review/stats").catch(()=>null);return i&&(t.stats={...t.stats,...i}),n}async function dp(e){await ln(`/preferences/${encodeURIComponent(e)}`),await qe("memory")}async function fp(e){const t=await de(`/ahs/md-skills/${encodeURIComponent(e)}`);Qn({id:`skill:${t.id}`,kind:"text",lang:"markdown",title:t.name||t.id,path:`skills/${t.id}/SKILL.md`,meta:`指令技能 · v${t.version||"—"} · trust ${t.trust||"—"}`,content:t.body||t.description||"(正文为空)"})}const pp=[["statement","陈述"],["definition","定义"],["summary","摘要"],["description","描述"],["aliases","别名"],["verifiable","可验证"],["source","来源"],["source_type","来源类型"],["author","作者"],["year","年份"],["page","页码"],["quote","原文引用"],["supports","支持"],["contradicts","矛盾"]],hp=e=>Array.isArray(e)?e.length?e.join("、"):"":typeof e=="boolean"?e?"是":"否":e===0||e===""||e==null?"":String(e);async function an(e){const t=await In(`/knowledge/ku/${encodeURIComponent(e)}`),s=t.extra||{},l=pp.map(([r,a])=>[a,hp(s[r])]).filter(([,r])=>r).filter(([,r])=>r!==t.summary&&r!==t.name),i=[];l.length&&i.push(l.map(([r,a])=>`- **${r}**: ${a}`).join(`
|
|
27
|
-
`)),s.source_text&&i.push(`### 出处原文
|
|
28
|
-
|
|
29
|
-
${s.source_text}`),Qn({id:`ku:${t.ku_id}`,kind:"text",lang:"markdown",title:t.name||t.ku_id,path:`knowledge/${t.ku_type}/${t.ku_id}`,meta:`${t.ku_type} · ${t.domain||"未分域"} · 置信度 ${Math.round((t.confidence||0)*100)}%`,content:i.join(`
|
|
30
|
-
|
|
31
|
-
`)||"这条知识单元没有附带正文,只有一个名称。"})}async function gp(){const e=await de("/tokens/report");Qn({id:"token-report",kind:"code",lang:"text",title:"token-report",path:"foxclaw/api/routes/system.py",meta:"Token 消耗报告 · 实时生成",content:e.report||"(暂无报告)"})}function Er(e){if(!e)return null;if(typeof e=="string"){const n=new Date(e);return Number.isNaN(n.getTime())?null:n}const t=e>1e12?e:e*1e3,s=new Date(t);return Number.isNaN(s.getTime())?null:s}function Rn(e){const t=Er(e);return t?t.toLocaleString("zh-CN",{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}):""}function Ar(e){const t=Er(e);if(!t)return"";const s=Math.max(0,(Date.now()-t.getTime())/1e3);return s<60?"刚刚":s<3600?`${Math.floor(s/60)} 分钟前`:s<86400?`${Math.floor(s/3600)} 小时前`:`${Math.floor(s/86400)} 天前`}function Te(e){return e==null||Number.isNaN(e)?"0":Number(e).toLocaleString("zh-CN")}function Us(e){return e==null?"—":e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`}function at(e,t=46){const s=String(e??"").replace(/\s+/g," ").trim();return s.length>t?s.slice(0,t)+"…":s}const mp={class:"pn-kpi"},vp={class:"pn-cols"},_p={class:"pn-sec"},yp={class:"pn-h"},bp={key:0,class:"pn-empty"},kp=["title"],$p={class:"m"},wp={class:"s"},Sp={class:"r"},Cp={class:"pn-sec"},xp={class:"pn-h"},Mp={key:0,class:"pn-empty"},Tp=["title"],Ep={class:"m"},Ap={class:"s"},Op={class:"r"},Ip={class:"pn-sec"},Pp={class:"pn-note"},Lp={__name:"ActivityPanel",setup(e){const t=Ge.activity;Re(()=>dt("activity"));const s=Q(()=>t.events.length>0||t.traces.length>0||!!t.thought),n=Q(()=>t.events.slice(0,14)),l=Q(()=>t.traces.slice(0,8));function i(a){const c=a.payload||{};return c.task||c.reason||c.phase||c.agent_id||a.topic||a.channel||"(空事件)"}function r(a){const c=a.source?`来源 ${a.source}`:"";return[a.channel,c].filter(Boolean).join(" · ")}return(a,c)=>(p(),je(Jt,{title:"活动",tag:"Activity",state:f(t).state,ready:s.value,onRefresh:c[0]||(c[0]=d=>f(qe)("activity"))},{default:yt(()=>[o("div",mp,[o("div",null,[o("b",null,u(n.value.length),1),c[1]||(c[1]=o("span",null,"事件",-1))]),o("div",null,[o("b",null,u(f(t).traces.length),1),c[2]||(c[2]=o("span",null,"请求链路",-1))]),o("div",null,[o("b",null,u(f(t).thought?.total_nodes??0),1),c[3]||(c[3]=o("span",null,"思考节点",-1))]),o("div",null,[o("b",null,u(f(t).thought?Math.round((f(t).thought.avg_confidence??0)*100)+"%":"—"),1),c[4]||(c[4]=o("span",null,"平均置信度",-1))])]),o("div",vp,[o("div",_p,[o("div",yp,[c[5]||(c[5]=V("事件总线 ",-1)),o("em",null,u(f(t).events.length),1)]),n.value.length?N("",!0):(p(),h("div",bp," 还没有事件。发一条消息、让 Agent 跑一步,执行 → 审计 → 记忆的流转会记在这里。 ")),(p(!0),h(U,null,se(n.value,(d,g)=>(p(),h("div",{key:g,class:"pn-row static",title:i(d)},[o("span",$p,[o("b",null,u(f(at)(i(d),40)),1),o("span",wp,u(r(d)),1)]),o("span",Sp,u(f(Ar)(d.ts)),1)],8,kp))),128))]),o("div",Cp,[o("div",xp,[c[6]||(c[6]=V("最慢请求链路 ",-1)),o("em",null,u(f(t).traces.length),1)]),l.value.length?N("",!0):(p(),h("div",Mp," 还没有链路记录。任何一次 API 调用都会留下 trace。 ")),(p(!0),h(U,null,se(l.value,(d,g)=>(p(),h("div",{key:d.trace_id||g,class:"pn-row",title:d.trace_id},[o("span",Ep,[o("b",null,u(f(at)(d.name,34)),1),o("span",Ap,u(d.span_count||0)+" span",1)]),o("span",Op,u(f(Us)(d.duration_ms)),1)],8,Tp))),128))])]),o("div",Ip,[o("div",Pp,[V(" 思考链健康度:共 "+u(f(t).thought?.total_nodes??0)+" 个节点,阻塞 "+u(f(t).thought?.blocked_nodes??0)+" 个, 警告 "+u(f(t).thought?.warned_nodes??0)+" 个,阻塞率 "+u(f(t).thought?Math.round((f(t).thought.block_rate??0)*100)+"%":"—")+"。 数据来自 ",1),c[7]||(c[7]=o("code",null,"/api/bus/history",-1)),c[8]||(c[8]=V("、",-1)),c[9]||(c[9]=o("code",null,"/api/traces",-1)),c[10]||(c[10]=V("、",-1)),c[11]||(c[11]=o("code",null,"/api/thoughtchain/{agent}/summary",-1)),c[12]||(c[12]=V("。 ",-1))])])]),_:1},8,["state","ready"]))}},Rp=Ne(Lp,[["__scopeId","data-v-cdbea439"]]),Np={class:"pn-kpi"},Dp={class:"pn-sec"},Fp={class:"pn-h"},jp={key:0,class:"pn-empty"},Kp={class:"m"},Up={class:"s"},Vp={class:"r"},Hp={class:"pn-sec"},Bp={key:0,class:"pn-empty"},qp={key:1,class:"pn-chips"},zp={class:"pn-note"},Wp={__name:"TasksPanel",setup(e){const t=Ge.tasks;Re(()=>dt("tasks"));const s=Q(()=>t.state==="ok"&&Object.keys(t.sched).length>0),n=Q(()=>t.procStats?.by_state||{});function l(a){return a==="completed"?"green":a==="failed"?"red":a==="running"?"amber":""}const i={created:"已创建",queued:"排队中",scheduled:"已调度",running:"执行中",completed:"已完成",failed:"失败"},r=a=>i[a]||a;return(a,c)=>(p(),je(Jt,{title:"任务",tag:"Tasks",state:f(t).state,ready:s.value,onRefresh:c[0]||(c[0]=d=>f(qe)("tasks"))},{default:yt(()=>[o("div",Np,[o("div",null,[o("b",null,u(f(t).sched.submitted??0),1),c[1]||(c[1]=o("span",null,"已提交",-1))]),o("div",null,[o("b",null,u(f(t).sched.running??0),1),c[2]||(c[2]=o("span",null,"执行中",-1))]),o("div",null,[o("b",null,u(f(t).sched.completed??0),1),c[3]||(c[3]=o("span",null,"已完成",-1))]),o("div",null,[o("b",null,u(f(t).sched.failed??0),1),c[4]||(c[4]=o("span",null,"失败",-1))]),o("div",null,[o("b",null,u(f(t).procStats?.active??0),1),c[5]||(c[5]=o("span",null,"活跃进程",-1))])]),o("div",Dp,[o("div",Fp,[c[6]||(c[6]=V("进程生命周期 ",-1)),o("em",null,u(f(t).processes.length),1)]),f(t).processes.length?N("",!0):(p(),h("div",jp,[...c[7]||(c[7]=[V(" 还没有任务进程。任务是按「进程」记录的:提交后排入调度,执行完进入终态, 每一步的 ",-1),o("code",null,"state_history",-1),V(" 都能追溯。 ",-1)])])),(p(!0),h(U,null,se(f(t).processes,d=>(p(),h("div",{key:d.process_id,class:"pn-row"},[o("span",Kp,[o("b",null,u(f(at)(d.task,52)),1),o("span",Up,[V(u(d.agent_id||"未分配")+" ",1),d.route_hint?(p(),h(U,{key:0},[V(" · "+u(d.route_hint),1)],64)):N("",!0),V(" · "+u((d.state_history||[]).join(" → ")),1)])]),o("span",{class:ae(["pn-tag",l(d.state)])},u(r(d.state)),3),o("span",Vp,u(f(Ar)(d.created_at)),1)]))),128))]),o("div",Hp,[c[8]||(c[8]=o("div",{class:"pn-h"},"按状态分布",-1)),Object.keys(n.value).length?(p(),h("div",qp,[(p(!0),h(U,null,se(n.value,(d,g)=>(p(),h("span",{key:g,class:"pn-chip"},u(r(g))+" "+u(d),1))),128))])):(p(),h("div",Bp,"暂时没有进程状态。"))]),o("div",zp,[V(" 并发峰值 "+u(f(t).sched.peak_running??0)+" / 上限 "+u(f(t).sched.max_concurrency??"未设")+"。 数据来自 ",1),c[9]||(c[9]=o("code",null,"/api/scheduler/stats",-1)),c[10]||(c[10]=V(" 与 ",-1)),c[11]||(c[11]=o("code",null,"/api/processes",-1)),c[12]||(c[12]=V("。 ",-1))])]),_:1},8,["state","ready"]))}},Jp={class:"pn-kpi"},Gp={class:"pn-sec"},Yp={class:"pn-h"},Xp={key:0,class:"pn-empty"},Qp=["onClick"],Zp={class:"m"},eh={class:"id"},th={class:"s"},sh={key:0,class:"det"},nh={class:"kv"},oh={class:"kv"},lh={class:"kv"},ih={class:"kv"},rh={class:"kv"},ah={key:0,class:"pn-note"},ch={__name:"AgentsPanel",setup(e){const t=Ge.agents,s=G("");Re(()=>dt("agents"));const n=Q(()=>t.list.length>0),l=Q(()=>t.list.filter(c=>c.harness?.shadow_mode).length),i=Q(()=>t.list.reduce((c,d)=>c+(d.thought_chain?.total_nodes||0),0)),r=Q(()=>t.list.reduce((c,d)=>c+(d.thought_chain?.blocked_nodes||0),0));function a(c){s.value=s.value===c?"":c}return(c,d)=>(p(),je(Jt,{title:"代理",tag:"Agents",state:f(t).state,ready:n.value,onRefresh:d[0]||(d[0]=g=>f(qe)("agents"))},{default:yt(()=>[o("div",Jp,[o("div",null,[o("b",null,u(f(t).list.length),1),d[1]||(d[1]=o("span",null,"代理",-1))]),o("div",null,[o("b",null,u(l.value),1),d[2]||(d[2]=o("span",null,"影子模式",-1))]),o("div",null,[o("b",null,u(i.value),1),d[3]||(d[3]=o("span",null,"思考节点",-1))]),o("div",null,[o("b",null,u(r.value),1),d[4]||(d[4]=o("span",null,"被拦截",-1))])]),o("div",Gp,[o("div",Yp,[d[5]||(d[5]=V("代理清单 ",-1)),o("em",null,u(f(t).list.length),1)]),f(t).list.length?N("",!0):(p(),h("div",Xp,"后端没有返回任何 Agent。")),(p(!0),h(U,null,se(f(t).list,g=>(p(),h("div",{key:g.agent_id,class:"ag"},[o("div",{class:"pn-row clickable",onClick:m=>a(g.agent_id)},[o("span",Zp,[o("b",null,[V(u(g.agent_name)+" ",1),o("em",eh,u(g.agent_id),1)]),o("span",th,u(g.thought_chain?.total_nodes??0)+" 节点 · 置信度 "+u(Math.round((g.thought_chain?.avg_confidence??0)*100))+"% · 规则 "+u(g.harness?.policy?.total_rules??0)+" 条 ",1)]),o("span",{class:ae(["pn-tag",g.harness?.shadow_mode?"amber":"green"])},u(g.harness?.shadow_mode?"影子":"在线"),3)],8,Qp),s.value===g.agent_id?(p(),h("div",sh,[o("div",nh,[d[6]||(d[6]=o("span",null,"拦截阈值",-1)),o("b",null," warn "+u(g.harness?.thresholds?.warn??"—")+" / block "+u(g.harness?.thresholds?.block??"—"),1)]),o("div",oh,[d[7]||(d[7]=o("span",null,"漂移检测",-1)),o("b",null,u(g.harness?.thresholds?.embedding_mode||"—"),1)]),o("div",lh,[d[8]||(d[8]=o("span",null,"语义维度",-1)),o("b",null,u(g.harness?.thresholds?.semantic_degraded?"已降级(仅 tool/scope 两维)":"正常"),1)]),o("div",ih,[d[9]||(d[9]=o("span",null,"阻塞 / 警告",-1)),o("b",null,u(g.thought_chain?.blocked_nodes??0)+" / "+u(g.thought_chain?.warned_nodes??0),1)]),o("div",rh,[d[10]||(d[10]=o("span",null,"影子轮次",-1)),o("b",null,u(g.harness?.thresholds?.run_count??0)+" / "+u(g.harness?.thresholds?.shadow_rounds??"—"),1)])])):N("",!0)]))),128))]),f(t).info?(p(),h("div",ah,[d[11]||(d[11]=V(" 版本 ",-1)),o("code",null,u(f(t).info.version),1)])):N("",!0)]),_:1},8,["state","ready"]))}},uh=Ne(ch,[["__scopeId","data-v-828bb5bf"]]),dh={class:"pn-kpi"},fh={key:0,class:"pn-st err"},ph={class:"pn-cols"},hh={class:"pn-sec"},gh={class:"pn-h"},mh={key:0,class:"pn-empty"},vh=["title"],_h={class:"m"},yh={class:"s"},bh=["onClick"],kh=["disabled","onClick"],$h={key:0,class:"tk-test"},wh={key:0,class:"tip dim"},Sh=["onUpdate:modelValue","placeholder"],Ch={class:"fbar"},xh=["disabled","onClick"],Mh=["disabled","onClick"],Th={key:1,class:"pn-note meta bad"},Eh={class:"r-h"},Ah={key:0},Oh={key:0},Ih={class:"pn-sec"},Ph={class:"pn-h"},Lh={key:0,class:"pn-empty"},Rh=["onClick"],Nh={class:"m"},Dh={class:"s"},Fh=["disabled","title","onClick"],jh={class:"pn-sec"},Kh={class:"pn-h"},Uh={key:0,class:"tk-form"},Vh={class:"f"},Hh={key:0,class:"pn-note"},Bh={class:"f"},qh=["disabled"],zh={class:"fbar"},Wh=["disabled"],Jh=["disabled"],Gh={key:1,class:"tip bad"},Yh={key:2,class:"tip ok"},Xh={key:3,class:"tip dim"},Qh={key:1,class:"pn-note"},Zh={class:"pn-sec"},eg={class:"pn-h"},tg={key:0,class:"tk-form"},sg={class:"frow"},ng={class:"f"},og={class:"f"},lg={class:"f"},ig={class:"frow"},rg={class:"f"},ag={class:"f"},cg=["value"],ug={class:"f narrow"},dg={class:"f"},fg={class:"f"},pg={class:"frow"},hg={class:"f grow"},gg={class:"f narrow"},mg={class:"f"},vg={class:"chk"},_g={key:1,class:"frow"},yg={class:"f"},bg={class:"f"},kg={class:"chk"},$g={class:"chk"},wg={class:"fbar"},Sg=["disabled"],Cg=["disabled"],xg={key:1,class:"tip bad"},Mg={key:2,class:"tip ok"},Tg={key:3,class:"tip dim"},Eg={key:1,class:"pn-note"},Ag={class:"pn-sec"},Og={class:"pn-h"},Ig={key:0,class:"tk-form"},Pg={class:"frow"},Lg={class:"f"},Rg={class:"f"},Ng={class:"f"},Dg={class:"frow"},Fg={class:"f narrow"},jg={class:"f grow"},Kg={class:"fbar"},Ug=["disabled"],Vg=["disabled"],Hg={key:1,class:"tip bad"},Bg={key:2,class:"tip ok"},qg={key:3,class:"tip dim"},zg={key:1,class:"pn-empty"},Wg=["title"],Jg={class:"m"},Gg={class:"s"},Yg=["disabled","onClick"],Xg=["onClick"],Qg=4*1024*1024,Zg={__name:"ToolsPanel",setup(e){const t=Ge.tools,s=G(""),n=G(""),l=G([]);async function i(){try{const J=await de("/ahs/mcp/servers");l.value=J.servers||[]}catch{l.value=[]}}Re(()=>{dt("tools"),i()});const r=Q(()=>t.skills.length>0||t.md.length>0||l.value.length>0),a=Q(()=>t.skills.filter(J=>J.blocked).length+t.md.filter(J=>J.blocked).length),c=Q(()=>Object.keys(t.breakers||{}).length),d={high:"green",medium:"amber",low:"red"},g=J=>({high:"高信任",medium:"中信任",low:"低信任"})[J]||J||"—";async function m(J){n.value="";try{await fp(J.id)}catch(k){n.value=String(k.message||k)}}async function b(J){s.value=J.id,n.value="";try{await ap(J.id,!J.enabled)}catch(k){n.value=String(k.message||k)}s.value=""}const y=G(""),I=G({}),_=G(!1),E=G(null),L=G(""),T=G("");function A(){y.value="",I.value={},E.value=null,L.value="",T.value=""}function x(J){if(y.value===J.id){A();return}const k={};for(const[C]of Object.entries(J.params||{}))k[C]="";y.value=J.id,I.value=k,E.value=null,L.value="",T.value="",n.value=""}function te(J,k){const C={};for(const[ne,Se]of Object.entries(J||{})){const De=String(k[ne]??"").trim();if(De==="")continue;const as=String(Se||"").toLowerCase();as.includes("bool")?C[ne]=/^(1|true|yes|y|是)$/i.test(De):as.includes("float")||as.includes("number")?C[ne]=Number(De):as.includes("int")?C[ne]=parseInt(De,10)||0:C[ne]=De}return C}async function Z(J,k=!1){if(!_.value){_.value=!0,L.value="";try{const C=await et(`/ahs/skills/${encodeURIComponent(J.id)}/test`,{args:te(J.params,I.value),confirmed:k,mode:"strict",confirm_nonce:k?T.value:""});E.value=C,T.value=C.confirm_nonce||""}catch(C){L.value=String(C.message||C)}finally{_.value=!1}}}const j=J=>{if(J==null)return"";if(typeof J=="string")return J;try{return JSON.stringify(J,null,2)}catch{return String(J)}};async function $(J){if(confirm(`删除技能「${J.name||J.id}」?它的触发词和参数会一起消失。`)){s.value=J.id,n.value="";try{await ln(`/ahs/skills/${encodeURIComponent(J.id)}`),y.value===J.id&&A(),await qe("tools"),await i()}catch(k){n.value=String(k.message||k)}finally{s.value=""}}}const w=J=>String(J||"").split(/[,,\s]+/).map(k=>k.trim()).filter(Boolean);function K(J){const k={};for(const C of String(J||"").split(/[,,;\n]/)){const ne=C.search(/[::]/),Se=(ne<0?C:C.slice(0,ne)).trim(),De=ne<0?"":C.slice(ne+1).trim();Se&&(k[Se]=De||"str")}return k}function X(J){const k={};for(const C of String(J||"").split(`
|
|
32
|
-
`)){const ne=C.indexOf(":");ne>0&&(k[C.slice(0,ne).trim()]=C.slice(ne+1).trim())}return k}const F={read:"read · 只读",write:"write · 写入",send:"send · 代发",pay:"pay · 付款"},pe=G(!1),$e=G(!1),Pe=G(""),xe=G(""),we=G(!1),ye=G("query:str"),ft=G(""),re=nt({id:"",name:"",description:"",kind:"web_api",side_effect:"read",endpoint:"",http_method:"GET",mcp_server:"",mcp_tool:"",triggers:"",timeout:10,destructive:!1,external:!0,allow_local:!1});function Pt(){pe.value=!pe.value,Pe.value="",xe.value="",we.value=!1}async function Ze(J=!1){if($e.value)return;const k=re.id.trim();if(Pe.value="",xe.value="",!k){Pe.value="技能 id 必填";return}$e.value=!0;const C={id:k,name:(re.name||k).trim(),description:re.description.trim(),kind:re.kind,triggers:w(re.triggers),side_effect:re.side_effect,destructive:!!re.destructive,external:!!re.external,params:K(ye.value),endpoint:re.kind==="web_api"?re.endpoint.trim():"",http_method:re.http_method,http_headers:X(ft.value),param_location:"auto",allow_local:!!re.allow_local,timeout:Number(re.timeout)||10,mcp_server:re.kind==="mcp"?re.mcp_server.trim():"",mcp_tool:re.kind==="mcp"?re.mcp_tool.trim():"",acknowledged:J};try{const ne=await et("/ahs/skills",C),Se=(ne.warnings||[]).length?` · ${ne.warnings.join(";")}`:"";xe.value=`${ne.created?"已安装":"已更新"}「${C.name}」${Se}`,we.value=!1,Object.assign(re,{id:"",name:"",description:"",endpoint:"",triggers:"",mcp_server:"",mcp_tool:""}),await qe("tools")}catch(ne){Pe.value=String(ne.message||ne),we.value=!!(ne.detail&&ne.detail.needs_ack)}finally{$e.value=!1}}const rs=G(!1),Lt=G(!1),pt=G(""),ot=G(""),bt=G(!1),Rt=G(""),ht=G(""),Gt=G(""),v=G(null);function S(){rs.value=!rs.value,pt.value="",ot.value="",bt.value=!1}function O(){Rt.value="",ht.value="",Gt.value="",bt.value=!1,v.value&&(v.value.value="")}function H(J){return new Promise((k,C)=>{const ne=new FileReader;ne.onload=()=>{const Se=String(ne.result||"");k(Se.slice(Se.indexOf(",")+1))},ne.onerror=()=>C(new Error("读取文件失败")),ne.readAsDataURL(J)})}async function R(J){const k=J.target.files&&J.target.files[0];if(ht.value="",Gt.value="",pt.value="",ot.value="",bt.value=!1,!!k){if(ht.value=`${k.name} · ${(k.size/1024).toFixed(0)} KB`,k.size>Qg){pt.value="文件超过 4MB,拒绝上传";return}try{/\.zip$/i.test(k.name)?(Gt.value=await H(k),Rt.value=""):Rt.value=await k.text()}catch(C){pt.value=String(C.message||C)}}}async function D(J=!1){if(Lt.value)return;const k=Rt.value.trim();if(!J&&!k&&!Gt.value){pt.value="粘贴 SKILL.md 正文,或选一个 .md / .zip 文件";return}Lt.value=!0,pt.value="",ot.value="";const C={acknowledged:J};Gt.value?C.package_b64=Gt.value:C.content=k;try{const ne=await et("/ahs/md-skills",C),Se=ne.skill&&(ne.skill.name||ne.skill.id)||"指令技能";ot.value=`${ne.created?"已安装":"已更新"}「${Se}」`,O(),await qe("tools")}catch(ne){pt.value=String(ne.message||ne),bt.value=!!(ne.detail&&ne.detail.needs_ack)}finally{Lt.value=!1}}const Y=G(!1),z=G(!1),W=G(""),P=G(""),oe=G(!1),q=nt({id:"",name:"",url:"",transport:"streamable_http",headers:""});function le(){Y.value=!Y.value,W.value="",P.value="",oe.value=!1}async function ce(J=!1){if(z.value)return;const k=q.id.trim();if(W.value="",P.value="",!k||!q.url.trim()){W.value="id 和 URL 都要填";return}z.value=!0;try{const C=await et("/ahs/mcp/servers",{id:k,name:q.name.trim()||k,url:q.url.trim(),headers:X(q.headers),transport:q.transport,acknowledged:J});P.value=`已接入 ${C.server?.name||k} · 注册 ${C.tools_registered??0} 个工具`,oe.value=!1,Object.assign(q,{id:"",name:"",url:"",headers:""}),await i(),await qe("tools")}catch(C){W.value=String(C.message||C),oe.value=!!(C.detail&&C.detail.needs_ack)}finally{z.value=!1}}async function ge(J){if(!z.value){z.value=!0,W.value="",P.value="";try{const k=await et(`/ahs/mcp/servers/${encodeURIComponent(J.id)}/refresh`,{});P.value=`已重连 ${J.name||J.id} · 现共 ${k.tools??0} 个工具`,await i(),await qe("tools")}catch(k){W.value=String(k.message||k)}finally{z.value=!1}}}async function ke(J){if(confirm(`移除连接器「${J.name||J.id}」?它注册的 MCP 技能会一起删掉。`)){n.value="";try{const k=await ln(`/ahs/mcp/servers/${encodeURIComponent(J.id)}`);await i(),await qe("tools"),P.value=`已移除,连带删除 ${k.removed_skills??0} 个技能`}catch(k){n.value=String(k.message||k)}}}return(J,k)=>(p(),je(Jt,{title:"技能",tag:"Tools",state:f(t).state,ready:r.value,onRefresh:k[28]||(k[28]=C=>{f(qe)("tools"),i()})},{default:yt(()=>[o("div",dh,[o("div",null,[o("b",null,u(f(t).skills.length+f(t).md.length),1),k[29]||(k[29]=o("span",null,"技能总数",-1))]),o("div",null,[o("b",null,u(f(t).skills.length),1),k[30]||(k[30]=o("span",null,"执行技能",-1))]),o("div",null,[o("b",null,u(f(t).md.length),1),k[31]||(k[31]=o("span",null,"指令技能",-1))]),o("div",null,[o("b",null,u(a.value),1),k[32]||(k[32]=o("span",null,"被封杀",-1))]),o("div",null,[o("b",null,u(c.value),1),k[33]||(k[33]=o("span",null,"熔断中",-1))])]),n.value?(p(),h("div",fh,u(n.value),1)):N("",!0),o("div",ph,[o("div",hh,[o("div",gh,[k[34]||(k[34]=V("执行技能 ",-1)),o("em",null,u(f(t).skills.length),1)]),f(t).skills.length?N("",!0):(p(),h("div",mh,"没有注册的执行技能。")),(p(!0),h(U,null,se(f(t).skills,C=>(p(),h(U,{key:C.id},[o("div",{class:"pn-row",title:C.description},[o("span",_h,[o("b",null,u(C.name||C.id),1),o("span",yh,[V(u(C.kind)+" · "+u(C.side_effect||"read"),1),C.source==="user"?(p(),h(U,{key:0},[V(" · 用户安装")],64)):N("",!0),C.blocked?(p(),h(U,{key:1},[V(" · 已封杀")],64)):N("",!0)])]),o("span",{class:ae(["pn-tag",d[C.trust]||""])},u(g(C.trust)),3),o("button",{class:ae(["mbtn",{on:y.value===C.id}]),onClick:ne=>x(C)},u(y.value===C.id?"收起":"测试"),11,bh),C.source!=="builtin"?(p(),h("button",{key:0,class:"mbtn danger",disabled:s.value===C.id,onClick:ne=>$(C)}," 删除 ",8,kh)):N("",!0)],8,vh),y.value===C.id?(p(),h("div",$h,[C.params&&Object.keys(C.params).length?N("",!0):(p(),h("div",wh," 该技能没有声明参数,直接运行即可。 ")),(p(!0),h(U,null,se(C.params||{},(ne,Se)=>(p(),h("label",{key:Se,class:"f"},[o("span",null,[V(u(Se),1),o("em",null,u(ne),1)]),he(o("input",{"onUpdate:modelValue":De=>I.value[Se]=De,placeholder:String(ne||"str"),spellcheck:"false"},null,8,Sh),[[me,I.value[Se]]])]))),128)),o("div",Ch,[o("button",{class:"go",disabled:_.value,onClick:ne=>Z(C,!1)},u(_.value?"调用中…":"运行"),9,xh),E.value&&E.value.status==="needs_confirmation"?(p(),h("button",{key:0,class:"go warn",disabled:_.value,onClick:ne=>Z(C,!0)}," 确认并重跑 ",8,Mh)):N("",!0),k[35]||(k[35]=o("span",{class:"tip dim"},"走真实权限 / 断路器 / SSRF 校验",-1))]),L.value?(p(),h("div",Th,u(L.value),1)):N("",!0),E.value?(p(),h("div",{key:2,class:ae(["tk-res",E.value.success?"ok":"bad"])},[o("div",Eh,[o("b",null,u(E.value.status),1),E.value.message?(p(),h("span",Ah,u(E.value.message),1)):N("",!0)]),j(E.value.output)?(p(),h("pre",Oh,u(j(E.value.output)),1)):N("",!0)],2)):N("",!0)])):N("",!0)],64))),128))]),o("div",Ih,[o("div",Ph,[k[36]||(k[36]=V("指令技能 ",-1)),o("em",null,u(f(t).md.length),1)]),f(t).md.length?N("",!0):(p(),h("div",Lh,"没有 SKILL.md 指令技能。")),(p(!0),h(U,null,se(f(t).md,C=>(p(),h("div",{key:C.id,class:"pn-row clickable",title:"点击查看 SKILL.md 正文",onClick:ne=>m(C)},[o("span",Nh,[o("b",null,u(C.name||C.id),1),o("span",Dh,u(f(at)(C.description||"无描述",34)),1)]),o("span",{class:ae(["pn-tag",d[C.trust]||""])},u(g(C.trust)),3),o("button",{class:ae(["sw",{on:C.enabled}]),disabled:s.value===C.id,title:C.enabled?"点击停用":"点击启用",onClick:Je(ne=>b(C),["stop"])},u(C.enabled?"启用":"停用"),11,Fh)],8,Rh))),128))])]),o("div",jh,[o("div",Kh,[k[37]||(k[37]=V(" 安装指令技能 ",-1)),o("button",{class:"mbtn",onClick:S},u(rs.value?"收起":"+ 上传"),1)]),rs.value?(p(),h("div",Uh,[o("label",Vh,[k[38]||(k[38]=o("span",null,"SKILL.md 或 OpenClaw 包(.md / .zip)",-1)),o("input",{ref_key:"miRef",ref:v,type:"file",accept:".md,.markdown,.zip",onChange:R},null,544)]),ht.value?(p(),h("div",Hh,u(ht.value),1)):N("",!0),o("label",Bh,[k[39]||(k[39]=o("span",null,"或粘贴正文(frontmatter + 指示)",-1)),he(o("textarea",{"onUpdate:modelValue":k[0]||(k[0]=C=>Rt.value=C),rows:"8",spellcheck:"false",disabled:!!Gt.value,placeholder:"--- name: my-skill / description: 什么时候用它 --- 然后写正文"},null,8,qh),[[me,Rt.value]])]),o("div",zh,[o("button",{class:"go",disabled:Lt.value,onClick:k[1]||(k[1]=C=>D(!1))},u(Lt.value?"安装中…":"安装"),9,Wh),bt.value?(p(),h("button",{key:0,class:"go warn",disabled:Lt.value,onClick:k[2]||(k[2]=C=>D(!0))}," 已知风险,继续安装 ",8,Jh)):N("",!0),pt.value?(p(),h("span",Gh,u(pt.value),1)):ot.value?(p(),h("span",Yh,u(ot.value),1)):(p(),h("span",Xh,"只取 SKILL.md 与 _meta.json;包内 scripts/ 不落地、不执行"))])])):(p(),h("div",Qh,[...k[40]||(k[40]=[V(" 指令技能是注入提示词的 markdown,不是可执行工具。命令行也能装: ",-1),o("code",null,"foxclaw skills install @owner/slug",-1),V("、",-1),o("code",null,"github:owner/repo",-1),V("、",-1),o("code",null,"./pkg.zip",-1),V("。 ",-1)])]))]),o("div",Zh,[o("div",eg,[k[41]||(k[41]=V(" 安装技能 ",-1)),o("button",{class:"mbtn",onClick:Pt},u(pe.value?"收起":"+ 新增"),1)]),pe.value?(p(),h("div",tg,[o("div",sg,[o("label",ng,[k[42]||(k[42]=o("span",null,"id",-1)),he(o("input",{"onUpdate:modelValue":k[3]||(k[3]=C=>re.id=C),placeholder:"weather_query",spellcheck:"false"},null,512),[[me,re.id]])]),o("label",og,[k[43]||(k[43]=o("span",null,"名称",-1)),he(o("input",{"onUpdate:modelValue":k[4]||(k[4]=C=>re.name=C),placeholder:"查天气"},null,512),[[me,re.name]])])]),o("label",lg,[k[44]||(k[44]=o("span",null,"描述",-1)),he(o("input",{"onUpdate:modelValue":k[5]||(k[5]=C=>re.description=C),placeholder:"给模型看的说明:能做什么,什么时候用"},null,512),[[me,re.description]])]),o("div",ig,[o("label",rg,[k[46]||(k[46]=o("span",null,"类型",-1)),he(o("select",{"onUpdate:modelValue":k[6]||(k[6]=C=>re.kind=C)},[...k[45]||(k[45]=[o("option",{value:"web_api"},"web_api · HTTP 接口",-1),o("option",{value:"mcp"},"mcp · 已有 server 的工具",-1)])],512),[[js,re.kind]])]),o("label",ag,[k[47]||(k[47]=o("span",null,"副作用",-1)),he(o("select",{"onUpdate:modelValue":k[7]||(k[7]=C=>re.side_effect=C)},[(p(),h(U,null,se(F,(C,ne)=>o("option",{key:ne,value:ne},u(C),9,cg)),64))],512),[[js,re.side_effect]])]),o("label",ug,[k[48]||(k[48]=o("span",null,"超时(s)",-1)),he(o("input",{"onUpdate:modelValue":k[8]||(k[8]=C=>re.timeout=C),type:"number",min:"1",max:"120"},null,512),[[me,re.timeout,void 0,{number:!0}]])])]),o("label",dg,[k[49]||(k[49]=o("span",null,"触发词(逗号分隔)",-1)),he(o("input",{"onUpdate:modelValue":k[9]||(k[9]=C=>re.triggers=C),placeholder:"天气, 气温, 下雨"},null,512),[[me,re.triggers]])]),o("label",fg,[k[50]||(k[50]=o("span",null,"参数(schema:名:类型)",-1)),he(o("input",{"onUpdate:modelValue":k[10]||(k[10]=C=>ye.value=C),placeholder:"city:str, days:int",spellcheck:"false"},null,512),[[me,ye.value]])]),re.kind==="web_api"?(p(),h(U,{key:0},[o("div",pg,[o("label",hg,[k[51]||(k[51]=o("span",null,"endpoint",-1)),he(o("input",{"onUpdate:modelValue":k[11]||(k[11]=C=>re.endpoint=C),placeholder:"https://api.example.com/weather",spellcheck:"false"},null,512),[[me,re.endpoint]])]),o("label",gg,[k[53]||(k[53]=o("span",null,"方法",-1)),he(o("select",{"onUpdate:modelValue":k[12]||(k[12]=C=>re.http_method=C)},[...k[52]||(k[52]=[o("option",null,"GET",-1),o("option",null,"POST",-1)])],512),[[js,re.http_method]])])]),o("label",mg,[k[54]||(k[54]=o("span",null,"请求头(每行 Key: Value)",-1)),he(o("textarea",{"onUpdate:modelValue":k[13]||(k[13]=C=>ft.value=C),rows:"2",spellcheck:"false",placeholder:"Authorization: Bearer xxx"},null,512),[[me,ft.value]])]),o("label",vg,[he(o("input",{"onUpdate:modelValue":k[14]||(k[14]=C=>re.allow_local=C),type:"checkbox"},null,512),[[vo,re.allow_local]]),k[55]||(k[55]=V(" 允许访问内网 / 本机地址",-1))])],64)):(p(),h("div",_g,[o("label",yg,[k[56]||(k[56]=o("span",null,"MCP server",-1)),he(o("input",{"onUpdate:modelValue":k[15]||(k[15]=C=>re.mcp_server=C),placeholder:"amap-maps",spellcheck:"false"},null,512),[[me,re.mcp_server]])]),o("label",bg,[k[57]||(k[57]=o("span",null,"工具名",-1)),he(o("input",{"onUpdate:modelValue":k[16]||(k[16]=C=>re.mcp_tool=C),placeholder:"maps_direction",spellcheck:"false"},null,512),[[me,re.mcp_tool]])])])),o("label",kg,[he(o("input",{"onUpdate:modelValue":k[17]||(k[17]=C=>re.destructive=C),type:"checkbox"},null,512),[[vo,re.destructive]]),k[58]||(k[58]=V(" 不可逆操作(删除 / 付款这类)",-1))]),o("label",$g,[he(o("input",{"onUpdate:modelValue":k[18]||(k[18]=C=>re.external=C),type:"checkbox"},null,512),[[vo,re.external]]),k[59]||(k[59]=V(" 会调用外部服务(联网)",-1))]),o("div",wg,[o("button",{class:"go",disabled:$e.value,onClick:k[19]||(k[19]=C=>Ze(!1))},u($e.value?"安装中…":"安装"),9,Sg),we.value?(p(),h("button",{key:0,class:"go warn",disabled:$e.value,onClick:k[20]||(k[20]=C=>Ze(!0))}," 已知风险,继续安装 ",8,Cg)):N("",!0),Pe.value?(p(),h("span",xg,u(Pe.value),1)):xe.value?(p(),h("span",Mg,u(xe.value),1)):(p(),h("span",Tg,"同 id 覆盖更新;内置技能的 id 不可覆盖"))])])):(p(),h("div",Eg,[...k[60]||(k[60]=[V(" 只能装 ",-1),o("code",null,"web_api",-1),V(" 与 ",-1),o("code",null,"mcp",-1),V(" 两类 —— 本地代码技能不接受从界面安装。 ",-1)])]))]),o("div",Ag,[o("div",Og,[k[61]||(k[61]=V(" 连接器 ",-1)),o("em",null,u(l.value.length),1),o("button",{class:"mbtn",onClick:le},u(Y.value?"收起":"+ 接入"),1)]),Y.value?(p(),h("div",Ig,[o("div",Pg,[o("label",Lg,[k[62]||(k[62]=o("span",null,"id",-1)),he(o("input",{"onUpdate:modelValue":k[21]||(k[21]=C=>q.id=C),placeholder:"my-notes",spellcheck:"false"},null,512),[[me,q.id]])]),o("label",Rg,[k[63]||(k[63]=o("span",null,"显示名",-1)),he(o("input",{"onUpdate:modelValue":k[22]||(k[22]=C=>q.name=C),placeholder:"我的备忘录"},null,512),[[me,q.name]])])]),o("label",Ng,[k[64]||(k[64]=o("span",null,"URL",-1)),he(o("input",{"onUpdate:modelValue":k[23]||(k[23]=C=>q.url=C),placeholder:"https://example.com/mcp",spellcheck:"false"},null,512),[[me,q.url]])]),o("div",Dg,[o("label",Fg,[k[66]||(k[66]=o("span",null,"传输",-1)),he(o("select",{"onUpdate:modelValue":k[24]||(k[24]=C=>q.transport=C)},[...k[65]||(k[65]=[o("option",{value:"streamable_http"},"streamable_http",-1),o("option",{value:"sse"},"sse",-1)])],512),[[js,q.transport]])]),o("label",jg,[k[67]||(k[67]=o("span",null,"请求头(每行 Key: Value)",-1)),he(o("textarea",{"onUpdate:modelValue":k[25]||(k[25]=C=>q.headers=C),rows:"2",spellcheck:"false",placeholder:"Authorization: Bearer xxx"},null,512),[[me,q.headers]])])]),o("div",Kg,[o("button",{class:"go",disabled:z.value,onClick:k[26]||(k[26]=C=>ce(!1))},u(z.value?"连接中…":"接入"),9,Ug),oe.value?(p(),h("button",{key:0,class:"go warn",disabled:z.value,onClick:k[27]||(k[27]=C=>ce(!0))}," 已知风险,继续 ",8,Vg)):N("",!0),W.value?(p(),h("span",Hg,u(W.value),1)):P.value?(p(),h("span",Bg,u(P.value),1)):(p(),h("span",qg,"接入后会连一次,把它暴露的工具注册成技能"))])])):N("",!0),l.value.length?N("",!0):(p(),h("div",zg," 还没接入外部应用。邮箱、你自己的另一个知识库这类需要授权的,会作为 MCP 服务出现在这一节。 ")),(p(!0),h(U,null,se(l.value,C=>(p(),h("div",{key:C.id,class:"pn-row",title:C.url},[o("span",Jg,[o("b",null,u(C.name||C.id),1),o("span",Gg,[V(u(C.tool_count??0)+" 个工具",1),C.transport?(p(),h(U,{key:0},[V(" · "+u(C.transport),1)],64)):N("",!0)])]),o("button",{class:"mbtn",disabled:z.value,onClick:ne=>ge(C)},"重连",8,Yg),o("button",{class:"mbtn danger",onClick:ne=>ke(C)},"移除",8,Xg)],8,Wg))),128))])]),_:1},8,["state","ready"]))}},em=Ne(Zg,[["__scopeId","data-v-5b252a48"]]),tm={class:"pn-kpi"},sm={key:0,class:"pn-st err"},nm={class:"pn-cols"},om={class:"pn-sec"},lm={class:"pn-h"},im={key:0,class:"pn-empty"},rm={class:"m"},am={class:"s"},cm={class:"r"},um={class:"pn-sec"},dm={class:"pn-h"},fm={key:0,class:"pn-empty"},pm={class:"m"},hm={class:"s"},gm={class:"r"},mm={class:"m"},vm={class:"s"},_m={class:"r"},ym={class:"pn-sec"},bm={class:"pn-h"},km={key:0,class:"pn-empty"},$m=["title"],wm={class:"m"},Sm={class:"s"},Cm={class:"r"},xm={class:"pn-sec acts"},Mm={class:"hint"},Tm={__name:"UsagePanel",setup(e){const t=Ge.usage,s=G("");Re(()=>dt("usage"));const n=Q(()=>!!t.tokens||Object.keys(t.gateway||{}).length>0),l=Q(()=>t.tokens?.summary||{}),i=Q(()=>Object.entries(t.tokens?.by_agent||{})),r=Q(()=>Object.entries(t.tokens?.by_provider||{})),a=Q(()=>Object.entries(t.metrics?.llm||{})),c=Q(()=>Math.round((t.metrics?.uptime_s||0)/3600));async function d(){s.value="";try{await gp()}catch(g){s.value=String(g.message||g)}}return(g,m)=>(p(),je(Jt,{title:"使用情况",tag:"Usage",state:f(t).state,ready:n.value,onRefresh:m[0]||(m[0]=b=>f(qe)("usage"))},{default:yt(()=>[o("div",tm,[o("div",null,[o("b",null,u(f(Te)(l.value.total_tokens??0)),1),m[1]||(m[1]=o("span",null,"总 token",-1))]),o("div",null,[o("b",null,u(f(Te)(l.value.calls??0)),1),m[2]||(m[2]=o("span",null,"调用次数",-1))]),o("div",null,[o("b",null,u(f(Te)(Math.round(l.value.avg_tokens_per_call??0))),1),m[3]||(m[3]=o("span",null,"平均 / 次",-1))]),o("div",null,[o("b",null,u(f(Te)(f(t).gateway.rejected_total??0)),1),m[4]||(m[4]=o("span",null,"网关拒绝",-1))]),o("div",null,[o("b",null,u(c.value)+"h",1),m[5]||(m[5]=o("span",null,"已运行",-1))])]),s.value?(p(),h("div",sm,u(s.value),1)):N("",!0),o("div",nm,[o("div",om,[o("div",lm,[m[6]||(m[6]=V("按 Agent ",-1)),o("em",null,u(i.value.length),1)]),i.value.length?N("",!0):(p(),h("div",im,"还没有 token 消耗记录。")),(p(!0),h(U,null,se(i.value,([b,y])=>(p(),h("div",{key:b,class:"pn-row"},[o("span",rm,[o("b",null,u(b),1),o("span",am,"输入 "+u(f(Te)(y.input_tokens))+" · 输出 "+u(f(Te)(y.output_tokens)),1)]),o("span",cm,u(f(Te)(y.total_tokens)),1)]))),128))]),o("div",um,[o("div",dm,[m[7]||(m[7]=V("按 provider ",-1)),o("em",null,u(r.value.length),1)]),r.value.length?N("",!0):(p(),h("div",fm,"还没有 provider 记录。")),(p(!0),h(U,null,se(r.value,([b,y])=>(p(),h("div",{key:b,class:"pn-row"},[o("span",pm,[o("b",null,u(b),1),o("span",hm,u(y.calls)+" 次调用",1)]),o("span",gm,u(f(Te)(y.total_tokens)),1)]))),128)),(p(!0),h(U,null,se(a.value,([b,y])=>(p(),h("div",{key:"llm-"+b,class:"pn-row"},[o("span",mm,[o("b",null,u(b)+" 延迟",1),o("span",vm,"p50 "+u(f(Us)(y.p50_ms))+" · p95 "+u(f(Us)(y.p95_ms))+" · 错误率 "+u(Math.round((y.error_rate||0)*100))+"%",1)]),o("span",_m,u(y.count)+" 次",1)]))),128))])]),o("div",ym,[o("div",bm,[m[8]||(m[8]=V("最慢端点 p95 ",-1)),o("em",null,u(f(t).slow.length),1)]),f(t).slow.length?N("",!0):(p(),h("div",km,"还没有端点耗时统计。")),(p(!0),h(U,null,se(f(t).slow,b=>(p(),h("div",{key:b.name,class:"pn-row",title:b.name},[o("span",wm,[o("b",null,u(f(at)(b.name,46)),1),o("span",Sm,u(b.count)+" 次 · 错误 "+u(b.errors)+" · 平均 "+u(f(Us)(b.avg_ms)),1)]),o("span",Cm,u(f(Us)(b.p95_ms)),1)],8,$m))),128))]),o("div",xm,[o("button",{class:"btn",onClick:d},"在中间舞台打开完整报告"),o("span",Mm,"网关 "+u(f(t).gateway.enabled?"已启用":"未启用")+" · "+u(f(t).gateway.rate_per_min??"—")+"/分 · 配额 "+u(f(Te)(f(t).gateway.quota_per_hour??0))+"/时 ",1)])]),_:1},8,["state","ready"]))}},Em=Ne(Tm,[["__scopeId","data-v-1a916225"]]),Am={class:"kb-in"},Om=["onKeydown"],Im={class:"kb-bar"},Pm={key:0,class:"tip"},Lm={key:1,class:"tip ok"},Rm={key:2,class:"tip bad"},Nm={key:3,class:"tip dim"},Dm=["disabled"],Fm={class:"pn-kpi"},jm={class:"pn-sec"},Km={class:"pn-h"},Um={class:"kb-find"},Vm=["value"],Hm=["disabled"],Bm={key:0,class:"pn-note meta bad"},qm={key:1,class:"kb-hits"},zm=["title","onClick"],Wm={class:"m"},Jm={class:"s"},Gm={class:"r"},Ym={key:2,class:"pn-empty"},Xm={class:"pn-sec"},Qm={class:"pn-h"},Zm={key:0,class:"pn-empty"},ev=["title","onClick"],tv={class:"m"},sv={class:"s"},nv={class:"r"},ov={class:"pn-cols"},lv={class:"pn-sec"},iv={class:"pn-h"},rv={class:"pn-row"},av={class:"m"},cv={class:"s"},uv={class:"pn-note meta"},dv={class:"pn-sec"},fv={class:"pn-h"},pv={key:0,class:"pn-empty"},hv={class:"m"},gv={class:"r"},mv={class:"pn-h sec-gap"},vv={key:1,class:"pn-empty"},_v=["title"],yv={class:"m"},bv={class:"s"},kv={class:"pn-sec"},$v={class:"pn-h"},wv={key:0,class:"pn-empty"},Sv={key:1,class:"pn-chips"},Cv=["onClick"],xv={key:2,class:"pn-note meta"},Mv={key:3,class:"pn-note meta bad"},Tv={key:4,class:"kb-ab"},Ev={key:0,class:"pn-note meta"},Av={class:"kb-ab-h"},Ov={class:"pn-note meta"},Iv={key:0,class:"pn-chips gap"},Pv={class:"kb-ab-h"},Lv={class:"v"},Rv={class:"pn-note meta"},Nv={class:"m"},Dv={class:"s"},Fv={class:"r"},jv={class:"m"},Kv={__name:"KnowledgePanel",setup(e){const t=Ge.knowledge;Re(()=>dt("knowledge"));const s=G(""),n=G(""),l=G(""),i=Q(()=>Object.keys(t.stats||{}).length>0),r=Q(()=>t.index||{}),a=Q(()=>Object.entries(t.stats?.ku_counts||{})),c=Q(()=>t.ingest==="busy");bs(s,j=>{j&&!c.value&&(t.ingest="idle",t.ingestMsg="",t.ingestErr="")});async function d(){if(!(!s.value.trim()||c.value))try{await Tr({text:s.value,title:n.value,domain:l.value}),s.value="",n.value=""}catch{}}const g=G(""),m=G("hybrid"),b=[{v:"hybrid",label:"混合"},{v:"bm25",label:"关键词"},{v:"vector",label:"语义"},{v:"graph",label:"图谱"}],y=G("idle"),I=G(""),_=G([]);async function E(){const j=g.value.trim();if(!(!j||y.value==="busy")){y.value="busy",I.value="";try{const $=await et("/knowledge/search",{query:j,mode:m.value,top_k:12});_.value=$.hits||[],$.available===!1?(y.value="err",I.value="HKC 未启用(未 vendor 或缺依赖)"):$.error?(y.value="err",I.value=$.error):y.value="ok"}catch($){_.value=[],y.value="err",I.value=$.message}}}const L=G(""),T=G("idle"),A=G(""),x=G(null);async function te(j){if(L.value===j&&x.value){L.value="",x.value=null,T.value="idle";return}L.value=j,T.value="busy",A.value="",x.value=null;try{x.value=await de(`/knowledge/ability/${encodeURIComponent(j)}`),T.value="ok"}catch($){T.value="err",A.value=$.message}}function Z(j){if(j==null)return"";if(typeof j=="number")return`${Math.round(j*100)}%`;if(typeof j=="object"){const $=j.overall??j.score??j.value??j.ratio;if(typeof $=="number")return`${Math.round($*100)}%`}return""}return(j,$)=>(p(),je(Jt,{title:"学习库",tag:"Knowledge",state:f(t).state,ready:i.value,onRefresh:$[5]||($[5]=w=>f(qe)("knowledge"))},{default:yt(()=>[o("div",Am,[he(o("textarea",{"onUpdate:modelValue":$[0]||($[0]=w=>s.value=w),rows:"3",spellcheck:"false",placeholder:"写一句或一小段知识 —— 一句话也算。长文档、整本书走知识星球。",onKeydown:$s(Je(d,["ctrl","prevent"]),["enter"])},null,40,Om),[[me,s.value]]),o("div",Im,[he(o("input",{"onUpdate:modelValue":$[1]||($[1]=w=>n.value=w),class:"f-title",placeholder:"标题(可选)"},null,512),[[me,n.value]]),he(o("input",{"onUpdate:modelValue":$[2]||($[2]=w=>l.value=w),class:"f-domain",placeholder:"领域(可选)"},null,512),[[me,l.value]]),c.value?(p(),h("span",Pm,"抽取中,可能要几十秒…")):f(t).ingest==="ok"?(p(),h("span",Lm,u(f(t).ingestMsg),1)):f(t).ingest==="error"?(p(),h("span",Rm,u(f(t).ingestErr),1)):(p(),h("span",Nm,"Ctrl + Enter 收录")),o("button",{class:"go",disabled:!s.value.trim()||c.value,onClick:d},u(c.value?"收录中…":"收录"),9,Dm)])]),o("div",Fm,[o("div",null,[o("b",null,u(f(Te)(f(t).stats.total_kus??0)),1),$[6]||($[6]=o("span",null,"知识单元",-1))]),o("div",null,[o("b",null,u(f(Te)(f(t).stats.total_relations??0)),1),$[7]||($[7]=o("span",null,"关系",-1))]),o("div",null,[o("b",null,u(f(Te)(f(t).stats.graph_nodes??0)),1),$[8]||($[8]=o("span",null,"图谱节点",-1))]),o("div",null,[o("b",null,u(f(Te)(f(t).stats.open_conflicts??0)),1),$[9]||($[9]=o("span",null,"待裁决冲突",-1))]),o("div",null,[o("b",null,u(f(Te)(f(t).stats.vector_size??0)),1),$[10]||($[10]=o("span",null,"向量条目",-1))])]),o("div",jm,[o("div",Km,[$[11]||($[11]=V("检索 ",-1)),o("em",null,u(_.value.length),1)]),o("div",Um,[he(o("input",{"onUpdate:modelValue":$[3]||($[3]=w=>g.value=w),placeholder:"按关键词 / 语义检索整个知识库…",onKeydown:$s(E,["enter"])},null,544),[[me,g.value]]),he(o("select",{"onUpdate:modelValue":$[4]||($[4]=w=>m.value=w),"aria-label":"检索模式"},[(p(),h(U,null,se(b,w=>o("option",{key:w.v,value:w.v},u(w.label),9,Vm)),64))],512),[[js,m.value]]),o("button",{class:"go",disabled:!g.value.trim()||y.value==="busy",onClick:E},u(y.value==="busy"?"检索中…":"检索"),9,Hm)]),y.value==="err"?(p(),h("div",Bm,u(I.value),1)):_.value.length?(p(),h("div",qm,[(p(!0),h(U,null,se(_.value,w=>(p(),h("button",{key:w.ku_id,class:"kb-hit",title:w.summary||w.name,onClick:K=>f(an)(w.ku_id)},[o("span",Wm,[o("b",null,u(f(at)(w.name||w.ku_id,52)),1),o("span",Jm,u(w.ku_type||"KU")+" · "+u(w.mode||m.value),1)]),o("span",Gm,u(w.score!=null?Number(w.score).toFixed(2):""),1)],8,zm))),128))])):y.value==="ok"?(p(),h("div",Ym,"没有命中,换个词或换模式试试。")):N("",!0)]),o("div",Xm,[o("div",Qm,[$[12]||($[12]=V("最近录入 ",-1)),o("em",null,u(f(t).recentTotal),1)]),f(t).recent.length?N("",!0):(p(),h("div",Zm," 还没有录入知识。上面写一句话就能收录 —— 长文档走知识星球。 ")),(p(!0),h(U,null,se(f(t).recent,w=>(p(),h("div",{key:w.ku_id,class:"pn-row clickable",title:w.summary||w.name,onClick:K=>f(an)(w.ku_id)},[o("span",tv,[o("b",null,u(f(at)(w.name||w.ku_id,46)),1),o("span",sv,u(w.ku_type)+" · "+u(w.domain||"未分域"),1)]),o("span",nv,u(f(Rn)(w.created_at)),1)],8,ev))),128))]),o("div",ov,[o("div",lv,[o("div",iv,[$[13]||($[13]=V("索引状态 ",-1)),o("em",null,u(r.value.index_state||"—"),1)]),o("div",rv,[o("span",av,[o("b",null,u(r.value.index_state==="ready"?"索引就绪":"索引"+(r.value.index_state||"未知")),1),o("span",cv," 扫描 "+u(f(Te)(r.value.scanned??0))+" · 就绪 "+u(f(Te)(r.value.ready??0))+" · 待处理 "+u(f(Te)(r.value.pending??0))+" · 失败 "+u(f(Te)(r.value.failed??0)),1)]),o("span",{class:ae(["pn-tag",r.value.index_state==="ready"?"green":"amber"])},u(r.value.index_version||"v—"),3)]),o("div",uv,[$[14]||($[14]=V(" 向量模型 ",-1)),o("code",null,u(f(t).stats.embedding||"未知"),1),$[15]||($[15]=o("br",null,null,-1)),V(" BM25 "+u(f(Te)(f(t).stats.bm25_size??0))+" · 向量 "+u(f(Te)(f(t).stats.vector_size??0)),1),$[16]||($[16]=o("br",null,null,-1)),$[17]||($[17]=V(" 数据目录 ",-1)),o("code",null,u(f(t).stats.data_dir||"—"),1)])]),o("div",dv,[o("div",fv,[$[18]||($[18]=V("按知识域 ",-1)),o("em",null,u(a.value.length),1)]),a.value.length?N("",!0):(p(),h("div",pv,"摄入资料后,这里按知识域统计条目数。")),(p(!0),h(U,null,se(a.value,([w,K])=>(p(),h("div",{key:w,class:"pn-row"},[o("span",hv,[o("b",null,u(w),1)]),o("span",gv,u(K),1)]))),128)),o("div",mv,[$[19]||($[19]=V("书籍来源 ",-1)),o("em",null,u(f(t).sources.length),1)]),f(t).sources.length?N("",!0):(p(),h("div",vv," 还没有整本摄入的资料。PDF / EPUB 走知识星球导入。 ")),(p(!0),h(U,null,se(f(t).sources.slice(0,8),(w,K)=>(p(),h("div",{key:K,class:"pn-row",title:w.name||w.source},[o("span",yv,[o("b",null,u(f(at)(w.name||w.source||"未命名资料",34)),1),o("span",bv,u(w.year||"年份未知"),1)])],8,_v))),128))])]),o("div",kv,[o("div",$v,[$[20]||($[20]=V("能力清单 ",-1)),o("em",null,u(f(t).abilities.length),1)]),f(t).abilities.length?(p(),h("div",Sv,[(p(!0),h(U,null,se(f(t).abilities,w=>(p(),h("button",{key:w,class:ae(["pn-chip",{on:L.value===w}]),onClick:K=>te(w)},u(w),11,Cv))),128))])):(p(),h("div",wv,"后端没有返回能力清单。")),T.value==="busy"?(p(),h("div",xv,"编译中…")):T.value==="err"?(p(),h("div",Mv,"编译失败:"+u(A.value),1)):x.value?(p(),h("div",Tv,[x.value.available===!1?(p(),h("div",Ev,"HKC 未启用,无法编译能力。")):x.value.sufficient===!1?(p(),h(U,{key:1},[o("div",Av,[V(u(L.value),1),$[21]||($[21]=o("span",{class:"v"},"知识不足",-1))]),o("div",Ov,u(x.value.reason||"覆盖不足,暂不授予该能力。"),1),(x.value.missing_skills||[]).length?(p(),h("div",Iv,[(p(!0),h(U,null,se(x.value.missing_skills,w=>(p(),h("span",{key:w,class:"pn-chip warn"},u(w),1))),128))])):N("",!0)],64)):x.value.ability?(p(),h(U,{key:2},[o("div",Pv,[V(u(x.value.ability.display_name||L.value)+" ",1),o("span",Lv,u(x.value.ability.version||""),1)]),o("div",Rv,u(x.value.ability.domain||"未分域")+" · 覆盖 "+u(Z(x.value.ability.coverage)||"—"),1),(p(!0),h(U,null,se(x.value.ability.skills||[],w=>(p(),h("div",{key:w.skill_key,class:"pn-row"},[o("span",Nv,[o("b",null,u(w.display_name||w.skill_key),1),o("span",Dv,u(w.concept_hits??0)+" 个概念命中",1)]),o("span",Fv,u(Z(w.coverage)),1)]))),128)),(p(!0),h(U,null,se(x.value.ability.workflows||[],(w,K)=>(p(),h("div",{key:"w"+K,class:"pn-row"},[o("span",jv,[o("b",null,u(w),1)])]))),128))],64)):N("",!0)])):N("",!0)]),$[22]||($[22]=o("div",{class:"pn-note"},[V(" 录入走 "),o("code",null,"POST /api/knowledge/ingest"),V("(KDE 抽取 → KEE 演化), 列表读 "),o("code",null,"/api/knowledge/recent"),V(";书籍走知识星球。 ")],-1))]),_:1},8,["state","ready"]))}},Uv=Ne(Kv,[["__scopeId","data-v-11ecf8c3"]]),Vv={class:"pn-kpi"},Hv={class:"rv-grid"},Bv={class:"pn-h"},qv={key:0},zv={key:1},Wv={key:0,class:"card"},Jv={class:"ct"},Gv={class:"pn-tag"},Yv={class:"dim"},Xv={key:0,class:"pn-tag new"},Qv={key:1,class:"dim"},Zv={key:0,class:"sum"},e1={key:1,class:"src"},t1={class:"grades"},s1={key:2,class:"err"},n1={key:1,class:"done"},o1={key:0},l1={key:2,class:"idle"},i1={key:0},r1={key:1,class:"dim"},a1={key:2,class:"dim"},c1={class:"side"},u1=["viewBox"],d1=["y1","y2"],f1=["d"],p1=["cx","cy"],h1={class:"axis"},g1={class:"dim"},m1={class:"pn-h",style:{"margin-top":"16px"}},v1={class:"load"},_1=["onClick"],y1={class:"m"},b1={class:"s"},yn=620,ps=130,Rs=30,k1={__name:"ReviewPanel",setup(e){const t=Ge.review,s=G("");Re(()=>dt("review"));const n=Q(()=>t.stats||{}),l=Q(()=>t.queue[t.index]||null),i=Q(()=>t.queue.length),r=Q(()=>Math.min(t.index+1,i.value)),a=Q(()=>Math.round((n.value.avg_mastery||0)*100)),c=Q(()=>(n.value.due||0)+(n.value.fresh||0)),d=Q(()=>{const I=l.value,_=I?.interval||0,E=I?.ease_factor||2.5,L=_>0?9.49*_*(E/2.5):1.2,T=[];for(let te=0;te<=Rs;te+=.5){const Z=Math.exp(-te/L);T.push(`${(te/Rs*yn).toFixed(1)},${(ps-Z*ps).toFixed(1)}`)}const A=I?.days_until_due??0,x=_>0&&A<=Rs;return{path:`M${T.join(" L")}`,s:L,due:x?{x:A/Rs*yn,y:ps-Math.exp(-A/L)*ps}:null,now:{x:0,y:0}}}),g=Q(()=>{const I=l.value;if(!I||!I.interval)return"新卡:曲线是「不复习就忘」的示意";const _=I.due_in_hours||0,E=_<=0?"已到期":_<24?`${Math.round(_)} 小时后`:`${I.days_until_due} 天后`;return`S≈${d.value.s.toFixed(1)} 天 · 下次 ${E}`}),m=Q(()=>{const I=n.value.load7?.by_day||{};return Array.from({length:7},(_,E)=>({d:E,n:I[E]??I[String(E)]??0}))}),b=Q(()=>Math.max(1,...m.value.map(I=>I.n)));async function y(I){s.value="";try{await up(I)}catch(_){s.value=String(_?.message||_)}}return(I,_)=>(p(),je(Jt,{title:"复习",tag:"SM-2",state:f(t).state,ready:f(t).state==="ok",onRefresh:_[7]||(_[7]=E=>f(qe)("review"))},{default:yt(()=>[o("div",Vv,[o("div",null,[o("b",null,u(n.value.cards),1),_[8]||(_[8]=o("span",null,"复习卡",-1))]),o("div",null,[o("b",null,u(n.value.due),1),_[9]||(_[9]=o("span",null,"今日到期",-1))]),o("div",null,[o("b",null,u(n.value.fresh),1),_[10]||(_[10]=o("span",null,"新卡",-1))]),o("div",null,[o("b",null,u(a.value)+"%",1),_[11]||(_[11]=o("span",null,"平均掌握",-1))])]),o("div",Hv,[o("section",null,[o("div",Bv,[_[12]||(_[12]=V(" 学习卡 ",-1)),f(t).session==="running"?(p(),h("em",qv,u(r.value)+" / "+u(i.value),1)):(p(),h("em",zv,"队列 "+u(i.value)+" 张",1))]),f(t).session==="running"&&l.value?(p(),h("div",Wv,[o("div",Jv,[o("span",Gv,u(l.value.ku_type),1),o("span",Yv,u(l.value.domain||"未分域"),1),l.value.is_new?(p(),h("span",Xv,"新卡")):(p(),h("span",Qv,"第 "+u((l.value.repetitions||0)+1)+" 次",1))]),o("h3",null,u(l.value.name),1),f(t).revealed?(p(),h(U,{key:0},[l.value.summary&&l.value.summary!==l.value.name?(p(),h("p",Zv,u(l.value.summary),1)):N("",!0),l.value.text?(p(),h("p",e1,u(l.value.text),1)):N("",!0),o("div",t1,[o("button",{class:"g g0",onClick:_[0]||(_[0]=E=>y(0))},[..._[13]||(_[13]=[V("忘记",-1),o("span",null,"重新开始",-1)])]),o("button",{class:"g g3",onClick:_[1]||(_[1]=E=>y(3))},[..._[14]||(_[14]=[V("模糊",-1),o("span",null,"间隔不涨",-1)])]),o("button",{class:"g g4",onClick:_[2]||(_[2]=E=>y(4))},[..._[15]||(_[15]=[V("记得",-1),o("span",null,"正常推进",-1)])]),o("button",{class:"g g5",onClick:_[3]||(_[3]=E=>y(5))},[..._[16]||(_[16]=[V("轻松",-1),o("span",null,"EF +0.1",-1)])])])],64)):(p(),h(U,{key:1},[_[17]||(_[17]=o("p",{class:"hint"},"先在心里回想一遍,再显示答案。凭印象评分,不要凭「刚才看过」。",-1)),o("button",{class:"act",onClick:_[4]||(_[4]=E=>f(cp)())},"显示答案")],64)),s.value?(p(),h("p",s1,u(s.value),1)):N("",!0)])):f(t).session==="done"?(p(),h("div",n1,[_[18]||(_[18]=o("b",null,"这一轮过完了",-1)),f(t).lastMsg?(p(),h("p",o1,u(f(t).lastMsg),1)):N("",!0),_[19]||(_[19]=o("p",{class:"dim"},"下一轮按 SM-2 排期,到期的会重新出现在这里。",-1)),o("button",{class:"act",onClick:_[5]||(_[5]=E=>f(Ro)())},"再来一轮")])):(p(),h("div",l1,[c.value?(p(),h("p",i1,[_[20]||(_[20]=V(" 今日待办:",-1)),o("b",null,u(n.value.due),1),_[21]||(_[21]=V(" 张到期 + ",-1)),o("b",null,u(n.value.fresh),1),_[22]||(_[22]=V(" 张新卡 ",-1))])):n.value.cards?(p(),h("p",a1,"今天的卡都过完了。明天再来,间隔会按 SM-2 自然拉长。")):(p(),h("p",r1," 还没有复习卡。在右栏上部或学习库录一句知识,抽取出的知识单元会自动变成卡。 ")),c.value?(p(),h("button",{key:3,class:"act",onClick:_[6]||(_[6]=E=>f(Ro)())}," 开始复习 "+u(Math.min(c.value,20))+" 张 ",1)):N("",!0)]))]),o("aside",c1,[_[26]||(_[26]=o("div",{class:"pn-h"},[V("遗忘曲线 "),o("em",null,"R = e^(−t/S)")],-1)),(p(),h("svg",{class:"curve",viewBox:`0 0 ${yn} ${ps}`,preserveAspectRatio:"none"},[o("line",{class:"ref",x1:"0",y1:ps*.1,x2:yn,y2:ps*.1},null,8,d1),o("path",{class:"line",d:d.value.path},null,8,f1),d.value.due?(p(),h("circle",{key:0,class:"dot",cx:d.value.due.x,cy:d.value.due.y,r:"4"},null,8,p1)):N("",!0)],8,u1)),o("div",h1,[_[23]||(_[23]=o("span",null,"今天",-1)),o("span",g1,u(g.value),1),o("span",null,"+"+u(Rs)+" 天")]),_[27]||(_[27]=o("p",{class:"note"}," 排期规则:答「忘记」重置为 1 天;答「记得 / 轻松」按 1 → 6 → 16 天递进, EF 每次 ±0.1 微调,间隔随熟练度拉长。 ",-1)),_[28]||(_[28]=o("p",{class:"note warn"}," 进度存在知识单元自身,和知识星球共用同一个库。所以在星球里「按来源删除」删掉的 卡片,进度会一起消失;清库接口会清空全部知识与进度。 ",-1)),o("div",m1,[_[24]||(_[24]=V(" 未来 7 天 ",-1)),o("em",null,u(n.value.load7?.total_due||0)+" 张",1)]),o("div",v1,[(p(!0),h(U,null,se(m.value,E=>(p(),h("div",{key:E.d,class:"bar"},[o("i",{style:Et({height:`${Math.max(2,E.n/b.value*34)}px`}),class:ae({zero:!E.n})},null,6),o("span",null,u(E.d===0?"今":`+${E.d}`),1),o("em",null,u(E.n),1)]))),128))]),n.value.risk?.length?(p(),h(U,{key:0},[_[25]||(_[25]=o("div",{class:"pn-h",style:{"margin-top":"16px"}},"遗忘风险",-1)),(p(!0),h(U,null,se(n.value.risk,E=>(p(),h("button",{key:E.item_id,class:"pn-row clickable",onClick:L=>f(an)(E.item_id)},[o("span",y1,[o("b",null,u(E.name||E.item_id),1),o("span",b1,u(E.reason),1)])],8,_1))),128))],64)):N("",!0)])])]),_:1},8,["state","ready"]))}},$1=Ne(k1,[["__scopeId","data-v-1a353dab"]]),w1={class:"pn-kpi"},S1={key:0,class:"pn-st err"},C1={class:"pn-cols"},x1={class:"pn-sec"},M1={class:"pn-h"},T1={key:0,class:"pn-empty"},E1=["onClick"],A1={class:"m"},O1={class:"s"},I1={key:0,class:"pn-tag"},P1={class:"r"},L1={class:"pn-sec"},R1={class:"pn-h"},N1={key:0,class:"pn-empty"},D1={class:"m"},F1={class:"r"},j1={class:"pn-h sec-gap"},K1={key:1,class:"pn-empty"},U1={class:"m"},V1={class:"s"},H1=["disabled","onClick"],B1={class:"pn-note"},q1={__name:"MemoryPanel",setup(e){const t=Ge.memory,s=G(""),n=G("");Re(()=>dt("memory"));const l=Q(()=>!!t.stats.backend),i=Q(()=>Object.entries(t.stats.by_agent||{}));function r(c){Qn({id:`mem:${c.id}`,kind:"text",lang:"markdown",title:c.title||c.id,path:`memory/${c.id}.md`,meta:`${c.type||"记忆"} · ${c.agent||"—"} · ${Rn(c.created_at)}`,content:c.summary||"(无摘要)"})}async function a(c){n.value=c.id,s.value="";try{await dp(c.id)}catch(d){s.value=String(d.message||d)}n.value=""}return(c,d)=>(p(),je(Jt,{title:"记忆中心",tag:"Memory",state:f(t).state,ready:l.value,onRefresh:d[0]||(d[0]=g=>f(qe)("memory"))},{default:yt(()=>[o("div",w1,[o("div",null,[o("b",null,u(f(Te)(f(t).stats.total_memories??0)),1),d[1]||(d[1]=o("span",null,"记忆条目",-1))]),o("div",null,[o("b",null,u(f(Te)(f(t).stats.relations??0)),1),d[2]||(d[2]=o("span",null,"关联",-1))]),o("div",null,[o("b",null,u(f(Te)(f(t).stats.shared??0)),1),d[3]||(d[3]=o("span",null,"共享",-1))]),o("div",null,[o("b",null,u(f(Te)(f(t).stats.private??0)),1),d[4]||(d[4]=o("span",null,"私有",-1))]),o("div",null,[o("b",null,u(f(Te)(f(t).prefs.length)),1),d[5]||(d[5]=o("span",null,"用户偏好",-1))])]),s.value?(p(),h("div",S1,u(s.value),1)):N("",!0),o("div",C1,[o("div",x1,[o("div",M1,[d[6]||(d[6]=V("最近记忆 ",-1)),o("em",null,u(f(t).recent.length),1)]),f(t).recent.length?N("",!0):(p(),h("div",T1," 还没有记忆。聊过的内容会被 HMR 提炼成记忆条目,这里能看到最新的几条。 ")),(p(!0),h(U,null,se(f(t).recent,g=>(p(),h("div",{key:g.id,class:"pn-row clickable",title:"点击看全文",onClick:m=>r(g)},[o("span",A1,[o("b",null,u(f(at)(g.title||g.id,40)),1),o("span",O1,u(g.type||"记忆")+" · "+u(g.agent||"—"),1)]),g.shared?(p(),h("span",I1,"共享")):N("",!0),o("span",P1,u(f(Rn)(g.created_at)),1)],8,E1))),128))]),o("div",L1,[o("div",R1,[d[7]||(d[7]=V("按 Agent ",-1)),o("em",null,u(i.value.length),1)]),i.value.length?N("",!0):(p(),h("div",N1,"没有按 Agent 的分布数据。")),(p(!0),h(U,null,se(i.value,([g,m])=>(p(),h("div",{key:g,class:"pn-row"},[o("span",D1,[o("b",null,u(g),1)]),o("span",F1,u(m),1)]))),128)),o("div",j1,[d[8]||(d[8]=V("用户偏好 ",-1)),o("em",null,u(f(t).prefs.length),1)]),f(t).prefs.length?N("",!0):(p(),h("div",K1," 还没有记录偏好。你对 Agent 说过的长期设定会落在这里,误存的可以就地删掉。 ")),(p(!0),h(U,null,se(f(t).prefs,g=>(p(),h("div",{key:g.id,class:"pn-row"},[o("span",U1,[o("b",null,u(f(at)(g.content||g.id,40)),1),o("span",V1,u(g.id),1)]),o("button",{class:"del",disabled:n.value===g.id,title:"删除这条偏好",onClick:Je(m=>a(g),["stop"])}," 删除 ",8,H1)]))),128))])]),o("div",B1,[d[9]||(d[9]=V(" 后端 ",-1)),o("code",null,u(f(t).stats.backend||"—"),1),V(" v"+u(f(t).stats.version||"—")+" · 向量 ",1),o("code",null,u(f(t).stats.embedding||"—"),1),d[10]||(d[10]=V("。 数据来自 ",-1)),d[11]||(d[11]=o("code",null,"/api/memory/stats",-1)),d[12]||(d[12]=V("、",-1)),d[13]||(d[13]=o("code",null,"/api/memory/recent",-1)),d[14]||(d[14]=V("、",-1)),d[15]||(d[15]=o("code",null,"/api/preferences",-1)),d[16]||(d[16]=V("。 ",-1))])]),_:1},8,["state","ready"]))}},z1=Ne(q1,[["__scopeId","data-v-6518b64e"]]),Ae=nt({providers:[],custom:[],current:null,state:"idle",err:""});let Xl=!1;async function ns(e=!1){if(!(Xl&&!e)){Ae.state="loading";try{const t=await de("/llm/models");Ae.providers=t.providers||[],Ae.custom=t.custom||[],Ae.current=t.current||null,Ae.state="ok",Xl=!0}catch(t){Ae.state="error",Ae.err=t.message}}}function No(){const e=Ae.current;if(!e)return{name:"Auto",color:"#7e93b8",sub:"跟随 .env 默认"};if(e.source==="custom"){const s=Ae.custom.find(n=>n.name===e.name);return{name:e.name,color:"#a78bfa",sub:s?s.model:"自定义"}}const t=Ae.providers.find(s=>s.provider===e.provider);return{name:t?t.label:e.provider,color:t?t.color:"#7e93b8",sub:e.provider}}async function Or({source:e,provider:t=null,name:s=null}){const n={source:e};t&&(n.provider=t),s&&(n.name=s);const l=await et("/llm/select",n);return Ae.current=l.current||null,l}function W1(){const e=Ae.current,t=[{source:"auto",key:"auto",label:"Auto",sub:"跟随 .env 默认",color:"#7e93b8",active:!e}];for(const s of Ae.providers)t.push({source:"preset",key:s.provider,label:s.label||s.provider,sub:s.provider,color:s.color||"#7e93b8",configured:s.configured!==!1,active:!!e&&e.source!=="custom"&&e.provider===s.provider});for(const s of Ae.custom)t.push({source:"custom",key:s.name,label:s.name,sub:s.model||"自定义",color:"#a78bfa",active:!!e&&e.source==="custom"&&e.name===s.name});return t}async function J1(e){await et("/llm/custom/add",e),await ns(!0)}async function Ql(e){return et("/llm/test",e)}async function G1(e){return de(`/llm/custom/${encodeURIComponent(e)}`)}async function Y1(e,t){await gr(`/llm/custom/${encodeURIComponent(e)}`,t),await ns(!0)}async function X1(e){await ln(`/llm/custom/${encodeURIComponent(e)}`),Ae.current&&Ae.current.name===e&&(Ae.current=null),await ns(!0)}const Fe=nt({nickname:"",loaded:!1,saving:!1});async function Ir(e=!1){if(Fe.loaded&&!e)return Fe;try{const t=await de("/profile");Fe.nickname=t.nickname||"",Fe.loaded=!0}catch{}return Fe}async function Pr(e){Fe.saving=!0;try{const t=await gr("/profile",{nickname:e||""});return Fe.nickname=t.nickname||"",Fe.loaded=!0,Fe.nickname}finally{Fe.saving=!1}}var Zl={git:{sha:"532d884",ts:1794406408e3}};const Q1={class:"card"},Z1={class:"grp"},e_=["aria-expanded"],t_={class:"ic"},s_={viewBox:"0 0 24 24"},n_=["d"],o_={class:"m"},l_={class:"hint"},i_={key:0,class:"sub"},r_=["onClick"],a_={class:"m"},c_={key:0,class:"pn-tag green"},u_={key:1,class:"pn-tag amber"},d_={class:"tip"},f_={key:0,class:"tip err"},p_={class:"ic"},h_={viewBox:"0 0 24 24"},g_=["d"],m_={class:"m"},v_={class:"card"},__={class:"grp"},y_={class:"row static"},b_={class:"ic"},k_={viewBox:"0 0 24 24"},$_=["d"],w_={class:"m"},S_={class:"seg"},C_=["aria-expanded"],x_={class:"ic"},M_={viewBox:"0 0 24 24"},T_=["d"],E_={class:"m"},A_={class:"hint"},O_={key:0,class:"sub"},I_={class:"nick-edit"},P_=["placeholder","onKeydown"],L_=["disabled"],R_={class:"tip"},N_=["aria-expanded"],D_={class:"ic"},F_={viewBox:"0 0 24 24"},j_=["d"],K_={class:"m"},U_={class:"hint"},V_={key:1,class:"sub"},H_={class:"card"},B_={class:"grp"},q_={class:"row static"},z_={class:"ic"},W_={viewBox:"0 0 24 24"},J_=["d"],G_={class:"m"},Y_={class:"seg"},X_=["onClick"],Q_={class:"tip"},Z_={class:"card"},ey={class:"grp"},ty=["title"],sy={class:"ic"},ny={viewBox:"0 0 24 24"},oy=["d"],ly={class:"m"},iy={class:"row static"},ry={class:"ic"},ay={viewBox:"0 0 24 24"},cy=["d"],uy={class:"m"},dy={class:"foot"},fy={class:"mono"},py=["title"],hy={__name:"SettingsPanel",setup(e){const t=typeof Zl>"u"?null:Zl,s=t?.git?.sha||"dev",n=Q(()=>{const Z=t?.git?.ts||0;if(!Z)return M("settings.buildLocal");const j=Math.floor((Date.now()-Z)/864e5);return j<=0?M("settings.buildToday"):M("settings.buildDays",{n:j})}),l=G(""),i=G(null),r=G(""),a=Q(()=>No()),c=Q(()=>W1()),d=Q(()=>[["Enter",M("key.enter")],["Shift + Enter",M("key.shiftEnter")],["/",M("key.slash")],["@",M("key.at")],["↑ ↓",M("key.arrows")],["Esc",M("key.esc")],["Ctrl + ,",M("key.ctrlComma")]]),g=G("");Re(()=>{ns(),Io(),Ir().then(()=>{g.value=Fe.nickname}),E()});async function m(){try{await Pr(g.value),ue(Fe.nickname?M("settings.saidNick",{name:Fe.nickname}):M("settings.saidNickCleared")),l.value=""}catch(Z){ue(M("settings.errSaveNick",{msg:Z.message}),4e3)}}function b(Z){Mu(Z);const j=Pn.find($=>$.id===Z)?.label||Z;ue(M("settings.saidLang",{name:j}))}const y=Q(()=>mt.update||null),I=Q(()=>{const Z=y.value;return Z?Z.enabled?Z.update_available?M("settings.updAvailable",{v:Z.latest}):Z.latest?M("settings.updLatest"):Z.error?M("settings.updFailed"):M("settings.updPending"):M("settings.updNotEnabled"):"…"}),_=Q(()=>{const Z=y.value;return Z?Z.enabled?Z.error?M("settings.updHintError",{msg:Z.error}):Z.update_available?M("settings.updHintNew",{cur:Z.current,latest:Z.latest}):M("settings.updHintOk",{cur:Z.current}):M("settings.updHintOff"):M("common.loading")});async function E(){i.value=null;try{await de("/status"),i.value=!0}catch{i.value=!1}}async function L(){await ns(!0).catch(()=>{}),Io(!0),E()}async function T(Z){try{await Or({source:Z.source,provider:Z.source==="preset"?Z.key:null,name:Z.source==="custom"?Z.key:null}),l.value="",ue(M("settings.saidSwitched",{label:Z.label}))}catch(j){r.value=j.message,ue(M("settings.errSwitch",{msg:j.message}),4e3)}}function A(Z){Ln(Z),ue(M(Z==="stream"?"settings.saidStream":"settings.saidOrchestrate"))}const x={gear:["M12 9.2a2.8 2.8 0 1 0 0 5.6 2.8 2.8 0 0 0 0-5.6z","M12 3.2v2.2","M12 18.6v2.2","M3.2 12h2.2","M18.6 12h2.2","M5.8 5.8l1.6 1.6","M16.6 16.6l1.6 1.6","M18.2 5.8l-1.6 1.6","M7.4 16.6l-1.6 1.6"],gauge:["M3.6 15.6a8.4 8.4 0 1 1 16.8 0","M12 15.6l4.2-4.8"],chat:["M19.6 14.8a1.8 1.8 0 0 1-1.8 1.8H8.6L5 20v-3.4H6.2A1.8 1.8 0 0 1 4.4 14.8V6.4A1.8 1.8 0 0 1 6.2 4.6h11.6a1.8 1.8 0 0 1 1.8 1.8z"],keys:["M3.8 8.2h16.4v7.6H3.8z","M7 11h.01","M11 11h.01","M15 11h.01","M9 13.8h6"],server:["M4.4 5.4h15.2v4.8H4.4z","M4.4 13.8h15.2v4.8H4.4z","M7.4 7.8h.01","M7.4 16.2h.01"],globe:["M12 3.4a8.6 8.6 0 1 0 0 17.2 8.6 8.6 0 0 0 0-17.2z","M3.6 12h16.8","M12 3.4c2.2 2.4 3.4 5.4 3.4 8.6s-1.2 6.2-3.4 8.6c-2.2-2.4-3.4-5.4-3.4-8.6s1.2-6.2 3.4-8.6z"]},te=Z=>x[Z]||x.gear;return(Z,j)=>(p(),je(Jt,{title:f(M)("settings.title"),tag:"Settings",state:"idle",ready:!0,onRefresh:L},{default:yt(()=>[o("div",Q1,[o("div",Z1,u(f(M)("settings.groupModel")),1),o("button",{class:"row","aria-expanded":l.value==="model",onClick:j[0]||(j[0]=$=>l.value=l.value==="model"?"":"model")},[o("span",t_,[(p(),h("svg",s_,[(p(!0),h(U,null,se(te("gear"),($,w)=>(p(),h("path",{key:w,d:$},null,8,n_))),128))]))]),o("span",o_,[o("b",null,u(f(M)("settings.modelProvider")),1),o("span",null,u(f(M)("settings.modelProviderSub")),1)]),o("span",l_,[o("i",{class:"dot",style:Et({background:a.value.color})},null,4),V(u(a.value.name),1)]),o("span",{class:ae(["chev",{open:l.value==="model"}])},"›",2)],8,e_),l.value==="model"?(p(),h("div",i_,[(p(!0),h(U,null,se(c.value,$=>(p(),h("button",{key:`${$.source}-${$.key}`,class:ae(["opt",{on:$.active}]),onClick:w=>T($)},[o("span",{class:"dot",style:Et({background:$.color})},null,4),o("span",a_,[o("b",null,u($.label),1),o("span",null,u($.sub),1)]),$.active?(p(),h("span",c_,u(f(M)("settings.current")),1)):$.configured===!1?(p(),h("span",u_,u(f(M)("settings.unconfigured")),1)):N("",!0)],10,r_))),128)),o("p",d_,u(f(M)("settings.providerNote")),1),r.value?(p(),h("p",f_,u(r.value),1)):N("",!0)])):N("",!0),o("button",{class:"row",onClick:j[1]||(j[1]=$=>f(zt)("usage"))},[o("span",p_,[(p(),h("svg",h_,[(p(!0),h(U,null,se(te("gauge"),($,w)=>(p(),h("path",{key:w,d:$},null,8,g_))),128))]))]),o("span",m_,[o("b",null,u(f(M)("settings.usage")),1),o("span",null,u(f(M)("settings.usageSub")),1)]),j[7]||(j[7]=o("span",{class:"chev"},"›",-1))])]),o("div",v_,[o("div",__,u(f(M)("settings.groupChat")),1),o("div",y_,[o("span",b_,[(p(),h("svg",k_,[(p(!0),h(U,null,se(te("chat"),($,w)=>(p(),h("path",{key:w,d:$},null,8,$_))),128))]))]),o("span",w_,[o("b",null,u(f(M)("settings.mode")),1),o("span",null,u(f(M)("settings.modeSub")),1)]),o("span",S_,[o("button",{class:ae({on:f(B).mode==="stream"}),onClick:j[2]||(j[2]=$=>A("stream"))},u(f(M)("settings.stream")),3),o("button",{class:ae({on:f(B).mode==="orchestrate"}),onClick:j[3]||(j[3]=$=>A("orchestrate"))},u(f(M)("settings.orchestrate")),3)])]),o("button",{class:"row","aria-expanded":l.value==="nick",onClick:j[4]||(j[4]=$=>l.value=l.value==="nick"?"":"nick")},[o("span",x_,[(p(),h("svg",M_,[(p(!0),h(U,null,se(te("chat"),($,w)=>(p(),h("path",{key:w,d:$},null,8,T_))),128))]))]),o("span",E_,[o("b",null,u(f(M)("settings.nickname")),1),o("span",null,u(f(M)("settings.nicknameSub")),1)]),o("span",A_,u(f(Fe).nickname||f(M)("common.notSet")),1),o("span",{class:ae(["chev",{open:l.value==="nick"}])},"›",2)],8,C_),l.value==="nick"?(p(),h("div",O_,[o("div",I_,[he(o("input",{"onUpdate:modelValue":j[5]||(j[5]=$=>g.value=$),class:"nick-in",maxlength:"24",placeholder:f(M)("settings.nicknamePh"),onKeydown:$s(Je(m,["prevent"]),["enter"])},null,40,P_),[[me,g.value]]),o("button",{class:"nick-save",disabled:f(Fe).saving,onClick:m},u(f(M)("common.save")),9,L_)]),o("p",R_,u(f(M)("settings.nicknameNote")),1)])):N("",!0),o("button",{class:"row","aria-expanded":l.value==="keys",onClick:j[6]||(j[6]=$=>l.value=l.value==="keys"?"":"keys")},[o("span",D_,[(p(),h("svg",F_,[(p(!0),h(U,null,se(te("keys"),($,w)=>(p(),h("path",{key:w,d:$},null,8,j_))),128))]))]),o("span",K_,[o("b",null,u(f(M)("settings.shortcuts")),1),o("span",null,u(f(M)("settings.shortcutsSub")),1)]),o("span",U_,u(f(M)("common.count",{n:d.value.length})),1),o("span",{class:ae(["chev",{open:l.value==="keys"}])},"›",2)],8,N_),l.value==="keys"?(p(),h("div",V_,[(p(!0),h(U,null,se(d.value,$=>(p(),h("div",{key:$[0],class:"kv"},[o("kbd",null,u($[0]),1),o("span",null,u($[1]),1)]))),128))])):N("",!0)]),o("div",H_,[o("div",B_,u(f(M)("settings.groupUi")),1),o("div",q_,[o("span",z_,[(p(),h("svg",W_,[(p(!0),h(U,null,se(te("globe"),($,w)=>(p(),h("path",{key:w,d:$},null,8,J_))),128))]))]),o("span",G_,[o("b",null,u(f(M)("settings.language")),1),o("span",null,u(f(M)("settings.languageSub")),1)]),o("span",Y_,[(p(!0),h(U,null,se(f(Pn),$=>(p(),h("button",{key:$.id,class:ae({on:f(rn).locale===$.id}),onClick:w=>b($.id)},u($.label),11,X_))),128))])]),o("p",Q_,u(f(M)("settings.languageNote")),1)]),o("div",Z_,[o("div",ey,u(f(M)("settings.groupSystem")),1),o("button",{class:"row",title:i.value?f(M)("settings.reprobe"):f(M)("settings.retry"),onClick:E},[o("span",sy,[(p(),h("svg",ny,[(p(!0),h(U,null,se(te("server"),($,w)=>(p(),h("path",{key:w,d:$},null,8,oy))),128))]))]),o("span",ly,[o("b",null,u(f(M)("settings.backend")),1),o("span",null,"/api · "+u(i.value===null?f(M)("settings.probing"):i.value?f(M)("common.online"):f(M)("common.offlineShort")),1)]),o("span",{class:ae(["pn-tag",i.value?"green":i.value===!1?"amber":""])},u(i.value===null?"…":i.value?f(M)("settings.ok"):f(M)("settings.retry")),3)],8,ty),o("div",iy,[o("span",ry,[(p(),h("svg",ay,[(p(!0),h(U,null,se(te("gauge"),($,w)=>(p(),h("path",{key:w,d:$},null,8,cy))),128))]))]),o("span",uy,[o("b",null,u(f(M)("settings.updates")),1),o("span",null,u(_.value),1)]),o("span",{class:ae(["pn-tag",y.value?.update_available?"amber":""])},u(I.value),3)])]),o("div",dy,[o("span",fy,"git@"+u(f(s))+" · "+u(n.value),1),o("span",{class:"dev",title:f(M)("settings.buildLocal")},"▭",8,py)])]),_:1},8,["title"]))}},gy=Ne(hy,[["__scopeId","data-v-01d0339a"]]),my={class:"stage"},vy={key:0,class:"tabs"},_y={class:"t"},yy=["title"],by={key:2,class:"core"},ky={key:1,class:"core-empty"},$y={class:"hero"},wy={class:"hero-t"},Sy={class:"core-cap"},Cy={key:0,class:"ask-nick"},xy={class:"an-q"},My=["placeholder","onKeydown"],Ty=["disabled"],Ey=["title"],Ay={class:"tries"},Oy=["onClick"],Iy={class:"rl"},Py={class:"rm"},Ly={key:2,class:"recent"},Ry={class:"rh"},Ny={class:"rk-list"},Dy=["title","onClick"],Fy={__name:"Stage",setup(e){const t={activity:Rp,tasks:Wp,agents:uh,tools:em,usage:Em,knowledge:Uv,review:$1,memory:z1,settings:gy},s=Q(()=>t[ee.module]||null),n=Q(()=>!!ee.doc),l=Q(()=>[M("hero.q1"),M("hero.q2"),M("hero.q3")]),i=G([]),r=G(""),a=G(localStorage.getItem("sfx.nick.skip")==="1"),c=Q(()=>Fe.loaded&&!Fe.nickname&&!a.value);Re(async()=>{Ir().then(()=>{r.value=Fe.nickname}),ee.sessions.length||Xn().catch(()=>{});const y=await de("/knowledge/recent?limit=5").catch(()=>null);i.value=y?.kus||[]});async function d(){const y=r.value.trim();if(y)try{await Pr(y),ue(M("hero.saidNick",{name:y}))}catch(I){ue(M("hero.errSave",{msg:I.message}),4e3)}}function g(){a.value=!0,localStorage.setItem("sfx.nick.skip","1")}const m=Q(()=>{const y=B.messages.length?ee.sessionId:"";return ee.sessions.find(I=>I.id!==y&&(I.message_count||0)>0)||null});function b(){const y=m.value;y&&($r(y),eo(y.id))}return(y,I)=>(p(),h("section",my,[n.value?(p(),h("div",vy,[f(ee).module!=="overview"?(p(),h("button",{key:0,class:ae(["tab",{on:!f(ee).doc}]),onClick:I[0]||(I[0]=_=>f(Oo)())},u(f(vs)(f(ee).module)),3)):N("",!0),f(ee).doc?(p(),h("button",{key:1,class:"tab on doc",onClick:I[1]||(I[1]=_=>f(Oo)())},[o("span",_y,u(f(ee).doc.title),1),o("span",{class:"x",title:f(M)("hero.close")},"✕",8,yy)])):N("",!0)])):N("",!0),o("div",{class:ae(["stage-body",{bare:!n.value}])},[f(ee).doc?(p(),je(bf,{key:0,doc:f(ee).doc},null,8,["doc"])):s.value?(p(),je(za(s.value),{key:f(ee).module})):(p(),h("div",by,[f(B).messages.length?(p(),je(Qf,{key:0})):(p(),h("div",ky,[o("div",$y,[o("div",wy,u(f(M)("hero.title")),1),o("div",Sy,u(f(M)("hero.cap")),1)]),c.value?(p(),h("div",Cy,[o("span",xy,u(f(M)("hero.askName")),1),he(o("input",{"onUpdate:modelValue":I[2]||(I[2]=_=>r.value=_),class:"an-in",maxlength:"24",placeholder:f(M)("hero.namePh"),onKeydown:$s(Je(d,["prevent"]),["enter"])},null,40,My),[[me,r.value]]),o("button",{class:"an-ok",disabled:f(Fe).saving||!r.value.trim(),onClick:d},u(f(M)("hero.confirm")),9,Ty),o("button",{class:"an-skip",title:f(M)("hero.skipTip"),onClick:g},u(f(M)("hero.skip")),9,Ey)])):N("",!0),o("div",Ay,[(p(!0),h(U,null,se(l.value,_=>(p(),h("button",{key:_,class:"try",onClick:E=>f(el)(_)},[I[3]||(I[3]=o("span",{class:"arrow"},"→",-1)),V(u(_),1)],8,Oy))),128))]),m.value?(p(),h("button",{key:1,class:"resume",onClick:b},[o("span",Iy,u(f(M)("hero.resume")),1),o("b",null,u(f(at)(m.value.title||f(M)("hero.untitled"),28)),1),o("span",Py,u(f(M)("hero.msgs",{n:m.value.message_count})),1)])):N("",!0),i.value.length?(p(),h("div",Ly,[o("div",Ry,u(f(M)("hero.recentKnowledge")),1),o("div",Ny,[(p(!0),h(U,null,se(i.value,_=>(p(),h("button",{key:_.ku_id,class:"rk",title:_.summary||_.name,onClick:E=>f(an)(_.ku_id)},u(f(at)(_.name||_.ku_id,30)),9,Dy))),128))])])):N("",!0)]))]))],2)]))}},jy=Ne(Fy,[["__scopeId","data-v-31f35103"]]),Ky={class:"cm"},Uy={class:"cm-h"},Vy=["onMouseenter","onMousedown"],Hy={key:0},By={key:0,class:"cm-empty"},qy={__name:"ComposerMenu",props:{items:{type:Array,default:()=>[]},index:{type:Number,default:0},hint:{type:String,default:""}},emits:["pick","hover"],setup(e){return(t,s)=>(p(),h("div",Ky,[o("div",Uy,u(e.hint),1),(p(!0),h(U,null,se(e.items,(n,l)=>(p(),h("button",{key:`${n.label}-${l}`,class:ae(["cm-it",{on:l===e.index}]),onMouseenter:i=>t.$emit("hover",l),onMousedown:Je(i=>t.$emit("pick",l),["prevent"])},[o("b",null,u(n.label),1),o("span",null,u(n.desc),1),n.tag?(p(),h("em",Hy,u(n.tag),1)):N("",!0)],42,Vy))),128)),e.items.length?N("",!0):(p(),h("div",By,"没有匹配项")),s[0]||(s[0]=o("div",{class:"cm-f"},"↑↓ 选择 · Enter 确认 · Esc 关闭",-1))]))}},zy=Ne(qy,[["__scopeId","data-v-d6468d56"]]),Wy=["title"],Jy={class:"nm"},Gy={key:0,class:"pop"},Yy={key:0,class:"tg"},Xy={key:0,class:"empty"},Qy={key:1,class:"empty"},Zy=["onClick"],eb={key:0,class:"tg"},tb={key:1,class:"tg warn"},sb=["disabled","onClick"],nb=["onClick"],ob={key:0,class:"tg"},lb=["disabled","onClick"],ib=["onClick"],rb=["onClick"],ab={key:4,class:"tres"},cb={class:"foot"},ub={class:"fhead"},db=["disabled"],fb=["placeholder"],pb=["disabled"],hb={__name:"ModelPicker",setup(e){const t=G(!1),s=G(null),n=G(null),l=G(!1),i=Q(No);Re(ns);function r(){t.value=!t.value,t.value&&(n.value=null,ns(!0))}function a(T){s.value&&!s.value.contains(T.target)&&(t.value=!1)}Re(()=>document.addEventListener("mousedown",a,!0)),ws(()=>document.removeEventListener("mousedown",a,!0));async function c(T){if(!l.value){l.value=!0;try{await Or(T),t.value=!1,ue(`已切换到 ${No().name}`)}catch(A){ue(`切换失败:${A.message}`)}finally{l.value=!1}}}function d(){n.value={edit:!1,name:"",base_url:"",api_key:"",model:"",note:""}}async function g(T){l.value=!0;try{const A=await G1(T.name);n.value={edit:!0,original:A.name||T.name,name:A.name||T.name,base_url:A.base_url||"",api_key:"",model:A.model||"",note:A.note||"",has_key:!!A.has_key}}catch(A){ue(`读取失败:${A.message}`)}finally{l.value=!1}}async function m(){const T=n.value;if(!T.name.trim()||!T.base_url.trim()||!T.model.trim())return ue("名称 / Base URL / 模型 ID 都必填");if(!T.edit&&!T.api_key.trim())return ue("Key 必填");l.value=!0;try{if(T.edit){const A={base_url:T.base_url.trim(),model:T.model.trim(),note:T.note||""};T.api_key.trim()&&(A.api_key=T.api_key.trim()),await Y1(T.original,A),ue("已保存修改")}else await J1({name:T.name.trim(),base_url:T.base_url.trim(),api_key:T.api_key.trim(),model:T.model.trim(),note:T.note||""}),ue("已添加自定义模型");n.value=null}catch(A){ue(`${T.edit?"保存":"添加"}失败:${A.message}`)}finally{l.value=!1}}const b=G("idle"),y=G(""),I=G("");async function _(T,A){if(b.value!=="busy"){b.value="busy",y.value=`${T}:${A||""}`,I.value="";try{const x=T==="custom"?await Ql({source:"custom",name:A}):await Ql({source:"preset",provider:A});x.ok?(b.value="ok",I.value=`${x.latency_ms??"?"}ms · ${x.model||A}${x.reply?` · ${String(x.reply).slice(0,40)}`:""}`):(b.value="err",I.value=x.error||"测试失败")}catch(x){b.value="err",I.value=String(x.message||x)}}}async function E(T){if(confirm(`删除自定义模型「${T.name}」?`))try{await X1(T.name),ue("已删除")}catch(A){ue(`删除失败:${A.message}`)}}function L(T,A){const x=Ae.current;return x?x.source!==T?!1:T==="preset"?x.provider===A:x.name===A:T==="auto"}return(T,A)=>(p(),h("div",{ref_key:"root",ref:s,class:"mp"},[o("button",{class:ae(["pill",{on:t.value}]),title:`当前模型:${i.value.sub}`,onClick:r},[o("span",{class:"dot",style:Et({background:i.value.color,boxShadow:`0 0 6px ${i.value.color}`})},null,4),o("span",Jy,u(i.value.name),1),A[8]||(A[8]=o("span",{class:"caret"},"▾",-1))],10,Wy),t.value?(p(),h("div",Gy,[n.value?(p(),h("form",{key:1,class:"form",onSubmit:Je(m,["prevent"])},[o("div",ub,[V(u(n.value.edit?"编辑自定义模型":"添加自定义模型")+" ",1),o("span",{class:"x",onClick:A[2]||(A[2]=x=>n.value=null)},"✕")]),o("label",null,[A[14]||(A[14]=V("名称 ",-1)),he(o("input",{"onUpdate:modelValue":A[3]||(A[3]=x=>n.value.name=x),disabled:n.value.edit,placeholder:"我的 DeepSeek"},null,8,db),[[me,n.value.name]])]),o("label",null,[A[15]||(A[15]=V("Base URL",-1)),he(o("input",{"onUpdate:modelValue":A[4]||(A[4]=x=>n.value.base_url=x),placeholder:"https://api.deepseek.com/v1"},null,512),[[me,n.value.base_url]])]),o("label",null,[A[16]||(A[16]=V("API Key ",-1)),he(o("input",{"onUpdate:modelValue":A[5]||(A[5]=x=>n.value.api_key=x),type:"password",placeholder:n.value.edit?n.value.has_key?"留空 = 保留原 Key":"尚未设置,请填写":"sk-…"},null,8,fb),[[me,n.value.api_key]])]),o("label",null,[A[17]||(A[17]=V("模型 ID",-1)),he(o("input",{"onUpdate:modelValue":A[6]||(A[6]=x=>n.value.model=x),placeholder:"deepseek-chat"},null,512),[[me,n.value.model]])]),o("label",null,[A[18]||(A[18]=V("备注",-1)),he(o("input",{"onUpdate:modelValue":A[7]||(A[7]=x=>n.value.note=x),placeholder:"可选:这个模型用在哪 / 限速多少"},null,512),[[me,n.value.note]])]),o("button",{class:"submit",disabled:l.value},u(l.value?"保存中…":n.value.edit?"保存修改":"保存并保持未选中"),9,pb)],32)):(p(),h(U,{key:0},[o("button",{class:ae(["it",{on:L("auto")}]),onClick:A[0]||(A[0]=x=>c({source:"auto"}))},[A[9]||(A[9]=o("span",{class:"dot",style:{background:"#7e93b8"}},null,-1)),A[10]||(A[10]=o("span",{class:"tx"},[o("b",null,"Auto"),o("span",null,"跟随 .env 默认")],-1)),L("auto")?(p(),h("span",Yy,"当前")):N("",!0)],2),A[13]||(A[13]=o("div",{class:"sep"},"预置",-1)),f(Ae).state==="loading"?(p(),h("div",Xy,"加载中…")):f(Ae).state==="error"?(p(),h("div",Qy,"读取失败:"+u(f(Ae).err),1)):(p(!0),h(U,{key:2},se(f(Ae).providers,x=>(p(),h("div",{key:x.provider,class:ae(["it",{on:L("preset",x.provider),dis:!x.configured}])},[o("span",{class:"dot",style:Et({background:x.color,boxShadow:`0 0 6px ${x.color}`})},null,4),o("button",{class:"tx plain",onClick:te=>x.configured?c({source:"preset",provider:x.provider}):f(ue)(`${x.provider} 未在 .env 配置 Key`)},[o("b",null,u(x.label),1),o("span",null,u(x.provider),1)],8,Zy),L("preset",x.provider)?(p(),h("span",eb,"当前")):x.configured?N("",!0):(p(),h("span",tb,"未配置")),o("button",{class:"x",disabled:!x.configured||b.value==="busy",title:"连通性测试",onClick:Je(te=>_("preset",x.provider),["stop"])},u(b.value==="busy"&&y.value===`preset:${x.provider}`?"…":"测"),9,sb)],2))),128)),f(Ae).custom.length?(p(),h(U,{key:3},[A[12]||(A[12]=o("div",{class:"sep"},"自定义",-1)),(p(!0),h(U,null,se(f(Ae).custom,x=>(p(),h("div",{key:x.name,class:ae(["it",{on:L("custom",x.name)}])},[A[11]||(A[11]=o("span",{class:"dot",style:{background:"#a78bfa","box-shadow":"0 0 6px #a78bfa"}},null,-1)),o("button",{class:"tx plain",onClick:te=>c({source:"custom",name:x.name})},[o("b",null,u(x.name),1),o("span",null,[V(u(x.model),1),x.note?(p(),h(U,{key:0},[V(" · "+u(x.note),1)],64)):N("",!0)])],8,nb),L("custom",x.name)?(p(),h("span",ob,"当前")):N("",!0),o("button",{class:"x",disabled:b.value==="busy",title:"连通性测试",onClick:Je(te=>_("custom",x.name),["stop"])},u(b.value==="busy"&&y.value===`custom:${x.name}`?"…":"测"),9,lb),o("button",{class:"x",title:"编辑",onClick:Je(te=>g(x),["stop"])},"编",8,ib),o("span",{class:"x",title:"删除",onClick:te=>E(x)},"✕",8,rb)],2))),128))],64)):N("",!0),b.value==="busy"?(p(),h("div",ab,"测试中…")):I.value?(p(),h("div",{key:5,class:ae(["tres",b.value])},u(b.value==="ok"?"✓":"✕")+" "+u(I.value),3)):N("",!0),o("div",cb,[o("button",{class:"fbtn",onClick:d},"+ 添加自定义模型"),o("button",{class:"fbtn",title:"重新读取",onClick:A[1]||(A[1]=x=>f(ns)(!0))},"⟳")])],64))])):N("",!0)],512))}},gb=Ne(hb,[["__scopeId","data-v-1c7db88f"]]),mb={key:0,class:"pop"},vb=["onClick"],_b={class:"ic"},yb={class:"tx"},bb={class:"foot"},kb={__name:"ToolMenu",setup(e){const t=G(!1),s=G(null),n=G(null),l=G(null),i=G(null),r=G(null),a=Q(()=>[{ic:B.mode==="stream"?"⚡":"🔧",b:B.mode==="stream"?"流式对话":"编排任务",s:"点击切换模式",act:()=>Ln(B.mode==="stream"?"orchestrate":"stream")},{ic:"📎",b:"上传文件",s:"摄入知识库",act:()=>{d(),n.value?.click()}},{ic:"📁",b:"导入文件夹",s:"逐个摄入",act:()=>{d(),l.value?.click()}},{ic:"🖼",b:"附加图片",s:"发给视觉模型",act:()=>{d(),i.value?.click()}},{ic:"📄",b:"附件文件",s:"随问题发给 AI",act:()=>{d(),r.value?.click()}},{ic:"🔌",b:"技能 · 连接器",s:"到技能面板看全部",act:()=>{d(),zt("tools")}}]);function c(){t.value=!t.value}function d(){t.value=!1}bs(()=>Cr.ingestTick,()=>n.value?.click());function g(_){s.value&&!s.value.contains(_.target)&&d()}Re(()=>document.addEventListener("mousedown",g,!0)),ws(()=>document.removeEventListener("mousedown",g,!0));async function m(_){const E=_.target.files&&_.target.files[0];_.target.value="",E&&await Sr(E)}async function b(_){const E=[..._.target.files||[]];_.target.value="",E.length&&await td(E)}function y(_){const E=[..._.target.files||[]];_.target.value="",E.forEach(Qu),E.length&&ue(`已附加 ${E.length} 张图片`)}async function I(_){const E=[..._.target.files||[]];_.target.value="";for(const L of E)await Xu(L)}return(_,E)=>(p(),h("div",{ref_key:"root",ref:s,class:"tm"},[o("button",{class:ae(["plus",{on:t.value}]),title:"工具:模式 / 上传 / 文件夹 / 图片 / 附件 / 连接器",onClick:c}," + ",2),t.value?(p(),h("div",mb,[E[0]||(E[0]=o("div",{class:"sec"},"工具",-1)),(p(!0),h(U,null,se(a.value,(L,T)=>(p(),h("button",{key:T,class:"it",onClick:A=>L.act()},[o("span",_b,u(L.ic),1),o("span",yb,[o("b",null,u(L.b),1),o("span",null,u(L.s),1)])],8,vb))),128)),o("div",bb," 附件 "+u(f(B).attachments.length)+" · 图片 "+u(f(B).images.length)+" · "+u(f(B).mode==="stream"?"流式":"编排"),1)])):N("",!0),o("input",{ref_key:"inFile",ref:n,type:"file",hidden:"",accept:".pdf,.md,.txt,.epub,.mobi,.azw3,.docx,.xlsx",onChange:m},null,544),o("input",{ref_key:"inFolder",ref:l,type:"file",hidden:"",webkitdirectory:"",directory:"",multiple:"",onChange:b},null,544),o("input",{ref_key:"inImg",ref:i,type:"file",hidden:"",accept:"image/*",multiple:"",onChange:y},null,544),o("input",{ref_key:"inAttach",ref:r,type:"file",hidden:"",multiple:"",onChange:I},null,544)],512))}},$b=Ne(kb,[["__scopeId","data-v-28d25609"]]),wb={class:"dock"},Sb={class:"dock-in"},Cb={key:0,class:"chips"},xb=["title"],Mb={class:"cn"},Tb={class:"cs"},Eb=["onClick"],Ab=["title"],Ob=["src","alt"],Ib=["onClick"],Pb={class:"cn"},Lb={class:"cs"},Rb={class:"bar"},Nb={class:"wrap"},Db=["placeholder"],Fb=["title"],jb={key:0,class:"toast"},Kb=84,Ub={__name:"ChatDock",setup(e){const t=G(""),s=G(null),n=G(null),l=G(""),i=G(0),r=G([]),a=Q(()=>[{key:"/新建",desc:M("chat.cmd.new"),run:()=>to()},{key:"/流式",desc:M("chat.cmd.stream"),run:()=>{Ln("stream"),ue(M("chat.saidStream"))}},{key:"/任务",desc:M("chat.cmd.orchestrate"),run:()=>{Ln("orchestrate"),ue(M("chat.saidOrchestrate"))}},{key:"/搜索",desc:M("chat.cmd.search"),arg:!0},{key:"/摄入",desc:M("chat.cmd.ingest"),run:()=>id()},{key:"/设置",desc:M("chat.cmd.settings"),run:()=>zt("settings")},{key:"/停止",desc:M("chat.cmd.stop"),run:()=>Wl()},{key:"/清屏",desc:M("chat.cmd.clear"),run:()=>{B.messages=[]}},{key:"/帮助",desc:M("chat.cmd.help"),run:()=>rd(a.value.map($=>`${$.key.padEnd(6)} ${$.desc}`).join(`
|
|
33
|
-
`))}]),c=()=>B.streamState==="streaming",d=Q(()=>{const $=l.value.toLowerCase();return n.value==="slash"?a.value.filter(w=>w.key.slice(1).toLowerCase().includes($)||w.desc.includes(l.value)).map(w=>({label:w.key,desc:w.desc,tag:w.arg?M("chat.tagArg"):""})):n.value==="at"?r.value.filter(w=>w.label.toLowerCase().includes($)||(w.desc||"").includes(l.value)).slice(0,8):[]}),g=Q(()=>n.value==="slash"?M("chat.hintSlash"):M("chat.hintAt"));Re(async()=>{T(),window.addEventListener("resize",te);try{const[$,w]=await Promise.all([de("/ahs/md-skills").catch(()=>({})),de("/ahs/skills").catch(()=>({}))]);r.value=[...($.skills||[]).filter(K=>K.enabled!==!1).map(K=>({label:K.name,desc:K.description||"",tag:"技能"})),...(w.skills||[]).map(K=>({label:K.name||K.id,desc:K.description||"",tag:K.kind||"工具"}))]}catch{}}),ws(()=>window.removeEventListener("resize",te));function m(){const $=s.value;if(!$)return;const w=$.selectionStart??t.value.length,K=t.value.slice(0,w),X=/(^|\s)\/([^\s/]*)$/.exec(K);if(X){n.value!=="slash"&&(i.value=0),n.value="slash",l.value=X[2];return}const F=/(^|\s)@([^\s@]*)$/.exec(K);if(F){n.value!=="at"&&(i.value=0),n.value="at",l.value=F[2];return}n.value=null}bs(t,()=>Vt(m));function b(){n.value=null}function y($){const w=d.value[$];if(!w)return;const K=s.value,X=K?K.selectionStart:t.value.length,F=t.value.slice(0,X);if(n.value==="slash"){const Pe=a.find(xe=>xe.key===w.label);if(Pe&&Pe.arg){t.value=`${Pe.key} `,b(),Vt(()=>{K&&K.focus(),T()});return}t.value="",b(),Vt(T),Pe&&Pe.run&&Pe.run();return}const pe=F.lastIndexOf("@"),$e=t.value.slice(X);t.value=`${F.slice(0,pe)}@${w.label} ${$e}`,b(),Vt(()=>{K&&K.focus(),T()})}function I($){if(!$.startsWith("/"))return!1;const[w,...K]=$.split(/\s+/),X=a.value.find(pe=>pe.key===w);if(!X)return ue(M("chat.unknownCmd",{head:w})),!0;const F=K.join(" ").trim();return X.key==="/搜索"?ad(F):X.run&&X.run(),!0}function _(){if(c())return Wl();const $=t.value.trim();!$&&!B.attachments.length&&!B.images.length||(t.value="",b(),Vt(T),!I($)&&el($))}const E=G(!1);function L(){return Math.max(180,Math.min(340,Math.round(window.innerHeight*.42)))}function T(){const $=s.value;if(!$)return;$.style.height="auto";const w=$.scrollHeight,K=E.value?Kb:0;$.style.height=`${Math.min(Math.max(w,K),L())}px`}function A(){E.value=!0,T()}function x(){E.value=!1,T()}function te(){T()}function Z($){if(n.value&&d.value.length){const w=d.value.length;if($.key==="ArrowDown"){$.preventDefault(),i.value=(i.value+1)%w;return}if($.key==="ArrowUp"){$.preventDefault(),i.value=(i.value-1+w)%w;return}if($.key==="Enter"){$.preventDefault(),y(i.value);return}if($.key==="Escape"){$.preventDefault(),b();return}}$.key!=="Enter"||$.shiftKey||$.isComposing||($.preventDefault(),_())}function j($){return $>=1048576?`${($/1048576).toFixed(1)}M`:`${Math.max(1,Math.round($/1024))}K`}return($,w)=>(p(),h("div",wb,[o("div",Sb,[f(B).attachments.length||f(B).images.length||f(B).ingest?(p(),h("div",Cb,[(p(!0),h(U,null,se(f(B).attachments,(K,X)=>(p(),h("div",{key:K.id||X,class:"chip",title:`${K.name} · ${K.url}`},[o("span",Mb,u(K.name),1),o("span",Tb,u(j(K.size)),1),o("span",{class:"cx",onClick:F=>f(Zu)(X)},"✕",8,Eb)],8,xb))),128)),(p(!0),h(U,null,se(f(B).images,(K,X)=>(p(),h("div",{key:`img${X}`,class:"chip img",title:K.name},[o("img",{src:K.url,alt:K.name},null,8,Ob),o("span",{class:"cx",onClick:F=>f(ed)(X)},"✕",8,Ib)],8,Ab))),128)),f(B).ingest?(p(),h("div",{key:0,class:ae(["chip ing",f(B).ingest.status])},[o("span",Pb,u(f(B).ingest.name),1),o("span",Lb,u(f(B).ingest.status==="done"?f(M)("common.count",{n:f(B).ingest.ku}):f(B).ingest.status==="error"?f(M)("chat.ingestFailed"):`${f(B).ingest.pct}%`),1),o("span",Rb,[o("i",{style:Et({width:`${f(B).ingest.status==="done"?100:f(B).ingest.pct}%`})},null,4)]),f(B).ingest.status==="done"||f(B).ingest.status==="error"?(p(),h("span",{key:0,class:"cx",onClick:w[0]||(w[0]=K=>f(B).ingest=null)},"✕")):N("",!0)],2)):N("",!0)])):N("",!0),n.value&&d.value.length?(p(),je(zy,{key:1,items:d.value,index:i.value,hint:g.value,onPick:y,onHover:w[1]||(w[1]=K=>i.value=K)},null,8,["items","index","hint"])):N("",!0),o("div",Nb,[Oe($b),Oe(gb),he(o("textarea",{ref_key:"ta",ref:s,"onUpdate:modelValue":w[2]||(w[2]=K=>t.value=K),rows:"1",placeholder:f(M)("chat.placeholder"),onKeydown:Z,onInput:T,onFocus:A,onBlur:x,onClick:m,onKeyup:m},null,40,Db),[[me,t.value]]),o("button",{class:ae(["send",{stop:c()}]),title:c()?f(M)("chat.stopGen"):f(M)("chat.send"),onClick:_},u(c()?"■":"➤"),11,Fb)])]),Oe(Uc,{name:"fade"},{default:yt(()=>[f(B).toast?(p(),h("div",jb,u(f(B).toast),1)):N("",!0)]),_:1})]))}},Vb=Ne(Ub,[["__scopeId","data-v-371234e7"]]),Hb={class:"qi"},Bb=["onKeydown"],qb={class:"qi-b"},zb=["disabled"],Wb={__name:"QuickIngest",setup(e){const t=Ge.knowledge,s=G(""),n=G("");let l=null;const i=Q(()=>t.ingest==="busy"),r=Q(()=>i.value?"抽取中,可能要几十秒…":t.ingestErr||t.ingestMsg),a=Q(()=>i.value?"busy":t.ingestErr?"err":"ok");function c(){clearTimeout(l),l=setTimeout(()=>{t.ingest="idle",t.ingestMsg="",t.ingestErr=""},8e3)}async function d(){const g=s.value.trim();if(!(i.value||!g)){s.value="";try{await Tr({text:g,title:n.value}),n.value=""}catch{}c()}}return Ki(()=>clearTimeout(l)),(g,m)=>(p(),h("section",Hb,[m[2]||(m[2]=o("div",{class:"qi-h"},[V(" 收录知识 "),o("em",null,"短知识 · 长文档走知识星球")],-1)),he(o("textarea",{"onUpdate:modelValue":m[0]||(m[0]=b=>s.value=b),class:"qi-ta",rows:"2",placeholder:"写一句就算一条,Ctrl+Enter 收录",onKeydown:$s(Je(d,["ctrl","prevent"]),["enter"])},null,40,Bb),[[me,s.value]]),o("div",qb,[he(o("input",{"onUpdate:modelValue":m[1]||(m[1]=b=>n.value=b),class:"qi-title",placeholder:"标题(可选)"},null,512),[[me,n.value]]),o("button",{class:"qi-go",disabled:i.value||!s.value.trim(),onClick:d},u(i.value?"抽取中…":"收录"),9,zb)]),r.value?(p(),h("div",{key:0,class:ae(["qi-msg",a.value])},u(r.value),3)):N("",!0)]))}},Jb=Ne(Wb,[["__scopeId","data-v-6cdbc607"]]),Gb={class:"col col--right rail-right"},Yb={class:"head"},Xb={class:"seg"},Qb={key:0,class:"pip"},Zb={key:0,class:"body scroll"},ek={class:"sec"},tk={class:"kpi"},sk={key:0,class:"empty"},nk=["disabled"],ok={key:0,class:"empty"},lk={class:"sec"},ik={class:"kpi"},rk={class:"sub-h"},ak={key:0,class:"empty"},ck=["title","onClick"],uk={key:0,class:"empty"},dk={key:1,class:"body scroll"},fk={class:"doc-head"},pk={class:"path"},hk={key:0,class:"meta"},gk={class:"sec"},mk={key:0,class:"empty"},vk={class:"n"},_k={class:"acts"},yk={key:1,class:"empty"},bk=10,kk={__name:"Inspector",setup(e){Re(()=>{Ou(),dt("knowledge"),dt("review")});const t=Q(()=>ee.doc),s=Ge.knowledge,n=Ge.review,l=Q(()=>(n.stats.due||0)+(n.stats.fresh||0)),i=Q(()=>Math.round((n.stats.avg_mastery||0)*100));function r(){ee.railMode="progress",zt("review"),Ro()}const a=Q(()=>s.recent.slice(0,bk)),c=Q(()=>s.recentTotal>a.value.length);function d(){ee.railMode="progress",zt("knowledge")}const g=Q(()=>{const m=t.value;if(!m)return[];const b=m.content||"";return m.kind==="code"?b.split(`
|
|
34
|
-
`).filter(y=>/^(def |class |async def |function |export )/.test(y)).map(y=>y.replace(/\s*[({].*$/,"").trim()).slice(0,12):b.split(/\n{2,}/).map(y=>y.trim()).filter(Boolean).slice(0,6).map(y=>y.length>26?y.slice(0,26)+"…":y)});return(m,b)=>(p(),h("aside",Gb,[o("div",Yb,[o("div",Xb,[o("button",{class:ae({on:f(ee).railMode==="progress"}),onClick:b[0]||(b[0]=y=>f(ee).railMode="progress")},"进度",2),o("button",{class:ae({on:f(ee).railMode==="context"}),onClick:b[1]||(b[1]=y=>f(ee).railMode="context")},[b[4]||(b[4]=V(" 上下文",-1)),t.value?(p(),h("span",Qb)):N("",!0)],2)]),o("button",{class:"collapse",title:"收起检视栏",onClick:b[2]||(b[2]=y=>f(ee).railOpen=!1)},"⟩")]),f(ee).railMode==="progress"?(p(),h("div",Zb,[Oe(Jb),o("section",ek,[b[9]||(b[9]=o("div",{class:"sec-h"},[V("学习 "),o("em",null,"SM-2")],-1)),o("div",tk,[o("div",null,[o("b",null,u(f(n).stats.due),1),b[5]||(b[5]=o("span",null,"今日到期",-1))]),o("div",null,[o("b",null,u(f(n).stats.fresh),1),b[6]||(b[6]=o("span",null,"新卡",-1))]),o("div",null,[o("b",null,u(i.value)+"%",1),b[7]||(b[7]=o("span",null,"平均掌握",-1))]),o("div",null,[o("b",null,u(f(n).stats.risk.length),1),b[8]||(b[8]=o("span",null,"遗忘风险",-1))])]),f(n).state==="error"?(p(),h("div",sk,"后端未连接")):(p(),h(U,{key:1},[o("button",{class:"go",disabled:!l.value,onClick:r},u(l.value?`开始复习 ${l.value} 张`:"今天没有要复习的"),9,nk),f(n).stats.cards?N("",!0):(p(),h("div",ok,"录入的知识会自动变成复习卡"))],64))]),o("section",lk,[b[16]||(b[16]=o("div",{class:"sec-h"},[V("办公 "),o("em",null,"OfficeAgent")],-1)),o("div",ik,[o("div",null,[o("b",null,u(f(ee).officeStats.waypoints),1),b[10]||(b[10]=o("span",null,"行程点",-1))]),o("div",null,[o("b",null,u(f(ee).officeStats.conflicts),1),b[11]||(b[11]=o("span",null,"行程冲突",-1))]),o("div",null,[o("b",null,u(f(ee).officeStats.alerts),1),b[12]||(b[12]=o("span",null,"告警",-1))]),o("div",null,[o("b",null,u(f(ee).officeStats.active),1),b[13]||(b[13]=o("span",null,"进行中",-1))])]),o("div",rk,[b[14]||(b[14]=V("最近知识 ",-1)),o("em",null,u(f(s).recentTotal),1)]),f(s).state==="error"?(p(),h("div",ak,"后端未连接")):(p(),h(U,{key:1},[(p(!0),h(U,null,se(a.value,y=>(p(),h("button",{key:y.ku_id,class:"row",title:y.summary||y.name,onClick:I=>f(an)(y.ku_id)},[o("b",null,u(y.name),1),o("span",null,u(y.ku_type)+" · "+u(f(Rn)(y.created_at)),1)],8,ck))),128)),a.value.length?N("",!0):(p(),h("div",uk," 还没有录入知识。到「学习库」写一句就能收录,长文档走知识星球。 ")),c.value?(p(),h("button",{key:1,class:"more",title:"到学习库看全部",onClick:d},[b[15]||(b[15]=o("span",{class:"bars"},[o("i"),o("i"),o("i")],-1)),V("更多 "+u(f(s).recentTotal)+" 条 ",1)])):N("",!0)],64))])])):(p(),h("div",dk,[t.value?(p(),h(U,{key:0},[o("div",fk,[o("div",{class:ae(["kind",t.value.kind])},u(t.value.kind==="code"?"CLI":"TEXT"),3),o("h3",null,u(t.value.title),1),o("code",pk,u(t.value.path),1),t.value.meta?(p(),h("div",hk,u(t.value.meta),1)):N("",!0)]),o("section",gk,[b[17]||(b[17]=o("div",{class:"sec-h"},"大纲",-1)),g.value.length?N("",!0):(p(),h("div",mk,"无可提取的结构")),(p(!0),h(U,null,se(g.value,(y,I)=>(p(),h("div",{key:I,class:"out-line"},[o("span",vk,u(I+1),1),V(u(y),1)]))),128))]),o("div",_k,[o("button",{onClick:b[3]||(b[3]=y=>f(Oo)())},"关闭文档")])],64)):(p(),h("div",yk,[...b[18]||(b[18]=[V("在中间舞台点开一份文件",-1),o("br",null,null,-1),V("这里会显示它的上下文与大纲",-1)])]))]))]))}},$k=Ne(kk,[["__scopeId","data-v-6327fda1"]]),wk={class:"app"},Sk={class:"col col--mid mid"},Ck=["title"],ei=1180,xk={__name:"App",setup(e){const t=G(!1);function s(){const l=window.innerWidth<ei;l!==t.value&&(t.value=l,l&&(ee.railOpen=!1))}Re(()=>{ld(),t.value=window.innerWidth<ei,t.value&&(ee.railOpen=!1),window.addEventListener("keydown",n),window.addEventListener("resize",s)}),ws(()=>{window.removeEventListener("keydown",n),window.removeEventListener("resize",s)});function n(l){l.ctrlKey&&(l.key===","||l.code==="Comma")&&(l.preventDefault(),zt("settings"))}return(l,i)=>(p(),h("div",wk,[Oe(Uu),o("div",{class:ae(["workspace",{"is-collapsed":!f(ee).railOpen}])},[Oe(Yd),o("main",Sk,[Oe(jy),Oe(Vb)]),Oe($k)],2),t.value&&f(ee).railOpen?(p(),h("div",{key:0,class:"rail-scrim",onClick:i[0]||(i[0]=r=>f(ee).railOpen=!1)})):N("",!0),f(ee).railOpen?N("",!0):(p(),h("button",{key:1,class:"rail-handle",title:f(M)("app.expandInspector"),onClick:i[1]||(i[1]=r=>f(ee).railOpen=!0)},u(f(M)("app.inspector")),9,Ck))]))}};_r();vu(xk).mount("#app");
|