sensorium-mcp 3.0.23 → 3.0.25

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.
Files changed (86) hide show
  1. package/dist/config.js +1 -1
  2. package/dist/config.js.map +1 -1
  3. package/dist/dashboard/routes/snapshots.d.ts +18 -0
  4. package/dist/dashboard/routes/snapshots.d.ts.map +1 -0
  5. package/dist/dashboard/routes/snapshots.js +138 -0
  6. package/dist/dashboard/routes/snapshots.js.map +1 -0
  7. package/dist/dashboard/routes/threads.d.ts +4 -0
  8. package/dist/dashboard/routes/threads.d.ts.map +1 -1
  9. package/dist/dashboard/routes/threads.js +79 -5
  10. package/dist/dashboard/routes/threads.js.map +1 -1
  11. package/dist/dashboard/routes/types.d.ts +2 -0
  12. package/dist/dashboard/routes/types.d.ts.map +1 -1
  13. package/dist/dashboard/routes/types.js.map +1 -1
  14. package/dist/dashboard/routes.d.ts.map +1 -1
  15. package/dist/dashboard/routes.js +20 -2
  16. package/dist/dashboard/routes.js.map +1 -1
  17. package/dist/dashboard/spa.html +10 -10
  18. package/dist/data/file-storage.d.ts.map +1 -1
  19. package/dist/data/file-storage.js +3 -8
  20. package/dist/data/file-storage.js.map +1 -1
  21. package/dist/data/interfaces.d.ts +1 -0
  22. package/dist/data/interfaces.d.ts.map +1 -1
  23. package/dist/data/memory/schema.d.ts.map +1 -1
  24. package/dist/data/memory/schema.js +1 -0
  25. package/dist/data/memory/schema.js.map +1 -1
  26. package/dist/data/memory/synthesis.d.ts +1 -23
  27. package/dist/data/memory/synthesis.d.ts.map +1 -1
  28. package/dist/data/memory/synthesis.js +1 -165
  29. package/dist/data/memory/synthesis.js.map +1 -1
  30. package/dist/data/memory/thread-registry.d.ts +3 -0
  31. package/dist/data/memory/thread-registry.d.ts.map +1 -1
  32. package/dist/data/memory/thread-registry.js +10 -3
  33. package/dist/data/memory/thread-registry.js.map +1 -1
  34. package/dist/http-server.d.ts +2 -1
  35. package/dist/http-server.d.ts.map +1 -1
  36. package/dist/http-server.js +4 -6
  37. package/dist/http-server.js.map +1 -1
  38. package/dist/index.js +1 -1
  39. package/dist/index.js.map +1 -1
  40. package/dist/logger.d.ts +2 -0
  41. package/dist/logger.d.ts.map +1 -1
  42. package/dist/logger.js +59 -4
  43. package/dist/logger.js.map +1 -1
  44. package/dist/services/agent-spawn.service.d.ts.map +1 -1
  45. package/dist/services/agent-spawn.service.js +0 -9
  46. package/dist/services/agent-spawn.service.js.map +1 -1
  47. package/dist/services/background-runner.d.ts +1 -0
  48. package/dist/services/background-runner.d.ts.map +1 -1
  49. package/dist/services/background-runner.js +37 -0
  50. package/dist/services/background-runner.js.map +1 -1
  51. package/dist/services/consolidation.service.d.ts.map +1 -1
  52. package/dist/services/consolidation.service.js +5 -1
  53. package/dist/services/consolidation.service.js.map +1 -1
  54. package/dist/services/dispatcher/lock.d.ts +4 -4
  55. package/dist/services/dispatcher/lock.d.ts.map +1 -1
  56. package/dist/services/dispatcher/lock.js +12 -11
  57. package/dist/services/dispatcher/lock.js.map +1 -1
  58. package/dist/services/dispatcher/poller.d.ts.map +1 -1
  59. package/dist/services/dispatcher/poller.js +12 -56
  60. package/dist/services/dispatcher/poller.js.map +1 -1
  61. package/dist/services/keeper.service.d.ts.map +1 -1
  62. package/dist/services/keeper.service.js +4 -1
  63. package/dist/services/keeper.service.js.map +1 -1
  64. package/dist/services/process.service.d.ts +1 -1
  65. package/dist/services/process.service.d.ts.map +1 -1
  66. package/dist/services/process.service.js +29 -14
  67. package/dist/services/process.service.js.map +1 -1
  68. package/dist/services/worker-cleanup.service.d.ts.map +1 -1
  69. package/dist/services/worker-cleanup.service.js +7 -17
  70. package/dist/services/worker-cleanup.service.js.map +1 -1
  71. package/dist/tools/defs/session-defs.d.ts.map +1 -1
  72. package/dist/tools/defs/session-defs.js +3 -2
  73. package/dist/tools/defs/session-defs.js.map +1 -1
  74. package/dist/tools/delegate-tool.d.ts.map +1 -1
  75. package/dist/tools/delegate-tool.js +10 -6
  76. package/dist/tools/delegate-tool.js.map +1 -1
  77. package/dist/tools/session-tools.js +5 -3
  78. package/dist/tools/session-tools.js.map +1 -1
  79. package/dist/tools/start-session-tool.d.ts.map +1 -1
  80. package/dist/tools/start-session-tool.js +15 -10
  81. package/dist/tools/start-session-tool.js.map +1 -1
  82. package/dist/tools/wait/poll-loop.d.ts.map +1 -1
  83. package/dist/tools/wait/poll-loop.js +8 -7
  84. package/dist/tools/wait/poll-loop.js.map +1 -1
  85. package/package.json +1 -1
  86. package/templates/azure-devops-securevault.default.md +36 -0
@@ -45,31 +45,31 @@
45
45
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
46
46
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
47
47
 
