context-lens 0.6.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +74 -4
  2. package/dist/analysis/ingest.d.ts.map +1 -1
  3. package/dist/analysis/ingest.js +4 -3
  4. package/dist/analysis/ingest.js.map +1 -1
  5. package/dist/analysis/server.js +5 -0
  6. package/dist/analysis/server.js.map +1 -1
  7. package/dist/cli-utils.d.ts +5 -0
  8. package/dist/cli-utils.d.ts.map +1 -1
  9. package/dist/cli-utils.js +59 -4
  10. package/dist/cli-utils.js.map +1 -1
  11. package/dist/cli.js +124 -34
  12. package/dist/cli.js.map +1 -1
  13. package/dist/config.d.ts +35 -0
  14. package/dist/config.d.ts.map +1 -0
  15. package/dist/config.js +113 -0
  16. package/dist/config.js.map +1 -0
  17. package/dist/core/models.d.ts +6 -38
  18. package/dist/core/models.d.ts.map +1 -1
  19. package/dist/core/models.js +6 -213
  20. package/dist/core/models.js.map +1 -1
  21. package/dist/core/parse.d.ts.map +1 -1
  22. package/dist/core/parse.js +26 -25
  23. package/dist/core/parse.js.map +1 -1
  24. package/dist/core/routing.d.ts.map +1 -1
  25. package/dist/core/routing.js +7 -1
  26. package/dist/core/routing.js.map +1 -1
  27. package/dist/core/source.d.ts +1 -0
  28. package/dist/core/source.d.ts.map +1 -1
  29. package/dist/core/source.js +9 -1
  30. package/dist/core/source.js.map +1 -1
  31. package/dist/core/tokenizer.d.ts +30 -0
  32. package/dist/core/tokenizer.d.ts.map +1 -0
  33. package/dist/core/tokenizer.js +149 -0
  34. package/dist/core/tokenizer.js.map +1 -0
  35. package/dist/core/tokens.d.ts +11 -5
  36. package/dist/core/tokens.d.ts.map +1 -1
  37. package/dist/core/tokens.js +14 -7
  38. package/dist/core/tokens.js.map +1 -1
  39. package/dist/core.d.ts +2 -1
  40. package/dist/core.d.ts.map +1 -1
  41. package/dist/core.js +2 -1
  42. package/dist/core.js.map +1 -1
  43. package/dist/http/headers.d.ts +9 -17
  44. package/dist/http/headers.d.ts.map +1 -1
  45. package/dist/http/headers.js +10 -38
  46. package/dist/http/headers.js.map +1 -1
  47. package/dist/lhar/composition.d.ts.map +1 -1
  48. package/dist/lhar/composition.js +40 -39
  49. package/dist/lhar/composition.js.map +1 -1
  50. package/dist/lhar/export.js +1 -1
  51. package/dist/lhar/export.js.map +1 -1
  52. package/dist/proxy/config.d.ts.map +1 -1
  53. package/dist/proxy/config.js +13 -0
  54. package/dist/proxy/config.js.map +1 -1
  55. package/dist/proxy/server.js +22 -0
  56. package/dist/proxy/server.js.map +1 -1
  57. package/dist/schemas.d.ts +14 -0
  58. package/dist/schemas.d.ts.map +1 -1
  59. package/dist/schemas.js +8 -0
  60. package/dist/schemas.js.map +1 -1
  61. package/dist/server/api.d.ts.map +1 -1
  62. package/dist/server/api.js.map +1 -1
  63. package/dist/server/projection.d.ts.map +1 -1
  64. package/dist/server/projection.js +1 -0
  65. package/dist/server/projection.js.map +1 -1
  66. package/dist/server/store.d.ts.map +1 -1
  67. package/dist/server/store.js +97 -18
  68. package/dist/server/store.js.map +1 -1
  69. package/dist/server/webui.js +1 -1
  70. package/dist/server/webui.js.map +1 -1
  71. package/dist/types.d.ts +13 -1
  72. package/dist/types.d.ts.map +1 -1
  73. package/dist/version.generated.d.ts +1 -1
  74. package/dist/version.generated.js +1 -1
  75. package/mitm_addon.py +19 -10
  76. package/package.json +6 -2
  77. package/ui/dist/assets/index-C2HhFk_P.js +52 -0
  78. package/ui/dist/assets/index-xYrXQJL_.css +1 -0
  79. package/ui/dist/index.html +2 -2
  80. package/ui/dist/assets/index-CC_AtJBy.css +0 -1
  81. package/ui/dist/assets/index-If9FfL3y.js +0 -36
@@ -1,36 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/cpp-BRuaLJcg.js","assets/c-BIGW1oBm.js","assets/sql-BLtJtn59.js","assets/ruby-CkRbH_-r.js","assets/graphql-ChdNCCLP.js","assets/typescript-BPQ3VLAy.js","assets/jsx-g9-lgVsj.js","assets/tsx-COt5Ahok.js","assets/shellscript-Yzrsuije.js","assets/yaml-Buea-lGh.js","assets/php-Dhbhpdrm.js","assets/json-Cp-IABpG.js"])))=>i.map(i=>d[i]);
2
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(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"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(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 s(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();/**
3
- * @vue/shared v3.5.28
4
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
5
- * @license MIT
6
- **/function bi(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const We={},Bn=[],jt=()=>{},yl=()=>!1,lo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),wi=e=>e.startsWith("onUpdate:"),st=Object.assign,ki=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},yc=Object.prototype.hasOwnProperty,je=(e,t)=>yc.call(e,t),Ee=Array.isArray,Hn=e=>Ps(e)==="[object Map]",_l=e=>Ps(e)==="[object Set]",Ji=e=>Ps(e)==="[object Date]",Le=e=>typeof e=="function",Xe=e=>typeof e=="string",Rt=e=>typeof e=="symbol",Ue=e=>e!==null&&typeof e=="object",bl=e=>(Ue(e)||Le(e))&&Le(e.then)&&Le(e.catch),wl=Object.prototype.toString,Ps=e=>wl.call(e),_c=e=>Ps(e).slice(8,-1),kl=e=>Ps(e)==="[object Object]",ao=e=>Xe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ss=bi(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),co=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},bc=/-\w/g,Ct=co(e=>e.replace(bc,t=>t.slice(1).toUpperCase())),wc=/\B([A-Z])/g,wn=co(e=>e.replace(wc,"-$1").toLowerCase()),uo=co(e=>e.charAt(0).toUpperCase()+e.slice(1)),Eo=co(e=>e?`on${uo(e)}`:""),gn=(e,t)=>!Object.is(e,t),Hs=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},$l=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},$i=e=>{const t=parseFloat(e);return isNaN(t)?e:t},kc=e=>{const t=Xe(e)?Number(e):NaN;return isNaN(t)?e:t};let Yi;const fo=()=>Yi||(Yi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Pe(e){if(Ee(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],o=Xe(s)?Sc(s):Pe(s);if(o)for(const i in o)t[i]=o[i]}return t}else if(Xe(e)||Ue(e))return e}const $c=/;(?![^(]*\))/g,xc=/:([^]+)/,Tc=/\/\*[^]*?\*\//g;function Sc(e){const t={};return e.replace(Tc,"").split($c).forEach(n=>{if(n){const s=n.split(xc);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function le(e){let t="";if(Xe(e))t=e;else if(Ee(e))for(let n=0;n<e.length;n++){const s=le(e[n]);s&&(t+=s+" ")}else if(Ue(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Cc(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Xe(t)&&(e.class=le(t)),n&&(e.style=Pe(n)),e}const Mc="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ec=bi(Mc);function xl(e){return!!e||e===""}function Pc(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=xi(e[s],t[s]);return n}function xi(e,t){if(e===t)return!0;let n=Ji(e),s=Ji(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Rt(e),s=Rt(t),n||s)return e===t;if(n=Ee(e),s=Ee(t),n||s)return n&&s?Pc(e,t):!1;if(n=Ue(e),s=Ue(t),n||s){if(!n||!s)return!1;const o=Object.keys(e).length,i=Object.keys(t).length;if(o!==i)return!1;for(const r in e){const l=e.hasOwnProperty(r),c=t.hasOwnProperty(r);if(l&&!c||!l&&c||!xi(e[r],t[r]))return!1}}return String(e)===String(t)}const Tl=e=>!!(e&&e.__v_isRef===!0),M=e=>Xe(e)?e:e==null?"":Ee(e)||Ue(e)&&(e.toString===wl||!Le(e.toString))?Tl(e)?M(e.value):JSON.stringify(e,Sl,2):String(e),Sl=(e,t)=>Tl(t)?Sl(e,t.value):Hn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],i)=>(n[Po(s,i)+" =>"]=o,n),{})}:_l(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Po(n))}:Rt(t)?Po(t):Ue(t)&&!Ee(t)&&!kl(t)?String(t):t,Po=(e,t="")=>{var n;return Rt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
7
- * @vue/reactivity v3.5.28
8
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
9
- * @license MIT
10
- **/let ct;class Cl{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=ct,!t&&ct&&(this.index=(ct.scopes||(ct.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=ct;try{return ct=this,t()}finally{ct=n}}}on(){++this._on===1&&(this.prevScope=ct,ct=this)}off(){this._on>0&&--this._on===0&&(ct=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].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 Ml(e){return new Cl(e)}function El(){return ct}function Ic(e,t=!1){ct&&ct.cleanups.push(e)}let qe;const Io=new WeakSet;class Pl{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,ct&&ct.active&&ct.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Io.has(this)&&(Io.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Al(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Xi(this),Ll(this);const t=qe,n=At;qe=this,At=!0;try{return this.fn()}finally{Ol(this),qe=t,At=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ci(t);this.deps=this.depsTail=void 0,Xi(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Io.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Yo(this)&&this.run()}get dirty(){return Yo(this)}}let Il=0,os,is;function Al(e,t=!1){if(e.flags|=8,t){e.next=is,is=e;return}e.next=os,os=e}function Ti(){Il++}function Si(){if(--Il>0)return;if(is){let t=is;for(is=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;os;){let t=os;for(os=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Ll(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ol(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),Ci(s),Ac(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function Yo(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Rl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Rl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===hs)||(e.globalVersion=hs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Yo(e))))return;e.flags|=2;const t=e.dep,n=qe,s=At;qe=e,At=!0;try{Ll(e);const o=e.fn(e._value);(t.version===0||gn(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{qe=n,At=s,Ol(e),e.flags&=-3}}function Ci(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Ci(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ac(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let At=!0;const Dl=[];function sn(){Dl.push(At),At=!1}function on(){const e=Dl.pop();At=e===void 0?!0:e}function Xi(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=qe;qe=void 0;try{t()}finally{qe=n}}}let hs=0;class Lc{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Mi{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(!qe||!At||qe===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==qe)n=this.activeLink=new Lc(qe,this),qe.deps?(n.prevDep=qe.depsTail,qe.depsTail.nextDep=n,qe.depsTail=n):qe.deps=qe.depsTail=n,Nl(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=qe.depsTail,n.nextDep=void 0,qe.depsTail.nextDep=n,qe.depsTail=n,qe.deps===n&&(qe.deps=s)}return n}trigger(t){this.version++,hs++,this.notify(t)}notify(t){Ti();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Si()}}}function Nl(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Nl(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ws=new WeakMap,Ln=Symbol(""),Xo=Symbol(""),vs=Symbol("");function ut(e,t,n){if(At&&qe){let s=Ws.get(e);s||Ws.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new Mi),o.map=s,o.key=n),o.track()}}function Xt(e,t,n,s,o,i){const r=Ws.get(e);if(!r){hs++;return}const l=c=>{c&&c.trigger()};if(Ti(),t==="clear")r.forEach(l);else{const c=Ee(e),p=c&&ao(n);if(c&&n==="length"){const f=Number(s);r.forEach((v,g)=>{(g==="length"||g===vs||!Rt(g)&&g>=f)&&l(v)})}else switch((n!==void 0||r.has(void 0))&&l(r.get(n)),p&&l(r.get(vs)),t){case"add":c?p&&l(r.get("length")):(l(r.get(Ln)),Hn(e)&&l(r.get(Xo)));break;case"delete":c||(l(r.get(Ln)),Hn(e)&&l(r.get(Xo)));break;case"set":Hn(e)&&l(r.get(Ln));break}}Si()}function Oc(e,t){const n=Ws.get(e);return n&&n.get(t)}function Dn(e){const t=ze(e);return t===e?t:(ut(t,"iterate",vs),wt(e)?t:t.map(Dt))}function po(e){return ut(e=ze(e),"iterate",vs),e}function hn(e,t){return rn(e)?Kn(tn(e)?Dt(t):t):Dt(t)}const Rc={__proto__:null,[Symbol.iterator](){return Ao(this,Symbol.iterator,e=>hn(this,e))},concat(...e){return Dn(this).concat(...e.map(t=>Ee(t)?Dn(t):t))},entries(){return Ao(this,"entries",e=>(e[1]=hn(this,e[1]),e))},every(e,t){return qt(this,"every",e,t,void 0,arguments)},filter(e,t){return qt(this,"filter",e,t,n=>n.map(s=>hn(this,s)),arguments)},find(e,t){return qt(this,"find",e,t,n=>hn(this,n),arguments)},findIndex(e,t){return qt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return qt(this,"findLast",e,t,n=>hn(this,n),arguments)},findLastIndex(e,t){return qt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return qt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Lo(this,"includes",e)},indexOf(...e){return Lo(this,"indexOf",e)},join(e){return Dn(this).join(e)},lastIndexOf(...e){return Lo(this,"lastIndexOf",e)},map(e,t){return qt(this,"map",e,t,void 0,arguments)},pop(){return Jn(this,"pop")},push(...e){return Jn(this,"push",e)},reduce(e,...t){return Zi(this,"reduce",e,t)},reduceRight(e,...t){return Zi(this,"reduceRight",e,t)},shift(){return Jn(this,"shift")},some(e,t){return qt(this,"some",e,t,void 0,arguments)},splice(...e){return Jn(this,"splice",e)},toReversed(){return Dn(this).toReversed()},toSorted(e){return Dn(this).toSorted(e)},toSpliced(...e){return Dn(this).toSpliced(...e)},unshift(...e){return Jn(this,"unshift",e)},values(){return Ao(this,"values",e=>hn(this,e))}};function Ao(e,t,n){const s=po(e),o=s[t]();return s!==e&&!wt(e)&&(o._next=o.next,o.next=()=>{const i=o._next();return i.done||(i.value=n(i.value)),i}),o}const Dc=Array.prototype;function qt(e,t,n,s,o,i){const r=po(e),l=r!==e&&!wt(e),c=r[t];if(c!==Dc[t]){const v=c.apply(e,i);return l?Dt(v):v}let p=n;r!==e&&(l?p=function(v,g){return n.call(this,hn(e,v),g,e)}:n.length>2&&(p=function(v,g){return n.call(this,v,g,e)}));const f=c.call(r,p,s);return l&&o?o(f):f}function Zi(e,t,n,s){const o=po(e);let i=n;return o!==e&&(wt(e)?n.length>3&&(i=function(r,l,c){return n.call(this,r,l,c,e)}):i=function(r,l,c){return n.call(this,r,hn(e,l),c,e)}),o[t](i,...s)}function Lo(e,t,n){const s=ze(e);ut(s,"iterate",vs);const o=s[t](...n);return(o===-1||o===!1)&&ho(n[0])?(n[0]=ze(n[0]),s[t](...n)):o}function Jn(e,t,n=[]){sn(),Ti();const s=ze(e)[t].apply(e,n);return Si(),on(),s}const Nc=bi("__proto__,__v_isRef,__isVue"),Fl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Rt));function Fc(e){Rt(e)||(e=String(e));const t=ze(this);return ut(t,"has",e),t.hasOwnProperty(e)}class zl{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(o?i?Gc:Vl:i?jl:Hl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const r=Ee(t);if(!o){let c;if(r&&(c=Rc[n]))return c;if(n==="hasOwnProperty")return Fc}const l=Reflect.get(t,n,Ze(t)?t:s);if((Rt(n)?Fl.has(n):Nc(n))||(o||ut(t,"get",n),i))return l;if(Ze(l)){const c=r&&ao(n)?l:l.value;return o&&Ue(c)?Qo(c):c}return Ue(l)?o?Qo(l):Is(l):l}}class Bl extends zl{constructor(t=!1){super(!1,t)}set(t,n,s,o){let i=t[n];const r=Ee(t)&&ao(n);if(!this._isShallow){const p=rn(i);if(!wt(s)&&!rn(s)&&(i=ze(i),s=ze(s)),!r&&Ze(i)&&!Ze(s))return p||(i.value=s),!0}const l=r?Number(n)<t.length:je(t,n),c=Reflect.set(t,n,s,Ze(t)?t:o);return t===ze(o)&&(l?gn(s,i)&&Xt(t,"set",n,s):Xt(t,"add",n,s)),c}deleteProperty(t,n){const s=je(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&s&&Xt(t,"delete",n,void 0),o}has(t,n){const s=Reflect.has(t,n);return(!Rt(n)||!Fl.has(n))&&ut(t,"has",n),s}ownKeys(t){return ut(t,"iterate",Ee(t)?"length":Ln),Reflect.ownKeys(t)}}class zc extends zl{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Bc=new Bl,Hc=new zc,jc=new Bl(!0);const Zo=e=>e,Ds=e=>Reflect.getPrototypeOf(e);function Vc(e,t,n){return function(...s){const o=this.__v_raw,i=ze(o),r=Hn(i),l=e==="entries"||e===Symbol.iterator&&r,c=e==="keys"&&r,p=o[e](...s),f=n?Zo:t?Kn:Dt;return!t&&ut(i,"iterate",c?Xo:Ln),st(Object.create(p),{next(){const{value:v,done:g}=p.next();return g?{value:v,done:g}:{value:l?[f(v[0]),f(v[1])]:f(v),done:g}}})}}function Ns(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Uc(e,t){const n={get(o){const i=this.__v_raw,r=ze(i),l=ze(o);e||(gn(o,l)&&ut(r,"get",o),ut(r,"get",l));const{has:c}=Ds(r),p=t?Zo:e?Kn:Dt;if(c.call(r,o))return p(i.get(o));if(c.call(r,l))return p(i.get(l));i!==r&&i.get(o)},get size(){const o=this.__v_raw;return!e&&ut(ze(o),"iterate",Ln),o.size},has(o){const i=this.__v_raw,r=ze(i),l=ze(o);return e||(gn(o,l)&&ut(r,"has",o),ut(r,"has",l)),o===l?i.has(o):i.has(o)||i.has(l)},forEach(o,i){const r=this,l=r.__v_raw,c=ze(l),p=t?Zo:e?Kn:Dt;return!e&&ut(c,"iterate",Ln),l.forEach((f,v)=>o.call(i,p(f),p(v),r))}};return st(n,e?{add:Ns("add"),set:Ns("set"),delete:Ns("delete"),clear:Ns("clear")}:{add(o){!t&&!wt(o)&&!rn(o)&&(o=ze(o));const i=ze(this);return Ds(i).has.call(i,o)||(i.add(o),Xt(i,"add",o,o)),this},set(o,i){!t&&!wt(i)&&!rn(i)&&(i=ze(i));const r=ze(this),{has:l,get:c}=Ds(r);let p=l.call(r,o);p||(o=ze(o),p=l.call(r,o));const f=c.call(r,o);return r.set(o,i),p?gn(i,f)&&Xt(r,"set",o,i):Xt(r,"add",o,i),this},delete(o){const i=ze(this),{has:r,get:l}=Ds(i);let c=r.call(i,o);c||(o=ze(o),c=r.call(i,o)),l&&l.call(i,o);const p=i.delete(o);return c&&Xt(i,"delete",o,void 0),p},clear(){const o=ze(this),i=o.size!==0,r=o.clear();return i&&Xt(o,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Vc(o,e,t)}),n}function Ei(e,t){const n=Uc(e,t);return(s,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(je(n,o)&&o in s?n:s,o,i)}const Kc={get:Ei(!1,!1)},Wc={get:Ei(!1,!0)},qc={get:Ei(!0,!1)};const Hl=new WeakMap,jl=new WeakMap,Vl=new WeakMap,Gc=new WeakMap;function Jc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Yc(e){return e.__v_skip||!Object.isExtensible(e)?0:Jc(_c(e))}function Is(e){return rn(e)?e:Pi(e,!1,Bc,Kc,Hl)}function Xc(e){return Pi(e,!1,jc,Wc,jl)}function Qo(e){return Pi(e,!0,Hc,qc,Vl)}function Pi(e,t,n,s,o){if(!Ue(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=Yc(e);if(i===0)return e;const r=o.get(e);if(r)return r;const l=new Proxy(e,i===2?s:n);return o.set(e,l),l}function tn(e){return rn(e)?tn(e.__v_raw):!!(e&&e.__v_isReactive)}function rn(e){return!!(e&&e.__v_isReadonly)}function wt(e){return!!(e&&e.__v_isShallow)}function ho(e){return e?!!e.__v_raw:!1}function ze(e){const t=e&&e.__v_raw;return t?ze(t):e}function Ii(e){return!je(e,"__v_skip")&&Object.isExtensible(e)&&$l(e,"__v_skip",!0),e}const Dt=e=>Ue(e)?Is(e):e,Kn=e=>Ue(e)?Qo(e):e;function Ze(e){return e?e.__v_isRef===!0:!1}function he(e){return Zc(e,!1)}function Zc(e,t){return Ze(e)?e:new Qc(e,t)}class Qc{constructor(t,n){this.dep=new Mi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ze(t),this._value=n?t:Dt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||wt(t)||rn(t);t=s?t:ze(t),gn(t,n)&&(this._rawValue=t,this._value=s?t:Dt(t),this.dep.trigger())}}function J(e){return Ze(e)?e.value:e}const eu={get:(e,t,n)=>t==="__v_raw"?e:J(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Ze(o)&&!Ze(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function Ul(e){return tn(e)?e:new Proxy(e,eu)}function tu(e){const t=Ee(e)?new Array(e.length):{};for(const n in e)t[n]=su(e,n);return t}class nu{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._raw=ze(t);let o=!0,i=t;if(!Ee(t)||!ao(String(n)))do o=!ho(i)||wt(i);while(o&&(i=i.__v_raw));this._shallow=o}get value(){let t=this._object[this._key];return this._shallow&&(t=J(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Ze(this._raw[this._key])){const n=this._object[this._key];if(Ze(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Oc(this._raw,this._key)}}function su(e,t,n){return new nu(e,t,n)}class ou{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Mi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=hs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&qe!==this)return Al(this,!0),!0}get value(){const t=this.dep.track();return Rl(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function iu(e,t,n=!1){let s,o;return Le(e)?s=e:(s=e.get,o=e.set),new ou(s,o,n)}const Fs={},qs=new WeakMap;let Pn;function ru(e,t=!1,n=Pn){if(n){let s=qs.get(n);s||qs.set(n,s=[]),s.push(e)}}function lu(e,t,n=We){const{immediate:s,deep:o,once:i,scheduler:r,augmentJob:l,call:c}=n,p=L=>o?L:wt(L)||o===!1||o===0?Zt(L,1):Zt(L);let f,v,g,w,P=!1,$=!1;if(Ze(e)?(v=()=>e.value,P=wt(e)):tn(e)?(v=()=>p(e),P=!0):Ee(e)?($=!0,P=e.some(L=>tn(L)||wt(L)),v=()=>e.map(L=>{if(Ze(L))return L.value;if(tn(L))return p(L);if(Le(L))return c?c(L,2):L()})):Le(e)?t?v=c?()=>c(e,2):e:v=()=>{if(g){sn();try{g()}finally{on()}}const L=Pn;Pn=f;try{return c?c(e,3,[w]):e(w)}finally{Pn=L}}:v=jt,t&&o){const L=v,K=o===!0?1/0:o;v=()=>Zt(L(),K)}const _=El(),T=()=>{f.stop(),_&&_.active&&ki(_.effects,f)};if(i&&t){const L=t;t=(...K)=>{L(...K),T()}}let F=$?new Array(e.length).fill(Fs):Fs;const j=L=>{if(!(!(f.flags&1)||!f.dirty&&!L))if(t){const K=f.run();if(o||P||($?K.some((O,de)=>gn(O,F[de])):gn(K,F))){g&&g();const O=Pn;Pn=f;try{const de=[K,F===Fs?void 0:$&&F[0]===Fs?[]:F,w];F=K,c?c(t,3,de):t(...de)}finally{Pn=O}}}else f.run()};return l&&l(j),f=new Pl(v),f.scheduler=r?()=>r(j,!1):j,w=L=>ru(L,!1,f),g=f.onStop=()=>{const L=qs.get(f);if(L){if(c)c(L,4);else for(const K of L)K();qs.delete(f)}},t?s?j(!0):F=f.run():r?r(j.bind(null,!0),!0):f.run(),T.pause=f.pause.bind(f),T.resume=f.resume.bind(f),T.stop=T,T}function Zt(e,t=1/0,n){if(t<=0||!Ue(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ze(e))Zt(e.value,t,n);else if(Ee(e))for(let s=0;s<e.length;s++)Zt(e[s],t,n);else if(_l(e)||Hn(e))e.forEach(s=>{Zt(s,t,n)});else if(kl(e)){for(const s in e)Zt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Zt(e[s],t,n)}return e}/**
11
- * @vue/runtime-core v3.5.28
12
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
13
- * @license MIT
14
- **/function As(e,t,n,s){try{return s?e(...s):e()}catch(o){vo(o,t,n)}}function Nt(e,t,n,s){if(Le(e)){const o=As(e,t,n,s);return o&&bl(o)&&o.catch(i=>{vo(i,t,n)}),o}if(Ee(e)){const o=[];for(let i=0;i<e.length;i++)o.push(Nt(e[i],t,n,s));return o}}function vo(e,t,n,s=!0){const o=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||We;if(t){let l=t.parent;const c=t.proxy,p=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const f=l.ec;if(f){for(let v=0;v<f.length;v++)if(f[v](e,c,p)===!1)return}l=l.parent}if(i){sn(),As(i,null,10,[e,c,p]),on();return}}au(e,n,o,s,r)}function au(e,t,n,s=!0,o=!1){if(o)throw e;console.error(e)}const ht=[];let zt=-1;const jn=[];let vn=null,Fn=0;const Kl=Promise.resolve();let Gs=null;function Je(e){const t=Gs||Kl;return e?t.then(this?e.bind(this):e):t}function cu(e){let t=zt+1,n=ht.length;for(;t<n;){const s=t+n>>>1,o=ht[s],i=gs(o);i<e||i===e&&o.flags&2?t=s+1:n=s}return t}function Ai(e){if(!(e.flags&1)){const t=gs(e),n=ht[ht.length-1];!n||!(e.flags&2)&&t>=gs(n)?ht.push(e):ht.splice(cu(t),0,e),e.flags|=1,Wl()}}function Wl(){Gs||(Gs=Kl.then(Gl))}function uu(e){Ee(e)?jn.push(...e):vn&&e.id===-1?vn.splice(Fn+1,0,e):e.flags&1||(jn.push(e),e.flags|=1),Wl()}function Qi(e,t,n=zt+1){for(;n<ht.length;n++){const s=ht[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;ht.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function ql(e){if(jn.length){const t=[...new Set(jn)].sort((n,s)=>gs(n)-gs(s));if(jn.length=0,vn){vn.push(...t);return}for(vn=t,Fn=0;Fn<vn.length;Fn++){const n=vn[Fn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}vn=null,Fn=0}}const gs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Gl(e){try{for(zt=0;zt<ht.length;zt++){const t=ht[zt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),As(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;zt<ht.length;zt++){const t=ht[zt];t&&(t.flags&=-2)}zt=-1,ht.length=0,ql(),Gs=null,(ht.length||jn.length)&&Gl()}}let lt=null,go=null;function Js(e){const t=lt;return lt=e,go=e&&e.type.__scopeId||null,t}function du(e){go=e}function fu(){go=null}const pu=e=>it;function it(e,t=lt,n){if(!t||e._n)return e;const s=(...o)=>{s._d&&Zs(-1);const i=Js(t);let r;try{r=e(...o)}finally{Js(i),s._d&&Zs(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function Ve(e,t){if(lt===null)return e;const n=ko(lt),s=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[i,r,l,c=We]=t[o];i&&(Le(i)&&(i={mounted:i,updated:i}),i.deep&&Zt(r),s.push({dir:i,instance:n,value:r,oldValue:void 0,arg:l,modifiers:c}))}return e}function Tn(e,t,n,s){const o=e.dirs,i=t&&t.dirs;for(let r=0;r<o.length;r++){const l=o[r];i&&(l.oldValue=i[r].value);let c=l.dir[s];c&&(sn(),Nt(c,n,8,[e.el,l,e,t]),on())}}function un(e,t){if(ft){let n=ft.provides;const s=ft.parent&&ft.parent.provides;s===n&&(n=ft.provides=Object.create(s)),n[e]=t}}function Et(e,t,n=!1){const s=Os();if(s||On){let o=On?On._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&Le(t)?t.call(s&&s.proxy):t}}function hu(){return!!(Os()||On)}const vu=Symbol.for("v-scx"),gu=()=>Et(vu);function mu(e,t){return Li(e,null,t)}function Ge(e,t,n){return Li(e,t,n)}function Li(e,t,n=We){const{immediate:s,deep:o,flush:i,once:r}=n,l=st({},n),c=t&&s||!t&&i!=="post";let p;if(ks){if(i==="sync"){const w=gu();p=w.__watcherHandles||(w.__watcherHandles=[])}else if(!c){const w=()=>{};return w.stop=jt,w.resume=jt,w.pause=jt,w}}const f=ft;l.call=(w,P,$)=>Nt(w,f,P,$);let v=!1;i==="post"?l.scheduler=w=>{gt(w,f&&f.suspense)}:i!=="sync"&&(v=!0,l.scheduler=(w,P)=>{P?w():Ai(w)}),l.augmentJob=w=>{t&&(w.flags|=4),v&&(w.flags|=2,f&&(w.id=f.uid,w.i=f))};const g=lu(e,t,l);return ks&&(p?p.push(g):c&&g()),g}function yu(e,t,n){const s=this.proxy,o=Xe(e)?e.includes(".")?Jl(s,e):()=>s[e]:e.bind(s,s);let i;Le(t)?i=t:(i=t.handler,n=t);const r=Rs(this),l=Li(o,i.bind(s),n);return r(),l}function Jl(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;o<n.length&&s;o++)s=s[n[o]];return s}}const _u=Symbol("_vte"),Yl=e=>e.__isTeleport,Bt=Symbol("_leaveCb"),Yn=Symbol("_enterCb");function bu(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return kn(()=>{e.isMounted=!0}),_o(()=>{e.isUnmounting=!0}),e}const xt=[Function,Array],Xl={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:xt,onEnter:xt,onAfterEnter:xt,onEnterCancelled:xt,onBeforeLeave:xt,onLeave:xt,onAfterLeave:xt,onLeaveCancelled:xt,onBeforeAppear:xt,onAppear:xt,onAfterAppear:xt,onAppearCancelled:xt},Zl=e=>{const t=e.subTree;return t.component?Zl(t.component):t},wu={name:"BaseTransition",props:Xl,setup(e,{slots:t}){const n=Os(),s=bu();return()=>{const o=t.default&&ta(t.default(),!0);if(!o||!o.length)return;const i=Ql(o),r=ze(e),{mode:l}=r;if(s.isLeaving)return Oo(i);const c=er(i);if(!c)return Oo(i);let p=ei(c,r,s,n,v=>p=v);c.type!==dt&&ms(c,p);let f=n.subTree&&er(n.subTree);if(f&&f.type!==dt&&!An(f,c)&&Zl(n).type!==dt){let v=ei(f,r,s,n);if(ms(f,v),l==="out-in"&&c.type!==dt)return s.isLeaving=!0,v.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete v.afterLeave,f=void 0},Oo(i);l==="in-out"&&c.type!==dt?v.delayLeave=(g,w,P)=>{const $=ea(s,f);$[String(f.key)]=f,g[Bt]=()=>{w(),g[Bt]=void 0,delete p.delayedLeave,f=void 0},p.delayedLeave=()=>{P(),delete p.delayedLeave,f=void 0}}:f=void 0}else f&&(f=void 0);return i}}};function Ql(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==dt){t=n;break}}return t}const ku=wu;function ea(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function ei(e,t,n,s,o){const{appear:i,mode:r,persisted:l=!1,onBeforeEnter:c,onEnter:p,onAfterEnter:f,onEnterCancelled:v,onBeforeLeave:g,onLeave:w,onAfterLeave:P,onLeaveCancelled:$,onBeforeAppear:_,onAppear:T,onAfterAppear:F,onAppearCancelled:j}=t,L=String(e.key),K=ea(n,e),O=(W,re)=>{W&&Nt(W,s,9,re)},de=(W,re)=>{const ge=re[1];O(W,re),Ee(W)?W.every(B=>B.length<=1)&&ge():W.length<=1&&ge()},ae={mode:r,persisted:l,beforeEnter(W){let re=c;if(!n.isMounted)if(i)re=_||c;else return;W[Bt]&&W[Bt](!0);const ge=K[L];ge&&An(e,ge)&&ge.el[Bt]&&ge.el[Bt](),O(re,[W])},enter(W){let re=p,ge=f,B=v;if(!n.isMounted)if(i)re=T||p,ge=F||f,B=j||v;else return;let ce=!1;W[Yn]=C=>{ce||(ce=!0,C?O(B,[W]):O(ge,[W]),ae.delayedLeave&&ae.delayedLeave(),W[Yn]=void 0)};const Z=W[Yn].bind(null,!1);re?de(re,[W,Z]):Z()},leave(W,re){const ge=String(e.key);if(W[Yn]&&W[Yn](!0),n.isUnmounting)return re();O(g,[W]);let B=!1;W[Bt]=Z=>{B||(B=!0,re(),Z?O($,[W]):O(P,[W]),W[Bt]=void 0,K[ge]===e&&delete K[ge])};const ce=W[Bt].bind(null,!1);K[ge]=e,w?de(w,[W,ce]):ce()},clone(W){const re=ei(W,t,n,s,o);return o&&o(re),re}};return ae}function Oo(e){if(mo(e))return e=_n(e),e.children=null,e}function er(e){if(!mo(e))return Yl(e.type)&&e.children?Ql(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Le(n.default))return n.default()}}function ms(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ms(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ta(e,t=!1,n){let s=[],o=0;for(let i=0;i<e.length;i++){let r=e[i];const l=n==null?r.key:String(n)+String(r.key!=null?r.key:i);r.type===ve?(r.patchFlag&128&&o++,s=s.concat(ta(r.children,t,l))):(t||r.type!==dt)&&s.push(l!=null?_n(r,{key:l}):r)}if(o>1)for(let i=0;i<s.length;i++)s[i].patchFlag=-2;return s}function et(e,t){return Le(e)?st({name:e.name},t,{setup:e}):e}function na(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function tr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Ys=new WeakMap;function rs(e,t,n,s,o=!1){if(Ee(e)){e.forEach(($,_)=>rs($,t&&(Ee(t)?t[_]:t),n,s,o));return}if(Vn(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&rs(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?ko(s.component):s.el,r=o?null:i,{i:l,r:c}=e,p=t&&t.r,f=l.refs===We?l.refs={}:l.refs,v=l.setupState,g=ze(v),w=v===We?yl:$=>tr(f,$)?!1:je(g,$),P=($,_)=>!(_&&tr(f,_));if(p!=null&&p!==c){if(nr(t),Xe(p))f[p]=null,w(p)&&(v[p]=null);else if(Ze(p)){const $=t;P(p,$.k)&&(p.value=null),$.k&&(f[$.k]=null)}}if(Le(c))As(c,l,12,[r,f]);else{const $=Xe(c),_=Ze(c);if($||_){const T=()=>{if(e.f){const F=$?w(c)?v[c]:f[c]:P()||!e.k?c.value:f[e.k];if(o)Ee(F)&&ki(F,i);else if(Ee(F))F.includes(i)||F.push(i);else if($)f[c]=[i],w(c)&&(v[c]=f[c]);else{const j=[i];P(c,e.k)&&(c.value=j),e.k&&(f[e.k]=j)}}else $?(f[c]=r,w(c)&&(v[c]=r)):_&&(P(c,e.k)&&(c.value=r),e.k&&(f[e.k]=r))};if(r){const F=()=>{T(),Ys.delete(e)};F.id=-1,Ys.set(e,F),gt(F,n)}else nr(e),T()}}}function nr(e){const t=Ys.get(e);t&&(t.flags|=8,Ys.delete(e))}fo().requestIdleCallback;fo().cancelIdleCallback;const Vn=e=>!!e.type.__asyncLoader,mo=e=>e.type.__isKeepAlive;function $u(e,t){sa(e,"a",t)}function xu(e,t){sa(e,"da",t)}function sa(e,t,n=ft){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(yo(t,s,n),n){let o=n.parent;for(;o&&o.parent;)mo(o.parent.vnode)&&Tu(s,t,n,o),o=o.parent}}function Tu(e,t,n,s){const o=yo(t,e,s,!0);Ls(()=>{ki(s[t],o)},n)}function yo(e,t,n=ft,s=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...r)=>{sn();const l=Rs(n),c=Nt(t,n,e,r);return l(),on(),c});return s?o.unshift(i):o.push(i),i}}const an=e=>(t,n=ft)=>{(!ks||e==="sp")&&yo(e,(...s)=>t(...s),n)},Su=an("bm"),kn=an("m"),Cu=an("bu"),Mu=an("u"),_o=an("bum"),Ls=an("um"),Eu=an("sp"),Pu=an("rtg"),Iu=an("rtc");function Au(e,t=ft){yo("ec",e,t)}const Oi="components",Lu="directives";function ys(e,t){return Ri(Oi,e,!0,t)||e}const oa=Symbol.for("v-ndc");function ia(e){return Xe(e)?Ri(Oi,e,!1)||e:e||oa}function $n(e){return Ri(Lu,e)}function Ri(e,t,n=!0,s=!1){const o=lt||ft;if(o){const i=o.type;if(e===Oi){const l=gd(i,!1);if(l&&(l===t||l===Ct(t)||l===uo(Ct(t))))return i}const r=sr(o[e]||i[e],t)||sr(o.appContext[e],t);return!r&&s?i:r}}function sr(e,t){return e&&(e[t]||e[Ct(t)]||e[uo(Ct(t))])}function Ce(e,t,n,s){let o;const i=n,r=Ee(e);if(r||Xe(e)){const l=r&&tn(e);let c=!1,p=!1;l&&(c=!wt(e),p=rn(e),e=po(e)),o=new Array(e.length);for(let f=0,v=e.length;f<v;f++)o[f]=t(c?p?Kn(Dt(e[f])):Dt(e[f]):e[f],f,void 0,i)}else if(typeof e=="number"){o=new Array(e);for(let l=0;l<e;l++)o[l]=t(l+1,l,void 0,i)}else if(Ue(e))if(e[Symbol.iterator])o=Array.from(e,(l,c)=>t(l,c,void 0,i));else{const l=Object.keys(e);o=new Array(l.length);for(let c=0,p=l.length;c<p;c++){const f=l[c];o[c]=t(e[f],f,c,i)}}else o=[];return o}function _s(e,t,n={},s,o){if(lt.ce||lt.parent&&Vn(lt.parent)&&lt.parent.ce){const p=Object.keys(n).length>0;return t!=="default"&&(n.name=t),m(),mt(ve,null,[Oe("slot",n,s)],p?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),m();const r=i&&ra(i(n)),l=n.key||r&&r.key,c=mt(ve,{key:(l&&!Rt(l)?l:`_${t}`)+(!r&&s?"_fb":"")},r||[],r&&e._===1?64:-2);return c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),i&&i._c&&(i._d=!0),c}function ra(e){return e.some(t=>ws(t)?!(t.type===dt||t.type===ve&&!ra(t.children)):!0)?e:null}const ti=e=>e?Ma(e)?ko(e):ti(e.parent):null,ls=st(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=>ti(e.parent),$root:e=>ti(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>aa(e),$forceUpdate:e=>e.f||(e.f=()=>{Ai(e.update)}),$nextTick:e=>e.n||(e.n=Je.bind(e.proxy)),$watch:e=>yu.bind(e)}),Ro=(e,t)=>e!==We&&!e.__isScriptSetup&&je(e,t),Ou={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:i,accessCache:r,type:l,appContext:c}=e;if(t[0]!=="$"){const g=r[t];if(g!==void 0)switch(g){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(Ro(s,t))return r[t]=1,s[t];if(o!==We&&je(o,t))return r[t]=2,o[t];if(je(i,t))return r[t]=3,i[t];if(n!==We&&je(n,t))return r[t]=4,n[t];ni&&(r[t]=0)}}const p=ls[t];let f,v;if(p)return t==="$attrs"&&ut(e.attrs,"get",""),p(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(n!==We&&je(n,t))return r[t]=4,n[t];if(v=c.config.globalProperties,je(v,t))return v[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:i}=e;return Ro(o,t)?(o[t]=n,!0):s!==We&&je(s,t)?(s[t]=n,!0):je(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:i,type:r}},l){let c;return!!(n[l]||e!==We&&l[0]!=="$"&&je(e,l)||Ro(t,l)||je(i,l)||je(s,l)||je(ls,l)||je(o.config.globalProperties,l)||(c=r.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:je(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ru(){return Du().slots}function Du(e){const t=Os();return t.setupContext||(t.setupContext=Pa(t))}function or(e){return Ee(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let ni=!0;function Nu(e){const t=aa(e),n=e.proxy,s=e.ctx;ni=!1,t.beforeCreate&&ir(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:r,watch:l,provide:c,inject:p,created:f,beforeMount:v,mounted:g,beforeUpdate:w,updated:P,activated:$,deactivated:_,beforeDestroy:T,beforeUnmount:F,destroyed:j,unmounted:L,render:K,renderTracked:O,renderTriggered:de,errorCaptured:ae,serverPrefetch:W,expose:re,inheritAttrs:ge,components:B,directives:ce,filters:Z}=t;if(p&&Fu(p,s,null),r)for(const ne in r){const U=r[ne];Le(U)&&(s[ne]=U.bind(n))}if(o){const ne=o.call(n,n);Ue(ne)&&(e.data=Is(ne))}if(ni=!0,i)for(const ne in i){const U=i[ne],se=Le(U)?U.bind(n,n):Le(U.get)?U.get.bind(n,n):jt,we=!Le(U)&&Le(U.set)?U.set.bind(n):jt,N=A({get:se,set:we});Object.defineProperty(s,ne,{enumerable:!0,configurable:!0,get:()=>N.value,set:S=>N.value=S})}if(l)for(const ne in l)la(l[ne],s,n,ne);if(c){const ne=Le(c)?c.call(n):c;Reflect.ownKeys(ne).forEach(U=>{un(U,ne[U])})}f&&ir(f,e,"c");function X(ne,U){Ee(U)?U.forEach(se=>ne(se.bind(n))):U&&ne(U.bind(n))}if(X(Su,v),X(kn,g),X(Cu,w),X(Mu,P),X($u,$),X(xu,_),X(Au,ae),X(Iu,O),X(Pu,de),X(_o,F),X(Ls,L),X(Eu,W),Ee(re))if(re.length){const ne=e.exposed||(e.exposed={});re.forEach(U=>{Object.defineProperty(ne,U,{get:()=>n[U],set:se=>n[U]=se,enumerable:!0})})}else e.exposed||(e.exposed={});K&&e.render===jt&&(e.render=K),ge!=null&&(e.inheritAttrs=ge),B&&(e.components=B),ce&&(e.directives=ce),W&&na(e)}function Fu(e,t,n=jt){Ee(e)&&(e=si(e));for(const s in e){const o=e[s];let i;Ue(o)?"default"in o?i=Et(o.from||s,o.default,!0):i=Et(o.from||s):i=Et(o),Ze(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:r=>i.value=r}):t[s]=i}}function ir(e,t,n){Nt(Ee(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function la(e,t,n,s){let o=s.includes(".")?Jl(n,s):()=>n[s];if(Xe(e)){const i=t[e];Le(i)&&Ge(o,i)}else if(Le(e))Ge(o,e.bind(n));else if(Ue(e))if(Ee(e))e.forEach(i=>la(i,t,n,s));else{const i=Le(e.handler)?e.handler.bind(n):t[e.handler];Le(i)&&Ge(o,i,e)}}function aa(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:r}}=e.appContext,l=i.get(t);let c;return l?c=l:!o.length&&!n&&!s?c=t:(c={},o.length&&o.forEach(p=>Xs(c,p,r,!0)),Xs(c,t,r)),Ue(t)&&i.set(t,c),c}function Xs(e,t,n,s=!1){const{mixins:o,extends:i}=t;i&&Xs(e,i,n,!0),o&&o.forEach(r=>Xs(e,r,n,!0));for(const r in t)if(!(s&&r==="expose")){const l=zu[r]||n&&n[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const zu={data:rr,props:lr,emits:lr,methods:ns,computed:ns,beforeCreate:pt,created:pt,beforeMount:pt,mounted:pt,beforeUpdate:pt,updated:pt,beforeDestroy:pt,beforeUnmount:pt,destroyed:pt,unmounted:pt,activated:pt,deactivated:pt,errorCaptured:pt,serverPrefetch:pt,components:ns,directives:ns,watch:Hu,provide:rr,inject:Bu};function rr(e,t){return t?e?function(){return st(Le(e)?e.call(this,this):e,Le(t)?t.call(this,this):t)}:t:e}function Bu(e,t){return ns(si(e),si(t))}function si(e){if(Ee(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function pt(e,t){return e?[...new Set([].concat(e,t))]:t}function ns(e,t){return e?st(Object.create(null),e,t):t}function lr(e,t){return e?Ee(e)&&Ee(t)?[...new Set([...e,...t])]:st(Object.create(null),or(e),or(t??{})):t}function Hu(e,t){if(!e)return t;if(!t)return e;const n=st(Object.create(null),e);for(const s in t)n[s]=pt(e[s],t[s]);return n}function ca(){return{app:null,config:{isNativeTag:yl,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 ju=0;function Vu(e,t){return function(s,o=null){Le(s)||(s=st({},s)),o!=null&&!Ue(o)&&(o=null);const i=ca(),r=new WeakSet,l=[];let c=!1;const p=i.app={_uid:ju++,_component:s,_props:o,_container:null,_context:i,_instance:null,version:yd,get config(){return i.config},set config(f){},use(f,...v){return r.has(f)||(f&&Le(f.install)?(r.add(f),f.install(p,...v)):Le(f)&&(r.add(f),f(p,...v))),p},mixin(f){return i.mixins.includes(f)||i.mixins.push(f),p},component(f,v){return v?(i.components[f]=v,p):i.components[f]},directive(f,v){return v?(i.directives[f]=v,p):i.directives[f]},mount(f,v,g){if(!c){const w=p._ceVNode||Oe(s,o);return w.appContext=i,g===!0?g="svg":g===!1&&(g=void 0),e(w,f,g),c=!0,p._container=f,f.__vue_app__=p,ko(w.component)}},onUnmount(f){l.push(f)},unmount(){c&&(Nt(l,p._instance,16),e(null,p._container),delete p._container.__vue_app__)},provide(f,v){return i.provides[f]=v,p},runWithContext(f){const v=On;On=p;try{return f()}finally{On=v}}};return p}}let On=null;const Uu=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ct(t)}Modifiers`]||e[`${wn(t)}Modifiers`];function Ku(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||We;let o=n;const i=t.startsWith("update:"),r=i&&Uu(s,t.slice(7));r&&(r.trim&&(o=n.map(f=>Xe(f)?f.trim():f)),r.number&&(o=n.map($i)));let l,c=s[l=Eo(t)]||s[l=Eo(Ct(t))];!c&&i&&(c=s[l=Eo(wn(t))]),c&&Nt(c,e,6,o);const p=s[l+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Nt(p,e,6,o)}}const Wu=new WeakMap;function ua(e,t,n=!1){const s=n?Wu:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const i=e.emits;let r={},l=!1;if(!Le(e)){const c=p=>{const f=ua(p,t,!0);f&&(l=!0,st(r,f))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(Ue(e)&&s.set(e,null),null):(Ee(i)?i.forEach(c=>r[c]=null):st(r,i),Ue(e)&&s.set(e,r),r)}function bo(e,t){return!e||!lo(t)?!1:(t=t.slice(2).replace(/Once$/,""),je(e,t[0].toLowerCase()+t.slice(1))||je(e,wn(t))||je(e,t))}function ar(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[i],slots:r,attrs:l,emit:c,render:p,renderCache:f,props:v,data:g,setupState:w,ctx:P,inheritAttrs:$}=e,_=Js(e);let T,F;try{if(n.shapeFlag&4){const L=o||s,K=L;T=Ht(p.call(K,L,f,v,w,g,P)),F=l}else{const L=t;T=Ht(L.length>1?L(v,{attrs:l,slots:r,emit:c}):L(v,null)),F=t.props?l:qu(l)}}catch(L){as.length=0,vo(L,e,1),T=Oe(dt)}let j=T;if(F&&$!==!1){const L=Object.keys(F),{shapeFlag:K}=j;L.length&&K&7&&(i&&L.some(wi)&&(F=Gu(F,i)),j=_n(j,F,!1,!0))}return n.dirs&&(j=_n(j,null,!1,!0),j.dirs=j.dirs?j.dirs.concat(n.dirs):n.dirs),n.transition&&ms(j,n.transition),T=j,Js(_),T}const qu=e=>{let t;for(const n in e)(n==="class"||n==="style"||lo(n))&&((t||(t={}))[n]=e[n]);return t},Gu=(e,t)=>{const n={};for(const s in e)(!wi(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Ju(e,t,n){const{props:s,children:o,component:i}=e,{props:r,children:l,patchFlag:c}=t,p=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?cr(s,r,p):!!r;if(c&8){const f=t.dynamicProps;for(let v=0;v<f.length;v++){const g=f[v];if(da(r,s,g)&&!bo(p,g))return!0}}}else return(o||l)&&(!l||!l.$stable)?!0:s===r?!1:s?r?cr(s,r,p):!0:!!r;return!1}function cr(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let o=0;o<s.length;o++){const i=s[o];if(da(t,e,i)&&!bo(n,i))return!0}return!1}function da(e,t,n){const s=e[n],o=t[n];return n==="style"&&Ue(s)&&Ue(o)?!xi(s,o):s!==o}function Yu({vnode:e,parent:t},n){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.el=e.el),s===e)(e=t.vnode).el=n,t=t.parent;else break}}const fa={},pa=()=>Object.create(fa),ha=e=>Object.getPrototypeOf(e)===fa;function Xu(e,t,n,s=!1){const o={},i=pa();e.propsDefaults=Object.create(null),va(e,t,o,i);for(const r in e.propsOptions[0])r in o||(o[r]=void 0);n?e.props=s?o:Xc(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function Zu(e,t,n,s){const{props:o,attrs:i,vnode:{patchFlag:r}}=e,l=ze(o),[c]=e.propsOptions;let p=!1;if((s||r>0)&&!(r&16)){if(r&8){const f=e.vnode.dynamicProps;for(let v=0;v<f.length;v++){let g=f[v];if(bo(e.emitsOptions,g))continue;const w=t[g];if(c)if(je(i,g))w!==i[g]&&(i[g]=w,p=!0);else{const P=Ct(g);o[P]=oi(c,l,P,w,e,!1)}else w!==i[g]&&(i[g]=w,p=!0)}}}else{va(e,t,o,i)&&(p=!0);let f;for(const v in l)(!t||!je(t,v)&&((f=wn(v))===v||!je(t,f)))&&(c?n&&(n[v]!==void 0||n[f]!==void 0)&&(o[v]=oi(c,l,v,void 0,e,!0)):delete o[v]);if(i!==l)for(const v in i)(!t||!je(t,v))&&(delete i[v],p=!0)}p&&Xt(e.attrs,"set","")}function va(e,t,n,s){const[o,i]=e.propsOptions;let r=!1,l;if(t)for(let c in t){if(ss(c))continue;const p=t[c];let f;o&&je(o,f=Ct(c))?!i||!i.includes(f)?n[f]=p:(l||(l={}))[f]=p:bo(e.emitsOptions,c)||(!(c in s)||p!==s[c])&&(s[c]=p,r=!0)}if(i){const c=ze(n),p=l||We;for(let f=0;f<i.length;f++){const v=i[f];n[v]=oi(o,c,v,p[v],e,!je(p,v))}}return r}function oi(e,t,n,s,o,i){const r=e[n];if(r!=null){const l=je(r,"default");if(l&&s===void 0){const c=r.default;if(r.type!==Function&&!r.skipFactory&&Le(c)){const{propsDefaults:p}=o;if(n in p)s=p[n];else{const f=Rs(o);s=p[n]=c.call(null,t),f()}}else s=c;o.ce&&o.ce._setProp(n,s)}r[0]&&(i&&!l?s=!1:r[1]&&(s===""||s===wn(n))&&(s=!0))}return s}const Qu=new WeakMap;function ga(e,t,n=!1){const s=n?Qu:t.propsCache,o=s.get(e);if(o)return o;const i=e.props,r={},l=[];let c=!1;if(!Le(e)){const f=v=>{c=!0;const[g,w]=ga(v,t,!0);st(r,g),w&&l.push(...w)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!i&&!c)return Ue(e)&&s.set(e,Bn),Bn;if(Ee(i))for(let f=0;f<i.length;f++){const v=Ct(i[f]);ur(v)&&(r[v]=We)}else if(i)for(const f in i){const v=Ct(f);if(ur(v)){const g=i[f],w=r[v]=Ee(g)||Le(g)?{type:g}:st({},g),P=w.type;let $=!1,_=!0;if(Ee(P))for(let T=0;T<P.length;++T){const F=P[T],j=Le(F)&&F.name;if(j==="Boolean"){$=!0;break}else j==="String"&&(_=!1)}else $=Le(P)&&P.name==="Boolean";w[0]=$,w[1]=_,($||je(w,"default"))&&l.push(v)}}const p=[r,l];return Ue(e)&&s.set(e,p),p}function ur(e){return e[0]!=="$"&&!ss(e)}const Di=e=>e==="_"||e==="_ctx"||e==="$stable",Ni=e=>Ee(e)?e.map(Ht):[Ht(e)],ed=(e,t,n)=>{if(t._n)return t;const s=it((...o)=>Ni(t(...o)),n);return s._c=!1,s},ma=(e,t,n)=>{const s=e._ctx;for(const o in e){if(Di(o))continue;const i=e[o];if(Le(i))t[o]=ed(o,i,s);else if(i!=null){const r=Ni(i);t[o]=()=>r}}},ya=(e,t)=>{const n=Ni(t);e.slots.default=()=>n},_a=(e,t,n)=>{for(const s in t)(n||!Di(s))&&(e[s]=t[s])},td=(e,t,n)=>{const s=e.slots=pa();if(e.vnode.shapeFlag&32){const o=t._;o?(_a(s,t,n),n&&$l(s,"_",o,!0)):ma(t,s)}else t&&ya(e,t)},nd=(e,t,n)=>{const{vnode:s,slots:o}=e;let i=!0,r=We;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:_a(o,t,n):(i=!t.$stable,ma(t,o)),r=t}else t&&(ya(e,t),r={default:1});if(i)for(const l in o)!Di(l)&&r[l]==null&&delete o[l]},gt=ld;function sd(e){return od(e)}function od(e,t){const n=fo();n.__VUE__=!0;const{insert:s,remove:o,patchProp:i,createElement:r,createText:l,createComment:c,setText:p,setElementText:f,parentNode:v,nextSibling:g,setScopeId:w=jt,insertStaticContent:P}=e,$=(a,d,E,q=null,G=null,z=null,fe=void 0,pe=null,ue=!!d.dynamicChildren)=>{if(a===d)return;a&&!An(a,d)&&(q=D(a),S(a,G,z,!0),a=null),d.patchFlag===-2&&(ue=!1,d.dynamicChildren=null);const{type:ee,ref:$e,shapeFlag:me}=d;switch(ee){case wo:_(a,d,E,q);break;case dt:T(a,d,E,q);break;case js:a==null&&F(d,E,q,fe);break;case ve:B(a,d,E,q,G,z,fe,pe,ue);break;default:me&1?K(a,d,E,q,G,z,fe,pe,ue):me&6?ce(a,d,E,q,G,z,fe,pe,ue):(me&64||me&128)&&ee.process(a,d,E,q,G,z,fe,pe,ue,b)}$e!=null&&G?rs($e,a&&a.ref,z,d||a,!d):$e==null&&a&&a.ref!=null&&rs(a.ref,null,z,a,!0)},_=(a,d,E,q)=>{if(a==null)s(d.el=l(d.children),E,q);else{const G=d.el=a.el;d.children!==a.children&&p(G,d.children)}},T=(a,d,E,q)=>{a==null?s(d.el=c(d.children||""),E,q):d.el=a.el},F=(a,d,E,q)=>{[a.el,a.anchor]=P(a.children,d,E,q,a.el,a.anchor)},j=({el:a,anchor:d},E,q)=>{let G;for(;a&&a!==d;)G=g(a),s(a,E,q),a=G;s(d,E,q)},L=({el:a,anchor:d})=>{let E;for(;a&&a!==d;)E=g(a),o(a),a=E;o(d)},K=(a,d,E,q,G,z,fe,pe,ue)=>{if(d.type==="svg"?fe="svg":d.type==="math"&&(fe="mathml"),a==null)O(d,E,q,G,z,fe,pe,ue);else{const ee=a.el&&a.el._isVueCE?a.el:null;try{ee&&ee._beginPatch(),W(a,d,G,z,fe,pe,ue)}finally{ee&&ee._endPatch()}}},O=(a,d,E,q,G,z,fe,pe)=>{let ue,ee;const{props:$e,shapeFlag:me,transition:Se,dirs:Me}=a;if(ue=a.el=r(a.type,z,$e&&$e.is,$e),me&8?f(ue,a.children):me&16&&ae(a.children,ue,null,q,G,Do(a,z),fe,pe),Me&&Tn(a,null,q,"created"),de(ue,a,a.scopeId,fe,q),$e){for(const He in $e)He!=="value"&&!ss(He)&&i(ue,He,null,$e[He],z,q);"value"in $e&&i(ue,"value",null,$e.value,z),(ee=$e.onVnodeBeforeMount)&&Ft(ee,q,a)}Me&&Tn(a,null,q,"beforeMount");const Re=id(G,Se);Re&&Se.beforeEnter(ue),s(ue,d,E),((ee=$e&&$e.onVnodeMounted)||Re||Me)&&gt(()=>{ee&&Ft(ee,q,a),Re&&Se.enter(ue),Me&&Tn(a,null,q,"mounted")},G)},de=(a,d,E,q,G)=>{if(E&&w(a,E),q)for(let z=0;z<q.length;z++)w(a,q[z]);if(G){let z=G.subTree;if(d===z||$a(z.type)&&(z.ssContent===d||z.ssFallback===d)){const fe=G.vnode;de(a,fe,fe.scopeId,fe.slotScopeIds,G.parent)}}},ae=(a,d,E,q,G,z,fe,pe,ue=0)=>{for(let ee=ue;ee<a.length;ee++){const $e=a[ee]=pe?Yt(a[ee]):Ht(a[ee]);$(null,$e,d,E,q,G,z,fe,pe)}},W=(a,d,E,q,G,z,fe)=>{const pe=d.el=a.el;let{patchFlag:ue,dynamicChildren:ee,dirs:$e}=d;ue|=a.patchFlag&16;const me=a.props||We,Se=d.props||We;let Me;if(E&&Sn(E,!1),(Me=Se.onVnodeBeforeUpdate)&&Ft(Me,E,d,a),$e&&Tn(d,a,E,"beforeUpdate"),E&&Sn(E,!0),(me.innerHTML&&Se.innerHTML==null||me.textContent&&Se.textContent==null)&&f(pe,""),ee?re(a.dynamicChildren,ee,pe,E,q,Do(d,G),z):fe||U(a,d,pe,null,E,q,Do(d,G),z,!1),ue>0){if(ue&16)ge(pe,me,Se,E,G);else if(ue&2&&me.class!==Se.class&&i(pe,"class",null,Se.class,G),ue&4&&i(pe,"style",me.style,Se.style,G),ue&8){const Re=d.dynamicProps;for(let He=0;He<Re.length;He++){const De=Re[He],tt=me[De],ot=Se[De];(ot!==tt||De==="value")&&i(pe,De,tt,ot,G,E)}}ue&1&&a.children!==d.children&&f(pe,d.children)}else!fe&&ee==null&&ge(pe,me,Se,E,G);((Me=Se.onVnodeUpdated)||$e)&&gt(()=>{Me&&Ft(Me,E,d,a),$e&&Tn(d,a,E,"updated")},q)},re=(a,d,E,q,G,z,fe)=>{for(let pe=0;pe<d.length;pe++){const ue=a[pe],ee=d[pe],$e=ue.el&&(ue.type===ve||!An(ue,ee)||ue.shapeFlag&198)?v(ue.el):E;$(ue,ee,$e,null,q,G,z,fe,!0)}},ge=(a,d,E,q,G)=>{if(d!==E){if(d!==We)for(const z in d)!ss(z)&&!(z in E)&&i(a,z,d[z],null,G,q);for(const z in E){if(ss(z))continue;const fe=E[z],pe=d[z];fe!==pe&&z!=="value"&&i(a,z,pe,fe,G,q)}"value"in E&&i(a,"value",d.value,E.value,G)}},B=(a,d,E,q,G,z,fe,pe,ue)=>{const ee=d.el=a?a.el:l(""),$e=d.anchor=a?a.anchor:l("");let{patchFlag:me,dynamicChildren:Se,slotScopeIds:Me}=d;Me&&(pe=pe?pe.concat(Me):Me),a==null?(s(ee,E,q),s($e,E,q),ae(d.children||[],E,$e,G,z,fe,pe,ue)):me>0&&me&64&&Se&&a.dynamicChildren&&a.dynamicChildren.length===Se.length?(re(a.dynamicChildren,Se,E,G,z,fe,pe),(d.key!=null||G&&d===G.subTree)&&ba(a,d,!0)):U(a,d,E,$e,G,z,fe,pe,ue)},ce=(a,d,E,q,G,z,fe,pe,ue)=>{d.slotScopeIds=pe,a==null?d.shapeFlag&512?G.ctx.activate(d,E,q,fe,ue):Z(d,E,q,G,z,fe,ue):C(a,d,ue)},Z=(a,d,E,q,G,z,fe)=>{const pe=a.component=fd(a,q,G);if(mo(a)&&(pe.ctx.renderer=b),pd(pe,!1,fe),pe.asyncDep){if(G&&G.registerDep(pe,X,fe),!a.el){const ue=pe.subTree=Oe(dt);T(null,ue,d,E),a.placeholder=ue.el}}else X(pe,a,d,E,G,z,fe)},C=(a,d,E)=>{const q=d.component=a.component;if(Ju(a,d,E))if(q.asyncDep&&!q.asyncResolved){ne(q,d,E);return}else q.next=d,q.update();else d.el=a.el,q.vnode=d},X=(a,d,E,q,G,z,fe)=>{const pe=()=>{if(a.isMounted){let{next:me,bu:Se,u:Me,parent:Re,vnode:He}=a;{const V=wa(a);if(V){me&&(me.el=He.el,ne(a,me,fe)),V.asyncDep.then(()=>{gt(()=>{a.isUnmounted||ee()},G)});return}}let De=me,tt;Sn(a,!1),me?(me.el=He.el,ne(a,me,fe)):me=He,Se&&Hs(Se),(tt=me.props&&me.props.onVnodeBeforeUpdate)&&Ft(tt,Re,me,He),Sn(a,!0);const ot=ar(a),vt=a.subTree;a.subTree=ot,$(vt,ot,v(vt.el),D(vt),a,G,z),me.el=ot.el,De===null&&Yu(a,ot.el),Me&&gt(Me,G),(tt=me.props&&me.props.onVnodeUpdated)&&gt(()=>Ft(tt,Re,me,He),G)}else{let me;const{el:Se,props:Me}=d,{bm:Re,m:He,parent:De,root:tt,type:ot}=a,vt=Vn(d);Sn(a,!1),Re&&Hs(Re),!vt&&(me=Me&&Me.onVnodeBeforeMount)&&Ft(me,De,d),Sn(a,!0);{tt.ce&&tt.ce._hasShadowRoot()&&tt.ce._injectChildStyle(ot);const V=a.subTree=ar(a);$(null,V,E,q,a,G,z),d.el=V.el}if(He&&gt(He,G),!vt&&(me=Me&&Me.onVnodeMounted)){const V=d;gt(()=>Ft(me,De,V),G)}(d.shapeFlag&256||De&&Vn(De.vnode)&&De.vnode.shapeFlag&256)&&a.a&&gt(a.a,G),a.isMounted=!0,d=E=q=null}};a.scope.on();const ue=a.effect=new Pl(pe);a.scope.off();const ee=a.update=ue.run.bind(ue),$e=a.job=ue.runIfDirty.bind(ue);$e.i=a,$e.id=a.uid,ue.scheduler=()=>Ai($e),Sn(a,!0),ee()},ne=(a,d,E)=>{d.component=a;const q=a.vnode.props;a.vnode=d,a.next=null,Zu(a,d.props,q,E),nd(a,d.children,E),sn(),Qi(a),on()},U=(a,d,E,q,G,z,fe,pe,ue=!1)=>{const ee=a&&a.children,$e=a?a.shapeFlag:0,me=d.children,{patchFlag:Se,shapeFlag:Me}=d;if(Se>0){if(Se&128){we(ee,me,E,q,G,z,fe,pe,ue);return}else if(Se&256){se(ee,me,E,q,G,z,fe,pe,ue);return}}Me&8?($e&16&&x(ee,G,z),me!==ee&&f(E,me)):$e&16?Me&16?we(ee,me,E,q,G,z,fe,pe,ue):x(ee,G,z,!0):($e&8&&f(E,""),Me&16&&ae(me,E,q,G,z,fe,pe,ue))},se=(a,d,E,q,G,z,fe,pe,ue)=>{a=a||Bn,d=d||Bn;const ee=a.length,$e=d.length,me=Math.min(ee,$e);let Se;for(Se=0;Se<me;Se++){const Me=d[Se]=ue?Yt(d[Se]):Ht(d[Se]);$(a[Se],Me,E,null,G,z,fe,pe,ue)}ee>$e?x(a,G,z,!0,!1,me):ae(d,E,q,G,z,fe,pe,ue,me)},we=(a,d,E,q,G,z,fe,pe,ue)=>{let ee=0;const $e=d.length;let me=a.length-1,Se=$e-1;for(;ee<=me&&ee<=Se;){const Me=a[ee],Re=d[ee]=ue?Yt(d[ee]):Ht(d[ee]);if(An(Me,Re))$(Me,Re,E,null,G,z,fe,pe,ue);else break;ee++}for(;ee<=me&&ee<=Se;){const Me=a[me],Re=d[Se]=ue?Yt(d[Se]):Ht(d[Se]);if(An(Me,Re))$(Me,Re,E,null,G,z,fe,pe,ue);else break;me--,Se--}if(ee>me){if(ee<=Se){const Me=Se+1,Re=Me<$e?d[Me].el:q;for(;ee<=Se;)$(null,d[ee]=ue?Yt(d[ee]):Ht(d[ee]),E,Re,G,z,fe,pe,ue),ee++}}else if(ee>Se)for(;ee<=me;)S(a[ee],G,z,!0),ee++;else{const Me=ee,Re=ee,He=new Map;for(ee=Re;ee<=Se;ee++){const te=d[ee]=ue?Yt(d[ee]):Ht(d[ee]);te.key!=null&&He.set(te.key,ee)}let De,tt=0;const ot=Se-Re+1;let vt=!1,V=0;const H=new Array(ot);for(ee=0;ee<ot;ee++)H[ee]=0;for(ee=Me;ee<=me;ee++){const te=a[ee];if(tt>=ot){S(te,G,z,!0);continue}let be;if(te.key!=null)be=He.get(te.key);else for(De=Re;De<=Se;De++)if(H[De-Re]===0&&An(te,d[De])){be=De;break}be===void 0?S(te,G,z,!0):(H[be-Re]=ee+1,be>=V?V=be:vt=!0,$(te,d[be],E,null,G,z,fe,pe,ue),tt++)}const ye=vt?rd(H):Bn;for(De=ye.length-1,ee=ot-1;ee>=0;ee--){const te=Re+ee,be=d[te],Ie=d[te+1],Ae=te+1<$e?Ie.el||ka(Ie):q;H[ee]===0?$(null,be,E,Ae,G,z,fe,pe,ue):vt&&(De<0||ee!==ye[De]?N(be,E,Ae,2):De--)}}},N=(a,d,E,q,G=null)=>{const{el:z,type:fe,transition:pe,children:ue,shapeFlag:ee}=a;if(ee&6){N(a.component.subTree,d,E,q);return}if(ee&128){a.suspense.move(d,E,q);return}if(ee&64){fe.move(a,d,E,b);return}if(fe===ve){s(z,d,E);for(let me=0;me<ue.length;me++)N(ue[me],d,E,q);s(a.anchor,d,E);return}if(fe===js){j(a,d,E);return}if(q!==2&&ee&1&&pe)if(q===0)pe.beforeEnter(z),s(z,d,E),gt(()=>pe.enter(z),G);else{const{leave:me,delayLeave:Se,afterLeave:Me}=pe,Re=()=>{a.ctx.isUnmounted?o(z):s(z,d,E)},He=()=>{z._isLeaving&&z[Bt](!0),me(z,()=>{Re(),Me&&Me()})};Se?Se(z,Re,He):He()}else s(z,d,E)},S=(a,d,E,q=!1,G=!1)=>{const{type:z,props:fe,ref:pe,children:ue,dynamicChildren:ee,shapeFlag:$e,patchFlag:me,dirs:Se,cacheIndex:Me}=a;if(me===-2&&(G=!1),pe!=null&&(sn(),rs(pe,null,E,a,!0),on()),Me!=null&&(d.renderCache[Me]=void 0),$e&256){d.ctx.deactivate(a);return}const Re=$e&1&&Se,He=!Vn(a);let De;if(He&&(De=fe&&fe.onVnodeBeforeUnmount)&&Ft(De,d,a),$e&6)ie(a.component,E,q);else{if($e&128){a.suspense.unmount(E,q);return}Re&&Tn(a,null,d,"beforeUnmount"),$e&64?a.type.remove(a,d,E,b,q):ee&&!ee.hasOnce&&(z!==ve||me>0&&me&64)?x(ee,d,E,!1,!0):(z===ve&&me&384||!G&&$e&16)&&x(ue,d,E),q&&I(a)}(He&&(De=fe&&fe.onVnodeUnmounted)||Re)&&gt(()=>{De&&Ft(De,d,a),Re&&Tn(a,null,d,"unmounted")},E)},I=a=>{const{type:d,el:E,anchor:q,transition:G}=a;if(d===ve){Q(E,q);return}if(d===js){L(a);return}const z=()=>{o(E),G&&!G.persisted&&G.afterLeave&&G.afterLeave()};if(a.shapeFlag&1&&G&&!G.persisted){const{leave:fe,delayLeave:pe}=G,ue=()=>fe(E,z);pe?pe(a.el,z,ue):ue()}else z()},Q=(a,d)=>{let E;for(;a!==d;)E=g(a),o(a),a=E;o(d)},ie=(a,d,E)=>{const{bum:q,scope:G,job:z,subTree:fe,um:pe,m:ue,a:ee}=a;dr(ue),dr(ee),q&&Hs(q),G.stop(),z&&(z.flags|=8,S(fe,a,d,E)),pe&&gt(pe,d),gt(()=>{a.isUnmounted=!0},d)},x=(a,d,E,q=!1,G=!1,z=0)=>{for(let fe=z;fe<a.length;fe++)S(a[fe],d,E,q,G)},D=a=>{if(a.shapeFlag&6)return D(a.component.subTree);if(a.shapeFlag&128)return a.suspense.next();const d=g(a.anchor||a.el),E=d&&d[_u];return E?g(E):d};let Y=!1;const k=(a,d,E)=>{let q;a==null?d._vnode&&(S(d._vnode,null,null,!0),q=d._vnode.component):$(d._vnode||null,a,d,null,null,null,E),d._vnode=a,Y||(Y=!0,Qi(q),ql(),Y=!1)},b={p:$,um:S,m:N,r:I,mt:Z,mc:ae,pc:U,pbc:re,n:D,o:e};return{render:k,hydrate:void 0,createApp:Vu(k)}}function Do({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Sn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function id(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ba(e,t,n=!1){const s=e.children,o=t.children;if(Ee(s)&&Ee(o))for(let i=0;i<s.length;i++){const r=s[i];let l=o[i];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=o[i]=Yt(o[i]),l.el=r.el),!n&&l.patchFlag!==-2&&ba(r,l)),l.type===wo&&(l.patchFlag===-1&&(l=o[i]=Yt(l)),l.el=r.el),l.type===dt&&!l.el&&(l.el=r.el)}}function rd(e){const t=e.slice(),n=[0];let s,o,i,r,l;const c=e.length;for(s=0;s<c;s++){const p=e[s];if(p!==0){if(o=n[n.length-1],e[o]<p){t[s]=o,n.push(s);continue}for(i=0,r=n.length-1;i<r;)l=i+r>>1,e[n[l]]<p?i=l+1:r=l;p<e[n[i]]&&(i>0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,r=n[i-1];i-- >0;)n[i]=r,r=t[r];return n}function wa(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:wa(t)}function dr(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function ka(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?ka(t.subTree):null}const $a=e=>e.__isSuspense;function ld(e,t){t&&t.pendingBranch?Ee(e)?t.effects.push(...e):t.effects.push(e):uu(e)}const ve=Symbol.for("v-fgt"),wo=Symbol.for("v-txt"),dt=Symbol.for("v-cmt"),js=Symbol.for("v-stc"),as=[];let bt=null;function m(e=!1){as.push(bt=e?null:[])}function ad(){as.pop(),bt=as[as.length-1]||null}let bs=1;function Zs(e,t=!1){bs+=e,e<0&&bt&&t&&(bt.hasOnce=!0)}function xa(e){return e.dynamicChildren=bs>0?bt||Bn:null,ad(),bs>0&&bt&&bt.push(e),e}function y(e,t,n,s,o,i){return xa(u(e,t,n,s,o,i,!0))}function mt(e,t,n,s,o){return xa(Oe(e,t,n,s,o,!0))}function ws(e){return e?e.__v_isVNode===!0:!1}function An(e,t){return e.type===t.type&&e.key===t.key}const Ta=({key:e})=>e??null,Vs=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Xe(e)||Ze(e)||Le(e)?{i:lt,r:e,k:t,f:!!n}:e:null);function u(e,t=null,n=null,s=0,o=null,i=e===ve?0:1,r=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ta(t),ref:t&&Vs(t),scopeId:go,slotScopeIds:null,children:n,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:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:lt};return l?(Fi(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=Xe(n)?8:16),bs>0&&!r&&bt&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&bt.push(c),c}const Oe=cd;function cd(e,t=null,n=null,s=0,o=null,i=!1){if((!e||e===oa)&&(e=dt),ws(e)){const l=_n(e,t,!0);return n&&Fi(l,n),bs>0&&!i&&bt&&(l.shapeFlag&6?bt[bt.indexOf(e)]=l:bt.push(l)),l.patchFlag=-2,l}if(md(e)&&(e=e.__vccOpts),t){t=Sa(t);let{class:l,style:c}=t;l&&!Xe(l)&&(t.class=le(l)),Ue(c)&&(ho(c)&&!Ee(c)&&(c=st({},c)),t.style=Pe(c))}const r=Xe(e)?1:$a(e)?128:Yl(e)?64:Ue(e)?4:Le(e)?2:0;return u(e,t,n,s,o,r,i,!0)}function Sa(e){return e?ho(e)||ha(e)?st({},e):e:null}function _n(e,t,n=!1,s=!1){const{props:o,ref:i,patchFlag:r,children:l,transition:c}=e,p=t?zi(o||{},t):o,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&Ta(p),ref:t&&t.ref?n&&i?Ee(i)?i.concat(Vs(t)):[i,Vs(t)]:Vs(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!==ve?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&_n(e.ssContent),ssFallback:e.ssFallback&&_n(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&ms(f,c.clone(f)),f}function xe(e=" ",t=0){return Oe(wo,null,e,t)}function Ca(e,t){const n=Oe(js,null,e);return n.staticCount=t,n}function oe(e="",t=!1){return t?(m(),mt(dt,null,e)):Oe(dt,null,e)}function Ht(e){return e==null||typeof e=="boolean"?Oe(dt):Ee(e)?Oe(ve,null,e.slice()):ws(e)?Yt(e):Oe(wo,null,String(e))}function Yt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:_n(e)}function Fi(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Ee(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),Fi(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!ha(t)?t._ctx=lt:o===3&&lt&&(lt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Le(t)?(t={default:t,_ctx:lt},n=32):(t=String(t),s&64?(n=16,t=[xe(t)]):n=8);e.children=t,e.shapeFlag|=n}function zi(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const o in s)if(o==="class")t.class!==s.class&&(t.class=le([t.class,s.class]));else if(o==="style")t.style=Pe([t.style,s.style]);else if(lo(o)){const i=t[o],r=s[o];r&&i!==r&&!(Ee(i)&&i.includes(r))&&(t[o]=i?[].concat(i,r):r)}else o!==""&&(t[o]=s[o])}return t}function Ft(e,t,n,s=null){Nt(e,t,7,[n,s])}const ud=ca();let dd=0;function fd(e,t,n){const s=e.type,o=(t?t.appContext:e.appContext)||ud,i={uid:dd++,vnode:e,type:s,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Cl(!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:ga(s,o),emitsOptions:ua(s,o),emit:null,emitted:null,propsDefaults:We,inheritAttrs:s.inheritAttrs,ctx:We,data:We,props:We,attrs:We,slots:We,refs:We,setupState:We,setupContext:null,suspense:n,suspenseId:n?n.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=Ku.bind(null,i),e.ce&&e.ce(i),i}let ft=null;const Os=()=>ft||lt;let Qs,ii;{const e=fo(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),i=>{o.length>1?o.forEach(r=>r(i)):o[0](i)}};Qs=t("__VUE_INSTANCE_SETTERS__",n=>ft=n),ii=t("__VUE_SSR_SETTERS__",n=>ks=n)}const Rs=e=>{const t=ft;return Qs(e),e.scope.on(),()=>{e.scope.off(),Qs(t)}},fr=()=>{ft&&ft.scope.off(),Qs(null)};function Ma(e){return e.vnode.shapeFlag&4}let ks=!1;function pd(e,t=!1,n=!1){t&&ii(t);const{props:s,children:o}=e.vnode,i=Ma(e);Xu(e,s,i,t),td(e,o,n||t);const r=i?hd(e,t):void 0;return t&&ii(!1),r}function hd(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ou);const{setup:s}=n;if(s){sn();const o=e.setupContext=s.length>1?Pa(e):null,i=Rs(e),r=As(s,e,0,[e.props,o]),l=bl(r);if(on(),i(),(l||e.sp)&&!Vn(e)&&na(e),l){if(r.then(fr,fr),t)return r.then(c=>{pr(e,c)}).catch(c=>{vo(c,e,0)});e.asyncDep=r}else pr(e,r)}else Ea(e)}function pr(e,t,n){Le(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ue(t)&&(e.setupState=Ul(t)),Ea(e)}function Ea(e,t,n){const s=e.type;e.render||(e.render=s.render||jt);{const o=Rs(e);sn();try{Nu(e)}finally{on(),o()}}}const vd={get(e,t){return ut(e,"get",""),e[t]}};function Pa(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,vd),slots:e.slots,emit:e.emit,expose:t}}function ko(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ul(Ii(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ls)return ls[n](e)},has(t,n){return n in t||n in ls}})):e.proxy}function gd(e,t=!0){return Le(e)?e.displayName||e.name:e.name||t&&e.__name}function md(e){return Le(e)&&"__vccOpts"in e}const A=(e,t)=>iu(e,t,ks);function Bi(e,t,n){try{Zs(-1);const s=arguments.length;return s===2?Ue(t)&&!Ee(t)?ws(t)?Oe(e,null,[t]):Oe(e,t):Oe(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&ws(n)&&(n=[n]),Oe(e,t,n))}finally{Zs(1)}}const yd="3.5.28";/**
15
- * @vue/runtime-dom v3.5.28
16
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
17
- * @license MIT
18
- **/let ri;const hr=typeof window<"u"&&window.trustedTypes;if(hr)try{ri=hr.createPolicy("vue",{createHTML:e=>e})}catch{}const Ia=ri?e=>ri.createHTML(e):e=>e,_d="http://www.w3.org/2000/svg",bd="http://www.w3.org/1998/Math/MathML",Jt=typeof document<"u"?document:null,vr=Jt&&Jt.createElement("template"),wd={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o=t==="svg"?Jt.createElementNS(_d,e):t==="mathml"?Jt.createElementNS(bd,e):n?Jt.createElement(e,{is:n}):Jt.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>Jt.createTextNode(e),createComment:e=>Jt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Jt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,i){const r=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===i||!(o=o.nextSibling)););else{vr.innerHTML=Ia(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=vr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},cn="transition",Xn="animation",$s=Symbol("_vtc"),Aa={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},kd=st({},Xl,Aa),$d=e=>(e.displayName="Transition",e.props=kd,e),Qt=$d((e,{slots:t})=>Bi(ku,xd(e),t)),Cn=(e,t=[])=>{Ee(e)?e.forEach(n=>n(...t)):e&&e(...t)},gr=e=>e?Ee(e)?e.some(t=>t.length>1):e.length>1:!1;function xd(e){const t={};for(const B in e)B in Aa||(t[B]=e[B]);if(e.css===!1)return t;const{name:n="v",type:s,duration:o,enterFromClass:i=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:p=r,appearToClass:f=l,leaveFromClass:v=`${n}-leave-from`,leaveActiveClass:g=`${n}-leave-active`,leaveToClass:w=`${n}-leave-to`}=e,P=Td(o),$=P&&P[0],_=P&&P[1],{onBeforeEnter:T,onEnter:F,onEnterCancelled:j,onLeave:L,onLeaveCancelled:K,onBeforeAppear:O=T,onAppear:de=F,onAppearCancelled:ae=j}=t,W=(B,ce,Z,C)=>{B._enterCancelled=C,Mn(B,ce?f:l),Mn(B,ce?p:r),Z&&Z()},re=(B,ce)=>{B._isLeaving=!1,Mn(B,v),Mn(B,w),Mn(B,g),ce&&ce()},ge=B=>(ce,Z)=>{const C=B?de:F,X=()=>W(ce,B,Z);Cn(C,[ce,X]),mr(()=>{Mn(ce,B?c:i),Gt(ce,B?f:l),gr(C)||yr(ce,s,$,X)})};return st(t,{onBeforeEnter(B){Cn(T,[B]),Gt(B,i),Gt(B,r)},onBeforeAppear(B){Cn(O,[B]),Gt(B,c),Gt(B,p)},onEnter:ge(!1),onAppear:ge(!0),onLeave(B,ce){B._isLeaving=!0;const Z=()=>re(B,ce);Gt(B,v),B._enterCancelled?(Gt(B,g),wr(B)):(wr(B),Gt(B,g)),mr(()=>{B._isLeaving&&(Mn(B,v),Gt(B,w),gr(L)||yr(B,s,_,Z))}),Cn(L,[B,Z])},onEnterCancelled(B){W(B,!1,void 0,!0),Cn(j,[B])},onAppearCancelled(B){W(B,!0,void 0,!0),Cn(ae,[B])},onLeaveCancelled(B){re(B),Cn(K,[B])}})}function Td(e){if(e==null)return null;if(Ue(e))return[No(e.enter),No(e.leave)];{const t=No(e);return[t,t]}}function No(e){return kc(e)}function Gt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[$s]||(e[$s]=new Set)).add(t)}function Mn(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[$s];n&&(n.delete(t),n.size||(e[$s]=void 0))}function mr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Sd=0;function yr(e,t,n,s){const o=e._endId=++Sd,i=()=>{o===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:r,timeout:l,propCount:c}=Cd(e,t);if(!r)return s();const p=r+"end";let f=0;const v=()=>{e.removeEventListener(p,g),i()},g=w=>{w.target===e&&++f>=c&&v()};setTimeout(()=>{f<c&&v()},l+1),e.addEventListener(p,g)}function Cd(e,t){const n=window.getComputedStyle(e),s=P=>(n[P]||"").split(", "),o=s(`${cn}Delay`),i=s(`${cn}Duration`),r=_r(o,i),l=s(`${Xn}Delay`),c=s(`${Xn}Duration`),p=_r(l,c);let f=null,v=0,g=0;t===cn?r>0&&(f=cn,v=r,g=i.length):t===Xn?p>0&&(f=Xn,v=p,g=c.length):(v=Math.max(r,p),f=v>0?r>p?cn:Xn:null,g=f?f===cn?i.length:c.length:0);const w=f===cn&&/\b(?:transform|all)(?:,|$)/.test(s(`${cn}Property`).toString());return{type:f,timeout:v,propCount:g,hasTransform:w}}function _r(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>br(n)+br(e[s])))}function br(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function wr(e){return(e?e.ownerDocument:document).body.offsetHeight}function Md(e,t,n){const s=e[$s];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const eo=Symbol("_vod"),La=Symbol("_vsh"),Ed={name:"show",beforeMount(e,{value:t},{transition:n}){e[eo]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Zn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),Zn(e,!0),s.enter(e)):s.leave(e,()=>{Zn(e,!1)}):Zn(e,t))},beforeUnmount(e,{value:t}){Zn(e,t)}};function Zn(e,t){e.style.display=t?e[eo]:"none",e[La]=!t}const Pd=Symbol(""),Id=/(?:^|;)\s*display\s*:/;function Ad(e,t,n){const s=e.style,o=Xe(n);let i=!1;if(n&&!o){if(t)if(Xe(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();n[l]==null&&Us(s,l,"")}else for(const r in t)n[r]==null&&Us(s,r,"");for(const r in n)r==="display"&&(i=!0),Us(s,r,n[r])}else if(o){if(t!==n){const r=s[Pd];r&&(n+=";"+r),s.cssText=n,i=Id.test(n)}}else t&&e.removeAttribute("style");eo in e&&(e[eo]=i?s.display:"",e[La]&&(s.display="none"))}const kr=/\s*!important$/;function Us(e,t,n){if(Ee(n))n.forEach(s=>Us(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Ld(e,t);kr.test(n)?e.setProperty(wn(s),n.replace(kr,""),"important"):e[s]=n}}const $r=["Webkit","Moz","ms"],Fo={};function Ld(e,t){const n=Fo[t];if(n)return n;let s=Ct(t);if(s!=="filter"&&s in e)return Fo[t]=s;s=uo(s);for(let o=0;o<$r.length;o++){const i=$r[o]+s;if(i in e)return Fo[t]=i}return t}const xr="http://www.w3.org/1999/xlink";function Tr(e,t,n,s,o,i=Ec(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(xr,t.slice(6,t.length)):e.setAttributeNS(xr,t,n):n==null||i&&!xl(n)?e.removeAttribute(t):e.setAttribute(t,i?"":Rt(n)?String(n):n)}function Sr(e,t,n,s,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Ia(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const l=i==="OPTION"?e.getAttribute("value")||"":e.value,c=n==null?e.type==="checkbox"?"on":"":String(n);(l!==c||!("_value"in e))&&(e.value=c),n==null&&e.removeAttribute(t),e._value=n;return}let r=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=xl(n):n==null&&l==="string"?(n="",r=!0):l==="number"&&(n=0,r=!0)}try{e[t]=n}catch{}r&&e.removeAttribute(o||t)}function zn(e,t,n,s){e.addEventListener(t,n,s)}function Od(e,t,n,s){e.removeEventListener(t,n,s)}const Cr=Symbol("_vei");function Rd(e,t,n,s,o=null){const i=e[Cr]||(e[Cr]={}),r=i[t];if(s&&r)r.value=s;else{const[l,c]=Dd(t);if(s){const p=i[t]=zd(s,o);zn(e,l,p,c)}else r&&(Od(e,l,r,c),i[t]=void 0)}}const Mr=/(?:Once|Passive|Capture)$/;function Dd(e){let t;if(Mr.test(e)){t={};let s;for(;s=e.match(Mr);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):wn(e.slice(2)),t]}let zo=0;const Nd=Promise.resolve(),Fd=()=>zo||(Nd.then(()=>zo=0),zo=Date.now());function zd(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Nt(Bd(s,n.value),t,5,[s])};return n.value=e,n.attached=Fd(),n}function Bd(e,t){if(Ee(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>o=>!o._stopped&&s&&s(o))}else return t}const Er=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Hd=(e,t,n,s,o,i)=>{const r=o==="svg";t==="class"?Md(e,s,r):t==="style"?Ad(e,n,s):lo(t)?wi(t)||Rd(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):jd(e,t,s,r))?(Sr(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Tr(e,t,s,r,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Xe(s))?Sr(e,Ct(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Tr(e,t,s,r))};function jd(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Er(t)&&Le(n));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 Er(t)&&Xe(n)?!1:t in e}const Pr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ee(t)?n=>Hs(t,n):t};function Vd(e){e.target.composing=!0}function Ir(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Bo=Symbol("_assign");function Ar(e,t,n){return t&&(e=e.trim()),n&&(e=$i(e)),e}const Ud={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e[Bo]=Pr(o);const i=s||o.props&&o.props.type==="number";zn(e,t?"change":"input",r=>{r.target.composing||e[Bo](Ar(e.value,n,i))}),(n||i)&&zn(e,"change",()=>{e.value=Ar(e.value,n,i)}),t||(zn(e,"compositionstart",Vd),zn(e,"compositionend",Ir),zn(e,"change",Ir))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:i}},r){if(e[Bo]=Pr(r),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?$i(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===c)||(e.value=c))}},Kd=["ctrl","shift","alt","meta"],Wd={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Kd.some(n=>e[`${n}Key`]&&!t.includes(n))},St=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((o,...i)=>{for(let r=0;r<t.length;r++){const l=Wd[t[r]];if(l&&l(o,t))return}return e(o,...i)}))},qd={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Oa=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(o=>{if(!("key"in o))return;const i=wn(o.key);if(t.some(r=>r===i||qd[r]===i))return e(o)}))},Gd=st({patchProp:Hd},wd);let Lr;function Jd(){return Lr||(Lr=sd(Gd))}const Ra=((...e)=>{const t=Jd().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=Xd(s);if(!o)return;const i=t._component;!Le(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const r=n(o,!1,Yd(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),r},t});function Yd(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Xd(e){return Xe(e)?document.querySelector(e):e}/*!
19
- * pinia v2.3.1
20
- * (c) 2025 Eduardo San Martin Morote
21
- * @license MIT
22
- */let Da;const $o=e=>Da=e,Na=Symbol();function li(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var cs;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(cs||(cs={}));function Zd(){const e=Ml(!0),t=e.run(()=>he({}));let n=[],s=[];const o=Ii({install(i){$o(o),o._a=i,i.provide(Na,o),i.config.globalProperties.$pinia=o,s.forEach(r=>n.push(r)),s=[]},use(i){return this._a?n.push(i):s.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o}const Fa=()=>{};function Or(e,t,n,s=Fa){e.push(t);const o=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),s())};return!n&&El()&&Ic(o),o}function Nn(e,...t){e.slice().forEach(n=>{n(...t)})}const Qd=e=>e(),Rr=Symbol(),Ho=Symbol();function ai(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],o=e[n];li(o)&&li(s)&&e.hasOwnProperty(n)&&!Ze(s)&&!tn(s)?e[n]=ai(o,s):e[n]=s}return e}const ef=Symbol();function tf(e){return!li(e)||!e.hasOwnProperty(ef)}const{assign:dn}=Object;function nf(e){return!!(Ze(e)&&e.effect)}function sf(e,t,n,s){const{state:o,actions:i,getters:r}=t,l=n.state.value[e];let c;function p(){l||(n.state.value[e]=o?o():{});const f=tu(n.state.value[e]);return dn(f,i,Object.keys(r||{}).reduce((v,g)=>(v[g]=Ii(A(()=>{$o(n);const w=n._s.get(e);return r[g].call(w,w)})),v),{}))}return c=za(e,p,t,n,s,!0),c}function za(e,t,n={},s,o,i){let r;const l=dn({actions:{}},n),c={deep:!0};let p,f,v=[],g=[],w;const P=s.state.value[e];!i&&!P&&(s.state.value[e]={});let $;function _(ae){let W;p=f=!1,typeof ae=="function"?(ae(s.state.value[e]),W={type:cs.patchFunction,storeId:e,events:w}):(ai(s.state.value[e],ae),W={type:cs.patchObject,payload:ae,storeId:e,events:w});const re=$=Symbol();Je().then(()=>{$===re&&(p=!0)}),f=!0,Nn(v,W,s.state.value[e])}const T=i?function(){const{state:W}=n,re=W?W():{};this.$patch(ge=>{dn(ge,re)})}:Fa;function F(){r.stop(),v=[],g=[],s._s.delete(e)}const j=(ae,W="")=>{if(Rr in ae)return ae[Ho]=W,ae;const re=function(){$o(s);const ge=Array.from(arguments),B=[],ce=[];function Z(ne){B.push(ne)}function C(ne){ce.push(ne)}Nn(g,{args:ge,name:re[Ho],store:K,after:Z,onError:C});let X;try{X=ae.apply(this&&this.$id===e?this:K,ge)}catch(ne){throw Nn(ce,ne),ne}return X instanceof Promise?X.then(ne=>(Nn(B,ne),ne)).catch(ne=>(Nn(ce,ne),Promise.reject(ne))):(Nn(B,X),X)};return re[Rr]=!0,re[Ho]=W,re},L={_p:s,$id:e,$onAction:Or.bind(null,g),$patch:_,$reset:T,$subscribe(ae,W={}){const re=Or(v,ae,W.detached,()=>ge()),ge=r.run(()=>Ge(()=>s.state.value[e],B=>{(W.flush==="sync"?f:p)&&ae({storeId:e,type:cs.direct,events:w},B)},dn({},c,W)));return re},$dispose:F},K=Is(L);s._s.set(e,K);const de=(s._a&&s._a.runWithContext||Qd)(()=>s._e.run(()=>(r=Ml()).run(()=>t({action:j}))));for(const ae in de){const W=de[ae];if(Ze(W)&&!nf(W)||tn(W))i||(P&&tf(W)&&(Ze(W)?W.value=P[ae]:ai(W,P[ae])),s.state.value[e][ae]=W);else if(typeof W=="function"){const re=j(W,ae);de[ae]=re,l.actions[ae]=W}}return dn(K,de),dn(ze(K),de),Object.defineProperty(K,"$state",{get:()=>s.state.value[e],set:ae=>{_(W=>{dn(W,ae)})}}),s._p.forEach(ae=>{dn(K,r.run(()=>ae({store:K,app:s._a,pinia:s,options:l})))}),P&&i&&n.hydrate&&n.hydrate(K.$state,P),p=!0,f=!0,K}/*! #__NO_SIDE_EFFECTS__ */function of(e,t,n){let s,o;const i=typeof t=="function";s=e,o=i?n:t;function r(l,c){const p=hu();return l=l||(p?Et(Na,null):null),l&&$o(l),l=Da,l._s.has(s)||(i?za(s,t,o,l):sf(s,o,l)),l._s.get(s)}return r.$id=s,r}const rf=["top","right","bottom","left"],Dr=["start","end"],Nr=rf.reduce((e,t)=>e.concat(t,t+"-"+Dr[0],t+"-"+Dr[1]),[]),xs=Math.min,In=Math.max,lf={left:"right",right:"left",bottom:"top",top:"bottom"},af={start:"end",end:"start"};function ci(e,t,n){return In(e,xs(t,n))}function Rn(e,t){return typeof e=="function"?e(t):e}function Kt(e){return e.split("-")[0]}function Lt(e){return e.split("-")[1]}function Ba(e){return e==="x"?"y":"x"}function Hi(e){return e==="y"?"height":"width"}const cf=new Set(["top","bottom"]);function en(e){return cf.has(Kt(e))?"y":"x"}function ji(e){return Ba(en(e))}function Ha(e,t,n){n===void 0&&(n=!1);const s=Lt(e),o=ji(e),i=Hi(o);let r=o==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(r=no(r)),[r,no(r)]}function uf(e){const t=no(e);return[to(e),t,to(t)]}function to(e){return e.replace(/start|end/g,t=>af[t])}const Fr=["left","right"],zr=["right","left"],df=["top","bottom"],ff=["bottom","top"];function pf(e,t,n){switch(e){case"top":case"bottom":return n?t?zr:Fr:t?Fr:zr;case"left":case"right":return t?df:ff;default:return[]}}function hf(e,t,n,s){const o=Lt(e);let i=pf(Kt(e),n==="start",s);return o&&(i=i.map(r=>r+"-"+o),t&&(i=i.concat(i.map(to)))),i}function no(e){return e.replace(/left|right|bottom|top/g,t=>lf[t])}function vf(e){return{top:0,right:0,bottom:0,left:0,...e}}function ja(e){return typeof e!="number"?vf(e):{top:e,right:e,bottom:e,left:e}}function us(e){const{x:t,y:n,width:s,height:o}=e;return{width:s,height:o,top:n,left:t,right:t+s,bottom:n+o,x:t,y:n}}function Br(e,t,n){let{reference:s,floating:o}=e;const i=en(t),r=ji(t),l=Hi(r),c=Kt(t),p=i==="y",f=s.x+s.width/2-o.width/2,v=s.y+s.height/2-o.height/2,g=s[l]/2-o[l]/2;let w;switch(c){case"top":w={x:f,y:s.y-o.height};break;case"bottom":w={x:f,y:s.y+s.height};break;case"right":w={x:s.x+s.width,y:v};break;case"left":w={x:s.x-o.width,y:v};break;default:w={x:s.x,y:s.y}}switch(Lt(t)){case"start":w[r]-=g*(n&&p?-1:1);break;case"end":w[r]+=g*(n&&p?-1:1);break}return w}async function gf(e,t){var n;t===void 0&&(t={});const{x:s,y:o,platform:i,rects:r,elements:l,strategy:c}=e,{boundary:p="clippingAncestors",rootBoundary:f="viewport",elementContext:v="floating",altBoundary:g=!1,padding:w=0}=Rn(t,e),P=ja(w),_=l[g?v==="floating"?"reference":"floating":v],T=us(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(_)))==null||n?_:_.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:p,rootBoundary:f,strategy:c})),F=v==="floating"?{x:s,y:o,width:r.floating.width,height:r.floating.height}:r.reference,j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),L=await(i.isElement==null?void 0:i.isElement(j))?await(i.getScale==null?void 0:i.getScale(j))||{x:1,y:1}:{x:1,y:1},K=us(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:F,offsetParent:j,strategy:c}):F);return{top:(T.top-K.top+P.top)/L.y,bottom:(K.bottom-T.bottom+P.bottom)/L.y,left:(T.left-K.left+P.left)/L.x,right:(K.right-T.right+P.right)/L.x}}const mf=async(e,t,n)=>{const{placement:s="bottom",strategy:o="absolute",middleware:i=[],platform:r}=n,l=i.filter(Boolean),c=await(r.isRTL==null?void 0:r.isRTL(t));let p=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:v}=Br(p,s,c),g=s,w={},P=0;for(let _=0;_<l.length;_++){var $;const{name:T,fn:F}=l[_],{x:j,y:L,data:K,reset:O}=await F({x:f,y:v,initialPlacement:s,placement:g,strategy:o,middlewareData:w,rects:p,platform:{...r,detectOverflow:($=r.detectOverflow)!=null?$:gf},elements:{reference:e,floating:t}});f=j??f,v=L??v,w={...w,[T]:{...w[T],...K}},O&&P<=50&&(P++,typeof O=="object"&&(O.placement&&(g=O.placement),O.rects&&(p=O.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:o}):O.rects),{x:f,y:v}=Br(p,g,c)),_=-1)}return{x:f,y:v,placement:g,strategy:o,middlewareData:w}},yf=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:o,rects:i,platform:r,elements:l,middlewareData:c}=t,{element:p,padding:f=0}=Rn(e,t)||{};if(p==null)return{};const v=ja(f),g={x:n,y:s},w=ji(o),P=Hi(w),$=await r.getDimensions(p),_=w==="y",T=_?"top":"left",F=_?"bottom":"right",j=_?"clientHeight":"clientWidth",L=i.reference[P]+i.reference[w]-g[w]-i.floating[P],K=g[w]-i.reference[w],O=await(r.getOffsetParent==null?void 0:r.getOffsetParent(p));let de=O?O[j]:0;(!de||!await(r.isElement==null?void 0:r.isElement(O)))&&(de=l.floating[j]||i.floating[P]);const ae=L/2-K/2,W=de/2-$[P]/2-1,re=xs(v[T],W),ge=xs(v[F],W),B=re,ce=de-$[P]-ge,Z=de/2-$[P]/2+ae,C=ci(B,Z,ce),X=!c.arrow&&Lt(o)!=null&&Z!==C&&i.reference[P]/2-(Z<B?re:ge)-$[P]/2<0,ne=X?Z<B?Z-B:Z-ce:0;return{[w]:g[w]+ne,data:{[w]:C,centerOffset:Z-C-ne,...X&&{alignmentOffset:ne}},reset:X}}});function _f(e,t,n){return(e?[...n.filter(o=>Lt(o)===e),...n.filter(o=>Lt(o)!==e)]:n.filter(o=>Kt(o)===o)).filter(o=>e?Lt(o)===e||(t?to(o)!==o:!1):!0)}const bf=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,s,o;const{rects:i,middlewareData:r,placement:l,platform:c,elements:p}=t,{crossAxis:f=!1,alignment:v,allowedPlacements:g=Nr,autoAlignment:w=!0,...P}=Rn(e,t),$=v!==void 0||g===Nr?_f(v||null,w,g):g,_=await c.detectOverflow(t,P),T=((n=r.autoPlacement)==null?void 0:n.index)||0,F=$[T];if(F==null)return{};const j=Ha(F,i,await(c.isRTL==null?void 0:c.isRTL(p.floating)));if(l!==F)return{reset:{placement:$[0]}};const L=[_[Kt(F)],_[j[0]],_[j[1]]],K=[...((s=r.autoPlacement)==null?void 0:s.overflows)||[],{placement:F,overflows:L}],O=$[T+1];if(O)return{data:{index:T+1,overflows:K},reset:{placement:O}};const de=K.map(re=>{const ge=Lt(re.placement);return[re.placement,ge&&f?re.overflows.slice(0,2).reduce((B,ce)=>B+ce,0):re.overflows[0],re.overflows]}).sort((re,ge)=>re[1]-ge[1]),W=((o=de.filter(re=>re[2].slice(0,Lt(re[0])?2:3).every(ge=>ge<=0))[0])==null?void 0:o[0])||de[0][0];return W!==l?{data:{index:T+1,overflows:K},reset:{placement:W}}:{}}}},wf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:o,middlewareData:i,rects:r,initialPlacement:l,platform:c,elements:p}=t,{mainAxis:f=!0,crossAxis:v=!0,fallbackPlacements:g,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:P="none",flipAlignment:$=!0,..._}=Rn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const T=Kt(o),F=en(l),j=Kt(l)===l,L=await(c.isRTL==null?void 0:c.isRTL(p.floating)),K=g||(j||!$?[no(l)]:uf(l)),O=P!=="none";!g&&O&&K.push(...hf(l,$,P,L));const de=[l,...K],ae=await c.detectOverflow(t,_),W=[];let re=((s=i.flip)==null?void 0:s.overflows)||[];if(f&&W.push(ae[T]),v){const Z=Ha(o,r,L);W.push(ae[Z[0]],ae[Z[1]])}if(re=[...re,{placement:o,overflows:W}],!W.every(Z=>Z<=0)){var ge,B;const Z=(((ge=i.flip)==null?void 0:ge.index)||0)+1,C=de[Z];if(C&&(!(v==="alignment"?F!==en(C):!1)||re.every(U=>en(U.placement)===F?U.overflows[0]>0:!0)))return{data:{index:Z,overflows:re},reset:{placement:C}};let X=(B=re.filter(ne=>ne.overflows[0]<=0).sort((ne,U)=>ne.overflows[1]-U.overflows[1])[0])==null?void 0:B.placement;if(!X)switch(w){case"bestFit":{var ce;const ne=(ce=re.filter(U=>{if(O){const se=en(U.placement);return se===F||se==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(se=>se>0).reduce((se,we)=>se+we,0)]).sort((U,se)=>U[1]-se[1])[0])==null?void 0:ce[0];ne&&(X=ne);break}case"initialPlacement":X=l;break}if(o!==X)return{reset:{placement:X}}}return{}}}},kf=new Set(["left","top"]);async function $f(e,t){const{placement:n,platform:s,elements:o}=e,i=await(s.isRTL==null?void 0:s.isRTL(o.floating)),r=Kt(n),l=Lt(n),c=en(n)==="y",p=kf.has(r)?-1:1,f=i&&c?-1:1,v=Rn(t,e);let{mainAxis:g,crossAxis:w,alignmentAxis:P}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return l&&typeof P=="number"&&(w=l==="end"?P*-1:P),c?{x:w*f,y:g*p}:{x:g*p,y:w*f}}const xf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:o,y:i,placement:r,middlewareData:l}=t,c=await $f(t,e);return r===((n=l.offset)==null?void 0:n.placement)&&(s=l.arrow)!=null&&s.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:r}}}}},Tf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:o,platform:i}=t,{mainAxis:r=!0,crossAxis:l=!1,limiter:c={fn:T=>{let{x:F,y:j}=T;return{x:F,y:j}}},...p}=Rn(e,t),f={x:n,y:s},v=await i.detectOverflow(t,p),g=en(Kt(o)),w=Ba(g);let P=f[w],$=f[g];if(r){const T=w==="y"?"top":"left",F=w==="y"?"bottom":"right",j=P+v[T],L=P-v[F];P=ci(j,P,L)}if(l){const T=g==="y"?"top":"left",F=g==="y"?"bottom":"right",j=$+v[T],L=$-v[F];$=ci(j,$,L)}const _=c.fn({...t,[w]:P,[g]:$});return{..._,data:{x:_.x-n,y:_.y-s,enabled:{[w]:r,[g]:l}}}}}},Sf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:o,rects:i,platform:r,elements:l}=t,{apply:c=()=>{},...p}=Rn(e,t),f=await r.detectOverflow(t,p),v=Kt(o),g=Lt(o),w=en(o)==="y",{width:P,height:$}=i.floating;let _,T;v==="top"||v==="bottom"?(_=v,T=g===(await(r.isRTL==null?void 0:r.isRTL(l.floating))?"start":"end")?"left":"right"):(T=v,_=g==="end"?"top":"bottom");const F=$-f.top-f.bottom,j=P-f.left-f.right,L=xs($-f[_],F),K=xs(P-f[T],j),O=!t.middlewareData.shift;let de=L,ae=K;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(ae=j),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(de=F),O&&!g){const re=In(f.left,0),ge=In(f.right,0),B=In(f.top,0),ce=In(f.bottom,0);w?ae=P-2*(re!==0||ge!==0?re+ge:In(f.left,f.right)):de=$-2*(B!==0||ce!==0?B+ce:In(f.top,f.bottom))}await c({...t,availableWidth:ae,availableHeight:de});const W=await r.getDimensions(l.floating);return P!==W.width||$!==W.height?{reset:{rects:!0}}:{}}}};function Tt(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vt(e){return Tt(e).getComputedStyle(e)}const Hr=Math.min,ds=Math.max,so=Math.round;function Va(e){const t=Vt(e);let n=parseFloat(t.width),s=parseFloat(t.height);const o=e.offsetWidth,i=e.offsetHeight,r=so(n)!==o||so(s)!==i;return r&&(n=o,s=i),{width:n,height:s,fallback:r}}function bn(e){return Ka(e)?(e.nodeName||"").toLowerCase():""}let zs;function Ua(){if(zs)return zs;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(zs=e.brands.map((t=>t.brand+"/"+t.version)).join(" "),zs):navigator.userAgent}function Ut(e){return e instanceof Tt(e).HTMLElement}function mn(e){return e instanceof Tt(e).Element}function Ka(e){return e instanceof Tt(e).Node}function jr(e){return typeof ShadowRoot>"u"?!1:e instanceof Tt(e).ShadowRoot||e instanceof ShadowRoot}function xo(e){const{overflow:t,overflowX:n,overflowY:s,display:o}=Vt(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!["inline","contents"].includes(o)}function Cf(e){return["table","td","th"].includes(bn(e))}function ui(e){const t=/firefox/i.test(Ua()),n=Vt(e),s=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!s&&s!=="none"||t&&n.willChange==="filter"||t&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some((o=>n.willChange.includes(o)))||["paint","layout","strict","content"].some((o=>{const i=n.contain;return i!=null&&i.includes(o)}))}function Wa(){return!/^((?!chrome|android).)*safari/i.test(Ua())}function Vi(e){return["html","body","#document"].includes(bn(e))}function qa(e){return mn(e)?e:e.contextElement}const Ga={x:1,y:1};function Un(e){const t=qa(e);if(!Ut(t))return Ga;const n=t.getBoundingClientRect(),{width:s,height:o,fallback:i}=Va(t);let r=(i?so(n.width):n.width)/s,l=(i?so(n.height):n.height)/o;return r&&Number.isFinite(r)||(r=1),l&&Number.isFinite(l)||(l=1),{x:r,y:l}}function Ts(e,t,n,s){var o,i;t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),l=qa(e);let c=Ga;t&&(s?mn(s)&&(c=Un(s)):c=Un(e));const p=l?Tt(l):window,f=!Wa()&&n;let v=(r.left+(f&&((o=p.visualViewport)==null?void 0:o.offsetLeft)||0))/c.x,g=(r.top+(f&&((i=p.visualViewport)==null?void 0:i.offsetTop)||0))/c.y,w=r.width/c.x,P=r.height/c.y;if(l){const $=Tt(l),_=s&&mn(s)?Tt(s):s;let T=$.frameElement;for(;T&&s&&_!==$;){const F=Un(T),j=T.getBoundingClientRect(),L=getComputedStyle(T);j.x+=(T.clientLeft+parseFloat(L.paddingLeft))*F.x,j.y+=(T.clientTop+parseFloat(L.paddingTop))*F.y,v*=F.x,g*=F.y,w*=F.x,P*=F.y,v+=j.x,g+=j.y,T=Tt(T).frameElement}}return{width:w,height:P,top:g,right:v+w,bottom:g+P,left:v,x:v,y:g}}function yn(e){return((Ka(e)?e.ownerDocument:e.document)||window.document).documentElement}function To(e){return mn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ja(e){return Ts(yn(e)).left+To(e).scrollLeft}function Ss(e){if(bn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||jr(e)&&e.host||yn(e);return jr(t)?t.host:t}function Ya(e){const t=Ss(e);return Vi(t)?t.ownerDocument.body:Ut(t)&&xo(t)?t:Ya(t)}function oo(e,t){var n;t===void 0&&(t=[]);const s=Ya(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),i=Tt(s);return o?t.concat(i,i.visualViewport||[],xo(s)?s:[]):t.concat(s,oo(s))}function Vr(e,t,n){return t==="viewport"?us((function(s,o){const i=Tt(s),r=yn(s),l=i.visualViewport;let c=r.clientWidth,p=r.clientHeight,f=0,v=0;if(l){c=l.width,p=l.height;const g=Wa();(g||!g&&o==="fixed")&&(f=l.offsetLeft,v=l.offsetTop)}return{width:c,height:p,x:f,y:v}})(e,n)):mn(t)?us((function(s,o){const i=Ts(s,!0,o==="fixed"),r=i.top+s.clientTop,l=i.left+s.clientLeft,c=Ut(s)?Un(s):{x:1,y:1};return{width:s.clientWidth*c.x,height:s.clientHeight*c.y,x:l*c.x,y:r*c.y}})(t,n)):us((function(s){const o=yn(s),i=To(s),r=s.ownerDocument.body,l=ds(o.scrollWidth,o.clientWidth,r.scrollWidth,r.clientWidth),c=ds(o.scrollHeight,o.clientHeight,r.scrollHeight,r.clientHeight);let p=-i.scrollLeft+Ja(s);const f=-i.scrollTop;return Vt(r).direction==="rtl"&&(p+=ds(o.clientWidth,r.clientWidth)-l),{width:l,height:c,x:p,y:f}})(yn(e)))}function Ur(e){return Ut(e)&&Vt(e).position!=="fixed"?e.offsetParent:null}function Kr(e){const t=Tt(e);let n=Ur(e);for(;n&&Cf(n)&&Vt(n).position==="static";)n=Ur(n);return n&&(bn(n)==="html"||bn(n)==="body"&&Vt(n).position==="static"&&!ui(n))?t:n||(function(s){let o=Ss(s);for(;Ut(o)&&!Vi(o);){if(ui(o))return o;o=Ss(o)}return null})(e)||t}function Mf(e,t,n){const s=Ut(t),o=yn(t),i=Ts(e,!0,n==="fixed",t);let r={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(s||!s&&n!=="fixed")if((bn(t)!=="body"||xo(o))&&(r=To(t)),Ut(t)){const c=Ts(t,!0);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else o&&(l.x=Ja(o));return{x:i.left+r.scrollLeft-l.x,y:i.top+r.scrollTop-l.y,width:i.width,height:i.height}}const Ef={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:s,strategy:o}=e;const i=n==="clippingAncestors"?(function(p,f){const v=f.get(p);if(v)return v;let g=oo(p).filter((_=>mn(_)&&bn(_)!=="body")),w=null;const P=Vt(p).position==="fixed";let $=P?Ss(p):p;for(;mn($)&&!Vi($);){const _=Vt($),T=ui($);(P?T||w:T||_.position!=="static"||!w||!["absolute","fixed"].includes(w.position))?w=_:g=g.filter((F=>F!==$)),$=Ss($)}return f.set(p,g),g})(t,this._c):[].concat(n),r=[...i,s],l=r[0],c=r.reduce(((p,f)=>{const v=Vr(t,f,o);return p.top=ds(v.top,p.top),p.right=Hr(v.right,p.right),p.bottom=Hr(v.bottom,p.bottom),p.left=ds(v.left,p.left),p}),Vr(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:s}=e;const o=Ut(n),i=yn(n);if(n===i)return t;let r={scrollLeft:0,scrollTop:0},l={x:1,y:1};const c={x:0,y:0};if((o||!o&&s!=="fixed")&&((bn(n)!=="body"||xo(i))&&(r=To(n)),Ut(n))){const p=Ts(n);l=Un(n),c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-r.scrollLeft*l.x+c.x,y:t.y*l.y-r.scrollTop*l.y+c.y}},isElement:mn,getDimensions:function(e){return Ut(e)?Va(e):e.getBoundingClientRect()},getOffsetParent:Kr,getDocumentElement:yn,getScale:Un,async getElementRects(e){let{reference:t,floating:n,strategy:s}=e;const o=this.getOffsetParent||Kr,i=this.getDimensions;return{reference:Mf(t,await o(n),s),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Vt(e).direction==="rtl"},Pf=(e,t,n)=>{const s=new Map,o={platform:Ef,...n},i={...o.platform,_c:s};return mf(e,t,{...o,platform:i})};function Xa(e,t){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(typeof t[n]=="object"&&e[n]?Xa(e[n],t[n]):e[n]=t[n])}const Ot={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function Cs(e,t){let n=Ot.themes[e]||{},s;do s=n[t],typeof s>"u"?n.$extend?n=Ot.themes[n.$extend]||{}:(n=null,s=Ot[t]):n=null;while(n);return s}function If(e){const t=[e];let n=Ot.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=Ot.themes[n.$extend]||{}):n=null;while(n);return t.map(s=>`v-popper--theme-${s}`)}function Wr(e){const t=[e];let n=Ot.themes[e]||{};do n.$extend?(t.push(n.$extend),n=Ot.themes[n.$extend]||{}):n=null;while(n);return t}let Wn=!1;if(typeof window<"u"){Wn=!1;try{const e=Object.defineProperty({},"passive",{get(){Wn=!0}});window.addEventListener("test",null,e)}catch{}}let Za=!1;typeof window<"u"&&typeof navigator<"u"&&(Za=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const Qa=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),qr={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},Gr={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function Jr(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1)}function jo(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const Pt=[];let En=null;const Yr={};function Xr(e){let t=Yr[e];return t||(t=Yr[e]=[]),t}let di=function(){};typeof window<"u"&&(di=window.Element);function Ne(e){return function(t){return Cs(t.theme,e)}}const Vo="__floating-vue__popper",ec=()=>et({name:"VPopper",provide(){return{[Vo]:{parentPopper:this}}},inject:{[Vo]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:Ne("disabled")},positioningDisabled:{type:Boolean,default:Ne("positioningDisabled")},placement:{type:String,default:Ne("placement"),validator:e=>Qa.includes(e)},delay:{type:[String,Number,Object],default:Ne("delay")},distance:{type:[Number,String],default:Ne("distance")},skidding:{type:[Number,String],default:Ne("skidding")},triggers:{type:Array,default:Ne("triggers")},showTriggers:{type:[Array,Function],default:Ne("showTriggers")},hideTriggers:{type:[Array,Function],default:Ne("hideTriggers")},popperTriggers:{type:Array,default:Ne("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:Ne("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:Ne("popperHideTriggers")},container:{type:[String,Object,di,Boolean],default:Ne("container")},boundary:{type:[String,di],default:Ne("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:Ne("strategy")},autoHide:{type:[Boolean,Function],default:Ne("autoHide")},handleResize:{type:Boolean,default:Ne("handleResize")},instantMove:{type:Boolean,default:Ne("instantMove")},eagerMount:{type:Boolean,default:Ne("eagerMount")},popperClass:{type:[String,Array,Object],default:Ne("popperClass")},computeTransformOrigin:{type:Boolean,default:Ne("computeTransformOrigin")},autoMinSize:{type:Boolean,default:Ne("autoMinSize")},autoSize:{type:[Boolean,String],default:Ne("autoSize")},autoMaxSize:{type:Boolean,default:Ne("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:Ne("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:Ne("preventOverflow")},overflowPadding:{type:[Number,String],default:Ne("overflowPadding")},arrowPadding:{type:[Number,String],default:Ne("arrowPadding")},arrowOverflow:{type:Boolean,default:Ne("arrowOverflow")},flip:{type:Boolean,default:Ne("flip")},shift:{type:Boolean,default:Ne("shift")},shiftCrossAxis:{type:Boolean,default:Ne("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:Ne("noAutoFocus")},disposeTimeout:{type:Number,default:Ne("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[Vo])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,t;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((t=this.popperShowTriggers)==null?void 0:t.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,t)=>(e[t]="$_computePosition",e),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:n=!1}={}){var s,o;(s=this.parentPopper)!=null&&s.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(n||!this.disabled)&&(((o=this.parentPopper)==null?void 0:o.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:t=!1}={}){var n;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}((n=this.parentPopper)==null?void 0:n.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,t),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((e=this.referenceNode)==null?void 0:e.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(t=>t.nodeType===t.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(xf({mainAxis:this.distance,crossAxis:this.skidding}));const t=this.placement.startsWith("auto");if(t?e.middleware.push(bf({alignment:this.placement.split("-")[1]??""})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(Tf({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(wf({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(yf({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:s,rects:o,middlewareData:i})=>{let r;const{centerOffset:l}=i.arrow;return s.startsWith("top")||s.startsWith("bottom")?r=Math.abs(l)>o.reference.width/2:r=Math.abs(l)>o.reference.height/2,{data:{overflow:r}}}}),this.autoMinSize||this.autoSize){const s=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:o,placement:i,middlewareData:r})=>{var l;if((l=r.autoSize)!=null&&l.skip)return{};let c,p;return i.startsWith("top")||i.startsWith("bottom")?c=o.reference.width:p=o.reference.height,this.$_innerNode.style[s==="min"?"minWidth":s==="max"?"maxWidth":"width"]=c!=null?`${c}px`:null,this.$_innerNode.style[s==="min"?"minHeight":s==="max"?"maxHeight":"height"]=p!=null?`${p}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(Sf({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:s,availableHeight:o})=>{this.$_innerNode.style.maxWidth=s!=null?`${s}px`:null,this.$_innerNode.style.maxHeight=o!=null?`${o}px`:null}})));const n=await Pf(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),En&&this.instantMove&&En.instantMove&&En!==this.parentPopper){En.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(En=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await jo(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...oo(this.$_referenceNode),...oo(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const t=this.$_referenceNode.getBoundingClientRect(),n=this.$_popperNode.querySelector(".v-popper__wrapper"),s=n.parentNode.getBoundingClientRect(),o=t.x+t.width/2-(s.left+n.offsetLeft),i=t.y+t.height/2-(s.top+n.offsetTop);this.result.transformOrigin=`${o}px ${i}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let t;for(let n=0;n<Pt.length;n++)t=Pt[n],t.showGroup!==e&&(t.hide(),t.$emit("close-group"))}Pt.push(this),document.body.classList.add("v-popper--some-open");for(const t of Wr(this.theme))Xr(t).push(this),document.body.classList.add(`v-popper--some-open--${t}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await jo(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Jr(Pt,this),Pt.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of Wr(this.theme)){const s=Xr(n);Jr(s,this),s.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}En===this&&(En=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await jo(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=n=>{this.isShown&&!this.$_hideInProgress||(n.usedByTooltip=!0,!this.$_preventShow&&this.show({event:n}))};this.$_registerTriggerListeners(this.$_targetNodes,qr,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],qr,this.popperTriggers,this.popperShowTriggers,e);const t=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,Gr,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],Gr,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,n){this.$_events.push({targetNodes:e,eventType:t,handler:n}),e.forEach(s=>s.addEventListener(t,n,Wn?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,n,s,o){let i=n;s!=null&&(i=typeof s=="function"?s(i):s),i.forEach(r=>{const l=t[r];l&&this.$_registerEventListeners(e,l,o)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(n=>{const{targetNodes:s,eventType:o,handler:i}=n;!e||e===o?s.forEach(r=>r.removeEventListener(o,i)):t.push(n)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(const n of this.$_targetNodes){const s=n.getAttribute(e);s&&(n.removeAttribute(e),n.setAttribute(t,s))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const n in e){const s=e[n];s==null?t.removeAttribute(n):t.setAttribute(n,s)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(fs>=e.left&&fs<=e.right&&ps>=e.top&&ps<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),n=fs-fn,s=ps-pn,o=t.left+t.width/2-fn+(t.top+t.height/2)-pn+t.width+t.height,i=fn+n*o,r=pn+s*o;return Bs(fn,pn,i,r,t.left,t.top,t.left,t.bottom)||Bs(fn,pn,i,r,t.left,t.top,t.right,t.top)||Bs(fn,pn,i,r,t.right,t.top,t.right,t.bottom)||Bs(fn,pn,i,r,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(Za){const e=Wn?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",t=>Zr(t,!0),e),document.addEventListener("touchend",t=>Qr(t,!0),e)}else window.addEventListener("mousedown",e=>Zr(e,!1),!0),window.addEventListener("click",e=>Qr(e,!1),!0);window.addEventListener("resize",Lf)}function Zr(e,t){if(Ot.autoHideOnMousedown)tc(e,t);else for(let n=0;n<Pt.length;n++){const s=Pt[n];try{s.mouseDownContains=s.popperNode().contains(e.target)}catch{}}}function Qr(e,t){Ot.autoHideOnMousedown||tc(e,t)}function tc(e,t){const n={};for(let s=Pt.length-1;s>=0;s--){const o=Pt[s];try{const i=o.containsGlobalTarget=o.mouseDownContains||o.popperNode().contains(e.target);o.pendingHide=!1,requestAnimationFrame(()=>{if(o.pendingHide=!1,!n[o.randomId]&&el(o,i,e)){if(o.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&i){let l=o.parentPopper;for(;l;)n[l.randomId]=!0,l=l.parentPopper;return}let r=o.parentPopper;for(;r&&el(r,r.containsGlobalTarget,e);)r.$_handleGlobalClose(e,t),r=r.parentPopper}})}catch{}}}function el(e,t,n){return n.closeAllPopover||n.closePopover&&t||Af(e,n)&&!t}function Af(e,t){if(typeof e.autoHide=="function"){const n=e.autoHide(t);return e.lastAutoHide=n,n}return e.autoHide}function Lf(){for(let e=0;e<Pt.length;e++)Pt[e].$_computePosition()}let fn=0,pn=0,fs=0,ps=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{fn=fs,pn=ps,fs=e.clientX,ps=e.clientY},Wn?{passive:!0}:void 0);function Bs(e,t,n,s,o,i,r,l){const c=((r-o)*(t-i)-(l-i)*(e-o))/((l-i)*(n-e)-(r-o)*(s-t)),p=((n-e)*(t-i)-(s-t)*(e-o))/((l-i)*(n-e)-(r-o)*(s-t));return c>=0&&c<=1&&p>=0&&p<=1}const Of={extends:ec()},So=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n};function Rf(e,t,n,s,o,i){return m(),y("div",{ref:"reference",class:le(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[_s(e.$slots,"default",Cc(Sa(e.slotData)))],2)}const Df=So(Of,[["render",Rf]]);function Nf(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var s=e.indexOf("rv:");return parseInt(e.substring(s+3,e.indexOf(".",s)),10)}var o=e.indexOf("Edge/");return o>0?parseInt(e.substring(o+5,e.indexOf(".",o)),10):-1}let Ks;function fi(){fi.init||(fi.init=!0,Ks=Nf()!==-1)}var Co={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){fi(),Je(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",Ks&&this.$el.appendChild(e),e.data="about:blank",Ks||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!Ks&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Ff=pu();du("data-v-b329ee4c");const zf={class:"resize-observer",tabindex:"-1"};fu();const Bf=Ff((e,t,n,s,o,i)=>(m(),mt("div",zf)));Co.render=Bf;Co.__scopeId="data-v-b329ee4c";Co.__file="src/components/ResizeObserver.vue";const nc=(e="theme")=>({computed:{themeClass(){return If(this[e])}}}),Hf=et({name:"VPopperContent",components:{ResizeObserver:Co},mixins:[nc()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),jf=["id","aria-hidden","tabindex","data-popper-placement"],Vf={ref:"inner",class:"v-popper__inner"},Uf=u("div",{class:"v-popper__arrow-outer"},null,-1),Kf=u("div",{class:"v-popper__arrow-inner"},null,-1),Wf=[Uf,Kf];function qf(e,t,n,s,o,i){const r=ys("ResizeObserver");return m(),y("div",{id:e.popperId,ref:"popover",class:le(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:Pe(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||(t[2]=Oa(l=>e.autoHide&&e.$emit("hide"),["esc"]))},[u("div",{class:"v-popper__backdrop",onClick:t[0]||(t[0]=l=>e.autoHide&&e.$emit("hide"))}),u("div",{class:"v-popper__wrapper",style:Pe(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[u("div",Vf,[e.mounted?(m(),y(ve,{key:0},[u("div",null,[_s(e.$slots,"default")]),e.handleResize?(m(),mt(r,{key:0,onNotify:t[1]||(t[1]=l=>e.$emit("resize",l))})):oe("",!0)],64)):oe("",!0)],512),u("div",{ref:"arrow",class:"v-popper__arrow-container",style:Pe(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},Wf,4)],4)],46,jf)}const sc=So(Hf,[["render",qf]]),oc={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}};let pi=function(){};typeof window<"u"&&(pi=window.Element);const Gf=et({name:"VPopperWrapper",components:{Popper:Df,PopperContent:sc},mixins:[oc,nc("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,pi,Boolean],default:void 0},boundary:{type:[String,pi],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function Jf(e,t,n,s,o,i){const r=ys("PopperContent"),l=ys("Popper");return m(),mt(l,zi({ref:"popper"},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||(t[0]=()=>e.$emit("show")),onHide:t[1]||(t[1]=()=>e.$emit("hide")),"onUpdate:shown":t[2]||(t[2]=c=>e.$emit("update:shown",c)),onApplyShow:t[3]||(t[3]=()=>e.$emit("apply-show")),onApplyHide:t[4]||(t[4]=()=>e.$emit("apply-hide")),onCloseGroup:t[5]||(t[5]=()=>e.$emit("close-group")),onCloseDirective:t[6]||(t[6]=()=>e.$emit("close-directive")),onAutoHide:t[7]||(t[7]=()=>e.$emit("auto-hide")),onResize:t[8]||(t[8]=()=>e.$emit("resize"))}),{default:it(({popperId:c,isShown:p,shouldMountContent:f,skipTransition:v,autoHide:g,show:w,hide:P,handleResize:$,onResize:_,classes:T,result:F})=>[_s(e.$slots,"default",{shown:p,show:w,hide:P}),Oe(r,{ref:"popperContent","popper-id":c,theme:e.finalTheme,shown:p,mounted:f,"skip-transition":v,"auto-hide":g,"handle-resize":$,classes:T,result:F,onHide:P,onResize:_},{default:it(()=>[_s(e.$slots,"popper",{shown:p,hide:P})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}const Ui=So(Gf,[["render",Jf]]),Yf={...Ui,name:"VDropdown",vPopperTheme:"dropdown"},Xf={...Ui,name:"VMenu",vPopperTheme:"menu"},Zf={...Ui,name:"VTooltip",vPopperTheme:"tooltip"},Qf=et({name:"VTooltipDirective",components:{Popper:ec(),PopperContent:sc},mixins:[oc],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>Cs(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>Cs(e.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const t=++this.$_fetchId,n=this.content(this);n.then?n.then(s=>this.onResult(t,s)):this.onResult(t,n)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),ep=["innerHTML"],tp=["textContent"];function np(e,t,n,s,o,i){const r=ys("PopperContent"),l=ys("Popper");return m(),mt(l,zi({ref:"popper"},e.$attrs,{theme:e.theme,"target-nodes":e.targetNodes,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:it(({popperId:c,isShown:p,shouldMountContent:f,skipTransition:v,autoHide:g,hide:w,handleResize:P,onResize:$,classes:_,result:T})=>[Oe(r,{ref:"popperContent",class:le({"v-popper--tooltip-loading":e.loading}),"popper-id":c,theme:e.theme,shown:p,mounted:f,"skip-transition":v,"auto-hide":g,"handle-resize":P,classes:_,result:T,onHide:w,onResize:$},{default:it(()=>[e.html?(m(),y("div",{key:0,innerHTML:e.finalContent},null,8,ep)):(m(),y("div",{key:1,textContent:M(e.finalContent)},null,8,tp))]),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:1},16,["theme","target-nodes","popper-node","onApplyShow","onApplyHide"])}const sp=So(Qf,[["render",np]]),ic="v-popper--has-tooltip";function op(e,t){let n=e.placement;if(!n&&t)for(const s of Qa)t[s]&&(n=s);return n||(n=Cs(e.theme||"tooltip","placement")),n}function rc(e,t,n){let s;const o=typeof t;return o==="string"?s={content:t}:t&&o==="object"?s=t:s={content:!1},s.placement=op(s,n),s.targetNodes=()=>[e],s.referenceNode=()=>e,s}let Uo,Ms,ip=0;function rp(){if(Uo)return;Ms=he([]),Uo=Ra({name:"VTooltipDirectiveApp",setup(){return{directives:Ms}},render(){return this.directives.map(t=>Bi(sp,{...t.options,shown:t.shown||t.options.shown,key:t.id}))},devtools:{hide:!0}});const e=document.createElement("div");document.body.appendChild(e),Uo.mount(e)}function lp(e,t,n){rp();const s=he(rc(e,t,n)),o=he(!1),i={id:ip++,options:s,shown:o};return Ms.value.push(i),e.classList&&e.classList.add(ic),e.$_popper={options:s,item:i,show(){o.value=!0},hide(){o.value=!1}}}function lc(e){if(e.$_popper){const t=Ms.value.indexOf(e.$_popper.item);t!==-1&&Ms.value.splice(t,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(ic)}function tl(e,{value:t,modifiers:n}){const s=rc(e,t,n);if(!s.content||Cs(s.theme||"tooltip","disabled"))lc(e);else{let o;e.$_popper?(o=e.$_popper,o.options.value=s):o=lp(e,t,n),typeof t.shown<"u"&&t.shown!==e.$_popperOldShown&&(e.$_popperOldShown=t.shown,t.shown?o.show():o.hide())}}const ap={beforeMount:tl,updated:tl,beforeUnmount(e){lc(e)}};function nl(e){e.addEventListener("mousedown",io),e.addEventListener("click",io),e.addEventListener("touchstart",ac,Wn?{passive:!0}:!1)}function sl(e){e.removeEventListener("mousedown",io),e.removeEventListener("click",io),e.removeEventListener("touchstart",ac),e.removeEventListener("touchend",cc),e.removeEventListener("touchcancel",uc)}function io(e){const t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function ac(e){if(e.changedTouches.length===1){const t=e.currentTarget;t.$_vclosepopover_touch=!0;const n=e.changedTouches[0];t.$_vclosepopover_touchPoint=n,t.addEventListener("touchend",cc),t.addEventListener("touchcancel",uc)}}function cc(e){const t=e.currentTarget;if(t.$_vclosepopover_touch=!1,e.changedTouches.length===1){const n=e.changedTouches[0],s=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(n.screenY-s.screenY)<20&&Math.abs(n.screenX-s.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function uc(e){const t=e.currentTarget;t.$_vclosepopover_touch=!1}const cp={beforeMount(e,{value:t,modifiers:n}){e.$_closePopoverModifiers=n,(typeof t>"u"||t)&&nl(e)},updated(e,{value:t,oldValue:n,modifiers:s}){e.$_closePopoverModifiers=s,t!==n&&(typeof t>"u"||t?nl(e):sl(e))},beforeUnmount(e){sl(e)}};function up(e,t={}){e.$_vTooltipInstalled||(e.$_vTooltipInstalled=!0,Xa(Ot,t),e.directive("tooltip",ap),e.directive("close-popper",cp),e.component("VTooltip",Zf),e.component("VDropdown",Yf),e.component("VMenu",Xf))}const dp={version:"5.2.2",install:up,options:Ot},Wt="";async function fp(){const e=await fetch(`${Wt}/api/requests?summary=true`);if(!e.ok)throw new Error(`GET /api/requests?summary=true failed: ${e.status}`);return e.json()}async function pp(e){const t=await fetch(`${Wt}/api/conversations/${encodeURIComponent(e)}`);if(!t.ok)throw new Error(`GET /api/conversations/${e} failed: ${t.status}`);return t.json()}async function hp(e){const t=await fetch(`${Wt}/api/entries/${e}/detail`);if(t.status===404)return null;if(!t.ok)throw new Error(`GET /api/entries/${e}/detail failed: ${t.status}`);return(await t.json()).contextInfo??null}async function vp(e){const t=await fetch(`${Wt}/api/conversations/${encodeURIComponent(e)}`,{method:"DELETE"});if(!t.ok)throw new Error(`DELETE conversation failed: ${t.status}`)}async function gp(){const e=await fetch(`${Wt}/api/reset`,{method:"POST"});if(!e.ok)throw new Error(`POST /api/reset failed: ${e.status}`)}function mp(e,t,n){const s=new URLSearchParams;t&&s.set("conversation",t);const o=s.toString();return`${Wt}/api/export/${e}${o?`?${o}`:""}`}async function yp(){const e=await fetch(`${Wt}/api/tags`);if(!e.ok)throw new Error(`GET /api/tags failed: ${e.status}`);return e.json()}async function _p(e,t){const n=await fetch(`${Wt}/api/sessions/${encodeURIComponent(e)}/tags`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tags:t})});if(!n.ok)throw new Error(`PATCH tags failed: ${n.status}`);return(await n.json()).tags}async function bp(e,t){const n=await fetch(`${Wt}/api/sessions/${encodeURIComponent(e)}/tags`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tag:t})});if(!n.ok)throw new Error(`POST tag failed: ${n.status}`);return(await n.json()).tags}async function wp(e,t){const n=await fetch(`${Wt}/api/sessions/${encodeURIComponent(e)}/tags/${encodeURIComponent(t)}`,{method:"DELETE"});if(!n.ok)throw new Error(`DELETE tag failed: ${n.status}`);return(await n.json()).tags}const nt={system_prompt:{label:"System prompt",color:"#2563eb"},tool_definitions:{label:"Tool definitions",color:"#db2777"},tool_results:{label:"Tool results",color:"#059669"},tool_calls:{label:"Tool calls",color:"#ec4899"},assistant_text:{label:"Assistant text",color:"#d97706"},user_text:{label:"User text",color:"#10b981"},thinking:{label:"Thinking",color:"#8b5cf6"},system_injections:{label:"System injections",color:"#6366f1"},images:{label:"Images",color:"#4b5563"},cache_markers:{label:"Cache markers",color:"#6b7280"},other:{label:"Other",color:"#4b5563"}};function kp(e){var t;return((t=nt[e])==null?void 0:t.label)??e}function $p(e,t="#475569"){var n;return((n=nt[e])==null?void 0:n.color)??t}const qn={system:["system_prompt","system_injections"],tools:["tool_definitions","tool_calls"],results:["tool_results"],conversation:["assistant_text","user_text","thinking"],other:["images","cache_markers","other"]},_t={system:{label:"System",color:"#2563eb"},tools:{label:"Tools",color:"#db2777"},results:{label:"Results",color:"#059669"},conversation:{label:"Conversation",color:"#d97706"},other:{label:"Other",color:"#4b5563"}};function It(e){const t=e.role||"user",n=e.content||"",s=e.contentBlocks;if(s&&Array.isArray(s)){const o=s.some(l=>l.type==="tool_use"),i=s.some(l=>l.type==="tool_result"),r=s.some(l=>l.type==="thinking");if(i)return"tool_results";if(o)return"tool_calls";if(r)return"thinking"}return typeof n=="string"&&n.includes("<system-reminder>")?"system_injections":t==="assistant"?"assistant_text":t==="user"?"user_text":"other"}function Mo(e){const t={};for(const n of e)if(n.contentBlocks)for(const s of n.contentBlocks)s.type==="tool_use"&&s.id&&s.name&&(t[s.id]=s.name);return t}function Ko(e,t={}){const n=e.contentBlocks;if(n&&Array.isArray(n))for(const s of n){if(s.type==="tool_use")return(s.name||"tool")+"("+(s.input?JSON.stringify(s.input).slice(0,60):"")+")";if(s.type==="tool_result"){const i=s.tool_use_id?t[s.tool_use_id]:null,r=typeof s.content=="string"?s.content:JSON.stringify(s.content||""),l=i?i+": ":"";return l+r.slice(0,80-l.length)}const o=s;if(o.type==="thinking")return(o.thinking||o.text||"").slice(0,80);if(s.type==="text"||s.type==="input_text")return(s.text||"").slice(0,80)}return(e.content||"").slice(0,80)}function xp(e){return e.contentBlocks&&e.contentBlocks.length>0?e.contentBlocks.map(t=>{if(t.type==="tool_use")return t.name+"("+JSON.stringify(t.input,null,2)+")";if(t.type==="tool_result")return typeof t.content=="string"?t.content:JSON.stringify(t.content,null,2);const n=t;return n.type==="thinking"?n.thinking||n.text||"":t.type==="text"||t.type==="input_text"?t.text||"":JSON.stringify(t,null,2)}).join(`
23
-
24
- `):e.content||""}function Wo(e){const t={role:e.role};if(e.contentBlocks&&e.contentBlocks.length>0)t.content=e.contentBlocks;else try{t.content=JSON.parse(e.content)}catch{t.content=e.content}return t._tokens=e.tokens,t}const Tp=["tool_results","system_injections","tool_calls","thinking","assistant_text","user_text"];function dc(e){const t=new Map;for(let s=e.length-1;s>=0;s--){const o=e[s],i=It(o);t.has(i)||t.set(i,{items:[],tokens:0});const r=t.get(i);r.items.push({msg:o,origIdx:s}),r.tokens+=o.tokens||0}const n=[...Tp];for(const s of t.keys())n.includes(s)||n.push(s);return n.filter(s=>t.has(s)).map(s=>({category:s,...t.get(s)}))}function nn(e){if(e.length===0)return[];const t=new Map;for(const o of e){const i=o.agentKey||"_default";t.set(i,(t.get(i)||0)+1)}let n="_default",s=0;for(const[o,i]of t)i>s&&(n=o,s=i);return e.map(o=>({entry:o,isMain:(o.agentKey||"_default")===n}))}const ol="context-lens-density",$t=of("session",()=>{const e=he(0),t=he([]),n=he(new Map),s=he(0),o=he(!1),i=he(null),r=he(null),l=he(!1),c=he([]),p=he(""),f=he(!1),v=he("dashboard"),g=he("overview"),w=he(null),P=he("live"),$=he(null),_=he(""),T=he(""),F=he("comfortable"),j=he(null),L=he(0),K=he(null),O=he(null),de=he(!1),ae=he(null),W=he(new Set),re=he(!1),ge=he("main"),B=he("main"),ce=he("absolute"),Z=he(new Set),C=he(!0),X=he(!1),ne=he(new Set),U=new Map;function se(R){const _e=new Set(ne.value);_e.add(R),ne.value=_e;const Te=U.get(R);Te&&clearTimeout(Te),U.set(R,setTimeout(()=>{U.delete(R);const Ke=new Set(ne.value);Ke.delete(R),ne.value=Ke},1500))}const we=new Map,N=he(null),S=he(0),I=A(()=>t.value.map(R=>{const _e=n.value.get(R.id);return _e||{...R,agents:[],entries:[]}})),Q=A(()=>[]),ie=A(()=>{let R=I.value;return _.value&&(R=R.filter(_e=>_e.source===_.value)),T.value&&(R=R.filter(_e=>{const Te=n.value.get(_e.id);if(Te&&Te.entries.length>0)return Te.entries[0].contextInfo.model.includes(T.value);const Ke=t.value.find(yt=>yt.id===_e.id);return Ke==null?void 0:Ke.latestModel.includes(T.value)})),R}),x=A(()=>{let R=t.value;if(_.value&&(R=R.filter(_e=>_e.source===_.value)),p.value){const _e=p.value.toLowerCase();R=R.filter(Te=>{var Ke;return(Ke=Te.tags)==null?void 0:Ke.includes(_e)})}return R}),D=A(()=>{const R=new Set;for(const _e of t.value)_e.source&&R.add(_e.source);return Array.from(R).sort()}),Y=A(()=>{const R=new Set;for(const _e of t.value)_e.latestModel&&R.add(_e.latestModel);return Array.from(R).sort()}),k=A(()=>w.value?n.value.get(w.value)??null:null),b=A(()=>{const R=k.value;if(!R||R.entries.length===0)return null;if(P.value==="live"){const Ke=[...nn([...R.entries].reverse())].reverse().find(yt=>yt.isMain);return(Ke==null?void 0:Ke.entry)??R.entries[0]}return R.entries.find(Te=>Te.id===$.value)??R.entries[0]}),h=A(()=>{let R=0;for(const _e of t.value)R+=_e.totalCost??0;return R}),a=A(()=>{let R=0;for(const _e of t.value)R+=_e.entryCount;return R+s.value});async function d(){o.value=!0,r.value=null;try{const R=await fp();e.value=R.revision,t.value=R.conversations,s.value=R.ungroupedCount;const _e=new Set(R.conversations.map(Te=>Te.id));for(const Te of n.value.keys())_e.has(Te)||n.value.delete(Te);!w.value&&R.conversations.length>0&&v.value==="inspector"&&await G(R.conversations[0].id),w.value&&!_e.has(w.value)&&(w.value=null,P.value="live",$.value=null,v.value==="inspector"&&(v.value="dashboard")),w.value&&_e.has(w.value)&&await E(w.value)}catch(R){r.value=R instanceof Error?R.message:String(R)}finally{o.value=!1}}async function E(R){i.value=R;try{const _e=await pp(R),Te=new Map(n.value);Te.set(R,_e),n.value=Te}catch(_e){console.warn(`Failed to load conversation ${R}:`,_e)}finally{i.value=null}}function q(R){if(R.type==="connected"){l.value=!0,R.revision!==e.value&&d();return}R.conversationId&&se(R.conversationId),d(),R.type==="tags-updated"&&Ae(),R.conversationId&&w.value===R.conversationId&&E(R.conversationId)}async function G(R){w.value=R,P.value="live",$.value=null,n.value.has(R)||await E(R)}function z(){P.value="live",$.value=null}function fe(R){P.value="pinned",$.value=R}function pe(R){v.value=R}function ue(R){g.value=R}function ee(R){_.value=R}function $e(R){T.value=R}function me(R,_e=!1){j.value=R,K.value=null,O.value=null,ae.value=null,de.value=_e,L.value+=1}function Se(R,_e){j.value=R,K.value=_e,O.value=null,ae.value=null,L.value+=1}function Me(R){j.value=null,K.value=null,O.value=R,ae.value=null,L.value+=1}function Re(R){j.value="tool_results",K.value=null,O.value=null,ae.value=R,L.value+=1}function He(R){const _e=new Set(W.value);_e.has(R)?_e.delete(R):_e.add(R),W.value=_e}async function De(R){const _e=R??W.value;if(_e.size<2)return;W.value=new Set(_e),re.value=!0,v.value="compare";const Te=[];for(const Ke of _e)n.value.has(Ke)||Te.push(E(Ke));await Promise.all(Te)}function tt(R="dashboard"){re.value=!1,W.value=new Set,v.value=R}function ot(){j.value=null,K.value=null,O.value=null,de.value=!1,ae.value=null}async function vt(R){if(we.has(R))return we.get(R);N.value=R;try{const _e=await hp(R);if(_e&&(we.set(R,_e),S.value++,we.size>50)){const Te=we.keys().next().value;Te!==void 0&&we.delete(Te)}return _e}catch{return null}finally{N.value=null}}function V(R){return we.get(R)??null}async function H(R){try{await vp(R),t.value=t.value.filter(_e=>_e.id!==R),n.value.delete(R),w.value===R&&(t.value.length>0?await G(t.value[0].id):(w.value=null,P.value="live",$.value=null))}catch(_e){r.value=_e instanceof Error?_e.message:String(_e)}}async function ye(){try{await gp(),t.value=[],n.value=new Map,s.value=0,w.value=null,P.value="live",$.value=null,e.value=0}catch(R){r.value=R instanceof Error?R.message:String(R)}}function te(R){typeof document>"u"||document.documentElement.setAttribute("data-density",R)}function be(){if(typeof window>"u")return;const R=window.localStorage.getItem(ol);R==="comfortable"||R==="compact"?F.value=R:F.value="comfortable",te(F.value)}function Ie(R){F.value=R,typeof window<"u"&&window.localStorage.setItem(ol,R),te(R)}async function Ae(){f.value=!0;try{const R=await yp();c.value=R.tags}catch(R){console.warn("Failed to load tags:",R)}finally{f.value=!1}}function at(R){p.value=R}function Mt(){p.value=""}async function xn(R,_e){try{const Te=await _p(R,_e),Ke=t.value.find(Gn=>Gn.id===R);Ke&&(Ke.tags=Te);const yt=n.value.get(R);yt&&(yt.tags=Te),await Ae()}catch(Te){r.value=Te instanceof Error?Te.message:String(Te)}}async function Fe(R,_e){try{const Te=await bp(R,_e),Ke=t.value.find(Gn=>Gn.id===R);Ke&&(Ke.tags=Te);const yt=n.value.get(R);yt&&(yt.tags=Te),await Ae()}catch(Te){r.value=Te instanceof Error?Te.message:String(Te)}}async function Ye(R,_e){try{const Te=await wp(R,_e),Ke=t.value.find(Gn=>Gn.id===R);Ke&&(Ke.tags=Te);const yt=n.value.get(R);yt&&(yt.tags=Te),await Ae()}catch(Te){r.value=Te instanceof Error?Te.message:String(Te)}}function Qe(R){return`tag-color-${R%8}`}return{revision:e,summaries:t,loadedConversations:n,conversations:I,ungrouped:Q,loading:o,loadingSession:i,error:r,connected:l,view:v,inspectorTab:g,selectedSessionId:w,selectionMode:P,selectedEntryId:$,sourceFilter:_,modelFilter:T,density:F,messageFocusCategory:j,messageFocusToken:L,messageFocusTool:K,messageFocusIndex:O,messageFocusOpenDetail:de,messageFocusFile:ae,messagesMode:ge,timelineMode:B,timelineStackMode:ce,timelineHiddenLegendKeys:Z,timelineShowLimitOverlay:C,timelineShowCacheOverlay:X,recentlyUpdated:ne,compareSessionIds:W,compareMode:re,allTags:c,tagFilter:p,loadingTags:f,filteredConversations:ie,filteredSummaries:x,sources:D,models:Y,selectedSession:k,selectedEntry:b,totalCost:h,totalRequests:a,load:d,loadConversationEntries:E,handleSSEEvent:q,selectSession:G,followLive:z,pinEntry:fe,setView:pe,setInspectorTab:ue,setSourceFilter:ee,setModelFilter:$e,focusMessageCategory:me,focusMessageTool:Se,focusMessageByIndex:Me,focusMessageFile:Re,clearMessageFocus:ot,toggleCompareSession:He,enterCompare:De,exitCompare:tt,loadEntryDetail:vt,getEntryDetail:V,entryDetailLoading:N,entryDetailVersion:S,initializeDensity:be,setDensity:Ie,deleteSession:H,reset:ye,loadTags:Ae,setTagFilter:at,clearTagFilter:Mt,updateSessionTags:xn,addTagToSession:Fe,removeTagFromSession:Ye,getTagColorClass:Qe}});function Sp(e,t){const n=he(!1);let s=null,o=null;function i(){s&&s.close(),s=new EventSource(e),s.onopen=()=>{n.value=!0},s.onmessage=l=>{try{const c=JSON.parse(l.data);t(c)}catch{}},s.onerror=()=>{n.value=!1,s==null||s.close(),s=null,o&&clearTimeout(o),o=setTimeout(i,2e3)}}function r(){o&&(clearTimeout(o),o=null),s&&(s.close(),s=null),n.value=!1}return i(),Ls(r),{connected:n,disconnect:r,reconnect:i}}function ke(e){return e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":String(e)}function kt(e){return e==null?"--":"$"+e.toFixed(2)}function hi(e){return e>=1e3?(e/1e3).toFixed(1)+"s":Math.round(e)+"ms"}function vi(e,t=!1){return(t?e:e*100).toFixed(1)+"%"}function ln(e){if(!e)return"?";const t=e.match(/(opus|sonnet|haiku)-(\d+(?:\.\d+)?)/);if(t)return t[1]+"-"+t[2];const n=e.match(/(gpt-4o(?:-mini)?|gpt-4|gpt-3\.5)/);if(n)return n[1];const s=e.match(/(o[134](?:-mini)?)/);if(s)return s[1];const o=e.match(/(gemini-[\d.]+-(?:pro|flash)(?:-\w+)?)/);if(o)return o[1];const i=e.split(/[-_]/);return i.length>2?i.slice(0,3).join("-"):e}function Es(e){const t=(e||"").toLowerCase();return t.includes("claude")?"badge-claude":t.includes("codex")?"badge-codex":t.includes("gemini")||t==="gm"?"badge-gemini":t.includes("aider")?"badge-aider":t.includes("kimi")?"badge-kimi":t==="pi"||t.startsWith("pi-")?"badge-pi":"badge-unknown"}function gi(e){switch(e){case"good":return"#10b981";case"needs-work":return"#f59e0b";case"poor":return"#ef4444";default:return"#64748b"}}const Cp={class:"tag-editor"},Mp={class:"tag-list"},Ep=["onClick"],Pp={key:1,class:"input-wrap"},Ip={key:0,class:"suggestions"},Ap=["onMousedown"],Lp=et({__name:"TagEditor",props:{conversationId:{},tags:{}},setup(e){const t=e,n=$t(),s=he(!1),o=he(""),i=he(),r=he(-1),l=A(()=>n.allTags.map(L=>L.name)),c=A(()=>{const L=new Set(t.tags);return l.value.filter(K=>!L.has(K))}),p=A(()=>{const L=o.value.trim().toLowerCase();return L?c.value.filter(K=>K.includes(L)).slice(0,5):c.value.slice(0,5)}),f=A(()=>o.value.trim().toLowerCase()),v=A(()=>!(!f.value||t.tags.includes(f.value)||p.value.includes(f.value))),g=A(()=>s.value&&(p.value.length>0||v.value));Ge(s,L=>{L?(n.loadTags(),Je(()=>{var K;return(K=i.value)==null?void 0:K.focus()})):(o.value="",r.value=-1)});const w=A(()=>p.value.length+(v.value?1:0));function P(){s.value=!0}function $(){s.value=!1}async function _(L){const K=L.trim().toLowerCase();if(K){if(t.tags.includes(K)){o.value="";return}await n.addTagToSession(t.conversationId,K),o.value="",r.value=-1}}async function T(L){await n.removeTagFromSession(t.conversationId,L)}function F(L){L.key==="Enter"?(L.preventDefault(),r.value>=0&&r.value<p.value.length?_(p.value[r.value]):o.value.trim()&&_(o.value)):L.key==="Escape"?$():L.key==="ArrowDown"?(L.preventDefault(),r.value=Math.min(r.value+1,w.value-1)):L.key==="ArrowUp"?(L.preventDefault(),r.value=Math.max(r.value-1,-1)):L.key==="Backspace"&&!o.value&&t.tags.length>0&&T(t.tags[t.tags.length-1])}function j(){setTimeout(()=>{o.value.trim()||$()},150)}return(L,K)=>(m(),y("div",Cp,[u("div",Mp,[(m(!0),y(ve,null,Ce(e.tags,(O,de)=>(m(),y("span",{key:O,class:le(["tag-pill",`tag-color-${de%8}`])},[xe(M(O)+" ",1),u("button",{class:"tag-remove",title:"Remove tag",onClick:St(ae=>T(O),["stop"])},[...K[2]||(K[2]=[u("i",{class:"i-carbon-close"},null,-1)])],8,Ep)],2))),128)),s.value?(m(),y("div",Pp,[Ve(u("input",{ref_key:"inputRef",ref:i,"onUpdate:modelValue":K[0]||(K[0]=O=>o.value=O),type:"text",class:"tag-input",placeholder:"tag...",onKeydown:F,onBlur:j},null,544),[[Ud,o.value]]),g.value?(m(),y("div",Ip,[(m(!0),y(ve,null,Ce(p.value,(O,de)=>(m(),y("div",{key:O,class:le(["suggestion",{selected:de===r.value}]),onMousedown:St(ae=>_(O),["prevent"])},M(O),43,Ap))),128)),v.value?(m(),y("div",{key:0,class:le(["suggestion new-tag",{selected:r.value===p.value.length}]),onMousedown:K[1]||(K[1]=St(O=>_(o.value),["prevent"]))},' Create "'+M(f.value)+'" ',35)):oe("",!0)])):oe("",!0)])):(m(),y("button",{key:0,class:"add-btn",title:"Add tag",onClick:P},[...K[3]||(K[3]=[u("i",{class:"i-carbon-add"},null,-1)])]))])]))}}),rt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},Op=rt(Lp,[["__scopeId","data-v-09e55ec4"]]),Rp={class:"toolbar"},Dp={key:0,class:"session-ctx"},Np={class:"session-model"},Fp=["title"],zp=["title","aria-label"],Bp={key:0,class:"session-id-toast"},Hp={key:2,class:"toolbar-sep"},jp={class:"session-stat"},Vp={class:"session-stat cost"},Up={key:3,class:"session-stat"},Kp=["title"],Wp={key:0,class:"toolbar-tag-overflow"},qp={key:0,class:"tag-popover"},Gp={class:"compare-label"},Jp={class:"toolbar-right"},Yp={class:"toolbar-stat"},Xp={class:"toolbar-stat"},Zp={class:"toolbar-stat cost"},Qp={key:1,class:"toolbar-dropdown"},eh={key:2,class:"toolbar-dropdown"},th=["disabled"],nh=et({__name:"AppToolbar",setup(e){const t=he(!1),n=he();function s(){t.value=!t.value,t.value&&r.loadTags()}function o(){t.value=!1}function i(Z){t.value&&n.value&&!n.value.contains(Z.target)&&o()}kn(()=>document.addEventListener("click",i,!0)),Ls(()=>document.removeEventListener("click",i,!0)),Ge(()=>r.selectedSessionId,()=>{t.value=!1});const r=$t(),l=he(!1),c=he(!1),p=he(!1),f=A(()=>r.view==="inspector"&&!!r.selectedSession),v=A(()=>r.selectedSession),g=A(()=>r.totalRequests>0),w=A(()=>f.value&&!!r.selectedSessionId),P=A(()=>{const Z=r.selectedSessionId;return Z?r.summaries.find(C=>C.id===Z)??null:null});function $(Z){if(!Z)return"";let C=Z;/^\/home\/[^/]+(\/|$)/.test(C)?C=C.replace(/^\/home\/[^/]+/,"~"):/^\/Users\/[^/]+(\/|$)/.test(C)&&(C=C.replace(/^\/Users\/[^/]+/,"~"));const X=C.split("/");return X.length>3?X.slice(-3).join("/"):C}const _=A(()=>r.selectedSessionId??"");function T(Z){return String(Z).trim().replace(/[^a-zA-Z0-9._-]+/g,"_").replace(/^_+|_+$/g,"").slice(0,80)||"unknown"}function F(Z,C){const X=Z==="lhar"?"lhar":"lhar.json";return`context-lens-export-${`session-${T(C||"all")}`}-privacy-standard.${X}`}async function j(Z,C){const X=await fetch(Z);if(!X.ok)throw new Error(`Download failed: ${X.status}`);const ne=await X.blob(),U=URL.createObjectURL(ne);try{const se=document.createElement("a");se.href=U,se.download=C,se.style.display="none",document.body.appendChild(se),se.click(),document.body.removeChild(se)}finally{URL.revokeObjectURL(U)}}async function L(Z,C){const X=C==="session"?r.selectedSessionId??void 0:void 0,ne=mp(Z,X),U=F(Z,X);try{await j(ne,U)}catch{window.open(ne,"_blank")}l.value=!1}function K(){l.value=!l.value,l.value&&(c.value=!1)}function O(){c.value=!c.value,c.value&&(l.value=!1)}function de(){confirm("Clear all captured data?")&&r.reset(),c.value=!1}function ae(){const Z=r.selectedSessionId;!Z||!w.value||(confirm("Remove this session?")&&r.deleteSession(Z),c.value=!1)}function W(){r.setView("dashboard")}async function re(){const Z=_.value;if(Z){try{await navigator.clipboard.writeText(Z),p.value=!0}catch{}setTimeout(()=>{p.value=!1},1400)}}function ge(Z){return Z.length<=18?Z:`${Z.slice(0,8)}…${Z.slice(-8)}`}function B(Z){return p.value?`Copied: ${Z}`:`Session ID: ${Z} (click to copy)`}function ce(Z){(Z.key==="Enter"||Z.key===" ")&&(Z.preventDefault(),re())}return(Z,C)=>(m(),y("header",Rp,[u("a",{class:"toolbar-brand toolbar-brand-btn",href:"#sessions",onClick:St(W,["prevent"])},[...C[8]||(C[8]=[Ca('<svg class="logo-mark" width="18" height="18" viewBox="0 0 18 18" aria-hidden="true" data-v-d2b451d0><circle cx="9" cy="9" r="7.5" fill="none" stroke="var(--accent-blue)" stroke-width="1" opacity="0.35" data-v-d2b451d0></circle><circle cx="9" cy="9" r="4" fill="none" stroke="var(--accent-blue)" stroke-width="1" opacity="0.6" data-v-d2b451d0></circle><circle cx="9" cy="9" r="1.5" fill="var(--accent-blue)" data-v-d2b451d0></circle></svg><span class="brand-text" data-v-d2b451d0>Context Lens</span>',2)])]),Oe(Qt,{name:"session-ctx"},{default:it(()=>{var X,ne,U,se;return[f.value&&v.value?(m(),y("div",Dp,[C[11]||(C[11]=u("span",{class:"toolbar-sep"},null,-1)),u("span",{class:le(["session-badge",J(Es)(v.value.source)])},M(v.value.source||"?"),3),u("span",Np,M(J(ln)(((X=P.value)==null?void 0:X.latestModel)??"")),1),v.value.workingDirectory?(m(),y("span",{key:0,class:"session-dir",title:v.value.workingDirectory},M($(v.value.workingDirectory)),9,Fp)):oe("",!0),C[12]||(C[12]=u("span",{class:"toolbar-sep"},null,-1)),_.value?(m(),y("span",{key:1,class:le(["session-id",{copied:p.value}]),title:B(_.value),role:"button",tabindex:"0","aria-label":B(_.value),onClick:re,onKeydown:ce},[xe(" SID "+M(ge(_.value))+" ",1),p.value?(m(),y("span",Bp,"Copied")):oe("",!0)],42,zp)):oe("",!0),_.value?(m(),y("span",Hp)):oe("",!0),u("span",jp,M(((ne=P.value)==null?void 0:ne.entryCount)??v.value.entries.length)+" turns",1),u("span",Vp,M(J(kt)(((U=P.value)==null?void 0:U.totalCost)??0)),1),(se=P.value)!=null&&se.healthScore?(m(),y("span",Up,[C[9]||(C[9]=xe(" Latest health ",-1)),u("span",{class:le(["session-health",{good:P.value.healthScore.rating==="good",warn:P.value.healthScore.rating==="needs-work",bad:P.value.healthScore.rating==="poor"}])},M(P.value.healthScore.overall),3)])):oe("",!0),C[13]||(C[13]=u("span",{class:"toolbar-sep"},null,-1)),_.value?(m(),y("div",{key:4,ref_key:"toolbarTagsEl",ref:n,class:"toolbar-tags",onClick:C[0]||(C[0]=St(()=>{},["stop"]))},[u("button",{class:le(["tags-toggle",{active:t.value,tagged:(v.value.tags??[]).length>0}]),title:t.value?"Close tag editor":"Edit tags",onClick:s},[C[10]||(C[10]=u("i",{class:"i-carbon-tag"},null,-1)),(v.value.tags??[]).length===0?(m(),y(ve,{key:0},[xe(" Tags ")],64)):(m(),y(ve,{key:1},[(m(!0),y(ve,null,Ce((v.value.tags??[]).slice(0,2),(we,N)=>(m(),y("span",{key:we,class:le(["toolbar-tag-pill",`tag-color-${N%8}`])},M(we),3))),128)),(v.value.tags??[]).length>2?(m(),y("span",Wp," +"+M((v.value.tags??[]).length-2),1)):oe("",!0)],64))],10,Kp),Oe(Qt,{name:"tag-popover"},{default:it(()=>[t.value?(m(),y("div",qp,[Oe(Op,{"conversation-id":_.value,tags:v.value.tags??[]},null,8,["conversation-id","tags"])])):oe("",!0)]),_:1})],512)):oe("",!0)])):oe("",!0)]}),_:1}),J(r).compareMode?(m(),y(ve,{key:0},[C[16]||(C[16]=u("span",{class:"toolbar-sep"},null,-1)),u("span",Gp,[C[14]||(C[14]=u("i",{class:"i-carbon-compare"},null,-1)),xe(" Comparing "+M(J(r).compareSessionIds.size)+" sessions ",1)]),u("button",{class:"compare-exit-btn",onClick:C[1]||(C[1]=X=>J(r).exitCompare())},[...C[15]||(C[15]=[u("i",{class:"i-carbon-close"},null,-1),xe(" Exit ",-1)])])],64)):oe("",!0),u("div",Jp,[u("span",{class:le(["connection",{live:J(r).connected}])},[C[17]||(C[17]=u("span",{class:"connection-dot"},null,-1)),xe(" "+M(J(r).connected?"Live":"Offline"),1)],2),f.value?oe("",!0):(m(),y(ve,{key:0},[u("span",Yp,M(J(r).conversations.length)+" session"+M(J(r).conversations.length!==1?"s":""),1),u("span",Xp,M(J(r).totalRequests)+" req"+M(J(r).totalRequests!==1?"s":""),1),u("span",Zp,M(J(kt)(J(r).totalCost)),1)],64)),g.value?(m(),y("div",Qp,[u("button",{class:"toolbar-control",onClick:K},[...C[18]||(C[18]=[u("i",{class:"i-carbon-download"},null,-1),xe(" Export ",-1)])]),Oe(Qt,{name:"dropdown"},{default:it(()=>[l.value?(m(),y("div",{key:0,class:"dropdown-menu",onMouseleave:C[6]||(C[6]=X=>l.value=!1)},[u("button",{class:"dropdown-item",onClick:C[2]||(C[2]=X=>L("lhar.json","all"))},[...C[19]||(C[19]=[u("i",{class:"i-carbon-document"},null,-1),xe(" All (.lhar.json)",-1)])]),u("button",{class:"dropdown-item",onClick:C[3]||(C[3]=X=>L("lhar","all"))},[...C[20]||(C[20]=[u("i",{class:"i-carbon-document"},null,-1),xe(" All (.lhar)",-1)])]),J(r).selectedSessionId?(m(),y(ve,{key:0},[C[23]||(C[23]=u("div",{class:"dropdown-sep"},null,-1)),u("button",{class:"dropdown-item",onClick:C[4]||(C[4]=X=>L("lhar.json","session"))},[...C[21]||(C[21]=[u("i",{class:"i-carbon-document"},null,-1),xe(" Session (.lhar.json)",-1)])]),u("button",{class:"dropdown-item",onClick:C[5]||(C[5]=X=>L("lhar","session"))},[...C[22]||(C[22]=[u("i",{class:"i-carbon-document"},null,-1),xe(" Session (.lhar)",-1)])])],64)):oe("",!0)],32)):oe("",!0)]),_:1})])):oe("",!0),g.value?(m(),y("div",eh,[u("button",{class:"toolbar-control",onClick:O},[...C[24]||(C[24]=[u("i",{class:"i-carbon-overflow-menu-horizontal"},null,-1),xe(" Menu ",-1)])]),Oe(Qt,{name:"dropdown"},{default:it(()=>[c.value?(m(),y("div",{key:0,class:"dropdown-menu",onMouseleave:C[7]||(C[7]=X=>c.value=!1)},[u("button",{class:"dropdown-item dropdown-item--danger",onClick:de},[...C[25]||(C[25]=[u("i",{class:"i-carbon-trash-can"},null,-1),xe(" Reset all ",-1)])]),u("button",{class:le(["dropdown-item dropdown-item--danger",{"dropdown-item--disabled":!w.value}]),disabled:!w.value,onClick:ae},[...C[26]||(C[26]=[u("i",{class:"i-carbon-subtract-alt"},null,-1),xe(" Remove this session ",-1)])],10,th)],32)):oe("",!0)]),_:1})])):oe("",!0)])]))}}),sh=rt(nh,[["__scopeId","data-v-d2b451d0"]]),oh=["value","placeholder"],ih=et({__name:"SearchInput",props:{modelValue:{},placeholder:{default:"Search…"},autoFocus:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,s=t,o=he(!1),i=he();function r(){var c;s("update:modelValue",""),(c=i.value)==null||c.focus()}function l(){var c;n.modelValue?s("update:modelValue",""):(c=i.value)==null||c.blur()}return mu(()=>{var c;n.autoFocus&&((c=i.value)==null||c.focus())}),(c,p)=>(m(),y("div",{class:le(["search-input-root",{focused:o.value,active:e.modelValue.length>0}]),onClick:p[3]||(p[3]=f=>{var v;return(v=i.value)==null?void 0:v.focus()})},[p[5]||(p[5]=u("i",{class:"i-carbon-search search-input-icon"},null,-1)),u("input",{ref_key:"inputRef",ref:i,value:e.modelValue,type:"text",class:"search-input-field",placeholder:e.placeholder,onInput:p[0]||(p[0]=f=>s("update:modelValue",f.target.value)),onFocus:p[1]||(p[1]=f=>o.value=!0),onBlur:p[2]||(p[2]=f=>o.value=!1),onKeydown:Oa(l,["escape"])},null,40,oh),e.modelValue.length>0?(m(),y("button",{key:0,class:"search-input-clear",tabindex:"-1",title:"Clear",onClick:St(r,["stop"])},[...p[4]||(p[4]=[u("i",{class:"i-carbon-close"},null,-1)])])):oe("",!0),p[6]||(p[6]=u("div",{class:"search-input-accent"},null,-1))],2))}}),rh=rt(ih,[["__scopeId","data-v-70f5ee93"]]),lh={class:"tag-filter"},ah={key:0,class:"dropdown-loading"},ch=["onClick"],uh={class:"tag-name"},dh={class:"tag-count"},fh={key:2,class:"dropdown-empty"},ph=et({__name:"TagFilter",setup(e){const t=$t(),n=he(!1),s=A(()=>t.allTags.length>0),o=A(()=>t.tagFilter),i=A(()=>o.value?`Tag: ${o.value}`:"Tag");function r(p){t.setTagFilter(p),n.value=!1}function l(){t.clearTagFilter(),n.value=!1}function c(){n.value=!n.value,n.value&&t.loadTags()}return(p,f)=>(m(),y("div",lh,[u("button",{class:le(["filter-btn",{active:o.value}]),onClick:c},[xe(M(i.value)+" ",1),u("i",{class:le(["i-carbon-chevron-down dropdown-icon",{open:n.value}])},null,2)],2),Oe(Qt,{name:"dropdown"},{default:it(()=>[n.value?(m(),y("div",{key:0,class:"dropdown-menu",onMouseleave:f[0]||(f[0]=v=>n.value=!1)},[J(t).loadingTags?(m(),y("div",ah," Loading... ")):s.value?(m(),y(ve,{key:1},[u("button",{class:le(["dropdown-item",{active:!o.value}]),onClick:l},[...f[1]||(f[1]=[u("span",{class:"all-label"},"All sessions",-1)])],2),f[2]||(f[2]=u("div",{class:"dropdown-sep"},null,-1)),(m(!0),y(ve,null,Ce(J(t).allTags,(v,g)=>(m(),y("button",{key:v.name,class:le(["dropdown-item",{active:o.value===v.name}]),onClick:w=>r(v.name)},[u("span",{class:le(["tag-dot",J(t).getTagColorClass(g)])},null,2),u("span",uh,M(v.name),1),u("span",dh,M(v.count),1)],10,ch))),128))],64)):(m(),y("div",fh," No tags yet "))],32)):oe("",!0)]),_:1})]))}}),hh=rt(ph,[["__scopeId","data-v-8f64535a"]]);function Qn(e){return e<=0?0:e>=1?1:e}function vh(e,t){const n=e.healthScore,s=n?Qn((100-n.overall)/100):null,o=e.contextLimit?Qn(e.latestTotalTokens/e.contextLimit):0,i=s===null?o:Qn(s*.7+o*.3),r=t>0?Qn(e.totalCost/t):0,l=Qn(i*.7+r*.3);let c="Healthy",p="priority-healthy",f="prio-healthy";l>=.7?(c="Critical",p="priority-critical",f="prio-critical"):l>=.45&&(c="Warning",p="priority-warning",f="prio-warning");const v=`Priority ${Math.round(l*100)} = 0.7×risk(${Math.round(i*100)}) + 0.3×cost(${Math.round(r*100)}).`;return{risk:i,normalizedCost:r,score:l,label:c,toneClass:p,barClass:f,tooltip:v}}function fc(e,t,n){var w,P;const s=[],o=e.contextInfo,i=e.composition||[],r=i.reduce(($,_)=>$+_.tokens,0),l=Mo(o.messages||[]),c=i.find($=>$.category==="tool_results");if(c&&r>0&&c.pct>25){let $=0,_="";for(const T of o.messages||[])if(It(T)==="tool_results"&&T.tokens>$&&($=T.tokens,T.contentBlocks)){for(const F of T.contentBlocks)if(F.type==="tool_result"&&F.tool_use_id&&l[F.tool_use_id]){_=l[F.tool_use_id];break}}if($>2e3){const T=Math.round($/r*100);s.push({severity:"high",title:`Large tool result${_?": "+_:""} (${ke($)} tokens, ${T}% of context)`,detail:"This single result reduces space for conversation history and is re-sent every turn. You may want to truncate output or use summary flags.",impact:`${ke($)} tok`})}}const p=i.find($=>$.category==="tool_definitions");if(p&&p.pct>30){const $=new Set;for(const j of t)for(const L of j.contextInfo.messages||[])if(L.contentBlocks)for(const K of L.contentBlocks)K.type==="tool_use"&&K.name&&$.add(K.name);const _=[];if(o.tools)for(const j of o.tools){const L="name"in j?j.name:(w=j.function)==null?void 0:w.name;L&&_.push(L)}const T=_.filter(j=>!$.has(j)),F=_.length;if(F>$.size+3){const j=T.slice(0,5).join(", ")+(T.length>5?` +${T.length-5} more`:""),L=Math.round(p.tokens*T.length/F);s.push({severity:"high",title:`${$.size}/${F} tools used, ${T.length} idle`,detail:`Unused: ${j}. Definitions cost ~${ke(L)} tokens and are re-sent every turn. You may want to remove unused tools to free context.`,impact:`~${ke(L)} tok`})}}if(c&&c.pct>60){const $=i.find(j=>j.category==="user_text"),_=$?$.pct:0,T=new Map;for(const j of o.messages||[])if(It(j)==="tool_results"&&j.contentBlocks){for(const L of j.contentBlocks)if(L.type==="tool_result"&&L.tool_use_id){const K=l[L.tool_use_id]||"unknown";T.set(K,(T.get(K)||0)+(j.tokens||0))}}const F=Array.from(T.entries()).sort((j,L)=>L[1]-j[1]).slice(0,3).map(([j,L])=>`${j} (${ke(L)})`).join(", ");s.push({severity:"med",title:`Tool results dominate: ${c.pct}% of context`,detail:`Top tools: ${F}. User text is only ${_}%. Large results crowd out conversation history.`,impact:"Structural"})}const f=e.contextLimit>0?Math.round(o.totalTokens/e.contextLimit*100):0;f>80?s.push({severity:"high",title:`Context utilization critical: ${f}%`,detail:`${ke(o.totalTokens)} of ${ke(e.contextLimit)} tokens. Overflow risk is elevated, and older messages may be dropped or summarized.`,impact:"Critical"}):f>60&&s.push({severity:"med",title:`Context utilization high: ${f}%`,detail:`${ke(o.totalTokens)} of ${ke(e.contextLimit)} tokens used.`,impact:"Monitor"});const v=t.indexOf(e);if(v>0){let $=-1;for(let _=v-1;_>=0;_--)if((P=n[_])!=null&&P.isMain){$=_;break}if($>=0){const _=t[$].contextInfo.totalTokens;o.totalTokens<_*.7&&s.push({severity:"med",title:"Compaction detected",detail:`Tokens dropped ${ke(_)} → ${ke(o.totalTokens)}. Context was summarized or truncated — older details may be lost.`,impact:`-${ke(_-o.totalTokens)} tok`})}}const g=i.find($=>$.category==="system_injections");g&&g.pct>5&&s.push({severity:"med",title:`System injections: ${g.pct}% of context`,detail:`${ke(g.tokens)} tokens of system-reminder blocks injected into messages. These are re-sent every turn, reducing space for actual conversation.`,impact:`${ke(g.tokens)} tok`});for(const $ of e.securityAlerts||[]){const _=$.severity==="high"?"high":$.severity==="medium"?"med":"low",T=$.toolName?`tool result: ${$.toolName}`:`${$.role} message`;s.push({severity:_,title:`⚠ ${$.pattern.replace(/_/g," ")} in ${T} (msg ${$.messageIndex+1})`,detail:$.match,impact:$.severity,messageIndex:$.messageIndex,highlight:$.match})}return s}const gh={class:"kpi-row"},mh={class:"kpi-card"},yh={class:"kpi-value"},_h={class:"kpi-card"},bh={class:"kpi-value accent-blue"},wh={class:"kpi-card"},kh={class:"kpi-value"},$h={class:"kpi-card"},xh={class:"kpi-value accent-green"},Th={class:"kpi-card"},Sh={class:"kpi-value accent-amber"},Ch={class:"section-head"},Mh={class:"section-count"},Eh={class:"filter-group"},Ph={key:0,class:"filter-dropdown"},Ih=["onClick"],Ah={class:"sort-group"},Lh={class:"table-wrap"},Oh={class:"ledger"},Rh={key:0,class:"col-select"},Dh=["onClick"],Nh={key:0,class:"col-select"},Fh={class:"col-priority"},zh={class:"col-source"},Bh={key:0,class:"row-tags"},Hh=["title"],jh={key:0,class:"row-tag-more"},Vh={class:"col-model"},Uh={class:"model-text"},Kh={class:"col-dir"},Wh=["title"],qh={class:"col-turns"},Gh={class:"num"},Jh={class:"col-context"},Yh={class:"col-cost"},Xh={class:"num green"},Zh={class:"col-health"},Qh={class:"health-cell"},ev={key:0,class:"health-tooltip"},tv={class:"health-tooltip-title"},nv={class:"health-audit-name"},sv={class:"col-spark"},ov=["innerHTML"],iv={class:"col-time"},rv=["title"],lv={class:"col-arrow"},av=["href","onClick"],cv=["colspan"],uv={class:"expand-content"},dv={class:"expand-inner"},fv={key:0,class:"expand-loading"},pv={key:0,class:"expand-section"},hv={class:"expand-section-label"},vv={class:"comp-tape"},gv=["title"],mv={key:0,class:"comp-seg-label"},yv={class:"expand-section"},_v={class:"finding-text"},bv={key:1,class:"finding"},wv={key:0,class:"compare-bar"},kv={class:"compare-bar-text"},$v={key:0,class:"dashboard-empty"},xv={key:1,class:"dashboard-empty"},Tv=et({__name:"DashboardView",setup(e){const t=$t(),n=he("recent"),s=he(new Set),o=he(!1),i=he(""),r=he(!1);Ge(()=>t.compareSessionIds.size,h=>{h===0&&r.value&&(r.value=!1)});function l(){r.value=!r.value,r.value||(t.compareSessionIds=new Set)}function c(h){return t.compareSessionIds.has(h)}function p(h){r.value?t.toggleCompareSession(h):ie(h)}const f=A(()=>t.compareSessionIds.size),v=he(null),g=A(()=>{const h=new Set;for(const a of t.summaries)a.source&&h.add(a.source);return Array.from(h).sort()});function w(h){return v.value?v.value.has(h):!0}function P(h){if(!v.value){const d=new Set(g.value);d.delete(h),d.size>0&&(v.value=d);return}const a=new Set(v.value);if(a.has(h)){if(a.delete(h),a.size===0)return}else a.add(h);a.size===g.value.length?v.value=null:v.value=a}const $=A(()=>v.value!==null),_=A(()=>v.value?`Source (${v.value.size})`:"Source"),T=A(()=>{let h=t.summaries;v.value&&(h=h.filter(d=>v.value.has(d.source)));const a=i.value.trim().toLowerCase();if(a&&(h=h.filter(d=>[d.id,d.source,d.label,d.workingDirectory??"",d.latestModel].join("\0").toLowerCase().includes(a))),t.tagFilter){const d=t.tagFilter.toLowerCase();h=h.filter(E=>{var q;return(q=E.tags)==null?void 0:q.includes(d)})}return h}),F=A(()=>{let h=0;for(const a of T.value)h=Math.max(h,a.totalCost);return h}),j=A(()=>{const h=new Map;for(const a of T.value)h.set(a.id,vh(a,F.value));return h}),L=A(()=>{const h=[...T.value];return n.value==="priority"?h.sort((a,d)=>{var G,z;const E=((G=j.value.get(a.id))==null?void 0:G.score)??0;return(((z=j.value.get(d.id))==null?void 0:z.score)??0)-E}):n.value==="cost"&&h.sort((a,d)=>d.totalCost-a.totalCost),h}),K=A(()=>T.value.length),O=A(()=>T.value.reduce((h,a)=>h+a.entryCount,0)),de=A(()=>T.value.reduce((h,a)=>h+a.latestTotalTokens,0)),ae=A(()=>T.value.reduce((h,a)=>h+a.totalCost,0)),W=A(()=>{const h=T.value.filter(d=>{var E;return((E=d.healthScore)==null?void 0:E.overall)!=null});if(h.length===0)return 0;const a=h.reduce((d,E)=>{var q;return d+(((q=E.healthScore)==null?void 0:q.overall)??0)},0);return Math.round(a/h.length)});function re(h){return j.value.get(h)??{score:0,label:"Healthy",toneClass:"priority-healthy",barClass:"prio-healthy",risk:0,normalizedCost:0,tooltip:""}}function ge(h){return h.contextLimit?h.latestTotalTokens/h.contextLimit:0}function B(h){return h>=.8?"util-high":h>=.6?"util-mid":"util-low"}function ce(h){var d;const a=(d=h.healthScore)==null?void 0:d.rating;return a==="poor"?"health-bad":a==="needs-work"?"health-warn":"health-good"}function Z(h){return h>=90?"health-good":h>=50?"health-warn":"health-bad"}function C(h){const a=Date.now()-new Date(h).getTime();return a<6e4?"just now":a<36e5?`${Math.floor(a/6e4)}m ago`:a<864e5?`${Math.floor(a/36e5)}h ago`:`${Math.floor(a/864e5)}d ago`}function X(h){const a=new Date(h),d=a.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),E=a.toLocaleDateString("en-CA");return`${d} on ${E}`}function ne(h){if(!h)return"";let a=h;/^\/home\/[^/]+(\/|$)/.test(a)?a=a.replace(/^\/home\/[^/]+/,"~"):/^\/Users\/[^/]+(\/|$)/.test(a)&&(a=a.replace(/^\/Users\/[^/]+/,"~"));const d=a.split("/");return d.length>2?d.slice(-2).join("/"):a}function U(h){return h==="prio-critical"?"#ef4444":h==="prio-warning"?"#f59e0b":"#0ea5e9"}function se(h,a){if(h.length===0)return"";const d=72,E=22,q=Math.max(...h);if(q===0)return"";const G=h.map((pe,ue)=>{const ee=h.length<=1?d/2:ue/(h.length-1)*d,$e=E-pe/q*(E-4)-2;return`${ee.toFixed(1)},${$e.toFixed(1)}`}),z=G.join(" ")+` ${d},${E} 0,${E}`,fe="sg"+a.replace("#","");return`<svg viewBox="0 0 ${d} ${E}" preserveAspectRatio="none" style="display:block;width:100%;height:100%"><defs><linearGradient id="${fe}" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="${a}" stop-opacity="0.15"/><stop offset="100%" stop-color="${a}" stop-opacity="0.02"/></linearGradient></defs><polygon points="${z}" fill="url(#${fe})"/><polyline points="${G.join(" ")}" fill="none" stroke="${a}" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/><circle cx="${G[G.length-1].split(",")[0]}" cy="${G[G.length-1].split(",")[1]}" r="2" fill="${a}"/></svg>`}function we(h){const a=h.tokenHistory;if(!a||a.length<2)return"";const d=re(h.id);return se(a,U(d.barClass))}const N=[{key:"system_prompt",label:"System",color:"var(--cat-system, #3b82f6)"},{key:"tool_definitions",label:"Tool defs",color:"var(--cat-tools, #ec4899)"},{key:"tool_results",label:"Tool results",color:"var(--cat-tool-results, #10b981)"},{key:"assistant_text",label:"Assistant",color:"var(--cat-assistant, #f59e0b)"},{key:"user_text",label:"User",color:"var(--cat-user, #06b6d4)"},{key:"thinking",label:"Thinking",color:"var(--cat-thinking, #8b5cf6)"},{key:"system_injections",label:"Injections",color:"var(--cat-injections, #6366f1)"}];function S(h){const a=t.loadedConversations.get(h.id);return!a||a.entries.length===0?[]:a.entries[0].composition||[]}function I(h){const a=t.loadedConversations.get(h.id);if(!a||a.entries.length===0)return[];const d=a.entries[0],E=[...a.entries].reverse(),q=nn(E);return fc(d,E,q)}function Q(h){return s.value.has(h)}async function ie(h){const a=new Set(s.value);a.has(h)?a.delete(h):(a.add(h),t.loadedConversations.has(h)||await t.loadConversationEntries(h)),s.value=a}function x(){s.value=new Set}function D(h){return`#session/${encodeURIComponent(h)}?tab=overview`}function Y(h){t.setInspectorTab("overview"),t.selectSession(h),t.setView("inspector")}function k(){o.value=!1}function b(h){h.key==="Escape"&&x()}return(h,a)=>(m(),y("div",{class:"dashboard",onKeydown:b,tabindex:"-1",onClick:k},[u("div",gh,[u("div",mh,[u("div",yh,M(K.value),1),a[7]||(a[7]=u("div",{class:"kpi-label"},"Sessions",-1))]),u("div",_h,[u("div",bh,M(O.value),1),a[8]||(a[8]=u("div",{class:"kpi-label"},"Requests",-1))]),u("div",wh,[u("div",kh,M(J(ke)(de.value)),1),a[9]||(a[9]=u("div",{class:"kpi-label"},"Total Tokens",-1))]),u("div",$h,[u("div",xh,M(J(kt)(ae.value)),1),a[10]||(a[10]=u("div",{class:"kpi-label"},"Total Cost",-1))]),u("div",Th,[u("div",Sh,M(W.value),1),a[11]||(a[11]=u("div",{class:"kpi-label"},"Avg Health",-1))])]),u("div",Ch,[a[15]||(a[15]=u("span",{class:"section-title"},"Sessions",-1)),u("span",Mh,M(T.value.length),1),Oe(rh,{modelValue:i.value,"onUpdate:modelValue":a[0]||(a[0]=d=>i.value=d),placeholder:"Filter by ID, directory, model…"},null,8,["modelValue"]),u("div",Eh,[u("button",{class:le(["compare-toggle",{active:r.value}]),onClick:l,title:"Select sessions to compare"},[...a[12]||(a[12]=[u("i",{class:"i-carbon-compare"},null,-1),xe(" Compare ",-1)])],2),g.value.length>1?(m(),y("div",Ph,[u("button",{class:le(["filter-btn",{"has-filter":$.value}]),onClick:a[1]||(a[1]=St(d=>o.value=!o.value,["stop"]))},[xe(M(_.value)+" ",1),a[13]||(a[13]=u("span",{class:"caret"},null,-1))],2),o.value?(m(),y("div",{key:0,class:"filter-menu",onClick:a[2]||(a[2]=St(()=>{},["stop"]))},[(m(!0),y(ve,null,Ce(g.value,d=>(m(),y("div",{key:d,class:le(["filter-option",{checked:w(d)}]),onClick:E=>P(d)},[a[14]||(a[14]=u("span",{class:"check"},[u("i",{class:"i-carbon-checkmark"})],-1)),u("span",{class:le(["source-badge",J(Es)(d)])},M(d),3)],10,Ih))),128))])):oe("",!0)])):oe("",!0),Oe(hh),u("div",Ah,[u("button",{class:le(["sort-btn",{active:n.value==="recent"}]),onClick:a[3]||(a[3]=d=>n.value="recent")},"Recent",2),u("button",{class:le(["sort-btn",{active:n.value==="priority"}]),onClick:a[4]||(a[4]=d=>n.value="priority")},"Priority",2),u("button",{class:le(["sort-btn",{active:n.value==="cost"}]),onClick:a[5]||(a[5]=d=>n.value="cost")},"Cost",2)])])]),u("div",Lh,[u("table",Oh,[u("thead",null,[u("tr",null,[r.value?(m(),y("th",Rh)):oe("",!0),a[16]||(a[16]=u("th",{class:"col-priority"},null,-1)),a[17]||(a[17]=u("th",{class:"col-source"},"Source",-1)),a[18]||(a[18]=u("th",{class:"col-model"},"Model",-1)),a[19]||(a[19]=u("th",{class:"col-dir"},"Directory",-1)),a[20]||(a[20]=u("th",{class:"col-turns"},"Turns",-1)),a[21]||(a[21]=u("th",{class:"col-context sorted"},"Context",-1)),a[22]||(a[22]=u("th",{class:"col-cost"},"Cost",-1)),a[23]||(a[23]=u("th",{class:"col-health"},"Health",-1)),a[24]||(a[24]=u("th",{class:"col-spark"},"Trend",-1)),a[25]||(a[25]=u("th",{class:"col-time"},"Time",-1)),a[26]||(a[26]=u("th",{class:"col-arrow"},null,-1))])]),u("tbody",null,[(m(!0),y(ve,null,Ce(L.value,d=>{var E,q,G;return m(),y(ve,{key:d.id},[u("tr",{class:le(["main-row",{expanded:Q(d.id),selected:Q(d.id)||c(d.id),pulse:J(t).recentlyUpdated.has(d.id)}]),onClick:z=>p(d.id)},[r.value?(m(),y("td",Nh,[u("span",{class:le(["compare-check",{checked:c(d.id)}])},[...a[27]||(a[27]=[u("i",{class:"i-carbon-checkmark"},null,-1)])],2)])):oe("",!0),u("td",Fh,[u("div",{class:le(["priority-bar",re(d.id).barClass])},null,2)]),u("td",zh,[u("span",{class:le(["source-badge",J(Es)(d.source)])},M(d.source||"?"),3),(E=d.tags)!=null&&E.length?(m(),y("span",Bh,[(m(!0),y(ve,null,Ce(d.tags.slice(0,2),(z,fe)=>(m(),y("span",{key:z,class:le(["row-tag",J(t).getTagColorClass(fe)]),title:z},M(z),11,Hh))),128)),d.tags.length>2?(m(),y("span",jh,"+"+M(d.tags.length-2),1)):oe("",!0)])):oe("",!0)]),u("td",Vh,[u("span",Uh,M(J(ln)(d.latestModel)),1)]),u("td",Kh,[u("span",{class:"dir-text",title:d.workingDirectory??""},M(ne(d.workingDirectory)),9,Wh)]),u("td",qh,[u("span",Gh,M(d.entryCount),1)]),u("td",Jh,[u("span",{class:le(["util-chip",B(ge(d))])},M(Math.round(ge(d)*100))+"% ",3)]),u("td",Yh,[u("span",Xh,M(J(kt)(d.totalCost)),1)]),u("td",Zh,[u("div",Qh,[u("span",{class:le(["health-num",ce(d)])},M(((q=d.healthScore)==null?void 0:q.overall)??"—"),3),(G=d.healthScore)!=null&&G.audits?(m(),y("div",ev,[u("div",tv,"Health Score: "+M(d.healthScore.overall),1),(m(!0),y(ve,null,Ce(d.healthScore.audits,z=>(m(),y("div",{key:z.id,class:"health-audit-line"},[u("span",nv,M(z.name),1),u("span",{class:le(["health-audit-score",Z(z.score)])},M(z.score),3)]))),128))])):oe("",!0)])]),u("td",sv,[u("div",{class:"inline-spark",innerHTML:we(d)},null,8,ov)]),u("td",iv,[u("span",{class:"time-text",title:X(d.latestTimestamp)},M(C(d.latestTimestamp)),9,rv)]),u("td",lv,[u("a",{class:"inspect-btn",title:"Open in inspector",href:D(d.id),onClick:St(z=>Y(d.id),["prevent","stop"])},[...a[28]||(a[28]=[u("i",{class:"i-carbon-arrow-right"},null,-1)])],8,av)])],10,Dh),u("tr",{class:le(["expand-row",{open:Q(d.id)}])},[u("td",{colspan:r.value?12:11},[u("div",uv,[u("div",dv,[J(t).loadingSession===d.id?(m(),y("div",fv," Loading… ")):(m(),y(ve,{key:1},[S(d).length>0?(m(),y("div",pv,[u("div",hv," Composition · "+M(J(ke)(S(d).reduce((z,fe)=>z+fe.tokens,0)))+" tokens ",1),u("div",vv,[(m(),y(ve,null,Ce(N,z=>{var fe,pe,ue,ee;return Ve(u("div",{key:z.key,class:"comp-seg",style:Pe({flex:((fe=S(d).find($e=>$e.category===z.key))==null?void 0:fe.tokens)??0,background:z.color}),title:`${z.label}: ${((pe=S(d).find($e=>$e.category===z.key))==null?void 0:pe.pct)??0}%`},[(((ue=S(d).find($e=>$e.category===z.key))==null?void 0:ue.pct)??0)>=12?(m(),y("span",mv,M(z.label),1)):oe("",!0)],12,gv),[[Ed,(((ee=S(d).find($e=>$e.category===z.key))==null?void 0:ee.tokens)??0)>0]])}),64))])])):oe("",!0),u("div",yv,[a[30]||(a[30]=u("div",{class:"expand-section-label"},"Findings",-1)),u("div",{class:le(["expand-findings",{"expand-findings--scroll":I(d).length>5}])},[I(d).length>0?(m(!0),y(ve,{key:0},Ce(I(d),(z,fe)=>(m(),y("div",{key:fe,class:"finding"},[u("i",{class:le(["finding-icon",[`sev-${z.severity}`,z.severity==="high"?"i-carbon-warning-alt":z.severity==="med"?"i-carbon-information":"i-carbon-checkmark"]])},null,2),u("span",_v,[xe(M(z.title)+" ",1),z.impact?(m(),y("span",{key:0,class:le(["finding-impact",`sev-${z.severity}`])},M(z.impact),3)):oe("",!0)])]))),128)):(m(),y("div",bv,[...a[29]||(a[29]=[u("i",{class:"finding-icon sev-low i-carbon-checkmark"},null,-1),u("span",{class:"finding-text muted"},"No issues detected.",-1)])]))],2)])],64))])])],8,cv)],2)],64)}),128))])])]),Oe(Qt,{name:"compare-bar"},{default:it(()=>[r.value&&f.value>=2?(m(),y("div",wv,[u("span",kv,M(f.value)+" sessions selected",1),u("button",{class:"compare-bar-btn",onClick:a[6]||(a[6]=d=>J(t).enterCompare())},[...a[31]||(a[31]=[u("i",{class:"i-carbon-compare"},null,-1),xe(" Compare ",-1)])])])):oe("",!0)]),_:1}),L.value.length===0&&(i.value||v.value)?(m(),y("div",$v,[...a[32]||(a[32]=[u("div",{class:"empty-title"},"No matching sessions",-1),u("div",{class:"empty-sub"},"Try adjusting your search or filters",-1)])])):J(t).summaries.length===0?(m(),y("div",xv,[...a[33]||(a[33]=[u("div",{class:"empty-title"},"No requests captured",-1),u("div",{class:"empty-sub"},[xe("Point API calls to "),u("code",null,"localhost:4040")],-1)])])):oe("",!0)],32))}}),Sv=rt(Tv,[["__scopeId","data-v-1edc456a"]]);function Ki(e){var i,r;const t=e.composition||[],n=t.reduce((l,c)=>l+c.tokens,0),s=new Map(t.map(l=>[l.category,l.tokens])),o=[];for(const[l,c]of Object.entries(qn)){let p=0;for(const f of c)p+=s.get(f)??0;p>0&&o.push({key:l,label:((i=_t[l])==null?void 0:i.label)??l,color:((r=_t[l])==null?void 0:r.color)??"#4b5563",tokens:p,pct:n>0?p/n*100:0})}return o.sort((l,c)=>c.tokens-l.tokens)}function Cv(e,t){const n=Ki(e);if(t.size===0)return n;const s=n.filter(i=>!t.has(i.key)),o=s.reduce((i,r)=>i+r.tokens,0);return s.map(i=>({...i,pct:o>0?i.tokens/o*100:0}))}function qo(e,t){return t.size===0?e.contextInfo.totalTokens:Ki(e).filter(s=>!t.has(s.key)).reduce((s,o)=>s+o.tokens,0)}function Mv(e,t){const n=t.findIndex(s=>s.entry.id===e);if(n<=0)return null;for(let s=n-1;s>=0;s--)if(t[s].isMain)return t[s].entry;return null}function Ev(e,t){const n=t.findIndex(i=>i.entry.id===e);if(n<0)return 0;let s=n;for(let i=n;i>=0;i--)if(t[i].isMain){s=i;break}let o=0;for(let i=s+1;i<t.length&&!t[i].isMain;i++)o++;return o}function Pv(e,t){var o,i;const n=new Map,s=1800;for(const r of e){const l=[],c=Mv(r.entry.id,t);if(c&&r.isMain){const p=c.contextInfo.totalTokens,f=r.entry.contextInfo.totalTokens;p>0&&f<p*.75&&l.push({type:"compaction",label:"Compaction",detail:`${ke(p)} → ${ke(f)} total tokens`});const v=yi(c),g=yi(r.entry),w=v>0&&c.usage?c.usage.cacheReadTokens/v:null,P=g>0&&r.entry.usage?r.entry.usage.cacheReadTokens/g:null;if(w!==null&&P!==null){const T=P-w;Math.abs(T)>=.2&&l.push({type:"cache-shift",label:"Cache shift",detail:`${Math.round(w*100)}% → ${Math.round(P*100)}% hit rate`})}const $=((o=c.composition.find(T=>T.category==="tool_results"))==null?void 0:o.tokens)??0,_=((i=r.entry.composition.find(T=>T.category==="tool_results"))==null?void 0:i.tokens)??0;_-$>=s&&l.push({type:"tool-jump",label:"Tool jump",detail:`tool results +${ke(_-$)}`})}if(r.isMain){const p=Ev(r.entry.id,t);p>=3&&l.push({type:"subagent-burst",label:"Subagent burst",detail:`${p} subagent calls in this turn`})}l.length>0&&n.set(r.entry.id,l)}return n}function Iv(e){return e==="compaction"?"C":e==="cache-shift"?"H":e==="subagent-burst"?"S":"T"}function Av(e,t){const n=e.map(s=>`${s.label}: ${s.detail}`).join(" | ");return`Turn ${t}: ${n}`}function pc(e,t){const n=t.findIndex(O=>O.entry.id===e.id);if(n<0)return null;const s=e.agentKey||"_default";let o=null;for(let O=n-1;O>=0;O--){const de=t[O].entry;if((de.agentKey||"_default")===s){o=de;break}}if(!o)return null;const i=o.composition||[],r=e.composition||[],l=o.contextInfo.totalTokens,p=e.contextInfo.totalTokens-l,f=new Set;for(const O of i)f.add(O.category);for(const O of r)f.add(O.category);const v=[];for(const O of f){const de=i.find(ce=>ce.category===O),ae=r.find(ce=>ce.category===O),W=de?de.tokens:0,re=ae?ae.tokens:0,ge=re-W,B=nt[O]||{label:O};v.push({category:O,label:B.label,delta:ge,prevTokens:W,currTokens:re})}const g=[];for(const O of[...v].sort((de,ae)=>Math.abs(ae.delta)-Math.abs(de.delta)))O.delta===0?g.push({type:"same",text:` ${O.label}: ${ke(O.currTokens)} (unchanged)`,category:O.category,delta:O.delta}):O.prevTokens===0?g.push({type:"add",text:`+ ${O.label}: ${ke(O.currTokens)} (new)`,category:O.category,delta:O.delta}):O.currTokens===0?g.push({type:"remove",text:`- ${O.label}: ${ke(O.prevTokens)} (removed)`,category:O.category,delta:O.delta}):O.delta>0?g.push({type:"add",text:`+ ${O.label}: ${ke(O.prevTokens)} → ${ke(O.currTokens)} (+${ke(O.delta)})`,category:O.category,delta:O.delta}):g.push({type:"remove",text:`- ${O.label}: ${ke(O.prevTokens)} → ${ke(O.currTokens)} (${ke(O.delta)})`,category:O.category,delta:O.delta});const w=new Map;for(const[O,de]of Object.entries(qn))for(const ae of de)w.set(ae,O);const P=new Map,$=new Map;for(const O of v){const de=w.get(O.category)??"other";P.set(de,(P.get(de)??0)+O.delta);const ae=$.get(de);(!ae||Math.abs(O.delta)>ae.absDelta)&&$.set(de,{category:O.category,absDelta:Math.abs(O.delta)})}const _=Array.from(P.entries()).map(([O,de])=>{var ae,W;return{group:O,label:((ae=_t[O])==null?void 0:ae.label)??O,delta:de,category:((W=$.get(O))==null?void 0:W.category)??""}}).filter(O=>O.delta!==0).sort((O,de)=>Math.abs(de.delta)-Math.abs(O.delta)),T=_.filter(O=>O.delta>0).slice(0,3),F=_.filter(O=>O.delta<0).slice(0,3);let j=0,L=0,K=0;for(const O of t)(O.entry.agentKey||"_default")===s&&K++,O.entry.id===o.id&&(j=K),O.entry.id===e.id&&(L=K);return{prevTurnNum:j,currTurnNum:L,delta:p,lines:g,topIncreases:T,topDecreases:F}}function il(e,t){const n=t?"0.85":"0.35";return/opus/i.test(e)?`rgba(251, 146, 60, ${n})`:/sonnet/i.test(e)?`rgba(96, 165, 250, ${n})`:/haiku/i.test(e)?`rgba(167, 139, 250, ${n})`:/gpt/i.test(e)?`rgba(16, 185, 129, ${n})`:`rgba(148, 163, 184, ${n})`}function Go(e,t,n=3){return t===0?n:Math.max(n,Math.round(e/t*100))}function Jo(e,t=4){if(e===0)return[0];const n=e/t,s=Math.pow(10,Math.floor(Math.log10(n))),o=Math.ceil(n/s)*s,i=[];for(let r=0;r<=t;r++){const l=r*o;l<=e*1.1&&i.push(l)}return i}function Lv(e){return e>30?Math.ceil(e/15):1}function Ov(e){let t=0;return e.map(n=>(n.isMain&&t++,n.isMain?t:0))}function Rv(e,t){return`${t?"":"Sub "}${ln(e.contextInfo.model)}: ${ke(e.contextInfo.totalTokens)} / ${kt(e.costUsd)}`}function Dv(e,t){const n=Ki(e),s=e.contextInfo.totalTokens,o=n.map(i=>`${i.key===t.key?"▸ ":" "}${i.label}: ${ke(i.tokens)} (${i.pct.toFixed(1)}%)`);return o.push(` Total: ${ke(s)}`),o.join(`
25
- `)}function rl(e,t){return t==="cost"?kt(e):ke(e)}function mi(e){if(!e.usage)return null;const t=yi(e);return t===0?null:e.usage.cacheReadTokens/t}function yi(e){return e.usage?e.usage.inputTokens+e.usage.cacheReadTokens+e.usage.cacheWriteTokens:0}function hc(e){const t={turnsRemaining:null,growthPerTurn:0,sinceCompaction:0,contextLimit:0,currentTokens:0};if(e.length===0)return t;const n=e.filter($=>$.isMain).map($=>$.entry);if(n.length<2)return t;const o=n[n.length-1].contextLimit;if(o<=0)return t;let i=0;for(let $=1;$<n.length;$++){const _=n[$-1].contextInfo.totalTokens,T=n[$].contextInfo.totalTokens;_>0&&T<_*.75&&(i=$)}const r=n.slice(i);if(r.length<2)return t;const l=r[0].contextInfo.totalTokens,c=r[r.length-1].contextInfo.totalTokens,p=c-l,f=r.length-1,v=p/f,g=c,w=o-g;let P=null;return v>0&&(P=Math.floor(w/v),P<0&&(P=0)),{turnsRemaining:P,growthPerTurn:v,sinceCompaction:r.length,contextLimit:o,currentTokens:g}}function Nv(e){var c,p;const t=Math.round(e.utilization*100),n=e.healthScore,s=[...e.composition].sort((f,v)=>v.tokens-f.tokens)[0],o=e.topDelta;let i="narrative-neutral",r=`Context is at ${t}% utilization.`;(n==null?void 0:n.rating)==="poor"||t>=85?(i="narrative-advisory",r=`Turn health is elevated risk (${n?n.overall+"/100":t+"% utilization"}).`):(n==null?void 0:n.rating)==="needs-work"||t>=65?(i="narrative-advisory",r=`Turn health shows moderate pressure (${n?n.overall+"/100":t+"% utilization"}).`):n&&(r=`Turn health is stable at ${n.overall}/100.`);const l=[];if(s&&l.push(`${((c=nt[s.category])==null?void 0:c.label)??s.category} is the largest share (${Math.round(s.pct)}%).`),o){const f=((p=nt[o.category])==null?void 0:p.label)??o.category,v=o.delta>0?"grew":"shrank";l.push(`${f} ${v} most vs previous main turn (${ke(Math.abs(o.delta))}).`)}return{toneClass:i,headline:r,detail:l.join(" ")}}const Fv={Read:{paramKeys:["file_path","path"],kind:"read"},Write:{paramKeys:["file_path","path"],kind:"write"},Edit:{paramKeys:["file_path","path"],kind:"write"},MultiEdit:{paramKeys:["file_path","path"],kind:"write"},read_file:{paramKeys:["path","file_path"],kind:"read"},write_file:{paramKeys:["path","file_path"],kind:"write"},read:{paramKeys:["path","file_path"],kind:"read"},write:{paramKeys:["path","file_path"],kind:"write"},edit:{paramKeys:["path","file_path"],kind:"write"},replace:{paramKeys:["file_path","path"],kind:"write"},readFile:{paramKeys:["path","filePath","file_path"],kind:"read"},writeFile:{paramKeys:["path","filePath","file_path"],kind:"write"},editFile:{paramKeys:["path","filePath","file_path"],kind:"write"},create_file:{paramKeys:["path","file_path"],kind:"write"},patch:{paramKeys:["path","file_path"],kind:"write"}};function zv(e){const t=Fv[e.name];if(!t)return null;const n=e.input;if(!n||typeof n!="object")return null;for(const s of t.paramKeys){const o=n[s];if(typeof o=="string"&&o.length>0)return{path:Bv(o),kind:t.kind}}return null}function Bv(e){let t=e.replace(/\/+/g,"/");return t.startsWith("./")&&(t=t.slice(2)),t.length>1&&t.endsWith("/")&&(t=t.slice(0,-1)),t}function vc(e,t){if(!t)return e;const n=t.endsWith("/")?t:t+"/";if(e.startsWith(n))return e.slice(n.length);const s=Hv(e);return s?"~/"+e.slice(s.length):e}function Hv(e){const t=e.match(/^(\/(?:home|Users)\/[^/]+\/)/);return t?t[1]:null}function jv(e,t){const n=new Map;for(const s of e){if(!s.contentBlocks)continue;const i=s.contentBlocks.filter(r=>r.type==="tool_use").length>0?(s.tokens||0)/s.contentBlocks.length:0;for(const r of s.contentBlocks){if(r.type!=="tool_use")continue;const l=r,c=zv(l);if(c&&l.id){const p=vc(c.path,t);n.set(l.id,{path:p,kind:c.kind,tokens:Math.round(i)})}}}return n}function gc(e,t){const n=new Set,s=new Map;function o(i){let r=s.get(i);return r||(r={path:i,tokens:0,reads:0,writes:0,toolResultTokens:0,toolCallTokens:0},s.set(i,r)),r}for(const i of e){const r=i.contextInfo.messages??[];if(r.length===0)continue;const l=jv(r,t);for(const[c,p]of l){if(n.has(c))continue;n.add(c);const f=o(p.path);f.toolCallTokens+=p.tokens,f.tokens+=p.tokens,p.kind==="read"?f.reads++:f.writes++}for(const c of r){if(!c.contentBlocks)continue;const p=c.contentBlocks.filter(v=>v.type==="tool_result");if(p.length===0)continue;const f=p.length>0?(c.tokens||0)/p.length:0;for(const v of p){if(v.type!=="tool_result")continue;const g=v.tool_use_id,w=l.get(g);if(!w||!n.has(g))continue;const P=o(w.path),$=Math.round(f);P.toolResultTokens+=$,P.tokens+=$}}}return Array.from(s.values()).filter(i=>i.tokens>0).sort((i,r)=>r.tokens-i.tokens)}function Wi(e){const t=e.split("/");return t[t.length-1]||e}function ll(e){const t=e.lastIndexOf("/");return t<=0?"":e.slice(0,t)}const al=["#3b82f6","#8b5cf6","#06b6d4","#10b981","#f59e0b","#ef4444","#ec4899","#14b8a6","#6366f1","#84cc16"];function _i(e){return al[e%al.length]}function Vv(e){var t=0,n=e.children,s=n&&n.length;if(!s)t=1;else for(;--s>=0;)t+=n[s].value;e.value=t}function Uv(){return this.eachAfter(Vv)}function Kv(e,t){let n=-1;for(const s of this)e.call(t,s,++n,this);return this}function Wv(e,t){for(var n=this,s=[n],o,i,r=-1;n=s.pop();)if(e.call(t,n,++r,this),o=n.children)for(i=o.length-1;i>=0;--i)s.push(o[i]);return this}function qv(e,t){for(var n=this,s=[n],o=[],i,r,l,c=-1;n=s.pop();)if(o.push(n),i=n.children)for(r=0,l=i.length;r<l;++r)s.push(i[r]);for(;n=o.pop();)e.call(t,n,++c,this);return this}function Gv(e,t){let n=-1;for(const s of this)if(e.call(t,s,++n,this))return s}function Jv(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,s=t.children,o=s&&s.length;--o>=0;)n+=s[o].value;t.value=n})}function Yv(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Xv(e){for(var t=this,n=Zv(t,e),s=[t];t!==n;)t=t.parent,s.push(t);for(var o=s.length;e!==n;)s.splice(o,0,e),e=e.parent;return s}function Zv(e,t){if(e===t)return e;var n=e.ancestors(),s=t.ancestors(),o=null;for(e=n.pop(),t=s.pop();e===t;)o=e,e=n.pop(),t=s.pop();return o}function Qv(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function eg(){return Array.from(this)}function tg(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function ng(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*sg(){var e=this,t,n=[e],s,o,i;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,s=e.children)for(o=0,i=s.length;o<i;++o)n.push(s[o]);while(n.length)}function qi(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=rg)):t===void 0&&(t=ig);for(var n=new ro(e),s,o=[n],i,r,l,c;s=o.pop();)if((r=t(s.data))&&(c=(r=Array.from(r)).length))for(s.children=r,l=c-1;l>=0;--l)o.push(i=r[l]=new ro(r[l])),i.parent=s,i.depth=s.depth+1;return n.eachBefore(ag)}function og(){return qi(this).eachBefore(lg)}function ig(e){return e.children}function rg(e){return Array.isArray(e)?e[1]:null}function lg(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function ag(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function ro(e){this.data=e,this.depth=this.height=0,this.parent=null}ro.prototype=qi.prototype={constructor:ro,count:Uv,each:Kv,eachAfter:qv,eachBefore:Wv,find:Gv,sum:Jv,sort:Yv,path:Xv,ancestors:Qv,descendants:eg,leaves:tg,links:ng,copy:og,[Symbol.iterator]:sg};function cg(e){if(typeof e!="function")throw new Error;return e}function es(){return 0}function ts(e){return function(){return e}}function ug(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function dg(e,t,n,s,o){for(var i=e.children,r,l=-1,c=i.length,p=e.value&&(s-t)/e.value;++l<c;)r=i[l],r.y0=n,r.y1=o,r.x0=t,r.x1=t+=r.value*p}function fg(e,t,n,s,o){for(var i=e.children,r,l=-1,c=i.length,p=e.value&&(o-n)/e.value;++l<c;)r=i[l],r.x0=t,r.x1=s,r.y0=n,r.y1=n+=r.value*p}var pg=(1+Math.sqrt(5))/2;function hg(e,t,n,s,o,i){for(var r=[],l=t.children,c,p,f=0,v=0,g=l.length,w,P,$=t.value,_,T,F,j,L,K,O;f<g;){w=o-n,P=i-s;do _=l[v++].value;while(!_&&v<g);for(T=F=_,K=Math.max(P/w,w/P)/($*e),O=_*_*K,L=Math.max(F/O,O/T);v<g;++v){if(_+=p=l[v].value,p<T&&(T=p),p>F&&(F=p),O=_*_*K,j=Math.max(F/O,O/T),j>L){_-=p;break}L=j}r.push(c={value:_,dice:w<P,children:l.slice(f,v)}),c.dice?dg(c,n,s,o,$?s+=P*_/$:i):fg(c,n,s,$?n+=w*_/$:o,i),$-=_,f=v}return r}const vg=(function e(t){function n(s,o,i,r,l){hg(t,s,o,i,r,l)}return n.ratio=function(s){return e((s=+s)>1?s:1)},n})(pg);function gg(){var e=vg,t=!1,n=1,s=1,o=[0],i=es,r=es,l=es,c=es,p=es;function f(g){return g.x0=g.y0=0,g.x1=n,g.y1=s,g.eachBefore(v),o=[0],t&&g.eachBefore(ug),g}function v(g){var w=o[g.depth],P=g.x0+w,$=g.y0+w,_=g.x1-w,T=g.y1-w;_<P&&(P=_=(P+_)/2),T<$&&($=T=($+T)/2),g.x0=P,g.y0=$,g.x1=_,g.y1=T,g.children&&(w=o[g.depth+1]=i(g)/2,P+=p(g)-w,$+=r(g)-w,_-=l(g)-w,T-=c(g)-w,_<P&&(P=_=(P+_)/2),T<$&&($=T=($+T)/2),e(g,P,$,_,T))}return f.round=function(g){return arguments.length?(t=!!g,f):t},f.size=function(g){return arguments.length?(n=+g[0],s=+g[1],f):[n,s]},f.tile=function(g){return arguments.length?(e=cg(g),f):e},f.padding=function(g){return arguments.length?f.paddingInner(g).paddingOuter(g):f.paddingInner()},f.paddingInner=function(g){return arguments.length?(i=typeof g=="function"?g:ts(+g),f):i},f.paddingOuter=function(g){return arguments.length?f.paddingTop(g).paddingRight(g).paddingBottom(g).paddingLeft(g):f.paddingTop()},f.paddingTop=function(g){return arguments.length?(r=typeof g=="function"?g:ts(+g),f):r},f.paddingRight=function(g){return arguments.length?(l=typeof g=="function"?g:ts(+g),f):l},f.paddingBottom=function(g){return arguments.length?(c=typeof g=="function"?g:ts(+g),f):c},f.paddingLeft=function(g){return arguments.length?(p=typeof g=="function"?g:ts(+g),f):p},f}const mg={key:0,class:"panel panel--hero"},yg={class:"panel-head"},_g={class:"panel-sub"},bg={class:"mode-toggle"},wg={class:"panel-body"},kg={key:0,class:"treemap"},$g=["onClick"],xg={class:"tm-label"},Tg={class:"tm-val"},Sg={key:1,class:"tm-label-compact"},Cg={key:2,class:"tm-pct"},Mg={key:1,class:"treemap treemap-simple"},Eg=["onClick"],Pg={class:"tm-label"},Ig={class:"tm-val"},Ag={key:2,class:"treemap"},Lg=["onClick"],Og={class:"tm-label"},Rg={class:"tm-val"},Dg={key:1,class:"tm-label-compact"},Ng={key:2,class:"tm-pct"},Fg={class:"legend"},zg={class:"legend-pct"},Bg={key:0,class:"legend-item"},Hg={class:"legend-file-path"},jg={class:"legend-pct"},Vg={key:0,class:"legend-item"},Ug={class:"legend-pct"},cl=5,ul=6,Kg=et({__name:"CompositionTreemap",props:{entry:{},turnNum:{}},emits:["categoryClick","toolClick","fileClick"],setup(e,{emit:t}){const n=e,s=$t(),o=t,i=he("detailed"),r=he(null),l=A(()=>{var Z;const B=((Z=n.entry)==null?void 0:Z.composition)||[],ce=[];for(const[C,X]of Object.entries(qn)){let ne=0;for(const U of X){const se=B.find(we=>we.category===U);se&&(ne+=se.tokens)}if(ne>0){const U=_t[C];ce.push({key:C,label:U.label,color:U.color,tokens:ne})}}return ce}),c=A(()=>{const B=n.entry;return B?B.composition.filter(ce=>ce.tokens>0).map(ce=>{var Z,C;return{key:ce.category,label:((Z=nt[ce.category])==null?void 0:Z.label)??ce.category,color:((C=nt[ce.category])==null?void 0:C.color)??"#4b5563",tokens:ce.tokens,category:ce.category}}):[]});function p(B){const ce=["#10b981","#34d399","#14b8a6","#2dd4bf","#10b981","#06b6d4","#0ea5e9"];return ce[B%ce.length]}const f=A(()=>{const B=n.entry;if(!B)return[];const ce=B.contextInfo.messages||[],Z=Mo(ce),C=new Map;for(const X of ce){if(It(X)!=="tool_results")continue;const ne=(X.contentBlocks||[]).filter(se=>se.type==="tool_result");if(ne.length===0)continue;const U=(X.tokens||0)/ne.length;for(const se of ne){const we=se.tool_use_id||"unknown",N=Z[we]||`tool:${we.slice(0,8)}`;C.set(N,(C.get(N)||0)+U)}}return Array.from(C.entries()).sort((X,ne)=>ne[1]-X[1]).map(([X,ne],U)=>({key:`tool-${X}-${U}`,label:X,color:p(U),tokens:Math.max(1,Math.round(ne)),category:"tool_results",toolName:X}))}),v=A(()=>r.value==="tool_results"&&f.value.length>0?f.value:c.value),g=A(()=>{const B=s.selectedSession;if(!B||B.entries.length===0)return[];const ce=B.workingDirectory;return gc(B.entries,ce).map((C,X)=>({key:`file-${C.path}-${X}`,label:Wi(C.path),color:_i(X),tokens:C.tokens,category:"files",toolName:C.path}))}),w=A(()=>L(g.value)),P=A(()=>g.value.length>0),$=A(()=>v.value.slice(0,cl)),_=A(()=>v.value.slice(cl)),T=A(()=>_.value.map(B=>`${B.label}: ${ge(B.tokens)}`).join(`
26
- `)),F=A(()=>g.value.slice(0,ul)),j=A(()=>g.value.slice(ul).map(B=>`${B.toolName||B.label}: ${ge(B.tokens)}`).join(`
27
- `));function L(B){if(B.length===0)return[];const ce=B.reduce((X,ne)=>X+ne.tokens,0),Z=qi({key:"root",label:"root",color:"#000000",tokens:0,children:B}).sum(X=>X.children&&X.children.length>0?0:Math.max(0,X.tokens||0));return gg().size([100,100]).paddingInner(1).round(!0)(Z).leaves().map(X=>{const ne=X.data;return{key:ne.key,label:ne.label,color:ne.color,tokens:ne.tokens,category:ne.category,x:X.x0,y:X.y0,w:X.x1-X.x0,h:X.y1-X.y0,pct:ce>0?ne.tokens/ce*100:0}})}const K=A(()=>L(v.value));function O(B){if(r.value===null&&B.category==="tool_results"&&f.value.length>1){r.value="tool_results";return}if(r.value==="tool_results"&&B.toolName){o("toolClick",B.toolName);return}o("categoryClick",B.category||"tool_results")}function de(B){const ce=n.entry;if(!ce)return;const Z=qn[B]||[];if(Z.length===0)return;let C=Z[0],X=-1;for(const ne of Z){const U=ce.composition.find(we=>we.category===ne),se=(U==null?void 0:U.tokens)??0;se>X&&(X=se,C=ne)}o("categoryClick",C)}function ae(B){B.toolName&&o("fileClick",B.toolName)}function W(){r.value=null}const re=A(()=>{var B;return((B=n.entry)==null?void 0:B.contextInfo.totalTokens)??0});function ge(B){return re.value===0?"":Math.round(B/re.value*100)+"%"}return Ge(()=>{var B;return(B=n.entry)==null?void 0:B.id},()=>{r.value=null}),(B,ce)=>{const Z=$n("tooltip");return e.entry.composition.length>0?(m(),y("section",mg,[u("div",yg,[ce[3]||(ce[3]=u("span",{class:"panel-title"},"Composition",-1)),u("span",_g,"Turn "+M(e.turnNum)+" · "+M(J(ke)(e.entry.composition.reduce((C,X)=>C+X.tokens,0))),1),i.value==="detailed"&&r.value?(m(),y("button",{key:0,class:"treemap-back",onClick:W}," Back to categories ")):oe("",!0),u("div",bg,[u("button",{class:le({on:i.value==="detailed"}),onClick:ce[0]||(ce[0]=C=>i.value="detailed")},"Detail",2),u("button",{class:le({on:i.value==="simple"}),onClick:ce[1]||(ce[1]=C=>i.value="simple")},"Simple",2),P.value?(m(),y("button",{key:0,class:le({on:i.value==="files"}),onClick:ce[2]||(ce[2]=C=>i.value="files")},"Files",2)):oe("",!0)])]),u("div",wg,[i.value==="detailed"?(m(),y("div",kg,[(m(!0),y(ve,null,Ce(K.value,C=>Ve((m(),y("button",{key:C.key,class:"tm-block tm-block-2d",style:Pe({left:C.x+"%",top:C.y+"%",width:C.w+"%",height:C.h+"%",background:C.color}),onClick:X=>O(C)},[C.w>=18&&C.h>=16?(m(),y(ve,{key:0},[u("span",xg,M(C.label),1),u("span",Tg,M(J(ke)(C.tokens)),1)],64)):C.w>=12&&C.h>=12?(m(),y("span",Sg,M(C.label.slice(0,8))+M(C.label.length>8?"…":""),1)):C.w>=8&&C.h>=8?(m(),y("span",Cg,M(Math.round(C.pct))+"%",1)):oe("",!0)],12,$g)),[[Z,`${C.label}: ${C.tokens.toLocaleString()} (${C.pct.toFixed(1)}%)`]])),128))])):i.value==="simple"?(m(),y("div",Mg,[(m(!0),y(ve,null,Ce(l.value,C=>Ve((m(),y("div",{key:C.key,class:le(["tm-block tm-block-simple",{"tm-block-narrow":C.tokens/e.entry.composition.reduce((X,ne)=>X+ne.tokens,0)<.15}]),style:Pe({flex:C.tokens,background:C.color}),onClick:X=>de(C.key)},[u("span",Pg,M(C.label),1),u("span",Ig,M(J(ke)(C.tokens)),1)],14,Eg)),[[Z,`${C.label}: ${C.tokens.toLocaleString()}`]])),128))])):i.value==="files"?(m(),y("div",Ag,[(m(!0),y(ve,null,Ce(w.value,C=>Ve((m(),y("button",{key:C.key,class:"tm-block tm-block-2d",style:Pe({left:C.x+"%",top:C.y+"%",width:C.w+"%",height:C.h+"%",background:C.color}),onClick:X=>ae(C)},[C.w>=18&&C.h>=16?(m(),y(ve,{key:0},[u("span",Og,M(C.label),1),u("span",Rg,M(J(ke)(C.tokens)),1)],64)):C.w>=12&&C.h>=12?(m(),y("span",Dg,M(C.label.slice(0,8))+M(C.label.length>8?"…":""),1)):C.w>=8&&C.h>=8?(m(),y("span",Ng,M(Math.round(C.pct))+"%",1)):oe("",!0)],12,Lg)),[[Z,`${C.toolName||C.label}: ${C.tokens.toLocaleString()} (${C.pct.toFixed(1)}%)`]])),128))])):oe("",!0),u("div",Fg,[i.value==="detailed"?(m(),y(ve,{key:0},[(m(!0),y(ve,null,Ce($.value,C=>(m(),y("span",{key:`legend-${C.key}`,class:"legend-item"},[u("span",{class:"legend-dot",style:Pe({background:C.color})},null,4),xe(" "+M(C.label)+" ",1),u("span",zg,M(ge(C.tokens)),1)]))),128)),v.value.length>$.value.length?Ve((m(),y("span",Bg,[xe(" +"+M(v.value.length-$.value.length)+" more ",1)])),[[Z,T.value]]):oe("",!0)],64)):i.value==="files"?(m(),y(ve,{key:1},[(m(!0),y(ve,null,Ce(F.value,C=>(m(),y("span",{key:`legend-file-${C.key}`,class:"legend-item"},[u("span",{class:"legend-dot",style:Pe({background:C.color})},null,4),Ve((m(),y("span",Hg,[xe(M(C.label),1)])),[[Z,C.toolName||C.label]]),u("span",jg,M(ge(C.tokens)),1)]))),128)),g.value.length>F.value.length?Ve((m(),y("span",Vg,[xe(" +"+M(g.value.length-F.value.length)+" more ",1)])),[[Z,j.value]]):oe("",!0)],64)):(m(!0),y(ve,{key:2},Ce(l.value,C=>(m(),y("span",{key:C.key,class:"legend-item"},[u("span",{class:"legend-dot",style:Pe({background:C.color})},null,4),xe(" "+M(C.label)+" ",1),u("span",Ug,M(ge(C.tokens)),1)]))),128))])])])):oe("",!0)}}}),Wg=rt(Kg,[["__scopeId","data-v-ac46df9b"]]),qg={key:0,class:"panel panel--secondary"},Gg={class:"panel-head"},Jg={class:"panel-sub"},Yg={class:"panel-body diff-body"},Xg={key:0,class:"diff-tapes"},Zg={class:"diff-tape-row"},Qg={class:"diff-tape-label"},em={class:"diff-tape-track"},tm={class:"diff-tape-val"},nm={class:"diff-tape-row"},sm={class:"diff-tape-label"},om={class:"diff-tape-track"},im={class:"diff-tape-val"},rm={key:1,class:"diff-summary-row"},lm={key:0,class:"diff-summary-group"},am={class:"diff-summary-label"},cm=["onClick"],um=["onClick"],dm={key:0,class:"diff-summary-group"},fm={class:"diff-summary-label"},pm=["onClick"],hm={key:1,class:"diff-summary-group"},vm={class:"diff-summary-label"},gm=["onClick"],mm={key:2,class:"diff-hidden-wrap"},ym={class:"diff-hidden-note"},_m=["onClick"],bm={key:1,class:"diff-empty"},wm=2e3,km=et({__name:"ContextDiffPanel",props:{diffData:{},currentEntry:{default:null},previousEntry:{default:null},showTapes:{type:Boolean,default:!1},hideUnchanged:{type:Boolean,default:!1},summaryMode:{default:"split"},combinedLabel:{default:"Drivers"},growthLabel:{default:"Growth drivers"},shrinkLabel:{default:"Shrink drivers"},deltaTone:{default:"good"},showWhenEmpty:{type:Boolean,default:!1},emptyText:{default:"First turn — no previous context."}},emits:["categoryClick"],setup(e,{emit:t}){const n=e,s=t,o=A(()=>!!n.diffData||n.showWhenEmpty),i=A(()=>{const w=n.diffData;return w?n.hideUnchanged?w.lines.filter(P=>P.type!=="same"):w.lines:[]}),r=A(()=>{const w=n.diffData,P=n.currentEntry;if(!w||!P)return[];const $=new Map(P.composition.map(_=>[_.category,_.tokens]));return w.lines.filter(_=>_.type==="same").map(_=>{var T;return{category:_.category,label:((T=nt[_.category])==null?void 0:T.label)??_.category,tokens:$.get(_.category)??0}}).sort((_,T)=>T.tokens-_.tokens)}),l=A(()=>r.value.length===0?"":r.value.map(w=>`${w.label}: ${ke(w.tokens)}`).join(`
28
- `)),c=A(()=>{const w=n.diffData;if(!w)return"var(--text-dim)";const P=w.delta>=0;return n.deltaTone==="bad"?P?"var(--accent-red)":"var(--accent-green)":P?"var(--accent-green)":"var(--accent-red)"});function p(w){return Math.abs(w)>=wm}function f(w,P){return p(w)?P==="up"?"diff-tone-up":"diff-tone-down":"diff-tone-muted"}function v(w){return w.type==="same"?"diff-tone-muted":w.type==="add"?f(w.delta,"up"):f(w.delta,"down")}function g(w){s("categoryClick",w)}return(w,P)=>{const $=$n("tooltip");return o.value?(m(),y("section",qg,[u("div",Gg,[P[0]||(P[0]=u("span",{class:"panel-title"},"Context Diff",-1)),e.diffData?(m(),y(ve,{key:0},[u("span",Jg,"Turn "+M(e.diffData.prevTurnNum)+" → "+M(e.diffData.currTurnNum),1),u("span",{class:"diff-delta",style:Pe({color:c.value})},M(e.diffData.delta>=0?"+":"")+M(J(ke)(e.diffData.delta)),5)],64)):oe("",!0)]),u("div",Yg,[e.diffData?(m(),y(ve,{key:0},[e.showTapes&&e.currentEntry&&e.previousEntry?(m(),y("div",Xg,[u("div",Zg,[u("span",Qg,"T"+M(e.diffData.prevTurnNum),1),u("div",em,[(m(!0),y(ve,null,Ce(e.previousEntry.composition,_=>{var T;return m(),y("div",{key:"prev-"+_.category,class:"diff-tape-seg",style:Pe({flex:_.tokens,background:((T=J(nt)[_.category])==null?void 0:T.color)??"#475569"})},null,4)}),128))]),u("span",tm,M(J(ke)(e.previousEntry.contextInfo.totalTokens)),1)]),u("div",nm,[u("span",sm,"T"+M(e.diffData.currTurnNum),1),u("div",om,[(m(!0),y(ve,null,Ce(e.currentEntry.composition,_=>{var T;return m(),y("div",{key:"curr-"+_.category,class:"diff-tape-seg",style:Pe({flex:_.tokens,background:((T=J(nt)[_.category])==null?void 0:T.color)??"#475569"})},null,4)}),128))]),u("span",im,M(J(ke)(e.currentEntry.contextInfo.totalTokens)),1)])])):oe("",!0),e.diffData.topIncreases.length>0||e.diffData.topDecreases.length>0?(m(),y("div",rm,[e.summaryMode==="combined"?(m(),y("div",lm,[u("span",am,M(e.combinedLabel),1),(m(!0),y(ve,null,Ce(e.diffData.topIncreases,_=>(m(),y("button",{key:"inc-"+_.group,class:le(["diff-summary-chip",f(_.delta,"up")]),onClick:T=>g(_.category)},M(_.label)+" +"+M(J(ke)(_.delta)),11,cm))),128)),(m(!0),y(ve,null,Ce(e.diffData.topDecreases,_=>(m(),y("button",{key:"dec-"+_.group,class:le(["diff-summary-chip",f(_.delta,"down")]),onClick:T=>g(_.category)},M(_.label)+" "+M(J(ke)(_.delta)),11,um))),128))])):(m(),y(ve,{key:1},[e.diffData.topIncreases.length>0?(m(),y("div",dm,[u("span",fm,M(e.growthLabel),1),(m(!0),y(ve,null,Ce(e.diffData.topIncreases,_=>(m(),y("button",{key:"inc-"+_.group,class:le(["diff-summary-chip",f(_.delta,"up")]),onClick:T=>g(_.category)},M(_.label)+" +"+M(J(ke)(_.delta)),11,pm))),128))])):oe("",!0),e.diffData.topDecreases.length>0?(m(),y("div",hm,[u("span",vm,M(e.shrinkLabel),1),(m(!0),y(ve,null,Ce(e.diffData.topDecreases,_=>(m(),y("button",{key:"dec-"+_.group,class:le(["diff-summary-chip",f(_.delta,"down")]),onClick:T=>g(_.category)},M(_.label)+" "+M(J(ke)(_.delta)),11,gm))),128))])):oe("",!0)],64))])):oe("",!0),e.hideUnchanged&&r.value.length>0?(m(),y("div",mm,[Ve((m(),y("span",ym,[xe(M(r.value.length)+" unchanged "+M(r.value.length===1?"category":"categories")+" hidden ",1)])),[[$,l.value]])])):oe("",!0),(m(!0),y(ve,null,Ce(i.value,(_,T)=>(m(),y("button",{key:"line-"+T,class:le(["diff-line",["diff-"+_.type,v(_)]]),onClick:F=>g(_.category)},M(_.text),11,_m))),128))],64)):(m(),y("span",bm,M(e.emptyText),1))])])):oe("",!0)}}}),mc=rt(km,[["__scopeId","data-v-f23cde3c"]]),$m={key:0,class:"panel panel--primary"},xm={class:"panel-head"},Tm={key:0,class:"finding-count"},Sm={key:0,class:"audit-row"},Cm=["onClick"],Mm={class:"rec-content"},Em={class:"rec-title"},Pm={class:"rec-detail"},Im=et({__name:"HealthFindings",props:{entry:{},recommendations:{},auditTooltip:{type:Function}},emits:["recommendationClick"],setup(e,{emit:t}){const n=t;function s(o){o.messageIndex!=null&&n("recommendationClick",o)}return(o,i)=>{const r=$n("tooltip");return e.entry.healthScore||e.recommendations.length>0?(m(),y("section",$m,[u("div",xm,[i[0]||(i[0]=u("span",{class:"panel-title"},"Findings",-1)),e.recommendations.length?(m(),y("span",Tm,M(e.recommendations.length),1)):oe("",!0)]),e.entry.healthScore?(m(),y("div",Sm,[(m(!0),y(ve,null,Ce(e.entry.healthScore.audits,l=>Ve((m(),y("span",{key:l.id,class:le(["audit-chip",l.score>=90?"audit-good":l.score>=50?"audit-warn":"audit-bad"])},[xe(M(l.name)+" ",1),u("b",null,M(l.score),1)],2)),[[r,e.auditTooltip(l)]])),128))])):oe("",!0),e.recommendations.length>0?(m(),y("div",{key:1,class:le(["panel-body rec-list",{"rec-list--scroll":e.recommendations.length>3}])},[(m(!0),y(ve,null,Ce(e.recommendations,(l,c)=>(m(),y("div",{key:c,class:le(["rec",{"rec-clickable":l.messageIndex!=null}]),onClick:p=>l.messageIndex!=null&&s(l)},[u("i",{class:le(["rec-icon",[`sev-${l.severity}`,l.severity==="high"?"i-carbon-warning-alt":l.severity==="med"?"i-carbon-information":"i-carbon-checkmark"]])},null,2),u("div",Mm,[u("div",Em,M(l.title),1),u("div",Pm,M(l.detail),1)]),u("span",{class:le(["rec-impact",`sev-${l.severity}`])},M(l.impact),3)],10,Cm))),128))],2)):oe("",!0)])):oe("",!0)}}}),Am=rt(Im,[["__scopeId","data-v-f1490cbd"]]),Lm={key:0,class:"overview"},Om={class:"narrative-copy"},Rm={class:"narrative-title"},Dm={class:"narrative-detail"},Nm={class:"narrative-actions"},Fm={class:"stats-grid"},zm={class:"stat-detail"},Bm={key:0,class:"stat-projection"},Hm={key:1,class:"stat-projection stat-projection--warn"},jm={key:2,class:"stat-tape"},Vm={key:3,class:"util-track"},Um={class:"stat-card"},Km={class:"stat-readout green"},Wm={class:"stat-detail"},qm={class:"stat-card"},Gm={class:"stat-readout"},Jm={key:0,class:"stat-detail"},Ym={key:0,class:"stat-card stat-card--health"},Xm={class:"health-ring"},Zm={width:"48",height:"48",viewBox:"0 0 48 48"},Qm=["stroke","stroke-dasharray"],ey=["fill"],ty={key:1,class:"stat-card"},ny={class:"meta-row"},sy={key:0},oy={key:1},iy={key:2},ry={key:1,class:"panel panel--secondary"},ly={class:"panel-head"},ay={class:"panel-sub"},cy={class:"panel-body msg-preview"},uy=["onClick"],dy={class:"msg-group-name"},fy={class:"msg-group-count"},py={class:"msg-group-tokens"},hy={class:"msg-group-pct"},vy={class:"msg-group-bar"},gy={key:2,class:"panel panel--secondary"},my={class:"panel-head"},yy={class:"panel-sub"},_y={class:"panel-body file-preview"},by={class:"file-list"},wy=["onClick"],ky={class:"file-path"},$y={class:"file-dir"},xy={class:"file-ops"},Ty={key:0,class:"file-op file-op--read"},Sy={key:1,class:"file-op file-op--write"},Cy={class:"file-tokens"},My={class:"file-pct"},Ey={class:"file-bar"},Py=et({__name:"OverviewTab",setup(e){const t=$t(),n=A(()=>t.selectedEntry),s=A(()=>t.selectedSession),o=A(()=>s.value?[...s.value.entries].reverse():[]),i=A(()=>{const S=n.value;return!S||!S.contextLimit?0:S.contextInfo.totalTokens/S.contextLimit}),r=A(()=>{const S=i.value;return S>=.9?"var(--accent-red)":S>=.7?"var(--accent-amber)":"var(--accent-blue)"}),l=A(()=>{const S=n.value;if(!(S!=null&&S.usage))return null;const I=S.usage.inputTokens+S.usage.cacheReadTokens+S.usage.cacheWriteTokens;return I===0?null:S.usage.cacheReadTokens/I}),c=A(()=>nn(o.value)),p=A(()=>hc(c.value)),f=A(()=>{const S=n.value;if(!S)return 0;const I=c.value,Q=I.findIndex(ie=>ie.entry.id===S.id);return Q<0?0:I.slice(0,Q+1).reduce((ie,x)=>ie+(x.isMain?1:0),0)}),v=A(()=>{const S=n.value;if(!S)return[];const I=o.value,Q=c.value;return fc(S,I,Q)}),g=A(()=>{const S=n.value;if(!S)return null;const I=c.value,Q=I.findIndex(ie=>ie.entry.id===S.id);if(Q<0)return null;for(let ie=Q-1;ie>=0;ie--)if(I[ie].isMain)return I[ie].entry;return null}),w=A(()=>{const S=n.value,I=g.value;if(!S||!I)return[];const Q=new Map(I.composition.map(D=>[D.category,D.tokens])),ie=new Map(S.composition.map(D=>[D.category,D.tokens])),x=new Set([...Q.keys(),...ie.keys()]);return Array.from(x).map(D=>{const Y=Q.get(D)??0,k=ie.get(D)??0;return{category:D,delta:k-Y}}).filter(D=>D.delta!==0).sort((D,Y)=>Math.abs(Y.delta)-Math.abs(D.delta))}),P=A(()=>{var x;const S=n.value;if(!((x=S==null?void 0:S.composition)!=null&&x.length))return null;const I=S.composition.reduce((D,Y)=>D+Y.tokens,0);if(I===0)return null;const Q={};for(const[D,Y]of Object.entries(qn))for(const k of Y)Q[k]=D;const ie=new Map;for(const D of S.composition){const Y=Q[D.category]??D.category;ie.set(Y,(ie.get(Y)||0)+D.tokens)}return[...ie.entries()].sort((D,Y)=>Y[1]-D[1]).map(([D,Y])=>{var k;return{key:D,color:((k=_t[D])==null?void 0:k.color)??"#475569",pct:Y/I*100}})}),$=A(()=>{const S=n.value;return!S||c.value.length===0?null:pc(S,c.value)}),_=A(()=>{var S;return((S=n.value)==null?void 0:S.contextInfo.messages)||[]}),T=A(()=>dc(_.value)),F=A(()=>T.value.reduce((S,I)=>S+I.tokens,0)),j=A(()=>{var S;return((S=n.value)==null?void 0:S.contextInfo.totalTokens)??0}),L=A(()=>{const S=n.value;return S?Nv({utilization:i.value,healthScore:S.healthScore,composition:S.composition,topDelta:w.value[0]??null}):null});function K(S){t.setInspectorTab(S)}function O(){t.setInspectorTab("messages")}function de(S,I=!0){O(),t.focusMessageCategory(S,I)}function ae(){O()}function W(S){O(),t.focusMessageTool("tool_results",S)}function re(S){S.messageIndex!=null&&(O(),t.focusMessageByIndex(S.messageIndex))}function ge(S){if(!(/growth/i.test(S.id)||/growth/i.test(S.name)))return S.description;const Q=S.description||"";if(!/first turn/i.test(Q)||f.value<=1)return Q;const ie=n.value,x=g.value;if(!ie||!x||!ie.contextLimit)return Q;const D=ie.contextInfo.totalTokens-x.contextInfo.totalTokens,Y=Math.abs(D),k=Y/ie.contextLimit*100;return`Compared with previous main turn, context ${D>=0?"grew":"shrunk"} by ${ke(Y)} (${k.toFixed(1)}% of limit).`}function B(S){return kp(S)}function ce(S){return $p(S)}function Z(S){return j.value>0?Math.round(S/j.value*100):0}function C(S){return j.value>0?`${S/j.value*100}%`:"0%"}const X=A(()=>{const S=s.value;if(!S||S.entries.length===0)return[];const I=S.workingDirectory;return gc(S.entries,I)}),ne=A(()=>X.value.reduce((S,I)=>S+I.tokens,0));function U(S){return ne.value>0?Math.round(S/ne.value*100):0}function se(S){return ne.value>0?`${S/ne.value*100}%`:"0%"}function we(S){O(),t.focusMessageFile(S)}function N(S){we(S)}return(S,I)=>{var ie;const Q=$n("tooltip");return n.value?(m(),y("div",Lm,[L.value?(m(),y("section",{key:0,class:le(["health-narrative",L.value.toneClass])},[u("div",Om,[u("div",Rm,M(L.value.headline),1),u("div",Dm,M(L.value.detail),1)]),u("div",Nm,[u("button",{class:"narrative-action",onClick:I[0]||(I[0]=x=>K("messages"))},[...I[4]||(I[4]=[u("i",{class:"i-carbon-chat"},null,-1),xe(" Review Messages ",-1)])]),u("button",{class:"narrative-action",onClick:I[1]||(I[1]=x=>K("timeline"))},[...I[5]||(I[5]=[u("i",{class:"i-carbon-activity"},null,-1),xe(" View Timeline ",-1)])])])],2)):oe("",!0),u("div",Fm,[u("div",{class:"stat-card stat-card--spine",style:Pe({"--spine-color":r.value})},[u("div",{class:"stat-readout",style:Pe({color:r.value})},M(J(vi)(i.value)),5),I[7]||(I[7]=u("div",{class:"stat-label"},"Context",-1)),u("div",zm,M(J(ke)(n.value.contextInfo.totalTokens))+" / "+M(J(ke)(n.value.contextLimit)),1),p.value.turnsRemaining!==null&&p.value.turnsRemaining>0?Ve((m(),y("div",Bm,[xe(" ~"+M(p.value.turnsRemaining)+" turns left ",1)])),[[Q,`Growing ~${J(ke)(Math.round(p.value.growthPerTurn))}/turn over ${p.value.sinceCompaction} turns`]]):p.value.turnsRemaining===0?Ve((m(),y("div",Hm,[...I[6]||(I[6]=[xe(" At limit ",-1)])])),[[Q,"Context window is at or near the limit"]]):oe("",!0),P.value?(m(),y("div",jm,[(m(!0),y(ve,null,Ce(P.value,x=>(m(),y("div",{key:x.key,class:"stat-tape-seg",style:Pe({flex:x.pct,background:x.color})},null,4))),128))])):(m(),y("div",Vm,[u("div",{class:"util-fill",style:Pe({width:Math.min(i.value*100,100)+"%",background:r.value})},null,4)]))],4),u("div",Um,[u("div",Km,M(J(kt)(n.value.costUsd)),1),I[8]||(I[8]=u("div",{class:"stat-label"},"Turn cost",-1)),u("div",Wm,M(J(kt)(((ie=s.value)==null?void 0:ie.entries.reduce((x,D)=>x+(D.costUsd??0),0))??0))+" session",1)]),u("div",qm,[u("div",Gm,M(n.value.usage?J(ke)(n.value.usage.outputTokens):"—"),1),I[9]||(I[9]=u("div",{class:"stat-label"},"Output",-1)),n.value.timings?(m(),y("div",Jm,M(J(hi)(n.value.timings.total_ms)),1)):oe("",!0)]),n.value.healthScore?(m(),y("div",Ym,[u("div",Xm,[(m(),y("svg",Zm,[I[10]||(I[10]=u("circle",{cx:"24",cy:"24",r:"19",fill:"none",stroke:"var(--border-dim)","stroke-width":"3","stroke-dasharray":`${89.5} 30`,"stroke-linecap":"round",transform:"rotate(135 24 24)"},null,-1)),u("circle",{cx:"24",cy:"24",r:"19",fill:"none",stroke:J(gi)(n.value.healthScore.rating),"stroke-width":"3","stroke-dasharray":`${89.5*(n.value.healthScore.overall/100)} ${119.4-89.5*(n.value.healthScore.overall/100)}`,"stroke-linecap":"round",transform:"rotate(135 24 24)",style:{transition:"stroke-dasharray 0.6s ease"}},null,8,Qm),u("text",{x:"24",y:"25","text-anchor":"middle","dominant-baseline":"central",fill:J(gi)(n.value.healthScore.rating),"font-family":"var(--font-display)","font-size":"13","font-weight":"700"},M(n.value.healthScore.overall),9,ey)]))]),I[11]||(I[11]=u("div",{class:"stat-label"},"Health",-1))])):(m(),y("div",ty,[...I[12]||(I[12]=[u("div",{class:"stat-readout dim"},"—",-1),u("div",{class:"stat-label"},"Health",-1)])]))]),u("div",ny,[u("span",null,M(n.value.contextInfo.messages.length)+" messages",1),l.value!==null?(m(),y("span",sy," cache "+M(J(vi)(l.value))+" hit ("+M(J(ke)(n.value.usage.cacheReadTokens))+"r / "+M(J(ke)(n.value.usage.cacheWriteTokens))+"w) ",1)):oe("",!0),n.value.stopReason?(m(),y("span",oy,"stop: "+M(n.value.stopReason),1)):oe("",!0),n.value.responseModel&&n.value.responseModel!==n.value.contextInfo.model?(m(),y("span",iy," model: "+M(n.value.responseModel),1)):oe("",!0)]),Oe(Wg,{entry:n.value,"turn-num":f.value,onCategoryClick:I[2]||(I[2]=x=>de(x,!1)),onToolClick:W,onFileClick:N},null,8,["entry","turn-num"]),Oe(Am,{entry:n.value,recommendations:v.value,"audit-tooltip":ge,onRecommendationClick:re},null,8,["entry","recommendations"]),Oe(mc,{"diff-data":$.value,"current-entry":n.value,"previous-entry":g.value,"show-tapes":!0,"hide-unchanged":!0,"summary-mode":"combined","delta-tone":"bad",onCategoryClick:I[3]||(I[3]=x=>de(x,!1))},null,8,["diff-data","current-entry","previous-entry"]),T.value.length?(m(),y("section",ry,[u("div",ly,[I[13]||(I[13]=u("span",{class:"panel-title"},"Messages",-1)),u("span",ay,M(_.value.length)+" messages · "+M(J(ke)(F.value)),1)]),u("div",cy,[(m(!0),y(ve,null,Ce(T.value,x=>(m(),y("div",{key:x.category,class:"msg-group-row",onClick:D=>de(x.category,!1)},[u("span",{class:"msg-group-dot",style:Pe({background:ce(x.category)})},null,4),u("span",dy,M(B(x.category)),1),u("span",fy,M(x.items.length),1),u("span",py,M(J(ke)(x.tokens)),1),u("span",hy,M(Z(x.tokens))+"%",1),u("div",vy,[u("div",{class:"msg-group-bar-fill",style:Pe({width:C(x.tokens),background:ce(x.category)})},null,4)])],8,uy))),128)),u("button",{class:"msg-view-all",onClick:ae},"View all messages ›")])])):oe("",!0),X.value.length>0?(m(),y("section",gy,[u("div",my,[I[14]||(I[14]=u("span",{class:"panel-title"},"Files",-1)),u("span",yy,M(X.value.length)+" files · "+M(J(ke)(ne.value)),1)]),u("div",_y,[u("div",by,[(m(!0),y(ve,null,Ce(X.value,(x,D)=>(m(),y("div",{key:x.path,class:"file-row",onClick:Y=>we(x.path)},[u("span",{class:"file-dot",style:Pe({background:J(_i)(D)})},null,4),Ve((m(),y("span",ky,[u("span",$y,M(J(ll)(x.path)?J(ll)(x.path)+"/":""),1),xe(M(J(Wi)(x.path)),1)])),[[Q,x.path]]),u("span",xy,[x.reads>0?Ve((m(),y("span",Ty,[xe(M(x.reads)+"r",1)])),[[Q,`${x.reads} read${x.reads>1?"s":""}`]]):oe("",!0),x.writes>0?Ve((m(),y("span",Sy,[xe(M(x.writes)+"w",1)])),[[Q,`${x.writes} write/edit${x.writes>1?"s":""}`]]):oe("",!0)]),u("span",Cy,M(J(ke)(x.tokens)),1),u("span",My,M(U(x.tokens))+"%",1),u("div",Ey,[u("div",{class:"file-bar-fill",style:Pe({width:se(x.tokens),background:J(_i)(D)})},null,4)])],8,wy))),128))])])])):oe("",!0)])):oe("",!0)}}}),Iy=rt(Py,[["__scopeId","data-v-ab5256cd"]]),Ay={__name:"splitpanes",props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],setup(e,{emit:t}){const n=t,s=e,o=Ru(),i=he([]),r=A(()=>i.value.reduce((x,D)=>(x[~~D.id]=D)&&x,{})),l=A(()=>i.value.length),c=he(null),p=he(!1),f=he({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),v=he({splitter:null,timeoutId:null}),g=A(()=>({[`splitpanes splitpanes--${s.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":f.value.dragging})),w=()=>{document.addEventListener("mousemove",_,{passive:!1}),document.addEventListener("mouseup",T),"ontouchstart"in window&&(document.addEventListener("touchmove",_,{passive:!1}),document.addEventListener("touchend",T))},P=()=>{document.removeEventListener("mousemove",_,{passive:!1}),document.removeEventListener("mouseup",T),"ontouchstart"in window&&(document.removeEventListener("touchmove",_,{passive:!1}),document.removeEventListener("touchend",T))},$=(x,D)=>{const Y=x.target.closest(".splitpanes__splitter");if(Y){const{left:k,top:b}=Y.getBoundingClientRect(),{clientX:h,clientY:a}="ontouchstart"in window&&x.touches?x.touches[0]:x;f.value.cursorOffset=s.horizontal?a-b:h-k}w(),f.value.mouseDown=!0,f.value.activeSplitter=D},_=x=>{f.value.mouseDown&&(x.preventDefault(),f.value.dragging=!0,requestAnimationFrame(()=>{de(K(x)),n("resize",i.value.map(D=>({min:D.min,max:D.max,size:D.size})))}))},T=()=>{f.value.dragging&&n("resized",i.value.map(x=>({min:x.min,max:x.max,size:x.size}))),f.value.mouseDown=!1,setTimeout(()=>{f.value.dragging=!1,P()},100)},F=(x,D)=>{"ontouchstart"in window&&(x.preventDefault(),s.dblClickSplitter&&(v.value.splitter===D?(clearTimeout(v.value.timeoutId),v.value.timeoutId=null,j(x,D),v.value.splitter=null):(v.value.splitter=D,v.value.timeoutId=setTimeout(()=>v.value.splitter=null,500)))),f.value.dragging||n("splitter-click",i.value[D])},j=(x,D)=>{let Y=0;i.value=i.value.map((k,b)=>(k.size=b===D?k.max:k.min,b!==D&&(Y+=k.min),k)),i.value[D].size-=Y,n("pane-maximize",i.value[D]),n("resized",i.value.map(k=>({min:k.min,max:k.max,size:k.size})))},L=(x,D)=>{n("pane-click",r.value[D])},K=x=>{const D=c.value.getBoundingClientRect(),{clientX:Y,clientY:k}="ontouchstart"in window&&x.touches?x.touches[0]:x;return{x:Y-(s.horizontal?0:f.value.cursorOffset)-D.left,y:k-(s.horizontal?f.value.cursorOffset:0)-D.top}},O=x=>{x=x[s.horizontal?"y":"x"];const D=c.value[s.horizontal?"clientHeight":"clientWidth"];return s.rtl&&!s.horizontal&&(x=D-x),x*100/D},de=x=>{const D=f.value.activeSplitter;let Y={prevPanesSize:W(D),nextPanesSize:re(D),prevReachedMinPanes:0,nextReachedMinPanes:0};const k=0+(s.pushOtherPanes?0:Y.prevPanesSize),b=100-(s.pushOtherPanes?0:Y.nextPanesSize),h=Math.max(Math.min(O(x),b),k);let a=[D,D+1],d=i.value[a[0]]||null,E=i.value[a[1]]||null;const q=d.max<100&&h>=d.max+Y.prevPanesSize,G=E.max<100&&h<=100-(E.max+re(D+1));if(q||G){q?(d.size=d.max,E.size=Math.max(100-d.max-Y.prevPanesSize-Y.nextPanesSize,0)):(d.size=Math.max(100-E.max-Y.prevPanesSize-re(D+1),0),E.size=E.max);return}if(s.pushOtherPanes){const z=ae(Y,h);if(!z)return;({sums:Y,panesToResize:a}=z),d=i.value[a[0]]||null,E=i.value[a[1]]||null}d!==null&&(d.size=Math.min(Math.max(h-Y.prevPanesSize-Y.prevReachedMinPanes,d.min),d.max)),E!==null&&(E.size=Math.min(Math.max(100-h-Y.nextPanesSize-Y.nextReachedMinPanes,E.min),E.max))},ae=(x,D)=>{const Y=f.value.activeSplitter,k=[Y,Y+1];return D<x.prevPanesSize+i.value[k[0]].min&&(k[0]=ge(Y).index,x.prevReachedMinPanes=0,k[0]<Y&&i.value.forEach((b,h)=>{h>k[0]&&h<=Y&&(b.size=b.min,x.prevReachedMinPanes+=b.min)}),x.prevPanesSize=W(k[0]),k[0]===void 0)?(x.prevReachedMinPanes=0,i.value[0].size=i.value[0].min,i.value.forEach((b,h)=>{h>0&&h<=Y&&(b.size=b.min,x.prevReachedMinPanes+=b.min)}),i.value[k[1]].size=100-x.prevReachedMinPanes-i.value[0].min-x.prevPanesSize-x.nextPanesSize,null):D>100-x.nextPanesSize-i.value[k[1]].min&&(k[1]=B(Y).index,x.nextReachedMinPanes=0,k[1]>Y+1&&i.value.forEach((b,h)=>{h>Y&&h<k[1]&&(b.size=b.min,x.nextReachedMinPanes+=b.min)}),x.nextPanesSize=re(k[1]-1),k[1]===void 0)?(x.nextReachedMinPanes=0,i.value.forEach((b,h)=>{h<l.value-1&&h>=Y+1&&(b.size=b.min,x.nextReachedMinPanes+=b.min)}),i.value[k[0]].size=100-x.prevPanesSize-re(k[0]-1),null):{sums:x,panesToResize:k}},W=x=>i.value.reduce((D,Y,k)=>D+(k<x?Y.size:0),0),re=x=>i.value.reduce((D,Y,k)=>D+(k>x+1?Y.size:0),0),ge=x=>[...i.value].reverse().find(D=>D.index<x&&D.size>D.min)||{},B=x=>i.value.find(D=>D.index>x+1&&D.size>D.min)||{},ce=()=>{var x;Array.from(((x=c.value)==null?void 0:x.children)||[]).forEach(D=>{const Y=D.classList.contains("splitpanes__pane"),k=D.classList.contains("splitpanes__splitter");!Y&&!k&&(D.remove(),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))})},Z=(x,D,Y=!1)=>{const k=x-1,b=document.createElement("div");b.classList.add("splitpanes__splitter"),Y||(b.onmousedown=h=>$(h,k),typeof window<"u"&&"ontouchstart"in window&&(b.ontouchstart=h=>$(h,k)),b.onclick=h=>F(h,k+1)),s.dblClickSplitter&&(b.ondblclick=h=>j(h,k+1)),D.parentNode.insertBefore(b,D)},C=x=>{x.onmousedown=void 0,x.onclick=void 0,x.ondblclick=void 0,x.remove()},X=()=>{var x;const D=Array.from(((x=c.value)==null?void 0:x.children)||[]);D.forEach(k=>{k.className.includes("splitpanes__splitter")&&C(k)});let Y=0;D.forEach(k=>{k.className.includes("splitpanes__pane")&&(!Y&&s.firstSplitter?Z(Y,k,!0):Y&&Z(Y,k),Y++)})},ne=({uid:x,...D})=>{const Y=r.value[x];Object.entries(D).forEach(([k,b])=>Y[k]=b)},U=x=>{var D;let Y=-1;Array.from(((D=c.value)==null?void 0:D.children)||[]).some(k=>(k.className.includes("splitpanes__pane")&&Y++,k.isSameNode(x.el))),i.value.splice(Y,0,{...x,index:Y}),i.value.forEach((k,b)=>k.index=b),p.value&&Je(()=>{X(),we({addedPane:i.value[Y]}),n("pane-add",{index:Y,panes:i.value.map(k=>({min:k.min,max:k.max,size:k.size}))})})},se=x=>{const D=i.value.findIndex(k=>k.id===x),Y=i.value.splice(D,1)[0];i.value.forEach((k,b)=>k.index=b),Je(()=>{X(),we({removedPane:{...Y}}),n("pane-remove",{removed:Y,panes:i.value.map(k=>({min:k.min,max:k.max,size:k.size}))})})},we=(x={})=>{!x.addedPane&&!x.removedPane?S():i.value.some(D=>D.givenSize!==null||D.min||D.max<100)?I(x):N(),p.value&&n("resized",i.value.map(D=>({min:D.min,max:D.max,size:D.size})))},N=()=>{const x=100/l.value;let D=0;const Y=[],k=[];i.value.forEach(b=>{b.size=Math.max(Math.min(x,b.max),b.min),D-=b.size,b.size>=b.max&&Y.push(b.id),b.size<=b.min&&k.push(b.id)}),D>.1&&Q(D,Y,k)},S=()=>{let x=100;const D=[],Y=[];let k=0;i.value.forEach(h=>{x-=h.size,h.givenSize!==null&&k++,h.size>=h.max&&D.push(h.id),h.size<=h.min&&Y.push(h.id)});let b=100;x>.1&&(i.value.forEach(h=>{h.givenSize===null&&(h.size=Math.max(Math.min(x/(l.value-k),h.max),h.min)),b-=h.size}),b>.1&&Q(b,D,Y))},I=({addedPane:x,removedPane:D}={})=>{let Y=100/l.value,k=0;const b=[],h=[];((x==null?void 0:x.givenSize)??null)!==null&&(Y=(100-x.givenSize)/(l.value-1).value),i.value.forEach(a=>{k-=a.size,a.size>=a.max&&b.push(a.id),a.size<=a.min&&h.push(a.id)}),!(Math.abs(k)<.1)&&(i.value.forEach(a=>{(x==null?void 0:x.givenSize)!==null&&(x==null?void 0:x.id)===a.id||(a.size=Math.max(Math.min(Y,a.max),a.min)),k-=a.size,a.size>=a.max&&b.push(a.id),a.size<=a.min&&h.push(a.id)}),k>.1&&Q(k,b,h))},Q=(x,D,Y)=>{let k;x>0?k=x/(l.value-D.length):k=x/(l.value-Y.length),i.value.forEach((b,h)=>{if(x>0&&!D.includes(b.id)){const a=Math.max(Math.min(b.size+k,b.max),b.min),d=a-b.size;x-=d,b.size=a}else if(!Y.includes(b.id)){const a=Math.max(Math.min(b.size+k,b.max),b.min),d=a-b.size;x-=d,b.size=a}}),Math.abs(x)>.1&&Je(()=>{p.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})};Ge(()=>s.firstSplitter,()=>X()),Ge(()=>s.dblClickSplitter,x=>{[...c.value.querySelectorAll(".splitpanes__splitter")].forEach((D,Y)=>{D.ondblclick=x?k=>j(k,Y):void 0})}),_o(()=>p.value=!1),kn(()=>{ce(),X(),we(),n("ready"),p.value=!0});const ie=()=>{var x;return Bi("div",{ref:c,class:g.value},(x=o.default)==null?void 0:x.call(o))};return un("panes",i),un("indexedPanes",r),un("horizontal",A(()=>s.horizontal)),un("requestUpdate",ne),un("onPaneAdd",U),un("onPaneRemove",se),un("onPaneClick",L),(x,D)=>(m(),mt(ia(ie)))}},dl={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(e){var t;const n=e,s=Et("requestUpdate"),o=Et("onPaneAdd"),i=Et("horizontal"),r=Et("onPaneRemove"),l=Et("onPaneClick"),c=(t=Os())==null?void 0:t.uid,p=Et("indexedPanes"),f=A(()=>p.value[c]),v=he(null),g=A(()=>{const _=isNaN(n.size)||n.size===void 0?0:parseFloat(n.size);return Math.max(Math.min(_,P.value),w.value)}),w=A(()=>{const _=parseFloat(n.minSize);return isNaN(_)?0:_}),P=A(()=>{const _=parseFloat(n.maxSize);return isNaN(_)?100:_}),$=A(()=>{var _;return`${i.value?"height":"width"}: ${(_=f.value)==null?void 0:_.size}%`});return kn(()=>{o({id:c,el:v.value,min:w.value,max:P.value,givenSize:n.size===void 0?null:g.value,size:g.value})}),Ge(()=>g.value,_=>s({uid:c,size:_})),Ge(()=>w.value,_=>s({uid:c,min:_})),Ge(()=>P.value,_=>s({uid:c,max:_})),_o(()=>r(c)),(_,T)=>(m(),y("div",{ref_key:"paneEl",ref:v,class:"splitpanes__pane",onClick:T[0]||(T[0]=F=>J(l)(F,_._.uid)),style:Pe($.value)},[_s(_.$slots,"default")],4))}};function Ly(){const e=Is(new Set);function t(r){e.has(r)?e.delete(r):e.add(r)}function n(r){return e.has(r)}function s(r){e.add(r)}function o(r){e.delete(r)}function i(){e.clear()}return{expanded:e,toggle:t,isExpanded:n,expand:s,collapse:o,collapseAll:i}}const Oy="modulepreload",Ry=function(e){return"/"+e},fl={},Be=function(t,n,s){let o=Promise.resolve();if(n&&n.length>0){let r=function(p){return Promise.all(p.map(f=>Promise.resolve(f).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));o=r(n.map(p=>{if(p=Ry(p),p in fl)return;fl[p]=!0;const f=p.endsWith(".css"),v=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${v}`))return;const g=document.createElement("link");if(g.rel=f?"stylesheet":Oy,f||(g.as="script"),g.crossOrigin="",g.href=p,c&&g.setAttribute("nonce",c),document.head.appendChild(g),f)return new Promise((w,P)=>{g.addEventListener("load",w),g.addEventListener("error",()=>P(new Error(`Unable to preload CSS for ${p}`)))})}))}function i(r){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=r,window.dispatchEvent(l),!l.defaultPrevented)throw r}return o.then(r=>{for(const l of r||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},Dy={class:"detail-header"},Ny={class:"header-top"},Fy={class:"nav-btns"},zy=["disabled"],By=["disabled"],Hy={key:0,class:"header-meta"},jy={class:"detail-tabs"},Vy={key:0,class:"block-sep"},Uy=["innerHTML"],Ky={class:"raw-header"},Wy=["innerHTML"],qy={class:"detail-footer"},Gy={class:"meta-key"},Jy=["title"],pl=5e4,hl=500,Yy=2e4,Xy=450,Zy=et({__name:"DetailPane",props:{entry:{},messages:{},selectedIndex:{}},emits:["close","navigate"],setup(e,{emit:t}){const n=e,s=t,o=he("rendered"),i=he(!1),r=he(null);let l=null,c=null;const p=new Map,f=new Set,v=he(0),g=A(()=>{var k;return((k=n.messages[n.selectedIndex])==null?void 0:k.msg)??null}),w=A(()=>Mo(n.entry.contextInfo.messages||[])),P=A(()=>{const k=g.value;if(!k)return"";const b=It(k);let a=(nt[b]||{label:b}).label;if(k.contentBlocks)for(const d of k.contentBlocks){if(d.type==="tool_use"){a=`Tool Call — ${d.name||"unknown"}`;break}if(d.type==="tool_result"){const q=d.tool_use_id?w.value[d.tool_use_id]:null;a=`Tool Result${q?" — "+q:""}`;break}if(d.type==="thinking"){a="Thinking";break}}return a}),$=A(()=>{if(!g.value)return"";const k=It(g.value);return(nt[k]||{color:"#4b5563"}).color}),_=A(()=>!g.value||!n.entry.contextInfo.totalTokens?"0":((g.value.tokens||0)/n.entry.contextInfo.totalTokens*100).toFixed(1)),T=A(()=>n.selectedIndex>0),F=A(()=>n.selectedIndex<n.messages.length-1);Ge(()=>n.selectedIndex,()=>{o.value="rendered",i.value=!1,Je(()=>{r.value&&(r.value.scrollTop=0)}),Je(()=>{x()})}),Ge([o,i],()=>{Je(()=>{x()})}),Ge(g,()=>{Je(()=>{x()})},{immediate:!0});function j(k){const b=n.selectedIndex+k;b>=0&&b<n.messages.length&&s("navigate",b)}function L(k){k.key==="Escape"&&(s("close"),k.preventDefault()),(k.key==="ArrowUp"||k.key==="k")&&(j(-1),k.preventDefault()),(k.key==="ArrowDown"||k.key==="j")&&(j(1),k.preventDefault())}const K=he("Copy");async function O(){if(!g.value)return;const k=o.value==="raw"?JSON.stringify(Wo(g.value),null,2):xp(g.value);await navigator.clipboard.writeText(k),K.value="Copied!",setTimeout(()=>{K.value="Copy"},1500)}function de(k){if(i.value)return{text:k,truncated:!1};if(k.length>pl)return{text:k.slice(0,pl),truncated:!0};const b=k.split(`
29
- `);return b.length>hl?{text:b.slice(0,hl).join(`
30
- `),truncated:!0}:{text:k,truncated:!1}}function ae(k){let b=2166136261;for(let h=0;h<k.length;h++)b^=k.charCodeAt(h),b=Math.imul(b,16777619);return(b>>>0).toString(36)}function W(k){return k.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function re(k,b,h){let a="",d=0;b.lastIndex=0;let E=b.exec(k);for(;E;){const q=E.index,G=E[0];a+=W(k.slice(d,q)),a+=h(G,q),d=q+G.length,E=b.exec(k)}return a+=W(k.slice(d)),a}function ge(k){return re(k,/"(?:\\.|[^"\\])*"(?=\s*:)?|"(?:\\.|[^"\\])*"|\btrue\b|\bfalse\b|\bnull\b|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,(h,a)=>{if(h.startsWith('"')){const d=k.slice(a+h.length);return`<span class="${/^\s*:/.test(d)?"syn-key":"syn-str"}">${W(h)}</span>`}return h==="true"||h==="false"?`<span class="syn-bool">${h}</span>`:h==="null"?`<span class="syn-null">${h}</span>`:`<span class="syn-num">${h}</span>`})}function B(k){return re(k,/<!--[\s\S]*?-->|<\/?[\w:.-]+(?:\s+[\w:.-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'))?)*\s*\/?>/g,h=>{if(h.startsWith("<!--"))return`<span class="syn-com">${W(h)}</span>`;const a=/^<(\/?)([\w:.-]+)([\s\S]*?)(\/?)>$/.exec(h);if(!a)return`<span class="syn-tag">${W(h)}</span>`;const d=a[1]?"/":"",E=a[2],q=a[3]||"",G=a[4]?"/":"";let z="";const fe=/([\w:.-]+)(\s*=\s*)(".*?"|'.*?')/g;let pe=0,ue=fe.exec(q);for(;ue;)z+=W(q.slice(pe,ue.index)),z+=`<span class="syn-attr">${W(ue[1])}</span>`,z+=W(ue[2]),z+=`<span class="syn-str">${W(ue[3])}</span>`,pe=ue.index+ue[0].length,ue=fe.exec(q);return z+=W(q.slice(pe)),`<span class="syn-punc">&lt;${d}</span><span class="syn-tag">${W(E)}</span>${z}<span class="syn-punc">${G}&gt;</span>`})}function ce(k){return re(k,/```[\s\S]*?```|`[^`\n]+`|^#{1,6}\s.+$|^\s*[-*+]\s.+$|^\s*\d+\.\s.+$|^>\s.+$|\*\*[^*\n]+\*\*|__[^_\n]+__|\*[^*\n]+\*|_[^_\n]+_|~~[^~\n]+~~|\[[^\]]+\]\([^)]+\)/gm,h=>h.startsWith("```")||h.startsWith("`")?`<span class="syn-code">${W(h)}</span>`:h.startsWith("#")?`<span class="syn-heading">${W(h)}</span>`:/^\s*[-*+]\s/.test(h)||/^\s*\d+\.\s/.test(h)?`<span class="syn-list">${W(h)}</span>`:h.startsWith(">")?`<span class="syn-quote">${W(h)}</span>`:h.startsWith("[")?`<span class="syn-link">${W(h)}</span>`:`<span class="syn-em">${W(h)}</span>`)}function Z(k){return re(k,/\/\/.*$|\/\*[\s\S]*?\*\/|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|`(?:\\.|[^`\\])*`|\b(?:const|let|var|function|return|if|else|for|while|switch|case|break|continue|try|catch|finally|class|extends|new|import|from|export|async|await|interface|type|public|private|protected|throw|in|of|typeof|instanceof|true|false|null|undefined)\b|-?\d+(?:\.\d+)?/gm,h=>h.startsWith("//")||h.startsWith("/*")?`<span class="syn-com">${W(h)}</span>`:h.startsWith('"')||h.startsWith("'")||h.startsWith("`")?`<span class="syn-str">${W(h)}</span>`:/^-?\d/.test(h)?`<span class="syn-num">${h}</span>`:h==="true"||h==="false"?`<span class="syn-bool">${h}</span>`:h==="null"||h==="undefined"?`<span class="syn-null">${h}</span>`:`<span class="syn-keyword">${h}</span>`)}function C(k){const b=k.trim();if(!(b.startsWith("{")||b.startsWith("[")))return!1;try{return JSON.parse(b),!0}catch{return!1}}function X(k){const b=k.trim();return b.startsWith("<")?/<[\w:.-]+[\s>]/.test(b)&&/<\/[\w:.-]+>/.test(b):!1}function ne(k){return/(^#{1,6}\s)|(^\s*[-*+]\s)|(^\s*\d+\.\s)|(```)|(`[^`\n]+`)|(\[[^\]]+\]\([^)]+\))|(^>\s)|(\*\*[^*\n]+\*\*)/m.test(k)}function U(k){return/[{}();]|(^\s*(const|let|var|function|if|for|while|class|import|export)\s)/m.test(k)}function se(k,b=!1){return b||C(k)?"json":X(k)?"xml":ne(k)?"markdown":U(k)?"code":"text"}function we(k,b=!1){const h=se(k,b);return h==="json"?ge(k):h==="xml"?B(k):h==="markdown"?ce(k):h==="code"?Z(k):W(k)}function N(k){return k==="json"?"json":k==="xml"?"xml":k==="markdown"?"markdown":k==="code"?"typescript":null}function S(k,b){return!(b==="text"||k.length>Yy||k.split(`
31
- `).length>Xy)}async function I(){if(!l){if(c)return c;c=(async()=>{const{createHighlighterCore:k}=await Be(async()=>{const{createHighlighterCore:h}=await import("./core-IjjuPsJe.js");return{createHighlighterCore:h}},[]),{createOnigurumaEngine:b}=await Be(async()=>{const{createOnigurumaEngine:h}=await import("./engine-oniguruma-KVl37NQr.js");return{createOnigurumaEngine:h}},[]);l=await k({engine:b(Be(()=>import("./wasm-CG6Dc4jp.js"),[])),themes:[Be(()=>import("./github-dark-DHJKELXO.js"),[])],langs:[Be(()=>import("./json-Cp-IABpG.js"),[]),Be(()=>import("./jsonc-Des-eS-w.js"),[]),Be(()=>import("./yaml-Buea-lGh.js"),[]),Be(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([0,1])),Be(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([2,3,4])),Be(()=>import("./css-DPfMkruS.js"),[]),Be(()=>import("./markdown-Cvjx9yec.js"),[]),Be(()=>import("./typescript-BPQ3VLAy.js"),[]),Be(()=>import("./javascript-wDzz0qaB.js"),[]),Be(()=>import("./jsx-g9-lgVsj.js"),[]),Be(()=>import("./tsx-COt5Ahok.js"),[]),Be(()=>import("./python-B6aJPvgy.js"),[]),Be(()=>import("./shellscript-Yzrsuije.js"),[]),Be(()=>import("./sql-BLtJtn59.js"),[]),Be(()=>import("./diff-D97Zzqfu.js"),[]),Be(()=>import("./toml-vGWfd6FD.js"),[]),Be(()=>import("./rust-B1yitclQ.js"),[]),Be(()=>import("./go-CxLEBnE3.js"),[]),Be(()=>import("./c-BIGW1oBm.js"),[]),Be(()=>import("./cpp-BRuaLJcg.js"),__vite__mapDeps([5,6,7])),Be(()=>import("./java-CylS5w8V.js"),[]),Be(()=>import("./ruby-CkRbH_-r.js"),__vite__mapDeps([8,2,3,4,0,1,7,9,10,11,12,5,6,13,14])),Be(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([15,2,3,4,0,1,7,16])),Be(()=>import("./swift-Dg5xB15N.js"),[]),Be(()=>import("./kotlin-BdnUsdx6.js"),[]),Be(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([9,3,10,11,12])),Be(()=>import("./dockerfile-BcOcwvcX.js"),[])]})})(),await c}}async function Q(k,b,h){if(!S(k,b)||p.has(h)||f.has(h))return;const a=N(b);if(a){f.add(h);try{if(await I(),!l)return;const d=l.codeToHtml(k,{lang:a,theme:"github-dark"});p.set(h,d),v.value+=1}catch{}finally{f.delete(h)}}}function ie(k,b=!1){v.value;const h=se(k,b),a=`${h}:${ae(k)}`;if(S(k,h)){const d=p.get(a);if(d)return d;Q(k,h,a)}return we(k,b)}function x(){const k=g.value;if(!k)return;if(o.value==="raw"){const h=JSON.stringify(Wo(k),null,2),a=de(h).text,d=se(a,!0);Q(a,d,`${d}:${ae(a)}`);return}const b=D();for(const h of b){const a=de(h.content).text,d=se(a,h.isJson);Q(a,d,`${d}:${ae(a)}`)}}function D(){const k=g.value;if(!k)return[];const b=k.contentBlocks;return b&&b.length>0?b.map(h=>{if(h.type==="tool_use"){const d=h.input?JSON.stringify(h.input,null,2):"{}";return{type:"tool_use",label:`tool_use: ${h.name||"?"}`,labelClass:"lbl-tool-use",content:d,isJson:!0}}if(h.type==="tool_result"){const d=h.tool_use_id?w.value[h.tool_use_id]:null,E=typeof h.content=="string"?h.content:JSON.stringify(h.content,null,2);return{type:"tool_result",label:`tool_result${d?": "+d:""}`,labelClass:"lbl-tool-result",content:E,isJson:!1}}const a=h;return a.type==="thinking"?{type:"thinking",label:"thinking",labelClass:"lbl-thinking",content:a.thinking||a.text||"",isJson:!1}:h.type==="text"||h.type==="input_text"?{type:h.type,label:h.type,labelClass:"lbl-text",content:h.text||"",isJson:!1}:h.type==="image"?{type:"image",label:"image",labelClass:"lbl-image",content:"[Image content]",isJson:!1}:{type:"unknown",label:"block",labelClass:"lbl-text",content:`[Unknown block type: ${h.type||"unspecified"}]`,isJson:!1}}):[{type:"text",label:"",labelClass:"",content:k.content||"",isJson:!1}]}const Y=A(()=>{const k=g.value;if(!k)return[];const b=[["Role",k.role],["Tokens",ke(k.tokens||0)],["% context",_.value+"%"],["Model",n.entry.contextInfo.model||"?"]];if(k.contentBlocks){for(const h of k.contentBlocks)if(h.type==="tool_use"&&(b.push(["tool_use_id",h.id||"?"]),b.push(["tool_name",h.name||"?"])),h.type==="tool_result"&&h.tool_use_id){b.push(["tool_use_id",h.tool_use_id]);const a=w.value[h.tool_use_id];a&&b.push(["tool_name",a])}}return b.push(["Position",`${n.selectedIndex+1} / ${n.messages.length}`]),b});return(k,b)=>{const h=$n("tooltip");return m(),y("div",{class:"detail",tabindex:"0",onKeydown:L},[u("div",Dy,[u("div",Ny,[u("span",{class:"detail-title",style:Pe({color:$.value})},M(P.value),5),u("div",Fy,[Ve((m(),y("button",{disabled:!T.value,onClick:b[0]||(b[0]=a=>j(-1))},[...b[6]||(b[6]=[u("i",{class:"i-carbon-chevron-up"},null,-1)])],8,zy)),[[h,"↑ Previous"]]),Ve((m(),y("button",{disabled:!F.value,onClick:b[1]||(b[1]=a=>j(1))},[...b[7]||(b[7]=[u("i",{class:"i-carbon-chevron-down"},null,-1)])],8,By)),[[h,"↓ Next"]])]),Ve((m(),y("button",{class:"close-btn",onClick:b[2]||(b[2]=a=>k.$emit("close"))},[...b[8]||(b[8]=[u("i",{class:"i-carbon-close"},null,-1)])])),[[h,"Close (Esc)"]])]),g.value?(m(),y("div",Hy,[u("span",null,[u("b",null,M(g.value.role),1)]),u("span",null,M(J(ke)(g.value.tokens||0))+" tok",1),u("span",null,M(_.value)+"%",1),u("span",null,M(e.selectedIndex+1)+"/"+M(e.messages.length),1)])):oe("",!0)]),u("div",jy,[u("button",{class:le({on:o.value==="rendered"}),onClick:b[3]||(b[3]=a=>o.value="rendered")},"Rendered",2),u("button",{class:le({on:o.value==="raw"}),onClick:b[4]||(b[4]=a=>o.value="raw")},"Raw",2)]),u("div",{ref_key:"contentEl",ref:r,class:"detail-body"},[o.value==="rendered"&&g.value?(m(!0),y(ve,{key:0},Ce(D(),(a,d)=>(m(),y(ve,{key:d},[d>0?(m(),y("hr",Vy)):oe("",!0),a.label?(m(),y("div",{key:1,class:le(["block-label",a.labelClass])},M(a.label),3)):oe("",!0),u("div",{class:le(["block-content syntax rich-html",`kind-${se(de(a.content).text,a.isJson)}`]),innerHTML:ie(de(a.content).text,a.isJson)},null,10,Uy),de(a.content).truncated?(m(),y("button",{key:2,class:"show-more",onClick:b[5]||(b[5]=E=>i.value=!0)}," Show full content… ")):oe("",!0)],64))),128)):o.value==="raw"&&g.value?(m(),y(ve,{key:1},[u("div",Ky,[u("button",{class:le(["copy-btn",{copied:K.value==="Copied!"}]),onClick:O},[b[9]||(b[9]=u("i",{class:"i-carbon-copy"},null,-1)),xe(" "+M(K.value),1)],2)]),u("div",{class:"block-content syntax rich-html kind-json",innerHTML:ie(JSON.stringify(J(Wo)(g.value),null,2),!0)},null,8,Wy)],64)):oe("",!0)],512),u("div",qy,[b[10]||(b[10]=u("div",{class:"meta-header"},"Metadata",-1)),(m(!0),y(ve,null,Ce(Y.value,([a,d])=>(m(),y(ve,{key:a},[u("span",Gy,M(a),1),u("span",{class:"meta-val",title:d},M(d),9,Jy)],64))),128))])],32)}}}),Qy=rt(Zy,[["__scopeId","data-v-b695512a"]]),e0={class:"msg-toolbar"},t0={class:"message-view-toggle"},n0={key:0,class:"message-view-toggle agent-toggle"},s0={key:0,class:"heavy-strip"},o0={class:"heavy-actions"},i0=["onClick"],r0={class:"heavy-category"},l0={class:"heavy-preview"},a0={class:"heavy-tokens"},c0={key:1,class:"focus-strip"},u0={key:0},d0={key:1},f0=["data-category"],p0=["onClick"],h0={class:"group-name"},v0={class:"group-stats"},g0={class:"group-bar-track"},m0=["data-tool-name","onClick"],y0={class:"msg-role"},_0={class:"msg-preview"},b0={key:0,class:"focus-strip"},w0={class:"focus-file-name"},k0={class:"focus-file-count"},$0={class:"chrono-list"},x0=["onClick"],T0={class:"chrono-gutter subagent-gutter"},S0={class:"chrono-preview subagent-preview"},C0={class:"chrono-tok subagent-model"},M0={class:"chrono-turn-label"},E0={key:2,class:"chrono-future-sep"},P0=["onClick"],I0={class:"chrono-gutter"},A0={class:"chrono-type"},L0={class:"chrono-preview"},O0=et({__name:"MessagesTab",setup(e){const t=$t(),n=A(()=>t.selectedEntry),s=A(()=>t.selectedSession),{isExpanded:o,toggle:i,expand:r}=Ly(),l=he(null),c=he("chrono"),p=he(!1),f=he(0),v=he(null),g=he(1),w=he(null),P=he([]),$=he(0),_=A(()=>Mo(F.value)),T=A(()=>{const V=s.value;return!V||V.entries.length<=1?!1:nn([...V.entries].reverse()).some(ye=>!ye.isMain)}),F=A(()=>{var H;if(!n.value)return[];t.entryDetailVersion;const V=t.getEntryDetail(n.value.id);return(H=V==null?void 0:V.messages)!=null&&H.length?V.messages:n.value.contextInfo.messages||[]}),j=A(()=>!s.value||s.value.entries.length===0?null:s.value.entries[0]),L=A(()=>{var H;if(!j.value)return[];t.entryDetailVersion;const V=t.getEntryDetail(j.value.id);return(H=V==null?void 0:V.messages)!=null&&H.length?V.messages:j.value.contextInfo.messages||[]}),K=A(()=>F.value.length),O=A(()=>t.selectionMode!=="pinned"?!1:L.value.length>K.value),de=A(()=>{if(!O.value)return F.value.map((H,ye)=>({msg:H,origIdx:ye,future:!1}));const V=[];for(let H=0;H<F.value.length;H++)V.push({msg:F.value[H],origIdx:H,future:!1});for(let H=F.value.length;H<L.value.length;H++)V.push({msg:L.value[H],origIdx:H,future:!0});return V}),ae=A(()=>{const V=de.value,H=new Set;V.length>0&&H.add(0);let ye=!1;for(let te=0;te<V.length;te++){const be=V[te].msg.role;be==="assistant"?ye=!0:be==="user"&&ye&&(H.add(te),ye=!1)}return H}),W=A(()=>{const V=s.value,H=n.value;if(!V||!H||t.messagesMode!=="all")return new Map;const ye=nn([...V.entries].reverse()),te=[],be=[];let Ie=[];for(const Fe of ye)Fe.isMain?(te.push(Fe.entry),te.length>1&&be.push([...Ie]),Ie=[]):te.length>0&&Ie.push(Fe.entry);be.push([...Ie]);const Ae=te.findIndex(Fe=>Fe.id===H.id);if(Ae<0)return new Map;const at=Array.from(ae.value).sort((Fe,Ye)=>Fe-Ye),Mt=B.value,xn=new Map;for(let Fe=0;Fe<=Ae&&Fe<be.length;Fe++){const Ye=be[Fe];if(Ye.length===0)continue;const Qe=Fe+1-Mt;Qe<0||Qe<at.length&&xn.set(at[Qe],Ye)}return xn}),re=A(()=>{const V=s.value,H=n.value;if(!V||!H)return 1;const ye=nn([...V.entries].reverse());let te=0;for(const be of ye)if(be.isMain&&te++,be.entry.id===H.id)return te;return 1}),ge=A(()=>{const V=K.value;let H=0;for(const ye of ae.value)ye<V&&H++;return H}),B=A(()=>Math.max(0,re.value-ge.value)),ce=A(()=>{const V=new Map;let H=B.value;for(const ye of ae.value)H++,V.set(ye,H);return V}),Z=A(()=>dc(F.value)),C=A(()=>{if(c.value==="chrono")return we.value;const V=[];for(const H of Z.value)for(const ye of H.items)V.push(ye);return V}),X=A(()=>w.value!==null),ne=A(()=>X.value?w.value:n.value),U=A(()=>X.value?P.value:C.value),se=A(()=>X.value?$.value:f.value),we=A(()=>F.value.map((V,H)=>({msg:V,origIdx:H}))),N=A(()=>{const V=[];let H=0;for(const ye of de.value)ye.future||(H+=ye.msg.tokens||0),V.push(H);return V}),S=A(()=>{var V;return((V=n.value)==null?void 0:V.contextInfo.totalTokens)??0}),I=A(()=>{const V=[];for(const H of Z.value)for(const ye of H.items)V.push({origIdx:ye.origIdx,category:H.category,preview:Ko(ye.msg,_.value)||"(empty)",tokens:ye.msg.tokens||0});return V.filter(H=>H.tokens>0).sort((H,ye)=>ye.tokens-H.tokens).slice(0,3)}),Q=A(()=>t.messageFocusTool),ie=A(()=>t.messageFocusCategory),x=A(()=>t.messageFocusFile),D=A(()=>{var te;const V=t.messageFocusCategory;if(!V)return null;const H=new Set(Z.value.map(be=>be.category));if(H.has(V))return V;const ye={assistant_text:["tool_calls","thinking","assistant_text","user_text"],tool_definitions:["tool_calls","tool_results","system_injections"],system_prompt:["system_injections","assistant_text","user_text"],images:["user_text","assistant_text","tool_results"],cache_markers:["tool_results","assistant_text","user_text"],other:["assistant_text","user_text","tool_results"]};for(const be of ye[V]||[])if(H.has(be))return be;return((te=Z.value[0])==null?void 0:te.category)??null}),Y=A(()=>!!ie.value&&!!D.value&&ie.value!==D.value);function k(){w.value=null,P.value=[]}function b(V){k(),f.value=V,E(V),p.value=!0}function h(){p.value=!1,k()}function a(V){V.key==="Escape"&&p.value&&(h(),V.preventDefault(),V.stopPropagation())}function d(V){var be;const H=(V.contentBlocks||[])[0];if(!H)return`${V.role}|${V.tokens||0}|${((be=V.content)==null?void 0:be.slice(0,160))||""}`;if(H.type==="tool_result"){const Ie=typeof H.content=="string"?H.content:JSON.stringify(H.content||"");return`${V.role}|${V.tokens||0}|tool_result|${H.tool_use_id||""}|${Ie.slice(0,160)}`}if(H.type==="tool_use")return`${V.role}|${V.tokens||0}|tool_use|${H.id||""}|${H.name||""}|${JSON.stringify(H.input||{}).slice(0,120)}`;const ye=H,te=String(ye.text||ye.thinking||"").slice(0,160);return`${V.role}|${V.tokens||0}|${String(ye.type||"other")}|${te}`}function E(V){const H=C.value[V];if(!H)return;const ye=d(H.msg);v.value=ye;let te=0;for(let be=0;be<=V;be++)d(C.value[be].msg)===ye&&(te+=1);g.value=Math.max(1,te)}function q(){const V=v.value;if(!V)return-1;let H=0;for(let ye=0;ye<C.value.length;ye++)if(d(C.value[ye].msg)===V&&(H+=1,H===g.value))return ye;return-1}function G(V){X.value?$.value=V:(f.value=V,E(V))}function z(V,H){let ye=0;for(let te=0;te<Z.value.length;te++){if(te===V)return ye+H;ye+=Z.value[te].items.length}return 0}function fe(V){const H=C.value.findIndex(ye=>ye.origIdx===V);if(H>=0){if(c.value==="category"){const ye=F.value[V];if(ye){const te=It(ye);r(te)}}b(H)}}function pe(V){const H=It(V);return(nt[H]||{color:"#4b5563"}).color}function ue(V){const H=It(V);return(nt[H]||{label:H}).label}function ee(V){var te;if(!s.value)return;const H=s.value.entries;let ye=null;for(let be=H.length-1;be>=0;be--)if((((te=H[be].contextInfo.messages)==null?void 0:te.length)??0)>V){ye=H[be];break}ye||(ye=H[0]),t.pinEntry(ye.id)}async function $e(V){var Ie;const H=s.value;if(!H)return;const ye=H.entries.find(Ae=>Ae.id===V);if(!ye)return;await t.loadEntryDetail(V),t.entryDetailVersion;const te=t.getEntryDetail(V),be=(Ie=te==null?void 0:te.messages)!=null&&Ie.length?te.messages:ye.contextInfo.messages||[];w.value=ye,P.value=be.map((Ae,at)=>({msg:Ae,origIdx:at})),$.value=0,p.value=!0}function me(V){if(It(V)!=="tool_results")return null;for(const H of V.contentBlocks||[])if(H.type==="tool_result")return H.tool_use_id&&_.value[H.tool_use_id]||null;return null}function Se(V){const H=Q.value;if(!H)return{};const ye=me(V);if(!ye)return{"tool-muted":!0};const te=ye.trim().toLowerCase(),be=H.trim().toLowerCase();return{"tool-focused":te===be,"tool-muted":te!==be}}async function Me(){const V=D.value,H=t.messageFocusIndex,ye=t.messageFocusOpenDetail,te=t.messageFocusTool,be=t.messageFocusFile;t.clearMessageFocus();const Ie=H;if(Ie!=null){if(c.value==="chrono"){for(let Fe=0;Fe<4;Fe++){await Je(),fe(Ie),await Je();const Ye=l.value;if(Ye){const R=Array.from(Ye.querySelectorAll(".chrono-row")).find(_e=>_e.classList.contains("selected"));if(R){R.scrollIntoView({block:"center",behavior:"smooth"});return}}}return}for(let Fe=0;Fe<4;Fe++){await Je();for(const Ye of Z.value)if(Ye.items.find(R=>R.origIdx===Ie)){r(Ye.category),await Je(),await Je(),fe(Ie),await Je();const R=l.value;if(R){const Te=Array.from(R.querySelectorAll(".msg-row")).find(Ke=>Ke.classList.contains("selected"));Te&&Te.scrollIntoView({block:"center",behavior:"smooth"})}return}}return}if(be){t.messageFocusFile=be,c.value="chrono",await Je();const Fe=F.value,Ye=new Set;for(const R of Fe)if(R.contentBlocks){for(const _e of R.contentBlocks)if(_e.type==="tool_use"){const Te=_e;tt(Te)===be&&Ye.add(Te.id)}}let Qe=-1;for(let R=0;R<Fe.length;R++){const _e=Fe[R];if(_e.contentBlocks){for(const Te of _e.contentBlocks){if(Te.type==="tool_result"&&Ye.has(Te.tool_use_id)){Qe=R;break}if(Te.type==="tool_use"&&tt(Te)===be&&Qe<0){Qe=R;break}}if(Qe>=0)break}}if(Qe>=0)for(let R=0;R<4;R++){await Je();const _e=l.value;if(!_e)continue;const Te=Array.from(_e.querySelectorAll(".chrono-row"));if(Te[Qe]){Te[Qe].scrollIntoView({block:"center",behavior:"smooth"});return}}return}const Ae=V;if(!Ae)return;const at=ye;if(at?c.value="chrono":c.value="category",c.value==="chrono"){for(let Fe=0;Fe<4;Fe++){await Je();const Ye=l.value;if(!Ye)continue;const Qe=Array.from(Ye.querySelectorAll(".chrono-row"));let R=-1;for(let _e=F.value.length-1;_e>=0;_e--)if(It(F.value[_e])===Ae){R=_e;break}if(R>=0&&Qe[R]){Qe[R].scrollIntoView({block:"center",behavior:"smooth"}),at&&(await Je(),fe(R));return}}return}let Mt=null;for(let Fe=0;Fe<4;Fe++){if(await Je(),Mt=l.value,!Mt)continue;r(Ae),await Je();const Ye=Mt.querySelector(`[data-category="${Ae}"]`);if(Ye){Ye.scrollIntoView({block:"center",behavior:"smooth"});break}}if(!Mt)return;const xn=te;if(xn){const Fe=Array.from(Mt.querySelectorAll(".msg-row")),Ye=xn.trim().toLowerCase(),Qe=Fe.find(R=>(R.getAttribute("data-tool-name")||"").trim().toLowerCase()===Ye);Qe&&Qe.scrollIntoView({block:"center",behavior:"smooth"})}}function Re(){t.focusMessageCategory(D.value||t.messageFocusCategory||"tool_results")}function He(){t.clearMessageFocus()}const De=A(()=>{const V=x.value;if(!V)return new Set;const H=F.value,ye=new Set,te=new Set;for(let be=0;be<H.length;be++){const Ie=H[be];if(Ie.contentBlocks){for(const Ae of Ie.contentBlocks)if(Ae.type==="tool_use"){const at=Ae;tt(at)===V&&(te.add(at.id),ye.add(be))}}}for(let be=0;be<H.length;be++){const Ie=H[be];if(Ie.contentBlocks)for(const Ae of Ie.contentBlocks)Ae.type==="tool_result"&&te.has(Ae.tool_use_id)&&ye.add(be)}return ye});function tt(V){var te;const H=V.input,ye=(te=t.selectedSession)==null?void 0:te.workingDirectory;if(H&&typeof H=="object")for(const be of["file_path","path","filePath"]){const Ie=H[be];if(typeof Ie=="string"&&Ie.length>0){let Ae=Ie.replace(/\/+/g,"/");return Ae.startsWith("./")&&(Ae=Ae.slice(2)),Ae.length>1&&Ae.endsWith("/")&&(Ae=Ae.slice(0,-1)),vc(Ae,ye)}}return null}function ot(V){if(!x.value)return{};const ye=De.value;return{"file-focused":ye.has(V),"file-muted":!ye.has(V)}}const vt=A(()=>{const V=x.value;return V?Wi(V):""});return Ge(()=>t.messageFocusToken,async()=>{await Me()},{immediate:!0}),Ge(()=>t.inspectorTab,async V=>{V==="messages"&&await Me()}),Ge(()=>{var V;return(V=n.value)==null?void 0:V.id},async V=>{V!=null&&await t.loadEntryDetail(V)},{immediate:!0}),Ge(()=>{var V;return(V=j.value)==null?void 0:V.id},async V=>{var H;V!=null&&V!==((H=n.value)==null?void 0:H.id)&&await t.loadEntryDetail(V)},{immediate:!0}),kn(async()=>{t.inspectorTab==="messages"&&t.messageFocusCategory&&await Me()}),Ge(C,()=>{if(!p.value||X.value)return;const V=q();if(V>=0&&V!==f.value){f.value=V;return}f.value>=C.value.length&&(f.value=Math.max(0,C.value.length-1),E(f.value))}),(V,H)=>{const ye=$n("tooltip");return n.value?(m(),y("div",{key:0,class:"messages-tab",onKeydown:a},[Oe(J(Ay),{class:"default-theme","push-other-panes":!1},{default:it(()=>[Oe(J(dl),{"min-size":25,size:p.value?42:100},{default:it(()=>[u("div",{ref_key:"msgListEl",ref:l,class:"msg-list"},[u("div",e0,[u("div",t0,[u("button",{class:le({on:c.value==="chrono"}),onClick:H[0]||(H[0]=te=>c.value="chrono")},"Chronological",2),u("button",{class:le({on:c.value==="category"}),onClick:H[1]||(H[1]=te=>c.value="category")},"By Category",2)]),T.value&&c.value==="chrono"?(m(),y("div",n0,[u("button",{class:le({on:J(t).messagesMode==="main"}),onClick:H[2]||(H[2]=te=>J(t).messagesMode="main")},"Main",2),u("button",{class:le({on:J(t).messagesMode==="all"}),onClick:H[3]||(H[3]=te=>J(t).messagesMode="all")},"All",2)])):oe("",!0)]),c.value==="category"?(m(),y(ve,{key:0},[I.value.length>0?(m(),y("div",s0,[H[4]||(H[4]=u("div",{class:"heavy-title"},"Top heavy messages",-1)),u("div",o0,[(m(!0),y(ve,null,Ce(I.value,te=>(m(),y("button",{key:te.origIdx,class:"heavy-action",onClick:be=>fe(te.origIdx)},[u("span",r0,M((J(nt)[te.category]||{label:te.category}).label),1),u("span",l0,M(te.preview),1),u("span",a0,M(J(ke)(te.tokens)),1)],8,i0))),128))])])):oe("",!0),Q.value||Y.value?(m(),y("div",c0,[Q.value?(m(),y("span",u0,[H[5]||(H[5]=xe(" Filtered tool: ",-1)),u("b",null,M(Q.value),1)])):oe("",!0),Y.value?(m(),y("span",d0,[H[6]||(H[6]=xe(" Showing ",-1)),u("b",null,M((J(nt)[D.value||""]||{label:D.value}).label),1),H[7]||(H[7]=xe(" for ",-1)),u("b",null,M((J(nt)[ie.value||""]||{label:ie.value}).label),1),H[8]||(H[8]=xe(". ",-1))])):oe("",!0),Q.value?(m(),y("button",{key:2,class:"focus-clear",onClick:St(Re,["stop"])},"Show all")):oe("",!0)])):oe("",!0),(m(!0),y(ve,null,Ce(Z.value,(te,be)=>(m(),y("div",{key:te.category,class:"msg-group","data-category":te.category},[u("div",{class:"group-head",onClick:Ie=>J(i)(te.category)},[u("i",{class:le(["group-arrow",J(o)(te.category)||D.value===te.category?"i-carbon-chevron-down":"i-carbon-chevron-right"])},null,2),u("span",{class:"group-dot",style:Pe({background:(J(nt)[te.category]||{color:"#4b5563"}).color})},null,4),u("span",h0,M((J(nt)[te.category]||{label:te.category}).label),1),u("span",v0,[xe(M(te.items.length)+" ",1),H[9]||(H[9]=u("span",{class:"group-sep"},"·",-1)),xe(" "+M(J(ke)(te.tokens))+" ",1),H[10]||(H[10]=u("span",{class:"group-sep"},"·",-1)),xe(" "+M(S.value>0?Math.round(te.tokens/S.value*100):0)+"% ",1)]),u("div",g0,[u("div",{class:"group-bar-fill",style:Pe({width:(S.value>0?Math.round(te.tokens/S.value*100):0)+"%",background:(J(nt)[te.category]||{color:"#4b5563"}).color})},null,4)])],8,p0),u("div",{class:le(["group-items",{open:J(o)(te.category)||D.value===te.category}])},[(m(!0),y(ve,null,Ce(te.items,(Ie,Ae)=>{var at;return m(),y("div",{key:Ie.origIdx,class:le(["msg-row",[Se(Ie.msg),{selected:p.value&&!X.value&&((at=C.value[f.value])==null?void 0:at.origIdx)===Ie.origIdx}]]),"data-tool-name":me(Ie.msg)||"",onClick:Mt=>b(z(be,Ae))},[u("span",y0,M(Ie.msg.role==="user"?"›":Ie.msg.role==="assistant"?"‹":"·"),1),u("span",_0,M(J(Ko)(Ie.msg,_.value)||"(empty)"),1),u("span",{class:le(["msg-tok",{hot:(Ie.msg.tokens||0)>2e3}])},M(J(ke)(Ie.msg.tokens||0)),3)],10,m0)}),128))],2)],8,f0))),128))],64)):c.value==="chrono"?(m(),y(ve,{key:1},[x.value?(m(),y("div",b0,[u("span",null,[H[11]||(H[11]=xe(" Filtered file: ",-1)),Ve((m(),y("b",w0,[xe(M(vt.value),1)])),[[ye,x.value]]),u("span",k0,"("+M(De.value.size)+" messages)",1)]),u("button",{class:"focus-clear",onClick:St(He,["stop"])},"Show all")])):oe("",!0),u("div",$0,[(m(!0),y(ve,null,Ce(de.value,(te,be)=>{var Ie;return m(),y(ve,{key:be},[W.value.has(be)?(m(!0),y(ve,{key:0},Ce(W.value.get(be),Ae=>Ve((m(),y("div",{key:"sub-"+Ae.id,class:"chrono-subagent-row",onClick:at=>$e(Ae.id)},[u("span",T0,M(J(ke)(Ae.contextInfo.totalTokens)),1),H[12]||(H[12]=u("span",{class:"chrono-cat-dot subagent-dot"},null,-1)),H[13]||(H[13]=u("span",{class:"chrono-type subagent-type"},"subagent",-1)),u("span",S0,M(Ae.agentLabel),1),u("span",C0,M(J(ln)(Ae.contextInfo.model)),1)],8,x0)),[[ye,"Click to view subagent context"]])),128)):oe("",!0),ce.value.has(be)?(m(),y("div",{key:1,class:le(["chrono-turn-marker",{future:te.future}])},[u("span",M0,"Turn "+M(ce.value.get(be)),1),H[14]||(H[14]=u("span",{class:"chrono-turn-line"},null,-1))],2)):oe("",!0),te.future&&be===K.value?(m(),y("div",E0,[...H[15]||(H[15]=[u("span",{class:"chrono-future-line"},null,-1),u("span",{class:"chrono-future-label"},"After this turn",-1),u("span",{class:"chrono-future-line"},null,-1)])])):oe("",!0),u("div",{class:le(["chrono-row",[ot(te.origIdx),{selected:!te.future&&p.value&&!X.value&&((Ie=C.value[f.value])==null?void 0:Ie.origIdx)===te.origIdx,future:te.future}]]),style:Pe({"--cat-border":pe(te.msg)}),onClick:Ae=>te.future?ee(te.origIdx):b(te.origIdx)},[Ve((m(),y("span",I0,[xe(M(te.future?"":J(ke)(N.value[be])),1)])),[[ye,te.future?"Click to jump to this turn":`Cumulative: ${J(ke)(N.value[be])} of ${J(ke)(S.value)}`]]),u("span",{class:"chrono-cat-dot",style:Pe({background:pe(te.msg)})},null,4),u("span",A0,M(ue(te.msg)),1),u("span",L0,M(J(Ko)(te.msg,_.value)||"(empty)"),1),u("span",{class:le(["chrono-tok",{hot:!te.future&&(te.msg.tokens||0)>2e3}])},M(J(ke)(te.msg.tokens||0)),3)],14,P0)],64)}),128))])],64)):oe("",!0)],512)]),_:1},8,["size"]),p.value?(m(),mt(J(dl),{key:0,"min-size":25,size:58},{default:it(()=>[Oe(Qy,{entry:ne.value,messages:U.value,"selected-index":se.value,onClose:h,onNavigate:G},null,8,["entry","messages","selected-index"])]),_:1})):oe("",!0)]),_:1})],32)):oe("",!0)}}}),R0=rt(O0,[["__scopeId","data-v-c0d2a74a"]]),D0={key:0,class:"timeline-tab"},N0={class:"timeline-scope-controls"},F0={class:"scope-toggle"},z0=["onClick"],B0={class:"panel panel--hero"},H0={class:"panel-head"},j0={class:"panel-controls"},V0={class:"mode-toggle"},U0={class:"panel-body"},K0={class:"chart-container"},W0={class:"y-axis"},q0=["onClick"],G0=["viewBox"],J0=["points"],Y0=["aria-label"],X0={class:"chart-legend"},Z0=["onClick"],Q0={key:0,class:"projection-badge"},e_={key:1,class:"projection-badge projection-badge--warn"},t_={class:"panel panel--secondary panel--spine panel--cost"},n_={class:"panel-head"},s_={class:"panel-sub"},o_={class:"panel-body"},i_={class:"chart-container"},r_={class:"y-axis"},l_=["onClick"],a_={class:"chart-legend"},c_=et({__name:"TimelineTab",setup(e){const t=$t(),n=A({get:()=>t.timelineMode,set:b=>{t.timelineMode=b}}),s=A({get:()=>t.timelineStackMode,set:b=>{t.timelineStackMode=b}}),o=A({get:()=>t.timelineHiddenLegendKeys,set:b=>{t.timelineHiddenLegendKeys=b}}),i=A({get:()=>t.timelineShowLimitOverlay,set:b=>{t.timelineShowLimitOverlay=b}}),r=A({get:()=>t.timelineShowCacheOverlay,set:b=>{t.timelineShowCacheOverlay=b}}),l=he(null),c=he(null),p=A(()=>t.selectedSession),f=A(()=>t.selectedEntry),v=A(()=>p.value?nn([...p.value.entries].reverse()):[]),g=A(()=>n.value==="main"?v.value.filter(b=>b.isMain):v.value),w=A(()=>{let b=0;for(const h of g.value){const a=h.entry.contextInfo.totalTokens;a>b&&(b=a)}return b}),P=A(()=>{let b=0;for(const h of g.value){const a=h.entry.costUsd??0;a>b&&(b=a)}return b}),$=A(()=>g.value.length<=40),_=A(()=>Jo(K.value)),T=A(()=>Ov(g.value)),F=A(()=>Pv(g.value,v.value)),j=A(()=>g.value.map((b,h)=>{const a=F.value.get(b.entry.id)||[],d=a[0]||null,E=T.value[h]||h+1;return{entryId:b.entry.id,firstEvent:d,title:d?Av(a,E):""}}));function L(b){const h=new Set(o.value);h.has(b)?h.delete(b):h.add(b),o.value=h}const K=A(()=>{if(o.value.size===0)return w.value;let b=0;for(const h of g.value){const a=qo(h.entry,o.value);a>b&&(b=a)}return b});function O(b){const h=qo(b.entry,o.value);return Go(h,K.value)}function de(b){return Cv(b.entry,o.value)}function ae(b){return Go(b.entry.costUsd??0,P.value)}function W(b){t.pinEntry(b.id)}function re(b){t.setInspectorTab("messages"),t.focusMessageCategory(b)}const ge=A(()=>Lv(g.value.length)),B=A(()=>{const b=f.value;if(b&&b.contextLimit>0)return b.contextLimit;const h=g.value;return h.length>0?h[h.length-1].entry.contextLimit:0}),ce=A(()=>{const b=K.value;return i.value?Math.max(b,B.value):b}),Z=A(()=>{const b=ce.value,h=B.value;return b===0||h===0?-1:(1-h/b)*100});function C(b){if(s.value==="normalized")return 100;if(!i.value)return O(b);const h=qo(b.entry,o.value);return Go(h,ce.value)}const X=A(()=>Jo(ce.value)),ne=A(()=>Jo(P.value)),U=[0,25,50,75,100],se=A(()=>{const b=f.value;return b?pc(b,v.value):null}),we=A(()=>{const b=new Map;for(const h of g.value){const a=ln(h.entry.contextInfo.model);b.has(a)||b.set(a,il(h.entry.contextInfo.model,!0))}return Array.from(b.entries()).map(([h,a])=>({name:h,color:a}))}),N=A(()=>Object.entries(_t).map(([b,h])=>({key:b,name:h.label,color:h.color}))),S=A(()=>{const b=g.value;if(b.length===0)return-1;if(n.value!=="all")return b.length-1;for(let h=b.length-1;h>=0;h--)if(b[h].isMain)return h;return-1}),I=A(()=>{const b=g.value,h=S.value;if(h<0)return!1;for(let a=0;a<=h;a++)if(!(n.value==="all"&&!b[a].isMain)&&mi(b[a].entry)!==null)return!0;return!1}),Q=A(()=>{const b=Math.max(0,S.value+1);return b===0?"0 0 1 100":`0 0 ${b} 100`}),ie=A(()=>{const b=g.value.length,h=Math.max(0,S.value+1);return b===0||h===0?"0%":`${h/b*100}%`}),x=A(()=>{const b=g.value,h=S.value;if(b.length===0||h<0)return"";const a=[];for(let d=0;d<=h;d++){if(n.value==="all"&&!b[d].isMain)continue;const E=mi(b[d].entry);if(E===null)continue;const q=d+.5,G=(1-E)*100;a.push(`${q.toFixed(3)},${G.toFixed(2)}`)}return a.join(" ")}),D=A(()=>hc(v.value));function Y(b){b&&(b.scrollLeft=b.scrollWidth)}function k(){Je(()=>{Y(l.value),Y(c.value)})}return kn(()=>{k()}),Ge(()=>{var b,h;return[((b=p.value)==null?void 0:b.id)??"",n.value,g.value.length,((h=g.value[g.value.length-1])==null?void 0:h.entry.id)??""]},()=>{k()},{immediate:!0}),(b,h)=>{const a=$n("tooltip");return p.value?(m(),y("div",D0,[u("div",N0,[h[4]||(h[4]=u("span",{class:"scope-label"},"Scope",-1)),u("div",F0,[(m(),y(ve,null,Ce(["main","all"],d=>u("button",{key:"scope-"+d,class:le({on:n.value===d}),onClick:E=>n.value=d},M(d==="all"?"All turns":"Main turns"),11,z0)),64))])]),u("section",B0,[u("div",H0,[h[9]||(h[9]=u("span",{class:"panel-title"},"Token Timeline",-1)),u("div",j0,[I.value?(m(),y("button",{key:0,class:le(["overlay-toggle",{on:r.value}]),onClick:h[0]||(h[0]=d=>r.value=!r.value)},[...h[5]||(h[5]=[u("span",{class:"legend-dot legend-dot--cache"},null,-1),xe(" Cache ",-1)])],2)):oe("",!0),s.value==="absolute"?(m(),y("button",{key:1,class:le(["overlay-toggle",{on:i.value}]),onClick:h[1]||(h[1]=d=>i.value=!i.value)},[...h[6]||(h[6]=[u("span",{class:"legend-dot legend-dot--dashed"},null,-1),xe(" Limit ",-1)])],2)):oe("",!0),u("div",V0,[Ve((m(),y("button",{class:le({on:s.value==="absolute"}),onClick:h[2]||(h[2]=d=>s.value="absolute")},[...h[7]||(h[7]=[u("i",{class:"i-carbon-chart-column mode-icon"},null,-1),xe(" Abs ",-1)])],2)),[[a,"Absolute token counts"]]),Ve((m(),y("button",{class:le({on:s.value==="normalized"}),onClick:h[3]||(h[3]=d=>s.value="normalized")},[...h[8]||(h[8]=[u("i",{class:"i-carbon-chart-maximum mode-icon"},null,-1),xe(" Pct ",-1)])],2)),[[a,"Normalized to 100% per turn"]])])])]),u("div",U0,[u("div",K0,[u("div",W0,[s.value==="normalized"?(m(!0),y(ve,{key:0},Ce([...U].reverse(),d=>(m(),y("span",{key:"norm-"+d},M(d)+"%",1))),128)):(m(!0),y(ve,{key:1},Ce([...i.value?X.value:_.value].reverse(),d=>(m(),y("span",{key:d},M(J(rl)(d,"tokens")),1))),128))]),u("div",{ref_key:"tokenChartScrollEl",ref:l,class:"chart-scroll"},[u("div",{class:le(["bars-wrap",{sparse:$.value}])},[u("div",{class:le(["bars",{sparse:$.value}])},[(m(!0),y(ve,null,Ce(g.value,(d,E)=>{var q;return m(),y("div",{key:d.entry.id,class:le(["bar",{active:((q=f.value)==null?void 0:q.id)===d.entry.id,normalized:s.value==="normalized"}]),style:Pe({height:C(d)+"%"}),onClick:G=>W(d.entry)},[(m(!0),y(ve,null,Ce(de(d),G=>Ve((m(),y("div",{key:d.entry.id+"-"+G.key,class:"bar-segment",style:Pe({height:G.pct+"%",background:G.color})},null,4)),[[a,J(Dv)(d.entry,G)]])),128))],14,q0)}),128))],2),s.value==="absolute"&&i.value&&Z.value>=0?(m(),y("div",{key:0,class:"limit-line",style:Pe({top:Z.value+"%"})},null,4)):oe("",!0),r.value&&x.value?(m(),y("svg",{key:1,class:"cache-line-svg",viewBox:Q.value,style:Pe({width:ie.value}),preserveAspectRatio:"none"},[u("polyline",{points:x.value,fill:"none",stroke:"var(--accent-cyan)","stroke-width":"1.5","vector-effect":"non-scaling-stroke","stroke-linejoin":"round","stroke-linecap":"round",opacity:"0.7"},null,8,J0)],12,G0)):oe("",!0)],2),u("div",{class:le(["events",{sparse:$.value}])},[(m(!0),y(ve,null,Ce(j.value,d=>(m(),y("div",{key:"evt-"+d.entryId,class:"event-slot"},[d.firstEvent?Ve((m(),y("button",{key:0,class:le(["event-marker",`event-marker--${d.firstEvent.type}`]),type:"button","aria-label":d.title},[xe(M(J(Iv)(d.firstEvent.type)),1)],10,Y0)),[[a,d.title]]):oe("",!0)]))),128))],2),u("div",{class:le(["labels",{sparse:$.value}])},[(m(!0),y(ve,null,Ce(T.value,(d,E)=>(m(),y("div",{key:E,class:"label"},M(d&&(ge.value<=1||d%ge.value===0)?d:""),1))),128))],2)],512)]),u("div",X0,[(m(!0),y(ve,null,Ce(N.value,d=>(m(),y("button",{key:d.key,class:le(["legend-item legend-item--interactive",{"legend-item--hidden":o.value.has(d.key)}]),onClick:E=>L(d.key)},[u("span",{class:"legend-dot",style:Pe({background:o.value.has(d.key)?"var(--text-ghost)":d.color})},null,4),xe(" "+M(d.name),1)],10,Z0))),128)),D.value.turnsRemaining!==null&&D.value.turnsRemaining>0?Ve((m(),y("span",Q0,[xe(" ~"+M(D.value.turnsRemaining)+" turns remaining ",1)])),[[a,`Growing ~${J(ke)(Math.round(D.value.growthPerTurn))}/turn over ${D.value.sinceCompaction} turns since last compaction`]]):D.value.turnsRemaining===0?Ve((m(),y("span",e_,[...h[10]||(h[10]=[xe(" At limit ",-1)])])),[[a,"Context window is at or near the limit"]]):oe("",!0)])])]),u("section",t_,[u("div",n_,[h[11]||(h[11]=u("span",{class:"panel-title"},"Cost Timeline",-1)),u("span",s_,"Scope: "+M(n.value==="main"?"Main turns only":"All turns"),1)]),u("div",o_,[u("div",i_,[u("div",r_,[(m(!0),y(ve,null,Ce([...ne.value].reverse(),d=>(m(),y("span",{key:"cost-"+d},M(J(rl)(d,"cost")),1))),128))]),u("div",{ref_key:"costChartScrollEl",ref:c,class:"chart-scroll"},[u("div",{class:le(["bars-wrap",{sparse:$.value}])},[u("div",{class:le(["bars",{sparse:$.value}])},[(m(!0),y(ve,null,Ce(g.value,d=>{var E;return Ve((m(),y("div",{key:"cost-"+d.entry.id,class:le(["bar",{active:((E=f.value)==null?void 0:E.id)===d.entry.id}]),style:Pe({height:ae(d)+"%"}),onClick:q=>W(d.entry)},[u("div",{class:"bar-cost",style:Pe({background:J(il)(d.entry.contextInfo.model,d.isMain)})},null,4)],14,l_)),[[a,J(Rv)(d.entry,d.isMain)]])}),128))],2)],2),u("div",{class:le(["labels",{sparse:$.value}])},[(m(!0),y(ve,null,Ce(T.value,(d,E)=>(m(),y("div",{key:"cost-label-"+E,class:"label"},M(d&&(ge.value<=1||d%ge.value===0)?d:""),1))),128))],2)],512)]),u("div",a_,[(m(!0),y(ve,null,Ce(we.value,d=>(m(),y("span",{key:d.name,class:"legend-item"},[u("span",{class:"legend-dot",style:Pe({background:d.color})},null,4),xe(" "+M(d.name),1)]))),128))])])]),Oe(mc,{"diff-data":se.value,"show-when-empty":!!f.value,onCategoryClick:re},null,8,["diff-data","show-when-empty"])])):oe("",!0)}}}),u_=rt(c_,[["__scopeId","data-v-8510f6fe"]]),d_=["aria-label","aria-valuemax","aria-valuenow"],f_={class:"scrubber-controls"},p_=["disabled"],h_={class:"readout-num"},v_={class:"readout-total"},g_=["disabled"],m_={class:"spark-bars"},y_={class:"tt-row tt-turn"},__={class:"tt-row"},b_={class:"tt-row tt-dim"},w_=et({__name:"TurnScrubber",setup(e){const t=$t(),n=he(null),s=he(!1),o=he(null),i=A(()=>t.selectedSession),r=A(()=>t.selectedEntry),l=A(()=>i.value?nn([...i.value.entries].reverse()):[]),c=A(()=>l.value.filter(U=>U.isMain)),p=A(()=>c.value.map(U=>U.entry)),f=A(()=>c.value.map(U=>!U.isMain)),v=A(()=>p.value.length),g=A(()=>{const U=r.value;if(!U)return-1;let se=-1;for(const we of l.value)if(we.isMain&&se++,we.entry.id===U.id)return se;return-1}),w=A(()=>{let U=0;for(const se of p.value)se.contextInfo.totalTokens>U&&(U=se.contextInfo.totalTokens);return U}),P=A(()=>{const U=w.value;return U===0?p.value.map(()=>({height:.15,tokens:0,cost:0,model:"",utilization:0})):p.value.map(se=>({height:Math.max(.08,se.contextInfo.totalTokens/U),tokens:se.contextInfo.totalTokens,cost:se.costUsd??0,model:ln(se.contextInfo.model),utilization:se.contextLimit>0?se.contextInfo.totalTokens/se.contextLimit:0}))}),$=A(()=>t.selectionMode!=="pinned"||g.value<0?!1:g.value<v.value-1),_=A(()=>$.value?Math.max(0,v.value-1-g.value):0),T=A(()=>$.value?_.value/v.value>=.12:!1),F=A(()=>((g.value+1)/v.value+1)/2*100),j=A(()=>{const U=[];let se=0,we=-1;for(const N of l.value)N.isMain?(we>=0&&U.push(se),se=0,we++):se++;return we>=0&&U.push(se),U}),L=A(()=>{if(o.value===null||o.value<0||o.value>=p.value.length)return null;const U=p.value[o.value],se=P.value[o.value],we=j.value[o.value]||0;return{turn:o.value+1,tokens:ke(U.contextInfo.totalTokens),cost:kt(U.costUsd),model:se.model,subs:we,isSub:f.value[o.value]||!1}});function K(U){ge(U)&&t.pinEntry(p.value[U].id)}function O(){t.followLive()}function de(){const U=g.value-1;ge(U)&&K(U)}function ae(){const U=g.value+1;ge(U)&&K(U)}function W(){r.value&&t.pinEntry(r.value.id)}function re(U){const se=n.value;if(!se||v.value===0)return-1;const we=se.getBoundingClientRect(),S=Math.max(0,Math.min(U.clientX-we.left,we.width))/we.width;return Math.min(Math.floor(S*v.value),v.value-1)}function ge(U){return U>=0&&U<v.value}function B(U){var we,N;if(v.value===0)return;s.value=!0;const se=re(U);ge(se)&&K(se),(N=(we=U.target)==null?void 0:we.setPointerCapture)==null||N.call(we,U.pointerId)}function ce(U){const se=re(U);o.value=ge(se)?se:null,s.value&&ge(se)&&K(se)}function Z(U){var se,we;s.value=!1,(we=(se=U.target)==null?void 0:se.releasePointerCapture)==null||we.call(se,U.pointerId)}function C(){o.value=null}function X(U){U.key==="ArrowLeft"||U.key==="ArrowUp"?(U.preventDefault(),de()):U.key==="ArrowRight"||U.key==="ArrowDown"?(U.preventDefault(),ae()):U.key==="Home"?(U.preventDefault(),K(0)):U.key==="End"?(U.preventDefault(),v.value>0&&K(v.value-1)):U.key==="Escape"&&(U.preventDefault(),O())}function ne(U){return U>=.9?"var(--accent-red)":U>=.7?"var(--accent-amber)":"var(--accent-blue)"}return(U,se)=>i.value&&r.value&&v.value>=1?(m(),y("div",{key:0,class:"scrubber",role:"slider","aria-label":`Turn scrubber: turn ${g.value+1} of ${v.value}`,"aria-valuemin":1,"aria-valuemax":v.value,"aria-valuenow":g.value+1,tabindex:"0",onKeydown:X},[u("div",f_,[u("button",{class:"ctrl-btn",disabled:g.value<=0,onClick:de,title:"Previous turn (←)","aria-label":"Previous turn"},[...se[0]||(se[0]=[u("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none"},[u("path",{d:"M7 1L3 5L7 9",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,p_),u("span",{class:le(["turn-readout",J(t).selectionMode==="live"?"is-live":"is-pinned"])},[se[1]||(se[1]=u("span",{class:"readout-dot"},null,-1)),u("span",h_,M(g.value+1),1),se[2]||(se[2]=u("span",{class:"readout-sep"},"/",-1)),u("span",v_,M(v.value),1)],2),u("button",{class:"ctrl-btn",disabled:g.value<0||g.value>=v.value-1,onClick:ae,title:"Next turn (→)","aria-label":"Next turn"},[...se[3]||(se[3]=[u("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none"},[u("path",{d:"M3 1L7 5L3 9",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,g_)]),u("div",{ref_key:"trackEl",ref:n,class:"scrubber-track",onPointerdown:B,onPointermove:ce,onPointerup:Z,onPointerleave:C},[u("div",m_,[(m(!0),y(ve,null,Ce(P.value,(we,N)=>(m(),y("div",{key:N,class:le(["spark-col",{active:N===g.value,hover:N===o.value&&N!==g.value,past:J(t).selectionMode==="pinned"&&N>g.value,"is-sub":f.value[N]}])},[u("div",{class:"spark-bar",style:Pe({height:we.height*100+"%","--bar-color":ne(we.utilization)})},null,4),j.value[N]>0?(m(),y("div",{key:0,class:le(["sub-dot",{"sub-burst":j.value[N]>=3}])},null,2)):oe("",!0)],2))),128))]),g.value>=0?(m(),y("div",{key:0,class:le(["playhead",{live:J(t).selectionMode==="live"}]),style:Pe({left:(g.value+.5)/v.value*100+"%"})},[...se[4]||(se[4]=[u("div",{class:"playhead-line"},null,-1),u("div",{class:"playhead-head"},null,-1)])],6)):oe("",!0),T.value?(m(),y("div",{key:1,class:"new-turns-badge",style:Pe({left:F.value+"%"}),onClick:St(O,["stop"])}," +"+M(_.value)+" new ",5)):oe("",!0),Oe(Qt,{name:"tooltip-fade"},{default:it(()=>[L.value&&o.value!==g.value?(m(),y("div",{key:0,class:"scrub-tooltip",style:Pe({left:Math.min(Math.max((o.value+.5)/v.value*100,8),92)+"%"})},[u("div",y_,"T"+M(L.value.turn)+M(L.value.isSub?" (sub)":""),1),u("div",__,M(L.value.tokens)+" · "+M(L.value.cost),1),u("div",b_,M(L.value.model)+M(L.value.subs>0?` · ${L.value.subs} sub`:""),1)],4)):oe("",!0)]),_:1})],544),J(t).selectionMode==="live"?(m(),y("button",{key:0,class:"action-btn action-pin",onClick:W,title:"Pin current turn to scrub history"},[...se[5]||(se[5]=[u("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none"},[u("circle",{cx:"5",cy:"5",r:"3.5",stroke:"currentColor","stroke-width":"1"}),u("circle",{cx:"5",cy:"5",r:"1.5",fill:"currentColor"})],-1),xe(" Pin ",-1)])])):(m(),y("button",{key:1,class:"action-btn action-return",onClick:O,title:"Return to live (Esc)"},[...se[6]||(se[6]=[u("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none"},[u("path",{d:"M2 5H8M8 5L5.5 2.5M8 5L5.5 7.5",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"})],-1),xe(" Live ",-1)])]))],40,d_)):oe("",!0)}}),k_=rt(w_,[["__scopeId","data-v-865993b3"]]),$_={class:"tab-bar"},x_=["onClick"],T_={class:"tab-content"},S_=et({__name:"InspectorPanel",setup(e){const t=$t(),n=[{id:"overview",label:"Overview",icon:"i-carbon-dashboard"},{id:"messages",label:"Messages",icon:"i-carbon-chat"},{id:"timeline",label:"Timeline",icon:"i-carbon-activity"}],s={overview:Iy,messages:R0,timeline:u_},o=A(()=>s[t.inspectorTab]);function i(l){l==="messages"&&t.clearMessageFocus(),t.setInspectorTab(l)}function r(l){l.key==="Escape"&&!l.defaultPrevented&&t.setView("dashboard")}return(l,c)=>(m(),y("div",{class:"inspector",onKeydown:r,tabindex:"-1"},[Oe(k_),u("div",$_,[(m(),y(ve,null,Ce(n,p=>u("button",{key:p.id,class:le(["tab-btn",{active:J(t).inspectorTab===p.id}]),onClick:f=>i(p.id)},[u("i",{class:le(p.icon)},null,2),xe(" "+M(p.label),1)],10,x_)),64))]),u("div",T_,[(m(),mt(ia(o.value),{key:J(t).inspectorTab}))])],32))}}),C_=rt(S_,[["__scopeId","data-v-74dad8d1"]]),M_={class:"session-rail","aria-label":"Sessions"},E_={class:"rail-scroll"},P_=["onClick"],I_={class:"tile-meta"},A_={key:0,class:"tile-tags"},L_=["title"],O_={key:0,class:"tile-tag-more"},R_=et({__name:"SessionRail",setup(e){const t=$t();function n(c){t.selectSession(c),t.setView("inspector")}function s(){t.setView("dashboard")}function o(c){var $;const p=ln(c.latestModel),f=c.entryCount+(c.entryCount===1?" turn":" turns"),v=kt(c.totalCost),g=c.healthScore?`
32
- Health ${c.healthScore.overall}/100 (${c.healthScore.rating})`:"",w=c.workingDirectory?`
33
- ${c.workingDirectory}`:"",P=($=c.tags)!=null&&$.length?`
34
- Tags: ${c.tags.join(", ")}`:"";return`${c.source} · ${p}
35
- ${f} · ${v}${g}${w}${P}`}function i(c){return c.contextLimit?Math.min(100,Math.round(c.latestTotalTokens/c.contextLimit*100)):0}function r(c){const p=i(c);return p>=80?"high":p>=60?"mid":"low"}const l={delay:{show:50,hide:0},placement:"right"};return(c,p)=>{const f=$n("tooltip");return m(),y("nav",M_,[Ve((m(),y("button",{class:"rail-back",onClick:s},[...p[0]||(p[0]=[u("i",{class:"i-carbon-grid grid-icon"},null,-1)])])),[[f,{content:"Dashboard",...l}]]),p[1]||(p[1]=u("span",{class:"rail-label"},"SESSIONS",-1)),u("div",E_,[(m(!0),y(ve,null,Ce(J(t).filteredSummaries,v=>{var g;return Ve((m(),y("button",{key:v.id,class:le(["rail-tile",{active:v.id===J(t).selectedSessionId,pulse:J(t).recentlyUpdated.has(v.id)}]),onClick:w=>n(v.id)},[u("span",{class:le(["tile-source",J(Es)(v.source)])},M(v.source||"?"),3),u("span",I_,M(v.entryCount)+"t",1),u("span",{class:le(["tile-util",r(v)])},M(i(v))+"%",3),(g=v.tags)!=null&&g.length?(m(),y("span",A_,[(m(!0),y(ve,null,Ce(v.tags.slice(0,3),(w,P)=>(m(),y("span",{key:w,class:le(["tile-tag-dot",J(t).getTagColorClass(P)]),title:w},null,10,L_))),128)),v.tags.length>3?(m(),y("span",O_,"+")):oe("",!0)])):oe("",!0)],10,P_)),[[f,{content:o(v),...l}]])}),128))])])}}}),D_=rt(R_,[["__scopeId","data-v-6292a7ce"]]),N_={class:"compare-view"},F_={class:"compare-header"},z_={class:"compare-title"},B_={class:"compare-count"},H_={class:"legend"},j_={class:"lanes"},V_=["onMouseenter"],U_={class:"lane-header"},K_={class:"lane-identity"},W_={class:"lane-index"},q_={class:"lane-model"},G_={key:0,class:"lane-dir"},J_={class:"lane-metrics"},Y_={class:"lm-cell"},X_={class:"lm-value"},Z_={key:0,class:"lm-winner"},Q_={class:"lm-cell"},e1={class:"lm-value green"},t1={key:0,class:"lm-winner"},n1={class:"lm-cell"},s1={key:0,class:"lm-winner"},o1={class:"lm-cell"},i1={key:1,class:"lm-value ghost"},r1={key:0,class:"lm-cell"},l1={class:"lm-value dim"},a1={key:1,class:"lm-cell"},c1={class:"lm-value dim"},u1={key:0,class:"lm-winner"},d1={class:"lm-cell"},f1={class:"lm-value dim"},p1=["href","onClick"],h1={class:"lane-body"},v1={class:"turn-track"},g1=["title","href","onMouseenter","onClick"],m1={class:"turn-num"},y1={key:0,class:"turns-empty"},_1={key:0,class:"sparkline-col"},b1={class:"sparkline-cell"},w1={class:"sparkline",viewBox:"0 0 100 100",preserveAspectRatio:"none"},k1=["y1","y2"],$1=["d"],x1=["d"],T1={class:"sparkline-val"},S1={class:"sparkline-cell"},C1={class:"sparkline sparkline--cost",viewBox:"0 0 100 100",preserveAspectRatio:"none"},M1=["d"],E1=["d"],P1={class:"sparkline-val"},I1={key:0,class:"comp-row"},A1={class:"comp-tape"},L1=["title"],O1={key:0,class:"comp-seg-label"},R1={class:"comp-total"},vl="#ef4444",gl="#9ca3af",D1=et({__name:"CompareView",setup(e){const t=$t(),n=he(null),s=he(null),o=he(null),i=A(()=>{const N=Object.entries(_t).map(([S,I])=>({key:S,label:I.label,color:I.color}));return N.push({key:"error",label:"Error",color:vl}),N.push({key:"stall",label:"Stall",color:gl}),N});function r(N){const S={};for(const[I,Q]of Object.entries(qn)){S[I]=0;for(const ie of Q){const x=N.find(D=>D.category===ie);x&&(S[I]+=x.tokens)}}return S}function l(N){const S=r(N);let I="other",Q=0;for(const[ie,x]of Object.entries(S))x>Q&&(I=ie,Q=x);return I}function c(N){const S=r(N),I=Object.values(S).reduce((Q,ie)=>Q+ie,0);return I===0?[]:Object.entries(S).filter(([,Q])=>Q>0).sort((Q,ie)=>ie[1]-Q[1]).map(([Q,ie])=>{var x;return{key:Q,color:((x=_t[Q])==null?void 0:x.color)??"#475569",pct:ie/I*100}})}function p(N){const S=new Map;for(const ie of N){const x=ie.agentKey||"_default";S.set(x,(S.get(x)||0)+1)}let I="_default",Q=0;for(const[ie,x]of S)x>Q&&(I=ie,Q=x);return I}function f(N){const S=p(N.entries);return N.entries.filter(Q=>(Q.agentKey||"_default")===S).sort((Q,ie)=>new Date(Q.timestamp).getTime()-new Date(ie.timestamp).getTime()).map((Q,ie)=>{var b;const x=(Q.httpStatus??200)>=400,D=Q.stopReason==="max_tokens",Y=l(Q.composition);let k;return x?k=vl:D?k=gl:k=((b=_t[Y])==null?void 0:b.color)??_t.other.color,{turnNumber:ie+1,entry:Q,dominantGroup:Y,color:k,isError:x,isStall:D,tokens:Q.contextInfo.totalTokens,costUsd:Q.costUsd??0,segments:c(Q.composition)}})}function v(N){if(!N)return"";let S=N;/^\/home\/[^/]+(\/|$)/.test(S)?S=S.replace(/^\/home\/[^/]+/,"~"):/^\/Users\/[^/]+(\/|$)/.test(S)&&(S=S.replace(/^\/Users\/[^/]+/,"~"));const I=S.split("/");return I.length>2?I.slice(-2).join("/"):S}function g(N){for(let S=N.length-1;S>=0;S--){const I=mi(N[S].entry);if(I!==null)return I}return null}const w=A(()=>{const N=[];for(const S of t.compareSessionIds){const I=t.loadedConversations.get(S),Q=t.summaries.find(ee=>ee.id===S);if(!I&&!Q)continue;const ie=I?f(I):[],x=I?I.entries.reduce((ee,$e)=>ee+($e.costUsd??0),0):(Q==null?void 0:Q.totalCost)??0,D=I?I.entries.reduce((ee,$e)=>{var me;return ee+(((me=$e.timings)==null?void 0:me.total_ms)??0)},0):0,Y=ie.length>0?ie[ie.length-1].entry:null,k=ie.map(ee=>ee.tokens),b=ie.map(ee=>ee.costUsd),h=I?(Y==null?void 0:Y.healthScore)??(Q==null?void 0:Q.healthScore):Q==null?void 0:Q.healthScore,a=(Y==null?void 0:Y.contextInfo.totalTokens)??(Q==null?void 0:Q.latestTotalTokens)??0,d=(Y==null?void 0:Y.contextLimit)??(Q==null?void 0:Q.contextLimit)??2e5,E=(Q==null?void 0:Q.latestModel)??(Y==null?void 0:Y.contextInfo.model)??"",q=(Q==null?void 0:Q.source)??(I==null?void 0:I.source)??"",G=(Q==null?void 0:Q.workingDirectory)??(I==null?void 0:I.workingDirectory)??null,z=I?I.entries.reduce((ee,$e)=>{var me;return ee+(((me=$e.usage)==null?void 0:me.outputTokens)??0)},0):0,fe=Y?c(Y.composition):[],pe=g(ie),ue=z>0&&x>0?x/z*1e3:null;N.push({id:S,source:q,model:E,directory:v(G),turnCount:ie.length,totalCost:x,totalDurationMs:D,finalTokens:a,contextLimit:d,healthRating:(h==null?void 0:h.rating)??"unknown",healthScore:(h==null?void 0:h.overall)??0,turns:ie,tokenHistory:k,costHistory:b,utilization:d>0?a/d:0,outputTokens:z,cacheRate:pe,costPerOutputK:ue,finalComposition:fe})}return N}),P=A(()=>{let N=0;for(const S of w.value)for(const I of S.turns)I.tokens>N&&(N=I.tokens);return N||1}),$=A(()=>{let N=0;for(const S of w.value)for(const I of S.turns)I.costUsd>N&&(N=I.costUsd);return N||.01}),_=A(()=>{let N=0;for(const S of w.value){N=Math.max(N,S.contextLimit);for(const I of S.tokenHistory)I>N&&(N=I)}return N||1});function T(N){const ie=8+N/P.value*24;return Math.round(ie)+"px"}function F(N){return N<=0?0:.15+N/$.value*.85}function j(N,S){if(N.length===0)return"";const I=100,Q=100,ie=N.length>1?I/(N.length-1):0;return N.map((x,D)=>{const Y=N.length===1?I/2:D*ie,k=Q-x/S*Q;return`${D===0?"M":"L"}${Y.toFixed(1)},${k.toFixed(1)}`}).join(" ")}function L(N,S){if(N.length===0)return"";const I=100,Q=100,ie=N.length>1?I/(N.length-1):0,x=N.map((k,b)=>{const h=N.length===1?I/2:b*ie,a=Q-k/S*Q;return`${b===0?"M":"L"}${h.toFixed(1)},${a.toFixed(1)}`}).join(" "),D=N.length===1?I/2:(N.length-1)*ie,Y=N.length===1?I/2:0;return`${x} L${D.toFixed(1)},${Q} L${Y.toFixed(1)},${Q} Z`}function K(N){const S=_.value;return 100-N/S*100}const O=A(()=>{let N=0;for(const S of w.value)for(const I of S.costHistory)I>N&&(N=I);return N||.01});function de(N,S){return n.value===null||S===n.value?1:N===s.value?.3:.4}function ae(N){var I;const S=[`Turn ${N.turnNumber}`,`Model: ${ln(N.entry.contextInfo.model)}`,`Context: ${ke(N.entry.contextInfo.totalTokens)}`,`Cost: ${kt(N.entry.costUsd)}`,`Dominant: ${((I=_t[N.dominantGroup])==null?void 0:I.label)??N.dominantGroup}`];return N.entry.timings&&S.push(`Duration: ${hi(N.entry.timings.total_ms)}`),N.entry.stopReason&&S.push(`Stop: ${N.entry.stopReason}`),N.isError&&S.push(`HTTP ${N.entry.httpStatus}`),S.join(`
36
- `)}function W(N,S){return`#session/${encodeURIComponent(N)}?tab=overview&turn=${S}`}function re(N){return`#session/${encodeURIComponent(N)}?tab=overview`}function ge(N,S){n.value=S,s.value=N}function B(){n.value=null,s.value=null}function ce(N,S,I){N.ctrlKey||N.metaKey||N.button===1||(N.preventDefault(),t.exitCompare("inspector"),t.selectSession(S),t.pinEntry(I.entry.id))}function Z(N,S){N.ctrlKey||N.metaKey||N.button===1||(N.preventDefault(),t.exitCompare("inspector"),t.setInspectorTab("overview"),t.selectSession(S))}function C(){t.exitCompare("dashboard")}function X(N){return N>=.8?"util-high":N>=.6?"util-mid":"util-low"}function ne(N){o.value=N}function U(){o.value=null}function se(N){return N>=.01?"$"+N.toFixed(2)+"/K":"$"+N.toFixed(3)+"/K"}const we=A(()=>{const N=w.value;if(N.length<2)return null;const S=N.map(h=>h.totalCost),I=N.map(h=>h.finalTokens),Q=N.map(h=>h.turnCount),ie=N.map(h=>h.costPerOutputK),x=Math.min(...S),D=Math.min(...I),Y=Math.min(...Q),k=ie.filter(h=>h!==null),b=k.length>0?Math.min(...k):null;return N.map(h=>({isCheapest:h.totalCost<=x,isLeanest:h.finalTokens<=D,isFewest:h.turnCount<=Y,isMostEfficient:b!==null&&h.costPerOutputK!==null&&h.costPerOutputK<=b}))});return(N,S)=>(m(),y("div",N_,[u("header",F_,[u("button",{class:"back-btn",onClick:C},[...S[0]||(S[0]=[u("i",{class:"i-carbon-arrow-left"},null,-1),xe(" Dashboard ",-1)])]),u("h1",z_,[S[1]||(S[1]=xe(" Compare ",-1)),u("span",B_,M(w.value.length)+" sessions",1)]),u("div",H_,[(m(!0),y(ve,null,Ce(i.value,I=>(m(),y("span",{key:I.key,class:"legend-chip"},[u("span",{class:"legend-swatch",style:Pe({background:I.color})},null,4),xe(" "+M(I.label),1)]))),128))])]),u("div",j_,[(m(!0),y(ve,null,Ce(w.value,(I,Q)=>(m(),y("div",{key:I.id,class:le(["lane",{"lane--focused":o.value===I.id,"lane--dimmed":o.value!==null&&o.value!==I.id}]),onMouseenter:ie=>ne(I.id),onMouseleave:U},[u("div",U_,[u("div",K_,[u("div",W_,M(Q+1),1),u("span",{class:le(["source-badge",J(Es)(I.source)])},M(I.source||"?"),3),u("span",q_,M(J(ln)(I.model)),1),I.directory?(m(),y("span",G_,M(I.directory),1)):oe("",!0)]),u("div",J_,[u("div",Y_,[u("span",X_,M(I.turnCount),1),S[2]||(S[2]=u("span",{class:"lm-key"},"turns",-1)),we.value&&we.value[Q].isFewest?(m(),y("span",Z_)):oe("",!0)]),u("div",Q_,[u("span",e1,M(J(kt)(I.totalCost)),1),S[3]||(S[3]=u("span",{class:"lm-key"},"cost",-1)),we.value&&we.value[Q].isCheapest?(m(),y("span",t1)):oe("",!0)]),u("div",n1,[u("span",{class:le(["lm-value",X(I.utilization)])},M(Math.round(I.utilization*100))+"% ",3),S[4]||(S[4]=u("span",{class:"lm-key"},"context",-1)),we.value&&we.value[Q].isLeanest?(m(),y("span",s1)):oe("",!0)]),u("div",o1,[I.healthRating!=="unknown"?(m(),y("span",{key:0,class:"lm-value lm-health",style:Pe({color:J(gi)(I.healthRating)})},M(I.healthScore),5)):(m(),y("span",i1,"--")),S[5]||(S[5]=u("span",{class:"lm-key"},"health",-1))]),I.cacheRate!==null?(m(),y("div",r1,[u("span",l1,M(J(vi)(I.cacheRate)),1),S[6]||(S[6]=u("span",{class:"lm-key"},"cache",-1))])):oe("",!0),I.costPerOutputK!==null?(m(),y("div",a1,[u("span",c1,M(se(I.costPerOutputK)),1),S[7]||(S[7]=u("span",{class:"lm-key"},"$/out",-1)),we.value&&we.value[Q].isMostEfficient?(m(),y("span",u1)):oe("",!0)])):oe("",!0),u("div",d1,[u("span",f1,M(I.totalDurationMs>0?J(hi)(I.totalDurationMs):"--"),1),S[8]||(S[8]=u("span",{class:"lm-key"},"duration",-1))])]),u("a",{class:"inspect-btn",title:"Open in inspector",href:re(I.id),onClick:ie=>Z(ie,I.id)},[...S[9]||(S[9]=[u("i",{class:"i-carbon-arrow-right"},null,-1)])],8,p1)]),u("div",h1,[u("div",v1,[(m(!0),y(ve,null,Ce(I.turns,ie=>(m(),y("a",{key:ie.turnNumber,class:le(["turn-col",{"turn-col--error":ie.isError,"turn-col--stall":ie.isStall,"turn-col--crosslit":n.value===ie.turnNumber&&s.value!==I.id}]),style:Pe({opacity:de(I.id,ie.turnNumber)}),title:ae(ie),href:W(I.id,ie.turnNumber),onMouseenter:x=>ge(I.id,ie.turnNumber),onMouseleave:B,onClick:x=>ce(x,I.id,ie)},[u("div",{class:"turn-bar",style:Pe({height:T(ie.tokens)})},[(m(!0),y(ve,null,Ce(ie.segments,x=>(m(),y("div",{key:x.key,class:"turn-seg",style:Pe({flex:x.pct,background:x.color})},null,4))),128))],4),u("div",{class:"cost-dot",style:Pe({opacity:F(ie.costUsd)})},null,4),u("span",m1,M(ie.turnNumber),1)],46,g1))),128)),I.turns.length===0?(m(),y("div",y1," Loading... ")):oe("",!0)]),I.tokenHistory.length>1?(m(),y("div",_1,[u("div",b1,[(m(),y("svg",w1,[u("line",{x1:"0",y1:K(I.contextLimit),x2:"100",y2:K(I.contextLimit),class:"sparkline-limit"},null,8,k1),u("path",{d:L(I.tokenHistory,_.value),class:"sparkline-area"},null,8,$1),u("path",{d:j(I.tokenHistory,_.value),class:"sparkline-line"},null,8,x1)])),u("span",T1,[xe(M(J(ke)(I.finalTokens)),1),S[10]||(S[10]=u("span",{class:"sparkline-sep"},"/",-1)),xe(M(J(ke)(I.contextLimit)),1)])]),u("div",S1,[(m(),y("svg",C1,[u("path",{d:L(I.costHistory,O.value),class:"sparkline-area sparkline-area--cost"},null,8,M1),u("path",{d:j(I.costHistory,O.value),class:"sparkline-line sparkline-line--cost"},null,8,E1)])),u("span",P1,M(J(kt)(I.totalCost))+" total",1)])])):oe("",!0)]),I.finalComposition.length>0?(m(),y("div",I1,[u("div",A1,[(m(!0),y(ve,null,Ce(I.finalComposition,ie=>{var x,D;return m(),y("div",{key:ie.key,class:"comp-seg",style:Pe({flex:ie.pct,background:ie.color}),title:`${((x=J(_t)[ie.key])==null?void 0:x.label)??ie.key}: ${Math.round(ie.pct)}%`},[ie.pct>=18?(m(),y("span",O1,M(((D=J(_t)[ie.key])==null?void 0:D.label)??ie.key),1)):oe("",!0)],12,L1)}),128))]),u("span",R1,M(J(ke)(I.finalTokens)),1)])):oe("",!0)],42,V_))),128))])]))}}),N1=rt(D1,[["__scopeId","data-v-81e6d807"]]),F1={},z1={class:"empty"};function B1(e,t){return m(),y("div",z1,[...t[0]||(t[0]=[Ca('<svg class="empty-icon" width="48" height="48" viewBox="0 0 48 48" aria-hidden="true" data-v-213dcf0e><circle cx="24" cy="24" r="20" fill="none" stroke="var(--border-mid)" stroke-width="1" data-v-213dcf0e></circle><circle cx="24" cy="24" r="10" fill="none" stroke="var(--border-bright)" stroke-width="0.8" data-v-213dcf0e></circle><circle cx="24" cy="24" r="3" fill="var(--accent-blue)" opacity="0.4" data-v-213dcf0e></circle></svg><div class="empty-title" data-v-213dcf0e>No requests captured yet</div><div class="empty-sub" data-v-213dcf0e> Start a tool through the CLI to capture traffic: </div><div class="empty-examples" data-v-213dcf0e><code data-v-213dcf0e>context-lens claude</code><code data-v-213dcf0e>context-lens codex</code><code data-v-213dcf0e>context-lens gemini</code></div>',4)])])}const H1=rt(F1,[["render",B1],["__scopeId","data-v-213dcf0e"]]),j1={class:"app"},V1={class:"app-body"},U1={key:0,class:"app-loading"},K1={key:0,class:"rail-wrapper"},W1={class:"main-content"},q1={key:"inspector",class:"inspector-content"},G1={key:1,class:"loading-placeholder"},ml="#sessions",J1=et({__name:"App",setup(e){const t=$t(),n=he(!1),s=he(!1),o=["overview","messages","timeline"];let i=null;const r=he(null),l=A(()=>{const _=t.view,T=r.value;return T===null?"view-instant":T==="dashboard"&&_==="inspector"?"view-slide-forward":T==="inspector"&&_==="dashboard"?"view-slide-back":"view-instant"});Ge(()=>t.view,(_,T)=>{r.value!==null?r.value=T:r.value=_});const{connected:c}=Sp("/api/events",_=>{t.handleSSEEvent(_)});Ge(c,_=>{t.connected=_});function p(_){const T=_.match(/^#session\/([^?]+)(?:\?(.*))?$/);if(!T)return{sessionId:null,tab:null,turn:null};const j=decodeURIComponent(T[1]).trim()||null;if(!j)return{sessionId:null,tab:null,turn:null};const L=new URLSearchParams(T[2]??""),K=L.get("tab"),O=K&&o.includes(K)?K:null,de=L.get("turn"),ae=de?Number.parseInt(de,10):NaN,W=Number.isFinite(ae)&&ae>0?ae:null;return{sessionId:j,tab:O,turn:W}}function f(_){return nn([..._.entries].reverse()).filter(T=>T.isMain).map(T=>T.entry)}function v(){if(t.selectionMode!=="pinned")return null;const _=t.selectedSession;if(!_)return null;const T=f(_);if(T.length===0)return null;const F=t.selectedEntryId;if(F==null)return null;const j=T.findIndex(K=>K.id===F);if(j<0)return null;const L=j+1;return L<T.length?L:null}function g(_){const T=_.match(/^#compare\/(.+)$/);return T?T[1].split(",").map(F=>decodeURIComponent(F.trim())).filter(Boolean):null}async function w(){n.value=!0;try{const _=window.location.hash||"",T=g(_);if(T&&T.length>=2){const K=T.filter(O=>t.summaries.some(de=>de.id===O));if(K.length>=2){await t.enterCompare(new Set(K));return}}const{sessionId:F,tab:j,turn:L}=p(_);if(F){if(!t.summaries.some(O=>O.id===F)){t.setView("dashboard");return}if(await t.selectSession(F),j&&t.setInspectorTab(j),L!=null&&t.selectedSession){const O=f(t.selectedSession);if(O.length>0){const de=Math.min(Math.max(L,1),O.length);de<O.length?t.pinEntry(O[de-1].id):t.followLive()}else t.followLive()}else t.followLive();t.setView("inspector");return}t.setView("dashboard")}finally{n.value=!1}}function P(){if(n.value)return;let _=ml;if(t.view==="compare"&&t.compareSessionIds.size>=2)_=`#compare/${Array.from(t.compareSessionIds).map(F=>encodeURIComponent(F)).join(",")}`;else if(t.view==="inspector"&&t.selectedSessionId){const T=new URLSearchParams;T.set("tab",t.inspectorTab);const F=v();F!=null&&T.set("turn",String(F));const j=T.toString();_=`#session/${encodeURIComponent(t.selectedSessionId)}${j?`?${j}`:""}`}window.location.hash!==_&&(window.location.hash=_)}function $(){w()}return Ge(()=>{var _;return[t.view,t.selectedSessionId,t.inspectorTab,t.selectionMode,t.selectedEntryId,(_=t.selectedSession)==null?void 0:_.entries.length,t.compareMode,t.compareSessionIds.size]},()=>{P()}),kn(async()=>{try{t.initializeDensity(),await t.load(),window.location.hash||(window.location.hash=ml),await w(),window.addEventListener("hashchange",$),i=setInterval(()=>{document.hidden||t.load()},5e3)}finally{s.value=!0}}),Ls(()=>{window.removeEventListener("hashchange",$),i&&(clearInterval(i),i=null)}),(_,T)=>(m(),y("div",j1,[Oe(sh),u("div",V1,[s.value?(m(),y(ve,{key:1},[Oe(Qt,{name:"rail-slide"},{default:it(()=>[J(t).view==="inspector"?(m(),y("div",K1,[Oe(D_)])):oe("",!0)]),_:1}),u("div",W1,[Oe(Qt,{name:l.value},{default:it(()=>[J(t).view==="dashboard"?(m(),mt(Sv,{key:"dashboard"})):J(t).view==="compare"?(m(),mt(N1,{key:"compare"})):J(t).view==="inspector"?(m(),y("div",q1,[J(t).selectedSession?(m(),mt(C_,{key:0})):(m(),y("div",G1,[...T[1]||(T[1]=[u("div",{class:"loading-spinner"},null,-1)])]))])):(m(),mt(H1,{key:"empty"}))]),_:1},8,["name"])])],64)):(m(),y("div",U1,[...T[0]||(T[0]=[u("div",{class:"loading-spinner"},null,-1)])]))])]))}}),Y1=rt(J1,[["__scopeId","data-v-eb13f43c"]]),Gi=Ra(Y1);Gi.use(Zd());Gi.use(dp);Gi.mount("#app");