@llmindset/hf-mcp-server 0.3.11 → 0.3.12

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 +1 @@
1
- {"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../../src/server/mcp-server.ts"],"names":[],"mappings":"AAsEA,OAAO,KAAK,EAAE,aAAa,EAAuB,MAAM,+BAA+B,CAAC;AACxF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAa9E,eAAO,MAAM,gBAAgB,EAAE,WAG9B,CAAC;AAQF,eAAO,MAAM,mBAAmB,GAAI,oBAAoB,SAAS,EAAE,iBAAiB,YAAY,KAAG,aAqhClG,CAAC"}
1
+ {"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../../src/server/mcp-server.ts"],"names":[],"mappings":"AAsEA,OAAO,KAAK,EAAE,aAAa,EAAuB,MAAM,+BAA+B,CAAC;AACxF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAa9E,eAAO,MAAM,gBAAgB,EAAE,WAG9B,CAAC;AAQF,eAAO,MAAM,mBAAmB,GAAI,oBAAoB,SAAS,EAAE,iBAAiB,YAAY,KAAG,aAsiClG,CAAC"}
@@ -428,10 +428,27 @@ export const createServerFactory = (_webServerInstance, sharedApiClient) => {
428
428
  const firstRepoId = typeof repoIds[0] === 'string' ? repoIds[0] : '';
429
429
  const repoType = params.repo_type;
430
430
  const repoTypeSafe = repoType === 'model' || repoType === 'dataset' || repoType === 'space' ? repoType : undefined;
431
+ const operationsParam = params.operations;
432
+ const operations = Array.isArray(operationsParam)
433
+ ? operationsParam.filter((operation) => typeof operation === 'string')
434
+ : undefined;
435
+ const config = params.config;
436
+ const split = params.split;
437
+ const offset = params.offset;
438
+ const limit = params.limit;
431
439
  const result = await runWithQueryLogging(logPromptQuery, {
432
440
  methodName: HUB_REPO_DETAILS_TOOL_CONFIG.name,
433
441
  query: firstRepoId,
434
- parameters: { count: repoIds.length, repo_type: repoTypeSafe, include_readme: includeReadme },
442
+ parameters: {
443
+ count: repoIds.length,
444
+ repo_type: repoTypeSafe,
445
+ include_readme: includeReadme,
446
+ operations,
447
+ config: typeof config === 'string' ? config : undefined,
448
+ split: typeof split === 'string' ? split : undefined,
449
+ offset: typeof offset === 'number' ? offset : undefined,
450
+ limit: typeof limit === 'number' ? limit : undefined,
451
+ },
435
452
  baseOptions: getLoggingOptions(),
436
453
  successOptions: (details) => ({
437
454
  totalResults: details.totalResults,
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../../src/server/mcp-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAe,MAAM,kBAAkB,CAAC;AACvD,OAAO,EACN,eAAe,EACf,mBAAmB,EACnB,2BAA2B,EAE3B,wBAAwB,EAExB,cAAc,EACd,uBAAuB,EAEvB,cAAc,EACd,sBAAsB,EAEtB,eAAe,EACf,wBAAwB,EACxB,0BAA0B,EAE1B,eAAe,EACf,wBAAwB,EACxB,0BAA0B,EAE1B,iBAAiB,EACjB,0BAA0B,EAC1B,4BAA4B,EAE5B,4BAA4B,EAC5B,cAAc,EAEd,kBAAkB,EAClB,qBAAqB,EAErB,aAAa,EACb,qBAAqB,EACrB,cAAc,EAGd,YAAY,EACZ,qBAAqB,EACr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8BAAoD,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,OAAO,CAAC,EAAE,CAAC;4BACrG,YAAY,CAAC,MAAM,EAAE,CAAC;wBACvB,CAAC;6BAAM,CAAC;4BACP,YAAY,CAAC,OAAO,EAAE,CAAC;wBACxB,CAAC;wBACD,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,kCAAkC,CAAC,CAAC;oBACvE,CAAC;gBACF,CAAC,CAAC;gBAEF,eAAe,CAAC,EAAE,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC;gBAG9D,MAAM,CAAC,MAAM,CAAC,OAAO,GAAG,GAAG,EAAE;oBAC5B,eAAe,CAAC,cAAc,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC;oBAC1E,MAAM,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC;gBACpE,CAAC,CAAC;YACH,CAAC;QACF,CAAC;QACD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,CAAC,cAAc,EAAE,CAAC;IAC9E,CAAC,CAAC;AACH,CAAC,CAAC"}
@@ -142,4 +142,4 @@ import{r as al,a as h,R as Ne,j as l,b as Ms,g as ll,c as cl,d as ul}from"./inde
142
142
  `)},ls=function(){var e=parseInt(document.body.getAttribute(bt)||"0",10);return isFinite(e)?e:0},Gg=function(){h.useEffect(function(){return document.body.setAttribute(bt,(ls()+1).toString()),function(){var e=ls()-1;e<=0?document.body.removeAttribute(bt):document.body.setAttribute(bt,e.toString())}},[])},Bg=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Gg();var s=h.useMemo(function(){return Vg(r)},[r]);return h.createElement(zg,{styles:Hg(s,!t,r,n?"":"!important")})},Fo=!1;if(typeof window<"u")try{var rn=Object.defineProperty({},"passive",{get:function(){return Fo=!0,!0}});window.addEventListener("test",rn,rn),window.removeEventListener("test",rn,rn)}catch{Fo=!1}var xt=Fo?{passive:!1}:!1,Ug=function(e){return e.tagName==="TEXTAREA"},da=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ug(e)&&n[t]==="visible")},Wg=function(e){return da(e,"overflowY")},Kg=function(e){return da(e,"overflowX")},cs=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=fa(e,o);if(r){var s=ga(e,o),i=s[1],a=s[2];if(i>a)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},qg=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},Xg=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},fa=function(e,t){return e==="v"?Wg(t):Kg(t)},ga=function(e,t){return e==="v"?qg(t):Xg(t)},Yg=function(e,t){return e==="h"&&t==="rtl"?-1:1},Jg=function(e,t,n,o,r){var s=Yg(e,window.getComputedStyle(t).direction),i=s*o,a=n.target,c=t.contains(a),u=!1,g=i>0,m=0,f=0;do{if(!a)break;var d=ga(e,a),v=d[0],p=d[1],w=d[2],x=p-w-s*v;(v||x)&&fa(e,a)&&(m+=x,f+=v);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(g&&Math.abs(m)<1||!g&&Math.abs(f)<1)&&(u=!0),u},sn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},us=function(e){return[e.deltaX,e.deltaY]},ds=function(e){return e&&"current"in e?e.current:e},Zg=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Qg=function(e){return`
143
143
  .block-interactivity-`.concat(e,` {pointer-events: none;}
144
144
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
145
- `)},em=0,wt=[];function tm(e){var t=h.useRef([]),n=h.useRef([0,0]),o=h.useRef(),r=h.useState(em++)[0],s=h.useState(ua)[0],i=h.useRef(e);h.useEffect(function(){i.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var p=Sg([e.lockRef.current],(e.shards||[]).map(ds),!0).filter(Boolean);return p.forEach(function(w){return w.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),p.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var a=h.useCallback(function(p,w){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!i.current.allowPinchZoom;var x=sn(p),y=n.current,C="deltaX"in p?p.deltaX:y[0]-x[0],S="deltaY"in p?p.deltaY:y[1]-x[1],R,N=p.target,E=Math.abs(C)>Math.abs(S)?"h":"v";if("touches"in p&&E==="h"&&N.type==="range")return!1;var b=cs(E,N);if(!b)return!0;if(b?R=E:(R=E==="v"?"h":"v",b=cs(E,N)),!b)return!1;if(!o.current&&"changedTouches"in p&&(C||S)&&(o.current=R),!R)return!0;var F=o.current||R;return Jg(F,w,p,F==="h"?C:S)},[]),c=h.useCallback(function(p){var w=p;if(!(!wt.length||wt[wt.length-1]!==s)){var x="deltaY"in w?us(w):sn(w),y=t.current.filter(function(R){return R.name===w.type&&(R.target===w.target||w.target===R.shadowParent)&&Zg(R.delta,x)})[0];if(y&&y.should){w.cancelable&&w.preventDefault();return}if(!y){var C=(i.current.shards||[]).map(ds).filter(Boolean).filter(function(R){return R.contains(w.target)}),S=C.length>0?a(w,C[0]):!i.current.noIsolation;S&&w.cancelable&&w.preventDefault()}}},[]),u=h.useCallback(function(p,w,x,y){var C={name:p,delta:w,target:x,should:y,shadowParent:nm(x)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(S){return S!==C})},1)},[]),g=h.useCallback(function(p){n.current=sn(p),o.current=void 0},[]),m=h.useCallback(function(p){u(p.type,us(p),p.target,a(p,e.lockRef.current))},[]),f=h.useCallback(function(p){u(p.type,sn(p),p.target,a(p,e.lockRef.current))},[]);h.useEffect(function(){return wt.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:f}),document.addEventListener("wheel",c,xt),document.addEventListener("touchmove",c,xt),document.addEventListener("touchstart",g,xt),function(){wt=wt.filter(function(p){return p!==s}),document.removeEventListener("wheel",c,xt),document.removeEventListener("touchmove",c,xt),document.removeEventListener("touchstart",g,xt)}},[]);var d=e.removeScrollBar,v=e.inert;return h.createElement(h.Fragment,null,v?h.createElement(s,{styles:Qg(r)}):null,d?h.createElement(Bg,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function nm(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const om=jg(ca,tm);var ma=h.forwardRef(function(e,t){return h.createElement(Pn,Pe({},e,{ref:t,sideCar:om}))});ma.classNames=Pn.classNames;var ko=["Enter"," "],rm=["ArrowDown","PageUp","Home"],pa=["ArrowUp","PageDown","End"],sm=[...rm,...pa],im={ltr:[...ko,"ArrowRight"],rtl:[...ko,"ArrowLeft"]},am={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ut="Menu",[Lt,lm,cm]=Ri(Ut),[mt,ha]=ft(Ut,[cm,Gi,An]),jn=Gi(),va=An(),[um,pt]=mt(Ut),[dm,Wt]=mt(Ut),xa=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:i=!0}=e,a=jn(t),[c,u]=h.useState(null),g=h.useRef(!1),m=We(s),f=er(r);return h.useEffect(()=>{const d=()=>{g.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>g.current=!1;return document.addEventListener("keydown",d,{capture:!0}),()=>{document.removeEventListener("keydown",d,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),l.jsx(og,{...a,children:l.jsx(um,{scope:t,open:n,onOpenChange:m,content:c,onContentChange:u,children:l.jsx(dm,{scope:t,onClose:h.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:g,dir:f,modal:i,children:o})})})};xa.displayName=Ut;var fm="MenuAnchor",cr=h.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=jn(n);return l.jsx(rg,{...r,...o,ref:t})});cr.displayName=fm;var ur="MenuPortal",[gm,wa]=mt(ur,{forceMount:void 0}),ya=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=pt(ur,t);return l.jsx(gm,{scope:t,forceMount:n,children:l.jsx(gt,{present:n||s.open,children:l.jsx(Zi,{asChild:!0,container:r,children:o})})})};ya.displayName=ur;var Se="MenuContent",[mm,dr]=mt(Se),Ca=h.forwardRef((e,t)=>{const n=wa(Se,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=pt(Se,e.__scopeMenu),i=Wt(Se,e.__scopeMenu);return l.jsx(Lt.Provider,{scope:e.__scopeMenu,children:l.jsx(gt,{present:o||s.open,children:l.jsx(Lt.Slot,{scope:e.__scopeMenu,children:i.modal?l.jsx(pm,{...r,ref:t}):l.jsx(hm,{...r,ref:t})})})})}),pm=h.forwardRef((e,t)=>{const n=pt(Se,e.__scopeMenu),o=h.useRef(null),r=me(t,o);return h.useEffect(()=>{const s=o.current;if(s)return Cg(s)},[]),l.jsx(fr,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:z(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),hm=h.forwardRef((e,t)=>{const n=pt(Se,e.__scopeMenu);return l.jsx(fr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),vm=Dt("MenuContent.ScrollLock"),fr=h.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:g,onFocusOutside:m,onInteractOutside:f,onDismiss:d,disableOutsideScroll:v,...p}=e,w=pt(Se,n),x=Wt(Se,n),y=jn(n),C=va(n),S=lm(n),[R,N]=h.useState(null),E=h.useRef(null),b=me(t,E,w.onContentChange),F=h.useRef(0),k=h.useRef(""),G=h.useRef(0),q=h.useRef(null),H=h.useRef("right"),D=h.useRef(0),Y=v?ma:h.Fragment,L=v?{as:vm,allowPinchZoom:!0}:void 0,U=M=>{var W,Me;const $=k.current+M,O=S().filter(ie=>!ie.disabled),B=document.activeElement,J=(W=O.find(ie=>ie.ref.current===B))==null?void 0:W.textValue,ee=O.map(ie=>ie.textValue),ce=Am(ee,$,J),ue=(Me=O.find(ie=>ie.textValue===ce))==null?void 0:Me.ref.current;(function ie(de){k.current=de,window.clearTimeout(F.current),de!==""&&(F.current=window.setTimeout(()=>ie(""),1e3))})($),ue&&setTimeout(()=>ue.focus())};h.useEffect(()=>()=>window.clearTimeout(F.current),[]),Nd();const _=h.useCallback(M=>{var O,B;return H.current===((O=q.current)==null?void 0:O.side)&&jm(M,(B=q.current)==null?void 0:B.area)},[]);return l.jsx(mm,{scope:n,searchRef:k,onItemEnter:h.useCallback(M=>{_(M)&&M.preventDefault()},[_]),onItemLeave:h.useCallback(M=>{var $;_(M)||(($=E.current)==null||$.focus(),N(null))},[_]),onTriggerLeave:h.useCallback(M=>{_(M)&&M.preventDefault()},[_]),pointerGraceTimerRef:G,onPointerGraceIntentChange:h.useCallback(M=>{q.current=M},[]),children:l.jsx(Y,{...L,children:l.jsx(Ni,{asChild:!0,trapped:r,onMountAutoFocus:z(s,M=>{var $;M.preventDefault(),($=E.current)==null||$.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:l.jsx(Ei,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:g,onFocusOutside:m,onInteractOutside:f,onDismiss:d,children:l.jsx(ra,{asChild:!0,...C,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:R,onCurrentTabStopIdChange:N,onEntryFocus:z(c,M=>{x.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(sg,{role:"menu","aria-orientation":"vertical","data-state":Oa(w.open),"data-radix-menu-content":"",dir:x.dir,...y,...p,ref:b,style:{outline:"none",...p.style},onKeyDown:z(p.onKeyDown,M=>{const O=M.target.closest("[data-radix-menu-content]")===M.currentTarget,B=M.ctrlKey||M.altKey||M.metaKey,J=M.key.length===1;O&&(M.key==="Tab"&&M.preventDefault(),!B&&J&&U(M.key));const ee=E.current;if(M.target!==ee||!sm.includes(M.key))return;M.preventDefault();const ue=S().filter(W=>!W.disabled).map(W=>W.ref.current);pa.includes(M.key)&&ue.reverse(),Mm(ue)}),onBlur:z(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(F.current),k.current="")}),onPointerMove:z(e.onPointerMove,Vt(M=>{const $=M.target,O=D.current!==M.clientX;if(M.currentTarget.contains($)&&O){const B=M.clientX>D.current?"right":"left";H.current=B,D.current=M.clientX}}))})})})})})})});Ca.displayName=Se;var xm="MenuGroup",gr=h.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(oe.div,{role:"group",...o,ref:t})});gr.displayName=xm;var wm="MenuLabel",Sa=h.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(oe.div,{...o,ref:t})});Sa.displayName=wm;var xn="MenuItem",fs="menu.itemSelect",In=h.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=h.useRef(null),i=Wt(xn,e.__scopeMenu),a=dr(xn,e.__scopeMenu),c=me(t,s),u=h.useRef(!1),g=()=>{const m=s.current;if(!n&&m){const f=new CustomEvent(fs,{bubbles:!0,cancelable:!0});m.addEventListener(fs,d=>o==null?void 0:o(d),{once:!0}),Ys(m,f),f.defaultPrevented?u.current=!1:i.onClose()}};return l.jsx(ba,{...r,ref:c,disabled:n,onClick:z(e.onClick,g),onPointerDown:m=>{var f;(f=e.onPointerDown)==null||f.call(e,m),u.current=!0},onPointerUp:z(e.onPointerUp,m=>{var f;u.current||(f=m.currentTarget)==null||f.click()}),onKeyDown:z(e.onKeyDown,m=>{const f=a.searchRef.current!=="";n||f&&m.key===" "||ko.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});In.displayName=xn;var ba=h.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,i=dr(xn,n),a=va(n),c=h.useRef(null),u=me(t,c),[g,m]=h.useState(!1),[f,d]=h.useState("");return h.useEffect(()=>{const v=c.current;v&&d((v.textContent??"").trim())},[s.children]),l.jsx(Lt.ItemSlot,{scope:n,disabled:o,textValue:r??f,children:l.jsx(sa,{asChild:!0,...a,focusable:!o,children:l.jsx(oe.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:u,onPointerMove:z(e.onPointerMove,Vt(v=>{o?i.onItemLeave(v):(i.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:z(e.onPointerLeave,Vt(v=>i.onItemLeave(v))),onFocus:z(e.onFocus,()=>m(!0)),onBlur:z(e.onBlur,()=>m(!1))})})})}),ym="MenuCheckboxItem",Ra=h.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return l.jsx(Aa,{scope:e.__scopeMenu,checked:n,children:l.jsx(In,{role:"menuitemcheckbox","aria-checked":wn(n)?"mixed":n,...r,ref:t,"data-state":pr(n),onSelect:z(r.onSelect,()=>o==null?void 0:o(wn(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ra.displayName=ym;var _a="MenuRadioGroup",[Cm,Sm]=mt(_a,{value:void 0,onValueChange:()=>{}}),Ea=h.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=We(o);return l.jsx(Cm,{scope:e.__scopeMenu,value:n,onValueChange:s,children:l.jsx(gr,{...r,ref:t})})});Ea.displayName=_a;var Ma="MenuRadioItem",Na=h.forwardRef((e,t)=>{const{value:n,...o}=e,r=Sm(Ma,e.__scopeMenu),s=n===r.value;return l.jsx(Aa,{scope:e.__scopeMenu,checked:s,children:l.jsx(In,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":pr(s),onSelect:z(o.onSelect,()=>{var i;return(i=r.onValueChange)==null?void 0:i.call(r,n)},{checkForDefaultPrevented:!1})})})});Na.displayName=Ma;var mr="MenuItemIndicator",[Aa,bm]=mt(mr,{checked:!1}),Pa=h.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=bm(mr,n);return l.jsx(gt,{present:o||wn(s.checked)||s.checked===!0,children:l.jsx(oe.span,{...r,ref:t,"data-state":pr(s.checked)})})});Pa.displayName=mr;var Rm="MenuSeparator",ja=h.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(oe.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});ja.displayName=Rm;var _m="MenuArrow",Ia=h.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=jn(n);return l.jsx(ig,{...r,...o,ref:t})});Ia.displayName=_m;var Em="MenuSub",[dh,Ta]=mt(Em),jt="MenuSubTrigger",Fa=h.forwardRef((e,t)=>{const n=pt(jt,e.__scopeMenu),o=Wt(jt,e.__scopeMenu),r=Ta(jt,e.__scopeMenu),s=dr(jt,e.__scopeMenu),i=h.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=s,u={__scopeMenu:e.__scopeMenu},g=h.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return h.useEffect(()=>g,[g]),h.useEffect(()=>{const m=a.current;return()=>{window.clearTimeout(m),c(null)}},[a,c]),l.jsx(cr,{asChild:!0,...u,children:l.jsx(ba,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Oa(n.open),...e,ref:Cn(t,r.onTriggerChange),onClick:m=>{var f;(f=e.onClick)==null||f.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:z(e.onPointerMove,Vt(m=>{s.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),g()},100))})),onPointerLeave:z(e.onPointerLeave,Vt(m=>{var d,v;g();const f=(d=n.content)==null?void 0:d.getBoundingClientRect();if(f){const p=(v=n.content)==null?void 0:v.dataset.side,w=p==="right",x=w?-5:5,y=f[w?"left":"right"],C=f[w?"right":"left"];s.onPointerGraceIntentChange({area:[{x:m.clientX+x,y:m.clientY},{x:y,y:f.top},{x:C,y:f.top},{x:C,y:f.bottom},{x:y,y:f.bottom}],side:p}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(m),m.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:z(e.onKeyDown,m=>{var d;const f=s.searchRef.current!=="";e.disabled||f&&m.key===" "||im[o.dir].includes(m.key)&&(n.onOpenChange(!0),(d=n.content)==null||d.focus(),m.preventDefault())})})})});Fa.displayName=jt;var ka="MenuSubContent",Da=h.forwardRef((e,t)=>{const n=wa(Se,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=pt(Se,e.__scopeMenu),i=Wt(Se,e.__scopeMenu),a=Ta(ka,e.__scopeMenu),c=h.useRef(null),u=me(t,c);return l.jsx(Lt.Provider,{scope:e.__scopeMenu,children:l.jsx(gt,{present:o||s.open,children:l.jsx(Lt.Slot,{scope:e.__scopeMenu,children:l.jsx(fr,{id:a.contentId,"aria-labelledby":a.triggerId,...r,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{var m;i.isUsingKeyboardRef.current&&((m=c.current)==null||m.focus()),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:z(e.onFocusOutside,g=>{g.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:z(e.onEscapeKeyDown,g=>{i.onClose(),g.preventDefault()}),onKeyDown:z(e.onKeyDown,g=>{var d;const m=g.currentTarget.contains(g.target),f=am[i.dir].includes(g.key);m&&f&&(s.onOpenChange(!1),(d=a.trigger)==null||d.focus(),g.preventDefault())})})})})})});Da.displayName=ka;function Oa(e){return e?"open":"closed"}function wn(e){return e==="indeterminate"}function pr(e){return wn(e)?"indeterminate":e?"checked":"unchecked"}function Mm(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Nm(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Am(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Nm(e,Math.max(s,0));r.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return c!==n?c:void 0}function Pm(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],c=t[i],u=a.x,g=a.y,m=c.x,f=c.y;g>o!=f>o&&n<(m-u)*(o-g)/(f-g)+u&&(r=!r)}return r}function jm(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Pm(n,t)}function Vt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Im=xa,Tm=cr,Fm=ya,km=Ca,Dm=gr,Om=Sa,$m=In,Lm=Ra,Vm=Ea,zm=Na,Hm=Pa,Gm=ja,Bm=Ia,Um=Fa,Wm=Da,Tn="DropdownMenu",[Km]=ft(Tn,[ha]),he=ha(),[qm,$a]=Km(Tn),La=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,c=he(t),u=h.useRef(null),[g,m]=Sn({prop:r,defaultProp:s??!1,onChange:i,caller:Tn});return l.jsx(qm,{scope:t,triggerId:gn(),triggerRef:u,contentId:gn(),open:g,onOpenChange:m,onOpenToggle:h.useCallback(()=>m(f=>!f),[m]),modal:a,children:l.jsx(Im,{...c,open:g,onOpenChange:m,dir:o,modal:a,children:n})})};La.displayName=Tn;var Va="DropdownMenuTrigger",za=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=$a(Va,n),i=he(n);return l.jsx(Tm,{asChild:!0,...i,children:l.jsx(oe.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:Cn(t,s.triggerRef),onPointerDown:z(e.onPointerDown,a=>{!o&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:z(e.onKeyDown,a=>{o||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});za.displayName=Va;var Xm="DropdownMenuPortal",Ha=e=>{const{__scopeDropdownMenu:t,...n}=e,o=he(t);return l.jsx(Fm,{...o,...n})};Ha.displayName=Xm;var Ga="DropdownMenuContent",Ba=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=$a(Ga,n),s=he(n),i=h.useRef(!1);return l.jsx(km,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:z(e.onCloseAutoFocus,a=>{var c;i.current||(c=r.triggerRef.current)==null||c.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:z(e.onInteractOutside,a=>{const c=a.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,g=c.button===2||u;(!r.modal||g)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ba.displayName=Ga;var Ym="DropdownMenuGroup",Jm=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(Dm,{...r,...o,ref:t})});Jm.displayName=Ym;var Zm="DropdownMenuLabel",Qm=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(Om,{...r,...o,ref:t})});Qm.displayName=Zm;var ep="DropdownMenuItem",tp=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx($m,{...r,...o,ref:t})});tp.displayName=ep;var np="DropdownMenuCheckboxItem",Ua=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(Lm,{...r,...o,ref:t})});Ua.displayName=np;var op="DropdownMenuRadioGroup",rp=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(Vm,{...r,...o,ref:t})});rp.displayName=op;var sp="DropdownMenuRadioItem",ip=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(zm,{...r,...o,ref:t})});ip.displayName=sp;var ap="DropdownMenuItemIndicator",Wa=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(Hm,{...r,...o,ref:t})});Wa.displayName=ap;var lp="DropdownMenuSeparator",cp=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(Gm,{...r,...o,ref:t})});cp.displayName=lp;var up="DropdownMenuArrow",dp=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(Bm,{...r,...o,ref:t})});dp.displayName=up;var fp="DropdownMenuSubTrigger",gp=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(Um,{...r,...o,ref:t})});gp.displayName=fp;var mp="DropdownMenuSubContent",pp=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(Wm,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});pp.displayName=mp;var hp=La,vp=za,xp=Ha,wp=Ba,yp=Ua,Cp=Wa;function Sp({...e}){return l.jsx(hp,{"data-slot":"dropdown-menu",...e})}function bp({...e}){return l.jsx(vp,{"data-slot":"dropdown-menu-trigger",...e})}function Rp({className:e,sideOffset:t=4,...n}){return l.jsx(xp,{children:l.jsx(wp,{"data-slot":"dropdown-menu-content",sideOffset:t,className:ne("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function _p({className:e,children:t,checked:n,...o}){return l.jsxs(yp,{"data-slot":"dropdown-menu-checkbox-item",className:ne("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...o,children:[l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(Cp,{children:l.jsx(ai,{className:"size-4"})})}),t]})}function hr({className:e,...t}){return l.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:l.jsx("table",{"data-slot":"table",className:ne("w-full caption-bottom text-sm",e),...t})})}function Ep({className:e,...t}){return l.jsx("thead",{"data-slot":"table-header",className:ne("[&_tr]:border-b",e),...t})}function vr({className:e,...t}){return l.jsx("tbody",{"data-slot":"table-body",className:ne("[&_tr:last-child]:border-0",e),...t})}function le({className:e,...t}){return l.jsx("tr",{"data-slot":"table-row",className:ne("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function Mp({className:e,...t}){return l.jsx("th",{"data-slot":"table-head",className:ne("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function j({className:e,...t}){return l.jsx("td",{"data-slot":"table-cell",className:ne("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function zt({columns:e,data:t,searchColumn:n,searchPlaceholder:o="Filter...",defaultColumnVisibility:r={},pageSize:s=25,defaultSorting:i=[]}){var w,x;const[a,c]=h.useState(i),[u,g]=h.useState([]),[m,f]=h.useState(r),[d,v]=h.useState({}),p=vd({data:t,columns:e,onSortingChange:c,onColumnFiltersChange:g,getCoreRowModel:id(),getPaginationRowModel:fd(),getSortedRowModel:gd(),getFilteredRowModel:dd(),onColumnVisibilityChange:f,onRowSelectionChange:v,initialState:{pagination:{pageSize:s}},state:{sorting:a,columnFilters:u,columnVisibility:m,rowSelection:d}});return l.jsxs("div",{className:"w-full",children:[l.jsxs("div",{className:"flex items-center py-4",children:[n&&l.jsx(bo,{placeholder:o,value:((w=p.getColumn(n))==null?void 0:w.getFilterValue())??"",onChange:y=>{var C;return(C=p.getColumn(n))==null?void 0:C.setFilterValue(y.target.value)},className:"max-w-sm"}),l.jsxs(Sp,{children:[l.jsx(bp,{asChild:!0,children:l.jsxs(ct,{variant:"outline",className:"ml-auto",children:["Columns ",l.jsx(li,{className:"ml-2 h-4 w-4"})]})}),l.jsx(Rp,{align:"end",children:p.getAllColumns().filter(y=>y.getCanHide()).map(y=>l.jsx(_p,{className:"capitalize",checked:y.getIsVisible(),onCheckedChange:C=>y.toggleVisibility(!!C),children:y.id},y.id))})]})]}),l.jsx("div",{className:"rounded-md border",children:l.jsxs(hr,{children:[l.jsx(Ep,{children:p.getHeaderGroups().map(y=>l.jsx(le,{children:y.headers.map(C=>l.jsx(Mp,{children:C.isPlaceholder?null:Hr(C.column.columnDef.header,C.getContext())},C.id))},y.id))}),l.jsx(vr,{children:(x=p.getRowModel().rows)!=null&&x.length?p.getRowModel().rows.map(y=>l.jsx(le,{"data-state":y.getIsSelected()&&"selected",children:y.getVisibleCells().map(C=>l.jsx(j,{children:Hr(C.column.columnDef.cell,C.getContext())},C.id))},y.id)):l.jsx(le,{children:l.jsx(j,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})})]})}),l.jsxs("div",{className:"flex items-center justify-end space-x-2 py-4",children:[l.jsxs("div",{className:"text-muted-foreground flex-1 text-sm",children:[p.getFilteredRowModel().rows.length," row(s) total."]}),l.jsxs("div",{className:"space-x-2",children:[l.jsx(ct,{variant:"outline",size:"sm",onClick:()=>p.previousPage(),disabled:!p.getCanPreviousPage(),children:"Previous"}),l.jsx(ct,{variant:"outline",size:"sm",onClick:()=>p.nextPage(),disabled:!p.getCanNextPage(),children:"Next"})]})]})]})}function X(e,t="left"){return({column:n})=>{const o=t==="right"?"justify-end":t==="center"?"justify-center":"justify-start",r=n.getIsSorted();return l.jsx("div",{className:`flex ${o}`,children:l.jsxs(ct,{variant:"ghost",onClick:()=>n.toggleSorting(n.getIsSorted()==="asc"),className:`${t==="right"?"ml-auto":""} hover:bg-muted/50 h-auto p-0 font-medium text-sm`,children:[e,r==="asc"&&l.jsx(Yc,{className:"ml-1 h-3 w-3 text-muted-foreground"}),r==="desc"&&l.jsx(li,{className:"ml-1 h-3 w-3 text-muted-foreground"})]})})}}const Np=300*1e3;function Ka(e){const[t,n]=h.useState(new Map),o=h.useRef();return h.useEffect(()=>{const s=new Date().toISOString(),i=new Set(e.map(a=>a.id));n(a=>{const c=new Map(a);return e.forEach(u=>{c.set(u.id,{...u,lastSeenAt:s,disconnectedAt:void 0})}),c.forEach((u,g)=>{!i.has(g)&&!u.disconnectedAt&&c.set(g,{...u,isConnected:!1,connectionStatus:"Disconnected",disconnectedAt:s,lastActivity:u.lastActivity||s})}),c})},[e]),h.useEffect(()=>{const s=()=>{const i=Date.now();n(a=>{const c=new Map(a);return c.forEach((u,g)=>{if(u.disconnectedAt){const m=new Date(u.disconnectedAt).getTime();i-m>Np&&c.delete(g)}}),c})};return s(),o.current=setInterval(s,3e4),()=>{o.current&&clearInterval(o.current)}},[]),Array.from(t.values()).sort((s,i)=>s.isConnected!==i.isConnected?s.isConnected?-1:1:new Date(i.lastActivity).getTime()-new Date(s.lastActivity).getTime())}function gs(e){const t=new Date,n=new Date(e),o=t.getTime()-n.getTime(),r=Math.floor(o/1e3);if(r<60)return"just now";const s=Math.floor(r/60);if(s<60)return`${s}m ago`;const i=Math.floor(s/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function Ap(e){const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),o=Math.floor(e%3600/60);return t>0?`${t}d ${n}h ${o}m`:n>0?`${n}h ${o}m`:`${o}m`}function Pp(e){return e.length<=12?e:`${e.slice(0,5)}...${e.slice(-5)}`}function jp(e){return e.length<=42?e:`${e.slice(0,35)}.....${e.slice(-5)}`}function Ip({metrics:e}){const t=e.sessions||[],n=Ka(t),o=()=>[{accessorKey:"clientInfo",header:X("Client"),cell:({row:r})=>{const s=r.original,i=s.clientInfo?`${jp(s.clientInfo.name)}@${s.clientInfo.version}`:"unknown";return l.jsx("div",{className:"font-mono text-sm",title:s.clientInfo?`${s.clientInfo.name}@${s.clientInfo.version}`:"unknown",children:i})}},{accessorKey:"id",header:X("Session ID"),cell:({row:r})=>l.jsx("div",{className:"font-mono text-sm",title:r.getValue("id"),children:Pp(r.getValue("id"))})},{accessorKey:"isConnected",header:X("Status"),cell:({row:r})=>{const s=r.original;return l.jsxs(ze,{variant:s.isConnected?"success":"secondary",className:"gap-1",children:[s.isConnected?l.jsx(fi,{className:"h-3 w-3"}):l.jsx(di,{className:"h-3 w-3"}),s.isConnected?"Connected":"Disconnected"]})}},{accessorKey:"connectedAt",header:X("Connected"),cell:({row:r})=>l.jsx("div",{className:"text-sm",children:gs(r.getValue("connectedAt"))})},{accessorKey:"requestCount",header:X("Requests","right"),cell:({row:r})=>l.jsx("div",{className:"text-right font-mono text-sm",children:r.getValue("requestCount")})},{accessorKey:"lastActivity",header:X("Last Activity"),cell:({row:r})=>l.jsx("div",{className:"text-sm",children:gs(r.getValue("lastActivity"))})}];return l.jsxs(He,{children:[l.jsxs(Ge,{children:[l.jsx(Be,{children:"📊 Transport Metrics"}),l.jsx(dt,{children:"Real-time connection and performance metrics for STDIO transport"})]}),l.jsxs(Ue,{className:"space-y-4",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Transport Type"}),l.jsx("p",{className:"text-sm font-mono",children:"STDIO"})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Uptime"}),l.jsx("p",{className:"text-sm font-mono",children:Ap(e.uptimeSeconds)})]})]}),l.jsxs(l.Fragment,{children:[l.jsx(nt,{}),l.jsxs("div",{children:[l.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-3",children:["Sessions (",n.filter(r=>r.isConnected).length," active,"," ",n.filter(r=>!r.isConnected).length," disconnected)"]}),l.jsx(zt,{columns:o(),data:n,searchColumn:"id",searchPlaceholder:"Filter sessions...",pageSize:10,defaultSorting:[{id:"lastActivity",desc:!0}]})]})]})]})]})}function an(e){const t=new Date,n=new Date(e),o=t.getTime()-n.getTime(),r=Math.floor(o/1e3);if(r<60)return"just now";const s=Math.floor(r/60);if(s<60)return`${s}m ago`;const i=Math.floor(s/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function Tp(e){const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),o=Math.floor(e%3600/60);return t>0?`${t}d ${n}h ${o}m`:n>0?`${n}h ${o}m`:`${o}m`}function ln(e){return e<1e3?`${e}ms`:e<6e4?`${Math.round(e/1e3)}s`:`${Math.round(e/6e4)}m`}function Fp(e){return e.length<=12?e:`${e.slice(0,5)}...${e.slice(-5)}`}function ms(e){return e.length<=42?e:`${e.slice(0,35)}.....${e.slice(-5)}`}function kp(e){const t=new Date,n=new Date(e),o=t.getTime()-n.getTime();return Math.floor(o/6e4)<5}function Dp({metrics:e}){const t=e.sessions||[],n=Ka(t),o={streamableHttp:"Streamable HTTP"},r=()=>[{accessorKey:"clientInfo",header:X("Client"),cell:({row:a})=>{const c=a.original,u=c.clientInfo?`${ms(c.clientInfo.name)}@${c.clientInfo.version}`:"unknown";return l.jsx("div",{className:"font-mono text-sm",title:c.clientInfo?`${c.clientInfo.name}@${c.clientInfo.version}`:"unknown",children:u})}},{accessorKey:"id",header:X("Session ID"),cell:({row:a})=>l.jsx("div",{className:"font-mono text-sm",title:a.getValue("id"),children:Fp(a.getValue("id"))})},{accessorKey:"connectionStatus",header:X("Status"),cell:({row:a})=>{const c=a.original,u=c.connectionStatus||(c.isConnected?"Connected":"Disconnected");return u==="Connected"?l.jsxs(ze,{variant:"success",className:"gap-1",children:[l.jsx(fi,{className:"h-3 w-3"}),"Connected"]}):u==="Distressed"?l.jsxs(ze,{variant:"destructive",className:"gap-1",children:[l.jsx(ui,{className:"h-3 w-3"}),"Distressed ",c.pingFailures?`(${c.pingFailures} failed)`:""]}):l.jsxs(ze,{variant:"secondary",className:"gap-1",children:[l.jsx(di,{className:"h-3 w-3"}),"Disconnected"]})}},{accessorKey:"connectedAt",header:X("Connected"),cell:({row:a})=>l.jsx("div",{className:"text-sm",children:an(a.getValue("connectedAt"))})},{accessorKey:"requestCount",header:X("Requests","right"),cell:({row:a})=>l.jsx("div",{className:"text-right font-mono text-sm",children:a.getValue("requestCount")})},{accessorKey:"lastActivity",header:X("Last Activity"),cell:({row:a})=>l.jsx("div",{className:"text-sm",children:an(a.getValue("lastActivity"))})},{accessorKey:"ipAddress",header:X("IP Address"),cell:({row:a})=>l.jsx("div",{className:"font-mono text-sm",title:a.getValue("ipAddress")||"Unknown",children:a.getValue("ipAddress")||"-"})}],s=()=>[{accessorKey:"name",header:X("Client"),cell:({row:a})=>{const c=a.original,u=`${ms(c.name)}@${c.version}`;return l.jsxs("div",{children:[l.jsx("p",{className:"font-medium font-mono text-sm",title:`${c.name}@${c.version}`,children:u}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["First seen ",an(c.firstSeen)]})]})}},{accessorKey:"requestCount",header:X("Initializations","right"),cell:({row:a})=>l.jsx("div",{className:"text-right font-mono text-sm",children:a.getValue("requestCount")})},{accessorKey:"toolCallCount",header:X("Tool Calls","right"),cell:({row:a})=>l.jsx("div",{className:"text-right font-mono text-sm",children:a.getValue("toolCallCount")})},{accessorKey:"newIpCount",header:X("New IPs","right"),cell:({row:a})=>l.jsx("div",{className:"text-right font-mono text-sm",children:a.getValue("newIpCount")})},{accessorKey:"anonCount",header:X("Anon/Auth","right"),cell:({row:a})=>{const c=a.original;return l.jsxs("div",{className:"text-right font-mono text-sm",children:[c.anonCount,"/",c.uniqueAuthCount]})}},{accessorKey:"isConnected",header:X("Status"),cell:({row:a})=>{const c=a.original;return l.jsx("div",{children:kp(c.lastSeen)?l.jsxs(ze,{variant:"success",className:"gap-1",children:[l.jsx(ii,{className:"h-3 w-3"}),"Recent"]}):l.jsxs(ze,{variant:"secondary",className:"gap-1",children:[l.jsx(ci,{className:"h-3 w-3"}),"Idle"]})})}},{accessorKey:"lastSeen",header:X("Last Seen","right"),cell:({row:a})=>l.jsx("div",{className:"text-right text-sm",children:an(a.getValue("lastSeen"))})}],i=e.clients;return l.jsxs(He,{children:[l.jsxs(Ge,{children:[l.jsx(Be,{children:"📊 Transport Metrics"}),l.jsxs(dt,{children:["Real-time connection and performance metrics for"," ",o[e.transport]||e.transport," transport"]})]}),l.jsxs(Ue,{className:"space-y-4",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Transport Type"}),l.jsx("p",{className:"text-sm font-mono",children:o[e.transport]||e.transport})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Uptime"}),l.jsx("p",{className:"text-sm font-mono",children:Tp(e.uptimeSeconds)})]})]}),e.configuration&&l.jsx(l.Fragment,{children:l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Configuration"}),l.jsx("div",{className:"grid grid-cols-1 gap-2",children:e.pings&&l.jsx("div",{className:"text-xs text-muted-foreground bg-muted/30 p-2 rounded",children:e.pings.sent>0&&l.jsxs("p",{children:[l.jsx("span",{className:"font-medium",children:"Ping Status:"})," ",e.pings.successful,"/",e.pings.sent," successful (",e.pings.sent>0?Math.round(e.pings.successful/e.pings.sent*100):0,"%)"]})})}),l.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:["Connections checked every ",ln(e.configuration.heartbeatInterval||3e4),", sessions swept every ",ln(e.configuration.staleCheckInterval),", removed after"," ",ln(e.configuration.staleTimeout)," inactive",e.configuration.pingEnabled&&e.configuration.pingInterval&&`, pings sent every ${ln(e.configuration.pingInterval)}`,e.configuration.pingEnabled&&`, marked distressed after ${e.configuration.pingFailureThreshold||1} failed ping${(e.configuration.pingFailureThreshold||1)!==1?"s":""}`]})]})}),l.jsx(nt,{}),l.jsx("div",{children:l.jsx(hr,{children:l.jsxs(vr,{children:[l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Active Connections"}),l.jsx(j,{className:"text-sm font-mono",children:e.connections.active}),l.jsx(j,{className:"font-medium text-sm",children:"Cleaned Sessions"}),l.jsx(j,{className:"text-sm font-mono",children:e.connections.cleaned??0})]}),l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Total Connections"}),l.jsx(j,{className:"text-sm font-mono",children:e.connections.total}),l.jsx(j,{className:"font-medium text-sm",children:"Requests per Minute (tot/3hr/hr)"}),l.jsxs(j,{className:"text-sm font-mono",children:[e.requests.averagePerMinute,"/",e.requests.last3Hours,"/",e.requests.lastHour]})]}),l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Unique IPs"}),l.jsx(j,{className:"text-sm font-mono",children:e.connections.uniqueIps??0}),l.jsx(j,{className:"font-medium text-sm",children:"Client/Server Errors (4xx/5xx)"}),l.jsxs(j,{className:"text-sm font-mono",children:[e.errors.expected,"/",e.errors.unexpected]})]}),e.sessionLifecycle&&l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Sessions New/Res-fail/Del"}),l.jsxs(j,{className:"text-sm font-mono",colSpan:3,children:[e.sessionLifecycle.created,"/",e.sessionLifecycle.resumedFailed,"/",e.sessionLifecycle.deleted]})]}),e.pings&&l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Pings Sent"}),l.jsx(j,{className:"text-sm font-mono",children:e.pings.sent}),l.jsx(j,{className:"font-medium text-sm",children:"Ping Success Rate"}),l.jsx(j,{className:"text-sm font-mono",children:e.pings.sent>0?`${Math.round(e.pings.successful/e.pings.sent*100)}%`:"-"})]}),e.apiMetrics&&l.jsxs(l.Fragment,{children:[l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Anonymous Users"}),l.jsx(j,{className:"text-sm font-mono",children:e.apiMetrics.anonymous}),l.jsx(j,{className:"font-medium text-sm",children:"Authenticated Users"}),l.jsx(j,{className:"text-sm font-mono",children:e.apiMetrics.authenticated})]}),l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"401 Unauthorized Users"}),l.jsx(j,{className:"text-sm font-mono",children:e.apiMetrics.unauthorized}),l.jsx(j,{className:"font-medium text-sm",children:"403 Forbidden Users"}),l.jsx(j,{className:"text-sm font-mono",children:e.apiMetrics.forbidden})]})]}),l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Gradio Success/Fail"}),l.jsx(j,{className:"text-sm font-mono",children:e.gradioMetrics?`${e.gradioMetrics.success}/${e.gradioMetrics.failure}`:"0/0"}),l.jsx(j,{className:"font-medium text-sm",children:"-"}),l.jsx(j,{className:"text-sm font-mono",children:"-"})]})]})})}),l.jsxs(l.Fragment,{children:[l.jsx(nt,{}),l.jsxs("div",{children:[l.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-3",children:["Sessions (",n.filter(a=>a.isConnected).length," active,"," ",n.filter(a=>!a.isConnected).length," disconnected)"]}),l.jsx(zt,{columns:r(),data:n,searchColumn:"id",searchPlaceholder:"Filter sessions...",pageSize:10,defaultSorting:[{id:"lastActivity",desc:!0}]})]})]}),l.jsxs(l.Fragment,{children:[l.jsx(nt,{}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground mb-3",children:"Client Identities"}),l.jsx(zt,{columns:s(),data:i,searchColumn:"name",searchPlaceholder:"Filter clients...",pageSize:50,defaultSorting:[{id:"lastSeen",desc:!0}]})]})]})]})]})}function ps(e){const t=new Date,n=new Date(e),o=t.getTime()-n.getTime(),r=Math.floor(o/1e3);if(r<60)return"just now";const s=Math.floor(r/60);if(s<60)return`${s}m ago`;const i=Math.floor(s/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function Op(e){const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),o=Math.floor(e%3600/60);return t>0?`${t}d ${n}h ${o}m`:n>0?`${n}h ${o}m`:`${o}m`}function $p(e){const t=new Date,n=new Date(e),o=t.getTime()-n.getTime();return Math.floor(o/6e4)<5}function Lp(e){return e.length<=42?e:`${e.slice(0,35)}.....${e.slice(-5)}`}function Vp({metrics:e}){const t=e.clients,n=()=>[{accessorKey:"name",header:X("Client"),cell:({row:o})=>{const r=o.original,s=`${Lp(r.name)}@${r.version}`;return l.jsxs("div",{children:[l.jsx("p",{className:"font-medium font-mono text-sm",title:`${r.name}@${r.version}`,children:s}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["First seen ",ps(r.firstSeen)]})]})}},{accessorKey:"requestCount",header:X("Initializations","right"),cell:({row:o})=>l.jsx("div",{className:"text-right font-mono text-sm",children:o.getValue("requestCount")})},{accessorKey:"toolCallCount",header:X("Tool Calls","right"),cell:({row:o})=>l.jsx("div",{className:"text-right font-mono text-sm",children:o.getValue("toolCallCount")})},{accessorKey:"newIpCount",header:X("New IPs","right"),cell:({row:o})=>l.jsx("div",{className:"text-right font-mono text-sm",children:o.getValue("newIpCount")})},{accessorKey:"anonCount",header:X("Anon/Auth","right"),cell:({row:o})=>{const r=o.original;return l.jsxs("div",{className:"text-right font-mono text-sm",children:[r.anonCount,"/",r.uniqueAuthCount]})}},{accessorKey:"isConnected",header:X("Status"),cell:({row:o})=>{const r=o.original;return l.jsx("div",{children:$p(r.lastSeen)?l.jsxs(ze,{variant:"success",className:"gap-1",children:[l.jsx(ii,{className:"h-3 w-3"}),"Recent"]}):l.jsxs(ze,{variant:"secondary",className:"gap-1",children:[l.jsx(ci,{className:"h-3 w-3"}),"Idle"]})})}},{accessorKey:"lastSeen",header:X("Last Seen","right"),cell:({row:o})=>l.jsx("div",{className:"text-right text-sm",children:ps(o.getValue("lastSeen"))})}];return l.jsxs(He,{children:[l.jsxs(Ge,{children:[l.jsx(Be,{children:"📊 Transport Metrics"}),l.jsx(dt,{children:"Real-time connection and performance metrics for Stateless HTTP JSON transport"})]}),l.jsxs(Ue,{className:"space-y-4",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Transport Type"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("p",{className:"text-sm font-mono",children:"Stateless HTTP JSON"}),l.jsx(ze,{variant:"secondary",children:e.sessionLifecycle?"analytics":"stateless"})]})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Uptime"}),l.jsx("p",{className:"text-sm font-mono",children:Op(e.uptimeSeconds)})]})]}),l.jsx(nt,{}),l.jsx("div",{children:l.jsx(hr,{children:l.jsxs(vr,{children:[l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Request Count (MCP)"}),l.jsx(j,{className:"text-sm font-mono",children:e.connections.total}),l.jsx(j,{className:"font-medium text-sm",children:"Requests per Minute (tot/3hr/hr)"}),l.jsxs(j,{className:"text-sm font-mono",children:[e.requests.averagePerMinute,"/",e.requests.last3Hours,"/",e.requests.lastHour]})]}),l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Unique IPs"}),l.jsx(j,{className:"text-sm font-mono",children:e.connections.uniqueIps??0}),l.jsx(j,{className:"font-medium text-sm",children:"Client/Server Errors (4xx/5xx)"}),l.jsxs(j,{className:"text-sm font-mono",children:[e.errors.expected,"/",e.errors.unexpected]})]}),(e.staticPageHits200!==void 0||e.staticPageHits405!==void 0)&&l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(tu,{className:"h-3 w-3"}),"hf.co/mcp (200/405)"]})}),l.jsxs(j,{className:"text-sm font-mono",children:[e.staticPageHits200||0,"/",e.staticPageHits405||0]}),l.jsx(j,{className:"font-medium text-sm",children:l.jsx("div",{className:"flex items-center gap-1",children:"Auth Status (Anon/Auth/401)"})}),l.jsxs(j,{className:"text-sm font-mono",children:[e.connections.anonymous,"/",e.connections.authenticated,"/",e.connections.unauthorized||0]})]}),e.apiMetrics&&l.jsxs(l.Fragment,{children:[l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Tool API - Anonymous"}),l.jsx(j,{className:"text-sm font-mono",children:e.apiMetrics.anonymous}),l.jsx(j,{className:"font-medium text-sm",children:"Tool API - Authenticated"}),l.jsx(j,{className:"text-sm font-mono",children:e.apiMetrics.authenticated})]}),l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Tool API - 401 Unauthorized"}),l.jsx(j,{className:"text-sm font-mono",children:e.apiMetrics.unauthorized}),l.jsx(j,{className:"font-medium text-sm",children:"Tool API - 403 Forbidden"}),l.jsx(j,{className:"text-sm font-mono",children:e.apiMetrics.forbidden})]})]}),l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Gradio Success/Fail"}),l.jsx(j,{className:"text-sm font-mono",children:e.gradioMetrics?`${e.gradioMetrics.success}/${e.gradioMetrics.failure}`:"0/0"}),e.sessionLifecycle?l.jsxs(l.Fragment,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Sessions New/Res-fail/Del"}),l.jsxs(j,{className:"text-sm font-mono",children:[e.sessionLifecycle.created,"/",e.sessionLifecycle.resumedFailed,"/",e.sessionLifecycle.deleted]})]}):l.jsxs(l.Fragment,{children:[l.jsx(j,{className:"font-medium text-sm",children:"-"}),l.jsx(j,{className:"text-sm font-mono",children:"-"})]})]})]})})}),l.jsxs(l.Fragment,{children:[l.jsx(nt,{}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground mb-3",children:"Client Identities"}),l.jsx(zt,{columns:n(),data:t,searchColumn:"name",searchPlaceholder:"Filter clients...",pageSize:50,defaultSorting:[{id:"lastSeen",desc:!0}]})]})]})]})]})}const zp=e=>fetch(e).then(t=>{if(!t.ok)throw new Error(`Failed to fetch: ${t.status}`);return t.json()});function Hp(){const{data:e,error:t}=It("/api/transport-metrics",zp,{refreshInterval:3e3,revalidateOnFocus:!0,revalidateOnReconnect:!0});return t?l.jsxs(He,{children:[l.jsx(Ge,{children:l.jsx(Be,{children:"📊 Transport Metrics"})}),l.jsx(Ue,{children:l.jsxs(gu,{variant:"destructive",children:[l.jsx(ui,{className:"h-4 w-4"}),l.jsx(mu,{children:"Error Loading Metrics"}),l.jsxs(pu,{children:["Failed to load transport metrics: ",t.message]})]})})]}):e?e.transport==="stdio"?l.jsx(Ip,{metrics:e}):e.isStateless?l.jsx(Vp,{metrics:e}):l.jsx(Dp,{metrics:e}):l.jsxs(He,{children:[l.jsx(Ge,{children:l.jsx(Be,{children:"📊 Transport Metrics"})}),l.jsx(Ue,{children:l.jsxs("div",{className:"animate-pulse space-y-2",children:[l.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4"}),l.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/2"}),l.jsx("div",{className:"h-4 bg-gray-200 rounded w-2/3"})]})})]})}const Gp=e=>fetch(e).then(t=>{if(!t.ok)throw new Error(`Failed to fetch: ${t.status}`);return t.json()});function Bp(){const[e,t]=h.useState(!1),{data:n,error:o}=It("/api/transport-metrics",Gp,{refreshInterval:3e3,revalidateOnFocus:!0,revalidateOnReconnect:!0}),r=!n&&!o,s=(n==null?void 0:n.transport)==="stdio",i=((n==null?void 0:n.methods)||[]).map(f=>{let d=f.errors,v,p;if(f.method.startsWith("tools/call:")&&(n!=null&&n.gradioMetrics)){const y=f.method.replace("tools/call:",""),C=n.gradioMetrics.byTool;C[y]&&(v=C[y].success,p=C[y].failure,d+=p)}const w=f.count>0?d/f.count*100:0;return{method:f.method,count:f.count,errors:d,errorRate:w,averageResponseTime:f.averageResponseTime,lastCalled:f.lastCalled,gradioSuccess:v,gradioFailure:p}}),a=e?i.filter(f=>f.method.startsWith("tools/call")||f.method.startsWith("prompts/get")):i,c=i.reduce((f,d)=>f+d.count,0),u=i.filter(f=>f.method.startsWith("tools/call")).reduce((f,d)=>f+d.count,0),g=i.filter(f=>f.method.startsWith("prompts/get")).reduce((f,d)=>f+d.count,0),m=[{accessorKey:"method",header:X("Method"),cell:({row:f})=>{const d=f.getValue("method");return l.jsx("div",{className:"font-mono text-sm",children:d==="tools/call"?l.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:"tools/call"}):d.startsWith("tools/call:")?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:"tools/call:"}),l.jsx("span",{className:"text-green-600 dark:text-green-400",children:d.replace("tools/call:","")})]}):d==="prompts/get"?l.jsx("span",{className:"text-purple-600 dark:text-purple-400",children:"prompts/get"}):d.startsWith("prompts/get:")?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"text-purple-600 dark:text-purple-400",children:"prompts/get:"}),l.jsx("span",{className:"text-orange-600 dark:text-orange-400",children:d.replace("prompts/get:","")})]}):d})}},{accessorKey:"count",header:X("Calls","right"),cell:({row:f})=>l.jsx("div",{className:"text-right font-mono",children:f.getValue("count").toLocaleString()})},{accessorKey:"errors",header:X("Errors","right"),cell:({row:f})=>{const d=f.getValue("errors");return l.jsx("div",{className:"text-right font-mono",children:d>0?l.jsx("span",{className:"text-red-600 dark:text-red-400",children:d}):"0"})}},{accessorKey:"gradioMetrics",header:X("Success/Failure","right"),cell:({row:f})=>{const d=f.original;return d.gradioSuccess!==void 0&&d.gradioFailure!==void 0?l.jsxs("div",{className:"text-right font-mono text-sm",children:[l.jsx("span",{className:"text-green-600 dark:text-green-400",children:d.gradioSuccess}),l.jsx("span",{className:"text-muted-foreground",children:"/"}),l.jsx("span",{className:"text-red-600 dark:text-red-400",children:d.gradioFailure})]}):l.jsx("div",{className:"text-right text-muted-foreground",children:"—"})}},{accessorKey:"errorRate",header:X("Error Rate","right"),cell:({row:f})=>{const d=f.getValue("errorRate");return l.jsx("div",{className:"text-right font-mono",children:d>0?l.jsxs("span",{className:"text-red-600 dark:text-red-400",children:[d.toFixed(1),"%"]}):"0%"})}},{accessorKey:"averageResponseTime",header:X("Avg Response","right"),cell:({row:f})=>{const d=f.getValue("averageResponseTime");return l.jsx("div",{className:"text-right font-mono",children:d?`${d.toFixed(0)}ms`:"—"})}},{accessorKey:"lastCalled",header:X("Last Called","right"),cell:({row:f})=>l.jsx("div",{className:"text-right text-sm text-muted-foreground",children:new Date(f.getValue("lastCalled")).toLocaleTimeString()})}];return l.jsxs(He,{children:[l.jsxs(Ge,{children:[l.jsx(Be,{children:"HTTP JSON Transport Statistics"}),l.jsxs(dt,{children:["MCP method call statistics and performance metrics",s?" (Empty in STDIO mode)":n!=null&&n.isStateless?"":" (Response times not available in stateful modes)"]})]}),l.jsxs(Ue,{children:[r&&l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading metrics..."})}),o&&l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsxs("div",{className:"text-sm text-destructive",children:["Error loading metrics: ",o.message]})}),s&&l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsx("div",{className:"text-sm text-muted-foreground",children:"Method tracking is not available in STDIO mode. This data is only collected for HTTP-based transports."})}),n&&!s&&l.jsxs("div",{className:"space-y-4",children:[i.length>0&&l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"text-sm text-muted-foreground",children:["Showing ",a.length," method",a.length!==1?"s":""," tracked since"," ",new Date(n.startupTime).toLocaleString()]}),l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsxs("div",{className:"text-sm font-medium",children:["Total MCP Calls: ",l.jsx("span",{className:"font-mono",children:c.toLocaleString()})]}),l.jsxs("div",{className:"text-sm font-medium",children:["Tool Calls: ",l.jsx("span",{className:"font-mono",children:u.toLocaleString()})]}),l.jsxs("div",{className:"text-sm font-medium",children:["Prompt Calls: ",l.jsx("span",{className:"font-mono",children:g.toLocaleString()})]})]})]}),i.length>0&&l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(qo,{id:"tool-prompt-calls-filter",checked:e,onCheckedChange:f=>t(!!f)}),l.jsx("label",{htmlFor:"tool-prompt-calls-filter",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",children:"Show only Tools/Prompts"})]}),a.length===0?l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsx("div",{className:"text-sm text-muted-foreground",children:e?"No tool or prompt calls recorded yet.":"No method calls recorded yet."})}):l.jsx(zt,{columns:m,data:a,searchColumn:"method",searchPlaceholder:"Filter methods...",pageSize:50,defaultColumnVisibility:{method:!0,count:!0,errors:!1,gradioMetrics:!1,errorRate:!0,averageResponseTime:n.transport==="streamableHttpJson",lastCalled:!0},defaultSorting:[{id:"count",desc:!0}]})]})]})]})}function hs(e){return e.transport==="stdio"?e.defaultHfTokenSet&&e.hfTokenMasked?{text:e.hfTokenMasked,isWarning:!1}:{text:"Warning: No token set",isWarning:!0}:e.defaultHfTokenSet?{text:`⚠️ Using ${e.hfTokenMasked||"token"} as default`,isWarning:!0}:{text:"Using Authorization Headers",isWarning:!1}}function Up({isLoading:e,error:t,transportInfo:n}){const o=()=>{switch(n.transport){case"stdio":return"STDIO";case"streamableHttp":case"streamableHttpJson":return"Streamable HTTP";default:return"Unknown"}},r=()=>{switch(n.transport){case"streamableHttp":case"streamableHttpJson":return"/mcp";case"stdio":return"stdin/stdout";default:return"unknown"}},s=()=>n.transport==="streamableHttpJson"||n.transport==="streamableHttp"&&n.jsonResponseEnabled===!0,i=()=>s()?l.jsx("span",{className:"ml-1.5 px-1.5 py-0.5 bg-green-100 text-green-800 text-[10px] rounded-sm whitespace-nowrap",children:"JSON (stateless)"}):n.transport==="streamableHttp"?l.jsx("span",{className:"ml-1.5 px-1.5 py-0.5 bg-blue-100 text-blue-800 text-[10px] rounded-sm whitespace-nowrap",children:"Session Based"}):null;if(e)return l.jsx("div",{className:"text-center text-xs text-muted-foreground py-2",children:"Loading connection information..."});if(t)return l.jsxs("div",{className:"text-center text-xs text-destructive py-2",children:["Error: ",t]});const a=n.port||3e3,c=n.transport!=="stdio";return l.jsx("div",{className:"fixed bottom-0 left-0 w-full bg-muted/50 border-t border-border py-2 px-4",children:l.jsxs("div",{className:"max-w-[700px] mx-auto flex justify-between items-center text-xs",children:[l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("span",{className:"text-muted-foreground",children:"Using"}),l.jsx("span",{className:"font-medium text-primary",children:o()}),n.transport==="stdio"&&l.jsxs("span",{className:"text-muted-foreground flex items-center",children:["Client Info :",n.stdioClient?l.jsx("span",{className:"ml-2 flex items-center",children:l.jsxs("span",{className:"ml-1 font-medium text-green-700",children:[n.stdioClient.name," ",n.stdioClient.version]})}):l.jsx("span",{className:"ml-2 text-muted-foreground",children:" (disconnected) "})]}),c&&l.jsxs("span",{className:"text-muted-foreground flex items-center",children:["on port ",l.jsx("span",{className:"font-mono mx-1",children:a}),"at ",l.jsx("span",{className:"font-mono mx-1",children:r()}),i()]})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("span",{className:"text-muted-foreground",children:" Default HF Token:"}),l.jsx("span",{className:`font-mono ${hs(n).isWarning?"text-red-500":""}`,children:hs(n).text})]})]})})}var Fn="Tabs",[Wp]=ft(Fn,[An]),qa=An(),[Kp,xr]=Wp(Fn),Xa=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:r,defaultValue:s,orientation:i="horizontal",dir:a,activationMode:c="automatic",...u}=e,g=er(a),[m,f]=Sn({prop:o,onChange:r,defaultProp:s??"",caller:Fn});return l.jsx(Kp,{scope:n,baseId:gn(),value:m,onValueChange:f,orientation:i,dir:g,activationMode:c,children:l.jsx(oe.div,{dir:g,"data-orientation":i,...u,ref:t})})});Xa.displayName=Fn;var Ya="TabsList",Ja=h.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...r}=e,s=xr(Ya,n),i=qa(n);return l.jsx(ra,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:o,children:l.jsx(oe.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:t})})});Ja.displayName=Ya;var Za="TabsTrigger",Qa=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:r=!1,...s}=e,i=xr(Za,n),a=qa(n),c=nl(i.baseId,o),u=ol(i.baseId,o),g=o===i.value;return l.jsx(sa,{asChild:!0,...a,focusable:!r,active:g,children:l.jsx(oe.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":u,"data-state":g?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:c,...s,ref:t,onMouseDown:z(e.onMouseDown,m=>{!r&&m.button===0&&m.ctrlKey===!1?i.onValueChange(o):m.preventDefault()}),onKeyDown:z(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&i.onValueChange(o)}),onFocus:z(e.onFocus,()=>{const m=i.activationMode!=="manual";!g&&!r&&m&&i.onValueChange(o)})})})});Qa.displayName=Za;var el="TabsContent",tl=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:r,children:s,...i}=e,a=xr(el,n),c=nl(a.baseId,o),u=ol(a.baseId,o),g=o===a.value,m=h.useRef(g);return h.useEffect(()=>{const f=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(f)},[]),l.jsx(gt,{present:r||g,children:({present:f})=>l.jsx(oe.div,{"data-state":g?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!f,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:f&&s})})});tl.displayName=el;function nl(e,t){return`${e}-trigger-${t}`}function ol(e,t){return`${e}-content-${t}`}var qp=Xa,Xp=Ja,Yp=Qa,Jp=tl;function Zp({className:e,...t}){return l.jsx(qp,{"data-slot":"tabs",className:ne("flex flex-col gap-2",e),...t})}function Qp({className:e,...t}){return l.jsx(Xp,{"data-slot":"tabs-list",className:ne("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function yt({className:e,...t}){return l.jsx(Yp,{"data-slot":"tabs-trigger",className:ne("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function Ct({className:e,...t}){return l.jsx(Jp,{"data-slot":"tabs-content",className:ne("flex-1 outline-none",e),...t})}const vs="ALLOW_README_INCLUDE",xs="NO_GRADIO_IMAGE_CONTENT",eh=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}).format(new Date),Do={name:"space_search",description:"Find Hugging Face Spaces using semantic search. IMPORTANT Only MCP Servers can be used with the dynamic_space toolInclude links to the Space when presenting the results.",annotations:{title:"Hugging Face Space Search"}},Oo={name:"hub_repo_search",description:"Search Hugging Face repositories with a shared query interface. You can target models, datasets, spaces, or aggregate across multiple repo types in one call. Use space_search for semantic-first discovery of Spaces. Include links to repositories in your response.",annotations:{title:"Repo Search"}},$o={name:"create_repo",description:"Create a Hugging Face model, dataset, Space, or bucket repository. name must be fully qualified, for example 'username/repo-name'.",annotations:{title:"Create Hugging Face Repository"}},Lo={name:"paper_search",description:"Find Machine Learning research papers on the Hugging Face hub. Include 'Link to paper' When presenting the results. Consider whether tabulating results matches user intent.",annotations:{title:"Paper Search"}},Vo={name:"hub_repo_details",description:"Get details for one or more Hugging Face repos (model, dataset, or space). Auto-detects type unless specified.",annotations:{title:"Hub Repo Details"}},rl={name:"duplicate_space",annotations:{title:"Duplicate Hugging Face Space"}},sl={name:"space_files",annotations:{title:"Space Files List"}},zo={name:"hf_doc_search",description:`Search and Discover Hugging Face Product and Library documentation. Send an empty query to discover structure and navigation instructions. Knowledge up-to-date as at ${eh}. Combine with the Product filter to focus results.`,annotations:{title:"Hugging Face Documentation Search"}},Ho={name:"hf_doc_fetch",description:"Fetch a document from the Hugging Face or Gradio documentation library. For large documents, use offset to get subsequent chunks.",annotations:{title:"Fetch a document from the Hugging Face documentation library"}},ws=Do.name,th="model_search",yn=Oo.name,ys=$o.name,nh="model_details",Cs=Lo.name,oh="dataset_search",rh="dataset_details",Ft=Vo.name,Ss=rl.name,bs=sl.name,Rs=zo.name,_s=Ho.name,sh=new Set([th,"model-search","hf_model_search"]),ih=new Set([oh,"dataset-search","hf_dataset_search"]),ah=new Set([yn,"repo_search","repo-search","hf_repo_search"]);function lh(e){return sh.has(e)||ih.has(e)||ah.has(e)?yn:e}function Es(e){const t=new Set,n=[];let o=!1;for(const r of e){const s=lh(r);if(s===nh||s===rh){o=!0;continue}t.has(s)||(t.add(s),n.push(s))}return o&&!t.has(Ft)&&(t.add(Ft),n.push(Ft)),n}const uo=e=>fetch(e).then(t=>{if(!t.ok)throw new Error(`Failed to fetch: ${t.status}`);return t.json()});function ch(){var b,F,k,G,q,H,D,Y,L,U,_;const{data:e,error:t}=It("/api/transport",uo,{refreshInterval:3e3,revalidateOnFocus:!0,revalidateOnReconnect:!0});It("/api/sessions",uo,{refreshInterval:3e3,revalidateOnFocus:!0});const{data:n}=It("/api/settings",uo),o=((b=n==null?void 0:n.builtInTools)==null?void 0:b.includes(vs))??!1,r=((F=n==null?void 0:n.builtInTools)==null?void 0:F.includes(xs))??!1,[s,i]=h.useState(["","",""]),[a,c]=h.useState(["","",""]),[u,g]=h.useState([!1,!1,!1]),[m,f]=h.useState(!1);h.useEffect(()=>{if(n!=null&&n.spaceTools&&!m){const M=["","",""],$=["","",""],O=[!1,!1,!1];n.spaceTools.forEach((B,J)=>{J<3&&(M[J]=B.name,$[J]=B.subdomain,O[J]=!0)}),i(M),c($),g(O),f(!0)}},[n,m]);const d=!e&&!t,v=t?t.message:null,p=async(M,$)=>{try{const O=n||{builtInTools:[]},B=Es(O.builtInTools),J=$?[...B.filter(W=>W!==M),M]:B.filter(W=>W!==M),ee=Es(J),ce={...O,builtInTools:ee};cn("/api/settings",ce,!1);const ue=await fetch("/api/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({builtInTools:ee})});if(!ue.ok)throw new Error(`Failed to update tool settings: ${ue.status}`);cn("/api/settings"),console.log(`${M} is now ${$?"enabled":"disabled"}`)}catch(O){console.error("Error updating tool settings:",O),alert(`Error updating ${M}: ${O instanceof Error?O.message:"Unknown error"}`),cn("/api/settings")}},w=async(M,$)=>{const O=[...u];O[M]=$,g(O),await C(O)},x=async(M,$)=>{const O=[...s];O[M]=$,i(O),u[M]&&await C(u)},y=async(M,$)=>{const O=[...a];O[M]=$,c(O),u[M]&&await C(u)},C=async M=>{try{const $=[];for(let B=0;B<3;B++)M[B]&&s[B]&&a[B]&&$.push({_id:`space-${B}`,name:s[B],subdomain:a[B],emoji:"🔧"});const O=await fetch("/api/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({spaceTools:$})});if(!O.ok)throw new Error(`Failed to update space tools: ${O.status}`)}catch($){console.error("Error updating space tools:",$)}},S=async()=>{const M="https://huggingface.co/mcp";try{await navigator.clipboard.writeText(M)}catch($){console.error("Failed to copy URL:",$)}},R=()=>{window.open("https://huggingface.co/settings/mcp","_blank")},N={paper_search:{id:Cs,label:Lo.annotations.title,description:Lo.description,settings:{enabled:((k=n==null?void 0:n.builtInTools)==null?void 0:k.includes(Cs))??!0}},space_search:{id:ws,label:Do.annotations.title,description:Do.description,settings:{enabled:((G=n==null?void 0:n.builtInTools)==null?void 0:G.includes(ws))??!0}},hub_repo_search:{id:yn,label:Oo.annotations.title,description:Oo.description,settings:{enabled:((q=n==null?void 0:n.builtInTools)==null?void 0:q.includes(yn))??!0}},create_repo:{id:ys,label:$o.annotations.title,description:$o.description,settings:{enabled:((H=n==null?void 0:n.builtInTools)==null?void 0:H.includes(ys))??!0}},hub_repo_details:{id:Ft,label:Vo.annotations.title,description:Vo.description,settings:{enabled:((D=n==null?void 0:n.builtInTools)==null?void 0:D.includes(Ft))??!0}},include_readme:{id:vs,label:"Allow README Include (flag)",description:"Allows hub_repo_details to attach README content when the tool request explicitly opts in. Requires reconnect to take effect.",settings:{enabled:o}},doc_semantic_search:{id:Rs,label:zo.annotations.title,description:zo.description,settings:{enabled:((Y=n==null?void 0:n.builtInTools)==null?void 0:Y.includes(Rs))??!0}},doc_fetch:{id:_s,label:Ho.annotations.title,description:Ho.description,settings:{enabled:((L=n==null?void 0:n.builtInTools)==null?void 0:L.includes(_s))??!0}}},E={duplicate_space:{id:Ss,label:rl.annotations.title,description:"Duplicate a Hugging Face Space to your account.",settings:{enabled:((U=n==null?void 0:n.builtInTools)==null?void 0:U.includes(Ss))??!0}},space_files:{id:bs,label:sl.annotations.title,description:"List all files in a static Hugging Face Space with download URLs.",settings:{enabled:((_=n==null?void 0:n.builtInTools)==null?void 0:_.includes(bs))??!0}},no_gradio_images:{id:xs,label:"Disable Gradio Images (flag)",description:"Strips image responses from Gradio spaces. Mirrors the 'no_image_content' URL parameter and requires reconnect to take effect.",settings:{enabled:r}}};return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"min-h-screen p-4 sm:p-8 pb-20",children:l.jsx("div",{className:"max-w-4xl mx-auto",children:l.jsxs(Zp,{defaultValue:"metrics",className:"w-full",children:[l.jsxs(Qp,{className:"mb-6 w-full overflow-x-auto flex-nowrap",children:[l.jsx(yt,{value:"metrics",className:"whitespace-nowrap",children:"📊 Metrics"}),l.jsx(yt,{value:"mcp",className:"whitespace-nowrap",children:"🔧 MCP"}),!(e!=null&&e.externalApiMode)&&l.jsx(yt,{value:"search",className:"whitespace-nowrap",children:"🔍 Search"}),!(e!=null&&e.externalApiMode)&&l.jsx(yt,{value:"spaces",className:"whitespace-nowrap",children:"🚀 Spaces"}),!(e!=null&&e.externalApiMode)&&l.jsx(yt,{value:"gradio",className:"whitespace-nowrap",children:"🚀 Gradio"}),l.jsx(yt,{value:"home",className:"whitespace-nowrap",children:"🏠 Home"})]}),l.jsx(Ct,{value:"metrics",className:"mt-0",children:l.jsx(Hp,{})}),l.jsx(Ct,{value:"mcp",className:"mt-0",children:l.jsx(Bp,{})}),!(e!=null&&e.externalApiMode)&&l.jsx(Ct,{value:"search",className:"mt-0",children:l.jsx(Dr,{title:"🤗 Hugging Face Search Tools (MCP)",description:"Find and use Hugging Face and Community content.",tools:N,onToolToggle:p})}),!(e!=null&&e.externalApiMode)&&l.jsx(Ct,{value:"spaces",className:"mt-0",children:l.jsx(Dr,{title:"🤗 Hugging Face Space Tools (MCP)",description:"Manage and duplicate Hugging Face Spaces.",tools:E,onToolToggle:p})}),!(e!=null&&e.externalApiMode)&&l.jsx(Ct,{value:"gradio",className:"mt-0",children:l.jsx(du,{spaceNames:s,spaceSubdomains:a,enabledSpaces:u,onSpaceToolToggle:w,onSpaceToolNameChange:x,onSpaceToolSubdomainChange:y})}),l.jsx(Ct,{value:"home",className:"mt-0",children:l.jsxs(He,{children:[l.jsxs(Ge,{children:[l.jsx(Be,{children:"🤗 HF MCP Server"}),l.jsx(dt,{children:"Connect with AI assistants through the Model Context Protocol"})]}),l.jsxs(Ue,{className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground mb-3",children:"What's MCP?"}),l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:"The Model Context Protocol (MCP) is an open standard that enables AI assistants to securely connect to external data sources and tools. This HF MCP Server provides access to Hugging Face's ecosystem of models, datasets, and Spaces, allowing AI assistants to search, analyze, and interact with ML resources directly."})]}),l.jsx(nt,{}),l.jsx("div",{className:"bg-blue-50 dark:bg-blue-950 border border-blue-200 dark:border-blue-800 rounded-lg p-4",children:l.jsxs("div",{className:"flex items-start space-x-3",children:[l.jsx("div",{className:"flex-shrink-0 mt-0.5",children:l.jsx("svg",{className:"h-5 w-5 text-blue-600 dark:text-blue-400",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-semibold text-blue-900 dark:text-blue-100 mb-2",children:"Tool Management Scope"}),((e==null?void 0:e.externalApiMode)||(e==null?void 0:e.transport)!=="stdio"&&!(e!=null&&e.externalApiMode))&&l.jsx("p",{className:"text-sm text-blue-700 dark:text-blue-300 leading-relaxed",children:e!=null&&e.externalApiMode?l.jsxs(l.Fragment,{children:[l.jsx("strong",{children:"External API Mode:"})," Tools are managed by an external API. Tool Selection Tabs are not available."]}):l.jsxs(l.Fragment,{children:[l.jsx("strong",{children:"Shared Mode:"})," Tool toggles in this interface affect"," ",l.jsx("strong",{children:"all connected MCP server instances"})," and control tool availability for all connected Hosts."]})})]})]})}),l.jsx(nt,{}),l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs(ct,{size:"xl",onClick:S,className:"w-full transition-all duration-200 active:bg-green-500 active:border-green-500 touch-manipulation",children:[l.jsx(Qc,{className:"mr-2 h-5 w-5"}),"Copy MCP URL"]}),l.jsxs(ct,{size:"xl",variant:"outline",onClick:R,className:"w-full touch-manipulation",children:[l.jsx(ou,{className:"mr-2 h-5 w-5"}),"Go to Settings"]})]})]})]})})]})})}),l.jsx(Up,{isLoading:d,error:v,transportInfo:e||{transport:"unknown"}})]})}ul.createRoot(document.getElementById("root")).render(l.jsx(h.StrictMode,{children:l.jsx(ch,{})}));
145
+ `)},em=0,wt=[];function tm(e){var t=h.useRef([]),n=h.useRef([0,0]),o=h.useRef(),r=h.useState(em++)[0],s=h.useState(ua)[0],i=h.useRef(e);h.useEffect(function(){i.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var p=Sg([e.lockRef.current],(e.shards||[]).map(ds),!0).filter(Boolean);return p.forEach(function(w){return w.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),p.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var a=h.useCallback(function(p,w){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!i.current.allowPinchZoom;var x=sn(p),y=n.current,C="deltaX"in p?p.deltaX:y[0]-x[0],S="deltaY"in p?p.deltaY:y[1]-x[1],R,N=p.target,E=Math.abs(C)>Math.abs(S)?"h":"v";if("touches"in p&&E==="h"&&N.type==="range")return!1;var b=cs(E,N);if(!b)return!0;if(b?R=E:(R=E==="v"?"h":"v",b=cs(E,N)),!b)return!1;if(!o.current&&"changedTouches"in p&&(C||S)&&(o.current=R),!R)return!0;var F=o.current||R;return Jg(F,w,p,F==="h"?C:S)},[]),c=h.useCallback(function(p){var w=p;if(!(!wt.length||wt[wt.length-1]!==s)){var x="deltaY"in w?us(w):sn(w),y=t.current.filter(function(R){return R.name===w.type&&(R.target===w.target||w.target===R.shadowParent)&&Zg(R.delta,x)})[0];if(y&&y.should){w.cancelable&&w.preventDefault();return}if(!y){var C=(i.current.shards||[]).map(ds).filter(Boolean).filter(function(R){return R.contains(w.target)}),S=C.length>0?a(w,C[0]):!i.current.noIsolation;S&&w.cancelable&&w.preventDefault()}}},[]),u=h.useCallback(function(p,w,x,y){var C={name:p,delta:w,target:x,should:y,shadowParent:nm(x)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(S){return S!==C})},1)},[]),g=h.useCallback(function(p){n.current=sn(p),o.current=void 0},[]),m=h.useCallback(function(p){u(p.type,us(p),p.target,a(p,e.lockRef.current))},[]),f=h.useCallback(function(p){u(p.type,sn(p),p.target,a(p,e.lockRef.current))},[]);h.useEffect(function(){return wt.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:f}),document.addEventListener("wheel",c,xt),document.addEventListener("touchmove",c,xt),document.addEventListener("touchstart",g,xt),function(){wt=wt.filter(function(p){return p!==s}),document.removeEventListener("wheel",c,xt),document.removeEventListener("touchmove",c,xt),document.removeEventListener("touchstart",g,xt)}},[]);var d=e.removeScrollBar,v=e.inert;return h.createElement(h.Fragment,null,v?h.createElement(s,{styles:Qg(r)}):null,d?h.createElement(Bg,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function nm(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const om=jg(ca,tm);var ma=h.forwardRef(function(e,t){return h.createElement(Pn,Pe({},e,{ref:t,sideCar:om}))});ma.classNames=Pn.classNames;var ko=["Enter"," "],rm=["ArrowDown","PageUp","Home"],pa=["ArrowUp","PageDown","End"],sm=[...rm,...pa],im={ltr:[...ko,"ArrowRight"],rtl:[...ko,"ArrowLeft"]},am={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ut="Menu",[Lt,lm,cm]=Ri(Ut),[mt,ha]=ft(Ut,[cm,Gi,An]),jn=Gi(),va=An(),[um,pt]=mt(Ut),[dm,Wt]=mt(Ut),xa=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:i=!0}=e,a=jn(t),[c,u]=h.useState(null),g=h.useRef(!1),m=We(s),f=er(r);return h.useEffect(()=>{const d=()=>{g.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>g.current=!1;return document.addEventListener("keydown",d,{capture:!0}),()=>{document.removeEventListener("keydown",d,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),l.jsx(og,{...a,children:l.jsx(um,{scope:t,open:n,onOpenChange:m,content:c,onContentChange:u,children:l.jsx(dm,{scope:t,onClose:h.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:g,dir:f,modal:i,children:o})})})};xa.displayName=Ut;var fm="MenuAnchor",cr=h.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=jn(n);return l.jsx(rg,{...r,...o,ref:t})});cr.displayName=fm;var ur="MenuPortal",[gm,wa]=mt(ur,{forceMount:void 0}),ya=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=pt(ur,t);return l.jsx(gm,{scope:t,forceMount:n,children:l.jsx(gt,{present:n||s.open,children:l.jsx(Zi,{asChild:!0,container:r,children:o})})})};ya.displayName=ur;var Se="MenuContent",[mm,dr]=mt(Se),Ca=h.forwardRef((e,t)=>{const n=wa(Se,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=pt(Se,e.__scopeMenu),i=Wt(Se,e.__scopeMenu);return l.jsx(Lt.Provider,{scope:e.__scopeMenu,children:l.jsx(gt,{present:o||s.open,children:l.jsx(Lt.Slot,{scope:e.__scopeMenu,children:i.modal?l.jsx(pm,{...r,ref:t}):l.jsx(hm,{...r,ref:t})})})})}),pm=h.forwardRef((e,t)=>{const n=pt(Se,e.__scopeMenu),o=h.useRef(null),r=me(t,o);return h.useEffect(()=>{const s=o.current;if(s)return Cg(s)},[]),l.jsx(fr,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:z(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),hm=h.forwardRef((e,t)=>{const n=pt(Se,e.__scopeMenu);return l.jsx(fr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),vm=Dt("MenuContent.ScrollLock"),fr=h.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:g,onFocusOutside:m,onInteractOutside:f,onDismiss:d,disableOutsideScroll:v,...p}=e,w=pt(Se,n),x=Wt(Se,n),y=jn(n),C=va(n),S=lm(n),[R,N]=h.useState(null),E=h.useRef(null),b=me(t,E,w.onContentChange),F=h.useRef(0),k=h.useRef(""),G=h.useRef(0),q=h.useRef(null),H=h.useRef("right"),D=h.useRef(0),Y=v?ma:h.Fragment,L=v?{as:vm,allowPinchZoom:!0}:void 0,U=M=>{var W,Me;const $=k.current+M,O=S().filter(ie=>!ie.disabled),B=document.activeElement,J=(W=O.find(ie=>ie.ref.current===B))==null?void 0:W.textValue,ee=O.map(ie=>ie.textValue),ce=Am(ee,$,J),ue=(Me=O.find(ie=>ie.textValue===ce))==null?void 0:Me.ref.current;(function ie(de){k.current=de,window.clearTimeout(F.current),de!==""&&(F.current=window.setTimeout(()=>ie(""),1e3))})($),ue&&setTimeout(()=>ue.focus())};h.useEffect(()=>()=>window.clearTimeout(F.current),[]),Nd();const _=h.useCallback(M=>{var O,B;return H.current===((O=q.current)==null?void 0:O.side)&&jm(M,(B=q.current)==null?void 0:B.area)},[]);return l.jsx(mm,{scope:n,searchRef:k,onItemEnter:h.useCallback(M=>{_(M)&&M.preventDefault()},[_]),onItemLeave:h.useCallback(M=>{var $;_(M)||(($=E.current)==null||$.focus(),N(null))},[_]),onTriggerLeave:h.useCallback(M=>{_(M)&&M.preventDefault()},[_]),pointerGraceTimerRef:G,onPointerGraceIntentChange:h.useCallback(M=>{q.current=M},[]),children:l.jsx(Y,{...L,children:l.jsx(Ni,{asChild:!0,trapped:r,onMountAutoFocus:z(s,M=>{var $;M.preventDefault(),($=E.current)==null||$.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:l.jsx(Ei,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:g,onFocusOutside:m,onInteractOutside:f,onDismiss:d,children:l.jsx(ra,{asChild:!0,...C,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:R,onCurrentTabStopIdChange:N,onEntryFocus:z(c,M=>{x.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(sg,{role:"menu","aria-orientation":"vertical","data-state":Oa(w.open),"data-radix-menu-content":"",dir:x.dir,...y,...p,ref:b,style:{outline:"none",...p.style},onKeyDown:z(p.onKeyDown,M=>{const O=M.target.closest("[data-radix-menu-content]")===M.currentTarget,B=M.ctrlKey||M.altKey||M.metaKey,J=M.key.length===1;O&&(M.key==="Tab"&&M.preventDefault(),!B&&J&&U(M.key));const ee=E.current;if(M.target!==ee||!sm.includes(M.key))return;M.preventDefault();const ue=S().filter(W=>!W.disabled).map(W=>W.ref.current);pa.includes(M.key)&&ue.reverse(),Mm(ue)}),onBlur:z(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(F.current),k.current="")}),onPointerMove:z(e.onPointerMove,Vt(M=>{const $=M.target,O=D.current!==M.clientX;if(M.currentTarget.contains($)&&O){const B=M.clientX>D.current?"right":"left";H.current=B,D.current=M.clientX}}))})})})})})})});Ca.displayName=Se;var xm="MenuGroup",gr=h.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(oe.div,{role:"group",...o,ref:t})});gr.displayName=xm;var wm="MenuLabel",Sa=h.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(oe.div,{...o,ref:t})});Sa.displayName=wm;var xn="MenuItem",fs="menu.itemSelect",In=h.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=h.useRef(null),i=Wt(xn,e.__scopeMenu),a=dr(xn,e.__scopeMenu),c=me(t,s),u=h.useRef(!1),g=()=>{const m=s.current;if(!n&&m){const f=new CustomEvent(fs,{bubbles:!0,cancelable:!0});m.addEventListener(fs,d=>o==null?void 0:o(d),{once:!0}),Ys(m,f),f.defaultPrevented?u.current=!1:i.onClose()}};return l.jsx(ba,{...r,ref:c,disabled:n,onClick:z(e.onClick,g),onPointerDown:m=>{var f;(f=e.onPointerDown)==null||f.call(e,m),u.current=!0},onPointerUp:z(e.onPointerUp,m=>{var f;u.current||(f=m.currentTarget)==null||f.click()}),onKeyDown:z(e.onKeyDown,m=>{const f=a.searchRef.current!=="";n||f&&m.key===" "||ko.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});In.displayName=xn;var ba=h.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,i=dr(xn,n),a=va(n),c=h.useRef(null),u=me(t,c),[g,m]=h.useState(!1),[f,d]=h.useState("");return h.useEffect(()=>{const v=c.current;v&&d((v.textContent??"").trim())},[s.children]),l.jsx(Lt.ItemSlot,{scope:n,disabled:o,textValue:r??f,children:l.jsx(sa,{asChild:!0,...a,focusable:!o,children:l.jsx(oe.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:u,onPointerMove:z(e.onPointerMove,Vt(v=>{o?i.onItemLeave(v):(i.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:z(e.onPointerLeave,Vt(v=>i.onItemLeave(v))),onFocus:z(e.onFocus,()=>m(!0)),onBlur:z(e.onBlur,()=>m(!1))})})})}),ym="MenuCheckboxItem",Ra=h.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return l.jsx(Aa,{scope:e.__scopeMenu,checked:n,children:l.jsx(In,{role:"menuitemcheckbox","aria-checked":wn(n)?"mixed":n,...r,ref:t,"data-state":pr(n),onSelect:z(r.onSelect,()=>o==null?void 0:o(wn(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ra.displayName=ym;var _a="MenuRadioGroup",[Cm,Sm]=mt(_a,{value:void 0,onValueChange:()=>{}}),Ea=h.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=We(o);return l.jsx(Cm,{scope:e.__scopeMenu,value:n,onValueChange:s,children:l.jsx(gr,{...r,ref:t})})});Ea.displayName=_a;var Ma="MenuRadioItem",Na=h.forwardRef((e,t)=>{const{value:n,...o}=e,r=Sm(Ma,e.__scopeMenu),s=n===r.value;return l.jsx(Aa,{scope:e.__scopeMenu,checked:s,children:l.jsx(In,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":pr(s),onSelect:z(o.onSelect,()=>{var i;return(i=r.onValueChange)==null?void 0:i.call(r,n)},{checkForDefaultPrevented:!1})})})});Na.displayName=Ma;var mr="MenuItemIndicator",[Aa,bm]=mt(mr,{checked:!1}),Pa=h.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=bm(mr,n);return l.jsx(gt,{present:o||wn(s.checked)||s.checked===!0,children:l.jsx(oe.span,{...r,ref:t,"data-state":pr(s.checked)})})});Pa.displayName=mr;var Rm="MenuSeparator",ja=h.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(oe.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});ja.displayName=Rm;var _m="MenuArrow",Ia=h.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=jn(n);return l.jsx(ig,{...r,...o,ref:t})});Ia.displayName=_m;var Em="MenuSub",[dh,Ta]=mt(Em),jt="MenuSubTrigger",Fa=h.forwardRef((e,t)=>{const n=pt(jt,e.__scopeMenu),o=Wt(jt,e.__scopeMenu),r=Ta(jt,e.__scopeMenu),s=dr(jt,e.__scopeMenu),i=h.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=s,u={__scopeMenu:e.__scopeMenu},g=h.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return h.useEffect(()=>g,[g]),h.useEffect(()=>{const m=a.current;return()=>{window.clearTimeout(m),c(null)}},[a,c]),l.jsx(cr,{asChild:!0,...u,children:l.jsx(ba,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Oa(n.open),...e,ref:Cn(t,r.onTriggerChange),onClick:m=>{var f;(f=e.onClick)==null||f.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:z(e.onPointerMove,Vt(m=>{s.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),g()},100))})),onPointerLeave:z(e.onPointerLeave,Vt(m=>{var d,v;g();const f=(d=n.content)==null?void 0:d.getBoundingClientRect();if(f){const p=(v=n.content)==null?void 0:v.dataset.side,w=p==="right",x=w?-5:5,y=f[w?"left":"right"],C=f[w?"right":"left"];s.onPointerGraceIntentChange({area:[{x:m.clientX+x,y:m.clientY},{x:y,y:f.top},{x:C,y:f.top},{x:C,y:f.bottom},{x:y,y:f.bottom}],side:p}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(m),m.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:z(e.onKeyDown,m=>{var d;const f=s.searchRef.current!=="";e.disabled||f&&m.key===" "||im[o.dir].includes(m.key)&&(n.onOpenChange(!0),(d=n.content)==null||d.focus(),m.preventDefault())})})})});Fa.displayName=jt;var ka="MenuSubContent",Da=h.forwardRef((e,t)=>{const n=wa(Se,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=pt(Se,e.__scopeMenu),i=Wt(Se,e.__scopeMenu),a=Ta(ka,e.__scopeMenu),c=h.useRef(null),u=me(t,c);return l.jsx(Lt.Provider,{scope:e.__scopeMenu,children:l.jsx(gt,{present:o||s.open,children:l.jsx(Lt.Slot,{scope:e.__scopeMenu,children:l.jsx(fr,{id:a.contentId,"aria-labelledby":a.triggerId,...r,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{var m;i.isUsingKeyboardRef.current&&((m=c.current)==null||m.focus()),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:z(e.onFocusOutside,g=>{g.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:z(e.onEscapeKeyDown,g=>{i.onClose(),g.preventDefault()}),onKeyDown:z(e.onKeyDown,g=>{var d;const m=g.currentTarget.contains(g.target),f=am[i.dir].includes(g.key);m&&f&&(s.onOpenChange(!1),(d=a.trigger)==null||d.focus(),g.preventDefault())})})})})})});Da.displayName=ka;function Oa(e){return e?"open":"closed"}function wn(e){return e==="indeterminate"}function pr(e){return wn(e)?"indeterminate":e?"checked":"unchecked"}function Mm(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Nm(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Am(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Nm(e,Math.max(s,0));r.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return c!==n?c:void 0}function Pm(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],c=t[i],u=a.x,g=a.y,m=c.x,f=c.y;g>o!=f>o&&n<(m-u)*(o-g)/(f-g)+u&&(r=!r)}return r}function jm(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Pm(n,t)}function Vt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Im=xa,Tm=cr,Fm=ya,km=Ca,Dm=gr,Om=Sa,$m=In,Lm=Ra,Vm=Ea,zm=Na,Hm=Pa,Gm=ja,Bm=Ia,Um=Fa,Wm=Da,Tn="DropdownMenu",[Km]=ft(Tn,[ha]),he=ha(),[qm,$a]=Km(Tn),La=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,c=he(t),u=h.useRef(null),[g,m]=Sn({prop:r,defaultProp:s??!1,onChange:i,caller:Tn});return l.jsx(qm,{scope:t,triggerId:gn(),triggerRef:u,contentId:gn(),open:g,onOpenChange:m,onOpenToggle:h.useCallback(()=>m(f=>!f),[m]),modal:a,children:l.jsx(Im,{...c,open:g,onOpenChange:m,dir:o,modal:a,children:n})})};La.displayName=Tn;var Va="DropdownMenuTrigger",za=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=$a(Va,n),i=he(n);return l.jsx(Tm,{asChild:!0,...i,children:l.jsx(oe.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:Cn(t,s.triggerRef),onPointerDown:z(e.onPointerDown,a=>{!o&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:z(e.onKeyDown,a=>{o||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});za.displayName=Va;var Xm="DropdownMenuPortal",Ha=e=>{const{__scopeDropdownMenu:t,...n}=e,o=he(t);return l.jsx(Fm,{...o,...n})};Ha.displayName=Xm;var Ga="DropdownMenuContent",Ba=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=$a(Ga,n),s=he(n),i=h.useRef(!1);return l.jsx(km,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:z(e.onCloseAutoFocus,a=>{var c;i.current||(c=r.triggerRef.current)==null||c.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:z(e.onInteractOutside,a=>{const c=a.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,g=c.button===2||u;(!r.modal||g)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ba.displayName=Ga;var Ym="DropdownMenuGroup",Jm=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(Dm,{...r,...o,ref:t})});Jm.displayName=Ym;var Zm="DropdownMenuLabel",Qm=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(Om,{...r,...o,ref:t})});Qm.displayName=Zm;var ep="DropdownMenuItem",tp=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx($m,{...r,...o,ref:t})});tp.displayName=ep;var np="DropdownMenuCheckboxItem",Ua=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(Lm,{...r,...o,ref:t})});Ua.displayName=np;var op="DropdownMenuRadioGroup",rp=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(Vm,{...r,...o,ref:t})});rp.displayName=op;var sp="DropdownMenuRadioItem",ip=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(zm,{...r,...o,ref:t})});ip.displayName=sp;var ap="DropdownMenuItemIndicator",Wa=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(Hm,{...r,...o,ref:t})});Wa.displayName=ap;var lp="DropdownMenuSeparator",cp=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(Gm,{...r,...o,ref:t})});cp.displayName=lp;var up="DropdownMenuArrow",dp=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(Bm,{...r,...o,ref:t})});dp.displayName=up;var fp="DropdownMenuSubTrigger",gp=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(Um,{...r,...o,ref:t})});gp.displayName=fp;var mp="DropdownMenuSubContent",pp=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=he(n);return l.jsx(Wm,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});pp.displayName=mp;var hp=La,vp=za,xp=Ha,wp=Ba,yp=Ua,Cp=Wa;function Sp({...e}){return l.jsx(hp,{"data-slot":"dropdown-menu",...e})}function bp({...e}){return l.jsx(vp,{"data-slot":"dropdown-menu-trigger",...e})}function Rp({className:e,sideOffset:t=4,...n}){return l.jsx(xp,{children:l.jsx(wp,{"data-slot":"dropdown-menu-content",sideOffset:t,className:ne("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function _p({className:e,children:t,checked:n,...o}){return l.jsxs(yp,{"data-slot":"dropdown-menu-checkbox-item",className:ne("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...o,children:[l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(Cp,{children:l.jsx(ai,{className:"size-4"})})}),t]})}function hr({className:e,...t}){return l.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:l.jsx("table",{"data-slot":"table",className:ne("w-full caption-bottom text-sm",e),...t})})}function Ep({className:e,...t}){return l.jsx("thead",{"data-slot":"table-header",className:ne("[&_tr]:border-b",e),...t})}function vr({className:e,...t}){return l.jsx("tbody",{"data-slot":"table-body",className:ne("[&_tr:last-child]:border-0",e),...t})}function le({className:e,...t}){return l.jsx("tr",{"data-slot":"table-row",className:ne("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function Mp({className:e,...t}){return l.jsx("th",{"data-slot":"table-head",className:ne("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function j({className:e,...t}){return l.jsx("td",{"data-slot":"table-cell",className:ne("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function zt({columns:e,data:t,searchColumn:n,searchPlaceholder:o="Filter...",defaultColumnVisibility:r={},pageSize:s=25,defaultSorting:i=[]}){var w,x;const[a,c]=h.useState(i),[u,g]=h.useState([]),[m,f]=h.useState(r),[d,v]=h.useState({}),p=vd({data:t,columns:e,onSortingChange:c,onColumnFiltersChange:g,getCoreRowModel:id(),getPaginationRowModel:fd(),getSortedRowModel:gd(),getFilteredRowModel:dd(),onColumnVisibilityChange:f,onRowSelectionChange:v,initialState:{pagination:{pageSize:s}},state:{sorting:a,columnFilters:u,columnVisibility:m,rowSelection:d}});return l.jsxs("div",{className:"w-full",children:[l.jsxs("div",{className:"flex items-center py-4",children:[n&&l.jsx(bo,{placeholder:o,value:((w=p.getColumn(n))==null?void 0:w.getFilterValue())??"",onChange:y=>{var C;return(C=p.getColumn(n))==null?void 0:C.setFilterValue(y.target.value)},className:"max-w-sm"}),l.jsxs(Sp,{children:[l.jsx(bp,{asChild:!0,children:l.jsxs(ct,{variant:"outline",className:"ml-auto",children:["Columns ",l.jsx(li,{className:"ml-2 h-4 w-4"})]})}),l.jsx(Rp,{align:"end",children:p.getAllColumns().filter(y=>y.getCanHide()).map(y=>l.jsx(_p,{className:"capitalize",checked:y.getIsVisible(),onCheckedChange:C=>y.toggleVisibility(!!C),children:y.id},y.id))})]})]}),l.jsx("div",{className:"rounded-md border",children:l.jsxs(hr,{children:[l.jsx(Ep,{children:p.getHeaderGroups().map(y=>l.jsx(le,{children:y.headers.map(C=>l.jsx(Mp,{children:C.isPlaceholder?null:Hr(C.column.columnDef.header,C.getContext())},C.id))},y.id))}),l.jsx(vr,{children:(x=p.getRowModel().rows)!=null&&x.length?p.getRowModel().rows.map(y=>l.jsx(le,{"data-state":y.getIsSelected()&&"selected",children:y.getVisibleCells().map(C=>l.jsx(j,{children:Hr(C.column.columnDef.cell,C.getContext())},C.id))},y.id)):l.jsx(le,{children:l.jsx(j,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})})]})}),l.jsxs("div",{className:"flex items-center justify-end space-x-2 py-4",children:[l.jsxs("div",{className:"text-muted-foreground flex-1 text-sm",children:[p.getFilteredRowModel().rows.length," row(s) total."]}),l.jsxs("div",{className:"space-x-2",children:[l.jsx(ct,{variant:"outline",size:"sm",onClick:()=>p.previousPage(),disabled:!p.getCanPreviousPage(),children:"Previous"}),l.jsx(ct,{variant:"outline",size:"sm",onClick:()=>p.nextPage(),disabled:!p.getCanNextPage(),children:"Next"})]})]})]})}function X(e,t="left"){return({column:n})=>{const o=t==="right"?"justify-end":t==="center"?"justify-center":"justify-start",r=n.getIsSorted();return l.jsx("div",{className:`flex ${o}`,children:l.jsxs(ct,{variant:"ghost",onClick:()=>n.toggleSorting(n.getIsSorted()==="asc"),className:`${t==="right"?"ml-auto":""} hover:bg-muted/50 h-auto p-0 font-medium text-sm`,children:[e,r==="asc"&&l.jsx(Yc,{className:"ml-1 h-3 w-3 text-muted-foreground"}),r==="desc"&&l.jsx(li,{className:"ml-1 h-3 w-3 text-muted-foreground"})]})})}}const Np=300*1e3;function Ka(e){const[t,n]=h.useState(new Map),o=h.useRef();return h.useEffect(()=>{const s=new Date().toISOString(),i=new Set(e.map(a=>a.id));n(a=>{const c=new Map(a);return e.forEach(u=>{c.set(u.id,{...u,lastSeenAt:s,disconnectedAt:void 0})}),c.forEach((u,g)=>{!i.has(g)&&!u.disconnectedAt&&c.set(g,{...u,isConnected:!1,connectionStatus:"Disconnected",disconnectedAt:s,lastActivity:u.lastActivity||s})}),c})},[e]),h.useEffect(()=>{const s=()=>{const i=Date.now();n(a=>{const c=new Map(a);return c.forEach((u,g)=>{if(u.disconnectedAt){const m=new Date(u.disconnectedAt).getTime();i-m>Np&&c.delete(g)}}),c})};return s(),o.current=setInterval(s,3e4),()=>{o.current&&clearInterval(o.current)}},[]),Array.from(t.values()).sort((s,i)=>s.isConnected!==i.isConnected?s.isConnected?-1:1:new Date(i.lastActivity).getTime()-new Date(s.lastActivity).getTime())}function gs(e){const t=new Date,n=new Date(e),o=t.getTime()-n.getTime(),r=Math.floor(o/1e3);if(r<60)return"just now";const s=Math.floor(r/60);if(s<60)return`${s}m ago`;const i=Math.floor(s/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function Ap(e){const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),o=Math.floor(e%3600/60);return t>0?`${t}d ${n}h ${o}m`:n>0?`${n}h ${o}m`:`${o}m`}function Pp(e){return e.length<=12?e:`${e.slice(0,5)}...${e.slice(-5)}`}function jp(e){return e.length<=42?e:`${e.slice(0,35)}.....${e.slice(-5)}`}function Ip({metrics:e}){const t=e.sessions||[],n=Ka(t),o=()=>[{accessorKey:"clientInfo",header:X("Client"),cell:({row:r})=>{const s=r.original,i=s.clientInfo?`${jp(s.clientInfo.name)}@${s.clientInfo.version}`:"unknown";return l.jsx("div",{className:"font-mono text-sm",title:s.clientInfo?`${s.clientInfo.name}@${s.clientInfo.version}`:"unknown",children:i})}},{accessorKey:"id",header:X("Session ID"),cell:({row:r})=>l.jsx("div",{className:"font-mono text-sm",title:r.getValue("id"),children:Pp(r.getValue("id"))})},{accessorKey:"isConnected",header:X("Status"),cell:({row:r})=>{const s=r.original;return l.jsxs(ze,{variant:s.isConnected?"success":"secondary",className:"gap-1",children:[s.isConnected?l.jsx(fi,{className:"h-3 w-3"}):l.jsx(di,{className:"h-3 w-3"}),s.isConnected?"Connected":"Disconnected"]})}},{accessorKey:"connectedAt",header:X("Connected"),cell:({row:r})=>l.jsx("div",{className:"text-sm",children:gs(r.getValue("connectedAt"))})},{accessorKey:"requestCount",header:X("Requests","right"),cell:({row:r})=>l.jsx("div",{className:"text-right font-mono text-sm",children:r.getValue("requestCount")})},{accessorKey:"lastActivity",header:X("Last Activity"),cell:({row:r})=>l.jsx("div",{className:"text-sm",children:gs(r.getValue("lastActivity"))})}];return l.jsxs(He,{children:[l.jsxs(Ge,{children:[l.jsx(Be,{children:"📊 Transport Metrics"}),l.jsx(dt,{children:"Real-time connection and performance metrics for STDIO transport"})]}),l.jsxs(Ue,{className:"space-y-4",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Transport Type"}),l.jsx("p",{className:"text-sm font-mono",children:"STDIO"})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Uptime"}),l.jsx("p",{className:"text-sm font-mono",children:Ap(e.uptimeSeconds)})]})]}),l.jsxs(l.Fragment,{children:[l.jsx(nt,{}),l.jsxs("div",{children:[l.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-3",children:["Sessions (",n.filter(r=>r.isConnected).length," active,"," ",n.filter(r=>!r.isConnected).length," disconnected)"]}),l.jsx(zt,{columns:o(),data:n,searchColumn:"id",searchPlaceholder:"Filter sessions...",pageSize:10,defaultSorting:[{id:"lastActivity",desc:!0}]})]})]})]})]})}function an(e){const t=new Date,n=new Date(e),o=t.getTime()-n.getTime(),r=Math.floor(o/1e3);if(r<60)return"just now";const s=Math.floor(r/60);if(s<60)return`${s}m ago`;const i=Math.floor(s/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function Tp(e){const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),o=Math.floor(e%3600/60);return t>0?`${t}d ${n}h ${o}m`:n>0?`${n}h ${o}m`:`${o}m`}function ln(e){return e<1e3?`${e}ms`:e<6e4?`${Math.round(e/1e3)}s`:`${Math.round(e/6e4)}m`}function Fp(e){return e.length<=12?e:`${e.slice(0,5)}...${e.slice(-5)}`}function ms(e){return e.length<=42?e:`${e.slice(0,35)}.....${e.slice(-5)}`}function kp(e){const t=new Date,n=new Date(e),o=t.getTime()-n.getTime();return Math.floor(o/6e4)<5}function Dp({metrics:e}){const t=e.sessions||[],n=Ka(t),o={streamableHttp:"Streamable HTTP"},r=()=>[{accessorKey:"clientInfo",header:X("Client"),cell:({row:a})=>{const c=a.original,u=c.clientInfo?`${ms(c.clientInfo.name)}@${c.clientInfo.version}`:"unknown";return l.jsx("div",{className:"font-mono text-sm",title:c.clientInfo?`${c.clientInfo.name}@${c.clientInfo.version}`:"unknown",children:u})}},{accessorKey:"id",header:X("Session ID"),cell:({row:a})=>l.jsx("div",{className:"font-mono text-sm",title:a.getValue("id"),children:Fp(a.getValue("id"))})},{accessorKey:"connectionStatus",header:X("Status"),cell:({row:a})=>{const c=a.original,u=c.connectionStatus||(c.isConnected?"Connected":"Disconnected");return u==="Connected"?l.jsxs(ze,{variant:"success",className:"gap-1",children:[l.jsx(fi,{className:"h-3 w-3"}),"Connected"]}):u==="Distressed"?l.jsxs(ze,{variant:"destructive",className:"gap-1",children:[l.jsx(ui,{className:"h-3 w-3"}),"Distressed ",c.pingFailures?`(${c.pingFailures} failed)`:""]}):l.jsxs(ze,{variant:"secondary",className:"gap-1",children:[l.jsx(di,{className:"h-3 w-3"}),"Disconnected"]})}},{accessorKey:"connectedAt",header:X("Connected"),cell:({row:a})=>l.jsx("div",{className:"text-sm",children:an(a.getValue("connectedAt"))})},{accessorKey:"requestCount",header:X("Requests","right"),cell:({row:a})=>l.jsx("div",{className:"text-right font-mono text-sm",children:a.getValue("requestCount")})},{accessorKey:"lastActivity",header:X("Last Activity"),cell:({row:a})=>l.jsx("div",{className:"text-sm",children:an(a.getValue("lastActivity"))})},{accessorKey:"ipAddress",header:X("IP Address"),cell:({row:a})=>l.jsx("div",{className:"font-mono text-sm",title:a.getValue("ipAddress")||"Unknown",children:a.getValue("ipAddress")||"-"})}],s=()=>[{accessorKey:"name",header:X("Client"),cell:({row:a})=>{const c=a.original,u=`${ms(c.name)}@${c.version}`;return l.jsxs("div",{children:[l.jsx("p",{className:"font-medium font-mono text-sm",title:`${c.name}@${c.version}`,children:u}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["First seen ",an(c.firstSeen)]})]})}},{accessorKey:"requestCount",header:X("Initializations","right"),cell:({row:a})=>l.jsx("div",{className:"text-right font-mono text-sm",children:a.getValue("requestCount")})},{accessorKey:"toolCallCount",header:X("Tool Calls","right"),cell:({row:a})=>l.jsx("div",{className:"text-right font-mono text-sm",children:a.getValue("toolCallCount")})},{accessorKey:"newIpCount",header:X("New IPs","right"),cell:({row:a})=>l.jsx("div",{className:"text-right font-mono text-sm",children:a.getValue("newIpCount")})},{accessorKey:"anonCount",header:X("Anon/Auth","right"),cell:({row:a})=>{const c=a.original;return l.jsxs("div",{className:"text-right font-mono text-sm",children:[c.anonCount,"/",c.uniqueAuthCount]})}},{accessorKey:"isConnected",header:X("Status"),cell:({row:a})=>{const c=a.original;return l.jsx("div",{children:kp(c.lastSeen)?l.jsxs(ze,{variant:"success",className:"gap-1",children:[l.jsx(ii,{className:"h-3 w-3"}),"Recent"]}):l.jsxs(ze,{variant:"secondary",className:"gap-1",children:[l.jsx(ci,{className:"h-3 w-3"}),"Idle"]})})}},{accessorKey:"lastSeen",header:X("Last Seen","right"),cell:({row:a})=>l.jsx("div",{className:"text-right text-sm",children:an(a.getValue("lastSeen"))})}],i=e.clients;return l.jsxs(He,{children:[l.jsxs(Ge,{children:[l.jsx(Be,{children:"📊 Transport Metrics"}),l.jsxs(dt,{children:["Real-time connection and performance metrics for"," ",o[e.transport]||e.transport," transport"]})]}),l.jsxs(Ue,{className:"space-y-4",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Transport Type"}),l.jsx("p",{className:"text-sm font-mono",children:o[e.transport]||e.transport})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Uptime"}),l.jsx("p",{className:"text-sm font-mono",children:Tp(e.uptimeSeconds)})]})]}),e.configuration&&l.jsx(l.Fragment,{children:l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Configuration"}),l.jsx("div",{className:"grid grid-cols-1 gap-2",children:e.pings&&l.jsx("div",{className:"text-xs text-muted-foreground bg-muted/30 p-2 rounded",children:e.pings.sent>0&&l.jsxs("p",{children:[l.jsx("span",{className:"font-medium",children:"Ping Status:"})," ",e.pings.successful,"/",e.pings.sent," successful (",e.pings.sent>0?Math.round(e.pings.successful/e.pings.sent*100):0,"%)"]})})}),l.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:["Connections checked every ",ln(e.configuration.heartbeatInterval||3e4),", sessions swept every ",ln(e.configuration.staleCheckInterval),", removed after"," ",ln(e.configuration.staleTimeout)," inactive",e.configuration.pingEnabled&&e.configuration.pingInterval&&`, pings sent every ${ln(e.configuration.pingInterval)}`,e.configuration.pingEnabled&&`, marked distressed after ${e.configuration.pingFailureThreshold||1} failed ping${(e.configuration.pingFailureThreshold||1)!==1?"s":""}`]})]})}),l.jsx(nt,{}),l.jsx("div",{children:l.jsx(hr,{children:l.jsxs(vr,{children:[l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Active Connections"}),l.jsx(j,{className:"text-sm font-mono",children:e.connections.active}),l.jsx(j,{className:"font-medium text-sm",children:"Cleaned Sessions"}),l.jsx(j,{className:"text-sm font-mono",children:e.connections.cleaned??0})]}),l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Total Connections"}),l.jsx(j,{className:"text-sm font-mono",children:e.connections.total}),l.jsx(j,{className:"font-medium text-sm",children:"Requests per Minute (tot/3hr/hr)"}),l.jsxs(j,{className:"text-sm font-mono",children:[e.requests.averagePerMinute,"/",e.requests.last3Hours,"/",e.requests.lastHour]})]}),l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Unique IPs"}),l.jsx(j,{className:"text-sm font-mono",children:e.connections.uniqueIps??0}),l.jsx(j,{className:"font-medium text-sm",children:"Client/Server Errors (4xx/5xx)"}),l.jsxs(j,{className:"text-sm font-mono",children:[e.errors.expected,"/",e.errors.unexpected]})]}),e.sessionLifecycle&&l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Sessions New/Res-fail/Del"}),l.jsxs(j,{className:"text-sm font-mono",colSpan:3,children:[e.sessionLifecycle.created,"/",e.sessionLifecycle.resumedFailed,"/",e.sessionLifecycle.deleted]})]}),e.pings&&l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Pings Sent"}),l.jsx(j,{className:"text-sm font-mono",children:e.pings.sent}),l.jsx(j,{className:"font-medium text-sm",children:"Ping Success Rate"}),l.jsx(j,{className:"text-sm font-mono",children:e.pings.sent>0?`${Math.round(e.pings.successful/e.pings.sent*100)}%`:"-"})]}),e.apiMetrics&&l.jsxs(l.Fragment,{children:[l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Anonymous Users"}),l.jsx(j,{className:"text-sm font-mono",children:e.apiMetrics.anonymous}),l.jsx(j,{className:"font-medium text-sm",children:"Authenticated Users"}),l.jsx(j,{className:"text-sm font-mono",children:e.apiMetrics.authenticated})]}),l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"401 Unauthorized Users"}),l.jsx(j,{className:"text-sm font-mono",children:e.apiMetrics.unauthorized}),l.jsx(j,{className:"font-medium text-sm",children:"403 Forbidden Users"}),l.jsx(j,{className:"text-sm font-mono",children:e.apiMetrics.forbidden})]})]}),l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Gradio Success/Fail"}),l.jsx(j,{className:"text-sm font-mono",children:e.gradioMetrics?`${e.gradioMetrics.success}/${e.gradioMetrics.failure}`:"0/0"}),l.jsx(j,{className:"font-medium text-sm",children:"-"}),l.jsx(j,{className:"text-sm font-mono",children:"-"})]})]})})}),l.jsxs(l.Fragment,{children:[l.jsx(nt,{}),l.jsxs("div",{children:[l.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-3",children:["Sessions (",n.filter(a=>a.isConnected).length," active,"," ",n.filter(a=>!a.isConnected).length," disconnected)"]}),l.jsx(zt,{columns:r(),data:n,searchColumn:"id",searchPlaceholder:"Filter sessions...",pageSize:10,defaultSorting:[{id:"lastActivity",desc:!0}]})]})]}),l.jsxs(l.Fragment,{children:[l.jsx(nt,{}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground mb-3",children:"Client Identities"}),l.jsx(zt,{columns:s(),data:i,searchColumn:"name",searchPlaceholder:"Filter clients...",pageSize:50,defaultSorting:[{id:"lastSeen",desc:!0}]})]})]})]})]})}function ps(e){const t=new Date,n=new Date(e),o=t.getTime()-n.getTime(),r=Math.floor(o/1e3);if(r<60)return"just now";const s=Math.floor(r/60);if(s<60)return`${s}m ago`;const i=Math.floor(s/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function Op(e){const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),o=Math.floor(e%3600/60);return t>0?`${t}d ${n}h ${o}m`:n>0?`${n}h ${o}m`:`${o}m`}function $p(e){const t=new Date,n=new Date(e),o=t.getTime()-n.getTime();return Math.floor(o/6e4)<5}function Lp(e){return e.length<=42?e:`${e.slice(0,35)}.....${e.slice(-5)}`}function Vp({metrics:e}){const t=e.clients,n=()=>[{accessorKey:"name",header:X("Client"),cell:({row:o})=>{const r=o.original,s=`${Lp(r.name)}@${r.version}`;return l.jsxs("div",{children:[l.jsx("p",{className:"font-medium font-mono text-sm",title:`${r.name}@${r.version}`,children:s}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["First seen ",ps(r.firstSeen)]})]})}},{accessorKey:"requestCount",header:X("Initializations","right"),cell:({row:o})=>l.jsx("div",{className:"text-right font-mono text-sm",children:o.getValue("requestCount")})},{accessorKey:"toolCallCount",header:X("Tool Calls","right"),cell:({row:o})=>l.jsx("div",{className:"text-right font-mono text-sm",children:o.getValue("toolCallCount")})},{accessorKey:"newIpCount",header:X("New IPs","right"),cell:({row:o})=>l.jsx("div",{className:"text-right font-mono text-sm",children:o.getValue("newIpCount")})},{accessorKey:"anonCount",header:X("Anon/Auth","right"),cell:({row:o})=>{const r=o.original;return l.jsxs("div",{className:"text-right font-mono text-sm",children:[r.anonCount,"/",r.uniqueAuthCount]})}},{accessorKey:"isConnected",header:X("Status"),cell:({row:o})=>{const r=o.original;return l.jsx("div",{children:$p(r.lastSeen)?l.jsxs(ze,{variant:"success",className:"gap-1",children:[l.jsx(ii,{className:"h-3 w-3"}),"Recent"]}):l.jsxs(ze,{variant:"secondary",className:"gap-1",children:[l.jsx(ci,{className:"h-3 w-3"}),"Idle"]})})}},{accessorKey:"lastSeen",header:X("Last Seen","right"),cell:({row:o})=>l.jsx("div",{className:"text-right text-sm",children:ps(o.getValue("lastSeen"))})}];return l.jsxs(He,{children:[l.jsxs(Ge,{children:[l.jsx(Be,{children:"📊 Transport Metrics"}),l.jsx(dt,{children:"Real-time connection and performance metrics for Stateless HTTP JSON transport"})]}),l.jsxs(Ue,{className:"space-y-4",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Transport Type"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("p",{className:"text-sm font-mono",children:"Stateless HTTP JSON"}),l.jsx(ze,{variant:"secondary",children:e.sessionLifecycle?"analytics":"stateless"})]})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Uptime"}),l.jsx("p",{className:"text-sm font-mono",children:Op(e.uptimeSeconds)})]})]}),l.jsx(nt,{}),l.jsx("div",{children:l.jsx(hr,{children:l.jsxs(vr,{children:[l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Request Count (MCP)"}),l.jsx(j,{className:"text-sm font-mono",children:e.connections.total}),l.jsx(j,{className:"font-medium text-sm",children:"Requests per Minute (tot/3hr/hr)"}),l.jsxs(j,{className:"text-sm font-mono",children:[e.requests.averagePerMinute,"/",e.requests.last3Hours,"/",e.requests.lastHour]})]}),l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Unique IPs"}),l.jsx(j,{className:"text-sm font-mono",children:e.connections.uniqueIps??0}),l.jsx(j,{className:"font-medium text-sm",children:"Client/Server Errors (4xx/5xx)"}),l.jsxs(j,{className:"text-sm font-mono",children:[e.errors.expected,"/",e.errors.unexpected]})]}),(e.staticPageHits200!==void 0||e.staticPageHits405!==void 0)&&l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(tu,{className:"h-3 w-3"}),"hf.co/mcp (200/405)"]})}),l.jsxs(j,{className:"text-sm font-mono",children:[e.staticPageHits200||0,"/",e.staticPageHits405||0]}),l.jsx(j,{className:"font-medium text-sm",children:l.jsx("div",{className:"flex items-center gap-1",children:"Auth Status (Anon/Auth/401)"})}),l.jsxs(j,{className:"text-sm font-mono",children:[e.connections.anonymous,"/",e.connections.authenticated,"/",e.connections.unauthorized||0]})]}),e.apiMetrics&&l.jsxs(l.Fragment,{children:[l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Tool API - Anonymous"}),l.jsx(j,{className:"text-sm font-mono",children:e.apiMetrics.anonymous}),l.jsx(j,{className:"font-medium text-sm",children:"Tool API - Authenticated"}),l.jsx(j,{className:"text-sm font-mono",children:e.apiMetrics.authenticated})]}),l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Tool API - 401 Unauthorized"}),l.jsx(j,{className:"text-sm font-mono",children:e.apiMetrics.unauthorized}),l.jsx(j,{className:"font-medium text-sm",children:"Tool API - 403 Forbidden"}),l.jsx(j,{className:"text-sm font-mono",children:e.apiMetrics.forbidden})]})]}),l.jsxs(le,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Gradio Success/Fail"}),l.jsx(j,{className:"text-sm font-mono",children:e.gradioMetrics?`${e.gradioMetrics.success}/${e.gradioMetrics.failure}`:"0/0"}),e.sessionLifecycle?l.jsxs(l.Fragment,{children:[l.jsx(j,{className:"font-medium text-sm",children:"Sessions New/Res-fail/Del"}),l.jsxs(j,{className:"text-sm font-mono",children:[e.sessionLifecycle.created,"/",e.sessionLifecycle.resumedFailed,"/",e.sessionLifecycle.deleted]})]}):l.jsxs(l.Fragment,{children:[l.jsx(j,{className:"font-medium text-sm",children:"-"}),l.jsx(j,{className:"text-sm font-mono",children:"-"})]})]})]})})}),l.jsxs(l.Fragment,{children:[l.jsx(nt,{}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground mb-3",children:"Client Identities"}),l.jsx(zt,{columns:n(),data:t,searchColumn:"name",searchPlaceholder:"Filter clients...",pageSize:50,defaultSorting:[{id:"lastSeen",desc:!0}]})]})]})]})]})}const zp=e=>fetch(e).then(t=>{if(!t.ok)throw new Error(`Failed to fetch: ${t.status}`);return t.json()});function Hp(){const{data:e,error:t}=It("/api/transport-metrics",zp,{refreshInterval:3e3,revalidateOnFocus:!0,revalidateOnReconnect:!0});return t?l.jsxs(He,{children:[l.jsx(Ge,{children:l.jsx(Be,{children:"📊 Transport Metrics"})}),l.jsx(Ue,{children:l.jsxs(gu,{variant:"destructive",children:[l.jsx(ui,{className:"h-4 w-4"}),l.jsx(mu,{children:"Error Loading Metrics"}),l.jsxs(pu,{children:["Failed to load transport metrics: ",t.message]})]})})]}):e?e.transport==="stdio"?l.jsx(Ip,{metrics:e}):e.isStateless?l.jsx(Vp,{metrics:e}):l.jsx(Dp,{metrics:e}):l.jsxs(He,{children:[l.jsx(Ge,{children:l.jsx(Be,{children:"📊 Transport Metrics"})}),l.jsx(Ue,{children:l.jsxs("div",{className:"animate-pulse space-y-2",children:[l.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4"}),l.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/2"}),l.jsx("div",{className:"h-4 bg-gray-200 rounded w-2/3"})]})})]})}const Gp=e=>fetch(e).then(t=>{if(!t.ok)throw new Error(`Failed to fetch: ${t.status}`);return t.json()});function Bp(){const[e,t]=h.useState(!1),{data:n,error:o}=It("/api/transport-metrics",Gp,{refreshInterval:3e3,revalidateOnFocus:!0,revalidateOnReconnect:!0}),r=!n&&!o,s=(n==null?void 0:n.transport)==="stdio",i=((n==null?void 0:n.methods)||[]).map(f=>{let d=f.errors,v,p;if(f.method.startsWith("tools/call:")&&(n!=null&&n.gradioMetrics)){const y=f.method.replace("tools/call:",""),C=n.gradioMetrics.byTool;C[y]&&(v=C[y].success,p=C[y].failure,d+=p)}const w=f.count>0?d/f.count*100:0;return{method:f.method,count:f.count,errors:d,errorRate:w,averageResponseTime:f.averageResponseTime,lastCalled:f.lastCalled,gradioSuccess:v,gradioFailure:p}}),a=e?i.filter(f=>f.method.startsWith("tools/call")||f.method.startsWith("prompts/get")):i,c=i.reduce((f,d)=>f+d.count,0),u=i.filter(f=>f.method.startsWith("tools/call")).reduce((f,d)=>f+d.count,0),g=i.filter(f=>f.method.startsWith("prompts/get")).reduce((f,d)=>f+d.count,0),m=[{accessorKey:"method",header:X("Method"),cell:({row:f})=>{const d=f.getValue("method");return l.jsx("div",{className:"font-mono text-sm",children:d==="tools/call"?l.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:"tools/call"}):d.startsWith("tools/call:")?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:"tools/call:"}),l.jsx("span",{className:"text-green-600 dark:text-green-400",children:d.replace("tools/call:","")})]}):d==="prompts/get"?l.jsx("span",{className:"text-purple-600 dark:text-purple-400",children:"prompts/get"}):d.startsWith("prompts/get:")?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"text-purple-600 dark:text-purple-400",children:"prompts/get:"}),l.jsx("span",{className:"text-orange-600 dark:text-orange-400",children:d.replace("prompts/get:","")})]}):d})}},{accessorKey:"count",header:X("Calls","right"),cell:({row:f})=>l.jsx("div",{className:"text-right font-mono",children:f.getValue("count").toLocaleString()})},{accessorKey:"errors",header:X("Errors","right"),cell:({row:f})=>{const d=f.getValue("errors");return l.jsx("div",{className:"text-right font-mono",children:d>0?l.jsx("span",{className:"text-red-600 dark:text-red-400",children:d}):"0"})}},{accessorKey:"gradioMetrics",header:X("Success/Failure","right"),cell:({row:f})=>{const d=f.original;return d.gradioSuccess!==void 0&&d.gradioFailure!==void 0?l.jsxs("div",{className:"text-right font-mono text-sm",children:[l.jsx("span",{className:"text-green-600 dark:text-green-400",children:d.gradioSuccess}),l.jsx("span",{className:"text-muted-foreground",children:"/"}),l.jsx("span",{className:"text-red-600 dark:text-red-400",children:d.gradioFailure})]}):l.jsx("div",{className:"text-right text-muted-foreground",children:"—"})}},{accessorKey:"errorRate",header:X("Error Rate","right"),cell:({row:f})=>{const d=f.getValue("errorRate");return l.jsx("div",{className:"text-right font-mono",children:d>0?l.jsxs("span",{className:"text-red-600 dark:text-red-400",children:[d.toFixed(1),"%"]}):"0%"})}},{accessorKey:"averageResponseTime",header:X("Avg Response","right"),cell:({row:f})=>{const d=f.getValue("averageResponseTime");return l.jsx("div",{className:"text-right font-mono",children:d?`${d.toFixed(0)}ms`:"—"})}},{accessorKey:"lastCalled",header:X("Last Called","right"),cell:({row:f})=>l.jsx("div",{className:"text-right text-sm text-muted-foreground",children:new Date(f.getValue("lastCalled")).toLocaleTimeString()})}];return l.jsxs(He,{children:[l.jsxs(Ge,{children:[l.jsx(Be,{children:"HTTP JSON Transport Statistics"}),l.jsxs(dt,{children:["MCP method call statistics and performance metrics",s?" (Empty in STDIO mode)":n!=null&&n.isStateless?"":" (Response times not available in stateful modes)"]})]}),l.jsxs(Ue,{children:[r&&l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading metrics..."})}),o&&l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsxs("div",{className:"text-sm text-destructive",children:["Error loading metrics: ",o.message]})}),s&&l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsx("div",{className:"text-sm text-muted-foreground",children:"Method tracking is not available in STDIO mode. This data is only collected for HTTP-based transports."})}),n&&!s&&l.jsxs("div",{className:"space-y-4",children:[i.length>0&&l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"text-sm text-muted-foreground",children:["Showing ",a.length," method",a.length!==1?"s":""," tracked since"," ",new Date(n.startupTime).toLocaleString()]}),l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsxs("div",{className:"text-sm font-medium",children:["Total MCP Calls: ",l.jsx("span",{className:"font-mono",children:c.toLocaleString()})]}),l.jsxs("div",{className:"text-sm font-medium",children:["Tool Calls: ",l.jsx("span",{className:"font-mono",children:u.toLocaleString()})]}),l.jsxs("div",{className:"text-sm font-medium",children:["Prompt Calls: ",l.jsx("span",{className:"font-mono",children:g.toLocaleString()})]})]})]}),i.length>0&&l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(qo,{id:"tool-prompt-calls-filter",checked:e,onCheckedChange:f=>t(!!f)}),l.jsx("label",{htmlFor:"tool-prompt-calls-filter",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",children:"Show only Tools/Prompts"})]}),a.length===0?l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsx("div",{className:"text-sm text-muted-foreground",children:e?"No tool or prompt calls recorded yet.":"No method calls recorded yet."})}):l.jsx(zt,{columns:m,data:a,searchColumn:"method",searchPlaceholder:"Filter methods...",pageSize:50,defaultColumnVisibility:{method:!0,count:!0,errors:!1,gradioMetrics:!1,errorRate:!0,averageResponseTime:n.transport==="streamableHttpJson",lastCalled:!0},defaultSorting:[{id:"count",desc:!0}]})]})]})]})}function hs(e){return e.transport==="stdio"?e.defaultHfTokenSet&&e.hfTokenMasked?{text:e.hfTokenMasked,isWarning:!1}:{text:"Warning: No token set",isWarning:!0}:e.defaultHfTokenSet?{text:`⚠️ Using ${e.hfTokenMasked||"token"} as default`,isWarning:!0}:{text:"Using Authorization Headers",isWarning:!1}}function Up({isLoading:e,error:t,transportInfo:n}){const o=()=>{switch(n.transport){case"stdio":return"STDIO";case"streamableHttp":case"streamableHttpJson":return"Streamable HTTP";default:return"Unknown"}},r=()=>{switch(n.transport){case"streamableHttp":case"streamableHttpJson":return"/mcp";case"stdio":return"stdin/stdout";default:return"unknown"}},s=()=>n.transport==="streamableHttpJson"||n.transport==="streamableHttp"&&n.jsonResponseEnabled===!0,i=()=>s()?l.jsx("span",{className:"ml-1.5 px-1.5 py-0.5 bg-green-100 text-green-800 text-[10px] rounded-sm whitespace-nowrap",children:"JSON (stateless)"}):n.transport==="streamableHttp"?l.jsx("span",{className:"ml-1.5 px-1.5 py-0.5 bg-blue-100 text-blue-800 text-[10px] rounded-sm whitespace-nowrap",children:"Session Based"}):null;if(e)return l.jsx("div",{className:"text-center text-xs text-muted-foreground py-2",children:"Loading connection information..."});if(t)return l.jsxs("div",{className:"text-center text-xs text-destructive py-2",children:["Error: ",t]});const a=n.port||3e3,c=n.transport!=="stdio";return l.jsx("div",{className:"fixed bottom-0 left-0 w-full bg-muted/50 border-t border-border py-2 px-4",children:l.jsxs("div",{className:"max-w-[700px] mx-auto flex justify-between items-center text-xs",children:[l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("span",{className:"text-muted-foreground",children:"Using"}),l.jsx("span",{className:"font-medium text-primary",children:o()}),n.transport==="stdio"&&l.jsxs("span",{className:"text-muted-foreground flex items-center",children:["Client Info :",n.stdioClient?l.jsx("span",{className:"ml-2 flex items-center",children:l.jsxs("span",{className:"ml-1 font-medium text-green-700",children:[n.stdioClient.name," ",n.stdioClient.version]})}):l.jsx("span",{className:"ml-2 text-muted-foreground",children:" (disconnected) "})]}),c&&l.jsxs("span",{className:"text-muted-foreground flex items-center",children:["on port ",l.jsx("span",{className:"font-mono mx-1",children:a}),"at ",l.jsx("span",{className:"font-mono mx-1",children:r()}),i()]})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("span",{className:"text-muted-foreground",children:" Default HF Token:"}),l.jsx("span",{className:`font-mono ${hs(n).isWarning?"text-red-500":""}`,children:hs(n).text})]})]})})}var Fn="Tabs",[Wp]=ft(Fn,[An]),qa=An(),[Kp,xr]=Wp(Fn),Xa=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:r,defaultValue:s,orientation:i="horizontal",dir:a,activationMode:c="automatic",...u}=e,g=er(a),[m,f]=Sn({prop:o,onChange:r,defaultProp:s??"",caller:Fn});return l.jsx(Kp,{scope:n,baseId:gn(),value:m,onValueChange:f,orientation:i,dir:g,activationMode:c,children:l.jsx(oe.div,{dir:g,"data-orientation":i,...u,ref:t})})});Xa.displayName=Fn;var Ya="TabsList",Ja=h.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...r}=e,s=xr(Ya,n),i=qa(n);return l.jsx(ra,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:o,children:l.jsx(oe.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:t})})});Ja.displayName=Ya;var Za="TabsTrigger",Qa=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:r=!1,...s}=e,i=xr(Za,n),a=qa(n),c=nl(i.baseId,o),u=ol(i.baseId,o),g=o===i.value;return l.jsx(sa,{asChild:!0,...a,focusable:!r,active:g,children:l.jsx(oe.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":u,"data-state":g?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:c,...s,ref:t,onMouseDown:z(e.onMouseDown,m=>{!r&&m.button===0&&m.ctrlKey===!1?i.onValueChange(o):m.preventDefault()}),onKeyDown:z(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&i.onValueChange(o)}),onFocus:z(e.onFocus,()=>{const m=i.activationMode!=="manual";!g&&!r&&m&&i.onValueChange(o)})})})});Qa.displayName=Za;var el="TabsContent",tl=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:r,children:s,...i}=e,a=xr(el,n),c=nl(a.baseId,o),u=ol(a.baseId,o),g=o===a.value,m=h.useRef(g);return h.useEffect(()=>{const f=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(f)},[]),l.jsx(gt,{present:r||g,children:({present:f})=>l.jsx(oe.div,{"data-state":g?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!f,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:f&&s})})});tl.displayName=el;function nl(e,t){return`${e}-trigger-${t}`}function ol(e,t){return`${e}-content-${t}`}var qp=Xa,Xp=Ja,Yp=Qa,Jp=tl;function Zp({className:e,...t}){return l.jsx(qp,{"data-slot":"tabs",className:ne("flex flex-col gap-2",e),...t})}function Qp({className:e,...t}){return l.jsx(Xp,{"data-slot":"tabs-list",className:ne("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function yt({className:e,...t}){return l.jsx(Yp,{"data-slot":"tabs-trigger",className:ne("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function Ct({className:e,...t}){return l.jsx(Jp,{"data-slot":"tabs-content",className:ne("flex-1 outline-none",e),...t})}const vs="ALLOW_README_INCLUDE",xs="NO_GRADIO_IMAGE_CONTENT",eh=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}).format(new Date),Do={name:"space_search",description:"Find Hugging Face Spaces using semantic search. IMPORTANT Only MCP Servers can be used with the dynamic_space toolInclude links to the Space when presenting the results.",annotations:{title:"Hugging Face Space Search"}},Oo={name:"hub_repo_search",description:"Search Hugging Face repositories with a shared query interface. You can target models, datasets, spaces, or aggregate across multiple repo types in one call. Use space_search for semantic-first discovery of Spaces. Include links to repositories in your response.",annotations:{title:"Repo Search"}},$o={name:"create_repo",description:"Create a Hugging Face model, dataset, Space, or bucket repository. name must be fully qualified, for example 'username/repo-name'.",annotations:{title:"Create Hugging Face Repository"}},Lo={name:"paper_search",description:"Find Machine Learning research papers on the Hugging Face hub. Include 'Link to paper' When presenting the results. Consider whether tabulating results matches user intent.",annotations:{title:"Paper Search"}},Vo={name:"hub_repo_details",description:"Get details for one or more Hugging Face repos (model, dataset, or space). Auto-detects type unless specified. For datasets, use dataset_structure first to discover configs, splits, sizes, and schema. Use dataset_preview only when config and split are known, unless the dataset has a single config/split.",annotations:{title:"Hub Repo Details"}},rl={name:"duplicate_space",annotations:{title:"Duplicate Hugging Face Space"}},sl={name:"space_files",annotations:{title:"Space Files List"}},zo={name:"hf_doc_search",description:`Search and Discover Hugging Face Product and Library documentation. Send an empty query to discover structure and navigation instructions. Knowledge up-to-date as at ${eh}. Combine with the Product filter to focus results.`,annotations:{title:"Hugging Face Documentation Search"}},Ho={name:"hf_doc_fetch",description:"Fetch a document from the Hugging Face or Gradio documentation library. For large documents, use offset to get subsequent chunks.",annotations:{title:"Fetch a document from the Hugging Face documentation library"}},ws=Do.name,th="model_search",yn=Oo.name,ys=$o.name,nh="model_details",Cs=Lo.name,oh="dataset_search",rh="dataset_details",Ft=Vo.name,Ss=rl.name,bs=sl.name,Rs=zo.name,_s=Ho.name,sh=new Set([th,"model-search","hf_model_search"]),ih=new Set([oh,"dataset-search","hf_dataset_search"]),ah=new Set([yn,"repo_search","repo-search","hf_repo_search"]);function lh(e){return sh.has(e)||ih.has(e)||ah.has(e)?yn:e}function Es(e){const t=new Set,n=[];let o=!1;for(const r of e){const s=lh(r);if(s===nh||s===rh){o=!0;continue}t.has(s)||(t.add(s),n.push(s))}return o&&!t.has(Ft)&&(t.add(Ft),n.push(Ft)),n}const uo=e=>fetch(e).then(t=>{if(!t.ok)throw new Error(`Failed to fetch: ${t.status}`);return t.json()});function ch(){var b,F,k,G,q,H,D,Y,L,U,_;const{data:e,error:t}=It("/api/transport",uo,{refreshInterval:3e3,revalidateOnFocus:!0,revalidateOnReconnect:!0});It("/api/sessions",uo,{refreshInterval:3e3,revalidateOnFocus:!0});const{data:n}=It("/api/settings",uo),o=((b=n==null?void 0:n.builtInTools)==null?void 0:b.includes(vs))??!1,r=((F=n==null?void 0:n.builtInTools)==null?void 0:F.includes(xs))??!1,[s,i]=h.useState(["","",""]),[a,c]=h.useState(["","",""]),[u,g]=h.useState([!1,!1,!1]),[m,f]=h.useState(!1);h.useEffect(()=>{if(n!=null&&n.spaceTools&&!m){const M=["","",""],$=["","",""],O=[!1,!1,!1];n.spaceTools.forEach((B,J)=>{J<3&&(M[J]=B.name,$[J]=B.subdomain,O[J]=!0)}),i(M),c($),g(O),f(!0)}},[n,m]);const d=!e&&!t,v=t?t.message:null,p=async(M,$)=>{try{const O=n||{builtInTools:[]},B=Es(O.builtInTools),J=$?[...B.filter(W=>W!==M),M]:B.filter(W=>W!==M),ee=Es(J),ce={...O,builtInTools:ee};cn("/api/settings",ce,!1);const ue=await fetch("/api/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({builtInTools:ee})});if(!ue.ok)throw new Error(`Failed to update tool settings: ${ue.status}`);cn("/api/settings"),console.log(`${M} is now ${$?"enabled":"disabled"}`)}catch(O){console.error("Error updating tool settings:",O),alert(`Error updating ${M}: ${O instanceof Error?O.message:"Unknown error"}`),cn("/api/settings")}},w=async(M,$)=>{const O=[...u];O[M]=$,g(O),await C(O)},x=async(M,$)=>{const O=[...s];O[M]=$,i(O),u[M]&&await C(u)},y=async(M,$)=>{const O=[...a];O[M]=$,c(O),u[M]&&await C(u)},C=async M=>{try{const $=[];for(let B=0;B<3;B++)M[B]&&s[B]&&a[B]&&$.push({_id:`space-${B}`,name:s[B],subdomain:a[B],emoji:"🔧"});const O=await fetch("/api/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({spaceTools:$})});if(!O.ok)throw new Error(`Failed to update space tools: ${O.status}`)}catch($){console.error("Error updating space tools:",$)}},S=async()=>{const M="https://huggingface.co/mcp";try{await navigator.clipboard.writeText(M)}catch($){console.error("Failed to copy URL:",$)}},R=()=>{window.open("https://huggingface.co/settings/mcp","_blank")},N={paper_search:{id:Cs,label:Lo.annotations.title,description:Lo.description,settings:{enabled:((k=n==null?void 0:n.builtInTools)==null?void 0:k.includes(Cs))??!0}},space_search:{id:ws,label:Do.annotations.title,description:Do.description,settings:{enabled:((G=n==null?void 0:n.builtInTools)==null?void 0:G.includes(ws))??!0}},hub_repo_search:{id:yn,label:Oo.annotations.title,description:Oo.description,settings:{enabled:((q=n==null?void 0:n.builtInTools)==null?void 0:q.includes(yn))??!0}},create_repo:{id:ys,label:$o.annotations.title,description:$o.description,settings:{enabled:((H=n==null?void 0:n.builtInTools)==null?void 0:H.includes(ys))??!0}},hub_repo_details:{id:Ft,label:Vo.annotations.title,description:Vo.description,settings:{enabled:((D=n==null?void 0:n.builtInTools)==null?void 0:D.includes(Ft))??!0}},include_readme:{id:vs,label:"Allow README Include (flag)",description:"Allows hub_repo_details to attach README content when the tool request explicitly opts in. Requires reconnect to take effect.",settings:{enabled:o}},doc_semantic_search:{id:Rs,label:zo.annotations.title,description:zo.description,settings:{enabled:((Y=n==null?void 0:n.builtInTools)==null?void 0:Y.includes(Rs))??!0}},doc_fetch:{id:_s,label:Ho.annotations.title,description:Ho.description,settings:{enabled:((L=n==null?void 0:n.builtInTools)==null?void 0:L.includes(_s))??!0}}},E={duplicate_space:{id:Ss,label:rl.annotations.title,description:"Duplicate a Hugging Face Space to your account.",settings:{enabled:((U=n==null?void 0:n.builtInTools)==null?void 0:U.includes(Ss))??!0}},space_files:{id:bs,label:sl.annotations.title,description:"List all files in a static Hugging Face Space with download URLs.",settings:{enabled:((_=n==null?void 0:n.builtInTools)==null?void 0:_.includes(bs))??!0}},no_gradio_images:{id:xs,label:"Disable Gradio Images (flag)",description:"Strips image responses from Gradio spaces. Mirrors the 'no_image_content' URL parameter and requires reconnect to take effect.",settings:{enabled:r}}};return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"min-h-screen p-4 sm:p-8 pb-20",children:l.jsx("div",{className:"max-w-4xl mx-auto",children:l.jsxs(Zp,{defaultValue:"metrics",className:"w-full",children:[l.jsxs(Qp,{className:"mb-6 w-full overflow-x-auto flex-nowrap",children:[l.jsx(yt,{value:"metrics",className:"whitespace-nowrap",children:"📊 Metrics"}),l.jsx(yt,{value:"mcp",className:"whitespace-nowrap",children:"🔧 MCP"}),!(e!=null&&e.externalApiMode)&&l.jsx(yt,{value:"search",className:"whitespace-nowrap",children:"🔍 Search"}),!(e!=null&&e.externalApiMode)&&l.jsx(yt,{value:"spaces",className:"whitespace-nowrap",children:"🚀 Spaces"}),!(e!=null&&e.externalApiMode)&&l.jsx(yt,{value:"gradio",className:"whitespace-nowrap",children:"🚀 Gradio"}),l.jsx(yt,{value:"home",className:"whitespace-nowrap",children:"🏠 Home"})]}),l.jsx(Ct,{value:"metrics",className:"mt-0",children:l.jsx(Hp,{})}),l.jsx(Ct,{value:"mcp",className:"mt-0",children:l.jsx(Bp,{})}),!(e!=null&&e.externalApiMode)&&l.jsx(Ct,{value:"search",className:"mt-0",children:l.jsx(Dr,{title:"🤗 Hugging Face Search Tools (MCP)",description:"Find and use Hugging Face and Community content.",tools:N,onToolToggle:p})}),!(e!=null&&e.externalApiMode)&&l.jsx(Ct,{value:"spaces",className:"mt-0",children:l.jsx(Dr,{title:"🤗 Hugging Face Space Tools (MCP)",description:"Manage and duplicate Hugging Face Spaces.",tools:E,onToolToggle:p})}),!(e!=null&&e.externalApiMode)&&l.jsx(Ct,{value:"gradio",className:"mt-0",children:l.jsx(du,{spaceNames:s,spaceSubdomains:a,enabledSpaces:u,onSpaceToolToggle:w,onSpaceToolNameChange:x,onSpaceToolSubdomainChange:y})}),l.jsx(Ct,{value:"home",className:"mt-0",children:l.jsxs(He,{children:[l.jsxs(Ge,{children:[l.jsx(Be,{children:"🤗 HF MCP Server"}),l.jsx(dt,{children:"Connect with AI assistants through the Model Context Protocol"})]}),l.jsxs(Ue,{className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground mb-3",children:"What's MCP?"}),l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:"The Model Context Protocol (MCP) is an open standard that enables AI assistants to securely connect to external data sources and tools. This HF MCP Server provides access to Hugging Face's ecosystem of models, datasets, and Spaces, allowing AI assistants to search, analyze, and interact with ML resources directly."})]}),l.jsx(nt,{}),l.jsx("div",{className:"bg-blue-50 dark:bg-blue-950 border border-blue-200 dark:border-blue-800 rounded-lg p-4",children:l.jsxs("div",{className:"flex items-start space-x-3",children:[l.jsx("div",{className:"flex-shrink-0 mt-0.5",children:l.jsx("svg",{className:"h-5 w-5 text-blue-600 dark:text-blue-400",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-semibold text-blue-900 dark:text-blue-100 mb-2",children:"Tool Management Scope"}),((e==null?void 0:e.externalApiMode)||(e==null?void 0:e.transport)!=="stdio"&&!(e!=null&&e.externalApiMode))&&l.jsx("p",{className:"text-sm text-blue-700 dark:text-blue-300 leading-relaxed",children:e!=null&&e.externalApiMode?l.jsxs(l.Fragment,{children:[l.jsx("strong",{children:"External API Mode:"})," Tools are managed by an external API. Tool Selection Tabs are not available."]}):l.jsxs(l.Fragment,{children:[l.jsx("strong",{children:"Shared Mode:"})," Tool toggles in this interface affect"," ",l.jsx("strong",{children:"all connected MCP server instances"})," and control tool availability for all connected Hosts."]})})]})]})}),l.jsx(nt,{}),l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs(ct,{size:"xl",onClick:S,className:"w-full transition-all duration-200 active:bg-green-500 active:border-green-500 touch-manipulation",children:[l.jsx(Qc,{className:"mr-2 h-5 w-5"}),"Copy MCP URL"]}),l.jsxs(ct,{size:"xl",variant:"outline",onClick:R,className:"w-full touch-manipulation",children:[l.jsx(ou,{className:"mr-2 h-5 w-5"}),"Go to Settings"]})]})]})]})})]})})}),l.jsx(Up,{isLoading:d,error:v,transportInfo:e||{transport:"unknown"}})]})}ul.createRoot(document.getElementById("root")).render(l.jsx(h.StrictMode,{children:l.jsx(ch,{})}));
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/assets/hf-logo-DbjPOSLw.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>HF MCP Server</title>
8
- <script type="module" crossorigin src="/assets/main-DmLAbp80.js"></script>
8
+ <script type="module" crossorigin src="/assets/main-8MqgawYU.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/assets/index-CZS9IJ_2.js">
10
10
  <link rel="stylesheet" crossorigin href="/assets/index-C82JscI3.css">
11
11
  </head>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmindset/hf-mcp-server",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "description": "Official Hugging Face MCP Server",
5
5
  "type": "module",
6
6
  "main": "./dist/server/streamableHttp.js",
@@ -57,7 +57,7 @@
57
57
  "tailwind-merge": "^3.2.0",
58
58
  "tailwindcss": "^4.1.5",
59
59
  "zod": "^3.24.4",
60
- "@llmindset/hf-mcp": "^0.3.11"
60
+ "@llmindset/hf-mcp": "^0.3.12"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@eslint/js": "^9.25.0",