import{$I as N,RI as C,iJ as $,jJ as k,pJ as V}from"./cli-0.5.3-jbzr8k4s.mjs";import{IW as f,KW as t,OW as v,nX as D,pV as P}from"./cli-0.5.3-842pf3t4.mjs";import{NY as n,OY as i,PY as M}from"./cli-0.5.3-vqmxwet2.mjs";import{Tma as w,Xma as L}from"./cli-0.5.3-0df3r78b.mjs";function W(o){let e=b.c(26),{scope:r,parsingErrors:s,warnings:m}=o,a=s.length>0,g=m.length>0;if(!a&&!g)return null;let p;if(e[0]!==a||e[1]!==g)p=(a||g)&&i(t,{color:a?"error":"warning",children:["[",a?"Failed to parse":"Contains warnings","]"," "]}),e[0]=a,e[1]=g,e[2]=p;else p=e[2];let c;if(e[3]!==r)c=k(r),e[3]=r,e[4]=c;else c=e[4];let l;if(e[5]!==c)l=n(t,{children:c}),e[5]=c,e[6]=l;else l=e[6];let u;if(e[7]!==p||e[8]!==l)u=i(f,{children:[p,l]}),e[7]=p,e[8]=l,e[9]=u;else u=e[9];let E;if(e[10]===Symbol.for("react.memo_cache_sentinel"))E=n(t,{dimColor:!0,children:"Location: "}),e[10]=E;else E=e[10];let h;if(e[11]!==r)h=$(r),e[11]=r,e[12]=h;else h=e[12];let d;if(e[13]!==h)d=i(f,{children:[E,n(t,{dimColor:!0,children:h})]}),e[13]=h,e[14]=d;else d=e[14];let T;if(e[15]!==s)T=s.map(F),e[15]=s,e[16]=T;else T=e[16];let _;if(e[17]!==m)_=m.map(x),e[17]=m,e[18]=_;else _=e[18];let y;if(e[19]!==T||e[20]!==_)y=i(f,{marginLeft:1,flexDirection:"column",children:[T,_]}),e[19]=T,e[20]=_,e[21]=y;else y=e[21];let S;if(e[22]!==y||e[23]!==u||e[24]!==d)S=i(f,{flexDirection:"column",marginTop:1,children:[u,d,y]}),e[22]=y,e[23]=u,e[24]=d,e[25]=S;else S=e[25];return S}function x(o,e){let r=o.mcpErrorMetadata?.serverName;return n(f,{children:i(t,{children:[n(t,{dimColor:!0,children:"└ "}),n(t,{color:"warning",children:"[Warning]"}),i(t,{dimColor:!0,children:[" ",r&&`[${r}] `,o.path&&o.path!==""?`${o.path}: `:"",o.message]})]})},`warning-${e}`)}function F(o,e){let r=o.mcpErrorMetadata?.serverName;return n(f,{children:i(t,{children:[n(t,{dimColor:!0,children:"└ "}),n(t,{color:"error",children:"[Error]"}),i(t,{dimColor:!0,children:[" ",r&&`[${r}] `,o.path&&o.path!==""?`${o.path}: `:"",o.message]})]})},`error-${e}`)}function J(){let o=b.c(6),e;if(o[0]===Symbol.for("react.memo_cache_sentinel"))e={scope:"user",config:C("user")},o[0]=e;else e=o[0];let r;if(o[1]===Symbol.for("react.memo_cache_sentinel"))r={scope:"project",config:C("project")},o[1]=r;else r=o[1];let s;if(o[2]===Symbol.for("react.memo_cache_sentinel"))s={scope:"local",config:C("local")},o[2]=s;else s=o[2];let m;if(o[3]===Symbol.for("react.memo_cache_sentinel"))m=[e,r,s,{scope:"enterprise",config:C("enterprise")}],o[3]=m;else m=o[3];let a=m,g=a.some(q),p=a.some(R);if(!g&&!p)return null;let c;if(o[4]===Symbol.for("react.memo_cache_sentinel"))c=n(t,{bold:!0,children:"MCP Config Diagnostics"}),o[4]=c;else c=o[4];let l;if(o[5]===Symbol.for("react.memo_cache_sentinel"))l=i(f,{flexDirection:"column",marginTop:1,marginBottom:1,children:[c,n(f,{marginTop:1,children:i(t,{dimColor:!0,children:["For help configuring MCP servers, see:"," ",n(v,{url:"https://code.claude.com/docs/en/mcp",children:"https://code.claude.com/docs/en/mcp"})]})}),a.map(A)]}),o[5]=l;else l=o[5];return l}function A(o){let{scope:e,config:r}=o;return n(W,{scope:e,parsingErrors:B(r.errors,"fatal"),warnings:B(r.errors,"warning")},e)}function R(o){let{config:e}=o;return B(e.errors,"warning").length>0}function q(o){let{config:e}=o;return B(e.errors,"fatal").length>0}function B(o,e){return o.filter((r)=>r.mcpErrorMetadata?.severity===e)}var b;var z=L(()=>{N();V();D();M();b=w(P(),1)});
export{J as uf,z as vf};