48
- <script type="module" crossorigin>(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const l of r.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function s(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(o){if(o.ep)return;o.ep=!0;const r=s(o);fetch(o.href,r)}})();/**
48
+ <script type="module" crossorigin>(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function s(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function n(o){if(o.ep)return;o.ep=!0;const l=s(o);fetch(o.href,l)}})();/**
49
49
  * @vue/shared v3.5.31
50
50
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
51
51
  * @license MIT
52
- **/function ln(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const de={},It=[],st=()=>{},fo=()=>!1,ks=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ts=e=>e.startsWith("onUpdate:"),Ee=Object.assign,an=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},vr=Object.prototype.hasOwnProperty,re=(e,t)=>vr.call(e,t),q=Array.isArray,Ot=e=>ls(e)==="[object Map]",Ft=e=>ls(e)==="[object Set]",En=e=>ls(e)==="[object Date]",Z=e=>typeof e=="function",be=e=>typeof e=="string",ot=e=>typeof e=="symbol",ce=e=>e!==null&&typeof e=="object",po=e=>(ce(e)||Z(e))&&Z(e.then)&&Z(e.catch),mo=Object.prototype.toString,ls=e=>mo.call(e),yr=e=>ls(e).slice(8,-1),ho=e=>ls(e)==="[object Object]",cn=e=>be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Jt=ln(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),$s=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},br=/-\w/g,je=$s(e=>e.replace(br,t=>t.slice(1).toUpperCase())),_r=/\B([A-Z])/g,_t=$s(e=>e.replace(_r,"-$1").toLowerCase()),As=$s(e=>e.charAt(0).toUpperCase()+e.slice(1)),Fs=$s(e=>e?`on${As(e)}`:""),tt=(e,t)=>!Object.is(e,t),ms=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},go=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Es=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Pn;const Ps=()=>Pn||(Pn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ms(e){if(q(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],o=be(n)?kr(n):Ms(n);if(o)for(const r in o)t[r]=o[r]}return t}else if(be(e)||ce(e))return e}const wr=/;(?![^(]*\))/g,Sr=/:([^]+)/,Cr=/\/\*[^]*?\*\//g;function kr(e){const t={};return e.replace(Cr,"").split(wr).forEach(s=>{if(s){const n=s.split(Sr);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Y(e){let t="";if(be(e))t=e;else if(q(e))for(let s=0;s<e.length;s++){const n=Y(e[s]);n&&(t+=n+" ")}else if(ce(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Tr="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",$r=ln(Tr);function xo(e){return!!e||e===""}function Ar(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=Vt(e[n],t[n]);return s}function Vt(e,t){if(e===t)return!0;let s=En(e),n=En(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=ot(e),n=ot(t),s||n)return e===t;if(s=q(e),n=q(t),s||n)return s&&n?Ar(e,t):!1;if(s=ce(e),n=ce(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 l in e){const a=e.hasOwnProperty(l),c=t.hasOwnProperty(l);if(a&&!c||!a&&c||!Vt(e[l],t[l]))return!1}}return String(e)===String(t)}function un(e,t){return e.findIndex(s=>Vt(s,t))}const vo=e=>!!(e&&e.__v_isRef===!0),k=e=>be(e)?e:e==null?"":q(e)||ce(e)&&(e.toString===mo||!Z(e.toString))?vo(e)?k(e.value):JSON.stringify(e,yo,2):String(e),yo=(e,t)=>vo(t)?yo(e,t.value):Ot(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,o],r)=>(s[Vs(n,r)+" =>"]=o,s),{})}:Ft(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Vs(s))}:ot(t)?Vs(t):ce(t)&&!q(t)&&!ho(t)?String(t):t,Vs=(e,t="")=>{var s;return ot(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
52
+ **/function an(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const he={},Dt=[],st=()=>{},po=()=>!1,Es=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),As=e=>e.startsWith("onUpdate:"),Ae=Object.assign,cn=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},yr=Object.prototype.hasOwnProperty,ce=(e,t)=>yr.call(e,t),Y=Array.isArray,Rt=e=>us(e)==="[object Map]",Bt=e=>us(e)==="[object Set]",In=e=>us(e)==="[object Date]",X=e=>typeof e=="function",ke=e=>typeof e=="string",ot=e=>typeof e=="symbol",fe=e=>e!==null&&typeof e=="object",mo=e=>(fe(e)||X(e))&&X(e.then)&&X(e.catch),ho=Object.prototype.toString,us=e=>ho.call(e),br=e=>us(e).slice(8,-1),xo=e=>us(e)==="[object Object]",un=e=>ke(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Zt=an(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Is=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},_r=/-\w/g,Re=Is(e=>e.replace(_r,t=>t.slice(1).toUpperCase())),wr=/\B([A-Z])/g,St=Is(e=>e.replace(wr,"-$1").toLowerCase()),Ps=Is(e=>e.charAt(0).toUpperCase()+e.slice(1)),Vs=Is(e=>e?`on${Ps(e)}`:""),tt=(e,t)=>!Object.is(e,t),gs=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},go=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Ms=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Pn;const Os=()=>Pn||(Pn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Lt(e){if(Y(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],o=ke(n)?$r(n):Lt(n);if(o)for(const l in o)t[l]=o[l]}return t}else if(ke(e)||fe(e))return e}const Sr=/;(?![^(]*\))/g,kr=/:([^]+)/,Cr=/\/\*[^]*?\*\//g;function $r(e){const t={};return e.replace(Cr,"").split(Sr).forEach(s=>{if(s){const n=s.split(kr);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Z(e){let t="";if(ke(e))t=e;else if(Y(e))for(let s=0;s<e.length;s++){const n=Z(e[s]);n&&(t+=n+" ")}else if(fe(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Tr="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Er=an(Tr);function vo(e){return!!e||e===""}function Ar(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=Wt(e[n],t[n]);return s}function Wt(e,t){if(e===t)return!0;let s=In(e),n=In(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=ot(e),n=ot(t),s||n)return e===t;if(s=Y(e),n=Y(t),s||n)return s&&n?Ar(e,t):!1;if(s=fe(e),n=fe(t),s||n){if(!s||!n)return!1;const o=Object.keys(e).length,l=Object.keys(t).length;if(o!==l)return!1;for(const a in e){const c=e.hasOwnProperty(a),u=t.hasOwnProperty(a);if(c&&!u||!c&&u||!Wt(e[a],t[a]))return!1}}return String(e)===String(t)}function dn(e,t){return e.findIndex(s=>Wt(s,t))}const yo=e=>!!(e&&e.__v_isRef===!0),b=e=>ke(e)?e:e==null?"":Y(e)||fe(e)&&(e.toString===ho||!X(e.toString))?yo(e)?b(e.value):JSON.stringify(e,bo,2):String(e),bo=(e,t)=>yo(t)?bo(e,t.value):Rt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,o],l)=>(s[Fs(n,l)+" =>"]=o,s),{})}:Bt(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Fs(s))}:ot(t)?Fs(t):fe(t)&&!Y(t)&&!xo(t)?String(t):t,Fs=(e,t="")=>{var s;return ot(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 Le;class Er{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=Le,!t&&Le&&(this.index=(Le.scopes||(Le.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=Le;try{return Le=this,t()}finally{Le=s}}}on(){++this._on===1&&(this.prevScope=Le,Le=this)}off(){this._on>0&&--this._on===0&&(Le=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 Pr(){return Le}let pe;const Us=new WeakSet;class bo{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,Le&&Le.active&&Le.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Us.has(this)&&(Us.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||wo(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Mn(this),So(this);const t=pe,s=ze;pe=this,ze=!0;try{return this.fn()}finally{Co(this),pe=t,ze=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)pn(t);this.deps=this.depsTail=void 0,Mn(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Us.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Gs(this)&&this.run()}get dirty(){return Gs(this)}}let _o=0,qt,Gt;function wo(e,t=!1){if(e.flags|=8,t){e.next=Gt,Gt=e;return}e.next=qt,qt=e}function dn(){_o++}function fn(){if(--_o>0)return;if(Gt){let t=Gt;for(Gt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;qt;){let t=qt;for(qt=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 So(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Co(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),pn(n),Mr(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function Gs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ko(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ko(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===es)||(e.globalVersion=es,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Gs(e))))return;e.flags|=2;const t=e.dep,s=pe,n=ze;pe=e,ze=!0;try{So(e);const o=e.fn(e._value);(t.version===0||tt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{pe=s,ze=n,Co(e),e.flags&=-3}}function pn(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)pn(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Mr(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let ze=!0;const To=[];function ft(){To.push(ze),ze=!1}function pt(){const e=To.pop();ze=e===void 0?!0:e}function Mn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=pe;pe=void 0;try{t()}finally{pe=s}}}let es=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 mn{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(!pe||!ze||pe===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==pe)s=this.activeLink=new Ir(pe,this),pe.deps?(s.prevDep=pe.depsTail,pe.depsTail.nextDep=s,pe.depsTail=s):pe.deps=pe.depsTail=s,$o(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=pe.depsTail,s.nextDep=void 0,pe.depsTail.nextDep=s,pe.depsTail=s,pe.deps===s&&(pe.deps=n)}return s}trigger(t){this.version++,es++,this.notify(t)}notify(t){dn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{fn()}}}function $o(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)$o(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Ys=new WeakMap,Tt=Symbol(""),Zs=Symbol(""),ts=Symbol("");function Pe(e,t,s){if(ze&&pe){let n=Ys.get(e);n||Ys.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new mn),o.map=n,o.key=s),o.track()}}function ct(e,t,s,n,o,r){const l=Ys.get(e);if(!l){es++;return}const a=c=>{c&&c.trigger()};if(dn(),t==="clear")l.forEach(a);else{const c=q(e),m=c&&cn(s);if(c&&s==="length"){const d=Number(n);l.forEach((p,x)=>{(x==="length"||x===ts||!ot(x)&&x>=d)&&a(p)})}else switch((s!==void 0||l.has(void 0))&&a(l.get(s)),m&&a(l.get(ts)),t){case"add":c?m&&a(l.get("length")):(a(l.get(Tt)),Ot(e)&&a(l.get(Zs)));break;case"delete":c||(a(l.get(Tt)),Ot(e)&&a(l.get(Zs)));break;case"set":Ot(e)&&a(l.get(Tt));break}}fn()}function Pt(e){const t=oe(e);return t===e?t:(Pe(t,"iterate",ts),Be(e)?t:t.map(Je))}function Is(e){return Pe(e=oe(e),"iterate",ts),e}function Xe(e,t){return mt(e)?jt($t(e)?Je(t):t):Je(t)}const Or={__proto__:null,[Symbol.iterator](){return Hs(this,Symbol.iterator,e=>Xe(this,e))},concat(...e){return Pt(this).concat(...e.map(t=>q(t)?Pt(t):t))},entries(){return Hs(this,"entries",e=>(e[1]=Xe(this,e[1]),e))},every(e,t){return it(this,"every",e,t,void 0,arguments)},filter(e,t){return it(this,"filter",e,t,s=>s.map(n=>Xe(this,n)),arguments)},find(e,t){return it(this,"find",e,t,s=>Xe(this,s),arguments)},findIndex(e,t){return it(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return it(this,"findLast",e,t,s=>Xe(this,s),arguments)},findLastIndex(e,t){return it(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return it(this,"forEach",e,t,void 0,arguments)},includes(...e){return Bs(this,"includes",e)},indexOf(...e){return Bs(this,"indexOf",e)},join(e){return Pt(this).join(e)},lastIndexOf(...e){return Bs(this,"lastIndexOf",e)},map(e,t){return it(this,"map",e,t,void 0,arguments)},pop(){return Ht(this,"pop")},push(...e){return Ht(this,"push",e)},reduce(e,...t){return In(this,"reduce",e,t)},reduceRight(e,...t){return In(this,"reduceRight",e,t)},shift(){return Ht(this,"shift")},some(e,t){return it(this,"some",e,t,void 0,arguments)},splice(...e){return Ht(this,"splice",e)},toReversed(){return Pt(this).toReversed()},toSorted(e){return Pt(this).toSorted(e)},toSpliced(...e){return Pt(this).toSpliced(...e)},unshift(...e){return Ht(this,"unshift",e)},values(){return Hs(this,"values",e=>Xe(this,e))}};function Hs(e,t,s){const n=Is(e),o=n[t]();return n!==e&&!Be(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=s(r.value)),r}),o}const Dr=Array.prototype;function it(e,t,s,n,o,r){const l=Is(e),a=l!==e&&!Be(e),c=l[t];if(c!==Dr[t]){const p=c.apply(e,r);return a?Je(p):p}let m=s;l!==e&&(a?m=function(p,x){return s.call(this,Xe(e,p),x,e)}:s.length>2&&(m=function(p,x){return s.call(this,p,x,e)}));const d=c.call(l,m,n);return a&&o?o(d):d}function In(e,t,s,n){const o=Is(e),r=o!==e&&!Be(e);let l=s,a=!1;o!==e&&(r?(a=n.length===0,l=function(m,d,p){return a&&(a=!1,m=Xe(e,m)),s.call(this,m,Xe(e,d),p,e)}):s.length>3&&(l=function(m,d,p){return s.call(this,m,d,p,e)}));const c=o[t](l,...n);return a?Xe(e,c):c}function Bs(e,t,s){const n=oe(e);Pe(n,"iterate",ts);const o=n[t](...s);return(o===-1||o===!1)&&vn(s[0])?(s[0]=oe(s[0]),n[t](...s)):o}function Ht(e,t,s=[]){ft(),dn();const n=oe(e)[t].apply(e,s);return fn(),pt(),n}const Rr=ln("__proto__,__v_isRef,__isVue"),Ao=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ot));function jr(e){ot(e)||(e=String(e));const t=oe(this);return Pe(t,"has",e),t.hasOwnProperty(e)}class Eo{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?zr:Oo:r?Io:Mo).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const l=q(t);if(!o){let c;if(l&&(c=Or[s]))return c;if(s==="hasOwnProperty")return jr}const a=Reflect.get(t,s,Ie(t)?t:n);if((ot(s)?Ao.has(s):Rr(s))||(o||Pe(t,"get",s),r))return a;if(Ie(a)){const c=l&&cn(s)?a:a.value;return o&&ce(c)?Xs(c):c}return ce(a)?o?Xs(a):gn(a):a}}class Po extends Eo{constructor(t=!1){super(!1,t)}set(t,s,n,o){let r=t[s];const l=q(t)&&cn(s);if(!this._isShallow){const m=mt(r);if(!Be(n)&&!mt(n)&&(r=oe(r),n=oe(n)),!l&&Ie(r)&&!Ie(n))return m||(r.value=n),!0}const a=l?Number(s)<t.length:re(t,s),c=Reflect.set(t,s,n,Ie(t)?t:o);return t===oe(o)&&(a?tt(n,r)&&ct(t,"set",s,n):ct(t,"add",s,n)),c}deleteProperty(t,s){const n=re(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&ct(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!ot(s)||!Ao.has(s))&&Pe(t,"has",s),n}ownKeys(t){return Pe(t,"iterate",q(t)?"length":Tt),Reflect.ownKeys(t)}}class Nr extends Eo{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const Lr=new Po,Fr=new Nr,Vr=new Po(!0);const Qs=e=>e,us=e=>Reflect.getPrototypeOf(e);function Ur(e,t,s){return function(...n){const o=this.__v_raw,r=oe(o),l=Ot(r),a=e==="entries"||e===Symbol.iterator&&l,c=e==="keys"&&l,m=o[e](...n),d=s?Qs:t?jt:Je;return!t&&Pe(r,"iterate",c?Zs:Tt),Ee(Object.create(m),{next(){const{value:p,done:x}=m.next();return x?{value:p,done:x}:{value:a?[d(p[0]),d(p[1])]:d(p),done:x}}})}}function ds(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,l=oe(r),a=oe(o);e||(tt(o,a)&&Pe(l,"get",o),Pe(l,"get",a));const{has:c}=us(l),m=t?Qs:e?jt:Je;if(c.call(l,o))return m(r.get(o));if(c.call(l,a))return m(r.get(a));r!==l&&r.get(o)},get size(){const o=this.__v_raw;return!e&&Pe(oe(o),"iterate",Tt),o.size},has(o){const r=this.__v_raw,l=oe(r),a=oe(o);return e||(tt(o,a)&&Pe(l,"has",o),Pe(l,"has",a)),o===a?r.has(o):r.has(o)||r.has(a)},forEach(o,r){const l=this,a=l.__v_raw,c=oe(a),m=t?Qs:e?jt:Je;return!e&&Pe(c,"iterate",Tt),a.forEach((d,p)=>o.call(r,m(d),m(p),l))}};return Ee(s,e?{add:ds("add"),set:ds("set"),delete:ds("delete"),clear:ds("clear")}:{add(o){const r=oe(this),l=us(r),a=oe(o),c=!t&&!Be(o)&&!mt(o)?a:o;return l.has.call(r,c)||tt(o,c)&&l.has.call(r,o)||tt(a,c)&&l.has.call(r,a)||(r.add(c),ct(r,"add",c,c)),this},set(o,r){!t&&!Be(r)&&!mt(r)&&(r=oe(r));const l=oe(this),{has:a,get:c}=us(l);let m=a.call(l,o);m||(o=oe(o),m=a.call(l,o));const d=c.call(l,o);return l.set(o,r),m?tt(r,d)&&ct(l,"set",o,r):ct(l,"add",o,r),this},delete(o){const r=oe(this),{has:l,get:a}=us(r);let c=l.call(r,o);c||(o=oe(o),c=l.call(r,o)),a&&a.call(r,o);const m=r.delete(o);return c&&ct(r,"delete",o,void 0),m},clear(){const o=oe(this),r=o.size!==0,l=o.clear();return r&&ct(o,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=Ur(o,e,t)}),s}function hn(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(re(s,o)&&o in n?s:n,o,r)}const Br={get:hn(!1,!1)},Wr={get:hn(!1,!0)},Kr={get:hn(!0,!1)};const Mo=new WeakMap,Io=new WeakMap,Oo=new WeakMap,zr=new WeakMap;function Jr(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function qr(e){return e.__v_skip||!Object.isExtensible(e)?0:Jr(yr(e))}function gn(e){return mt(e)?e:xn(e,!1,Lr,Br,Mo)}function Gr(e){return xn(e,!1,Vr,Wr,Io)}function Xs(e){return xn(e,!0,Fr,Kr,Oo)}function xn(e,t,s,n,o){if(!ce(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=qr(e);if(r===0)return e;const l=o.get(e);if(l)return l;const a=new Proxy(e,r===2?n:s);return o.set(e,a),a}function $t(e){return mt(e)?$t(e.__v_raw):!!(e&&e.__v_isReactive)}function mt(e){return!!(e&&e.__v_isReadonly)}function Be(e){return!!(e&&e.__v_isShallow)}function vn(e){return e?!!e.__v_raw:!1}function oe(e){const t=e&&e.__v_raw;return t?oe(t):e}function Yr(e){return!re(e,"__v_skip")&&Object.isExtensible(e)&&go(e,"__v_skip",!0),e}const Je=e=>ce(e)?gn(e):e,jt=e=>ce(e)?Xs(e):e;function Ie(e){return e?e.__v_isRef===!0:!1}function j(e){return Zr(e,!1)}function Zr(e,t){return Ie(e)?e:new Qr(e,t)}class Qr{constructor(t,s){this.dep=new mn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:oe(t),this._value=s?t:Je(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||Be(t)||mt(t);t=n?t:oe(t),tt(t,s)&&(this._rawValue=t,this._value=n?t:Je(t),this.dep.trigger())}}function Xr(e){return Ie(e)?e.value:e}const ei={get:(e,t,s)=>t==="__v_raw"?e:Xr(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 Do(e){return $t(e)?e:new Proxy(e,ei)}class ti{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new mn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=es-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&pe!==this)return wo(this,!0),!0}get value(){const t=this.dep.track();return ko(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function si(e,t,s=!1){let n,o;return Z(e)?n=e:(n=e.get,o=e.set),new ti(n,o,s)}const fs={},ys=new WeakMap;let kt;function ni(e,t=!1,s=kt){if(s){let n=ys.get(s);n||ys.set(s,n=[]),n.push(e)}}function oi(e,t,s=de){const{immediate:n,deep:o,once:r,scheduler:l,augmentJob:a,call:c}=s,m=U=>o?U:Be(U)||o===!1||o===0?ut(U,1):ut(U);let d,p,x,A,B=!1,$=!1;if(Ie(e)?(p=()=>e.value,B=Be(e)):$t(e)?(p=()=>m(e),B=!0):q(e)?($=!0,B=e.some(U=>$t(U)||Be(U)),p=()=>e.map(U=>{if(Ie(U))return U.value;if($t(U))return m(U);if(Z(U))return c?c(U,2):U()})):Z(e)?t?p=c?()=>c(e,2):e:p=()=>{if(x){ft();try{x()}finally{pt()}}const U=kt;kt=d;try{return c?c(e,3,[A]):e(A)}finally{kt=U}}:p=st,t&&o){const U=p,ee=o===!0?1/0:o;p=()=>ut(U(),ee)}const v=Pr(),P=()=>{d.stop(),v&&v.active&&an(v.effects,d)};if(r&&t){const U=t;t=(...ee)=>{U(...ee),P()}}let F=$?new Array(e.length).fill(fs):fs;const W=U=>{if(!(!(d.flags&1)||!d.dirty&&!U))if(t){const ee=d.run();if(o||B||($?ee.some((he,K)=>tt(he,F[K])):tt(ee,F))){x&&x();const he=kt;kt=d;try{const K=[ee,F===fs?void 0:$&&F[0]===fs?[]:F,A];F=ee,c?c(t,3,K):t(...K)}finally{kt=he}}}else d.run()};return a&&a(W),d=new bo(p),d.scheduler=l?()=>l(W,!1):W,A=U=>ni(U,!1,d),x=d.onStop=()=>{const U=ys.get(d);if(U){if(c)c(U,4);else for(const ee of U)ee();ys.delete(d)}},t?n?W(!0):F=d.run():l?l(W.bind(null,!0),!0):d.run(),P.pause=d.pause.bind(d),P.resume=d.resume.bind(d),P.stop=P,P}function ut(e,t=1/0,s){if(t<=0||!ce(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Ie(e))ut(e.value,t,s);else if(q(e))for(let n=0;n<e.length;n++)ut(e[n],t,s);else if(Ft(e)||Ot(e))e.forEach(n=>{ut(n,t,s)});else if(ho(e)){for(const n in e)ut(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&ut(e[n],t,s)}return e}/**
56
+ **/let Ne;class Ir{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 Pr(){return Ne}let ge;const Hs=new WeakSet;class _o{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,Hs.has(this)&&(Hs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||So(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Mn(this),ko(this);const t=ge,s=Ke;ge=this,Ke=!0;try{return this.fn()}finally{Co(this),ge=t,Ke=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)mn(t);this.deps=this.depsTail=void 0,Mn(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Hs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ys(this)&&this.run()}get dirty(){return Ys(this)}}let wo=0,Qt,Xt;function So(e,t=!1){if(e.flags|=8,t){e.next=Xt,Xt=e;return}e.next=Qt,Qt=e}function fn(){wo++}function pn(){if(--wo>0)return;if(Xt){let t=Xt;for(Xt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Qt;){let t=Qt;for(Qt=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 ko(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Co(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),mn(n),Mr(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function Ys(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&($o(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function $o(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===os)||(e.globalVersion=os,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ys(e))))return;e.flags|=2;const t=e.dep,s=ge,n=Ke;ge=e,Ke=!0;try{ko(e);const o=e.fn(e._value);(t.version===0||tt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{ge=s,Ke=n,Co(e),e.flags&=-3}}function mn(e,t=!1){const{dep:s,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let l=s.computed.deps;l;l=l.nextDep)mn(l,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Mr(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let Ke=!0;const To=[];function mt(){To.push(Ke),Ke=!1}function ht(){const e=To.pop();Ke=e===void 0?!0:e}function Mn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=ge;ge=void 0;try{t()}finally{ge=s}}}let os=0;class Or{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 hn{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(!ge||!Ke||ge===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==ge)s=this.activeLink=new Or(ge,this),ge.deps?(s.prevDep=ge.depsTail,ge.depsTail.nextDep=s,ge.depsTail=s):ge.deps=ge.depsTail=s,Eo(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=ge.depsTail,s.nextDep=void 0,ge.depsTail.nextDep=s,ge.depsTail=s,ge.deps===s&&(ge.deps=n)}return s}trigger(t){this.version++,os++,this.notify(t)}notify(t){fn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{pn()}}}function Eo(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)Eo(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Zs=new WeakMap,Et=Symbol(""),Qs=Symbol(""),rs=Symbol("");function Ie(e,t,s){if(Ke&&ge){let n=Zs.get(e);n||Zs.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new hn),o.map=n,o.key=s),o.track()}}function dt(e,t,s,n,o,l){const a=Zs.get(e);if(!a){os++;return}const c=u=>{u&&u.trigger()};if(fn(),t==="clear")a.forEach(c);else{const u=Y(e),h=u&&un(s);if(u&&s==="length"){const d=Number(n);a.forEach((p,y)=>{(y==="length"||y===rs||!ot(y)&&y>=d)&&c(p)})}else switch((s!==void 0||a.has(void 0))&&c(a.get(s)),h&&c(a.get(rs)),t){case"add":u?h&&c(a.get("length")):(c(a.get(Et)),Rt(e)&&c(a.get(Qs)));break;case"delete":u||(c(a.get(Et)),Rt(e)&&c(a.get(Qs)));break;case"set":Rt(e)&&c(a.get(Et));break}}pn()}function Pt(e){const t=ae(e);return t===e?t:(Ie(t,"iterate",rs),He(e)?t:t.map(ze))}function Ds(e){return Ie(e=ae(e),"iterate",rs),e}function Xe(e,t){return xt(e)?Ut(At(e)?ze(t):t):ze(t)}const Dr={__proto__:null,[Symbol.iterator](){return Bs(this,Symbol.iterator,e=>Xe(this,e))},concat(...e){return Pt(this).concat(...e.map(t=>Y(t)?Pt(t):t))},entries(){return Bs(this,"entries",e=>(e[1]=Xe(this,e[1]),e))},every(e,t){return at(this,"every",e,t,void 0,arguments)},filter(e,t){return at(this,"filter",e,t,s=>s.map(n=>Xe(this,n)),arguments)},find(e,t){return at(this,"find",e,t,s=>Xe(this,s),arguments)},findIndex(e,t){return at(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return at(this,"findLast",e,t,s=>Xe(this,s),arguments)},findLastIndex(e,t){return at(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return at(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ws(this,"includes",e)},indexOf(...e){return Ws(this,"indexOf",e)},join(e){return Pt(this).join(e)},lastIndexOf(...e){return Ws(this,"lastIndexOf",e)},map(e,t){return at(this,"map",e,t,void 0,arguments)},pop(){return zt(this,"pop")},push(...e){return zt(this,"push",e)},reduce(e,...t){return On(this,"reduce",e,t)},reduceRight(e,...t){return On(this,"reduceRight",e,t)},shift(){return zt(this,"shift")},some(e,t){return at(this,"some",e,t,void 0,arguments)},splice(...e){return zt(this,"splice",e)},toReversed(){return Pt(this).toReversed()},toSorted(e){return Pt(this).toSorted(e)},toSpliced(...e){return Pt(this).toSpliced(...e)},unshift(...e){return zt(this,"unshift",e)},values(){return Bs(this,"values",e=>Xe(this,e))}};function Bs(e,t,s){const n=Ds(e),o=n[t]();return n!==e&&!He(e)&&(o._next=o.next,o.next=()=>{const l=o._next();return l.done||(l.value=s(l.value)),l}),o}const Rr=Array.prototype;function at(e,t,s,n,o,l){const a=Ds(e),c=a!==e&&!He(e),u=a[t];if(u!==Rr[t]){const p=u.apply(e,l);return c?ze(p):p}let h=s;a!==e&&(c?h=function(p,y){return s.call(this,Xe(e,p),y,e)}:s.length>2&&(h=function(p,y){return s.call(this,p,y,e)}));const d=u.call(a,h,n);return c&&o?o(d):d}function On(e,t,s,n){const o=Ds(e),l=o!==e&&!He(e);let a=s,c=!1;o!==e&&(l?(c=n.length===0,a=function(h,d,p){return c&&(c=!1,h=Xe(e,h)),s.call(this,h,Xe(e,d),p,e)}):s.length>3&&(a=function(h,d,p){return s.call(this,h,d,p,e)}));const u=o[t](a,...n);return c?Xe(e,u):u}function Ws(e,t,s){const n=ae(e);Ie(n,"iterate",rs);const o=n[t](...s);return(o===-1||o===!1)&&yn(s[0])?(s[0]=ae(s[0]),n[t](...s)):o}function zt(e,t,s=[]){mt(),fn();const n=ae(e)[t].apply(e,s);return pn(),ht(),n}const jr=an("__proto__,__v_isRef,__isVue"),Ao=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ot));function Nr(e){ot(e)||(e=String(e));const t=ae(this);return Ie(t,"has",e),t.hasOwnProperty(e)}class Io{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const o=this._isReadonly,l=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return l;if(s==="__v_raw")return n===(o?l?Jr:Do:l?Oo:Mo).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const a=Y(t);if(!o){let u;if(a&&(u=Dr[s]))return u;if(s==="hasOwnProperty")return Nr}const c=Reflect.get(t,s,Me(t)?t:n);if((ot(s)?Ao.has(s):jr(s))||(o||Ie(t,"get",s),l))return c;if(Me(c)){const u=a&&un(s)?c:c.value;return o&&fe(u)?en(u):u}return fe(c)?o?en(c):gn(c):c}}class Po extends Io{constructor(t=!1){super(!1,t)}set(t,s,n,o){let l=t[s];const a=Y(t)&&un(s);if(!this._isShallow){const h=xt(l);if(!He(n)&&!xt(n)&&(l=ae(l),n=ae(n)),!a&&Me(l)&&!Me(n))return h||(l.value=n),!0}const c=a?Number(s)<t.length:ce(t,s),u=Reflect.set(t,s,n,Me(t)?t:o);return t===ae(o)&&(c?tt(n,l)&&dt(t,"set",s,n):dt(t,"add",s,n)),u}deleteProperty(t,s){const n=ce(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&dt(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!ot(s)||!Ao.has(s))&&Ie(t,"has",s),n}ownKeys(t){return Ie(t,"iterate",Y(t)?"length":Et),Reflect.ownKeys(t)}}class Lr extends Io{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const Ur=new Po,Vr=new Lr,Fr=new Po(!0);const Xs=e=>e,ps=e=>Reflect.getPrototypeOf(e);function Hr(e,t,s){return function(...n){const o=this.__v_raw,l=ae(o),a=Rt(l),c=e==="entries"||e===Symbol.iterator&&a,u=e==="keys"&&a,h=o[e](...n),d=s?Xs:t?Ut:ze;return!t&&Ie(l,"iterate",u?Qs:Et),Ae(Object.create(h),{next(){const{value:p,done:y}=h.next();return y?{value:p,done:y}:{value:c?[d(p[0]),d(p[1])]:d(p),done:y}}})}}function ms(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Br(e,t){const s={get(o){const l=this.__v_raw,a=ae(l),c=ae(o);e||(tt(o,c)&&Ie(a,"get",o),Ie(a,"get",c));const{has:u}=ps(a),h=t?Xs:e?Ut:ze;if(u.call(a,o))return h(l.get(o));if(u.call(a,c))return h(l.get(c));l!==a&&l.get(o)},get size(){const o=this.__v_raw;return!e&&Ie(ae(o),"iterate",Et),o.size},has(o){const l=this.__v_raw,a=ae(l),c=ae(o);return e||(tt(o,c)&&Ie(a,"has",o),Ie(a,"has",c)),o===c?l.has(o):l.has(o)||l.has(c)},forEach(o,l){const a=this,c=a.__v_raw,u=ae(c),h=t?Xs:e?Ut:ze;return!e&&Ie(u,"iterate",Et),c.forEach((d,p)=>o.call(l,h(d),h(p),a))}};return Ae(s,e?{add:ms("add"),set:ms("set"),delete:ms("delete"),clear:ms("clear")}:{add(o){const l=ae(this),a=ps(l),c=ae(o),u=!t&&!He(o)&&!xt(o)?c:o;return a.has.call(l,u)||tt(o,u)&&a.has.call(l,o)||tt(c,u)&&a.has.call(l,c)||(l.add(u),dt(l,"add",u,u)),this},set(o,l){!t&&!He(l)&&!xt(l)&&(l=ae(l));const a=ae(this),{has:c,get:u}=ps(a);let h=c.call(a,o);h||(o=ae(o),h=c.call(a,o));const d=u.call(a,o);return a.set(o,l),h?tt(l,d)&&dt(a,"set",o,l):dt(a,"add",o,l),this},delete(o){const l=ae(this),{has:a,get:c}=ps(l);let u=a.call(l,o);u||(o=ae(o),u=a.call(l,o)),c&&c.call(l,o);const h=l.delete(o);return u&&dt(l,"delete",o,void 0),h},clear(){const o=ae(this),l=o.size!==0,a=o.clear();return l&&dt(o,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=Hr(o,e,t)}),s}function xn(e,t){const s=Br(e,t);return(n,o,l)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(ce(s,o)&&o in n?s:n,o,l)}const Wr={get:xn(!1,!1)},Kr={get:xn(!1,!0)},zr={get:xn(!0,!1)};const Mo=new WeakMap,Oo=new WeakMap,Do=new WeakMap,Jr=new WeakMap;function qr(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Gr(e){return e.__v_skip||!Object.isExtensible(e)?0:qr(br(e))}function gn(e){return xt(e)?e:vn(e,!1,Ur,Wr,Mo)}function Yr(e){return vn(e,!1,Fr,Kr,Oo)}function en(e){return vn(e,!0,Vr,zr,Do)}function vn(e,t,s,n,o){if(!fe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const l=Gr(e);if(l===0)return e;const a=o.get(e);if(a)return a;const c=new Proxy(e,l===2?n:s);return o.set(e,c),c}function At(e){return xt(e)?At(e.__v_raw):!!(e&&e.__v_isReactive)}function xt(e){return!!(e&&e.__v_isReadonly)}function He(e){return!!(e&&e.__v_isShallow)}function yn(e){return e?!!e.__v_raw:!1}function ae(e){const t=e&&e.__v_raw;return t?ae(t):e}function Zr(e){return!ce(e,"__v_skip")&&Object.isExtensible(e)&&go(e,"__v_skip",!0),e}const ze=e=>fe(e)?gn(e):e,Ut=e=>fe(e)?en(e):e;function Me(e){return e?e.__v_isRef===!0:!1}function T(e){return Qr(e,!1)}function Qr(e,t){return Me(e)?e:new Xr(e,t)}class Xr{constructor(t,s){this.dep=new hn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:ae(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||He(t)||xt(t);t=n?t:ae(t),tt(t,s)&&(this._rawValue=t,this._value=n?t:ze(t),this.dep.trigger())}}function el(e){return Me(e)?e.value:e}const tl={get:(e,t,s)=>t==="__v_raw"?e:el(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return Me(o)&&!Me(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function Ro(e){return At(e)?e:new Proxy(e,tl)}class sl{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new hn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=os-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&ge!==this)return So(this,!0),!0}get value(){const t=this.dep.track();return $o(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function nl(e,t,s=!1){let n,o;return X(e)?n=e:(n=e.get,o=e.set),new sl(n,o,s)}const hs={},ws=new WeakMap;let Tt;function ol(e,t=!1,s=Tt){if(s){let n=ws.get(s);n||ws.set(s,n=[]),n.push(e)}}function rl(e,t,s=he){const{immediate:n,deep:o,once:l,scheduler:a,augmentJob:c,call:u}=s,h=V=>o?V:He(V)||o===!1||o===0?ft(V,1):ft(V);let d,p,y,A,W=!1,C=!1;if(Me(e)?(p=()=>e.value,W=He(e)):At(e)?(p=()=>h(e),W=!0):Y(e)?(C=!0,W=e.some(V=>At(V)||He(V)),p=()=>e.map(V=>{if(Me(V))return V.value;if(At(V))return h(V);if(X(V))return u?u(V,2):V()})):X(e)?t?p=u?()=>u(e,2):e:p=()=>{if(y){mt();try{y()}finally{ht()}}const V=Tt;Tt=d;try{return u?u(e,3,[A]):e(A)}finally{Tt=V}}:p=st,t&&o){const V=p,se=o===!0?1/0:o;p=()=>ft(V(),se)}const S=Pr(),_=()=>{d.stop(),S&&S.active&&cn(S.effects,d)};if(l&&t){const V=t;t=(...se)=>{V(...se),_()}}let I=C?new Array(e.length).fill(hs):hs;const U=V=>{if(!(!(d.flags&1)||!d.dirty&&!V))if(t){const se=d.run();if(o||W||(C?se.some((oe,K)=>tt(oe,I[K])):tt(se,I))){y&&y();const oe=Tt;Tt=d;try{const K=[se,I===hs?void 0:C&&I[0]===hs?[]:I,A];I=se,u?u(t,3,K):t(...K)}finally{Tt=oe}}}else d.run()};return c&&c(U),d=new _o(p),d.scheduler=a?()=>a(U,!1):U,A=V=>ol(V,!1,d),y=d.onStop=()=>{const V=ws.get(d);if(V){if(u)u(V,4);else for(const se of V)se();ws.delete(d)}},t?n?U(!0):I=d.run():a?a(U.bind(null,!0),!0):d.run(),_.pause=d.pause.bind(d),_.resume=d.resume.bind(d),_.stop=_,_}function ft(e,t=1/0,s){if(t<=0||!fe(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Me(e))ft(e.value,t,s);else if(Y(e))for(let n=0;n<e.length;n++)ft(e[n],t,s);else if(Bt(e)||Rt(e))e.forEach(n=>{ft(n,t,s)});else if(xo(e)){for(const n in e)ft(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&ft(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 as(e,t,s,n){try{return n?e(...n):e()}catch(o){Os(o,t,s)}}function rt(e,t,s,n){if(Z(e)){const o=as(e,t,s,n);return o&&po(o)&&o.catch(r=>{Os(r,t,s)}),o}if(q(e)){const o=[];for(let r=0;r<e.length;r++)o.push(rt(e[r],t,s,n));return o}}function Os(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||de;if(t){let a=t.parent;const c=t.proxy,m=`https://vuejs.org/error-reference/#runtime-${s}`;for(;a;){const d=a.ec;if(d){for(let p=0;p<d.length;p++)if(d[p](e,c,m)===!1)return}a=a.parent}if(r){ft(),as(r,null,10,[e,c,m]),pt();return}}ri(e,s,o,n,l)}function ri(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const Re=[];let Qe=-1;const Dt=[];let vt=null,Mt=0;const Ro=Promise.resolve();let bs=null;function jo(e){const t=bs||Ro;return e?t.then(this?e.bind(this):e):t}function ii(e){let t=Qe+1,s=Re.length;for(;t<s;){const n=t+s>>>1,o=Re[n],r=ss(o);r<e||r===e&&o.flags&2?t=n+1:s=n}return t}function yn(e){if(!(e.flags&1)){const t=ss(e),s=Re[Re.length-1];!s||!(e.flags&2)&&t>=ss(s)?Re.push(e):Re.splice(ii(t),0,e),e.flags|=1,No()}}function No(){bs||(bs=Ro.then(Fo))}function li(e){q(e)?Dt.push(...e):vt&&e.id===-1?vt.splice(Mt+1,0,e):e.flags&1||(Dt.push(e),e.flags|=1),No()}function On(e,t,s=Qe+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 Lo(e){if(Dt.length){const t=[...new Set(Dt)].sort((s,n)=>ss(s)-ss(n));if(Dt.length=0,vt){vt.push(...t);return}for(vt=t,Mt=0;Mt<vt.length;Mt++){const s=vt[Mt];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}vt=null,Mt=0}}const ss=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Fo(e){try{for(Qe=0;Qe<Re.length;Qe++){const t=Re[Qe];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),as(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Qe<Re.length;Qe++){const t=Re[Qe];t&&(t.flags&=-2)}Qe=-1,Re.length=0,Lo(),bs=null,(Re.length||Dt.length)&&Fo()}}let Ve=null,Vo=null;function _s(e){const t=Ve;return Ve=e,Vo=e&&e.type.__scopeId||null,t}function ai(e,t=Ve,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&Kn(-1);const r=_s(t);let l;try{l=e(...o)}finally{_s(r),n._d&&Kn(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function le(e,t){if(Ve===null)return e;const s=Ns(Ve),n=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,l,a,c=de]=t[o];r&&(Z(r)&&(r={mounted:r,updated:r}),r.deep&&ut(l),n.push({dir:r,instance:s,value:l,oldValue:void 0,arg:a,modifiers:c}))}return e}function St(e,t,s,n){const o=e.dirs,r=t&&t.dirs;for(let l=0;l<o.length;l++){const a=o[l];r&&(a.oldValue=r[l].value);let c=a.dir[n];c&&(ft(),rt(c,s,8,[e.el,a,e,t]),pt())}}function ci(e,t){if(Me){let s=Me.provides;const n=Me.parent&&Me.parent.provides;n===s&&(s=Me.provides=Object.create(n)),s[e]=t}}function hs(e,t,s=!1){const n=cl();if(n||Rt){let o=Rt?Rt._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&&Z(t)?t.call(n&&n.proxy):t}}const ui=Symbol.for("v-scx"),di=()=>hs(ui);function Ws(e,t,s){return Uo(e,t,s)}function Uo(e,t,s=de){const{immediate:n,deep:o,flush:r,once:l}=s,a=Ee({},s),c=t&&n||!t&&r!=="post";let m;if(os){if(r==="sync"){const A=di();m=A.__watcherHandles||(A.__watcherHandles=[])}else if(!c){const A=()=>{};return A.stop=st,A.resume=st,A.pause=st,A}}const d=Me;a.call=(A,B,$)=>rt(A,d,B,$);let p=!1;r==="post"?a.scheduler=A=>{Ne(A,d&&d.suspense)}:r!=="sync"&&(p=!0,a.scheduler=(A,B)=>{B?A():yn(A)}),a.augmentJob=A=>{t&&(A.flags|=4),p&&(A.flags|=2,d&&(A.id=d.uid,A.i=d))};const x=oi(e,t,a);return os&&(m?m.push(x):c&&x()),x}function fi(e,t,s){const n=this.proxy,o=be(e)?e.includes(".")?Ho(n,e):()=>n[e]:e.bind(n,n);let r;Z(t)?r=t:(r=t.handler,s=t);const l=cs(this),a=Uo(o,r.bind(n),s);return l(),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 pi=Symbol("_vte"),mi=e=>e.__isTeleport,hi=Symbol("_leaveCb");function bn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,bn(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 At(e,t){return Z(e)?Ee({name:e.name},t,{setup:e}):e}function Bo(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Dn(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const ws=new WeakMap;function Yt(e,t,s,n,o=!1){if(q(e)){e.forEach(($,v)=>Yt($,t&&(q(t)?t[v]:t),s,n,o));return}if(Zt(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Yt(e,t,s,n.component.subTree);return}const r=n.shapeFlag&4?Ns(n.component):n.el,l=o?null:r,{i:a,r:c}=e,m=t&&t.r,d=a.refs===de?a.refs={}:a.refs,p=a.setupState,x=oe(p),A=p===de?fo:$=>Dn(d,$)?!1:re(x,$),B=($,v)=>!(v&&Dn(d,v));if(m!=null&&m!==c){if(Rn(t),be(m))d[m]=null,A(m)&&(p[m]=null);else if(Ie(m)){const $=t;B(m,$.k)&&(m.value=null),$.k&&(d[$.k]=null)}}if(Z(c))as(c,a,12,[l,d]);else{const $=be(c),v=Ie(c);if($||v){const P=()=>{if(e.f){const F=$?A(c)?p[c]:d[c]:B()||!e.k?c.value:d[e.k];if(o)q(F)&&an(F,r);else if(q(F))F.includes(r)||F.push(r);else if($)d[c]=[r],A(c)&&(p[c]=d[c]);else{const W=[r];B(c,e.k)&&(c.value=W),e.k&&(d[e.k]=W)}}else $?(d[c]=l,A(c)&&(p[c]=l)):v&&(B(c,e.k)&&(c.value=l),e.k&&(d[e.k]=l))};if(l){const F=()=>{P(),ws.delete(e)};F.id=-1,ws.set(e,F),Ne(F,s)}else Rn(e),P()}}}function Rn(e){const t=ws.get(e);t&&(t.flags|=8,ws.delete(e))}Ps().requestIdleCallback;Ps().cancelIdleCallback;const Zt=e=>!!e.type.__asyncLoader,Wo=e=>e.type.__isKeepAlive;function gi(e,t){Ko(e,"a",t)}function xi(e,t){Ko(e,"da",t)}function Ko(e,t,s=Me){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Ds(t,n,s),s){let o=s.parent;for(;o&&o.parent;)Wo(o.parent.vnode)&&vi(n,t,s,o),o=o.parent}}function vi(e,t,s,n){const o=Ds(t,e,n,!0);_n(()=>{an(n[t],o)},s)}function Ds(e,t,s=Me,n=!1){if(s){const o=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...l)=>{ft();const a=cs(s),c=rt(t,s,e,l);return a(),pt(),c});return n?o.unshift(r):o.push(r),r}}const ht=e=>(t,s=Me)=>{(!os||e==="sp")&&Ds(e,(...n)=>t(...n),s)},yi=ht("bm"),wt=ht("m"),bi=ht("bu"),_i=ht("u"),wi=ht("bum"),_n=ht("um"),Si=ht("sp"),Ci=ht("rtg"),ki=ht("rtc");function Ti(e,t=Me){Ds("ec",e,t)}const $i="components",zo=Symbol.for("v-ndc");function Ai(e){return be(e)?Ei($i,e,!1)||e:e||zo}function Ei(e,t,s=!0,n=!1){const o=Ve||Me;if(o){const r=o.type;{const a=ml(r,!1);if(a&&(a===t||a===je(t)||a===As(je(t))))return r}const l=jn(o[e]||r[e],t)||jn(o.appContext[e],t);return!l&&n?r:l}}function jn(e,t){return e&&(e[t]||e[je(t)]||e[As(je(t))])}function Ce(e,t,s,n){let o;const r=s,l=q(e);if(l||be(e)){const a=l&&$t(e);let c=!1,m=!1;a&&(c=!Be(e),m=mt(e),e=Is(e)),o=new Array(e.length);for(let d=0,p=e.length;d<p;d++)o[d]=t(c?m?jt(Je(e[d])):Je(e[d]):e[d],d,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(ce(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,m=a.length;c<m;c++){const d=a[c];o[c]=t(e[d],d,c,r)}}else o=[];return o}const en=e=>e?mr(e)?Ns(e):en(e.parent):null,Qt=Ee(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=>en(e.parent),$root:e=>en(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>qo(e),$forceUpdate:e=>e.f||(e.f=()=>{yn(e.update)}),$nextTick:e=>e.n||(e.n=jo.bind(e.proxy)),$watch:e=>fi.bind(e)}),Ks=(e,t)=>e!==de&&!e.__isScriptSetup&&re(e,t),Pi={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:r,accessCache:l,type:a,appContext:c}=e;if(t[0]!=="$"){const x=l[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(Ks(n,t))return l[t]=1,n[t];if(o!==de&&re(o,t))return l[t]=2,o[t];if(re(r,t))return l[t]=3,r[t];if(s!==de&&re(s,t))return l[t]=4,s[t];tn&&(l[t]=0)}}const m=Qt[t];let d,p;if(m)return t==="$attrs"&&Pe(e.attrs,"get",""),m(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(s!==de&&re(s,t))return l[t]=4,s[t];if(p=c.config.globalProperties,re(p,t))return p[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:r}=e;return Ks(o,t)?(o[t]=s,!0):n!==de&&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:l}},a){let c;return!!(s[a]||e!==de&&a[0]!=="$"&&re(e,a)||Ks(t,a)||re(r,a)||re(n,a)||re(Qt,a)||re(o.config.globalProperties,a)||(c=l.__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 Nn(e){return q(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let tn=!0;function Mi(e){const t=qo(e),s=e.proxy,n=e.ctx;tn=!1,t.beforeCreate&&Ln(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:l,watch:a,provide:c,inject:m,created:d,beforeMount:p,mounted:x,beforeUpdate:A,updated:B,activated:$,deactivated:v,beforeDestroy:P,beforeUnmount:F,destroyed:W,unmounted:U,render:ee,renderTracked:he,renderTriggered:K,errorCaptured:I,serverPrefetch:J,expose:me,inheritAttrs:se,components:Te,directives:$e,filters:gt}=t;if(m&&Ii(m,n,null),l)for(const ae in l){const X=l[ae];Z(X)&&(n[ae]=X.bind(s))}if(o){const ae=o.call(s,s);ce(ae)&&(e.data=gn(ae))}if(tn=!0,r)for(const ae in r){const X=r[ae],V=Z(X)?X.bind(s,s):Z(X.get)?X.get.bind(s,s):st,E=!Z(X)&&Z(X.set)?X.set.bind(s):st,ye=Ke({get:V,set:E});Object.defineProperty(n,ae,{enumerable:!0,configurable:!0,get:()=>ye.value,set:ge=>ye.value=ge})}if(a)for(const ae in a)Jo(a[ae],n,s,ae);if(c){const ae=Z(c)?c.call(s):c;Reflect.ownKeys(ae).forEach(X=>{ci(X,ae[X])})}d&&Ln(d,e,"c");function _e(ae,X){q(X)?X.forEach(V=>ae(V.bind(s))):X&&ae(X.bind(s))}if(_e(yi,p),_e(wt,x),_e(bi,A),_e(_i,B),_e(gi,$),_e(xi,v),_e(Ti,I),_e(ki,he),_e(Ci,K),_e(wi,F),_e(_n,U),_e(Si,J),q(me))if(me.length){const ae=e.exposed||(e.exposed={});me.forEach(X=>{Object.defineProperty(ae,X,{get:()=>s[X],set:V=>s[X]=V,enumerable:!0})})}else e.exposed||(e.exposed={});ee&&e.render===st&&(e.render=ee),se!=null&&(e.inheritAttrs=se),Te&&(e.components=Te),$e&&(e.directives=$e),J&&Bo(e)}function Ii(e,t,s=st){q(e)&&(e=sn(e));for(const n in e){const o=e[n];let r;ce(o)?"default"in o?r=hs(o.from||n,o.default,!0):r=hs(o.from||n):r=hs(o),Ie(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:l=>r.value=l}):t[n]=r}}function Ln(e,t,s){rt(q(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Jo(e,t,s,n){let o=n.includes(".")?Ho(s,n):()=>s[n];if(be(e)){const r=t[e];Z(r)&&Ws(o,r)}else if(Z(e))Ws(o,e.bind(s));else if(ce(e))if(q(e))e.forEach(r=>Jo(r,t,s,n));else{const r=Z(e.handler)?e.handler.bind(s):t[e.handler];Z(r)&&Ws(o,r,e)}}function qo(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:l}}=e.appContext,a=r.get(t);let c;return a?c=a:!o.length&&!s&&!n?c=t:(c={},o.length&&o.forEach(m=>Ss(c,m,l,!0)),Ss(c,t,l)),ce(t)&&r.set(t,c),c}function Ss(e,t,s,n=!1){const{mixins:o,extends:r}=t;r&&Ss(e,r,s,!0),o&&o.forEach(l=>Ss(e,l,s,!0));for(const l in t)if(!(n&&l==="expose")){const a=Oi[l]||s&&s[l];e[l]=a?a(e[l],t[l]):t[l]}return e}const Oi={data:Fn,props:Vn,emits:Vn,methods:Kt,computed:Kt,beforeCreate:De,created:De,beforeMount:De,mounted:De,beforeUpdate:De,updated:De,beforeDestroy:De,beforeUnmount:De,destroyed:De,unmounted:De,activated:De,deactivated:De,errorCaptured:De,serverPrefetch:De,components:Kt,directives:Kt,watch:Ri,provide:Fn,inject:Di};function Fn(e,t){return t?e?function(){return Ee(Z(e)?e.call(this,this):e,Z(t)?t.call(this,this):t)}:t:e}function Di(e,t){return Kt(sn(e),sn(t))}function sn(e){if(q(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function De(e,t){return e?[...new Set([].concat(e,t))]:t}function Kt(e,t){return e?Ee(Object.create(null),e,t):t}function Vn(e,t){return e?q(e)&&q(t)?[...new Set([...e,...t])]:Ee(Object.create(null),Nn(e),Nn(t??{})):t}function Ri(e,t){if(!e)return t;if(!t)return e;const s=Ee(Object.create(null),e);for(const n in t)s[n]=De(e[n],t[n]);return s}function Go(){return{app:null,config:{isNativeTag:fo,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 ji=0;function Ni(e,t){return function(n,o=null){Z(n)||(n=Ee({},n)),o!=null&&!ce(o)&&(o=null);const r=Go(),l=new WeakSet,a=[];let c=!1;const m=r.app={_uid:ji++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:gl,get config(){return r.config},set config(d){},use(d,...p){return l.has(d)||(d&&Z(d.install)?(l.add(d),d.install(m,...p)):Z(d)&&(l.add(d),d(m,...p))),m},mixin(d){return r.mixins.includes(d)||r.mixins.push(d),m},component(d,p){return p?(r.components[d]=p,m):r.components[d]},directive(d,p){return p?(r.directives[d]=p,m):r.directives[d]},mount(d,p,x){if(!c){const A=m._ceVNode||nt(n,o);return A.appContext=r,x===!0?x="svg":x===!1&&(x=void 0),e(A,d,x),c=!0,m._container=d,d.__vue_app__=m,Ns(A.component)}},onUnmount(d){a.push(d)},unmount(){c&&(rt(a,m._instance,16),e(null,m._container),delete m._container.__vue_app__)},provide(d,p){return r.provides[d]=p,m},runWithContext(d){const p=Rt;Rt=m;try{return d()}finally{Rt=p}}};return m}}let Rt=null;const Li=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${je(t)}Modifiers`]||e[`${_t(t)}Modifiers`];function Fi(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||de;let o=s;const r=t.startsWith("update:"),l=r&&Li(n,t.slice(7));l&&(l.trim&&(o=s.map(d=>be(d)?d.trim():d)),l.number&&(o=s.map(Es)));let a,c=n[a=Fs(t)]||n[a=Fs(je(t))];!c&&r&&(c=n[a=Fs(_t(t))]),c&&rt(c,e,6,o);const m=n[a+"Once"];if(m){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,rt(m,e,6,o)}}const Vi=new WeakMap;function Yo(e,t,s=!1){const n=s?Vi:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const r=e.emits;let l={},a=!1;if(!Z(e)){const c=m=>{const d=Yo(m,t,!0);d&&(a=!0,Ee(l,d))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!a?(ce(e)&&n.set(e,null),null):(q(r)?r.forEach(c=>l[c]=null):Ee(l,r),ce(e)&&n.set(e,l),l)}function Rs(e,t){return!e||!ks(t)?!1:(t=t.slice(2).replace(/Once$/,""),re(e,t[0].toLowerCase()+t.slice(1))||re(e,_t(t))||re(e,t))}function Un(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[r],slots:l,attrs:a,emit:c,render:m,renderCache:d,props:p,data:x,setupState:A,ctx:B,inheritAttrs:$}=e,v=_s(e);let P,F;try{if(s.shapeFlag&4){const U=o||n,ee=U;P=et(m.call(ee,U,d,p,A,x,B)),F=a}else{const U=t;P=et(U.length>1?U(p,{attrs:a,slots:l,emit:c}):U(p,null)),F=t.props?a:Ui(a)}}catch(U){Xt.length=0,Os(U,e,1),P=nt(bt)}let W=P;if(F&&$!==!1){const U=Object.keys(F),{shapeFlag:ee}=W;U.length&&ee&7&&(r&&U.some(Ts)&&(F=Hi(F,r)),W=Nt(W,F,!1,!0))}return s.dirs&&(W=Nt(W,null,!1,!0),W.dirs=W.dirs?W.dirs.concat(s.dirs):s.dirs),s.transition&&bn(W,s.transition),P=W,_s(v),P}const Ui=e=>{let t;for(const s in e)(s==="class"||s==="style"||ks(s))&&((t||(t={}))[s]=e[s]);return t},Hi=(e,t)=>{const s={};for(const n in e)(!Ts(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Bi(e,t,s){const{props:n,children:o,component:r}=e,{props:l,children:a,patchFlag:c}=t,m=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,l,m):!!l;if(c&8){const d=t.dynamicProps;for(let p=0;p<d.length;p++){const x=d[p];if(Zo(l,n,x)&&!Rs(m,x))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:n===l?!1:n?l?Hn(n,l,m):!0:!!l;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(Zo(t,e,r)&&!Rs(s,r))return!0}return!1}function Zo(e,t,s){const n=e[s],o=t[s];return s==="style"&&ce(n)&&ce(o)?!Vt(n,o):n!==o}function Wi({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 Qo={},Xo=()=>Object.create(Qo),er=e=>Object.getPrototypeOf(e)===Qo;function Ki(e,t,s,n=!1){const o={},r=Xo();e.propsDefaults=Object.create(null),tr(e,t,o,r);for(const l in e.propsOptions[0])l in o||(o[l]=void 0);s?e.props=n?o:Gr(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function zi(e,t,s,n){const{props:o,attrs:r,vnode:{patchFlag:l}}=e,a=oe(o),[c]=e.propsOptions;let m=!1;if((n||l>0)&&!(l&16)){if(l&8){const d=e.vnode.dynamicProps;for(let p=0;p<d.length;p++){let x=d[p];if(Rs(e.emitsOptions,x))continue;const A=t[x];if(c)if(re(r,x))A!==r[x]&&(r[x]=A,m=!0);else{const B=je(x);o[B]=nn(c,a,B,A,e,!1)}else A!==r[x]&&(r[x]=A,m=!0)}}}else{tr(e,t,o,r)&&(m=!0);let d;for(const p in a)(!t||!re(t,p)&&((d=_t(p))===p||!re(t,d)))&&(c?s&&(s[p]!==void 0||s[d]!==void 0)&&(o[p]=nn(c,a,p,void 0,e,!0)):delete o[p]);if(r!==a)for(const p in r)(!t||!re(t,p))&&(delete r[p],m=!0)}m&&ct(e.attrs,"set","")}function tr(e,t,s,n){const[o,r]=e.propsOptions;let l=!1,a;if(t)for(let c in t){if(Jt(c))continue;const m=t[c];let d;o&&re(o,d=je(c))?!r||!r.includes(d)?s[d]=m:(a||(a={}))[d]=m:Rs(e.emitsOptions,c)||(!(c in n)||m!==n[c])&&(n[c]=m,l=!0)}if(r){const c=oe(s),m=a||de;for(let d=0;d<r.length;d++){const p=r[d];s[p]=nn(o,c,p,m[p],e,!re(m,p))}}return l}function nn(e,t,s,n,o,r){const l=e[s];if(l!=null){const a=re(l,"default");if(a&&n===void 0){const c=l.default;if(l.type!==Function&&!l.skipFactory&&Z(c)){const{propsDefaults:m}=o;if(s in m)n=m[s];else{const d=cs(o);n=m[s]=c.call(null,t),d()}}else n=c;o.ce&&o.ce._setProp(s,n)}l[0]&&(r&&!a?n=!1:l[1]&&(n===""||n===_t(s))&&(n=!0))}return n}const Ji=new WeakMap;function sr(e,t,s=!1){const n=s?Ji:t.propsCache,o=n.get(e);if(o)return o;const r=e.props,l={},a=[];let c=!1;if(!Z(e)){const d=p=>{c=!0;const[x,A]=sr(p,t,!0);Ee(l,x),A&&a.push(...A)};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!r&&!c)return ce(e)&&n.set(e,It),It;if(q(r))for(let d=0;d<r.length;d++){const p=je(r[d]);Bn(p)&&(l[p]=de)}else if(r)for(const d in r){const p=je(d);if(Bn(p)){const x=r[d],A=l[p]=q(x)||Z(x)?{type:x}:Ee({},x),B=A.type;let $=!1,v=!0;if(q(B))for(let P=0;P<B.length;++P){const F=B[P],W=Z(F)&&F.name;if(W==="Boolean"){$=!0;break}else W==="String"&&(v=!1)}else $=Z(B)&&B.name==="Boolean";A[0]=$,A[1]=v,($||re(A,"default"))&&a.push(p)}}const m=[l,a];return ce(e)&&n.set(e,m),m}function Bn(e){return e[0]!=="$"&&!Jt(e)}const wn=e=>e==="_"||e==="_ctx"||e==="$stable",Sn=e=>q(e)?e.map(et):[et(e)],qi=(e,t,s)=>{if(t._n)return t;const n=ai((...o)=>Sn(t(...o)),s);return n._c=!1,n},nr=(e,t,s)=>{const n=e._ctx;for(const o in e){if(wn(o))continue;const r=e[o];if(Z(r))t[o]=qi(o,r,n);else if(r!=null){const l=Sn(r);t[o]=()=>l}}},or=(e,t)=>{const s=Sn(t);e.slots.default=()=>s},rr=(e,t,s)=>{for(const n in t)(s||!wn(n))&&(e[n]=t[n])},Gi=(e,t,s)=>{const n=e.slots=Xo();if(e.vnode.shapeFlag&32){const o=t._;o?(rr(n,t,s),s&&go(n,"_",o,!0)):nr(t,n)}else t&&or(e,t)},Yi=(e,t,s)=>{const{vnode:n,slots:o}=e;let r=!0,l=de;if(n.shapeFlag&32){const a=t._;a?s&&a===1?r=!1:rr(o,t,s):(r=!t.$stable,nr(t,o)),l=t}else t&&(or(e,t),l={default:1});if(r)for(const a in o)!wn(a)&&l[a]==null&&delete o[a]},Ne=tl;function Zi(e){return Qi(e)}function Qi(e,t){const s=Ps();s.__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:l,createText:a,createComment:c,setText:m,setElementText:d,parentNode:p,nextSibling:x,setScopeId:A=st,insertStaticContent:B}=e,$=(u,f,h,T=null,b=null,w=null,R=void 0,D=null,M=!!f.dynamicChildren)=>{if(u===f)return;u&&!Bt(u,f)&&(T=ve(u),ge(u,b,w,!0),u=null),f.patchFlag===-2&&(M=!1,f.dynamicChildren=null);const{type:S,ref:z,shapeFlag:N}=f;switch(S){case js:v(u,f,h,T);break;case bt:P(u,f,h,T);break;case gs:u==null&&F(f,h,T,R);break;case ie:Te(u,f,h,T,b,w,R,D,M);break;default:N&1?ee(u,f,h,T,b,w,R,D,M):N&6?$e(u,f,h,T,b,w,R,D,M):(N&64||N&128)&&S.process(u,f,h,T,b,w,R,D,M,xt)}z!=null&&b?Yt(z,u&&u.ref,w,f||u,!f):z==null&&u&&u.ref!=null&&Yt(u.ref,null,w,u,!0)},v=(u,f,h,T)=>{if(u==null)n(f.el=a(f.children),h,T);else{const b=f.el=u.el;f.children!==u.children&&m(b,f.children)}},P=(u,f,h,T)=>{u==null?n(f.el=c(f.children||""),h,T):f.el=u.el},F=(u,f,h,T)=>{[u.el,u.anchor]=B(u.children,f,h,T,u.el,u.anchor)},W=({el:u,anchor:f},h,T)=>{let b;for(;u&&u!==f;)b=x(u),n(u,h,T),u=b;n(f,h,T)},U=({el:u,anchor:f})=>{let h;for(;u&&u!==f;)h=x(u),o(u),u=h;o(f)},ee=(u,f,h,T,b,w,R,D,M)=>{if(f.type==="svg"?R="svg":f.type==="math"&&(R="mathml"),u==null)he(f,h,T,b,w,R,D,M);else{const S=u.el&&u.el._isVueCE?u.el:null;try{S&&S._beginPatch(),J(u,f,b,w,R,D,M)}finally{S&&S._endPatch()}}},he=(u,f,h,T,b,w,R,D)=>{let M,S;const{props:z,shapeFlag:N,transition:H,dirs:G}=u;if(M=u.el=l(u.type,w,z&&z.is,z),N&8?d(M,u.children):N&16&&I(u.children,M,null,T,b,zs(u,w),R,D),G&&St(u,null,T,"created"),K(M,u,u.scopeId,R,T),z){for(const ue in z)ue!=="value"&&!Jt(ue)&&r(M,ue,null,z[ue],w,T);"value"in z&&r(M,"value",null,z.value,w),(S=z.onVnodeBeforeMount)&&Ze(S,T,u)}G&&St(u,null,T,"beforeMount");const te=Xi(b,H);te&&H.beforeEnter(M),n(M,f,h),((S=z&&z.onVnodeMounted)||te||G)&&Ne(()=>{try{S&&Ze(S,T,u),te&&H.enter(M),G&&St(u,null,T,"mounted")}finally{}},b)},K=(u,f,h,T,b)=>{if(h&&A(u,h),T)for(let w=0;w<T.length;w++)A(u,T[w]);if(b){let w=b.subTree;if(f===w||cr(w.type)&&(w.ssContent===f||w.ssFallback===f)){const R=b.vnode;K(u,R,R.scopeId,R.slotScopeIds,b.parent)}}},I=(u,f,h,T,b,w,R,D,M=0)=>{for(let S=M;S<u.length;S++){const z=u[S]=D?at(u[S]):et(u[S]);$(null,z,f,h,T,b,w,R,D)}},J=(u,f,h,T,b,w,R)=>{const D=f.el=u.el;let{patchFlag:M,dynamicChildren:S,dirs:z}=f;M|=u.patchFlag&16;const N=u.props||de,H=f.props||de;let G;if(h&&Ct(h,!1),(G=H.onVnodeBeforeUpdate)&&Ze(G,h,f,u),z&&St(f,u,h,"beforeUpdate"),h&&Ct(h,!0),(N.innerHTML&&H.innerHTML==null||N.textContent&&H.textContent==null)&&d(D,""),S?me(u.dynamicChildren,S,D,h,T,zs(f,b),w):R||X(u,f,D,null,h,T,zs(f,b),w,!1),M>0){if(M&16)se(D,N,H,h,b);else if(M&2&&N.class!==H.class&&r(D,"class",null,H.class,b),M&4&&r(D,"style",N.style,H.style,b),M&8){const te=f.dynamicProps;for(let ue=0;ue<te.length;ue++){const fe=te[ue],we=N[fe],Ae=H[fe];(Ae!==we||fe==="value")&&r(D,fe,we,Ae,b,h)}}M&1&&u.children!==f.children&&d(D,f.children)}else!R&&S==null&&se(D,N,H,h,b);((G=H.onVnodeUpdated)||z)&&Ne(()=>{G&&Ze(G,h,f,u),z&&St(f,u,h,"updated")},T)},me=(u,f,h,T,b,w,R)=>{for(let D=0;D<f.length;D++){const M=u[D],S=f[D],z=M.el&&(M.type===ie||!Bt(M,S)||M.shapeFlag&198)?p(M.el):h;$(M,S,z,null,T,b,w,R,!0)}},se=(u,f,h,T,b)=>{if(f!==h){if(f!==de)for(const w in f)!Jt(w)&&!(w in h)&&r(u,w,f[w],null,b,T);for(const w in h){if(Jt(w))continue;const R=h[w],D=f[w];R!==D&&w!=="value"&&r(u,w,D,R,b,T)}"value"in h&&r(u,"value",f.value,h.value,b)}},Te=(u,f,h,T,b,w,R,D,M)=>{const S=f.el=u?u.el:a(""),z=f.anchor=u?u.anchor:a("");let{patchFlag:N,dynamicChildren:H,slotScopeIds:G}=f;G&&(D=D?D.concat(G):G),u==null?(n(S,h,T),n(z,h,T),I(f.children||[],h,z,b,w,R,D,M)):N>0&&N&64&&H&&u.dynamicChildren&&u.dynamicChildren.length===H.length?(me(u.dynamicChildren,H,h,b,w,R,D),(f.key!=null||b&&f===b.subTree)&&ir(u,f,!0)):X(u,f,h,z,b,w,R,D,M)},$e=(u,f,h,T,b,w,R,D,M)=>{f.slotScopeIds=D,u==null?f.shapeFlag&512?b.ctx.activate(f,h,T,R,M):gt(f,h,T,b,w,R,M):Et(u,f,M)},gt=(u,f,h,T,b,w,R)=>{const D=u.component=al(u,T,b);if(Wo(u)&&(D.ctx.renderer=xt),ul(D,!1,R),D.asyncDep){if(b&&b.registerDep(D,_e,R),!u.el){const M=D.subTree=nt(bt);P(null,M,f,h),u.placeholder=M.el}}else _e(D,u,f,h,b,w,R)},Et=(u,f,h)=>{const T=f.component=u.component;if(Bi(u,f,h))if(T.asyncDep&&!T.asyncResolved){ae(T,f,h);return}else T.next=f,T.update();else f.el=u.el,T.vnode=f},_e=(u,f,h,T,b,w,R)=>{const D=()=>{if(u.isMounted){let{next:N,bu:H,u:G,parent:te,vnode:ue}=u;{const Ge=lr(u);if(Ge){N&&(N.el=ue.el,ae(u,N,R)),Ge.asyncDep.then(()=>{Ne(()=>{u.isUnmounted||S()},b)});return}}let fe=N,we;Ct(u,!1),N?(N.el=ue.el,ae(u,N,R)):N=ue,H&&ms(H),(we=N.props&&N.props.onVnodeBeforeUpdate)&&Ze(we,te,N,ue),Ct(u,!0);const Ae=Un(u),qe=u.subTree;u.subTree=Ae,$(qe,Ae,p(qe.el),ve(qe),u,b,w),N.el=Ae.el,fe===null&&Wi(u,Ae.el),G&&Ne(G,b),(we=N.props&&N.props.onVnodeUpdated)&&Ne(()=>Ze(we,te,N,ue),b)}else{let N;const{el:H,props:G}=f,{bm:te,m:ue,parent:fe,root:we,type:Ae}=u,qe=Zt(f);Ct(u,!1),te&&ms(te),!qe&&(N=G&&G.onVnodeBeforeMount)&&Ze(N,fe,f),Ct(u,!0);{we.ce&&we.ce._hasShadowRoot()&&we.ce._injectChildStyle(Ae,u.parent?u.parent.type:void 0);const Ge=u.subTree=Un(u);$(null,Ge,h,T,u,b,w),f.el=Ge.el}if(ue&&Ne(ue,b),!qe&&(N=G&&G.onVnodeMounted)){const Ge=f;Ne(()=>Ze(N,fe,Ge),b)}(f.shapeFlag&256||fe&&Zt(fe.vnode)&&fe.vnode.shapeFlag&256)&&u.a&&Ne(u.a,b),u.isMounted=!0,f=h=T=null}};u.scope.on();const M=u.effect=new bo(D);u.scope.off();const S=u.update=M.run.bind(M),z=u.job=M.runIfDirty.bind(M);z.i=u,z.id=u.uid,M.scheduler=()=>yn(z),Ct(u,!0),S()},ae=(u,f,h)=>{f.component=u;const T=u.vnode.props;u.vnode=f,u.next=null,zi(u,f.props,T,h),Yi(u,f.children,h),ft(),On(u),pt()},X=(u,f,h,T,b,w,R,D,M=!1)=>{const S=u&&u.children,z=u?u.shapeFlag:0,N=f.children,{patchFlag:H,shapeFlag:G}=f;if(H>0){if(H&128){E(S,N,h,T,b,w,R,D,M);return}else if(H&256){V(S,N,h,T,b,w,R,D,M);return}}G&8?(z&16&&g(S,b,w),N!==S&&d(h,N)):z&16?G&16?E(S,N,h,T,b,w,R,D,M):g(S,b,w,!0):(z&8&&d(h,""),G&16&&I(N,h,T,b,w,R,D,M))},V=(u,f,h,T,b,w,R,D,M)=>{u=u||It,f=f||It;const S=u.length,z=f.length,N=Math.min(S,z);let H;for(H=0;H<N;H++){const G=f[H]=M?at(f[H]):et(f[H]);$(u[H],G,h,null,b,w,R,D,M)}S>z?g(u,b,w,!0,!1,N):I(f,h,T,b,w,R,D,M,N)},E=(u,f,h,T,b,w,R,D,M)=>{let S=0;const z=f.length;let N=u.length-1,H=z-1;for(;S<=N&&S<=H;){const G=u[S],te=f[S]=M?at(f[S]):et(f[S]);if(Bt(G,te))$(G,te,h,null,b,w,R,D,M);else break;S++}for(;S<=N&&S<=H;){const G=u[N],te=f[H]=M?at(f[H]):et(f[H]);if(Bt(G,te))$(G,te,h,null,b,w,R,D,M);else break;N--,H--}if(S>N){if(S<=H){const G=H+1,te=G<z?f[G].el:T;for(;S<=H;)$(null,f[S]=M?at(f[S]):et(f[S]),h,te,b,w,R,D,M),S++}}else if(S>H)for(;S<=N;)ge(u[S],b,w,!0),S++;else{const G=S,te=S,ue=new Map;for(S=te;S<=H;S++){const Fe=f[S]=M?at(f[S]):et(f[S]);Fe.key!=null&&ue.set(Fe.key,S)}let fe,we=0;const Ae=H-te+1;let qe=!1,Ge=0;const Ut=new Array(Ae);for(S=0;S<Ae;S++)Ut[S]=0;for(S=G;S<=N;S++){const Fe=u[S];if(we>=Ae){ge(Fe,b,w,!0);continue}let Ye;if(Fe.key!=null)Ye=ue.get(Fe.key);else for(fe=te;fe<=H;fe++)if(Ut[fe-te]===0&&Bt(Fe,f[fe])){Ye=fe;break}Ye===void 0?ge(Fe,b,w,!0):(Ut[Ye-te]=S+1,Ye>=Ge?Ge=Ye:qe=!0,$(Fe,f[Ye],h,null,b,w,R,D,M),we++)}const Tn=qe?el(Ut):It;for(fe=Tn.length-1,S=Ae-1;S>=0;S--){const Fe=te+S,Ye=f[Fe],$n=f[Fe+1],An=Fe+1<z?$n.el||ar($n):T;Ut[S]===0?$(null,Ye,h,An,b,w,R,D,M):qe&&(fe<0||S!==Tn[fe]?ye(Ye,h,An,2):fe--)}}},ye=(u,f,h,T,b=null)=>{const{el:w,type:R,transition:D,children:M,shapeFlag:S}=u;if(S&6){ye(u.component.subTree,f,h,T);return}if(S&128){u.suspense.move(f,h,T);return}if(S&64){R.move(u,f,h,xt);return}if(R===ie){n(w,f,h);for(let N=0;N<M.length;N++)ye(M[N],f,h,T);n(u.anchor,f,h);return}if(R===gs){W(u,f,h);return}if(T!==2&&S&1&&D)if(T===0)D.beforeEnter(w),n(w,f,h),Ne(()=>D.enter(w),b);else{const{leave:N,delayLeave:H,afterLeave:G}=D,te=()=>{u.ctx.isUnmounted?o(w):n(w,f,h)},ue=()=>{w._isLeaving&&w[hi](!0),N(w,()=>{te(),G&&G()})};H?H(w,te,ue):ue()}else n(w,f,h)},ge=(u,f,h,T=!1,b=!1)=>{const{type:w,props:R,ref:D,children:M,dynamicChildren:S,shapeFlag:z,patchFlag:N,dirs:H,cacheIndex:G,memo:te}=u;if(N===-2&&(b=!1),D!=null&&(ft(),Yt(D,null,h,u,!0),pt()),G!=null&&(f.renderCache[G]=void 0),z&256){f.ctx.deactivate(u);return}const ue=z&1&&H,fe=!Zt(u);let we;if(fe&&(we=R&&R.onVnodeBeforeUnmount)&&Ze(we,f,u),z&6)y(u.component,h,T);else{if(z&128){u.suspense.unmount(h,T);return}ue&&St(u,null,f,"beforeUnmount"),z&64?u.type.remove(u,f,h,xt,T):S&&!S.hasOnce&&(w!==ie||N>0&&N&64)?g(S,f,h,!1,!0):(w===ie&&N&384||!b&&z&16)&&g(M,f,h),T&&ne(u)}const Ae=te!=null&&G==null;(fe&&(we=R&&R.onVnodeUnmounted)||ue||Ae)&&Ne(()=>{we&&Ze(we,f,u),ue&&St(u,null,f,"unmounted"),Ae&&(u.el=null)},h)},ne=u=>{const{type:f,el:h,anchor:T,transition:b}=u;if(f===ie){L(h,T);return}if(f===gs){U(u);return}const w=()=>{o(h),b&&!b.persisted&&b.afterLeave&&b.afterLeave()};if(u.shapeFlag&1&&b&&!b.persisted){const{leave:R,delayLeave:D}=b,M=()=>R(h,w);D?D(u.el,w,M):M()}else w()},L=(u,f)=>{let h;for(;u!==f;)h=x(u),o(u),u=h;o(f)},y=(u,f,h)=>{const{bum:T,scope:b,job:w,subTree:R,um:D,m:M,a:S}=u;Wn(M),Wn(S),T&&ms(T),b.stop(),w&&(w.flags|=8,ge(R,u,f,h)),D&&Ne(D,f),Ne(()=>{u.isUnmounted=!0},f)},g=(u,f,h,T=!1,b=!1,w=0)=>{for(let R=w;R<u.length;R++)ge(u[R],f,h,T,b)},ve=u=>{if(u.shapeFlag&6)return ve(u.component.subTree);if(u.shapeFlag&128)return u.suspense.next();const f=x(u.anchor||u.el),h=f&&f[pi];return h?x(h):f};let Oe=!1;const O=(u,f,h)=>{let T;u==null?f._vnode&&(ge(f._vnode,null,null,!0),T=f._vnode.component):$(f._vnode||null,u,f,null,null,null,h),f._vnode=u,Oe||(Oe=!0,On(T),Lo(),Oe=!1)},xt={p:$,um:ge,m:ye,r:ne,mt:gt,mc:I,pc:X,pbc:me,n:ve,o:e};return{render:O,hydrate:void 0,createApp:Ni(O)}}function zs({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 Ct({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Xi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ir(e,t,s=!1){const n=e.children,o=t.children;if(q(n)&&q(o))for(let r=0;r<n.length;r++){const l=n[r];let a=o[r];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[r]=at(o[r]),a.el=l.el),!s&&a.patchFlag!==-2&&ir(l,a)),a.type===js&&(a.patchFlag===-1&&(a=o[r]=at(a)),a.el=l.el),a.type===bt&&!a.el&&(a.el=l.el)}}function el(e){const t=e.slice(),s=[0];let n,o,r,l,a;const c=e.length;for(n=0;n<c;n++){const m=e[n];if(m!==0){if(o=s[s.length-1],e[o]<m){t[n]=o,s.push(n);continue}for(r=0,l=s.length-1;r<l;)a=r+l>>1,e[s[a]]<m?r=a+1:l=a;m<e[s[r]]&&(r>0&&(t[n]=s[r-1]),s[r]=n)}}for(r=s.length,l=s[r-1];r-- >0;)s[r]=l,l=t[l];return s}function lr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:lr(t)}function Wn(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function ar(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?ar(t.subTree):null}const cr=e=>e.__isSuspense;function tl(e,t){t&&t.pendingBranch?q(e)?t.effects.push(...e):t.effects.push(e):li(e)}const ie=Symbol.for("v-fgt"),js=Symbol.for("v-txt"),bt=Symbol.for("v-cmt"),gs=Symbol.for("v-stc"),Xt=[];let Ue=null;function _(e=!1){Xt.push(Ue=e?null:[])}function sl(){Xt.pop(),Ue=Xt[Xt.length-1]||null}let ns=1;function Kn(e,t=!1){ns+=e,e<0&&Ue&&t&&(Ue.hasOnce=!0)}function ur(e){return e.dynamicChildren=ns>0?Ue||It:null,sl(),ns>0&&Ue&&Ue.push(e),e}function C(e,t,s,n,o,r){return ur(i(e,t,s,n,o,r,!0))}function dr(e,t,s,n,o){return ur(nt(e,t,s,n,o,!0))}function fr(e){return e?e.__v_isVNode===!0:!1}function Bt(e,t){return e.type===t.type&&e.key===t.key}const pr=({key:e})=>e??null,xs=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?be(e)||Ie(e)||Z(e)?{i:Ve,r:e,k:t,f:!!s}:e:null);function i(e,t=null,s=null,n=0,o=null,r=e===ie?0:1,l=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&pr(t),ref:t&&xs(t),scopeId:Vo,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:Ve};return a?(Cn(c,s),r&128&&e.normalize(c)):s&&(c.shapeFlag|=be(s)?8:16),ns>0&&!l&&Ue&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&Ue.push(c),c}const nt=nl;function nl(e,t=null,s=null,n=0,o=null,r=!1){if((!e||e===zo)&&(e=bt),fr(e)){const a=Nt(e,t,!0);return s&&Cn(a,s),ns>0&&!r&&Ue&&(a.shapeFlag&6?Ue[Ue.indexOf(e)]=a:Ue.push(a)),a.patchFlag=-2,a}if(hl(e)&&(e=e.__vccOpts),t){t=ol(t);let{class:a,style:c}=t;a&&!be(a)&&(t.class=Y(a)),ce(c)&&(vn(c)&&!q(c)&&(c=Ee({},c)),t.style=Ms(c))}const l=be(e)?1:cr(e)?128:mi(e)?64:ce(e)?4:Z(e)?2:0;return i(e,t,s,n,o,l,r,!0)}function ol(e){return e?vn(e)||er(e)?Ee({},e):e:null}function Nt(e,t,s=!1,n=!1){const{props:o,ref:r,patchFlag:l,children:a,transition:c}=e,m=t?rl(o||{},t):o,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:m,key:m&&pr(m),ref:t&&t.ref?s&&r?q(r)?r.concat(xs(t)):[r,xs(t)]:xs(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?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Nt(e.ssContent),ssFallback:e.ssFallback&&Nt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&bn(d,c.clone(d)),d}function He(e=" ",t=0){return nt(js,null,e,t)}function We(e,t){const s=nt(gs,null,e);return s.staticCount=t,s}function Q(e="",t=!1){return t?(_(),dr(bt,null,e)):nt(bt,null,e)}function et(e){return e==null||typeof e=="boolean"?nt(bt):q(e)?nt(ie,null,e.slice()):fr(e)?at(e):nt(js,null,String(e))}function at(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Nt(e)}function Cn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(q(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),Cn(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!er(t)?t._ctx=Ve:o===3&&Ve&&(Ve.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Z(t)?(t={default:t,_ctx:Ve},s=32):(t=String(t),n&64?(s=16,t=[He(t)]):s=8);e.children=t,e.shapeFlag|=s}function rl(...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=Y([t.class,n.class]));else if(o==="style")t.style=Ms([t.style,n.style]);else if(ks(o)){const r=t[o],l=n[o];l&&r!==l&&!(q(r)&&r.includes(l))?t[o]=r?[].concat(r,l):l:l==null&&r==null&&!Ts(o)&&(t[o]=l)}else o!==""&&(t[o]=n[o])}return t}function Ze(e,t,s,n=null){rt(e,t,7,[s,n])}const il=Go();let ll=0;function al(e,t,s){const n=e.type,o=(t?t.appContext:e.appContext)||il,r={uid:ll++,vnode:e,type:n,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Er(!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:sr(n,o),emitsOptions:Yo(n,o),emit:null,emitted:null,propsDefaults:de,inheritAttrs:n.inheritAttrs,ctx:de,data:de,props:de,attrs:de,slots:de,refs:de,setupState:de,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=Fi.bind(null,r),e.ce&&e.ce(r),r}let Me=null;const cl=()=>Me||Ve;let Cs,on;{const e=Ps(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),r=>{o.length>1?o.forEach(l=>l(r)):o[0](r)}};Cs=t("__VUE_INSTANCE_SETTERS__",s=>Me=s),on=t("__VUE_SSR_SETTERS__",s=>os=s)}const cs=e=>{const t=Me;return Cs(e),e.scope.on(),()=>{e.scope.off(),Cs(t)}},zn=()=>{Me&&Me.scope.off(),Cs(null)};function mr(e){return e.vnode.shapeFlag&4}let os=!1;function ul(e,t=!1,s=!1){t&&on(t);const{props:n,children:o}=e.vnode,r=mr(e);Ki(e,n,r,t),Gi(e,o,s||t);const l=r?dl(e,t):void 0;return t&&on(!1),l}function dl(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Pi);const{setup:n}=s;if(n){ft();const o=e.setupContext=n.length>1?pl(e):null,r=cs(e),l=as(n,e,0,[e.props,o]),a=po(l);if(pt(),r(),(a||e.sp)&&!Zt(e)&&Bo(e),a){if(l.then(zn,zn),t)return l.then(c=>{Jn(e,c)}).catch(c=>{Os(c,e,0)});e.asyncDep=l}else Jn(e,l)}else hr(e)}function Jn(e,t,s){Z(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ce(t)&&(e.setupState=Do(t)),hr(e)}function hr(e,t,s){const n=e.type;e.render||(e.render=n.render||st);{const o=cs(e);ft();try{Mi(e)}finally{pt(),o()}}}const fl={get(e,t){return Pe(e,"get",""),e[t]}};function pl(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,fl),slots:e.slots,emit:e.emit,expose:t}}function Ns(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Do(Yr(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Qt)return Qt[s](e)},has(t,s){return s in t||s in Qt}})):e.proxy}function ml(e,t=!0){return Z(e)?e.displayName||e.name:e.name||t&&e.__name}function hl(e){return Z(e)&&"__vccOpts"in e}const Ke=(e,t)=>si(e,t,os),gl="3.5.31";/**
60
+ **/function ds(e,t,s,n){try{return n?e(...n):e()}catch(o){Rs(o,t,s)}}function rt(e,t,s,n){if(X(e)){const o=ds(e,t,s,n);return o&&mo(o)&&o.catch(l=>{Rs(l,t,s)}),o}if(Y(e)){const o=[];for(let l=0;l<e.length;l++)o.push(rt(e[l],t,s,n));return o}}function Rs(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:l,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||he;if(t){let c=t.parent;const u=t.proxy,h=`https://vuejs.org/error-reference/#runtime-${s}`;for(;c;){const d=c.ec;if(d){for(let p=0;p<d.length;p++)if(d[p](e,u,h)===!1)return}c=c.parent}if(l){mt(),ds(l,null,10,[e,u,h]),ht();return}}ll(e,s,o,n,a)}function ll(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const De=[];let Qe=-1;const jt=[];let bt=null,Mt=0;const jo=Promise.resolve();let Ss=null;function No(e){const t=Ss||jo;return e?t.then(this?e.bind(this):e):t}function il(e){let t=Qe+1,s=De.length;for(;t<s;){const n=t+s>>>1,o=De[n],l=ls(o);l<e||l===e&&o.flags&2?t=n+1:s=n}return t}function bn(e){if(!(e.flags&1)){const t=ls(e),s=De[De.length-1];!s||!(e.flags&2)&&t>=ls(s)?De.push(e):De.splice(il(t),0,e),e.flags|=1,Lo()}}function Lo(){Ss||(Ss=jo.then(Vo))}function al(e){Y(e)?jt.push(...e):bt&&e.id===-1?bt.splice(Mt+1,0,e):e.flags&1||(jt.push(e),e.flags|=1),Lo()}function Dn(e,t,s=Qe+1){for(;s<De.length;s++){const n=De[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;De.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Uo(e){if(jt.length){const t=[...new Set(jt)].sort((s,n)=>ls(s)-ls(n));if(jt.length=0,bt){bt.push(...t);return}for(bt=t,Mt=0;Mt<bt.length;Mt++){const s=bt[Mt];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}bt=null,Mt=0}}const ls=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Vo(e){try{for(Qe=0;Qe<De.length;Qe++){const t=De[Qe];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),ds(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Qe<De.length;Qe++){const t=De[Qe];t&&(t.flags&=-2)}Qe=-1,De.length=0,Uo(),Ss=null,(De.length||jt.length)&&Vo()}}let Ue=null,Fo=null;function ks(e){const t=Ue;return Ue=e,Fo=e&&e.type.__scopeId||null,t}function cl(e,t=Ue,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&zn(-1);const l=ks(t);let a;try{a=e(...o)}finally{ks(l),n._d&&zn(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function ee(e,t){if(Ue===null)return e;const s=Us(Ue),n=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[l,a,c,u=he]=t[o];l&&(X(l)&&(l={mounted:l,updated:l}),l.deep&&ft(a),n.push({dir:l,instance:s,value:a,oldValue:void 0,arg:c,modifiers:u}))}return e}function Ct(e,t,s,n){const o=e.dirs,l=t&&t.dirs;for(let a=0;a<o.length;a++){const c=o[a];l&&(c.oldValue=l[a].value);let u=c.dir[n];u&&(mt(),rt(u,s,8,[e.el,c,e,t]),ht())}}function ul(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 vs(e,t,s=!1){const n=ui();if(n||Nt){let o=Nt?Nt._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&&X(t)?t.call(n&&n.proxy):t}}const dl=Symbol.for("v-scx"),fl=()=>vs(dl);function Ks(e,t,s){return Ho(e,t,s)}function Ho(e,t,s=he){const{immediate:n,deep:o,flush:l,once:a}=s,c=Ae({},s),u=t&&n||!t&&l!=="post";let h;if(as){if(l==="sync"){const A=fl();h=A.__watcherHandles||(A.__watcherHandles=[])}else if(!u){const A=()=>{};return A.stop=st,A.resume=st,A.pause=st,A}}const d=Pe;c.call=(A,W,C)=>rt(A,d,W,C);let p=!1;l==="post"?c.scheduler=A=>{je(A,d&&d.suspense)}:l!=="sync"&&(p=!0,c.scheduler=(A,W)=>{W?A():bn(A)}),c.augmentJob=A=>{t&&(A.flags|=4),p&&(A.flags|=2,d&&(A.id=d.uid,A.i=d))};const y=rl(e,t,c);return as&&(h?h.push(y):u&&y()),y}function pl(e,t,s){const n=this.proxy,o=ke(e)?e.includes(".")?Bo(n,e):()=>n[e]:e.bind(n,n);let l;X(t)?l=t:(l=t.handler,s=t);const a=fs(this),c=Ho(o,l.bind(n),s);return a(),c}function Bo(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 ml=Symbol("_vte"),hl=e=>e.__isTeleport,xl=Symbol("_leaveCb");function _n(e,t){e.shapeFlag&6&&e.component?(e.transition=t,_n(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 gt(e,t){return X(e)?Ae({name:e.name},t,{setup:e}):e}function Wo(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Rn(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const Cs=new WeakMap;function es(e,t,s,n,o=!1){if(Y(e)){e.forEach((C,S)=>es(C,t&&(Y(t)?t[S]:t),s,n,o));return}if(ts(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&es(e,t,s,n.component.subTree);return}const l=n.shapeFlag&4?Us(n.component):n.el,a=o?null:l,{i:c,r:u}=e,h=t&&t.r,d=c.refs===he?c.refs={}:c.refs,p=c.setupState,y=ae(p),A=p===he?po:C=>Rn(d,C)?!1:ce(y,C),W=(C,S)=>!(S&&Rn(d,S));if(h!=null&&h!==u){if(jn(t),ke(h))d[h]=null,A(h)&&(p[h]=null);else if(Me(h)){const C=t;W(h,C.k)&&(h.value=null),C.k&&(d[C.k]=null)}}if(X(u))ds(u,c,12,[a,d]);else{const C=ke(u),S=Me(u);if(C||S){const _=()=>{if(e.f){const I=C?A(u)?p[u]:d[u]:W()||!e.k?u.value:d[e.k];if(o)Y(I)&&cn(I,l);else if(Y(I))I.includes(l)||I.push(l);else if(C)d[u]=[l],A(u)&&(p[u]=d[u]);else{const U=[l];W(u,e.k)&&(u.value=U),e.k&&(d[e.k]=U)}}else C?(d[u]=a,A(u)&&(p[u]=a)):S&&(W(u,e.k)&&(u.value=a),e.k&&(d[e.k]=a))};if(a){const I=()=>{_(),Cs.delete(e)};I.id=-1,Cs.set(e,I),je(I,s)}else jn(e),_()}}}function jn(e){const t=Cs.get(e);t&&(t.flags|=8,Cs.delete(e))}Os().requestIdleCallback;Os().cancelIdleCallback;const ts=e=>!!e.type.__asyncLoader,Ko=e=>e.type.__isKeepAlive;function gl(e,t){zo(e,"a",t)}function vl(e,t){zo(e,"da",t)}function zo(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(js(t,n,s),s){let o=s.parent;for(;o&&o.parent;)Ko(o.parent.vnode)&&yl(n,t,s,o),o=o.parent}}function yl(e,t,s,n){const o=js(t,e,n,!0);wn(()=>{cn(n[t],o)},s)}function js(e,t,s=Pe,n=!1){if(s){const o=s[e]||(s[e]=[]),l=t.__weh||(t.__weh=(...a)=>{mt();const c=fs(s),u=rt(t,s,e,a);return c(),ht(),u});return n?o.unshift(l):o.push(l),l}}const vt=e=>(t,s=Pe)=>{(!as||e==="sp")&&js(e,(...n)=>t(...n),s)},bl=vt("bm"),lt=vt("m"),_l=vt("bu"),wl=vt("u"),Sl=vt("bum"),wn=vt("um"),kl=vt("sp"),Cl=vt("rtg"),$l=vt("rtc");function Tl(e,t=Pe){js("ec",e,t)}const El="components",Jo=Symbol.for("v-ndc");function Al(e){return ke(e)?Il(El,e,!1)||e:e||Jo}function Il(e,t,s=!0,n=!1){const o=Ue||Pe;if(o){const l=o.type;{const c=hi(l,!1);if(c&&(c===t||c===Re(t)||c===Ps(Re(t))))return l}const a=Nn(o[e]||l[e],t)||Nn(o.appContext[e],t);return!a&&n?l:a}}function Nn(e,t){return e&&(e[t]||e[Re(t)]||e[Ps(Re(t))])}function be(e,t,s,n){let o;const l=s,a=Y(e);if(a||ke(e)){const c=a&&At(e);let u=!1,h=!1;c&&(u=!He(e),h=xt(e),e=Ds(e)),o=new Array(e.length);for(let d=0,p=e.length;d<p;d++)o[d]=t(u?h?Ut(ze(e[d])):ze(e[d]):e[d],d,void 0,l)}else if(typeof e=="number"){o=new Array(e);for(let c=0;c<e;c++)o[c]=t(c+1,c,void 0,l)}else if(fe(e))if(e[Symbol.iterator])o=Array.from(e,(c,u)=>t(c,u,void 0,l));else{const c=Object.keys(e);o=new Array(c.length);for(let u=0,h=c.length;u<h;u++){const d=c[u];o[u]=t(e[d],d,u,l)}}else o=[];return o}const tn=e=>e?hr(e)?Us(e):tn(e.parent):null,ss=Ae(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>tn(e.parent),$root:e=>tn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Go(e),$forceUpdate:e=>e.f||(e.f=()=>{bn(e.update)}),$nextTick:e=>e.n||(e.n=No.bind(e.proxy)),$watch:e=>pl.bind(e)}),zs=(e,t)=>e!==he&&!e.__isScriptSetup&&ce(e,t),Pl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:l,accessCache:a,type:c,appContext:u}=e;if(t[0]!=="$"){const y=a[t];if(y!==void 0)switch(y){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return l[t]}else{if(zs(n,t))return a[t]=1,n[t];if(o!==he&&ce(o,t))return a[t]=2,o[t];if(ce(l,t))return a[t]=3,l[t];if(s!==he&&ce(s,t))return a[t]=4,s[t];sn&&(a[t]=0)}}const h=ss[t];let d,p;if(h)return t==="$attrs"&&Ie(e.attrs,"get",""),h(e);if((d=c.__cssModules)&&(d=d[t]))return d;if(s!==he&&ce(s,t))return a[t]=4,s[t];if(p=u.config.globalProperties,ce(p,t))return p[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:l}=e;return zs(o,t)?(o[t]=s,!0):n!==he&&ce(n,t)?(n[t]=s,!0):ce(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,props:l,type:a}},c){let u;return!!(s[c]||e!==he&&c[0]!=="$"&&ce(e,c)||zs(t,c)||ce(l,c)||ce(n,c)||ce(ss,c)||ce(o.config.globalProperties,c)||(u=a.__cssModules)&&u[c])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:ce(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Ln(e){return Y(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let sn=!0;function Ml(e){const t=Go(e),s=e.proxy,n=e.ctx;sn=!1,t.beforeCreate&&Un(t.beforeCreate,e,"bc");const{data:o,computed:l,methods:a,watch:c,provide:u,inject:h,created:d,beforeMount:p,mounted:y,beforeUpdate:A,updated:W,activated:C,deactivated:S,beforeDestroy:_,beforeUnmount:I,destroyed:U,unmounted:V,render:se,renderTracked:oe,renderTriggered:K,errorCaptured:N,serverPrefetch:J,expose:ue,inheritAttrs:F,components:D,directives:H,filters:ne}=t;if(h&&Ol(h,n,null),a)for(const pe in a){const ie=a[pe];X(ie)&&(n[pe]=ie.bind(s))}if(o){const pe=o.call(s,s);fe(pe)&&(e.data=gn(pe))}if(sn=!0,l)for(const pe in l){const ie=l[pe],B=X(ie)?ie.bind(s,s):X(ie.get)?ie.get.bind(s,s):st,M=!X(ie)&&X(ie.set)?ie.set.bind(s):st,Ce=Fe({get:B,set:M});Object.defineProperty(n,pe,{enumerable:!0,configurable:!0,get:()=>Ce.value,set:$e=>Ce.value=$e})}if(c)for(const pe in c)qo(c[pe],n,s,pe);if(u){const pe=X(u)?u.call(s):u;Reflect.ownKeys(pe).forEach(ie=>{ul(ie,pe[ie])})}d&&Un(d,e,"c");function Se(pe,ie){Y(ie)?ie.forEach(B=>pe(B.bind(s))):ie&&pe(ie.bind(s))}if(Se(bl,p),Se(lt,y),Se(_l,A),Se(wl,W),Se(gl,C),Se(vl,S),Se(Tl,N),Se($l,oe),Se(Cl,K),Se(Sl,I),Se(wn,V),Se(kl,J),Y(ue))if(ue.length){const pe=e.exposed||(e.exposed={});ue.forEach(ie=>{Object.defineProperty(pe,ie,{get:()=>s[ie],set:B=>s[ie]=B,enumerable:!0})})}else e.exposed||(e.exposed={});se&&e.render===st&&(e.render=se),F!=null&&(e.inheritAttrs=F),D&&(e.components=D),H&&(e.directives=H),J&&Wo(e)}function Ol(e,t,s=st){Y(e)&&(e=nn(e));for(const n in e){const o=e[n];let l;fe(o)?"default"in o?l=vs(o.from||n,o.default,!0):l=vs(o.from||n):l=vs(o),Me(l)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>l.value,set:a=>l.value=a}):t[n]=l}}function Un(e,t,s){rt(Y(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function qo(e,t,s,n){let o=n.includes(".")?Bo(s,n):()=>s[n];if(ke(e)){const l=t[e];X(l)&&Ks(o,l)}else if(X(e))Ks(o,e.bind(s));else if(fe(e))if(Y(e))e.forEach(l=>qo(l,t,s,n));else{const l=X(e.handler)?e.handler.bind(s):t[e.handler];X(l)&&Ks(o,l,e)}}function Go(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:l,config:{optionMergeStrategies:a}}=e.appContext,c=l.get(t);let u;return c?u=c:!o.length&&!s&&!n?u=t:(u={},o.length&&o.forEach(h=>$s(u,h,a,!0)),$s(u,t,a)),fe(t)&&l.set(t,u),u}function $s(e,t,s,n=!1){const{mixins:o,extends:l}=t;l&&$s(e,l,s,!0),o&&o.forEach(a=>$s(e,a,s,!0));for(const a in t)if(!(n&&a==="expose")){const c=Dl[a]||s&&s[a];e[a]=c?c(e[a],t[a]):t[a]}return e}const Dl={data:Vn,props:Fn,emits:Fn,methods:Yt,computed:Yt,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:Yt,directives:Yt,watch:jl,provide:Vn,inject:Rl};function Vn(e,t){return t?e?function(){return Ae(X(e)?e.call(this,this):e,X(t)?t.call(this,this):t)}:t:e}function Rl(e,t){return Yt(nn(e),nn(t))}function nn(e){if(Y(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 Yt(e,t){return e?Ae(Object.create(null),e,t):t}function Fn(e,t){return e?Y(e)&&Y(t)?[...new Set([...e,...t])]:Ae(Object.create(null),Ln(e),Ln(t??{})):t}function jl(e,t){if(!e)return t;if(!t)return e;const s=Ae(Object.create(null),e);for(const n in t)s[n]=Oe(e[n],t[n]);return s}function Yo(){return{app:null,config:{isNativeTag:po,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 Nl=0;function Ll(e,t){return function(n,o=null){X(n)||(n=Ae({},n)),o!=null&&!fe(o)&&(o=null);const l=Yo(),a=new WeakSet,c=[];let u=!1;const h=l.app={_uid:Nl++,_component:n,_props:o,_container:null,_context:l,_instance:null,version:gi,get config(){return l.config},set config(d){},use(d,...p){return a.has(d)||(d&&X(d.install)?(a.add(d),d.install(h,...p)):X(d)&&(a.add(d),d(h,...p))),h},mixin(d){return l.mixins.includes(d)||l.mixins.push(d),h},component(d,p){return p?(l.components[d]=p,h):l.components[d]},directive(d,p){return p?(l.directives[d]=p,h):l.directives[d]},mount(d,p,y){if(!u){const A=h._ceVNode||nt(n,o);return A.appContext=l,y===!0?y="svg":y===!1&&(y=void 0),e(A,d,y),u=!0,h._container=d,d.__vue_app__=h,Us(A.component)}},onUnmount(d){c.push(d)},unmount(){u&&(rt(c,h._instance,16),e(null,h._container),delete h._container.__vue_app__)},provide(d,p){return l.provides[d]=p,h},runWithContext(d){const p=Nt;Nt=h;try{return d()}finally{Nt=p}}};return h}}let Nt=null;const Ul=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Re(t)}Modifiers`]||e[`${St(t)}Modifiers`];function Vl(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||he;let o=s;const l=t.startsWith("update:"),a=l&&Ul(n,t.slice(7));a&&(a.trim&&(o=s.map(d=>ke(d)?d.trim():d)),a.number&&(o=s.map(Ms)));let c,u=n[c=Vs(t)]||n[c=Vs(Re(t))];!u&&l&&(u=n[c=Vs(St(t))]),u&&rt(u,e,6,o);const h=n[c+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,rt(h,e,6,o)}}const Fl=new WeakMap;function Zo(e,t,s=!1){const n=s?Fl:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const l=e.emits;let a={},c=!1;if(!X(e)){const u=h=>{const d=Zo(h,t,!0);d&&(c=!0,Ae(a,d))};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!l&&!c?(fe(e)&&n.set(e,null),null):(Y(l)?l.forEach(u=>a[u]=null):Ae(a,l),fe(e)&&n.set(e,a),a)}function Ns(e,t){return!e||!Es(t)?!1:(t=t.slice(2).replace(/Once$/,""),ce(e,t[0].toLowerCase()+t.slice(1))||ce(e,St(t))||ce(e,t))}function Hn(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[l],slots:a,attrs:c,emit:u,render:h,renderCache:d,props:p,data:y,setupState:A,ctx:W,inheritAttrs:C}=e,S=ks(e);let _,I;try{if(s.shapeFlag&4){const V=o||n,se=V;_=et(h.call(se,V,d,p,A,y,W)),I=c}else{const V=t;_=et(V.length>1?V(p,{attrs:c,slots:a,emit:u}):V(p,null)),I=t.props?c:Hl(c)}}catch(V){ns.length=0,Rs(V,e,1),_=nt(wt)}let U=_;if(I&&C!==!1){const V=Object.keys(I),{shapeFlag:se}=U;V.length&&se&7&&(l&&V.some(As)&&(I=Bl(I,l)),U=Vt(U,I,!1,!0))}return s.dirs&&(U=Vt(U,null,!1,!0),U.dirs=U.dirs?U.dirs.concat(s.dirs):s.dirs),s.transition&&_n(U,s.transition),_=U,ks(S),_}const Hl=e=>{let t;for(const s in e)(s==="class"||s==="style"||Es(s))&&((t||(t={}))[s]=e[s]);return t},Bl=(e,t)=>{const s={};for(const n in e)(!As(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Wl(e,t,s){const{props:n,children:o,component:l}=e,{props:a,children:c,patchFlag:u}=t,h=l.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&u>=0){if(u&1024)return!0;if(u&16)return n?Bn(n,a,h):!!a;if(u&8){const d=t.dynamicProps;for(let p=0;p<d.length;p++){const y=d[p];if(Qo(a,n,y)&&!Ns(h,y))return!0}}}else return(o||c)&&(!c||!c.$stable)?!0:n===a?!1:n?a?Bn(n,a,h):!0:!!a;return!1}function Bn(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let o=0;o<n.length;o++){const l=n[o];if(Qo(t,e,l)&&!Ns(s,l))return!0}return!1}function Qo(e,t,s){const n=e[s],o=t[s];return s==="style"&&fe(n)&&fe(o)?!Wt(n,o):n!==o}function Kl({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 Xo={},er=()=>Object.create(Xo),tr=e=>Object.getPrototypeOf(e)===Xo;function zl(e,t,s,n=!1){const o={},l=er();e.propsDefaults=Object.create(null),sr(e,t,o,l);for(const a in e.propsOptions[0])a in o||(o[a]=void 0);s?e.props=n?o:Yr(o):e.type.props?e.props=o:e.props=l,e.attrs=l}function Jl(e,t,s,n){const{props:o,attrs:l,vnode:{patchFlag:a}}=e,c=ae(o),[u]=e.propsOptions;let h=!1;if((n||a>0)&&!(a&16)){if(a&8){const d=e.vnode.dynamicProps;for(let p=0;p<d.length;p++){let y=d[p];if(Ns(e.emitsOptions,y))continue;const A=t[y];if(u)if(ce(l,y))A!==l[y]&&(l[y]=A,h=!0);else{const W=Re(y);o[W]=on(u,c,W,A,e,!1)}else A!==l[y]&&(l[y]=A,h=!0)}}}else{sr(e,t,o,l)&&(h=!0);let d;for(const p in c)(!t||!ce(t,p)&&((d=St(p))===p||!ce(t,d)))&&(u?s&&(s[p]!==void 0||s[d]!==void 0)&&(o[p]=on(u,c,p,void 0,e,!0)):delete o[p]);if(l!==c)for(const p in l)(!t||!ce(t,p))&&(delete l[p],h=!0)}h&&dt(e.attrs,"set","")}function sr(e,t,s,n){const[o,l]=e.propsOptions;let a=!1,c;if(t)for(let u in t){if(Zt(u))continue;const h=t[u];let d;o&&ce(o,d=Re(u))?!l||!l.includes(d)?s[d]=h:(c||(c={}))[d]=h:Ns(e.emitsOptions,u)||(!(u in n)||h!==n[u])&&(n[u]=h,a=!0)}if(l){const u=ae(s),h=c||he;for(let d=0;d<l.length;d++){const p=l[d];s[p]=on(o,u,p,h[p],e,!ce(h,p))}}return a}function on(e,t,s,n,o,l){const a=e[s];if(a!=null){const c=ce(a,"default");if(c&&n===void 0){const u=a.default;if(a.type!==Function&&!a.skipFactory&&X(u)){const{propsDefaults:h}=o;if(s in h)n=h[s];else{const d=fs(o);n=h[s]=u.call(null,t),d()}}else n=u;o.ce&&o.ce._setProp(s,n)}a[0]&&(l&&!c?n=!1:a[1]&&(n===""||n===St(s))&&(n=!0))}return n}const ql=new WeakMap;function nr(e,t,s=!1){const n=s?ql:t.propsCache,o=n.get(e);if(o)return o;const l=e.props,a={},c=[];let u=!1;if(!X(e)){const d=p=>{u=!0;const[y,A]=nr(p,t,!0);Ae(a,y),A&&c.push(...A)};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!l&&!u)return fe(e)&&n.set(e,Dt),Dt;if(Y(l))for(let d=0;d<l.length;d++){const p=Re(l[d]);Wn(p)&&(a[p]=he)}else if(l)for(const d in l){const p=Re(d);if(Wn(p)){const y=l[d],A=a[p]=Y(y)||X(y)?{type:y}:Ae({},y),W=A.type;let C=!1,S=!0;if(Y(W))for(let _=0;_<W.length;++_){const I=W[_],U=X(I)&&I.name;if(U==="Boolean"){C=!0;break}else U==="String"&&(S=!1)}else C=X(W)&&W.name==="Boolean";A[0]=C,A[1]=S,(C||ce(A,"default"))&&c.push(p)}}const h=[a,c];return fe(e)&&n.set(e,h),h}function Wn(e){return e[0]!=="$"&&!Zt(e)}const Sn=e=>e==="_"||e==="_ctx"||e==="$stable",kn=e=>Y(e)?e.map(et):[et(e)],Gl=(e,t,s)=>{if(t._n)return t;const n=cl((...o)=>kn(t(...o)),s);return n._c=!1,n},or=(e,t,s)=>{const n=e._ctx;for(const o in e){if(Sn(o))continue;const l=e[o];if(X(l))t[o]=Gl(o,l,n);else if(l!=null){const a=kn(l);t[o]=()=>a}}},rr=(e,t)=>{const s=kn(t);e.slots.default=()=>s},lr=(e,t,s)=>{for(const n in t)(s||!Sn(n))&&(e[n]=t[n])},Yl=(e,t,s)=>{const n=e.slots=er();if(e.vnode.shapeFlag&32){const o=t._;o?(lr(n,t,s),s&&go(n,"_",o,!0)):or(t,n)}else t&&rr(e,t)},Zl=(e,t,s)=>{const{vnode:n,slots:o}=e;let l=!0,a=he;if(n.shapeFlag&32){const c=t._;c?s&&c===1?l=!1:lr(o,t,s):(l=!t.$stable,or(t,o)),a=t}else t&&(rr(e,t),a={default:1});if(l)for(const c in o)!Sn(c)&&a[c]==null&&delete o[c]},je=si;function Ql(e){return Xl(e)}function Xl(e,t){const s=Os();s.__VUE__=!0;const{insert:n,remove:o,patchProp:l,createElement:a,createText:c,createComment:u,setText:h,setElementText:d,parentNode:p,nextSibling:y,setScopeId:A=st,insertStaticContent:W}=e,C=(i,f,x,m=null,k=null,$=null,P=void 0,j=null,O=!!f.dynamicChildren)=>{if(i===f)return;i&&!Jt(i,f)&&(m=It(i),$e(i,k,$,!0),i=null),f.patchFlag===-2&&(O=!1,f.dynamicChildren=null);const{type:E,ref:q,shapeFlag:L}=f;switch(E){case Ls:S(i,f,x,m);break;case wt:_(i,f,x,m);break;case ys:i==null&&I(f,x,m,P);break;case te:D(i,f,x,m,k,$,P,j,O);break;default:L&1?se(i,f,x,m,k,$,P,j,O):L&6?H(i,f,x,m,k,$,P,j,O):(L&64||L&128)&&E.process(i,f,x,m,k,$,P,j,O,R)}q!=null&&k?es(q,i&&i.ref,$,f||i,!f):q==null&&i&&i.ref!=null&&es(i.ref,null,$,i,!0)},S=(i,f,x,m)=>{if(i==null)n(f.el=c(f.children),x,m);else{const k=f.el=i.el;f.children!==i.children&&h(k,f.children)}},_=(i,f,x,m)=>{i==null?n(f.el=u(f.children||""),x,m):f.el=i.el},I=(i,f,x,m)=>{[i.el,i.anchor]=W(i.children,f,x,m,i.el,i.anchor)},U=({el:i,anchor:f},x,m)=>{let k;for(;i&&i!==f;)k=y(i),n(i,x,m),i=k;n(f,x,m)},V=({el:i,anchor:f})=>{let x;for(;i&&i!==f;)x=y(i),o(i),i=x;o(f)},se=(i,f,x,m,k,$,P,j,O)=>{if(f.type==="svg"?P="svg":f.type==="math"&&(P="mathml"),i==null)oe(f,x,m,k,$,P,j,O);else{const E=i.el&&i.el._isVueCE?i.el:null;try{E&&E._beginPatch(),J(i,f,k,$,P,j,O)}finally{E&&E._endPatch()}}},oe=(i,f,x,m,k,$,P,j)=>{let O,E;const{props:q,shapeFlag:L,transition:z,dirs:Q}=i;if(O=i.el=a(i.type,$,q&&q.is,q),L&8?d(O,i.children):L&16&&N(i.children,O,null,m,k,Js(i,$),P,j),Q&&Ct(i,null,m,"created"),K(O,i,i.scopeId,P,m),q){for(const me in q)me!=="value"&&!Zt(me)&&l(O,me,null,q[me],$,m);"value"in q&&l(O,"value",null,q.value,$),(E=q.onVnodeBeforeMount)&&Ze(E,m,i)}Q&&Ct(i,null,m,"beforeMount");const re=ei(k,z);re&&z.beforeEnter(O),n(O,f,x),((E=q&&q.onVnodeMounted)||re||Q)&&je(()=>{try{E&&Ze(E,m,i),re&&z.enter(O),Q&&Ct(i,null,m,"mounted")}finally{}},k)},K=(i,f,x,m,k)=>{if(x&&A(i,x),m)for(let $=0;$<m.length;$++)A(i,m[$]);if(k){let $=k.subTree;if(f===$||ur($.type)&&($.ssContent===f||$.ssFallback===f)){const P=k.vnode;K(i,P,P.scopeId,P.slotScopeIds,k.parent)}}},N=(i,f,x,m,k,$,P,j,O=0)=>{for(let E=O;E<i.length;E++){const q=i[E]=j?ut(i[E]):et(i[E]);C(null,q,f,x,m,k,$,P,j)}},J=(i,f,x,m,k,$,P)=>{const j=f.el=i.el;let{patchFlag:O,dynamicChildren:E,dirs:q}=f;O|=i.patchFlag&16;const L=i.props||he,z=f.props||he;let Q;if(x&&$t(x,!1),(Q=z.onVnodeBeforeUpdate)&&Ze(Q,x,f,i),q&&Ct(f,i,x,"beforeUpdate"),x&&$t(x,!0),(L.innerHTML&&z.innerHTML==null||L.textContent&&z.textContent==null)&&d(j,""),E?ue(i.dynamicChildren,E,j,x,m,Js(f,k),$):P||ie(i,f,j,null,x,m,Js(f,k),$,!1),O>0){if(O&16)F(j,L,z,x,k);else if(O&2&&L.class!==z.class&&l(j,"class",null,z.class,k),O&4&&l(j,"style",L.style,z.style,k),O&8){const re=f.dynamicProps;for(let me=0;me<re.length;me++){const xe=re[me],Te=L[xe],Ee=z[xe];(Ee!==Te||xe==="value")&&l(j,xe,Te,Ee,k,x)}}O&1&&i.children!==f.children&&d(j,f.children)}else!P&&E==null&&F(j,L,z,x,k);((Q=z.onVnodeUpdated)||q)&&je(()=>{Q&&Ze(Q,x,f,i),q&&Ct(f,i,x,"updated")},m)},ue=(i,f,x,m,k,$,P)=>{for(let j=0;j<f.length;j++){const O=i[j],E=f[j],q=O.el&&(O.type===te||!Jt(O,E)||O.shapeFlag&198)?p(O.el):x;C(O,E,q,null,m,k,$,P,!0)}},F=(i,f,x,m,k)=>{if(f!==x){if(f!==he)for(const $ in f)!Zt($)&&!($ in x)&&l(i,$,f[$],null,k,m);for(const $ in x){if(Zt($))continue;const P=x[$],j=f[$];P!==j&&$!=="value"&&l(i,$,j,P,k,m)}"value"in x&&l(i,"value",f.value,x.value,k)}},D=(i,f,x,m,k,$,P,j,O)=>{const E=f.el=i?i.el:c(""),q=f.anchor=i?i.anchor:c("");let{patchFlag:L,dynamicChildren:z,slotScopeIds:Q}=f;Q&&(j=j?j.concat(Q):Q),i==null?(n(E,x,m),n(q,x,m),N(f.children||[],x,q,k,$,P,j,O)):L>0&&L&64&&z&&i.dynamicChildren&&i.dynamicChildren.length===z.length?(ue(i.dynamicChildren,z,x,k,$,P,j),(f.key!=null||k&&f===k.subTree)&&ir(i,f,!0)):ie(i,f,x,q,k,$,P,j,O)},H=(i,f,x,m,k,$,P,j,O)=>{f.slotScopeIds=j,i==null?f.shapeFlag&512?k.ctx.activate(f,x,m,P,O):ne(f,x,m,k,$,P,O):ve(i,f,O)},ne=(i,f,x,m,k,$,P)=>{const j=i.component=ci(i,m,k);if(Ko(i)&&(j.ctx.renderer=R),di(j,!1,P),j.asyncDep){if(k&&k.registerDep(j,Se,P),!i.el){const O=j.subTree=nt(wt);_(null,O,f,x),i.placeholder=O.el}}else Se(j,i,f,x,k,$,P)},ve=(i,f,x)=>{const m=f.component=i.component;if(Wl(i,f,x))if(m.asyncDep&&!m.asyncResolved){pe(m,f,x);return}else m.next=f,m.update();else f.el=i.el,m.vnode=f},Se=(i,f,x,m,k,$,P)=>{const j=()=>{if(i.isMounted){let{next:L,bu:z,u:Q,parent:re,vnode:me}=i;{const Ge=ar(i);if(Ge){L&&(L.el=me.el,pe(i,L,P)),Ge.asyncDep.then(()=>{je(()=>{i.isUnmounted||E()},k)});return}}let xe=L,Te;$t(i,!1),L?(L.el=me.el,pe(i,L,P)):L=me,z&&gs(z),(Te=L.props&&L.props.onVnodeBeforeUpdate)&&Ze(Te,re,L,me),$t(i,!0);const Ee=Hn(i),qe=i.subTree;i.subTree=Ee,C(qe,Ee,p(qe.el),It(qe),i,k,$),L.el=Ee.el,xe===null&&Kl(i,Ee.el),Q&&je(Q,k),(Te=L.props&&L.props.onVnodeUpdated)&&je(()=>Ze(Te,re,L,me),k)}else{let L;const{el:z,props:Q}=f,{bm:re,m:me,parent:xe,root:Te,type:Ee}=i,qe=ts(f);$t(i,!1),re&&gs(re),!qe&&(L=Q&&Q.onVnodeBeforeMount)&&Ze(L,xe,f),$t(i,!0);{Te.ce&&Te.ce._hasShadowRoot()&&Te.ce._injectChildStyle(Ee,i.parent?i.parent.type:void 0);const Ge=i.subTree=Hn(i);C(null,Ge,x,m,i,k,$),f.el=Ge.el}if(me&&je(me,k),!qe&&(L=Q&&Q.onVnodeMounted)){const Ge=f;je(()=>Ze(L,xe,Ge),k)}(f.shapeFlag&256||xe&&ts(xe.vnode)&&xe.vnode.shapeFlag&256)&&i.a&&je(i.a,k),i.isMounted=!0,f=x=m=null}};i.scope.on();const O=i.effect=new _o(j);i.scope.off();const E=i.update=O.run.bind(O),q=i.job=O.runIfDirty.bind(O);q.i=i,q.id=i.uid,O.scheduler=()=>bn(q),$t(i,!0),E()},pe=(i,f,x)=>{f.component=i;const m=i.vnode.props;i.vnode=f,i.next=null,Jl(i,f.props,m,x),Zl(i,f.children,x),mt(),Dn(i),ht()},ie=(i,f,x,m,k,$,P,j,O=!1)=>{const E=i&&i.children,q=i?i.shapeFlag:0,L=f.children,{patchFlag:z,shapeFlag:Q}=f;if(z>0){if(z&128){M(E,L,x,m,k,$,P,j,O);return}else if(z&256){B(E,L,x,m,k,$,P,j,O);return}}Q&8?(q&16&&Je(E,k,$),L!==E&&d(x,L)):q&16?Q&16?M(E,L,x,m,k,$,P,j,O):Je(E,k,$,!0):(q&8&&d(x,""),Q&16&&N(L,x,m,k,$,P,j,O))},B=(i,f,x,m,k,$,P,j,O)=>{i=i||Dt,f=f||Dt;const E=i.length,q=f.length,L=Math.min(E,q);let z;for(z=0;z<L;z++){const Q=f[z]=O?ut(f[z]):et(f[z]);C(i[z],Q,x,null,k,$,P,j,O)}E>q?Je(i,k,$,!0,!1,L):N(f,x,m,k,$,P,j,O,L)},M=(i,f,x,m,k,$,P,j,O)=>{let E=0;const q=f.length;let L=i.length-1,z=q-1;for(;E<=L&&E<=z;){const Q=i[E],re=f[E]=O?ut(f[E]):et(f[E]);if(Jt(Q,re))C(Q,re,x,null,k,$,P,j,O);else break;E++}for(;E<=L&&E<=z;){const Q=i[L],re=f[z]=O?ut(f[z]):et(f[z]);if(Jt(Q,re))C(Q,re,x,null,k,$,P,j,O);else break;L--,z--}if(E>L){if(E<=z){const Q=z+1,re=Q<q?f[Q].el:m;for(;E<=z;)C(null,f[E]=O?ut(f[E]):et(f[E]),x,re,k,$,P,j,O),E++}}else if(E>z)for(;E<=L;)$e(i[E],k,$,!0),E++;else{const Q=E,re=E,me=new Map;for(E=re;E<=z;E++){const Le=f[E]=O?ut(f[E]):et(f[E]);Le.key!=null&&me.set(Le.key,E)}let xe,Te=0;const Ee=z-re+1;let qe=!1,Ge=0;const Kt=new Array(Ee);for(E=0;E<Ee;E++)Kt[E]=0;for(E=Q;E<=L;E++){const Le=i[E];if(Te>=Ee){$e(Le,k,$,!0);continue}let Ye;if(Le.key!=null)Ye=me.get(Le.key);else for(xe=re;xe<=z;xe++)if(Kt[xe-re]===0&&Jt(Le,f[xe])){Ye=xe;break}Ye===void 0?$e(Le,k,$,!0):(Kt[Ye-re]=E+1,Ye>=Ge?Ge=Ye:qe=!0,C(Le,f[Ye],x,null,k,$,P,j,O),Te++)}const Tn=qe?ti(Kt):Dt;for(xe=Tn.length-1,E=Ee-1;E>=0;E--){const Le=re+E,Ye=f[Le],En=f[Le+1],An=Le+1<q?En.el||cr(En):m;Kt[E]===0?C(null,Ye,x,An,k,$,P,j,O):qe&&(xe<0||E!==Tn[xe]?Ce(Ye,x,An,2):xe--)}}},Ce=(i,f,x,m,k=null)=>{const{el:$,type:P,transition:j,children:O,shapeFlag:E}=i;if(E&6){Ce(i.component.subTree,f,x,m);return}if(E&128){i.suspense.move(f,x,m);return}if(E&64){P.move(i,f,x,R);return}if(P===te){n($,f,x);for(let L=0;L<O.length;L++)Ce(O[L],f,x,m);n(i.anchor,f,x);return}if(P===ys){U(i,f,x);return}if(m!==2&&E&1&&j)if(m===0)j.beforeEnter($),n($,f,x),je(()=>j.enter($),k);else{const{leave:L,delayLeave:z,afterLeave:Q}=j,re=()=>{i.ctx.isUnmounted?o($):n($,f,x)},me=()=>{$._isLeaving&&$[xl](!0),L($,()=>{re(),Q&&Q()})};z?z($,re,me):me()}else n($,f,x)},$e=(i,f,x,m=!1,k=!1)=>{const{type:$,props:P,ref:j,children:O,dynamicChildren:E,shapeFlag:q,patchFlag:L,dirs:z,cacheIndex:Q,memo:re}=i;if(L===-2&&(k=!1),j!=null&&(mt(),es(j,null,x,i,!0),ht()),Q!=null&&(f.renderCache[Q]=void 0),q&256){f.ctx.deactivate(i);return}const me=q&1&&z,xe=!ts(i);let Te;if(xe&&(Te=P&&P.onVnodeBeforeUnmount)&&Ze(Te,f,i),q&6)kt(i.component,x,m);else{if(q&128){i.suspense.unmount(x,m);return}me&&Ct(i,null,f,"beforeUnmount"),q&64?i.type.remove(i,f,x,R,m):E&&!E.hasOnce&&($!==te||L>0&&L&64)?Je(E,f,x,!1,!0):($===te&&L&384||!k&&q&16)&&Je(O,f,x),m&&de(i)}const Ee=re!=null&&Q==null;(xe&&(Te=P&&P.onVnodeUnmounted)||me||Ee)&&je(()=>{Te&&Ze(Te,f,i),me&&Ct(i,null,f,"unmounted"),Ee&&(i.el=null)},x)},de=i=>{const{type:f,el:x,anchor:m,transition:k}=i;if(f===te){Be(x,m);return}if(f===ys){V(i);return}const $=()=>{o(x),k&&!k.persisted&&k.afterLeave&&k.afterLeave()};if(i.shapeFlag&1&&k&&!k.persisted){const{leave:P,delayLeave:j}=k,O=()=>P(x,$);j?j(i.el,$,O):O()}else $()},Be=(i,f)=>{let x;for(;i!==f;)x=y(i),o(i),i=x;o(f)},kt=(i,f,x)=>{const{bum:m,scope:k,job:$,subTree:P,um:j,m:O,a:E}=i;Kn(O),Kn(E),m&&gs(m),k.stop(),$&&($.flags|=8,$e(P,i,f,x)),j&&je(j,f),je(()=>{i.isUnmounted=!0},f)},Je=(i,f,x,m=!1,k=!1,$=0)=>{for(let P=$;P<i.length;P++)$e(i[P],f,x,m,k)},It=i=>{if(i.shapeFlag&6)return It(i.component.subTree);if(i.shapeFlag&128)return i.suspense.next();const f=y(i.anchor||i.el),x=f&&f[ml];return x?y(x):f};let it=!1;const yt=(i,f,x)=>{let m;i==null?f._vnode&&($e(f._vnode,null,null,!0),m=f._vnode.component):C(f._vnode||null,i,f,null,null,null,x),f._vnode=i,it||(it=!0,Dn(m),Uo(),it=!1)},R={p:C,um:$e,m:Ce,r:de,mt:ne,mc:N,pc:ie,pbc:ue,n:It,o:e};return{render:yt,hydrate:void 0,createApp:Ll(yt)}}function Js({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 ei(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ir(e,t,s=!1){const n=e.children,o=t.children;if(Y(n)&&Y(o))for(let l=0;l<n.length;l++){const a=n[l];let c=o[l];c.shapeFlag&1&&!c.dynamicChildren&&((c.patchFlag<=0||c.patchFlag===32)&&(c=o[l]=ut(o[l]),c.el=a.el),!s&&c.patchFlag!==-2&&ir(a,c)),c.type===Ls&&(c.patchFlag===-1&&(c=o[l]=ut(c)),c.el=a.el),c.type===wt&&!c.el&&(c.el=a.el)}}function ti(e){const t=e.slice(),s=[0];let n,o,l,a,c;const u=e.length;for(n=0;n<u;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(l=0,a=s.length-1;l<a;)c=l+a>>1,e[s[c]]<h?l=c+1:a=c;h<e[s[l]]&&(l>0&&(t[n]=s[l-1]),s[l]=n)}}for(l=s.length,a=s[l-1];l-- >0;)s[l]=a,a=t[a];return s}function ar(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ar(t)}function Kn(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function cr(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?cr(t.subTree):null}const ur=e=>e.__isSuspense;function si(e,t){t&&t.pendingBranch?Y(e)?t.effects.push(...e):t.effects.push(e):al(e)}const te=Symbol.for("v-fgt"),Ls=Symbol.for("v-txt"),wt=Symbol.for("v-cmt"),ys=Symbol.for("v-stc"),ns=[];let Ve=null;function g(e=!1){ns.push(Ve=e?null:[])}function ni(){ns.pop(),Ve=ns[ns.length-1]||null}let is=1;function zn(e,t=!1){is+=e,e<0&&Ve&&t&&(Ve.hasOnce=!0)}function dr(e){return e.dynamicChildren=is>0?Ve||Dt:null,ni(),is>0&&Ve&&Ve.push(e),e}function v(e,t,s,n,o,l){return dr(r(e,t,s,n,o,l,!0))}function fr(e,t,s,n,o){return dr(nt(e,t,s,n,o,!0))}function pr(e){return e?e.__v_isVNode===!0:!1}function Jt(e,t){return e.type===t.type&&e.key===t.key}const mr=({key:e})=>e??null,bs=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?ke(e)||Me(e)||X(e)?{i:Ue,r:e,k:t,f:!!s}:e:null);function r(e,t=null,s=null,n=0,o=null,l=e===te?0:1,a=!1,c=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&mr(t),ref:t&&bs(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:l,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ue};return c?(Cn(u,s),l&128&&e.normalize(u)):s&&(u.shapeFlag|=ke(s)?8:16),is>0&&!a&&Ve&&(u.patchFlag>0||l&6)&&u.patchFlag!==32&&Ve.push(u),u}const nt=oi;function oi(e,t=null,s=null,n=0,o=null,l=!1){if((!e||e===Jo)&&(e=wt),pr(e)){const c=Vt(e,t,!0);return s&&Cn(c,s),is>0&&!l&&Ve&&(c.shapeFlag&6?Ve[Ve.indexOf(e)]=c:Ve.push(c)),c.patchFlag=-2,c}if(xi(e)&&(e=e.__vccOpts),t){t=ri(t);let{class:c,style:u}=t;c&&!ke(c)&&(t.class=Z(c)),fe(u)&&(yn(u)&&!Y(u)&&(u=Ae({},u)),t.style=Lt(u))}const a=ke(e)?1:ur(e)?128:hl(e)?64:fe(e)?4:X(e)?2:0;return r(e,t,s,n,o,a,l,!0)}function ri(e){return e?yn(e)||tr(e)?Ae({},e):e:null}function Vt(e,t,s=!1,n=!1){const{props:o,ref:l,patchFlag:a,children:c,transition:u}=e,h=t?li(o||{},t):o,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&mr(h),ref:t&&t.ref?s&&l?Y(l)?l.concat(bs(t)):[l,bs(t)]:bs(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:c,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==te?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Vt(e.ssContent),ssFallback:e.ssFallback&&Vt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&n&&_n(d,u.clone(d)),d}function we(e=" ",t=0){return nt(Ls,null,e,t)}function We(e,t){const s=nt(ys,null,e);return s.staticCount=t,s}function G(e="",t=!1){return t?(g(),fr(wt,null,e)):nt(wt,null,e)}function et(e){return e==null||typeof e=="boolean"?nt(wt):Y(e)?nt(te,null,e.slice()):pr(e)?ut(e):nt(Ls,null,String(e))}function ut(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Vt(e)}function Cn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(Y(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),Cn(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!tr(t)?t._ctx=Ue:o===3&&Ue&&(Ue.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else X(t)?(t={default:t,_ctx:Ue},s=32):(t=String(t),n&64?(s=16,t=[we(t)]):s=8);e.children=t,e.shapeFlag|=s}function li(...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=Z([t.class,n.class]));else if(o==="style")t.style=Lt([t.style,n.style]);else if(Es(o)){const l=t[o],a=n[o];a&&l!==a&&!(Y(l)&&l.includes(a))?t[o]=l?[].concat(l,a):a:a==null&&l==null&&!As(o)&&(t[o]=a)}else o!==""&&(t[o]=n[o])}return t}function Ze(e,t,s,n=null){rt(e,t,7,[s,n])}const ii=Yo();let ai=0;function ci(e,t,s){const n=e.type,o=(t?t.appContext:e.appContext)||ii,l={uid:ai++,vnode:e,type:n,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ir(!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:nr(n,o),emitsOptions:Zo(n,o),emit:null,emitted:null,propsDefaults:he,inheritAttrs:n.inheritAttrs,ctx:he,data:he,props:he,attrs:he,slots:he,refs:he,setupState:he,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return l.ctx={_:l},l.root=t?t.root:l,l.emit=Vl.bind(null,l),e.ce&&e.ce(l),l}let Pe=null;const ui=()=>Pe||Ue;let Ts,rn;{const e=Os(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),l=>{o.length>1?o.forEach(a=>a(l)):o[0](l)}};Ts=t("__VUE_INSTANCE_SETTERS__",s=>Pe=s),rn=t("__VUE_SSR_SETTERS__",s=>as=s)}const fs=e=>{const t=Pe;return Ts(e),e.scope.on(),()=>{e.scope.off(),Ts(t)}},Jn=()=>{Pe&&Pe.scope.off(),Ts(null)};function hr(e){return e.vnode.shapeFlag&4}let as=!1;function di(e,t=!1,s=!1){t&&rn(t);const{props:n,children:o}=e.vnode,l=hr(e);zl(e,n,l,t),Yl(e,o,s||t);const a=l?fi(e,t):void 0;return t&&rn(!1),a}function fi(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Pl);const{setup:n}=s;if(n){mt();const o=e.setupContext=n.length>1?mi(e):null,l=fs(e),a=ds(n,e,0,[e.props,o]),c=mo(a);if(ht(),l(),(c||e.sp)&&!ts(e)&&Wo(e),c){if(a.then(Jn,Jn),t)return a.then(u=>{qn(e,u)}).catch(u=>{Rs(u,e,0)});e.asyncDep=a}else qn(e,a)}else xr(e)}function qn(e,t,s){X(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:fe(t)&&(e.setupState=Ro(t)),xr(e)}function xr(e,t,s){const n=e.type;e.render||(e.render=n.render||st);{const o=fs(e);mt();try{Ml(e)}finally{ht(),o()}}}const pi={get(e,t){return Ie(e,"get",""),e[t]}};function mi(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,pi),slots:e.slots,emit:e.emit,expose:t}}function Us(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ro(Zr(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in ss)return ss[s](e)},has(t,s){return s in t||s in ss}})):e.proxy}function hi(e,t=!0){return X(e)?e.displayName||e.name:e.name||t&&e.__name}function xi(e){return X(e)&&"__vccOpts"in e}const Fe=(e,t)=>nl(e,t,as),gi="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 rn;const qn=typeof window<"u"&&window.trustedTypes;if(qn)try{rn=qn.createPolicy("vue",{createHTML:e=>e})}catch{}const gr=rn?e=>rn.createHTML(e):e=>e,xl="http://www.w3.org/2000/svg",vl="http://www.w3.org/1998/Math/MathML",lt=typeof document<"u"?document:null,Gn=lt&&lt.createElement("template"),yl={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"?lt.createElementNS(xl,e):t==="mathml"?lt.createElementNS(vl,e):s?lt.createElement(e,{is:s}):lt.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>lt.createTextNode(e),createComment:e=>lt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>lt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,r){const l=s?s.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===r||!(o=o.nextSibling)););else{Gn.innerHTML=gr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=Gn.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[l?l.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},bl=Symbol("_vtc");function _l(e,t,s){const n=e[bl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Yn=Symbol("_vod"),wl=Symbol("_vsh"),Sl=Symbol(""),Cl=/(?:^|;)\s*display\s*:/;function kl(e,t,s){const n=e.style,o=be(s);let r=!1;if(s&&!o){if(t)if(be(t))for(const l of t.split(";")){const a=l.slice(0,l.indexOf(":")).trim();s[a]==null&&vs(n,a,"")}else for(const l in t)s[l]==null&&vs(n,l,"");for(const l in s)l==="display"&&(r=!0),vs(n,l,s[l])}else if(o){if(t!==s){const l=n[Sl];l&&(s+=";"+l),n.cssText=s,r=Cl.test(s)}}else t&&e.removeAttribute("style");Yn in e&&(e[Yn]=r?n.display:"",e[wl]&&(n.display="none"))}const Zn=/\s*!important$/;function vs(e,t,s){if(q(s))s.forEach(n=>vs(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Tl(e,t);Zn.test(s)?e.setProperty(_t(n),s.replace(Zn,""),"important"):e[n]=s}}const Qn=["Webkit","Moz","ms"],Js={};function Tl(e,t){const s=Js[t];if(s)return s;let n=je(t);if(n!=="filter"&&n in e)return Js[t]=n;n=As(n);for(let o=0;o<Qn.length;o++){const r=Qn[o]+n;if(r in e)return Js[t]=r}return t}const Xn="http://www.w3.org/1999/xlink";function eo(e,t,s,n,o,r=$r(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Xn,t.slice(6,t.length)):e.setAttributeNS(Xn,t,s):s==null||r&&!xo(s)?e.removeAttribute(t):e.setAttribute(t,r?"":ot(s)?String(s):s)}function to(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?gr(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 l=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=xo(s):s==null&&a==="string"?(s="",l=!0):a==="number"&&(s=0,l=!0)}try{e[t]=s}catch{}l&&e.removeAttribute(o||t)}function yt(e,t,s,n){e.addEventListener(t,s,n)}function $l(e,t,s,n){e.removeEventListener(t,s,n)}const so=Symbol("_vei");function Al(e,t,s,n,o=null){const r=e[so]||(e[so]={}),l=r[t];if(n&&l)l.value=n;else{const[a,c]=El(t);if(n){const m=r[t]=Il(n,o);yt(e,a,m,c)}else l&&($l(e,a,l,c),r[t]=void 0)}}const no=/(?:Once|Passive|Capture)$/;function El(e){let t;if(no.test(e)){t={};let n;for(;n=e.match(no);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):_t(e.slice(2)),t]}let qs=0;const Pl=Promise.resolve(),Ml=()=>qs||(Pl.then(()=>qs=0),qs=Date.now());function Il(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;rt(Ol(n,s.value),t,5,[n])};return s.value=e,s.attached=Ml(),s}function Ol(e,t){if(q(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 oo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Dl=(e,t,s,n,o,r)=>{const l=o==="svg";t==="class"?_l(e,n,l):t==="style"?kl(e,s,n):ks(t)?Ts(t)||Al(e,t,s,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Rl(e,t,n,l))?(to(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&eo(e,t,n,l,r,t!=="value")):e._isVueCE&&(jl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!be(n)))?to(e,je(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),eo(e,t,n,l))};function Rl(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&oo(t)&&Z(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 oo(t)&&be(s)?!1:t in e}function jl(e,t){const s=e._def.props;if(!s)return!1;const n=je(t);return Array.isArray(s)?s.some(o=>je(o)===n):Object.keys(s).some(o=>je(o)===n)}const Lt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return q(t)?s=>ms(t,s):t};function Nl(e){e.target.composing=!0}function ro(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const dt=Symbol("_assign");function io(e,t,s){return t&&(e=e.trim()),s&&(e=Es(e)),e}const xe={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e[dt]=Lt(o);const r=n||o.props&&o.props.type==="number";yt(e,t?"change":"input",l=>{l.target.composing||e[dt](io(e.value,s,r))}),(s||r)&&yt(e,"change",()=>{e.value=io(e.value,s,r)}),t||(yt(e,"compositionstart",Nl),yt(e,"compositionend",ro),yt(e,"change",ro))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:o,number:r}},l){if(e[dt]=Lt(l),e.composing)return;const a=(r||e.type==="number")&&!/^0\d/.test(e.value)?Es(e.value):e.value,c=t??"";if(a===c)return;const m=e.getRootNode();(m instanceof Document||m instanceof ShadowRoot)&&m.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===c)||(e.value=c)}},lo={deep:!0,created(e,t,s){e[dt]=Lt(s),yt(e,"change",()=>{const n=e._modelValue,o=is(e),r=e.checked,l=e[dt];if(q(n)){const a=un(n,o),c=a!==-1;if(r&&!c)l(n.concat(o));else if(!r&&c){const m=[...n];m.splice(a,1),l(m)}}else if(Ft(n)){const a=new Set(n);r?a.add(o):a.delete(o),l(a)}else l(xr(e,r))})},mounted:ao,beforeUpdate(e,t,s){e[dt]=Lt(s),ao(e,t,s)}};function ao(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(q(t))o=un(t,n.props.value)>-1;else if(Ft(t))o=t.has(n.props.value);else{if(t===s)return;o=Vt(t,xr(e,!0))}e.checked!==o&&(e.checked=o)}const rs={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const o=Ft(t);yt(e,"change",()=>{const r=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>s?Es(is(l)):is(l));e[dt](e.multiple?o?new Set(r):r:r[0]),e._assigning=!0,jo(()=>{e._assigning=!1})}),e[dt]=Lt(n)},mounted(e,{value:t}){co(e,t)},beforeUpdate(e,t,s){e[dt]=Lt(s)},updated(e,{value:t}){e._assigning||co(e,t)}};function co(e,t){const s=e.multiple,n=q(t);if(!(s&&!n&&!Ft(t))){for(let o=0,r=e.options.length;o<r;o++){const l=e.options[o],a=is(l);if(s)if(n){const c=typeof a;c==="string"||c==="number"?l.selected=t.some(m=>String(m)===String(a)):l.selected=un(t,a)>-1}else l.selected=t.has(a);else if(Vt(is(l),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function is(e){return"_value"in e?e._value:e.value}function xr(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Ll={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},zt=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(o=>{if(!("key"in o))return;const r=_t(o.key);if(t.some(l=>l===r||Ll[l]===r))return e(o)}))},Fl=Ee({patchProp:Dl},yl);let uo;function Vl(){return uo||(uo=Zi(Fl))}const Ul=((...e)=>{const t=Vl().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=Bl(n);if(!o)return;const r=t._component;!Z(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const l=s(o,!1,Hl(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},t});function Hl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Bl(e){return be(e)?document.querySelector(e):e}let kn="";function Wt(e){kn=e}function ke(){return kn}async function Se(e,t){const s=await fetch(e,{...t,headers:{Authorization:`Bearer ${kn}`,"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 Wl={class:"animate-fade-in"},Kl={key:0,class:"text-center py-12 text-textSecondary"},zl={key:1,class:"text-center text-textSecondary py-12"},Jl={key:2,class:"space-y-3"},ql={class:"flex items-center justify-between"},Gl={class:"flex items-center gap-3"},Yl={class:"font-medium"},Zl={class:"text-accentLight"},Ql={class:"text-textSecondary text-xs"},Xl={key:2,class:"text-muted italic"},ea={class:"text-xs text-textSecondary font-mono"},ta={class:"text-right"},sa={class:"flex items-center gap-2 justify-end"},na={class:"text-xs text-textSecondary"},oa=At({__name:"SessionsTab",props:{status:{}},setup(e){const t=e,s=j([]),n=j(!0);async function o(){n.value=!0;try{const m=await Se("/api/status");s.value=(m.sessions||[]).slice().sort((d,p)=>d.status==="active"&&p.status!=="active"?-1:d.status!=="active"&&p.status==="active"?1:p.lastActivity-d.lastActivity)}finally{n.value=!1}}const r=Ke(()=>{var d;return(((d=t.status)==null?void 0:d.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 l(m){const d=Math.floor((Date.now()-m.lastActivity)/6e4);return m.status==="disconnected"?{label:`Disconnected${d>0?` — ${d}m ago`:""}`,color:"text-muted"}:d<5?{label:"Active",color:"text-success"}:d<30?{label:`Idle ${d}m`,color:"text-warn"}:{label:`Dormant ${d}m`,color:"text-danger"}}function a(m){if(!m.lastWaitCallAt)return"";const d=Math.floor((Date.now()-m.lastWaitCallAt)/6e4);return d<5?`Polling — ${d===0?"just now":d+"m ago"}`:`Last poll — ${d}m ago`}function c(m){return m.lastWaitCallAt?Math.floor((Date.now()-m.lastWaitCallAt)/6e4)<5?"text-success":"text-warn":""}return wt(o),(m,d)=>(_(),C("div",Wl,[n.value&&r.value.length===0?(_(),C("div",Kl,"Loading sessions...")):r.value.length===0?(_(),C("div",zl,"No sessions")):(_(),C("div",Jl,[(_(!0),C(ie,null,Ce(r.value,p=>(_(),C("div",{key:p.mcpSessionId,class:Y(["glass rounded-xl p-4 animate-slide-up",p.status==="disconnected"?"opacity-60":""])},[i("div",ql,[i("div",Gl,[i("span",{class:Y(["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),i("div",null,[i("div",Yl,[p.topicName?(_(),C(ie,{key:0},[i("span",Zl,k(p.topicName),1),i("span",Ql," (thread "+k(p.threadId)+")",1)],64)):p.threadId!=null?(_(),C(ie,{key:1},[He("Thread "+k(p.threadId),1)],64)):(_(),C("span",Xl,"Awaiting start_session…"))]),i("div",ea,k(p.mcpSessionId.slice(0,12))+"...",1)])]),i("div",ta,[i("div",sa,[i("span",{class:Y(["text-sm font-medium",l(p).color])},k(l(p).label),3),a(p)?(_(),C("span",{key:0,class:Y(["text-xs ml-2",c(p)])},k(a(p)),3)):Q("",!0)]),i("div",na,k(p.transportType),1)])])],2))),128))]))]))}}),ra={class:"animate-fade-in"},ia={class:"flex flex-wrap items-center gap-3 mb-4"},la={key:0,class:"text-center py-12 text-textSecondary"},aa={key:1,class:"text-center py-12 text-textSecondary"},ca={key:2,class:"space-y-2"},ua={class:"flex items-start justify-between gap-3"},da={class:"flex-1 min-w-0"},fa={class:"flex items-center gap-2 mb-1"},pa={key:0,class:"type-badge",style:{background:"rgba(239,68,68,0.15)",color:"#f87171"}},ma={key:1,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},ha={class:"text-xs text-textSecondary"},ga={class:"text-sm text-textPrimary leading-relaxed"},xa={class:"flex flex-wrap gap-1.5 mt-2"},va={class:"text-right shrink-0"},ya={class:"text-sm font-mono text-textSecondary"},ba={class:"text-xs text-muted"},_a={class:"text-xs text-muted"},wa=At({__name:"MemoryNotesTab",setup(e){const t=j([]),s=j(!1),n=j(""),o=j("created_at"),r=j("");let l=null;async function a(){s.value=!0;try{const d=r.value.trim();let p;if(d)p=await Se(`/api/search?q=${encodeURIComponent(d)}&limit=50`);else{const x=new URLSearchParams({limit:"50",sort:o.value});n.value&&x.set("type",n.value),p=await Se(`/api/notes?${x}`)}t.value=p}finally{s.value=!1}}function c(){l&&clearTimeout(l),l=setTimeout(a,300)}function m(d){if(!d)return"never";const p=Date.now()-new Date(d).getTime(),x=Math.floor(p/6e4);if(x<1)return"just now";if(x<60)return`${x}m ago`;const A=Math.floor(x/60);return A<24?`${A}h ago`:`${Math.floor(A/24)}d ago`}return wt(a),(d,p)=>(_(),C("div",ra,[i("div",ia,[le(i("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),[[xe,r.value]]),le(i("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]=[We('<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),[[rs,n.value]]),le(i("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]=[i("option",{value:"created_at"},"Newest",-1),i("option",{value:"confidence"},"Confidence",-1),i("option",{value:"access_count"},"Most accessed",-1)])],544),[[rs,o.value]])]),s.value?(_(),C("div",la,"Loading notes...")):t.value.length===0?(_(),C("div",aa,"No notes found")):(_(),C("div",ca,[(_(!0),C(ie,null,Ce(t.value,x=>(_(),C("div",{key:x.noteId,class:Y(["glass rounded-xl p-4 animate-fade-in",`priority-${x.priority||0}`])},[i("div",ua,[i("div",da,[i("div",fa,[i("span",{class:Y(["type-badge",`type-${x.type}`])},k(x.type),3),x.priority>=2?(_(),C("span",pa,"HIGH IMPORTANCE")):x.priority===1?(_(),C("span",ma,"NOTABLE")):Q("",!0),i("span",ha,k(x.noteId),1)]),i("p",ga,k(x.content),1),i("div",xa,[(_(!0),C(ie,null,Ce(x.keywords||[],A=>(_(),C("span",{key:A,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},k(A),1))),128))])]),i("div",va,[i("div",ya,k(((Number(x.confidence)||0)*100).toFixed(0))+"%",1),i("div",ba,k(m(x.createdAt)),1),i("div",_a,k(x.accessCount??0)+" hits",1)])])],2))),128))]))]))}}),Sa={class:"animate-fade-in space-y-6"},Ca={class:"glass rounded-xl p-4"},ka={class:"flex flex-wrap items-center gap-4 mb-4"},Ta={key:0,class:"text-sm text-success"},$a={class:"flex flex-wrap items-center gap-3 mb-4"},Aa={key:0,class:"text-sm text-success"},Ea={class:"glass rounded-xl p-6"},Pa={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Ma={class:"flex items-center gap-2"},Ia={key:0,class:"text-sm text-success"},Oa={key:0,class:"mb-3"},Da={class:"mt-4"},Ra=["innerHTML"],ja={class:"glass rounded-xl p-6"},Na={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},La={class:"flex items-center gap-2"},Fa={key:0,class:"text-sm text-success"},Va={class:"flex gap-2 mb-4"},Ua=["onClick"],Ha={key:0,class:"mb-3"},Ba=["value","placeholder"],Wa={class:"glass rounded-xl p-6"},Ka={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},za={class:"flex items-center gap-2"},Ja={key:0,class:"text-sm text-success"},qa={class:"mb-4 flex flex-wrap items-center gap-3"},Ga={class:"flex items-center gap-2"},Ya={class:"font-mono text-sm text-textPrimary"},Za={key:0,class:"mb-3"},Qa={class:"flex flex-wrap gap-2 mb-3"},Xa=["onClick"],ec={class:"mt-4"},tc=["innerHTML"],sc=At({__name:"TemplatesTab",setup(e){function t(V){return V.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").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=j("copilot"),n=j(""),o=j(50),r=j(""),l=j(""),a=j(!0),c=j(""),m=j(!1),d=j({}),p=j("copilot"),x=j(""),A=j(""),B=j(!0),$=j(""),v=j(!1),P=j([]),F=j("");async function W(){await Promise.all([U(),ee(),he(),K()])}async function U(){try{const V=await Se("/api/settings/agent-type");s.value=V.agentType||"copilot"}catch{}}async function ee(){try{const V=await Se("/api/settings/bootstrap-message-count");o.value=V.count??50}catch{}}async function he(){try{const V=await Se("/api/templates");if(V.templates&&V.templates.length>0){const E=V.templates[0];l.value=E.content||"",a.value=E.isDefault??!0}V.agentReminders&&(d.value=V.agentReminders)}catch{}}async function K(){try{const[V,E,ye]=await Promise.all([Se("/api/templates/drive"),Se("/api/templates/drive-presets"),Se("/api/settings/dmn-activation-hours")]);P.value=E.presets||[],F.value=String(ye.value??"not set"),V.custom?(A.value=V.custom,B.value=!1):(A.value=V.default||"",B.value=!0)}catch{}}async function I(){try{await Se("/api/settings/agent-type",{method:"POST",body:JSON.stringify({agentType:s.value})}),await Se("/api/templates/reminders",{method:"DELETE"}),n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3),await he()}catch(V){n.value="Error: "+V.message}}async function J(){try{await Se("/api/settings/bootstrap-message-count",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:o.value})}),r.value="Saved ✓",setTimeout(()=>{r.value=""},3e3)}catch(V){r.value="Error: "+V.message}}async function me(){try{const V=await fetch("/api/templates/reminders",{method:"POST",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({content:l.value})});if(!V.ok)throw new Error(V.statusText);a.value=!1,c.value="Saved ✓",setTimeout(()=>{c.value=""},3e3)}catch(V){c.value="Error: "+V.message}}async function se(){if(confirm("Reset to default template? Your customizations will be lost."))try{const V=await fetch("/api/templates/reminders",{method:"DELETE",headers:{Authorization:`Bearer ${ke()}`}});if(!V.ok)throw new Error(V.statusText);await he(),c.value="Reset to default ✓",setTimeout(()=>{c.value=""},3e3)}catch(V){c.value="Error: "+V.message}}async function Te(){var ye;const V=p.value,E=((ye=d.value[V])==null?void 0:ye.content)??"";try{const ge=await fetch(`/api/templates/reminders-${V}`,{method:"POST",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({content:E})});if(!ge.ok)throw new Error(ge.statusText);d.value[V]={content:E,isDefault:!1},x.value=`Saved ${V} ✓`,setTimeout(()=>{x.value=""},3e3)}catch(ge){x.value="Error: "+ge.message}}async function $e(){const V=p.value;if(confirm(`Reset ${V} agent reminder? The custom template will be removed.`))try{const E=await fetch(`/api/templates/reminders-${V}`,{method:"DELETE",headers:{Authorization:`Bearer ${ke()}`}});if(!E.ok)throw new Error(E.statusText);await he(),x.value=`Reset ${V} ✓`,setTimeout(()=>{x.value=""},3e3)}catch(E){x.value="Error: "+E.message}}async function gt(){const V=A.value;if(!V.trim()){$.value="Template is empty — load a preset first",setTimeout(()=>{$.value=""},3e3);return}try{const E=await fetch("/api/templates/drive",{method:"POST",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({content:V})});if(!E.ok)throw new Error(E.statusText);B.value=!1,$.value="Saved ✓",setTimeout(()=>{$.value=""},3e3)}catch(E){$.value="Error: "+E.message}}async function Et(){if(confirm("Reset drive template? The custom template will be removed."))try{const V=await fetch("/api/templates/drive",{method:"DELETE",headers:{Authorization:`Bearer ${ke()}`}});if(!V.ok)throw new Error(V.statusText);await K(),$.value="Reset to default ✓",setTimeout(()=>{$.value=""},3e3)}catch(V){$.value="Error: "+V.message}}function _e(V){A.value=V.content,B.value=!1}const ae=Ke(()=>t(l.value)),X=Ke(()=>A.value?t(A.value):'<span style="color:#6b7280">(no template loaded)</span>');return wt(W),(V,E)=>{var ye,ge;return _(),C("div",Sa,[i("div",Ca,[i("div",ka,[E[8]||(E[8]=i("label",{class:"text-sm font-medium text-textSecondary"},"Agent Type",-1)),le(i("select",{"onUpdate:modelValue":E[0]||(E[0]=ne=>s.value=ne),onChange:I,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},[...E[7]||(E[7]=[We('<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),[[rs,s.value]]),n.value?(_(),C("span",Ta,k(n.value),1)):Q("",!0),E[9]||(E[9]=i("span",{class:"text-xs text-muted"},"Changes which default reminders template is used",-1))]),i("div",$a,[E[10]||(E[10]=i("label",{class:"text-sm font-medium text-textSecondary"},"Bootstrap Messages",-1)),le(i("input",{"onUpdate:modelValue":E[1]||(E[1]=ne=>o.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),[[xe,o.value,void 0,{number:!0}]]),i("button",{onClick:J,class:"px-4 py-2 rounded-xl bg-accent text-white text-sm font-medium hover:bg-accent/80 transition-colors"},"Save"),r.value?(_(),C("span",Aa,k(r.value),1)):Q("",!0),E[11]||(E[11]=i("span",{class:"text-xs text-muted"},"Number of recent messages injected as warm context (0 = off)",-1))])]),i("div",Ea,[i("div",Pa,[E[12]||(E[12]=i("div",null,[i("h3",{class:"text-lg font-semibold"},"Reminders Template"),i("p",{class:"text-sm text-textSecondary mt-1"},"Edit the system prompt template sent with every reminder")],-1)),i("div",Ma,[c.value?(_(),C("span",Ia,k(c.value),1)):Q("",!0),i("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 to Default"),i("button",{onClick:me,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),a.value?(_(),C("div",Oa,[...E[13]||(E[13]=[i("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"USING DEFAULT — edit and save to customize",-1)])])):Q("",!0),le(i("textarea",{"onUpdate:modelValue":E[2]||(E[2]=ne=>l.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),[[xe,l.value]]),i("div",Da,[i("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:E[3]||(E[3]=ne=>m.value=!m.value)},[(_(),C("svg",{class:Y(["w-4 h-4 text-textSecondary transition-transform",m.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...E[14]||(E[14]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),E[15]||(E[15]=i("span",{class:"text-sm font-medium text-textSecondary"},"Preview with highlighted variables",-1))]),m.value?(_(),C("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:ae.value},null,8,Ra)):Q("",!0)]),E[16]||(E[16]=We('<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">— &quot;autonomous&quot; or &quot;standard&quot;</span></div></div></details>',1))]),i("div",ja,[i("div",Na,[E[17]||(E[17]=i("div",null,[i("h3",{class:"text-lg font-semibold"},"Agent-Specific Reminders"),i("p",{class:"text-sm text-textSecondary mt-1"},"Appended after the base reminders template — per agent type")],-1)),i("div",La,[x.value?(_(),C("span",Fa,k(x.value),1)):Q("",!0),i("button",{onClick:$e,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"),i("button",{onClick:Te,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),i("div",Va,[(_(),C(ie,null,Ce(["copilot","claude","cursor","codex"],ne=>i("button",{key:ne,onClick:L=>p.value=ne,class:Y(["px-4 py-2 rounded-xl text-sm font-medium transition",p.value===ne?"bg-accent text-white":"bg-card hover:bg-cardHover border border-gray-700 text-textSecondary hover:text-textPrimary"])},k(ne.charAt(0).toUpperCase()+ne.slice(1)),11,Ua)),64))]),((ye=d.value[p.value])==null?void 0:ye.isDefault)!==!1?(_(),C("div",Ha,[...E[18]||(E[18]=[i("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),i("textarea",{value:((ge=d.value[p.value])==null?void 0:ge.content)??"",onInput:E[4]||(E[4]=ne=>{const L=ne.target;d.value[p.value]={content:L.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 ${p.value}-specific reminders (e.g. orchestrator hints, subagent policies)...`},null,40,Ba)]),i("div",Wa,[i("div",Ka,[E[19]||(E[19]=i("div",null,[i("h3",{class:"text-lg font-semibold"},"Drive Framing Template"),i("p",{class:"text-sm text-textSecondary mt-1"},"Customize the autonomous drive prompt sent when the operator is away")],-1)),i("div",za,[$.value?(_(),C("span",Ja,k($.value),1)):Q("",!0),i("button",{onClick:Et,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"),i("button",{onClick:gt,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),i("div",qa,[E[21]||(E[21]=i("label",{class:"text-sm text-textSecondary"},"Drive Activation Period:",-1)),i("div",Ga,[i("span",Ya,k(F.value),1),E[20]||(E[20]=i("span",{class:"text-sm text-textSecondary"},"hours",-1))]),E[22]||(E[22]=i("span",{class:"text-xs text-muted"},"(informational — set via DMN_ACTIVATION_HOURS env var)",-1))]),B.value?(_(),C("div",Za,[...E[23]||(E[23]=[i("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"(Default — edit to override)",-1)])])):Q("",!0),i("div",Qa,[E[24]||(E[24]=i("span",{class:"text-sm text-textSecondary self-center"},"Presets:",-1)),(_(!0),C(ie,null,Ce(P.value,ne=>(_(),C("button",{key:ne.key,onClick:L=>_e(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"},k(ne.label),9,Xa))),128))]),le(i("textarea",{"onUpdate:modelValue":E[5]||(E[5]=ne=>A.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),[[xe,A.value]]),i("div",ec,[i("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:E[6]||(E[6]=ne=>v.value=!v.value)},[(_(),C("svg",{class:Y(["w-4 h-4 text-textSecondary transition-transform",v.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...E[25]||(E[25]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),E[26]||(E[26]=i("span",{class:"text-sm font-medium text-textSecondary"},"Preview with sample values",-1))]),v.value?(_(),C("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:X.value},null,8,tc)):Q("",!0)]),E[27]||(E[27]=We('<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))])])}}}),nc={class:"animate-fade-in"},oc={class:"glass rounded-xl p-6 mb-6"},rc={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},ic={key:0,class:"glass rounded-xl p-4 mb-4 border border-accent/30"},lc={class:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3"},ac={class:"flex items-center gap-4 mb-3"},cc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer"},uc={class:"flex items-center gap-2"},dc={key:0,class:"text-sm text-warn"},fc={key:1,class:"text-center py-8 text-textSecondary text-sm"},pc={key:2,class:"text-center text-textSecondary py-12"},mc={key:3,class:"space-y-2"},hc=["onClick"],gc={class:"flex items-start justify-between gap-3"},xc={class:"flex-1 min-w-0"},vc={class:"flex items-center gap-2 mb-1"},yc={class:"font-medium text-sm"},bc={key:0,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},_c={class:"flex flex-wrap gap-1.5 mt-1"},wc=["title"],Sc={key:0,class:"glass rounded-xl p-6"},Cc={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},kc={class:"text-lg font-semibold"},Tc={class:"text-sm text-textSecondary mt-1"},$c={class:"flex items-center gap-2"},Ac={key:0,class:"text-sm text-success"},Ec={key:1,class:"text-sm text-warn"},Pc={class:"grid grid-cols-1 sm:grid-cols-3 gap-3 mb-4"},Mc=["value"],Ic={class:"flex items-end"},Oc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer pb-2"},Dc=At({__name:"SkillsTab",setup(e){const t=j([]),s=j(!0),n=j(null),o=j(""),r=j(""),l=j(!1),a=j(""),c=j(""),m=j(!1),d=j(""),p=j(""),x=j(!1),A=j("");async function B(){s.value=!0;try{const K=await Se("/api/skills");t.value=K.skills||[]}finally{s.value=!1}}function $(K){return K?K.includes(".remote-copilot-mcp")&&K.includes("skills")?"user":K.endsWith(".default.md")?"default":K.endsWith(".skill.md")?"project":"unknown":"unknown"}function v(K){const I={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 I[K]||I.unknown}function P(K){n.value=K,o.value=K.content,r.value=(K.triggers||[]).join(", "),l.value=!!K.replacesOrchestrator,m.value=!1}function F(){n.value=null,c.value=""}function W(K,I,J,me){let se=`---
64
+ **/let ln;const Gn=typeof window<"u"&&window.trustedTypes;if(Gn)try{ln=Gn.createPolicy("vue",{createHTML:e=>e})}catch{}const gr=ln?e=>ln.createHTML(e):e=>e,vi="http://www.w3.org/2000/svg",yi="http://www.w3.org/1998/Math/MathML",ct=typeof document<"u"?document:null,Yn=ct&&ct.createElement("template"),bi={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"?ct.createElementNS(vi,e):t==="mathml"?ct.createElementNS(yi,e):s?ct.createElement(e,{is:s}):ct.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>ct.createTextNode(e),createComment:e=>ct.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ct.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,l){const a=s?s.previousSibling:t.lastChild;if(o&&(o===l||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===l||!(o=o.nextSibling)););else{Yn.innerHTML=gr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const c=Yn.content;if(n==="svg"||n==="mathml"){const u=c.firstChild;for(;u.firstChild;)c.appendChild(u.firstChild);c.removeChild(u)}t.insertBefore(c,s)}return[a?a.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},_i=Symbol("_vtc");function wi(e,t,s){const n=e[_i];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Zn=Symbol("_vod"),Si=Symbol("_vsh"),ki=Symbol(""),Ci=/(?:^|;)\s*display\s*:/;function $i(e,t,s){const n=e.style,o=ke(s);let l=!1;if(s&&!o){if(t)if(ke(t))for(const a of t.split(";")){const c=a.slice(0,a.indexOf(":")).trim();s[c]==null&&_s(n,c,"")}else for(const a in t)s[a]==null&&_s(n,a,"");for(const a in s)a==="display"&&(l=!0),_s(n,a,s[a])}else if(o){if(t!==s){const a=n[ki];a&&(s+=";"+a),n.cssText=s,l=Ci.test(s)}}else t&&e.removeAttribute("style");Zn in e&&(e[Zn]=l?n.display:"",e[Si]&&(n.display="none"))}const Qn=/\s*!important$/;function _s(e,t,s){if(Y(s))s.forEach(n=>_s(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Ti(e,t);Qn.test(s)?e.setProperty(St(n),s.replace(Qn,""),"important"):e[n]=s}}const Xn=["Webkit","Moz","ms"],qs={};function Ti(e,t){const s=qs[t];if(s)return s;let n=Re(t);if(n!=="filter"&&n in e)return qs[t]=n;n=Ps(n);for(let o=0;o<Xn.length;o++){const l=Xn[o]+n;if(l in e)return qs[t]=l}return t}const eo="http://www.w3.org/1999/xlink";function to(e,t,s,n,o,l=Er(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(eo,t.slice(6,t.length)):e.setAttributeNS(eo,t,s):s==null||l&&!vo(s)?e.removeAttribute(t):e.setAttribute(t,l?"":ot(s)?String(s):s)}function so(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?gr(s):s);return}const l=e.tagName;if(t==="value"&&l!=="PROGRESS"&&!l.includes("-")){const c=l==="OPTION"?e.getAttribute("value")||"":e.value,u=s==null?e.type==="checkbox"?"on":"":String(s);(c!==u||!("_value"in e))&&(e.value=u),s==null&&e.removeAttribute(t),e._value=s;return}let a=!1;if(s===""||s==null){const c=typeof e[t];c==="boolean"?s=vo(s):s==null&&c==="string"?(s="",a=!0):c==="number"&&(s=0,a=!0)}try{e[t]=s}catch{}a&&e.removeAttribute(o||t)}function _t(e,t,s,n){e.addEventListener(t,s,n)}function Ei(e,t,s,n){e.removeEventListener(t,s,n)}const no=Symbol("_vei");function Ai(e,t,s,n,o=null){const l=e[no]||(e[no]={}),a=l[t];if(n&&a)a.value=n;else{const[c,u]=Ii(t);if(n){const h=l[t]=Oi(n,o);_t(e,c,h,u)}else a&&(Ei(e,c,a,u),l[t]=void 0)}}const oo=/(?:Once|Passive|Capture)$/;function Ii(e){let t;if(oo.test(e)){t={};let n;for(;n=e.match(oo);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):St(e.slice(2)),t]}let Gs=0;const Pi=Promise.resolve(),Mi=()=>Gs||(Pi.then(()=>Gs=0),Gs=Date.now());function Oi(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;rt(Di(n,s.value),t,5,[n])};return s.value=e,s.attached=Mi(),s}function Di(e,t){if(Y(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 ro=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ri=(e,t,s,n,o,l)=>{const a=o==="svg";t==="class"?wi(e,n,a):t==="style"?$i(e,s,n):Es(t)?As(t)||Ai(e,t,s,n,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ji(e,t,n,a))?(so(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&to(e,t,n,a,l,t!=="value")):e._isVueCE&&(Ni(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ke(n)))?so(e,Re(t),n,l,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),to(e,t,n,a))};function ji(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&ro(t)&&X(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 ro(t)&&ke(s)?!1:t in e}function Ni(e,t){const s=e._def.props;if(!s)return!1;const n=Re(t);return Array.isArray(s)?s.some(o=>Re(o)===n):Object.keys(s).some(o=>Re(o)===n)}const Ft=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Y(t)?s=>gs(t,s):t};function Li(e){e.target.composing=!0}function lo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const pt=Symbol("_assign");function io(e,t,s){return t&&(e=e.trim()),s&&(e=Ms(e)),e}const le={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e[pt]=Ft(o);const l=n||o.props&&o.props.type==="number";_t(e,t?"change":"input",a=>{a.target.composing||e[pt](io(e.value,s,l))}),(s||l)&&_t(e,"change",()=>{e.value=io(e.value,s,l)}),t||(_t(e,"compositionstart",Li),_t(e,"compositionend",lo),_t(e,"change",lo))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:o,number:l}},a){if(e[pt]=Ft(a),e.composing)return;const c=(l||e.type==="number")&&!/^0\d/.test(e.value)?Ms(e.value):e.value,u=t??"";if(c===u)return;const h=e.getRootNode();(h instanceof Document||h instanceof ShadowRoot)&&h.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===u)||(e.value=u)}},ao={deep:!0,created(e,t,s){e[pt]=Ft(s),_t(e,"change",()=>{const n=e._modelValue,o=cs(e),l=e.checked,a=e[pt];if(Y(n)){const c=dn(n,o),u=c!==-1;if(l&&!u)a(n.concat(o));else if(!l&&u){const h=[...n];h.splice(c,1),a(h)}}else if(Bt(n)){const c=new Set(n);l?c.add(o):c.delete(o),a(c)}else a(vr(e,l))})},mounted:co,beforeUpdate(e,t,s){e[pt]=Ft(s),co(e,t,s)}};function co(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(Y(t))o=dn(t,n.props.value)>-1;else if(Bt(t))o=t.has(n.props.value);else{if(t===s)return;o=Wt(t,vr(e,!0))}e.checked!==o&&(e.checked=o)}const Ht={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const o=Bt(t);_t(e,"change",()=>{const l=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>s?Ms(cs(a)):cs(a));e[pt](e.multiple?o?new Set(l):l:l[0]),e._assigning=!0,No(()=>{e._assigning=!1})}),e[pt]=Ft(n)},mounted(e,{value:t}){uo(e,t)},beforeUpdate(e,t,s){e[pt]=Ft(s)},updated(e,{value:t}){e._assigning||uo(e,t)}};function uo(e,t){const s=e.multiple,n=Y(t);if(!(s&&!n&&!Bt(t))){for(let o=0,l=e.options.length;o<l;o++){const a=e.options[o],c=cs(a);if(s)if(n){const u=typeof c;u==="string"||u==="number"?a.selected=t.some(h=>String(h)===String(c)):a.selected=dn(t,c)>-1}else a.selected=t.has(c);else if(Wt(cs(a),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function cs(e){return"_value"in e?e._value:e.value}function vr(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Ui={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Ot=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(o=>{if(!("key"in o))return;const l=St(o.key);if(t.some(a=>a===l||Ui[a]===l))return e(o)}))},Vi=Ae({patchProp:Ri},bi);let fo;function Fi(){return fo||(fo=Ql(Vi))}const Hi=((...e)=>{const t=Fi().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=Wi(n);if(!o)return;const l=t._component;!X(l)&&!l.render&&!l.template&&(l.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const a=s(o,!1,Bi(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),a},t});function Bi(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Wi(e){return ke(e)?document.querySelector(e):e}let $n="";function qt(e){$n=e}function _e(){return $n}async function ye(e,t){const s=await fetch(e,{...t,headers:{Authorization:`Bearer ${$n}`,"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 Ki={class:"animate-fade-in"},zi={key:0,class:"text-center py-12 text-textSecondary"},Ji={key:1,class:"text-center text-textSecondary py-12"},qi={key:2,class:"space-y-3"},Gi={class:"flex items-center justify-between"},Yi={class:"flex items-center gap-3"},Zi={class:"font-medium"},Qi={class:"text-accentLight"},Xi={class:"text-textSecondary text-xs"},ea={key:2,class:"text-muted italic"},ta={class:"text-xs text-textSecondary font-mono"},sa={class:"text-right"},na={class:"flex items-center gap-2 justify-end"},oa={class:"text-xs text-textSecondary"},ra=gt({__name:"SessionsTab",props:{status:{}},setup(e){const t=e,s=T([]),n=T(!0);async function o(){n.value=!0;try{const h=await ye("/api/status");s.value=(h.sessions||[]).slice().sort((d,p)=>d.status==="active"&&p.status!=="active"?-1:d.status!=="active"&&p.status==="active"?1:p.lastActivity-d.lastActivity)}finally{n.value=!1}}const l=Fe(()=>{var d;return(((d=t.status)==null?void 0:d.sessions)??s.value).slice().sort((p,y)=>p.status==="active"&&y.status!=="active"?-1:p.status!=="active"&&y.status==="active"?1:y.lastActivity-p.lastActivity)});function a(h){const d=Math.floor((Date.now()-h.lastActivity)/6e4);return h.status==="disconnected"?{label:`Disconnected${d>0?` — ${d}m ago`:""}`,color:"text-muted"}:d<5?{label:"Active",color:"text-success"}:d<30?{label:`Idle ${d}m`,color:"text-warn"}:{label:`Dormant ${d}m`,color:"text-danger"}}function c(h){if(!h.lastWaitCallAt)return"";const d=Math.floor((Date.now()-h.lastWaitCallAt)/6e4);return d<5?`Polling — ${d===0?"just now":d+"m ago"}`:`Last poll — ${d}m ago`}function u(h){return h.lastWaitCallAt?Math.floor((Date.now()-h.lastWaitCallAt)/6e4)<5?"text-success":"text-warn":""}return lt(o),(h,d)=>(g(),v("div",Ki,[n.value&&l.value.length===0?(g(),v("div",zi,"Loading sessions...")):l.value.length===0?(g(),v("div",Ji,"No sessions")):(g(),v("div",qi,[(g(!0),v(te,null,be(l.value,p=>(g(),v("div",{key:p.mcpSessionId,class:Z(["glass rounded-xl p-4 animate-slide-up",p.status==="disconnected"?"opacity-60":""])},[r("div",Gi,[r("div",Yi,[r("span",{class:Z(["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),r("div",null,[r("div",Zi,[p.topicName?(g(),v(te,{key:0},[r("span",Qi,b(p.topicName),1),r("span",Xi," (thread "+b(p.threadId)+")",1)],64)):p.threadId!=null?(g(),v(te,{key:1},[we("Thread "+b(p.threadId),1)],64)):(g(),v("span",ea,"Awaiting start_session…"))]),r("div",ta,b(p.mcpSessionId.slice(0,12))+"...",1)])]),r("div",sa,[r("div",na,[r("span",{class:Z(["text-sm font-medium",a(p).color])},b(a(p).label),3),c(p)?(g(),v("span",{key:0,class:Z(["text-xs ml-2",u(p)])},b(c(p)),3)):G("",!0)]),r("div",oa,b(p.transportType),1)])])],2))),128))]))]))}}),la={class:"animate-fade-in"},ia={class:"flex flex-wrap items-center gap-3 mb-4"},aa={key:0,class:"text-center py-12 text-textSecondary"},ca={key:1,class:"text-center py-12 text-textSecondary"},ua={key:2,class:"space-y-2"},da={class:"flex items-start justify-between gap-3"},fa={class:"flex-1 min-w-0"},pa={class:"flex items-center gap-2 mb-1"},ma={key:0,class:"type-badge",style:{background:"rgba(239,68,68,0.15)",color:"#f87171"}},ha={key:1,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},xa={class:"text-xs text-textSecondary"},ga={class:"text-sm text-textPrimary leading-relaxed"},va={class:"flex flex-wrap gap-1.5 mt-2"},ya={class:"text-right shrink-0"},ba={class:"text-sm font-mono text-textSecondary"},_a={class:"text-xs text-muted"},wa={class:"text-xs text-muted"},Sa=gt({__name:"MemoryNotesTab",setup(e){const t=T([]),s=T(!1),n=T(""),o=T("created_at"),l=T("");let a=null;async function c(){s.value=!0;try{const d=l.value.trim();let p;if(d)p=await ye(`/api/search?q=${encodeURIComponent(d)}&limit=50`);else{const y=new URLSearchParams({limit:"50",sort:o.value});n.value&&y.set("type",n.value),p=await ye(`/api/notes?${y}`)}t.value=p}finally{s.value=!1}}function u(){a&&clearTimeout(a),a=setTimeout(c,300)}function h(d){if(!d)return"never";const p=Date.now()-new Date(d).getTime(),y=Math.floor(p/6e4);if(y<1)return"just now";if(y<60)return`${y}m ago`;const A=Math.floor(y/60);return A<24?`${A}h ago`:`${Math.floor(A/24)}d ago`}return lt(c),(d,p)=>(g(),v("div",la,[r("div",ia,[ee(r("input",{"onUpdate:modelValue":p[0]||(p[0]=y=>l.value=y),onInput:u,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),[[le,l.value]]),ee(r("select",{"onUpdate:modelValue":p[1]||(p[1]=y=>n.value=y),onChange:c,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none"},[...p[3]||(p[3]=[We('<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),[[Ht,n.value]]),ee(r("select",{"onUpdate:modelValue":p[2]||(p[2]=y=>o.value=y),onChange:c,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none"},[...p[4]||(p[4]=[r("option",{value:"created_at"},"Newest",-1),r("option",{value:"confidence"},"Confidence",-1),r("option",{value:"access_count"},"Most accessed",-1)])],544),[[Ht,o.value]])]),s.value?(g(),v("div",aa,"Loading notes...")):t.value.length===0?(g(),v("div",ca,"No notes found")):(g(),v("div",ua,[(g(!0),v(te,null,be(t.value,y=>(g(),v("div",{key:y.noteId,class:Z(["glass rounded-xl p-4 animate-fade-in",`priority-${y.priority||0}`])},[r("div",da,[r("div",fa,[r("div",pa,[r("span",{class:Z(["type-badge",`type-${y.type}`])},b(y.type),3),y.priority>=2?(g(),v("span",ma,"HIGH IMPORTANCE")):y.priority===1?(g(),v("span",ha,"NOTABLE")):G("",!0),r("span",xa,b(y.noteId),1)]),r("p",ga,b(y.content),1),r("div",va,[(g(!0),v(te,null,be(y.keywords||[],A=>(g(),v("span",{key:A,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},b(A),1))),128))])]),r("div",ya,[r("div",ba,b(((Number(y.confidence)||0)*100).toFixed(0))+"%",1),r("div",_a,b(h(y.createdAt)),1),r("div",wa,b(y.accessCount??0)+" hits",1)])])],2))),128))]))]))}}),ka={class:"animate-fade-in space-y-6"},Ca={class:"glass rounded-xl p-4"},$a={class:"flex flex-wrap items-center gap-4 mb-4"},Ta={key:0,class:"text-sm text-success"},Ea={class:"flex flex-wrap items-center gap-3 mb-4"},Aa={key:0,class:"text-sm text-success"},Ia={class:"glass rounded-xl p-6"},Pa={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"},Da={key:0,class:"mb-3"},Ra={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"},Ua={class:"flex items-center gap-2"},Va={key:0,class:"text-sm text-success"},Fa={class:"flex gap-2 mb-4"},Ha=["onClick"],Ba={key:0,class:"mb-3"},Wa=["value","placeholder"],Ka={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=gt({__name:"TemplatesTab",setup(e){function t(B){return B.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").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=T("copilot"),n=T(""),o=T(50),l=T(""),a=T(""),c=T(!0),u=T(""),h=T(!1),d=T({}),p=T("copilot"),y=T(""),A=T(""),W=T(!0),C=T(""),S=T(!1),_=T([]),I=T("");async function U(){await Promise.all([V(),se(),oe(),K()])}async function V(){try{const B=await ye("/api/settings/agent-type");s.value=B.agentType||"copilot"}catch{}}async function se(){try{const B=await ye("/api/settings/bootstrap-message-count");o.value=B.count??50}catch{}}async function oe(){try{const B=await ye("/api/templates");if(B.templates&&B.templates.length>0){const M=B.templates[0];a.value=M.content||"",c.value=M.isDefault??!0}B.agentReminders&&(d.value=B.agentReminders)}catch{}}async function K(){try{const[B,M,Ce]=await Promise.all([ye("/api/templates/drive"),ye("/api/templates/drive-presets"),ye("/api/settings/dmn-activation-hours")]);_.value=M.presets||[],I.value=String(Ce.value??"not set"),B.custom?(A.value=B.custom,W.value=!1):(A.value=B.default||"",W.value=!0)}catch{}}async function N(){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 oe()}catch(B){n.value="Error: "+B.message}}async function J(){try{await ye("/api/settings/bootstrap-message-count",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:o.value})}),l.value="Saved ✓",setTimeout(()=>{l.value=""},3e3)}catch(B){l.value="Error: "+B.message}}async function ue(){try{const B=await fetch("/api/templates/reminders",{method:"POST",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({content:a.value})});if(!B.ok)throw new Error(B.statusText);c.value=!1,u.value="Saved ✓",setTimeout(()=>{u.value=""},3e3)}catch(B){u.value="Error: "+B.message}}async function F(){if(confirm("Reset to default template? Your customizations will be lost."))try{const B=await fetch("/api/templates/reminders",{method:"DELETE",headers:{Authorization:`Bearer ${_e()}`}});if(!B.ok)throw new Error(B.statusText);await oe(),u.value="Reset to default ✓",setTimeout(()=>{u.value=""},3e3)}catch(B){u.value="Error: "+B.message}}async function D(){var Ce;const B=p.value,M=((Ce=d.value[B])==null?void 0:Ce.content)??"";try{const $e=await fetch(`/api/templates/reminders-${B}`,{method:"POST",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({content:M})});if(!$e.ok)throw new Error($e.statusText);d.value[B]={content:M,isDefault:!1},y.value=`Saved ${B} ✓`,setTimeout(()=>{y.value=""},3e3)}catch($e){y.value="Error: "+$e.message}}async function H(){const B=p.value;if(confirm(`Reset ${B} agent reminder? The custom template will be removed.`))try{const M=await fetch(`/api/templates/reminders-${B}`,{method:"DELETE",headers:{Authorization:`Bearer ${_e()}`}});if(!M.ok)throw new Error(M.statusText);await oe(),y.value=`Reset ${B} ✓`,setTimeout(()=>{y.value=""},3e3)}catch(M){y.value="Error: "+M.message}}async function ne(){const B=A.value;if(!B.trim()){C.value="Template is empty — load a preset first",setTimeout(()=>{C.value=""},3e3);return}try{const M=await fetch("/api/templates/drive",{method:"POST",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({content:B})});if(!M.ok)throw new Error(M.statusText);W.value=!1,C.value="Saved ✓",setTimeout(()=>{C.value=""},3e3)}catch(M){C.value="Error: "+M.message}}async function ve(){if(confirm("Reset drive template? The custom template will be removed."))try{const B=await fetch("/api/templates/drive",{method:"DELETE",headers:{Authorization:`Bearer ${_e()}`}});if(!B.ok)throw new Error(B.statusText);await K(),C.value="Reset to default ✓",setTimeout(()=>{C.value=""},3e3)}catch(B){C.value="Error: "+B.message}}function Se(B){A.value=B.content,W.value=!1}const pe=Fe(()=>t(a.value)),ie=Fe(()=>A.value?t(A.value):'<span style="color:#6b7280">(no template loaded)</span>');return lt(U),(B,M)=>{var Ce,$e;return g(),v("div",ka,[r("div",Ca,[r("div",$a,[M[8]||(M[8]=r("label",{class:"text-sm font-medium text-textSecondary"},"Agent Type",-1)),ee(r("select",{"onUpdate:modelValue":M[0]||(M[0]=de=>s.value=de),onChange:N,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},[...M[7]||(M[7]=[We('<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),[[Ht,s.value]]),n.value?(g(),v("span",Ta,b(n.value),1)):G("",!0),M[9]||(M[9]=r("span",{class:"text-xs text-muted"},"Changes which default reminders template is used",-1))]),r("div",Ea,[M[10]||(M[10]=r("label",{class:"text-sm font-medium text-textSecondary"},"Bootstrap Messages",-1)),ee(r("input",{"onUpdate:modelValue":M[1]||(M[1]=de=>o.value=de),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),[[le,o.value,void 0,{number:!0}]]),r("button",{onClick:J,class:"px-4 py-2 rounded-xl bg-accent text-white text-sm font-medium hover:bg-accent/80 transition-colors"},"Save"),l.value?(g(),v("span",Aa,b(l.value),1)):G("",!0),M[11]||(M[11]=r("span",{class:"text-xs text-muted"},"Number of recent messages injected as warm context (0 = off)",-1))])]),r("div",Ia,[r("div",Pa,[M[12]||(M[12]=r("div",null,[r("h3",{class:"text-lg font-semibold"},"Reminders Template"),r("p",{class:"text-sm text-textSecondary mt-1"},"Edit the system prompt template sent with every reminder")],-1)),r("div",Ma,[u.value?(g(),v("span",Oa,b(u.value),1)):G("",!0),r("button",{onClick:F,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"),r("button",{onClick:ue,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),c.value?(g(),v("div",Da,[...M[13]||(M[13]=[r("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"USING DEFAULT — edit and save to customize",-1)])])):G("",!0),ee(r("textarea",{"onUpdate:modelValue":M[2]||(M[2]=de=>a.value=de),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),[[le,a.value]]),r("div",Ra,[r("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:M[3]||(M[3]=de=>h.value=!h.value)},[(g(),v("svg",{class:Z(["w-4 h-4 text-textSecondary transition-transform",h.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...M[14]||(M[14]=[r("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),M[15]||(M[15]=r("span",{class:"text-sm font-medium text-textSecondary"},"Preview with highlighted variables",-1))]),h.value?(g(),v("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:pe.value},null,8,ja)):G("",!0)]),M[16]||(M[16]=We('<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">— &quot;autonomous&quot; or &quot;standard&quot;</span></div></div></details>',1))]),r("div",Na,[r("div",La,[M[17]||(M[17]=r("div",null,[r("h3",{class:"text-lg font-semibold"},"Agent-Specific Reminders"),r("p",{class:"text-sm text-textSecondary mt-1"},"Appended after the base reminders template — per agent type")],-1)),r("div",Ua,[y.value?(g(),v("span",Va,b(y.value),1)):G("",!0),r("button",{onClick:H,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"),r("button",{onClick:D,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),r("div",Fa,[(g(),v(te,null,be(["copilot","claude","cursor","codex"],de=>r("button",{key:de,onClick:Be=>p.value=de,class:Z(["px-4 py-2 rounded-xl text-sm font-medium transition",p.value===de?"bg-accent text-white":"bg-card hover:bg-cardHover border border-gray-700 text-textSecondary hover:text-textPrimary"])},b(de.charAt(0).toUpperCase()+de.slice(1)),11,Ha)),64))]),((Ce=d.value[p.value])==null?void 0:Ce.isDefault)!==!1?(g(),v("div",Ba,[...M[18]||(M[18]=[r("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)])])):G("",!0),r("textarea",{value:(($e=d.value[p.value])==null?void 0:$e.content)??"",onInput:M[4]||(M[4]=de=>{const Be=de.target;d.value[p.value]={content:Be.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 ${p.value}-specific reminders (e.g. orchestrator hints, subagent policies)...`},null,40,Wa)]),r("div",Ka,[r("div",za,[M[19]||(M[19]=r("div",null,[r("h3",{class:"text-lg font-semibold"},"Drive Framing Template"),r("p",{class:"text-sm text-textSecondary mt-1"},"Customize the autonomous drive prompt sent when the operator is away")],-1)),r("div",Ja,[C.value?(g(),v("span",qa,b(C.value),1)):G("",!0),r("button",{onClick:ve,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"),r("button",{onClick:ne,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),r("div",Ga,[M[21]||(M[21]=r("label",{class:"text-sm text-textSecondary"},"Drive Activation Period:",-1)),r("div",Ya,[r("span",Za,b(I.value),1),M[20]||(M[20]=r("span",{class:"text-sm text-textSecondary"},"hours",-1))]),M[22]||(M[22]=r("span",{class:"text-xs text-muted"},"(informational — set via DMN_ACTIVATION_HOURS env var)",-1))]),W.value?(g(),v("div",Qa,[...M[23]||(M[23]=[r("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"(Default — edit to override)",-1)])])):G("",!0),r("div",Xa,[M[24]||(M[24]=r("span",{class:"text-sm text-textSecondary self-center"},"Presets:",-1)),(g(!0),v(te,null,be(_.value,de=>(g(),v("button",{key:de.key,onClick:Be=>Se(de),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"},b(de.label),9,ec))),128))]),ee(r("textarea",{"onUpdate:modelValue":M[5]||(M[5]=de=>A.value=de),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),[[le,A.value]]),r("div",tc,[r("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:M[6]||(M[6]=de=>S.value=!S.value)},[(g(),v("svg",{class:Z(["w-4 h-4 text-textSecondary transition-transform",S.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...M[25]||(M[25]=[r("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),M[26]||(M[26]=r("span",{class:"text-sm font-medium text-textSecondary"},"Preview with sample values",-1))]),S.value?(g(),v("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:ie.value},null,8,sc)):G("",!0)]),M[27]||(M[27]=We('<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"},lc={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},ic={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"},mc={key:2,class:"text-center text-textSecondary py-12"},hc={key:3,class:"space-y-2"},xc=["onClick"],gc={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"],kc={key:0,class:"glass rounded-xl p-6"},Cc={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},$c={class:"text-lg font-semibold"},Tc={class:"text-sm text-textSecondary mt-1"},Ec={class:"flex items-center gap-2"},Ac={key:0,class:"text-sm text-success"},Ic={key:1,class:"text-sm text-warn"},Pc={class:"grid grid-cols-1 sm:grid-cols-3 gap-3 mb-4"},Mc=["value"],Oc={class:"flex items-end"},Dc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer pb-2"},Rc=gt({__name:"SkillsTab",setup(e){const t=T([]),s=T(!0),n=T(null),o=T(""),l=T(""),a=T(!1),c=T(""),u=T(""),h=T(!1),d=T(""),p=T(""),y=T(!1),A=T("");async function W(){s.value=!0;try{const K=await ye("/api/skills");t.value=K.skills||[]}finally{s.value=!1}}function C(K){return K?K.includes(".remote-copilot-mcp")&&K.includes("skills")?"user":K.endsWith(".default.md")?"default":K.endsWith(".skill.md")?"project":"unknown":"unknown"}function S(K){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[K]||N.unknown}function _(K){n.value=K,o.value=K.content,l.value=(K.triggers||[]).join(", "),a.value=!!K.replacesOrchestrator,h.value=!1}function I(){n.value=null,u.value=""}function U(K,N,J,ue){let F=`---
65
65
  name: ${K}
66
66
  triggers:
67
- `;return I.forEach(Te=>{se+=` - ${Te.trim()}
68
- `}),J&&(se+=`replaces_orchestrator: true
69
- `),se+=`---
67
+ `;return N.forEach(D=>{F+=` - ${D.trim()}
68
+ `}),J&&(F+=`replaces_orchestrator: true
69
+ `),F+=`---
70
70
 
71
- `,se+me}async function U(){if(!n.value)return;const K=n.value.name;try{const I=r.value.split(",").map(Te=>Te.trim()).filter(Boolean),J=o.value;let me;J.trimStart().startsWith("---")?me=J:me=W(K,I,l.value,J);const se=await fetch(`/api/skills/${encodeURIComponent(K)}`,{method:"PUT",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({content:me})});if(!se.ok)throw new Error(se.statusText);a.value="Saved ✓",setTimeout(()=>{a.value=""},3e3),await B()}catch(I){a.value="Error: "+I.message}}async function ee(){if(!n.value)return;const K=n.value.name;try{const I=await fetch(`/api/skills/${encodeURIComponent(K)}`,{method:"DELETE",headers:{Authorization:`Bearer ${ke()}`}});if(!I.ok)throw new Error(I.statusText);F(),await B()}catch(I){c.value="Error: "+I.message}}async function he(){const K=d.value.trim(),I=p.value;if(!K){A.value="Name is required";return}const J=I.split(",").map(se=>se.trim()).filter(Boolean);if(!J.length){A.value="At least one trigger is required";return}const me=W(K,J,x.value,`\x3C!-- Write your skill instructions here -->
72
- `);try{const se=await fetch(`/api/skills/${encodeURIComponent(K)}`,{method:"PUT",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({content:me})});if(!se.ok)throw new Error(se.statusText);A.value="Created ✓",m.value=!1,await B();const Te=t.value.find($e=>$e.name===K);Te&&P(Te)}catch(se){A.value="Error: "+se.message}}return wt(B),(K,I)=>(_(),C("div",nc,[i("div",oc,[i("div",rc,[I[8]||(I[8]=i("div",null,[i("h3",{class:"text-lg font-semibold"},"Skill Library"),i("p",{class:"text-sm text-textSecondary mt-1"},"Manage intent-routing skills — user overrides, defaults, and project skills")],-1)),i("button",{onClick:I[0]||(I[0]=J=>{m.value=!m.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 ")]),m.value?(_(),C("div",ic,[I[12]||(I[12]=i("h4",{class:"text-sm font-semibold mb-3"},"Create New Skill",-1)),i("div",lc,[i("div",null,[I[9]||(I[9]=i("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),le(i("input",{"onUpdate:modelValue":I[1]||(I[1]=J=>d.value=J),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),[[xe,d.value]])]),i("div",null,[I[10]||(I[10]=i("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),le(i("input",{"onUpdate:modelValue":I[2]||(I[2]=J=>p.value=J),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),[[xe,p.value]])])]),i("div",ac,[i("label",cc,[le(i("input",{"onUpdate:modelValue":I[3]||(I[3]=J=>x.value=J),type:"checkbox",class:"rounded"},null,512),[[lo,x.value]]),I[11]||(I[11]=i("span",null,"Replaces orchestrator",-1))])]),i("div",uc,[i("button",{onClick:he,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Create"),i("button",{onClick:I[4]||(I[4]=J=>m.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"),A.value?(_(),C("span",dc,k(A.value),1)):Q("",!0)])])):Q("",!0),s.value?(_(),C("div",fc,"Loading...")):t.value.length===0?(_(),C("div",pc,"No skills loaded")):(_(),C("div",mc,[(_(!0),C(ie,null,Ce(t.value,J=>{var me;return _(),C("div",{key:J.name,onClick:se=>P(J),class:Y(["glass rounded-xl p-4 cursor-pointer hover:bg-cardHover transition border",((me=n.value)==null?void 0:me.name)===J.name?"border-accent":"border-transparent"])},[i("div",gc,[i("div",xc,[i("div",vc,[i("span",yc,k(J.name),1),i("span",{class:"type-badge",style:Ms(v($(J.source)))},k($(J.source)),5),J.replacesOrchestrator?(_(),C("span",bc,"REPLACES ORCH")):Q("",!0)]),i("div",_c,[(_(!0),C(ie,null,Ce(J.triggers||[],se=>(_(),C("span",{key:se,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},k(se),1))),128))])]),i("div",{class:"text-xs text-muted font-mono shrink-0 max-w-[200px] truncate",title:J.source||""},k((J.source||"").split(/[\\/]/).pop()||""),9,wc)])],10,hc)}),128))]))]),n.value?(_(),C("div",Sc,[i("div",Cc,[i("div",null,[i("h3",kc,"Edit: "+k(n.value.name),1),i("p",Tc,k(n.value.source||"(unknown source)"),1)]),i("div",$c,[a.value?(_(),C("span",Ac,k(a.value),1)):Q("",!0),c.value?(_(),C("span",Ec,k(c.value),1)):Q("",!0),$(n.value.source)==="user"?(_(),C("button",{key:2,onClick:ee,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),i("button",{onClick:F,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"),i("button",{onClick:U,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),i("div",Pc,[i("div",null,[I[13]||(I[13]=i("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),i("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)]),i("div",null,[I[14]||(I[14]=i("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),le(i("input",{"onUpdate:modelValue":I[5]||(I[5]=J=>r.value=J),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),[[xe,r.value]])]),i("div",Ic,[i("label",Oc,[le(i("input",{"onUpdate:modelValue":I[6]||(I[6]=J=>l.value=J),type:"checkbox",class:"rounded"},null,512),[[lo,l.value]]),I[15]||(I[15]=i("span",null,"Replaces orchestrator",-1))])])]),le(i("textarea",{"onUpdate:modelValue":I[7]||(I[7]=J=>o.value=J),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),[[xe,o.value]])])):Q("",!0)]))}}),Rc={class:"animate-fade-in space-y-6"},jc={class:"glass rounded-xl p-6"},Nc={class:"flex flex-wrap items-center justify-between gap-4 mb-2"},Lc={class:"flex items-center gap-3"},Fc={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"],Hc={class:"flex justify-end"},Bc=["disabled"],Wc={key:0,class:"text-center py-12 text-textSecondary"},Kc={key:1,class:"text-center py-8 text-danger text-sm"},zc={key:2,class:"text-center py-12 text-textSecondary"},Jc={key:3},qc={class:"space-y-3"},Gc={class:"p-4"},Yc={class:"flex flex-wrap items-center gap-3"},Zc=["onBlur"],Qc=["onDblclick"],Xc={class:"text-xs text-muted font-mono"},eu=["value","onChange"],tu=["value"],su={class:"text-xs text-muted"},nu=["onKeyup","onBlur"],ou=["title","onDblclick"],ru={class:"ml-auto flex items-center gap-3"},iu={class:"flex items-center gap-1.5"},lu=["onClick"],au={class:"flex items-center gap-1.5"},cu=["onClick"],uu={class:"flex items-center gap-1.5"},du=["onClick"],fu=["onClick"],pu=["onClick"],mu=["onClick"],hu={key:0,class:"mt-3 p-3 rounded-lg bg-surface border border-purple-500/20 space-y-2"},gu={class:"grid grid-cols-1 sm:grid-cols-3 gap-2"},xu=["value"],vu={class:"flex items-center gap-2"},yu=["onClick","disabled"],bu={key:0,class:"border-t border-gray-700/30 bg-surface/30 px-4 py-3 space-y-2"},_u={key:0,class:"text-xs text-muted py-1"},wu={class:"text-sm font-medium"},Su={class:"text-xs text-muted font-mono"},Cu=["value","onChange"],ku=["value"],Tu={class:"text-xs text-muted"},$u={class:"ml-auto flex items-center gap-3"},Au={key:0,class:"flex items-center gap-1.5"},Eu=["onClick"],Pu={key:1,class:"flex items-center gap-1.5"},Mu=["onClick"],Iu=["onClick"],Ou={key:4},Du={class:"space-y-2"},Ru={class:"font-medium"},ju={class:"text-xs text-muted font-mono"},Nu={class:"text-xs text-textSecondary"},Lu={class:"text-xs text-muted"},Fu=["onClick"],Vu={key:5},Uu={class:"space-y-2"},Hu={class:"font-medium"},Bu={class:"text-xs text-muted font-mono"},Wu=["value","onChange"],Ku=["value"],zu={class:"text-xs text-muted"},Ju={class:"ml-auto flex items-center gap-3"},qu={class:"flex items-center gap-1.5"},Gu=["onClick"],Yu={class:"flex items-center gap-1.5"},Zu=["onClick"],Qu=["onClick"],Xu={key:6},ed={class:"space-y-2"},td={class:"font-medium"},sd={class:"text-xs text-muted font-mono"},nd=["value","onChange"],od=["value"],rd={class:"text-xs text-muted"},id=["onClick"],ld=At({__name:"ThreadsTab",setup(e){const t=j([]),s=j(!0),n=j(""),o=j({}),r=j(new Set),l=j(!1),a=j({name:"",threadId:0,client:"claude",workingDirectory:""}),c=j(""),m=j(!1),d=j(null),p=j(""),x=j(null),A=j(""),B=j(null),$=j({name:"",threadId:0,client:"claude",workingDirectory:""}),v=j(""),P=j(!1),F=["claude","copilot","codex","openai_codex","copilot_claude","copilot_codex","cursor"],W={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"}},U=Ke(()=>t.value.filter(L=>L.type==="root")),ee=Ke(()=>t.value.filter(L=>L.type==="daily")),he=Ke(()=>t.value.filter(L=>L.type==="branch")),K=Ke(()=>t.value.filter(L=>L.type==="worker"));async function I(){s.value=!0,n.value="";try{const L=await Se("/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 Se(`/api/threads/${L}/children`);o.value[L]=y.threads??[]}catch{o.value[L]=[]}}function me(L){r.value.has(L)?r.value.delete(L):(r.value.add(L),J(L))}async function se(){if(!(!a.value.name.trim()||!a.value.threadId)){m.value=!0,c.value="";try{const L=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:a.value.threadId,name:a.value.name.trim(),type:"root",client:a.value.client,keepAlive:!1,...a.value.workingDirectory.trim()?{workingDirectory:a.value.workingDirectory.trim()}:{}})});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",workingDirectory:""},l.value=!1,setTimeout(()=>{c.value=""},3e3),await I()}catch(L){c.value="Error: "+L.message}finally{m.value=!1}}}async function Te(L){if(!(!$.value.name.trim()||!$.value.threadId)){P.value=!0,v.value="";try{const y=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:$.value.threadId,name:$.value.name.trim(),type:"branch",rootThreadId:L,client:$.value.client,...$.value.workingDirectory.trim()?{workingDirectory:$.value.workingDirectory.trim()}:{}})});if(!y.ok){const g=await y.json().catch(()=>({error:y.statusText}));throw new Error(g.error??y.statusText)}v.value="Branch created ✓",$.value={name:"",threadId:0,client:"claude",workingDirectory:""},B.value=null,setTimeout(()=>{v.value=""},3e3),await I(),J(L)}catch(y){v.value="Error: "+y.message}finally{P.value=!1}}}function $e(L){d.value=L.threadId,p.value=L.name}async function gt(L){const y=p.value.trim();if(d.value=null,!!y)try{const g=await fetch(`/api/threads/${L}`,{method:"PATCH",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({name:y})});if(!g.ok)throw new Error(g.statusText);await I()}catch(g){n.value="Failed to rename thread: "+g.message}}function Et(L){x.value=L.threadId,A.value=L.workingDirectory??""}async function _e(L){const y=A.value.trim();x.value=null;try{const g=await fetch(`/api/threads/${L}`,{method:"PATCH",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({workingDirectory:y||null})});if(!g.ok)throw new Error(g.statusText);await I()}catch(g){n.value="Failed to update working directory: "+g.message}}async function ae(L){try{const y=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({keepAlive:!L.keepAlive})});if(!y.ok)throw new Error(y.statusText);await I()}catch(y){n.value="Failed to toggle keep-alive: "+y.message}}async function X(L,y){try{const g=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({client:y})});if(!g.ok)throw new Error(g.statusText);await I()}catch(g){n.value="Failed to change agent type: "+g.message}}async function V(L){try{const y=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({dailyRotation:!L.dailyRotation})});if(!y.ok)throw new Error(y.statusText);await I()}catch(y){n.value="Failed to toggle daily rotation: "+y.message}}async function E(L){try{const y=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({autonomousMode:!L.autonomousMode})});if(!y.ok)throw new Error(y.statusText);await I()}catch(y){n.value="Failed to toggle autonomous mode: "+y.message}}async function ye(L){if(confirm(`Archive thread "${L.name}" (${L.threadId})?`))try{const y=await fetch(`/api/threads/${L.threadId}`,{method:"DELETE",headers:{Authorization:`Bearer ${ke()}`}});if(!y.ok)throw new Error(y.statusText);await I()}catch(y){n.value="Failed to archive: "+y.message}}function ge(L){if(!L)return"—";const y=new Date(L),ve=Date.now()-y.getTime();return ve<6e4?"just now":ve<36e5?`${Math.floor(ve/6e4)}m ago`:ve<864e5?`${Math.floor(ve/36e5)}h ago`:y.toLocaleDateString()}function ne(L){return L==="active"?"text-success":L==="archived"?"text-muted":"text-warn"}return wt(I),(L,y)=>(_(),C("div",Rc,[i("div",jc,[i("div",Nc,[y[14]||(y[14]=i("div",null,[i("h3",{class:"text-lg font-semibold"},"Thread Registry"),i("p",{class:"text-sm text-textSecondary mt-1"},"Manage conversation threads, branches, and daily sessions")],-1)),i("div",Lc,[c.value?(_(),C("span",{key:0,class:Y([c.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},k(c.value),3)):Q("",!0),i("button",{onClick:y[0]||(y[0]=g=>l.value=!l.value),class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},k(l.value?"Cancel":"+ New Root Thread"),1),i("button",{onClick:I,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm hover:bg-surface transition"}," ↻ Refresh ")])]),l.value?(_(),C("div",Fc,[i("div",Vc,[i("div",null,[y[15]||(y[15]=i("label",{class:"block text-xs text-textSecondary mb-1"},"Name",-1)),le(i("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),[[xe,a.value.name]])]),i("div",null,[y[16]||(y[16]=i("label",{class:"block text-xs text-textSecondary mb-1"},"Thread ID",-1)),le(i("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),[[xe,a.value.threadId,void 0,{number:!0}]])]),i("div",null,[y[17]||(y[17]=i("label",{class:"block text-xs text-textSecondary mb-1"},"Client",-1)),le(i("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"},[(_(),C(ie,null,Ce(F,g=>i("option",{key:g,value:g},k(g),9,Uc)),64))],512),[[rs,a.value.client]])])]),i("div",null,[y[18]||(y[18]=i("label",{class:"block text-xs text-textSecondary mb-1"},"Working Directory (optional)",-1)),le(i("input",{"onUpdate:modelValue":y[4]||(y[4]=g=>a.value.workingDirectory=g),type:"text",placeholder:"e.g. C:\\src\\my-project",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 font-mono"},null,512),[[xe,a.value.workingDirectory]])]),i("div",Hc,[i("button",{onClick:se,disabled:m.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"},k(m.value?"Creating…":"Create Root Thread"),9,Bc)])])):Q("",!0)]),s.value&&t.value.length===0?(_(),C("div",Wc,"Loading threads…")):n.value?(_(),C("div",Kc,k(n.value),1)):t.value.length===0?(_(),C("div",zc,"No threads registered")):Q("",!0),U.value.length>0?(_(),C("div",Jc,[y[24]||(y[24]=i("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟢 Root Threads",-1)),i("div",qc,[(_(!0),C(ie,null,Ce(U.value,g=>{var ve,Oe;return _(),C("div",{key:g.id,class:"glass rounded-xl overflow-hidden"},[i("div",Gc,[i("div",Yc,[i("span",{class:Y(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(ve=W[g.type])==null?void 0:ve.classes])},k((Oe=W[g.type])==null?void 0:Oe.emoji)+" "+k(g.type.toUpperCase()),3),d.value===g.threadId?le((_(),C("input",{key:0,"onUpdate:modelValue":y[5]||(y[5]=O=>p.value=O),onBlur:O=>gt(g.threadId),onKeyup:[y[6]||(y[6]=zt(O=>O.target.blur(),["enter"])),y[7]||(y[7]=zt(O=>d.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,Zc)),[[xe,p.value]]):(_(),C("span",{key:1,class:"font-semibold cursor-pointer hover:text-accent transition",onDblclick:O=>$e(g),title:"Double-click to rename"},k(g.name),41,Qc)),i("span",{class:Y(["text-xs font-medium",ne(g.status)])},k(g.status),3),i("span",Xc,"ID: "+k(g.threadId),1),i("select",{value:g.client,onChange:O=>X(g,O.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"},[(_(),C(ie,null,Ce(F,O=>i("option",{key:O,value:O},k(O),9,tu)),64))],40,eu),i("span",su,k(ge(g.lastActiveAt)),1),x.value===g.threadId?le((_(),C("input",{key:2,"onUpdate:modelValue":y[8]||(y[8]=O=>A.value=O),onKeyup:[zt(O=>_e(g.threadId),["enter"]),y[9]||(y[9]=zt(O=>x.value=null,["escape"]))],onBlur:O=>_e(g.threadId),type:"text",placeholder:"Set working directory…",class:"text-xs font-mono bg-card border border-accent rounded px-1 py-0 text-textPrimary focus:outline-none w-48"},null,40,nu)),[[xe,A.value]]):(_(),C("span",{key:3,class:"text-xs text-muted font-mono truncate max-w-[200px] cursor-pointer hover:text-accent transition",title:(g.workingDirectory??"Click to set CWD")+" (dblclick to edit)",onDblclick:O=>Et(g)},"📁 "+k(g.workingDirectory??"—"),41,ou)),i("div",ru,[i("div",iu,[i("button",{onClick:O=>ae(g),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[i("span",{class:Y(["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,lu),y[19]||(y[19]=i("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),i("div",au,[i("button",{onClick:O=>V(g),class:Y(["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"},[i("span",{class:Y(["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,cu),y[20]||(y[20]=i("span",{class:"text-xs text-muted"},"Daily",-1))]),i("div",uu,[i("button",{onClick:O=>E(g),class:Y(["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"},[i("span",{class:Y(["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,du),y[21]||(y[21]=i("span",{class:"text-xs text-muted"},"Auto",-1))]),i("button",{onClick:O=>me(g.threadId),class:"px-2 py-1 rounded-lg text-xs bg-card border border-gray-700 hover:bg-surface transition"},k(r.value.has(g.threadId)?"▾ Children":"▸ Children"),9,fu),i("button",{onClick:O=>{B.value=B.value===g.threadId?null:g.threadId,$.value={name:"",threadId:0,client:"claude"},v.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,pu),i("button",{onClick:O=>ye(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,mu)])]),B.value===g.threadId?(_(),C("div",hu,[i("div",gu,[le(i("input",{"onUpdate:modelValue":y[10]||(y[10]=O=>$.value.name=O),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),[[xe,$.value.name]]),le(i("input",{"onUpdate:modelValue":y[11]||(y[11]=O=>$.value.threadId=O),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),[[xe,$.value.threadId,void 0,{number:!0}]]),le(i("select",{"onUpdate:modelValue":y[12]||(y[12]=O=>$.value.client=O),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"},[(_(),C(ie,null,Ce(F,O=>i("option",{key:O,value:O},k(O),9,xu)),64))],512),[[rs,$.value.client]])]),le(i("input",{"onUpdate:modelValue":y[13]||(y[13]=O=>$.value.workingDirectory=O),type:"text",placeholder:"Working directory (optional)",class:"w-full 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 font-mono"},null,512),[[xe,$.value.workingDirectory]]),i("div",vu,[i("button",{onClick:O=>Te(g.threadId),disabled:P.value||!$.value.name.trim()||!$.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"},k(P.value?"Creating…":"Create Branch"),9,yu),v.value?(_(),C("span",{key:0,class:Y([v.value.startsWith("Error")?"text-danger":"text-success","text-xs"])},k(v.value),3)):Q("",!0)])])):Q("",!0)]),r.value.has(g.threadId)&&o.value[g.threadId]?(_(),C("div",bu,[o.value[g.threadId].length===0?(_(),C("div",_u,"No children")):Q("",!0),(_(!0),C(ie,null,Ce(o.value[g.threadId],O=>{var xt,Ls;return _(),C("div",{key:O.id,class:"flex flex-wrap items-center gap-2 px-3 py-2 rounded-lg bg-card/50 border border-gray-700/30"},[i("span",{class:Y(["inline-flex items-center gap-1 px-1.5 py-0.5 rounded-full text-xs font-medium border",(xt=W[O.type])==null?void 0:xt.classes])},k((Ls=W[O.type])==null?void 0:Ls.emoji)+" "+k(O.type.toUpperCase()),3),i("span",wu,k(O.name),1),i("span",{class:Y(["text-xs",ne(O.status)])},k(O.status),3),i("span",Su,"ID: "+k(O.threadId),1),i("select",{value:O.client,onChange:u=>X(O,u.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"},[(_(),C(ie,null,Ce(F,u=>i("option",{key:u,value:u},k(u),9,ku)),64))],40,Cu),i("span",Tu,k(ge(O.lastActiveAt)),1),i("div",$u,[O.type==="branch"?(_(),C("div",Au,[i("button",{onClick:u=>ae(O),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",O.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[i("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",O.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,Eu),y[22]||(y[22]=i("span",{class:"text-xs text-muted"},"Keep-alive",-1))])):Q("",!0),O.type==="branch"?(_(),C("div",Pu,[i("button",{onClick:u=>E(O),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",O.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[i("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",O.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,Mu),y[23]||(y[23]=i("span",{class:"text-xs text-muted"},"Auto",-1))])):Q("",!0),O.type!=="root"?(_(),C("button",{key:2,onClick:u=>ye(O),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),ee.value.length>0?(_(),C("div",Ou,[y[25]||(y[25]=i("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🔵 Daily Sessions",-1)),i("div",Du,[(_(!0),C(ie,null,Ce(ee.value,g=>{var ve,Oe;return _(),C("div",{key:g.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[i("span",{class:Y(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(ve=W[g.type])==null?void 0:ve.classes])},k((Oe=W[g.type])==null?void 0:Oe.emoji)+" "+k(g.type.toUpperCase()),3),i("span",Ru,k(g.name),1),i("span",{class:Y(["text-xs font-medium",ne(g.status)])},k(g.status),3),i("span",ju,"ID: "+k(g.threadId),1),i("span",Nu,k(g.client),1),i("span",Lu,k(ge(g.lastActiveAt)),1),i("button",{onClick:O=>ye(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,Fu)])}),128))])])):Q("",!0),he.value.length>0?(_(),C("div",Vu,[y[28]||(y[28]=i("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟣 Branches",-1)),i("div",Uu,[(_(!0),C(ie,null,Ce(he.value,g=>{var ve,Oe;return _(),C("div",{key:g.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[i("span",{class:Y(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(ve=W[g.type])==null?void 0:ve.classes])},k((Oe=W[g.type])==null?void 0:Oe.emoji)+" "+k(g.type.toUpperCase()),3),i("span",Hu,k(g.name),1),i("span",{class:Y(["text-xs font-medium",ne(g.status)])},k(g.status),3),i("span",Bu,"ID: "+k(g.threadId),1),i("select",{value:g.client,onChange:O=>X(g,O.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"},[(_(),C(ie,null,Ce(F,O=>i("option",{key:O,value:O},k(O),9,Ku)),64))],40,Wu),i("span",zu,k(ge(g.lastActiveAt)),1),i("div",Ju,[i("div",qu,[i("button",{onClick:O=>ae(g),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[i("span",{class:Y(["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,Gu),y[26]||(y[26]=i("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),i("div",Yu,[i("button",{onClick:O=>E(g),class:Y(["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"},[i("span",{class:Y(["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,Zu),y[27]||(y[27]=i("span",{class:"text-xs text-muted"},"Auto",-1))]),i("button",{onClick:O=>ye(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,Qu)])])}),128))])])):Q("",!0),K.value.length>0?(_(),C("div",Xu,[y[29]||(y[29]=i("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟡 Workers",-1)),i("div",ed,[(_(!0),C(ie,null,Ce(K.value,g=>{var ve,Oe;return _(),C("div",{key:g.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[i("span",{class:Y(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(ve=W[g.type])==null?void 0:ve.classes])},k((Oe=W[g.type])==null?void 0:Oe.emoji)+" "+k(g.type.toUpperCase()),3),i("span",td,k(g.name),1),i("span",{class:Y(["text-xs font-medium",ne(g.status)])},k(g.status),3),i("span",sd,"ID: "+k(g.threadId),1),i("select",{value:g.client,onChange:O=>X(g,O.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"},[(_(),C(ie,null,Ce(F,O=>i("option",{key:O,value:O},k(O),9,od)),64))],40,nd),i("span",rd,k(ge(g.lastActiveAt)),1),i("button",{onClick:O=>ye(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,id)])}),128))])])):Q("",!0)]))}}),ad={class:"animate-fade-in"},cd={class:"glass rounded-xl p-6 mb-6"},ud={class:"flex flex-wrap items-center justify-between gap-4 mb-6"},dd={class:"flex items-center gap-3"},fd=["disabled"],pd={key:0,class:"text-center py-8 text-textSecondary text-sm"},md={key:1,class:"space-y-6"},hd={class:"glass rounded-xl p-4 border border-gray-700/50"},gd={class:"flex items-center gap-4"},xd={class:"flex justify-between text-xs text-muted mt-2"},vd={class:"font-mono"},yd={key:0,class:"mt-3 px-3 py-2 rounded-lg bg-warn/10 border border-warn/20 text-xs text-warn"},bd={class:"glass rounded-xl p-4 border border-gray-700/50"},_d={class:"flex items-center gap-4"},wd={class:"flex justify-between text-xs text-muted mt-2"},Sd={class:"font-mono"},Cd={class:"glass rounded-xl p-4 border border-gray-700/50"},kd={class:"glass rounded-xl p-4 border border-gray-700/50"},Td={class:"glass rounded-xl p-4 border border-gray-700/30 bg-surface/30"},$d={class:"grid grid-cols-2 gap-4"},Ad={class:"text-sm font-medium text-textSecondary"},Ed={class:"text-sm font-medium font-mono text-textSecondary"},Pd={class:"text-sm font-medium font-mono text-textSecondary"},Md={class:"mt-3"},Id=At({__name:"SettingsTab",setup(e){const t=j(!0),s=j(!1),n=j(""),o=j(50),r=j(50),l=j(1440),a=j(1440),c=j("claude-opus-4-6"),m=j("claude-opus-4-6"),d=j("claude-sonnet-4-5"),p=j("claude-sonnet-4-5"),x=Ke(()=>o.value!==r.value||l.value!==a.value||c.value!==m.value||d.value!==p.value);async function A(){t.value=!0;try{const[$,v,P,F]=await Promise.all([Se("/api/settings/bootstrap-message-count"),Se("/api/settings/wait-timeout"),Se("/api/settings/default-thread-model"),Se("/api/settings/default-worker-model")]);o.value=$.count,r.value=$.count,l.value=v.minutes,a.value=v.minutes,c.value=P.defaultThreadModel,m.value=P.defaultThreadModel,d.value=F.defaultWorkerModel,p.value=F.defaultWorkerModel}finally{t.value=!1}}async function B(){if(s.value=!0,n.value="",!c.value){n.value="Error: Thread model cannot be empty",s.value=!1;return}if(!d.value){n.value="Error: Worker model cannot be empty",s.value=!1;return}try{const $={Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},[v,P,F,W]=await Promise.all([fetch("/api/settings/bootstrap-message-count",{method:"POST",headers:$,body:JSON.stringify({count:o.value})}),fetch("/api/settings/wait-timeout",{method:"POST",headers:$,body:JSON.stringify({minutes:l.value})}),fetch("/api/settings/default-thread-model",{method:"POST",headers:$,body:JSON.stringify({model:c.value})}),fetch("/api/settings/default-worker-model",{method:"POST",headers:$,body:JSON.stringify({model:d.value})})]);for(const I of[v,P,F,W])if(!I.ok){const J=await I.json().catch(()=>({error:I.statusText}));throw new Error(J.error??I.statusText)}const U=await v.json(),ee=await P.json(),he=await F.json(),K=await W.json();r.value=U.count,o.value=U.count,a.value=ee.minutes,l.value=ee.minutes,m.value=he.defaultThreadModel,c.value=he.defaultThreadModel,p.value=K.defaultWorkerModel,d.value=K.defaultWorkerModel,n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3)}catch($){n.value="Error: "+$.message}finally{s.value=!1}}return wt(A),($,v)=>(_(),C("div",ad,[i("div",cd,[i("div",ud,[v[6]||(v[6]=i("div",null,[i("h3",{class:"text-lg font-semibold"},"Settings"),i("p",{class:"text-sm text-textSecondary mt-1"},"Configure agent behavior and context injection")],-1)),i("div",dd,[n.value?(_(),C("span",{key:0,class:Y([n.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},k(n.value),3)):Q("",!0),i("button",{onClick:B,disabled:s.value||t.value||!x.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},k(s.value?"Saving…":"Save"),9,fd)])]),t.value?(_(),C("div",pd,"Loading…")):(_(),C("div",md,[i("div",hd,[v[10]||(v[10]=i("label",{class:"block text-sm font-medium mb-1"},"Recent Conversation Buffer",-1)),v[11]||(v[11]=i("p",{class:"text-xs text-textSecondary mb-3"},[He(" Number of recent messages injected into the agent's bootstrap context. Set to "),i("span",{class:"font-mono text-accentLight"},"0"),He(" to disable (useful when using VS Code, which maintains its own conversation history). ")],-1)),i("div",gd,[le(i("input",{"onUpdate:modelValue":v[0]||(v[0]=P=>o.value=P),type:"range",min:"0",max:"100",step:"5",class:"flex-1 accent-accent"},null,512),[[xe,o.value,void 0,{number:!0}]]),le(i("input",{"onUpdate:modelValue":v[1]||(v[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),[[xe,o.value,void 0,{number:!0}]])]),i("div",xd,[v[7]||(v[7]=i("span",null,"Off",-1)),i("span",vd,k(o.value)+" messages",1),v[8]||(v[8]=i("span",null,"Max",-1))]),o.value===0?(_(),C("div",yd,[...v[9]||(v[9]=[He(" Message buffer injection is ",-1),i("strong",null,"disabled",-1),He(". 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)]),i("div",bd,[v[14]||(v[14]=i("label",{class:"block text-sm font-medium mb-1"},"Poll Timeout (wait_for_instructions)",-1)),v[15]||(v[15]=i("p",{class:"text-xs text-textSecondary mb-3"},[He(" Maximum time (in minutes) a single "),i("span",{class:"font-mono text-accentLight"},"wait_for_instructions"),He(" call will poll before timing out. Claude Code agents use the full value; Copilot agents are capped at 10 min. ")],-1)),i("div",_d,[le(i("input",{"onUpdate:modelValue":v[2]||(v[2]=P=>l.value=P),type:"range",min:"1",max:"1440",step:"10",class:"flex-1 accent-accent"},null,512),[[xe,l.value,void 0,{number:!0}]]),le(i("input",{"onUpdate:modelValue":v[3]||(v[3]=P=>l.value=P),type:"number",min:"1",max:"10080",class:"w-24 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),[[xe,l.value,void 0,{number:!0}]])]),i("div",wd,[v[12]||(v[12]=i("span",null,"1 min",-1)),i("span",Sd,k(l.value>=60?Math.floor(l.value/60)+"h "+l.value%60+"m":l.value+" min"),1),v[13]||(v[13]=i("span",null,"24h",-1))])]),i("div",Cd,[v[16]||(v[16]=i("label",{class:"block text-sm font-medium mb-1"},"Default Thread Model",-1)),v[17]||(v[17]=i("p",{class:"text-xs text-textSecondary mb-3"},[He(" Model used when spawning a normal (orchestrator) Claude thread. Overridden by the "),i("span",{class:"font-mono text-accentLight"},"CLAUDE_MODEL"),He(" env var if set. ")],-1)),le(i("input",{"onUpdate:modelValue":v[4]||(v[4]=P=>c.value=P),type:"text",placeholder:"claude-opus-4-6",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),[[xe,c.value,void 0,{trim:!0}]])]),i("div",kd,[v[18]||(v[18]=i("label",{class:"block text-sm font-medium mb-1"},"Default Worker Model",-1)),v[19]||(v[19]=i("p",{class:"text-xs text-textSecondary mb-3"},[He(" Model used when spawning a worker Claude thread. Overridden by the "),i("span",{class:"font-mono text-accentLight"},"CLAUDE_WORKER_MODEL"),He(" env var if set. ")],-1)),le(i("input",{"onUpdate:modelValue":v[5]||(v[5]=P=>d.value=P),type:"text",placeholder:"claude-sonnet-4-5",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),[[xe,d.value,void 0,{trim:!0}]])]),i("div",Td,[v[24]||(v[24]=i("div",{class:"text-xs font-medium text-textSecondary uppercase tracking-wider mb-3"},"Current State",-1)),i("div",$d,[i("div",null,[v[20]||(v[20]=i("div",{class:"text-xs text-muted mb-1"},"Message Buffer",-1)),i("span",{class:Y(["text-sm font-medium",r.value>0?"text-success":"text-textSecondary"])},k(r.value>0?`${r.value} messages`:"Disabled"),3)]),i("div",null,[v[21]||(v[21]=i("div",{class:"text-xs text-muted mb-1"},"Poll Timeout",-1)),i("span",Ad,k(a.value>=60?Math.floor(a.value/60)+"h "+a.value%60+"m":a.value+" min"),1)]),i("div",null,[v[22]||(v[22]=i("div",{class:"text-xs text-muted mb-1"},"Thread Model",-1)),i("span",Ed,k(m.value),1)]),i("div",null,[v[23]||(v[23]=i("div",{class:"text-xs text-muted mb-1"},"Worker Model",-1)),i("span",Pd,k(p.value),1)])]),i("div",Md,[i("span",{class:Y(["text-sm font-medium",x.value?"text-warn":"text-textSecondary"])},k(x.value?"Unsaved changes":"Saved"),3)])])]))])]))}}),Od={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-surface/95 backdrop-blur-sm"},Dd={class:"glass rounded-2xl p-8 max-w-md w-full mx-4 animate-slide-up"},Rd=["disabled"],jd={key:0,class:"mt-3 text-sm text-danger"},Nd={key:1,class:"min-h-screen font-sans text-textPrimary animate-fade-in"},Ld={class:"glass sticky top-0 z-40 border-b border-gray-800/50"},Fd={class:"max-w-7xl mx-auto px-4 sm:px-6 py-4 flex items-center justify-between"},Vd={class:"flex items-center gap-4"},Ud={class:"text-sm text-textSecondary font-mono"},Hd={class:"max-w-7xl mx-auto px-4 sm:px-6 py-6"},Bd={class:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3"},Wd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Kd={class:"text-2xl font-bold font-mono"},zd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Jd={class:"text-2xl font-bold font-mono"},qd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Gd={class:"text-2xl font-bold font-mono"},Yd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Zd={class:"flex items-center gap-2 mb-2"},Qd={class:"text-2xl font-bold font-mono"},Xd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},ef={class:"text-2xl font-bold font-mono"},tf={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},sf={class:"text-2xl font-bold font-mono"},nf={class:"max-w-7xl mx-auto px-4 sm:px-6"},of={class:"flex gap-6 border-b border-gray-800/50 mb-6"},rf=["onClick"],lf={class:"max-w-7xl mx-auto px-4 sm:px-6 pb-12"},ps="sensorium_token",af=At({__name:"App",setup(e){const t=j(!1),s=j(""),n=j(""),o=j(!1),r=j(null),l=j("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"}],m={sessions:oa,notes:wa,templates:sc,skills:Dc,threads:ld,settings:Id},d=Ke(()=>m[l.value]),p=Ke(()=>{if(!r.value)return"—";const v=Math.floor(r.value.uptime),P=Math.floor(v/86400),F=Math.floor(v%86400/3600),W=Math.floor(v%3600/60);return P>0?`${P}d ${F}h`:F>0?`${F}h ${W}m`:`${W}m`});async function x(){const v=s.value.trim()||"no-auth";o.value=!0,n.value="";try{Wt(v),await B(),localStorage.setItem(ps,v),t.value=!0,$()}catch(P){const F=P;F.status===401?n.value="Invalid token":n.value=F.message??"Connection failed",Wt("")}finally{o.value=!1}}function A(){localStorage.removeItem(ps),t.value=!1,s.value="",r.value=null,a&&clearInterval(a),Wt("")}async function B(){r.value=await Se("/api/status")}function $(){a&&clearInterval(a),a=setInterval(B,3e4)}return wt(async()=>{const v=localStorage.getItem(ps);if(v){s.value=v;try{Wt(v),await B(),t.value=!0,$()}catch{localStorage.removeItem(ps),Wt("")}}}),_n(()=>{a&&clearInterval(a)}),(v,P)=>{var F,W,U,ee,he,K,I,J,me,se,Te;return t.value?(_(),C("div",Nd,[i("header",Ld,[i("div",Fd,[P[3]||(P[3]=We('<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)),i("div",Vd,[P[2]||(P[2]=i("div",{class:"flex items-center gap-2 text-sm"},[i("span",{class:"w-2 h-2 rounded-full bg-success animate-pulse-slow"}),i("span",{class:"text-textSecondary"},"Connected")],-1)),i("div",Ud,k(p.value),1),i("button",{onClick:A,class:"text-sm text-muted hover:text-textSecondary transition"},"Disconnect")])])]),i("div",Hd,[i("div",Bd,[i("div",Wd,[P[4]||(P[4]=We('<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)),i("div",Kd,k(((F=r.value)==null?void 0:F.activeSessions)??0),1)]),i("div",zd,[P[5]||(P[5]=We('<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)),i("div",Jd,k(((U=(W=r.value)==null?void 0:W.memory)==null?void 0:U.totalSemanticNotes)??0),1)]),i("div",qd,[P[6]||(P[6]=We('<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)),i("div",Gd,k(((he=(ee=r.value)==null?void 0:ee.memory)==null?void 0:he.totalEpisodes)??0),1)]),i("div",Yd,[i("div",Zd,[i("span",{class:Y((((I=(K=r.value)==null?void 0:K.memory)==null?void 0:I.unconsolidatedEpisodes)??0)>10?"text-danger":"text-success")},[...P[7]||(P[7]=[i("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[i("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]=i("span",{class:"text-xs text-textSecondary font-medium uppercase tracking-wider"},"Unconsolidated",-1))]),i("div",Qd,k(((me=(J=r.value)==null?void 0:J.memory)==null?void 0:me.unconsolidatedEpisodes)??0),1)]),i("div",Xd,[P[9]||(P[9]=We('<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)),i("div",ef,k(((Te=(se=r.value)==null?void 0:se.memory)==null?void 0:Te.totalProcedures)??0),1)]),i("div",tf,[P[10]||(P[10]=We('<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)),i("div",sf,k(p.value),1)])])]),i("div",nf,[i("nav",of,[(_(),C(ie,null,Ce(c,$e=>i("button",{key:$e.id,onClick:gt=>l.value=$e.id,class:Y(["pb-3 text-sm font-medium transition",l.value===$e.id?"tab-active":"tab-inactive"])},k($e.label),11,rf)),64))])]),i("div",lf,[(_(),dr(Ai(d.value),{status:r.value},null,8,["status"]))])])):(_(),C("div",Od,[i("div",Dd,[P[1]||(P[1]=We('<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)),le(i("input",{"onUpdate:modelValue":P[0]||(P[0]=$e=>s.value=$e),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:zt(x,["enter"])},null,544),[[xe,s.value]]),i("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"},k(o.value?"Connecting...":"Connect"),9,Rd),n.value?(_(),C("p",jd,k(n.value),1)):Q("",!0)])]))}}});Ul(af).mount("#app");</script>
71
+ `,F+ue}async function V(){if(!n.value)return;const K=n.value.name;try{const N=l.value.split(",").map(D=>D.trim()).filter(Boolean),J=o.value;let ue;J.trimStart().startsWith("---")?ue=J:ue=U(K,N,a.value,J);const F=await fetch(`/api/skills/${encodeURIComponent(K)}`,{method:"PUT",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({content:ue})});if(!F.ok)throw new Error(F.statusText);c.value="Saved ✓",setTimeout(()=>{c.value=""},3e3),await W()}catch(N){c.value="Error: "+N.message}}async function se(){if(!n.value)return;const K=n.value.name;try{const N=await fetch(`/api/skills/${encodeURIComponent(K)}`,{method:"DELETE",headers:{Authorization:`Bearer ${_e()}`}});if(!N.ok)throw new Error(N.statusText);I(),await W()}catch(N){u.value="Error: "+N.message}}async function oe(){const K=d.value.trim(),N=p.value;if(!K){A.value="Name is required";return}const J=N.split(",").map(F=>F.trim()).filter(Boolean);if(!J.length){A.value="At least one trigger is required";return}const ue=U(K,J,y.value,`\x3C!-- Write your skill instructions here -->
72
+ `);try{const F=await fetch(`/api/skills/${encodeURIComponent(K)}`,{method:"PUT",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({content:ue})});if(!F.ok)throw new Error(F.statusText);A.value="Created ✓",h.value=!1,await W();const D=t.value.find(H=>H.name===K);D&&_(D)}catch(F){A.value="Error: "+F.message}}return lt(W),(K,N)=>(g(),v("div",oc,[r("div",rc,[r("div",lc,[N[8]||(N[8]=r("div",null,[r("h3",{class:"text-lg font-semibold"},"Skill Library"),r("p",{class:"text-sm text-textSecondary mt-1"},"Manage intent-routing skills — user overrides, defaults, and project skills")],-1)),r("button",{onClick:N[0]||(N[0]=J=>{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?(g(),v("div",ic,[N[12]||(N[12]=r("h4",{class:"text-sm font-semibold mb-3"},"Create New Skill",-1)),r("div",ac,[r("div",null,[N[9]||(N[9]=r("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),ee(r("input",{"onUpdate:modelValue":N[1]||(N[1]=J=>d.value=J),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),[[le,d.value]])]),r("div",null,[N[10]||(N[10]=r("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),ee(r("input",{"onUpdate:modelValue":N[2]||(N[2]=J=>p.value=J),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),[[le,p.value]])])]),r("div",cc,[r("label",uc,[ee(r("input",{"onUpdate:modelValue":N[3]||(N[3]=J=>y.value=J),type:"checkbox",class:"rounded"},null,512),[[ao,y.value]]),N[11]||(N[11]=r("span",null,"Replaces orchestrator",-1))])]),r("div",dc,[r("button",{onClick:oe,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Create"),r("button",{onClick:N[4]||(N[4]=J=>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"),A.value?(g(),v("span",fc,b(A.value),1)):G("",!0)])])):G("",!0),s.value?(g(),v("div",pc,"Loading...")):t.value.length===0?(g(),v("div",mc,"No skills loaded")):(g(),v("div",hc,[(g(!0),v(te,null,be(t.value,J=>{var ue;return g(),v("div",{key:J.name,onClick:F=>_(J),class:Z(["glass rounded-xl p-4 cursor-pointer hover:bg-cardHover transition border",((ue=n.value)==null?void 0:ue.name)===J.name?"border-accent":"border-transparent"])},[r("div",gc,[r("div",vc,[r("div",yc,[r("span",bc,b(J.name),1),r("span",{class:"type-badge",style:Lt(S(C(J.source)))},b(C(J.source)),5),J.replacesOrchestrator?(g(),v("span",_c,"REPLACES ORCH")):G("",!0)]),r("div",wc,[(g(!0),v(te,null,be(J.triggers||[],F=>(g(),v("span",{key:F,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},b(F),1))),128))])]),r("div",{class:"text-xs text-muted font-mono shrink-0 max-w-[200px] truncate",title:J.source||""},b((J.source||"").split(/[\\/]/).pop()||""),9,Sc)])],10,xc)}),128))]))]),n.value?(g(),v("div",kc,[r("div",Cc,[r("div",null,[r("h3",$c,"Edit: "+b(n.value.name),1),r("p",Tc,b(n.value.source||"(unknown source)"),1)]),r("div",Ec,[c.value?(g(),v("span",Ac,b(c.value),1)):G("",!0),u.value?(g(),v("span",Ic,b(u.value),1)):G("",!0),C(n.value.source)==="user"?(g(),v("button",{key:2,onClick:se,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")):G("",!0),r("button",{onClick:I,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"),r("button",{onClick:V,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),r("div",Pc,[r("div",null,[N[13]||(N[13]=r("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),r("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)]),r("div",null,[N[14]||(N[14]=r("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),ee(r("input",{"onUpdate:modelValue":N[5]||(N[5]=J=>l.value=J),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),[[le,l.value]])]),r("div",Oc,[r("label",Dc,[ee(r("input",{"onUpdate:modelValue":N[6]||(N[6]=J=>a.value=J),type:"checkbox",class:"rounded"},null,512),[[ao,a.value]]),N[15]||(N[15]=r("span",null,"Replaces orchestrator",-1))])])]),ee(r("textarea",{"onUpdate:modelValue":N[7]||(N[7]=J=>o.value=J),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),[[le,o.value]])])):G("",!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"},Uc={class:"flex items-center gap-3"},Vc={key:0,class:"mt-4 p-4 rounded-xl bg-surface border border-gray-700/50 space-y-3"},Fc={class:"grid grid-cols-1 sm:grid-cols-3 gap-3"},Hc=["value"],Bc={class:"flex justify-end"},Wc=["disabled"],Kc={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=["onKeyup","onBlur"],ru=["title","onDblclick"],lu={class:"ml-auto flex items-center gap-3"},iu=["onClick","disabled"],au={class:"flex items-center gap-1.5"},cu=["onClick"],uu={class:"flex items-center gap-1.5"},du=["onClick"],fu={class:"flex items-center gap-1.5"},pu=["onClick"],mu=["onClick"],hu=["onClick"],xu=["onClick"],gu={key:0,class:"mt-3 p-3 rounded-lg bg-surface border border-purple-500/20 space-y-2"},vu={class:"grid grid-cols-1 sm:grid-cols-3 gap-2"},yu=["value"],bu={class:"flex items-center gap-2"},_u=["onClick","disabled"],wu={key:0,class:"border-t border-gray-700/30 bg-surface/30 px-4 py-3 space-y-2"},Su={key:0,class:"text-xs text-muted py-1"},ku={class:"text-sm font-medium"},Cu={class:"text-xs text-muted font-mono"},$u=["value","onChange"],Tu=["value"],Eu={class:"text-xs text-muted"},Au={class:"ml-auto flex items-center gap-3"},Iu=["onClick","disabled"],Pu=["onClick","disabled"],Mu=["onClick","disabled"],Ou={key:2,class:"flex items-center gap-1.5"},Du=["onClick"],Ru={key:3,class:"flex items-center gap-1.5"},ju=["onClick"],Nu=["onClick"],Lu={key:4},Uu={class:"space-y-2"},Vu={class:"font-medium"},Fu={class:"text-xs text-muted font-mono"},Hu={class:"text-xs text-textSecondary"},Bu={class:"text-xs text-muted"},Wu={class:"ml-auto flex items-center gap-2"},Ku=["onClick","disabled"],zu=["onClick","disabled"],Ju=["onClick"],qu={key:5},Gu={class:"space-y-2"},Yu={class:"font-medium"},Zu={class:"text-xs text-muted font-mono"},Qu=["value","onChange"],Xu=["value"],ed={class:"text-xs text-muted"},td={class:"ml-auto flex items-center gap-3"},sd=["onClick","disabled"],nd=["onClick","disabled"],od={class:"flex items-center gap-1.5"},rd=["onClick"],ld={class:"flex items-center gap-1.5"},id=["onClick"],ad=["onClick"],cd={key:6},ud={class:"space-y-2"},dd={class:"font-medium"},fd={class:"text-xs text-muted font-mono"},pd=["value","onChange"],md=["value"],hd={class:"text-xs text-muted"},xd={class:"ml-auto flex items-center gap-2"},gd=["onClick","disabled"],vd=["onClick","disabled"],yd=["onClick"],bd=gt({__name:"ThreadsTab",setup(e){const t=T([]),s=T(!0),n=T(""),o=T({}),l=T(new Set),a=T(!1),c=T({name:"",threadId:0,client:"claude",workingDirectory:""}),u=T(""),h=T(!1),d=T(null),p=T(""),y=T(null),A=T(""),W=T(null),C=T({name:"",threadId:0,client:"claude",workingDirectory:""}),S=T(""),_=T(!1),I=T(null),U=T(null),V=T(null),se=["claude","copilot","codex","openai_codex","copilot_claude","copilot_codex","cursor"],oe={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"}},K=Fe(()=>t.value.filter(R=>R.type==="root")),N=Fe(()=>t.value.filter(R=>R.type==="daily")),J=Fe(()=>t.value.filter(R=>R.type==="branch")),ue=Fe(()=>t.value.filter(R=>R.type==="worker"));async function F(){s.value=!0,n.value="";try{const R=await ye("/api/threads");t.value=R.threads??[]}catch(R){n.value=R.message||"Failed to load threads"}finally{s.value=!1}}async function D(R){try{const w=await ye(`/api/threads/${R}/children`);o.value[R]=w.threads??[]}catch{o.value[R]=[]}}function H(R){l.value.has(R)?l.value.delete(R):(l.value.add(R),D(R))}async function ne(){if(!(!c.value.name.trim()||!c.value.threadId)){h.value=!0,u.value="";try{const R=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:c.value.threadId,name:c.value.name.trim(),type:"root",client:c.value.client,keepAlive:!0,...c.value.workingDirectory.trim()?{workingDirectory:c.value.workingDirectory.trim()}:{}})});if(!R.ok){const w=await R.json().catch(()=>({error:R.statusText}));throw new Error(w.error??R.statusText)}u.value="Created ✓",c.value={name:"",threadId:0,client:"claude",workingDirectory:""},a.value=!1,setTimeout(()=>{u.value=""},3e3),await F()}catch(R){u.value="Error: "+R.message}finally{h.value=!1}}}async function ve(R){if(!(!C.value.name.trim()||!C.value.threadId)){_.value=!0,S.value="";try{const w=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:C.value.threadId,name:C.value.name.trim(),type:"branch",rootThreadId:R,client:C.value.client,...C.value.workingDirectory.trim()?{workingDirectory:C.value.workingDirectory.trim()}:{}})});if(!w.ok){const i=await w.json().catch(()=>({error:w.statusText}));throw new Error(i.error??w.statusText)}S.value="Branch created ✓",C.value={name:"",threadId:0,client:"claude",workingDirectory:""},W.value=null,setTimeout(()=>{S.value=""},3e3),await F(),D(R)}catch(w){S.value="Error: "+w.message}finally{_.value=!1}}}function Se(R){d.value=R.threadId,p.value=R.name}async function pe(R){const w=p.value.trim();if(d.value=null,!!w)try{const i=await fetch(`/api/threads/${R}`,{method:"PATCH",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({name:w})});if(!i.ok)throw new Error(i.statusText);await F()}catch(i){n.value="Failed to rename thread: "+i.message}}function ie(R){y.value=R.threadId,A.value=R.workingDirectory??""}async function B(R){const w=A.value.trim();y.value=null;try{const i=await fetch(`/api/threads/${R}`,{method:"PATCH",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({workingDirectory:w||null})});if(!i.ok)throw new Error(i.statusText);await F()}catch(i){n.value="Failed to update working directory: "+i.message}}async function M(R){try{const w=await fetch(`/api/threads/${R.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({keepAlive:!R.keepAlive})});if(!w.ok)throw new Error(w.statusText);await F()}catch(w){n.value="Failed to toggle keep-alive: "+w.message}}async function Ce(R,w){try{const i=await fetch(`/api/threads/${R.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({client:w})});if(!i.ok)throw new Error(i.statusText);await F()}catch(i){n.value="Failed to change agent type: "+i.message}}async function $e(R){try{const w=await fetch(`/api/threads/${R.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({dailyRotation:!R.dailyRotation})});if(!w.ok)throw new Error(w.statusText);await F()}catch(w){n.value="Failed to toggle daily rotation: "+w.message}}async function de(R){try{const w=await fetch(`/api/threads/${R.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({autonomousMode:!R.autonomousMode})});if(!w.ok)throw new Error(w.statusText);await F()}catch(w){n.value="Failed to toggle autonomous mode: "+w.message}}async function Be(R){if(confirm(`Archive thread "${R.name}" (${R.threadId})?`))try{const w=await fetch(`/api/threads/${R.threadId}`,{method:"DELETE",headers:{Authorization:`Bearer ${_e()}`}});if(!w.ok)throw new Error(w.statusText);await F()}catch(w){n.value="Failed to archive: "+w.message}}async function kt(R){if(confirm(`Start thread "${R.name}" (${R.threadId})?`)){I.value=R.threadId;try{const w=await fetch(`/api/threads/${R.threadId}/start`,{method:"POST",headers:{Authorization:`Bearer ${_e()}`}});if(!w.ok){const i=await w.json().catch(()=>({error:w.statusText}));throw new Error(i.error??w.statusText)}await F()}catch(w){n.value="Failed to start thread: "+w.message}finally{I.value=null}}}function Je(R){u.value="Sync to Root — not yet implemented",setTimeout(()=>{u.value=""},3e3)}async function It(R){if(confirm(`Convert "${R.name}" to a root thread? This will detach it from its parent.`)){V.value=R.threadId;try{const w=await fetch(`/api/threads/${R.threadId}/convert-to-root`,{method:"POST",headers:{Authorization:`Bearer ${_e()}`}});if(!w.ok){const i=await w.json().catch(()=>({error:w.statusText}));throw new Error(i.error??w.statusText)}n.value="",u.value=`Converted "${R.name}" to root ✓`,setTimeout(()=>{u.value=""},3e3),await F()}catch(w){n.value="Failed to convert: "+w.message}finally{V.value=null}}}function it(R){if(!R)return"—";const w=new Date(R),f=Date.now()-w.getTime();return f<6e4?"just now":f<36e5?`${Math.floor(f/6e4)}m ago`:f<864e5?`${Math.floor(f/36e5)}h ago`:w.toLocaleDateString()}function yt(R){return R==="active"?"text-success":R==="archived"?"text-muted":"text-warn"}return lt(F),(R,w)=>(g(),v("div",jc,[r("div",Nc,[r("div",Lc,[w[14]||(w[14]=r("div",null,[r("h3",{class:"text-lg font-semibold"},"Thread Registry"),r("p",{class:"text-sm text-textSecondary mt-1"},"Manage conversation threads, branches, and daily sessions")],-1)),r("div",Uc,[u.value?(g(),v("span",{key:0,class:Z([u.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},b(u.value),3)):G("",!0),r("button",{onClick:w[0]||(w[0]=i=>a.value=!a.value),class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},b(a.value?"Cancel":"+ New Root Thread"),1),r("button",{onClick:F,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm hover:bg-surface transition"}," ↻ Refresh ")])]),a.value?(g(),v("div",Vc,[r("div",Fc,[r("div",null,[w[15]||(w[15]=r("label",{class:"block text-xs text-textSecondary mb-1"},"Name",-1)),ee(r("input",{"onUpdate:modelValue":w[1]||(w[1]=i=>c.value.name=i),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),[[le,c.value.name]])]),r("div",null,[w[16]||(w[16]=r("label",{class:"block text-xs text-textSecondary mb-1"},"Thread ID",-1)),ee(r("input",{"onUpdate:modelValue":w[2]||(w[2]=i=>c.value.threadId=i),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),[[le,c.value.threadId,void 0,{number:!0}]])]),r("div",null,[w[17]||(w[17]=r("label",{class:"block text-xs text-textSecondary mb-1"},"Client",-1)),ee(r("select",{"onUpdate:modelValue":w[3]||(w[3]=i=>c.value.client=i),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"},[(g(),v(te,null,be(se,i=>r("option",{key:i,value:i},b(i),9,Hc)),64))],512),[[Ht,c.value.client]])])]),r("div",null,[w[18]||(w[18]=r("label",{class:"block text-xs text-textSecondary mb-1"},"Working Directory (optional)",-1)),ee(r("input",{"onUpdate:modelValue":w[4]||(w[4]=i=>c.value.workingDirectory=i),type:"text",placeholder:"e.g. C:\\src\\my-project",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 font-mono"},null,512),[[le,c.value.workingDirectory]])]),r("div",Bc,[r("button",{onClick:ne,disabled:h.value||!c.value.name.trim()||!c.value.threadId,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},b(h.value?"Creating…":"Create Root Thread"),9,Wc)])])):G("",!0)]),s.value&&t.value.length===0?(g(),v("div",Kc,"Loading threads…")):n.value?(g(),v("div",zc,b(n.value),1)):t.value.length===0?(g(),v("div",Jc,"No threads registered")):G("",!0),K.value.length>0?(g(),v("div",qc,[w[24]||(w[24]=r("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟢 Root Threads",-1)),r("div",Gc,[(g(!0),v(te,null,be(K.value,i=>{var f,x;return g(),v("div",{key:i.id,class:"glass rounded-xl overflow-hidden"},[r("div",Yc,[r("div",Zc,[r("span",{class:Z(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(f=oe[i.type])==null?void 0:f.classes])},b((x=oe[i.type])==null?void 0:x.emoji)+" "+b(i.type.toUpperCase()),3),d.value===i.threadId?ee((g(),v("input",{key:0,"onUpdate:modelValue":w[5]||(w[5]=m=>p.value=m),onBlur:m=>pe(i.threadId),onKeyup:[w[6]||(w[6]=Ot(m=>m.target.blur(),["enter"])),w[7]||(w[7]=Ot(m=>d.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)),[[le,p.value]]):(g(),v("span",{key:1,class:"font-semibold cursor-pointer hover:text-accent transition",onDblclick:m=>Se(i),title:"Double-click to rename"},b(i.name),41,Xc)),r("span",{class:Z(["text-xs font-medium",yt(i.status)])},b(i.status),3),r("span",eu,"ID: "+b(i.threadId),1),r("select",{value:i.client,onChange:m=>Ce(i,m.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"},[(g(),v(te,null,be(se,m=>r("option",{key:m,value:m},b(m),9,su)),64))],40,tu),r("span",nu,b(it(i.lastActiveAt)),1),y.value===i.threadId?ee((g(),v("input",{key:2,"onUpdate:modelValue":w[8]||(w[8]=m=>A.value=m),onKeyup:[Ot(m=>B(i.threadId),["enter"]),w[9]||(w[9]=Ot(m=>y.value=null,["escape"]))],onBlur:m=>B(i.threadId),type:"text",placeholder:"Set working directory…",class:"text-xs font-mono bg-card border border-accent rounded px-1 py-0 text-textPrimary focus:outline-none w-48"},null,40,ou)),[[le,A.value]]):(g(),v("span",{key:3,class:"text-xs text-muted font-mono truncate max-w-[200px] cursor-pointer hover:text-accent transition",title:(i.workingDirectory??"Click to set CWD")+" (dblclick to edit)",onDblclick:m=>ie(i)},"📁 "+b(i.workingDirectory??"—"),41,ru)),r("div",lu,[r("button",{onClick:m=>kt(i),disabled:I.value===i.threadId,class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Start thread"},b(I.value===i.threadId?"Starting…":"▶ Start"),9,iu),r("div",au,[r("button",{onClick:m=>M(i),class:Z(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",i.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[r("span",{class:Z(["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,cu),w[19]||(w[19]=r("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),r("div",uu,[r("button",{onClick:m=>$e(i),class:Z(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",i.dailyRotation?"bg-blue-500":"bg-gray-700"]),title:"Toggle daily rotation"},[r("span",{class:Z(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",i.dailyRotation?"translate-x-4":"translate-x-0.5"])},null,2)],10,du),w[20]||(w[20]=r("span",{class:"text-xs text-muted"},"Daily",-1))]),r("div",fu,[r("button",{onClick:m=>de(i),class:Z(["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"},[r("span",{class:Z(["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,pu),w[21]||(w[21]=r("span",{class:"text-xs text-muted"},"Auto",-1))]),r("button",{onClick:m=>H(i.threadId),class:"px-2 py-1 rounded-lg text-xs bg-card border border-gray-700 hover:bg-surface transition"},b(l.value.has(i.threadId)?"▾ Children":"▸ Children"),9,mu),r("button",{onClick:m=>{W.value=W.value===i.threadId?null:i.threadId,C.value={name:"",threadId:0,client:"claude",workingDirectory:""},S.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,hu),r("button",{onClick:m=>Be(i),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,xu)])]),W.value===i.threadId?(g(),v("div",gu,[r("div",vu,[ee(r("input",{"onUpdate:modelValue":w[10]||(w[10]=m=>C.value.name=m),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),[[le,C.value.name]]),ee(r("input",{"onUpdate:modelValue":w[11]||(w[11]=m=>C.value.threadId=m),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),[[le,C.value.threadId,void 0,{number:!0}]]),ee(r("select",{"onUpdate:modelValue":w[12]||(w[12]=m=>C.value.client=m),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"},[(g(),v(te,null,be(se,m=>r("option",{key:m,value:m},b(m),9,yu)),64))],512),[[Ht,C.value.client]])]),ee(r("input",{"onUpdate:modelValue":w[13]||(w[13]=m=>C.value.workingDirectory=m),type:"text",placeholder:"Working directory (optional)",class:"w-full 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 font-mono"},null,512),[[le,C.value.workingDirectory]]),r("div",bu,[r("button",{onClick:m=>ve(i.threadId),disabled:_.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"},b(_.value?"Creating…":"Create Branch"),9,_u),S.value?(g(),v("span",{key:0,class:Z([S.value.startsWith("Error")?"text-danger":"text-success","text-xs"])},b(S.value),3)):G("",!0)])])):G("",!0)]),l.value.has(i.threadId)&&o.value[i.threadId]?(g(),v("div",wu,[o.value[i.threadId].length===0?(g(),v("div",Su,"No children")):G("",!0),(g(!0),v(te,null,be(o.value[i.threadId],m=>{var k,$;return g(),v("div",{key:m.id,class:"flex flex-wrap items-center gap-2 px-3 py-2 rounded-lg bg-card/50 border border-gray-700/30"},[r("span",{class:Z(["inline-flex items-center gap-1 px-1.5 py-0.5 rounded-full text-xs font-medium border",(k=oe[m.type])==null?void 0:k.classes])},b(($=oe[m.type])==null?void 0:$.emoji)+" "+b(m.type.toUpperCase()),3),r("span",ku,b(m.name),1),r("span",{class:Z(["text-xs",yt(m.status)])},b(m.status),3),r("span",Cu,"ID: "+b(m.threadId),1),r("select",{value:m.client,onChange:P=>Ce(m,P.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"},[(g(),v(te,null,be(se,P=>r("option",{key:P,value:P},b(P),9,Tu)),64))],40,$u),r("span",Eu,b(it(m.lastActiveAt)),1),r("div",Au,[r("button",{onClick:P=>kt(m),disabled:I.value===m.threadId,class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Start thread"},b(I.value===m.threadId?"Starting…":"▶ Start"),9,Iu),m.rootThreadId?(g(),v("button",{key:0,onClick:P=>Je(),disabled:U.value===m.threadId,class:"px-2 py-1 rounded-lg text-xs bg-cyan-500/20 text-cyan-400 border border-cyan-500/30 hover:bg-cyan-500/30 disabled:opacity-50 transition",title:"Sync memory to root thread"},b(U.value===m.threadId?"Syncing…":"⟳ Sync to Root"),9,Pu)):G("",!0),m.type==="branch"||m.type==="daily"?(g(),v("button",{key:1,onClick:P=>It(m),disabled:V.value===m.threadId,class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Convert to independent root thread"},b(V.value===m.threadId?"Converting…":"↑ To Root"),9,Mu)):G("",!0),m.type==="branch"?(g(),v("div",Ou,[r("button",{onClick:P=>M(m),class:Z(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",m.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[r("span",{class:Z(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",m.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,Du),w[22]||(w[22]=r("span",{class:"text-xs text-muted"},"Keep-alive",-1))])):G("",!0),m.type==="branch"?(g(),v("div",Ru,[r("button",{onClick:P=>de(m),class:Z(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",m.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[r("span",{class:Z(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",m.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,ju),w[23]||(w[23]=r("span",{class:"text-xs text-muted"},"Auto",-1))])):G("",!0),m.type!=="root"?(g(),v("button",{key:4,onClick:P=>Be(m),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,Nu)):G("",!0)])])}),128))])):G("",!0)])}),128))])])):G("",!0),N.value.length>0?(g(),v("div",Lu,[w[25]||(w[25]=r("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🔵 Daily Sessions",-1)),r("div",Uu,[(g(!0),v(te,null,be(N.value,i=>{var f,x;return g(),v("div",{key:i.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[r("span",{class:Z(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(f=oe[i.type])==null?void 0:f.classes])},b((x=oe[i.type])==null?void 0:x.emoji)+" "+b(i.type.toUpperCase()),3),r("span",Vu,b(i.name),1),r("span",{class:Z(["text-xs font-medium",yt(i.status)])},b(i.status),3),r("span",Fu,"ID: "+b(i.threadId),1),r("span",Hu,b(i.client),1),r("span",Bu,b(it(i.lastActiveAt)),1),r("div",Wu,[r("button",{onClick:m=>kt(i),disabled:I.value===i.threadId,class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Start thread"},b(I.value===i.threadId?"Starting…":"▶ Start"),9,Ku),i.rootThreadId?(g(),v("button",{key:0,onClick:m=>Je(),disabled:U.value===i.threadId,class:"px-2 py-1 rounded-lg text-xs bg-cyan-500/20 text-cyan-400 border border-cyan-500/30 hover:bg-cyan-500/30 disabled:opacity-50 transition",title:"Sync memory to root thread"},b(U.value===i.threadId?"Syncing…":"⟳ Sync to Root"),9,zu)):G("",!0),r("button",{onClick:m=>Be(i),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,Ju)])])}),128))])])):G("",!0),J.value.length>0?(g(),v("div",qu,[w[28]||(w[28]=r("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟣 Branches",-1)),r("div",Gu,[(g(!0),v(te,null,be(J.value,i=>{var f,x;return g(),v("div",{key:i.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[r("span",{class:Z(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(f=oe[i.type])==null?void 0:f.classes])},b((x=oe[i.type])==null?void 0:x.emoji)+" "+b(i.type.toUpperCase()),3),r("span",Yu,b(i.name),1),r("span",{class:Z(["text-xs font-medium",yt(i.status)])},b(i.status),3),r("span",Zu,"ID: "+b(i.threadId),1),r("select",{value:i.client,onChange:m=>Ce(i,m.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"},[(g(),v(te,null,be(se,m=>r("option",{key:m,value:m},b(m),9,Xu)),64))],40,Qu),r("span",ed,b(it(i.lastActiveAt)),1),r("div",td,[r("button",{onClick:m=>kt(i),disabled:I.value===i.threadId,class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Start thread"},b(I.value===i.threadId?"Starting…":"▶ Start"),9,sd),i.rootThreadId?(g(),v("button",{key:0,onClick:m=>Je(),disabled:U.value===i.threadId,class:"px-2 py-1 rounded-lg text-xs bg-cyan-500/20 text-cyan-400 border border-cyan-500/30 hover:bg-cyan-500/30 disabled:opacity-50 transition",title:"Sync memory to root thread"},b(U.value===i.threadId?"Syncing…":"⟳ Sync to Root"),9,nd)):G("",!0),r("div",od,[r("button",{onClick:m=>M(i),class:Z(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",i.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[r("span",{class:Z(["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,rd),w[26]||(w[26]=r("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),r("div",ld,[r("button",{onClick:m=>de(i),class:Z(["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"},[r("span",{class:Z(["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,id),w[27]||(w[27]=r("span",{class:"text-xs text-muted"},"Auto",-1))]),r("button",{onClick:m=>Be(i),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,ad)])])}),128))])])):G("",!0),ue.value.length>0?(g(),v("div",cd,[w[29]||(w[29]=r("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟡 Workers",-1)),r("div",ud,[(g(!0),v(te,null,be(ue.value,i=>{var f,x;return g(),v("div",{key:i.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[r("span",{class:Z(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(f=oe[i.type])==null?void 0:f.classes])},b((x=oe[i.type])==null?void 0:x.emoji)+" "+b(i.type.toUpperCase()),3),r("span",dd,b(i.name),1),r("span",{class:Z(["text-xs font-medium",yt(i.status)])},b(i.status),3),r("span",fd,"ID: "+b(i.threadId),1),r("select",{value:i.client,onChange:m=>Ce(i,m.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"},[(g(),v(te,null,be(se,m=>r("option",{key:m,value:m},b(m),9,md)),64))],40,pd),r("span",hd,b(it(i.lastActiveAt)),1),r("div",xd,[r("button",{onClick:m=>kt(i),disabled:I.value===i.threadId,class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Start thread"},b(I.value===i.threadId?"Starting…":"▶ Start"),9,gd),i.rootThreadId?(g(),v("button",{key:0,onClick:m=>Je(),disabled:U.value===i.threadId,class:"px-2 py-1 rounded-lg text-xs bg-cyan-500/20 text-cyan-400 border border-cyan-500/30 hover:bg-cyan-500/30 disabled:opacity-50 transition",title:"Sync memory to root thread"},b(U.value===i.threadId?"Syncing…":"⟳ Sync to Root"),9,vd)):G("",!0),r("button",{onClick:m=>Be(i),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,yd)])])}),128))])])):G("",!0)]))}}),_d={class:"animate-fade-in"},wd={class:"glass rounded-xl p-6 mb-6"},Sd={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},kd={class:"flex items-center gap-3"},Cd={key:0,class:"text-center py-8 text-textSecondary text-sm"},$d={key:1,class:"text-center py-8 text-danger text-sm"},Td={key:2,class:"text-center text-textSecondary py-12"},Ed={key:3,class:"space-y-2"},Ad={key:0,class:"glass rounded-xl p-4 border border-gray-700/50 opacity-75"},Id={class:"flex items-center justify-between gap-3"},Pd={class:"flex items-center gap-2 min-w-0"},Md={class:"flex items-center justify-between gap-3"},Od={class:"flex-1 min-w-0"},Dd={class:"flex items-center gap-2 mb-1"},Rd={class:"font-medium text-sm font-mono"},jd={class:"text-xs text-muted font-mono truncate"},Nd={class:"flex items-center gap-2 shrink-0"},Ld=["onClick"],Ud=["onClick","disabled"],Vd={key:0,class:"glass rounded-xl p-6 border border-accent/30"},Fd={class:"text-lg font-semibold mb-4"},Hd={class:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4"},Bd=["readonly"],Wd={class:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4"},Kd={class:"mb-4"},zd={class:"flex items-center justify-between mb-2"},Jd=["onUpdate:modelValue"],qd=["onUpdate:modelValue"],Gd=["onClick"],Yd={key:0,class:"text-xs text-muted italic"},Zd={class:"mb-4"},Qd={class:"mb-4"},Xd={class:"flex items-center justify-between mb-2"},ef=["onUpdate:modelValue"],tf=["onUpdate:modelValue"],sf=["onClick"],nf={key:0,class:"text-xs text-muted italic"},of={class:"flex items-center gap-3 flex-wrap"},rf=["disabled"],lf={key:0,class:"text-sm text-danger"},Gt="sensorium-mcp",af=gt({__name:"McpServersTab",setup(e){const t=T({}),s=T(!0),n=T(""),o=T(""),l=T(!0),a=T(!1),c=T(null),u=T(!1),h=T(null),d=T(""),p=T("stdio"),y=T(""),A=T(""),W=T(""),C=T([]),S=T([]),_=T(""),I=Fe(()=>Object.entries(t.value).filter(([F])=>F!==Gt));async function U(){s.value=!0,n.value="";try{const F=await ye("/api/mcp-servers");t.value=F.servers||{}}catch(F){n.value="Failed to load MCP servers: "+F.message}finally{s.value=!1}}function V(F){return F==="stdio"?"background:rgba(99,102,241,0.15);color:#818cf8":"background:rgba(34,197,94,0.15);color:#4ade80"}function se(){h.value=null,d.value="",p.value="stdio",y.value="",A.value="",W.value="",C.value=[],S.value=[],_.value="",u.value=!0}function oe(F,D){h.value=F,d.value=F,p.value=D.type,y.value=D.command||"",A.value=(D.args||[]).join(" "),W.value=D.url||"",C.value=Object.entries(D.env||{}).map(([H,ne])=>({k:H,v:ne})),S.value=Object.entries(D.headers||{}).map(([H,ne])=>({k:H,v:ne})),_.value="",u.value=!0}function K(){u.value=!1,h.value=null}function N(){if(_.value="",!d.value.trim())return _.value="Name is required",!1;if(p.value==="stdio"&&!y.value.trim())return _.value="Command is required for stdio type",!1;if(p.value==="http"){const F=W.value.trim();if(!F)return _.value="URL is required for http type",!1;if(!/^https?:\/\/.+/.test(F))return _.value="URL must start with http:// or https://",!1}return!0}async function J(){if(!N()||a.value)return;a.value=!0;const F=d.value.trim(),D={type:p.value};if(p.value==="stdio"){D.command=y.value.trim();const H=A.value.trim();H&&(D.args=H.split(/\s+/));const ne=Object.fromEntries(C.value.filter(ve=>ve.k.trim()).map(ve=>[ve.k.trim(),ve.v]));Object.keys(ne).length&&(D.env=ne)}else{D.url=W.value.trim();const H=Object.fromEntries(S.value.filter(ne=>ne.k.trim()).map(ne=>[ne.k.trim(),ne.v]));Object.keys(H).length&&(D.headers=H)}try{const H=await fetch("/api/mcp-servers",{method:"POST",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({name:F,config:D})});if(!H.ok)throw new Error(H.statusText);o.value="Saved ✓",l.value=!0,setTimeout(()=>{o.value=""},3e3),K(),await U()}catch(H){_.value="Error: "+H.message}finally{a.value=!1}}async function ue(F){if(confirm(`Delete MCP server "${F}"?`)&&!c.value){c.value=F;try{const D=await fetch(`/api/mcp-servers/${encodeURIComponent(F)}`,{method:"DELETE",headers:{Authorization:`Bearer ${_e()}`}});if(!D.ok)throw new Error(D.statusText);o.value="Deleted ✓",l.value=!0,setTimeout(()=>{o.value=""},3e3),await U()}catch(D){o.value="Error: "+D.message,l.value=!1}finally{c.value=null}}}return lt(U),(F,D)=>(g(),v("div",_d,[r("div",wd,[r("div",Sd,[D[7]||(D[7]=r("div",null,[r("h3",{class:"text-lg font-semibold"},"MCP Servers"),r("p",{class:"text-sm text-textSecondary mt-1"},"Manage external MCP server connections (stdio and HTTP)")],-1)),r("div",kd,[o.value?(g(),v("span",{key:0,class:Z(["text-sm",l.value?"text-success":"text-danger"])},b(o.value),3)):G("",!0),r("button",{onClick:se,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"}," + Add Server ")])]),s.value?(g(),v("div",Cd,"Loading...")):n.value?(g(),v("div",$d,b(n.value),1)):Object.keys(t.value).length===0?(g(),v("div",Td,"No MCP servers configured")):(g(),v("div",Ed,[t.value[Gt]?(g(),v("div",Ad,[r("div",Id,[r("div",Pd,[r("span",{class:"font-medium text-sm font-mono"},b(Gt)),r("span",{class:"type-badge",style:Lt(V(t.value[Gt].type))},b(t.value[Gt].type),5),D[8]||(D[8]=r("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"built-in",-1))]),D[9]||(D[9]=r("span",{class:"text-xs text-muted italic"},"read-only",-1))])])):G("",!0),(g(!0),v(te,null,be(I.value,([H,ne])=>{var ve;return g(),v("div",{key:H,class:"glass rounded-xl p-4 border border-transparent hover:border-gray-700 transition"},[r("div",Md,[r("div",Od,[r("div",Dd,[r("span",Rd,b(H),1),r("span",{class:"type-badge",style:Lt(V(ne.type))},b(ne.type),5)]),r("div",jd,[ne.type==="stdio"?(g(),v(te,{key:0},[we(b(ne.command)+b((ve=ne.args)!=null&&ve.length?" "+ne.args.join(" "):""),1)],64)):(g(),v(te,{key:1},[we(b(ne.url),1)],64))])]),r("div",Nd,[r("button",{onClick:Se=>oe(H,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"},"Edit",8,Ld),r("button",{onClick:Se=>ue(H),disabled:c.value===H,class:"px-3 py-1.5 rounded-lg bg-card hover:bg-red-900/40 border border-gray-700 hover:border-red-700 text-xs text-textSecondary hover:text-red-400 transition disabled:opacity-50"},b(c.value===H?"…":"Delete"),9,Ud)])])])}),128))]))]),u.value?(g(),v("div",Vd,[r("h3",Fd,b(h.value?`Edit: ${h.value}`:"Add MCP Server"),1),r("div",Hd,[r("div",null,[D[10]||(D[10]=r("label",{class:"text-xs text-textSecondary block mb-1"},[we("Name "),r("span",{class:"text-danger"},"*")],-1)),ee(r("input",{"onUpdate:modelValue":D[0]||(D[0]=H=>d.value=H),type:"text",readonly:!!h.value,placeholder:"my-server",class:Z(["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",h.value?"opacity-60 cursor-not-allowed":""])},null,10,Bd),[[le,d.value]])]),r("div",null,[D[12]||(D[12]=r("label",{class:"text-xs text-textSecondary block mb-1"},[we("Type "),r("span",{class:"text-danger"},"*")],-1)),ee(r("select",{"onUpdate:modelValue":D[1]||(D[1]=H=>p.value=H),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"},[...D[11]||(D[11]=[r("option",{value:"stdio"},"stdio",-1),r("option",{value:"http"},"http",-1)])],512),[[Ht,p.value]])])]),p.value==="stdio"?(g(),v(te,{key:0},[r("div",Wd,[r("div",null,[D[13]||(D[13]=r("label",{class:"text-xs text-textSecondary block mb-1"},[we("Command "),r("span",{class:"text-danger"},"*")],-1)),ee(r("input",{"onUpdate:modelValue":D[2]||(D[2]=H=>y.value=H),type:"text",placeholder:"node",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),[[le,y.value]])]),r("div",null,[D[14]||(D[14]=r("label",{class:"text-xs text-textSecondary block mb-1"},"Args (space-separated)",-1)),ee(r("input",{"onUpdate:modelValue":D[3]||(D[3]=H=>A.value=H),type:"text",placeholder:"./server.js --port 3000",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),[[le,A.value]])])]),r("div",Kd,[r("div",zd,[D[15]||(D[15]=r("label",{class:"text-xs text-textSecondary"},"Environment Variables",-1)),r("button",{onClick:D[4]||(D[4]=H=>C.value.push({k:"",v:""})),class:"text-xs text-accent hover:text-accentLight transition"},"+ Add")]),(g(!0),v(te,null,be(C.value,(H,ne)=>(g(),v("div",{key:ne,class:"flex items-center gap-2 mb-2"},[ee(r("input",{"onUpdate:modelValue":ve=>H.k=ve,type:"text",placeholder:"KEY",class:"flex-1 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,8,Jd),[[le,H.k]]),D[16]||(D[16]=r("span",{class:"text-muted text-xs"},"=",-1)),ee(r("input",{"onUpdate:modelValue":ve=>H.v=ve,type:"text",placeholder:"value",class:"flex-1 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,8,qd),[[le,H.v]]),r("button",{onClick:ve=>C.value.splice(ne,1),class:"text-muted hover:text-danger transition text-xs px-2"},"✕",8,Gd)]))),128)),C.value.length===0?(g(),v("div",Yd,"No env vars")):G("",!0)])],64)):(g(),v(te,{key:1},[r("div",Zd,[D[17]||(D[17]=r("label",{class:"text-xs text-textSecondary block mb-1"},[we("URL "),r("span",{class:"text-danger"},"*")],-1)),ee(r("input",{"onUpdate:modelValue":D[5]||(D[5]=H=>W.value=H),type:"text",placeholder:"http://localhost:3000/mcp",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),[[le,W.value]])]),r("div",Qd,[r("div",Xd,[D[18]||(D[18]=r("label",{class:"text-xs text-textSecondary"},"Headers",-1)),r("button",{onClick:D[6]||(D[6]=H=>S.value.push({k:"",v:""})),class:"text-xs text-accent hover:text-accentLight transition"},"+ Add")]),(g(!0),v(te,null,be(S.value,(H,ne)=>(g(),v("div",{key:ne,class:"flex items-center gap-2 mb-2"},[ee(r("input",{"onUpdate:modelValue":ve=>H.k=ve,type:"text",placeholder:"Header-Name",class:"flex-1 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,8,ef),[[le,H.k]]),D[19]||(D[19]=r("span",{class:"text-muted text-xs"},":",-1)),ee(r("input",{"onUpdate:modelValue":ve=>H.v=ve,type:"text",placeholder:"value",class:"flex-1 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,8,tf),[[le,H.v]]),r("button",{onClick:ve=>S.value.splice(ne,1),class:"text-muted hover:text-danger transition text-xs px-2"},"✕",8,sf)]))),128)),S.value.length===0?(g(),v("div",nf,"No headers")):G("",!0)])],64)),r("div",of,[r("button",{onClick:J,disabled:a.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},b(a.value?"Saving…":h.value?"Save Changes":"Add Server"),9,rf),r("button",{onClick:K,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?(g(),v("span",lf,b(_.value),1)):G("",!0)])])):G("",!0)]))}}),cf={class:"animate-fade-in"},uf={class:"glass rounded-xl p-6 mb-6"},df={class:"flex flex-wrap items-center justify-between gap-4 mb-6"},ff={class:"flex items-center gap-3"},pf=["disabled"],mf={key:0,class:"text-center py-8 text-textSecondary text-sm"},hf={key:1,class:"space-y-6"},xf={class:"glass rounded-xl p-4 border border-gray-700/50"},gf={class:"flex items-center gap-4"},vf={class:"flex justify-between text-xs text-muted mt-2"},yf={class:"font-mono"},bf={key:0,class:"mt-3 px-3 py-2 rounded-lg bg-warn/10 border border-warn/20 text-xs text-warn"},_f={class:"glass rounded-xl p-4 border border-gray-700/50"},wf={class:"flex items-center gap-4"},Sf={class:"flex justify-between text-xs text-muted mt-2"},kf={class:"font-mono"},Cf={class:"glass rounded-xl p-4 border border-gray-700/50"},$f={class:"glass rounded-xl p-4 border border-gray-700/50"},Tf={class:"glass rounded-xl p-4 border border-gray-700/30 bg-surface/30"},Ef={class:"grid grid-cols-2 gap-4"},Af={class:"text-sm font-medium text-textSecondary"},If={class:"text-sm font-medium font-mono text-textSecondary"},Pf={class:"text-sm font-medium font-mono text-textSecondary"},Mf={class:"mt-3"},Of=gt({__name:"SettingsTab",setup(e){const t=T(!0),s=T(!1),n=T(""),o=T(50),l=T(50),a=T(1440),c=T(1440),u=T("claude-opus-4-6"),h=T("claude-opus-4-6"),d=T("claude-sonnet-4-5"),p=T("claude-sonnet-4-5"),y=Fe(()=>o.value!==l.value||a.value!==c.value||u.value!==h.value||d.value!==p.value);async function A(){t.value=!0;try{const[C,S,_,I]=await Promise.all([ye("/api/settings/bootstrap-message-count"),ye("/api/settings/wait-timeout"),ye("/api/settings/default-thread-model"),ye("/api/settings/default-worker-model")]);o.value=C.count,l.value=C.count,a.value=S.minutes,c.value=S.minutes,u.value=_.defaultThreadModel,h.value=_.defaultThreadModel,d.value=I.defaultWorkerModel,p.value=I.defaultWorkerModel}finally{t.value=!1}}async function W(){if(s.value=!0,n.value="",!u.value){n.value="Error: Thread model cannot be empty",s.value=!1;return}if(!d.value){n.value="Error: Worker model cannot be empty",s.value=!1;return}try{const C={Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},[S,_,I,U]=await Promise.all([fetch("/api/settings/bootstrap-message-count",{method:"POST",headers:C,body:JSON.stringify({count:o.value})}),fetch("/api/settings/wait-timeout",{method:"POST",headers:C,body:JSON.stringify({minutes:a.value})}),fetch("/api/settings/default-thread-model",{method:"POST",headers:C,body:JSON.stringify({model:u.value})}),fetch("/api/settings/default-worker-model",{method:"POST",headers:C,body:JSON.stringify({model:d.value})})]);for(const N of[S,_,I,U])if(!N.ok){const J=await N.json().catch(()=>({error:N.statusText}));throw new Error(J.error??N.statusText)}const V=await S.json(),se=await _.json(),oe=await I.json(),K=await U.json();l.value=V.count,o.value=V.count,c.value=se.minutes,a.value=se.minutes,h.value=oe.defaultThreadModel,u.value=oe.defaultThreadModel,p.value=K.defaultWorkerModel,d.value=K.defaultWorkerModel,n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3)}catch(C){n.value="Error: "+C.message}finally{s.value=!1}}return lt(A),(C,S)=>(g(),v("div",cf,[r("div",uf,[r("div",df,[S[6]||(S[6]=r("div",null,[r("h3",{class:"text-lg font-semibold"},"Settings"),r("p",{class:"text-sm text-textSecondary mt-1"},"Configure agent behavior and context injection")],-1)),r("div",ff,[n.value?(g(),v("span",{key:0,class:Z([n.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},b(n.value),3)):G("",!0),r("button",{onClick:W,disabled:s.value||t.value||!y.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},b(s.value?"Saving…":"Save"),9,pf)])]),t.value?(g(),v("div",mf,"Loading…")):(g(),v("div",hf,[r("div",xf,[S[10]||(S[10]=r("label",{class:"block text-sm font-medium mb-1"},"Recent Conversation Buffer",-1)),S[11]||(S[11]=r("p",{class:"text-xs text-textSecondary mb-3"},[we(" Number of recent messages injected into the agent's bootstrap context. Set to "),r("span",{class:"font-mono text-accentLight"},"0"),we(" to disable (useful when using VS Code, which maintains its own conversation history). ")],-1)),r("div",gf,[ee(r("input",{"onUpdate:modelValue":S[0]||(S[0]=_=>o.value=_),type:"range",min:"0",max:"100",step:"5",class:"flex-1 accent-accent"},null,512),[[le,o.value,void 0,{number:!0}]]),ee(r("input",{"onUpdate:modelValue":S[1]||(S[1]=_=>o.value=_),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),[[le,o.value,void 0,{number:!0}]])]),r("div",vf,[S[7]||(S[7]=r("span",null,"Off",-1)),r("span",yf,b(o.value)+" messages",1),S[8]||(S[8]=r("span",null,"Max",-1))]),o.value===0?(g(),v("div",bf,[...S[9]||(S[9]=[we(" Message buffer injection is ",-1),r("strong",null,"disabled",-1),we(". 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)])])):G("",!0)]),r("div",_f,[S[14]||(S[14]=r("label",{class:"block text-sm font-medium mb-1"},"Poll Timeout (wait_for_instructions)",-1)),S[15]||(S[15]=r("p",{class:"text-xs text-textSecondary mb-3"},[we(" Maximum time (in minutes) a single "),r("span",{class:"font-mono text-accentLight"},"wait_for_instructions"),we(" call will poll before timing out. Claude Code agents use the full value; Copilot agents are capped at 10 min. ")],-1)),r("div",wf,[ee(r("input",{"onUpdate:modelValue":S[2]||(S[2]=_=>a.value=_),type:"range",min:"1",max:"1440",step:"10",class:"flex-1 accent-accent"},null,512),[[le,a.value,void 0,{number:!0}]]),ee(r("input",{"onUpdate:modelValue":S[3]||(S[3]=_=>a.value=_),type:"number",min:"1",max:"10080",class:"w-24 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),[[le,a.value,void 0,{number:!0}]])]),r("div",Sf,[S[12]||(S[12]=r("span",null,"1 min",-1)),r("span",kf,b(a.value>=60?Math.floor(a.value/60)+"h "+a.value%60+"m":a.value+" min"),1),S[13]||(S[13]=r("span",null,"24h",-1))])]),r("div",Cf,[S[16]||(S[16]=r("label",{class:"block text-sm font-medium mb-1"},"Default Thread Model",-1)),S[17]||(S[17]=r("p",{class:"text-xs text-textSecondary mb-3"},[we(" Model used when spawning a normal (orchestrator) Claude thread. Overridden by the "),r("span",{class:"font-mono text-accentLight"},"CLAUDE_MODEL"),we(" env var if set. ")],-1)),ee(r("input",{"onUpdate:modelValue":S[4]||(S[4]=_=>u.value=_),type:"text",placeholder:"claude-opus-4-6",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),[[le,u.value,void 0,{trim:!0}]])]),r("div",$f,[S[18]||(S[18]=r("label",{class:"block text-sm font-medium mb-1"},"Default Worker Model",-1)),S[19]||(S[19]=r("p",{class:"text-xs text-textSecondary mb-3"},[we(" Model used when spawning a worker Claude thread. Overridden by the "),r("span",{class:"font-mono text-accentLight"},"CLAUDE_WORKER_MODEL"),we(" env var if set. ")],-1)),ee(r("input",{"onUpdate:modelValue":S[5]||(S[5]=_=>d.value=_),type:"text",placeholder:"claude-sonnet-4-5",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),[[le,d.value,void 0,{trim:!0}]])]),r("div",Tf,[S[24]||(S[24]=r("div",{class:"text-xs font-medium text-textSecondary uppercase tracking-wider mb-3"},"Current State",-1)),r("div",Ef,[r("div",null,[S[20]||(S[20]=r("div",{class:"text-xs text-muted mb-1"},"Message Buffer",-1)),r("span",{class:Z(["text-sm font-medium",l.value>0?"text-success":"text-textSecondary"])},b(l.value>0?`${l.value} messages`:"Disabled"),3)]),r("div",null,[S[21]||(S[21]=r("div",{class:"text-xs text-muted mb-1"},"Poll Timeout",-1)),r("span",Af,b(c.value>=60?Math.floor(c.value/60)+"h "+c.value%60+"m":c.value+" min"),1)]),r("div",null,[S[22]||(S[22]=r("div",{class:"text-xs text-muted mb-1"},"Thread Model",-1)),r("span",If,b(h.value),1)]),r("div",null,[S[23]||(S[23]=r("div",{class:"text-xs text-muted mb-1"},"Worker Model",-1)),r("span",Pf,b(p.value),1)])]),r("div",Mf,[r("span",{class:Z(["text-sm font-medium",y.value?"text-warn":"text-textSecondary"])},b(y.value?"Unsaved changes":"Saved"),3)])])]))])]))}}),Df={class:"animate-fade-in"},Rf={class:"glass rounded-xl p-6 mb-6"},jf={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Nf={class:"flex flex-wrap gap-3 items-center"},Lf=["disabled"],Uf={key:0,class:"flex items-center gap-2"},Vf={key:1},Ff={class:"glass rounded-xl p-6"},Hf={key:0,class:"text-center py-8 text-textSecondary text-sm"},Bf={key:1,class:"text-center py-12 text-textSecondary text-sm"},Wf={key:2,class:"space-y-2"},Kf={class:"flex items-center justify-between gap-3"},zf={class:"flex-1 min-w-0"},Jf={class:"flex flex-wrap items-center gap-2 mb-1"},qf={class:"font-medium text-sm font-mono"},Gf={class:"type-badge",style:{background:"rgba(99,102,241,0.15)",color:"#818cf8"}},Yf={class:"text-xs text-muted"},Zf={class:"text-xs text-muted"},Qf=["onClick","disabled"],Xf={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-surface/80 backdrop-blur-sm"},ep={class:"glass rounded-2xl p-6 max-w-sm w-full mx-4"},tp={class:"text-sm text-textSecondary mb-4"},sp={class:"font-mono text-textPrimary"},np=gt({__name:"SnapshotsTab",setup(e){const t=T([]),s=T(!0),n=T(!1),o=T(null),l=T(""),a=T(""),c=T(!0),u=T(null);function h(_){return _<1024?`${_} B`:_<1024*1024?`${(_/1024).toFixed(1)} KB`:`${(_/(1024*1024)).toFixed(1)} MB`}function d(_){try{return new Date(_).toLocaleString()}catch{return _}}function p(_,I){a.value=_,c.value=I,setTimeout(()=>{a.value=""},4e3)}async function y(){s.value=!0;try{const _=await ye("/api/snapshots");t.value=_.snapshots}catch(_){p("Failed to load snapshots: "+_.message,!1)}finally{s.value=!1}}async function A(){if(!n.value){n.value=!0;try{await ye("/api/snapshots",{method:"POST",body:JSON.stringify({description:l.value})}),l.value="",p("Snapshot created ✓",!0),await y()}catch(_){p("Error: "+_.message,!1)}finally{n.value=!1}}}function W(_){u.value=_}function C(){u.value=null}async function S(){const _=u.value;if(!(!_||o.value)){u.value=null,o.value=_;try{await ye(`/api/snapshots/${encodeURIComponent(_)}`,{method:"DELETE"}),p("Deleted ✓",!0),await y()}catch(I){p("Error: "+I.message,!1)}finally{o.value=null}}}return lt(y),(_,I)=>(g(),v("div",Df,[r("div",Rf,[r("div",jf,[I[1]||(I[1]=r("div",null,[r("h3",{class:"text-lg font-semibold"},"Snapshots"),r("p",{class:"text-sm text-textSecondary mt-1"},"Create and manage data directory snapshots")],-1)),a.value?(g(),v("span",{key:0,class:Z(["text-sm",c.value?"text-success":"text-danger"])},b(a.value),3)):G("",!0)]),r("div",Nf,[ee(r("input",{"onUpdate:modelValue":I[0]||(I[0]=U=>l.value=U),type:"text",placeholder:"Description (optional)",class:"flex-1 min-w-48 px-3 py-2 rounded-xl bg-surface border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition",onKeydown:Ot(A,["enter"])},null,544),[[le,l.value]]),r("button",{onClick:A,disabled:n.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition whitespace-nowrap"},[n.value?(g(),v("span",Uf,[...I[2]||(I[2]=[r("svg",{class:"w-4 h-4 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[r("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 12a8 8 0 018-8v8H4z"})],-1),we(" Creating… ",-1)])])):(g(),v("span",Vf,"+ Create Snapshot"))],8,Lf)])]),r("div",Ff,[s.value?(g(),v("div",Hf,"Loading…")):t.value.length===0?(g(),v("div",Bf,"No snapshots yet")):(g(),v("div",Wf,[(g(!0),v(te,null,be(t.value,U=>(g(),v("div",{key:U.name,class:"glass rounded-xl p-4 border border-transparent hover:border-gray-700 transition"},[r("div",Kf,[r("div",zf,[r("div",Jf,[r("span",qf,b(U.name),1),r("span",Gf,"v"+b(U.mcpVersion),1),r("span",Yf,b(h(U.sizeBytes)),1)]),r("div",Zf,[we(b(d(U.createdAt)),1),U.description?(g(),v(te,{key:0},[we(" · "+b(U.description),1)],64)):G("",!0)])]),r("button",{onClick:V=>W(U.name),disabled:o.value===U.name,class:"px-3 py-1.5 rounded-lg bg-card hover:bg-red-900/40 border border-gray-700 hover:border-red-700 text-xs text-textSecondary hover:text-red-400 transition disabled:opacity-50 shrink-0"},b(o.value===U.name?"…":"Delete"),9,Qf)])]))),128))]))]),u.value?(g(),v("div",Xf,[r("div",ep,[I[5]||(I[5]=r("h3",{class:"text-base font-semibold mb-2"},"Delete Snapshot",-1)),r("p",tp,[I[3]||(I[3]=we(" Delete ",-1)),r("span",sp,b(u.value),1),I[4]||(I[4]=we("? This cannot be undone. ",-1))]),r("div",{class:"flex gap-3"},[r("button",{onClick:S,class:"flex-1 px-4 py-2 rounded-xl bg-danger hover:opacity-80 text-white text-sm font-medium transition"},"Delete"),r("button",{onClick:C,class:"flex-1 px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Cancel")])])])):G("",!0)]))}}),op={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-surface/95 backdrop-blur-sm"},rp={class:"glass rounded-2xl p-8 max-w-md w-full mx-4 animate-slide-up"},lp=["disabled"],ip={key:0,class:"mt-3 text-sm text-danger"},ap={key:1,class:"min-h-screen font-sans text-textPrimary animate-fade-in"},cp={class:"glass sticky top-0 z-40 border-b border-gray-800/50"},up={class:"max-w-7xl mx-auto px-4 sm:px-6 py-4 flex items-center justify-between"},dp={class:"flex items-center gap-4"},fp={class:"text-sm text-textSecondary font-mono"},pp={class:"max-w-7xl mx-auto px-4 sm:px-6 py-6"},mp={class:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3"},hp={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},xp={class:"text-2xl font-bold font-mono"},gp={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},vp={class:"text-2xl font-bold font-mono"},yp={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},bp={class:"text-2xl font-bold font-mono"},_p={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},wp={class:"flex items-center gap-2 mb-2"},Sp={class:"text-2xl font-bold font-mono"},kp={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Cp={class:"text-2xl font-bold font-mono"},$p={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Tp={class:"text-2xl font-bold font-mono"},Ep={class:"max-w-7xl mx-auto px-4 sm:px-6"},Ap={class:"flex gap-6 border-b border-gray-800/50 mb-6"},Ip=["onClick"],Pp={class:"max-w-7xl mx-auto px-4 sm:px-6 pb-12"},xs="sensorium_token",Mp=gt({__name:"App",setup(e){const t=T(!1),s=T(""),n=T(""),o=T(!1),l=T(null),a=T("sessions");let c=null;const u=[{id:"sessions",label:"Sessions"},{id:"notes",label:"Memory Notes"},{id:"templates",label:"Templates"},{id:"skills",label:"Skills"},{id:"threads",label:"Threads"},{id:"mcp",label:"MCP Servers"},{id:"snapshots",label:"Snapshots"},{id:"settings",label:"Settings"}],h={sessions:ra,notes:Sa,templates:nc,skills:Rc,threads:bd,mcp:af,snapshots:np,settings:Of},d=Fe(()=>h[a.value]),p=Fe(()=>{if(!l.value)return"—";const S=Math.floor(l.value.uptime),_=Math.floor(S/86400),I=Math.floor(S%86400/3600),U=Math.floor(S%3600/60);return _>0?`${_}d ${I}h`:I>0?`${I}h ${U}m`:`${U}m`});async function y(){const S=s.value.trim()||"no-auth";o.value=!0,n.value="";try{qt(S),await W(),localStorage.setItem(xs,S),t.value=!0,C()}catch(_){const I=_;I.status===401?n.value="Invalid token":n.value=I.message??"Connection failed",qt("")}finally{o.value=!1}}function A(){localStorage.removeItem(xs),t.value=!1,s.value="",l.value=null,c&&clearInterval(c),qt("")}async function W(){l.value=await ye("/api/status")}function C(){c&&clearInterval(c),c=setInterval(W,3e4)}return lt(async()=>{const S=localStorage.getItem(xs);if(S){s.value=S;try{qt(S),await W(),t.value=!0,C()}catch{localStorage.removeItem(xs),qt("")}}}),wn(()=>{c&&clearInterval(c)}),(S,_)=>{var I,U,V,se,oe,K,N,J,ue,F,D;return t.value?(g(),v("div",ap,[r("header",cp,[r("div",up,[_[3]||(_[3]=We('<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)),r("div",dp,[_[2]||(_[2]=r("div",{class:"flex items-center gap-2 text-sm"},[r("span",{class:"w-2 h-2 rounded-full bg-success animate-pulse-slow"}),r("span",{class:"text-textSecondary"},"Connected")],-1)),r("div",fp,b(p.value),1),r("button",{onClick:A,class:"text-sm text-muted hover:text-textSecondary transition"},"Disconnect")])])]),r("div",pp,[r("div",mp,[r("div",hp,[_[4]||(_[4]=We('<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)),r("div",xp,b(((I=l.value)==null?void 0:I.activeSessions)??0),1)]),r("div",gp,[_[5]||(_[5]=We('<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)),r("div",vp,b(((V=(U=l.value)==null?void 0:U.memory)==null?void 0:V.totalSemanticNotes)??0),1)]),r("div",yp,[_[6]||(_[6]=We('<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)),r("div",bp,b(((oe=(se=l.value)==null?void 0:se.memory)==null?void 0:oe.totalEpisodes)??0),1)]),r("div",_p,[r("div",wp,[r("span",{class:Z((((N=(K=l.value)==null?void 0:K.memory)==null?void 0:N.unconsolidatedEpisodes)??0)>10?"text-danger":"text-success")},[..._[7]||(_[7]=[r("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[r("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),_[8]||(_[8]=r("span",{class:"text-xs text-textSecondary font-medium uppercase tracking-wider"},"Unconsolidated",-1))]),r("div",Sp,b(((ue=(J=l.value)==null?void 0:J.memory)==null?void 0:ue.unconsolidatedEpisodes)??0),1)]),r("div",kp,[_[9]||(_[9]=We('<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)),r("div",Cp,b(((D=(F=l.value)==null?void 0:F.memory)==null?void 0:D.totalProcedures)??0),1)]),r("div",$p,[_[10]||(_[10]=We('<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)),r("div",Tp,b(p.value),1)])])]),r("div",Ep,[r("nav",Ap,[(g(),v(te,null,be(u,H=>r("button",{key:H.id,onClick:ne=>a.value=H.id,class:Z(["pb-3 text-sm font-medium transition",a.value===H.id?"tab-active":"tab-inactive"])},b(H.label),11,Ip)),64))])]),r("div",Pp,[(g(),fr(Al(d.value),{status:l.value},null,8,["status"]))])])):(g(),v("div",op,[r("div",rp,[_[1]||(_[1]=We('<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)),ee(r("input",{"onUpdate:modelValue":_[0]||(_[0]=H=>s.value=H),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:Ot(y,["enter"])},null,544),[[le,s.value]]),r("button",{onClick:y,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"},b(o.value?"Connecting...":"Connect"),9,lp),n.value?(g(),v("p",ip,b(n.value),1)):G("",!0)])]))}}});Hi(Mp).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">