codexapp 0.1.21 → 0.1.23

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.
@@ -1,48 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();/**
2
- * @vue/shared v3.5.28
3
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
- * @license MIT
5
- **/function Xo(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ut={},Sr=[],hn=()=>{},cl=()=>!1,Ls=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Zo=e=>e.startsWith("onUpdate:"),St=Object.assign,ei=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},cu=Object.prototype.hasOwnProperty,st=(e,t)=>cu.call(e,t),je=Array.isArray,xr=e=>fs(e)==="[object Map]",ul=e=>fs(e)==="[object Set]",Pi=e=>fs(e)==="[object Date]",Ve=e=>typeof e=="function",wt=e=>typeof e=="string",nn=e=>typeof e=="symbol",ot=e=>e!==null&&typeof e=="object",dl=e=>(ot(e)||Ve(e))&&Ve(e.then)&&Ve(e.catch),fl=Object.prototype.toString,fs=e=>fl.call(e),uu=e=>fs(e).slice(8,-1),hl=e=>fs(e)==="[object Object]",ti=e=>wt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Yr=Xo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Bs=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},du=/-\w/g,Jt=Bs(e=>e.replace(du,t=>t.slice(1).toUpperCase())),fu=/\B([A-Z])/g,Vn=Bs(e=>e.replace(fu,"-$1").toLowerCase()),Fs=Bs(e=>e.charAt(0).toUpperCase()+e.slice(1)),to=Bs(e=>e?`on${Fs(e)}`:""),Hn=(e,t)=>!Object.is(e,t),Ts=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},pl=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},ni=e=>{const t=parseFloat(e);return isNaN(t)?e:t},hu=e=>{const t=wt(e)?Number(e):NaN;return isNaN(t)?e:t};let Ni;const Hs=()=>Ni||(Ni=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function fr(e){if(je(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=wt(r)?vu(r):fr(r);if(s)for(const o in s)t[o]=s[o]}return t}else if(wt(e)||ot(e))return e}const pu=/;(?![^(]*\))/g,mu=/:([^]+)/,gu=/\/\*[^]*?\*\//g;function vu(e){const t={};return e.replace(gu,"").split(pu).forEach(n=>{if(n){const r=n.split(mu);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function dt(e){let t="";if(wt(e))t=e;else if(je(e))for(let n=0;n<e.length;n++){const r=dt(e[n]);r&&(t+=r+" ")}else if(ot(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const yu="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",wu=Xo(yu);function ml(e){return!!e||e===""}function bu(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=ri(e[r],t[r]);return n}function ri(e,t){if(e===t)return!0;let n=Pi(e),r=Pi(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=nn(e),r=nn(t),n||r)return e===t;if(n=je(e),r=je(t),n||r)return n&&r?bu(e,t):!1;if(n=ot(e),r=ot(t),n||r){if(!n||!r)return!1;const s=Object.keys(e).length,o=Object.keys(t).length;if(s!==o)return!1;for(const i in e){const a=e.hasOwnProperty(i),l=t.hasOwnProperty(i);if(a&&!l||!a&&l||!ri(e[i],t[i]))return!1}}return String(e)===String(t)}const gl=e=>!!(e&&e.__v_isRef===!0),_e=e=>wt(e)?e:e==null?"":je(e)||ot(e)&&(e.toString===fl||!Ve(e.toString))?gl(e)?_e(e.value):JSON.stringify(e,vl,2):String(e),vl=(e,t)=>gl(t)?vl(e,t.value):xr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],o)=>(n[no(r,o)+" =>"]=s,n),{})}:ul(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>no(n))}:nn(t)?no(t):ot(t)&&!je(t)&&!hl(t)?String(t):t,no=(e,t="")=>{var n;return nn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
6
- * @vue/reactivity v3.5.28
7
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
- * @license MIT
9
- **/let Vt;class _u{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=Vt,!t&&Vt&&(this.index=(Vt.scopes||(Vt.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=Vt;try{return Vt=this,t()}finally{Vt=n}}}on(){++this._on===1&&(this.prevScope=Vt,Vt=this)}off(){this._on>0&&--this._on===0&&(Vt=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function ku(){return Vt}let ht;const ro=new WeakSet;class yl{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,Vt&&Vt.active&&Vt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ro.has(this)&&(ro.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||bl(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Oi(this),_l(this);const t=ht,n=en;ht=this,en=!0;try{return this.fn()}finally{kl(this),ht=t,en=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ii(t);this.deps=this.depsTail=void 0,Oi(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ro.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Io(this)&&this.run()}get dirty(){return Io(this)}}let wl=0,Jr,Qr;function bl(e,t=!1){if(e.flags|=8,t){e.next=Qr,Qr=e;return}e.next=Jr,Jr=e}function si(){wl++}function oi(){if(--wl>0)return;if(Qr){let t=Qr;for(Qr=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Jr;){let t=Jr;for(Jr=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function _l(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function kl(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),ii(r),Tu(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function Io(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Tl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Tl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===rs)||(e.globalVersion=rs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Io(e))))return;e.flags|=2;const t=e.dep,n=ht,r=en;ht=e,en=!0;try{_l(e);const s=e.fn(e._value);(t.version===0||Hn(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{ht=n,en=r,kl(e),e.flags&=-3}}function ii(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)ii(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Tu(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let en=!0;const Sl=[];function Cn(){Sl.push(en),en=!1}function En(){const e=Sl.pop();en=e===void 0?!0:e}function Oi(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ht;ht=void 0;try{t()}finally{ht=n}}}let rs=0;class Su{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 ai{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(!ht||!en||ht===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ht)n=this.activeLink=new Su(ht,this),ht.deps?(n.prevDep=ht.depsTail,ht.depsTail.nextDep=n,ht.depsTail=n):ht.deps=ht.depsTail=n,xl(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=ht.depsTail,n.nextDep=void 0,ht.depsTail.nextDep=n,ht.depsTail=n,ht.deps===n&&(ht.deps=r)}return n}trigger(t){this.version++,rs++,this.notify(t)}notify(t){si();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{oi()}}}function xl(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)xl(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ro=new WeakMap,ur=Symbol(""),$o=Symbol(""),ss=Symbol("");function Mt(e,t,n){if(en&&ht){let r=Ro.get(e);r||Ro.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new ai),s.map=r,s.key=n),s.track()}}function Tn(e,t,n,r,s,o){const i=Ro.get(e);if(!i){rs++;return}const a=l=>{l&&l.trigger()};if(si(),t==="clear")i.forEach(a);else{const l=je(e),d=l&&ti(n);if(l&&n==="length"){const u=Number(r);i.forEach((f,g)=>{(g==="length"||g===ss||!nn(g)&&g>=u)&&a(f)})}else switch((n!==void 0||i.has(void 0))&&a(i.get(n)),d&&a(i.get(ss)),t){case"add":l?d&&a(i.get("length")):(a(i.get(ur)),xr(e)&&a(i.get($o)));break;case"delete":l||(a(i.get(ur)),xr(e)&&a(i.get($o)));break;case"set":xr(e)&&a(i.get(ur));break}}oi()}function wr(e){const t=Xe(e);return t===e?t:(Mt(t,"iterate",ss),Yt(e)?t:t.map(rn))}function Us(e){return Mt(e=Xe(e),"iterate",ss),e}function Dn(e,t){return An(e)?Ir(dr(e)?rn(t):t):rn(t)}const xu={__proto__:null,[Symbol.iterator](){return so(this,Symbol.iterator,e=>Dn(this,e))},concat(...e){return wr(this).concat(...e.map(t=>je(t)?wr(t):t))},entries(){return so(this,"entries",e=>(e[1]=Dn(this,e[1]),e))},every(e,t){return yn(this,"every",e,t,void 0,arguments)},filter(e,t){return yn(this,"filter",e,t,n=>n.map(r=>Dn(this,r)),arguments)},find(e,t){return yn(this,"find",e,t,n=>Dn(this,n),arguments)},findIndex(e,t){return yn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return yn(this,"findLast",e,t,n=>Dn(this,n),arguments)},findLastIndex(e,t){return yn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return yn(this,"forEach",e,t,void 0,arguments)},includes(...e){return oo(this,"includes",e)},indexOf(...e){return oo(this,"indexOf",e)},join(e){return wr(this).join(e)},lastIndexOf(...e){return oo(this,"lastIndexOf",e)},map(e,t){return yn(this,"map",e,t,void 0,arguments)},pop(){return Hr(this,"pop")},push(...e){return Hr(this,"push",e)},reduce(e,...t){return ji(this,"reduce",e,t)},reduceRight(e,...t){return ji(this,"reduceRight",e,t)},shift(){return Hr(this,"shift")},some(e,t){return yn(this,"some",e,t,void 0,arguments)},splice(...e){return Hr(this,"splice",e)},toReversed(){return wr(this).toReversed()},toSorted(e){return wr(this).toSorted(e)},toSpliced(...e){return wr(this).toSpliced(...e)},unshift(...e){return Hr(this,"unshift",e)},values(){return so(this,"values",e=>Dn(this,e))}};function so(e,t,n){const r=Us(e),s=r[t]();return r!==e&&!Yt(e)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.done||(o.value=n(o.value)),o}),s}const Cu=Array.prototype;function yn(e,t,n,r,s,o){const i=Us(e),a=i!==e&&!Yt(e),l=i[t];if(l!==Cu[t]){const f=l.apply(e,o);return a?rn(f):f}let d=n;i!==e&&(a?d=function(f,g){return n.call(this,Dn(e,f),g,e)}:n.length>2&&(d=function(f,g){return n.call(this,f,g,e)}));const u=l.call(i,d,r);return a&&s?s(u):u}function ji(e,t,n,r){const s=Us(e);let o=n;return s!==e&&(Yt(e)?n.length>3&&(o=function(i,a,l){return n.call(this,i,a,l,e)}):o=function(i,a,l){return n.call(this,i,Dn(e,a),l,e)}),s[t](o,...r)}function oo(e,t,n){const r=Xe(e);Mt(r,"iterate",ss);const s=r[t](...n);return(s===-1||s===!1)&&ui(n[0])?(n[0]=Xe(n[0]),r[t](...n)):s}function Hr(e,t,n=[]){Cn(),si();const r=Xe(e)[t].apply(e,n);return oi(),En(),r}const Eu=Xo("__proto__,__v_isRef,__isVue"),Cl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(nn));function Au(e){nn(e)||(e=String(e));const t=Xe(this);return Mt(t,"has",e),t.hasOwnProperty(e)}class El{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(s?o?Lu:$l:o?Rl:Il).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=je(t);if(!s){let l;if(i&&(l=xu[n]))return l;if(n==="hasOwnProperty")return Au}const a=Reflect.get(t,n,Ot(t)?t:r);if((nn(n)?Cl.has(n):Eu(n))||(s||Mt(t,"get",n),o))return a;if(Ot(a)){const l=i&&ti(n)?a:a.value;return s&&ot(l)?Po(l):l}return ot(a)?s?Po(a):Vs(a):a}}class Al extends El{constructor(t=!1){super(!1,t)}set(t,n,r,s){let o=t[n];const i=je(t)&&ti(n);if(!this._isShallow){const d=An(o);if(!Yt(r)&&!An(r)&&(o=Xe(o),r=Xe(r)),!i&&Ot(o)&&!Ot(r))return d||(o.value=r),!0}const a=i?Number(n)<t.length:st(t,n),l=Reflect.set(t,n,r,Ot(t)?t:s);return t===Xe(s)&&(a?Hn(r,o)&&Tn(t,"set",n,r):Tn(t,"add",n,r)),l}deleteProperty(t,n){const r=st(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&Tn(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!nn(n)||!Cl.has(n))&&Mt(t,"has",n),r}ownKeys(t){return Mt(t,"iterate",je(t)?"length":ur),Reflect.ownKeys(t)}}class Iu extends El{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Ru=new Al,$u=new Iu,Mu=new Al(!0);const Mo=e=>e,ms=e=>Reflect.getPrototypeOf(e);function Pu(e,t,n){return function(...r){const s=this.__v_raw,o=Xe(s),i=xr(o),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,d=s[e](...r),u=n?Mo:t?Ir:rn;return!t&&Mt(o,"iterate",l?$o:ur),St(Object.create(d),{next(){const{value:f,done:g}=d.next();return g?{value:f,done:g}:{value:a?[u(f[0]),u(f[1])]:u(f),done:g}}})}}function gs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Nu(e,t){const n={get(s){const o=this.__v_raw,i=Xe(o),a=Xe(s);e||(Hn(s,a)&&Mt(i,"get",s),Mt(i,"get",a));const{has:l}=ms(i),d=t?Mo:e?Ir:rn;if(l.call(i,s))return d(o.get(s));if(l.call(i,a))return d(o.get(a));o!==i&&o.get(s)},get size(){const s=this.__v_raw;return!e&&Mt(Xe(s),"iterate",ur),s.size},has(s){const o=this.__v_raw,i=Xe(o),a=Xe(s);return e||(Hn(s,a)&&Mt(i,"has",s),Mt(i,"has",a)),s===a?o.has(s):o.has(s)||o.has(a)},forEach(s,o){const i=this,a=i.__v_raw,l=Xe(a),d=t?Mo:e?Ir:rn;return!e&&Mt(l,"iterate",ur),a.forEach((u,f)=>s.call(o,d(u),d(f),i))}};return St(n,e?{add:gs("add"),set:gs("set"),delete:gs("delete"),clear:gs("clear")}:{add(s){!t&&!Yt(s)&&!An(s)&&(s=Xe(s));const o=Xe(this);return ms(o).has.call(o,s)||(o.add(s),Tn(o,"add",s,s)),this},set(s,o){!t&&!Yt(o)&&!An(o)&&(o=Xe(o));const i=Xe(this),{has:a,get:l}=ms(i);let d=a.call(i,s);d||(s=Xe(s),d=a.call(i,s));const u=l.call(i,s);return i.set(s,o),d?Hn(o,u)&&Tn(i,"set",s,o):Tn(i,"add",s,o),this},delete(s){const o=Xe(this),{has:i,get:a}=ms(o);let l=i.call(o,s);l||(s=Xe(s),l=i.call(o,s)),a&&a.call(o,s);const d=o.delete(s);return l&&Tn(o,"delete",s,void 0),d},clear(){const s=Xe(this),o=s.size!==0,i=s.clear();return o&&Tn(s,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Pu(s,e,t)}),n}function li(e,t){const n=Nu(e,t);return(r,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(st(n,s)&&s in r?n:r,s,o)}const Ou={get:li(!1,!1)},ju={get:li(!1,!0)},Du={get:li(!0,!1)};const Il=new WeakMap,Rl=new WeakMap,$l=new WeakMap,Lu=new WeakMap;function Bu(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Fu(e){return e.__v_skip||!Object.isExtensible(e)?0:Bu(uu(e))}function Vs(e){return An(e)?e:ci(e,!1,Ru,Ou,Il)}function Ml(e){return ci(e,!1,Mu,ju,Rl)}function Po(e){return ci(e,!0,$u,Du,$l)}function ci(e,t,n,r,s){if(!ot(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=Fu(e);if(o===0)return e;const i=s.get(e);if(i)return i;const a=new Proxy(e,o===2?r:n);return s.set(e,a),a}function dr(e){return An(e)?dr(e.__v_raw):!!(e&&e.__v_isReactive)}function An(e){return!!(e&&e.__v_isReadonly)}function Yt(e){return!!(e&&e.__v_isShallow)}function ui(e){return e?!!e.__v_raw:!1}function Xe(e){const t=e&&e.__v_raw;return t?Xe(t):e}function Hu(e){return!st(e,"__v_skip")&&Object.isExtensible(e)&&pl(e,"__v_skip",!0),e}const rn=e=>ot(e)?Vs(e):e,Ir=e=>ot(e)?Po(e):e;function Ot(e){return e?e.__v_isRef===!0:!1}function O(e){return Pl(e,!1)}function Uu(e){return Pl(e,!0)}function Pl(e,t){return Ot(e)?e:new Vu(e,t)}class Vu{constructor(t,n){this.dep=new ai,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Xe(t),this._value=n?t:rn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Yt(t)||An(t);t=r?t:Xe(t),Hn(t,n)&&(this._rawValue=t,this._value=r?t:rn(t),this.dep.trigger())}}function Oe(e){return Ot(e)?e.value:e}const Wu={get:(e,t,n)=>t==="__v_raw"?e:Oe(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return Ot(s)&&!Ot(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function Nl(e){return dr(e)?e:new Proxy(e,Wu)}class qu{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ai(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=rs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&ht!==this)return bl(this,!0),!0}get value(){const t=this.dep.track();return Tl(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Ku(e,t,n=!1){let r,s;return Ve(e)?r=e:(r=e.get,s=e.set),new qu(r,s,n)}const vs={},As=new WeakMap;let ir;function Gu(e,t=!1,n=ir){if(n){let r=As.get(n);r||As.set(n,r=[]),r.push(e)}}function zu(e,t,n=ut){const{immediate:r,deep:s,once:o,scheduler:i,augmentJob:a,call:l}=n,d=j=>s?j:Yt(j)||s===!1||s===0?Sn(j,1):Sn(j);let u,f,g,_,P=!1,R=!1;if(Ot(e)?(f=()=>e.value,P=Yt(e)):dr(e)?(f=()=>d(e),P=!0):je(e)?(R=!0,P=e.some(j=>dr(j)||Yt(j)),f=()=>e.map(j=>{if(Ot(j))return j.value;if(dr(j))return d(j);if(Ve(j))return l?l(j,2):j()})):Ve(e)?t?f=l?()=>l(e,2):e:f=()=>{if(g){Cn();try{g()}finally{En()}}const j=ir;ir=u;try{return l?l(e,3,[_]):e(_)}finally{ir=j}}:f=hn,t&&s){const j=f,ae=s===!0?1/0:s;f=()=>Sn(j(),ae)}const B=ku(),z=()=>{u.stop(),B&&B.active&&ei(B.effects,u)};if(o&&t){const j=t;t=(...ae)=>{j(...ae),z()}}let N=R?new Array(e.length).fill(vs):vs;const H=j=>{if(!(!(u.flags&1)||!u.dirty&&!j))if(t){const ae=u.run();if(s||P||(R?ae.some((ue,de)=>Hn(ue,N[de])):Hn(ae,N))){g&&g();const ue=ir;ir=u;try{const de=[ae,N===vs?void 0:R&&N[0]===vs?[]:N,_];N=ae,l?l(t,3,de):t(...de)}finally{ir=ue}}}else u.run()};return a&&a(H),u=new yl(f),u.scheduler=i?()=>i(H,!1):H,_=j=>Gu(j,!1,u),g=u.onStop=()=>{const j=As.get(u);if(j){if(l)l(j,4);else for(const ae of j)ae();As.delete(u)}},t?r?H(!0):N=u.run():i?i(H.bind(null,!0),!0):u.run(),z.pause=u.pause.bind(u),z.resume=u.resume.bind(u),z.stop=z,z}function Sn(e,t=1/0,n){if(t<=0||!ot(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ot(e))Sn(e.value,t,n);else if(je(e))for(let r=0;r<e.length;r++)Sn(e[r],t,n);else if(ul(e)||xr(e))e.forEach(r=>{Sn(r,t,n)});else if(hl(e)){for(const r in e)Sn(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Sn(e[r],t,n)}return e}/**
10
- * @vue/runtime-core v3.5.28
11
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
- * @license MIT
13
- **/function hs(e,t,n,r){try{return r?e(...r):e()}catch(s){Ws(s,t,n)}}function sn(e,t,n,r){if(Ve(e)){const s=hs(e,t,n,r);return s&&dl(s)&&s.catch(o=>{Ws(o,t,n)}),s}if(je(e)){const s=[];for(let o=0;o<e.length;o++)s.push(sn(e[o],t,n,r));return s}}function Ws(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||ut;if(t){let a=t.parent;const l=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const u=a.ec;if(u){for(let f=0;f<u.length;f++)if(u[f](e,l,d)===!1)return}a=a.parent}if(o){Cn(),hs(o,null,10,[e,l,d]),En();return}}Yu(e,n,s,r,i)}function Yu(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const Bt=[];let cn=-1;const Cr=[];let Ln=null,_r=0;const Ol=Promise.resolve();let Is=null;function Kt(e){const t=Is||Ol;return e?t.then(this?e.bind(this):e):t}function Ju(e){let t=cn+1,n=Bt.length;for(;t<n;){const r=t+n>>>1,s=Bt[r],o=os(s);o<e||o===e&&s.flags&2?t=r+1:n=r}return t}function di(e){if(!(e.flags&1)){const t=os(e),n=Bt[Bt.length-1];!n||!(e.flags&2)&&t>=os(n)?Bt.push(e):Bt.splice(Ju(t),0,e),e.flags|=1,jl()}}function jl(){Is||(Is=Ol.then(Ll))}function Qu(e){je(e)?Cr.push(...e):Ln&&e.id===-1?Ln.splice(_r+1,0,e):e.flags&1||(Cr.push(e),e.flags|=1),jl()}function Di(e,t,n=cn+1){for(;n<Bt.length;n++){const r=Bt[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;Bt.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Dl(e){if(Cr.length){const t=[...new Set(Cr)].sort((n,r)=>os(n)-os(r));if(Cr.length=0,Ln){Ln.push(...t);return}for(Ln=t,_r=0;_r<Ln.length;_r++){const n=Ln[_r];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Ln=null,_r=0}}const os=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Ll(e){try{for(cn=0;cn<Bt.length;cn++){const t=Bt[cn];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),hs(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;cn<Bt.length;cn++){const t=Bt[cn];t&&(t.flags&=-2)}cn=-1,Bt.length=0,Dl(),Is=null,(Bt.length||Cr.length)&&Ll()}}let Et=null,Bl=null;function Rs(e){const t=Et;return Et=e,Bl=e&&e.type.__scopeId||null,t}function at(e,t=Et,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&Ns(-1);const o=Rs(t);let i;try{i=e(...s)}finally{Rs(o),r._d&&Ns(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function In(e,t){if(Et===null)return e;const n=Js(Et),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[o,i,a,l=ut]=t[s];o&&(Ve(o)&&(o={mounted:o,updated:o}),o.deep&&Sn(i),r.push({dir:o,instance:n,value:i,oldValue:void 0,arg:a,modifiers:l}))}return e}function tr(e,t,n,r){const s=e.dirs,o=t&&t.dirs;for(let i=0;i<s.length;i++){const a=s[i];o&&(a.oldValue=o[i].value);let l=a.dir[r];l&&(Cn(),sn(l,n,8,[e.el,a,e,t]),En())}}function Ss(e,t){if(Nt){let n=Nt.provides;const r=Nt.parent&&Nt.parent.provides;r===n&&(n=Nt.provides=Object.create(r)),n[e]=t}}function tn(e,t,n=!1){const r=gi();if(r||Ar){let s=Ar?Ar._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&Ve(t)?t.call(r&&r.proxy):t}}const Xu=Symbol.for("v-scx"),Zu=()=>tn(Xu);function gt(e,t,n){return Fl(e,t,n)}function Fl(e,t,n=ut){const{immediate:r,deep:s,flush:o,once:i}=n,a=St({},n),l=t&&r||!t&&o!=="post";let d;if(cs){if(o==="sync"){const _=Zu();d=_.__watcherHandles||(_.__watcherHandles=[])}else if(!l){const _=()=>{};return _.stop=hn,_.resume=hn,_.pause=hn,_}}const u=Nt;a.call=(_,P,R)=>sn(_,u,P,R);let f=!1;o==="post"?a.scheduler=_=>{$t(_,u&&u.suspense)}:o!=="sync"&&(f=!0,a.scheduler=(_,P)=>{P?_():di(_)}),a.augmentJob=_=>{t&&(_.flags|=4),f&&(_.flags|=2,u&&(_.id=u.uid,_.i=u))};const g=zu(e,t,a);return cs&&(d?d.push(g):l&&g()),g}function ed(e,t,n){const r=this.proxy,s=wt(e)?e.includes(".")?Hl(r,e):()=>r[e]:e.bind(r,r);let o;Ve(t)?o=t:(o=t.handler,n=t);const i=ps(this),a=Fl(s,o.bind(r),n);return i(),a}function Hl(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s<n.length&&r;s++)r=r[n[s]];return r}}const Ul=Symbol("_vte"),Vl=e=>e.__isTeleport,Xr=e=>e&&(e.disabled||e.disabled===""),Li=e=>e&&(e.defer||e.defer===""),Bi=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Fi=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,No=(e,t)=>{const n=e&&e.to;return wt(n)?t?t(n):null:n},Wl={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,o,i,a,l,d){const{mc:u,pc:f,pbc:g,o:{insert:_,querySelector:P,createText:R,createComment:B}}=d,z=Xr(t.props);let{shapeFlag:N,children:H,dynamicChildren:j}=t;if(e==null){const ae=t.el=R(""),ue=t.anchor=R("");_(ae,n,r),_(ue,n,r);const de=(se,Z)=>{N&16&&u(H,se,Z,s,o,i,a,l)},Te=()=>{const se=t.target=No(t.props,P),Z=Oo(se,t,R,_);se&&(i!=="svg"&&Bi(se)?i="svg":i!=="mathml"&&Fi(se)&&(i="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(se),z||(de(se,Z),xs(t,!1)))};z&&(de(n,ue),xs(t,!0)),Li(t.props)?(t.el.__isMounted=!1,$t(()=>{Te(),delete t.el.__isMounted},o)):Te()}else{if(Li(t.props)&&e.el.__isMounted===!1){$t(()=>{Wl.process(e,t,n,r,s,o,i,a,l,d)},o);return}t.el=e.el,t.targetStart=e.targetStart;const ae=t.anchor=e.anchor,ue=t.target=e.target,de=t.targetAnchor=e.targetAnchor,Te=Xr(e.props),se=Te?n:ue,Z=Te?ae:de;if(i==="svg"||Bi(ue)?i="svg":(i==="mathml"||Fi(ue))&&(i="mathml"),j?(g(e.dynamicChildren,j,se,s,o,i,a),pi(e,t,!0)):l||f(e,t,se,Z,s,o,i,a,!1),z)Te?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ys(t,n,ae,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const me=t.target=No(t.props,P);me&&ys(t,me,null,d,0)}else Te&&ys(t,ue,de,d,1);xs(t,z)}},remove(e,t,n,{um:r,o:{remove:s}},o){const{shapeFlag:i,children:a,anchor:l,targetStart:d,targetAnchor:u,target:f,props:g}=e;if(f&&(s(d),s(u)),o&&s(l),i&16){const _=o||!Xr(g);for(let P=0;P<a.length;P++){const R=a[P];r(R,t,n,_,!!R.dynamicChildren)}}},move:ys,hydrate:td};function ys(e,t,n,{o:{insert:r},m:s},o=2){o===0&&r(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:l,children:d,props:u}=e,f=o===2;if(f&&r(i,t,n),(!f||Xr(u))&&l&16)for(let g=0;g<d.length;g++)s(d[g],t,n,2);f&&r(a,t,n)}function td(e,t,n,r,s,o,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:d,createText:u}},f){function g(B,z){let N=z;for(;N;){if(N&&N.nodeType===8){if(N.data==="teleport start anchor")t.targetStart=N;else if(N.data==="teleport anchor"){t.targetAnchor=N,B._lpa=t.targetAnchor&&i(t.targetAnchor);break}}N=i(N)}}function _(B,z){z.anchor=f(i(B),z,a(B),n,r,s,o)}const P=t.target=No(t.props,l),R=Xr(t.props);if(P){const B=P._lpa||P.firstChild;t.shapeFlag&16&&(R?(_(e,t),g(P,B),t.targetAnchor||Oo(P,t,u,d,a(e)===P?e:null)):(t.anchor=i(e),g(P,B),t.targetAnchor||Oo(P,t,u,d),f(B&&i(B),t,P,n,r,s,o))),xs(t,R)}else R&&t.shapeFlag&16&&(_(e,t),t.targetStart=e,t.targetAnchor=i(e));return t.anchor&&i(t.anchor)}const $s=Wl;function xs(e,t){const n=e.ctx;if(n&&n.ut){let r,s;for(t?(r=e.el,s=e.anchor):(r=e.targetStart,s=e.targetAnchor);r&&r!==s;)r.nodeType===1&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function Oo(e,t,n,r,s=null){const o=t.targetStart=n(""),i=t.targetAnchor=n("");return o[Ul]=i,e&&(r(o,e,s),r(i,e,s)),i}const un=Symbol("_leaveCb"),Ur=Symbol("_enterCb");function nd(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Wn(()=>{e.isMounted=!0}),qn(()=>{e.isUnmounting=!0}),e}const Gt=[Function,Array],ql={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Gt,onEnter:Gt,onAfterEnter:Gt,onEnterCancelled:Gt,onBeforeLeave:Gt,onLeave:Gt,onAfterLeave:Gt,onLeaveCancelled:Gt,onBeforeAppear:Gt,onAppear:Gt,onAfterAppear:Gt,onAppearCancelled:Gt},Kl=e=>{const t=e.subTree;return t.component?Kl(t.component):t},rd={name:"BaseTransition",props:ql,setup(e,{slots:t}){const n=gi(),r=nd();return()=>{const s=t.default&&Yl(t.default(),!0);if(!s||!s.length)return;const o=Gl(s),i=Xe(e),{mode:a}=i;if(r.isLeaving)return io(o);const l=Hi(o);if(!l)return io(o);let d=jo(l,i,r,n,f=>d=f);l.type!==Pt&&is(l,d);let u=n.subTree&&Hi(n.subTree);if(u&&u.type!==Pt&&!ar(u,l)&&Kl(n).type!==Pt){let f=jo(u,i,r,n);if(is(u,f),a==="out-in"&&l.type!==Pt)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave,u=void 0},io(o);a==="in-out"&&l.type!==Pt?f.delayLeave=(g,_,P)=>{const R=zl(r,u);R[String(u.key)]=u,g[un]=()=>{_(),g[un]=void 0,delete d.delayedLeave,u=void 0},d.delayedLeave=()=>{P(),delete d.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function Gl(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Pt){t=n;break}}return t}const sd=rd;function zl(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function jo(e,t,n,r,s){const{appear:o,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:d,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:g,onLeave:_,onAfterLeave:P,onLeaveCancelled:R,onBeforeAppear:B,onAppear:z,onAfterAppear:N,onAppearCancelled:H}=t,j=String(e.key),ae=zl(n,e),ue=(se,Z)=>{se&&sn(se,r,9,Z)},de=(se,Z)=>{const me=Z[1];ue(se,Z),je(se)?se.every(te=>te.length<=1)&&me():se.length<=1&&me()},Te={mode:i,persisted:a,beforeEnter(se){let Z=l;if(!n.isMounted)if(o)Z=B||l;else return;se[un]&&se[un](!0);const me=ae[j];me&&ar(e,me)&&me.el[un]&&me.el[un](),ue(Z,[se])},enter(se){let Z=d,me=u,te=f;if(!n.isMounted)if(o)Z=z||d,me=N||u,te=H||f;else return;let Be=!1;se[Ur]=ze=>{Be||(Be=!0,ze?ue(te,[se]):ue(me,[se]),Te.delayedLeave&&Te.delayedLeave(),se[Ur]=void 0)};const He=se[Ur].bind(null,!1);Z?de(Z,[se,He]):He()},leave(se,Z){const me=String(e.key);if(se[Ur]&&se[Ur](!0),n.isUnmounting)return Z();ue(g,[se]);let te=!1;se[un]=He=>{te||(te=!0,Z(),He?ue(R,[se]):ue(P,[se]),se[un]=void 0,ae[me]===e&&delete ae[me])};const Be=se[un].bind(null,!1);ae[me]=e,_?de(_,[se,Be]):Be()},clone(se){const Z=jo(se,t,n,r,s);return s&&s(Z),Z}};return Te}function io(e){if(qs(e))return e=Un(e),e.children=null,e}function Hi(e){if(!qs(e))return Vl(e.type)&&e.children?Gl(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&&Ve(n.default))return n.default()}}function is(e,t){e.shapeFlag&6&&e.component?(e.transition=t,is(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 Yl(e,t=!1,n){let r=[],s=0;for(let o=0;o<e.length;o++){let i=e[o];const a=n==null?i.key:String(n)+String(i.key!=null?i.key:o);i.type===Ue?(i.patchFlag&128&&s++,r=r.concat(Yl(i.children,t,a))):(t||i.type!==Pt)&&r.push(a!=null?Un(i,{key:a}):i)}if(s>1)for(let o=0;o<r.length;o++)r[o].patchFlag=-2;return r}function At(e,t){return Ve(e)?St({name:e.name},t,{setup:e}):e}function Jl(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Ui(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Ms=new WeakMap;function Zr(e,t,n,r,s=!1){if(je(e)){e.forEach((R,B)=>Zr(R,t&&(je(t)?t[B]:t),n,r,s));return}if(Er(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Zr(e,t,n,r.component.subTree);return}const o=r.shapeFlag&4?Js(r.component):r.el,i=s?null:o,{i:a,r:l}=e,d=t&&t.r,u=a.refs===ut?a.refs={}:a.refs,f=a.setupState,g=Xe(f),_=f===ut?cl:R=>Ui(u,R)?!1:st(g,R),P=(R,B)=>!(B&&Ui(u,B));if(d!=null&&d!==l){if(Vi(t),wt(d))u[d]=null,_(d)&&(f[d]=null);else if(Ot(d)){const R=t;P(d,R.k)&&(d.value=null),R.k&&(u[R.k]=null)}}if(Ve(l))hs(l,a,12,[i,u]);else{const R=wt(l),B=Ot(l);if(R||B){const z=()=>{if(e.f){const N=R?_(l)?f[l]:u[l]:P()||!e.k?l.value:u[e.k];if(s)je(N)&&ei(N,o);else if(je(N))N.includes(o)||N.push(o);else if(R)u[l]=[o],_(l)&&(f[l]=u[l]);else{const H=[o];P(l,e.k)&&(l.value=H),e.k&&(u[e.k]=H)}}else R?(u[l]=i,_(l)&&(f[l]=i)):B&&(P(l,e.k)&&(l.value=i),e.k&&(u[e.k]=i))};if(i){const N=()=>{z(),Ms.delete(e)};N.id=-1,Ms.set(e,N),$t(N,n)}else Vi(e),z()}}}function Vi(e){const t=Ms.get(e);t&&(t.flags|=8,Ms.delete(e))}Hs().requestIdleCallback;Hs().cancelIdleCallback;const Er=e=>!!e.type.__asyncLoader,qs=e=>e.type.__isKeepAlive;function od(e,t){Ql(e,"a",t)}function id(e,t){Ql(e,"da",t)}function Ql(e,t,n=Nt){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Ks(t,r,n),n){let s=n.parent;for(;s&&s.parent;)qs(s.parent.vnode)&&ad(r,t,n,s),s=s.parent}}function ad(e,t,n,r){const s=Ks(t,e,r,!0);Gs(()=>{ei(r[t],s)},n)}function Ks(e,t,n=Nt,r=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{Cn();const a=ps(n),l=sn(t,n,e,i);return a(),En(),l});return r?s.unshift(o):s.push(o),o}}const $n=e=>(t,n=Nt)=>{(!cs||e==="sp")&&Ks(e,(...r)=>t(...r),n)},ld=$n("bm"),Wn=$n("m"),cd=$n("bu"),ud=$n("u"),qn=$n("bum"),Gs=$n("um"),dd=$n("sp"),fd=$n("rtg"),hd=$n("rtc");function pd(e,t=Nt){Ks("ec",e,t)}const md="components",Xl=Symbol.for("v-ndc");function gd(e){return wt(e)?vd(md,e,!1)||e:e||Xl}function vd(e,t,n=!0,r=!1){const s=Et||Nt;if(s){const o=s.type;{const a=nf(o,!1);if(a&&(a===t||a===Jt(t)||a===Fs(Jt(t))))return o}const i=Wi(s[e]||o[e],t)||Wi(s.appContext[e],t);return!i&&r?o:i}}function Wi(e,t){return e&&(e[t]||e[Jt(t)]||e[Fs(Jt(t))])}function yt(e,t,n,r){let s;const o=n,i=je(e);if(i||wt(e)){const a=i&&dr(e);let l=!1,d=!1;a&&(l=!Yt(e),d=An(e),e=Us(e)),s=new Array(e.length);for(let u=0,f=e.length;u<f;u++)s[u]=t(l?d?Ir(rn(e[u])):rn(e[u]):e[u],u,void 0,o)}else if(typeof e=="number"){s=new Array(e);for(let a=0;a<e;a++)s[a]=t(a+1,a,void 0,o)}else if(ot(e))if(e[Symbol.iterator])s=Array.from(e,(a,l)=>t(a,l,void 0,o));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,d=a.length;l<d;l++){const u=a[l];s[l]=t(e[u],u,l,o)}}else s=[];return s}function fn(e,t,n={},r,s){if(Et.ce||Et.parent&&Er(Et.parent)&&Et.parent.ce){const d=Object.keys(n).length>0;return t!=="default"&&(n.name=t),w(),pt(Ue,null,[Ce("slot",n,r)],d?-2:64)}let o=e[t];o&&o._c&&(o._d=!1),w();const i=o&&Zl(o(n)),a=n.key||i&&i.key,l=pt(Ue,{key:(a&&!nn(a)?a:`_${t}`)+(!i&&r?"_fb":"")},i||[],i&&e._===1?64:-2);return o&&o._c&&(o._d=!0),l}function Zl(e){return e.some(t=>ls(t)?!(t.type===Pt||t.type===Ue&&!Zl(t.children)):!0)?e:null}const Do=e=>e?wc(e)?Js(e):Do(e.parent):null,es=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=>Do(e.parent),$root:e=>Do(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>tc(e),$forceUpdate:e=>e.f||(e.f=()=>{di(e.update)}),$nextTick:e=>e.n||(e.n=Kt.bind(e.proxy)),$watch:e=>ed.bind(e)}),ao=(e,t)=>e!==ut&&!e.__isScriptSetup&&st(e,t),yd={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:o,accessCache:i,type:a,appContext:l}=e;if(t[0]!=="$"){const g=i[t];if(g!==void 0)switch(g){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(ao(r,t))return i[t]=1,r[t];if(s!==ut&&st(s,t))return i[t]=2,s[t];if(st(o,t))return i[t]=3,o[t];if(n!==ut&&st(n,t))return i[t]=4,n[t];Lo&&(i[t]=0)}}const d=es[t];let u,f;if(d)return t==="$attrs"&&Mt(e.attrs,"get",""),d(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(n!==ut&&st(n,t))return i[t]=4,n[t];if(f=l.config.globalProperties,st(f,t))return f[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:o}=e;return ao(s,t)?(s[t]=n,!0):r!==ut&&st(r,t)?(r[t]=n,!0):st(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,props:o,type:i}},a){let l;return!!(n[a]||e!==ut&&a[0]!=="$"&&st(e,a)||ao(t,a)||st(o,a)||st(r,a)||st(es,a)||st(s.config.globalProperties,a)||(l=i.__cssModules)&&l[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:st(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function wd(){return bd().slots}function bd(e){const t=gi();return t.setupContext||(t.setupContext=_c(t))}function qi(e){return je(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Lo=!0;function _d(e){const t=tc(e),n=e.proxy,r=e.ctx;Lo=!1,t.beforeCreate&&Ki(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:i,watch:a,provide:l,inject:d,created:u,beforeMount:f,mounted:g,beforeUpdate:_,updated:P,activated:R,deactivated:B,beforeDestroy:z,beforeUnmount:N,destroyed:H,unmounted:j,render:ae,renderTracked:ue,renderTriggered:de,errorCaptured:Te,serverPrefetch:se,expose:Z,inheritAttrs:me,components:te,directives:Be,filters:He}=t;if(d&&kd(d,r,null),i)for(const be in i){const Pe=i[be];Ve(Pe)&&(r[be]=Pe.bind(n))}if(s){const be=s.call(n,n);ot(be)&&(e.data=Vs(be))}if(Lo=!0,o)for(const be in o){const Pe=o[be],lt=Ve(Pe)?Pe.bind(n,n):Ve(Pe.get)?Pe.get.bind(n,n):hn,Ze=!Ve(Pe)&&Ve(Pe.set)?Pe.set.bind(n):hn,it=le({get:lt,set:Ze});Object.defineProperty(r,be,{enumerable:!0,configurable:!0,get:()=>it.value,set:Ke=>it.value=Ke})}if(a)for(const be in a)ec(a[be],r,n,be);if(l){const be=Ve(l)?l.call(n):l;Reflect.ownKeys(be).forEach(Pe=>{Ss(Pe,be[Pe])})}u&&Ki(u,e,"c");function Ee(be,Pe){je(Pe)?Pe.forEach(lt=>be(lt.bind(n))):Pe&&be(Pe.bind(n))}if(Ee(ld,f),Ee(Wn,g),Ee(cd,_),Ee(ud,P),Ee(od,R),Ee(id,B),Ee(pd,Te),Ee(hd,ue),Ee(fd,de),Ee(qn,N),Ee(Gs,j),Ee(dd,se),je(Z))if(Z.length){const be=e.exposed||(e.exposed={});Z.forEach(Pe=>{Object.defineProperty(be,Pe,{get:()=>n[Pe],set:lt=>n[Pe]=lt,enumerable:!0})})}else e.exposed||(e.exposed={});ae&&e.render===hn&&(e.render=ae),me!=null&&(e.inheritAttrs=me),te&&(e.components=te),Be&&(e.directives=Be),se&&Jl(e)}function kd(e,t,n=hn){je(e)&&(e=Bo(e));for(const r in e){const s=e[r];let o;ot(s)?"default"in s?o=tn(s.from||r,s.default,!0):o=tn(s.from||r):o=tn(s),Ot(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[r]=o}}function Ki(e,t,n){sn(je(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function ec(e,t,n,r){let s=r.includes(".")?Hl(n,r):()=>n[r];if(wt(e)){const o=t[e];Ve(o)&&gt(s,o)}else if(Ve(e))gt(s,e.bind(n));else if(ot(e))if(je(e))e.forEach(o=>ec(o,t,n,r));else{const o=Ve(e.handler)?e.handler.bind(n):t[e.handler];Ve(o)&&gt(s,o,e)}}function tc(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,a=o.get(t);let l;return a?l=a:!s.length&&!n&&!r?l=t:(l={},s.length&&s.forEach(d=>Ps(l,d,i,!0)),Ps(l,t,i)),ot(t)&&o.set(t,l),l}function Ps(e,t,n,r=!1){const{mixins:s,extends:o}=t;o&&Ps(e,o,n,!0),s&&s.forEach(i=>Ps(e,i,n,!0));for(const i in t)if(!(r&&i==="expose")){const a=Td[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const Td={data:Gi,props:zi,emits:zi,methods:zr,computed:zr,beforeCreate:Dt,created:Dt,beforeMount:Dt,mounted:Dt,beforeUpdate:Dt,updated:Dt,beforeDestroy:Dt,beforeUnmount:Dt,destroyed:Dt,unmounted:Dt,activated:Dt,deactivated:Dt,errorCaptured:Dt,serverPrefetch:Dt,components:zr,directives:zr,watch:xd,provide:Gi,inject:Sd};function Gi(e,t){return t?e?function(){return St(Ve(e)?e.call(this,this):e,Ve(t)?t.call(this,this):t)}:t:e}function Sd(e,t){return zr(Bo(e),Bo(t))}function Bo(e){if(je(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Dt(e,t){return e?[...new Set([].concat(e,t))]:t}function zr(e,t){return e?St(Object.create(null),e,t):t}function zi(e,t){return e?je(e)&&je(t)?[...new Set([...e,...t])]:St(Object.create(null),qi(e),qi(t??{})):t}function xd(e,t){if(!e)return t;if(!t)return e;const n=St(Object.create(null),e);for(const r in t)n[r]=Dt(e[r],t[r]);return n}function nc(){return{app:null,config:{isNativeTag:cl,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 Cd=0;function Ed(e,t){return function(r,s=null){Ve(r)||(r=St({},r)),s!=null&&!ot(s)&&(s=null);const o=nc(),i=new WeakSet,a=[];let l=!1;const d=o.app={_uid:Cd++,_component:r,_props:s,_container:null,_context:o,_instance:null,version:sf,get config(){return o.config},set config(u){},use(u,...f){return i.has(u)||(u&&Ve(u.install)?(i.add(u),u.install(d,...f)):Ve(u)&&(i.add(u),u(d,...f))),d},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),d},component(u,f){return f?(o.components[u]=f,d):o.components[u]},directive(u,f){return f?(o.directives[u]=f,d):o.directives[u]},mount(u,f,g){if(!l){const _=d._ceVNode||Ce(r,s);return _.appContext=o,g===!0?g="svg":g===!1&&(g=void 0),e(_,u,g),l=!0,d._container=u,u.__vue_app__=d,Js(_.component)}},onUnmount(u){a.push(u)},unmount(){l&&(sn(a,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(u,f){return o.provides[u]=f,d},runWithContext(u){const f=Ar;Ar=d;try{return u()}finally{Ar=f}}};return d}}let Ar=null;const Ad=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Jt(t)}Modifiers`]||e[`${Vn(t)}Modifiers`];function Id(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||ut;let s=n;const o=t.startsWith("update:"),i=o&&Ad(r,t.slice(7));i&&(i.trim&&(s=n.map(u=>wt(u)?u.trim():u)),i.number&&(s=n.map(ni)));let a,l=r[a=to(t)]||r[a=to(Jt(t))];!l&&o&&(l=r[a=to(Vn(t))]),l&&sn(l,e,6,s);const d=r[a+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,sn(d,e,6,s)}}const Rd=new WeakMap;function rc(e,t,n=!1){const r=n?Rd:t.emitsCache,s=r.get(e);if(s!==void 0)return s;const o=e.emits;let i={},a=!1;if(!Ve(e)){const l=d=>{const u=rc(d,t,!0);u&&(a=!0,St(i,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!a?(ot(e)&&r.set(e,null),null):(je(o)?o.forEach(l=>i[l]=null):St(i,o),ot(e)&&r.set(e,i),i)}function zs(e,t){return!e||!Ls(t)?!1:(t=t.slice(2).replace(/Once$/,""),st(e,t[0].toLowerCase()+t.slice(1))||st(e,Vn(t))||st(e,t))}function Yi(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[o],slots:i,attrs:a,emit:l,render:d,renderCache:u,props:f,data:g,setupState:_,ctx:P,inheritAttrs:R}=e,B=Rs(e);let z,N;try{if(n.shapeFlag&4){const j=s||r,ae=j;z=dn(d.call(ae,j,u,f,_,g,P)),N=a}else{const j=t;z=dn(j.length>1?j(f,{attrs:a,slots:i,emit:l}):j(f,null)),N=t.props?a:$d(a)}}catch(j){ts.length=0,Ws(j,e,1),z=Ce(Pt)}let H=z;if(N&&R!==!1){const j=Object.keys(N),{shapeFlag:ae}=H;j.length&&ae&7&&(o&&j.some(Zo)&&(N=Md(N,o)),H=Un(H,N,!1,!0))}return n.dirs&&(H=Un(H,null,!1,!0),H.dirs=H.dirs?H.dirs.concat(n.dirs):n.dirs),n.transition&&is(H,n.transition),z=H,Rs(B),z}const $d=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ls(n))&&((t||(t={}))[n]=e[n]);return t},Md=(e,t)=>{const n={};for(const r in e)(!Zo(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Pd(e,t,n){const{props:r,children:s,component:o}=e,{props:i,children:a,patchFlag:l}=t,d=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Ji(r,i,d):!!i;if(l&8){const u=t.dynamicProps;for(let f=0;f<u.length;f++){const g=u[f];if(sc(i,r,g)&&!zs(d,g))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Ji(r,i,d):!0:!!i;return!1}function Ji(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let s=0;s<r.length;s++){const o=r[s];if(sc(t,e,o)&&!zs(n,o))return!0}return!1}function sc(e,t,n){const r=e[n],s=t[n];return n==="style"&&ot(r)&&ot(s)?!ri(r,s):r!==s}function Nd({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const oc={},ic=()=>Object.create(oc),ac=e=>Object.getPrototypeOf(e)===oc;function Od(e,t,n,r=!1){const s={},o=ic();e.propsDefaults=Object.create(null),lc(e,t,s,o);for(const i in e.propsOptions[0])i in s||(s[i]=void 0);n?e.props=r?s:Ml(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function jd(e,t,n,r){const{props:s,attrs:o,vnode:{patchFlag:i}}=e,a=Xe(s),[l]=e.propsOptions;let d=!1;if((r||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f<u.length;f++){let g=u[f];if(zs(e.emitsOptions,g))continue;const _=t[g];if(l)if(st(o,g))_!==o[g]&&(o[g]=_,d=!0);else{const P=Jt(g);s[P]=Fo(l,a,P,_,e,!1)}else _!==o[g]&&(o[g]=_,d=!0)}}}else{lc(e,t,s,o)&&(d=!0);let u;for(const f in a)(!t||!st(t,f)&&((u=Vn(f))===f||!st(t,u)))&&(l?n&&(n[f]!==void 0||n[u]!==void 0)&&(s[f]=Fo(l,a,f,void 0,e,!0)):delete s[f]);if(o!==a)for(const f in o)(!t||!st(t,f))&&(delete o[f],d=!0)}d&&Tn(e.attrs,"set","")}function lc(e,t,n,r){const[s,o]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if(Yr(l))continue;const d=t[l];let u;s&&st(s,u=Jt(l))?!o||!o.includes(u)?n[u]=d:(a||(a={}))[u]=d:zs(e.emitsOptions,l)||(!(l in r)||d!==r[l])&&(r[l]=d,i=!0)}if(o){const l=Xe(n),d=a||ut;for(let u=0;u<o.length;u++){const f=o[u];n[f]=Fo(s,l,f,d[f],e,!st(d,f))}}return i}function Fo(e,t,n,r,s,o){const i=e[n];if(i!=null){const a=st(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&Ve(l)){const{propsDefaults:d}=s;if(n in d)r=d[n];else{const u=ps(s);r=d[n]=l.call(null,t),u()}}else r=l;s.ce&&s.ce._setProp(n,r)}i[0]&&(o&&!a?r=!1:i[1]&&(r===""||r===Vn(n))&&(r=!0))}return r}const Dd=new WeakMap;function cc(e,t,n=!1){const r=n?Dd:t.propsCache,s=r.get(e);if(s)return s;const o=e.props,i={},a=[];let l=!1;if(!Ve(e)){const u=f=>{l=!0;const[g,_]=cc(f,t,!0);St(i,g),_&&a.push(..._)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!l)return ot(e)&&r.set(e,Sr),Sr;if(je(o))for(let u=0;u<o.length;u++){const f=Jt(o[u]);Qi(f)&&(i[f]=ut)}else if(o)for(const u in o){const f=Jt(u);if(Qi(f)){const g=o[u],_=i[f]=je(g)||Ve(g)?{type:g}:St({},g),P=_.type;let R=!1,B=!0;if(je(P))for(let z=0;z<P.length;++z){const N=P[z],H=Ve(N)&&N.name;if(H==="Boolean"){R=!0;break}else H==="String"&&(B=!1)}else R=Ve(P)&&P.name==="Boolean";_[0]=R,_[1]=B,(R||st(_,"default"))&&a.push(f)}}const d=[i,a];return ot(e)&&r.set(e,d),d}function Qi(e){return e[0]!=="$"&&!Yr(e)}const fi=e=>e==="_"||e==="_ctx"||e==="$stable",hi=e=>je(e)?e.map(dn):[dn(e)],Ld=(e,t,n)=>{if(t._n)return t;const r=at((...s)=>hi(t(...s)),n);return r._c=!1,r},uc=(e,t,n)=>{const r=e._ctx;for(const s in e){if(fi(s))continue;const o=e[s];if(Ve(o))t[s]=Ld(s,o,r);else if(o!=null){const i=hi(o);t[s]=()=>i}}},dc=(e,t)=>{const n=hi(t);e.slots.default=()=>n},fc=(e,t,n)=>{for(const r in t)(n||!fi(r))&&(e[r]=t[r])},Bd=(e,t,n)=>{const r=e.slots=ic();if(e.vnode.shapeFlag&32){const s=t._;s?(fc(r,t,n),n&&pl(r,"_",s,!0)):uc(t,r)}else t&&dc(e,t)},Fd=(e,t,n)=>{const{vnode:r,slots:s}=e;let o=!0,i=ut;if(r.shapeFlag&32){const a=t._;a?n&&a===1?o=!1:fc(s,t,n):(o=!t.$stable,uc(t,s)),i=t}else t&&(dc(e,t),i={default:1});if(o)for(const a in s)!fi(a)&&i[a]==null&&delete s[a]},$t=qd;function Hd(e){return Ud(e)}function Ud(e,t){const n=Hs();n.__VUE__=!0;const{insert:r,remove:s,patchProp:o,createElement:i,createText:a,createComment:l,setText:d,setElementText:u,parentNode:f,nextSibling:g,setScopeId:_=hn,insertStaticContent:P}=e,R=(p,y,x,D=null,V=null,L=null,ee=void 0,ne=null,Q=!!y.dynamicChildren)=>{if(p===y)return;p&&!ar(p,y)&&(D=I(p),Ke(p,V,L,!0),p=null),y.patchFlag===-2&&(Q=!1,y.dynamicChildren=null);const{type:U,ref:fe,shapeFlag:ie}=y;switch(U){case Ys:B(p,y,x,D);break;case Pt:z(p,y,x,D);break;case co:p==null&&N(y,x,D,ee);break;case Ue:te(p,y,x,D,V,L,ee,ne,Q);break;default:ie&1?ae(p,y,x,D,V,L,ee,ne,Q):ie&6?Be(p,y,x,D,V,L,ee,ne,Q):(ie&64||ie&128)&&U.process(p,y,x,D,V,L,ee,ne,Q,ge)}fe!=null&&V?Zr(fe,p&&p.ref,L,y||p,!y):fe==null&&p&&p.ref!=null&&Zr(p.ref,null,L,p,!0)},B=(p,y,x,D)=>{if(p==null)r(y.el=a(y.children),x,D);else{const V=y.el=p.el;y.children!==p.children&&d(V,y.children)}},z=(p,y,x,D)=>{p==null?r(y.el=l(y.children||""),x,D):y.el=p.el},N=(p,y,x,D)=>{[p.el,p.anchor]=P(p.children,y,x,D,p.el,p.anchor)},H=({el:p,anchor:y},x,D)=>{let V;for(;p&&p!==y;)V=g(p),r(p,x,D),p=V;r(y,x,D)},j=({el:p,anchor:y})=>{let x;for(;p&&p!==y;)x=g(p),s(p),p=x;s(y)},ae=(p,y,x,D,V,L,ee,ne,Q)=>{if(y.type==="svg"?ee="svg":y.type==="math"&&(ee="mathml"),p==null)ue(y,x,D,V,L,ee,ne,Q);else{const U=p.el&&p.el._isVueCE?p.el:null;try{U&&U._beginPatch(),se(p,y,V,L,ee,ne,Q)}finally{U&&U._endPatch()}}},ue=(p,y,x,D,V,L,ee,ne)=>{let Q,U;const{props:fe,shapeFlag:ie,transition:ve,dirs:ye}=p;if(Q=p.el=i(p.type,L,fe&&fe.is,fe),ie&8?u(Q,p.children):ie&16&&Te(p.children,Q,null,D,V,lo(p,L),ee,ne),ye&&tr(p,null,D,"created"),de(Q,p,p.scopeId,ee,D),fe){for(const qe in fe)qe!=="value"&&!Yr(qe)&&o(Q,qe,null,fe[qe],L,D);"value"in fe&&o(Q,"value",null,fe.value,L),(U=fe.onVnodeBeforeMount)&&ln(U,D,p)}ye&&tr(p,null,D,"beforeMount");const De=Vd(V,ve);De&&ve.beforeEnter(Q),r(Q,y,x),((U=fe&&fe.onVnodeMounted)||De||ye)&&$t(()=>{U&&ln(U,D,p),De&&ve.enter(Q),ye&&tr(p,null,D,"mounted")},V)},de=(p,y,x,D,V)=>{if(x&&_(p,x),D)for(let L=0;L<D.length;L++)_(p,D[L]);if(V){let L=V.subTree;if(y===L||mc(L.type)&&(L.ssContent===y||L.ssFallback===y)){const ee=V.vnode;de(p,ee,ee.scopeId,ee.slotScopeIds,V.parent)}}},Te=(p,y,x,D,V,L,ee,ne,Q=0)=>{for(let U=Q;U<p.length;U++){const fe=p[U]=ne?kn(p[U]):dn(p[U]);R(null,fe,y,x,D,V,L,ee,ne)}},se=(p,y,x,D,V,L,ee)=>{const ne=y.el=p.el;let{patchFlag:Q,dynamicChildren:U,dirs:fe}=y;Q|=p.patchFlag&16;const ie=p.props||ut,ve=y.props||ut;let ye;if(x&&nr(x,!1),(ye=ve.onVnodeBeforeUpdate)&&ln(ye,x,y,p),fe&&tr(y,p,x,"beforeUpdate"),x&&nr(x,!0),(ie.innerHTML&&ve.innerHTML==null||ie.textContent&&ve.textContent==null)&&u(ne,""),U?Z(p.dynamicChildren,U,ne,x,D,lo(y,V),L):ee||Pe(p,y,ne,null,x,D,lo(y,V),L,!1),Q>0){if(Q&16)me(ne,ie,ve,x,V);else if(Q&2&&ie.class!==ve.class&&o(ne,"class",null,ve.class,V),Q&4&&o(ne,"style",ie.style,ve.style,V),Q&8){const De=y.dynamicProps;for(let qe=0;qe<De.length;qe++){const Me=De[qe],tt=ie[Me],ft=ve[Me];(ft!==tt||Me==="value")&&o(ne,Me,tt,ft,V,x)}}Q&1&&p.children!==y.children&&u(ne,y.children)}else!ee&&U==null&&me(ne,ie,ve,x,V);((ye=ve.onVnodeUpdated)||fe)&&$t(()=>{ye&&ln(ye,x,y,p),fe&&tr(y,p,x,"updated")},D)},Z=(p,y,x,D,V,L,ee)=>{for(let ne=0;ne<y.length;ne++){const Q=p[ne],U=y[ne],fe=Q.el&&(Q.type===Ue||!ar(Q,U)||Q.shapeFlag&198)?f(Q.el):x;R(Q,U,fe,null,D,V,L,ee,!0)}},me=(p,y,x,D,V)=>{if(y!==x){if(y!==ut)for(const L in y)!Yr(L)&&!(L in x)&&o(p,L,y[L],null,V,D);for(const L in x){if(Yr(L))continue;const ee=x[L],ne=y[L];ee!==ne&&L!=="value"&&o(p,L,ne,ee,V,D)}"value"in x&&o(p,"value",y.value,x.value,V)}},te=(p,y,x,D,V,L,ee,ne,Q)=>{const U=y.el=p?p.el:a(""),fe=y.anchor=p?p.anchor:a("");let{patchFlag:ie,dynamicChildren:ve,slotScopeIds:ye}=y;ye&&(ne=ne?ne.concat(ye):ye),p==null?(r(U,x,D),r(fe,x,D),Te(y.children||[],x,fe,V,L,ee,ne,Q)):ie>0&&ie&64&&ve&&p.dynamicChildren&&p.dynamicChildren.length===ve.length?(Z(p.dynamicChildren,ve,x,V,L,ee,ne),(y.key!=null||V&&y===V.subTree)&&pi(p,y,!0)):Pe(p,y,x,fe,V,L,ee,ne,Q)},Be=(p,y,x,D,V,L,ee,ne,Q)=>{y.slotScopeIds=ne,p==null?y.shapeFlag&512?V.ctx.activate(y,x,D,ee,Q):He(y,x,D,V,L,ee,Q):ze(p,y,Q)},He=(p,y,x,D,V,L,ee)=>{const ne=p.component=Xd(p,D,V);if(qs(p)&&(ne.ctx.renderer=ge),Zd(ne,!1,ee),ne.asyncDep){if(V&&V.registerDep(ne,Ee,ee),!p.el){const Q=ne.subTree=Ce(Pt);z(null,Q,y,x),p.placeholder=Q.el}}else Ee(ne,p,y,x,V,L,ee)},ze=(p,y,x)=>{const D=y.component=p.component;if(Pd(p,y,x))if(D.asyncDep&&!D.asyncResolved){be(D,y,x);return}else D.next=y,D.update();else y.el=p.el,D.vnode=y},Ee=(p,y,x,D,V,L,ee)=>{const ne=()=>{if(p.isMounted){let{next:ie,bu:ve,u:ye,parent:De,vnode:qe}=p;{const W=hc(p);if(W){ie&&(ie.el=qe.el,be(p,ie,ee)),W.asyncDep.then(()=>{$t(()=>{p.isUnmounted||U()},V)});return}}let Me=ie,tt;nr(p,!1),ie?(ie.el=qe.el,be(p,ie,ee)):ie=qe,ve&&Ts(ve),(tt=ie.props&&ie.props.onVnodeBeforeUpdate)&&ln(tt,De,ie,qe),nr(p,!0);const ft=Yi(p),F=p.subTree;p.subTree=ft,R(F,ft,f(F.el),I(F),p,V,L),ie.el=ft.el,Me===null&&Nd(p,ft.el),ye&&$t(ye,V),(tt=ie.props&&ie.props.onVnodeUpdated)&&$t(()=>ln(tt,De,ie,qe),V)}else{let ie;const{el:ve,props:ye}=y,{bm:De,m:qe,parent:Me,root:tt,type:ft}=p,F=Er(y);nr(p,!1),De&&Ts(De),!F&&(ie=ye&&ye.onVnodeBeforeMount)&&ln(ie,Me,y),nr(p,!0);{tt.ce&&tt.ce._hasShadowRoot()&&tt.ce._injectChildStyle(ft);const W=p.subTree=Yi(p);R(null,W,x,D,p,V,L),y.el=W.el}if(qe&&$t(qe,V),!F&&(ie=ye&&ye.onVnodeMounted)){const W=y;$t(()=>ln(ie,Me,W),V)}(y.shapeFlag&256||Me&&Er(Me.vnode)&&Me.vnode.shapeFlag&256)&&p.a&&$t(p.a,V),p.isMounted=!0,y=x=D=null}};p.scope.on();const Q=p.effect=new yl(ne);p.scope.off();const U=p.update=Q.run.bind(Q),fe=p.job=Q.runIfDirty.bind(Q);fe.i=p,fe.id=p.uid,Q.scheduler=()=>di(fe),nr(p,!0),U()},be=(p,y,x)=>{y.component=p;const D=p.vnode.props;p.vnode=y,p.next=null,jd(p,y.props,D,x),Fd(p,y.children,x),Cn(),Di(p),En()},Pe=(p,y,x,D,V,L,ee,ne,Q=!1)=>{const U=p&&p.children,fe=p?p.shapeFlag:0,ie=y.children,{patchFlag:ve,shapeFlag:ye}=y;if(ve>0){if(ve&128){Ze(U,ie,x,D,V,L,ee,ne,Q);return}else if(ve&256){lt(U,ie,x,D,V,L,ee,ne,Q);return}}ye&8?(fe&16&&Se(U,V,L),ie!==U&&u(x,ie)):fe&16?ye&16?Ze(U,ie,x,D,V,L,ee,ne,Q):Se(U,V,L,!0):(fe&8&&u(x,""),ye&16&&Te(ie,x,D,V,L,ee,ne,Q))},lt=(p,y,x,D,V,L,ee,ne,Q)=>{p=p||Sr,y=y||Sr;const U=p.length,fe=y.length,ie=Math.min(U,fe);let ve;for(ve=0;ve<ie;ve++){const ye=y[ve]=Q?kn(y[ve]):dn(y[ve]);R(p[ve],ye,x,null,V,L,ee,ne,Q)}U>fe?Se(p,V,L,!0,!1,ie):Te(y,x,D,V,L,ee,ne,Q,ie)},Ze=(p,y,x,D,V,L,ee,ne,Q)=>{let U=0;const fe=y.length;let ie=p.length-1,ve=fe-1;for(;U<=ie&&U<=ve;){const ye=p[U],De=y[U]=Q?kn(y[U]):dn(y[U]);if(ar(ye,De))R(ye,De,x,null,V,L,ee,ne,Q);else break;U++}for(;U<=ie&&U<=ve;){const ye=p[ie],De=y[ve]=Q?kn(y[ve]):dn(y[ve]);if(ar(ye,De))R(ye,De,x,null,V,L,ee,ne,Q);else break;ie--,ve--}if(U>ie){if(U<=ve){const ye=ve+1,De=ye<fe?y[ye].el:D;for(;U<=ve;)R(null,y[U]=Q?kn(y[U]):dn(y[U]),x,De,V,L,ee,ne,Q),U++}}else if(U>ve)for(;U<=ie;)Ke(p[U],V,L,!0),U++;else{const ye=U,De=U,qe=new Map;for(U=De;U<=ve;U++){const E=y[U]=Q?kn(y[U]):dn(y[U]);E.key!=null&&qe.set(E.key,U)}let Me,tt=0;const ft=ve-De+1;let F=!1,W=0;const J=new Array(ft);for(U=0;U<ft;U++)J[U]=0;for(U=ye;U<=ie;U++){const E=p[U];if(tt>=ft){Ke(E,V,L,!0);continue}let A;if(E.key!=null)A=qe.get(E.key);else for(Me=De;Me<=ve;Me++)if(J[Me-De]===0&&ar(E,y[Me])){A=Me;break}A===void 0?Ke(E,V,L,!0):(J[A-De]=U+1,A>=W?W=A:F=!0,R(E,y[A],x,null,V,L,ee,ne,Q),tt++)}const b=F?Wd(J):Sr;for(Me=b.length-1,U=ft-1;U>=0;U--){const E=De+U,A=y[E],re=y[E+1],ke=E+1<fe?re.el||pc(re):D;J[U]===0?R(null,A,x,ke,V,L,ee,ne,Q):F&&(Me<0||U!==b[Me]?it(A,x,ke,2):Me--)}}},it=(p,y,x,D,V=null)=>{const{el:L,type:ee,transition:ne,children:Q,shapeFlag:U}=p;if(U&6){it(p.component.subTree,y,x,D);return}if(U&128){p.suspense.move(y,x,D);return}if(U&64){ee.move(p,y,x,ge);return}if(ee===Ue){r(L,y,x);for(let ie=0;ie<Q.length;ie++)it(Q[ie],y,x,D);r(p.anchor,y,x);return}if(ee===co){H(p,y,x);return}if(D!==2&&U&1&&ne)if(D===0)ne.beforeEnter(L),r(L,y,x),$t(()=>ne.enter(L),V);else{const{leave:ie,delayLeave:ve,afterLeave:ye}=ne,De=()=>{p.ctx.isUnmounted?s(L):r(L,y,x)},qe=()=>{L._isLeaving&&L[un](!0),ie(L,()=>{De(),ye&&ye()})};ve?ve(L,De,qe):qe()}else r(L,y,x)},Ke=(p,y,x,D=!1,V=!1)=>{const{type:L,props:ee,ref:ne,children:Q,dynamicChildren:U,shapeFlag:fe,patchFlag:ie,dirs:ve,cacheIndex:ye}=p;if(ie===-2&&(V=!1),ne!=null&&(Cn(),Zr(ne,null,x,p,!0),En()),ye!=null&&(y.renderCache[ye]=void 0),fe&256){y.ctx.deactivate(p);return}const De=fe&1&&ve,qe=!Er(p);let Me;if(qe&&(Me=ee&&ee.onVnodeBeforeUnmount)&&ln(Me,y,p),fe&6)xe(p.component,x,D);else{if(fe&128){p.suspense.unmount(x,D);return}De&&tr(p,null,y,"beforeUnmount"),fe&64?p.type.remove(p,y,x,ge,D):U&&!U.hasOnce&&(L!==Ue||ie>0&&ie&64)?Se(U,y,x,!1,!0):(L===Ue&&ie&384||!V&&fe&16)&&Se(Q,y,x),D&&et(p)}(qe&&(Me=ee&&ee.onVnodeUnmounted)||De)&&$t(()=>{Me&&ln(Me,y,p),De&&tr(p,null,y,"unmounted")},x)},et=p=>{const{type:y,el:x,anchor:D,transition:V}=p;if(y===Ue){he(x,D);return}if(y===co){j(p);return}const L=()=>{s(x),V&&!V.persisted&&V.afterLeave&&V.afterLeave()};if(p.shapeFlag&1&&V&&!V.persisted){const{leave:ee,delayLeave:ne}=V,Q=()=>ee(x,L);ne?ne(p.el,L,Q):Q()}else L()},he=(p,y)=>{let x;for(;p!==y;)x=g(p),s(p),p=x;s(y)},xe=(p,y,x)=>{const{bum:D,scope:V,job:L,subTree:ee,um:ne,m:Q,a:U}=p;Xi(Q),Xi(U),D&&Ts(D),V.stop(),L&&(L.flags|=8,Ke(ee,p,y,x)),ne&&$t(ne,y),$t(()=>{p.isUnmounted=!0},y)},Se=(p,y,x,D=!1,V=!1,L=0)=>{for(let ee=L;ee<p.length;ee++)Ke(p[ee],y,x,D,V)},I=p=>{if(p.shapeFlag&6)return I(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const y=g(p.anchor||p.el),x=y&&y[Ul];return x?g(x):y};let Y=!1;const X=(p,y,x)=>{let D;p==null?y._vnode&&(Ke(y._vnode,null,null,!0),D=y._vnode.component):R(y._vnode||null,p,y,null,null,null,x),y._vnode=p,Y||(Y=!0,Di(D),Dl(),Y=!1)},ge={p:R,um:Ke,m:it,r:et,mt:He,mc:Te,pc:Pe,pbc:Z,n:I,o:e};return{render:X,hydrate:void 0,createApp:Ed(X)}}function lo({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 nr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Vd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function pi(e,t,n=!1){const r=e.children,s=t.children;if(je(r)&&je(s))for(let o=0;o<r.length;o++){const i=r[o];let a=s[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[o]=kn(s[o]),a.el=i.el),!n&&a.patchFlag!==-2&&pi(i,a)),a.type===Ys&&(a.patchFlag===-1&&(a=s[o]=kn(a)),a.el=i.el),a.type===Pt&&!a.el&&(a.el=i.el)}}function Wd(e){const t=e.slice(),n=[0];let r,s,o,i,a;const l=e.length;for(r=0;r<l;r++){const d=e[r];if(d!==0){if(s=n[n.length-1],e[s]<d){t[r]=s,n.push(r);continue}for(o=0,i=n.length-1;o<i;)a=o+i>>1,e[n[a]]<d?o=a+1:i=a;d<e[n[o]]&&(o>0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function hc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:hc(t)}function Xi(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function pc(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?pc(t.subTree):null}const mc=e=>e.__isSuspense;function qd(e,t){t&&t.pendingBranch?je(e)?t.effects.push(...e):t.effects.push(e):Qu(e)}const Ue=Symbol.for("v-fgt"),Ys=Symbol.for("v-txt"),Pt=Symbol.for("v-cmt"),co=Symbol.for("v-stc"),ts=[];let qt=null;function w(e=!1){ts.push(qt=e?null:[])}function Kd(){ts.pop(),qt=ts[ts.length-1]||null}let as=1;function Ns(e,t=!1){as+=e,e<0&&qt&&t&&(qt.hasOnce=!0)}function gc(e){return e.dynamicChildren=as>0?qt||Sr:null,Kd(),as>0&&qt&&qt.push(e),e}function S(e,t,n,r,s,o){return gc(m(e,t,n,r,s,o,!0))}function pt(e,t,n,r,s){return gc(Ce(e,t,n,r,s,!0))}function ls(e){return e?e.__v_isVNode===!0:!1}function ar(e,t){return e.type===t.type&&e.key===t.key}const vc=({key:e})=>e??null,Cs=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?wt(e)||Ot(e)||Ve(e)?{i:Et,r:e,k:t,f:!!n}:e:null);function m(e,t=null,n=null,r=0,s=null,o=e===Ue?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&vc(t),ref:t&&Cs(t),scopeId:Bl,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:o,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Et};return a?(mi(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=wt(n)?8:16),as>0&&!i&&qt&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&qt.push(l),l}const Ce=Gd;function Gd(e,t=null,n=null,r=0,s=null,o=!1){if((!e||e===Xl)&&(e=Pt),ls(e)){const a=Un(e,t,!0);return n&&mi(a,n),as>0&&!o&&qt&&(a.shapeFlag&6?qt[qt.indexOf(e)]=a:qt.push(a)),a.patchFlag=-2,a}if(rf(e)&&(e=e.__vccOpts),t){t=zd(t);let{class:a,style:l}=t;a&&!wt(a)&&(t.class=dt(a)),ot(l)&&(ui(l)&&!je(l)&&(l=St({},l)),t.style=fr(l))}const i=wt(e)?1:mc(e)?128:Vl(e)?64:ot(e)?4:Ve(e)?2:0;return m(e,t,n,r,s,i,o,!0)}function zd(e){return e?ui(e)||ac(e)?St({},e):e:null}function Un(e,t,n=!1,r=!1){const{props:s,ref:o,patchFlag:i,children:a,transition:l}=e,d=t?yc(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&vc(d),ref:t&&t.ref?n&&o?je(o)?o.concat(Cs(t)):[o,Cs(t)]:Cs(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ue?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Un(e.ssContent),ssFallback:e.ssFallback&&Un(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&is(u,l.clone(u)),u}function Yd(e=" ",t=0){return Ce(Ys,null,e,t)}function ce(e="",t=!1){return t?(w(),pt(Pt,null,e)):Ce(Pt,null,e)}function dn(e){return e==null||typeof e=="boolean"?Ce(Pt):je(e)?Ce(Ue,null,e.slice()):ls(e)?kn(e):Ce(Ys,null,String(e))}function kn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Un(e)}function mi(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(je(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),mi(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!ac(t)?t._ctx=Et:s===3&&Et&&(Et.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ve(t)?(t={default:t,_ctx:Et},n=32):(t=String(t),r&64?(n=16,t=[Yd(t)]):n=8);e.children=t,e.shapeFlag|=n}function yc(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const s in r)if(s==="class")t.class!==r.class&&(t.class=dt([t.class,r.class]));else if(s==="style")t.style=fr([t.style,r.style]);else if(Ls(s)){const o=t[s],i=r[s];i&&o!==i&&!(je(o)&&o.includes(i))&&(t[s]=o?[].concat(o,i):i)}else s!==""&&(t[s]=r[s])}return t}function ln(e,t,n,r=null){sn(e,t,7,[n,r])}const Jd=nc();let Qd=0;function Xd(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||Jd,o={uid:Qd++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new _u(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:cc(r,s),emitsOptions:rc(r,s),emit:null,emitted:null,propsDefaults:ut,inheritAttrs:r.inheritAttrs,ctx:ut,data:ut,props:ut,attrs:ut,slots:ut,refs:ut,setupState:ut,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 o.ctx={_:o},o.root=t?t.root:o,o.emit=Id.bind(null,o),e.ce&&e.ce(o),o}let Nt=null;const gi=()=>Nt||Et;let Os,Ho;{const e=Hs(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),o=>{s.length>1?s.forEach(i=>i(o)):s[0](o)}};Os=t("__VUE_INSTANCE_SETTERS__",n=>Nt=n),Ho=t("__VUE_SSR_SETTERS__",n=>cs=n)}const ps=e=>{const t=Nt;return Os(e),e.scope.on(),()=>{e.scope.off(),Os(t)}},Zi=()=>{Nt&&Nt.scope.off(),Os(null)};function wc(e){return e.vnode.shapeFlag&4}let cs=!1;function Zd(e,t=!1,n=!1){t&&Ho(t);const{props:r,children:s}=e.vnode,o=wc(e);Od(e,r,o,t),Bd(e,s,n||t);const i=o?ef(e,t):void 0;return t&&Ho(!1),i}function ef(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,yd);const{setup:r}=n;if(r){Cn();const s=e.setupContext=r.length>1?_c(e):null,o=ps(e),i=hs(r,e,0,[e.props,s]),a=dl(i);if(En(),o(),(a||e.sp)&&!Er(e)&&Jl(e),a){if(i.then(Zi,Zi),t)return i.then(l=>{ea(e,l)}).catch(l=>{Ws(l,e,0)});e.asyncDep=i}else ea(e,i)}else bc(e)}function ea(e,t,n){Ve(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ot(t)&&(e.setupState=Nl(t)),bc(e)}function bc(e,t,n){const r=e.type;e.render||(e.render=r.render||hn);{const s=ps(e);Cn();try{_d(e)}finally{En(),s()}}}const tf={get(e,t){return Mt(e,"get",""),e[t]}};function _c(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,tf),slots:e.slots,emit:e.emit,expose:t}}function Js(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Nl(Hu(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in es)return es[n](e)},has(t,n){return n in t||n in es}})):e.proxy}function nf(e,t=!0){return Ve(e)?e.displayName||e.name:e.name||t&&e.__name}function rf(e){return Ve(e)&&"__vccOpts"in e}const le=(e,t)=>Ku(e,t,cs);function vi(e,t,n){try{Ns(-1);const r=arguments.length;return r===2?ot(t)&&!je(t)?ls(t)?Ce(e,null,[t]):Ce(e,t):Ce(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&ls(n)&&(n=[n]),Ce(e,t,n))}finally{Ns(1)}}const sf="3.5.28";/**
14
- * @vue/runtime-dom v3.5.28
15
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
16
- * @license MIT
17
- **/let Uo;const ta=typeof window<"u"&&window.trustedTypes;if(ta)try{Uo=ta.createPolicy("vue",{createHTML:e=>e})}catch{}const kc=Uo?e=>Uo.createHTML(e):e=>e,of="http://www.w3.org/2000/svg",af="http://www.w3.org/1998/Math/MathML",_n=typeof document<"u"?document:null,na=_n&&_n.createElement("template"),lf={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?_n.createElementNS(of,e):t==="mathml"?_n.createElementNS(af,e):n?_n.createElement(e,{is:n}):_n.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>_n.createTextNode(e),createComment:e=>_n.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>_n.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,o){const i=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{na.innerHTML=kc(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=na.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Nn="transition",Vr="animation",us=Symbol("_vtc"),Tc={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},cf=St({},ql,Tc),uf=e=>(e.displayName="Transition",e.props=cf,e),Sc=uf((e,{slots:t})=>vi(sd,df(e),t)),rr=(e,t=[])=>{je(e)?e.forEach(n=>n(...t)):e&&e(...t)},ra=e=>e?je(e)?e.some(t=>t.length>1):e.length>1:!1;function df(e){const t={};for(const te in e)te in Tc||(t[te]=e[te]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:d=i,appearToClass:u=a,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:g=`${n}-leave-active`,leaveToClass:_=`${n}-leave-to`}=e,P=ff(s),R=P&&P[0],B=P&&P[1],{onBeforeEnter:z,onEnter:N,onEnterCancelled:H,onLeave:j,onLeaveCancelled:ae,onBeforeAppear:ue=z,onAppear:de=N,onAppearCancelled:Te=H}=t,se=(te,Be,He,ze)=>{te._enterCancelled=ze,sr(te,Be?u:a),sr(te,Be?d:i),He&&He()},Z=(te,Be)=>{te._isLeaving=!1,sr(te,f),sr(te,_),sr(te,g),Be&&Be()},me=te=>(Be,He)=>{const ze=te?de:N,Ee=()=>se(Be,te,He);rr(ze,[Be,Ee]),sa(()=>{sr(Be,te?l:o),wn(Be,te?u:a),ra(ze)||oa(Be,r,R,Ee)})};return St(t,{onBeforeEnter(te){rr(z,[te]),wn(te,o),wn(te,i)},onBeforeAppear(te){rr(ue,[te]),wn(te,l),wn(te,d)},onEnter:me(!1),onAppear:me(!0),onLeave(te,Be){te._isLeaving=!0;const He=()=>Z(te,Be);wn(te,f),te._enterCancelled?(wn(te,g),la(te)):(la(te),wn(te,g)),sa(()=>{te._isLeaving&&(sr(te,f),wn(te,_),ra(j)||oa(te,r,B,He))}),rr(j,[te,He])},onEnterCancelled(te){se(te,!1,void 0,!0),rr(H,[te])},onAppearCancelled(te){se(te,!0,void 0,!0),rr(Te,[te])},onLeaveCancelled(te){Z(te),rr(ae,[te])}})}function ff(e){if(e==null)return null;if(ot(e))return[uo(e.enter),uo(e.leave)];{const t=uo(e);return[t,t]}}function uo(e){return hu(e)}function wn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[us]||(e[us]=new Set)).add(t)}function sr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[us];n&&(n.delete(t),n.size||(e[us]=void 0))}function sa(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let hf=0;function oa(e,t,n,r){const s=e._endId=++hf,o=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(o,n);const{type:i,timeout:a,propCount:l}=pf(e,t);if(!i)return r();const d=i+"end";let u=0;const f=()=>{e.removeEventListener(d,g),o()},g=_=>{_.target===e&&++u>=l&&f()};setTimeout(()=>{u<l&&f()},a+1),e.addEventListener(d,g)}function pf(e,t){const n=window.getComputedStyle(e),r=P=>(n[P]||"").split(", "),s=r(`${Nn}Delay`),o=r(`${Nn}Duration`),i=ia(s,o),a=r(`${Vr}Delay`),l=r(`${Vr}Duration`),d=ia(a,l);let u=null,f=0,g=0;t===Nn?i>0&&(u=Nn,f=i,g=o.length):t===Vr?d>0&&(u=Vr,f=d,g=l.length):(f=Math.max(i,d),u=f>0?i>d?Nn:Vr:null,g=u?u===Nn?o.length:l.length:0);const _=u===Nn&&/\b(?:transform|all)(?:,|$)/.test(r(`${Nn}Property`).toString());return{type:u,timeout:f,propCount:g,hasTransform:_}}function ia(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>aa(n)+aa(e[r])))}function aa(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function la(e){return(e?e.ownerDocument:document).body.offsetHeight}function mf(e,t,n){const r=e[us];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const ca=Symbol("_vod"),gf=Symbol("_vsh"),vf=Symbol(""),yf=/(?:^|;)\s*display\s*:/;function wf(e,t,n){const r=e.style,s=wt(n);let o=!1;if(n&&!s){if(t)if(wt(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&Es(r,a,"")}else for(const i in t)n[i]==null&&Es(r,i,"");for(const i in n)i==="display"&&(o=!0),Es(r,i,n[i])}else if(s){if(t!==n){const i=r[vf];i&&(n+=";"+i),r.cssText=n,o=yf.test(n)}}else t&&e.removeAttribute("style");ca in e&&(e[ca]=o?r.display:"",e[gf]&&(r.display="none"))}const ua=/\s*!important$/;function Es(e,t,n){if(je(n))n.forEach(r=>Es(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=bf(e,t);ua.test(n)?e.setProperty(Vn(r),n.replace(ua,""),"important"):e[r]=n}}const da=["Webkit","Moz","ms"],fo={};function bf(e,t){const n=fo[t];if(n)return n;let r=Jt(t);if(r!=="filter"&&r in e)return fo[t]=r;r=Fs(r);for(let s=0;s<da.length;s++){const o=da[s]+r;if(o in e)return fo[t]=o}return t}const fa="http://www.w3.org/1999/xlink";function ha(e,t,n,r,s,o=wu(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(fa,t.slice(6,t.length)):e.setAttributeNS(fa,t,n):n==null||o&&!ml(n)?e.removeAttribute(t):e.setAttribute(t,o?"":nn(n)?String(n):n)}function pa(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?kc(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const a=o==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=ml(n):n==null&&a==="string"?(n="",i=!0):a==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(s||t)}function kr(e,t,n,r){e.addEventListener(t,n,r)}function _f(e,t,n,r){e.removeEventListener(t,n,r)}const ma=Symbol("_vei");function kf(e,t,n,r,s=null){const o=e[ma]||(e[ma]={}),i=o[t];if(r&&i)i.value=r;else{const[a,l]=Tf(t);if(r){const d=o[t]=Cf(r,s);kr(e,a,d,l)}else i&&(_f(e,a,i,l),o[t]=void 0)}}const ga=/(?:Once|Passive|Capture)$/;function Tf(e){let t;if(ga.test(e)){t={};let r;for(;r=e.match(ga);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Vn(e.slice(2)),t]}let ho=0;const Sf=Promise.resolve(),xf=()=>ho||(Sf.then(()=>ho=0),ho=Date.now());function Cf(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;sn(Ef(r,n.value),t,5,[r])};return n.value=e,n.attached=xf(),n}function Ef(e,t){if(je(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const va=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Af=(e,t,n,r,s,o)=>{const i=s==="svg";t==="class"?mf(e,r,i):t==="style"?wf(e,n,r):Ls(t)?Zo(t)||kf(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):If(e,t,r,i))?(pa(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ha(e,t,r,i,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!wt(r))?pa(e,Jt(t),r,o,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),ha(e,t,r,i))};function If(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&va(t)&&Ve(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 s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return va(t)&&wt(n)?!1:t in e}const ya=e=>{const t=e.props["onUpdate:modelValue"]||!1;return je(t)?n=>Ts(t,n):t};function Rf(e){e.target.composing=!0}function wa(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const po=Symbol("_assign");function ba(e,t,n){return t&&(e=e.trim()),n&&(e=ni(e)),e}const Rn={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[po]=ya(s);const o=r||s.props&&s.props.type==="number";kr(e,t?"change":"input",i=>{i.target.composing||e[po](ba(e.value,n,o))}),(n||o)&&kr(e,"change",()=>{e.value=ba(e.value,n,o)}),t||(kr(e,"compositionstart",Rf),kr(e,"compositionend",wa),kr(e,"change",wa))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:o}},i){if(e[po]=ya(i),e.composing)return;const a=(o||e.type==="number")&&!/^0\d/.test(e.value)?ni(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===l)||(e.value=l))}},$f=["ctrl","shift","alt","meta"],Mf={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)=>$f.some(n=>e[`${n}Key`]&&!t.includes(n))},Ge=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=((s,...o)=>{for(let i=0;i<t.length;i++){const a=Mf[t[i]];if(a&&a(s,t))return}return e(s,...o)}))},Pf={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Ft=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=(s=>{if(!("key"in s))return;const o=Vn(s.key);if(t.some(i=>i===o||Pf[i]===o))return e(s)}))},Nf=St({patchProp:Af},lf);let _a;function Of(){return _a||(_a=Hd(Nf))}const jf=((...e)=>{const t=Of().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=Lf(r);if(!s)return;const o=t._component;!Ve(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const i=n(s,!1,Df(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),i},t});function Df(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Lf(e){return wt(e)?document.querySelector(e):e}/*!
18
- * vue-router v4.6.4
19
- * (c) 2025 Eduardo San Martin Morote
20
- * @license MIT
21
- */const Tr=typeof document<"u";function xc(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Bf(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&xc(e.default)}const rt=Object.assign;function mo(e,t){const n={};for(const r in t){const s=t[r];n[r]=on(s)?s.map(e):e(s)}return n}const ns=()=>{},on=Array.isArray;function ka(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}const Cc=/#/g,Ff=/&/g,Hf=/\//g,Uf=/=/g,Vf=/\?/g,Ec=/\+/g,Wf=/%5B/g,qf=/%5D/g,Ac=/%5E/g,Kf=/%60/g,Ic=/%7B/g,Gf=/%7C/g,Rc=/%7D/g,zf=/%20/g;function yi(e){return e==null?"":encodeURI(""+e).replace(Gf,"|").replace(Wf,"[").replace(qf,"]")}function Yf(e){return yi(e).replace(Ic,"{").replace(Rc,"}").replace(Ac,"^")}function Vo(e){return yi(e).replace(Ec,"%2B").replace(zf,"+").replace(Cc,"%23").replace(Ff,"%26").replace(Kf,"`").replace(Ic,"{").replace(Rc,"}").replace(Ac,"^")}function Jf(e){return Vo(e).replace(Uf,"%3D")}function Qf(e){return yi(e).replace(Cc,"%23").replace(Vf,"%3F")}function Xf(e){return Qf(e).replace(Hf,"%2F")}function ds(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Zf=/\/$/,eh=e=>e.replace(Zf,"");function go(e,t,n="/"){let r,s={},o="",i="";const a=t.indexOf("#");let l=t.indexOf("?");return l=a>=0&&l>a?-1:l,l>=0&&(r=t.slice(0,l),o=t.slice(l,a>0?a:t.length),s=e(o.slice(1))),a>=0&&(r=r||t.slice(0,a),i=t.slice(a,t.length)),r=sh(r??t,n),{fullPath:r+o+i,path:r,query:s,hash:ds(i)}}function th(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Ta(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function nh(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&Rr(t.matched[r],n.matched[s])&&$c(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Rr(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function $c(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!rh(e[n],t[n]))return!1;return!0}function rh(e,t){return on(e)?Sa(e,t):on(t)?Sa(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function Sa(e,t){return on(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function sh(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let o=n.length-1,i,a;for(i=0;i<r.length;i++)if(a=r[i],a!==".")if(a==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(i).join("/")}const On={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Wo=(function(e){return e.pop="pop",e.push="push",e})({}),vo=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function oh(e){if(!e)if(Tr){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),eh(e)}const ih=/^[^#]+#/;function ah(e,t){return e.replace(ih,"#")+t}function lh(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Qs=()=>({left:window.scrollX,top:window.scrollY});function ch(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=lh(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function xa(e,t){return(history.state?history.state.position-t:-1)+e}const qo=new Map;function uh(e,t){qo.set(e,t)}function dh(e){const t=qo.get(e);return qo.delete(e),t}function fh(e){return typeof e=="string"||e&&typeof e=="object"}function Mc(e){return typeof e=="string"||typeof e=="symbol"}let bt=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const Pc=Symbol("");bt.MATCHER_NOT_FOUND+"",bt.NAVIGATION_GUARD_REDIRECT+"",bt.NAVIGATION_ABORTED+"",bt.NAVIGATION_CANCELLED+"",bt.NAVIGATION_DUPLICATED+"";function $r(e,t){return rt(new Error,{type:e,[Pc]:!0},t)}function bn(e,t){return e instanceof Error&&Pc in e&&(t==null||!!(e.type&t))}const hh=["params","query","hash"];function ph(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of hh)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function mh(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<n.length;++r){const s=n[r].replace(Ec," "),o=s.indexOf("="),i=ds(o<0?s:s.slice(0,o)),a=o<0?null:ds(s.slice(o+1));if(i in t){let l=t[i];on(l)||(l=t[i]=[l]),l.push(a)}else t[i]=a}return t}function Ca(e){let t="";for(let n in e){const r=e[n];if(n=Jf(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(on(r)?r.map(s=>s&&Vo(s)):[r&&Vo(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function gh(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=on(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const vh=Symbol(""),Ea=Symbol(""),Xs=Symbol(""),wi=Symbol(""),Ko=Symbol("");function Wr(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Bn(e,t,n,r,s,o=i=>i()){const i=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const d=g=>{g===!1?l($r(bt.NAVIGATION_ABORTED,{from:n,to:t})):g instanceof Error?l(g):fh(g)?l($r(bt.NAVIGATION_GUARD_REDIRECT,{from:t,to:g})):(i&&r.enterCallbacks[s]===i&&typeof g=="function"&&i.push(g),a())},u=o(()=>e.call(r&&r.instances[s],t,n,d));let f=Promise.resolve(u);e.length<3&&(f=f.then(d)),f.catch(g=>l(g))})}function yo(e,t,n,r,s=o=>o()){const o=[];for(const i of e)for(const a in i.components){let l=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(xc(l)){const d=(l.__vccOpts||l)[t];d&&o.push(Bn(d,n,r,i,a,s))}else{let d=l();o.push(()=>d.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${i.path}"`);const f=Bf(u)?u.default:u;i.mods[a]=u,i.components[a]=f;const g=(f.__vccOpts||f)[t];return g&&Bn(g,n,r,i,a,s)()}))}}return o}function yh(e,t){const n=[],r=[],s=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;i<o;i++){const a=t.matched[i];a&&(e.matched.find(d=>Rr(d,a))?r.push(a):n.push(a));const l=e.matched[i];l&&(t.matched.find(d=>Rr(d,l))||s.push(l))}return[n,r,s]}/*!
22
- * vue-router v4.6.4
23
- * (c) 2025 Eduardo San Martin Morote
24
- * @license MIT
25
- */let wh=()=>location.protocol+"//"+location.host;function Nc(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let i=s.includes(e.slice(o))?e.slice(o).length:1,a=s.slice(i);return a[0]!=="/"&&(a="/"+a),Ta(a,"")}return Ta(n,e)+r+s}function bh(e,t,n,r){let s=[],o=[],i=null;const a=({state:g})=>{const _=Nc(e,location),P=n.value,R=t.value;let B=0;if(g){if(n.value=_,t.value=g,i&&i===P){i=null;return}B=R?g.position-R.position:0}else r(_);s.forEach(z=>{z(n.value,P,{delta:B,type:Wo.pop,direction:B?B>0?vo.forward:vo.back:vo.unknown})})};function l(){i=n.value}function d(g){s.push(g);const _=()=>{const P=s.indexOf(g);P>-1&&s.splice(P,1)};return o.push(_),_}function u(){if(document.visibilityState==="hidden"){const{history:g}=window;if(!g.state)return;g.replaceState(rt({},g.state,{scroll:Qs()}),"")}}function f(){for(const g of o)g();o=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:l,listen:d,destroy:f}}function Aa(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Qs():null}}function _h(e){const{history:t,location:n}=window,r={value:Nc(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,d,u){const f=e.indexOf("#"),g=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:wh()+e+l;try{t[u?"replaceState":"pushState"](d,"",g),s.value=d}catch(_){console.error(_),n[u?"replace":"assign"](g)}}function i(l,d){o(l,rt({},t.state,Aa(s.value.back,l,s.value.forward,!0),d,{position:s.value.position}),!0),r.value=l}function a(l,d){const u=rt({},s.value,t.state,{forward:l,scroll:Qs()});o(u.current,u,!0),o(l,rt({},Aa(r.value,l,null),{position:u.position+1},d),!1),r.value=l}return{location:r,state:s,push:a,replace:i}}function kh(e){e=oh(e);const t=_h(e),n=bh(e,t.state,t.location,t.replace);function r(o,i=!0){i||n.pauseListeners(),history.go(o)}const s=rt({location:"",base:e,go:r,createHref:ah.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function Th(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),kh(e)}let cr=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Tt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Tt||{});const Sh={type:cr.Static,value:""},xh=/[a-zA-Z0-9_]/;function Ch(e){if(!e)return[[]];if(e==="/")return[[Sh]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(_){throw new Error(`ERR (${n})/"${d}": ${_}`)}let n=Tt.Static,r=n;const s=[];let o;function i(){o&&s.push(o),o=[]}let a=0,l,d="",u="";function f(){d&&(n===Tt.Static?o.push({type:cr.Static,value:d}):n===Tt.Param||n===Tt.ParamRegExp||n===Tt.ParamRegExpEnd?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),o.push({type:cr.Param,value:d,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),d="")}function g(){d+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==Tt.ParamRegExp){r=n,n=Tt.EscapeNext;continue}switch(n){case Tt.Static:l==="/"?(d&&f(),i()):l===":"?(f(),n=Tt.Param):g();break;case Tt.EscapeNext:g(),n=r;break;case Tt.Param:l==="("?n=Tt.ParamRegExp:xh.test(l)?g():(f(),n=Tt.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case Tt.ParamRegExp:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=Tt.ParamRegExpEnd:u+=l;break;case Tt.ParamRegExpEnd:f(),n=Tt.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:t("Unknown state");break}}return n===Tt.ParamRegExp&&t(`Unfinished custom RegExp for param "${d}"`),f(),i(),s}const Ia="[^/]+?",Eh={sensitive:!1,strict:!1,start:!0,end:!0};var Lt=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(Lt||{});const Ah=/[.+*?^${}()[\]/\\]/g;function Ih(e,t){const n=rt({},Eh,t),r=[];let s=n.start?"^":"";const o=[];for(const d of e){const u=d.length?[]:[Lt.Root];n.strict&&!d.length&&(s+="/");for(let f=0;f<d.length;f++){const g=d[f];let _=Lt.Segment+(n.sensitive?Lt.BonusCaseSensitive:0);if(g.type===cr.Static)f||(s+="/"),s+=g.value.replace(Ah,"\\$&"),_+=Lt.Static;else if(g.type===cr.Param){const{value:P,repeatable:R,optional:B,regexp:z}=g;o.push({name:P,repeatable:R,optional:B});const N=z||Ia;if(N!==Ia){_+=Lt.BonusCustomRegExp;try{`${N}`}catch(j){throw new Error(`Invalid custom RegExp for param "${P}" (${N}): `+j.message)}}let H=R?`((?:${N})(?:/(?:${N}))*)`:`(${N})`;f||(H=B&&d.length<2?`(?:/${H})`:"/"+H),B&&(H+="?"),s+=H,_+=Lt.Dynamic,B&&(_+=Lt.BonusOptional),R&&(_+=Lt.BonusRepeatable),N===".*"&&(_+=Lt.BonusWildcard)}u.push(_)}r.push(u)}if(n.strict&&n.end){const d=r.length-1;r[d][r[d].length-1]+=Lt.BonusStrict}n.strict||(s+="/?"),n.end?s+="$":n.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const i=new RegExp(s,n.sensitive?"":"i");function a(d){const u=d.match(i),f={};if(!u)return null;for(let g=1;g<u.length;g++){const _=u[g]||"",P=o[g-1];f[P.name]=_&&P.repeatable?_.split("/"):_}return f}function l(d){let u="",f=!1;for(const g of e){(!f||!u.endsWith("/"))&&(u+="/"),f=!1;for(const _ of g)if(_.type===cr.Static)u+=_.value;else if(_.type===cr.Param){const{value:P,repeatable:R,optional:B}=_,z=P in d?d[P]:"";if(on(z)&&!R)throw new Error(`Provided param "${P}" is an array but it is not repeatable (* or + modifiers)`);const N=on(z)?z.join("/"):z;if(!N)if(B)g.length<2&&(u.endsWith("/")?u=u.slice(0,-1):f=!0);else throw new Error(`Missing required param "${P}"`);u+=N}}return u||"/"}return{re:i,score:r,keys:o,parse:a,stringify:l}}function Rh(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===Lt.Static+Lt.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===Lt.Static+Lt.Segment?1:-1:0}function Oc(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const o=Rh(r[n],s[n]);if(o)return o;n++}if(Math.abs(s.length-r.length)===1){if(Ra(r))return 1;if(Ra(s))return-1}return s.length-r.length}function Ra(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const $h={strict:!1,end:!0,sensitive:!1};function Mh(e,t,n){const r=Ih(Ch(e.path),n),s=rt(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function Ph(e,t){const n=[],r=new Map;t=ka($h,t);function s(f){return r.get(f)}function o(f,g,_){const P=!_,R=Ma(f);R.aliasOf=_&&_.record;const B=ka(t,f),z=[R];if("alias"in f){const j=typeof f.alias=="string"?[f.alias]:f.alias;for(const ae of j)z.push(Ma(rt({},R,{components:_?_.record.components:R.components,path:ae,aliasOf:_?_.record:R})))}let N,H;for(const j of z){const{path:ae}=j;if(g&&ae[0]!=="/"){const ue=g.record.path,de=ue[ue.length-1]==="/"?"":"/";j.path=g.record.path+(ae&&de+ae)}if(N=Mh(j,g,B),_?_.alias.push(N):(H=H||N,H!==N&&H.alias.push(N),P&&f.name&&!Pa(N)&&i(f.name)),jc(N)&&l(N),R.children){const ue=R.children;for(let de=0;de<ue.length;de++)o(ue[de],N,_&&_.children[de])}_=_||N}return H?()=>{i(H)}:ns}function i(f){if(Mc(f)){const g=r.get(f);g&&(r.delete(f),n.splice(n.indexOf(g),1),g.children.forEach(i),g.alias.forEach(i))}else{const g=n.indexOf(f);g>-1&&(n.splice(g,1),f.record.name&&r.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function a(){return n}function l(f){const g=jh(f,n);n.splice(g,0,f),f.record.name&&!Pa(f)&&r.set(f.record.name,f)}function d(f,g){let _,P={},R,B;if("name"in f&&f.name){if(_=r.get(f.name),!_)throw $r(bt.MATCHER_NOT_FOUND,{location:f});B=_.record.name,P=rt($a(g.params,_.keys.filter(H=>!H.optional).concat(_.parent?_.parent.keys.filter(H=>H.optional):[]).map(H=>H.name)),f.params&&$a(f.params,_.keys.map(H=>H.name))),R=_.stringify(P)}else if(f.path!=null)R=f.path,_=n.find(H=>H.re.test(R)),_&&(P=_.parse(R),B=_.record.name);else{if(_=g.name?r.get(g.name):n.find(H=>H.re.test(g.path)),!_)throw $r(bt.MATCHER_NOT_FOUND,{location:f,currentLocation:g});B=_.record.name,P=rt({},g.params,f.params),R=_.stringify(P)}const z=[];let N=_;for(;N;)z.unshift(N.record),N=N.parent;return{name:B,path:R,params:P,matched:z,meta:Oh(z)}}e.forEach(f=>o(f));function u(){n.length=0,r.clear()}return{addRoute:o,resolve:d,removeRoute:i,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function $a(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Ma(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Nh(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Nh(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function Pa(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Oh(e){return e.reduce((t,n)=>rt(t,n.meta),{})}function jh(e,t){let n=0,r=t.length;for(;n!==r;){const o=n+r>>1;Oc(e,t[o])<0?r=o:n=o+1}const s=Dh(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function Dh(e){let t=e;for(;t=t.parent;)if(jc(t)&&Oc(e,t)===0)return t}function jc({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Na(e){const t=tn(Xs),n=tn(wi),r=le(()=>{const l=Oe(e.to);return t.resolve(l)}),s=le(()=>{const{matched:l}=r.value,{length:d}=l,u=l[d-1],f=n.matched;if(!u||!f.length)return-1;const g=f.findIndex(Rr.bind(null,u));if(g>-1)return g;const _=Oa(l[d-2]);return d>1&&Oa(u)===_&&f[f.length-1].path!==_?f.findIndex(Rr.bind(null,l[d-2])):g}),o=le(()=>s.value>-1&&Uh(n.params,r.value.params)),i=le(()=>s.value>-1&&s.value===n.matched.length-1&&$c(n.params,r.value.params));function a(l={}){if(Hh(l)){const d=t[Oe(e.replace)?"replace":"push"](Oe(e.to)).catch(ns);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:r,href:le(()=>r.value.href),isActive:o,isExactActive:i,navigate:a}}function Lh(e){return e.length===1?e[0]:e}const Bh=At({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Na,setup(e,{slots:t}){const n=Vs(Na(e)),{options:r}=tn(Xs),s=le(()=>({[ja(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[ja(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&Lh(t.default(n));return e.custom?o:vi("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),Fh=Bh;function Hh(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Uh(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!on(s)||s.length!==r.length||r.some((o,i)=>o.valueOf()!==s[i].valueOf()))return!1}return!0}function Oa(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ja=(e,t,n)=>e??t??n,Vh=At({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=tn(Ko),s=le(()=>e.route||r.value),o=tn(Ea,0),i=le(()=>{let d=Oe(o);const{matched:u}=s.value;let f;for(;(f=u[d])&&!f.components;)d++;return d}),a=le(()=>s.value.matched[i.value]);Ss(Ea,le(()=>i.value+1)),Ss(vh,a),Ss(Ko,s);const l=O();return gt(()=>[l.value,a.value,e.name],([d,u,f],[g,_,P])=>{u&&(u.instances[f]=d,_&&_!==u&&d&&d===g&&(u.leaveGuards.size||(u.leaveGuards=_.leaveGuards),u.updateGuards.size||(u.updateGuards=_.updateGuards))),d&&u&&(!_||!Rr(u,_)||!g)&&(u.enterCallbacks[f]||[]).forEach(R=>R(d))},{flush:"post"}),()=>{const d=s.value,u=e.name,f=a.value,g=f&&f.components[u];if(!g)return Da(n.default,{Component:g,route:d});const _=f.props[u],P=_?_===!0?d.params:typeof _=="function"?_(d):_:null,B=vi(g,rt({},P,t,{onVnodeUnmounted:z=>{z.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return Da(n.default,{Component:B,route:d})||B}}});function Da(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Wh=Vh;function qh(e){const t=Ph(e.routes,e),n=e.parseQuery||mh,r=e.stringifyQuery||Ca,s=e.history,o=Wr(),i=Wr(),a=Wr(),l=Uu(On);let d=On;Tr&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=mo.bind(null,I=>""+I),f=mo.bind(null,Xf),g=mo.bind(null,ds);function _(I,Y){let X,ge;return Mc(I)?(X=t.getRecordMatcher(I),ge=Y):ge=I,t.addRoute(ge,X)}function P(I){const Y=t.getRecordMatcher(I);Y&&t.removeRoute(Y)}function R(){return t.getRoutes().map(I=>I.record)}function B(I){return!!t.getRecordMatcher(I)}function z(I,Y){if(Y=rt({},Y||l.value),typeof I=="string"){const x=go(n,I,Y.path),D=t.resolve({path:x.path},Y),V=s.createHref(x.fullPath);return rt(x,D,{params:g(D.params),hash:ds(x.hash),redirectedFrom:void 0,href:V})}let X;if(I.path!=null)X=rt({},I,{path:go(n,I.path,Y.path).path});else{const x=rt({},I.params);for(const D in x)x[D]==null&&delete x[D];X=rt({},I,{params:f(x)}),Y.params=f(Y.params)}const ge=t.resolve(X,Y),$e=I.hash||"";ge.params=u(g(ge.params));const p=th(r,rt({},I,{hash:Yf($e),path:ge.path})),y=s.createHref(p);return rt({fullPath:p,hash:$e,query:r===Ca?gh(I.query):I.query||{}},ge,{redirectedFrom:void 0,href:y})}function N(I){return typeof I=="string"?go(n,I,l.value.path):rt({},I)}function H(I,Y){if(d!==I)return $r(bt.NAVIGATION_CANCELLED,{from:Y,to:I})}function j(I){return de(I)}function ae(I){return j(rt(N(I),{replace:!0}))}function ue(I,Y){const X=I.matched[I.matched.length-1];if(X&&X.redirect){const{redirect:ge}=X;let $e=typeof ge=="function"?ge(I,Y):ge;return typeof $e=="string"&&($e=$e.includes("?")||$e.includes("#")?$e=N($e):{path:$e},$e.params={}),rt({query:I.query,hash:I.hash,params:$e.path!=null?{}:I.params},$e)}}function de(I,Y){const X=d=z(I),ge=l.value,$e=I.state,p=I.force,y=I.replace===!0,x=ue(X,ge);if(x)return de(rt(N(x),{state:typeof x=="object"?rt({},$e,x.state):$e,force:p,replace:y}),Y||X);const D=X;D.redirectedFrom=Y;let V;return!p&&nh(r,ge,X)&&(V=$r(bt.NAVIGATION_DUPLICATED,{to:D,from:ge}),it(ge,ge,!0,!1)),(V?Promise.resolve(V):Z(D,ge)).catch(L=>bn(L)?bn(L,bt.NAVIGATION_GUARD_REDIRECT)?L:Ze(L):Pe(L,D,ge)).then(L=>{if(L){if(bn(L,bt.NAVIGATION_GUARD_REDIRECT))return de(rt({replace:y},N(L.to),{state:typeof L.to=="object"?rt({},$e,L.to.state):$e,force:p}),Y||D)}else L=te(D,ge,!0,y,$e);return me(D,ge,L),L})}function Te(I,Y){const X=H(I,Y);return X?Promise.reject(X):Promise.resolve()}function se(I){const Y=he.values().next().value;return Y&&typeof Y.runWithContext=="function"?Y.runWithContext(I):I()}function Z(I,Y){let X;const[ge,$e,p]=yh(I,Y);X=yo(ge.reverse(),"beforeRouteLeave",I,Y);for(const x of ge)x.leaveGuards.forEach(D=>{X.push(Bn(D,I,Y))});const y=Te.bind(null,I,Y);return X.push(y),Se(X).then(()=>{X=[];for(const x of o.list())X.push(Bn(x,I,Y));return X.push(y),Se(X)}).then(()=>{X=yo($e,"beforeRouteUpdate",I,Y);for(const x of $e)x.updateGuards.forEach(D=>{X.push(Bn(D,I,Y))});return X.push(y),Se(X)}).then(()=>{X=[];for(const x of p)if(x.beforeEnter)if(on(x.beforeEnter))for(const D of x.beforeEnter)X.push(Bn(D,I,Y));else X.push(Bn(x.beforeEnter,I,Y));return X.push(y),Se(X)}).then(()=>(I.matched.forEach(x=>x.enterCallbacks={}),X=yo(p,"beforeRouteEnter",I,Y,se),X.push(y),Se(X))).then(()=>{X=[];for(const x of i.list())X.push(Bn(x,I,Y));return X.push(y),Se(X)}).catch(x=>bn(x,bt.NAVIGATION_CANCELLED)?x:Promise.reject(x))}function me(I,Y,X){a.list().forEach(ge=>se(()=>ge(I,Y,X)))}function te(I,Y,X,ge,$e){const p=H(I,Y);if(p)return p;const y=Y===On,x=Tr?history.state:{};X&&(ge||y?s.replace(I.fullPath,rt({scroll:y&&x&&x.scroll},$e)):s.push(I.fullPath,$e)),l.value=I,it(I,Y,X,y),Ze()}let Be;function He(){Be||(Be=s.listen((I,Y,X)=>{if(!xe.listening)return;const ge=z(I),$e=ue(ge,xe.currentRoute.value);if($e){de(rt($e,{replace:!0,force:!0}),ge).catch(ns);return}d=ge;const p=l.value;Tr&&uh(xa(p.fullPath,X.delta),Qs()),Z(ge,p).catch(y=>bn(y,bt.NAVIGATION_ABORTED|bt.NAVIGATION_CANCELLED)?y:bn(y,bt.NAVIGATION_GUARD_REDIRECT)?(de(rt(N(y.to),{force:!0}),ge).then(x=>{bn(x,bt.NAVIGATION_ABORTED|bt.NAVIGATION_DUPLICATED)&&!X.delta&&X.type===Wo.pop&&s.go(-1,!1)}).catch(ns),Promise.reject()):(X.delta&&s.go(-X.delta,!1),Pe(y,ge,p))).then(y=>{y=y||te(ge,p,!1),y&&(X.delta&&!bn(y,bt.NAVIGATION_CANCELLED)?s.go(-X.delta,!1):X.type===Wo.pop&&bn(y,bt.NAVIGATION_ABORTED|bt.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),me(ge,p,y)}).catch(ns)}))}let ze=Wr(),Ee=Wr(),be;function Pe(I,Y,X){Ze(I);const ge=Ee.list();return ge.length?ge.forEach($e=>$e(I,Y,X)):console.error(I),Promise.reject(I)}function lt(){return be&&l.value!==On?Promise.resolve():new Promise((I,Y)=>{ze.add([I,Y])})}function Ze(I){return be||(be=!I,He(),ze.list().forEach(([Y,X])=>I?X(I):Y()),ze.reset()),I}function it(I,Y,X,ge){const{scrollBehavior:$e}=e;if(!Tr||!$e)return Promise.resolve();const p=!X&&dh(xa(I.fullPath,0))||(ge||!X)&&history.state&&history.state.scroll||null;return Kt().then(()=>$e(I,Y,p)).then(y=>y&&ch(y)).catch(y=>Pe(y,I,Y))}const Ke=I=>s.go(I);let et;const he=new Set,xe={currentRoute:l,listening:!0,addRoute:_,removeRoute:P,clearRoutes:t.clearRoutes,hasRoute:B,getRoutes:R,resolve:z,options:e,push:j,replace:ae,go:Ke,back:()=>Ke(-1),forward:()=>Ke(1),beforeEach:o.add,beforeResolve:i.add,afterEach:a.add,onError:Ee.add,isReady:lt,install(I){I.component("RouterLink",Fh),I.component("RouterView",Wh),I.config.globalProperties.$router=xe,Object.defineProperty(I.config.globalProperties,"$route",{enumerable:!0,get:()=>Oe(l)}),Tr&&!et&&l.value===On&&(et=!0,j(s.location).catch(ge=>{}));const Y={};for(const ge in On)Object.defineProperty(Y,ge,{get:()=>l.value[ge],enumerable:!0});I.provide(Xs,xe),I.provide(wi,Ml(Y)),I.provide(Ko,l);const X=I.unmount;he.add(I),I.unmount=function(){he.delete(I),he.size<1&&(d=On,Be&&Be(),Be=null,l.value=On,et=!1,be=!1),X()}}};function Se(I){return I.reduce((Y,X)=>Y.then(()=>se(X)),Promise.resolve())}return xe}function Kh(){return tn(Xs)}function Gh(e){return tn(wi)}const La=768;function Dc(){const e=O(typeof window<"u"?window.innerWidth<La:!1);let t=null;function n(r){e.value=r.matches}return Wn(()=>{t=window.matchMedia(`(max-width: ${La-1}px)`),e.value=t.matches,t.addEventListener("change",n)}),Gs(()=>{t==null||t.removeEventListener("change",n)}),{isMobile:e}}const zh={key:0,class:"desktop-sidebar"},Yh={class:"desktop-main"},Ba="codex-web-local.sidebar-width.v1",Jh=260,Qh=620,Fa=320,Xh=At({__name:"DesktopLayout",props:{isSidebarCollapsed:{type:Boolean,default:!1}},emits:["close-sidebar"],setup(e){const t=e,{isMobile:n}=Dc();function r(d){return Math.min(Qh,Math.max(Jh,d))}function s(){if(typeof window>"u")return Fa;const d=window.localStorage.getItem(Ba),u=Number(d);return Number.isFinite(u)?r(u):Fa}const o=O(s()),i=le(()=>n.value||t.isSidebarCollapsed?{"--sidebar-width":"0px","--layout-columns":"minmax(0, 1fr)"}:{"--sidebar-width":`${o.value}px`,"--layout-columns":"var(--sidebar-width) 1px minmax(0, 1fr)"});function a(d){typeof window>"u"||window.localStorage.setItem(Ba,String(d))}function l(d){d.preventDefault();const u=d.clientX,f=o.value,g=P=>{const R=P.clientX-u;o.value=r(f+R)},_=()=>{a(o.value),window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",_)};window.addEventListener("mousemove",g),window.addEventListener("mouseup",_)}return(d,u)=>(w(),S("div",{class:dt(["desktop-layout",{"is-mobile":Oe(n)}]),style:fr(i.value)},[Oe(n)?(w(),pt($s,{key:0,to:"body"},[Ce(Sc,{name:"drawer"},{default:at(()=>[e.isSidebarCollapsed?ce("",!0):(w(),S("div",{key:0,class:"mobile-drawer-backdrop",onClick:u[1]||(u[1]=f=>d.$emit("close-sidebar"))},[m("aside",{class:"mobile-drawer",onClick:u[0]||(u[0]=Ge(()=>{},["stop"]))},[fn(d.$slots,"sidebar",{},void 0,!0)])]))]),_:3})])):ce("",!0),Oe(n)?ce("",!0):(w(),S(Ue,{key:1},[e.isSidebarCollapsed?ce("",!0):(w(),S("aside",zh,[fn(d.$slots,"sidebar",{},void 0)])),e.isSidebarCollapsed?ce("",!0):(w(),S("button",{key:1,class:"desktop-resize-handle",type:"button","aria-label":"Resize sidebar",onMousedown:l},null,32))],64)),m("section",Yh,[fn(d.$slots,"content",{},void 0)])],6))}}),Je=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},Zh=Je(Xh,[["__scopeId","data-v-df29c633"]]),ep={},tp={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function np(e,t){return w(),S("svg",tp,[...t[0]||(t[0]=[m("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m6 9l6 6l6-6"},null,-1)])])}const bi=Je(ep,[["render",np]]),rp={},sp={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function op(e,t){return w(),S("svg",sp,[...t[0]||(t[0]=[m("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 6l6 6l-6 6"},null,-1)])])}const Lc=Je(rp,[["render",op]]),ip={},ap={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function lp(e,t){return w(),S("svg",ap,[...t[0]||(t[0]=[m("path",{fill:"currentColor",d:"M6 12a2 2 0 1 0 0-4a2 2 0 0 0 0 4m6 0a2 2 0 1 0 0-4a2 2 0 0 0 0 4m6 0a2 2 0 1 0 0-4a2 2 0 0 0 0 4"},null,-1)])])}const qr=Je(ip,[["render",lp]]),cp={},up={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function dp(e,t){return w(),S("svg",up,[...t[0]||(t[0]=[m("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 20h4L18.5 9.5a2.828 2.828 0 1 0-4-4L4 16zm9.5-13.5l4 4"},null,-1)])])}const js=Je(cp,[["render",dp]]),fp={},hp={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function pp(e,t){return w(),S("svg",hp,[...t[0]||(t[0]=[m("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2"},null,-1)])])}const mp=Je(fp,[["render",pp]]),gp={},vp={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function yp(e,t){return w(),S("svg",vp,[...t[0]||(t[0]=[m("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m5 19l2.757-7.351A1 1 0 0 1 8.693 11H21a1 1 0 0 1 .986 1.164l-.996 5.211A2 2 0 0 1 19.026 19za2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4l3 3h7a2 2 0 0 1 2 2v2"},null,-1)])])}const wp=Je(gp,[["render",yp]]),bp={},_p={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function kp(e,t){return w(),S("svg",_p,[...t[0]||(t[0]=[m("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 18v-6m0 0a4 4 0 0 1 4-4h2m-6 4a4 4 0 0 0-4-4H6m0-4a2 2 0 1 0 0 4a2 2 0 0 0 0-4m12 0a2 2 0 1 0 0 4a2 2 0 0 0 0-4m-6 14a2 2 0 1 0 0 4a2 2 0 0 0 0-4"},null,-1)])])}const wo=Je(bp,[["render",kp]]),Tp={},Sp={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function xp(e,t){return w(),S("svg",Sp,[...t[0]||(t[0]=[m("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m15 4.5l-4 4L7 10l-1.5 1.5l7 7L14 17l1.5-4l4-4M9 15l-4.5 4.5M14.5 4L20 9.5"},null,-1)])])}const bo=Je(Tp,[["render",xp]]),Cp={key:0,class:"sidebar-menu-row-left"},Ep={class:"sidebar-menu-row-main"},Ap={key:1,class:"sidebar-menu-row-right"},Ip={key:0,class:"sidebar-menu-row-right-default"},Rp={key:1,class:"sidebar-menu-row-right-hover"},$p=At({inheritAttrs:!1,__name:"SidebarMenuRow",props:{as:{default:"div"},forceRightHover:{type:Boolean,default:!1}},setup(e){const t=e,n=wd(),r=le(()=>!!n.left),s=le(()=>!!n.right),o=le(()=>!!n["right-hover"]),i=le(()=>s.value||o.value);return(a,l)=>(w(),pt(gd(t.as),yc({class:"sidebar-menu-row","data-has-left":r.value,"data-has-right":i.value,"data-has-right-hover":o.value,"data-force-right-hover":t.forceRightHover},a.$attrs),{default:at(()=>[r.value?(w(),S("span",Cp,[fn(a.$slots,"left",{},void 0,!0)])):ce("",!0),m("span",Ep,[fn(a.$slots,"default",{},void 0,!0)]),i.value?(w(),S("span",Ap,[s.value?(w(),S("span",Ip,[fn(a.$slots,"right",{},void 0,!0)])):ce("",!0),o.value?(w(),S("span",Rp,[fn(a.$slots,"right-hover",{},void 0,!0)])):ce("",!0)])):ce("",!0)]),_:3},16,["data-has-left","data-has-right","data-has-right-hover","data-force-right-hover"]))}}),or=Je($p,[["__scopeId","data-v-daeca4df"]]),Mp={class:"thread-tree-root"},Pp={key:0,class:"pinned-section"},Np={class:"thread-list"},Op={class:"thread-left-stack"},jp=["data-state"],Dp=["onClick"],Lp=["onClick"],Bp={class:"thread-row-title-wrap"},Fp={class:"thread-row-title"},Hp={class:"thread-row-time"},Up=["onClick"],Vp=["onClick"],Wp=["onClick"],qp=["aria-expanded"],Kp=["data-active"],Gp={key:0},zp=["data-active"],Yp={key:0},Jp={key:1,class:"thread-tree-no-results"},Qp={key:2,class:"thread-tree-loading"},Xp={key:3,class:"thread-list thread-list-global"},Zp={class:"thread-left-stack"},em=["data-state"],tm=["onClick"],nm=["onClick"],rm={class:"thread-row-title-wrap"},sm={class:"thread-row-title"},om={class:"thread-row-time"},im=["onClick"],am=["onClick"],lm=["onClick"],cm=["data-project-name","data-expanded","data-dragging"],um={class:"project-icon-stack"},dm={class:"project-icon-folder"},fm={class:"project-icon-chevron"},hm=["data-dragging-handle","onMousedown"],pm={class:"project-title"},mm={class:"project-hover-controls"},gm=["onClick"],vm=["onClick"],ym=["onClick"],wm=["onInput"],bm=["aria-label","title","onClick"],_m={key:0,class:"thread-list"},km={class:"thread-left-stack"},Tm=["data-state"],Sm=["onClick"],xm=["onClick"],Cm={class:"thread-row-title-wrap"},Em={class:"thread-row-title"},Am={class:"thread-row-time"},Im=["onClick"],Rm=["onClick"],$m=["onClick"],Mm=["onClick"],Pm={class:"rename-thread-panel",role:"dialog","aria-modal":"true","aria-label":"Thread title"},Nm=["onKeydown"],Om={class:"rename-thread-panel",role:"dialog","aria-modal":"true","aria-label":"Delete thread"},jm={class:"rename-thread-subtitle"},Dm=4,Ha=6,Ua="codex-web-local.thread-view-mode.v1",Va="codex-web-local.collapsed-projects.v1",Lm=At({__name:"SidebarThreadTree",props:{groups:{},projectDisplayNameById:{},selectedThreadId:{},isLoading:{type:Boolean},searchQuery:{}},emits:["select","archive","start-new-thread","rename-project","rename-thread","remove-project","reorder-project"],setup(e,{emit:t}){const n=e,r=t,s=O({}),o=O({}),i=O([]),a=O(""),l=O(""),d=O("actions"),u=O(""),f=O(!1),g=O(""),_=O(""),P=O(null),R=O(!1),B=O(""),z=O(""),N=O(null),H=O(null),j=O(null);let ae=null,ue=null;const de=O(""),Te=O({}),se=new Map,Z=new Map,me=new Map,te=new WeakMap,Be=O(null),He=O(!1),ze=O(Pe()),Ee=typeof window<"u"?new ResizeObserver(k=>{for(const C of k){const $=C.target,q=te.get($);q&&jt(q,$)}}):null;function be(){if(typeof window>"u")return{};try{const k=window.localStorage.getItem(Va);if(!k)return{};const C=JSON.parse(k);return!C||typeof C!="object"||Array.isArray(C)?{}:C}catch{return{}}}function Pe(){return typeof window>"u"?"project":window.localStorage.getItem(Ua)==="chronological"?"chronological":"project"}o.value=be(),gt(o,k=>{typeof window>"u"||window.localStorage.setItem(Va,JSON.stringify(k))},{deep:!0}),gt(ze,k=>{typeof window>"u"||window.localStorage.setItem(Ua,k)});const lt=le(()=>n.searchQuery.trim().toLowerCase()),Ze=le(()=>lt.value.length>0);function it(k){if(!Ze.value)return!0;const C=lt.value;return k.title.toLowerCase().includes(C)||k.preview.toLowerCase().includes(C)}const Ke=le(()=>Ze.value?n.groups.map(k=>({...k,threads:k.threads.filter(it)})).filter(k=>k.threads.length>0):n.groups),et=le(()=>ze.value==="chronological"),he=le(()=>{const k=Ke.value,C=[];for(const $ of k)for(const q of $.threads)p(q.id)||C.push(q);return C.sort(($,q)=>{const Fe=new Date($.updatedAtIso||$.createdAtIso).getTime();return new Date(q.updatedAtIso||q.createdAtIso).getTime()-Fe})}),xe=le(()=>{const k=new Map;for(const C of n.groups)for(const $ of C.threads)k.set($.id,$);return k}),Se=le(()=>i.value.map(k=>xe.value.get(k)??null).filter(k=>k!==null).filter(it)),I=le(()=>{const k=j.value;if(!k||k.dropTargetIndexFull===null||n.groups.length===0)return null;const C=Math.max(0,Math.min(k.dropTargetIndexFull,n.groups.length)),$=C>k.fromIndex?C-1:C,q=Math.max(0,Math.min($,n.groups.length-1));return q===k.fromIndex?null:q}),Y=le(()=>{const C=(Ze.value?Ke.value:n.groups).map(It=>It.projectName),$=j.value,q=I.value;if(!$||q===null)return C;const Fe=[...C],[_t]=Fe.splice($.fromIndex,1);return _t?(Fe.splice(q,0,_t),Fe):C}),X=le(()=>{const k={};let C=0;for(const $ of Y.value)k[$]=C,C+=Qe($);return k}),ge=le(()=>{let k=0;for(const C of Y.value)k+=Qe(C);return{height:`${Math.max(0,k)}px`}});function $e(k){const C=new Date(k).getTime();if(Number.isNaN(C))return"n/a";const $=Math.abs(Date.now()-C);if($<6e4)return"now";const q=Math.floor($/6e4);if(q<60)return`${q}m`;const Fe=Math.floor(q/60);return Fe<24?`${Fe}h`:`${Math.floor(Fe/24)}d`}function p(k){return i.value.includes(k)}function y(k){if(p(k)){i.value=i.value.filter(C=>C!==k);return}i.value=[k,...i.value]}function x(k){r("select",k)}function D(k){return`start new thread ${qe(k)}`}function V(k){r("start-new-thread",k)}function L(k){l.value===k&&ne()}function ee(k){return l.value===k}function ne(){l.value=""}function Q(k){if(l.value===k){ne();return}l.value=k}function U(k,C){g.value=k,_.value=C,f.value=!0,ne(),Kt(()=>{var $,q;($=P.value)==null||$.focus(),(q=P.value)==null||q.select()})}function fe(){f.value=!1,g.value="",_.value=""}function ie(){const k=g.value,C=_.value.trim();!k||!C||(r("rename-thread",{threadId:k,title:C}),fe())}function ve(k,C){B.value=k,z.value=C,R.value=!0,ne()}function ye(){R.value=!1,B.value="",z.value=""}function De(){const k=B.value;k&&(i.value=i.value.filter(C=>C!==k),r("archive",k),ye())}function qe(k){return n.projectDisplayNameById[k]??k}function Me(k){return a.value===k}function tt(){a.value="",d.value="actions",u.value=""}function ft(){He.value=!He.value}function F(k){ze.value=k,He.value=!1}function W(k){if(a.value===k){tt();return}a.value=k,d.value="actions",u.value=qe(k)}function J(k){a.value=k,d.value="rename",u.value=qe(k)}function b(k){r("rename-project",{projectName:k,displayName:u.value})}function E(k){r("remove-project",k),tt()}function A(k,C){if(!k.altKey||k.key!=="ArrowUp"&&k.key!=="ArrowDown")return;const $=n.groups.findIndex(_t=>_t.projectName===C);if($<0)return;const q=k.key==="ArrowUp"?-1:1,Fe=Math.max(0,Math.min($+q,n.groups.length-1));Fe!==$&&(k.preventDefault(),r("reorder-project",{projectName:C,toIndex:Fe}))}function re(k){return s.value[k]===!0}function ke(k){return o.value[k]===!0}function Ae(k){s.value={...s.value,[k]:!re(k)}}function nt(k){if(de.value===k){de.value="";return}o.value={...o.value,[k]:!ke(k)}}function Qe(k){const C=Te.value[k]??0,$=j.value,Fe=(($==null?void 0:$.projectName)===k?$.groupHeight:null)??C,_t=ke(k)?0:Ha;return Math.max(0,Fe+_t)}function ct(k,C){const $=C instanceof HTMLElement?C:C&&"$el"in C&&C.$el instanceof HTMLElement?C.$el:null;if($){Z.set(k,$);return}Z.delete(k)}function vt(k,C){const $=C instanceof HTMLElement?C:C&&"$el"in C&&C.$el instanceof HTMLElement?C.$el:null;if($){me.set(k,$);return}me.delete(k)}function xt(k){const C=a.value;if(!C)return!1;const $=Z.get(C);if(!$)return!1;if((typeof k.composedPath=="function"?k.composedPath():[]).includes($))return!0;const Fe=k.target;return Fe instanceof Node?$.contains(Fe):!1}function Le(k){const C=l.value;if(!C)return!1;const $=me.get(C);if(!$)return!1;if((typeof k.composedPath=="function"?k.composedPath():[]).includes($))return!0;const Fe=k.target;return Fe instanceof Node?$.contains(Fe):!1}function Re(k){if(He.value){const C=Be.value,$=typeof k.composedPath=="function"?k.composedPath():[];!!C&&($.includes(C)||k.target instanceof Node&&C.contains(k.target))||(He.value=!1)}a.value&&(xt(k)||tt(),l.value&&(Le(k)||ne()))}function Kn(k){a.value&&!xt(k)&&tt(),l.value&&!Le(k)&&ne()}function Ht(){He.value&&(He.value=!1),a.value&&tt(),l.value&&ne()}function Pr(){window.addEventListener("pointerdown",Re,{capture:!0}),window.addEventListener("focusin",Kn,{capture:!0}),window.addEventListener("blur",Ht)}function Gn(){window.removeEventListener("pointerdown",Re,{capture:!0}),window.removeEventListener("focusin",Kn,{capture:!0}),window.removeEventListener("blur",Ht)}function jt(k,C){const $=C.getBoundingClientRect().height;if(!Number.isFinite($)||$<=0)return;const q=Te.value[k];q!==void 0&&Math.abs(q-$)<.5||(Te.value={...Te.value,[k]:$})}function zn(k,C){const $=se.get(k);$&&$!==C&&Ee&&Ee.unobserve($);const q=C instanceof HTMLElement?C:C&&"$el"in C&&C.$el instanceof HTMLElement?C.$el:null;if(q){se.set(k,q),te.set(q,k),jt(k,q),Ee==null||Ee.observe(q);return}$&&(Ee==null||Ee.unobserve($)),se.delete(k)}function Yn(k,C){if(k.button!==0||H.value||j.value)return;const $=n.groups.findIndex(It=>It.projectName===C),q=se.get(C);if($<0||!q)return;const Fe=q.getBoundingClientRect(),_t=ke(C)?0:Ha;H.value={projectName:C,fromIndex:$,startClientX:k.clientX,startClientY:k.clientY,pointerOffsetY:k.clientY-Fe.top,groupLeft:Fe.left,groupWidth:Fe.width,groupHeight:Fe.height,groupOuterHeight:Fe.height+_t},k.preventDefault(),Nr()}function Nr(){window.addEventListener("mousemove",pr),window.addEventListener("mouseup",mr),window.addEventListener("keydown",pn)}function hr(){window.removeEventListener("mousemove",pr),window.removeEventListener("mouseup",mr),window.removeEventListener("keydown",pn)}function pr(k){ae={clientX:k.clientX,clientY:k.clientY},Or()}function mr(k){Jn({clientX:k.clientX,clientY:k.clientY});const C=j.value;if(C&&I.value!==null){const $=n.groups.findIndex(q=>q.projectName===C.projectName);if($>=0){const q=I.value;q!==$&&r("reorder-project",{projectName:C.projectName,toIndex:q})}}Qt()}function pn(k){k.key==="Escape"&&(!H.value&&!j.value||(k.preventDefault(),Qt()))}function Qt(){ue!==null&&(window.cancelAnimationFrame(ue),ue=null),ae=null,H.value=null,j.value=null,de.value="",hr()}function Or(){ue===null&&(ue=window.requestAnimationFrame(()=>{if(ue=null,!ae)return;const k=ae;ae=null,Jn(k)}))}function Jn(k){const C=H.value;if(!j.value&&C){const $=k.clientX-C.startClientX,q=k.clientY-C.startClientY;if(Math.hypot($,q)<Dm)return;tt(),de.value=C.projectName,j.value={projectName:C.projectName,fromIndex:C.fromIndex,pointerOffsetY:C.pointerOffsetY,groupLeft:C.groupLeft,groupWidth:C.groupWidth,groupHeight:C.groupHeight,groupOuterHeight:C.groupOuterHeight,ghostTop:k.clientY-C.pointerOffsetY,dropTargetIndexFull:null}}j.value&&gr(k)}function gr(k){const C=j.value;if(!C)return;if(C.ghostTop=k.clientY-C.pointerOffsetY,!jr(k)){C.dropTargetIndexFull=null;return}const $=k.clientY,q=N.value;if(!q){C.dropTargetIndexFull=null;return}const Fe=q.getBoundingClientRect(),_t=new Map(n.groups.map((M,oe)=>[M.projectName,oe])),It=n.groups.map(M=>M.projectName).filter(M=>M!==C.projectName);let Xt=0,Xn=n.groups.length;for(const M of It){const oe=_t.get(M);if(oe===void 0)continue;const Ne=Qe(M),kt=Fe.top+Xt+Ne/2;if($<kt){Xn=oe;break}Xt+=Ne}C.dropTargetIndexFull=Xn}function jr(k){const C=N.value;if(!C)return!1;const $=C.getBoundingClientRect(),q=k.clientX>=$.left&&k.clientX<=$.right,Fe=k.clientY>=$.top-32&&k.clientY<=$.bottom+32;return q&&Fe}function Qn(k){var C;return((C=j.value)==null?void 0:C.projectName)===k}function vr(k){const C=j.value,$=X.value[k]??0,q=a.value===k;return!C||C.projectName!==k?{position:"absolute",top:"0",left:"0",right:"0",zIndex:q?"40":"1",transform:`translate3d(0, ${$}px, 0)`,willChange:"transform",transition:"transform 180ms ease"}:{position:"fixed",top:"0",left:`${C.groupLeft}px`,width:`${C.groupWidth}px`,height:`${C.groupHeight}px`,zIndex:"50",pointerEvents:"none",transform:`translate3d(0, ${C.ghostTop}px, 0)`,willChange:"transform",transition:"transform 0ms linear"}}function Mn(k){return k.threads.filter(C=>!p(C.id))}function Dr(k){if(Ze.value)return Mn(k);if(ke(k.projectName))return[];const C=Mn(k);return re(k.projectName)?C:C.slice(0,10)}function Lr(k){return Ze.value?!1:!ke(k.projectName)&&Mn(k).length>10}function Br(k){return Mn(k).length>0}function mn(k){return k.inProgress?"working":k.unread?"unread":"idle"}gt(()=>n.groups.map(k=>k.projectName),k=>{var Fe,_t;const C=((Fe=j.value)==null?void 0:Fe.projectName)??((_t=H.value)==null?void 0:_t.projectName)??"";C&&!n.groups.some(It=>It.projectName===C)&&Qt();const $=new Set(k),q=Object.fromEntries(Object.entries(Te.value).filter(([It])=>$.has(It)));Object.keys(q).length!==Object.keys(Te.value).length&&(Te.value=q)});const Fr=le(()=>He.value||a.value!=="");return gt(Fr,k=>{if(k){Pr();return}Gn()}),qn(()=>{for(const k of se.values())Ee==null||Ee.unobserve(k);se.clear(),Z.clear(),Gn(),Qt()}),(k,C)=>(w(),S("section",Mp,[Se.value.length>0?(w(),S("section",Pp,[m("ul",Np,[(w(!0),S(Ue,null,yt(Se.value,$=>(w(),S("li",{key:$.id,class:"thread-row-item"},[Ce(or,{class:"thread-row","data-active":$.id===e.selectedThreadId,"data-pinned":p($.id),onMouseleave:q=>L($.id)},{left:at(()=>[m("span",Op,[$.inProgress||$.unread?(w(),S("span",{key:0,class:"thread-status-indicator","data-state":mn($)},null,8,jp)):ce("",!0),m("button",{class:"thread-pin-button",type:"button",title:"pin",onClick:q=>y($.id)},[Ce(bo,{class:"thread-icon"})],8,Dp)])]),right:at(()=>[m("span",Hp,_e($e($.createdAtIso||$.updatedAtIso)),1)]),"right-hover":at(()=>[m("div",{ref_for:!0,ref:q=>vt($.id,q),class:"thread-menu-wrap"},[m("button",{class:"thread-menu-trigger",type:"button",title:"thread_menu",onClick:Ge(q=>Q($.id),["stop"])},[Ce(qr,{class:"thread-icon"})],8,Up),ee($.id)?(w(),S("div",{key:0,class:"thread-menu-panel",onClick:C[0]||(C[0]=Ge(()=>{},["stop"]))},[m("button",{class:"thread-menu-item",type:"button",onClick:q=>U($.id,$.title)}," Rename thread ",8,Vp),m("button",{class:"thread-menu-item thread-menu-item-danger",type:"button",onClick:q=>ve($.id,$.title)}," Delete thread ",8,Wp)])):ce("",!0)],512)]),default:at(()=>[m("button",{class:"thread-main-button",type:"button",onClick:q=>x($.id)},[m("span",Bp,[m("span",Fp,_e($.title),1),$.hasWorktree?(w(),pt(wo,{key:0,class:"thread-row-worktree-icon",title:"Worktree thread"})):ce("",!0)])],8,Lp)]),_:2},1032,["data-active","data-pinned","onMouseleave"])]))),128))])])):ce("",!0),Ce(or,{as:"header",class:"thread-tree-header-row"},{right:at(()=>[m("div",{ref_key:"organizeMenuWrapRef",ref:Be,class:"organize-menu-wrap"},[m("button",{class:"organize-menu-trigger",type:"button","aria-expanded":He.value,"aria-label":"Organize threads",title:"Organize threads",onClick:ft},[Ce(qr,{class:"thread-icon"})],8,qp),He.value?(w(),S("div",{key:0,class:"organize-menu-panel",onClick:C[3]||(C[3]=Ge(()=>{},["stop"]))},[C[11]||(C[11]=m("p",{class:"organize-menu-title"},"Organize",-1)),m("button",{class:"organize-menu-item","data-active":ze.value==="project",type:"button",onClick:C[1]||(C[1]=$=>F("project"))},[C[9]||(C[9]=m("span",null,"By project",-1)),ze.value==="project"?(w(),S("span",Gp,"✓")):ce("",!0)],8,Kp),m("button",{class:"organize-menu-item","data-active":ze.value==="chronological",type:"button",onClick:C[2]||(C[2]=$=>F("chronological"))},[C[10]||(C[10]=m("span",null,"Chronological list",-1)),ze.value==="chronological"?(w(),S("span",Yp,"✓")):ce("",!0)],8,zp)])):ce("",!0)],512)]),default:at(()=>[C[12]||(C[12]=m("span",{class:"thread-tree-header"},"Threads",-1))]),_:1}),Ze.value&&Ke.value.length===0?(w(),S("p",Jp,"No matching threads")):e.isLoading&&e.groups.length===0?(w(),S("p",Qp,"Loading threads...")):et.value?(w(),S("ul",Xp,[(w(!0),S(Ue,null,yt(he.value,$=>(w(),S("li",{key:$.id,class:"thread-row-item"},[Ce(or,{class:"thread-row","data-active":$.id===e.selectedThreadId,"data-pinned":p($.id),onMouseleave:q=>L($.id)},{left:at(()=>[m("span",Zp,[$.inProgress||$.unread?(w(),S("span",{key:0,class:"thread-status-indicator","data-state":mn($)},null,8,em)):ce("",!0),m("button",{class:"thread-pin-button",type:"button",title:"pin",onClick:q=>y($.id)},[Ce(bo,{class:"thread-icon"})],8,tm)])]),right:at(()=>[m("span",om,_e($e($.createdAtIso||$.updatedAtIso)),1)]),"right-hover":at(()=>[m("div",{ref_for:!0,ref:q=>vt($.id,q),class:"thread-menu-wrap"},[m("button",{class:"thread-menu-trigger",type:"button",title:"thread_menu",onClick:Ge(q=>Q($.id),["stop"])},[Ce(qr,{class:"thread-icon"})],8,im),ee($.id)?(w(),S("div",{key:0,class:"thread-menu-panel",onClick:C[4]||(C[4]=Ge(()=>{},["stop"]))},[m("button",{class:"thread-menu-item",type:"button",onClick:q=>U($.id,$.title)}," Rename thread ",8,am),m("button",{class:"thread-menu-item thread-menu-item-danger",type:"button",onClick:q=>ve($.id,$.title)}," Delete thread ",8,lm)])):ce("",!0)],512)]),default:at(()=>[m("button",{class:"thread-main-button",type:"button",onClick:q=>x($.id)},[m("span",rm,[m("span",sm,_e($.title),1),$.hasWorktree?(w(),pt(wo,{key:0,class:"thread-row-worktree-icon",title:"Worktree thread"})):ce("",!0)])],8,nm)]),_:2},1032,["data-active","data-pinned","onMouseleave"])]))),128))])):(w(),S("div",{key:4,ref_key:"groupsContainerRef",ref:N,class:"thread-tree-groups",style:fr(ge.value)},[(w(!0),S(Ue,null,yt(Ke.value,$=>(w(),S("article",{key:$.projectName,ref_for:!0,ref:q=>zn($.projectName,q),class:"project-group","data-project-name":$.projectName,"data-expanded":!ke($.projectName),"data-dragging":Qn($.projectName),style:fr(vr($.projectName))},[Ce(or,{as:"div",class:"project-header-row",role:"button",tabindex:"0",onClick:q=>nt($.projectName),onKeydown:[q=>A(q,$.projectName),Ft(Ge(q=>nt($.projectName),["prevent"]),["enter"]),Ft(Ge(q=>nt($.projectName),["prevent"]),["space"])]},{left:at(()=>[m("span",um,[m("span",dm,[ke($.projectName)?(w(),pt(mp,{key:0,class:"thread-icon"})):(w(),pt(wp,{key:1,class:"thread-icon"}))]),m("span",fm,[ke($.projectName)?(w(),pt(Lc,{key:0,class:"thread-icon"})):(w(),pt(bi,{key:1,class:"thread-icon"}))])])]),right:at(()=>[m("div",mm,[m("div",{ref_for:!0,ref:q=>ct($.projectName,q),class:"project-menu-wrap"},[m("button",{class:"project-menu-trigger",type:"button",title:"project_menu",onClick:Ge(q=>W($.projectName),["stop"])},[Ce(qr,{class:"thread-icon"})],8,gm),Me($.projectName)?(w(),S("div",{key:0,class:"project-menu-panel",onClick:C[6]||(C[6]=Ge(()=>{},["stop"]))},[d.value==="actions"?(w(),S(Ue,{key:0},[m("button",{class:"project-menu-item",type:"button",onClick:q=>J($.projectName)}," Edit name ",8,vm),m("button",{class:"project-menu-item project-menu-item-danger",type:"button",onClick:q=>E($.projectName)}," Remove ",8,ym)],64)):(w(),S(Ue,{key:1},[C[13]||(C[13]=m("label",{class:"project-menu-label"},"Project name",-1)),In(m("input",{"onUpdate:modelValue":C[5]||(C[5]=q=>u.value=q),class:"project-menu-input",type:"text",onInput:q=>b($.projectName)},null,40,wm),[[Rn,u.value]])],64))])):ce("",!0)],512),m("button",{class:"thread-start-button",type:"button","aria-label":D($.projectName),title:D($.projectName),onClick:Ge(q=>V($.projectName),["stop"])},[Ce(js,{class:"thread-icon"})],8,bm)])]),default:at(()=>[m("span",{class:"project-main-button","data-dragging-handle":Qn($.projectName),onMousedown:Ge(q=>Yn(q,$.projectName),["left"])},[m("span",pm,_e(qe($.projectName)),1)],40,hm)]),_:2},1032,["onClick","onKeydown"]),Br($)?(w(),S("ul",_m,[(w(!0),S(Ue,null,yt(Dr($),q=>(w(),S("li",{key:q.id,class:"thread-row-item"},[Ce(or,{class:"thread-row","data-active":q.id===e.selectedThreadId,"data-pinned":p(q.id),onMouseleave:Fe=>L(q.id)},{left:at(()=>[m("span",km,[q.inProgress||q.unread?(w(),S("span",{key:0,class:"thread-status-indicator","data-state":mn(q)},null,8,Tm)):ce("",!0),m("button",{class:"thread-pin-button",type:"button",title:"pin",onClick:Fe=>y(q.id)},[Ce(bo,{class:"thread-icon"})],8,Sm)])]),right:at(()=>[m("span",Am,_e($e(q.createdAtIso||q.updatedAtIso)),1)]),"right-hover":at(()=>[m("div",{ref_for:!0,ref:Fe=>vt(q.id,Fe),class:"thread-menu-wrap"},[m("button",{class:"thread-menu-trigger",type:"button",title:"thread_menu",onClick:Ge(Fe=>Q(q.id),["stop"])},[Ce(qr,{class:"thread-icon"})],8,Im),ee(q.id)?(w(),S("div",{key:0,class:"thread-menu-panel",onClick:C[7]||(C[7]=Ge(()=>{},["stop"]))},[m("button",{class:"thread-menu-item",type:"button",onClick:Fe=>U(q.id,q.title)}," Rename thread ",8,Rm),m("button",{class:"thread-menu-item thread-menu-item-danger",type:"button",onClick:Fe=>ve(q.id,q.title)}," Delete thread ",8,$m)])):ce("",!0)],512)]),default:at(()=>[m("button",{class:"thread-main-button",type:"button",onClick:Fe=>x(q.id)},[m("span",Cm,[m("span",Em,_e(q.title),1),q.hasWorktree?(w(),pt(wo,{key:0,class:"thread-row-worktree-icon",title:"Worktree thread"})):ce("",!0)])],8,xm)]),_:2},1032,["data-active","data-pinned","onMouseleave"])]))),128))])):(w(),pt(or,{key:1,as:"p",class:"project-empty-row"},{left:at(()=>[...C[14]||(C[14]=[m("span",{class:"project-empty-spacer"},null,-1)])]),default:at(()=>[C[15]||(C[15]=m("span",{class:"project-empty"},"No threads",-1))]),_:1})),Lr($)?(w(),pt(or,{key:2,class:"thread-show-more-row"},{left:at(()=>[...C[16]||(C[16]=[m("span",{class:"thread-show-more-spacer"},null,-1)])]),default:at(()=>[m("button",{class:"thread-show-more-button",type:"button",onClick:q=>Ae($.projectName)},_e(re($.projectName)?"Show less":"Show more"),9,Mm)]),_:2},1024)):ce("",!0)],12,cm))),128))],4)),(w(),pt($s,{to:"body"},[f.value?(w(),S("div",{key:0,class:"rename-thread-overlay",onClick:Ge(fe,["self"])},[m("div",Pm,[C[17]||(C[17]=m("h3",{class:"rename-thread-title"},"Rename thread",-1)),C[18]||(C[18]=m("p",{class:"rename-thread-subtitle"},"Make it short and recognizable.",-1)),In(m("input",{ref_key:"renameThreadInputRef",ref:P,"onUpdate:modelValue":C[8]||(C[8]=$=>_.value=$),class:"rename-thread-input",type:"text",placeholder:"Add title...",onKeydown:[Ft(Ge(ie,["prevent"]),["enter"]),Ft(Ge(fe,["prevent"]),["esc"])]},null,40,Nm),[[Rn,_.value]]),m("div",{class:"rename-thread-actions"},[m("button",{class:"rename-thread-button",type:"button",onClick:fe},"Cancel"),m("button",{class:"rename-thread-button rename-thread-button-primary",type:"button",onClick:ie},"Save")])])])):ce("",!0)])),(w(),pt($s,{to:"body"},[R.value?(w(),S("div",{key:0,class:"rename-thread-overlay",onClick:Ge(ye,["self"])},[m("div",Om,[C[19]||(C[19]=m("h3",{class:"rename-thread-title"},"Delete thread?",-1)),m("p",jm,' This will archive the thread "'+_e(z.value)+'". You can find it later in archived threads. ',1),m("div",{class:"rename-thread-actions"},[m("button",{class:"rename-thread-button",type:"button",onClick:ye},"Cancel"),m("button",{class:"rename-thread-button rename-thread-button-danger",type:"button",onClick:De},"Delete")])])])):ce("",!0)]))]))}}),Bm=Je(Lm,[["__scopeId","data-v-1257b57b"]]),Fm={class:"content-header"},Hm={class:"content-leading"},Um={class:"content-title"},Vm={class:"content-actions"},Wm=At({__name:"ContentHeader",props:{title:{}},setup(e){return(t,n)=>(w(),S("header",Fm,[m("div",Hm,[fn(t.$slots,"leading",{},void 0)]),m("h1",Um,_e(e.title),1),m("div",Vm,[fn(t.$slots,"actions",{},void 0)])]))}}),qm=Je(Wm,[["__scopeId","data-v-66ee223c"]]),Km={},Gm={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function zm(e,t){return w(),S("svg",Gm,[...t[0]||(t[0]=[m("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"},null,-1)])])}const _i=Je(Km,[["render",zm]]),Ym={},Jm={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Qm(e,t){return w(),S("svg",Jm,[...t[0]||(t[0]=[m("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 14L4 9l5-5m-5 5h11a4 4 0 0 1 0 8H4"},null,-1)])])}const Xm=Je(Ym,[["render",Qm]]),Zm={class:"conversation-root"},eg={key:0,class:"conversation-loading"},tg={key:1,class:"conversation-empty"},ng={class:"message-row"},rg={class:"message-stack"},sg={class:"request-card"},og={class:"request-title"},ig={class:"request-meta"},ag={key:0,class:"request-reason"},lg={key:1,class:"request-actions"},cg=["onClick"],ug=["onClick"],dg=["onClick"],fg=["onClick"],hg={key:2,class:"request-actions"},pg=["onClick"],mg=["onClick"],gg=["onClick"],vg=["onClick"],yg={key:3,class:"request-user-input"},wg={class:"request-question-title"},bg={key:0,class:"request-question-text"},_g=["value","onChange"],kg=["value"],Tg=["value","onInput"],Sg=["onClick"],xg={key:4,class:"request-actions"},Cg=["onClick"],Eg=["onClick"],Ag={key:5,class:"request-actions"},Ig=["onClick"],Rg=["onClick"],$g=["data-role","data-message-type"],Mg={key:0,class:"message-row","data-role":"system"},Pg={class:"message-stack","data-role":"system"},Ng=["onClick"],Og={class:"cmd-label"},jg={class:"cmd-status"},Dg={class:"cmd-output-inner"},Lg={class:"cmd-output"},Bg=["data-role","data-message-type"],Fg=["data-role"],Hg=["data-role"],Ug=["data-role"],Vg=["onClick"],Wg=["src"],qg={key:1,class:"message-file-attachments"},Kg=["title"],Gg=["data-role"],zg={key:0,class:"worked-separator-wrap","aria-live":"polite"},Yg=["onClick"],Jg={class:"worked-separator-text"},Qg={key:0,class:"worked-details"},Xg=["onClick"],Zg={class:"cmd-label"},ev={class:"cmd-status"},tv={class:"cmd-output-inner"},nv={class:"cmd-output"},rv={key:1,class:"message-text-flow"},sv={key:0,class:"message-text"},ov={key:0},iv={key:2,class:"message-inline-code"},av={key:1,class:"message-text"},lv=["onClick"],cv=["src","alt","onError"],uv=["onClick"],dv={key:0,class:"conversation-item conversation-item-overlay"},fv={class:"message-row"},hv={class:"message-stack"},pv={class:"live-overlay-inline","aria-live":"polite"},mv={class:"live-overlay-label"},gv={key:1,class:"live-overlay-error"},vv=["src"],yv=16,wv=At({__name:"ThreadConversation",props:{messages:{},pendingRequests:{},liveOverlay:{},isLoading:{type:Boolean},activeThreadId:{},scrollState:{},isTurnInProgress:{type:Boolean},isRollingBack:{type:Boolean}},emits:["updateScrollState","respondServerRequest","rollback"],setup(e,{emit:t}){const n=O(new Set),r=O(new Set),s=O(new Set),o=O({});function i(b){return b.messageType==="commandExecution"&&!!b.commandExecution}function a(b){var E;return((E=b.commandExecution)==null?void 0:E.status)==="inProgress"||r.value.has(b.id)?!0:n.value.has(b.id)}function l(b){return r.value.has(b.id)}function d(b){var A;if(((A=b.commandExecution)==null?void 0:A.status)==="inProgress")return;const E=new Set(n.value);E.has(b.id)?E.delete(b.id):E.add(b.id),n.value=E}function u(b){const E=new Set(s.value);E.has(b.id)?E.delete(b.id):E.add(b.id),s.value=E}function f(b){return s.value.has(b.id)}function g(b){const E=b.commandExecution;if(!E)return"";switch(E.status){case"inProgress":return"⟳ Running";case"completed":return E.exitCode===0?"✓ Completed":`✗ Exit ${E.exitCode??"?"}`;case"failed":return"✗ Failed";case"declined":return"⊘ Declined";case"interrupted":return"⊘ Interrupted";default:return""}}function _(b){var A,re;const E=(A=b.commandExecution)==null?void 0:A.status;return E==="inProgress"?"cmd-status-running":E==="completed"&&((re=b.commandExecution)==null?void 0:re.exitCode)===0?"cmd-status-ok":"cmd-status-error"}function P(b){const E=new Set(r.value);E.add(b),r.value=E,setTimeout(()=>{const A=new Set(r.value);A.delete(b),r.value=A},1e3)}function R(b,E){const A=[];for(let re=E-1;re>=0;re--){const ke=b[re];if(ke.messageType==="commandExecution")A.unshift(ke);else if(ke.role==="user"||ke.messageType==="worked")break}return A}const B=e,z=t,N=O(null),H=O(null),j=O(null),ae=O(""),ue=O({}),de=O({});let Te=0,se=0,Z=0;const me=new WeakSet,te=O(new Set);function Be(b){if(!b||/\s/u.test(b)||b.endsWith("/")||b.endsWith("\\")||/^[A-Za-z][A-Za-z0-9+.-]*:\/\//u.test(b))return!1;const E=b.startsWith("/"),A=/^[A-Za-z]:[\\/]/u.test(b),re=b.startsWith("./")||b.startsWith("../")||b.startsWith("~/"),ke=b.includes("/")||b.includes("\\");return E||A||re||ke}function He(b){return b.replace(/\\/gu,"/").split("/").filter(Boolean).pop()||b}function ze(b){if(!b)return null;let E=b,A=null;const re=E.match(/^(.*)#L(\d+)(?:C\d+)?$/u);if(re)E=re[1],A=Number(re[2]);else{const ke=E.match(/^(.*):(\d+)(?::\d+)?$/u);ke&&(E=ke[1],A=Number(ke[2]))}return Be(E)?{path:E,line:A}:null}function Ee(b){if(!b.includes("`"))return[{kind:"text",value:b}];const E=[];let A=0,re=0;for(;A<b.length;){if(b[A]!=="`"){A+=1;continue}let ke=1;for(;A+ke<b.length&&b[A+ke]==="`";)ke+=1;const Ae="`".repeat(ke);let nt=A+ke,Qe=-1;for(;nt<b.length;){const vt=b.indexOf(Ae,nt);if(vt<0)break;const xt=vt>0&&b[vt-1]==="`",Le=vt+ke<b.length&&b[vt+ke]==="`",Re=b.slice(A+ke,vt).includes(`
26
- `);if(!xt&&!Le&&!Re){Qe=vt;break}nt=vt+1}if(Qe<0){A+=ke;continue}A>re&&E.push({kind:"text",value:b.slice(re,A)});const ct=b.slice(A+ke,Qe);if(ct.length>0){const vt=ze(ct);if(vt){const xt=He(vt.path),Le=vt.line?`${xt} (line ${String(vt.line)})`:xt;E.push({kind:"file",value:ct,displayName:Le})}else E.push({kind:"code",value:ct})}else E.push({kind:"text",value:`${Ae}${Ae}`});A=Qe+ke,re=A}return re<b.length&&E.push({kind:"text",value:b.slice(re)}),E}function be(b){const E=b.trim();if(!E)return"";if(E.startsWith("data:")||E.startsWith("blob:")||E.startsWith("http://")||E.startsWith("https://")||E.startsWith("/codex-local-image?"))return E;if(E.startsWith("file://"))return`/codex-local-image?path=${encodeURIComponent(E)}`;const A=E.startsWith("/"),re=/^[A-Za-z]:[\\/]/u.test(E);return A||re?`/codex-local-image?path=${encodeURIComponent(E)}`:E}function Pe(b){if(!b.includes("![")||!b.includes("]("))return[{kind:"text",value:b}];const E=[],A=/!\[([^\]]*)\]\(([^)\n]+)\)/gu;let re=0;for(const ke of b.matchAll(A)){const[Ae,nt,Qe]=ke;if(typeof ke.index!="number")continue;const ct=ke.index,vt=ct+Ae.length,xt=be(Qe.trim());xt&&(ct>re&&E.push({kind:"text",value:b.slice(re,ct)}),E.push({kind:"image",url:xt,alt:nt.trim(),markdown:Ae}),re=vt)}return re<b.length&&E.push({kind:"text",value:b.slice(re)}),E.length>0?E:[{kind:"text",value:b}]}function lt(b){return b!==null&&typeof b=="object"&&!Array.isArray(b)?b:null}function Ze(b){const E=new Date(b);return Number.isNaN(E.getTime())?b:E.toLocaleTimeString()}function it(b){const E=lt(b.params),A=E==null?void 0:E.reason;return typeof A=="string"?A.trim():""}function Ke(b,E){return`${String(b)}:${E}`}function et(b){const E=lt(b.params),A=Array.isArray(E==null?void 0:E.questions)?E.questions:[],re=[];for(const ke of A){const Ae=lt(ke);if(!Ae)continue;const nt=typeof Ae.id=="string"?Ae.id:"";if(!nt)continue;const Qe=Array.isArray(Ae.options)?Ae.options.map(ct=>lt(ct)).map(ct=>ct==null?void 0:ct.label).filter(ct=>typeof ct=="string"&&ct.length>0):[];re.push({id:nt,header:typeof Ae.header=="string"?Ae.header:"",question:typeof Ae.question=="string"?Ae.question:"",isOther:Ae.isOther===!0,options:Qe})}return re}function he(b,E,A){const re=Ke(b,E),ke=ue.value[re];return typeof ke=="string"&&ke.length>0?ke:A}function xe(b,E){const A=Ke(b,E);return de.value[A]??""}function Se(b,E,A){const re=A.target;if(!(re instanceof HTMLSelectElement))return;const ke=Ke(b,E);ue.value={...ue.value,[ke]:re.value}}function I(b,E,A){const re=A.target;if(!(re instanceof HTMLInputElement))return;const ke=Ke(b,E);de.value={...de.value,[ke]:re.value}}function Y(b,E){z("respondServerRequest",{id:b,result:{decision:E}})}function X(b){const E=et(b),A={};for(const re of E){const ke=he(b.id,re.id,re.options[0]||""),Ae=xe(b.id,re.id).trim(),nt=[ke,Ae].map(Qe=>Qe.trim()).filter(Qe=>Qe.length>0);A[re.id]={answers:nt}}z("respondServerRequest",{id:b.id,result:{answers:A}})}function ge(b){z("respondServerRequest",{id:b,result:{success:!1,contentItems:[{type:"inputText",text:"Tool call rejected from codex-web-local UI."}]}})}function $e(b){z("respondServerRequest",{id:b,result:{success:!0,contentItems:[]}})}function p(b){z("respondServerRequest",{id:b,result:{}})}function y(b){z("respondServerRequest",{id:b,error:{code:-32e3,message:"Rejected from codex-web-local UI."}})}function x(b){return!(b.role!=="user"&&b.role!=="assistant"||typeof b.turnIndex!="number"||B.isTurnInProgress||B.isRollingBack)}function D(b){x(b)&&z("rollback",{turnIndex:b.turnIndex})}function V(){const b=N.value,E=H.value;!b||!E||(b.scrollTop=b.scrollHeight,E.scrollIntoView({block:"end"}))}function L(b){return b.scrollHeight-(b.scrollTop+b.clientHeight)<=yv}function ee(b){if(!B.activeThreadId)return;const E=Math.max(b.scrollHeight-b.clientHeight,0),A=E>0?Math.min(Math.max(b.scrollTop/E,0),1):1;z("updateScrollState",{threadId:B.activeThreadId,state:{scrollTop:b.scrollTop,isAtBottom:L(b),scrollRatio:A}})}function ne(){const b=N.value;if(!b)return;const E=B.scrollState;if(!E||E.isAtBottom){Q();return}const A=Math.max(b.scrollHeight-b.clientHeight,0),re=typeof E.scrollRatio=="number"?E.scrollRatio*A:E.scrollTop;b.scrollTop=Math.min(Math.max(re,0),A),ee(b)}function Q(){const b=N.value;b&&(V(),ee(b))}function U(){const b=B.scrollState;return!b||b.isAtBottom===!0}function fe(){if(!U()){Z=0,se=0;return}if(Q(),Z-=1,Z<=0){se=0;return}se=requestAnimationFrame(fe)}function ie(b=6){U()&&(se&&(cancelAnimationFrame(se),se=0),Z=Math.max(b,1),se=requestAnimationFrame(fe))}function ve(){ie(3)}function ye(){if(!U())return;const b=N.value;if(!b)return;const E=b.querySelectorAll("img.message-image-preview");for(const A of E)A.complete||me.has(A)||(me.add(A),A.addEventListener("load",ve,{once:!0}),A.addEventListener("error",ve,{once:!0}))}async function De(){await Kt(),Te&&cancelAnimationFrame(Te),Te=requestAnimationFrame(()=>{Te=0,ne(),ye(),ie()})}gt(()=>B.messages,async b=>{if(!B.isLoading){for(const E of b){if(E.messageType!=="commandExecution"||!E.commandExecution)continue;const A=o.value[E.id],re=E.commandExecution.status;A==="inProgress"&&re!=="inProgress"&&P(E.id),o.value[E.id]=re}await De()}}),gt(()=>B.liveOverlay,async b=>{b&&(await Kt(),Q(),ie(8))},{deep:!0}),gt(()=>B.isLoading,async b=>{b||await De()}),gt(()=>B.activeThreadId,()=>{ae.value="",te.value=new Set},{flush:"post"});function qe(){const b=N.value;!b||B.isLoading||ee(b)}function Me(b){ae.value=be(b)}function tt(b,E){return`${b}:${String(E)}`}function ft(b,E){const A=new Set(te.value);A.add(tt(b,E)),te.value=A}function F(b,E){return te.value.has(tt(b,E))}function W(){ae.value=""}function J(){const b=j.value;b&&(b.scrollTop=b.scrollHeight)}return gt(()=>{var b;return(b=B.liveOverlay)==null?void 0:b.reasoningText},async b=>{b&&(await Kt(),J())}),qn(()=>{Te&&cancelAnimationFrame(Te),se&&cancelAnimationFrame(se)}),(b,E)=>(w(),S("section",Zm,[e.isLoading?(w(),S("p",eg,"Loading messages...")):e.messages.length===0&&e.pendingRequests.length===0&&!e.liveOverlay?(w(),S("p",tg," No messages in this thread yet. ")):(w(),S("ul",{key:2,ref_key:"conversationListRef",ref:N,class:"conversation-list",onScroll:qe},[(w(!0),S(Ue,null,yt(e.pendingRequests,A=>(w(),S("li",{key:`server-request:${A.id}`,class:"conversation-item conversation-item-request"},[m("div",ng,[m("div",rg,[m("article",sg,[m("p",og,_e(A.method),1),m("p",ig,"Request #"+_e(A.id)+" · "+_e(Ze(A.receivedAtIso)),1),it(A)?(w(),S("p",ag,_e(it(A)),1)):ce("",!0),A.method==="item/commandExecution/requestApproval"?(w(),S("section",lg,[m("button",{type:"button",class:"request-button request-button-primary",onClick:re=>Y(A.id,"accept")},"Accept",8,cg),m("button",{type:"button",class:"request-button",onClick:re=>Y(A.id,"acceptForSession")},"Accept for Session",8,ug),m("button",{type:"button",class:"request-button",onClick:re=>Y(A.id,"decline")},"Decline",8,dg),m("button",{type:"button",class:"request-button",onClick:re=>Y(A.id,"cancel")},"Cancel",8,fg)])):A.method==="item/fileChange/requestApproval"?(w(),S("section",hg,[m("button",{type:"button",class:"request-button request-button-primary",onClick:re=>Y(A.id,"accept")},"Accept",8,pg),m("button",{type:"button",class:"request-button",onClick:re=>Y(A.id,"acceptForSession")},"Accept for Session",8,mg),m("button",{type:"button",class:"request-button",onClick:re=>Y(A.id,"decline")},"Decline",8,gg),m("button",{type:"button",class:"request-button",onClick:re=>Y(A.id,"cancel")},"Cancel",8,vg)])):A.method==="item/tool/requestUserInput"?(w(),S("section",yg,[(w(!0),S(Ue,null,yt(et(A),re=>(w(),S("div",{key:`${A.id}:${re.id}`,class:"request-question"},[m("p",wg,_e(re.header||re.question),1),re.header&&re.question?(w(),S("p",bg,_e(re.question),1)):ce("",!0),m("select",{class:"request-select",value:he(A.id,re.id,re.options[0]||""),onChange:ke=>Se(A.id,re.id,ke)},[(w(!0),S(Ue,null,yt(re.options,ke=>(w(),S("option",{key:`${A.id}:${re.id}:${ke}`,value:ke},_e(ke),9,kg))),128))],40,_g),re.isOther?(w(),S("input",{key:1,class:"request-input",type:"text",value:xe(A.id,re.id),placeholder:"Other answer",onInput:ke=>I(A.id,re.id,ke)},null,40,Tg)):ce("",!0)]))),128)),m("button",{type:"button",class:"request-button request-button-primary",onClick:re=>X(A)}," Submit Answers ",8,Sg)])):A.method==="item/tool/call"?(w(),S("section",xg,[m("button",{type:"button",class:"request-button request-button-primary",onClick:re=>ge(A.id)},"Fail Tool Call",8,Cg),m("button",{type:"button",class:"request-button",onClick:re=>$e(A.id)},"Success (Empty)",8,Eg)])):(w(),S("section",Ag,[m("button",{type:"button",class:"request-button request-button-primary",onClick:re=>p(A.id)},"Return Empty Result",8,Ig),m("button",{type:"button",class:"request-button",onClick:re=>y(A.id)},"Reject Request",8,Rg)]))])])])]))),128)),(w(!0),S(Ue,null,yt(e.messages,A=>{var re,ke;return w(),S("li",{key:A.id,class:dt(["conversation-item",{"conversation-item-rollbackable":x(A)}]),"data-role":A.role,"data-message-type":A.messageType||""},[i(A)?(w(),S("div",Mg,[m("div",Pg,[m("button",{type:"button",class:dt(["cmd-row",[_(A),{"cmd-expanded":a(A)}]]),onClick:Ae=>d(A)},[m("span",{class:dt(["cmd-chevron",{"cmd-chevron-open":a(A)}])},"▶",2),m("code",Og,_e(((re=A.commandExecution)==null?void 0:re.command)||"(command)"),1),m("span",jg,_e(g(A)),1)],10,Ng),m("div",{class:dt(["cmd-output-wrap",{"cmd-output-visible":a(A),"cmd-output-collapsing":l(A)}])},[m("div",Dg,[m("pre",Lg,_e(((ke=A.commandExecution)==null?void 0:ke.aggregatedOutput)||"(no output)"),1)])],2)])])):(w(),S("div",{key:1,class:"message-row","data-role":A.role,"data-message-type":A.messageType||""},[m("div",{class:"message-stack","data-role":A.role},[m("article",{class:"message-body","data-role":A.role},[A.images&&A.images.length>0?(w(),S("ul",{key:0,class:"message-image-list","data-role":A.role},[(w(!0),S(Ue,null,yt(A.images,Ae=>(w(),S("li",{key:Ae,class:"message-image-item"},[m("button",{class:"message-image-button",type:"button",onClick:nt=>Me(Ae)},[m("img",{class:"message-image-preview",src:be(Ae),alt:"Message image preview",loading:"lazy"},null,8,Wg)],8,Vg)]))),128))],8,Ug)):ce("",!0),A.fileAttachments&&A.fileAttachments.length>0?(w(),S("div",qg,[(w(!0),S(Ue,null,yt(A.fileAttachments,Ae=>(w(),S("span",{key:Ae.path,class:"message-file-chip"},[E[2]||(E[2]=m("span",{class:"message-file-chip-icon"},"📄",-1)),m("span",{class:"message-file-chip-name",title:Ae.path},_e(Ae.label),9,Kg)]))),128))])):ce("",!0),A.text.length>0?(w(),S("article",{key:2,class:"message-card","data-role":A.role},[A.messageType==="worked"?(w(),S("div",zg,[m("button",{type:"button",class:"worked-separator",onClick:Ae=>u(A)},[E[3]||(E[3]=m("span",{class:"worked-separator-line","aria-hidden":"true"},null,-1)),m("span",{class:dt(["worked-chevron",{"worked-chevron-open":f(A)}])},"▶",2),m("p",Jg,_e(A.text),1),E[4]||(E[4]=m("span",{class:"worked-separator-line","aria-hidden":"true"},null,-1))],8,Yg),f(A)?(w(),S("div",Qg,[(w(!0),S(Ue,null,yt(R(e.messages,e.messages.indexOf(A)),Ae=>{var nt,Qe;return w(),S("div",{key:`worked-cmd-${Ae.id}`,class:"worked-cmd-item"},[m("button",{type:"button",class:dt(["cmd-row",[_(Ae),{"cmd-expanded":a(Ae)}]]),onClick:ct=>d(Ae)},[m("span",{class:dt(["cmd-chevron",{"cmd-chevron-open":a(Ae)}])},"▶",2),m("code",Zg,_e(((nt=Ae.commandExecution)==null?void 0:nt.command)||"(command)"),1),m("span",ev,_e(g(Ae)),1)],10,Xg),m("div",{class:dt(["cmd-output-wrap",{"cmd-output-visible":a(Ae),"cmd-output-collapsing":l(Ae)}])},[m("div",tv,[m("pre",nv,_e(((Qe=Ae.commandExecution)==null?void 0:Qe.aggregatedOutput)||"(no output)"),1)])],2)])}),128))])):ce("",!0)])):(w(),S("div",rv,[(w(!0),S(Ue,null,yt(Pe(A.text),(Ae,nt)=>(w(),S(Ue,{key:`block-${nt}`},[Ae.kind==="text"?(w(),S("p",sv,[(w(!0),S(Ue,null,yt(Ee(Ae.value),(Qe,ct)=>(w(),S(Ue,{key:`seg-${nt}-${ct}`},[Qe.kind==="text"?(w(),S("span",ov,_e(Qe.value),1)):Qe.kind==="file"?(w(),S("a",{key:1,class:"message-file-link",href:"#",onClick:E[0]||(E[0]=Ge(()=>{},["prevent"]))},_e(Qe.displayName),1)):(w(),S("code",iv,_e(Qe.value),1))],64))),128))])):F(A.id,nt)?(w(),S("p",av,_e(Ae.markdown),1)):(w(),S("button",{key:2,class:"message-image-button",type:"button",onClick:Qe=>Me(Ae.url)},[m("img",{class:"message-image-preview message-markdown-image",src:Ae.url,alt:Ae.alt||"Embedded message image",loading:"lazy",onError:Qe=>ft(A.id,nt)},null,40,cv)],8,lv))],64))),128))]))],8,Gg)):ce("",!0)],8,Hg),x(A)?(w(),S("button",{key:0,class:"rollback-button",type:"button",title:"Rollback to this message (remove this turn and all after it)",onClick:Ae=>D(A)},[Ce(Xm,{class:"rollback-icon"}),E[5]||(E[5]=m("span",{class:"rollback-label"},"Rollback",-1))],8,uv)):ce("",!0)],8,Fg)],8,Bg))],10,$g)}),128)),e.liveOverlay?(w(),S("li",dv,[m("div",fv,[m("div",hv,[m("article",pv,[m("p",mv,_e(e.liveOverlay.activityLabel),1),e.liveOverlay.reasoningText?(w(),S("p",{key:0,class:"live-overlay-reasoning",ref_key:"liveOverlayReasoningRef",ref:j},_e(e.liveOverlay.reasoningText),513)):ce("",!0),e.liveOverlay.errorText?(w(),S("p",gv,_e(e.liveOverlay.errorText),1)):ce("",!0)])])])])):ce("",!0),m("li",{ref_key:"bottomAnchorRef",ref:H,class:"conversation-bottom-anchor"},null,512)],544)),ae.value.length>0?(w(),S("div",{key:3,class:"image-modal-backdrop",onClick:W},[m("div",{class:"image-modal-content",onClick:E[1]||(E[1]=Ge(()=>{},["stop"]))},[m("button",{class:"image-modal-close",type:"button","aria-label":"Close image preview",onClick:W},[Ce(_i,{class:"icon-svg"})]),m("img",{class:"image-modal-image",src:ae.value,alt:"Expanded message image"},null,8,vv)])])):ce("",!0)]))}}),bv=Je(wv,[["__scopeId","data-v-48573075"]]);function _v(e){var u;const t=O("idle"),n=O(typeof navigator<"u"&&!!((u=navigator.mediaDevices)!=null&&u.getUserMedia));let r=null,s=null,o=[];async function i(){var f;if(!(t.value!=="idle"||!n.value))try{s=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1}}),o=[],r=new MediaRecorder(s),r.ondataavailable=g=>{g.data.size>0&&o.push(g.data)},r.onstop=()=>{var P;const g=o,_=(r==null?void 0:r.mimeType)||((P=g[0])==null?void 0:P.type)||"audio/webm";d(),t.value="idle",l(g,_)},r.start(),t.value="recording"}catch(g){d(),(f=e.onError)==null||f.call(e,g)}}function a(){t.value!=="recording"||!r||r.state!=="inactive"&&r.stop()}async function l(f,g){var P;if(f.length===0)return;const _=new Blob(f,{type:g});try{const R=g.split(/[/;]/)[1]??"webm",B=`----codex-transcribe-${crypto.randomUUID()}`,z=new Uint8Array(await _.arrayBuffer()),N=new TextEncoder,H=[];H.push(N.encode(`--${B}\r
27
- `)),H.push(N.encode(`Content-Disposition: form-data; name="file"; filename="codex.${R}"\r
28
- `)),H.push(N.encode(`Content-Type: ${g}\r
29
- \r
30
- `)),H.push(z),H.push(N.encode(`\r
31
- --${B}--\r
32
- `));let j=0;for(const Z of H)j+=Z.byteLength;const ae=new Uint8Array(j);let ue=0;for(const Z of H)ae.set(Z,ue),ue+=Z.byteLength;const de=await fetch("/codex-api/transcribe",{method:"POST",headers:{"Content-Type":`multipart/form-data; boundary=${B}`},body:ae});if(!de.ok)throw new Error(`Transcription failed: ${de.status}`);const se=((await de.json()).text??"").trim();se.length>0&&e.onTranscript(se)}catch(R){(P=e.onError)==null||P.call(e,R)}finally{t.value!=="recording"&&(t.value="idle")}}function d(){r&&(r.ondataavailable=null,r.onstop=null,r=null),s&&(s.getTracks().forEach(f=>f.stop()),s=null),o=[]}return qn(d),{state:t,isSupported:n,startRecording:i,stopRecording:a}}function Wa(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}class xn extends Error{constructor(t,n){super(t),this.name="CodexApiError",this.code=n.code,this.method=n.method,this.status=n.status}}function ki(e,t){const n=Wa(e);if(!n)return t;const r=n.error;if(typeof r=="string"&&r.length>0)return r;const s=Wa(r);return s&&typeof s.message=="string"&&s.message.length>0?s.message:t}function Mr(e,t,n){return e instanceof xn?e:e instanceof Error?new xn(e.message||t,{code:"unknown_error",method:n}):new xn(t,{code:"unknown_error",method:n})}function Bc(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}async function kv(e,t){const n={method:e,params:t??null};let r;try{r=await fetch("/codex-api/rpc",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}catch(i){throw new xn(i instanceof Error?i.message:`RPC ${e} failed before request was sent`,{code:"network_error",method:e})}let s=null;try{s=await r.json()}catch{s=null}if(!r.ok)throw new xn(ki(s,`RPC ${e} failed with HTTP ${r.status}`),{code:"http_error",method:e,status:r.status});const o=s;if(!o||typeof o!="object"||!("result"in o))throw new xn(`RPC ${e} returned malformed envelope`,{code:"invalid_response",method:e,status:r.status});return o.result}function qa(e){const t=Bc(e);if(!t||typeof t.method!="string"||t.method.length===0)return null;const n=typeof t.atIso=="string"&&t.atIso.length>0?t.atIso:new Date().toISOString();return{method:t.method,params:t.params??null,atIso:n}}function Tv(e){if(typeof window>"u")return()=>{};let t=null,n=!1;const r=()=>{if(typeof EventSource>"u"||n)return;const s=new EventSource("/codex-api/events");s.onmessage=o=>{try{const i=JSON.parse(o.data),a=qa(i);a&&e(a)}catch{}},t=()=>s.close()};if(typeof WebSocket<"u"){const s=window.location.protocol==="https:"?"wss:":"ws:",o=new WebSocket(`${s}//${window.location.host}/codex-api/ws`);let i=!1,a=window.setTimeout(()=>{i||n||(o.close(),r())},2500);o.onopen=()=>{i=!0,a!==null&&(window.clearTimeout(a),a=null)},o.onmessage=l=>{try{const d=JSON.parse(String(l.data)),u=qa(d);u&&e(u)}catch{}},o.onerror=()=>{!i&&!n&&r()},o.onclose=()=>{a!==null&&(window.clearTimeout(a),a=null),!i&&!n&&r()},t=()=>o.close()}else r();return()=>{n=!0,t==null||t()}}async function Sv(e){let t;try{t=await fetch("/codex-api/server-requests/respond",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(r){throw new xn(r instanceof Error?r.message:"Failed to reply to server request",{code:"network_error",method:"server-requests/respond"})}let n=null;try{n=await t.json()}catch{n=null}if(!t.ok)throw new xn(ki(n,`Server request reply failed with HTTP ${t.status}`),{code:"http_error",method:"server-requests/respond",status:t.status})}async function xv(){const e=await fetch("/codex-api/server-requests/pending");let t=null;try{t=await e.json()}catch{t=null}if(!e.ok)throw new xn(ki(t,`Pending server requests failed with HTTP ${e.status}`),{code:"http_error",method:"server-requests/pending",status:e.status});const n=Bc(t),r=n==null?void 0:n.data;return Array.isArray(r)?r:[]}function Ka(e){return new Date(e*1e3).toISOString()}function Cv(e){return e.split("/").filter(Boolean).at(-1)||e||"unknown-project"}function Ev(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}const Av=/^##\s+(.+?):\s+(.+?)\s*$/,Iv=/^#\s*files mentioned by the user\s*:?\s*$/i;function Rv(e){var s,o;const t=e.split(`
33
- `).findIndex(i=>Iv.test(i.trim()));if(t<0)return[];const n=e.split(`
34
- `).slice(t+1),r=[];for(const i of n){const a=i.trim();if(!a)continue;const l=a.match(Av);if(!l)break;const d=(s=l[1])==null?void 0:s.trim(),u=(o=l[2])==null?void 0:o.trim().replace(/\s+\((?:lines?\s+\d+(?:-\d+)?)\)\s*$/,"");d&&u&&r.push({label:d,path:u})}return r}function $v(e){const t=/(?:^|\n)\s{0,3}#{0,6}\s*my request for codex\s*:?\s*/giu,n=Array.from(e.matchAll(t));if(n.length===0)return e.trim();const r=n.at(-1);if(!r||typeof r.index!="number")return e.trim();const s=r.index+r[0].length;return e.slice(s).trim()}function Mv(e,t){if(!Array.isArray(t))return{text:"",images:[],fileAttachments:[],rawBlocks:[]};const n=[],r=[],s=[];for(const[a,l]of t.entries())l.type==="text"&&typeof l.text=="string"&&l.text.length>0&&n.push(l.text),l.type==="image"&&typeof l.url=="string"&&l.url.trim().length>0&&r.push(l.url.trim()),l.type!=="text"&&l.type!=="image"&&s.push({id:`${e}:user-content:${a}`,role:"user",text:"",messageType:`userContent.${l.type}`,rawPayload:Ev(l),isUnhandled:!0});const o=n.join(`
35
- `),i=Rv(o);return{text:$v(o),images:r,fileAttachments:i,rawBlocks:s}}function Pv(e){if(e.type==="agentMessage")return[{id:e.id,role:"assistant",text:e.text,messageType:e.type}];if(e.type==="userMessage"){const t=Mv(e.id,e.content),n=[];return(t.text.length>0||t.images.length>0||t.fileAttachments.length>0)&&n.push({id:e.id,role:"user",text:t.text,images:t.images,fileAttachments:t.fileAttachments.length>0?t.fileAttachments:void 0,messageType:e.type}),n.push(...t.rawBlocks),n.length===0?[]:n}if(e.type==="reasoning")return[];if(e.type==="commandExecution"){const t=e,n=Nv(t.status),r=typeof t.command=="string"?t.command:"",s=typeof t.cwd=="string"?t.cwd:null,o=typeof t.aggregatedOutput=="string"?t.aggregatedOutput:"",i=typeof t.exitCode=="number"?t.exitCode:null;return[{id:e.id,role:"system",text:r,messageType:"commandExecution",commandExecution:{command:r,cwd:s,status:n,aggregatedOutput:o,exitCode:i}}]}return[]}function Nv(e){return e==="completed"||e==="failed"||e==="declined"||e==="interrupted"?e:e==="inProgress"||e==="in_progress"?"inProgress":"completed"}function Ov(e){const t=[e.preview];for(const n of t)if(typeof n=="string"&&n.trim().length>0)return n.trim();return""}function jv(e){const t=Ov(e);return t.length>0?t:"Untitled thread"}function Fc(e){return(e==null?void 0:e.status)==="inProgress"}function Dv(e){const t=e;if(t.inProgress===!0||t.status==="inProgress"||t.turnStatus==="inProgress")return!0;const r=(Array.isArray(e.turns)?e.turns:[]).at(-1);return Fc(r)}function Lv(e){const t=e,n=typeof t.cwd=="string"?t.cwd:e.cwd,r=t.isWorktree===!0||t.worktree===!0||t.worktreeId!==void 0||t.worktreePath!==void 0||n.includes("/.codex/worktrees/")||n.includes("/.git/worktrees/");return{id:e.id,title:jv(e),projectName:Cv(e.cwd),cwd:e.cwd,hasWorktree:r,createdAtIso:Ka(e.createdAt),updatedAtIso:Ka(e.updatedAt),preview:e.preview,unread:!1,inProgress:Dv(e)}}function Bv(e){const t=new Map;for(const n of e){const r=t.get(n.projectName);r?r.push(n):t.set(n.projectName,[n])}return Array.from(t.entries()).map(([n,r])=>({projectName:n,threads:r.sort((s,o)=>new Date(o.updatedAtIso).getTime()-new Date(s.updatedAtIso).getTime())})).sort((n,r)=>{var i,a;const s=new Date(((i=n.threads[0])==null?void 0:i.updatedAtIso)??0).getTime();return new Date(((a=r.threads[0])==null?void 0:a.updatedAtIso)??0).getTime()-s})}function Fv(e){const t=e.data.map(Lv);return Bv(t)}function Hc(e){const t=Array.isArray(e.thread.turns)?e.thread.turns:[],n=[];for(let r=0;r<t.length;r++){const s=t[r],o=Array.isArray(s.items)?s.items:[];for(const i of o)for(const a of Pv(i))n.push({...a,turnIndex:r})}return n}function Hv(e){const t=Array.isArray(e.thread.turns)?e.thread.turns:[];return Fc(t.at(-1))}async function Wt(e,t){try{return await kv(e,t)}catch(n){throw Mr(n,`RPC ${e} failed`,e)}}function Uv(e){return typeof e=="string"&&["none","minimal","low","medium","high","xhigh"].includes(e)?e:""}async function Vv(){const e=await Wt("thread/list",{archived:!1,limit:100,sortKey:"updated_at"});return Fv(e)}async function Wv(e){const t=await Wt("thread/read",{threadId:e,includeTurns:!0});return{messages:Hc(t),inProgress:Hv(t)}}async function qv(){try{return await Vv()}catch(e){throw Mr(e,"Failed to load thread groups","thread/list")}}async function Kv(e){try{return await Wv(e)}catch(t){throw Mr(t,`Failed to load thread ${e}`,"thread/read")}}function Gv(e){return Tv(e)}async function zv(e,t){await Sv({id:e,...t})}async function Yv(){return xv()}async function _o(e){await Wt("thread/resume",{threadId:e})}async function Jv(e){await Wt("thread/archive",{threadId:e})}async function Qv(e,t){await Wt("thread/name/set",{threadId:e,name:t})}async function Ga(e,t){const n=await Wt("thread/rollback",{threadId:e,numTurns:t});return Hc(n)}function Xv(e){if(!e||typeof e!="object")return"";const n=e.thread;if(n&&typeof n=="object"){const r=n.id;if(typeof r=="string"&&r.length>0)return r}return""}async function za(e,t){try{const n={};typeof e=="string"&&e.trim().length>0&&(n.cwd=e.trim()),typeof t=="string"&&t.trim().length>0&&(n.model=t.trim());const r=await Wt("thread/start",n),s=Xv(r);if(!s)throw new Error("thread/start did not return a thread id");return s}catch(n){throw Mr(n,"Failed to start a new thread","thread/start")}}function Zv(e,t){if(t.length===0)return e;let n=`# Files mentioned by the user:
36
- `;for(const r of t)n+=`
37
- ## ${r.label}: ${r.path}
38
- `;return`${n}
39
- ## My request for Codex:
40
-
41
- ${e}
42
- `}async function ko(e,t,n=[],r,s,o,i=[]){try{const l=[{type:"text",text:Zv(t,i)}];for(const f of n){const g=f.trim();g&&l.push({type:"image",url:g,image_url:g})}if(o)for(const f of o)l.push({type:"skill",name:f.name,path:f.path});const d=i.map(f=>({label:f.label,path:f.path,fsPath:f.fsPath})),u={threadId:e,input:l};d.length>0&&(u.attachments=d),typeof r=="string"&&r.length>0&&(u.model=r),typeof s=="string"&&s.length>0&&(u.effort=s),await Wt("turn/start",u)}catch(a){throw Mr(a,`Failed to start turn for thread ${e}`,"turn/start")}}async function ey(e,t){const n=e.trim(),r=(t==null?void 0:t.trim())||"";if(n)try{if(!r)throw new Error("turn/interrupt requires turnId");await Wt("turn/interrupt",{threadId:n,turnId:r})}catch(s){throw Mr(s,`Failed to interrupt turn for thread ${n}`,"turn/interrupt")}}async function ty(e){await Wt("setDefaultModel",{model:e})}async function ny(){const e=await Wt("model/list",{}),t=[];for(const n of e.data){const r=n.id||n.model;!r||t.includes(r)||t.push(r)}return t}async function ry(){const e=await Wt("config/read",{}),t=e.config.model??"",n=Uv(e.config.model_reasoning_effort);return{model:t,reasoningEffort:n}}function sy(e){const t=e&&typeof e=="object"&&!Array.isArray(e)?e:{},n=o=>{if(!Array.isArray(o))return[];const i=[];for(const a of o)typeof a=="string"&&a.length>0&&!i.includes(a)&&i.push(a);return i},r=t.labels,s={};if(r&&typeof r=="object"&&!Array.isArray(r))for(const[o,i]of Object.entries(r))typeof o=="string"&&o.length>0&&typeof i=="string"&&(s[o]=i);return{order:n(t.order),labels:s,active:n(t.active)}}async function Ya(){const e=await fetch("/codex-api/workspace-roots-state"),t=await e.json();if(!e.ok)throw new Error("Failed to load workspace roots state");const n=t&&typeof t=="object"&&!Array.isArray(t)?t:{};return sy(n.data)}async function Ja(){const e=await fetch("/codex-api/home-directory"),t=await e.json();if(!e.ok)throw new Error("Failed to load home directory");const n=t&&typeof t=="object"&&!Array.isArray(t)?t:{},r=n.data&&typeof n.data=="object"&&!Array.isArray(n.data)?n.data:{};return typeof r.path=="string"?r.path.trim():""}async function oy(e){if(!(await fetch("/codex-api/workspace-roots-state",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok)throw new Error("Failed to save workspace roots state")}async function iy(e,t){const n=await fetch("/codex-api/project-root",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,createIfMissing:(t==null?void 0:t.createIfMissing)===!0,label:(t==null?void 0:t.label)??""})}),r=await n.json();if(!n.ok){const a=Ti(r,"Failed to open project root");throw new Error(a)}const s=r&&typeof r=="object"&&!Array.isArray(r)?r:{},o=s.data&&typeof s.data=="object"&&!Array.isArray(s.data)?s.data:{};return typeof o.path=="string"?o.path.trim():""}async function ay(e){const t=new URLSearchParams({basePath:e}),n=await fetch(`/codex-api/project-root-suggestion?${t.toString()}`),r=await n.json();if(!n.ok){const i=Ti(r,"Failed to suggest project name");throw new Error(i)}const s=r&&typeof r=="object"&&!Array.isArray(r)?r:{},o=s.data&&typeof s.data=="object"&&!Array.isArray(s.data)?s.data:{};return{name:typeof o.name=="string"?o.name.trim():"",path:typeof o.path=="string"?o.path.trim():""}}async function ly(e,t,n=20){const r=e.trim();if(!r)return[];const s=await fetch("/codex-api/composer-file-search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cwd:r,query:t.trim(),limit:n})}),o=await s.json();if(!s.ok){const d=Ti(o,"Failed to search files");throw new Error(d)}const i=o&&typeof o=="object"&&!Array.isArray(o)?o:{},a=Array.isArray(i.data)?i.data:[],l=[];for(const d of a){if(!d||typeof d!="object"||Array.isArray(d))continue;const f=d.path,g=typeof f=="string"?f.trim():"";g&&l.push({path:g})}return l}function Ti(e,t){const r=(e&&typeof e=="object"&&!Array.isArray(e)?e:{}).error;return typeof r=="string"&&r.trim().length>0?r:t}async function cy(){try{const e=await fetch("/codex-api/thread-titles");return e.ok?(await e.json()).data??{titles:{},order:[]}:{titles:{},order:[]}}catch{return{titles:{},order:[]}}}async function To(e,t){try{await fetch("/codex-api/thread-titles",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,title:t})})}catch{}}async function uy(e,t){var n;try{return((n=(await Wt("generate-thread-title",{prompt:e,cwd:t})).title)==null?void 0:n.trim())??""}catch{return""}}async function dy(e){try{const t={};e&&e.length>0&&(t.cwds=e);const n=await Wt("skills/list",t),r=[],s=new Set;for(const o of n.data)for(const i of o.skills)!i.name||s.has(i.path)||(s.add(i.path),r.push({name:i.name,description:i.shortDescription||i.description||"",path:i.path,scope:i.scope,enabled:i.enabled}));return r}catch{return[]}}async function fy(e){try{const t=new FormData;t.append("file",e);const n=await fetch("/codex-api/upload-file",{method:"POST",body:t});return n.ok?(await n.json()).path??null:null}catch{return null}}const hy={},py={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function my(e,t){return w(),S("svg",py,[...t[0]||(t[0]=[m("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m12 5l0 14m-6-8l6-6l6 6"},null,-1)])])}const gy=Je(hy,[["render",my]]),vy={},yy={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function wy(e,t){return w(),S("svg",yy,[...t[0]||(t[0]=[m("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 2m0 3a3 3 0 0 1 3-3h0a3 3 0 0 1 3 3v5a3 3 0 0 1-3 3h0a3 3 0 0 1-3-3zM5 10a7 7 0 0 0 14 0M8 21h8M12 17v4"},null,-1)])])}const by=Je(vy,[["render",wy]]),_y={},ky={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Ty(e,t){return w(),S("svg",ky,[...t[0]||(t[0]=[m("path",{stroke:"none",fill:"none",d:"M0 0h24v24H0z"},null,-1),m("path",{fill:"currentColor",d:"M8 5a3 3 0 0 0 -3 3v8a3 3 0 0 0 3 3h8a3 3 0 0 0 3 -3v-8a3 3 0 0 0 -3 -3h-8z"},null,-1)])])}const Sy=Je(_y,[["render",Ty]]),xy=["disabled"],Cy={class:"composer-dropdown-value"},Ey={class:"composer-dropdown-menu"},Ay={key:0,class:"composer-dropdown-search-wrap"},Iy=["placeholder","onKeydown"],Ry={class:"composer-dropdown-options",role:"listbox"},$y=["onClick"],My={key:0,class:"composer-dropdown-empty"},Py={key:1,class:"composer-dropdown-add-wrap"},Ny=["placeholder","onKeydown"],Oy=At({__name:"ComposerDropdown",props:{modelValue:{},options:{},placeholder:{},disabled:{type:Boolean},openDirection:{},enableSearch:{type:Boolean},searchPlaceholder:{},showAddAction:{type:Boolean},addActionLabel:{},defaultAddValue:{},addPlaceholder:{}},emits:["update:modelValue","add"],setup(e,{emit:t}){const n=e,r=t,s=O(null),o=O(null),i=O(null),a=O(!1),l=O(""),d=O(!1),u=O(""),f=le(()=>{var me;const Z=n.options.find(te=>te.value===n.modelValue);return Z?Z.label:((me=n.placeholder)==null?void 0:me.trim())||""}),g=le(()=>n.openDirection??"down"),_=le(()=>n.enableSearch===!0),P=le(()=>n.showAddAction===!0),R=le(()=>{var Z;return((Z=n.searchPlaceholder)==null?void 0:Z.trim())||"Quick search projects"}),B=le(()=>{var Z;return((Z=n.addActionLabel)==null?void 0:Z.trim())||"Add new project"}),z=le(()=>{var Z;return((Z=n.addPlaceholder)==null?void 0:Z.trim())||"Project name or absolute path"}),N=le(()=>{const Z=l.value.trim().toLowerCase();return Z?n.options.filter(me=>me.label.toLowerCase().includes(Z)||me.value.toLowerCase().includes(Z)):n.options});function H(){n.disabled||(a.value=!a.value)}function j(Z){r("update:modelValue",Z),a.value=!1,l.value=""}function ae(){var Z;d.value=!0,u.value=((Z=n.defaultAddValue)==null?void 0:Z.trim())||"",Kt(()=>{var me;return(me=i.value)==null?void 0:me.focus()})}function ue(){if(l.value.length>0){l.value="";return}a.value=!1}function de(){const Z=u.value.trim();Z&&(r("add",Z),d.value=!1,u.value="",a.value=!1,l.value="")}function Te(){d.value=!1,u.value="",a.value=!1,l.value=""}function se(Z){if(!a.value)return;const me=s.value;if(!me)return;const te=Z.target;te instanceof Node&&(me.contains(te)||(a.value=!1,l.value="",d.value=!1,u.value=""))}return gt(a,Z=>{if(!Z){d.value=!1,u.value="";return}_.value&&Kt(()=>{var me;return(me=o.value)==null?void 0:me.focus()})}),Wn(()=>{window.addEventListener("pointerdown",se)}),qn(()=>{window.removeEventListener("pointerdown",se)}),(Z,me)=>(w(),S("div",{ref_key:"rootRef",ref:s,class:"composer-dropdown"},[m("button",{class:"composer-dropdown-trigger",type:"button",disabled:e.disabled,onClick:H},[m("span",Cy,_e(f.value),1),Ce(bi,{class:"composer-dropdown-chevron"})],8,xy),a.value?(w(),S("div",{key:0,class:dt(["composer-dropdown-menu-wrap",{"composer-dropdown-menu-wrap-up":g.value==="up","composer-dropdown-menu-wrap-down":g.value==="down"}])},[m("div",Ey,[_.value?(w(),S("div",Ay,[In(m("input",{ref_key:"searchInputRef",ref:o,"onUpdate:modelValue":me[0]||(me[0]=te=>l.value=te),class:"composer-dropdown-search-input",type:"text",placeholder:R.value,onKeydown:Ft(Ge(ue,["prevent"]),["esc"])},null,40,Iy),[[Rn,l.value]])])):ce("",!0),m("ul",Ry,[(w(!0),S(Ue,null,yt(N.value,te=>(w(),S("li",{key:te.value},[m("button",{class:dt(["composer-dropdown-option",{"is-selected":te.value===e.modelValue}]),type:"button",onClick:Be=>j(te.value)},_e(te.label),11,$y)]))),128)),N.value.length===0?(w(),S("li",My," No matching projects ")):ce("",!0)]),P.value?(w(),S("div",Py,[d.value?(w(),S(Ue,{key:0},[In(m("input",{ref_key:"addInputRef",ref:i,"onUpdate:modelValue":me[1]||(me[1]=te=>u.value=te),class:"composer-dropdown-add-input",type:"text",placeholder:z.value,onKeydown:[Ft(Ge(de,["prevent"]),["enter"]),Ft(Ge(Te,["prevent"]),["esc"])]},null,40,Ny),[[Rn,u.value]]),m("div",{class:"composer-dropdown-add-actions"},[m("button",{type:"button",class:"composer-dropdown-add-btn",onClick:de},"Open"),m("button",{type:"button",class:"composer-dropdown-add-btn",onClick:Te},"Cancel")])],64)):(w(),S("button",{key:1,type:"button",class:"composer-dropdown-add",onClick:ae},_e(B.value),1))])):ce("",!0)])],2)):ce("",!0)],512))}}),Go=Je(Oy,[["__scopeId","data-v-7cfa2012"]]),jy=["disabled"],Dy={class:"search-dropdown-value"},Ly={class:"search-dropdown-search-wrap"},By=["placeholder","onKeydown"],Fy={key:0,class:"search-dropdown-list",role:"listbox"},Hy=["onClick","onPointerenter"],Uy={class:"search-dropdown-option-check"},Vy={class:"search-dropdown-option-label"},Wy={key:0,class:"search-dropdown-option-desc"},qy={key:1,class:"search-dropdown-empty"},Ky=At({__name:"ComposerSearchDropdown",props:{options:{},selectedValues:{},placeholder:{},searchPlaceholder:{},disabled:{type:Boolean},openDirection:{}},emits:["toggle"],setup(e,{emit:t}){const n=e,r=t,s=O(null),o=O(null),i=O(!1),a=O(""),l=O(0),d=le(()=>n.openDirection??"down"),u=le(()=>new Set(n.selectedValues)),f=le(()=>{if(n.selectedValues.length===0)return n.placeholder||"Select...";if(n.selectedValues.length===1){const N=n.options.find(H=>H.value===n.selectedValues[0]);return(N==null?void 0:N.label)||n.placeholder||"Select..."}return`${n.selectedValues.length} selected`}),g=le(()=>{const N=a.value.toLowerCase().trim();return N?n.options.filter(H=>{var j;return H.label.toLowerCase().includes(N)||(((j=H.description)==null?void 0:j.toLowerCase().includes(N))??!1)}):n.options});function _(){n.disabled||(i.value=!i.value,i.value&&(a.value="",l.value=0,Kt(()=>{var N;return(N=o.value)==null?void 0:N.focus()})))}function P(N){r("toggle",N.value,!u.value.has(N.value))}function R(N){g.value.length!==0&&(l.value=(l.value+N+g.value.length)%g.value.length)}function B(){const N=g.value[l.value];N&&P(N)}function z(N){if(!i.value)return;const H=s.value;if(!H)return;const j=N.target;j instanceof Node&&(H.contains(j)||(i.value=!1))}return gt(a,()=>{l.value=0}),Wn(()=>window.addEventListener("pointerdown",z)),qn(()=>window.removeEventListener("pointerdown",z)),(N,H)=>(w(),S("div",{ref_key:"rootRef",ref:s,class:"search-dropdown"},[m("button",{class:"search-dropdown-trigger",type:"button",disabled:e.disabled,onClick:_},[m("span",Dy,_e(f.value),1),Ce(bi,{class:"search-dropdown-chevron"})],8,jy),i.value?(w(),S("div",{key:0,class:dt(["search-dropdown-menu-wrap",{"search-dropdown-menu-wrap-up":d.value==="up","search-dropdown-menu-wrap-down":d.value==="down"}])},[m("div",Ly,[In(m("input",{ref_key:"searchRef",ref:o,"onUpdate:modelValue":H[0]||(H[0]=j=>a.value=j),class:"search-dropdown-search",type:"text",placeholder:e.searchPlaceholder,onKeydown:[H[1]||(H[1]=Ft(Ge(j=>i.value=!1,["prevent"]),["escape"])),Ft(Ge(B,["prevent"]),["enter"]),H[2]||(H[2]=Ft(Ge(j=>R(1),["prevent"]),["arrow-down"])),H[3]||(H[3]=Ft(Ge(j=>R(-1),["prevent"]),["arrow-up"]))]},null,40,By),[[Rn,a.value]])]),g.value.length>0?(w(),S("ul",Fy,[(w(!0),S(Ue,null,yt(g.value,(j,ae)=>(w(),S("li",{key:j.value},[m("button",{class:dt(["search-dropdown-option",{"is-selected":u.value.has(j.value),"is-highlighted":ae===l.value}]),type:"button",onClick:ue=>P(j),onPointerenter:ue=>l.value=ae},[m("span",Uy,_e(u.value.has(j.value)?"✓":""),1),m("span",Vy,_e(j.label),1),j.description?(w(),S("span",Wy,_e(j.description),1)):ce("",!0)],42,Hy)]))),128))])):(w(),S("div",qy,"No results"))],2)):ce("",!0)],512))}}),Gy=Je(Ky,[["__scopeId","data-v-a0f2edd4"]]),zy={class:"skill-picker-header"},Yy=["onKeydown"],Jy={key:0,class:"skill-picker-list",role:"listbox"},Qy=["onClick","onPointerenter"],Xy={class:"skill-picker-name"},Zy={key:0,class:"skill-picker-desc"},ew={key:1,class:"skill-picker-empty"},tw=At({__name:"ComposerSkillPicker",props:{skills:{},visible:{type:Boolean},anchorBottom:{},anchorLeft:{}},emits:["select","close"],setup(e,{emit:t}){const n=e,r=t,s=O(null),o=O(null),i=O(""),a=O(0),l=le(()=>{const g=i.value.toLowerCase().trim();return g?n.skills.filter(_=>_.name.toLowerCase().includes(g)||_.description.toLowerCase().includes(g)):n.skills}),d=le(()=>{const g={};return n.anchorBottom!=null&&(g.bottom=`${n.anchorBottom}px`),n.anchorLeft!=null&&(g.left=`${n.anchorLeft}px`),g});function u(g){l.value.length!==0&&(a.value=(a.value+g+l.value.length)%l.value.length)}function f(){const g=l.value[a.value];g&&r("select",g)}return gt(()=>n.visible,g=>{g&&(i.value="",a.value=0,Kt(()=>{var _;return(_=o.value)==null?void 0:_.focus()}))}),gt(i,()=>{a.value=0}),(g,_)=>e.visible?(w(),S("div",{key:0,ref_key:"rootRef",ref:s,class:"skill-picker",style:fr(d.value)},[m("div",zy,[In(m("input",{ref_key:"searchInputRef",ref:o,"onUpdate:modelValue":_[0]||(_[0]=P=>i.value=P),class:"skill-picker-search",type:"text",placeholder:"Search skills...",onKeydown:[_[1]||(_[1]=Ft(Ge(P=>g.$emit("close"),["prevent"]),["escape"])),Ft(Ge(f,["prevent"]),["enter"]),_[2]||(_[2]=Ft(Ge(P=>u(1),["prevent"]),["arrow-down"])),_[3]||(_[3]=Ft(Ge(P=>u(-1),["prevent"]),["arrow-up"]))]},null,40,Yy),[[Rn,i.value]])]),l.value.length>0?(w(),S("ul",Jy,[(w(!0),S(Ue,null,yt(l.value,(P,R)=>(w(),S("li",{key:P.path},[m("button",{class:dt(["skill-picker-item",{"is-highlighted":R===a.value}]),type:"button",onClick:B=>g.$emit("select",P),onPointerenter:B=>a.value=R},[m("span",Xy,_e(P.name),1),P.description?(w(),S("span",Zy,_e(P.description),1)):ce("",!0)],42,Qy)]))),128))])):(w(),S("div",ew,"No skills found"))],4)):ce("",!0)}}),nw=Je(tw,[["__scopeId","data-v-d6a08788"]]),rw={key:0,class:"thread-composer-attachments"},sw=["src","alt"],ow=["aria-label","disabled","onClick"],iw={key:1,class:"thread-composer-file-chips"},aw=["title"],lw=["aria-label","disabled","onClick"],cw={key:2,class:"thread-composer-skill-chips"},uw={class:"thread-composer-skill-chip-name"},dw=["aria-label","onClick"],fw={class:"thread-composer-input-wrap"},hw={key:0,class:"thread-composer-file-mentions"},pw=["onMousedown"],mw={key:1,class:"thread-composer-file-mention-icon-markdown"},gw={class:"thread-composer-file-mention-text"},vw={class:"thread-composer-file-mention-name"},yw={key:0,class:"thread-composer-file-mention-dir"},ww={key:1,class:"thread-composer-file-mention-empty"},bw=["placeholder","disabled"],_w={class:"thread-composer-controls"},kw=["disabled"],Tw={key:0,class:"thread-composer-attach-menu"},Sw=["disabled"],xw=["disabled"],Cw={class:"thread-composer-actions"},Ew=["aria-label","title","disabled"],Aw=["disabled"],Iw=["aria-label","title","disabled"],Rw=["disabled"],$w=["disabled"],Mw=At({__name:"ThreadComposer",props:{activeThreadId:{},cwd:{},models:{},selectedModel:{},selectedReasoningEffort:{},skills:{},isTurnInProgress:{type:Boolean},isInterruptingTurn:{type:Boolean},disabled:{type:Boolean},hasQueueAbove:{type:Boolean},sendWithEnter:{type:Boolean},inProgressSubmitMode:{}},emits:["submit","interrupt","update:selected-model","update:selected-reasoning-effort"],setup(e,{emit:t}){const n=e,r=t,s=O(""),o=O([]),i=O([]),a=O([]),{state:l,isSupported:d,startRecording:u,stopRecording:f}=_v({onTranscript:F=>{s.value=s.value?`${s.value}
43
- ${F}`:F}}),g=O(null),_=O(null),P=O(null),R=O(null),B=O(!1),z=O(!1),N=O(null),H=O(""),j=O([]),ae=O(!1),ue=O(0);let de=0,Te=null;const se=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),Z=[{value:"none",label:"None"},{value:"minimal",label:"Minimal"},{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"xhigh",label:"Extra high"}],me=le(()=>n.models.map(F=>({value:F,label:F}))),te=le(()=>n.skills??[]),Be=le(()=>i.value.map(F=>F.path)),He=le(()=>(n.skills??[]).map(F=>({value:F.path,label:F.name,description:F.description}))),ze=le(()=>n.disabled||!n.activeThreadId?!1:s.value.trim().length>0||o.value.length>0||a.value.length>0),Ee=le(()=>n.disabled||!n.activeThreadId),be=le(()=>n.inProgressSubmitMode==="steer"?"steer":"queue"),Pe=le(()=>n.activeThreadId?"Type a message... (@ for files, / for skills)":"Select a thread to send a message");function lt(F="steer"){var J;const W=s.value.trim();if(ze.value){if(r("submit",{text:W,imageUrls:o.value.map(b=>b.url),fileAttachments:[...a.value],skills:i.value.map(b=>({name:b.name,path:b.path})),mode:F}),s.value="",o.value=[],i.value=[],a.value=[],B.value=!1,z.value=!1,ee(),se){(J=R.value)==null||J.blur();return}Kt(()=>{var b;return(b=R.value)==null?void 0:b.focus()})}}function Ze(){r("interrupt")}function it(F){r("update:selected-model",F)}function Ke(F){r("update:selected-reasoning-effort",F)}function et(){Ee.value||(B.value=!B.value)}function he(){var F;(F=_.value)==null||F.click()}function xe(){var F;(F=P.value)==null||F.click()}function Se(F){o.value=o.value.filter(W=>W.id!==F)}function I(F){i.value=i.value.filter(W=>W.path!==F)}function Y(F){a.value=a.value.filter(W=>W.fsPath!==F)}function X(F){const W=F.replace(/\\/g,"/");if(a.value.some(E=>E.fsPath===W))return;const J=W.split("/").filter(Boolean),b=J[J.length-1]??W;a.value=[...a.value,{label:b,path:W,fsPath:W}]}function ge(F){return F.type.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp)$/i.test(F.name)}function $e(F){if(!(!F||F.length===0))for(const W of Array.from(F))if(ge(W)){const J=new FileReader;J.onload=()=>{typeof J.result=="string"&&o.value.push({id:`${Date.now()}-${Math.random().toString(36).slice(2)}`,name:W.name,url:J.result})},J.readAsDataURL(W)}else fy(W).then(J=>{J&&X(J)}).catch(()=>{})}function p(F){F&&(F.value="")}function y(F){const W=F.target;$e((W==null?void 0:W.files)??null),p(W),B.value=!1}function x(F){const W=F.target;$e((W==null?void 0:W.files)??null),p(W),B.value=!1}function D(){const W=s.value.startsWith("/");W!==z.value&&(z.value=W),ne()}function V(F){if(ae.value){if(F.key==="Escape"){F.preventDefault(),ee();return}if(F.key==="ArrowDown"){F.preventDefault(),j.value.length>0&&(ue.value=(ue.value+1)%j.value.length);return}if(F.key==="ArrowUp"){if(F.preventDefault(),j.value.length>0){const J=j.value.length;ue.value=(ue.value+J-1)%J}return}if(F.key==="Enter"||F.key==="Tab"){F.preventDefault();const J=j.value[ue.value];J?U(J):ee();return}}if(n.sendWithEnter!==!1?F.key==="Enter"&&!F.shiftKey:F.key==="Enter"&&(F.metaKey||F.ctrlKey)){F.preventDefault(),lt(n.isTurnInProgress?be.value:"steer");return}if(z.value){if(F.key==="Escape"){F.preventDefault(),L();return}if(F.key==="ArrowDown"||F.key==="ArrowUp"){F.preventDefault();return}}}function L(){var F;z.value=!1,(F=R.value)==null||F.focus()}function ee(){ae.value=!1,N.value=null,H.value="",j.value=[],ue.value=0}function ne(){const F=R.value;if(!F){ee();return}const W=F.selectionStart??s.value.length,b=s.value.slice(0,W).match(/(^|\s)(@[^\s@]*)$/);if(!b){ee();return}const E=b[2]??"",A=E.length,re=W-A;N.value=re,H.value=E.slice(1),ae.value=!0,Q()}async function Q(){if(!ae.value)return;const F=(n.cwd??"").trim();if(!F){j.value=[];return}Te&&clearTimeout(Te);const W=++de;Te=setTimeout(async()=>{try{const J=await ly(F,H.value,20);if(!ae.value||W!==de)return;j.value=J,ue.value=0}catch{if(!ae.value||W!==de)return;j.value=[]}},120)}function U(F){const W=R.value,J=N.value;if(J!==null&&W){const b=W.selectionStart??s.value.length;s.value=`${s.value.slice(0,J)}${s.value.slice(b)}`.trimEnd()}X(F.path),ee(),Kt(()=>W==null?void 0:W.focus())}function fe(F){const W=F.lastIndexOf("/");return W<0?F:F.slice(W+1)}function ie(F){const W=F.lastIndexOf("/");return W<=0?"":F.slice(0,W)}function ve(F){const W=fe(F),J=W.lastIndexOf(".");return J<=0?"":W.slice(J+1).toLowerCase()}function ye(F){const W=ve(F);return W==="ts"?"TS":W==="tsx"?"TSX":W==="js"?"JS":W==="jsx"?"JSX":W==="json"?"{}":""}function De(F){const W=ve(F);return W.startsWith("ts")?"ts":W.startsWith("js")?"js":W==="json"?"json":"default"}function qe(F){const W=ve(F);return W==="md"||W==="mdx"}function Me(F){var W;i.value.some(J=>J.path===F.path)||(i.value=[...i.value,F]),s.value=s.value.startsWith("/")?"":s.value,z.value=!1,(W=R.value)==null||W.focus()}function tt(F,W){if(W){const J=(n.skills??[]).find(b=>b.path===F);J&&!i.value.some(b=>b.path===F)&&(i.value=[...i.value,J])}else i.value=i.value.filter(J=>J.path!==F)}function ft(F){if(!B.value)return;const W=g.value;if(!W)return;const J=F.target;!J||W.contains(J)||(B.value=!1)}return Wn(()=>{document.addEventListener("click",ft)}),qn(()=>{document.removeEventListener("click",ft),Te&&clearTimeout(Te)}),gt(()=>n.activeThreadId,()=>{s.value="",o.value=[],i.value=[],a.value=[],B.value=!1,z.value=!1,ee()}),gt(()=>n.cwd,()=>{ae.value&&Q()}),(F,W)=>(w(),S("form",{class:"thread-composer",onSubmit:W[7]||(W[7]=Ge(J=>lt("steer"),["prevent"]))},[m("div",{class:dt(["thread-composer-shell",{"thread-composer-shell--no-top-radius":e.hasQueueAbove}])},[o.value.length>0?(w(),S("div",rw,[(w(!0),S(Ue,null,yt(o.value,J=>(w(),S("div",{key:J.id,class:"thread-composer-attachment"},[m("img",{class:"thread-composer-attachment-image",src:J.url,alt:J.name||"Selected image"},null,8,sw),m("button",{class:"thread-composer-attachment-remove",type:"button","aria-label":`Remove ${J.name||"image"}`,disabled:Ee.value,onClick:b=>Se(J.id)}," x ",8,ow)]))),128))])):ce("",!0),a.value.length>0?(w(),S("div",iw,[(w(!0),S(Ue,null,yt(a.value,J=>(w(),S("span",{key:J.fsPath,class:"thread-composer-file-chip"},[Ce(js,{class:"thread-composer-file-chip-icon"}),m("span",{class:"thread-composer-file-chip-name",title:J.fsPath},_e(J.label),9,aw),m("button",{class:"thread-composer-file-chip-remove",type:"button","aria-label":`Remove ${J.label}`,disabled:Ee.value,onClick:b=>Y(J.fsPath)},"×",8,lw)]))),128))])):ce("",!0),i.value.length>0?(w(),S("div",cw,[(w(!0),S(Ue,null,yt(i.value,J=>(w(),S("span",{key:J.path,class:"thread-composer-skill-chip"},[m("span",uw,_e(J.name),1),m("button",{class:"thread-composer-skill-chip-remove",type:"button","aria-label":`Remove skill ${J.name}`,onClick:b=>I(J.path)},"×",8,dw)]))),128))])):ce("",!0),m("div",fw,[ae.value?(w(),S("div",hw,[j.value.length>0?(w(!0),S(Ue,{key:0},yt(j.value,(J,b)=>(w(),S("button",{key:J.path,class:dt(["thread-composer-file-mention-row",{"is-active":b===ue.value}]),type:"button",onMousedown:Ge(E=>U(J),["prevent"])},[ye(J.path)?(w(),S("span",{key:0,class:dt(["thread-composer-file-mention-icon-badge",`is-${De(J.path)}`])},_e(ye(J.path)),3)):qe(J.path)?(w(),S("span",mw,"↓")):(w(),pt(js,{key:2,class:"thread-composer-file-mention-icon-file"})),m("span",gw,[m("span",vw,_e(fe(J.path)),1),ie(J.path)?(w(),S("span",yw,_e(ie(J.path)),1)):ce("",!0)])],42,pw))),128)):(w(),S("div",ww,"No matching files"))])):ce("",!0),In(m("textarea",{ref_key:"inputRef",ref:R,"onUpdate:modelValue":W[0]||(W[0]=J=>s.value=J),class:"thread-composer-input",placeholder:Pe.value,disabled:Ee.value,onInput:D,onKeydown:V},null,40,bw),[[Rn,s.value]]),Ce(nw,{skills:te.value,visible:z.value,"anchor-bottom":44,"anchor-left":0,onSelect:Me,onClose:L},null,8,["skills","visible"])]),m("div",_w,[m("div",{ref_key:"attachMenuRootRef",ref:g,class:"thread-composer-attach"},[m("button",{class:"thread-composer-attach-trigger",type:"button","aria-label":"Add photos & files",disabled:Ee.value,onClick:et}," + ",8,kw),B.value?(w(),S("div",Tw,[m("button",{class:"thread-composer-attach-item",type:"button",disabled:Ee.value,onClick:he}," Add photos & files ",8,Sw),m("button",{class:"thread-composer-attach-item",type:"button",disabled:Ee.value,onClick:xe}," Take photo ",8,xw)])):ce("",!0)],512),Ce(Go,{class:"thread-composer-control","model-value":e.selectedModel,options:me.value,placeholder:"Model","open-direction":"up",disabled:e.disabled||!e.activeThreadId||e.models.length===0||e.isTurnInProgress,"onUpdate:modelValue":it},null,8,["model-value","options","disabled"]),Ce(Gy,{class:"thread-composer-control",options:He.value,"selected-values":Be.value,placeholder:"Skills","search-placeholder":"Search skills...","open-direction":"up",disabled:e.disabled||!e.activeThreadId||e.isTurnInProgress,onToggle:tt},null,8,["options","selected-values","disabled"]),Ce(Go,{class:"thread-composer-control","model-value":e.selectedReasoningEffort,options:Z,placeholder:"Thinking","open-direction":"up",disabled:e.disabled||!e.activeThreadId||e.isTurnInProgress,"onUpdate:modelValue":Ke},null,8,["model-value","disabled"]),m("div",Cw,[Oe(d)&&!e.isTurnInProgress?(w(),S("button",{key:0,class:dt(["thread-composer-mic",{"thread-composer-mic--active":Oe(l)!=="idle"}]),type:"button","aria-label":Oe(l)==="recording"?"Stop dictation":"Hold to dictate",title:Oe(l)==="recording"?"Release to transcribe":"Hold to dictate",disabled:Ee.value,onMousedown:W[1]||(W[1]=Ge((...J)=>Oe(u)&&Oe(u)(...J),["prevent"])),onMouseup:W[2]||(W[2]=(...J)=>Oe(f)&&Oe(f)(...J)),onMouseleave:W[3]||(W[3]=J=>Oe(l)==="recording"&&Oe(f)()),onTouchstart:W[4]||(W[4]=Ge((...J)=>Oe(u)&&Oe(u)(...J),["prevent"])),onTouchend:W[5]||(W[5]=(...J)=>Oe(f)&&Oe(f)(...J))},[Ce(by,{class:"thread-composer-mic-icon"})],42,Ew)):ce("",!0),e.isTurnInProgress?(w(),S("button",{key:1,class:"thread-composer-stop",type:"button","aria-label":"Stop",disabled:e.disabled||!e.activeThreadId||e.isInterruptingTurn,onClick:Ze},[Ce(Sy,{class:"thread-composer-stop-icon"})],8,Aw)):ce("",!0),m("button",{class:dt(["thread-composer-submit",{"thread-composer-submit--queue":e.isTurnInProgress&&be.value==="queue"}]),type:"button","aria-label":e.isTurnInProgress&&be.value==="queue"?"Queue message":"Send message",title:e.isTurnInProgress?`Send as ${be.value}`:"Send",disabled:!ze.value,onClick:W[6]||(W[6]=J=>lt(e.isTurnInProgress?be.value:"steer"))},[Ce(gy,{class:"thread-composer-submit-icon"})],10,Iw)])])],2),m("input",{ref_key:"photoLibraryInputRef",ref:_,class:"thread-composer-hidden-input",type:"file",multiple:"",disabled:Ee.value,onChange:y},null,40,Rw),m("input",{ref_key:"cameraCaptureInputRef",ref:P,class:"thread-composer-hidden-input",type:"file",accept:"image/*",capture:"environment",disabled:Ee.value,onChange:x},null,40,$w)],32))}}),Qa=Je(Mw,[["__scopeId","data-v-983e7906"]]),Pw={key:0,class:"queued-messages"},Nw={class:"queued-messages-inner"},Ow={class:"queued-row-text"},jw={class:"queued-row-actions"},Dw=["onClick"],Lw=["onClick"],Bw=At({__name:"QueuedMessages",props:{messages:{}},emits:["steer","delete"],setup(e){return(t,n)=>e.messages.length>0?(w(),S("div",Pw,[m("div",Nw,[(w(!0),S(Ue,null,yt(e.messages,r=>(w(),S("div",{key:r.id,class:"queued-row"},[n[1]||(n[1]=m("svg",{class:"queued-row-icon",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"},[m("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})],-1)),m("span",Ow,_e(r.text),1),m("div",jw,[m("button",{class:"queued-row-steer",type:"button",title:"Send now without interrupting work",onClick:s=>t.$emit("steer",r.id)},"Steer",8,Dw),m("button",{class:"queued-row-delete",type:"button","aria-label":"Delete queued message",title:"Delete queued message",onClick:s=>t.$emit("delete",r.id)},[...n[0]||(n[0]=[m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"},[m("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 7h16M10 11v6M14 11v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3"})],-1)])],8,Lw)])]))),128))])])):ce("",!0)}}),Fw=Je(Bw,[["__scopeId","data-v-ea583733"]]),Hw={},Uw={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"};function Vw(e,t){return w(),S("svg",Uw,[...t[0]||(t[0]=[m("circle",{cx:"11",cy:"11",r:"8"},null,-1),m("path",{d:"m21 21-4.35-4.35"},null,-1)])])}const zo=Je(Hw,[["render",Vw]]),Ww={class:"skill-card-top"},qw=["src","alt"],Kw={key:1,class:"skill-card-avatar-fallback"},Gw={class:"skill-card-info"},zw={class:"skill-card-header"},Yw={class:"skill-card-name"},Jw={key:0,class:"skill-card-badge-disabled"},Qw={key:1,class:"skill-card-badge"},Xw={class:"skill-card-owner"},Zw={key:0,class:"skill-card-desc"},eb={key:1,class:"skill-card-date"},tb=At({__name:"SkillCard",props:{skill:{}},emits:["select"],setup(e){const t=e,n=le(()=>{const s=t.skill.publishedAt;if(!s)return"";const o=new Date(s),a=Date.now()-s;return a<36e5?`${Math.floor(a/6e4)}m ago`:a<864e5?`${Math.floor(a/36e5)}h ago`:a<2592e6?`${Math.floor(a/864e5)}d ago`:o.toLocaleDateString("en-US",{month:"short",day:"numeric"})});function r(s){const o=s.target;o.style.display="none"}return(s,o)=>(w(),S("button",{class:dt(["skill-card",{"is-disabled":e.skill.installed&&e.skill.enabled===!1}]),type:"button",onClick:o[0]||(o[0]=i=>s.$emit("select",e.skill))},[m("div",Ww,[e.skill.avatarUrl?(w(),S("img",{key:0,class:"skill-card-avatar",src:e.skill.avatarUrl,alt:e.skill.owner,loading:"lazy",onError:r},null,40,qw)):(w(),S("div",Kw,_e(e.skill.owner.charAt(0)),1)),m("div",Gw,[m("div",zw,[m("span",Yw,_e(e.skill.displayName||e.skill.name),1),e.skill.installed&&e.skill.enabled===!1?(w(),S("span",Jw,"Disabled")):e.skill.installed?(w(),S("span",Qw,"Installed")):ce("",!0)]),m("span",Xw,_e(e.skill.owner),1)])]),e.skill.description?(w(),S("p",Zw,_e(e.skill.description),1)):ce("",!0),n.value?(w(),S("span",eb,_e(n.value),1)):ce("",!0)],2))}}),Xa=Je(tb,[["__scopeId","data-v-2a1e8196"]]),nb={class:"sdm-panel"},rb={class:"sdm-header"},sb={class:"sdm-title-area"},ob=["src","alt"],ib={class:"sdm-title-col"},ab={class:"sdm-title-row"},lb={class:"sdm-title"},cb={key:0,class:"sdm-badge-disabled"},ub={class:"sdm-owner"},db={class:"sdm-body"},fb={key:0,class:"sdm-desc"},hb={key:1,class:"sdm-readme-loading"},pb=["innerHTML"],mb=["href"],gb={class:"sdm-footer"},vb={class:"sdm-footer-actions"},yb=["disabled"],wb=["disabled"],bb=["disabled"],_b=At({__name:"SkillDetailModal",props:{skill:{},visible:{type:Boolean},isInstalling:{type:Boolean},isUninstalling:{type:Boolean}},emits:["close","install","uninstall","toggle-enabled"],setup(e,{emit:t}){const n=e,r=t,s=O(null),o=O(""),i=O(!1),a=le(()=>s.value??n.skill.enabled??!0),l=le(()=>n.isInstalling===!0||n.isUninstalling===!0),d=le(()=>{const R=o.value;if(!R)return"";const B=R.replace(/^---[\s\S]*?---\s*/,"");return u(B)});function u(R){return R.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/^### (.+)$/gm,"<h4>$1</h4>").replace(/^## (.+)$/gm,"<h3>$1</h3>").replace(/^# (.+)$/gm,"<h2>$1</h2>").replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/`([^`]+)`/g,"<code>$1</code>").replace(/^- (.+)$/gm,"<li>$1</li>").replace(/(<li>.*<\/li>\n?)+/g,"<ul>$&</ul>").replace(/\n{2,}/g,"<br/><br/>").replace(/\n/g,"<br/>")}async function f(){if(!(!n.skill.owner||!n.skill.name)){i.value=!0,o.value="";try{const R=new URLSearchParams({owner:n.skill.owner,name:n.skill.name}),B=await fetch(`/codex-api/skills-hub/readme?${R}`);if(!B.ok)return;const z=await B.json();o.value=z.content??""}catch{}finally{i.value=!1}}}gt(()=>n.visible,R=>{R&&(s.value=null,o.value="",f())});function g(){r("install",n.skill)}function _(){r("uninstall",n.skill)}function P(){const R=!a.value;s.value=R,r("toggle-enabled",n.skill,R)}return(R,B)=>(w(),pt($s,{to:"body"},[e.visible?(w(),S("div",{key:0,class:"sdm-overlay",onClick:B[1]||(B[1]=Ge(z=>R.$emit("close"),["self"]))},[m("div",nb,[m("div",rb,[m("div",sb,[e.skill.avatarUrl?(w(),S("img",{key:0,class:"sdm-avatar",src:e.skill.avatarUrl,alt:e.skill.owner,loading:"lazy"},null,8,ob)):ce("",!0),m("div",ib,[m("div",ab,[m("h3",lb,_e(e.skill.displayName||e.skill.name),1),e.skill.installed&&!a.value?(w(),S("span",cb,"Disabled")):ce("",!0)]),m("span",ub,_e(e.skill.owner),1)])]),m("button",{class:"sdm-close",type:"button","aria-label":"Close",onClick:B[0]||(B[0]=z=>R.$emit("close"))},[Ce(_i,{class:"sdm-close-icon"})])]),m("div",db,[e.skill.description?(w(),S("p",fb,_e(e.skill.description),1)):ce("",!0),i.value?(w(),S("div",hb,"Loading skill contents...")):o.value?(w(),S("div",{key:2,class:"sdm-readme",innerHTML:d.value},null,8,pb)):ce("",!0),m("a",{class:"sdm-link",href:e.skill.url,target:"_blank",rel:"noopener noreferrer"},"View on GitHub",8,mb)]),m("div",gb,[m("div",vb,[e.skill.installed?(w(),S("button",{key:0,class:"sdm-btn sdm-btn-danger",type:"button",disabled:l.value,onClick:_},_e(n.isUninstalling?"Uninstalling...":"Uninstall"),9,yb)):(w(),S("button",{key:1,class:"sdm-btn sdm-btn-primary",type:"button",disabled:l.value,onClick:g},_e(n.isInstalling?"Installing...":"Install"),9,wb)),e.skill.installed?(w(),S("button",{key:2,class:"sdm-btn sdm-btn-secondary",type:"button",disabled:l.value,onClick:P},_e(a.value?"Disable":"Enable"),9,bb)):ce("",!0)])])])])):ce("",!0)]))}}),kb=Je(_b,[["__scopeId","data-v-19a385ca"]]),Tb={class:"skills-hub"},Sb={class:"skills-hub-toolbar"},xb={class:"skills-hub-search-wrap"},Cb={key:0,class:"skills-hub-count"},Eb={key:1,class:"skills-hub-section"},Ab={class:"skills-hub-section-title"},Ib={key:0,class:"skills-hub-grid"},Rb={class:"skills-hub-section"},$b={key:0,class:"skills-hub-loading"},Mb={key:1,class:"skills-hub-error"},Pb={key:0,class:"skills-hub-grid"},Nb={key:1,class:"skills-hub-empty"},ws="codex-web-local.skills-hub.cache.v1",Ob=At({__name:"SkillsHub",emits:["skills-changed"],setup(e,{emit:t}){const n={name:"",owner:"",description:"",url:"",installed:!1},r=O(null),s=O(""),o=O("date"),i=O([]),a=O([]),l=O(0),d=O(!1),u=O(""),f=O(!0),g=O(!1),_=O(n),P=O(null),R=O(""),B=O(!1),z=O(!1);let N=null,H=null;const j=t,ae=le(()=>o.value==="date"?"Newest":"A-Z"),ue=le(()=>{var he;return((he=P.value)==null?void 0:he.type)==="error"?"skills-hub-toast-error":"skills-hub-toast-success"}),de=le(()=>`${_.value.owner}/${_.value.name}`),Te=le(()=>B.value&&R.value===de.value),se=le(()=>z.value&&R.value===de.value),Z=le(()=>{const he=s.value.toLowerCase().trim();return he?a.value.filter(xe=>xe.name.toLowerCase().includes(he)||xe.owner.toLowerCase().includes(he)||(xe.displayName??"").toLowerCase().includes(he)):a.value});function me(he,xe="success"){P.value={text:he,type:xe},H&&clearTimeout(H),H=setTimeout(()=>{P.value=null},3e3)}function te(){o.value=o.value==="date"?"name":"date",Pe(s.value)}function Be(he){return`${o.value}::${he.trim().toLowerCase()}`}function He(he){var xe;if(typeof window>"u")return null;try{const Se=window.localStorage.getItem(ws);return Se?((xe=JSON.parse(Se).byKey)==null?void 0:xe[he])??null:null}catch{return null}}function ze(he,xe){if(!(typeof window>"u"))try{const Se=window.localStorage.getItem(ws),Y=(Se?JSON.parse(Se):{}).byKey??{};Y[he]=xe,window.localStorage.setItem(ws,JSON.stringify({byKey:Y}))}catch{}}function Ee(){if(!(typeof window>"u"))try{window.localStorage.removeItem(ws)}catch{}}function be(he){const xe=he.installed??[];a.value=xe;const Se=new Set(xe.map(I=>I.name));i.value=he.data.map(I=>{if(I.installed||Se.has(I.name)){const Y=xe.find(X=>X.name===I.name);return{...I,installed:!0,path:(Y==null?void 0:Y.path)??I.path,enabled:(Y==null?void 0:Y.enabled)??I.enabled}}return I}).filter(I=>!I.installed),l.value=he.total}async function Pe(he){const xe=Be(he),Se=He(xe);Se&&be(Se),d.value=!Se,u.value="";try{const I=new URLSearchParams;he.trim()&&I.set("q",he.trim()),I.set("limit","100"),I.set("sort",o.value);const Y=await fetch(`/codex-api/skills-hub?${I}`);if(!Y.ok)throw new Error(`HTTP ${Y.status}`);const X=await Y.json();be(X),ze(xe,X)}catch(I){u.value=I instanceof Error?I.message:"Failed to load skills"}finally{d.value=!1}}function lt(){N&&clearTimeout(N),N=setTimeout(()=>Pe(s.value),300)}function Ze(he){_.value=he,g.value=!0}async function it(he){R.value=`${he.owner}/${he.name}`,B.value=!0;try{const Se=await(await fetch("/codex-api/skills-hub/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({owner:he.owner,name:he.name})})).json();if(!Se.ok)throw new Error(Se.error||"Install failed");const I={...he,installed:!0,path:Se.path,enabled:!0};a.value=[...a.value,I],i.value=i.value.filter(Y=>Y.name!==he.name),_.value=I,me(`${he.displayName||he.name} skill installed`),g.value=!1,Ee(),j("skills-changed")}catch(xe){me(xe instanceof Error?xe.message:"Failed to install skill","error")}finally{B.value=!1}}async function Ke(he){R.value=`${he.owner}/${he.name}`,z.value=!0;try{const Se=await(await fetch("/codex-api/skills-hub/uninstall",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:he.name,path:he.path})})).json();if(!Se.ok)throw new Error(Se.error||"Uninstall failed");a.value=a.value.filter(I=>I.name!==he.name),he.owner!=="local"&&(i.value=[...i.value,{...he,installed:!1,path:void 0,enabled:void 0}]),me(`${he.displayName||he.name} skill uninstalled`),g.value=!1,Ee(),j("skills-changed")}catch(xe){me(xe instanceof Error?xe.message:"Failed to uninstall skill","error")}finally{z.value=!1}}async function et(he,xe){try{if(!(await fetch("/codex-api/rpc",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({method:"skills/config/write",params:{path:he.path,enabled:xe}})})).ok)throw new Error("Failed to update skill");me(`${he.displayName||he.name} skill ${xe?"enabled":"disabled"}`),await Pe(s.value)}catch(Se){me(Se instanceof Error?Se.message:"Failed to update skill","error")}}return Wn(()=>{Pe("")}),(he,xe)=>(w(),S("div",Tb,[xe[3]||(xe[3]=m("div",{class:"skills-hub-header"},[m("h2",{class:"skills-hub-title"},"Skills Hub"),m("p",{class:"skills-hub-subtitle"},"Browse and discover skills from the OpenClaw community")],-1)),m("div",Sb,[m("div",xb,[Ce(zo,{class:"skills-hub-search-icon"}),In(m("input",{ref_key:"searchRef",ref:r,"onUpdate:modelValue":xe[0]||(xe[0]=Se=>s.value=Se),class:"skills-hub-search",type:"text",placeholder:"Search skills... (e.g. flight, docker, react)",onInput:lt},null,544),[[Rn,s.value]]),l.value>0?(w(),S("span",Cb,_e(l.value)+" skills",1)):ce("",!0)]),m("button",{class:"skills-hub-sort",type:"button",onClick:te},_e(ae.value),1)]),P.value?(w(),S("div",{key:0,class:dt(["skills-hub-toast",ue.value])},_e(P.value.text),3)):ce("",!0),Z.value.length>0?(w(),S("div",Eb,[m("button",{class:"skills-hub-section-toggle",type:"button",onClick:xe[1]||(xe[1]=Se=>f.value=!f.value)},[m("span",Ab,"Installed ("+_e(Z.value.length)+")",1),Ce(Lc,{class:dt(["skills-hub-section-chevron",{"is-open":f.value}])},null,8,["class"])]),f.value?(w(),S("div",Ib,[(w(!0),S(Ue,null,yt(Z.value,Se=>(w(),pt(Xa,{key:Se.name,skill:Se,onSelect:I=>Ze(I)},null,8,["skill","onSelect"]))),128))])):ce("",!0)])):ce("",!0),m("div",Rb,[d.value?(w(),S("div",$b,"Loading skills...")):u.value?(w(),S("div",Mb,_e(u.value),1)):(w(),S(Ue,{key:2},[i.value.length>0?(w(),S("div",Pb,[(w(!0),S(Ue,null,yt(i.value,Se=>(w(),pt(Xa,{key:Se.url,skill:Se,onSelect:I=>Ze(I)},null,8,["skill","onSelect"]))),128))])):s.value.trim()?(w(),S("div",Nb,'No skills found for "'+_e(s.value)+'"',1)):ce("",!0)],64))]),Ce(kb,{skill:_.value,visible:g.value,"is-installing":Te.value,"is-uninstalling":se.value,onClose:xe[2]||(xe[2]=Se=>g.value=!1),onInstall:it,onUninstall:Ke,onToggleEnabled:et},null,8,["skill","visible","is-installing","is-uninstalling"])]))}}),jb=Je(Ob,[["__scopeId","data-v-1967b404"]]),Db={},Lb={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"};function Bb(e,t){return w(),S("svg",Lb,[...t[0]||(t[0]=[m("path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12"},null,-1),m("path",{d:"M9 4l0 16"},null,-1)])])}const Fb=Je(Db,[["render",Bb]]),Hb={},Ub={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"};function Vb(e,t){return w(),S("svg",Ub,[...t[0]||(t[0]=[m("path",{d:"M6 21a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3zm12 -16h-8v14h8a1 1 0 0 0 1 -1v-12a1 1 0 0 0 -1 -1"},null,-1)])])}const Wb=Je(Hb,[["render",Vb]]),qb={},Kb={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"};function Gb(e,t){return w(),S("svg",Kb,[...t[0]||(t[0]=[m("path",{d:"M20 11a8.1 8.1 0 0 0-15.5-2m-.5-4v4h4"},null,-1),m("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"},null,-1)])])}const zb=Je(qb,[["render",Gb]]),Yb={class:"sidebar-thread-controls"},Jb=["aria-label","title"],Qb=["aria-pressed","aria-label","title"],Xb=At({__name:"SidebarThreadControls",props:{isSidebarCollapsed:{type:Boolean},isAutoRefreshEnabled:{type:Boolean},autoRefreshButtonLabel:{},showNewThreadButton:{type:Boolean}},emits:["toggle-sidebar","toggle-auto-refresh","start-new-thread"],setup(e){return(t,n)=>(w(),S("div",Yb,[m("button",{class:"sidebar-thread-controls-button",type:"button","aria-label":e.isSidebarCollapsed?"Expand sidebar":"Collapse sidebar",title:e.isSidebarCollapsed?"Expand sidebar":"Collapse sidebar",onClick:n[0]||(n[0]=r=>t.$emit("toggle-sidebar"))},[e.isSidebarCollapsed?(w(),pt(Wb,{key:0,class:"sidebar-thread-controls-icon"})):(w(),pt(Fb,{key:1,class:"sidebar-thread-controls-icon"}))],8,Jb),m("button",{class:"sidebar-thread-controls-button",type:"button","aria-pressed":e.isAutoRefreshEnabled,"aria-label":e.autoRefreshButtonLabel,title:e.autoRefreshButtonLabel,onClick:n[1]||(n[1]=r=>t.$emit("toggle-auto-refresh"))},[Ce(zb,{class:"sidebar-thread-controls-icon"})],8,Qb),fn(t.$slots,"default",{},void 0),e.showNewThreadButton?(w(),S("button",{key:0,class:"sidebar-thread-controls-button",type:"button","aria-label":"Start new thread",title:"Start new thread",onClick:n[2]||(n[2]=r=>t.$emit("start-new-thread"))},[Ce(js,{class:"sidebar-thread-controls-icon"})])):ce("",!0)]))}}),Za=Je(Xb,[["__scopeId","data-v-57866500"]]),Zb={},e0={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function t0(e,t){return w(),S("svg",e0,[...t[0]||(t[0]=[m("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[m("path",{d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 0 0-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 0 0-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 0 0-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 0 0-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 0 0 1.066-2.573c-.94-1.543.826-3.31 2.37-2.37c1 .608 2.296.07 2.572-1.065"}),m("path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0-6 0"})],-1)])])}const n0=Je(Zb,[["render",t0]]);function Fn(e){return e.flatMap(t=>t.threads)}const Uc="codex-web-local.thread-read-state.v1",Vc="codex-web-local.thread-scroll-state.v1",Yo="codex-web-local.selected-thread-id.v1",Wc="codex-web-local.project-order.v1",qc="codex-web-local.project-display-name.v1",Kc="codex-web-local.auto-refresh-enabled.v1",So=220,Kr=4e3,el=["none","minimal","low","medium","high","xhigh"],Gr="__global__",zt="gpt-5.2-codex";function r0(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(Uc);if(!e)return{};const t=JSON.parse(e);return!t||typeof t!="object"||Array.isArray(t)?{}:t}catch{return{}}}function tl(e){typeof window>"u"||window.localStorage.setItem(Uc,JSON.stringify(e))}function s0(){return typeof window>"u"?!1:window.localStorage.getItem(Kc)==="1"}function nl(e){typeof window>"u"||window.localStorage.setItem(Kc,e?"1":"0")}function Gc(e,t,n){return Math.min(Math.max(e,t),n)}function o0(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e;if(typeof t.scrollTop!="number"||!Number.isFinite(t.scrollTop)||typeof t.isAtBottom!="boolean")return null;const n={scrollTop:Math.max(0,t.scrollTop),isAtBottom:t.isAtBottom};return typeof t.scrollRatio=="number"&&Number.isFinite(t.scrollRatio)&&(n.scrollRatio=Gc(t.scrollRatio,0,1)),n}function i0(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(Vc);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const n={};for(const[r,s]of Object.entries(t)){if(!r)continue;const o=o0(s);o&&(n[r]=o)}return n}catch{return{}}}function rl(e){typeof window>"u"||window.localStorage.setItem(Vc,JSON.stringify(e))}function a0(){return typeof window>"u"?"":window.localStorage.getItem(Yo)??""}function l0(e){if(!(typeof window>"u")){if(!e){window.localStorage.removeItem(Yo);return}window.localStorage.setItem(Yo,e)}}function c0(){if(typeof window>"u")return[];try{const e=window.localStorage.getItem(Wc);if(!e)return[];const t=JSON.parse(e);if(!Array.isArray(t))return[];const n=[];for(const r of t)typeof r=="string"&&r.length>0&&!n.includes(r)&&n.push(r);return n}catch{return[]}}function br(e){typeof window>"u"||window.localStorage.setItem(Wc,JSON.stringify(e))}function u0(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(qc);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const n={};for(const[r,s]of Object.entries(t))typeof r=="string"&&r.length>0&&typeof s=="string"&&(n[r]=s);return n}catch{return{}}}function xo(e){typeof window>"u"||window.localStorage.setItem(qc,JSON.stringify(e))}function bs(e,t){const n=[];for(const r of e)n.includes(r)||n.push(r);for(const r of t)n.includes(r.projectName)||n.push(r.projectName);return lr(e,n)?e:n}function Co(e,t){const n=new Map(e.map(s=>[s.projectName,s])),r=t.map(s=>n.get(s)??{projectName:s,threads:[]});for(const s of e)t.includes(s.projectName)||r.push(s);return r}function lr(e,t){const n=Array.isArray(e)?e:[],r=Array.isArray(t)?t:[];if(n.length!==r.length)return!1;for(let s=0;s<n.length;s+=1)if(n[s]!==r[s])return!1;return!0}function d0(e,t,n){if(t<0||t>=e.length||n<0||n>=e.length||t===n)return e;const r=[...e],[s]=r.splice(t,1);return r.splice(n,0,s),r}function f0(e,t){return!e&&!t?!0:!e||!t?!1:e.status===t.status&&e.aggregatedOutput===t.aggregatedOutput&&e.exitCode===t.exitCode}function _s(e){if(!(e instanceof Error))return!1;const t=e.message.toLowerCase();return t.includes("not supported when using codex with a chatgpt account")||t.includes("model is not supported")}function Jo(e,t){return e.id===t.id&&e.role===t.role&&e.text===t.text&&lr(e.images,t.images)&&e.messageType===t.messageType&&e.rawPayload===t.rawPayload&&e.isUnhandled===t.isUnhandled&&f0(e.commandExecution,t.commandExecution)&&e.turnIndex===t.turnIndex}function Ds(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function h0(e,t,n={}){const r=new Map(e.map(u=>[u.id,u])),s=new Map(t.map(u=>[u.id,u])),o=t.map(u=>{const f=r.get(u.id);return f&&Jo(f,u)?f:u});if(n.preserveMissing!==!0)return Ds(e,o)?e:o;const i=e.map(u=>{const f=s.get(u.id);return!f||Jo(u,f)?u:f}),a=new Set(e.map(u=>u.id)),l=o.filter(u=>!a.has(u.id)),d=[...i,...l];return Ds(e,d)?e:d}function Qo(e){return e.replace(/\s+/gu," ").trim()}function p0(e,t){const n=new Set(t.filter(s=>s.role==="assistant").map(s=>Qo(s.text)).filter(s=>s.length>0));if(n.size===0)return e;const r=e.filter(s=>{if(s.messageType!=="agentMessage.live")return!0;const o=Qo(s.text);return o.length===0?!1:!n.has(o)});return r.length===e.length?e:r}function sl(e,t){const n=e.findIndex(o=>o.id===t.id);if(n<0)return[...e,t];const r=e[n];if(Jo(r,t))return e;const s=[...e];return s.splice(n,1,t),s}const zc="worked";function jn(e){if(!e)return null;const t=new Date(e).getTime();return Number.isNaN(t)?null:t}function m0(e){if(!Number.isFinite(e)||e<=0)return"<1s";const t=Math.max(1,Math.round(e/1e3)),n=Math.floor(t/3600),r=Math.floor(t%3600/60),s=t%60,o=[];n>0&&o.push(`${n}h`),(r>0||n>0)&&o.push(`${r}m`);const i=s>0||o.length===0?s:0;return o.push(`${i}s`),o.join(" ")}function g0(e,t){return!e&&!t?!0:!e||!t?!1:e.turnId===t.turnId&&e.durationMs===t.durationMs}function v0(e,t){if(!e&&!t)return!0;if(!e||!t||e.label!==t.label||e.details.length!==t.details.length)return!1;for(let n=0;n<e.details.length;n+=1)if(e.details[n]!==t.details[n])return!1;return!0}function y0(e){return{id:`turn-summary:${e.turnId}`,role:"system",text:`Worked for ${m0(e.durationMs)}`,messageType:zc}}function w0(e){for(let t=e.length-1;t>=0;t-=1)if(e[t].role==="assistant")return t;return-1}function b0(e,t){const n=y0(t),r=e.filter(i=>i.messageType!==zc),s=w0(r);if(s<0)return[...r,n];const o=[...r];return o.splice(s,0,n),o}function Ct(e,t){if(!(t in e))return e;const n={...e};return delete n[t],n}function _0(e,t){return e.id===t.id&&e.title===t.title&&e.projectName===t.projectName&&e.cwd===t.cwd&&e.createdAtIso===t.createdAtIso&&e.updatedAtIso===t.updatedAtIso&&e.preview===t.preview&&e.unread===t.unread&&e.inProgress===t.inProgress}function k0(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function T0(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function Rt(e,t){const n=Object.entries(e).filter(([r])=>t.has(r));return n.length===Object.keys(e).length?e:Object.fromEntries(n)}function ks(e,t){const n=new Map(e.map(s=>[s.projectName,s])),r=t.map(s=>{const o=n.get(s.projectName),i=new Map((o==null?void 0:o.threads.map(l=>[l.id,l]))??[]),a=s.threads.map(l=>{const d=i.get(l.id);return d&&_0(d,l)?d:l});return o&&o.projectName===s.projectName&&k0(o.threads,a)?o:{projectName:s.projectName,threads:a}});return T0(e,r)?e:r}function S0(e,t,n){const r=new Set(Fn(t).map(a=>a.id)),s=Fn(e).filter(a=>n[a.id]===!0&&!r.has(a.id));if(s.length===0)return t;const o=new Map(t.map(a=>[a.projectName,a])),i=t.map(a=>({projectName:a.projectName,threads:[...a.threads]}));for(const a of s){if(o.get(a.projectName)){const d=i.findIndex(u=>u.projectName===a.projectName);d>=0&&(i[d]={projectName:i[d].projectName,threads:[a,...i[d].threads]});continue}i.push({projectName:a.projectName,threads:[a]})}return i}function x0(e){return e.split("/").filter(Boolean).at(-1)||e||"unknown-project"}function Eo(e){const t=e.replace(/\\/gu,"/");return t.split("/").filter(Boolean).at(-1)||t}function C0(e){const t=e.split(`
44
- `).map(n=>n.trim()).find(n=>n.length>0);return t?t.slice(0,80):"Untitled thread"}function E0(){const e=O([]),t=O([]),n=O(a0()),r=O({}),s=O({}),o=O({}),i=O({}),a=O({}),l=O({}),d=O({}),u=O([]),f=O(""),g=O("medium"),_=O(r0()),P=O(i0()),R=O(c0()),B=O(u0()),z=O({}),N=O({}),H=O({}),j=O({}),ae=O({}),ue=O({}),de=O({}),Te=O({}),se=O({}),Z=O({}),me=O([]),te=O(!1),Be=O(!1),He=O(!1),ze=O(!1),Ee=O(!1),be=O(""),Pe=O(!1),lt=O(!1),Ze=O(s0()),it=O(Math.floor(Kr/1e3));let Ke=null,et=null,he=null,xe=null,Se=!1;const I=new Set;let Y=!1,X=!1;const ge=new Map,$e=new Set,p=le(()=>Fn(e.value)),y=le(()=>p.value.find(c=>c.id===n.value)??null),x=le(()=>P.value[n.value]??null),D=le(()=>{const c=[],h=n.value;return h&&Array.isArray(Te.value[h])&&c.push(...Te.value[h]),Array.isArray(Te.value[Gr])&&c.push(...Te.value[Gr]),c.sort((v,T)=>v.receivedAtIso.localeCompare(T.receivedAtIso))}),V=le(()=>{var G;const c=n.value;if(!c)return null;const h=ae.value[c],v=(o.value[c]??"").trim(),T=(((G=ue.value[c])==null?void 0:G.message)??"").trim();return!h&&!v&&!T?null:{activityLabel:(h==null?void 0:h.label)||"Thinking",activityDetails:(h==null?void 0:h.details)??[],reasoningText:v,errorText:T}}),L=le(()=>{const c=n.value;if(!c)return[];const h=r.value[c]??[],v=s.value[c]??[],T=i.value[c]??[],G=[...h,...T,...v],K=j.value[c];return K?b0(G,K):G});function ee(c){n.value!==c&&(n.value=c,l0(c),X=!1)}function ne(c){f.value=c.trim()}async function Q(){f.value=zt,u.value.includes(zt)||(u.value=[...u.value,zt]);try{await ty(zt)}catch{}}function U(c,h){se.value={...se.value,[c]:h}}function fe(c){se.value[c]&&(se.value=Ct(se.value,c))}async function ie(c){if($e.has(c))return;const h=se.value[c];if(!(!h||h.fallbackRetried)){$e.add(c),U(c,{...h,fallbackRetried:!0});try{await Q();try{const v=await Ga(c,1);Ae(c,v),nt(c,[]),xt(c),i.value[c]&&(i.value=Ct(i.value,c))}catch{}A(c,null),be.value="",W(c,null),E(c,{label:"Thinking",details:ye(zt,h.effort)}),J(c,!0),H.value[c]!==!0&&await _o(c),await ko(c,h.text,h.imageUrls,zt,h.effort||void 0,h.skills.length>0?h.skills:void 0,h.fileAttachments),H.value={...H.value,[c]:!0},I.add(c),Se=!0,await Zn()}catch(v){const T=v instanceof Error?v.message:"Unknown application error";A(c,T),be.value=T,J(c,!1),E(c,null)}finally{$e.delete(c)}}}function ve(c){c&&!el.includes(c)||(g.value=c)}function ye(c,h){const v=c.trim()||"default",T=h||"default";return[`Model: ${v}`,`Thinking: ${T}`]}async function De(){try{const[c,h]=await Promise.all([ny(),ry()]);u.value=c,f.value.length>0&&c.includes(f.value)||(h.model&&c.includes(h.model)?f.value=h.model:c.length>0?f.value=c[0]:f.value=""),h.reasoningEffort&&el.includes(h.reasoningEffort)&&(g.value=h.reasoningEffort)}catch{}}function qe(c){const h=Z.value;return Object.keys(h).length===0?c:c.map(v=>({projectName:v.projectName,threads:v.threads.map(T=>{const G=h[T.id];return G?{...T,title:G}:T})}))}function Me(){const h=qe(t.value).map(v=>({projectName:v.projectName,threads:v.threads.map(T=>{const G=a.value[T.id]===!0,K=n.value===T.id,we=_.value[T.id],Ie=d.value[T.id]===!0,pe=!K&&!G&&(Ie||we!==T.updatedAtIso);return{...T,inProgress:G,unread:pe}})}));e.value=ks(e.value,h)}function tt(c,h,v){const T=new Date().toISOString(),G=h.trim(),K=x0(G),we={id:c,title:C0(v),projectName:K,cwd:G,hasWorktree:G.includes("/.codex/worktrees/")||G.includes("/.git/worktrees/"),createdAtIso:T,updatedAtIso:T,preview:v,unread:!1,inProgress:!1},Ie=t.value.findIndex(Ye=>Ye.projectName===K);if(Ie>=0){const mt=t.value[Ie].threads.filter(Pn=>Pn.id!==c),yr={projectName:K,threads:[we,...mt]},vn=[...t.value];vn.splice(Ie,1,yr),t.value=vn}else t.value=[{projectName:K,threads:[we]},...t.value];const pe=bs(R.value,t.value);lr(R.value,pe)||(R.value=pe,br(R.value)),Me()}function ft(c){const h=new Set(c.map(K=>K.id)),v=Rt(_.value,h);v!==_.value&&(_.value=v,tl(v));const T=Rt(P.value,h);T!==P.value&&(P.value=T,rl(T)),N.value=Rt(N.value,h),z.value=Rt(z.value,h),H.value=Rt(H.value,h),r.value=Rt(r.value,h),s.value=Rt(s.value,h),o.value=Rt(o.value,h),i.value=Rt(i.value,h),j.value=Rt(j.value,h),ae.value=Rt(ae.value,h),ue.value=Rt(ue.value,h),de.value=Rt(de.value,h),d.value=Rt(d.value,h),a.value=Rt(a.value,h);const G={};for(const[K,we]of Object.entries(Te.value))(K===Gr||h.has(K))&&(G[K]=we);Te.value=G}function F(c){const h=Fn(t.value).find(v=>v.id===c);h&&(_.value={..._.value,[c]:h.updatedAtIso},tl(_.value),d.value[c]&&(d.value=Ct(d.value,c)),Me())}function W(c,h){if(!c)return;const v=j.value[c];if(h){if(g0(v,h))return;j.value={...j.value,[c]:h}}else v&&(j.value=Ct(j.value,c))}function J(c,h){!c||a.value[c]===!0===h||(h?a.value={...a.value,[c]:!0}:a.value=Ct(a.value,c),Me())}function b(c){c&&c!==n.value&&d.value[c]!==!0&&(d.value={...d.value,[c]:!0},Me())}function E(c,h){if(!c)return;const v=ae.value[c];if(!h){v&&(ae.value=Ct(ae.value,c));return}const T=hr(h.label)||"Thinking",G=h.details.map(Ie=>hr(Ie)).filter(Ie=>Ie.length>0&&Ie!==T),K=Array.from(new Set([...(v==null?void 0:v.details)??[],...G])).slice(-3),we={label:T,details:K};v0(v,we)||(ae.value={...ae.value,[c]:we})}function A(c,h){if(!c)return;const v=ue.value[c],T=h?Qo(h):"";if(!T){v&&(ue.value=Ct(ue.value,c));return}(v==null?void 0:v.message)!==T&&(ue.value={...ue.value,[c]:{message:T}})}function re(c){const h=Fn(t.value).find(v=>v.id===c);return(h==null?void 0:h.updatedAtIso)??""}function ke(c,h){if(!c)return;const v={scrollTop:Math.max(0,h.scrollTop),isAtBottom:h.isAtBottom===!0};typeof h.scrollRatio=="number"&&Number.isFinite(h.scrollRatio)&&(v.scrollRatio=Gc(h.scrollRatio,0,1));const T=P.value[c];T&&T.scrollTop===v.scrollTop&&T.isAtBottom===v.isAtBottom&&T.scrollRatio===v.scrollRatio||(P.value={...P.value,[c]:v},rl(P.value))}function Ae(c,h){const v=r.value[c]??[];Ds(v,h)||(r.value={...r.value,[c]:h})}function nt(c,h){const v=s.value[c]??[];Ds(v,h)||(s.value={...s.value,[c]:h})}function Qe(c,h){const v=s.value[c]??[],T=sl(v,h);nt(c,T)}function ct(c,h){if(!c)return;const v=h.trim(),T=o.value[c]??"";if(v.length===0){if(!T)return;o.value=Ct(o.value,c);return}T!==v&&(o.value={...o.value,[c]:v})}function vt(c,h){if(!c)return;const v=o.value[c]??"";ct(c,`${v}${h}`)}function xt(c){c&&c in o.value&&(o.value=Ct(o.value,c))}function Le(c){return c!==null&&typeof c=="object"&&!Array.isArray(c)?c:null}function Re(c){return typeof c=="string"?c:""}function Kn(c){return typeof c=="number"&&Number.isFinite(c)?c:null}function Ht(c){const h=Le(c.params);if(!h)return"";const v=Re(h.threadId);if(v)return v;const T=Re(h.thread_id);if(T)return T;const G=Re(h.conversationId);if(G)return G;const K=Re(h.conversation_id);if(K)return K;const we=Le(h.thread),Ie=Re(we==null?void 0:we.id);if(Ie)return Ie;const pe=Le(h.turn),Ye=Re(pe==null?void 0:pe.threadId);if(Ye)return Ye;const mt=Re(pe==null?void 0:pe.thread_id);return mt||""}function Pr(c){if(c.method!=="turn/completed")return"";const h=Le(c.params),v=Le(h==null?void 0:h.turn);if(!v||v.status!=="failed")return"";const T=Le(v.error);return Re(T==null?void 0:T.message)}function Gn(c){var v;if(c.method!=="error")return"";const h=Le(c.params);return Re(h==null?void 0:h.message)||Re((v=Le(h==null?void 0:h.error))==null?void 0:v.message)}function jt(c){const h=Le(c);if(!h)return null;const v=h.id,T=Re(h.method),G=h.params;if(typeof v!="number"||!Number.isInteger(v)||!T)return null;const K=Le(G),we=Re(K==null?void 0:K.threadId)||Gr,Ie=Re(K==null?void 0:K.turnId),pe=Re(K==null?void 0:K.itemId),Ye=Re(h.receivedAtIso)||new Date().toISOString();return{id:v,method:T,threadId:we,turnId:Ie,itemId:pe,receivedAtIso:Ye,params:G??null}}function zn(c){const h=c.threadId||Gr,v=Te.value[h]??[],T=v.findIndex(K=>K.id===c.id),G=[...v];T>=0?G.splice(T,1,c):G.push(c),Te.value={...Te.value,[h]:G.sort((K,we)=>K.receivedAtIso.localeCompare(we.receivedAtIso))}}function Yn(c){const h={};for(const[v,T]of Object.entries(Te.value)){const G=T.filter(K=>K.id!==c);G.length>0&&(h[v]=G)}Te.value=h}function Nr(c){if(c.method==="server/request"){const h=jt(c.params);return h&&zn(h),!0}if(c.method==="server/request/resolved"){const h=Le(c.params),v=h==null?void 0:h.id;return typeof v=="number"&&Number.isInteger(v)&&Yn(v),!0}return!1}function hr(c){return c.replace(/\s+/gu," ").trim()}function pr(c){const h=Ht(c);if(!h)return null;if(c.method==="turn/started")return{threadId:h,activity:{label:"Thinking",details:[]}};if(c.method==="item/started"){const v=Le(c.params),T=Le(v==null?void 0:v.item),G=Re(T==null?void 0:T.type).toLowerCase();if(G==="reasoning")return{threadId:h,activity:{label:"Thinking",details:[]}};if(G==="agentmessage")return{threadId:h,activity:{label:"Writing response",details:[]}};if(G==="commandexecution"){const K=Re(T==null?void 0:T.command);return{threadId:h,activity:{label:"Running command",details:K?[K]:[]}}}}return c.method==="item/commandExecution/outputDelta"?{threadId:h,activity:{label:"Running command",details:[]}}:c.method==="item/reasoning/summaryTextDelta"||c.method==="item/reasoning/summaryPartAdded"?{threadId:h,activity:{label:"Thinking",details:[]}}:c.method==="item/agentMessage/delta"?{threadId:h,activity:{label:"Writing response",details:[]}}:null}function mr(c){if(c.method!=="turn/started")return null;const h=Le(c.params);if(!h)return null;const v=Ht(c);if(!v)return null;const T=Le(h.turn),G=Re(T==null?void 0:T.id)||Re(h.turnId)||`${v}:unknown`;if(!G)return null;const K=jn(Re(T==null?void 0:T.startedAt))??jn(Re(h.startedAt))??jn(c.atIso)??Date.now();return{threadId:v,turnId:G,startedAtMs:K}}function pn(c){if(c.method!=="turn/completed")return null;const h=Le(c.params);if(!h)return null;const v=Ht(c);if(!v)return null;const T=Le(h.turn),G=Re(T==null?void 0:T.id)||Re(h.turnId)||`${v}:unknown`;if(!G)return null;const K=jn(Re(T==null?void 0:T.completedAt))??jn(Re(h.completedAt))??jn(c.atIso)??Date.now(),we=jn(Re(T==null?void 0:T.startedAt))??jn(Re(h.startedAt))??void 0;return{threadId:v,turnId:G,completedAtMs:K,startedAtMs:we}}function Qt(c){return`${c}:live-reasoning`}function Or(c){const h=Le(c.params);if(!h)return"";if(c.method==="item/started"){const v=Le(h.item);return!v||v.type!=="reasoning"?"":Re(v.id)}return""}function Jn(c){const h=Le(c.params);if(!h)return null;if(c.method==="item/reasoning/summaryTextDelta"){const v=Re(h.itemId),T=Re(h.delta);return!v||!T?null:{messageId:Qt(v),delta:T}}return null}function gr(c){const h=Le(c.params);if(!h)return"";if(c.method==="item/reasoning/summaryPartAdded"){const v=Re(h.itemId);return v?Qt(v):""}return""}function jr(c){const h=Le(c.params);if(!h)return"";if(c.method==="item/completed"){const v=Le(h.item);return!v||v.type!=="reasoning"?"":Qt(Re(v.id))}return""}function Qn(c){const h=Le(c.params);if(!h)return"";if(c.method==="item/started"){const v=Le(h.item);return!v||v.type!=="agentMessage"?"":Re(v.id)}return""}function vr(c){const h=Le(c.params);if(!h)return null;if(c.method==="item/agentMessage/delta"){const v=Re(h.itemId),T=Re(h.delta);return!v||!T?null:{messageId:v,delta:T}}return null}function Mn(c){const h=Le(c.params);if(!h)return null;if(c.method==="item/completed"){const v=Le(h.item);if(!v||v.type!=="agentMessage")return null;const T=Re(v.id),G=Re(v.text);return!T||!G?null:{id:T,role:"assistant",text:G,messageType:"agentMessage.live"}}return null}function Dr(c){if(c.method!=="item/started")return null;const h=Le(c.params),v=Le(h==null?void 0:h.item);if(!v||v.type!=="commandExecution")return null;const T=Re(v.id),G=Re(v.command);if(!T)return null;const K=typeof v.cwd=="string"?v.cwd:null;return{id:T,role:"system",text:G,messageType:"commandExecution",commandExecution:{command:G,cwd:K,status:"inProgress",aggregatedOutput:"",exitCode:null}}}function Lr(c){if(c.method!=="item/commandExecution/outputDelta")return null;const h=Le(c.params);if(!h)return null;const v=Re(h.itemId),T=Re(h.delta);return!v||!T?null:{itemId:v,delta:T}}function Br(c){if(c.method!=="item/completed")return null;const h=Le(c.params),v=Le(h==null?void 0:h.item);if(!v||v.type!=="commandExecution")return null;const T=Re(v.id),G=Re(v.command);if(!T)return null;const K=typeof v.cwd=="string"?v.cwd:null,we=Re(v.status),Ie=we==="failed"?"failed":we==="declined"?"declined":we==="interrupted"?"interrupted":"completed",pe=typeof v.aggregatedOutput=="string"?v.aggregatedOutput:"",Ye=typeof v.exitCode=="number"?v.exitCode:null;return{id:T,role:"system",text:G,messageType:"commandExecution",commandExecution:{command:G,cwd:K,status:Ie,aggregatedOutput:pe,exitCode:Ye}}}function mn(c,h){const v=i.value[c]??[],T=sl(v,h);T!==v&&(i.value={...i.value,[c]:T})}function Fr(c,h){const v=i.value[c];if(!v||v.length===0)return;const T=new Set(h.map(K=>K.id)),G=v.filter(K=>!T.has(K.id));G.length!==v.length&&(G.length===0?i.value=Ct(i.value,c):i.value={...i.value,[c]:G})}function k(c){if(c.method==="item/agentMessage/delta")return!0;const h=Le(c.params);if(!h)return!1;if(c.method==="item/completed"){const v=Le(h.item);return(v==null?void 0:v.type)==="agentMessage"}return!1}function C(c){var Ii,Ri,$i,Mi;if(Nr(c))return;if(c.method==="thread/name/updated"){const We=Le(c.params),an=Re(We==null?void 0:We.threadId),er=Re(We==null?void 0:We.threadName);an&&er&&(Z.value={...Z.value,[an]:er},Me(),To(an,er))}const h=pr(c);h&&E(h.threadId,h.activity);const v=mr(c);v&&(ge.set(v.turnId,v),de.value={...de.value,[v.threadId]:v.turnId},W(v.threadId,null),A(v.threadId,null),J(v.threadId,!0),d.value[v.threadId]&&(d.value=Ct(d.value,v.threadId)));const T=pn(c),G=Pr(c),we=!!((T==null?void 0:T.threadId)??Ht(c))&&!!G&&f.value!==zt&&_s(new Error(G));if(T){const We=ge.get(T.turnId);We&&ge.delete(T.turnId);const an=Kn((Ii=Le(c.params))==null?void 0:Ii.durationMs)??Kn(($i=Le((Ri=Le(c.params))==null?void 0:Ri.turn))==null?void 0:$i.durationMs)??(typeof T.startedAtMs=="number"?T.completedAtMs-T.startedAtMs:null)??(We?T.completedAtMs-We.startedAtMs:null),er=typeof an=="number"?Math.max(0,an):0;W(T.threadId,{turnId:T.turnId,durationMs:er}),de.value[T.threadId]&&(de.value=Ct(de.value,T.threadId)),J(T.threadId,!1),E(T.threadId,null),b(T.threadId),we||(fe(T.threadId),Si(T.threadId))}if(G){const We=(T==null?void 0:T.threadId)||Ht(c);We&&A(We,G),be.value=G,We&&we&&ie(We)}else T&&A(T.threadId,null);const Ie=Gn(c);if(Ie){const We=Ht(c);We&&A(We,Ie),be.value=Ie,f.value!==zt&&_s(new Error(Ie))&&(We?ie(We):Q())}const pe=Ht(c);if(!pe||pe!==n.value)return;Qn(c);const Ye=vr(c);if(Ye){const We=(s.value[pe]??[]).find(er=>er.id===Ye.messageId),an=`${(We==null?void 0:We.text)??""}${Ye.delta}`;Qe(pe,{id:Ye.messageId,role:"assistant",text:an,messageType:"agentMessage.live"})}const mt=Mn(c);mt&&Qe(pe,mt),Or(c);const yr=Jn(c);if(yr&&vt(pe,yr.delta),gr(c)){const We=o.value[pe]??"";We.trim().length>0&&!We.endsWith(`
45
-
46
- `)&&ct(pe,`${We}
47
-
48
- `)}jr(c);const Pn=Dr(c);Pn&&(mn(pe,Pn),E(pe,{label:"Running command",details:[((Mi=Pn.commandExecution)==null?void 0:Mi.command)??""]}));const eo=Lr(c);if(eo){const We=(i.value[pe]??[]).find(an=>an.id===eo.itemId);We!=null&&We.commandExecution&&mn(pe,{...We,commandExecution:{...We.commandExecution,aggregatedOutput:`${We.commandExecution.aggregatedOutput}${eo.delta}`}})}const Ai=Br(c);if(Ai&&mn(pe,Ai),k(c)&&(X&&n.value&&ke(n.value,{scrollTop:0,isAtBottom:!0,scrollRatio:1}),xt(pe)),c.method==="turn/completed"){X=!1,xt(pe),i.value[pe]&&(i.value=Ct(i.value,pe));const We=Ht(c);We&&(J(We,!1),E(We,null),b(We),we||(fe(We),Si(We)))}}function $(c){const h=Ht(c);h&&I.add(h);const v=c.method;(v.startsWith("thread/")||v.startsWith("turn/")||v.startsWith("item/"))&&(Se=!0),!(et!==null||typeof window>"u")&&(et=window.setTimeout(()=>{et=null,Zn()},So))}async function q(c){if(!Y){Y=!0;try{const h=await Ya(),v=[];for(const T of h.order){const G=Eo(T);v.includes(G)||v.push(G)}if(v.length>0){const T=bs(v,c);lr(R.value,T)||(R.value=T,br(R.value))}if(Object.keys(h.labels).length>0){const T={...B.value};let G=!1;for(const[K,we]of Object.entries(h.labels)){const Ie=Eo(K);T[Ie]!==we&&(T[Ie]=we,G=!0)}G&&(B.value=T,xo(T))}}catch{}}}async function Fe(){if(!(Object.keys(Z.value).length>0))try{const c=await cy();Object.keys(c.titles).length>0&&(Z.value=c.titles)}catch{}}async function _t(c,h,v){if(Z.value[c])return;const T=h.trim();if(!T)return;const G=T.length>300?T.slice(0,300):T;try{const K=await uy(G,v);if(!K||Z.value[c])return;Z.value={...Z.value,[c]:K},Me(),To(c,K)}catch{}}async function It(){var c;lt.value||(te.value=!0);try{const[h]=await Promise.all([qv(),Fe()]);await q(h);const v=bs(R.value,h);lr(R.value,v)||(R.value=v,br(R.value));const T=Co(h,R.value),G=S0(t.value,T,a.value);t.value=ks(t.value,G),a.value=Rt(a.value,new Set(Fn(t.value).map(Ie=>Ie.id))),Me(),lt.value=!0;const K=Fn(e.value);ft(K),K.some(Ie=>Ie.id===n.value)||ee(((c=K[0])==null?void 0:c.id)??"")}finally{te.value=!1}}async function Xt(c,h={}){if(!c)return;const v=N.value[c]===!0,T=h.silent!==!0&&!v;T&&(Be.value=!0);try{H.value[c]!==!0&&(await _o(c),H.value={...H.value,[c]:!0});const{messages:G,inProgress:K}=await Kv(c),we=r.value[c]??[],Ie=h0(we,G,{preserveMissing:h.silent===!0});Ae(c,Ie);const pe=s.value[c]??[],Ye=p0(pe,G);nt(c,Ye),Fr(c,G),N.value={...N.value,[c]:!0};const mt=re(c);mt&&(z.value={...z.value,[c]:mt}),J(c,K),F(c)}finally{T&&(Be.value=!1)}}async function Xn(){try{const c=t.value.flatMap(h=>h.threads.map(v=>v.cwd)).filter(Boolean);me.value=await dy(c.length>0?[...new Set(c)]:void 0)}catch{}}async function M(){be.value="";try{await It(),await Promise.all([De(),Xn()]),await Xt(n.value)}catch(c){be.value=c instanceof Error?c.message:"Unknown application error"}}async function oe(c){ee(c);try{await Xt(c)}catch(h){be.value=h instanceof Error?h.message:"Unknown application error"}}async function Ne(c){try{await Jv(c),await It(),n.value===c&&await Xt(n.value)}catch(h){be.value=h instanceof Error?h.message:"Unknown application error"}}async function kt(c,h){const v=h.trim();if(!(!c||!v))try{await Qv(c,v),Z.value={...Z.value,[c]:v},Me(),To(c,v)}catch(T){be.value=T instanceof Error?T.message:"Unknown application error"}}async function Ut(c,h=[],v=[],T="steer",G=[]){const K=n.value,we=c.trim();if(!K||!we&&h.length===0&&G.length===0)return;const Ie=a.value[K]===!0;if(Ie&&T==="queue"){const pe=l.value[K]??[],Ye=`q-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;l.value={...l.value,[K]:[...pe,{id:Ye,text:we,imageUrls:h,skills:v,fileAttachments:G}]};return}if(Ie){X=!0,gn(K,we,h,v,G).catch(pe=>{const Ye=pe instanceof Error?pe.message:"Unknown application error";A(K,Ye),be.value=Ye});return}be.value="",X=!0,W(K,null),E(K,{label:"Thinking",details:ye(f.value,g.value)}),A(K,null),J(K,!0);try{await gn(K,we,h,v,G)}catch(pe){X=!1,J(K,!1),E(K,null);const Ye=pe instanceof Error?pe.message:"Unknown application error";throw A(K,Ye),be.value=Ye,pe}}async function Zt(c,h,v=[],T=[],G=[]){const K=c.trim(),we=h.trim(),Ie=f.value.trim();if(!K&&v.length===0&&G.length===0)return"";He.value=!0,be.value="";let pe="";try{try{pe=await za(we||void 0,Ie||void 0)}catch(vn){if(Ie&&Ie!==zt&&_s(vn))await Q(),pe=await za(we||void 0,zt);else throw vn}if(!pe)return"";tt(pe,we,K||"[Image]"),H.value={...H.value,[pe]:!0},ee(pe),X=!0,W(pe,null),E(pe,{label:"Thinking",details:ye(f.value,g.value)}),A(pe,null),J(pe,!0);const Ye=pe,mt=we||null,yr=K;return gn(pe,K,v,T,G).catch(vn=>{X=!1,J(pe,!1),E(pe,null);const Pn=vn instanceof Error?vn.message:"Unknown application error";A(pe,Pn),be.value=Pn}).finally(()=>{He.value=!1}),_t(Ye,yr,mt),pe}catch(Ye){X=!1,pe&&(J(pe,!1),E(pe,null));const mt=Ye instanceof Error?Ye.message:"Unknown application error";throw pe&&A(pe,mt),be.value=mt,He.value=!1,Ye}}async function gn(c,h,v=[],T=[],G=[]){const K=f.value.trim(),we=g.value,Ie=h.trim(),pe=T.map(mt=>({name:mt.name,path:mt.path})),Ye=G.map(mt=>({...mt}));U(c,{text:Ie,imageUrls:[...v],skills:pe,fileAttachments:Ye,effort:we,fallbackRetried:!1});try{H.value[c]!==!0&&await _o(c);try{await ko(c,h,v,K||void 0,we||void 0,T.length>0?T:void 0,G)}catch(mt){if(K&&K!==zt&&_s(mt))await Q(),U(c,{text:Ie,imageUrls:[...v],skills:pe,fileAttachments:Ye,effort:we,fallbackRetried:!0}),await ko(c,h,v,zt,we||void 0,T.length>0?T:void 0,G);else throw mt}H.value={...H.value,[c]:!0},I.add(c),Se=!0,await Zn()}catch(mt){throw mt}}async function Si(c){const h=l.value[c];if(!h||h.length===0)return;const[v,...T]=h;l.value=T.length>0?{...l.value,[c]:T}:Ct(l.value,c),He.value=!0,be.value="",X=!0,W(c,null),E(c,{label:"Thinking",details:ye(f.value,g.value)}),A(c,null),J(c,!0);try{await gn(c,v.text,v.imageUrls,v.skills,v.fileAttachments)}catch{J(c,!1),E(c,null)}finally{He.value=!1}}async function Yc(){const c=n.value;if(!c||a.value[c]!==!0)return;const h=de.value[c];ze.value=!0,be.value="";try{await ey(c,h),J(c,!1),E(c,null),A(c,null),de.value[c]&&(de.value=Ct(de.value,c)),I.add(c),Se=!0,await Zn()}catch(v){const T=v instanceof Error?v.message:"Failed to interrupt active turn";A(c,T),be.value=T}finally{ze.value=!1}}async function Jc(c){const h=n.value;if(!h||Ee.value)return;const T=(r.value[h]??[]).reduce((K,we)=>typeof we.turnIndex=="number"&&we.turnIndex>K?we.turnIndex:K,-1);if(T<0||c>T)return;const G=T-c+1;if(!(G<1)){Ee.value=!0,be.value="";try{const K=await Ga(h,G);Ae(h,K),nt(h,[]),xt(h),i.value[h]&&(i.value=Ct(i.value,h)),W(h,null),E(h,null),A(h,null),Se=!0,await Zn()}catch(K){be.value=K instanceof Error?K.message:"Failed to rollback thread"}finally{Ee.value=!1}}}function Qc(c,h){c.length===0||(B.value[c]??"")===h||(B.value={...B.value,[c]:h},xo(B.value))}function Xc(c){var G;if(c.length===0)return;const h=R.value.filter(K=>K!==c);if(lr(R.value,h)||(R.value=h,br(R.value)),t.value=t.value.filter(K=>K.projectName!==c),B.value[c]!==void 0){const K={...B.value};delete K[c],B.value=K,xo(K)}Me();const v=Fn(e.value);ft(v),v.some(K=>K.id===n.value)||ee(((G=v[0])==null?void 0:G.id)??""),Zs()}function Zc(c,h){if(c.length===0||t.value.length===0)return;const v=t.value.map(pe=>pe.projectName),T=v.indexOf(c);if(T===-1)return;const G=Math.max(0,Math.min(h,v.length-1)),K=d0(v,T,G);if(K===v)return;const we=bs(K,t.value);R.value=we,br(R.value);const Ie=Co(t.value,R.value);t.value=ks(t.value,Ie),Me(),Zs()}function eu(c){const h=c.trim();if(!h)return;const v=[h,...R.value.filter(G=>G!==h)];if(lr(R.value,v))return;R.value=v,br(R.value);const T=Co(t.value,R.value);t.value=ks(t.value,T),Me(),Zs()}async function Zs(){var c,h;try{const v=await Ya(),T=new Map;for(const we of v.order){const Ie=Eo(we);T.has(Ie)||T.set(Ie,we)}for(const we of t.value){const Ie=((h=(c=we.threads[0])==null?void 0:c.cwd)==null?void 0:h.trim())??"";Ie&&T.set(we.projectName,Ie)}const G=[];for(const we of R.value){const Ie=T.get(we);Ie&&!G.includes(Ie)&&G.push(Ie)}for(const we of v.order)G.includes(we)||G.push(we);const K=v.active.filter(we=>G.includes(we));K.length===0&&G.length>0&&K.push(G[0]),await oy({order:G,labels:v.labels,active:K})}catch{}}async function tu(){if(!Pe.value){Pe.value=!0;try{if(await It(),!n.value)return;const c=n.value,h=re(c),v=z.value[c]??"",T=h.length>0&&h!==v;(a.value[c]===!0||T)&&await Xt(c,{silent:!0})}catch{}finally{Pe.value=!1}}}async function Zn(){if(Pe.value){typeof window<"u"&&et===null&&(et=window.setTimeout(()=>{et=null,Zn()},So));return}Pe.value=!0;const c=Se,h=new Set(I);Se=!1,I.clear();try{c&&await It();const v=n.value;if(!v)return;const T=h.has(v),G=a.value[v]===!0,K=re(v),we=z.value[v]??"",Ie=K.length>0&&K!==we;(T||G||Ie||c)&&await Xt(v,{silent:!0})}catch{}finally{Pe.value=!1,(Se||I.size>0)&&typeof window<"u"&&et===null&&(et=window.setTimeout(()=>{et=null,Zn()},So))}}function nu(){typeof window>"u"||Ke||(Ze.value&&Ci(),ru(),Ke=Gv(c=>{C(c),$(c)}))}async function ru(){try{const c=await Yv();for(const h of c){const v=jt(h);v&&zn(v)}}catch{}}async function su(c){try{await zv(c.id,{result:c.result,error:c.error}),Yn(c.id)}catch(h){be.value=h instanceof Error?h.message:"Failed to reply to server request"}}function xi(c={}){const h=c.updatePreference??!0;he!==null&&typeof window<"u"&&(window.clearInterval(he),he=null),xe!==null&&typeof window<"u"&&(window.clearInterval(xe),xe=null),h&&(Ze.value=!1,nl(!1)),it.value=Math.floor(Kr/1e3)}function Ci(){typeof window>"u"||he!==null||xe!==null||(Ze.value=!0,nl(!0),it.value=Math.floor(Kr/1e3),he=window.setInterval(()=>{it.value=Math.floor(Kr/1e3),tu()},Kr),xe=window.setInterval(()=>{it.value=Math.max(0,it.value-1)},1e3))}function ou(){if(Ze.value){xi();return}Ci()}function iu(){xi({updatePreference:!1}),Ke&&(Ke(),Ke=null),Se=!1,I.clear(),ge.clear(),et!==null&&typeof window<"u"&&(window.clearTimeout(et),et=null),X=!1,r.value={},s.value={},o.value={},i.value={},ae.value={},j.value={},ue.value={},de.value={},l.value={}}const au=le(()=>{const c=n.value;return c?l.value[c]??[]:[]});function Ei(c){const h=n.value;if(!h)return;const v=l.value[h];if(!v)return;const T=v.filter(G=>G.id!==c);l.value=T.length>0?{...l.value,[h]:T}:Ct(l.value,h)}function lu(c){const h=n.value;if(!h)return;const v=l.value[h];if(!v)return;const T=v.find(G=>G.id===c);T&&(Ei(c),Ut(T.text,T.imageUrls,T.skills,"steer",T.fileAttachments))}return{projectGroups:e,projectDisplayNameById:B,selectedThread:y,selectedThreadScrollState:x,selectedThreadServerRequests:D,selectedLiveOverlay:V,selectedThreadId:n,availableModelIds:u,selectedModelId:f,selectedReasoningEffort:g,installedSkills:me,messages:L,isLoadingThreads:te,isLoadingMessages:Be,isSendingMessage:He,isInterruptingTurn:ze,isAutoRefreshEnabled:Ze,autoRefreshSecondsLeft:it,error:be,refreshAll:M,refreshSkills:Xn,selectThread:oe,setThreadScrollState:ke,archiveThreadById:Ne,renameThreadById:kt,sendMessageToSelectedThread:Ut,sendMessageToNewThread:Zt,interruptSelectedThreadTurn:Yc,rollbackSelectedThread:Jc,isRollingBack:Ee,selectedThreadQueuedMessages:au,removeQueuedMessage:Ei,steerQueuedMessage:lu,setSelectedModelId:ne,setSelectedReasoningEffort:ve,respondToPendingServerRequest:su,renameProject:Qc,removeProject:Xc,reorderProject:Zc,pinProjectToTop:eu,toggleAutoRefreshTimer:ou,startPolling:nu,stopPolling:iu}}const A0={class:"sidebar-root"},I0={class:"sidebar-scrollable"},R0=["aria-pressed"],$0={key:1,class:"sidebar-search-bar"},M0={key:0,class:"sidebar-settings-area"},P0={key:0,class:"sidebar-settings-panel"},N0={class:"sidebar-settings-value"},O0={class:"sidebar-settings-value"},j0={class:"content-root"},D0={class:"content-body"},L0={key:1,class:"content-grid"},B0={class:"new-thread-empty"},F0={key:2,class:"content-grid"},H0={class:"content-thread"},U0={class:"composer-with-queue"},V0={class:"build-badge","aria-label":"Worktree name"},ol="codex-web-local.sidebar-collapsed.v1",il="codex-web-local.send-with-enter.v1",al="codex-web-local.in-progress-send-mode.v1",ll="codex-web-local.dark-mode.v1",W0=At({__name:"App",setup(e){const t="codex-web-local",{projectGroups:n,projectDisplayNameById:r,selectedThread:s,selectedThreadScrollState:o,selectedThreadServerRequests:i,selectedLiveOverlay:a,selectedThreadId:l,availableModelIds:d,selectedModelId:u,selectedReasoningEffort:f,installedSkills:g,messages:_,isLoadingThreads:P,isLoadingMessages:R,isInterruptingTurn:B,isAutoRefreshEnabled:z,autoRefreshSecondsLeft:N,refreshAll:H,refreshSkills:j,selectThread:ae,setThreadScrollState:ue,archiveThreadById:de,renameThreadById:Te,sendMessageToSelectedThread:se,sendMessageToNewThread:Z,interruptSelectedThreadTurn:me,rollbackSelectedThread:te,isRollingBack:Be,selectedThreadQueuedMessages:He,removeQueuedMessage:ze,steerQueuedMessage:Ee,setSelectedModelId:be,setSelectedReasoningEffort:Pe,respondToPendingServerRequest:lt,renameProject:Ze,removeProject:it,reorderProject:Ke,pinProjectToTop:et,toggleAutoRefreshTimer:he,startPolling:xe,stopPolling:Se}=E0(),I=Gh(),Y=Kh(),{isMobile:X}=Dc(),ge=O(!1),$e=O(!1),p=O(""),y=O(q()),x=O(""),D=O(!1),V=O(null),L=O("New Project (1)"),ee=O(""),ne=O(!1),Q=O(Lr(il,!0)),U=O(mn()),fe=O(Br()),ie=le(()=>{const M=I.params.threadId;return typeof M=="string"?M:""}),ve=le(()=>{const M=new Set;for(const oe of n.value)for(const Ne of oe.threads)M.add(Ne.id);return M}),ye=le(()=>I.name==="home"),De=le(()=>I.name==="skills"),qe=le(()=>{var M;return De.value?"Skills":ye.value?"New thread":((M=s.value)==null?void 0:M.title)??"Choose a thread"}),Me=le(()=>z.value?`Auto refresh in ${String(N.value)}s`:"Enable 4s refresh"),tt=le(()=>_.value.filter(M=>{const oe=_t(M.messageType,M.role);return oe==="worked"?!0:!(oe==="turnActivity.live"||oe==="turnError.live"||oe==="agentReasoning.live")})),ft=le(()=>a.value),F=le(()=>ye.value?"__new-thread__":l.value),W=le(()=>{var M,oe;return ye.value?p.value.trim():((oe=(M=s.value)==null?void 0:M.cwd)==null?void 0:oe.trim())??""}),J=le(()=>{var M;return!ye.value&&((M=s.value)==null?void 0:M.inProgress)===!0}),b=le(()=>{var kt,Ut;const M=[],oe=new Set;for(const Zt of n.value){const gn=((Ut=(kt=Zt.threads[0])==null?void 0:kt.cwd)==null?void 0:Ut.trim())??"";!gn||oe.has(gn)||(oe.add(gn),M.push({value:gn,label:r.value[Zt.projectName]??Zt.projectName}))}const Ne=p.value.trim();return Ne&&!oe.has(Ne)&&M.unshift({value:Ne,label:gr(Ne)}),M}),E=typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)"):null;Wn(()=>{window.addEventListener("keydown",zn),$(),E==null||E.addEventListener("change",$),It(),Or(),pn()}),Gs(()=>{window.removeEventListener("keydown",zn),E==null||E.removeEventListener("change",$),Se()});function A(){j()}function re(){D.value=!D.value,D.value?Kt(()=>{var M;return(M=V.value)==null?void 0:M.focus()}):x.value=""}function ke(){var M;x.value="",(M=V.value)==null||M.focus()}function Ae(M){M.key==="Escape"&&(D.value=!1,x.value="")}function nt(M){M&&(I.name==="thread"&&ie.value===M||(Y.push({name:"thread",params:{threadId:M}}),X.value&&jt(!0)))}function Qe(M){de(M)}function ct(M){var kt,Ut;const oe=n.value.find(Zt=>Zt.projectName===M),Ne=((Ut=(kt=oe==null?void 0:oe.threads[0])==null?void 0:kt.cwd)==null?void 0:Ut.trim())??"";Ne&&(p.value=Ne),X.value&&jt(!0),!ye.value&&Y.push({name:"home"})}function vt(){var oe,Ne;const M=((Ne=(oe=s.value)==null?void 0:oe.cwd)==null?void 0:Ne.trim())??"";M&&(p.value=M),X.value&&jt(!0),!ye.value&&Y.push({name:"home"})}function xt(M){Ze(M.projectName,M.displayName)}function Le(M){Te(M.threadId,M.title)}function Re(M){it(M)}function Kn(M){Ke(M.projectName,M.toIndex)}function Ht(M){ue(M.threadId,M.state)}function Pr(M){lt(M)}function Gn(){he()}function jt(M){y.value!==M&&(y.value=M,Fe(M))}function zn(M){M.defaultPrevented||!M.ctrlKey&&!M.metaKey||M.shiftKey||M.altKey||M.key.toLowerCase()==="b"&&(M.preventDefault(),jt(!y.value))}function Yn(M){const oe=M.text;if(ye.value){Xn(oe,M.imageUrls,M.skills,M.fileAttachments);return}se(oe,M.imageUrls,M.skills,M.mode,M.fileAttachments)}function Nr(M){p.value=M.trim()}async function hr(M){const oe=M.trim();if(!oe)return;const Ne=mr(oe),kt=await pr(),Ut=Ne?oe:jr(kt,oe);if(Ut)try{const Zt=await iy(Ut,{createIfMissing:!Ne,label:Ne?"":oe});Zt&&(p.value=Zt,et(gr(Zt)),pn())}catch{}}async function pr(){const M=Qt();if(M)return M;try{const oe=await Ja();if(oe)return ee.value=oe,oe}catch{}return""}function mr(M){return M?M.startsWith("~/")||M.startsWith("/")?!0:/^[a-zA-Z]:[\\/]/.test(M):!1}async function pn(){const M=Qt();if(!M){L.value="New Project (1)";return}try{const oe=await ay(M);L.value=oe.name||"New Project (1)"}catch{L.value="New Project (1)"}}function Qt(){var Ne,kt;const M=p.value.trim();if(M)return Jn(M);const oe=((kt=(Ne=b.value[0])==null?void 0:Ne.value)==null?void 0:kt.trim())??"";return oe?Jn(oe):ee.value.trim()}async function Or(){try{ee.value=await Ja()}catch{ee.value=""}}function Jn(M){const oe=M.trim().replace(/\/+$/,"");if(!oe)return"";const Ne=oe.lastIndexOf("/");return Ne<=0?"":oe.slice(0,Ne)}function gr(M){const oe=M.trim().replace(/\/+$/,"");if(!oe)return"";const Ne=oe.lastIndexOf("/");return Ne<0?oe:oe.slice(Ne+1)}function jr(M,oe){const Ne=M.trim().replace(/\/+$/,""),kt=oe.trim().replace(/^\/+/,"");return!Ne||!kt?"":`${Ne}/${kt}`}function Qn(M){be(M)}function vr(M){Pe(M)}function Mn(){me()}function Dr(M){te(M.turnIndex)}function Lr(M,oe){if(typeof window>"u")return oe;const Ne=window.localStorage.getItem(M);return Ne===null?oe:Ne==="1"}function Br(){if(typeof window>"u")return"system";const M=window.localStorage.getItem(ll);return M==="light"||M==="dark"?M:"system"}function mn(){return typeof window>"u"?"queue":window.localStorage.getItem(al)==="steer"?"steer":"queue"}function Fr(){Q.value=!Q.value,window.localStorage.setItem(il,Q.value?"1":"0")}function k(){U.value=U.value==="steer"?"queue":"steer",window.localStorage.setItem(al,U.value)}function C(){const M=["system","light","dark"],oe=M.indexOf(fe.value);fe.value=M[(oe+1)%M.length],window.localStorage.setItem(ll,fe.value),$()}function $(){const M=document.documentElement;if(fe.value==="dark")M.classList.add("dark");else if(fe.value==="light")M.classList.remove("dark");else{const oe=window.matchMedia("(prefers-color-scheme: dark)").matches;M.classList.toggle("dark",oe)}}function q(){return typeof window>"u"?!1:window.localStorage.getItem(ol)==="1"}function Fe(M){typeof window>"u"||window.localStorage.setItem(ol,M?"1":"0")}function _t(M,oe){const Ne=(M??"").trim();return Ne.length>0?Ne:oe.trim()||"message"}async function It(){await H(),$e.value=!0,await Xt(),xe()}async function Xt(){if(!ge.value){ge.value=!0;try{if(I.name==="home"||I.name==="skills"){l.value!==""&&await ae("");return}if(I.name==="thread"){const M=ie.value;if(!M)return;if(!ve.value.has(M)){await Y.replace({name:"home"});return}l.value!==M&&await ae(M);return}}finally{ge.value=!1}}}gt(()=>[I.name,ie.value,P.value,ve.value.has(ie.value),l.value],async()=>{$e.value&&await Xt()}),gt(()=>l.value,async M=>{if($e.value&&!ge.value&&!(ye.value||De.value)){if(!M){I.name!=="home"&&await Y.replace({name:"home"});return}I.name==="thread"&&ie.value===M||await Y.replace({name:"thread",params:{threadId:M}})}}),gt(()=>b.value,M=>{if(M.length===0){p.value="";return}M.some(Ne=>Ne.value===p.value)||(p.value=M[0].value),pn()},{immediate:!0}),gt(()=>p.value,()=>{pn()}),gt(X,M=>{M&&!y.value&&jt(!0)});async function Xn(M,oe=[],Ne=[],kt=[]){try{const Ut=await Z(M,p.value,oe,Ne,kt);if(!Ut)return;await Y.replace({name:"thread",params:{threadId:Ut}})}catch{}}return(M,oe)=>(w(),S(Ue,null,[Ce(Zh,{"is-sidebar-collapsed":y.value,onCloseSidebar:oe[5]||(oe[5]=Ne=>jt(!0))},{sidebar:at(()=>[m("section",A0,[m("div",I0,[y.value?ce("",!0):(w(),pt(Za,{key:0,class:"sidebar-thread-controls-host","is-sidebar-collapsed":y.value,"is-auto-refresh-enabled":Oe(z),"auto-refresh-button-label":Me.value,"show-new-thread-button":!0,onToggleSidebar:oe[0]||(oe[0]=Ne=>jt(!y.value)),onToggleAutoRefresh:Gn,onStartNewThread:vt},{default:at(()=>[m("button",{class:"sidebar-search-toggle",type:"button","aria-pressed":D.value,"aria-label":"Search threads",title:"Search threads",onClick:re},[Ce(zo,{class:"sidebar-search-toggle-icon"})],8,R0)]),_:1},8,["is-sidebar-collapsed","is-auto-refresh-enabled","auto-refresh-button-label"])),!y.value&&D.value?(w(),S("div",$0,[Ce(zo,{class:"sidebar-search-bar-icon"}),In(m("input",{ref_key:"sidebarSearchInputRef",ref:V,"onUpdate:modelValue":oe[1]||(oe[1]=Ne=>x.value=Ne),class:"sidebar-search-input",type:"text",placeholder:"Filter threads...",onKeydown:Ae},null,544),[[Rn,x.value]]),x.value.length>0?(w(),S("button",{key:0,class:"sidebar-search-clear",type:"button","aria-label":"Clear search",onClick:ke},[Ce(_i,{class:"sidebar-search-clear-icon"})])):ce("",!0)])):ce("",!0),y.value?ce("",!0):(w(),S("button",{key:2,class:dt(["sidebar-skills-link",{"is-active":De.value}]),type:"button",onClick:oe[2]||(oe[2]=Ne=>{Oe(Y).push({name:"skills"}),Oe(X)&&jt(!0)})}," Skills Hub ",2)),y.value?ce("",!0):(w(),pt(Bm,{key:3,groups:Oe(n),"project-display-name-by-id":Oe(r),"selected-thread-id":Oe(l),"is-loading":Oe(P),"search-query":x.value,onSelect:nt,onArchive:Qe,onStartNewThread:ct,onRenameProject:xt,onRenameThread:Le,onRemoveProject:Re,onReorderProject:Kn},null,8,["groups","project-display-name-by-id","selected-thread-id","is-loading","search-query"]))]),y.value?ce("",!0):(w(),S("div",M0,[Ce(Sc,{name:"settings-panel"},{default:at(()=>[ne.value?(w(),S("div",P0,[m("button",{class:"sidebar-settings-row",type:"button",onClick:Fr},[oe[6]||(oe[6]=m("span",{class:"sidebar-settings-label"},"Require ⌘ + enter to send",-1)),m("span",{class:dt(["sidebar-settings-toggle",{"is-on":!Q.value}])},null,2)]),m("button",{class:"sidebar-settings-row",type:"button",onClick:k},[oe[7]||(oe[7]=m("span",{class:"sidebar-settings-label"},"When busy, send as",-1)),m("span",N0,_e(U.value==="steer"?"Steer":"Queue"),1)]),m("button",{class:"sidebar-settings-row",type:"button",onClick:C},[oe[8]||(oe[8]=m("span",{class:"sidebar-settings-label"},"Appearance",-1)),m("span",O0,_e(fe.value==="system"?"System":fe.value==="dark"?"Dark":"Light"),1)])])):ce("",!0)]),_:1}),m("button",{class:"sidebar-settings-button",type:"button",onClick:oe[3]||(oe[3]=Ne=>ne.value=!ne.value)},[Ce(n0,{class:"sidebar-settings-icon"}),oe[9]||(oe[9]=m("span",null,"Settings",-1))])]))])]),content:at(()=>[m("section",j0,[Ce(qm,{title:qe.value},{leading:at(()=>[y.value||Oe(X)?(w(),pt(Za,{key:0,class:"sidebar-thread-controls-header-host","is-sidebar-collapsed":y.value,"is-auto-refresh-enabled":Oe(z),"auto-refresh-button-label":Me.value,"show-new-thread-button":!0,onToggleSidebar:oe[4]||(oe[4]=Ne=>jt(!y.value)),onToggleAutoRefresh:Gn,onStartNewThread:vt},null,8,["is-sidebar-collapsed","is-auto-refresh-enabled","auto-refresh-button-label"])):ce("",!0)]),_:1},8,["title"]),m("section",D0,[De.value?(w(),pt(jb,{key:0,onSkillsChanged:A})):ye.value?(w(),S("div",L0,[m("div",B0,[oe[10]||(oe[10]=m("p",{class:"new-thread-hero"},"Let's build",-1)),Ce(Go,{class:"new-thread-folder-dropdown","model-value":p.value,options:b.value,placeholder:"Choose folder","enable-search":!0,"search-placeholder":"Quick search project","show-add-action":!0,"add-action-label":"+ Add new project","default-add-value":L.value,"add-placeholder":"Project name or absolute path",disabled:!1,"onUpdate:modelValue":Nr,onAdd:hr},null,8,["model-value","options","default-add-value"])]),Ce(Qa,{"active-thread-id":F.value,cwd:W.value,models:Oe(d),"selected-model":Oe(u),"selected-reasoning-effort":Oe(f),skills:Oe(g),"is-turn-in-progress":!1,"is-interrupting-turn":!1,"send-with-enter":Q.value,"in-progress-submit-mode":U.value,onSubmit:Yn,"onUpdate:selectedModel":Qn,"onUpdate:selectedReasoningEffort":vr},null,8,["active-thread-id","cwd","models","selected-model","selected-reasoning-effort","skills","send-with-enter","in-progress-submit-mode"])])):(w(),S("div",F0,[m("div",H0,[Ce(bv,{messages:tt.value,"is-loading":Oe(R),"active-thread-id":F.value,"scroll-state":Oe(o),"live-overlay":ft.value,"pending-requests":Oe(i),"is-turn-in-progress":J.value,"is-rolling-back":Oe(Be),onUpdateScrollState:Ht,onRespondServerRequest:Pr,onRollback:Dr},null,8,["messages","is-loading","active-thread-id","scroll-state","live-overlay","pending-requests","is-turn-in-progress","is-rolling-back"])]),m("div",U0,[Ce(Fw,{messages:Oe(He),onSteer:Oe(Ee),onDelete:Oe(ze)},null,8,["messages","onSteer","onDelete"]),Ce(Qa,{"active-thread-id":F.value,cwd:W.value,models:Oe(d),"selected-model":Oe(u),"selected-reasoning-effort":Oe(f),skills:Oe(g),"is-turn-in-progress":J.value,"is-interrupting-turn":Oe(B),"has-queue-above":Oe(He).length>0,"send-with-enter":Q.value,"in-progress-submit-mode":U.value,onSubmit:Yn,"onUpdate:selectedModel":Qn,"onUpdate:selectedReasoningEffort":vr,onInterrupt:Mn},null,8,["active-thread-id","cwd","models","selected-model","selected-reasoning-effort","skills","is-turn-in-progress","is-interrupting-turn","has-queue-above","send-with-enter","in-progress-submit-mode"])])]))])])]),_:1},8,["is-sidebar-collapsed"]),m("div",V0," WT "+_e(Oe(t)),1)],64))}}),q0=Je(W0,[["__scopeId","data-v-f5dc91ef"]]),Ao={render:()=>null},K0=qh({history:Th(),routes:[{path:"/",name:"home",component:Ao},{path:"/thread/:threadId",name:"thread",component:Ao},{path:"/skills",name:"skills",component:Ao},{path:"/new-thread",redirect:{name:"home"}},{path:"/:pathMatch(.*)*",redirect:{name:"home"}}]});console.log("Welcome to codexapp. GitHub: https://github.com/friuns2/codexui");jf(q0).use(K0).mount("#app");