sensorium-mcp 2.17.9 → 2.17.11
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/dist/dashboard/routes/threads.js +9 -9
- package/dist/dashboard/routes/threads.js.map +1 -1
- package/dist/dashboard/spa.html +9 -9
- package/dist/data/memory/procedures.d.ts +14 -2
- package/dist/data/memory/procedures.d.ts.map +1 -1
- package/dist/data/memory/procedures.js +50 -1
- package/dist/data/memory/procedures.js.map +1 -1
- package/dist/data/memory/reflection.d.ts.map +1 -1
- package/dist/data/memory/reflection.js +1 -0
- package/dist/data/memory/reflection.js.map +1 -1
- package/dist/data/memory/semantic.d.ts +1 -0
- package/dist/data/memory/semantic.d.ts.map +1 -1
- package/dist/data/memory/semantic.js +1 -1
- package/dist/data/memory/semantic.js.map +1 -1
- package/dist/tools/wait/poll-loop.d.ts.map +1 -1
- package/dist/tools/wait/poll-loop.js +3 -1
- package/dist/tools/wait/poll-loop.js.map +1 -1
- package/dist/watcher-service.js +3 -3
- package/dist/watcher-service.js.map +1 -1
- package/package.json +1 -1
- package/templates/plan-mode.default.md +4 -1
- package/templates/ghost-thread.default.md +0 -67
- package/templates/orchestrator-claude.default.md +0 -49
- package/templates/orchestrator-copilot.default.md +0 -57
- package/templates/orchestrator.default.md +0 -21
package/dist/dashboard/spa.html
CHANGED
|
@@ -49,27 +49,27 @@
|
|
|
49
49
|
* @vue/shared v3.5.31
|
|
50
50
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
51
51
|
* @license MIT
|
|
52
|
-
**/function
|
|
52
|
+
**/function on(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const ue={},Pt=[],tt=()=>{},uo=()=>!1,Ss=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Cs=e=>e.startsWith("onUpdate:"),Te=Object.assign,rn=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},xr=Object.prototype.hasOwnProperty,re=(e,t)=>xr.call(e,t),W=Array.isArray,It=e=>rs(e)==="[object Map]",Nt=e=>rs(e)==="[object Set]",An=e=>rs(e)==="[object Date]",Y=e=>typeof e=="function",xe=e=>typeof e=="string",nt=e=>typeof e=="symbol",ae=e=>e!==null&&typeof e=="object",fo=e=>(ae(e)||Y(e))&&Y(e.then)&&Y(e.catch),po=Object.prototype.toString,rs=e=>po.call(e),vr=e=>rs(e).slice(8,-1),ho=e=>rs(e)==="[object Object]",ln=e=>xe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Wt=on(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ks=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},yr=/-\w/g,De=ks(e=>e.replace(yr,t=>t.slice(1).toUpperCase())),br=/\B([A-Z])/g,vt=ks(e=>e.replace(br,"-$1").toLowerCase()),Ts=ks(e=>e.charAt(0).toUpperCase()+e.slice(1)),js=ks(e=>e?`on${Ts(e)}`:""),et=(e,t)=>!Object.is(e,t),fs=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},mo=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},$s=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let En;const As=()=>En||(En=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Es(e){if(W(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],o=xe(n)?Cr(n):Es(n);if(o)for(const r in o)t[r]=o[r]}return t}else if(xe(e)||ae(e))return e}const _r=/;(?![^(]*\))/g,wr=/:([^]+)/,Sr=/\/\*[^]*?\*\//g;function Cr(e){const t={};return e.replace(Sr,"").split(_r).forEach(s=>{if(s){const n=s.split(wr);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function G(e){let t="";if(xe(e))t=e;else if(W(e))for(let s=0;s<e.length;s++){const n=G(e[s]);n&&(t+=n+" ")}else if(ae(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const kr="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Tr=on(kr);function go(e){return!!e||e===""}function $r(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=Lt(e[n],t[n]);return s}function Lt(e,t){if(e===t)return!0;let s=An(e),n=An(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=nt(e),n=nt(t),s||n)return e===t;if(s=W(e),n=W(t),s||n)return s&&n?$r(e,t):!1;if(s=ae(e),n=ae(t),s||n){if(!s||!n)return!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const i in e){const a=e.hasOwnProperty(i),c=t.hasOwnProperty(i);if(a&&!c||!a&&c||!Lt(e[i],t[i]))return!1}}return String(e)===String(t)}function an(e,t){return e.findIndex(s=>Lt(s,t))}const xo=e=>!!(e&&e.__v_isRef===!0),$=e=>xe(e)?e:e==null?"":W(e)||ae(e)&&(e.toString===po||!Y(e.toString))?xo(e)?$(e.value):JSON.stringify(e,vo,2):String(e),vo=(e,t)=>xo(t)?vo(e,t.value):It(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,o],r)=>(s[Ns(n,r)+" =>"]=o,s),{})}:Nt(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Ns(s))}:nt(t)?Ns(t):ae(t)&&!W(t)&&!ho(t)?String(t):t,Ns=(e,t="")=>{var s;return nt(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
|
|
53
53
|
* @vue/reactivity v3.5.31
|
|
54
54
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
55
55
|
* @license MIT
|
|
56
|
-
**/let Re;class $r{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Re,!t&&Re&&(this.index=(Re.scopes||(Re.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[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)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=Re;try{return Re=this,t()}finally{Re=s}}}on(){++this._on===1&&(this.prevScope=Re,Re=this)}off(){this._on>0&&--this._on===0&&(Re=this.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){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function Ar(){return Re}let fe;const Ls=new WeakSet;class vo{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,Re&&Re.active&&Re.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ls.has(this)&&(Ls.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||bo(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,En(this),_o(this);const t=fe,s=Be;fe=this,Be=!0;try{return this.fn()}finally{wo(this),fe=t,Be=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)un(t);this.deps=this.depsTail=void 0,En(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ls.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){zs(this)&&this.run()}get dirty(){return zs(this)}}let yo=0,zt,Jt;function bo(e,t=!1){if(e.flags|=8,t){e.next=Jt,Jt=e;return}e.next=zt,zt=e}function an(){yo++}function cn(){if(--yo>0)return;if(Jt){let t=Jt;for(Jt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;zt;){let t=zt;for(zt=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 _o(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function wo(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),un(n),Er(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function zs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(So(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function So(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Qt)||(e.globalVersion=Qt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!zs(e))))return;e.flags|=2;const t=e.dep,s=fe,n=Be;fe=e,Be=!0;try{_o(e);const o=e.fn(e._value);(t.version===0||Xe(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{fe=s,Be=n,wo(e),e.flags&=-3}}function un(e,t=!1){const{dep:s,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let r=s.computed.deps;r;r=r.nextDep)un(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Er(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let Be=!0;const Co=[];function dt(){Co.push(Be),Be=!1}function ft(){const e=Co.pop();Be=e===void 0?!0:e}function En(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=fe;fe=void 0;try{t()}finally{fe=s}}}let Qt=0;class Pr{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class dn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!fe||!Be||fe===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==fe)s=this.activeLink=new Pr(fe,this),fe.deps?(s.prevDep=fe.depsTail,fe.depsTail.nextDep=s,fe.depsTail=s):fe.deps=fe.depsTail=s,To(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=fe.depsTail,s.nextDep=void 0,fe.depsTail.nextDep=s,fe.depsTail=s,fe.deps===s&&(fe.deps=n)}return s}trigger(t){this.version++,Qt++,this.notify(t)}notify(t){an();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{cn()}}}function To(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)To(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Js=new WeakMap,Ct=Symbol(""),qs=Symbol(""),Xt=Symbol("");function Te(e,t,s){if(Be&&fe){let n=Js.get(e);n||Js.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new dn),o.map=n,o.key=s),o.track()}}function at(e,t,s,n,o,r){const i=Js.get(e);if(!i){Qt++;return}const a=c=>{c&&c.trigger()};if(an(),t==="clear")i.forEach(a);else{const c=W(e),h=c&&rn(s);if(c&&s==="length"){const u=Number(n);i.forEach((p,x)=>{(x==="length"||x===Xt||!st(x)&&x>=u)&&a(p)})}else switch((s!==void 0||i.has(void 0))&&a(i.get(s)),h&&a(i.get(Xt)),t){case"add":c?h&&a(i.get("length")):(a(i.get(Ct)),It(e)&&a(i.get(qs)));break;case"delete":c||(a(i.get(Ct)),It(e)&&a(i.get(qs)));break;case"set":It(e)&&a(i.get(Ct));break}}cn()}function $t(e){const t=te(e);return t===e?t:(Te(t,"iterate",Xt),He(e)?t:t.map(Ke))}function Ps(e){return Te(e=te(e),"iterate",Xt),e}function Ze(e,t){return pt(e)?Rt(Tt(e)?Ke(t):t):Ke(t)}const Ir={__proto__:null,[Symbol.iterator](){return Fs(this,Symbol.iterator,e=>Ze(this,e))},concat(...e){return $t(this).concat(...e.map(t=>W(t)?$t(t):t))},entries(){return Fs(this,"entries",e=>(e[1]=Ze(this,e[1]),e))},every(e,t){return rt(this,"every",e,t,void 0,arguments)},filter(e,t){return rt(this,"filter",e,t,s=>s.map(n=>Ze(this,n)),arguments)},find(e,t){return rt(this,"find",e,t,s=>Ze(this,s),arguments)},findIndex(e,t){return rt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return rt(this,"findLast",e,t,s=>Ze(this,s),arguments)},findLastIndex(e,t){return rt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return rt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Hs(this,"includes",e)},indexOf(...e){return Hs(this,"indexOf",e)},join(e){return $t(this).join(e)},lastIndexOf(...e){return Hs(this,"lastIndexOf",e)},map(e,t){return rt(this,"map",e,t,void 0,arguments)},pop(){return Vt(this,"pop")},push(...e){return Vt(this,"push",e)},reduce(e,...t){return Pn(this,"reduce",e,t)},reduceRight(e,...t){return Pn(this,"reduceRight",e,t)},shift(){return Vt(this,"shift")},some(e,t){return rt(this,"some",e,t,void 0,arguments)},splice(...e){return Vt(this,"splice",e)},toReversed(){return $t(this).toReversed()},toSorted(e){return $t(this).toSorted(e)},toSpliced(...e){return $t(this).toSpliced(...e)},unshift(...e){return Vt(this,"unshift",e)},values(){return Fs(this,"values",e=>Ze(this,e))}};function Fs(e,t,s){const n=Ps(e),o=n[t]();return n!==e&&!He(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=s(r.value)),r}),o}const Mr=Array.prototype;function rt(e,t,s,n,o,r){const i=Ps(e),a=i!==e&&!He(e),c=i[t];if(c!==Mr[t]){const p=c.apply(e,r);return a?Ke(p):p}let h=s;i!==e&&(a?h=function(p,x){return s.call(this,Ze(e,p),x,e)}:s.length>2&&(h=function(p,x){return s.call(this,p,x,e)}));const u=c.call(i,h,n);return a&&o?o(u):u}function Pn(e,t,s,n){const o=Ps(e),r=o!==e&&!He(e);let i=s,a=!1;o!==e&&(r?(a=n.length===0,i=function(h,u,p){return a&&(a=!1,h=Ze(e,h)),s.call(this,h,Ze(e,u),p,e)}):s.length>3&&(i=function(h,u,p){return s.call(this,h,u,p,e)}));const c=o[t](i,...n);return a?Ze(e,c):c}function Hs(e,t,s){const n=te(e);Te(n,"iterate",Xt);const o=n[t](...s);return(o===-1||o===!1)&&mn(s[0])?(s[0]=te(s[0]),n[t](...s)):o}function Vt(e,t,s=[]){dt(),an();const n=te(e)[t].apply(e,s);return cn(),ft(),n}const Or=nn("__proto__,__v_isRef,__isVue"),ko=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(st));function Rr(e){st(e)||(e=String(e));const t=te(this);return Te(t,"has",e),t.hasOwnProperty(e)}class $o{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const o=this._isReadonly,r=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return r;if(s==="__v_raw")return n===(o?r?Kr:Io:r?Po:Eo).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const i=W(t);if(!o){let c;if(i&&(c=Ir[s]))return c;if(s==="hasOwnProperty")return Rr}const a=Reflect.get(t,s,Ae(t)?t:n);if((st(s)?ko.has(s):Or(s))||(o||Te(t,"get",s),r))return a;if(Ae(a)){const c=i&&rn(s)?a:a.value;return o&&le(c)?Ys(c):c}return le(a)?o?Ys(a):pn(a):a}}class Ao extends $o{constructor(t=!1){super(!1,t)}set(t,s,n,o){let r=t[s];const i=W(t)&&rn(s);if(!this._isShallow){const h=pt(r);if(!He(n)&&!pt(n)&&(r=te(r),n=te(n)),!i&&Ae(r)&&!Ae(n))return h||(r.value=n),!0}const a=i?Number(s)<t.length:se(t,s),c=Reflect.set(t,s,n,Ae(t)?t:o);return t===te(o)&&(a?Xe(n,r)&&at(t,"set",s,n):at(t,"add",s,n)),c}deleteProperty(t,s){const n=se(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&at(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!st(s)||!ko.has(s))&&Te(t,"has",s),n}ownKeys(t){return Te(t,"iterate",W(t)?"length":Ct),Reflect.ownKeys(t)}}class Dr extends $o{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const jr=new Ao,Nr=new Dr,Lr=new Ao(!0);const Gs=e=>e,as=e=>Reflect.getPrototypeOf(e);function Fr(e,t,s){return function(...n){const o=this.__v_raw,r=te(o),i=It(r),a=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,h=o[e](...n),u=s?Gs:t?Rt:Ke;return!t&&Te(r,"iterate",c?qs:Ct),Ce(Object.create(h),{next(){const{value:p,done:x}=h.next();return x?{value:p,done:x}:{value:a?[u(p[0]),u(p[1])]:u(p),done:x}}})}}function cs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Hr(e,t){const s={get(o){const r=this.__v_raw,i=te(r),a=te(o);e||(Xe(o,a)&&Te(i,"get",o),Te(i,"get",a));const{has:c}=as(i),h=t?Gs:e?Rt:Ke;if(c.call(i,o))return h(r.get(o));if(c.call(i,a))return h(r.get(a));r!==i&&r.get(o)},get size(){const o=this.__v_raw;return!e&&Te(te(o),"iterate",Ct),o.size},has(o){const r=this.__v_raw,i=te(r),a=te(o);return e||(Xe(o,a)&&Te(i,"has",o),Te(i,"has",a)),o===a?r.has(o):r.has(o)||r.has(a)},forEach(o,r){const i=this,a=i.__v_raw,c=te(a),h=t?Gs:e?Rt:Ke;return!e&&Te(c,"iterate",Ct),a.forEach((u,p)=>o.call(r,h(u),h(p),i))}};return Ce(s,e?{add:cs("add"),set:cs("set"),delete:cs("delete"),clear:cs("clear")}:{add(o){const r=te(this),i=as(r),a=te(o),c=!t&&!He(o)&&!pt(o)?a:o;return i.has.call(r,c)||Xe(o,c)&&i.has.call(r,o)||Xe(a,c)&&i.has.call(r,a)||(r.add(c),at(r,"add",c,c)),this},set(o,r){!t&&!He(r)&&!pt(r)&&(r=te(r));const i=te(this),{has:a,get:c}=as(i);let h=a.call(i,o);h||(o=te(o),h=a.call(i,o));const u=c.call(i,o);return i.set(o,r),h?Xe(r,u)&&at(i,"set",o,r):at(i,"add",o,r),this},delete(o){const r=te(this),{has:i,get:a}=as(r);let c=i.call(r,o);c||(o=te(o),c=i.call(r,o)),a&&a.call(r,o);const h=r.delete(o);return c&&at(r,"delete",o,void 0),h},clear(){const o=te(this),r=o.size!==0,i=o.clear();return r&&at(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=Fr(o,e,t)}),s}function fn(e,t){const s=Hr(e,t);return(n,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(se(s,o)&&o in n?s:n,o,r)}const Vr={get:fn(!1,!1)},Ur={get:fn(!1,!0)},Br={get:fn(!0,!1)};const Eo=new WeakMap,Po=new WeakMap,Io=new WeakMap,Kr=new WeakMap;function Wr(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function zr(e){return e.__v_skip||!Object.isExtensible(e)?0:Wr(xr(e))}function pn(e){return pt(e)?e:hn(e,!1,jr,Vr,Eo)}function Jr(e){return hn(e,!1,Lr,Ur,Po)}function Ys(e){return hn(e,!0,Nr,Br,Io)}function hn(e,t,s,n,o){if(!le(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=zr(e);if(r===0)return e;const i=o.get(e);if(i)return i;const a=new Proxy(e,r===2?n:s);return o.set(e,a),a}function Tt(e){return pt(e)?Tt(e.__v_raw):!!(e&&e.__v_isReactive)}function pt(e){return!!(e&&e.__v_isReadonly)}function He(e){return!!(e&&e.__v_isShallow)}function mn(e){return e?!!e.__v_raw:!1}function te(e){const t=e&&e.__v_raw;return t?te(t):e}function qr(e){return!se(e,"__v_skip")&&Object.isExtensible(e)&&ho(e,"__v_skip",!0),e}const Ke=e=>le(e)?pn(e):e,Rt=e=>le(e)?Ys(e):e;function Ae(e){return e?e.__v_isRef===!0:!1}function L(e){return Gr(e,!1)}function Gr(e,t){return Ae(e)?e:new Yr(e,t)}class Yr{constructor(t,s){this.dep=new dn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:te(t),this._value=s?t:Ke(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||He(t)||pt(t);t=n?t:te(t),Xe(t,s)&&(this._rawValue=t,this._value=n?t:Ke(t),this.dep.trigger())}}function Zr(e){return Ae(e)?e.value:e}const Qr={get:(e,t,s)=>t==="__v_raw"?e:Zr(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return Ae(o)&&!Ae(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function Mo(e){return Tt(e)?e:new Proxy(e,Qr)}class Xr{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new dn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&fe!==this)return bo(this,!0),!0}get value(){const t=this.dep.track();return So(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ei(e,t,s=!1){let n,o;return Y(e)?n=e:(n=e.get,o=e.set),new Xr(n,o,s)}const us={},xs=new WeakMap;let St;function ti(e,t=!1,s=St){if(s){let n=xs.get(s);n||xs.set(s,n=[]),n.push(e)}}function si(e,t,s=ue){const{immediate:n,deep:o,once:r,scheduler:i,augmentJob:a,call:c}=s,h=N=>o?N:He(N)||o===!1||o===0?ct(N,1):ct(N);let u,p,x,$,H=!1,M=!1;if(Ae(e)?(p=()=>e.value,H=He(e)):Tt(e)?(p=()=>h(e),H=!0):W(e)?(M=!0,H=e.some(N=>Tt(N)||He(N)),p=()=>e.map(N=>{if(Ae(N))return N.value;if(Tt(N))return h(N);if(Y(N))return c?c(N,2):N()})):Y(e)?t?p=c?()=>c(e,2):e:p=()=>{if(x){dt();try{x()}finally{ft()}}const N=St;St=u;try{return c?c(e,3,[$]):e($)}finally{St=N}}:p=et,t&&o){const N=p,oe=o===!0?1/0:o;p=()=>ct(N(),oe)}const G=Ar(),R=()=>{u.stop(),G&&G.active&&on(G.effects,u)};if(r&&t){const N=t;t=(...oe)=>{N(...oe),R()}}let V=M?new Array(e.length).fill(us):us;const Z=N=>{if(!(!(u.flags&1)||!u.dirty&&!N))if(t){const oe=u.run();if(o||H||(M?oe.some((_e,J)=>Xe(_e,V[J])):Xe(oe,V))){x&&x();const _e=St;St=u;try{const J=[oe,V===us?void 0:M&&V[0]===us?[]:V,$];V=oe,c?c(t,3,J):t(...J)}finally{St=_e}}}else u.run()};return a&&a(Z),u=new vo(p),u.scheduler=i?()=>i(Z,!1):Z,$=N=>ti(N,!1,u),x=u.onStop=()=>{const N=xs.get(u);if(N){if(c)c(N,4);else for(const oe of N)oe();xs.delete(u)}},t?n?Z(!0):V=u.run():i?i(Z.bind(null,!0),!0):u.run(),R.pause=u.pause.bind(u),R.resume=u.resume.bind(u),R.stop=R,R}function ct(e,t=1/0,s){if(t<=0||!le(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Ae(e))ct(e.value,t,s);else if(W(e))for(let n=0;n<e.length;n++)ct(e[n],t,s);else if(Nt(e)||It(e))e.forEach(n=>{ct(n,t,s)});else if(po(e)){for(const n in e)ct(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&ct(e[n],t,s)}return e}/**
|
|
56
|
+
**/let Ne;class Ar{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Ne,!t&&Ne&&(this.index=(Ne.scopes||(Ne.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[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)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=Ne;try{return Ne=this,t()}finally{Ne=s}}}on(){++this._on===1&&(this.prevScope=Ne,Ne=this)}off(){this._on>0&&--this._on===0&&(Ne=this.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){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function Er(){return Ne}let he;const Ls=new WeakSet;class yo{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,Ne&&Ne.active&&Ne.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ls.has(this)&&(Ls.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||_o(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Pn(this),wo(this);const t=he,s=We;he=this,We=!0;try{return this.fn()}finally{So(this),he=t,We=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)dn(t);this.deps=this.depsTail=void 0,Pn(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ls.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){zs(this)&&this.run()}get dirty(){return zs(this)}}let bo=0,zt,Jt;function _o(e,t=!1){if(e.flags|=8,t){e.next=Jt,Jt=e;return}e.next=zt,zt=e}function cn(){bo++}function un(){if(--bo>0)return;if(Jt){let t=Jt;for(Jt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;zt;){let t=zt;for(zt=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 wo(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function So(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),dn(n),Pr(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function zs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Co(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Co(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Qt)||(e.globalVersion=Qt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!zs(e))))return;e.flags|=2;const t=e.dep,s=he,n=We;he=e,We=!0;try{wo(e);const o=e.fn(e._value);(t.version===0||et(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{he=s,We=n,So(e),e.flags&=-3}}function dn(e,t=!1){const{dep:s,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let r=s.computed.deps;r;r=r.nextDep)dn(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Pr(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let We=!0;const ko=[];function dt(){ko.push(We),We=!1}function ft(){const e=ko.pop();We=e===void 0?!0:e}function Pn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=he;he=void 0;try{t()}finally{he=s}}}let Qt=0;class Ir{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 fn{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(!he||!We||he===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==he)s=this.activeLink=new Ir(he,this),he.deps?(s.prevDep=he.depsTail,he.depsTail.nextDep=s,he.depsTail=s):he.deps=he.depsTail=s,To(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=he.depsTail,s.nextDep=void 0,he.depsTail.nextDep=s,he.depsTail=s,he.deps===s&&(he.deps=n)}return s}trigger(t){this.version++,Qt++,this.notify(t)}notify(t){cn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{un()}}}function To(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)To(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Js=new WeakMap,St=Symbol(""),qs=Symbol(""),Xt=Symbol("");function Ee(e,t,s){if(We&&he){let n=Js.get(e);n||Js.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new fn),o.map=n,o.key=s),o.track()}}function at(e,t,s,n,o,r){const i=Js.get(e);if(!i){Qt++;return}const a=c=>{c&&c.trigger()};if(cn(),t==="clear")i.forEach(a);else{const c=W(e),p=c&&ln(s);if(c&&s==="length"){const u=Number(n);i.forEach((h,x)=>{(x==="length"||x===Xt||!nt(x)&&x>=u)&&a(h)})}else switch((s!==void 0||i.has(void 0))&&a(i.get(s)),p&&a(i.get(Xt)),t){case"add":c?p&&a(i.get("length")):(a(i.get(St)),It(e)&&a(i.get(qs)));break;case"delete":c||(a(i.get(St)),It(e)&&a(i.get(qs)));break;case"set":It(e)&&a(i.get(St));break}}un()}function $t(e){const t=oe(e);return t===e?t:(Ee(t,"iterate",Xt),Ve(e)?t:t.map(ze))}function Ps(e){return Ee(e=oe(e),"iterate",Xt),e}function Qe(e,t){return pt(e)?Rt(Ct(e)?ze(t):t):ze(t)}const Mr={__proto__:null,[Symbol.iterator](){return Fs(this,Symbol.iterator,e=>Qe(this,e))},concat(...e){return $t(this).concat(...e.map(t=>W(t)?$t(t):t))},entries(){return Fs(this,"entries",e=>(e[1]=Qe(this,e[1]),e))},every(e,t){return rt(this,"every",e,t,void 0,arguments)},filter(e,t){return rt(this,"filter",e,t,s=>s.map(n=>Qe(this,n)),arguments)},find(e,t){return rt(this,"find",e,t,s=>Qe(this,s),arguments)},findIndex(e,t){return rt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return rt(this,"findLast",e,t,s=>Qe(this,s),arguments)},findLastIndex(e,t){return rt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return rt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Hs(this,"includes",e)},indexOf(...e){return Hs(this,"indexOf",e)},join(e){return $t(this).join(e)},lastIndexOf(...e){return Hs(this,"lastIndexOf",e)},map(e,t){return rt(this,"map",e,t,void 0,arguments)},pop(){return Vt(this,"pop")},push(...e){return Vt(this,"push",e)},reduce(e,...t){return In(this,"reduce",e,t)},reduceRight(e,...t){return In(this,"reduceRight",e,t)},shift(){return Vt(this,"shift")},some(e,t){return rt(this,"some",e,t,void 0,arguments)},splice(...e){return Vt(this,"splice",e)},toReversed(){return $t(this).toReversed()},toSorted(e){return $t(this).toSorted(e)},toSpliced(...e){return $t(this).toSpliced(...e)},unshift(...e){return Vt(this,"unshift",e)},values(){return Fs(this,"values",e=>Qe(this,e))}};function Fs(e,t,s){const n=Ps(e),o=n[t]();return n!==e&&!Ve(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=s(r.value)),r}),o}const Or=Array.prototype;function rt(e,t,s,n,o,r){const i=Ps(e),a=i!==e&&!Ve(e),c=i[t];if(c!==Or[t]){const h=c.apply(e,r);return a?ze(h):h}let p=s;i!==e&&(a?p=function(h,x){return s.call(this,Qe(e,h),x,e)}:s.length>2&&(p=function(h,x){return s.call(this,h,x,e)}));const u=c.call(i,p,n);return a&&o?o(u):u}function In(e,t,s,n){const o=Ps(e),r=o!==e&&!Ve(e);let i=s,a=!1;o!==e&&(r?(a=n.length===0,i=function(p,u,h){return a&&(a=!1,p=Qe(e,p)),s.call(this,p,Qe(e,u),h,e)}):s.length>3&&(i=function(p,u,h){return s.call(this,p,u,h,e)}));const c=o[t](i,...n);return a?Qe(e,c):c}function Hs(e,t,s){const n=oe(e);Ee(n,"iterate",Xt);const o=n[t](...s);return(o===-1||o===!1)&&gn(s[0])?(s[0]=oe(s[0]),n[t](...s)):o}function Vt(e,t,s=[]){dt(),cn();const n=oe(e)[t].apply(e,s);return un(),ft(),n}const Rr=on("__proto__,__v_isRef,__isVue"),$o=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(nt));function Dr(e){nt(e)||(e=String(e));const t=oe(this);return Ee(t,"has",e),t.hasOwnProperty(e)}class Ao{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const o=this._isReadonly,r=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return r;if(s==="__v_raw")return n===(o?r?Wr:Mo:r?Io:Po).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const i=W(t);if(!o){let c;if(i&&(c=Mr[s]))return c;if(s==="hasOwnProperty")return Dr}const a=Reflect.get(t,s,Ie(t)?t:n);if((nt(s)?$o.has(s):Rr(s))||(o||Ee(t,"get",s),r))return a;if(Ie(a)){const c=i&&ln(s)?a:a.value;return o&&ae(c)?Ys(c):c}return ae(a)?o?Ys(a):hn(a):a}}class Eo extends Ao{constructor(t=!1){super(!1,t)}set(t,s,n,o){let r=t[s];const i=W(t)&&ln(s);if(!this._isShallow){const p=pt(r);if(!Ve(n)&&!pt(n)&&(r=oe(r),n=oe(n)),!i&&Ie(r)&&!Ie(n))return p||(r.value=n),!0}const a=i?Number(s)<t.length:re(t,s),c=Reflect.set(t,s,n,Ie(t)?t:o);return t===oe(o)&&(a?et(n,r)&&at(t,"set",s,n):at(t,"add",s,n)),c}deleteProperty(t,s){const n=re(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&at(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!nt(s)||!$o.has(s))&&Ee(t,"has",s),n}ownKeys(t){return Ee(t,"iterate",W(t)?"length":St),Reflect.ownKeys(t)}}class jr extends Ao{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const Nr=new Eo,Lr=new jr,Fr=new Eo(!0);const Gs=e=>e,as=e=>Reflect.getPrototypeOf(e);function Hr(e,t,s){return function(...n){const o=this.__v_raw,r=oe(o),i=It(r),a=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,p=o[e](...n),u=s?Gs:t?Rt:ze;return!t&&Ee(r,"iterate",c?qs:St),Te(Object.create(p),{next(){const{value:h,done:x}=p.next();return x?{value:h,done:x}:{value:a?[u(h[0]),u(h[1])]:u(h),done:x}}})}}function cs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Vr(e,t){const s={get(o){const r=this.__v_raw,i=oe(r),a=oe(o);e||(et(o,a)&&Ee(i,"get",o),Ee(i,"get",a));const{has:c}=as(i),p=t?Gs:e?Rt:ze;if(c.call(i,o))return p(r.get(o));if(c.call(i,a))return p(r.get(a));r!==i&&r.get(o)},get size(){const o=this.__v_raw;return!e&&Ee(oe(o),"iterate",St),o.size},has(o){const r=this.__v_raw,i=oe(r),a=oe(o);return e||(et(o,a)&&Ee(i,"has",o),Ee(i,"has",a)),o===a?r.has(o):r.has(o)||r.has(a)},forEach(o,r){const i=this,a=i.__v_raw,c=oe(a),p=t?Gs:e?Rt:ze;return!e&&Ee(c,"iterate",St),a.forEach((u,h)=>o.call(r,p(u),p(h),i))}};return Te(s,e?{add:cs("add"),set:cs("set"),delete:cs("delete"),clear:cs("clear")}:{add(o){const r=oe(this),i=as(r),a=oe(o),c=!t&&!Ve(o)&&!pt(o)?a:o;return i.has.call(r,c)||et(o,c)&&i.has.call(r,o)||et(a,c)&&i.has.call(r,a)||(r.add(c),at(r,"add",c,c)),this},set(o,r){!t&&!Ve(r)&&!pt(r)&&(r=oe(r));const i=oe(this),{has:a,get:c}=as(i);let p=a.call(i,o);p||(o=oe(o),p=a.call(i,o));const u=c.call(i,o);return i.set(o,r),p?et(r,u)&&at(i,"set",o,r):at(i,"add",o,r),this},delete(o){const r=oe(this),{has:i,get:a}=as(r);let c=i.call(r,o);c||(o=oe(o),c=i.call(r,o)),a&&a.call(r,o);const p=r.delete(o);return c&&at(r,"delete",o,void 0),p},clear(){const o=oe(this),r=o.size!==0,i=o.clear();return r&&at(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=Hr(o,e,t)}),s}function pn(e,t){const s=Vr(e,t);return(n,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(re(s,o)&&o in n?s:n,o,r)}const Ur={get:pn(!1,!1)},Br={get:pn(!1,!0)},Kr={get:pn(!0,!1)};const Po=new WeakMap,Io=new WeakMap,Mo=new WeakMap,Wr=new WeakMap;function zr(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Jr(e){return e.__v_skip||!Object.isExtensible(e)?0:zr(vr(e))}function hn(e){return pt(e)?e:mn(e,!1,Nr,Ur,Po)}function qr(e){return mn(e,!1,Fr,Br,Io)}function Ys(e){return mn(e,!0,Lr,Kr,Mo)}function mn(e,t,s,n,o){if(!ae(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=Jr(e);if(r===0)return e;const i=o.get(e);if(i)return i;const a=new Proxy(e,r===2?n:s);return o.set(e,a),a}function Ct(e){return pt(e)?Ct(e.__v_raw):!!(e&&e.__v_isReactive)}function pt(e){return!!(e&&e.__v_isReadonly)}function Ve(e){return!!(e&&e.__v_isShallow)}function gn(e){return e?!!e.__v_raw:!1}function oe(e){const t=e&&e.__v_raw;return t?oe(t):e}function Gr(e){return!re(e,"__v_skip")&&Object.isExtensible(e)&&mo(e,"__v_skip",!0),e}const ze=e=>ae(e)?hn(e):e,Rt=e=>ae(e)?Ys(e):e;function Ie(e){return e?e.__v_isRef===!0:!1}function D(e){return Yr(e,!1)}function Yr(e,t){return Ie(e)?e:new Zr(e,t)}class Zr{constructor(t,s){this.dep=new fn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:oe(t),this._value=s?t:ze(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||Ve(t)||pt(t);t=n?t:oe(t),et(t,s)&&(this._rawValue=t,this._value=n?t:ze(t),this.dep.trigger())}}function Qr(e){return Ie(e)?e.value:e}const Xr={get:(e,t,s)=>t==="__v_raw"?e:Qr(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return Ie(o)&&!Ie(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function Oo(e){return Ct(e)?e:new Proxy(e,Xr)}class ei{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new fn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&he!==this)return _o(this,!0),!0}get value(){const t=this.dep.track();return Co(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ti(e,t,s=!1){let n,o;return Y(e)?n=e:(n=e.get,o=e.set),new ei(n,o,s)}const us={},xs=new WeakMap;let wt;function si(e,t=!1,s=wt){if(s){let n=xs.get(s);n||xs.set(s,n=[]),n.push(e)}}function ni(e,t,s=ue){const{immediate:n,deep:o,once:r,scheduler:i,augmentJob:a,call:c}=s,p=F=>o?F:Ve(F)||o===!1||o===0?ct(F,1):ct(F);let u,h,x,C,H=!1,j=!1;if(Ie(e)?(h=()=>e.value,H=Ve(e)):Ct(e)?(h=()=>p(e),H=!0):W(e)?(j=!0,H=e.some(F=>Ct(F)||Ve(F)),h=()=>e.map(F=>{if(Ie(F))return F.value;if(Ct(F))return p(F);if(Y(F))return c?c(F,2):F()})):Y(e)?t?h=c?()=>c(e,2):e:h=()=>{if(x){dt();try{x()}finally{ft()}}const F=wt;wt=u;try{return c?c(e,3,[C]):e(C)}finally{wt=F}}:h=tt,t&&o){const F=h,le=o===!0?1/0:o;h=()=>ct(F(),le)}const z=Er(),P=()=>{u.stop(),z&&z.active&&rn(z.effects,u)};if(r&&t){const F=t;t=(...le)=>{F(...le),P()}}let V=j?new Array(e.length).fill(us):us;const Z=F=>{if(!(!(u.flags&1)||!u.dirty&&!F))if(t){const le=u.run();if(o||H||(j?le.some((de,J)=>et(de,V[J])):et(le,V))){x&&x();const de=wt;wt=u;try{const J=[le,V===us?void 0:j&&V[0]===us?[]:V,C];V=le,c?c(t,3,J):t(...J)}finally{wt=de}}}else u.run()};return a&&a(Z),u=new yo(h),u.scheduler=i?()=>i(Z,!1):Z,C=F=>si(F,!1,u),x=u.onStop=()=>{const F=xs.get(u);if(F){if(c)c(F,4);else for(const le of F)le();xs.delete(u)}},t?n?Z(!0):V=u.run():i?i(Z.bind(null,!0),!0):u.run(),P.pause=u.pause.bind(u),P.resume=u.resume.bind(u),P.stop=P,P}function ct(e,t=1/0,s){if(t<=0||!ae(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Ie(e))ct(e.value,t,s);else if(W(e))for(let n=0;n<e.length;n++)ct(e[n],t,s);else if(Nt(e)||It(e))e.forEach(n=>{ct(n,t,s)});else if(ho(e)){for(const n in e)ct(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&ct(e[n],t,s)}return e}/**
|
|
57
57
|
* @vue/runtime-core v3.5.31
|
|
58
58
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
59
59
|
* @license MIT
|
|
60
|
-
**/function is(e,t,s,n){try{return n?e(...n):e()}catch(o){Is(o,t,s)}}function nt(e,t,s,n){if(Y(e)){const o=is(e,t,s,n);return o&&uo(o)&&o.catch(r=>{Is(r,t,s)}),o}if(W(e)){const o=[];for(let r=0;r<e.length;r++)o.push(nt(e[r],t,s,n));return o}}function Is(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||ue;if(t){let a=t.parent;const c=t.proxy,h=`https://vuejs.org/error-reference/#runtime-${s}`;for(;a;){const u=a.ec;if(u){for(let p=0;p<u.length;p++)if(u[p](e,c,h)===!1)return}a=a.parent}if(r){dt(),is(r,null,10,[e,c,h]),ft();return}}ni(e,s,o,n,i)}function ni(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const Ie=[];let Ye=-1;const Mt=[];let mt=null,At=0;const Oo=Promise.resolve();let vs=null;function Ro(e){const t=vs||Oo;return e?t.then(this?e.bind(this):e):t}function oi(e){let t=Ye+1,s=Ie.length;for(;t<s;){const n=t+s>>>1,o=Ie[n],r=es(o);r<e||r===e&&o.flags&2?t=n+1:s=n}return t}function gn(e){if(!(e.flags&1)){const t=es(e),s=Ie[Ie.length-1];!s||!(e.flags&2)&&t>=es(s)?Ie.push(e):Ie.splice(oi(t),0,e),e.flags|=1,Do()}}function Do(){vs||(vs=Oo.then(No))}function ri(e){W(e)?Mt.push(...e):mt&&e.id===-1?mt.splice(At+1,0,e):e.flags&1||(Mt.push(e),e.flags|=1),Do()}function In(e,t,s=Ye+1){for(;s<Ie.length;s++){const n=Ie[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Ie.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function jo(e){if(Mt.length){const t=[...new Set(Mt)].sort((s,n)=>es(s)-es(n));if(Mt.length=0,mt){mt.push(...t);return}for(mt=t,At=0;At<mt.length;At++){const s=mt[At];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}mt=null,At=0}}const es=e=>e.id==null?e.flags&2?-1:1/0:e.id;function No(e){try{for(Ye=0;Ye<Ie.length;Ye++){const t=Ie[Ye];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),is(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ye<Ie.length;Ye++){const t=Ie[Ye];t&&(t.flags&=-2)}Ye=-1,Ie.length=0,jo(),vs=null,(Ie.length||Mt.length)&&No()}}let Ne=null,Lo=null;function ys(e){const t=Ne;return Ne=e,Lo=e&&e.type.__scopeId||null,t}function ii(e,t=Ne,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&Bn(-1);const r=ys(t);let i;try{i=e(...o)}finally{ys(r),n._d&&Bn(1)}return i};return n._n=!0,n._c=!0,n._d=!0,n}function pe(e,t){if(Ne===null)return e;const s=Ds(Ne),n=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,i,a,c=ue]=t[o];r&&(Y(r)&&(r={mounted:r,updated:r}),r.deep&&ct(i),n.push({dir:r,instance:s,value:i,oldValue:void 0,arg:a,modifiers:c}))}return e}function _t(e,t,s,n){const o=e.dirs,r=t&&t.dirs;for(let i=0;i<o.length;i++){const a=o[i];r&&(a.oldValue=r[i].value);let c=a.dir[n];c&&(dt(),nt(c,s,8,[e.el,a,e,t]),ft())}}function li(e,t){if(ke){let s=ke.provides;const n=ke.parent&&ke.parent.provides;n===s&&(s=ke.provides=Object.create(n)),s[e]=t}}function ps(e,t,s=!1){const n=ll();if(n||Ot){let o=Ot?Ot._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return s&&Y(t)?t.call(n&&n.proxy):t}}const ai=Symbol.for("v-scx"),ci=()=>ps(ai);function Vs(e,t,s){return Fo(e,t,s)}function Fo(e,t,s=ue){const{immediate:n,deep:o,flush:r,once:i}=s,a=Ce({},s),c=t&&n||!t&&r!=="post";let h;if(ss){if(r==="sync"){const $=ci();h=$.__watcherHandles||($.__watcherHandles=[])}else if(!c){const $=()=>{};return $.stop=et,$.resume=et,$.pause=et,$}}const u=ke;a.call=($,H,M)=>nt($,u,H,M);let p=!1;r==="post"?a.scheduler=$=>{Oe($,u&&u.suspense)}:r!=="sync"&&(p=!0,a.scheduler=($,H)=>{H?$():gn($)}),a.augmentJob=$=>{t&&($.flags|=4),p&&($.flags|=2,u&&($.id=u.uid,$.i=u))};const x=si(e,t,a);return ss&&(h?h.push(x):c&&x()),x}function ui(e,t,s){const n=this.proxy,o=me(e)?e.includes(".")?Ho(n,e):()=>n[e]:e.bind(n,n);let r;Y(t)?r=t:(r=t.handler,s=t);const i=ls(this),a=Fo(o,r.bind(n),s);return i(),a}function Ho(e,t){const s=t.split(".");return()=>{let n=e;for(let o=0;o<s.length&&n;o++)n=n[s[o]];return n}}const di=Symbol("_vte"),fi=e=>e.__isTeleport,pi=Symbol("_leaveCb");function xn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,xn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function kt(e,t){return Y(e)?Ce({name:e.name},t,{setup:e}):e}function Vo(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Mn(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const bs=new WeakMap;function qt(e,t,s,n,o=!1){if(W(e)){e.forEach((M,G)=>qt(M,t&&(W(t)?t[G]:t),s,n,o));return}if(Gt(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&qt(e,t,s,n.component.subTree);return}const r=n.shapeFlag&4?Ds(n.component):n.el,i=o?null:r,{i:a,r:c}=e,h=t&&t.r,u=a.refs===ue?a.refs={}:a.refs,p=a.setupState,x=te(p),$=p===ue?co:M=>Mn(u,M)?!1:se(x,M),H=(M,G)=>!(G&&Mn(u,G));if(h!=null&&h!==c){if(On(t),me(h))u[h]=null,$(h)&&(p[h]=null);else if(Ae(h)){const M=t;H(h,M.k)&&(h.value=null),M.k&&(u[M.k]=null)}}if(Y(c))is(c,a,12,[i,u]);else{const M=me(c),G=Ae(c);if(M||G){const R=()=>{if(e.f){const V=M?$(c)?p[c]:u[c]:H()||!e.k?c.value:u[e.k];if(o)W(V)&&on(V,r);else if(W(V))V.includes(r)||V.push(r);else if(M)u[c]=[r],$(c)&&(p[c]=u[c]);else{const Z=[r];H(c,e.k)&&(c.value=Z),e.k&&(u[e.k]=Z)}}else M?(u[c]=i,$(c)&&(p[c]=i)):G&&(H(c,e.k)&&(c.value=i),e.k&&(u[e.k]=i))};if(i){const V=()=>{R(),bs.delete(e)};V.id=-1,bs.set(e,V),Oe(V,s)}else On(e),R()}}}function On(e){const t=bs.get(e);t&&(t.flags|=8,bs.delete(e))}As().requestIdleCallback;As().cancelIdleCallback;const Gt=e=>!!e.type.__asyncLoader,Uo=e=>e.type.__isKeepAlive;function hi(e,t){Bo(e,"a",t)}function mi(e,t){Bo(e,"da",t)}function Bo(e,t,s=ke){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Ms(t,n,s),s){let o=s.parent;for(;o&&o.parent;)Uo(o.parent.vnode)&&gi(n,t,s,o),o=o.parent}}function gi(e,t,s,n){const o=Ms(t,e,n,!0);vn(()=>{on(n[t],o)},s)}function Ms(e,t,s=ke,n=!1){if(s){const o=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...i)=>{dt();const a=ls(s),c=nt(t,s,e,i);return a(),ft(),c});return n?o.unshift(r):o.push(r),r}}const ht=e=>(t,s=ke)=>{(!ss||e==="sp")&&Ms(e,(...n)=>t(...n),s)},xi=ht("bm"),yt=ht("m"),vi=ht("bu"),yi=ht("u"),bi=ht("bum"),vn=ht("um"),_i=ht("sp"),wi=ht("rtg"),Si=ht("rtc");function Ci(e,t=ke){Ms("ec",e,t)}const Ti="components",Ko=Symbol.for("v-ndc");function ki(e){return me(e)?$i(Ti,e,!1)||e:e||Ko}function $i(e,t,s=!0,n=!1){const o=Ne||ke;if(o){const r=o.type;{const a=fl(r,!1);if(a&&(a===t||a===Me(t)||a===ks(Me(t))))return r}const i=Rn(o[e]||r[e],t)||Rn(o.appContext[e],t);return!i&&n?r:i}}function Rn(e,t){return e&&(e[t]||e[Me(t)]||e[ks(Me(t))])}function ve(e,t,s,n){let o;const r=s,i=W(e);if(i||me(e)){const a=i&&Tt(e);let c=!1,h=!1;a&&(c=!He(e),h=pt(e),e=Ps(e)),o=new Array(e.length);for(let u=0,p=e.length;u<p;u++)o[u]=t(c?h?Rt(Ke(e[u])):Ke(e[u]):e[u],u,void 0,r)}else if(typeof e=="number"){o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,r)}else if(le(e))if(e[Symbol.iterator])o=Array.from(e,(a,c)=>t(a,c,void 0,r));else{const a=Object.keys(e);o=new Array(a.length);for(let c=0,h=a.length;c<h;c++){const u=a[c];o[c]=t(e[u],u,c,r)}}else o=[];return o}const Zs=e=>e?fr(e)?Ds(e):Zs(e.parent):null,Yt=Ce(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=>Zs(e.parent),$root:e=>Zs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>zo(e),$forceUpdate:e=>e.f||(e.f=()=>{gn(e.update)}),$nextTick:e=>e.n||(e.n=Ro.bind(e.proxy)),$watch:e=>ui.bind(e)}),Us=(e,t)=>e!==ue&&!e.__isScriptSetup&&se(e,t),Ai={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:r,accessCache:i,type:a,appContext:c}=e;if(t[0]!=="$"){const x=i[t];if(x!==void 0)switch(x){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return r[t]}else{if(Us(n,t))return i[t]=1,n[t];if(o!==ue&&se(o,t))return i[t]=2,o[t];if(se(r,t))return i[t]=3,r[t];if(s!==ue&&se(s,t))return i[t]=4,s[t];Qs&&(i[t]=0)}}const h=Yt[t];let u,p;if(h)return t==="$attrs"&&Te(e.attrs,"get",""),h(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(s!==ue&&se(s,t))return i[t]=4,s[t];if(p=c.config.globalProperties,se(p,t))return p[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:r}=e;return Us(o,t)?(o[t]=s,!0):n!==ue&&se(n,t)?(n[t]=s,!0):se(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,props:r,type:i}},a){let c;return!!(s[a]||e!==ue&&a[0]!=="$"&&se(e,a)||Us(t,a)||se(r,a)||se(n,a)||se(Yt,a)||se(o.config.globalProperties,a)||(c=i.__cssModules)&&c[a])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:se(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Dn(e){return W(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Qs=!0;function Ei(e){const t=zo(e),s=e.proxy,n=e.ctx;Qs=!1,t.beforeCreate&&jn(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:i,watch:a,provide:c,inject:h,created:u,beforeMount:p,mounted:x,beforeUpdate:$,updated:H,activated:M,deactivated:G,beforeDestroy:R,beforeUnmount:V,destroyed:Z,unmounted:N,render:oe,renderTracked:_e,renderTriggered:J,errorCaptured:j,serverPrefetch:B,expose:re,inheritAttrs:ee,components:ge,directives:he,filters:Fe}=t;if(h&&Pi(h,n,null),i)for(const v in i){const g=i[v];Y(g)&&(n[v]=g.bind(s))}if(o){const v=o.call(s,s);le(v)&&(e.data=pn(v))}if(Qs=!0,r)for(const v in r){const g=r[v],ae=Y(g)?g.bind(s,s):Y(g.get)?g.get.bind(s,s):et,be=!Y(g)&&Y(g.set)?g.set.bind(s):et,I=Ue({get:ae,set:be});Object.defineProperty(n,v,{enumerable:!0,configurable:!0,get:()=>I.value,set:Ee=>I.value=Ee})}if(a)for(const v in a)Wo(a[v],n,s,v);if(c){const v=Y(c)?c.call(s):c;Reflect.ownKeys(v).forEach(g=>{li(g,v[g])})}u&&jn(u,e,"c");function O(v,g){W(g)?g.forEach(ae=>v(ae.bind(s))):g&&v(g.bind(s))}if(O(xi,p),O(yt,x),O(vi,$),O(yi,H),O(hi,M),O(mi,G),O(Ci,j),O(Si,_e),O(wi,J),O(bi,V),O(vn,N),O(_i,B),W(re))if(re.length){const v=e.exposed||(e.exposed={});re.forEach(g=>{Object.defineProperty(v,g,{get:()=>s[g],set:ae=>s[g]=ae,enumerable:!0})})}else e.exposed||(e.exposed={});oe&&e.render===et&&(e.render=oe),ee!=null&&(e.inheritAttrs=ee),ge&&(e.components=ge),he&&(e.directives=he),B&&Vo(e)}function Pi(e,t,s=et){W(e)&&(e=Xs(e));for(const n in e){const o=e[n];let r;le(o)?"default"in o?r=ps(o.from||n,o.default,!0):r=ps(o.from||n):r=ps(o),Ae(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:i=>r.value=i}):t[n]=r}}function jn(e,t,s){nt(W(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Wo(e,t,s,n){let o=n.includes(".")?Ho(s,n):()=>s[n];if(me(e)){const r=t[e];Y(r)&&Vs(o,r)}else if(Y(e))Vs(o,e.bind(s));else if(le(e))if(W(e))e.forEach(r=>Wo(r,t,s,n));else{const r=Y(e.handler)?e.handler.bind(s):t[e.handler];Y(r)&&Vs(o,r,e)}}function zo(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,a=r.get(t);let c;return a?c=a:!o.length&&!s&&!n?c=t:(c={},o.length&&o.forEach(h=>_s(c,h,i,!0)),_s(c,t,i)),le(t)&&r.set(t,c),c}function _s(e,t,s,n=!1){const{mixins:o,extends:r}=t;r&&_s(e,r,s,!0),o&&o.forEach(i=>_s(e,i,s,!0));for(const i in t)if(!(n&&i==="expose")){const a=Ii[i]||s&&s[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const Ii={data:Nn,props:Ln,emits:Ln,methods:Kt,computed:Kt,beforeCreate:Pe,created:Pe,beforeMount:Pe,mounted:Pe,beforeUpdate:Pe,updated:Pe,beforeDestroy:Pe,beforeUnmount:Pe,destroyed:Pe,unmounted:Pe,activated:Pe,deactivated:Pe,errorCaptured:Pe,serverPrefetch:Pe,components:Kt,directives:Kt,watch:Oi,provide:Nn,inject:Mi};function Nn(e,t){return t?e?function(){return Ce(Y(e)?e.call(this,this):e,Y(t)?t.call(this,this):t)}:t:e}function Mi(e,t){return Kt(Xs(e),Xs(t))}function Xs(e){if(W(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Pe(e,t){return e?[...new Set([].concat(e,t))]:t}function Kt(e,t){return e?Ce(Object.create(null),e,t):t}function Ln(e,t){return e?W(e)&&W(t)?[...new Set([...e,...t])]:Ce(Object.create(null),Dn(e),Dn(t??{})):t}function Oi(e,t){if(!e)return t;if(!t)return e;const s=Ce(Object.create(null),e);for(const n in t)s[n]=Pe(e[n],t[n]);return s}function Jo(){return{app:null,config:{isNativeTag:co,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 Ri=0;function Di(e,t){return function(n,o=null){Y(n)||(n=Ce({},n)),o!=null&&!le(o)&&(o=null);const r=Jo(),i=new WeakSet,a=[];let c=!1;const h=r.app={_uid:Ri++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:hl,get config(){return r.config},set config(u){},use(u,...p){return i.has(u)||(u&&Y(u.install)?(i.add(u),u.install(h,...p)):Y(u)&&(i.add(u),u(h,...p))),h},mixin(u){return r.mixins.includes(u)||r.mixins.push(u),h},component(u,p){return p?(r.components[u]=p,h):r.components[u]},directive(u,p){return p?(r.directives[u]=p,h):r.directives[u]},mount(u,p,x){if(!c){const $=h._ceVNode||tt(n,o);return $.appContext=r,x===!0?x="svg":x===!1&&(x=void 0),e($,u,x),c=!0,h._container=u,u.__vue_app__=h,Ds($.component)}},onUnmount(u){a.push(u)},unmount(){c&&(nt(a,h._instance,16),e(null,h._container),delete h._container.__vue_app__)},provide(u,p){return r.provides[u]=p,h},runWithContext(u){const p=Ot;Ot=h;try{return u()}finally{Ot=p}}};return h}}let Ot=null;const ji=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Me(t)}Modifiers`]||e[`${vt(t)}Modifiers`];function Ni(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||ue;let o=s;const r=t.startsWith("update:"),i=r&&ji(n,t.slice(7));i&&(i.trim&&(o=s.map(u=>me(u)?u.trim():u)),i.number&&(o=s.map($s)));let a,c=n[a=js(t)]||n[a=js(Me(t))];!c&&r&&(c=n[a=js(vt(t))]),c&&nt(c,e,6,o);const h=n[a+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,nt(h,e,6,o)}}const Li=new WeakMap;function qo(e,t,s=!1){const n=s?Li:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const r=e.emits;let i={},a=!1;if(!Y(e)){const c=h=>{const u=qo(h,t,!0);u&&(a=!0,Ce(i,u))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!a?(le(e)&&n.set(e,null),null):(W(r)?r.forEach(c=>i[c]=null):Ce(i,r),le(e)&&n.set(e,i),i)}function Os(e,t){return!e||!Ss(t)?!1:(t=t.slice(2).replace(/Once$/,""),se(e,t[0].toLowerCase()+t.slice(1))||se(e,vt(t))||se(e,t))}function Fn(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[r],slots:i,attrs:a,emit:c,render:h,renderCache:u,props:p,data:x,setupState:$,ctx:H,inheritAttrs:M}=e,G=ys(e);let R,V;try{if(s.shapeFlag&4){const N=o||n,oe=N;R=Qe(h.call(oe,N,u,p,$,x,H)),V=a}else{const N=t;R=Qe(N.length>1?N(p,{attrs:a,slots:i,emit:c}):N(p,null)),V=t.props?a:Fi(a)}}catch(N){Zt.length=0,Is(N,e,1),R=tt(xt)}let Z=R;if(V&&M!==!1){const N=Object.keys(V),{shapeFlag:oe}=Z;N.length&&oe&7&&(r&&N.some(Cs)&&(V=Hi(V,r)),Z=Dt(Z,V,!1,!0))}return s.dirs&&(Z=Dt(Z,null,!1,!0),Z.dirs=Z.dirs?Z.dirs.concat(s.dirs):s.dirs),s.transition&&xn(Z,s.transition),R=Z,ys(G),R}const Fi=e=>{let t;for(const s in e)(s==="class"||s==="style"||Ss(s))&&((t||(t={}))[s]=e[s]);return t},Hi=(e,t)=>{const s={};for(const n in e)(!Cs(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Vi(e,t,s){const{props:n,children:o,component:r}=e,{props:i,children:a,patchFlag:c}=t,h=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?Hn(n,i,h):!!i;if(c&8){const u=t.dynamicProps;for(let p=0;p<u.length;p++){const x=u[p];if(Go(i,n,x)&&!Os(h,x))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:n===i?!1:n?i?Hn(n,i,h):!0:!!i;return!1}function Hn(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let o=0;o<n.length;o++){const r=n[o];if(Go(t,e,r)&&!Os(s,r))return!0}return!1}function Go(e,t,s){const n=e[s],o=t[s];return s==="style"&&le(n)&&le(o)?!Lt(n,o):n!==o}function Ui({vnode:e,parent:t,suspense:s},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.suspense.vnode.el=o.el=n,e=o),o===e)(e=t.vnode).el=n,t=t.parent;else break}s&&s.activeBranch===e&&(s.vnode.el=n)}const Yo={},Zo=()=>Object.create(Yo),Qo=e=>Object.getPrototypeOf(e)===Yo;function Bi(e,t,s,n=!1){const o={},r=Zo();e.propsDefaults=Object.create(null),Xo(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);s?e.props=n?o:Jr(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function Ki(e,t,s,n){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,a=te(o),[c]=e.propsOptions;let h=!1;if((n||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let p=0;p<u.length;p++){let x=u[p];if(Os(e.emitsOptions,x))continue;const $=t[x];if(c)if(se(r,x))$!==r[x]&&(r[x]=$,h=!0);else{const H=Me(x);o[H]=en(c,a,H,$,e,!1)}else $!==r[x]&&(r[x]=$,h=!0)}}}else{Xo(e,t,o,r)&&(h=!0);let u;for(const p in a)(!t||!se(t,p)&&((u=vt(p))===p||!se(t,u)))&&(c?s&&(s[p]!==void 0||s[u]!==void 0)&&(o[p]=en(c,a,p,void 0,e,!0)):delete o[p]);if(r!==a)for(const p in r)(!t||!se(t,p))&&(delete r[p],h=!0)}h&&at(e.attrs,"set","")}function Xo(e,t,s,n){const[o,r]=e.propsOptions;let i=!1,a;if(t)for(let c in t){if(Wt(c))continue;const h=t[c];let u;o&&se(o,u=Me(c))?!r||!r.includes(u)?s[u]=h:(a||(a={}))[u]=h:Os(e.emitsOptions,c)||(!(c in n)||h!==n[c])&&(n[c]=h,i=!0)}if(r){const c=te(s),h=a||ue;for(let u=0;u<r.length;u++){const p=r[u];s[p]=en(o,c,p,h[p],e,!se(h,p))}}return i}function en(e,t,s,n,o,r){const i=e[s];if(i!=null){const a=se(i,"default");if(a&&n===void 0){const c=i.default;if(i.type!==Function&&!i.skipFactory&&Y(c)){const{propsDefaults:h}=o;if(s in h)n=h[s];else{const u=ls(o);n=h[s]=c.call(null,t),u()}}else n=c;o.ce&&o.ce._setProp(s,n)}i[0]&&(r&&!a?n=!1:i[1]&&(n===""||n===vt(s))&&(n=!0))}return n}const Wi=new WeakMap;function er(e,t,s=!1){const n=s?Wi:t.propsCache,o=n.get(e);if(o)return o;const r=e.props,i={},a=[];let c=!1;if(!Y(e)){const u=p=>{c=!0;const[x,$]=er(p,t,!0);Ce(i,x),$&&a.push(...$)};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!r&&!c)return le(e)&&n.set(e,Pt),Pt;if(W(r))for(let u=0;u<r.length;u++){const p=Me(r[u]);Vn(p)&&(i[p]=ue)}else if(r)for(const u in r){const p=Me(u);if(Vn(p)){const x=r[u],$=i[p]=W(x)||Y(x)?{type:x}:Ce({},x),H=$.type;let M=!1,G=!0;if(W(H))for(let R=0;R<H.length;++R){const V=H[R],Z=Y(V)&&V.name;if(Z==="Boolean"){M=!0;break}else Z==="String"&&(G=!1)}else M=Y(H)&&H.name==="Boolean";$[0]=M,$[1]=G,(M||se($,"default"))&&a.push(p)}}const h=[i,a];return le(e)&&n.set(e,h),h}function Vn(e){return e[0]!=="$"&&!Wt(e)}const yn=e=>e==="_"||e==="_ctx"||e==="$stable",bn=e=>W(e)?e.map(Qe):[Qe(e)],zi=(e,t,s)=>{if(t._n)return t;const n=ii((...o)=>bn(t(...o)),s);return n._c=!1,n},tr=(e,t,s)=>{const n=e._ctx;for(const o in e){if(yn(o))continue;const r=e[o];if(Y(r))t[o]=zi(o,r,n);else if(r!=null){const i=bn(r);t[o]=()=>i}}},sr=(e,t)=>{const s=bn(t);e.slots.default=()=>s},nr=(e,t,s)=>{for(const n in t)(s||!yn(n))&&(e[n]=t[n])},Ji=(e,t,s)=>{const n=e.slots=Zo();if(e.vnode.shapeFlag&32){const o=t._;o?(nr(n,t,s),s&&ho(n,"_",o,!0)):tr(t,n)}else t&&sr(e,t)},qi=(e,t,s)=>{const{vnode:n,slots:o}=e;let r=!0,i=ue;if(n.shapeFlag&32){const a=t._;a?s&&a===1?r=!1:nr(o,t,s):(r=!t.$stable,tr(t,o)),i=t}else t&&(sr(e,t),i={default:1});if(r)for(const a in o)!yn(a)&&i[a]==null&&delete o[a]},Oe=Xi;function Gi(e){return Yi(e)}function Yi(e,t){const s=As();s.__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:i,createText:a,createComment:c,setText:h,setElementText:u,parentNode:p,nextSibling:x,setScopeId:$=et,insertStaticContent:H}=e,M=(d,f,m,S=null,y=null,b=null,P=void 0,E=null,A=!!f.dynamicChildren)=>{if(d===f)return;d&&!Ut(d,f)&&(S=ie(d),Ee(d,y,b,!0),d=null),f.patchFlag===-2&&(A=!1,f.dynamicChildren=null);const{type:_,ref:K,shapeFlag:D}=f;switch(_){case Rs:G(d,f,m,S);break;case xt:R(d,f,m,S);break;case hs:d==null&&V(f,m,S,P);break;case ne:ge(d,f,m,S,y,b,P,E,A);break;default:D&1?oe(d,f,m,S,y,b,P,E,A):D&6?he(d,f,m,S,y,b,P,E,A):(D&64||D&128)&&_.process(d,f,m,S,y,b,P,E,A,Ft)}K!=null&&y?qt(K,d&&d.ref,b,f||d,!f):K==null&&d&&d.ref!=null&&qt(d.ref,null,b,d,!0)},G=(d,f,m,S)=>{if(d==null)n(f.el=a(f.children),m,S);else{const y=f.el=d.el;f.children!==d.children&&h(y,f.children)}},R=(d,f,m,S)=>{d==null?n(f.el=c(f.children||""),m,S):f.el=d.el},V=(d,f,m,S)=>{[d.el,d.anchor]=H(d.children,f,m,S,d.el,d.anchor)},Z=({el:d,anchor:f},m,S)=>{let y;for(;d&&d!==f;)y=x(d),n(d,m,S),d=y;n(f,m,S)},N=({el:d,anchor:f})=>{let m;for(;d&&d!==f;)m=x(d),o(d),d=m;o(f)},oe=(d,f,m,S,y,b,P,E,A)=>{if(f.type==="svg"?P="svg":f.type==="math"&&(P="mathml"),d==null)_e(f,m,S,y,b,P,E,A);else{const _=d.el&&d.el._isVueCE?d.el:null;try{_&&_._beginPatch(),B(d,f,y,b,P,E,A)}finally{_&&_._endPatch()}}},_e=(d,f,m,S,y,b,P,E)=>{let A,_;const{props:K,shapeFlag:D,transition:U,dirs:z}=d;if(A=d.el=i(d.type,b,K&&K.is,K),D&8?u(A,d.children):D&16&&j(d.children,A,null,S,y,Bs(d,b),P,E),z&&_t(d,null,S,"created"),J(A,d,d.scopeId,P,S),K){for(const ce in K)ce!=="value"&&!Wt(ce)&&r(A,ce,null,K[ce],b,S);"value"in K&&r(A,"value",null,K.value,b),(_=K.onVnodeBeforeMount)&&Ge(_,S,d)}z&&_t(d,null,S,"beforeMount");const X=Zi(y,U);X&&U.beforeEnter(A),n(A,f,m),((_=K&&K.onVnodeMounted)||X||z)&&Oe(()=>{try{_&&Ge(_,S,d),X&&U.enter(A),z&&_t(d,null,S,"mounted")}finally{}},y)},J=(d,f,m,S,y)=>{if(m&&$(d,m),S)for(let b=0;b<S.length;b++)$(d,S[b]);if(y){let b=y.subTree;if(f===b||lr(b.type)&&(b.ssContent===f||b.ssFallback===f)){const P=y.vnode;J(d,P,P.scopeId,P.slotScopeIds,y.parent)}}},j=(d,f,m,S,y,b,P,E,A=0)=>{for(let _=A;_<d.length;_++){const K=d[_]=E?lt(d[_]):Qe(d[_]);M(null,K,f,m,S,y,b,P,E)}},B=(d,f,m,S,y,b,P)=>{const E=f.el=d.el;let{patchFlag:A,dynamicChildren:_,dirs:K}=f;A|=d.patchFlag&16;const D=d.props||ue,U=f.props||ue;let z;if(m&&wt(m,!1),(z=U.onVnodeBeforeUpdate)&&Ge(z,m,f,d),K&&_t(f,d,m,"beforeUpdate"),m&&wt(m,!0),(D.innerHTML&&U.innerHTML==null||D.textContent&&U.textContent==null)&&u(E,""),_?re(d.dynamicChildren,_,E,m,S,Bs(f,y),b):P||g(d,f,E,null,m,S,Bs(f,y),b,!1),A>0){if(A&16)ee(E,D,U,m,y);else if(A&2&&D.class!==U.class&&r(E,"class",null,U.class,y),A&4&&r(E,"style",D.style,U.style,y),A&8){const X=f.dynamicProps;for(let ce=0;ce<X.length;ce++){const de=X[ce],xe=D[de],we=U[de];(we!==xe||de==="value")&&r(E,de,xe,we,y,m)}}A&1&&d.children!==f.children&&u(E,f.children)}else!P&&_==null&&ee(E,D,U,m,y);((z=U.onVnodeUpdated)||K)&&Oe(()=>{z&&Ge(z,m,f,d),K&&_t(f,d,m,"updated")},S)},re=(d,f,m,S,y,b,P)=>{for(let E=0;E<f.length;E++){const A=d[E],_=f[E],K=A.el&&(A.type===ne||!Ut(A,_)||A.shapeFlag&198)?p(A.el):m;M(A,_,K,null,S,y,b,P,!0)}},ee=(d,f,m,S,y)=>{if(f!==m){if(f!==ue)for(const b in f)!Wt(b)&&!(b in m)&&r(d,b,f[b],null,y,S);for(const b in m){if(Wt(b))continue;const P=m[b],E=f[b];P!==E&&b!=="value"&&r(d,b,E,P,y,S)}"value"in m&&r(d,"value",f.value,m.value,y)}},ge=(d,f,m,S,y,b,P,E,A)=>{const _=f.el=d?d.el:a(""),K=f.anchor=d?d.anchor:a("");let{patchFlag:D,dynamicChildren:U,slotScopeIds:z}=f;z&&(E=E?E.concat(z):z),d==null?(n(_,m,S),n(K,m,S),j(f.children||[],m,K,y,b,P,E,A)):D>0&&D&64&&U&&d.dynamicChildren&&d.dynamicChildren.length===U.length?(re(d.dynamicChildren,U,m,y,b,P,E),(f.key!=null||y&&f===y.subTree)&&or(d,f,!0)):g(d,f,m,K,y,b,P,E,A)},he=(d,f,m,S,y,b,P,E,A)=>{f.slotScopeIds=E,d==null?f.shapeFlag&512?y.ctx.activate(f,m,S,P,A):Fe(f,m,S,y,b,P,A):We(d,f,A)},Fe=(d,f,m,S,y,b,P)=>{const E=d.component=il(d,S,y);if(Uo(d)&&(E.ctx.renderer=Ft),al(E,!1,P),E.asyncDep){if(y&&y.registerDep(E,O,P),!d.el){const A=E.subTree=tt(xt);R(null,A,f,m),d.placeholder=A.el}}else O(E,d,f,m,y,b,P)},We=(d,f,m)=>{const S=f.component=d.component;if(Vi(d,f,m))if(S.asyncDep&&!S.asyncResolved){v(S,f,m);return}else S.next=f,S.update();else f.el=d.el,S.vnode=f},O=(d,f,m,S,y,b,P)=>{const E=()=>{if(d.isMounted){let{next:D,bu:U,u:z,parent:X,vnode:ce}=d;{const Je=rr(d);if(Je){D&&(D.el=ce.el,v(d,D,P)),Je.asyncDep.then(()=>{Oe(()=>{d.isUnmounted||_()},y)});return}}let de=D,xe;wt(d,!1),D?(D.el=ce.el,v(d,D,P)):D=ce,U&&fs(U),(xe=D.props&&D.props.onVnodeBeforeUpdate)&&Ge(xe,X,D,ce),wt(d,!0);const we=Fn(d),ze=d.subTree;d.subTree=we,M(ze,we,p(ze.el),ie(ze),d,y,b),D.el=we.el,de===null&&Ui(d,we.el),z&&Oe(z,y),(xe=D.props&&D.props.onVnodeUpdated)&&Oe(()=>Ge(xe,X,D,ce),y)}else{let D;const{el:U,props:z}=f,{bm:X,m:ce,parent:de,root:xe,type:we}=d,ze=Gt(f);wt(d,!1),X&&fs(X),!ze&&(D=z&&z.onVnodeBeforeMount)&&Ge(D,de,f),wt(d,!0);{xe.ce&&xe.ce._hasShadowRoot()&&xe.ce._injectChildStyle(we,d.parent?d.parent.type:void 0);const Je=d.subTree=Fn(d);M(null,Je,m,S,d,y,b),f.el=Je.el}if(ce&&Oe(ce,y),!ze&&(D=z&&z.onVnodeMounted)){const Je=f;Oe(()=>Ge(D,de,Je),y)}(f.shapeFlag&256||de&&Gt(de.vnode)&&de.vnode.shapeFlag&256)&&d.a&&Oe(d.a,y),d.isMounted=!0,f=m=S=null}};d.scope.on();const A=d.effect=new vo(E);d.scope.off();const _=d.update=A.run.bind(A),K=d.job=A.runIfDirty.bind(A);K.i=d,K.id=d.uid,A.scheduler=()=>gn(K),wt(d,!0),_()},v=(d,f,m)=>{f.component=d;const S=d.vnode.props;d.vnode=f,d.next=null,Ki(d,f.props,S,m),qi(d,f.children,m),dt(),In(d),ft()},g=(d,f,m,S,y,b,P,E,A=!1)=>{const _=d&&d.children,K=d?d.shapeFlag:0,D=f.children,{patchFlag:U,shapeFlag:z}=f;if(U>0){if(U&128){be(_,D,m,S,y,b,P,E,A);return}else if(U&256){ae(_,D,m,S,y,b,P,E,A);return}}z&8?(K&16&&De(_,y,b),D!==_&&u(m,D)):K&16?z&16?be(_,D,m,S,y,b,P,E,A):De(_,y,b,!0):(K&8&&u(m,""),z&16&&j(D,m,S,y,b,P,E,A))},ae=(d,f,m,S,y,b,P,E,A)=>{d=d||Pt,f=f||Pt;const _=d.length,K=f.length,D=Math.min(_,K);let U;for(U=0;U<D;U++){const z=f[U]=A?lt(f[U]):Qe(f[U]);M(d[U],z,m,null,y,b,P,E,A)}_>K?De(d,y,b,!0,!1,D):j(f,m,S,y,b,P,E,A,D)},be=(d,f,m,S,y,b,P,E,A)=>{let _=0;const K=f.length;let D=d.length-1,U=K-1;for(;_<=D&&_<=U;){const z=d[_],X=f[_]=A?lt(f[_]):Qe(f[_]);if(Ut(z,X))M(z,X,m,null,y,b,P,E,A);else break;_++}for(;_<=D&&_<=U;){const z=d[D],X=f[U]=A?lt(f[U]):Qe(f[U]);if(Ut(z,X))M(z,X,m,null,y,b,P,E,A);else break;D--,U--}if(_>D){if(_<=U){const z=U+1,X=z<K?f[z].el:S;for(;_<=U;)M(null,f[_]=A?lt(f[_]):Qe(f[_]),m,X,y,b,P,E,A),_++}}else if(_>U)for(;_<=D;)Ee(d[_],y,b,!0),_++;else{const z=_,X=_,ce=new Map;for(_=X;_<=U;_++){const je=f[_]=A?lt(f[_]):Qe(f[_]);je.key!=null&&ce.set(je.key,_)}let de,xe=0;const we=U-X+1;let ze=!1,Je=0;const Ht=new Array(we);for(_=0;_<we;_++)Ht[_]=0;for(_=z;_<=D;_++){const je=d[_];if(xe>=we){Ee(je,y,b,!0);continue}let qe;if(je.key!=null)qe=ce.get(je.key);else for(de=X;de<=U;de++)if(Ht[de-X]===0&&Ut(je,f[de])){qe=de;break}qe===void 0?Ee(je,y,b,!0):(Ht[qe-X]=_+1,qe>=Je?Je=qe:ze=!0,M(je,f[qe],m,null,y,b,P,E,A),xe++)}const Cn=ze?Qi(Ht):Pt;for(de=Cn.length-1,_=we-1;_>=0;_--){const je=X+_,qe=f[je],Tn=f[je+1],kn=je+1<K?Tn.el||ir(Tn):S;Ht[_]===0?M(null,qe,m,kn,y,b,P,E,A):ze&&(de<0||_!==Cn[de]?I(qe,m,kn,2):de--)}}},I=(d,f,m,S,y=null)=>{const{el:b,type:P,transition:E,children:A,shapeFlag:_}=d;if(_&6){I(d.component.subTree,f,m,S);return}if(_&128){d.suspense.move(f,m,S);return}if(_&64){P.move(d,f,m,Ft);return}if(P===ne){n(b,f,m);for(let D=0;D<A.length;D++)I(A[D],f,m,S);n(d.anchor,f,m);return}if(P===hs){Z(d,f,m);return}if(S!==2&&_&1&&E)if(S===0)E.beforeEnter(b),n(b,f,m),Oe(()=>E.enter(b),y);else{const{leave:D,delayLeave:U,afterLeave:z}=E,X=()=>{d.ctx.isUnmounted?o(b):n(b,f,m)},ce=()=>{b._isLeaving&&b[pi](!0),D(b,()=>{X(),z&&z()})};U?U(b,X,ce):ce()}else n(b,f,m)},Ee=(d,f,m,S=!1,y=!1)=>{const{type:b,props:P,ref:E,children:A,dynamicChildren:_,shapeFlag:K,patchFlag:D,dirs:U,cacheIndex:z,memo:X}=d;if(D===-2&&(y=!1),E!=null&&(dt(),qt(E,null,m,d,!0),ft()),z!=null&&(f.renderCache[z]=void 0),K&256){f.ctx.deactivate(d);return}const ce=K&1&&U,de=!Gt(d);let xe;if(de&&(xe=P&&P.onVnodeBeforeUnmount)&&Ge(xe,f,d),K&6)ot(d.component,m,S);else{if(K&128){d.suspense.unmount(m,S);return}ce&&_t(d,null,f,"beforeUnmount"),K&64?d.type.remove(d,f,m,Ft,S):_&&!_.hasOnce&&(b!==ne||D>0&&D&64)?De(_,f,m,!1,!0):(b===ne&&D&384||!y&&K&16)&&De(A,f,m),S&&F(d)}const we=X!=null&&z==null;(de&&(xe=P&&P.onVnodeUnmounted)||ce||we)&&Oe(()=>{xe&&Ge(xe,f,d),ce&&_t(d,null,f,"unmounted"),we&&(d.el=null)},m)},F=d=>{const{type:f,el:m,anchor:S,transition:y}=d;if(f===ne){k(m,S);return}if(f===hs){N(d);return}const b=()=>{o(m),y&&!y.persisted&&y.afterLeave&&y.afterLeave()};if(d.shapeFlag&1&&y&&!y.persisted){const{leave:P,delayLeave:E}=y,A=()=>P(m,b);E?E(d.el,b,A):A()}else b()},k=(d,f)=>{let m;for(;d!==f;)m=x(d),o(d),d=m;o(f)},ot=(d,f,m)=>{const{bum:S,scope:y,job:b,subTree:P,um:E,m:A,a:_}=d;Un(A),Un(_),S&&fs(S),y.stop(),b&&(b.flags|=8,Ee(P,d,f,m)),E&&Oe(E,f),Oe(()=>{d.isUnmounted=!0},f)},De=(d,f,m,S=!1,y=!1,b=0)=>{for(let P=b;P<d.length;P++)Ee(d[P],f,m,S,y)},ie=d=>{if(d.shapeFlag&6)return ie(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const f=x(d.anchor||d.el),m=f&&f[di];return m?x(m):f};let bt=!1;const Sn=(d,f,m)=>{let S;d==null?f._vnode&&(Ee(f._vnode,null,null,!0),S=f._vnode.component):M(f._vnode||null,d,f,null,null,null,m),f._vnode=d,bt||(bt=!0,In(S),jo(),bt=!1)},Ft={p:M,um:Ee,m:I,r:F,mt:Fe,mc:j,pc:g,pbc:re,n:ie,o:e};return{render:Sn,hydrate:void 0,createApp:Di(Sn)}}function Bs({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 wt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Zi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function or(e,t,s=!1){const n=e.children,o=t.children;if(W(n)&&W(o))for(let r=0;r<n.length;r++){const i=n[r];let a=o[r];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[r]=lt(o[r]),a.el=i.el),!s&&a.patchFlag!==-2&&or(i,a)),a.type===Rs&&(a.patchFlag===-1&&(a=o[r]=lt(a)),a.el=i.el),a.type===xt&&!a.el&&(a.el=i.el)}}function Qi(e){const t=e.slice(),s=[0];let n,o,r,i,a;const c=e.length;for(n=0;n<c;n++){const h=e[n];if(h!==0){if(o=s[s.length-1],e[o]<h){t[n]=o,s.push(n);continue}for(r=0,i=s.length-1;r<i;)a=r+i>>1,e[s[a]]<h?r=a+1:i=a;h<e[s[r]]&&(r>0&&(t[n]=s[r-1]),s[r]=n)}}for(r=s.length,i=s[r-1];r-- >0;)s[r]=i,i=t[i];return s}function rr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:rr(t)}function Un(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function ir(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?ir(t.subTree):null}const lr=e=>e.__isSuspense;function Xi(e,t){t&&t.pendingBranch?W(e)?t.effects.push(...e):t.effects.push(e):ri(e)}const ne=Symbol.for("v-fgt"),Rs=Symbol.for("v-txt"),xt=Symbol.for("v-cmt"),hs=Symbol.for("v-stc"),Zt=[];let Le=null;function w(e=!1){Zt.push(Le=e?null:[])}function el(){Zt.pop(),Le=Zt[Zt.length-1]||null}let ts=1;function Bn(e,t=!1){ts+=e,e<0&&Le&&t&&(Le.hasOnce=!0)}function ar(e){return e.dynamicChildren=ts>0?Le||Pt:null,el(),ts>0&&Le&&Le.push(e),e}function C(e,t,s,n,o,r){return ar(l(e,t,s,n,o,r,!0))}function cr(e,t,s,n,o){return ar(tt(e,t,s,n,o,!0))}function ur(e){return e?e.__v_isVNode===!0:!1}function Ut(e,t){return e.type===t.type&&e.key===t.key}const dr=({key:e})=>e??null,ms=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?me(e)||Ae(e)||Y(e)?{i:Ne,r:e,k:t,f:!!s}:e:null);function l(e,t=null,s=null,n=0,o=null,r=e===ne?0:1,i=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&dr(t),ref:t&&ms(t),scopeId:Lo,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:r,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ne};return a?(_n(c,s),r&128&&e.normalize(c)):s&&(c.shapeFlag|=me(s)?8:16),ts>0&&!i&&Le&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&Le.push(c),c}const tt=tl;function tl(e,t=null,s=null,n=0,o=null,r=!1){if((!e||e===Ko)&&(e=xt),ur(e)){const a=Dt(e,t,!0);return s&&_n(a,s),ts>0&&!r&&Le&&(a.shapeFlag&6?Le[Le.indexOf(e)]=a:Le.push(a)),a.patchFlag=-2,a}if(pl(e)&&(e=e.__vccOpts),t){t=sl(t);let{class:a,style:c}=t;a&&!me(a)&&(t.class=q(a)),le(c)&&(mn(c)&&!W(c)&&(c=Ce({},c)),t.style=Es(c))}const i=me(e)?1:lr(e)?128:fi(e)?64:le(e)?4:Y(e)?2:0;return l(e,t,s,n,o,i,r,!0)}function sl(e){return e?mn(e)||Qo(e)?Ce({},e):e:null}function Dt(e,t,s=!1,n=!1){const{props:o,ref:r,patchFlag:i,children:a,transition:c}=e,h=t?nl(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&dr(h),ref:t&&t.ref?s&&r?W(r)?r.concat(ms(t)):[r,ms(t)]:ms(t):r,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!==ne?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Dt(e.ssContent),ssFallback:e.ssFallback&&Dt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&xn(u,c.clone(u)),u}function Et(e=" ",t=0){return tt(Rs,null,e,t)}function Ve(e,t){const s=tt(hs,null,e);return s.staticCount=t,s}function Q(e="",t=!1){return t?(w(),cr(xt,null,e)):tt(xt,null,e)}function Qe(e){return e==null||typeof e=="boolean"?tt(xt):W(e)?tt(ne,null,e.slice()):ur(e)?lt(e):tt(Rs,null,String(e))}function lt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Dt(e)}function _n(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(W(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),_n(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!Qo(t)?t._ctx=Ne:o===3&&Ne&&(Ne.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Y(t)?(t={default:t,_ctx:Ne},s=32):(t=String(t),n&64?(s=16,t=[Et(t)]):s=8);e.children=t,e.shapeFlag|=s}function nl(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const o in n)if(o==="class")t.class!==n.class&&(t.class=q([t.class,n.class]));else if(o==="style")t.style=Es([t.style,n.style]);else if(Ss(o)){const r=t[o],i=n[o];i&&r!==i&&!(W(r)&&r.includes(i))?t[o]=r?[].concat(r,i):i:i==null&&r==null&&!Cs(o)&&(t[o]=i)}else o!==""&&(t[o]=n[o])}return t}function Ge(e,t,s,n=null){nt(e,t,7,[s,n])}const ol=Jo();let rl=0;function il(e,t,s){const n=e.type,o=(t?t.appContext:e.appContext)||ol,r={uid:rl++,vnode:e,type:n,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new $r(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:er(n,o),emitsOptions:qo(n,o),emit:null,emitted:null,propsDefaults:ue,inheritAttrs:n.inheritAttrs,ctx:ue,data:ue,props:ue,attrs:ue,slots:ue,refs:ue,setupState:ue,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 r.ctx={_:r},r.root=t?t.root:r,r.emit=Ni.bind(null,r),e.ce&&e.ce(r),r}let ke=null;const ll=()=>ke||Ne;let ws,tn;{const e=As(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),r=>{o.length>1?o.forEach(i=>i(r)):o[0](r)}};ws=t("__VUE_INSTANCE_SETTERS__",s=>ke=s),tn=t("__VUE_SSR_SETTERS__",s=>ss=s)}const ls=e=>{const t=ke;return ws(e),e.scope.on(),()=>{e.scope.off(),ws(t)}},Kn=()=>{ke&&ke.scope.off(),ws(null)};function fr(e){return e.vnode.shapeFlag&4}let ss=!1;function al(e,t=!1,s=!1){t&&tn(t);const{props:n,children:o}=e.vnode,r=fr(e);Bi(e,n,r,t),Ji(e,o,s||t);const i=r?cl(e,t):void 0;return t&&tn(!1),i}function cl(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ai);const{setup:n}=s;if(n){dt();const o=e.setupContext=n.length>1?dl(e):null,r=ls(e),i=is(n,e,0,[e.props,o]),a=uo(i);if(ft(),r(),(a||e.sp)&&!Gt(e)&&Vo(e),a){if(i.then(Kn,Kn),t)return i.then(c=>{Wn(e,c)}).catch(c=>{Is(c,e,0)});e.asyncDep=i}else Wn(e,i)}else pr(e)}function Wn(e,t,s){Y(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:le(t)&&(e.setupState=Mo(t)),pr(e)}function pr(e,t,s){const n=e.type;e.render||(e.render=n.render||et);{const o=ls(e);dt();try{Ei(e)}finally{ft(),o()}}}const ul={get(e,t){return Te(e,"get",""),e[t]}};function dl(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,ul),slots:e.slots,emit:e.emit,expose:t}}function Ds(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Mo(qr(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Yt)return Yt[s](e)},has(t,s){return s in t||s in Yt}})):e.proxy}function fl(e,t=!0){return Y(e)?e.displayName||e.name:e.name||t&&e.__name}function pl(e){return Y(e)&&"__vccOpts"in e}const Ue=(e,t)=>ei(e,t,ss),hl="3.5.31";/**
|
|
60
|
+
**/function is(e,t,s,n){try{return n?e(...n):e()}catch(o){Is(o,t,s)}}function ot(e,t,s,n){if(Y(e)){const o=is(e,t,s,n);return o&&fo(o)&&o.catch(r=>{Is(r,t,s)}),o}if(W(e)){const o=[];for(let r=0;r<e.length;r++)o.push(ot(e[r],t,s,n));return o}}function Is(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||ue;if(t){let a=t.parent;const c=t.proxy,p=`https://vuejs.org/error-reference/#runtime-${s}`;for(;a;){const u=a.ec;if(u){for(let h=0;h<u.length;h++)if(u[h](e,c,p)===!1)return}a=a.parent}if(r){dt(),is(r,null,10,[e,c,p]),ft();return}}oi(e,s,o,n,i)}function oi(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const Re=[];let Ze=-1;const Mt=[];let mt=null,At=0;const Ro=Promise.resolve();let vs=null;function Do(e){const t=vs||Ro;return e?t.then(this?e.bind(this):e):t}function ri(e){let t=Ze+1,s=Re.length;for(;t<s;){const n=t+s>>>1,o=Re[n],r=es(o);r<e||r===e&&o.flags&2?t=n+1:s=n}return t}function xn(e){if(!(e.flags&1)){const t=es(e),s=Re[Re.length-1];!s||!(e.flags&2)&&t>=es(s)?Re.push(e):Re.splice(ri(t),0,e),e.flags|=1,jo()}}function jo(){vs||(vs=Ro.then(Lo))}function ii(e){W(e)?Mt.push(...e):mt&&e.id===-1?mt.splice(At+1,0,e):e.flags&1||(Mt.push(e),e.flags|=1),jo()}function Mn(e,t,s=Ze+1){for(;s<Re.length;s++){const n=Re[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Re.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function No(e){if(Mt.length){const t=[...new Set(Mt)].sort((s,n)=>es(s)-es(n));if(Mt.length=0,mt){mt.push(...t);return}for(mt=t,At=0;At<mt.length;At++){const s=mt[At];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}mt=null,At=0}}const es=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Lo(e){try{for(Ze=0;Ze<Re.length;Ze++){const t=Re[Ze];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),is(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ze<Re.length;Ze++){const t=Re[Ze];t&&(t.flags&=-2)}Ze=-1,Re.length=0,No(),vs=null,(Re.length||Mt.length)&&Lo()}}let Fe=null,Fo=null;function ys(e){const t=Fe;return Fe=e,Fo=e&&e.type.__scopeId||null,t}function li(e,t=Fe,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&Kn(-1);const r=ys(t);let i;try{i=e(...o)}finally{ys(r),n._d&&Kn(1)}return i};return n._n=!0,n._c=!0,n._d=!0,n}function me(e,t){if(Fe===null)return e;const s=Ds(Fe),n=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,i,a,c=ue]=t[o];r&&(Y(r)&&(r={mounted:r,updated:r}),r.deep&&ct(i),n.push({dir:r,instance:s,value:i,oldValue:void 0,arg:a,modifiers:c}))}return e}function bt(e,t,s,n){const o=e.dirs,r=t&&t.dirs;for(let i=0;i<o.length;i++){const a=o[i];r&&(a.oldValue=r[i].value);let c=a.dir[n];c&&(dt(),ot(c,s,8,[e.el,a,e,t]),ft())}}function ai(e,t){if(Pe){let s=Pe.provides;const n=Pe.parent&&Pe.parent.provides;n===s&&(s=Pe.provides=Object.create(n)),s[e]=t}}function ps(e,t,s=!1){const n=al();if(n||Ot){let o=Ot?Ot._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return s&&Y(t)?t.call(n&&n.proxy):t}}const ci=Symbol.for("v-scx"),ui=()=>ps(ci);function Vs(e,t,s){return Ho(e,t,s)}function Ho(e,t,s=ue){const{immediate:n,deep:o,flush:r,once:i}=s,a=Te({},s),c=t&&n||!t&&r!=="post";let p;if(ss){if(r==="sync"){const C=ui();p=C.__watcherHandles||(C.__watcherHandles=[])}else if(!c){const C=()=>{};return C.stop=tt,C.resume=tt,C.pause=tt,C}}const u=Pe;a.call=(C,H,j)=>ot(C,u,H,j);let h=!1;r==="post"?a.scheduler=C=>{je(C,u&&u.suspense)}:r!=="sync"&&(h=!0,a.scheduler=(C,H)=>{H?C():xn(C)}),a.augmentJob=C=>{t&&(C.flags|=4),h&&(C.flags|=2,u&&(C.id=u.uid,C.i=u))};const x=ni(e,t,a);return ss&&(p?p.push(x):c&&x()),x}function di(e,t,s){const n=this.proxy,o=xe(e)?e.includes(".")?Vo(n,e):()=>n[e]:e.bind(n,n);let r;Y(t)?r=t:(r=t.handler,s=t);const i=ls(this),a=Ho(o,r.bind(n),s);return i(),a}function Vo(e,t){const s=t.split(".");return()=>{let n=e;for(let o=0;o<s.length&&n;o++)n=n[s[o]];return n}}const fi=Symbol("_vte"),pi=e=>e.__isTeleport,hi=Symbol("_leaveCb");function vn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,vn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function kt(e,t){return Y(e)?Te({name:e.name},t,{setup:e}):e}function Uo(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function On(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const bs=new WeakMap;function qt(e,t,s,n,o=!1){if(W(e)){e.forEach((j,z)=>qt(j,t&&(W(t)?t[z]:t),s,n,o));return}if(Gt(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&qt(e,t,s,n.component.subTree);return}const r=n.shapeFlag&4?Ds(n.component):n.el,i=o?null:r,{i:a,r:c}=e,p=t&&t.r,u=a.refs===ue?a.refs={}:a.refs,h=a.setupState,x=oe(h),C=h===ue?uo:j=>On(u,j)?!1:re(x,j),H=(j,z)=>!(z&&On(u,z));if(p!=null&&p!==c){if(Rn(t),xe(p))u[p]=null,C(p)&&(h[p]=null);else if(Ie(p)){const j=t;H(p,j.k)&&(p.value=null),j.k&&(u[j.k]=null)}}if(Y(c))is(c,a,12,[i,u]);else{const j=xe(c),z=Ie(c);if(j||z){const P=()=>{if(e.f){const V=j?C(c)?h[c]:u[c]:H()||!e.k?c.value:u[e.k];if(o)W(V)&&rn(V,r);else if(W(V))V.includes(r)||V.push(r);else if(j)u[c]=[r],C(c)&&(h[c]=u[c]);else{const Z=[r];H(c,e.k)&&(c.value=Z),e.k&&(u[e.k]=Z)}}else j?(u[c]=i,C(c)&&(h[c]=i)):z&&(H(c,e.k)&&(c.value=i),e.k&&(u[e.k]=i))};if(i){const V=()=>{P(),bs.delete(e)};V.id=-1,bs.set(e,V),je(V,s)}else Rn(e),P()}}}function Rn(e){const t=bs.get(e);t&&(t.flags|=8,bs.delete(e))}As().requestIdleCallback;As().cancelIdleCallback;const Gt=e=>!!e.type.__asyncLoader,Bo=e=>e.type.__isKeepAlive;function mi(e,t){Ko(e,"a",t)}function gi(e,t){Ko(e,"da",t)}function Ko(e,t,s=Pe){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Ms(t,n,s),s){let o=s.parent;for(;o&&o.parent;)Bo(o.parent.vnode)&&xi(n,t,s,o),o=o.parent}}function xi(e,t,s,n){const o=Ms(t,e,n,!0);yn(()=>{rn(n[t],o)},s)}function Ms(e,t,s=Pe,n=!1){if(s){const o=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...i)=>{dt();const a=ls(s),c=ot(t,s,e,i);return a(),ft(),c});return n?o.unshift(r):o.push(r),r}}const ht=e=>(t,s=Pe)=>{(!ss||e==="sp")&&Ms(e,(...n)=>t(...n),s)},vi=ht("bm"),yt=ht("m"),yi=ht("bu"),bi=ht("u"),_i=ht("bum"),yn=ht("um"),wi=ht("sp"),Si=ht("rtg"),Ci=ht("rtc");function ki(e,t=Pe){Ms("ec",e,t)}const Ti="components",Wo=Symbol.for("v-ndc");function $i(e){return xe(e)?Ai(Ti,e,!1)||e:e||Wo}function Ai(e,t,s=!0,n=!1){const o=Fe||Pe;if(o){const r=o.type;{const a=pl(r,!1);if(a&&(a===t||a===De(t)||a===Ts(De(t))))return r}const i=Dn(o[e]||r[e],t)||Dn(o.appContext[e],t);return!i&&n?r:i}}function Dn(e,t){return e&&(e[t]||e[De(t)]||e[Ts(De(t))])}function be(e,t,s,n){let o;const r=s,i=W(e);if(i||xe(e)){const a=i&&Ct(e);let c=!1,p=!1;a&&(c=!Ve(e),p=pt(e),e=Ps(e)),o=new Array(e.length);for(let u=0,h=e.length;u<h;u++)o[u]=t(c?p?Rt(ze(e[u])):ze(e[u]):e[u],u,void 0,r)}else if(typeof e=="number"){o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,r)}else if(ae(e))if(e[Symbol.iterator])o=Array.from(e,(a,c)=>t(a,c,void 0,r));else{const a=Object.keys(e);o=new Array(a.length);for(let c=0,p=a.length;c<p;c++){const u=a[c];o[c]=t(e[u],u,c,r)}}else o=[];return o}const Zs=e=>e?pr(e)?Ds(e):Zs(e.parent):null,Yt=Te(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=>Zs(e.parent),$root:e=>Zs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Jo(e),$forceUpdate:e=>e.f||(e.f=()=>{xn(e.update)}),$nextTick:e=>e.n||(e.n=Do.bind(e.proxy)),$watch:e=>di.bind(e)}),Us=(e,t)=>e!==ue&&!e.__isScriptSetup&&re(e,t),Ei={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:r,accessCache:i,type:a,appContext:c}=e;if(t[0]!=="$"){const x=i[t];if(x!==void 0)switch(x){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return r[t]}else{if(Us(n,t))return i[t]=1,n[t];if(o!==ue&&re(o,t))return i[t]=2,o[t];if(re(r,t))return i[t]=3,r[t];if(s!==ue&&re(s,t))return i[t]=4,s[t];Qs&&(i[t]=0)}}const p=Yt[t];let u,h;if(p)return t==="$attrs"&&Ee(e.attrs,"get",""),p(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(s!==ue&&re(s,t))return i[t]=4,s[t];if(h=c.config.globalProperties,re(h,t))return h[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:r}=e;return Us(o,t)?(o[t]=s,!0):n!==ue&&re(n,t)?(n[t]=s,!0):re(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,props:r,type:i}},a){let c;return!!(s[a]||e!==ue&&a[0]!=="$"&&re(e,a)||Us(t,a)||re(r,a)||re(n,a)||re(Yt,a)||re(o.config.globalProperties,a)||(c=i.__cssModules)&&c[a])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:re(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function jn(e){return W(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Qs=!0;function Pi(e){const t=Jo(e),s=e.proxy,n=e.ctx;Qs=!1,t.beforeCreate&&Nn(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:i,watch:a,provide:c,inject:p,created:u,beforeMount:h,mounted:x,beforeUpdate:C,updated:H,activated:j,deactivated:z,beforeDestroy:P,beforeUnmount:V,destroyed:Z,unmounted:F,render:le,renderTracked:de,renderTriggered:J,errorCaptured:N,serverPrefetch:K,expose:fe,inheritAttrs:te,components:we,directives:ye,filters:Ue}=t;if(p&&Ii(p,n,null),i)for(const se in i){const X=i[se];Y(X)&&(n[se]=X.bind(s))}if(o){const se=o.call(s,s);ae(se)&&(e.data=hn(se))}if(Qs=!0,r)for(const se in r){const X=r[se],Me=Y(X)?X.bind(s,s):Y(X.get)?X.get.bind(s,s):tt,L=!Y(X)&&Y(X.set)?X.set.bind(s):tt,y=Ke({get:Me,set:L});Object.defineProperty(n,se,{enumerable:!0,configurable:!0,get:()=>y.value,set:g=>y.value=g})}if(a)for(const se in a)zo(a[se],n,s,se);if(c){const se=Y(c)?c.call(s):c;Reflect.ownKeys(se).forEach(X=>{ai(X,se[X])})}u&&Nn(u,e,"c");function ge(se,X){W(X)?X.forEach(Me=>se(Me.bind(s))):X&&se(X.bind(s))}if(ge(vi,h),ge(yt,x),ge(yi,C),ge(bi,H),ge(mi,j),ge(gi,z),ge(ki,N),ge(Ci,de),ge(Si,J),ge(_i,V),ge(yn,F),ge(wi,K),W(fe))if(fe.length){const se=e.exposed||(e.exposed={});fe.forEach(X=>{Object.defineProperty(se,X,{get:()=>s[X],set:Me=>s[X]=Me,enumerable:!0})})}else e.exposed||(e.exposed={});le&&e.render===tt&&(e.render=le),te!=null&&(e.inheritAttrs=te),we&&(e.components=we),ye&&(e.directives=ye),K&&Uo(e)}function Ii(e,t,s=tt){W(e)&&(e=Xs(e));for(const n in e){const o=e[n];let r;ae(o)?"default"in o?r=ps(o.from||n,o.default,!0):r=ps(o.from||n):r=ps(o),Ie(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:i=>r.value=i}):t[n]=r}}function Nn(e,t,s){ot(W(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function zo(e,t,s,n){let o=n.includes(".")?Vo(s,n):()=>s[n];if(xe(e)){const r=t[e];Y(r)&&Vs(o,r)}else if(Y(e))Vs(o,e.bind(s));else if(ae(e))if(W(e))e.forEach(r=>zo(r,t,s,n));else{const r=Y(e.handler)?e.handler.bind(s):t[e.handler];Y(r)&&Vs(o,r,e)}}function Jo(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,a=r.get(t);let c;return a?c=a:!o.length&&!s&&!n?c=t:(c={},o.length&&o.forEach(p=>_s(c,p,i,!0)),_s(c,t,i)),ae(t)&&r.set(t,c),c}function _s(e,t,s,n=!1){const{mixins:o,extends:r}=t;r&&_s(e,r,s,!0),o&&o.forEach(i=>_s(e,i,s,!0));for(const i in t)if(!(n&&i==="expose")){const a=Mi[i]||s&&s[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const Mi={data:Ln,props:Fn,emits:Fn,methods:Kt,computed:Kt,beforeCreate:Oe,created:Oe,beforeMount:Oe,mounted:Oe,beforeUpdate:Oe,updated:Oe,beforeDestroy:Oe,beforeUnmount:Oe,destroyed:Oe,unmounted:Oe,activated:Oe,deactivated:Oe,errorCaptured:Oe,serverPrefetch:Oe,components:Kt,directives:Kt,watch:Ri,provide:Ln,inject:Oi};function Ln(e,t){return t?e?function(){return Te(Y(e)?e.call(this,this):e,Y(t)?t.call(this,this):t)}:t:e}function Oi(e,t){return Kt(Xs(e),Xs(t))}function Xs(e){if(W(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Oe(e,t){return e?[...new Set([].concat(e,t))]:t}function Kt(e,t){return e?Te(Object.create(null),e,t):t}function Fn(e,t){return e?W(e)&&W(t)?[...new Set([...e,...t])]:Te(Object.create(null),jn(e),jn(t??{})):t}function Ri(e,t){if(!e)return t;if(!t)return e;const s=Te(Object.create(null),e);for(const n in t)s[n]=Oe(e[n],t[n]);return s}function qo(){return{app:null,config:{isNativeTag:uo,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 Di=0;function ji(e,t){return function(n,o=null){Y(n)||(n=Te({},n)),o!=null&&!ae(o)&&(o=null);const r=qo(),i=new WeakSet,a=[];let c=!1;const p=r.app={_uid:Di++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:ml,get config(){return r.config},set config(u){},use(u,...h){return i.has(u)||(u&&Y(u.install)?(i.add(u),u.install(p,...h)):Y(u)&&(i.add(u),u(p,...h))),p},mixin(u){return r.mixins.includes(u)||r.mixins.push(u),p},component(u,h){return h?(r.components[u]=h,p):r.components[u]},directive(u,h){return h?(r.directives[u]=h,p):r.directives[u]},mount(u,h,x){if(!c){const C=p._ceVNode||st(n,o);return C.appContext=r,x===!0?x="svg":x===!1&&(x=void 0),e(C,u,x),c=!0,p._container=u,u.__vue_app__=p,Ds(C.component)}},onUnmount(u){a.push(u)},unmount(){c&&(ot(a,p._instance,16),e(null,p._container),delete p._container.__vue_app__)},provide(u,h){return r.provides[u]=h,p},runWithContext(u){const h=Ot;Ot=p;try{return u()}finally{Ot=h}}};return p}}let Ot=null;const Ni=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${De(t)}Modifiers`]||e[`${vt(t)}Modifiers`];function Li(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||ue;let o=s;const r=t.startsWith("update:"),i=r&&Ni(n,t.slice(7));i&&(i.trim&&(o=s.map(u=>xe(u)?u.trim():u)),i.number&&(o=s.map($s)));let a,c=n[a=js(t)]||n[a=js(De(t))];!c&&r&&(c=n[a=js(vt(t))]),c&&ot(c,e,6,o);const p=n[a+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,ot(p,e,6,o)}}const Fi=new WeakMap;function Go(e,t,s=!1){const n=s?Fi:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const r=e.emits;let i={},a=!1;if(!Y(e)){const c=p=>{const u=Go(p,t,!0);u&&(a=!0,Te(i,u))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!a?(ae(e)&&n.set(e,null),null):(W(r)?r.forEach(c=>i[c]=null):Te(i,r),ae(e)&&n.set(e,i),i)}function Os(e,t){return!e||!Ss(t)?!1:(t=t.slice(2).replace(/Once$/,""),re(e,t[0].toLowerCase()+t.slice(1))||re(e,vt(t))||re(e,t))}function Hn(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[r],slots:i,attrs:a,emit:c,render:p,renderCache:u,props:h,data:x,setupState:C,ctx:H,inheritAttrs:j}=e,z=ys(e);let P,V;try{if(s.shapeFlag&4){const F=o||n,le=F;P=Xe(p.call(le,F,u,h,C,x,H)),V=a}else{const F=t;P=Xe(F.length>1?F(h,{attrs:a,slots:i,emit:c}):F(h,null)),V=t.props?a:Hi(a)}}catch(F){Zt.length=0,Is(F,e,1),P=st(xt)}let Z=P;if(V&&j!==!1){const F=Object.keys(V),{shapeFlag:le}=Z;F.length&&le&7&&(r&&F.some(Cs)&&(V=Vi(V,r)),Z=Dt(Z,V,!1,!0))}return s.dirs&&(Z=Dt(Z,null,!1,!0),Z.dirs=Z.dirs?Z.dirs.concat(s.dirs):s.dirs),s.transition&&vn(Z,s.transition),P=Z,ys(z),P}const Hi=e=>{let t;for(const s in e)(s==="class"||s==="style"||Ss(s))&&((t||(t={}))[s]=e[s]);return t},Vi=(e,t)=>{const s={};for(const n in e)(!Cs(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Ui(e,t,s){const{props:n,children:o,component:r}=e,{props:i,children:a,patchFlag:c}=t,p=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?Vn(n,i,p):!!i;if(c&8){const u=t.dynamicProps;for(let h=0;h<u.length;h++){const x=u[h];if(Yo(i,n,x)&&!Os(p,x))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:n===i?!1:n?i?Vn(n,i,p):!0:!!i;return!1}function Vn(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let o=0;o<n.length;o++){const r=n[o];if(Yo(t,e,r)&&!Os(s,r))return!0}return!1}function Yo(e,t,s){const n=e[s],o=t[s];return s==="style"&&ae(n)&&ae(o)?!Lt(n,o):n!==o}function Bi({vnode:e,parent:t,suspense:s},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.suspense.vnode.el=o.el=n,e=o),o===e)(e=t.vnode).el=n,t=t.parent;else break}s&&s.activeBranch===e&&(s.vnode.el=n)}const Zo={},Qo=()=>Object.create(Zo),Xo=e=>Object.getPrototypeOf(e)===Zo;function Ki(e,t,s,n=!1){const o={},r=Qo();e.propsDefaults=Object.create(null),er(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);s?e.props=n?o:qr(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function Wi(e,t,s,n){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,a=oe(o),[c]=e.propsOptions;let p=!1;if((n||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let h=0;h<u.length;h++){let x=u[h];if(Os(e.emitsOptions,x))continue;const C=t[x];if(c)if(re(r,x))C!==r[x]&&(r[x]=C,p=!0);else{const H=De(x);o[H]=en(c,a,H,C,e,!1)}else C!==r[x]&&(r[x]=C,p=!0)}}}else{er(e,t,o,r)&&(p=!0);let u;for(const h in a)(!t||!re(t,h)&&((u=vt(h))===h||!re(t,u)))&&(c?s&&(s[h]!==void 0||s[u]!==void 0)&&(o[h]=en(c,a,h,void 0,e,!0)):delete o[h]);if(r!==a)for(const h in r)(!t||!re(t,h))&&(delete r[h],p=!0)}p&&at(e.attrs,"set","")}function er(e,t,s,n){const[o,r]=e.propsOptions;let i=!1,a;if(t)for(let c in t){if(Wt(c))continue;const p=t[c];let u;o&&re(o,u=De(c))?!r||!r.includes(u)?s[u]=p:(a||(a={}))[u]=p:Os(e.emitsOptions,c)||(!(c in n)||p!==n[c])&&(n[c]=p,i=!0)}if(r){const c=oe(s),p=a||ue;for(let u=0;u<r.length;u++){const h=r[u];s[h]=en(o,c,h,p[h],e,!re(p,h))}}return i}function en(e,t,s,n,o,r){const i=e[s];if(i!=null){const a=re(i,"default");if(a&&n===void 0){const c=i.default;if(i.type!==Function&&!i.skipFactory&&Y(c)){const{propsDefaults:p}=o;if(s in p)n=p[s];else{const u=ls(o);n=p[s]=c.call(null,t),u()}}else n=c;o.ce&&o.ce._setProp(s,n)}i[0]&&(r&&!a?n=!1:i[1]&&(n===""||n===vt(s))&&(n=!0))}return n}const zi=new WeakMap;function tr(e,t,s=!1){const n=s?zi:t.propsCache,o=n.get(e);if(o)return o;const r=e.props,i={},a=[];let c=!1;if(!Y(e)){const u=h=>{c=!0;const[x,C]=tr(h,t,!0);Te(i,x),C&&a.push(...C)};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!r&&!c)return ae(e)&&n.set(e,Pt),Pt;if(W(r))for(let u=0;u<r.length;u++){const h=De(r[u]);Un(h)&&(i[h]=ue)}else if(r)for(const u in r){const h=De(u);if(Un(h)){const x=r[u],C=i[h]=W(x)||Y(x)?{type:x}:Te({},x),H=C.type;let j=!1,z=!0;if(W(H))for(let P=0;P<H.length;++P){const V=H[P],Z=Y(V)&&V.name;if(Z==="Boolean"){j=!0;break}else Z==="String"&&(z=!1)}else j=Y(H)&&H.name==="Boolean";C[0]=j,C[1]=z,(j||re(C,"default"))&&a.push(h)}}const p=[i,a];return ae(e)&&n.set(e,p),p}function Un(e){return e[0]!=="$"&&!Wt(e)}const bn=e=>e==="_"||e==="_ctx"||e==="$stable",_n=e=>W(e)?e.map(Xe):[Xe(e)],Ji=(e,t,s)=>{if(t._n)return t;const n=li((...o)=>_n(t(...o)),s);return n._c=!1,n},sr=(e,t,s)=>{const n=e._ctx;for(const o in e){if(bn(o))continue;const r=e[o];if(Y(r))t[o]=Ji(o,r,n);else if(r!=null){const i=_n(r);t[o]=()=>i}}},nr=(e,t)=>{const s=_n(t);e.slots.default=()=>s},or=(e,t,s)=>{for(const n in t)(s||!bn(n))&&(e[n]=t[n])},qi=(e,t,s)=>{const n=e.slots=Qo();if(e.vnode.shapeFlag&32){const o=t._;o?(or(n,t,s),s&&mo(n,"_",o,!0)):sr(t,n)}else t&&nr(e,t)},Gi=(e,t,s)=>{const{vnode:n,slots:o}=e;let r=!0,i=ue;if(n.shapeFlag&32){const a=t._;a?s&&a===1?r=!1:or(o,t,s):(r=!t.$stable,sr(t,o)),i=t}else t&&(nr(e,t),i={default:1});if(r)for(const a in o)!bn(a)&&i[a]==null&&delete o[a]},je=el;function Yi(e){return Zi(e)}function Zi(e,t){const s=As();s.__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:i,createText:a,createComment:c,setText:p,setElementText:u,parentNode:h,nextSibling:x,setScopeId:C=tt,insertStaticContent:H}=e,j=(d,f,m,k=null,v=null,b=null,O=void 0,I=null,A=!!f.dynamicChildren)=>{if(d===f)return;d&&!Ut(d,f)&&(k=ne(d),g(d,v,b,!0),d=null),f.patchFlag===-2&&(A=!1,f.dynamicChildren=null);const{type:_,ref:B,shapeFlag:R}=f;switch(_){case Rs:z(d,f,m,k);break;case xt:P(d,f,m,k);break;case hs:d==null&&V(f,m,k,O);break;case ie:we(d,f,m,k,v,b,O,I,A);break;default:R&1?le(d,f,m,k,v,b,O,I,A):R&6?ye(d,f,m,k,v,b,O,I,A):(R&64||R&128)&&_.process(d,f,m,k,v,b,O,I,A,Ft)}B!=null&&v?qt(B,d&&d.ref,b,f||d,!f):B==null&&d&&d.ref!=null&&qt(d.ref,null,b,d,!0)},z=(d,f,m,k)=>{if(d==null)n(f.el=a(f.children),m,k);else{const v=f.el=d.el;f.children!==d.children&&p(v,f.children)}},P=(d,f,m,k)=>{d==null?n(f.el=c(f.children||""),m,k):f.el=d.el},V=(d,f,m,k)=>{[d.el,d.anchor]=H(d.children,f,m,k,d.el,d.anchor)},Z=({el:d,anchor:f},m,k)=>{let v;for(;d&&d!==f;)v=x(d),n(d,m,k),d=v;n(f,m,k)},F=({el:d,anchor:f})=>{let m;for(;d&&d!==f;)m=x(d),o(d),d=m;o(f)},le=(d,f,m,k,v,b,O,I,A)=>{if(f.type==="svg"?O="svg":f.type==="math"&&(O="mathml"),d==null)de(f,m,k,v,b,O,I,A);else{const _=d.el&&d.el._isVueCE?d.el:null;try{_&&_._beginPatch(),K(d,f,v,b,O,I,A)}finally{_&&_._endPatch()}}},de=(d,f,m,k,v,b,O,I)=>{let A,_;const{props:B,shapeFlag:R,transition:U,dirs:q}=d;if(A=d.el=i(d.type,b,B&&B.is,B),R&8?u(A,d.children):R&16&&N(d.children,A,null,k,v,Bs(d,b),O,I),q&&bt(d,null,k,"created"),J(A,d,d.scopeId,O,k),B){for(const ce in B)ce!=="value"&&!Wt(ce)&&r(A,ce,null,B[ce],b,k);"value"in B&&r(A,"value",null,B.value,b),(_=B.onVnodeBeforeMount)&&Ye(_,k,d)}q&&bt(d,null,k,"beforeMount");const ee=Qi(v,U);ee&&U.beforeEnter(A),n(A,f,m),((_=B&&B.onVnodeMounted)||ee||q)&&je(()=>{try{_&&Ye(_,k,d),ee&&U.enter(A),q&&bt(d,null,k,"mounted")}finally{}},v)},J=(d,f,m,k,v)=>{if(m&&C(d,m),k)for(let b=0;b<k.length;b++)C(d,k[b]);if(v){let b=v.subTree;if(f===b||ar(b.type)&&(b.ssContent===f||b.ssFallback===f)){const O=v.vnode;J(d,O,O.scopeId,O.slotScopeIds,v.parent)}}},N=(d,f,m,k,v,b,O,I,A=0)=>{for(let _=A;_<d.length;_++){const B=d[_]=I?lt(d[_]):Xe(d[_]);j(null,B,f,m,k,v,b,O,I)}},K=(d,f,m,k,v,b,O)=>{const I=f.el=d.el;let{patchFlag:A,dynamicChildren:_,dirs:B}=f;A|=d.patchFlag&16;const R=d.props||ue,U=f.props||ue;let q;if(m&&_t(m,!1),(q=U.onVnodeBeforeUpdate)&&Ye(q,m,f,d),B&&bt(f,d,m,"beforeUpdate"),m&&_t(m,!0),(R.innerHTML&&U.innerHTML==null||R.textContent&&U.textContent==null)&&u(I,""),_?fe(d.dynamicChildren,_,I,m,k,Bs(f,v),b):O||X(d,f,I,null,m,k,Bs(f,v),b,!1),A>0){if(A&16)te(I,R,U,m,v);else if(A&2&&R.class!==U.class&&r(I,"class",null,U.class,v),A&4&&r(I,"style",R.style,U.style,v),A&8){const ee=f.dynamicProps;for(let ce=0;ce<ee.length;ce++){const pe=ee[ce],ve=R[pe],Ce=U[pe];(Ce!==ve||pe==="value")&&r(I,pe,ve,Ce,v,m)}}A&1&&d.children!==f.children&&u(I,f.children)}else!O&&_==null&&te(I,R,U,m,v);((q=U.onVnodeUpdated)||B)&&je(()=>{q&&Ye(q,m,f,d),B&&bt(f,d,m,"updated")},k)},fe=(d,f,m,k,v,b,O)=>{for(let I=0;I<f.length;I++){const A=d[I],_=f[I],B=A.el&&(A.type===ie||!Ut(A,_)||A.shapeFlag&198)?h(A.el):m;j(A,_,B,null,k,v,b,O,!0)}},te=(d,f,m,k,v)=>{if(f!==m){if(f!==ue)for(const b in f)!Wt(b)&&!(b in m)&&r(d,b,f[b],null,v,k);for(const b in m){if(Wt(b))continue;const O=m[b],I=f[b];O!==I&&b!=="value"&&r(d,b,I,O,v,k)}"value"in m&&r(d,"value",f.value,m.value,v)}},we=(d,f,m,k,v,b,O,I,A)=>{const _=f.el=d?d.el:a(""),B=f.anchor=d?d.anchor:a("");let{patchFlag:R,dynamicChildren:U,slotScopeIds:q}=f;q&&(I=I?I.concat(q):q),d==null?(n(_,m,k),n(B,m,k),N(f.children||[],m,B,v,b,O,I,A)):R>0&&R&64&&U&&d.dynamicChildren&&d.dynamicChildren.length===U.length?(fe(d.dynamicChildren,U,m,v,b,O,I),(f.key!=null||v&&f===v.subTree)&&rr(d,f,!0)):X(d,f,m,B,v,b,O,I,A)},ye=(d,f,m,k,v,b,O,I,A)=>{f.slotScopeIds=I,d==null?f.shapeFlag&512?v.ctx.activate(f,m,k,O,A):Ue(f,m,k,v,b,O,A):Tt(d,f,A)},Ue=(d,f,m,k,v,b,O)=>{const I=d.component=ll(d,k,v);if(Bo(d)&&(I.ctx.renderer=Ft),cl(I,!1,O),I.asyncDep){if(v&&v.registerDep(I,ge,O),!d.el){const A=I.subTree=st(xt);P(null,A,f,m),d.placeholder=A.el}}else ge(I,d,f,m,v,b,O)},Tt=(d,f,m)=>{const k=f.component=d.component;if(Ui(d,f,m))if(k.asyncDep&&!k.asyncResolved){se(k,f,m);return}else k.next=f,k.update();else f.el=d.el,k.vnode=f},ge=(d,f,m,k,v,b,O)=>{const I=()=>{if(d.isMounted){let{next:R,bu:U,u:q,parent:ee,vnode:ce}=d;{const qe=ir(d);if(qe){R&&(R.el=ce.el,se(d,R,O)),qe.asyncDep.then(()=>{je(()=>{d.isUnmounted||_()},v)});return}}let pe=R,ve;_t(d,!1),R?(R.el=ce.el,se(d,R,O)):R=ce,U&&fs(U),(ve=R.props&&R.props.onVnodeBeforeUpdate)&&Ye(ve,ee,R,ce),_t(d,!0);const Ce=Hn(d),Je=d.subTree;d.subTree=Ce,j(Je,Ce,h(Je.el),ne(Je),d,v,b),R.el=Ce.el,pe===null&&Bi(d,Ce.el),q&&je(q,v),(ve=R.props&&R.props.onVnodeUpdated)&&je(()=>Ye(ve,ee,R,ce),v)}else{let R;const{el:U,props:q}=f,{bm:ee,m:ce,parent:pe,root:ve,type:Ce}=d,Je=Gt(f);_t(d,!1),ee&&fs(ee),!Je&&(R=q&&q.onVnodeBeforeMount)&&Ye(R,pe,f),_t(d,!0);{ve.ce&&ve.ce._hasShadowRoot()&&ve.ce._injectChildStyle(Ce,d.parent?d.parent.type:void 0);const qe=d.subTree=Hn(d);j(null,qe,m,k,d,v,b),f.el=qe.el}if(ce&&je(ce,v),!Je&&(R=q&&q.onVnodeMounted)){const qe=f;je(()=>Ye(R,pe,qe),v)}(f.shapeFlag&256||pe&&Gt(pe.vnode)&&pe.vnode.shapeFlag&256)&&d.a&&je(d.a,v),d.isMounted=!0,f=m=k=null}};d.scope.on();const A=d.effect=new yo(I);d.scope.off();const _=d.update=A.run.bind(A),B=d.job=A.runIfDirty.bind(A);B.i=d,B.id=d.uid,A.scheduler=()=>xn(B),_t(d,!0),_()},se=(d,f,m)=>{f.component=d;const k=d.vnode.props;d.vnode=f,d.next=null,Wi(d,f.props,k,m),Gi(d,f.children,m),dt(),Mn(d),ft()},X=(d,f,m,k,v,b,O,I,A=!1)=>{const _=d&&d.children,B=d?d.shapeFlag:0,R=f.children,{patchFlag:U,shapeFlag:q}=f;if(U>0){if(U&128){L(_,R,m,k,v,b,O,I,A);return}else if(U&256){Me(_,R,m,k,v,b,O,I,A);return}}q&8?(B&16&&$e(_,v,b),R!==_&&u(m,R)):B&16?q&16?L(_,R,m,k,v,b,O,I,A):$e(_,v,b,!0):(B&8&&u(m,""),q&16&&N(R,m,k,v,b,O,I,A))},Me=(d,f,m,k,v,b,O,I,A)=>{d=d||Pt,f=f||Pt;const _=d.length,B=f.length,R=Math.min(_,B);let U;for(U=0;U<R;U++){const q=f[U]=A?lt(f[U]):Xe(f[U]);j(d[U],q,m,null,v,b,O,I,A)}_>B?$e(d,v,b,!0,!1,R):N(f,m,k,v,b,O,I,A,R)},L=(d,f,m,k,v,b,O,I,A)=>{let _=0;const B=f.length;let R=d.length-1,U=B-1;for(;_<=R&&_<=U;){const q=d[_],ee=f[_]=A?lt(f[_]):Xe(f[_]);if(Ut(q,ee))j(q,ee,m,null,v,b,O,I,A);else break;_++}for(;_<=R&&_<=U;){const q=d[R],ee=f[U]=A?lt(f[U]):Xe(f[U]);if(Ut(q,ee))j(q,ee,m,null,v,b,O,I,A);else break;R--,U--}if(_>R){if(_<=U){const q=U+1,ee=q<B?f[q].el:k;for(;_<=U;)j(null,f[_]=A?lt(f[_]):Xe(f[_]),m,ee,v,b,O,I,A),_++}}else if(_>U)for(;_<=R;)g(d[_],v,b,!0),_++;else{const q=_,ee=_,ce=new Map;for(_=ee;_<=U;_++){const Le=f[_]=A?lt(f[_]):Xe(f[_]);Le.key!=null&&ce.set(Le.key,_)}let pe,ve=0;const Ce=U-ee+1;let Je=!1,qe=0;const Ht=new Array(Ce);for(_=0;_<Ce;_++)Ht[_]=0;for(_=q;_<=R;_++){const Le=d[_];if(ve>=Ce){g(Le,v,b,!0);continue}let Ge;if(Le.key!=null)Ge=ce.get(Le.key);else for(pe=ee;pe<=U;pe++)if(Ht[pe-ee]===0&&Ut(Le,f[pe])){Ge=pe;break}Ge===void 0?g(Le,v,b,!0):(Ht[Ge-ee]=_+1,Ge>=qe?qe=Ge:Je=!0,j(Le,f[Ge],m,null,v,b,O,I,A),ve++)}const kn=Je?Xi(Ht):Pt;for(pe=kn.length-1,_=Ce-1;_>=0;_--){const Le=ee+_,Ge=f[Le],Tn=f[Le+1],$n=Le+1<B?Tn.el||lr(Tn):k;Ht[_]===0?j(null,Ge,m,$n,v,b,O,I,A):Je&&(pe<0||_!==kn[pe]?y(Ge,m,$n,2):pe--)}}},y=(d,f,m,k,v=null)=>{const{el:b,type:O,transition:I,children:A,shapeFlag:_}=d;if(_&6){y(d.component.subTree,f,m,k);return}if(_&128){d.suspense.move(f,m,k);return}if(_&64){O.move(d,f,m,Ft);return}if(O===ie){n(b,f,m);for(let R=0;R<A.length;R++)y(A[R],f,m,k);n(d.anchor,f,m);return}if(O===hs){Z(d,f,m);return}if(k!==2&&_&1&&I)if(k===0)I.beforeEnter(b),n(b,f,m),je(()=>I.enter(b),v);else{const{leave:R,delayLeave:U,afterLeave:q}=I,ee=()=>{d.ctx.isUnmounted?o(b):n(b,f,m)},ce=()=>{b._isLeaving&&b[hi](!0),R(b,()=>{ee(),q&&q()})};U?U(b,ee,ce):ce()}else n(b,f,m)},g=(d,f,m,k=!1,v=!1)=>{const{type:b,props:O,ref:I,children:A,dynamicChildren:_,shapeFlag:B,patchFlag:R,dirs:U,cacheIndex:q,memo:ee}=d;if(R===-2&&(v=!1),I!=null&&(dt(),qt(I,null,m,d,!0),ft()),q!=null&&(f.renderCache[q]=void 0),B&256){f.ctx.deactivate(d);return}const ce=B&1&&U,pe=!Gt(d);let ve;if(pe&&(ve=O&&O.onVnodeBeforeUnmount)&&Ye(ve,f,d),B&6)E(d.component,m,k);else{if(B&128){d.suspense.unmount(m,k);return}ce&&bt(d,null,f,"beforeUnmount"),B&64?d.type.remove(d,f,m,Ft,k):_&&!_.hasOnce&&(b!==ie||R>0&&R&64)?$e(_,f,m,!1,!0):(b===ie&&R&384||!v&&B&16)&&$e(A,f,m),k&&M(d)}const Ce=ee!=null&&q==null;(pe&&(ve=O&&O.onVnodeUnmounted)||ce||Ce)&&je(()=>{ve&&Ye(ve,f,d),ce&&bt(d,null,f,"unmounted"),Ce&&(d.el=null)},m)},M=d=>{const{type:f,el:m,anchor:k,transition:v}=d;if(f===ie){T(m,k);return}if(f===hs){F(d);return}const b=()=>{o(m),v&&!v.persisted&&v.afterLeave&&v.afterLeave()};if(d.shapeFlag&1&&v&&!v.persisted){const{leave:O,delayLeave:I}=v,A=()=>O(m,b);I?I(d.el,b,A):A()}else b()},T=(d,f)=>{let m;for(;d!==f;)m=x(d),o(d),d=m;o(f)},E=(d,f,m)=>{const{bum:k,scope:v,job:b,subTree:O,um:I,m:A,a:_}=d;Bn(A),Bn(_),k&&fs(k),v.stop(),b&&(b.flags|=8,g(O,d,f,m)),I&&je(I,f),je(()=>{d.isUnmounted=!0},f)},$e=(d,f,m,k=!1,v=!1,b=0)=>{for(let O=b;O<d.length;O++)g(d[O],f,m,k,v)},ne=d=>{if(d.shapeFlag&6)return ne(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const f=x(d.anchor||d.el),m=f&&f[fi];return m?x(m):f};let Ae=!1;const Cn=(d,f,m)=>{let k;d==null?f._vnode&&(g(f._vnode,null,null,!0),k=f._vnode.component):j(f._vnode||null,d,f,null,null,null,m),f._vnode=d,Ae||(Ae=!0,Mn(k),No(),Ae=!1)},Ft={p:j,um:g,m:y,r:M,mt:Ue,mc:N,pc:X,pbc:fe,n:ne,o:e};return{render:Cn,hydrate:void 0,createApp:ji(Cn)}}function Bs({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 _t({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Qi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function rr(e,t,s=!1){const n=e.children,o=t.children;if(W(n)&&W(o))for(let r=0;r<n.length;r++){const i=n[r];let a=o[r];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[r]=lt(o[r]),a.el=i.el),!s&&a.patchFlag!==-2&&rr(i,a)),a.type===Rs&&(a.patchFlag===-1&&(a=o[r]=lt(a)),a.el=i.el),a.type===xt&&!a.el&&(a.el=i.el)}}function Xi(e){const t=e.slice(),s=[0];let n,o,r,i,a;const c=e.length;for(n=0;n<c;n++){const p=e[n];if(p!==0){if(o=s[s.length-1],e[o]<p){t[n]=o,s.push(n);continue}for(r=0,i=s.length-1;r<i;)a=r+i>>1,e[s[a]]<p?r=a+1:i=a;p<e[s[r]]&&(r>0&&(t[n]=s[r-1]),s[r]=n)}}for(r=s.length,i=s[r-1];r-- >0;)s[r]=i,i=t[i];return s}function ir(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ir(t)}function Bn(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function lr(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?lr(t.subTree):null}const ar=e=>e.__isSuspense;function el(e,t){t&&t.pendingBranch?W(e)?t.effects.push(...e):t.effects.push(e):ii(e)}const ie=Symbol.for("v-fgt"),Rs=Symbol.for("v-txt"),xt=Symbol.for("v-cmt"),hs=Symbol.for("v-stc"),Zt=[];let He=null;function w(e=!1){Zt.push(He=e?null:[])}function tl(){Zt.pop(),He=Zt[Zt.length-1]||null}let ts=1;function Kn(e,t=!1){ts+=e,e<0&&He&&t&&(He.hasOnce=!0)}function cr(e){return e.dynamicChildren=ts>0?He||Pt:null,tl(),ts>0&&He&&He.push(e),e}function S(e,t,s,n,o,r){return cr(l(e,t,s,n,o,r,!0))}function ur(e,t,s,n,o){return cr(st(e,t,s,n,o,!0))}function dr(e){return e?e.__v_isVNode===!0:!1}function Ut(e,t){return e.type===t.type&&e.key===t.key}const fr=({key:e})=>e??null,ms=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?xe(e)||Ie(e)||Y(e)?{i:Fe,r:e,k:t,f:!!s}:e:null);function l(e,t=null,s=null,n=0,o=null,r=e===ie?0:1,i=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&fr(t),ref:t&&ms(t),scopeId:Fo,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:r,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Fe};return a?(wn(c,s),r&128&&e.normalize(c)):s&&(c.shapeFlag|=xe(s)?8:16),ts>0&&!i&&He&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&He.push(c),c}const st=sl;function sl(e,t=null,s=null,n=0,o=null,r=!1){if((!e||e===Wo)&&(e=xt),dr(e)){const a=Dt(e,t,!0);return s&&wn(a,s),ts>0&&!r&&He&&(a.shapeFlag&6?He[He.indexOf(e)]=a:He.push(a)),a.patchFlag=-2,a}if(hl(e)&&(e=e.__vccOpts),t){t=nl(t);let{class:a,style:c}=t;a&&!xe(a)&&(t.class=G(a)),ae(c)&&(gn(c)&&!W(c)&&(c=Te({},c)),t.style=Es(c))}const i=xe(e)?1:ar(e)?128:pi(e)?64:ae(e)?4:Y(e)?2:0;return l(e,t,s,n,o,i,r,!0)}function nl(e){return e?gn(e)||Xo(e)?Te({},e):e:null}function Dt(e,t,s=!1,n=!1){const{props:o,ref:r,patchFlag:i,children:a,transition:c}=e,p=t?ol(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&fr(p),ref:t&&t.ref?s&&r?W(r)?r.concat(ms(t)):[r,ms(t)]:ms(t):r,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!==ie?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Dt(e.ssContent),ssFallback:e.ssFallback&&Dt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&vn(u,c.clone(u)),u}function Et(e=" ",t=0){return st(Rs,null,e,t)}function Be(e,t){const s=st(hs,null,e);return s.staticCount=t,s}function Q(e="",t=!1){return t?(w(),ur(xt,null,e)):st(xt,null,e)}function Xe(e){return e==null||typeof e=="boolean"?st(xt):W(e)?st(ie,null,e.slice()):dr(e)?lt(e):st(Rs,null,String(e))}function lt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Dt(e)}function wn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(W(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),wn(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!Xo(t)?t._ctx=Fe:o===3&&Fe&&(Fe.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Y(t)?(t={default:t,_ctx:Fe},s=32):(t=String(t),n&64?(s=16,t=[Et(t)]):s=8);e.children=t,e.shapeFlag|=s}function ol(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const o in n)if(o==="class")t.class!==n.class&&(t.class=G([t.class,n.class]));else if(o==="style")t.style=Es([t.style,n.style]);else if(Ss(o)){const r=t[o],i=n[o];i&&r!==i&&!(W(r)&&r.includes(i))?t[o]=r?[].concat(r,i):i:i==null&&r==null&&!Cs(o)&&(t[o]=i)}else o!==""&&(t[o]=n[o])}return t}function Ye(e,t,s,n=null){ot(e,t,7,[s,n])}const rl=qo();let il=0;function ll(e,t,s){const n=e.type,o=(t?t.appContext:e.appContext)||rl,r={uid:il++,vnode:e,type:n,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ar(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:tr(n,o),emitsOptions:Go(n,o),emit:null,emitted:null,propsDefaults:ue,inheritAttrs:n.inheritAttrs,ctx:ue,data:ue,props:ue,attrs:ue,slots:ue,refs:ue,setupState:ue,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 r.ctx={_:r},r.root=t?t.root:r,r.emit=Li.bind(null,r),e.ce&&e.ce(r),r}let Pe=null;const al=()=>Pe||Fe;let ws,tn;{const e=As(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),r=>{o.length>1?o.forEach(i=>i(r)):o[0](r)}};ws=t("__VUE_INSTANCE_SETTERS__",s=>Pe=s),tn=t("__VUE_SSR_SETTERS__",s=>ss=s)}const ls=e=>{const t=Pe;return ws(e),e.scope.on(),()=>{e.scope.off(),ws(t)}},Wn=()=>{Pe&&Pe.scope.off(),ws(null)};function pr(e){return e.vnode.shapeFlag&4}let ss=!1;function cl(e,t=!1,s=!1){t&&tn(t);const{props:n,children:o}=e.vnode,r=pr(e);Ki(e,n,r,t),qi(e,o,s||t);const i=r?ul(e,t):void 0;return t&&tn(!1),i}function ul(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ei);const{setup:n}=s;if(n){dt();const o=e.setupContext=n.length>1?fl(e):null,r=ls(e),i=is(n,e,0,[e.props,o]),a=fo(i);if(ft(),r(),(a||e.sp)&&!Gt(e)&&Uo(e),a){if(i.then(Wn,Wn),t)return i.then(c=>{zn(e,c)}).catch(c=>{Is(c,e,0)});e.asyncDep=i}else zn(e,i)}else hr(e)}function zn(e,t,s){Y(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ae(t)&&(e.setupState=Oo(t)),hr(e)}function hr(e,t,s){const n=e.type;e.render||(e.render=n.render||tt);{const o=ls(e);dt();try{Pi(e)}finally{ft(),o()}}}const dl={get(e,t){return Ee(e,"get",""),e[t]}};function fl(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,dl),slots:e.slots,emit:e.emit,expose:t}}function Ds(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Oo(Gr(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Yt)return Yt[s](e)},has(t,s){return s in t||s in Yt}})):e.proxy}function pl(e,t=!0){return Y(e)?e.displayName||e.name:e.name||t&&e.__name}function hl(e){return Y(e)&&"__vccOpts"in e}const Ke=(e,t)=>ti(e,t,ss),ml="3.5.31";/**
|
|
61
61
|
* @vue/runtime-dom v3.5.31
|
|
62
62
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
63
63
|
* @license MIT
|
|
64
|
-
**/let sn;const zn=typeof window<"u"&&window.trustedTypes;if(zn)try{sn=zn.createPolicy("vue",{createHTML:e=>e})}catch{}const hr=sn?e=>sn.createHTML(e):e=>e,ml="http://www.w3.org/2000/svg",gl="http://www.w3.org/1998/Math/MathML",it=typeof document<"u"?document:null,Jn=it&&it.createElement("template"),xl={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const o=t==="svg"?it.createElementNS(ml,e):t==="mathml"?it.createElementNS(gl,e):s?it.createElement(e,{is:s}):it.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>it.createTextNode(e),createComment:e=>it.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>it.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,r){const i=s?s.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===r||!(o=o.nextSibling)););else{Jn.innerHTML=hr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=Jn.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[i?i.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},vl=Symbol("_vtc");function yl(e,t,s){const n=e[vl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const qn=Symbol("_vod"),bl=Symbol("_vsh"),_l=Symbol(""),wl=/(?:^|;)\s*display\s*:/;function Sl(e,t,s){const n=e.style,o=me(s);let r=!1;if(s&&!o){if(t)if(me(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();s[a]==null&&gs(n,a,"")}else for(const i in t)s[i]==null&&gs(n,i,"");for(const i in s)i==="display"&&(r=!0),gs(n,i,s[i])}else if(o){if(t!==s){const i=n[_l];i&&(s+=";"+i),n.cssText=s,r=wl.test(s)}}else t&&e.removeAttribute("style");qn in e&&(e[qn]=r?n.display:"",e[bl]&&(n.display="none"))}const Gn=/\s*!important$/;function gs(e,t,s){if(W(s))s.forEach(n=>gs(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Cl(e,t);Gn.test(s)?e.setProperty(vt(n),s.replace(Gn,""),"important"):e[n]=s}}const Yn=["Webkit","Moz","ms"],Ks={};function Cl(e,t){const s=Ks[t];if(s)return s;let n=Me(t);if(n!=="filter"&&n in e)return Ks[t]=n;n=ks(n);for(let o=0;o<Yn.length;o++){const r=Yn[o]+n;if(r in e)return Ks[t]=r}return t}const Zn="http://www.w3.org/1999/xlink";function Qn(e,t,s,n,o,r=Tr(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Zn,t.slice(6,t.length)):e.setAttributeNS(Zn,t,s):s==null||r&&!mo(s)?e.removeAttribute(t):e.setAttribute(t,r?"":st(s)?String(s):s)}function Xn(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?hr(s):s);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const a=r==="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 i=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=mo(s):s==null&&a==="string"?(s="",i=!0):a==="number"&&(s=0,i=!0)}try{e[t]=s}catch{}i&&e.removeAttribute(o||t)}function gt(e,t,s,n){e.addEventListener(t,s,n)}function Tl(e,t,s,n){e.removeEventListener(t,s,n)}const eo=Symbol("_vei");function kl(e,t,s,n,o=null){const r=e[eo]||(e[eo]={}),i=r[t];if(n&&i)i.value=n;else{const[a,c]=$l(t);if(n){const h=r[t]=Pl(n,o);gt(e,a,h,c)}else i&&(Tl(e,a,i,c),r[t]=void 0)}}const to=/(?:Once|Passive|Capture)$/;function $l(e){let t;if(to.test(e)){t={};let n;for(;n=e.match(to);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):vt(e.slice(2)),t]}let Ws=0;const Al=Promise.resolve(),El=()=>Ws||(Al.then(()=>Ws=0),Ws=Date.now());function Pl(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;nt(Il(n,s.value),t,5,[n])};return s.value=e,s.attached=El(),s}function Il(e,t){if(W(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>o=>!o._stopped&&n&&n(o))}else return t}const so=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ml=(e,t,s,n,o,r)=>{const i=o==="svg";t==="class"?yl(e,n,i):t==="style"?Sl(e,s,n):Ss(t)?Cs(t)||kl(e,t,s,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ol(e,t,n,i))?(Xn(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Qn(e,t,n,i,r,t!=="value")):e._isVueCE&&(Rl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!me(n)))?Xn(e,Me(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Qn(e,t,n,i))};function Ol(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&so(t)&&Y(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return so(t)&&me(s)?!1:t in e}function Rl(e,t){const s=e._def.props;if(!s)return!1;const n=Me(t);return Array.isArray(s)?s.some(o=>Me(o)===n):Object.keys(s).some(o=>Me(o)===n)}const jt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return W(t)?s=>fs(t,s):t};function Dl(e){e.target.composing=!0}function no(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ut=Symbol("_assign");function oo(e,t,s){return t&&(e=e.trim()),s&&(e=$s(e)),e}const $e={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e[ut]=jt(o);const r=n||o.props&&o.props.type==="number";gt(e,t?"change":"input",i=>{i.target.composing||e[ut](oo(e.value,s,r))}),(s||r)&>(e,"change",()=>{e.value=oo(e.value,s,r)}),t||(gt(e,"compositionstart",Dl),gt(e,"compositionend",no),gt(e,"change",no))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:o,number:r}},i){if(e[ut]=jt(i),e.composing)return;const a=(r||e.type==="number")&&!/^0\d/.test(e.value)?$s(e.value):e.value,c=t??"";if(a===c)return;const h=e.getRootNode();(h instanceof Document||h instanceof ShadowRoot)&&h.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===c)||(e.value=c)}},ro={deep:!0,created(e,t,s){e[ut]=jt(s),gt(e,"change",()=>{const n=e._modelValue,o=os(e),r=e.checked,i=e[ut];if(W(n)){const a=ln(n,o),c=a!==-1;if(r&&!c)i(n.concat(o));else if(!r&&c){const h=[...n];h.splice(a,1),i(h)}}else if(Nt(n)){const a=new Set(n);r?a.add(o):a.delete(o),i(a)}else i(mr(e,r))})},mounted:io,beforeUpdate(e,t,s){e[ut]=jt(s),io(e,t,s)}};function io(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(W(t))o=ln(t,n.props.value)>-1;else if(Nt(t))o=t.has(n.props.value);else{if(t===s)return;o=Lt(t,mr(e,!0))}e.checked!==o&&(e.checked=o)}const ns={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const o=Nt(t);gt(e,"change",()=>{const r=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>s?$s(os(i)):os(i));e[ut](e.multiple?o?new Set(r):r:r[0]),e._assigning=!0,Ro(()=>{e._assigning=!1})}),e[ut]=jt(n)},mounted(e,{value:t}){lo(e,t)},beforeUpdate(e,t,s){e[ut]=jt(s)},updated(e,{value:t}){e._assigning||lo(e,t)}};function lo(e,t){const s=e.multiple,n=W(t);if(!(s&&!n&&!Nt(t))){for(let o=0,r=e.options.length;o<r;o++){const i=e.options[o],a=os(i);if(s)if(n){const c=typeof a;c==="string"||c==="number"?i.selected=t.some(h=>String(h)===String(a)):i.selected=ln(t,a)>-1}else i.selected=t.has(a);else if(Lt(os(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function os(e){return"_value"in e?e._value:e.value}function mr(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const jl={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Nl=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(o=>{if(!("key"in o))return;const r=vt(o.key);if(t.some(i=>i===r||jl[i]===r))return e(o)}))},Ll=Ce({patchProp:Ml},xl);let ao;function Fl(){return ao||(ao=Gi(Ll))}const Hl=((...e)=>{const t=Fl().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=Ul(n);if(!o)return;const r=t._component;!Y(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=s(o,!1,Vl(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function Vl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ul(e){return me(e)?document.querySelector(e):e}let wn="";function Bt(e){wn=e}function Se(){return wn}async function ye(e,t){const s=await fetch(e,{...t,headers:{Authorization:`Bearer ${wn}`,"Content-Type":"application/json",...(t==null?void 0:t.headers)??{}}});if(!s.ok){const n=new Error(s.statusText);throw n.status=s.status,n}return s.json()}const Bl={class:"animate-fade-in"},Kl={key:0,class:"text-center py-12 text-textSecondary"},Wl={key:1,class:"text-center text-textSecondary py-12"},zl={key:2,class:"space-y-3"},Jl={class:"flex items-center justify-between"},ql={class:"flex items-center gap-3"},Gl={class:"font-medium"},Yl={class:"text-accentLight"},Zl={class:"text-textSecondary text-xs"},Ql={key:2,class:"text-muted italic"},Xl={class:"text-xs text-textSecondary font-mono"},ea={class:"text-right"},ta={class:"flex items-center gap-2 justify-end"},sa={class:"text-xs text-textSecondary"},na=kt({__name:"SessionsTab",props:{status:{}},setup(e){const t=e,s=L([]),n=L(!0);async function o(){n.value=!0;try{const h=await ye("/api/status");s.value=(h.sessions||[]).slice().sort((u,p)=>u.status==="active"&&p.status!=="active"?-1:u.status!=="active"&&p.status==="active"?1:p.lastActivity-u.lastActivity)}finally{n.value=!1}}const r=Ue(()=>{var u;return(((u=t.status)==null?void 0:u.sessions)??s.value).slice().sort((p,x)=>p.status==="active"&&x.status!=="active"?-1:p.status!=="active"&&x.status==="active"?1:x.lastActivity-p.lastActivity)});function i(h){const u=Math.floor((Date.now()-h.lastActivity)/6e4);return h.status==="disconnected"?{label:`Disconnected${u>0?` — ${u}m ago`:""}`,color:"text-muted"}:u<5?{label:"Active",color:"text-success"}:u<30?{label:`Idle ${u}m`,color:"text-warn"}:{label:`Dormant ${u}m`,color:"text-danger"}}function a(h){if(!h.lastWaitCallAt)return"";const u=Math.floor((Date.now()-h.lastWaitCallAt)/6e4);return u<5?`Polling — ${u===0?"just now":u+"m ago"}`:`Last poll — ${u}m ago`}function c(h){return h.lastWaitCallAt?Math.floor((Date.now()-h.lastWaitCallAt)/6e4)<5?"text-success":"text-warn":""}return yt(o),(h,u)=>(w(),C("div",Bl,[n.value&&r.value.length===0?(w(),C("div",Kl,"Loading sessions...")):r.value.length===0?(w(),C("div",Wl,"No sessions")):(w(),C("div",zl,[(w(!0),C(ne,null,ve(r.value,p=>(w(),C("div",{key:p.mcpSessionId,class:q(["glass rounded-xl p-4 animate-slide-up",p.status==="disconnected"?"opacity-60":""])},[l("div",Jl,[l("div",ql,[l("span",{class:q(["w-2.5 h-2.5 rounded-full",p.status==="disconnected"?"bg-muted":Math.floor((Date.now()-p.lastActivity)/6e4)<5?"bg-success":Math.floor((Date.now()-p.lastActivity)/6e4)<30?"bg-warn":"bg-danger"])},null,2),l("div",null,[l("div",Gl,[p.topicName?(w(),C(ne,{key:0},[l("span",Yl,T(p.topicName),1),l("span",Zl," (thread "+T(p.threadId)+")",1)],64)):p.threadId!=null?(w(),C(ne,{key:1},[Et("Thread "+T(p.threadId),1)],64)):(w(),C("span",Ql,"Awaiting start_session…"))]),l("div",Xl,T(p.mcpSessionId.slice(0,12))+"...",1)])]),l("div",ea,[l("div",ta,[l("span",{class:q(["text-sm font-medium",i(p).color])},T(i(p).label),3),a(p)?(w(),C("span",{key:0,class:q(["text-xs ml-2",c(p)])},T(a(p)),3)):Q("",!0)]),l("div",sa,T(p.transportType),1)])])],2))),128))]))]))}}),oa={class:"animate-fade-in"},ra={class:"flex flex-wrap items-center gap-3 mb-4"},ia={key:0,class:"text-center py-12 text-textSecondary"},la={key:1,class:"text-center py-12 text-textSecondary"},aa={key:2,class:"space-y-2"},ca={class:"flex items-start justify-between gap-3"},ua={class:"flex-1 min-w-0"},da={class:"flex items-center gap-2 mb-1"},fa={key:0,class:"type-badge",style:{background:"rgba(239,68,68,0.15)",color:"#f87171"}},pa={key:1,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},ha={class:"text-xs text-textSecondary"},ma={class:"text-sm text-textPrimary leading-relaxed"},ga={class:"flex flex-wrap gap-1.5 mt-2"},xa={class:"text-right shrink-0"},va={class:"text-sm font-mono text-textSecondary"},ya={class:"text-xs text-muted"},ba={class:"text-xs text-muted"},_a=kt({__name:"MemoryNotesTab",setup(e){const t=L([]),s=L(!1),n=L(""),o=L("created_at"),r=L("");let i=null;async function a(){s.value=!0;try{const u=r.value.trim();let p;if(u)p=await ye(`/api/search?q=${encodeURIComponent(u)}&limit=50`);else{const x=new URLSearchParams({limit:"50",sort:o.value});n.value&&x.set("type",n.value),p=await ye(`/api/notes?${x}`)}t.value=p}finally{s.value=!1}}function c(){i&&clearTimeout(i),i=setTimeout(a,300)}function h(u){if(!u)return"never";const p=Date.now()-new Date(u).getTime(),x=Math.floor(p/6e4);if(x<1)return"just now";if(x<60)return`${x}m ago`;const $=Math.floor(x/60);return $<24?`${$}h ago`:`${Math.floor($/24)}d ago`}return yt(a),(u,p)=>(w(),C("div",oa,[l("div",ra,[pe(l("input",{"onUpdate:modelValue":p[0]||(p[0]=x=>r.value=x),onInput:c,type:"text",placeholder:"Search notes...",class:"flex-1 min-w-[200px] px-4 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,544),[[$e,r.value]]),pe(l("select",{"onUpdate:modelValue":p[1]||(p[1]=x=>n.value=x),onChange:a,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none"},[...p[3]||(p[3]=[Ve('<option value="">All types</option><option value="fact">Facts</option><option value="preference">Preferences</option><option value="pattern">Patterns</option><option value="entity">Entities</option><option value="relationship">Relationships</option>',6)])],544),[[ns,n.value]]),pe(l("select",{"onUpdate:modelValue":p[2]||(p[2]=x=>o.value=x),onChange:a,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none"},[...p[4]||(p[4]=[l("option",{value:"created_at"},"Newest",-1),l("option",{value:"confidence"},"Confidence",-1),l("option",{value:"access_count"},"Most accessed",-1)])],544),[[ns,o.value]])]),s.value?(w(),C("div",ia,"Loading notes...")):t.value.length===0?(w(),C("div",la,"No notes found")):(w(),C("div",aa,[(w(!0),C(ne,null,ve(t.value,x=>(w(),C("div",{key:x.noteId,class:q(["glass rounded-xl p-4 animate-fade-in",`priority-${x.priority||0}`])},[l("div",ca,[l("div",ua,[l("div",da,[l("span",{class:q(["type-badge",`type-${x.type}`])},T(x.type),3),x.priority>=2?(w(),C("span",fa,"HIGH IMPORTANCE")):x.priority===1?(w(),C("span",pa,"NOTABLE")):Q("",!0),l("span",ha,T(x.noteId),1)]),l("p",ma,T(x.content),1),l("div",ga,[(w(!0),C(ne,null,ve(x.keywords||[],$=>(w(),C("span",{key:$,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},T($),1))),128))])]),l("div",xa,[l("div",va,T(((Number(x.confidence)||0)*100).toFixed(0))+"%",1),l("div",ya,T(h(x.createdAt)),1),l("div",ba,T(x.accessCount??0)+" hits",1)])])],2))),128))]))]))}}),wa={class:"animate-fade-in space-y-6"},Sa={class:"glass rounded-xl p-4"},Ca={class:"flex flex-wrap items-center gap-4 mb-4"},Ta={key:0,class:"text-sm text-success"},ka={class:"flex flex-wrap items-center gap-3"},$a={key:0,class:"text-sm text-success"},Aa={class:"flex flex-wrap items-center gap-3 mb-4"},Ea={key:0,class:"text-sm text-success"},Pa={class:"glass rounded-xl p-6"},Ia={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Ma={class:"flex items-center gap-2"},Oa={key:0,class:"text-sm text-success"},Ra={key:0,class:"mb-3"},Da={class:"mt-4"},ja=["innerHTML"],Na={class:"glass rounded-xl p-6"},La={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Fa={class:"flex items-center gap-2"},Ha={key:0,class:"text-sm text-success"},Va={class:"flex gap-2 mb-4"},Ua=["onClick"],Ba={key:0,class:"mb-3"},Ka=["value","placeholder"],Wa={class:"glass rounded-xl p-6"},za={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Ja={class:"flex items-center gap-2"},qa={key:0,class:"text-sm text-success"},Ga={class:"mb-4 flex flex-wrap items-center gap-3"},Ya={class:"flex items-center gap-2"},Za={class:"font-mono text-sm text-textPrimary"},Qa={key:0,class:"mb-3"},Xa={class:"flex flex-wrap gap-2 mb-3"},ec=["onClick"],tc={class:"mt-4"},sc=["innerHTML"],nc=kt({__name:"TemplatesTab",setup(e){function t(F){return F.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\{\{([A-Z_]+)\}\}/g,'<span class="text-accentLight" style="background:rgba(99,102,241,0.1);padding:0 2px;border-radius:3px">{{$1}}</span>')}const s=L("copilot"),n=L(""),o=L(""),r=L(""),i=L(50),a=L(""),c=L(""),h=L(!0),u=L(""),p=L(!1),x=L({}),$=L("copilot"),H=L(""),M=L(""),G=L(!0),R=L(""),V=L(!1),Z=L([]),N=L("");async function oe(){await Promise.all([_e(),J(),j(),B(),re()])}async function _e(){try{const F=await ye("/api/settings/agent-type");s.value=F.agentType||"copilot"}catch{}}async function J(){try{const F=await ye("/api/settings/claude-mcp-config");o.value=F.path||""}catch{}}async function j(){try{const F=await ye("/api/settings/bootstrap-message-count");i.value=F.count??50}catch{}}async function B(){try{const F=await ye("/api/templates");if(F.templates&&F.templates.length>0){const k=F.templates[0];c.value=k.content||"",h.value=k.isDefault??!0}F.agentReminders&&(x.value=F.agentReminders)}catch{}}async function re(){try{const[F,k,ot]=await Promise.all([ye("/api/templates/drive"),ye("/api/templates/drive-presets"),ye("/api/settings/dmn-activation-hours")]);Z.value=k.presets||[],N.value=String(ot.value??"not set"),F.custom?(M.value=F.custom,G.value=!1):(M.value=F.default||"",G.value=!0)}catch{}}async function ee(){try{await ye("/api/settings/agent-type",{method:"POST",body:JSON.stringify({agentType:s.value})}),await ye("/api/templates/reminders",{method:"DELETE"}),n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3),await B()}catch(F){n.value="Error: "+F.message}}async function ge(){try{await ye("/api/settings/bootstrap-message-count",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:i.value})}),a.value="Saved ✓",setTimeout(()=>{a.value=""},3e3)}catch(F){a.value="Error: "+F.message}}async function he(){const F=o.value.trim();if(!F){r.value="Path is empty",setTimeout(()=>{r.value=""},3e3);return}try{await ye("/api/settings/claude-mcp-config",{method:"POST",body:JSON.stringify({path:F})}),r.value="Saved ✓",setTimeout(()=>{r.value=""},3e3)}catch(k){r.value="Error: "+k.message}}async function Fe(){try{const F=await fetch("/api/templates/reminders",{method:"POST",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({content:c.value})});if(!F.ok)throw new Error(F.statusText);h.value=!1,u.value="Saved ✓",setTimeout(()=>{u.value=""},3e3)}catch(F){u.value="Error: "+F.message}}async function We(){if(confirm("Reset to default template? Your customizations will be lost."))try{const F=await fetch("/api/templates/reminders",{method:"DELETE",headers:{Authorization:`Bearer ${Se()}`}});if(!F.ok)throw new Error(F.statusText);await B(),u.value="Reset to default ✓",setTimeout(()=>{u.value=""},3e3)}catch(F){u.value="Error: "+F.message}}async function O(){var ot;const F=$.value,k=((ot=x.value[F])==null?void 0:ot.content)??"";try{const De=await fetch(`/api/templates/reminders-${F}`,{method:"POST",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({content:k})});if(!De.ok)throw new Error(De.statusText);x.value[F]={content:k,isDefault:!1},H.value=`Saved ${F} ✓`,setTimeout(()=>{H.value=""},3e3)}catch(De){H.value="Error: "+De.message}}async function v(){const F=$.value;if(confirm(`Reset ${F} agent reminder? The custom template will be removed.`))try{const k=await fetch(`/api/templates/reminders-${F}`,{method:"DELETE",headers:{Authorization:`Bearer ${Se()}`}});if(!k.ok)throw new Error(k.statusText);await B(),H.value=`Reset ${F} ✓`,setTimeout(()=>{H.value=""},3e3)}catch(k){H.value="Error: "+k.message}}async function g(){const F=M.value;if(!F.trim()){R.value="Template is empty — load a preset first",setTimeout(()=>{R.value=""},3e3);return}try{const k=await fetch("/api/templates/drive",{method:"POST",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({content:F})});if(!k.ok)throw new Error(k.statusText);G.value=!1,R.value="Saved ✓",setTimeout(()=>{R.value=""},3e3)}catch(k){R.value="Error: "+k.message}}async function ae(){if(confirm("Reset drive template? The custom template will be removed."))try{const F=await fetch("/api/templates/drive",{method:"DELETE",headers:{Authorization:`Bearer ${Se()}`}});if(!F.ok)throw new Error(F.statusText);await re(),R.value="Reset to default ✓",setTimeout(()=>{R.value=""},3e3)}catch(F){R.value="Error: "+F.message}}function be(F){M.value=F.content,G.value=!1}const I=Ue(()=>t(c.value)),Ee=Ue(()=>M.value?t(M.value):'<span style="color:#6b7280">(no template loaded)</span>');return yt(oe),(F,k)=>{var ot,De;return w(),C("div",wa,[l("div",Sa,[l("div",Ca,[k[9]||(k[9]=l("label",{class:"text-sm font-medium text-textSecondary"},"Agent Type",-1)),pe(l("select",{"onUpdate:modelValue":k[0]||(k[0]=ie=>s.value=ie),onChange:ee,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},[...k[8]||(k[8]=[Ve('<option value="copilot">Copilot</option><option value="copilot_claude">Copilot (Claude)</option><option value="copilot_codex">Copilot (Codex)</option><option value="claude">Claude</option><option value="cursor">Cursor</option><option value="codex">Codex</option><option value="openai_codex">OpenAI Codex</option>',7)])],544),[[ns,s.value]]),n.value?(w(),C("span",Ta,T(n.value),1)):Q("",!0),k[10]||(k[10]=l("span",{class:"text-xs text-muted"},"Changes which default reminders template is used",-1))]),l("div",ka,[k[11]||(k[11]=l("label",{class:"text-sm font-medium text-textSecondary"},"Claude MCP Config Path",-1)),pe(l("input",{"onUpdate:modelValue":k[1]||(k[1]=ie=>o.value=ie),type:"text",placeholder:"~/.claude/settings.json",class:"flex-1 min-w-[260px] px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted font-mono focus:outline-none focus:border-accent transition"},null,512),[[$e,o.value]]),l("button",{onClick:he,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save"),r.value?(w(),C("span",$a,T(r.value),1)):Q("",!0)]),l("div",Aa,[k[12]||(k[12]=l("label",{class:"text-sm font-medium text-textSecondary"},"Bootstrap Messages",-1)),pe(l("input",{"onUpdate:modelValue":k[2]||(k[2]=ie=>i.value=ie),type:"number",min:"0",max:"500",class:"w-24 px-3 py-2 rounded-xl bg-card border border-gray-700 text-text text-sm focus:border-accent focus:outline-none"},null,512),[[$e,i.value,void 0,{number:!0}]]),l("button",{onClick:ge,class:"px-4 py-2 rounded-xl bg-accent text-white text-sm font-medium hover:bg-accent/80 transition-colors"},"Save"),a.value?(w(),C("span",Ea,T(a.value),1)):Q("",!0),k[13]||(k[13]=l("span",{class:"text-xs text-muted"},"Number of recent messages injected as warm context (0 = off)",-1))])]),l("div",Pa,[l("div",Ia,[k[14]||(k[14]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Reminders Template"),l("p",{class:"text-sm text-textSecondary mt-1"},"Edit the system prompt template sent with every reminder")],-1)),l("div",Ma,[u.value?(w(),C("span",Oa,T(u.value),1)):Q("",!0),l("button",{onClick:We,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Reset to Default"),l("button",{onClick:Fe,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),h.value?(w(),C("div",Ra,[...k[15]||(k[15]=[l("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"USING DEFAULT — edit and save to customize",-1)])])):Q("",!0),pe(l("textarea",{"onUpdate:modelValue":k[3]||(k[3]=ie=>c.value=ie),rows:"20",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:"Loading..."},null,512),[[$e,c.value]]),l("div",Da,[l("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:k[4]||(k[4]=ie=>p.value=!p.value)},[(w(),C("svg",{class:q(["w-4 h-4 text-textSecondary transition-transform",p.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...k[16]||(k[16]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),k[17]||(k[17]=l("span",{class:"text-sm font-medium text-textSecondary"},"Preview with highlighted variables",-1))]),p.value?(w(),C("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:I.value},null,8,ja)):Q("",!0)]),k[18]||(k[18]=Ve('<details class="mt-4"><summary class="text-sm font-medium text-textSecondary cursor-pointer hover:text-textPrimary transition">Available Variables</summary><div class="mt-2 glass rounded-xl p-4 grid grid-cols-1 sm:grid-cols-2 gap-2 text-sm"><div><code class="text-accentLight">{{OPERATOR_MESSAGE}}</code> <span class="text-textSecondary">— latest operator message</span></div><div><code class="text-accentLight">{{THREAD_ID}}</code> <span class="text-textSecondary">— Telegram thread ID</span></div><div><code class="text-accentLight">{{TIME}}</code> <span class="text-textSecondary">— formatted timestamp</span></div><div><code class="text-accentLight">{{UPTIME}}</code> <span class="text-textSecondary">— session uptime</span></div><div><code class="text-accentLight">{{VERSION}}</code> <span class="text-textSecondary">— package version</span></div><div><code class="text-accentLight">{{MODE}}</code> <span class="text-textSecondary">— "autonomous" or "standard"</span></div></div></details>',1))]),l("div",Na,[l("div",La,[k[19]||(k[19]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Agent-Specific Reminders"),l("p",{class:"text-sm text-textSecondary mt-1"},"Appended after the base reminders template — per agent type")],-1)),l("div",Fa,[H.value?(w(),C("span",Ha,T(H.value),1)):Q("",!0),l("button",{onClick:v,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Reset"),l("button",{onClick:O,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),l("div",Va,[(w(),C(ne,null,ve(["copilot","claude","cursor","codex"],ie=>l("button",{key:ie,onClick:bt=>$.value=ie,class:q(["px-4 py-2 rounded-xl text-sm font-medium transition",$.value===ie?"bg-accent text-white":"bg-card hover:bg-cardHover border border-gray-700 text-textSecondary hover:text-textPrimary"])},T(ie.charAt(0).toUpperCase()+ie.slice(1)),11,Ua)),64))]),((ot=x.value[$.value])==null?void 0:ot.isDefault)!==!1?(w(),C("div",Ba,[...k[20]||(k[20]=[l("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"NO CUSTOM OVERRIDE — this agent uses only the base reminders",-1)])])):Q("",!0),l("textarea",{value:((De=x.value[$.value])==null?void 0:De.content)??"",onInput:k[5]||(k[5]=ie=>{const bt=ie.target;x.value[$.value]={content:bt.value,isDefault:!1}}),rows:"8",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:`Add ${$.value}-specific reminders (e.g. orchestrator hints, subagent policies)...`},null,40,Ka)]),l("div",Wa,[l("div",za,[k[21]||(k[21]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Drive Framing Template"),l("p",{class:"text-sm text-textSecondary mt-1"},"Customize the autonomous drive prompt sent when the operator is away")],-1)),l("div",Ja,[R.value?(w(),C("span",qa,T(R.value),1)):Q("",!0),l("button",{onClick:ae,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Reset to Default"),l("button",{onClick:g,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),l("div",Ga,[k[23]||(k[23]=l("label",{class:"text-sm text-textSecondary"},"Drive Activation Period:",-1)),l("div",Ya,[l("span",Za,T(N.value),1),k[22]||(k[22]=l("span",{class:"text-sm text-textSecondary"},"hours",-1))]),k[24]||(k[24]=l("span",{class:"text-xs text-muted"},"(informational — set via DMN_ACTIVATION_HOURS env var)",-1))]),G.value?(w(),C("div",Qa,[...k[25]||(k[25]=[l("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"(Default — edit to override)",-1)])])):Q("",!0),l("div",Xa,[k[26]||(k[26]=l("span",{class:"text-sm text-textSecondary self-center"},"Presets:",-1)),(w(!0),C(ne,null,ve(Z.value,ie=>(w(),C("button",{key:ie.key,onClick:bt=>be(ie),class:"px-3 py-1.5 rounded-lg bg-card hover:bg-cardHover border border-gray-700 text-xs text-textSecondary hover:text-textPrimary transition"},T(ie.label),9,ec))),128))]),pe(l("textarea",{"onUpdate:modelValue":k[6]||(k[6]=ie=>M.value=ie),rows:"15",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:"Load a preset or type a custom drive template..."},null,512),[[$e,M.value]]),l("div",tc,[l("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:k[7]||(k[7]=ie=>V.value=!V.value)},[(w(),C("svg",{class:q(["w-4 h-4 text-textSecondary transition-transform",V.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...k[27]||(k[27]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),k[28]||(k[28]=l("span",{class:"text-sm font-medium text-textSecondary"},"Preview with sample values",-1))]),V.value?(w(),C("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:Ee.value},null,8,sc)):Q("",!0)]),k[29]||(k[29]=Ve('<details class="mt-4"><summary class="text-sm font-medium text-textSecondary cursor-pointer hover:text-textPrimary transition">Available Variables</summary><div class="mt-2 glass rounded-xl p-4 grid grid-cols-1 sm:grid-cols-2 gap-2 text-sm"><div><code class="text-accentLight">{{IDLE_HOURS}}</code> <span class="text-textSecondary">— hours since last operator interaction</span></div><div><code class="text-accentLight">{{TIME}}</code> <span class="text-textSecondary">— ISO timestamp</span></div><div><code class="text-accentLight">{{PROBABILITY}}</code> <span class="text-textSecondary">— drive activation probability (0.2–1.0)</span></div></div></details>',1))])])}}}),oc={class:"animate-fade-in"},rc={class:"glass rounded-xl p-6 mb-6"},ic={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},lc={key:0,class:"glass rounded-xl p-4 mb-4 border border-accent/30"},ac={class:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3"},cc={class:"flex items-center gap-4 mb-3"},uc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer"},dc={class:"flex items-center gap-2"},fc={key:0,class:"text-sm text-warn"},pc={key:1,class:"text-center py-8 text-textSecondary text-sm"},hc={key:2,class:"text-center text-textSecondary py-12"},mc={key:3,class:"space-y-2"},gc=["onClick"],xc={class:"flex items-start justify-between gap-3"},vc={class:"flex-1 min-w-0"},yc={class:"flex items-center gap-2 mb-1"},bc={class:"font-medium text-sm"},_c={key:0,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},wc={class:"flex flex-wrap gap-1.5 mt-1"},Sc=["title"],Cc={key:0,class:"glass rounded-xl p-6"},Tc={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},kc={class:"text-lg font-semibold"},$c={class:"text-sm text-textSecondary mt-1"},Ac={class:"flex items-center gap-2"},Ec={key:0,class:"text-sm text-success"},Pc={key:1,class:"text-sm text-warn"},Ic={class:"grid grid-cols-1 sm:grid-cols-3 gap-3 mb-4"},Mc=["value"],Oc={class:"flex items-end"},Rc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer pb-2"},Dc=kt({__name:"SkillsTab",setup(e){const t=L([]),s=L(!0),n=L(null),o=L(""),r=L(""),i=L(!1),a=L(""),c=L(""),h=L(!1),u=L(""),p=L(""),x=L(!1),$=L("");async function H(){s.value=!0;try{const J=await ye("/api/skills");t.value=J.skills||[]}finally{s.value=!1}}function M(J){return J?J.includes(".remote-copilot-mcp")&&J.includes("skills")?"user":J.endsWith(".default.md")?"default":J.endsWith(".skill.md")?"project":"unknown":"unknown"}function G(J){const j={user:"background:rgba(99,102,241,0.15);color:#818cf8",default:"background:rgba(107,114,128,0.15);color:#9ca3af",project:"background:rgba(34,197,94,0.15);color:#4ade80",unknown:"background:rgba(107,114,128,0.15);color:#9ca3af"};return j[J]||j.unknown}function R(J){n.value=J,o.value=J.content,r.value=(J.triggers||[]).join(", "),i.value=!!J.replacesOrchestrator,h.value=!1}function V(){n.value=null,c.value=""}function Z(J,j,B,re){let ee=`---
|
|
64
|
+
**/let sn;const Jn=typeof window<"u"&&window.trustedTypes;if(Jn)try{sn=Jn.createPolicy("vue",{createHTML:e=>e})}catch{}const mr=sn?e=>sn.createHTML(e):e=>e,gl="http://www.w3.org/2000/svg",xl="http://www.w3.org/1998/Math/MathML",it=typeof document<"u"?document:null,qn=it&&it.createElement("template"),vl={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const o=t==="svg"?it.createElementNS(gl,e):t==="mathml"?it.createElementNS(xl,e):s?it.createElement(e,{is:s}):it.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>it.createTextNode(e),createComment:e=>it.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>it.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,r){const i=s?s.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===r||!(o=o.nextSibling)););else{qn.innerHTML=mr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=qn.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[i?i.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},yl=Symbol("_vtc");function bl(e,t,s){const n=e[yl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Gn=Symbol("_vod"),_l=Symbol("_vsh"),wl=Symbol(""),Sl=/(?:^|;)\s*display\s*:/;function Cl(e,t,s){const n=e.style,o=xe(s);let r=!1;if(s&&!o){if(t)if(xe(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();s[a]==null&&gs(n,a,"")}else for(const i in t)s[i]==null&&gs(n,i,"");for(const i in s)i==="display"&&(r=!0),gs(n,i,s[i])}else if(o){if(t!==s){const i=n[wl];i&&(s+=";"+i),n.cssText=s,r=Sl.test(s)}}else t&&e.removeAttribute("style");Gn in e&&(e[Gn]=r?n.display:"",e[_l]&&(n.display="none"))}const Yn=/\s*!important$/;function gs(e,t,s){if(W(s))s.forEach(n=>gs(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=kl(e,t);Yn.test(s)?e.setProperty(vt(n),s.replace(Yn,""),"important"):e[n]=s}}const Zn=["Webkit","Moz","ms"],Ks={};function kl(e,t){const s=Ks[t];if(s)return s;let n=De(t);if(n!=="filter"&&n in e)return Ks[t]=n;n=Ts(n);for(let o=0;o<Zn.length;o++){const r=Zn[o]+n;if(r in e)return Ks[t]=r}return t}const Qn="http://www.w3.org/1999/xlink";function Xn(e,t,s,n,o,r=Tr(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Qn,t.slice(6,t.length)):e.setAttributeNS(Qn,t,s):s==null||r&&!go(s)?e.removeAttribute(t):e.setAttribute(t,r?"":nt(s)?String(s):s)}function eo(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?mr(s):s);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const a=r==="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 i=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=go(s):s==null&&a==="string"?(s="",i=!0):a==="number"&&(s=0,i=!0)}try{e[t]=s}catch{}i&&e.removeAttribute(o||t)}function gt(e,t,s,n){e.addEventListener(t,s,n)}function Tl(e,t,s,n){e.removeEventListener(t,s,n)}const to=Symbol("_vei");function $l(e,t,s,n,o=null){const r=e[to]||(e[to]={}),i=r[t];if(n&&i)i.value=n;else{const[a,c]=Al(t);if(n){const p=r[t]=Il(n,o);gt(e,a,p,c)}else i&&(Tl(e,a,i,c),r[t]=void 0)}}const so=/(?:Once|Passive|Capture)$/;function Al(e){let t;if(so.test(e)){t={};let n;for(;n=e.match(so);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):vt(e.slice(2)),t]}let Ws=0;const El=Promise.resolve(),Pl=()=>Ws||(El.then(()=>Ws=0),Ws=Date.now());function Il(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;ot(Ml(n,s.value),t,5,[n])};return s.value=e,s.attached=Pl(),s}function Ml(e,t){if(W(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>o=>!o._stopped&&n&&n(o))}else return t}const no=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ol=(e,t,s,n,o,r)=>{const i=o==="svg";t==="class"?bl(e,n,i):t==="style"?Cl(e,s,n):Ss(t)?Cs(t)||$l(e,t,s,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Rl(e,t,n,i))?(eo(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Xn(e,t,n,i,r,t!=="value")):e._isVueCE&&(Dl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!xe(n)))?eo(e,De(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Xn(e,t,n,i))};function Rl(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&no(t)&&Y(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return no(t)&&xe(s)?!1:t in e}function Dl(e,t){const s=e._def.props;if(!s)return!1;const n=De(t);return Array.isArray(s)?s.some(o=>De(o)===n):Object.keys(s).some(o=>De(o)===n)}const jt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return W(t)?s=>fs(t,s):t};function jl(e){e.target.composing=!0}function oo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ut=Symbol("_assign");function ro(e,t,s){return t&&(e=e.trim()),s&&(e=$s(e)),e}const ke={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e[ut]=jt(o);const r=n||o.props&&o.props.type==="number";gt(e,t?"change":"input",i=>{i.target.composing||e[ut](ro(e.value,s,r))}),(s||r)&>(e,"change",()=>{e.value=ro(e.value,s,r)}),t||(gt(e,"compositionstart",jl),gt(e,"compositionend",oo),gt(e,"change",oo))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:o,number:r}},i){if(e[ut]=jt(i),e.composing)return;const a=(r||e.type==="number")&&!/^0\d/.test(e.value)?$s(e.value):e.value,c=t??"";if(a===c)return;const p=e.getRootNode();(p instanceof Document||p instanceof ShadowRoot)&&p.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===c)||(e.value=c)}},io={deep:!0,created(e,t,s){e[ut]=jt(s),gt(e,"change",()=>{const n=e._modelValue,o=os(e),r=e.checked,i=e[ut];if(W(n)){const a=an(n,o),c=a!==-1;if(r&&!c)i(n.concat(o));else if(!r&&c){const p=[...n];p.splice(a,1),i(p)}}else if(Nt(n)){const a=new Set(n);r?a.add(o):a.delete(o),i(a)}else i(gr(e,r))})},mounted:lo,beforeUpdate(e,t,s){e[ut]=jt(s),lo(e,t,s)}};function lo(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(W(t))o=an(t,n.props.value)>-1;else if(Nt(t))o=t.has(n.props.value);else{if(t===s)return;o=Lt(t,gr(e,!0))}e.checked!==o&&(e.checked=o)}const ns={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const o=Nt(t);gt(e,"change",()=>{const r=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>s?$s(os(i)):os(i));e[ut](e.multiple?o?new Set(r):r:r[0]),e._assigning=!0,Do(()=>{e._assigning=!1})}),e[ut]=jt(n)},mounted(e,{value:t}){ao(e,t)},beforeUpdate(e,t,s){e[ut]=jt(s)},updated(e,{value:t}){e._assigning||ao(e,t)}};function ao(e,t){const s=e.multiple,n=W(t);if(!(s&&!n&&!Nt(t))){for(let o=0,r=e.options.length;o<r;o++){const i=e.options[o],a=os(i);if(s)if(n){const c=typeof a;c==="string"||c==="number"?i.selected=t.some(p=>String(p)===String(a)):i.selected=an(t,a)>-1}else i.selected=t.has(a);else if(Lt(os(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function os(e){return"_value"in e?e._value:e.value}function gr(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Nl={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},nn=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(o=>{if(!("key"in o))return;const r=vt(o.key);if(t.some(i=>i===r||Nl[i]===r))return e(o)}))},Ll=Te({patchProp:Ol},vl);let co;function Fl(){return co||(co=Yi(Ll))}const Hl=((...e)=>{const t=Fl().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=Ul(n);if(!o)return;const r=t._component;!Y(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=s(o,!1,Vl(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function Vl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ul(e){return xe(e)?document.querySelector(e):e}let Sn="";function Bt(e){Sn=e}function Se(){return Sn}async function _e(e,t){const s=await fetch(e,{...t,headers:{Authorization:`Bearer ${Sn}`,"Content-Type":"application/json",...(t==null?void 0:t.headers)??{}}});if(!s.ok){const n=new Error(s.statusText);throw n.status=s.status,n}return s.json()}const Bl={class:"animate-fade-in"},Kl={key:0,class:"text-center py-12 text-textSecondary"},Wl={key:1,class:"text-center text-textSecondary py-12"},zl={key:2,class:"space-y-3"},Jl={class:"flex items-center justify-between"},ql={class:"flex items-center gap-3"},Gl={class:"font-medium"},Yl={class:"text-accentLight"},Zl={class:"text-textSecondary text-xs"},Ql={key:2,class:"text-muted italic"},Xl={class:"text-xs text-textSecondary font-mono"},ea={class:"text-right"},ta={class:"flex items-center gap-2 justify-end"},sa={class:"text-xs text-textSecondary"},na=kt({__name:"SessionsTab",props:{status:{}},setup(e){const t=e,s=D([]),n=D(!0);async function o(){n.value=!0;try{const p=await _e("/api/status");s.value=(p.sessions||[]).slice().sort((u,h)=>u.status==="active"&&h.status!=="active"?-1:u.status!=="active"&&h.status==="active"?1:h.lastActivity-u.lastActivity)}finally{n.value=!1}}const r=Ke(()=>{var u;return(((u=t.status)==null?void 0:u.sessions)??s.value).slice().sort((h,x)=>h.status==="active"&&x.status!=="active"?-1:h.status!=="active"&&x.status==="active"?1:x.lastActivity-h.lastActivity)});function i(p){const u=Math.floor((Date.now()-p.lastActivity)/6e4);return p.status==="disconnected"?{label:`Disconnected${u>0?` — ${u}m ago`:""}`,color:"text-muted"}:u<5?{label:"Active",color:"text-success"}:u<30?{label:`Idle ${u}m`,color:"text-warn"}:{label:`Dormant ${u}m`,color:"text-danger"}}function a(p){if(!p.lastWaitCallAt)return"";const u=Math.floor((Date.now()-p.lastWaitCallAt)/6e4);return u<5?`Polling — ${u===0?"just now":u+"m ago"}`:`Last poll — ${u}m ago`}function c(p){return p.lastWaitCallAt?Math.floor((Date.now()-p.lastWaitCallAt)/6e4)<5?"text-success":"text-warn":""}return yt(o),(p,u)=>(w(),S("div",Bl,[n.value&&r.value.length===0?(w(),S("div",Kl,"Loading sessions...")):r.value.length===0?(w(),S("div",Wl,"No sessions")):(w(),S("div",zl,[(w(!0),S(ie,null,be(r.value,h=>(w(),S("div",{key:h.mcpSessionId,class:G(["glass rounded-xl p-4 animate-slide-up",h.status==="disconnected"?"opacity-60":""])},[l("div",Jl,[l("div",ql,[l("span",{class:G(["w-2.5 h-2.5 rounded-full",h.status==="disconnected"?"bg-muted":Math.floor((Date.now()-h.lastActivity)/6e4)<5?"bg-success":Math.floor((Date.now()-h.lastActivity)/6e4)<30?"bg-warn":"bg-danger"])},null,2),l("div",null,[l("div",Gl,[h.topicName?(w(),S(ie,{key:0},[l("span",Yl,$(h.topicName),1),l("span",Zl," (thread "+$(h.threadId)+")",1)],64)):h.threadId!=null?(w(),S(ie,{key:1},[Et("Thread "+$(h.threadId),1)],64)):(w(),S("span",Ql,"Awaiting start_session…"))]),l("div",Xl,$(h.mcpSessionId.slice(0,12))+"...",1)])]),l("div",ea,[l("div",ta,[l("span",{class:G(["text-sm font-medium",i(h).color])},$(i(h).label),3),a(h)?(w(),S("span",{key:0,class:G(["text-xs ml-2",c(h)])},$(a(h)),3)):Q("",!0)]),l("div",sa,$(h.transportType),1)])])],2))),128))]))]))}}),oa={class:"animate-fade-in"},ra={class:"flex flex-wrap items-center gap-3 mb-4"},ia={key:0,class:"text-center py-12 text-textSecondary"},la={key:1,class:"text-center py-12 text-textSecondary"},aa={key:2,class:"space-y-2"},ca={class:"flex items-start justify-between gap-3"},ua={class:"flex-1 min-w-0"},da={class:"flex items-center gap-2 mb-1"},fa={key:0,class:"type-badge",style:{background:"rgba(239,68,68,0.15)",color:"#f87171"}},pa={key:1,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},ha={class:"text-xs text-textSecondary"},ma={class:"text-sm text-textPrimary leading-relaxed"},ga={class:"flex flex-wrap gap-1.5 mt-2"},xa={class:"text-right shrink-0"},va={class:"text-sm font-mono text-textSecondary"},ya={class:"text-xs text-muted"},ba={class:"text-xs text-muted"},_a=kt({__name:"MemoryNotesTab",setup(e){const t=D([]),s=D(!1),n=D(""),o=D("created_at"),r=D("");let i=null;async function a(){s.value=!0;try{const u=r.value.trim();let h;if(u)h=await _e(`/api/search?q=${encodeURIComponent(u)}&limit=50`);else{const x=new URLSearchParams({limit:"50",sort:o.value});n.value&&x.set("type",n.value),h=await _e(`/api/notes?${x}`)}t.value=h}finally{s.value=!1}}function c(){i&&clearTimeout(i),i=setTimeout(a,300)}function p(u){if(!u)return"never";const h=Date.now()-new Date(u).getTime(),x=Math.floor(h/6e4);if(x<1)return"just now";if(x<60)return`${x}m ago`;const C=Math.floor(x/60);return C<24?`${C}h ago`:`${Math.floor(C/24)}d ago`}return yt(a),(u,h)=>(w(),S("div",oa,[l("div",ra,[me(l("input",{"onUpdate:modelValue":h[0]||(h[0]=x=>r.value=x),onInput:c,type:"text",placeholder:"Search notes...",class:"flex-1 min-w-[200px] px-4 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,544),[[ke,r.value]]),me(l("select",{"onUpdate:modelValue":h[1]||(h[1]=x=>n.value=x),onChange:a,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none"},[...h[3]||(h[3]=[Be('<option value="">All types</option><option value="fact">Facts</option><option value="preference">Preferences</option><option value="pattern">Patterns</option><option value="entity">Entities</option><option value="relationship">Relationships</option>',6)])],544),[[ns,n.value]]),me(l("select",{"onUpdate:modelValue":h[2]||(h[2]=x=>o.value=x),onChange:a,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none"},[...h[4]||(h[4]=[l("option",{value:"created_at"},"Newest",-1),l("option",{value:"confidence"},"Confidence",-1),l("option",{value:"access_count"},"Most accessed",-1)])],544),[[ns,o.value]])]),s.value?(w(),S("div",ia,"Loading notes...")):t.value.length===0?(w(),S("div",la,"No notes found")):(w(),S("div",aa,[(w(!0),S(ie,null,be(t.value,x=>(w(),S("div",{key:x.noteId,class:G(["glass rounded-xl p-4 animate-fade-in",`priority-${x.priority||0}`])},[l("div",ca,[l("div",ua,[l("div",da,[l("span",{class:G(["type-badge",`type-${x.type}`])},$(x.type),3),x.priority>=2?(w(),S("span",fa,"HIGH IMPORTANCE")):x.priority===1?(w(),S("span",pa,"NOTABLE")):Q("",!0),l("span",ha,$(x.noteId),1)]),l("p",ma,$(x.content),1),l("div",ga,[(w(!0),S(ie,null,be(x.keywords||[],C=>(w(),S("span",{key:C,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},$(C),1))),128))])]),l("div",xa,[l("div",va,$(((Number(x.confidence)||0)*100).toFixed(0))+"%",1),l("div",ya,$(p(x.createdAt)),1),l("div",ba,$(x.accessCount??0)+" hits",1)])])],2))),128))]))]))}}),wa={class:"animate-fade-in space-y-6"},Sa={class:"glass rounded-xl p-4"},Ca={class:"flex flex-wrap items-center gap-4 mb-4"},ka={key:0,class:"text-sm text-success"},Ta={class:"flex flex-wrap items-center gap-3"},$a={key:0,class:"text-sm text-success"},Aa={class:"flex flex-wrap items-center gap-3 mb-4"},Ea={key:0,class:"text-sm text-success"},Pa={class:"glass rounded-xl p-6"},Ia={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Ma={class:"flex items-center gap-2"},Oa={key:0,class:"text-sm text-success"},Ra={key:0,class:"mb-3"},Da={class:"mt-4"},ja=["innerHTML"],Na={class:"glass rounded-xl p-6"},La={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Fa={class:"flex items-center gap-2"},Ha={key:0,class:"text-sm text-success"},Va={class:"flex gap-2 mb-4"},Ua=["onClick"],Ba={key:0,class:"mb-3"},Ka=["value","placeholder"],Wa={class:"glass rounded-xl p-6"},za={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Ja={class:"flex items-center gap-2"},qa={key:0,class:"text-sm text-success"},Ga={class:"mb-4 flex flex-wrap items-center gap-3"},Ya={class:"flex items-center gap-2"},Za={class:"font-mono text-sm text-textPrimary"},Qa={key:0,class:"mb-3"},Xa={class:"flex flex-wrap gap-2 mb-3"},ec=["onClick"],tc={class:"mt-4"},sc=["innerHTML"],nc=kt({__name:"TemplatesTab",setup(e){function t(M){return M.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\{\{([A-Z_]+)\}\}/g,'<span class="text-accentLight" style="background:rgba(99,102,241,0.1);padding:0 2px;border-radius:3px">{{$1}}</span>')}const s=D("copilot"),n=D(""),o=D(""),r=D(""),i=D(50),a=D(""),c=D(""),p=D(!0),u=D(""),h=D(!1),x=D({}),C=D("copilot"),H=D(""),j=D(""),z=D(!0),P=D(""),V=D(!1),Z=D([]),F=D("");async function le(){await Promise.all([de(),J(),N(),K(),fe()])}async function de(){try{const M=await _e("/api/settings/agent-type");s.value=M.agentType||"copilot"}catch{}}async function J(){try{const M=await _e("/api/settings/claude-mcp-config");o.value=M.path||""}catch{}}async function N(){try{const M=await _e("/api/settings/bootstrap-message-count");i.value=M.count??50}catch{}}async function K(){try{const M=await _e("/api/templates");if(M.templates&&M.templates.length>0){const T=M.templates[0];c.value=T.content||"",p.value=T.isDefault??!0}M.agentReminders&&(x.value=M.agentReminders)}catch{}}async function fe(){try{const[M,T,E]=await Promise.all([_e("/api/templates/drive"),_e("/api/templates/drive-presets"),_e("/api/settings/dmn-activation-hours")]);Z.value=T.presets||[],F.value=String(E.value??"not set"),M.custom?(j.value=M.custom,z.value=!1):(j.value=M.default||"",z.value=!0)}catch{}}async function te(){try{await _e("/api/settings/agent-type",{method:"POST",body:JSON.stringify({agentType:s.value})}),await _e("/api/templates/reminders",{method:"DELETE"}),n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3),await K()}catch(M){n.value="Error: "+M.message}}async function we(){try{await _e("/api/settings/bootstrap-message-count",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:i.value})}),a.value="Saved ✓",setTimeout(()=>{a.value=""},3e3)}catch(M){a.value="Error: "+M.message}}async function ye(){const M=o.value.trim();if(!M){r.value="Path is empty",setTimeout(()=>{r.value=""},3e3);return}try{await _e("/api/settings/claude-mcp-config",{method:"POST",body:JSON.stringify({path:M})}),r.value="Saved ✓",setTimeout(()=>{r.value=""},3e3)}catch(T){r.value="Error: "+T.message}}async function Ue(){try{const M=await fetch("/api/templates/reminders",{method:"POST",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({content:c.value})});if(!M.ok)throw new Error(M.statusText);p.value=!1,u.value="Saved ✓",setTimeout(()=>{u.value=""},3e3)}catch(M){u.value="Error: "+M.message}}async function Tt(){if(confirm("Reset to default template? Your customizations will be lost."))try{const M=await fetch("/api/templates/reminders",{method:"DELETE",headers:{Authorization:`Bearer ${Se()}`}});if(!M.ok)throw new Error(M.statusText);await K(),u.value="Reset to default ✓",setTimeout(()=>{u.value=""},3e3)}catch(M){u.value="Error: "+M.message}}async function ge(){var E;const M=C.value,T=((E=x.value[M])==null?void 0:E.content)??"";try{const $e=await fetch(`/api/templates/reminders-${M}`,{method:"POST",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({content:T})});if(!$e.ok)throw new Error($e.statusText);x.value[M]={content:T,isDefault:!1},H.value=`Saved ${M} ✓`,setTimeout(()=>{H.value=""},3e3)}catch($e){H.value="Error: "+$e.message}}async function se(){const M=C.value;if(confirm(`Reset ${M} agent reminder? The custom template will be removed.`))try{const T=await fetch(`/api/templates/reminders-${M}`,{method:"DELETE",headers:{Authorization:`Bearer ${Se()}`}});if(!T.ok)throw new Error(T.statusText);await K(),H.value=`Reset ${M} ✓`,setTimeout(()=>{H.value=""},3e3)}catch(T){H.value="Error: "+T.message}}async function X(){const M=j.value;if(!M.trim()){P.value="Template is empty — load a preset first",setTimeout(()=>{P.value=""},3e3);return}try{const T=await fetch("/api/templates/drive",{method:"POST",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({content:M})});if(!T.ok)throw new Error(T.statusText);z.value=!1,P.value="Saved ✓",setTimeout(()=>{P.value=""},3e3)}catch(T){P.value="Error: "+T.message}}async function Me(){if(confirm("Reset drive template? The custom template will be removed."))try{const M=await fetch("/api/templates/drive",{method:"DELETE",headers:{Authorization:`Bearer ${Se()}`}});if(!M.ok)throw new Error(M.statusText);await fe(),P.value="Reset to default ✓",setTimeout(()=>{P.value=""},3e3)}catch(M){P.value="Error: "+M.message}}function L(M){j.value=M.content,z.value=!1}const y=Ke(()=>t(c.value)),g=Ke(()=>j.value?t(j.value):'<span style="color:#6b7280">(no template loaded)</span>');return yt(le),(M,T)=>{var E,$e;return w(),S("div",wa,[l("div",Sa,[l("div",Ca,[T[9]||(T[9]=l("label",{class:"text-sm font-medium text-textSecondary"},"Agent Type",-1)),me(l("select",{"onUpdate:modelValue":T[0]||(T[0]=ne=>s.value=ne),onChange:te,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},[...T[8]||(T[8]=[Be('<option value="copilot">Copilot</option><option value="copilot_claude">Copilot (Claude)</option><option value="copilot_codex">Copilot (Codex)</option><option value="claude">Claude</option><option value="cursor">Cursor</option><option value="codex">Codex</option><option value="openai_codex">OpenAI Codex</option>',7)])],544),[[ns,s.value]]),n.value?(w(),S("span",ka,$(n.value),1)):Q("",!0),T[10]||(T[10]=l("span",{class:"text-xs text-muted"},"Changes which default reminders template is used",-1))]),l("div",Ta,[T[11]||(T[11]=l("label",{class:"text-sm font-medium text-textSecondary"},"Claude MCP Config Path",-1)),me(l("input",{"onUpdate:modelValue":T[1]||(T[1]=ne=>o.value=ne),type:"text",placeholder:"~/.claude/settings.json",class:"flex-1 min-w-[260px] px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted font-mono focus:outline-none focus:border-accent transition"},null,512),[[ke,o.value]]),l("button",{onClick:ye,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save"),r.value?(w(),S("span",$a,$(r.value),1)):Q("",!0)]),l("div",Aa,[T[12]||(T[12]=l("label",{class:"text-sm font-medium text-textSecondary"},"Bootstrap Messages",-1)),me(l("input",{"onUpdate:modelValue":T[2]||(T[2]=ne=>i.value=ne),type:"number",min:"0",max:"500",class:"w-24 px-3 py-2 rounded-xl bg-card border border-gray-700 text-text text-sm focus:border-accent focus:outline-none"},null,512),[[ke,i.value,void 0,{number:!0}]]),l("button",{onClick:we,class:"px-4 py-2 rounded-xl bg-accent text-white text-sm font-medium hover:bg-accent/80 transition-colors"},"Save"),a.value?(w(),S("span",Ea,$(a.value),1)):Q("",!0),T[13]||(T[13]=l("span",{class:"text-xs text-muted"},"Number of recent messages injected as warm context (0 = off)",-1))])]),l("div",Pa,[l("div",Ia,[T[14]||(T[14]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Reminders Template"),l("p",{class:"text-sm text-textSecondary mt-1"},"Edit the system prompt template sent with every reminder")],-1)),l("div",Ma,[u.value?(w(),S("span",Oa,$(u.value),1)):Q("",!0),l("button",{onClick:Tt,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Reset to Default"),l("button",{onClick:Ue,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),p.value?(w(),S("div",Ra,[...T[15]||(T[15]=[l("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"USING DEFAULT — edit and save to customize",-1)])])):Q("",!0),me(l("textarea",{"onUpdate:modelValue":T[3]||(T[3]=ne=>c.value=ne),rows:"20",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:"Loading..."},null,512),[[ke,c.value]]),l("div",Da,[l("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:T[4]||(T[4]=ne=>h.value=!h.value)},[(w(),S("svg",{class:G(["w-4 h-4 text-textSecondary transition-transform",h.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...T[16]||(T[16]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),T[17]||(T[17]=l("span",{class:"text-sm font-medium text-textSecondary"},"Preview with highlighted variables",-1))]),h.value?(w(),S("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:y.value},null,8,ja)):Q("",!0)]),T[18]||(T[18]=Be('<details class="mt-4"><summary class="text-sm font-medium text-textSecondary cursor-pointer hover:text-textPrimary transition">Available Variables</summary><div class="mt-2 glass rounded-xl p-4 grid grid-cols-1 sm:grid-cols-2 gap-2 text-sm"><div><code class="text-accentLight">{{OPERATOR_MESSAGE}}</code> <span class="text-textSecondary">— latest operator message</span></div><div><code class="text-accentLight">{{THREAD_ID}}</code> <span class="text-textSecondary">— Telegram thread ID</span></div><div><code class="text-accentLight">{{TIME}}</code> <span class="text-textSecondary">— formatted timestamp</span></div><div><code class="text-accentLight">{{UPTIME}}</code> <span class="text-textSecondary">— session uptime</span></div><div><code class="text-accentLight">{{VERSION}}</code> <span class="text-textSecondary">— package version</span></div><div><code class="text-accentLight">{{MODE}}</code> <span class="text-textSecondary">— "autonomous" or "standard"</span></div></div></details>',1))]),l("div",Na,[l("div",La,[T[19]||(T[19]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Agent-Specific Reminders"),l("p",{class:"text-sm text-textSecondary mt-1"},"Appended after the base reminders template — per agent type")],-1)),l("div",Fa,[H.value?(w(),S("span",Ha,$(H.value),1)):Q("",!0),l("button",{onClick:se,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Reset"),l("button",{onClick:ge,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),l("div",Va,[(w(),S(ie,null,be(["copilot","claude","cursor","codex"],ne=>l("button",{key:ne,onClick:Ae=>C.value=ne,class:G(["px-4 py-2 rounded-xl text-sm font-medium transition",C.value===ne?"bg-accent text-white":"bg-card hover:bg-cardHover border border-gray-700 text-textSecondary hover:text-textPrimary"])},$(ne.charAt(0).toUpperCase()+ne.slice(1)),11,Ua)),64))]),((E=x.value[C.value])==null?void 0:E.isDefault)!==!1?(w(),S("div",Ba,[...T[20]||(T[20]=[l("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"NO CUSTOM OVERRIDE — this agent uses only the base reminders",-1)])])):Q("",!0),l("textarea",{value:(($e=x.value[C.value])==null?void 0:$e.content)??"",onInput:T[5]||(T[5]=ne=>{const Ae=ne.target;x.value[C.value]={content:Ae.value,isDefault:!1}}),rows:"8",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:`Add ${C.value}-specific reminders (e.g. orchestrator hints, subagent policies)...`},null,40,Ka)]),l("div",Wa,[l("div",za,[T[21]||(T[21]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Drive Framing Template"),l("p",{class:"text-sm text-textSecondary mt-1"},"Customize the autonomous drive prompt sent when the operator is away")],-1)),l("div",Ja,[P.value?(w(),S("span",qa,$(P.value),1)):Q("",!0),l("button",{onClick:Me,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Reset to Default"),l("button",{onClick:X,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),l("div",Ga,[T[23]||(T[23]=l("label",{class:"text-sm text-textSecondary"},"Drive Activation Period:",-1)),l("div",Ya,[l("span",Za,$(F.value),1),T[22]||(T[22]=l("span",{class:"text-sm text-textSecondary"},"hours",-1))]),T[24]||(T[24]=l("span",{class:"text-xs text-muted"},"(informational — set via DMN_ACTIVATION_HOURS env var)",-1))]),z.value?(w(),S("div",Qa,[...T[25]||(T[25]=[l("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"(Default — edit to override)",-1)])])):Q("",!0),l("div",Xa,[T[26]||(T[26]=l("span",{class:"text-sm text-textSecondary self-center"},"Presets:",-1)),(w(!0),S(ie,null,be(Z.value,ne=>(w(),S("button",{key:ne.key,onClick:Ae=>L(ne),class:"px-3 py-1.5 rounded-lg bg-card hover:bg-cardHover border border-gray-700 text-xs text-textSecondary hover:text-textPrimary transition"},$(ne.label),9,ec))),128))]),me(l("textarea",{"onUpdate:modelValue":T[6]||(T[6]=ne=>j.value=ne),rows:"15",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:"Load a preset or type a custom drive template..."},null,512),[[ke,j.value]]),l("div",tc,[l("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:T[7]||(T[7]=ne=>V.value=!V.value)},[(w(),S("svg",{class:G(["w-4 h-4 text-textSecondary transition-transform",V.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...T[27]||(T[27]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),T[28]||(T[28]=l("span",{class:"text-sm font-medium text-textSecondary"},"Preview with sample values",-1))]),V.value?(w(),S("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:g.value},null,8,sc)):Q("",!0)]),T[29]||(T[29]=Be('<details class="mt-4"><summary class="text-sm font-medium text-textSecondary cursor-pointer hover:text-textPrimary transition">Available Variables</summary><div class="mt-2 glass rounded-xl p-4 grid grid-cols-1 sm:grid-cols-2 gap-2 text-sm"><div><code class="text-accentLight">{{IDLE_HOURS}}</code> <span class="text-textSecondary">— hours since last operator interaction</span></div><div><code class="text-accentLight">{{TIME}}</code> <span class="text-textSecondary">— ISO timestamp</span></div><div><code class="text-accentLight">{{PROBABILITY}}</code> <span class="text-textSecondary">— drive activation probability (0.2–1.0)</span></div></div></details>',1))])])}}}),oc={class:"animate-fade-in"},rc={class:"glass rounded-xl p-6 mb-6"},ic={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},lc={key:0,class:"glass rounded-xl p-4 mb-4 border border-accent/30"},ac={class:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3"},cc={class:"flex items-center gap-4 mb-3"},uc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer"},dc={class:"flex items-center gap-2"},fc={key:0,class:"text-sm text-warn"},pc={key:1,class:"text-center py-8 text-textSecondary text-sm"},hc={key:2,class:"text-center text-textSecondary py-12"},mc={key:3,class:"space-y-2"},gc=["onClick"],xc={class:"flex items-start justify-between gap-3"},vc={class:"flex-1 min-w-0"},yc={class:"flex items-center gap-2 mb-1"},bc={class:"font-medium text-sm"},_c={key:0,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},wc={class:"flex flex-wrap gap-1.5 mt-1"},Sc=["title"],Cc={key:0,class:"glass rounded-xl p-6"},kc={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Tc={class:"text-lg font-semibold"},$c={class:"text-sm text-textSecondary mt-1"},Ac={class:"flex items-center gap-2"},Ec={key:0,class:"text-sm text-success"},Pc={key:1,class:"text-sm text-warn"},Ic={class:"grid grid-cols-1 sm:grid-cols-3 gap-3 mb-4"},Mc=["value"],Oc={class:"flex items-end"},Rc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer pb-2"},Dc=kt({__name:"SkillsTab",setup(e){const t=D([]),s=D(!0),n=D(null),o=D(""),r=D(""),i=D(!1),a=D(""),c=D(""),p=D(!1),u=D(""),h=D(""),x=D(!1),C=D("");async function H(){s.value=!0;try{const J=await _e("/api/skills");t.value=J.skills||[]}finally{s.value=!1}}function j(J){return J?J.includes(".remote-copilot-mcp")&&J.includes("skills")?"user":J.endsWith(".default.md")?"default":J.endsWith(".skill.md")?"project":"unknown":"unknown"}function z(J){const N={user:"background:rgba(99,102,241,0.15);color:#818cf8",default:"background:rgba(107,114,128,0.15);color:#9ca3af",project:"background:rgba(34,197,94,0.15);color:#4ade80",unknown:"background:rgba(107,114,128,0.15);color:#9ca3af"};return N[J]||N.unknown}function P(J){n.value=J,o.value=J.content,r.value=(J.triggers||[]).join(", "),i.value=!!J.replacesOrchestrator,p.value=!1}function V(){n.value=null,c.value=""}function Z(J,N,K,fe){let te=`---
|
|
65
65
|
name: ${J}
|
|
66
66
|
triggers:
|
|
67
|
-
`;return
|
|
68
|
-
`}),
|
|
69
|
-
`),
|
|
67
|
+
`;return N.forEach(we=>{te+=` - ${we.trim()}
|
|
68
|
+
`}),K&&(te+=`replaces_orchestrator: true
|
|
69
|
+
`),te+=`---
|
|
70
70
|
|
|
71
|
-
`,
|
|
72
|
-
`);try{const ee=await fetch(`/api/skills/${encodeURIComponent(J)}`,{method:"PUT",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({content:re})});if(!ee.ok)throw new Error(ee.statusText);$.value="Created ✓",h.value=!1,await H();const ge=t.value.find(he=>he.name===J);ge&&R(ge)}catch(ee){$.value="Error: "+ee.message}}return yt(H),(J,j)=>(w(),C("div",oc,[l("div",rc,[l("div",ic,[j[8]||(j[8]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Skill Library"),l("p",{class:"text-sm text-textSecondary mt-1"},"Manage intent-routing skills — user overrides, defaults, and project skills")],-1)),l("button",{onClick:j[0]||(j[0]=B=>{h.value=!h.value,n.value=null}),class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"}," + New Skill ")]),h.value?(w(),C("div",lc,[j[12]||(j[12]=l("h4",{class:"text-sm font-semibold mb-3"},"Create New Skill",-1)),l("div",ac,[l("div",null,[j[9]||(j[9]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),pe(l("input",{"onUpdate:modelValue":j[1]||(j[1]=B=>u.value=B),type:"text",placeholder:"my-skill",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[$e,u.value]])]),l("div",null,[j[10]||(j[10]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),pe(l("input",{"onUpdate:modelValue":j[2]||(j[2]=B=>p.value=B),type:"text",placeholder:"trigger1, trigger2",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},null,512),[[$e,p.value]])])]),l("div",cc,[l("label",uc,[pe(l("input",{"onUpdate:modelValue":j[3]||(j[3]=B=>x.value=B),type:"checkbox",class:"rounded"},null,512),[[ro,x.value]]),j[11]||(j[11]=l("span",null,"Replaces orchestrator",-1))])]),l("div",dc,[l("button",{onClick:_e,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Create"),l("button",{onClick:j[4]||(j[4]=B=>h.value=!1),class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Cancel"),$.value?(w(),C("span",fc,T($.value),1)):Q("",!0)])])):Q("",!0),s.value?(w(),C("div",pc,"Loading...")):t.value.length===0?(w(),C("div",hc,"No skills loaded")):(w(),C("div",mc,[(w(!0),C(ne,null,ve(t.value,B=>{var re;return w(),C("div",{key:B.name,onClick:ee=>R(B),class:q(["glass rounded-xl p-4 cursor-pointer hover:bg-cardHover transition border",((re=n.value)==null?void 0:re.name)===B.name?"border-accent":"border-transparent"])},[l("div",xc,[l("div",vc,[l("div",yc,[l("span",bc,T(B.name),1),l("span",{class:"type-badge",style:Es(G(M(B.source)))},T(M(B.source)),5),B.replacesOrchestrator?(w(),C("span",_c,"REPLACES ORCH")):Q("",!0)]),l("div",wc,[(w(!0),C(ne,null,ve(B.triggers||[],ee=>(w(),C("span",{key:ee,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},T(ee),1))),128))])]),l("div",{class:"text-xs text-muted font-mono shrink-0 max-w-[200px] truncate",title:B.source||""},T((B.source||"").split(/[\\/]/).pop()||""),9,Sc)])],10,gc)}),128))]))]),n.value?(w(),C("div",Cc,[l("div",Tc,[l("div",null,[l("h3",kc,"Edit: "+T(n.value.name),1),l("p",$c,T(n.value.source||"(unknown source)"),1)]),l("div",Ac,[a.value?(w(),C("span",Ec,T(a.value),1)):Q("",!0),c.value?(w(),C("span",Pc,T(c.value),1)):Q("",!0),M(n.value.source)==="user"?(w(),C("button",{key:2,onClick:oe,class:"px-4 py-2 rounded-xl bg-card hover:bg-red-900/40 border border-gray-700 hover:border-red-700 text-sm text-textSecondary hover:text-red-400 transition",title:"Remove user override (reverts to default)"},"Remove override")):Q("",!0),l("button",{onClick:V,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Close"),l("button",{onClick:N,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),l("div",Ic,[l("div",null,[j[13]||(j[13]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),l("input",{value:n.value.name,type:"text",readonly:"",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono opacity-60 cursor-not-allowed"},null,8,Mc)]),l("div",null,[j[14]||(j[14]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),pe(l("input",{"onUpdate:modelValue":j[5]||(j[5]=B=>r.value=B),type:"text",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},null,512),[[$e,r.value]])]),l("div",Oc,[l("label",Rc,[pe(l("input",{"onUpdate:modelValue":j[6]||(j[6]=B=>i.value=B),type:"checkbox",class:"rounded"},null,512),[[ro,i.value]]),j[15]||(j[15]=l("span",null,"Replaces orchestrator",-1))])])]),pe(l("textarea",{"onUpdate:modelValue":j[7]||(j[7]=B=>o.value=B),rows:"20",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:"Skill body (markdown)..."},null,512),[[$e,o.value]])])):Q("",!0)]))}}),jc={class:"animate-fade-in space-y-6"},Nc={class:"glass rounded-xl p-6"},Lc={class:"flex flex-wrap items-center justify-between gap-4 mb-2"},Fc={class:"flex items-center gap-3"},Hc={key:0,class:"mt-4 p-4 rounded-xl bg-surface border border-gray-700/50 space-y-3"},Vc={class:"grid grid-cols-1 sm:grid-cols-3 gap-3"},Uc=["value"],Bc={class:"flex justify-end"},Kc=["disabled"],Wc={key:0,class:"text-center py-12 text-textSecondary"},zc={key:1,class:"text-center py-8 text-danger text-sm"},Jc={key:2,class:"text-center py-12 text-textSecondary"},qc={key:3},Gc={class:"space-y-3"},Yc={class:"p-4"},Zc={class:"flex flex-wrap items-center gap-3"},Qc={class:"font-semibold"},Xc={class:"text-xs text-muted font-mono"},eu=["value","onChange"],tu=["value"],su={class:"text-xs text-muted"},nu={class:"ml-auto flex items-center gap-3"},ou={class:"flex items-center gap-1.5"},ru=["onClick"],iu={class:"flex items-center gap-1.5"},lu=["onClick"],au={class:"flex items-center gap-1.5"},cu=["onClick"],uu=["onClick"],du=["onClick"],fu=["onClick"],pu={key:0,class:"mt-3 p-3 rounded-lg bg-surface border border-purple-500/20 space-y-2"},hu={class:"grid grid-cols-1 sm:grid-cols-3 gap-2"},mu=["value"],gu={class:"flex items-center gap-2"},xu=["onClick","disabled"],vu={key:0,class:"border-t border-gray-700/30 bg-surface/30 px-4 py-3 space-y-2"},yu={key:0,class:"text-xs text-muted py-1"},bu={class:"text-sm font-medium"},_u={class:"text-xs text-muted font-mono"},wu=["value","onChange"],Su=["value"],Cu={class:"text-xs text-muted"},Tu={class:"ml-auto flex items-center gap-3"},ku={key:0,class:"flex items-center gap-1.5"},$u=["onClick"],Au={key:1,class:"flex items-center gap-1.5"},Eu=["onClick"],Pu=["onClick"],Iu={key:4},Mu={class:"space-y-2"},Ou={class:"font-medium"},Ru={class:"text-xs text-muted font-mono"},Du={class:"text-xs text-textSecondary"},ju={class:"text-xs text-muted"},Nu=["onClick"],Lu={key:5},Fu={class:"space-y-2"},Hu={class:"font-medium"},Vu={class:"text-xs text-muted font-mono"},Uu=["value","onChange"],Bu=["value"],Ku={class:"text-xs text-muted"},Wu={class:"ml-auto flex items-center gap-3"},zu={class:"flex items-center gap-1.5"},Ju=["onClick"],qu={class:"flex items-center gap-1.5"},Gu=["onClick"],Yu=["onClick"],Zu={key:6},Qu={class:"space-y-2"},Xu={class:"font-medium"},ed={class:"text-xs text-muted font-mono"},td=["value","onChange"],sd=["value"],nd={class:"text-xs text-muted"},od=["onClick"],rd=kt({__name:"ThreadsTab",setup(e){const t=L([]),s=L(!0),n=L(""),o=L({}),r=L(new Set),i=L(!1),a=L({name:"",threadId:0,client:"claude"}),c=L(""),h=L(!1),u=L(null),p=L({name:"",threadId:0,client:"claude"}),x=L(""),$=L(!1),H=["claude","copilot","codex","openai_codex","copilot_claude","copilot_codex","cursor"],M={root:{emoji:"🟢",classes:"bg-green-500/20 text-green-400 border-green-500/30"},daily:{emoji:"🔵",classes:"bg-blue-500/20 text-blue-400 border-blue-500/30"},branch:{emoji:"🟣",classes:"bg-purple-500/20 text-purple-400 border-purple-500/30"},worker:{emoji:"🟡",classes:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30"}},G=Ue(()=>t.value.filter(O=>O.type==="root")),R=Ue(()=>t.value.filter(O=>O.type==="daily")),V=Ue(()=>t.value.filter(O=>O.type==="branch")),Z=Ue(()=>t.value.filter(O=>O.type==="worker"));async function N(){s.value=!0,n.value="";try{const O=await ye("/api/threads");t.value=O.threads??[]}catch(O){n.value=O.message||"Failed to load threads"}finally{s.value=!1}}async function oe(O){try{const v=await ye(`/api/threads/${O}/children`);o.value[O]=v.threads??[]}catch{o.value[O]=[]}}function _e(O){r.value.has(O)?r.value.delete(O):(r.value.add(O),oe(O))}async function J(){if(!(!a.value.name.trim()||!a.value.threadId)){h.value=!0,c.value="";try{const O=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:a.value.threadId,name:a.value.name.trim(),type:"root",client:a.value.client,keepAlive:!1})});if(!O.ok){const v=await O.json().catch(()=>({error:O.statusText}));throw new Error(v.error??O.statusText)}c.value="Created ✓",a.value={name:"",threadId:0,client:"claude"},i.value=!1,setTimeout(()=>{c.value=""},3e3),await N()}catch(O){c.value="Error: "+O.message}finally{h.value=!1}}}async function j(O){if(!(!p.value.name.trim()||!p.value.threadId)){$.value=!0,x.value="";try{const v=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:p.value.threadId,name:p.value.name.trim(),type:"branch",rootThreadId:O,client:p.value.client})});if(!v.ok){const g=await v.json().catch(()=>({error:v.statusText}));throw new Error(g.error??v.statusText)}x.value="Branch created ✓",p.value={name:"",threadId:0,client:"claude"},u.value=null,setTimeout(()=>{x.value=""},3e3),await N(),oe(O)}catch(v){x.value="Error: "+v.message}finally{$.value=!1}}}async function B(O){try{const v=await fetch(`/api/threads/${O.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({keepAlive:!O.keepAlive})});if(!v.ok)throw new Error(v.statusText);await N()}catch(v){n.value="Failed to toggle keep-alive: "+v.message}}async function re(O,v){try{const g=await fetch(`/api/threads/${O.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({client:v})});if(!g.ok)throw new Error(g.statusText);await N()}catch(g){n.value="Failed to change agent type: "+g.message}}async function ee(O){try{const v=await fetch(`/api/threads/${O.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({dailyRotation:!O.dailyRotation})});if(!v.ok)throw new Error(v.statusText);await N()}catch(v){n.value="Failed to toggle daily rotation: "+v.message}}async function ge(O){try{const v=await fetch(`/api/threads/${O.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({autonomousMode:!O.autonomousMode})});if(!v.ok)throw new Error(v.statusText);await N()}catch(v){n.value="Failed to toggle autonomous mode: "+v.message}}async function he(O){if(confirm(`Archive thread "${O.name}" (${O.threadId})?`))try{const v=await fetch(`/api/threads/${O.threadId}`,{method:"DELETE",headers:{Authorization:`Bearer ${Se()}`}});if(!v.ok)throw new Error(v.statusText);await N()}catch(v){n.value="Failed to archive: "+v.message}}function Fe(O){if(!O)return"—";const v=new Date(O),ae=Date.now()-v.getTime();return ae<6e4?"just now":ae<36e5?`${Math.floor(ae/6e4)}m ago`:ae<864e5?`${Math.floor(ae/36e5)}h ago`:v.toLocaleDateString()}function We(O){return O==="active"?"text-success":O==="archived"?"text-muted":"text-warn"}return yt(N),(O,v)=>(w(),C("div",jc,[l("div",Nc,[l("div",Lc,[v[7]||(v[7]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Thread Registry"),l("p",{class:"text-sm text-textSecondary mt-1"},"Manage conversation threads, branches, and daily sessions")],-1)),l("div",Fc,[c.value?(w(),C("span",{key:0,class:q([c.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},T(c.value),3)):Q("",!0),l("button",{onClick:v[0]||(v[0]=g=>i.value=!i.value),class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},T(i.value?"Cancel":"+ New Root Thread"),1),l("button",{onClick:N,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm hover:bg-surface transition"}," ↻ Refresh ")])]),i.value?(w(),C("div",Hc,[l("div",Vc,[l("div",null,[v[8]||(v[8]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Name",-1)),pe(l("input",{"onUpdate:modelValue":v[1]||(v[1]=g=>a.value.name=g),type:"text",placeholder:"e.g. Main Workspace",class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[$e,a.value.name]])]),l("div",null,[v[9]||(v[9]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Thread ID",-1)),pe(l("input",{"onUpdate:modelValue":v[2]||(v[2]=g=>a.value.threadId=g),type:"number",min:"1",placeholder:"Telegram thread ID",class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[$e,a.value.threadId,void 0,{number:!0}]])]),l("div",null,[v[10]||(v[10]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Client",-1)),pe(l("select",{"onUpdate:modelValue":v[3]||(v[3]=g=>a.value.client=g),class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition appearance-none"},[(w(),C(ne,null,ve(H,g=>l("option",{key:g,value:g},T(g),9,Uc)),64))],512),[[ns,a.value.client]])])]),l("div",Bc,[l("button",{onClick:J,disabled:h.value||!a.value.name.trim()||!a.value.threadId,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},T(h.value?"Creating…":"Create Root Thread"),9,Kc)])])):Q("",!0)]),s.value&&t.value.length===0?(w(),C("div",Wc,"Loading threads…")):n.value?(w(),C("div",zc,T(n.value),1)):t.value.length===0?(w(),C("div",Jc,"No threads registered")):Q("",!0),G.value.length>0?(w(),C("div",qc,[v[16]||(v[16]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟢 Root Threads",-1)),l("div",Gc,[(w(!0),C(ne,null,ve(G.value,g=>{var ae,be;return w(),C("div",{key:g.id,class:"glass rounded-xl overflow-hidden"},[l("div",Yc,[l("div",Zc,[l("span",{class:q(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(ae=M[g.type])==null?void 0:ae.classes])},T((be=M[g.type])==null?void 0:be.emoji)+" "+T(g.type.toUpperCase()),3),l("span",Qc,T(g.name),1),l("span",{class:q(["text-xs font-medium",We(g.status)])},T(g.status),3),l("span",Xc,"ID: "+T(g.threadId),1),l("select",{value:g.client,onChange:I=>re(g,I.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[(w(),C(ne,null,ve(H,I=>l("option",{key:I,value:I},T(I),9,tu)),64))],40,eu),l("span",su,T(Fe(g.lastActiveAt)),1),l("div",nu,[l("div",ou,[l("button",{onClick:I=>B(g),class:q(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[l("span",{class:q(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,ru),v[11]||(v[11]=l("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),l("div",iu,[l("button",{onClick:I=>ee(g),class:q(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.dailyRotation?"bg-blue-500":"bg-gray-700"]),title:"Toggle daily rotation"},[l("span",{class:q(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.dailyRotation?"translate-x-4":"translate-x-0.5"])},null,2)],10,lu),v[12]||(v[12]=l("span",{class:"text-xs text-muted"},"Daily",-1))]),l("div",au,[l("button",{onClick:I=>ge(g),class:q(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[l("span",{class:q(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,cu),v[13]||(v[13]=l("span",{class:"text-xs text-muted"},"Auto",-1))]),l("button",{onClick:I=>_e(g.threadId),class:"px-2 py-1 rounded-lg text-xs bg-card border border-gray-700 hover:bg-surface transition"},T(r.value.has(g.threadId)?"▾ Children":"▸ Children"),9,uu),l("button",{onClick:I=>{u.value=u.value===g.threadId?null:g.threadId,p.value={name:"",threadId:0,client:"claude"},x.value=""},class:"px-2 py-1 rounded-lg text-xs bg-purple-500/20 text-purple-400 border border-purple-500/30 hover:bg-purple-500/30 transition"}," + Branch ",8,du),l("button",{onClick:I=>he(g),class:"px-2 py-1 rounded-lg text-xs bg-red-500/20 text-red-400 border border-red-500/30 hover:bg-red-500/30 transition"}," Archive ",8,fu)])]),u.value===g.threadId?(w(),C("div",pu,[l("div",hu,[pe(l("input",{"onUpdate:modelValue":v[4]||(v[4]=I=>p.value.name=I),type:"text",placeholder:"Branch name",class:"px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[$e,p.value.name]]),pe(l("input",{"onUpdate:modelValue":v[5]||(v[5]=I=>p.value.threadId=I),type:"number",min:"1",placeholder:"Thread ID",class:"px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[$e,p.value.threadId,void 0,{number:!0}]]),pe(l("select",{"onUpdate:modelValue":v[6]||(v[6]=I=>p.value.client=I),class:"px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition appearance-none"},[(w(),C(ne,null,ve(H,I=>l("option",{key:I,value:I},T(I),9,mu)),64))],512),[[ns,p.value.client]])]),l("div",gu,[l("button",{onClick:I=>j(g.threadId),disabled:$.value||!p.value.name.trim()||!p.value.threadId,class:"px-3 py-1.5 rounded-lg bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-xs font-medium transition"},T($.value?"Creating…":"Create Branch"),9,xu),x.value?(w(),C("span",{key:0,class:q([x.value.startsWith("Error")?"text-danger":"text-success","text-xs"])},T(x.value),3)):Q("",!0)])])):Q("",!0)]),r.value.has(g.threadId)&&o.value[g.threadId]?(w(),C("div",vu,[o.value[g.threadId].length===0?(w(),C("div",yu,"No children")):Q("",!0),(w(!0),C(ne,null,ve(o.value[g.threadId],I=>{var Ee,F;return w(),C("div",{key:I.id,class:"flex flex-wrap items-center gap-2 px-3 py-2 rounded-lg bg-card/50 border border-gray-700/30"},[l("span",{class:q(["inline-flex items-center gap-1 px-1.5 py-0.5 rounded-full text-xs font-medium border",(Ee=M[I.type])==null?void 0:Ee.classes])},T((F=M[I.type])==null?void 0:F.emoji)+" "+T(I.type.toUpperCase()),3),l("span",bu,T(I.name),1),l("span",{class:q(["text-xs",We(I.status)])},T(I.status),3),l("span",_u,"ID: "+T(I.threadId),1),l("select",{value:I.client,onChange:k=>re(I,k.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[(w(),C(ne,null,ve(H,k=>l("option",{key:k,value:k},T(k),9,Su)),64))],40,wu),l("span",Cu,T(Fe(I.lastActiveAt)),1),l("div",Tu,[I.type==="branch"?(w(),C("div",ku,[l("button",{onClick:k=>B(I),class:q(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",I.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[l("span",{class:q(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",I.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,$u),v[14]||(v[14]=l("span",{class:"text-xs text-muted"},"Keep-alive",-1))])):Q("",!0),I.type==="branch"?(w(),C("div",Au,[l("button",{onClick:k=>ge(I),class:q(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",I.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[l("span",{class:q(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",I.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,Eu),v[15]||(v[15]=l("span",{class:"text-xs text-muted"},"Auto",-1))])):Q("",!0),I.type!=="root"?(w(),C("button",{key:2,onClick:k=>he(I),class:"px-2 py-0.5 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,Pu)):Q("",!0)])])}),128))])):Q("",!0)])}),128))])])):Q("",!0),R.value.length>0?(w(),C("div",Iu,[v[17]||(v[17]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🔵 Daily Sessions",-1)),l("div",Mu,[(w(!0),C(ne,null,ve(R.value,g=>{var ae,be;return w(),C("div",{key:g.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[l("span",{class:q(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(ae=M[g.type])==null?void 0:ae.classes])},T((be=M[g.type])==null?void 0:be.emoji)+" "+T(g.type.toUpperCase()),3),l("span",Ou,T(g.name),1),l("span",{class:q(["text-xs font-medium",We(g.status)])},T(g.status),3),l("span",Ru,"ID: "+T(g.threadId),1),l("span",Du,T(g.client),1),l("span",ju,T(Fe(g.lastActiveAt)),1),l("button",{onClick:I=>he(g),class:"ml-auto px-2 py-1 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,Nu)])}),128))])])):Q("",!0),V.value.length>0?(w(),C("div",Lu,[v[20]||(v[20]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟣 Branches",-1)),l("div",Fu,[(w(!0),C(ne,null,ve(V.value,g=>{var ae,be;return w(),C("div",{key:g.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[l("span",{class:q(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(ae=M[g.type])==null?void 0:ae.classes])},T((be=M[g.type])==null?void 0:be.emoji)+" "+T(g.type.toUpperCase()),3),l("span",Hu,T(g.name),1),l("span",{class:q(["text-xs font-medium",We(g.status)])},T(g.status),3),l("span",Vu,"ID: "+T(g.threadId),1),l("select",{value:g.client,onChange:I=>re(g,I.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[(w(),C(ne,null,ve(H,I=>l("option",{key:I,value:I},T(I),9,Bu)),64))],40,Uu),l("span",Ku,T(Fe(g.lastActiveAt)),1),l("div",Wu,[l("div",zu,[l("button",{onClick:I=>B(g),class:q(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[l("span",{class:q(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,Ju),v[18]||(v[18]=l("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),l("div",qu,[l("button",{onClick:I=>ge(g),class:q(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[l("span",{class:q(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,Gu),v[19]||(v[19]=l("span",{class:"text-xs text-muted"},"Auto",-1))]),l("button",{onClick:I=>he(g),class:"px-2 py-1 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,Yu)])])}),128))])])):Q("",!0),Z.value.length>0?(w(),C("div",Zu,[v[21]||(v[21]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟡 Workers",-1)),l("div",Qu,[(w(!0),C(ne,null,ve(Z.value,g=>{var ae,be;return w(),C("div",{key:g.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[l("span",{class:q(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(ae=M[g.type])==null?void 0:ae.classes])},T((be=M[g.type])==null?void 0:be.emoji)+" "+T(g.type.toUpperCase()),3),l("span",Xu,T(g.name),1),l("span",{class:q(["text-xs font-medium",We(g.status)])},T(g.status),3),l("span",ed,"ID: "+T(g.threadId),1),l("select",{value:g.client,onChange:I=>re(g,I.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[(w(),C(ne,null,ve(H,I=>l("option",{key:I,value:I},T(I),9,sd)),64))],40,td),l("span",nd,T(Fe(g.lastActiveAt)),1),l("button",{onClick:I=>he(g),class:"ml-auto px-2 py-1 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,od)])}),128))])])):Q("",!0)]))}}),id={class:"animate-fade-in"},ld={class:"glass rounded-xl p-6 mb-6"},ad={class:"flex flex-wrap items-center justify-between gap-4 mb-6"},cd={class:"flex items-center gap-3"},ud=["disabled"],dd={key:0,class:"text-center py-8 text-textSecondary text-sm"},fd={key:1,class:"space-y-6"},pd={class:"glass rounded-xl p-4 border border-gray-700/50"},hd={class:"flex items-center gap-4"},md={class:"flex justify-between text-xs text-muted mt-2"},gd={class:"font-mono"},xd={key:0,class:"mt-3 px-3 py-2 rounded-lg bg-warn/10 border border-warn/20 text-xs text-warn"},vd={class:"glass rounded-xl p-4 border border-gray-700/30 bg-surface/30"},yd={class:"grid grid-cols-2 gap-4"},bd=kt({__name:"SettingsTab",setup(e){const t=L(!0),s=L(!1),n=L(""),o=L(50),r=L(50),i=Ue(()=>o.value!==r.value);async function a(){t.value=!0;try{const h=await ye("/api/settings/bootstrap-message-count");o.value=h.count,r.value=h.count}finally{t.value=!1}}async function c(){s.value=!0,n.value="";try{const h=await fetch("/api/settings/bootstrap-message-count",{method:"POST",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({count:o.value})});if(!h.ok){const p=await h.json().catch(()=>({error:h.statusText}));throw new Error(p.error??h.statusText)}const u=await h.json();r.value=u.count,o.value=u.count,n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3)}catch(h){n.value="Error: "+h.message}finally{s.value=!1}}return yt(a),(h,u)=>(w(),C("div",id,[l("div",ld,[l("div",ad,[u[2]||(u[2]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Settings"),l("p",{class:"text-sm text-textSecondary mt-1"},"Configure agent behavior and context injection")],-1)),l("div",cd,[n.value?(w(),C("span",{key:0,class:q([n.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},T(n.value),3)):Q("",!0),l("button",{onClick:c,disabled:s.value||t.value||!i.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},T(s.value?"Saving…":"Save"),9,ud)])]),t.value?(w(),C("div",dd,"Loading…")):(w(),C("div",fd,[l("div",pd,[u[6]||(u[6]=l("label",{class:"block text-sm font-medium mb-1"},"Recent Conversation Buffer",-1)),u[7]||(u[7]=l("p",{class:"text-xs text-textSecondary mb-3"},[Et(" Number of recent messages injected into the agent's bootstrap context. Set to "),l("span",{class:"font-mono text-accentLight"},"0"),Et(" to disable (useful when using VS Code, which maintains its own conversation history). ")],-1)),l("div",hd,[pe(l("input",{"onUpdate:modelValue":u[0]||(u[0]=p=>o.value=p),type:"range",min:"0",max:"100",step:"5",class:"flex-1 accent-accent"},null,512),[[$e,o.value,void 0,{number:!0}]]),pe(l("input",{"onUpdate:modelValue":u[1]||(u[1]=p=>o.value=p),type:"number",min:"0",max:"200",class:"w-20 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono text-center focus:outline-none focus:border-accent transition"},null,512),[[$e,o.value,void 0,{number:!0}]])]),l("div",md,[u[3]||(u[3]=l("span",null,"Off",-1)),l("span",gd,T(o.value)+" messages",1),u[4]||(u[4]=l("span",null,"Max",-1))]),o.value===0?(w(),C("div",xd,[...u[5]||(u[5]=[Et(" Message buffer injection is ",-1),l("strong",null,"disabled",-1),Et(". The agent will not see recent conversation history in its bootstrap context. Use this when VS Code (or another IDE) already provides conversation history. ",-1)])])):Q("",!0)]),l("div",vd,[u[10]||(u[10]=l("div",{class:"text-xs font-medium text-textSecondary uppercase tracking-wider mb-3"},"Current State",-1)),l("div",yd,[l("div",null,[u[8]||(u[8]=l("div",{class:"text-xs text-muted mb-1"},"Message Buffer",-1)),l("span",{class:q(["text-sm font-medium",r.value>0?"text-success":"text-textSecondary"])},T(r.value>0?`${r.value} messages`:"Disabled"),3)]),l("div",null,[u[9]||(u[9]=l("div",{class:"text-xs text-muted mb-1"},"Status",-1)),l("span",{class:q(["text-sm font-medium",i.value?"text-warn":"text-textSecondary"])},T(i.value?"Unsaved changes":"Saved"),3)])])])]))])]))}}),_d={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-surface/95 backdrop-blur-sm"},wd={class:"glass rounded-2xl p-8 max-w-md w-full mx-4 animate-slide-up"},Sd=["disabled"],Cd={key:0,class:"mt-3 text-sm text-danger"},Td={key:1,class:"min-h-screen font-sans text-textPrimary animate-fade-in"},kd={class:"glass sticky top-0 z-40 border-b border-gray-800/50"},$d={class:"max-w-7xl mx-auto px-4 sm:px-6 py-4 flex items-center justify-between"},Ad={class:"flex items-center gap-4"},Ed={class:"text-sm text-textSecondary font-mono"},Pd={class:"max-w-7xl mx-auto px-4 sm:px-6 py-6"},Id={class:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3"},Md={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Od={class:"text-2xl font-bold font-mono"},Rd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Dd={class:"text-2xl font-bold font-mono"},jd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Nd={class:"text-2xl font-bold font-mono"},Ld={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Fd={class:"flex items-center gap-2 mb-2"},Hd={class:"text-2xl font-bold font-mono"},Vd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Ud={class:"text-2xl font-bold font-mono"},Bd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Kd={class:"text-2xl font-bold font-mono"},Wd={class:"max-w-7xl mx-auto px-4 sm:px-6"},zd={class:"flex gap-6 border-b border-gray-800/50 mb-6"},Jd=["onClick"],qd={class:"max-w-7xl mx-auto px-4 sm:px-6 pb-12"},ds="sensorium_token",Gd=kt({__name:"App",setup(e){const t=L(!1),s=L(""),n=L(""),o=L(!1),r=L(null),i=L("sessions");let a=null;const c=[{id:"sessions",label:"Sessions"},{id:"notes",label:"Memory Notes"},{id:"templates",label:"Templates"},{id:"skills",label:"Skills"},{id:"threads",label:"Threads"},{id:"settings",label:"Settings"}],h={sessions:na,notes:_a,templates:nc,skills:Dc,threads:rd,settings:bd},u=Ue(()=>h[i.value]),p=Ue(()=>{if(!r.value)return"—";const G=Math.floor(r.value.uptime),R=Math.floor(G/86400),V=Math.floor(G%86400/3600),Z=Math.floor(G%3600/60);return R>0?`${R}d ${V}h`:V>0?`${V}h ${Z}m`:`${Z}m`});async function x(){const G=s.value.trim()||"no-auth";o.value=!0,n.value="";try{Bt(G),await H(),localStorage.setItem(ds,G),t.value=!0,M()}catch(R){const V=R;V.status===401?n.value="Invalid token":n.value=V.message??"Connection failed",Bt("")}finally{o.value=!1}}function $(){localStorage.removeItem(ds),t.value=!1,s.value="",r.value=null,a&&clearInterval(a),Bt("")}async function H(){r.value=await ye("/api/status")}function M(){a&&clearInterval(a),a=setInterval(H,3e4)}return yt(async()=>{const G=localStorage.getItem(ds);if(G){s.value=G;try{Bt(G),await H(),t.value=!0,M()}catch{localStorage.removeItem(ds),Bt("")}}}),vn(()=>{a&&clearInterval(a)}),(G,R)=>{var V,Z,N,oe,_e,J,j,B,re,ee,ge;return t.value?(w(),C("div",Td,[l("header",kd,[l("div",$d,[R[3]||(R[3]=Ve('<div class="flex items-center gap-3"><div class="w-8 h-8 rounded-lg bg-gradient-to-br from-accent to-purple-500 flex items-center justify-center"><span class="text-white text-sm font-bold">S</span></div><div><h1 class="text-lg font-semibold tracking-tight">Sensorium MCP</h1><p class="text-xs text-textSecondary">Agent Dashboard</p></div></div>',1)),l("div",Ad,[R[2]||(R[2]=l("div",{class:"flex items-center gap-2 text-sm"},[l("span",{class:"w-2 h-2 rounded-full bg-success animate-pulse-slow"}),l("span",{class:"text-textSecondary"},"Connected")],-1)),l("div",Ed,T(p.value),1),l("button",{onClick:$,class:"text-sm text-muted hover:text-textSecondary transition"},"Disconnect")])])]),l("div",Pd,[l("div",Id,[l("div",Md,[R[4]||(R[4]=Ve('<div class="flex items-center gap-2 mb-2"><span class="text-success"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Sessions</span></div>',1)),l("div",Od,T(((V=r.value)==null?void 0:V.activeSessions)??0),1)]),l("div",Rd,[R[5]||(R[5]=Ve('<div class="flex items-center gap-2 mb-2"><span class="text-accentLight"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Notes</span></div>',1)),l("div",Dd,T(((N=(Z=r.value)==null?void 0:Z.memory)==null?void 0:N.totalSemanticNotes)??0),1)]),l("div",jd,[R[6]||(R[6]=Ve('<div class="flex items-center gap-2 mb-2"><span class="text-warn"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Episodes</span></div>',1)),l("div",Nd,T(((_e=(oe=r.value)==null?void 0:oe.memory)==null?void 0:_e.totalEpisodes)??0),1)]),l("div",Ld,[l("div",Fd,[l("span",{class:q((((j=(J=r.value)==null?void 0:J.memory)==null?void 0:j.unconsolidatedEpisodes)??0)>10?"text-danger":"text-success")},[...R[7]||(R[7]=[l("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)])],2),R[8]||(R[8]=l("span",{class:"text-xs text-textSecondary font-medium uppercase tracking-wider"},"Unconsolidated",-1))]),l("div",Hd,T(((re=(B=r.value)==null?void 0:B.memory)==null?void 0:re.unconsolidatedEpisodes)??0),1)]),l("div",Vd,[R[9]||(R[9]=Ve('<div class="flex items-center gap-2 mb-2"><span class="text-accent"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Procedures</span></div>',1)),l("div",Ud,T(((ge=(ee=r.value)==null?void 0:ee.memory)==null?void 0:ge.totalProcedures)??0),1)]),l("div",Bd,[R[10]||(R[10]=Ve('<div class="flex items-center gap-2 mb-2"><span class="text-success"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14M12 5l7 7-7 7"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Uptime</span></div>',1)),l("div",Kd,T(p.value),1)])])]),l("div",Wd,[l("nav",zd,[(w(),C(ne,null,ve(c,he=>l("button",{key:he.id,onClick:Fe=>i.value=he.id,class:q(["pb-3 text-sm font-medium transition",i.value===he.id?"tab-active":"tab-inactive"])},T(he.label),11,Jd)),64))])]),l("div",qd,[(w(),cr(ki(u.value),{status:r.value},null,8,["status"]))])])):(w(),C("div",_d,[l("div",wd,[R[1]||(R[1]=Ve('<div class="flex items-center gap-3 mb-6"><div class="w-10 h-10 rounded-xl bg-accent/20 flex items-center justify-center"><svg class="w-5 h-5 text-accent" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path></svg></div><div><h2 class="text-lg font-semibold">Sensorium MCP</h2><p class="text-sm text-textSecondary">Enter your API token</p></div></div>',1)),pe(l("input",{"onUpdate:modelValue":R[0]||(R[0]=he=>s.value=he),type:"password",placeholder:"MCP_HTTP_SECRET",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary placeholder-muted focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition font-mono text-sm",onKeydown:Nl(x,["enter"])},null,544),[[$e,s.value]]),l("button",{onClick:x,disabled:o.value,class:"w-full mt-4 px-4 py-3 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white font-medium transition"},T(o.value?"Connecting...":"Connect"),9,Sd),n.value?(w(),C("p",Cd,T(n.value),1)):Q("",!0)])]))}}});Hl(Gd).mount("#app");</script>
|
|
71
|
+
`,te+fe}async function F(){if(!n.value)return;const J=n.value.name;try{const N=r.value.split(",").map(we=>we.trim()).filter(Boolean),K=o.value;let fe;K.trimStart().startsWith("---")?fe=K:fe=Z(J,N,i.value,K);const te=await fetch(`/api/skills/${encodeURIComponent(J)}`,{method:"PUT",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({content:fe})});if(!te.ok)throw new Error(te.statusText);a.value="Saved ✓",setTimeout(()=>{a.value=""},3e3),await H()}catch(N){a.value="Error: "+N.message}}async function le(){if(!n.value)return;const J=n.value.name;try{const N=await fetch(`/api/skills/${encodeURIComponent(J)}`,{method:"DELETE",headers:{Authorization:`Bearer ${Se()}`}});if(!N.ok)throw new Error(N.statusText);V(),await H()}catch(N){c.value="Error: "+N.message}}async function de(){const J=u.value.trim(),N=h.value;if(!J){C.value="Name is required";return}const K=N.split(",").map(te=>te.trim()).filter(Boolean);if(!K.length){C.value="At least one trigger is required";return}const fe=Z(J,K,x.value,`\x3C!-- Write your skill instructions here -->
|
|
72
|
+
`);try{const te=await fetch(`/api/skills/${encodeURIComponent(J)}`,{method:"PUT",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({content:fe})});if(!te.ok)throw new Error(te.statusText);C.value="Created ✓",p.value=!1,await H();const we=t.value.find(ye=>ye.name===J);we&&P(we)}catch(te){C.value="Error: "+te.message}}return yt(H),(J,N)=>(w(),S("div",oc,[l("div",rc,[l("div",ic,[N[8]||(N[8]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Skill Library"),l("p",{class:"text-sm text-textSecondary mt-1"},"Manage intent-routing skills — user overrides, defaults, and project skills")],-1)),l("button",{onClick:N[0]||(N[0]=K=>{p.value=!p.value,n.value=null}),class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"}," + New Skill ")]),p.value?(w(),S("div",lc,[N[12]||(N[12]=l("h4",{class:"text-sm font-semibold mb-3"},"Create New Skill",-1)),l("div",ac,[l("div",null,[N[9]||(N[9]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),me(l("input",{"onUpdate:modelValue":N[1]||(N[1]=K=>u.value=K),type:"text",placeholder:"my-skill",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[ke,u.value]])]),l("div",null,[N[10]||(N[10]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),me(l("input",{"onUpdate:modelValue":N[2]||(N[2]=K=>h.value=K),type:"text",placeholder:"trigger1, trigger2",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},null,512),[[ke,h.value]])])]),l("div",cc,[l("label",uc,[me(l("input",{"onUpdate:modelValue":N[3]||(N[3]=K=>x.value=K),type:"checkbox",class:"rounded"},null,512),[[io,x.value]]),N[11]||(N[11]=l("span",null,"Replaces orchestrator",-1))])]),l("div",dc,[l("button",{onClick:de,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Create"),l("button",{onClick:N[4]||(N[4]=K=>p.value=!1),class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Cancel"),C.value?(w(),S("span",fc,$(C.value),1)):Q("",!0)])])):Q("",!0),s.value?(w(),S("div",pc,"Loading...")):t.value.length===0?(w(),S("div",hc,"No skills loaded")):(w(),S("div",mc,[(w(!0),S(ie,null,be(t.value,K=>{var fe;return w(),S("div",{key:K.name,onClick:te=>P(K),class:G(["glass rounded-xl p-4 cursor-pointer hover:bg-cardHover transition border",((fe=n.value)==null?void 0:fe.name)===K.name?"border-accent":"border-transparent"])},[l("div",xc,[l("div",vc,[l("div",yc,[l("span",bc,$(K.name),1),l("span",{class:"type-badge",style:Es(z(j(K.source)))},$(j(K.source)),5),K.replacesOrchestrator?(w(),S("span",_c,"REPLACES ORCH")):Q("",!0)]),l("div",wc,[(w(!0),S(ie,null,be(K.triggers||[],te=>(w(),S("span",{key:te,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},$(te),1))),128))])]),l("div",{class:"text-xs text-muted font-mono shrink-0 max-w-[200px] truncate",title:K.source||""},$((K.source||"").split(/[\\/]/).pop()||""),9,Sc)])],10,gc)}),128))]))]),n.value?(w(),S("div",Cc,[l("div",kc,[l("div",null,[l("h3",Tc,"Edit: "+$(n.value.name),1),l("p",$c,$(n.value.source||"(unknown source)"),1)]),l("div",Ac,[a.value?(w(),S("span",Ec,$(a.value),1)):Q("",!0),c.value?(w(),S("span",Pc,$(c.value),1)):Q("",!0),j(n.value.source)==="user"?(w(),S("button",{key:2,onClick:le,class:"px-4 py-2 rounded-xl bg-card hover:bg-red-900/40 border border-gray-700 hover:border-red-700 text-sm text-textSecondary hover:text-red-400 transition",title:"Remove user override (reverts to default)"},"Remove override")):Q("",!0),l("button",{onClick:V,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Close"),l("button",{onClick:F,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),l("div",Ic,[l("div",null,[N[13]||(N[13]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),l("input",{value:n.value.name,type:"text",readonly:"",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono opacity-60 cursor-not-allowed"},null,8,Mc)]),l("div",null,[N[14]||(N[14]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),me(l("input",{"onUpdate:modelValue":N[5]||(N[5]=K=>r.value=K),type:"text",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},null,512),[[ke,r.value]])]),l("div",Oc,[l("label",Rc,[me(l("input",{"onUpdate:modelValue":N[6]||(N[6]=K=>i.value=K),type:"checkbox",class:"rounded"},null,512),[[io,i.value]]),N[15]||(N[15]=l("span",null,"Replaces orchestrator",-1))])])]),me(l("textarea",{"onUpdate:modelValue":N[7]||(N[7]=K=>o.value=K),rows:"20",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:"Skill body (markdown)..."},null,512),[[ke,o.value]])])):Q("",!0)]))}}),jc={class:"animate-fade-in space-y-6"},Nc={class:"glass rounded-xl p-6"},Lc={class:"flex flex-wrap items-center justify-between gap-4 mb-2"},Fc={class:"flex items-center gap-3"},Hc={key:0,class:"mt-4 p-4 rounded-xl bg-surface border border-gray-700/50 space-y-3"},Vc={class:"grid grid-cols-1 sm:grid-cols-3 gap-3"},Uc=["value"],Bc={class:"flex justify-end"},Kc=["disabled"],Wc={key:0,class:"text-center py-12 text-textSecondary"},zc={key:1,class:"text-center py-8 text-danger text-sm"},Jc={key:2,class:"text-center py-12 text-textSecondary"},qc={key:3},Gc={class:"space-y-3"},Yc={class:"p-4"},Zc={class:"flex flex-wrap items-center gap-3"},Qc=["onBlur"],Xc=["onDblclick"],eu={class:"text-xs text-muted font-mono"},tu=["value","onChange"],su=["value"],nu={class:"text-xs text-muted"},ou={class:"ml-auto flex items-center gap-3"},ru={class:"flex items-center gap-1.5"},iu=["onClick"],lu={class:"flex items-center gap-1.5"},au=["onClick"],cu={class:"flex items-center gap-1.5"},uu=["onClick"],du=["onClick"],fu=["onClick"],pu=["onClick"],hu={key:0,class:"mt-3 p-3 rounded-lg bg-surface border border-purple-500/20 space-y-2"},mu={class:"grid grid-cols-1 sm:grid-cols-3 gap-2"},gu=["value"],xu={class:"flex items-center gap-2"},vu=["onClick","disabled"],yu={key:0,class:"border-t border-gray-700/30 bg-surface/30 px-4 py-3 space-y-2"},bu={key:0,class:"text-xs text-muted py-1"},_u={class:"text-sm font-medium"},wu={class:"text-xs text-muted font-mono"},Su=["value","onChange"],Cu=["value"],ku={class:"text-xs text-muted"},Tu={class:"ml-auto flex items-center gap-3"},$u={key:0,class:"flex items-center gap-1.5"},Au=["onClick"],Eu={key:1,class:"flex items-center gap-1.5"},Pu=["onClick"],Iu=["onClick"],Mu={key:4},Ou={class:"space-y-2"},Ru={class:"font-medium"},Du={class:"text-xs text-muted font-mono"},ju={class:"text-xs text-textSecondary"},Nu={class:"text-xs text-muted"},Lu=["onClick"],Fu={key:5},Hu={class:"space-y-2"},Vu={class:"font-medium"},Uu={class:"text-xs text-muted font-mono"},Bu=["value","onChange"],Ku=["value"],Wu={class:"text-xs text-muted"},zu={class:"ml-auto flex items-center gap-3"},Ju={class:"flex items-center gap-1.5"},qu=["onClick"],Gu={class:"flex items-center gap-1.5"},Yu=["onClick"],Zu=["onClick"],Qu={key:6},Xu={class:"space-y-2"},ed={class:"font-medium"},td={class:"text-xs text-muted font-mono"},sd=["value","onChange"],nd=["value"],od={class:"text-xs text-muted"},rd=["onClick"],id=kt({__name:"ThreadsTab",setup(e){const t=D([]),s=D(!0),n=D(""),o=D({}),r=D(new Set),i=D(!1),a=D({name:"",threadId:0,client:"claude"}),c=D(""),p=D(!1),u=D(null),h=D(""),x=D(null),C=D({name:"",threadId:0,client:"claude"}),H=D(""),j=D(!1),z=["claude","copilot","codex","openai_codex","copilot_claude","copilot_codex","cursor"],P={root:{emoji:"🟢",classes:"bg-green-500/20 text-green-400 border-green-500/30"},daily:{emoji:"🔵",classes:"bg-blue-500/20 text-blue-400 border-blue-500/30"},branch:{emoji:"🟣",classes:"bg-purple-500/20 text-purple-400 border-purple-500/30"},worker:{emoji:"🟡",classes:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30"}},V=Ke(()=>t.value.filter(L=>L.type==="root")),Z=Ke(()=>t.value.filter(L=>L.type==="daily")),F=Ke(()=>t.value.filter(L=>L.type==="branch")),le=Ke(()=>t.value.filter(L=>L.type==="worker"));async function de(){s.value=!0,n.value="";try{const L=await _e("/api/threads");t.value=L.threads??[]}catch(L){n.value=L.message||"Failed to load threads"}finally{s.value=!1}}async function J(L){try{const y=await _e(`/api/threads/${L}/children`);o.value[L]=y.threads??[]}catch{o.value[L]=[]}}function N(L){r.value.has(L)?r.value.delete(L):(r.value.add(L),J(L))}async function K(){if(!(!a.value.name.trim()||!a.value.threadId)){p.value=!0,c.value="";try{const L=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:a.value.threadId,name:a.value.name.trim(),type:"root",client:a.value.client,keepAlive:!1})});if(!L.ok){const y=await L.json().catch(()=>({error:L.statusText}));throw new Error(y.error??L.statusText)}c.value="Created ✓",a.value={name:"",threadId:0,client:"claude"},i.value=!1,setTimeout(()=>{c.value=""},3e3),await de()}catch(L){c.value="Error: "+L.message}finally{p.value=!1}}}async function fe(L){if(!(!C.value.name.trim()||!C.value.threadId)){j.value=!0,H.value="";try{const y=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:C.value.threadId,name:C.value.name.trim(),type:"branch",rootThreadId:L,client:C.value.client})});if(!y.ok){const g=await y.json().catch(()=>({error:y.statusText}));throw new Error(g.error??y.statusText)}H.value="Branch created ✓",C.value={name:"",threadId:0,client:"claude"},x.value=null,setTimeout(()=>{H.value=""},3e3),await de(),J(L)}catch(y){H.value="Error: "+y.message}finally{j.value=!1}}}function te(L){u.value=L.threadId,h.value=L.name}async function we(L){const y=h.value.trim();if(u.value=null,!!y)try{const g=await fetch(`/api/threads/${L}`,{method:"PATCH",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({name:y})});if(!g.ok)throw new Error(g.statusText);await de()}catch(g){n.value="Failed to rename thread: "+g.message}}async function ye(L){try{const y=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({keepAlive:!L.keepAlive})});if(!y.ok)throw new Error(y.statusText);await de()}catch(y){n.value="Failed to toggle keep-alive: "+y.message}}async function Ue(L,y){try{const g=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({client:y})});if(!g.ok)throw new Error(g.statusText);await de()}catch(g){n.value="Failed to change agent type: "+g.message}}async function Tt(L){try{const y=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({dailyRotation:!L.dailyRotation})});if(!y.ok)throw new Error(y.statusText);await de()}catch(y){n.value="Failed to toggle daily rotation: "+y.message}}async function ge(L){try{const y=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({autonomousMode:!L.autonomousMode})});if(!y.ok)throw new Error(y.statusText);await de()}catch(y){n.value="Failed to toggle autonomous mode: "+y.message}}async function se(L){if(confirm(`Archive thread "${L.name}" (${L.threadId})?`))try{const y=await fetch(`/api/threads/${L.threadId}`,{method:"DELETE",headers:{Authorization:`Bearer ${Se()}`}});if(!y.ok)throw new Error(y.statusText);await de()}catch(y){n.value="Failed to archive: "+y.message}}function X(L){if(!L)return"—";const y=new Date(L),M=Date.now()-y.getTime();return M<6e4?"just now":M<36e5?`${Math.floor(M/6e4)}m ago`:M<864e5?`${Math.floor(M/36e5)}h ago`:y.toLocaleDateString()}function Me(L){return L==="active"?"text-success":L==="archived"?"text-muted":"text-warn"}return yt(de),(L,y)=>(w(),S("div",jc,[l("div",Nc,[l("div",Lc,[y[10]||(y[10]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Thread Registry"),l("p",{class:"text-sm text-textSecondary mt-1"},"Manage conversation threads, branches, and daily sessions")],-1)),l("div",Fc,[c.value?(w(),S("span",{key:0,class:G([c.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},$(c.value),3)):Q("",!0),l("button",{onClick:y[0]||(y[0]=g=>i.value=!i.value),class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},$(i.value?"Cancel":"+ New Root Thread"),1),l("button",{onClick:de,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm hover:bg-surface transition"}," ↻ Refresh ")])]),i.value?(w(),S("div",Hc,[l("div",Vc,[l("div",null,[y[11]||(y[11]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Name",-1)),me(l("input",{"onUpdate:modelValue":y[1]||(y[1]=g=>a.value.name=g),type:"text",placeholder:"e.g. Main Workspace",class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[ke,a.value.name]])]),l("div",null,[y[12]||(y[12]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Thread ID",-1)),me(l("input",{"onUpdate:modelValue":y[2]||(y[2]=g=>a.value.threadId=g),type:"number",min:"1",placeholder:"Telegram thread ID",class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[ke,a.value.threadId,void 0,{number:!0}]])]),l("div",null,[y[13]||(y[13]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Client",-1)),me(l("select",{"onUpdate:modelValue":y[3]||(y[3]=g=>a.value.client=g),class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition appearance-none"},[(w(),S(ie,null,be(z,g=>l("option",{key:g,value:g},$(g),9,Uc)),64))],512),[[ns,a.value.client]])])]),l("div",Bc,[l("button",{onClick:K,disabled:p.value||!a.value.name.trim()||!a.value.threadId,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},$(p.value?"Creating…":"Create Root Thread"),9,Kc)])])):Q("",!0)]),s.value&&t.value.length===0?(w(),S("div",Wc,"Loading threads…")):n.value?(w(),S("div",zc,$(n.value),1)):t.value.length===0?(w(),S("div",Jc,"No threads registered")):Q("",!0),V.value.length>0?(w(),S("div",qc,[y[19]||(y[19]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟢 Root Threads",-1)),l("div",Gc,[(w(!0),S(ie,null,be(V.value,g=>{var M,T;return w(),S("div",{key:g.id,class:"glass rounded-xl overflow-hidden"},[l("div",Yc,[l("div",Zc,[l("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(M=P[g.type])==null?void 0:M.classes])},$((T=P[g.type])==null?void 0:T.emoji)+" "+$(g.type.toUpperCase()),3),u.value===g.threadId?me((w(),S("input",{key:0,"onUpdate:modelValue":y[4]||(y[4]=E=>h.value=E),onBlur:E=>we(g.threadId),onKeyup:[y[5]||(y[5]=nn(E=>E.target.blur(),["enter"])),y[6]||(y[6]=nn(E=>u.value=null,["escape"]))],class:"font-semibold bg-card border border-accent rounded px-1 py-0 text-textPrimary focus:outline-none w-40",ref_for:!0,ref:"nameInput"},null,40,Qc)),[[ke,h.value]]):(w(),S("span",{key:1,class:"font-semibold cursor-pointer hover:text-accent transition",onDblclick:E=>te(g),title:"Double-click to rename"},$(g.name),41,Xc)),l("span",{class:G(["text-xs font-medium",Me(g.status)])},$(g.status),3),l("span",eu,"ID: "+$(g.threadId),1),l("select",{value:g.client,onChange:E=>Ue(g,E.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[(w(),S(ie,null,be(z,E=>l("option",{key:E,value:E},$(E),9,su)),64))],40,tu),l("span",nu,$(X(g.lastActiveAt)),1),l("div",ou,[l("div",ru,[l("button",{onClick:E=>ye(g),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,iu),y[14]||(y[14]=l("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),l("div",lu,[l("button",{onClick:E=>Tt(g),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.dailyRotation?"bg-blue-500":"bg-gray-700"]),title:"Toggle daily rotation"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.dailyRotation?"translate-x-4":"translate-x-0.5"])},null,2)],10,au),y[15]||(y[15]=l("span",{class:"text-xs text-muted"},"Daily",-1))]),l("div",cu,[l("button",{onClick:E=>ge(g),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,uu),y[16]||(y[16]=l("span",{class:"text-xs text-muted"},"Auto",-1))]),l("button",{onClick:E=>N(g.threadId),class:"px-2 py-1 rounded-lg text-xs bg-card border border-gray-700 hover:bg-surface transition"},$(r.value.has(g.threadId)?"▾ Children":"▸ Children"),9,du),l("button",{onClick:E=>{x.value=x.value===g.threadId?null:g.threadId,C.value={name:"",threadId:0,client:"claude"},H.value=""},class:"px-2 py-1 rounded-lg text-xs bg-purple-500/20 text-purple-400 border border-purple-500/30 hover:bg-purple-500/30 transition"}," + Branch ",8,fu),l("button",{onClick:E=>se(g),class:"px-2 py-1 rounded-lg text-xs bg-red-500/20 text-red-400 border border-red-500/30 hover:bg-red-500/30 transition"}," Archive ",8,pu)])]),x.value===g.threadId?(w(),S("div",hu,[l("div",mu,[me(l("input",{"onUpdate:modelValue":y[7]||(y[7]=E=>C.value.name=E),type:"text",placeholder:"Branch name",class:"px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[ke,C.value.name]]),me(l("input",{"onUpdate:modelValue":y[8]||(y[8]=E=>C.value.threadId=E),type:"number",min:"1",placeholder:"Thread ID",class:"px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[ke,C.value.threadId,void 0,{number:!0}]]),me(l("select",{"onUpdate:modelValue":y[9]||(y[9]=E=>C.value.client=E),class:"px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition appearance-none"},[(w(),S(ie,null,be(z,E=>l("option",{key:E,value:E},$(E),9,gu)),64))],512),[[ns,C.value.client]])]),l("div",xu,[l("button",{onClick:E=>fe(g.threadId),disabled:j.value||!C.value.name.trim()||!C.value.threadId,class:"px-3 py-1.5 rounded-lg bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-xs font-medium transition"},$(j.value?"Creating…":"Create Branch"),9,vu),H.value?(w(),S("span",{key:0,class:G([H.value.startsWith("Error")?"text-danger":"text-success","text-xs"])},$(H.value),3)):Q("",!0)])])):Q("",!0)]),r.value.has(g.threadId)&&o.value[g.threadId]?(w(),S("div",yu,[o.value[g.threadId].length===0?(w(),S("div",bu,"No children")):Q("",!0),(w(!0),S(ie,null,be(o.value[g.threadId],E=>{var $e,ne;return w(),S("div",{key:E.id,class:"flex flex-wrap items-center gap-2 px-3 py-2 rounded-lg bg-card/50 border border-gray-700/30"},[l("span",{class:G(["inline-flex items-center gap-1 px-1.5 py-0.5 rounded-full text-xs font-medium border",($e=P[E.type])==null?void 0:$e.classes])},$((ne=P[E.type])==null?void 0:ne.emoji)+" "+$(E.type.toUpperCase()),3),l("span",_u,$(E.name),1),l("span",{class:G(["text-xs",Me(E.status)])},$(E.status),3),l("span",wu,"ID: "+$(E.threadId),1),l("select",{value:E.client,onChange:Ae=>Ue(E,Ae.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[(w(),S(ie,null,be(z,Ae=>l("option",{key:Ae,value:Ae},$(Ae),9,Cu)),64))],40,Su),l("span",ku,$(X(E.lastActiveAt)),1),l("div",Tu,[E.type==="branch"?(w(),S("div",$u,[l("button",{onClick:Ae=>ye(E),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",E.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",E.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,Au),y[17]||(y[17]=l("span",{class:"text-xs text-muted"},"Keep-alive",-1))])):Q("",!0),E.type==="branch"?(w(),S("div",Eu,[l("button",{onClick:Ae=>ge(E),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",E.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",E.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,Pu),y[18]||(y[18]=l("span",{class:"text-xs text-muted"},"Auto",-1))])):Q("",!0),E.type!=="root"?(w(),S("button",{key:2,onClick:Ae=>se(E),class:"px-2 py-0.5 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,Iu)):Q("",!0)])])}),128))])):Q("",!0)])}),128))])])):Q("",!0),Z.value.length>0?(w(),S("div",Mu,[y[20]||(y[20]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🔵 Daily Sessions",-1)),l("div",Ou,[(w(!0),S(ie,null,be(Z.value,g=>{var M,T;return w(),S("div",{key:g.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[l("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(M=P[g.type])==null?void 0:M.classes])},$((T=P[g.type])==null?void 0:T.emoji)+" "+$(g.type.toUpperCase()),3),l("span",Ru,$(g.name),1),l("span",{class:G(["text-xs font-medium",Me(g.status)])},$(g.status),3),l("span",Du,"ID: "+$(g.threadId),1),l("span",ju,$(g.client),1),l("span",Nu,$(X(g.lastActiveAt)),1),l("button",{onClick:E=>se(g),class:"ml-auto px-2 py-1 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,Lu)])}),128))])])):Q("",!0),F.value.length>0?(w(),S("div",Fu,[y[23]||(y[23]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟣 Branches",-1)),l("div",Hu,[(w(!0),S(ie,null,be(F.value,g=>{var M,T;return w(),S("div",{key:g.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[l("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(M=P[g.type])==null?void 0:M.classes])},$((T=P[g.type])==null?void 0:T.emoji)+" "+$(g.type.toUpperCase()),3),l("span",Vu,$(g.name),1),l("span",{class:G(["text-xs font-medium",Me(g.status)])},$(g.status),3),l("span",Uu,"ID: "+$(g.threadId),1),l("select",{value:g.client,onChange:E=>Ue(g,E.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[(w(),S(ie,null,be(z,E=>l("option",{key:E,value:E},$(E),9,Ku)),64))],40,Bu),l("span",Wu,$(X(g.lastActiveAt)),1),l("div",zu,[l("div",Ju,[l("button",{onClick:E=>ye(g),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,qu),y[21]||(y[21]=l("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),l("div",Gu,[l("button",{onClick:E=>ge(g),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,Yu),y[22]||(y[22]=l("span",{class:"text-xs text-muted"},"Auto",-1))]),l("button",{onClick:E=>se(g),class:"px-2 py-1 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,Zu)])])}),128))])])):Q("",!0),le.value.length>0?(w(),S("div",Qu,[y[24]||(y[24]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟡 Workers",-1)),l("div",Xu,[(w(!0),S(ie,null,be(le.value,g=>{var M,T;return w(),S("div",{key:g.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[l("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(M=P[g.type])==null?void 0:M.classes])},$((T=P[g.type])==null?void 0:T.emoji)+" "+$(g.type.toUpperCase()),3),l("span",ed,$(g.name),1),l("span",{class:G(["text-xs font-medium",Me(g.status)])},$(g.status),3),l("span",td,"ID: "+$(g.threadId),1),l("select",{value:g.client,onChange:E=>Ue(g,E.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[(w(),S(ie,null,be(z,E=>l("option",{key:E,value:E},$(E),9,nd)),64))],40,sd),l("span",od,$(X(g.lastActiveAt)),1),l("button",{onClick:E=>se(g),class:"ml-auto px-2 py-1 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,rd)])}),128))])])):Q("",!0)]))}}),ld={class:"animate-fade-in"},ad={class:"glass rounded-xl p-6 mb-6"},cd={class:"flex flex-wrap items-center justify-between gap-4 mb-6"},ud={class:"flex items-center gap-3"},dd=["disabled"],fd={key:0,class:"text-center py-8 text-textSecondary text-sm"},pd={key:1,class:"space-y-6"},hd={class:"glass rounded-xl p-4 border border-gray-700/50"},md={class:"flex items-center gap-4"},gd={class:"flex justify-between text-xs text-muted mt-2"},xd={class:"font-mono"},vd={key:0,class:"mt-3 px-3 py-2 rounded-lg bg-warn/10 border border-warn/20 text-xs text-warn"},yd={class:"glass rounded-xl p-4 border border-gray-700/30 bg-surface/30"},bd={class:"grid grid-cols-2 gap-4"},_d=kt({__name:"SettingsTab",setup(e){const t=D(!0),s=D(!1),n=D(""),o=D(50),r=D(50),i=Ke(()=>o.value!==r.value);async function a(){t.value=!0;try{const p=await _e("/api/settings/bootstrap-message-count");o.value=p.count,r.value=p.count}finally{t.value=!1}}async function c(){s.value=!0,n.value="";try{const p=await fetch("/api/settings/bootstrap-message-count",{method:"POST",headers:{Authorization:`Bearer ${Se()}`,"Content-Type":"application/json"},body:JSON.stringify({count:o.value})});if(!p.ok){const h=await p.json().catch(()=>({error:p.statusText}));throw new Error(h.error??p.statusText)}const u=await p.json();r.value=u.count,o.value=u.count,n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3)}catch(p){n.value="Error: "+p.message}finally{s.value=!1}}return yt(a),(p,u)=>(w(),S("div",ld,[l("div",ad,[l("div",cd,[u[2]||(u[2]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Settings"),l("p",{class:"text-sm text-textSecondary mt-1"},"Configure agent behavior and context injection")],-1)),l("div",ud,[n.value?(w(),S("span",{key:0,class:G([n.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},$(n.value),3)):Q("",!0),l("button",{onClick:c,disabled:s.value||t.value||!i.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},$(s.value?"Saving…":"Save"),9,dd)])]),t.value?(w(),S("div",fd,"Loading…")):(w(),S("div",pd,[l("div",hd,[u[6]||(u[6]=l("label",{class:"block text-sm font-medium mb-1"},"Recent Conversation Buffer",-1)),u[7]||(u[7]=l("p",{class:"text-xs text-textSecondary mb-3"},[Et(" Number of recent messages injected into the agent's bootstrap context. Set to "),l("span",{class:"font-mono text-accentLight"},"0"),Et(" to disable (useful when using VS Code, which maintains its own conversation history). ")],-1)),l("div",md,[me(l("input",{"onUpdate:modelValue":u[0]||(u[0]=h=>o.value=h),type:"range",min:"0",max:"100",step:"5",class:"flex-1 accent-accent"},null,512),[[ke,o.value,void 0,{number:!0}]]),me(l("input",{"onUpdate:modelValue":u[1]||(u[1]=h=>o.value=h),type:"number",min:"0",max:"200",class:"w-20 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono text-center focus:outline-none focus:border-accent transition"},null,512),[[ke,o.value,void 0,{number:!0}]])]),l("div",gd,[u[3]||(u[3]=l("span",null,"Off",-1)),l("span",xd,$(o.value)+" messages",1),u[4]||(u[4]=l("span",null,"Max",-1))]),o.value===0?(w(),S("div",vd,[...u[5]||(u[5]=[Et(" Message buffer injection is ",-1),l("strong",null,"disabled",-1),Et(". The agent will not see recent conversation history in its bootstrap context. Use this when VS Code (or another IDE) already provides conversation history. ",-1)])])):Q("",!0)]),l("div",yd,[u[10]||(u[10]=l("div",{class:"text-xs font-medium text-textSecondary uppercase tracking-wider mb-3"},"Current State",-1)),l("div",bd,[l("div",null,[u[8]||(u[8]=l("div",{class:"text-xs text-muted mb-1"},"Message Buffer",-1)),l("span",{class:G(["text-sm font-medium",r.value>0?"text-success":"text-textSecondary"])},$(r.value>0?`${r.value} messages`:"Disabled"),3)]),l("div",null,[u[9]||(u[9]=l("div",{class:"text-xs text-muted mb-1"},"Status",-1)),l("span",{class:G(["text-sm font-medium",i.value?"text-warn":"text-textSecondary"])},$(i.value?"Unsaved changes":"Saved"),3)])])])]))])]))}}),wd={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-surface/95 backdrop-blur-sm"},Sd={class:"glass rounded-2xl p-8 max-w-md w-full mx-4 animate-slide-up"},Cd=["disabled"],kd={key:0,class:"mt-3 text-sm text-danger"},Td={key:1,class:"min-h-screen font-sans text-textPrimary animate-fade-in"},$d={class:"glass sticky top-0 z-40 border-b border-gray-800/50"},Ad={class:"max-w-7xl mx-auto px-4 sm:px-6 py-4 flex items-center justify-between"},Ed={class:"flex items-center gap-4"},Pd={class:"text-sm text-textSecondary font-mono"},Id={class:"max-w-7xl mx-auto px-4 sm:px-6 py-6"},Md={class:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3"},Od={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Rd={class:"text-2xl font-bold font-mono"},Dd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},jd={class:"text-2xl font-bold font-mono"},Nd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Ld={class:"text-2xl font-bold font-mono"},Fd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Hd={class:"flex items-center gap-2 mb-2"},Vd={class:"text-2xl font-bold font-mono"},Ud={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Bd={class:"text-2xl font-bold font-mono"},Kd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Wd={class:"text-2xl font-bold font-mono"},zd={class:"max-w-7xl mx-auto px-4 sm:px-6"},Jd={class:"flex gap-6 border-b border-gray-800/50 mb-6"},qd=["onClick"],Gd={class:"max-w-7xl mx-auto px-4 sm:px-6 pb-12"},ds="sensorium_token",Yd=kt({__name:"App",setup(e){const t=D(!1),s=D(""),n=D(""),o=D(!1),r=D(null),i=D("sessions");let a=null;const c=[{id:"sessions",label:"Sessions"},{id:"notes",label:"Memory Notes"},{id:"templates",label:"Templates"},{id:"skills",label:"Skills"},{id:"threads",label:"Threads"},{id:"settings",label:"Settings"}],p={sessions:na,notes:_a,templates:nc,skills:Dc,threads:id,settings:_d},u=Ke(()=>p[i.value]),h=Ke(()=>{if(!r.value)return"—";const z=Math.floor(r.value.uptime),P=Math.floor(z/86400),V=Math.floor(z%86400/3600),Z=Math.floor(z%3600/60);return P>0?`${P}d ${V}h`:V>0?`${V}h ${Z}m`:`${Z}m`});async function x(){const z=s.value.trim()||"no-auth";o.value=!0,n.value="";try{Bt(z),await H(),localStorage.setItem(ds,z),t.value=!0,j()}catch(P){const V=P;V.status===401?n.value="Invalid token":n.value=V.message??"Connection failed",Bt("")}finally{o.value=!1}}function C(){localStorage.removeItem(ds),t.value=!1,s.value="",r.value=null,a&&clearInterval(a),Bt("")}async function H(){r.value=await _e("/api/status")}function j(){a&&clearInterval(a),a=setInterval(H,3e4)}return yt(async()=>{const z=localStorage.getItem(ds);if(z){s.value=z;try{Bt(z),await H(),t.value=!0,j()}catch{localStorage.removeItem(ds),Bt("")}}}),yn(()=>{a&&clearInterval(a)}),(z,P)=>{var V,Z,F,le,de,J,N,K,fe,te,we;return t.value?(w(),S("div",Td,[l("header",$d,[l("div",Ad,[P[3]||(P[3]=Be('<div class="flex items-center gap-3"><div class="w-8 h-8 rounded-lg bg-gradient-to-br from-accent to-purple-500 flex items-center justify-center"><span class="text-white text-sm font-bold">S</span></div><div><h1 class="text-lg font-semibold tracking-tight">Sensorium MCP</h1><p class="text-xs text-textSecondary">Agent Dashboard</p></div></div>',1)),l("div",Ed,[P[2]||(P[2]=l("div",{class:"flex items-center gap-2 text-sm"},[l("span",{class:"w-2 h-2 rounded-full bg-success animate-pulse-slow"}),l("span",{class:"text-textSecondary"},"Connected")],-1)),l("div",Pd,$(h.value),1),l("button",{onClick:C,class:"text-sm text-muted hover:text-textSecondary transition"},"Disconnect")])])]),l("div",Id,[l("div",Md,[l("div",Od,[P[4]||(P[4]=Be('<div class="flex items-center gap-2 mb-2"><span class="text-success"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Sessions</span></div>',1)),l("div",Rd,$(((V=r.value)==null?void 0:V.activeSessions)??0),1)]),l("div",Dd,[P[5]||(P[5]=Be('<div class="flex items-center gap-2 mb-2"><span class="text-accentLight"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Notes</span></div>',1)),l("div",jd,$(((F=(Z=r.value)==null?void 0:Z.memory)==null?void 0:F.totalSemanticNotes)??0),1)]),l("div",Nd,[P[6]||(P[6]=Be('<div class="flex items-center gap-2 mb-2"><span class="text-warn"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Episodes</span></div>',1)),l("div",Ld,$(((de=(le=r.value)==null?void 0:le.memory)==null?void 0:de.totalEpisodes)??0),1)]),l("div",Fd,[l("div",Hd,[l("span",{class:G((((N=(J=r.value)==null?void 0:J.memory)==null?void 0:N.unconsolidatedEpisodes)??0)>10?"text-danger":"text-success")},[...P[7]||(P[7]=[l("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)])],2),P[8]||(P[8]=l("span",{class:"text-xs text-textSecondary font-medium uppercase tracking-wider"},"Unconsolidated",-1))]),l("div",Vd,$(((fe=(K=r.value)==null?void 0:K.memory)==null?void 0:fe.unconsolidatedEpisodes)??0),1)]),l("div",Ud,[P[9]||(P[9]=Be('<div class="flex items-center gap-2 mb-2"><span class="text-accent"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Procedures</span></div>',1)),l("div",Bd,$(((we=(te=r.value)==null?void 0:te.memory)==null?void 0:we.totalProcedures)??0),1)]),l("div",Kd,[P[10]||(P[10]=Be('<div class="flex items-center gap-2 mb-2"><span class="text-success"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14M12 5l7 7-7 7"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Uptime</span></div>',1)),l("div",Wd,$(h.value),1)])])]),l("div",zd,[l("nav",Jd,[(w(),S(ie,null,be(c,ye=>l("button",{key:ye.id,onClick:Ue=>i.value=ye.id,class:G(["pb-3 text-sm font-medium transition",i.value===ye.id?"tab-active":"tab-inactive"])},$(ye.label),11,qd)),64))])]),l("div",Gd,[(w(),ur($i(u.value),{status:r.value},null,8,["status"]))])])):(w(),S("div",wd,[l("div",Sd,[P[1]||(P[1]=Be('<div class="flex items-center gap-3 mb-6"><div class="w-10 h-10 rounded-xl bg-accent/20 flex items-center justify-center"><svg class="w-5 h-5 text-accent" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path></svg></div><div><h2 class="text-lg font-semibold">Sensorium MCP</h2><p class="text-sm text-textSecondary">Enter your API token</p></div></div>',1)),me(l("input",{"onUpdate:modelValue":P[0]||(P[0]=ye=>s.value=ye),type:"password",placeholder:"MCP_HTTP_SECRET",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary placeholder-muted focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition font-mono text-sm",onKeydown:nn(x,["enter"])},null,544),[[ke,s.value]]),l("button",{onClick:x,disabled:o.value,class:"w-full mt-4 px-4 py-3 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white font-medium transition"},$(o.value?"Connecting...":"Connect"),9,Cd),n.value?(w(),S("p",kd,$(n.value),1)):Q("",!0)])]))}}});Hl(Yd).mount("#app");</script>
|
|
73
73
|
<style rel="stylesheet" crossorigin>body{background:#0f1419}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:#1a1f2e}::-webkit-scrollbar-thumb{background:#374151;border-radius:3px}::-webkit-scrollbar-thumb:hover{background:#4b5563}.glass{background:#1a1f2ecc;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid rgba(99,102,241,.1)}.stat-glow{box-shadow:0 0 20px #6366f114}.priority-2{border-left:3px solid #ef4444}.priority-1{border-left:3px solid #f59e0b}.priority-0{border-left:3px solid transparent}.type-badge{font-size:.65rem;padding:2px 6px;border-radius:9999px;font-weight:600;text-transform:uppercase;letter-spacing:.05em}.type-fact{background:#3b82f626;color:#60a5fa}.type-preference{background:#a855f726;color:#c084fc}.type-pattern{background:#22c55e26;color:#4ade80}.type-entity{background:#fbbf2426;color:#fbbf24}.type-relationship{background:#f472b626;color:#f472b6}.tab-active{border-bottom:2px solid #6366f1;color:#e5e7eb}.tab-inactive{border-bottom:2px solid transparent;color:#6b7280}.tab-inactive:hover{color:#9ca3af}</style>
|
|
74
74
|
</head>
|
|
75
75
|
<body class="font-sans text-textPrimary min-h-screen">
|