@decocms/mesh 1.13.4 → 2.1.0

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.
Files changed (114) hide show
  1. package/dist/client/assets/{AlertCircle-CmTLFfTW.js → AlertCircle-CnILn3jx.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-kUb-nLpp.js → ArrowLeft-B6wScdzP.js} +1 -1
  3. package/dist/client/assets/{ChevronDown-BIixgdXr.js → ChevronDown-DTD8t00o.js} +1 -1
  4. package/dist/client/assets/{ChevronRight-XFvS51AW.js → ChevronRight-1OHI0CBI.js} +1 -1
  5. package/dist/client/assets/{Copy01-Bbnq-cRP.js → Copy01-Uwb56ntU.js} +1 -1
  6. package/dist/client/assets/{DotsHorizontal-Wp9Jfd-l.js → DotsHorizontal-B5ryaglt.js} +1 -1
  7. package/dist/client/assets/{DotsVertical-BWJddsCE.js → DotsVertical-B-5TnXsG.js} +1 -1
  8. package/dist/client/assets/{File06-AO49hgxj.js → File06-DExBhm42.js} +1 -1
  9. package/dist/client/assets/{FilterLines-D_oBG_mT.js → FilterLines-aAu13BQ5.js} +1 -1
  10. package/dist/client/assets/{FlipBackward-v3DJy5dX.js → FlipBackward-DWy5EIwt.js} +1 -1
  11. package/dist/client/assets/{GitBranch01-Bg8OxNYr.js → GitBranch01-Dq29bc0o.js} +1 -1
  12. package/dist/client/assets/{Grid01-D8szKORD.js → Grid01-Bdi_lD58.js} +1 -1
  13. package/dist/client/assets/{Inbox01-DKJqmGhJ.js → Inbox01-DMQr1yW_.js} +1 -1
  14. package/dist/client/assets/{InfoCircle-DQgIwXgE.js → InfoCircle-BTGq_g6o.js} +1 -1
  15. package/dist/client/assets/{Key01-j8Px8dQ3.js → Key01-BM7IeiIC.js} +1 -1
  16. package/dist/client/assets/{LinkExternal01-DtwuKg3k.js → LinkExternal01-BbRknnAT.js} +1 -1
  17. package/dist/client/assets/{Loading01-BFMDuD9f.js → Loading01-BhwGtEie.js} +1 -1
  18. package/dist/client/assets/{Lock01-B2Dlj0_A.js → Lock01-BjwJTO1K.js} +1 -1
  19. package/dist/client/assets/{Play-DZwkJO6F.js → Play-B_M1eygK.js} +1 -1
  20. package/dist/client/assets/{Plus-DCJuRkSA.js → Plus-CUt-llJ2.js} +1 -1
  21. package/dist/client/assets/{Terminal-BgBiWCRz.js → Terminal-OwfTXSIc.js} +1 -1
  22. package/dist/client/assets/{Trash01-DXJjsatW.js → Trash01-DvwxBHIe.js} +1 -1
  23. package/dist/client/assets/{X-DO5JCiO9.js → X-DmB-XP-B.js} +1 -1
  24. package/dist/client/assets/{XClose-yLguPztf.js → XClose-BfRKR4QX.js} +1 -1
  25. package/dist/client/assets/{alert-dialog-BFj8FHOj.js → alert-dialog-CPgX_DbI.js} +1 -1
  26. package/dist/client/assets/{auth-CS1Cey1o.js → auth-C_7jwlCE.js} +1 -1
  27. package/dist/client/assets/{auth-catchall-BbJfiMLS.js → auth-catchall-BsWBBbjQ.js} +1 -1
  28. package/dist/client/assets/{avatar-Cw7f7Fm7.js → avatar-BfkYZ3Uk.js} +1 -1
  29. package/dist/client/assets/{badge-cip1W12x.js → badge-pmm0Bb0n.js} +1 -1
  30. package/dist/client/assets/{card-D7kEypvP.js → card-DX0N7QQe.js} +1 -1
  31. package/dist/client/assets/{checkbox-DWLQD46M.js → checkbox-CT0tct0O.js} +1 -1
  32. package/dist/client/assets/{collection-detail-BnPZ4P9Q.js → collection-detail-BB6Q1vQA.js} +2 -2
  33. package/dist/client/assets/{collection-display-button-6se5sKw0.js → collection-display-button-C6mkNMSZ.js} +1 -1
  34. package/dist/client/assets/{collection-header-BAGohiuL.js → collection-header-B-OH92G_.js} +1 -1
  35. package/dist/client/assets/{collection-page-BIjUaFrN.js → collection-page-BMM6TZo-.js} +1 -1
  36. package/dist/client/assets/{collection-search-Bt7hJb44.js → collection-search-Dspxl3Yz.js} +1 -1
  37. package/dist/client/assets/{collection-tab-DofbhRON.js → collection-tab-CZVDVMRh.js} +1 -1
  38. package/dist/client/assets/{collection-table-wrapper-Nus9WkY9.js → collection-table-wrapper-QnkBhjXh.js} +1 -1
  39. package/dist/client/assets/{connection-card-D6p9Apdb.js → connection-card-D80SBKTI.js} +1 -1
  40. package/dist/client/assets/connection-detail-CQgpZSSc.js +1 -0
  41. package/dist/client/assets/connections-D1odZRUO.js +1 -0
  42. package/dist/client/assets/constants-BvQJIhjO.js +1 -0
  43. package/dist/client/assets/{create-organization-dialog-D4ZZBa08.js → create-organization-dialog-Cz1rNGDv.js} +1 -1
  44. package/dist/client/assets/{dialog-BPRbMnap.js → dialog-CC31EL0X.js} +1 -1
  45. package/dist/client/assets/{dropdown-menu-DH78LFXJ.js → dropdown-menu-zbRnijT0.js} +1 -1
  46. package/dist/client/assets/{empty-state-ZbNFSrHa.js → empty-state-B5WHq2Wp.js} +1 -1
  47. package/dist/client/assets/{env-vars-editor-HOD_p6bM.js → env-vars-editor-BZ0EKsNv.js} +1 -1
  48. package/dist/client/assets/{error-boundary-CSDpN3IU.js → error-boundary-iei4NFmK.js} +1 -1
  49. package/dist/client/assets/extract-connection-data-RbshSMFT.js +1 -0
  50. package/dist/client/assets/{form-BWvfCr5W.js → form-B4rbGxTC.js} +1 -1
  51. package/dist/client/assets/{formatDistanceToNow-CUtIwGZO.js → formatDistanceToNow-B3eT5t4e.js} +1 -1
  52. package/dist/client/assets/{gateway-detail-BVUnhnv6.js → gateway-detail-Cel29Jq6.js} +1 -1
  53. package/dist/client/assets/{gateway-selector-C6BhGNmC.js → gateway-selector-DrcyKhYX.js} +1 -1
  54. package/dist/client/assets/{gateways-CUY_RF0g.js → gateways-BCUxb6V6.js} +1 -1
  55. package/dist/client/assets/github-icon-Dp3wHhYE.js +1 -0
  56. package/dist/client/assets/{home-BDMCtoFs.js → home-DjjIziN3.js} +1 -1
  57. package/dist/client/assets/{index-CFqw5CAk.js → index-Be5s3BTd.js} +2 -2
  58. package/dist/client/assets/index-CJUkmkVw.js +25 -0
  59. package/dist/client/assets/{index-B1wnL3pV.css → index-DU53zBhA.css} +1 -1
  60. package/dist/client/assets/{index-m-YmB4ph.js → index-DhProoia.js} +1 -1
  61. package/dist/client/assets/{input-BSDBSyke.js → input-D5VmXtXA.js} +1 -1
  62. package/dist/client/assets/{layout-C_WJLL2S.js → layout-BtPLf8h9.js} +1 -1
  63. package/dist/client/assets/{lazy-highlighter-QHCwZ7Bv.js → lazy-highlighter-CKguQGTj.js} +1 -1
  64. package/dist/client/assets/{localstorage-keys-DnYi5wZr.js → localstorage-keys-Cgns4y6c.js} +1 -1
  65. package/dist/client/assets/{login-unmsX_CR.js → login-BY9zzeLF.js} +1 -1
  66. package/dist/client/assets/{mcp-oauth-D1oibR_i.js → mcp-oauth-JrBnP9ka.js} +1 -1
  67. package/dist/client/assets/mcp-server-detail-D1UUYOFR.js +1 -0
  68. package/dist/client/assets/{members-CgDxC8dY.js → members-BLsbQRx4.js} +1 -1
  69. package/dist/client/assets/{monaco-editor-18l2E7lk.js → monaco-editor-BbkOCnUd.js} +1 -1
  70. package/dist/client/assets/{monitoring-BS_WM-ML.js → monitoring-DQGgnd4W.js} +1 -1
  71. package/dist/client/assets/{oauth-callback-tcEVQW2m.js → oauth-callback-CEdwKynD.js} +1 -1
  72. package/dist/client/assets/{page-C_wcQFSa.js → page-BXDOiUca.js} +4 -4
  73. package/dist/client/assets/page-CjfeHs2p.js +1 -0
  74. package/dist/client/assets/{pin-to-sidebar-button-rUjoaKt7.js → pin-to-sidebar-button-Dw4GdfbU.js} +1 -1
  75. package/dist/client/assets/{popover-DGwJ1U8B.js → popover-t9-OkADH.js} +1 -1
  76. package/dist/client/assets/{project-context-provider-C7-HmBKu.js → project-context-provider-BS8o541A.js} +1 -1
  77. package/dist/client/assets/registry-utils-B7t_ZBUi.js +1 -0
  78. package/dist/client/assets/{resizable-BkJdAL7l.js → resizable-QJ-R9KRQ.js} +1 -1
  79. package/dist/client/assets/{resource-tabs-DhNIXHvE.js → resource-tabs-B-4VA98W.js} +1 -1
  80. package/dist/client/assets/{select-DLPmxXDW.js → select-e4C4SmKq.js} +1 -1
  81. package/dist/client/assets/{settings-Dg4J4piv.js → settings-Dnv8fDox.js} +1 -1
  82. package/dist/client/assets/{shell-layout-CW_3D6wx.js → shell-layout-BlrxsMrN.js} +1 -1
  83. package/dist/client/assets/{spinner-PGFal9m1.js → spinner-BFS4gVsU.js} +1 -1
  84. package/dist/client/assets/{switch-Fn7If0Ti.js → switch-CLvPCUaJ.js} +1 -1
  85. package/dist/client/assets/{textarea-CbNfP826.js → textarea-4b5OG-tc.js} +1 -1
  86. package/dist/client/assets/{thread-history-popover-BW6o5miO.js → thread-history-popover-CdgY8TVV.js} +33 -33
  87. package/dist/client/assets/{tools-list-BMbd7IEa.js → tools-list-DYFK0YJ7.js} +1 -1
  88. package/dist/client/assets/{use-binding-D77gExDp.js → use-binding-4jFDqim2.js} +1 -1
  89. package/dist/client/assets/{use-connection-BPzhCo7m.js → use-connection-BV17GXlx.js} +1 -1
  90. package/dist/client/assets/{use-connection-resources-CQGT27SN.js → use-connection-resources-CaFhYy-Y.js} +1 -1
  91. package/dist/client/assets/{use-gateway-C8QVevg7.js → use-gateway-B7sk5BUf.js} +1 -1
  92. package/dist/client/assets/{use-list-state-BzeiRpp0.js → use-list-state-ClKTIM8C.js} +1 -1
  93. package/dist/client/assets/{use-mcp-D2cijL_p.js → use-mcp-BnUTTtgf.js} +1 -1
  94. package/dist/client/assets/{use-members-CTyXRW-K.js → use-members-Duard-8M.js} +1 -1
  95. package/dist/client/assets/{use-mobile-BTxzaR4j.js → use-mobile-D6agNekL.js} +1 -1
  96. package/dist/client/assets/{use-organization-settings-aN8k0KJJ.js → use-organization-settings-BBRsFqJO.js} +1 -1
  97. package/dist/client/assets/{use-tool-call-C4GcZMyW.js → use-tool-call-CM2oq0rB.js} +1 -1
  98. package/dist/client/assets/useQuery-DdiguCvR.js +1 -0
  99. package/dist/client/assets/{value-DVG0CnkT.js → value-8MKGBmon.js} +1 -1
  100. package/dist/client/assets/{view-mode-toggle-DPmK0pgy.js → view-mode-toggle-BTD72CUu.js} +1 -1
  101. package/dist/client/assets/{workflow-Dkm9OUwf.js → workflow-6yVvsMos.js} +1 -1
  102. package/dist/client/index.html +2 -2
  103. package/dist/server/cli.js +108 -108
  104. package/dist/server/server.js +104 -104
  105. package/package.json +1 -1
  106. package/dist/client/assets/connection-detail-CkpomsVk.js +0 -1
  107. package/dist/client/assets/connections-X3ifJgj8.js +0 -1
  108. package/dist/client/assets/constants-B627FiQ3.js +0 -1
  109. package/dist/client/assets/extract-connection-data-BVRaMREC.js +0 -1
  110. package/dist/client/assets/github-icon-BrF3LMLL.js +0 -1
  111. package/dist/client/assets/index-2YBxks23.js +0 -25
  112. package/dist/client/assets/mcp-server-detail-5ueNKLNi.js +0 -1
  113. package/dist/client/assets/page-Bm0QzKLN.js +0 -1
  114. package/dist/client/assets/useQuery-DV_L-E86.js +0 -1
