@decocms/mesh 1.0.21 → 1.0.22
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.
- package/dist/client/assets/{AlertCircle-CkBPRGL_.js → AlertCircle-Du1WT751.js} +1 -1
- package/dist/client/assets/{ArrowLeft-eDq0PdxL.js → ArrowLeft-D2XEhobZ.js} +1 -1
- package/dist/client/assets/{Calendar-GsuMeXnI.js → Calendar-Co6ako3r.js} +1 -1
- package/dist/client/assets/{ChevronDown-CqrF2uJ-.js → ChevronDown-BTsoCUlX.js} +1 -1
- package/dist/client/assets/{Clock-d43uwP0y.js → Clock-DaV6oMqF.js} +1 -1
- package/dist/client/assets/{Copy01-CUqgUCLS.js → Copy01-DK5159Rb.js} +1 -1
- package/dist/client/assets/{CpuChip02-CwrVudRE.js → CpuChip02-DG7E5vjX.js} +1 -1
- package/dist/client/assets/{DotsVertical-CGWni397.js → DotsVertical-ATvueeDl.js} +1 -1
- package/dist/client/assets/{File06-CwcvFGqd.js → File06-CCcPYdcS.js} +1 -1
- package/dist/client/assets/{GitBranch01-B0LIL7GO.js → GitBranch01-DdBZ2zon.js} +1 -1
- package/dist/client/assets/{Inbox01-De35FSLT.js → Inbox01-FsIho9ps.js} +1 -1
- package/dist/client/assets/{InfoCircle-CaOedrxe.js → InfoCircle-z9SmeZ2K.js} +1 -1
- package/dist/client/assets/{Key01-BXtnSDND.js → Key01-PJxsN9f2.js} +1 -1
- package/dist/client/assets/{LinkExternal01-ClKXW-wQ.js → LinkExternal01-UPDE0V2O.js} +1 -1
- package/dist/client/assets/{Loading01-DfUJLT5a.js → Loading01-CH6mw7mn.js} +1 -1
- package/dist/client/assets/{Lock01-mcQuD2fk.js → Lock01-DfYPtjUw.js} +1 -1
- package/dist/client/assets/{Plus-xQLsl9Xg.js → Plus-D2stpxr4.js} +1 -1
- package/dist/client/assets/{SearchMd-BAWY3jJ1.js → SearchMd-CwAqtJqG.js} +1 -1
- package/dist/client/assets/{Terminal-CJwUlnBn.js → Terminal-zrKj2_VN.js} +1 -1
- package/dist/client/assets/{Trash01-DAwkJNu8.js → Trash01-BRxmwmD1.js} +1 -1
- package/dist/client/assets/{Upload01-5z8SDkNm.js → Upload01-CGDUyeg3.js} +1 -1
- package/dist/client/assets/{X-SWur-HdE.js → X-E7J_uWRT.js} +1 -1
- package/dist/client/assets/{XClose-CAyc7YMv.js → XClose-BGxDstvO.js} +1 -1
- package/dist/client/assets/{alert-dialog-dauOR89q.js → alert-dialog-CxYBxRCI.js} +2 -2
- package/dist/client/assets/auth-TMT6XsET.js +1 -0
- package/dist/client/assets/{auth-catchall-L0DhXNi0.js → auth-catchall-DkkFwJAm.js} +1 -1
- package/dist/client/assets/avatar-F70el86e.js +1 -0
- package/dist/client/assets/{badge-DBsMMhww.js → badge-BcTlBuEb.js} +1 -1
- package/dist/client/assets/{button-UpWqqi7Z.js → button-Dj8ueofv.js} +1 -1
- package/dist/client/assets/{card-csaWOT-1.js → card-66QSeiOF.js} +1 -1
- package/dist/client/assets/{checkbox-B53QAVdc.js → checkbox-CVcef9O7.js} +1 -1
- package/dist/client/assets/{collection-detail-DU4x4vE8.js → collection-detail-D8wVTEqX.js} +1 -1
- package/dist/client/assets/{collection-display-button-CJMwmXuc.js → collection-display-button-C193PAy9.js} +1 -1
- package/dist/client/assets/{collection-header-BIZLVBPH.js → collection-header-BuFCeK4g.js} +1 -1
- package/dist/client/assets/{collection-page-CpTNB-W7.js → collection-page-M_cHcDoQ.js} +1 -1
- package/dist/client/assets/{collection-search-xvAQUbQ8.js → collection-search-Vq1GfSWB.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BLpgESGM.js → collection-table-wrapper-BCXAi-BN.js} +1 -1
- package/dist/client/assets/{connection-card-DIVWkbya.js → connection-card-BsnAC2N8.js} +1 -1
- package/dist/client/assets/connection-detail-R_iXfPNX.js +1 -0
- package/dist/client/assets/connections-DYIPJTN9.js +1 -0
- package/dist/client/assets/{core-Cy6-sfQL.js → core-DKy85ot6.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-BpD_WYLu.js → create-organization-dialog-Dc45BpM3.js} +1 -1
- package/dist/client/assets/{dialog-DQ_m9LgP.js → dialog-Dcux2Ttt.js} +1 -1
- package/dist/client/assets/{dropdown-menu-B_pozn9G.js → dropdown-menu-BUANjhM2.js} +1 -1
- package/dist/client/assets/env-vars-editor-Cmi8ii-i.js +1 -0
- package/dist/client/assets/{error-boundary-07xTy_TK.js → error-boundary-BaDP7Z4Q.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DzWc2H-V.js → extract-connection-data-BD7XgNcV.js} +1 -1
- package/dist/client/assets/{form-CGaxh2WC.js → form-D1QOQ8Im.js} +1 -1
- package/dist/client/assets/{formatDistanceToNow-BzQ8Uo3Q.js → formatDistanceToNow-BZKDch9X.js} +1 -1
- package/dist/client/assets/gateway-detail-BruHhfdQ.js +1 -0
- package/dist/client/assets/{gateways-B-RGUqRx.js → gateways-MFtOEWry.js} +1 -1
- package/dist/client/assets/{home-FzIxjpJt.js → home-CfjYes5U.js} +1 -1
- package/dist/client/assets/{index-CB7OHJDJ.js → index-B-Y0sZwN.js} +1 -1
- package/dist/client/assets/index-BdkjLo3e.css +1 -0
- package/dist/client/assets/{index-Czm7CWjK.js → index-CXfjFAB2.js} +1 -1
- package/dist/client/assets/{index-D_TAlzS2.js → index-D7vBid7X.js} +1 -1
- package/dist/client/assets/{index-D_9U2egr.js → index-DkE856zJ.js} +3 -3
- package/dist/client/assets/{input-DNanPJKs.js → input-C2Ph-V5_.js} +1 -1
- package/dist/client/assets/json-DVnNOwmi.js +1 -0
- package/dist/client/assets/{json-syntax-highlighter-BgGlXkoS.js → json-syntax-highlighter-B4SQlh57.js} +2 -2
- package/dist/client/assets/{layout-Cx9b8Yer.js → layout-DqSCBByW.js} +1 -1
- package/dist/client/assets/{lazy-highlighter-B6ffJp-C.js → lazy-highlighter-BZxAEkAn.js} +1 -1
- package/dist/client/assets/{localstorage-keys-BkdyiQZF.js → localstorage-keys-BdgFgIfr.js} +1 -1
- package/dist/client/assets/{login-C7pFWDVX.js → login-CjvCnOTd.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C_ge4NPz.js → mcp-oauth-BRLf6SSt.js} +1 -1
- package/dist/client/assets/members-qDc7lURh.js +3 -0
- package/dist/client/assets/monitoring-B3MEXlZy.js +1 -0
- package/dist/client/assets/{oauth-callback-DVsq0aWr.js → oauth-callback-DRBgoMZ7.js} +1 -1
- package/dist/client/assets/{page-lDA0jUjQ.js → page-BQFA7pBB.js} +1 -1
- package/dist/client/assets/popover-B5X6Vli5.js +1 -0
- package/dist/client/assets/prism-light-BeJZ3zKA.js +1 -0
- package/dist/client/assets/{resizable-CjAFAEbu.js → resizable-D_GRD1gk.js} +3 -3
- package/dist/client/assets/{resource-tabs-CwnllnxC.js → resource-tabs-BeL7wdCw.js} +1 -1
- package/dist/client/assets/select-DIsljPdj.js +1 -0
- package/dist/client/assets/{settings-B33ucW8T.js → settings-D0j6CjB5.js} +1 -1
- package/dist/client/assets/{shell-layout-D2VG1r1F.js → shell-layout-CdA9l5Mv.js} +1 -1
- package/dist/client/assets/{spinner-mwkhkfGn.js → spinner-TVmB-5qD.js} +1 -1
- package/dist/client/assets/{store-bCSxhgbO.js → store-Dg8rXQqH.js} +1 -1
- package/dist/client/assets/{store-app-detail-MMa90jUl.js → store-app-detail-BaLRva6m.js} +1 -1
- package/dist/client/assets/switch-Zc7AToJx.js +1 -0
- package/dist/client/assets/{tools-list-ReDr32oC.js → tools-list-D_OD1vn5.js} +1 -1
- package/dist/client/assets/tooltip-CNuF1S13.js +1 -0
- package/dist/client/assets/{types-C7Od-bBc.js → types-BFTKKK_w.js} +1 -1
- package/dist/client/assets/{use-binding-q2q9V0d9.js → use-binding-Dx0VfUue.js} +6 -6
- package/dist/client/assets/{use-connection-CCY0Xwwp.js → use-connection-B9P3V0a0.js} +1 -1
- package/dist/client/assets/{use-connection-resources-CQX8IZC3.js → use-connection-resources-BzPnvL0L.js} +1 -1
- package/dist/client/assets/{use-gateway-6PKj5OoP.js → use-gateway-DynzgasG.js} +1 -1
- package/dist/client/assets/{use-list-state-C-sROL5p.js → use-list-state-DLhjJXJo.js} +1 -1
- package/dist/client/assets/{use-mcp-W5evRIL-.js → use-mcp-B4HuTx_L.js} +1 -1
- package/dist/client/assets/{use-members-DBU71Me9.js → use-members-8RC-uoxQ.js} +1 -1
- package/dist/client/assets/{use-mobile-DjZ7nTWx.js → use-mobile-BtxRZpBG.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Du1vfsWT.js → use-organization-settings-D16HeZQR.js} +1 -1
- package/dist/client/assets/{use-tool-call-DTxbLF2G.js → use-tool-call-Betk01yc.js} +1 -1
- package/dist/client/assets/useQuery-BDcaqn5m.js +1 -0
- package/dist/client/assets/{useSuspenseInfiniteQuery-6jf87YQF.js → useSuspenseInfiniteQuery-DHmfnsAy.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BWA1OFcI.js → view-mode-toggle-CIqr2uxV.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +128 -128
- package/dist/server/migrate.js +87 -87
- package/dist/server/server.js +121 -121
- package/package.json +1 -1
- package/dist/client/assets/auth-Ds7lWA5K.js +0 -1
- package/dist/client/assets/avatar-CB7RLPFt.js +0 -1
- package/dist/client/assets/connection-detail-Cdicu8TT.js +0 -1
- package/dist/client/assets/connections-BYIPhseC.js +0 -1
- package/dist/client/assets/env-vars-editor-DcIkv_3p.js +0 -1
- package/dist/client/assets/gateway-detail-DOKwn-_O.js +0 -1
- package/dist/client/assets/index-DNC-5MRZ.css +0 -1
- package/dist/client/assets/json-rZ-8IzF3.js +0 -1
- package/dist/client/assets/members-g3aHOb_a.js +0 -3
- package/dist/client/assets/monitoring-B4Jp1FeK.js +0 -1
- package/dist/client/assets/popover-BN78TD4M.js +0 -1
- package/dist/client/assets/prism-light-B_WmfTLI.js +0 -1
- package/dist/client/assets/select-888i9ck2.js +0 -1
- package/dist/client/assets/switch-CxdnIT30.js +0 -1
- package/dist/client/assets/tooltip-CaoJSXa7.js +0 -1
- package/dist/client/assets/useQuery-BTda2D25.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as y,c as g,j as o,e as rt,d as ce,K as we,t as ne,f as oe,a as J,g as ct,R as dt,T as mt,D as ut,C as ft,P as ht,h as pt,O as xt,i as gt,k as bt,l as vt,m as jt,G as wt,U as Ct,n as St,S as Ce,o as yt,p as Nt,N as _t,q as kt,s as Se}from"./index-D_9U2egr.js";import{O as It,a as $t,g as Tt}from"./well-known-mcp-DX3tGGx0.js";import{g as Mt}from"./generate-id-Dyweu44Y.js";import{i as Ot,E as zt}from"./SearchMd-BAWY3jJ1.js";import{u as Dt,a as Rt,I as pe,n as At}from"./use-connection-CCY0Xwwp.js";import{u as Z,L as ee}from"./localstorage-keys-BkdyiQZF.js";import{u as q,T as Pt,a as Et,b as Lt,c as Ut,L as xe,i as Bt,P as Ht,O as Gt}from"./tooltip-CaoJSXa7.js";import{c as $,B as V}from"./button-UpWqqi7Z.js";import{i as ie}from"./CpuChip02-CwrVudRE.js";import{i as Vt}from"./Loading01-DfUJLT5a.js";import{s as Wt}from"./Plus-xQLsl9Xg.js";import{i as ae}from"./X-SWur-HdE.js";import{u as Ft}from"./use-binding-q2q9V0d9.js";import{u as Kt,a as Yt,b as Zt,c as qt,d as Qt,C as R,e as Xt,B as Jt,f as es,g as ts,I as ss,D as ns,h as as,i as os,j as ls,k as is,l as rs,R as ye,m as cs,n as ds,o as ms}from"./resizable-CjAFAEbu.js";import{E as de}from"./error-boundary-07xTy_TK.js";import{P as Ne,a as _e,b as ke}from"./popover-BN78TD4M.js";import{s as us}from"./Clock-d43uwP0y.js";import{s as fs}from"./Trash01-DAwkJNu8.js";import{i as hs}from"./File06-CwcvFGqd.js";import{u as te}from"./use-mobile-DjZ7nTWx.js";import{u as Ie,a as ps}from"./use-organization-settings-Du1vfsWT.js";import{C as xs}from"./create-organization-dialog-BpD_WYLu.js";import{I as gs}from"./input-DNanPJKs.js";import{A as Q}from"./avatar-CB7RLPFt.js";import{c as bs,D as vs,a as js,b as ws,d as Cs,e as ge}from"./dropdown-menu-B_pozn9G.js";import{a as Ss}from"./Copy01-CUqgUCLS.js";import{n as be}from"./LinkExternal01-ClKXW-wQ.js";import{D as $e,a as Te,b as Me,c as Oe,d as ze}from"./dialog-DQ_m9LgP.js";import"./useQuery-BTda2D25.js";import"./auth-Ds7lWA5K.js";import"./select-888i9ck2.js";import"./ChevronDown-CqrF2uJ-.js";import"./use-gateway-6PKj5OoP.js";import"./AlertCircle-CkBPRGL_.js";import"./Terminal-CJwUlnBn.js";import"./connection-card-DIVWkbya.js";import"./card-csaWOT-1.js";import"./spinner-mwkhkfGn.js";import"./alert-dialog-dauOR89q.js";import"./InfoCircle-CaOedrxe.js";import"./form-CGaxh2WC.js";const De=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M9 7H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 7.76 3 8.04 3 8.6v10.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21H9m0 0h6m-6 0V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 3 10.04 3 10.6 3h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 3.76 15 4.04 15 4.6V21m0-10h4.4c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C21 11.76 21 12.04 21 12.6v6.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C20.24 21 19.96 21 19.4 21H15"}));De.displayName="BarChart10";const Re=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M15 21v-5.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 14 13.96 14 13.4 14h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 14.76 9 15.04 9 15.6V21M3 7a3 3 0 0 0 6 0 3 3 0 1 0 6 0 3 3 0 1 0 6 0M6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21Z"}));Re.displayName="Building02";const Ae=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));Ae.displayName="ChevronSelectorVertical";const Pe=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M2 12h20M2 12c0 5.523 4.477 10 10 10M2 12C2 6.477 6.477 2 12 2m10 10c0 5.523-4.477 10-10 10m10-10c0-5.523-4.477-10-10-10m0 0a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10m0-20a15.3 15.3 0 0 0-4 10 15.3 15.3 0 0 0 4 10"}));Pe.displayName="Globe01";const Ee=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M9 21v-7.4c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 12 10.04 12 10.6 12h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 12.76 15 13.04 15 13.6V21M11.018 2.764 4.235 8.039c-.453.353-.68.53-.843.75a2 2 0 0 0-.318.65C3 9.704 3 9.991 3 10.565V17.8c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8v-7.235c0-.574 0-.861-.074-1.126a2.002 2.002 0 0 0-.318-.65c-.163-.22-.39-.397-.843-.75l-6.783-5.275c-.351-.273-.527-.41-.72-.462a1 1 0 0 0-.523 0c-.194.052-.37.189-.721.462Z"}));Ee.displayName="Home02";const Le=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));Le.displayName="LayoutRight";const Ue=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m0-9H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H9"}));Ue.displayName="LogOut01";const Be=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));Be.displayName="Mail01";const He=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}),y.createElement("path",{d:"M18.727 14.727a1.5 1.5 0 0 0 .3 1.655l.055.054a1.816 1.816 0 0 1 0 2.573 1.818 1.818 0 0 1-2.573 0l-.055-.055a1.5 1.5 0 0 0-1.654-.3 1.5 1.5 0 0 0-.91 1.373v.155a1.818 1.818 0 1 1-3.636 0V20.1a1.5 1.5 0 0 0-.981-1.373 1.5 1.5 0 0 0-1.655.3l-.054.055a1.818 1.818 0 0 1-3.106-1.287 1.818 1.818 0 0 1 .533-1.286l.054-.055a1.5 1.5 0 0 0 .3-1.654 1.5 1.5 0 0 0-1.372-.91h-.155a1.818 1.818 0 1 1 0-3.636H3.9a1.5 1.5 0 0 0 1.373-.981 1.5 1.5 0 0 0-.3-1.655l-.055-.054A1.818 1.818 0 1 1 7.491 4.99l.054.054a1.5 1.5 0 0 0 1.655.3h.073a1.5 1.5 0 0 0 .909-1.372v-.155a1.818 1.818 0 0 1 3.636 0V3.9a1.499 1.499 0 0 0 .91 1.373 1.5 1.5 0 0 0 1.654-.3l.054-.055a1.817 1.817 0 0 1 2.573 0 1.819 1.819 0 0 1 0 2.573l-.055.054a1.5 1.5 0 0 0-.3 1.655v.073a1.5 1.5 0 0 0 1.373.909h.155a1.818 1.818 0 0 1 0 3.636H20.1a1.499 1.499 0 0 0-1.373.91Z"}));He.displayName="Settings01";const Ge=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M5.316 19.438A4.001 4.001 0 0 1 9 17h6a4.001 4.001 0 0 1 3.684 2.438M16 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm6 2.5c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Ge.displayName="UserCircle";const Ve=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M22 21v-2a4.002 4.002 0 0 0-3-3.874M15.5 3.291a4.001 4.001 0 0 1 0 7.418M17 21c0-1.864 0-2.796-.305-3.53a4 4 0 0 0-2.164-2.165C13.796 15 12.864 15 11 15H8c-1.864 0-2.796 0-3.53.305a4 4 0 0 0-2.166 2.164C2 18.204 2 19.136 2 21M13.5 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));Ve.displayName="Users01";function me(){const t=g.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=ee.decoChatOpen(),t[0]=e):e=t[0];const[s,a]=Z(e,ys);let n;return t[1]!==s||t[2]!==a?(n=[s,a],t[1]=s,t[2]=a,t[3]=n):n=t[3],n}function ys(t){return!!(t??!1)}function Ns(t){const e=g.c(14),{title:s,description:a,avatar:n,avatarNode:l,className:i}=t,r=s===void 0?"Start a conversation":s;let c;e[0]!==i?(c=$("flex flex-col items-center justify-center gap-4 p-0 text-center",i),e[0]=i,e[1]=c):c=e[1];let d;e[2]!==n||e[3]!==l?(d=l||n&&o.jsx("img",{src:n,alt:"Chat avatar",className:"size-[60px] rounded-[18px] border-[1.875px] border-border/10"}),e[2]=n,e[3]=l,e[4]=d):d=e[4];let m;e[5]!==r?(m=r&&o.jsx("h3",{className:"text-xl font-medium text-foreground",children:r}),e[5]=r,e[6]=m):m=e[6];let u;e[7]!==a?(u=a&&o.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:a}),e[7]=a,e[8]=u):u=e[8];let f;return e[9]!==c||e[10]!==d||e[11]!==m||e[12]!==u?(f=o.jsxs("div",{className:c,children:[d,m,u]}),e[9]=c,e[10]=d,e[11]=m,e[12]=u,e[13]=f):f=e[13],f}function _s(){const t=g.c(5),e=rt(),{org:s}=q();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[0]=a):a=t[0];const n=ce(a);let l;return t[1]!==s||t[2]!==n||t[3]!==e?(l=i=>{const c=i.toolCall.toolName.match(/^COLLECTION_([A-Z_]+)_(CREATE|UPDATE|DELETE)$/);if(!c||!c[1])return;const d=c[1],m=n.connectionId;if(!m)return;e.invalidateQueries({queryKey:we.collection(s.slug,m,d)});const u=d.toLowerCase().replace(/_/g," ");ne.success(`${u} updated`)},t[1]=s,t[2]=n,t[3]=e,t[4]=l):l=t[4],l}const We=()=>crypto.randomUUID(),Fe=y.createContext(null);function ks(t){const e=g.c(15),{children:s}=t,{locator:a}=q(),n=Kt(),[l,i]=Z(ee.threadManagerState(a)+":active-id",Is);let r;e[0]!==i||e[1]!==n?(r=h=>{const j=h?.id||crypto.randomUUID(),x=new Date().toISOString(),b={id:j,title:h?.title||"",created_at:h?.created_at||x,updated_at:h?.updated_at||x,hidden:h?.hidden??!1};return n.insert.mutate(b),i(j),b},e[0]=i,e[1]=n,e[2]=r):r=e[2];const c=r;let d;e[3]!==l||e[4]!==i||e[5]!==n?(d=h=>{n.update.mutate({id:h,updates:{hidden:!0,updated_at:new Date().toISOString()}}),l===h&&i(We())},e[3]=l,e[4]=i,e[5]=n,e[6]=d):d=e[6];const m=d;let u;e[7]!==l||e[8]!==c||e[9]!==m||e[10]!==i?(u={activeThreadId:l,createThread:c,setActiveThreadId:i,hideThread:m},e[7]=l,e[8]=c,e[9]=m,e[10]=i,e[11]=u):u=e[11];const f=u;let p;return e[12]!==s||e[13]!==f?(p=o.jsx(Fe.Provider,{value:f,children:s}),e[12]=s,e[13]=f,e[14]=p):p=e[14],p}function Is(t){return t||We()}function $s(){const t=y.useContext(Fe);if(!t)throw new Error("useChat must be used within a ChatProvider");return t}function Ts(t){const e=new Date(t),a=new Date().getTime()-e.getTime(),n=Math.floor(a/6e4),l=Math.floor(a/36e5);return n<1?"now":n<60?`${n}m`:`${l}h`}function Ms(t){const e=new Date,s=new Date(e.getFullYear(),e.getMonth(),e.getDate()),a=new Date(s.getTime()-864e5),n=new Date(s.getTime()-7*864e5),l=new Date(s.getTime()-30*864e5),i=[],r=[],c=[],d=[],m=[];for(const f of t){const p=new Date(f.updated_at);p>=s?i.push(f):p>=a?r.push(f):p>=n?c.push(f):p>=l?d.push(f):m.push(f)}const u=[];return i.length>0&&u.push({label:"Today",threads:i,showRelativeTime:!0}),r.length>0&&u.push({label:"Yesterday",threads:r,showRelativeTime:!1}),c.length>0&&u.push({label:"7 days ago",threads:c,showRelativeTime:!1}),d.length>0&&u.push({label:"30 days ago",threads:d,showRelativeTime:!1}),m.length>0&&u.push({label:"Older",threads:m,showRelativeTime:!1}),u}function Os(t){const e=g.c(36),{threads:s,activeThreadId:a,onSelectThread:n,onRemoveThread:l,onOpen:i}=t,[r,c]=y.useState("");let d,m,u,f,p,h,j,x,b;if(e[0]!==a||e[1]!==i||e[2]!==l||e[3]!==n||e[4]!==r||e[5]!==s){const S=r.trim()?s.filter(T=>(T.title||"New chat").toLowerCase().includes(r.toLowerCase())):s,N=Ms(S);let _;e[15]!==i?(_=T=>{T?i?.():c("")},e[15]=i,e[16]=_):_=e[16];const z=_;m=Ne,x=z,e[17]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx(_e,{asChild:!0,children:o.jsx("button",{type:"button",className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:o.jsx(us,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})})}),e[17]=b):b=e[17],d=ke,p="end",h="w-80 p-0";let k;e[18]===Symbol.for("react.memo_cache_sentinel")?(k=o.jsx(Ot,{size:16,className:"text-muted-foreground shrink-0"}),e[18]=k):k=e[18];let M;e[19]===Symbol.for("react.memo_cache_sentinel")?(M=T=>c(T.target.value),e[19]=M):M=e[19],e[20]!==r?(j=o.jsx("div",{className:"border-b",children:o.jsxs("label",{className:"flex items-center gap-2.5 h-12 px-4 cursor-text",children:[k,o.jsx("input",{type:"text",placeholder:"Search chats...",value:r,onChange:M,className:"flex-1 border-0 shadow-none focus:outline-none px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[20]=r,e[21]=j):j=e[21],u="max-h-[300px] overflow-y-auto",f=S.length===0?o.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:r.trim()?"No chats found":"No chats yet"}):N.map((T,O)=>o.jsxs("div",{children:[O>0&&o.jsx("div",{className:"border-t mx-3"}),o.jsx("div",{className:"px-3 py-1",children:o.jsx("span",{className:"text-xs font-medium text-muted-foreground tracking-wide",children:T.label})}),T.threads.map(D=>{const W=D.id===a;return o.jsxs("div",{className:`flex items-center gap-2 px-3 py-2 hover:bg-accent cursor-pointer group ${W?"bg-accent/50":""}`,onClick:()=>n(D.id),children:[o.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[o.jsx("span",{className:"text-sm truncate",children:D.title||"New chat"}),o.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:W?"current":T.showRelativeTime?Ts(D.updated_at):null})]}),o.jsx("button",{type:"button",onClick:X=>{X.stopPropagation(),l(D.id)},className:"opacity-0 cursor-pointer group/trash group-hover:opacity-100 p-1 hover:bg-destructive/10 rounded transition-opacity",title:"Remove chat",children:o.jsx(fs,{size:14,className:"text-muted-foreground group-hover/trash:text-destructive"})})]},D.id)})]},T.label)),e[0]=a,e[1]=i,e[2]=l,e[3]=n,e[4]=r,e[5]=s,e[6]=d,e[7]=m,e[8]=u,e[9]=f,e[10]=p,e[11]=h,e[12]=j,e[13]=x,e[14]=b}else d=e[6],m=e[7],u=e[8],f=e[9],p=e[10],h=e[11],j=e[12],x=e[13],b=e[14];let v;e[22]!==u||e[23]!==f?(v=o.jsx("div",{className:u,children:f}),e[22]=u,e[23]=f,e[24]=v):v=e[24];let w;e[25]!==d||e[26]!==p||e[27]!==h||e[28]!==j||e[29]!==v?(w=o.jsxs(d,{align:p,className:h,children:[j,v]}),e[25]=d,e[26]=p,e[27]=h,e[28]=j,e[29]=v,e[30]=w):w=e[30];let C;return e[31]!==m||e[32]!==x||e[33]!==b||e[34]!==w?(C=o.jsxs(m,{onOpenChange:x,children:[b,w]}),e[31]=m,e[32]=x,e[33]=b,e[34]=w,e[35]=C):C=e[35],C}const zs="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function Ds(t){const e=/\/[^/]+\/mcps\/([^/]+)\/([^/]+)\/([^/]+)/,s=t.match(e);return s&&s[1]&&s[2]&&s[3]?{connectionId:decodeURIComponent(s[1]),collectionName:decodeURIComponent(s[2]),itemId:decodeURIComponent(s[3])}:{connectionId:null,collectionName:null,itemId:null}}function Rs(){const t=g.c(2),e=ct();let s;t[0]!==e.location.pathname?(s=Ds(e.location.pathname),t[0]=e.location.pathname,t[1]=s):s=t[1];const{connectionId:a,collectionName:n,itemId:l}=s;return`You are an AI assistant running in an MCP Mesh environment.
|
|
1
|
+
import{r as y,c as g,j as o,e as rt,d as ce,K as we,t as ne,f as oe,a as J,g as ct,R as dt,T as mt,D as ut,C as ft,P as ht,h as pt,O as xt,i as gt,k as bt,l as vt,m as jt,G as wt,U as Ct,n as St,S as Ce,o as yt,p as Nt,N as _t,q as kt,s as Se}from"./index-DkE856zJ.js";import{O as It,a as $t,g as Tt}from"./well-known-mcp-DX3tGGx0.js";import{g as Mt}from"./generate-id-Dyweu44Y.js";import{i as Ot,E as zt}from"./SearchMd-CwAqtJqG.js";import{u as Dt,a as Rt,I as pe,n as At}from"./use-connection-B9P3V0a0.js";import{u as Z,L as ee}from"./localstorage-keys-BdgFgIfr.js";import{u as q,T as Pt,a as Et,b as Lt,c as Ut,L as xe,i as Bt,P as Ht,O as Gt}from"./tooltip-CNuF1S13.js";import{c as $,B as V}from"./button-Dj8ueofv.js";import{i as ie}from"./CpuChip02-DG7E5vjX.js";import{i as Vt}from"./Loading01-CH6mw7mn.js";import{s as Wt}from"./Plus-D2stpxr4.js";import{i as ae}from"./X-E7J_uWRT.js";import{u as Ft}from"./use-binding-Dx0VfUue.js";import{u as Kt,a as Yt,b as Zt,c as qt,d as Qt,C as R,e as Xt,B as Jt,f as es,g as ts,I as ss,D as ns,h as as,i as os,j as ls,k as is,l as rs,R as ye,m as cs,n as ds,o as ms}from"./resizable-D_GRD1gk.js";import{E as de}from"./error-boundary-BaDP7Z4Q.js";import{P as Ne,a as _e,b as ke}from"./popover-B5X6Vli5.js";import{s as us}from"./Clock-DaV6oMqF.js";import{s as fs}from"./Trash01-BRxmwmD1.js";import{i as hs}from"./File06-CCcPYdcS.js";import{u as te}from"./use-mobile-BtxRZpBG.js";import{u as Ie,a as ps}from"./use-organization-settings-D16HeZQR.js";import{C as xs}from"./create-organization-dialog-Dc45BpM3.js";import{I as gs}from"./input-C2Ph-V5_.js";import{A as Q}from"./avatar-F70el86e.js";import{c as bs,D as vs,a as js,b as ws,d as Cs,e as ge}from"./dropdown-menu-BUANjhM2.js";import{a as Ss}from"./Copy01-DK5159Rb.js";import{n as be}from"./LinkExternal01-UPDE0V2O.js";import{D as $e,a as Te,b as Me,c as Oe,d as ze}from"./dialog-Dcux2Ttt.js";import"./useQuery-BDcaqn5m.js";import"./auth-TMT6XsET.js";import"./select-DIsljPdj.js";import"./ChevronDown-BTsoCUlX.js";import"./use-gateway-DynzgasG.js";import"./AlertCircle-Du1WT751.js";import"./Terminal-zrKj2_VN.js";import"./connection-card-BsnAC2N8.js";import"./card-66QSeiOF.js";import"./spinner-TVmB-5qD.js";import"./alert-dialog-CxYBxRCI.js";import"./InfoCircle-z9SmeZ2K.js";import"./form-D1QOQ8Im.js";const De=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M9 7H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 7.76 3 8.04 3 8.6v10.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21H9m0 0h6m-6 0V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 3 10.04 3 10.6 3h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 3.76 15 4.04 15 4.6V21m0-10h4.4c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C21 11.76 21 12.04 21 12.6v6.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C20.24 21 19.96 21 19.4 21H15"}));De.displayName="BarChart10";const Re=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M15 21v-5.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 14 13.96 14 13.4 14h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 14.76 9 15.04 9 15.6V21M3 7a3 3 0 0 0 6 0 3 3 0 1 0 6 0 3 3 0 1 0 6 0M6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21Z"}));Re.displayName="Building02";const Ae=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));Ae.displayName="ChevronSelectorVertical";const Pe=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M2 12h20M2 12c0 5.523 4.477 10 10 10M2 12C2 6.477 6.477 2 12 2m10 10c0 5.523-4.477 10-10 10m10-10c0-5.523-4.477-10-10-10m0 0a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10m0-20a15.3 15.3 0 0 0-4 10 15.3 15.3 0 0 0 4 10"}));Pe.displayName="Globe01";const Ee=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M9 21v-7.4c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 12 10.04 12 10.6 12h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 12.76 15 13.04 15 13.6V21M11.018 2.764 4.235 8.039c-.453.353-.68.53-.843.75a2 2 0 0 0-.318.65C3 9.704 3 9.991 3 10.565V17.8c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8v-7.235c0-.574 0-.861-.074-1.126a2.002 2.002 0 0 0-.318-.65c-.163-.22-.39-.397-.843-.75l-6.783-5.275c-.351-.273-.527-.41-.72-.462a1 1 0 0 0-.523 0c-.194.052-.37.189-.721.462Z"}));Ee.displayName="Home02";const Le=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));Le.displayName="LayoutRight";const Ue=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m0-9H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H9"}));Ue.displayName="LogOut01";const Be=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));Be.displayName="Mail01";const He=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}),y.createElement("path",{d:"M18.727 14.727a1.5 1.5 0 0 0 .3 1.655l.055.054a1.816 1.816 0 0 1 0 2.573 1.818 1.818 0 0 1-2.573 0l-.055-.055a1.5 1.5 0 0 0-1.654-.3 1.5 1.5 0 0 0-.91 1.373v.155a1.818 1.818 0 1 1-3.636 0V20.1a1.5 1.5 0 0 0-.981-1.373 1.5 1.5 0 0 0-1.655.3l-.054.055a1.818 1.818 0 0 1-3.106-1.287 1.818 1.818 0 0 1 .533-1.286l.054-.055a1.5 1.5 0 0 0 .3-1.654 1.5 1.5 0 0 0-1.372-.91h-.155a1.818 1.818 0 1 1 0-3.636H3.9a1.5 1.5 0 0 0 1.373-.981 1.5 1.5 0 0 0-.3-1.655l-.055-.054A1.818 1.818 0 1 1 7.491 4.99l.054.054a1.5 1.5 0 0 0 1.655.3h.073a1.5 1.5 0 0 0 .909-1.372v-.155a1.818 1.818 0 0 1 3.636 0V3.9a1.499 1.499 0 0 0 .91 1.373 1.5 1.5 0 0 0 1.654-.3l.054-.055a1.817 1.817 0 0 1 2.573 0 1.819 1.819 0 0 1 0 2.573l-.055.054a1.5 1.5 0 0 0-.3 1.655v.073a1.5 1.5 0 0 0 1.373.909h.155a1.818 1.818 0 0 1 0 3.636H20.1a1.499 1.499 0 0 0-1.373.91Z"}));He.displayName="Settings01";const Ge=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M5.316 19.438A4.001 4.001 0 0 1 9 17h6a4.001 4.001 0 0 1 3.684 2.438M16 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm6 2.5c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Ge.displayName="UserCircle";const Ve=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M22 21v-2a4.002 4.002 0 0 0-3-3.874M15.5 3.291a4.001 4.001 0 0 1 0 7.418M17 21c0-1.864 0-2.796-.305-3.53a4 4 0 0 0-2.164-2.165C13.796 15 12.864 15 11 15H8c-1.864 0-2.796 0-3.53.305a4 4 0 0 0-2.166 2.164C2 18.204 2 19.136 2 21M13.5 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));Ve.displayName="Users01";function me(){const t=g.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=ee.decoChatOpen(),t[0]=e):e=t[0];const[s,a]=Z(e,ys);let n;return t[1]!==s||t[2]!==a?(n=[s,a],t[1]=s,t[2]=a,t[3]=n):n=t[3],n}function ys(t){return!!(t??!1)}function Ns(t){const e=g.c(14),{title:s,description:a,avatar:n,avatarNode:l,className:i}=t,r=s===void 0?"Start a conversation":s;let c;e[0]!==i?(c=$("flex flex-col items-center justify-center gap-4 p-0 text-center",i),e[0]=i,e[1]=c):c=e[1];let d;e[2]!==n||e[3]!==l?(d=l||n&&o.jsx("img",{src:n,alt:"Chat avatar",className:"size-[60px] rounded-[18px] border-[1.875px] border-border/10"}),e[2]=n,e[3]=l,e[4]=d):d=e[4];let m;e[5]!==r?(m=r&&o.jsx("h3",{className:"text-xl font-medium text-foreground",children:r}),e[5]=r,e[6]=m):m=e[6];let u;e[7]!==a?(u=a&&o.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:a}),e[7]=a,e[8]=u):u=e[8];let f;return e[9]!==c||e[10]!==d||e[11]!==m||e[12]!==u?(f=o.jsxs("div",{className:c,children:[d,m,u]}),e[9]=c,e[10]=d,e[11]=m,e[12]=u,e[13]=f):f=e[13],f}function _s(){const t=g.c(5),e=rt(),{org:s}=q();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[0]=a):a=t[0];const n=ce(a);let l;return t[1]!==s||t[2]!==n||t[3]!==e?(l=i=>{const c=i.toolCall.toolName.match(/^COLLECTION_([A-Z_]+)_(CREATE|UPDATE|DELETE)$/);if(!c||!c[1])return;const d=c[1],m=n.connectionId;if(!m)return;e.invalidateQueries({queryKey:we.collection(s.slug,m,d)});const u=d.toLowerCase().replace(/_/g," ");ne.success(`${u} updated`)},t[1]=s,t[2]=n,t[3]=e,t[4]=l):l=t[4],l}const We=()=>crypto.randomUUID(),Fe=y.createContext(null);function ks(t){const e=g.c(15),{children:s}=t,{locator:a}=q(),n=Kt(),[l,i]=Z(ee.threadManagerState(a)+":active-id",Is);let r;e[0]!==i||e[1]!==n?(r=h=>{const j=h?.id||crypto.randomUUID(),x=new Date().toISOString(),b={id:j,title:h?.title||"",created_at:h?.created_at||x,updated_at:h?.updated_at||x,hidden:h?.hidden??!1};return n.insert.mutate(b),i(j),b},e[0]=i,e[1]=n,e[2]=r):r=e[2];const c=r;let d;e[3]!==l||e[4]!==i||e[5]!==n?(d=h=>{n.update.mutate({id:h,updates:{hidden:!0,updated_at:new Date().toISOString()}}),l===h&&i(We())},e[3]=l,e[4]=i,e[5]=n,e[6]=d):d=e[6];const m=d;let u;e[7]!==l||e[8]!==c||e[9]!==m||e[10]!==i?(u={activeThreadId:l,createThread:c,setActiveThreadId:i,hideThread:m},e[7]=l,e[8]=c,e[9]=m,e[10]=i,e[11]=u):u=e[11];const f=u;let p;return e[12]!==s||e[13]!==f?(p=o.jsx(Fe.Provider,{value:f,children:s}),e[12]=s,e[13]=f,e[14]=p):p=e[14],p}function Is(t){return t||We()}function $s(){const t=y.useContext(Fe);if(!t)throw new Error("useChat must be used within a ChatProvider");return t}function Ts(t){const e=new Date(t),a=new Date().getTime()-e.getTime(),n=Math.floor(a/6e4),l=Math.floor(a/36e5);return n<1?"now":n<60?`${n}m`:`${l}h`}function Ms(t){const e=new Date,s=new Date(e.getFullYear(),e.getMonth(),e.getDate()),a=new Date(s.getTime()-864e5),n=new Date(s.getTime()-7*864e5),l=new Date(s.getTime()-30*864e5),i=[],r=[],c=[],d=[],m=[];for(const f of t){const p=new Date(f.updated_at);p>=s?i.push(f):p>=a?r.push(f):p>=n?c.push(f):p>=l?d.push(f):m.push(f)}const u=[];return i.length>0&&u.push({label:"Today",threads:i,showRelativeTime:!0}),r.length>0&&u.push({label:"Yesterday",threads:r,showRelativeTime:!1}),c.length>0&&u.push({label:"7 days ago",threads:c,showRelativeTime:!1}),d.length>0&&u.push({label:"30 days ago",threads:d,showRelativeTime:!1}),m.length>0&&u.push({label:"Older",threads:m,showRelativeTime:!1}),u}function Os(t){const e=g.c(36),{threads:s,activeThreadId:a,onSelectThread:n,onRemoveThread:l,onOpen:i}=t,[r,c]=y.useState("");let d,m,u,f,p,h,j,x,b;if(e[0]!==a||e[1]!==i||e[2]!==l||e[3]!==n||e[4]!==r||e[5]!==s){const S=r.trim()?s.filter(T=>(T.title||"New chat").toLowerCase().includes(r.toLowerCase())):s,N=Ms(S);let _;e[15]!==i?(_=T=>{T?i?.():c("")},e[15]=i,e[16]=_):_=e[16];const z=_;m=Ne,x=z,e[17]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx(_e,{asChild:!0,children:o.jsx("button",{type:"button",className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:o.jsx(us,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})})}),e[17]=b):b=e[17],d=ke,p="end",h="w-80 p-0";let k;e[18]===Symbol.for("react.memo_cache_sentinel")?(k=o.jsx(Ot,{size:16,className:"text-muted-foreground shrink-0"}),e[18]=k):k=e[18];let M;e[19]===Symbol.for("react.memo_cache_sentinel")?(M=T=>c(T.target.value),e[19]=M):M=e[19],e[20]!==r?(j=o.jsx("div",{className:"border-b",children:o.jsxs("label",{className:"flex items-center gap-2.5 h-12 px-4 cursor-text",children:[k,o.jsx("input",{type:"text",placeholder:"Search chats...",value:r,onChange:M,className:"flex-1 border-0 shadow-none focus:outline-none px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[20]=r,e[21]=j):j=e[21],u="max-h-[300px] overflow-y-auto",f=S.length===0?o.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:r.trim()?"No chats found":"No chats yet"}):N.map((T,O)=>o.jsxs("div",{children:[O>0&&o.jsx("div",{className:"border-t mx-3"}),o.jsx("div",{className:"px-3 py-1",children:o.jsx("span",{className:"text-xs font-medium text-muted-foreground tracking-wide",children:T.label})}),T.threads.map(D=>{const W=D.id===a;return o.jsxs("div",{className:`flex items-center gap-2 px-3 py-2 hover:bg-accent cursor-pointer group ${W?"bg-accent/50":""}`,onClick:()=>n(D.id),children:[o.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[o.jsx("span",{className:"text-sm truncate",children:D.title||"New chat"}),o.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:W?"current":T.showRelativeTime?Ts(D.updated_at):null})]}),o.jsx("button",{type:"button",onClick:X=>{X.stopPropagation(),l(D.id)},className:"opacity-0 cursor-pointer group/trash group-hover:opacity-100 p-1 hover:bg-destructive/10 rounded transition-opacity",title:"Remove chat",children:o.jsx(fs,{size:14,className:"text-muted-foreground group-hover/trash:text-destructive"})})]},D.id)})]},T.label)),e[0]=a,e[1]=i,e[2]=l,e[3]=n,e[4]=r,e[5]=s,e[6]=d,e[7]=m,e[8]=u,e[9]=f,e[10]=p,e[11]=h,e[12]=j,e[13]=x,e[14]=b}else d=e[6],m=e[7],u=e[8],f=e[9],p=e[10],h=e[11],j=e[12],x=e[13],b=e[14];let v;e[22]!==u||e[23]!==f?(v=o.jsx("div",{className:u,children:f}),e[22]=u,e[23]=f,e[24]=v):v=e[24];let w;e[25]!==d||e[26]!==p||e[27]!==h||e[28]!==j||e[29]!==v?(w=o.jsxs(d,{align:p,className:h,children:[j,v]}),e[25]=d,e[26]=p,e[27]=h,e[28]=j,e[29]=v,e[30]=w):w=e[30];let C;return e[31]!==m||e[32]!==x||e[33]!==b||e[34]!==w?(C=o.jsxs(m,{onOpenChange:x,children:[b,w]}),e[31]=m,e[32]=x,e[33]=b,e[34]=w,e[35]=C):C=e[35],C}const zs="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function Ds(t){const e=/\/[^/]+\/mcps\/([^/]+)\/([^/]+)\/([^/]+)/,s=t.match(e);return s&&s[1]&&s[2]&&s[3]?{connectionId:decodeURIComponent(s[1]),collectionName:decodeURIComponent(s[2]),itemId:decodeURIComponent(s[3])}:{connectionId:null,collectionName:null,itemId:null}}function Rs(){const t=g.c(2),e=ct();let s;t[0]!==e.location.pathname?(s=Ds(e.location.pathname),t[0]=e.location.pathname,t[1]=s):s=t[1];const{connectionId:a,collectionName:n,itemId:l}=s;return`You are an AI assistant running in an MCP Mesh environment.
|
|
2
2
|
|
|
3
3
|
## About MCP Mesh
|
|
4
4
|
The Model Context Protocol (MCP) Mesh allows users to connect external MCP servers and expose their capabilities through gateways. Each gateway provides access to a curated set of tools from connected MCP servers.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as C,i as d,j as a}from"./index-
|
|
1
|
+
import{c as C,i as d,j as a}from"./index-DkE856zJ.js";import{c as m}from"./button-Dj8ueofv.js";const u=d("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",special:"fill-special text-backround"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=m(u({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let l,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=a.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=l,e[4]=i):(l=e[3],i=e[4]);let s;e[5]!==t?(s=a.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=a.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as K,c as $,j as s,f as F,K as H,a as G,g as q,s as Y}from"./index-D_9U2egr.js";import{b as Z,c as J}from"./well-known-mcp-DX3tGGx0.js";import{C as Q}from"./collection-header-BIZLVBPH.js";import{I as X,b as ee,c as te,a as W,u as se}from"./use-connection-CCY0Xwwp.js";import{b as le,T as ie,c as ne,u as V}from"./tooltip-CaoJSXa7.js";import{s as re}from"./slugify-CEUa2lfQ.js";import{n as oe}from"./Inbox01-De35FSLT.js";import{i as O}from"./Loading01-DfUJLT5a.js";import{i as ae,E as ce}from"./SearchMd-BAWY3jJ1.js";import{C as me}from"./collection-search-xvAQUbQ8.js";import{i as de}from"./Lock01-mcQuD2fk.js";import{C as fe}from"./card-csaWOT-1.js";import{g as ue,f as xe,a as pe}from"./registry-utils-ulDDT0d8.js";import{e as he}from"./app-name-gTETL9So.js";import{u as ge}from"./useSuspenseInfiniteQuery-6jf87YQF.js";import{d as je,a as ve,b as Ne,c as ye,S as Ce}from"./select-888i9ck2.js";import{s as Se}from"./Plus-xQLsl9Xg.js";import{B as _}from"./button-UpWqqi7Z.js";import{a as we}from"./use-binding-q2q9V0d9.js";import{L as be,u as Ie}from"./localstorage-keys-BkdyiQZF.js";import"./collection-display-button-CJMwmXuc.js";import"./dropdown-menu-B_pozn9G.js";import"./view-mode-toggle-BWA1OFcI.js";import"./input-DNanPJKs.js";import"./ChevronDown-CqrF2uJ-.js";import"./auth-Ds7lWA5K.js";import"./useQuery-BTda2D25.js";const U=({size:t=24,color:e="currentColor",...i})=>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",...i},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"}));U.displayName="CheckVerified02";function Re(t){const e=t.title||t.server.title||t.id||"Unnamed Item",i=t.server.description||null,f=t.server.icons?.[0]?.src||ue(t.server.repository)||null,a=t._meta?.["mcp.mesh"]?.verified??!1,x=t.server.version,o=(t.server.remotes?.length??0)>0;let c=e,l=null;if(e.includes("/")){const n=e.split("/");n.length>=2&&(l=n[0]||null,c=he(e))}if(!l){const n=t._meta?.["mcp.mesh"]?.scopeName,m=t._meta?.["mcp.mesh"]?.appName;n&&m?l=`${n}/${m}`:n&&(l=n)}return{icon:f,scopeName:l,displayName:c,description:i,version:x||null,isVerified:a,canInstall:o}}function Le(t){const e=$.c(39),{icon:i,scopeName:f,displayName:a,description:x,isVerified:r,canInstall:o,onClick:c}=t;let l;e[0]!==a||e[1]!==i?(l=s.jsx(X,{icon:i,name:a,size:"md",className:"shadow-sm"}),e[0]=a,e[1]=i,e[2]=l):l=e[2];let n;e[3]!==a?(n=s.jsx("span",{className:"truncate",children:a}),e[3]=a,e[4]=n):n=e[4];let m;e[5]!==r?(m=r&&s.jsx(U,{size:16,className:"text-success shrink-0"}),e[5]=r,e[6]=m):m=e[6];let p;e[7]!==o?(p=!o&&s.jsx(de,{size:16,className:"text-muted-foreground shrink-0"}),e[7]=o,e[8]=p):p=e[8];let j;e[9]!==n||e[10]!==m||e[11]!==p?(j=s.jsx(le,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-2 text-base font-medium min-w-0",children:[n,m,p]})}),e[9]=n,e[10]=m,e[11]=p,e[12]=j):j=e[12];let d;e[13]!==a?(d=s.jsx("p",{children:a}),e[13]=a,e[14]=d):d=e[14];let h;e[15]!==o?(h=!o&&s.jsx("p",{className:"text-xs mt-1",children:"No connection available"}),e[15]=o,e[16]=h):h=e[16];let g;e[17]!==d||e[18]!==h?(g=s.jsxs(ie,{children:[d,h]}),e[17]=d,e[18]=h,e[19]=g):g=e[19];let y;e[20]!==j||e[21]!==g?(y=s.jsxs(ne,{children:[j,g]}),e[20]=j,e[21]=g,e[22]=y):y=e[22];let C;e[23]!==f?(C=f&&s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:f}),e[23]=f,e[24]=C):C=e[24];let b;e[25]!==C||e[26]!==y?(b=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:[y,C]})}),e[25]=C,e[26]=y,e[27]=b):b=e[27];let S;e[28]!==l||e[29]!==b?(S=s.jsxs("div",{className:"flex gap-3",children:[l,b]}),e[28]=l,e[29]=b,e[30]=S):S=e[30];const I=x||"No description available";let v;e[31]!==I?(v=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]=v):v=e[32];let u;e[33]!==S||e[34]!==v?(u=s.jsxs("div",{className:"flex flex-col gap-4 h-full relative",children:[S,v]}),e[33]=S,e[34]=v,e[35]=u):u=e[35];let w;return e[36]!==c||e[37]!==u?(w=s.jsx(fe,{className:"p-6 cursor-pointer hover:bg-muted/50 transition-colors",onClick:c,children:u}),e[36]=c,e[37]=u,e[38]=w):w=e[38],w}function B(t){const e=$.c(12),{items:i,title:f,onItemClick:a}=t;if(i.length===0)return null;let x;e[0]!==f?(x=f&&s.jsx("div",{className:"flex items-center justify-between w-max gap-2",children:s.jsx("h2",{className:"text-lg font-medium",children:f})}),e[0]=f,e[1]=x):x=e[1];let r;if(e[2]!==i||e[3]!==a){let l;e[5]!==a?(l=n=>{const m=Re(n);return s.jsx(Le,{...m,onClick:()=>a(n)},n.id)},e[5]=a,e[6]=l):l=e[6],r=i.map(l),e[2]=i,e[3]=a,e[4]=r}else r=e[4];let o;e[7]!==r?(o=s.jsx("div",{className:"grid grid-cols-4 gap-4",children:r}),e[7]=r,e[8]=o):o=e[8];let c;return e[9]!==x||e[10]!==o?(c=s.jsxs("div",{className:"flex flex-col gap-4",children:[x,o]}),e[9]=x,e[10]=o,e[11]=c):c=e[11],c}function ke(t,e){if(!e)return t;const i=e.toLowerCase();return t.filter(f=>(f.name||f.title||"").toLowerCase().includes(i)||(f.description||f.server.description||"").toLowerCase().includes(i))}function Te(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0||t.server._meta?.["mcp.mesh"]?.verified===!0}function Ee(t){const e=$.c(32),{items:i,isLoadingMore:f,registryId:a,hasMore:x,onLoadMore:r}=t,o=f===void 0?!1:f,c=x===void 0?!1:x,[l,n]=K.useState(""),m=F(),{org:p}=V(),j=K.useRef(null);let d,h,g;e[0]!==i||e[1]!==l?(d=ke(i,l),g=d.filter(Te),h=d.filter(R=>!g.find(L=>L.id===R.id)),e[0]=i,e[1]=l,e[2]=d,e[3]=h,e[4]=g):(d=e[2],h=e[3],g=e[4]);const y=h;let C;e[5]!==m||e[6]!==p.slug||e[7]!==a?(C=R=>{const L=re(R.name||R.title||R.server.title||""),E=R.server.name;m({to:"/$org/store/$appName",params:{org:p.slug,appName:L},search:{registryId:a,serverName:E}})},e[5]=m,e[6]=p.slug,e[7]=a,e[8]=C):C=e[8];const b=C;let S;e[9]!==c||e[10]!==o||e[11]!==r||e[12]!==l?(S=R=>{if(!c||!r||l||o)return;const L=R.currentTarget;L.scrollHeight-L.scrollTop-L.clientHeight<200&&r()},e[9]=c,e[10]=o,e[11]=r,e[12]=l,e[13]=S):S=e[13];const I=S;let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=R=>{R.key==="Enter"&&n(R.currentTarget.value)},e[14]=v):v=e[14];let u;e[15]!==l?(u=s.jsx(me,{value:l,onChange:n,placeholder:"Search for an MCP Server...",onKeyDown:v}),e[15]=l,e[16]=u):u=e[16];let w;e[17]!==y||e[18]!==d||e[19]!==b||e[20]!==c||e[21]!==o||e[22]!==i.length||e[23]!==l||e[24]!==g?(w=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:i.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(oe,{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."})]}):l&&d.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ae,{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:[g.length>0&&s.jsx(B,{items:g,title:"Verified",onItemClick:b}),y.length>0&&s.jsx(B,{items:y,title:g.length>0?"All":"",onItemClick:b}),c&&!l&&o&&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(O,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[17]=y,e[18]=d,e[19]=b,e[20]=c,e[21]=o,e[22]=i.length,e[23]=l,e[24]=g,e[25]=w):w=e[25];let k;e[26]!==I||e[27]!==w?(k=s.jsx("div",{ref:j,className:"flex-1 overflow-y-auto",onScroll:I,children:w}),e[26]=I,e[27]=w,e[28]=k):k=e[28];let T;return e[29]!==u||e[30]!==k?(T=s.jsxs("div",{className:"flex flex-col h-full",children:[u,k]}),e[29]=u,e[30]=k,e[31]=T):T=e[31],T}const D=24;function Ae(t){const e=$.c(27),{registryId:i}=t,f=ee(i);let a,x,r,o;if(e[0]!==f?.tools||e[1]!==i){if(a=xe(f?.tools),!a)throw new Error("This registry does not support listing store items.");let u;e[6]!==i?(u=te(i),e[6]=i,e[7]=u):u=e[7],o=u,r=ge,x=H.toolCall(i,a,JSON.stringify({limit:D})),e[0]=f?.tools,e[1]=i,e[2]=a,e[3]=x,e[4]=r,e[5]=o}else a=e[2],x=e[3],r=e[4],o=e[5];let c;e[8]!==a||e[9]!==o?(c=async u=>{const{pageParam:w}=u;return await o(a,w?{cursor:w,limit:D}:{limit:D})},e[8]=a,e[9]=o,e[10]=c):c=e[10];let l;e[11]!==x||e[12]!==c?(l={queryKey:x,queryFn:c,initialPageParam:void 0,getNextPageParam:Ke,staleTime:36e5},e[11]=x,e[12]=c,e[13]=l):l=e[13];const{data:n,fetchNextPage:m,hasNextPage:p,isFetchingNextPage:j}=r(l);let d;e:{if(!n?.pages||n.pages.length===0){d=null;break e}const u=n.pages[0];if(typeof u=="object"&&u!==null&&"totalCount"in u&&typeof u.totalCount=="number"){d=u.totalCount;break e}d=null}const h=d,g=n?.pages;let y;e[14]!==g?(y=pe(g),e[14]=g,e[15]=y):y=e[15];const C=y;let b;e[16]!==m||e[17]!==p||e[18]!==j?(b=()=>{p&&!j&&m()},e[16]=m,e[17]=p,e[18]=j,e[19]=b):b=e[19];const S=b,I=p??!1;let v;return e[20]!==C||e[21]!==S||e[22]!==j||e[23]!==i||e[24]!==I||e[25]!==h?(v=s.jsx(Ee,{items:C,isLoadingMore:j,registryId:i,hasMore:I,onLoadMore:S,totalCount:h}),e[20]=C,e[21]=S,e[22]=j,e[23]=i,e[24]=I,e[25]=h,e[26]=v):v=e[26],v}function Ke(t){if(typeof t=="object"&&t!==null){const e=t.nextCursor||t.cursor;if(e)return e}}function $e(t){const e=$.c(15),{registries:i,value:f,onValueChange:a,onAddWellKnown:x,wellKnownRegistries:r,placeholder:o}=t,c=o===void 0?"Select a registry...":o;let l;e[0]!==c?(l=s.jsx(ve,{className:"w-[200px] h-8!",children:s.jsx(Ne,{placeholder:c})}),e[0]=c,e[1]=l):l=e[1];let n;e[2]!==i?(n=i.map(Pe),e[2]=i,e[3]=n):n=e[3];let m;e[4]!==x||e[5]!==r?(m=r.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"}),r.map(d=>s.jsxs("button",{onClick:h=>{h.preventDefault(),h.stopPropagation(),x(d)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-xl 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:[d.icon?s.jsx("img",{src:d.icon,alt:d.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:d.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:d.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(Se,{size:16})})]},d.id??d.title))]}),e[4]=x,e[5]=r,e[6]=m):m=e[6];let p;e[7]!==n||e[8]!==m?(p=s.jsxs(ye,{children:[n,m]}),e[7]=n,e[8]=m,e[9]=p):p=e[9];let j;return e[10]!==a||e[11]!==l||e[12]!==p||e[13]!==f?(j=s.jsxs(Ce,{value:f,onValueChange:a,children:[l,p]}),e[10]=a,e[11]=l,e[12]=p,e[13]=f,e[14]=j):j=e[14],j}function Pe(t){return s.jsx(je,{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 Me({registries:t,onConnected:e}){const i=W(),{org:{slug:f}}=V(),{data:a}=G.useSession(),x=F(),[r,o]=K.useState(!1),c=t[0],l=async()=>{if(!(!c||!a?.user?.id)){o(!0);try{const m=await i.create.mutateAsync(c);e?.(m.id)}finally{o(!1)}}},n=()=>{x({to:"/$org/mcps",params:{org:f},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 MCP Servers from the community.",actions:s.jsxs(s.Fragment,{children:[s.jsxs(_,{variant:"outline",onClick:l,disabled:r||!c,children:[c?.icon&&s.jsx("img",{src:c.icon,alt:"",className:"size-4"}),r?"Installing...":"Install Registry"]}),s.jsx(_,{variant:"outline",onClick:n,children:"Install MCP Server"})]})})}function ut(){const t=$.c(41),{org:e}=V(),i=se(),f=W(),a=q(),x=a.location.pathname.includes("/store/")&&a.location.pathname.split("/").length>3,r=we(i);let o;t[0]!==r?(o=r.map(Ve),t[0]=r,t[1]=o):o=t[1];const c=o;let l;t[2]!==e.slug?(l=be.selectedRegistry(e.slug),t[2]=e.slug,t[3]=l):l=t[3];const[n,m]=Ie(l,De);let p;if(t[4]!==r||t[5]!==n){let N;t[7]!==n?(N=z=>z.id===n,t[7]=n,t[8]=N):N=t[8],p=r.find(N),t[4]=r,t[5]=n,t[6]=p}else p=t[6];const d=p?.id||r[0]?.id||"";let h;t[9]!==e.id?(h=Z(e.id),t[9]=e.id,t[10]=h):h=t[10];let g;t[11]!==h?(g=[h],t[11]=h,t[12]=g):g=t[12];const y=g;let C;t[13]===Symbol.for("react.memo_cache_sentinel")?(C=[J()],t[13]=C):C=t[13];const b=C;let S;t[14]!==f.create||t[15]!==m?(S=async N=>{const z=await f.create.mutateAsync(N);m(z.id)},t[14]=f.create,t[15]=m,t[16]=S):S=t[16];const I=S;let v;t[17]!==r?(v=new Set(r.map(ze)),t[17]=r,t[18]=v):v=t[18];const u=v;let w;t[19]!==u||t[20]!==y?(w=y.filter(N=>N.id&&!u.has(N.id)),t[19]=u,t[20]=y,t[21]=w):w=t[21];const k=w;let T;t[22]!==u?(T=b.filter(N=>N.id&&!u.has(N.id)),t[22]=u,t[23]=T):T=t[23];const R=T;if(x){let N;return t[24]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Y,{}),t[24]=N):N=t[24],N}let L;t[25]!==I?(L=async N=>I(N),t[25]=I,t[26]=L):L=t[26];let E;t[27]!==k||t[28]!==d||t[29]!==c||t[30]!==m||t[31]!==L?(E=s.jsx(Q,{title:"Store",ctaButton:s.jsx($e,{wellKnownRegistries:k,registries:c,value:d,onValueChange:m,onAddWellKnown:L,placeholder:"Select store..."})}),t[27]=k,t[28]=d,t[29]=c,t[30]=m,t[31]=L,t[32]=E):E=t[32];let P;t[33]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(O,{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]=P):P=t[33];let A;t[34]!==R||t[35]!==d||t[36]!==m?(A=s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:s.jsx(K.Suspense,{fallback:P,children:d?s.jsx(Ae,{registryId:d}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(Me,{registries:R,onConnected:N=>{m(N)}})})})}),t[34]=R,t[35]=d,t[36]=m,t[37]=A):A=t[37];let M;return t[38]!==E||t[39]!==A?(M=s.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[E,A]}),t[38]=E,t[39]=A,t[40]=M):M=t[40],M}function ze(t){return t.id}function De(){return""}function Ve(t){return{id:t.id,name:t.title,icon:t.icon||void 0}}export{ut as default};
|
|
1
|
+
import{r as K,c as $,j as s,f as F,K as H,a as G,g as q,s as Y}from"./index-DkE856zJ.js";import{b as Z,c as J}from"./well-known-mcp-DX3tGGx0.js";import{C as Q}from"./collection-header-BuFCeK4g.js";import{I as X,b as ee,c as te,a as W,u as se}from"./use-connection-B9P3V0a0.js";import{b as le,T as ie,c as ne,u as V}from"./tooltip-CNuF1S13.js";import{s as re}from"./slugify-CEUa2lfQ.js";import{n as oe}from"./Inbox01-FsIho9ps.js";import{i as O}from"./Loading01-CH6mw7mn.js";import{i as ae,E as ce}from"./SearchMd-CwAqtJqG.js";import{C as me}from"./collection-search-Vq1GfSWB.js";import{i as de}from"./Lock01-DfYPtjUw.js";import{C as fe}from"./card-66QSeiOF.js";import{g as ue,f as xe,a as pe}from"./registry-utils-ulDDT0d8.js";import{e as he}from"./app-name-gTETL9So.js";import{u as ge}from"./useSuspenseInfiniteQuery-DHmfnsAy.js";import{d as je,a as ve,b as Ne,c as ye,S as Ce}from"./select-DIsljPdj.js";import{s as Se}from"./Plus-D2stpxr4.js";import{B as _}from"./button-Dj8ueofv.js";import{a as we}from"./use-binding-Dx0VfUue.js";import{L as be,u as Ie}from"./localstorage-keys-BdgFgIfr.js";import"./collection-display-button-C193PAy9.js";import"./dropdown-menu-BUANjhM2.js";import"./view-mode-toggle-CIqr2uxV.js";import"./input-C2Ph-V5_.js";import"./ChevronDown-BTsoCUlX.js";import"./auth-TMT6XsET.js";import"./useQuery-BDcaqn5m.js";const U=({size:t=24,color:e="currentColor",...i})=>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",...i},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"}));U.displayName="CheckVerified02";function Re(t){const e=t.title||t.server.title||t.id||"Unnamed Item",i=t.server.description||null,f=t.server.icons?.[0]?.src||ue(t.server.repository)||null,a=t._meta?.["mcp.mesh"]?.verified??!1,x=t.server.version,o=(t.server.remotes?.length??0)>0;let c=e,l=null;if(e.includes("/")){const n=e.split("/");n.length>=2&&(l=n[0]||null,c=he(e))}if(!l){const n=t._meta?.["mcp.mesh"]?.scopeName,m=t._meta?.["mcp.mesh"]?.appName;n&&m?l=`${n}/${m}`:n&&(l=n)}return{icon:f,scopeName:l,displayName:c,description:i,version:x||null,isVerified:a,canInstall:o}}function Le(t){const e=$.c(39),{icon:i,scopeName:f,displayName:a,description:x,isVerified:r,canInstall:o,onClick:c}=t;let l;e[0]!==a||e[1]!==i?(l=s.jsx(X,{icon:i,name:a,size:"md",className:"shadow-sm"}),e[0]=a,e[1]=i,e[2]=l):l=e[2];let n;e[3]!==a?(n=s.jsx("span",{className:"truncate",children:a}),e[3]=a,e[4]=n):n=e[4];let m;e[5]!==r?(m=r&&s.jsx(U,{size:16,className:"text-success shrink-0"}),e[5]=r,e[6]=m):m=e[6];let p;e[7]!==o?(p=!o&&s.jsx(de,{size:16,className:"text-muted-foreground shrink-0"}),e[7]=o,e[8]=p):p=e[8];let j;e[9]!==n||e[10]!==m||e[11]!==p?(j=s.jsx(le,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-2 text-base font-medium min-w-0",children:[n,m,p]})}),e[9]=n,e[10]=m,e[11]=p,e[12]=j):j=e[12];let d;e[13]!==a?(d=s.jsx("p",{children:a}),e[13]=a,e[14]=d):d=e[14];let h;e[15]!==o?(h=!o&&s.jsx("p",{className:"text-xs mt-1",children:"No connection available"}),e[15]=o,e[16]=h):h=e[16];let g;e[17]!==d||e[18]!==h?(g=s.jsxs(ie,{children:[d,h]}),e[17]=d,e[18]=h,e[19]=g):g=e[19];let y;e[20]!==j||e[21]!==g?(y=s.jsxs(ne,{children:[j,g]}),e[20]=j,e[21]=g,e[22]=y):y=e[22];let C;e[23]!==f?(C=f&&s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:f}),e[23]=f,e[24]=C):C=e[24];let b;e[25]!==C||e[26]!==y?(b=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:[y,C]})}),e[25]=C,e[26]=y,e[27]=b):b=e[27];let S;e[28]!==l||e[29]!==b?(S=s.jsxs("div",{className:"flex gap-3",children:[l,b]}),e[28]=l,e[29]=b,e[30]=S):S=e[30];const I=x||"No description available";let v;e[31]!==I?(v=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]=v):v=e[32];let u;e[33]!==S||e[34]!==v?(u=s.jsxs("div",{className:"flex flex-col gap-4 h-full relative",children:[S,v]}),e[33]=S,e[34]=v,e[35]=u):u=e[35];let w;return e[36]!==c||e[37]!==u?(w=s.jsx(fe,{className:"p-6 cursor-pointer hover:bg-muted/50 transition-colors",onClick:c,children:u}),e[36]=c,e[37]=u,e[38]=w):w=e[38],w}function B(t){const e=$.c(12),{items:i,title:f,onItemClick:a}=t;if(i.length===0)return null;let x;e[0]!==f?(x=f&&s.jsx("div",{className:"flex items-center justify-between w-max gap-2",children:s.jsx("h2",{className:"text-lg font-medium",children:f})}),e[0]=f,e[1]=x):x=e[1];let r;if(e[2]!==i||e[3]!==a){let l;e[5]!==a?(l=n=>{const m=Re(n);return s.jsx(Le,{...m,onClick:()=>a(n)},n.id)},e[5]=a,e[6]=l):l=e[6],r=i.map(l),e[2]=i,e[3]=a,e[4]=r}else r=e[4];let o;e[7]!==r?(o=s.jsx("div",{className:"grid grid-cols-4 gap-4",children:r}),e[7]=r,e[8]=o):o=e[8];let c;return e[9]!==x||e[10]!==o?(c=s.jsxs("div",{className:"flex flex-col gap-4",children:[x,o]}),e[9]=x,e[10]=o,e[11]=c):c=e[11],c}function ke(t,e){if(!e)return t;const i=e.toLowerCase();return t.filter(f=>(f.name||f.title||"").toLowerCase().includes(i)||(f.description||f.server.description||"").toLowerCase().includes(i))}function Te(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0||t.server._meta?.["mcp.mesh"]?.verified===!0}function Ee(t){const e=$.c(32),{items:i,isLoadingMore:f,registryId:a,hasMore:x,onLoadMore:r}=t,o=f===void 0?!1:f,c=x===void 0?!1:x,[l,n]=K.useState(""),m=F(),{org:p}=V(),j=K.useRef(null);let d,h,g;e[0]!==i||e[1]!==l?(d=ke(i,l),g=d.filter(Te),h=d.filter(R=>!g.find(L=>L.id===R.id)),e[0]=i,e[1]=l,e[2]=d,e[3]=h,e[4]=g):(d=e[2],h=e[3],g=e[4]);const y=h;let C;e[5]!==m||e[6]!==p.slug||e[7]!==a?(C=R=>{const L=re(R.name||R.title||R.server.title||""),E=R.server.name;m({to:"/$org/store/$appName",params:{org:p.slug,appName:L},search:{registryId:a,serverName:E}})},e[5]=m,e[6]=p.slug,e[7]=a,e[8]=C):C=e[8];const b=C;let S;e[9]!==c||e[10]!==o||e[11]!==r||e[12]!==l?(S=R=>{if(!c||!r||l||o)return;const L=R.currentTarget;L.scrollHeight-L.scrollTop-L.clientHeight<200&&r()},e[9]=c,e[10]=o,e[11]=r,e[12]=l,e[13]=S):S=e[13];const I=S;let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=R=>{R.key==="Enter"&&n(R.currentTarget.value)},e[14]=v):v=e[14];let u;e[15]!==l?(u=s.jsx(me,{value:l,onChange:n,placeholder:"Search for an MCP Server...",onKeyDown:v}),e[15]=l,e[16]=u):u=e[16];let w;e[17]!==y||e[18]!==d||e[19]!==b||e[20]!==c||e[21]!==o||e[22]!==i.length||e[23]!==l||e[24]!==g?(w=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:i.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(oe,{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."})]}):l&&d.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ae,{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:[g.length>0&&s.jsx(B,{items:g,title:"Verified",onItemClick:b}),y.length>0&&s.jsx(B,{items:y,title:g.length>0?"All":"",onItemClick:b}),c&&!l&&o&&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(O,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[17]=y,e[18]=d,e[19]=b,e[20]=c,e[21]=o,e[22]=i.length,e[23]=l,e[24]=g,e[25]=w):w=e[25];let k;e[26]!==I||e[27]!==w?(k=s.jsx("div",{ref:j,className:"flex-1 overflow-y-auto",onScroll:I,children:w}),e[26]=I,e[27]=w,e[28]=k):k=e[28];let T;return e[29]!==u||e[30]!==k?(T=s.jsxs("div",{className:"flex flex-col h-full",children:[u,k]}),e[29]=u,e[30]=k,e[31]=T):T=e[31],T}const D=24;function Ae(t){const e=$.c(27),{registryId:i}=t,f=ee(i);let a,x,r,o;if(e[0]!==f?.tools||e[1]!==i){if(a=xe(f?.tools),!a)throw new Error("This registry does not support listing store items.");let u;e[6]!==i?(u=te(i),e[6]=i,e[7]=u):u=e[7],o=u,r=ge,x=H.toolCall(i,a,JSON.stringify({limit:D})),e[0]=f?.tools,e[1]=i,e[2]=a,e[3]=x,e[4]=r,e[5]=o}else a=e[2],x=e[3],r=e[4],o=e[5];let c;e[8]!==a||e[9]!==o?(c=async u=>{const{pageParam:w}=u;return await o(a,w?{cursor:w,limit:D}:{limit:D})},e[8]=a,e[9]=o,e[10]=c):c=e[10];let l;e[11]!==x||e[12]!==c?(l={queryKey:x,queryFn:c,initialPageParam:void 0,getNextPageParam:Ke,staleTime:36e5},e[11]=x,e[12]=c,e[13]=l):l=e[13];const{data:n,fetchNextPage:m,hasNextPage:p,isFetchingNextPage:j}=r(l);let d;e:{if(!n?.pages||n.pages.length===0){d=null;break e}const u=n.pages[0];if(typeof u=="object"&&u!==null&&"totalCount"in u&&typeof u.totalCount=="number"){d=u.totalCount;break e}d=null}const h=d,g=n?.pages;let y;e[14]!==g?(y=pe(g),e[14]=g,e[15]=y):y=e[15];const C=y;let b;e[16]!==m||e[17]!==p||e[18]!==j?(b=()=>{p&&!j&&m()},e[16]=m,e[17]=p,e[18]=j,e[19]=b):b=e[19];const S=b,I=p??!1;let v;return e[20]!==C||e[21]!==S||e[22]!==j||e[23]!==i||e[24]!==I||e[25]!==h?(v=s.jsx(Ee,{items:C,isLoadingMore:j,registryId:i,hasMore:I,onLoadMore:S,totalCount:h}),e[20]=C,e[21]=S,e[22]=j,e[23]=i,e[24]=I,e[25]=h,e[26]=v):v=e[26],v}function Ke(t){if(typeof t=="object"&&t!==null){const e=t.nextCursor||t.cursor;if(e)return e}}function $e(t){const e=$.c(15),{registries:i,value:f,onValueChange:a,onAddWellKnown:x,wellKnownRegistries:r,placeholder:o}=t,c=o===void 0?"Select a registry...":o;let l;e[0]!==c?(l=s.jsx(ve,{className:"w-[200px] h-8!",children:s.jsx(Ne,{placeholder:c})}),e[0]=c,e[1]=l):l=e[1];let n;e[2]!==i?(n=i.map(Pe),e[2]=i,e[3]=n):n=e[3];let m;e[4]!==x||e[5]!==r?(m=r.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"}),r.map(d=>s.jsxs("button",{onClick:h=>{h.preventDefault(),h.stopPropagation(),x(d)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-xl 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:[d.icon?s.jsx("img",{src:d.icon,alt:d.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:d.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:d.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(Se,{size:16})})]},d.id??d.title))]}),e[4]=x,e[5]=r,e[6]=m):m=e[6];let p;e[7]!==n||e[8]!==m?(p=s.jsxs(ye,{children:[n,m]}),e[7]=n,e[8]=m,e[9]=p):p=e[9];let j;return e[10]!==a||e[11]!==l||e[12]!==p||e[13]!==f?(j=s.jsxs(Ce,{value:f,onValueChange:a,children:[l,p]}),e[10]=a,e[11]=l,e[12]=p,e[13]=f,e[14]=j):j=e[14],j}function Pe(t){return s.jsx(je,{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 Me({registries:t,onConnected:e}){const i=W(),{org:{slug:f}}=V(),{data:a}=G.useSession(),x=F(),[r,o]=K.useState(!1),c=t[0],l=async()=>{if(!(!c||!a?.user?.id)){o(!0);try{const m=await i.create.mutateAsync(c);e?.(m.id)}finally{o(!1)}}},n=()=>{x({to:"/$org/mcps",params:{org:f},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 MCP Servers from the community.",actions:s.jsxs(s.Fragment,{children:[s.jsxs(_,{variant:"outline",onClick:l,disabled:r||!c,children:[c?.icon&&s.jsx("img",{src:c.icon,alt:"",className:"size-4"}),r?"Installing...":"Install Registry"]}),s.jsx(_,{variant:"outline",onClick:n,children:"Install MCP Server"})]})})}function ut(){const t=$.c(41),{org:e}=V(),i=se(),f=W(),a=q(),x=a.location.pathname.includes("/store/")&&a.location.pathname.split("/").length>3,r=we(i);let o;t[0]!==r?(o=r.map(Ve),t[0]=r,t[1]=o):o=t[1];const c=o;let l;t[2]!==e.slug?(l=be.selectedRegistry(e.slug),t[2]=e.slug,t[3]=l):l=t[3];const[n,m]=Ie(l,De);let p;if(t[4]!==r||t[5]!==n){let N;t[7]!==n?(N=z=>z.id===n,t[7]=n,t[8]=N):N=t[8],p=r.find(N),t[4]=r,t[5]=n,t[6]=p}else p=t[6];const d=p?.id||r[0]?.id||"";let h;t[9]!==e.id?(h=Z(e.id),t[9]=e.id,t[10]=h):h=t[10];let g;t[11]!==h?(g=[h],t[11]=h,t[12]=g):g=t[12];const y=g;let C;t[13]===Symbol.for("react.memo_cache_sentinel")?(C=[J()],t[13]=C):C=t[13];const b=C;let S;t[14]!==f.create||t[15]!==m?(S=async N=>{const z=await f.create.mutateAsync(N);m(z.id)},t[14]=f.create,t[15]=m,t[16]=S):S=t[16];const I=S;let v;t[17]!==r?(v=new Set(r.map(ze)),t[17]=r,t[18]=v):v=t[18];const u=v;let w;t[19]!==u||t[20]!==y?(w=y.filter(N=>N.id&&!u.has(N.id)),t[19]=u,t[20]=y,t[21]=w):w=t[21];const k=w;let T;t[22]!==u?(T=b.filter(N=>N.id&&!u.has(N.id)),t[22]=u,t[23]=T):T=t[23];const R=T;if(x){let N;return t[24]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Y,{}),t[24]=N):N=t[24],N}let L;t[25]!==I?(L=async N=>I(N),t[25]=I,t[26]=L):L=t[26];let E;t[27]!==k||t[28]!==d||t[29]!==c||t[30]!==m||t[31]!==L?(E=s.jsx(Q,{title:"Store",ctaButton:s.jsx($e,{wellKnownRegistries:k,registries:c,value:d,onValueChange:m,onAddWellKnown:L,placeholder:"Select store..."})}),t[27]=k,t[28]=d,t[29]=c,t[30]=m,t[31]=L,t[32]=E):E=t[32];let P;t[33]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(O,{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]=P):P=t[33];let A;t[34]!==R||t[35]!==d||t[36]!==m?(A=s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:s.jsx(K.Suspense,{fallback:P,children:d?s.jsx(Ae,{registryId:d}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(Me,{registries:R,onConnected:N=>{m(N)}})})})}),t[34]=R,t[35]=d,t[36]=m,t[37]=A):A=t[37];let M;return t[38]!==E||t[39]!==A?(M=s.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[E,A]}),t[38]=E,t[39]=A,t[40]=M):M=t[40],M}function ze(t){return t.id}function De(){return""}function Ve(t){return{id:t.id,name:t.title,icon:t.icon||void 0}}export{ut as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as D,c as _,j as s,f as ve,d as Se,b as Ie,a as _e,t as he}from"./index-D_9U2egr.js";import{i as Le}from"./AlertCircle-CkBPRGL_.js";import{i as je}from"./Loading01-DfUJLT5a.js";import{B as ie}from"./button-UpWqqi7Z.js";import{i as Ae}from"./ArrowLeft-eDq0PdxL.js";import{I as ye,a as Ee,u as De,b as Me,c as Ue}from"./use-connection-CCY0Xwwp.js";import{t as Ve}from"./ChevronDown-CqrF2uJ-.js";import{s as ge}from"./Plus-xQLsl9Xg.js";import{b as $e,D as Re,a as ze,d as Be}from"./dropdown-menu-B_pozn9G.js";import{n as be}from"./LinkExternal01-ClKXW-wQ.js";import{E as Pe}from"./SearchMd-BAWY3jJ1.js";import{T as Ge,R as Fe}from"./tools-list-ReDr32oC.js";import{R as Oe}from"./resource-tabs-CwnllnxC.js";import{a as We}from"./use-binding-q2q9V0d9.js";import{u as He}from"./use-tool-call-DTxbLF2G.js";import{u as Ze}from"./use-mcp-W5evRIL-.js";import{u as Ne}from"./tooltip-CaoJSXa7.js";import{e as Ke}from"./extract-connection-data-DzWc2H-V.js";import{s as qe}from"./slugify-CEUa2lfQ.js";import{f as Je,e as Qe,b as Xe,c as Ye,g as et}from"./registry-utils-ulDDT0d8.js";import{e as tt}from"./app-name-gTETL9So.js";import{i as st}from"./InfoCircle-CaOedrxe.js";import"./useQuery-BTda2D25.js";import"./File06-CwcvFGqd.js";import"./collection-display-button-CJMwmXuc.js";import"./view-mode-toggle-BWA1OFcI.js";import"./collection-search-xvAQUbQ8.js";import"./input-DNanPJKs.js";import"./collection-table-wrapper-BLpgESGM.js";import"./card-csaWOT-1.js";import"./layout-Cx9b8Yer.js";import"./badge-DBsMMhww.js";import"./auth-Ds7lWA5K.js";import"./generate-id-Dyweu44Y.js";const Ce=({size:t=24,color:e="currentColor",...o})=>D.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},D.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",...o})=>D.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},D.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 ot(t){const e=_.c(3),{message:o}=t,n=o===void 0?"Loading app details...":o;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(je,{size:48,className:"animate-spin mb-4"}),e[0]=r):r=e[0];let i;return e[1]!==n?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[r,s.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),e[1]=n,e[2]=i):i=e[2],i}function rt(t){const e=_.c(9),{error:o,onBack:n}=t,r=o instanceof Error?o.message:o;let i,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Le,{size:48,className:"text-destructive mb-4"}),d=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading app"}),e[0]=i,e[1]=d):(i=e[0],d=e[1]);let a;e[2]!==r?(a=s.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:r}),e[2]=r,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 m;return e[6]!==a||e[7]!==l?(m=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]=m):m=e[8],m}function nt(t){const e=_.c(5),{onBack:o}=t;let n,r,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(we,{size:48,className:"text-muted-foreground mb-4"}),r=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"App not found"}),i=s.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:"The app you're looking for doesn't exist in this store."}),e[0]=n,e[1]=r,e[2]=i):(n=e[0],r=e[1],i=e[2]);let d;return e[3]!==o?(d=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n,r,i,s.jsx("button",{onClick:o,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]=o,e[4]=d):d=e[4],d}function it(t){const e=_.c(3),{onBack:o}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Ae,{}),e[0]=n):n=e[0];let r;return e[1]!==o?(r=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:o,"aria-label":"Go back",children:n})})}),e[1]=o,e[2]=r):r=e[2],r}function lt(t){const e=_.c(25),{data:o,itemVersions:n,onInstall:r,canInstall:i,isInstalling:d}=t,a=i===void 0?!0:i,l=d===void 0?!1:d,[m,p]=D.useState(0);let x;e[0]!==r?(x=S=>{p(S),r(S)},e[0]=r,e[1]=x):x=e[1];const f=x;let h;e[2]!==o.icon||e[3]!==o.name?(h=s.jsx(ye,{icon:o.icon,name:o.name,size:"lg",className:"shrink-0 shadow-sm"}),e[2]=o.icon,e[3]=o.name,e[4]=h):h=e[4];let g;e[5]!==o.name?(g=s.jsx("h1",{className:"text-3xl font-medium",children:o.name}),e[5]=o.name,e[6]=g):g=e[6];let b;e[7]!==o.verified?(b=o.verified&&s.jsx("img",{src:"/verified-badge.svg",alt:"Verified",className:"w-5 h-5 shrink-0"}),e[7]=o.verified,e[8]=b):b=e[8];let y;e[9]!==g||e[10]!==b?(y=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsxs("div",{className:"flex items-center gap-2",children:[g,b]})}),e[9]=g,e[10]=b,e[11]=y):y=e[11];let N;e[12]!==a||e[13]!==f||e[14]!==l||e[15]!==n||e[16]!==r||e[17]!==m?(N=a?s.jsx("div",{className:"shrink-0",children:n.length>1?s.jsxs("div",{className:"flex",children:[s.jsxs(ie,{variant:"brand",onClick:()=>f(0),disabled:l,className:"shrink-0 rounded-r-none cursor-pointer",children:[s.jsx(ge,{size:20}),l?"Connecting...":"Connect MCP Server"]}),s.jsxs($e,{children:[s.jsx(Re,{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(ze,{align:"end",className:"w-56 max-h-[300px] overflow-y-auto",children:n.map((S,w)=>{const I=S._meta?.["io.modelcontextprotocol.registry/official"];return s.jsx(Be,{onClick:()=>f(w),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",S.server?.version||"unknown"]}),I?.isLatest&&s.jsx("div",{className:"text-xs text-muted-foreground/50 font-semibold",children:"LATEST"})]}),w===m&&s.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0"})]})},w)})})]})]}):s.jsxs(ie,{variant:"brand",onClick:()=>r(),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[12]=a,e[13]=f,e[14]=l,e[15]=n,e[16]=r,e[17]=m,e[18]=N):N=e[18];let C;e[19]!==y||e[20]!==N?(C=s.jsxs("div",{className:"flex-1 min-w-0 flex items-center justify-between",children:[y,N]}),e[19]=y,e[20]=N,e[21]=C):C=e[21];let T;return e[22]!==h||e[23]!==C?(T=s.jsxs("div",{className:"flex items-center gap-4 py-8 px-5 border-b border-border",children:[h,C]}),e[22]=h,e[23]=C,e[24]=T):T=e[24],T}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=_.c(45),{data:o,publisherInfo:n,selectedItem:r}=t;let i;e[0]!==o.description?(i=o.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:o.description})]}),e[0]=o.description,e[1]=i):i=e[1];const d=o.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":o.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]!==o.publisher?(l=o.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":o.publisher.charAt(0).toUpperCase()+o.publisher.slice(1),e[5]=o.publisher,e[6]=l):l=e[6];let m;e[7]!==l?(m=s.jsx("div",{className:"font-medium",children:l}),e[7]=l,e[8]=m):m=e[8];let p;e[9]!==n.count?(p=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 app":"published apps"]})]}):"Publisher",e[9]=n.count,e[10]=p):p=e[10];let x;e[11]!==p?(x=s.jsx("div",{className:"text-xs text-muted-foreground flex items-center gap-1",children:p}),e[11]=p,e[12]=x):x=e[12];let f;e[13]!==m||e[14]!==x?(f=s.jsxs("div",{children:[m,x]}),e[13]=m,e[14]=x,e[15]=f):f=e[15];let h;e[16]!==a||e[17]!==f?(h=s.jsx("div",{className:"px-5 border-b border-border",children:s.jsxs("div",{className:"flex items-center gap-3 py-5",children:[a,f]})}),e[16]=a,e[17]=f,e[18]=h):h=e[18];let g;e[19]!==o.version?(g=o.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",o.version]})]}),e[19]=o.version,e[20]=g):g=e[20];let b;e[21]!==o.connectionType?(b=o.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:o.connectionType})]}),e[21]=o.connectionType,e[22]=b):b=e[22];let y;e[23]!==o.schemaVersion?(y=o.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:o.schemaVersion})]}),e[23]=o.schemaVersion,e[24]=y):y=e[24];let N;e[25]!==o.websiteUrl?(N=o.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:o.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[25]=o.websiteUrl,e[26]=N):N=e[26];let C;e[27]!==o.repository?(C=o.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:o.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[27]=o.repository,e[28]=C):C=e[28];let T;e[29]!==g||e[30]!==b||e[31]!==y||e[32]!==N||e[33]!==C?(T=s.jsxs("div",{className:"px-5 py-5 border-b border-border space-y-4",children:[g,b,y,N,C]}),e[29]=g,e[30]=b,e[31]=y,e[32]=N,e[33]=C,e[34]=T):T=e[34];let S;e[35]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("span",{className:"text-foreground text-sm",children:"Last Updated"}),e[35]=S):S=e[35];let w;e[36]!==r.updated_at?(w=at(r.updated_at),e[36]=r.updated_at,e[37]=w):w=e[37];let I;e[38]!==w?(I=s.jsxs("div",{className:"px-5 py-5 text-sm flex justify-between items-center border-b border-border",children:[S,s.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:w})]}),e[38]=w,e[39]=I):I=e[39];let u;return e[40]!==i||e[41]!==T||e[42]!==I||e[43]!==h?(u=s.jsxs("div",{className:"lg:col-span-1 flex flex-col pt-5",children:[i,h,T,I]}),e[40]=i,e[41]=T,e[42]=I,e[43]=h,e[44]=u):u=e[44],u}function dt(t){const e=_.c(18),{data:o,availableTabs:n,effectiveActiveTabId:r,effectiveTools:i,isLoadingTools:d,onTabChange:a}=t,l=d===void 0?!1:d;let m;e[0]!==i?(m=i.map(mt),e[0]=i,e[1]=m):m=e[1];const p=m;let x;e[2]!==n||e[3]!==r||e[4]!==a?(x=n.length>0&&s.jsx("div",{className:"px-4 py-2 border-b border-border bg-background",children:s.jsx(Oe,{tabs:n,activeTab:r,onTabChange:a})}),e[2]=n,e[3]=r,e[4]=a,e[5]=x):x=e[5];let f;e[6]!==r||e[7]!==i.length||e[8]!==l||e[9]!==p?(f=r==="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:p,showToolbar:!1,emptyMessage:"This app doesn't have any tools."}):s.jsx(Pe,{image:null,title:"No tools available",description:"This app doesn't have any tools."})}),e[6]=r,e[7]=i.length,e[8]=l,e[9]=p,e[10]=f):f=e[10];let h;e[11]!==o?.repository||e[12]!==r?(h=r==="readme"&&s.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:s.jsx(Fe,{repository:o?.repository})}),e[11]=o?.repository,e[12]=r,e[13]=h):h=e[13];let g;return e[14]!==x||e[15]!==f||e[16]!==h?(g=s.jsxs("div",{className:"lg:col-span-2 flex flex-col border-l border-border",children:[x,f,h]}),e[14]=x,e[15]=f,e[16]=h,e[17]=g):g=e[17],g}function mt(t){const e=t;return{name:e.name||"",description:e.description||void 0}}function ft(t,e){if(!t||!e)return;const o=e.toLowerCase();return t.find(n=>n.app_name?.toLowerCase()===o||n.app_id?.toLowerCase()===o||n.title.toLowerCase()===o)||t.find(n=>n.title.toLowerCase().includes(o))}function ut(t,e,o,n,r){if(!e||e==="Unknown")return{count:0};if(e==="io.modelcontextprotocol.registry/official")return{logo:n?.icon||void 0,count:r??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:o?.icon||d[0]?.publisher_logo||d[0]?.icon||void 0,count:d.length}}function pt(t){const e=t.server._meta?.["mcp.mesh/publisher-provided"],o=t._meta?.["mcp.mesh"],n=t._meta?.["io.modelcontextprotocol.registry/official"],r=t.server,i=Xe(r.remotes?.[0]?.type),d=Ye(r.$schema),a=n?"io.modelcontextprotocol.registry/official":t.publisher||o?.scopeName||"Unknown",l=et(r.repository),m=t.icon||t.image||t.logo||r.icons?.[0]?.src||l||null,p=t.name||t.title||t.server?.title||"Unnamed Item";return{name:tt(p),description:t.description||t.summary||t.server?.description||"",icon:m,verified:t.verified||o?.verified,publisher:a,version:r.version||null,websiteUrl:r.websiteUrl||null,repository:r.repository||null,schemaVersion:d??null,connectionType:i,connectionUrl:null,remoteUrl:null,tools:t.tools||r.tools||e?.tools||[],models:t.models||r.models||e?.models||[],emails:t.emails||r.emails||e?.emails||[],analytics:t.analytics||r.analytics||e?.analytics,cdn:t.cdn||r.cdn||e?.cdn}}class xt extends D.Component{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,o){console.error("Store app detail error:",e,o)}render(){return this.state.hasError?s.jsx(rt,{error:this.state.error||new Error("Unknown error"),onBack:this.props.onBack}):this.props.children}}function ht(){const t=_.c(70),{org:e}=Ne(),o=ve();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const{appName:r}=Se(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}=Ie(i),[l,m]=D.useState("readme"),p=Ee(),x=De(),{data:f}=_e.useSession(),h=We(x),g=d||h[0]?.id||"",b=Me(g),y=Je(b?.tools),N=b?.tools&&b.tools.find(yt)?.name||"",C=b?.tools&&b.tools.find(jt)?.name||"",T=Ue(g),S=!!a;let w,I;S?(w=N||C,I={name:a}):(w=y,I={});const{data:u}=He({toolCaller:T,toolName:w,toolInputParams:I,scope:g});let M=[],L=[],pe=null;if(u){if(Array.isArray(u))M=u;else if(typeof u=="object"&&u!==null)if("totalCount"in u&&typeof u.totalCount=="number"&&(pe=u.totalCount),"item"in u&&u.item){const c=u.item,k=c.id||"",U=c.server,V=c._meta;let E;t[2]!==c.title||t[3]!==k||t[4]!==U||t[5]!==V?(E=[{id:k,title:c.title,server:U,_meta:V}],t[2]=c.title,t[3]=k,t[4]=U,t[5]=V,t[6]=E):E=t[6],M=E}else{let c;"versions"in u&&Array.isArray(u.versions)?c="versions":"servers"in u&&Array.isArray(u.servers)?c="servers":c=Object.keys(u).find(k=>Array.isArray(u[k])),c&&(M=u[c],(c==="versions"||w?.includes("VERSIONS"))&&(L=M))}}let X;t[7]!==r?(X=c=>{const k=c.name||c.title||c.server.title||"";return qe(k)===r},t[7]=r,t[8]=X):X=t[8];let j=M.find(X);if(!j&&a){let c;t[9]!==a?(c=k=>k.server.name===a||k.name===a||k.title===a,t[9]=a,t[10]=c):c=t[10],j=M.find(c)}const v=j?pt(j):null,le=(v?.tools?.length||0)>0,ae=j?.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(vt):[],t[11]=Q,t[12]=J,t[13]=ee):ee=t[13];const xe=ee,$=le?v?.tools||[]:xe,ke=ft(x,v?.publisher),ce=v?ut(M,v.publisher,ke,b??null,pe):{count:0},Te=v?.repository?Qe(v.repository):null,de=!!v?.repository&&!!Te;let R;t[14]!==de?(R={id:"readme",label:"README",visible:de},t[14]=de,t[15]=R):R=t[15];const me=le||xe.length>0||Y&&!!ae;let z;t[16]!==$.length||t[17]!==me?(z={id:"tools",label:"Tools",count:$.length,visible:me},t[16]=$.length,t[17]=me,t[18]=z):z=t[18];let te;t[19]!==R||t[20]!==z?(te=[R,z].filter(bt),t[19]=R,t[20]=z,t[21]=te):te=t[21];const A=te;let se;t[22]!==l||t[23]!==A?(se=A.find(c=>c.id===l)?l:A.find(gt)?.id||A[0]?.id||"overview",t[22]=l,t[23]=A,t[24]=se):se=t[24];const fe=se;let oe;t[25]!==p||t[26]!==L||t[27]!==o||t[28]!==e||t[29]!==j||t[30]!==f?(oe=async c=>{const k=L[c??0]||j;if(!k||!e||!f?.user?.id)return;const U=Ke(k,e.id,f.user.id);if(!U.connection_url){he.error("This MCP Server cannot be connected: no connection URL available");return}try{const{id:V}=await p.create.mutateAsync(U);o({to:"/$org/mcps/$connectionId",params:{org:e.slug,connectionId:V}})}catch(V){const E=V;he.error(`Failed to connect MCP Server: ${E instanceof Error?E.message:String(E)}`)}},t[25]=p,t[26]=L,t[27]=o,t[28]=e,t[29]=j,t[30]=f,t[31]=oe):oe=t[31];const ue=oe;let re;t[32]!==o||t[33]!==e.slug?(re=()=>{o({to:"/$org/store",params:{org:e.slug}})},t[32]=o,t[33]=e.slug,t[34]=re):re=t[34];const B=re;if(!j){let c;return t[35]!==B?(c=s.jsx(nt,{onBack:B}),t[35]=B,t[36]=c):c=t[36],c}if(!v)return null;const P=(j?.server?.remotes?.length??0)>0;let G;t[37]!==B?(G=s.jsx(it,{onBack:B}),t[37]=B,t[38]=G):G=t[38];let F;t[39]!==P?(F=!P&&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]=P,t[40]=F):F=t[40];let O;t[41]!==L||t[42]!==j?(O=L.length>0?L:[j],t[41]=L,t[42]=j,t[43]=O):O=t[43];let W;t[44]!==p.create.isPending||t[45]!==P||t[46]!==v||t[47]!==ue||t[48]!==O?(W=s.jsx(lt,{data:v,itemVersions:O,onInstall:ue,canInstall:P,isInstalling:p.create.isPending}),t[44]=p.create.isPending,t[45]=P,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]!==j?(H=s.jsx(ct,{data:v,publisherInfo:ce,selectedItem:j}),t[50]=v,t[51]=ce,t[52]=j,t[53]=H):H=t[53];let Z;t[54]!==A||t[55]!==v||t[56]!==fe||t[57]!==$||t[58]!==Y?(Z=s.jsx(dt,{data:v,availableTabs:A,effectiveActiveTabId:fe,effectiveTools:$,isLoadingTools:Y,onTabChange:m}),t[54]=A,t[55]=v,t[56]=fe,t[57]=$,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 gt(t){return t.id==="readme"}function bt(t){return t.visible}function vt(t){return{name:t.name,description:t.description}}function jt(t){return t.name.endsWith("_GET")}function yt(t){return t.name.endsWith("_VERSIONS")}function ss(){const t=_.c(6),{org:e}=Ne(),o=ve();let n;t[0]!==o||t[1]!==e.slug?(n=()=>{o({to:"/$org/store",params:{org:e.slug}})},t[0]=o,t[1]=e.slug,t[2]=n):n=t[2];const r=n;let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(D.Suspense,{fallback:s.jsx(ot,{}),children:s.jsx(ht,{})}),t[3]=i):i=t[3];let d;return t[4]!==r?(d=s.jsx(xt,{onBack:r,children:i}),t[4]=r,t[5]=d):d=t[5],d}export{ss as default};
|
|
1
|
+
import{r as D,c as _,j as s,f as ve,d as Se,b as Ie,a as _e,t as he}from"./index-DkE856zJ.js";import{i as Le}from"./AlertCircle-Du1WT751.js";import{i as je}from"./Loading01-CH6mw7mn.js";import{B as ie}from"./button-Dj8ueofv.js";import{i as Ae}from"./ArrowLeft-D2XEhobZ.js";import{I as ye,a as Ee,u as De,b as Me,c as Ue}from"./use-connection-B9P3V0a0.js";import{t as Ve}from"./ChevronDown-BTsoCUlX.js";import{s as ge}from"./Plus-D2stpxr4.js";import{b as $e,D as Re,a as ze,d as Be}from"./dropdown-menu-BUANjhM2.js";import{n as be}from"./LinkExternal01-UPDE0V2O.js";import{E as Pe}from"./SearchMd-CwAqtJqG.js";import{T as Ge,R as Fe}from"./tools-list-D_OD1vn5.js";import{R as Oe}from"./resource-tabs-BeL7wdCw.js";import{a as We}from"./use-binding-Dx0VfUue.js";import{u as He}from"./use-tool-call-Betk01yc.js";import{u as Ze}from"./use-mcp-B4HuTx_L.js";import{u as Ne}from"./tooltip-CNuF1S13.js";import{e as Ke}from"./extract-connection-data-BD7XgNcV.js";import{s as qe}from"./slugify-CEUa2lfQ.js";import{f as Je,e as Qe,b as Xe,c as Ye,g as et}from"./registry-utils-ulDDT0d8.js";import{e as tt}from"./app-name-gTETL9So.js";import{i as st}from"./InfoCircle-z9SmeZ2K.js";import"./useQuery-BDcaqn5m.js";import"./File06-CCcPYdcS.js";import"./collection-display-button-C193PAy9.js";import"./view-mode-toggle-CIqr2uxV.js";import"./collection-search-Vq1GfSWB.js";import"./input-C2Ph-V5_.js";import"./collection-table-wrapper-BCXAi-BN.js";import"./card-66QSeiOF.js";import"./layout-DqSCBByW.js";import"./badge-BcTlBuEb.js";import"./auth-TMT6XsET.js";import"./generate-id-Dyweu44Y.js";const Ce=({size:t=24,color:e="currentColor",...o})=>D.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},D.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",...o})=>D.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},D.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 ot(t){const e=_.c(3),{message:o}=t,n=o===void 0?"Loading app details...":o;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(je,{size:48,className:"animate-spin mb-4"}),e[0]=r):r=e[0];let i;return e[1]!==n?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[r,s.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),e[1]=n,e[2]=i):i=e[2],i}function rt(t){const e=_.c(9),{error:o,onBack:n}=t,r=o instanceof Error?o.message:o;let i,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Le,{size:48,className:"text-destructive mb-4"}),d=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading app"}),e[0]=i,e[1]=d):(i=e[0],d=e[1]);let a;e[2]!==r?(a=s.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:r}),e[2]=r,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 m;return e[6]!==a||e[7]!==l?(m=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]=m):m=e[8],m}function nt(t){const e=_.c(5),{onBack:o}=t;let n,r,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(we,{size:48,className:"text-muted-foreground mb-4"}),r=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"App not found"}),i=s.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:"The app you're looking for doesn't exist in this store."}),e[0]=n,e[1]=r,e[2]=i):(n=e[0],r=e[1],i=e[2]);let d;return e[3]!==o?(d=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n,r,i,s.jsx("button",{onClick:o,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]=o,e[4]=d):d=e[4],d}function it(t){const e=_.c(3),{onBack:o}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Ae,{}),e[0]=n):n=e[0];let r;return e[1]!==o?(r=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:o,"aria-label":"Go back",children:n})})}),e[1]=o,e[2]=r):r=e[2],r}function lt(t){const e=_.c(25),{data:o,itemVersions:n,onInstall:r,canInstall:i,isInstalling:d}=t,a=i===void 0?!0:i,l=d===void 0?!1:d,[m,p]=D.useState(0);let x;e[0]!==r?(x=S=>{p(S),r(S)},e[0]=r,e[1]=x):x=e[1];const f=x;let h;e[2]!==o.icon||e[3]!==o.name?(h=s.jsx(ye,{icon:o.icon,name:o.name,size:"lg",className:"shrink-0 shadow-sm"}),e[2]=o.icon,e[3]=o.name,e[4]=h):h=e[4];let g;e[5]!==o.name?(g=s.jsx("h1",{className:"text-3xl font-medium",children:o.name}),e[5]=o.name,e[6]=g):g=e[6];let b;e[7]!==o.verified?(b=o.verified&&s.jsx("img",{src:"/verified-badge.svg",alt:"Verified",className:"w-5 h-5 shrink-0"}),e[7]=o.verified,e[8]=b):b=e[8];let y;e[9]!==g||e[10]!==b?(y=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsxs("div",{className:"flex items-center gap-2",children:[g,b]})}),e[9]=g,e[10]=b,e[11]=y):y=e[11];let N;e[12]!==a||e[13]!==f||e[14]!==l||e[15]!==n||e[16]!==r||e[17]!==m?(N=a?s.jsx("div",{className:"shrink-0",children:n.length>1?s.jsxs("div",{className:"flex",children:[s.jsxs(ie,{variant:"brand",onClick:()=>f(0),disabled:l,className:"shrink-0 rounded-r-none cursor-pointer",children:[s.jsx(ge,{size:20}),l?"Connecting...":"Connect MCP Server"]}),s.jsxs($e,{children:[s.jsx(Re,{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(ze,{align:"end",className:"w-56 max-h-[300px] overflow-y-auto",children:n.map((S,w)=>{const I=S._meta?.["io.modelcontextprotocol.registry/official"];return s.jsx(Be,{onClick:()=>f(w),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",S.server?.version||"unknown"]}),I?.isLatest&&s.jsx("div",{className:"text-xs text-muted-foreground/50 font-semibold",children:"LATEST"})]}),w===m&&s.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0"})]})},w)})})]})]}):s.jsxs(ie,{variant:"brand",onClick:()=>r(),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[12]=a,e[13]=f,e[14]=l,e[15]=n,e[16]=r,e[17]=m,e[18]=N):N=e[18];let C;e[19]!==y||e[20]!==N?(C=s.jsxs("div",{className:"flex-1 min-w-0 flex items-center justify-between",children:[y,N]}),e[19]=y,e[20]=N,e[21]=C):C=e[21];let T;return e[22]!==h||e[23]!==C?(T=s.jsxs("div",{className:"flex items-center gap-4 py-8 px-5 border-b border-border",children:[h,C]}),e[22]=h,e[23]=C,e[24]=T):T=e[24],T}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=_.c(45),{data:o,publisherInfo:n,selectedItem:r}=t;let i;e[0]!==o.description?(i=o.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:o.description})]}),e[0]=o.description,e[1]=i):i=e[1];const d=o.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":o.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]!==o.publisher?(l=o.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":o.publisher.charAt(0).toUpperCase()+o.publisher.slice(1),e[5]=o.publisher,e[6]=l):l=e[6];let m;e[7]!==l?(m=s.jsx("div",{className:"font-medium",children:l}),e[7]=l,e[8]=m):m=e[8];let p;e[9]!==n.count?(p=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 app":"published apps"]})]}):"Publisher",e[9]=n.count,e[10]=p):p=e[10];let x;e[11]!==p?(x=s.jsx("div",{className:"text-xs text-muted-foreground flex items-center gap-1",children:p}),e[11]=p,e[12]=x):x=e[12];let f;e[13]!==m||e[14]!==x?(f=s.jsxs("div",{children:[m,x]}),e[13]=m,e[14]=x,e[15]=f):f=e[15];let h;e[16]!==a||e[17]!==f?(h=s.jsx("div",{className:"px-5 border-b border-border",children:s.jsxs("div",{className:"flex items-center gap-3 py-5",children:[a,f]})}),e[16]=a,e[17]=f,e[18]=h):h=e[18];let g;e[19]!==o.version?(g=o.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",o.version]})]}),e[19]=o.version,e[20]=g):g=e[20];let b;e[21]!==o.connectionType?(b=o.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:o.connectionType})]}),e[21]=o.connectionType,e[22]=b):b=e[22];let y;e[23]!==o.schemaVersion?(y=o.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:o.schemaVersion})]}),e[23]=o.schemaVersion,e[24]=y):y=e[24];let N;e[25]!==o.websiteUrl?(N=o.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:o.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[25]=o.websiteUrl,e[26]=N):N=e[26];let C;e[27]!==o.repository?(C=o.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:o.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[27]=o.repository,e[28]=C):C=e[28];let T;e[29]!==g||e[30]!==b||e[31]!==y||e[32]!==N||e[33]!==C?(T=s.jsxs("div",{className:"px-5 py-5 border-b border-border space-y-4",children:[g,b,y,N,C]}),e[29]=g,e[30]=b,e[31]=y,e[32]=N,e[33]=C,e[34]=T):T=e[34];let S;e[35]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("span",{className:"text-foreground text-sm",children:"Last Updated"}),e[35]=S):S=e[35];let w;e[36]!==r.updated_at?(w=at(r.updated_at),e[36]=r.updated_at,e[37]=w):w=e[37];let I;e[38]!==w?(I=s.jsxs("div",{className:"px-5 py-5 text-sm flex justify-between items-center border-b border-border",children:[S,s.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:w})]}),e[38]=w,e[39]=I):I=e[39];let u;return e[40]!==i||e[41]!==T||e[42]!==I||e[43]!==h?(u=s.jsxs("div",{className:"lg:col-span-1 flex flex-col pt-5",children:[i,h,T,I]}),e[40]=i,e[41]=T,e[42]=I,e[43]=h,e[44]=u):u=e[44],u}function dt(t){const e=_.c(18),{data:o,availableTabs:n,effectiveActiveTabId:r,effectiveTools:i,isLoadingTools:d,onTabChange:a}=t,l=d===void 0?!1:d;let m;e[0]!==i?(m=i.map(mt),e[0]=i,e[1]=m):m=e[1];const p=m;let x;e[2]!==n||e[3]!==r||e[4]!==a?(x=n.length>0&&s.jsx("div",{className:"px-4 py-2 border-b border-border bg-background",children:s.jsx(Oe,{tabs:n,activeTab:r,onTabChange:a})}),e[2]=n,e[3]=r,e[4]=a,e[5]=x):x=e[5];let f;e[6]!==r||e[7]!==i.length||e[8]!==l||e[9]!==p?(f=r==="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:p,showToolbar:!1,emptyMessage:"This app doesn't have any tools."}):s.jsx(Pe,{image:null,title:"No tools available",description:"This app doesn't have any tools."})}),e[6]=r,e[7]=i.length,e[8]=l,e[9]=p,e[10]=f):f=e[10];let h;e[11]!==o?.repository||e[12]!==r?(h=r==="readme"&&s.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:s.jsx(Fe,{repository:o?.repository})}),e[11]=o?.repository,e[12]=r,e[13]=h):h=e[13];let g;return e[14]!==x||e[15]!==f||e[16]!==h?(g=s.jsxs("div",{className:"lg:col-span-2 flex flex-col border-l border-border",children:[x,f,h]}),e[14]=x,e[15]=f,e[16]=h,e[17]=g):g=e[17],g}function mt(t){const e=t;return{name:e.name||"",description:e.description||void 0}}function ft(t,e){if(!t||!e)return;const o=e.toLowerCase();return t.find(n=>n.app_name?.toLowerCase()===o||n.app_id?.toLowerCase()===o||n.title.toLowerCase()===o)||t.find(n=>n.title.toLowerCase().includes(o))}function ut(t,e,o,n,r){if(!e||e==="Unknown")return{count:0};if(e==="io.modelcontextprotocol.registry/official")return{logo:n?.icon||void 0,count:r??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:o?.icon||d[0]?.publisher_logo||d[0]?.icon||void 0,count:d.length}}function pt(t){const e=t.server._meta?.["mcp.mesh/publisher-provided"],o=t._meta?.["mcp.mesh"],n=t._meta?.["io.modelcontextprotocol.registry/official"],r=t.server,i=Xe(r.remotes?.[0]?.type),d=Ye(r.$schema),a=n?"io.modelcontextprotocol.registry/official":t.publisher||o?.scopeName||"Unknown",l=et(r.repository),m=t.icon||t.image||t.logo||r.icons?.[0]?.src||l||null,p=t.name||t.title||t.server?.title||"Unnamed Item";return{name:tt(p),description:t.description||t.summary||t.server?.description||"",icon:m,verified:t.verified||o?.verified,publisher:a,version:r.version||null,websiteUrl:r.websiteUrl||null,repository:r.repository||null,schemaVersion:d??null,connectionType:i,connectionUrl:null,remoteUrl:null,tools:t.tools||r.tools||e?.tools||[],models:t.models||r.models||e?.models||[],emails:t.emails||r.emails||e?.emails||[],analytics:t.analytics||r.analytics||e?.analytics,cdn:t.cdn||r.cdn||e?.cdn}}class xt extends D.Component{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,o){console.error("Store app detail error:",e,o)}render(){return this.state.hasError?s.jsx(rt,{error:this.state.error||new Error("Unknown error"),onBack:this.props.onBack}):this.props.children}}function ht(){const t=_.c(70),{org:e}=Ne(),o=ve();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const{appName:r}=Se(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}=Ie(i),[l,m]=D.useState("readme"),p=Ee(),x=De(),{data:f}=_e.useSession(),h=We(x),g=d||h[0]?.id||"",b=Me(g),y=Je(b?.tools),N=b?.tools&&b.tools.find(yt)?.name||"",C=b?.tools&&b.tools.find(jt)?.name||"",T=Ue(g),S=!!a;let w,I;S?(w=N||C,I={name:a}):(w=y,I={});const{data:u}=He({toolCaller:T,toolName:w,toolInputParams:I,scope:g});let M=[],L=[],pe=null;if(u){if(Array.isArray(u))M=u;else if(typeof u=="object"&&u!==null)if("totalCount"in u&&typeof u.totalCount=="number"&&(pe=u.totalCount),"item"in u&&u.item){const c=u.item,k=c.id||"",U=c.server,V=c._meta;let E;t[2]!==c.title||t[3]!==k||t[4]!==U||t[5]!==V?(E=[{id:k,title:c.title,server:U,_meta:V}],t[2]=c.title,t[3]=k,t[4]=U,t[5]=V,t[6]=E):E=t[6],M=E}else{let c;"versions"in u&&Array.isArray(u.versions)?c="versions":"servers"in u&&Array.isArray(u.servers)?c="servers":c=Object.keys(u).find(k=>Array.isArray(u[k])),c&&(M=u[c],(c==="versions"||w?.includes("VERSIONS"))&&(L=M))}}let X;t[7]!==r?(X=c=>{const k=c.name||c.title||c.server.title||"";return qe(k)===r},t[7]=r,t[8]=X):X=t[8];let j=M.find(X);if(!j&&a){let c;t[9]!==a?(c=k=>k.server.name===a||k.name===a||k.title===a,t[9]=a,t[10]=c):c=t[10],j=M.find(c)}const v=j?pt(j):null,le=(v?.tools?.length||0)>0,ae=j?.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(vt):[],t[11]=Q,t[12]=J,t[13]=ee):ee=t[13];const xe=ee,$=le?v?.tools||[]:xe,ke=ft(x,v?.publisher),ce=v?ut(M,v.publisher,ke,b??null,pe):{count:0},Te=v?.repository?Qe(v.repository):null,de=!!v?.repository&&!!Te;let R;t[14]!==de?(R={id:"readme",label:"README",visible:de},t[14]=de,t[15]=R):R=t[15];const me=le||xe.length>0||Y&&!!ae;let z;t[16]!==$.length||t[17]!==me?(z={id:"tools",label:"Tools",count:$.length,visible:me},t[16]=$.length,t[17]=me,t[18]=z):z=t[18];let te;t[19]!==R||t[20]!==z?(te=[R,z].filter(bt),t[19]=R,t[20]=z,t[21]=te):te=t[21];const A=te;let se;t[22]!==l||t[23]!==A?(se=A.find(c=>c.id===l)?l:A.find(gt)?.id||A[0]?.id||"overview",t[22]=l,t[23]=A,t[24]=se):se=t[24];const fe=se;let oe;t[25]!==p||t[26]!==L||t[27]!==o||t[28]!==e||t[29]!==j||t[30]!==f?(oe=async c=>{const k=L[c??0]||j;if(!k||!e||!f?.user?.id)return;const U=Ke(k,e.id,f.user.id);if(!U.connection_url){he.error("This MCP Server cannot be connected: no connection URL available");return}try{const{id:V}=await p.create.mutateAsync(U);o({to:"/$org/mcps/$connectionId",params:{org:e.slug,connectionId:V}})}catch(V){const E=V;he.error(`Failed to connect MCP Server: ${E instanceof Error?E.message:String(E)}`)}},t[25]=p,t[26]=L,t[27]=o,t[28]=e,t[29]=j,t[30]=f,t[31]=oe):oe=t[31];const ue=oe;let re;t[32]!==o||t[33]!==e.slug?(re=()=>{o({to:"/$org/store",params:{org:e.slug}})},t[32]=o,t[33]=e.slug,t[34]=re):re=t[34];const B=re;if(!j){let c;return t[35]!==B?(c=s.jsx(nt,{onBack:B}),t[35]=B,t[36]=c):c=t[36],c}if(!v)return null;const P=(j?.server?.remotes?.length??0)>0;let G;t[37]!==B?(G=s.jsx(it,{onBack:B}),t[37]=B,t[38]=G):G=t[38];let F;t[39]!==P?(F=!P&&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]=P,t[40]=F):F=t[40];let O;t[41]!==L||t[42]!==j?(O=L.length>0?L:[j],t[41]=L,t[42]=j,t[43]=O):O=t[43];let W;t[44]!==p.create.isPending||t[45]!==P||t[46]!==v||t[47]!==ue||t[48]!==O?(W=s.jsx(lt,{data:v,itemVersions:O,onInstall:ue,canInstall:P,isInstalling:p.create.isPending}),t[44]=p.create.isPending,t[45]=P,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]!==j?(H=s.jsx(ct,{data:v,publisherInfo:ce,selectedItem:j}),t[50]=v,t[51]=ce,t[52]=j,t[53]=H):H=t[53];let Z;t[54]!==A||t[55]!==v||t[56]!==fe||t[57]!==$||t[58]!==Y?(Z=s.jsx(dt,{data:v,availableTabs:A,effectiveActiveTabId:fe,effectiveTools:$,isLoadingTools:Y,onTabChange:m}),t[54]=A,t[55]=v,t[56]=fe,t[57]=$,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 gt(t){return t.id==="readme"}function bt(t){return t.visible}function vt(t){return{name:t.name,description:t.description}}function jt(t){return t.name.endsWith("_GET")}function yt(t){return t.name.endsWith("_VERSIONS")}function ss(){const t=_.c(6),{org:e}=Ne(),o=ve();let n;t[0]!==o||t[1]!==e.slug?(n=()=>{o({to:"/$org/store",params:{org:e.slug}})},t[0]=o,t[1]=e.slug,t[2]=n):n=t[2];const r=n;let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(D.Suspense,{fallback:s.jsx(ot,{}),children:s.jsx(ht,{})}),t[3]=i):i=t[3];let d;return t[4]!==r?(d=s.jsx(xt,{onBack:r,children:i}),t[4]=r,t[5]=d):d=t[5],d}export{ss as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as j,c as M,j as t,H as V,B as I,Z as z,z as W,E as X,aZ as G,a_ as J}from"./index-DkE856zJ.js";import{I as $,u as K}from"./use-connection-B9P3V0a0.js";import{C as F}from"./checkbox-CVcef9O7.js";import{c as S,B as Y}from"./button-Dj8ueofv.js";import{i as ee}from"./ArrowLeft-D2XEhobZ.js";import{C as te}from"./collection-search-Vq1GfSWB.js";const se=j.memo(function(o){const e=M.c(21),{connection:n,isSelected:r,hasToolsEnabled:c,activeToolsCount:i,totalToolsCount:x,onSelect:b,onToggle:g}=o,d=r?"bg-accent/50":"hover:bg-muted/50";let u;e[0]!==d?(u=S("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",d),e[0]=d,e[1]=u):u=e[1];let m;e[2]!==n.icon||e[3]!==n.title?(m=t.jsx($,{icon:n.icon,name:n.title,size:"xs"}),e[2]=n.icon,e[3]=n.title,e[4]=m):m=e[4];let p;e[5]!==n.title?(p=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:n.title})}),e[5]=n.title,e[6]=p):p=e[6];let a;e[7]!==b||e[8]!==m||e[9]!==p?(a=t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:b,children:[m,p]}),e[7]=b,e[8]=m,e[9]=p,e[10]=a):a=e[10];let f;e[11]!==i||e[12]!==n.tools||e[13]!==c||e[14]!==g||e[15]!==x?(f=n.tools&&n.tools.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[i,"/",x]}),t.jsx(F,{checked:c,onCheckedChange:g,onClick:ne})]}),e[11]=i,e[12]=n.tools,e[13]=c,e[14]=g,e[15]=x,e[16]=f):f=e[16];let C;return e[17]!==u||e[18]!==a||e[19]!==f?(C=t.jsxs("div",{className:u,children:[a,f]}),e[17]=u,e[18]=a,e[19]=f,e[20]=C):C=e[20],C}),oe=j.memo(function(o){const e=M.c(18),{connectionId:n,tool:r,isSelected:c,onToggle:i}=o,x=`tool-${n}-${r.name}`,b=c?"text-foreground":"text-muted-foreground";let g;e[0]!==b?(g=S("text-sm font-medium",b),e[0]=b,e[1]=g):g=e[1];let d;e[2]!==g||e[3]!==r.name?(d=t.jsx("div",{className:"flex items-center gap-2 mb-1",children:t.jsx("span",{className:g,children:r.name})}),e[2]=g,e[3]=r.name,e[4]=d):d=e[4];let u;e[5]!==r.description?(u=r.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:r.description}),e[5]=r.description,e[6]=u):u=e[6];let m;e[7]!==d||e[8]!==u?(m=t.jsxs("div",{className:"flex-1 min-w-0",children:[d,u]}),e[7]=d,e[8]=u,e[9]=m):m=e[9];const p=`tool-${n}-${r.name}`;let a;e[10]!==c||e[11]!==i||e[12]!==p?(a=t.jsx("div",{className:"flex items-center shrink-0",children:t.jsx(F,{id:p,checked:c,onCheckedChange:i,onClick:re})}),e[10]=c,e[11]=i,e[12]=p,e[13]=a):a=e[13];let f;return e[14]!==x||e[15]!==m||e[16]!==a?(f=t.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:x,children:[m,a]}),e[14]=x,e[15]=m,e[16]=a,e[17]=f):f=e[17],f});function ge({toolSet:l,onToolSetChange:o}){const[e,n]=j.useState(""),r=j.useDeferredValue(e),[c,i]=j.useState("all"),[x,b]=j.useState(!1),g=j.useRef(new Set(Object.keys(l))),d=K({searchTerm:r.trim()||void 0}),u=g.current,m=[...u.values()].map(s=>d.find(h=>h.id===s)).filter(s=>s!==void 0),p=d.filter(s=>!u.has(s.id)),a=[...m,...p],f=s=>{const h=l[s];return h!==void 0&&h.length>0},C=a.filter(s=>{if(c==="all")return!0;const h=f(s.id);return c==="selected"?h:c==="unselected"?!h:!0}),[w,E]=j.useState(a[0]?.id??null),v=w?a.find(s=>s.id===w)??null:null,P=v?.tools??[],Q=(s,h)=>l[s]?.includes(h)??!1,q=(s,h)=>{const N=l[s]??[],R=N.includes(h),T={...l};if(R){const y=N.filter(k=>k!==h);y.length===0?delete T[s]:T[s]=y}else T[s]=[...N,h];o(T)},L=s=>{const h=a.find(k=>k.id===s);if(!h?.tools)return;const N=l[s]??[],R=h.tools.map(k=>k.name),T=N.length>0&&R.every(k=>N.includes(k)),y={...l};T?delete y[s]:(y[s]=R,E(s)),o(y)},Z=s=>{E(s),b(!0)},_=()=>{b(!1)};return t.jsxs("div",{className:"flex h-full",children:[t.jsxs("div",{className:S("w-full md:w-80 border-r border-border flex flex-col",x&&"hidden md:flex"),children:[t.jsx(te,{value:e,onChange:n,placeholder:"Search MCP Servers..."}),t.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[t.jsx("button",{onClick:()=>i("all"),className:S("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),t.jsx("button",{onClick:()=>i("selected"),className:S("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),t.jsx("button",{onClick:()=>i("unselected"),className:S("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),t.jsx("div",{className:"flex-1 overflow-auto",children:C.length===0?t.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:e?"No connections found":c==="selected"?"No servers selected":c==="unselected"?"No unselected servers":"No connections available"}):t.jsx("div",{className:"p-2 space-y-1",children:C.map(s=>{const h=s.tools?.length??0,N=l[s.id]?.length??0;return t.jsx(se,{connection:s,isSelected:w===s.id,hasToolsEnabled:f(s.id),activeToolsCount:N,totalToolsCount:h,onSelect:()=>Z(s.id),onToggle:()=>L(s.id)},s.id)})})})]}),t.jsx("div",{className:S("flex-1 flex-col",x?"flex":"hidden md:flex"),children:v?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[t.jsx(Y,{variant:"ghost",size:"sm",onClick:_,className:"h-8 w-8 p-0 shrink-0",children:t.jsx(ee,{size:20})}),t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx($,{icon:v.icon,name:v.title,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:v.title}),v.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:v.description})]})]})]}),t.jsx("div",{className:"flex-1 overflow-auto p-4",children:P.length===0?t.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:"This connection has no tools available"}):t.jsx("div",{className:"space-y-2",children:P.map(s=>t.jsx(oe,{connectionId:v.id,tool:s,isSelected:Q(v.id,s.name),onToggle:()=>q(v.id,s.name)},s.name))})})]}):t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"Select a connection to view its tools"})})})]})}function ne(l){return l.stopPropagation()}function re(l){return l.stopPropagation()}var B="Switch",[le]=V(B),[ce,ie]=le(B),H=j.forwardRef((l,o)=>{const{__scopeSwitch:e,name:n,checked:r,defaultChecked:c,required:i,disabled:x,value:b="on",onCheckedChange:g,form:d,...u}=l,[m,p]=j.useState(null),a=z(o,v=>p(v)),f=j.useRef(!1),C=m?d||!!m.closest("form"):!0,[w,E]=W({prop:r,defaultProp:c??!1,onChange:g,caller:B});return t.jsxs(ce,{scope:e,checked:w,disabled:x,children:[t.jsx(I.button,{type:"button",role:"switch","aria-checked":w,"aria-required":i,"data-state":U(w),"data-disabled":x?"":void 0,disabled:x,value:b,...u,ref:a,onClick:X(l.onClick,v=>{E(P=>!P),C&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})}),C&&t.jsx(D,{control:m,bubbles:!f.current,name:n,value:b,checked:w,required:i,disabled:x,form:d,style:{transform:"translateX(-100%)"}})]})});H.displayName=B;var O="SwitchThumb",A=j.forwardRef((l,o)=>{const{__scopeSwitch:e,...n}=l,r=ie(O,e);return t.jsx(I.span,{"data-state":U(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:o})});A.displayName=O;var ae="SwitchBubbleInput",D=j.forwardRef(({__scopeSwitch:l,control:o,checked:e,bubbles:n=!0,...r},c)=>{const i=j.useRef(null),x=z(i,c),b=G(e),g=J(o);return j.useEffect(()=>{const d=i.current;if(!d)return;const u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(b!==e&&p){const a=new Event("click",{bubbles:n});p.call(d,e),d.dispatchEvent(a)}},[b,e,n]),t.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:e,...r,tabIndex:-1,ref:x,style:{...r.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});D.displayName=ae;function U(l){return l?"checked":"unchecked"}var de=H,ue=A;function ve(l){const o=M.c(9);let e,n;o[0]!==l?({className:e,...n}=l,o[0]=l,o[1]=e,o[2]=n):(e=o[1],n=o[2]);let r;o[3]!==e?(r=S("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),o[3]=e,o[4]=r):r=o[4];let c;o[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(ue,{"data-slot":"switch-thumb",className:S("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),o[5]=c):c=o[5];let i;return o[6]!==n||o[7]!==r?(i=t.jsx(de,{"data-slot":"switch",className:r,...n,children:c}),o[6]=n,o[7]=r,o[8]=i):i=o[8],i}export{ve as S,ge as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{K as B,j as t,c as O,f as Q,r as k}from"./index-
|
|
1
|
+
import{K as B,j as t,c as O,f as Q,r as k}from"./index-DkE856zJ.js";import{u as U}from"./useQuery-BDcaqn5m.js";import{i as W}from"./File06-CCcPYdcS.js";import{i as Y}from"./Loading01-CH6mw7mn.js";import{e as J}from"./registry-utils-ulDDT0d8.js";import{C as P}from"./collection-display-button-C193PAy9.js";import{C as X}from"./collection-search-Vq1GfSWB.js";import{C as Z}from"./collection-table-wrapper-BCXAi-BN.js";import{E as z}from"./SearchMd-CwAqtJqG.js";import{I as ee}from"./use-connection-B9P3V0a0.js";import{C as te}from"./card-66QSeiOF.js";import{V as se}from"./layout-DqSCBByW.js";function oe(s){return s.replace(/<a[^>]*class="[^"]*anchor[^"]*"[^>]*>.*?<\/a>/gi,"")}function re(s){return s.replace(/<a\s+([^>]*href="[^"]*"[^>]*)>/gi,(e,i)=>i.includes("target=")?e.replace(/target="[^"]*"/gi,'target="_blank"'):`<a ${i} target="_blank" rel="noopener noreferrer">`)}function ne(s){let e=oe(s);return e=re(e),e}function ve({repository:s}){const e=s?J(s):null,{data:i,isLoading:c}=U({queryKey:B.githubReadme(e?.owner,e?.repo),queryFn:async()=>{if(!e)return null;try{const l=await fetch(`https://api.github.com/repos/${e.owner}/${e.repo}/readme`,{headers:{Accept:"application/vnd.github.v3.html"}});if(!l.ok){if(l.status===404)return null;throw new Error(`Failed to fetch README: ${l.statusText}`)}const m=await l.text();return ne(m)}catch(l){return console.error("Error fetching README:",l),null}},enabled:!!e&&!!s,staleTime:3600*1e3,gcTime:1440*60*1e3});return c?t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx(Y,{size:32,className:"animate-spin text-muted-foreground"})}):i?t.jsx("div",{className:"p-5 markdown-body",style:{backgroundColor:"transparent"},dangerouslySetInnerHTML:{__html:i}}):t.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center p-6",children:[t.jsx(W,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"README not found"}),t.jsx("p",{className:"text-muted-foreground max-w-md",children:"This repository doesn't have a README file, or it's not publicly accessible."})]})}function Ce(s){const e=O.c(39),{tools:i,connectionId:c,org:l,onToolClick:m,showToolbar:L,emptyMessage:M}=s,D=L===void 0?!0:L,j=M===void 0?"This connection doesn't have any tools yet.":M,I=Q(),[n,$]=k.useState(""),[d,H]=k.useState("table"),[r,A]=k.useState("name"),[a,_]=k.useState("asc");let y;e[0]!==a||e[1]!==r?(y=o=>{r===o?(_(me),a==="desc"&&A(void 0)):(A(o),_("asc"))},e[0]=a,e[1]=r,e[2]=y):y=e[2];const u=y;let N;e[3]!==c||e[4]!==I||e[5]!==m||e[6]!==l?(N=o=>{m?m(o):c&&l&&I({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:l,connectionId:c,collectionName:"tools",itemId:encodeURIComponent(o.name)}})},e[3]=c,e[4]=I,e[5]=m,e[6]=l,e[7]=N):N=e[7];const w=N;let v;if(e[8]!==n||e[9]!==a||e[10]!==r||e[11]!==i){const o=!i||i.length===0?[]:n.trim()?(()=>{const R=n.toLowerCase();return i.filter(b=>b.name.toLowerCase().includes(R)||b.description&&b.description.toLowerCase().includes(R))})():i;v=!r||!a?o:[...o].sort((R,b)=>{const q=R[r]||"",G=b[r]||"",K=String(q).localeCompare(String(G));return a==="asc"?K:-K}),e[8]=n,e[9]=a,e[10]=r,e[11]=i,e[12]=v}else v=e[12];const g=v;let C;e[13]===Symbol.for("react.memo_cache_sentinel")?(C=[{id:"name",header:"Name",render:ce,sortable:!0},{id:"description",header:"Description",render:le,cellClassName:"flex-1",sortable:!0}],e[13]=C):C=e[13];const V=C;let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=V.filter(ie).map(ae),e[14]=S):S=e[14];const F=S;let f;e[15]!==u||e[16]!==D||e[17]!==a||e[18]!==r||e[19]!==d?(f=D&&t.jsx(se,{children:t.jsx(P,{viewMode:d,onViewModeChange:H,sortKey:r,sortDirection:a,onSort:u,sortOptions:F})}),e[15]=u,e[16]=D,e[17]=a,e[18]=r,e[19]=d,e[20]=f):f=e[20];let E;e[21]===Symbol.for("react.memo_cache_sentinel")?(E=o=>{o.key==="Escape"&&($(""),o.target.blur())},e[21]=E):E=e[21];let p;e[22]!==n?(p=t.jsx(X,{value:n,onChange:$,placeholder:"Search tools...",onKeyDown:E}),e[22]=n,e[23]=p):p=e[23];let h;e[24]!==j||e[25]!==u||e[26]!==w||e[27]!==n||e[28]!==a||e[29]!==r||e[30]!==g||e[31]!==d?(h=d==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:g.length===0?t.jsx(z,{image:null,title:n?"No tools found":"No tools available",description:n?"Try adjusting your search terms":j}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:g.map(o=>t.jsx(te,{className:"cursor-pointer transition-colors",onClick:()=>w(o),children:t.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[t.jsx(ee,{icon:null,name:o.name,size:"md",className:"shrink-0 shadow-sm"}),t.jsxs("div",{className:"flex flex-col gap-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:o.name}),t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:o.description||"No description"})]})]})},o.name))})}):t.jsx(Z,{columns:V,data:g,isLoading:!1,sortKey:r,sortDirection:a,onSort:u,onRowClick:o=>w(o),emptyState:t.jsx(z,{image:null,title:n?"No tools found":"No tools available",description:n?"Try adjusting your search terms":j})}),e[24]=j,e[25]=u,e[26]=w,e[27]=n,e[28]=a,e[29]=r,e[30]=g,e[31]=d,e[32]=h):h=e[32];let x;e[33]!==p||e[34]!==h?(x=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[p,h]}),e[33]=p,e[34]=h,e[35]=x):x=e[35];let T;return e[36]!==x||e[37]!==f?(T=t.jsxs(t.Fragment,{children:[f,x]}),e[36]=x,e[37]=f,e[38]=T):T=e[38],T}function ae(s){return{id:s.id,label:typeof s.header=="string"?s.header:s.id}}function ie(s){return s.sortable}function le(s){return t.jsx("span",{className:"text-sm text-foreground",children:s.description||"—"})}function ce(s){return t.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:s.name})}function me(s){return s==="asc"?"desc":s==="desc"?null:"asc"}export{ve as R,Ce as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,j as d,B as H,c as j,H as Q,a2 as $,Z as G,a5 as ee,E as C,$ as z,a6 as te,ac as oe,ad as re,bg as ne,a4 as se,z as ae,a3 as ie,ae as le}from"./index-DkE856zJ.js";import{c as ce}from"./button-Dj8ueofv.js";var ue=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),de="VisuallyHidden",V=a.forwardRef((o,e)=>d.jsx(H.span,{...o,ref:e,style:{...ue,...o.style}}));V.displayName=de;var pe=V;const fe=({size:o=24,color:e="currentColor",...t})=>a.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},a.createElement("path",{d:"M20 6 9 17l-5-5"}));fe.displayName="Check";const S="org-admin",ve={from({org:o,project:e}){if(o?.includes("/")||e.includes("/"))throw new Error("Org or project cannot contain slashes");return`${o}/${e}`},parse(o){o.startsWith("/")&&(o=o.slice(1));const[e,t]=o.split("/");if(!e||!t)throw new Error("Invalid locator");return{org:e,project:t}},isOrgAdminProject(o){return o.split("/")[1]===S},adminProject(o){return`${o}/${S}`}},B=a.createContext(void 0),$e=()=>{const o=a.useContext(B);if(!o)throw new Error("useProjectContext must be used within a ProjectContextProvider");return o},Ge=o=>{const e=j.c(10),{children:t,org:r,project:n}=o;let s;e[0]!==r.slug||e[1]!==n.slug?(s=ve.from({org:r.slug,project:n.slug}),e[0]=r.slug,e[1]=n.slug,e[2]=s):s=e[2];const l=s;let c;e[3]!==l||e[4]!==r||e[5]!==n?(c={org:r,project:n,locator:l},e[3]=l,e[4]=r,e[5]=n,e[6]=c):c=e[6];const i=c;let u;return e[7]!==t||e[8]!==i?(u=d.jsx(B.Provider,{value:i,children:t}),e[7]=t,e[8]=i,e[9]=u):u=e[9],u};var[O]=Q("Tooltip",[$]),L=$(),F="TooltipProvider",he=700,D="tooltip.open",[xe,A]=O(F),U=o=>{const{__scopeTooltip:e,delayDuration:t=he,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=a.useRef(!0),c=a.useRef(!1),i=a.useRef(0);return a.useEffect(()=>{const u=i.current;return()=>window.clearTimeout(u)},[]),d.jsx(xe,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(i.current),l.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:a.useCallback(u=>{c.current=u},[]),disableHoverableContent:n,children:s})};U.displayName=F;var R="Tooltip",[ge,_]=O(R),Y=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=o,i=A(R,o.__scopeTooltip),u=L(e),[p,v]=a.useState(null),h=se(),f=a.useRef(0),x=l??i.disableHoverableContent,m=c??i.delayDuration,g=a.useRef(!1),[y,T]=ae({prop:r,defaultProp:n??!1,onChange:M=>{M?(i.onOpen(),document.dispatchEvent(new CustomEvent(D))):i.onClose(),s?.(M)},caller:R}),b=a.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,T(!0)},[T]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,T(!1)},[T]),I=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,T(!0),f.current=0},m)},[m,T]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),d.jsx(ie,{...u,children:d.jsx(ge,{scope:e,contentId:h,open:y,stateAttribute:b,trigger:p,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{i.isOpenDelayedRef.current?I():P()},[i.isOpenDelayedRef,I,P]),onTriggerLeave:a.useCallback(()=>{x?E():(window.clearTimeout(f.current),f.current=0)},[E,x]),onOpen:P,onClose:E,disableHoverableContent:x,children:t})})};Y.displayName=R;var k="TooltipTrigger",W=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(k,t),s=A(k,t),l=L(t),c=a.useRef(null),i=G(e,c,n.onTriggerChange),u=a.useRef(!1),p=a.useRef(!1),v=a.useCallback(()=>u.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),d.jsx(ee,{asChild:!0,...l,children:d.jsx(H.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:C(o.onPointerMove,h=>{h.pointerType!=="touch"&&!p.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),p.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),p.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{u.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});W.displayName=k;var N="TooltipPortal",[me,Te]=O(N,{forceMount:void 0}),q=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(N,e);return d.jsx(me,{scope:e,forceMount:t,children:d.jsx(z,{present:t||s.open,children:d.jsx(te,{asChild:!0,container:n,children:r})})})};q.displayName=N;var w="TooltipContent",X=a.forwardRef((o,e)=>{const t=Te(w,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(w,o.__scopeTooltip);return d.jsx(z,{present:r||l.open,children:l.disableHoverableContent?d.jsx(J,{side:n,...s,ref:e}):d.jsx(ye,{side:n,...s,ref:e})})}),ye=a.forwardRef((o,e)=>{const t=_(w,o.__scopeTooltip),r=A(w,o.__scopeTooltip),n=a.useRef(null),s=G(e,n),[l,c]=a.useState(null),{trigger:i,onClose:u}=t,p=n.current,{onPointerInTransitChange:v}=r,h=a.useCallback(()=>{c(null),v(!1)},[v]),f=a.useCallback((x,m)=>{const g=x.currentTarget,y={x:x.clientX,y:x.clientY},T=Pe(y,g.getBoundingClientRect()),b=Ee(y,T),P=Re(m.getBoundingClientRect()),E=_e([...b,...P]);c(E),v(!0)},[v]);return a.useEffect(()=>()=>h(),[h]),a.useEffect(()=>{if(i&&p){const x=g=>f(g,p),m=g=>f(g,i);return i.addEventListener("pointerleave",x),p.addEventListener("pointerleave",m),()=>{i.removeEventListener("pointerleave",x),p.removeEventListener("pointerleave",m)}}},[i,p,f,h]),a.useEffect(()=>{if(l){const x=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},T=i?.contains(g)||p?.contains(g),b=!je(y,l);T?h():b&&(h(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[i,p,l,u,h]),d.jsx(J,{...o,ref:s})}),[Ce,we]=O(R,{isInside:!1}),be=ne("TooltipContent"),J=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...c}=o,i=_(w,t),u=L(t),{onClose:p}=i;return a.useEffect(()=>(document.addEventListener(D,p),()=>document.removeEventListener(D,p)),[p]),a.useEffect(()=>{if(i.trigger){const v=h=>{h.target?.contains(i.trigger)&&p()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[i.trigger,p]),d.jsx(oe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:p,children:d.jsxs(re,{"data-state":i.stateAttribute,...u,...c,ref:e,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(be,{children:r}),d.jsx(Ce,{scope:t,isInside:!0,children:d.jsx(pe,{id:i.contentId,role:"tooltip",children:n||r})})]})})});X.displayName=w;var K="TooltipArrow",Z=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=L(t);return we(K,t).isInside?null:d.jsx(le,{...n,...r,ref:e})});Z.displayName=K;function Pe(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ee(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function Re(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function je(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const c=e[s],i=e[l],u=c.x,p=c.y,v=i.x,h=i.y;p>r!=h>r&&t<(v-u)*(r-p)/(h-p)+u&&(n=!n)}return n}function _e(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Oe(e)}function Oe(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Le=U,De=Y,ke=W,Ae=q,Ne=X,Ie=Z;function Me(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=d.jsx(Le,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function ze(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=d.jsx(Me,{children:d.jsx(De,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Ve(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=d.jsx(ke,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function Be(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let c;e[5]!==r?(c=ce("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=c):c=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Ie,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=i):i=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==c?(u=d.jsx(Ae,{children:d.jsxs(Ne,{"data-slot":"tooltip-content",sideOffset:l,className:c,...n,children:[t,i]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=c,e[12]=u):u=e[12],u}export{ve as L,S as O,Ge as P,Be as T,ue as V,Me as a,Ve as b,ze as c,fe as i,$e as u};
|