@mcp-graph-workflow/mcp-graph 5.0.1 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/graph-tab-D4R3Zj8V.js","assets/graph-utils-CBs6HePT.js","assets/constants-BIEJOBya.js","assets/graph-utils-BZV40eAE.css","assets/prd-backlog-tab-Bvq2csmq.js","assets/gitnexus-tab-QrcoXX90.js","assets/gitnexus-tab-DEqMBSbC.css","assets/insights-tab-CJ0BiuRB.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/graph-tab-Pra4HkGL.js","assets/graph-utils-CIQgj2HC.js","assets/constants-BIEJOBya.js","assets/graph-utils-BZV40eAE.css","assets/prd-backlog-tab-B8vVDCL4.js","assets/gitnexus-tab-Bkd-APRz.js","assets/gitnexus-tab-DEqMBSbC.css","assets/insights-tab-D7Zubtyb.js"])))=>i.map(i=>d[i]);
2
2
  var av=Object.defineProperty;var uv=(m,_,A)=>_ in m?av(m,_,{enumerable:!0,configurable:!0,writable:!0,value:A}):m[_]=A;var Ln=(m,_,A)=>uv(m,typeof _!="symbol"?_+"":_,A);(function(){const _=document.createElement("link").relList;if(_&&_.supports&&_.supports("modulepreload"))return;for(const D of document.querySelectorAll('link[rel="modulepreload"]'))s(D);new MutationObserver(D=>{for(const q of D)if(q.type==="childList")for(const G of q.addedNodes)G.tagName==="LINK"&&G.rel==="modulepreload"&&s(G)}).observe(document,{childList:!0,subtree:!0});function A(D){const q={};return D.integrity&&(q.integrity=D.integrity),D.referrerPolicy&&(q.referrerPolicy=D.referrerPolicy),D.crossOrigin==="use-credentials"?q.credentials="include":D.crossOrigin==="anonymous"?q.credentials="omit":q.credentials="same-origin",q}function s(D){if(D.ep)return;D.ep=!0;const q=A(D);fetch(D.href,q)}})();function nv(m){return m&&m.__esModule&&Object.prototype.hasOwnProperty.call(m,"default")?m.default:m}var sf={exports:{}},pu={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
@@ -50,4 +50,4 @@ Error generating stack: `+a.message+`
50
50
  `).replace(_0,"")}function Gd(l,t){return t=Yd(t),Yd(l)===t}function rl(l,t,e,a,u,n){switch(e){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Fe(l,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Fe(l,""+a);break;case"className":Uu(l,"class",a);break;case"tabIndex":Uu(l,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Uu(l,e,a);break;case"style":Yf(l,a,n);break;case"data":if(t!=="object"){Uu(l,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||e!=="href")){l.removeAttribute(e);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){l.removeAttribute(e);break}a=Cu(""+a),l.setAttribute(e,a);break;case"action":case"formAction":if(typeof a=="function"){l.setAttribute(e,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof n=="function"&&(e==="formAction"?(t!=="input"&&rl(l,t,"name",u.name,u,null),rl(l,t,"formEncType",u.formEncType,u,null),rl(l,t,"formMethod",u.formMethod,u,null),rl(l,t,"formTarget",u.formTarget,u,null)):(rl(l,t,"encType",u.encType,u,null),rl(l,t,"method",u.method,u,null),rl(l,t,"target",u.target,u,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){l.removeAttribute(e);break}a=Cu(""+a),l.setAttribute(e,a);break;case"onClick":a!=null&&(l.onclick=Rt);break;case"onScroll":a!=null&&$("scroll",l);break;case"onScrollEnd":a!=null&&$("scrollend",l);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(s(61));if(e=a.__html,e!=null){if(u.children!=null)throw Error(s(60));l.innerHTML=e}}break;case"multiple":l.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":l.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){l.removeAttribute("xlink:href");break}e=Cu(""+a),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?l.setAttribute(e,""+a):l.removeAttribute(e);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?l.setAttribute(e,""):l.removeAttribute(e);break;case"capture":case"download":a===!0?l.setAttribute(e,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?l.setAttribute(e,a):l.removeAttribute(e);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?l.setAttribute(e,a):l.removeAttribute(e);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?l.removeAttribute(e):l.setAttribute(e,a);break;case"popover":$("beforetoggle",l),$("toggle",l),Nu(l,"popover",a);break;case"xlinkActuate":Ct(l,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Ct(l,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Ct(l,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Ct(l,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Ct(l,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Ct(l,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Ct(l,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Ct(l,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Ct(l,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Nu(l,"is",a);break;case"innerText":case"textContent":break;default:(!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(e=Pr.get(e)||e,Nu(l,e,a))}}function Vi(l,t,e,a,u,n){switch(e){case"style":Yf(l,a,n);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(s(61));if(e=a.__html,e!=null){if(u.children!=null)throw Error(s(60));l.innerHTML=e}}break;case"children":typeof a=="string"?Fe(l,a):(typeof a=="number"||typeof a=="bigint")&&Fe(l,""+a);break;case"onScroll":a!=null&&$("scroll",l);break;case"onScrollEnd":a!=null&&$("scrollend",l);break;case"onClick":a!=null&&(l.onclick=Rt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Mf.hasOwnProperty(e))l:{if(e[0]==="o"&&e[1]==="n"&&(u=e.endsWith("Capture"),t=e.slice(2,u?e.length-7:void 0),n=l[Wl]||null,n=n!=null?n[e]:null,typeof n=="function"&&l.removeEventListener(t,n,u),typeof a=="function")){typeof n!="function"&&n!==null&&(e in l?l[e]=null:l.hasAttribute(e)&&l.removeAttribute(e)),l.addEventListener(t,a,u);break l}e in l?l[e]=a:a===!0?l.setAttribute(e,""):Nu(l,e,a)}}}function Xl(l,t,e){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":$("error",l),$("load",l);var a=!1,u=!1,n;for(n in e)if(e.hasOwnProperty(n)){var c=e[n];if(c!=null)switch(n){case"src":a=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:rl(l,t,n,c,e,null)}}u&&rl(l,t,"srcSet",e.srcSet,e,null),a&&rl(l,t,"src",e.src,e,null);return;case"input":$("invalid",l);var i=n=c=u=null,f=null,y=null;for(a in e)if(e.hasOwnProperty(a)){var b=e[a];if(b!=null)switch(a){case"name":u=b;break;case"type":c=b;break;case"checked":f=b;break;case"defaultChecked":y=b;break;case"value":n=b;break;case"defaultValue":i=b;break;case"children":case"dangerouslySetInnerHTML":if(b!=null)throw Error(s(137,t));break;default:rl(l,t,a,b,e,null)}}Rf(l,n,i,f,y,c,u,!1);return;case"select":$("invalid",l),a=c=n=null;for(u in e)if(e.hasOwnProperty(u)&&(i=e[u],i!=null))switch(u){case"value":n=i;break;case"defaultValue":c=i;break;case"multiple":a=i;default:rl(l,t,u,i,e,null)}t=n,e=c,l.multiple=!!a,t!=null?$e(l,!!a,t,!1):e!=null&&$e(l,!!a,e,!0);return;case"textarea":$("invalid",l),n=u=a=null;for(c in e)if(e.hasOwnProperty(c)&&(i=e[c],i!=null))switch(c){case"value":a=i;break;case"defaultValue":u=i;break;case"children":n=i;break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(s(91));break;default:rl(l,t,c,i,e,null)}qf(l,a,u,n);return;case"option":for(f in e)if(e.hasOwnProperty(f)&&(a=e[f],a!=null))switch(f){case"selected":l.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:rl(l,t,f,a,e,null)}return;case"dialog":$("beforetoggle",l),$("toggle",l),$("cancel",l),$("close",l);break;case"iframe":case"object":$("load",l);break;case"video":case"audio":for(a=0;a<mu.length;a++)$(mu[a],l);break;case"image":$("error",l),$("load",l);break;case"details":$("toggle",l);break;case"embed":case"source":case"link":$("error",l),$("load",l);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(y in e)if(e.hasOwnProperty(y)&&(a=e[y],a!=null))switch(y){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:rl(l,t,y,a,e,null)}return;default:if(uc(t)){for(b in e)e.hasOwnProperty(b)&&(a=e[b],a!==void 0&&Vi(l,t,b,a,e,void 0));return}}for(i in e)e.hasOwnProperty(i)&&(a=e[i],a!=null&&rl(l,t,i,a,e,null))}function O0(l,t,e,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,n=null,c=null,i=null,f=null,y=null,b=null;for(g in e){var p=e[g];if(e.hasOwnProperty(g)&&p!=null)switch(g){case"checked":break;case"value":break;case"defaultValue":f=p;default:a.hasOwnProperty(g)||rl(l,t,g,null,a,p)}}for(var h in a){var g=a[h];if(p=e[h],a.hasOwnProperty(h)&&(g!=null||p!=null))switch(h){case"type":n=g;break;case"name":u=g;break;case"checked":y=g;break;case"defaultChecked":b=g;break;case"value":c=g;break;case"defaultValue":i=g;break;case"children":case"dangerouslySetInnerHTML":if(g!=null)throw Error(s(137,t));break;default:g!==p&&rl(l,t,h,g,a,p)}}ec(l,c,i,f,y,b,n,u);return;case"select":g=c=i=h=null;for(n in e)if(f=e[n],e.hasOwnProperty(n)&&f!=null)switch(n){case"value":break;case"multiple":g=f;default:a.hasOwnProperty(n)||rl(l,t,n,null,a,f)}for(u in a)if(n=a[u],f=e[u],a.hasOwnProperty(u)&&(n!=null||f!=null))switch(u){case"value":h=n;break;case"defaultValue":i=n;break;case"multiple":c=n;default:n!==f&&rl(l,t,u,n,a,f)}t=i,e=c,a=g,h!=null?$e(l,!!e,h,!1):!!a!=!!e&&(t!=null?$e(l,!!e,t,!0):$e(l,!!e,e?[]:"",!1));return;case"textarea":g=h=null;for(i in e)if(u=e[i],e.hasOwnProperty(i)&&u!=null&&!a.hasOwnProperty(i))switch(i){case"value":break;case"children":break;default:rl(l,t,i,null,a,u)}for(c in a)if(u=a[c],n=e[c],a.hasOwnProperty(c)&&(u!=null||n!=null))switch(c){case"value":h=u;break;case"defaultValue":g=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(s(91));break;default:u!==n&&rl(l,t,c,u,a,n)}Hf(l,h,g);return;case"option":for(var j in e)if(h=e[j],e.hasOwnProperty(j)&&h!=null&&!a.hasOwnProperty(j))switch(j){case"selected":l.selected=!1;break;default:rl(l,t,j,null,a,h)}for(f in a)if(h=a[f],g=e[f],a.hasOwnProperty(f)&&h!==g&&(h!=null||g!=null))switch(f){case"selected":l.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:rl(l,t,f,h,a,g)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Q in e)h=e[Q],e.hasOwnProperty(Q)&&h!=null&&!a.hasOwnProperty(Q)&&rl(l,t,Q,null,a,h);for(y in a)if(h=a[y],g=e[y],a.hasOwnProperty(y)&&h!==g&&(h!=null||g!=null))switch(y){case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(s(137,t));break;default:rl(l,t,y,h,a,g)}return;default:if(uc(t)){for(var ml in e)h=e[ml],e.hasOwnProperty(ml)&&h!==void 0&&!a.hasOwnProperty(ml)&&Vi(l,t,ml,void 0,a,h);for(b in a)h=a[b],g=e[b],!a.hasOwnProperty(b)||h===g||h===void 0&&g===void 0||Vi(l,t,b,h,a,g);return}}for(var r in e)h=e[r],e.hasOwnProperty(r)&&h!=null&&!a.hasOwnProperty(r)&&rl(l,t,r,null,a,h);for(p in a)h=a[p],g=e[p],!a.hasOwnProperty(p)||h===g||h==null&&g==null||rl(l,t,p,h,a,g)}function Xd(l){switch(l){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function x0(){if(typeof performance.getEntriesByType=="function"){for(var l=0,t=0,e=performance.getEntriesByType("resource"),a=0;a<e.length;a++){var u=e[a],n=u.transferSize,c=u.initiatorType,i=u.duration;if(n&&i&&Xd(c)){for(c=0,i=u.responseEnd,a+=1;a<e.length;a++){var f=e[a],y=f.startTime;if(y>i)break;var b=f.transferSize,p=f.initiatorType;b&&Xd(p)&&(f=f.responseEnd,c+=b*(f<i?1:(i-y)/(f-y)))}if(--a,t+=8*(n+c)/(u.duration/1e3),l++,10<l)break}}if(0<l)return t/l/1e6}return navigator.connection&&(l=navigator.connection.downlink,typeof l=="number")?l:5}var Ki=null,Ji=null;function Mn(l){return l.nodeType===9?l:l.ownerDocument}function Qd(l){switch(l){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Zd(l,t){if(l===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return l===1&&t==="foreignObject"?0:l}function wi(l,t){return l==="textarea"||l==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wi=null;function D0(){var l=window.event;return l&&l.type==="popstate"?l===Wi?!1:(Wi=l,!0):(Wi=null,!1)}var Ld=typeof setTimeout=="function"?setTimeout:void 0,M0=typeof clearTimeout=="function"?clearTimeout:void 0,Vd=typeof Promise=="function"?Promise:void 0,N0=typeof queueMicrotask=="function"?queueMicrotask:typeof Vd<"u"?function(l){return Vd.resolve(null).then(l).catch(U0)}:Ld;function U0(l){setTimeout(function(){throw l})}function he(l){return l==="head"}function Kd(l,t){var e=t,a=0;do{var u=e.nextSibling;if(l.removeChild(e),u&&u.nodeType===8)if(e=u.data,e==="/$"||e==="/&"){if(a===0){l.removeChild(u),Da(t);return}a--}else if(e==="$"||e==="$?"||e==="$~"||e==="$!"||e==="&")a++;else if(e==="html")yu(l.ownerDocument.documentElement);else if(e==="head"){e=l.ownerDocument.head,yu(e);for(var n=e.firstChild;n;){var c=n.nextSibling,i=n.nodeName;n[Ca]||i==="SCRIPT"||i==="STYLE"||i==="LINK"&&n.rel.toLowerCase()==="stylesheet"||e.removeChild(n),n=c}}else e==="body"&&yu(l.ownerDocument.body);e=u}while(e);Da(t)}function Jd(l,t){var e=l;l=0;do{var a=e.nextSibling;if(e.nodeType===1?t?(e._stashedDisplay=e.style.display,e.style.display="none"):(e.style.display=e._stashedDisplay||"",e.getAttribute("style")===""&&e.removeAttribute("style")):e.nodeType===3&&(t?(e._stashedText=e.nodeValue,e.nodeValue=""):e.nodeValue=e._stashedText||""),a&&a.nodeType===8)if(e=a.data,e==="/$"){if(l===0)break;l--}else e!=="$"&&e!=="$?"&&e!=="$~"&&e!=="$!"||l++;e=a}while(e)}function ki(l){var t=l.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var e=t;switch(t=t.nextSibling,e.nodeName){case"HTML":case"HEAD":case"BODY":ki(e),lc(e);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(e.rel.toLowerCase()==="stylesheet")continue}l.removeChild(e)}}function j0(l,t,e,a){for(;l.nodeType===1;){var u=e;if(l.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(l.nodeName!=="INPUT"||l.type!=="hidden"))break}else if(a){if(!l[Ca])switch(t){case"meta":if(!l.hasAttribute("itemprop"))break;return l;case"link":if(n=l.getAttribute("rel"),n==="stylesheet"&&l.hasAttribute("data-precedence"))break;if(n!==u.rel||l.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||l.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||l.getAttribute("title")!==(u.title==null?null:u.title))break;return l;case"style":if(l.hasAttribute("data-precedence"))break;return l;case"script":if(n=l.getAttribute("src"),(n!==(u.src==null?null:u.src)||l.getAttribute("type")!==(u.type==null?null:u.type)||l.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&n&&l.hasAttribute("async")&&!l.hasAttribute("itemprop"))break;return l;default:return l}}else if(t==="input"&&l.type==="hidden"){var n=u.name==null?null:""+u.name;if(u.type==="hidden"&&l.getAttribute("name")===n)return l}else return l;if(l=bt(l.nextSibling),l===null)break}return null}function C0(l,t,e){if(t==="")return null;for(;l.nodeType!==3;)if((l.nodeType!==1||l.nodeName!=="INPUT"||l.type!=="hidden")&&!e||(l=bt(l.nextSibling),l===null))return null;return l}function wd(l,t){for(;l.nodeType!==8;)if((l.nodeType!==1||l.nodeName!=="INPUT"||l.type!=="hidden")&&!t||(l=bt(l.nextSibling),l===null))return null;return l}function $i(l){return l.data==="$?"||l.data==="$~"}function Fi(l){return l.data==="$!"||l.data==="$?"&&l.ownerDocument.readyState!=="loading"}function R0(l,t){var e=l.ownerDocument;if(l.data==="$~")l._reactRetry=t;else if(l.data!=="$?"||e.readyState!=="loading")t();else{var a=function(){t(),e.removeEventListener("DOMContentLoaded",a)};e.addEventListener("DOMContentLoaded",a),l._reactRetry=a}}function bt(l){for(;l!=null;l=l.nextSibling){var t=l.nodeType;if(t===1||t===3)break;if(t===8){if(t=l.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return l}var Ii=null;function Wd(l){l=l.nextSibling;for(var t=0;l;){if(l.nodeType===8){var e=l.data;if(e==="/$"||e==="/&"){if(t===0)return bt(l.nextSibling);t--}else e!=="$"&&e!=="$!"&&e!=="$?"&&e!=="$~"&&e!=="&"||t++}l=l.nextSibling}return null}function kd(l){l=l.previousSibling;for(var t=0;l;){if(l.nodeType===8){var e=l.data;if(e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"){if(t===0)return l;t--}else e!=="/$"&&e!=="/&"||t++}l=l.previousSibling}return null}function $d(l,t,e){switch(t=Mn(e),l){case"html":if(l=t.documentElement,!l)throw Error(s(452));return l;case"head":if(l=t.head,!l)throw Error(s(453));return l;case"body":if(l=t.body,!l)throw Error(s(454));return l;default:throw Error(s(451))}}function yu(l){for(var t=l.attributes;t.length;)l.removeAttributeNode(t[0]);lc(l)}var Tt=new Map,Fd=new Set;function Nn(l){return typeof l.getRootNode=="function"?l.getRootNode():l.nodeType===9?l:l.ownerDocument}var $t=N.d;N.d={f:H0,r:q0,D:B0,C:Y0,L:G0,m:X0,X:Z0,S:Q0,M:L0};function H0(){var l=$t.f(),t=En();return l||t}function q0(l){var t=we(l);t!==null&&t.tag===5&&t.type==="form"?vo(t):$t.r(l)}var _a=typeof document>"u"?null:document;function Id(l,t,e){var a=_a;if(a&&typeof t=="string"&&t){var u=rt(t);u='link[rel="'+l+'"][href="'+u+'"]',typeof e=="string"&&(u+='[crossorigin="'+e+'"]'),Fd.has(u)||(Fd.add(u),l={rel:l,crossOrigin:e,href:t},a.querySelector(u)===null&&(t=a.createElement("link"),Xl(t,"link",l),Rl(t),a.head.appendChild(t)))}}function B0(l){$t.D(l),Id("dns-prefetch",l,null)}function Y0(l,t){$t.C(l,t),Id("preconnect",l,t)}function G0(l,t,e){$t.L(l,t,e);var a=_a;if(a&&l&&t){var u='link[rel="preload"][as="'+rt(t)+'"]';t==="image"&&e&&e.imageSrcSet?(u+='[imagesrcset="'+rt(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(u+='[imagesizes="'+rt(e.imageSizes)+'"]')):u+='[href="'+rt(l)+'"]';var n=u;switch(t){case"style":n=Oa(l);break;case"script":n=xa(l)}Tt.has(n)||(l=x({rel:"preload",href:t==="image"&&e&&e.imageSrcSet?void 0:l,as:t},e),Tt.set(n,l),a.querySelector(u)!==null||t==="style"&&a.querySelector(hu(n))||t==="script"&&a.querySelector(gu(n))||(t=a.createElement("link"),Xl(t,"link",l),Rl(t),a.head.appendChild(t)))}}function X0(l,t){$t.m(l,t);var e=_a;if(e&&l){var a=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+rt(a)+'"][href="'+rt(l)+'"]',n=u;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=xa(l)}if(!Tt.has(n)&&(l=x({rel:"modulepreload",href:l},t),Tt.set(n,l),e.querySelector(u)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(gu(n)))return}a=e.createElement("link"),Xl(a,"link",l),Rl(a),e.head.appendChild(a)}}}function Q0(l,t,e){$t.S(l,t,e);var a=_a;if(a&&l){var u=We(a).hoistableStyles,n=Oa(l);t=t||"default";var c=u.get(n);if(!c){var i={loading:0,preload:null};if(c=a.querySelector(hu(n)))i.loading=5;else{l=x({rel:"stylesheet",href:l,"data-precedence":t},e),(e=Tt.get(n))&&Pi(l,e);var f=c=a.createElement("link");Rl(f),Xl(f,"link",l),f._p=new Promise(function(y,b){f.onload=y,f.onerror=b}),f.addEventListener("load",function(){i.loading|=1}),f.addEventListener("error",function(){i.loading|=2}),i.loading|=4,Un(c,t,a)}c={type:"stylesheet",instance:c,count:1,state:i},u.set(n,c)}}}function Z0(l,t){$t.X(l,t);var e=_a;if(e&&l){var a=We(e).hoistableScripts,u=xa(l),n=a.get(u);n||(n=e.querySelector(gu(u)),n||(l=x({src:l,async:!0},t),(t=Tt.get(u))&&lf(l,t),n=e.createElement("script"),Rl(n),Xl(n,"link",l),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},a.set(u,n))}}function L0(l,t){$t.M(l,t);var e=_a;if(e&&l){var a=We(e).hoistableScripts,u=xa(l),n=a.get(u);n||(n=e.querySelector(gu(u)),n||(l=x({src:l,async:!0,type:"module"},t),(t=Tt.get(u))&&lf(l,t),n=e.createElement("script"),Rl(n),Xl(n,"link",l),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},a.set(u,n))}}function Pd(l,t,e,a){var u=(u=W.current)?Nn(u):null;if(!u)throw Error(s(446));switch(l){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(t=Oa(e.href),e=We(u).hoistableStyles,a=e.get(t),a||(a={type:"style",instance:null,count:0,state:null},e.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){l=Oa(e.href);var n=We(u).hoistableStyles,c=n.get(l);if(c||(u=u.ownerDocument||u,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(l,c),(n=u.querySelector(hu(l)))&&!n._p&&(c.instance=n,c.state.loading=5),Tt.has(l)||(e={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},Tt.set(l,e),n||V0(u,l,e,c.state))),t&&a===null)throw Error(s(528,""));return c}if(t&&a!==null)throw Error(s(529,""));return null;case"script":return t=e.async,e=e.src,typeof e=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=xa(e),e=We(u).hoistableScripts,a=e.get(t),a||(a={type:"script",instance:null,count:0,state:null},e.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,l))}}function Oa(l){return'href="'+rt(l)+'"'}function hu(l){return'link[rel="stylesheet"]['+l+"]"}function lr(l){return x({},l,{"data-precedence":l.precedence,precedence:null})}function V0(l,t,e,a){l.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=l.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Xl(t,"link",e),Rl(t),l.head.appendChild(t))}function xa(l){return'[src="'+rt(l)+'"]'}function gu(l){return"script[async]"+l}function tr(l,t,e){if(t.count++,t.instance===null)switch(t.type){case"style":var a=l.querySelector('style[data-href~="'+rt(e.href)+'"]');if(a)return t.instance=a,Rl(a),a;var u=x({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return a=(l.ownerDocument||l).createElement("style"),Rl(a),Xl(a,"style",u),Un(a,e.precedence,l),t.instance=a;case"stylesheet":u=Oa(e.href);var n=l.querySelector(hu(u));if(n)return t.state.loading|=4,t.instance=n,Rl(n),n;a=lr(e),(u=Tt.get(u))&&Pi(a,u),n=(l.ownerDocument||l).createElement("link"),Rl(n);var c=n;return c._p=new Promise(function(i,f){c.onload=i,c.onerror=f}),Xl(n,"link",a),t.state.loading|=4,Un(n,e.precedence,l),t.instance=n;case"script":return n=xa(e.src),(u=l.querySelector(gu(n)))?(t.instance=u,Rl(u),u):(a=e,(u=Tt.get(n))&&(a=x({},e),lf(a,u)),l=l.ownerDocument||l,u=l.createElement("script"),Rl(u),Xl(u,"link",a),l.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Un(a,e.precedence,l));return t.instance}function Un(l,t,e){for(var a=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=a.length?a[a.length-1]:null,n=u,c=0;c<a.length;c++){var i=a[c];if(i.dataset.precedence===t)n=i;else if(n!==u)break}n?n.parentNode.insertBefore(l,n.nextSibling):(t=e.nodeType===9?e.head:e,t.insertBefore(l,t.firstChild))}function Pi(l,t){l.crossOrigin==null&&(l.crossOrigin=t.crossOrigin),l.referrerPolicy==null&&(l.referrerPolicy=t.referrerPolicy),l.title==null&&(l.title=t.title)}function lf(l,t){l.crossOrigin==null&&(l.crossOrigin=t.crossOrigin),l.referrerPolicy==null&&(l.referrerPolicy=t.referrerPolicy),l.integrity==null&&(l.integrity=t.integrity)}var jn=null;function er(l,t,e){if(jn===null){var a=new Map,u=jn=new Map;u.set(e,a)}else u=jn,a=u.get(e),a||(a=new Map,u.set(e,a));if(a.has(l))return a;for(a.set(l,null),e=e.getElementsByTagName(l),u=0;u<e.length;u++){var n=e[u];if(!(n[Ca]||n[ql]||l==="link"&&n.getAttribute("rel")==="stylesheet")&&n.namespaceURI!=="http://www.w3.org/2000/svg"){var c=n.getAttribute(t)||"";c=l+c;var i=a.get(c);i?i.push(n):a.set(c,[n])}}return a}function ar(l,t,e){l=l.ownerDocument||l,l.head.insertBefore(e,t==="title"?l.querySelector("head > title"):null)}function K0(l,t,e){if(e===1||t.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return l=t.disabled,typeof t.precedence=="string"&&l==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ur(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function J0(l,t,e,a){if(e.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(e.state.loading&4)===0){if(e.instance===null){var u=Oa(a.href),n=t.querySelector(hu(u));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=Cn.bind(l),t.then(l,l)),e.state.loading|=4,e.instance=n,Rl(n);return}n=t.ownerDocument||t,a=lr(a),(u=Tt.get(u))&&Pi(a,u),n=n.createElement("link"),Rl(n);var c=n;c._p=new Promise(function(i,f){c.onload=i,c.onerror=f}),Xl(n,"link",a),e.instance=n}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(e,t),(t=e.state.preload)&&(e.state.loading&3)===0&&(l.count++,e=Cn.bind(l),t.addEventListener("load",e),t.addEventListener("error",e))}}var tf=0;function w0(l,t){return l.stylesheets&&l.count===0&&Hn(l,l.stylesheets),0<l.count||0<l.imgCount?function(e){var a=setTimeout(function(){if(l.stylesheets&&Hn(l,l.stylesheets),l.unsuspend){var n=l.unsuspend;l.unsuspend=null,n()}},6e4+t);0<l.imgBytes&&tf===0&&(tf=62500*x0());var u=setTimeout(function(){if(l.waitingForImages=!1,l.count===0&&(l.stylesheets&&Hn(l,l.stylesheets),l.unsuspend)){var n=l.unsuspend;l.unsuspend=null,n()}},(l.imgBytes>tf?50:800)+t);return l.unsuspend=e,function(){l.unsuspend=null,clearTimeout(a),clearTimeout(u)}}:null}function Cn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Hn(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var Rn=null;function Hn(l,t){l.stylesheets=null,l.unsuspend!==null&&(l.count++,Rn=new Map,t.forEach(W0,l),Rn=null,Cn.call(l))}function W0(l,t){if(!(t.state.loading&4)){var e=Rn.get(l);if(e)var a=e.get(null);else{e=new Map,Rn.set(l,e);for(var u=l.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n<u.length;n++){var c=u[n];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(e.set(c.dataset.precedence,c),a=c)}a&&e.set(null,a)}u=t.instance,c=u.getAttribute("data-precedence"),n=e.get(c)||a,n===a&&e.set(null,u),e.set(c,u),this.count++,a=Cn.bind(this),u.addEventListener("load",a),u.addEventListener("error",a),n?n.parentNode.insertBefore(u,n.nextSibling):(l=l.nodeType===9?l.head:l,l.insertBefore(u,l.firstChild)),t.state.loading|=4}}var Su={$$typeof:Cl,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function k0(l,t,e,a,u,n,c,i,f){this.tag=1,this.containerInfo=l,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=$n(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$n(0),this.hiddenUpdates=$n(null),this.identifierPrefix=a,this.onUncaughtError=u,this.onCaughtError=n,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=f,this.incompleteTransitions=new Map}function nr(l,t,e,a,u,n,c,i,f,y,b,p){return l=new k0(l,t,e,c,f,y,b,p,i),t=1,n===!0&&(t|=24),n=nt(3,null,null,t),l.current=n,n.stateNode=l,t=Rc(),t.refCount++,l.pooledCache=t,t.refCount++,n.memoizedState={element:a,isDehydrated:e,cache:t},Yc(n),l}function cr(l){return l?(l=ua,l):ua}function ir(l,t,e,a,u,n){u=cr(u),a.context===null?a.context=u:a.pendingContext=u,a=ne(t),a.payload={element:e},n=n===void 0?null:n,n!==null&&(a.callback=n),e=ce(l,a,t),e!==null&&(lt(e,l,t),$a(e,l,t))}function fr(l,t){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var e=l.retryLane;l.retryLane=e!==0&&e<t?e:t}}function ef(l,t){fr(l,t),(l=l.alternate)&&fr(l,t)}function sr(l){if(l.tag===13||l.tag===31){var t=Ne(l,67108864);t!==null&&lt(t,l,67108864),ef(l,67108864)}}function or(l){if(l.tag===13||l.tag===31){var t=ot();t=Fn(t);var e=Ne(l,t);e!==null&&lt(e,l,t),ef(l,t)}}var qn=!0;function $0(l,t,e,a){var u=T.T;T.T=null;var n=N.p;try{N.p=2,af(l,t,e,a)}finally{N.p=n,T.T=u}}function F0(l,t,e,a){var u=T.T;T.T=null;var n=N.p;try{N.p=8,af(l,t,e,a)}finally{N.p=n,T.T=u}}function af(l,t,e,a){if(qn){var u=uf(a);if(u===null)Li(l,t,a,Bn,e),rr(l,a);else if(P0(u,l,t,e,a))a.stopPropagation();else if(rr(l,a),t&4&&-1<I0.indexOf(l)){for(;u!==null;){var n=we(u);if(n!==null)switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var c=_e(n.pendingLanes);if(c!==0){var i=n;for(i.pendingLanes|=2,i.entangledLanes|=2;c;){var f=1<<31-at(c);i.entanglements[1]|=f,c&=~f}Ut(n),(nl&6)===0&&(bn=tt()+500,ru(0))}}break;case 31:case 13:i=Ne(n,2),i!==null&&lt(i,n,2),En(),ef(n,2)}if(n=uf(a),n===null&&Li(l,t,a,Bn,e),n===u)break;u=n}u!==null&&a.stopPropagation()}else Li(l,t,a,null,e)}}function uf(l){return l=cc(l),nf(l)}var Bn=null;function nf(l){if(Bn=null,l=Je(l),l!==null){var t=q(l);if(t===null)l=null;else{var e=t.tag;if(e===13){if(l=G(t),l!==null)return l;l=null}else if(e===31){if(l=Y(t),l!==null)return l;l=null}else if(e===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;l=null}else t!==l&&(l=null)}}return Bn=l,null}function dr(l){switch(l){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Br()){case Sf:return 2;case bf:return 8;case _u:case Yr:return 32;case Tf:return 268435456;default:return 32}default:return 32}}var cf=!1,ge=null,Se=null,be=null,bu=new Map,Tu=new Map,Te=[],I0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function rr(l,t){switch(l){case"focusin":case"focusout":ge=null;break;case"dragenter":case"dragleave":Se=null;break;case"mouseover":case"mouseout":be=null;break;case"pointerover":case"pointerout":bu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tu.delete(t.pointerId)}}function Eu(l,t,e,a,u,n){return l===null||l.nativeEvent!==n?(l={blockedOn:t,domEventName:e,eventSystemFlags:a,nativeEvent:n,targetContainers:[u]},t!==null&&(t=we(t),t!==null&&sr(t)),l):(l.eventSystemFlags|=a,t=l.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),l)}function P0(l,t,e,a,u){switch(t){case"focusin":return ge=Eu(ge,l,t,e,a,u),!0;case"dragenter":return Se=Eu(Se,l,t,e,a,u),!0;case"mouseover":return be=Eu(be,l,t,e,a,u),!0;case"pointerover":var n=u.pointerId;return bu.set(n,Eu(bu.get(n)||null,l,t,e,a,u)),!0;case"gotpointercapture":return n=u.pointerId,Tu.set(n,Eu(Tu.get(n)||null,l,t,e,a,u)),!0}return!1}function mr(l){var t=Je(l.target);if(t!==null){var e=q(t);if(e!==null){if(t=e.tag,t===13){if(t=G(e),t!==null){l.blockedOn=t,Of(l.priority,function(){or(e)});return}}else if(t===31){if(t=Y(e),t!==null){l.blockedOn=t,Of(l.priority,function(){or(e)});return}}else if(t===3&&e.stateNode.current.memoizedState.isDehydrated){l.blockedOn=e.tag===3?e.stateNode.containerInfo:null;return}}}l.blockedOn=null}function Yn(l){if(l.blockedOn!==null)return!1;for(var t=l.targetContainers;0<t.length;){var e=uf(l.nativeEvent);if(e===null){e=l.nativeEvent;var a=new e.constructor(e.type,e);nc=a,e.target.dispatchEvent(a),nc=null}else return t=we(e),t!==null&&sr(t),l.blockedOn=e,!1;t.shift()}return!0}function vr(l,t,e){Yn(l)&&e.delete(t)}function lv(){cf=!1,ge!==null&&Yn(ge)&&(ge=null),Se!==null&&Yn(Se)&&(Se=null),be!==null&&Yn(be)&&(be=null),bu.forEach(vr),Tu.forEach(vr)}function Gn(l,t){l.blockedOn===t&&(l.blockedOn=null,cf||(cf=!0,m.unstable_scheduleCallback(m.unstable_NormalPriority,lv)))}var Xn=null;function yr(l){Xn!==l&&(Xn=l,m.unstable_scheduleCallback(m.unstable_NormalPriority,function(){Xn===l&&(Xn=null);for(var t=0;t<l.length;t+=3){var e=l[t],a=l[t+1],u=l[t+2];if(typeof a!="function"){if(nf(a||e)===null)continue;break}var n=we(e);n!==null&&(l.splice(t,3),t-=3,ui(n,{pending:!0,data:u,method:e.method,action:a},a,u))}}))}function Da(l){function t(f){return Gn(f,l)}ge!==null&&Gn(ge,l),Se!==null&&Gn(Se,l),be!==null&&Gn(be,l),bu.forEach(t),Tu.forEach(t);for(var e=0;e<Te.length;e++){var a=Te[e];a.blockedOn===l&&(a.blockedOn=null)}for(;0<Te.length&&(e=Te[0],e.blockedOn===null);)mr(e),e.blockedOn===null&&Te.shift();if(e=(l.ownerDocument||l).$$reactFormReplay,e!=null)for(a=0;a<e.length;a+=3){var u=e[a],n=e[a+1],c=u[Wl]||null;if(typeof n=="function")c||yr(e);else if(c){var i=null;if(n&&n.hasAttribute("formAction")){if(u=n,c=n[Wl]||null)i=c.formAction;else if(nf(u)!==null)continue}else i=c.action;typeof i=="function"?e[a+1]=i:(e.splice(a,3),a-=3),yr(e)}}}function hr(){function l(n){n.canIntercept&&n.info==="react-transition"&&n.intercept({handler:function(){return new Promise(function(c){return u=c})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),a||setTimeout(e,20)}function e(){if(!a&&!navigation.transition){var n=navigation.currentEntry;n&&n.url!=null&&navigation.navigate(n.url,{state:n.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,u=null;return navigation.addEventListener("navigate",l),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(e,100),function(){a=!0,navigation.removeEventListener("navigate",l),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function ff(l){this._internalRoot=l}Qn.prototype.render=ff.prototype.render=function(l){var t=this._internalRoot;if(t===null)throw Error(s(409));var e=t.current,a=ot();ir(e,a,l,t,null,null)},Qn.prototype.unmount=ff.prototype.unmount=function(){var l=this._internalRoot;if(l!==null){this._internalRoot=null;var t=l.containerInfo;ir(l.current,2,null,l,null,null),En(),t[Ke]=null}};function Qn(l){this._internalRoot=l}Qn.prototype.unstable_scheduleHydration=function(l){if(l){var t=_f();l={blockedOn:null,target:l,priority:t};for(var e=0;e<Te.length&&t!==0&&t<Te[e].priority;e++);Te.splice(e,0,l),e===0&&mr(l)}};var gr=_.version;if(gr!=="19.2.4")throw Error(s(527,gr,"19.2.4"));N.findDOMNode=function(l){var t=l._reactInternals;if(t===void 0)throw typeof l.render=="function"?Error(s(188)):(l=Object.keys(l).join(","),Error(s(268,l)));return l=S(t),l=l!==null?B(l):null,l=l===null?null:l.stateNode,l};var tv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zn=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zn.isDisabled&&Zn.supportsFiber)try{Na=Zn.inject(tv),et=Zn}catch{}}return zu.createRoot=function(l,t){if(!D(l))throw Error(s(299));var e=!1,a="",u=Ao,n=_o,c=Oo;return t!=null&&(t.unstable_strictMode===!0&&(e=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(n=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=nr(l,1,!1,null,null,e,a,null,u,n,c,hr),l[Ke]=t.current,Zi(l),new ff(t)},zu.hydrateRoot=function(l,t,e){if(!D(l))throw Error(s(299));var a=!1,u="",n=Ao,c=_o,i=Oo,f=null;return e!=null&&(e.unstable_strictMode===!0&&(a=!0),e.identifierPrefix!==void 0&&(u=e.identifierPrefix),e.onUncaughtError!==void 0&&(n=e.onUncaughtError),e.onCaughtError!==void 0&&(c=e.onCaughtError),e.onRecoverableError!==void 0&&(i=e.onRecoverableError),e.formState!==void 0&&(f=e.formState)),t=nr(l,1,!0,t,e??null,a,u,f,n,c,i,hr),t.context=cr(null),e=t.current,a=ot(),a=Fn(a),u=ne(a),u.callback=null,ce(e,u,a),e=a,t.current.lanes=e,ja(t,e),Ut(t),l[Ke]=t.current,Zi(l),new Qn(t)},zu.version="19.2.4",zu}var xr;function yv(){if(xr)return df.exports;xr=1;function m(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(m)}catch(_){console.error(_)}}return m(),df.exports=vv(),df.exports}var hv=yv();const gv="modulepreload",Sv=function(m){return"/"+m},Dr={},Le=function(_,A,s){let D=Promise.resolve();if(A&&A.length>0){let G=function(S){return Promise.all(S.map(B=>Promise.resolve(B).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const Y=document.querySelector("meta[property=csp-nonce]"),M=(Y==null?void 0:Y.nonce)||(Y==null?void 0:Y.getAttribute("nonce"));D=G(A.map(S=>{if(S=Sv(S),S in Dr)return;Dr[S]=!0;const B=S.endsWith(".css"),x=B?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${S}"]${x}`))return;const L=document.createElement("link");if(L.rel=B?"stylesheet":gv,B||(L.as="script"),L.crossOrigin="",L.href=S,M&&L.setAttribute("nonce",M),document.head.appendChild(L),B)return new Promise((El,pl)=>{L.addEventListener("load",El),L.addEventListener("error",()=>pl(new Error(`Unable to preload CSS for ${S}`)))})}))}function q(G){const Y=new Event("vite:preloadError",{cancelable:!0});if(Y.payload=G,window.dispatchEvent(Y),!Y.defaultPrevented)throw G}return D.then(G=>{for(const Y of G||[])Y.status==="rejected"&&q(Y.reason);return _().catch(q)})},Nr=C.createContext({theme:"dark",toggleTheme:()=>{}});function bv({children:m}){const[_,A]=C.useState(()=>{const D=localStorage.getItem("mcp-graph-theme");return D==="light"||D==="dark"?D:"dark"});C.useEffect(()=>{document.body.classList.toggle("dark",_==="dark"),localStorage.setItem("mcp-graph-theme",_)},[_]);const s=C.useCallback(()=>{A(D=>D==="dark"?"light":"dark")},[]);return O.jsx(Nr,{value:{theme:_,toggleTheme:s},children:m})}function Tv(){return C.useContext(Nr)}const Ur="/api/v1";class jr extends Error{constructor(A,s,D){super(A);Ln(this,"status");Ln(this,"details");this.name="ApiError",this.status=s,this.details=D}}async function el(m,_={}){const A=`${Ur}${m}`,s=await fetch(A,{headers:{"Content-Type":"application/json",..._.headers},..._});if(s.status===204)return null;const D=await s.json();if(!s.ok)throw new jr(D.error||`HTTP ${s.status}`,s.status,D.details);return D}const pe={request:el,getProject:()=>el("/project"),initProject:m=>el("/project/init",{method:"POST",body:JSON.stringify({name:m})}),getProjects:()=>el("/project/list"),getActiveProject:()=>el("/project/active"),activateProject:m=>el(`/project/${m}/activate`,{method:"POST"}),getNodes:(m={})=>{const _=new URLSearchParams(m).toString();return el(`/nodes${_?"?"+_:""}`)},getNode:m=>el(`/nodes/${m}`),createNode:m=>el("/nodes",{method:"POST",body:JSON.stringify(m)}),updateNode:(m,_)=>el(`/nodes/${m}`,{method:"PATCH",body:JSON.stringify(_)}),deleteNode:m=>el(`/nodes/${m}`,{method:"DELETE"}),getEdges:()=>el("/edges"),createEdge:m=>el("/edges",{method:"POST",body:JSON.stringify(m)}),deleteEdge:m=>el(`/edges/${m}`,{method:"DELETE"}),getStats:()=>el("/stats"),search:(m,_)=>{const A={q:m};return _&&(A.limit=String(_)),el(`/search?${new URLSearchParams(A)}`)},getGraph:()=>el("/graph"),importFile:async(m,_=!1)=>{const A=new FormData;A.append("file",m),_&&A.append("force","true");const s=await fetch(`${Ur}/import`,{method:"POST",body:A}),D=await s.json();if(!s.ok)throw new jr(D.error||`HTTP ${s.status}`,s.status);return D},getIntegrationStatus:()=>el("/integrations/status"),getBottlenecks:()=>el("/insights/bottlenecks"),getRecommendations:()=>el("/insights/recommendations"),getMetrics:()=>el("/insights/metrics"),getSkills:()=>el("/skills"),captureUrl:(m,_,A)=>el("/capture",{method:"POST",body:JSON.stringify({url:m,selector:_,waitForSelector:A})}),getGitNexusStatus:()=>el("/gitnexus/status"),queryCodeGraph:m=>el("/gitnexus/query",{method:"POST",body:JSON.stringify({query:m})}),getSymbolContext:m=>el("/gitnexus/context",{method:"POST",body:JSON.stringify({symbol:m})}),getSymbolImpact:m=>el("/gitnexus/impact",{method:"POST",body:JSON.stringify({symbol:m})}),getFullCodeGraph:()=>el("/gitnexus/query",{method:"POST",body:JSON.stringify({query:"MATCH (n)-[r:CodeRelation]->(m) RETURN n.name AS src, n.filePath AS srcFile, r.type AS relType, m.name AS dst, m.filePath AS dstFile LIMIT 2000"})}),triggerAnalyze:()=>el("/gitnexus/analyze",{method:"POST"}),triggerServe:()=>el("/gitnexus/serve",{method:"POST"}),getSerenaMemories:()=>el("/integrations/serena/memories"),getLogs:m=>{const _=new URLSearchParams;m!=null&&m.level&&_.set("level",m.level),(m==null?void 0:m.since)!==void 0&&_.set("since",String(m.since)),m!=null&&m.search&&_.set("search",m.search);const A=_.toString();return el(`/logs${A?"?"+A:""}`)},clearLogs:()=>el("/logs",{method:"DELETE"})},Cr=C.createContext({projects:[],activeProject:null,loading:!0,switchProject:async()=>{},refreshProjects:async()=>{}});function Ev({children:m,onProjectChange:_}){const[A,s]=C.useState([]),[D,q]=C.useState(null),[G,Y]=C.useState(!0),M=C.useCallback(async()=>{try{const[B,x]=await Promise.all([pe.getProjects().catch(()=>({total:0,projects:[]})),pe.getActiveProject().catch(()=>null)]);s(B.projects),q(x)}catch{}finally{Y(!1)}},[]),S=C.useCallback(async B=>{try{const x=await pe.activateProject(B);x.project&&(q(x.project),_==null||_())}catch{}},[_]);return C.useEffect(()=>{M()},[M]),O.jsx(Cr.Provider,{value:{projects:A,activeProject:D,loading:G,switchProject:S,refreshProjects:M},children:m})}function pv(){return C.useContext(Cr)}const zv=C.memo(function(){const{projects:_,activeProject:A,loading:s,switchProject:D}=pv(),[q,G]=C.useState(!1),Y=C.useRef(null);C.useEffect(()=>{if(!q)return;function S(B){Y.current&&!Y.current.contains(B.target)&&G(!1)}return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[q]);const M=C.useCallback(S=>{S.key==="Escape"&&G(!1)},[]);return s||_.length<=1?O.jsx("span",{className:"text-sm text-[var(--color-text-muted)] truncate max-w-[200px]",title:A==null?void 0:A.name,children:(A==null?void 0:A.name)??"No project"}):O.jsxs("div",{ref:Y,className:"relative",onKeyDown:M,children:[O.jsxs("button",{onClick:()=>G(S=>!S),className:"flex items-center gap-1 px-2 py-1 text-sm border border-[var(--color-border)] rounded hover:bg-[var(--color-bg-tertiary)] transition-colors truncate max-w-[200px]","aria-haspopup":"listbox","aria-expanded":q,"aria-label":"Select project",children:[O.jsx("span",{className:"truncate",children:(A==null?void 0:A.name)??"Select project"}),O.jsx("svg",{className:"w-3 h-3 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),q&&O.jsx("ul",{role:"listbox","aria-label":"Projects",className:"absolute top-full left-0 mt-1 w-56 bg-[var(--color-bg-secondary)] border border-[var(--color-border)] rounded shadow-lg z-50 max-h-60 overflow-y-auto",children:_.map(S=>O.jsx("li",{role:"option","aria-selected":S.id===(A==null?void 0:A.id),children:O.jsx("button",{onClick:()=>{D(S.id),G(!1)},className:`w-full text-left px-3 py-2 text-sm hover:bg-[var(--color-bg-tertiary)] transition-colors ${S.id===(A==null?void 0:A.id)?"text-[var(--color-accent)] font-medium":"text-[var(--color-text)]"}`,children:S.name})},S.id))})]})}),Av=C.memo(function({stats:_,onImport:A,onCapture:s}){var M;const{theme:D,toggleTheme:q}=Tv(),G=((M=_==null?void 0:_.byStatus)==null?void 0:M.done)??0,Y=(_==null?void 0:_.totalNodes)??0;return O.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-2 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[O.jsxs("div",{className:"flex items-center gap-3",children:[O.jsx("h1",{className:"text-lg font-bold text-[var(--color-accent)]",children:"mcp-graph"}),O.jsx(zv,{}),Y>0&&O.jsxs("span",{className:"text-sm text-[var(--color-text-muted)]",children:[G,"/",Y," done"]})]}),O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx("button",{onClick:A,className:"px-3 py-1.5 text-sm bg-[var(--color-accent)] text-white rounded hover:bg-[var(--color-accent-light)] transition-colors","aria-label":"Import PRD file",children:"Import PRD"}),O.jsx("button",{onClick:s,className:"px-3 py-1.5 text-sm border border-[var(--color-border)] rounded hover:bg-[var(--color-bg-tertiary)] transition-colors","aria-label":"Capture web content",children:"Capture"}),O.jsx("button",{onClick:q,className:"px-2 py-1.5 text-sm border border-[var(--color-border)] rounded hover:bg-[var(--color-bg-tertiary)] transition-colors",title:`Switch to ${D==="dark"?"light":"dark"} mode`,"aria-label":`Switch to ${D==="dark"?"light":"dark"} mode`,children:D==="dark"?"☀":"☾"})]})]})}),_v=[{id:"graph",label:"Graph"},{id:"prd-backlog",label:"PRD & Backlog"},{id:"gitnexus",label:"GitNexus"},{id:"serena",label:"Serena"},{id:"insights",label:"Insights"},{id:"benchmark",label:"Benchmark"},{id:"logs",label:"Logs"}],Ov=C.memo(function({activeTab:_,onTabChange:A}){return O.jsx("nav",{className:"flex overflow-x-auto border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",role:"tablist","aria-label":"Dashboard sections",children:_v.map(s=>O.jsx("button",{role:"tab","aria-selected":_===s.id,"aria-controls":`panel-${s.id}`,id:`tab-${s.id}`,tabIndex:_===s.id?0:-1,onClick:()=>A(s.id),className:`px-4 py-2 text-sm font-medium transition-colors border-b-2 whitespace-nowrap ${_===s.id?"border-[var(--color-accent)] text-[var(--color-accent)]":"border-transparent text-[var(--color-text-muted)] hover:text-[var(--color-text)]"}`,children:s.label},s.id))})});function xv(){const[m,_]=C.useState(null),[A,s]=C.useState(!0),[D,q]=C.useState(null),G=C.useCallback(async()=>{try{s(!0),q(null);const Y=await pe.getGraph();_(Y)}catch(Y){q(Y instanceof Error?Y.message:"Failed to load graph")}finally{s(!1)}},[]);return C.useEffect(()=>{G()},[G]),{graph:m,loading:A,error:D,refresh:G}}function Dv(){const[m,_]=C.useState(null),A=C.useCallback(async()=>{try{const s=await pe.getStats();_(s)}catch{}},[]);return C.useEffect(()=>{A()},[A]),{stats:m,refresh:A}}function Mv(m){const _=C.useRef(m);_.current=m;const A=C.useCallback(()=>{const s=new EventSource("/api/v1/events"),D=G=>{try{const Y=JSON.parse(G.data);_.current(G.type,Y)}catch{}},q=["node:created","node:updated","node:deleted","edge:created","edge:deleted","import:completed"];for(const G of q)s.addEventListener(G,D);return s.onmessage=D,s.onerror=()=>{s.close(),setTimeout(A,5e3)},s},[]);C.useEffect(()=>{const s=A();return()=>s.close()},[A])}function Nv({open:m,onClose:_,onImported:A}){const[s,D]=C.useState(null),[q,G]=C.useState(!1),[Y,M]=C.useState(null),[S,B]=C.useState(!1),[x,L]=C.useState(!1),El=C.useRef(null),pl=C.useCallback(tl=>{tl.preventDefault(),L(!1),tl.dataTransfer.files.length&&D(tl.dataTransfer.files[0])},[]),Ol=C.useCallback(async()=>{if(s){B(!0),M({type:"info",message:"Uploading and processing..."});try{const tl=await pe.importFile(s,q);M({type:"success",message:`Imported ${tl.nodesCreated} nodes and ${tl.edgesCreated} edges.`}),setTimeout(()=>{_(),A(),D(null),M(null)},1500)}catch(tl){M({type:"error",message:tl instanceof Error?tl.message:"Import failed"})}finally{B(!1)}}},[s,q,_,A]);return m?O.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:tl=>{tl.target===tl.currentTarget&&_()},children:O.jsxs("div",{className:"bg-[var(--color-bg)] rounded-lg shadow-xl w-full max-w-md p-6",children:[O.jsxs("div",{className:"flex items-center justify-between mb-4",children:[O.jsx("h2",{className:"text-lg font-semibold",children:"Import PRD"}),O.jsx("button",{onClick:_,className:"text-[var(--color-text-muted)] hover:text-[var(--color-text)] text-xl",children:"×"})]}),O.jsxs("div",{className:`border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-colors mb-4 ${x?"border-[var(--color-accent)] bg-[var(--color-accent)]10":"border-[var(--color-border)]"}`,onClick:()=>{var tl;return(tl=El.current)==null?void 0:tl.click()},onDragOver:tl=>{tl.preventDefault(),L(!0)},onDragLeave:()=>L(!1),onDrop:pl,children:[O.jsx("input",{ref:El,type:"file",accept:".md,.txt,.pdf,.html,.htm",className:"hidden",onChange:tl=>{var jl;(jl=tl.target.files)!=null&&jl.length&&D(tl.target.files[0])}}),O.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:s?`Selected: ${s.name} (${Uv(s.size)})`:`Drag & drop a file here
51
51
  or click to select`})]}),O.jsxs("label",{className:"flex items-center gap-2 mb-4 text-sm",children:[O.jsx("input",{type:"checkbox",checked:q,onChange:tl=>G(tl.target.checked)}),"Force re-import (overwrite existing)"]}),Y&&O.jsx("div",{className:`text-sm p-2 rounded mb-4 ${Y.type==="success"?"bg-green-500/10 text-green-500":Y.type==="error"?"bg-red-500/10 text-red-500":"bg-blue-500/10 text-blue-500"}`,children:Y.message}),O.jsxs("div",{className:"flex justify-end gap-2",children:[O.jsx("button",{onClick:_,className:"px-3 py-1.5 text-sm border border-[var(--color-border)] rounded hover:bg-[var(--color-bg-tertiary)]",children:"Cancel"}),O.jsx("button",{onClick:Ol,disabled:!s||S,className:"px-3 py-1.5 text-sm bg-[var(--color-accent)] text-white rounded hover:bg-[var(--color-accent-light)] disabled:opacity-50",children:S?"Importing...":"Import"})]})]})}):null}function Uv(m){return m<1024?m+" B":m<1048576?(m/1024).toFixed(1)+" KB":(m/1048576).toFixed(1)+" MB"}function jv({open:m,onClose:_,onImported:A}){const[s,D]=C.useState(""),[q,G]=C.useState(""),[Y,M]=C.useState(""),[S,B]=C.useState(null),[x,L]=C.useState(null),[El,pl]=C.useState(!1),Ol=C.useCallback(async()=>{if(!s.trim()){B({type:"error",message:"Please enter a URL"});return}pl(!0),B({type:"info",message:"Capturing page... This may take a few seconds."}),L(null);try{const cl=await pe.captureUrl(s.trim(),q.trim()||void 0,Y.trim()||void 0);L(cl),B({type:"success",message:`Captured: ${cl.wordCount} words`})}catch(cl){B({type:"error",message:`Capture failed: ${cl instanceof Error?cl.message:"Unknown error"}`})}finally{pl(!1)}},[s,q,Y]),tl=C.useCallback(async()=>{if(x){B({type:"info",message:"Importing captured content as PRD..."});try{const cl=new Blob([x.text],{type:"text/markdown"}),Cl=(x.title||"captured-page").replace(/[^a-zA-Z0-9-_]/g,"-")+".md",Vl=new File([cl],Cl,{type:"text/markdown"});await pe.importFile(Vl),B({type:"success",message:"Import completed!"}),setTimeout(()=>{_(),A()},1e3)}catch(cl){B({type:"error",message:`Import failed: ${cl instanceof Error?cl.message:"Unknown error"}`})}}},[x,_,A]),jl=C.useCallback(async()=>{x&&(await navigator.clipboard.writeText(x.text),B({type:"success",message:"Copied to clipboard!"}))},[x]);return m?O.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:cl=>{cl.target===cl.currentTarget&&_()},children:O.jsxs("div",{className:"bg-[var(--color-bg)] rounded-lg shadow-xl w-full max-w-lg p-6 max-h-[80vh] overflow-y-auto",children:[O.jsxs("div",{className:"flex items-center justify-between mb-4",children:[O.jsx("h2",{className:"text-lg font-semibold",children:"Capture Web Page"}),O.jsx("button",{onClick:_,className:"text-[var(--color-text-muted)] hover:text-[var(--color-text)] text-xl",children:"×"})]}),O.jsxs("div",{className:"space-y-3 mb-4",children:[O.jsxs("div",{children:[O.jsx("label",{className:"block text-xs font-medium mb-1",children:"URL"}),O.jsx("input",{type:"url",value:s,onChange:cl=>D(cl.target.value),placeholder:"https://example.com/prd",className:"w-full px-2 py-1.5 text-sm border border-[var(--color-border)] rounded bg-[var(--color-bg)]",onKeyDown:cl=>{cl.key==="Enter"&&Ol()}})]}),O.jsxs("div",{children:[O.jsx("label",{className:"block text-xs font-medium mb-1",children:"CSS Selector (optional)"}),O.jsx("input",{type:"text",value:q,onChange:cl=>G(cl.target.value),placeholder:"main, article, .content",className:"w-full px-2 py-1.5 text-sm border border-[var(--color-border)] rounded bg-[var(--color-bg)]"})]}),O.jsxs("div",{children:[O.jsx("label",{className:"block text-xs font-medium mb-1",children:"Wait for Selector (optional)"}),O.jsx("input",{type:"text",value:Y,onChange:cl=>M(cl.target.value),placeholder:".loaded, #content",className:"w-full px-2 py-1.5 text-sm border border-[var(--color-border)] rounded bg-[var(--color-bg)]"})]})]}),S&&O.jsx("div",{className:`text-sm p-2 rounded mb-4 ${S.type==="success"?"bg-green-500/10 text-green-500":S.type==="error"?"bg-red-500/10 text-red-500":"bg-blue-500/10 text-blue-500"}`,children:S.message}),x&&O.jsxs("div",{className:"mb-4 p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[O.jsx("h3",{className:"text-sm font-medium mb-2",children:"Extracted Content"}),O.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] space-y-0.5 mb-2",children:[O.jsxs("p",{children:[O.jsx("strong",{children:"Title:"})," ",x.title||"—"]}),O.jsxs("p",{children:[O.jsx("strong",{children:"Words:"})," ",x.wordCount]}),O.jsxs("p",{children:[O.jsx("strong",{children:"Captured:"})," ",new Date(x.capturedAt).toLocaleString()]})]}),O.jsxs("pre",{className:"text-xs whitespace-pre-wrap max-h-40 overflow-y-auto p-2 bg-[var(--color-bg-tertiary)] rounded",children:[x.text.substring(0,5e3),x.text.length>5e3&&`
52
52
 
53
- ... (truncated)`]}),O.jsxs("div",{className:"flex gap-2 mt-2",children:[O.jsx("button",{onClick:tl,className:"px-3 py-1 text-xs bg-[var(--color-accent)] text-white rounded hover:bg-[var(--color-accent-light)]",children:"Import as PRD"}),O.jsx("button",{onClick:jl,className:"px-3 py-1 text-xs border border-[var(--color-border)] rounded hover:bg-[var(--color-bg-tertiary)]",children:"Copy Text"})]})]}),O.jsx("div",{className:"flex justify-end",children:O.jsx("button",{onClick:Ol,disabled:El,className:"px-3 py-1.5 text-sm bg-[var(--color-accent)] text-white rounded hover:bg-[var(--color-accent-light)] disabled:opacity-50",children:El?"Capturing...":"Capture"})})]})}):null}const Cv=C.lazy(()=>Le(()=>import("./graph-tab-D4R3Zj8V.js"),__vite__mapDeps([0,1,2,3])).then(m=>({default:m.GraphTab}))),Rv=C.lazy(()=>Le(()=>import("./prd-backlog-tab-Bvq2csmq.js"),__vite__mapDeps([4,1,2,3])).then(m=>({default:m.PrdBacklogTab}))),Hv=C.lazy(()=>Le(()=>import("./gitnexus-tab-QrcoXX90.js"),__vite__mapDeps([5,2,6])).then(m=>({default:m.GitNexusTab}))),qv=C.lazy(()=>Le(()=>import("./serena-tab-CSPk4pkY.js"),[]).then(m=>({default:m.SerenaTab}))),Bv=C.lazy(()=>Le(()=>import("./insights-tab-CJ0BiuRB.js"),__vite__mapDeps([7,2])).then(m=>({default:m.InsightsTab}))),Yv=C.lazy(()=>Le(()=>import("./benchmark-tab-CRB5YFYY.js"),[]).then(m=>({default:m.BenchmarkTab}))),Gv=C.lazy(()=>Le(()=>import("./logs-tab-DWBcu2a_.js"),[]).then(m=>({default:m.LogsTab})));class Xv extends sv.Component{constructor(){super(...arguments);Ln(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(A){return{hasError:!0,error:A}}render(){var A;return this.state.hasError?O.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 text-[var(--color-text-muted)]",children:[O.jsx("p",{className:"text-sm",children:"Something went wrong."}),O.jsx("p",{className:"text-xs text-[var(--color-danger)]",children:(A=this.state.error)==null?void 0:A.message}),O.jsx("button",{onClick:()=>window.location.reload(),className:"text-xs px-3 py-1.5 rounded-lg bg-[var(--color-accent)] text-white hover:opacity-90 transition-opacity",children:"Reload"})]}):this.props.children}}function Mr(){return O.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading..."})}function Qv(){const[m,_]=C.useState("graph"),[A,s]=C.useState(!1),[D,q]=C.useState(!1),{graph:G,loading:Y,error:M,refresh:S}=xv(),{stats:B,refresh:x}=Dv(),L=C.useCallback(async()=>{await Promise.all([S(),x()])},[S,x]);return Mv(C.useCallback(()=>{L()},[L])),O.jsx(Ev,{onProjectChange:L,children:O.jsxs("div",{className:"h-screen flex flex-col",children:[O.jsx(Av,{stats:B,onImport:()=>s(!0),onCapture:()=>q(!0)}),O.jsx(Ov,{activeTab:m,onTabChange:_}),O.jsx("main",{className:"flex-1 min-h-0 overflow-hidden",children:Y?O.jsx(Mr,{}):M?O.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:M}):O.jsx(Xv,{children:O.jsxs(C.Suspense,{fallback:O.jsx(Mr,{}),children:[O.jsx("div",{style:{display:m==="graph"?"contents":"none"},children:G&&O.jsx(Cv,{graph:G})}),O.jsx("div",{style:{display:m==="prd-backlog"?"contents":"none"},children:G&&O.jsx(Rv,{graph:G})}),m==="gitnexus"&&O.jsx(Hv,{}),m==="serena"&&O.jsx(qv,{}),m==="insights"&&O.jsx(Bv,{}),m==="benchmark"&&O.jsx(Yv,{}),m==="logs"&&O.jsx(Gv,{})]})})}),O.jsx(Nv,{open:A,onClose:()=>s(!1),onImported:L}),O.jsx(jv,{open:D,onClose:()=>q(!1),onImported:L})]})})}function Zv(){return O.jsx(bv,{children:O.jsx(Qv,{})})}hv.createRoot(document.getElementById("root")).render(O.jsx(C.StrictMode,{children:O.jsx(Zv,{})}));export{pe as a,yf as b,mv as c,nv as g,O as j,C as r,sv as t};
53
+ ... (truncated)`]}),O.jsxs("div",{className:"flex gap-2 mt-2",children:[O.jsx("button",{onClick:tl,className:"px-3 py-1 text-xs bg-[var(--color-accent)] text-white rounded hover:bg-[var(--color-accent-light)]",children:"Import as PRD"}),O.jsx("button",{onClick:jl,className:"px-3 py-1 text-xs border border-[var(--color-border)] rounded hover:bg-[var(--color-bg-tertiary)]",children:"Copy Text"})]})]}),O.jsx("div",{className:"flex justify-end",children:O.jsx("button",{onClick:Ol,disabled:El,className:"px-3 py-1.5 text-sm bg-[var(--color-accent)] text-white rounded hover:bg-[var(--color-accent-light)] disabled:opacity-50",children:El?"Capturing...":"Capture"})})]})}):null}const Cv=C.lazy(()=>Le(()=>import("./graph-tab-Pra4HkGL.js"),__vite__mapDeps([0,1,2,3])).then(m=>({default:m.GraphTab}))),Rv=C.lazy(()=>Le(()=>import("./prd-backlog-tab-B8vVDCL4.js"),__vite__mapDeps([4,1,2,3])).then(m=>({default:m.PrdBacklogTab}))),Hv=C.lazy(()=>Le(()=>import("./gitnexus-tab-Bkd-APRz.js"),__vite__mapDeps([5,2,6])).then(m=>({default:m.GitNexusTab}))),qv=C.lazy(()=>Le(()=>import("./serena-tab-Bw981Xoi.js"),[]).then(m=>({default:m.SerenaTab}))),Bv=C.lazy(()=>Le(()=>import("./insights-tab-D7Zubtyb.js"),__vite__mapDeps([7,2])).then(m=>({default:m.InsightsTab}))),Yv=C.lazy(()=>Le(()=>import("./benchmark-tab-CQJofeJ4.js"),[]).then(m=>({default:m.BenchmarkTab}))),Gv=C.lazy(()=>Le(()=>import("./logs-tab-vmvswMc3.js"),[]).then(m=>({default:m.LogsTab})));class Xv extends sv.Component{constructor(){super(...arguments);Ln(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(A){return{hasError:!0,error:A}}render(){var A;return this.state.hasError?O.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 text-[var(--color-text-muted)]",children:[O.jsx("p",{className:"text-sm",children:"Something went wrong."}),O.jsx("p",{className:"text-xs text-[var(--color-danger)]",children:(A=this.state.error)==null?void 0:A.message}),O.jsx("button",{onClick:()=>window.location.reload(),className:"text-xs px-3 py-1.5 rounded-lg bg-[var(--color-accent)] text-white hover:opacity-90 transition-opacity",children:"Reload"})]}):this.props.children}}function Mr(){return O.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading..."})}function Qv(){const[m,_]=C.useState("graph"),[A,s]=C.useState(!1),[D,q]=C.useState(!1),{graph:G,loading:Y,error:M,refresh:S}=xv(),{stats:B,refresh:x}=Dv(),L=C.useCallback(async()=>{await Promise.all([S(),x()])},[S,x]);return Mv(C.useCallback(()=>{L()},[L])),O.jsx(Ev,{onProjectChange:L,children:O.jsxs("div",{className:"h-screen flex flex-col",children:[O.jsx(Av,{stats:B,onImport:()=>s(!0),onCapture:()=>q(!0)}),O.jsx(Ov,{activeTab:m,onTabChange:_}),O.jsx("main",{className:"flex-1 min-h-0 overflow-hidden",children:Y?O.jsx(Mr,{}):M?O.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:M}):O.jsx(Xv,{children:O.jsxs(C.Suspense,{fallback:O.jsx(Mr,{}),children:[O.jsx("div",{style:{display:m==="graph"?"contents":"none"},children:G&&O.jsx(Cv,{graph:G})}),O.jsx("div",{style:{display:m==="prd-backlog"?"contents":"none"},children:G&&O.jsx(Rv,{graph:G})}),m==="gitnexus"&&O.jsx(Hv,{}),m==="serena"&&O.jsx(qv,{}),m==="insights"&&O.jsx(Bv,{}),m==="benchmark"&&O.jsx(Yv,{}),m==="logs"&&O.jsx(Gv,{})]})})}),O.jsx(Nv,{open:A,onClose:()=>s(!1),onImported:L}),O.jsx(jv,{open:D,onClose:()=>q(!1),onImported:L})]})})}function Zv(){return O.jsx(bv,{children:O.jsx(Qv,{})})}hv.createRoot(document.getElementById("root")).render(O.jsx(C.StrictMode,{children:O.jsx(Zv,{})}));export{pe as a,yf as b,mv as c,nv as g,O as j,C as r,sv as t};
@@ -1 +1 @@
1
- import{r as c,j as e,a as o}from"./index-BlAQU8On.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
1
+ import{r as c,j as e,a as o}from"./index-BI7kQHsj.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
@@ -1,2 +1,2 @@
1
- import{r,a as f,j as t}from"./index-BlAQU8On.js";function w(){const[l,o]=r.useState([]),[n,v]=r.useState(!0),d=r.useRef(0),p=r.useCallback(async()=>{try{const{logs:c}=await f.getLogs();o(c),c.length>0&&(d.current=c[c.length-1].id)}finally{v(!1)}},[]),u=r.useCallback(async()=>{await f.clearLogs(),o([]),d.current=0},[]);return r.useEffect(()=>{p()},[p]),r.useEffect(()=>{const c=new EventSource("/api/v1/events"),i=b=>{try{const s=JSON.parse(b.data),a={id:s.payload.id,level:s.payload.level,message:s.payload.message,context:s.payload.context,timestamp:s.timestamp};a.id>d.current&&(d.current=a.id,o(h=>[...h,a]))}catch{}};return c.addEventListener("log:entry",i),c.onerror=()=>{c.close(),setTimeout(()=>{},5e3)},()=>c.close()},[]),{logs:l,loading:n,clearLogs:u,refresh:p}}const k={info:"bg-blue-500/20 text-blue-400",warn:"bg-yellow-500/20 text-yellow-400",error:"bg-red-500/20 text-red-400",success:"bg-green-500/20 text-green-400",debug:"bg-gray-500/20 text-gray-400"},E=["info","warn","error","success","debug"];function y(l){return new Date(l).toLocaleTimeString("en-US",{hour12:!1})}function L(l){return!l||Object.keys(l).length===0?"":Object.entries(l).map(([o,n])=>`${o}="${String(n)}"`).join(" ")}function j(l){return l.map(o=>{const n=L(o.context);return`[${y(o.timestamp)}] [${o.level.toUpperCase()}] ${o.message}${n?" "+n:""}`}).join(`
1
+ import{r,a as f,j as t}from"./index-BI7kQHsj.js";function w(){const[l,o]=r.useState([]),[n,v]=r.useState(!0),d=r.useRef(0),p=r.useCallback(async()=>{try{const{logs:c}=await f.getLogs();o(c),c.length>0&&(d.current=c[c.length-1].id)}finally{v(!1)}},[]),u=r.useCallback(async()=>{await f.clearLogs(),o([]),d.current=0},[]);return r.useEffect(()=>{p()},[p]),r.useEffect(()=>{const c=new EventSource("/api/v1/events"),i=b=>{try{const s=JSON.parse(b.data),a={id:s.payload.id,level:s.payload.level,message:s.payload.message,context:s.payload.context,timestamp:s.timestamp};a.id>d.current&&(d.current=a.id,o(h=>[...h,a]))}catch{}};return c.addEventListener("log:entry",i),c.onerror=()=>{c.close(),setTimeout(()=>{},5e3)},()=>c.close()},[]),{logs:l,loading:n,clearLogs:u,refresh:p}}const k={info:"bg-blue-500/20 text-blue-400",warn:"bg-yellow-500/20 text-yellow-400",error:"bg-red-500/20 text-red-400",success:"bg-green-500/20 text-green-400",debug:"bg-gray-500/20 text-gray-400"},E=["info","warn","error","success","debug"];function y(l){return new Date(l).toLocaleTimeString("en-US",{hour12:!1})}function L(l){return!l||Object.keys(l).length===0?"":Object.entries(l).map(([o,n])=>`${o}="${String(n)}"`).join(" ")}function j(l){return l.map(o=>{const n=L(o.context);return`[${y(o.timestamp)}] [${o.level.toUpperCase()}] ${o.message}${n?" "+n:""}`}).join(`
2
2
  `)}function O(){const{logs:l,loading:o,clearLogs:n,refresh:v}=w(),[d,p]=r.useState("all"),[u,c]=r.useState(""),[i,b]=r.useState(!0),s=r.useRef(null),a=r.useMemo(()=>{let e=l;if(d!=="all"&&(e=e.filter(x=>x.level===d)),u.trim()){const x=u.toLowerCase();e=e.filter(g=>g.message.toLowerCase().includes(x))}return e},[l,d,u]);r.useEffect(()=>{i&&s.current&&(s.current.scrollTop=s.current.scrollHeight)},[a,i]);const h=r.useCallback(()=>{if(!s.current)return;const{scrollTop:e,scrollHeight:x,clientHeight:g}=s.current,m=x-e-g<40;b(m)},[]),C=r.useCallback(async()=>{const e=j(a);await navigator.clipboard.writeText(e)},[a]),N=r.useCallback(()=>{const e=j(a),x=new Blob([e],{type:"text/plain"}),g=URL.createObjectURL(x),m=document.createElement("a");m.href=g,m.download=`mcp-graph-logs-${new Date().toISOString().slice(0,19).replace(/:/g,"-")}.txt`,m.click(),URL.revokeObjectURL(g)},[a]),S=r.useCallback(async()=>{await n()},[n]);return o?t.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading logs..."}):t.jsxs("div",{className:"flex flex-col h-full","data-testid":"logs-tab",children:[t.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[t.jsxs("select",{value:d,onChange:e=>p(e.target.value),className:"px-2 py-1 text-sm rounded border border-[var(--color-border)] bg-[var(--color-bg)] text-[var(--color-text)]","data-testid":"log-level-filter",children:[t.jsx("option",{value:"all",children:"All Levels"}),E.map(e=>t.jsx("option",{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))]}),t.jsx("input",{type:"text",value:u,onChange:e=>c(e.target.value),placeholder:"Search logs...",className:"flex-1 px-2 py-1 text-sm rounded border border-[var(--color-border)] bg-[var(--color-bg)] text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","data-testid":"log-search"}),t.jsx("button",{onClick:()=>b(!i),className:`px-2 py-1 text-xs rounded border ${i?"border-[var(--color-accent)] text-[var(--color-accent)]":"border-[var(--color-border)] text-[var(--color-text-muted)]"}`,title:i?"Auto-scroll enabled":"Auto-scroll paused",children:i?"Auto-scroll ON":"Auto-scroll OFF"}),t.jsx("button",{onClick:C,className:"px-2 py-1 text-xs rounded border border-[var(--color-border)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Copy all visible logs",children:"Copy"}),t.jsx("button",{onClick:N,className:"px-2 py-1 text-xs rounded border border-[var(--color-border)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Download logs as .txt",children:"Download"}),t.jsx("button",{onClick:S,className:"px-2 py-1 text-xs rounded border border-red-500/30 text-red-400 hover:bg-red-500/10",title:"Clear all logs",children:"Clear"}),t.jsx("button",{onClick:()=>void v(),className:"px-2 py-1 text-xs rounded border border-[var(--color-border)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Refresh logs",children:"Refresh"}),t.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[a.length," entries"]})]}),t.jsx("div",{ref:s,onScroll:h,className:"flex-1 overflow-y-auto font-mono text-xs p-2","data-testid":"log-list",children:a.length===0?t.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"No logs to display"}):a.map(e=>t.jsxs("div",{className:"flex items-start gap-2 py-0.5 hover:bg-[var(--color-bg-secondary)]",children:[t.jsx("span",{className:"text-[var(--color-text-muted)] shrink-0",children:y(e.timestamp)}),t.jsx("span",{className:`px-1.5 py-0 rounded text-[10px] font-semibold uppercase shrink-0 ${k[e.level]}`,children:e.level}),t.jsx("span",{className:"text-[var(--color-text)]",children:e.message}),e.context&&Object.keys(e.context).length>0&&t.jsx("span",{className:"text-[var(--color-text-muted)]",children:L(e.context)})]},e.id))})]})}export{O as LogsTab};
@@ -1 +1 @@
1
- import{r as f,j as e}from"./index-BlAQU8On.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-CBs6HePT.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
1
+ import{r as f,j as e}from"./index-BI7kQHsj.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-CIQgj2HC.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
@@ -1 +1 @@
1
- import{r as i,a as b,j as e}from"./index-BlAQU8On.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
1
+ import{r as i,a as b,j as e}from"./index-BI7kQHsj.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
@@ -0,0 +1,8 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32">
2
+ <circle cx="8" cy="8" r="3.5" fill="#6366f1"/>
3
+ <circle cx="24" cy="8" r="3.5" fill="#22d3ee"/>
4
+ <circle cx="16" cy="24" r="3.5" fill="#a78bfa"/>
5
+ <line x1="8" y1="11" x2="16" y2="21" stroke="#6366f1" stroke-width="1.5" stroke-linecap="round"/>
6
+ <line x1="24" y1="11" x2="16" y2="21" stroke="#22d3ee" stroke-width="1.5" stroke-linecap="round"/>
7
+ <line x1="11" y1="8" x2="21" y2="8" stroke="#a78bfa" stroke-width="1.5" stroke-linecap="round"/>
8
+ </svg>
@@ -3,8 +3,9 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
6
7
  <title>mcp-graph Workstation</title>
7
- <script type="module" crossorigin src="/assets/index-BlAQU8On.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-BI7kQHsj.js"></script>
8
9
  <link rel="stylesheet" crossorigin href="/assets/index-CF40hZ69.css">
9
10
  </head>
10
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-graph-workflow/mcp-graph",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "description": "MCP local-first PRD to task graph — transforms text into executable structure",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -78,6 +78,7 @@
78
78
  "vitest": "^4.0.18"
79
79
  },
80
80
  "dependencies": {
81
+ "@mcp-graph-workflow/mcp-graph": "^5.0.1",
81
82
  "@modelcontextprotocol/sdk": "^1.27.1",
82
83
  "better-sqlite3": "^12.6.2",
83
84
  "cheerio": "^1.2.0",