opencode-global-habit-profile 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 GNR092
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,88 @@
1
- # Temporary Holding Version
1
+ # Habit Memory
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Plugin local de OpenCode para guardar hábitos agregados, checkpoints y TODOs vinculados a proyectos, y para mostrar métricas de uso en su WebUI. No conserva el texto de las conversaciones ni de los prompts.
4
+
5
+ Requiere **Node.js 24 o posterior**.
6
+
7
+ ## Instalación
8
+
9
+ ### Desde npm
10
+
11
+ Añade el paquete a `plugins` en la configuración global de OpenCode (`~/.config/opencode/opencode.json`):
12
+
13
+ ```json
14
+ {
15
+ "plugins": ["opencode-global-habit-profile"]
16
+ }
17
+ ```
18
+
19
+ OpenCode lo carga desde npm; no hace falta clonar ni compilar. Si la configuración no se recarga sola, ejecuta `/reload`.
20
+
21
+ ### Desde el repositorio
22
+
23
+ Requiere Node.js 24 o posterior. Clona el repositorio y compila la WebUI:
24
+
25
+ ```sh
26
+ git clone git@github.com:GNR092/opencode-habit-memory.git
27
+ cd opencode-habit-memory
28
+ npm ci
29
+ npm run build
30
+ ```
31
+
32
+ Añade la ruta absoluta del proyecto a `plugins`:
33
+
34
+ ```json
35
+ {
36
+ "plugins": ["/ruta/absoluta/al/opencode-habit-memory"]
37
+ }
38
+ ```
39
+
40
+ Los datos se guardan en `$XDG_DATA_HOME/habit-memory-plugin/store-v1.json`; si `XDG_DATA_HOME` no está definido, se usa `~/.local/share/habit-memory-plugin/store-v1.json`.
41
+
42
+ ## WebUI
43
+
44
+ La interfaz local tiene vistas separadas para **Informes**, **Puntos guardados**, **TODOs** por proyecto y **Métricas**; los grupos muestran el directorio cuando se conoce. Se actualiza en vivo cuando cambia el store local o `metrics.db`, sin recargar la página. En OpenCode, `/habit-memory-ui` la inicia y muestra su dirección; `/habit-memory-ui-stop` la detiene. También se puede iniciar desde el proyecto con:
45
+
46
+ ```sh
47
+ npm run ui
48
+ ```
49
+
50
+ El puerto predeterminado es `43109`; se puede cambiar con `HABIT_MEMORY_UI_PORT`.
51
+
52
+ ### Métricas
53
+
54
+ La vista **Métricas** lee `GET /api/metrics` y muestra pasos, tokens de entrada sin caché, caché leída, salida y razonamiento. Incluye filtros de 7/30/90 días y por proyecto, agente, proveedor y modelo, una gráfica SVG de tokens, tablas por agente/modelo/proyecto/tipo ordenables por nombre, pasos o tokens, y un bloque de salud del propio plugin. El coste y su cobertura siguen disponibles en la API, pero no se muestran en la vista.
55
+
56
+ El detalle se guarda en `metrics.db`, en el mismo directorio que `store-v1.json`:
57
+
58
+ ```text
59
+ $XDG_DATA_HOME/habit-memory-plugin/metrics.db
60
+ ~/.local/share/habit-memory-plugin/metrics.db # si XDG_DATA_HOME no está definido
61
+ ```
62
+
63
+ `store-v1.json` no se modifica. `metrics.db` se actualiza con eventos de OpenCode (`session.step.ended` y `session.usage.recorded`), con un backfill aproximado de sesiones recientes y con retención de 90 días UTC. No guarda prompts, argumentos, rutas absolutas, títulos de sesión ni IDs crudos: usa hashes, basenames y etiquetas allowlisted. La vista no estima USD sin precios y no publica un total único de tokens; mantiene las series separadas.
64
+
65
+ Consulta [`docs/metrics.md`](docs/metrics.md) para el esquema SQLite, la API, la privacidad y el troubleshooting.
66
+
67
+ ## Publicación
68
+
69
+ La versión **0.1.0 ya está publicada** en npm. La versión **0.2.0 está preparada en este repositorio pero todavía no se ha publicado**.
70
+
71
+ ```sh
72
+ npm login
73
+ npm publish
74
+ ```
75
+
76
+ `prepublishOnly` ejecuta las pruebas y el build. El paquete incluye `dist/`, así que quien lo instala desde npm no necesita compilar.
77
+
78
+ ## Pruebas
79
+
80
+ ```sh
81
+ npm test
82
+ ```
83
+
84
+ Para configurar el servidor MCP local en clientes compatibles, consulta [`docs/mcp-setup.md`](docs/mcp-setup.md).
85
+
86
+ ## Licencia
87
+
88
+ MIT. Consulta [`LICENSE`](LICENSE).
@@ -0,0 +1,21 @@
1
+ (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 i of o)if(i.type==="childList")for(const r of i.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function s(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=s(o);fetch(o.href,i)}})();/**
2
+ * @vue/shared v3.5.45
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/function vs(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const te={},Ct=[],Qe=()=>{},Bo=()=>!1,Hn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Vn=e=>e.startsWith("onUpdate:"),he=Object.assign,xs=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},ai=Object.prototype.hasOwnProperty,J=(e,t)=>ai.call(e,t),R=Array.isArray,_t=e=>fn(e)==="[object Map]",ft=e=>fn(e)==="[object Set]",co=e=>fn(e)==="[object Date]",V=e=>typeof e=="function",le=e=>typeof e=="string",$e=e=>typeof e=="symbol",$=e=>e!==null&&typeof e=="object",Uo=e=>($(e)||V(e))&&V(e.then)&&V(e.catch),Wo=Object.prototype.toString,fn=e=>Wo.call(e),fi=e=>fn(e).slice(8,-1),Ko=e=>fn(e)==="[object Object]",Ss=e=>le(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,zt=vs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Bn=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},di=/-\w/g,Ve=Bn(e=>e.replace(di,t=>t.slice(1).toUpperCase())),ui=/\B([A-Z])/g,Ot=Bn(e=>e.replace(ui,"-$1").toLowerCase()),qo=Bn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Xn=Bn(e=>e?`on${qo(e)}`:""),Xe=(e,t)=>!Object.is(e,t),On=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},zo=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},ks=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let ao;const Un=()=>ao||(ao=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Cs(e){if(R(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],o=le(n)?gi(n):Cs(n);if(o)for(const i in o)t[i]=o[i]}return t}else if(le(e)||$(e))return e}const hi=/;(?![^(]*\))/g,mi=/:([^]+)/,pi=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function gi(e){const t={};return e.replace(pi,s=>s.startsWith("/*")?"":s).split(hi).forEach(s=>{if(s){const n=s.split(mi);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function en(e){let t="";if(le(e))t=e;else if(R(e))for(let s=0;s<e.length;s++){const n=en(e[s]);n&&(t+=n+" ")}else if($(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const _i="itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly",yi=vs(_i);function Go(e){return!!e||e===""}function bi(e,t,s){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=dt(e[o],t[o],s);return n}function fo(e,t,s){if(e.size!==t.size)return!1;const n=Array.from(t),o=new Uint8Array(n.length);for(const i of e){let r=-1;for(let l=0;l<n.length;l++)if(!o[l]&&dt(i,n[l],s)){r=l;break}if(r<0)return!1;o[r]=1}return!0}function vi(e,t,s){let n=_t(e),o=_t(t);if(n||o||(n=ft(e),o=ft(t),n||o))return n&&o?fo(e,t,s):!1;const i=Object.keys(e).length,r=Object.keys(t).length;if(i!==r)return!1;for(const l in e){const a=e.hasOwnProperty(l),p=t.hasOwnProperty(l);if(a&&!p||!a&&p||!dt(e[l],t[l],s))return!1}return String(e)===String(t)}function uo(e,t,s,n){s||(s=[new Map,new Map]);const[o,i]=s;if(o.has(e)||i.has(t))return o.get(e)===t&&i.get(t)===e;o.set(e,t),i.set(t,e);const r=n(e,t,s);return o.delete(e),i.delete(t),r}function dt(e,t,s){if(e===t)return!0;let n=co(e),o=co(t);return n||o?n&&o?e.getTime()===t.getTime():!1:(n=$e(e),o=$e(t),n||o?e===t:(n=R(e),o=R(t),n||o?n&&o?uo(e,t,s,bi):!1:(n=$(e),o=$(t),n||o?!n||!o?!1:uo(e,t,s,vi):String(e)===String(t))))}function Ts(e,t){return e.findIndex(s=>dt(s,t))}const Jo=e=>!!(e&&e.__v_isRef===!0),f=e=>le(e)?e:e==null?"":R(e)||$(e)&&(e.toString===Wo||!V(e.toString))?Jo(e)?f(e.value):JSON.stringify(e,Yo,2):String(e),Yo=(e,t)=>Jo(t)?Yo(e,t.value):_t(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,o],i)=>(s[Qn(n,i)+" =>"]=o,s),{})}:ft(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Qn(s))}:$e(t)?Qn(t):$(t)&&!R(t)&&!Ko(t)?String(t):t,Qn=(e,t="")=>{var s;return $e(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
6
+ * @vue/reactivity v3.5.45
7
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
+ * @license MIT
9
+ **/let _e;class xi{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&_e&&(_e.active?(this.parent=_e,this.index=(_e.scopes||(_e.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes){const n=this.scopes.slice();for(t=0,s=n.length;t<s;t++)n[t].pause()}for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes){const o=this.scopes.slice();for(t=0,s=o.length;t<s;t++)o[t].resume()}const n=this.effects.slice();for(t=0,s=n.length;t<s;t++)n[t].resume()}}run(t){if(this._active){const s=_e;try{return _e=this,t()}finally{_e=s}}}on(){++this._on===1&&(this.prevScope=_e,_e=this)}off(){if(this._on>0&&--this._on===0){if(_e===this)_e=this.prevScope;else{let t=_e;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){const o=this.scopes.slice();for(s=0,n=o.length;s<n;s++)o[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function Si(){return _e}let se;const $n=new WeakSet;class Zo{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,_e&&(_e.active?_e.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,$n.has(this)&&($n.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Qo(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ho(this),$o(this);const t=se,s=Be;se=this,Be=!0;try{return this.fn()}finally{er(this),se=t,Be=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Es(t);this.deps=this.depsTail=void 0,ho(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?$n.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){as(this)&&this.run()}get dirty(){return as(this)}}let Xo=0,Gt,Jt;function Qo(e,t=!1){if(e.flags|=8,t){e.next=Jt,Jt=e;return}e.next=Gt,Gt=e}function ws(){Xo++}function Os(){if(--Xo>0)return;if(Jt){let t=Jt;for(Jt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Gt;){let t=Gt;for(Gt=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function $o(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function er(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),Es(n),ki(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function as(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(tr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function tr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===tn)||(e.globalVersion=tn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!as(e))))return;e.flags|=2;const t=e.dep,s=se,n=Be;se=e,Be=!0;try{$o(e);const o=e.fn(e._value);(t.version===0||Xe(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{se=s,Be=n,er(e),e.flags&=-3}}function Es(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 i=s.computed.deps;i;i=i.nextDep)Es(i,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function ki(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let Be=!0;const nr=[];function et(){nr.push(Be),Be=!1}function tt(){const e=nr.pop();Be=e===void 0?!0:e}function ho(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=se;se=void 0;try{t()}finally{se=s}}}let tn=0;class Ci{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 As{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(!se||!Be||se===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==se)s=this.activeLink=new Ci(se,this),se.deps?(s.prevDep=se.depsTail,se.depsTail.nextDep=s,se.depsTail=s):se.deps=se.depsTail=s,sr(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=se.depsTail,s.nextDep=void 0,se.depsTail.nextDep=s,se.depsTail=s,se.deps===s&&(se.deps=n)}return s}trigger(t){this.version++,tn++,this.notify(t)}notify(t){ws();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Os()}}}function sr(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)sr(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const fs=new WeakMap,Tt=Symbol(""),ds=Symbol(""),nn=Symbol("");function be(e,t,s){if(Be&&se){let n=fs.get(e);n||fs.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new As),o.map=n,o.key=s),o.track()}}function lt(e,t,s,n,o,i){const r=fs.get(e);if(!r){tn++;return}const l=a=>{a&&a.trigger()};if(ws(),t==="clear")r.forEach(l);else{const a=R(e),p=a&&Ss(s);if(a&&s==="length"){const m=Number(n);r.forEach((_,O)=>{(O==="length"||O===nn||!$e(O)&&O>=m)&&l(_)})}else switch((s!==void 0||r.has(void 0))&&l(r.get(s)),p&&l(r.get(nn)),t){case"add":a?p&&l(r.get("length")):(l(r.get(Tt)),_t(e)&&l(r.get(ds)));break;case"delete":a||(l(r.get(Tt)),_t(e)&&l(r.get(ds)));break;case"set":_t(e)&&l(r.get(Tt));break}}Os()}function Mt(e){const t=X(e);return t===e||(be(t,"iterate",nn),je(e))?t:nt(e)?yt(e)?t.map(s=>bt(Ie(s))):t.map(bt):t.map(Ie)}function Wn(e){return be(e=X(e),"iterate",nn),e}function Je(e,t){return nt(e)?bt(yt(e)?Ie(t):t):Ie(t)}const Ti={__proto__:null,[Symbol.iterator](){return es(this,Symbol.iterator,e=>Je(this,e))},concat(...e){return Mt(this).concat(...e.map(t=>R(t)?Mt(t):t))},entries(){return es(this,"entries",e=>(e[1]=Je(this,e[1]),e))},every(e,t){return ot(this,"every",e,t,void 0,arguments)},filter(e,t){return ot(this,"filter",e,t,s=>s.map(n=>Je(this,n)),arguments)},find(e,t){return ot(this,"find",e,t,s=>Je(this,s),arguments)},findIndex(e,t){return ot(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return ot(this,"findLast",e,t,s=>Je(this,s),arguments)},findLastIndex(e,t){return ot(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return ot(this,"forEach",e,t,void 0,arguments)},includes(...e){return ts(this,"includes",e)},indexOf(...e){return ts(this,"indexOf",e)},join(e){return Mt(this).join(e)},lastIndexOf(...e){return ts(this,"lastIndexOf",e)},map(e,t){return ot(this,"map",e,t,void 0,arguments)},pop(){return Bt(this,"pop")},push(...e){return Bt(this,"push",e)},reduce(e,...t){return po(this,"reduce",e,t)},reduceRight(e,...t){return po(this,"reduceRight",e,t)},shift(){return Bt(this,"shift")},some(e,t){return ot(this,"some",e,t,void 0,arguments)},splice(...e){return Bt(this,"splice",e)},toReversed(){return Mt(this).toReversed()},toSorted(e){return Mt(this).toSorted(e)},toSpliced(...e){return Mt(this).toSpliced(...e)},unshift(...e){return Bt(this,"unshift",e)},values(){return es(this,"values",e=>Je(this,e))}};function es(e,t,s){const n=Wn(e),o=n[t],i=o.call(n);if(n!==e&&!je(e)){if(i[Symbol.toStringTag]==="Array Iterator"){const r=Object.create(Object.getPrototypeOf(i));return r.next=()=>mo(i.next(),s),o!==or[t]&&Object.defineProperties(r,{return:{get(){const l=i.return;return typeof l=="function"?l.bind(i):l}},throw:{get(){const l=i.throw;return typeof l=="function"?l.bind(i):l}}}),r}i._next=i.next,i.next=()=>mo(i._next(),s)}return i}function mo(e,t){return e.done||(e.value=t(e.value)),e}const or=Array.prototype;function ot(e,t,s,n,o,i){const r=Wn(e),l=r!==e&&!je(e),a=r[t];if(a!==or[t]){const _=a.apply(e,i);return l?Ie(_):_}let p=s;r!==e&&(l?p=function(_,O){return s.call(this,Je(e,_),O,e)}:s.length>2&&(p=function(_,O){return s.call(this,_,O,e)}));const m=a.call(r,p,n);return l&&o?o(m):m}function po(e,t,s,n){const o=Wn(e),i=o!==e&&!je(e);let r=s,l=!1;o!==e&&(i?(l=n.length===0,r=function(p,m,_){return l&&(l=!1,p=Je(e,p)),s.call(this,p,Je(e,m),_,e)}):s.length>3&&(r=function(p,m,_){return s.call(this,p,m,_,e)}));const a=o[t](r,...n);return l?Je(e,a):a}function ts(e,t,s){const n=X(e);be(n,"iterate",nn);const o=n[t](...s);return(o===-1||o===!1)&&js(s[0])?(s[0]=X(s[0]),n[t](...s)):o}function Bt(e,t,s=[]){et(),ws();const n=X(e)[t].apply(e,s);return Os(),tt(),n}const wi=vs("__proto__,__v_isRef,__isVue"),rr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter($e));function Oi(e){$e(e)||(e=String(e));const t=X(this);return be(t,"has",e),t.hasOwnProperty(e)}class ir{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,i=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return i;if(s==="__v_raw")return n===(o?i?Li:fr:i?ar:cr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const r=R(t);if(!o){let a;if(r&&(a=Ti[s]))return a;if(s==="hasOwnProperty")return Oi}const l=Reflect.get(t,s,ve(t)?t:n);if(($e(s)?rr.has(s):wi(s))||(o||be(t,"get",s),i))return l;if(ve(l)){const a=r&&Ss(s)?l:l.value;return o&&$(a)?hs(a):a}return $(l)?o?hs(l):Ms(l):l}}class lr extends ir{constructor(t=!1){super(!1,t)}set(t,s,n,o){let i=t[s];const r=R(t)&&Ss(s);if(!this._isShallow){const p=nt(i);if(!je(n)&&!nt(n)&&(i=X(i),n=X(n)),!r&&ve(i)&&!ve(n))return p||(i.value=n),!0}const l=r?Number(s)<t.length:J(t,s),a=Reflect.set(t,s,n,ve(t)?t:o);return t===X(o)&&a&&(l?Xe(n,i)&&lt(t,"set",s,n):lt(t,"add",s,n)),a}deleteProperty(t,s){const n=J(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&lt(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!$e(s)||!rr.has(s))&&be(t,"has",s),n}ownKeys(t){return be(t,"iterate",R(t)?"length":Tt),Reflect.ownKeys(t)}}class Ei extends ir{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const Ai=new lr,Ni=new Ei,Mi=new lr(!0);const us=e=>e,Sn=e=>Reflect.getPrototypeOf(e);function Pi(e,t,s){return function(...n){const o=this.__v_raw,i=X(o),r=_t(i),l=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,p=o[e](...n),m=s?us:t?bt:Ie;return!t&&be(i,"iterate",a?ds:Tt),he(Object.create(p),{next(){const{value:_,done:O}=p.next();return O?{value:_,done:O}:{value:l?[m(_[0]),m(_[1])]:m(_),done:O}}})}}function kn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ji(e,t){const s={get(o){const i=this.__v_raw,r=X(i),l=X(o);e||(Xe(o,l)&&be(r,"get",o),be(r,"get",l));const{has:a}=Sn(r),p=t?us:e?bt:Ie;if(a.call(r,o))return p(i.get(o));if(a.call(r,l))return p(i.get(l));i!==r&&i.get(o)},get size(){const o=this.__v_raw;return!e&&be(X(o),"iterate",Tt),o.size},has(o){const i=this.__v_raw,r=X(i),l=X(o);return e||(Xe(o,l)&&be(r,"has",o),be(r,"has",l)),o===l?i.has(o):i.has(o)||i.has(l)},forEach(o,i){const r=this,l=r.__v_raw,a=X(l),p=t?us:e?bt:Ie;return!e&&be(a,"iterate",Tt),l.forEach((m,_)=>o.call(i,p(m),p(_),r))}};return he(s,e?{add:kn("add"),set:kn("set"),delete:kn("delete"),clear:kn("clear")}:{add(o){const i=X(this),r=Sn(i),l=X(o),a=!t&&!je(o)&&!nt(o)?l:o;return r.has.call(i,a)||Xe(o,a)&&r.has.call(i,o)||Xe(l,a)&&r.has.call(i,l)||(i.add(a),lt(i,"add",a,a)),this},set(o,i){!t&&!je(i)&&!nt(i)&&(i=X(i));const r=X(this),{has:l,get:a}=Sn(r);let p=l.call(r,o);p||(o=X(o),p=l.call(r,o));const m=a.call(r,o);return r.set(o,i),p?Xe(i,m)&&lt(r,"set",o,i):lt(r,"add",o,i),this},delete(o){const i=X(this),{has:r,get:l}=Sn(i);let a=r.call(i,o);a||(o=X(o),a=r.call(i,o)),l&&l.call(i,o);const p=i.delete(o);return a&&lt(i,"delete",o,void 0),p},clear(){const o=X(this),i=o.size!==0,r=o.clear();return i&&lt(o,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=Pi(o,e,t)}),s}function Ns(e,t){const s=ji(e,t);return(n,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_isShallow"?t:o==="__v_raw"?n:Reflect.get(J(s,o)&&o in n?s:n,o,i)}const Ii={get:Ns(!1,!1)},Di={get:Ns(!1,!0)},Ri={get:Ns(!0,!1)};const cr=new WeakMap,ar=new WeakMap,fr=new WeakMap,Li=new WeakMap;function Fi(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ms(e){return nt(e)?e:Ps(e,!1,Ai,Ii,cr)}function Hi(e){return Ps(e,!1,Mi,Di,ar)}function hs(e){return Ps(e,!0,Ni,Ri,fr)}function Ps(e,t,s,n,o){if(!$(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=o.get(e);if(i)return i;const r=Fi(fi(e));if(r===0)return e;const l=new Proxy(e,r===2?n:s);return o.set(e,l),l}function yt(e){return nt(e)?yt(e.__v_raw):!!(e&&e.__v_isReactive)}function nt(e){return!!(e&&e.__v_isReadonly)}function je(e){return!!(e&&e.__v_isShallow)}function js(e){return e?!!e.__v_raw:!1}function X(e){const t=e&&e.__v_raw;return t?X(t):e}function Vi(e){return!J(e,"__v_skip")&&Object.isExtensible(e)&&zo(e,"__v_skip",!0),e}const Ie=e=>$(e)?Ms(e):e,bt=e=>$(e)?hs(e):e;function ve(e){return e?e.__v_isRef===!0:!1}function ge(e){return Bi(e,!1)}function Bi(e,t){return ve(e)?e:new Ui(e,t)}class Ui{constructor(t,s){this.dep=new As,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:X(t),this._value=s?t:Ie(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||je(t)||nt(t);t=n?t:X(t),Xe(t,s)&&(this._rawValue=t,this._value=n?t:Ie(t),this.dep.trigger())}}function Wi(e){return ve(e)?e.value:e}const Ki={get:(e,t,s)=>t==="__v_raw"?e:Wi(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return ve(o)&&!ve(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function dr(e){return yt(e)?e:new Proxy(e,Ki)}class qi{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new As(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=tn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&se!==this)return Qo(this,!0),!0}get value(){const t=this.dep.track();return tr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function zi(e,t,s=!1){let n,o;return V(e)?n=e:(n=e.get,o=e.set),new qi(n,o,s)}const Cn={},Nn=new WeakMap;let kt;function Gi(e,t=!1,s=kt){if(s){let n=Nn.get(s);n||Nn.set(s,n=[]),n.push(e)}}function Ji(e,t,s=te){const{immediate:n,deep:o,once:i,scheduler:r,augmentJob:l,call:a}=s,p=P=>o?P:je(P)||o===!1||o===0?ct(P,1):ct(P);let m,_,O,N,L=!1,D=!1;if(ve(e)?(_=()=>e.value,L=je(e)):yt(e)?(_=()=>p(e),L=!0):R(e)?(D=!0,L=e.some(P=>yt(P)||je(P)),_=()=>e.map(P=>{if(ve(P))return P.value;if(yt(P))return p(P);if(V(P))return a?a(P,2):P()})):V(e)?t?_=a?()=>a(e,2):e:_=()=>{if(O){et();try{O()}finally{tt()}}const P=kt;kt=m;try{return a?a(e,3,[N]):e(N)}finally{kt=P}}:_=Qe,t&&o){const P=_,ne=o===!0?1/0:o;_=()=>ct(P(),ne)}const z=Si(),M=()=>{m.stop(),z&&z.active&&xs(z.effects,m)};if(i&&t){const P=t;t=(...ne)=>{try{return P(...ne)}finally{M()}}}let B=D?new Array(e.length).fill(Cn):Cn;const U=P=>{if(!(!(m.flags&1)||!m.dirty&&!P))if(t){const ne=m.run();if(P||o||L||(D?ne.some((ae,ce)=>Xe(ae,B[ce])):Xe(ne,B))){const ae=kt;et();try{O&&O(),kt=m;const ce=[ne,B===Cn?void 0:D&&B[0]===Cn?[]:B,N];B=ne,a?a(t,3,ce):t(...ce)}finally{kt=ae,tt()}}}else m.run()};return l&&l(U),m=new Zo(_),m.scheduler=r?()=>r(U,!1):U,N=P=>Gi(P,!1,m),O=m.onStop=()=>{const P=Nn.get(m);if(P){if(a)a(P,4);else for(const ne of P)ne();Nn.delete(m)}},t?n?U(!0):B=m.run():r?r(U.bind(null,!0),!0):m.run(),M.pause=m.pause.bind(m),M.resume=m.resume.bind(m),M.stop=M,M}function ct(e,t=1/0,s){if(t<=0||!$(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,ve(e))ct(e.value,t,s);else if(R(e))for(let n=0;n<e.length;n++)ct(e[n],t,s);else if(ft(e)||_t(e))e.forEach(n=>{ct(n,t,s)});else if(Ko(e)){for(const n in e)ct(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&ct(e[n],t,s)}return e}/**
10
+ * @vue/runtime-core v3.5.45
11
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
+ * @license MIT
13
+ **/function dn(e,t,s,n){try{return n?e(...n):e()}catch(o){Kn(o,t,s)}}function Ue(e,t,s,n){if(V(e)){const o=dn(e,t,s,n);return o&&Uo(o)&&o.catch(i=>{Kn(i,t,s,void 0,!0)}),o}if(R(e)){const o=[];for(let i=0;i<e.length;i++)o.push(Ue(e[i],t,s,n));return o}}function Kn(e,t,s,n=!0,o=!1){const i=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||te;if(t){let a=t.parent;const p=t.proxy,m=`https://vuejs.org/error-reference/#runtime-${s}`;for(;a;){const _=a.ec;if(_&&!a.isUnmounted&&(!o||a.scope.active)){for(let O=0;O<_.length;O++)if(_[O](e,p,m)===!1)return}a=a.parent}if(r){et(),dn(r,null,10,[e,p,m]),tt();return}}Yi(e,s,i,n,l)}function Yi(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const ke=[];let He=-1;const Ye=[];let gt=null,jt=0;const ur=Promise.resolve();let Mn=null;function hr(e){const t=Mn||ur;return e?t.then(this?e.bind(this):e):t}function Zi(e){let t=He+1,s=ke.length;for(;t<s;){const n=t+s>>>1,o=ke[n],i=sn(o);i<e||i===e&&o.flags&2?t=n+1:s=n}return t}function Is(e){if(!(e.flags&1)){const t=sn(e),s=ke[ke.length-1];!s||!(e.flags&2)&&t>=sn(s)?ke.push(e):ke.splice(Zi(t),0,e),e.flags|=1,mr()}}function mr(){Mn||(Mn=ur.then(_r))}function Xi(e){if(!R(e))gt&&e.id===-1?gt.splice(jt+1,0,e):e.flags&1||(Ye.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Ye.push(e[t]);mr()}function pr(e,t,s,n=He+1){for(;n<ke.length;n++){const o=ke[n];if(o&&o.flags&2){if(e&&o.id!==e.uid||t!==void 0&&!(o.id>=t))continue;ke.splice(n,1),n=e?n-1:He,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function gr(e,t,s=0){if(Ye.length){let n=Ye,o=0;if(t){n=[];for(let r=0;r<Ye.length;r++){const l=Ye[r];(l.i!==void 0?!l.i||l.i.uid<s:t.has(l))?Ye[o++]=l:n.push(l)}}const i=[...new Set(n)].sort((r,l)=>sn(r)-sn(l));if(Ye.length=o,gt){for(let r=0;r<i.length;r++)gt.push(i[r]);return}for(gt=i,jt=0;jt<gt.length;jt++){const r=gt[jt];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}gt=null,jt=0}}let ns=!1;function Qi(e,t){if(ns){e();return}const s=t===void 0?void 0:new Set(Ye);e(),ns=!0;try{pr(void 0,t),gr(void 0,s,t)}finally{ns=!1}}const sn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function _r(e){try{for(He=0;He<ke.length;He++){const t=ke[He];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),dn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;He<ke.length;He++){const t=ke[He];t&&(t.flags&=-2)}He=-1,ke.length=0,gr(),Mn=null,(ke.length||Ye.length)&&_r()}}let Pe=null,yr=null;function Pn(e){const t=Pe;return Pe=e,yr=e&&e.type.__scopeId||null,t}function $i(e,t=Pe,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&wo(-1);const i=Pn(t),r=wt.length;let l;try{l=e(...o)}finally{for(let a=wt.length;a>r;a--)Wr();Pn(i),n._d&&wo(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function Fe(e,t){if(Pe===null)return e;const s=Jn(Pe),n=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[i,r,l,a=te]=t[o];i&&(V(i)&&(i={mounted:i,updated:i}),i.deep&&ct(r),n.push({dir:i,instance:s,value:r,oldValue:void 0,arg:l,modifiers:a}))}return e}function xt(e,t,s,n){let o=e;if(n==="beforeMount")e._mount=e;else if(n==="beforeUpdate"){const l=t&&t._mount;l&&(l._latest=e,e._mount=l)}else if(n==="mounted"){const l=e._latest;e._mount=e._latest=void 0,l&&(o=l,l._mount=void 0)}const i=o.dirs,r=t&&t.dirs;for(let l=0;l<i.length;l++){let a=i[l];r?a.oldValue=r[l].value:n==="mounted"&&a.oldValue!==void 0&&(a=he({},a,{oldValue:void 0}));let p=a.dir[n];p&&(et(),Ue(p,s,8,[e.el,a,o,t]),tt())}}function el(e,t){if(Ce){let s=Ce.provides;const n=Ce.parent&&Ce.parent.provides;n===s&&(s=Ce.provides=Object.create(n)),s[e]=t}}function En(e,t,s=!1){const n=Ql();if(n||Dt){let o=Dt?Dt._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&&V(t)?t.call(n&&n.proxy):t}}const tl=Symbol.for("v-scx"),nl=()=>En(tl);function It(e,t,s){return br(e,t,s)}function br(e,t,s=te){const{immediate:n,deep:o,flush:i,once:r}=s,l=he({},s),a=t&&n||!t&&i!=="post";let p;if(cn){if(i==="sync"){const N=nl();p=N.__watcherHandles||(N.__watcherHandles=[])}else if(!a){const N=()=>{};return N.stop=Qe,N.resume=Qe,N.pause=Qe,N}}const m=Ce;l.call=(N,L,D)=>Ue(N,m,L,D);let _=!1;i==="post"?l.scheduler=N=>{N.i=m,Se(N,m&&m.suspense)}:i!=="sync"&&(_=!0,l.scheduler=(N,L)=>{L?N():Is(N)}),l.augmentJob=N=>{t&&(N.flags|=4),_&&(N.flags|=2,m&&(N.id=m.uid,N.i=m))};const O=Ji(e,t,l);return cn&&(p?p.push(O):a&&O()),O}function sl(e,t,s){const n=this.proxy,o=le(e)?e.includes(".")?vr(n,e):()=>n[e]:e.bind(n,n);let i;V(t)?i=t:(i=t.handler,s=t);const r=un(this),l=br(o,i.bind(n),s);return r(),l}function vr(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 ol=Symbol("_vte"),qn=e=>e.__isTeleport,ss=Symbol("_leaveCb");function rl(e){let t=e[0];if(e.length>1){for(const s of e)if(s.type!==We){t=s;break}}return t}function xr(e){if(!Ds(e))return qn(e.type)&&e.children?rl(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:s}=e;if(s){if(t&16)return s[0];if(t&32&&V(s.default))return s.default()}}function Yt(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const s=e.component.subTree;Yt(qn(s.type)&&xr(s)||s,t)}else if(e.shapeFlag&128){const s=e.suspense;if(s){const n=s.isHydrating?s.pendingBranch:s.activeBranch;n&&Yt(n,t.clone(n))}else e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)}else if(e.transition=t,e.type===W&&R(e.children)){const s=Nr(e.children,!1);s&&Yt(s,t)}}function ms(e){if(e.component)return ms(e.component.subTree);if(e.type===W){const t=R(e.children)&&Nr(e.children,!1);return t?ms(t):void 0}if(e.type!==We)return e}function Sr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function go(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const jn=new WeakMap;function Zt(e,t,s,n,o=!1){if(R(e)){e.forEach((D,z)=>Zt(D,t&&(R(t)?t[z]:t),s,n,o));return}if(Xt(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Zt(e,t,s,n.component.subTree);return}const i=n.shapeFlag&4?Jn(n.component):n.el,r=o?null:i,{i:l,r:a}=e,p=t&&t.r,m=l.refs===te?l.refs={}:l.refs,_=l.setupState,O=X(_),N=_===te?Bo:D=>go(m,D)?!1:J(O,D),L=(D,z)=>!(z&&go(m,z));if(p!=null&&p!==a){if(_o(t),le(p))m[p]=null,N(p)&&(_[p]=null);else if(ve(p)){const D=t;L(p,D.k)&&(p.value=null),D.k&&(m[D.k]=null)}}if(V(a))dn(a,l,12,[r,m]);else{const D=le(a),z=ve(a);if(D||z){const M=()=>{if(e.f){const B=D?N(a)?_[a]:m[a]:L()||!e.k?a.value:m[e.k];if(o)R(B)&&xs(B,i);else if(R(B))B.includes(i)||B.push(i);else if(D)m[a]=[i],N(a)&&(_[a]=m[a]);else{const U=[i];L(a,e.k)&&(a.value=U),e.k&&(m[e.k]=U)}}else D?(m[a]=r,N(a)&&(_[a]=r)):z&&(L(a,e.k)&&(a.value=r),e.k&&(m[e.k]=r))};if(r){const B=()=>{M(),jn.delete(e)};B.id=-1,jn.set(e,B),Se(B,s)}else _o(e),M()}}}function _o(e){const t=jn.get(e);t&&(t.flags|=8,jn.delete(e))}Un().requestIdleCallback;Un().cancelIdleCallback;const Xt=e=>!!e.type.__asyncLoader,Ds=e=>e.type.__isKeepAlive;function il(e,t){kr(e,"a",t)}function ll(e,t){kr(e,"da",t)}function kr(e,t,s=Ce){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(on(t,n,s),s){let o=s.parent;for(;o&&o.parent;)Ds(o.parent.vnode)&&cl(n,t,s,o),o=o.parent}}function cl(e,t,s,n){const o=on(t,e,n,!0),i=on("um",()=>xs(n[t],o),s);i.flags=16}function on(e,t,s=Ce,n=!1){if(s){const o=s[e]||(s[e]=[]),i=t.__weh||(t.__weh=(...r)=>{et();const l=un(s),a=Ue(t,s,e,r);return l(),tt(),a});return n?o.unshift(i):o.push(i),i}}const ut=e=>(t,s=Ce)=>{(!cn||e==="sp")&&on(e,(...n)=>t(...n),s)},al=ut("bm"),Cr=ut("m"),fl=ut("bu"),dl=ut("u"),Tr=ut("bum"),ul=ut("um"),hl=ut("sp"),ml=ut("rtg"),pl=ut("rtc");function gl(e,t=Ce){on("ec",e,t)}const _l=Symbol.for("v-ndc");function de(e,t,s,n){let o;const i=s,r=R(e);if(r||le(e)){const l=r&&yt(e);let a=!1,p=!1;l&&(a=!je(e),p=nt(e),e=Wn(e)),o=new Array(e.length);for(let m=0,_=e.length;m<_;m++)o[m]=t(a?p?bt(Ie(e[m])):Ie(e[m]):e[m],m,void 0,i)}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)o=[];else{o=new Array(e);for(let l=0;l<e;l++)o[l]=t(l+1,l,void 0,i)}else if($(e))if(e[Symbol.iterator])o=Array.from(e,(l,a)=>t(l,a,void 0,i));else{const l=Object.keys(e);o=new Array(l.length);for(let a=0,p=l.length;a<p;a++){const m=l[a];o[a]=t(e[m],m,a,i)}}else o=[];return o}const ps=e=>e?Gr(e)?Jn(e):ps(e.parent):null,Qt=he(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=>ps(e.parent),$root:e=>ps(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Or(e),$forceUpdate:e=>e.f||(e.f=()=>{Is(e.update)}),$nextTick:e=>e.n||(e.n=hr.bind(e.proxy)),$watch:e=>sl.bind(e)}),os=(e,t)=>e!==te&&!e.__isScriptSetup&&J(e,t),yl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:i,accessCache:r,type:l,appContext:a}=e;if(t[0]!=="$"){const O=r[t];if(O!==void 0)switch(O){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return i[t]}else{if(os(n,t))return r[t]=1,n[t];if(o!==te&&J(o,t))return r[t]=2,o[t];if(J(i,t))return r[t]=3,i[t];if(s!==te&&J(s,t))return r[t]=4,s[t];gs&&(r[t]=0)}}const p=Qt[t];let m,_;if(p)return t==="$attrs"&&be(e.attrs,"get",""),p(e);if((m=l.__cssModules)&&(m=m[t]))return m;if(s!==te&&J(s,t))return r[t]=4,s[t];if(_=a.config.globalProperties,J(_,t))return _[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:i}=e;return os(o,t)?(o[t]=s,!0):n!==te&&J(n,t)?(n[t]=s,!0):J(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,props:i,type:r}},l){let a;return!!(s[l]||e!==te&&l[0]!=="$"&&J(e,l)||os(t,l)||J(i,l)||J(n,l)||J(Qt,l)||J(o.config.globalProperties,l)||(a=r.__cssModules)&&a[l])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:J(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function yo(e){return R(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let gs=!0;function bl(e){const t=Or(e),s=e.proxy,n=e.ctx;gs=!1,t.beforeCreate&&bo(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:r,watch:l,provide:a,inject:p,created:m,beforeMount:_,mounted:O,beforeUpdate:N,updated:L,activated:D,deactivated:z,beforeDestroy:M,beforeUnmount:B,destroyed:U,unmounted:P,render:ne,renderTracked:ae,renderTriggered:ce,errorCaptured:Te,serverPrefetch:st,expose:De,inheritAttrs:ht,components:Et,directives:At,filters:Ft}=t;if(p&&vl(p,n,null),r)for(const oe in r){const Q=r[oe];V(Q)&&(n[oe]=Q.bind(s))}if(o){const oe=o.call(s,s);$(oe)&&(e.data=Ms(oe))}if(gs=!0,i)for(const oe in i){const Q=i[oe],mt=V(Q)?Q.bind(s,s):V(Q.get)?Q.get.bind(s,s):Qe,Ae=!V(Q)&&V(Q.set)?Q.set.bind(s):Qe,Ne=Z({get:mt,set:Ae});Object.defineProperty(n,oe,{enumerable:!0,configurable:!0,get:()=>Ne.value,set:we=>Ne.value=we})}if(l)for(const oe in l)wr(l[oe],n,s,oe);if(a){const oe=V(a)?a.call(s):a;Reflect.ownKeys(oe).forEach(Q=>{el(Q,oe[Q])})}m&&bo(m,e,"c");function me(oe,Q){R(Q)?Q.forEach(mt=>oe(mt.bind(s))):Q&&oe(Q.bind(s))}if(me(al,_),me(Cr,O),me(fl,N),me(dl,L),me(il,D),me(ll,z),me(gl,Te),me(pl,ae),me(ml,ce),me(Tr,B),me(ul,P),me(hl,st),R(De))if(De.length){const oe=e.exposed||(e.exposed={});De.forEach(Q=>{Object.defineProperty(oe,Q,{get:()=>s[Q],set:mt=>s[Q]=mt,enumerable:!0})})}else e.exposed||(e.exposed={});ne&&e.render===Qe&&(e.render=ne),ht!=null&&(e.inheritAttrs=ht),Et&&(e.components=Et),At&&(e.directives=At),st&&Sr(e)}function vl(e,t,s=Qe){R(e)&&(e=_s(e));for(const n in e){const o=e[n];let i;$(o)?"default"in o?i=En(o.from||n,o.default,!0):i=En(o.from||n):i=En(o),ve(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:r=>i.value=r}):t[n]=i}}function bo(e,t,s){Ue(R(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function wr(e,t,s,n){let o=n.includes(".")?vr(s,n):()=>s[n];if(le(e)){const i=t[e];V(i)&&It(o,i)}else if(V(e))It(o,e.bind(s));else if($(e))if(R(e))e.forEach(i=>wr(i,t,s,n));else{const i=V(e.handler)?e.handler.bind(s):t[e.handler];V(i)&&It(o,i,e)}}function Or(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:r}}=e.appContext,l=i.get(t);let a;return l?a=l:!o.length&&!s&&!n?a=t:(a={},o.length&&o.forEach(p=>In(a,p,r,!0)),In(a,t,r)),$(t)&&i.set(t,a),a}function In(e,t,s,n=!1){const{mixins:o,extends:i}=t;i&&In(e,i,s,!0),o&&o.forEach(r=>In(e,r,s,!0));for(const r in t)if(!(n&&r==="expose")){const l=xl[r]||s&&s[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const xl={data:vo,props:xo,emits:xo,methods:Kt,computed:Kt,beforeCreate:xe,created:xe,beforeMount:xe,mounted:xe,beforeUpdate:xe,updated:xe,beforeDestroy:xe,beforeUnmount:xe,destroyed:xe,unmounted:xe,activated:xe,deactivated:xe,errorCaptured:xe,serverPrefetch:xe,components:Kt,directives:Kt,watch:kl,provide:vo,inject:Sl};function vo(e,t){return t?e?function(){return he(V(e)?e.call(this,this):e,V(t)?t.call(this,this):t)}:t:e}function Sl(e,t){return Kt(_s(e),_s(t))}function _s(e){if(R(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function xe(e,t){return e?[...new Set([].concat(e,t))]:t}function Kt(e,t){return e?he(Object.create(null),e,t):t}function xo(e,t){return e?R(e)&&R(t)?[...new Set([...e,...t])]:he(Object.create(null),yo(e),yo(t??{})):t}function kl(e,t){if(!e)return t;if(!t)return e;const s=he(Object.create(null),e);for(const n in t)s[n]=xe(e[n],t[n]);return s}function Er(){return{app:null,config:{isNativeTag:Bo,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 Cl=0;function Tl(e,t){return function(n,o=null){V(n)||(n=he({},n)),o!=null&&!$(o)&&(o=null);const i=Er(),r=new WeakSet,l=[];let a=!1;const p=i.app={_uid:Cl++,_component:n,_props:o,_container:null,_context:i,_instance:null,version:oc,get config(){return i.config},set config(m){},use(m,..._){return r.has(m)||(m&&V(m.install)?(r.add(m),m.install(p,..._)):V(m)&&(r.add(m),m(p,..._))),p},mixin(m){return i.mixins.includes(m)||i.mixins.push(m),p},component(m,_){return _?(i.components[m]=_,p):i.components[m]},directive(m,_){return _?(i.directives[m]=_,p):i.directives[m]},mount(m,_,O){if(!a){const N=p._ceVNode||at(n,o);return N.appContext=i,O===!0?O="svg":O===!1&&(O=void 0),e(N,m,O),a=!0,p._container=m,m.__vue_app__=p,Jn(N.component)}},onUnmount(m){l.push(m)},unmount(){a&&(Ue(l,p._instance,16),e(null,p._container),delete p._container.__vue_app__)},provide(m,_){return i.provides[m]=_,p},runWithContext(m){const _=Dt;Dt=p;try{return m()}finally{Dt=_}}};return p}}let Dt=null;const wl=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ve(t)}Modifiers`]||e[`${Ot(t)}Modifiers`];function Ol(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||te;let o=s;const i=t.startsWith("update:"),r=i&&wl(n,t.slice(7));r&&(r.trim&&(o=s.map(m=>le(m)?m.trim():m)),r.number&&(o=o.map(ks)));let l,a=n[l=Xn(t)]||n[l=Xn(Ve(t))];!a&&i&&(a=n[l=Xn(Ot(t))]),a&&Ue(a,e,6,o);const p=n[l+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Ue(p,e,6,o)}}const El=new WeakMap;function Ar(e,t,s=!1){const n=s?El:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const i=e.emits;let r={},l=!1;if(!V(e)){const a=p=>{const m=Ar(p,t,!0);m&&(l=!0,he(r,m))};!s&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!i&&!l?($(e)&&n.set(e,null),null):(R(i)?i.forEach(a=>r[a]=null):he(r,i),$(e)&&n.set(e,r),r)}function zn(e,t){return!e||!Hn(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),J(e,t[0].toLowerCase()+t.slice(1))||J(e,Ot(t))||J(e,t))}function So(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[i],slots:r,attrs:l,emit:a,render:p,renderCache:m,props:_,data:O,setupState:N,ctx:L,inheritAttrs:D}=e,z=Pn(e);let M,B;try{if(s.shapeFlag&4){const P=o||n,ne=P;M=Ze(p.call(ne,P,m,_,N,O,L)),B=l}else{const P=t;M=Ze(P.length>1?P(_,{attrs:l,slots:r,emit:a}):P(_,null)),B=t.props?l:Al(l)}}catch(P){wt.length=0,Kn(P,e,1),M=at(We)}let U=M;if(B&&D!==!1){const P=Object.keys(B),{shapeFlag:ne}=U;P.length&&ne&7&&(i&&P.some(Vn)&&(B=Nl(B,i)),U=Lt(U,B,!1,!0))}if(s.dirs&&(U=Lt(U,null,!1,!0),U.dirs=U.dirs?U.dirs.concat(s.dirs):s.dirs),s.transition){const P=qn(U.type)&&xr(U)||U;Yt(P,s.transition)}return M=U,Pn(z),M}function Nr(e,t=!0){let s;for(let n=0;n<e.length;n++){const o=e[n];if(Fs(o)){if(o.type!==We||o.children==="v-if"){if(s)return;s=o}}else return}return s}const Al=e=>{let t;for(const s in e)(s==="class"||s==="style"||Hn(s))&&((t||(t={}))[s]=e[s]);return t},Nl=(e,t)=>{const s={};for(const n in e)(!Vn(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Ml(e,t,s){const{props:n,children:o,component:i}=e,{props:r,children:l,patchFlag:a}=t,p=i.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&a>=0){if(a&1024)return!0;if(a&16)return n?ko(n,r,p):!!r;if(a&8){const m=t.dynamicProps;for(let _=0;_<m.length;_++){const O=m[_];if(Mr(r,n,O)&&!zn(p,O))return!0}}}else return(o||l)&&(!l||!l.$stable)?!0:n===r?!1:n?r?ko(n,r,p):!0:!!r;return!1}function ko(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 i=n[o];if(!J(e,i)||Mr(t,e,i)&&!zn(s,i))return!0}return!1}function Mr(e,t,s){const n=e[s],o=t[s];return s==="style"&&$(n)&&$(o)?!dt(n,o):n!==o}function Pl({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 Pr={},jr=()=>Object.create(Pr),Ir=e=>Object.getPrototypeOf(e)===Pr;function jl(e,t,s,n=!1){const o={},i=jr();e.propsDefaults=Object.create(null),Dr(e,t,o,i);for(const r in e.propsOptions[0])r in o||(o[r]=void 0);s?e.props=n?o:Hi(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function Il(e,t,s,n){const{props:o,attrs:i,vnode:{patchFlag:r}}=e,l=X(o),[a]=e.propsOptions;let p=!1;if((n||r>0)&&!(r&16)){if(r&8){const m=e.vnode.dynamicProps;for(let _=0;_<m.length;_++){let O=m[_];if(zn(e.emitsOptions,O))continue;const N=t[O];if(a)if(J(i,O))N!==i[O]&&(i[O]=N,p=!0);else{const L=Ve(O);o[L]=ys(a,l,L,N,e,!1)}else N!==i[O]&&(i[O]=N,p=!0)}}}else{Dr(e,t,o,i)&&(p=!0);let m;for(const _ in l)(!t||!J(t,_)&&((m=Ot(_))===_||!J(t,m)))&&(a?s&&(s[_]!==void 0||s[m]!==void 0)&&(o[_]=ys(a,l,_,void 0,e,!0)):delete o[_]);if(i!==l)for(const _ in i)(!t||!J(t,_))&&(delete i[_],p=!0)}p&&lt(e.attrs,"set","")}function Dr(e,t,s,n){const[o,i]=e.propsOptions;let r=!1,l;if(t)for(let a in t){if(zt(a))continue;const p=t[a];let m;o&&J(o,m=Ve(a))?!i||!i.includes(m)?s[m]=p:(l||(l={}))[m]=p:zn(e.emitsOptions,a)||(!(a in n)||p!==n[a])&&(n[a]=p,r=!0)}if(i){const a=X(s),p=l||te;for(let m=0;m<i.length;m++){const _=i[m];s[_]=ys(o,a,_,p[_],e,!J(p,_))}}return r}function ys(e,t,s,n,o,i){const r=e[s];if(r!=null){const l=J(r,"default");if(l&&n===void 0){const a=r.default;if(r.type!==Function&&!r.skipFactory&&V(a)){const{propsDefaults:p}=o;if(s in p)n=p[s];else{const m=un(o);n=p[s]=a.call(null,t),m()}}else n=a;o.ce&&o.ce._setProp(s,n)}r[0]&&(i&&!l?n=!1:r[1]&&(n===""||n===Ot(s))&&(n=!0))}return n}const Dl=new WeakMap;function Rr(e,t,s=!1){const n=s?Dl:t.propsCache,o=n.get(e);if(o)return o;const i=e.props,r={},l=[];let a=!1;if(!V(e)){const m=_=>{a=!0;const[O,N]=Rr(_,t,!0);he(r,O),N&&l.push(...N)};!s&&t.mixins.length&&t.mixins.forEach(m),e.extends&&m(e.extends),e.mixins&&e.mixins.forEach(m)}if(!i&&!a)return $(e)&&n.set(e,Ct),Ct;if(R(i))for(let m=0;m<i.length;m++){const _=Ve(i[m]);Co(_)&&(r[_]=te)}else if(i)for(const m in i){const _=Ve(m);if(Co(_)){const O=i[m],N=r[_]=R(O)||V(O)?{type:O}:he({},O),L=N.type;let D=!1,z=!0;if(R(L))for(let M=0;M<L.length;++M){const B=L[M],U=V(B)&&B.name;if(U==="Boolean"){D=!0;break}else U==="String"&&(z=!1)}else D=V(L)&&L.name==="Boolean";N[0]=D,N[1]=z,(D||J(N,"default"))&&l.push(_)}}const p=[r,l];return $(e)&&n.set(e,p),p}function Co(e){return e[0]!=="$"&&!zt(e)}const Rs=e=>e==="_"||e==="_ctx"||e==="$stable",Ls=e=>R(e)?e.map(Ze):[Ze(e)],Rl=(e,t,s)=>{if(t._n)return t;const n=$i((...o)=>Ls(t(...o)),s);return n._c=!1,n},Lr=(e,t,s)=>{const n=e._ctx;for(const o in e){if(Rs(o))continue;const i=e[o];if(V(i))t[o]=Rl(o,i,n);else if(i!=null){const r=Ls(i);t[o]=()=>r}}},Fr=(e,t)=>{const s=Ls(t);e.slots.default=()=>s},Hr=(e,t,s)=>{for(const n in t)(s||!Rs(n))&&(e[n]=t[n])},Ll=(e,t,s)=>{const n=e.slots=jr();if(e.vnode.shapeFlag&32){const o=t._;o?(Hr(n,t,s),s&&zo(n,"_",o,!0)):Lr(t,n)}else t&&Fr(e,t)},Fl=(e,t,s)=>{const{vnode:n,slots:o}=e;let i=!0,r=te;if(n.shapeFlag&32){const l=t._;l?s&&l===1?i=!1:Hr(o,t,s):(i=!t.$stable,Lr(t,o)),r=t}else t&&(Fr(e,t),r={default:1});if(i)for(const l in o)!Rs(l)&&r[l]==null&&delete o[l]},Se=Kl;function Hl(e){return Vl(e)}function Vl(e,t){const s=Un();s.__VUE__=!0;const{insert:n,remove:o,patchProp:i,createElement:r,createText:l,createComment:a,setText:p,setElementText:m,parentNode:_,nextSibling:O,setScopeId:N=Qe,insertStaticContent:L}=e,D=(d,u,g,x=null,y=null,v=null,T=void 0,C=null,S=!!u.dynamicChildren)=>{if(d===u)return;d&&!Ut(d,u)&&(x=Nt(d),we(d,y,v,!0),d=null),u.patchFlag===-2&&(S=!1,u.dynamicChildren=null),u.dynamicChildren&&d&&d.dynamicChildren&&d.dynamicChildren.hasOnce&&(u.dynamicChildren===Ct&&(u.dynamicChildren=[]),u.dynamicChildren.hasOnce=!0);const{type:b,ref:j,shapeFlag:A}=u;switch(b){case Gn:z(d,u,g,x);break;case We:M(d,u,g,x);break;case is:d==null&&B(u,g,x,T);break;case W:Et(d,u,g,x,y,v,T,C,S);break;default:A&1?ne(d,u,g,x,y,v,T,C,S):A&6?At(d,u,g,x,y,v,T,C,S):(A&64||A&128)&&b.process(d,u,g,x,y,v,T,C,S,Re)}j!=null&&y?Zt(j,d&&d.ref,v,u||d,!u):j==null&&d&&d.ref!=null&&Zt(d.ref,null,v,d,!0)},z=(d,u,g,x)=>{if(d==null)n(u.el=l(u.children),g,x);else{const y=u.el=d.el;u.children!==d.children&&p(y,u.children)}},M=(d,u,g,x)=>{d==null?n(u.el=a(u.children||""),g,x):u.el=d.el},B=(d,u,g,x)=>{[d.el,d.anchor]=L(d.children,u,g,x,d.el,d.anchor)},U=({el:d,anchor:u},g,x)=>{let y;for(;d&&d!==u;)y=O(d),n(d,g,x),d=y;n(u,g,x)},P=({el:d,anchor:u})=>{let g;for(;d&&d!==u;)g=O(d),o(d),d=g;o(u)},ne=(d,u,g,x,y,v,T,C,S)=>{if(u.type==="svg"?T="svg":u.type==="math"&&(T="mathml"),d==null)ae(u,g,x,y,v,T,C,S);else{const b=d.el&&d.el._isVueCE?d.el:null;try{b&&b._beginPatch(),st(d,u,y,v,T,C,S)}finally{b&&b._endPatch()}}},ae=(d,u,g,x,y,v,T,C)=>{let S,b;const{props:j,shapeFlag:A,transition:I,dirs:F}=d;if(S=d.el=r(d.type,v,j&&j.is,j),A&8?m(S,d.children):A&16&&Te(d.children,S,null,x,y,rs(d,v),T,C),F&&xt(d,null,x,"created"),ce(S,d,d.scopeId,T,x),j){for(const Y in j)Y!=="value"&&!zt(Y)&&i(S,Y,null,j[Y],v,x);"value"in j&&i(S,"value",null,j.value,v),(b=j.onVnodeBeforeMount)&&Ge(b,x,d)}F&&xt(d,null,x,"beforeMount");const K=Bl(y,I);K?I.beforeEnter(S):I&&!I.persisted&&(S[Wl]=!0),n(S,u,g),((b=j&&j.onVnodeMounted)||K||F)&&Se(()=>{try{b&&Ge(b,x,d),K&&I.enter(S),F&&xt(d,null,x,"mounted")}finally{}},y)},ce=(d,u,g,x,y)=>{if(g&&N(d,g),x)for(let v=0;v<x.length;v++)N(d,x[v]);if(y){let v=y.subTree;if(u===v||Ur(v.type)&&(v.ssContent===u||v.ssFallback===u)){const T=y.vnode;ce(d,T,T.scopeId,T.slotScopeIds,y.parent)}}},Te=(d,u,g,x,y,v,T,C,S=0)=>{for(let b=S;b<d.length;b++){const j=d[b]=C?it(d[b]):Ze(d[b]);D(null,j,u,g,x,y,v,T,C)}},st=(d,u,g,x,y,v,T)=>{const C=u.el=d.el;let{patchFlag:S,dynamicChildren:b,dirs:j}=u;S|=d.patchFlag&16;const A=d.props||te,I=u.props||te;let F;if(g&&St(g,!1),(F=I.onVnodeBeforeUpdate)&&Ge(F,g,u,d),j&&xt(u,d,g,"beforeUpdate"),g&&St(g,!0),b&&(!d.dynamicChildren||d.dynamicChildren.length!==b.length)&&(S=0,T=!1,b=null),(A.innerHTML&&I.innerHTML==null||A.textContent&&I.textContent==null)&&m(C,""),b?De(d.dynamicChildren,b,C,g,x,rs(u,y),v):T||Q(d,u,C,null,g,x,rs(u,y),v,!1),S>0){if(S&16)ht(C,A,I,g,y);else if(S&2&&A.class!==I.class&&i(C,"class",null,I.class,y),S&4&&i(C,"style",A.style,I.style,y),S&8){const K=u.dynamicProps;for(let Y=0;Y<K.length;Y++){const G=K[Y],re=A[G],fe=I[G];(fe!==re||G==="value")&&i(C,G,re,fe,y,g)}}S&1&&d.children!==u.children&&m(C,u.children)}else!T&&b==null&&ht(C,A,I,g,y);((F=I.onVnodeUpdated)||j)&&Se(()=>{F&&Ge(F,g,u,d),j&&xt(u,d,g,"updated")},x)},De=(d,u,g,x,y,v,T)=>{for(let C=0;C<u.length;C++){const S=d[C],b=u[C],j=S.el||$t(S),A=j&&(S.type===W||!Ut(S,b)||S.shapeFlag&198)?_(j):g;D(S,b,A,null,x,y,v,T,!0)}},ht=(d,u,g,x,y)=>{if(u!==g){if(u!==te)for(const v in u)!zt(v)&&!(v in g)&&i(d,v,u[v],null,y,x);for(const v in g){if(zt(v))continue;const T=g[v],C=u[v];T!==C&&v!=="value"&&i(d,v,C,T,y,x)}"value"in g&&i(d,"value",u.value,g.value,y)}},Et=(d,u,g,x,y,v,T,C,S)=>{const b=u.el=d?d.el:l(""),j=u.anchor=d?d.anchor:l("");let{patchFlag:A,dynamicChildren:I,slotScopeIds:F}=u;F&&(C=C?C.concat(F):F),d==null?(n(b,g,x),n(j,g,x),Te(u.children||[],g,j,y,v,T,C,S)):A>0&&A&64&&I&&d.dynamicChildren&&d.dynamicChildren.length===I.length?(De(d.dynamicChildren,I,g,y,v,T,C),(u.key!=null||y&&u===y.subTree)&&Vr(d,u,!0)):Q(d,u,g,j,y,v,T,C,S)},At=(d,u,g,x,y,v,T,C,S)=>{u.slotScopeIds=C,d==null?u.shapeFlag&512?y.ctx.activate(u,g,x,T,S):Ft(u,g,x,y,v,T,S):hn(d,u,S)},Ft=(d,u,g,x,y,v,T)=>{const C=d.component=Xl(d,x,y);if(Ds(d)&&(C.ctx.renderer=Re),$l(C,!1,T),C.asyncDep){if(y&&y.registerDep(C,me,T,v),!d.el){const S=C.subTree=at(We);M(null,S,u,g),d.placeholder=S.el}}else me(C,d,u,g,y,v,T)},hn=(d,u,g)=>{const x=u.component=d.component;if(Ml(d,u,g))if(x.asyncDep&&!x.asyncResolved){u.el=d.el,u.placeholder=d.placeholder,oe(x,u,g);return}else x.next=u,x.update();else u.el=d.el,u.placeholder=d.placeholder,x.vnode=u},me=(d,u,g,x,y,v,T)=>{const C=()=>{if(d.isMounted){let{next:A,bu:I,u:F,parent:K,vnode:Y}=d;{const Me=Br(d);if(Me){A&&(A.el=Y.el,oe(d,A,T)),Me.asyncDep.then(()=>{const Le=()=>{d.job.flags&8||(y&&y.pendingBranch?Se(Le,y):b())};Le.flags=48,Se(Le,y)});return}}let G=A,re;St(d,!1),A?(A.el=Y.el,oe(d,A,T)):A=Y,I&&On(I),(re=A.props&&A.props.onVnodeBeforeUpdate)&&Ge(re,K,A,Y),St(d,!0);const fe=So(d),Oe=d.subTree;d.subTree=fe,D(Oe,fe,_(Oe.el||$t(Oe)),Nt(Oe),d,y,v),A.el=fe.el,G===null&&Pl(d,fe.el),F&&Se(F,y),(re=A.props&&A.props.onVnodeUpdated)&&Se(()=>Ge(re,K,A,Y),y)}else{let A;const{el:I,props:F}=u,{bm:K,m:Y,parent:G,root:re,type:fe}=d,Oe=Xt(u);St(d,!1),K&&On(K),!Oe&&(A=F&&F.onVnodeBeforeMount)&&Ge(A,G,u),St(d,!0);{re.ce&&re.ce._hasShadowRoot()&&re.ce._injectChildStyle(fe,d.parent?d.parent.type:void 0);const Me=d.subTree=So(d);D(null,Me,g,x,d,y,v),u.el=Me.el}if(Y&&Se(Y,y),!Oe&&(A=F&&F.onVnodeMounted)){const Me=u;Se(()=>Ge(A,G,Me),y)}(u.shapeFlag&256||G&&Xt(G.vnode)&&G.vnode.shapeFlag&256)&&d.a&&Se(d.a,y),d.isMounted=!0,u=g=x=null}};d.scope.on();const S=d.effect=new Zo(C);d.scope.off();const b=d.update=S.run.bind(S),j=d.job=S.runIfDirty.bind(S);j.i=d,j.id=d.uid,S.scheduler=()=>Is(j),St(d,!0),b()},oe=(d,u,g)=>{u.component=d;const x=d.vnode.props;d.vnode=u,d.next=null,Il(d,u.props,x,g),Fl(d,u.children,g),et(),pr(d),tt()},Q=(d,u,g,x,y,v,T,C,S=!1)=>{const b=d&&d.children,j=d?d.shapeFlag:0,A=u.children,{patchFlag:I,shapeFlag:F}=u;if(I>0){if(I&128){Ae(b,A,g,x,y,v,T,C,S);return}else if(I&256){mt(b,A,g,x,y,v,T,C,S);return}}F&8?(j&16&&vt(b,y,v),A!==b&&m(g,A)):j&16?F&16?Ae(b,A,g,x,y,v,T,C,S):vt(b,y,v,!0):(j&8&&m(g,""),F&16&&Te(A,g,x,y,v,T,C,S))},mt=(d,u,g,x,y,v,T,C,S)=>{d=d||Ct,u=u||Ct;const b=d.length,j=u.length,A=Math.min(b,j);let I;for(I=0;I<A;I++){const F=u[I]=S?it(u[I]):Ze(u[I]);D(d[I],F,g,null,y,v,T,C,S)}b>j?vt(d,y,v,!0,!1,A):Te(u,g,x,y,v,T,C,S,A)},Ae=(d,u,g,x,y,v,T,C,S)=>{let b=0;const j=u.length;let A=d.length-1,I=j-1;for(;b<=A&&b<=I;){const F=d[b],K=u[b]=S?it(u[b]):Ze(u[b]);if(Ut(F,K))D(F,K,g,null,y,v,T,C,S);else break;b++}for(;b<=A&&b<=I;){const F=d[A],K=u[I]=S?it(u[I]):Ze(u[I]);if(Ut(F,K))D(F,K,g,null,y,v,T,C,S);else break;A--,I--}if(b>A){if(b<=I){const F=I+1,K=F<j?u[F].el:x;for(;b<=I;)D(null,u[b]=S?it(u[b]):Ze(u[b]),g,K,y,v,T,C,S),b++}}else if(b>I)for(;b<=A;)we(d[b],y,v,!0),b++;else{const F=b,K=b,Y=new Map;for(b=K;b<=I;b++){const pe=u[b]=S?it(u[b]):Ze(u[b]);pe.key!=null&&Y.set(pe.key,b)}let G,re=0;const fe=I-K+1;let Oe=!1,Me=0;const Le=new Array(fe);for(b=0;b<fe;b++)Le[b]=0;for(b=F;b<=A;b++){const pe=d[b];if(re>=fe){we(pe,y,v,!0);continue}let ye;if(pe.key!=null)ye=Y.get(pe.key);else for(G=K;G<=I;G++)if(Le[G-K]===0&&Ut(pe,u[G])){ye=G;break}ye===void 0?we(pe,y,v,!0):(Le[ye-K]=b+1,ye>=Me?Me=ye:Oe=!0,D(pe,u[ye],g,null,y,v,T,C,S),re++)}const yn=Oe?Ul(Le):Ct;for(G=yn.length-1,b=fe-1;b>=0;b--){const pe=K+b,ye=u[pe],bn=u[pe+1],pt=pe+1<j?bn.el||$t(bn):x;Le[b]===0?D(null,ye,g,pt,y,v,T,C,S):Oe&&(G<0||b!==yn[G]?Ne(ye,g,pt,2):G--)}}},Ne=(d,u,g,x,y=null)=>{const{el:v,type:T,transition:C,children:S,shapeFlag:b}=d;if(b&6){Ne(d.component.subTree,u,g,x);return}if(b&128){d.suspense.move(u,g,x);return}if(b&64){T.move(d,u,g,Re);return}if(T===W){n(v,u,g);for(let A=0;A<S.length;A++)Ne(S[A],u,g,x);n(d.anchor,u,g);return}if(T===is){U(d,u,g);return}if(x!==2&&b&1&&C)if(x===0)C.persisted&&!v[ss]?n(v,u,g):(C.beforeEnter(v),n(v,u,g),Se(()=>C.enter(v),y));else{const{leave:A,delayLeave:I,afterLeave:F}=C,K=()=>{d.ctx.isUnmounted?o(v):n(v,u,g)},Y=()=>{const G=v._isLeaving||!!v[ss];v._isLeaving&&v[ss](!0),C.persisted&&!G?K():A(v,()=>{K(),F&&F()})};I?I(v,K,Y):Y()}else n(v,u,g)},we=(d,u,g,x=!1,y=!1)=>{const{type:v,props:T,ref:C,children:S,dynamicChildren:b,shapeFlag:j,patchFlag:A,dirs:I,cacheIndex:F,memo:K}=d;if((A===-2||b&&b.hasOnce)&&(y=!1),C!=null&&(et(),Zt(C,null,g,d,!0),tt()),F!=null&&(!d.ctx||d.ctx===u)&&(u.renderCache[F]=void 0),j&256&&u.ctx.deactivate(d))return;const Y=j&1&&I,G=!Xt(d);let re;if(G&&(re=T&&T.onVnodeBeforeUnmount)&&Ge(re,u,d),j&6)Yn(d.component,g,x);else{if(j&128){d.suspense.unmount(g,x);return}Y&&xt(d,null,u,"beforeUnmount"),j&64?d.type.remove(d,u,g,Re,x):b&&!b.hasOnce&&(v!==W||A>0&&A&64)?vt(b,u,g,!1,!0):(v===W&&A&384||!y&&j&16)&&vt(S,u,g),x&&mn(d)}const fe=K!=null&&F==null;(G&&(re=T&&T.onVnodeUnmounted)||Y||fe)&&Se(()=>{re&&Ge(re,u,d),Y&&xt(d,null,u,"unmounted"),fe&&(d.el=null)},g)},mn=d=>{const{type:u,el:g,anchor:x,transition:y}=d,v=u===W;if(v&&!y){pn(g,x);return}if(u===is){P(d),y&&!y.persisted&&y.afterLeave&&y.afterLeave();return}const T=v?ms(d):d,C=()=>{v?_(g)&&pn(g,x):o(g),y&&!y.persisted&&y.afterLeave&&y.afterLeave()};if(T&&T.shapeFlag&1&&y&&!y.persisted){const{leave:S,delayLeave:b}=y,j=T.el,A=()=>S(j,C);b?b(j,C,A):A()}else C()},pn=(d,u)=>{let g;for(;d!==u;)g=O(d),o(d),d=g;o(u)},Yn=(d,u,g)=>{const{bum:x,scope:y,job:v,subTree:T,um:C,m:S,a:b}=d;To(S),To(b),x&&On(x),y.stop(),v?(v.flags|=8,we(T,d,u,g)):T&&(T.transition=d.vnode.transition,we(T,d,u,g)),C&&Se(C,u);const j=()=>{d.isUnmounted=!0};j.flags=16,Se(j,u)},vt=(d,u,g,x=!1,y=!1,v=0)=>{for(let T=v;T<d.length;T++)we(d[T],u,g,x,y)},Nt=d=>{if(d.shapeFlag&6)return Nt(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const u=O(d.anchor||d.el),g=u&&u[ol];return g?O(g):u},gn=(d,u,g)=>{const x=d&&u._vnode?void 0:d&&d.component?d.component.uid:Zl();Qi(()=>{d==null?u._vnode&&we(u._vnode,null,null,!0):D(u._vnode||null,d,u,null,null,null,g),u._vnode=d},x)},Re={p:D,um:we,m:Ne,r:mn,mt:Ft,mc:Te,pc:Q,pbc:De,n:Nt,o:e};return{render:gn,hydrate:void 0,createApp:Tl(gn)}}function rs({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 St({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Bl(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Vr(e,t,s=!1){const n=e.children,o=t.children;if(R(n)&&R(o))for(let i=0;i<n.length;i++){const r=n[i];let l=o[i];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=o[i]=it(o[i]),l.el=r.el),!s&&l.patchFlag!==-2&&Vr(r,l)),l.type===Gn&&(l.patchFlag===-1&&(l=o[i]=it(l)),l.el=r.el),l.type===We&&!l.el&&(l.el=r.el)}}function Ul(e){const t=e.slice(),s=[0];let n,o,i,r,l;const a=e.length;for(n=0;n<a;n++){const p=e[n];if(p!==0){if(o=s[s.length-1],e[o]<p){t[n]=o,s.push(n);continue}for(i=0,r=s.length-1;i<r;)l=i+r>>1,e[s[l]]<p?i=l+1:r=l;p<e[s[i]]&&(i>0&&(t[n]=s[i-1]),s[i]=n)}}for(i=s.length,r=s[i-1];i-- >0;)s[i]=r,r=t[r];return s}function Br(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Br(t)}function To(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function $t(e){if(e.placeholder)return e.placeholder;const t=e.component;if(t)return $t(t.subTree);const s=e.suspense;return s&&s.activeBranch?$t(s.activeBranch):null}const Ur=e=>e.__isSuspense,Wl=Symbol("_deferredEnter");function Kl(e,t){t&&t.pendingBranch?R(e)?t.effects.push(...e):t.effects.push(e):Xi(e)}const W=Symbol.for("v-fgt"),Gn=Symbol.for("v-txt"),We=Symbol.for("v-cmt"),is=Symbol.for("v-stc"),wt=[];let Ee=null;function w(e=!1){wt.push(Ee=e?null:[])}function Wr(){wt.pop(),Ee=wt[wt.length-1]||null}let rn=1;function wo(e,t=!1){rn+=e,e<0&&Ee&&t&&(Ee.hasOnce=!0)}function Kr(e){return e.dynamicChildren=rn>0?Ee||Ct:null,Wr(),rn>0&&Ee&&Ee.push(e),e}function E(e,t,s,n,o,i){return Kr(c(e,t,s,n,o,i,!0))}function ql(e,t,s,n,o){return Kr(at(e,t,s,n,o,!0))}function Fs(e){return e?e.__v_isVNode===!0:!1}function Ut(e,t){return e.type===t.type&&e.key===t.key}const qr=({key:e})=>e??null,An=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?le(e)||ve(e)||V(e)?{i:Pe,r:e,k:t,f:!!s}:e:null);function c(e,t=null,s=null,n=0,o=null,i=e===W?0:1,r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&qr(t),ref:t&&An(t),scopeId:yr,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Pe};return l?(Dn(a,s),i&128&&e.normalize(a)):s&&(a.shapeFlag|=le(s)?8:16),rn>0&&!r&&Ee&&(a.patchFlag>0||i&6)&&a.patchFlag!==32&&Ee.push(a),a}const at=zl;function zl(e,t=null,s=null,n=0,o=null,i=!1){if((!e||e===_l)&&(e=We),Fs(e)){const l=Lt(e,t,!0);return s&&Dn(l,s),rn>0&&!i&&Ee&&(l.shapeFlag&6?Ee[Ee.indexOf(e)]=l:Ee.push(l)),l.patchFlag=-2,l}if(sc(e)&&(e=e.__vccOpts),t){t=Gl(t);let{class:l,style:a}=t;l&&!le(l)&&(t.class=en(l)),$(a)&&(js(a)&&!R(a)&&(a=he({},a)),t.style=Cs(a))}const r=le(e)?1:Ur(e)?128:qn(e)?64:$(e)?4:V(e)?2:0;return c(e,t,s,n,o,r,i,!0)}function Gl(e){return e?js(e)?he({},e):Ir(e)?he({},e[Yr]||e):e:null}function Lt(e,t,s=!1,n=!1){const{props:o,ref:i,patchFlag:r,children:l,transition:a}=e,p=t?Jl(o||{},t):o,m={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&qr(p),ref:t&&t.ref?s&&i?R(i)?i.concat(An(t)):[i,An(t)]:An(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==W?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Lt(e.ssContent),ssFallback:e.ssFallback&&Lt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return a&&n&&Yt(m,a.clone(m)),m}function ue(e=" ",t=0){return at(Gn,null,e,t)}function ee(e="",t=!1){return t?(w(),ql(We,null,e)):at(We,null,e)}function Ze(e){return e==null||typeof e=="boolean"?at(We):R(e)?at(W,null,e.slice()):Fs(e)?it(e):at(Gn,null,String(e))}function it(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Lt(e)}function Dn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(R(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),Dn(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!Ir(t)?t._ctx=Pe:o===3&&Pe&&(Pe.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(V(t)){if(n&65){Dn(e,{default:t});return}t={default:t,_ctx:Pe},s=32}else t=String(t),n&64?(s=16,t=[ue(t)]):s=8;e.children=t,e.shapeFlag|=s}function Jl(...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=en([t.class,n.class]));else if(o==="style")t.style=Cs([t.style,n.style]);else if(Hn(o)){const i=t[o],r=n[o];r&&i!==r&&!(R(i)&&i.includes(r))?t[o]=i?[].concat(i,r):r:r==null&&i==null&&!Vn(o)&&(t[o]=r)}else o!==""&&(t[o]=n[o])}return t}function Ge(e,t,s,n=null){Ue(e,t,7,[s,n])}const Yl=Er();let zr=0;function Zl(){return zr}function Xl(e,t,s){const n=e.type,o=(t?t.appContext:e.appContext)||Yl,i={uid:zr++,vnode:e,type:n,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new xi(!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:Rr(n,o),emitsOptions:Ar(n,o),emit:null,emitted:null,propsDefaults:te,inheritAttrs:n.inheritAttrs,ctx:te,data:te,props:te,attrs:te,slots:te,refs:te,setupState:te,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Ol.bind(null,i),e.ce&&e.ce(i),i}let Ce=null;const Ql=()=>Ce||Pe;let Rn,ln;{const e=Un(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),i=>{o.length>1?o.forEach(r=>r(i)):o[0](i)}};Rn=t("__VUE_INSTANCE_SETTERS__",s=>Ce=s),ln=t("__VUE_SSR_SETTERS__",s=>cn=s)}const un=e=>{const t=Ce;return Rn(e),e.scope.on(),()=>{e.scope.off(),Rn(t)}},Oo=()=>{Ce&&Ce.scope.off(),Rn(null)};function Gr(e){return e.vnode.shapeFlag&4}let cn=!1;function $l(e,t=!1,s=!1){t&&ln(t);const{props:n,children:o}=e.vnode,i=Gr(e);jl(e,n,i,t),Ll(e,o,s||t);const r=i?ec(e,t):void 0;return t&&ln(!1),r}function ec(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,yl);const{setup:n}=s;if(n){et();const o=e.setupContext=n.length>1?nc(e):null,i=un(e),r=dn(n,e,0,[e.props,o]),l=Uo(r);if(tt(),i(),(l||e.sp)&&!Xt(e)&&Sr(e),l){if(r.then(Oo,Oo),t)return r.then(a=>{ln(!0);try{Eo(e,a,t)}finally{ln(!1)}}).catch(a=>{Kn(a,e,0,void 0,!0),e.ssrRender=(p,m)=>m("<!---->")});e.asyncDep=r}else Eo(e,r)}else Jr(e)}function Eo(e,t,s){V(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:$(t)&&(e.setupState=dr(t)),Jr(e)}function Jr(e,t,s){const n=e.type;e.render||(e.render=n.render||Qe);{const o=un(e);et();try{bl(e)}finally{tt(),o()}}}const Yr=Symbol(),tc={get(e,t){return be(e,"get",""),t===Yr?e:e[t]}};function nc(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,tc),slots:e.slots,emit:e.emit,expose:t}}function Jn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(dr(Vi(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 sc(e){return V(e)&&"__vccOpts"in e}const Z=(e,t)=>zi(e,t,cn),oc="3.5.45";/**
14
+ * @vue/runtime-dom v3.5.45
15
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
16
+ * @license MIT
17
+ **/let bs;const Ao=typeof window<"u"&&window.trustedTypes;if(Ao)try{bs=Ao.createPolicy("vue",{createHTML:e=>e})}catch{}const Zr=bs?e=>bs.createHTML(e):e=>e,rc="http://www.w3.org/2000/svg",ic="http://www.w3.org/1998/Math/MathML",rt=typeof document<"u"?document:null,No=rt&&rt.createElement("template"),lc={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"?rt.createElementNS(rc,e):t==="mathml"?rt.createElementNS(ic,e):s?rt.createElement(e,{is:s}):rt.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>rt.createTextNode(e),createComment:e=>rt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>rt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,i){const r=s?s.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===i||!(o=o.nextSibling)););else{No.innerHTML=Zr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const l=No.content;if(n==="svg"||n==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,s)}return[r?r.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},cc=Symbol("_vtc");function ac(e,t,s){const n=e[cc];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Ln=Symbol("_vod"),Xr=Symbol("_vsh"),Tn={name:"show",beforeMount(e,{value:t},{transition:s}){e[Ln]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Wt(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:n}){!t!=!s&&(n?t?(n.beforeEnter(e),Wt(e,!0),n.enter(e)):n.leave(e,()=>{Wt(e,!1)}):Wt(e,t))},beforeUnmount(e,{value:t}){Wt(e,t)}};function Wt(e,t){e.style.display=t?e[Ln]:"none",e[Xr]=!t}const fc=Symbol(""),dc=/(?:^|;)\s*display\s*:/;function uc(e,t,s){const n=e.style,o=le(s);let i=!1;if(s&&!o){if(t)if(le(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();s[l]==null&&qt(n,l,"")}else for(const r in t)s[r]==null&&qt(n,r,"");for(const r in s){r==="display"&&(i=!0);const l=s[r];l!=null?mc(e,r,!le(t)&&t?t[r]:void 0,l)||qt(n,r,l):qt(n,r,"")}}else if(o){if(t!==s){const r=n[fc];r&&(s+=";"+r),n.cssText=s,i=dc.test(s)}}else t&&e.removeAttribute("style");Ln in e&&((!o||t!==s)&&(e[Ln]=i?n.display:""),e[Xr]&&(n.display="none"))}const wn=/\s*!important$/;function qt(e,t,s){if(R(s))s.forEach(n=>qt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))wn.test(s)?e.setProperty(t,s.replace(wn,""),"important"):e.setProperty(t,s);else{const n=hc(e,t);wn.test(s)?e.setProperty(Ot(n),s.replace(wn,""),"important"):e[n]=s}}const Mo=["Webkit","Moz","ms"],ls={};function hc(e,t){const s=ls[t];if(s)return s;let n=Ve(t);if(n!=="filter"&&n in e)return ls[t]=n;n=qo(n);for(let o=0;o<Mo.length;o++){const i=Mo[o]+n;if(i in e)return ls[t]=i}return t}function mc(e,t,s,n){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&le(n)&&s===n}const Po="http://www.w3.org/1999/xlink";function jo(e,t,s,n,o,i=yi(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Po,t.slice(6,t.length)):e.setAttributeNS(Po,t,s):s==null||i&&!Go(s)?e.removeAttribute(t):e.setAttribute(t,i?"":$e(s)?String(s):s)}function Io(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Zr(s):s);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const l=i==="OPTION"?e.getAttribute("value")||"":e.value,a=s==null?e.type==="checkbox"?"on":"":String(s);(l!==a||!("_value"in e))&&(e.value=a),s==null&&e.removeAttribute(t),e._value=s;return}let r=!1;if(s===""||s==null){const l=typeof e[t];l==="boolean"?s=Go(s):s==null&&l==="string"?(s="",r=!0):l==="number"&&(s=0,r=!0)}try{e[t]=s}catch{}r&&e.removeAttribute(o||t)}function Hs(e,t,s,n){e.addEventListener(t,s,n)}function pc(e,t,s,n){e.removeEventListener(t,s,n)}const Do=Symbol("_vei");function gc(e,t,s,n,o=null){const i=e[Do]||(e[Do]={}),r=i[t];if(n&&r)r.value=n;else{const[l,a]=bc(t);if(n){const p=i[t]=Sc(n,o);Hs(e,l,p,a)}else r&&(pc(e,l,r,a),i[t]=void 0)}}const _c=/(Once|Passive|Capture)$/,yc=/^on:?(?:Once|Passive|Capture)$/;function bc(e){let t,s;for(;(s=e.match(_c))&&!yc.test(e);)t||(t={}),e=e.slice(0,e.length-s[1].length),t[s[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Ot(e.slice(2)),t]}let cs=0;const vc=Promise.resolve(),xc=()=>cs||(vc.then(()=>cs=0),cs=Date.now());function Sc(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const o=s.value;if(R(o)){const i=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{i.call(n),n._stopped=!0};const r=o.slice(),l=[n];for(let a=0;a<r.length&&!n._stopped;a++){const p=r[a];p&&Ue(p,t,5,l)}}else Ue(o,t,5,[n])};return s.value=e,s.attached=xc(),s}const Ro=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,kc=(e,t,s,n,o,i)=>{const r=o==="svg";t==="class"?ac(e,n,r):t==="style"?uc(e,s,n):Hn(t)?Vn(t)||gc(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Cc(e,t,n,r))?(Io(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&jo(e,t,n,r,i,t!=="value")):e._isVueCE&&(Tc(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!le(n)))?Io(e,Ve(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),jo(e,t,n,r))};function Cc(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ro(t)&&V(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)&&le(s)?!1:t in e}function Tc(e,t){const s=e._def.props;if(!s)return!1;const n=Ve(t);return Array.isArray(s)?s.some(o=>Ve(o)===n):Object.keys(s).some(o=>Ve(o)===n)}const Fn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return R(t)?s=>On(t,s):t},Rt=Symbol("_assign"),wc={deep:!0,created(e,t,s){e[Rt]=Fn(s),Hs(e,"change",()=>{const n=e._modelValue,o=an(e),i=e.checked,r=e[Rt];if(R(n)){const l=Ts(n,o),a=l!==-1;if(i&&!a)r(n.concat(o));else if(!i&&a){const p=[...n];p.splice(l,1),r(p)}}else if(ft(n)){const l=new Set(n);i?l.add(o):l.delete(o),r(l)}else r(Qr(e,i))})},mounted:Lo,beforeUpdate(e,t,s){e[Rt]=Fn(s),Lo(e,t,s)}};function Lo(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(R(t))o=Ts(t,n.props.value)>-1;else if(ft(t))o=t.has(n.props.value);else{if(t===s)return;o=dt(t,Qr(e,!0))}e.checked!==o&&(e.checked=o)}const Pt={deep:!0,created(e,{value:t,modifiers:{number:s}},n){e._modelValue=t,Hs(e,"change",()=>{const o=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>s?ks(an(a)):an(a)),i=e.multiple,r=i?ft(e._modelValue)?new Set(o):o:o[0],l=e._pendingValue=[i,i?R(r)?o.slice():o:r];try{e[Rt](r)}finally{hr(()=>{e._pendingValue===l&&(e._pendingValue=void 0)})}}),e[Rt]=Fn(n)},mounted(e,{value:t,modifiers:{number:s}}){Fo(e,t,s)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[Rt]=Fn(s)},updated(e,{value:t,modifiers:{number:s}}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Oc(t,n[1],n[0]))&&Fo(e,t,s)}};function Oc(e,t,s){if(!s||R(e))return dt(e,t);if(ft(e)){if(e.size!==t.length)return!1;for(const n of t)if(!e.has(n))return!1;return!0}return!1}function Fo(e,t,s=!1){const n=e.multiple,o=R(t);if(!(n&&!o&&!ft(t))){for(let i=0,r=e.options.length;i<r;i++){const l=e.options[i],a=an(l);if(n)if(o){const p=typeof a;p==="string"||p==="number"?l.selected=t.some(m=>String(m)===String(a)):l.selected=Ts(t,a)>-1}else l.selected=t.has(a)||s&&typeof a=="string"&&t.has(ks(a));else if(dt(an(l),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function an(e){return"_value"in e?e._value:e.value}function Qr(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Ec=he({patchProp:kc},lc);let Ho;function Ac(){return Ho||(Ho=Hl(Ec))}const Nc=((...e)=>{const t=Ac().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=Pc(n);if(!o)return;const i=t._component;!V(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const r=s(o,!1,Mc(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),r},t});function Mc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Pc(e){return le(e)?document.querySelector(e):e}function $r(e){const t=typeof e=="string"?e.trim():"";return t&&t.length<=128&&!/[\\/\u0000-\u001f\u007f]/.test(t)?t:""}function jc(e){const t=new Map,s=new Map;for(const n of e){const o=n.project;t.has(o)||t.set(o,{key:o,project:n.project,items:[]}),t.get(o).items.push(n);const i=$r(n==null?void 0:n.projectDirectoryName);if(i){const r=typeof(n==null?void 0:n.createdAt)=="string"?n.createdAt:"";(!s.has(o)||r>=s.get(o).createdAt)&&s.set(o,{name:i,createdAt:r})}}return[...t.values()].map(n=>{var o;return{...n,directoryName:((o=s.get(n.key))==null?void 0:o.name)??""}})}function Ic(e=[],t=!1,s=new Map){const n=new Map,o=new Map;for(const i of e){if(!t&&i.status==="archived")continue;n.has(i.project)||n.set(i.project,{key:i.project,project:i.project,total:0,pending:[],completed:[],archived:[]});const r=n.get(i.project),l=$r(i.projectDirectoryName);if(l){const a=typeof i.createdAt=="string"?i.createdAt:"";(!o.has(i.project)||a>=o.get(i.project).createdAt)&&o.set(i.project,{name:l,createdAt:a})}r[i.status].push(i),r.total++}return[...n.values()].map(i=>{var r;return{...i,directoryName:((r=o.get(i.key))==null?void 0:r.name)??s.get(i.key)??""}})}function Dc(e,t="es"){return typeof(e==null?void 0:e.directoryName)=="string"&&e.directoryName.trim()?e.directoryName:t==="es"?"Directorio no disponible":"Directory unavailable"}function Rc(e,t="es"){return typeof(e==null?void 0:e.sessionTitle)=="string"&&e.sessionTitle.trim()?e.sessionTitle:t==="es"?"Título no disponible":"Title unavailable"}function ei(e){const t=/^(request:)?(tool|cli):([^:]+)$/.exec(e);return t?{group:t[2]==="tool"?"tools":"commands",kind:t[2],name:t[3],signal:t[1]?"request":"activity"}:null}function Lc(e={}){const t=Object.fromEntries(["tools","commands"].map(s=>[s,{key:s,total:0,items:[]}]));for(const[s,n]of Object.entries(e)){const o=ei(s);if(!o||!Number.isSafeInteger(n)||n<1)continue;const i=t[o.group];i.total+=n,i.items.push({key:s,name:o.name,kind:o.kind,signal:o.signal,count:n})}for(const s of Object.values(t))s.items.sort((n,o)=>o.count-n.count||n.key.localeCompare(o.key));return Object.values(t)}function Fc(e={},t=new Date().toISOString().slice(0,10)){const s=new Date(`${t}T00:00:00.000Z`);s.setUTCDate(s.getUTCDate()-364);const n=s.toISOString().slice(0,10);return Object.entries(e).filter(([o])=>/^\d{4}-\d{2}-\d{2}$/.test(o)&&o>=n&&o<=t&&new Date(`${o}T00:00:00.000Z`).toISOString().slice(0,10)===o).sort(([o],[i])=>o.localeCompare(i)).map(([o,i])=>{const r={date:o,tools:0,commands:0};for(const[l,a]of Object.entries(i??{})){const p=ei(l);p&&Number.isSafeInteger(a)&&a>0&&(r[p.group]+=a)}return r}).filter(({tools:o,commands:i})=>o+i>0)}function ti(e){return typeof e=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&new Date(`${e}T00:00:00.000Z`).toISOString().slice(0,10)===e}function Hc(e,t=new Date().toISOString().slice(0,10)){const n=[7,30,90].includes(Number(e))?Number(e):30,o=ti(t)?t:new Date().toISOString().slice(0,10),i=new Date(`${o}T00:00:00.000Z`);return i.setUTCDate(i.getUTCDate()-(n-1)),{from:i.toISOString().slice(0,10),to:o}}function Vc(e=[],t={}){if(!Array.isArray(e)||!e.length)return[];const s=e.filter(L=>L&&ti(L.day));if(!s.length)return[];const n=t.width??720,o=t.height??180,i=t.left??28,r=t.right??16,l=t.top??12,a=t.bottom??28,p=n-i-r,m=o-l-a,_=Math.max(1,...s.map(L=>{const D=L.tokens??{};return Number(D.input||0)+Number(D.cacheRead||0)+Number(D.output||0)})),O=p/s.length,N=Math.max(1,Math.min(28,O*.62));return s.flatMap((L,D)=>{var U,P,ne;const z=s.length===1?i+(p-N)/2:i+D*O+(O-N)/2,M=[["input",Number(((U=L.tokens)==null?void 0:U.input)||0)],["cache",Number(((P=L.tokens)==null?void 0:P.cacheRead)||0)],["output",Number(((ne=L.tokens)==null?void 0:ne.output)||0)]];let B=l+m;return M.map(([ae,ce])=>{const Te=Math.max(0,ce)/_*m,st=Math.max(l,B-Te),De={day:L.day,key:ae,value:ce,x:z,y:st,width:N,height:B-st};return B-=Te,De}).filter(({value:ae,height:ce})=>ae>0&&ce>0)})}function Bc(e){const t=(e==null?void 0:e.tokens)??{};return["input","output","reasoning","cacheRead","cacheWrite"].reduce((s,n)=>s+(Number(t[n])||0),0)}function Uc(e=[],t="steps",s="desc"){if(!Array.isArray(e))return[];const n=t==="name"||t==="tokens"?t:"steps",o=s==="asc"?1:-1,i=a=>String((a==null?void 0:a.name)??(a==null?void 0:a.key)??""),r=a=>String((a==null?void 0:a.provider)??""),l=a=>n==="tokens"?Bc(a):n==="steps"&&Number(a==null?void 0:a.steps)||0;return e.map((a,p)=>({row:a,index:p})).sort((a,p)=>{const m=i(a.row).localeCompare(i(p.row)),_=n==="name"?m*o:(l(a.row)-l(p.row))*o;return _||(n==="name"?r(a.row).localeCompare(r(p.row))||a.index-p.index:m||r(a.row).localeCompare(r(p.row))||a.index-p.index)}).map(({row:a})=>a)}function Wc(e){if(!e.length)return[];const t=720,s=180,n=28,o=16,i=12,r=28,l=e.map(({date:z})=>Date.parse(`${z}T00:00:00.000Z`)),a=l.at(-1)!==l[0],p=a?Math.round((l.at(-1)-l[0])/864e5):1,m=Math.max(1,...e.flatMap(({tools:z,commands:M})=>[z,M])),_=t-n-o,O=s-i-r,N=_/(p+1),L=Math.max(.5,N*.18),D=L*2;return e.flatMap((z,M)=>{const B=a?(l[M]-l[0])/864e5/p:.5,U=n+D/2+B*(_-D);return["tools","commands"].map((P,ne)=>{const ae=z[P]/m*O;return{date:z.date,key:P,count:z[P],x:U+(ne-1)*L,y:i+O-ae,width:L,height:ae}}).filter(({count:P})=>P>0)})}const Vo=Object.freeze(["reports","checkpoints","todos","metrics"]);function ni(e){const t=e.startsWith("#")?e.slice(1):e;return Vo.includes(t)?t:Vo[0]}function Kc(e,t){const s=()=>t(ni(e.location.hash));return e.addEventListener("hashchange",s),s(),()=>e.removeEventListener("hashchange",s)}const qc=(e,t)=>{const s=e.__vccOpts||e;for(const[n,o]of t)s[n]=o;return s},zc={setup(){var Us;const e=ge(null),t=ge(""),s=ge("es"),n=ge("dark"),o=ge(ni(window.location.hash)),i=ge(!1),r=ge(!1),l=ge(null),a=ge(""),p=ge(!1),m=ge(30),_=ge(""),O=ge(""),N=ge(""),L=ge(""),D=ge({projects:[],agents:[],providers:[],models:[]}),z=(Us=document.querySelector('meta[name="habit-token"]'))==null?void 0:Us.content,M=(h,k)=>s.value==="es"?h:k,B=Z(()=>new Intl.NumberFormat(s.value,{maximumFractionDigits:0})),U=Z(()=>new Intl.NumberFormat(s.value,{maximumFractionDigits:1})),P=Z(()=>new Intl.NumberFormat(s.value,{notation:"compact",maximumFractionDigits:1})),ne=Z(()=>new Intl.NumberFormat(s.value,{style:"percent",maximumFractionDigits:1})),ae=h=>B.value.format(Number(h)||0),ce=h=>P.value.format(Number(h)||0),Te=h=>ne.value.format(Number(h)||0),st=h=>{const k=(h==null?void 0:h.tokens)??{};return[`${M("entrada","input")} ${ce(k.input)}`,`${M("caché","cache")} ${ce(k.cacheRead)}`,`${M("salida","output")} ${ce(k.output)}`,`${M("raz.","reason.")} ${ce(k.reasoning)}`].join(" · ")},De=h=>({input:M("Entrada sin caché","Uncached input"),cache:M("Caché leída","Cache read"),output:M("Salida","Output")})[h]??h,ht=h=>({primary:M("Principal","Primary"),subagent:M("Subagente","Subagent"),title:M("Título","Title"),compaction:M("Compactación","Compaction"),generate:M("Generación","Generate"),other:M("Otro","Other")})[h]??h,Et=h=>h.directory||h.key,At=Z(()=>{var h;return!!l.value&&((h=l.value.totals)==null?void 0:h.steps)===0}),Ft=Z(()=>!!(_.value||O.value||N.value||L.value)),hn=Z(()=>{var h;return Vc(((h=l.value)==null?void 0:h.series)??[])}),me=Z(()=>{var h,k,H;return((H=(k=(h=l.value)==null?void 0:h.series)==null?void 0:k[0])==null?void 0:H.day)??""}),oe=Z(()=>{var h,k,H;return((H=(k=(h=l.value)==null?void 0:h.series)==null?void 0:k.at(-1))==null?void 0:H.day)??""}),Q=Z(()=>{var k,H;const h=(H=(k=l.value)==null?void 0:k.totals)==null?void 0:H.tokens;return h?h.input+h.cacheRead+h.cacheWrite:0}),Ae=ge(Object.fromEntries(["agent","model","project","kind"].map(h=>[h,{key:"steps",direction:"desc"}]))),Ne=(h,k,H=ie=>(ie==null?void 0:ie.key)??"")=>Uc(k.map(ie=>({...ie,name:H(ie)})),Ae.value[h].key,Ae.value[h].direction),we=Z(()=>{var h;return Ne("agent",((h=l.value)==null?void 0:h.byAgent)??[])}),mn=Z(()=>{var h;return Ne("model",((h=l.value)==null?void 0:h.byModel)??[],k=>`${k.key??""} ${k.provider??""}`)}),pn=Z(()=>{var h;return Ne("project",((h=l.value)==null?void 0:h.byProject)??[],k=>k.directory||k.key||"")}),Yn=Z(()=>{var h;return Ne("kind",((h=l.value)==null?void 0:h.byKind)??[],k=>ht(k.key))});function vt(h,k){const H=Ae.value[h];H.direction=H.key===k?H.direction==="asc"?"desc":"asc":k==="name"?"asc":"desc",H.key=k}const Nt=(h,k)=>Ae.value[h].key!==k?"none":Ae.value[h].direction==="asc"?"ascending":"descending",gn=(h,k)=>Ae.value[h].key!==k?"":Ae.value[h].direction==="asc"?"↑":"↓",Re=Z(()=>{var h;return((h=l.value)==null?void 0:h.plugin)??null}),_n=Z(()=>{var h;return Object.entries(((h=Re.value)==null?void 0:h.hooks)??{}).map(([k,H])=>{var ie,Ke;return{name:k,invocations:Number(H==null?void 0:H.invocations)||0,errors:Number(H==null?void 0:H.errors)||0,p50:((ie=H==null?void 0:H.latency)==null?void 0:ie.p50)??null,p95:((Ke=H==null?void 0:H.latency)==null?void 0:Ke.p95)??null}})}),d=Z(()=>["hooks","store","server","collector"].map(h=>{var k,H;return{key:h,count:Number((H=(k=Re.value)==null?void 0:k.errors)==null?void 0:H[h])||0}})),u=Z(()=>_n.value.reduce((h,k)=>h+k.invocations,0)),g=Z(()=>_n.value.reduce((h,k)=>h+k.errors,0)),x=Z(()=>d.value.reduce((h,k)=>h+k.count,0)),y=Z(()=>{var h;return((h=Re.value)==null?void 0:h.current)??null}),v=Z(()=>{var Ws,Ks,qs,zs,Gs,Js,Ys,Zs,Xs,Qs,$s,eo,to,no,so,oo,ro,io;const h=Re.value;if(!h)return!0;const k=Object.values(h.hooks??{}).some(ze=>(Number(ze==null?void 0:ze.invocations)||0)>0||(Number(ze==null?void 0:ze.errors)||0)>0),H=(Number((Ws=h.store)==null?void 0:Ws.reads)||0)+(Number((Ks=h.store)==null?void 0:Ks.writes)||0)+(Number((qs=h.store)==null?void 0:qs.errors)||0),ie=(Number((zs=h.sse)==null?void 0:zs.clients)||0)+(Number((Gs=h.sse)==null?void 0:Gs.peakClients)||0)+(Number((Js=h.sse)==null?void 0:Js.refreshes)||0),Ke=["2xx","4xx","5xx"].some(ze=>{var lo;return(Number((lo=h.requests)==null?void 0:lo[ze])||0)>0}),xn=(Number((Ys=h.context)==null?void 0:Ys.injections)||0)+(Number((Zs=h.context)==null?void 0:Zs.injectedChars)||0)+(Number((Qs=(Xs=h.context)==null?void 0:Xs.notices)==null?void 0:Qs.checkpoint)||0)+(Number((eo=($s=h.context)==null?void 0:$s.notices)==null?void 0:eo.todo)||0),q=h.current&&Object.values(h.current).some(ze=>(Number(ze)||0)>0),qe=(Number((to=h.errors)==null?void 0:to.hooks)||0)+(Number((no=h.errors)==null?void 0:no.store)||0)+(Number((so=h.errors)==null?void 0:so.server)||0)+(Number((oo=h.errors)==null?void 0:oo.collector)||0),ci=(Number((ro=h.flush)==null?void 0:ro.failures)||0)+(Number((io=h.flush)==null?void 0:io.pending)||0);return!k&&!H&&!ie&&!Ke&&!xn&&!q&&!qe&&!ci}),T=h=>h==null?"—":`${ae(h)} ms`,C=h=>{if(h==null)return"—";const k=Number(h);return!Number.isFinite(k)||k<0?"—":k<1024?`${ae(k)} B`:k<1024*1024?`${U.value.format(k/1024)} KB`:`${U.value.format(k/(1024*1024))} MB`},S=h=>{if(!h)return"—";const k=new Date(h);return Number.isFinite(k.getTime())?k.toLocaleTimeString(s.value):"—"},b=h=>({"session.prompt":M("Prompt de sesión","Session prompt"),"session.context":M("Contexto de sesión","Session context"),"tool.execute.after":M("Después de herramienta","After tool"),"shell.create.before":M("Antes de shell","Before shell")})[h]??h,j=h=>({hooks:M("Hooks","Hooks"),store:M("Almacenamiento","Storage"),server:M("Servidor","Server"),collector:M("Colector","Collector")})[h]??h,A=Z(()=>{var h;return jc(((h=e.value)==null?void 0:h.checkpoints)??[])}),I=Z(()=>new Map(A.value.map(({project:h,directoryName:k})=>[h,k]))),F=Z(()=>{var h;return Ic(((h=e.value)==null?void 0:h.todos)??[],r.value,I.value)}),K=["pending","completed","archived"],Y=Z(()=>{var h;return Lc(((h=e.value)==null?void 0:h.habits.counts)??{})}),G=Z(()=>{var h;return Fc(((h=e.value)==null?void 0:h.habits.daily)??{})}),re=Z(()=>Wc(G.value)),fe=Z(()=>Y.value.some(h=>h.total>0)||G.value.length>0),Oe=h=>({tool:M("Herramienta","Tool"),cli:M("Comando","Command")})[h]??"",Me=h=>({tools:M("Herramientas","Tools"),commands:M("Comandos","Commands")})[h]??h,Le=h=>h==="request"?M("solicitud explícita","explicit request"):M("uso observado","observed use"),yn=h=>({pending:M("Pendientes","Pending"),completed:M("Completados","Completed"),archived:M("Archivados","Archived")})[h]??h;It(s,h=>{document.documentElement.lang=h}),It(n,h=>{document.documentElement.dataset.theme=h},{immediate:!0}),It([m,_,O,N,L],Ht);async function pe(h,k){const H=await fetch(h,{method:k?"POST":"GET",cache:"no-store",headers:k?{"content-type":"application/json",origin:location.origin,"x-habit-token":z}:{},body:k&&JSON.stringify(k)});if(!H.ok)throw new Error(`${M("El servidor local rechazó la solicitud","The local server rejected the request")} (${H.status}).`);return k?null:H.json()}async function ye(){try{e.value=await pe("/api/data"),t.value=""}catch(h){t.value=h.message}}function bn(h){const k=D.value,H=new Map(k.projects.map(q=>[q.key,q]));for(const q of(h==null?void 0:h.byProject)??[])q!=null&&q.key&&H.set(q.key,{key:q.key,directory:q.directory||""});const ie=new Set(k.agents);for(const q of(h==null?void 0:h.byAgent)??[])q!=null&&q.key&&ie.add(q.key);const Ke=new Set(k.providers),xn=new Set(k.models);for(const q of(h==null?void 0:h.byModel)??[])q!=null&&q.key&&xn.add(q.key),q!=null&&q.provider&&Ke.add(q.provider);D.value={projects:[...H.values()].sort((q,qe)=>(q.directory||q.key).localeCompare(qe.directory||qe.key)),agents:[...ie].sort((q,qe)=>q.localeCompare(qe)),providers:[...Ke].sort((q,qe)=>q.localeCompare(qe)),models:[...xn].sort((q,qe)=>q.localeCompare(qe))}}let pt=0;async function Ht(){const h=++pt;p.value=!0,a.value="";try{const{from:k,to:H}=Hc(m.value),ie=new URLSearchParams({from:k,to:H});_.value&&ie.set("project",_.value),O.value&&ie.set("agent",O.value),N.value&&ie.set("provider",N.value),L.value&&ie.set("model",L.value);const Ke=await pe(`/api/metrics?${ie}`);if(h!==pt)return;l.value=Ke,bn(Ke)}catch(k){h===pt&&(a.value=k.message)}finally{h===pt&&(p.value=!1)}}function si(){_.value="",O.value="",N.value="",L.value=""}async function vn(h,k,H){if(!(i.value||H&&!confirm(H))){i.value=!0,t.value="";try{await pe(h,k),await ye()}catch(ie){t.value=ie.message}finally{i.value=!1}}}async function oi(h){if(i.value)return;const k=prompt(M("Resumen del punto guardado","Checkpoint summary"),h.summary);if(k!==null){if(!k.trim()||k.length>240){t.value=M("Escribe entre 1 y 240 caracteres.","Enter 1–240 characters.");return}await vn("/api/checkpoint/edit",{project:h.project,context:h.context,id:h.id,summary:k})}}function ri(h){return vn("/api/checkpoint/delete",{project:h.project,context:h.context,id:h.id},M("¿Eliminar este punto guardado?","Delete this checkpoint?"))}function ii(h){const k=M(`¿Eliminar todos los puntos de este contexto (${h.items.length})?
18
+ Proyecto: ${JSON.stringify(h.project)}
19
+ Contexto: ${JSON.stringify(h.context)}`,`Delete all checkpoints in this context (${h.items.length})?
20
+ Project: ${JSON.stringify(h.project)}
21
+ Context: ${JSON.stringify(h.context)}`);return vn("/api/scope/delete",{project:h.project,context:h.context},k)}function li(){return vn("/api/habits/clear",{confirm:!0},M("¿Borrar los conteos acumulados y tendencias de hábitos? Esta acción no se puede deshacer. Los checkpoints no se borrarán.","Clear all accumulated habit counts and trends? This cannot be undone. Checkpoints will not be deleted."))}let Vs=()=>{},Vt,Zn;const Bs=()=>{document.hidden||(ye(),Ht())};return Cr(()=>{Vs=Kc(window,h=>{o.value=h,window.scrollTo(0,0)}),ye(),Ht(),typeof EventSource=="function"&&(Vt=new EventSource("/api/events"),Vt.onmessage=()=>{clearTimeout(Zn),Zn=setTimeout(()=>{ye(),Ht()},150)}),document.addEventListener("visibilitychange",Bs)}),Tr(()=>{Vs(),Vt==null||Vt.close(),clearTimeout(Zn),pt++,document.removeEventListener("visibilitychange",Bs)}),{data:e,error:t,language:s,theme:n,activeView:o,busy:i,includeArchived:r,t:M,scopes:A,todoGroups:F,todoStatuses:K,todoStatusLabel:yn,reports:Y,trend:G,bars:re,hasHabitData:fe,reportTitle:Me,signalLabel:Le,kindLabel:Oe,checkpointTitle:Rc,projectDirectoryLabel:Dc,load:ye,edit:oi,removeCheckpoint:ri,removeScope:ii,clearHabits:li,metrics:l,metricsError:a,metricsLoading:p,rangeDays:m,metricProject:_,metricAgent:O,metricProvider:N,metricModel:L,metricOptions:D,metricsEmpty:At,hasMetricFilters:Ft,tokenChart:hn,firstMetricDay:me,lastMetricDay:oe,cacheDenominator:Q,formatNumber:ae,formatCompact:ce,formatPercent:Te,tokenBreakdown:st,agentRows:we,modelRows:mn,projectRows:pn,kindRows:Yn,toggleSort:vt,ariaSort:Nt,sortIndicator:gn,seriesLabel:De,metricKindLabel:ht,projectOptionLabel:Et,clearMetricFilters:si,loadMetrics:Ht,plugin:Re,pluginHooks:_n,pluginErrors:d,pluginHookCalls:u,pluginHookErrors:g,pluginErrorTotal:x,pluginCurrent:y,pluginEmpty:v,formatMillis:T,formatBytes:C,formatTime:S,pluginHookLabel:b,pluginErrorLabel:j}}},Gc={class:"app-shell",id:"inicio"},Jc={class:"sidebar"},Yc=["aria-label"],Zc=["aria-current"],Xc=["aria-current"],Qc=["aria-current"],$c=["aria-current"],ea={class:"local-note"},ta={class:"workspace"},na={class:"masthead"},sa={class:"eyebrow"},oa={class:"intro"},ra={class:"masthead-controls"},ia={class:"language"},la=["aria-pressed","aria-label"],ca={class:"page-note"},aa={key:0,class:"notice",role:"alert"},fa=["disabled"],da={key:1,role:"status"},ua={key:2,role:"status"},ha={id:"reports","aria-labelledby":"reports-heading"},ma={class:"report-heading"},pa={id:"reports-heading"},ga={class:"section-note"},_a=["disabled"],ya={class:"report-grid"},ba={class:"report-card-head"},va={class:"report-total"},xa={key:0,class:"report-ranking"},Sa={class:"report-label"},ka={key:1,class:"empty-report"},Ca={class:"trend-panel"},Ta={key:0,class:"empty-report"},wa={class:"section-note"},Oa=["aria-label"],Ea={class:"tools-series"},Aa={class:"commands-series"},Na={class:"trend-chart",viewBox:"0 0 720 180",role:"img","aria-labelledby":"trend-title trend-desc"},Ma={id:"trend-title"},Pa={id:"trend-desc"},ja=["x","y","width","height"],Ia=["x","text-anchor"],Da={key:0,x:"704",y:"173","text-anchor":"end"},Ra={id:"checkpoints","aria-labelledby":"checkpoints-heading"},La={id:"checkpoints-heading"},Fa=["aria-label"],Ha={class:"stat-card"},Va={key:0},Ba={key:1,class:"scope-list"},Ua={class:"project-summary"},Wa={class:"scope-provenance"},Ka={class:"scope-caption"},qa={class:"scope-directory"},za={class:"scope-caption"},Ga={class:"project-checkpoints"},Ja={class:"entry-content"},Ya={class:"entry-title"},Za={class:"entry-summary"},Xa={class:"entry-context"},Qa=["datetime"],$a={class:"entry-actions"},ef=["disabled","aria-label","onClick"],tf=["disabled","aria-label","onClick"],nf={id:"todos","aria-labelledby":"todos-heading"},sf={class:"report-heading todo-heading"},of={id:"todos-heading"},rf={class:"section-note"},lf={class:"include-archived"},cf={key:0,class:"empty-report"},af={key:1,class:"scope-list"},ff={class:"project-summary"},df={class:"scope-provenance"},uf={class:"scope-caption"},hf={class:"scope-directory"},mf={class:"scope-caption"},pf={class:"todo-status-list"},gf={key:0,class:"todo-status"},_f={class:"todo-status-heading"},yf={class:"todo-items"},bf=["aria-busy"],vf={class:"report-heading"},xf={id:"metrics-heading"},Sf={class:"section-note"},kf={class:"metrics-filters"},Cf={class:"metrics-filter"},Tf={value:7},wf={value:30},Of={value:90},Ef={class:"metrics-filter"},Af={value:""},Nf=["value"],Mf={class:"metrics-filter"},Pf={value:""},jf=["value"],If={class:"metrics-filter"},Df={value:""},Rf=["value"],Lf={class:"metrics-filter"},Ff={value:""},Hf=["value"],Vf=["disabled"],Bf={key:0,class:"notice",role:"alert"},Uf={key:1,role:"status"},Wf={key:2,class:"empty-report metrics-empty"},Kf={class:"metrics-cards"},qf={class:"metric-card"},zf={class:"metric-card"},Gf={class:"metric-card"},Jf={class:"metric-card"},Yf={class:"metric-card"},Zf={class:"savings-panel"},Xf={class:"section-note"},Qf={class:"savings-rate"},$f={class:"savings-detail"},ed={class:"metrics-charts"},td={class:"trend-panel"},nd=["aria-label"],sd={class:"input-series"},od={class:"cache-series"},rd={class:"output-series"},id={key:0,class:"empty-report"},ld={class:"section-note"},cd={class:"trend-chart metrics-chart",viewBox:"0 0 720 180",role:"img","aria-labelledby":"metrics-tokens-title metrics-tokens-desc"},ad={id:"metrics-tokens-title"},fd={id:"metrics-tokens-desc"},dd=["x","y","width","height"],ud=["x","text-anchor"],hd={key:0,x:"704",y:"173","text-anchor":"end"},md={class:"section-note metrics-tables-note"},pd={class:"metrics-tables"},gd={class:"metrics-table-panel"},_d={class:"metrics-table"},yd=["aria-sort"],bd={key:0,class:"sort-indicator","aria-hidden":"true"},vd=["aria-sort"],xd={key:0,class:"sort-indicator","aria-hidden":"true"},Sd=["aria-sort"],kd={key:0,class:"sort-indicator","aria-hidden":"true"},Cd={scope:"row"},Td={class:"numeric"},wd={key:0,class:"empty-report"},Od={class:"metrics-table-panel"},Ed={class:"metrics-table"},Ad=["aria-sort"],Nd={key:0,class:"sort-indicator","aria-hidden":"true"},Md=["aria-sort"],Pd={key:0,class:"sort-indicator","aria-hidden":"true"},jd=["aria-sort"],Id={key:0,class:"sort-indicator","aria-hidden":"true"},Dd={scope:"row"},Rd={class:"row-sub"},Ld={class:"numeric"},Fd={key:0,class:"empty-report"},Hd={class:"metrics-table-panel"},Vd={class:"metrics-table"},Bd=["aria-sort"],Ud={key:0,class:"sort-indicator","aria-hidden":"true"},Wd=["aria-sort"],Kd={key:0,class:"sort-indicator","aria-hidden":"true"},qd=["aria-sort"],zd={key:0,class:"sort-indicator","aria-hidden":"true"},Gd={scope:"row"},Jd={class:"project-hash"},Yd={class:"row-sub"},Zd={class:"numeric"},Xd={key:0,class:"empty-report"},Qd={class:"metrics-table-panel"},$d={class:"metrics-table"},eu=["aria-sort"],tu={key:0,class:"sort-indicator","aria-hidden":"true"},nu=["aria-sort"],su={key:0,class:"sort-indicator","aria-hidden":"true"},ou=["aria-sort"],ru={key:0,class:"sort-indicator","aria-hidden":"true"},iu={scope:"row"},lu={class:"numeric"},cu={key:0,class:"empty-report"},au={class:"plugin-health","aria-labelledby":"plugin-health-heading"},fu={class:"plugin-heading"},du={id:"plugin-health-heading"},uu={class:"section-note"},hu={key:0,class:"empty-report"},mu={class:"metrics-cards"},pu={class:"metric-card"},gu={class:"metric-card"},_u={class:"metric-card"},yu={class:"metric-card"},bu={class:"metric-card"},vu={class:"metric-card"},xu={class:"metrics-tables plugin-tables"},Su={class:"metrics-table-panel"},ku={class:"metrics-table"},Cu={scope:"col"},Tu={scope:"col"},wu={scope:"col"},Ou={scope:"row"},Eu={class:"numeric"},Au={class:"numeric"},Nu={class:"numeric"},Mu={class:"numeric"},Pu={class:"metrics-table-panel"},ju={class:"metrics-table"},Iu={scope:"col"},Du={scope:"col"},Ru={scope:"row"},Lu={class:"numeric"},Fu={scope:"row"},Hu={class:"numeric"},Vu={scope:"row"},Bu={class:"numeric"},Uu={scope:"row"},Wu={class:"numeric"},Ku={scope:"row"},qu={class:"numeric"},zu={class:"metrics-table-panel"},Gu={class:"metrics-table"},Ju={scope:"col"},Yu={scope:"col"},Zu={scope:"row"},Xu={class:"numeric"},Qu={scope:"row"},$u={class:"numeric"},eh={scope:"row"},th={class:"numeric"},nh={scope:"row"},sh={class:"numeric"},oh={scope:"row"},rh={class:"numeric"},ih={class:"metrics-table-panel"},lh={class:"metrics-table"},ch={scope:"col"},ah={scope:"col"},fh={scope:"row"},dh={class:"numeric"},uh={scope:"row"},hh={class:"numeric"},mh={scope:"row"},ph={class:"numeric"},gh={scope:"row"},_h={class:"numeric"};function yh(e,t,s,n,o,i){return w(),E("div",Gc,[c("aside",Jc,[t[24]||(t[24]=c("a",{class:"brand",href:"#reports"},"Habit Memory",-1)),c("nav",{class:"sidebar-nav","aria-label":n.t("Navegación principal","Main navigation")},[c("a",{href:"#reports","aria-current":n.activeView==="reports"?"page":void 0},f(n.t("Informes","Reports")),9,Zc),c("a",{href:"#checkpoints","aria-current":n.activeView==="checkpoints"?"page":void 0},f(n.t("Puntos guardados","Saved checkpoints")),9,Xc),c("a",{href:"#todos","aria-current":n.activeView==="todos"?"page":void 0},f(n.t("TODOs","TODOs")),9,Qc),c("a",{href:"#metrics","aria-current":n.activeView==="metrics"?"page":void 0},f(n.t("Métricas","Metrics")),9,$c)],8,Yc),c("p",ea,f(n.t("Tus datos permanecen en este equipo.","Your data stays on this machine.")),1)]),c("div",ta,[c("header",na,[c("div",null,[c("p",sa,f(n.t("MEMORIA DE TRABAJO","WORKING MEMORY")),1),c("h1",null,f(n.t("Tu memoria de trabajo.","Your working memory.")),1),c("p",oa,f(n.t("Hábitos, puntos guardados, TODOs y métricas de uso de este equipo.","Stored habits, checkpoints, TODOs, and usage metrics on this machine.")),1)]),c("div",ra,[c("label",ia,[c("span",null,f(n.t("Idioma","Language")),1),Fe(c("select",{"onUpdate:modelValue":t[0]||(t[0]=r=>n.language=r)},[...t[25]||(t[25]=[c("option",{value:"es"},"ES",-1),c("option",{value:"en"},"EN",-1)])],512),[[Pt,n.language]])]),c("button",{class:"theme-toggle",type:"button","aria-pressed":n.theme==="light","aria-label":n.theme==="dark"?n.t("Cambiar a tema claro","Switch to light theme"):n.t("Cambiar a tema oscuro","Switch to dark theme"),onClick:t[1]||(t[1]=r=>n.theme=n.theme==="dark"?"light":"dark")},f(n.theme==="dark"?n.t("Claro","Light"):n.t("Oscuro","Dark")),9,la)])]),c("main",null,[c("p",ca,f(n.t("Este índice contiene resúmenes, hábitos agregados, TODOs persistentes y métricas locales del complemento.","This index contains summaries, aggregate habits, persistent TODOs, and local metrics saved by the plugin.")),1),n.error?(w(),E("p",aa,[ue(f(n.error)+" ",1),c("button",{type:"button",disabled:n.busy,onClick:t[2]||(t[2]=(...r)=>n.load&&n.load(...r))},f(n.t("Reintentar","Retry")),9,fa)])):ee("",!0),n.busy?(w(),E("p",da,f(n.t("Guardando cambios…","Saving changes…")),1)):ee("",!0),!n.data&&!n.error?(w(),E("p",ua,f(n.t("Leyendo la memoria local…","Reading local memory…")),1)):ee("",!0),n.data?(w(),E(W,{key:3},[Fe(c("section",ha,[c("header",ma,[c("div",null,[c("h2",pa,f(n.t("Informes de actividad","Activity reports")),1),c("p",ga,f(n.t("Conteos acumulados heredados incluidos; las tendencias empiezan con la instrumentación nueva y no reconstruyen el pasado.","Includes legacy accumulated counts; trends start with the new instrumentation and do not reconstruct the past.")),1)]),c("button",{type:"button",class:"action-delete",disabled:n.busy||!n.hasHabitData,onClick:t[3]||(t[3]=(...r)=>n.clearHabits&&n.clearHabits(...r))},f(n.t("Borrar hábitos","Clear habits")),9,_a)]),c("div",ya,[(w(!0),E(W,null,de(n.reports,r=>(w(),E("article",{key:r.key,class:"report-card"},[c("header",ba,[c("h3",null,f(n.reportTitle(r.key)),1),c("strong",va,f(r.total),1)]),r.items.length?(w(),E("ol",xa,[(w(!0),E(W,null,de(r.items,l=>(w(),E("li",{key:l.key},[c("div",Sa,[c("span",null,f(n.signalLabel(l.signal))+" · "+f(n.kindLabel(l.kind))+" · "+f(l.name),1),c("code",null,f(l.key),1)]),c("strong",null,f(l.count),1)]))),128))])):(w(),E("p",ka,f(n.t("Sin conteos.","No counts yet.")),1))]))),128))]),c("div",Ca,[c("h3",null,f(n.t("Tendencia diaria · UTC","Daily trend · UTC")),1),n.trend.length?(w(),E(W,{key:1},[c("p",wa,f(n.t(`Días registrados: ${n.trend[0].date} – ${n.trend.at(-1).date}.`,`Recorded days: ${n.trend[0].date} – ${n.trend.at(-1).date}.`)),1),c("ul",{class:"trend-legend","aria-label":n.t("Leyenda del gráfico","Chart legend")},[c("li",Ea,f(n.t("Herramientas","Tools")),1),c("li",Aa,f(n.t("Comandos","Commands")),1)],8,Oa),(w(),E("svg",Na,[c("title",Ma,f(n.t("Conteos diarios por categoría","Daily counts by category")),1),c("desc",Pa,f(n.t(`Gráfico de barras con ${n.trend.length} días registrados en UTC; no hay historial anterior a la instrumentación.`,`Bar chart with ${n.trend.length} recorded days in UTC; there is no history before instrumentation.`)),1),t[26]||(t[26]=c("line",{x1:"28",y1:"152",x2:"704",y2:"152",class:"chart-axis"},null,-1)),(w(!0),E(W,null,de(n.bars,r=>(w(),E("rect",{key:`${r.date}-${r.key}`,class:en(`${r.key}-series`),x:r.x,y:r.y,width:r.width,height:r.height},[c("title",null,f(`${r.date} · ${n.reportTitle(r.key)}: ${r.count}`),1)],10,ja))),128)),c("text",{x:n.trend.length===1?360:28,y:"173","text-anchor":n.trend.length===1?"middle":"start"},f(n.trend[0].date),9,Ia),n.trend.length>1?(w(),E("text",Da,f(n.trend.at(-1).date),1)):ee("",!0)]))],64)):(w(),E("p",Ta,f(n.t("Aún no hay actividad diaria. La serie comienza ahora; los conteos anteriores no tienen fecha asignada.","No daily activity yet. The series starts now; earlier counts have no assigned date.")),1))])],512),[[Tn,n.activeView==="reports"]]),Fe(c("section",Ra,[c("h2",La,f(n.t("Puntos guardados","Saved checkpoints")),1),c("section",{class:"stat-strip checkpoint-summary","aria-label":n.t("Resumen de la memoria","Memory overview")},[c("article",Ha,[c("span",null,f(n.t("Puntos guardados","Saved checkpoints")),1),c("strong",null,f(n.data.checkpoints.length),1)])],8,Fa),n.scopes.length?(w(),E("div",Ba,[(w(!0),E(W,null,de(n.scopes,r=>(w(),E("details",{key:r.key,class:"scope"},[c("summary",Ua,[c("div",Wa,[c("span",Ka,[ue(f(n.t("Directorio","Directory"))+" ",1),c("strong",qa,f(n.projectDirectoryLabel(r,n.language)),1)]),c("span",za,f(n.t("Proyecto","Project"))+" · "+f(r.items.length)+" "+f(r.items.length===1?n.t("punto","checkpoint"):n.t("puntos","checkpoints")),1),c("code",null,f(r.project),1)])]),c("div",Ga,[(w(!0),E(W,null,de(r.items,l=>(w(),E("div",{key:l.id,class:"entry"},[c("div",Ja,[c("h3",Ya,f(n.checkpointTitle(l,n.language)),1),c("p",Za,f(l.summary),1),c("p",Xa,[c("span",null,f(n.t("Contexto","Context")),1),t[27]||(t[27]=ue()),c("code",null,f(l.context),1)]),c("time",{datetime:l.createdAt},f(new Date(l.createdAt).toLocaleString(n.language)),9,Qa)]),c("div",$a,[c("button",{type:"button",class:"action-edit",disabled:n.busy,"aria-label":`${n.t("Editar punto guardado","Edit checkpoint")}: ${l.summary}`,onClick:a=>n.edit(l)},f(n.t("Editar","Edit")),9,ef),c("button",{type:"button",class:"action-delete",disabled:n.busy,"aria-label":`${n.t("Eliminar punto guardado","Delete checkpoint")}: ${l.summary}`,onClick:a=>n.removeCheckpoint(l)},f(n.t("Eliminar","Delete")),9,tf)])]))),128))])]))),128))])):(w(),E("p",Va,f(n.t("No hay puntos guardados.","No checkpoints saved.")),1))],512),[[Tn,n.activeView==="checkpoints"]]),Fe(c("section",nf,[c("header",sf,[c("div",null,[c("h2",of,f(n.t("TODOs por proyecto","TODOs by project")),1),c("p",rf,f(n.t("Tareas persistentes agrupadas por proyecto y estado.","Persistent tasks grouped by project and status.")),1)]),c("label",lf,[Fe(c("input",{"onUpdate:modelValue":t[4]||(t[4]=r=>n.includeArchived=r),type:"checkbox"},null,512),[[wc,n.includeArchived]]),c("span",null,f(n.t("Incluir archivados","Include archived")),1)])]),n.todoGroups.length?(w(),E("div",af,[(w(!0),E(W,null,de(n.todoGroups,r=>(w(),E("details",{key:r.key,class:"scope todo-project"},[c("summary",ff,[c("div",df,[c("span",uf,[ue(f(n.t("Directorio","Directory"))+" ",1),c("strong",hf,f(n.projectDirectoryLabel(r,n.language)),1)]),c("span",mf,f(n.t("Proyecto","Project"))+" · "+f(r.total)+" "+f(r.total===1?n.t("tarea","task"):n.t("tareas","tasks")),1),c("code",null,f(r.project),1)])]),c("div",pf,[(w(!0),E(W,null,de(n.todoStatuses,l=>(w(),E(W,{key:l},[r[l].length?(w(),E("section",gf,[c("h3",_f,[c("span",null,f(n.todoStatusLabel(l)),1),c("span",null,f(r[l].length),1)]),c("ul",yf,[(w(!0),E(W,null,de(r[l],a=>(w(),E("li",{key:a.id},f(a.task),1))),128))])])):ee("",!0)],64))),128))])]))),128))])):(w(),E("p",cf,f(n.includeArchived?n.t("No hay TODOs guardados.","No TODOs saved."):n.t("No hay TODOs activos. Incluye los archivados para verlos.","No active TODOs. Include archived items to see them.")),1))],512),[[Tn,n.activeView==="todos"]])],64)):ee("",!0),Fe(c("section",{id:"metrics","aria-labelledby":"metrics-heading","aria-busy":n.metricsLoading},[c("header",vf,[c("div",null,[c("h2",xf,f(n.t("Métricas de uso","Usage metrics")),1),c("p",Sf,f(n.t("Tokens y caché por agente, modelo y proyecto, medidos a partir del uso reportado por el runtime.","Tokens and cache by agent, model, and project, measured from usage reported by the runtime.")),1)])]),c("fieldset",kf,[c("legend",null,f(n.t("Filtros","Filters")),1),c("label",Cf,[c("span",null,f(n.t("Rango","Range")),1),Fe(c("select",{"onUpdate:modelValue":t[5]||(t[5]=r=>n.rangeDays=r)},[c("option",Tf,f(n.t("7 días","7 days")),1),c("option",wf,f(n.t("30 días","30 days")),1),c("option",Of,f(n.t("90 días","90 days")),1)],512),[[Pt,n.rangeDays,void 0,{number:!0}]])]),c("label",Ef,[c("span",null,f(n.t("Proyecto","Project")),1),Fe(c("select",{"onUpdate:modelValue":t[6]||(t[6]=r=>n.metricProject=r)},[c("option",Af,f(n.t("Todos los proyectos","All projects")),1),(w(!0),E(W,null,de(n.metricOptions.projects,r=>(w(),E("option",{key:r.key,value:r.key},f(n.projectOptionLabel(r)),9,Nf))),128))],512),[[Pt,n.metricProject]])]),c("label",Mf,[c("span",null,f(n.t("Agente","Agent")),1),Fe(c("select",{"onUpdate:modelValue":t[7]||(t[7]=r=>n.metricAgent=r)},[c("option",Pf,f(n.t("Todos los agentes","All agents")),1),(w(!0),E(W,null,de(n.metricOptions.agents,r=>(w(),E("option",{key:r,value:r},f(r),9,jf))),128))],512),[[Pt,n.metricAgent]])]),c("label",If,[c("span",null,f(n.t("Proveedor","Provider")),1),Fe(c("select",{"onUpdate:modelValue":t[8]||(t[8]=r=>n.metricProvider=r)},[c("option",Df,f(n.t("Todos los proveedores","All providers")),1),(w(!0),E(W,null,de(n.metricOptions.providers,r=>(w(),E("option",{key:r,value:r},f(r),9,Rf))),128))],512),[[Pt,n.metricProvider]])]),c("label",Lf,[c("span",null,f(n.t("Modelo","Model")),1),Fe(c("select",{"onUpdate:modelValue":t[9]||(t[9]=r=>n.metricModel=r)},[c("option",Ff,f(n.t("Todos los modelos","All models")),1),(w(!0),E(W,null,de(n.metricOptions.models,r=>(w(),E("option",{key:r,value:r},f(r),9,Hf))),128))],512),[[Pt,n.metricModel]])]),c("button",{type:"button",class:"metrics-reset",disabled:!n.hasMetricFilters,onClick:t[10]||(t[10]=(...r)=>n.clearMetricFilters&&n.clearMetricFilters(...r))},f(n.t("Limpiar filtros","Clear filters")),9,Vf)]),n.metricsError?(w(),E("p",Bf,[ue(f(n.metricsError)+" ",1),c("button",{type:"button",onClick:t[11]||(t[11]=(...r)=>n.loadMetrics&&n.loadMetrics(...r))},f(n.t("Reintentar","Retry")),1)])):ee("",!0),n.metricsLoading?(w(),E("p",Uf,f(n.t("Leyendo métricas…","Reading metrics…")),1)):n.metricsEmpty&&!n.metricsError?(w(),E("p",Wf,f(n.t("La instrumentación empieza ahora. Aún no hay pasos registrados en este rango; el backfill aproximado puede tardar unos segundos.","Instrumentation starts now. No steps recorded in this range yet; approximate backfill may take a few seconds.")),1)):ee("",!0),n.metrics&&!n.metricsEmpty?(w(),E(W,{key:3},[c("div",Kf,[c("article",qf,[c("span",null,f(n.t("Pasos","Steps")),1),c("strong",null,f(n.formatNumber(n.metrics.totals.steps)),1),c("small",null,f(n.t("registrados en el rango","recorded in range")),1)]),c("article",zf,[c("span",null,f(n.t("Entrada sin caché","Uncached input")),1),c("strong",null,f(n.formatCompact(n.metrics.totals.tokens.input)),1),c("small",null,f(n.t("tokens de entrada","input tokens")),1)]),c("article",Gf,[c("span",null,f(n.t("Caché leída","Cache read")),1),c("strong",null,f(n.formatCompact(n.metrics.totals.tokens.cacheRead)),1),c("small",null,f(n.t("tokens reutilizados","reused tokens")),1)]),c("article",Jf,[c("span",null,f(n.t("Salida","Output")),1),c("strong",null,f(n.formatCompact(n.metrics.totals.tokens.output)),1),c("small",null,f(n.t("tokens generados","generated tokens")),1)]),c("article",Yf,[c("span",null,f(n.t("Razonamiento","Reasoning")),1),c("strong",null,f(n.formatCompact(n.metrics.totals.tokens.reasoning)),1),c("small",null,f(n.t("tokens de razonamiento","reasoning tokens")),1)])]),c("article",Zf,[c("div",null,[c("h3",null,f(n.t("Ahorro medido por caché","Measured cache savings")),1),c("p",Xf,f(n.t(`cacheRead / (input + cacheRead + cacheWrite) = ${n.formatPercent(n.metrics.totals.cacheHitRate)}. Medición exacta de tokens reutilizados.`,`cacheRead / (input + cacheRead + cacheWrite) = ${n.formatPercent(n.metrics.totals.cacheHitRate)}. Exact measurement of reused tokens.`)),1)]),c("strong",Qf,f(n.formatPercent(n.metrics.totals.cacheHitRate)),1),c("p",$f,f(n.formatCompact(n.metrics.totals.tokens.cacheRead))+" / "+f(n.formatCompact(n.cacheDenominator))+" "+f(n.t("tokens de entrada reutilizados","input tokens reused")),1)]),c("div",ed,[c("article",td,[c("h3",null,f(n.t("Tokens por día · UTC","Tokens per day · UTC")),1),c("ul",{class:"trend-legend","aria-label":n.t("Leyenda del gráfico de tokens","Token chart legend")},[c("li",sd,f(n.seriesLabel("input")),1),c("li",od,f(n.seriesLabel("cache")),1),c("li",rd,f(n.seriesLabel("output")),1)],8,nd),n.tokenChart.length?(w(),E(W,{key:1},[c("p",ld,f(n.t(`Días: ${n.firstMetricDay} – ${n.lastMetricDay}.`,`Days: ${n.firstMetricDay} – ${n.lastMetricDay}.`)),1),(w(),E("svg",cd,[c("title",ad,f(n.t("Tokens diarios por serie","Daily tokens by series")),1),c("desc",fd,f(n.t(`Barras apiladas de entrada sin caché, caché leída y salida para ${n.metrics.series.length} días UTC.`,`Stacked bars of uncached input, cache read, and output for ${n.metrics.series.length} UTC days.`)),1),t[28]||(t[28]=c("line",{x1:"28",y1:"152",x2:"704",y2:"152",class:"chart-axis"},null,-1)),(w(!0),E(W,null,de(n.tokenChart,r=>(w(),E("rect",{key:`${r.day}-${r.key}`,class:en(`${r.key}-series`),x:r.x,y:r.y,width:r.width,height:r.height},[c("title",null,f(`${r.day} · ${n.seriesLabel(r.key)}: ${n.formatNumber(r.value)}`),1)],10,dd))),128)),c("text",{x:n.metrics.series.length===1?366:28,y:"173","text-anchor":n.metrics.series.length===1?"middle":"start"},f(n.firstMetricDay),9,ud),n.metrics.series.length>1?(w(),E("text",hd,f(n.lastMetricDay),1)):ee("",!0)]))],64)):(w(),E("p",id,f(n.t("Sin tokens registrados en este rango.","No tokens recorded in this range.")),1))])]),c("p",md,f(n.t("Máximo 50 filas por dimensión. Ordena por nombre, pasos o tokens desde las cabeceras.","Up to 50 rows per dimension. Sort by name, steps, or tokens from the column headers.")),1),c("div",pd,[c("article",gd,[c("table",_d,[c("caption",null,f(n.t("Por agente","By agent")),1),c("thead",null,[c("tr",null,[c("th",{scope:"col","aria-sort":n.ariaSort("agent","name")},[c("button",{type:"button",class:"sort-button",onClick:t[12]||(t[12]=r=>n.toggleSort("agent","name"))},[ue(f(n.t("Agente","Agent")),1),n.sortIndicator("agent","name")?(w(),E("span",bd,f(n.sortIndicator("agent","name")),1)):ee("",!0)])],8,yd),c("th",{scope:"col","aria-sort":n.ariaSort("agent","steps")},[c("button",{type:"button",class:"sort-button",onClick:t[13]||(t[13]=r=>n.toggleSort("agent","steps"))},[ue(f(n.t("Pasos","Steps")),1),n.sortIndicator("agent","steps")?(w(),E("span",xd,f(n.sortIndicator("agent","steps")),1)):ee("",!0)])],8,vd),c("th",{scope:"col","aria-sort":n.ariaSort("agent","tokens")},[c("button",{type:"button",class:"sort-button",onClick:t[14]||(t[14]=r=>n.toggleSort("agent","tokens"))},[ue(f(n.t("Tokens","Tokens")),1),n.sortIndicator("agent","tokens")?(w(),E("span",kd,f(n.sortIndicator("agent","tokens")),1)):ee("",!0)])],8,Sd)])]),c("tbody",null,[(w(!0),E(W,null,de(n.agentRows,r=>(w(),E("tr",{key:r.key??"none"},[c("th",Cd,f(r.key||n.t("Sin agente","No agent")),1),c("td",Td,f(n.formatNumber(r.steps)),1),c("td",null,f(n.tokenBreakdown(r)),1)]))),128))])]),n.metrics.byAgent.length?ee("",!0):(w(),E("p",wd,f(n.t("Sin datos por agente en este rango.","No agent data in this range.")),1))]),c("article",Od,[c("table",Ed,[c("caption",null,f(n.t("Por modelo y proveedor","By model and provider")),1),c("thead",null,[c("tr",null,[c("th",{scope:"col","aria-sort":n.ariaSort("model","name")},[c("button",{type:"button",class:"sort-button",onClick:t[15]||(t[15]=r=>n.toggleSort("model","name"))},[ue(f(n.t("Modelo / proveedor","Model / provider")),1),n.sortIndicator("model","name")?(w(),E("span",Nd,f(n.sortIndicator("model","name")),1)):ee("",!0)])],8,Ad),c("th",{scope:"col","aria-sort":n.ariaSort("model","steps")},[c("button",{type:"button",class:"sort-button",onClick:t[16]||(t[16]=r=>n.toggleSort("model","steps"))},[ue(f(n.t("Pasos","Steps")),1),n.sortIndicator("model","steps")?(w(),E("span",Pd,f(n.sortIndicator("model","steps")),1)):ee("",!0)])],8,Md),c("th",{scope:"col","aria-sort":n.ariaSort("model","tokens")},[c("button",{type:"button",class:"sort-button",onClick:t[17]||(t[17]=r=>n.toggleSort("model","tokens"))},[ue(f(n.t("Tokens","Tokens")),1),n.sortIndicator("model","tokens")?(w(),E("span",Id,f(n.sortIndicator("model","tokens")),1)):ee("",!0)])],8,jd)])]),c("tbody",null,[(w(!0),E(W,null,de(n.modelRows,r=>(w(),E("tr",{key:`${r.provider??""}:${r.key??""}`},[c("th",Dd,[c("span",null,f(r.key||n.t("Sin modelo","No model")),1),c("small",Rd,f(r.provider||n.t("Sin proveedor","No provider")),1)]),c("td",Ld,f(n.formatNumber(r.steps)),1),c("td",null,f(n.tokenBreakdown(r)),1)]))),128))])]),n.metrics.byModel.length?ee("",!0):(w(),E("p",Fd,f(n.t("Sin datos por modelo en este rango.","No model data in this range.")),1))]),c("article",Hd,[c("table",Vd,[c("caption",null,f(n.t("Por proyecto","By project")),1),c("thead",null,[c("tr",null,[c("th",{scope:"col","aria-sort":n.ariaSort("project","name")},[c("button",{type:"button",class:"sort-button",onClick:t[18]||(t[18]=r=>n.toggleSort("project","name"))},[ue(f(n.t("Proyecto / directorio","Project / directory")),1),n.sortIndicator("project","name")?(w(),E("span",Ud,f(n.sortIndicator("project","name")),1)):ee("",!0)])],8,Bd),c("th",{scope:"col","aria-sort":n.ariaSort("project","steps")},[c("button",{type:"button",class:"sort-button",onClick:t[19]||(t[19]=r=>n.toggleSort("project","steps"))},[ue(f(n.t("Pasos","Steps")),1),n.sortIndicator("project","steps")?(w(),E("span",Kd,f(n.sortIndicator("project","steps")),1)):ee("",!0)])],8,Wd),c("th",{scope:"col","aria-sort":n.ariaSort("project","tokens")},[c("button",{type:"button",class:"sort-button",onClick:t[20]||(t[20]=r=>n.toggleSort("project","tokens"))},[ue(f(n.t("Tokens","Tokens")),1),n.sortIndicator("project","tokens")?(w(),E("span",zd,f(n.sortIndicator("project","tokens")),1)):ee("",!0)])],8,qd)])]),c("tbody",null,[(w(!0),E(W,null,de(n.projectRows,r=>(w(),E("tr",{key:r.key??"none"},[c("th",Gd,[c("code",Jd,f(r.key||"—"),1),c("small",Yd,f(r.directory||n.t("Directorio no disponible","Directory unavailable")),1)]),c("td",Zd,f(n.formatNumber(r.steps)),1),c("td",null,f(n.tokenBreakdown(r)),1)]))),128))])]),n.metrics.byProject.length?ee("",!0):(w(),E("p",Xd,f(n.t("Sin datos por proyecto en este rango.","No project data in this range.")),1))]),c("article",Qd,[c("table",$d,[c("caption",null,f(n.t("Por tipo de petición","By request type")),1),c("thead",null,[c("tr",null,[c("th",{scope:"col","aria-sort":n.ariaSort("kind","name")},[c("button",{type:"button",class:"sort-button",onClick:t[21]||(t[21]=r=>n.toggleSort("kind","name"))},[ue(f(n.t("Tipo","Type")),1),n.sortIndicator("kind","name")?(w(),E("span",tu,f(n.sortIndicator("kind","name")),1)):ee("",!0)])],8,eu),c("th",{scope:"col","aria-sort":n.ariaSort("kind","steps")},[c("button",{type:"button",class:"sort-button",onClick:t[22]||(t[22]=r=>n.toggleSort("kind","steps"))},[ue(f(n.t("Pasos","Steps")),1),n.sortIndicator("kind","steps")?(w(),E("span",su,f(n.sortIndicator("kind","steps")),1)):ee("",!0)])],8,nu),c("th",{scope:"col","aria-sort":n.ariaSort("kind","tokens")},[c("button",{type:"button",class:"sort-button",onClick:t[23]||(t[23]=r=>n.toggleSort("kind","tokens"))},[ue(f(n.t("Tokens","Tokens")),1),n.sortIndicator("kind","tokens")?(w(),E("span",ru,f(n.sortIndicator("kind","tokens")),1)):ee("",!0)])],8,ou)])]),c("tbody",null,[(w(!0),E(W,null,de(n.kindRows,r=>(w(),E("tr",{key:r.key},[c("th",iu,f(n.metricKindLabel(r.key)),1),c("td",lu,f(n.formatNumber(r.steps)),1),c("td",null,f(n.tokenBreakdown(r)),1)]))),128))])]),n.metrics.byKind.length?ee("",!0):(w(),E("p",cu,f(n.t("Sin datos por tipo en este rango.","No type data in this range.")),1))])])],64)):ee("",!0),c("section",au,[c("header",fu,[c("div",null,[c("h3",du,f(n.t("Salud del plugin","Plugin health")),1),c("p",uu,f(n.t("Contadores en memoria de esta sesión del plugin; no se guardan en store-v1.json y no incluyen prompts, rutas, argumentos ni IDs de sesión.","In-memory counters for this plugin session; they are not saved in store-v1.json and contain no prompts, paths, arguments, or session IDs.")),1)])]),n.pluginEmpty&&!n.metricsLoading&&!n.metricsError?(w(),E("p",hu,f(n.t("Aún no hay actividad interna registrada. Los contadores aparecen cuando el plugin procesa hooks, storage o SSE.","No internal activity recorded yet. Counters appear when the plugin handles hooks, storage, or SSE.")),1)):n.pluginEmpty?ee("",!0):(w(),E(W,{key:1},[c("div",mu,[c("article",pu,[c("span",null,f(n.t("Hooks","Hooks")),1),c("strong",null,f(n.formatNumber(n.pluginHookCalls)),1),c("small",null,f(n.t("llamadas","calls"))+" · "+f(n.formatNumber(n.pluginHookErrors))+" "+f(n.t("errores","errors")),1)]),c("article",gu,[c("span",null,f(n.t("Almacenamiento","Storage")),1),c("strong",null,f(n.formatNumber(n.plugin.store.reads))+" / "+f(n.formatNumber(n.plugin.store.writes)),1),c("small",null,f(n.t("lecturas / escrituras","reads / writes")),1)]),c("article",_u,[c("span",null,f(n.t("Contexto inyectado","Injected context")),1),c("strong",null,f(n.formatNumber(n.plugin.context.injectedChars)),1),c("small",null,f(n.t("caracteres","characters"))+" · "+f(n.formatNumber(n.plugin.context.injections))+" "+f(n.t("inyecciones","injections")),1)]),c("article",yu,[c("span",null,f(n.t("SSE","SSE")),1),c("strong",null,f(n.formatNumber(n.plugin.sse.clients)),1),c("small",null,f(n.t("clientes · pico","clients · peak"))+" "+f(n.formatNumber(n.plugin.sse.peakClients)),1)]),c("article",bu,[c("span",null,f(n.t("Peticiones 2xx","2xx requests")),1),c("strong",null,f(n.formatNumber(n.plugin.requests["2xx"])),1),c("small",null,"4xx "+f(n.formatNumber(n.plugin.requests["4xx"]))+" · 5xx "+f(n.formatNumber(n.plugin.requests["5xx"])),1)]),c("article",vu,[c("span",null,f(n.t("Errores","Errors")),1),c("strong",null,f(n.formatNumber(n.pluginErrorTotal)),1),c("small",null,f(n.t("contabilizados","counted")),1)])]),c("div",xu,[c("article",Su,[c("table",ku,[c("caption",null,f(n.t("Hooks del plugin","Plugin hooks")),1),c("thead",null,[c("tr",null,[c("th",Cu,f(n.t("Hook","Hook")),1),c("th",Tu,f(n.t("Llamadas","Calls")),1),c("th",wu,f(n.t("Errores","Errors")),1),t[29]||(t[29]=c("th",{scope:"col"},"p50",-1)),t[30]||(t[30]=c("th",{scope:"col"},"p95",-1))])]),c("tbody",null,[(w(!0),E(W,null,de(n.pluginHooks,r=>(w(),E("tr",{key:r.name},[c("th",Ou,f(n.pluginHookLabel(r.name)),1),c("td",Eu,f(n.formatNumber(r.invocations)),1),c("td",Au,f(n.formatNumber(r.errors)),1),c("td",Nu,f(n.formatMillis(r.p50)),1),c("td",Mu,f(n.formatMillis(r.p95)),1)]))),128))])])]),c("article",Pu,[c("table",ju,[c("caption",null,f(n.t("Almacenamiento y memoria","Storage and memory")),1),c("thead",null,[c("tr",null,[c("th",Iu,f(n.t("Métrica","Metric")),1),c("th",Du,f(n.t("Valor","Value")),1)])]),c("tbody",null,[c("tr",null,[c("th",Ru,f(n.t("Bytes leídos / escritos","Bytes read / written")),1),c("td",Lu,f(n.formatBytes(n.plugin.store.bytesRead))+" / "+f(n.formatBytes(n.plugin.store.bytesWritten)),1)]),c("tr",null,[c("th",Fu,f(n.t("Esperas / timeouts de lock","Lock waits / timeouts")),1),c("td",Hu,f(n.formatNumber(n.plugin.store.lockWaits))+" / "+f(n.formatNumber(n.plugin.store.lockTimeouts)),1)]),c("tr",null,[c("th",Vu,f(n.t("Latencia de escritura p50 / p95","Write latency p50 / p95")),1),c("td",Bu,f(n.formatMillis(n.plugin.store.writeLatency.p50))+" / "+f(n.formatMillis(n.plugin.store.writeLatency.p95)),1)]),c("tr",null,[c("th",Uu,f(n.t("Tamaño store / metrics","Store / metrics size")),1),c("td",Wu,f(n.formatBytes(n.plugin.bytes.store))+" / "+f(n.formatBytes(n.plugin.bytes.metrics)),1)]),c("tr",null,[c("th",Ku,f(n.t("Avisos checkpoint / TODO","Checkpoint / TODO notices")),1),c("td",qu,f(n.formatNumber(n.plugin.context.notices.checkpoint))+" / "+f(n.formatNumber(n.plugin.context.notices.todo)),1)])])])]),c("article",zu,[c("table",Gu,[c("caption",null,f(n.t("SSE, peticiones y flush","SSE, requests, and flush")),1),c("thead",null,[c("tr",null,[c("th",Ju,f(n.t("Métrica","Metric")),1),c("th",Yu,f(n.t("Valor","Value")),1)])]),c("tbody",null,[c("tr",null,[c("th",Zu,f(n.t("Clientes SSE / pico","SSE clients / peak")),1),c("td",Xu,f(n.formatNumber(n.plugin.sse.clients))+" / "+f(n.formatNumber(n.plugin.sse.peakClients)),1)]),c("tr",null,[c("th",Qu,f(n.t("Refrescos SSE","SSE refreshes")),1),c("td",$u,f(n.formatNumber(n.plugin.sse.refreshes)),1)]),c("tr",null,[c("th",eh,f(n.t("Peticiones 2xx / 4xx / 5xx","Requests 2xx / 4xx / 5xx")),1),c("td",th,f(n.formatNumber(n.plugin.requests["2xx"]))+" / "+f(n.formatNumber(n.plugin.requests["4xx"]))+" / "+f(n.formatNumber(n.plugin.requests["5xx"])),1)]),c("tr",null,[c("th",nh,f(n.t("Último flush","Last flush")),1),c("td",sh,f(n.formatTime(n.plugin.flush.lastAt)),1)]),c("tr",null,[c("th",oh,f(n.t("Pendientes / fallos de flush","Flush pending / failures")),1),c("td",rh,f(n.formatNumber(n.plugin.flush.pending))+" / "+f(n.formatNumber(n.plugin.flush.failures)),1)])])])]),c("article",ih,[c("table",lh,[c("caption",null,f(n.t("Errores y estado actual","Errors and current state")),1),c("thead",null,[c("tr",null,[c("th",ch,f(n.t("Categoría","Category")),1),c("th",ah,f(n.t("Valor","Value")),1)])]),c("tbody",null,[(w(!0),E(W,null,de(n.pluginErrors,r=>(w(),E("tr",{key:r.key},[c("th",fh,f(n.pluginErrorLabel(r.key)),1),c("td",dh,f(n.formatNumber(r.count)),1)]))),128)),c("tr",null,[c("th",uh,f(n.t("Checkpoints / TODOs / ámbitos","Checkpoints / TODOs / scopes")),1),c("td",hh,f(n.pluginCurrent?`${n.formatNumber(n.pluginCurrent.checkpoints)} / ${n.formatNumber(n.pluginCurrent.todos)} / ${n.formatNumber(n.pluginCurrent.scopes)}`:"—"),1)]),c("tr",null,[c("th",mh,f(n.t("TODOs activos","Active TODOs")),1),c("td",ph,f(n.pluginCurrent?n.formatNumber(n.pluginCurrent.activeTodos):"—"),1)]),c("tr",null,[c("th",gh,f(n.t("Activo desde","Active since")),1),c("td",_h,f(n.formatTime(n.plugin.startedAt)),1)])])])])])],64))])],8,bf),[[Tn,n.activeView==="metrics"]])])])])}const bh=qc(zc,[["render",yh]]);Nc(bh).mount("#app");
@@ -0,0 +1 @@
1
+ :root{color-scheme:dark;--canvas: #0b1119;--surface: #101923;--surface-raised: #141f2b;--ink: #dce6ed;--muted: #91a2b1;--brand: #59d6c8;--danger: #ed8589;--series-commands: #b69af7;--series-input: #7cc7ff;--series-cache: #59d6c8;--series-output: #f0b86e;--line: color-mix(in srgb, var(--ink) 12%, transparent);--line-soft: color-mix(in srgb, var(--ink) 7%, transparent);--focus: var(--brand);background:var(--canvas);color:var(--ink);font:14px/1.5 system-ui,sans-serif}:root[data-theme=light]{color-scheme:light;--canvas: #f2f6f8;--surface: #ffffff;--surface-raised: #e8eff2;--ink: #172733;--muted: #536a78;--brand: #087d75;--danger: #a8323c;--series-commands: #6045a8;--series-input: #0b5f8a;--series-cache: #087d75;--series-output: #8a4b00;--line: color-mix(in srgb, var(--ink) 17%, transparent);--line-soft: color-mix(in srgb, var(--ink) 10%, transparent)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--canvas);color:var(--ink)}button,select{color:inherit;font:inherit}.app-shell{min-height:100vh;background:var(--canvas)}.sidebar{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem 1rem;padding:.875rem 1rem .75rem;border-bottom:1px solid var(--line);background:var(--canvas)}.brand{color:var(--ink);font-size:1rem;font-weight:750;letter-spacing:-.035em;text-decoration:none;white-space:nowrap}.brand:before{content:"HM";display:inline-grid;width:1.75rem;height:1.75rem;margin-right:.55rem;place-items:center;border:1px solid color-mix(in srgb,var(--brand) 55%,transparent);border-radius:.35rem;color:var(--brand);font-size:.65rem;letter-spacing:.02em;vertical-align:-.2rem}.sidebar-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;flex:none;gap:.25rem;padding:.2rem;border:1px solid var(--line-soft);border-radius:.45rem;background:var(--surface)}.sidebar-nav a{flex:1;min-width:0;padding:.45rem .55rem;border-radius:.3rem;color:var(--muted);font-size:.82rem;font-weight:650;overflow-wrap:anywhere;text-align:center;text-decoration:none}.sidebar-nav a:hover,.sidebar-nav a:focus-visible{color:var(--ink);background:var(--surface-raised)}.sidebar-nav a[aria-current=page]{color:color-mix(in srgb,var(--brand) 90%,var(--ink));background:var(--surface-raised)}.local-note{flex:1 1 9rem;max-width:13rem;margin:0;color:var(--muted);font-size:.75rem}.workspace{min-width:0}.masthead{display:flex;flex-direction:column;align-items:flex-start;gap:1rem;padding:1.4rem 1rem 1.1rem;border-bottom:1px solid var(--line-soft)}.eyebrow{margin:0 0 .35rem;color:var(--brand);font-size:.68rem;font-weight:750;letter-spacing:.13em}h1{margin:0;font-size:clamp(1.55rem,5vw,2.1rem);font-weight:650;letter-spacing:-.045em;line-height:1.18;text-wrap:balance}.intro{margin:.3rem 0 0;color:var(--muted);font-size:.9rem}.masthead-controls{display:flex;align-items:center;gap:.5rem}.language{display:flex;align-items:center;gap:.45rem;color:var(--muted);font-size:.75rem;font-weight:650}.language select,.theme-toggle{min-height:2.25rem;padding:.35rem .6rem;border:1px solid var(--line);border-radius:.35rem;background:var(--surface);color:var(--ink);font-size:.78rem;font-weight:650}.theme-toggle{cursor:pointer}main{width:min(100%,88rem);margin-inline:auto;padding:1rem 1rem 3rem}.page-note,.section-note{color:var(--muted)}.page-note{max-width:60rem;margin:0 0 1rem;font-size:.8rem}.stat-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;margin-bottom:1.8rem}.stat-card{display:flex;align-items:center;justify-content:space-between;gap:.5rem;min-width:0;min-height:3.8rem;padding:.65rem .8rem;border:1px solid var(--line);border-radius:.4rem;background:var(--surface);color:var(--muted);font-size:.76rem;font-weight:650}.stat-card span{min-width:0;overflow-wrap:anywhere}.stat-card strong{color:var(--brand);font-size:1.35rem;font-variant-numeric:tabular-nums;line-height:1}.checkpoint-summary{grid-template-columns:minmax(0,1fr);max-width:20rem;margin:.8rem 0 1.2rem}main>section{margin-top:2rem;scroll-margin-top:1rem}h2{display:flex;align-items:baseline;gap:.65rem;margin:0;font-size:1.15rem;font-weight:680;letter-spacing:-.025em;text-wrap:balance}h3{display:flex;align-items:flex-start;justify-content:space-between;gap:.5rem;margin:0;font-size:.86rem;font-weight:680;line-height:1.4;text-wrap:balance}.section-note{margin:.25rem 0 .8rem;font-size:.8rem}.notice{display:flex;flex-wrap:wrap;align-items:center;gap:.65rem;color:var(--danger)}.report-heading{display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}.report-heading .section-note{max-width:58rem;margin-bottom:0}.include-archived{display:flex;align-items:center;gap:.5rem;min-height:2.5rem;color:var(--muted);font-size:.8rem;font-weight:650;cursor:pointer}.include-archived input{width:1rem;height:1rem;margin:0;accent-color:var(--brand)}.include-archived input:focus-visible{outline:2px solid var(--focus);outline-offset:3px}.report-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:.6rem;margin-top:.8rem}.report-card,.trend-panel{min-width:0;padding:.8rem .85rem;border:1px solid var(--line);border-radius:.4rem;background:var(--surface)}.report-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:.7rem}.report-total{flex:none;color:var(--brand);font-size:1.1rem;font-variant-numeric:tabular-nums}.report-ranking{margin:.55rem 0 0;padding:0;list-style:none}.report-ranking li{display:flex;justify-content:space-between;gap:.6rem;padding:.55rem 0;border-top:1px solid var(--line-soft)}.report-ranking li>strong{flex:none;color:var(--brand);font-variant-numeric:tabular-nums}.report-label{min-width:0;overflow-wrap:anywhere}.report-label code{display:block;margin-top:.15rem;color:var(--muted);font-size:.7rem}.empty-report{margin:.7rem 0 0;color:var(--muted);font-size:.8rem}.trend-panel{margin-top:.65rem}.trend-legend{display:flex;flex-wrap:wrap;gap:.35rem 1rem;margin:.65rem 0 .2rem;padding:0;color:var(--muted);font-size:.72rem;list-style:none}.trend-legend li:before{display:inline-block;width:.48rem;height:.48rem;margin-right:.35rem;border-radius:.1rem;background:currentColor;content:""}.tools-series{color:var(--brand)}.commands-series{color:var(--series-commands)}.trend-chart{display:block;width:100%;max-width:100%;height:auto;overflow:hidden}.trend-chart .chart-axis{stroke:var(--line);stroke-width:1}.trend-chart text{fill:var(--muted);font:10px system-ui,sans-serif}.trend-chart rect{rx:1px}.trend-chart .tools-series{fill:var(--brand)}.trend-chart .commands-series{fill:var(--series-commands)}.metrics-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(10.5rem,1fr));align-items:end;min-width:0;gap:.65rem;margin:1rem 0 1.2rem;padding:.75rem;border:1px solid var(--line);border-radius:.4rem;background:var(--surface)}.metrics-filters legend{padding:0 .3rem;color:var(--brand);font-size:.68rem;font-weight:750;letter-spacing:.09em;text-transform:uppercase}.metrics-filter{display:grid;gap:.28rem;min-width:0;color:var(--muted);font-size:.72rem;font-weight:650}.metrics-filter select{width:100%;min-width:0}.metrics-reset{align-self:end}.metrics-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(8.5rem,1fr));gap:.6rem;margin-bottom:.8rem}.metric-card{display:grid;gap:.25rem;min-width:0;padding:.75rem .8rem;border:1px solid var(--line);border-radius:.4rem;background:var(--surface);color:var(--muted);font-size:.72rem}.metric-card span{font-weight:650;overflow-wrap:anywhere}.metric-card strong{color:var(--ink);font-size:1.35rem;font-variant-numeric:tabular-nums;line-height:1.1;overflow-wrap:anywhere}.metric-card small{color:var(--muted);font-size:.68rem;overflow-wrap:anywhere}.savings-panel{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.4rem .8rem;padding:.8rem .9rem;border:1px solid color-mix(in srgb,var(--brand) 38%,var(--line));border-radius:.4rem;background:var(--surface)}.savings-panel h3{display:block}.savings-panel .section-note{margin:.2rem 0 0}.savings-rate{color:var(--brand);font-size:1.8rem;font-variant-numeric:tabular-nums;line-height:1}.savings-detail{grid-column:1 / -1;margin:0;color:var(--muted);font-size:.72rem;overflow-wrap:anywhere}.metrics-charts,.metrics-tables{display:grid;grid-template-columns:minmax(0,1fr);gap:.65rem;margin-top:.8rem}.metrics-tables-note{margin-top:1.2rem}.metrics-table-panel{min-width:0;padding:.8rem .85rem;border:1px solid var(--line);border-radius:.4rem;background:var(--surface);overflow-x:auto}.metrics-table{width:100%;border-collapse:collapse;font-size:.76rem}.metrics-table caption{padding:0 0 .55rem;color:var(--ink);font-size:.84rem;font-weight:680;text-align:left}.metrics-table th,.metrics-table td{padding:.5rem .45rem;border-top:1px solid var(--line-soft);text-align:left;vertical-align:top}.metrics-table thead th{color:var(--muted);font-size:.68rem;font-weight:750;letter-spacing:.05em;text-transform:uppercase}.metrics-table thead th[aria-sort=ascending],.metrics-table thead th[aria-sort=descending]{color:var(--ink)}.sort-button{display:flex;align-items:center;gap:.22rem;width:100%;min-height:1.75rem;padding:.1rem 0;border:0;background:none;color:inherit;font:inherit;letter-spacing:inherit;text-transform:inherit}.sort-button:hover:not(:disabled){border-color:transparent;color:var(--ink)}.sort-indicator{color:var(--brand);font-size:.95em;line-height:1}.metrics-table tbody th{max-width:16rem;font-weight:650;overflow-wrap:anywhere}.metrics-table td{color:var(--muted)}.metrics-table .numeric{color:var(--ink);font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}.row-sub{display:block;margin-top:.15rem;color:var(--muted);font-size:.68rem;font-weight:400;overflow-wrap:anywhere}.project-hash{display:block;max-width:100%;color:var(--muted);font-size:.66rem;overflow-wrap:anywhere}.metrics-empty{margin-top:.8rem}.plugin-health{margin-top:2rem;padding-top:1.2rem;border-top:1px solid var(--line)}.plugin-heading{margin-bottom:.8rem}.plugin-heading h3{display:block;font-size:1rem}.plugin-heading .section-note{margin-bottom:0}.plugin-tables{margin-top:.8rem}.input-series{color:var(--series-input)}.cache-series{color:var(--series-cache)}.output-series{color:var(--series-output)}.trend-chart .input-series{fill:var(--series-input)}.trend-chart .cache-series{fill:var(--series-cache)}.trend-chart .output-series{fill:var(--series-output)}@media(max-width:30rem){.savings-panel{grid-template-columns:minmax(0,1fr)}}.scope{min-width:0;border:1px solid var(--line);border-radius:.4rem;background:var(--surface)}.scope-list{display:grid;grid-template-columns:minmax(0,1fr);gap:.65rem;margin-top:.8rem}.project-summary{display:flex;align-items:center;gap:.75rem;min-width:0;padding:.8rem;cursor:pointer}.project-summary:after{margin-left:auto;color:var(--muted);content:"⌄";font-size:1.2rem}.scope[open]>.project-summary:after{content:"⌃"}.project-summary:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}.scope-provenance{display:grid;min-width:0;gap:.4rem}.scope-caption{display:flex;align-items:center;gap:.4rem;margin:0;color:var(--brand);font-size:.67rem;font-weight:750;letter-spacing:.09em;text-transform:uppercase}.scope-caption:before{content:"";width:.35rem;height:.35rem;border-radius:50%;background:var(--brand)}.scope-caption .scope-directory{min-width:0;color:var(--ink);font-size:.82rem;letter-spacing:normal;text-transform:none;overflow-wrap:anywhere}code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.project-summary code,.entry-context code{display:inline-block;max-width:100%;padding:.15rem .35rem;border:1px solid var(--line-soft);border-radius:.25rem;background:var(--canvas);font-size:.77rem;overflow-wrap:anywhere}.project-checkpoints{border-top:1px solid var(--line-soft)}.todo-status-list{display:grid;padding:.7rem .8rem;border-top:1px solid var(--line-soft)}.todo-status+.todo-status{padding-top:.65rem;border-top:1px solid var(--line-soft)}.todo-status-heading{color:var(--muted);font-size:.7rem;letter-spacing:.08em;text-transform:uppercase}.todo-status-heading span:last-child{color:var(--brand);font-variant-numeric:tabular-nums}.todo-items{margin:.35rem 0 0;padding:0;list-style:none}.todo-items li{padding:.5rem 0;border-top:1px solid var(--line-soft);overflow-wrap:anywhere;white-space:pre-wrap}.entry{display:flex;flex-direction:column;align-items:flex-start;gap:.65rem;padding:.8rem}.entry+.entry{border-top:1px solid var(--line-soft)}.entry-content{min-width:0}.entry-title{display:block;margin:0 0 .25rem;overflow-wrap:anywhere}.entry-summary{margin:0 0 .3rem;white-space:pre-wrap;overflow-wrap:anywhere}.entry-context{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem;margin:0 0 .25rem;color:var(--muted);font-size:.72rem}time{color:var(--muted);font-size:.72rem}.entry-actions{display:flex;flex-wrap:wrap;gap:.4rem}button,select{min-height:2.35rem;padding:.4rem .65rem;border:1px solid var(--line);border-radius:.32rem;background:var(--surface-raised);color:var(--ink);cursor:pointer}button{font-size:.76rem;font-weight:650}button:hover:not(:disabled),select:hover{border-color:color-mix(in srgb,var(--brand) 65%,var(--line))}.action-edit{border-color:color-mix(in srgb,var(--brand) 38%,var(--line));color:var(--brand)}.action-delete{border-color:color-mix(in srgb,var(--danger) 46%,var(--line));color:var(--danger)}.action-delete:hover:not(:disabled){background:color-mix(in srgb,var(--danger) 10%,var(--surface))}button:focus-visible,select:focus-visible,a:focus-visible{outline:2px solid var(--focus);outline-offset:2px}button:disabled{opacity:.55;cursor:not-allowed}@media(min-width:45rem){.app-shell{display:grid;grid-template-columns:13.5rem minmax(0,1fr)}.sidebar{position:sticky;top:0;display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:1.5rem;height:100vh;min-height:32rem;padding:1.5rem 1rem 1rem;border-right:1px solid var(--line);border-bottom:0}.brand{font-size:1.05rem}.sidebar-nav{display:flex;flex:none;flex-direction:column;gap:.25rem;padding:.25rem}.sidebar-nav a{flex:none;padding:.62rem .65rem;text-align:left}.local-note{flex:none;max-width:none;margin:auto 0 0}.masthead{flex-direction:row;align-items:center;justify-content:space-between;gap:1rem;padding:1.6rem 1.75rem 1.2rem}main{padding:1.25rem 1.75rem 3rem}.report-heading{flex-direction:row;align-items:center;justify-content:space-between}.report-heading>button{flex:none}.entry{flex-direction:row;justify-content:space-between}.entry-actions{flex:none}}@media(min-width:68rem){.report-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.scope-list{grid-template-columns:minmax(0,1fr)}.metrics-tables{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
@@ -0,0 +1,4 @@
1
+ <!doctype html>
2
+ <html lang="es"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="color-scheme" content="dark light"><title>Habit Memory</title> <script type="module" crossorigin src="/assets/index-CMgH-UX9.js"></script>
3
+ <link rel="stylesheet" crossorigin href="/assets/index-CX37tAhW.css">
4
+ </head><body><div id="app"></div></body></html>
@@ -0,0 +1,32 @@
1
+ # Uso interoperable
2
+
3
+ El plugin de OpenCode conserva sus hooks; sus hábitos y checkpoints se guardan en JSON bajo `$XDG_DATA_HOME/habit-memory-plugin/store-v1.json` (fallback `~/.local/share/habit-memory-plugin/store-v1.json`). Puede configurarse el mismo MCP local por stdio en clientes compatibles:
4
+
5
+ ```json
6
+ {
7
+ "mcpServers": {
8
+ "habit-memory": {
9
+ "command": "node",
10
+ "args": ["/ruta/absoluta/al/plugin/src/mcp.js"]
11
+ }
12
+ }
13
+ }
14
+ ```
15
+
16
+ En Claude Code puede añadirse con `claude mcp add --transport stdio habit-memory -- node /ruta/absoluta/al/plugin/src/mcp.js`. Para Antigravity, coloca la misma entrada bajo `mcpServers` en `.agents/mcp_config.json` del workspace. OpenCode usa una entrada local como esta dentro de `mcp` en una configuración de proyecto `opencode.json` (no se modifica ninguna configuración automáticamente):
17
+
18
+ ```json
19
+ {
20
+ "mcp": {
21
+ "habit-memory": {
22
+ "type": "local",
23
+ "command": ["node", "/ruta/absoluta/al/plugin/src/mcp.js"],
24
+ "enabled": true
25
+ }
26
+ }
27
+ }
28
+ ```
29
+
30
+ Herramientas: `habit_memory_get`, `checkpoint_projects`, `checkpoint_contexts`, `checkpoint_list`, `checkpoint_save`, `checkpoint_delete` y `checkpoint_clear` (requiere `confirm: true`). El borrado de hábitos agregados solo está disponible en la WebUI local; no existe una herramienta MCP ni un comando para esa acción. Usa `checkpoint_projects` para obtener el hash de proyecto y `checkpoint_contexts` para descubrir contextos existentes, incluidos los scopes de sesión OpenCode. Las herramientas MCP admiten cualquier contexto neutral explícito para compartirlo entre clientes. Los clientes deben usar el mismo directorio XDG de datos. El store admite hasta 10 000 checkpoints y 2 MB en total. Los hábitos guardan únicamente categorías allowlisted: el acumulado por categoría se conserva hasta 999 y la serie nueva conserva buckets UTC de los últimos 365 días. El historial de tendencias empieza con la nueva instrumentación; no se asignan fechas retroactivas a conteos legacy. No se aceptan ni almacenan campos de conversación. La importación legacy lee únicamente `profile-v1` al iniciar y la clave explícita del checkpoint una vez por proyecto conocido, sin eliminar el origen.
31
+
32
+ Fuentes de configuración consultadas: [Claude Code MCP](https://code.claude.com/docs/en/mcp), [Antigravity MCP](https://www.antigravity.google/docs/mcp), [OpenCode MCP](https://opencode.ai/docs/mcp-servers/), [MCP TypeScript SDK stdio](https://ts.sdk.modelcontextprotocol.io/v2/serving/stdio.html). El servidor implementa el intercambio MCP básico por stdio directamente, sin dependencia SDK. **No se ejecutó ni verificó en vivo en Claude Code, Antigravity u OpenCode**; las entradas anteriores son ejemplos de configuración documentada.