@@ -1 +0,0 @@
1
- import{r as E,c as P,j as s,h as ve,d as Te,b as _e,a as Me,t as he}from"./index-CFqw5CAk.js";import{i as Ie}from"./AlertCircle-CmTLFfTW.js";import{i as je}from"./Loading01-BFMDuD9f.js";import{B as ie}from"./input-BSDBSyke.js";import{i as Pe}from"./ArrowLeft-kUb-nLpp.js";import{I as ye,E as Le,b as De,u as Ee,d as $e,c as Ue}from"./use-connection-BPzhCo7m.js";import{t as Ve}from"./ChevronDown-BIixgdXr.js";import{s as ge}from"./Plus-DCJuRkSA.js";import{b as Re,D as ze,a as Ae,c as Be}from"./dropdown-menu-DH78LFXJ.js";import{n as be}from"./LinkExternal01-DtwuKg3k.js";import{T as Ge,R as Fe}from"./tools-list-BMbd7IEa.js";import{R as Oe}from"./resource-tabs-DhNIXHvE.js";import{a as We}from"./use-binding-D77gExDp.js";import{u as He}from"./use-tool-call-C4GcZMyW.js";import{u as Ze}from"./use-mcp-D2cijL_p.js";import{u as Ne}from"./project-context-provider-C7-HmBKu.js";import{e as Ke}from"./extract-connection-data-BVRaMREC.js";import{s as qe}from"./slugify-CEUa2lfQ.js";import{a as Je,e as Qe,c as Xe,d as Ye,g as et}from"./github-icon-BrF3LMLL.js";import{e as tt}from"./app-name-gTETL9So.js";import{i as st}from"./InfoCircle-DQgIwXgE.js";import"./ChevronRight-XFvS51AW.js";import"./useQuery-DV_L-E86.js";import"./File06-AO49hgxj.js";import"./collection-display-button-6se5sKw0.js";import"./Grid01-D8szKORD.js";import"./view-mode-toggle-DPmK0pgy.js";import"./collection-search-Bt7hJb44.js";import"./collection-table-wrapper-Nus9WkY9.js";import"./card-D7kEypvP.js";import"./layout-C_WJLL2S.js";import"./badge-cip1W12x.js";import"./auth-CS1Cey1o.js";import"./constants-B627FiQ3.js";import"./generate-id-Dyweu44Y.js";const Ce=({size:t=24,color:e="currentColor",...r})=>E.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},E.createElement("path",{d:"m7.5 12 3 3 6-6m5.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Ce.displayName="CheckCircle";const we=({size:t=24,color:e="currentColor",...r})=>E.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},E.createElement("path",{d:"m21 21-3.5-3.5m2.5-6a8.5 8.5 0 1 1-17 0 8.5 8.5 0 0 1 17 0Z"}));we.displayName="SearchLg";function rt(t){const e=P.c(3),{message:r}=t,n=r===void 0?"Loading MCP Server details...":r;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(je,{size:48,className:"animate-spin mb-4"}),e[0]=o):o=e[0];let i;return e[1]!==n?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[o,s.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),e[1]=n,e[2]=i):i=e[2],i}function ot(t){const e=P.c(9),{error:r,onBack:n}=t,o=r instanceof Error?r.message:r;let i,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ie,{size:48,className:"text-destructive mb-4"}),d=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading MCP Server"}),e[0]=i,e[1]=d):(i=e[0],d=e[1]);let a;e[2]!==o?(a=s.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:o}),e[2]=o,e[3]=a):a=e[3];let l;e[4]!==n?(l=s.jsx("button",{onClick:n,className:"mt-4 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"Go Back"}),e[4]=n,e[5]=l):l=e[5];let f;return e[6]!==a||e[7]!==l?(f=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[i,d,a,l]}),e[6]=a,e[7]=l,e[8]=f):f=e[8],f}function nt(t){const e=P.c(5),{onBack:r}=t;let n,o,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(we,{size:48,className:"text-muted-foreground mb-4"}),o=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"MCP Server not found"}),i=s.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:"The MCP Server you're looking for doesn't exist in this store."}),e[0]=n,e[1]=o,e[2]=i):(n=e[0],o=e[1],i=e[2]);let d;return e[3]!==r?(d=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n,o,i,s.jsx("button",{onClick:r,className:"mt-4 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"Go Back to Store"})]}),e[3]=r,e[4]=d):d=e[4],d}function it(t){const e=P.c(3),{onBack:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Pe,{}),e[0]=n):n=e[0];let o;return e[1]!==r?(o=s.jsx("div",{className:"flex items-center h-12 border-b border-border shrink-0",children:s.jsx("div",{className:"flex h-full px-2 border-r items-center",children:s.jsx(ie,{variant:"ghost",size:"icon",className:"items-center size-8 text-muted-foreground",onClick:r,"aria-label":"Go back",children:n})})}),e[1]=r,e[2]=o):o=e[2],o}function lt(t){const e=P.c(30),{data:r,itemVersions:n,onInstall:o,canInstall:i,isInstalling:d}=t,a=i===void 0?!0:i,l=d===void 0?!1:d,[f,g]=E.useState(0);let h;e[0]!==o?(h=_=>{g(_),o(_)},e[0]=o,e[1]=h):h=e[1];const u=h;let x;e[2]!==r.icon||e[3]!==r.name?(x=s.jsx(ye,{icon:r.icon,name:r.name,size:"lg",className:"shrink-0 shadow-sm"}),e[2]=r.icon,e[3]=r.name,e[4]=x):x=e[4];let p;e[5]!==r.name?(p=s.jsx("h1",{className:"text-3xl font-medium",children:r.name}),e[5]=r.name,e[6]=p):p=e[6];let b;e[7]!==r.verified?(b=r.verified&&s.jsx("img",{src:"/verified-badge.svg",alt:"Verified",className:"w-5 h-5 shrink-0"}),e[7]=r.verified,e[8]=b):b=e[8];let j;e[9]!==p||e[10]!==b?(j=s.jsxs("div",{className:"flex items-center gap-2",children:[p,b]}),e[9]=p,e[10]=b,e[11]=j):j=e[11];let w;e[12]!==r.shortDescription?(w=r.shortDescription&&s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:r.shortDescription}),e[12]=r.shortDescription,e[13]=w):w=e[13];let S;e[14]!==j||e[15]!==w?(S=s.jsxs("div",{className:"flex-1 min-w-0",children:[j,w]}),e[14]=j,e[15]=w,e[16]=S):S=e[16];let k;e[17]!==a||e[18]!==u||e[19]!==l||e[20]!==n||e[21]!==o||e[22]!==f?(k=a?s.jsx("div",{className:"shrink-0",children:n.length>1?s.jsxs("div",{className:"flex",children:[s.jsxs(ie,{variant:"brand",onClick:()=>u(0),disabled:l,className:"shrink-0 rounded-r-none cursor-pointer",children:[s.jsx(ge,{size:20}),l?"Connecting...":"Connect Connection"]}),s.jsxs(Re,{children:[s.jsx(ze,{asChild:!0,children:s.jsx(ie,{variant:"brand",disabled:l,className:"shrink-0 rounded-l-none px-2 border-l-2 border-l-white/50 cursor-pointer",children:s.jsx(Ve,{size:20})})}),s.jsx(Ae,{align:"end",className:"w-56 max-h-[300px] overflow-y-auto",children:n.map((_,m)=>{const N=_._meta?.["io.modelcontextprotocol.registry/official"];return s.jsx(Be,{onClick:()=>u(m),disabled:l,className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center justify-between gap-2 w-full",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"font-medium text-sm",children:["v",_.server?.version||"unknown"]}),N?.isLatest&&s.jsx("div",{className:"text-xs text-muted-foreground/50 font-semibold",children:"LATEST"})]}),m===f&&s.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0"})]})},m)})})]})]}):s.jsxs(ie,{variant:"brand",onClick:()=>o(),disabled:n.length===0||l,className:"shrink-0",children:[s.jsx(ge,{size:20}),l?"Connecting...":"Connect MCP Server"]})}):s.jsx("div",{className:"shrink-0 px-4 py-2 text-sm text-muted-foreground bg-muted rounded-lg",children:"Cannot be connected"}),e[17]=a,e[18]=u,e[19]=l,e[20]=n,e[21]=o,e[22]=f,e[23]=k):k=e[23];let T;e[24]!==k||e[25]!==S?(T=s.jsxs("div",{className:"flex-1 min-w-0 flex items-center justify-between",children:[S,k]}),e[24]=k,e[25]=S,e[26]=T):T=e[26];let y;return e[27]!==T||e[28]!==x?(y=s.jsxs("div",{className:"flex items-center gap-4 py-8 px-5 border-b border-border",children:[x,T]}),e[27]=T,e[28]=x,e[29]=y):y=e[29],y}function at(t){if(!t)return"—";try{const e=new Date(t);return isNaN(e.getTime())?"—":e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function ct(t){const e=P.c(51),{data:r,publisherInfo:n,selectedItem:o}=t;let i;e[0]!==r.description?(i=r.description&&s.jsxs("div",{className:"px-5 pb-5 border-b border-border",children:[s.jsx("h2",{className:"text-base font-medium mb-3",children:"Overview"}),s.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:r.description})]}),e[0]=r.description,e[1]=i):i=e[1];const d=r.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":r.publisher;let a;e[2]!==n.logo||e[3]!==d?(a=s.jsx(ye,{icon:n.logo,name:d,size:"sm",className:"shrink-0 shadow-sm"}),e[2]=n.logo,e[3]=d,e[4]=a):a=e[4];let l;e[5]!==r.publisher?(l=r.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":r.publisher.charAt(0).toUpperCase()+r.publisher.slice(1),e[5]=r.publisher,e[6]=l):l=e[6];let f;e[7]!==l?(f=s.jsx("div",{className:"font-medium",children:l}),e[7]=l,e[8]=f):f=e[8];let g;e[9]!==n.count?(g=n.count>0?s.jsxs(s.Fragment,{children:[s.jsx("img",{src:"/globe.svg",alt:"globe",className:"w-3 h-3"}),s.jsxs("span",{children:[n.count," ",n.count===1?"published server":"published servers"]})]}):"Publisher",e[9]=n.count,e[10]=g):g=e[10];let h;e[11]!==g?(h=s.jsx("div",{className:"text-xs text-muted-foreground flex items-center gap-1",children:g}),e[11]=g,e[12]=h):h=e[12];let u;e[13]!==f||e[14]!==h?(u=s.jsxs("div",{children:[f,h]}),e[13]=f,e[14]=h,e[15]=u):u=e[15];let x;e[16]!==a||e[17]!==u?(x=s.jsx("div",{className:"px-5 border-b border-border",children:s.jsxs("div",{className:"flex items-center gap-3 py-5",children:[a,u]})}),e[16]=a,e[17]=u,e[18]=x):x=e[18];let p;e[19]!==r.version?(p=r.version&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-foreground text-sm",children:"Version"}),s.jsxs("span",{className:"text-muted-foreground uppercase text-xs",children:["v",r.version]})]}),e[19]=r.version,e[20]=p):p=e[20];let b;e[21]!==r.tags?(b=r.tags&&r.tags.length>0&&s.jsxs("div",{className:"flex justify-between items-start text-sm",children:[s.jsx("span",{className:"text-foreground text-sm",children:"Tags"}),s.jsx("div",{className:"flex flex-wrap gap-1 justify-end max-w-[60%]",children:r.tags.map(mt)})]}),e[21]=r.tags,e[22]=b):b=e[22];let j;e[23]!==r.categories?(j=r.categories&&r.categories.length>0&&s.jsxs("div",{className:"flex justify-between items-start text-sm",children:[s.jsx("span",{className:"text-foreground text-sm",children:"Categories"}),s.jsx("div",{className:"flex flex-wrap gap-1 justify-end max-w-[60%]",children:r.categories.map(dt)})]}),e[23]=r.categories,e[24]=j):j=e[24];let w;e[25]!==r.connectionType?(w=r.connectionType&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-foreground text-sm",children:"Connection Type"}),s.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:r.connectionType})]}),e[25]=r.connectionType,e[26]=w):w=e[26];let S;e[27]!==r.schemaVersion?(S=r.schemaVersion&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-foreground text-sm",children:"Schema Version"}),s.jsx("span",{className:"text-muted-foreground text-xs",children:r.schemaVersion})]}),e[27]=r.schemaVersion,e[28]=S):S=e[28];let k;e[29]!==r.websiteUrl?(k=r.websiteUrl&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-foreground text-sm",children:"Website"}),s.jsxs("a",{href:r.websiteUrl,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:underline flex items-center gap-1 text-xs",children:[s.jsx("span",{children:"Visit"}),s.jsx(be,{size:14})]})]}),e[29]=r.websiteUrl,e[30]=k):k=e[30];let T;e[31]!==r.repository?(T=r.repository?.url&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-foreground text-sm",children:"Source"}),s.jsxs("a",{href:r.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:underline flex items-center gap-1 text-xs",children:[s.jsx("span",{children:"GitHub"}),s.jsx(be,{size:14})]})]}),e[31]=r.repository,e[32]=T):T=e[32];let y;e[33]!==p||e[34]!==b||e[35]!==j||e[36]!==w||e[37]!==S||e[38]!==k||e[39]!==T?(y=s.jsxs("div",{className:"px-5 py-5 border-b border-border space-y-4",children:[p,b,j,w,S,k,T]}),e[33]=p,e[34]=b,e[35]=j,e[36]=w,e[37]=S,e[38]=k,e[39]=T,e[40]=y):y=e[40];let _;e[41]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("span",{className:"text-foreground text-sm",children:"Last Updated"}),e[41]=_):_=e[41];let m;e[42]!==o.updated_at?(m=at(o.updated_at),e[42]=o.updated_at,e[43]=m):m=e[43];let N;e[44]!==m?(N=s.jsxs("div",{className:"px-5 py-5 text-sm flex justify-between items-center border-b border-border",children:[_,s.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:m})]}),e[44]=m,e[45]=N):N=e[45];let I;return e[46]!==i||e[47]!==y||e[48]!==N||e[49]!==x?(I=s.jsxs("div",{className:"lg:col-span-1 flex flex-col pt-5",children:[i,x,y,N]}),e[46]=i,e[47]=y,e[48]=N,e[49]=x,e[50]=I):I=e[50],I}function dt(t){return s.jsx("span",{className:"text-xs bg-muted px-2 py-0.5 rounded",children:t},t)}function mt(t){return s.jsx("span",{className:"text-xs bg-muted px-2 py-0.5 rounded",children:t},t)}function ft(t){const e=P.c(18),{data:r,availableTabs:n,effectiveActiveTabId:o,effectiveTools:i,isLoadingTools:d,onTabChange:a}=t,l=d===void 0?!1:d;let f;e[0]!==i?(f=i.map(ut),e[0]=i,e[1]=f):f=e[1];const g=f;let h;e[2]!==n||e[3]!==o||e[4]!==a?(h=n.length>0&&s.jsx("div",{className:"px-4 py-2 border-b border-border bg-background",children:s.jsx(Oe,{tabs:n,activeTab:o,onTabChange:a})}),e[2]=n,e[3]=o,e[4]=a,e[5]=h):h=e[5];let u;e[6]!==o||e[7]!==i.length||e[8]!==l||e[9]!==g?(u=o==="tools"&&s.jsx("div",{className:"flex flex-col flex-1",children:l?s.jsxs("div",{className:"flex items-center justify-center p-8",children:[s.jsx(je,{size:24,className:"animate-spin"}),s.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:"Loading tools..."})]}):i.length>0?s.jsx(Ge,{tools:g,showToolbar:!1,emptyMessage:"This MCP Server doesn't have any tools."}):s.jsx(Le,{image:null,title:"No tools available",description:"This MCP Server doesn't have any tools."})}),e[6]=o,e[7]=i.length,e[8]=l,e[9]=g,e[10]=u):u=e[10];let x;e[11]!==r?.repository||e[12]!==o?(x=o==="readme"&&s.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:s.jsx(Fe,{repository:r?.repository})}),e[11]=r?.repository,e[12]=o,e[13]=x):x=e[13];let p;return e[14]!==h||e[15]!==u||e[16]!==x?(p=s.jsxs("div",{className:"lg:col-span-2 flex flex-col border-l border-border",children:[h,u,x]}),e[14]=h,e[15]=u,e[16]=x,e[17]=p):p=e[17],p}function ut(t){const e=t;return{name:e.name||"",description:e.description||void 0}}function xt(t,e){if(!t||!e)return;const r=e.toLowerCase();return t.find(n=>n.app_name?.toLowerCase()===r||n.app_id?.toLowerCase()===r||n.title.toLowerCase()===r)||t.find(n=>n.title.toLowerCase().includes(r))}function pt(t,e,r,n,o){if(!e||e==="Unknown")return{count:0};if(e==="io.modelcontextprotocol.registry/official")return{logo:n?.icon||void 0,count:o??t.length};const i=e.toLowerCase(),d=t.filter(l=>(l._meta?.["io.modelcontextprotocol.registry/official"]?"io.modelcontextprotocol.registry/official":l.publisher||l._meta?.["mcp.mesh"]?.scopeName||"Unknown").toLowerCase()===i);return{logo:r?.icon||d[0]?.publisher_logo||d[0]?.icon||void 0,count:d.length}}function ht(t){const e=t.server._meta?.["mcp.mesh/publisher-provided"],r=t._meta?.["mcp.mesh"],n=t._meta?.["io.modelcontextprotocol.registry/official"],o=t.server,i=Xe(o.remotes?.[0]?.type),d=Ye(o.$schema),a=n?"io.modelcontextprotocol.registry/official":t.publisher||r?.scopeName||"Unknown",l=et(o.repository),f=t.icon||t.image||t.logo||o.icons?.[0]?.src||l||null,g=t.name||t.title||t.server?.title||"Unnamed Item",h=tt(g),u=r?.friendly_name||h,x=r?.mesh_description||t.description||t.summary||o?.description||"",p=r?.short_description||null,b=r?.tags||[],j=r?.categories||[];return{name:u,description:x,shortDescription:p,icon:f,verified:t.verified||r?.verified,publisher:a,version:o.version||null,websiteUrl:o.websiteUrl||null,repository:o.repository||null,schemaVersion:d??null,connectionType:i,connectionUrl:null,remoteUrl:null,tags:b,categories:j,tools:t.tools||o.tools||e?.tools||[],models:t.models||o.models||e?.models||[],emails:t.emails||o.emails||e?.emails||[],analytics:t.analytics||o.analytics||e?.analytics,cdn:t.cdn||o.cdn||e?.cdn}}class gt extends E.Component{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,r){console.error("Store MCP server detail error:",e,r)}render(){return this.state.hasError?s.jsx(ot,{error:this.state.error||new Error("Unknown error"),onBack:this.props.onBack}):this.props.children}}function bt(){const t=P.c(70),{org:e}=Ne(),r=ve();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const{appName:o}=Te(n);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},t[1]=i):i=t[1];const{registryId:d,serverName:a}=_e(i),[l,f]=E.useState("readme"),g=De(),h=Ee(),{data:u}=Me.useSession(),x=We(h),p=d||x[0]?.id||"",b=$e(p),j=Je(b?.tools),w=b?.tools&&b.tools.find(Ct)?.name||"",S=b?.tools&&b.tools.find(Nt)?.name||"",k=Ue(p),T=!!a;let y,_;T?(y=w||S,_={name:a}):(y=j,_={});const{data:m}=He({toolCaller:k,toolName:y,toolInputParams:_,scope:p});let N=[],I=[],xe=null;if(m){if(Array.isArray(m))N=m;else if(typeof m=="object"&&m!==null)if("totalCount"in m&&typeof m.totalCount=="number"&&(xe=m.totalCount),"item"in m&&m.item){const c=m.item,M=c.id||"",$=c.server,U=c._meta;let D;t[2]!==c.title||t[3]!==M||t[4]!==$||t[5]!==U?(D=[{id:M,title:c.title,server:$,_meta:U}],t[2]=c.title,t[3]=M,t[4]=$,t[5]=U,t[6]=D):D=t[6],N=D}else{let c;"versions"in m&&Array.isArray(m.versions)?c="versions":"servers"in m&&Array.isArray(m.servers)?c="servers":c=Object.keys(m).find(M=>Array.isArray(m[M])),c&&(N=m[c],(c==="versions"||y?.includes("VERSIONS"))&&(I=N))}}let X;t[7]!==o?(X=c=>{const M=c.name||c.title||c.server.title||"";return qe(M)===o},t[7]=o,t[8]=X):X=t[8];let C=N.find(X);if(!C&&a){let c;t[9]!==a?(c=M=>M.server.name===a||M.name===a||M.title===a,t[9]=a,t[10]=c):c=t[10],C=N.find(c)}const v=C?ht(C):null,le=(v?.tools?.length||0)>0,ae=C?.server?.remotes?.[0]?.url||null,J=!le&&!!ae,Q=Ze({url:J?ae:""}),Y=J&&Q.state==="connecting";let ee;t[11]!==Q||t[12]!==J?(ee=J&&Q.state==="ready"?(Q.tools||[]).map(yt):[],t[11]=Q,t[12]=J,t[13]=ee):ee=t[13];const pe=ee,V=le?v?.tools||[]:pe,Se=xt(h,v?.publisher),ce=v?pt(N,v.publisher,Se,b??null,xe):{count:0},ke=v?.repository?Qe(v.repository):null,de=!!v?.repository&&!!ke;let R;t[14]!==de?(R={id:"readme",label:"README",visible:de},t[14]=de,t[15]=R):R=t[15];const me=le||pe.length>0||Y&&!!ae;let z;t[16]!==V.length||t[17]!==me?(z={id:"tools",label:"Tools",count:V.length,visible:me},t[16]=V.length,t[17]=me,t[18]=z):z=t[18];let te;t[19]!==R||t[20]!==z?(te=[R,z].filter(jt),t[19]=R,t[20]=z,t[21]=te):te=t[21];const L=te;let se;t[22]!==l||t[23]!==L?(se=L.find(c=>c.id===l)?l:L.find(vt)?.id||L[0]?.id||"overview",t[22]=l,t[23]=L,t[24]=se):se=t[24];const fe=se;let re;t[25]!==g||t[26]!==I||t[27]!==r||t[28]!==e||t[29]!==C||t[30]!==u?(re=async c=>{const M=I[c??0]||C;if(!M||!e||!u?.user?.id)return;const $=Ke(M,e.id,u.user.id);if(!$.connection_url){he.error("This MCP Server cannot be connected: no connection URL available");return}try{const{id:U}=await g.create.mutateAsync($);r({to:"/$org/mcps/$connectionId",params:{org:e.slug,connectionId:U}})}catch(U){const D=U;he.error(`Failed to connect MCP Server: ${D instanceof Error?D.message:String(D)}`)}},t[25]=g,t[26]=I,t[27]=r,t[28]=e,t[29]=C,t[30]=u,t[31]=re):re=t[31];const ue=re;let oe;t[32]!==r||t[33]!==e.slug?(oe=()=>{r({to:"/$org/store",params:{org:e.slug}})},t[32]=r,t[33]=e.slug,t[34]=oe):oe=t[34];const A=oe;if(!C){let c;return t[35]!==A?(c=s.jsx(nt,{onBack:A}),t[35]=A,t[36]=c):c=t[36],c}if(!v)return null;const B=(C?.server?.remotes?.length??0)>0;let G;t[37]!==A?(G=s.jsx(it,{onBack:A}),t[37]=A,t[38]=G):G=t[38];let F;t[39]!==B?(F=!B&&s.jsxs("div",{className:"mb-6 p-4 bg-amber-50 border border-amber-200 rounded-lg text-sm text-amber-900",children:[s.jsx(st,{size:16,className:"inline mr-2"}),"This MCP Server cannot be connected - no connection method available."]}),t[39]=B,t[40]=F):F=t[40];let O;t[41]!==I||t[42]!==C?(O=I.length>0?I:[C],t[41]=I,t[42]=C,t[43]=O):O=t[43];let W;t[44]!==g.create.isPending||t[45]!==B||t[46]!==v||t[47]!==ue||t[48]!==O?(W=s.jsx(lt,{data:v,itemVersions:O,onInstall:ue,canInstall:B,isInstalling:g.create.isPending}),t[44]=g.create.isPending,t[45]=B,t[46]=v,t[47]=ue,t[48]=O,t[49]=W):W=t[49];let H;t[50]!==v||t[51]!==ce||t[52]!==C?(H=s.jsx(ct,{data:v,publisherInfo:ce,selectedItem:C}),t[50]=v,t[51]=ce,t[52]=C,t[53]=H):H=t[53];let Z;t[54]!==L||t[55]!==v||t[56]!==fe||t[57]!==V||t[58]!==Y?(Z=s.jsx(ft,{data:v,availableTabs:L,effectiveActiveTabId:fe,effectiveTools:V,isLoadingTools:Y,onTabChange:f}),t[54]=L,t[55]=v,t[56]=fe,t[57]=V,t[58]=Y,t[59]=Z):Z=t[59];let K;t[60]!==H||t[61]!==Z?(K=s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 min-h-[677px]",children:[H,Z]}),t[60]=H,t[61]=Z,t[62]=K):K=t[62];let q;t[63]!==F||t[64]!==W||t[65]!==K?(q=s.jsx("div",{className:"flex-1 overflow-y-auto h-full",children:s.jsx("div",{className:"h-full",children:s.jsxs("div",{className:"h-full",children:[F,W,K]})})}),t[63]=F,t[64]=W,t[65]=K,t[66]=q):q=t[66];let ne;return t[67]!==G||t[68]!==q?(ne=s.jsxs("div",{className:"flex flex-col h-full border-l border-border",children:[G,q]}),t[67]=G,t[68]=q,t[69]=ne):ne=t[69],ne}function vt(t){return t.id==="readme"}function jt(t){return t.visible}function yt(t){return{name:t.name,description:t.description}}function Nt(t){return t.name.endsWith("_GET")}function Ct(t){return t.name.endsWith("_VERSIONS")}function ns(){const t=P.c(6),{org:e}=Ne(),r=ve();let n;t[0]!==r||t[1]!==e.slug?(n=()=>{r({to:"/$org/store",params:{org:e.slug}})},t[0]=r,t[1]=e.slug,t[2]=n):n=t[2];const o=n;let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(E.Suspense,{fallback:s.jsx(rt,{}),children:s.jsx(bt,{})}),t[3]=i):i=t[3];let d;return t[4]!==o?(d=s.jsx(gt,{onBack:o,children:i}),t[4]=o,t[5]=d):d=t[5],d}export{ns as default};
@@ -1 +0,0 @@
1
- import{a3 as ae,r as K,c as O,p as ce,K as X,ao as de,j as s,h as se,a as me,i as fe,q as ue}from"./index-CFqw5CAk.js";import{b as xe,c as pe}from"./well-known-mcp-D13f-8h2.js";import{C as ge}from"./collection-header-BAGohiuL.js";import{I as he,i as le}from"./FilterLines-D_oBG_mT.js";import{n as je}from"./Inbox01-DKJqmGhJ.js";import{i as U}from"./Loading01-BFMDuD9f.js";import{c as ve,I as Ne,i as re,d as ye,b as ie,E as Ce,u as be}from"./use-connection-BPzhCo7m.js";import{f as Se,g as we,a as Te,b as Ie}from"./github-icon-BrF3LMLL.js";import{b as ke,T as Re,c as $e,i as ze,u as Z}from"./project-context-provider-C7-HmBKu.js";import{s as Le}from"./slugify-CEUa2lfQ.js";import{C as Pe}from"./collection-search-Bt7hJb44.js";import{i as Fe}from"./Lock01-B2Dlj0_A.js";import{C as Ae}from"./card-D7kEypvP.js";import{e as Ee}from"./app-name-gTETL9So.js";import{B as G,I as De}from"./input-BSDBSyke.js";import{P as Ke,a as Ve,b as Be}from"./popover-DGwJ1U8B.js";import{t as Me}from"./ChevronDown-BIixgdXr.js";import{s as Q}from"./XClose-yLguPztf.js";import{d as _e,a as Oe,b as We,c as qe,S as Ge}from"./select-DLPmxXDW.js";import{s as He}from"./Plus-DCJuRkSA.js";import{a as Qe}from"./use-binding-D77gExDp.js";import{L as Ue,u as Ye}from"./localstorage-keys-DnYi5wZr.js";import"./collection-display-button-6se5sKw0.js";import"./dropdown-menu-DH78LFXJ.js";import"./ChevronRight-XFvS51AW.js";import"./Grid01-D8szKORD.js";import"./view-mode-toggle-DPmK0pgy.js";import"./auth-CS1Cey1o.js";import"./useQuery-DV_L-E86.js";function Ze(t,e){return ae(t,he,e)}const ne=({size:t=24,color:e="currentColor",...l})=>K.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},K.createElement("path",{d:"m9 12 2 2 4.5-4.5m2.401-4.501a2.03 2.03 0 0 0 1.1 1.1l1.744.723a2.033 2.033 0 0 1 1.1 2.656l-.722 1.744a2.03 2.03 0 0 0 0 1.556l.722 1.744a2.033 2.033 0 0 1-1.1 2.656L19 17.901A2.033 2.033 0 0 0 17.9 19l-.723 1.745a2.032 2.032 0 0 1-2.656 1.1l-1.744-.722a2.032 2.032 0 0 0-1.555 0l-1.745.723a2.033 2.033 0 0 1-2.654-1.1L6.1 19.001A2.033 2.033 0 0 0 5 17.9l-1.744-.723a2.033 2.033 0 0 1-1.1-2.654l.721-1.744a2.033 2.033 0 0 0 0-1.556l-.722-1.746a2.033 2.033 0 0 1 1.1-2.657L5 6.098A2.03 2.03 0 0 0 6.1 5l.723-1.745a2.033 2.033 0 0 1 2.656-1.1l1.744.722a2.033 2.033 0 0 0 1.555-.001l1.746-.72a2.032 2.032 0 0 1 2.655 1.1l.723 1.746v-.003Z"}));ne.displayName="CheckVerified02";function Je(t,e){const l=O.c(4),[c,o]=K.useState(t),r=K.useRef(null),a=K.useRef(!0);let i,g;return l[0]!==e||l[1]!==t?(i=()=>{if(a.current){a.current=!1;return}return r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{o(t)},e),()=>{r.current&&clearTimeout(r.current)}},g=[t,e],l[0]=e,l[1]=t,l[2]=i,l[3]=g):(i=l[2],g=l[3]),K.useEffect(i,g),c}const Xe=24;function et(t){const e=O.c(52),{registryId:l,listToolName:c,filtersToolName:o,search:r}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],e[0]=a):a=e[0];const[i,g]=K.useState(a);let u;e[1]===Symbol.for("react.memo_cache_sentinel")?(u=[],e[1]=u):u=e[1];const[d,n]=K.useState(u);let x;e[2]!==l?(x=ve(l),e[2]=l,e[3]=x):x=e[3];const m=x,p=!!o;let j;e[4]!==o||e[5]!==l?(j=X.toolCall(l,o||"no-filters","{}"),e[4]=o,e[5]=l,e[6]=j):j=e[6];let y;e[7]!==o||e[8]!==m?(y=async()=>o?await m(o,{}):{tags:[],categories:[]},e[7]=o,e[8]=m,e[9]=y):y=e[9];let k;e[10]!==j||e[11]!==y?(k={queryKey:j,queryFn:y,staleTime:36e5},e[10]=j,e[11]=y,e[12]=k):k=e[12];const{data:T}=ce(k);let S,C,I;if(e[13]!==c||e[14]!==l||e[15]!==r||e[16]!==d||e[17]!==i){const M=r?.trim()?{operator:"or",conditions:[{field:["name"],operator:"contains",value:r},{field:["title"],operator:"contains",value:r},{field:["description"],operator:"contains",value:r}]}:void 0;S={limit:Xe,...i.length>0&&{tags:i},...d.length>0&&{categories:d},...M&&{where:M}},I=Ze,C=X.toolCall(l,c,JSON.stringify(S)),e[13]=c,e[14]=l,e[15]=r,e[16]=d,e[17]=i,e[18]=S,e[19]=C,e[20]=I}else S=e[18],C=e[19],I=e[20];let N;e[21]!==S||e[22]!==c||e[23]!==m?(N=async M=>{const{pageParam:J}=M,oe=J?{...S,cursor:J}:S;return await m(c,oe)},e[21]=S,e[22]=c,e[23]=m,e[24]=N):N=e[24];let b;e[25]!==C||e[26]!==N?(b={queryKey:C,queryFn:N,initialPageParam:void 0,getNextPageParam:tt,staleTime:36e5,placeholderData:de},e[25]=C,e[26]=N,e[27]=b):b=e[27];const{data:R,fetchNextPage:$,hasNextPage:L,isFetchingNextPage:P,isFetching:f,isLoading:h}=I(b);let w;e:{if(!R?.pages||R.pages.length===0){w=null;break e}const M=R.pages[0];if(typeof M=="object"&&M!==null&&"totalCount"in M&&typeof M.totalCount=="number"){w=M.totalCount;break e}w=null}const z=w,F=R?.pages;let v;e[28]!==F?(v=Se(F),e[28]=F,e[29]=v):v=e[29];const E=v;let A;e[30]!==r||e[31]!==d.length||e[32]!==i.length?(A=i.length>0||d.length>0||!!r?.trim(),e[30]=r,e[31]=d.length,e[32]=i.length,e[33]=A):A=e[33];const D=A,_=f&&!P&&!h&&D;let W;e[34]!==$||e[35]!==L||e[36]!==P?(W=()=>{L&&!P&&$()},e[34]=$,e[35]=L,e[36]=P,e[37]=W):W=e[37];const V=W,B=L??!1,q=p?T?.tags:void 0,Y=p?T?.categories:void 0;let H;return e[38]!==D||e[39]!==f||e[40]!==P||e[41]!==_||e[42]!==h||e[43]!==E||e[44]!==V||e[45]!==d||e[46]!==i||e[47]!==B||e[48]!==q||e[49]!==Y||e[50]!==z?(H={items:E,totalCount:z,hasMore:B,isLoadingMore:P,isFiltering:_,isInitialLoading:h,isFetching:f,loadMore:V,availableTags:q,availableCategories:Y,selectedTags:i,selectedCategories:d,setSelectedTags:g,setSelectedCategories:n,hasActiveFilters:D},e[38]=D,e[39]=f,e[40]=P,e[41]=_,e[42]=h,e[43]=E,e[44]=V,e[45]=d,e[46]=i,e[47]=B,e[48]=q,e[49]=Y,e[50]=z,e[51]=H):H=e[51],H}function tt(t){if(typeof t=="object"&&t!==null){const e=t.nextCursor||t.cursor;if(e)return e}}function st(t){const e=t.title||t.server.title||t.id||"Unnamed Item",l=t._meta?.["mcp.mesh"],c=l?.short_description||l?.mesh_description||t.server.description||null,o=t.server.icons?.[0]?.src||we(t.server.repository)||null,r=l?.verified??!1,a=t.server.version,g=(t.server.remotes?.length??0)>0;let u=e,d=null;if(e.includes("/")){const n=e.split("/");n.length>=2&&(d=n[0]||null,u=Ee(e))}if(!d){const n=l?.scopeName,x=l?.appName;n&&x?d=`${n}/${x}`:n&&(d=n)}return l?.friendly_name&&(u=l.friendly_name),{icon:o,scopeName:d,displayName:u,description:c,version:a||null,isVerified:r,canInstall:g}}function lt(t){const e=O.c(39),{icon:l,scopeName:c,displayName:o,description:r,isVerified:a,canInstall:i,onClick:g}=t;let u;e[0]!==o||e[1]!==l?(u=s.jsx(Ne,{icon:l,name:o,size:"md",className:"shadow-sm"}),e[0]=o,e[1]=l,e[2]=u):u=e[2];let d;e[3]!==o?(d=s.jsx("span",{className:"truncate",children:o}),e[3]=o,e[4]=d):d=e[4];let n;e[5]!==a?(n=a&&s.jsx(ne,{size:16,className:"text-success shrink-0"}),e[5]=a,e[6]=n):n=e[6];let x;e[7]!==i?(x=!i&&s.jsx(Fe,{size:16,className:"text-muted-foreground shrink-0"}),e[7]=i,e[8]=x):x=e[8];let m;e[9]!==d||e[10]!==n||e[11]!==x?(m=s.jsx(ke,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-2 text-base font-medium min-w-0",children:[d,n,x]})}),e[9]=d,e[10]=n,e[11]=x,e[12]=m):m=e[12];let p;e[13]!==o?(p=s.jsx("p",{children:o}),e[13]=o,e[14]=p):p=e[14];let j;e[15]!==i?(j=!i&&s.jsx("p",{className:"text-xs mt-1",children:"No connection available"}),e[15]=i,e[16]=j):j=e[16];let y;e[17]!==p||e[18]!==j?(y=s.jsxs(Re,{children:[p,j]}),e[17]=p,e[18]=j,e[19]=y):y=e[19];let k;e[20]!==m||e[21]!==y?(k=s.jsxs($e,{children:[m,y]}),e[20]=m,e[21]=y,e[22]=k):k=e[22];let T;e[23]!==c?(T=c&&s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:c}),e[23]=c,e[24]=T):T=e[24];let S;e[25]!==T||e[26]!==k?(S=s.jsx("div",{className:"flex gap-2 items-start min-w-0 flex-1",children:s.jsxs("div",{className:"min-w-0 flex-1",children:[k,T]})}),e[25]=T,e[26]=k,e[27]=S):S=e[27];let C;e[28]!==u||e[29]!==S?(C=s.jsxs("div",{className:"flex gap-3",children:[u,S]}),e[28]=u,e[29]=S,e[30]=C):C=e[30];const I=r||"No description available";let N;e[31]!==I?(N=s.jsx("div",{className:"grid grid-cols-1 gap-1 min-w-0",children:s.jsx("div",{className:"text-sm text-muted-foreground line-clamp-2",children:I})}),e[31]=I,e[32]=N):N=e[32];let b;e[33]!==C||e[34]!==N?(b=s.jsxs("div",{className:"flex flex-col gap-4 h-full relative",children:[C,N]}),e[33]=C,e[34]=N,e[35]=b):b=e[35];let R;return e[36]!==g||e[37]!==b?(R=s.jsx(Ae,{className:"p-6 cursor-pointer hover:bg-muted/50 transition-colors",onClick:g,children:b}),e[36]=g,e[37]=b,e[38]=R):R=e[38],R}function ee(t){const e=O.c(12),{items:l,title:c,onItemClick:o}=t;if(l.length===0)return null;let r;e[0]!==c?(r=c&&s.jsx("div",{className:"flex items-center justify-between w-max gap-2",children:s.jsx("h2",{className:"text-lg font-medium",children:c})}),e[0]=c,e[1]=r):r=e[1];let a;if(e[2]!==l||e[3]!==o){let u;e[5]!==o?(u=d=>{const n=st(d);return s.jsx(lt,{...n,onClick:()=>o(d)},d.id)},e[5]=o,e[6]=u):u=e[6],a=l.map(u),e[2]=l,e[3]=o,e[4]=a}else a=e[4];let i;e[7]!==a?(i=s.jsx("div",{className:"grid grid-cols-4 gap-4",children:a}),e[7]=a,e[8]=i):i=e[8];let g;return e[9]!==r||e[10]!==i?(g=s.jsxs("div",{className:"flex flex-col gap-4",children:[r,i]}),e[9]=r,e[10]=i,e[11]=g):g=e[11],g}function rt(t,e){return[...t].sort((l,c)=>c.count-l.count).slice(0,e)}function te(t){const e=O.c(52),{label:l,items:c,selectedItems:o,onToggle:r,onClear:a}=t,[i,g]=K.useState(""),[u,d]=K.useState(!1);let n,x,m,p,j,y,k,T,S,C,I;if(e[0]!==c||e[1]!==l||e[2]!==r||e[3]!==u||e[4]!==i||e[5]!==o){const P=[...i?c.filter(A=>A.value.toLowerCase().includes(i.toLowerCase())):c].sort(it);m=o.length,x=Ke,S=u,C=d;let f;e[17]!==l?(f=s.jsx("span",{children:l}),e[17]=l,e[18]=f):f=e[18];let h;e[19]!==m?(h=m>0&&s.jsx("span",{className:"ml-1 rounded-full bg-primary text-primary-foreground px-1.5 py-0.5 text-[10px] font-medium",children:m}),e[19]=m,e[20]=h):h=e[20];let w;e[21]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Me,{size:14,className:"opacity-50"}),e[21]=w):w=e[21],e[22]!==h||e[23]!==f?(I=s.jsx(Ve,{asChild:!0,children:s.jsxs(G,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[f,h,w]})}),e[22]=h,e[23]=f,e[24]=I):I=e[24],n=Be,y="w-64 p-0",k="start";let z;e[25]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(re,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=z):z=e[25];let F;e[26]!==l?(F=l.toLowerCase(),e[26]=l,e[27]=F):F=e[27];const v=`Search ${F}...`;let E;e[28]===Symbol.for("react.memo_cache_sentinel")?(E=A=>g(A.target.value),e[28]=E):E=e[28],e[29]!==i||e[30]!==v?(T=s.jsx("div",{className:"shrink-0 w-full border-b border-border h-10",children:s.jsxs("label",{className:"flex items-center gap-2.5 h-10 px-4 cursor-text",children:[z,s.jsx(De,{type:"text",placeholder:v,value:i,onChange:E,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[29]=i,e[30]=v,e[31]=T):T=e[31],p="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",j=P.length===0?s.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):P.map(A=>{const D=o.includes(A.value);return s.jsxs("button",{onClick:()=>r(A.value),className:`w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors ${D?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"}`,children:[s.jsxs("span",{className:"truncate flex items-center gap-2",children:[D&&s.jsx(ze,{size:16,className:"text-muted-foreground shrink-0"}),A.value]}),s.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:A.count})]},A.value)}),e[0]=c,e[1]=l,e[2]=r,e[3]=u,e[4]=i,e[5]=o,e[6]=n,e[7]=x,e[8]=m,e[9]=p,e[10]=j,e[11]=y,e[12]=k,e[13]=T,e[14]=S,e[15]=C,e[16]=I}else n=e[6],x=e[7],m=e[8],p=e[9],j=e[10],y=e[11],k=e[12],T=e[13],S=e[14],C=e[15],I=e[16];let N;e[32]!==p||e[33]!==j?(N=s.jsx("div",{className:p,children:j}),e[32]=p,e[33]=j,e[34]=N):N=e[34];let b;e[35]!==l||e[36]!==a||e[37]!==m?(b=m>0&&s.jsx("div",{className:"p-2 border-t border-border",children:s.jsxs(G,{variant:"ghost",size:"sm",onClick:a,className:"w-full text-xs text-muted-foreground hover:text-foreground",children:["Clear ",l.toLowerCase()]})}),e[35]=l,e[36]=a,e[37]=m,e[38]=b):b=e[38];let R;e[39]!==n||e[40]!==b||e[41]!==y||e[42]!==k||e[43]!==T||e[44]!==N?(R=s.jsxs(n,{className:y,align:k,children:[T,N,b]}),e[39]=n,e[40]=b,e[41]=y,e[42]=k,e[43]=T,e[44]=N,e[45]=R):R=e[45];let $;return e[46]!==x||e[47]!==R||e[48]!==S||e[49]!==C||e[50]!==I?($=s.jsxs(x,{open:S,onOpenChange:C,children:[I,R]}),e[46]=x,e[47]=R,e[48]=S,e[49]=C,e[50]=I,e[51]=$):$=e[51],$}function it(t,e){return e.count-t.count}function nt(t){const e=O.c(67),{availableTags:l,availableCategories:c,selectedTags:o,selectedCategories:r,onTagChange:a,onCategoryChange:i}=t,g=l&&l.length>0||c&&c.length>0,u=o.length>0||r.length>0;if(!g)return null;let d;e[0]!==a||e[1]!==o?(d=f=>{o.includes(f)?a(o.filter(h=>h!==f)):a([...o,f])},e[0]=a,e[1]=o,e[2]=d):d=e[2];const n=d;let x;e[3]!==i||e[4]!==r?(x=f=>{r.includes(f)?i(r.filter(h=>h!==f)):i([...r,f])},e[3]=i,e[4]=r,e[5]=x):x=e[5];const m=x;let p;e[6]!==i||e[7]!==a?(p=()=>{a([]),i([])},e[6]=i,e[7]=a,e[8]=p):p=e[8];const j=p;let y,k,T,S,C,I,N;if(e[9]!==c||e[10]!==l||e[11]!==i||e[12]!==a||e[13]!==r||e[14]!==o||e[15]!==m||e[16]!==n){const f=c?rt(c,6):[];y=r,k=o,N=new Set(f.map(ot)),C="flex items-center border-b border-border";let h;e[24]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:s.jsx(le,{size:16})}),e[24]=h):h=e[24];let w;e[25]!==c||e[26]!==i||e[27]!==r||e[28]!==m?(w=c&&c.length>0&&s.jsx(te,{label:"Categories",items:c,selectedItems:r,onToggle:m,onClear:()=>i([])}),e[25]=c,e[26]=i,e[27]=r,e[28]=m,e[29]=w):w=e[29];let z;e[30]!==l||e[31]!==a||e[32]!==o||e[33]!==n?(z=l&&l.length>0&&s.jsx(te,{label:"Tags",items:l,selectedItems:o,onToggle:n,onClear:()=>a([])}),e[30]=l,e[31]=a,e[32]=o,e[33]=n,e[34]=z):z=e[34],e[35]!==z||e[36]!==w?(I=s.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[h,w,z]}),e[35]=z,e[36]=w,e[37]=I):I=e[37],T="flex items-center gap-3 flex-wrap px-5 py-3";let F;e[38]!==r||e[39]!==m?(F=v=>{const E=r.includes(v.value);return s.jsxs("div",{onClick:()=>m(v.value),className:`inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer ${E?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"}`,children:[s.jsx("span",{children:v.value}),E&&s.jsx("span",{onClick:A=>{A.stopPropagation(),m(v.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(Q,{size:12})})]},v.value)},e[38]=r,e[39]=m,e[40]=F):F=e[40],S=f.map(F),e[9]=c,e[10]=l,e[11]=i,e[12]=a,e[13]=r,e[14]=o,e[15]=m,e[16]=n,e[17]=y,e[18]=k,e[19]=T,e[20]=S,e[21]=C,e[22]=I,e[23]=N}else y=e[17],k=e[18],T=e[19],S=e[20],C=e[21],I=e[22],N=e[23];let b;if(e[41]!==y||e[42]!==m||e[43]!==N){let f;e[45]!==N?(f=w=>!N.has(w),e[45]=N,e[46]=f):f=e[46];let h;e[47]!==m?(h=w=>s.jsxs("div",{onClick:()=>m(w),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:w}),s.jsx("span",{onClick:z=>{z.stopPropagation(),m(w)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(Q,{size:12})})]},`cat-${w}`),e[47]=m,e[48]=h):h=e[48],b=y.filter(f).map(h),e[41]=y,e[42]=m,e[43]=N,e[44]=b}else b=e[44];let R;if(e[49]!==k||e[50]!==n){let f;e[52]!==n?(f=h=>s.jsxs("div",{onClick:()=>n(h),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:h}),s.jsx("span",{onClick:w=>{w.stopPropagation(),n(h)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(Q,{size:12})})]},`tag-${h}`),e[52]=n,e[53]=f):f=e[53],R=k.map(f),e[49]=k,e[50]=n,e[51]=R}else R=e[51];let $;e[54]!==j||e[55]!==u?($=u&&s.jsxs(G,{variant:"ghost",size:"sm",onClick:j,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[s.jsx(Q,{size:14}),"Clear all"]}),e[54]=j,e[55]=u,e[56]=$):$=e[56];let L;e[57]!==$||e[58]!==T||e[59]!==S||e[60]!==b||e[61]!==R?(L=s.jsxs("div",{className:T,children:[S,b,R,$]}),e[57]=$,e[58]=T,e[59]=S,e[60]=b,e[61]=R,e[62]=L):L=e[62];let P;return e[63]!==L||e[64]!==C||e[65]!==I?(P=s.jsxs("div",{className:C,children:[I,L]}),e[63]=L,e[64]=C,e[65]=I,e[66]=P):P=e[66],P}function ot(t){return t.value}function at(t,e){if(!e)return t;const l=e.toLowerCase();return t.filter(c=>(c.name||c.title||"").toLowerCase().includes(l)||(c.description||c.server.description||"").toLowerCase().includes(l))}function ct(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0||t.server._meta?.["mcp.mesh"]?.verified===!0}function dt(t){const e=O.c(51),{registryId:l,listToolName:c,filtersToolName:o}=t,[r,a]=K.useState(""),i=Je(r,300),g=se(),{org:u}=Z(),d=K.useRef(null);let n;e[0]!==i||e[1]!==o||e[2]!==c||e[3]!==l?(n={registryId:l,listToolName:c,filtersToolName:o,search:i},e[0]=i,e[1]=o,e[2]=c,e[3]=l,e[4]=n):n=e[4];const{items:x,hasMore:m,isLoadingMore:p,isInitialLoading:j,isFetching:y,loadMore:k,availableTags:T,availableCategories:S,selectedTags:C,selectedCategories:I,setSelectedTags:N,setSelectedCategories:b,hasActiveFilters:R}=et(n);let $,L,P,f;e[5]!==i||e[6]!==y||e[7]!==j||e[8]!==x||e[9]!==r?($=r?at(x,r):x,L=(r!==i||y)&&!j&&!!r,f=$.filter(ct),P=$.filter(V=>!f.find(B=>B.id===V.id)),e[5]=i,e[6]=y,e[7]=j,e[8]=x,e[9]=r,e[10]=$,e[11]=L,e[12]=P,e[13]=f):($=e[10],L=e[11],P=e[12],f=e[13]);const h=P;let w;e[14]!==g||e[15]!==u.slug||e[16]!==l?(w=V=>{const B=Le(V.name||V.title||V.server.title||""),q=V.server.name;g({to:"/$org/store/$appName",params:{org:u.slug,appName:B},search:{registryId:l,serverName:q}})},e[14]=g,e[15]=u.slug,e[16]=l,e[17]=w):w=e[17];const z=w;let F;e[18]!==m||e[19]!==p||e[20]!==k?(F=V=>{if(!m||p)return;const B=V.currentTarget;B.scrollHeight-B.scrollTop-B.clientHeight<200&&k()},e[18]=m,e[19]=p,e[20]=k,e[21]=F):F=e[21];const v=F;let E;e[22]!==L||e[23]!==r?(E=s.jsx(Pe,{value:r,onChange:a,placeholder:"Search for an MCP Server...",isSearching:L}),e[22]=L,e[23]=r,e[24]=E):E=e[24];let A;e[25]!==S||e[26]!==T||e[27]!==I||e[28]!==C||e[29]!==b||e[30]!==N?(A=s.jsx(nt,{availableTags:T,availableCategories:S,selectedTags:C,selectedCategories:I,onTagChange:N,onCategoryChange:b}),e[25]=S,e[26]=T,e[27]=I,e[28]=C,e[29]=b,e[30]=N,e[31]=A):A=e[31];let D;e[32]!==h||e[33]!==$||e[34]!==z||e[35]!==R||e[36]!==m||e[37]!==j||e[38]!==p||e[39]!==L||e[40]!==x||e[41]!==r||e[42]!==f?(D=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:j?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(U,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):x.length===0&&!R?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(je,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),s.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):x.length===0&&R&&!r?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No matching items"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to find more results."})]}):r&&$.length===0&&!L?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(re,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):s.jsxs("div",{className:"flex flex-col gap-8",children:[L&&$.length===0&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(U,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),f.length>0&&s.jsx(ee,{items:f,title:"Verified",onItemClick:z}),h.length>0&&s.jsx(ee,{items:h,title:f.length>0?"All":"",onItemClick:z}),m&&p&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(U,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[32]=h,e[33]=$,e[34]=z,e[35]=R,e[36]=m,e[37]=j,e[38]=p,e[39]=L,e[40]=x,e[41]=r,e[42]=f,e[43]=D):D=e[43];let _;e[44]!==v||e[45]!==D?(_=s.jsx("div",{ref:d,className:"flex-1 overflow-y-auto",onScroll:v,children:D}),e[44]=v,e[45]=D,e[46]=_):_=e[46];let W;return e[47]!==E||e[48]!==A||e[49]!==_?(W=s.jsxs("div",{className:"flex flex-col h-full",children:[E,A,_]}),e[47]=E,e[48]=A,e[49]=_,e[50]=W):W=e[50],W}function mt(t){const e=O.c(8),{registryId:l}=t,c=ye(l),o=c?.tools;let r;e[0]!==o?(r=Te(o),e[0]=o,e[1]=r):r=e[1];const a=r;if(!a)throw new Error("This registry does not support listing store items.");const i=c?.tools;let g;e[2]!==i?(g=Ie(i),e[2]=i,e[3]=g):g=e[3];const d=g||void 0;let n;return e[4]!==a||e[5]!==l||e[6]!==d?(n=s.jsx(dt,{registryId:l,listToolName:a,filtersToolName:d}),e[4]=a,e[5]=l,e[6]=d,e[7]=n):n=e[7],n}function ft(t){const e=O.c(15),{registries:l,value:c,onValueChange:o,onAddWellKnown:r,wellKnownRegistries:a,placeholder:i}=t,g=i===void 0?"Select a registry...":i;let u;e[0]!==g?(u=s.jsx(Oe,{size:"sm",className:"w-auto min-w-[160px]",children:s.jsx(We,{placeholder:g})}),e[0]=g,e[1]=u):u=e[1];let d;e[2]!==l?(d=l.map(ut),e[2]=l,e[3]=d):d=e[3];let n;e[4]!==r||e[5]!==a?(n=a.length>0&&s.jsxs("div",{className:"border-t border-border pt-1",children:[s.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),a.map(p=>s.jsxs("button",{onClick:j=>{j.preventDefault(),j.stopPropagation(),r(p)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[p.icon?s.jsx("img",{src:p.icon,alt:p.title,className:"w-4 h-4 rounded"}):s.jsx("div",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:p.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:p.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(He,{size:16})})]},p.id??p.title))]}),e[4]=r,e[5]=a,e[6]=n):n=e[6];let x;e[7]!==d||e[8]!==n?(x=s.jsxs(qe,{children:[d,n]}),e[7]=d,e[8]=n,e[9]=x):x=e[9];let m;return e[10]!==o||e[11]!==u||e[12]!==x||e[13]!==c?(m=s.jsxs(Ge,{value:c,onValueChange:o,children:[u,x]}),e[10]=o,e[11]=u,e[12]=x,e[13]=c,e[14]=m):m=e[14],m}function ut(t){return s.jsx(_e,{className:"cursor-pointer",value:t.id??t.name,children:s.jsxs("div",{className:"flex items-center gap-2",children:[t.icon?s.jsx("img",{src:t.icon,alt:t.name,className:"w-4 h-4 rounded"}):s.jsx("div",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:t.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:t.name})]})},t.id??t.name)}function xt({registries:t,onConnected:e}){const l=ie(),{org:{slug:c}}=Z(),{data:o}=me.useSession(),r=se(),[a,i]=K.useState(!1),g=t[0],u=async()=>{if(!(!g||!o?.user?.id)){i(!0);try{const n=await l.create.mutateAsync(g);e?.(n.id)}finally{i(!1)}}},d=()=>{r({to:"/$org/mcps",params:{org:c},search:{action:"create"}})};return s.jsx(Ce,{image:s.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:336,height:320,className:"max-w-full h-auto"}),title:"Connect to registry",description:"Connect to discover and use Connections from the community.",actions:s.jsxs(s.Fragment,{children:[s.jsxs(G,{variant:"outline",onClick:u,disabled:a||!g,children:[g?.icon&&s.jsx("img",{src:g.icon,alt:"",className:"size-4"}),a?"Installing...":"Install Registry"]}),s.jsx(G,{variant:"outline",onClick:d,children:"Custom Connection"})]})})}function Qt(){const t=O.c(41),{org:e}=Z(),l=be(),c=ie(),o=fe(),r=o.location.pathname.includes("/store/")&&o.location.pathname.split("/").length>3,a=Qe(l);let i;t[0]!==a?(i=a.map(ht),t[0]=a,t[1]=i):i=t[1];const g=i;let u;t[2]!==e.slug?(u=Ue.selectedRegistry(e.slug),t[2]=e.slug,t[3]=u):u=t[3];const[d,n]=Ye(u,gt);let x;if(t[4]!==a||t[5]!==d){let v;t[7]!==d?(v=E=>E.id===d,t[7]=d,t[8]=v):v=t[8],x=a.find(v),t[4]=a,t[5]=d,t[6]=x}else x=t[6];const p=x?.id||a[0]?.id||"";let j;t[9]!==e.id?(j=xe(e.id),t[9]=e.id,t[10]=j):j=t[10];let y;t[11]!==j?(y=[j],t[11]=j,t[12]=y):y=t[12];const k=y;let T;t[13]===Symbol.for("react.memo_cache_sentinel")?(T=[pe()],t[13]=T):T=t[13];const S=T;let C;t[14]!==c.create||t[15]!==n?(C=async v=>{const E=await c.create.mutateAsync(v);n(E.id)},t[14]=c.create,t[15]=n,t[16]=C):C=t[16];const I=C;let N;t[17]!==a?(N=new Set(a.map(pt)),t[17]=a,t[18]=N):N=t[18];const b=N;let R;t[19]!==b||t[20]!==k?(R=k.filter(v=>v.id&&!b.has(v.id)),t[19]=b,t[20]=k,t[21]=R):R=t[21];const $=R;let L;t[22]!==b?(L=S.filter(v=>v.id&&!b.has(v.id)),t[22]=b,t[23]=L):L=t[23];const P=L;if(r){let v;return t[24]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(ue,{}),t[24]=v):v=t[24],v}let f;t[25]!==I?(f=async v=>I(v),t[25]=I,t[26]=f):f=t[26];let h;t[27]!==$||t[28]!==p||t[29]!==g||t[30]!==n||t[31]!==f?(h=s.jsx(ge,{title:"Store",ctaButton:s.jsx(ft,{wellKnownRegistries:$,registries:g,value:p,onValueChange:n,onAddWellKnown:f,placeholder:"Select store..."})}),t[27]=$,t[28]=p,t[29]=g,t[30]=n,t[31]=f,t[32]=h):h=t[32];let w;t[33]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(U,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),t[33]=w):w=t[33];let z;t[34]!==P||t[35]!==p||t[36]!==n?(z=s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:s.jsx(K.Suspense,{fallback:w,children:p?s.jsx(mt,{registryId:p}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(xt,{registries:P,onConnected:v=>{n(v)}})})})}),t[34]=P,t[35]=p,t[36]=n,t[37]=z):z=t[37];let F;return t[38]!==h||t[39]!==z?(F=s.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[h,z]}),t[38]=h,t[39]=z,t[40]=F):F=t[40],F}function pt(t){return t.id}function gt(t){return t??""}function ht(t){return{id:t.id,name:t.title,icon:t.icon||void 0}}export{Qt as default};
@@ -1 +0,0 @@
1
- import{a3 as u,ap as s}from"./index-CFqw5CAk.js";function o(e,r){return u(e,s,r)}export{o as u};