@xdevops/issue-auto-finish 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/{init-G4JOLOGK.js → init-YMWYE6XB.js} +8 -3
- package/dist/init-YMWYE6XB.js.map +1 -0
- package/package.json +1 -1
- package/src/web/frontend/dist/assets/{index-DfmC7aW5.js → index-DAtwReKV.js} +18 -18
- package/src/web/frontend/dist/index.html +1 -1
- package/dist/init-G4JOLOGK.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function s(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(r){if(r.ep)return;r.ep=!0;const o=s(r);fetch(r.href,o)}})();function dr(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const be={},ss=[],bt=()=>{},Jo=()=>!1,hn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),pr=e=>e.startsWith("onUpdate:"),Le=Object.assign,fr=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},$i=Object.prototype.hasOwnProperty,ye=(e,t)=>$i.call(e,t),Y=Array.isArray,ns=e=>Fs(e)==="[object Map]",as=e=>Fs(e)==="[object Set]",Vr=e=>Fs(e)==="[object Date]",ie=e=>typeof e=="function",Pe=e=>typeof e=="string",vt=e=>typeof e=="symbol",we=e=>e!==null&&typeof e=="object",Zo=e=>(we(e)||ie(e))&&ie(e.then)&&ie(e.catch),Qo=Object.prototype.toString,Fs=e=>Qo.call(e),Si=e=>Fs(e).slice(8,-1),Yo=e=>Fs(e)==="[object Object]",gr=e=>Pe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,xs=dr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),mn=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},_i=/-\w/g,It=mn(e=>e.replace(_i,t=>t.slice(1).toUpperCase())),Ci=/\B([A-Z])/g,At=mn(e=>e.replace(Ci,"-$1").toLowerCase()),Xo=mn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ln=mn(e=>e?`on${Xo(e)}`:""),Ge=(e,t)=>!Object.is(e,t),Ks=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},el=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},bn=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ii=e=>{const t=Pe(e)?Number(e):NaN;return isNaN(t)?e:t};let Hr;const vn=()=>Hr||(Hr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function yn(e){if(Y(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],r=Pe(n)?Ai(n):yn(n);if(r)for(const o in r)t[o]=r[o]}return t}else if(Pe(e)||we(e))return e}const Ti=/;(?![^(]*\))/g,Pi=/:([^]+)/,Ri=/\/\*[^]*?\*\//g;function Ai(e){const t={};return e.replace(Ri,"").split(Ti).forEach(s=>{if(s){const n=s.split(Pi);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function te(e){let t="";if(Pe(e))t=e;else if(Y(e))for(let s=0;s<e.length;s++){const n=te(e[s]);n&&(t+=n+" ")}else if(we(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Di="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Li=dr(Di);function tl(e){return!!e||e===""}function Ei(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=Nt(e[n],t[n]);return s}function Nt(e,t){if(e===t)return!0;let s=Vr(e),n=Vr(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=vt(e),n=vt(t),s||n)return e===t;if(s=Y(e),n=Y(t),s||n)return s&&n?Ei(e,t):!1;if(s=we(e),n=we(t),s||n){if(!s||!n)return!1;const r=Object.keys(e).length,o=Object.keys(t).length;if(r!==o)return!1;for(const l in e){const a=e.hasOwnProperty(l),u=t.hasOwnProperty(l);if(a&&!u||!a&&u||!Nt(e[l],t[l]))return!1}}return String(e)===String(t)}function hr(e,t){return e.findIndex(s=>Nt(s,t))}const sl=e=>!!(e&&e.__v_isRef===!0),p=e=>Pe(e)?e:e==null?"":Y(e)||we(e)&&(e.toString===Qo||!ie(e.toString))?sl(e)?p(e.value):JSON.stringify(e,nl,2):String(e),nl=(e,t)=>sl(t)?nl(e,t.value):ns(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,r],o)=>(s[En(n,o)+" =>"]=r,s),{})}:as(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>En(s))}:vt(t)?En(t):we(t)&&!Y(t)&&!Yo(t)?String(t):t,En=(e,t="")=>{var s;return vt(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};let Ke;class Fi{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=Ke,!t&&Ke&&(this.index=(Ke.scopes||(Ke.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=Ke;try{return Ke=this,t()}finally{Ke=s}}}on(){++this._on===1&&(this.prevScope=Ke,Ke=this)}off(){this._on>0&&--this._on===0&&(Ke=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function Mi(){return Ke}let Se;const Fn=new WeakSet;class rl{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,Ke&&Ke.active&&Ke.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Fn.has(this)&&(Fn.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ll(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,zr(this),il(this);const t=Se,s=rt;Se=this,rt=!0;try{return this.fn()}finally{al(this),Se=t,rt=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)vr(t);this.deps=this.depsTail=void 0,zr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Fn.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Kn(this)&&this.run()}get dirty(){return Kn(this)}}let ol=0,ws,ks;function ll(e,t=!1){if(e.flags|=8,t){e.next=ks,ks=e;return}e.next=ws,ws=e}function mr(){ol++}function br(){if(--ol>0)return;if(ks){let t=ks;for(ks=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;ws;){let t=ws;for(ws=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function il(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function al(e){let t,s=e.depsTail,n=s;for(;n;){const r=n.prevDep;n.version===-1?(n===s&&(s=r),vr(n),ji(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=r}e.deps=t,e.depsTail=s}function Kn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ul(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ul(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ts)||(e.globalVersion=Ts,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Kn(e))))return;e.flags|=2;const t=e.dep,s=Se,n=rt;Se=e,rt=!0;try{il(e);const r=e.fn(e._value);(t.version===0||Ge(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Se=s,rt=n,al(e),e.flags&=-3}}function vr(e,t=!1){const{dep:s,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let o=s.computed.deps;o;o=o.nextDep)vr(o,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function ji(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let rt=!0;const cl=[];function Tt(){cl.push(rt),rt=!1}function Pt(){const e=cl.pop();rt=e===void 0?!0:e}function zr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=Se;Se=void 0;try{t()}finally{Se=s}}}let Ts=0;class Oi{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class xn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Se||!rt||Se===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==Se)s=this.activeLink=new Oi(Se,this),Se.deps?(s.prevDep=Se.depsTail,Se.depsTail.nextDep=s,Se.depsTail=s):Se.deps=Se.depsTail=s,dl(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=Se.depsTail,s.nextDep=void 0,Se.depsTail.nextDep=s,Se.depsTail=s,Se.deps===s&&(Se.deps=n)}return s}trigger(t){this.version++,Ts++,this.notify(t)}notify(t){mr();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{br()}}}function dl(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)dl(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Gn=new WeakMap,Zt=Symbol(""),Wn=Symbol(""),Ps=Symbol("");function je(e,t,s){if(rt&&Se){let n=Gn.get(e);n||Gn.set(e,n=new Map);let r=n.get(s);r||(n.set(s,r=new xn),r.map=n,r.key=s),r.track()}}function St(e,t,s,n,r,o){const l=Gn.get(e);if(!l){Ts++;return}const a=u=>{u&&u.trigger()};if(mr(),t==="clear")l.forEach(a);else{const u=Y(e),g=u&&gr(s);if(u&&s==="length"){const d=Number(n);l.forEach((f,y)=>{(y==="length"||y===Ps||!vt(y)&&y>=d)&&a(f)})}else switch((s!==void 0||l.has(void 0))&&a(l.get(s)),g&&a(l.get(Ps)),t){case"add":u?g&&a(l.get("length")):(a(l.get(Zt)),ns(e)&&a(l.get(Wn)));break;case"delete":u||(a(l.get(Zt)),ns(e)&&a(l.get(Wn)));break;case"set":ns(e)&&a(l.get(Zt));break}}br()}function es(e){const t=me(e);return t===e?t:(je(t,"iterate",Ps),Xe(e)?t:t.map(lt))}function wn(e){return je(e=me(e),"iterate",Ps),e}function Mt(e,t){return Rt(e)?ls(Qt(e)?lt(t):t):lt(t)}const Ni={__proto__:null,[Symbol.iterator](){return Mn(this,Symbol.iterator,e=>Mt(this,e))},concat(...e){return es(this).concat(...e.map(t=>Y(t)?es(t):t))},entries(){return Mn(this,"entries",e=>(e[1]=Mt(this,e[1]),e))},every(e,t){return xt(this,"every",e,t,void 0,arguments)},filter(e,t){return xt(this,"filter",e,t,s=>s.map(n=>Mt(this,n)),arguments)},find(e,t){return xt(this,"find",e,t,s=>Mt(this,s),arguments)},findIndex(e,t){return xt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return xt(this,"findLast",e,t,s=>Mt(this,s),arguments)},findLastIndex(e,t){return xt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return xt(this,"forEach",e,t,void 0,arguments)},includes(...e){return jn(this,"includes",e)},indexOf(...e){return jn(this,"indexOf",e)},join(e){return es(this).join(e)},lastIndexOf(...e){return jn(this,"lastIndexOf",e)},map(e,t){return xt(this,"map",e,t,void 0,arguments)},pop(){return ps(this,"pop")},push(...e){return ps(this,"push",e)},reduce(e,...t){return qr(this,"reduce",e,t)},reduceRight(e,...t){return qr(this,"reduceRight",e,t)},shift(){return ps(this,"shift")},some(e,t){return xt(this,"some",e,t,void 0,arguments)},splice(...e){return ps(this,"splice",e)},toReversed(){return es(this).toReversed()},toSorted(e){return es(this).toSorted(e)},toSpliced(...e){return es(this).toSpliced(...e)},unshift(...e){return ps(this,"unshift",e)},values(){return Mn(this,"values",e=>Mt(this,e))}};function Mn(e,t,s){const n=wn(e),r=n[t]();return n!==e&&!Xe(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=s(o.value)),o}),r}const Bi=Array.prototype;function xt(e,t,s,n,r,o){const l=wn(e),a=l!==e&&!Xe(e),u=l[t];if(u!==Bi[t]){const f=u.apply(e,o);return a?lt(f):f}let g=s;l!==e&&(a?g=function(f,y){return s.call(this,Mt(e,f),y,e)}:s.length>2&&(g=function(f,y){return s.call(this,f,y,e)}));const d=u.call(l,g,n);return a&&r?r(d):d}function qr(e,t,s,n){const r=wn(e);let o=s;return r!==e&&(Xe(e)?s.length>3&&(o=function(l,a,u){return s.call(this,l,a,u,e)}):o=function(l,a,u){return s.call(this,l,Mt(e,a),u,e)}),r[t](o,...n)}function jn(e,t,s){const n=me(e);je(n,"iterate",Ps);const r=n[t](...s);return(r===-1||r===!1)&&wr(s[0])?(s[0]=me(s[0]),n[t](...s)):r}function ps(e,t,s=[]){Tt(),mr();const n=me(e)[t].apply(e,s);return br(),Pt(),n}const Ui=dr("__proto__,__v_isRef,__isVue"),pl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(vt));function Vi(e){vt(e)||(e=String(e));const t=me(this);return je(t,"has",e),t.hasOwnProperty(e)}class fl{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(s==="__v_isReactive")return!r;if(s==="__v_isReadonly")return r;if(s==="__v_isShallow")return o;if(s==="__v_raw")return n===(r?o?Yi:bl:o?ml:hl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const l=Y(t);if(!r){let u;if(l&&(u=Ni[s]))return u;if(s==="hasOwnProperty")return Vi}const a=Reflect.get(t,s,Ee(t)?t:n);if((vt(s)?pl.has(s):Ui(s))||(r||je(t,"get",s),o))return a;if(Ee(a)){const u=l&&gr(s)?a:a.value;return r&&we(u)?Zn(u):u}return we(a)?r?Zn(a):kn(a):a}}class gl extends fl{constructor(t=!1){super(!1,t)}set(t,s,n,r){let o=t[s];const l=Y(t)&&gr(s);if(!this._isShallow){const g=Rt(o);if(!Xe(n)&&!Rt(n)&&(o=me(o),n=me(n)),!l&&Ee(o)&&!Ee(n))return g||(o.value=n),!0}const a=l?Number(s)<t.length:ye(t,s),u=Reflect.set(t,s,n,Ee(t)?t:r);return t===me(r)&&(a?Ge(n,o)&&St(t,"set",s,n):St(t,"add",s,n)),u}deleteProperty(t,s){const n=ye(t,s);t[s];const r=Reflect.deleteProperty(t,s);return r&&n&&St(t,"delete",s,void 0),r}has(t,s){const n=Reflect.has(t,s);return(!vt(s)||!pl.has(s))&&je(t,"has",s),n}ownKeys(t){return je(t,"iterate",Y(t)?"length":Zt),Reflect.ownKeys(t)}}class Hi extends fl{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const zi=new gl,qi=new Hi,Ki=new gl(!0);const Jn=e=>e,Us=e=>Reflect.getPrototypeOf(e);function Gi(e,t,s){return function(...n){const r=this.__v_raw,o=me(r),l=ns(o),a=e==="entries"||e===Symbol.iterator&&l,u=e==="keys"&&l,g=r[e](...n),d=s?Jn:t?ls:lt;return!t&&je(o,"iterate",u?Wn:Zt),Le(Object.create(g),{next(){const{value:f,done:y}=g.next();return y?{value:f,done:y}:{value:a?[d(f[0]),d(f[1])]:d(f),done:y}}})}}function Vs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Wi(e,t){const s={get(r){const o=this.__v_raw,l=me(o),a=me(r);e||(Ge(r,a)&&je(l,"get",r),je(l,"get",a));const{has:u}=Us(l),g=t?Jn:e?ls:lt;if(u.call(l,r))return g(o.get(r));if(u.call(l,a))return g(o.get(a));o!==l&&o.get(r)},get size(){const r=this.__v_raw;return!e&&je(me(r),"iterate",Zt),r.size},has(r){const o=this.__v_raw,l=me(o),a=me(r);return e||(Ge(r,a)&&je(l,"has",r),je(l,"has",a)),r===a?o.has(r):o.has(r)||o.has(a)},forEach(r,o){const l=this,a=l.__v_raw,u=me(a),g=t?Jn:e?ls:lt;return!e&&je(u,"iterate",Zt),a.forEach((d,f)=>r.call(o,g(d),g(f),l))}};return Le(s,e?{add:Vs("add"),set:Vs("set"),delete:Vs("delete"),clear:Vs("clear")}:{add(r){!t&&!Xe(r)&&!Rt(r)&&(r=me(r));const o=me(this);return Us(o).has.call(o,r)||(o.add(r),St(o,"add",r,r)),this},set(r,o){!t&&!Xe(o)&&!Rt(o)&&(o=me(o));const l=me(this),{has:a,get:u}=Us(l);let g=a.call(l,r);g||(r=me(r),g=a.call(l,r));const d=u.call(l,r);return l.set(r,o),g?Ge(o,d)&&St(l,"set",r,o):St(l,"add",r,o),this},delete(r){const o=me(this),{has:l,get:a}=Us(o);let u=l.call(o,r);u||(r=me(r),u=l.call(o,r)),a&&a.call(o,r);const g=o.delete(r);return u&&St(o,"delete",r,void 0),g},clear(){const r=me(this),o=r.size!==0,l=r.clear();return o&&St(r,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(r=>{s[r]=Gi(r,e,t)}),s}function yr(e,t){const s=Wi(e,t);return(n,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?n:Reflect.get(ye(s,r)&&r in n?s:n,r,o)}const Ji={get:yr(!1,!1)},Zi={get:yr(!1,!0)},Qi={get:yr(!0,!1)};const hl=new WeakMap,ml=new WeakMap,bl=new WeakMap,Yi=new WeakMap;function Xi(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ea(e){return e.__v_skip||!Object.isExtensible(e)?0:Xi(Si(e))}function kn(e){return Rt(e)?e:xr(e,!1,zi,Ji,hl)}function ta(e){return xr(e,!1,Ki,Zi,ml)}function Zn(e){return xr(e,!0,qi,Qi,bl)}function xr(e,t,s,n,r){if(!we(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=ea(e);if(o===0)return e;const l=r.get(e);if(l)return l;const a=new Proxy(e,o===2?n:s);return r.set(e,a),a}function Qt(e){return Rt(e)?Qt(e.__v_raw):!!(e&&e.__v_isReactive)}function Rt(e){return!!(e&&e.__v_isReadonly)}function Xe(e){return!!(e&&e.__v_isShallow)}function wr(e){return e?!!e.__v_raw:!1}function me(e){const t=e&&e.__v_raw;return t?me(t):e}function sa(e){return!ye(e,"__v_skip")&&Object.isExtensible(e)&&el(e,"__v_skip",!0),e}const lt=e=>we(e)?kn(e):e,ls=e=>we(e)?Zn(e):e;function Ee(e){return e?e.__v_isRef===!0:!1}function F(e){return na(e,!1)}function na(e,t){return Ee(e)?e:new ra(e,t)}class ra{constructor(t,s){this.dep=new xn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:me(t),this._value=s?t:lt(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||Xe(t)||Rt(t);t=n?t:me(t),Ge(t,s)&&(this._rawValue=t,this._value=n?t:lt(t),this.dep.trigger())}}function c(e){return Ee(e)?e.value:e}const oa={get:(e,t,s)=>t==="__v_raw"?e:c(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const r=e[t];return Ee(r)&&!Ee(s)?(r.value=s,!0):Reflect.set(e,t,s,n)}};function vl(e){return Qt(e)?e:new Proxy(e,oa)}class la{constructor(t){this.__v_isRef=!0,this._value=void 0;const s=this.dep=new xn,{get:n,set:r}=t(s.track.bind(s),s.trigger.bind(s));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function ia(e){return new la(e)}class aa{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new xn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ts-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Se!==this)return ll(this,!0),!0}get value(){const t=this.dep.track();return ul(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ua(e,t,s=!1){let n,r;return ie(e)?n=e:(n=e.get,r=e.set),new aa(n,r,s)}const Hs={},Ys=new WeakMap;let Gt;function ca(e,t=!1,s=Gt){if(s){let n=Ys.get(s);n||Ys.set(s,n=[]),n.push(e)}}function da(e,t,s=be){const{immediate:n,deep:r,once:o,scheduler:l,augmentJob:a,call:u}=s,g=R=>r?R:Xe(R)||r===!1||r===0?_t(R,1):_t(R);let d,f,y,x,w=!1,C=!1;if(Ee(e)?(f=()=>e.value,w=Xe(e)):Qt(e)?(f=()=>g(e),w=!0):Y(e)?(C=!0,w=e.some(R=>Qt(R)||Xe(R)),f=()=>e.map(R=>{if(Ee(R))return R.value;if(Qt(R))return g(R);if(ie(R))return u?u(R,2):R()})):ie(e)?t?f=u?()=>u(e,2):e:f=()=>{if(y){Tt();try{y()}finally{Pt()}}const R=Gt;Gt=d;try{return u?u(e,3,[x]):e(x)}finally{Gt=R}}:f=bt,t&&r){const R=f,k=r===!0?1/0:r;f=()=>_t(R(),k)}const P=Mi(),I=()=>{d.stop(),P&&P.active&&fr(P.effects,d)};if(o&&t){const R=t;t=(...k)=>{R(...k),I()}}let T=C?new Array(e.length).fill(Hs):Hs;const H=R=>{if(!(!(d.flags&1)||!d.dirty&&!R))if(t){const k=d.run();if(r||w||(C?k.some((v,_)=>Ge(v,T[_])):Ge(k,T))){y&&y();const v=Gt;Gt=d;try{const _=[k,T===Hs?void 0:C&&T[0]===Hs?[]:T,x];T=k,u?u(t,3,_):t(..._)}finally{Gt=v}}}else d.run()};return a&&a(H),d=new rl(f),d.scheduler=l?()=>l(H,!1):H,x=R=>ca(R,!1,d),y=d.onStop=()=>{const R=Ys.get(d);if(R){if(u)u(R,4);else for(const k of R)k();Ys.delete(d)}},t?n?H(!0):T=d.run():l?l(H.bind(null,!0),!0):d.run(),I.pause=d.pause.bind(d),I.resume=d.resume.bind(d),I.stop=I,I}function _t(e,t=1/0,s){if(t<=0||!we(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Ee(e))_t(e.value,t,s);else if(Y(e))for(let n=0;n<e.length;n++)_t(e[n],t,s);else if(as(e)||ns(e))e.forEach(n=>{_t(n,t,s)});else if(Yo(e)){for(const n in e)_t(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&_t(e[n],t,s)}return e}function Ms(e,t,s,n){try{return n?e(...n):e()}catch(r){$n(r,t,s)}}function it(e,t,s,n){if(ie(e)){const r=Ms(e,t,s,n);return r&&Zo(r)&&r.catch(o=>{$n(o,t,s)}),r}if(Y(e)){const r=[];for(let o=0;o<e.length;o++)r.push(it(e[o],t,s,n));return r}}function $n(e,t,s,n=!0){const r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||be;if(t){let a=t.parent;const u=t.proxy,g=`https://vuejs.org/error-reference/#runtime-${s}`;for(;a;){const d=a.ec;if(d){for(let f=0;f<d.length;f++)if(d[f](e,u,g)===!1)return}a=a.parent}if(o){Tt(),Ms(o,null,10,[e,u,g]),Pt();return}}pa(e,s,r,n,l)}function pa(e,t,s,n=!0,r=!1){if(r)throw e;console.error(e)}const Ne=[];let gt=-1;const rs=[];let jt=null,ts=0;const yl=Promise.resolve();let Xs=null;function js(e){const t=Xs||yl;return e?t.then(this?e.bind(this):e):t}function fa(e){let t=gt+1,s=Ne.length;for(;t<s;){const n=t+s>>>1,r=Ne[n],o=Rs(r);o<e||o===e&&r.flags&2?t=n+1:s=n}return t}function kr(e){if(!(e.flags&1)){const t=Rs(e),s=Ne[Ne.length-1];!s||!(e.flags&2)&&t>=Rs(s)?Ne.push(e):Ne.splice(fa(t),0,e),e.flags|=1,xl()}}function xl(){Xs||(Xs=yl.then(kl))}function ga(e){Y(e)?rs.push(...e):jt&&e.id===-1?jt.splice(ts+1,0,e):e.flags&1||(rs.push(e),e.flags|=1),xl()}function Kr(e,t,s=gt+1){for(;s<Ne.length;s++){const n=Ne[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Ne.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function wl(e){if(rs.length){const t=[...new Set(rs)].sort((s,n)=>Rs(s)-Rs(n));if(rs.length=0,jt){jt.push(...t);return}for(jt=t,ts=0;ts<jt.length;ts++){const s=jt[ts];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}jt=null,ts=0}}const Rs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function kl(e){try{for(gt=0;gt<Ne.length;gt++){const t=Ne[gt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Ms(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;gt<Ne.length;gt++){const t=Ne[gt];t&&(t.flags&=-2)}gt=-1,Ne.length=0,wl(),Xs=null,(Ne.length||rs.length)&&kl()}}let Ye=null,$l=null;function en(e){const t=Ye;return Ye=e,$l=e&&e.type.__scopeId||null,t}function Sn(e,t=Ye,s){if(!t||e._n)return e;const n=(...r)=>{n._d&&on(-1);const o=en(t);let l;try{l=e(...r)}finally{en(o),n._d&&on(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function ue(e,t){if(Ye===null)return e;const s=Pn(Ye),n=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[o,l,a,u=be]=t[r];o&&(ie(o)&&(o={mounted:o,updated:o}),o.deep&&_t(l),n.push({dir:o,instance:s,value:l,oldValue:void 0,arg:a,modifiers:u}))}return e}function Ht(e,t,s,n){const r=e.dirs,o=t&&t.dirs;for(let l=0;l<r.length;l++){const a=r[l];o&&(a.oldValue=o[l].value);let u=a.dir[n];u&&(Tt(),it(u,s,8,[e.el,a,e,t]),Pt())}}function ha(e,t){if(Ue){let s=Ue.provides;const n=Ue.parent&&Ue.parent.provides;n===s&&(s=Ue.provides=Object.create(n)),s[e]=t}}function Gs(e,t,s=!1){const n=Tr();if(n||os){let r=os?os._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return s&&ie(t)?t.call(n&&n.proxy):t}}const ma=Symbol.for("v-scx"),ba=()=>Gs(ma);function va(e,t){return $r(e,null,{flush:"sync"})}function ot(e,t,s){return $r(e,t,s)}function $r(e,t,s=be){const{immediate:n,deep:r,flush:o,once:l}=s,a=Le({},s),u=t&&n||!t&&o!=="post";let g;if(Ls){if(o==="sync"){const x=ba();g=x.__watcherHandles||(x.__watcherHandles=[])}else if(!u){const x=()=>{};return x.stop=bt,x.resume=bt,x.pause=bt,x}}const d=Ue;a.call=(x,w,C)=>it(x,d,w,C);let f=!1;o==="post"?a.scheduler=x=>{Me(x,d&&d.suspense)}:o!=="sync"&&(f=!0,a.scheduler=(x,w)=>{w?x():kr(x)}),a.augmentJob=x=>{t&&(x.flags|=4),f&&(x.flags|=2,d&&(x.id=d.uid,x.i=d))};const y=da(e,t,a);return Ls&&(g?g.push(y):u&&y()),y}function ya(e,t,s){const n=this.proxy,r=Pe(e)?e.includes(".")?Sl(n,e):()=>n[e]:e.bind(n,n);let o;ie(t)?o=t:(o=t.handler,s=t);const l=Os(this),a=$r(r,o.bind(n),s);return l(),a}function Sl(e,t){const s=t.split(".");return()=>{let n=e;for(let r=0;r<s.length&&n;r++)n=n[s[r]];return n}}const _l=Symbol("_vte"),Cl=e=>e.__isTeleport,$s=e=>e&&(e.disabled||e.disabled===""),Gr=e=>e&&(e.defer||e.defer===""),Wr=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Jr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Qn=(e,t)=>{const s=e&&e.to;return Pe(s)?t?t(s):null:s},Il={name:"Teleport",__isTeleport:!0,process(e,t,s,n,r,o,l,a,u,g){const{mc:d,pc:f,pbc:y,o:{insert:x,querySelector:w,createText:C,createComment:P}}=g,I=$s(t.props);let{shapeFlag:T,children:H,dynamicChildren:R}=t;if(e==null){const k=t.el=C(""),v=t.anchor=C("");x(k,s,n),x(v,s,n);const _=(S,D)=>{T&16&&d(H,S,D,r,o,l,a,u)},M=()=>{const S=t.target=Qn(t.props,w),D=Yn(S,t,C,x);S&&(l!=="svg"&&Wr(S)?l="svg":l!=="mathml"&&Jr(S)&&(l="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(S),I||(_(S,D),Ws(t,!1)))};I&&(_(s,v),Ws(t,!0)),Gr(t.props)?(t.el.__isMounted=!1,Me(()=>{M(),delete t.el.__isMounted},o)):M()}else{if(Gr(t.props)&&e.el.__isMounted===!1){Me(()=>{Il.process(e,t,s,n,r,o,l,a,u,g)},o);return}t.el=e.el,t.targetStart=e.targetStart;const k=t.anchor=e.anchor,v=t.target=e.target,_=t.targetAnchor=e.targetAnchor,M=$s(e.props),S=M?s:v,D=M?k:_;if(l==="svg"||Wr(v)?l="svg":(l==="mathml"||Jr(v))&&(l="mathml"),R?(y(e.dynamicChildren,R,S,r,o,l,a),Cr(e,t,!0)):u||f(e,t,S,D,r,o,l,a,!1),I)M?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):zs(t,s,k,g,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const z=t.target=Qn(t.props,w);z&&zs(t,z,null,g,0)}else M&&zs(t,v,_,g,1);Ws(t,I)}},remove(e,t,s,{um:n,o:{remove:r}},o){const{shapeFlag:l,children:a,anchor:u,targetStart:g,targetAnchor:d,target:f,props:y}=e;if(f&&(r(g),r(d)),o&&r(u),l&16){const x=o||!$s(y);for(let w=0;w<a.length;w++){const C=a[w];n(C,t,s,x,!!C.dynamicChildren)}}},move:zs,hydrate:xa};function zs(e,t,s,{o:{insert:n},m:r},o=2){o===0&&n(e.targetAnchor,t,s);const{el:l,anchor:a,shapeFlag:u,children:g,props:d}=e,f=o===2;if(f&&n(l,t,s),(!f||$s(d))&&u&16)for(let y=0;y<g.length;y++)r(g[y],t,s,2);f&&n(a,t,s)}function xa(e,t,s,n,r,o,{o:{nextSibling:l,parentNode:a,querySelector:u,insert:g,createText:d}},f){function y(P,I){let T=I;for(;T;){if(T&&T.nodeType===8){if(T.data==="teleport start anchor")t.targetStart=T;else if(T.data==="teleport anchor"){t.targetAnchor=T,P._lpa=t.targetAnchor&&l(t.targetAnchor);break}}T=l(T)}}function x(P,I){I.anchor=f(l(P),I,a(P),s,n,r,o)}const w=t.target=Qn(t.props,u),C=$s(t.props);if(w){const P=w._lpa||w.firstChild;t.shapeFlag&16&&(C?(x(e,t),y(w,P),t.targetAnchor||Yn(w,t,d,g,a(e)===w?e:null)):(t.anchor=l(e),y(w,P),t.targetAnchor||Yn(w,t,d,g),f(P&&l(P),t,w,s,n,r,o))),Ws(t,C)}else C&&t.shapeFlag&16&&(x(e,t),t.targetStart=e,t.targetAnchor=l(e));return t.anchor&&l(t.anchor)}const wa=Il;function Ws(e,t){const s=e.ctx;if(s&&s.ut){let n,r;for(t?(n=e.el,r=e.anchor):(n=e.targetStart,r=e.targetAnchor);n&&n!==r;)n.nodeType===1&&n.setAttribute("data-v-owner",s.uid),n=n.nextSibling;s.ut()}}function Yn(e,t,s,n,r=null){const o=t.targetStart=s(""),l=t.targetAnchor=s("");return o[_l]=l,e&&(n(o,e,r),n(l,e,r)),l}const ht=Symbol("_leaveCb"),fs=Symbol("_enterCb");function ka(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Lt(()=>{e.isMounted=!0}),Fl(()=>{e.isUnmounting=!0}),e}const Qe=[Function,Array],Tl={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Qe,onEnter:Qe,onAfterEnter:Qe,onEnterCancelled:Qe,onBeforeLeave:Qe,onLeave:Qe,onAfterLeave:Qe,onLeaveCancelled:Qe,onBeforeAppear:Qe,onAppear:Qe,onAfterAppear:Qe,onAppearCancelled:Qe},Pl=e=>{const t=e.subTree;return t.component?Pl(t.component):t},$a={name:"BaseTransition",props:Tl,setup(e,{slots:t}){const s=Tr(),n=ka();return()=>{const r=t.default&&Dl(t.default(),!0);if(!r||!r.length)return;const o=Rl(r),l=me(e),{mode:a}=l;if(n.isLeaving)return On(o);const u=Zr(o);if(!u)return On(o);let g=Xn(u,l,n,s,f=>g=f);u.type!==Be&&As(u,g);let d=s.subTree&&Zr(s.subTree);if(d&&d.type!==Be&&!Wt(d,u)&&Pl(s).type!==Be){let f=Xn(d,l,n,s);if(As(d,f),a==="out-in"&&u.type!==Be)return n.isLeaving=!0,f.afterLeave=()=>{n.isLeaving=!1,s.job.flags&8||s.update(),delete f.afterLeave,d=void 0},On(o);a==="in-out"&&u.type!==Be?f.delayLeave=(y,x,w)=>{const C=Al(n,d);C[String(d.key)]=d,y[ht]=()=>{x(),y[ht]=void 0,delete g.delayedLeave,d=void 0},g.delayedLeave=()=>{w(),delete g.delayedLeave,d=void 0}}:d=void 0}else d&&(d=void 0);return o}}};function Rl(e){let t=e[0];if(e.length>1){for(const s of e)if(s.type!==Be){t=s;break}}return t}const Sa=$a;function Al(e,t){const{leavingVNodes:s}=e;let n=s.get(t.type);return n||(n=Object.create(null),s.set(t.type,n)),n}function Xn(e,t,s,n,r){const{appear:o,mode:l,persisted:a=!1,onBeforeEnter:u,onEnter:g,onAfterEnter:d,onEnterCancelled:f,onBeforeLeave:y,onLeave:x,onAfterLeave:w,onLeaveCancelled:C,onBeforeAppear:P,onAppear:I,onAfterAppear:T,onAppearCancelled:H}=t,R=String(e.key),k=Al(s,e),v=(S,D)=>{S&&it(S,n,9,D)},_=(S,D)=>{const z=D[1];v(S,D),Y(S)?S.every(K=>K.length<=1)&&z():S.length<=1&&z()},M={mode:l,persisted:a,beforeEnter(S){let D=u;if(!s.isMounted)if(o)D=P||u;else return;S[ht]&&S[ht](!0);const z=k[R];z&&Wt(e,z)&&z.el[ht]&&z.el[ht](),v(D,[S])},enter(S){if(k[R]===e)return;let D=g,z=d,K=f;if(!s.isMounted)if(o)D=I||g,z=T||d,K=H||f;else return;let le=!1;S[fs]=Te=>{le||(le=!0,Te?v(K,[S]):v(z,[S]),M.delayedLeave&&M.delayedLeave(),S[fs]=void 0)};const ce=S[fs].bind(null,!1);D?_(D,[S,ce]):ce()},leave(S,D){const z=String(e.key);if(S[fs]&&S[fs](!0),s.isUnmounting)return D();v(y,[S]);let K=!1;S[ht]=ce=>{K||(K=!0,D(),ce?v(C,[S]):v(w,[S]),S[ht]=void 0,k[z]===e&&delete k[z])};const le=S[ht].bind(null,!1);k[z]=e,x?_(x,[S,le]):le()},clone(S){const D=Xn(S,t,s,n,r);return r&&r(D),D}};return M}function On(e){if(_n(e))return e=Bt(e),e.children=null,e}function Zr(e){if(!_n(e))return Cl(e.type)&&e.children?Rl(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:s}=e;if(s){if(t&16)return s[0];if(t&32&&ie(s.default))return s.default()}}function As(e,t){e.shapeFlag&6&&e.component?(e.transition=t,As(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 Dl(e,t=!1,s){let n=[],r=0;for(let o=0;o<e.length;o++){let l=e[o];const a=s==null?l.key:String(s)+String(l.key!=null?l.key:o);l.type===se?(l.patchFlag&128&&r++,n=n.concat(Dl(l.children,t,a))):(t||l.type!==Be)&&n.push(a!=null?Bt(l,{key:a}):l)}if(r>1)for(let o=0;o<n.length;o++)n[o].patchFlag=-2;return n}function Fe(e,t){return ie(e)?Le({name:e.name},t,{setup:e}):e}function Ll(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Qr(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const tn=new WeakMap;function Ss(e,t,s,n,r=!1){if(Y(e)){e.forEach((C,P)=>Ss(C,t&&(Y(t)?t[P]:t),s,n,r));return}if(_s(n)&&!r){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Ss(e,t,s,n.component.subTree);return}const o=n.shapeFlag&4?Pn(n.component):n.el,l=r?null:o,{i:a,r:u}=e,g=t&&t.r,d=a.refs===be?a.refs={}:a.refs,f=a.setupState,y=me(f),x=f===be?Jo:C=>Qr(d,C)?!1:ye(y,C),w=(C,P)=>!(P&&Qr(d,P));if(g!=null&&g!==u){if(Yr(t),Pe(g))d[g]=null,x(g)&&(f[g]=null);else if(Ee(g)){const C=t;w(g,C.k)&&(g.value=null),C.k&&(d[C.k]=null)}}if(ie(u))Ms(u,a,12,[l,d]);else{const C=Pe(u),P=Ee(u);if(C||P){const I=()=>{if(e.f){const T=C?x(u)?f[u]:d[u]:w()||!e.k?u.value:d[e.k];if(r)Y(T)&&fr(T,o);else if(Y(T))T.includes(o)||T.push(o);else if(C)d[u]=[o],x(u)&&(f[u]=d[u]);else{const H=[o];w(u,e.k)&&(u.value=H),e.k&&(d[e.k]=H)}}else C?(d[u]=l,x(u)&&(f[u]=l)):P&&(w(u,e.k)&&(u.value=l),e.k&&(d[e.k]=l))};if(l){const T=()=>{I(),tn.delete(e)};T.id=-1,tn.set(e,T),Me(T,s)}else Yr(e),I()}}}function Yr(e){const t=tn.get(e);t&&(t.flags|=8,tn.delete(e))}vn().requestIdleCallback;vn().cancelIdleCallback;const _s=e=>!!e.type.__asyncLoader,_n=e=>e.type.__isKeepAlive;function _a(e,t){El(e,"a",t)}function Ca(e,t){El(e,"da",t)}function El(e,t,s=Ue){const n=e.__wdc||(e.__wdc=()=>{let r=s;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Cn(t,n,s),s){let r=s.parent;for(;r&&r.parent;)_n(r.parent.vnode)&&Ia(n,t,s,r),r=r.parent}}function Ia(e,t,s,n){const r=Cn(t,e,n,!0);Et(()=>{fr(n[t],r)},s)}function Cn(e,t,s=Ue,n=!1){if(s){const r=s[e]||(s[e]=[]),o=t.__weh||(t.__weh=(...l)=>{Tt();const a=Os(s),u=it(t,s,e,l);return a(),Pt(),u});return n?r.unshift(o):r.push(o),o}}const Dt=e=>(t,s=Ue)=>{(!Ls||e==="sp")&&Cn(e,(...n)=>t(...n),s)},Ta=Dt("bm"),Lt=Dt("m"),Pa=Dt("bu"),Ra=Dt("u"),Fl=Dt("bum"),Et=Dt("um"),Aa=Dt("sp"),Da=Dt("rtg"),La=Dt("rtc");function Ea(e,t=Ue){Cn("ec",e,t)}const Fa=Symbol.for("v-ndc");function De(e,t,s,n){let r;const o=s,l=Y(e);if(l||Pe(e)){const a=l&&Qt(e);let u=!1,g=!1;a&&(u=!Xe(e),g=Rt(e),e=wn(e)),r=new Array(e.length);for(let d=0,f=e.length;d<f;d++)r[d]=t(u?g?ls(lt(e[d])):lt(e[d]):e[d],d,void 0,o)}else if(typeof e=="number"){r=new Array(e);for(let a=0;a<e;a++)r[a]=t(a+1,a,void 0,o)}else if(we(e))if(e[Symbol.iterator])r=Array.from(e,(a,u)=>t(a,u,void 0,o));else{const a=Object.keys(e);r=new Array(a.length);for(let u=0,g=a.length;u<g;u++){const d=a[u];r[u]=t(e[d],d,u,o)}}else r=[];return r}const er=e=>e?ti(e)?Pn(e):er(e.parent):null,Cs=Le(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=>er(e.parent),$root:e=>er(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>jl(e),$forceUpdate:e=>e.f||(e.f=()=>{kr(e.update)}),$nextTick:e=>e.n||(e.n=js.bind(e.proxy)),$watch:e=>ya.bind(e)}),Nn=(e,t)=>e!==be&&!e.__isScriptSetup&&ye(e,t),Ma={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:r,props:o,accessCache:l,type:a,appContext:u}=e;if(t[0]!=="$"){const y=l[t];if(y!==void 0)switch(y){case 1:return n[t];case 2:return r[t];case 4:return s[t];case 3:return o[t]}else{if(Nn(n,t))return l[t]=1,n[t];if(r!==be&&ye(r,t))return l[t]=2,r[t];if(ye(o,t))return l[t]=3,o[t];if(s!==be&&ye(s,t))return l[t]=4,s[t];tr&&(l[t]=0)}}const g=Cs[t];let d,f;if(g)return t==="$attrs"&&je(e.attrs,"get",""),g(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(s!==be&&ye(s,t))return l[t]=4,s[t];if(f=u.config.globalProperties,ye(f,t))return f[t]},set({_:e},t,s){const{data:n,setupState:r,ctx:o}=e;return Nn(r,t)?(r[t]=s,!0):n!==be&&ye(n,t)?(n[t]=s,!0):ye(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:r,props:o,type:l}},a){let u;return!!(s[a]||e!==be&&a[0]!=="$"&&ye(e,a)||Nn(t,a)||ye(o,a)||ye(n,a)||ye(Cs,a)||ye(r.config.globalProperties,a)||(u=l.__cssModules)&&u[a])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:ye(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function sn(e){return Y(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}function nn(e,t){return!e||!t?e||t:Y(e)&&Y(t)?e.concat(t):Le({},sn(e),sn(t))}let tr=!0;function ja(e){const t=jl(e),s=e.proxy,n=e.ctx;tr=!1,t.beforeCreate&&Xr(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:l,watch:a,provide:u,inject:g,created:d,beforeMount:f,mounted:y,beforeUpdate:x,updated:w,activated:C,deactivated:P,beforeDestroy:I,beforeUnmount:T,destroyed:H,unmounted:R,render:k,renderTracked:v,renderTriggered:_,errorCaptured:M,serverPrefetch:S,expose:D,inheritAttrs:z,components:K,directives:le,filters:ce}=t;if(g&&Oa(g,n,null),l)for(const ae in l){const oe=l[ae];ie(oe)&&(n[ae]=oe.bind(s))}if(r){const ae=r.call(s,s);we(ae)&&(e.data=kn(ae))}if(tr=!0,o)for(const ae in o){const oe=o[ae],ne=ie(oe)?oe.bind(s,s):ie(oe.get)?oe.get.bind(s,s):bt,E=!ie(oe)&&ie(oe.set)?oe.set.bind(s):bt,q=Ce({get:ne,set:E});Object.defineProperty(n,ae,{enumerable:!0,configurable:!0,get:()=>q.value,set:L=>q.value=L})}if(a)for(const ae in a)Ml(a[ae],n,s,ae);if(u){const ae=ie(u)?u.call(s):u;Reflect.ownKeys(ae).forEach(oe=>{ha(oe,ae[oe])})}d&&Xr(d,e,"c");function ve(ae,oe){Y(oe)?oe.forEach(ne=>ae(ne.bind(s))):oe&&ae(oe.bind(s))}if(ve(Ta,f),ve(Lt,y),ve(Pa,x),ve(Ra,w),ve(_a,C),ve(Ca,P),ve(Ea,M),ve(La,v),ve(Da,_),ve(Fl,T),ve(Et,R),ve(Aa,S),Y(D))if(D.length){const ae=e.exposed||(e.exposed={});D.forEach(oe=>{Object.defineProperty(ae,oe,{get:()=>s[oe],set:ne=>s[oe]=ne,enumerable:!0})})}else e.exposed||(e.exposed={});k&&e.render===bt&&(e.render=k),z!=null&&(e.inheritAttrs=z),K&&(e.components=K),le&&(e.directives=le),S&&Ll(e)}function Oa(e,t,s=bt){Y(e)&&(e=sr(e));for(const n in e){const r=e[n];let o;we(r)?"default"in r?o=Gs(r.from||n,r.default,!0):o=Gs(r.from||n):o=Gs(r),Ee(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:l=>o.value=l}):t[n]=o}}function Xr(e,t,s){it(Y(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Ml(e,t,s,n){let r=n.includes(".")?Sl(s,n):()=>s[n];if(Pe(e)){const o=t[e];ie(o)&&ot(r,o)}else if(ie(e))ot(r,e.bind(s));else if(we(e))if(Y(e))e.forEach(o=>Ml(o,t,s,n));else{const o=ie(e.handler)?e.handler.bind(s):t[e.handler];ie(o)&&ot(r,o,e)}}function jl(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:l}}=e.appContext,a=o.get(t);let u;return a?u=a:!r.length&&!s&&!n?u=t:(u={},r.length&&r.forEach(g=>rn(u,g,l,!0)),rn(u,t,l)),we(t)&&o.set(t,u),u}function rn(e,t,s,n=!1){const{mixins:r,extends:o}=t;o&&rn(e,o,s,!0),r&&r.forEach(l=>rn(e,l,s,!0));for(const l in t)if(!(n&&l==="expose")){const a=Na[l]||s&&s[l];e[l]=a?a(e[l],t[l]):t[l]}return e}const Na={data:eo,props:to,emits:to,methods:vs,computed:vs,beforeCreate:Oe,created:Oe,beforeMount:Oe,mounted:Oe,beforeUpdate:Oe,updated:Oe,beforeDestroy:Oe,beforeUnmount:Oe,destroyed:Oe,unmounted:Oe,activated:Oe,deactivated:Oe,errorCaptured:Oe,serverPrefetch:Oe,components:vs,directives:vs,watch:Ua,provide:eo,inject:Ba};function eo(e,t){return t?e?function(){return Le(ie(e)?e.call(this,this):e,ie(t)?t.call(this,this):t)}:t:e}function Ba(e,t){return vs(sr(e),sr(t))}function sr(e){if(Y(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Oe(e,t){return e?[...new Set([].concat(e,t))]:t}function vs(e,t){return e?Le(Object.create(null),e,t):t}function to(e,t){return e?Y(e)&&Y(t)?[...new Set([...e,...t])]:Le(Object.create(null),sn(e),sn(t??{})):t}function Ua(e,t){if(!e)return t;if(!t)return e;const s=Le(Object.create(null),e);for(const n in t)s[n]=Oe(e[n],t[n]);return s}function Ol(){return{app:null,config:{isNativeTag:Jo,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 Va=0;function Ha(e,t){return function(n,r=null){ie(n)||(n=Le({},n)),r!=null&&!we(r)&&(r=null);const o=Ol(),l=new WeakSet,a=[];let u=!1;const g=o.app={_uid:Va++,_component:n,_props:r,_container:null,_context:o,_instance:null,version:wu,get config(){return o.config},set config(d){},use(d,...f){return l.has(d)||(d&&ie(d.install)?(l.add(d),d.install(g,...f)):ie(d)&&(l.add(d),d(g,...f))),g},mixin(d){return o.mixins.includes(d)||o.mixins.push(d),g},component(d,f){return f?(o.components[d]=f,g):o.components[d]},directive(d,f){return f?(o.directives[d]=f,g):o.directives[d]},mount(d,f,y){if(!u){const x=g._ceVNode||_e(n,r);return x.appContext=o,y===!0?y="svg":y===!1&&(y=void 0),e(x,d,y),u=!0,g._container=d,d.__vue_app__=g,Pn(x.component)}},onUnmount(d){a.push(d)},unmount(){u&&(it(a,g._instance,16),e(null,g._container),delete g._container.__vue_app__)},provide(d,f){return o.provides[d]=f,g},runWithContext(d){const f=os;os=g;try{return d()}finally{os=f}}};return g}}let os=null;function nr(e,t,s=be){const n=Tr(),r=It(t),o=At(t),l=Nl(e,r),a=ia((u,g)=>{let d,f=be,y;return va(()=>{const x=e[r];Ge(d,x)&&(d=x,g())}),{get(){return u(),s.get?s.get(d):d},set(x){const w=s.set?s.set(x):x;if(!Ge(w,d)&&!(f!==be&&Ge(x,f)))return;const C=n.vnode.props;C&&(t in C||r in C||o in C)&&(`onUpdate:${t}`in C||`onUpdate:${r}`in C||`onUpdate:${o}`in C)||(d=x,g()),n.emit(`update:${t}`,w),Ge(x,w)&&Ge(x,f)&&!Ge(w,y)&&g(),f=x,y=w}}});return a[Symbol.iterator]=()=>{let u=0;return{next(){return u<2?{value:u++?l||be:a,done:!1}:{done:!0}}}},a}const Nl=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${It(t)}Modifiers`]||e[`${At(t)}Modifiers`];function za(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||be;let r=s;const o=t.startsWith("update:"),l=o&&Nl(n,t.slice(7));l&&(l.trim&&(r=s.map(d=>Pe(d)?d.trim():d)),l.number&&(r=s.map(bn)));let a,u=n[a=Ln(t)]||n[a=Ln(It(t))];!u&&o&&(u=n[a=Ln(At(t))]),u&&it(u,e,6,r);const g=n[a+"Once"];if(g){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,it(g,e,6,r)}}const qa=new WeakMap;function Bl(e,t,s=!1){const n=s?qa:t.emitsCache,r=n.get(e);if(r!==void 0)return r;const o=e.emits;let l={},a=!1;if(!ie(e)){const u=g=>{const d=Bl(g,t,!0);d&&(a=!0,Le(l,d))};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!o&&!a?(we(e)&&n.set(e,null),null):(Y(o)?o.forEach(u=>l[u]=null):Le(l,o),we(e)&&n.set(e,l),l)}function In(e,t){return!e||!hn(t)?!1:(t=t.slice(2).replace(/Once$/,""),ye(e,t[0].toLowerCase()+t.slice(1))||ye(e,At(t))||ye(e,t))}function so(e){const{type:t,vnode:s,proxy:n,withProxy:r,propsOptions:[o],slots:l,attrs:a,emit:u,render:g,renderCache:d,props:f,data:y,setupState:x,ctx:w,inheritAttrs:C}=e,P=en(e);let I,T;try{if(s.shapeFlag&4){const R=r||n,k=R;I=mt(g.call(k,R,d,f,x,y,w)),T=a}else{const R=t;I=mt(R.length>1?R(f,{attrs:a,slots:l,emit:u}):R(f,null)),T=t.props?a:Ka(a)}}catch(R){Is.length=0,$n(R,e,1),I=_e(Be)}let H=I;if(T&&C!==!1){const R=Object.keys(T),{shapeFlag:k}=H;R.length&&k&7&&(o&&R.some(pr)&&(T=Ga(T,o)),H=Bt(H,T,!1,!0))}return s.dirs&&(H=Bt(H,null,!1,!0),H.dirs=H.dirs?H.dirs.concat(s.dirs):s.dirs),s.transition&&As(H,s.transition),I=H,en(P),I}const Ka=e=>{let t;for(const s in e)(s==="class"||s==="style"||hn(s))&&((t||(t={}))[s]=e[s]);return t},Ga=(e,t)=>{const s={};for(const n in e)(!pr(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Wa(e,t,s){const{props:n,children:r,component:o}=e,{props:l,children:a,patchFlag:u}=t,g=o.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&u>=0){if(u&1024)return!0;if(u&16)return n?no(n,l,g):!!l;if(u&8){const d=t.dynamicProps;for(let f=0;f<d.length;f++){const y=d[f];if(Ul(l,n,y)&&!In(g,y))return!0}}}else return(r||a)&&(!a||!a.$stable)?!0:n===l?!1:n?l?no(n,l,g):!0:!!l;return!1}function no(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let r=0;r<n.length;r++){const o=n[r];if(Ul(t,e,o)&&!In(s,o))return!0}return!1}function Ul(e,t,s){const n=e[s],r=t[s];return s==="style"&&we(n)&&we(r)?!Nt(n,r):n!==r}function Ja({vnode:e,parent:t},s){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=s,t=t.parent;else break}}const Vl={},Hl=()=>Object.create(Vl),zl=e=>Object.getPrototypeOf(e)===Vl;function Za(e,t,s,n=!1){const r={},o=Hl();e.propsDefaults=Object.create(null),ql(e,t,r,o);for(const l in e.propsOptions[0])l in r||(r[l]=void 0);s?e.props=n?r:ta(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Qa(e,t,s,n){const{props:r,attrs:o,vnode:{patchFlag:l}}=e,a=me(r),[u]=e.propsOptions;let g=!1;if((n||l>0)&&!(l&16)){if(l&8){const d=e.vnode.dynamicProps;for(let f=0;f<d.length;f++){let y=d[f];if(In(e.emitsOptions,y))continue;const x=t[y];if(u)if(ye(o,y))x!==o[y]&&(o[y]=x,g=!0);else{const w=It(y);r[w]=rr(u,a,w,x,e,!1)}else x!==o[y]&&(o[y]=x,g=!0)}}}else{ql(e,t,r,o)&&(g=!0);let d;for(const f in a)(!t||!ye(t,f)&&((d=At(f))===f||!ye(t,d)))&&(u?s&&(s[f]!==void 0||s[d]!==void 0)&&(r[f]=rr(u,a,f,void 0,e,!0)):delete r[f]);if(o!==a)for(const f in o)(!t||!ye(t,f))&&(delete o[f],g=!0)}g&&St(e.attrs,"set","")}function ql(e,t,s,n){const[r,o]=e.propsOptions;let l=!1,a;if(t)for(let u in t){if(xs(u))continue;const g=t[u];let d;r&&ye(r,d=It(u))?!o||!o.includes(d)?s[d]=g:(a||(a={}))[d]=g:In(e.emitsOptions,u)||(!(u in n)||g!==n[u])&&(n[u]=g,l=!0)}if(o){const u=me(s),g=a||be;for(let d=0;d<o.length;d++){const f=o[d];s[f]=rr(r,u,f,g[f],e,!ye(g,f))}}return l}function rr(e,t,s,n,r,o){const l=e[s];if(l!=null){const a=ye(l,"default");if(a&&n===void 0){const u=l.default;if(l.type!==Function&&!l.skipFactory&&ie(u)){const{propsDefaults:g}=r;if(s in g)n=g[s];else{const d=Os(r);n=g[s]=u.call(null,t),d()}}else n=u;r.ce&&r.ce._setProp(s,n)}l[0]&&(o&&!a?n=!1:l[1]&&(n===""||n===At(s))&&(n=!0))}return n}const Ya=new WeakMap;function Kl(e,t,s=!1){const n=s?Ya:t.propsCache,r=n.get(e);if(r)return r;const o=e.props,l={},a=[];let u=!1;if(!ie(e)){const d=f=>{u=!0;const[y,x]=Kl(f,t,!0);Le(l,y),x&&a.push(...x)};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!o&&!u)return we(e)&&n.set(e,ss),ss;if(Y(o))for(let d=0;d<o.length;d++){const f=It(o[d]);ro(f)&&(l[f]=be)}else if(o)for(const d in o){const f=It(d);if(ro(f)){const y=o[d],x=l[f]=Y(y)||ie(y)?{type:y}:Le({},y),w=x.type;let C=!1,P=!0;if(Y(w))for(let I=0;I<w.length;++I){const T=w[I],H=ie(T)&&T.name;if(H==="Boolean"){C=!0;break}else H==="String"&&(P=!1)}else C=ie(w)&&w.name==="Boolean";x[0]=C,x[1]=P,(C||ye(x,"default"))&&a.push(f)}}const g=[l,a];return we(e)&&n.set(e,g),g}function ro(e){return e[0]!=="$"&&!xs(e)}const Sr=e=>e==="_"||e==="_ctx"||e==="$stable",_r=e=>Y(e)?e.map(mt):[mt(e)],Xa=(e,t,s)=>{if(t._n)return t;const n=Sn((...r)=>_r(t(...r)),s);return n._c=!1,n},Gl=(e,t,s)=>{const n=e._ctx;for(const r in e){if(Sr(r))continue;const o=e[r];if(ie(o))t[r]=Xa(r,o,n);else if(o!=null){const l=_r(o);t[r]=()=>l}}},Wl=(e,t)=>{const s=_r(t);e.slots.default=()=>s},Jl=(e,t,s)=>{for(const n in t)(s||!Sr(n))&&(e[n]=t[n])},eu=(e,t,s)=>{const n=e.slots=Hl();if(e.vnode.shapeFlag&32){const r=t._;r?(Jl(n,t,s),s&&el(n,"_",r,!0)):Gl(t,n)}else t&&Wl(e,t)},tu=(e,t,s)=>{const{vnode:n,slots:r}=e;let o=!0,l=be;if(n.shapeFlag&32){const a=t._;a?s&&a===1?o=!1:Jl(r,t,s):(o=!t.$stable,Gl(t,r)),l=t}else t&&(Wl(e,t),l={default:1});if(o)for(const a in r)!Sr(a)&&l[a]==null&&delete r[a]},Me=lu;function su(e){return nu(e)}function nu(e,t){const s=vn();s.__VUE__=!0;const{insert:n,remove:r,patchProp:o,createElement:l,createText:a,createComment:u,setText:g,setElementText:d,parentNode:f,nextSibling:y,setScopeId:x=bt,insertStaticContent:w}=e,C=(b,$,A,V=null,N=null,B=null,J=void 0,W=null,G=!!$.dynamicChildren)=>{if(b===$)return;b&&!Wt(b,$)&&(V=yt(b),L(b,N,B,!0),b=null),$.patchFlag===-2&&(G=!1,$.dynamicChildren=null);const{type:U,ref:ee,shapeFlag:Z}=$;switch(U){case Tn:P(b,$,A,V);break;case Be:I(b,$,A,V);break;case Js:b==null&&T($,A,V,J);break;case se:K(b,$,A,V,N,B,J,W,G);break;default:Z&1?k(b,$,A,V,N,B,J,W,G):Z&6?le(b,$,A,V,N,B,J,W,G):(Z&64||Z&128)&&U.process(b,$,A,V,N,B,J,W,G,j)}ee!=null&&N?Ss(ee,b&&b.ref,B,$||b,!$):ee==null&&b&&b.ref!=null&&Ss(b.ref,null,B,b,!0)},P=(b,$,A,V)=>{if(b==null)n($.el=a($.children),A,V);else{const N=$.el=b.el;$.children!==b.children&&g(N,$.children)}},I=(b,$,A,V)=>{b==null?n($.el=u($.children||""),A,V):$.el=b.el},T=(b,$,A,V)=>{[b.el,b.anchor]=w(b.children,$,A,V,b.el,b.anchor)},H=({el:b,anchor:$},A,V)=>{let N;for(;b&&b!==$;)N=y(b),n(b,A,V),b=N;n($,A,V)},R=({el:b,anchor:$})=>{let A;for(;b&&b!==$;)A=y(b),r(b),b=A;r($)},k=(b,$,A,V,N,B,J,W,G)=>{if($.type==="svg"?J="svg":$.type==="math"&&(J="mathml"),b==null)v($,A,V,N,B,J,W,G);else{const U=b.el&&b.el._isVueCE?b.el:null;try{U&&U._beginPatch(),S(b,$,N,B,J,W,G)}finally{U&&U._endPatch()}}},v=(b,$,A,V,N,B,J,W)=>{let G,U;const{props:ee,shapeFlag:Z,transition:X,dirs:re}=b;if(G=b.el=l(b.type,B,ee&&ee.is,ee),Z&8?d(G,b.children):Z&16&&M(b.children,G,null,V,N,Bn(b,B),J,W),re&&Ht(b,null,V,"created"),_(G,b,b.scopeId,J,V),ee){for(const $e in ee)$e!=="value"&&!xs($e)&&o(G,$e,null,ee[$e],B,V);"value"in ee&&o(G,"value",null,ee.value,B),(U=ee.onVnodeBeforeMount)&&pt(U,V,b)}re&&Ht(b,null,V,"beforeMount");const pe=ru(N,X);pe&&X.beforeEnter(G),n(G,$,A),((U=ee&&ee.onVnodeMounted)||pe||re)&&Me(()=>{U&&pt(U,V,b),pe&&X.enter(G),re&&Ht(b,null,V,"mounted")},N)},_=(b,$,A,V,N)=>{if(A&&x(b,A),V)for(let B=0;B<V.length;B++)x(b,V[B]);if(N){let B=N.subTree;if($===B||Yl(B.type)&&(B.ssContent===$||B.ssFallback===$)){const J=N.vnode;_(b,J,J.scopeId,J.slotScopeIds,N.parent)}}},M=(b,$,A,V,N,B,J,W,G=0)=>{for(let U=G;U<b.length;U++){const ee=b[U]=W?$t(b[U]):mt(b[U]);C(null,ee,$,A,V,N,B,J,W)}},S=(b,$,A,V,N,B,J)=>{const W=$.el=b.el;let{patchFlag:G,dynamicChildren:U,dirs:ee}=$;G|=b.patchFlag&16;const Z=b.props||be,X=$.props||be;let re;if(A&&zt(A,!1),(re=X.onVnodeBeforeUpdate)&&pt(re,A,$,b),ee&&Ht($,b,A,"beforeUpdate"),A&&zt(A,!0),(Z.innerHTML&&X.innerHTML==null||Z.textContent&&X.textContent==null)&&d(W,""),U?D(b.dynamicChildren,U,W,A,V,Bn($,N),B):J||oe(b,$,W,null,A,V,Bn($,N),B,!1),G>0){if(G&16)z(W,Z,X,A,N);else if(G&2&&Z.class!==X.class&&o(W,"class",null,X.class,N),G&4&&o(W,"style",Z.style,X.style,N),G&8){const pe=$.dynamicProps;for(let $e=0;$e<pe.length;$e++){const ke=pe[$e],ze=Z[ke],qe=X[ke];(qe!==ze||ke==="value")&&o(W,ke,ze,qe,N,A)}}G&1&&b.children!==$.children&&d(W,$.children)}else!J&&U==null&&z(W,Z,X,A,N);((re=X.onVnodeUpdated)||ee)&&Me(()=>{re&&pt(re,A,$,b),ee&&Ht($,b,A,"updated")},V)},D=(b,$,A,V,N,B,J)=>{for(let W=0;W<$.length;W++){const G=b[W],U=$[W],ee=G.el&&(G.type===se||!Wt(G,U)||G.shapeFlag&198)?f(G.el):A;C(G,U,ee,null,V,N,B,J,!0)}},z=(b,$,A,V,N)=>{if($!==A){if($!==be)for(const B in $)!xs(B)&&!(B in A)&&o(b,B,$[B],null,N,V);for(const B in A){if(xs(B))continue;const J=A[B],W=$[B];J!==W&&B!=="value"&&o(b,B,W,J,N,V)}"value"in A&&o(b,"value",$.value,A.value,N)}},K=(b,$,A,V,N,B,J,W,G)=>{const U=$.el=b?b.el:a(""),ee=$.anchor=b?b.anchor:a("");let{patchFlag:Z,dynamicChildren:X,slotScopeIds:re}=$;re&&(W=W?W.concat(re):re),b==null?(n(U,A,V),n(ee,A,V),M($.children||[],A,ee,N,B,J,W,G)):Z>0&&Z&64&&X&&b.dynamicChildren&&b.dynamicChildren.length===X.length?(D(b.dynamicChildren,X,A,N,B,J,W),($.key!=null||N&&$===N.subTree)&&Cr(b,$,!0)):oe(b,$,A,ee,N,B,J,W,G)},le=(b,$,A,V,N,B,J,W,G)=>{$.slotScopeIds=W,b==null?$.shapeFlag&512?N.ctx.activate($,A,V,J,G):ce($,A,V,N,B,J,G):Te(b,$,G)},ce=(b,$,A,V,N,B,J)=>{const W=b.component=gu(b,V,N);if(_n(b)&&(W.ctx.renderer=j),hu(W,!1,J),W.asyncDep){if(N&&N.registerDep(W,ve,J),!b.el){const G=W.subTree=_e(Be);I(null,G,$,A),b.placeholder=G.el}}else ve(W,b,$,A,N,B,J)},Te=(b,$,A)=>{const V=$.component=b.component;if(Wa(b,$,A))if(V.asyncDep&&!V.asyncResolved){ae(V,$,A);return}else V.next=$,V.update();else $.el=b.el,V.vnode=$},ve=(b,$,A,V,N,B,J)=>{const W=()=>{if(b.isMounted){let{next:Z,bu:X,u:re,parent:pe,vnode:$e}=b;{const ct=Zl(b);if(ct){Z&&(Z.el=$e.el,ae(b,Z,J)),ct.asyncDep.then(()=>{Me(()=>{b.isUnmounted||U()},N)});return}}let ke=Z,ze;zt(b,!1),Z?(Z.el=$e.el,ae(b,Z,J)):Z=$e,X&&Ks(X),(ze=Z.props&&Z.props.onVnodeBeforeUpdate)&&pt(ze,pe,Z,$e),zt(b,!0);const qe=so(b),ut=b.subTree;b.subTree=qe,C(ut,qe,f(ut.el),yt(ut),b,N,B),Z.el=qe.el,ke===null&&Ja(b,qe.el),re&&Me(re,N),(ze=Z.props&&Z.props.onVnodeUpdated)&&Me(()=>pt(ze,pe,Z,$e),N)}else{let Z;const{el:X,props:re}=$,{bm:pe,m:$e,parent:ke,root:ze,type:qe}=b,ut=_s($);zt(b,!1),pe&&Ks(pe),!ut&&(Z=re&&re.onVnodeBeforeMount)&&pt(Z,ke,$),zt(b,!0);{ze.ce&&ze.ce._hasShadowRoot()&&ze.ce._injectChildStyle(qe);const ct=b.subTree=so(b);C(null,ct,A,V,b,N,B),$.el=ct.el}if($e&&Me($e,N),!ut&&(Z=re&&re.onVnodeMounted)){const ct=$;Me(()=>pt(Z,ke,ct),N)}($.shapeFlag&256||ke&&_s(ke.vnode)&&ke.vnode.shapeFlag&256)&&b.a&&Me(b.a,N),b.isMounted=!0,$=A=V=null}};b.scope.on();const G=b.effect=new rl(W);b.scope.off();const U=b.update=G.run.bind(G),ee=b.job=G.runIfDirty.bind(G);ee.i=b,ee.id=b.uid,G.scheduler=()=>kr(ee),zt(b,!0),U()},ae=(b,$,A)=>{$.component=b;const V=b.vnode.props;b.vnode=$,b.next=null,Qa(b,$.props,V,A),tu(b,$.children,A),Tt(),Kr(b),Pt()},oe=(b,$,A,V,N,B,J,W,G=!1)=>{const U=b&&b.children,ee=b?b.shapeFlag:0,Z=$.children,{patchFlag:X,shapeFlag:re}=$;if(X>0){if(X&128){E(U,Z,A,V,N,B,J,W,G);return}else if(X&256){ne(U,Z,A,V,N,B,J,W,G);return}}re&8?(ee&16&&at(U,N,B),Z!==U&&d(A,Z)):ee&16?re&16?E(U,Z,A,V,N,B,J,W,G):at(U,N,B,!0):(ee&8&&d(A,""),re&16&&M(Z,A,V,N,B,J,W,G))},ne=(b,$,A,V,N,B,J,W,G)=>{b=b||ss,$=$||ss;const U=b.length,ee=$.length,Z=Math.min(U,ee);let X;for(X=0;X<Z;X++){const re=$[X]=G?$t($[X]):mt($[X]);C(b[X],re,A,null,N,B,J,W,G)}U>ee?at(b,N,B,!0,!1,Z):M($,A,V,N,B,J,W,G,Z)},E=(b,$,A,V,N,B,J,W,G)=>{let U=0;const ee=$.length;let Z=b.length-1,X=ee-1;for(;U<=Z&&U<=X;){const re=b[U],pe=$[U]=G?$t($[U]):mt($[U]);if(Wt(re,pe))C(re,pe,A,null,N,B,J,W,G);else break;U++}for(;U<=Z&&U<=X;){const re=b[Z],pe=$[X]=G?$t($[X]):mt($[X]);if(Wt(re,pe))C(re,pe,A,null,N,B,J,W,G);else break;Z--,X--}if(U>Z){if(U<=X){const re=X+1,pe=re<ee?$[re].el:V;for(;U<=X;)C(null,$[U]=G?$t($[U]):mt($[U]),A,pe,N,B,J,W,G),U++}}else if(U>X)for(;U<=Z;)L(b[U],N,B,!0),U++;else{const re=U,pe=U,$e=new Map;for(U=pe;U<=X;U++){const We=$[U]=G?$t($[U]):mt($[U]);We.key!=null&&$e.set(We.key,U)}let ke,ze=0;const qe=X-pe+1;let ut=!1,ct=0;const ds=new Array(qe);for(U=0;U<qe;U++)ds[U]=0;for(U=re;U<=Z;U++){const We=b[U];if(ze>=qe){L(We,N,B,!0);continue}let dt;if(We.key!=null)dt=$e.get(We.key);else for(ke=pe;ke<=X;ke++)if(ds[ke-pe]===0&&Wt(We,$[ke])){dt=ke;break}dt===void 0?L(We,N,B,!0):(ds[dt-pe]=U+1,dt>=ct?ct=dt:ut=!0,C(We,$[dt],A,null,N,B,J,W,G),ze++)}const Nr=ut?ou(ds):ss;for(ke=Nr.length-1,U=qe-1;U>=0;U--){const We=pe+U,dt=$[We],Br=$[We+1],Ur=We+1<ee?Br.el||Ql(Br):V;ds[U]===0?C(null,dt,A,Ur,N,B,J,W,G):ut&&(ke<0||U!==Nr[ke]?q(dt,A,Ur,2):ke--)}}},q=(b,$,A,V,N=null)=>{const{el:B,type:J,transition:W,children:G,shapeFlag:U}=b;if(U&6){q(b.component.subTree,$,A,V);return}if(U&128){b.suspense.move($,A,V);return}if(U&64){J.move(b,$,A,j);return}if(J===se){n(B,$,A);for(let Z=0;Z<G.length;Z++)q(G[Z],$,A,V);n(b.anchor,$,A);return}if(J===Js){H(b,$,A);return}if(V!==2&&U&1&&W)if(V===0)W.beforeEnter(B),n(B,$,A),Me(()=>W.enter(B),N);else{const{leave:Z,delayLeave:X,afterLeave:re}=W,pe=()=>{b.ctx.isUnmounted?r(B):n(B,$,A)},$e=()=>{B._isLeaving&&B[ht](!0),Z(B,()=>{pe(),re&&re()})};X?X(B,pe,$e):$e()}else n(B,$,A)},L=(b,$,A,V=!1,N=!1)=>{const{type:B,props:J,ref:W,children:G,dynamicChildren:U,shapeFlag:ee,patchFlag:Z,dirs:X,cacheIndex:re}=b;if(Z===-2&&(N=!1),W!=null&&(Tt(),Ss(W,null,A,b,!0),Pt()),re!=null&&($.renderCache[re]=void 0),ee&256){$.ctx.deactivate(b);return}const pe=ee&1&&X,$e=!_s(b);let ke;if($e&&(ke=J&&J.onVnodeBeforeUnmount)&&pt(ke,$,b),ee&6)cs(b.component,A,V);else{if(ee&128){b.suspense.unmount(A,V);return}pe&&Ht(b,null,$,"beforeUnmount"),ee&64?b.type.remove(b,$,A,j,V):U&&!U.hasOnce&&(B!==se||Z>0&&Z&64)?at(U,$,A,!1,!0):(B===se&&Z&384||!N&&ee&16)&&at(G,$,A),V&&Ae(b)}($e&&(ke=J&&J.onVnodeUnmounted)||pe)&&Me(()=>{ke&&pt(ke,$,b),pe&&Ht(b,null,$,"unmounted")},A)},Ae=b=>{const{type:$,el:A,anchor:V,transition:N}=b;if($===se){us(A,V);return}if($===Js){R(b);return}const B=()=>{r(A),N&&!N.persisted&&N.afterLeave&&N.afterLeave()};if(b.shapeFlag&1&&N&&!N.persisted){const{leave:J,delayLeave:W}=N,G=()=>J(A,B);W?W(b.el,B,G):G()}else B()},us=(b,$)=>{let A;for(;b!==$;)A=y(b),r(b),b=A;r($)},cs=(b,$,A)=>{const{bum:V,scope:N,job:B,subTree:J,um:W,m:G,a:U}=b;oo(G),oo(U),V&&Ks(V),N.stop(),B&&(B.flags|=8,L(J,b,$,A)),W&&Me(W,$),Me(()=>{b.isUnmounted=!0},$)},at=(b,$,A,V=!1,N=!1,B=0)=>{for(let J=B;J<b.length;J++)L(b[J],$,A,V,N)},yt=b=>{if(b.shapeFlag&6)return yt(b.component.subTree);if(b.shapeFlag&128)return b.suspense.next();const $=y(b.anchor||b.el),A=$&&$[_l];return A?y(A):$};let Ze=!1;const Ie=(b,$,A)=>{let V;b==null?$._vnode&&(L($._vnode,null,null,!0),V=$._vnode.component):C($._vnode||null,b,$,null,null,null,A),$._vnode=b,Ze||(Ze=!0,Kr(V),wl(),Ze=!1)},j={p:C,um:L,m:q,r:Ae,mt:ce,mc:M,pc:oe,pbc:D,n:yt,o:e};return{render:Ie,hydrate:void 0,createApp:Ha(Ie)}}function Bn({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function zt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ru(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Cr(e,t,s=!1){const n=e.children,r=t.children;if(Y(n)&&Y(r))for(let o=0;o<n.length;o++){const l=n[o];let a=r[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=r[o]=$t(r[o]),a.el=l.el),!s&&a.patchFlag!==-2&&Cr(l,a)),a.type===Tn&&(a.patchFlag===-1&&(a=r[o]=$t(a)),a.el=l.el),a.type===Be&&!a.el&&(a.el=l.el)}}function ou(e){const t=e.slice(),s=[0];let n,r,o,l,a;const u=e.length;for(n=0;n<u;n++){const g=e[n];if(g!==0){if(r=s[s.length-1],e[r]<g){t[n]=r,s.push(n);continue}for(o=0,l=s.length-1;o<l;)a=o+l>>1,e[s[a]]<g?o=a+1:l=a;g<e[s[o]]&&(o>0&&(t[n]=s[o-1]),s[o]=n)}}for(o=s.length,l=s[o-1];o-- >0;)s[o]=l,l=t[l];return s}function Zl(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Zl(t)}function oo(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Ql(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Ql(t.subTree):null}const Yl=e=>e.__isSuspense;function lu(e,t){t&&t.pendingBranch?Y(e)?t.effects.push(...e):t.effects.push(e):ga(e)}const se=Symbol.for("v-fgt"),Tn=Symbol.for("v-txt"),Be=Symbol.for("v-cmt"),Js=Symbol.for("v-stc"),Is=[];let Je=null;function h(e=!1){Is.push(Je=e?null:[])}function iu(){Is.pop(),Je=Is[Is.length-1]||null}let Ds=1;function on(e,t=!1){Ds+=e,e<0&&Je&&t&&(Je.hasOnce=!0)}function Xl(e){return e.dynamicChildren=Ds>0?Je||ss:null,iu(),Ds>0&&Je&&Je.push(e),e}function m(e,t,s,n,r,o){return Xl(i(e,t,s,n,r,o,!0))}function tt(e,t,s,n,r){return Xl(_e(e,t,s,n,r,!0))}function ln(e){return e?e.__v_isVNode===!0:!1}function Wt(e,t){return e.type===t.type&&e.key===t.key}const ei=({key:e})=>e??null,Zs=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Pe(e)||Ee(e)||ie(e)?{i:Ye,r:e,k:t,f:!!s}:e:null);function i(e,t=null,s=null,n=0,r=null,o=e===se?0:1,l=!1,a=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ei(t),ref:t&&Zs(t),scopeId:$l,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Ye};return a?(Ir(u,s),o&128&&e.normalize(u)):s&&(u.shapeFlag|=Pe(s)?8:16),Ds>0&&!l&&Je&&(u.patchFlag>0||o&6)&&u.patchFlag!==32&&Je.push(u),u}const _e=au;function au(e,t=null,s=null,n=0,r=null,o=!1){if((!e||e===Fa)&&(e=Be),ln(e)){const a=Bt(e,t,!0);return s&&Ir(a,s),Ds>0&&!o&&Je&&(a.shapeFlag&6?Je[Je.indexOf(e)]=a:Je.push(a)),a.patchFlag=-2,a}if(yu(e)&&(e=e.__vccOpts),t){t=uu(t);let{class:a,style:u}=t;a&&!Pe(a)&&(t.class=te(a)),we(u)&&(wr(u)&&!Y(u)&&(u=Le({},u)),t.style=yn(u))}const l=Pe(e)?1:Yl(e)?128:Cl(e)?64:we(e)?4:ie(e)?2:0;return i(e,t,s,n,r,l,o,!0)}function uu(e){return e?wr(e)||zl(e)?Le({},e):e:null}function Bt(e,t,s=!1,n=!1){const{props:r,ref:o,patchFlag:l,children:a,transition:u}=e,g=t?du(r||{},t):r,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&ei(g),ref:t&&t.ref?s&&o?Y(o)?o.concat(Zs(t)):[o,Zs(t)]:Zs(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!==se?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Bt(e.ssContent),ssFallback:e.ssFallback&&Bt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&n&&As(d,u.clone(d)),d}function de(e=" ",t=0){return _e(Tn,null,e,t)}function cu(e,t){const s=_e(Js,null,e);return s.staticCount=t,s}function O(e="",t=!1){return t?(h(),tt(Be,null,e)):_e(Be,null,e)}function mt(e){return e==null||typeof e=="boolean"?_e(Be):Y(e)?_e(se,null,e.slice()):ln(e)?$t(e):_e(Tn,null,String(e))}function $t(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Bt(e)}function Ir(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(Y(t))s=16;else if(typeof t=="object")if(n&65){const r=t.default;r&&(r._c&&(r._d=!1),Ir(e,r()),r._c&&(r._d=!0));return}else{s=32;const r=t._;!r&&!zl(t)?t._ctx=Ye:r===3&&Ye&&(Ye.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ie(t)?(t={default:t,_ctx:Ye},s=32):(t=String(t),n&64?(s=16,t=[de(t)]):s=8);e.children=t,e.shapeFlag|=s}function du(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const r in n)if(r==="class")t.class!==n.class&&(t.class=te([t.class,n.class]));else if(r==="style")t.style=yn([t.style,n.style]);else if(hn(r)){const o=t[r],l=n[r];l&&o!==l&&!(Y(o)&&o.includes(l))&&(t[r]=o?[].concat(o,l):l)}else r!==""&&(t[r]=n[r])}return t}function pt(e,t,s,n=null){it(e,t,7,[s,n])}const pu=Ol();let fu=0;function gu(e,t,s){const n=e.type,r=(t?t.appContext:e.appContext)||pu,o={uid:fu++,vnode:e,type:n,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Fi(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Kl(n,r),emitsOptions:Bl(n,r),emit:null,emitted:null,propsDefaults:be,inheritAttrs:n.inheritAttrs,ctx:be,data:be,props:be,attrs:be,slots:be,refs:be,setupState:be,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=za.bind(null,o),e.ce&&e.ce(o),o}let Ue=null;const Tr=()=>Ue||Ye;let an,or;{const e=vn(),t=(s,n)=>{let r;return(r=e[s])||(r=e[s]=[]),r.push(n),o=>{r.length>1?r.forEach(l=>l(o)):r[0](o)}};an=t("__VUE_INSTANCE_SETTERS__",s=>Ue=s),or=t("__VUE_SSR_SETTERS__",s=>Ls=s)}const Os=e=>{const t=Ue;return an(e),e.scope.on(),()=>{e.scope.off(),an(t)}},lo=()=>{Ue&&Ue.scope.off(),an(null)};function ti(e){return e.vnode.shapeFlag&4}let Ls=!1;function hu(e,t=!1,s=!1){t&&or(t);const{props:n,children:r}=e.vnode,o=ti(e);Za(e,n,o,t),eu(e,r,s||t);const l=o?mu(e,t):void 0;return t&&or(!1),l}function mu(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ma);const{setup:n}=s;if(n){Tt();const r=e.setupContext=n.length>1?vu(e):null,o=Os(e),l=Ms(n,e,0,[e.props,r]),a=Zo(l);if(Pt(),o(),(a||e.sp)&&!_s(e)&&Ll(e),a){if(l.then(lo,lo),t)return l.then(u=>{io(e,u)}).catch(u=>{$n(u,e,0)});e.asyncDep=l}else io(e,l)}else si(e)}function io(e,t,s){ie(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:we(t)&&(e.setupState=vl(t)),si(e)}function si(e,t,s){const n=e.type;e.render||(e.render=n.render||bt);{const r=Os(e);Tt();try{ja(e)}finally{Pt(),r()}}}const bu={get(e,t){return je(e,"get",""),e[t]}};function vu(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,bu),slots:e.slots,emit:e.emit,expose:t}}function Pn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(vl(sa(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Cs)return Cs[s](e)},has(t,s){return s in t||s in Cs}})):e.proxy}function yu(e){return ie(e)&&"__vccOpts"in e}const Ce=(e,t)=>ua(e,t,Ls);function xu(e,t,s){try{on(-1);const n=arguments.length;return n===2?we(t)&&!Y(t)?ln(t)?_e(e,null,[t]):_e(e,t):_e(e,null,t):(n>3?s=Array.prototype.slice.call(arguments,2):n===3&&ln(s)&&(s=[s]),_e(e,t,s))}finally{on(1)}}const wu="3.5.29";let lr;const ao=typeof window<"u"&&window.trustedTypes;if(ao)try{lr=ao.createPolicy("vue",{createHTML:e=>e})}catch{}const ni=lr?e=>lr.createHTML(e):e=>e,ku="http://www.w3.org/2000/svg",$u="http://www.w3.org/1998/Math/MathML",kt=typeof document<"u"?document:null,uo=kt&&kt.createElement("template"),Su={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const r=t==="svg"?kt.createElementNS(ku,e):t==="mathml"?kt.createElementNS($u,e):s?kt.createElement(e,{is:s}):kt.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>kt.createTextNode(e),createComment:e=>kt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>kt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,o){const l=s?s.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===o||!(r=r.nextSibling)););else{uo.innerHTML=ni(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=uo.content;if(n==="svg"||n==="mathml"){const u=a.firstChild;for(;u.firstChild;)a.appendChild(u.firstChild);a.removeChild(u)}t.insertBefore(a,s)}return[l?l.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Ft="transition",gs="animation",Es=Symbol("_vtc"),ri={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},_u=Le({},Tl,ri),Cu=e=>(e.displayName="Transition",e.props=_u,e),Pr=Cu((e,{slots:t})=>xu(Sa,Iu(e),t)),qt=(e,t=[])=>{Y(e)?e.forEach(s=>s(...t)):e&&e(...t)},co=e=>e?Y(e)?e.some(t=>t.length>1):e.length>1:!1;function Iu(e){const t={};for(const K in e)K in ri||(t[K]=e[K]);if(e.css===!1)return t;const{name:s="v",type:n,duration:r,enterFromClass:o=`${s}-enter-from`,enterActiveClass:l=`${s}-enter-active`,enterToClass:a=`${s}-enter-to`,appearFromClass:u=o,appearActiveClass:g=l,appearToClass:d=a,leaveFromClass:f=`${s}-leave-from`,leaveActiveClass:y=`${s}-leave-active`,leaveToClass:x=`${s}-leave-to`}=e,w=Tu(r),C=w&&w[0],P=w&&w[1],{onBeforeEnter:I,onEnter:T,onEnterCancelled:H,onLeave:R,onLeaveCancelled:k,onBeforeAppear:v=I,onAppear:_=T,onAppearCancelled:M=H}=t,S=(K,le,ce,Te)=>{K._enterCancelled=Te,Kt(K,le?d:a),Kt(K,le?g:l),ce&&ce()},D=(K,le)=>{K._isLeaving=!1,Kt(K,f),Kt(K,x),Kt(K,y),le&&le()},z=K=>(le,ce)=>{const Te=K?_:T,ve=()=>S(le,K,ce);qt(Te,[le,ve]),po(()=>{Kt(le,K?u:o),wt(le,K?d:a),co(Te)||fo(le,n,C,ve)})};return Le(t,{onBeforeEnter(K){qt(I,[K]),wt(K,o),wt(K,l)},onBeforeAppear(K){qt(v,[K]),wt(K,u),wt(K,g)},onEnter:z(!1),onAppear:z(!0),onLeave(K,le){K._isLeaving=!0;const ce=()=>D(K,le);wt(K,f),K._enterCancelled?(wt(K,y),mo(K)):(mo(K),wt(K,y)),po(()=>{K._isLeaving&&(Kt(K,f),wt(K,x),co(R)||fo(K,n,P,ce))}),qt(R,[K,ce])},onEnterCancelled(K){S(K,!1,void 0,!0),qt(H,[K])},onAppearCancelled(K){S(K,!0,void 0,!0),qt(M,[K])},onLeaveCancelled(K){D(K),qt(k,[K])}})}function Tu(e){if(e==null)return null;if(we(e))return[Un(e.enter),Un(e.leave)];{const t=Un(e);return[t,t]}}function Un(e){return Ii(e)}function wt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e[Es]||(e[Es]=new Set)).add(t)}function Kt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const s=e[Es];s&&(s.delete(t),s.size||(e[Es]=void 0))}function po(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Pu=0;function fo(e,t,s,n){const r=e._endId=++Pu,o=()=>{r===e._endId&&n()};if(s!=null)return setTimeout(o,s);const{type:l,timeout:a,propCount:u}=Ru(e,t);if(!l)return n();const g=l+"end";let d=0;const f=()=>{e.removeEventListener(g,y),o()},y=x=>{x.target===e&&++d>=u&&f()};setTimeout(()=>{d<u&&f()},a+1),e.addEventListener(g,y)}function Ru(e,t){const s=window.getComputedStyle(e),n=w=>(s[w]||"").split(", "),r=n(`${Ft}Delay`),o=n(`${Ft}Duration`),l=go(r,o),a=n(`${gs}Delay`),u=n(`${gs}Duration`),g=go(a,u);let d=null,f=0,y=0;t===Ft?l>0&&(d=Ft,f=l,y=o.length):t===gs?g>0&&(d=gs,f=g,y=u.length):(f=Math.max(l,g),d=f>0?l>g?Ft:gs:null,y=d?d===Ft?o.length:u.length:0);const x=d===Ft&&/\b(?:transform|all)(?:,|$)/.test(n(`${Ft}Property`).toString());return{type:d,timeout:f,propCount:y,hasTransform:x}}function go(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((s,n)=>ho(s)+ho(e[n])))}function ho(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function mo(e){return(e?e.ownerDocument:document).body.offsetHeight}function Au(e,t,s){const n=e[Es];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const un=Symbol("_vod"),oi=Symbol("_vsh"),Du={name:"show",beforeMount(e,{value:t},{transition:s}){e[un]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):hs(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:n}){!t!=!s&&(n?t?(n.beforeEnter(e),hs(e,!0),n.enter(e)):n.leave(e,()=>{hs(e,!1)}):hs(e,t))},beforeUnmount(e,{value:t}){hs(e,t)}};function hs(e,t){e.style.display=t?e[un]:"none",e[oi]=!t}const Lu=Symbol(""),Eu=/(?:^|;)\s*display\s*:/;function Fu(e,t,s){const n=e.style,r=Pe(s);let o=!1;if(s&&!r){if(t)if(Pe(t))for(const l of t.split(";")){const a=l.slice(0,l.indexOf(":")).trim();s[a]==null&&Qs(n,a,"")}else for(const l in t)s[l]==null&&Qs(n,l,"");for(const l in s)l==="display"&&(o=!0),Qs(n,l,s[l])}else if(r){if(t!==s){const l=n[Lu];l&&(s+=";"+l),n.cssText=s,o=Eu.test(s)}}else t&&e.removeAttribute("style");un in e&&(e[un]=o?n.display:"",e[oi]&&(n.display="none"))}const bo=/\s*!important$/;function Qs(e,t,s){if(Y(s))s.forEach(n=>Qs(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Mu(e,t);bo.test(s)?e.setProperty(At(n),s.replace(bo,""),"important"):e[n]=s}}const vo=["Webkit","Moz","ms"],Vn={};function Mu(e,t){const s=Vn[t];if(s)return s;let n=It(t);if(n!=="filter"&&n in e)return Vn[t]=n;n=Xo(n);for(let r=0;r<vo.length;r++){const o=vo[r]+n;if(o in e)return Vn[t]=o}return t}const yo="http://www.w3.org/1999/xlink";function xo(e,t,s,n,r,o=Li(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(yo,t.slice(6,t.length)):e.setAttributeNS(yo,t,s):s==null||o&&!tl(s)?e.removeAttribute(t):e.setAttribute(t,o?"":vt(s)?String(s):s)}function wo(e,t,s,n,r){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?ni(s):s);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const a=o==="OPTION"?e.getAttribute("value")||"":e.value,u=s==null?e.type==="checkbox"?"on":"":String(s);(a!==u||!("_value"in e))&&(e.value=u),s==null&&e.removeAttribute(t),e._value=s;return}let l=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=tl(s):s==null&&a==="string"?(s="",l=!0):a==="number"&&(s=0,l=!0)}try{e[t]=s}catch{}l&&e.removeAttribute(r||t)}function Ct(e,t,s,n){e.addEventListener(t,s,n)}function ju(e,t,s,n){e.removeEventListener(t,s,n)}const ko=Symbol("_vei");function Ou(e,t,s,n,r=null){const o=e[ko]||(e[ko]={}),l=o[t];if(n&&l)l.value=n;else{const[a,u]=Nu(t);if(n){const g=o[t]=Vu(n,r);Ct(e,a,g,u)}else l&&(ju(e,a,l,u),o[t]=void 0)}}const $o=/(?:Once|Passive|Capture)$/;function Nu(e){let t;if($o.test(e)){t={};let n;for(;n=e.match($o);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):At(e.slice(2)),t]}let Hn=0;const Bu=Promise.resolve(),Uu=()=>Hn||(Bu.then(()=>Hn=0),Hn=Date.now());function Vu(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;it(Hu(n,s.value),t,5,[n])};return s.value=e,s.attached=Uu(),s}function Hu(e,t){if(Y(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>r=>!r._stopped&&n&&n(r))}else return t}const So=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,zu=(e,t,s,n,r,o)=>{const l=r==="svg";t==="class"?Au(e,n,l):t==="style"?Fu(e,s,n):hn(t)?pr(t)||Ou(e,t,s,n,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):qu(e,t,n,l))?(wo(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&xo(e,t,n,l,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Pe(n))?wo(e,It(t),n,o,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),xo(e,t,n,l))};function qu(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&So(t)&&ie(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return So(t)&&Pe(s)?!1:t in e}const Ut=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Y(t)?s=>Ks(t,s):t};function Ku(e){e.target.composing=!0}function _o(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const et=Symbol("_assign");function Co(e,t,s){return t&&(e=e.trim()),s&&(e=bn(e)),e}const he={created(e,{modifiers:{lazy:t,trim:s,number:n}},r){e[et]=Ut(r);const o=n||r.props&&r.props.type==="number";Ct(e,t?"change":"input",l=>{l.target.composing||e[et](Co(e.value,s,o))}),(s||o)&&Ct(e,"change",()=>{e.value=Co(e.value,s,o)}),t||(Ct(e,"compositionstart",Ku),Ct(e,"compositionend",_o),Ct(e,"change",_o))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:r,number:o}},l){if(e[et]=Ut(l),e.composing)return;const a=(o||e.type==="number")&&!/^0\d/.test(e.value)?bn(e.value):e.value,u=t??"";a!==u&&(document.activeElement===e&&e.type!=="range"&&(n&&t===s||r&&e.value.trim()===u)||(e.value=u))}},cn={deep:!0,created(e,t,s){e[et]=Ut(s),Ct(e,"change",()=>{const n=e._modelValue,r=is(e),o=e.checked,l=e[et];if(Y(n)){const a=hr(n,r),u=a!==-1;if(o&&!u)l(n.concat(r));else if(!o&&u){const g=[...n];g.splice(a,1),l(g)}}else if(as(n)){const a=new Set(n);o?a.add(r):a.delete(r),l(a)}else l(ii(e,o))})},mounted:Io,beforeUpdate(e,t,s){e[et]=Ut(s),Io(e,t,s)}};function Io(e,{value:t,oldValue:s},n){e._modelValue=t;let r;if(Y(t))r=hr(t,n.props.value)>-1;else if(as(t))r=t.has(n.props.value);else{if(t===s)return;r=Nt(t,ii(e,!0))}e.checked!==r&&(e.checked=r)}const To={created(e,{value:t},s){e.checked=Nt(t,s.props.value),e[et]=Ut(s),Ct(e,"change",()=>{e[et](is(e))})},beforeUpdate(e,{value:t,oldValue:s},n){e[et]=Ut(n),t!==s&&(e.checked=Nt(t,n.props.value))}},li={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const r=as(t);Ct(e,"change",()=>{const o=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>s?bn(is(l)):is(l));e[et](e.multiple?r?new Set(o):o:o[0]),e._assigning=!0,js(()=>{e._assigning=!1})}),e[et]=Ut(n)},mounted(e,{value:t}){Po(e,t)},beforeUpdate(e,t,s){e[et]=Ut(s)},updated(e,{value:t}){e._assigning||Po(e,t)}};function Po(e,t){const s=e.multiple,n=Y(t);if(!(s&&!n&&!as(t))){for(let r=0,o=e.options.length;r<o;r++){const l=e.options[r],a=is(l);if(s)if(n){const u=typeof a;u==="string"||u==="number"?l.selected=t.some(g=>String(g)===String(a)):l.selected=hr(t,a)>-1}else l.selected=t.has(a);else if(Nt(is(l),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function is(e){return"_value"in e?e._value:e.value}function ii(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Gu=["ctrl","shift","alt","meta"],Wu={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)=>Gu.some(s=>e[`${s}Key`]&&!t.includes(s))},Ot=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((r,...o)=>{for(let l=0;l<t.length;l++){const a=Wu[t[l]];if(a&&a(r,t))return}return e(r,...o)}))},Ju={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ai=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(r=>{if(!("key"in r))return;const o=At(r.key);if(t.some(l=>l===o||Ju[l]===o))return e(r)}))},Zu=Le({patchProp:zu},Su);let Ro;function Qu(){return Ro||(Ro=su(Zu))}const Ao=((...e)=>{const t=Qu().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=Xu(n);if(!r)return;const o=t._component;!ie(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const l=s(r,!1,Yu(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),l},t});function Yu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Xu(e){return Pe(e)?document.querySelector(e):e}async function Re(e,t){const s=await fetch(e,t);if(!s.ok){const n=await s.json().catch(()=>({}));throw new Error(n.error||`HTTP ${s.status}`)}return s.json()}async function He(e,t){return Re(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0})}async function ec(){return Re("/api/issues")}async function ir(e){return Re(`/api/issues/${e}`)}async function tc(e){return Re(`/api/issues/${e}/logs`)}async function sc(){return Re("/api/system/status")}async function nc(e){await He(`/api/issues/${e}/retry`)}async function rc(e){await He(`/api/issues/${e}/cancel`)}async function oc(e){await He(`/api/issues/${e}/restart`)}async function Do(e,t){await He(`/api/issues/${e}/retry-from-phase`,{phase:t})}async function lc(e){await He(`/api/issues/${e}/approve-plan`)}async function ic(e,t){await He(`/api/issues/${e}/reject-plan`,{feedback:t})}async function ac(e){await He(`/api/issues/${e}/skip-review`)}async function uc(e){return Re(`/api/issues/${e}/review-history`)}async function Lo(e,t,s="html"){const n=s==="html"?`/api/issues/${e}/plans/${t}?format=html`:`/api/issues/${e}/plans/${t}`,r=await fetch(n);if(!r.ok){const o=await r.json().catch(()=>({}));throw new Error(o.error||"Failed to load")}return r.text()}async function cc(e,t,s){await Re(`/api/issues/${e}/plans/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:s})})}async function dc(e){return Re(`/api/issues/${e}/supplement`)}async function pc(e,t){return Re(`/api/issues/${e}/supplement`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function fc(e){const t=new URLSearchParams;return e.search&&t.set("search",e.search),t.set("page",String(e.page??1)),t.set("per_page",String(e.perPage)),Re(`/api/gongfeng/issues?${t.toString()}`)}async function gc(e){return He("/api/issues/start",e)}async function hc(e,t){return Re(`/api/issues/${e}/note-sync`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:t})})}async function mc(e){return Re("/api/system/note-sync",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e})})}async function bc(e,t){return Re(`/api/issues/${e}/e2e`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:t})})}async function vc(e){return He("/api/brainstorm/sessions",{transcript:e})}async function yc(e){return Re(`/api/brainstorm/sessions/${e}`)}function zn(e,t,s){const n=new AbortController,r=`/api/brainstorm/sessions/${e}/${t}`;return{fetchResponse:fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:s?JSON.stringify(s):"{}",signal:n.signal}),abort:()=>n.abort()}}async function xc(e,t,s=!0){return He(`/api/brainstorm/sessions/${e}/create-issue`,{title:t,addAutoFinishLabel:s})}async function wc(e){return He("/api/chat/sessions",{title:e})}async function kc(){return Re("/api/chat/sessions")}async function Eo(e){return Re(`/api/chat/sessions/${e}`)}async function $c(e){return Re(`/api/chat/sessions/${e}`,{method:"DELETE"})}function Sc(e,t){const s=new AbortController;return{fetchResponse:fetch(`/api/chat/sessions/${e}/messages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t}),signal:s.signal}),abort:()=>s.abort()}}async function _c(e){const t=new URLSearchParams;e?.q&&t.set("q",e.q),e?.type&&t.set("type",e.type);const s=t.toString();return Re("/api/knowledge/entries"+(s?"?"+s:""))}async function Cc(e){return Re("/api/knowledge/entries/"+e)}async function Ic(e){return He("/api/knowledge/entries",e)}async function Tc(e,t){return Re("/api/knowledge/entries/"+e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function Pc(e){return Re("/api/knowledge/entries/"+e,{method:"DELETE"})}async function Rc(e){return He("/api/knowledge/import/iwiki",{url:e})}async function Ac(e,t){return He("/api/knowledge/import/gongfeng",{type:e,iid:t})}async function Dc(e){return He("/api/knowledge/entries/"+e+"/sync")}async function Lc(){return Re("/api/knowledge/stats")}const Ec={"app.trackedIssues":"已跟踪 Issue","app.browseIssues":"选择新 Issue","app.brainstorm":"脑暴工坊","app.chat":"智能助手","app.knowledge":"知识库","header.connected":"已连接","header.disconnected":"未连接","header.discovery":"发现","header.drive":"驱动","header.uptime":"运行时间","header.syncOnTitle":"Issue 同步已开启(点击关闭)","header.syncOffTitle":"Issue 同步已关闭(点击开启)","header.syncOn":"Issue同步: 开","header.syncOff":"Issue同步: 关","header.langSwitch":"切换语言","stats.total":"总计","stats.active":"处理中","stats.completed":"已完成","stats.failed":"失败","table.filter":"筛选:","table.title":"标题","table.state":"状态","table.progress":"阶段进度","table.retries":"重试","table.updatedAt":"更新时间","table.actions":"操作","table.empty":"暂无 Issue 记录","table.viewInGongfeng":"在工蜂中查看","table.retry":"重试","table.restart":"重来","table.cancel":"取消","filter.all":"全部","filter.active":"处理中","filter.completed":"已完成","filter.failed":"失败","filter.review":"待审核","browse.searchPlaceholder":"搜索 Issue 标题...","browse.loading":"加载中...","browse.search":"搜索","browse.loadingList":"正在从工蜂加载 Issue 列表...","browse.title":"标题","browse.labels":"标签","browse.author":"作者","browse.createdAt":"创建时间","browse.actions":"操作","browse.empty":"暂无 Issue","browse.tracked":"已跟踪","browse.start":"开始处理","browse.pagination":"共 {total} 条,第 {page} / {totalPages} 页","browse.prevPage":"上一页","browse.nextPage":"下一页","start.title":"开始处理 Issue #{iid}","start.issueTitle":"标题","start.descPreview":"描述预览","start.supplement":"补充信息(可选)","start.requirements":"补充需求说明","start.requirementsPlaceholder":"对 Issue 描述的补充或澄清...","start.acceptance":"验收标准","start.acceptancePlaceholder":"完成后需要满足的验收标准...","start.scope":"变更范围","start.scopePlaceholder":"例: 仅后端、仅前端、前后端...","start.constraints":"约束条件","start.constraintsPlaceholder":"技术约束、兼容性要求等...","start.references":"参考链接","start.referencesPlaceholder":"相关文档、设计稿链接等...","start.freeText":"自由补充","start.freeTextPlaceholder":"其他任何需要 AI 知道的信息...","start.tapdId":"TAPD 单号","start.tapdIdPlaceholder":"如 12345678,用于 MR 关联 TAPD(可选)","start.cancel":"取消","start.processing":"处理中...","start.submit":"开始处理","detail.viewInGongfeng":"在工蜂中查看","detail.basicInfo":"基本信息","detail.title":"标题:","detail.branch":"分支:","detail.state":"状态:","detail.createdAt":"创建时间:","detail.retries":"重试次数:","detail.updatedAt":"更新时间:","detail.noteSync":"同步处理结果到 Issue","detail.enabled":"开启","detail.disabled":"关闭","detail.followSystem":"跟随系统","detail.e2eTitle":"E2E UI 自动验收","detail.mrLabel":"合并请求:","detail.errorInfo":"错误信息","detail.retry":"重试处理","detail.restart":"清理重来","detail.cancelTrack":"取消跟踪","pipeline.title":"流水线进度","pipeline.retryFrom":"从此重试","review.title":"Plan Review - 实施计划审核","review.description":"AI 已完成规划阶段,请审核实施计划后决定是否继续。","review.currentRound":"(当前为第 {round} 轮审核)","review.history":"审核历史","review.roundLabel":"{n} 轮","review.roundPrefix":"第 {round} 轮","review.approve":"通过计划","review.skip":"跳过审核","review.feedbackLabel":"审核反馈(拒绝时必填)","review.feedbackPlaceholder":"输入修改意见,AI 将根据反馈重新规划...","review.reject":"拒绝并重新规划","review.submitting":"处理中...","supplement.title":"补充信息","supplement.edit":"编辑","supplement.saving":"保存中...","supplement.save":"保存","supplement.cancel":"取消","supplement.loading":"加载中...","supplement.requirements":"补充需求:","supplement.acceptance":"验收标准:","supplement.scope":"变更范围:","supplement.constraints":"约束条件:","supplement.references":"参考链接:","supplement.freeText":"其他:","supplement.tapdId":"TAPD 单号:","supplement.empty":'暂无补充信息,点击"编辑"添加',"supplement.requirementsLabel":"补充需求说明","supplement.acceptanceLabel":"验收标准","supplement.scopeLabel":"变更范围","supplement.constraintsLabel":"约束条件","supplement.referencesLabel":"参考链接","supplement.freeTextLabel":"自由补充","supplement.tapdIdLabel":"TAPD 单号","supplement.tapdIdPlaceholder":"如 12345678,用于 MR 关联 TAPD(可选)","planDoc.title":"计划文档","planDoc.edit":"编辑","planDoc.saving":"保存中...","planDoc.save":"保存","planDoc.cancel":"取消","planDoc.fullscreen":"全屏查看","planDoc.expand":"展开","planDoc.loading":"加载中...","planDoc.editPlaceholder":"编辑文档内容...","planDoc.selectTab":"点击标签页查看文档","planDoc.closeFullscreen":"关闭全屏 (Esc)","planDoc.noReviewFeedback":"暂无审核反馈(计划未被拒绝过)","planDoc.verifyNotGenerated":"验证报告尚未生成","planDoc.fetchFailed":"获取原始文档失败:","planDoc.saveFailed":"保存失败:","agentLog.title":"Agent 实时输出","agentLog.autoScroll":"自动置顶","agentLog.clear":"清空","agentLog.ended":"任务已结束,无实时输出记录","agentLog.finalState":"最终状态:","agentLog.currentState":"当前状态:","agentLog.waiting":"等待 Agent 输出...","agentLog.count":"{count} 条记录","agentLog.type.assistant":"AI 回复","agentLog.type.tool_use":"工具调用","agentLog.type.tool_result":"工具结果","agentLog.type.result":"最终结果","agentLog.type.stderr":"日志","agentLog.type.raw":"输出","agentLog.type.system":"系统","agentLog.type.partial":"输出中","state.pending":"待处理","state.branch_created":"分支已创建","state.analyzing":"分析中","state.analysis_done":"分析完成","state.designing":"设计中","state.design_done":"设计完成","state.implementing":"实施中","state.implement_done":"实施完成","state.planning":"规划中","state.plan_done":"规划完成","state.waiting_for_review":"待审核","state.review_approved":"审核通过","state.building":"实施中","state.build_done":"实施完成","state.verifying":"验证中","state.completed":"已完成","state.failed":"失败","phase.analysis":"分析","phase.design":"设计","phase.implement":"实施","phase.verify":"验证","phase.plan":"规划","phase.review":"审核","phase.build":"实施","planFile.01-analysis.md":"需求分析","planFile.02-design.md":"系统设计","planFile.03-todolist.md":"实施清单","planFile.04-verify-report.md":"验证报告","planFile.01-plan.md":"实施计划","planFile.02-verify-report.md":"验证报告","planFile.review-feedback.md":"审核反馈","confirm.supplementSaved":"补充信息已保存。是否从分析阶段重新执行?","confirm.retry":"确定要重试 Issue #{iid} 吗?","confirm.cancel":"确定要取消跟踪 Issue #{iid} 吗?","confirm.restart":`确定要清理上下文并重来 Issue #{iid} 吗?
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function s(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(r){if(r.ep)return;r.ep=!0;const o=s(r);fetch(r.href,o)}})();function dr(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const be={},rs=[],ht=()=>{},Jo=()=>!1,hn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),pr=e=>e.startsWith("onUpdate:"),De=Object.assign,fr=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},$i=Object.prototype.hasOwnProperty,ye=(e,t)=>$i.call(e,t),Y=Array.isArray,os=e=>Fs(e)==="[object Map]",cs=e=>Fs(e)==="[object Set]",Vr=e=>Fs(e)==="[object Date]",ie=e=>typeof e=="function",Pe=e=>typeof e=="string",mt=e=>typeof e=="symbol",we=e=>e!==null&&typeof e=="object",Zo=e=>(we(e)||ie(e))&&ie(e.then)&&ie(e.catch),Qo=Object.prototype.toString,Fs=e=>Qo.call(e),Si=e=>Fs(e).slice(8,-1),Yo=e=>Fs(e)==="[object Object]",gr=e=>Pe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,xs=dr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),mn=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},_i=/-\w/g,Ct=mn(e=>e.replace(_i,t=>t.slice(1).toUpperCase())),Ci=/\B([A-Z])/g,Rt=mn(e=>e.replace(Ci,"-$1").toLowerCase()),Xo=mn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ln=mn(e=>e?`on${Xo(e)}`:""),Ge=(e,t)=>!Object.is(e,t),Ks=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},el=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},bn=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ii=e=>{const t=Pe(e)?Number(e):NaN;return isNaN(t)?e:t};let Hr;const vn=()=>Hr||(Hr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function yn(e){if(Y(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],r=Pe(n)?Ai(n):yn(n);if(r)for(const o in r)t[o]=r[o]}return t}else if(Pe(e)||we(e))return e}const Ti=/;(?![^(]*\))/g,Pi=/:([^]+)/,Ri=/\/\*[^]*?\*\//g;function Ai(e){const t={};return e.replace(Ri,"").split(Ti).forEach(s=>{if(s){const n=s.split(Pi);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function te(e){let t="";if(Pe(e))t=e;else if(Y(e))for(let s=0;s<e.length;s++){const n=te(e[s]);n&&(t+=n+" ")}else if(we(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Di="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Li=dr(Di);function tl(e){return!!e||e===""}function Ei(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=Bt(e[n],t[n]);return s}function Bt(e,t){if(e===t)return!0;let s=Vr(e),n=Vr(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=mt(e),n=mt(t),s||n)return e===t;if(s=Y(e),n=Y(t),s||n)return s&&n?Ei(e,t):!1;if(s=we(e),n=we(t),s||n){if(!s||!n)return!1;const r=Object.keys(e).length,o=Object.keys(t).length;if(r!==o)return!1;for(const l in e){const a=e.hasOwnProperty(l),u=t.hasOwnProperty(l);if(a&&!u||!a&&u||!Bt(e[l],t[l]))return!1}}return String(e)===String(t)}function hr(e,t){return e.findIndex(s=>Bt(s,t))}const sl=e=>!!(e&&e.__v_isRef===!0),p=e=>Pe(e)?e:e==null?"":Y(e)||we(e)&&(e.toString===Qo||!ie(e.toString))?sl(e)?p(e.value):JSON.stringify(e,nl,2):String(e),nl=(e,t)=>sl(t)?nl(e,t.value):os(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,r],o)=>(s[En(n,o)+" =>"]=r,s),{})}:cs(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>En(s))}:mt(t)?En(t):we(t)&&!Y(t)&&!Yo(t)?String(t):t,En=(e,t="")=>{var s;return mt(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};let Ke;class Fi{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=Ke,!t&&Ke&&(this.index=(Ke.scopes||(Ke.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=Ke;try{return Ke=this,t()}finally{Ke=s}}}on(){++this._on===1&&(this.prevScope=Ke,Ke=this)}off(){this._on>0&&--this._on===0&&(Ke=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function Mi(){return Ke}let _e;const Fn=new WeakSet;class rl{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,Ke&&Ke.active&&Ke.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Fn.has(this)&&(Fn.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ll(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,zr(this),il(this);const t=_e,s=nt;_e=this,nt=!0;try{return this.fn()}finally{al(this),_e=t,nt=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)vr(t);this.deps=this.depsTail=void 0,zr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Fn.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Kn(this)&&this.run()}get dirty(){return Kn(this)}}let ol=0,ws,ks;function ll(e,t=!1){if(e.flags|=8,t){e.next=ks,ks=e;return}e.next=ws,ws=e}function mr(){ol++}function br(){if(--ol>0)return;if(ks){let t=ks;for(ks=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;ws;){let t=ws;for(ws=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function il(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function al(e){let t,s=e.depsTail,n=s;for(;n;){const r=n.prevDep;n.version===-1?(n===s&&(s=r),vr(n),ji(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=r}e.deps=t,e.depsTail=s}function Kn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ul(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ul(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ts)||(e.globalVersion=Ts,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Kn(e))))return;e.flags|=2;const t=e.dep,s=_e,n=nt;_e=e,nt=!0;try{il(e);const r=e.fn(e._value);(t.version===0||Ge(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{_e=s,nt=n,al(e),e.flags&=-3}}function vr(e,t=!1){const{dep:s,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let o=s.computed.deps;o;o=o.nextDep)vr(o,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function ji(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let nt=!0;const cl=[];function It(){cl.push(nt),nt=!1}function Tt(){const e=cl.pop();nt=e===void 0?!0:e}function zr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=_e;_e=void 0;try{t()}finally{_e=s}}}let Ts=0;class Oi{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class xn{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(!_e||!nt||_e===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==_e)s=this.activeLink=new Oi(_e,this),_e.deps?(s.prevDep=_e.depsTail,_e.depsTail.nextDep=s,_e.depsTail=s):_e.deps=_e.depsTail=s,dl(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=_e.depsTail,s.nextDep=void 0,_e.depsTail.nextDep=s,_e.depsTail=s,_e.deps===s&&(_e.deps=n)}return s}trigger(t){this.version++,Ts++,this.notify(t)}notify(t){mr();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{br()}}}function dl(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)dl(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Gn=new WeakMap,Yt=Symbol(""),Wn=Symbol(""),Ps=Symbol("");function je(e,t,s){if(nt&&_e){let n=Gn.get(e);n||Gn.set(e,n=new Map);let r=n.get(s);r||(n.set(s,r=new xn),r.map=n,r.key=s),r.track()}}function $t(e,t,s,n,r,o){const l=Gn.get(e);if(!l){Ts++;return}const a=u=>{u&&u.trigger()};if(mr(),t==="clear")l.forEach(a);else{const u=Y(e),g=u&&gr(s);if(u&&s==="length"){const d=Number(n);l.forEach((f,y)=>{(y==="length"||y===Ps||!mt(y)&&y>=d)&&a(f)})}else switch((s!==void 0||l.has(void 0))&&a(l.get(s)),g&&a(l.get(Ps)),t){case"add":u?g&&a(l.get("length")):(a(l.get(Yt)),os(e)&&a(l.get(Wn)));break;case"delete":u||(a(l.get(Yt)),os(e)&&a(l.get(Wn)));break;case"set":os(e)&&a(l.get(Yt));break}}br()}function ss(e){const t=me(e);return t===e?t:(je(t,"iterate",Ps),Xe(e)?t:t.map(ot))}function wn(e){return je(e=me(e),"iterate",Ps),e}function jt(e,t){return Pt(e)?as(Xt(e)?ot(t):t):ot(t)}const Ni={__proto__:null,[Symbol.iterator](){return Mn(this,Symbol.iterator,e=>jt(this,e))},concat(...e){return ss(this).concat(...e.map(t=>Y(t)?ss(t):t))},entries(){return Mn(this,"entries",e=>(e[1]=jt(this,e[1]),e))},every(e,t){return yt(this,"every",e,t,void 0,arguments)},filter(e,t){return yt(this,"filter",e,t,s=>s.map(n=>jt(this,n)),arguments)},find(e,t){return yt(this,"find",e,t,s=>jt(this,s),arguments)},findIndex(e,t){return yt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return yt(this,"findLast",e,t,s=>jt(this,s),arguments)},findLastIndex(e,t){return yt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return yt(this,"forEach",e,t,void 0,arguments)},includes(...e){return jn(this,"includes",e)},indexOf(...e){return jn(this,"indexOf",e)},join(e){return ss(this).join(e)},lastIndexOf(...e){return jn(this,"lastIndexOf",e)},map(e,t){return yt(this,"map",e,t,void 0,arguments)},pop(){return ps(this,"pop")},push(...e){return ps(this,"push",e)},reduce(e,...t){return qr(this,"reduce",e,t)},reduceRight(e,...t){return qr(this,"reduceRight",e,t)},shift(){return ps(this,"shift")},some(e,t){return yt(this,"some",e,t,void 0,arguments)},splice(...e){return ps(this,"splice",e)},toReversed(){return ss(this).toReversed()},toSorted(e){return ss(this).toSorted(e)},toSpliced(...e){return ss(this).toSpliced(...e)},unshift(...e){return ps(this,"unshift",e)},values(){return Mn(this,"values",e=>jt(this,e))}};function Mn(e,t,s){const n=wn(e),r=n[t]();return n!==e&&!Xe(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=s(o.value)),o}),r}const Bi=Array.prototype;function yt(e,t,s,n,r,o){const l=wn(e),a=l!==e&&!Xe(e),u=l[t];if(u!==Bi[t]){const f=u.apply(e,o);return a?ot(f):f}let g=s;l!==e&&(a?g=function(f,y){return s.call(this,jt(e,f),y,e)}:s.length>2&&(g=function(f,y){return s.call(this,f,y,e)}));const d=u.call(l,g,n);return a&&r?r(d):d}function qr(e,t,s,n){const r=wn(e);let o=s;return r!==e&&(Xe(e)?s.length>3&&(o=function(l,a,u){return s.call(this,l,a,u,e)}):o=function(l,a,u){return s.call(this,l,jt(e,a),u,e)}),r[t](o,...n)}function jn(e,t,s){const n=me(e);je(n,"iterate",Ps);const r=n[t](...s);return(r===-1||r===!1)&&wr(s[0])?(s[0]=me(s[0]),n[t](...s)):r}function ps(e,t,s=[]){It(),mr();const n=me(e)[t].apply(e,s);return br(),Tt(),n}const Ui=dr("__proto__,__v_isRef,__isVue"),pl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(mt));function Vi(e){mt(e)||(e=String(e));const t=me(this);return je(t,"has",e),t.hasOwnProperty(e)}class fl{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(s==="__v_isReactive")return!r;if(s==="__v_isReadonly")return r;if(s==="__v_isShallow")return o;if(s==="__v_raw")return n===(r?o?Yi:bl:o?ml:hl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const l=Y(t);if(!r){let u;if(l&&(u=Ni[s]))return u;if(s==="hasOwnProperty")return Vi}const a=Reflect.get(t,s,Le(t)?t:n);if((mt(s)?pl.has(s):Ui(s))||(r||je(t,"get",s),o))return a;if(Le(a)){const u=l&&gr(s)?a:a.value;return r&&we(u)?Zn(u):u}return we(a)?r?Zn(a):kn(a):a}}class gl extends fl{constructor(t=!1){super(!1,t)}set(t,s,n,r){let o=t[s];const l=Y(t)&&gr(s);if(!this._isShallow){const g=Pt(o);if(!Xe(n)&&!Pt(n)&&(o=me(o),n=me(n)),!l&&Le(o)&&!Le(n))return g||(o.value=n),!0}const a=l?Number(s)<t.length:ye(t,s),u=Reflect.set(t,s,n,Le(t)?t:r);return t===me(r)&&(a?Ge(n,o)&&$t(t,"set",s,n):$t(t,"add",s,n)),u}deleteProperty(t,s){const n=ye(t,s);t[s];const r=Reflect.deleteProperty(t,s);return r&&n&&$t(t,"delete",s,void 0),r}has(t,s){const n=Reflect.has(t,s);return(!mt(s)||!pl.has(s))&&je(t,"has",s),n}ownKeys(t){return je(t,"iterate",Y(t)?"length":Yt),Reflect.ownKeys(t)}}class Hi extends fl{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const zi=new gl,qi=new Hi,Ki=new gl(!0);const Jn=e=>e,Us=e=>Reflect.getPrototypeOf(e);function Gi(e,t,s){return function(...n){const r=this.__v_raw,o=me(r),l=os(o),a=e==="entries"||e===Symbol.iterator&&l,u=e==="keys"&&l,g=r[e](...n),d=s?Jn:t?as:ot;return!t&&je(o,"iterate",u?Wn:Yt),De(Object.create(g),{next(){const{value:f,done:y}=g.next();return y?{value:f,done:y}:{value:a?[d(f[0]),d(f[1])]:d(f),done:y}}})}}function Vs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Wi(e,t){const s={get(r){const o=this.__v_raw,l=me(o),a=me(r);e||(Ge(r,a)&&je(l,"get",r),je(l,"get",a));const{has:u}=Us(l),g=t?Jn:e?as:ot;if(u.call(l,r))return g(o.get(r));if(u.call(l,a))return g(o.get(a));o!==l&&o.get(r)},get size(){const r=this.__v_raw;return!e&&je(me(r),"iterate",Yt),r.size},has(r){const o=this.__v_raw,l=me(o),a=me(r);return e||(Ge(r,a)&&je(l,"has",r),je(l,"has",a)),r===a?o.has(r):o.has(r)||o.has(a)},forEach(r,o){const l=this,a=l.__v_raw,u=me(a),g=t?Jn:e?as:ot;return!e&&je(u,"iterate",Yt),a.forEach((d,f)=>r.call(o,g(d),g(f),l))}};return De(s,e?{add:Vs("add"),set:Vs("set"),delete:Vs("delete"),clear:Vs("clear")}:{add(r){!t&&!Xe(r)&&!Pt(r)&&(r=me(r));const o=me(this);return Us(o).has.call(o,r)||(o.add(r),$t(o,"add",r,r)),this},set(r,o){!t&&!Xe(o)&&!Pt(o)&&(o=me(o));const l=me(this),{has:a,get:u}=Us(l);let g=a.call(l,r);g||(r=me(r),g=a.call(l,r));const d=u.call(l,r);return l.set(r,o),g?Ge(o,d)&&$t(l,"set",r,o):$t(l,"add",r,o),this},delete(r){const o=me(this),{has:l,get:a}=Us(o);let u=l.call(o,r);u||(r=me(r),u=l.call(o,r)),a&&a.call(o,r);const g=o.delete(r);return u&&$t(o,"delete",r,void 0),g},clear(){const r=me(this),o=r.size!==0,l=r.clear();return o&&$t(r,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(r=>{s[r]=Gi(r,e,t)}),s}function yr(e,t){const s=Wi(e,t);return(n,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?n:Reflect.get(ye(s,r)&&r in n?s:n,r,o)}const Ji={get:yr(!1,!1)},Zi={get:yr(!1,!0)},Qi={get:yr(!0,!1)};const hl=new WeakMap,ml=new WeakMap,bl=new WeakMap,Yi=new WeakMap;function Xi(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ea(e){return e.__v_skip||!Object.isExtensible(e)?0:Xi(Si(e))}function kn(e){return Pt(e)?e:xr(e,!1,zi,Ji,hl)}function ta(e){return xr(e,!1,Ki,Zi,ml)}function Zn(e){return xr(e,!0,qi,Qi,bl)}function xr(e,t,s,n,r){if(!we(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=ea(e);if(o===0)return e;const l=r.get(e);if(l)return l;const a=new Proxy(e,o===2?n:s);return r.set(e,a),a}function Xt(e){return Pt(e)?Xt(e.__v_raw):!!(e&&e.__v_isReactive)}function Pt(e){return!!(e&&e.__v_isReadonly)}function Xe(e){return!!(e&&e.__v_isShallow)}function wr(e){return e?!!e.__v_raw:!1}function me(e){const t=e&&e.__v_raw;return t?me(t):e}function sa(e){return!ye(e,"__v_skip")&&Object.isExtensible(e)&&el(e,"__v_skip",!0),e}const ot=e=>we(e)?kn(e):e,as=e=>we(e)?Zn(e):e;function Le(e){return e?e.__v_isRef===!0:!1}function F(e){return na(e,!1)}function na(e,t){return Le(e)?e:new ra(e,t)}class ra{constructor(t,s){this.dep=new xn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:me(t),this._value=s?t:ot(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||Xe(t)||Pt(t);t=n?t:me(t),Ge(t,s)&&(this._rawValue=t,this._value=n?t:ot(t),this.dep.trigger())}}function c(e){return Le(e)?e.value:e}const oa={get:(e,t,s)=>t==="__v_raw"?e:c(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const r=e[t];return Le(r)&&!Le(s)?(r.value=s,!0):Reflect.set(e,t,s,n)}};function vl(e){return Xt(e)?e:new Proxy(e,oa)}class la{constructor(t){this.__v_isRef=!0,this._value=void 0;const s=this.dep=new xn,{get:n,set:r}=t(s.track.bind(s),s.trigger.bind(s));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function ia(e){return new la(e)}class aa{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new xn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ts-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&_e!==this)return ll(this,!0),!0}get value(){const t=this.dep.track();return ul(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ua(e,t,s=!1){let n,r;return ie(e)?n=e:(n=e.get,r=e.set),new aa(n,r,s)}const Hs={},Ys=new WeakMap;let Jt;function ca(e,t=!1,s=Jt){if(s){let n=Ys.get(s);n||Ys.set(s,n=[]),n.push(e)}}function da(e,t,s=be){const{immediate:n,deep:r,once:o,scheduler:l,augmentJob:a,call:u}=s,g=R=>r?R:Xe(R)||r===!1||r===0?St(R,1):St(R);let d,f,y,x,w=!1,C=!1;if(Le(e)?(f=()=>e.value,w=Xe(e)):Xt(e)?(f=()=>g(e),w=!0):Y(e)?(C=!0,w=e.some(R=>Xt(R)||Xe(R)),f=()=>e.map(R=>{if(Le(R))return R.value;if(Xt(R))return g(R);if(ie(R))return u?u(R,2):R()})):ie(e)?t?f=u?()=>u(e,2):e:f=()=>{if(y){It();try{y()}finally{Tt()}}const R=Jt;Jt=d;try{return u?u(e,3,[x]):e(x)}finally{Jt=R}}:f=ht,t&&r){const R=f,k=r===!0?1/0:r;f=()=>St(R(),k)}const P=Mi(),T=()=>{d.stop(),P&&P.active&&fr(P.effects,d)};if(o&&t){const R=t;t=(...k)=>{R(...k),T()}}let I=C?new Array(e.length).fill(Hs):Hs;const H=R=>{if(!(!(d.flags&1)||!d.dirty&&!R))if(t){const k=d.run();if(r||w||(C?k.some((v,_)=>Ge(v,I[_])):Ge(k,I))){y&&y();const v=Jt;Jt=d;try{const _=[k,I===Hs?void 0:C&&I[0]===Hs?[]:I,x];I=k,u?u(t,3,_):t(..._)}finally{Jt=v}}}else d.run()};return a&&a(H),d=new rl(f),d.scheduler=l?()=>l(H,!1):H,x=R=>ca(R,!1,d),y=d.onStop=()=>{const R=Ys.get(d);if(R){if(u)u(R,4);else for(const k of R)k();Ys.delete(d)}},t?n?H(!0):I=d.run():l?l(H.bind(null,!0),!0):d.run(),T.pause=d.pause.bind(d),T.resume=d.resume.bind(d),T.stop=T,T}function St(e,t=1/0,s){if(t<=0||!we(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Le(e))St(e.value,t,s);else if(Y(e))for(let n=0;n<e.length;n++)St(e[n],t,s);else if(cs(e)||os(e))e.forEach(n=>{St(n,t,s)});else if(Yo(e)){for(const n in e)St(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&St(e[n],t,s)}return e}function Ms(e,t,s,n){try{return n?e(...n):e()}catch(r){$n(r,t,s)}}function lt(e,t,s,n){if(ie(e)){const r=Ms(e,t,s,n);return r&&Zo(r)&&r.catch(o=>{$n(o,t,s)}),r}if(Y(e)){const r=[];for(let o=0;o<e.length;o++)r.push(lt(e[o],t,s,n));return r}}function $n(e,t,s,n=!0){const r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||be;if(t){let a=t.parent;const u=t.proxy,g=`https://vuejs.org/error-reference/#runtime-${s}`;for(;a;){const d=a.ec;if(d){for(let f=0;f<d.length;f++)if(d[f](e,u,g)===!1)return}a=a.parent}if(o){It(),Ms(o,null,10,[e,u,g]),Tt();return}}pa(e,s,r,n,l)}function pa(e,t,s,n=!0,r=!1){if(r)throw e;console.error(e)}const Ne=[];let pt=-1;const ls=[];let Ot=null,ns=0;const yl=Promise.resolve();let Xs=null;function js(e){const t=Xs||yl;return e?t.then(this?e.bind(this):e):t}function fa(e){let t=pt+1,s=Ne.length;for(;t<s;){const n=t+s>>>1,r=Ne[n],o=Rs(r);o<e||o===e&&r.flags&2?t=n+1:s=n}return t}function kr(e){if(!(e.flags&1)){const t=Rs(e),s=Ne[Ne.length-1];!s||!(e.flags&2)&&t>=Rs(s)?Ne.push(e):Ne.splice(fa(t),0,e),e.flags|=1,xl()}}function xl(){Xs||(Xs=yl.then(kl))}function ga(e){Y(e)?ls.push(...e):Ot&&e.id===-1?Ot.splice(ns+1,0,e):e.flags&1||(ls.push(e),e.flags|=1),xl()}function Kr(e,t,s=pt+1){for(;s<Ne.length;s++){const n=Ne[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Ne.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function wl(e){if(ls.length){const t=[...new Set(ls)].sort((s,n)=>Rs(s)-Rs(n));if(ls.length=0,Ot){Ot.push(...t);return}for(Ot=t,ns=0;ns<Ot.length;ns++){const s=Ot[ns];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}Ot=null,ns=0}}const Rs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function kl(e){try{for(pt=0;pt<Ne.length;pt++){const t=Ne[pt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Ms(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;pt<Ne.length;pt++){const t=Ne[pt];t&&(t.flags&=-2)}pt=-1,Ne.length=0,wl(),Xs=null,(Ne.length||ls.length)&&kl()}}let Ye=null,$l=null;function en(e){const t=Ye;return Ye=e,$l=e&&e.type.__scopeId||null,t}function Sn(e,t=Ye,s){if(!t||e._n)return e;const n=(...r)=>{n._d&&on(-1);const o=en(t);let l;try{l=e(...r)}finally{en(o),n._d&&on(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function ue(e,t){if(Ye===null)return e;const s=Pn(Ye),n=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[o,l,a,u=be]=t[r];o&&(ie(o)&&(o={mounted:o,updated:o}),o.deep&&St(l),n.push({dir:o,instance:s,value:l,oldValue:void 0,arg:a,modifiers:u}))}return e}function qt(e,t,s,n){const r=e.dirs,o=t&&t.dirs;for(let l=0;l<r.length;l++){const a=r[l];o&&(a.oldValue=o[l].value);let u=a.dir[n];u&&(It(),lt(u,s,8,[e.el,a,e,t]),Tt())}}function ha(e,t){if(Ue){let s=Ue.provides;const n=Ue.parent&&Ue.parent.provides;n===s&&(s=Ue.provides=Object.create(n)),s[e]=t}}function Gs(e,t,s=!1){const n=Tr();if(n||is){let r=is?is._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return s&&ie(t)?t.call(n&&n.proxy):t}}const ma=Symbol.for("v-scx"),ba=()=>Gs(ma);function va(e,t){return $r(e,null,{flush:"sync"})}function rt(e,t,s){return $r(e,t,s)}function $r(e,t,s=be){const{immediate:n,deep:r,flush:o,once:l}=s,a=De({},s),u=t&&n||!t&&o!=="post";let g;if(Ls){if(o==="sync"){const x=ba();g=x.__watcherHandles||(x.__watcherHandles=[])}else if(!u){const x=()=>{};return x.stop=ht,x.resume=ht,x.pause=ht,x}}const d=Ue;a.call=(x,w,C)=>lt(x,d,w,C);let f=!1;o==="post"?a.scheduler=x=>{Me(x,d&&d.suspense)}:o!=="sync"&&(f=!0,a.scheduler=(x,w)=>{w?x():kr(x)}),a.augmentJob=x=>{t&&(x.flags|=4),f&&(x.flags|=2,d&&(x.id=d.uid,x.i=d))};const y=da(e,t,a);return Ls&&(g?g.push(y):u&&y()),y}function ya(e,t,s){const n=this.proxy,r=Pe(e)?e.includes(".")?Sl(n,e):()=>n[e]:e.bind(n,n);let o;ie(t)?o=t:(o=t.handler,s=t);const l=Os(this),a=$r(r,o.bind(n),s);return l(),a}function Sl(e,t){const s=t.split(".");return()=>{let n=e;for(let r=0;r<s.length&&n;r++)n=n[s[r]];return n}}const _l=Symbol("_vte"),Cl=e=>e.__isTeleport,$s=e=>e&&(e.disabled||e.disabled===""),Gr=e=>e&&(e.defer||e.defer===""),Wr=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Jr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Qn=(e,t)=>{const s=e&&e.to;return Pe(s)?t?t(s):null:s},Il={name:"Teleport",__isTeleport:!0,process(e,t,s,n,r,o,l,a,u,g){const{mc:d,pc:f,pbc:y,o:{insert:x,querySelector:w,createText:C,createComment:P}}=g,T=$s(t.props);let{shapeFlag:I,children:H,dynamicChildren:R}=t;if(e==null){const k=t.el=C(""),v=t.anchor=C("");x(k,s,n),x(v,s,n);const _=(S,L)=>{I&16&&d(H,S,L,r,o,l,a,u)},M=()=>{const S=t.target=Qn(t.props,w),L=Yn(S,t,C,x);S&&(l!=="svg"&&Wr(S)?l="svg":l!=="mathml"&&Jr(S)&&(l="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(S),T||(_(S,L),Ws(t,!1)))};T&&(_(s,v),Ws(t,!0)),Gr(t.props)?(t.el.__isMounted=!1,Me(()=>{M(),delete t.el.__isMounted},o)):M()}else{if(Gr(t.props)&&e.el.__isMounted===!1){Me(()=>{Il.process(e,t,s,n,r,o,l,a,u,g)},o);return}t.el=e.el,t.targetStart=e.targetStart;const k=t.anchor=e.anchor,v=t.target=e.target,_=t.targetAnchor=e.targetAnchor,M=$s(e.props),S=M?s:v,L=M?k:_;if(l==="svg"||Wr(v)?l="svg":(l==="mathml"||Jr(v))&&(l="mathml"),R?(y(e.dynamicChildren,R,S,r,o,l,a),Cr(e,t,!0)):u||f(e,t,S,L,r,o,l,a,!1),T)M?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):zs(t,s,k,g,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const q=t.target=Qn(t.props,w);q&&zs(t,q,null,g,0)}else M&&zs(t,v,_,g,1);Ws(t,T)}},remove(e,t,s,{um:n,o:{remove:r}},o){const{shapeFlag:l,children:a,anchor:u,targetStart:g,targetAnchor:d,target:f,props:y}=e;if(f&&(r(g),r(d)),o&&r(u),l&16){const x=o||!$s(y);for(let w=0;w<a.length;w++){const C=a[w];n(C,t,s,x,!!C.dynamicChildren)}}},move:zs,hydrate:xa};function zs(e,t,s,{o:{insert:n},m:r},o=2){o===0&&n(e.targetAnchor,t,s);const{el:l,anchor:a,shapeFlag:u,children:g,props:d}=e,f=o===2;if(f&&n(l,t,s),(!f||$s(d))&&u&16)for(let y=0;y<g.length;y++)r(g[y],t,s,2);f&&n(a,t,s)}function xa(e,t,s,n,r,o,{o:{nextSibling:l,parentNode:a,querySelector:u,insert:g,createText:d}},f){function y(P,T){let I=T;for(;I;){if(I&&I.nodeType===8){if(I.data==="teleport start anchor")t.targetStart=I;else if(I.data==="teleport anchor"){t.targetAnchor=I,P._lpa=t.targetAnchor&&l(t.targetAnchor);break}}I=l(I)}}function x(P,T){T.anchor=f(l(P),T,a(P),s,n,r,o)}const w=t.target=Qn(t.props,u),C=$s(t.props);if(w){const P=w._lpa||w.firstChild;t.shapeFlag&16&&(C?(x(e,t),y(w,P),t.targetAnchor||Yn(w,t,d,g,a(e)===w?e:null)):(t.anchor=l(e),y(w,P),t.targetAnchor||Yn(w,t,d,g),f(P&&l(P),t,w,s,n,r,o))),Ws(t,C)}else C&&t.shapeFlag&16&&(x(e,t),t.targetStart=e,t.targetAnchor=l(e));return t.anchor&&l(t.anchor)}const wa=Il;function Ws(e,t){const s=e.ctx;if(s&&s.ut){let n,r;for(t?(n=e.el,r=e.anchor):(n=e.targetStart,r=e.targetAnchor);n&&n!==r;)n.nodeType===1&&n.setAttribute("data-v-owner",s.uid),n=n.nextSibling;s.ut()}}function Yn(e,t,s,n,r=null){const o=t.targetStart=s(""),l=t.targetAnchor=s("");return o[_l]=l,e&&(n(o,e,r),n(l,e,r)),l}const ft=Symbol("_leaveCb"),fs=Symbol("_enterCb");function ka(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Dt(()=>{e.isMounted=!0}),Fl(()=>{e.isUnmounting=!0}),e}const Ze=[Function,Array],Tl={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ze,onEnter:Ze,onAfterEnter:Ze,onEnterCancelled:Ze,onBeforeLeave:Ze,onLeave:Ze,onAfterLeave:Ze,onLeaveCancelled:Ze,onBeforeAppear:Ze,onAppear:Ze,onAfterAppear:Ze,onAppearCancelled:Ze},Pl=e=>{const t=e.subTree;return t.component?Pl(t.component):t},$a={name:"BaseTransition",props:Tl,setup(e,{slots:t}){const s=Tr(),n=ka();return()=>{const r=t.default&&Dl(t.default(),!0);if(!r||!r.length)return;const o=Rl(r),l=me(e),{mode:a}=l;if(n.isLeaving)return On(o);const u=Zr(o);if(!u)return On(o);let g=Xn(u,l,n,s,f=>g=f);u.type!==Be&&As(u,g);let d=s.subTree&&Zr(s.subTree);if(d&&d.type!==Be&&!Zt(d,u)&&Pl(s).type!==Be){let f=Xn(d,l,n,s);if(As(d,f),a==="out-in"&&u.type!==Be)return n.isLeaving=!0,f.afterLeave=()=>{n.isLeaving=!1,s.job.flags&8||s.update(),delete f.afterLeave,d=void 0},On(o);a==="in-out"&&u.type!==Be?f.delayLeave=(y,x,w)=>{const C=Al(n,d);C[String(d.key)]=d,y[ft]=()=>{x(),y[ft]=void 0,delete g.delayedLeave,d=void 0},g.delayedLeave=()=>{w(),delete g.delayedLeave,d=void 0}}:d=void 0}else d&&(d=void 0);return o}}};function Rl(e){let t=e[0];if(e.length>1){for(const s of e)if(s.type!==Be){t=s;break}}return t}const Sa=$a;function Al(e,t){const{leavingVNodes:s}=e;let n=s.get(t.type);return n||(n=Object.create(null),s.set(t.type,n)),n}function Xn(e,t,s,n,r){const{appear:o,mode:l,persisted:a=!1,onBeforeEnter:u,onEnter:g,onAfterEnter:d,onEnterCancelled:f,onBeforeLeave:y,onLeave:x,onAfterLeave:w,onLeaveCancelled:C,onBeforeAppear:P,onAppear:T,onAfterAppear:I,onAppearCancelled:H}=t,R=String(e.key),k=Al(s,e),v=(S,L)=>{S&<(S,n,9,L)},_=(S,L)=>{const q=L[1];v(S,L),Y(S)?S.every(K=>K.length<=1)&&q():S.length<=1&&q()},M={mode:l,persisted:a,beforeEnter(S){let L=u;if(!s.isMounted)if(o)L=P||u;else return;S[ft]&&S[ft](!0);const q=k[R];q&&Zt(e,q)&&q.el[ft]&&q.el[ft](),v(L,[S])},enter(S){if(k[R]===e)return;let L=g,q=d,K=f;if(!s.isMounted)if(o)L=T||g,q=I||d,K=H||f;else return;let le=!1;S[fs]=Te=>{le||(le=!0,Te?v(K,[S]):v(q,[S]),M.delayedLeave&&M.delayedLeave(),S[fs]=void 0)};const ce=S[fs].bind(null,!1);L?_(L,[S,ce]):ce()},leave(S,L){const q=String(e.key);if(S[fs]&&S[fs](!0),s.isUnmounting)return L();v(y,[S]);let K=!1;S[ft]=ce=>{K||(K=!0,L(),ce?v(C,[S]):v(w,[S]),S[ft]=void 0,k[q]===e&&delete k[q])};const le=S[ft].bind(null,!1);k[q]=e,x?_(x,[S,le]):le()},clone(S){const L=Xn(S,t,s,n,r);return r&&r(L),L}};return M}function On(e){if(_n(e))return e=Ut(e),e.children=null,e}function Zr(e){if(!_n(e))return Cl(e.type)&&e.children?Rl(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:s}=e;if(s){if(t&16)return s[0];if(t&32&&ie(s.default))return s.default()}}function As(e,t){e.shapeFlag&6&&e.component?(e.transition=t,As(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 Dl(e,t=!1,s){let n=[],r=0;for(let o=0;o<e.length;o++){let l=e[o];const a=s==null?l.key:String(s)+String(l.key!=null?l.key:o);l.type===ne?(l.patchFlag&128&&r++,n=n.concat(Dl(l.children,t,a))):(t||l.type!==Be)&&n.push(a!=null?Ut(l,{key:a}):l)}if(r>1)for(let o=0;o<n.length;o++)n[o].patchFlag=-2;return n}function Ee(e,t){return ie(e)?De({name:e.name},t,{setup:e}):e}function Ll(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Qr(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const tn=new WeakMap;function Ss(e,t,s,n,r=!1){if(Y(e)){e.forEach((C,P)=>Ss(C,t&&(Y(t)?t[P]:t),s,n,r));return}if(_s(n)&&!r){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Ss(e,t,s,n.component.subTree);return}const o=n.shapeFlag&4?Pn(n.component):n.el,l=r?null:o,{i:a,r:u}=e,g=t&&t.r,d=a.refs===be?a.refs={}:a.refs,f=a.setupState,y=me(f),x=f===be?Jo:C=>Qr(d,C)?!1:ye(y,C),w=(C,P)=>!(P&&Qr(d,P));if(g!=null&&g!==u){if(Yr(t),Pe(g))d[g]=null,x(g)&&(f[g]=null);else if(Le(g)){const C=t;w(g,C.k)&&(g.value=null),C.k&&(d[C.k]=null)}}if(ie(u))Ms(u,a,12,[l,d]);else{const C=Pe(u),P=Le(u);if(C||P){const T=()=>{if(e.f){const I=C?x(u)?f[u]:d[u]:w()||!e.k?u.value:d[e.k];if(r)Y(I)&&fr(I,o);else if(Y(I))I.includes(o)||I.push(o);else if(C)d[u]=[o],x(u)&&(f[u]=d[u]);else{const H=[o];w(u,e.k)&&(u.value=H),e.k&&(d[e.k]=H)}}else C?(d[u]=l,x(u)&&(f[u]=l)):P&&(w(u,e.k)&&(u.value=l),e.k&&(d[e.k]=l))};if(l){const I=()=>{T(),tn.delete(e)};I.id=-1,tn.set(e,I),Me(I,s)}else Yr(e),T()}}}function Yr(e){const t=tn.get(e);t&&(t.flags|=8,tn.delete(e))}vn().requestIdleCallback;vn().cancelIdleCallback;const _s=e=>!!e.type.__asyncLoader,_n=e=>e.type.__isKeepAlive;function _a(e,t){El(e,"a",t)}function Ca(e,t){El(e,"da",t)}function El(e,t,s=Ue){const n=e.__wdc||(e.__wdc=()=>{let r=s;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Cn(t,n,s),s){let r=s.parent;for(;r&&r.parent;)_n(r.parent.vnode)&&Ia(n,t,s,r),r=r.parent}}function Ia(e,t,s,n){const r=Cn(t,e,n,!0);Lt(()=>{fr(n[t],r)},s)}function Cn(e,t,s=Ue,n=!1){if(s){const r=s[e]||(s[e]=[]),o=t.__weh||(t.__weh=(...l)=>{It();const a=Os(s),u=lt(t,s,e,l);return a(),Tt(),u});return n?r.unshift(o):r.push(o),o}}const At=e=>(t,s=Ue)=>{(!Ls||e==="sp")&&Cn(e,(...n)=>t(...n),s)},Ta=At("bm"),Dt=At("m"),Pa=At("bu"),Ra=At("u"),Fl=At("bum"),Lt=At("um"),Aa=At("sp"),Da=At("rtg"),La=At("rtc");function Ea(e,t=Ue){Cn("ec",e,t)}const Fa=Symbol.for("v-ndc");function Ae(e,t,s,n){let r;const o=s,l=Y(e);if(l||Pe(e)){const a=l&&Xt(e);let u=!1,g=!1;a&&(u=!Xe(e),g=Pt(e),e=wn(e)),r=new Array(e.length);for(let d=0,f=e.length;d<f;d++)r[d]=t(u?g?as(ot(e[d])):ot(e[d]):e[d],d,void 0,o)}else if(typeof e=="number"){r=new Array(e);for(let a=0;a<e;a++)r[a]=t(a+1,a,void 0,o)}else if(we(e))if(e[Symbol.iterator])r=Array.from(e,(a,u)=>t(a,u,void 0,o));else{const a=Object.keys(e);r=new Array(a.length);for(let u=0,g=a.length;u<g;u++){const d=a[u];r[u]=t(e[d],d,u,o)}}else r=[];return r}const er=e=>e?ti(e)?Pn(e):er(e.parent):null,Cs=De(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=>er(e.parent),$root:e=>er(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>jl(e),$forceUpdate:e=>e.f||(e.f=()=>{kr(e.update)}),$nextTick:e=>e.n||(e.n=js.bind(e.proxy)),$watch:e=>ya.bind(e)}),Nn=(e,t)=>e!==be&&!e.__isScriptSetup&&ye(e,t),Ma={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:r,props:o,accessCache:l,type:a,appContext:u}=e;if(t[0]!=="$"){const y=l[t];if(y!==void 0)switch(y){case 1:return n[t];case 2:return r[t];case 4:return s[t];case 3:return o[t]}else{if(Nn(n,t))return l[t]=1,n[t];if(r!==be&&ye(r,t))return l[t]=2,r[t];if(ye(o,t))return l[t]=3,o[t];if(s!==be&&ye(s,t))return l[t]=4,s[t];tr&&(l[t]=0)}}const g=Cs[t];let d,f;if(g)return t==="$attrs"&&je(e.attrs,"get",""),g(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(s!==be&&ye(s,t))return l[t]=4,s[t];if(f=u.config.globalProperties,ye(f,t))return f[t]},set({_:e},t,s){const{data:n,setupState:r,ctx:o}=e;return Nn(r,t)?(r[t]=s,!0):n!==be&&ye(n,t)?(n[t]=s,!0):ye(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:r,props:o,type:l}},a){let u;return!!(s[a]||e!==be&&a[0]!=="$"&&ye(e,a)||Nn(t,a)||ye(o,a)||ye(n,a)||ye(Cs,a)||ye(r.config.globalProperties,a)||(u=l.__cssModules)&&u[a])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:ye(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function sn(e){return Y(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}function nn(e,t){return!e||!t?e||t:Y(e)&&Y(t)?e.concat(t):De({},sn(e),sn(t))}let tr=!0;function ja(e){const t=jl(e),s=e.proxy,n=e.ctx;tr=!1,t.beforeCreate&&Xr(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:l,watch:a,provide:u,inject:g,created:d,beforeMount:f,mounted:y,beforeUpdate:x,updated:w,activated:C,deactivated:P,beforeDestroy:T,beforeUnmount:I,destroyed:H,unmounted:R,render:k,renderTracked:v,renderTriggered:_,errorCaptured:M,serverPrefetch:S,expose:L,inheritAttrs:q,components:K,directives:le,filters:ce}=t;if(g&&Oa(g,n,null),l)for(const ae in l){const oe=l[ae];ie(oe)&&(n[ae]=oe.bind(s))}if(r){const ae=r.call(s,s);we(ae)&&(e.data=kn(ae))}if(tr=!0,o)for(const ae in o){const oe=o[ae],se=ie(oe)?oe.bind(s,s):ie(oe.get)?oe.get.bind(s,s):ht,E=!ie(oe)&&ie(oe.set)?oe.set.bind(s):ht,z=Ie({get:se,set:E});Object.defineProperty(n,ae,{enumerable:!0,configurable:!0,get:()=>z.value,set:A=>z.value=A})}if(a)for(const ae in a)Ml(a[ae],n,s,ae);if(u){const ae=ie(u)?u.call(s):u;Reflect.ownKeys(ae).forEach(oe=>{ha(oe,ae[oe])})}d&&Xr(d,e,"c");function ve(ae,oe){Y(oe)?oe.forEach(se=>ae(se.bind(s))):oe&&ae(oe.bind(s))}if(ve(Ta,f),ve(Dt,y),ve(Pa,x),ve(Ra,w),ve(_a,C),ve(Ca,P),ve(Ea,M),ve(La,v),ve(Da,_),ve(Fl,I),ve(Lt,R),ve(Aa,S),Y(L))if(L.length){const ae=e.exposed||(e.exposed={});L.forEach(oe=>{Object.defineProperty(ae,oe,{get:()=>s[oe],set:se=>s[oe]=se,enumerable:!0})})}else e.exposed||(e.exposed={});k&&e.render===ht&&(e.render=k),q!=null&&(e.inheritAttrs=q),K&&(e.components=K),le&&(e.directives=le),S&&Ll(e)}function Oa(e,t,s=ht){Y(e)&&(e=sr(e));for(const n in e){const r=e[n];let o;we(r)?"default"in r?o=Gs(r.from||n,r.default,!0):o=Gs(r.from||n):o=Gs(r),Le(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:l=>o.value=l}):t[n]=o}}function Xr(e,t,s){lt(Y(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Ml(e,t,s,n){let r=n.includes(".")?Sl(s,n):()=>s[n];if(Pe(e)){const o=t[e];ie(o)&&rt(r,o)}else if(ie(e))rt(r,e.bind(s));else if(we(e))if(Y(e))e.forEach(o=>Ml(o,t,s,n));else{const o=ie(e.handler)?e.handler.bind(s):t[e.handler];ie(o)&&rt(r,o,e)}}function jl(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:l}}=e.appContext,a=o.get(t);let u;return a?u=a:!r.length&&!s&&!n?u=t:(u={},r.length&&r.forEach(g=>rn(u,g,l,!0)),rn(u,t,l)),we(t)&&o.set(t,u),u}function rn(e,t,s,n=!1){const{mixins:r,extends:o}=t;o&&rn(e,o,s,!0),r&&r.forEach(l=>rn(e,l,s,!0));for(const l in t)if(!(n&&l==="expose")){const a=Na[l]||s&&s[l];e[l]=a?a(e[l],t[l]):t[l]}return e}const Na={data:eo,props:to,emits:to,methods:vs,computed:vs,beforeCreate:Oe,created:Oe,beforeMount:Oe,mounted:Oe,beforeUpdate:Oe,updated:Oe,beforeDestroy:Oe,beforeUnmount:Oe,destroyed:Oe,unmounted:Oe,activated:Oe,deactivated:Oe,errorCaptured:Oe,serverPrefetch:Oe,components:vs,directives:vs,watch:Ua,provide:eo,inject:Ba};function eo(e,t){return t?e?function(){return De(ie(e)?e.call(this,this):e,ie(t)?t.call(this,this):t)}:t:e}function Ba(e,t){return vs(sr(e),sr(t))}function sr(e){if(Y(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Oe(e,t){return e?[...new Set([].concat(e,t))]:t}function vs(e,t){return e?De(Object.create(null),e,t):t}function to(e,t){return e?Y(e)&&Y(t)?[...new Set([...e,...t])]:De(Object.create(null),sn(e),sn(t??{})):t}function Ua(e,t){if(!e)return t;if(!t)return e;const s=De(Object.create(null),e);for(const n in t)s[n]=Oe(e[n],t[n]);return s}function Ol(){return{app:null,config:{isNativeTag:Jo,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 Va=0;function Ha(e,t){return function(n,r=null){ie(n)||(n=De({},n)),r!=null&&!we(r)&&(r=null);const o=Ol(),l=new WeakSet,a=[];let u=!1;const g=o.app={_uid:Va++,_component:n,_props:r,_container:null,_context:o,_instance:null,version:wu,get config(){return o.config},set config(d){},use(d,...f){return l.has(d)||(d&&ie(d.install)?(l.add(d),d.install(g,...f)):ie(d)&&(l.add(d),d(g,...f))),g},mixin(d){return o.mixins.includes(d)||o.mixins.push(d),g},component(d,f){return f?(o.components[d]=f,g):o.components[d]},directive(d,f){return f?(o.directives[d]=f,g):o.directives[d]},mount(d,f,y){if(!u){const x=g._ceVNode||Ce(n,r);return x.appContext=o,y===!0?y="svg":y===!1&&(y=void 0),e(x,d,y),u=!0,g._container=d,d.__vue_app__=g,Pn(x.component)}},onUnmount(d){a.push(d)},unmount(){u&&(lt(a,g._instance,16),e(null,g._container),delete g._container.__vue_app__)},provide(d,f){return o.provides[d]=f,g},runWithContext(d){const f=is;is=g;try{return d()}finally{is=f}}};return g}}let is=null;function nr(e,t,s=be){const n=Tr(),r=Ct(t),o=Rt(t),l=Nl(e,r),a=ia((u,g)=>{let d,f=be,y;return va(()=>{const x=e[r];Ge(d,x)&&(d=x,g())}),{get(){return u(),s.get?s.get(d):d},set(x){const w=s.set?s.set(x):x;if(!Ge(w,d)&&!(f!==be&&Ge(x,f)))return;const C=n.vnode.props;C&&(t in C||r in C||o in C)&&(`onUpdate:${t}`in C||`onUpdate:${r}`in C||`onUpdate:${o}`in C)||(d=x,g()),n.emit(`update:${t}`,w),Ge(x,w)&&Ge(x,f)&&!Ge(w,y)&&g(),f=x,y=w}}});return a[Symbol.iterator]=()=>{let u=0;return{next(){return u<2?{value:u++?l||be:a,done:!1}:{done:!0}}}},a}const Nl=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ct(t)}Modifiers`]||e[`${Rt(t)}Modifiers`];function za(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||be;let r=s;const o=t.startsWith("update:"),l=o&&Nl(n,t.slice(7));l&&(l.trim&&(r=s.map(d=>Pe(d)?d.trim():d)),l.number&&(r=s.map(bn)));let a,u=n[a=Ln(t)]||n[a=Ln(Ct(t))];!u&&o&&(u=n[a=Ln(Rt(t))]),u&<(u,e,6,r);const g=n[a+"Once"];if(g){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,lt(g,e,6,r)}}const qa=new WeakMap;function Bl(e,t,s=!1){const n=s?qa:t.emitsCache,r=n.get(e);if(r!==void 0)return r;const o=e.emits;let l={},a=!1;if(!ie(e)){const u=g=>{const d=Bl(g,t,!0);d&&(a=!0,De(l,d))};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!o&&!a?(we(e)&&n.set(e,null),null):(Y(o)?o.forEach(u=>l[u]=null):De(l,o),we(e)&&n.set(e,l),l)}function In(e,t){return!e||!hn(t)?!1:(t=t.slice(2).replace(/Once$/,""),ye(e,t[0].toLowerCase()+t.slice(1))||ye(e,Rt(t))||ye(e,t))}function so(e){const{type:t,vnode:s,proxy:n,withProxy:r,propsOptions:[o],slots:l,attrs:a,emit:u,render:g,renderCache:d,props:f,data:y,setupState:x,ctx:w,inheritAttrs:C}=e,P=en(e);let T,I;try{if(s.shapeFlag&4){const R=r||n,k=R;T=gt(g.call(k,R,d,f,x,y,w)),I=a}else{const R=t;T=gt(R.length>1?R(f,{attrs:a,slots:l,emit:u}):R(f,null)),I=t.props?a:Ka(a)}}catch(R){Is.length=0,$n(R,e,1),T=Ce(Be)}let H=T;if(I&&C!==!1){const R=Object.keys(I),{shapeFlag:k}=H;R.length&&k&7&&(o&&R.some(pr)&&(I=Ga(I,o)),H=Ut(H,I,!1,!0))}return s.dirs&&(H=Ut(H,null,!1,!0),H.dirs=H.dirs?H.dirs.concat(s.dirs):s.dirs),s.transition&&As(H,s.transition),T=H,en(P),T}const Ka=e=>{let t;for(const s in e)(s==="class"||s==="style"||hn(s))&&((t||(t={}))[s]=e[s]);return t},Ga=(e,t)=>{const s={};for(const n in e)(!pr(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Wa(e,t,s){const{props:n,children:r,component:o}=e,{props:l,children:a,patchFlag:u}=t,g=o.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&u>=0){if(u&1024)return!0;if(u&16)return n?no(n,l,g):!!l;if(u&8){const d=t.dynamicProps;for(let f=0;f<d.length;f++){const y=d[f];if(Ul(l,n,y)&&!In(g,y))return!0}}}else return(r||a)&&(!a||!a.$stable)?!0:n===l?!1:n?l?no(n,l,g):!0:!!l;return!1}function no(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let r=0;r<n.length;r++){const o=n[r];if(Ul(t,e,o)&&!In(s,o))return!0}return!1}function Ul(e,t,s){const n=e[s],r=t[s];return s==="style"&&we(n)&&we(r)?!Bt(n,r):n!==r}function Ja({vnode:e,parent:t},s){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=s,t=t.parent;else break}}const Vl={},Hl=()=>Object.create(Vl),zl=e=>Object.getPrototypeOf(e)===Vl;function Za(e,t,s,n=!1){const r={},o=Hl();e.propsDefaults=Object.create(null),ql(e,t,r,o);for(const l in e.propsOptions[0])l in r||(r[l]=void 0);s?e.props=n?r:ta(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Qa(e,t,s,n){const{props:r,attrs:o,vnode:{patchFlag:l}}=e,a=me(r),[u]=e.propsOptions;let g=!1;if((n||l>0)&&!(l&16)){if(l&8){const d=e.vnode.dynamicProps;for(let f=0;f<d.length;f++){let y=d[f];if(In(e.emitsOptions,y))continue;const x=t[y];if(u)if(ye(o,y))x!==o[y]&&(o[y]=x,g=!0);else{const w=Ct(y);r[w]=rr(u,a,w,x,e,!1)}else x!==o[y]&&(o[y]=x,g=!0)}}}else{ql(e,t,r,o)&&(g=!0);let d;for(const f in a)(!t||!ye(t,f)&&((d=Rt(f))===f||!ye(t,d)))&&(u?s&&(s[f]!==void 0||s[d]!==void 0)&&(r[f]=rr(u,a,f,void 0,e,!0)):delete r[f]);if(o!==a)for(const f in o)(!t||!ye(t,f))&&(delete o[f],g=!0)}g&&$t(e.attrs,"set","")}function ql(e,t,s,n){const[r,o]=e.propsOptions;let l=!1,a;if(t)for(let u in t){if(xs(u))continue;const g=t[u];let d;r&&ye(r,d=Ct(u))?!o||!o.includes(d)?s[d]=g:(a||(a={}))[d]=g:In(e.emitsOptions,u)||(!(u in n)||g!==n[u])&&(n[u]=g,l=!0)}if(o){const u=me(s),g=a||be;for(let d=0;d<o.length;d++){const f=o[d];s[f]=rr(r,u,f,g[f],e,!ye(g,f))}}return l}function rr(e,t,s,n,r,o){const l=e[s];if(l!=null){const a=ye(l,"default");if(a&&n===void 0){const u=l.default;if(l.type!==Function&&!l.skipFactory&&ie(u)){const{propsDefaults:g}=r;if(s in g)n=g[s];else{const d=Os(r);n=g[s]=u.call(null,t),d()}}else n=u;r.ce&&r.ce._setProp(s,n)}l[0]&&(o&&!a?n=!1:l[1]&&(n===""||n===Rt(s))&&(n=!0))}return n}const Ya=new WeakMap;function Kl(e,t,s=!1){const n=s?Ya:t.propsCache,r=n.get(e);if(r)return r;const o=e.props,l={},a=[];let u=!1;if(!ie(e)){const d=f=>{u=!0;const[y,x]=Kl(f,t,!0);De(l,y),x&&a.push(...x)};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!o&&!u)return we(e)&&n.set(e,rs),rs;if(Y(o))for(let d=0;d<o.length;d++){const f=Ct(o[d]);ro(f)&&(l[f]=be)}else if(o)for(const d in o){const f=Ct(d);if(ro(f)){const y=o[d],x=l[f]=Y(y)||ie(y)?{type:y}:De({},y),w=x.type;let C=!1,P=!0;if(Y(w))for(let T=0;T<w.length;++T){const I=w[T],H=ie(I)&&I.name;if(H==="Boolean"){C=!0;break}else H==="String"&&(P=!1)}else C=ie(w)&&w.name==="Boolean";x[0]=C,x[1]=P,(C||ye(x,"default"))&&a.push(f)}}const g=[l,a];return we(e)&&n.set(e,g),g}function ro(e){return e[0]!=="$"&&!xs(e)}const Sr=e=>e==="_"||e==="_ctx"||e==="$stable",_r=e=>Y(e)?e.map(gt):[gt(e)],Xa=(e,t,s)=>{if(t._n)return t;const n=Sn((...r)=>_r(t(...r)),s);return n._c=!1,n},Gl=(e,t,s)=>{const n=e._ctx;for(const r in e){if(Sr(r))continue;const o=e[r];if(ie(o))t[r]=Xa(r,o,n);else if(o!=null){const l=_r(o);t[r]=()=>l}}},Wl=(e,t)=>{const s=_r(t);e.slots.default=()=>s},Jl=(e,t,s)=>{for(const n in t)(s||!Sr(n))&&(e[n]=t[n])},eu=(e,t,s)=>{const n=e.slots=Hl();if(e.vnode.shapeFlag&32){const r=t._;r?(Jl(n,t,s),s&&el(n,"_",r,!0)):Gl(t,n)}else t&&Wl(e,t)},tu=(e,t,s)=>{const{vnode:n,slots:r}=e;let o=!0,l=be;if(n.shapeFlag&32){const a=t._;a?s&&a===1?o=!1:Jl(r,t,s):(o=!t.$stable,Gl(t,r)),l=t}else t&&(Wl(e,t),l={default:1});if(o)for(const a in r)!Sr(a)&&l[a]==null&&delete r[a]},Me=lu;function su(e){return nu(e)}function nu(e,t){const s=vn();s.__VUE__=!0;const{insert:n,remove:r,patchProp:o,createElement:l,createText:a,createComment:u,setText:g,setElementText:d,parentNode:f,nextSibling:y,setScopeId:x=ht,insertStaticContent:w}=e,C=(b,$,D,V=null,N=null,B=null,J=void 0,W=null,G=!!$.dynamicChildren)=>{if(b===$)return;b&&!Zt(b,$)&&(V=vt(b),A(b,N,B,!0),b=null),$.patchFlag===-2&&(G=!1,$.dynamicChildren=null);const{type:U,ref:ee,shapeFlag:Z}=$;switch(U){case Tn:P(b,$,D,V);break;case Be:T(b,$,D,V);break;case Js:b==null&&I($,D,V,J);break;case ne:K(b,$,D,V,N,B,J,W,G);break;default:Z&1?k(b,$,D,V,N,B,J,W,G):Z&6?le(b,$,D,V,N,B,J,W,G):(Z&64||Z&128)&&U.process(b,$,D,V,N,B,J,W,G,j)}ee!=null&&N?Ss(ee,b&&b.ref,B,$||b,!$):ee==null&&b&&b.ref!=null&&Ss(b.ref,null,B,b,!0)},P=(b,$,D,V)=>{if(b==null)n($.el=a($.children),D,V);else{const N=$.el=b.el;$.children!==b.children&&g(N,$.children)}},T=(b,$,D,V)=>{b==null?n($.el=u($.children||""),D,V):$.el=b.el},I=(b,$,D,V)=>{[b.el,b.anchor]=w(b.children,$,D,V,b.el,b.anchor)},H=({el:b,anchor:$},D,V)=>{let N;for(;b&&b!==$;)N=y(b),n(b,D,V),b=N;n($,D,V)},R=({el:b,anchor:$})=>{let D;for(;b&&b!==$;)D=y(b),r(b),b=D;r($)},k=(b,$,D,V,N,B,J,W,G)=>{if($.type==="svg"?J="svg":$.type==="math"&&(J="mathml"),b==null)v($,D,V,N,B,J,W,G);else{const U=b.el&&b.el._isVueCE?b.el:null;try{U&&U._beginPatch(),S(b,$,N,B,J,W,G)}finally{U&&U._endPatch()}}},v=(b,$,D,V,N,B,J,W)=>{let G,U;const{props:ee,shapeFlag:Z,transition:X,dirs:re}=b;if(G=b.el=l(b.type,B,ee&&ee.is,ee),Z&8?d(G,b.children):Z&16&&M(b.children,G,null,V,N,Bn(b,B),J,W),re&&qt(b,null,V,"created"),_(G,b,b.scopeId,J,V),ee){for(const Se in ee)Se!=="value"&&!xs(Se)&&o(G,Se,null,ee[Se],B,V);"value"in ee&&o(G,"value",null,ee.value,B),(U=ee.onVnodeBeforeMount)&&ct(U,V,b)}re&&qt(b,null,V,"beforeMount");const pe=ru(N,X);pe&&X.beforeEnter(G),n(G,$,D),((U=ee&&ee.onVnodeMounted)||pe||re)&&Me(()=>{U&&ct(U,V,b),pe&&X.enter(G),re&&qt(b,null,V,"mounted")},N)},_=(b,$,D,V,N)=>{if(D&&x(b,D),V)for(let B=0;B<V.length;B++)x(b,V[B]);if(N){let B=N.subTree;if($===B||Yl(B.type)&&(B.ssContent===$||B.ssFallback===$)){const J=N.vnode;_(b,J,J.scopeId,J.slotScopeIds,N.parent)}}},M=(b,$,D,V,N,B,J,W,G=0)=>{for(let U=G;U<b.length;U++){const ee=b[U]=W?kt(b[U]):gt(b[U]);C(null,ee,$,D,V,N,B,J,W)}},S=(b,$,D,V,N,B,J)=>{const W=$.el=b.el;let{patchFlag:G,dynamicChildren:U,dirs:ee}=$;G|=b.patchFlag&16;const Z=b.props||be,X=$.props||be;let re;if(D&&Kt(D,!1),(re=X.onVnodeBeforeUpdate)&&ct(re,D,$,b),ee&&qt($,b,D,"beforeUpdate"),D&&Kt(D,!0),(Z.innerHTML&&X.innerHTML==null||Z.textContent&&X.textContent==null)&&d(W,""),U?L(b.dynamicChildren,U,W,D,V,Bn($,N),B):J||oe(b,$,W,null,D,V,Bn($,N),B,!1),G>0){if(G&16)q(W,Z,X,D,N);else if(G&2&&Z.class!==X.class&&o(W,"class",null,X.class,N),G&4&&o(W,"style",Z.style,X.style,N),G&8){const pe=$.dynamicProps;for(let Se=0;Se<pe.length;Se++){const ke=pe[Se],ze=Z[ke],qe=X[ke];(qe!==ze||ke==="value")&&o(W,ke,ze,qe,N,D)}}G&1&&b.children!==$.children&&d(W,$.children)}else!J&&U==null&&q(W,Z,X,D,N);((re=X.onVnodeUpdated)||ee)&&Me(()=>{re&&ct(re,D,$,b),ee&&qt($,b,D,"updated")},V)},L=(b,$,D,V,N,B,J)=>{for(let W=0;W<$.length;W++){const G=b[W],U=$[W],ee=G.el&&(G.type===ne||!Zt(G,U)||G.shapeFlag&198)?f(G.el):D;C(G,U,ee,null,V,N,B,J,!0)}},q=(b,$,D,V,N)=>{if($!==D){if($!==be)for(const B in $)!xs(B)&&!(B in D)&&o(b,B,$[B],null,N,V);for(const B in D){if(xs(B))continue;const J=D[B],W=$[B];J!==W&&B!=="value"&&o(b,B,W,J,N,V)}"value"in D&&o(b,"value",$.value,D.value,N)}},K=(b,$,D,V,N,B,J,W,G)=>{const U=$.el=b?b.el:a(""),ee=$.anchor=b?b.anchor:a("");let{patchFlag:Z,dynamicChildren:X,slotScopeIds:re}=$;re&&(W=W?W.concat(re):re),b==null?(n(U,D,V),n(ee,D,V),M($.children||[],D,ee,N,B,J,W,G)):Z>0&&Z&64&&X&&b.dynamicChildren&&b.dynamicChildren.length===X.length?(L(b.dynamicChildren,X,D,N,B,J,W),($.key!=null||N&&$===N.subTree)&&Cr(b,$,!0)):oe(b,$,D,ee,N,B,J,W,G)},le=(b,$,D,V,N,B,J,W,G)=>{$.slotScopeIds=W,b==null?$.shapeFlag&512?N.ctx.activate($,D,V,J,G):ce($,D,V,N,B,J,G):Te(b,$,G)},ce=(b,$,D,V,N,B,J)=>{const W=b.component=gu(b,V,N);if(_n(b)&&(W.ctx.renderer=j),hu(W,!1,J),W.asyncDep){if(N&&N.registerDep(W,ve,J),!b.el){const G=W.subTree=Ce(Be);T(null,G,$,D),b.placeholder=G.el}}else ve(W,b,$,D,N,B,J)},Te=(b,$,D)=>{const V=$.component=b.component;if(Wa(b,$,D))if(V.asyncDep&&!V.asyncResolved){ae(V,$,D);return}else V.next=$,V.update();else $.el=b.el,V.vnode=$},ve=(b,$,D,V,N,B,J)=>{const W=()=>{if(b.isMounted){let{next:Z,bu:X,u:re,parent:pe,vnode:Se}=b;{const at=Zl(b);if(at){Z&&(Z.el=Se.el,ae(b,Z,J)),at.asyncDep.then(()=>{Me(()=>{b.isUnmounted||U()},N)});return}}let ke=Z,ze;Kt(b,!1),Z?(Z.el=Se.el,ae(b,Z,J)):Z=Se,X&&Ks(X),(ze=Z.props&&Z.props.onVnodeBeforeUpdate)&&ct(ze,pe,Z,Se),Kt(b,!0);const qe=so(b),it=b.subTree;b.subTree=qe,C(it,qe,f(it.el),vt(it),b,N,B),Z.el=qe.el,ke===null&&Ja(b,qe.el),re&&Me(re,N),(ze=Z.props&&Z.props.onVnodeUpdated)&&Me(()=>ct(ze,pe,Z,Se),N)}else{let Z;const{el:X,props:re}=$,{bm:pe,m:Se,parent:ke,root:ze,type:qe}=b,it=_s($);Kt(b,!1),pe&&Ks(pe),!it&&(Z=re&&re.onVnodeBeforeMount)&&ct(Z,ke,$),Kt(b,!0);{ze.ce&&ze.ce._hasShadowRoot()&&ze.ce._injectChildStyle(qe);const at=b.subTree=so(b);C(null,at,D,V,b,N,B),$.el=at.el}if(Se&&Me(Se,N),!it&&(Z=re&&re.onVnodeMounted)){const at=$;Me(()=>ct(Z,ke,at),N)}($.shapeFlag&256||ke&&_s(ke.vnode)&&ke.vnode.shapeFlag&256)&&b.a&&Me(b.a,N),b.isMounted=!0,$=D=V=null}};b.scope.on();const G=b.effect=new rl(W);b.scope.off();const U=b.update=G.run.bind(G),ee=b.job=G.runIfDirty.bind(G);ee.i=b,ee.id=b.uid,G.scheduler=()=>kr(ee),Kt(b,!0),U()},ae=(b,$,D)=>{$.component=b;const V=b.vnode.props;b.vnode=$,b.next=null,Qa(b,$.props,V,D),tu(b,$.children,D),It(),Kr(b),Tt()},oe=(b,$,D,V,N,B,J,W,G=!1)=>{const U=b&&b.children,ee=b?b.shapeFlag:0,Z=$.children,{patchFlag:X,shapeFlag:re}=$;if(X>0){if(X&128){E(U,Z,D,V,N,B,J,W,G);return}else if(X&256){se(U,Z,D,V,N,B,J,W,G);return}}re&8?(ee&16&&bt(U,N,B),Z!==U&&d(D,Z)):ee&16?re&16?E(U,Z,D,V,N,B,J,W,G):bt(U,N,B,!0):(ee&8&&d(D,""),re&16&&M(Z,D,V,N,B,J,W,G))},se=(b,$,D,V,N,B,J,W,G)=>{b=b||rs,$=$||rs;const U=b.length,ee=$.length,Z=Math.min(U,ee);let X;for(X=0;X<Z;X++){const re=$[X]=G?kt($[X]):gt($[X]);C(b[X],re,D,null,N,B,J,W,G)}U>ee?bt(b,N,B,!0,!1,Z):M($,D,V,N,B,J,W,G,Z)},E=(b,$,D,V,N,B,J,W,G)=>{let U=0;const ee=$.length;let Z=b.length-1,X=ee-1;for(;U<=Z&&U<=X;){const re=b[U],pe=$[U]=G?kt($[U]):gt($[U]);if(Zt(re,pe))C(re,pe,D,null,N,B,J,W,G);else break;U++}for(;U<=Z&&U<=X;){const re=b[Z],pe=$[X]=G?kt($[X]):gt($[X]);if(Zt(re,pe))C(re,pe,D,null,N,B,J,W,G);else break;Z--,X--}if(U>Z){if(U<=X){const re=X+1,pe=re<ee?$[re].el:V;for(;U<=X;)C(null,$[U]=G?kt($[U]):gt($[U]),D,pe,N,B,J,W,G),U++}}else if(U>X)for(;U<=Z;)A(b[U],N,B,!0),U++;else{const re=U,pe=U,Se=new Map;for(U=pe;U<=X;U++){const We=$[U]=G?kt($[U]):gt($[U]);We.key!=null&&Se.set(We.key,U)}let ke,ze=0;const qe=X-pe+1;let it=!1,at=0;const ds=new Array(qe);for(U=0;U<qe;U++)ds[U]=0;for(U=re;U<=Z;U++){const We=b[U];if(ze>=qe){A(We,N,B,!0);continue}let ut;if(We.key!=null)ut=Se.get(We.key);else for(ke=pe;ke<=X;ke++)if(ds[ke-pe]===0&&Zt(We,$[ke])){ut=ke;break}ut===void 0?A(We,N,B,!0):(ds[ut-pe]=U+1,ut>=at?at=ut:it=!0,C(We,$[ut],D,null,N,B,J,W,G),ze++)}const Nr=it?ou(ds):rs;for(ke=Nr.length-1,U=qe-1;U>=0;U--){const We=pe+U,ut=$[We],Br=$[We+1],Ur=We+1<ee?Br.el||Ql(Br):V;ds[U]===0?C(null,ut,D,Ur,N,B,J,W,G):it&&(ke<0||U!==Nr[ke]?z(ut,D,Ur,2):ke--)}}},z=(b,$,D,V,N=null)=>{const{el:B,type:J,transition:W,children:G,shapeFlag:U}=b;if(U&6){z(b.component.subTree,$,D,V);return}if(U&128){b.suspense.move($,D,V);return}if(U&64){J.move(b,$,D,j);return}if(J===ne){n(B,$,D);for(let Z=0;Z<G.length;Z++)z(G[Z],$,D,V);n(b.anchor,$,D);return}if(J===Js){H(b,$,D);return}if(V!==2&&U&1&&W)if(V===0)W.beforeEnter(B),n(B,$,D),Me(()=>W.enter(B),N);else{const{leave:Z,delayLeave:X,afterLeave:re}=W,pe=()=>{b.ctx.isUnmounted?r(B):n(B,$,D)},Se=()=>{B._isLeaving&&B[ft](!0),Z(B,()=>{pe(),re&&re()})};X?X(B,pe,Se):Se()}else n(B,$,D)},A=(b,$,D,V=!1,N=!1)=>{const{type:B,props:J,ref:W,children:G,dynamicChildren:U,shapeFlag:ee,patchFlag:Z,dirs:X,cacheIndex:re}=b;if(Z===-2&&(N=!1),W!=null&&(It(),Ss(W,null,D,b,!0),Tt()),re!=null&&($.renderCache[re]=void 0),ee&256){$.ctx.deactivate(b);return}const pe=ee&1&&X,Se=!_s(b);let ke;if(Se&&(ke=J&&J.onVnodeBeforeUnmount)&&ct(ke,$,b),ee&6)Et(b.component,D,V);else{if(ee&128){b.suspense.unmount(D,V);return}pe&&qt(b,null,$,"beforeUnmount"),ee&64?b.type.remove(b,$,D,j,V):U&&!U.hasOnce&&(B!==ne||Z>0&&Z&64)?bt(U,$,D,!1,!0):(B===ne&&Z&384||!N&&ee&16)&&bt(G,$,D),V&&Fe(b)}(Se&&(ke=J&&J.onVnodeUnmounted)||pe)&&Me(()=>{ke&&ct(ke,$,b),pe&&qt(b,null,$,"unmounted")},D)},Fe=b=>{const{type:$,el:D,anchor:V,transition:N}=b;if($===ne){zt(D,V);return}if($===Js){R(b);return}const B=()=>{r(D),N&&!N.persisted&&N.afterLeave&&N.afterLeave()};if(b.shapeFlag&1&&N&&!N.persisted){const{leave:J,delayLeave:W}=N,G=()=>J(D,B);W?W(b.el,B,G):G()}else B()},zt=(b,$)=>{let D;for(;b!==$;)D=y(b),r(b),b=D;r($)},Et=(b,$,D)=>{const{bum:V,scope:N,job:B,subTree:J,um:W,m:G,a:U}=b;oo(G),oo(U),V&&Ks(V),N.stop(),B&&(B.flags|=8,A(J,b,$,D)),W&&Me(W,$),Me(()=>{b.isUnmounted=!0},$)},bt=(b,$,D,V=!1,N=!1,B=0)=>{for(let J=B;J<b.length;J++)A(b[J],$,D,V,N)},vt=b=>{if(b.shapeFlag&6)return vt(b.component.subTree);if(b.shapeFlag&128)return b.suspense.next();const $=y(b.anchor||b.el),D=$&&$[_l];return D?y(D):$};let Ft=!1;const $e=(b,$,D)=>{let V;b==null?$._vnode&&(A($._vnode,null,null,!0),V=$._vnode.component):C($._vnode||null,b,$,null,null,null,D),$._vnode=b,Ft||(Ft=!0,Kr(V),wl(),Ft=!1)},j={p:C,um:A,m:z,r:Fe,mt:ce,mc:M,pc:oe,pbc:L,n:vt,o:e};return{render:$e,hydrate:void 0,createApp:Ha($e)}}function Bn({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function Kt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ru(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Cr(e,t,s=!1){const n=e.children,r=t.children;if(Y(n)&&Y(r))for(let o=0;o<n.length;o++){const l=n[o];let a=r[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=r[o]=kt(r[o]),a.el=l.el),!s&&a.patchFlag!==-2&&Cr(l,a)),a.type===Tn&&(a.patchFlag===-1&&(a=r[o]=kt(a)),a.el=l.el),a.type===Be&&!a.el&&(a.el=l.el)}}function ou(e){const t=e.slice(),s=[0];let n,r,o,l,a;const u=e.length;for(n=0;n<u;n++){const g=e[n];if(g!==0){if(r=s[s.length-1],e[r]<g){t[n]=r,s.push(n);continue}for(o=0,l=s.length-1;o<l;)a=o+l>>1,e[s[a]]<g?o=a+1:l=a;g<e[s[o]]&&(o>0&&(t[n]=s[o-1]),s[o]=n)}}for(o=s.length,l=s[o-1];o-- >0;)s[o]=l,l=t[l];return s}function Zl(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Zl(t)}function oo(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Ql(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Ql(t.subTree):null}const Yl=e=>e.__isSuspense;function lu(e,t){t&&t.pendingBranch?Y(e)?t.effects.push(...e):t.effects.push(e):ga(e)}const ne=Symbol.for("v-fgt"),Tn=Symbol.for("v-txt"),Be=Symbol.for("v-cmt"),Js=Symbol.for("v-stc"),Is=[];let Je=null;function h(e=!1){Is.push(Je=e?null:[])}function iu(){Is.pop(),Je=Is[Is.length-1]||null}let Ds=1;function on(e,t=!1){Ds+=e,e<0&&Je&&t&&(Je.hasOnce=!0)}function Xl(e){return e.dynamicChildren=Ds>0?Je||rs:null,iu(),Ds>0&&Je&&Je.push(e),e}function m(e,t,s,n,r,o){return Xl(i(e,t,s,n,r,o,!0))}function Qe(e,t,s,n,r){return Xl(Ce(e,t,s,n,r,!0))}function ln(e){return e?e.__v_isVNode===!0:!1}function Zt(e,t){return e.type===t.type&&e.key===t.key}const ei=({key:e})=>e??null,Zs=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Pe(e)||Le(e)||ie(e)?{i:Ye,r:e,k:t,f:!!s}:e:null);function i(e,t=null,s=null,n=0,r=null,o=e===ne?0:1,l=!1,a=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ei(t),ref:t&&Zs(t),scopeId:$l,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Ye};return a?(Ir(u,s),o&128&&e.normalize(u)):s&&(u.shapeFlag|=Pe(s)?8:16),Ds>0&&!l&&Je&&(u.patchFlag>0||o&6)&&u.patchFlag!==32&&Je.push(u),u}const Ce=au;function au(e,t=null,s=null,n=0,r=null,o=!1){if((!e||e===Fa)&&(e=Be),ln(e)){const a=Ut(e,t,!0);return s&&Ir(a,s),Ds>0&&!o&&Je&&(a.shapeFlag&6?Je[Je.indexOf(e)]=a:Je.push(a)),a.patchFlag=-2,a}if(yu(e)&&(e=e.__vccOpts),t){t=uu(t);let{class:a,style:u}=t;a&&!Pe(a)&&(t.class=te(a)),we(u)&&(wr(u)&&!Y(u)&&(u=De({},u)),t.style=yn(u))}const l=Pe(e)?1:Yl(e)?128:Cl(e)?64:we(e)?4:ie(e)?2:0;return i(e,t,s,n,r,l,o,!0)}function uu(e){return e?wr(e)||zl(e)?De({},e):e:null}function Ut(e,t,s=!1,n=!1){const{props:r,ref:o,patchFlag:l,children:a,transition:u}=e,g=t?du(r||{},t):r,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&ei(g),ref:t&&t.ref?s&&o?Y(o)?o.concat(Zs(t)):[o,Zs(t)]:Zs(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!==ne?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ut(e.ssContent),ssFallback:e.ssFallback&&Ut(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&n&&As(d,u.clone(d)),d}function de(e=" ",t=0){return Ce(Tn,null,e,t)}function cu(e,t){const s=Ce(Js,null,e);return s.staticCount=t,s}function O(e="",t=!1){return t?(h(),Qe(Be,null,e)):Ce(Be,null,e)}function gt(e){return e==null||typeof e=="boolean"?Ce(Be):Y(e)?Ce(ne,null,e.slice()):ln(e)?kt(e):Ce(Tn,null,String(e))}function kt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ut(e)}function Ir(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(Y(t))s=16;else if(typeof t=="object")if(n&65){const r=t.default;r&&(r._c&&(r._d=!1),Ir(e,r()),r._c&&(r._d=!0));return}else{s=32;const r=t._;!r&&!zl(t)?t._ctx=Ye:r===3&&Ye&&(Ye.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ie(t)?(t={default:t,_ctx:Ye},s=32):(t=String(t),n&64?(s=16,t=[de(t)]):s=8);e.children=t,e.shapeFlag|=s}function du(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const r in n)if(r==="class")t.class!==n.class&&(t.class=te([t.class,n.class]));else if(r==="style")t.style=yn([t.style,n.style]);else if(hn(r)){const o=t[r],l=n[r];l&&o!==l&&!(Y(o)&&o.includes(l))&&(t[r]=o?[].concat(o,l):l)}else r!==""&&(t[r]=n[r])}return t}function ct(e,t,s,n=null){lt(e,t,7,[s,n])}const pu=Ol();let fu=0;function gu(e,t,s){const n=e.type,r=(t?t.appContext:e.appContext)||pu,o={uid:fu++,vnode:e,type:n,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Fi(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Kl(n,r),emitsOptions:Bl(n,r),emit:null,emitted:null,propsDefaults:be,inheritAttrs:n.inheritAttrs,ctx:be,data:be,props:be,attrs:be,slots:be,refs:be,setupState:be,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=za.bind(null,o),e.ce&&e.ce(o),o}let Ue=null;const Tr=()=>Ue||Ye;let an,or;{const e=vn(),t=(s,n)=>{let r;return(r=e[s])||(r=e[s]=[]),r.push(n),o=>{r.length>1?r.forEach(l=>l(o)):r[0](o)}};an=t("__VUE_INSTANCE_SETTERS__",s=>Ue=s),or=t("__VUE_SSR_SETTERS__",s=>Ls=s)}const Os=e=>{const t=Ue;return an(e),e.scope.on(),()=>{e.scope.off(),an(t)}},lo=()=>{Ue&&Ue.scope.off(),an(null)};function ti(e){return e.vnode.shapeFlag&4}let Ls=!1;function hu(e,t=!1,s=!1){t&&or(t);const{props:n,children:r}=e.vnode,o=ti(e);Za(e,n,o,t),eu(e,r,s||t);const l=o?mu(e,t):void 0;return t&&or(!1),l}function mu(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ma);const{setup:n}=s;if(n){It();const r=e.setupContext=n.length>1?vu(e):null,o=Os(e),l=Ms(n,e,0,[e.props,r]),a=Zo(l);if(Tt(),o(),(a||e.sp)&&!_s(e)&&Ll(e),a){if(l.then(lo,lo),t)return l.then(u=>{io(e,u)}).catch(u=>{$n(u,e,0)});e.asyncDep=l}else io(e,l)}else si(e)}function io(e,t,s){ie(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:we(t)&&(e.setupState=vl(t)),si(e)}function si(e,t,s){const n=e.type;e.render||(e.render=n.render||ht);{const r=Os(e);It();try{ja(e)}finally{Tt(),r()}}}const bu={get(e,t){return je(e,"get",""),e[t]}};function vu(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,bu),slots:e.slots,emit:e.emit,expose:t}}function Pn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(vl(sa(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Cs)return Cs[s](e)},has(t,s){return s in t||s in Cs}})):e.proxy}function yu(e){return ie(e)&&"__vccOpts"in e}const Ie=(e,t)=>ua(e,t,Ls);function xu(e,t,s){try{on(-1);const n=arguments.length;return n===2?we(t)&&!Y(t)?ln(t)?Ce(e,null,[t]):Ce(e,t):Ce(e,null,t):(n>3?s=Array.prototype.slice.call(arguments,2):n===3&&ln(s)&&(s=[s]),Ce(e,t,s))}finally{on(1)}}const wu="3.5.29";let lr;const ao=typeof window<"u"&&window.trustedTypes;if(ao)try{lr=ao.createPolicy("vue",{createHTML:e=>e})}catch{}const ni=lr?e=>lr.createHTML(e):e=>e,ku="http://www.w3.org/2000/svg",$u="http://www.w3.org/1998/Math/MathML",wt=typeof document<"u"?document:null,uo=wt&&wt.createElement("template"),Su={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const r=t==="svg"?wt.createElementNS(ku,e):t==="mathml"?wt.createElementNS($u,e):s?wt.createElement(e,{is:s}):wt.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>wt.createTextNode(e),createComment:e=>wt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>wt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,o){const l=s?s.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===o||!(r=r.nextSibling)););else{uo.innerHTML=ni(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=uo.content;if(n==="svg"||n==="mathml"){const u=a.firstChild;for(;u.firstChild;)a.appendChild(u.firstChild);a.removeChild(u)}t.insertBefore(a,s)}return[l?l.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Mt="transition",gs="animation",Es=Symbol("_vtc"),ri={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},_u=De({},Tl,ri),Cu=e=>(e.displayName="Transition",e.props=_u,e),Pr=Cu((e,{slots:t})=>xu(Sa,Iu(e),t)),Gt=(e,t=[])=>{Y(e)?e.forEach(s=>s(...t)):e&&e(...t)},co=e=>e?Y(e)?e.some(t=>t.length>1):e.length>1:!1;function Iu(e){const t={};for(const K in e)K in ri||(t[K]=e[K]);if(e.css===!1)return t;const{name:s="v",type:n,duration:r,enterFromClass:o=`${s}-enter-from`,enterActiveClass:l=`${s}-enter-active`,enterToClass:a=`${s}-enter-to`,appearFromClass:u=o,appearActiveClass:g=l,appearToClass:d=a,leaveFromClass:f=`${s}-leave-from`,leaveActiveClass:y=`${s}-leave-active`,leaveToClass:x=`${s}-leave-to`}=e,w=Tu(r),C=w&&w[0],P=w&&w[1],{onBeforeEnter:T,onEnter:I,onEnterCancelled:H,onLeave:R,onLeaveCancelled:k,onBeforeAppear:v=T,onAppear:_=I,onAppearCancelled:M=H}=t,S=(K,le,ce,Te)=>{K._enterCancelled=Te,Wt(K,le?d:a),Wt(K,le?g:l),ce&&ce()},L=(K,le)=>{K._isLeaving=!1,Wt(K,f),Wt(K,x),Wt(K,y),le&&le()},q=K=>(le,ce)=>{const Te=K?_:I,ve=()=>S(le,K,ce);Gt(Te,[le,ve]),po(()=>{Wt(le,K?u:o),xt(le,K?d:a),co(Te)||fo(le,n,C,ve)})};return De(t,{onBeforeEnter(K){Gt(T,[K]),xt(K,o),xt(K,l)},onBeforeAppear(K){Gt(v,[K]),xt(K,u),xt(K,g)},onEnter:q(!1),onAppear:q(!0),onLeave(K,le){K._isLeaving=!0;const ce=()=>L(K,le);xt(K,f),K._enterCancelled?(xt(K,y),mo(K)):(mo(K),xt(K,y)),po(()=>{K._isLeaving&&(Wt(K,f),xt(K,x),co(R)||fo(K,n,P,ce))}),Gt(R,[K,ce])},onEnterCancelled(K){S(K,!1,void 0,!0),Gt(H,[K])},onAppearCancelled(K){S(K,!0,void 0,!0),Gt(M,[K])},onLeaveCancelled(K){L(K),Gt(k,[K])}})}function Tu(e){if(e==null)return null;if(we(e))return[Un(e.enter),Un(e.leave)];{const t=Un(e);return[t,t]}}function Un(e){return Ii(e)}function xt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e[Es]||(e[Es]=new Set)).add(t)}function Wt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const s=e[Es];s&&(s.delete(t),s.size||(e[Es]=void 0))}function po(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Pu=0;function fo(e,t,s,n){const r=e._endId=++Pu,o=()=>{r===e._endId&&n()};if(s!=null)return setTimeout(o,s);const{type:l,timeout:a,propCount:u}=Ru(e,t);if(!l)return n();const g=l+"end";let d=0;const f=()=>{e.removeEventListener(g,y),o()},y=x=>{x.target===e&&++d>=u&&f()};setTimeout(()=>{d<u&&f()},a+1),e.addEventListener(g,y)}function Ru(e,t){const s=window.getComputedStyle(e),n=w=>(s[w]||"").split(", "),r=n(`${Mt}Delay`),o=n(`${Mt}Duration`),l=go(r,o),a=n(`${gs}Delay`),u=n(`${gs}Duration`),g=go(a,u);let d=null,f=0,y=0;t===Mt?l>0&&(d=Mt,f=l,y=o.length):t===gs?g>0&&(d=gs,f=g,y=u.length):(f=Math.max(l,g),d=f>0?l>g?Mt:gs:null,y=d?d===Mt?o.length:u.length:0);const x=d===Mt&&/\b(?:transform|all)(?:,|$)/.test(n(`${Mt}Property`).toString());return{type:d,timeout:f,propCount:y,hasTransform:x}}function go(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((s,n)=>ho(s)+ho(e[n])))}function ho(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function mo(e){return(e?e.ownerDocument:document).body.offsetHeight}function Au(e,t,s){const n=e[Es];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const un=Symbol("_vod"),oi=Symbol("_vsh"),Du={name:"show",beforeMount(e,{value:t},{transition:s}){e[un]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):hs(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:n}){!t!=!s&&(n?t?(n.beforeEnter(e),hs(e,!0),n.enter(e)):n.leave(e,()=>{hs(e,!1)}):hs(e,t))},beforeUnmount(e,{value:t}){hs(e,t)}};function hs(e,t){e.style.display=t?e[un]:"none",e[oi]=!t}const Lu=Symbol(""),Eu=/(?:^|;)\s*display\s*:/;function Fu(e,t,s){const n=e.style,r=Pe(s);let o=!1;if(s&&!r){if(t)if(Pe(t))for(const l of t.split(";")){const a=l.slice(0,l.indexOf(":")).trim();s[a]==null&&Qs(n,a,"")}else for(const l in t)s[l]==null&&Qs(n,l,"");for(const l in s)l==="display"&&(o=!0),Qs(n,l,s[l])}else if(r){if(t!==s){const l=n[Lu];l&&(s+=";"+l),n.cssText=s,o=Eu.test(s)}}else t&&e.removeAttribute("style");un in e&&(e[un]=o?n.display:"",e[oi]&&(n.display="none"))}const bo=/\s*!important$/;function Qs(e,t,s){if(Y(s))s.forEach(n=>Qs(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Mu(e,t);bo.test(s)?e.setProperty(Rt(n),s.replace(bo,""),"important"):e[n]=s}}const vo=["Webkit","Moz","ms"],Vn={};function Mu(e,t){const s=Vn[t];if(s)return s;let n=Ct(t);if(n!=="filter"&&n in e)return Vn[t]=n;n=Xo(n);for(let r=0;r<vo.length;r++){const o=vo[r]+n;if(o in e)return Vn[t]=o}return t}const yo="http://www.w3.org/1999/xlink";function xo(e,t,s,n,r,o=Li(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(yo,t.slice(6,t.length)):e.setAttributeNS(yo,t,s):s==null||o&&!tl(s)?e.removeAttribute(t):e.setAttribute(t,o?"":mt(s)?String(s):s)}function wo(e,t,s,n,r){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?ni(s):s);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const a=o==="OPTION"?e.getAttribute("value")||"":e.value,u=s==null?e.type==="checkbox"?"on":"":String(s);(a!==u||!("_value"in e))&&(e.value=u),s==null&&e.removeAttribute(t),e._value=s;return}let l=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=tl(s):s==null&&a==="string"?(s="",l=!0):a==="number"&&(s=0,l=!0)}try{e[t]=s}catch{}l&&e.removeAttribute(r||t)}function _t(e,t,s,n){e.addEventListener(t,s,n)}function ju(e,t,s,n){e.removeEventListener(t,s,n)}const ko=Symbol("_vei");function Ou(e,t,s,n,r=null){const o=e[ko]||(e[ko]={}),l=o[t];if(n&&l)l.value=n;else{const[a,u]=Nu(t);if(n){const g=o[t]=Vu(n,r);_t(e,a,g,u)}else l&&(ju(e,a,l,u),o[t]=void 0)}}const $o=/(?:Once|Passive|Capture)$/;function Nu(e){let t;if($o.test(e)){t={};let n;for(;n=e.match($o);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Rt(e.slice(2)),t]}let Hn=0;const Bu=Promise.resolve(),Uu=()=>Hn||(Bu.then(()=>Hn=0),Hn=Date.now());function Vu(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;lt(Hu(n,s.value),t,5,[n])};return s.value=e,s.attached=Uu(),s}function Hu(e,t){if(Y(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>r=>!r._stopped&&n&&n(r))}else return t}const So=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,zu=(e,t,s,n,r,o)=>{const l=r==="svg";t==="class"?Au(e,n,l):t==="style"?Fu(e,s,n):hn(t)?pr(t)||Ou(e,t,s,n,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):qu(e,t,n,l))?(wo(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&xo(e,t,n,l,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Pe(n))?wo(e,Ct(t),n,o,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),xo(e,t,n,l))};function qu(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&So(t)&&ie(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return So(t)&&Pe(s)?!1:t in e}const Vt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Y(t)?s=>Ks(t,s):t};function Ku(e){e.target.composing=!0}function _o(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const et=Symbol("_assign");function Co(e,t,s){return t&&(e=e.trim()),s&&(e=bn(e)),e}const he={created(e,{modifiers:{lazy:t,trim:s,number:n}},r){e[et]=Vt(r);const o=n||r.props&&r.props.type==="number";_t(e,t?"change":"input",l=>{l.target.composing||e[et](Co(e.value,s,o))}),(s||o)&&_t(e,"change",()=>{e.value=Co(e.value,s,o)}),t||(_t(e,"compositionstart",Ku),_t(e,"compositionend",_o),_t(e,"change",_o))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:r,number:o}},l){if(e[et]=Vt(l),e.composing)return;const a=(o||e.type==="number")&&!/^0\d/.test(e.value)?bn(e.value):e.value,u=t??"";a!==u&&(document.activeElement===e&&e.type!=="range"&&(n&&t===s||r&&e.value.trim()===u)||(e.value=u))}},cn={deep:!0,created(e,t,s){e[et]=Vt(s),_t(e,"change",()=>{const n=e._modelValue,r=us(e),o=e.checked,l=e[et];if(Y(n)){const a=hr(n,r),u=a!==-1;if(o&&!u)l(n.concat(r));else if(!o&&u){const g=[...n];g.splice(a,1),l(g)}}else if(cs(n)){const a=new Set(n);o?a.add(r):a.delete(r),l(a)}else l(ii(e,o))})},mounted:Io,beforeUpdate(e,t,s){e[et]=Vt(s),Io(e,t,s)}};function Io(e,{value:t,oldValue:s},n){e._modelValue=t;let r;if(Y(t))r=hr(t,n.props.value)>-1;else if(cs(t))r=t.has(n.props.value);else{if(t===s)return;r=Bt(t,ii(e,!0))}e.checked!==r&&(e.checked=r)}const To={created(e,{value:t},s){e.checked=Bt(t,s.props.value),e[et]=Vt(s),_t(e,"change",()=>{e[et](us(e))})},beforeUpdate(e,{value:t,oldValue:s},n){e[et]=Vt(n),t!==s&&(e.checked=Bt(t,n.props.value))}},li={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const r=cs(t);_t(e,"change",()=>{const o=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>s?bn(us(l)):us(l));e[et](e.multiple?r?new Set(o):o:o[0]),e._assigning=!0,js(()=>{e._assigning=!1})}),e[et]=Vt(n)},mounted(e,{value:t}){Po(e,t)},beforeUpdate(e,t,s){e[et]=Vt(s)},updated(e,{value:t}){e._assigning||Po(e,t)}};function Po(e,t){const s=e.multiple,n=Y(t);if(!(s&&!n&&!cs(t))){for(let r=0,o=e.options.length;r<o;r++){const l=e.options[r],a=us(l);if(s)if(n){const u=typeof a;u==="string"||u==="number"?l.selected=t.some(g=>String(g)===String(a)):l.selected=hr(t,a)>-1}else l.selected=t.has(a);else if(Bt(us(l),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function us(e){return"_value"in e?e._value:e.value}function ii(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Gu=["ctrl","shift","alt","meta"],Wu={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)=>Gu.some(s=>e[`${s}Key`]&&!t.includes(s))},Nt=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((r,...o)=>{for(let l=0;l<t.length;l++){const a=Wu[t[l]];if(a&&a(r,t))return}return e(r,...o)}))},Ju={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ai=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(r=>{if(!("key"in r))return;const o=Rt(r.key);if(t.some(l=>l===o||Ju[l]===o))return e(r)}))},Zu=De({patchProp:zu},Su);let Ro;function Qu(){return Ro||(Ro=su(Zu))}const Ao=((...e)=>{const t=Qu().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=Xu(n);if(!r)return;const o=t._component;!ie(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const l=s(r,!1,Yu(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),l},t});function Yu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Xu(e){return Pe(e)?document.querySelector(e):e}async function Re(e,t){const s=await fetch(e,t);if(!s.ok){const n=await s.json().catch(()=>({}));throw new Error(n.error||`HTTP ${s.status}`)}return s.json()}async function He(e,t){return Re(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0})}async function ec(){return Re("/api/issues")}async function ir(e){return Re(`/api/issues/${e}`)}async function tc(e){return Re(`/api/issues/${e}/logs`)}async function sc(){return Re("/api/system/status")}async function nc(e){await He(`/api/issues/${e}/retry`)}async function rc(e){await He(`/api/issues/${e}/cancel`)}async function oc(e){await He(`/api/issues/${e}/restart`)}async function Do(e,t){await He(`/api/issues/${e}/retry-from-phase`,{phase:t})}async function lc(e){await He(`/api/issues/${e}/approve-plan`)}async function ic(e,t){await He(`/api/issues/${e}/reject-plan`,{feedback:t})}async function ac(e){await He(`/api/issues/${e}/skip-review`)}async function uc(e){return Re(`/api/issues/${e}/review-history`)}async function Lo(e,t,s="html"){const n=s==="html"?`/api/issues/${e}/plans/${t}?format=html`:`/api/issues/${e}/plans/${t}`,r=await fetch(n);if(!r.ok){const o=await r.json().catch(()=>({}));throw new Error(o.error||"Failed to load")}return r.text()}async function cc(e,t,s){await Re(`/api/issues/${e}/plans/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:s})})}async function dc(e){return Re(`/api/issues/${e}/supplement`)}async function pc(e,t){return Re(`/api/issues/${e}/supplement`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function fc(e){const t=new URLSearchParams;return e.search&&t.set("search",e.search),t.set("page",String(e.page??1)),t.set("per_page",String(e.perPage)),Re(`/api/gongfeng/issues?${t.toString()}`)}async function gc(e){return He("/api/issues/start",e)}async function hc(e,t){return Re(`/api/issues/${e}/note-sync`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:t})})}async function mc(e){return Re("/api/system/note-sync",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e})})}async function bc(e,t){return Re(`/api/issues/${e}/e2e`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:t})})}async function vc(e){return He("/api/brainstorm/sessions",{transcript:e})}async function yc(e){return Re(`/api/brainstorm/sessions/${e}`)}function zn(e,t,s){const n=new AbortController,r=`/api/brainstorm/sessions/${e}/${t}`;return{fetchResponse:fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:s?JSON.stringify(s):"{}",signal:n.signal}),abort:()=>n.abort()}}async function xc(e,t,s=!0){return He(`/api/brainstorm/sessions/${e}/create-issue`,{title:t,addAutoFinishLabel:s})}async function wc(e){return He("/api/chat/sessions",{title:e})}async function kc(){return Re("/api/chat/sessions")}async function Eo(e){return Re(`/api/chat/sessions/${e}`)}async function $c(e){return Re(`/api/chat/sessions/${e}`,{method:"DELETE"})}function Sc(e,t){const s=new AbortController;return{fetchResponse:fetch(`/api/chat/sessions/${e}/messages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t}),signal:s.signal}),abort:()=>s.abort()}}async function _c(e){const t=new URLSearchParams;e?.q&&t.set("q",e.q),e?.type&&t.set("type",e.type);const s=t.toString();return Re("/api/knowledge/entries"+(s?"?"+s:""))}async function Cc(e){return Re("/api/knowledge/entries/"+e)}async function Ic(e){return He("/api/knowledge/entries",e)}async function Tc(e,t){return Re("/api/knowledge/entries/"+e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function Pc(e){return Re("/api/knowledge/entries/"+e,{method:"DELETE"})}async function Rc(e){return He("/api/knowledge/import/iwiki",{url:e})}async function Ac(e,t){return He("/api/knowledge/import/gongfeng",{type:e,iid:t})}async function Dc(e){return He("/api/knowledge/entries/"+e+"/sync")}async function Lc(){return Re("/api/knowledge/stats")}const Ec={"app.trackedIssues":"已跟踪 Issue","app.browseIssues":"选择新 Issue","app.brainstorm":"脑暴工坊","app.chat":"智能助手","app.knowledge":"知识库","header.connected":"已连接","header.disconnected":"未连接","header.discovery":"发现","header.drive":"驱动","header.uptime":"运行时间","header.syncOnTitle":"Issue 同步已开启(点击关闭)","header.syncOffTitle":"Issue 同步已关闭(点击开启)","header.syncOn":"Issue同步: 开","header.syncOff":"Issue同步: 关","header.langSwitch":"切换语言","stats.total":"总计","stats.active":"处理中","stats.completed":"已完成","stats.failed":"失败","table.filter":"筛选:","table.title":"标题","table.state":"状态","table.progress":"阶段进度","table.retries":"重试","table.updatedAt":"更新时间","table.actions":"操作","table.empty":"暂无 Issue 记录","table.viewInGongfeng":"在工蜂中查看","table.retry":"重试","table.restart":"重来","table.cancel":"取消","filter.all":"全部","filter.active":"处理中","filter.completed":"已完成","filter.failed":"失败","filter.review":"待审核","browse.searchPlaceholder":"搜索 Issue 标题...","browse.loading":"加载中...","browse.search":"搜索","browse.loadingList":"正在从工蜂加载 Issue 列表...","browse.title":"标题","browse.labels":"标签","browse.author":"作者","browse.createdAt":"创建时间","browse.actions":"操作","browse.empty":"暂无 Issue","browse.tracked":"已跟踪","browse.start":"开始处理","browse.pagination":"共 {total} 条,第 {page} / {totalPages} 页","browse.prevPage":"上一页","browse.nextPage":"下一页","start.title":"开始处理 Issue #{iid}","start.issueTitle":"标题","start.descPreview":"描述预览","start.supplement":"补充信息(可选)","start.requirements":"补充需求说明","start.requirementsPlaceholder":"对 Issue 描述的补充或澄清...","start.acceptance":"验收标准","start.acceptancePlaceholder":"完成后需要满足的验收标准...","start.scope":"变更范围","start.scopePlaceholder":"例: 仅后端、仅前端、前后端...","start.constraints":"约束条件","start.constraintsPlaceholder":"技术约束、兼容性要求等...","start.references":"参考链接","start.referencesPlaceholder":"相关文档、设计稿链接等...","start.freeText":"自由补充","start.freeTextPlaceholder":"其他任何需要 AI 知道的信息...","start.tapdId":"TAPD 单号","start.tapdIdPlaceholder":"如 12345678,用于 MR 关联 TAPD(可选)","start.cancel":"取消","start.processing":"处理中...","start.submit":"开始处理","detail.viewInGongfeng":"在工蜂中查看","detail.basicInfo":"基本信息","detail.title":"标题:","detail.branch":"分支:","detail.state":"状态:","detail.createdAt":"创建时间:","detail.retries":"重试次数:","detail.updatedAt":"更新时间:","detail.noteSync":"同步处理结果到 Issue","detail.enabled":"开启","detail.disabled":"关闭","detail.followSystem":"跟随系统","detail.e2eTitle":"E2E UI 自动验收","detail.mrLabel":"合并请求:","detail.errorInfo":"错误信息","detail.retry":"重试处理","detail.restart":"清理重来","detail.cancelTrack":"取消跟踪","pipeline.title":"流水线进度","pipeline.retryFrom":"从此重试","review.title":"Plan Review - 实施计划审核","review.description":"AI 已完成规划阶段,请审核实施计划后决定是否继续。","review.currentRound":"(当前为第 {round} 轮审核)","review.history":"审核历史","review.roundLabel":"{n} 轮","review.roundPrefix":"第 {round} 轮","review.approve":"通过计划","review.skip":"跳过审核","review.feedbackLabel":"审核反馈(拒绝时必填)","review.feedbackPlaceholder":"输入修改意见,AI 将根据反馈重新规划...","review.reject":"拒绝并重新规划","review.submitting":"处理中...","supplement.title":"补充信息","supplement.edit":"编辑","supplement.saving":"保存中...","supplement.save":"保存","supplement.cancel":"取消","supplement.loading":"加载中...","supplement.requirements":"补充需求:","supplement.acceptance":"验收标准:","supplement.scope":"变更范围:","supplement.constraints":"约束条件:","supplement.references":"参考链接:","supplement.freeText":"其他:","supplement.tapdId":"TAPD 单号:","supplement.empty":'暂无补充信息,点击"编辑"添加',"supplement.requirementsLabel":"补充需求说明","supplement.acceptanceLabel":"验收标准","supplement.scopeLabel":"变更范围","supplement.constraintsLabel":"约束条件","supplement.referencesLabel":"参考链接","supplement.freeTextLabel":"自由补充","supplement.tapdIdLabel":"TAPD 单号","supplement.tapdIdPlaceholder":"如 12345678,用于 MR 关联 TAPD(可选)","planDoc.title":"计划文档","planDoc.edit":"编辑","planDoc.saving":"保存中...","planDoc.save":"保存","planDoc.cancel":"取消","planDoc.fullscreen":"全屏查看","planDoc.expand":"展开","planDoc.loading":"加载中...","planDoc.editPlaceholder":"编辑文档内容...","planDoc.selectTab":"点击标签页查看文档","planDoc.closeFullscreen":"关闭全屏 (Esc)","planDoc.noReviewFeedback":"暂无审核反馈(计划未被拒绝过)","planDoc.verifyNotGenerated":"验证报告尚未生成","planDoc.fetchFailed":"获取原始文档失败:","planDoc.saveFailed":"保存失败:","agentLog.title":"Agent 实时输出","agentLog.autoScroll":"自动置顶","agentLog.clear":"清空","agentLog.ended":"任务已结束,无实时输出记录","agentLog.finalState":"最终状态:","agentLog.currentState":"当前状态:","agentLog.waiting":"等待 Agent 输出...","agentLog.count":"{count} 条记录","agentLog.type.assistant":"AI 回复","agentLog.type.tool_use":"工具调用","agentLog.type.tool_result":"工具结果","agentLog.type.result":"最终结果","agentLog.type.stderr":"日志","agentLog.type.raw":"输出","agentLog.type.system":"系统","agentLog.type.partial":"输出中","state.pending":"待处理","state.branch_created":"分支已创建","state.analyzing":"分析中","state.analysis_done":"分析完成","state.designing":"设计中","state.design_done":"设计完成","state.implementing":"实施中","state.implement_done":"实施完成","state.planning":"规划中","state.plan_done":"规划完成","state.waiting_for_review":"待审核","state.review_approved":"审核通过","state.building":"实施中","state.build_done":"实施完成","state.verifying":"验证中","state.completed":"已完成","state.failed":"失败","phase.analysis":"分析","phase.design":"设计","phase.implement":"实施","phase.verify":"验证","phase.plan":"规划","phase.review":"审核","phase.build":"实施","planFile.01-analysis.md":"需求分析","planFile.02-design.md":"系统设计","planFile.03-todolist.md":"实施清单","planFile.04-verify-report.md":"验证报告","planFile.01-plan.md":"实施计划","planFile.02-verify-report.md":"验证报告","planFile.review-feedback.md":"审核反馈","confirm.supplementSaved":"补充信息已保存。是否从分析阶段重新执行?","confirm.retry":"确定要重试 Issue #{iid} 吗?","confirm.cancel":"确定要取消跟踪 Issue #{iid} 吗?","confirm.restart":`确定要清理上下文并重来 Issue #{iid} 吗?
|
|
2
2
|
这将删除 worktree、分支,并将 issue 重置为待处理状态。`,"confirm.retryFromPhase":'确定要从"{phaseLabel}"阶段重试 Issue #{iid} 吗?',"confirm.approve":"确定要通过 Issue #{iid} 的实施计划吗?","confirm.reject.noFeedback":"请输入审核反馈","confirm.skip":"确定要跳过 Issue #{iid} 的审核吗?","alert.saveFailed":"保存失败: ","alert.retryFailed":"重试失败: ","alert.cancelFailed":"取消失败: ","alert.restartFailed":"重来失败: ","alert.retryFromPhaseFailed":"分阶段重试失败: ","alert.approveFailed":"审批失败: ","alert.rejectFailed":"拒绝失败: ","alert.skipFailed":"跳过失败: ","alert.startFailed":"启动失败: ","setup.title":"Issue Auto-Finish 初始化配置","setup.step.envCheck":"环境检查","setup.step.projectConfig":"项目配置","setup.step.gongfengConfig":"工蜂配置","setup.step.aiRunner":"AI Runner","setup.step.advancedOptions":"高级选项","setup.step.reviewConfirm":"确认配置","setup.complete.title":"配置完成","setup.complete.savedTo":"配置文件已保存到:","setup.complete.startHint":"使用以下命令启动服务:","setup.env.checking":"正在检查系统依赖...","setup.env.checkingShort":"检查中...","setup.env.install":"安装","setup.env.installing":"安装中...","setup.env.waitingOutput":"等待输出...","setup.env.refresh":"刷新","setup.env.viewLogs":"查看日志","setup.env.installSuccess":"安装成功","setup.env.installFailed":"安装失败","setup.env.retry":"重试","setup.env.logPanel":"安装日志","setup.env.closePanel":"关闭","setup.project.workDir":"项目工作目录 *","setup.project.workDirPlaceholder":"/path/to/your/project","setup.project.workDirHint":"项目代码所在的目录","setup.project.gitRootDir":"Git 根目录","setup.project.gitRootDirPlaceholder":"留空则使用工作目录","setup.project.gitRootDirHint":"Monorepo 场景: Git 仓库根目录","setup.project.baseBranch":"基础分支","setup.project.branchPrefix":"分支前缀","setup.project.worktreeBaseDir":"Worktree 基础目录","setup.project.projectSubDir":"项目子目录","setup.project.projectSubDirPlaceholder":"Monorepo: 从 Git 根到项目的相对路径","setup.gongfeng.apiUrl":"工蜂 API 地址 *","setup.gongfeng.privateToken":"私有令牌 *","setup.gongfeng.tokenPlaceholder":"输入你的私有令牌","setup.gongfeng.verify":"验证","setup.gongfeng.tokenValid":"Token 验证通过","setup.gongfeng.tokenInvalid":"Token 验证失败","setup.gongfeng.projectPath":"项目路径 *","setup.gongfeng.projectPathPlaceholder":"namespace/project","setup.gongfeng.repoFound":"仓库已找到","setup.gongfeng.repoNotFound":"仓库未找到","setup.ai.modeLabel":"AI Runner 模式","setup.ai.claudeInternal":"Claude Internal","setup.ai.claudeInternalDesc":"使用 claude-internal CLI","setup.ai.cursorAgent":"Cursor Agent","setup.ai.cursorAgentDesc":"使用 cursor agent CLI","setup.ai.codebuddy":"CodeBuddy","setup.ai.codebuddyDesc":"使用 codebuddy CLI","setup.ai.model":"AI 模型","setup.ai.cliStatus":"CLI 状态","setup.advanced.discoveryInterval":"发现间隔 (ms)","setup.advanced.driveInterval":"驱动间隔 (ms)","setup.advanced.maxRetries":"最大重试次数","setup.advanced.maxConcurrent":"最大并行 Issue 数","setup.advanced.webPort":"Web UI 端口","setup.advanced.pipelineMode":"流水线模式","setup.advanced.pipelineAuto":"自动","setup.advanced.pipelineClassic":"经典模式","setup.advanced.pipelinePlanMode":"计划模式","setup.advanced.enableReview":"启用审核关卡","setup.advanced.phaseTimeout":"阶段超时 (ms)","setup.advanced.phaseTimeoutHint":"默认: 1800000 (30分钟)","setup.confirm.reviewHint":"请确认将要生成的配置:","setup.nav.back":"上一步","setup.nav.next":"下一步","setup.nav.saving":"保存中...","setup.nav.complete":"完成配置","brainstorm.startRecording":"开始录音","brainstorm.stopRecording":"停止录音","brainstorm.voiceNotSupported":"当前浏览器不支持语音识别,请使用 Chrome 或 Edge,或直接输入文字","brainstorm.clear":"清空","brainstorm.recording":"录音中...","brainstorm.transcriptLabel":"想法描述","brainstorm.transcriptPlaceholder":"在这里输入或通过语音录入你的想法...乱的、不连贯的都没关系","brainstorm.startGenerate":"开始生成 SDD","brainstorm.step1":"倾倒想法","brainstorm.step2":"AI 精炼","brainstorm.step3":"创建 Issue","brainstorm.roundCount":"已完成 {count} 轮精炼","brainstorm.statusGenerating":"正在生成 SDD...","brainstorm.statusReviewing":"正在审查...","brainstorm.statusRefining":"正在精炼...","brainstorm.statusProcessing":"处理中...","brainstorm.abort":"中止","brainstorm.manualReview":"手动审查","brainstorm.manualRefine":"手动精炼","brainstorm.finishAndCreate":"完成并创建 Issue","brainstorm.sddTitle":"软件设计文档 (SDD)","brainstorm.sddEmpty":"SDD 尚未生成","brainstorm.questionsTitle":"审查问题","brainstorm.questionsEmpty":"尚未进行审查","brainstorm.roundHistory":"查看历史轮次","brainstorm.roundLabel":"第 {n} 轮","brainstorm.issueTitleLabel":"Issue 标题","brainstorm.issueTitlePlaceholder":"输入 Issue 标题(留空则自动从 SDD 提取)","brainstorm.addAutoFinishLabel":"添加 auto-finish 标签(系统将自动处理)","brainstorm.sddPreview":"SDD 预览","brainstorm.backToRefine":"返回精炼","brainstorm.createIssueOnly":"仅创建 Issue","brainstorm.createAndStart":"创建并启动处理","brainstorm.creating":"创建中...","brainstorm.issueCreated":"Issue 创建成功!","brainstorm.startNew":"开始新的脑暴","chat.newChat":"新对话","chat.expandSidebar":"展开侧栏","chat.collapseSidebar":"收起侧栏","chat.deleteSession":"删除会话","chat.messagesCount":"条消息","chat.noSessions":"暂无会话","chat.welcome":"智能助手","chat.welcomeHint":'输入问题开始对话,或点击左侧"新对话"创建会话',"chat.inputPlaceholder":"输入消息... (Enter 发送,Shift+Enter 换行)","chat.send":"发送","chat.stop":"停止","chat.streaming":"输出中...","chat.thinking.connecting":"正在连接 AI...","chat.thinking.connected":"AI 已连接,思考中...","chat.thinking.processing":"AI 正在思考..."},Fc={"app.trackedIssues":"Tracked Issues","app.browseIssues":"Browse Issues","app.brainstorm":"Brainstorm","app.chat":"Chat Assistant","app.knowledge":"Knowledge Base","header.connected":"Connected","header.disconnected":"Disconnected","header.discovery":"Discovery","header.drive":"Drive","header.uptime":"Uptime","header.syncOnTitle":"Issue sync is ON (click to disable)","header.syncOffTitle":"Issue sync is OFF (click to enable)","header.syncOn":"Sync: ON","header.syncOff":"Sync: OFF","header.langSwitch":"Switch Language","stats.total":"Total","stats.active":"Active","stats.completed":"Completed","stats.failed":"Failed","table.filter":"Filter:","table.title":"Title","table.state":"State","table.progress":"Phase Progress","table.retries":"Retries","table.updatedAt":"Updated","table.actions":"Actions","table.empty":"No issues tracked yet","table.viewInGongfeng":"View in Gongfeng","table.retry":"Retry","table.restart":"Restart","table.cancel":"Cancel","filter.all":"All","filter.active":"Active","filter.completed":"Completed","filter.failed":"Failed","filter.review":"In Review","browse.searchPlaceholder":"Search issue title...","browse.loading":"Loading...","browse.search":"Search","browse.loadingList":"Loading issues from Gongfeng...","browse.title":"Title","browse.labels":"Labels","browse.author":"Author","browse.createdAt":"Created","browse.actions":"Actions","browse.empty":"No issues found","browse.tracked":"Tracked","browse.start":"Start Processing","browse.pagination":"{total} total, page {page} / {totalPages}","browse.prevPage":"Previous","browse.nextPage":"Next","start.title":"Start Processing Issue #{iid}","start.issueTitle":"Title","start.descPreview":"Description Preview","start.supplement":"Supplement (Optional)","start.requirements":"Additional Requirements","start.requirementsPlaceholder":"Supplement or clarify the issue description...","start.acceptance":"Acceptance Criteria","start.acceptancePlaceholder":"Criteria to meet upon completion...","start.scope":"Change Scope","start.scopePlaceholder":"e.g. backend only, frontend only, full-stack...","start.constraints":"Constraints","start.constraintsPlaceholder":"Technical constraints, compatibility requirements...","start.references":"References","start.referencesPlaceholder":"Related docs, design mockup links...","start.freeText":"Additional Notes","start.freeTextPlaceholder":"Any other info for the AI...","start.tapdId":"TAPD ID","start.tapdIdPlaceholder":"e.g. 12345678, for MR TAPD association (optional)","start.cancel":"Cancel","start.processing":"Processing...","start.submit":"Start Processing","detail.viewInGongfeng":"View in Gongfeng","detail.basicInfo":"Basic Info","detail.title":"Title:","detail.branch":"Branch:","detail.state":"State:","detail.createdAt":"Created:","detail.retries":"Retries:","detail.updatedAt":"Updated:","detail.noteSync":"Sync results to Issue","detail.enabled":"On","detail.disabled":"Off","detail.followSystem":"Follow System","detail.e2eTitle":"E2E UI Auto-verification","detail.mrLabel":"Merge Request:","detail.errorInfo":"Error Info","detail.retry":"Retry","detail.restart":"Clean & Restart","detail.cancelTrack":"Untrack","pipeline.title":"Pipeline Progress","pipeline.retryFrom":"Retry from here","review.title":"Plan Review","review.description":"AI has completed the planning phase. Please review the implementation plan before proceeding.","review.currentRound":"(Currently round {round})","review.history":"Review History","review.roundLabel":"Round {n}","review.roundPrefix":"Round {round}","review.approve":"Approve Plan","review.skip":"Skip Review","review.feedbackLabel":"Review Feedback (required when rejecting)","review.feedbackPlaceholder":"Enter feedback, AI will re-plan based on it...","review.reject":"Reject & Re-plan","review.submitting":"Submitting...","supplement.title":"Supplement Info","supplement.edit":"Edit","supplement.saving":"Saving...","supplement.save":"Save","supplement.cancel":"Cancel","supplement.loading":"Loading...","supplement.requirements":"Requirements:","supplement.acceptance":"Acceptance:","supplement.scope":"Scope:","supplement.constraints":"Constraints:","supplement.references":"References:","supplement.freeText":"Other:","supplement.tapdId":"TAPD ID:","supplement.empty":'No supplement info. Click "Edit" to add.',"supplement.requirementsLabel":"Additional Requirements","supplement.acceptanceLabel":"Acceptance Criteria","supplement.scopeLabel":"Change Scope","supplement.constraintsLabel":"Constraints","supplement.referencesLabel":"References","supplement.freeTextLabel":"Additional Notes","supplement.tapdIdLabel":"TAPD ID","supplement.tapdIdPlaceholder":"e.g. 12345678, for MR TAPD association (optional)","planDoc.title":"Plan Documents","planDoc.edit":"Edit","planDoc.saving":"Saving...","planDoc.save":"Save","planDoc.cancel":"Cancel","planDoc.fullscreen":"Fullscreen","planDoc.expand":"Expand","planDoc.loading":"Loading...","planDoc.editPlaceholder":"Edit document content...","planDoc.selectTab":"Click a tab to view document","planDoc.closeFullscreen":"Close Fullscreen (Esc)","planDoc.noReviewFeedback":"No review feedback (plan was never rejected)","planDoc.verifyNotGenerated":"Verification report not yet generated","planDoc.fetchFailed":"Failed to fetch document:","planDoc.saveFailed":"Save failed:","agentLog.title":"Agent Live Output","agentLog.autoScroll":"Auto Scroll","agentLog.clear":"Clear","agentLog.ended":"Task ended, no live output","agentLog.finalState":"Final state:","agentLog.currentState":"Current state:","agentLog.waiting":"Waiting for Agent output...","agentLog.count":"{count} entries","agentLog.type.assistant":"AI Reply","agentLog.type.tool_use":"Tool Call","agentLog.type.tool_result":"Tool Result","agentLog.type.result":"Final Result","agentLog.type.stderr":"Log","agentLog.type.raw":"Output","agentLog.type.system":"System","agentLog.type.partial":"Streaming","state.pending":"Pending","state.branch_created":"Branch Created","state.analyzing":"Analyzing","state.analysis_done":"Analysis Done","state.designing":"Designing","state.design_done":"Design Done","state.implementing":"Implementing","state.implement_done":"Implementation Done","state.planning":"Planning","state.plan_done":"Plan Done","state.waiting_for_review":"Awaiting Review","state.review_approved":"Review Approved","state.building":"Building","state.build_done":"Build Done","state.verifying":"Verifying","state.completed":"Completed","state.failed":"Failed","phase.analysis":"Analysis","phase.design":"Design","phase.implement":"Implementation","phase.verify":"Verification","phase.plan":"Planning","phase.review":"Review","phase.build":"Build","planFile.01-analysis.md":"Requirements Analysis","planFile.02-design.md":"System Design","planFile.03-todolist.md":"Implementation Checklist","planFile.04-verify-report.md":"Verification Report","planFile.01-plan.md":"Implementation Plan","planFile.02-verify-report.md":"Verification Report","planFile.review-feedback.md":"Review Feedback","confirm.supplementSaved":"Supplement saved. Retry from analysis phase?","confirm.retry":"Retry Issue #{iid}?","confirm.cancel":"Untrack Issue #{iid}?","confirm.restart":`Clean and restart Issue #{iid}?
|
|
3
|
-
This will delete the worktree, branch, and reset the issue to pending.`,"confirm.retryFromPhase":'Retry Issue #{iid} from "{phaseLabel}" phase?',"confirm.approve":"Approve the implementation plan for Issue #{iid}?","confirm.reject.noFeedback":"Please enter review feedback","confirm.skip":"Skip review for Issue #{iid}?","alert.saveFailed":"Save failed: ","alert.retryFailed":"Retry failed: ","alert.cancelFailed":"Cancel failed: ","alert.restartFailed":"Restart failed: ","alert.retryFromPhaseFailed":"Phase retry failed: ","alert.approveFailed":"Approval failed: ","alert.rejectFailed":"Rejection failed: ","alert.skipFailed":"Skip failed: ","alert.startFailed":"Start failed: ","setup.title":"Issue Auto-Finish Setup","setup.step.envCheck":"Environment Check","setup.step.projectConfig":"Project Config","setup.step.gongfengConfig":"Gongfeng Config","setup.step.aiRunner":"AI Runner","setup.step.advancedOptions":"Advanced Options","setup.step.reviewConfirm":"Review & Confirm","setup.complete.title":"Setup Complete","setup.complete.savedTo":"Configuration saved to:","setup.complete.startHint":"Start the service with:","setup.env.checking":"Checking required system dependencies...","setup.env.checkingShort":"Checking...","setup.env.install":"Install","setup.env.installing":"Installing...","setup.env.waitingOutput":"Waiting for output...","setup.env.refresh":"Refresh","setup.env.viewLogs":"View Logs","setup.env.installSuccess":"Installed","setup.env.installFailed":"Failed","setup.env.retry":"Retry","setup.env.logPanel":"Install Logs","setup.env.closePanel":"Close","setup.project.workDir":"Project Work Directory *","setup.project.workDirPlaceholder":"/path/to/your/project","setup.project.workDirHint":"The directory where your project code lives","setup.project.gitRootDir":"Git Root Directory","setup.project.gitRootDirPlaceholder":"Leave empty to use work dir","setup.project.gitRootDirHint":"For monorepo: the root of the git repository","setup.project.baseBranch":"Base Branch","setup.project.branchPrefix":"Branch Prefix","setup.project.worktreeBaseDir":"Worktree Base Directory","setup.project.projectSubDir":"Project Sub-directory","setup.project.projectSubDirPlaceholder":"For monorepo: relative path from git root","setup.gongfeng.apiUrl":"Gongfeng API URL *","setup.gongfeng.privateToken":"Private Token *","setup.gongfeng.tokenPlaceholder":"Enter your private token","setup.gongfeng.verify":"Verify","setup.gongfeng.tokenValid":"Token valid","setup.gongfeng.tokenInvalid":"Token invalid","setup.gongfeng.projectPath":"Project Path *","setup.gongfeng.projectPathPlaceholder":"namespace/project","setup.gongfeng.repoFound":"Repository found","setup.gongfeng.repoNotFound":"Repository not found","setup.ai.modeLabel":"AI Runner Mode","setup.ai.claudeInternal":"Claude Internal","setup.ai.claudeInternalDesc":"Use claude-internal CLI","setup.ai.cursorAgent":"Cursor Agent","setup.ai.cursorAgentDesc":"Use cursor agent CLI","setup.ai.codebuddy":"CodeBuddy","setup.ai.codebuddyDesc":"Use codebuddy CLI","setup.ai.model":"AI Model","setup.ai.cliStatus":"CLI Status","setup.advanced.discoveryInterval":"Discovery Interval (ms)","setup.advanced.driveInterval":"Drive Interval (ms)","setup.advanced.maxRetries":"Max Retries","setup.advanced.maxConcurrent":"Max Concurrent Issues","setup.advanced.webPort":"Web UI Port","setup.advanced.pipelineMode":"Pipeline Mode","setup.advanced.pipelineAuto":"Auto","setup.advanced.pipelineClassic":"Classic","setup.advanced.pipelinePlanMode":"Plan Mode","setup.advanced.enableReview":"Enable Review Gate","setup.advanced.phaseTimeout":"Phase Timeout (ms)","setup.advanced.phaseTimeoutHint":"Default: 1800000 (30 min)","setup.confirm.reviewHint":"Review the configuration that will be generated:","setup.nav.back":"Back","setup.nav.next":"Next","setup.nav.saving":"Saving...","setup.nav.complete":"Complete Setup","brainstorm.startRecording":"Start Recording","brainstorm.stopRecording":"Stop Recording","brainstorm.voiceNotSupported":"Voice input not supported. Please use Chrome/Edge, or type directly.","brainstorm.clear":"Clear","brainstorm.recording":"Recording...","brainstorm.transcriptLabel":"Your Ideas","brainstorm.transcriptPlaceholder":"Type or speak your ideas here... messy and incoherent is fine","brainstorm.startGenerate":"Generate SDD","brainstorm.step1":"Brain Dump","brainstorm.step2":"AI Refine","brainstorm.step3":"Create Issue","brainstorm.roundCount":"{count} refinement rounds completed","brainstorm.statusGenerating":"Generating SDD...","brainstorm.statusReviewing":"Reviewing...","brainstorm.statusRefining":"Refining...","brainstorm.statusProcessing":"Processing...","brainstorm.abort":"Abort","brainstorm.manualReview":"Manual Review","brainstorm.manualRefine":"Manual Refine","brainstorm.finishAndCreate":"Finish & Create Issue","brainstorm.sddTitle":"Software Design Document (SDD)","brainstorm.sddEmpty":"SDD not generated yet","brainstorm.questionsTitle":"Review Questions","brainstorm.questionsEmpty":"No review conducted yet","brainstorm.roundHistory":"View round history","brainstorm.roundLabel":"Round {n}","brainstorm.issueTitleLabel":"Issue Title","brainstorm.issueTitlePlaceholder":"Enter issue title (leave empty to auto-extract from SDD)","brainstorm.addAutoFinishLabel":"Add auto-finish label (system will process automatically)","brainstorm.sddPreview":"SDD Preview","brainstorm.backToRefine":"Back to Refine","brainstorm.createIssueOnly":"Create Issue Only","brainstorm.createAndStart":"Create & Start Processing","brainstorm.creating":"Creating...","brainstorm.issueCreated":"Issue Created Successfully!","brainstorm.startNew":"Start New Brainstorm","chat.newChat":"New Chat","chat.expandSidebar":"Expand sidebar","chat.collapseSidebar":"Collapse sidebar","chat.deleteSession":"Delete session","chat.messagesCount":"messages","chat.noSessions":"No sessions yet","chat.welcome":"Chat Assistant","chat.welcomeHint":'Type a question to start, or click "New Chat" to create a session',"chat.inputPlaceholder":"Type a message... (Enter to send, Shift+Enter for new line)","chat.send":"Send","chat.stop":"Stop","chat.streaming":"Streaming...","chat.thinking.connecting":"Connecting to AI...","chat.thinking.connected":"AI connected, thinking...","chat.thinking.processing":"AI is thinking..."},Fo={"zh-CN":Ec,en:Fc},Rn=F(localStorage.getItem("iaf-locale")||"zh-CN");function fe(e,t){const s=Fo[Rn.value]?.[e]??Fo["zh-CN"]?.[e]??e;if(!t)return s;let n=s;for(const[r,o]of Object.entries(t))n=n.replaceAll(`{${r}}`,String(o));return n}function Mc(e){Rn.value=e,localStorage.setItem("iaf-locale",e)}function jc(){return Rn.value}const Mo={install(e){e.config.globalProperties.$t=fe}};function Vt(){return{t:fe,locale:Rn,setLocale:Mc,getLocale:jc}}const jo=["analysis","design","implement","verify"],Oo=["plan","review","build","verify"];function Oc(){return[{file:"01-analysis.md",label:fe("planFile.01-analysis.md")},{file:"02-design.md",label:fe("planFile.02-design.md")},{file:"03-todolist.md",label:fe("planFile.03-todolist.md")},{file:"04-verify-report.md",label:fe("planFile.04-verify-report.md")}]}function Nc(){return[{file:"01-plan.md",label:fe("planFile.01-plan.md")},{file:"02-verify-report.md",label:fe("planFile.02-verify-report.md")},{file:"review-feedback.md",label:fe("planFile.review-feedback.md")}]}const Bc={pending:"bg-gray-100 text-gray-600",branch_created:"bg-blue-100 text-blue-600",analyzing:"bg-blue-100 text-blue-600",analysis_done:"bg-blue-100 text-blue-600",designing:"bg-blue-100 text-blue-600",design_done:"bg-blue-100 text-blue-600",implementing:"bg-blue-100 text-blue-600",implement_done:"bg-blue-100 text-blue-600",planning:"bg-blue-100 text-blue-600",plan_done:"bg-blue-100 text-blue-600",waiting_for_review:"bg-yellow-100 text-yellow-700",review_approved:"bg-green-100 text-green-600",building:"bg-blue-100 text-blue-600",build_done:"bg-blue-100 text-blue-600",verifying:"bg-blue-100 text-blue-600",completed:"bg-green-100 text-green-700",failed:"bg-red-100 text-red-600"},No=new Set(["completed","failed"]),Uc=new Set(["01-analysis.md","02-design.md","03-todolist.md","01-plan.md"]);function Vc(e,t="classic"){const s={analyzing:{analysis:"in_progress"},analysis_done:{analysis:"completed"},designing:{analysis:"completed",design:"in_progress"},design_done:{analysis:"completed",design:"completed"},implementing:{analysis:"completed",design:"completed",implement:"in_progress"},implement_done:{analysis:"completed",design:"completed",implement:"completed"},verifying:{analysis:"completed",design:"completed",implement:"completed",verify:"in_progress"},completed:{analysis:"completed",design:"completed",implement:"completed",verify:"completed"}},n={planning:{plan:"in_progress"},plan_done:{plan:"completed"},waiting_for_review:{plan:"completed",review:"in_progress"},review_approved:{plan:"completed",review:"completed"},building:{plan:"completed",review:"completed",build:"in_progress"},build_done:{plan:"completed",review:"completed",build:"completed"},verifying:{plan:"completed",review:"completed",build:"completed",verify:"in_progress"},completed:{plan:"completed",review:"completed",build:"completed",verify:"completed"}};return t==="plan-mode"?n[e]??s[e]??{}:s[e]??n[e]??{}}function Ns(){const e=F("classic"),t=Ce(()=>e.value==="plan-mode"?[...Oo]:[...jo]);function s(w){return(w?.pipelineMode??e.value)==="plan-mode"?Nc():Oc()}function n(w){return(w?.pipelineMode??e.value)==="plan-mode"?[...Oo]:[...jo]}function r(w){return fe(`state.${w}`)||w}function o(w){return Bc[w]??"bg-gray-100 text-gray-600"}function l(w){return fe(`phase.${w}`)||w}function a(w,C){if(w.progress?.phases?.[C])return w.progress.phases[C].status;const P=w.pipelineMode??e.value;return Vc(w.state,P)[C]??"pending"}function u(w,C){const P=a(w,C);return P==="completed"?"bg-green-100 text-green-600":P==="in_progress"?"bg-blue-100 text-blue-600":P==="failed"?"bg-red-100 text-red-600":"bg-gray-100 text-gray-400"}function g(w){return w==="completed"?"bg-green-500 text-white":w==="in_progress"?"bg-blue-500 text-white":w==="failed"?"bg-red-500 text-white":"bg-gray-200 text-gray-500"}function d(w){return!No.has(w)}function f(w){return No.has(w)}function y(w){return Uc.has(w)}function x(w,C){if(!C.value)return"#";const P=C.value.config.gongfengBaseUrl,I=C.value.config.projectPath;return`${P}/${I}/issues/${w}`}return{pipelineMode:e,phaseNames:t,getPlanDocs:s,getPhaseNames:n,stateLabel:r,stateClass:o,phaseLabel:l,phaseStatus:a,phaseIndicatorClass:u,phaseNodeClass:g,isActiveState:d,isTerminalState:f,isEditableDoc:y,issueUrl:x}}function Hc(e){const t=F(!1);let s=null;const n=["issue:stateChanged","issue:created","issue:failed","issue:deleted","issue:resetForRetry","issue:restarted","issue:retryFromPhase","review:requested","review:approved","review:rejected","agent:output","pipeline:progress"];function r(){s&&s.close(),s=new EventSource("/api/events"),s.addEventListener("connected",()=>{t.value=!0}),s.addEventListener("heartbeat",()=>{t.value=!0});for(const o of n)s.addEventListener(o,l=>{try{e(o,JSON.parse(l.data))}catch{}});s.onerror=()=>{t.value=!1,setTimeout(r,5e3)}}return Lt(r),Et(()=>{s&&(s.close(),s=null)}),{connected:t}}const Bo=new Set(["pending","branch_created","analyzing","analysis_done","designing","design_done","implementing","implement_done","planning","plan_done","waiting_for_review","review_approved","building","build_done","verifying"]);function zc(){return[{value:"all",label:fe("filter.all")},{value:"active",label:fe("filter.active")},{value:"completed",label:fe("filter.completed")},{value:"failed",label:fe("filter.failed")},{value:"review",label:fe("filter.review")}]}function qc(){const e=F([]),t=F("all"),s=Ce(()=>e.value.filter(a=>Bo.has(a.state)).length),n=Ce(()=>e.value.filter(a=>a.state==="completed").length),r=Ce(()=>e.value.filter(a=>a.state==="failed").length),o=Ce(()=>t.value==="all"?e.value:t.value==="active"?e.value.filter(a=>Bo.has(a.state)):t.value==="completed"?e.value.filter(a=>a.state==="completed"):t.value==="failed"?e.value.filter(a=>a.state==="failed"):t.value==="review"?e.value.filter(a=>a.state==="waiting_for_review"):e.value);async function l(){try{e.value=await ec()}catch(a){console.error("Fetch issues failed",a)}}return{issues:e,filter:t,filteredIssues:o,activeCount:s,completedCount:n,failedCount:r,refresh:l}}function qn(){return{requirements:"",acceptanceCriteria:"",scope:"",constraints:"",references:"",freeText:"",tapdId:""}}function Kc(){const e=F(null),t=F(null),s=F(0),n=F(qn()),r=F(qn()),o=F(!1),l=F(!1),a=F(!1),u=F(""),g=F(!1),d=F([]);async function f(S,D){e.value=S,l.value=!1,n.value=qn(),d.value=[],D.value=[];try{const[z,K]=await Promise.all([ir(S.issueIid),tc(S.issueIid)]);e.value=z,t.value=z.progress??null,D.value=K.reverse()}catch(z){console.error("Fetch detail failed",z)}w(S.issueIid),x(S.issueIid)}async function y(){if(!e.value)return;const S=e.value.issueIid;try{const D=await ir(S);e.value=D,t.value=D.progress??null,s.value++}catch(D){console.error("Refresh detail failed",D)}}async function x(S){try{d.value=await uc(S)}catch{}}async function w(S){o.value=!0;try{n.value=await dc(S)}catch{}finally{o.value=!1}}function C(){r.value={...n.value},l.value=!0}async function P(S){if(e.value){a.value=!0;try{const D=await pc(e.value.issueIid,r.value);n.value=D.data??r.value,l.value=!1,confirm(fe("confirm.supplementSaved"))&&(await Do(e.value.issueIid,"analysis"),await S())}catch(D){alert(fe("alert.saveFailed")+D.message)}finally{a.value=!1}}}async function I(S,D){if(confirm(fe("confirm.retry",{iid:S})))try{await nc(S),await D(),e.value?.issueIid===S&&await f(e.value,{value:[]})}catch(z){alert(fe("alert.retryFailed")+z.message)}}async function T(S,D){if(confirm(fe("confirm.cancel",{iid:S})))try{await rc(S),e.value?.issueIid===S&&(e.value=null),await D()}catch(z){alert(fe("alert.cancelFailed")+z.message)}}async function H(S,D){if(confirm(fe("confirm.restart",{iid:S})))try{await oc(S),await D(),e.value?.issueIid===S&&await f(e.value,{value:[]})}catch(z){alert(fe("alert.restartFailed")+z.message)}}async function R(S,D,z,K){if(confirm(fe("confirm.retryFromPhase",{phaseLabel:z,iid:S})))try{await Do(S,D),await K(),e.value?.issueIid===S&&await f(e.value,{value:[]})}catch(le){alert(fe("alert.retryFromPhaseFailed")+le.message)}}async function k(S,D){if(confirm(fe("confirm.approve",{iid:S}))){g.value=!0;try{await lc(S),await D(),e.value?.issueIid===S&&await f(e.value,{value:[]})}catch(z){alert(fe("alert.approveFailed")+z.message)}finally{g.value=!1}}}async function v(S,D){if(!u.value.trim()){alert(fe("confirm.reject.noFeedback"));return}g.value=!0;try{await ic(S,u.value),u.value="",await D(),e.value?.issueIid===S&&await f(e.value,{value:[]})}catch(z){alert(fe("alert.rejectFailed")+z.message)}finally{g.value=!1}}async function _(S,D){if(confirm(fe("confirm.skip",{iid:S}))){g.value=!0;try{await ac(S),await D(),e.value?.issueIid===S&&await f(e.value,{value:[]})}catch(z){alert(fe("alert.skipFailed")+z.message)}finally{g.value=!1}}}function M(S){return S?!!(S.requirements||S.acceptanceCriteria||S.scope||S.constraints||S.references||S.freeText||S.tapdId):!1}return{selectedIssue:e,detailProgress:t,detailVersion:s,detailSupplement:n,detailSupplementForm:r,detailSupplementLoading:o,detailSupplementEditing:l,detailSupplementSaving:a,reviewFeedback:u,reviewSubmitting:g,reviewHistory:d,selectIssue:f,refreshDetail:y,enterSupplementEdit:C,saveDetailSupplement:P,doRetryIssue:I,doCancelIssue:T,doRestartIssue:H,doRetryFromPhase:R,doApprovePlan:k,doRejectPlan:v,doSkipReview:_,hasSupplementData:M}}const Uo=500,Gc=new Set(["assistant"]);function ui(){const e=F([]),t=F(!0),s=F(!1),n=F(null),r=Ce(()=>s.value?e.value:e.value.filter(f=>Gc.has(f.type)));function o(f){return fe(`agentLog.type.${f}`)||f}function l(){t.value&&js(()=>{const f=n.value;f&&(f.scrollTop=0)})}function a(f){e.value.unshift(f),e.value.length>Uo&&(e.value=e.value.slice(0,Uo)),l()}function u(f,y,x,w){y.value===f&&a({type:w.type??"raw",phase:x,timestamp:w.timestamp??new Date().toISOString(),summary:Wc(w)})}function g(f,y,x,w,C){y.value===f&&a({type:"system",phase:x,timestamp:C,summary:w})}function d(){e.value=[]}return{agentLogs:e,filteredLogs:r,agentAutoScroll:t,debugMode:s,agentLogContainer:n,agentLogLabel:o,pushLog:a,pushAgentStreamEvent:u,pushSystemLog:g,scrollToTop:l,clear:d}}function Wc(e){const t=e.content;if(!t||typeof t=="string")return String(t??"");if(e.type==="assistant"){const s=t.message??t;if(typeof s=="string")return s.slice(0,200);const n=s;return n.text?n.text.slice(0,200):n.content&&(Array.isArray(n.content)?n.content:[n.content]).filter(l=>l.type==="text").map(l=>l.text).join(" ").slice(0,200)||JSON.stringify(t).slice(0,150)}if(e.type==="tool_use"){const s=t,n=s.tool,r=n?.name??s.name??"?",o=n?.input??s.input??{},l=o.path??o.command??o.file_path??"";return r+(l?": "+l:"")}return e.type==="tool_result"?(typeof t.content=="string"?t.content:JSON.stringify(t.content??"")).slice(0,150):e.type==="result"?(t.result??JSON.stringify(t)).slice(0,200):JSON.stringify(t).slice(0,150)}function Vo(){return{requirements:"",acceptanceCriteria:"",scope:"",constraints:"",references:"",freeText:"",tapdId:""}}function Jc(e){const t=F(""),s=F([]),n=F(new Set),r=F(0),o=F(1),l=20,a=F(!1),u=F(""),g=F(null),d=F(Vo()),f=F(!1);async function y(){a.value=!0,u.value="";try{const P=await fc({search:t.value.trim()||void 0,page:o.value,perPage:l});s.value=P.issues,r.value=P.total,n.value=new Set(P.trackedIids)}catch(P){u.value=P.message}finally{a.value=!1}}function x(P){g.value=P,d.value=Vo(),f.value=!1}function w(P){return!!(P.requirements||P.acceptanceCriteria||P.scope||P.constraints||P.references||P.freeText)}async function C(P){if(g.value){f.value=!0;try{const I=g.value,T={issueId:I.id,issueIid:I.iid,issueTitle:I.title};w(d.value)&&(T.supplement=d.value),await gc(T),g.value=null,await e(),n.value.add(I.iid),P()}catch(I){alert(fe("alert.startFailed")+I.message)}finally{f.value=!1}}}return{browseSearch:t,browseIssues:s,browseTrackedIids:n,browseTotal:r,browsePage:o,browsePerPage:l,browseLoading:a,browseError:u,startDialogIssue:g,startSupplement:d,startProcessing:f,fetchGongfengIssues:y,openStartDialog:x,doStartProcessing:C,hasSupplementData:w}}function Zc(e){const{selectedIssueIid:t,onOpenIssue:s}=e;function n(){const a=new URLSearchParams(window.location.search).get("issue");if(!a)return;const u=Number(a);return Number.isFinite(u)&&u>0?u:void 0}function r(l){const a=new URL(window.location.href);l?a.searchParams.set("issue",String(l)):a.searchParams.delete("issue");const u=a.pathname+a.search,g=window.location.pathname+window.location.search;u!==g&&window.history.pushState({issueIid:l??null},"",u)}function o(l){const a=l.state?.issueIid??n();a?s(a):t.value&&(t.value=void 0)}return ot(t,l=>r(l)),Lt(()=>{window.addEventListener("popstate",o),window.history.replaceState({issueIid:n()??null},"",window.location.href)}),Et(()=>{window.removeEventListener("popstate",o)}),{readIssueIidFromUrl:n}}function dn(e){return e?new Date(e).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"-"}function ci(e){if(!e||e<0)return"0s";const t=Math.floor(e/1e3);if(t<60)return t+"s";const s=Math.floor(t/60);return s<60?s+"m "+t%60+"s":Math.floor(s/60)+"h "+s%60+"m"}function Qc(e){return e?new Date(e).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",second:"2-digit"}):""}const Yc={class:"bg-white shadow-sm border-b border-gray-200"},Xc={class:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between"},ed={class:"flex items-center space-x-3"},td={class:"flex items-center space-x-4 text-sm text-gray-500"},sd={key:0},nd={key:1},rd={key:2},od=["disabled","title"],ld=["title"],id=Fe({__name:"HeaderBar",props:{connected:{type:Boolean},systemStatus:{}},setup(e){const{locale:t,setLocale:s}=Vt(),n=e,r=F(!0),o=F(!1);ot(()=>n.systemStatus,a=>{a&&(r.value=a.config.issueNoteSyncEnabled)},{immediate:!0});async function l(){const a=!r.value;o.value=!0;try{await mc(a),r.value=a}catch(u){console.error("Failed to toggle system note sync",u)}finally{o.value=!1}}return(a,u)=>(h(),m("header",Yc,[i("div",Xc,[i("div",ed,[u[2]||(u[2]=i("h1",{class:"text-xl font-bold text-gray-800"},"Issue Auto-Finish",-1)),i("span",{class:te(["flex items-center space-x-1 text-sm",e.connected?"text-green-600":"text-red-500"])},[i("span",{class:te(["inline-block w-2 h-2 rounded-full",e.connected?"bg-green-500 pulse-dot":"bg-red-500"])},null,2),i("span",null,p(e.connected?a.$t("header.connected"):a.$t("header.disconnected")),1)],2)]),i("div",td,[e.systemStatus?(h(),m("span",sd,p(a.$t("header.discovery"))+": "+p((e.systemStatus.config.discoveryIntervalMs/1e3).toFixed(0))+"s / "+p(a.$t("header.drive"))+": "+p((e.systemStatus.config.driveIntervalMs/1e3).toFixed(0))+"s",1)):O("",!0),e.systemStatus?(h(),m("span",nd,p(a.$t("header.uptime"))+": "+p(c(ci)(e.systemStatus.uptime)),1)):O("",!0),e.systemStatus?(h(),m("span",rd,"AI: "+p(e.systemStatus.config.aiMode),1)):O("",!0),e.systemStatus?.config.pipelineMode?(h(),m("span",{key:3,class:te(["px-2 py-0.5 rounded text-xs font-medium",e.systemStatus.config.pipelineMode==="plan-mode"?"bg-purple-100 text-purple-700":"bg-gray-100 text-gray-600"])},p(e.systemStatus.config.pipelineMode==="plan-mode"?a.$t("setup.advanced.pipelinePlanMode"):a.$t("setup.advanced.pipelineClassic")),3)):O("",!0),e.systemStatus?(h(),m("button",{key:4,class:te(["px-2 py-0.5 rounded text-xs font-medium transition-colors",r.value?"bg-green-100 text-green-700 hover:bg-green-200":"bg-gray-100 text-gray-500 hover:bg-gray-200"]),disabled:o.value,title:r.value?a.$t("header.syncOnTitle"):a.$t("header.syncOffTitle"),onClick:u[0]||(u[0]=g=>l())},p(r.value?a.$t("header.syncOn"):a.$t("header.syncOff")),11,od)):O("",!0),i("button",{class:te(["px-2 py-1 text-xs rounded",(c(t)==="zh-CN","bg-gray-200 text-gray-700")]),title:a.$t("header.langSwitch"),onClick:u[1]||(u[1]=g=>c(s)(c(t)==="zh-CN"?"en":"zh-CN"))},p(c(t)==="zh-CN"?"EN":"中文"),11,ld)])])]))}}),ad={class:"grid grid-cols-4 gap-4 mb-6"},ud={class:"bg-white rounded-lg shadow-sm p-4 border border-gray-200"},cd={class:"text-sm text-gray-500"},dd={class:"text-2xl font-bold text-gray-800"},pd={class:"bg-white rounded-lg shadow-sm p-4 border border-blue-200"},fd={class:"text-sm text-blue-500"},gd={class:"text-2xl font-bold text-blue-600"},hd={class:"bg-white rounded-lg shadow-sm p-4 border border-green-200"},md={class:"text-sm text-green-500"},bd={class:"text-2xl font-bold text-green-600"},vd={class:"bg-white rounded-lg shadow-sm p-4 border border-red-200"},yd={class:"text-sm text-red-500"},xd={class:"text-2xl font-bold text-red-600"},wd=Fe({__name:"StatsCards",props:{total:{},active:{},completed:{},failed:{}},setup(e){return(t,s)=>(h(),m("div",ad,[i("div",ud,[i("div",cd,p(t.$t("stats.total")),1),i("div",dd,p(e.total),1)]),i("div",pd,[i("div",fd,p(t.$t("stats.active")),1),i("div",gd,p(e.active),1)]),i("div",hd,[i("div",md,p(t.$t("stats.completed")),1),i("div",bd,p(e.completed),1)]),i("div",vd,[i("div",yd,p(t.$t("stats.failed")),1),i("div",xd,p(e.failed),1)])]))}}),kd={class:"mb-4 flex items-center space-x-2"},$d={class:"text-sm text-gray-600"},Sd=["onClick"],_d={class:"bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden"},Cd={class:"w-full"},Id={class:"bg-gray-50 border-b border-gray-200"},Td={key:0},Pd={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},Rd={key:0},Ad={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},Dd={key:0},Ld={key:0},Ed={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},Fd={class:"divide-y divide-gray-100"},Md={key:0},jd={colspan:"7",class:"px-4 py-8 text-center text-gray-400"},Od=["onClick"],Nd={class:"px-4 py-3 text-sm font-mono text-gray-700"},Bd=["href","title"],Ud={class:"px-4 py-3 text-sm text-gray-800 max-w-xs truncate"},Vd={class:"px-4 py-3"},Hd={class:"px-4 py-3"},zd={class:"flex items-center space-x-1"},qd=["title"],Kd={key:0},Gd={key:1,class:"pulse-dot"},Wd={key:2},Jd={key:3},Zd={class:"px-4 py-3 text-sm text-gray-600"},Qd={class:"px-4 py-3 text-sm text-gray-500"},Yd={class:"px-4 py-3"},Xd=["onClick"],ep=["onClick"],tp=["onClick"],sp=Fe({__name:"IssueTable",props:{issues:{},filter:{},systemStatus:{}},emits:["update:filter","select","retry","restart","cancel"],setup(e,{emit:t}){const s=e,n=t,{getPhaseNames:r,stateLabel:o,stateClass:l,phaseStatus:a,phaseIndicatorClass:u,phaseLabel:g}=Ns(),d=F("updatedAt"),f=F("desc"),y=Ce(()=>{const w=[...s.issues],C=f.value==="asc"?1:-1;return w.sort((P,I)=>{const T=d.value;return T==="updatedAt"?C*(new Date(P.updatedAt).getTime()-new Date(I.updatedAt).getTime()):T==="issueIid"||T==="attempts"?C*(P[T]-I[T]):C*P.state.localeCompare(I.state)})});function x(w){d.value===w?f.value=f.value==="asc"?"desc":"asc":(d.value=w,f.value=w==="updatedAt"?"desc":"asc")}return(w,C)=>(h(),m("div",null,[i("div",kd,[i("span",$d,p(w.$t("table.filter")),1),(h(!0),m(se,null,De(c(zc)(),P=>(h(),m("button",{key:P.value,class:te(["px-3 py-1 rounded-full text-xs font-medium transition-colors",e.filter===P.value?"bg-gray-800 text-white":"bg-gray-200 text-gray-600 hover:bg-gray-300"]),onClick:I=>n("update:filter",P.value)},p(P.label),11,Sd))),128))]),i("div",_d,[i("table",Cd,[i("thead",Id,[i("tr",null,[i("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase cursor-pointer select-none hover:text-gray-700",onClick:C[0]||(C[0]=P=>x("issueIid"))},[C[6]||(C[6]=de(" IID ",-1)),d.value==="issueIid"?(h(),m("span",Td,p(f.value==="asc"?"▲":"▼"),1)):O("",!0)]),i("th",Pd,p(w.$t("table.title")),1),i("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase cursor-pointer select-none hover:text-gray-700",onClick:C[1]||(C[1]=P=>x("state"))},[de(p(w.$t("table.state"))+" ",1),d.value==="state"?(h(),m("span",Rd,p(f.value==="asc"?"▲":"▼"),1)):O("",!0)]),i("th",Ad,p(w.$t("table.progress")),1),i("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase cursor-pointer select-none hover:text-gray-700",onClick:C[2]||(C[2]=P=>x("attempts"))},[de(p(w.$t("table.retries"))+" ",1),d.value==="attempts"?(h(),m("span",Dd,p(f.value==="asc"?"▲":"▼"),1)):O("",!0)]),i("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase cursor-pointer select-none hover:text-gray-700",onClick:C[3]||(C[3]=P=>x("updatedAt"))},[de(p(w.$t("table.updatedAt"))+" ",1),d.value==="updatedAt"?(h(),m("span",Ld,p(f.value==="asc"?"▲":"▼"),1)):O("",!0)]),i("th",Ed,p(w.$t("table.actions")),1)])]),i("tbody",Fd,[y.value.length===0?(h(),m("tr",Md,[i("td",jd,p(w.$t("table.empty")),1)])):O("",!0),(h(!0),m(se,null,De(y.value,P=>(h(),m("tr",{key:P.issueIid,class:"hover:bg-gray-50 cursor-pointer transition-colors",onClick:I=>n("select",P)},[i("td",Nd,[i("a",{href:e.systemStatus?`${e.systemStatus.config.gongfengBaseUrl}/${e.systemStatus.config.projectPath}/issues/${P.issueIid}`:"#",target:"_blank",rel:"noopener",class:"text-blue-600 hover:text-blue-800 hover:underline inline-flex items-center",onClick:C[4]||(C[4]=Ot(()=>{},["stop"])),title:w.$t("table.viewInGongfeng")},[de(" #"+p(P.issueIid)+" ",1),C[7]||(C[7]=i("svg",{class:"w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1))],8,Bd)]),i("td",Ud,p(P.issueTitle),1),i("td",Vd,[i("span",{class:te(["px-2 py-1 rounded-full text-xs font-medium",c(l)(P.state)])},p(c(o)(P.state)),3)]),i("td",Hd,[i("div",zd,[(h(!0),m(se,null,De(c(r)(P),I=>(h(),m("div",{key:I,class:te(["w-6 h-6 rounded-full flex items-center justify-center text-xs",c(u)(P,I)]),title:c(g)(I)},[c(a)(P,I)==="completed"?(h(),m("span",Kd,"✓")):c(a)(P,I)==="in_progress"?(h(),m("span",Gd,"●")):c(a)(P,I)==="failed"?(h(),m("span",Wd,"✗")):(h(),m("span",Jd,"●"))],10,qd))),128))])]),i("td",Zd,p(P.attempts),1),i("td",Qd,p(c(dn)(P.updatedAt)),1),i("td",Yd,[i("div",{class:"flex space-x-2",onClick:C[5]||(C[5]=Ot(()=>{},["stop"]))},[P.state==="failed"?(h(),m("button",{key:0,class:"px-2 py-1 bg-blue-500 text-white text-xs rounded hover:bg-blue-600",onClick:I=>n("retry",P.issueIid)},p(w.$t("table.retry")),9,Xd)):O("",!0),i("button",{class:"px-2 py-1 bg-yellow-100 text-yellow-700 text-xs rounded hover:bg-yellow-200",onClick:I=>n("restart",P.issueIid)},p(w.$t("table.restart")),9,ep),i("button",{class:"px-2 py-1 bg-red-100 text-red-600 text-xs rounded hover:bg-red-200",onClick:I=>n("cancel",P.issueIid)},p(w.$t("table.cancel")),9,tp)])])],8,Od))),128))])])])]))}}),np={class:"mb-4 flex items-center space-x-3"},rp={class:"relative flex-1 max-w-md"},op=["value","placeholder"],lp=["disabled"],ip={key:0,class:"py-12 text-center text-gray-400"},ap={key:1,class:"py-8 text-center text-red-500"},up={key:2},cp={class:"bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden"},dp={class:"w-full"},pp={class:"bg-gray-50 border-b border-gray-200"},fp={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},gp={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},hp={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},mp={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},bp={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},vp={class:"divide-y divide-gray-100"},yp={key:0},xp={colspan:"6",class:"px-4 py-8 text-center text-gray-400"},wp={class:"px-4 py-3 text-sm font-mono text-gray-700"},kp=["href"],$p={class:"px-4 py-3 text-sm text-gray-800 max-w-sm truncate"},Sp={class:"px-4 py-3"},_p={class:"flex flex-wrap"},Cp={class:"px-4 py-3 text-sm text-gray-600"},Ip={class:"px-4 py-3 text-sm text-gray-500"},Tp={class:"px-4 py-3"},Pp={key:0,class:"px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-500"},Rp=["onClick"],Ap={key:0,class:"flex items-center justify-between mt-4"},Dp={class:"text-sm text-gray-500"},Lp={class:"flex space-x-2"},Ep=["disabled"],Fp=["disabled"],Mp=Fe({__name:"BrowsePanel",props:{issues:{},trackedIids:{},total:{},page:{},perPage:{},loading:{type:Boolean},error:{},search:{},systemStatus:{}},emits:["update:search","update:page","search","start"],setup(e,{emit:t}){const s=t;function n(r,o){return o?`${o.config.gongfengBaseUrl}/${o.config.projectPath}/issues/${r}`:"#"}return(r,o)=>(h(),m("div",null,[i("div",np,[i("div",rp,[i("input",{value:e.search,onInput:o[0]||(o[0]=l=>s("update:search",l.target.value)),type:"text",placeholder:r.$t("browse.searchPlaceholder"),class:"w-full pl-9 pr-4 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-400 focus:border-transparent",onKeyup:o[1]||(o[1]=ai(l=>s("search"),["enter"]))},null,40,op),o[5]||(o[5]=i("svg",{class:"absolute left-3 top-2.5 w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))]),i("button",{class:"px-4 py-2 bg-gray-800 text-white text-sm rounded-lg hover:bg-gray-700",disabled:e.loading,onClick:o[2]||(o[2]=l=>s("search"))},p(e.loading?r.$t("browse.loading"):r.$t("browse.search")),9,lp)]),e.loading?(h(),m("div",ip,[o[6]||(o[6]=i("svg",{class:"animate-spin h-6 w-6 mx-auto mb-2 text-blue-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),de(" "+p(r.$t("browse.loadingList")),1)])):e.error?(h(),m("div",ap,p(e.error),1)):(h(),m("div",up,[i("div",cp,[i("table",dp,[i("thead",pp,[i("tr",null,[o[7]||(o[7]=i("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"IID",-1)),i("th",fp,p(r.$t("browse.title")),1),i("th",gp,p(r.$t("browse.labels")),1),i("th",hp,p(r.$t("browse.author")),1),i("th",mp,p(r.$t("browse.createdAt")),1),i("th",bp,p(r.$t("browse.actions")),1)])]),i("tbody",vp,[e.issues.length===0?(h(),m("tr",yp,[i("td",xp,p(r.$t("browse.empty")),1)])):O("",!0),(h(!0),m(se,null,De(e.issues,l=>(h(),m("tr",{key:l.iid,class:"hover:bg-gray-50 transition-colors"},[i("td",wp,[i("a",{href:n(l.iid,e.systemStatus),target:"_blank",rel:"noopener",class:"text-blue-600 hover:text-blue-800 hover:underline inline-flex items-center"},[de(" #"+p(l.iid)+" ",1),o[8]||(o[8]=i("svg",{class:"w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1))],8,kp)]),i("td",$p,p(l.title),1),i("td",Sp,[i("div",_p,[(h(!0),m(se,null,De(l.labels,a=>(h(),m("span",{key:a,class:"label-tag bg-blue-100 text-blue-700"},p(a),1))),128))])]),i("td",Cp,p(l.author?.name||l.author?.username||"-"),1),i("td",Ip,p(c(dn)(l.created_at)),1),i("td",Tp,[e.trackedIids.has(l.iid)?(h(),m("span",Pp,p(r.$t("browse.tracked")),1)):(h(),m("button",{key:1,class:"px-3 py-1 bg-green-500 text-white text-xs rounded-lg hover:bg-green-600 font-medium",onClick:a=>s("start",l)},p(r.$t("browse.start")),9,Rp))])]))),128))])])]),e.total>e.perPage?(h(),m("div",Ap,[i("div",Dp,p(r.$t("browse.pagination",{total:e.total,page:e.page,totalPages:Math.ceil(e.total/e.perPage)})),1),i("div",Lp,[i("button",{class:"px-3 py-1 text-sm bg-white border border-gray-300 rounded hover:bg-gray-50 disabled:opacity-40",disabled:e.page<=1,onClick:o[3]||(o[3]=l=>{s("update:page",e.page-1),s("search")})},p(r.$t("browse.prevPage")),9,Ep),i("button",{class:"px-3 py-1 text-sm bg-white border border-gray-300 rounded hover:bg-gray-50 disabled:opacity-40",disabled:e.page>=Math.ceil(e.total/e.perPage),onClick:o[4]||(o[4]=l=>{s("update:page",e.page+1),s("search")})},p(r.$t("browse.nextPage")),9,Fp)])])):O("",!0)]))]))}});function jp(){const e=F("input"),t=F(null),s=F(!1),n=F(""),r=F(""),o=F(null),l=F(null),a=Ce(()=>t.value?.currentSdd??""),u=Ce(()=>t.value?.rounds??[]),g=Ce(()=>t.value?.status??"idle"),d=Ce(()=>{const k=u.value;return k.length>0?k[k.length-1].questions:""});async function f(k){n.value="",s.value=!0;try{const v=await vc(k);t.value=v.session,e.value="refine",await y()}catch(v){n.value=v.message}finally{s.value=!1}}async function y(k){if(t.value){n.value="",s.value=!0,r.value="";try{const{fetchResponse:v,abort:_}=zn(t.value.id,"auto-refine",k?{rounds:k}:void 0);l.value=_;const M=await v;if(!M.ok){const S=await M.json().catch(()=>({}));throw new Error(S.error||`HTTP ${M.status}`)}await C(M),await I()}catch(v){v.name!=="AbortError"&&(n.value=v.message)}finally{s.value=!1,l.value=null}}}async function x(){if(t.value){n.value="",s.value=!0,r.value="";try{const{fetchResponse:k,abort:v}=zn(t.value.id,"review");l.value=v;const _=await k;if(!_.ok)throw new Error(`HTTP ${_.status}`);await C(_),await I()}catch(k){k.name!=="AbortError"&&(n.value=k.message)}finally{s.value=!1,l.value=null}}}async function w(){if(t.value){n.value="",s.value=!0,r.value="";try{const{fetchResponse:k,abort:v}=zn(t.value.id,"refine");l.value=v;const _=await k;if(!_.ok)throw new Error(`HTTP ${_.status}`);await C(_),await I()}catch(k){k.name!=="AbortError"&&(n.value=k.message)}finally{s.value=!1,l.value=null}}}async function C(k){const v=k.body?.getReader();if(!v)return;const _=new TextDecoder;let M="";for(;;){const{done:S,value:D}=await v.read();if(S)break;M+=_.decode(D,{stream:!0});const z=M.split(`
|
|
4
|
-
`);M=
|
|
5
|
-
`}}if(k.type==="sdd:complete"){const v=k.data;v?.sdd&&t.value&&(t.value.currentSdd=v.sdd)}if(k.type==="review:complete"){const v=k.data;v&&t.value&&(t.value.rounds.find(M=>M.round===v.round)||t.value.rounds.push({round:v.round??t.value.rounds.length+1,questions:v.questions??"",refinedSdd:""}))}if(k.type==="round:complete"){const v=k.data;if(v?.sdd&&t.value){t.value.currentSdd=v.sdd;const _=t.value.rounds.find(M=>M.round===v.round);_&&(_.refinedSdd=v.sdd)}r.value=""}if(k.type==="round:start"&&(r.value=""),k.type==="error"){const v=k.data;n.value=v?.message??"Unknown error"}}async function I(){if(t.value)try{const k=await yc(t.value.id);t.value=k.session}catch{}}async function T(k,v){if(t.value){n.value="",s.value=!0;try{const _=await xc(t.value.id,k,v);o.value=_.issue,e.value="complete"}catch(_){n.value=_.message}finally{s.value=!1}}}function H(){l.value?.()}function R(){t.value=null,e.value="input",s.value=!1,n.value="",r.value="",o.value=null,l.value=null}return{step:e,session:t,loading:s,error:n,streamOutput:r,createdIssue:o,currentSdd:a,rounds:u,status:g,lastQuestions:d,startSession:f,runAutoRefine:y,runSingleReview:x,runSingleRefine:w,createIssue:T,abort:H,reset:R}}function Op(){const e=F(!1),t=F(""),s=F(""),n=F(!1),r=F("");let o=null;const l=window.SpeechRecognition||window.webkitSpeechRecognition;n.value=!!l;function a(f="zh-CN"){if(!l){r.value="当前浏览器不支持语音识别,请使用 Chrome 或 Edge";return}r.value="",o=new l,o.continuous=!0,o.interimResults=!0,o.lang=f,o.onresult=y=>{let x="",w="";for(let C=y.resultIndex;C<y.results.length;C++){const P=y.results[C];P.isFinal?x+=P[0].transcript:w+=P[0].transcript}x&&(t.value+=x),s.value=w},o.onerror=y=>{y.error!=="no-speech"&&y.error!=="aborted"&&(r.value=`语音识别错误: ${y.error}`),e.value=!1},o.onend=()=>{e.value=!1,s.value=""},o.start(),e.value=!0}function u(){o&&(o.stop(),o=null),e.value=!1}function g(f="zh-CN"){e.value?u():a(f)}function d(){t.value="",s.value=""}return Et(()=>{o&&(o.abort(),o=null)}),{isRecording:e,transcript:t,interimText:s,isSupported:n,error:r,startRecording:a,stopRecording:u,toggleRecording:g,clearTranscript:d}}const Np={class:"space-y-4"},Bp={class:"flex items-center gap-3"},Up={key:0,class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},Vp={key:1,class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},Hp={key:1,class:"text-sm text-amber-600"},zp={key:0,class:"flex items-center gap-2 text-sm text-red-500"},qp={key:0,class:"text-gray-400 italic ml-2 truncate max-w-md"},Kp={class:"block text-sm font-medium text-gray-700 mb-1"},Gp=["placeholder"],Wp={key:1,class:"text-sm text-red-500"},Jp={class:"flex justify-end"},Zp=["disabled"],Qp=Fe({__name:"VoiceRecorder",emits:["submit"],setup(e,{emit:t}){const{t:s}=Vt(),n=t,{isRecording:r,transcript:o,interimText:l,isSupported:a,error:u,toggleRecording:g,clearTranscript:d}=Op();function f(){const y=o.value.trim();y&&n("submit",y)}return(y,x)=>(h(),m("div",Np,[i("div",Bp,[c(a)?(h(),m("button",{key:0,class:te(["inline-flex items-center gap-2 px-4 py-2.5 rounded-lg font-medium text-sm transition-all",c(r)?"bg-red-500 text-white hover:bg-red-600 animate-pulse":"bg-gray-800 text-white hover:bg-gray-700"]),onClick:x[0]||(x[0]=w=>c(g)())},[c(r)?(h(),m("svg",Vp,[...x[4]||(x[4]=[i("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"},null,-1)])])):(h(),m("svg",Up,[...x[3]||(x[3]=[i("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"},null,-1),i("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"},null,-1)])])),de(" "+p(c(r)?c(s)("brainstorm.stopRecording"):c(s)("brainstorm.startRecording")),1)],2)):O("",!0),c(a)?O("",!0):(h(),m("span",Hp,p(c(s)("brainstorm.voiceNotSupported")),1)),c(o).trim()?(h(),m("button",{key:2,class:"text-sm text-gray-500 hover:text-gray-700 underline",onClick:x[1]||(x[1]=w=>c(d)())},p(c(s)("brainstorm.clear")),1)):O("",!0)]),c(r)?(h(),m("div",zp,[x[5]||(x[5]=i("span",{class:"relative flex h-2.5 w-2.5"},[i("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-red-400 opacity-75"}),i("span",{class:"relative inline-flex rounded-full h-2.5 w-2.5 bg-red-500"})],-1)),de(" "+p(c(s)("brainstorm.recording"))+" ",1),c(l)?(h(),m("span",qp,p(c(l)),1)):O("",!0)])):O("",!0),i("div",null,[i("label",Kp,p(c(s)("brainstorm.transcriptLabel")),1),ue(i("textarea",{"onUpdate:modelValue":x[2]||(x[2]=w=>Ee(o)?o.value=w:null),rows:"10",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-gray-800 focus:border-transparent resize-y",placeholder:c(s)("brainstorm.transcriptPlaceholder")},null,8,Gp),[[he,c(o)]])]),c(u)?(h(),m("div",Wp,p(c(u)),1)):O("",!0),i("div",Jp,[i("button",{class:"px-6 py-2.5 bg-gray-800 text-white rounded-lg text-sm font-medium hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",disabled:!c(o).trim(),onClick:f},p(c(s)("brainstorm.startGenerate")),9,Zp)])]))}});function Rr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Xt=Rr();function di(e){Xt=e}var Jt={exec:()=>null};function ge(e,t=""){let s=typeof e=="string"?e:e.source,n={replace:(r,o)=>{let l=typeof o=="string"?o:o.source;return l=l.replace(Ve.caret,"$1"),s=s.replace(r,l),n},getRegex:()=>new RegExp(s,t)};return n}var Yp=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Ve={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Xp=/^(?:[ \t]*(?:\n|$))+/,ef=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,tf=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Bs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,sf=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ar=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,pi=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,fi=ge(pi).replace(/bull/g,Ar).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),nf=ge(pi).replace(/bull/g,Ar).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Dr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rf=/^[^\n]+/,Lr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,of=ge(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Lr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),lf=ge(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ar).getRegex(),An="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Er=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,af=ge("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Er).replace("tag",An).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),gi=ge(Dr).replace("hr",Bs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",An).getRegex(),uf=ge(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",gi).getRegex(),Fr={blockquote:uf,code:ef,def:of,fences:tf,heading:sf,hr:Bs,html:af,lheading:fi,list:lf,newline:Xp,paragraph:gi,table:Jt,text:rf},Ho=ge("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Bs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",An).getRegex(),cf={...Fr,lheading:nf,table:Ho,paragraph:ge(Dr).replace("hr",Bs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ho).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",An).getRegex()},df={...Fr,html:ge(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Er).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Jt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ge(Dr).replace("hr",Bs).replace("heading",` *#{1,6} *[^
|
|
6
|
-
]`).replace("lheading",fi).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},pf=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ff=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,hi=/^( {2,}|\\)\n(?!\s*$)/,gf=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Dn=/[\p{P}\p{S}]/u,Mr=/[\s\p{P}\p{S}]/u,mi=/[^\s\p{P}\p{S}]/u,hf=ge(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Mr).getRegex(),bi=/(?!~)[\p{P}\p{S}]/u,mf=/(?!~)[\s\p{P}\p{S}]/u,bf=/(?:[^\s\p{P}\p{S}]|~)/u,vi=/(?![*_])[\p{P}\p{S}]/u,vf=/(?![*_])[\s\p{P}\p{S}]/u,yf=/(?:[^\s\p{P}\p{S}]|[*_])/u,xf=ge(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Yp?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),yi=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,wf=ge(yi,"u").replace(/punct/g,Dn).getRegex(),kf=ge(yi,"u").replace(/punct/g,bi).getRegex(),xi="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",$f=ge(xi,"gu").replace(/notPunctSpace/g,mi).replace(/punctSpace/g,Mr).replace(/punct/g,Dn).getRegex(),Sf=ge(xi,"gu").replace(/notPunctSpace/g,bf).replace(/punctSpace/g,mf).replace(/punct/g,bi).getRegex(),_f=ge("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,mi).replace(/punctSpace/g,Mr).replace(/punct/g,Dn).getRegex(),Cf=ge(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,vi).getRegex(),If="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Tf=ge(If,"gu").replace(/notPunctSpace/g,yf).replace(/punctSpace/g,vf).replace(/punct/g,vi).getRegex(),Pf=ge(/\\(punct)/,"gu").replace(/punct/g,Dn).getRegex(),Rf=ge(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Af=ge(Er).replace("(?:-->|$)","-->").getRegex(),Df=ge("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Af).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),pn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Lf=ge(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",pn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),wi=ge(/^!?\[(label)\]\[(ref)\]/).replace("label",pn).replace("ref",Lr).getRegex(),ki=ge(/^!?\[(ref)\](?:\[\])?/).replace("ref",Lr).getRegex(),Ef=ge("reflink|nolink(?!\\()","g").replace("reflink",wi).replace("nolink",ki).getRegex(),zo=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,jr={_backpedal:
|
|
3
|
+
This will delete the worktree, branch, and reset the issue to pending.`,"confirm.retryFromPhase":'Retry Issue #{iid} from "{phaseLabel}" phase?',"confirm.approve":"Approve the implementation plan for Issue #{iid}?","confirm.reject.noFeedback":"Please enter review feedback","confirm.skip":"Skip review for Issue #{iid}?","alert.saveFailed":"Save failed: ","alert.retryFailed":"Retry failed: ","alert.cancelFailed":"Cancel failed: ","alert.restartFailed":"Restart failed: ","alert.retryFromPhaseFailed":"Phase retry failed: ","alert.approveFailed":"Approval failed: ","alert.rejectFailed":"Rejection failed: ","alert.skipFailed":"Skip failed: ","alert.startFailed":"Start failed: ","setup.title":"Issue Auto-Finish Setup","setup.step.envCheck":"Environment Check","setup.step.projectConfig":"Project Config","setup.step.gongfengConfig":"Gongfeng Config","setup.step.aiRunner":"AI Runner","setup.step.advancedOptions":"Advanced Options","setup.step.reviewConfirm":"Review & Confirm","setup.complete.title":"Setup Complete","setup.complete.savedTo":"Configuration saved to:","setup.complete.startHint":"Start the service with:","setup.env.checking":"Checking required system dependencies...","setup.env.checkingShort":"Checking...","setup.env.install":"Install","setup.env.installing":"Installing...","setup.env.waitingOutput":"Waiting for output...","setup.env.refresh":"Refresh","setup.env.viewLogs":"View Logs","setup.env.installSuccess":"Installed","setup.env.installFailed":"Failed","setup.env.retry":"Retry","setup.env.logPanel":"Install Logs","setup.env.closePanel":"Close","setup.project.workDir":"Project Work Directory *","setup.project.workDirPlaceholder":"/path/to/your/project","setup.project.workDirHint":"The directory where your project code lives","setup.project.gitRootDir":"Git Root Directory","setup.project.gitRootDirPlaceholder":"Leave empty to use work dir","setup.project.gitRootDirHint":"For monorepo: the root of the git repository","setup.project.baseBranch":"Base Branch","setup.project.branchPrefix":"Branch Prefix","setup.project.worktreeBaseDir":"Worktree Base Directory","setup.project.projectSubDir":"Project Sub-directory","setup.project.projectSubDirPlaceholder":"For monorepo: relative path from git root","setup.gongfeng.apiUrl":"Gongfeng API URL *","setup.gongfeng.privateToken":"Private Token *","setup.gongfeng.tokenPlaceholder":"Enter your private token","setup.gongfeng.verify":"Verify","setup.gongfeng.tokenValid":"Token valid","setup.gongfeng.tokenInvalid":"Token invalid","setup.gongfeng.projectPath":"Project Path *","setup.gongfeng.projectPathPlaceholder":"namespace/project","setup.gongfeng.repoFound":"Repository found","setup.gongfeng.repoNotFound":"Repository not found","setup.ai.modeLabel":"AI Runner Mode","setup.ai.claudeInternal":"Claude Internal","setup.ai.claudeInternalDesc":"Use claude-internal CLI","setup.ai.cursorAgent":"Cursor Agent","setup.ai.cursorAgentDesc":"Use cursor agent CLI","setup.ai.codebuddy":"CodeBuddy","setup.ai.codebuddyDesc":"Use codebuddy CLI","setup.ai.model":"AI Model","setup.ai.cliStatus":"CLI Status","setup.advanced.discoveryInterval":"Discovery Interval (ms)","setup.advanced.driveInterval":"Drive Interval (ms)","setup.advanced.maxRetries":"Max Retries","setup.advanced.maxConcurrent":"Max Concurrent Issues","setup.advanced.webPort":"Web UI Port","setup.advanced.pipelineMode":"Pipeline Mode","setup.advanced.pipelineAuto":"Auto","setup.advanced.pipelineClassic":"Classic","setup.advanced.pipelinePlanMode":"Plan Mode","setup.advanced.enableReview":"Enable Review Gate","setup.advanced.phaseTimeout":"Phase Timeout (ms)","setup.advanced.phaseTimeoutHint":"Default: 1800000 (30 min)","setup.confirm.reviewHint":"Review the configuration that will be generated:","setup.nav.back":"Back","setup.nav.next":"Next","setup.nav.saving":"Saving...","setup.nav.complete":"Complete Setup","brainstorm.startRecording":"Start Recording","brainstorm.stopRecording":"Stop Recording","brainstorm.voiceNotSupported":"Voice input not supported. Please use Chrome/Edge, or type directly.","brainstorm.clear":"Clear","brainstorm.recording":"Recording...","brainstorm.transcriptLabel":"Your Ideas","brainstorm.transcriptPlaceholder":"Type or speak your ideas here... messy and incoherent is fine","brainstorm.startGenerate":"Generate SDD","brainstorm.step1":"Brain Dump","brainstorm.step2":"AI Refine","brainstorm.step3":"Create Issue","brainstorm.roundCount":"{count} refinement rounds completed","brainstorm.statusGenerating":"Generating SDD...","brainstorm.statusReviewing":"Reviewing...","brainstorm.statusRefining":"Refining...","brainstorm.statusProcessing":"Processing...","brainstorm.abort":"Abort","brainstorm.manualReview":"Manual Review","brainstorm.manualRefine":"Manual Refine","brainstorm.finishAndCreate":"Finish & Create Issue","brainstorm.sddTitle":"Software Design Document (SDD)","brainstorm.sddEmpty":"SDD not generated yet","brainstorm.questionsTitle":"Review Questions","brainstorm.questionsEmpty":"No review conducted yet","brainstorm.roundHistory":"View round history","brainstorm.roundLabel":"Round {n}","brainstorm.issueTitleLabel":"Issue Title","brainstorm.issueTitlePlaceholder":"Enter issue title (leave empty to auto-extract from SDD)","brainstorm.addAutoFinishLabel":"Add auto-finish label (system will process automatically)","brainstorm.sddPreview":"SDD Preview","brainstorm.backToRefine":"Back to Refine","brainstorm.createIssueOnly":"Create Issue Only","brainstorm.createAndStart":"Create & Start Processing","brainstorm.creating":"Creating...","brainstorm.issueCreated":"Issue Created Successfully!","brainstorm.startNew":"Start New Brainstorm","chat.newChat":"New Chat","chat.expandSidebar":"Expand sidebar","chat.collapseSidebar":"Collapse sidebar","chat.deleteSession":"Delete session","chat.messagesCount":"messages","chat.noSessions":"No sessions yet","chat.welcome":"Chat Assistant","chat.welcomeHint":'Type a question to start, or click "New Chat" to create a session',"chat.inputPlaceholder":"Type a message... (Enter to send, Shift+Enter for new line)","chat.send":"Send","chat.stop":"Stop","chat.streaming":"Streaming...","chat.thinking.connecting":"Connecting to AI...","chat.thinking.connected":"AI connected, thinking...","chat.thinking.processing":"AI is thinking..."},Fo={"zh-CN":Ec,en:Fc},Rn=F(localStorage.getItem("iaf-locale")||"zh-CN");function fe(e,t){const s=Fo[Rn.value]?.[e]??Fo["zh-CN"]?.[e]??e;if(!t)return s;let n=s;for(const[r,o]of Object.entries(t))n=n.replaceAll(`{${r}}`,String(o));return n}function Mc(e){Rn.value=e,localStorage.setItem("iaf-locale",e)}function jc(){return Rn.value}const Mo={install(e){e.config.globalProperties.$t=fe}};function Ht(){return{t:fe,locale:Rn,setLocale:Mc,getLocale:jc}}const jo=["analysis","design","implement","verify"],Oo=["plan","review","build","verify"];function Oc(){return[{file:"01-analysis.md",label:fe("planFile.01-analysis.md")},{file:"02-design.md",label:fe("planFile.02-design.md")},{file:"03-todolist.md",label:fe("planFile.03-todolist.md")},{file:"04-verify-report.md",label:fe("planFile.04-verify-report.md")}]}function Nc(){return[{file:"01-plan.md",label:fe("planFile.01-plan.md")},{file:"02-verify-report.md",label:fe("planFile.02-verify-report.md")},{file:"review-feedback.md",label:fe("planFile.review-feedback.md")}]}const Bc={pending:"bg-gray-100 text-gray-600",branch_created:"bg-blue-100 text-blue-600",analyzing:"bg-blue-100 text-blue-600",analysis_done:"bg-blue-100 text-blue-600",designing:"bg-blue-100 text-blue-600",design_done:"bg-blue-100 text-blue-600",implementing:"bg-blue-100 text-blue-600",implement_done:"bg-blue-100 text-blue-600",planning:"bg-blue-100 text-blue-600",plan_done:"bg-blue-100 text-blue-600",waiting_for_review:"bg-yellow-100 text-yellow-700",review_approved:"bg-green-100 text-green-600",building:"bg-blue-100 text-blue-600",build_done:"bg-blue-100 text-blue-600",verifying:"bg-blue-100 text-blue-600",completed:"bg-green-100 text-green-700",failed:"bg-red-100 text-red-600"},No=new Set(["completed","failed"]),Uc=new Set(["01-analysis.md","02-design.md","03-todolist.md","01-plan.md"]);function Vc(e,t="classic"){const s={analyzing:{analysis:"in_progress"},analysis_done:{analysis:"completed"},designing:{analysis:"completed",design:"in_progress"},design_done:{analysis:"completed",design:"completed"},implementing:{analysis:"completed",design:"completed",implement:"in_progress"},implement_done:{analysis:"completed",design:"completed",implement:"completed"},verifying:{analysis:"completed",design:"completed",implement:"completed",verify:"in_progress"},completed:{analysis:"completed",design:"completed",implement:"completed",verify:"completed"}},n={planning:{plan:"in_progress"},plan_done:{plan:"completed"},waiting_for_review:{plan:"completed",review:"in_progress"},review_approved:{plan:"completed",review:"completed"},building:{plan:"completed",review:"completed",build:"in_progress"},build_done:{plan:"completed",review:"completed",build:"completed"},verifying:{plan:"completed",review:"completed",build:"completed",verify:"in_progress"},completed:{plan:"completed",review:"completed",build:"completed",verify:"completed"}};return t==="plan-mode"?n[e]??s[e]??{}:s[e]??n[e]??{}}function Ns(){const e=F("classic"),t=Ie(()=>e.value==="plan-mode"?[...Oo]:[...jo]);function s(w){return(w?.pipelineMode??e.value)==="plan-mode"?Nc():Oc()}function n(w){return(w?.pipelineMode??e.value)==="plan-mode"?[...Oo]:[...jo]}function r(w){return fe(`state.${w}`)||w}function o(w){return Bc[w]??"bg-gray-100 text-gray-600"}function l(w){return fe(`phase.${w}`)||w}function a(w,C){if(w.progress?.phases?.[C])return w.progress.phases[C].status;const P=w.pipelineMode??e.value;return Vc(w.state,P)[C]??"pending"}function u(w,C){const P=a(w,C);return P==="completed"?"bg-green-100 text-green-600":P==="in_progress"?"bg-blue-100 text-blue-600":P==="failed"?"bg-red-100 text-red-600":"bg-gray-100 text-gray-400"}function g(w){return w==="completed"?"bg-green-500 text-white":w==="in_progress"?"bg-blue-500 text-white":w==="failed"?"bg-red-500 text-white":"bg-gray-200 text-gray-500"}function d(w){return!No.has(w)}function f(w){return No.has(w)}function y(w){return Uc.has(w)}function x(w,C){if(!C.value)return"#";const P=C.value.config.gongfengBaseUrl,T=C.value.config.projectPath;return`${P}/${T}/issues/${w}`}return{pipelineMode:e,phaseNames:t,getPlanDocs:s,getPhaseNames:n,stateLabel:r,stateClass:o,phaseLabel:l,phaseStatus:a,phaseIndicatorClass:u,phaseNodeClass:g,isActiveState:d,isTerminalState:f,isEditableDoc:y,issueUrl:x}}function Hc(e){const t=F(!1);let s=null;const n=["issue:stateChanged","issue:created","issue:failed","issue:deleted","issue:resetForRetry","issue:restarted","issue:retryFromPhase","review:requested","review:approved","review:rejected","agent:output","pipeline:progress"];function r(){s&&s.close(),s=new EventSource("/api/events"),s.addEventListener("connected",()=>{t.value=!0}),s.addEventListener("heartbeat",()=>{t.value=!0});for(const o of n)s.addEventListener(o,l=>{try{e(o,JSON.parse(l.data))}catch{}});s.onerror=()=>{t.value=!1,setTimeout(r,5e3)}}return Dt(r),Lt(()=>{s&&(s.close(),s=null)}),{connected:t}}const Bo=new Set(["pending","branch_created","analyzing","analysis_done","designing","design_done","implementing","implement_done","planning","plan_done","waiting_for_review","review_approved","building","build_done","verifying"]);function zc(){return[{value:"all",label:fe("filter.all")},{value:"active",label:fe("filter.active")},{value:"completed",label:fe("filter.completed")},{value:"failed",label:fe("filter.failed")},{value:"review",label:fe("filter.review")}]}function qc(){const e=F([]),t=F("all"),s=Ie(()=>e.value.filter(a=>Bo.has(a.state)).length),n=Ie(()=>e.value.filter(a=>a.state==="completed").length),r=Ie(()=>e.value.filter(a=>a.state==="failed").length),o=Ie(()=>t.value==="all"?e.value:t.value==="active"?e.value.filter(a=>Bo.has(a.state)):t.value==="completed"?e.value.filter(a=>a.state==="completed"):t.value==="failed"?e.value.filter(a=>a.state==="failed"):t.value==="review"?e.value.filter(a=>a.state==="waiting_for_review"):e.value);async function l(){try{e.value=await ec()}catch(a){console.error("Fetch issues failed",a)}}return{issues:e,filter:t,filteredIssues:o,activeCount:s,completedCount:n,failedCount:r,refresh:l}}function qn(){return{requirements:"",acceptanceCriteria:"",scope:"",constraints:"",references:"",freeText:"",tapdId:""}}function Kc(){const e=F(null),t=F(null),s=F(0),n=F(qn()),r=F(qn()),o=F(!1),l=F(!1),a=F(!1),u=F(""),g=F(!1),d=F([]);async function f(S,L){e.value=S,l.value=!1,n.value=qn(),d.value=[],L.value=[];try{const[q,K]=await Promise.all([ir(S.issueIid),tc(S.issueIid)]);e.value=q,t.value=q.progress??null,L.value=K.reverse()}catch(q){console.error("Fetch detail failed",q)}w(S.issueIid),x(S.issueIid)}async function y(){if(!e.value)return;const S=e.value.issueIid;try{const L=await ir(S);e.value=L,t.value=L.progress??null,s.value++}catch(L){console.error("Refresh detail failed",L)}}async function x(S){try{d.value=await uc(S)}catch{}}async function w(S){o.value=!0;try{n.value=await dc(S)}catch{}finally{o.value=!1}}function C(){r.value={...n.value},l.value=!0}async function P(S){if(e.value){a.value=!0;try{const L=await pc(e.value.issueIid,r.value);n.value=L.data??r.value,l.value=!1,confirm(fe("confirm.supplementSaved"))&&(await Do(e.value.issueIid,"analysis"),await S())}catch(L){alert(fe("alert.saveFailed")+L.message)}finally{a.value=!1}}}async function T(S,L){if(confirm(fe("confirm.retry",{iid:S})))try{await nc(S),await L(),e.value?.issueIid===S&&await f(e.value,{value:[]})}catch(q){alert(fe("alert.retryFailed")+q.message)}}async function I(S,L){if(confirm(fe("confirm.cancel",{iid:S})))try{await rc(S),e.value?.issueIid===S&&(e.value=null),await L()}catch(q){alert(fe("alert.cancelFailed")+q.message)}}async function H(S,L){if(confirm(fe("confirm.restart",{iid:S})))try{await oc(S),await L(),e.value?.issueIid===S&&await f(e.value,{value:[]})}catch(q){alert(fe("alert.restartFailed")+q.message)}}async function R(S,L,q,K){if(confirm(fe("confirm.retryFromPhase",{phaseLabel:q,iid:S})))try{await Do(S,L),await K(),e.value?.issueIid===S&&await f(e.value,{value:[]})}catch(le){alert(fe("alert.retryFromPhaseFailed")+le.message)}}async function k(S,L){if(confirm(fe("confirm.approve",{iid:S}))){g.value=!0;try{await lc(S),await L(),e.value?.issueIid===S&&await f(e.value,{value:[]})}catch(q){alert(fe("alert.approveFailed")+q.message)}finally{g.value=!1}}}async function v(S,L){if(!u.value.trim()){alert(fe("confirm.reject.noFeedback"));return}g.value=!0;try{await ic(S,u.value),u.value="",await L(),e.value?.issueIid===S&&await f(e.value,{value:[]})}catch(q){alert(fe("alert.rejectFailed")+q.message)}finally{g.value=!1}}async function _(S,L){if(confirm(fe("confirm.skip",{iid:S}))){g.value=!0;try{await ac(S),await L(),e.value?.issueIid===S&&await f(e.value,{value:[]})}catch(q){alert(fe("alert.skipFailed")+q.message)}finally{g.value=!1}}}function M(S){return S?!!(S.requirements||S.acceptanceCriteria||S.scope||S.constraints||S.references||S.freeText||S.tapdId):!1}return{selectedIssue:e,detailProgress:t,detailVersion:s,detailSupplement:n,detailSupplementForm:r,detailSupplementLoading:o,detailSupplementEditing:l,detailSupplementSaving:a,reviewFeedback:u,reviewSubmitting:g,reviewHistory:d,selectIssue:f,refreshDetail:y,enterSupplementEdit:C,saveDetailSupplement:P,doRetryIssue:T,doCancelIssue:I,doRestartIssue:H,doRetryFromPhase:R,doApprovePlan:k,doRejectPlan:v,doSkipReview:_,hasSupplementData:M}}const Uo=500,Gc=new Set(["assistant"]);function ui(){const e=F([]),t=F(!0),s=F(!1),n=F(null),r=Ie(()=>s.value?e.value:e.value.filter(f=>Gc.has(f.type)));function o(f){return fe(`agentLog.type.${f}`)||f}function l(){t.value&&js(()=>{const f=n.value;f&&(f.scrollTop=0)})}function a(f){e.value.unshift(f),e.value.length>Uo&&(e.value=e.value.slice(0,Uo)),l()}function u(f,y,x,w){y.value===f&&a({type:w.type??"raw",phase:x,timestamp:w.timestamp??new Date().toISOString(),summary:Wc(w)})}function g(f,y,x,w,C){y.value===f&&a({type:"system",phase:x,timestamp:C,summary:w})}function d(){e.value=[]}return{agentLogs:e,filteredLogs:r,agentAutoScroll:t,debugMode:s,agentLogContainer:n,agentLogLabel:o,pushLog:a,pushAgentStreamEvent:u,pushSystemLog:g,scrollToTop:l,clear:d}}function Wc(e){const t=e.content;if(!t||typeof t=="string")return String(t??"");if(e.type==="assistant"){const s=t.message??t;if(typeof s=="string")return s.slice(0,200);const n=s;return n.text?n.text.slice(0,200):n.content&&(Array.isArray(n.content)?n.content:[n.content]).filter(l=>l.type==="text").map(l=>l.text).join(" ").slice(0,200)||JSON.stringify(t).slice(0,150)}if(e.type==="tool_use"){const s=t,n=s.tool,r=n?.name??s.name??"?",o=n?.input??s.input??{},l=o.path??o.command??o.file_path??"";return r+(l?": "+l:"")}return e.type==="tool_result"?(typeof t.content=="string"?t.content:JSON.stringify(t.content??"")).slice(0,150):e.type==="result"?(t.result??JSON.stringify(t)).slice(0,200):JSON.stringify(t).slice(0,150)}function Vo(){return{requirements:"",acceptanceCriteria:"",scope:"",constraints:"",references:"",freeText:"",tapdId:""}}function Jc(e){const t=F(""),s=F([]),n=F(new Set),r=F(0),o=F(1),l=20,a=F(!1),u=F(""),g=F(null),d=F(Vo()),f=F(!1);async function y(){a.value=!0,u.value="";try{const P=await fc({search:t.value.trim()||void 0,page:o.value,perPage:l});s.value=P.issues,r.value=P.total,n.value=new Set(P.trackedIids)}catch(P){u.value=P.message}finally{a.value=!1}}function x(P){g.value=P,d.value=Vo(),f.value=!1}function w(P){return!!(P.requirements||P.acceptanceCriteria||P.scope||P.constraints||P.references||P.freeText)}async function C(P){if(g.value){f.value=!0;try{const T=g.value,I={issueId:T.id,issueIid:T.iid,issueTitle:T.title};w(d.value)&&(I.supplement=d.value),await gc(I),g.value=null,await e(),n.value.add(T.iid),P()}catch(T){alert(fe("alert.startFailed")+T.message)}finally{f.value=!1}}}return{browseSearch:t,browseIssues:s,browseTrackedIids:n,browseTotal:r,browsePage:o,browsePerPage:l,browseLoading:a,browseError:u,startDialogIssue:g,startSupplement:d,startProcessing:f,fetchGongfengIssues:y,openStartDialog:x,doStartProcessing:C,hasSupplementData:w}}function Zc(e){const{selectedIssueIid:t,onOpenIssue:s}=e;function n(){const a=new URLSearchParams(window.location.search).get("issue");if(!a)return;const u=Number(a);return Number.isFinite(u)&&u>0?u:void 0}function r(l){const a=new URL(window.location.href);l?a.searchParams.set("issue",String(l)):a.searchParams.delete("issue");const u=a.pathname+a.search,g=window.location.pathname+window.location.search;u!==g&&window.history.pushState({issueIid:l??null},"",u)}function o(l){const a=l.state?.issueIid??n();a?s(a):t.value&&(t.value=void 0)}return rt(t,l=>r(l)),Dt(()=>{window.addEventListener("popstate",o),window.history.replaceState({issueIid:n()??null},"",window.location.href)}),Lt(()=>{window.removeEventListener("popstate",o)}),{readIssueIidFromUrl:n}}function dn(e){return e?new Date(e).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"-"}function ci(e){if(!e||e<0)return"0s";const t=Math.floor(e/1e3);if(t<60)return t+"s";const s=Math.floor(t/60);return s<60?s+"m "+t%60+"s":Math.floor(s/60)+"h "+s%60+"m"}function Qc(e){return e?new Date(e).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",second:"2-digit"}):""}const Yc={class:"bg-white shadow-sm border-b border-gray-200"},Xc={class:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between"},ed={class:"flex items-center space-x-3"},td={class:"flex items-center space-x-4 text-sm text-gray-500"},sd={key:0},nd={key:1},rd={key:2},od=["disabled","title"],ld=["title"],id=Ee({__name:"HeaderBar",props:{connected:{type:Boolean},systemStatus:{}},setup(e){const{locale:t,setLocale:s}=Ht(),n=e,r=F(!0),o=F(!1);rt(()=>n.systemStatus,a=>{a&&(r.value=a.config.issueNoteSyncEnabled)},{immediate:!0});async function l(){const a=!r.value;o.value=!0;try{await mc(a),r.value=a}catch(u){console.error("Failed to toggle system note sync",u)}finally{o.value=!1}}return(a,u)=>(h(),m("header",Yc,[i("div",Xc,[i("div",ed,[u[2]||(u[2]=i("h1",{class:"text-xl font-bold text-gray-800"},"Issue Auto-Finish",-1)),i("span",{class:te(["flex items-center space-x-1 text-sm",e.connected?"text-green-600":"text-red-500"])},[i("span",{class:te(["inline-block w-2 h-2 rounded-full",e.connected?"bg-green-500 pulse-dot":"bg-red-500"])},null,2),i("span",null,p(e.connected?a.$t("header.connected"):a.$t("header.disconnected")),1)],2)]),i("div",td,[e.systemStatus?(h(),m("span",sd,p(a.$t("header.discovery"))+": "+p((e.systemStatus.config.discoveryIntervalMs/1e3).toFixed(0))+"s / "+p(a.$t("header.drive"))+": "+p((e.systemStatus.config.driveIntervalMs/1e3).toFixed(0))+"s",1)):O("",!0),e.systemStatus?(h(),m("span",nd,p(a.$t("header.uptime"))+": "+p(c(ci)(e.systemStatus.uptime)),1)):O("",!0),e.systemStatus?(h(),m("span",rd,"AI: "+p(e.systemStatus.config.aiMode),1)):O("",!0),e.systemStatus?.config.pipelineMode?(h(),m("span",{key:3,class:te(["px-2 py-0.5 rounded text-xs font-medium",e.systemStatus.config.pipelineMode==="plan-mode"?"bg-purple-100 text-purple-700":"bg-gray-100 text-gray-600"])},p(e.systemStatus.config.pipelineMode==="plan-mode"?a.$t("setup.advanced.pipelinePlanMode"):a.$t("setup.advanced.pipelineClassic")),3)):O("",!0),e.systemStatus?(h(),m("button",{key:4,class:te(["px-2 py-0.5 rounded text-xs font-medium transition-colors",r.value?"bg-green-100 text-green-700 hover:bg-green-200":"bg-gray-100 text-gray-500 hover:bg-gray-200"]),disabled:o.value,title:r.value?a.$t("header.syncOnTitle"):a.$t("header.syncOffTitle"),onClick:u[0]||(u[0]=g=>l())},p(r.value?a.$t("header.syncOn"):a.$t("header.syncOff")),11,od)):O("",!0),i("button",{class:te(["px-2 py-1 text-xs rounded",(c(t)==="zh-CN","bg-gray-200 text-gray-700")]),title:a.$t("header.langSwitch"),onClick:u[1]||(u[1]=g=>c(s)(c(t)==="zh-CN"?"en":"zh-CN"))},p(c(t)==="zh-CN"?"EN":"中文"),11,ld)])])]))}}),ad={class:"grid grid-cols-4 gap-4 mb-6"},ud={class:"bg-white rounded-lg shadow-sm p-4 border border-gray-200"},cd={class:"text-sm text-gray-500"},dd={class:"text-2xl font-bold text-gray-800"},pd={class:"bg-white rounded-lg shadow-sm p-4 border border-blue-200"},fd={class:"text-sm text-blue-500"},gd={class:"text-2xl font-bold text-blue-600"},hd={class:"bg-white rounded-lg shadow-sm p-4 border border-green-200"},md={class:"text-sm text-green-500"},bd={class:"text-2xl font-bold text-green-600"},vd={class:"bg-white rounded-lg shadow-sm p-4 border border-red-200"},yd={class:"text-sm text-red-500"},xd={class:"text-2xl font-bold text-red-600"},wd=Ee({__name:"StatsCards",props:{total:{},active:{},completed:{},failed:{}},setup(e){return(t,s)=>(h(),m("div",ad,[i("div",ud,[i("div",cd,p(t.$t("stats.total")),1),i("div",dd,p(e.total),1)]),i("div",pd,[i("div",fd,p(t.$t("stats.active")),1),i("div",gd,p(e.active),1)]),i("div",hd,[i("div",md,p(t.$t("stats.completed")),1),i("div",bd,p(e.completed),1)]),i("div",vd,[i("div",yd,p(t.$t("stats.failed")),1),i("div",xd,p(e.failed),1)])]))}}),kd={class:"mb-4 flex items-center space-x-2"},$d={class:"text-sm text-gray-600"},Sd=["onClick"],_d={class:"bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden"},Cd={class:"w-full"},Id={class:"bg-gray-50 border-b border-gray-200"},Td={key:0},Pd={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},Rd={key:0},Ad={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},Dd={key:0},Ld={key:0},Ed={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},Fd={class:"divide-y divide-gray-100"},Md={key:0},jd={colspan:"7",class:"px-4 py-8 text-center text-gray-400"},Od=["onClick"],Nd={class:"px-4 py-3 text-sm font-mono text-gray-700"},Bd=["href","title"],Ud={class:"px-4 py-3 text-sm text-gray-800 max-w-xs truncate"},Vd={class:"px-4 py-3"},Hd={class:"px-4 py-3"},zd={class:"flex items-center space-x-1"},qd=["title"],Kd={key:0},Gd={key:1,class:"pulse-dot"},Wd={key:2},Jd={key:3},Zd={class:"px-4 py-3 text-sm text-gray-600"},Qd={class:"px-4 py-3 text-sm text-gray-500"},Yd={class:"px-4 py-3"},Xd=["onClick"],ep=["onClick"],tp=["onClick"],sp=Ee({__name:"IssueTable",props:{issues:{},filter:{},systemStatus:{}},emits:["update:filter","select","retry","restart","cancel"],setup(e,{emit:t}){const s=e,n=t,{getPhaseNames:r,stateLabel:o,stateClass:l,phaseStatus:a,phaseIndicatorClass:u,phaseLabel:g}=Ns(),d=F("updatedAt"),f=F("desc"),y=Ie(()=>{const w=[...s.issues],C=f.value==="asc"?1:-1;return w.sort((P,T)=>{const I=d.value;return I==="updatedAt"?C*(new Date(P.updatedAt).getTime()-new Date(T.updatedAt).getTime()):I==="issueIid"||I==="attempts"?C*(P[I]-T[I]):C*P.state.localeCompare(T.state)})});function x(w){d.value===w?f.value=f.value==="asc"?"desc":"asc":(d.value=w,f.value=w==="updatedAt"?"desc":"asc")}return(w,C)=>(h(),m("div",null,[i("div",kd,[i("span",$d,p(w.$t("table.filter")),1),(h(!0),m(ne,null,Ae(c(zc)(),P=>(h(),m("button",{key:P.value,class:te(["px-3 py-1 rounded-full text-xs font-medium transition-colors",e.filter===P.value?"bg-gray-800 text-white":"bg-gray-200 text-gray-600 hover:bg-gray-300"]),onClick:T=>n("update:filter",P.value)},p(P.label),11,Sd))),128))]),i("div",_d,[i("table",Cd,[i("thead",Id,[i("tr",null,[i("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase cursor-pointer select-none hover:text-gray-700",onClick:C[0]||(C[0]=P=>x("issueIid"))},[C[6]||(C[6]=de(" IID ",-1)),d.value==="issueIid"?(h(),m("span",Td,p(f.value==="asc"?"▲":"▼"),1)):O("",!0)]),i("th",Pd,p(w.$t("table.title")),1),i("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase cursor-pointer select-none hover:text-gray-700",onClick:C[1]||(C[1]=P=>x("state"))},[de(p(w.$t("table.state"))+" ",1),d.value==="state"?(h(),m("span",Rd,p(f.value==="asc"?"▲":"▼"),1)):O("",!0)]),i("th",Ad,p(w.$t("table.progress")),1),i("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase cursor-pointer select-none hover:text-gray-700",onClick:C[2]||(C[2]=P=>x("attempts"))},[de(p(w.$t("table.retries"))+" ",1),d.value==="attempts"?(h(),m("span",Dd,p(f.value==="asc"?"▲":"▼"),1)):O("",!0)]),i("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase cursor-pointer select-none hover:text-gray-700",onClick:C[3]||(C[3]=P=>x("updatedAt"))},[de(p(w.$t("table.updatedAt"))+" ",1),d.value==="updatedAt"?(h(),m("span",Ld,p(f.value==="asc"?"▲":"▼"),1)):O("",!0)]),i("th",Ed,p(w.$t("table.actions")),1)])]),i("tbody",Fd,[y.value.length===0?(h(),m("tr",Md,[i("td",jd,p(w.$t("table.empty")),1)])):O("",!0),(h(!0),m(ne,null,Ae(y.value,P=>(h(),m("tr",{key:P.issueIid,class:"hover:bg-gray-50 cursor-pointer transition-colors",onClick:T=>n("select",P)},[i("td",Nd,[i("a",{href:e.systemStatus?`${e.systemStatus.config.gongfengBaseUrl}/${e.systemStatus.config.projectPath}/issues/${P.issueIid}`:"#",target:"_blank",rel:"noopener",class:"text-blue-600 hover:text-blue-800 hover:underline inline-flex items-center",onClick:C[4]||(C[4]=Nt(()=>{},["stop"])),title:w.$t("table.viewInGongfeng")},[de(" #"+p(P.issueIid)+" ",1),C[7]||(C[7]=i("svg",{class:"w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1))],8,Bd)]),i("td",Ud,p(P.issueTitle),1),i("td",Vd,[i("span",{class:te(["px-2 py-1 rounded-full text-xs font-medium",c(l)(P.state)])},p(c(o)(P.state)),3)]),i("td",Hd,[i("div",zd,[(h(!0),m(ne,null,Ae(c(r)(P),T=>(h(),m("div",{key:T,class:te(["w-6 h-6 rounded-full flex items-center justify-center text-xs",c(u)(P,T)]),title:c(g)(T)},[c(a)(P,T)==="completed"?(h(),m("span",Kd,"✓")):c(a)(P,T)==="in_progress"?(h(),m("span",Gd,"●")):c(a)(P,T)==="failed"?(h(),m("span",Wd,"✗")):(h(),m("span",Jd,"●"))],10,qd))),128))])]),i("td",Zd,p(P.attempts),1),i("td",Qd,p(c(dn)(P.updatedAt)),1),i("td",Yd,[i("div",{class:"flex space-x-2",onClick:C[5]||(C[5]=Nt(()=>{},["stop"]))},[P.state==="failed"?(h(),m("button",{key:0,class:"px-2 py-1 bg-blue-500 text-white text-xs rounded hover:bg-blue-600",onClick:T=>n("retry",P.issueIid)},p(w.$t("table.retry")),9,Xd)):O("",!0),i("button",{class:"px-2 py-1 bg-yellow-100 text-yellow-700 text-xs rounded hover:bg-yellow-200",onClick:T=>n("restart",P.issueIid)},p(w.$t("table.restart")),9,ep),i("button",{class:"px-2 py-1 bg-red-100 text-red-600 text-xs rounded hover:bg-red-200",onClick:T=>n("cancel",P.issueIid)},p(w.$t("table.cancel")),9,tp)])])],8,Od))),128))])])])]))}}),np={class:"mb-4 flex items-center space-x-3"},rp={class:"relative flex-1 max-w-md"},op=["value","placeholder"],lp=["disabled"],ip={key:0,class:"py-12 text-center text-gray-400"},ap={key:1,class:"py-8 text-center text-red-500"},up={key:2},cp={class:"bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden"},dp={class:"w-full"},pp={class:"bg-gray-50 border-b border-gray-200"},fp={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},gp={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},hp={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},mp={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},bp={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},vp={class:"divide-y divide-gray-100"},yp={key:0},xp={colspan:"6",class:"px-4 py-8 text-center text-gray-400"},wp={class:"px-4 py-3 text-sm font-mono text-gray-700"},kp=["href"],$p={class:"px-4 py-3 text-sm text-gray-800 max-w-sm truncate"},Sp={class:"px-4 py-3"},_p={class:"flex flex-wrap"},Cp={class:"px-4 py-3 text-sm text-gray-600"},Ip={class:"px-4 py-3 text-sm text-gray-500"},Tp={class:"px-4 py-3"},Pp={key:0,class:"px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-500"},Rp=["onClick"],Ap={key:0,class:"flex items-center justify-between mt-4"},Dp={class:"text-sm text-gray-500"},Lp={class:"flex space-x-2"},Ep=["disabled"],Fp=["disabled"],Mp=Ee({__name:"BrowsePanel",props:{issues:{},trackedIids:{},total:{},page:{},perPage:{},loading:{type:Boolean},error:{},search:{},systemStatus:{}},emits:["update:search","update:page","search","start"],setup(e,{emit:t}){const s=t;function n(r,o){return o?`${o.config.gongfengBaseUrl}/${o.config.projectPath}/issues/${r}`:"#"}return(r,o)=>(h(),m("div",null,[i("div",np,[i("div",rp,[i("input",{value:e.search,onInput:o[0]||(o[0]=l=>s("update:search",l.target.value)),type:"text",placeholder:r.$t("browse.searchPlaceholder"),class:"w-full pl-9 pr-4 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-400 focus:border-transparent",onKeyup:o[1]||(o[1]=ai(l=>s("search"),["enter"]))},null,40,op),o[5]||(o[5]=i("svg",{class:"absolute left-3 top-2.5 w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))]),i("button",{class:"px-4 py-2 bg-gray-800 text-white text-sm rounded-lg hover:bg-gray-700",disabled:e.loading,onClick:o[2]||(o[2]=l=>s("search"))},p(e.loading?r.$t("browse.loading"):r.$t("browse.search")),9,lp)]),e.loading?(h(),m("div",ip,[o[6]||(o[6]=i("svg",{class:"animate-spin h-6 w-6 mx-auto mb-2 text-blue-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),de(" "+p(r.$t("browse.loadingList")),1)])):e.error?(h(),m("div",ap,p(e.error),1)):(h(),m("div",up,[i("div",cp,[i("table",dp,[i("thead",pp,[i("tr",null,[o[7]||(o[7]=i("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"IID",-1)),i("th",fp,p(r.$t("browse.title")),1),i("th",gp,p(r.$t("browse.labels")),1),i("th",hp,p(r.$t("browse.author")),1),i("th",mp,p(r.$t("browse.createdAt")),1),i("th",bp,p(r.$t("browse.actions")),1)])]),i("tbody",vp,[e.issues.length===0?(h(),m("tr",yp,[i("td",xp,p(r.$t("browse.empty")),1)])):O("",!0),(h(!0),m(ne,null,Ae(e.issues,l=>(h(),m("tr",{key:l.iid,class:"hover:bg-gray-50 transition-colors"},[i("td",wp,[i("a",{href:n(l.iid,e.systemStatus),target:"_blank",rel:"noopener",class:"text-blue-600 hover:text-blue-800 hover:underline inline-flex items-center"},[de(" #"+p(l.iid)+" ",1),o[8]||(o[8]=i("svg",{class:"w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1))],8,kp)]),i("td",$p,p(l.title),1),i("td",Sp,[i("div",_p,[(h(!0),m(ne,null,Ae(l.labels,a=>(h(),m("span",{key:a,class:"label-tag bg-blue-100 text-blue-700"},p(a),1))),128))])]),i("td",Cp,p(l.author?.name||l.author?.username||"-"),1),i("td",Ip,p(c(dn)(l.created_at)),1),i("td",Tp,[e.trackedIids.has(l.iid)?(h(),m("span",Pp,p(r.$t("browse.tracked")),1)):(h(),m("button",{key:1,class:"px-3 py-1 bg-green-500 text-white text-xs rounded-lg hover:bg-green-600 font-medium",onClick:a=>s("start",l)},p(r.$t("browse.start")),9,Rp))])]))),128))])])]),e.total>e.perPage?(h(),m("div",Ap,[i("div",Dp,p(r.$t("browse.pagination",{total:e.total,page:e.page,totalPages:Math.ceil(e.total/e.perPage)})),1),i("div",Lp,[i("button",{class:"px-3 py-1 text-sm bg-white border border-gray-300 rounded hover:bg-gray-50 disabled:opacity-40",disabled:e.page<=1,onClick:o[3]||(o[3]=l=>{s("update:page",e.page-1),s("search")})},p(r.$t("browse.prevPage")),9,Ep),i("button",{class:"px-3 py-1 text-sm bg-white border border-gray-300 rounded hover:bg-gray-50 disabled:opacity-40",disabled:e.page>=Math.ceil(e.total/e.perPage),onClick:o[4]||(o[4]=l=>{s("update:page",e.page+1),s("search")})},p(r.$t("browse.nextPage")),9,Fp)])])):O("",!0)]))]))}});function jp(){const e=F("input"),t=F(null),s=F(!1),n=F(""),r=F(""),o=F(null),l=F(null),a=Ie(()=>t.value?.currentSdd??""),u=Ie(()=>t.value?.rounds??[]),g=Ie(()=>t.value?.status??"idle"),d=Ie(()=>{const k=u.value;return k.length>0?k[k.length-1].questions:""});async function f(k){n.value="",s.value=!0;try{const v=await vc(k);t.value=v.session,e.value="refine",await y()}catch(v){n.value=v.message}finally{s.value=!1}}async function y(k){if(t.value){n.value="",s.value=!0,r.value="";try{const{fetchResponse:v,abort:_}=zn(t.value.id,"auto-refine",k?{rounds:k}:void 0);l.value=_;const M=await v;if(!M.ok){const S=await M.json().catch(()=>({}));throw new Error(S.error||`HTTP ${M.status}`)}await C(M),await T()}catch(v){v.name!=="AbortError"&&(n.value=v.message)}finally{s.value=!1,l.value=null}}}async function x(){if(t.value){n.value="",s.value=!0,r.value="";try{const{fetchResponse:k,abort:v}=zn(t.value.id,"review");l.value=v;const _=await k;if(!_.ok)throw new Error(`HTTP ${_.status}`);await C(_),await T()}catch(k){k.name!=="AbortError"&&(n.value=k.message)}finally{s.value=!1,l.value=null}}}async function w(){if(t.value){n.value="",s.value=!0,r.value="";try{const{fetchResponse:k,abort:v}=zn(t.value.id,"refine");l.value=v;const _=await k;if(!_.ok)throw new Error(`HTTP ${_.status}`);await C(_),await T()}catch(k){k.name!=="AbortError"&&(n.value=k.message)}finally{s.value=!1,l.value=null}}}async function C(k){const v=k.body?.getReader();if(!v)return;const _=new TextDecoder;let M="";for(;;){const{done:S,value:L}=await v.read();if(S)break;M+=_.decode(L,{stream:!0});const q=M.split(`
|
|
4
|
+
`);M=q.pop()??"";for(const K of q)if(K.startsWith("data: "))try{const le=JSON.parse(K.slice(6));P(le)}catch{}}}function P(k){if(k.type==="sdd:chunk"||k.type==="review:chunk"){const v=k.data;if(v?.content){const _=typeof v.content=="string"?v.content:JSON.stringify(v.content);r.value+=_+`
|
|
5
|
+
`}}if(k.type==="sdd:complete"){const v=k.data;v?.sdd&&t.value&&(t.value.currentSdd=v.sdd)}if(k.type==="review:complete"){const v=k.data;v&&t.value&&(t.value.rounds.find(M=>M.round===v.round)||t.value.rounds.push({round:v.round??t.value.rounds.length+1,questions:v.questions??"",refinedSdd:""}))}if(k.type==="round:complete"){const v=k.data;if(v?.sdd&&t.value){t.value.currentSdd=v.sdd;const _=t.value.rounds.find(M=>M.round===v.round);_&&(_.refinedSdd=v.sdd)}r.value=""}if(k.type==="round:start"&&(r.value=""),k.type==="error"){const v=k.data;n.value=v?.message??"Unknown error"}}async function T(){if(t.value)try{const k=await yc(t.value.id);t.value=k.session}catch{}}async function I(k,v){if(t.value){n.value="",s.value=!0;try{const _=await xc(t.value.id,k,v);o.value=_.issue,e.value="complete"}catch(_){n.value=_.message}finally{s.value=!1}}}function H(){l.value?.()}function R(){t.value=null,e.value="input",s.value=!1,n.value="",r.value="",o.value=null,l.value=null}return{step:e,session:t,loading:s,error:n,streamOutput:r,createdIssue:o,currentSdd:a,rounds:u,status:g,lastQuestions:d,startSession:f,runAutoRefine:y,runSingleReview:x,runSingleRefine:w,createIssue:I,abort:H,reset:R}}function Op(){const e=F(!1),t=F(""),s=F(""),n=F(!1),r=F("");let o=null;const l=window.SpeechRecognition||window.webkitSpeechRecognition;n.value=!!l;function a(f="zh-CN"){if(!l){r.value="当前浏览器不支持语音识别,请使用 Chrome 或 Edge";return}r.value="",o=new l,o.continuous=!0,o.interimResults=!0,o.lang=f,o.onresult=y=>{let x="",w="";for(let C=y.resultIndex;C<y.results.length;C++){const P=y.results[C];P.isFinal?x+=P[0].transcript:w+=P[0].transcript}x&&(t.value+=x),s.value=w},o.onerror=y=>{y.error!=="no-speech"&&y.error!=="aborted"&&(r.value=`语音识别错误: ${y.error}`),e.value=!1},o.onend=()=>{e.value=!1,s.value=""},o.start(),e.value=!0}function u(){o&&(o.stop(),o=null),e.value=!1}function g(f="zh-CN"){e.value?u():a(f)}function d(){t.value="",s.value=""}return Lt(()=>{o&&(o.abort(),o=null)}),{isRecording:e,transcript:t,interimText:s,isSupported:n,error:r,startRecording:a,stopRecording:u,toggleRecording:g,clearTranscript:d}}const Np={class:"space-y-4"},Bp={class:"flex items-center gap-3"},Up={key:0,class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},Vp={key:1,class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},Hp={key:1,class:"text-sm text-amber-600"},zp={key:0,class:"flex items-center gap-2 text-sm text-red-500"},qp={key:0,class:"text-gray-400 italic ml-2 truncate max-w-md"},Kp={class:"block text-sm font-medium text-gray-700 mb-1"},Gp=["placeholder"],Wp={key:1,class:"text-sm text-red-500"},Jp={class:"flex justify-end"},Zp=["disabled"],Qp=Ee({__name:"VoiceRecorder",emits:["submit"],setup(e,{emit:t}){const{t:s}=Ht(),n=t,{isRecording:r,transcript:o,interimText:l,isSupported:a,error:u,toggleRecording:g,clearTranscript:d}=Op();function f(){const y=o.value.trim();y&&n("submit",y)}return(y,x)=>(h(),m("div",Np,[i("div",Bp,[c(a)?(h(),m("button",{key:0,class:te(["inline-flex items-center gap-2 px-4 py-2.5 rounded-lg font-medium text-sm transition-all",c(r)?"bg-red-500 text-white hover:bg-red-600 animate-pulse":"bg-gray-800 text-white hover:bg-gray-700"]),onClick:x[0]||(x[0]=w=>c(g)())},[c(r)?(h(),m("svg",Vp,[...x[4]||(x[4]=[i("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"},null,-1)])])):(h(),m("svg",Up,[...x[3]||(x[3]=[i("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"},null,-1),i("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"},null,-1)])])),de(" "+p(c(r)?c(s)("brainstorm.stopRecording"):c(s)("brainstorm.startRecording")),1)],2)):O("",!0),c(a)?O("",!0):(h(),m("span",Hp,p(c(s)("brainstorm.voiceNotSupported")),1)),c(o).trim()?(h(),m("button",{key:2,class:"text-sm text-gray-500 hover:text-gray-700 underline",onClick:x[1]||(x[1]=w=>c(d)())},p(c(s)("brainstorm.clear")),1)):O("",!0)]),c(r)?(h(),m("div",zp,[x[5]||(x[5]=i("span",{class:"relative flex h-2.5 w-2.5"},[i("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-red-400 opacity-75"}),i("span",{class:"relative inline-flex rounded-full h-2.5 w-2.5 bg-red-500"})],-1)),de(" "+p(c(s)("brainstorm.recording"))+" ",1),c(l)?(h(),m("span",qp,p(c(l)),1)):O("",!0)])):O("",!0),i("div",null,[i("label",Kp,p(c(s)("brainstorm.transcriptLabel")),1),ue(i("textarea",{"onUpdate:modelValue":x[2]||(x[2]=w=>Le(o)?o.value=w:null),rows:"10",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-gray-800 focus:border-transparent resize-y",placeholder:c(s)("brainstorm.transcriptPlaceholder")},null,8,Gp),[[he,c(o)]])]),c(u)?(h(),m("div",Wp,p(c(u)),1)):O("",!0),i("div",Jp,[i("button",{class:"px-6 py-2.5 bg-gray-800 text-white rounded-lg text-sm font-medium hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",disabled:!c(o).trim(),onClick:f},p(c(s)("brainstorm.startGenerate")),9,Zp)])]))}});function Rr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ts=Rr();function di(e){ts=e}var Qt={exec:()=>null};function ge(e,t=""){let s=typeof e=="string"?e:e.source,n={replace:(r,o)=>{let l=typeof o=="string"?o:o.source;return l=l.replace(Ve.caret,"$1"),s=s.replace(r,l),n},getRegex:()=>new RegExp(s,t)};return n}var Yp=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Ve={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Xp=/^(?:[ \t]*(?:\n|$))+/,ef=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,tf=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Bs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,sf=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ar=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,pi=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,fi=ge(pi).replace(/bull/g,Ar).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),nf=ge(pi).replace(/bull/g,Ar).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Dr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rf=/^[^\n]+/,Lr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,of=ge(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Lr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),lf=ge(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ar).getRegex(),An="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Er=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,af=ge("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Er).replace("tag",An).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),gi=ge(Dr).replace("hr",Bs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",An).getRegex(),uf=ge(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",gi).getRegex(),Fr={blockquote:uf,code:ef,def:of,fences:tf,heading:sf,hr:Bs,html:af,lheading:fi,list:lf,newline:Xp,paragraph:gi,table:Qt,text:rf},Ho=ge("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Bs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",An).getRegex(),cf={...Fr,lheading:nf,table:Ho,paragraph:ge(Dr).replace("hr",Bs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ho).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",An).getRegex()},df={...Fr,html:ge(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Er).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Qt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ge(Dr).replace("hr",Bs).replace("heading",` *#{1,6} *[^
|
|
6
|
+
]`).replace("lheading",fi).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},pf=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ff=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,hi=/^( {2,}|\\)\n(?!\s*$)/,gf=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Dn=/[\p{P}\p{S}]/u,Mr=/[\s\p{P}\p{S}]/u,mi=/[^\s\p{P}\p{S}]/u,hf=ge(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Mr).getRegex(),bi=/(?!~)[\p{P}\p{S}]/u,mf=/(?!~)[\s\p{P}\p{S}]/u,bf=/(?:[^\s\p{P}\p{S}]|~)/u,vi=/(?![*_])[\p{P}\p{S}]/u,vf=/(?![*_])[\s\p{P}\p{S}]/u,yf=/(?:[^\s\p{P}\p{S}]|[*_])/u,xf=ge(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Yp?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),yi=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,wf=ge(yi,"u").replace(/punct/g,Dn).getRegex(),kf=ge(yi,"u").replace(/punct/g,bi).getRegex(),xi="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",$f=ge(xi,"gu").replace(/notPunctSpace/g,mi).replace(/punctSpace/g,Mr).replace(/punct/g,Dn).getRegex(),Sf=ge(xi,"gu").replace(/notPunctSpace/g,bf).replace(/punctSpace/g,mf).replace(/punct/g,bi).getRegex(),_f=ge("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,mi).replace(/punctSpace/g,Mr).replace(/punct/g,Dn).getRegex(),Cf=ge(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,vi).getRegex(),If="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Tf=ge(If,"gu").replace(/notPunctSpace/g,yf).replace(/punctSpace/g,vf).replace(/punct/g,vi).getRegex(),Pf=ge(/\\(punct)/,"gu").replace(/punct/g,Dn).getRegex(),Rf=ge(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Af=ge(Er).replace("(?:-->|$)","-->").getRegex(),Df=ge("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Af).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),pn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Lf=ge(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",pn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),wi=ge(/^!?\[(label)\]\[(ref)\]/).replace("label",pn).replace("ref",Lr).getRegex(),ki=ge(/^!?\[(ref)\](?:\[\])?/).replace("ref",Lr).getRegex(),Ef=ge("reflink|nolink(?!\\()","g").replace("reflink",wi).replace("nolink",ki).getRegex(),zo=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,jr={_backpedal:Qt,anyPunctuation:Pf,autolink:Rf,blockSkip:xf,br:hi,code:ff,del:Qt,delLDelim:Qt,delRDelim:Qt,emStrongLDelim:wf,emStrongRDelimAst:$f,emStrongRDelimUnd:_f,escape:pf,link:Lf,nolink:ki,punctuation:hf,reflink:wi,reflinkSearch:Ef,tag:Df,text:gf,url:Qt},Ff={...jr,link:ge(/^!?\[(label)\]\((.*?)\)/).replace("label",pn).getRegex(),reflink:ge(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",pn).getRegex()},ar={...jr,emStrongRDelimAst:Sf,emStrongLDelim:kf,delLDelim:Cf,delRDelim:Tf,url:ge(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",zo).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ge(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",zo).getRegex()},Mf={...ar,br:ge(hi).replace("{2,}","*").getRegex(),text:ge(ar.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},qs={normal:Fr,gfm:cf,pedantic:df},ms={normal:jr,gfm:ar,breaks:Mf,pedantic:Ff},jf={"&":"&","<":"<",">":">",'"':""","'":"'"},qo=e=>jf[e];function dt(e,t){if(t){if(Ve.escapeTest.test(e))return e.replace(Ve.escapeReplace,qo)}else if(Ve.escapeTestNoEncode.test(e))return e.replace(Ve.escapeReplaceNoEncode,qo);return e}function Ko(e){try{e=encodeURI(e).replace(Ve.percentDecode,"%")}catch{return null}return e}function Go(e,t){let s=e.replace(Ve.findPipe,(o,l,a)=>{let u=!1,g=l;for(;--g>=0&&a[g]==="\\";)u=!u;return u?"|":" |"}),n=s.split(Ve.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(Ve.slashPipe,"|");return n}function bs(e,t,s){let n=e.length;if(n===0)return"";let r=0;for(;r<n&&e.charAt(n-r-1)===t;)r++;return e.slice(0,n-r)}function Of(e,t){if(e.indexOf(t[1])===-1)return-1;let s=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])s++;else if(e[n]===t[1]&&(s--,s<0))return n;return s>0?-2:-1}function Nf(e,t=0){let s=t,n="";for(let r of e)if(r===" "){let o=4-s%4;n+=" ".repeat(o),s+=o}else n+=r,s++;return n}function Wo(e,t,s,n,r){let o=t.href,l=t.title||null,a=e[1].replace(r.other.outputLinkReplace,"$1");n.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:s,href:o,title:l,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,u}function Bf(e,t,s){let n=e.match(s.other.indentCodeCompensation);if(n===null)return t;let r=n[1];return t.split(`
|
|
7
7
|
`).map(o=>{let l=o.match(s.other.beginningSpace);if(l===null)return o;let[a]=l;return a.length>=r.length?o.slice(r.length):o}).join(`
|
|
8
|
-
`)}var fn=class{options;rules;lexer;constructor(e){this.options=e||
|
|
8
|
+
`)}var fn=class{options;rules;lexer;constructor(e){this.options=e||ts}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let s=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?s:bs(s,`
|
|
9
9
|
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let s=t[0],n=Bf(s,t[3]||"",this.rules);return{type:"code",raw:s,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let s=t[2].trim();if(this.rules.other.endingHash.test(s)){let n=bs(s,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(s=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:s,tokens:this.lexer.inline(s)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:bs(t[0],`
|
|
10
10
|
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let s=bs(t[0],`
|
|
11
11
|
`).split(`
|
|
@@ -21,13 +21,13 @@ ${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
21
21
|
`);continue}}return{type:"blockquote",raw:n,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let s=t[1].trim(),n=s.length>1,r={type:"list",raw:"",ordered:n,start:n?+s.slice(0,-1):"",loose:!1,items:[]};s=n?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=n?s:"[*+-]");let o=this.rules.other.listItemRegex(s),l=!1;for(;e;){let u=!1,g="",d="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;g=t[0],e=e.substring(g.length);let f=Nf(t[2].split(`
|
|
22
22
|
`,1)[0],t[1].length),y=e.split(`
|
|
23
23
|
`,1)[0],x=!f.trim(),w=0;if(this.options.pedantic?(w=2,d=f.trimStart()):x?w=t[1].length+1:(w=f.search(this.rules.other.nonSpaceChar),w=w>4?1:w,d=f.slice(w),w+=t[1].length),x&&this.rules.other.blankLine.test(y)&&(g+=y+`
|
|
24
|
-
`,e=e.substring(y.length+1),u=!0),!u){let C=this.rules.other.nextBulletRegex(w),P=this.rules.other.hrRegex(w),
|
|
25
|
-
`,1)[0],v;if(y=k,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting," "),v=y):v=y.replace(this.rules.other.tabCharGlobal," "),
|
|
26
|
-
`+v.slice(w);else{if(x||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||
|
|
24
|
+
`,e=e.substring(y.length+1),u=!0),!u){let C=this.rules.other.nextBulletRegex(w),P=this.rules.other.hrRegex(w),T=this.rules.other.fencesBeginRegex(w),I=this.rules.other.headingBeginRegex(w),H=this.rules.other.htmlBeginRegex(w),R=this.rules.other.blockquoteBeginRegex(w);for(;e;){let k=e.split(`
|
|
25
|
+
`,1)[0],v;if(y=k,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting," "),v=y):v=y.replace(this.rules.other.tabCharGlobal," "),T.test(y)||I.test(y)||H.test(y)||R.test(y)||C.test(y)||P.test(y))break;if(v.search(this.rules.other.nonSpaceChar)>=w||!y.trim())d+=`
|
|
26
|
+
`+v.slice(w);else{if(x||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(f)||I.test(f)||P.test(f))break;d+=`
|
|
27
27
|
`+y}x=!y.trim(),g+=k+`
|
|
28
28
|
`,e=e.substring(k.length+1),f=v.slice(w)}}r.loose||(l?r.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(l=!0)),r.items.push({type:"list_item",raw:g,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),r.raw+=g}let a=r.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let u of r.items){if(this.lexer.state.top=!1,u.tokens=this.lexer.blockTokens(u.text,[]),u.task){if(u.text=u.text.replace(this.rules.other.listReplaceTask,""),u.tokens[0]?.type==="text"||u.tokens[0]?.type==="paragraph"){u.tokens[0].raw=u.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),u.tokens[0].text=u.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let d=this.lexer.inlineQueue.length-1;d>=0;d--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)){this.lexer.inlineQueue[d].src=this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask,"");break}}let g=this.rules.other.listTaskCheckbox.exec(u.raw);if(g){let d={type:"checkbox",raw:g[0]+" ",checked:g[0]!=="[ ]"};u.checked=d.checked,r.loose?u.tokens[0]&&["paragraph","text"].includes(u.tokens[0].type)&&"tokens"in u.tokens[0]&&u.tokens[0].tokens?(u.tokens[0].raw=d.raw+u.tokens[0].raw,u.tokens[0].text=d.raw+u.tokens[0].text,u.tokens[0].tokens.unshift(d)):u.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):u.tokens.unshift(d)}}if(!r.loose){let g=u.tokens.filter(f=>f.type==="space"),d=g.length>0&&g.some(f=>this.rules.other.anyLine.test(f.raw));r.loose=d}}if(r.loose)for(let u of r.items){u.loose=!0;for(let g of u.tokens)g.type==="text"&&(g.type="paragraph")}return r}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let s=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:s,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let s=Go(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
29
29
|
`):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(s.length===n.length){for(let l of n)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<s.length;l++)o.header.push({text:s[l],tokens:this.lexer.inline(s[l]),header:!0,align:o.align[l]});for(let l of r)o.rows.push(Go(l,o.header.length).map((a,u)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:o.align[u]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let s=t[1].charAt(t[1].length-1)===`
|
|
30
|
-
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:s,tokens:this.lexer.inline(s)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let s=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;let o=bs(s.slice(0,-1),"\\");if((s.length-o.length)%2===0)return}else{let o=Of(t[2],"()");if(o===-2)return;if(o>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(n);o&&(n=o[1],r=o[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(s)?n=n.slice(1):n=n.slice(1,-1)),Wo(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let s;if((s=this.rules.inline.reflink.exec(e))||(s=this.rules.inline.nolink.exec(e))){let n=(s[2]||s[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[n.toLowerCase()];if(!r){let o=s[0].charAt(0);return{type:"text",raw:o,text:o}}return Wo(s,r,s[0],this.lexer,this.rules)}}emStrong(e,t,s=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&s.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!s||this.rules.inline.punctuation.exec(s))){let r=[...n[0]].length-1,o,l,a=r,u=0,g=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(g.lastIndex=0,t=t.slice(-1*e.length+r);(n=g.exec(t))!=null;){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(l=[...o].length,n[3]||n[4]){a+=l;continue}else if((n[5]||n[6])&&r%3&&!((r+l)%3)){u+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a+u);let d=[...n[0]][0].length,f=e.slice(0,r+n.index+d+l);if(Math.min(r,l)%2){let x=f.slice(1,-1);return{type:"em",raw:f,text:x,tokens:this.lexer.inlineTokens(x)}}let y=f.slice(2,-2);return{type:"strong",raw:f,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let s=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(s),r=this.rules.other.startingSpaceChar.test(s)&&this.rules.other.endingSpaceChar.test(s);return n&&r&&(s=s.substring(1,s.length-1)),{type:"codespan",raw:t[0],text:s}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,s=""){let n=this.rules.inline.delLDelim.exec(e);if(n&&(!n[1]||!s||this.rules.inline.punctuation.exec(s))){let r=[...n[0]].length-1,o,l,a=r,u=this.rules.inline.delRDelim;for(u.lastIndex=0,t=t.slice(-1*e.length+r);(n=u.exec(t))!=null;){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o||(l=[...o].length,l!==r))continue;if(n[3]||n[4]){a+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a);let g=[...n[0]][0].length,d=e.slice(0,r+n.index+g+l),f=d.slice(r,-r);return{type:"del",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let s,n;return t[2]==="@"?(s=t[1],n="mailto:"+s):(s=t[1],n=s),{type:"link",raw:t[0],text:s,href:n,tokens:[{type:"text",raw:s,text:s}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let s,n;if(t[2]==="@")s=t[0],n="mailto:"+s;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(r!==t[0]);s=t[0],t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:s,href:n,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let s=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:s}}}},
|
|
30
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:s,tokens:this.lexer.inline(s)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let s=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;let o=bs(s.slice(0,-1),"\\");if((s.length-o.length)%2===0)return}else{let o=Of(t[2],"()");if(o===-2)return;if(o>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(n);o&&(n=o[1],r=o[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(s)?n=n.slice(1):n=n.slice(1,-1)),Wo(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let s;if((s=this.rules.inline.reflink.exec(e))||(s=this.rules.inline.nolink.exec(e))){let n=(s[2]||s[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[n.toLowerCase()];if(!r){let o=s[0].charAt(0);return{type:"text",raw:o,text:o}}return Wo(s,r,s[0],this.lexer,this.rules)}}emStrong(e,t,s=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&s.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!s||this.rules.inline.punctuation.exec(s))){let r=[...n[0]].length-1,o,l,a=r,u=0,g=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(g.lastIndex=0,t=t.slice(-1*e.length+r);(n=g.exec(t))!=null;){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(l=[...o].length,n[3]||n[4]){a+=l;continue}else if((n[5]||n[6])&&r%3&&!((r+l)%3)){u+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a+u);let d=[...n[0]][0].length,f=e.slice(0,r+n.index+d+l);if(Math.min(r,l)%2){let x=f.slice(1,-1);return{type:"em",raw:f,text:x,tokens:this.lexer.inlineTokens(x)}}let y=f.slice(2,-2);return{type:"strong",raw:f,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let s=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(s),r=this.rules.other.startingSpaceChar.test(s)&&this.rules.other.endingSpaceChar.test(s);return n&&r&&(s=s.substring(1,s.length-1)),{type:"codespan",raw:t[0],text:s}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,s=""){let n=this.rules.inline.delLDelim.exec(e);if(n&&(!n[1]||!s||this.rules.inline.punctuation.exec(s))){let r=[...n[0]].length-1,o,l,a=r,u=this.rules.inline.delRDelim;for(u.lastIndex=0,t=t.slice(-1*e.length+r);(n=u.exec(t))!=null;){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o||(l=[...o].length,l!==r))continue;if(n[3]||n[4]){a+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a);let g=[...n[0]][0].length,d=e.slice(0,r+n.index+g+l),f=d.slice(r,-r);return{type:"del",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let s,n;return t[2]==="@"?(s=t[1],n="mailto:"+s):(s=t[1],n=s),{type:"link",raw:t[0],text:s,href:n,tokens:[{type:"text",raw:s,text:s}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let s,n;if(t[2]==="@")s=t[0],n="mailto:"+s;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(r!==t[0]);s=t[0],t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:s,href:n,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let s=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:s}}}},tt=class ur{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ts,this.options.tokenizer=this.options.tokenizer||new fn,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let s={other:Ve,block:qs.normal,inline:ms.normal};this.options.pedantic?(s.block=qs.pedantic,s.inline=ms.pedantic):this.options.gfm&&(s.block=qs.gfm,this.options.breaks?s.inline=ms.breaks:s.inline=ms.gfm),this.tokenizer.rules=s}static get rules(){return{block:qs,inline:ms}}static lex(t,s){return new ur(s).lex(t)}static lexInline(t,s){return new ur(s).inlineTokens(t)}lex(t){t=t.replace(Ve.carriageReturn,`
|
|
31
31
|
`),this.blockTokens(t,this.tokens);for(let s=0;s<this.inlineQueue.length;s++){let n=this.inlineQueue[s];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,s=[],n=!1){for(this.options.pedantic&&(t=t.replace(Ve.tabCharGlobal," ").replace(Ve.spaceLine,""));t;){let r;if(this.options.extensions?.block?.some(l=>(r=l.call({lexer:this},t,s))?(t=t.substring(r.raw.length),s.push(r),!0):!1))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);let l=s.at(-1);r.raw.length===1&&l!==void 0?l.raw+=`
|
|
32
32
|
`:s.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);let l=s.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
33
33
|
`)?"":`
|
|
@@ -41,9 +41,9 @@ ${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
41
41
|
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):s.push(r),n=o.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);let l=s.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
42
42
|
`)?"":`
|
|
43
43
|
`)+r.raw,l.text+=`
|
|
44
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):s.push(r);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,s}inline(t,s=[]){return this.inlineQueue.push({src:t,tokens:s}),s}inlineTokens(t,s=[]){let n=t,r=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)u.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)o=r[2]?r[2].length:0,n=n.slice(0,r.index+o)+"["+"a".repeat(r[0].length-o-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let l=!1,a="";for(;t;){l||(a=""),l=!1;let u;if(this.options.extensions?.inline?.some(d=>(u=d.call({lexer:this},t,s))?(t=t.substring(u.raw.length),s.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let d=s.at(-1);u.type==="text"&&d?.type==="text"?(d.raw+=u.raw,d.text+=u.text):s.push(u);continue}if(u=this.tokenizer.emStrong(t,n,a)){t=t.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.del(t,n,a)){t=t.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),s.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),s.push(u);continue}let g=t;if(this.options.extensions?.startInline){let d=1/0,f=t.slice(1),y;this.options.extensions.startInline.forEach(x=>{y=x.call({lexer:this},f),typeof y=="number"&&y>=0&&(d=Math.min(d,y))}),d<1/0&&d>=0&&(g=t.substring(0,d+1))}if(u=this.tokenizer.inlineText(g)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(a=u.raw.slice(-1)),l=!0;let d=s.at(-1);d?.type==="text"?(d.raw+=u.raw,d.text+=u.text):s.push(u);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return s}},gn=class{options;parser;constructor(e){this.options=e||
|
|
45
|
-
`;return n?'<pre><code class="language-'+
|
|
46
|
-
`:"<pre><code>"+(s?r:
|
|
44
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):s.push(r);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,s}inline(t,s=[]){return this.inlineQueue.push({src:t,tokens:s}),s}inlineTokens(t,s=[]){let n=t,r=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)u.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)o=r[2]?r[2].length:0,n=n.slice(0,r.index+o)+"["+"a".repeat(r[0].length-o-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let l=!1,a="";for(;t;){l||(a=""),l=!1;let u;if(this.options.extensions?.inline?.some(d=>(u=d.call({lexer:this},t,s))?(t=t.substring(u.raw.length),s.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let d=s.at(-1);u.type==="text"&&d?.type==="text"?(d.raw+=u.raw,d.text+=u.text):s.push(u);continue}if(u=this.tokenizer.emStrong(t,n,a)){t=t.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.del(t,n,a)){t=t.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),s.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),s.push(u);continue}let g=t;if(this.options.extensions?.startInline){let d=1/0,f=t.slice(1),y;this.options.extensions.startInline.forEach(x=>{y=x.call({lexer:this},f),typeof y=="number"&&y>=0&&(d=Math.min(d,y))}),d<1/0&&d>=0&&(g=t.substring(0,d+1))}if(u=this.tokenizer.inlineText(g)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(a=u.raw.slice(-1)),l=!0;let d=s.at(-1);d?.type==="text"?(d.raw+=u.raw,d.text+=u.text):s.push(u);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return s}},gn=class{options;parser;constructor(e){this.options=e||ts}space(e){return""}code({text:e,lang:t,escaped:s}){let n=(t||"").match(Ve.notSpaceStart)?.[0],r=e.replace(Ve.endingNewline,"")+`
|
|
45
|
+
`;return n?'<pre><code class="language-'+dt(n)+'">'+(s?r:dt(r,!0))+`</code></pre>
|
|
46
|
+
`:"<pre><code>"+(s?r:dt(r,!0))+`</code></pre>
|
|
47
47
|
`}blockquote({tokens:e}){return`<blockquote>
|
|
48
48
|
${this.parser.parse(e)}</blockquote>
|
|
49
49
|
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
@@ -59,9 +59,9 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
59
59
|
`}tablerow({text:e}){return`<tr>
|
|
60
60
|
${e}</tr>
|
|
61
61
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),s=e.header?"th":"td";return(e.align?`<${s} align="${e.align}">`:`<${s}>`)+t+`</${s}>
|
|
62
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${
|
|
63
|
-
Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error occurred:</p><pre>"+ft(s.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(s);throw s}}},Yt=new Uf;function xe(e,t){return Yt.parse(e,t)}xe.options=xe.setOptions=function(e){return Yt.setOptions(e),xe.defaults=Yt.defaults,di(xe.defaults),xe};xe.getDefaults=Rr;xe.defaults=Xt;xe.use=function(...e){return Yt.use(...e),xe.defaults=Yt.defaults,di(xe.defaults),xe};xe.walkTokens=function(e,t){return Yt.walkTokens(e,t)};xe.parseInline=Yt.parseInline;xe.Parser=nt;xe.parser=nt.parse;xe.Renderer=gn;xe.TextRenderer=Or;xe.Lexer=st;xe.lexer=st.lex;xe.Tokenizer=fn;xe.Hooks=ys;xe.parse=xe;xe.options;xe.setOptions;xe.use;xe.walkTokens;xe.parseInline;nt.parse;st.lex;const Vf={class:"space-y-4"},Hf={class:"flex items-center justify-between"},zf={class:"flex items-center gap-3"},qf={class:"text-sm font-medium text-gray-700"},Kf={key:0,class:"inline-flex items-center gap-1.5 text-sm text-amber-600"},Gf={class:"flex gap-2"},Wf={class:"grid grid-cols-1 lg:grid-cols-5 gap-4"},Jf={class:"lg:col-span-3 border border-gray-200 rounded-lg overflow-hidden"},Zf={class:"bg-gray-50 px-4 py-2 border-b border-gray-200"},Qf={class:"text-sm font-medium text-gray-700"},Yf={class:"p-4 max-h-[600px] overflow-y-auto"},Xf=["innerHTML"],eg={key:1,class:"text-sm text-gray-600 whitespace-pre-wrap font-mono"},tg={key:2,class:"text-sm text-gray-400 italic"},sg={class:"lg:col-span-2 border border-gray-200 rounded-lg overflow-hidden"},ng={class:"bg-gray-50 px-4 py-2 border-b border-gray-200"},rg={class:"text-sm font-medium text-gray-700"},og={class:"p-4 max-h-[600px] overflow-y-auto"},lg=["innerHTML"],ig={key:1,class:"text-sm text-gray-600 whitespace-pre-wrap font-mono"},ag={key:2,class:"text-sm text-gray-400 italic"},ug={key:0},cg={class:"group"},dg={class:"cursor-pointer text-sm text-gray-500 hover:text-gray-700"},pg={class:"mt-2 space-y-2"},fg={class:"text-xs font-medium text-gray-500 mb-1"},gg={class:"text-xs text-gray-600 line-clamp-3"},hg=Fe({__name:"SddViewer",props:{sdd:{},rounds:{},streamOutput:{},loading:{type:Boolean},status:{}},emits:["runReview","runRefine","runAutoRefine","abort","finish"],setup(e,{emit:t}){const{t:s}=Vt(),n=e,r=t,o=Ce(()=>n.sdd?xe(n.sdd):""),l=Ce(()=>{const u=n.rounds;return u.length>0?u[u.length-1].questions:""}),a=Ce(()=>l.value?xe(l.value):"");return(u,g)=>(h(),m("div",Vf,[i("div",Hf,[i("div",zf,[i("span",qf,p(c(s)("brainstorm.roundCount",{count:e.rounds.length})),1),e.loading?(h(),m("span",Kf,[g[4]||(g[4]=i("svg",{class:"animate-spin h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),de(" "+p(e.status==="generating"?c(s)("brainstorm.statusGenerating"):e.status==="reviewing"?c(s)("brainstorm.statusReviewing"):e.status==="refining"?c(s)("brainstorm.statusRefining"):c(s)("brainstorm.statusProcessing")),1)])):O("",!0)]),i("div",Gf,[e.loading?(h(),m("button",{key:0,class:"px-3 py-1.5 text-sm text-red-600 border border-red-300 rounded-lg hover:bg-red-50",onClick:g[0]||(g[0]=d=>r("abort"))},p(c(s)("brainstorm.abort")),1)):O("",!0),!e.loading&&e.sdd&&e.status!=="done"?(h(),m("button",{key:1,class:"px-3 py-1.5 text-sm text-gray-700 border border-gray-300 rounded-lg hover:bg-gray-50",onClick:g[1]||(g[1]=d=>r("runReview"))},p(c(s)("brainstorm.manualReview")),1)):O("",!0),!e.loading&&e.rounds.length>0&&l.value&&!e.rounds[e.rounds.length-1].refinedSdd?(h(),m("button",{key:2,class:"px-3 py-1.5 text-sm text-gray-700 border border-gray-300 rounded-lg hover:bg-gray-50",onClick:g[2]||(g[2]=d=>r("runRefine"))},p(c(s)("brainstorm.manualRefine")),1)):O("",!0),!e.loading&&e.sdd?(h(),m("button",{key:3,class:"px-3 py-1.5 text-sm bg-gray-800 text-white rounded-lg hover:bg-gray-700",onClick:g[3]||(g[3]=d=>r("finish"))},p(c(s)("brainstorm.finishAndCreate")),1)):O("",!0)])]),i("div",Wf,[i("div",Jf,[i("div",Zf,[i("h3",Qf,p(c(s)("brainstorm.sddTitle")),1)]),i("div",Yf,[o.value?(h(),m("div",{key:0,class:"prose prose-sm max-w-none",innerHTML:o.value},null,8,Xf)):e.loading&&e.streamOutput?(h(),m("div",eg,p(e.streamOutput),1)):(h(),m("div",tg,p(c(s)("brainstorm.sddEmpty")),1))])]),i("div",sg,[i("div",ng,[i("h3",rg,p(c(s)("brainstorm.questionsTitle")),1)]),i("div",og,[a.value?(h(),m("div",{key:0,class:"prose prose-sm max-w-none",innerHTML:a.value},null,8,lg)):e.loading&&e.status==="reviewing"&&e.streamOutput?(h(),m("div",ig,p(e.streamOutput),1)):(h(),m("div",ag,p(c(s)("brainstorm.questionsEmpty")),1))])])]),e.rounds.length>1?(h(),m("div",ug,[i("details",cg,[i("summary",dg,p(c(s)("brainstorm.roundHistory")),1),i("div",pg,[(h(!0),m(se,null,De(e.rounds,d=>(h(),m("div",{key:d.round,class:"border border-gray-100 rounded-lg p-3"},[i("div",fg,p(c(s)("brainstorm.roundLabel",{n:d.round})),1),i("div",gg,p(d.questions.slice(0,200))+p(d.questions.length>200?"...":""),1)]))),128))])])])):O("",!0)]))}}),mg={class:"space-y-6"},bg={class:"flex items-center gap-2 text-sm"},vg={key:0},yg={key:1},xg={key:2,class:"space-y-4"},wg={class:"block text-sm font-medium text-gray-700 mb-1"},kg=["placeholder"],$g={class:"flex items-center gap-2"},Sg={for:"auto-finish-label",class:"text-sm text-gray-700"},_g={class:"border border-gray-200 rounded-lg overflow-hidden"},Cg={class:"bg-gray-50 px-4 py-2 border-b border-gray-200 flex items-center justify-between"},Ig={class:"text-sm font-medium text-gray-700"},Tg={class:"p-4 max-h-96 overflow-y-auto"},Pg={class:"text-xs text-gray-700 whitespace-pre-wrap"},Rg={class:"flex justify-end gap-3"},Ag=["disabled"],Dg=["disabled"],Lg={key:1,class:"bg-green-50 border border-green-200 rounded-lg p-6 text-center"},Eg={class:"text-lg font-medium text-green-800 mb-1"},Fg={class:"text-sm text-green-600"},Mg={class:"mt-4"},jg={key:3,class:"bg-red-50 border border-red-200 rounded-lg p-3 text-sm text-red-700"},Og=Fe({__name:"BrainstormPanel",setup(e){const{t}=Vt(),{step:s,loading:n,error:r,streamOutput:o,createdIssue:l,currentSdd:a,rounds:u,status:g,startSession:d,runSingleReview:f,runSingleRefine:y,runAutoRefine:x,createIssue:w,abort:C,reset:P}=jp(),I=F(""),T=F(!0);function H(_){d(_)}function R(){s.value="complete"}async function k(_){await w(I.value,_?!0:T.value)}function v(){P(),I.value="",T.value=!0}return(_,M)=>(h(),m("div",mg,[i("div",bg,[i("span",{class:te(["inline-flex items-center justify-center w-6 h-6 rounded-full text-xs font-medium",c(s)==="input"?"bg-gray-800 text-white":"bg-gray-200 text-gray-500"])},"1",2),i("span",{class:te(c(s)==="input"?"text-gray-800 font-medium":"text-gray-400")},p(c(t)("brainstorm.step1")),3),M[6]||(M[6]=i("svg",{class:"w-4 h-4 text-gray-300",fill:"currentColor",viewBox:"0 0 20 20"},[i("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"})],-1)),i("span",{class:te(["inline-flex items-center justify-center w-6 h-6 rounded-full text-xs font-medium",c(s)==="refine"?"bg-gray-800 text-white":"bg-gray-200 text-gray-500"])},"2",2),i("span",{class:te(c(s)==="refine"?"text-gray-800 font-medium":"text-gray-400")},p(c(t)("brainstorm.step2")),3),M[7]||(M[7]=i("svg",{class:"w-4 h-4 text-gray-300",fill:"currentColor",viewBox:"0 0 20 20"},[i("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"})],-1)),i("span",{class:te(["inline-flex items-center justify-center w-6 h-6 rounded-full text-xs font-medium",c(s)==="complete"?"bg-gray-800 text-white":"bg-gray-200 text-gray-500"])},"3",2),i("span",{class:te(c(s)==="complete"?"text-gray-800 font-medium":"text-gray-400")},p(c(t)("brainstorm.step3")),3)]),c(s)==="input"?(h(),m("div",vg,[_e(Qp,{onSubmit:H})])):O("",!0),c(s)==="refine"?(h(),m("div",yg,[_e(hg,{sdd:c(a),rounds:c(u),"stream-output":c(o),loading:c(n),status:c(g),onRunReview:c(f),onRunRefine:c(y),onRunAutoRefine:M[0]||(M[0]=S=>c(x)()),onAbort:c(C),onFinish:R},null,8,["sdd","rounds","stream-output","loading","status","onRunReview","onRunRefine","onAbort"])])):O("",!0),c(s)==="complete"?(h(),m("div",xg,[c(l)?(h(),m("div",Lg,[M[8]||(M[8]=i("svg",{class:"w-12 h-12 mx-auto text-green-500 mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),i("h3",Eg,p(c(t)("brainstorm.issueCreated")),1),i("p",Fg," Issue #"+p(c(l).iid)+" — "+p(c(l).title),1),i("div",Mg,[i("button",{class:"px-4 py-2 text-sm bg-gray-800 text-white rounded-lg hover:bg-gray-700",onClick:v},p(c(t)("brainstorm.startNew")),1)])])):(h(),m(se,{key:0},[i("div",null,[i("label",wg,p(c(t)("brainstorm.issueTitleLabel")),1),ue(i("input",{"onUpdate:modelValue":M[1]||(M[1]=S=>I.value=S),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-gray-800 focus:border-transparent",placeholder:c(t)("brainstorm.issueTitlePlaceholder")},null,8,kg),[[he,I.value]])]),i("div",$g,[ue(i("input",{id:"auto-finish-label","onUpdate:modelValue":M[2]||(M[2]=S=>T.value=S),type:"checkbox",class:"rounded"},null,512),[[cn,T.value]]),i("label",Sg,p(c(t)("brainstorm.addAutoFinishLabel")),1)]),i("div",_g,[i("div",Cg,[i("h3",Ig,p(c(t)("brainstorm.sddPreview")),1),i("button",{class:"text-sm text-gray-500 hover:text-gray-700",onClick:M[3]||(M[3]=S=>s.value="refine")},p(c(t)("brainstorm.backToRefine")),1)]),i("div",Tg,[i("pre",Pg,p(c(a)),1)])]),i("div",Rg,[i("button",{class:"px-4 py-2 text-sm text-gray-700 border border-gray-300 rounded-lg hover:bg-gray-50",disabled:c(n),onClick:M[4]||(M[4]=S=>k(!1))},p(c(t)("brainstorm.createIssueOnly")),9,Ag),i("button",{class:"px-4 py-2 text-sm bg-gray-800 text-white rounded-lg hover:bg-gray-700 disabled:opacity-50",disabled:c(n),onClick:M[5]||(M[5]=S=>k(!0))},p(c(n)?c(t)("brainstorm.creating"):c(t)("brainstorm.createAndStart")),9,Dg)])],64))])):O("",!0),c(r)?(h(),m("div",jg,p(c(r)),1)):O("",!0)]))}});function Ng(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Bg(){const e=F([]),t=F(null),s=F(!1),n=F(""),r=F(""),o=F(""),l=F(null),a=Ce(()=>t.value?.messages??[]),u=Ce(()=>t.value?.status??"idle"),g=Ce(()=>u.value==="thinking"||s.value);async function d(){try{const R=await kc();e.value=R.sessions}catch(R){n.value=R.message}}async function f(R){n.value="";try{const k=await wc(R);return t.value=k.session,e.value.unshift(k.session),k.session}catch(k){return n.value=k.message,null}}async function y(R){n.value="";try{const k=await Eo(R);t.value=k.session}catch(k){n.value=k.message}}async function x(R){n.value="";try{await $c(R),e.value=e.value.filter(k=>k.id!==R),t.value?.id===R&&(t.value=null)}catch(k){n.value=k.message}}async function w(R){if(R.trim()&&!(!t.value&&!await f())){n.value="",s.value=!0,r.value="",o.value="";try{const k={id:Ng(),role:"user",content:R.trim(),timestamp:new Date().toISOString()};t.value.messages.push(k);const{fetchResponse:v,abort:_}=Sc(t.value.id,R.trim());l.value=_;const M=await v;if(!M.ok){const S=await M.json().catch(()=>({}));throw new Error(S.error||`HTTP ${M.status}`)}await C(M),await I()}catch(k){k.name!=="AbortError"&&(n.value=k.message)}finally{s.value=!1,l.value=null}}}async function C(R){const k=R.body?.getReader();if(!k)return;const v=new TextDecoder;let _="";for(;;){const{done:M,value:S}=await k.read();if(M)break;_+=v.decode(S,{stream:!0});const D=_.split(`
|
|
64
|
-
`);_=
|
|
65
|
-
`);ce=oe.pop()||"";for(const ne of oe)if(ne.startsWith("data: "))try{const E=JSON.parse(ne.slice(6));if(l.value=E.message||E.step,E.step==="error"){r.value=E.error;continue}E.current!=null&&E.total!=null&&(a.value={current:E.current,total:E.total,step:E.step,startedAt:E.startedAt||new Date().toISOString(),elapsed:E.elapsed??(a.value?.elapsed||0)},!Te&&E.startedAt&&(H(E.startedAt),Te=!0))}catch{}}await x(),await M()}catch(D){r.value=D.message}finally{T(),o.value=!1,a.value=null}}Et(T);async function k(S){u.value=!0,r.value="";try{await Rc(S),await x(),await M()}catch(D){r.value=D.message}finally{u.value=!1}}async function v(S,D){u.value=!0,r.value="";try{await Ac(S,D),await x(),await M()}catch(z){r.value=z.message}finally{u.value=!1}}async function _(S){n.value=!0,r.value="";try{await Dc(S),await w(S),await x()}catch(D){r.value=D.message}finally{n.value=!1}}async function M(){try{const S=await Lc();s.value=S.stats}catch{}}return{entries:e,currentEntry:t,stats:s,loading:n,error:r,analyzing:o,analyzeMessage:l,analyzeProgress:a,importing:u,filterType:d,searchQuery:f,filteredEntries:y,loadEntries:x,loadEntry:w,createEntry:C,updateEntry:P,deleteEntry:I,runAnalysis:R,importIwiki:k,extractFromGongfeng:v,syncEntry:_,loadStats:M}}const kh={class:"space-y-4"},$h={key:0,class:"bg-red-50 border border-red-200 text-red-700 px-4 py-2 rounded text-sm"},Sh={class:"flex flex-wrap items-center gap-2"},_h=["disabled"],Ch=["disabled"],Ih={class:"ml-auto flex items-center gap-2"},Th={key:1,class:"bg-white border border-blue-200 rounded-lg p-4 space-y-3"},Ph={class:"flex items-center justify-between text-sm"},Rh={class:"flex items-center gap-2"},Ah={class:"font-medium text-gray-700"},Dh={key:0,class:"text-gray-500 tabular-nums"},Lh={key:0,class:"w-full bg-gray-200 rounded-full h-2 overflow-hidden"},Eh={key:1,class:"w-full bg-gray-200 rounded-full h-2 overflow-hidden"},Fh={key:2,class:"grid grid-cols-5 gap-3"},Mh={class:"bg-white border rounded p-3 text-center"},jh={class:"text-2xl font-bold text-gray-800"},Oh={class:"bg-blue-50 border rounded p-3 text-center"},Nh={class:"text-2xl font-bold text-blue-700"},Bh={class:"bg-gray-50 border rounded p-3 text-center"},Uh={class:"text-2xl font-bold text-gray-700"},Vh={class:"bg-green-50 border rounded p-3 text-center"},Hh={class:"text-2xl font-bold text-green-700"},zh={class:"bg-orange-50 border rounded p-3 text-center"},qh={class:"text-2xl font-bold text-orange-700"},Kh={class:"bg-white border rounded divide-y"},Gh={key:0,class:"p-8 text-center text-gray-400"},Wh={key:1,class:"p-8 text-center text-gray-400"},Jh=["onClick"],Zh={class:"flex-1 min-w-0"},Qh={class:"flex items-center gap-2"},Yh={class:"font-medium text-sm text-gray-800 truncate"},Xh={class:"flex items-center gap-2 mt-1"},e0={key:0,class:"text-xs text-blue-500 truncate max-w-[200px]"},t0={class:"text-xs text-gray-400 whitespace-nowrap"},s0=["onClick"],n0=["onClick"],r0={class:"bg-white rounded-lg shadow-xl w-full max-w-3xl max-h-[85vh] flex flex-col"},o0={class:"flex items-center justify-between px-6 py-4 border-b"},l0={class:"flex items-center gap-2"},i0={class:"text-lg font-semibold"},a0={class:"flex items-center gap-2"},u0={class:"flex-1 overflow-auto p-6"},c0={key:0,class:"space-y-3"},d0={class:"flex gap-2 justify-end"},p0={key:0,class:"flex gap-1 mb-3"},f0={key:1,class:"text-xs text-gray-400 mb-3"},g0=["href"],h0={class:"prose prose-sm max-w-none whitespace-pre-wrap text-sm text-gray-700 font-mono bg-gray-50 p-4 rounded border"},m0={class:"bg-white rounded-lg shadow-xl w-full max-w-lg p-6 space-y-4"},b0={class:"flex gap-2 justify-end"},v0=["disabled"],y0={class:"bg-white rounded-lg shadow-xl w-full max-w-lg p-6 space-y-4"},x0={class:"flex gap-2 justify-end"},w0=["disabled"],k0={class:"bg-white rounded-lg shadow-xl w-full max-w-lg p-6 space-y-4"},$0={class:"flex gap-3"},S0={class:"flex items-center gap-1 text-sm"},_0={class:"flex items-center gap-1 text-sm"},C0={class:"flex gap-2 justify-end"},I0=["disabled"],T0=Fe({__name:"KnowledgePanel",setup(e){const{entries:t,currentEntry:s,stats:n,loading:r,error:o,analyzing:l,analyzeMessage:a,analyzeProgress:u,importing:g,filterType:d,searchQuery:f,filteredEntries:y,loadEntries:x,loadEntry:w,createEntry:C,updateEntry:P,deleteEntry:I,runAnalysis:T,importIwiki:H,extractFromGongfeng:R,syncEntry:k,loadStats:v}=wh(),_={collecting:"收集项目信息",analyzing:"AI 分析中",saving:"保存分析结果",done:"分析完成",no_changes:"无变更"};function M(Ie){const j=Math.floor(Ie/1e3),Q=Math.floor(j/60),b=j%60;return`${String(Q).padStart(2,"0")}:${String(b).padStart(2,"0")}`}const S=F(!1),D=F(!1),z=F(!1),K=F(!1),le=F(!1),ce=F({title:"",content:"",tags:""}),Te=F(""),ve=F("issue"),ae=F(""),oe=F({title:"",content:"",tags:""});Lt(()=>{x(),v()}),ot([d,f],()=>{x()});function ne(Ie){return{"project-meta":"项目分析",custom:"自定义",iwiki:"iwiki",gongfeng:"工蜂"}[Ie]||Ie}function E(Ie){return{"project-meta":"bg-blue-100 text-blue-800",custom:"bg-gray-100 text-gray-800",iwiki:"bg-green-100 text-green-800",gongfeng:"bg-orange-100 text-orange-800"}[Ie]||"bg-gray-100 text-gray-800"}function q(Ie){w(Ie.id),le.value=!1,K.value=!0}function L(){s.value&&(oe.value={title:s.value.title,content:s.value.content,tags:s.value.tags.join(", ")},le.value=!0)}async function Ae(){s.value&&(await P(s.value.id,{title:oe.value.title,content:oe.value.content,tags:oe.value.tags.split(",").map(Ie=>Ie.trim()).filter(Boolean)}),le.value=!1)}async function us(){await C({title:ce.value.title,content:ce.value.content,tags:ce.value.tags.split(",").map(Ie=>Ie.trim()).filter(Boolean)}),S.value=!1,ce.value={title:"",content:"",tags:""}}async function cs(){await H(Te.value),D.value=!1,Te.value=""}async function at(){await R(ve.value,parseInt(ae.value)),z.value=!1,ae.value=""}function yt(Ie){confirm('确定要删除"'+Ie.title+'"吗?')&&I(Ie.id)}function Ze(Ie){return new Date(Ie).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}return(Ie,j)=>(h(),m("div",kh,[c(o)?(h(),m("div",$h,p(c(o)),1)):O("",!0),i("div",Sh,[i("button",{class:"px-3 py-1.5 text-sm bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50",disabled:c(l),onClick:j[0]||(j[0]=Q=>c(T)(!0))},"增量分析",8,_h),i("button",{class:"px-3 py-1.5 text-sm bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",disabled:c(l),onClick:j[1]||(j[1]=Q=>c(T)(!1))},"全量分析",8,Ch),i("button",{class:"px-3 py-1.5 text-sm bg-green-600 text-white rounded hover:bg-green-700",onClick:j[2]||(j[2]=Q=>D.value=!0)},"导入 iwiki"),i("button",{class:"px-3 py-1.5 text-sm bg-orange-500 text-white rounded hover:bg-orange-600",onClick:j[3]||(j[3]=Q=>z.value=!0)},"从工蜂提炼"),i("button",{class:"px-3 py-1.5 text-sm bg-gray-600 text-white rounded hover:bg-gray-700",onClick:j[4]||(j[4]=Q=>S.value=!0)},"新建条目"),i("div",Ih,[ue(i("select",{"onUpdate:modelValue":j[5]||(j[5]=Q=>Ee(d)?d.value=Q:null),class:"px-2 py-1.5 text-sm border border-gray-300 rounded"},[...j[33]||(j[33]=[cu('<option value="all" data-v-db7fa114>全部类型</option><option value="project-meta" data-v-db7fa114>项目分析</option><option value="custom" data-v-db7fa114>自定义</option><option value="iwiki" data-v-db7fa114>iwiki</option><option value="gongfeng" data-v-db7fa114>工蜂</option>',5)])],512),[[li,c(d)]]),ue(i("input",{"onUpdate:modelValue":j[6]||(j[6]=Q=>Ee(f)?f.value=Q:null),type:"text",placeholder:"搜索标题或标签...",class:"px-3 py-1.5 text-sm border border-gray-300 rounded w-48",onKeyup:j[7]||(j[7]=ai(Q=>c(x)(),["enter"]))},null,544),[[he,c(f)]])])]),c(l)?(h(),m("div",Th,[i("div",Ph,[i("div",Rh,[j[34]||(j[34]=i("svg",{class:"animate-spin h-4 w-4 text-blue-600",viewBox:"0 0 24 24",fill:"none"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),i("span",Ah,[c(u)?(h(),m(se,{key:0},[de(" 步骤 "+p(c(u).current)+"/"+p(c(u).total)+":"+p(_[c(u).step]||c(a)),1)],64)):(h(),m(se,{key:1},[de(p(c(a)||"分析中..."),1)],64))])]),c(u)?(h(),m("span",Dh," 已耗时 "+p(M(c(u).elapsed)),1)):O("",!0)]),c(u)?(h(),m("div",Lh,[i("div",{class:te(["h-full rounded-full transition-all duration-500 ease-out",c(u).step==="analyzing"?"analyze-progress-bar-animated bg-blue-500":"bg-blue-600"]),style:yn({width:Math.round(c(u).current/c(u).total*100)+"%"})},null,6)])):(h(),m("div",Eh,[...j[35]||(j[35]=[i("div",{class:"h-full rounded-full bg-blue-500 analyze-progress-bar-animated",style:{width:"100%"}},null,-1)])]))])):O("",!0),c(n)?(h(),m("div",Fh,[i("div",Mh,[i("div",jh,p(c(n).total),1),j[36]||(j[36]=i("div",{class:"text-xs text-gray-500"},"总条目",-1))]),i("div",Oh,[i("div",Nh,p(c(n).byType["project-meta"]||0),1),j[37]||(j[37]=i("div",{class:"text-xs text-gray-500"},"项目分析",-1))]),i("div",Bh,[i("div",Uh,p(c(n).byType.custom||0),1),j[38]||(j[38]=i("div",{class:"text-xs text-gray-500"},"自定义",-1))]),i("div",Vh,[i("div",Hh,p(c(n).byType.iwiki||0),1),j[39]||(j[39]=i("div",{class:"text-xs text-gray-500"},"iwiki",-1))]),i("div",zh,[i("div",qh,p(c(n).byType.gongfeng||0),1),j[40]||(j[40]=i("div",{class:"text-xs text-gray-500"},"工蜂",-1))])])):O("",!0),i("div",Kh,[c(r)&&c(t).length===0?(h(),m("div",Gh,"加载中...")):c(y).length===0?(h(),m("div",Wh,"暂无知识条目")):O("",!0),(h(!0),m(se,null,De(c(y),Q=>(h(),m("div",{key:Q.id,class:"px-4 py-3 flex items-center gap-3 hover:bg-gray-50 cursor-pointer",onClick:b=>q(Q)},[i("div",Zh,[i("div",Qh,[i("span",Yh,p(Q.title),1),i("span",{class:te([E(Q.type),"px-1.5 py-0.5 text-xs rounded-full whitespace-nowrap"])},p(ne(Q.type)),3)]),i("div",Xh,[(h(!0),m(se,null,De(Q.tags.slice(0,3),b=>(h(),m("span",{key:b,class:"text-xs bg-gray-100 text-gray-600 px-1.5 py-0.5 rounded"},p(b),1))),128)),Q.source?.url?(h(),m("span",e0,p(Q.source.url),1)):O("",!0)])]),i("div",t0,p(Ze(Q.updatedAt)),1),i("div",{class:"flex items-center gap-1",onClick:j[8]||(j[8]=Ot(()=>{},["stop"]))},[Q.type==="iwiki"?(h(),m("button",{key:0,class:"px-2 py-1 text-xs bg-green-50 text-green-700 rounded hover:bg-green-100",onClick:b=>c(k)(Q.id)},"同步",8,s0)):O("",!0),i("button",{class:"px-2 py-1 text-xs bg-red-50 text-red-700 rounded hover:bg-red-100",onClick:b=>yt(Q)},"删除",8,n0)])],8,Jh))),128))]),K.value&&c(s)?(h(),m("div",{key:3,class:"fixed inset-0 bg-black/40 flex items-center justify-center z-50",onClick:j[16]||(j[16]=Ot(Q=>K.value=!1,["self"]))},[i("div",r0,[i("div",o0,[i("div",l0,[i("h3",i0,p(le.value?"编辑":c(s).title),1),i("span",{class:te([E(c(s).type),"px-2 py-0.5 text-xs rounded-full"])},p(ne(c(s).type)),3)]),i("div",a0,[le.value?O("",!0):(h(),m("button",{key:0,class:"px-3 py-1 text-sm bg-blue-50 text-blue-700 rounded hover:bg-blue-100",onClick:j[9]||(j[9]=Q=>L())},"编辑")),i("button",{class:"text-gray-400 hover:text-gray-600 text-xl",onClick:j[10]||(j[10]=Q=>K.value=!1)},"×")])]),i("div",u0,[le.value?(h(),m("div",c0,[ue(i("input",{"onUpdate:modelValue":j[11]||(j[11]=Q=>oe.value.title=Q),class:"w-full px-3 py-2 border rounded text-sm",placeholder:"标题"},null,512),[[he,oe.value.title]]),ue(i("input",{"onUpdate:modelValue":j[12]||(j[12]=Q=>oe.value.tags=Q),class:"w-full px-3 py-2 border rounded text-sm",placeholder:"标签(逗号分隔)"},null,512),[[he,oe.value.tags]]),ue(i("textarea",{"onUpdate:modelValue":j[13]||(j[13]=Q=>oe.value.content=Q),class:"w-full px-3 py-2 border rounded text-sm font-mono",rows:"20",placeholder:"Markdown 内容"},null,512),[[he,oe.value.content]]),i("div",d0,[i("button",{class:"px-4 py-2 text-sm bg-gray-200 rounded hover:bg-gray-300",onClick:j[14]||(j[14]=Q=>le.value=!1)},"取消"),i("button",{class:"px-4 py-2 text-sm bg-blue-600 text-white rounded hover:bg-blue-700",onClick:j[15]||(j[15]=Q=>Ae())},"保存")])])):(h(),m(se,{key:1},[c(s).tags.length?(h(),m("div",p0,[(h(!0),m(se,null,De(c(s).tags,Q=>(h(),m("span",{key:Q,class:"text-xs bg-gray-100 text-gray-600 px-2 py-0.5 rounded"},p(Q),1))),128))])):O("",!0),c(s).source?.url?(h(),m("div",f0,[j[41]||(j[41]=de(" 来源: ",-1)),i("a",{href:c(s).source.url,target:"_blank",class:"text-blue-500 hover:underline"},p(c(s).source.url),9,g0)])):O("",!0),i("div",h0,p(c(s).content),1)],64))])])])):O("",!0),S.value?(h(),m("div",{key:4,class:"fixed inset-0 bg-black/40 flex items-center justify-center z-50",onClick:j[22]||(j[22]=Ot(Q=>S.value=!1,["self"]))},[i("div",m0,[j[42]||(j[42]=i("h3",{class:"text-lg font-semibold"},"新建知识条目",-1)),ue(i("input",{"onUpdate:modelValue":j[17]||(j[17]=Q=>ce.value.title=Q),class:"w-full px-3 py-2 border rounded text-sm",placeholder:"标题"},null,512),[[he,ce.value.title]]),ue(i("input",{"onUpdate:modelValue":j[18]||(j[18]=Q=>ce.value.tags=Q),class:"w-full px-3 py-2 border rounded text-sm",placeholder:"标签(逗号分隔)"},null,512),[[he,ce.value.tags]]),ue(i("textarea",{"onUpdate:modelValue":j[19]||(j[19]=Q=>ce.value.content=Q),class:"w-full px-3 py-2 border rounded text-sm font-mono",rows:"10",placeholder:"Markdown 内容"},null,512),[[he,ce.value.content]]),i("div",b0,[i("button",{class:"px-4 py-2 text-sm bg-gray-200 rounded hover:bg-gray-300",onClick:j[20]||(j[20]=Q=>S.value=!1)},"取消"),i("button",{class:"px-4 py-2 text-sm bg-blue-600 text-white rounded hover:bg-blue-700",disabled:!ce.value.title||!ce.value.content,onClick:j[21]||(j[21]=Q=>us())},"创建",8,v0)])])])):O("",!0),D.value?(h(),m("div",{key:5,class:"fixed inset-0 bg-black/40 flex items-center justify-center z-50",onClick:j[26]||(j[26]=Ot(Q=>D.value=!1,["self"]))},[i("div",y0,[j[43]||(j[43]=i("h3",{class:"text-lg font-semibold"},"导入 iwiki 页面",-1)),ue(i("input",{"onUpdate:modelValue":j[23]||(j[23]=Q=>Te.value=Q),class:"w-full px-3 py-2 border rounded text-sm",placeholder:"输入 iwiki 页面 URL"},null,512),[[he,Te.value]]),i("div",x0,[i("button",{class:"px-4 py-2 text-sm bg-gray-200 rounded hover:bg-gray-300",onClick:j[24]||(j[24]=Q=>D.value=!1)},"取消"),i("button",{class:"px-4 py-2 text-sm bg-green-600 text-white rounded hover:bg-green-700",disabled:!Te.value||c(g),onClick:j[25]||(j[25]=Q=>cs())},p(c(g)?"导入中...":"导入"),9,w0)])])])):O("",!0),z.value?(h(),m("div",{key:6,class:"fixed inset-0 bg-black/40 flex items-center justify-center z-50",onClick:j[32]||(j[32]=Ot(Q=>z.value=!1,["self"]))},[i("div",k0,[j[46]||(j[46]=i("h3",{class:"text-lg font-semibold"},"从工蜂提炼知识",-1)),i("div",$0,[i("label",S0,[ue(i("input",{"onUpdate:modelValue":j[27]||(j[27]=Q=>ve.value=Q),type:"radio",value:"issue"},null,512),[[To,ve.value]]),j[44]||(j[44]=de(" Issue ",-1))]),i("label",_0,[ue(i("input",{"onUpdate:modelValue":j[28]||(j[28]=Q=>ve.value=Q),type:"radio",value:"mr"},null,512),[[To,ve.value]]),j[45]||(j[45]=de(" Merge Request ",-1))])]),ue(i("input",{"onUpdate:modelValue":j[29]||(j[29]=Q=>ae.value=Q),class:"w-full px-3 py-2 border rounded text-sm",placeholder:"输入 Issue/MR 编号 (IID)"},null,512),[[he,ae.value]]),i("div",C0,[i("button",{class:"px-4 py-2 text-sm bg-gray-200 rounded hover:bg-gray-300",onClick:j[30]||(j[30]=Q=>z.value=!1)},"取消"),i("button",{class:"px-4 py-2 text-sm bg-orange-500 text-white rounded hover:bg-orange-600",disabled:!ae.value||c(g),onClick:j[31]||(j[31]=Q=>at())},p(c(g)?"提炼中...":"提炼"),9,I0)])])])):O("",!0)]))}}),P0=(e,t)=>{const s=e.__vccOpts||e;for(const[n,r]of t)s[n]=r;return s},R0=P0(T0,[["__scopeId","data-v-db7fa114"]]),A0={key:0,class:"fixed inset-0 z-50 flex items-center justify-center"},D0={class:"relative bg-white rounded-xl shadow-2xl w-full max-w-xl max-h-[90vh] overflow-y-auto"},L0={class:"sticky top-0 bg-white border-b border-gray-200 px-6 py-4 flex items-center justify-between z-10 rounded-t-xl"},E0={class:"text-lg font-bold text-gray-800"},F0={class:"px-6 py-4 space-y-4"},M0={class:"text-sm text-gray-500 mb-1"},j0={class:"text-sm font-medium text-gray-800"},O0={key:0},N0={class:"text-sm text-gray-500 mb-1"},B0={class:"text-sm text-gray-600 bg-gray-50 rounded-lg p-3 max-h-32 overflow-y-auto whitespace-pre-wrap"},U0={class:"border-t border-gray-200 pt-4"},V0={class:"text-sm font-semibold text-gray-700 mb-3"},H0={class:"space-y-3"},z0={class:"block text-xs font-medium text-gray-600 mb-1"},q0=["value","placeholder"],K0={class:"block text-xs font-medium text-gray-600 mb-1"},G0=["value","placeholder"],W0={class:"block text-xs font-medium text-gray-600 mb-1"},J0=["value","placeholder"],Z0={class:"block text-xs font-medium text-gray-600 mb-1"},Q0=["value","placeholder"],Y0={class:"block text-xs font-medium text-gray-600 mb-1"},X0=["value","placeholder"],em={class:"block text-xs font-medium text-gray-600 mb-1"},tm=["value","placeholder"],sm={class:"block text-xs font-medium text-gray-600 mb-1"},nm=["value","placeholder"],rm={class:"sticky bottom-0 bg-white border-t border-gray-200 px-6 py-4 flex justify-end space-x-3 rounded-b-xl"},om=["disabled"],lm=Fe({__name:"StartDialog",props:{issue:{},supplement:{},processing:{type:Boolean}},emits:["close","start","update:supplement"],setup(e,{emit:t}){const s=e,n=t;function r(o,l){n("update:supplement",{...s.supplement,[o]:l})}return(o,l)=>(h(),tt(Pr,{name:"fade"},{default:Sn(()=>[e.issue?(h(),m("div",A0,[i("div",{class:"absolute inset-0 bg-black/30",onClick:l[0]||(l[0]=a=>n("close"))}),i("div",D0,[i("div",L0,[i("h2",E0,p(o.$t("start.title",{iid:e.issue.iid})),1),i("button",{class:"text-gray-400 hover:text-gray-600 text-2xl leading-none",onClick:l[1]||(l[1]=a=>n("close"))},"×")]),i("div",F0,[i("div",null,[i("div",M0,p(o.$t("start.issueTitle")),1),i("div",j0,p(e.issue.title),1)]),e.issue.description?(h(),m("div",O0,[i("div",N0,p(o.$t("start.descPreview")),1),i("div",B0,p(e.issue.description?.slice(0,500))+p((e.issue.description?.length||0)>500?"...":""),1)])):O("",!0),i("div",U0,[i("h3",V0,p(o.$t("start.supplement")),1),i("div",H0,[i("div",null,[i("label",z0,p(o.$t("start.requirements")),1),i("textarea",{value:e.supplement.requirements,onInput:l[2]||(l[2]=a=>r("requirements",a.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:o.$t("start.requirementsPlaceholder")},null,40,q0)]),i("div",null,[i("label",K0,p(o.$t("start.acceptance")),1),i("textarea",{value:e.supplement.acceptanceCriteria,onInput:l[3]||(l[3]=a=>r("acceptanceCriteria",a.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:o.$t("start.acceptancePlaceholder")},null,40,G0)]),i("div",null,[i("label",W0,p(o.$t("start.scope")),1),i("input",{value:e.supplement.scope,onInput:l[4]||(l[4]=a=>r("scope",a.target.value)),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:o.$t("start.scopePlaceholder")},null,40,J0)]),i("div",null,[i("label",Z0,p(o.$t("start.constraints")),1),i("textarea",{value:e.supplement.constraints,onInput:l[5]||(l[5]=a=>r("constraints",a.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:o.$t("start.constraintsPlaceholder")},null,40,Q0)]),i("div",null,[i("label",Y0,p(o.$t("start.references")),1),i("textarea",{value:e.supplement.references,onInput:l[6]||(l[6]=a=>r("references",a.target.value)),rows:"1",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:o.$t("start.referencesPlaceholder")},null,40,X0)]),i("div",null,[i("label",em,p(o.$t("start.freeText")),1),i("textarea",{value:e.supplement.freeText,onInput:l[7]||(l[7]=a=>r("freeText",a.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:o.$t("start.freeTextPlaceholder")},null,40,tm)]),i("div",null,[i("label",sm,p(o.$t("start.tapdId")),1),i("input",{value:e.supplement.tapdId,onInput:l[8]||(l[8]=a=>r("tapdId",a.target.value)),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:o.$t("start.tapdIdPlaceholder")},null,40,nm)])])])]),i("div",rm,[i("button",{class:"px-4 py-2 text-sm text-gray-600 bg-gray-100 rounded-lg hover:bg-gray-200",onClick:l[9]||(l[9]=a=>n("close"))},p(o.$t("start.cancel")),1),i("button",{class:"px-4 py-2 text-sm text-white bg-green-500 rounded-lg hover:bg-green-600 font-medium disabled:opacity-50",disabled:e.processing,onClick:l[10]||(l[10]=a=>n("start"))},p(e.processing?o.$t("start.processing"):o.$t("start.submit")),9,om)])])])):O("",!0)]),_:1}))}}),im={class:"text-base font-semibold text-gray-700 mb-3"},am={class:"flex items-center justify-between"},um={class:"flex flex-col items-center space-y-1"},cm={key:0},dm={key:1,class:"pulse-dot"},pm={key:2},fm={key:3},gm={class:"text-xs text-gray-600"},hm={key:0,class:"text-xs text-gray-400"},mm=["onClick"],bm=Fe({__name:"PipelineProgress",props:{issue:{},progress:{}},emits:["retryFromPhase"],setup(e,{emit:t}){const s=e,n=t,{getPhaseNames:r,phaseLabel:o,phaseNodeClass:l}=Ns();function a(g){return s.progress?.phases?.[g]?s.progress.phases[g].status:"pending"}function u(g){if(!s.progress?.phases)return"";const d=s.progress.phases[g];if(!d?.startedAt)return"";const f=new Date(d.startedAt),y=d.completedAt?new Date(d.completedAt):new Date;return ci(y.getTime()-f.getTime())}return(g,d)=>(h(),m("div",null,[i("h3",im,p(g.$t("pipeline.title")),1),i("div",am,[(h(!0),m(se,null,De(c(r)(e.issue),(f,y)=>(h(),m(se,{key:f},[i("div",um,[i("div",{class:te(["w-10 h-10 rounded-full flex items-center justify-center text-sm font-bold",c(l)(a(f))])},[a(f)==="completed"?(h(),m("span",cm,"✓")):a(f)==="in_progress"?(h(),m("span",dm,"●")):a(f)==="failed"?(h(),m("span",pm,"✗")):(h(),m("span",fm,p(y+1),1))],2),i("span",gm,p(c(o)(f)),1),u(f)?(h(),m("span",hm,p(u(f)),1)):O("",!0),i("button",{class:"text-xs text-blue-500 hover:text-blue-700 hover:underline mt-0.5",onClick:x=>n("retryFromPhase",f)},p(g.$t("pipeline.retryFrom")),9,mm)]),y<c(r)(e.issue).length-1?(h(),m("div",{key:0,class:te(["flex-1 h-0.5 mx-2",a(c(r)(e.issue)[y])==="completed"?"bg-green-400":"bg-gray-200"])},null,2)):O("",!0)],64))),128))])]))}}),vm={class:"bg-yellow-50 border-2 border-yellow-300 rounded-lg p-4"},ym={class:"text-base font-semibold text-yellow-800 mb-3"},xm={class:"text-sm text-yellow-700 mb-3"},wm={key:0,class:"text-yellow-600 font-medium"},km={key:0,class:"mb-4"},$m={class:"flex items-center mb-2"},Sm={class:"text-xs font-semibold text-yellow-700"},_m={class:"ml-2 px-1.5 py-0.5 text-xs bg-yellow-200 text-yellow-800 rounded-full"},Cm={class:"space-y-2 max-h-48 overflow-y-auto border border-yellow-200 rounded-lg bg-white/60 p-3"},Im={class:"flex items-baseline space-x-2 mb-0.5"},Tm={class:"text-xs font-semibold text-yellow-700"},Pm={class:"text-xs text-gray-400"},Rm={class:"text-sm text-gray-700 whitespace-pre-wrap break-words"},Am={class:"flex items-center space-x-3 mb-3"},Dm=["disabled"],Lm=["disabled"],Em={class:"space-y-2"},Fm={class:"block text-xs font-medium text-yellow-700"},Mm=["placeholder"],jm=["disabled"],Om=Fe({__name:"ReviewGatePanel",props:nn({reviewSubmitting:{type:Boolean},reviewHistory:{}},{reviewFeedback:{required:!0},reviewFeedbackModifiers:{}}),emits:nn(["approve","reject","skip"],["update:reviewFeedback"]),setup(e,{emit:t}){const s=nr(e,"reviewFeedback"),n=t;function r(o){try{return new Date(o).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}catch{return o}}return(o,l)=>(h(),m("div",vm,[i("h3",ym,p(o.$t("review.title")),1),i("p",xm,[de(p(o.$t("review.description"))+" ",1),e.reviewHistory.length>0?(h(),m("span",wm,p(o.$t("review.currentRound",{round:e.reviewHistory.length+1})),1)):O("",!0)]),e.reviewHistory.length>0?(h(),m("div",km,[i("div",$m,[i("span",Sm,p(o.$t("review.history")),1),i("span",_m,p(o.$t("review.roundLabel",{n:e.reviewHistory.length})),1)]),i("div",Cm,[(h(!0),m(se,null,De(e.reviewHistory,a=>(h(),m("div",{key:a.round,class:te(["relative pl-5 pb-2 border-l-2",a.round===e.reviewHistory.length?"border-yellow-500":"border-yellow-200"])},[i("div",{class:te(["absolute left-[-5px] top-1 w-2 h-2 rounded-full",a.round===e.reviewHistory.length?"bg-yellow-500":"bg-yellow-300"])},null,2),i("div",Im,[i("span",Tm,p(o.$t("review.roundPrefix",{round:a.round})),1),i("span",Pm,p(r(a.timestamp)),1)]),i("p",Rm,p(a.feedback),1)],2))),128))])])):O("",!0),i("div",Am,[i("button",{class:"px-4 py-2 bg-green-500 text-white text-sm rounded-lg hover:bg-green-600 font-medium disabled:opacity-50",disabled:e.reviewSubmitting,onClick:l[0]||(l[0]=a=>n("approve"))},p(e.reviewSubmitting?o.$t("review.submitting"):o.$t("review.approve")),9,Dm),i("button",{class:"px-4 py-2 bg-gray-400 text-white text-sm rounded-lg hover:bg-gray-500 font-medium disabled:opacity-50",disabled:e.reviewSubmitting,onClick:l[1]||(l[1]=a=>n("skip"))},p(o.$t("review.skip")),9,Lm)]),i("div",Em,[i("label",Fm,p(o.$t("review.feedbackLabel")),1),ue(i("textarea",{"onUpdate:modelValue":l[2]||(l[2]=a=>s.value=a),rows:"3",class:"w-full border border-yellow-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-yellow-400",placeholder:o.$t("review.feedbackPlaceholder")},null,8,Mm),[[he,s.value]]),i("button",{class:"px-4 py-2 bg-red-500 text-white text-sm rounded-lg hover:bg-red-600 font-medium disabled:opacity-50",disabled:e.reviewSubmitting||!s.value.trim(),onClick:l[3]||(l[3]=a=>n("reject"))},p(o.$t("review.reject")),9,jm)])]))}}),Nm={class:"flex items-center justify-between mb-2"},Bm={class:"text-base font-semibold text-gray-700"},Um={class:"flex items-center space-x-2"},Vm=["disabled"],Hm={key:0,class:"py-4 text-center text-gray-400 text-sm"},zm={key:1},qm={key:0,class:"space-y-2 text-sm"},Km={key:0},Gm={class:"text-gray-500 font-medium"},Wm={class:"text-gray-700"},Jm={key:1},Zm={class:"text-gray-500 font-medium"},Qm={class:"text-gray-700"},Ym={key:2},Xm={class:"text-gray-500 font-medium"},eb={class:"text-gray-700"},tb={key:3},sb={class:"text-gray-500 font-medium"},nb={class:"text-gray-700"},rb={key:4},ob={class:"text-gray-500 font-medium"},lb={class:"text-gray-700"},ib={key:5},ab={class:"text-gray-500 font-medium"},ub={class:"text-gray-700"},cb={key:6},db={class:"text-gray-500 font-medium"},pb={class:"text-gray-700"},fb={key:1,class:"py-4 text-center text-gray-400 text-sm"},gb={key:2,class:"space-y-3"},hb={class:"block text-xs font-medium text-gray-600 mb-1"},mb=["value"],bb={class:"block text-xs font-medium text-gray-600 mb-1"},vb=["value"],yb={class:"block text-xs font-medium text-gray-600 mb-1"},xb=["value"],wb={class:"block text-xs font-medium text-gray-600 mb-1"},kb=["value"],$b={class:"block text-xs font-medium text-gray-600 mb-1"},Sb=["value"],_b={class:"block text-xs font-medium text-gray-600 mb-1"},Cb=["value"],Ib={class:"block text-xs font-medium text-gray-600 mb-1"},Tb=["value","placeholder"],Pb=Fe({__name:"SupplementEditor",props:{supplement:{},supplementForm:{},loading:{type:Boolean},editing:{type:Boolean},saving:{type:Boolean},hasData:{type:Boolean}},emits:["edit","save","cancel","update:supplementForm"],setup(e,{emit:t}){const s=e,n=t;function r(o,l){n("update:supplementForm",{...s.supplementForm,[o]:l})}return(o,l)=>(h(),m("div",null,[i("div",Nm,[i("h3",Bm,p(o.$t("supplement.title")),1),i("div",Um,[e.editing?(h(),m(se,{key:1},[i("button",{class:"px-2 py-1 text-xs bg-green-500 text-white rounded hover:bg-green-600",disabled:e.saving,onClick:l[1]||(l[1]=a=>n("save"))},p(e.saving?o.$t("supplement.saving"):o.$t("supplement.save")),9,Vm),i("button",{class:"px-2 py-1 text-xs bg-gray-200 text-gray-600 rounded hover:bg-gray-300",onClick:l[2]||(l[2]=a=>n("cancel"))},p(o.$t("supplement.cancel")),1)],64)):(h(),m("button",{key:0,class:"px-2 py-1 text-xs bg-blue-100 text-blue-600 rounded hover:bg-blue-200",onClick:l[0]||(l[0]=a=>n("edit"))},p(o.$t("supplement.edit")),1))])]),e.loading?(h(),m("div",Hm,p(o.$t("supplement.loading")),1)):e.editing?(h(),m("div",gb,[i("div",null,[i("label",hb,p(o.$t("supplement.requirementsLabel")),1),i("textarea",{value:e.supplementForm.requirements,onInput:l[3]||(l[3]=a=>r("requirements",a.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,mb)]),i("div",null,[i("label",bb,p(o.$t("supplement.acceptanceLabel")),1),i("textarea",{value:e.supplementForm.acceptanceCriteria,onInput:l[4]||(l[4]=a=>r("acceptanceCriteria",a.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,vb)]),i("div",null,[i("label",yb,p(o.$t("supplement.scopeLabel")),1),i("input",{value:e.supplementForm.scope,onInput:l[5]||(l[5]=a=>r("scope",a.target.value)),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,xb)]),i("div",null,[i("label",wb,p(o.$t("supplement.constraintsLabel")),1),i("textarea",{value:e.supplementForm.constraints,onInput:l[6]||(l[6]=a=>r("constraints",a.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,kb)]),i("div",null,[i("label",$b,p(o.$t("supplement.referencesLabel")),1),i("textarea",{value:e.supplementForm.references,onInput:l[7]||(l[7]=a=>r("references",a.target.value)),rows:"1",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,Sb)]),i("div",null,[i("label",_b,p(o.$t("supplement.freeTextLabel")),1),i("textarea",{value:e.supplementForm.freeText,onInput:l[8]||(l[8]=a=>r("freeText",a.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,Cb)]),i("div",null,[i("label",Ib,p(o.$t("supplement.tapdIdLabel")),1),i("input",{value:e.supplementForm.tapdId,onInput:l[9]||(l[9]=a=>r("tapdId",a.target.value)),type:"text",placeholder:o.$t("supplement.tapdIdPlaceholder"),class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,Tb)])])):(h(),m("div",zm,[e.hasData?(h(),m("div",qm,[e.supplement.requirements?(h(),m("div",Km,[i("span",Gm,p(o.$t("supplement.requirements")),1),l[10]||(l[10]=de()),i("span",Wm,p(e.supplement.requirements),1)])):O("",!0),e.supplement.acceptanceCriteria?(h(),m("div",Jm,[i("span",Zm,p(o.$t("supplement.acceptance")),1),l[11]||(l[11]=de()),i("span",Qm,p(e.supplement.acceptanceCriteria),1)])):O("",!0),e.supplement.scope?(h(),m("div",Ym,[i("span",Xm,p(o.$t("supplement.scope")),1),l[12]||(l[12]=de()),i("span",eb,p(e.supplement.scope),1)])):O("",!0),e.supplement.constraints?(h(),m("div",tb,[i("span",sb,p(o.$t("supplement.constraints")),1),l[13]||(l[13]=de()),i("span",nb,p(e.supplement.constraints),1)])):O("",!0),e.supplement.references?(h(),m("div",rb,[i("span",ob,p(o.$t("supplement.references")),1),l[14]||(l[14]=de()),i("span",lb,p(e.supplement.references),1)])):O("",!0),e.supplement.freeText?(h(),m("div",ib,[i("span",ab,p(o.$t("supplement.freeText")),1),l[15]||(l[15]=de()),i("span",ub,p(e.supplement.freeText),1)])):O("",!0),e.supplement.tapdId?(h(),m("div",cb,[i("span",db,p(o.$t("supplement.tapdId")),1),l[16]||(l[16]=de()),i("span",pb,p(e.supplement.tapdId),1)])):O("",!0)])):(h(),m("div",fb,p(o.$t("supplement.empty")),1))]))]))}}),Rb={class:"flex items-center justify-between mb-2"},Ab={class:"text-base font-semibold text-gray-700"},Db={class:"flex items-center space-x-2"},Lb={class:"flex items-center space-x-1 text-xs text-gray-500 cursor-pointer"},Eb={class:"flex items-center space-x-1 text-xs text-gray-500 cursor-pointer"},Fb={key:0,class:"border border-gray-200 rounded-lg p-6 text-center text-gray-400 text-sm"},Mb={class:"text-xs mt-1"},jb={key:0,class:"text-xs mt-1"},Ob={class:"log-badge"},Nb={class:"text-gray-400 text-xs mr-1"},Bb={key:0,class:"text-gray-400 text-xs mr-1"},Ub={class:"text-gray-700 break-all"},Vb={key:2,class:"text-xs text-gray-400 mt-1 text-right"},Hb=Fe({__name:"AgentLogViewer",props:nn({logs:{},issueState:{}},{autoScroll:{type:Boolean,default:!0},autoScrollModifiers:{},debugMode:{type:Boolean,default:!1},debugModeModifiers:{}}),emits:nn(["clear"],["update:autoScroll","update:debugMode"]),setup(e,{emit:t}){const s=t,n=nr(e,"autoScroll"),r=nr(e,"debugMode"),{stateLabel:o,isTerminalState:l}=Ns(),{agentLogContainer:a,agentLogLabel:u}=ui();return(g,d)=>(h(),m("div",null,[i("div",Rb,[i("h3",Ab,p(g.$t("agentLog.title")),1),i("div",Db,[i("label",Lb,[ue(i("input",{type:"checkbox","onUpdate:modelValue":d[0]||(d[0]=f=>n.value=f),class:"rounded"},null,512),[[cn,n.value]]),i("span",null,p(g.$t("agentLog.autoScroll")),1)]),i("label",Eb,[ue(i("input",{type:"checkbox","onUpdate:modelValue":d[1]||(d[1]=f=>r.value=f),class:"rounded"},null,512),[[cn,r.value]]),d[3]||(d[3]=i("span",null,"Debug",-1))]),i("button",{class:"px-2 py-0.5 text-xs bg-gray-200 text-gray-600 rounded hover:bg-gray-300",onClick:d[2]||(d[2]=f=>s("clear"))},p(g.$t("agentLog.clear")),1)])]),e.logs.length===0?(h(),m("div",Fb,[e.issueState&&c(l)(e.issueState)?(h(),m(se,{key:0},[d[4]||(d[4]=i("svg",{class:"h-5 w-5 mx-auto mb-2 text-gray-300",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12h6m-3-3v6m-7 4h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})],-1)),i("div",null,p(g.$t("agentLog.ended")),1),i("div",Mb,[de(p(g.$t("agentLog.finalState"))+" ",1),i("span",{class:te(e.issueState==="completed"?"text-green-500":"text-red-500")},p(c(o)(e.issueState)),3)])],64)):(h(),m(se,{key:1},[d[5]||(d[5]=i("svg",{class:"animate-spin h-5 w-5 mx-auto mb-2 text-blue-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),i("div",null,p(g.$t("agentLog.waiting")),1),e.issueState?(h(),m("div",jb,p(g.$t("agentLog.currentState"))+" "+p(c(o)(e.issueState)),1)):O("",!0)],64))])):(h(),m("div",{key:1,ref_key:"agentLogContainer",ref:a,class:"agent-log border border-gray-200 rounded-lg overflow-y-auto bg-white",style:{"max-height":"20rem"}},[(h(!0),m(se,null,De(e.logs,(f,y)=>(h(),m("div",{key:y,class:te(["agent-log-item","log-"+f.type])},[i("span",Ob,p(c(u)(f.type)),1),i("span",Nb,p(c(Qc)(f.timestamp)),1),f.phase?(h(),m("span",Bb,"["+p(f.phase)+"]",1)):O("",!0),i("span",Ub,p(f.summary),1)],2))),128))],512)),e.logs.length>0?(h(),m("div",Vb,p(g.$t("agentLog.count",{count:e.logs.length})),1)):O("",!0)]))}}),zb={class:"flex items-center justify-between mb-2"},qb={class:"text-base font-semibold text-gray-700"},Kb={class:"flex items-center space-x-2"},Gb=["disabled"],Wb=["title"],Jb={class:"flex space-x-1 mb-3 border-b border-gray-200"},Zb=["onClick"],Qb={key:0,class:"py-8 text-center text-gray-400"},Yb={key:1,class:"py-8 text-center text-gray-400"},Xb={key:2},ev=["placeholder"],tv=["innerHTML"],sv={key:4,class:"py-8 text-center text-gray-400"},nv={key:0,class:"fullscreen-doc-overlay"},rv={class:"fullscreen-doc-container"},ov={class:"flex items-center justify-between px-6 py-4 border-b border-gray-200 shrink-0"},lv={class:"flex items-center space-x-3"},iv={class:"text-lg font-bold text-gray-800"},av={class:"text-sm text-gray-400"},uv={class:"flex items-center space-x-2"},cv=["disabled"],dv=["title"],pv={class:"flex space-x-1 px-6 pt-3 border-b border-gray-200 shrink-0"},fv=["onClick"],gv={class:"flex-1 overflow-y-auto min-h-0"},hv={key:0,class:"flex items-center justify-center h-full text-gray-400"},mv={class:"text-base"},bv={key:1,class:"flex items-center justify-center h-full text-gray-400"},vv={class:"text-base"},yv={key:2,class:"h-full p-4"},xv=["placeholder"],wv=["innerHTML"],kv={key:4,class:"flex items-center justify-center h-full text-gray-400"},$v={class:"text-base"},Sv=Fe({__name:"PlanDocViewer",props:{issueIid:{},planDocs:{},isEditableDoc:{type:Function},detailVersion:{}},setup(e,{expose:t}){const s=e;ot(()=>s.detailVersion,()=>{n.value&&w(n.value)});const n=F(null),r=F(""),o=F(!1),l=F(""),a=F(!1),u=F(""),g=F(!1),d=F(!1),f=F(!1),{t:y}=Vt(),x={"review-feedback.md":()=>y("planDoc.noReviewFeedback"),"02-verify-report.md":()=>y("planDoc.verifyNotGenerated"),"04-verify-report.md":()=>y("planDoc.verifyNotGenerated")};async function w(k){n.value=k,a.value=!1,u.value="",o.value=!0,r.value="",l.value="",d.value=!1;try{r.value=await Lo(s.issueIid,k,"html")}catch(v){const _=v.message;_.includes("not found")&&k in x?(d.value=!0,l.value=x[k]()):l.value=_}finally{o.value=!1}}async function C(){if(n.value)try{u.value=await Lo(s.issueIid,n.value,"raw"),a.value=!0}catch(k){alert(y("planDoc.fetchFailed")+" "+k.message)}}function P(){a.value=!1,u.value="",n.value&&w(n.value)}async function I(){if(n.value){g.value=!0;try{await cc(s.issueIid,n.value,u.value),a.value=!1,u.value="",await w(n.value)}catch(k){alert(y("planDoc.saveFailed")+" "+k.message)}finally{g.value=!1}}}function T(){f.value=!0,document.body.style.overflow="hidden",!n.value&&s.planDocs.length>0&&w(s.planDocs[0].file)}function H(){f.value=!1,document.body.style.overflow=""}function R(k){k.key==="Escape"&&f.value&&H()}return Lt(()=>{document.addEventListener("keydown",R),s.planDocs.length>0&&w(s.planDocs[0].file)}),Et(()=>{document.removeEventListener("keydown",R),document.body.style.overflow=""}),t({activeDoc:n}),(k,v)=>(h(),m("div",null,[i("div",zb,[i("h3",qb,p(k.$t("planDoc.title")),1),i("div",Kb,[n.value&&e.isEditableDoc(n.value)&&!f.value?(h(),m(se,{key:0},[a.value?(h(),m(se,{key:1},[i("button",{class:"px-2 py-1 text-xs bg-green-500 text-white rounded hover:bg-green-600",disabled:g.value,onClick:v[1]||(v[1]=_=>I())},p(g.value?k.$t("planDoc.saving"):k.$t("planDoc.save")),9,Gb),i("button",{class:"px-2 py-1 text-xs bg-gray-200 text-gray-600 rounded hover:bg-gray-300",onClick:v[2]||(v[2]=_=>P())},p(k.$t("planDoc.cancel")),1)],64)):(h(),m("button",{key:0,class:"px-2 py-1 text-xs bg-blue-100 text-blue-600 rounded hover:bg-blue-200",onClick:v[0]||(v[0]=_=>C())},p(k.$t("planDoc.edit")),1))],64)):O("",!0),i("button",{class:"px-2 py-1 text-xs bg-gray-100 text-gray-600 rounded hover:bg-gray-200 inline-flex items-center space-x-1",title:k.$t("planDoc.fullscreen"),onClick:v[3]||(v[3]=_=>T())},[v[10]||(v[10]=i("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})],-1)),i("span",null,p(k.$t("planDoc.expand")),1)],8,Wb)])]),i("div",Jb,[(h(!0),m(se,null,De(e.planDocs,_=>(h(),m("button",{key:_.file,class:te(["px-3 py-2 text-sm font-medium border-b-2 transition-colors",n.value===_.file?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:M=>w(_.file)},p(_.label),11,Zb))),128))]),o.value?(h(),m("div",Qb,p(k.$t("planDoc.loading")),1)):l.value?(h(),m("div",Yb,p(l.value),1)):a.value&&!f.value?(h(),m("div",Xb,[ue(i("textarea",{"onUpdate:modelValue":v[4]||(v[4]=_=>u.value=_),class:"w-full h-96 border border-gray-300 rounded-lg p-3 text-sm font-mono text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:k.$t("planDoc.editPlaceholder")},null,8,ev),[[he,u.value]])])):r.value&&!f.value?(h(),m("div",{key:3,class:"plan-doc text-sm text-gray-700 max-h-96 overflow-y-auto border border-gray-100 rounded-lg p-4",innerHTML:r.value},null,8,tv)):f.value?O("",!0):(h(),m("div",sv,p(k.$t("planDoc.selectTab")),1)),(h(),tt(wa,{to:"body"},[_e(Pr,{name:"fullscreen-fade"},{default:Sn(()=>[f.value?(h(),m("div",nv,[i("div",rv,[i("div",ov,[i("div",lv,[i("h2",iv,p(k.$t("planDoc.title")),1),i("span",av,"Issue #"+p(e.issueIid),1)]),i("div",uv,[n.value&&e.isEditableDoc(n.value)?(h(),m(se,{key:0},[a.value?(h(),m(se,{key:1},[i("button",{class:"px-3 py-1.5 text-sm bg-green-500 text-white rounded-lg hover:bg-green-600 transition-colors",disabled:g.value,onClick:v[6]||(v[6]=_=>I())},p(g.value?k.$t("planDoc.saving"):k.$t("planDoc.save")),9,cv),i("button",{class:"px-3 py-1.5 text-sm bg-gray-200 text-gray-600 rounded-lg hover:bg-gray-300 transition-colors",onClick:v[7]||(v[7]=_=>P())},p(k.$t("planDoc.cancel")),1)],64)):(h(),m("button",{key:0,class:"px-3 py-1.5 text-sm bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors",onClick:v[5]||(v[5]=_=>C())},p(k.$t("planDoc.edit")),1))],64)):O("",!0),i("button",{class:"ml-2 p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-lg transition-colors",title:k.$t("planDoc.closeFullscreen"),onClick:v[8]||(v[8]=_=>H())},[...v[11]||(v[11]=[i("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,dv)])]),i("div",pv,[(h(!0),m(se,null,De(e.planDocs,_=>(h(),m("button",{key:"fs-"+_.file,class:te(["px-4 py-2.5 text-sm font-medium border-b-2 transition-colors",n.value===_.file?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:M=>w(_.file)},p(_.label),11,fv))),128))]),i("div",gv,[o.value?(h(),m("div",hv,[i("span",mv,p(k.$t("planDoc.loading")),1)])):l.value?(h(),m("div",bv,[i("span",vv,p(l.value),1)])):a.value?(h(),m("div",yv,[ue(i("textarea",{"onUpdate:modelValue":v[9]||(v[9]=_=>u.value=_),class:"w-full h-full border border-gray-300 rounded-lg p-4 text-sm font-mono text-gray-700 resize-none focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:k.$t("planDoc.editPlaceholder")},null,8,xv),[[he,u.value]])])):r.value?(h(),m("div",{key:3,class:"plan-doc text-sm text-gray-700 p-6",innerHTML:r.value},null,8,wv)):(h(),m("div",kv,[i("span",$v,p(k.$t("planDoc.selectTab")),1)]))])])])):O("",!0)]),_:1})]))]))}}),_v={class:"fixed inset-0 z-50 flex"},Cv={class:"relative ml-auto w-full max-w-2xl bg-white shadow-xl overflow-y-auto"},Iv={class:"sticky top-0 bg-white border-b border-gray-200 px-6 py-4 flex items-center justify-between z-10"},Tv={class:"flex items-center space-x-2"},Pv={class:"text-lg font-bold text-gray-800"},Rv=["href"],Av={class:"px-6 py-4 space-y-6"},Dv={class:"text-base font-semibold text-gray-700 mb-2"},Lv={class:"grid grid-cols-2 gap-3 text-sm"},Ev={class:"text-gray-500"},Fv={class:"text-gray-800"},Mv={class:"text-gray-500"},jv={class:"text-xs bg-gray-100 px-1 py-0.5 rounded"},Ov={class:"text-gray-500"},Nv={class:"text-gray-500"},Bv={class:"text-gray-500"},Uv={class:"text-gray-500"},Vv={class:"flex items-center justify-between text-sm bg-gray-50 rounded-lg px-4 py-2.5 border border-gray-200"},Hv={class:"text-gray-600"},zv=["disabled"],qv={class:"flex items-center justify-between text-sm bg-gray-50 rounded-lg px-4 py-2.5 border border-gray-200"},Kv={class:"text-gray-600"},Gv=["disabled"],Wv={key:0,class:"bg-green-50 border border-green-200 rounded-lg p-4 flex items-center space-x-2"},Jv={class:"text-sm text-green-700 font-medium"},Zv=["href"],Qv={key:1,class:"bg-red-50 border border-red-200 rounded-lg p-4"},Yv={class:"text-sm font-semibold text-red-700 mb-1"},Xv={class:"text-sm text-red-600 whitespace-pre-wrap break-words"},ey={class:"flex space-x-3 pt-2 border-t border-gray-200"},ty=Fe({__name:"DetailModal",props:{issue:{},progress:{},systemStatus:{},agentLogs:{},agentAutoScroll:{type:Boolean},agentDebugMode:{type:Boolean},supplement:{},supplementForm:{},supplementLoading:{type:Boolean},supplementEditing:{type:Boolean},supplementSaving:{type:Boolean},hasSupplementData:{type:Boolean},detailVersion:{},reviewFeedback:{},reviewSubmitting:{type:Boolean},reviewHistory:{}},emits:["close","retry","restart","cancel","retryFromPhase","approve","reject","skip","update:reviewFeedback","supplementEdit","supplementSave","supplementCancel","update:supplementForm","update:agentAutoScroll","update:agentDebugMode","clearLogs"],setup(e,{emit:t}){const s=e,n=t,{stateLabel:r,stateClass:o,getPlanDocs:l,isEditableDoc:a}=Ns();function u(){if(!s.systemStatus)return"#";const I=s.systemStatus.config.gongfengBaseUrl,T=s.systemStatus.config.projectPath;return`${I}/${T}/issues/${s.issue.issueIid}`}const g=F(s.issue.issueNoteSyncEnabled),d=F(!1),f=Ce(()=>g.value===!0?"on":g.value===!1?"off":"system");async function y(){const I=[void 0,!0,!1],T=I.indexOf(g.value),H=I[(T+1)%I.length];g.value=H,d.value=!0;try{await hc(s.issue.issueIid,H===void 0?null:H)}catch(R){console.error("Failed to toggle note sync",R)}finally{d.value=!1}}const x=F(s.issue.e2eEnabled),w=F(!1),C=Ce(()=>x.value===!0?"on":x.value===!1?"off":"system");async function P(){const I=[void 0,!0,!1],T=I.indexOf(x.value),H=I[(T+1)%I.length];x.value=H,w.value=!0;try{await bc(s.issue.issueIid,H===void 0?null:H)}catch(R){console.error("Failed to toggle e2e",R)}finally{w.value=!1}}return(I,T)=>(h(),tt(Pr,{name:"fade"},{default:Sn(()=>[i("div",_v,[i("div",{class:"absolute inset-0 bg-black/30",onClick:T[0]||(T[0]=H=>n("close"))}),i("div",Cv,[i("div",Iv,[i("div",Tv,[i("h2",Pv,"Issue #"+p(e.issue.issueIid),1),i("a",{href:u(),target:"_blank",rel:"noopener",class:"inline-flex items-center px-2 py-0.5 text-xs font-medium text-blue-600 bg-blue-50 rounded hover:bg-blue-100 hover:text-blue-800 transition-colors"},[de(p(I.$t("detail.viewInGongfeng"))+" ",1),T[19]||(T[19]=i("svg",{class:"w-3 h-3 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1))],8,Rv)]),i("button",{class:"text-gray-400 hover:text-gray-600 text-2xl leading-none",onClick:T[1]||(T[1]=H=>n("close"))},"×")]),i("div",Av,[i("div",null,[i("h3",Dv,p(I.$t("detail.basicInfo")),1),i("div",Lv,[i("div",null,[i("span",Ev,p(I.$t("detail.title")),1),T[20]||(T[20]=de()),i("span",Fv,p(e.issue.issueTitle),1)]),i("div",null,[i("span",Mv,p(I.$t("detail.branch")),1),T[21]||(T[21]=de()),i("code",jv,p(e.issue.branchName),1)]),i("div",null,[i("span",Ov,p(I.$t("detail.state")),1),i("span",{class:te(["px-2 py-0.5 rounded-full text-xs font-medium",c(o)(e.issue.state)])},p(c(r)(e.issue.state)),3)]),i("div",null,[i("span",Nv,p(I.$t("detail.createdAt")),1),de(" "+p(c(dn)(e.issue.createdAt)),1)]),i("div",null,[i("span",Bv,p(I.$t("detail.retries")),1),de(" "+p(e.issue.attempts),1)]),i("div",null,[i("span",Uv,p(I.$t("detail.updatedAt")),1),de(" "+p(c(dn)(e.issue.updatedAt)),1)])])]),i("div",Vv,[i("span",Hv,p(I.$t("detail.noteSync")),1),i("button",{class:te(["px-3 py-1 rounded text-xs font-medium transition-colors",{"bg-green-100 text-green-700 hover:bg-green-200":f.value==="on","bg-red-100 text-red-600 hover:bg-red-200":f.value==="off","bg-gray-200 text-gray-600 hover:bg-gray-300":f.value==="system"}]),disabled:d.value,onClick:T[2]||(T[2]=H=>y())},p(f.value==="on"?I.$t("detail.enabled"):f.value==="off"?I.$t("detail.disabled"):I.$t("detail.followSystem")),11,zv)]),i("div",qv,[i("span",Kv,p(I.$t("detail.e2eTitle")),1),i("button",{class:te(["px-3 py-1 rounded text-xs font-medium transition-colors",{"bg-green-100 text-green-700 hover:bg-green-200":C.value==="on","bg-red-100 text-red-600 hover:bg-red-200":C.value==="off","bg-gray-200 text-gray-600 hover:bg-gray-300":C.value==="system"}]),disabled:w.value,onClick:T[3]||(T[3]=H=>P())},p(C.value==="on"?I.$t("detail.enabled"):C.value==="off"?I.$t("detail.disabled"):I.$t("detail.followSystem")),11,Gv)]),e.issue.mrUrl?(h(),m("div",Wv,[i("span",Jv,p(I.$t("detail.mrLabel")),1),i("a",{href:e.issue.mrUrl,target:"_blank",rel:"noopener",class:"text-sm text-green-600 hover:text-green-800 underline break-all"},p(e.issue.mrUrl),9,Zv)])):O("",!0),e.issue.lastError?(h(),m("div",Qv,[i("h3",Yv,p(I.$t("detail.errorInfo")),1),i("p",Xv,p(e.issue.lastError),1)])):O("",!0),_e(bm,{issue:e.issue,progress:e.progress,onRetryFromPhase:T[4]||(T[4]=H=>n("retryFromPhase",e.issue.issueIid,H))},null,8,["issue","progress"]),e.issue.state==="waiting_for_review"?(h(),tt(Om,{key:2,"review-submitting":e.reviewSubmitting,"review-feedback":e.reviewFeedback,"review-history":e.reviewHistory,"onUpdate:reviewFeedback":T[5]||(T[5]=H=>n("update:reviewFeedback",H)),onApprove:T[6]||(T[6]=H=>n("approve",e.issue.issueIid)),onReject:T[7]||(T[7]=H=>n("reject",e.issue.issueIid)),onSkip:T[8]||(T[8]=H=>n("skip",e.issue.issueIid))},null,8,["review-submitting","review-feedback","review-history"])):O("",!0),_e(Pb,{supplement:e.supplement,"supplement-form":e.supplementForm,loading:e.supplementLoading,editing:e.supplementEditing,saving:e.supplementSaving,"has-data":e.hasSupplementData,onEdit:T[9]||(T[9]=H=>n("supplementEdit")),onSave:T[10]||(T[10]=H=>n("supplementSave")),onCancel:T[11]||(T[11]=H=>n("supplementCancel")),"onUpdate:supplementForm":T[12]||(T[12]=H=>n("update:supplementForm",H))},null,8,["supplement","supplement-form","loading","editing","saving","has-data"]),_e(Sv,{"issue-iid":e.issue.issueIid,"plan-docs":c(l)(e.issue),"is-editable-doc":c(a),"detail-version":e.detailVersion},null,8,["issue-iid","plan-docs","is-editable-doc","detail-version"]),_e(Hb,{logs:e.agentLogs,"issue-state":e.issue.state,"auto-scroll":e.agentAutoScroll,"debug-mode":e.agentDebugMode,"onUpdate:autoScroll":T[13]||(T[13]=H=>n("update:agentAutoScroll",H)),"onUpdate:debugMode":T[14]||(T[14]=H=>n("update:agentDebugMode",H)),onClear:T[15]||(T[15]=H=>n("clearLogs"))},null,8,["logs","issue-state","auto-scroll","debug-mode"]),i("div",ey,[e.issue.state==="failed"?(h(),m("button",{key:0,class:"px-4 py-2 bg-blue-500 text-white text-sm rounded-lg hover:bg-blue-600",onClick:T[16]||(T[16]=H=>n("retry",e.issue.issueIid))},p(I.$t("detail.retry")),1)):O("",!0),i("button",{class:"px-4 py-2 bg-yellow-100 text-yellow-700 text-sm rounded-lg hover:bg-yellow-200",onClick:T[17]||(T[17]=H=>n("restart",e.issue.issueIid))},p(I.$t("detail.restart")),1),i("button",{class:"px-4 py-2 bg-red-100 text-red-600 text-sm rounded-lg hover:bg-red-200",onClick:T[18]||(T[18]=H=>n("cancel",e.issue.issueIid))},p(I.$t("detail.cancelTrack")),1)])])])])]),_:1}))}}),sy={class:"max-w-7xl mx-auto px-4 py-6"},ny={class:"mb-4 flex items-center space-x-1 border-b border-gray-200"},ry=Fe({__name:"App",setup(e){const t=F(null),s=F("tracked"),{pipelineMode:n}=Ns(),{issues:r,filter:o,filteredIssues:l,activeCount:a,completedCount:u,failedCount:g,refresh:d}=qc(),f=Kc(),y=ui(),x=Jc(d),w=Ce(()=>f.selectedIssue.value?.issueIid);async function C(k){let v=r.value;v.length===0&&(await d(),v=r.value);const _=v.find(M=>M.issueIid===k);if(_)f.selectIssue(_,y.agentLogs);else try{const M=await ir(k);f.selectIssue(M,y.agentLogs)}catch{console.warn(`Issue #${k} not found, ignoring URL param`)}}const{readIssueIidFromUrl:P}=Zc({selectedIssueIid:w,onOpenIssue:C}),{connected:I}=Hc((k,v)=>{const _=v;if(k.startsWith("issue:")||k.startsWith("review:")){d();const M=_.data;M?.issueIid&&f.selectedIssue.value?.issueIid===M.issueIid&&f.refreshDetail()}if(k==="agent:output"){const M=_.data;M?.event&&y.pushAgentStreamEvent(M.issueIid,w,M.phase,M.event)}if(k==="pipeline:progress"){const M=_.data;M&&f.selectedIssue.value?.issueIid===M.issueIid&&y.pushSystemLog(M.issueIid,w,M.step,M.message??"",_.timestamp)}});async function T(){try{t.value=await sc(),t.value?.config?.pipelineMode&&(n.value=t.value.config.pipelineMode)}catch(k){console.error("Fetch status failed",k)}}function H(){s.value="browse",x.browseIssues.value.length===0&&x.fetchGongfengIssues()}let R=null;return Lt(async()=>{await d(),T(),R=setInterval(T,1e4);const k=P();k&&C(k)}),Et(()=>{R&&clearInterval(R)}),(k,v)=>(h(),m("div",null,[_e(id,{connected:c(I),"system-status":t.value},null,8,["connected","system-status"]),i("main",sy,[_e(wd,{total:c(r).length,active:c(a),completed:c(u),failed:c(g)},null,8,["total","active","completed","failed"]),i("div",ny,[i("button",{class:te(["px-4 py-2 text-sm font-medium border-b-2 transition-colors",s.value==="tracked"?"border-gray-800 text-gray-800":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:v[0]||(v[0]=_=>s.value="tracked")},p(k.$t("app.trackedIssues")),3),i("button",{class:te(["px-4 py-2 text-sm font-medium border-b-2 transition-colors",s.value==="browse"?"border-gray-800 text-gray-800":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:v[1]||(v[1]=_=>H())},p(k.$t("app.browseIssues")),3),i("button",{class:te(["px-4 py-2 text-sm font-medium border-b-2 transition-colors",s.value==="brainstorm"?"border-gray-800 text-gray-800":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:v[2]||(v[2]=_=>s.value="brainstorm")},p(k.$t("app.brainstorm")),3),i("button",{class:te(["px-4 py-2 text-sm font-medium border-b-2 transition-colors",s.value==="chat"?"border-gray-800 text-gray-800":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:v[3]||(v[3]=_=>s.value="chat")},p(k.$t("app.chat")),3),i("button",{class:te(["px-4 py-2 text-sm font-medium border-b-2 transition-colors",s.value==="knowledge"?"border-gray-800 text-gray-800":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:v[4]||(v[4]=_=>s.value="knowledge")},p(k.$t("app.knowledge")),3)]),s.value==="tracked"?(h(),tt(sp,{key:0,issues:c(l),filter:c(o),"system-status":t.value,"onUpdate:filter":v[5]||(v[5]=_=>o.value=_),onSelect:v[6]||(v[6]=_=>c(f).selectIssue(_,c(y).agentLogs)),onRetry:v[7]||(v[7]=_=>c(f).doRetryIssue(_,c(d))),onRestart:v[8]||(v[8]=_=>c(f).doRestartIssue(_,c(d))),onCancel:v[9]||(v[9]=_=>c(f).doCancelIssue(_,c(d)))},null,8,["issues","filter","system-status"])):O("",!0),s.value==="brainstorm"?(h(),tt(Og,{key:1})):O("",!0),s.value==="chat"?(h(),tt(xh,{key:2})):O("",!0),s.value==="knowledge"?(h(),tt(R0,{key:3})):O("",!0),s.value==="browse"?(h(),tt(Mp,{key:4,issues:c(x).browseIssues.value,"tracked-iids":c(x).browseTrackedIids.value,total:c(x).browseTotal.value,page:c(x).browsePage.value,"per-page":c(x).browsePerPage,loading:c(x).browseLoading.value,error:c(x).browseError.value,search:c(x).browseSearch.value,"system-status":t.value,"onUpdate:search":v[10]||(v[10]=_=>c(x).browseSearch.value=_),"onUpdate:page":v[11]||(v[11]=_=>c(x).browsePage.value=_),onSearch:v[12]||(v[12]=_=>c(x).fetchGongfengIssues()),onStart:v[13]||(v[13]=_=>c(x).openStartDialog(_))},null,8,["issues","tracked-iids","total","page","per-page","loading","error","search","system-status"])):O("",!0)]),_e(lm,{issue:c(x).startDialogIssue.value,supplement:c(x).startSupplement.value,processing:c(x).startProcessing.value,onClose:v[14]||(v[14]=_=>c(x).startDialogIssue.value=null),"onUpdate:supplement":v[15]||(v[15]=_=>c(x).startSupplement.value=_),onStart:v[16]||(v[16]=_=>{c(x).doStartProcessing(()=>{s.value="tracked"})})},null,8,["issue","supplement","processing"]),c(f).selectedIssue.value?(h(),tt(ty,{key:0,issue:c(f).selectedIssue.value,progress:c(f).detailProgress.value,"system-status":t.value,"agent-logs":c(y).filteredLogs.value,"agent-auto-scroll":c(y).agentAutoScroll.value,"agent-debug-mode":c(y).debugMode.value,supplement:c(f).detailSupplement.value,"supplement-form":c(f).detailSupplementForm.value,"supplement-loading":c(f).detailSupplementLoading.value,"supplement-editing":c(f).detailSupplementEditing.value,"supplement-saving":c(f).detailSupplementSaving.value,"has-supplement-data":c(f).hasSupplementData(c(f).detailSupplement.value),"detail-version":c(f).detailVersion.value,"review-feedback":c(f).reviewFeedback.value,"review-submitting":c(f).reviewSubmitting.value,"review-history":c(f).reviewHistory.value,onClose:v[17]||(v[17]=_=>c(f).selectedIssue.value=null),onRetry:v[18]||(v[18]=_=>c(f).doRetryIssue(_,c(d))),onRestart:v[19]||(v[19]=_=>c(f).doRestartIssue(_,c(d))),onCancel:v[20]||(v[20]=_=>c(f).doCancelIssue(_,c(d))),onRetryFromPhase:v[21]||(v[21]=(_,M)=>c(f).doRetryFromPhase(_,M,M,c(d))),onApprove:v[22]||(v[22]=_=>c(f).doApprovePlan(_,c(d))),onReject:v[23]||(v[23]=_=>c(f).doRejectPlan(_,c(d))),onSkip:v[24]||(v[24]=_=>c(f).doSkipReview(_,c(d))),"onUpdate:reviewFeedback":v[25]||(v[25]=_=>c(f).reviewFeedback.value=_),onSupplementEdit:v[26]||(v[26]=_=>c(f).enterSupplementEdit()),onSupplementSave:v[27]||(v[27]=_=>c(f).saveDetailSupplement(c(d))),onSupplementCancel:v[28]||(v[28]=_=>c(f).detailSupplementEditing.value=!1),"onUpdate:supplementForm":v[29]||(v[29]=_=>c(f).detailSupplementForm.value=_),"onUpdate:agentAutoScroll":v[30]||(v[30]=_=>c(y).agentAutoScroll.value=_),"onUpdate:agentDebugMode":v[31]||(v[31]=_=>c(y).debugMode.value=_),onClearLogs:v[32]||(v[32]=_=>c(y).clear())},null,8,["issue","progress","system-status","agent-logs","agent-auto-scroll","agent-debug-mode","supplement","supplement-form","supplement-loading","supplement-editing","supplement-saving","has-supplement-data","detail-version","review-feedback","review-submitting","review-history"])):O("",!0)]))}});function oy(){const e=F(0),t=6,s=F(!1),n=F(""),r=F([]),o=F(null),l=F(null),a=F(null),u=F(null),g=F(""),d=F([]),f=F(!1),y=F(""),x=F(0);let w=null;const C=F(!1),P=F(""),I=F(!1),T=F(new Map),H=F(""),R=kn({gongfeng:{apiUrl:"",privateToken:"",projectPath:""},project:{workDir:"",gitRootDir:"",baseBranch:"master",branchPrefix:"feat/issue",worktreeBaseDir:"",projectSubDir:""},ai:{mode:"claude-internal",model:"Claude-4.6-Opus",phaseTimeoutMs:18e5},poll:{discoveryIntervalMs:6e4,driveIntervalMs:15e3,maxRetries:3,maxConcurrent:3},web:{port:3e3},pipeline:{mode:"auto"},review:{enabled:!0}}),k=Ce(()=>{switch(e.value){case 0:{const ne=r.value.filter(E=>E.required);return ne.length>0&&ne.every(E=>E.installed)}case 1:return R.project.workDir.trim()!=="";case 2:return R.gongfeng.apiUrl.trim()!==""&&R.gongfeng.privateToken.trim()!==""&&R.gongfeng.projectPath.trim()!==""&&o.value===!0&&a.value===!0;case 3:return r.value.filter(ne=>ne.name===R.ai.mode.replace("-","-")).every(ne=>ne.installed||!ne.required);case 4:return!0;case 5:return g.value!=="";default:return!1}});async function v(){s.value=!0,n.value="";try{const E=await(await fetch(`/api/setup/check-env?aiMode=${R.ai.mode}`)).json();r.value=E.dependencies}catch(ne){n.value=ne.message}finally{s.value=!1}}async function _(){if(o.value=null,l.value=null,!(!R.gongfeng.apiUrl||!R.gongfeng.privateToken))try{const E=await(await fetch("/api/setup/validate-token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiUrl:R.gongfeng.apiUrl,token:R.gongfeng.privateToken})})).json();o.value=E.valid,l.value=E.user??null,E.valid||(n.value=E.error??"Token validation failed")}catch(ne){o.value=!1,n.value=ne.message}}async function M(){if(a.value=null,u.value=null,!(!R.gongfeng.apiUrl||!R.gongfeng.privateToken||!R.gongfeng.projectPath))try{const E=await(await fetch("/api/setup/validate-repo",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiUrl:R.gongfeng.apiUrl,token:R.gongfeng.privateToken,projectPath:R.gongfeng.projectPath})})).json();a.value=E.valid,u.value=E.project??null,E.valid||(n.value=E.error??"Repository validation failed")}catch(ne){a.value=!1,n.value=ne.message}}function S(){x.value=0,w=setInterval(()=>{x.value++},1e3)}function D(){w&&(clearInterval(w),w=null)}Et(()=>D());async function z(ne){f.value=!0,y.value=ne,d.value=[],H.value="",I.value=!0,S();try{const q=(await fetch("/api/setup/install-dep",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:ne})})).body?.getReader();if(!q)return;const L=new TextDecoder;let Ae="";for(;;){const{done:us,value:cs}=await q.read();if(us)break;Ae+=L.decode(cs,{stream:!0});const at=Ae.split(`
|
|
62
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${dt(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:s}){let n=this.parser.parseInline(s),r=Ko(e);if(r===null)return n;e=r;let o='<a href="'+e+'"';return t&&(o+=' title="'+dt(t)+'"'),o+=">"+n+"</a>",o}image({href:e,title:t,text:s,tokens:n}){n&&(s=this.parser.parseInline(n,this.parser.textRenderer));let r=Ko(e);if(r===null)return dt(s);e=r;let o=`<img src="${e}" alt="${dt(s)}"`;return t&&(o+=` title="${dt(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:dt(e.text)}},Or=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},st=class cr{options;renderer;textRenderer;constructor(t){this.options=t||ts,this.options.renderer=this.options.renderer||new gn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Or}static parse(t,s){return new cr(s).parse(t)}static parseInline(t,s){return new cr(s).parseInline(t)}parse(t){let s="";for(let n=0;n<t.length;n++){let r=t[n];if(this.options.extensions?.renderers?.[r.type]){let l=r,a=this.options.extensions.renderers[l.type].call({parser:this},l);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){s+=a||"";continue}}let o=r;switch(o.type){case"space":{s+=this.renderer.space(o);break}case"hr":{s+=this.renderer.hr(o);break}case"heading":{s+=this.renderer.heading(o);break}case"code":{s+=this.renderer.code(o);break}case"table":{s+=this.renderer.table(o);break}case"blockquote":{s+=this.renderer.blockquote(o);break}case"list":{s+=this.renderer.list(o);break}case"checkbox":{s+=this.renderer.checkbox(o);break}case"html":{s+=this.renderer.html(o);break}case"def":{s+=this.renderer.def(o);break}case"paragraph":{s+=this.renderer.paragraph(o);break}case"text":{s+=this.renderer.text(o);break}default:{let l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return s}parseInline(t,s=this.renderer){let n="";for(let r=0;r<t.length;r++){let o=t[r];if(this.options.extensions?.renderers?.[o.type]){let a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=a||"";continue}}let l=o;switch(l.type){case"escape":{n+=s.text(l);break}case"html":{n+=s.html(l);break}case"link":{n+=s.link(l);break}case"image":{n+=s.image(l);break}case"checkbox":{n+=s.checkbox(l);break}case"strong":{n+=s.strong(l);break}case"em":{n+=s.em(l);break}case"codespan":{n+=s.codespan(l);break}case"br":{n+=s.br(l);break}case"del":{n+=s.del(l);break}case"text":{n+=s.text(l);break}default:{let a='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}},ys=class{options;block;constructor(e){this.options=e||ts}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?tt.lex:tt.lexInline}provideParser(){return this.block?st.parse:st.parseInline}},Uf=class{defaults=Rr();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=st;Renderer=gn;TextRenderer=Or;Lexer=tt;Tokenizer=fn;Hooks=ys;constructor(...e){this.use(...e)}walkTokens(e,t){let s=[];for(let n of e)switch(s=s.concat(t.call(this,n)),n.type){case"table":{let r=n;for(let o of r.header)s=s.concat(this.walkTokens(o.tokens,t));for(let o of r.rows)for(let l of o)s=s.concat(this.walkTokens(l.tokens,t));break}case"list":{let r=n;s=s.concat(this.walkTokens(r.items,t));break}default:{let r=n;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{let l=r[o].flat(1/0);s=s.concat(this.walkTokens(l,t))}):r.tokens&&(s=s.concat(this.walkTokens(r.tokens,t)))}}return s}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(s=>{let n={...s};if(n.async=this.defaults.async||n.async||!1,s.extensions&&(s.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let o=t.renderers[r.name];o?t.renderers[r.name]=function(...l){let a=r.renderer.apply(this,l);return a===!1&&(a=o.apply(this,l)),a}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=t[r.level];o?o.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),n.extensions=t),s.renderer){let r=this.defaults.renderer||new gn(this.defaults);for(let o in s.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let l=o,a=s.renderer[l],u=r[l];r[l]=(...g)=>{let d=a.apply(r,g);return d===!1&&(d=u.apply(r,g)),d||""}}n.renderer=r}if(s.tokenizer){let r=this.defaults.tokenizer||new fn(this.defaults);for(let o in s.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let l=o,a=s.tokenizer[l],u=r[l];r[l]=(...g)=>{let d=a.apply(r,g);return d===!1&&(d=u.apply(r,g)),d}}n.tokenizer=r}if(s.hooks){let r=this.defaults.hooks||new ys;for(let o in s.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let l=o,a=s.hooks[l],u=r[l];ys.passThroughHooks.has(o)?r[l]=g=>{if(this.defaults.async&&ys.passThroughHooksRespectAsync.has(o))return(async()=>{let f=await a.call(r,g);return u.call(r,f)})();let d=a.call(r,g);return u.call(r,d)}:r[l]=(...g)=>{if(this.defaults.async)return(async()=>{let f=await a.apply(r,g);return f===!1&&(f=await u.apply(r,g)),f})();let d=a.apply(r,g);return d===!1&&(d=u.apply(r,g)),d}}n.hooks=r}if(s.walkTokens){let r=this.defaults.walkTokens,o=s.walkTokens;n.walkTokens=function(l){let a=[];return a.push(o.call(this,l)),r&&(a=a.concat(r.call(this,l))),a}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return tt.lex(e,t??this.defaults)}parser(e,t){return st.parse(e,t??this.defaults)}parseMarkdown(e){return(t,s)=>{let n={...s},r={...this.defaults,...n},o=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&n.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=e),r.async)return(async()=>{let l=r.hooks?await r.hooks.preprocess(t):t,a=await(r.hooks?await r.hooks.provideLexer():e?tt.lex:tt.lexInline)(l,r),u=r.hooks?await r.hooks.processAllTokens(a):a;r.walkTokens&&await Promise.all(this.walkTokens(u,r.walkTokens));let g=await(r.hooks?await r.hooks.provideParser():e?st.parse:st.parseInline)(u,r);return r.hooks?await r.hooks.postprocess(g):g})().catch(o);try{r.hooks&&(t=r.hooks.preprocess(t));let l=(r.hooks?r.hooks.provideLexer():e?tt.lex:tt.lexInline)(t,r);r.hooks&&(l=r.hooks.processAllTokens(l)),r.walkTokens&&this.walkTokens(l,r.walkTokens);let a=(r.hooks?r.hooks.provideParser():e?st.parse:st.parseInline)(l,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(l){return o(l)}}}onError(e,t){return s=>{if(s.message+=`
|
|
63
|
+
Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error occurred:</p><pre>"+dt(s.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(s);throw s}}},es=new Uf;function xe(e,t){return es.parse(e,t)}xe.options=xe.setOptions=function(e){return es.setOptions(e),xe.defaults=es.defaults,di(xe.defaults),xe};xe.getDefaults=Rr;xe.defaults=ts;xe.use=function(...e){return es.use(...e),xe.defaults=es.defaults,di(xe.defaults),xe};xe.walkTokens=function(e,t){return es.walkTokens(e,t)};xe.parseInline=es.parseInline;xe.Parser=st;xe.parser=st.parse;xe.Renderer=gn;xe.TextRenderer=Or;xe.Lexer=tt;xe.lexer=tt.lex;xe.Tokenizer=fn;xe.Hooks=ys;xe.parse=xe;xe.options;xe.setOptions;xe.use;xe.walkTokens;xe.parseInline;st.parse;tt.lex;const Vf={class:"space-y-4"},Hf={class:"flex items-center justify-between"},zf={class:"flex items-center gap-3"},qf={class:"text-sm font-medium text-gray-700"},Kf={key:0,class:"inline-flex items-center gap-1.5 text-sm text-amber-600"},Gf={class:"flex gap-2"},Wf={class:"grid grid-cols-1 lg:grid-cols-5 gap-4"},Jf={class:"lg:col-span-3 border border-gray-200 rounded-lg overflow-hidden"},Zf={class:"bg-gray-50 px-4 py-2 border-b border-gray-200"},Qf={class:"text-sm font-medium text-gray-700"},Yf={class:"p-4 max-h-[600px] overflow-y-auto"},Xf=["innerHTML"],eg={key:1,class:"text-sm text-gray-600 whitespace-pre-wrap font-mono"},tg={key:2,class:"text-sm text-gray-400 italic"},sg={class:"lg:col-span-2 border border-gray-200 rounded-lg overflow-hidden"},ng={class:"bg-gray-50 px-4 py-2 border-b border-gray-200"},rg={class:"text-sm font-medium text-gray-700"},og={class:"p-4 max-h-[600px] overflow-y-auto"},lg=["innerHTML"],ig={key:1,class:"text-sm text-gray-600 whitespace-pre-wrap font-mono"},ag={key:2,class:"text-sm text-gray-400 italic"},ug={key:0},cg={class:"group"},dg={class:"cursor-pointer text-sm text-gray-500 hover:text-gray-700"},pg={class:"mt-2 space-y-2"},fg={class:"text-xs font-medium text-gray-500 mb-1"},gg={class:"text-xs text-gray-600 line-clamp-3"},hg=Ee({__name:"SddViewer",props:{sdd:{},rounds:{},streamOutput:{},loading:{type:Boolean},status:{}},emits:["runReview","runRefine","runAutoRefine","abort","finish"],setup(e,{emit:t}){const{t:s}=Ht(),n=e,r=t,o=Ie(()=>n.sdd?xe(n.sdd):""),l=Ie(()=>{const u=n.rounds;return u.length>0?u[u.length-1].questions:""}),a=Ie(()=>l.value?xe(l.value):"");return(u,g)=>(h(),m("div",Vf,[i("div",Hf,[i("div",zf,[i("span",qf,p(c(s)("brainstorm.roundCount",{count:e.rounds.length})),1),e.loading?(h(),m("span",Kf,[g[4]||(g[4]=i("svg",{class:"animate-spin h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),de(" "+p(e.status==="generating"?c(s)("brainstorm.statusGenerating"):e.status==="reviewing"?c(s)("brainstorm.statusReviewing"):e.status==="refining"?c(s)("brainstorm.statusRefining"):c(s)("brainstorm.statusProcessing")),1)])):O("",!0)]),i("div",Gf,[e.loading?(h(),m("button",{key:0,class:"px-3 py-1.5 text-sm text-red-600 border border-red-300 rounded-lg hover:bg-red-50",onClick:g[0]||(g[0]=d=>r("abort"))},p(c(s)("brainstorm.abort")),1)):O("",!0),!e.loading&&e.sdd&&e.status!=="done"?(h(),m("button",{key:1,class:"px-3 py-1.5 text-sm text-gray-700 border border-gray-300 rounded-lg hover:bg-gray-50",onClick:g[1]||(g[1]=d=>r("runReview"))},p(c(s)("brainstorm.manualReview")),1)):O("",!0),!e.loading&&e.rounds.length>0&&l.value&&!e.rounds[e.rounds.length-1].refinedSdd?(h(),m("button",{key:2,class:"px-3 py-1.5 text-sm text-gray-700 border border-gray-300 rounded-lg hover:bg-gray-50",onClick:g[2]||(g[2]=d=>r("runRefine"))},p(c(s)("brainstorm.manualRefine")),1)):O("",!0),!e.loading&&e.sdd?(h(),m("button",{key:3,class:"px-3 py-1.5 text-sm bg-gray-800 text-white rounded-lg hover:bg-gray-700",onClick:g[3]||(g[3]=d=>r("finish"))},p(c(s)("brainstorm.finishAndCreate")),1)):O("",!0)])]),i("div",Wf,[i("div",Jf,[i("div",Zf,[i("h3",Qf,p(c(s)("brainstorm.sddTitle")),1)]),i("div",Yf,[o.value?(h(),m("div",{key:0,class:"prose prose-sm max-w-none",innerHTML:o.value},null,8,Xf)):e.loading&&e.streamOutput?(h(),m("div",eg,p(e.streamOutput),1)):(h(),m("div",tg,p(c(s)("brainstorm.sddEmpty")),1))])]),i("div",sg,[i("div",ng,[i("h3",rg,p(c(s)("brainstorm.questionsTitle")),1)]),i("div",og,[a.value?(h(),m("div",{key:0,class:"prose prose-sm max-w-none",innerHTML:a.value},null,8,lg)):e.loading&&e.status==="reviewing"&&e.streamOutput?(h(),m("div",ig,p(e.streamOutput),1)):(h(),m("div",ag,p(c(s)("brainstorm.questionsEmpty")),1))])])]),e.rounds.length>1?(h(),m("div",ug,[i("details",cg,[i("summary",dg,p(c(s)("brainstorm.roundHistory")),1),i("div",pg,[(h(!0),m(ne,null,Ae(e.rounds,d=>(h(),m("div",{key:d.round,class:"border border-gray-100 rounded-lg p-3"},[i("div",fg,p(c(s)("brainstorm.roundLabel",{n:d.round})),1),i("div",gg,p(d.questions.slice(0,200))+p(d.questions.length>200?"...":""),1)]))),128))])])])):O("",!0)]))}}),mg={class:"space-y-6"},bg={class:"flex items-center gap-2 text-sm"},vg={key:0},yg={key:1},xg={key:2,class:"space-y-4"},wg={class:"block text-sm font-medium text-gray-700 mb-1"},kg=["placeholder"],$g={class:"flex items-center gap-2"},Sg={for:"auto-finish-label",class:"text-sm text-gray-700"},_g={class:"border border-gray-200 rounded-lg overflow-hidden"},Cg={class:"bg-gray-50 px-4 py-2 border-b border-gray-200 flex items-center justify-between"},Ig={class:"text-sm font-medium text-gray-700"},Tg={class:"p-4 max-h-96 overflow-y-auto"},Pg={class:"text-xs text-gray-700 whitespace-pre-wrap"},Rg={class:"flex justify-end gap-3"},Ag=["disabled"],Dg=["disabled"],Lg={key:1,class:"bg-green-50 border border-green-200 rounded-lg p-6 text-center"},Eg={class:"text-lg font-medium text-green-800 mb-1"},Fg={class:"text-sm text-green-600"},Mg={class:"mt-4"},jg={key:3,class:"bg-red-50 border border-red-200 rounded-lg p-3 text-sm text-red-700"},Og=Ee({__name:"BrainstormPanel",setup(e){const{t}=Ht(),{step:s,loading:n,error:r,streamOutput:o,createdIssue:l,currentSdd:a,rounds:u,status:g,startSession:d,runSingleReview:f,runSingleRefine:y,runAutoRefine:x,createIssue:w,abort:C,reset:P}=jp(),T=F(""),I=F(!0);function H(_){d(_)}function R(){s.value="complete"}async function k(_){await w(T.value,_?!0:I.value)}function v(){P(),T.value="",I.value=!0}return(_,M)=>(h(),m("div",mg,[i("div",bg,[i("span",{class:te(["inline-flex items-center justify-center w-6 h-6 rounded-full text-xs font-medium",c(s)==="input"?"bg-gray-800 text-white":"bg-gray-200 text-gray-500"])},"1",2),i("span",{class:te(c(s)==="input"?"text-gray-800 font-medium":"text-gray-400")},p(c(t)("brainstorm.step1")),3),M[6]||(M[6]=i("svg",{class:"w-4 h-4 text-gray-300",fill:"currentColor",viewBox:"0 0 20 20"},[i("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"})],-1)),i("span",{class:te(["inline-flex items-center justify-center w-6 h-6 rounded-full text-xs font-medium",c(s)==="refine"?"bg-gray-800 text-white":"bg-gray-200 text-gray-500"])},"2",2),i("span",{class:te(c(s)==="refine"?"text-gray-800 font-medium":"text-gray-400")},p(c(t)("brainstorm.step2")),3),M[7]||(M[7]=i("svg",{class:"w-4 h-4 text-gray-300",fill:"currentColor",viewBox:"0 0 20 20"},[i("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"})],-1)),i("span",{class:te(["inline-flex items-center justify-center w-6 h-6 rounded-full text-xs font-medium",c(s)==="complete"?"bg-gray-800 text-white":"bg-gray-200 text-gray-500"])},"3",2),i("span",{class:te(c(s)==="complete"?"text-gray-800 font-medium":"text-gray-400")},p(c(t)("brainstorm.step3")),3)]),c(s)==="input"?(h(),m("div",vg,[Ce(Qp,{onSubmit:H})])):O("",!0),c(s)==="refine"?(h(),m("div",yg,[Ce(hg,{sdd:c(a),rounds:c(u),"stream-output":c(o),loading:c(n),status:c(g),onRunReview:c(f),onRunRefine:c(y),onRunAutoRefine:M[0]||(M[0]=S=>c(x)()),onAbort:c(C),onFinish:R},null,8,["sdd","rounds","stream-output","loading","status","onRunReview","onRunRefine","onAbort"])])):O("",!0),c(s)==="complete"?(h(),m("div",xg,[c(l)?(h(),m("div",Lg,[M[8]||(M[8]=i("svg",{class:"w-12 h-12 mx-auto text-green-500 mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),i("h3",Eg,p(c(t)("brainstorm.issueCreated")),1),i("p",Fg," Issue #"+p(c(l).iid)+" — "+p(c(l).title),1),i("div",Mg,[i("button",{class:"px-4 py-2 text-sm bg-gray-800 text-white rounded-lg hover:bg-gray-700",onClick:v},p(c(t)("brainstorm.startNew")),1)])])):(h(),m(ne,{key:0},[i("div",null,[i("label",wg,p(c(t)("brainstorm.issueTitleLabel")),1),ue(i("input",{"onUpdate:modelValue":M[1]||(M[1]=S=>T.value=S),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-gray-800 focus:border-transparent",placeholder:c(t)("brainstorm.issueTitlePlaceholder")},null,8,kg),[[he,T.value]])]),i("div",$g,[ue(i("input",{id:"auto-finish-label","onUpdate:modelValue":M[2]||(M[2]=S=>I.value=S),type:"checkbox",class:"rounded"},null,512),[[cn,I.value]]),i("label",Sg,p(c(t)("brainstorm.addAutoFinishLabel")),1)]),i("div",_g,[i("div",Cg,[i("h3",Ig,p(c(t)("brainstorm.sddPreview")),1),i("button",{class:"text-sm text-gray-500 hover:text-gray-700",onClick:M[3]||(M[3]=S=>s.value="refine")},p(c(t)("brainstorm.backToRefine")),1)]),i("div",Tg,[i("pre",Pg,p(c(a)),1)])]),i("div",Rg,[i("button",{class:"px-4 py-2 text-sm text-gray-700 border border-gray-300 rounded-lg hover:bg-gray-50",disabled:c(n),onClick:M[4]||(M[4]=S=>k(!1))},p(c(t)("brainstorm.createIssueOnly")),9,Ag),i("button",{class:"px-4 py-2 text-sm bg-gray-800 text-white rounded-lg hover:bg-gray-700 disabled:opacity-50",disabled:c(n),onClick:M[5]||(M[5]=S=>k(!0))},p(c(n)?c(t)("brainstorm.creating"):c(t)("brainstorm.createAndStart")),9,Dg)])],64))])):O("",!0),c(r)?(h(),m("div",jg,p(c(r)),1)):O("",!0)]))}});function Ng(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Bg(){const e=F([]),t=F(null),s=F(!1),n=F(""),r=F(""),o=F(""),l=F(null),a=Ie(()=>t.value?.messages??[]),u=Ie(()=>t.value?.status??"idle"),g=Ie(()=>u.value==="thinking"||s.value);async function d(){try{const R=await kc();e.value=R.sessions}catch(R){n.value=R.message}}async function f(R){n.value="";try{const k=await wc(R);return t.value=k.session,e.value.unshift(k.session),k.session}catch(k){return n.value=k.message,null}}async function y(R){n.value="";try{const k=await Eo(R);t.value=k.session}catch(k){n.value=k.message}}async function x(R){n.value="";try{await $c(R),e.value=e.value.filter(k=>k.id!==R),t.value?.id===R&&(t.value=null)}catch(k){n.value=k.message}}async function w(R){if(R.trim()&&!(!t.value&&!await f())){n.value="",s.value=!0,r.value="",o.value="";try{const k={id:Ng(),role:"user",content:R.trim(),timestamp:new Date().toISOString()};t.value.messages.push(k);const{fetchResponse:v,abort:_}=Sc(t.value.id,R.trim());l.value=_;const M=await v;if(!M.ok){const S=await M.json().catch(()=>({}));throw new Error(S.error||`HTTP ${M.status}`)}await C(M),await T()}catch(k){k.name!=="AbortError"&&(n.value=k.message)}finally{s.value=!1,l.value=null}}}async function C(R){const k=R.body?.getReader();if(!k)return;const v=new TextDecoder;let _="";for(;;){const{done:M,value:S}=await k.read();if(M)break;_+=v.decode(S,{stream:!0});const L=_.split(`
|
|
64
|
+
`);_=L.pop()??"";for(const q of L)if(q.startsWith("data: "))try{const K=JSON.parse(q.slice(6));P(K)}catch{}}}function P(R){if(R.type==="message:thinking"){o.value="chat.thinking.connecting";return}if(R.type==="message:chunk"){const k=R.data;if(!k?.content)return;const v=k.content;if(v.type==="system"){o.value="chat.thinking.connected";return}if(k.type==="stderr"){o.value="chat.thinking.processing";return}if(v.type==="assistant"){o.value="";const _=v.message;if(_?.content)for(const M of _.content)M.type==="text"&&M.text&&(r.value+=M.text);return}if(v.type==="result")return;if(k.type==="partial"){typeof k.content=="string"&&(o.value="",r.value+=k.content);return}typeof k.content=="string"&&(o.value="",r.value+=k.content)}if(R.type==="message:complete"){const k=R.data;k?.message&&t.value&&(k.message.content.startsWith("AI runner 未返回结果")&&r.value.trim()&&(k.message.content=r.value),t.value.messages.find(_=>_.id===k.message.id)||t.value.messages.push(k.message)),r.value="",o.value=""}if(R.type==="error"){const k=R.data;n.value=k?.message??"Unknown error",o.value=""}}async function T(){if(t.value)try{const R=await Eo(t.value.id);t.value=R.session;const k=e.value.findIndex(v=>v.id===R.session.id);k>=0&&(e.value[k]=R.session)}catch{}}function I(){l.value?.()}function H(){t.value=null,s.value=!1,n.value="",r.value="",o.value="",l.value=null}return{sessions:e,currentSession:t,messages:a,loading:s,error:n,streamingContent:r,thinkingStatus:o,status:u,isThinking:g,loadSessions:d,createSession:f,selectSession:y,deleteSession:x,sendMessage:w,abort:I,reset:H}}const Ug={class:"flex h-[calc(100vh-220px)] min-h-[500px] bg-white rounded-lg border border-gray-200 overflow-hidden"},Vg={class:"p-3 border-b border-gray-200 flex items-center justify-between"},Hg=["title"],zg={class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},qg={key:0,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 5l7 7-7 7M5 5l7 7-7 7"},Kg={key:1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 19l-7-7 7-7m8 14l-7-7 7-7"},Gg={key:0,class:"flex-1 overflow-y-auto"},Wg=["onClick"],Jg={class:"flex items-center justify-between"},Zg={class:"text-sm text-gray-800 truncate flex-1"},Qg=["onClick","title"],Yg={class:"text-xs text-gray-400 mt-0.5"},Xg={key:0,class:"p-4 text-center text-sm text-gray-400"},eh={class:"flex-1 flex flex-col"},th={key:0,class:"flex flex-col items-center justify-center h-full text-gray-400"},sh={class:"text-lg font-medium mb-2"},nh={class:"text-sm"},rh={class:"text-sm whitespace-pre-wrap break-words"},oh={key:0,class:"flex justify-start"},lh={class:"max-w-[75%] rounded-lg px-4 py-2.5 bg-gray-100 text-gray-800"},ih={class:"text-sm whitespace-pre-wrap break-words"},ah={class:"flex items-center mt-1"},uh={class:"text-xs text-gray-400"},ch={key:1,class:"flex justify-start"},dh={class:"rounded-lg px-4 py-2.5 bg-gray-100"},ph={class:"flex items-center space-x-1"},fh={key:0,class:"text-xs text-gray-500 ml-1"},gh={key:0,class:"px-4 py-2 bg-red-50 border-t border-red-200"},hh={class:"text-sm text-red-600"},mh={class:"border-t border-gray-200 p-4"},bh={class:"flex items-end space-x-2"},vh=["placeholder","disabled"],yh=["disabled"],xh=Ee({__name:"ChatPanel",setup(e){const{t}=Ht(),{sessions:s,currentSession:n,messages:r,error:o,streamingContent:l,thinkingStatus:a,isThinking:u,loadSessions:g,createSession:d,selectSession:f,deleteSession:y,sendMessage:x,abort:w}=Bg(),C=F(""),P=F(null),T=F(!1);Dt(()=>{g()});function I(){js(()=>{P.value&&(P.value.scrollTop=P.value.scrollHeight)})}rt(r,I,{deep:!0}),rt(l,I);async function H(){const S=C.value.trim();!S||u.value||(C.value="",await x(S))}function R(S){S.key==="Enter"&&!S.shiftKey&&(S.preventDefault(),H())}async function k(){await d()}async function v(S){await f(S)}async function _(S,L){L.stopPropagation(),await y(S)}function M(S){return new Date(S).toLocaleTimeString()}return(S,L)=>(h(),m("div",Ug,[i("div",{class:te(["border-r border-gray-200 flex flex-col bg-gray-50 transition-all",T.value?"w-12":"w-64"])},[i("div",Vg,[T.value?O("",!0):(h(),m("button",{key:0,class:"flex-1 px-3 py-1.5 bg-gray-800 text-white text-sm rounded hover:bg-gray-700 transition-colors mr-2",onClick:k},p(c(t)("chat.newChat")),1)),i("button",{class:"p-1 text-gray-500 hover:text-gray-700",onClick:L[0]||(L[0]=q=>T.value=!T.value),title:T.value?c(t)("chat.expandSidebar"):c(t)("chat.collapseSidebar")},[(h(),m("svg",zg,[T.value?(h(),m("path",qg)):(h(),m("path",Kg))]))],8,Hg)]),T.value?O("",!0):(h(),m("div",Gg,[(h(!0),m(ne,null,Ae(c(s),q=>(h(),m("div",{key:q.id,class:te(["px-3 py-2 cursor-pointer border-b border-gray-100 hover:bg-gray-100 transition-colors group",{"bg-blue-50 border-l-2 border-l-blue-500":c(n)?.id===q.id}]),onClick:K=>v(q.id)},[i("div",Jg,[i("span",Zg,p(q.title),1),i("button",{class:"opacity-0 group-hover:opacity-100 p-0.5 text-gray-400 hover:text-red-500 transition-all",onClick:K=>_(q.id,K),title:c(t)("chat.deleteSession")},[...L[3]||(L[3]=[i("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,Qg)]),i("div",Yg,p(q.messages.length)+" "+p(c(t)("chat.messagesCount")),1)],10,Wg))),128)),c(s).length===0?(h(),m("div",Xg,p(c(t)("chat.noSessions")),1)):O("",!0)]))],2),i("div",eh,[i("div",{ref_key:"messagesContainer",ref:P,class:"flex-1 overflow-y-auto px-4 py-4 space-y-4"},[c(n)?O("",!0):(h(),m("div",th,[L[4]||(L[4]=i("svg",{class:"w-16 h-16 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})],-1)),i("p",sh,p(c(t)("chat.welcome")),1),i("p",nh,p(c(t)("chat.welcomeHint")),1)])),c(n)?(h(),m(ne,{key:1},[(h(!0),m(ne,null,Ae(c(r),q=>(h(),m("div",{key:q.id,class:te(["flex",q.role==="user"?"justify-end":"justify-start"])},[i("div",{class:te(["max-w-[75%] rounded-lg px-4 py-2.5",q.role==="user"?"bg-gray-800 text-white":"bg-gray-100 text-gray-800"])},[i("div",rh,p(q.content),1),i("div",{class:te(["text-xs mt-1 opacity-60",q.role==="user"?"text-gray-300":"text-gray-400"])},p(M(q.timestamp)),3)],2)],2))),128)),c(l)?(h(),m("div",oh,[i("div",lh,[i("div",ih,p(c(l)),1),i("div",ah,[L[5]||(L[5]=i("span",{class:"inline-block w-2 h-2 bg-blue-500 rounded-full animate-pulse mr-1"},null,-1)),i("span",uh,p(c(t)("chat.streaming")),1)])])])):O("",!0),c(u)&&!c(l)?(h(),m("div",ch,[i("div",dh,[i("div",ph,[L[6]||(L[6]=i("span",{class:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{"animation-delay":"0ms"}},null,-1)),L[7]||(L[7]=i("span",{class:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{"animation-delay":"150ms"}},null,-1)),L[8]||(L[8]=i("span",{class:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{"animation-delay":"300ms"}},null,-1)),c(a)?(h(),m("span",fh,p(c(t)(c(a))),1)):O("",!0)])])])):O("",!0)],64)):O("",!0)],512),c(o)?(h(),m("div",gh,[i("p",hh,p(c(o)),1)])):O("",!0),i("div",mh,[i("div",bh,[ue(i("textarea",{"onUpdate:modelValue":L[1]||(L[1]=q=>C.value=q),placeholder:c(t)("chat.inputPlaceholder"),class:"flex-1 resize-none border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-gray-400 focus:border-transparent",rows:"2",disabled:c(u),onKeydown:R},null,40,vh),[[he,C.value]]),c(u)?(h(),m("button",{key:0,class:"px-4 py-2 bg-red-600 text-white text-sm rounded-lg hover:bg-red-700 transition-colors whitespace-nowrap",onClick:L[2]||(L[2]=(...q)=>c(w)&&c(w)(...q))},p(c(t)("chat.stop")),1)):(h(),m("button",{key:1,class:"px-4 py-2 bg-gray-800 text-white text-sm rounded-lg hover:bg-gray-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed whitespace-nowrap",disabled:!C.value.trim(),onClick:H},p(c(t)("chat.send")),9,yh))])])])]))}});function wh(){const e=F([]),t=F(null),s=F(null),n=F(!1),r=F(""),o=F(!1),l=F(""),a=F(null),u=F(!1);let g;const d=F("all"),f=F(""),y=Ie(()=>{let S=e.value;return d.value!=="all"&&(S=S.filter(L=>L.type===d.value)),S});async function x(){n.value=!0,r.value="";try{const S=f.value.trim()||void 0,L=d.value==="all"?void 0:d.value,q=await _c({q:S,type:L});e.value=q.entries}catch(S){r.value=S.message}finally{n.value=!1}}async function w(S){n.value=!0,r.value="";try{const L=await Cc(S);t.value=L.entry}catch(L){r.value=L.message}finally{n.value=!1}}async function C(S){n.value=!0,r.value="";try{await Ic(S),await x(),await M()}catch(L){r.value=L.message}finally{n.value=!1}}async function P(S,L){n.value=!0,r.value="";try{const q=await Tc(S,L);t.value=q.entry,await x()}catch(q){r.value=q.message}finally{n.value=!1}}async function T(S){n.value=!0,r.value="";try{await Pc(S),t.value?.id===S&&(t.value=null),await x(),await M()}catch(L){r.value=L.message}finally{n.value=!1}}function I(){g&&(clearInterval(g),g=void 0)}function H(S){I();const L=new Date(S).getTime();g=setInterval(()=>{a.value&&(a.value={...a.value,elapsed:Date.now()-L})},1e3)}async function R(S=!0){o.value=!0,l.value="",a.value=null,r.value="";try{const K=(await fetch(S?"/api/knowledge/analyze-incremental":"/api/knowledge/analyze",{method:"POST"})).body?.getReader();if(!K)return;const le=new TextDecoder;let ce="",Te=!1;for(;;){const{done:ve,value:ae}=await K.read();if(ve)break;ce+=le.decode(ae,{stream:!0});const oe=ce.split(`
|
|
65
|
+
`);ce=oe.pop()||"";for(const se of oe)if(se.startsWith("data: "))try{const E=JSON.parse(se.slice(6));if(l.value=E.message||E.step,E.step==="error"){r.value=E.error;continue}E.current!=null&&E.total!=null&&(a.value={current:E.current,total:E.total,step:E.step,startedAt:E.startedAt||new Date().toISOString(),elapsed:E.elapsed??(a.value?.elapsed||0)},!Te&&E.startedAt&&(H(E.startedAt),Te=!0))}catch{}}await x(),await M()}catch(L){r.value=L.message}finally{I(),o.value=!1,a.value=null}}Lt(I);async function k(S){u.value=!0,r.value="";try{await Rc(S),await x(),await M()}catch(L){r.value=L.message}finally{u.value=!1}}async function v(S,L){u.value=!0,r.value="";try{await Ac(S,L),await x(),await M()}catch(q){r.value=q.message}finally{u.value=!1}}async function _(S){n.value=!0,r.value="";try{await Dc(S),await w(S),await x()}catch(L){r.value=L.message}finally{n.value=!1}}async function M(){try{const S=await Lc();s.value=S.stats}catch{}}return{entries:e,currentEntry:t,stats:s,loading:n,error:r,analyzing:o,analyzeMessage:l,analyzeProgress:a,importing:u,filterType:d,searchQuery:f,filteredEntries:y,loadEntries:x,loadEntry:w,createEntry:C,updateEntry:P,deleteEntry:T,runAnalysis:R,importIwiki:k,extractFromGongfeng:v,syncEntry:_,loadStats:M}}const kh={class:"space-y-4"},$h={key:0,class:"bg-red-50 border border-red-200 text-red-700 px-4 py-2 rounded text-sm"},Sh={class:"flex flex-wrap items-center gap-2"},_h=["disabled"],Ch=["disabled"],Ih={class:"ml-auto flex items-center gap-2"},Th={key:1,class:"bg-white border border-blue-200 rounded-lg p-4 space-y-3"},Ph={class:"flex items-center justify-between text-sm"},Rh={class:"flex items-center gap-2"},Ah={class:"font-medium text-gray-700"},Dh={key:0,class:"text-gray-500 tabular-nums"},Lh={key:0,class:"w-full bg-gray-200 rounded-full h-2 overflow-hidden"},Eh={key:1,class:"w-full bg-gray-200 rounded-full h-2 overflow-hidden"},Fh={key:2,class:"grid grid-cols-5 gap-3"},Mh={class:"bg-white border rounded p-3 text-center"},jh={class:"text-2xl font-bold text-gray-800"},Oh={class:"bg-blue-50 border rounded p-3 text-center"},Nh={class:"text-2xl font-bold text-blue-700"},Bh={class:"bg-gray-50 border rounded p-3 text-center"},Uh={class:"text-2xl font-bold text-gray-700"},Vh={class:"bg-green-50 border rounded p-3 text-center"},Hh={class:"text-2xl font-bold text-green-700"},zh={class:"bg-orange-50 border rounded p-3 text-center"},qh={class:"text-2xl font-bold text-orange-700"},Kh={class:"bg-white border rounded divide-y"},Gh={key:0,class:"p-8 text-center text-gray-400"},Wh={key:1,class:"p-8 text-center text-gray-400"},Jh=["onClick"],Zh={class:"flex-1 min-w-0"},Qh={class:"flex items-center gap-2"},Yh={class:"font-medium text-sm text-gray-800 truncate"},Xh={class:"flex items-center gap-2 mt-1"},e0={key:0,class:"text-xs text-blue-500 truncate max-w-[200px]"},t0={class:"text-xs text-gray-400 whitespace-nowrap"},s0=["onClick"],n0=["onClick"],r0={class:"bg-white rounded-lg shadow-xl w-full max-w-3xl max-h-[85vh] flex flex-col"},o0={class:"flex items-center justify-between px-6 py-4 border-b"},l0={class:"flex items-center gap-2"},i0={class:"text-lg font-semibold"},a0={class:"flex items-center gap-2"},u0={class:"flex-1 overflow-auto p-6"},c0={key:0,class:"space-y-3"},d0={class:"flex gap-2 justify-end"},p0={key:0,class:"flex gap-1 mb-3"},f0={key:1,class:"text-xs text-gray-400 mb-3"},g0=["href"],h0={class:"prose prose-sm max-w-none whitespace-pre-wrap text-sm text-gray-700 font-mono bg-gray-50 p-4 rounded border"},m0={class:"bg-white rounded-lg shadow-xl w-full max-w-lg p-6 space-y-4"},b0={class:"flex gap-2 justify-end"},v0=["disabled"],y0={class:"bg-white rounded-lg shadow-xl w-full max-w-lg p-6 space-y-4"},x0={class:"flex gap-2 justify-end"},w0=["disabled"],k0={class:"bg-white rounded-lg shadow-xl w-full max-w-lg p-6 space-y-4"},$0={class:"flex gap-3"},S0={class:"flex items-center gap-1 text-sm"},_0={class:"flex items-center gap-1 text-sm"},C0={class:"flex gap-2 justify-end"},I0=["disabled"],T0=Ee({__name:"KnowledgePanel",setup(e){const{entries:t,currentEntry:s,stats:n,loading:r,error:o,analyzing:l,analyzeMessage:a,analyzeProgress:u,importing:g,filterType:d,searchQuery:f,filteredEntries:y,loadEntries:x,loadEntry:w,createEntry:C,updateEntry:P,deleteEntry:T,runAnalysis:I,importIwiki:H,extractFromGongfeng:R,syncEntry:k,loadStats:v}=wh(),_={collecting:"收集项目信息",analyzing:"AI 分析中",saving:"保存分析结果",done:"分析完成",no_changes:"无变更"};function M($e){const j=Math.floor($e/1e3),Q=Math.floor(j/60),b=j%60;return`${String(Q).padStart(2,"0")}:${String(b).padStart(2,"0")}`}const S=F(!1),L=F(!1),q=F(!1),K=F(!1),le=F(!1),ce=F({title:"",content:"",tags:""}),Te=F(""),ve=F("issue"),ae=F(""),oe=F({title:"",content:"",tags:""});Dt(()=>{x(),v()}),rt([d,f],()=>{x()});function se($e){return{"project-meta":"项目分析",custom:"自定义",iwiki:"iwiki",gongfeng:"工蜂"}[$e]||$e}function E($e){return{"project-meta":"bg-blue-100 text-blue-800",custom:"bg-gray-100 text-gray-800",iwiki:"bg-green-100 text-green-800",gongfeng:"bg-orange-100 text-orange-800"}[$e]||"bg-gray-100 text-gray-800"}function z($e){w($e.id),le.value=!1,K.value=!0}function A(){s.value&&(oe.value={title:s.value.title,content:s.value.content,tags:s.value.tags.join(", ")},le.value=!0)}async function Fe(){s.value&&(await P(s.value.id,{title:oe.value.title,content:oe.value.content,tags:oe.value.tags.split(",").map($e=>$e.trim()).filter(Boolean)}),le.value=!1)}async function zt(){await C({title:ce.value.title,content:ce.value.content,tags:ce.value.tags.split(",").map($e=>$e.trim()).filter(Boolean)}),S.value=!1,ce.value={title:"",content:"",tags:""}}async function Et(){await H(Te.value),L.value=!1,Te.value=""}async function bt(){await R(ve.value,parseInt(ae.value)),q.value=!1,ae.value=""}function vt($e){confirm('确定要删除"'+$e.title+'"吗?')&&T($e.id)}function Ft($e){return new Date($e).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}return($e,j)=>(h(),m("div",kh,[c(o)?(h(),m("div",$h,p(c(o)),1)):O("",!0),i("div",Sh,[i("button",{class:"px-3 py-1.5 text-sm bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50",disabled:c(l),onClick:j[0]||(j[0]=Q=>c(I)(!0))},"增量分析",8,_h),i("button",{class:"px-3 py-1.5 text-sm bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",disabled:c(l),onClick:j[1]||(j[1]=Q=>c(I)(!1))},"全量分析",8,Ch),i("button",{class:"px-3 py-1.5 text-sm bg-green-600 text-white rounded hover:bg-green-700",onClick:j[2]||(j[2]=Q=>L.value=!0)},"导入 iwiki"),i("button",{class:"px-3 py-1.5 text-sm bg-orange-500 text-white rounded hover:bg-orange-600",onClick:j[3]||(j[3]=Q=>q.value=!0)},"从工蜂提炼"),i("button",{class:"px-3 py-1.5 text-sm bg-gray-600 text-white rounded hover:bg-gray-700",onClick:j[4]||(j[4]=Q=>S.value=!0)},"新建条目"),i("div",Ih,[ue(i("select",{"onUpdate:modelValue":j[5]||(j[5]=Q=>Le(d)?d.value=Q:null),class:"px-2 py-1.5 text-sm border border-gray-300 rounded"},[...j[33]||(j[33]=[cu('<option value="all" data-v-db7fa114>全部类型</option><option value="project-meta" data-v-db7fa114>项目分析</option><option value="custom" data-v-db7fa114>自定义</option><option value="iwiki" data-v-db7fa114>iwiki</option><option value="gongfeng" data-v-db7fa114>工蜂</option>',5)])],512),[[li,c(d)]]),ue(i("input",{"onUpdate:modelValue":j[6]||(j[6]=Q=>Le(f)?f.value=Q:null),type:"text",placeholder:"搜索标题或标签...",class:"px-3 py-1.5 text-sm border border-gray-300 rounded w-48",onKeyup:j[7]||(j[7]=ai(Q=>c(x)(),["enter"]))},null,544),[[he,c(f)]])])]),c(l)?(h(),m("div",Th,[i("div",Ph,[i("div",Rh,[j[34]||(j[34]=i("svg",{class:"animate-spin h-4 w-4 text-blue-600",viewBox:"0 0 24 24",fill:"none"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),i("span",Ah,[c(u)?(h(),m(ne,{key:0},[de(" 步骤 "+p(c(u).current)+"/"+p(c(u).total)+":"+p(_[c(u).step]||c(a)),1)],64)):(h(),m(ne,{key:1},[de(p(c(a)||"分析中..."),1)],64))])]),c(u)?(h(),m("span",Dh," 已耗时 "+p(M(c(u).elapsed)),1)):O("",!0)]),c(u)?(h(),m("div",Lh,[i("div",{class:te(["h-full rounded-full transition-all duration-500 ease-out",c(u).step==="analyzing"?"analyze-progress-bar-animated bg-blue-500":"bg-blue-600"]),style:yn({width:Math.round(c(u).current/c(u).total*100)+"%"})},null,6)])):(h(),m("div",Eh,[...j[35]||(j[35]=[i("div",{class:"h-full rounded-full bg-blue-500 analyze-progress-bar-animated",style:{width:"100%"}},null,-1)])]))])):O("",!0),c(n)?(h(),m("div",Fh,[i("div",Mh,[i("div",jh,p(c(n).total),1),j[36]||(j[36]=i("div",{class:"text-xs text-gray-500"},"总条目",-1))]),i("div",Oh,[i("div",Nh,p(c(n).byType["project-meta"]||0),1),j[37]||(j[37]=i("div",{class:"text-xs text-gray-500"},"项目分析",-1))]),i("div",Bh,[i("div",Uh,p(c(n).byType.custom||0),1),j[38]||(j[38]=i("div",{class:"text-xs text-gray-500"},"自定义",-1))]),i("div",Vh,[i("div",Hh,p(c(n).byType.iwiki||0),1),j[39]||(j[39]=i("div",{class:"text-xs text-gray-500"},"iwiki",-1))]),i("div",zh,[i("div",qh,p(c(n).byType.gongfeng||0),1),j[40]||(j[40]=i("div",{class:"text-xs text-gray-500"},"工蜂",-1))])])):O("",!0),i("div",Kh,[c(r)&&c(t).length===0?(h(),m("div",Gh,"加载中...")):c(y).length===0?(h(),m("div",Wh,"暂无知识条目")):O("",!0),(h(!0),m(ne,null,Ae(c(y),Q=>(h(),m("div",{key:Q.id,class:"px-4 py-3 flex items-center gap-3 hover:bg-gray-50 cursor-pointer",onClick:b=>z(Q)},[i("div",Zh,[i("div",Qh,[i("span",Yh,p(Q.title),1),i("span",{class:te([E(Q.type),"px-1.5 py-0.5 text-xs rounded-full whitespace-nowrap"])},p(se(Q.type)),3)]),i("div",Xh,[(h(!0),m(ne,null,Ae(Q.tags.slice(0,3),b=>(h(),m("span",{key:b,class:"text-xs bg-gray-100 text-gray-600 px-1.5 py-0.5 rounded"},p(b),1))),128)),Q.source?.url?(h(),m("span",e0,p(Q.source.url),1)):O("",!0)])]),i("div",t0,p(Ft(Q.updatedAt)),1),i("div",{class:"flex items-center gap-1",onClick:j[8]||(j[8]=Nt(()=>{},["stop"]))},[Q.type==="iwiki"?(h(),m("button",{key:0,class:"px-2 py-1 text-xs bg-green-50 text-green-700 rounded hover:bg-green-100",onClick:b=>c(k)(Q.id)},"同步",8,s0)):O("",!0),i("button",{class:"px-2 py-1 text-xs bg-red-50 text-red-700 rounded hover:bg-red-100",onClick:b=>vt(Q)},"删除",8,n0)])],8,Jh))),128))]),K.value&&c(s)?(h(),m("div",{key:3,class:"fixed inset-0 bg-black/40 flex items-center justify-center z-50",onClick:j[16]||(j[16]=Nt(Q=>K.value=!1,["self"]))},[i("div",r0,[i("div",o0,[i("div",l0,[i("h3",i0,p(le.value?"编辑":c(s).title),1),i("span",{class:te([E(c(s).type),"px-2 py-0.5 text-xs rounded-full"])},p(se(c(s).type)),3)]),i("div",a0,[le.value?O("",!0):(h(),m("button",{key:0,class:"px-3 py-1 text-sm bg-blue-50 text-blue-700 rounded hover:bg-blue-100",onClick:j[9]||(j[9]=Q=>A())},"编辑")),i("button",{class:"text-gray-400 hover:text-gray-600 text-xl",onClick:j[10]||(j[10]=Q=>K.value=!1)},"×")])]),i("div",u0,[le.value?(h(),m("div",c0,[ue(i("input",{"onUpdate:modelValue":j[11]||(j[11]=Q=>oe.value.title=Q),class:"w-full px-3 py-2 border rounded text-sm",placeholder:"标题"},null,512),[[he,oe.value.title]]),ue(i("input",{"onUpdate:modelValue":j[12]||(j[12]=Q=>oe.value.tags=Q),class:"w-full px-3 py-2 border rounded text-sm",placeholder:"标签(逗号分隔)"},null,512),[[he,oe.value.tags]]),ue(i("textarea",{"onUpdate:modelValue":j[13]||(j[13]=Q=>oe.value.content=Q),class:"w-full px-3 py-2 border rounded text-sm font-mono",rows:"20",placeholder:"Markdown 内容"},null,512),[[he,oe.value.content]]),i("div",d0,[i("button",{class:"px-4 py-2 text-sm bg-gray-200 rounded hover:bg-gray-300",onClick:j[14]||(j[14]=Q=>le.value=!1)},"取消"),i("button",{class:"px-4 py-2 text-sm bg-blue-600 text-white rounded hover:bg-blue-700",onClick:j[15]||(j[15]=Q=>Fe())},"保存")])])):(h(),m(ne,{key:1},[c(s).tags.length?(h(),m("div",p0,[(h(!0),m(ne,null,Ae(c(s).tags,Q=>(h(),m("span",{key:Q,class:"text-xs bg-gray-100 text-gray-600 px-2 py-0.5 rounded"},p(Q),1))),128))])):O("",!0),c(s).source?.url?(h(),m("div",f0,[j[41]||(j[41]=de(" 来源: ",-1)),i("a",{href:c(s).source.url,target:"_blank",class:"text-blue-500 hover:underline"},p(c(s).source.url),9,g0)])):O("",!0),i("div",h0,p(c(s).content),1)],64))])])])):O("",!0),S.value?(h(),m("div",{key:4,class:"fixed inset-0 bg-black/40 flex items-center justify-center z-50",onClick:j[22]||(j[22]=Nt(Q=>S.value=!1,["self"]))},[i("div",m0,[j[42]||(j[42]=i("h3",{class:"text-lg font-semibold"},"新建知识条目",-1)),ue(i("input",{"onUpdate:modelValue":j[17]||(j[17]=Q=>ce.value.title=Q),class:"w-full px-3 py-2 border rounded text-sm",placeholder:"标题"},null,512),[[he,ce.value.title]]),ue(i("input",{"onUpdate:modelValue":j[18]||(j[18]=Q=>ce.value.tags=Q),class:"w-full px-3 py-2 border rounded text-sm",placeholder:"标签(逗号分隔)"},null,512),[[he,ce.value.tags]]),ue(i("textarea",{"onUpdate:modelValue":j[19]||(j[19]=Q=>ce.value.content=Q),class:"w-full px-3 py-2 border rounded text-sm font-mono",rows:"10",placeholder:"Markdown 内容"},null,512),[[he,ce.value.content]]),i("div",b0,[i("button",{class:"px-4 py-2 text-sm bg-gray-200 rounded hover:bg-gray-300",onClick:j[20]||(j[20]=Q=>S.value=!1)},"取消"),i("button",{class:"px-4 py-2 text-sm bg-blue-600 text-white rounded hover:bg-blue-700",disabled:!ce.value.title||!ce.value.content,onClick:j[21]||(j[21]=Q=>zt())},"创建",8,v0)])])])):O("",!0),L.value?(h(),m("div",{key:5,class:"fixed inset-0 bg-black/40 flex items-center justify-center z-50",onClick:j[26]||(j[26]=Nt(Q=>L.value=!1,["self"]))},[i("div",y0,[j[43]||(j[43]=i("h3",{class:"text-lg font-semibold"},"导入 iwiki 页面",-1)),ue(i("input",{"onUpdate:modelValue":j[23]||(j[23]=Q=>Te.value=Q),class:"w-full px-3 py-2 border rounded text-sm",placeholder:"输入 iwiki 页面 URL"},null,512),[[he,Te.value]]),i("div",x0,[i("button",{class:"px-4 py-2 text-sm bg-gray-200 rounded hover:bg-gray-300",onClick:j[24]||(j[24]=Q=>L.value=!1)},"取消"),i("button",{class:"px-4 py-2 text-sm bg-green-600 text-white rounded hover:bg-green-700",disabled:!Te.value||c(g),onClick:j[25]||(j[25]=Q=>Et())},p(c(g)?"导入中...":"导入"),9,w0)])])])):O("",!0),q.value?(h(),m("div",{key:6,class:"fixed inset-0 bg-black/40 flex items-center justify-center z-50",onClick:j[32]||(j[32]=Nt(Q=>q.value=!1,["self"]))},[i("div",k0,[j[46]||(j[46]=i("h3",{class:"text-lg font-semibold"},"从工蜂提炼知识",-1)),i("div",$0,[i("label",S0,[ue(i("input",{"onUpdate:modelValue":j[27]||(j[27]=Q=>ve.value=Q),type:"radio",value:"issue"},null,512),[[To,ve.value]]),j[44]||(j[44]=de(" Issue ",-1))]),i("label",_0,[ue(i("input",{"onUpdate:modelValue":j[28]||(j[28]=Q=>ve.value=Q),type:"radio",value:"mr"},null,512),[[To,ve.value]]),j[45]||(j[45]=de(" Merge Request ",-1))])]),ue(i("input",{"onUpdate:modelValue":j[29]||(j[29]=Q=>ae.value=Q),class:"w-full px-3 py-2 border rounded text-sm",placeholder:"输入 Issue/MR 编号 (IID)"},null,512),[[he,ae.value]]),i("div",C0,[i("button",{class:"px-4 py-2 text-sm bg-gray-200 rounded hover:bg-gray-300",onClick:j[30]||(j[30]=Q=>q.value=!1)},"取消"),i("button",{class:"px-4 py-2 text-sm bg-orange-500 text-white rounded hover:bg-orange-600",disabled:!ae.value||c(g),onClick:j[31]||(j[31]=Q=>bt())},p(c(g)?"提炼中...":"提炼"),9,I0)])])])):O("",!0)]))}}),P0=(e,t)=>{const s=e.__vccOpts||e;for(const[n,r]of t)s[n]=r;return s},R0=P0(T0,[["__scopeId","data-v-db7fa114"]]),A0={key:0,class:"fixed inset-0 z-50 flex items-center justify-center"},D0={class:"relative bg-white rounded-xl shadow-2xl w-full max-w-xl max-h-[90vh] overflow-y-auto"},L0={class:"sticky top-0 bg-white border-b border-gray-200 px-6 py-4 flex items-center justify-between z-10 rounded-t-xl"},E0={class:"text-lg font-bold text-gray-800"},F0={class:"px-6 py-4 space-y-4"},M0={class:"text-sm text-gray-500 mb-1"},j0={class:"text-sm font-medium text-gray-800"},O0={key:0},N0={class:"text-sm text-gray-500 mb-1"},B0={class:"text-sm text-gray-600 bg-gray-50 rounded-lg p-3 max-h-32 overflow-y-auto whitespace-pre-wrap"},U0={class:"border-t border-gray-200 pt-4"},V0={class:"text-sm font-semibold text-gray-700 mb-3"},H0={class:"space-y-3"},z0={class:"block text-xs font-medium text-gray-600 mb-1"},q0=["value","placeholder"],K0={class:"block text-xs font-medium text-gray-600 mb-1"},G0=["value","placeholder"],W0={class:"block text-xs font-medium text-gray-600 mb-1"},J0=["value","placeholder"],Z0={class:"block text-xs font-medium text-gray-600 mb-1"},Q0=["value","placeholder"],Y0={class:"block text-xs font-medium text-gray-600 mb-1"},X0=["value","placeholder"],em={class:"block text-xs font-medium text-gray-600 mb-1"},tm=["value","placeholder"],sm={class:"block text-xs font-medium text-gray-600 mb-1"},nm=["value","placeholder"],rm={class:"sticky bottom-0 bg-white border-t border-gray-200 px-6 py-4 flex justify-end space-x-3 rounded-b-xl"},om=["disabled"],lm=Ee({__name:"StartDialog",props:{issue:{},supplement:{},processing:{type:Boolean}},emits:["close","start","update:supplement"],setup(e,{emit:t}){const s=e,n=t;function r(o,l){n("update:supplement",{...s.supplement,[o]:l})}return(o,l)=>(h(),Qe(Pr,{name:"fade"},{default:Sn(()=>[e.issue?(h(),m("div",A0,[i("div",{class:"absolute inset-0 bg-black/30",onClick:l[0]||(l[0]=a=>n("close"))}),i("div",D0,[i("div",L0,[i("h2",E0,p(o.$t("start.title",{iid:e.issue.iid})),1),i("button",{class:"text-gray-400 hover:text-gray-600 text-2xl leading-none",onClick:l[1]||(l[1]=a=>n("close"))},"×")]),i("div",F0,[i("div",null,[i("div",M0,p(o.$t("start.issueTitle")),1),i("div",j0,p(e.issue.title),1)]),e.issue.description?(h(),m("div",O0,[i("div",N0,p(o.$t("start.descPreview")),1),i("div",B0,p(e.issue.description?.slice(0,500))+p((e.issue.description?.length||0)>500?"...":""),1)])):O("",!0),i("div",U0,[i("h3",V0,p(o.$t("start.supplement")),1),i("div",H0,[i("div",null,[i("label",z0,p(o.$t("start.requirements")),1),i("textarea",{value:e.supplement.requirements,onInput:l[2]||(l[2]=a=>r("requirements",a.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:o.$t("start.requirementsPlaceholder")},null,40,q0)]),i("div",null,[i("label",K0,p(o.$t("start.acceptance")),1),i("textarea",{value:e.supplement.acceptanceCriteria,onInput:l[3]||(l[3]=a=>r("acceptanceCriteria",a.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:o.$t("start.acceptancePlaceholder")},null,40,G0)]),i("div",null,[i("label",W0,p(o.$t("start.scope")),1),i("input",{value:e.supplement.scope,onInput:l[4]||(l[4]=a=>r("scope",a.target.value)),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:o.$t("start.scopePlaceholder")},null,40,J0)]),i("div",null,[i("label",Z0,p(o.$t("start.constraints")),1),i("textarea",{value:e.supplement.constraints,onInput:l[5]||(l[5]=a=>r("constraints",a.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:o.$t("start.constraintsPlaceholder")},null,40,Q0)]),i("div",null,[i("label",Y0,p(o.$t("start.references")),1),i("textarea",{value:e.supplement.references,onInput:l[6]||(l[6]=a=>r("references",a.target.value)),rows:"1",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:o.$t("start.referencesPlaceholder")},null,40,X0)]),i("div",null,[i("label",em,p(o.$t("start.freeText")),1),i("textarea",{value:e.supplement.freeText,onInput:l[7]||(l[7]=a=>r("freeText",a.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:o.$t("start.freeTextPlaceholder")},null,40,tm)]),i("div",null,[i("label",sm,p(o.$t("start.tapdId")),1),i("input",{value:e.supplement.tapdId,onInput:l[8]||(l[8]=a=>r("tapdId",a.target.value)),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:o.$t("start.tapdIdPlaceholder")},null,40,nm)])])])]),i("div",rm,[i("button",{class:"px-4 py-2 text-sm text-gray-600 bg-gray-100 rounded-lg hover:bg-gray-200",onClick:l[9]||(l[9]=a=>n("close"))},p(o.$t("start.cancel")),1),i("button",{class:"px-4 py-2 text-sm text-white bg-green-500 rounded-lg hover:bg-green-600 font-medium disabled:opacity-50",disabled:e.processing,onClick:l[10]||(l[10]=a=>n("start"))},p(e.processing?o.$t("start.processing"):o.$t("start.submit")),9,om)])])])):O("",!0)]),_:1}))}}),im={class:"text-base font-semibold text-gray-700 mb-3"},am={class:"flex items-center justify-between"},um={class:"flex flex-col items-center space-y-1"},cm={key:0},dm={key:1,class:"pulse-dot"},pm={key:2},fm={key:3},gm={class:"text-xs text-gray-600"},hm={key:0,class:"text-xs text-gray-400"},mm=["onClick"],bm=Ee({__name:"PipelineProgress",props:{issue:{},progress:{}},emits:["retryFromPhase"],setup(e,{emit:t}){const s=e,n=t,{getPhaseNames:r,phaseLabel:o,phaseNodeClass:l}=Ns();function a(g){return s.progress?.phases?.[g]?s.progress.phases[g].status:"pending"}function u(g){if(!s.progress?.phases)return"";const d=s.progress.phases[g];if(!d?.startedAt)return"";const f=new Date(d.startedAt),y=d.completedAt?new Date(d.completedAt):new Date;return ci(y.getTime()-f.getTime())}return(g,d)=>(h(),m("div",null,[i("h3",im,p(g.$t("pipeline.title")),1),i("div",am,[(h(!0),m(ne,null,Ae(c(r)(e.issue),(f,y)=>(h(),m(ne,{key:f},[i("div",um,[i("div",{class:te(["w-10 h-10 rounded-full flex items-center justify-center text-sm font-bold",c(l)(a(f))])},[a(f)==="completed"?(h(),m("span",cm,"✓")):a(f)==="in_progress"?(h(),m("span",dm,"●")):a(f)==="failed"?(h(),m("span",pm,"✗")):(h(),m("span",fm,p(y+1),1))],2),i("span",gm,p(c(o)(f)),1),u(f)?(h(),m("span",hm,p(u(f)),1)):O("",!0),i("button",{class:"text-xs text-blue-500 hover:text-blue-700 hover:underline mt-0.5",onClick:x=>n("retryFromPhase",f)},p(g.$t("pipeline.retryFrom")),9,mm)]),y<c(r)(e.issue).length-1?(h(),m("div",{key:0,class:te(["flex-1 h-0.5 mx-2",a(c(r)(e.issue)[y])==="completed"?"bg-green-400":"bg-gray-200"])},null,2)):O("",!0)],64))),128))])]))}}),vm={class:"bg-yellow-50 border-2 border-yellow-300 rounded-lg p-4"},ym={class:"text-base font-semibold text-yellow-800 mb-3"},xm={class:"text-sm text-yellow-700 mb-3"},wm={key:0,class:"text-yellow-600 font-medium"},km={key:0,class:"mb-4"},$m={class:"flex items-center mb-2"},Sm={class:"text-xs font-semibold text-yellow-700"},_m={class:"ml-2 px-1.5 py-0.5 text-xs bg-yellow-200 text-yellow-800 rounded-full"},Cm={class:"space-y-2 max-h-48 overflow-y-auto border border-yellow-200 rounded-lg bg-white/60 p-3"},Im={class:"flex items-baseline space-x-2 mb-0.5"},Tm={class:"text-xs font-semibold text-yellow-700"},Pm={class:"text-xs text-gray-400"},Rm={class:"text-sm text-gray-700 whitespace-pre-wrap break-words"},Am={class:"flex items-center space-x-3 mb-3"},Dm=["disabled"],Lm=["disabled"],Em={class:"space-y-2"},Fm={class:"block text-xs font-medium text-yellow-700"},Mm=["placeholder"],jm=["disabled"],Om=Ee({__name:"ReviewGatePanel",props:nn({reviewSubmitting:{type:Boolean},reviewHistory:{}},{reviewFeedback:{required:!0},reviewFeedbackModifiers:{}}),emits:nn(["approve","reject","skip"],["update:reviewFeedback"]),setup(e,{emit:t}){const s=nr(e,"reviewFeedback"),n=t;function r(o){try{return new Date(o).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}catch{return o}}return(o,l)=>(h(),m("div",vm,[i("h3",ym,p(o.$t("review.title")),1),i("p",xm,[de(p(o.$t("review.description"))+" ",1),e.reviewHistory.length>0?(h(),m("span",wm,p(o.$t("review.currentRound",{round:e.reviewHistory.length+1})),1)):O("",!0)]),e.reviewHistory.length>0?(h(),m("div",km,[i("div",$m,[i("span",Sm,p(o.$t("review.history")),1),i("span",_m,p(o.$t("review.roundLabel",{n:e.reviewHistory.length})),1)]),i("div",Cm,[(h(!0),m(ne,null,Ae(e.reviewHistory,a=>(h(),m("div",{key:a.round,class:te(["relative pl-5 pb-2 border-l-2",a.round===e.reviewHistory.length?"border-yellow-500":"border-yellow-200"])},[i("div",{class:te(["absolute left-[-5px] top-1 w-2 h-2 rounded-full",a.round===e.reviewHistory.length?"bg-yellow-500":"bg-yellow-300"])},null,2),i("div",Im,[i("span",Tm,p(o.$t("review.roundPrefix",{round:a.round})),1),i("span",Pm,p(r(a.timestamp)),1)]),i("p",Rm,p(a.feedback),1)],2))),128))])])):O("",!0),i("div",Am,[i("button",{class:"px-4 py-2 bg-green-500 text-white text-sm rounded-lg hover:bg-green-600 font-medium disabled:opacity-50",disabled:e.reviewSubmitting,onClick:l[0]||(l[0]=a=>n("approve"))},p(e.reviewSubmitting?o.$t("review.submitting"):o.$t("review.approve")),9,Dm),i("button",{class:"px-4 py-2 bg-gray-400 text-white text-sm rounded-lg hover:bg-gray-500 font-medium disabled:opacity-50",disabled:e.reviewSubmitting,onClick:l[1]||(l[1]=a=>n("skip"))},p(o.$t("review.skip")),9,Lm)]),i("div",Em,[i("label",Fm,p(o.$t("review.feedbackLabel")),1),ue(i("textarea",{"onUpdate:modelValue":l[2]||(l[2]=a=>s.value=a),rows:"3",class:"w-full border border-yellow-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-yellow-400",placeholder:o.$t("review.feedbackPlaceholder")},null,8,Mm),[[he,s.value]]),i("button",{class:"px-4 py-2 bg-red-500 text-white text-sm rounded-lg hover:bg-red-600 font-medium disabled:opacity-50",disabled:e.reviewSubmitting||!s.value.trim(),onClick:l[3]||(l[3]=a=>n("reject"))},p(o.$t("review.reject")),9,jm)])]))}}),Nm={class:"flex items-center justify-between mb-2"},Bm={class:"text-base font-semibold text-gray-700"},Um={class:"flex items-center space-x-2"},Vm=["disabled"],Hm={key:0,class:"py-4 text-center text-gray-400 text-sm"},zm={key:1},qm={key:0,class:"space-y-2 text-sm"},Km={key:0},Gm={class:"text-gray-500 font-medium"},Wm={class:"text-gray-700"},Jm={key:1},Zm={class:"text-gray-500 font-medium"},Qm={class:"text-gray-700"},Ym={key:2},Xm={class:"text-gray-500 font-medium"},eb={class:"text-gray-700"},tb={key:3},sb={class:"text-gray-500 font-medium"},nb={class:"text-gray-700"},rb={key:4},ob={class:"text-gray-500 font-medium"},lb={class:"text-gray-700"},ib={key:5},ab={class:"text-gray-500 font-medium"},ub={class:"text-gray-700"},cb={key:6},db={class:"text-gray-500 font-medium"},pb={class:"text-gray-700"},fb={key:1,class:"py-4 text-center text-gray-400 text-sm"},gb={key:2,class:"space-y-3"},hb={class:"block text-xs font-medium text-gray-600 mb-1"},mb=["value"],bb={class:"block text-xs font-medium text-gray-600 mb-1"},vb=["value"],yb={class:"block text-xs font-medium text-gray-600 mb-1"},xb=["value"],wb={class:"block text-xs font-medium text-gray-600 mb-1"},kb=["value"],$b={class:"block text-xs font-medium text-gray-600 mb-1"},Sb=["value"],_b={class:"block text-xs font-medium text-gray-600 mb-1"},Cb=["value"],Ib={class:"block text-xs font-medium text-gray-600 mb-1"},Tb=["value","placeholder"],Pb=Ee({__name:"SupplementEditor",props:{supplement:{},supplementForm:{},loading:{type:Boolean},editing:{type:Boolean},saving:{type:Boolean},hasData:{type:Boolean}},emits:["edit","save","cancel","update:supplementForm"],setup(e,{emit:t}){const s=e,n=t;function r(o,l){n("update:supplementForm",{...s.supplementForm,[o]:l})}return(o,l)=>(h(),m("div",null,[i("div",Nm,[i("h3",Bm,p(o.$t("supplement.title")),1),i("div",Um,[e.editing?(h(),m(ne,{key:1},[i("button",{class:"px-2 py-1 text-xs bg-green-500 text-white rounded hover:bg-green-600",disabled:e.saving,onClick:l[1]||(l[1]=a=>n("save"))},p(e.saving?o.$t("supplement.saving"):o.$t("supplement.save")),9,Vm),i("button",{class:"px-2 py-1 text-xs bg-gray-200 text-gray-600 rounded hover:bg-gray-300",onClick:l[2]||(l[2]=a=>n("cancel"))},p(o.$t("supplement.cancel")),1)],64)):(h(),m("button",{key:0,class:"px-2 py-1 text-xs bg-blue-100 text-blue-600 rounded hover:bg-blue-200",onClick:l[0]||(l[0]=a=>n("edit"))},p(o.$t("supplement.edit")),1))])]),e.loading?(h(),m("div",Hm,p(o.$t("supplement.loading")),1)):e.editing?(h(),m("div",gb,[i("div",null,[i("label",hb,p(o.$t("supplement.requirementsLabel")),1),i("textarea",{value:e.supplementForm.requirements,onInput:l[3]||(l[3]=a=>r("requirements",a.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,mb)]),i("div",null,[i("label",bb,p(o.$t("supplement.acceptanceLabel")),1),i("textarea",{value:e.supplementForm.acceptanceCriteria,onInput:l[4]||(l[4]=a=>r("acceptanceCriteria",a.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,vb)]),i("div",null,[i("label",yb,p(o.$t("supplement.scopeLabel")),1),i("input",{value:e.supplementForm.scope,onInput:l[5]||(l[5]=a=>r("scope",a.target.value)),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,xb)]),i("div",null,[i("label",wb,p(o.$t("supplement.constraintsLabel")),1),i("textarea",{value:e.supplementForm.constraints,onInput:l[6]||(l[6]=a=>r("constraints",a.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,kb)]),i("div",null,[i("label",$b,p(o.$t("supplement.referencesLabel")),1),i("textarea",{value:e.supplementForm.references,onInput:l[7]||(l[7]=a=>r("references",a.target.value)),rows:"1",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,Sb)]),i("div",null,[i("label",_b,p(o.$t("supplement.freeTextLabel")),1),i("textarea",{value:e.supplementForm.freeText,onInput:l[8]||(l[8]=a=>r("freeText",a.target.value)),rows:"2",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,Cb)]),i("div",null,[i("label",Ib,p(o.$t("supplement.tapdIdLabel")),1),i("input",{value:e.supplementForm.tapdId,onInput:l[9]||(l[9]=a=>r("tapdId",a.target.value)),type:"text",placeholder:o.$t("supplement.tapdIdPlaceholder"),class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"},null,40,Tb)])])):(h(),m("div",zm,[e.hasData?(h(),m("div",qm,[e.supplement.requirements?(h(),m("div",Km,[i("span",Gm,p(o.$t("supplement.requirements")),1),l[10]||(l[10]=de()),i("span",Wm,p(e.supplement.requirements),1)])):O("",!0),e.supplement.acceptanceCriteria?(h(),m("div",Jm,[i("span",Zm,p(o.$t("supplement.acceptance")),1),l[11]||(l[11]=de()),i("span",Qm,p(e.supplement.acceptanceCriteria),1)])):O("",!0),e.supplement.scope?(h(),m("div",Ym,[i("span",Xm,p(o.$t("supplement.scope")),1),l[12]||(l[12]=de()),i("span",eb,p(e.supplement.scope),1)])):O("",!0),e.supplement.constraints?(h(),m("div",tb,[i("span",sb,p(o.$t("supplement.constraints")),1),l[13]||(l[13]=de()),i("span",nb,p(e.supplement.constraints),1)])):O("",!0),e.supplement.references?(h(),m("div",rb,[i("span",ob,p(o.$t("supplement.references")),1),l[14]||(l[14]=de()),i("span",lb,p(e.supplement.references),1)])):O("",!0),e.supplement.freeText?(h(),m("div",ib,[i("span",ab,p(o.$t("supplement.freeText")),1),l[15]||(l[15]=de()),i("span",ub,p(e.supplement.freeText),1)])):O("",!0),e.supplement.tapdId?(h(),m("div",cb,[i("span",db,p(o.$t("supplement.tapdId")),1),l[16]||(l[16]=de()),i("span",pb,p(e.supplement.tapdId),1)])):O("",!0)])):(h(),m("div",fb,p(o.$t("supplement.empty")),1))]))]))}}),Rb={class:"flex items-center justify-between mb-2"},Ab={class:"text-base font-semibold text-gray-700"},Db={class:"flex items-center space-x-2"},Lb={class:"flex items-center space-x-1 text-xs text-gray-500 cursor-pointer"},Eb={class:"flex items-center space-x-1 text-xs text-gray-500 cursor-pointer"},Fb={key:0,class:"border border-gray-200 rounded-lg p-6 text-center text-gray-400 text-sm"},Mb={class:"text-xs mt-1"},jb={key:0,class:"text-xs mt-1"},Ob={class:"log-badge"},Nb={class:"text-gray-400 text-xs mr-1"},Bb={key:0,class:"text-gray-400 text-xs mr-1"},Ub={class:"text-gray-700 break-all"},Vb={key:2,class:"text-xs text-gray-400 mt-1 text-right"},Hb=Ee({__name:"AgentLogViewer",props:nn({logs:{},issueState:{}},{autoScroll:{type:Boolean,default:!0},autoScrollModifiers:{},debugMode:{type:Boolean,default:!1},debugModeModifiers:{}}),emits:nn(["clear"],["update:autoScroll","update:debugMode"]),setup(e,{emit:t}){const s=t,n=nr(e,"autoScroll"),r=nr(e,"debugMode"),{stateLabel:o,isTerminalState:l}=Ns(),{agentLogContainer:a,agentLogLabel:u}=ui();return(g,d)=>(h(),m("div",null,[i("div",Rb,[i("h3",Ab,p(g.$t("agentLog.title")),1),i("div",Db,[i("label",Lb,[ue(i("input",{type:"checkbox","onUpdate:modelValue":d[0]||(d[0]=f=>n.value=f),class:"rounded"},null,512),[[cn,n.value]]),i("span",null,p(g.$t("agentLog.autoScroll")),1)]),i("label",Eb,[ue(i("input",{type:"checkbox","onUpdate:modelValue":d[1]||(d[1]=f=>r.value=f),class:"rounded"},null,512),[[cn,r.value]]),d[3]||(d[3]=i("span",null,"Debug",-1))]),i("button",{class:"px-2 py-0.5 text-xs bg-gray-200 text-gray-600 rounded hover:bg-gray-300",onClick:d[2]||(d[2]=f=>s("clear"))},p(g.$t("agentLog.clear")),1)])]),e.logs.length===0?(h(),m("div",Fb,[e.issueState&&c(l)(e.issueState)?(h(),m(ne,{key:0},[d[4]||(d[4]=i("svg",{class:"h-5 w-5 mx-auto mb-2 text-gray-300",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12h6m-3-3v6m-7 4h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})],-1)),i("div",null,p(g.$t("agentLog.ended")),1),i("div",Mb,[de(p(g.$t("agentLog.finalState"))+" ",1),i("span",{class:te(e.issueState==="completed"?"text-green-500":"text-red-500")},p(c(o)(e.issueState)),3)])],64)):(h(),m(ne,{key:1},[d[5]||(d[5]=i("svg",{class:"animate-spin h-5 w-5 mx-auto mb-2 text-blue-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),i("div",null,p(g.$t("agentLog.waiting")),1),e.issueState?(h(),m("div",jb,p(g.$t("agentLog.currentState"))+" "+p(c(o)(e.issueState)),1)):O("",!0)],64))])):(h(),m("div",{key:1,ref_key:"agentLogContainer",ref:a,class:"agent-log border border-gray-200 rounded-lg overflow-y-auto bg-white",style:{"max-height":"20rem"}},[(h(!0),m(ne,null,Ae(e.logs,(f,y)=>(h(),m("div",{key:y,class:te(["agent-log-item","log-"+f.type])},[i("span",Ob,p(c(u)(f.type)),1),i("span",Nb,p(c(Qc)(f.timestamp)),1),f.phase?(h(),m("span",Bb,"["+p(f.phase)+"]",1)):O("",!0),i("span",Ub,p(f.summary),1)],2))),128))],512)),e.logs.length>0?(h(),m("div",Vb,p(g.$t("agentLog.count",{count:e.logs.length})),1)):O("",!0)]))}}),zb={class:"flex items-center justify-between mb-2"},qb={class:"text-base font-semibold text-gray-700"},Kb={class:"flex items-center space-x-2"},Gb=["disabled"],Wb=["title"],Jb={class:"flex space-x-1 mb-3 border-b border-gray-200"},Zb=["onClick"],Qb={key:0,class:"py-8 text-center text-gray-400"},Yb={key:1,class:"py-8 text-center text-gray-400"},Xb={key:2},ev=["placeholder"],tv=["innerHTML"],sv={key:4,class:"py-8 text-center text-gray-400"},nv={key:0,class:"fullscreen-doc-overlay"},rv={class:"fullscreen-doc-container"},ov={class:"flex items-center justify-between px-6 py-4 border-b border-gray-200 shrink-0"},lv={class:"flex items-center space-x-3"},iv={class:"text-lg font-bold text-gray-800"},av={class:"text-sm text-gray-400"},uv={class:"flex items-center space-x-2"},cv=["disabled"],dv=["title"],pv={class:"flex space-x-1 px-6 pt-3 border-b border-gray-200 shrink-0"},fv=["onClick"],gv={class:"flex-1 overflow-y-auto min-h-0"},hv={key:0,class:"flex items-center justify-center h-full text-gray-400"},mv={class:"text-base"},bv={key:1,class:"flex items-center justify-center h-full text-gray-400"},vv={class:"text-base"},yv={key:2,class:"h-full p-4"},xv=["placeholder"],wv=["innerHTML"],kv={key:4,class:"flex items-center justify-center h-full text-gray-400"},$v={class:"text-base"},Sv=Ee({__name:"PlanDocViewer",props:{issueIid:{},planDocs:{},isEditableDoc:{type:Function},detailVersion:{}},setup(e,{expose:t}){const s=e;rt(()=>s.detailVersion,()=>{n.value&&w(n.value)});const n=F(null),r=F(""),o=F(!1),l=F(""),a=F(!1),u=F(""),g=F(!1),d=F(!1),f=F(!1),{t:y}=Ht(),x={"review-feedback.md":()=>y("planDoc.noReviewFeedback"),"02-verify-report.md":()=>y("planDoc.verifyNotGenerated"),"04-verify-report.md":()=>y("planDoc.verifyNotGenerated")};async function w(k){n.value=k,a.value=!1,u.value="",o.value=!0,r.value="",l.value="",d.value=!1;try{r.value=await Lo(s.issueIid,k,"html")}catch(v){const _=v.message;_.includes("not found")&&k in x?(d.value=!0,l.value=x[k]()):l.value=_}finally{o.value=!1}}async function C(){if(n.value)try{u.value=await Lo(s.issueIid,n.value,"raw"),a.value=!0}catch(k){alert(y("planDoc.fetchFailed")+" "+k.message)}}function P(){a.value=!1,u.value="",n.value&&w(n.value)}async function T(){if(n.value){g.value=!0;try{await cc(s.issueIid,n.value,u.value),a.value=!1,u.value="",await w(n.value)}catch(k){alert(y("planDoc.saveFailed")+" "+k.message)}finally{g.value=!1}}}function I(){f.value=!0,document.body.style.overflow="hidden",!n.value&&s.planDocs.length>0&&w(s.planDocs[0].file)}function H(){f.value=!1,document.body.style.overflow=""}function R(k){k.key==="Escape"&&f.value&&H()}return Dt(()=>{document.addEventListener("keydown",R),s.planDocs.length>0&&w(s.planDocs[0].file)}),Lt(()=>{document.removeEventListener("keydown",R),document.body.style.overflow=""}),t({activeDoc:n}),(k,v)=>(h(),m("div",null,[i("div",zb,[i("h3",qb,p(k.$t("planDoc.title")),1),i("div",Kb,[n.value&&e.isEditableDoc(n.value)&&!f.value?(h(),m(ne,{key:0},[a.value?(h(),m(ne,{key:1},[i("button",{class:"px-2 py-1 text-xs bg-green-500 text-white rounded hover:bg-green-600",disabled:g.value,onClick:v[1]||(v[1]=_=>T())},p(g.value?k.$t("planDoc.saving"):k.$t("planDoc.save")),9,Gb),i("button",{class:"px-2 py-1 text-xs bg-gray-200 text-gray-600 rounded hover:bg-gray-300",onClick:v[2]||(v[2]=_=>P())},p(k.$t("planDoc.cancel")),1)],64)):(h(),m("button",{key:0,class:"px-2 py-1 text-xs bg-blue-100 text-blue-600 rounded hover:bg-blue-200",onClick:v[0]||(v[0]=_=>C())},p(k.$t("planDoc.edit")),1))],64)):O("",!0),i("button",{class:"px-2 py-1 text-xs bg-gray-100 text-gray-600 rounded hover:bg-gray-200 inline-flex items-center space-x-1",title:k.$t("planDoc.fullscreen"),onClick:v[3]||(v[3]=_=>I())},[v[10]||(v[10]=i("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})],-1)),i("span",null,p(k.$t("planDoc.expand")),1)],8,Wb)])]),i("div",Jb,[(h(!0),m(ne,null,Ae(e.planDocs,_=>(h(),m("button",{key:_.file,class:te(["px-3 py-2 text-sm font-medium border-b-2 transition-colors",n.value===_.file?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:M=>w(_.file)},p(_.label),11,Zb))),128))]),o.value?(h(),m("div",Qb,p(k.$t("planDoc.loading")),1)):l.value?(h(),m("div",Yb,p(l.value),1)):a.value&&!f.value?(h(),m("div",Xb,[ue(i("textarea",{"onUpdate:modelValue":v[4]||(v[4]=_=>u.value=_),class:"w-full h-96 border border-gray-300 rounded-lg p-3 text-sm font-mono text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:k.$t("planDoc.editPlaceholder")},null,8,ev),[[he,u.value]])])):r.value&&!f.value?(h(),m("div",{key:3,class:"plan-doc text-sm text-gray-700 max-h-96 overflow-y-auto border border-gray-100 rounded-lg p-4",innerHTML:r.value},null,8,tv)):f.value?O("",!0):(h(),m("div",sv,p(k.$t("planDoc.selectTab")),1)),(h(),Qe(wa,{to:"body"},[Ce(Pr,{name:"fullscreen-fade"},{default:Sn(()=>[f.value?(h(),m("div",nv,[i("div",rv,[i("div",ov,[i("div",lv,[i("h2",iv,p(k.$t("planDoc.title")),1),i("span",av,"Issue #"+p(e.issueIid),1)]),i("div",uv,[n.value&&e.isEditableDoc(n.value)?(h(),m(ne,{key:0},[a.value?(h(),m(ne,{key:1},[i("button",{class:"px-3 py-1.5 text-sm bg-green-500 text-white rounded-lg hover:bg-green-600 transition-colors",disabled:g.value,onClick:v[6]||(v[6]=_=>T())},p(g.value?k.$t("planDoc.saving"):k.$t("planDoc.save")),9,cv),i("button",{class:"px-3 py-1.5 text-sm bg-gray-200 text-gray-600 rounded-lg hover:bg-gray-300 transition-colors",onClick:v[7]||(v[7]=_=>P())},p(k.$t("planDoc.cancel")),1)],64)):(h(),m("button",{key:0,class:"px-3 py-1.5 text-sm bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors",onClick:v[5]||(v[5]=_=>C())},p(k.$t("planDoc.edit")),1))],64)):O("",!0),i("button",{class:"ml-2 p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-lg transition-colors",title:k.$t("planDoc.closeFullscreen"),onClick:v[8]||(v[8]=_=>H())},[...v[11]||(v[11]=[i("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,dv)])]),i("div",pv,[(h(!0),m(ne,null,Ae(e.planDocs,_=>(h(),m("button",{key:"fs-"+_.file,class:te(["px-4 py-2.5 text-sm font-medium border-b-2 transition-colors",n.value===_.file?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:M=>w(_.file)},p(_.label),11,fv))),128))]),i("div",gv,[o.value?(h(),m("div",hv,[i("span",mv,p(k.$t("planDoc.loading")),1)])):l.value?(h(),m("div",bv,[i("span",vv,p(l.value),1)])):a.value?(h(),m("div",yv,[ue(i("textarea",{"onUpdate:modelValue":v[9]||(v[9]=_=>u.value=_),class:"w-full h-full border border-gray-300 rounded-lg p-4 text-sm font-mono text-gray-700 resize-none focus:outline-none focus:ring-2 focus:ring-blue-400",placeholder:k.$t("planDoc.editPlaceholder")},null,8,xv),[[he,u.value]])])):r.value?(h(),m("div",{key:3,class:"plan-doc text-sm text-gray-700 p-6",innerHTML:r.value},null,8,wv)):(h(),m("div",kv,[i("span",$v,p(k.$t("planDoc.selectTab")),1)]))])])])):O("",!0)]),_:1})]))]))}}),_v={class:"fixed inset-0 z-50 flex"},Cv={class:"relative ml-auto w-full max-w-2xl bg-white shadow-xl overflow-y-auto"},Iv={class:"sticky top-0 bg-white border-b border-gray-200 px-6 py-4 flex items-center justify-between z-10"},Tv={class:"flex items-center space-x-2"},Pv={class:"text-lg font-bold text-gray-800"},Rv=["href"],Av={class:"px-6 py-4 space-y-6"},Dv={class:"text-base font-semibold text-gray-700 mb-2"},Lv={class:"grid grid-cols-2 gap-3 text-sm"},Ev={class:"text-gray-500"},Fv={class:"text-gray-800"},Mv={class:"text-gray-500"},jv={class:"text-xs bg-gray-100 px-1 py-0.5 rounded"},Ov={class:"text-gray-500"},Nv={class:"text-gray-500"},Bv={class:"text-gray-500"},Uv={class:"text-gray-500"},Vv={class:"flex items-center justify-between text-sm bg-gray-50 rounded-lg px-4 py-2.5 border border-gray-200"},Hv={class:"text-gray-600"},zv=["disabled"],qv={class:"flex items-center justify-between text-sm bg-gray-50 rounded-lg px-4 py-2.5 border border-gray-200"},Kv={class:"text-gray-600"},Gv=["disabled"],Wv={key:0,class:"bg-green-50 border border-green-200 rounded-lg p-4 flex items-center space-x-2"},Jv={class:"text-sm text-green-700 font-medium"},Zv=["href"],Qv={key:1,class:"bg-red-50 border border-red-200 rounded-lg p-4"},Yv={class:"text-sm font-semibold text-red-700 mb-1"},Xv={class:"text-sm text-red-600 whitespace-pre-wrap break-words"},ey={class:"flex space-x-3 pt-2 border-t border-gray-200"},ty=Ee({__name:"DetailModal",props:{issue:{},progress:{},systemStatus:{},agentLogs:{},agentAutoScroll:{type:Boolean},agentDebugMode:{type:Boolean},supplement:{},supplementForm:{},supplementLoading:{type:Boolean},supplementEditing:{type:Boolean},supplementSaving:{type:Boolean},hasSupplementData:{type:Boolean},detailVersion:{},reviewFeedback:{},reviewSubmitting:{type:Boolean},reviewHistory:{}},emits:["close","retry","restart","cancel","retryFromPhase","approve","reject","skip","update:reviewFeedback","supplementEdit","supplementSave","supplementCancel","update:supplementForm","update:agentAutoScroll","update:agentDebugMode","clearLogs"],setup(e,{emit:t}){const s=e,n=t,{stateLabel:r,stateClass:o,getPlanDocs:l,isEditableDoc:a}=Ns();function u(){if(!s.systemStatus)return"#";const T=s.systemStatus.config.gongfengBaseUrl,I=s.systemStatus.config.projectPath;return`${T}/${I}/issues/${s.issue.issueIid}`}const g=F(s.issue.issueNoteSyncEnabled),d=F(!1),f=Ie(()=>g.value===!0?"on":g.value===!1?"off":"system");async function y(){const T=[void 0,!0,!1],I=T.indexOf(g.value),H=T[(I+1)%T.length];g.value=H,d.value=!0;try{await hc(s.issue.issueIid,H===void 0?null:H)}catch(R){console.error("Failed to toggle note sync",R)}finally{d.value=!1}}const x=F(s.issue.e2eEnabled),w=F(!1),C=Ie(()=>x.value===!0?"on":x.value===!1?"off":"system");async function P(){const T=[void 0,!0,!1],I=T.indexOf(x.value),H=T[(I+1)%T.length];x.value=H,w.value=!0;try{await bc(s.issue.issueIid,H===void 0?null:H)}catch(R){console.error("Failed to toggle e2e",R)}finally{w.value=!1}}return(T,I)=>(h(),Qe(Pr,{name:"fade"},{default:Sn(()=>[i("div",_v,[i("div",{class:"absolute inset-0 bg-black/30",onClick:I[0]||(I[0]=H=>n("close"))}),i("div",Cv,[i("div",Iv,[i("div",Tv,[i("h2",Pv,"Issue #"+p(e.issue.issueIid),1),i("a",{href:u(),target:"_blank",rel:"noopener",class:"inline-flex items-center px-2 py-0.5 text-xs font-medium text-blue-600 bg-blue-50 rounded hover:bg-blue-100 hover:text-blue-800 transition-colors"},[de(p(T.$t("detail.viewInGongfeng"))+" ",1),I[19]||(I[19]=i("svg",{class:"w-3 h-3 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1))],8,Rv)]),i("button",{class:"text-gray-400 hover:text-gray-600 text-2xl leading-none",onClick:I[1]||(I[1]=H=>n("close"))},"×")]),i("div",Av,[i("div",null,[i("h3",Dv,p(T.$t("detail.basicInfo")),1),i("div",Lv,[i("div",null,[i("span",Ev,p(T.$t("detail.title")),1),I[20]||(I[20]=de()),i("span",Fv,p(e.issue.issueTitle),1)]),i("div",null,[i("span",Mv,p(T.$t("detail.branch")),1),I[21]||(I[21]=de()),i("code",jv,p(e.issue.branchName),1)]),i("div",null,[i("span",Ov,p(T.$t("detail.state")),1),i("span",{class:te(["px-2 py-0.5 rounded-full text-xs font-medium",c(o)(e.issue.state)])},p(c(r)(e.issue.state)),3)]),i("div",null,[i("span",Nv,p(T.$t("detail.createdAt")),1),de(" "+p(c(dn)(e.issue.createdAt)),1)]),i("div",null,[i("span",Bv,p(T.$t("detail.retries")),1),de(" "+p(e.issue.attempts),1)]),i("div",null,[i("span",Uv,p(T.$t("detail.updatedAt")),1),de(" "+p(c(dn)(e.issue.updatedAt)),1)])])]),i("div",Vv,[i("span",Hv,p(T.$t("detail.noteSync")),1),i("button",{class:te(["px-3 py-1 rounded text-xs font-medium transition-colors",{"bg-green-100 text-green-700 hover:bg-green-200":f.value==="on","bg-red-100 text-red-600 hover:bg-red-200":f.value==="off","bg-gray-200 text-gray-600 hover:bg-gray-300":f.value==="system"}]),disabled:d.value,onClick:I[2]||(I[2]=H=>y())},p(f.value==="on"?T.$t("detail.enabled"):f.value==="off"?T.$t("detail.disabled"):T.$t("detail.followSystem")),11,zv)]),i("div",qv,[i("span",Kv,p(T.$t("detail.e2eTitle")),1),i("button",{class:te(["px-3 py-1 rounded text-xs font-medium transition-colors",{"bg-green-100 text-green-700 hover:bg-green-200":C.value==="on","bg-red-100 text-red-600 hover:bg-red-200":C.value==="off","bg-gray-200 text-gray-600 hover:bg-gray-300":C.value==="system"}]),disabled:w.value,onClick:I[3]||(I[3]=H=>P())},p(C.value==="on"?T.$t("detail.enabled"):C.value==="off"?T.$t("detail.disabled"):T.$t("detail.followSystem")),11,Gv)]),e.issue.mrUrl?(h(),m("div",Wv,[i("span",Jv,p(T.$t("detail.mrLabel")),1),i("a",{href:e.issue.mrUrl,target:"_blank",rel:"noopener",class:"text-sm text-green-600 hover:text-green-800 underline break-all"},p(e.issue.mrUrl),9,Zv)])):O("",!0),e.issue.lastError?(h(),m("div",Qv,[i("h3",Yv,p(T.$t("detail.errorInfo")),1),i("p",Xv,p(e.issue.lastError),1)])):O("",!0),Ce(bm,{issue:e.issue,progress:e.progress,onRetryFromPhase:I[4]||(I[4]=H=>n("retryFromPhase",e.issue.issueIid,H))},null,8,["issue","progress"]),e.issue.state==="waiting_for_review"?(h(),Qe(Om,{key:2,"review-submitting":e.reviewSubmitting,"review-feedback":e.reviewFeedback,"review-history":e.reviewHistory,"onUpdate:reviewFeedback":I[5]||(I[5]=H=>n("update:reviewFeedback",H)),onApprove:I[6]||(I[6]=H=>n("approve",e.issue.issueIid)),onReject:I[7]||(I[7]=H=>n("reject",e.issue.issueIid)),onSkip:I[8]||(I[8]=H=>n("skip",e.issue.issueIid))},null,8,["review-submitting","review-feedback","review-history"])):O("",!0),Ce(Pb,{supplement:e.supplement,"supplement-form":e.supplementForm,loading:e.supplementLoading,editing:e.supplementEditing,saving:e.supplementSaving,"has-data":e.hasSupplementData,onEdit:I[9]||(I[9]=H=>n("supplementEdit")),onSave:I[10]||(I[10]=H=>n("supplementSave")),onCancel:I[11]||(I[11]=H=>n("supplementCancel")),"onUpdate:supplementForm":I[12]||(I[12]=H=>n("update:supplementForm",H))},null,8,["supplement","supplement-form","loading","editing","saving","has-data"]),Ce(Sv,{"issue-iid":e.issue.issueIid,"plan-docs":c(l)(e.issue),"is-editable-doc":c(a),"detail-version":e.detailVersion},null,8,["issue-iid","plan-docs","is-editable-doc","detail-version"]),Ce(Hb,{logs:e.agentLogs,"issue-state":e.issue.state,"auto-scroll":e.agentAutoScroll,"debug-mode":e.agentDebugMode,"onUpdate:autoScroll":I[13]||(I[13]=H=>n("update:agentAutoScroll",H)),"onUpdate:debugMode":I[14]||(I[14]=H=>n("update:agentDebugMode",H)),onClear:I[15]||(I[15]=H=>n("clearLogs"))},null,8,["logs","issue-state","auto-scroll","debug-mode"]),i("div",ey,[e.issue.state==="failed"?(h(),m("button",{key:0,class:"px-4 py-2 bg-blue-500 text-white text-sm rounded-lg hover:bg-blue-600",onClick:I[16]||(I[16]=H=>n("retry",e.issue.issueIid))},p(T.$t("detail.retry")),1)):O("",!0),i("button",{class:"px-4 py-2 bg-yellow-100 text-yellow-700 text-sm rounded-lg hover:bg-yellow-200",onClick:I[17]||(I[17]=H=>n("restart",e.issue.issueIid))},p(T.$t("detail.restart")),1),i("button",{class:"px-4 py-2 bg-red-100 text-red-600 text-sm rounded-lg hover:bg-red-200",onClick:I[18]||(I[18]=H=>n("cancel",e.issue.issueIid))},p(T.$t("detail.cancelTrack")),1)])])])])]),_:1}))}}),sy={class:"max-w-7xl mx-auto px-4 py-6"},ny={class:"mb-4 flex items-center space-x-1 border-b border-gray-200"},ry=Ee({__name:"App",setup(e){const t=F(null),s=F("tracked"),{pipelineMode:n}=Ns(),{issues:r,filter:o,filteredIssues:l,activeCount:a,completedCount:u,failedCount:g,refresh:d}=qc(),f=Kc(),y=ui(),x=Jc(d),w=Ie(()=>f.selectedIssue.value?.issueIid);async function C(k){let v=r.value;v.length===0&&(await d(),v=r.value);const _=v.find(M=>M.issueIid===k);if(_)f.selectIssue(_,y.agentLogs);else try{const M=await ir(k);f.selectIssue(M,y.agentLogs)}catch{console.warn(`Issue #${k} not found, ignoring URL param`)}}const{readIssueIidFromUrl:P}=Zc({selectedIssueIid:w,onOpenIssue:C}),{connected:T}=Hc((k,v)=>{const _=v;if(k.startsWith("issue:")||k.startsWith("review:")){d();const M=_.data;M?.issueIid&&f.selectedIssue.value?.issueIid===M.issueIid&&f.refreshDetail()}if(k==="agent:output"){const M=_.data;M?.event&&y.pushAgentStreamEvent(M.issueIid,w,M.phase,M.event)}if(k==="pipeline:progress"){const M=_.data;M&&f.selectedIssue.value?.issueIid===M.issueIid&&y.pushSystemLog(M.issueIid,w,M.step,M.message??"",_.timestamp)}});async function I(){try{t.value=await sc(),t.value?.config?.pipelineMode&&(n.value=t.value.config.pipelineMode)}catch(k){console.error("Fetch status failed",k)}}function H(){s.value="browse",x.browseIssues.value.length===0&&x.fetchGongfengIssues()}let R=null;return Dt(async()=>{await d(),I(),R=setInterval(I,1e4);const k=P();k&&C(k)}),Lt(()=>{R&&clearInterval(R)}),(k,v)=>(h(),m("div",null,[Ce(id,{connected:c(T),"system-status":t.value},null,8,["connected","system-status"]),i("main",sy,[Ce(wd,{total:c(r).length,active:c(a),completed:c(u),failed:c(g)},null,8,["total","active","completed","failed"]),i("div",ny,[i("button",{class:te(["px-4 py-2 text-sm font-medium border-b-2 transition-colors",s.value==="tracked"?"border-gray-800 text-gray-800":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:v[0]||(v[0]=_=>s.value="tracked")},p(k.$t("app.trackedIssues")),3),i("button",{class:te(["px-4 py-2 text-sm font-medium border-b-2 transition-colors",s.value==="browse"?"border-gray-800 text-gray-800":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:v[1]||(v[1]=_=>H())},p(k.$t("app.browseIssues")),3),i("button",{class:te(["px-4 py-2 text-sm font-medium border-b-2 transition-colors",s.value==="brainstorm"?"border-gray-800 text-gray-800":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:v[2]||(v[2]=_=>s.value="brainstorm")},p(k.$t("app.brainstorm")),3),i("button",{class:te(["px-4 py-2 text-sm font-medium border-b-2 transition-colors",s.value==="chat"?"border-gray-800 text-gray-800":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:v[3]||(v[3]=_=>s.value="chat")},p(k.$t("app.chat")),3),i("button",{class:te(["px-4 py-2 text-sm font-medium border-b-2 transition-colors",s.value==="knowledge"?"border-gray-800 text-gray-800":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:v[4]||(v[4]=_=>s.value="knowledge")},p(k.$t("app.knowledge")),3)]),s.value==="tracked"?(h(),Qe(sp,{key:0,issues:c(l),filter:c(o),"system-status":t.value,"onUpdate:filter":v[5]||(v[5]=_=>o.value=_),onSelect:v[6]||(v[6]=_=>c(f).selectIssue(_,c(y).agentLogs)),onRetry:v[7]||(v[7]=_=>c(f).doRetryIssue(_,c(d))),onRestart:v[8]||(v[8]=_=>c(f).doRestartIssue(_,c(d))),onCancel:v[9]||(v[9]=_=>c(f).doCancelIssue(_,c(d)))},null,8,["issues","filter","system-status"])):O("",!0),s.value==="brainstorm"?(h(),Qe(Og,{key:1})):O("",!0),s.value==="chat"?(h(),Qe(xh,{key:2})):O("",!0),s.value==="knowledge"?(h(),Qe(R0,{key:3})):O("",!0),s.value==="browse"?(h(),Qe(Mp,{key:4,issues:c(x).browseIssues.value,"tracked-iids":c(x).browseTrackedIids.value,total:c(x).browseTotal.value,page:c(x).browsePage.value,"per-page":c(x).browsePerPage,loading:c(x).browseLoading.value,error:c(x).browseError.value,search:c(x).browseSearch.value,"system-status":t.value,"onUpdate:search":v[10]||(v[10]=_=>c(x).browseSearch.value=_),"onUpdate:page":v[11]||(v[11]=_=>c(x).browsePage.value=_),onSearch:v[12]||(v[12]=_=>c(x).fetchGongfengIssues()),onStart:v[13]||(v[13]=_=>c(x).openStartDialog(_))},null,8,["issues","tracked-iids","total","page","per-page","loading","error","search","system-status"])):O("",!0)]),Ce(lm,{issue:c(x).startDialogIssue.value,supplement:c(x).startSupplement.value,processing:c(x).startProcessing.value,onClose:v[14]||(v[14]=_=>c(x).startDialogIssue.value=null),"onUpdate:supplement":v[15]||(v[15]=_=>c(x).startSupplement.value=_),onStart:v[16]||(v[16]=_=>{c(x).doStartProcessing(()=>{s.value="tracked"})})},null,8,["issue","supplement","processing"]),c(f).selectedIssue.value?(h(),Qe(ty,{key:0,issue:c(f).selectedIssue.value,progress:c(f).detailProgress.value,"system-status":t.value,"agent-logs":c(y).filteredLogs.value,"agent-auto-scroll":c(y).agentAutoScroll.value,"agent-debug-mode":c(y).debugMode.value,supplement:c(f).detailSupplement.value,"supplement-form":c(f).detailSupplementForm.value,"supplement-loading":c(f).detailSupplementLoading.value,"supplement-editing":c(f).detailSupplementEditing.value,"supplement-saving":c(f).detailSupplementSaving.value,"has-supplement-data":c(f).hasSupplementData(c(f).detailSupplement.value),"detail-version":c(f).detailVersion.value,"review-feedback":c(f).reviewFeedback.value,"review-submitting":c(f).reviewSubmitting.value,"review-history":c(f).reviewHistory.value,onClose:v[17]||(v[17]=_=>c(f).selectedIssue.value=null),onRetry:v[18]||(v[18]=_=>c(f).doRetryIssue(_,c(d))),onRestart:v[19]||(v[19]=_=>c(f).doRestartIssue(_,c(d))),onCancel:v[20]||(v[20]=_=>c(f).doCancelIssue(_,c(d))),onRetryFromPhase:v[21]||(v[21]=(_,M)=>c(f).doRetryFromPhase(_,M,M,c(d))),onApprove:v[22]||(v[22]=_=>c(f).doApprovePlan(_,c(d))),onReject:v[23]||(v[23]=_=>c(f).doRejectPlan(_,c(d))),onSkip:v[24]||(v[24]=_=>c(f).doSkipReview(_,c(d))),"onUpdate:reviewFeedback":v[25]||(v[25]=_=>c(f).reviewFeedback.value=_),onSupplementEdit:v[26]||(v[26]=_=>c(f).enterSupplementEdit()),onSupplementSave:v[27]||(v[27]=_=>c(f).saveDetailSupplement(c(d))),onSupplementCancel:v[28]||(v[28]=_=>c(f).detailSupplementEditing.value=!1),"onUpdate:supplementForm":v[29]||(v[29]=_=>c(f).detailSupplementForm.value=_),"onUpdate:agentAutoScroll":v[30]||(v[30]=_=>c(y).agentAutoScroll.value=_),"onUpdate:agentDebugMode":v[31]||(v[31]=_=>c(y).debugMode.value=_),onClearLogs:v[32]||(v[32]=_=>c(y).clear())},null,8,["issue","progress","system-status","agent-logs","agent-auto-scroll","agent-debug-mode","supplement","supplement-form","supplement-loading","supplement-editing","supplement-saving","has-supplement-data","detail-version","review-feedback","review-submitting","review-history"])):O("",!0)]))}});function oy(){const e=F(0),t=6,s=F(!1),n=F(""),r=F([]),o=F(null),l=F(null),a=F(null),u=F(null),g=F(""),d=F([]),f=F(!1),y=F(""),x=F(0);let w=null;const C=F(!1),P=F(""),T=F(!1),I=F(new Map),H=F(""),R=kn({gongfeng:{apiUrl:"",privateToken:"",projectPath:""},project:{workDir:"",gitRootDir:"",baseBranch:"master",branchPrefix:"feat/issue",worktreeBaseDir:"",projectSubDir:""},ai:{mode:"claude-internal",model:"Claude-4.6-Opus",phaseTimeoutMs:18e5},poll:{discoveryIntervalMs:6e4,driveIntervalMs:15e3,maxRetries:3,maxConcurrent:3},web:{port:3e3},pipeline:{mode:"auto"},review:{enabled:!0}}),k=Ie(()=>{switch(e.value){case 0:{const se=r.value.filter(E=>E.required);return se.length>0&&se.every(E=>E.installed)}case 1:return R.project.workDir.trim()!=="";case 2:return R.gongfeng.apiUrl.trim()!==""&&R.gongfeng.privateToken.trim()!==""&&R.gongfeng.projectPath.trim()!==""&&o.value===!0&&a.value===!0;case 3:return r.value.filter(se=>se.name===R.ai.mode.replace("-","-")).every(se=>se.installed||!se.required);case 4:return!0;case 5:return g.value!=="";default:return!1}});async function v(se=!1){se||(s.value=!0,n.value="");try{const z=await(await fetch(`/api/setup/check-env?aiMode=${R.ai.mode}`)).json();r.value=z.dependencies}catch(E){se||(n.value=E.message)}finally{se||(s.value=!1)}}async function _(){if(o.value=null,l.value=null,!(!R.gongfeng.apiUrl||!R.gongfeng.privateToken))try{const E=await(await fetch("/api/setup/validate-token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiUrl:R.gongfeng.apiUrl,token:R.gongfeng.privateToken})})).json();o.value=E.valid,l.value=E.user??null,E.valid||(n.value=E.error??"Token validation failed")}catch(se){o.value=!1,n.value=se.message}}async function M(){if(a.value=null,u.value=null,!(!R.gongfeng.apiUrl||!R.gongfeng.privateToken||!R.gongfeng.projectPath))try{const E=await(await fetch("/api/setup/validate-repo",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiUrl:R.gongfeng.apiUrl,token:R.gongfeng.privateToken,projectPath:R.gongfeng.projectPath})})).json();a.value=E.valid,u.value=E.project??null,E.valid||(n.value=E.error??"Repository validation failed")}catch(se){a.value=!1,n.value=se.message}}function S(){x.value=0,w=setInterval(()=>{x.value++},1e3)}function L(){w&&(clearInterval(w),w=null)}Lt(()=>L());async function q(se){f.value=!0,y.value=se,d.value=[],H.value="",T.value=!0,S();let E=!1;try{const z=await fetch("/api/setup/install-dep",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:se})});if(!z.ok){const Et=`Server error: ${z.status} ${z.statusText}`;d.value.push(Et),H.value=Et,I.value.set(se,"failed");return}const A=z.body?.getReader();if(!A){I.value.set(se,"failed");return}const Fe=new TextDecoder;let zt="";for(;;){const{done:Et,value:bt}=await A.read();if(Et)break;zt+=Fe.decode(bt,{stream:!0});const vt=zt.split(`
|
|
66
66
|
|
|
67
|
-
`);Ae=at.pop()??"";for(const yt of at)if(yt.startsWith("data: "))try{const Ze=JSON.parse(yt.slice(6));if(Ze.line&&d.value.push(Ze.line),Ze.error&&(H.value=Ze.error,d.value.push(`Error: ${Ze.error}`)),Ze.done){const Ie=r.value.find(Q=>Q.name===ne)?.installed;await v();const j=r.value.find(Q=>Q.name===ne)?.installed;T.value.set(ne,j&&!Ie||j?"success":"failed")}}catch{}}}catch(E){const q=E.message;d.value.push(`Error: ${q}`),H.value=q,T.value.set(ne,"failed")}finally{D(),f.value=!1,y.value=""}}async function K(){try{const E=await(await fetch("/api/setup/generate-preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(R)})).json();g.value=E.preview}catch(ne){n.value=ne.message}}async function le(){s.value=!0,n.value="";try{const E=await(await fetch("/api/setup/complete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:R})})).json();E.success?(C.value=!0,P.value=E.configPath??""):n.value=E.error??"Setup failed"}catch(ne){n.value=ne.message}finally{s.value=!1}}function ce(){I.value=!I.value}function Te(){I.value=!1,f.value||(d.value=[])}function ve(){I.value=!0}function ae(){e.value<t-1&&(e.value++,n.value="",e.value===5&&K())}function oe(){e.value>0&&(e.value--,n.value="")}return{currentStep:e,totalSteps:t,loading:s,error:n,form:R,dependencies:r,tokenValid:o,tokenUser:l,repoValid:a,repoInfo:u,configPreview:g,installLogs:d,installing:f,installingDep:y,installElapsed:x,setupComplete:C,savedConfigPath:P,logPanelVisible:I,installResult:T,lastInstallError:H,canProceed:k,checkEnv:v,validateToken:_,validateRepo:M,installDep:z,generatePreview:K,completeSetup:le,nextStep:ae,prevStep:oe,toggleLogPanel:ce,closeLogPanel:Te,openLogPanel:ve}}const ly={key:0,class:"border-t border-gray-200"},iy={class:"flex items-center gap-2"},ay={class:"font-medium"},uy={key:0,class:"text-gray-400"},cy={key:1,class:"animate-spin h-3 w-3 text-blue-400",viewBox:"0 0 24 24"},dy={class:"flex items-center gap-3"},py={key:0,class:"tabular-nums text-gray-400"},fy=["title"],gy={key:0,class:"text-gray-500"},hy=Fe({__name:"InstallLogPanel",props:{visible:{type:Boolean},logs:{},depName:{},elapsed:{},installing:{type:Boolean}},emits:["toggle","close"],setup(e,{emit:t}){const{t:s}=Vt(),n=e,r=t,o=F(null);return ot(()=>n.logs.length,async()=>{await js(),o.value&&(o.value.scrollTop=o.value.scrollHeight)}),(l,a)=>e.logs.length||e.installing?(h(),m("div",ly,[i("div",{class:"flex items-center justify-between px-4 py-2 bg-gray-800 text-gray-300 text-xs cursor-pointer select-none",onClick:a[1]||(a[1]=u=>r("toggle"))},[i("div",iy,[(h(),m("svg",{class:te(["h-3 w-3 transition-transform",e.visible?"rotate-0":"-rotate-90"]),viewBox:"0 0 20 20",fill:"currentColor"},[...a[2]||(a[2]=[i("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z","clip-rule":"evenodd"},null,-1)])],2)),i("span",ay,p(c(s)("setup.env.logPanel")),1),e.depName?(h(),m("span",uy,"— "+p(e.depName),1)):O("",!0),e.installing?(h(),m("svg",cy,[...a[3]||(a[3]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):O("",!0)]),i("div",dy,[e.installing?(h(),m("span",py,p(e.elapsed)+"s",1)):O("",!0),i("button",{class:"text-gray-400 hover:text-gray-200 transition-colors",title:c(s)("setup.env.closePanel"),onClick:a[0]||(a[0]=Ot(u=>r("close"),["stop"]))},[...a[4]||(a[4]=[i("svg",{class:"h-3.5 w-3.5",viewBox:"0 0 20 20",fill:"currentColor"},[i("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})],-1)])],8,fy)])]),ue(i("div",null,[i("div",{ref_key:"logContainer",ref:o,class:"bg-gray-900 px-4 py-3 text-gray-300 text-xs font-mono max-h-48 overflow-y-auto"},[e.installing&&!e.logs.length?(h(),m("div",gy,p(c(s)("setup.env.waitingOutput")),1)):O("",!0),(h(!0),m(se,null,De(e.logs,(u,g)=>(h(),m("div",{key:g,class:"leading-5"},p(u),1))),128))],512)],512),[[Du,e.visible]])])):O("",!0)}}),my={class:"min-h-screen bg-gray-50 flex items-center justify-center p-4"},by={key:0,class:"bg-white rounded-2xl shadow-lg max-w-lg w-full p-10 text-center"},vy={class:"text-2xl font-bold text-gray-900 mb-2"},yy={class:"text-gray-600 mb-4"},xy={class:"block bg-gray-100 rounded-lg p-3 text-sm mb-6 break-all"},wy={class:"text-gray-600"},ky={key:1,class:"bg-white rounded-2xl shadow-lg max-w-3xl w-full overflow-hidden"},$y={class:"bg-gray-900 text-white px-8 py-6"},Sy={class:"flex items-center justify-between"},_y={class:"text-xl font-bold"},Cy={class:"text-gray-400 text-sm mt-1"},Iy={class:"mt-4 flex gap-1"},Ty={class:"p-8 min-h-[400px]"},Py={key:0,class:"mb-4 bg-red-50 border border-red-200 text-red-700 rounded-lg px-4 py-3 text-sm"},Ry={key:1},Ay={class:"text-gray-600 mb-6"},Dy={key:0,class:"flex items-center gap-2 text-gray-500"},Ly={key:1,class:"space-y-3"},Ey={class:"flex items-center gap-3"},Fy={class:"text-lg"},My={key:0,class:"animate-spin h-5 w-5 text-blue-500",viewBox:"0 0 24 24"},jy={class:"font-medium text-gray-900"},Oy={key:0,class:"text-xs text-gray-500"},Ny={key:1,class:"text-xs text-blue-600"},By={key:2,class:"text-xs text-green-600"},Uy={key:3,class:"text-xs text-red-600"},Vy={class:"flex items-center gap-2"},Hy=["disabled","onClick"],zy=["disabled","onClick"],qy={key:3,class:"text-xs text-gray-500"},Ky={key:2,class:"space-y-5"},Gy={class:"block text-sm font-medium text-gray-700 mb-1"},Wy=["placeholder"],Jy={class:"mt-1 text-xs text-gray-500"},Zy={class:"block text-sm font-medium text-gray-700 mb-1"},Qy=["placeholder"],Yy={class:"mt-1 text-xs text-gray-500"},Xy={class:"grid grid-cols-2 gap-4"},ex={class:"block text-sm font-medium text-gray-700 mb-1"},tx={class:"block text-sm font-medium text-gray-700 mb-1"},sx={class:"block text-sm font-medium text-gray-700 mb-1"},nx={class:"block text-sm font-medium text-gray-700 mb-1"},rx=["placeholder"],ox={key:3,class:"space-y-5"},lx={class:"block text-sm font-medium text-gray-700 mb-1"},ix={class:"block text-sm font-medium text-gray-700 mb-1"},ax={class:"flex gap-2"},ux=["placeholder"],cx=["disabled"],dx={key:0,class:"mt-1 text-xs text-green-600"},px={key:1,class:"mt-1 text-xs text-red-600"},fx={class:"block text-sm font-medium text-gray-700 mb-1"},gx={class:"flex gap-2"},hx=["placeholder"],mx=["disabled"],bx={key:0,class:"mt-1 text-xs text-green-600"},vx={key:1,class:"mt-1 text-xs text-red-600"},yx={key:4,class:"space-y-5"},xx={class:"block text-sm font-medium text-gray-700 mb-3"},wx={class:"grid grid-cols-3 gap-3"},kx={class:"font-medium"},$x={class:"text-xs text-gray-500 mt-1"},Sx={class:"font-medium"},_x={class:"text-xs text-gray-500 mt-1"},Cx={class:"font-medium"},Ix={class:"text-xs text-gray-500 mt-1"},Tx={class:"block text-sm font-medium text-gray-700 mb-1"},Px={class:"space-y-2"},Rx={class:"text-sm font-medium text-gray-700"},Ax={class:"flex items-center gap-2"},Dx={key:0},Lx={key:1},Ex={key:2},Fx={key:3},Mx={class:"text-sm"},jx={key:4,class:"text-xs text-gray-500"},Ox={key:5,class:"text-xs text-blue-600"},Nx={key:6,class:"text-xs text-green-600"},Bx={key:7,class:"text-xs text-red-600"},Ux={class:"flex items-center gap-2"},Vx=["disabled","onClick"],Hx=["disabled","onClick"],zx={key:5,class:"space-y-5"},qx={class:"grid grid-cols-2 gap-4"},Kx={class:"block text-sm font-medium text-gray-700 mb-1"},Gx={class:"block text-sm font-medium text-gray-700 mb-1"},Wx={class:"grid grid-cols-2 gap-4"},Jx={class:"block text-sm font-medium text-gray-700 mb-1"},Zx={class:"block text-sm font-medium text-gray-700 mb-1"},Qx={class:"grid grid-cols-2 gap-4"},Yx={class:"block text-sm font-medium text-gray-700 mb-1"},Xx={class:"block text-sm font-medium text-gray-700 mb-1"},e1={value:"auto"},t1={value:"classic"},s1={value:"plan-mode"},n1={class:"flex items-center gap-2"},r1={for:"review-enabled",class:"text-sm text-gray-700"},o1={class:"block text-sm font-medium text-gray-700 mb-1"},l1={class:"mt-1 text-xs text-gray-500"},i1={key:6,class:"space-y-5"},a1={class:"text-sm text-gray-600"},u1={class:"bg-gray-900 text-gray-300 rounded-lg p-4 text-xs font-mono max-h-80 overflow-y-auto whitespace-pre-wrap"},c1={class:"px-8 py-4 bg-gray-50 border-t flex items-center justify-between"},d1={key:1},p1=["disabled"],f1=["disabled"],g1=Fe({__name:"SetupWizard",setup(e){const{t,locale:s,setLocale:n}=Vt(),{currentStep:r,totalSteps:o,loading:l,error:a,form:u,dependencies:g,tokenValid:d,tokenUser:f,repoValid:y,repoInfo:x,configPreview:w,installLogs:C,installing:P,installingDep:I,installElapsed:T,setupComplete:H,savedConfigPath:R,logPanelVisible:k,installResult:v,canProceed:_,checkEnv:M,validateToken:S,validateRepo:D,installDep:z,completeSetup:K,nextStep:le,prevStep:ce,toggleLogPanel:Te,closeLogPanel:ve,openLogPanel:ae}=oy();function oe(E){return g.value.find(L=>L.name===E)?.displayName??E}const ne=Ce(()=>[t("setup.step.envCheck"),t("setup.step.projectConfig"),t("setup.step.gongfengConfig"),t("setup.step.aiRunner"),t("setup.step.advancedOptions"),t("setup.step.reviewConfirm")]);return Lt(()=>{M()}),ot(()=>u.ai.mode,()=>{M()}),(E,q)=>(h(),m("div",my,[c(H)?(h(),m("div",by,[q[32]||(q[32]=i("div",{class:"text-5xl mb-4"},"✅",-1)),i("h2",vy,p(E.$t("setup.complete.title")),1),i("p",yy,p(E.$t("setup.complete.savedTo")),1),i("code",xy,p(c(R)),1),i("p",wy,p(E.$t("setup.complete.startHint")),1),q[33]||(q[33]=i("code",{class:"block bg-gray-900 text-green-400 rounded-lg p-3 text-sm mt-2"}," issue-auto-finish start ",-1))])):(h(),m("div",ky,[i("div",$y,[i("div",Sy,[i("h1",_y,p(E.$t("setup.title")),1),i("button",{class:te(["px-3 py-1 text-sm rounded-lg transition-colors",(c(s)==="zh-CN","bg-gray-700 text-gray-200 hover:bg-gray-600")]),onClick:q[0]||(q[0]=L=>c(n)(c(s)==="zh-CN"?"en":"zh-CN"))},p(c(s)==="zh-CN"?"EN":"中文"),3)]),i("p",Cy,p(ne.value[c(r)])+" ("+p(c(r)+1)+"/"+p(c(o))+")",1),i("div",Iy,[(h(!0),m(se,null,De(c(o),L=>(h(),m("div",{key:L,class:te(["h-1 flex-1 rounded-full transition-colors",L-1<=c(r)?"bg-blue-400":"bg-gray-700"])},null,2))),128))])]),i("div",Ty,[c(a)?(h(),m("div",Py,p(c(a)),1)):O("",!0),c(r)===0?(h(),m("div",Ry,[i("p",Ay,p(E.$t("setup.env.checking")),1),c(l)?(h(),m("div",Dy,[q[34]||(q[34]=i("svg",{class:"animate-spin h-5 w-5",viewBox:"0 0 24 24"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),de(" "+p(E.$t("setup.env.checkingShort")),1)])):(h(),m("div",Ly,[(h(!0),m(se,null,De(c(g),L=>(h(),m("div",{key:L.name,class:te(["flex items-center justify-between p-3 rounded-lg border",L.installed?"border-green-200 bg-green-50":c(v).get(L.name)==="failed"||L.required?"border-red-200 bg-red-50":"border-yellow-200 bg-yellow-50"])},[i("div",Ey,[i("span",Fy,[c(I)===L.name?(h(),m("svg",My,[...q[35]||(q[35]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):L.installed?(h(),m(se,{key:1},[de("✅")],64)):c(v).get(L.name)==="failed"?(h(),m(se,{key:2},[de("❌")],64)):L.required?(h(),m(se,{key:3},[de("❌")],64)):(h(),m(se,{key:4},[de("⚠️")],64))]),i("div",null,[i("div",jy,p(L.displayName),1),L.version?(h(),m("div",Oy,"v"+p(L.version),1)):O("",!0),c(I)===L.name?(h(),m("div",Ny,p(E.$t("setup.env.installing")),1)):c(v).get(L.name)==="success"&&L.installed?(h(),m("div",By,p(E.$t("setup.env.installSuccess")),1)):c(v).get(L.name)==="failed"?(h(),m("div",Uy,p(E.$t("setup.env.installFailed")),1)):O("",!0)])]),i("div",Vy,[c(I)===L.name?(h(),m("button",{key:0,class:"text-xs text-blue-600 hover:underline",onClick:q[1]||(q[1]=(...Ae)=>c(ae)&&c(ae)(...Ae))},p(E.$t("setup.env.viewLogs")),1)):c(v).get(L.name)==="failed"?(h(),m(se,{key:1},[i("button",{class:"text-xs text-blue-600 hover:underline",onClick:q[2]||(q[2]=(...Ae)=>c(ae)&&c(ae)(...Ae))},p(E.$t("setup.env.viewLogs")),1),L.installCommand?(h(),m("button",{key:0,class:"inline-flex items-center gap-1.5 px-3 py-1 text-xs font-medium bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 transition-all",disabled:c(P),onClick:Ae=>c(z)(L.name)},p(E.$t("setup.env.retry")),9,Hy)):O("",!0)],64)):!L.installed&&L.installCommand?(h(),m("button",{key:2,class:"inline-flex items-center gap-1.5 px-3 py-1 text-xs font-medium bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 transition-all",disabled:c(P),onClick:Ae=>c(z)(L.name)},p(E.$t("setup.env.install")),9,zy)):!L.installed&&!c(v).has(L.name)?(h(),m("span",qy,p(L.installHint),1)):O("",!0)])],2))),128))])),i("button",{class:"mt-4 text-sm text-blue-600 hover:underline",onClick:q[3]||(q[3]=(...L)=>c(M)&&c(M)(...L))},p(E.$t("setup.env.refresh")),1)])):O("",!0),c(r)===1?(h(),m("div",Ky,[i("div",null,[i("label",Gy,p(E.$t("setup.project.workDir")),1),ue(i("input",{"onUpdate:modelValue":q[4]||(q[4]=L=>c(u).project.workDir=L),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:E.$t("setup.project.workDirPlaceholder")},null,8,Wy),[[he,c(u).project.workDir]]),i("p",Jy,p(E.$t("setup.project.workDirHint")),1)]),i("div",null,[i("label",Zy,p(E.$t("setup.project.gitRootDir")),1),ue(i("input",{"onUpdate:modelValue":q[5]||(q[5]=L=>c(u).project.gitRootDir=L),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:E.$t("setup.project.gitRootDirPlaceholder")},null,8,Qy),[[he,c(u).project.gitRootDir]]),i("p",Yy,p(E.$t("setup.project.gitRootDirHint")),1)]),i("div",Xy,[i("div",null,[i("label",ex,p(E.$t("setup.project.baseBranch")),1),ue(i("input",{"onUpdate:modelValue":q[6]||(q[6]=L=>c(u).project.baseBranch=L),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[he,c(u).project.baseBranch]])]),i("div",null,[i("label",tx,p(E.$t("setup.project.branchPrefix")),1),ue(i("input",{"onUpdate:modelValue":q[7]||(q[7]=L=>c(u).project.branchPrefix=L),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[he,c(u).project.branchPrefix]])])]),i("div",null,[i("label",sx,p(E.$t("setup.project.worktreeBaseDir")),1),ue(i("input",{"onUpdate:modelValue":q[8]||(q[8]=L=>c(u).project.worktreeBaseDir=L),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"/tmp/issue-auto-finish-worktrees"},null,512),[[he,c(u).project.worktreeBaseDir]])]),i("div",null,[i("label",nx,p(E.$t("setup.project.projectSubDir")),1),ue(i("input",{"onUpdate:modelValue":q[9]||(q[9]=L=>c(u).project.projectSubDir=L),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:E.$t("setup.project.projectSubDirPlaceholder")},null,8,rx),[[he,c(u).project.projectSubDir]])])])):O("",!0),c(r)===2?(h(),m("div",ox,[i("div",null,[i("label",lx,p(E.$t("setup.gongfeng.apiUrl")),1),ue(i("input",{"onUpdate:modelValue":q[10]||(q[10]=L=>c(u).gongfeng.apiUrl=L),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"https://gitlab.example.com"},null,512),[[he,c(u).gongfeng.apiUrl]])]),i("div",null,[i("label",ix,p(E.$t("setup.gongfeng.privateToken")),1),i("div",ax,[ue(i("input",{"onUpdate:modelValue":q[11]||(q[11]=L=>c(u).gongfeng.privateToken=L),type:"password",class:"flex-1 border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:E.$t("setup.gongfeng.tokenPlaceholder")},null,8,ux),[[he,c(u).gongfeng.privateToken]]),i("button",{class:"px-4 py-2 text-sm font-medium bg-gray-800 text-white rounded-lg hover:bg-gray-700 disabled:opacity-50",disabled:!c(u).gongfeng.apiUrl||!c(u).gongfeng.privateToken,onClick:q[12]||(q[12]=(...L)=>c(S)&&c(S)(...L))},p(E.$t("setup.gongfeng.verify")),9,cx)]),c(d)===!0?(h(),m("div",dx," ✅ "+p(E.$t("setup.gongfeng.tokenValid"))+p(c(f)?.name?` (${c(f).name})`:""),1)):c(d)===!1?(h(),m("div",px," ❌ "+p(E.$t("setup.gongfeng.tokenInvalid")),1)):O("",!0)]),i("div",null,[i("label",fx,p(E.$t("setup.gongfeng.projectPath")),1),i("div",gx,[ue(i("input",{"onUpdate:modelValue":q[13]||(q[13]=L=>c(u).gongfeng.projectPath=L),type:"text",class:"flex-1 border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:E.$t("setup.gongfeng.projectPathPlaceholder")},null,8,hx),[[he,c(u).gongfeng.projectPath]]),i("button",{class:"px-4 py-2 text-sm font-medium bg-gray-800 text-white rounded-lg hover:bg-gray-700 disabled:opacity-50",disabled:!c(u).gongfeng.apiUrl||!c(u).gongfeng.privateToken||!c(u).gongfeng.projectPath,onClick:q[14]||(q[14]=(...L)=>c(D)&&c(D)(...L))},p(E.$t("setup.gongfeng.verify")),9,mx)]),c(y)===!0?(h(),m("div",bx," ✅ "+p(E.$t("setup.gongfeng.repoFound"))+p(c(x)?.name?`: ${c(x).name}`:""),1)):c(y)===!1?(h(),m("div",vx," ❌ "+p(E.$t("setup.gongfeng.repoNotFound")),1)):O("",!0)])])):O("",!0),c(r)===3?(h(),m("div",yx,[i("div",null,[i("label",xx,p(E.$t("setup.ai.modeLabel")),1),i("div",wx,[i("button",{class:te(["p-4 rounded-lg border-2 text-left transition-colors",c(u).ai.mode==="claude-internal"?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"]),onClick:q[15]||(q[15]=L=>c(u).ai.mode="claude-internal")},[i("div",kx,p(E.$t("setup.ai.claudeInternal")),1),i("div",$x,p(E.$t("setup.ai.claudeInternalDesc")),1)],2),i("button",{class:te(["p-4 rounded-lg border-2 text-left transition-colors",c(u).ai.mode==="cursor-agent"?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"]),onClick:q[16]||(q[16]=L=>c(u).ai.mode="cursor-agent")},[i("div",Sx,p(E.$t("setup.ai.cursorAgent")),1),i("div",_x,p(E.$t("setup.ai.cursorAgentDesc")),1)],2),i("button",{class:te(["p-4 rounded-lg border-2 text-left transition-colors",c(u).ai.mode==="codebuddy"?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"]),onClick:q[17]||(q[17]=L=>c(u).ai.mode="codebuddy")},[i("div",Cx,p(E.$t("setup.ai.codebuddy")),1),i("div",Ix,p(E.$t("setup.ai.codebuddyDesc")),1)],2)])]),i("div",null,[i("label",Tx,p(E.$t("setup.ai.model")),1),ue(i("input",{"onUpdate:modelValue":q[18]||(q[18]=L=>c(u).ai.model=L),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[he,c(u).ai.model]])]),i("div",Px,[i("p",Rx,p(E.$t("setup.ai.cliStatus")),1),(h(!0),m(se,null,De(c(g).filter(L=>L.name==="claude-internal"||L.name==="cursor"||L.name==="codebuddy"),L=>(h(),m("div",{key:L.name,class:te(["flex items-center justify-between p-3 rounded-lg border",L.installed?"border-green-200 bg-green-50":c(v).get(L.name)==="failed"?"border-red-200 bg-red-50":"border-yellow-200 bg-yellow-50"])},[i("div",Ax,[c(I)===L.name?(h(),m("span",Dx,[...q[36]||(q[36]=[i("svg",{class:"animate-spin h-4 w-4 text-blue-500",viewBox:"0 0 24 24"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)])])):L.installed?(h(),m("span",Lx,"✅")):c(v).get(L.name)==="failed"?(h(),m("span",Ex,"❌")):(h(),m("span",Fx,"⚠️")),i("span",Mx,p(L.displayName),1),L.version?(h(),m("span",jx,"v"+p(L.version),1)):O("",!0),c(I)===L.name?(h(),m("span",Ox,p(E.$t("setup.env.installing")),1)):c(v).get(L.name)==="success"&&L.installed?(h(),m("span",Nx,p(E.$t("setup.env.installSuccess")),1)):c(v).get(L.name)==="failed"?(h(),m("span",Bx,p(E.$t("setup.env.installFailed")),1)):O("",!0)]),i("div",Ux,[c(I)===L.name?(h(),m("button",{key:0,class:"text-xs text-blue-600 hover:underline",onClick:q[19]||(q[19]=(...Ae)=>c(ae)&&c(ae)(...Ae))},p(E.$t("setup.env.viewLogs")),1)):c(v).get(L.name)==="failed"?(h(),m(se,{key:1},[i("button",{class:"text-xs text-blue-600 hover:underline",onClick:q[20]||(q[20]=(...Ae)=>c(ae)&&c(ae)(...Ae))},p(E.$t("setup.env.viewLogs")),1),L.installCommand?(h(),m("button",{key:0,class:"inline-flex items-center gap-1.5 px-3 py-1 text-xs font-medium bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 transition-all",disabled:c(P),onClick:Ae=>c(z)(L.name)},p(E.$t("setup.env.retry")),9,Vx)):O("",!0)],64)):!L.installed&&L.installCommand?(h(),m("button",{key:2,class:"inline-flex items-center gap-1.5 px-3 py-1 text-xs font-medium bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 transition-all",disabled:c(P),onClick:Ae=>c(z)(L.name)},p(E.$t("setup.env.install")),9,Hx)):O("",!0)])],2))),128))])])):O("",!0),c(r)===4?(h(),m("div",zx,[i("div",qx,[i("div",null,[i("label",Kx,p(E.$t("setup.advanced.discoveryInterval")),1),ue(i("input",{"onUpdate:modelValue":q[21]||(q[21]=L=>c(u).poll.discoveryIntervalMs=L),type:"number",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[he,c(u).poll.discoveryIntervalMs,void 0,{number:!0}]])]),i("div",null,[i("label",Gx,p(E.$t("setup.advanced.driveInterval")),1),ue(i("input",{"onUpdate:modelValue":q[22]||(q[22]=L=>c(u).poll.driveIntervalMs=L),type:"number",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[he,c(u).poll.driveIntervalMs,void 0,{number:!0}]])])]),i("div",Wx,[i("div",null,[i("label",Jx,p(E.$t("setup.advanced.maxRetries")),1),ue(i("input",{"onUpdate:modelValue":q[23]||(q[23]=L=>c(u).poll.maxRetries=L),type:"number",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[he,c(u).poll.maxRetries,void 0,{number:!0}]])]),i("div",null,[i("label",Zx,p(E.$t("setup.advanced.maxConcurrent")),1),ue(i("input",{"onUpdate:modelValue":q[24]||(q[24]=L=>c(u).poll.maxConcurrent=L),type:"number",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[he,c(u).poll.maxConcurrent,void 0,{number:!0}]])])]),i("div",Qx,[i("div",null,[i("label",Yx,p(E.$t("setup.advanced.webPort")),1),ue(i("input",{"onUpdate:modelValue":q[25]||(q[25]=L=>c(u).web.port=L),type:"number",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[he,c(u).web.port,void 0,{number:!0}]])]),i("div",null,[i("label",Xx,p(E.$t("setup.advanced.pipelineMode")),1),ue(i("select",{"onUpdate:modelValue":q[26]||(q[26]=L=>c(u).pipeline.mode=L),class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},[i("option",e1,p(E.$t("setup.advanced.pipelineAuto")),1),i("option",t1,p(E.$t("setup.advanced.pipelineClassic")),1),i("option",s1,p(E.$t("setup.advanced.pipelinePlanMode")),1)],512),[[li,c(u).pipeline.mode]])])]),i("div",n1,[ue(i("input",{id:"review-enabled","onUpdate:modelValue":q[27]||(q[27]=L=>c(u).review.enabled=L),type:"checkbox",class:"rounded border-gray-300"},null,512),[[cn,c(u).review.enabled]]),i("label",r1,p(E.$t("setup.advanced.enableReview")),1)]),i("div",null,[i("label",o1,p(E.$t("setup.advanced.phaseTimeout")),1),ue(i("input",{"onUpdate:modelValue":q[28]||(q[28]=L=>c(u).ai.phaseTimeoutMs=L),type:"number",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[he,c(u).ai.phaseTimeoutMs,void 0,{number:!0}]]),i("p",l1,p(E.$t("setup.advanced.phaseTimeoutHint")),1)])])):O("",!0),c(r)===5?(h(),m("div",i1,[i("p",a1,p(E.$t("setup.confirm.reviewHint")),1),i("pre",u1,p(c(w)),1)])):O("",!0)]),_e(hy,{visible:c(k),logs:c(C),"dep-name":c(I)?oe(c(I)):"",elapsed:c(T),installing:c(P),onToggle:c(Te),onClose:c(ve)},null,8,["visible","logs","dep-name","elapsed","installing","onToggle","onClose"]),i("div",c1,[c(r)>0?(h(),m("button",{key:0,class:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50",onClick:q[29]||(q[29]=(...L)=>c(ce)&&c(ce)(...L))},p(E.$t("setup.nav.back")),1)):(h(),m("div",d1)),c(r)<c(o)-1?(h(),m("button",{key:2,class:"px-6 py-2 text-sm font-medium text-white bg-blue-600 rounded-lg hover:bg-blue-700 disabled:opacity-50",disabled:!c(_),onClick:q[30]||(q[30]=(...L)=>c(le)&&c(le)(...L))},p(E.$t("setup.nav.next")),9,p1)):(h(),m("button",{key:3,class:"px-6 py-2 text-sm font-medium text-white bg-green-600 rounded-lg hover:bg-green-700 disabled:opacity-50",disabled:c(l),onClick:q[31]||(q[31]=(...L)=>c(K)&&c(K)(...L))},p(c(l)?E.$t("setup.nav.saving"):E.$t("setup.nav.complete")),9,f1))])]))]))}});async function h1(){try{const e=await fetch("/api/setup/status");if(e.ok&&!(await e.json()).initialized){Ao(g1).use(Mo).mount("#app");return}}catch{}Ao(ry).use(Mo).mount("#app")}h1();
|
|
67
|
+
`);zt=vt.pop()??"";for(const Ft of vt)if(Ft.startsWith("data: "))try{const $e=JSON.parse(Ft.slice(6));if($e.line&&d.value.push($e.line),$e.error&&(H.value=$e.error,d.value.push(`Error: ${$e.error}`)),$e.done){E=!0;const j=r.value.find(b=>b.name===se)?.installed;await v(!0);const Q=r.value.find(b=>b.name===se)?.installed;I.value.set(se,Q?"success":"failed")}}catch{}}E||(I.value.set(se,"failed"),await v(!0))}catch(z){const A=z.message;d.value.push(`Error: ${A}`),H.value=A,I.value.set(se,"failed")}finally{L(),f.value=!1,y.value=""}}async function K(){try{const E=await(await fetch("/api/setup/generate-preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(R)})).json();g.value=E.preview}catch(se){n.value=se.message}}async function le(){s.value=!0,n.value="";try{const E=await(await fetch("/api/setup/complete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:R})})).json();E.success?(C.value=!0,P.value=E.configPath??""):n.value=E.error??"Setup failed"}catch(se){n.value=se.message}finally{s.value=!1}}function ce(){T.value=!T.value}function Te(){T.value=!1,f.value||(d.value=[])}function ve(){T.value=!0}function ae(){e.value<t-1&&(e.value++,n.value="",e.value===5&&K())}function oe(){e.value>0&&(e.value--,n.value="")}return{currentStep:e,totalSteps:t,loading:s,error:n,form:R,dependencies:r,tokenValid:o,tokenUser:l,repoValid:a,repoInfo:u,configPreview:g,installLogs:d,installing:f,installingDep:y,installElapsed:x,setupComplete:C,savedConfigPath:P,logPanelVisible:T,installResult:I,lastInstallError:H,canProceed:k,checkEnv:v,validateToken:_,validateRepo:M,installDep:q,generatePreview:K,completeSetup:le,nextStep:ae,prevStep:oe,toggleLogPanel:ce,closeLogPanel:Te,openLogPanel:ve}}const ly={class:"border-t border-gray-200"},iy={class:"flex items-center gap-2"},ay={class:"font-medium"},uy={key:0,class:"text-gray-400"},cy={key:1,class:"animate-spin h-3 w-3 text-blue-400",viewBox:"0 0 24 24"},dy={class:"flex items-center gap-3"},py={key:0,class:"tabular-nums text-gray-400"},fy=["title"],gy={key:0,class:"text-gray-500"},hy=Ee({__name:"InstallLogPanel",props:{visible:{type:Boolean},logs:{},depName:{},elapsed:{},installing:{type:Boolean}},emits:["toggle","close"],setup(e,{emit:t}){const{t:s}=Ht(),n=e,r=t,o=F(null);return rt(()=>n.logs.length,async()=>{await js(),o.value&&(o.value.scrollTop=o.value.scrollHeight)}),(l,a)=>(h(),m("div",ly,[i("div",{class:"flex items-center justify-between px-4 py-2 bg-gray-800 text-gray-300 text-xs cursor-pointer select-none",onClick:a[1]||(a[1]=u=>r("toggle"))},[i("div",iy,[(h(),m("svg",{class:te(["h-3 w-3 transition-transform",e.visible?"rotate-0":"-rotate-90"]),viewBox:"0 0 20 20",fill:"currentColor"},[...a[2]||(a[2]=[i("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z","clip-rule":"evenodd"},null,-1)])],2)),i("span",ay,p(c(s)("setup.env.logPanel")),1),e.depName?(h(),m("span",uy,"— "+p(e.depName),1)):O("",!0),e.installing?(h(),m("svg",cy,[...a[3]||(a[3]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):O("",!0)]),i("div",dy,[e.installing?(h(),m("span",py,p(e.elapsed)+"s",1)):O("",!0),i("button",{class:"text-gray-400 hover:text-gray-200 transition-colors",title:c(s)("setup.env.closePanel"),onClick:a[0]||(a[0]=Nt(u=>r("close"),["stop"]))},[...a[4]||(a[4]=[i("svg",{class:"h-3.5 w-3.5",viewBox:"0 0 20 20",fill:"currentColor"},[i("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})],-1)])],8,fy)])]),ue(i("div",null,[i("div",{ref_key:"logContainer",ref:o,class:"bg-gray-900 px-4 py-3 text-gray-300 text-xs font-mono max-h-48 overflow-y-auto"},[e.installing&&!e.logs.length?(h(),m("div",gy,p(c(s)("setup.env.waitingOutput")),1)):O("",!0),(h(!0),m(ne,null,Ae(e.logs,(u,g)=>(h(),m("div",{key:g,class:"leading-5"},p(u),1))),128))],512)],512),[[Du,e.visible]])]))}}),my={class:"min-h-screen bg-gray-50 flex items-center justify-center p-4"},by={key:0,class:"bg-white rounded-2xl shadow-lg max-w-lg w-full p-10 text-center"},vy={class:"text-2xl font-bold text-gray-900 mb-2"},yy={class:"text-gray-600 mb-4"},xy={class:"block bg-gray-100 rounded-lg p-3 text-sm mb-6 break-all"},wy={class:"text-gray-600"},ky={key:1,class:"bg-white rounded-2xl shadow-lg max-w-3xl w-full overflow-hidden"},$y={class:"bg-gray-900 text-white px-8 py-6"},Sy={class:"flex items-center justify-between"},_y={class:"text-xl font-bold"},Cy={class:"text-gray-400 text-sm mt-1"},Iy={class:"mt-4 flex gap-1"},Ty={class:"p-8 min-h-[400px]"},Py={key:0,class:"mb-4 bg-red-50 border border-red-200 text-red-700 rounded-lg px-4 py-3 text-sm"},Ry={key:1},Ay={class:"text-gray-600 mb-6"},Dy={key:0,class:"flex items-center gap-2 text-gray-500"},Ly={key:1,class:"space-y-3"},Ey={class:"flex items-center gap-3"},Fy={class:"text-lg"},My={key:0,class:"animate-spin h-5 w-5 text-blue-500",viewBox:"0 0 24 24"},jy={class:"font-medium text-gray-900"},Oy={key:0,class:"text-xs text-gray-500"},Ny={key:1,class:"text-xs text-blue-600"},By={key:2,class:"text-xs text-green-600"},Uy={key:3,class:"text-xs text-red-600"},Vy={class:"flex items-center gap-2"},Hy=["disabled","onClick"],zy=["disabled","onClick"],qy={key:3,class:"text-xs text-gray-500"},Ky={key:2,class:"space-y-5"},Gy={class:"block text-sm font-medium text-gray-700 mb-1"},Wy=["placeholder"],Jy={class:"mt-1 text-xs text-gray-500"},Zy={class:"block text-sm font-medium text-gray-700 mb-1"},Qy=["placeholder"],Yy={class:"mt-1 text-xs text-gray-500"},Xy={class:"grid grid-cols-2 gap-4"},ex={class:"block text-sm font-medium text-gray-700 mb-1"},tx={class:"block text-sm font-medium text-gray-700 mb-1"},sx={class:"block text-sm font-medium text-gray-700 mb-1"},nx={class:"block text-sm font-medium text-gray-700 mb-1"},rx=["placeholder"],ox={key:3,class:"space-y-5"},lx={class:"block text-sm font-medium text-gray-700 mb-1"},ix={class:"block text-sm font-medium text-gray-700 mb-1"},ax={class:"flex gap-2"},ux=["placeholder"],cx=["disabled"],dx={key:0,class:"mt-1 text-xs text-green-600"},px={key:1,class:"mt-1 text-xs text-red-600"},fx={class:"block text-sm font-medium text-gray-700 mb-1"},gx={class:"flex gap-2"},hx=["placeholder"],mx=["disabled"],bx={key:0,class:"mt-1 text-xs text-green-600"},vx={key:1,class:"mt-1 text-xs text-red-600"},yx={key:4,class:"space-y-5"},xx={class:"block text-sm font-medium text-gray-700 mb-3"},wx={class:"grid grid-cols-3 gap-3"},kx={class:"font-medium"},$x={class:"text-xs text-gray-500 mt-1"},Sx={class:"font-medium"},_x={class:"text-xs text-gray-500 mt-1"},Cx={class:"font-medium"},Ix={class:"text-xs text-gray-500 mt-1"},Tx={class:"block text-sm font-medium text-gray-700 mb-1"},Px={class:"space-y-2"},Rx={class:"text-sm font-medium text-gray-700"},Ax={class:"flex items-center gap-2"},Dx={key:0},Lx={key:1},Ex={key:2},Fx={key:3},Mx={class:"text-sm"},jx={key:4,class:"text-xs text-gray-500"},Ox={key:5,class:"text-xs text-blue-600"},Nx={key:6,class:"text-xs text-green-600"},Bx={key:7,class:"text-xs text-red-600"},Ux={class:"flex items-center gap-2"},Vx=["disabled","onClick"],Hx=["disabled","onClick"],zx={key:5,class:"space-y-5"},qx={class:"grid grid-cols-2 gap-4"},Kx={class:"block text-sm font-medium text-gray-700 mb-1"},Gx={class:"block text-sm font-medium text-gray-700 mb-1"},Wx={class:"grid grid-cols-2 gap-4"},Jx={class:"block text-sm font-medium text-gray-700 mb-1"},Zx={class:"block text-sm font-medium text-gray-700 mb-1"},Qx={class:"grid grid-cols-2 gap-4"},Yx={class:"block text-sm font-medium text-gray-700 mb-1"},Xx={class:"block text-sm font-medium text-gray-700 mb-1"},e1={value:"auto"},t1={value:"classic"},s1={value:"plan-mode"},n1={class:"flex items-center gap-2"},r1={for:"review-enabled",class:"text-sm text-gray-700"},o1={class:"block text-sm font-medium text-gray-700 mb-1"},l1={class:"mt-1 text-xs text-gray-500"},i1={key:6,class:"space-y-5"},a1={class:"text-sm text-gray-600"},u1={class:"bg-gray-900 text-gray-300 rounded-lg p-4 text-xs font-mono max-h-80 overflow-y-auto whitespace-pre-wrap"},c1={class:"px-8 py-4 bg-gray-50 border-t flex items-center justify-between"},d1={key:1},p1=["disabled"],f1=["disabled"],g1=Ee({__name:"SetupWizard",setup(e){const{t,locale:s,setLocale:n}=Ht(),{currentStep:r,totalSteps:o,loading:l,error:a,form:u,dependencies:g,tokenValid:d,tokenUser:f,repoValid:y,repoInfo:x,configPreview:w,installLogs:C,installing:P,installingDep:T,installElapsed:I,setupComplete:H,savedConfigPath:R,logPanelVisible:k,installResult:v,canProceed:_,checkEnv:M,validateToken:S,validateRepo:L,installDep:q,completeSetup:K,nextStep:le,prevStep:ce,toggleLogPanel:Te,closeLogPanel:ve,openLogPanel:ae}=oy();function oe(E){return g.value.find(A=>A.name===E)?.displayName??E}const se=Ie(()=>[t("setup.step.envCheck"),t("setup.step.projectConfig"),t("setup.step.gongfengConfig"),t("setup.step.aiRunner"),t("setup.step.advancedOptions"),t("setup.step.reviewConfirm")]);return Dt(()=>{M()}),rt(()=>u.ai.mode,()=>{M()}),(E,z)=>(h(),m("div",my,[c(H)?(h(),m("div",by,[z[32]||(z[32]=i("div",{class:"text-5xl mb-4"},"✅",-1)),i("h2",vy,p(E.$t("setup.complete.title")),1),i("p",yy,p(E.$t("setup.complete.savedTo")),1),i("code",xy,p(c(R)),1),i("p",wy,p(E.$t("setup.complete.startHint")),1),z[33]||(z[33]=i("code",{class:"block bg-gray-900 text-green-400 rounded-lg p-3 text-sm mt-2"}," issue-auto-finish start ",-1))])):(h(),m("div",ky,[i("div",$y,[i("div",Sy,[i("h1",_y,p(E.$t("setup.title")),1),i("button",{class:te(["px-3 py-1 text-sm rounded-lg transition-colors",(c(s)==="zh-CN","bg-gray-700 text-gray-200 hover:bg-gray-600")]),onClick:z[0]||(z[0]=A=>c(n)(c(s)==="zh-CN"?"en":"zh-CN"))},p(c(s)==="zh-CN"?"EN":"中文"),3)]),i("p",Cy,p(se.value[c(r)])+" ("+p(c(r)+1)+"/"+p(c(o))+")",1),i("div",Iy,[(h(!0),m(ne,null,Ae(c(o),A=>(h(),m("div",{key:A,class:te(["h-1 flex-1 rounded-full transition-colors",A-1<=c(r)?"bg-blue-400":"bg-gray-700"])},null,2))),128))])]),i("div",Ty,[c(a)?(h(),m("div",Py,p(c(a)),1)):O("",!0),c(r)===0?(h(),m("div",Ry,[i("p",Ay,p(E.$t("setup.env.checking")),1),c(l)?(h(),m("div",Dy,[z[34]||(z[34]=i("svg",{class:"animate-spin h-5 w-5",viewBox:"0 0 24 24"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),de(" "+p(E.$t("setup.env.checkingShort")),1)])):(h(),m("div",Ly,[(h(!0),m(ne,null,Ae(c(g),A=>(h(),m("div",{key:A.name,class:te(["flex items-center justify-between p-3 rounded-lg border",A.installed?"border-green-200 bg-green-50":c(v).get(A.name)==="failed"||A.required?"border-red-200 bg-red-50":"border-yellow-200 bg-yellow-50"])},[i("div",Ey,[i("span",Fy,[c(T)===A.name?(h(),m("svg",My,[...z[35]||(z[35]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):A.installed?(h(),m(ne,{key:1},[de("✅")],64)):c(v).get(A.name)==="failed"?(h(),m(ne,{key:2},[de("❌")],64)):A.required?(h(),m(ne,{key:3},[de("❌")],64)):(h(),m(ne,{key:4},[de("⚠️")],64))]),i("div",null,[i("div",jy,p(A.displayName),1),A.version?(h(),m("div",Oy,"v"+p(A.version),1)):O("",!0),c(T)===A.name?(h(),m("div",Ny,p(E.$t("setup.env.installing")),1)):c(v).get(A.name)==="success"&&A.installed?(h(),m("div",By,p(E.$t("setup.env.installSuccess")),1)):c(v).get(A.name)==="failed"?(h(),m("div",Uy,p(E.$t("setup.env.installFailed")),1)):O("",!0)])]),i("div",Vy,[c(T)===A.name?(h(),m("button",{key:0,class:"text-xs text-blue-600 hover:underline",onClick:z[1]||(z[1]=(...Fe)=>c(ae)&&c(ae)(...Fe))},p(E.$t("setup.env.viewLogs")),1)):c(v).get(A.name)==="failed"?(h(),m(ne,{key:1},[i("button",{class:"text-xs text-blue-600 hover:underline",onClick:z[2]||(z[2]=(...Fe)=>c(ae)&&c(ae)(...Fe))},p(E.$t("setup.env.viewLogs")),1),A.installCommand?(h(),m("button",{key:0,class:"inline-flex items-center gap-1.5 px-3 py-1 text-xs font-medium bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 transition-all",disabled:c(P),onClick:Fe=>c(q)(A.name)},p(E.$t("setup.env.retry")),9,Hy)):O("",!0)],64)):!A.installed&&A.installCommand?(h(),m("button",{key:2,class:"inline-flex items-center gap-1.5 px-3 py-1 text-xs font-medium bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 transition-all",disabled:c(P),onClick:Fe=>c(q)(A.name)},p(E.$t("setup.env.install")),9,zy)):!A.installed&&!c(v).has(A.name)?(h(),m("span",qy,p(A.installHint),1)):O("",!0)])],2))),128))])),i("button",{class:"mt-4 text-sm text-blue-600 hover:underline",onClick:z[3]||(z[3]=(...A)=>c(M)&&c(M)(...A))},p(E.$t("setup.env.refresh")),1)])):O("",!0),c(r)===1?(h(),m("div",Ky,[i("div",null,[i("label",Gy,p(E.$t("setup.project.workDir")),1),ue(i("input",{"onUpdate:modelValue":z[4]||(z[4]=A=>c(u).project.workDir=A),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:E.$t("setup.project.workDirPlaceholder")},null,8,Wy),[[he,c(u).project.workDir]]),i("p",Jy,p(E.$t("setup.project.workDirHint")),1)]),i("div",null,[i("label",Zy,p(E.$t("setup.project.gitRootDir")),1),ue(i("input",{"onUpdate:modelValue":z[5]||(z[5]=A=>c(u).project.gitRootDir=A),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:E.$t("setup.project.gitRootDirPlaceholder")},null,8,Qy),[[he,c(u).project.gitRootDir]]),i("p",Yy,p(E.$t("setup.project.gitRootDirHint")),1)]),i("div",Xy,[i("div",null,[i("label",ex,p(E.$t("setup.project.baseBranch")),1),ue(i("input",{"onUpdate:modelValue":z[6]||(z[6]=A=>c(u).project.baseBranch=A),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[he,c(u).project.baseBranch]])]),i("div",null,[i("label",tx,p(E.$t("setup.project.branchPrefix")),1),ue(i("input",{"onUpdate:modelValue":z[7]||(z[7]=A=>c(u).project.branchPrefix=A),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[he,c(u).project.branchPrefix]])])]),i("div",null,[i("label",sx,p(E.$t("setup.project.worktreeBaseDir")),1),ue(i("input",{"onUpdate:modelValue":z[8]||(z[8]=A=>c(u).project.worktreeBaseDir=A),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"/tmp/issue-auto-finish-worktrees"},null,512),[[he,c(u).project.worktreeBaseDir]])]),i("div",null,[i("label",nx,p(E.$t("setup.project.projectSubDir")),1),ue(i("input",{"onUpdate:modelValue":z[9]||(z[9]=A=>c(u).project.projectSubDir=A),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:E.$t("setup.project.projectSubDirPlaceholder")},null,8,rx),[[he,c(u).project.projectSubDir]])])])):O("",!0),c(r)===2?(h(),m("div",ox,[i("div",null,[i("label",lx,p(E.$t("setup.gongfeng.apiUrl")),1),ue(i("input",{"onUpdate:modelValue":z[10]||(z[10]=A=>c(u).gongfeng.apiUrl=A),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"https://gitlab.example.com"},null,512),[[he,c(u).gongfeng.apiUrl]])]),i("div",null,[i("label",ix,p(E.$t("setup.gongfeng.privateToken")),1),i("div",ax,[ue(i("input",{"onUpdate:modelValue":z[11]||(z[11]=A=>c(u).gongfeng.privateToken=A),type:"password",class:"flex-1 border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:E.$t("setup.gongfeng.tokenPlaceholder")},null,8,ux),[[he,c(u).gongfeng.privateToken]]),i("button",{class:"px-4 py-2 text-sm font-medium bg-gray-800 text-white rounded-lg hover:bg-gray-700 disabled:opacity-50",disabled:!c(u).gongfeng.apiUrl||!c(u).gongfeng.privateToken,onClick:z[12]||(z[12]=(...A)=>c(S)&&c(S)(...A))},p(E.$t("setup.gongfeng.verify")),9,cx)]),c(d)===!0?(h(),m("div",dx," ✅ "+p(E.$t("setup.gongfeng.tokenValid"))+p(c(f)?.name?` (${c(f).name})`:""),1)):c(d)===!1?(h(),m("div",px," ❌ "+p(E.$t("setup.gongfeng.tokenInvalid")),1)):O("",!0)]),i("div",null,[i("label",fx,p(E.$t("setup.gongfeng.projectPath")),1),i("div",gx,[ue(i("input",{"onUpdate:modelValue":z[13]||(z[13]=A=>c(u).gongfeng.projectPath=A),type:"text",class:"flex-1 border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:E.$t("setup.gongfeng.projectPathPlaceholder")},null,8,hx),[[he,c(u).gongfeng.projectPath]]),i("button",{class:"px-4 py-2 text-sm font-medium bg-gray-800 text-white rounded-lg hover:bg-gray-700 disabled:opacity-50",disabled:!c(u).gongfeng.apiUrl||!c(u).gongfeng.privateToken||!c(u).gongfeng.projectPath,onClick:z[14]||(z[14]=(...A)=>c(L)&&c(L)(...A))},p(E.$t("setup.gongfeng.verify")),9,mx)]),c(y)===!0?(h(),m("div",bx," ✅ "+p(E.$t("setup.gongfeng.repoFound"))+p(c(x)?.name?`: ${c(x).name}`:""),1)):c(y)===!1?(h(),m("div",vx," ❌ "+p(E.$t("setup.gongfeng.repoNotFound")),1)):O("",!0)])])):O("",!0),c(r)===3?(h(),m("div",yx,[i("div",null,[i("label",xx,p(E.$t("setup.ai.modeLabel")),1),i("div",wx,[i("button",{class:te(["p-4 rounded-lg border-2 text-left transition-colors",c(u).ai.mode==="claude-internal"?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"]),onClick:z[15]||(z[15]=A=>c(u).ai.mode="claude-internal")},[i("div",kx,p(E.$t("setup.ai.claudeInternal")),1),i("div",$x,p(E.$t("setup.ai.claudeInternalDesc")),1)],2),i("button",{class:te(["p-4 rounded-lg border-2 text-left transition-colors",c(u).ai.mode==="cursor-agent"?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"]),onClick:z[16]||(z[16]=A=>c(u).ai.mode="cursor-agent")},[i("div",Sx,p(E.$t("setup.ai.cursorAgent")),1),i("div",_x,p(E.$t("setup.ai.cursorAgentDesc")),1)],2),i("button",{class:te(["p-4 rounded-lg border-2 text-left transition-colors",c(u).ai.mode==="codebuddy"?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"]),onClick:z[17]||(z[17]=A=>c(u).ai.mode="codebuddy")},[i("div",Cx,p(E.$t("setup.ai.codebuddy")),1),i("div",Ix,p(E.$t("setup.ai.codebuddyDesc")),1)],2)])]),i("div",null,[i("label",Tx,p(E.$t("setup.ai.model")),1),ue(i("input",{"onUpdate:modelValue":z[18]||(z[18]=A=>c(u).ai.model=A),type:"text",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[he,c(u).ai.model]])]),i("div",Px,[i("p",Rx,p(E.$t("setup.ai.cliStatus")),1),(h(!0),m(ne,null,Ae(c(g).filter(A=>A.name==="claude-internal"||A.name==="cursor"||A.name==="codebuddy"),A=>(h(),m("div",{key:A.name,class:te(["flex items-center justify-between p-3 rounded-lg border",A.installed?"border-green-200 bg-green-50":c(v).get(A.name)==="failed"?"border-red-200 bg-red-50":"border-yellow-200 bg-yellow-50"])},[i("div",Ax,[c(T)===A.name?(h(),m("span",Dx,[...z[36]||(z[36]=[i("svg",{class:"animate-spin h-4 w-4 text-blue-500",viewBox:"0 0 24 24"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)])])):A.installed?(h(),m("span",Lx,"✅")):c(v).get(A.name)==="failed"?(h(),m("span",Ex,"❌")):(h(),m("span",Fx,"⚠️")),i("span",Mx,p(A.displayName),1),A.version?(h(),m("span",jx,"v"+p(A.version),1)):O("",!0),c(T)===A.name?(h(),m("span",Ox,p(E.$t("setup.env.installing")),1)):c(v).get(A.name)==="success"&&A.installed?(h(),m("span",Nx,p(E.$t("setup.env.installSuccess")),1)):c(v).get(A.name)==="failed"?(h(),m("span",Bx,p(E.$t("setup.env.installFailed")),1)):O("",!0)]),i("div",Ux,[c(T)===A.name?(h(),m("button",{key:0,class:"text-xs text-blue-600 hover:underline",onClick:z[19]||(z[19]=(...Fe)=>c(ae)&&c(ae)(...Fe))},p(E.$t("setup.env.viewLogs")),1)):c(v).get(A.name)==="failed"?(h(),m(ne,{key:1},[i("button",{class:"text-xs text-blue-600 hover:underline",onClick:z[20]||(z[20]=(...Fe)=>c(ae)&&c(ae)(...Fe))},p(E.$t("setup.env.viewLogs")),1),A.installCommand?(h(),m("button",{key:0,class:"inline-flex items-center gap-1.5 px-3 py-1 text-xs font-medium bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 transition-all",disabled:c(P),onClick:Fe=>c(q)(A.name)},p(E.$t("setup.env.retry")),9,Vx)):O("",!0)],64)):!A.installed&&A.installCommand?(h(),m("button",{key:2,class:"inline-flex items-center gap-1.5 px-3 py-1 text-xs font-medium bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 transition-all",disabled:c(P),onClick:Fe=>c(q)(A.name)},p(E.$t("setup.env.install")),9,Hx)):O("",!0)])],2))),128))])])):O("",!0),c(r)===4?(h(),m("div",zx,[i("div",qx,[i("div",null,[i("label",Kx,p(E.$t("setup.advanced.discoveryInterval")),1),ue(i("input",{"onUpdate:modelValue":z[21]||(z[21]=A=>c(u).poll.discoveryIntervalMs=A),type:"number",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[he,c(u).poll.discoveryIntervalMs,void 0,{number:!0}]])]),i("div",null,[i("label",Gx,p(E.$t("setup.advanced.driveInterval")),1),ue(i("input",{"onUpdate:modelValue":z[22]||(z[22]=A=>c(u).poll.driveIntervalMs=A),type:"number",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[he,c(u).poll.driveIntervalMs,void 0,{number:!0}]])])]),i("div",Wx,[i("div",null,[i("label",Jx,p(E.$t("setup.advanced.maxRetries")),1),ue(i("input",{"onUpdate:modelValue":z[23]||(z[23]=A=>c(u).poll.maxRetries=A),type:"number",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[he,c(u).poll.maxRetries,void 0,{number:!0}]])]),i("div",null,[i("label",Zx,p(E.$t("setup.advanced.maxConcurrent")),1),ue(i("input",{"onUpdate:modelValue":z[24]||(z[24]=A=>c(u).poll.maxConcurrent=A),type:"number",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[he,c(u).poll.maxConcurrent,void 0,{number:!0}]])])]),i("div",Qx,[i("div",null,[i("label",Yx,p(E.$t("setup.advanced.webPort")),1),ue(i("input",{"onUpdate:modelValue":z[25]||(z[25]=A=>c(u).web.port=A),type:"number",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[he,c(u).web.port,void 0,{number:!0}]])]),i("div",null,[i("label",Xx,p(E.$t("setup.advanced.pipelineMode")),1),ue(i("select",{"onUpdate:modelValue":z[26]||(z[26]=A=>c(u).pipeline.mode=A),class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},[i("option",e1,p(E.$t("setup.advanced.pipelineAuto")),1),i("option",t1,p(E.$t("setup.advanced.pipelineClassic")),1),i("option",s1,p(E.$t("setup.advanced.pipelinePlanMode")),1)],512),[[li,c(u).pipeline.mode]])])]),i("div",n1,[ue(i("input",{id:"review-enabled","onUpdate:modelValue":z[27]||(z[27]=A=>c(u).review.enabled=A),type:"checkbox",class:"rounded border-gray-300"},null,512),[[cn,c(u).review.enabled]]),i("label",r1,p(E.$t("setup.advanced.enableReview")),1)]),i("div",null,[i("label",o1,p(E.$t("setup.advanced.phaseTimeout")),1),ue(i("input",{"onUpdate:modelValue":z[28]||(z[28]=A=>c(u).ai.phaseTimeoutMs=A),type:"number",class:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[he,c(u).ai.phaseTimeoutMs,void 0,{number:!0}]]),i("p",l1,p(E.$t("setup.advanced.phaseTimeoutHint")),1)])])):O("",!0),c(r)===5?(h(),m("div",i1,[i("p",a1,p(E.$t("setup.confirm.reviewHint")),1),i("pre",u1,p(c(w)),1)])):O("",!0)]),c(k)||c(P)?(h(),Qe(hy,{key:0,visible:c(k),logs:c(C),"dep-name":c(T)?oe(c(T)):"",elapsed:c(I),installing:c(P),onToggle:c(Te),onClose:c(ve)},null,8,["visible","logs","dep-name","elapsed","installing","onToggle","onClose"])):O("",!0),i("div",c1,[c(r)>0?(h(),m("button",{key:0,class:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50",onClick:z[29]||(z[29]=(...A)=>c(ce)&&c(ce)(...A))},p(E.$t("setup.nav.back")),1)):(h(),m("div",d1)),c(r)<c(o)-1?(h(),m("button",{key:2,class:"px-6 py-2 text-sm font-medium text-white bg-blue-600 rounded-lg hover:bg-blue-700 disabled:opacity-50",disabled:!c(_),onClick:z[30]||(z[30]=(...A)=>c(le)&&c(le)(...A))},p(E.$t("setup.nav.next")),9,p1)):(h(),m("button",{key:3,class:"px-6 py-2 text-sm font-medium text-white bg-green-600 rounded-lg hover:bg-green-700 disabled:opacity-50",disabled:c(l),onClick:z[31]||(z[31]=(...A)=>c(K)&&c(K)(...A))},p(c(l)?E.$t("setup.nav.saving"):E.$t("setup.nav.complete")),9,f1))])]))]))}});async function h1(){try{const e=await fetch("/api/setup/status");if(e.ok&&!(await e.json()).initialized){Ao(g1).use(Mo).mount("#app");return}}catch{}Ao(ry).use(Mo).mount("#app")}h1();
|