@xdevops/issue-auto-finish 1.0.4 → 1.0.6

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.
@@ -0,0 +1,67 @@
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 i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).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 ur(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const he={},es=[],pt=()=>{},Wo=()=>!1,cn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),cr=e=>e.startsWith("onUpdate:"),Pe=Object.assign,dr=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},wl=Object.prototype.hasOwnProperty,me=(e,t)=>wl.call(e,t),Y=Array.isArray,ts=e=>As(e)==="[object Map]",is=e=>As(e)==="[object Set]",Br=e=>As(e)==="[object Date]",oe=e=>typeof e=="function",Se=e=>typeof e=="string",gt=e=>typeof e=="symbol",ye=e=>e!==null&&typeof e=="object",Jo=e=>(ye(e)||oe(e))&&oe(e.then)&&oe(e.catch),Zo=Object.prototype.toString,As=e=>Zo.call(e),kl=e=>As(e).slice(8,-1),Qo=e=>As(e)==="[object Object]",pr=e=>Se(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ms=ur(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),dn=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},$l=/-\w/g,$t=dn(e=>e.replace($l,t=>t.slice(1).toUpperCase())),Sl=/\B([A-Z])/g,It=dn(e=>e.replace(Sl,"-$1").toLowerCase()),Yo=dn(e=>e.charAt(0).toUpperCase()+e.slice(1)),An=dn(e=>e?`on${Yo(e)}`:""),He=(e,t)=>!Object.is(e,t),Vs=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},Xo=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},pn=e=>{const t=parseFloat(e);return isNaN(t)?e:t},_l=e=>{const t=Se(e)?Number(e):NaN;return isNaN(t)?e:t};let Ur;const fn=()=>Ur||(Ur=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function gn(e){if(Y(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],r=Se(n)?Pl(n):gn(n);if(r)for(const o in r)t[o]=r[o]}return t}else if(Se(e)||ye(e))return e}const Cl=/;(?![^(]*\))/g,Il=/:([^]+)/,Tl=/\/\*[^]*?\*\//g;function Pl(e){const t={};return e.replace(Tl,"").split(Cl).forEach(s=>{if(s){const n=s.split(Il);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function te(e){let t="";if(Se(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(ye(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Rl="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Al=ur(Rl);function ei(e){return!!e||e===""}function Dl(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=Et(e[n],t[n]);return s}function Et(e,t){if(e===t)return!0;let s=Br(e),n=Br(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=gt(e),n=gt(t),s||n)return e===t;if(s=Y(e),n=Y(t),s||n)return s&&n?Dl(e,t):!1;if(s=ye(e),n=ye(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 i in e){const a=e.hasOwnProperty(i),u=t.hasOwnProperty(i);if(a&&!u||!a&&u||!Et(e[i],t[i]))return!1}}return String(e)===String(t)}function fr(e,t){return e.findIndex(s=>Et(s,t))}const ti=e=>!!(e&&e.__v_isRef===!0),p=e=>Se(e)?e:e==null?"":Y(e)||ye(e)&&(e.toString===Zo||!oe(e.toString))?ti(e)?p(e.value):JSON.stringify(e,si,2):String(e),si=(e,t)=>ti(t)?si(e,t.value):ts(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,r],o)=>(s[Dn(n,o)+" =>"]=r,s),{})}:is(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Dn(s))}:gt(t)?Dn(t):ye(t)&&!Y(t)&&!Qo(t)?String(t):t,Dn=(e,t="")=>{var s;return gt(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};let Ve;class El{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=Ve,!t&&Ve&&(this.index=(Ve.scopes||(Ve.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=Ve;try{return Ve=this,t()}finally{Ve=s}}}on(){++this._on===1&&(this.prevScope=Ve,Ve=this)}off(){this._on>0&&--this._on===0&&(Ve=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 Ll(){return Ve}let we;const En=new WeakSet;class ni{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,Ve&&Ve.active&&Ve.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,En.has(this)&&(En.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||oi(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Vr(this),ii(this);const t=we,s=tt;we=this,tt=!0;try{return this.fn()}finally{li(this),we=t,tt=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)mr(t);this.deps=this.depsTail=void 0,Vr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?En.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){zn(this)&&this.run()}get dirty(){return zn(this)}}let ri=0,bs,ys;function oi(e,t=!1){if(e.flags|=8,t){e.next=ys,ys=e;return}e.next=bs,bs=e}function gr(){ri++}function hr(){if(--ri>0)return;if(ys){let t=ys;for(ys=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;bs;){let t=bs;for(bs=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 ii(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function li(e){let t,s=e.depsTail,n=s;for(;n;){const r=n.prevDep;n.version===-1?(n===s&&(s=r),mr(n),Fl(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=r}e.deps=t,e.depsTail=s}function zn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ai(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ai(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ss)||(e.globalVersion=Ss,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!zn(e))))return;e.flags|=2;const t=e.dep,s=we,n=tt;we=e,tt=!0;try{ii(e);const r=e.fn(e._value);(t.version===0||He(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{we=s,tt=n,li(e),e.flags&=-3}}function mr(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)mr(o,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Fl(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let tt=!0;const ui=[];function St(){ui.push(tt),tt=!1}function _t(){const e=ui.pop();tt=e===void 0?!0:e}function Vr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=we;we=void 0;try{t()}finally{we=s}}}let Ss=0;class Ml{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class hn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!we||!tt||we===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==we)s=this.activeLink=new Ml(we,this),we.deps?(s.prevDep=we.depsTail,we.depsTail.nextDep=s,we.depsTail=s):we.deps=we.depsTail=s,ci(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=we.depsTail,s.nextDep=void 0,we.depsTail.nextDep=s,we.depsTail=s,we.deps===s&&(we.deps=n)}return s}trigger(t){this.version++,Ss++,this.notify(t)}notify(t){gr();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{hr()}}}function ci(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)ci(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const qn=new WeakMap,Kt=Symbol(""),Kn=Symbol(""),_s=Symbol("");function Ee(e,t,s){if(tt&&we){let n=qn.get(e);n||qn.set(e,n=new Map);let r=n.get(s);r||(n.set(s,r=new hn),r.map=n,r.key=s),r.track()}}function xt(e,t,s,n,r,o){const i=qn.get(e);if(!i){Ss++;return}const a=u=>{u&&u.trigger()};if(gr(),t==="clear")i.forEach(a);else{const u=Y(e),g=u&&pr(s);if(u&&s==="length"){const d=Number(n);i.forEach((f,y)=>{(y==="length"||y===_s||!gt(y)&&y>=d)&&a(f)})}else switch((s!==void 0||i.has(void 0))&&a(i.get(s)),g&&a(i.get(_s)),t){case"add":u?g&&a(i.get("length")):(a(i.get(Kt)),ts(e)&&a(i.get(Kn)));break;case"delete":u||(a(i.get(Kt)),ts(e)&&a(i.get(Kn)));break;case"set":ts(e)&&a(i.get(Kt));break}}hr()}function Yt(e){const t=ge(e);return t===e?t:(Ee(t,"iterate",_s),Ze(e)?t:t.map(st))}function mn(e){return Ee(e=ge(e),"iterate",_s),e}function At(e,t){return Ct(e)?rs(Gt(e)?st(t):t):st(t)}const jl={__proto__:null,[Symbol.iterator](){return Ln(this,Symbol.iterator,e=>At(this,e))},concat(...e){return Yt(this).concat(...e.map(t=>Y(t)?Yt(t):t))},entries(){return Ln(this,"entries",e=>(e[1]=At(this,e[1]),e))},every(e,t){return mt(this,"every",e,t,void 0,arguments)},filter(e,t){return mt(this,"filter",e,t,s=>s.map(n=>At(this,n)),arguments)},find(e,t){return mt(this,"find",e,t,s=>At(this,s),arguments)},findIndex(e,t){return mt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return mt(this,"findLast",e,t,s=>At(this,s),arguments)},findLastIndex(e,t){return mt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return mt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Fn(this,"includes",e)},indexOf(...e){return Fn(this,"indexOf",e)},join(e){return Yt(this).join(e)},lastIndexOf(...e){return Fn(this,"lastIndexOf",e)},map(e,t){return mt(this,"map",e,t,void 0,arguments)},pop(){return us(this,"pop")},push(...e){return us(this,"push",e)},reduce(e,...t){return Hr(this,"reduce",e,t)},reduceRight(e,...t){return Hr(this,"reduceRight",e,t)},shift(){return us(this,"shift")},some(e,t){return mt(this,"some",e,t,void 0,arguments)},splice(...e){return us(this,"splice",e)},toReversed(){return Yt(this).toReversed()},toSorted(e){return Yt(this).toSorted(e)},toSpliced(...e){return Yt(this).toSpliced(...e)},unshift(...e){return us(this,"unshift",e)},values(){return Ln(this,"values",e=>At(this,e))}};function Ln(e,t,s){const n=mn(e),r=n[t]();return n!==e&&!Ze(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=s(o.value)),o}),r}const Ol=Array.prototype;function mt(e,t,s,n,r,o){const i=mn(e),a=i!==e&&!Ze(e),u=i[t];if(u!==Ol[t]){const f=u.apply(e,o);return a?st(f):f}let g=s;i!==e&&(a?g=function(f,y){return s.call(this,At(e,f),y,e)}:s.length>2&&(g=function(f,y){return s.call(this,f,y,e)}));const d=u.call(i,g,n);return a&&r?r(d):d}function Hr(e,t,s,n){const r=mn(e);let o=s;return r!==e&&(Ze(e)?s.length>3&&(o=function(i,a,u){return s.call(this,i,a,u,e)}):o=function(i,a,u){return s.call(this,i,At(e,a),u,e)}),r[t](o,...n)}function Fn(e,t,s){const n=ge(e);Ee(n,"iterate",_s);const r=n[t](...s);return(r===-1||r===!1)&&vr(s[0])?(s[0]=ge(s[0]),n[t](...s)):r}function us(e,t,s=[]){St(),gr();const n=ge(e)[t].apply(e,s);return hr(),_t(),n}const Nl=ur("__proto__,__v_isRef,__isVue"),di=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(gt));function Bl(e){gt(e)||(e=String(e));const t=ge(this);return Ee(t,"has",e),t.hasOwnProperty(e)}class pi{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?Zl:mi:o?hi:gi).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const i=Y(t);if(!r){let u;if(i&&(u=jl[s]))return u;if(s==="hasOwnProperty")return Bl}const a=Reflect.get(t,s,Re(t)?t:n);if((gt(s)?di.has(s):Nl(s))||(r||Ee(t,"get",s),o))return a;if(Re(a)){const u=i&&pr(s)?a:a.value;return r&&ye(u)?Wn(u):u}return ye(a)?r?Wn(a):bn(a):a}}class fi extends pi{constructor(t=!1){super(!1,t)}set(t,s,n,r){let o=t[s];const i=Y(t)&&pr(s);if(!this._isShallow){const g=Ct(o);if(!Ze(n)&&!Ct(n)&&(o=ge(o),n=ge(n)),!i&&Re(o)&&!Re(n))return g||(o.value=n),!0}const a=i?Number(s)<t.length:me(t,s),u=Reflect.set(t,s,n,Re(t)?t:r);return t===ge(r)&&(a?He(n,o)&&xt(t,"set",s,n):xt(t,"add",s,n)),u}deleteProperty(t,s){const n=me(t,s);t[s];const r=Reflect.deleteProperty(t,s);return r&&n&&xt(t,"delete",s,void 0),r}has(t,s){const n=Reflect.has(t,s);return(!gt(s)||!di.has(s))&&Ee(t,"has",s),n}ownKeys(t){return Ee(t,"iterate",Y(t)?"length":Kt),Reflect.ownKeys(t)}}class Ul extends pi{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const Vl=new fi,Hl=new Ul,zl=new fi(!0);const Gn=e=>e,js=e=>Reflect.getPrototypeOf(e);function ql(e,t,s){return function(...n){const r=this.__v_raw,o=ge(r),i=ts(o),a=e==="entries"||e===Symbol.iterator&&i,u=e==="keys"&&i,g=r[e](...n),d=s?Gn:t?rs:st;return!t&&Ee(o,"iterate",u?Kn:Kt),Pe(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 Os(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Kl(e,t){const s={get(r){const o=this.__v_raw,i=ge(o),a=ge(r);e||(He(r,a)&&Ee(i,"get",r),Ee(i,"get",a));const{has:u}=js(i),g=t?Gn:e?rs:st;if(u.call(i,r))return g(o.get(r));if(u.call(i,a))return g(o.get(a));o!==i&&o.get(r)},get size(){const r=this.__v_raw;return!e&&Ee(ge(r),"iterate",Kt),r.size},has(r){const o=this.__v_raw,i=ge(o),a=ge(r);return e||(He(r,a)&&Ee(i,"has",r),Ee(i,"has",a)),r===a?o.has(r):o.has(r)||o.has(a)},forEach(r,o){const i=this,a=i.__v_raw,u=ge(a),g=t?Gn:e?rs:st;return!e&&Ee(u,"iterate",Kt),a.forEach((d,f)=>r.call(o,g(d),g(f),i))}};return Pe(s,e?{add:Os("add"),set:Os("set"),delete:Os("delete"),clear:Os("clear")}:{add(r){!t&&!Ze(r)&&!Ct(r)&&(r=ge(r));const o=ge(this);return js(o).has.call(o,r)||(o.add(r),xt(o,"add",r,r)),this},set(r,o){!t&&!Ze(o)&&!Ct(o)&&(o=ge(o));const i=ge(this),{has:a,get:u}=js(i);let g=a.call(i,r);g||(r=ge(r),g=a.call(i,r));const d=u.call(i,r);return i.set(r,o),g?He(o,d)&&xt(i,"set",r,o):xt(i,"add",r,o),this},delete(r){const o=ge(this),{has:i,get:a}=js(o);let u=i.call(o,r);u||(r=ge(r),u=i.call(o,r)),a&&a.call(o,r);const g=o.delete(r);return u&&xt(o,"delete",r,void 0),g},clear(){const r=ge(this),o=r.size!==0,i=r.clear();return o&&xt(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{s[r]=ql(r,e,t)}),s}function br(e,t){const s=Kl(e,t);return(n,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?n:Reflect.get(me(s,r)&&r in n?s:n,r,o)}const Gl={get:br(!1,!1)},Wl={get:br(!1,!0)},Jl={get:br(!0,!1)};const gi=new WeakMap,hi=new WeakMap,mi=new WeakMap,Zl=new WeakMap;function Ql(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Yl(e){return e.__v_skip||!Object.isExtensible(e)?0:Ql(kl(e))}function bn(e){return Ct(e)?e:yr(e,!1,Vl,Gl,gi)}function Xl(e){return yr(e,!1,zl,Wl,hi)}function Wn(e){return yr(e,!0,Hl,Jl,mi)}function yr(e,t,s,n,r){if(!ye(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=Yl(e);if(o===0)return e;const i=r.get(e);if(i)return i;const a=new Proxy(e,o===2?n:s);return r.set(e,a),a}function Gt(e){return Ct(e)?Gt(e.__v_raw):!!(e&&e.__v_isReactive)}function Ct(e){return!!(e&&e.__v_isReadonly)}function Ze(e){return!!(e&&e.__v_isShallow)}function vr(e){return e?!!e.__v_raw:!1}function ge(e){const t=e&&e.__v_raw;return t?ge(t):e}function ea(e){return!me(e,"__v_skip")&&Object.isExtensible(e)&&Xo(e,"__v_skip",!0),e}const st=e=>ye(e)?bn(e):e,rs=e=>ye(e)?Wn(e):e;function Re(e){return e?e.__v_isRef===!0:!1}function L(e){return ta(e,!1)}function ta(e,t){return Re(e)?e:new sa(e,t)}class sa{constructor(t,s){this.dep=new hn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:ge(t),this._value=s?t:st(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||Ze(t)||Ct(t);t=n?t:ge(t),He(t,s)&&(this._rawValue=t,this._value=n?t:st(t),this.dep.trigger())}}function c(e){return Re(e)?e.value:e}const na={get:(e,t,s)=>t==="__v_raw"?e:c(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const r=e[t];return Re(r)&&!Re(s)?(r.value=s,!0):Reflect.set(e,t,s,n)}};function bi(e){return Gt(e)?e:new Proxy(e,na)}class ra{constructor(t){this.__v_isRef=!0,this._value=void 0;const s=this.dep=new hn,{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 oa(e){return new ra(e)}class ia{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new hn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ss-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&we!==this)return oi(this,!0),!0}get value(){const t=this.dep.track();return ai(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function la(e,t,s=!1){let n,r;return oe(e)?n=e:(n=e.get,r=e.set),new ia(n,r,s)}const Ns={},Ws=new WeakMap;let Vt;function aa(e,t=!1,s=Vt){if(s){let n=Ws.get(s);n||Ws.set(s,n=[]),n.push(e)}}function ua(e,t,s=he){const{immediate:n,deep:r,once:o,scheduler:i,augmentJob:a,call:u}=s,g=D=>r?D:Ze(D)||r===!1||r===0?wt(D,1):wt(D);let d,f,y,w,k=!1,_=!1;if(Re(e)?(f=()=>e.value,k=Ze(e)):Gt(e)?(f=()=>g(e),k=!0):Y(e)?(_=!0,k=e.some(D=>Gt(D)||Ze(D)),f=()=>e.map(D=>{if(Re(D))return D.value;if(Gt(D))return g(D);if(oe(D))return u?u(D,2):D()})):oe(e)?t?f=u?()=>u(e,2):e:f=()=>{if(y){St();try{y()}finally{_t()}}const D=Vt;Vt=d;try{return u?u(e,3,[w]):e(w)}finally{Vt=D}}:f=pt,t&&r){const D=f,$=r===!0?1/0:r;f=()=>wt(D(),$)}const R=Ll(),P=()=>{d.stop(),R&&R.active&&dr(R.effects,d)};if(o&&t){const D=t;t=(...$)=>{D(...$),P()}}let T=_?new Array(e.length).fill(Ns):Ns;const q=D=>{if(!(!(d.flags&1)||!d.dirty&&!D))if(t){const $=d.run();if(r||k||(_?$.some((v,C)=>He(v,T[C])):He($,T))){y&&y();const v=Vt;Vt=d;try{const C=[$,T===Ns?void 0:_&&T[0]===Ns?[]:T,w];T=$,u?u(t,3,C):t(...C)}finally{Vt=v}}}else d.run()};return a&&a(q),d=new ni(f),d.scheduler=i?()=>i(q,!1):q,w=D=>aa(D,!1,d),y=d.onStop=()=>{const D=Ws.get(d);if(D){if(u)u(D,4);else for(const $ of D)$();Ws.delete(d)}},t?n?q(!0):T=d.run():i?i(q.bind(null,!0),!0):d.run(),P.pause=d.pause.bind(d),P.resume=d.resume.bind(d),P.stop=P,P}function wt(e,t=1/0,s){if(t<=0||!ye(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Re(e))wt(e.value,t,s);else if(Y(e))for(let n=0;n<e.length;n++)wt(e[n],t,s);else if(is(e)||ts(e))e.forEach(n=>{wt(n,t,s)});else if(Qo(e)){for(const n in e)wt(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&wt(e[n],t,s)}return e}function Ds(e,t,s,n){try{return n?e(...n):e()}catch(r){yn(r,t,s)}}function nt(e,t,s,n){if(oe(e)){const r=Ds(e,t,s,n);return r&&Jo(r)&&r.catch(o=>{yn(o,t,s)}),r}if(Y(e)){const r=[];for(let o=0;o<e.length;o++)r.push(nt(e[o],t,s,n));return r}}function yn(e,t,s,n=!0){const r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||he;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){St(),Ds(o,null,10,[e,u,g]),_t();return}}ca(e,s,r,n,i)}function ca(e,t,s,n=!0,r=!1){if(r)throw e;console.error(e)}const Fe=[];let ut=-1;const ss=[];let Dt=null,Xt=0;const yi=Promise.resolve();let Js=null;function vn(e){const t=Js||yi;return e?t.then(this?e.bind(this):e):t}function da(e){let t=ut+1,s=Fe.length;for(;t<s;){const n=t+s>>>1,r=Fe[n],o=Cs(r);o<e||o===e&&r.flags&2?t=n+1:s=n}return t}function xr(e){if(!(e.flags&1)){const t=Cs(e),s=Fe[Fe.length-1];!s||!(e.flags&2)&&t>=Cs(s)?Fe.push(e):Fe.splice(da(t),0,e),e.flags|=1,vi()}}function vi(){Js||(Js=yi.then(wi))}function pa(e){Y(e)?ss.push(...e):Dt&&e.id===-1?Dt.splice(Xt+1,0,e):e.flags&1||(ss.push(e),e.flags|=1),vi()}function zr(e,t,s=ut+1){for(;s<Fe.length;s++){const n=Fe[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Fe.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function xi(e){if(ss.length){const t=[...new Set(ss)].sort((s,n)=>Cs(s)-Cs(n));if(ss.length=0,Dt){Dt.push(...t);return}for(Dt=t,Xt=0;Xt<Dt.length;Xt++){const s=Dt[Xt];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}Dt=null,Xt=0}}const Cs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function wi(e){try{for(ut=0;ut<Fe.length;ut++){const t=Fe[ut];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Ds(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;ut<Fe.length;ut++){const t=Fe[ut];t&&(t.flags&=-2)}ut=-1,Fe.length=0,xi(),Js=null,(Fe.length||ss.length)&&wi()}}let Je=null,ki=null;function Zs(e){const t=Je;return Je=e,ki=e&&e.type.__scopeId||null,t}function xn(e,t=Je,s){if(!t||e._n)return e;const n=(...r)=>{n._d&&tn(-1);const o=Zs(t);let i;try{i=e(...r)}finally{Zs(o),n._d&&tn(1)}return i};return n._n=!0,n._c=!0,n._d=!0,n}function ie(e,t){if(Je===null)return e;const s=_n(Je),n=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[o,i,a,u=he]=t[r];o&&(oe(o)&&(o={mounted:o,updated:o}),o.deep&&wt(i),n.push({dir:o,instance:s,value:i,oldValue:void 0,arg:a,modifiers:u}))}return e}function Ot(e,t,s,n){const r=e.dirs,o=t&&t.dirs;for(let i=0;i<r.length;i++){const a=r[i];o&&(a.oldValue=o[i].value);let u=a.dir[n];u&&(St(),nt(u,s,8,[e.el,a,e,t]),_t())}}function fa(e,t){if(je){let s=je.provides;const n=je.parent&&je.parent.provides;n===s&&(s=je.provides=Object.create(n)),s[e]=t}}function Hs(e,t,s=!1){const n=Cr();if(n||ns){let r=ns?ns._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&&oe(t)?t.call(n&&n.proxy):t}}const ga=Symbol.for("v-scx"),ha=()=>Hs(ga);function ma(e,t){return wr(e,null,{flush:"sync"})}function ft(e,t,s){return wr(e,t,s)}function wr(e,t,s=he){const{immediate:n,deep:r,flush:o,once:i}=s,a=Pe({},s),u=t&&n||!t&&o!=="post";let g;if(Ps){if(o==="sync"){const w=ha();g=w.__watcherHandles||(w.__watcherHandles=[])}else if(!u){const w=()=>{};return w.stop=pt,w.resume=pt,w.pause=pt,w}}const d=je;a.call=(w,k,_)=>nt(w,d,k,_);let f=!1;o==="post"?a.scheduler=w=>{De(w,d&&d.suspense)}:o!=="sync"&&(f=!0,a.scheduler=(w,k)=>{k?w():xr(w)}),a.augmentJob=w=>{t&&(w.flags|=4),f&&(w.flags|=2,d&&(w.id=d.uid,w.i=d))};const y=ua(e,t,a);return Ps&&(g?g.push(y):u&&y()),y}function ba(e,t,s){const n=this.proxy,r=Se(e)?e.includes(".")?$i(n,e):()=>n[e]:e.bind(n,n);let o;oe(t)?o=t:(o=t.handler,s=t);const i=Es(this),a=wr(r,o.bind(n),s);return i(),a}function $i(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 Si=Symbol("_vte"),_i=e=>e.__isTeleport,vs=e=>e&&(e.disabled||e.disabled===""),qr=e=>e&&(e.defer||e.defer===""),Kr=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Gr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Jn=(e,t)=>{const s=e&&e.to;return Se(s)?t?t(s):null:s},Ci={name:"Teleport",__isTeleport:!0,process(e,t,s,n,r,o,i,a,u,g){const{mc:d,pc:f,pbc:y,o:{insert:w,querySelector:k,createText:_,createComment:R}}=g,P=vs(t.props);let{shapeFlag:T,children:q,dynamicChildren:D}=t;if(e==null){const $=t.el=_(""),v=t.anchor=_("");w($,s,n),w(v,s,n);const C=(x,I)=>{T&16&&d(q,x,I,r,o,i,a,u)},F=()=>{const x=t.target=Jn(t.props,k),I=Zn(x,t,_,w);x&&(i!=="svg"&&Kr(x)?i="svg":i!=="mathml"&&Gr(x)&&(i="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(x),P||(C(x,I),zs(t,!1)))};P&&(C(s,v),zs(t,!0)),qr(t.props)?(t.el.__isMounted=!1,De(()=>{F(),delete t.el.__isMounted},o)):F()}else{if(qr(t.props)&&e.el.__isMounted===!1){De(()=>{Ci.process(e,t,s,n,r,o,i,a,u,g)},o);return}t.el=e.el,t.targetStart=e.targetStart;const $=t.anchor=e.anchor,v=t.target=e.target,C=t.targetAnchor=e.targetAnchor,F=vs(e.props),x=F?s:v,I=F?$:C;if(i==="svg"||Kr(v)?i="svg":(i==="mathml"||Gr(v))&&(i="mathml"),D?(y(e.dynamicChildren,D,x,r,o,i,a),Sr(e,t,!0)):u||f(e,t,x,I,r,o,i,a,!1),P)F?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Bs(t,s,$,g,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const z=t.target=Jn(t.props,k);z&&Bs(t,z,null,g,0)}else F&&Bs(t,v,C,g,1);zs(t,P)}},remove(e,t,s,{um:n,o:{remove:r}},o){const{shapeFlag:i,children:a,anchor:u,targetStart:g,targetAnchor:d,target:f,props:y}=e;if(f&&(r(g),r(d)),o&&r(u),i&16){const w=o||!vs(y);for(let k=0;k<a.length;k++){const _=a[k];n(_,t,s,w,!!_.dynamicChildren)}}},move:Bs,hydrate:ya};function Bs(e,t,s,{o:{insert:n},m:r},o=2){o===0&&n(e.targetAnchor,t,s);const{el:i,anchor:a,shapeFlag:u,children:g,props:d}=e,f=o===2;if(f&&n(i,t,s),(!f||vs(d))&&u&16)for(let y=0;y<g.length;y++)r(g[y],t,s,2);f&&n(a,t,s)}function ya(e,t,s,n,r,o,{o:{nextSibling:i,parentNode:a,querySelector:u,insert:g,createText:d}},f){function y(R,P){let T=P;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,R._lpa=t.targetAnchor&&i(t.targetAnchor);break}}T=i(T)}}function w(R,P){P.anchor=f(i(R),P,a(R),s,n,r,o)}const k=t.target=Jn(t.props,u),_=vs(t.props);if(k){const R=k._lpa||k.firstChild;t.shapeFlag&16&&(_?(w(e,t),y(k,R),t.targetAnchor||Zn(k,t,d,g,a(e)===k?e:null)):(t.anchor=i(e),y(k,R),t.targetAnchor||Zn(k,t,d,g),f(R&&i(R),t,k,s,n,r,o))),zs(t,_)}else _&&t.shapeFlag&16&&(w(e,t),t.targetStart=e,t.targetAnchor=i(e));return t.anchor&&i(t.anchor)}const va=Ci;function zs(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 Zn(e,t,s,n,r=null){const o=t.targetStart=s(""),i=t.targetAnchor=s("");return o[Si]=i,e&&(n(o,e,r),n(i,e,r)),i}const ct=Symbol("_leaveCb"),cs=Symbol("_enterCb");function xa(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Pt(()=>{e.isMounted=!0}),Li(()=>{e.isUnmounting=!0}),e}const We=[Function,Array],Ii={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:We,onEnter:We,onAfterEnter:We,onEnterCancelled:We,onBeforeLeave:We,onLeave:We,onAfterLeave:We,onLeaveCancelled:We,onBeforeAppear:We,onAppear:We,onAfterAppear:We,onAppearCancelled:We},Ti=e=>{const t=e.subTree;return t.component?Ti(t.component):t},wa={name:"BaseTransition",props:Ii,setup(e,{slots:t}){const s=Cr(),n=xa();return()=>{const r=t.default&&Ai(t.default(),!0);if(!r||!r.length)return;const o=Pi(r),i=ge(e),{mode:a}=i;if(n.isLeaving)return Mn(o);const u=Wr(o);if(!u)return Mn(o);let g=Qn(u,i,n,s,f=>g=f);u.type!==Me&&Is(u,g);let d=s.subTree&&Wr(s.subTree);if(d&&d.type!==Me&&!Ht(d,u)&&Ti(s).type!==Me){let f=Qn(d,i,n,s);if(Is(d,f),a==="out-in"&&u.type!==Me)return n.isLeaving=!0,f.afterLeave=()=>{n.isLeaving=!1,s.job.flags&8||s.update(),delete f.afterLeave,d=void 0},Mn(o);a==="in-out"&&u.type!==Me?f.delayLeave=(y,w,k)=>{const _=Ri(n,d);_[String(d.key)]=d,y[ct]=()=>{w(),y[ct]=void 0,delete g.delayedLeave,d=void 0},g.delayedLeave=()=>{k(),delete g.delayedLeave,d=void 0}}:d=void 0}else d&&(d=void 0);return o}}};function Pi(e){let t=e[0];if(e.length>1){for(const s of e)if(s.type!==Me){t=s;break}}return t}const ka=wa;function Ri(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 Qn(e,t,s,n,r){const{appear:o,mode:i,persisted:a=!1,onBeforeEnter:u,onEnter:g,onAfterEnter:d,onEnterCancelled:f,onBeforeLeave:y,onLeave:w,onAfterLeave:k,onLeaveCancelled:_,onBeforeAppear:R,onAppear:P,onAfterAppear:T,onAppearCancelled:q}=t,D=String(e.key),$=Ri(s,e),v=(x,I)=>{x&&nt(x,n,9,I)},C=(x,I)=>{const z=I[1];v(x,I),Y(x)?x.every(K=>K.length<=1)&&z():x.length<=1&&z()},F={mode:i,persisted:a,beforeEnter(x){let I=u;if(!s.isMounted)if(o)I=R||u;else return;x[ct]&&x[ct](!0);const z=$[D];z&&Ht(e,z)&&z.el[ct]&&z.el[ct](),v(I,[x])},enter(x){if($[D]===e)return;let I=g,z=d,K=f;if(!s.isMounted)if(o)I=P||g,z=T||d,K=q||f;else return;let O=!1;x[cs]=E=>{O||(O=!0,E?v(K,[x]):v(z,[x]),F.delayedLeave&&F.delayedLeave(),x[cs]=void 0)};const M=x[cs].bind(null,!1);I?C(I,[x,M]):M()},leave(x,I){const z=String(e.key);if(x[cs]&&x[cs](!0),s.isUnmounting)return I();v(y,[x]);let K=!1;x[ct]=M=>{K||(K=!0,I(),M?v(_,[x]):v(k,[x]),x[ct]=void 0,$[z]===e&&delete $[z])};const O=x[ct].bind(null,!1);$[z]=e,w?C(w,[x,O]):O()},clone(x){const I=Qn(x,t,s,n,r);return r&&r(I),I}};return F}function Mn(e){if(wn(e))return e=Lt(e),e.children=null,e}function Wr(e){if(!wn(e))return _i(e.type)&&e.children?Pi(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&&oe(s.default))return s.default()}}function Is(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Is(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ai(e,t=!1,s){let n=[],r=0;for(let o=0;o<e.length;o++){let i=e[o];const a=s==null?i.key:String(s)+String(i.key!=null?i.key:o);i.type===re?(i.patchFlag&128&&r++,n=n.concat(Ai(i.children,t,a))):(t||i.type!==Me)&&n.push(a!=null?Lt(i,{key:a}):i)}if(r>1)for(let o=0;o<n.length;o++)n[o].patchFlag=-2;return n}function Ae(e,t){return oe(e)?Pe({name:e.name},t,{setup:e}):e}function Di(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Jr(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const Qs=new WeakMap;function xs(e,t,s,n,r=!1){if(Y(e)){e.forEach((_,R)=>xs(_,t&&(Y(t)?t[R]:t),s,n,r));return}if(ws(n)&&!r){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&xs(e,t,s,n.component.subTree);return}const o=n.shapeFlag&4?_n(n.component):n.el,i=r?null:o,{i:a,r:u}=e,g=t&&t.r,d=a.refs===he?a.refs={}:a.refs,f=a.setupState,y=ge(f),w=f===he?Wo:_=>Jr(d,_)?!1:me(y,_),k=(_,R)=>!(R&&Jr(d,R));if(g!=null&&g!==u){if(Zr(t),Se(g))d[g]=null,w(g)&&(f[g]=null);else if(Re(g)){const _=t;k(g,_.k)&&(g.value=null),_.k&&(d[_.k]=null)}}if(oe(u))Ds(u,a,12,[i,d]);else{const _=Se(u),R=Re(u);if(_||R){const P=()=>{if(e.f){const T=_?w(u)?f[u]:d[u]:k()||!e.k?u.value:d[e.k];if(r)Y(T)&&dr(T,o);else if(Y(T))T.includes(o)||T.push(o);else if(_)d[u]=[o],w(u)&&(f[u]=d[u]);else{const q=[o];k(u,e.k)&&(u.value=q),e.k&&(d[e.k]=q)}}else _?(d[u]=i,w(u)&&(f[u]=i)):R&&(k(u,e.k)&&(u.value=i),e.k&&(d[e.k]=i))};if(i){const T=()=>{P(),Qs.delete(e)};T.id=-1,Qs.set(e,T),De(T,s)}else Zr(e),P()}}}function Zr(e){const t=Qs.get(e);t&&(t.flags|=8,Qs.delete(e))}fn().requestIdleCallback;fn().cancelIdleCallback;const ws=e=>!!e.type.__asyncLoader,wn=e=>e.type.__isKeepAlive;function $a(e,t){Ei(e,"a",t)}function Sa(e,t){Ei(e,"da",t)}function Ei(e,t,s=je){const n=e.__wdc||(e.__wdc=()=>{let r=s;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(kn(t,n,s),s){let r=s.parent;for(;r&&r.parent;)wn(r.parent.vnode)&&_a(n,t,s,r),r=r.parent}}function _a(e,t,s,n){const r=kn(t,e,n,!0);Mt(()=>{dr(n[t],r)},s)}function kn(e,t,s=je,n=!1){if(s){const r=s[e]||(s[e]=[]),o=t.__weh||(t.__weh=(...i)=>{St();const a=Es(s),u=nt(t,s,e,i);return a(),_t(),u});return n?r.unshift(o):r.push(o),o}}const Tt=e=>(t,s=je)=>{(!Ps||e==="sp")&&kn(e,(...n)=>t(...n),s)},Ca=Tt("bm"),Pt=Tt("m"),Ia=Tt("bu"),Ta=Tt("u"),Li=Tt("bum"),Mt=Tt("um"),Pa=Tt("sp"),Ra=Tt("rtg"),Aa=Tt("rtc");function Da(e,t=je){kn("ec",e,t)}const Ea=Symbol.for("v-ndc");function Te(e,t,s,n){let r;const o=s,i=Y(e);if(i||Se(e)){const a=i&&Gt(e);let u=!1,g=!1;a&&(u=!Ze(e),g=Ct(e),e=mn(e)),r=new Array(e.length);for(let d=0,f=e.length;d<f;d++)r[d]=t(u?g?rs(st(e[d])):st(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(ye(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 Yn=e=>e?el(e)?_n(e):Yn(e.parent):null,ks=Pe(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=>Yn(e.parent),$root:e=>Yn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Mi(e),$forceUpdate:e=>e.f||(e.f=()=>{xr(e.update)}),$nextTick:e=>e.n||(e.n=vn.bind(e.proxy)),$watch:e=>ba.bind(e)}),jn=(e,t)=>e!==he&&!e.__isScriptSetup&&me(e,t),La={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:r,props:o,accessCache:i,type:a,appContext:u}=e;if(t[0]!=="$"){const y=i[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(jn(n,t))return i[t]=1,n[t];if(r!==he&&me(r,t))return i[t]=2,r[t];if(me(o,t))return i[t]=3,o[t];if(s!==he&&me(s,t))return i[t]=4,s[t];Xn&&(i[t]=0)}}const g=ks[t];let d,f;if(g)return t==="$attrs"&&Ee(e.attrs,"get",""),g(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(s!==he&&me(s,t))return i[t]=4,s[t];if(f=u.config.globalProperties,me(f,t))return f[t]},set({_:e},t,s){const{data:n,setupState:r,ctx:o}=e;return jn(r,t)?(r[t]=s,!0):n!==he&&me(n,t)?(n[t]=s,!0):me(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:i}},a){let u;return!!(s[a]||e!==he&&a[0]!=="$"&&me(e,a)||jn(t,a)||me(o,a)||me(n,a)||me(ks,a)||me(r.config.globalProperties,a)||(u=i.__cssModules)&&u[a])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:me(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Ys(e){return Y(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}function Xs(e,t){return!e||!t?e||t:Y(e)&&Y(t)?e.concat(t):Pe({},Ys(e),Ys(t))}let Xn=!0;function Fa(e){const t=Mi(e),s=e.proxy,n=e.ctx;Xn=!1,t.beforeCreate&&Qr(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:a,provide:u,inject:g,created:d,beforeMount:f,mounted:y,beforeUpdate:w,updated:k,activated:_,deactivated:R,beforeDestroy:P,beforeUnmount:T,destroyed:q,unmounted:D,render:$,renderTracked:v,renderTriggered:C,errorCaptured:F,serverPrefetch:x,expose:I,inheritAttrs:z,components:K,directives:O,filters:M}=t;if(g&&Ma(g,n,null),i)for(const ue in i){const ne=i[ue];oe(ne)&&(n[ue]=ne.bind(s))}if(r){const ue=r.call(s,s);ye(ue)&&(e.data=bn(ue))}if(Xn=!0,o)for(const ue in o){const ne=o[ue],ze=oe(ne)?ne.bind(s,s):oe(ne.get)?ne.get.bind(s,s):pt,Ce=!oe(ne)&&oe(ne.set)?ne.set.bind(s):pt,ht=$e({get:ze,set:Ce});Object.defineProperty(n,ue,{enumerable:!0,configurable:!0,get:()=>ht.value,set:Ge=>ht.value=Ge})}if(a)for(const ue in a)Fi(a[ue],n,s,ue);if(u){const ue=oe(u)?u.call(s):u;Reflect.ownKeys(ue).forEach(ne=>{fa(ne,ue[ne])})}d&&Qr(d,e,"c");function ae(ue,ne){Y(ne)?ne.forEach(ze=>ue(ze.bind(s))):ne&&ue(ne.bind(s))}if(ae(Ca,f),ae(Pt,y),ae(Ia,w),ae(Ta,k),ae($a,_),ae(Sa,R),ae(Da,F),ae(Aa,v),ae(Ra,C),ae(Li,T),ae(Mt,D),ae(Pa,x),Y(I))if(I.length){const ue=e.exposed||(e.exposed={});I.forEach(ne=>{Object.defineProperty(ue,ne,{get:()=>s[ne],set:ze=>s[ne]=ze,enumerable:!0})})}else e.exposed||(e.exposed={});$&&e.render===pt&&(e.render=$),z!=null&&(e.inheritAttrs=z),K&&(e.components=K),O&&(e.directives=O),x&&Di(e)}function Ma(e,t,s=pt){Y(e)&&(e=er(e));for(const n in e){const r=e[n];let o;ye(r)?"default"in r?o=Hs(r.from||n,r.default,!0):o=Hs(r.from||n):o=Hs(r),Re(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[n]=o}}function Qr(e,t,s){nt(Y(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Fi(e,t,s,n){let r=n.includes(".")?$i(s,n):()=>s[n];if(Se(e)){const o=t[e];oe(o)&&ft(r,o)}else if(oe(e))ft(r,e.bind(s));else if(ye(e))if(Y(e))e.forEach(o=>Fi(o,t,s,n));else{const o=oe(e.handler)?e.handler.bind(s):t[e.handler];oe(o)&&ft(r,o,e)}}function Mi(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,a=o.get(t);let u;return a?u=a:!r.length&&!s&&!n?u=t:(u={},r.length&&r.forEach(g=>en(u,g,i,!0)),en(u,t,i)),ye(t)&&o.set(t,u),u}function en(e,t,s,n=!1){const{mixins:r,extends:o}=t;o&&en(e,o,s,!0),r&&r.forEach(i=>en(e,i,s,!0));for(const i in t)if(!(n&&i==="expose")){const a=ja[i]||s&&s[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const ja={data:Yr,props:Xr,emits:Xr,methods:gs,computed:gs,beforeCreate:Le,created:Le,beforeMount:Le,mounted:Le,beforeUpdate:Le,updated:Le,beforeDestroy:Le,beforeUnmount:Le,destroyed:Le,unmounted:Le,activated:Le,deactivated:Le,errorCaptured:Le,serverPrefetch:Le,components:gs,directives:gs,watch:Na,provide:Yr,inject:Oa};function Yr(e,t){return t?e?function(){return Pe(oe(e)?e.call(this,this):e,oe(t)?t.call(this,this):t)}:t:e}function Oa(e,t){return gs(er(e),er(t))}function er(e){if(Y(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Le(e,t){return e?[...new Set([].concat(e,t))]:t}function gs(e,t){return e?Pe(Object.create(null),e,t):t}function Xr(e,t){return e?Y(e)&&Y(t)?[...new Set([...e,...t])]:Pe(Object.create(null),Ys(e),Ys(t??{})):t}function Na(e,t){if(!e)return t;if(!t)return e;const s=Pe(Object.create(null),e);for(const n in t)s[n]=Le(e[n],t[n]);return s}function ji(){return{app:null,config:{isNativeTag:Wo,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 Ba=0;function Ua(e,t){return function(n,r=null){oe(n)||(n=Pe({},n)),r!=null&&!ye(r)&&(r=null);const o=ji(),i=new WeakSet,a=[];let u=!1;const g=o.app={_uid:Ba++,_component:n,_props:r,_container:null,_context:o,_instance:null,version:vu,get config(){return o.config},set config(d){},use(d,...f){return i.has(d)||(d&&oe(d.install)?(i.add(d),d.install(g,...f)):oe(d)&&(i.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 w=g._ceVNode||ke(n,r);return w.appContext=o,y===!0?y="svg":y===!1&&(y=void 0),e(w,d,y),u=!0,g._container=d,d.__vue_app__=g,_n(w.component)}},onUnmount(d){a.push(d)},unmount(){u&&(nt(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=ns;ns=g;try{return d()}finally{ns=f}}};return g}}let ns=null;function tr(e,t,s=he){const n=Cr(),r=$t(t),o=It(t),i=Oi(e,r),a=oa((u,g)=>{let d,f=he,y;return ma(()=>{const w=e[r];He(d,w)&&(d=w,g())}),{get(){return u(),s.get?s.get(d):d},set(w){const k=s.set?s.set(w):w;if(!He(k,d)&&!(f!==he&&He(w,f)))return;const _=n.vnode.props;_&&(t in _||r in _||o in _)&&(`onUpdate:${t}`in _||`onUpdate:${r}`in _||`onUpdate:${o}`in _)||(d=w,g()),n.emit(`update:${t}`,k),He(w,k)&&He(w,f)&&!He(k,y)&&g(),f=w,y=k}}});return a[Symbol.iterator]=()=>{let u=0;return{next(){return u<2?{value:u++?i||he:a,done:!1}:{done:!0}}}},a}const Oi=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${$t(t)}Modifiers`]||e[`${It(t)}Modifiers`];function Va(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||he;let r=s;const o=t.startsWith("update:"),i=o&&Oi(n,t.slice(7));i&&(i.trim&&(r=s.map(d=>Se(d)?d.trim():d)),i.number&&(r=s.map(pn)));let a,u=n[a=An(t)]||n[a=An($t(t))];!u&&o&&(u=n[a=An(It(t))]),u&&nt(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,nt(g,e,6,r)}}const Ha=new WeakMap;function Ni(e,t,s=!1){const n=s?Ha:t.emitsCache,r=n.get(e);if(r!==void 0)return r;const o=e.emits;let i={},a=!1;if(!oe(e)){const u=g=>{const d=Ni(g,t,!0);d&&(a=!0,Pe(i,d))};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!o&&!a?(ye(e)&&n.set(e,null),null):(Y(o)?o.forEach(u=>i[u]=null):Pe(i,o),ye(e)&&n.set(e,i),i)}function $n(e,t){return!e||!cn(t)?!1:(t=t.slice(2).replace(/Once$/,""),me(e,t[0].toLowerCase()+t.slice(1))||me(e,It(t))||me(e,t))}function eo(e){const{type:t,vnode:s,proxy:n,withProxy:r,propsOptions:[o],slots:i,attrs:a,emit:u,render:g,renderCache:d,props:f,data:y,setupState:w,ctx:k,inheritAttrs:_}=e,R=Zs(e);let P,T;try{if(s.shapeFlag&4){const D=r||n,$=D;P=dt(g.call($,D,d,f,w,y,k)),T=a}else{const D=t;P=dt(D.length>1?D(f,{attrs:a,slots:i,emit:u}):D(f,null)),T=t.props?a:za(a)}}catch(D){$s.length=0,yn(D,e,1),P=ke(Me)}let q=P;if(T&&_!==!1){const D=Object.keys(T),{shapeFlag:$}=q;D.length&&$&7&&(o&&D.some(cr)&&(T=qa(T,o)),q=Lt(q,T,!1,!0))}return s.dirs&&(q=Lt(q,null,!1,!0),q.dirs=q.dirs?q.dirs.concat(s.dirs):s.dirs),s.transition&&Is(q,s.transition),P=q,Zs(R),P}const za=e=>{let t;for(const s in e)(s==="class"||s==="style"||cn(s))&&((t||(t={}))[s]=e[s]);return t},qa=(e,t)=>{const s={};for(const n in e)(!cr(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Ka(e,t,s){const{props:n,children:r,component:o}=e,{props:i,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?to(n,i,g):!!i;if(u&8){const d=t.dynamicProps;for(let f=0;f<d.length;f++){const y=d[f];if(Bi(i,n,y)&&!$n(g,y))return!0}}}else return(r||a)&&(!a||!a.$stable)?!0:n===i?!1:n?i?to(n,i,g):!0:!!i;return!1}function to(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(Bi(t,e,o)&&!$n(s,o))return!0}return!1}function Bi(e,t,s){const n=e[s],r=t[s];return s==="style"&&ye(n)&&ye(r)?!Et(n,r):n!==r}function Ga({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 Ui={},Vi=()=>Object.create(Ui),Hi=e=>Object.getPrototypeOf(e)===Ui;function Wa(e,t,s,n=!1){const r={},o=Vi();e.propsDefaults=Object.create(null),zi(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);s?e.props=n?r:Xl(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Ja(e,t,s,n){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,a=ge(r),[u]=e.propsOptions;let g=!1;if((n||i>0)&&!(i&16)){if(i&8){const d=e.vnode.dynamicProps;for(let f=0;f<d.length;f++){let y=d[f];if($n(e.emitsOptions,y))continue;const w=t[y];if(u)if(me(o,y))w!==o[y]&&(o[y]=w,g=!0);else{const k=$t(y);r[k]=sr(u,a,k,w,e,!1)}else w!==o[y]&&(o[y]=w,g=!0)}}}else{zi(e,t,r,o)&&(g=!0);let d;for(const f in a)(!t||!me(t,f)&&((d=It(f))===f||!me(t,d)))&&(u?s&&(s[f]!==void 0||s[d]!==void 0)&&(r[f]=sr(u,a,f,void 0,e,!0)):delete r[f]);if(o!==a)for(const f in o)(!t||!me(t,f))&&(delete o[f],g=!0)}g&&xt(e.attrs,"set","")}function zi(e,t,s,n){const[r,o]=e.propsOptions;let i=!1,a;if(t)for(let u in t){if(ms(u))continue;const g=t[u];let d;r&&me(r,d=$t(u))?!o||!o.includes(d)?s[d]=g:(a||(a={}))[d]=g:$n(e.emitsOptions,u)||(!(u in n)||g!==n[u])&&(n[u]=g,i=!0)}if(o){const u=ge(s),g=a||he;for(let d=0;d<o.length;d++){const f=o[d];s[f]=sr(r,u,f,g[f],e,!me(g,f))}}return i}function sr(e,t,s,n,r,o){const i=e[s];if(i!=null){const a=me(i,"default");if(a&&n===void 0){const u=i.default;if(i.type!==Function&&!i.skipFactory&&oe(u)){const{propsDefaults:g}=r;if(s in g)n=g[s];else{const d=Es(r);n=g[s]=u.call(null,t),d()}}else n=u;r.ce&&r.ce._setProp(s,n)}i[0]&&(o&&!a?n=!1:i[1]&&(n===""||n===It(s))&&(n=!0))}return n}const Za=new WeakMap;function qi(e,t,s=!1){const n=s?Za:t.propsCache,r=n.get(e);if(r)return r;const o=e.props,i={},a=[];let u=!1;if(!oe(e)){const d=f=>{u=!0;const[y,w]=qi(f,t,!0);Pe(i,y),w&&a.push(...w)};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!o&&!u)return ye(e)&&n.set(e,es),es;if(Y(o))for(let d=0;d<o.length;d++){const f=$t(o[d]);so(f)&&(i[f]=he)}else if(o)for(const d in o){const f=$t(d);if(so(f)){const y=o[d],w=i[f]=Y(y)||oe(y)?{type:y}:Pe({},y),k=w.type;let _=!1,R=!0;if(Y(k))for(let P=0;P<k.length;++P){const T=k[P],q=oe(T)&&T.name;if(q==="Boolean"){_=!0;break}else q==="String"&&(R=!1)}else _=oe(k)&&k.name==="Boolean";w[0]=_,w[1]=R,(_||me(w,"default"))&&a.push(f)}}const g=[i,a];return ye(e)&&n.set(e,g),g}function so(e){return e[0]!=="$"&&!ms(e)}const kr=e=>e==="_"||e==="_ctx"||e==="$stable",$r=e=>Y(e)?e.map(dt):[dt(e)],Qa=(e,t,s)=>{if(t._n)return t;const n=xn((...r)=>$r(t(...r)),s);return n._c=!1,n},Ki=(e,t,s)=>{const n=e._ctx;for(const r in e){if(kr(r))continue;const o=e[r];if(oe(o))t[r]=Qa(r,o,n);else if(o!=null){const i=$r(o);t[r]=()=>i}}},Gi=(e,t)=>{const s=$r(t);e.slots.default=()=>s},Wi=(e,t,s)=>{for(const n in t)(s||!kr(n))&&(e[n]=t[n])},Ya=(e,t,s)=>{const n=e.slots=Vi();if(e.vnode.shapeFlag&32){const r=t._;r?(Wi(n,t,s),s&&Xo(n,"_",r,!0)):Ki(t,n)}else t&&Gi(e,t)},Xa=(e,t,s)=>{const{vnode:n,slots:r}=e;let o=!0,i=he;if(n.shapeFlag&32){const a=t._;a?s&&a===1?o=!1:Wi(r,t,s):(o=!t.$stable,Ki(t,r)),i=t}else t&&(Gi(e,t),i={default:1});if(o)for(const a in r)!kr(a)&&i[a]==null&&delete r[a]},De=ru;function eu(e){return tu(e)}function tu(e,t){const s=fn();s.__VUE__=!0;const{insert:n,remove:r,patchProp:o,createElement:i,createText:a,createComment:u,setText:g,setElementText:d,parentNode:f,nextSibling:y,setScopeId:w=pt,insertStaticContent:k}=e,_=(m,S,A,H=null,B=null,U=null,J=void 0,W=null,G=!!S.dynamicChildren)=>{if(m===S)return;m&&!Ht(m,S)&&(H=Qt(m),Ge(m,B,U,!0),m=null),S.patchFlag===-2&&(G=!1,S.dynamicChildren=null);const{type:V,ref:ee,shapeFlag:Z}=S;switch(V){case Sn:R(m,S,A,H);break;case Me:P(m,S,A,H);break;case qs:m==null&&T(S,A,H,J);break;case re:K(m,S,A,H,B,U,J,W,G);break;default:Z&1?$(m,S,A,H,B,U,J,W,G):Z&6?O(m,S,A,H,B,U,J,W,G):(Z&64||Z&128)&&V.process(m,S,A,H,B,U,J,W,G,j)}ee!=null&&B?xs(ee,m&&m.ref,U,S||m,!S):ee==null&&m&&m.ref!=null&&xs(m.ref,null,U,m,!0)},R=(m,S,A,H)=>{if(m==null)n(S.el=a(S.children),A,H);else{const B=S.el=m.el;S.children!==m.children&&g(B,S.children)}},P=(m,S,A,H)=>{m==null?n(S.el=u(S.children||""),A,H):S.el=m.el},T=(m,S,A,H)=>{[m.el,m.anchor]=k(m.children,S,A,H,m.el,m.anchor)},q=({el:m,anchor:S},A,H)=>{let B;for(;m&&m!==S;)B=y(m),n(m,A,H),m=B;n(S,A,H)},D=({el:m,anchor:S})=>{let A;for(;m&&m!==S;)A=y(m),r(m),m=A;r(S)},$=(m,S,A,H,B,U,J,W,G)=>{if(S.type==="svg"?J="svg":S.type==="math"&&(J="mathml"),m==null)v(S,A,H,B,U,J,W,G);else{const V=m.el&&m.el._isVueCE?m.el:null;try{V&&V._beginPatch(),x(m,S,B,U,J,W,G)}finally{V&&V._endPatch()}}},v=(m,S,A,H,B,U,J,W)=>{let G,V;const{props:ee,shapeFlag:Z,transition:X,dirs:se}=m;if(G=m.el=i(m.type,U,ee&&ee.is,ee),Z&8?d(G,m.children):Z&16&&F(m.children,G,null,H,B,On(m,U),J,W),se&&Ot(m,null,H,"created"),C(G,m,m.scopeId,J,H),ee){for(const xe in ee)xe!=="value"&&!ms(xe)&&o(G,xe,null,ee[xe],U,H);"value"in ee&&o(G,"value",null,ee.value,U),(V=ee.onVnodeBeforeMount)&&lt(V,H,m)}se&&Ot(m,null,H,"beforeMount");const ce=su(B,X);ce&&X.beforeEnter(G),n(G,S,A),((V=ee&&ee.onVnodeMounted)||ce||se)&&De(()=>{V&&lt(V,H,m),ce&&X.enter(G),se&&Ot(m,null,H,"mounted")},B)},C=(m,S,A,H,B)=>{if(A&&w(m,A),H)for(let U=0;U<H.length;U++)w(m,H[U]);if(B){let U=B.subTree;if(S===U||Qi(U.type)&&(U.ssContent===S||U.ssFallback===S)){const J=B.vnode;C(m,J,J.scopeId,J.slotScopeIds,B.parent)}}},F=(m,S,A,H,B,U,J,W,G=0)=>{for(let V=G;V<m.length;V++){const ee=m[V]=W?vt(m[V]):dt(m[V]);_(null,ee,S,A,H,B,U,J,W)}},x=(m,S,A,H,B,U,J)=>{const W=S.el=m.el;let{patchFlag:G,dynamicChildren:V,dirs:ee}=S;G|=m.patchFlag&16;const Z=m.props||he,X=S.props||he;let se;if(A&&Nt(A,!1),(se=X.onVnodeBeforeUpdate)&&lt(se,A,S,m),ee&&Ot(S,m,A,"beforeUpdate"),A&&Nt(A,!0),(Z.innerHTML&&X.innerHTML==null||Z.textContent&&X.textContent==null)&&d(W,""),V?I(m.dynamicChildren,V,W,A,H,On(S,B),U):J||ne(m,S,W,null,A,H,On(S,B),U,!1),G>0){if(G&16)z(W,Z,X,A,B);else if(G&2&&Z.class!==X.class&&o(W,"class",null,X.class,B),G&4&&o(W,"style",Z.style,X.style,B),G&8){const ce=S.dynamicProps;for(let xe=0;xe<ce.length;xe++){const ve=ce[xe],Be=Z[ve],Ue=X[ve];(Ue!==Be||ve==="value")&&o(W,ve,Be,Ue,B,A)}}G&1&&m.children!==S.children&&d(W,S.children)}else!J&&V==null&&z(W,Z,X,A,B);((se=X.onVnodeUpdated)||ee)&&De(()=>{se&&lt(se,A,S,m),ee&&Ot(S,m,A,"updated")},H)},I=(m,S,A,H,B,U,J)=>{for(let W=0;W<S.length;W++){const G=m[W],V=S[W],ee=G.el&&(G.type===re||!Ht(G,V)||G.shapeFlag&198)?f(G.el):A;_(G,V,ee,null,H,B,U,J,!0)}},z=(m,S,A,H,B)=>{if(S!==A){if(S!==he)for(const U in S)!ms(U)&&!(U in A)&&o(m,U,S[U],null,B,H);for(const U in A){if(ms(U))continue;const J=A[U],W=S[U];J!==W&&U!=="value"&&o(m,U,W,J,B,H)}"value"in A&&o(m,"value",S.value,A.value,B)}},K=(m,S,A,H,B,U,J,W,G)=>{const V=S.el=m?m.el:a(""),ee=S.anchor=m?m.anchor:a("");let{patchFlag:Z,dynamicChildren:X,slotScopeIds:se}=S;se&&(W=W?W.concat(se):se),m==null?(n(V,A,H),n(ee,A,H),F(S.children||[],A,ee,B,U,J,W,G)):Z>0&&Z&64&&X&&m.dynamicChildren&&m.dynamicChildren.length===X.length?(I(m.dynamicChildren,X,A,B,U,J,W),(S.key!=null||B&&S===B.subTree)&&Sr(m,S,!0)):ne(m,S,A,ee,B,U,J,W,G)},O=(m,S,A,H,B,U,J,W,G)=>{S.slotScopeIds=W,m==null?S.shapeFlag&512?B.ctx.activate(S,A,H,J,G):M(S,A,H,B,U,J,G):E(m,S,G)},M=(m,S,A,H,B,U,J)=>{const W=m.component=pu(m,H,B);if(wn(m)&&(W.ctx.renderer=j),fu(W,!1,J),W.asyncDep){if(B&&B.registerDep(W,ae,J),!m.el){const G=W.subTree=ke(Me);P(null,G,S,A),m.placeholder=G.el}}else ae(W,m,S,A,B,U,J)},E=(m,S,A)=>{const H=S.component=m.component;if(Ka(m,S,A))if(H.asyncDep&&!H.asyncResolved){ue(H,S,A);return}else H.next=S,H.update();else S.el=m.el,H.vnode=S},ae=(m,S,A,H,B,U,J)=>{const W=()=>{if(m.isMounted){let{next:Z,bu:X,u:se,parent:ce,vnode:xe}=m;{const ot=Ji(m);if(ot){Z&&(Z.el=xe.el,ue(m,Z,J)),ot.asyncDep.then(()=>{De(()=>{m.isUnmounted||V()},B)});return}}let ve=Z,Be;Nt(m,!1),Z?(Z.el=xe.el,ue(m,Z,J)):Z=xe,X&&Vs(X),(Be=Z.props&&Z.props.onVnodeBeforeUpdate)&&lt(Be,ce,Z,xe),Nt(m,!0);const Ue=eo(m),rt=m.subTree;m.subTree=Ue,_(rt,Ue,f(rt.el),Qt(rt),m,B,U),Z.el=Ue.el,ve===null&&Ga(m,Ue.el),se&&De(se,B),(Be=Z.props&&Z.props.onVnodeUpdated)&&De(()=>lt(Be,ce,Z,xe),B)}else{let Z;const{el:X,props:se}=S,{bm:ce,m:xe,parent:ve,root:Be,type:Ue}=m,rt=ws(S);Nt(m,!1),ce&&Vs(ce),!rt&&(Z=se&&se.onVnodeBeforeMount)&&lt(Z,ve,S),Nt(m,!0);{Be.ce&&Be.ce._hasShadowRoot()&&Be.ce._injectChildStyle(Ue);const ot=m.subTree=eo(m);_(null,ot,A,H,m,B,U),S.el=ot.el}if(xe&&De(xe,B),!rt&&(Z=se&&se.onVnodeMounted)){const ot=S;De(()=>lt(Z,ve,ot),B)}(S.shapeFlag&256||ve&&ws(ve.vnode)&&ve.vnode.shapeFlag&256)&&m.a&&De(m.a,B),m.isMounted=!0,S=A=H=null}};m.scope.on();const G=m.effect=new ni(W);m.scope.off();const V=m.update=G.run.bind(G),ee=m.job=G.runIfDirty.bind(G);ee.i=m,ee.id=m.uid,G.scheduler=()=>xr(ee),Nt(m,!0),V()},ue=(m,S,A)=>{S.component=m;const H=m.vnode.props;m.vnode=S,m.next=null,Ja(m,S.props,H,A),Xa(m,S.children,A),St(),zr(m),_t()},ne=(m,S,A,H,B,U,J,W,G=!1)=>{const V=m&&m.children,ee=m?m.shapeFlag:0,Z=S.children,{patchFlag:X,shapeFlag:se}=S;if(X>0){if(X&128){Ce(V,Z,A,H,B,U,J,W,G);return}else if(X&256){ze(V,Z,A,H,B,U,J,W,G);return}}se&8?(ee&16&&jt(V,B,U),Z!==V&&d(A,Z)):ee&16?se&16?Ce(V,Z,A,H,B,U,J,W,G):jt(V,B,U,!0):(ee&8&&d(A,""),se&16&&F(Z,A,H,B,U,J,W,G))},ze=(m,S,A,H,B,U,J,W,G)=>{m=m||es,S=S||es;const V=m.length,ee=S.length,Z=Math.min(V,ee);let X;for(X=0;X<Z;X++){const se=S[X]=G?vt(S[X]):dt(S[X]);_(m[X],se,A,null,B,U,J,W,G)}V>ee?jt(m,B,U,!0,!1,Z):F(S,A,H,B,U,J,W,G,Z)},Ce=(m,S,A,H,B,U,J,W,G)=>{let V=0;const ee=S.length;let Z=m.length-1,X=ee-1;for(;V<=Z&&V<=X;){const se=m[V],ce=S[V]=G?vt(S[V]):dt(S[V]);if(Ht(se,ce))_(se,ce,A,null,B,U,J,W,G);else break;V++}for(;V<=Z&&V<=X;){const se=m[Z],ce=S[X]=G?vt(S[X]):dt(S[X]);if(Ht(se,ce))_(se,ce,A,null,B,U,J,W,G);else break;Z--,X--}if(V>Z){if(V<=X){const se=X+1,ce=se<ee?S[se].el:H;for(;V<=X;)_(null,S[V]=G?vt(S[V]):dt(S[V]),A,ce,B,U,J,W,G),V++}}else if(V>X)for(;V<=Z;)Ge(m[V],B,U,!0),V++;else{const se=V,ce=V,xe=new Map;for(V=ce;V<=X;V++){const qe=S[V]=G?vt(S[V]):dt(S[V]);qe.key!=null&&xe.set(qe.key,V)}let ve,Be=0;const Ue=X-ce+1;let rt=!1,ot=0;const as=new Array(Ue);for(V=0;V<Ue;V++)as[V]=0;for(V=se;V<=Z;V++){const qe=m[V];if(Be>=Ue){Ge(qe,B,U,!0);continue}let it;if(qe.key!=null)it=xe.get(qe.key);else for(ve=ce;ve<=X;ve++)if(as[ve-ce]===0&&Ht(qe,S[ve])){it=ve;break}it===void 0?Ge(qe,B,U,!0):(as[it-ce]=V+1,it>=ot?ot=it:rt=!0,_(qe,S[it],A,null,B,U,J,W,G),Be++)}const jr=rt?nu(as):es;for(ve=jr.length-1,V=Ue-1;V>=0;V--){const qe=ce+V,it=S[qe],Or=S[qe+1],Nr=qe+1<ee?Or.el||Zi(Or):H;as[V]===0?_(null,it,A,Nr,B,U,J,W,G):rt&&(ve<0||V!==jr[ve]?ht(it,A,Nr,2):ve--)}}},ht=(m,S,A,H,B=null)=>{const{el:U,type:J,transition:W,children:G,shapeFlag:V}=m;if(V&6){ht(m.component.subTree,S,A,H);return}if(V&128){m.suspense.move(S,A,H);return}if(V&64){J.move(m,S,A,j);return}if(J===re){n(U,S,A);for(let Z=0;Z<G.length;Z++)ht(G[Z],S,A,H);n(m.anchor,S,A);return}if(J===qs){q(m,S,A);return}if(H!==2&&V&1&&W)if(H===0)W.beforeEnter(U),n(U,S,A),De(()=>W.enter(U),B);else{const{leave:Z,delayLeave:X,afterLeave:se}=W,ce=()=>{m.ctx.isUnmounted?r(U):n(U,S,A)},xe=()=>{U._isLeaving&&U[ct](!0),Z(U,()=>{ce(),se&&se()})};X?X(U,ce,xe):xe()}else n(U,S,A)},Ge=(m,S,A,H=!1,B=!1)=>{const{type:U,props:J,ref:W,children:G,dynamicChildren:V,shapeFlag:ee,patchFlag:Z,dirs:X,cacheIndex:se}=m;if(Z===-2&&(B=!1),W!=null&&(St(),xs(W,null,A,m,!0),_t()),se!=null&&(S.renderCache[se]=void 0),ee&256){S.ctx.deactivate(m);return}const ce=ee&1&&X,xe=!ws(m);let ve;if(xe&&(ve=J&&J.onVnodeBeforeUnmount)&&lt(ve,S,m),ee&6)Rn(m.component,A,H);else{if(ee&128){m.suspense.unmount(A,H);return}ce&&Ot(m,null,S,"beforeUnmount"),ee&64?m.type.remove(m,S,A,j,H):V&&!V.hasOnce&&(U!==re||Z>0&&Z&64)?jt(V,S,A,!1,!0):(U===re&&Z&384||!B&&ee&16)&&jt(G,S,A),H&&Ms(m)}(xe&&(ve=J&&J.onVnodeUnmounted)||ce)&&De(()=>{ve&&lt(ve,S,m),ce&&Ot(m,null,S,"unmounted")},A)},Ms=m=>{const{type:S,el:A,anchor:H,transition:B}=m;if(S===re){Pn(A,H);return}if(S===qs){D(m);return}const U=()=>{r(A),B&&!B.persisted&&B.afterLeave&&B.afterLeave()};if(m.shapeFlag&1&&B&&!B.persisted){const{leave:J,delayLeave:W}=B,G=()=>J(A,U);W?W(m.el,U,G):G()}else U()},Pn=(m,S)=>{let A;for(;m!==S;)A=y(m),r(m),m=A;r(S)},Rn=(m,S,A)=>{const{bum:H,scope:B,job:U,subTree:J,um:W,m:G,a:V}=m;no(G),no(V),H&&Vs(H),B.stop(),U&&(U.flags|=8,Ge(J,m,S,A)),W&&De(W,S),De(()=>{m.isUnmounted=!0},S)},jt=(m,S,A,H=!1,B=!1,U=0)=>{for(let J=U;J<m.length;J++)Ge(m[J],S,A,H,B)},Qt=m=>{if(m.shapeFlag&6)return Qt(m.component.subTree);if(m.shapeFlag&128)return m.suspense.next();const S=y(m.anchor||m.el),A=S&&S[Si];return A?y(A):S};let ls=!1;const Ie=(m,S,A)=>{let H;m==null?S._vnode&&(Ge(S._vnode,null,null,!0),H=S._vnode.component):_(S._vnode||null,m,S,null,null,null,A),S._vnode=m,ls||(ls=!0,zr(H),xi(),ls=!1)},j={p:_,um:Ge,m:ht,r:Ms,mt:M,mc:F,pc:ne,pbc:I,n:Qt,o:e};return{render:Ie,hydrate:void 0,createApp:Ua(Ie)}}function On({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 Nt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function su(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Sr(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 i=n[o];let a=r[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=r[o]=vt(r[o]),a.el=i.el),!s&&a.patchFlag!==-2&&Sr(i,a)),a.type===Sn&&(a.patchFlag===-1&&(a=r[o]=vt(a)),a.el=i.el),a.type===Me&&!a.el&&(a.el=i.el)}}function nu(e){const t=e.slice(),s=[0];let n,r,o,i,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,i=s.length-1;o<i;)a=o+i>>1,e[s[a]]<g?o=a+1:i=a;g<e[s[o]]&&(o>0&&(t[n]=s[o-1]),s[o]=n)}}for(o=s.length,i=s[o-1];o-- >0;)s[o]=i,i=t[i];return s}function Ji(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ji(t)}function no(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Zi(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Zi(t.subTree):null}const Qi=e=>e.__isSuspense;function ru(e,t){t&&t.pendingBranch?Y(e)?t.effects.push(...e):t.effects.push(e):pa(e)}const re=Symbol.for("v-fgt"),Sn=Symbol.for("v-txt"),Me=Symbol.for("v-cmt"),qs=Symbol.for("v-stc"),$s=[];let Ke=null;function h(e=!1){$s.push(Ke=e?null:[])}function ou(){$s.pop(),Ke=$s[$s.length-1]||null}let Ts=1;function tn(e,t=!1){Ts+=e,e<0&&Ke&&t&&(Ke.hasOnce=!0)}function Yi(e){return e.dynamicChildren=Ts>0?Ke||es:null,ou(),Ts>0&&Ke&&Ke.push(e),e}function b(e,t,s,n,r,o){return Yi(l(e,t,s,n,r,o,!0))}function Ye(e,t,s,n,r){return Yi(ke(e,t,s,n,r,!0))}function sn(e){return e?e.__v_isVNode===!0:!1}function Ht(e,t){return e.type===t.type&&e.key===t.key}const Xi=({key:e})=>e??null,Ks=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Se(e)||Re(e)||oe(e)?{i:Je,r:e,k:t,f:!!s}:e:null);function l(e,t=null,s=null,n=0,r=null,o=e===re?0:1,i=!1,a=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Xi(t),ref:t&&Ks(t),scopeId:ki,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:Je};return a?(_r(u,s),o&128&&e.normalize(u)):s&&(u.shapeFlag|=Se(s)?8:16),Ts>0&&!i&&Ke&&(u.patchFlag>0||o&6)&&u.patchFlag!==32&&Ke.push(u),u}const ke=iu;function iu(e,t=null,s=null,n=0,r=null,o=!1){if((!e||e===Ea)&&(e=Me),sn(e)){const a=Lt(e,t,!0);return s&&_r(a,s),Ts>0&&!o&&Ke&&(a.shapeFlag&6?Ke[Ke.indexOf(e)]=a:Ke.push(a)),a.patchFlag=-2,a}if(bu(e)&&(e=e.__vccOpts),t){t=lu(t);let{class:a,style:u}=t;a&&!Se(a)&&(t.class=te(a)),ye(u)&&(vr(u)&&!Y(u)&&(u=Pe({},u)),t.style=gn(u))}const i=Se(e)?1:Qi(e)?128:_i(e)?64:ye(e)?4:oe(e)?2:0;return l(e,t,s,n,r,i,o,!0)}function lu(e){return e?vr(e)||Hi(e)?Pe({},e):e:null}function Lt(e,t,s=!1,n=!1){const{props:r,ref:o,patchFlag:i,children:a,transition:u}=e,g=t?uu(r||{},t):r,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&Xi(g),ref:t&&t.ref?s&&o?Y(o)?o.concat(Ks(t)):[o,Ks(t)]:Ks(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!==re?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Lt(e.ssContent),ssFallback:e.ssFallback&&Lt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&n&&Is(d,u.clone(d)),d}function le(e=" ",t=0){return ke(Sn,null,e,t)}function au(e,t){const s=ke(qs,null,e);return s.staticCount=t,s}function N(e="",t=!1){return t?(h(),Ye(Me,null,e)):ke(Me,null,e)}function dt(e){return e==null||typeof e=="boolean"?ke(Me):Y(e)?ke(re,null,e.slice()):sn(e)?vt(e):ke(Sn,null,String(e))}function vt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Lt(e)}function _r(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),_r(e,r()),r._c&&(r._d=!0));return}else{s=32;const r=t._;!r&&!Hi(t)?t._ctx=Je:r===3&&Je&&(Je.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else oe(t)?(t={default:t,_ctx:Je},s=32):(t=String(t),n&64?(s=16,t=[le(t)]):s=8);e.children=t,e.shapeFlag|=s}function uu(...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=gn([t.style,n.style]);else if(cn(r)){const o=t[r],i=n[r];i&&o!==i&&!(Y(o)&&o.includes(i))&&(t[r]=o?[].concat(o,i):i)}else r!==""&&(t[r]=n[r])}return t}function lt(e,t,s,n=null){nt(e,t,7,[s,n])}const cu=ji();let du=0;function pu(e,t,s){const n=e.type,r=(t?t.appContext:e.appContext)||cu,o={uid:du++,vnode:e,type:n,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new El(!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:qi(n,r),emitsOptions:Ni(n,r),emit:null,emitted:null,propsDefaults:he,inheritAttrs:n.inheritAttrs,ctx:he,data:he,props:he,attrs:he,slots:he,refs:he,setupState:he,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=Va.bind(null,o),e.ce&&e.ce(o),o}let je=null;const Cr=()=>je||Je;let nn,nr;{const e=fn(),t=(s,n)=>{let r;return(r=e[s])||(r=e[s]=[]),r.push(n),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};nn=t("__VUE_INSTANCE_SETTERS__",s=>je=s),nr=t("__VUE_SSR_SETTERS__",s=>Ps=s)}const Es=e=>{const t=je;return nn(e),e.scope.on(),()=>{e.scope.off(),nn(t)}},ro=()=>{je&&je.scope.off(),nn(null)};function el(e){return e.vnode.shapeFlag&4}let Ps=!1;function fu(e,t=!1,s=!1){t&&nr(t);const{props:n,children:r}=e.vnode,o=el(e);Wa(e,n,o,t),Ya(e,r,s||t);const i=o?gu(e,t):void 0;return t&&nr(!1),i}function gu(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,La);const{setup:n}=s;if(n){St();const r=e.setupContext=n.length>1?mu(e):null,o=Es(e),i=Ds(n,e,0,[e.props,r]),a=Jo(i);if(_t(),o(),(a||e.sp)&&!ws(e)&&Di(e),a){if(i.then(ro,ro),t)return i.then(u=>{oo(e,u)}).catch(u=>{yn(u,e,0)});e.asyncDep=i}else oo(e,i)}else tl(e)}function oo(e,t,s){oe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ye(t)&&(e.setupState=bi(t)),tl(e)}function tl(e,t,s){const n=e.type;e.render||(e.render=n.render||pt);{const r=Es(e);St();try{Fa(e)}finally{_t(),r()}}}const hu={get(e,t){return Ee(e,"get",""),e[t]}};function mu(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,hu),slots:e.slots,emit:e.emit,expose:t}}function _n(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(bi(ea(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in ks)return ks[s](e)},has(t,s){return s in t||s in ks}})):e.proxy}function bu(e){return oe(e)&&"__vccOpts"in e}const $e=(e,t)=>la(e,t,Ps);function yu(e,t,s){try{tn(-1);const n=arguments.length;return n===2?ye(t)&&!Y(t)?sn(t)?ke(e,null,[t]):ke(e,t):ke(e,null,t):(n>3?s=Array.prototype.slice.call(arguments,2):n===3&&sn(s)&&(s=[s]),ke(e,t,s))}finally{tn(1)}}const vu="3.5.29";let rr;const io=typeof window<"u"&&window.trustedTypes;if(io)try{rr=io.createPolicy("vue",{createHTML:e=>e})}catch{}const sl=rr?e=>rr.createHTML(e):e=>e,xu="http://www.w3.org/2000/svg",wu="http://www.w3.org/1998/Math/MathML",yt=typeof document<"u"?document:null,lo=yt&&yt.createElement("template"),ku={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"?yt.createElementNS(xu,e):t==="mathml"?yt.createElementNS(wu,e):s?yt.createElement(e,{is:s}):yt.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>yt.createTextNode(e),createComment:e=>yt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>yt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,o){const i=s?s.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===o||!(r=r.nextSibling)););else{lo.innerHTML=sl(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=lo.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[i?i.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Rt="transition",ds="animation",Rs=Symbol("_vtc"),nl={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=Pe({},Ii,nl),Su=e=>(e.displayName="Transition",e.props=$u,e),Ir=Su((e,{slots:t})=>yu(ka,_u(e),t)),Bt=(e,t=[])=>{Y(e)?e.forEach(s=>s(...t)):e&&e(...t)},ao=e=>e?Y(e)?e.some(t=>t.length>1):e.length>1:!1;function _u(e){const t={};for(const K in e)K in nl||(t[K]=e[K]);if(e.css===!1)return t;const{name:s="v",type:n,duration:r,enterFromClass:o=`${s}-enter-from`,enterActiveClass:i=`${s}-enter-active`,enterToClass:a=`${s}-enter-to`,appearFromClass:u=o,appearActiveClass:g=i,appearToClass:d=a,leaveFromClass:f=`${s}-leave-from`,leaveActiveClass:y=`${s}-leave-active`,leaveToClass:w=`${s}-leave-to`}=e,k=Cu(r),_=k&&k[0],R=k&&k[1],{onBeforeEnter:P,onEnter:T,onEnterCancelled:q,onLeave:D,onLeaveCancelled:$,onBeforeAppear:v=P,onAppear:C=T,onAppearCancelled:F=q}=t,x=(K,O,M,E)=>{K._enterCancelled=E,Ut(K,O?d:a),Ut(K,O?g:i),M&&M()},I=(K,O)=>{K._isLeaving=!1,Ut(K,f),Ut(K,w),Ut(K,y),O&&O()},z=K=>(O,M)=>{const E=K?C:T,ae=()=>x(O,K,M);Bt(E,[O,ae]),uo(()=>{Ut(O,K?u:o),bt(O,K?d:a),ao(E)||co(O,n,_,ae)})};return Pe(t,{onBeforeEnter(K){Bt(P,[K]),bt(K,o),bt(K,i)},onBeforeAppear(K){Bt(v,[K]),bt(K,u),bt(K,g)},onEnter:z(!1),onAppear:z(!0),onLeave(K,O){K._isLeaving=!0;const M=()=>I(K,O);bt(K,f),K._enterCancelled?(bt(K,y),go(K)):(go(K),bt(K,y)),uo(()=>{K._isLeaving&&(Ut(K,f),bt(K,w),ao(D)||co(K,n,R,M))}),Bt(D,[K,M])},onEnterCancelled(K){x(K,!1,void 0,!0),Bt(q,[K])},onAppearCancelled(K){x(K,!0,void 0,!0),Bt(F,[K])},onLeaveCancelled(K){I(K),Bt($,[K])}})}function Cu(e){if(e==null)return null;if(ye(e))return[Nn(e.enter),Nn(e.leave)];{const t=Nn(e);return[t,t]}}function Nn(e){return _l(e)}function bt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e[Rs]||(e[Rs]=new Set)).add(t)}function Ut(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const s=e[Rs];s&&(s.delete(t),s.size||(e[Rs]=void 0))}function uo(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Iu=0;function co(e,t,s,n){const r=e._endId=++Iu,o=()=>{r===e._endId&&n()};if(s!=null)return setTimeout(o,s);const{type:i,timeout:a,propCount:u}=Tu(e,t);if(!i)return n();const g=i+"end";let d=0;const f=()=>{e.removeEventListener(g,y),o()},y=w=>{w.target===e&&++d>=u&&f()};setTimeout(()=>{d<u&&f()},a+1),e.addEventListener(g,y)}function Tu(e,t){const s=window.getComputedStyle(e),n=k=>(s[k]||"").split(", "),r=n(`${Rt}Delay`),o=n(`${Rt}Duration`),i=po(r,o),a=n(`${ds}Delay`),u=n(`${ds}Duration`),g=po(a,u);let d=null,f=0,y=0;t===Rt?i>0&&(d=Rt,f=i,y=o.length):t===ds?g>0&&(d=ds,f=g,y=u.length):(f=Math.max(i,g),d=f>0?i>g?Rt:ds:null,y=d?d===Rt?o.length:u.length:0);const w=d===Rt&&/\b(?:transform|all)(?:,|$)/.test(n(`${Rt}Property`).toString());return{type:d,timeout:f,propCount:y,hasTransform:w}}function po(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((s,n)=>fo(s)+fo(e[n])))}function fo(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function go(e){return(e?e.ownerDocument:document).body.offsetHeight}function Pu(e,t,s){const n=e[Rs];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const ho=Symbol("_vod"),Ru=Symbol("_vsh"),Au=Symbol(""),Du=/(?:^|;)\s*display\s*:/;function Eu(e,t,s){const n=e.style,r=Se(s);let o=!1;if(s&&!r){if(t)if(Se(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();s[a]==null&&Gs(n,a,"")}else for(const i in t)s[i]==null&&Gs(n,i,"");for(const i in s)i==="display"&&(o=!0),Gs(n,i,s[i])}else if(r){if(t!==s){const i=n[Au];i&&(s+=";"+i),n.cssText=s,o=Du.test(s)}}else t&&e.removeAttribute("style");ho in e&&(e[ho]=o?n.display:"",e[Ru]&&(n.display="none"))}const mo=/\s*!important$/;function Gs(e,t,s){if(Y(s))s.forEach(n=>Gs(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Lu(e,t);mo.test(s)?e.setProperty(It(n),s.replace(mo,""),"important"):e[n]=s}}const bo=["Webkit","Moz","ms"],Bn={};function Lu(e,t){const s=Bn[t];if(s)return s;let n=$t(t);if(n!=="filter"&&n in e)return Bn[t]=n;n=Yo(n);for(let r=0;r<bo.length;r++){const o=bo[r]+n;if(o in e)return Bn[t]=o}return t}const yo="http://www.w3.org/1999/xlink";function vo(e,t,s,n,r,o=Al(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(yo,t.slice(6,t.length)):e.setAttributeNS(yo,t,s):s==null||o&&!ei(s)?e.removeAttribute(t):e.setAttribute(t,o?"":gt(s)?String(s):s)}function xo(e,t,s,n,r){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?sl(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 i=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=ei(s):s==null&&a==="string"?(s="",i=!0):a==="number"&&(s=0,i=!0)}try{e[t]=s}catch{}i&&e.removeAttribute(r||t)}function kt(e,t,s,n){e.addEventListener(t,s,n)}function Fu(e,t,s,n){e.removeEventListener(t,s,n)}const wo=Symbol("_vei");function Mu(e,t,s,n,r=null){const o=e[wo]||(e[wo]={}),i=o[t];if(n&&i)i.value=n;else{const[a,u]=ju(t);if(n){const g=o[t]=Bu(n,r);kt(e,a,g,u)}else i&&(Fu(e,a,i,u),o[t]=void 0)}}const ko=/(?:Once|Passive|Capture)$/;function ju(e){let t;if(ko.test(e)){t={};let n;for(;n=e.match(ko);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):It(e.slice(2)),t]}let Un=0;const Ou=Promise.resolve(),Nu=()=>Un||(Ou.then(()=>Un=0),Un=Date.now());function Bu(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;nt(Uu(n,s.value),t,5,[n])};return s.value=e,s.attached=Nu(),s}function Uu(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 $o=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Vu=(e,t,s,n,r,o)=>{const i=r==="svg";t==="class"?Pu(e,n,i):t==="style"?Eu(e,s,n):cn(t)?cr(t)||Mu(e,t,s,n,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Hu(e,t,n,i))?(xo(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&vo(e,t,n,i,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Se(n))?xo(e,$t(t),n,o,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),vo(e,t,n,i))};function Hu(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&$o(t)&&oe(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 $o(t)&&Se(s)?!1:t in e}const Ft=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Y(t)?s=>Vs(t,s):t};function zu(e){e.target.composing=!0}function So(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Qe=Symbol("_assign");function _o(e,t,s){return t&&(e=e.trim()),s&&(e=pn(e)),e}const fe={created(e,{modifiers:{lazy:t,trim:s,number:n}},r){e[Qe]=Ft(r);const o=n||r.props&&r.props.type==="number";kt(e,t?"change":"input",i=>{i.target.composing||e[Qe](_o(e.value,s,o))}),(s||o)&&kt(e,"change",()=>{e.value=_o(e.value,s,o)}),t||(kt(e,"compositionstart",zu),kt(e,"compositionend",So),kt(e,"change",So))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:r,number:o}},i){if(e[Qe]=Ft(i),e.composing)return;const a=(o||e.type==="number")&&!/^0\d/.test(e.value)?pn(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))}},rn={deep:!0,created(e,t,s){e[Qe]=Ft(s),kt(e,"change",()=>{const n=e._modelValue,r=os(e),o=e.checked,i=e[Qe];if(Y(n)){const a=fr(n,r),u=a!==-1;if(o&&!u)i(n.concat(r));else if(!o&&u){const g=[...n];g.splice(a,1),i(g)}}else if(is(n)){const a=new Set(n);o?a.add(r):a.delete(r),i(a)}else i(ol(e,o))})},mounted:Co,beforeUpdate(e,t,s){e[Qe]=Ft(s),Co(e,t,s)}};function Co(e,{value:t,oldValue:s},n){e._modelValue=t;let r;if(Y(t))r=fr(t,n.props.value)>-1;else if(is(t))r=t.has(n.props.value);else{if(t===s)return;r=Et(t,ol(e,!0))}e.checked!==r&&(e.checked=r)}const Io={created(e,{value:t},s){e.checked=Et(t,s.props.value),e[Qe]=Ft(s),kt(e,"change",()=>{e[Qe](os(e))})},beforeUpdate(e,{value:t,oldValue:s},n){e[Qe]=Ft(n),t!==s&&(e.checked=Et(t,n.props.value))}},rl={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const r=is(t);kt(e,"change",()=>{const o=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>s?pn(os(i)):os(i));e[Qe](e.multiple?r?new Set(o):o:o[0]),e._assigning=!0,vn(()=>{e._assigning=!1})}),e[Qe]=Ft(n)},mounted(e,{value:t}){To(e,t)},beforeUpdate(e,t,s){e[Qe]=Ft(s)},updated(e,{value:t}){e._assigning||To(e,t)}};function To(e,t){const s=e.multiple,n=Y(t);if(!(s&&!n&&!is(t))){for(let r=0,o=e.options.length;r<o;r++){const i=e.options[r],a=os(i);if(s)if(n){const u=typeof a;u==="string"||u==="number"?i.selected=t.some(g=>String(g)===String(a)):i.selected=fr(t,a)>-1}else i.selected=t.has(a);else if(Et(os(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function os(e){return"_value"in e?e._value:e.value}function ol(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const qu=["ctrl","shift","alt","meta"],Ku={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)=>qu.some(s=>e[`${s}Key`]&&!t.includes(s))},zt=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((r,...o)=>{for(let i=0;i<t.length;i++){const a=Ku[t[i]];if(a&&a(r,t))return}return e(r,...o)}))},Gu={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},il=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(r=>{if(!("key"in r))return;const o=It(r.key);if(t.some(i=>i===o||Gu[i]===o))return e(r)}))},Wu=Pe({patchProp:Vu},ku);let Po;function Ju(){return Po||(Po=eu(Wu))}const Ro=((...e)=>{const t=Ju().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=Qu(n);if(!r)return;const o=t._component;!oe(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=s(r,!1,Zu(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t});function Zu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Qu(e){return Se(e)?document.querySelector(e):e}async function _e(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 Ne(e,t){return _e(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0})}async function Yu(){return _e("/api/issues")}async function or(e){return _e(`/api/issues/${e}`)}async function Xu(e){return _e(`/api/issues/${e}/logs`)}async function ec(){return _e("/api/system/status")}async function tc(e){await Ne(`/api/issues/${e}/retry`)}async function sc(e){await Ne(`/api/issues/${e}/cancel`)}async function nc(e){await Ne(`/api/issues/${e}/restart`)}async function Ao(e,t){await Ne(`/api/issues/${e}/retry-from-phase`,{phase:t})}async function rc(e){await Ne(`/api/issues/${e}/approve-plan`)}async function oc(e,t){await Ne(`/api/issues/${e}/reject-plan`,{feedback:t})}async function ic(e){await Ne(`/api/issues/${e}/skip-review`)}async function lc(e){return _e(`/api/issues/${e}/review-history`)}async function Do(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 ac(e,t,s){await _e(`/api/issues/${e}/plans/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:s})})}async function uc(e){return _e(`/api/issues/${e}/supplement`)}async function cc(e,t){return _e(`/api/issues/${e}/supplement`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function dc(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)),_e(`/api/gongfeng/issues?${t.toString()}`)}async function pc(e){return Ne("/api/issues/start",e)}async function fc(e,t){return _e(`/api/issues/${e}/note-sync`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:t})})}async function gc(e){return _e("/api/system/note-sync",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e})})}async function hc(e,t){return _e(`/api/issues/${e}/e2e`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:t})})}async function mc(e){return Ne("/api/brainstorm/sessions",{transcript:e})}async function bc(e){return _e(`/api/brainstorm/sessions/${e}`)}function Vn(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 yc(e,t,s=!0){return Ne(`/api/brainstorm/sessions/${e}/create-issue`,{title:t,addAutoFinishLabel:s})}async function vc(e){return Ne("/api/chat/sessions",{title:e})}async function xc(){return _e("/api/chat/sessions")}async function Eo(e){return _e(`/api/chat/sessions/${e}`)}async function wc(e){return _e(`/api/chat/sessions/${e}`,{method:"DELETE"})}function kc(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 _e("/api/knowledge/entries"+(s?"?"+s:""))}async function Sc(e){return _e("/api/knowledge/entries/"+e)}async function _c(e){return Ne("/api/knowledge/entries",e)}async function Cc(e,t){return _e("/api/knowledge/entries/"+e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function Ic(e){return _e("/api/knowledge/entries/"+e,{method:"DELETE"})}async function Tc(e){return Ne("/api/knowledge/import/iwiki",{url:e})}async function Pc(e,t){return Ne("/api/knowledge/import/gongfeng",{type:e,iid:t})}async function Rc(e){return Ne("/api/knowledge/entries/"+e+"/sync")}async function Ac(){return _e("/api/knowledge/stats")}const Dc={"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
+ 这将删除 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.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 正在思考..."},Ec={"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.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..."},Lo={"zh-CN":Dc,en:Ec},Cn=L(localStorage.getItem("iaf-locale")||"zh-CN");function de(e,t){const s=Lo[Cn.value]?.[e]??Lo["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 Lc(e){Cn.value=e,localStorage.setItem("iaf-locale",e)}function Fc(){return Cn.value}const Fo={install(e){e.config.globalProperties.$t=de}};function Jt(){return{t:de,locale:Cn,setLocale:Lc,getLocale:Fc}}const Mo=["analysis","design","implement","verify"],jo=["plan","review","build","verify"];function Mc(){return[{file:"01-analysis.md",label:de("planFile.01-analysis.md")},{file:"02-design.md",label:de("planFile.02-design.md")},{file:"03-todolist.md",label:de("planFile.03-todolist.md")},{file:"04-verify-report.md",label:de("planFile.04-verify-report.md")}]}function jc(){return[{file:"01-plan.md",label:de("planFile.01-plan.md")},{file:"02-verify-report.md",label:de("planFile.02-verify-report.md")},{file:"review-feedback.md",label:de("planFile.review-feedback.md")}]}const Oc={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"},Oo=new Set(["completed","failed"]),Nc=new Set(["01-analysis.md","02-design.md","03-todolist.md","01-plan.md"]);function Bc(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 Ls(){const e=L("classic"),t=$e(()=>e.value==="plan-mode"?[...jo]:[...Mo]);function s(k){return(k?.pipelineMode??e.value)==="plan-mode"?jc():Mc()}function n(k){return(k?.pipelineMode??e.value)==="plan-mode"?[...jo]:[...Mo]}function r(k){return de(`state.${k}`)||k}function o(k){return Oc[k]??"bg-gray-100 text-gray-600"}function i(k){return de(`phase.${k}`)||k}function a(k,_){if(k.progress?.phases?.[_])return k.progress.phases[_].status;const R=k.pipelineMode??e.value;return Bc(k.state,R)[_]??"pending"}function u(k,_){const R=a(k,_);return R==="completed"?"bg-green-100 text-green-600":R==="in_progress"?"bg-blue-100 text-blue-600":R==="failed"?"bg-red-100 text-red-600":"bg-gray-100 text-gray-400"}function g(k){return k==="completed"?"bg-green-500 text-white":k==="in_progress"?"bg-blue-500 text-white":k==="failed"?"bg-red-500 text-white":"bg-gray-200 text-gray-500"}function d(k){return!Oo.has(k)}function f(k){return Oo.has(k)}function y(k){return Nc.has(k)}function w(k,_){if(!_.value)return"#";const R=_.value.config.gongfengBaseUrl,P=_.value.config.projectPath;return`${R}/${P}/issues/${k}`}return{pipelineMode:e,phaseNames:t,getPlanDocs:s,getPhaseNames:n,stateLabel:r,stateClass:o,phaseLabel:i,phaseStatus:a,phaseIndicatorClass:u,phaseNodeClass:g,isActiveState:d,isTerminalState:f,isEditableDoc:y,issueUrl:w}}function Uc(e){const t=L(!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,i=>{try{e(o,JSON.parse(i.data))}catch{}});s.onerror=()=>{t.value=!1,setTimeout(r,5e3)}}return Pt(r),Mt(()=>{s&&(s.close(),s=null)}),{connected:t}}const No=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 Vc(){return[{value:"all",label:de("filter.all")},{value:"active",label:de("filter.active")},{value:"completed",label:de("filter.completed")},{value:"failed",label:de("filter.failed")},{value:"review",label:de("filter.review")}]}function Hc(){const e=L([]),t=L("all"),s=$e(()=>e.value.filter(a=>No.has(a.state)).length),n=$e(()=>e.value.filter(a=>a.state==="completed").length),r=$e(()=>e.value.filter(a=>a.state==="failed").length),o=$e(()=>t.value==="all"?e.value:t.value==="active"?e.value.filter(a=>No.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 i(){try{e.value=await Yu()}catch(a){console.error("Fetch issues failed",a)}}return{issues:e,filter:t,filteredIssues:o,activeCount:s,completedCount:n,failedCount:r,refresh:i}}function Hn(){return{requirements:"",acceptanceCriteria:"",scope:"",constraints:"",references:"",freeText:"",tapdId:""}}function zc(){const e=L(null),t=L(null),s=L(0),n=L(Hn()),r=L(Hn()),o=L(!1),i=L(!1),a=L(!1),u=L(""),g=L(!1),d=L([]);async function f(x,I){e.value=x,i.value=!1,n.value=Hn(),d.value=[],I.value=[];try{const[z,K]=await Promise.all([or(x.issueIid),Xu(x.issueIid)]);e.value=z,t.value=z.progress??null,I.value=K.reverse()}catch(z){console.error("Fetch detail failed",z)}k(x.issueIid),w(x.issueIid)}async function y(){if(!e.value)return;const x=e.value.issueIid;try{const I=await or(x);e.value=I,t.value=I.progress??null,s.value++}catch(I){console.error("Refresh detail failed",I)}}async function w(x){try{d.value=await lc(x)}catch{}}async function k(x){o.value=!0;try{n.value=await uc(x)}catch{}finally{o.value=!1}}function _(){r.value={...n.value},i.value=!0}async function R(x){if(e.value){a.value=!0;try{const I=await cc(e.value.issueIid,r.value);n.value=I.data??r.value,i.value=!1,confirm(de("confirm.supplementSaved"))&&(await Ao(e.value.issueIid,"analysis"),await x())}catch(I){alert(de("alert.saveFailed")+I.message)}finally{a.value=!1}}}async function P(x,I){if(confirm(de("confirm.retry",{iid:x})))try{await tc(x),await I(),e.value?.issueIid===x&&await f(e.value,{value:[]})}catch(z){alert(de("alert.retryFailed")+z.message)}}async function T(x,I){if(confirm(de("confirm.cancel",{iid:x})))try{await sc(x),e.value?.issueIid===x&&(e.value=null),await I()}catch(z){alert(de("alert.cancelFailed")+z.message)}}async function q(x,I){if(confirm(de("confirm.restart",{iid:x})))try{await nc(x),await I(),e.value?.issueIid===x&&await f(e.value,{value:[]})}catch(z){alert(de("alert.restartFailed")+z.message)}}async function D(x,I,z,K){if(confirm(de("confirm.retryFromPhase",{phaseLabel:z,iid:x})))try{await Ao(x,I),await K(),e.value?.issueIid===x&&await f(e.value,{value:[]})}catch(O){alert(de("alert.retryFromPhaseFailed")+O.message)}}async function $(x,I){if(confirm(de("confirm.approve",{iid:x}))){g.value=!0;try{await rc(x),await I(),e.value?.issueIid===x&&await f(e.value,{value:[]})}catch(z){alert(de("alert.approveFailed")+z.message)}finally{g.value=!1}}}async function v(x,I){if(!u.value.trim()){alert(de("confirm.reject.noFeedback"));return}g.value=!0;try{await oc(x,u.value),u.value="",await I(),e.value?.issueIid===x&&await f(e.value,{value:[]})}catch(z){alert(de("alert.rejectFailed")+z.message)}finally{g.value=!1}}async function C(x,I){if(confirm(de("confirm.skip",{iid:x}))){g.value=!0;try{await ic(x),await I(),e.value?.issueIid===x&&await f(e.value,{value:[]})}catch(z){alert(de("alert.skipFailed")+z.message)}finally{g.value=!1}}}function F(x){return x?!!(x.requirements||x.acceptanceCriteria||x.scope||x.constraints||x.references||x.freeText||x.tapdId):!1}return{selectedIssue:e,detailProgress:t,detailVersion:s,detailSupplement:n,detailSupplementForm:r,detailSupplementLoading:o,detailSupplementEditing:i,detailSupplementSaving:a,reviewFeedback:u,reviewSubmitting:g,reviewHistory:d,selectIssue:f,refreshDetail:y,enterSupplementEdit:_,saveDetailSupplement:R,doRetryIssue:P,doCancelIssue:T,doRestartIssue:q,doRetryFromPhase:D,doApprovePlan:$,doRejectPlan:v,doSkipReview:C,hasSupplementData:F}}const Bo=500,qc=new Set(["assistant"]);function ll(){const e=L([]),t=L(!0),s=L(!1),n=L(null),r=$e(()=>s.value?e.value:e.value.filter(f=>qc.has(f.type)));function o(f){return de(`agentLog.type.${f}`)||f}function i(){t.value&&vn(()=>{const f=n.value;f&&(f.scrollTop=0)})}function a(f){e.value.unshift(f),e.value.length>Bo&&(e.value=e.value.slice(0,Bo)),i()}function u(f,y,w,k){y.value===f&&a({type:k.type??"raw",phase:w,timestamp:k.timestamp??new Date().toISOString(),summary:Kc(k)})}function g(f,y,w,k,_){y.value===f&&a({type:"system",phase:w,timestamp:_,summary:k})}function d(){e.value=[]}return{agentLogs:e,filteredLogs:r,agentAutoScroll:t,debugMode:s,agentLogContainer:n,agentLogLabel:o,pushLog:a,pushAgentStreamEvent:u,pushSystemLog:g,scrollToTop:i,clear:d}}function Kc(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(i=>i.type==="text").map(i=>i.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??{},i=o.path??o.command??o.file_path??"";return r+(i?": "+i:"")}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 Uo(){return{requirements:"",acceptanceCriteria:"",scope:"",constraints:"",references:"",freeText:"",tapdId:""}}function Gc(e){const t=L(""),s=L([]),n=L(new Set),r=L(0),o=L(1),i=20,a=L(!1),u=L(""),g=L(null),d=L(Uo()),f=L(!1);async function y(){a.value=!0,u.value="";try{const R=await dc({search:t.value.trim()||void 0,page:o.value,perPage:i});s.value=R.issues,r.value=R.total,n.value=new Set(R.trackedIids)}catch(R){u.value=R.message}finally{a.value=!1}}function w(R){g.value=R,d.value=Uo(),f.value=!1}function k(R){return!!(R.requirements||R.acceptanceCriteria||R.scope||R.constraints||R.references||R.freeText)}async function _(R){if(g.value){f.value=!0;try{const P=g.value,T={issueId:P.id,issueIid:P.iid,issueTitle:P.title};k(d.value)&&(T.supplement=d.value),await pc(T),g.value=null,await e(),n.value.add(P.iid),R()}catch(P){alert(de("alert.startFailed")+P.message)}finally{f.value=!1}}}return{browseSearch:t,browseIssues:s,browseTrackedIids:n,browseTotal:r,browsePage:o,browsePerPage:i,browseLoading:a,browseError:u,startDialogIssue:g,startSupplement:d,startProcessing:f,fetchGongfengIssues:y,openStartDialog:w,doStartProcessing:_,hasSupplementData:k}}function Wc(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(i){const a=new URL(window.location.href);i?a.searchParams.set("issue",String(i)):a.searchParams.delete("issue");const u=a.pathname+a.search,g=window.location.pathname+window.location.search;u!==g&&window.history.pushState({issueIid:i??null},"",u)}function o(i){const a=i.state?.issueIid??n();a?s(a):t.value&&(t.value=void 0)}return ft(t,i=>r(i)),Pt(()=>{window.addEventListener("popstate",o),window.history.replaceState({issueIid:n()??null},"",window.location.href)}),Mt(()=>{window.removeEventListener("popstate",o)}),{readIssueIidFromUrl:n}}function on(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 al(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 Jc(e){return e?new Date(e).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",second:"2-digit"}):""}const Zc={class:"bg-white shadow-sm border-b border-gray-200"},Qc={class:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between"},Yc={class:"flex items-center space-x-3"},Xc={class:"flex items-center space-x-4 text-sm text-gray-500"},ed={key:0},td={key:1},sd={key:2},nd=["disabled","title"],rd=["title"],od=Ae({__name:"HeaderBar",props:{connected:{type:Boolean},systemStatus:{}},setup(e){const{locale:t,setLocale:s}=Jt(),n=e,r=L(!0),o=L(!1);ft(()=>n.systemStatus,a=>{a&&(r.value=a.config.issueNoteSyncEnabled)},{immediate:!0});async function i(){const a=!r.value;o.value=!0;try{await gc(a),r.value=a}catch(u){console.error("Failed to toggle system note sync",u)}finally{o.value=!1}}return(a,u)=>(h(),b("header",Zc,[l("div",Qc,[l("div",Yc,[u[2]||(u[2]=l("h1",{class:"text-xl font-bold text-gray-800"},"Issue Auto-Finish",-1)),l("span",{class:te(["flex items-center space-x-1 text-sm",e.connected?"text-green-600":"text-red-500"])},[l("span",{class:te(["inline-block w-2 h-2 rounded-full",e.connected?"bg-green-500 pulse-dot":"bg-red-500"])},null,2),l("span",null,p(e.connected?a.$t("header.connected"):a.$t("header.disconnected")),1)],2)]),l("div",Xc,[e.systemStatus?(h(),b("span",ed,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)):N("",!0),e.systemStatus?(h(),b("span",td,p(a.$t("header.uptime"))+": "+p(c(al)(e.systemStatus.uptime)),1)):N("",!0),e.systemStatus?(h(),b("span",sd,"AI: "+p(e.systemStatus.config.aiMode),1)):N("",!0),e.systemStatus?.config.pipelineMode?(h(),b("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)):N("",!0),e.systemStatus?(h(),b("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=>i())},p(r.value?a.$t("header.syncOn"):a.$t("header.syncOff")),11,nd)):N("",!0),l("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,rd)])])]))}}),id={class:"grid grid-cols-4 gap-4 mb-6"},ld={class:"bg-white rounded-lg shadow-sm p-4 border border-gray-200"},ad={class:"text-sm text-gray-500"},ud={class:"text-2xl font-bold text-gray-800"},cd={class:"bg-white rounded-lg shadow-sm p-4 border border-blue-200"},dd={class:"text-sm text-blue-500"},pd={class:"text-2xl font-bold text-blue-600"},fd={class:"bg-white rounded-lg shadow-sm p-4 border border-green-200"},gd={class:"text-sm text-green-500"},hd={class:"text-2xl font-bold text-green-600"},md={class:"bg-white rounded-lg shadow-sm p-4 border border-red-200"},bd={class:"text-sm text-red-500"},yd={class:"text-2xl font-bold text-red-600"},vd=Ae({__name:"StatsCards",props:{total:{},active:{},completed:{},failed:{}},setup(e){return(t,s)=>(h(),b("div",id,[l("div",ld,[l("div",ad,p(t.$t("stats.total")),1),l("div",ud,p(e.total),1)]),l("div",cd,[l("div",dd,p(t.$t("stats.active")),1),l("div",pd,p(e.active),1)]),l("div",fd,[l("div",gd,p(t.$t("stats.completed")),1),l("div",hd,p(e.completed),1)]),l("div",md,[l("div",bd,p(t.$t("stats.failed")),1),l("div",yd,p(e.failed),1)])]))}}),xd={class:"mb-4 flex items-center space-x-2"},wd={class:"text-sm text-gray-600"},kd=["onClick"],$d={class:"bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden"},Sd={class:"w-full"},_d={class:"bg-gray-50 border-b border-gray-200"},Cd={key:0},Id={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},Td={key:0},Pd={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},Rd={key:0},Ad={key:0},Dd={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},Ed={class:"divide-y divide-gray-100"},Ld={key:0},Fd={colspan:"7",class:"px-4 py-8 text-center text-gray-400"},Md=["onClick"],jd={class:"px-4 py-3 text-sm font-mono text-gray-700"},Od=["href","title"],Nd={class:"px-4 py-3 text-sm text-gray-800 max-w-xs truncate"},Bd={class:"px-4 py-3"},Ud={class:"px-4 py-3"},Vd={class:"flex items-center space-x-1"},Hd=["title"],zd={key:0},qd={key:1,class:"pulse-dot"},Kd={key:2},Gd={key:3},Wd={class:"px-4 py-3 text-sm text-gray-600"},Jd={class:"px-4 py-3 text-sm text-gray-500"},Zd={class:"px-4 py-3"},Qd=["onClick"],Yd=["onClick"],Xd=["onClick"],ep=Ae({__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:i,phaseStatus:a,phaseIndicatorClass:u,phaseLabel:g}=Ls(),d=L("updatedAt"),f=L("desc"),y=$e(()=>{const k=[...s.issues],_=f.value==="asc"?1:-1;return k.sort((R,P)=>{const T=d.value;return T==="updatedAt"?_*(new Date(R.updatedAt).getTime()-new Date(P.updatedAt).getTime()):T==="issueIid"||T==="attempts"?_*(R[T]-P[T]):_*R.state.localeCompare(P.state)})});function w(k){d.value===k?f.value=f.value==="asc"?"desc":"asc":(d.value=k,f.value=k==="updatedAt"?"desc":"asc")}return(k,_)=>(h(),b("div",null,[l("div",xd,[l("span",wd,p(k.$t("table.filter")),1),(h(!0),b(re,null,Te(c(Vc)(),R=>(h(),b("button",{key:R.value,class:te(["px-3 py-1 rounded-full text-xs font-medium transition-colors",e.filter===R.value?"bg-gray-800 text-white":"bg-gray-200 text-gray-600 hover:bg-gray-300"]),onClick:P=>n("update:filter",R.value)},p(R.label),11,kd))),128))]),l("div",$d,[l("table",Sd,[l("thead",_d,[l("tr",null,[l("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:_[0]||(_[0]=R=>w("issueIid"))},[_[6]||(_[6]=le(" IID ",-1)),d.value==="issueIid"?(h(),b("span",Cd,p(f.value==="asc"?"▲":"▼"),1)):N("",!0)]),l("th",Id,p(k.$t("table.title")),1),l("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:_[1]||(_[1]=R=>w("state"))},[le(p(k.$t("table.state"))+" ",1),d.value==="state"?(h(),b("span",Td,p(f.value==="asc"?"▲":"▼"),1)):N("",!0)]),l("th",Pd,p(k.$t("table.progress")),1),l("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:_[2]||(_[2]=R=>w("attempts"))},[le(p(k.$t("table.retries"))+" ",1),d.value==="attempts"?(h(),b("span",Rd,p(f.value==="asc"?"▲":"▼"),1)):N("",!0)]),l("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:_[3]||(_[3]=R=>w("updatedAt"))},[le(p(k.$t("table.updatedAt"))+" ",1),d.value==="updatedAt"?(h(),b("span",Ad,p(f.value==="asc"?"▲":"▼"),1)):N("",!0)]),l("th",Dd,p(k.$t("table.actions")),1)])]),l("tbody",Ed,[y.value.length===0?(h(),b("tr",Ld,[l("td",Fd,p(k.$t("table.empty")),1)])):N("",!0),(h(!0),b(re,null,Te(y.value,R=>(h(),b("tr",{key:R.issueIid,class:"hover:bg-gray-50 cursor-pointer transition-colors",onClick:P=>n("select",R)},[l("td",jd,[l("a",{href:e.systemStatus?`${e.systemStatus.config.gongfengBaseUrl}/${e.systemStatus.config.projectPath}/issues/${R.issueIid}`:"#",target:"_blank",rel:"noopener",class:"text-blue-600 hover:text-blue-800 hover:underline inline-flex items-center",onClick:_[4]||(_[4]=zt(()=>{},["stop"])),title:k.$t("table.viewInGongfeng")},[le(" #"+p(R.issueIid)+" ",1),_[7]||(_[7]=l("svg",{class:"w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[l("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,Od)]),l("td",Nd,p(R.issueTitle),1),l("td",Bd,[l("span",{class:te(["px-2 py-1 rounded-full text-xs font-medium",c(i)(R.state)])},p(c(o)(R.state)),3)]),l("td",Ud,[l("div",Vd,[(h(!0),b(re,null,Te(c(r)(R),P=>(h(),b("div",{key:P,class:te(["w-6 h-6 rounded-full flex items-center justify-center text-xs",c(u)(R,P)]),title:c(g)(P)},[c(a)(R,P)==="completed"?(h(),b("span",zd,"✓")):c(a)(R,P)==="in_progress"?(h(),b("span",qd,"●")):c(a)(R,P)==="failed"?(h(),b("span",Kd,"✗")):(h(),b("span",Gd,"●"))],10,Hd))),128))])]),l("td",Wd,p(R.attempts),1),l("td",Jd,p(c(on)(R.updatedAt)),1),l("td",Zd,[l("div",{class:"flex space-x-2",onClick:_[5]||(_[5]=zt(()=>{},["stop"]))},[R.state==="failed"?(h(),b("button",{key:0,class:"px-2 py-1 bg-blue-500 text-white text-xs rounded hover:bg-blue-600",onClick:P=>n("retry",R.issueIid)},p(k.$t("table.retry")),9,Qd)):N("",!0),l("button",{class:"px-2 py-1 bg-yellow-100 text-yellow-700 text-xs rounded hover:bg-yellow-200",onClick:P=>n("restart",R.issueIid)},p(k.$t("table.restart")),9,Yd),l("button",{class:"px-2 py-1 bg-red-100 text-red-600 text-xs rounded hover:bg-red-200",onClick:P=>n("cancel",R.issueIid)},p(k.$t("table.cancel")),9,Xd)])])],8,Md))),128))])])])]))}}),tp={class:"mb-4 flex items-center space-x-3"},sp={class:"relative flex-1 max-w-md"},np=["value","placeholder"],rp=["disabled"],op={key:0,class:"py-12 text-center text-gray-400"},ip={key:1,class:"py-8 text-center text-red-500"},lp={key:2},ap={class:"bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden"},up={class:"w-full"},cp={class:"bg-gray-50 border-b border-gray-200"},dp={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},pp={class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},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:"divide-y divide-gray-100"},bp={key:0},yp={colspan:"6",class:"px-4 py-8 text-center text-gray-400"},vp={class:"px-4 py-3 text-sm font-mono text-gray-700"},xp=["href"],wp={class:"px-4 py-3 text-sm text-gray-800 max-w-sm truncate"},kp={class:"px-4 py-3"},$p={class:"flex flex-wrap"},Sp={class:"px-4 py-3 text-sm text-gray-600"},_p={class:"px-4 py-3 text-sm text-gray-500"},Cp={class:"px-4 py-3"},Ip={key:0,class:"px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-500"},Tp=["onClick"],Pp={key:0,class:"flex items-center justify-between mt-4"},Rp={class:"text-sm text-gray-500"},Ap={class:"flex space-x-2"},Dp=["disabled"],Ep=["disabled"],Lp=Ae({__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(),b("div",null,[l("div",tp,[l("div",sp,[l("input",{value:e.search,onInput:o[0]||(o[0]=i=>s("update:search",i.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]=il(i=>s("search"),["enter"]))},null,40,np),o[5]||(o[5]=l("svg",{class:"absolute left-3 top-2.5 w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[l("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))]),l("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]=i=>s("search"))},p(e.loading?r.$t("browse.loading"):r.$t("browse.search")),9,rp)]),e.loading?(h(),b("div",op,[o[6]||(o[6]=l("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"},[l("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),l("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),le(" "+p(r.$t("browse.loadingList")),1)])):e.error?(h(),b("div",ip,p(e.error),1)):(h(),b("div",lp,[l("div",ap,[l("table",up,[l("thead",cp,[l("tr",null,[o[7]||(o[7]=l("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"IID",-1)),l("th",dp,p(r.$t("browse.title")),1),l("th",pp,p(r.$t("browse.labels")),1),l("th",fp,p(r.$t("browse.author")),1),l("th",gp,p(r.$t("browse.createdAt")),1),l("th",hp,p(r.$t("browse.actions")),1)])]),l("tbody",mp,[e.issues.length===0?(h(),b("tr",bp,[l("td",yp,p(r.$t("browse.empty")),1)])):N("",!0),(h(!0),b(re,null,Te(e.issues,i=>(h(),b("tr",{key:i.iid,class:"hover:bg-gray-50 transition-colors"},[l("td",vp,[l("a",{href:n(i.iid,e.systemStatus),target:"_blank",rel:"noopener",class:"text-blue-600 hover:text-blue-800 hover:underline inline-flex items-center"},[le(" #"+p(i.iid)+" ",1),o[8]||(o[8]=l("svg",{class:"w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[l("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,xp)]),l("td",wp,p(i.title),1),l("td",kp,[l("div",$p,[(h(!0),b(re,null,Te(i.labels,a=>(h(),b("span",{key:a,class:"label-tag bg-blue-100 text-blue-700"},p(a),1))),128))])]),l("td",Sp,p(i.author?.name||i.author?.username||"-"),1),l("td",_p,p(c(on)(i.created_at)),1),l("td",Cp,[e.trackedIids.has(i.iid)?(h(),b("span",Ip,p(r.$t("browse.tracked")),1)):(h(),b("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",i)},p(r.$t("browse.start")),9,Tp))])]))),128))])])]),e.total>e.perPage?(h(),b("div",Pp,[l("div",Rp,p(r.$t("browse.pagination",{total:e.total,page:e.page,totalPages:Math.ceil(e.total/e.perPage)})),1),l("div",Ap,[l("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]=i=>{s("update:page",e.page-1),s("search")})},p(r.$t("browse.prevPage")),9,Dp),l("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]=i=>{s("update:page",e.page+1),s("search")})},p(r.$t("browse.nextPage")),9,Ep)])])):N("",!0)]))]))}});function Fp(){const e=L("input"),t=L(null),s=L(!1),n=L(""),r=L(""),o=L(null),i=L(null),a=$e(()=>t.value?.currentSdd??""),u=$e(()=>t.value?.rounds??[]),g=$e(()=>t.value?.status??"idle"),d=$e(()=>{const $=u.value;return $.length>0?$[$.length-1].questions:""});async function f($){n.value="",s.value=!0;try{const v=await mc($);t.value=v.session,e.value="refine",await y()}catch(v){n.value=v.message}finally{s.value=!1}}async function y($){if(t.value){n.value="",s.value=!0,r.value="";try{const{fetchResponse:v,abort:C}=Vn(t.value.id,"auto-refine",$?{rounds:$}:void 0);i.value=C;const F=await v;if(!F.ok){const x=await F.json().catch(()=>({}));throw new Error(x.error||`HTTP ${F.status}`)}await _(F),await P()}catch(v){v.name!=="AbortError"&&(n.value=v.message)}finally{s.value=!1,i.value=null}}}async function w(){if(t.value){n.value="",s.value=!0,r.value="";try{const{fetchResponse:$,abort:v}=Vn(t.value.id,"review");i.value=v;const C=await $;if(!C.ok)throw new Error(`HTTP ${C.status}`);await _(C),await P()}catch($){$.name!=="AbortError"&&(n.value=$.message)}finally{s.value=!1,i.value=null}}}async function k(){if(t.value){n.value="",s.value=!0,r.value="";try{const{fetchResponse:$,abort:v}=Vn(t.value.id,"refine");i.value=v;const C=await $;if(!C.ok)throw new Error(`HTTP ${C.status}`);await _(C),await P()}catch($){$.name!=="AbortError"&&(n.value=$.message)}finally{s.value=!1,i.value=null}}}async function _($){const v=$.body?.getReader();if(!v)return;const C=new TextDecoder;let F="";for(;;){const{done:x,value:I}=await v.read();if(x)break;F+=C.decode(I,{stream:!0});const z=F.split(`
4
+ `);F=z.pop()??"";for(const K of z)if(K.startsWith("data: "))try{const O=JSON.parse(K.slice(6));R(O)}catch{}}}function R($){if($.type==="sdd:chunk"||$.type==="review:chunk"){const v=$.data;if(v?.content){const C=typeof v.content=="string"?v.content:JSON.stringify(v.content);r.value+=C+`
5
+ `}}if($.type==="sdd:complete"){const v=$.data;v?.sdd&&t.value&&(t.value.currentSdd=v.sdd)}if($.type==="review:complete"){const v=$.data;v&&t.value&&(t.value.rounds.find(F=>F.round===v.round)||t.value.rounds.push({round:v.round??t.value.rounds.length+1,questions:v.questions??"",refinedSdd:""}))}if($.type==="round:complete"){const v=$.data;if(v?.sdd&&t.value){t.value.currentSdd=v.sdd;const C=t.value.rounds.find(F=>F.round===v.round);C&&(C.refinedSdd=v.sdd)}r.value=""}if($.type==="round:start"&&(r.value=""),$.type==="error"){const v=$.data;n.value=v?.message??"Unknown error"}}async function P(){if(t.value)try{const $=await bc(t.value.id);t.value=$.session}catch{}}async function T($,v){if(t.value){n.value="",s.value=!0;try{const C=await yc(t.value.id,$,v);o.value=C.issue,e.value="complete"}catch(C){n.value=C.message}finally{s.value=!1}}}function q(){i.value?.()}function D(){t.value=null,e.value="input",s.value=!1,n.value="",r.value="",o.value=null,i.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:w,runSingleRefine:k,createIssue:T,abort:q,reset:D}}function Mp(){const e=L(!1),t=L(""),s=L(""),n=L(!1),r=L("");let o=null;const i=window.SpeechRecognition||window.webkitSpeechRecognition;n.value=!!i;function a(f="zh-CN"){if(!i){r.value="当前浏览器不支持语音识别,请使用 Chrome 或 Edge";return}r.value="",o=new i,o.continuous=!0,o.interimResults=!0,o.lang=f,o.onresult=y=>{let w="",k="";for(let _=y.resultIndex;_<y.results.length;_++){const R=y.results[_];R.isFinal?w+=R[0].transcript:k+=R[0].transcript}w&&(t.value+=w),s.value=k},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 Mt(()=>{o&&(o.abort(),o=null)}),{isRecording:e,transcript:t,interimText:s,isSupported:n,error:r,startRecording:a,stopRecording:u,toggleRecording:g,clearTranscript:d}}const jp={class:"space-y-4"},Op={class:"flex items-center gap-3"},Np={key:0,class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},Bp={key:1,class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},Up={key:1,class:"text-sm text-amber-600"},Vp={key:0,class:"flex items-center gap-2 text-sm text-red-500"},Hp={key:0,class:"text-gray-400 italic ml-2 truncate max-w-md"},zp={class:"block text-sm font-medium text-gray-700 mb-1"},qp=["placeholder"],Kp={key:1,class:"text-sm text-red-500"},Gp={class:"flex justify-end"},Wp=["disabled"],Jp=Ae({__name:"VoiceRecorder",emits:["submit"],setup(e,{emit:t}){const{t:s}=Jt(),n=t,{isRecording:r,transcript:o,interimText:i,isSupported:a,error:u,toggleRecording:g,clearTranscript:d}=Mp();function f(){const y=o.value.trim();y&&n("submit",y)}return(y,w)=>(h(),b("div",jp,[l("div",Op,[c(a)?(h(),b("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:w[0]||(w[0]=k=>c(g)())},[c(r)?(h(),b("svg",Bp,[...w[4]||(w[4]=[l("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"},null,-1)])])):(h(),b("svg",Np,[...w[3]||(w[3]=[l("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),l("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)])])),le(" "+p(c(r)?c(s)("brainstorm.stopRecording"):c(s)("brainstorm.startRecording")),1)],2)):N("",!0),c(a)?N("",!0):(h(),b("span",Up,p(c(s)("brainstorm.voiceNotSupported")),1)),c(o).trim()?(h(),b("button",{key:2,class:"text-sm text-gray-500 hover:text-gray-700 underline",onClick:w[1]||(w[1]=k=>c(d)())},p(c(s)("brainstorm.clear")),1)):N("",!0)]),c(r)?(h(),b("div",Vp,[w[5]||(w[5]=l("span",{class:"relative flex h-2.5 w-2.5"},[l("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-red-400 opacity-75"}),l("span",{class:"relative inline-flex rounded-full h-2.5 w-2.5 bg-red-500"})],-1)),le(" "+p(c(s)("brainstorm.recording"))+" ",1),c(i)?(h(),b("span",Hp,p(c(i)),1)):N("",!0)])):N("",!0),l("div",null,[l("label",zp,p(c(s)("brainstorm.transcriptLabel")),1),ie(l("textarea",{"onUpdate:modelValue":w[2]||(w[2]=k=>Re(o)?o.value=k: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,qp),[[fe,c(o)]])]),c(u)?(h(),b("div",Kp,p(c(u)),1)):N("",!0),l("div",Gp,[l("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,Wp)])]))}});function Tr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Zt=Tr();function ul(e){Zt=e}var qt={exec:()=>null};function pe(e,t=""){let s=typeof e=="string"?e:e.source,n={replace:(r,o)=>{let i=typeof o=="string"?o:o.source;return i=i.replace(Oe.caret,"$1"),s=s.replace(r,i),n},getRegex:()=>new RegExp(s,t)};return n}var Zp=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Oe={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)}}>`)},Qp=/^(?:[ \t]*(?:\n|$))+/,Yp=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Xp=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Fs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ef=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Pr=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,cl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,dl=pe(cl).replace(/bull/g,Pr).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(),tf=pe(cl).replace(/bull/g,Pr).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(),Rr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,sf=/^[^\n]+/,Ar=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,nf=pe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ar).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),rf=pe(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Pr).getRegex(),In="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",Dr=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,of=pe("^ {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",Dr).replace("tag",In).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pl=pe(Rr).replace("hr",Fs).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",In).getRegex(),lf=pe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",pl).getRegex(),Er={blockquote:lf,code:Yp,def:nf,fences:Xp,heading:ef,hr:Fs,html:of,lheading:dl,list:rf,newline:Qp,paragraph:pl,table:qt,text:sf},Vo=pe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Fs).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",In).getRegex(),af={...Er,lheading:tf,table:Vo,paragraph:pe(Rr).replace("hr",Fs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Vo).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",In).getRegex()},uf={...Er,html:pe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Dr).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:pe(Rr).replace("hr",Fs).replace("heading",` *#{1,6} *[^
6
+ ]`).replace("lheading",dl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},cf=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,df=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,fl=/^( {2,}|\\)\n(?!\s*$)/,pf=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Tn=/[\p{P}\p{S}]/u,Lr=/[\s\p{P}\p{S}]/u,gl=/[^\s\p{P}\p{S}]/u,ff=pe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Lr).getRegex(),hl=/(?!~)[\p{P}\p{S}]/u,gf=/(?!~)[\s\p{P}\p{S}]/u,hf=/(?:[^\s\p{P}\p{S}]|~)/u,ml=/(?![*_])[\p{P}\p{S}]/u,mf=/(?![*_])[\s\p{P}\p{S}]/u,bf=/(?:[^\s\p{P}\p{S}]|[*_])/u,yf=pe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Zp?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),bl=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,vf=pe(bl,"u").replace(/punct/g,Tn).getRegex(),xf=pe(bl,"u").replace(/punct/g,hl).getRegex(),yl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",wf=pe(yl,"gu").replace(/notPunctSpace/g,gl).replace(/punctSpace/g,Lr).replace(/punct/g,Tn).getRegex(),kf=pe(yl,"gu").replace(/notPunctSpace/g,hf).replace(/punctSpace/g,gf).replace(/punct/g,hl).getRegex(),$f=pe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,gl).replace(/punctSpace/g,Lr).replace(/punct/g,Tn).getRegex(),Sf=pe(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ml).getRegex(),_f="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Cf=pe(_f,"gu").replace(/notPunctSpace/g,bf).replace(/punctSpace/g,mf).replace(/punct/g,ml).getRegex(),If=pe(/\\(punct)/,"gu").replace(/punct/g,Tn).getRegex(),Tf=pe(/^<(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(),Pf=pe(Dr).replace("(?:-->|$)","-->").getRegex(),Rf=pe("^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",Pf).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ln=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Af=pe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ln).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),vl=pe(/^!?\[(label)\]\[(ref)\]/).replace("label",ln).replace("ref",Ar).getRegex(),xl=pe(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ar).getRegex(),Df=pe("reflink|nolink(?!\\()","g").replace("reflink",vl).replace("nolink",xl).getRegex(),Ho=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Fr={_backpedal:qt,anyPunctuation:If,autolink:Tf,blockSkip:yf,br:fl,code:df,del:qt,delLDelim:qt,delRDelim:qt,emStrongLDelim:vf,emStrongRDelimAst:wf,emStrongRDelimUnd:$f,escape:cf,link:Af,nolink:xl,punctuation:ff,reflink:vl,reflinkSearch:Df,tag:Rf,text:pf,url:qt},Ef={...Fr,link:pe(/^!?\[(label)\]\((.*?)\)/).replace("label",ln).getRegex(),reflink:pe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ln).getRegex()},ir={...Fr,emStrongRDelimAst:kf,emStrongLDelim:xf,delLDelim:Sf,delRDelim:Cf,url:pe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ho).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:pe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ho).getRegex()},Lf={...ir,br:pe(fl).replace("{2,}","*").getRegex(),text:pe(ir.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Us={normal:Er,gfm:af,pedantic:uf},ps={normal:Fr,gfm:ir,breaks:Lf,pedantic:Ef},Ff={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},zo=e=>Ff[e];function at(e,t){if(t){if(Oe.escapeTest.test(e))return e.replace(Oe.escapeReplace,zo)}else if(Oe.escapeTestNoEncode.test(e))return e.replace(Oe.escapeReplaceNoEncode,zo);return e}function qo(e){try{e=encodeURI(e).replace(Oe.percentDecode,"%")}catch{return null}return e}function Ko(e,t){let s=e.replace(Oe.findPipe,(o,i,a)=>{let u=!1,g=i;for(;--g>=0&&a[g]==="\\";)u=!u;return u?"|":" |"}),n=s.split(Oe.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(Oe.slashPipe,"|");return n}function fs(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 Mf(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 jf(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 Go(e,t,s,n,r){let o=t.href,i=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:i,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,u}function Of(e,t,s){let n=e.match(s.other.indentCodeCompensation);if(n===null)return t;let r=n[1];return t.split(`
7
+ `).map(o=>{let i=o.match(s.other.beginningSpace);if(i===null)return o;let[a]=i;return a.length>=r.length?o.slice(r.length):o}).join(`
8
+ `)}var an=class{options;rules;lexer;constructor(e){this.options=e||Zt}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:fs(s,`
9
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let s=t[0],n=Of(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=fs(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:fs(t[0],`
10
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let s=fs(t[0],`
11
+ `).split(`
12
+ `),n="",r="",o=[];for(;s.length>0;){let i=!1,a=[],u;for(u=0;u<s.length;u++)if(this.rules.other.blockquoteStart.test(s[u]))a.push(s[u]),i=!0;else if(!i)a.push(s[u]);else break;s=s.slice(u);let g=a.join(`
13
+ `),d=g.replace(this.rules.other.blockquoteSetextReplace,`
14
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
15
+ ${g}`:g,r=r?`${r}
16
+ ${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,o,!0),this.lexer.state.top=f,s.length===0)break;let y=o.at(-1);if(y?.type==="code")break;if(y?.type==="blockquote"){let w=y,k=w.raw+`
17
+ `+s.join(`
18
+ `),_=this.blockquote(k);o[o.length-1]=_,n=n.substring(0,n.length-w.raw.length)+_.raw,r=r.substring(0,r.length-w.text.length)+_.text;break}else if(y?.type==="list"){let w=y,k=w.raw+`
19
+ `+s.join(`
20
+ `),_=this.list(k);o[o.length-1]=_,n=n.substring(0,n.length-y.raw.length)+_.raw,r=r.substring(0,r.length-w.raw.length)+_.raw,s=k.substring(o.at(-1).raw.length).split(`
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),i=!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=jf(t[2].split(`
22
+ `,1)[0],t[1].length),y=e.split(`
23
+ `,1)[0],w=!f.trim(),k=0;if(this.options.pedantic?(k=2,d=f.trimStart()):w?k=t[1].length+1:(k=f.search(this.rules.other.nonSpaceChar),k=k>4?1:k,d=f.slice(k),k+=t[1].length),w&&this.rules.other.blankLine.test(y)&&(g+=y+`
24
+ `,e=e.substring(y.length+1),u=!0),!u){let _=this.rules.other.nextBulletRegex(k),R=this.rules.other.hrRegex(k),P=this.rules.other.fencesBeginRegex(k),T=this.rules.other.headingBeginRegex(k),q=this.rules.other.htmlBeginRegex(k),D=this.rules.other.blockquoteBeginRegex(k);for(;e;){let $=e.split(`
25
+ `,1)[0],v;if(y=$,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting," "),v=y):v=y.replace(this.rules.other.tabCharGlobal," "),P.test(y)||T.test(y)||q.test(y)||D.test(y)||_.test(y)||R.test(y))break;if(v.search(this.rules.other.nonSpaceChar)>=k||!y.trim())d+=`
26
+ `+v.slice(k);else{if(w||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||P.test(f)||T.test(f)||R.test(f))break;d+=`
27
+ `+y}w=!y.trim(),g+=$+`
28
+ `,e=e.substring($.length+1),f=v.slice(k)}}r.loose||(i?r.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(i=!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=Ko(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
29
+ `):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(s.length===n.length){for(let i of n)this.rules.other.tableAlignRight.test(i)?o.align.push("right"):this.rules.other.tableAlignCenter.test(i)?o.align.push("center"):this.rules.other.tableAlignLeft.test(i)?o.align.push("left"):o.align.push(null);for(let i=0;i<s.length;i++)o.header.push({text:s[i],tokens:this.lexer.inline(s[i]),header:!0,align:o.align[i]});for(let i of r)o.rows.push(Ko(i,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=fs(s.slice(0,-1),"\\");if((s.length-o.length)%2===0)return}else{let o=Mf(t[2],"()");if(o===-2)return;if(o>-1){let i=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,i).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)),Go(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 Go(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,i,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(i=[...o].length,n[3]||n[4]){a+=i;continue}else if((n[5]||n[6])&&r%3&&!((r+i)%3)){u+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+u);let d=[...n[0]][0].length,f=e.slice(0,r+n.index+d+i);if(Math.min(r,i)%2){let w=f.slice(1,-1);return{type:"em",raw:f,text:w,tokens:this.lexer.inlineTokens(w)}}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,i,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||(i=[...o].length,i!==r))continue;if(n[3]||n[4]){a+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a);let g=[...n[0]][0].length,d=e.slice(0,r+n.index+g+i),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}}}},Xe=class lr{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Zt,this.options.tokenizer=this.options.tokenizer||new an,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:Oe,block:Us.normal,inline:ps.normal};this.options.pedantic?(s.block=Us.pedantic,s.inline=ps.pedantic):this.options.gfm&&(s.block=Us.gfm,this.options.breaks?s.inline=ps.breaks:s.inline=ps.gfm),this.tokenizer.rules=s}static get rules(){return{block:Us,inline:ps}}static lex(t,s){return new lr(s).lex(t)}static lexInline(t,s){return new lr(s).inlineTokens(t)}lex(t){t=t.replace(Oe.carriageReturn,`
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(Oe.tabCharGlobal," ").replace(Oe.spaceLine,""));t;){let r;if(this.options.extensions?.block?.some(i=>(r=i.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 i=s.at(-1);r.raw.length===1&&i!==void 0?i.raw+=`
32
+ `:s.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);let i=s.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`
33
+ `)?"":`
34
+ `)+r.raw,i.text+=`
35
+ `+r.text,this.inlineQueue.at(-1).src=i.text):s.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length);let i=s.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`
36
+ `)?"":`
37
+ `)+r.raw,i.text+=`
38
+ `+r.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},s.push(r));continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),s.push(r);continue}let o=t;if(this.options.extensions?.startBlock){let i=1/0,a=t.slice(1),u;this.options.extensions.startBlock.forEach(g=>{u=g.call({lexer:this},a),typeof u=="number"&&u>=0&&(i=Math.min(i,u))}),i<1/0&&i>=0&&(o=t.substring(0,i+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){let i=s.at(-1);n&&i?.type==="paragraph"?(i.raw+=(i.raw.endsWith(`
39
+ `)?"":`
40
+ `)+r.raw,i.text+=`
41
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.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 i=s.at(-1);i?.type==="text"?(i.raw+=(i.raw.endsWith(`
42
+ `)?"":`
43
+ `)+r.raw,i.text+=`
44
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):s.push(r);continue}if(t){let i="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}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 i=!1,a="";for(;t;){i||(a=""),i=!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(w=>{y=w.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)),i=!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}},un=class{options;parser;constructor(e){this.options=e||Zt}space(e){return""}code({text:e,lang:t,escaped:s}){let n=(t||"").match(Oe.notSpaceStart)?.[0],r=e.replace(Oe.endingNewline,"")+`
45
+ `;return n?'<pre><code class="language-'+at(n)+'">'+(s?r:at(r,!0))+`</code></pre>
46
+ `:"<pre><code>"+(s?r:at(r,!0))+`</code></pre>
47
+ `}blockquote({tokens:e}){return`<blockquote>
48
+ ${this.parser.parse(e)}</blockquote>
49
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
50
+ `}hr(e){return`<hr>
51
+ `}list(e){let t=e.ordered,s=e.start,n="";for(let i=0;i<e.items.length;i++){let a=e.items[i];n+=this.listitem(a)}let r=t?"ol":"ul",o=t&&s!==1?' start="'+s+'"':"";return"<"+r+o+`>
52
+ `+n+"</"+r+`>
53
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
54
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
55
+ `}table(e){let t="",s="";for(let r=0;r<e.header.length;r++)s+=this.tablecell(e.header[r]);t+=this.tablerow({text:s});let n="";for(let r=0;r<e.rows.length;r++){let o=e.rows[r];s="";for(let i=0;i<o.length;i++)s+=this.tablecell(o[i]);n+=this.tablerow({text:s})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
56
+ <thead>
57
+ `+t+`</thead>
58
+ `+n+`</table>
59
+ `}tablerow({text:e}){return`<tr>
60
+ ${e}</tr>
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>${at(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=qo(e);if(r===null)return n;e=r;let o='<a href="'+e+'"';return t&&(o+=' title="'+at(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=qo(e);if(r===null)return at(s);e=r;let o=`<img src="${e}" alt="${at(s)}"`;return t&&(o+=` title="${at(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:at(e.text)}},Mr=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}},et=class ar{options;renderer;textRenderer;constructor(t){this.options=t||Zt,this.options.renderer=this.options.renderer||new un,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Mr}static parse(t,s){return new ar(s).parse(t)}static parseInline(t,s){return new ar(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 i=r,a=this.options.extensions.renderers[i.type].call({parser:this},i);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(i.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 i='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}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 i=o;switch(i.type){case"escape":{n+=s.text(i);break}case"html":{n+=s.html(i);break}case"link":{n+=s.link(i);break}case"image":{n+=s.image(i);break}case"checkbox":{n+=s.checkbox(i);break}case"strong":{n+=s.strong(i);break}case"em":{n+=s.em(i);break}case"codespan":{n+=s.codespan(i);break}case"br":{n+=s.br(i);break}case"del":{n+=s.del(i);break}case"text":{n+=s.text(i);break}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}},hs=class{options;block;constructor(e){this.options=e||Zt}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?Xe.lex:Xe.lexInline}provideParser(){return this.block?et.parse:et.parseInline}},Nf=class{defaults=Tr();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=et;Renderer=un;TextRenderer=Mr;Lexer=Xe;Tokenizer=an;Hooks=hs;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 i of o)s=s.concat(this.walkTokens(i.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 i=r[o].flat(1/0);s=s.concat(this.walkTokens(i,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(...i){let a=r.renderer.apply(this,i);return a===!1&&(a=o.apply(this,i)),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 un(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 i=o,a=s.renderer[i],u=r[i];r[i]=(...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 an(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 i=o,a=s.tokenizer[i],u=r[i];r[i]=(...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 hs;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 i=o,a=s.hooks[i],u=r[i];hs.passThroughHooks.has(o)?r[i]=g=>{if(this.defaults.async&&hs.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[i]=(...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(i){let a=[];return a.push(o.call(this,i)),r&&(a=a.concat(r.call(this,i))),a}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Xe.lex(e,t??this.defaults)}parser(e,t){return et.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 i=r.hooks?await r.hooks.preprocess(t):t,a=await(r.hooks?await r.hooks.provideLexer():e?Xe.lex:Xe.lexInline)(i,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?et.parse:et.parseInline)(u,r);return r.hooks?await r.hooks.postprocess(g):g})().catch(o);try{r.hooks&&(t=r.hooks.preprocess(t));let i=(r.hooks?r.hooks.provideLexer():e?Xe.lex:Xe.lexInline)(t,r);r.hooks&&(i=r.hooks.processAllTokens(i)),r.walkTokens&&this.walkTokens(i,r.walkTokens);let a=(r.hooks?r.hooks.provideParser():e?et.parse:et.parseInline)(i,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(i){return o(i)}}}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>"+at(s.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(s);throw s}}},Wt=new Nf;function be(e,t){return Wt.parse(e,t)}be.options=be.setOptions=function(e){return Wt.setOptions(e),be.defaults=Wt.defaults,ul(be.defaults),be};be.getDefaults=Tr;be.defaults=Zt;be.use=function(...e){return Wt.use(...e),be.defaults=Wt.defaults,ul(be.defaults),be};be.walkTokens=function(e,t){return Wt.walkTokens(e,t)};be.parseInline=Wt.parseInline;be.Parser=et;be.parser=et.parse;be.Renderer=un;be.TextRenderer=Mr;be.Lexer=Xe;be.lexer=Xe.lex;be.Tokenizer=an;be.Hooks=hs;be.parse=be;be.options;be.setOptions;be.use;be.walkTokens;be.parseInline;et.parse;Xe.lex;const Bf={class:"space-y-4"},Uf={class:"flex items-center justify-between"},Vf={class:"flex items-center gap-3"},Hf={class:"text-sm font-medium text-gray-700"},zf={key:0,class:"inline-flex items-center gap-1.5 text-sm text-amber-600"},qf={class:"flex gap-2"},Kf={class:"grid grid-cols-1 lg:grid-cols-5 gap-4"},Gf={class:"lg:col-span-3 border border-gray-200 rounded-lg overflow-hidden"},Wf={class:"bg-gray-50 px-4 py-2 border-b border-gray-200"},Jf={class:"text-sm font-medium text-gray-700"},Zf={class:"p-4 max-h-[600px] overflow-y-auto"},Qf=["innerHTML"],Yf={key:1,class:"text-sm text-gray-600 whitespace-pre-wrap font-mono"},Xf={key:2,class:"text-sm text-gray-400 italic"},eg={class:"lg:col-span-2 border border-gray-200 rounded-lg overflow-hidden"},tg={class:"bg-gray-50 px-4 py-2 border-b border-gray-200"},sg={class:"text-sm font-medium text-gray-700"},ng={class:"p-4 max-h-[600px] overflow-y-auto"},rg=["innerHTML"],og={key:1,class:"text-sm text-gray-600 whitespace-pre-wrap font-mono"},ig={key:2,class:"text-sm text-gray-400 italic"},lg={key:0},ag={class:"group"},ug={class:"cursor-pointer text-sm text-gray-500 hover:text-gray-700"},cg={class:"mt-2 space-y-2"},dg={class:"text-xs font-medium text-gray-500 mb-1"},pg={class:"text-xs text-gray-600 line-clamp-3"},fg=Ae({__name:"SddViewer",props:{sdd:{},rounds:{},streamOutput:{},loading:{type:Boolean},status:{}},emits:["runReview","runRefine","runAutoRefine","abort","finish"],setup(e,{emit:t}){const{t:s}=Jt(),n=e,r=t,o=$e(()=>n.sdd?be(n.sdd):""),i=$e(()=>{const u=n.rounds;return u.length>0?u[u.length-1].questions:""}),a=$e(()=>i.value?be(i.value):"");return(u,g)=>(h(),b("div",Bf,[l("div",Uf,[l("div",Vf,[l("span",Hf,p(c(s)("brainstorm.roundCount",{count:e.rounds.length})),1),e.loading?(h(),b("span",zf,[g[4]||(g[4]=l("svg",{class:"animate-spin h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24"},[l("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),l("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),le(" "+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)])):N("",!0)]),l("div",qf,[e.loading?(h(),b("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)):N("",!0),!e.loading&&e.sdd&&e.status!=="done"?(h(),b("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)):N("",!0),!e.loading&&e.rounds.length>0&&i.value&&!e.rounds[e.rounds.length-1].refinedSdd?(h(),b("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)):N("",!0),!e.loading&&e.sdd?(h(),b("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)):N("",!0)])]),l("div",Kf,[l("div",Gf,[l("div",Wf,[l("h3",Jf,p(c(s)("brainstorm.sddTitle")),1)]),l("div",Zf,[o.value?(h(),b("div",{key:0,class:"prose prose-sm max-w-none",innerHTML:o.value},null,8,Qf)):e.loading&&e.streamOutput?(h(),b("div",Yf,p(e.streamOutput),1)):(h(),b("div",Xf,p(c(s)("brainstorm.sddEmpty")),1))])]),l("div",eg,[l("div",tg,[l("h3",sg,p(c(s)("brainstorm.questionsTitle")),1)]),l("div",ng,[a.value?(h(),b("div",{key:0,class:"prose prose-sm max-w-none",innerHTML:a.value},null,8,rg)):e.loading&&e.status==="reviewing"&&e.streamOutput?(h(),b("div",og,p(e.streamOutput),1)):(h(),b("div",ig,p(c(s)("brainstorm.questionsEmpty")),1))])])]),e.rounds.length>1?(h(),b("div",lg,[l("details",ag,[l("summary",ug,p(c(s)("brainstorm.roundHistory")),1),l("div",cg,[(h(!0),b(re,null,Te(e.rounds,d=>(h(),b("div",{key:d.round,class:"border border-gray-100 rounded-lg p-3"},[l("div",dg,p(c(s)("brainstorm.roundLabel",{n:d.round})),1),l("div",pg,p(d.questions.slice(0,200))+p(d.questions.length>200?"...":""),1)]))),128))])])])):N("",!0)]))}}),gg={class:"space-y-6"},hg={class:"flex items-center gap-2 text-sm"},mg={key:0},bg={key:1},yg={key:2,class:"space-y-4"},vg={class:"block text-sm font-medium text-gray-700 mb-1"},xg=["placeholder"],wg={class:"flex items-center gap-2"},kg={for:"auto-finish-label",class:"text-sm text-gray-700"},$g={class:"border border-gray-200 rounded-lg overflow-hidden"},Sg={class:"bg-gray-50 px-4 py-2 border-b border-gray-200 flex items-center justify-between"},_g={class:"text-sm font-medium text-gray-700"},Cg={class:"p-4 max-h-96 overflow-y-auto"},Ig={class:"text-xs text-gray-700 whitespace-pre-wrap"},Tg={class:"flex justify-end gap-3"},Pg=["disabled"],Rg=["disabled"],Ag={key:1,class:"bg-green-50 border border-green-200 rounded-lg p-6 text-center"},Dg={class:"text-lg font-medium text-green-800 mb-1"},Eg={class:"text-sm text-green-600"},Lg={class:"mt-4"},Fg={key:3,class:"bg-red-50 border border-red-200 rounded-lg p-3 text-sm text-red-700"},Mg=Ae({__name:"BrainstormPanel",setup(e){const{t}=Jt(),{step:s,loading:n,error:r,streamOutput:o,createdIssue:i,currentSdd:a,rounds:u,status:g,startSession:d,runSingleReview:f,runSingleRefine:y,runAutoRefine:w,createIssue:k,abort:_,reset:R}=Fp(),P=L(""),T=L(!0);function q(C){d(C)}function D(){s.value="complete"}async function $(C){await k(P.value,C?!0:T.value)}function v(){R(),P.value="",T.value=!0}return(C,F)=>(h(),b("div",gg,[l("div",hg,[l("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),l("span",{class:te(c(s)==="input"?"text-gray-800 font-medium":"text-gray-400")},p(c(t)("brainstorm.step1")),3),F[6]||(F[6]=l("svg",{class:"w-4 h-4 text-gray-300",fill:"currentColor",viewBox:"0 0 20 20"},[l("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)),l("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),l("span",{class:te(c(s)==="refine"?"text-gray-800 font-medium":"text-gray-400")},p(c(t)("brainstorm.step2")),3),F[7]||(F[7]=l("svg",{class:"w-4 h-4 text-gray-300",fill:"currentColor",viewBox:"0 0 20 20"},[l("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)),l("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),l("span",{class:te(c(s)==="complete"?"text-gray-800 font-medium":"text-gray-400")},p(c(t)("brainstorm.step3")),3)]),c(s)==="input"?(h(),b("div",mg,[ke(Jp,{onSubmit:q})])):N("",!0),c(s)==="refine"?(h(),b("div",bg,[ke(fg,{sdd:c(a),rounds:c(u),"stream-output":c(o),loading:c(n),status:c(g),onRunReview:c(f),onRunRefine:c(y),onRunAutoRefine:F[0]||(F[0]=x=>c(w)()),onAbort:c(_),onFinish:D},null,8,["sdd","rounds","stream-output","loading","status","onRunReview","onRunRefine","onAbort"])])):N("",!0),c(s)==="complete"?(h(),b("div",yg,[c(i)?(h(),b("div",Ag,[F[8]||(F[8]=l("svg",{class:"w-12 h-12 mx-auto text-green-500 mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[l("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)),l("h3",Dg,p(c(t)("brainstorm.issueCreated")),1),l("p",Eg," Issue #"+p(c(i).iid)+" — "+p(c(i).title),1),l("div",Lg,[l("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(),b(re,{key:0},[l("div",null,[l("label",vg,p(c(t)("brainstorm.issueTitleLabel")),1),ie(l("input",{"onUpdate:modelValue":F[1]||(F[1]=x=>P.value=x),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,xg),[[fe,P.value]])]),l("div",wg,[ie(l("input",{id:"auto-finish-label","onUpdate:modelValue":F[2]||(F[2]=x=>T.value=x),type:"checkbox",class:"rounded"},null,512),[[rn,T.value]]),l("label",kg,p(c(t)("brainstorm.addAutoFinishLabel")),1)]),l("div",$g,[l("div",Sg,[l("h3",_g,p(c(t)("brainstorm.sddPreview")),1),l("button",{class:"text-sm text-gray-500 hover:text-gray-700",onClick:F[3]||(F[3]=x=>s.value="refine")},p(c(t)("brainstorm.backToRefine")),1)]),l("div",Cg,[l("pre",Ig,p(c(a)),1)])]),l("div",Tg,[l("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:F[4]||(F[4]=x=>$(!1))},p(c(t)("brainstorm.createIssueOnly")),9,Pg),l("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:F[5]||(F[5]=x=>$(!0))},p(c(n)?c(t)("brainstorm.creating"):c(t)("brainstorm.createAndStart")),9,Rg)])],64))])):N("",!0),c(r)?(h(),b("div",Fg,p(c(r)),1)):N("",!0)]))}});function jg(){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 Og(){const e=L([]),t=L(null),s=L(!1),n=L(""),r=L(""),o=L(""),i=L(null),a=$e(()=>t.value?.messages??[]),u=$e(()=>t.value?.status??"idle"),g=$e(()=>u.value==="thinking"||s.value);async function d(){try{const D=await xc();e.value=D.sessions}catch(D){n.value=D.message}}async function f(D){n.value="";try{const $=await vc(D);return t.value=$.session,e.value.unshift($.session),$.session}catch($){return n.value=$.message,null}}async function y(D){n.value="";try{const $=await Eo(D);t.value=$.session}catch($){n.value=$.message}}async function w(D){n.value="";try{await wc(D),e.value=e.value.filter($=>$.id!==D),t.value?.id===D&&(t.value=null)}catch($){n.value=$.message}}async function k(D){if(D.trim()&&!(!t.value&&!await f())){n.value="",s.value=!0,r.value="",o.value="";try{const $={id:jg(),role:"user",content:D.trim(),timestamp:new Date().toISOString()};t.value.messages.push($);const{fetchResponse:v,abort:C}=kc(t.value.id,D.trim());i.value=C;const F=await v;if(!F.ok){const x=await F.json().catch(()=>({}));throw new Error(x.error||`HTTP ${F.status}`)}await _(F),await P()}catch($){$.name!=="AbortError"&&(n.value=$.message)}finally{s.value=!1,i.value=null}}}async function _(D){const $=D.body?.getReader();if(!$)return;const v=new TextDecoder;let C="";for(;;){const{done:F,value:x}=await $.read();if(F)break;C+=v.decode(x,{stream:!0});const I=C.split(`
64
+ `);C=I.pop()??"";for(const z of I)if(z.startsWith("data: "))try{const K=JSON.parse(z.slice(6));R(K)}catch{}}}function R(D){if(D.type==="message:thinking"){o.value="chat.thinking.connecting";return}if(D.type==="message:chunk"){const $=D.data;if(!$?.content)return;const v=$.content;if(v.type==="system"){o.value="chat.thinking.connected";return}if($.type==="stderr"){o.value="chat.thinking.processing";return}if(v.type==="assistant"){o.value="";const C=v.message;if(C?.content)for(const F of C.content)F.type==="text"&&F.text&&(r.value+=F.text);return}if(v.type==="result")return;if($.type==="partial"){typeof $.content=="string"&&(o.value="",r.value+=$.content);return}typeof $.content=="string"&&(o.value="",r.value+=$.content)}if(D.type==="message:complete"){const $=D.data;$?.message&&t.value&&($.message.content.startsWith("AI runner 未返回结果")&&r.value.trim()&&($.message.content=r.value),t.value.messages.find(C=>C.id===$.message.id)||t.value.messages.push($.message)),r.value="",o.value=""}if(D.type==="error"){const $=D.data;n.value=$?.message??"Unknown error",o.value=""}}async function P(){if(t.value)try{const D=await Eo(t.value.id);t.value=D.session;const $=e.value.findIndex(v=>v.id===D.session.id);$>=0&&(e.value[$]=D.session)}catch{}}function T(){i.value?.()}function q(){t.value=null,s.value=!1,n.value="",r.value="",o.value="",i.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:w,sendMessage:k,abort:T,reset:q}}const Ng={class:"flex h-[calc(100vh-220px)] min-h-[500px] bg-white rounded-lg border border-gray-200 overflow-hidden"},Bg={class:"p-3 border-b border-gray-200 flex items-center justify-between"},Ug=["title"],Vg={class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Hg={key:0,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 5l7 7-7 7M5 5l7 7-7 7"},zg={key:1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 19l-7-7 7-7m8 14l-7-7 7-7"},qg={key:0,class:"flex-1 overflow-y-auto"},Kg=["onClick"],Gg={class:"flex items-center justify-between"},Wg={class:"text-sm text-gray-800 truncate flex-1"},Jg=["onClick","title"],Zg={class:"text-xs text-gray-400 mt-0.5"},Qg={key:0,class:"p-4 text-center text-sm text-gray-400"},Yg={class:"flex-1 flex flex-col"},Xg={key:0,class:"flex flex-col items-center justify-center h-full text-gray-400"},eh={class:"text-lg font-medium mb-2"},th={class:"text-sm"},sh={class:"text-sm whitespace-pre-wrap break-words"},nh={key:0,class:"flex justify-start"},rh={class:"max-w-[75%] rounded-lg px-4 py-2.5 bg-gray-100 text-gray-800"},oh={class:"text-sm whitespace-pre-wrap break-words"},ih={class:"flex items-center mt-1"},lh={class:"text-xs text-gray-400"},ah={key:1,class:"flex justify-start"},uh={class:"rounded-lg px-4 py-2.5 bg-gray-100"},ch={class:"flex items-center space-x-1"},dh={key:0,class:"text-xs text-gray-500 ml-1"},ph={key:0,class:"px-4 py-2 bg-red-50 border-t border-red-200"},fh={class:"text-sm text-red-600"},gh={class:"border-t border-gray-200 p-4"},hh={class:"flex items-end space-x-2"},mh=["placeholder","disabled"],bh=["disabled"],yh=Ae({__name:"ChatPanel",setup(e){const{t}=Jt(),{sessions:s,currentSession:n,messages:r,error:o,streamingContent:i,thinkingStatus:a,isThinking:u,loadSessions:g,createSession:d,selectSession:f,deleteSession:y,sendMessage:w,abort:k}=Og(),_=L(""),R=L(null),P=L(!1);Pt(()=>{g()});function T(){vn(()=>{R.value&&(R.value.scrollTop=R.value.scrollHeight)})}ft(r,T,{deep:!0}),ft(i,T);async function q(){const x=_.value.trim();!x||u.value||(_.value="",await w(x))}function D(x){x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),q())}async function $(){await d()}async function v(x){await f(x)}async function C(x,I){I.stopPropagation(),await y(x)}function F(x){return new Date(x).toLocaleTimeString()}return(x,I)=>(h(),b("div",Ng,[l("div",{class:te(["border-r border-gray-200 flex flex-col bg-gray-50 transition-all",P.value?"w-12":"w-64"])},[l("div",Bg,[P.value?N("",!0):(h(),b("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:$},p(c(t)("chat.newChat")),1)),l("button",{class:"p-1 text-gray-500 hover:text-gray-700",onClick:I[0]||(I[0]=z=>P.value=!P.value),title:P.value?c(t)("chat.expandSidebar"):c(t)("chat.collapseSidebar")},[(h(),b("svg",Vg,[P.value?(h(),b("path",Hg)):(h(),b("path",zg))]))],8,Ug)]),P.value?N("",!0):(h(),b("div",qg,[(h(!0),b(re,null,Te(c(s),z=>(h(),b("div",{key:z.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===z.id}]),onClick:K=>v(z.id)},[l("div",Gg,[l("span",Wg,p(z.title),1),l("button",{class:"opacity-0 group-hover:opacity-100 p-0.5 text-gray-400 hover:text-red-500 transition-all",onClick:K=>C(z.id,K),title:c(t)("chat.deleteSession")},[...I[3]||(I[3]=[l("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,Jg)]),l("div",Zg,p(z.messages.length)+" "+p(c(t)("chat.messagesCount")),1)],10,Kg))),128)),c(s).length===0?(h(),b("div",Qg,p(c(t)("chat.noSessions")),1)):N("",!0)]))],2),l("div",Yg,[l("div",{ref_key:"messagesContainer",ref:R,class:"flex-1 overflow-y-auto px-4 py-4 space-y-4"},[c(n)?N("",!0):(h(),b("div",Xg,[I[4]||(I[4]=l("svg",{class:"w-16 h-16 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[l("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)),l("p",eh,p(c(t)("chat.welcome")),1),l("p",th,p(c(t)("chat.welcomeHint")),1)])),c(n)?(h(),b(re,{key:1},[(h(!0),b(re,null,Te(c(r),z=>(h(),b("div",{key:z.id,class:te(["flex",z.role==="user"?"justify-end":"justify-start"])},[l("div",{class:te(["max-w-[75%] rounded-lg px-4 py-2.5",z.role==="user"?"bg-gray-800 text-white":"bg-gray-100 text-gray-800"])},[l("div",sh,p(z.content),1),l("div",{class:te(["text-xs mt-1 opacity-60",z.role==="user"?"text-gray-300":"text-gray-400"])},p(F(z.timestamp)),3)],2)],2))),128)),c(i)?(h(),b("div",nh,[l("div",rh,[l("div",oh,p(c(i)),1),l("div",ih,[I[5]||(I[5]=l("span",{class:"inline-block w-2 h-2 bg-blue-500 rounded-full animate-pulse mr-1"},null,-1)),l("span",lh,p(c(t)("chat.streaming")),1)])])])):N("",!0),c(u)&&!c(i)?(h(),b("div",ah,[l("div",uh,[l("div",ch,[I[6]||(I[6]=l("span",{class:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{"animation-delay":"0ms"}},null,-1)),I[7]||(I[7]=l("span",{class:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{"animation-delay":"150ms"}},null,-1)),I[8]||(I[8]=l("span",{class:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{"animation-delay":"300ms"}},null,-1)),c(a)?(h(),b("span",dh,p(c(t)(c(a))),1)):N("",!0)])])])):N("",!0)],64)):N("",!0)],512),c(o)?(h(),b("div",ph,[l("p",fh,p(c(o)),1)])):N("",!0),l("div",gh,[l("div",hh,[ie(l("textarea",{"onUpdate:modelValue":I[1]||(I[1]=z=>_.value=z),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:D},null,40,mh),[[fe,_.value]]),c(u)?(h(),b("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:I[2]||(I[2]=(...z)=>c(k)&&c(k)(...z))},p(c(t)("chat.stop")),1)):(h(),b("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:!_.value.trim(),onClick:q},p(c(t)("chat.send")),9,bh))])])])]))}});function vh(){const e=L([]),t=L(null),s=L(null),n=L(!1),r=L(""),o=L(!1),i=L(""),a=L(null),u=L(!1);let g;const d=L("all"),f=L(""),y=$e(()=>{let x=e.value;return d.value!=="all"&&(x=x.filter(I=>I.type===d.value)),x});async function w(){n.value=!0,r.value="";try{const x=f.value.trim()||void 0,I=d.value==="all"?void 0:d.value,z=await $c({q:x,type:I});e.value=z.entries}catch(x){r.value=x.message}finally{n.value=!1}}async function k(x){n.value=!0,r.value="";try{const I=await Sc(x);t.value=I.entry}catch(I){r.value=I.message}finally{n.value=!1}}async function _(x){n.value=!0,r.value="";try{await _c(x),await w(),await F()}catch(I){r.value=I.message}finally{n.value=!1}}async function R(x,I){n.value=!0,r.value="";try{const z=await Cc(x,I);t.value=z.entry,await w()}catch(z){r.value=z.message}finally{n.value=!1}}async function P(x){n.value=!0,r.value="";try{await Ic(x),t.value?.id===x&&(t.value=null),await w(),await F()}catch(I){r.value=I.message}finally{n.value=!1}}function T(){g&&(clearInterval(g),g=void 0)}function q(x){T();const I=new Date(x).getTime();g=setInterval(()=>{a.value&&(a.value={...a.value,elapsed:Date.now()-I})},1e3)}async function D(x=!0){o.value=!0,i.value="",a.value=null,r.value="";try{const K=(await fetch(x?"/api/knowledge/analyze-incremental":"/api/knowledge/analyze",{method:"POST"})).body?.getReader();if(!K)return;const O=new TextDecoder;let M="",E=!1;for(;;){const{done:ae,value:ue}=await K.read();if(ae)break;M+=O.decode(ue,{stream:!0});const ne=M.split(`
65
+ `);M=ne.pop()||"";for(const ze of ne)if(ze.startsWith("data: "))try{const Ce=JSON.parse(ze.slice(6));if(i.value=Ce.message||Ce.step,Ce.step==="error"){r.value=Ce.error;continue}Ce.current!=null&&Ce.total!=null&&(a.value={current:Ce.current,total:Ce.total,step:Ce.step,startedAt:Ce.startedAt||new Date().toISOString(),elapsed:Ce.elapsed??(a.value?.elapsed||0)},!E&&Ce.startedAt&&(q(Ce.startedAt),E=!0))}catch{}}await w(),await F()}catch(I){r.value=I.message}finally{T(),o.value=!1,a.value=null}}Mt(T);async function $(x){u.value=!0,r.value="";try{await Tc(x),await w(),await F()}catch(I){r.value=I.message}finally{u.value=!1}}async function v(x,I){u.value=!0,r.value="";try{await Pc(x,I),await w(),await F()}catch(z){r.value=z.message}finally{u.value=!1}}async function C(x){n.value=!0,r.value="";try{await Rc(x),await k(x),await w()}catch(I){r.value=I.message}finally{n.value=!1}}async function F(){try{const x=await Ac();s.value=x.stats}catch{}}return{entries:e,currentEntry:t,stats:s,loading:n,error:r,analyzing:o,analyzeMessage:i,analyzeProgress:a,importing:u,filterType:d,searchQuery:f,filteredEntries:y,loadEntries:w,loadEntry:k,createEntry:_,updateEntry:R,deleteEntry:P,runAnalysis:D,importIwiki:$,extractFromGongfeng:v,syncEntry:C,loadStats:F}}const xh={class:"space-y-4"},wh={key:0,class:"bg-red-50 border border-red-200 text-red-700 px-4 py-2 rounded text-sm"},kh={class:"flex flex-wrap items-center gap-2"},$h=["disabled"],Sh=["disabled"],_h={class:"ml-auto flex items-center gap-2"},Ch={key:1,class:"bg-white border border-blue-200 rounded-lg p-4 space-y-3"},Ih={class:"flex items-center justify-between text-sm"},Th={class:"flex items-center gap-2"},Ph={class:"font-medium text-gray-700"},Rh={key:0,class:"text-gray-500 tabular-nums"},Ah={key:0,class:"w-full bg-gray-200 rounded-full h-2 overflow-hidden"},Dh={key:1,class:"w-full bg-gray-200 rounded-full h-2 overflow-hidden"},Eh={key:2,class:"grid grid-cols-5 gap-3"},Lh={class:"bg-white border rounded p-3 text-center"},Fh={class:"text-2xl font-bold text-gray-800"},Mh={class:"bg-blue-50 border rounded p-3 text-center"},jh={class:"text-2xl font-bold text-blue-700"},Oh={class:"bg-gray-50 border rounded p-3 text-center"},Nh={class:"text-2xl font-bold text-gray-700"},Bh={class:"bg-green-50 border rounded p-3 text-center"},Uh={class:"text-2xl font-bold text-green-700"},Vh={class:"bg-orange-50 border rounded p-3 text-center"},Hh={class:"text-2xl font-bold text-orange-700"},zh={class:"bg-white border rounded divide-y"},qh={key:0,class:"p-8 text-center text-gray-400"},Kh={key:1,class:"p-8 text-center text-gray-400"},Gh=["onClick"],Wh={class:"flex-1 min-w-0"},Jh={class:"flex items-center gap-2"},Zh={class:"font-medium text-sm text-gray-800 truncate"},Qh={class:"flex items-center gap-2 mt-1"},Yh={key:0,class:"text-xs text-blue-500 truncate max-w-[200px]"},Xh={class:"text-xs text-gray-400 whitespace-nowrap"},e0=["onClick"],t0=["onClick"],s0={class:"bg-white rounded-lg shadow-xl w-full max-w-3xl max-h-[85vh] flex flex-col"},n0={class:"flex items-center justify-between px-6 py-4 border-b"},r0={class:"flex items-center gap-2"},o0={class:"text-lg font-semibold"},i0={class:"flex items-center gap-2"},l0={class:"flex-1 overflow-auto p-6"},a0={key:0,class:"space-y-3"},u0={class:"flex gap-2 justify-end"},c0={key:0,class:"flex gap-1 mb-3"},d0={key:1,class:"text-xs text-gray-400 mb-3"},p0=["href"],f0={class:"prose prose-sm max-w-none whitespace-pre-wrap text-sm text-gray-700 font-mono bg-gray-50 p-4 rounded border"},g0={class:"bg-white rounded-lg shadow-xl w-full max-w-lg p-6 space-y-4"},h0={class:"flex gap-2 justify-end"},m0=["disabled"],b0={class:"bg-white rounded-lg shadow-xl w-full max-w-lg p-6 space-y-4"},y0={class:"flex gap-2 justify-end"},v0=["disabled"],x0={class:"bg-white rounded-lg shadow-xl w-full max-w-lg p-6 space-y-4"},w0={class:"flex gap-3"},k0={class:"flex items-center gap-1 text-sm"},$0={class:"flex items-center gap-1 text-sm"},S0={class:"flex gap-2 justify-end"},_0=["disabled"],C0=Ae({__name:"KnowledgePanel",setup(e){const{entries:t,currentEntry:s,stats:n,loading:r,error:o,analyzing:i,analyzeMessage:a,analyzeProgress:u,importing:g,filterType:d,searchQuery:f,filteredEntries:y,loadEntries:w,loadEntry:k,createEntry:_,updateEntry:R,deleteEntry:P,runAnalysis:T,importIwiki:q,extractFromGongfeng:D,syncEntry:$,loadStats:v}=vh(),C={collecting:"收集项目信息",analyzing:"AI 分析中",saving:"保存分析结果",done:"分析完成",no_changes:"无变更"};function F(Ie){const j=Math.floor(Ie/1e3),Q=Math.floor(j/60),m=j%60;return`${String(Q).padStart(2,"0")}:${String(m).padStart(2,"0")}`}const x=L(!1),I=L(!1),z=L(!1),K=L(!1),O=L(!1),M=L({title:"",content:"",tags:""}),E=L(""),ae=L("issue"),ue=L(""),ne=L({title:"",content:"",tags:""});Pt(()=>{w(),v()}),ft([d,f],()=>{w()});function ze(Ie){return{"project-meta":"项目分析",custom:"自定义",iwiki:"iwiki",gongfeng:"工蜂"}[Ie]||Ie}function Ce(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 ht(Ie){k(Ie.id),O.value=!1,K.value=!0}function Ge(){s.value&&(ne.value={title:s.value.title,content:s.value.content,tags:s.value.tags.join(", ")},O.value=!0)}async function Ms(){s.value&&(await R(s.value.id,{title:ne.value.title,content:ne.value.content,tags:ne.value.tags.split(",").map(Ie=>Ie.trim()).filter(Boolean)}),O.value=!1)}async function Pn(){await _({title:M.value.title,content:M.value.content,tags:M.value.tags.split(",").map(Ie=>Ie.trim()).filter(Boolean)}),x.value=!1,M.value={title:"",content:"",tags:""}}async function Rn(){await q(E.value),I.value=!1,E.value=""}async function jt(){await D(ae.value,parseInt(ue.value)),z.value=!1,ue.value=""}function Qt(Ie){confirm('确定要删除"'+Ie.title+'"吗?')&&P(Ie.id)}function ls(Ie){return new Date(Ie).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}return(Ie,j)=>(h(),b("div",xh,[c(o)?(h(),b("div",wh,p(c(o)),1)):N("",!0),l("div",kh,[l("button",{class:"px-3 py-1.5 text-sm bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50",disabled:c(i),onClick:j[0]||(j[0]=Q=>c(T)(!0))},"增量分析",8,$h),l("button",{class:"px-3 py-1.5 text-sm bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",disabled:c(i),onClick:j[1]||(j[1]=Q=>c(T)(!1))},"全量分析",8,Sh),l("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=>I.value=!0)},"导入 iwiki"),l("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)},"从工蜂提炼"),l("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=>x.value=!0)},"新建条目"),l("div",_h,[ie(l("select",{"onUpdate:modelValue":j[5]||(j[5]=Q=>Re(d)?d.value=Q:null),class:"px-2 py-1.5 text-sm border border-gray-300 rounded"},[...j[33]||(j[33]=[au('<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),[[rl,c(d)]]),ie(l("input",{"onUpdate:modelValue":j[6]||(j[6]=Q=>Re(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]=il(Q=>c(w)(),["enter"]))},null,544),[[fe,c(f)]])])]),c(i)?(h(),b("div",Ch,[l("div",Ih,[l("div",Th,[j[34]||(j[34]=l("svg",{class:"animate-spin h-4 w-4 text-blue-600",viewBox:"0 0 24 24",fill:"none"},[l("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),l("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),l("span",Ph,[c(u)?(h(),b(re,{key:0},[le(" 步骤 "+p(c(u).current)+"/"+p(c(u).total)+":"+p(C[c(u).step]||c(a)),1)],64)):(h(),b(re,{key:1},[le(p(c(a)||"分析中..."),1)],64))])]),c(u)?(h(),b("span",Rh," 已耗时 "+p(F(c(u).elapsed)),1)):N("",!0)]),c(u)?(h(),b("div",Ah,[l("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:gn({width:Math.round(c(u).current/c(u).total*100)+"%"})},null,6)])):(h(),b("div",Dh,[...j[35]||(j[35]=[l("div",{class:"h-full rounded-full bg-blue-500 analyze-progress-bar-animated",style:{width:"100%"}},null,-1)])]))])):N("",!0),c(n)?(h(),b("div",Eh,[l("div",Lh,[l("div",Fh,p(c(n).total),1),j[36]||(j[36]=l("div",{class:"text-xs text-gray-500"},"总条目",-1))]),l("div",Mh,[l("div",jh,p(c(n).byType["project-meta"]||0),1),j[37]||(j[37]=l("div",{class:"text-xs text-gray-500"},"项目分析",-1))]),l("div",Oh,[l("div",Nh,p(c(n).byType.custom||0),1),j[38]||(j[38]=l("div",{class:"text-xs text-gray-500"},"自定义",-1))]),l("div",Bh,[l("div",Uh,p(c(n).byType.iwiki||0),1),j[39]||(j[39]=l("div",{class:"text-xs text-gray-500"},"iwiki",-1))]),l("div",Vh,[l("div",Hh,p(c(n).byType.gongfeng||0),1),j[40]||(j[40]=l("div",{class:"text-xs text-gray-500"},"工蜂",-1))])])):N("",!0),l("div",zh,[c(r)&&c(t).length===0?(h(),b("div",qh,"加载中...")):c(y).length===0?(h(),b("div",Kh,"暂无知识条目")):N("",!0),(h(!0),b(re,null,Te(c(y),Q=>(h(),b("div",{key:Q.id,class:"px-4 py-3 flex items-center gap-3 hover:bg-gray-50 cursor-pointer",onClick:m=>ht(Q)},[l("div",Wh,[l("div",Jh,[l("span",Zh,p(Q.title),1),l("span",{class:te([Ce(Q.type),"px-1.5 py-0.5 text-xs rounded-full whitespace-nowrap"])},p(ze(Q.type)),3)]),l("div",Qh,[(h(!0),b(re,null,Te(Q.tags.slice(0,3),m=>(h(),b("span",{key:m,class:"text-xs bg-gray-100 text-gray-600 px-1.5 py-0.5 rounded"},p(m),1))),128)),Q.source?.url?(h(),b("span",Yh,p(Q.source.url),1)):N("",!0)])]),l("div",Xh,p(ls(Q.updatedAt)),1),l("div",{class:"flex items-center gap-1",onClick:j[8]||(j[8]=zt(()=>{},["stop"]))},[Q.type==="iwiki"?(h(),b("button",{key:0,class:"px-2 py-1 text-xs bg-green-50 text-green-700 rounded hover:bg-green-100",onClick:m=>c($)(Q.id)},"同步",8,e0)):N("",!0),l("button",{class:"px-2 py-1 text-xs bg-red-50 text-red-700 rounded hover:bg-red-100",onClick:m=>Qt(Q)},"删除",8,t0)])],8,Gh))),128))]),K.value&&c(s)?(h(),b("div",{key:3,class:"fixed inset-0 bg-black/40 flex items-center justify-center z-50",onClick:j[16]||(j[16]=zt(Q=>K.value=!1,["self"]))},[l("div",s0,[l("div",n0,[l("div",r0,[l("h3",o0,p(O.value?"编辑":c(s).title),1),l("span",{class:te([Ce(c(s).type),"px-2 py-0.5 text-xs rounded-full"])},p(ze(c(s).type)),3)]),l("div",i0,[O.value?N("",!0):(h(),b("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=>Ge())},"编辑")),l("button",{class:"text-gray-400 hover:text-gray-600 text-xl",onClick:j[10]||(j[10]=Q=>K.value=!1)},"×")])]),l("div",l0,[O.value?(h(),b("div",a0,[ie(l("input",{"onUpdate:modelValue":j[11]||(j[11]=Q=>ne.value.title=Q),class:"w-full px-3 py-2 border rounded text-sm",placeholder:"标题"},null,512),[[fe,ne.value.title]]),ie(l("input",{"onUpdate:modelValue":j[12]||(j[12]=Q=>ne.value.tags=Q),class:"w-full px-3 py-2 border rounded text-sm",placeholder:"标签(逗号分隔)"},null,512),[[fe,ne.value.tags]]),ie(l("textarea",{"onUpdate:modelValue":j[13]||(j[13]=Q=>ne.value.content=Q),class:"w-full px-3 py-2 border rounded text-sm font-mono",rows:"20",placeholder:"Markdown 内容"},null,512),[[fe,ne.value.content]]),l("div",u0,[l("button",{class:"px-4 py-2 text-sm bg-gray-200 rounded hover:bg-gray-300",onClick:j[14]||(j[14]=Q=>O.value=!1)},"取消"),l("button",{class:"px-4 py-2 text-sm bg-blue-600 text-white rounded hover:bg-blue-700",onClick:j[15]||(j[15]=Q=>Ms())},"保存")])])):(h(),b(re,{key:1},[c(s).tags.length?(h(),b("div",c0,[(h(!0),b(re,null,Te(c(s).tags,Q=>(h(),b("span",{key:Q,class:"text-xs bg-gray-100 text-gray-600 px-2 py-0.5 rounded"},p(Q),1))),128))])):N("",!0),c(s).source?.url?(h(),b("div",d0,[j[41]||(j[41]=le(" 来源: ",-1)),l("a",{href:c(s).source.url,target:"_blank",class:"text-blue-500 hover:underline"},p(c(s).source.url),9,p0)])):N("",!0),l("div",f0,p(c(s).content),1)],64))])])])):N("",!0),x.value?(h(),b("div",{key:4,class:"fixed inset-0 bg-black/40 flex items-center justify-center z-50",onClick:j[22]||(j[22]=zt(Q=>x.value=!1,["self"]))},[l("div",g0,[j[42]||(j[42]=l("h3",{class:"text-lg font-semibold"},"新建知识条目",-1)),ie(l("input",{"onUpdate:modelValue":j[17]||(j[17]=Q=>M.value.title=Q),class:"w-full px-3 py-2 border rounded text-sm",placeholder:"标题"},null,512),[[fe,M.value.title]]),ie(l("input",{"onUpdate:modelValue":j[18]||(j[18]=Q=>M.value.tags=Q),class:"w-full px-3 py-2 border rounded text-sm",placeholder:"标签(逗号分隔)"},null,512),[[fe,M.value.tags]]),ie(l("textarea",{"onUpdate:modelValue":j[19]||(j[19]=Q=>M.value.content=Q),class:"w-full px-3 py-2 border rounded text-sm font-mono",rows:"10",placeholder:"Markdown 内容"},null,512),[[fe,M.value.content]]),l("div",h0,[l("button",{class:"px-4 py-2 text-sm bg-gray-200 rounded hover:bg-gray-300",onClick:j[20]||(j[20]=Q=>x.value=!1)},"取消"),l("button",{class:"px-4 py-2 text-sm bg-blue-600 text-white rounded hover:bg-blue-700",disabled:!M.value.title||!M.value.content,onClick:j[21]||(j[21]=Q=>Pn())},"创建",8,m0)])])])):N("",!0),I.value?(h(),b("div",{key:5,class:"fixed inset-0 bg-black/40 flex items-center justify-center z-50",onClick:j[26]||(j[26]=zt(Q=>I.value=!1,["self"]))},[l("div",b0,[j[43]||(j[43]=l("h3",{class:"text-lg font-semibold"},"导入 iwiki 页面",-1)),ie(l("input",{"onUpdate:modelValue":j[23]||(j[23]=Q=>E.value=Q),class:"w-full px-3 py-2 border rounded text-sm",placeholder:"输入 iwiki 页面 URL"},null,512),[[fe,E.value]]),l("div",y0,[l("button",{class:"px-4 py-2 text-sm bg-gray-200 rounded hover:bg-gray-300",onClick:j[24]||(j[24]=Q=>I.value=!1)},"取消"),l("button",{class:"px-4 py-2 text-sm bg-green-600 text-white rounded hover:bg-green-700",disabled:!E.value||c(g),onClick:j[25]||(j[25]=Q=>Rn())},p(c(g)?"导入中...":"导入"),9,v0)])])])):N("",!0),z.value?(h(),b("div",{key:6,class:"fixed inset-0 bg-black/40 flex items-center justify-center z-50",onClick:j[32]||(j[32]=zt(Q=>z.value=!1,["self"]))},[l("div",x0,[j[46]||(j[46]=l("h3",{class:"text-lg font-semibold"},"从工蜂提炼知识",-1)),l("div",w0,[l("label",k0,[ie(l("input",{"onUpdate:modelValue":j[27]||(j[27]=Q=>ae.value=Q),type:"radio",value:"issue"},null,512),[[Io,ae.value]]),j[44]||(j[44]=le(" Issue ",-1))]),l("label",$0,[ie(l("input",{"onUpdate:modelValue":j[28]||(j[28]=Q=>ae.value=Q),type:"radio",value:"mr"},null,512),[[Io,ae.value]]),j[45]||(j[45]=le(" Merge Request ",-1))])]),ie(l("input",{"onUpdate:modelValue":j[29]||(j[29]=Q=>ue.value=Q),class:"w-full px-3 py-2 border rounded text-sm",placeholder:"输入 Issue/MR 编号 (IID)"},null,512),[[fe,ue.value]]),l("div",S0,[l("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)},"取消"),l("button",{class:"px-4 py-2 text-sm bg-orange-500 text-white rounded hover:bg-orange-600",disabled:!ue.value||c(g),onClick:j[31]||(j[31]=Q=>jt())},p(c(g)?"提炼中...":"提炼"),9,_0)])])])):N("",!0)]))}}),I0=(e,t)=>{const s=e.__vccOpts||e;for(const[n,r]of t)s[n]=r;return s},T0=I0(C0,[["__scopeId","data-v-db7fa114"]]),P0={key:0,class:"fixed inset-0 z-50 flex items-center justify-center"},R0={class:"relative bg-white rounded-xl shadow-2xl w-full max-w-xl max-h-[90vh] overflow-y-auto"},A0={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"},D0={class:"text-lg font-bold text-gray-800"},E0={class:"px-6 py-4 space-y-4"},L0={class:"text-sm text-gray-500 mb-1"},F0={class:"text-sm font-medium text-gray-800"},M0={key:0},j0={class:"text-sm text-gray-500 mb-1"},O0={class:"text-sm text-gray-600 bg-gray-50 rounded-lg p-3 max-h-32 overflow-y-auto whitespace-pre-wrap"},N0={class:"border-t border-gray-200 pt-4"},B0={class:"text-sm font-semibold text-gray-700 mb-3"},U0={class:"space-y-3"},V0={class:"block text-xs font-medium text-gray-600 mb-1"},H0=["value","placeholder"],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:"sticky bottom-0 bg-white border-t border-gray-200 px-6 py-4 flex justify-end space-x-3 rounded-b-xl"},nm=["disabled"],rm=Ae({__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,i){n("update:supplement",{...s.supplement,[o]:i})}return(o,i)=>(h(),Ye(Ir,{name:"fade"},{default:xn(()=>[e.issue?(h(),b("div",P0,[l("div",{class:"absolute inset-0 bg-black/30",onClick:i[0]||(i[0]=a=>n("close"))}),l("div",R0,[l("div",A0,[l("h2",D0,p(o.$t("start.title",{iid:e.issue.iid})),1),l("button",{class:"text-gray-400 hover:text-gray-600 text-2xl leading-none",onClick:i[1]||(i[1]=a=>n("close"))},"×")]),l("div",E0,[l("div",null,[l("div",L0,p(o.$t("start.issueTitle")),1),l("div",F0,p(e.issue.title),1)]),e.issue.description?(h(),b("div",M0,[l("div",j0,p(o.$t("start.descPreview")),1),l("div",O0,p(e.issue.description?.slice(0,500))+p((e.issue.description?.length||0)>500?"...":""),1)])):N("",!0),l("div",N0,[l("h3",B0,p(o.$t("start.supplement")),1),l("div",U0,[l("div",null,[l("label",V0,p(o.$t("start.requirements")),1),l("textarea",{value:e.supplement.requirements,onInput:i[2]||(i[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,H0)]),l("div",null,[l("label",z0,p(o.$t("start.acceptance")),1),l("textarea",{value:e.supplement.acceptanceCriteria,onInput:i[3]||(i[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,q0)]),l("div",null,[l("label",K0,p(o.$t("start.scope")),1),l("input",{value:e.supplement.scope,onInput:i[4]||(i[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,G0)]),l("div",null,[l("label",W0,p(o.$t("start.constraints")),1),l("textarea",{value:e.supplement.constraints,onInput:i[5]||(i[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,J0)]),l("div",null,[l("label",Z0,p(o.$t("start.references")),1),l("textarea",{value:e.supplement.references,onInput:i[6]||(i[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,Q0)]),l("div",null,[l("label",Y0,p(o.$t("start.freeText")),1),l("textarea",{value:e.supplement.freeText,onInput:i[7]||(i[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,X0)]),l("div",null,[l("label",em,p(o.$t("start.tapdId")),1),l("input",{value:e.supplement.tapdId,onInput:i[8]||(i[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,tm)])])])]),l("div",sm,[l("button",{class:"px-4 py-2 text-sm text-gray-600 bg-gray-100 rounded-lg hover:bg-gray-200",onClick:i[9]||(i[9]=a=>n("close"))},p(o.$t("start.cancel")),1),l("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:i[10]||(i[10]=a=>n("start"))},p(e.processing?o.$t("start.processing"):o.$t("start.submit")),9,nm)])])])):N("",!0)]),_:1}))}}),om={class:"text-base font-semibold text-gray-700 mb-3"},im={class:"flex items-center justify-between"},lm={class:"flex flex-col items-center space-y-1"},am={key:0},um={key:1,class:"pulse-dot"},cm={key:2},dm={key:3},pm={class:"text-xs text-gray-600"},fm={key:0,class:"text-xs text-gray-400"},gm=["onClick"],hm=Ae({__name:"PipelineProgress",props:{issue:{},progress:{}},emits:["retryFromPhase"],setup(e,{emit:t}){const s=e,n=t,{getPhaseNames:r,phaseLabel:o,phaseNodeClass:i}=Ls();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 al(y.getTime()-f.getTime())}return(g,d)=>(h(),b("div",null,[l("h3",om,p(g.$t("pipeline.title")),1),l("div",im,[(h(!0),b(re,null,Te(c(r)(e.issue),(f,y)=>(h(),b(re,{key:f},[l("div",lm,[l("div",{class:te(["w-10 h-10 rounded-full flex items-center justify-center text-sm font-bold",c(i)(a(f))])},[a(f)==="completed"?(h(),b("span",am,"✓")):a(f)==="in_progress"?(h(),b("span",um,"●")):a(f)==="failed"?(h(),b("span",cm,"✗")):(h(),b("span",dm,p(y+1),1))],2),l("span",pm,p(c(o)(f)),1),u(f)?(h(),b("span",fm,p(u(f)),1)):N("",!0),l("button",{class:"text-xs text-blue-500 hover:text-blue-700 hover:underline mt-0.5",onClick:w=>n("retryFromPhase",f)},p(g.$t("pipeline.retryFrom")),9,gm)]),y<c(r)(e.issue).length-1?(h(),b("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)):N("",!0)],64))),128))])]))}}),mm={class:"bg-yellow-50 border-2 border-yellow-300 rounded-lg p-4"},bm={class:"text-base font-semibold text-yellow-800 mb-3"},ym={class:"text-sm text-yellow-700 mb-3"},vm={key:0,class:"text-yellow-600 font-medium"},xm={key:0,class:"mb-4"},wm={class:"flex items-center mb-2"},km={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"},Sm={class:"space-y-2 max-h-48 overflow-y-auto border border-yellow-200 rounded-lg bg-white/60 p-3"},_m={class:"flex items-baseline space-x-2 mb-0.5"},Cm={class:"text-xs font-semibold text-yellow-700"},Im={class:"text-xs text-gray-400"},Tm={class:"text-sm text-gray-700 whitespace-pre-wrap break-words"},Pm={class:"flex items-center space-x-3 mb-3"},Rm=["disabled"],Am=["disabled"],Dm={class:"space-y-2"},Em={class:"block text-xs font-medium text-yellow-700"},Lm=["placeholder"],Fm=["disabled"],Mm=Ae({__name:"ReviewGatePanel",props:Xs({reviewSubmitting:{type:Boolean},reviewHistory:{}},{reviewFeedback:{required:!0},reviewFeedbackModifiers:{}}),emits:Xs(["approve","reject","skip"],["update:reviewFeedback"]),setup(e,{emit:t}){const s=tr(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,i)=>(h(),b("div",mm,[l("h3",bm,p(o.$t("review.title")),1),l("p",ym,[le(p(o.$t("review.description"))+" ",1),e.reviewHistory.length>0?(h(),b("span",vm,p(o.$t("review.currentRound",{round:e.reviewHistory.length+1})),1)):N("",!0)]),e.reviewHistory.length>0?(h(),b("div",xm,[l("div",wm,[l("span",km,p(o.$t("review.history")),1),l("span",$m,p(o.$t("review.roundLabel",{n:e.reviewHistory.length})),1)]),l("div",Sm,[(h(!0),b(re,null,Te(e.reviewHistory,a=>(h(),b("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"])},[l("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),l("div",_m,[l("span",Cm,p(o.$t("review.roundPrefix",{round:a.round})),1),l("span",Im,p(r(a.timestamp)),1)]),l("p",Tm,p(a.feedback),1)],2))),128))])])):N("",!0),l("div",Pm,[l("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:i[0]||(i[0]=a=>n("approve"))},p(e.reviewSubmitting?o.$t("review.submitting"):o.$t("review.approve")),9,Rm),l("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:i[1]||(i[1]=a=>n("skip"))},p(o.$t("review.skip")),9,Am)]),l("div",Dm,[l("label",Em,p(o.$t("review.feedbackLabel")),1),ie(l("textarea",{"onUpdate:modelValue":i[2]||(i[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,Lm),[[fe,s.value]]),l("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:i[3]||(i[3]=a=>n("reject"))},p(o.$t("review.reject")),9,Fm)])]))}}),jm={class:"flex items-center justify-between mb-2"},Om={class:"text-base font-semibold text-gray-700"},Nm={class:"flex items-center space-x-2"},Bm=["disabled"],Um={key:0,class:"py-4 text-center text-gray-400 text-sm"},Vm={key:1},Hm={key:0,class:"space-y-2 text-sm"},zm={key:0},qm={class:"text-gray-500 font-medium"},Km={class:"text-gray-700"},Gm={key:1},Wm={class:"text-gray-500 font-medium"},Jm={class:"text-gray-700"},Zm={key:2},Qm={class:"text-gray-500 font-medium"},Ym={class:"text-gray-700"},Xm={key:3},eb={class:"text-gray-500 font-medium"},tb={class:"text-gray-700"},sb={key:4},nb={class:"text-gray-500 font-medium"},rb={class:"text-gray-700"},ob={key:5},ib={class:"text-gray-500 font-medium"},lb={class:"text-gray-700"},ab={key:6},ub={class:"text-gray-500 font-medium"},cb={class:"text-gray-700"},db={key:1,class:"py-4 text-center text-gray-400 text-sm"},pb={key:2,class:"space-y-3"},fb={class:"block text-xs font-medium text-gray-600 mb-1"},gb=["value"],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"},yb=["value"],vb={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","placeholder"],Ib=Ae({__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,i){n("update:supplementForm",{...s.supplementForm,[o]:i})}return(o,i)=>(h(),b("div",null,[l("div",jm,[l("h3",Om,p(o.$t("supplement.title")),1),l("div",Nm,[e.editing?(h(),b(re,{key:1},[l("button",{class:"px-2 py-1 text-xs bg-green-500 text-white rounded hover:bg-green-600",disabled:e.saving,onClick:i[1]||(i[1]=a=>n("save"))},p(e.saving?o.$t("supplement.saving"):o.$t("supplement.save")),9,Bm),l("button",{class:"px-2 py-1 text-xs bg-gray-200 text-gray-600 rounded hover:bg-gray-300",onClick:i[2]||(i[2]=a=>n("cancel"))},p(o.$t("supplement.cancel")),1)],64)):(h(),b("button",{key:0,class:"px-2 py-1 text-xs bg-blue-100 text-blue-600 rounded hover:bg-blue-200",onClick:i[0]||(i[0]=a=>n("edit"))},p(o.$t("supplement.edit")),1))])]),e.loading?(h(),b("div",Um,p(o.$t("supplement.loading")),1)):e.editing?(h(),b("div",pb,[l("div",null,[l("label",fb,p(o.$t("supplement.requirementsLabel")),1),l("textarea",{value:e.supplementForm.requirements,onInput:i[3]||(i[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,gb)]),l("div",null,[l("label",hb,p(o.$t("supplement.acceptanceLabel")),1),l("textarea",{value:e.supplementForm.acceptanceCriteria,onInput:i[4]||(i[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,mb)]),l("div",null,[l("label",bb,p(o.$t("supplement.scopeLabel")),1),l("input",{value:e.supplementForm.scope,onInput:i[5]||(i[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,yb)]),l("div",null,[l("label",vb,p(o.$t("supplement.constraintsLabel")),1),l("textarea",{value:e.supplementForm.constraints,onInput:i[6]||(i[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,xb)]),l("div",null,[l("label",wb,p(o.$t("supplement.referencesLabel")),1),l("textarea",{value:e.supplementForm.references,onInput:i[7]||(i[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,kb)]),l("div",null,[l("label",$b,p(o.$t("supplement.freeTextLabel")),1),l("textarea",{value:e.supplementForm.freeText,onInput:i[8]||(i[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,Sb)]),l("div",null,[l("label",_b,p(o.$t("supplement.tapdIdLabel")),1),l("input",{value:e.supplementForm.tapdId,onInput:i[9]||(i[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,Cb)])])):(h(),b("div",Vm,[e.hasData?(h(),b("div",Hm,[e.supplement.requirements?(h(),b("div",zm,[l("span",qm,p(o.$t("supplement.requirements")),1),i[10]||(i[10]=le()),l("span",Km,p(e.supplement.requirements),1)])):N("",!0),e.supplement.acceptanceCriteria?(h(),b("div",Gm,[l("span",Wm,p(o.$t("supplement.acceptance")),1),i[11]||(i[11]=le()),l("span",Jm,p(e.supplement.acceptanceCriteria),1)])):N("",!0),e.supplement.scope?(h(),b("div",Zm,[l("span",Qm,p(o.$t("supplement.scope")),1),i[12]||(i[12]=le()),l("span",Ym,p(e.supplement.scope),1)])):N("",!0),e.supplement.constraints?(h(),b("div",Xm,[l("span",eb,p(o.$t("supplement.constraints")),1),i[13]||(i[13]=le()),l("span",tb,p(e.supplement.constraints),1)])):N("",!0),e.supplement.references?(h(),b("div",sb,[l("span",nb,p(o.$t("supplement.references")),1),i[14]||(i[14]=le()),l("span",rb,p(e.supplement.references),1)])):N("",!0),e.supplement.freeText?(h(),b("div",ob,[l("span",ib,p(o.$t("supplement.freeText")),1),i[15]||(i[15]=le()),l("span",lb,p(e.supplement.freeText),1)])):N("",!0),e.supplement.tapdId?(h(),b("div",ab,[l("span",ub,p(o.$t("supplement.tapdId")),1),i[16]||(i[16]=le()),l("span",cb,p(e.supplement.tapdId),1)])):N("",!0)])):(h(),b("div",db,p(o.$t("supplement.empty")),1))]))]))}}),Tb={class:"flex items-center justify-between mb-2"},Pb={class:"text-base font-semibold text-gray-700"},Rb={class:"flex items-center space-x-2"},Ab={class:"flex items-center space-x-1 text-xs text-gray-500 cursor-pointer"},Db={class:"flex items-center space-x-1 text-xs text-gray-500 cursor-pointer"},Eb={key:0,class:"border border-gray-200 rounded-lg p-6 text-center text-gray-400 text-sm"},Lb={class:"text-xs mt-1"},Fb={key:0,class:"text-xs mt-1"},Mb={class:"log-badge"},jb={class:"text-gray-400 text-xs mr-1"},Ob={key:0,class:"text-gray-400 text-xs mr-1"},Nb={class:"text-gray-700 break-all"},Bb={key:2,class:"text-xs text-gray-400 mt-1 text-right"},Ub=Ae({__name:"AgentLogViewer",props:Xs({logs:{},issueState:{}},{autoScroll:{type:Boolean,default:!0},autoScrollModifiers:{},debugMode:{type:Boolean,default:!1},debugModeModifiers:{}}),emits:Xs(["clear"],["update:autoScroll","update:debugMode"]),setup(e,{emit:t}){const s=t,n=tr(e,"autoScroll"),r=tr(e,"debugMode"),{stateLabel:o,isTerminalState:i}=Ls(),{agentLogContainer:a,agentLogLabel:u}=ll();return(g,d)=>(h(),b("div",null,[l("div",Tb,[l("h3",Pb,p(g.$t("agentLog.title")),1),l("div",Rb,[l("label",Ab,[ie(l("input",{type:"checkbox","onUpdate:modelValue":d[0]||(d[0]=f=>n.value=f),class:"rounded"},null,512),[[rn,n.value]]),l("span",null,p(g.$t("agentLog.autoScroll")),1)]),l("label",Db,[ie(l("input",{type:"checkbox","onUpdate:modelValue":d[1]||(d[1]=f=>r.value=f),class:"rounded"},null,512),[[rn,r.value]]),d[3]||(d[3]=l("span",null,"Debug",-1))]),l("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(),b("div",Eb,[e.issueState&&c(i)(e.issueState)?(h(),b(re,{key:0},[d[4]||(d[4]=l("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"},[l("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)),l("div",null,p(g.$t("agentLog.ended")),1),l("div",Lb,[le(p(g.$t("agentLog.finalState"))+" ",1),l("span",{class:te(e.issueState==="completed"?"text-green-500":"text-red-500")},p(c(o)(e.issueState)),3)])],64)):(h(),b(re,{key:1},[d[5]||(d[5]=l("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"},[l("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),l("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),l("div",null,p(g.$t("agentLog.waiting")),1),e.issueState?(h(),b("div",Fb,p(g.$t("agentLog.currentState"))+" "+p(c(o)(e.issueState)),1)):N("",!0)],64))])):(h(),b("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),b(re,null,Te(e.logs,(f,y)=>(h(),b("div",{key:y,class:te(["agent-log-item","log-"+f.type])},[l("span",Mb,p(c(u)(f.type)),1),l("span",jb,p(c(Jc)(f.timestamp)),1),f.phase?(h(),b("span",Ob,"["+p(f.phase)+"]",1)):N("",!0),l("span",Nb,p(f.summary),1)],2))),128))],512)),e.logs.length>0?(h(),b("div",Bb,p(g.$t("agentLog.count",{count:e.logs.length})),1)):N("",!0)]))}}),Vb={class:"flex items-center justify-between mb-2"},Hb={class:"text-base font-semibold text-gray-700"},zb={class:"flex items-center space-x-2"},qb=["disabled"],Kb=["title"],Gb={class:"flex space-x-1 mb-3 border-b border-gray-200"},Wb=["onClick"],Jb={key:0,class:"py-8 text-center text-gray-400"},Zb={key:1,class:"py-8 text-center text-gray-400"},Qb={key:2},Yb=["placeholder"],Xb=["innerHTML"],ey={key:4,class:"py-8 text-center text-gray-400"},ty={key:0,class:"fullscreen-doc-overlay"},sy={class:"fullscreen-doc-container"},ny={class:"flex items-center justify-between px-6 py-4 border-b border-gray-200 shrink-0"},ry={class:"flex items-center space-x-3"},oy={class:"text-lg font-bold text-gray-800"},iy={class:"text-sm text-gray-400"},ly={class:"flex items-center space-x-2"},ay=["disabled"],uy=["title"],cy={class:"flex space-x-1 px-6 pt-3 border-b border-gray-200 shrink-0"},dy=["onClick"],py={class:"flex-1 overflow-y-auto min-h-0"},fy={key:0,class:"flex items-center justify-center h-full text-gray-400"},gy={class:"text-base"},hy={key:1,class:"flex items-center justify-center h-full text-gray-400"},my={class:"text-base"},by={key:2,class:"h-full p-4"},yy=["placeholder"],vy=["innerHTML"],xy={key:4,class:"flex items-center justify-center h-full text-gray-400"},wy={class:"text-base"},ky=Ae({__name:"PlanDocViewer",props:{issueIid:{},planDocs:{},isEditableDoc:{type:Function},detailVersion:{}},setup(e,{expose:t}){const s=e;ft(()=>s.detailVersion,()=>{n.value&&k(n.value)});const n=L(null),r=L(""),o=L(!1),i=L(""),a=L(!1),u=L(""),g=L(!1),d=L(!1),f=L(!1),{t:y}=Jt(),w={"review-feedback.md":()=>y("planDoc.noReviewFeedback"),"02-verify-report.md":()=>y("planDoc.verifyNotGenerated"),"04-verify-report.md":()=>y("planDoc.verifyNotGenerated")};async function k($){n.value=$,a.value=!1,u.value="",o.value=!0,r.value="",i.value="",d.value=!1;try{r.value=await Do(s.issueIid,$,"html")}catch(v){const C=v.message;C.includes("not found")&&$ in w?(d.value=!0,i.value=w[$]()):i.value=C}finally{o.value=!1}}async function _(){if(n.value)try{u.value=await Do(s.issueIid,n.value,"raw"),a.value=!0}catch($){alert(y("planDoc.fetchFailed")+" "+$.message)}}function R(){a.value=!1,u.value="",n.value&&k(n.value)}async function P(){if(n.value){g.value=!0;try{await ac(s.issueIid,n.value,u.value),a.value=!1,u.value="",await k(n.value)}catch($){alert(y("planDoc.saveFailed")+" "+$.message)}finally{g.value=!1}}}function T(){f.value=!0,document.body.style.overflow="hidden",!n.value&&s.planDocs.length>0&&k(s.planDocs[0].file)}function q(){f.value=!1,document.body.style.overflow=""}function D($){$.key==="Escape"&&f.value&&q()}return Pt(()=>{document.addEventListener("keydown",D),s.planDocs.length>0&&k(s.planDocs[0].file)}),Mt(()=>{document.removeEventListener("keydown",D),document.body.style.overflow=""}),t({activeDoc:n}),($,v)=>(h(),b("div",null,[l("div",Vb,[l("h3",Hb,p($.$t("planDoc.title")),1),l("div",zb,[n.value&&e.isEditableDoc(n.value)&&!f.value?(h(),b(re,{key:0},[a.value?(h(),b(re,{key:1},[l("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]=C=>P())},p(g.value?$.$t("planDoc.saving"):$.$t("planDoc.save")),9,qb),l("button",{class:"px-2 py-1 text-xs bg-gray-200 text-gray-600 rounded hover:bg-gray-300",onClick:v[2]||(v[2]=C=>R())},p($.$t("planDoc.cancel")),1)],64)):(h(),b("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($.$t("planDoc.edit")),1))],64)):N("",!0),l("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:$.$t("planDoc.fullscreen"),onClick:v[3]||(v[3]=C=>T())},[v[10]||(v[10]=l("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[l("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)),l("span",null,p($.$t("planDoc.expand")),1)],8,Kb)])]),l("div",Gb,[(h(!0),b(re,null,Te(e.planDocs,C=>(h(),b("button",{key:C.file,class:te(["px-3 py-2 text-sm font-medium border-b-2 transition-colors",n.value===C.file?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:F=>k(C.file)},p(C.label),11,Wb))),128))]),o.value?(h(),b("div",Jb,p($.$t("planDoc.loading")),1)):i.value?(h(),b("div",Zb,p(i.value),1)):a.value&&!f.value?(h(),b("div",Qb,[ie(l("textarea",{"onUpdate:modelValue":v[4]||(v[4]=C=>u.value=C),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:$.$t("planDoc.editPlaceholder")},null,8,Yb),[[fe,u.value]])])):r.value&&!f.value?(h(),b("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,Xb)):f.value?N("",!0):(h(),b("div",ey,p($.$t("planDoc.selectTab")),1)),(h(),Ye(va,{to:"body"},[ke(Ir,{name:"fullscreen-fade"},{default:xn(()=>[f.value?(h(),b("div",ty,[l("div",sy,[l("div",ny,[l("div",ry,[l("h2",oy,p($.$t("planDoc.title")),1),l("span",iy,"Issue #"+p(e.issueIid),1)]),l("div",ly,[n.value&&e.isEditableDoc(n.value)?(h(),b(re,{key:0},[a.value?(h(),b(re,{key:1},[l("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]=C=>P())},p(g.value?$.$t("planDoc.saving"):$.$t("planDoc.save")),9,ay),l("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]=C=>R())},p($.$t("planDoc.cancel")),1)],64)):(h(),b("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($.$t("planDoc.edit")),1))],64)):N("",!0),l("button",{class:"ml-2 p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-lg transition-colors",title:$.$t("planDoc.closeFullscreen"),onClick:v[8]||(v[8]=C=>q())},[...v[11]||(v[11]=[l("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,uy)])]),l("div",cy,[(h(!0),b(re,null,Te(e.planDocs,C=>(h(),b("button",{key:"fs-"+C.file,class:te(["px-4 py-2.5 text-sm font-medium border-b-2 transition-colors",n.value===C.file?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"]),onClick:F=>k(C.file)},p(C.label),11,dy))),128))]),l("div",py,[o.value?(h(),b("div",fy,[l("span",gy,p($.$t("planDoc.loading")),1)])):i.value?(h(),b("div",hy,[l("span",my,p(i.value),1)])):a.value?(h(),b("div",by,[ie(l("textarea",{"onUpdate:modelValue":v[9]||(v[9]=C=>u.value=C),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:$.$t("planDoc.editPlaceholder")},null,8,yy),[[fe,u.value]])])):r.value?(h(),b("div",{key:3,class:"plan-doc text-sm text-gray-700 p-6",innerHTML:r.value},null,8,vy)):(h(),b("div",xy,[l("span",wy,p($.$t("planDoc.selectTab")),1)]))])])])):N("",!0)]),_:1})]))]))}}),$y={class:"fixed inset-0 z-50 flex"},Sy={class:"relative ml-auto w-full max-w-2xl bg-white shadow-xl overflow-y-auto"},_y={class:"sticky top-0 bg-white border-b border-gray-200 px-6 py-4 flex items-center justify-between z-10"},Cy={class:"flex items-center space-x-2"},Iy={class:"text-lg font-bold text-gray-800"},Ty=["href"],Py={class:"px-6 py-4 space-y-6"},Ry={class:"text-base font-semibold text-gray-700 mb-2"},Ay={class:"grid grid-cols-2 gap-3 text-sm"},Dy={class:"text-gray-500"},Ey={class:"text-gray-800"},Ly={class:"text-gray-500"},Fy={class:"text-xs bg-gray-100 px-1 py-0.5 rounded"},My={class:"text-gray-500"},jy={class:"text-gray-500"},Oy={class:"text-gray-500"},Ny={class:"text-gray-500"},By={class:"flex items-center justify-between text-sm bg-gray-50 rounded-lg px-4 py-2.5 border border-gray-200"},Uy={class:"text-gray-600"},Vy=["disabled"],Hy={class:"flex items-center justify-between text-sm bg-gray-50 rounded-lg px-4 py-2.5 border border-gray-200"},zy={class:"text-gray-600"},qy=["disabled"],Ky={key:0,class:"bg-green-50 border border-green-200 rounded-lg p-4 flex items-center space-x-2"},Gy={class:"text-sm text-green-700 font-medium"},Wy=["href"],Jy={key:1,class:"bg-red-50 border border-red-200 rounded-lg p-4"},Zy={class:"text-sm font-semibold text-red-700 mb-1"},Qy={class:"text-sm text-red-600 whitespace-pre-wrap break-words"},Yy={class:"flex space-x-3 pt-2 border-t border-gray-200"},Xy=Ae({__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:i,isEditableDoc:a}=Ls();function u(){if(!s.systemStatus)return"#";const P=s.systemStatus.config.gongfengBaseUrl,T=s.systemStatus.config.projectPath;return`${P}/${T}/issues/${s.issue.issueIid}`}const g=L(s.issue.issueNoteSyncEnabled),d=L(!1),f=$e(()=>g.value===!0?"on":g.value===!1?"off":"system");async function y(){const P=[void 0,!0,!1],T=P.indexOf(g.value),q=P[(T+1)%P.length];g.value=q,d.value=!0;try{await fc(s.issue.issueIid,q===void 0?null:q)}catch(D){console.error("Failed to toggle note sync",D)}finally{d.value=!1}}const w=L(s.issue.e2eEnabled),k=L(!1),_=$e(()=>w.value===!0?"on":w.value===!1?"off":"system");async function R(){const P=[void 0,!0,!1],T=P.indexOf(w.value),q=P[(T+1)%P.length];w.value=q,k.value=!0;try{await hc(s.issue.issueIid,q===void 0?null:q)}catch(D){console.error("Failed to toggle e2e",D)}finally{k.value=!1}}return(P,T)=>(h(),Ye(Ir,{name:"fade"},{default:xn(()=>[l("div",$y,[l("div",{class:"absolute inset-0 bg-black/30",onClick:T[0]||(T[0]=q=>n("close"))}),l("div",Sy,[l("div",_y,[l("div",Cy,[l("h2",Iy,"Issue #"+p(e.issue.issueIid),1),l("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"},[le(p(P.$t("detail.viewInGongfeng"))+" ",1),T[19]||(T[19]=l("svg",{class:"w-3 h-3 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[l("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,Ty)]),l("button",{class:"text-gray-400 hover:text-gray-600 text-2xl leading-none",onClick:T[1]||(T[1]=q=>n("close"))},"×")]),l("div",Py,[l("div",null,[l("h3",Ry,p(P.$t("detail.basicInfo")),1),l("div",Ay,[l("div",null,[l("span",Dy,p(P.$t("detail.title")),1),T[20]||(T[20]=le()),l("span",Ey,p(e.issue.issueTitle),1)]),l("div",null,[l("span",Ly,p(P.$t("detail.branch")),1),T[21]||(T[21]=le()),l("code",Fy,p(e.issue.branchName),1)]),l("div",null,[l("span",My,p(P.$t("detail.state")),1),l("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)]),l("div",null,[l("span",jy,p(P.$t("detail.createdAt")),1),le(" "+p(c(on)(e.issue.createdAt)),1)]),l("div",null,[l("span",Oy,p(P.$t("detail.retries")),1),le(" "+p(e.issue.attempts),1)]),l("div",null,[l("span",Ny,p(P.$t("detail.updatedAt")),1),le(" "+p(c(on)(e.issue.updatedAt)),1)])])]),l("div",By,[l("span",Uy,p(P.$t("detail.noteSync")),1),l("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]=q=>y())},p(f.value==="on"?P.$t("detail.enabled"):f.value==="off"?P.$t("detail.disabled"):P.$t("detail.followSystem")),11,Vy)]),l("div",Hy,[l("span",zy,p(P.$t("detail.e2eTitle")),1),l("button",{class:te(["px-3 py-1 rounded text-xs font-medium transition-colors",{"bg-green-100 text-green-700 hover:bg-green-200":_.value==="on","bg-red-100 text-red-600 hover:bg-red-200":_.value==="off","bg-gray-200 text-gray-600 hover:bg-gray-300":_.value==="system"}]),disabled:k.value,onClick:T[3]||(T[3]=q=>R())},p(_.value==="on"?P.$t("detail.enabled"):_.value==="off"?P.$t("detail.disabled"):P.$t("detail.followSystem")),11,qy)]),e.issue.mrUrl?(h(),b("div",Ky,[l("span",Gy,p(P.$t("detail.mrLabel")),1),l("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,Wy)])):N("",!0),e.issue.lastError?(h(),b("div",Jy,[l("h3",Zy,p(P.$t("detail.errorInfo")),1),l("p",Qy,p(e.issue.lastError),1)])):N("",!0),ke(hm,{issue:e.issue,progress:e.progress,onRetryFromPhase:T[4]||(T[4]=q=>n("retryFromPhase",e.issue.issueIid,q))},null,8,["issue","progress"]),e.issue.state==="waiting_for_review"?(h(),Ye(Mm,{key:2,"review-submitting":e.reviewSubmitting,"review-feedback":e.reviewFeedback,"review-history":e.reviewHistory,"onUpdate:reviewFeedback":T[5]||(T[5]=q=>n("update:reviewFeedback",q)),onApprove:T[6]||(T[6]=q=>n("approve",e.issue.issueIid)),onReject:T[7]||(T[7]=q=>n("reject",e.issue.issueIid)),onSkip:T[8]||(T[8]=q=>n("skip",e.issue.issueIid))},null,8,["review-submitting","review-feedback","review-history"])):N("",!0),ke(Ib,{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]=q=>n("supplementEdit")),onSave:T[10]||(T[10]=q=>n("supplementSave")),onCancel:T[11]||(T[11]=q=>n("supplementCancel")),"onUpdate:supplementForm":T[12]||(T[12]=q=>n("update:supplementForm",q))},null,8,["supplement","supplement-form","loading","editing","saving","has-data"]),ke(ky,{"issue-iid":e.issue.issueIid,"plan-docs":c(i)(e.issue),"is-editable-doc":c(a),"detail-version":e.detailVersion},null,8,["issue-iid","plan-docs","is-editable-doc","detail-version"]),ke(Ub,{logs:e.agentLogs,"issue-state":e.issue.state,"auto-scroll":e.agentAutoScroll,"debug-mode":e.agentDebugMode,"onUpdate:autoScroll":T[13]||(T[13]=q=>n("update:agentAutoScroll",q)),"onUpdate:debugMode":T[14]||(T[14]=q=>n("update:agentDebugMode",q)),onClear:T[15]||(T[15]=q=>n("clearLogs"))},null,8,["logs","issue-state","auto-scroll","debug-mode"]),l("div",Yy,[e.issue.state==="failed"?(h(),b("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]=q=>n("retry",e.issue.issueIid))},p(P.$t("detail.retry")),1)):N("",!0),l("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]=q=>n("restart",e.issue.issueIid))},p(P.$t("detail.restart")),1),l("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]=q=>n("cancel",e.issue.issueIid))},p(P.$t("detail.cancelTrack")),1)])])])])]),_:1}))}}),ev={class:"max-w-7xl mx-auto px-4 py-6"},tv={class:"mb-4 flex items-center space-x-1 border-b border-gray-200"},sv=Ae({__name:"App",setup(e){const t=L(null),s=L("tracked"),{pipelineMode:n}=Ls(),{issues:r,filter:o,filteredIssues:i,activeCount:a,completedCount:u,failedCount:g,refresh:d}=Hc(),f=zc(),y=ll(),w=Gc(d),k=$e(()=>f.selectedIssue.value?.issueIid);async function _($){let v=r.value;v.length===0&&(await d(),v=r.value);const C=v.find(F=>F.issueIid===$);if(C)f.selectIssue(C,y.agentLogs);else try{const F=await or($);f.selectIssue(F,y.agentLogs)}catch{console.warn(`Issue #${$} not found, ignoring URL param`)}}const{readIssueIidFromUrl:R}=Wc({selectedIssueIid:k,onOpenIssue:_}),{connected:P}=Uc(($,v)=>{const C=v;if($.startsWith("issue:")||$.startsWith("review:")){d();const F=C.data;F?.issueIid&&f.selectedIssue.value?.issueIid===F.issueIid&&f.refreshDetail()}if($==="agent:output"){const F=C.data;F?.event&&y.pushAgentStreamEvent(F.issueIid,k,F.phase,F.event)}if($==="pipeline:progress"){const F=C.data;F&&f.selectedIssue.value?.issueIid===F.issueIid&&y.pushSystemLog(F.issueIid,k,F.step,F.message??"",C.timestamp)}});async function T(){try{t.value=await ec(),t.value?.config?.pipelineMode&&(n.value=t.value.config.pipelineMode)}catch($){console.error("Fetch status failed",$)}}function q(){s.value="browse",w.browseIssues.value.length===0&&w.fetchGongfengIssues()}let D=null;return Pt(async()=>{await d(),T(),D=setInterval(T,1e4);const $=R();$&&_($)}),Mt(()=>{D&&clearInterval(D)}),($,v)=>(h(),b("div",null,[ke(od,{connected:c(P),"system-status":t.value},null,8,["connected","system-status"]),l("main",ev,[ke(vd,{total:c(r).length,active:c(a),completed:c(u),failed:c(g)},null,8,["total","active","completed","failed"]),l("div",tv,[l("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]=C=>s.value="tracked")},p($.$t("app.trackedIssues")),3),l("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]=C=>q())},p($.$t("app.browseIssues")),3),l("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]=C=>s.value="brainstorm")},p($.$t("app.brainstorm")),3),l("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]=C=>s.value="chat")},p($.$t("app.chat")),3),l("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]=C=>s.value="knowledge")},p($.$t("app.knowledge")),3)]),s.value==="tracked"?(h(),Ye(ep,{key:0,issues:c(i),filter:c(o),"system-status":t.value,"onUpdate:filter":v[5]||(v[5]=C=>o.value=C),onSelect:v[6]||(v[6]=C=>c(f).selectIssue(C,c(y).agentLogs)),onRetry:v[7]||(v[7]=C=>c(f).doRetryIssue(C,c(d))),onRestart:v[8]||(v[8]=C=>c(f).doRestartIssue(C,c(d))),onCancel:v[9]||(v[9]=C=>c(f).doCancelIssue(C,c(d)))},null,8,["issues","filter","system-status"])):N("",!0),s.value==="brainstorm"?(h(),Ye(Mg,{key:1})):N("",!0),s.value==="chat"?(h(),Ye(yh,{key:2})):N("",!0),s.value==="knowledge"?(h(),Ye(T0,{key:3})):N("",!0),s.value==="browse"?(h(),Ye(Lp,{key:4,issues:c(w).browseIssues.value,"tracked-iids":c(w).browseTrackedIids.value,total:c(w).browseTotal.value,page:c(w).browsePage.value,"per-page":c(w).browsePerPage,loading:c(w).browseLoading.value,error:c(w).browseError.value,search:c(w).browseSearch.value,"system-status":t.value,"onUpdate:search":v[10]||(v[10]=C=>c(w).browseSearch.value=C),"onUpdate:page":v[11]||(v[11]=C=>c(w).browsePage.value=C),onSearch:v[12]||(v[12]=C=>c(w).fetchGongfengIssues()),onStart:v[13]||(v[13]=C=>c(w).openStartDialog(C))},null,8,["issues","tracked-iids","total","page","per-page","loading","error","search","system-status"])):N("",!0)]),ke(rm,{issue:c(w).startDialogIssue.value,supplement:c(w).startSupplement.value,processing:c(w).startProcessing.value,onClose:v[14]||(v[14]=C=>c(w).startDialogIssue.value=null),"onUpdate:supplement":v[15]||(v[15]=C=>c(w).startSupplement.value=C),onStart:v[16]||(v[16]=C=>{c(w).doStartProcessing(()=>{s.value="tracked"})})},null,8,["issue","supplement","processing"]),c(f).selectedIssue.value?(h(),Ye(Xy,{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=>c(f).selectedIssue.value=null),onRetry:v[18]||(v[18]=C=>c(f).doRetryIssue(C,c(d))),onRestart:v[19]||(v[19]=C=>c(f).doRestartIssue(C,c(d))),onCancel:v[20]||(v[20]=C=>c(f).doCancelIssue(C,c(d))),onRetryFromPhase:v[21]||(v[21]=(C,F)=>c(f).doRetryFromPhase(C,F,F,c(d))),onApprove:v[22]||(v[22]=C=>c(f).doApprovePlan(C,c(d))),onReject:v[23]||(v[23]=C=>c(f).doRejectPlan(C,c(d))),onSkip:v[24]||(v[24]=C=>c(f).doSkipReview(C,c(d))),"onUpdate:reviewFeedback":v[25]||(v[25]=C=>c(f).reviewFeedback.value=C),onSupplementEdit:v[26]||(v[26]=C=>c(f).enterSupplementEdit()),onSupplementSave:v[27]||(v[27]=C=>c(f).saveDetailSupplement(c(d))),onSupplementCancel:v[28]||(v[28]=C=>c(f).detailSupplementEditing.value=!1),"onUpdate:supplementForm":v[29]||(v[29]=C=>c(f).detailSupplementForm.value=C),"onUpdate:agentAutoScroll":v[30]||(v[30]=C=>c(y).agentAutoScroll.value=C),"onUpdate:agentDebugMode":v[31]||(v[31]=C=>c(y).debugMode.value=C),onClearLogs:v[32]||(v[32]=C=>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"])):N("",!0)]))}});function nv(){const e=L(0),t=6,s=L(!1),n=L(""),r=L([]),o=L(null),i=L(null),a=L(null),u=L(null),g=L(""),d=L([]),f=L(!1),y=L(""),w=L(!1),k=L(""),_=bn({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}}),R=$e(()=>{switch(e.value){case 0:{const x=r.value.filter(I=>I.required);return x.length>0&&x.every(I=>I.installed)}case 1:return _.project.workDir.trim()!=="";case 2:return _.gongfeng.apiUrl.trim()!==""&&_.gongfeng.privateToken.trim()!==""&&_.gongfeng.projectPath.trim()!==""&&o.value===!0&&a.value===!0;case 3:return r.value.filter(x=>x.name===_.ai.mode.replace("-","-")).every(x=>x.installed||!x.required);case 4:return!0;case 5:return g.value!=="";default:return!1}});async function P(){s.value=!0,n.value="";try{const I=await(await fetch(`/api/setup/check-env?aiMode=${_.ai.mode}`)).json();r.value=I.dependencies}catch(x){n.value=x.message}finally{s.value=!1}}async function T(){if(o.value=null,i.value=null,!(!_.gongfeng.apiUrl||!_.gongfeng.privateToken))try{const I=await(await fetch("/api/setup/validate-token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiUrl:_.gongfeng.apiUrl,token:_.gongfeng.privateToken})})).json();o.value=I.valid,i.value=I.user??null,I.valid||(n.value=I.error??"Token validation failed")}catch(x){o.value=!1,n.value=x.message}}async function q(){if(a.value=null,u.value=null,!(!_.gongfeng.apiUrl||!_.gongfeng.privateToken||!_.gongfeng.projectPath))try{const I=await(await fetch("/api/setup/validate-repo",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiUrl:_.gongfeng.apiUrl,token:_.gongfeng.privateToken,projectPath:_.gongfeng.projectPath})})).json();a.value=I.valid,u.value=I.project??null,I.valid||(n.value=I.error??"Repository validation failed")}catch(x){a.value=!1,n.value=x.message}}async function D(x){f.value=!0,y.value=x,d.value=[];try{const z=(await fetch("/api/setup/install-dep",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:x})})).body?.getReader();if(!z)return;const K=new TextDecoder;let O="";for(;;){const{done:M,value:E}=await z.read();if(M)break;O+=K.decode(E,{stream:!0});const ae=O.split(`
66
+
67
+ `);O=ae.pop()??"";for(const ue of ae)if(ue.startsWith("data: "))try{const ne=JSON.parse(ue.slice(6));ne.line&&d.value.push(ne.line),ne.done&&await P()}catch{}}}catch(I){d.value.push(`Error: ${I.message}`)}finally{f.value=!1,y.value=""}}async function $(){try{const I=await(await fetch("/api/setup/generate-preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(_)})).json();g.value=I.preview}catch(x){n.value=x.message}}async function v(){s.value=!0,n.value="";try{const I=await(await fetch("/api/setup/complete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:_})})).json();I.success?(w.value=!0,k.value=I.configPath??""):n.value=I.error??"Setup failed"}catch(x){n.value=x.message}finally{s.value=!1}}function C(){e.value<t-1&&(e.value++,n.value="",e.value===5&&$())}function F(){e.value>0&&(e.value--,n.value="")}return{currentStep:e,totalSteps:t,loading:s,error:n,form:_,dependencies:r,tokenValid:o,tokenUser:i,repoValid:a,repoInfo:u,configPreview:g,installLogs:d,installing:f,installingDep:y,setupComplete:w,savedConfigPath:k,canProceed:R,checkEnv:P,validateToken:T,validateRepo:q,installDep:D,generatePreview:$,completeSetup:v,nextStep:C,prevStep:F}}const rv={class:"min-h-screen bg-gray-50 flex items-center justify-center p-4"},ov={key:0,class:"bg-white rounded-2xl shadow-lg max-w-lg w-full p-10 text-center"},iv={class:"text-2xl font-bold text-gray-900 mb-2"},lv={class:"text-gray-600 mb-4"},av={class:"block bg-gray-100 rounded-lg p-3 text-sm mb-6 break-all"},uv={class:"text-gray-600"},cv={key:1,class:"bg-white rounded-2xl shadow-lg max-w-3xl w-full overflow-hidden"},dv={class:"bg-gray-900 text-white px-8 py-6"},pv={class:"flex items-center justify-between"},fv={class:"text-xl font-bold"},gv={class:"text-gray-400 text-sm mt-1"},hv={class:"mt-4 flex gap-1"},mv={class:"p-8 min-h-[400px]"},bv={key:0,class:"mb-4 bg-red-50 border border-red-200 text-red-700 rounded-lg px-4 py-3 text-sm"},yv={key:1},vv={class:"text-gray-600 mb-6"},xv={key:0,class:"flex items-center gap-2 text-gray-500"},wv={key:1,class:"space-y-3"},kv={class:"flex items-center gap-3"},$v={class:"text-lg"},Sv={class:"font-medium text-gray-900"},_v={key:0,class:"text-xs text-gray-500"},Cv=["disabled","onClick"],Iv={key:0,class:"animate-spin h-3 w-3",viewBox:"0 0 24 24"},Tv={key:1,class:"text-xs text-gray-500"},Pv={key:2,class:"mt-4 bg-gray-900 text-gray-300 rounded-lg p-4 text-xs font-mono max-h-40 overflow-y-auto"},Rv={key:0,class:"flex items-center gap-2 text-gray-400"},Av={key:2,class:"space-y-5"},Dv={class:"block text-sm font-medium text-gray-700 mb-1"},Ev=["placeholder"],Lv={class:"mt-1 text-xs text-gray-500"},Fv={class:"block text-sm font-medium text-gray-700 mb-1"},Mv=["placeholder"],jv={class:"mt-1 text-xs text-gray-500"},Ov={class:"grid grid-cols-2 gap-4"},Nv={class:"block text-sm font-medium text-gray-700 mb-1"},Bv={class:"block text-sm font-medium text-gray-700 mb-1"},Uv={class:"block text-sm font-medium text-gray-700 mb-1"},Vv={class:"block text-sm font-medium text-gray-700 mb-1"},Hv=["placeholder"],zv={key:3,class:"space-y-5"},qv={class:"block text-sm font-medium text-gray-700 mb-1"},Kv={class:"block text-sm font-medium text-gray-700 mb-1"},Gv={class:"flex gap-2"},Wv=["placeholder"],Jv=["disabled"],Zv={key:0,class:"mt-1 text-xs text-green-600"},Qv={key:1,class:"mt-1 text-xs text-red-600"},Yv={class:"block text-sm font-medium text-gray-700 mb-1"},Xv={class:"flex gap-2"},ex=["placeholder"],tx=["disabled"],sx={key:0,class:"mt-1 text-xs text-green-600"},nx={key:1,class:"mt-1 text-xs text-red-600"},rx={key:4,class:"space-y-5"},ox={class:"block text-sm font-medium text-gray-700 mb-3"},ix={class:"grid grid-cols-3 gap-3"},lx={class:"font-medium"},ax={class:"text-xs text-gray-500 mt-1"},ux={class:"font-medium"},cx={class:"text-xs text-gray-500 mt-1"},dx={class:"font-medium"},px={class:"text-xs text-gray-500 mt-1"},fx={class:"block text-sm font-medium text-gray-700 mb-1"},gx={class:"space-y-2"},hx={class:"text-sm font-medium text-gray-700"},mx={class:"flex items-center gap-2"},bx={class:"text-sm"},yx={key:0,class:"text-xs text-gray-500"},vx=["disabled","onClick"],xx={key:0,class:"animate-spin h-3 w-3",viewBox:"0 0 24 24"},wx={key:0,class:"bg-gray-900 text-gray-300 rounded-lg p-4 text-xs font-mono max-h-32 overflow-y-auto"},kx={key:0,class:"flex items-center gap-2 text-gray-400"},$x={key:5,class:"space-y-5"},Sx={class:"grid grid-cols-2 gap-4"},_x={class:"block text-sm font-medium text-gray-700 mb-1"},Cx={class:"block text-sm font-medium text-gray-700 mb-1"},Ix={class:"grid grid-cols-2 gap-4"},Tx={class:"block text-sm font-medium text-gray-700 mb-1"},Px={class:"block text-sm font-medium text-gray-700 mb-1"},Rx={class:"grid grid-cols-2 gap-4"},Ax={class:"block text-sm font-medium text-gray-700 mb-1"},Dx={class:"block text-sm font-medium text-gray-700 mb-1"},Ex={value:"auto"},Lx={value:"classic"},Fx={value:"plan-mode"},Mx={class:"flex items-center gap-2"},jx={for:"review-enabled",class:"text-sm text-gray-700"},Ox={class:"block text-sm font-medium text-gray-700 mb-1"},Nx={class:"mt-1 text-xs text-gray-500"},Bx={key:6,class:"space-y-5"},Ux={class:"text-sm text-gray-600"},Vx={class:"bg-gray-900 text-gray-300 rounded-lg p-4 text-xs font-mono max-h-80 overflow-y-auto whitespace-pre-wrap"},Hx={class:"px-8 py-4 bg-gray-50 border-t flex items-center justify-between"},zx={key:1},qx=["disabled"],Kx=["disabled"],Gx=Ae({__name:"SetupWizard",setup(e){const{t,locale:s,setLocale:n}=Jt(),{currentStep:r,totalSteps:o,loading:i,error:a,form:u,dependencies:g,tokenValid:d,tokenUser:f,repoValid:y,repoInfo:w,configPreview:k,installLogs:_,installing:R,installingDep:P,setupComplete:T,savedConfigPath:q,canProceed:D,checkEnv:$,validateToken:v,validateRepo:C,installDep:F,completeSetup:x,nextStep:I,prevStep:z}=nv(),K=$e(()=>[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 Pt(()=>{$()}),ft(()=>u.ai.mode,()=>{$()}),(O,M)=>(h(),b("div",rv,[c(T)?(h(),b("div",ov,[M[28]||(M[28]=l("div",{class:"text-5xl mb-4"},"✅",-1)),l("h2",iv,p(O.$t("setup.complete.title")),1),l("p",lv,p(O.$t("setup.complete.savedTo")),1),l("code",av,p(c(q)),1),l("p",uv,p(O.$t("setup.complete.startHint")),1),M[29]||(M[29]=l("code",{class:"block bg-gray-900 text-green-400 rounded-lg p-3 text-sm mt-2"}," issue-auto-finish start ",-1))])):(h(),b("div",cv,[l("div",dv,[l("div",pv,[l("h1",fv,p(O.$t("setup.title")),1),l("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:M[0]||(M[0]=E=>c(n)(c(s)==="zh-CN"?"en":"zh-CN"))},p(c(s)==="zh-CN"?"EN":"中文"),3)]),l("p",gv,p(K.value[c(r)])+" ("+p(c(r)+1)+"/"+p(c(o))+")",1),l("div",hv,[(h(!0),b(re,null,Te(c(o),E=>(h(),b("div",{key:E,class:te(["h-1 flex-1 rounded-full transition-colors",E-1<=c(r)?"bg-blue-400":"bg-gray-700"])},null,2))),128))])]),l("div",mv,[c(a)?(h(),b("div",bv,p(c(a)),1)):N("",!0),c(r)===0?(h(),b("div",yv,[l("p",vv,p(O.$t("setup.env.checking")),1),c(i)?(h(),b("div",xv,[M[30]||(M[30]=l("svg",{class:"animate-spin h-5 w-5",viewBox:"0 0 24 24"},[l("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"}),l("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),le(" "+p(O.$t("setup.env.checkingShort")),1)])):(h(),b("div",wv,[(h(!0),b(re,null,Te(c(g),E=>(h(),b("div",{key:E.name,class:te(["flex items-center justify-between p-3 rounded-lg border",E.installed?"border-green-200 bg-green-50":E.required?"border-red-200 bg-red-50":"border-yellow-200 bg-yellow-50"])},[l("div",kv,[l("span",$v,p(E.installed?"✅":E.required?"❌":"⚠️"),1),l("div",null,[l("div",Sv,p(E.displayName),1),E.version?(h(),b("div",_v,"v"+p(E.version),1)):N("",!0)])]),!E.installed&&E.installCommand?(h(),b("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(R),onClick:ae=>c(F)(E.name)},[c(P)===E.name?(h(),b("svg",Iv,[...M[31]||(M[31]=[l("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),l("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):N("",!0),le(" "+p(c(P)===E.name?O.$t("setup.env.installing"):O.$t("setup.env.install")),1)],8,Cv)):E.installed?N("",!0):(h(),b("span",Tv,p(E.installHint),1))],2))),128))])),c(R)||c(_).length?(h(),b("div",Pv,[c(R)&&!c(_).length?(h(),b("div",Rv,[M[32]||(M[32]=l("svg",{class:"animate-spin h-3.5 w-3.5",viewBox:"0 0 24 24"},[l("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"}),l("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),le(" "+p(O.$t("setup.env.waitingOutput")),1)])):N("",!0),(h(!0),b(re,null,Te(c(_),(E,ae)=>(h(),b("div",{key:ae},p(E),1))),128))])):N("",!0),l("button",{class:"mt-4 text-sm text-blue-600 hover:underline",onClick:M[1]||(M[1]=(...E)=>c($)&&c($)(...E))},p(O.$t("setup.env.refresh")),1)])):N("",!0),c(r)===1?(h(),b("div",Av,[l("div",null,[l("label",Dv,p(O.$t("setup.project.workDir")),1),ie(l("input",{"onUpdate:modelValue":M[2]||(M[2]=E=>c(u).project.workDir=E),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:O.$t("setup.project.workDirPlaceholder")},null,8,Ev),[[fe,c(u).project.workDir]]),l("p",Lv,p(O.$t("setup.project.workDirHint")),1)]),l("div",null,[l("label",Fv,p(O.$t("setup.project.gitRootDir")),1),ie(l("input",{"onUpdate:modelValue":M[3]||(M[3]=E=>c(u).project.gitRootDir=E),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:O.$t("setup.project.gitRootDirPlaceholder")},null,8,Mv),[[fe,c(u).project.gitRootDir]]),l("p",jv,p(O.$t("setup.project.gitRootDirHint")),1)]),l("div",Ov,[l("div",null,[l("label",Nv,p(O.$t("setup.project.baseBranch")),1),ie(l("input",{"onUpdate:modelValue":M[4]||(M[4]=E=>c(u).project.baseBranch=E),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),[[fe,c(u).project.baseBranch]])]),l("div",null,[l("label",Bv,p(O.$t("setup.project.branchPrefix")),1),ie(l("input",{"onUpdate:modelValue":M[5]||(M[5]=E=>c(u).project.branchPrefix=E),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),[[fe,c(u).project.branchPrefix]])])]),l("div",null,[l("label",Uv,p(O.$t("setup.project.worktreeBaseDir")),1),ie(l("input",{"onUpdate:modelValue":M[6]||(M[6]=E=>c(u).project.worktreeBaseDir=E),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),[[fe,c(u).project.worktreeBaseDir]])]),l("div",null,[l("label",Vv,p(O.$t("setup.project.projectSubDir")),1),ie(l("input",{"onUpdate:modelValue":M[7]||(M[7]=E=>c(u).project.projectSubDir=E),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:O.$t("setup.project.projectSubDirPlaceholder")},null,8,Hv),[[fe,c(u).project.projectSubDir]])])])):N("",!0),c(r)===2?(h(),b("div",zv,[l("div",null,[l("label",qv,p(O.$t("setup.gongfeng.apiUrl")),1),ie(l("input",{"onUpdate:modelValue":M[8]||(M[8]=E=>c(u).gongfeng.apiUrl=E),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),[[fe,c(u).gongfeng.apiUrl]])]),l("div",null,[l("label",Kv,p(O.$t("setup.gongfeng.privateToken")),1),l("div",Gv,[ie(l("input",{"onUpdate:modelValue":M[9]||(M[9]=E=>c(u).gongfeng.privateToken=E),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:O.$t("setup.gongfeng.tokenPlaceholder")},null,8,Wv),[[fe,c(u).gongfeng.privateToken]]),l("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:M[10]||(M[10]=(...E)=>c(v)&&c(v)(...E))},p(O.$t("setup.gongfeng.verify")),9,Jv)]),c(d)===!0?(h(),b("div",Zv," ✅ "+p(O.$t("setup.gongfeng.tokenValid"))+p(c(f)?.name?` (${c(f).name})`:""),1)):c(d)===!1?(h(),b("div",Qv," ❌ "+p(O.$t("setup.gongfeng.tokenInvalid")),1)):N("",!0)]),l("div",null,[l("label",Yv,p(O.$t("setup.gongfeng.projectPath")),1),l("div",Xv,[ie(l("input",{"onUpdate:modelValue":M[11]||(M[11]=E=>c(u).gongfeng.projectPath=E),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:O.$t("setup.gongfeng.projectPathPlaceholder")},null,8,ex),[[fe,c(u).gongfeng.projectPath]]),l("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:M[12]||(M[12]=(...E)=>c(C)&&c(C)(...E))},p(O.$t("setup.gongfeng.verify")),9,tx)]),c(y)===!0?(h(),b("div",sx," ✅ "+p(O.$t("setup.gongfeng.repoFound"))+p(c(w)?.name?`: ${c(w).name}`:""),1)):c(y)===!1?(h(),b("div",nx," ❌ "+p(O.$t("setup.gongfeng.repoNotFound")),1)):N("",!0)])])):N("",!0),c(r)===3?(h(),b("div",rx,[l("div",null,[l("label",ox,p(O.$t("setup.ai.modeLabel")),1),l("div",ix,[l("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:M[13]||(M[13]=E=>c(u).ai.mode="claude-internal")},[l("div",lx,p(O.$t("setup.ai.claudeInternal")),1),l("div",ax,p(O.$t("setup.ai.claudeInternalDesc")),1)],2),l("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:M[14]||(M[14]=E=>c(u).ai.mode="cursor-agent")},[l("div",ux,p(O.$t("setup.ai.cursorAgent")),1),l("div",cx,p(O.$t("setup.ai.cursorAgentDesc")),1)],2),l("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:M[15]||(M[15]=E=>c(u).ai.mode="codebuddy")},[l("div",dx,p(O.$t("setup.ai.codebuddy")),1),l("div",px,p(O.$t("setup.ai.codebuddyDesc")),1)],2)])]),l("div",null,[l("label",fx,p(O.$t("setup.ai.model")),1),ie(l("input",{"onUpdate:modelValue":M[16]||(M[16]=E=>c(u).ai.model=E),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),[[fe,c(u).ai.model]])]),l("div",gx,[l("p",hx,p(O.$t("setup.ai.cliStatus")),1),(h(!0),b(re,null,Te(c(g).filter(E=>E.name==="claude-internal"||E.name==="cursor"||E.name==="codebuddy"),E=>(h(),b("div",{key:E.name,class:te(["flex items-center justify-between p-3 rounded-lg border",E.installed?"border-green-200 bg-green-50":"border-yellow-200 bg-yellow-50"])},[l("div",mx,[l("span",null,p(E.installed?"✅":"⚠️"),1),l("span",bx,p(E.displayName),1),E.version?(h(),b("span",yx,"v"+p(E.version),1)):N("",!0)]),!E.installed&&E.installCommand?(h(),b("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(R),onClick:ae=>c(F)(E.name)},[c(P)===E.name?(h(),b("svg",xx,[...M[33]||(M[33]=[l("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),l("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):N("",!0),le(" "+p(c(P)===E.name?O.$t("setup.env.installing"):O.$t("setup.env.install")),1)],8,vx)):N("",!0)],2))),128))]),c(R)||c(_).length?(h(),b("div",wx,[c(R)&&!c(_).length?(h(),b("div",kx,[M[34]||(M[34]=l("svg",{class:"animate-spin h-3.5 w-3.5",viewBox:"0 0 24 24"},[l("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"}),l("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),le(" "+p(O.$t("setup.env.waitingOutput")),1)])):N("",!0),(h(!0),b(re,null,Te(c(_),(E,ae)=>(h(),b("div",{key:ae},p(E),1))),128))])):N("",!0)])):N("",!0),c(r)===4?(h(),b("div",$x,[l("div",Sx,[l("div",null,[l("label",_x,p(O.$t("setup.advanced.discoveryInterval")),1),ie(l("input",{"onUpdate:modelValue":M[17]||(M[17]=E=>c(u).poll.discoveryIntervalMs=E),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),[[fe,c(u).poll.discoveryIntervalMs,void 0,{number:!0}]])]),l("div",null,[l("label",Cx,p(O.$t("setup.advanced.driveInterval")),1),ie(l("input",{"onUpdate:modelValue":M[18]||(M[18]=E=>c(u).poll.driveIntervalMs=E),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),[[fe,c(u).poll.driveIntervalMs,void 0,{number:!0}]])])]),l("div",Ix,[l("div",null,[l("label",Tx,p(O.$t("setup.advanced.maxRetries")),1),ie(l("input",{"onUpdate:modelValue":M[19]||(M[19]=E=>c(u).poll.maxRetries=E),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),[[fe,c(u).poll.maxRetries,void 0,{number:!0}]])]),l("div",null,[l("label",Px,p(O.$t("setup.advanced.maxConcurrent")),1),ie(l("input",{"onUpdate:modelValue":M[20]||(M[20]=E=>c(u).poll.maxConcurrent=E),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),[[fe,c(u).poll.maxConcurrent,void 0,{number:!0}]])])]),l("div",Rx,[l("div",null,[l("label",Ax,p(O.$t("setup.advanced.webPort")),1),ie(l("input",{"onUpdate:modelValue":M[21]||(M[21]=E=>c(u).web.port=E),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),[[fe,c(u).web.port,void 0,{number:!0}]])]),l("div",null,[l("label",Dx,p(O.$t("setup.advanced.pipelineMode")),1),ie(l("select",{"onUpdate:modelValue":M[22]||(M[22]=E=>c(u).pipeline.mode=E),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"},[l("option",Ex,p(O.$t("setup.advanced.pipelineAuto")),1),l("option",Lx,p(O.$t("setup.advanced.pipelineClassic")),1),l("option",Fx,p(O.$t("setup.advanced.pipelinePlanMode")),1)],512),[[rl,c(u).pipeline.mode]])])]),l("div",Mx,[ie(l("input",{id:"review-enabled","onUpdate:modelValue":M[23]||(M[23]=E=>c(u).review.enabled=E),type:"checkbox",class:"rounded border-gray-300"},null,512),[[rn,c(u).review.enabled]]),l("label",jx,p(O.$t("setup.advanced.enableReview")),1)]),l("div",null,[l("label",Ox,p(O.$t("setup.advanced.phaseTimeout")),1),ie(l("input",{"onUpdate:modelValue":M[24]||(M[24]=E=>c(u).ai.phaseTimeoutMs=E),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),[[fe,c(u).ai.phaseTimeoutMs,void 0,{number:!0}]]),l("p",Nx,p(O.$t("setup.advanced.phaseTimeoutHint")),1)])])):N("",!0),c(r)===5?(h(),b("div",Bx,[l("p",Ux,p(O.$t("setup.confirm.reviewHint")),1),l("pre",Vx,p(c(k)),1)])):N("",!0)]),l("div",Hx,[c(r)>0?(h(),b("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:M[25]||(M[25]=(...E)=>c(z)&&c(z)(...E))},p(O.$t("setup.nav.back")),1)):(h(),b("div",zx)),c(r)<c(o)-1?(h(),b("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(D),onClick:M[26]||(M[26]=(...E)=>c(I)&&c(I)(...E))},p(O.$t("setup.nav.next")),9,qx)):(h(),b("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(i),onClick:M[27]||(M[27]=(...E)=>c(x)&&c(x)(...E))},p(c(i)?O.$t("setup.nav.saving"):O.$t("setup.nav.complete")),9,Kx))])]))]))}});async function Wx(){try{const e=await fetch("/api/setup/status");if(e.ok&&!(await e.json()).initialized){Ro(Gx).use(Fo).mount("#app");return}}catch{}Ro(sv).use(Fo).mount("#app")}Wx();