@decocms/mesh 2.12.0 → 2.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-Cso_Xxvk.js → AlertCircle-CtP28Oyz.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BrsZ2N_5.js → ArrowLeft-Bps-R0_t.js} +1 -1
- package/dist/client/assets/{Check-JFkjTCfG.js → Check-Bkw0Gz-n.js} +1 -1
- package/dist/client/assets/{ChevronDown-HtFMO0lw.js → ChevronDown-mvTJP4-S.js} +1 -1
- package/dist/client/assets/{Clock-CW5u1cfj.js → Clock-DiHiAbv6.js} +1 -1
- package/dist/client/assets/{Code01-CgNchnl3.js → Code01-CTUZx8UP.js} +1 -1
- package/dist/client/assets/{Copy01-Dadp_RDG.js → Copy01-BctGx-5E.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-B0A7sUYv.js → DotsHorizontal-MMZ1EZhB.js} +1 -1
- package/dist/client/assets/{DotsVertical-BHUUUCDx.js → DotsVertical-CzCtj25W.js} +1 -1
- package/dist/client/assets/{Edit01-CxRkZTQ1.js → Edit01-BD5iJRQz.js} +1 -1
- package/dist/client/assets/{File06-D0TXCuMx.js → File06-nV81V8TD.js} +1 -1
- package/dist/client/assets/{FilterLines-_uykt7r4.js → FilterLines-CBfbdjv3.js} +1 -1
- package/dist/client/assets/{FlipBackward-GGMv99yc.js → FlipBackward-CpWoOBPz.js} +1 -1
- package/dist/client/assets/{GitBranch01-BUTuezlq.js → GitBranch01-DWYSSAGj.js} +1 -1
- package/dist/client/assets/{Grid01-BbdtRdR8.js → Grid01-BEpepbVy.js} +1 -1
- package/dist/client/assets/{Inbox01-CgwXLK3n.js → Inbox01-DkMyh-FB.js} +1 -1
- package/dist/client/assets/{InfoCircle-D6qJG9Nl.js → InfoCircle-BXctEVkS.js} +1 -1
- package/dist/client/assets/{Key01-8ewaPBuD.js → Key01-ChIWeKNh.js} +1 -1
- package/dist/client/assets/{LinkExternal01-D0Wjfr3t.js → LinkExternal01-By7zx70s.js} +1 -1
- package/dist/client/assets/{Loading01-NW_f44Lz.js → Loading01-CdaWSExX.js} +1 -1
- package/dist/client/assets/{Lock01-BTPtPjN4.js → Lock01-txD_UwBx.js} +1 -1
- package/dist/client/assets/{Play-CIMfsFF1.js → Play-CjVz5-Yt.js} +1 -1
- package/dist/client/assets/{Plus-DaP4KLuJ.js → Plus-CovnOzP9.js} +1 -1
- package/dist/client/assets/{SearchMd-tOSOFUes.js → SearchMd-YxKkBPG0.js} +1 -1
- package/dist/client/assets/{Terminal-ANRX3jJ8.js → Terminal-DYwA22tz.js} +1 -1
- package/dist/client/assets/{Trash01-CjDzx3jP.js → Trash01-DopdNXEu.js} +1 -1
- package/dist/client/assets/{X-D3ljCSd1.js → X-DcqsnRSe.js} +1 -1
- package/dist/client/assets/{XClose-Ba3zyI0J.js → XClose-D0utLGU3.js} +1 -1
- package/dist/client/assets/{alert-dialog-_Gzpv9vf.js → alert-dialog-B2ogXLEp.js} +1 -1
- package/dist/client/assets/{auth-C9dSkS_x.js → auth-CNkA6dk2.js} +1 -1
- package/dist/client/assets/{auth-catchall-DRL5ZGJM.js → auth-catchall-BG5YjEP_.js} +1 -1
- package/dist/client/assets/{avatar-D1o5pnzU.js → avatar-KT16fAYd.js} +1 -1
- package/dist/client/assets/{badge-0b6sJe4S.js → badge-8BCP2QJ_.js} +1 -1
- package/dist/client/assets/{card-B3fsloDi.js → card-XgDm8_H9.js} +1 -1
- package/dist/client/assets/{checkbox-2xIaHvS4.js → checkbox-B9Ss6ffk.js} +1 -1
- package/dist/client/assets/{collection-detail-Bu5gtjud.js → collection-detail-BJvqsPlx.js} +1 -1
- package/dist/client/assets/{collection-display-button-BGIcja12.js → collection-display-button-DroTLKfu.js} +1 -1
- package/dist/client/assets/{collection-header-DhWbmVkk.js → collection-header-CUphFaJM.js} +1 -1
- package/dist/client/assets/{collection-page-B4ZjGX9V.js → collection-page-C8c74lBQ.js} +1 -1
- package/dist/client/assets/{collection-search-CYZk6T6Z.js → collection-search-DIEJ7x7R.js} +1 -1
- package/dist/client/assets/{collection-tab-IeT0mJ-2.js → collection-tab-BQr3sv8I.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-D2niE2Ci.js → collection-table-wrapper-x8zydyA0.js} +1 -1
- package/dist/client/assets/{connection-card-D0c_wvmz.js → connection-card-CTMXB5Zh.js} +1 -1
- package/dist/client/assets/{connection-detail-BmNPUV8x.js → connection-detail-BU82m59Z.js} +1 -1
- package/dist/client/assets/{connections-U2y3agtD.js → connections-B-zsqKwM.js} +1 -1
- package/dist/client/assets/constants-8DEiLmV-.js +1 -0
- package/dist/client/assets/{create-organization-dialog-D0WQQsLG.js → create-organization-dialog-CHS4cOdy.js} +1 -1
- package/dist/client/assets/{dialog-BXeLl5mO.js → dialog-D9LHhl79.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CnL8UM0z.js → dropdown-menu-DjFWyTtD.js} +1 -1
- package/dist/client/assets/{empty-state-BmkZOMzL.js → empty-state-DSGxvcRL.js} +1 -1
- package/dist/client/assets/{empty-state-DzS1Zp7m.js → empty-state-DgOO5bI1.js} +1 -1
- package/dist/client/assets/env-vars-editor-mM2KyO-W.js +1 -0
- package/dist/client/assets/{error-boundary-BQnJ9S9E.js → error-boundary-uBvOVTCE.js} +1 -1
- package/dist/client/assets/extract-connection-data-DMhfaAiL.js +1 -0
- package/dist/client/assets/{form-DrOt6d2d.js → form-orY-xngM.js} +1 -1
- package/dist/client/assets/{gateway-detail-CniDbJPb.js → gateway-detail-Bnl2H9_J.js} +1 -1
- package/dist/client/assets/{gateways-DmEpJOpx.js → gateways-RS5E135D.js} +1 -1
- package/dist/client/assets/{home-HrkEcREJ.js → home-HRdtfNlr.js} +1 -1
- package/dist/client/assets/index-9MwexYU6.css +1 -0
- package/dist/client/assets/{index-CBIrwxtj.js → index-BuPukvJG.js} +3 -3
- package/dist/client/assets/{index-DMNk-OUX.js → index-Bz1LU39D.js} +2 -2
- package/dist/client/assets/{index-XOpbMEap.js → index-Cw3bkeXO.js} +1 -1
- package/dist/client/assets/{index-GoXtajA4.js → index-K2EwRRk6.js} +2 -2
- package/dist/client/assets/{index-Bb8rHnPb.js → index-o28bnKR9.js} +1 -1
- package/dist/client/assets/{input-68J17rBp.js → input-CtiQUsvV.js} +1 -1
- package/dist/client/assets/{layout-Olb4shdE.js → layout-C8G6tSLB.js} +1 -1
- package/dist/client/assets/{lazy-highlighter-Ccgc_fxj.js → lazy-highlighter-C5pGkBnk.js} +1 -1
- package/dist/client/assets/localstorage-keys-5oG1CfEQ.js +1 -0
- package/dist/client/assets/{login-UTKAAaeX.js → login-BvQHpiOu.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Db8WtQ8u.js → mcp-oauth-BzcB2WNx.js} +1 -1
- package/dist/client/assets/mcp-server-card-BawKO-ZK.js +1 -0
- package/dist/client/assets/mcp-server-detail-CxrhH1J8.js +1 -0
- package/dist/client/assets/{members-V-vtwMYY.js → members-C0iWKqGR.js} +1 -1
- package/dist/client/assets/{monaco-editor-B_MycISs.js → monaco-editor-BmVBfnK5.js} +1 -1
- package/dist/client/assets/{monitoring-CBmCnQ7i.js → monitoring-7ik3wQUY.js} +1 -1
- package/dist/client/assets/{oauth-callback-BYBqbF1w.js → oauth-callback-Coasa0XK.js} +1 -1
- package/dist/client/assets/page-DsAOPS13.js +1 -0
- package/dist/client/assets/{page-DrIZd1pO.js → page-yu9K5Vtj.js} +1 -1
- package/dist/client/assets/{pin-to-sidebar-button-B1xHHS9n.js → pin-to-sidebar-button-C-akIZzz.js} +1 -1
- package/dist/client/assets/{popover-DC9U4d6e.js → popover-QWczrvYc.js} +1 -1
- package/dist/client/assets/{project-context-provider-BJIP5a-U.js → project-context-provider-_aLYBfO9.js} +1 -1
- package/dist/client/assets/registry-utils-BIzwINzW.js +1 -0
- package/dist/client/assets/{resizable-CW5_SPIS.js → resizable-djk090hC.js} +1 -1
- package/dist/client/assets/{resource-tabs-BKSlcL1W.js → resource-tabs-GXDudjH9.js} +1 -1
- package/dist/client/assets/{select-B9KJyTZZ.js → select-Bxj6_TSM.js} +1 -1
- package/dist/client/assets/{settings-CYg4YPRI.js → settings-0nIjjKRi.js} +1 -1
- package/dist/client/assets/{shell-layout-KIN6fL5j.js → shell-layout-BFIjeoYr.js} +1 -1
- package/dist/client/assets/{spinner-B0sczm1j.js → spinner-C7HX4n17.js} +1 -1
- package/dist/client/assets/{switch-BuVvmF04.js → switch-zovYrKoi.js} +1 -1
- package/dist/client/assets/{textarea-BAUX8Qgd.js → textarea-D76YOeHc.js} +1 -1
- package/dist/client/assets/{thread-history-popover-Dv63nk6L.js → thread-history-popover-BKo2wskT.js} +1 -1
- package/dist/client/assets/{tool-set-selector-DMsE0yRo.js → tool-set-selector-Dfdgsx2h.js} +1 -1
- package/dist/client/assets/{tools-list-Dgf0oqyC.js → tools-list-C2S7XIkI.js} +1 -1
- package/dist/client/assets/{use-binding-Dj4lal1A.js → use-binding-UNVemCFv.js} +1 -1
- package/dist/client/assets/{use-connection-DoWszS3j.js → use-connection-BXdeHsm0.js} +1 -1
- package/dist/client/assets/{use-connection-resources-BywYCfzc.js → use-connection-resources-C8cAy7Nl.js} +1 -1
- package/dist/client/assets/{use-create-gateway-Ca5SEa8I.js → use-create-gateway-D8vNiD2K.js} +1 -1
- package/dist/client/assets/{use-gateway-CRpsitbG.js → use-gateway-BhC1hXIm.js} +1 -1
- package/dist/client/assets/{use-gateway-system-prompt-B4ia2QxW.js → use-gateway-system-prompt-uetw6YB3.js} +1 -1
- package/dist/client/assets/{use-list-state-CPUcOhR_.js → use-list-state-CAv4RNZg.js} +1 -1
- package/dist/client/assets/{use-mcp-L2lisTXg.js → use-mcp-kCjFuvFP.js} +1 -1
- package/dist/client/assets/{use-members-7eRdYOTr.js → use-members-9nvpFN_1.js} +1 -1
- package/dist/client/assets/{use-mobile--ytA5LT5.js → use-mobile-sd5ko6M_.js} +1 -1
- package/dist/client/assets/{use-organization-settings-D6rXW2c_.js → use-organization-settings-DBRSoBd0.js} +1 -1
- package/dist/client/assets/{use-tool-call-BBonHr6l.js → use-tool-call-BLplGau6.js} +1 -1
- package/dist/client/assets/{value-Bd2XBV_y.js → value-DxHsXzsm.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BpjQ6V4P.js → view-mode-toggle-CVcyaB_S.js} +1 -1
- package/dist/client/assets/{workflow-CjynHD6b.js → workflow-BUV3CQv_.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +201 -201
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/LICENSE +47 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/README.md +82 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.browser.d.ts +11 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.browser.mjs +43 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cjs +45 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cloudflare.cjs +46 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cloudflare.d.ts +11 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.d.ts +11 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.mjs +46 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.wasm +0 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.d.mts +83 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.d.ts +83 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.js +2 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.js.map +1 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.mjs +2 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.mjs.map +1 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.d.mts +20 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.d.ts +20 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.js +2 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.js.map +1 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.mjs +2 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.mjs.map +1 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/package.json +61 -0
- package/dist/server/server.js +197 -197
- package/package.json +1 -1
- package/dist/client/assets/constants-Cy709IUA.js +0 -1
- package/dist/client/assets/env-vars-editor-B_mIaT86.js +0 -1
- package/dist/client/assets/extract-connection-data-DPoJQhk8.js +0 -1
- package/dist/client/assets/index-ChrSnaFS.css +0 -1
- package/dist/client/assets/localstorage-keys-C62ZbWuB.js +0 -1
- package/dist/client/assets/mcp-server-detail-BvVQovUz.js +0 -1
- package/dist/client/assets/page-DYF0Qz3l.js +0 -1
- package/dist/client/assets/registry-utils-B7t_ZBUi.js +0 -1
- package/dist/client/assets/server-name-C3ttWdyD.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{as as We,r as O,v as mh,w as lo,c as I,j as m,k as Ci,y as gh,h as yh,d as Et,b as xh,t as Ec,B as ee,z as bh,at as Tc,a6 as kh,a5 as Sh,au as wh,ac as Mc,av as Ac,aw as vh,ad as Ni,af as Ge,ae as Oc,ax as Ch,ai as Ei,ay as Nh,aa as Ic,az as Eh,aA as Th,aB as Mh,aC as Ti,aD as Ah,aE as Oh,aF as Ih,ab as Rh,aG as jh,ar as Rc}from"./index-DMNk-OUX.js";import{U as qt,E as jc,u as Mi,a as Ai,c as qe,I as js,n as Dh}from"./empty-state-DzS1Zp7m.js";import{E as Dc}from"./error-boundary-BQnJ9S9E.js";import{P as Oi}from"./pin-to-sidebar-button-B1xHHS9n.js";import{B as me,I as Ii,c as U}from"./input-68J17rBp.js";import{F as ao,a as Ph,b as Ri,d as ji}from"./form-DrOt6d2d.js";import{T as Ho}from"./textarea-BAUX8Qgd.js";import{b as Lt,T as $t,a as zt,c as _t}from"./project-context-provider-BJIP5a-U.js";import{i as Pc}from"./FlipBackward-GGMv99yc.js";import{a as Lc,V as Di,b as Sn}from"./layout-Olb4shdE.js";import{c as Pi,u as Lh}from"./use-connection-DoWszS3j.js";import{i as $h}from"./AlertCircle-Cso_Xxvk.js";import{s as zh}from"./Clock-CW5u1cfj.js";import{i as _h}from"./Code01-CgNchnl3.js";import{a as Bh}from"./Copy01-Dadp_RDG.js";import{i as tr}from"./Loading01-NW_f44Lz.js";import{i as Li,n as Fh}from"./Play-CIMfsFF1.js";import{s as $i}from"./XClose-Ba3zyI0J.js";import{u as Vh,O as Hh,M as Wh,F as qh,v as Uh}from"./index-GoXtajA4.js";import{u as zi}from"./use-mcp-L2lisTXg.js";import{M as On}from"./monaco-editor-B_MycISs.js";import{E as _i}from"./empty-state-BmkZOMzL.js";import{D as Kh,u as Jh}from"./use-binding-Dj4lal1A.js";import{u as Gh}from"./use-gateway-CRpsitbG.js";import{b as Xh,R as Bl,a as Yh}from"./resizable-CW5_SPIS.js";import{h as Qh,q as Zh,r as $c,R as ep,s as tp,T as np}from"./index-CBIrwxtj.js";import{d as rp,b as sp,a as op,c as ip,S as lp}from"./select-B9KJyTZZ.js";import{S as Ds}from"./spinner-B0sczm1j.js";import{V as ap}from"./view-mode-toggle-BpjQ6V4P.js";import{i as cp}from"./GitBranch01-BUTuezlq.js";import{a as Bi,b as Fi}from"./use-tool-call-BBonHr6l.js";import{a as dp,D as up,g as fp,f as hp,c as pp,d as mp}from"./dialog-BXeLl5mO.js";import"./index-XOpbMEap.js";import{s as zc}from"./Plus-DaP4KLuJ.js";import{i as Vi}from"./Check-JFkjTCfG.js";import{i as gp}from"./DotsHorizontal-B0A7sUYv.js";import{b as yp,D as xp,a as bp,c as Fl}from"./dropdown-menu-CnL8UM0z.js";import{i as kp}from"./Grid01-BbdtRdR8.js";import{B as un}from"./badge-0b6sJe4S.js";import{i as _c}from"./X-D3ljCSd1.js";import"./use-organization-settings-D6rXW2c_.js";import"./ArrowLeft-BrsZ2N_5.js";import"./mcp-oauth-Db8WtQ8u.js";import"./auth-C9dSkS_x.js";import"./env-vars-editor-B_mIaT86.js";import"./Trash01-CjDzx3jP.js";import"./File06-D0TXCuMx.js";import"./Key01-8ewaPBuD.js";import"./Terminal-ANRX3jJ8.js";import"./index-Bb8rHnPb.js";import"./constants-Cy709IUA.js";import"./registry-utils-B7t_ZBUi.js";import"./extract-connection-data-DPoJQhk8.js";import"./github-icon-Dp3wHhYE.js";import"./generate-id-Dyweu44Y.js";import"./popover-DC9U4d6e.js";import"./SearchMd-tOSOFUes.js";import"./use-create-gateway-Ca5SEa8I.js";import"./localstorage-keys-C62ZbWuB.js";import"./alert-dialog-_Gzpv9vf.js";import"./use-mobile--ytA5LT5.js";import"./InfoCircle-D6qJG9Nl.js";import"./ChevronDown-HtFMO0lw.js";const Bc=We("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const Fc=We("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const Hi=We("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Wi=We("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Sp=We("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const wp=We("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const Vc=We("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Hc=We("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const Wc=We("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const qc=We("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const Uc=We("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),qi=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"M12 8v4m0 4h.01M2 8.523v6.954c0 .245 0 .367.028.482a1 1 0 0 0 .12.29c.061.1.148.187.32.36l4.923 4.922c.173.173.26.26.36.322.09.054.188.095.29.12.115.027.237.027.482.027h6.954c.245 0 .367 0 .482-.028a.998.998 0 0 0 .29-.12c.1-.061.187-.148.36-.32l4.922-4.923c.173-.173.26-.26.322-.36a.998.998 0 0 0 .12-.29c.027-.115.027-.237.027-.482V8.523c0-.245 0-.367-.028-.482a.998.998 0 0 0-.12-.29c-.061-.1-.148-.187-.32-.36L16.608 2.47c-.173-.173-.26-.26-.36-.322a1 1 0 0 0-.29-.12C15.844 2 15.722 2 15.477 2H8.523c-.245 0-.367 0-.482.028a1 1 0 0 0-.29.12c-.1.061-.187.148-.36.32L2.47 7.392c-.173.173-.26.26-.322.36a1 1 0 0 0-.12.29C2 8.156 2 8.278 2 8.523Z"}));qi.displayName="AlertOctagon";const Kc=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"M20.5 8v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.22 21 17.38 21 15.7 21H8.3c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3.5 18.72 3.5 17.88 3.5 16.2V8m.1-5h16.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C22 3.76 22 4.04 22 4.6v1.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C21.24 8 20.96 8 20.4 8H3.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C2 7.24 2 6.96 2 6.4V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C2.76 3 3.04 3 3.6 3Zm6 8.5h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 12.26 16 12.54 16 13.1v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437c-.214.109-.494.109-1.054.109H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 14.74 8 14.46 8 13.9v-.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 11.5 9.04 11.5 9.6 11.5Z"}));Kc.displayName="Box";const Jc=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"m22.7 11.5-2 2-2-2m2.245 1.5A9 9 0 1 0 19 17.657M12 7v5l3 2"}));Jc.displayName="ClockFastForward";const Gc=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18"}));Gc.displayName="Code02";const jr=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"M6.8 3h-.6c-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 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C10 19.48 10 18.92 10 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C8.48 3 7.92 3 6.8 3Zm11 0h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C14 4.52 14 5.08 14 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C15.52 21 16.08 21 17.2 21h.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 3Z"}));jr.displayName="Columns01";const Xc=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"M4 4v1.4c0 3.36 0 5.04.654 6.324a6 6 0 0 0 2.622 2.622C8.56 15 10.24 15 13.6 15H20m0 0-5-5m5 5-5 5"}));Xc.displayName="CornerDownRight";const Yc=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"M21 5c0 1.657-4.03 3-9 3S3 6.657 3 5m18 0c0-1.657-4.03-3-9-3S3 3.343 3 5m18 0v14c0 1.66-4 3-9 3s-9-1.34-9-3V5m18 7c0 1.66-4 3-9 3s-9-1.34-9-3"}));Yc.displayName="Database01";const Qc=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"m13 22-3-3m0 0 3-3m-3 3h5a7 7 0 0 0 3-13.326M6 18.326A7 7 0 0 1 9 5h5m0 0-3-3m3 3-3 3"}));Qc.displayName="Repeat03";const Ui=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"M15 8H8.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C7 7.24 7 6.96 7 6.4V3m10 18v-6.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C16.24 13 15.96 13 15.4 13H8.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C7 13.76 7 14.04 7 14.6V21M21 9.325V16.2c0 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 3h6.875c.489 0 .733 0 .963.055.204.05.4.13.579.24.201.123.374.296.72.642l3.126 3.126c.346.346.519.519.642.72.11.18.19.374.24.579.055.23.055.474.055.963Z"}));Ui.displayName="Save02";const Zc=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"M15.631 7.631c-.396-.396-.594-.594-.668-.822a1 1 0 0 1 0-.618c.074-.228.272-.426.668-.822L18.47 2.53a6 6 0 0 0-8.3 6.895c.12.49.179.734.168.888a.849.849 0 0 1-.11.392c-.07.138-.207.274-.48.547L3.5 17.5a2.121 2.121 0 0 0 3 3l6.248-6.248c.273-.273.41-.41.547-.48a.849.849 0 0 1 .392-.11c.154-.011.399.049.888.168a6 6 0 0 0 6.895-8.3l-2.84 2.84c-.396.396-.594.594-.822.668a1 1 0 0 1-.618 0c-.228-.074-.426-.272-.822-.668l-.738-.738Z"}));Zc.displayName="Tool01";const{getOwnPropertyNames:vp,getOwnPropertySymbols:Cp}=Object,{hasOwnProperty:Np}=Object.prototype;function co(n,e){return function(r,s,o){return n(r,s,o)&&e(r,s,o)}}function kr(n){return function(t,r,s){if(!t||!r||typeof t!="object"||typeof r!="object")return n(t,r,s);const{cache:o}=s,i=o.get(t),l=o.get(r);if(i&&l)return i===r&&l===t;o.set(t,r),o.set(r,t);const a=n(t,r,s);return o.delete(t),o.delete(r),a}}function Ep(n){return n?.[Symbol.toStringTag]}function Vl(n){return vp(n).concat(Cp(n))}const Tp=Object.hasOwn||((n,e)=>Np.call(n,e));function Yt(n,e){return n===e||!n&&!e&&n!==n&&e!==e}const Mp="__v",Ap="__o",Op="_owner",{getOwnPropertyDescriptor:Hl,keys:Wl}=Object;function Ip(n,e){return n.byteLength===e.byteLength&&Br(new Uint8Array(n),new Uint8Array(e))}function Rp(n,e,t){let r=n.length;if(e.length!==r)return!1;for(;r-- >0;)if(!t.equals(n[r],e[r],r,r,n,e,t))return!1;return!0}function jp(n,e){return n.byteLength===e.byteLength&&Br(new Uint8Array(n.buffer,n.byteOffset,n.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function Dp(n,e){return Yt(n.getTime(),e.getTime())}function Pp(n,e){return n.name===e.name&&n.message===e.message&&n.cause===e.cause&&n.stack===e.stack}function Lp(n,e){return n===e}function ql(n,e,t){const r=n.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),o=n.entries();let i,l,a=0;for(;(i=o.next())&&!i.done;){const c=e.entries();let d=!1,u=0;for(;(l=c.next())&&!l.done;){if(s[u]){u++;continue}const f=i.value,h=l.value;if(t.equals(f[0],h[0],a,u,n,e,t)&&t.equals(f[1],h[1],f[0],h[0],n,e,t)){d=s[u]=!0;break}u++}if(!d)return!1;a++}return!0}const $p=Yt;function zp(n,e,t){const r=Wl(n);let s=r.length;if(Wl(e).length!==s)return!1;for(;s-- >0;)if(!ed(n,e,t,r[s]))return!1;return!0}function zn(n,e,t){const r=Vl(n);let s=r.length;if(Vl(e).length!==s)return!1;let o,i,l;for(;s-- >0;)if(o=r[s],!ed(n,e,t,o)||(i=Hl(n,o),l=Hl(e,o),(i||l)&&(!i||!l||i.configurable!==l.configurable||i.enumerable!==l.enumerable||i.writable!==l.writable)))return!1;return!0}function _p(n,e){return Yt(n.valueOf(),e.valueOf())}function Bp(n,e){return n.source===e.source&&n.flags===e.flags}function Ul(n,e,t){const r=n.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),o=n.values();let i,l;for(;(i=o.next())&&!i.done;){const a=e.values();let c=!1,d=0;for(;(l=a.next())&&!l.done;){if(!s[d]&&t.equals(i.value,l.value,i.value,l.value,n,e,t)){c=s[d]=!0;break}d++}if(!c)return!1}return!0}function Br(n,e){let t=n.byteLength;if(e.byteLength!==t||n.byteOffset!==e.byteOffset)return!1;for(;t-- >0;)if(n[t]!==e[t])return!1;return!0}function Fp(n,e){return n.hostname===e.hostname&&n.pathname===e.pathname&&n.protocol===e.protocol&&n.port===e.port&&n.hash===e.hash&&n.username===e.username&&n.password===e.password}function ed(n,e,t,r){return(r===Op||r===Ap||r===Mp)&&(n.$$typeof||e.$$typeof)?!0:Tp(e,r)&&t.equals(n[r],e[r],r,r,n,e,t)}const Vp="[object ArrayBuffer]",Hp="[object Arguments]",Wp="[object Boolean]",qp="[object DataView]",Up="[object Date]",Kp="[object Error]",Jp="[object Map]",Gp="[object Number]",Xp="[object Object]",Yp="[object RegExp]",Qp="[object Set]",Zp="[object String]",em={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},tm="[object URL]",nm=Object.prototype.toString;function rm({areArrayBuffersEqual:n,areArraysEqual:e,areDataViewsEqual:t,areDatesEqual:r,areErrorsEqual:s,areFunctionsEqual:o,areMapsEqual:i,areNumbersEqual:l,areObjectsEqual:a,arePrimitiveWrappersEqual:c,areRegExpsEqual:d,areSetsEqual:u,areTypedArraysEqual:f,areUrlsEqual:h,unknownTagComparators:p}){return function(g,x,b){if(g===x)return!0;if(g==null||x==null)return!1;const S=typeof g;if(S!==typeof x)return!1;if(S!=="object")return S==="number"?l(g,x,b):S==="function"?o(g,x,b):!1;const v=g.constructor;if(v!==x.constructor)return!1;if(v===Object)return a(g,x,b);if(Array.isArray(g))return e(g,x,b);if(v===Date)return r(g,x,b);if(v===RegExp)return d(g,x,b);if(v===Map)return i(g,x,b);if(v===Set)return u(g,x,b);const k=nm.call(g);if(k===Up)return r(g,x,b);if(k===Yp)return d(g,x,b);if(k===Jp)return i(g,x,b);if(k===Qp)return u(g,x,b);if(k===Xp)return typeof g.then!="function"&&typeof x.then!="function"&&a(g,x,b);if(k===tm)return h(g,x,b);if(k===Kp)return s(g,x,b);if(k===Hp)return a(g,x,b);if(em[k])return f(g,x,b);if(k===Vp)return n(g,x,b);if(k===qp)return t(g,x,b);if(k===Wp||k===Gp||k===Zp)return c(g,x,b);if(p){let w=p[k];if(!w){const C=Ep(g);C&&(w=p[C])}if(w)return w(g,x,b)}return!1}}function sm({circular:n,createCustomConfig:e,strict:t}){let r={areArrayBuffersEqual:Ip,areArraysEqual:t?zn:Rp,areDataViewsEqual:jp,areDatesEqual:Dp,areErrorsEqual:Pp,areFunctionsEqual:Lp,areMapsEqual:t?co(ql,zn):ql,areNumbersEqual:$p,areObjectsEqual:t?zn:zp,arePrimitiveWrappersEqual:_p,areRegExpsEqual:Bp,areSetsEqual:t?co(Ul,zn):Ul,areTypedArraysEqual:t?co(Br,zn):Br,areUrlsEqual:Fp,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),n){const s=kr(r.areArraysEqual),o=kr(r.areMapsEqual),i=kr(r.areObjectsEqual),l=kr(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:s,areMapsEqual:o,areObjectsEqual:i,areSetsEqual:l})}return r}function om(n){return function(e,t,r,s,o,i,l){return n(e,t,l)}}function im({circular:n,comparator:e,createState:t,equals:r,strict:s}){if(t)return function(l,a){const{cache:c=n?new WeakMap:void 0,meta:d}=t();return e(l,a,{cache:c,equals:r,meta:d,strict:s})};if(n)return function(l,a){return e(l,a,{cache:new WeakMap,equals:r,meta:void 0,strict:s})};const o={cache:void 0,equals:r,meta:void 0,strict:s};return function(l,a){return e(l,a,o)}}const lm=Tt();Tt({strict:!0});Tt({circular:!0});Tt({circular:!0,strict:!0});Tt({createInternalComparator:()=>Yt});Tt({strict:!0,createInternalComparator:()=>Yt});Tt({circular:!0,createInternalComparator:()=>Yt});Tt({circular:!0,createInternalComparator:()=>Yt,strict:!0});function Tt(n={}){const{circular:e=!1,createInternalComparator:t,createState:r,strict:s=!1}=n,o=sm(n),i=rm(o),l=t?t(i):om(i);return im({circular:e,comparator:i,createState:r,equals:l,strict:s})}mh({title:lo().min(1),description:lo().nullable(),body:lo()});function uo(n){for(const e of n.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function am(){const n=window.location.pathname.split("/").filter(Boolean),e=n.findIndex(r=>r==="mcps"),t=e>=0?n[e+1]:void 0;return t?decodeURIComponent(t):void 0}function cm(n){const e=I.c(13),{form:t}=n;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=m.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=r):r=e[0];let s;e[1]!==t.control?(s=m.jsxs("div",{className:"flex flex-col gap-4",children:[r,m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[m.jsx(ao,{control:t.control,name:"title",render:fm}),m.jsx(ao,{control:t.control,name:"description",render:um})]})]}),e[1]=t.control,e[2]=s):s=e[2];let o,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=m.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),i=m.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=o,e[4]=i):(o=e[3],i=e[4]);let l;e[5]!==t.control?(l=m.jsxs("div",{className:"flex flex-col gap-2",children:[o,i,m.jsx(ao,{control:t.control,name:"body",render:dm})]}),e[5]=t.control,e[6]=l):l=e[6];let a;e[7]!==s||e[8]!==l?(a=m.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[s,l]}),e[7]=s,e[8]=l,e[9]=a):a=e[9];let c;return e[10]!==t||e[11]!==a?(c=m.jsx(Ph,{...t,children:a}),e[10]=t,e[11]=a,e[12]=c):c=e[12],c}function dm(n){const{field:e}=n;return m.jsx(Ri,{children:m.jsx(ji,{children:m.jsx(Ho,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function um(n){const{field:e}=n;return m.jsxs(Ri,{children:[m.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),m.jsx(ji,{children:m.jsx(Ii,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function fm(n){const{field:e}=n;return m.jsxs(Ri,{children:[m.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),m.jsx(ji,{children:m.jsx(Ii,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function hm(n){const e=I.c(51),{providerId:t,promptId:r,onBack:s}=n,i=Ci().location.href,l=t||qt;let a;e[0]!==l?(a=qe(l),e[0]=l,e[1]=a):a=e[1];const c=a,d=Mi(t,"PROMPT",r,c),u=Ai(t,"PROMPT",c),f=u.update.isPending;let h;e[2]!==d?(h=d?{title:d.title,description:d.description??null,body:uo(d)}:void 0,e[2]=d,e[3]=h):h=e[3];let p;e[4]!==h?(p={values:h},e[4]=h,e[5]=p):p=e[5];const y=gh(p);let g;e[6]!==y||e[7]!==d?(g=()=>{d&&y.reset({title:d.title,description:d.description??null,body:uo(d)})},e[6]=y,e[7]=d,e[8]=g):g=e[8];const x=g;let b;e[9]!==u.update||e[10]!==y||e[11]!==r?(b=y.handleSubmit(async X=>{const fe=await u.update.mutateAsync({id:r,data:{title:X.title,description:X.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:X.body}}]}});y.reset({title:fe.title,description:fe.description??null,body:uo(fe)})}),e[9]=u.update,e[10]=y,e[11]=r,e[12]=b):b=e[12];const S=b;if(!d){let X;return e[13]===Symbol.for("react.memo_cache_sentinel")?(X=m.jsx("div",{className:"flex h-full w-full bg-background",children:m.jsx(jc,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[13]=X):X=e[13],X}let v;e[14]!==d.title?(v=m.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:d.title}),e[14]=d.title,e[15]=v):v=e[15];let k;e[16]!==d.description?(k=d.description?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),m.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:d.description})]}):null,e[16]=d.description,e[17]=k):k=e[17];let w;e[18]!==v||e[19]!==k?(w=m.jsx(Lc,{children:m.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[v,k]})}),e[18]=v,e[19]=k,e[20]=w):w=e[20];let C;e[21]!==d.title||e[22]!==i?(C=m.jsx(Oi,{title:d.title,url:i,icon:"description"}),e[21]=d.title,e[22]=i,e[23]=C):C=e[23];const T=!y.formState.isDirty||f;let A;e[24]===Symbol.for("react.memo_cache_sentinel")?(A=m.jsx(Pc,{size:14}),e[24]=A):A=e[24];let D;e[25]!==x||e[26]!==T?(D=m.jsx(Lt,{asChild:!0,children:m.jsx("span",{className:"inline-block",children:m.jsx(me,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:T,onClick:x,"aria-label":"Cancel",children:A})})}),e[25]=x,e[26]=T,e[27]=D):D=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=m.jsx($t,{side:"bottom",children:"Cancel"}),e[28]=j):j=e[28];let _;e[29]!==D?(_=m.jsx(zt,{children:m.jsxs(_t,{delayDuration:0,children:[D,j]})}),e[29]=D,e[30]=_):_=e[30];const V=!y.formState.isDirty||f;let B;e[31]!==S?(B=()=>{S()},e[31]=S,e[32]=B):B=e[32];let H;e[33]===Symbol.for("react.memo_cache_sentinel")?(H=m.jsx(Ui,{size:14}),e[33]=H):H=e[33];let N;e[34]!==V||e[35]!==B?(N=m.jsx(Lt,{asChild:!0,children:m.jsx("span",{className:"inline-block",children:m.jsx(me,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:V,onClick:B,"aria-label":"Save",children:H})})}),e[34]=V,e[35]=B,e[36]=N):N=e[36];let z;e[37]===Symbol.for("react.memo_cache_sentinel")?(z=m.jsx($t,{side:"bottom",children:"Save"}),e[37]=z):z=e[37];let P;e[38]!==N?(P=m.jsx(zt,{children:m.jsxs(_t,{delayDuration:0,children:[N,z]})}),e[38]=N,e[39]=P):P=e[39];let K;e[40]!==C||e[41]!==_||e[42]!==P?(K=m.jsxs(Di,{children:[C,_,P]}),e[40]=C,e[41]=_,e[42]=P,e[43]=K):K=e[43];let Q;e[44]!==y?(Q=m.jsx("div",{className:"h-full",children:m.jsx(cm,{form:y})}),e[44]=y,e[45]=Q):Q=e[45];let le;return e[46]!==s||e[47]!==K||e[48]!==Q||e[49]!==w?(le=m.jsxs(Sn,{onBack:s,children:[w,K,Q]}),e[46]=s,e[47]=K,e[48]=Q,e[49]=w,e[50]=le):le=e[50],le}function pm(n){const e=I.c(5),{itemId:t,onBack:r}=n;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=am()??qt,e[0]=s):s=e[0];const o=s;if(!o||o===qt){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=m.jsx("div",{className:"flex h-full w-full bg-background",children:m.jsx(jc,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=l):l=e[1],l}let i;return e[2]!==t||e[3]!==r?(i=m.jsx(Dc,{children:m.jsx(O.Suspense,{fallback:null,children:m.jsx(hm,{providerId:o,promptId:t,onBack:r})})}),e[2]=t,e[3]=r,e[4]=i):i=e[4],i}const mm=yh("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function gm(n){const e=I.c(10);let t,r,s;e[0]!==n?({className:t,variant:s,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=s):(t=e[1],r=e[2],s=e[3]);let o;e[4]!==t||e[5]!==s?(o=U(mm({variant:s}),t),e[4]=t,e[5]=s,e[6]=o):o=e[6];let i;return e[7]!==r||e[8]!==o?(i=m.jsx("div",{"data-slot":"alert",role:"alert",className:o,...r}),e[7]=r,e[8]=o,e[9]=i):i=e[9],i}function ym(n){const e=I.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=U("line-clamp-1 min-h-4 font-medium tracking-tight",t),e[3]=t,e[4]=s):s=e[4];let o;return e[5]!==r||e[6]!==s?(o=m.jsx("div",{"data-slot":"alert-title",className:s,...r}),e[5]=r,e[6]=s,e[7]=o):o=e[7],o}function xm(n){const e=I.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=U("text-muted-foreground leading-relaxed",t),e[3]=t,e[4]=s):s=e[4];let o;return e[5]!==r||e[6]!==s?(o=m.jsx("div",{"data-slot":"alert-description",className:s,...r}),e[5]=r,e[6]=s,e[7]=o):o=e[7],o}const bm=n=>n.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function km(n){const e=I.c(13),{toolName:t,connectionId:r,onBack:s}=n,o=`/mcp/${r}`;let i;e[0]!==o?(i=new URL(o,window.location.origin),e[0]=o,e[1]=i):i=e[1];const l=i;let a;e[2]!==r?(a={connectionId:r},e[2]=r,e[3]=a):a=e[3];const c=Vh(a);if(!c.isAuthenticated){let f;return e[4]!==c.supportsOAuth||e[5]!==s?(f=m.jsx("div",{className:"flex h-full items-center justify-center",children:c.supportsOAuth?m.jsx(Hh,{onAuthenticate:()=>s(),buttonText:"Go back to authenticate"}):m.jsx(Wh,{hasReadme:!1})}),e[4]=c.supportsOAuth,e[5]=s,e[6]=f):f=e[6],f}const d=`${r}:${t}`;let u;return e[7]!==r||e[8]!==l||e[9]!==s||e[10]!==d||e[11]!==t?(u=m.jsx(Sm,{toolName:t,connectionId:r,mcpProxyUrl:l,onBack:s},d),e[7]=r,e[8]=l,e[9]=s,e[10]=d,e[11]=t,e[12]=u):u=e[12],u}function Sm({toolName:n,connectionId:e,mcpProxyUrl:t,onBack:r}){const o=Ci().location.href,{replayId:i}=xh({strict:!1}),l=(()=>{if(!i)return null;const N=`replay-${i}`,z=sessionStorage.getItem(N);if(!z)return null;sessionStorage.removeItem(N);try{return JSON.parse(z)}catch{return null}})(),a=(()=>{if(!l)return null;const N={};for(const[z,P]of Object.entries(l))P!==null&&typeof P=="object"?N[z]=JSON.stringify(P,null,2):N[z]=P;return N})(),[c,d]=O.useState(a??{}),[u,f]=O.useState(l?JSON.stringify(l,null,2):"{}"),[h,p]=O.useState(null),[y,g]=O.useState(null),[x,b]=O.useState(!1),[S,v]=O.useState(null),k=Pi(e),w=zi({url:t.href});O.useEffect(()=>{w.error&&console.error("MCP Error:",w.error)},[w.error]);const C=w.tools?.find(N=>N.name===n),T=C?.inputSchema?.properties,A=T?Object.keys(T):[],D=A.length>0,j={};if(D&&C?.inputSchema?.properties)for(const N of A)j[N]=C.inputSchema.required?.includes(N)?"":void 0;const _=N=>Object.prototype.hasOwnProperty.call(c,N),V=async()=>{b(!0),g(null),p(null),v(null);const N=performance.now(),z=qe(e);try{const P=D?{...j,...c}:(()=>{const se=u.trim();if(!se)return{};const J=JSON.parse(se);if(J&&typeof J=="object")return J;throw new Error("Raw JSON input must be an object.")})();D&&C?.inputSchema?.properties&&Object.entries(C.inputSchema.properties).forEach(([se,J])=>{if((J.type==="object"||J.type==="array")&&typeof P[se]=="string")try{P[se]=JSON.parse(P[se])}catch{}});const K=await z(n,P),Q=performance.now(),le=Math.round(Q-N);p(K);const X=JSON.stringify(K),fe=new TextEncoder().encode(X).length;v({duration:`${le}ms`,bytes:`${fe} bytes`,tokens:`~${Math.ceil(fe/4)} tokens`,cost:"$0.0000"})}catch(P){const K=P instanceof Error?P.message:String(P);g(K||"Unknown error occurred");const Q=performance.now();v({duration:`${Math.round(Q-N)}ms`})}finally{b(!1)}},B=(N,z)=>{d(P=>({...P,[N]:z}))},H=()=>{p(null),g(null),v(null)};return m.jsxs(Sn,{onBack:r,children:[m.jsx(Di,{children:m.jsx(Oi,{title:C?.name??bm(n),url:o,icon:"build"})}),m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 h-full",children:[m.jsx("div",{className:"flex flex-col border-r border-border overflow-hidden",children:m.jsxs("div",{className:"flex-1 overflow-auto",children:[m.jsx("div",{className:"flex flex-col gap-4 p-6 border-b border-border min-h-28",children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(js,{icon:k?.icon||null,name:k?.title||n,size:"sm",className:"shadow-sm shrink-0"}),m.jsx("h1",{className:"text-lg font-medium text-foreground leading-none",children:n}),m.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit",children:[w.state==="ready"?m.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):w.state==="connecting"?m.jsx(tr,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):m.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),m.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:w.state.replace("_"," ")})]})]}),m.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:C?.description||"No description available"})]})}),m.jsxs("div",{className:"flex flex-col p-6 gap-4",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),C?.inputSchema?.required&&C.inputSchema.required.length>0&&m.jsxs("span",{className:"text-xs text-muted-foreground",children:[m.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),m.jsx("div",{className:"space-y-4",children:D&&C?.inputSchema?.properties?Object.entries(C.inputSchema.properties).map(([N,z])=>m.jsxs("div",{className:"space-y-2",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[N,C.inputSchema?.required?.includes(N)&&m.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),m.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:z.type})]}),z.description&&m.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:z.description}),z.type==="object"||z.type==="array"?m.jsx(Ho,{className:"font-mono text-xs",value:_(N)?c[N]??"":j[N]??"",onChange:P=>B(N,P.target.value),placeholder:`Enter ${N} as JSON...`,rows:3}):m.jsx(Ii,{value:_(N)?c[N]??"":j[N]??"",onChange:P=>B(N,P.target.value),placeholder:`Enter ${N}...`})]},N)):C?.inputSchema&&!D?m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),m.jsx(Ho,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:N=>f(N.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):m.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:m.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})})]})]})}),m.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[m.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-t lg:border-t-0 border-b border-border bg-background",children:[m.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),S&&m.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx(zh,{className:"h-3 w-3 text-muted-foreground"}),m.jsx("span",{className:"font-mono text-foreground",children:S.duration})]}),S.tokens&&m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx(Kc,{className:"h-3 w-3 text-muted-foreground"}),m.jsx("span",{className:"font-mono text-foreground",children:S.tokens})]}),S.bytes&&m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx(Yc,{className:"h-3 w-3 text-muted-foreground"}),m.jsx("span",{className:"font-mono text-foreground",children:S.bytes})]}),S.cost&&m.jsx("div",{className:"flex items-center gap-1.5",children:m.jsx("span",{className:"font-mono text-foreground",children:S.cost})})]})]}),m.jsx("div",{className:"flex items-center justify-end lg:justify-between px-4 h-14 border-b border-border bg-background",children:m.jsxs("div",{className:"flex items-center gap-2 w-full lg:w-auto",children:[m.jsx(me,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:V,disabled:x,children:x?m.jsxs(m.Fragment,{children:[m.jsx(tr,{size:14,className:"animate-spin"}),"Executing..."]}):m.jsxs(m.Fragment,{children:[m.jsx(Li,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),m.jsx(zt,{children:m.jsxs(_t,{children:[m.jsx(Lt,{asChild:!0,children:m.jsx(me,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0",onClick:H,disabled:!h&&!y,children:m.jsx($i,{size:14})})}),m.jsx($t,{children:m.jsx("p",{children:"Clear results"})})]})})]})}),y&&m.jsx("div",{className:"px-6 py-4 bg-background",children:m.jsx(gm,{variant:"destructive",children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx($h,{className:"h-4 w-4"}),m.jsx(ym,{className:"mb-0",children:"Execution Failed"})]}),m.jsx(xm,{className:"text-xs text-destructive",children:y})]})})}),m.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:h?m.jsxs(m.Fragment,{children:[m.jsx(On,{code:JSON.stringify(h,null,2),language:"json",height:"100%",readOnly:!0}),m.jsx(me,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(h,null,2)),Ec.success("Copied to clipboard")},children:m.jsx(Bh,{className:"h-3.5 w-3.5"})})]}):m.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[m.jsx(_h,{className:"h-12 w-12 mb-3 opacity-40"}),m.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})]})}function wm(n){const e=I.c(7),{itemId:t,onBack:r}=n;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[0]=s):s=e[0];const i=Et(s).connectionId??qt;if(!Pi(i)){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=m.jsx("div",{className:"flex h-full items-center justify-center",children:m.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[m.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),m.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[1]=d):d=e[1],d}let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=m.jsx("div",{className:"flex h-full items-center justify-center",children:m.jsx(tr,{size:32,className:"animate-spin text-muted-foreground"})}),e[2]=a):a=e[2];let c;return e[3]!==i||e[4]!==r||e[5]!==t?(c=m.jsx(O.Suspense,{fallback:a,children:m.jsx(km,{toolName:t,connectionId:i,onBack:r})}),e[3]=i,e[4]=r,e[5]=t,e[6]=c):c=e[6],c}const Kl=n=>{let e;const t=new Set,r=(c,d)=>{const u=typeof c=="function"?c(e):c;if(!Object.is(u,e)){const f=e;e=d??(typeof u!="object"||u===null)?u:Object.assign({},e,u),t.forEach(h=>h(e,f))}},s=()=>e,l={setState:r,getState:s,getInitialState:()=>a,subscribe:c=>(t.add(c),()=>t.delete(c))},a=e=n(r,s,l);return l},Ki=(n=>n?Kl(n):Kl),vm=n=>n;function Wo(n,e=vm){const t=ee.useSyncExternalStore(n.subscribe,ee.useCallback(()=>e(n.getState()),[n,e]),ee.useCallback(()=>e(n.getInitialState()),[n,e]));return ee.useDebugValue(t),t}const Cm=n=>{const e=Ki(n),t=r=>Wo(e,r);return Object.assign(t,e),t},Nm=(n=>Cm);function td(n,e){let t;try{t=n()}catch{return}return{getItem:s=>{var o;const i=a=>a===null?null:JSON.parse(a,void 0),l=(o=t.getItem(s))!=null?o:null;return l instanceof Promise?l.then(i):i(l)},setItem:(s,o)=>t.setItem(s,JSON.stringify(o,void 0)),removeItem:s=>t.removeItem(s)}}const qo=n=>e=>{try{const t=n(e);return t instanceof Promise?t:{then(r){return qo(r)(t)},catch(r){return this}}}catch(t){return{then(r){return this},catch(r){return qo(r)(t)}}}},Em=(n,e)=>(t,r,s)=>{let o={storage:td(()=>localStorage),partialize:g=>g,version:0,merge:(g,x)=>({...x,...g}),...e},i=!1,l=0;const a=new Set,c=new Set;let d=o.storage;if(!d)return n((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),t(...g)},r,s);const u=()=>{const g=o.partialize({...r()});return d.setItem(o.name,{state:g,version:o.version})},f=s.setState;s.setState=(g,x)=>(f(g,x),u());const h=n((...g)=>(t(...g),u()),r,s);s.getInitialState=()=>h;let p;const y=()=>{var g,x;if(!d)return;const b=++l;i=!1,a.forEach(v=>{var k;return v((k=r())!=null?k:h)});const S=((x=o.onRehydrateStorage)==null?void 0:x.call(o,(g=r())!=null?g:h))||void 0;return qo(d.getItem.bind(d))(o.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==o.version){if(o.migrate){const k=o.migrate(v.state,v.version);return k instanceof Promise?k.then(w=>[!0,w]):[!0,k]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,v.state];return[!1,void 0]}).then(v=>{var k;if(b!==l)return;const[w,C]=v;if(p=o.merge(C,(k=r())!=null?k:h),t(p,!0),w)return u()}).then(()=>{b===l&&(S?.(p,void 0),p=r(),i=!0,c.forEach(v=>v(p)))}).catch(v=>{b===l&&S?.(void 0,v)})};return s.persist={setOptions:g=>{o={...o,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d?.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>y(),hasHydrated:()=>i,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(c.add(g),()=>{c.delete(g)})},o.skipHydration||y(),p||h},nd=Em,{useSyncExternalStoreWithSelector:Tm}=bh,Mm=n=>n;function Am(n,e=Mm,t){const r=Tm(n.subscribe,n.getState,n.getInitialState,e,t);return ee.useDebugValue(r),r}const Jl=n=>Symbol.iterator in n,Gl=n=>"entries"in n,Xl=(n,e)=>{const t=n instanceof Map?n:new Map(n.entries()),r=e instanceof Map?e:new Map(e.entries());if(t.size!==r.size)return!1;for(const[s,o]of t)if(!r.has(s)||!Object.is(o,r.get(s)))return!1;return!0},Om=(n,e)=>{const t=n[Symbol.iterator](),r=e[Symbol.iterator]();let s=t.next(),o=r.next();for(;!s.done&&!o.done;){if(!Object.is(s.value,o.value))return!1;s=t.next(),o=r.next()}return!!s.done&&!!o.done};function Im(n,e){return Object.is(n,e)?!0:typeof n!="object"||n===null||typeof e!="object"||e===null||Object.getPrototypeOf(n)!==Object.getPrototypeOf(e)?!1:Jl(n)&&Jl(e)?Gl(n)&&Gl(e)?Xl(n,e):Om(n,e):Xl({entries:()=>Object.entries(n)},{entries:()=>Object.entries(e)})}function Rm(n,e="Output"){if(!n)return`interface ${e} {}`;function t(o){if(!o||typeof o!="object")return"unknown";const i=o.type;if(Array.isArray(i))return i.map(l=>r(l)).join(" | ");switch(i){case"string":return o.enum?o.enum.map(l=>`"${l}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const l=o.items;return l?`${t(l)}[]`:"unknown[]"}case"object":return s(o);default:return o.anyOf?o.anyOf.map(t).join(" | "):o.oneOf?o.oneOf.map(t).join(" | "):o.allOf?o.allOf.map(t).join(" & "):"unknown"}}function r(o){switch(o){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function s(o){const i=o.properties;if(!i)return"Record<string, unknown>";const l=new Set(o.required||[]);return`{
|
|
1
|
+
import{as as We,r as O,v as mh,w as lo,c as I,j as m,k as Ci,y as gh,h as yh,d as Et,b as xh,t as Ec,B as ee,z as bh,at as Tc,a6 as kh,a5 as Sh,au as wh,ac as Mc,av as Ac,aw as vh,ad as Ni,af as Ge,ae as Oc,ax as Ch,ai as Ei,ay as Nh,aa as Ic,az as Eh,aA as Th,aB as Mh,aC as Ti,aD as Ah,aE as Oh,aF as Ih,ab as Rh,aG as jh,ar as Rc}from"./index-Bz1LU39D.js";import{U as qt,E as jc,u as Mi,a as Ai,c as qe,I as js,n as Dh}from"./empty-state-DgOO5bI1.js";import{E as Dc}from"./error-boundary-uBvOVTCE.js";import{P as Oi}from"./pin-to-sidebar-button-C-akIZzz.js";import{B as me,I as Ii,c as U}from"./input-CtiQUsvV.js";import{F as ao,a as Ph,b as Ri,d as ji}from"./form-orY-xngM.js";import{T as Ho}from"./textarea-D76YOeHc.js";import{b as Lt,T as $t,a as zt,c as _t}from"./project-context-provider-_aLYBfO9.js";import{i as Pc}from"./FlipBackward-CpWoOBPz.js";import{a as Lc,V as Di,b as Sn}from"./layout-C8G6tSLB.js";import{c as Pi,u as Lh}from"./use-connection-BXdeHsm0.js";import{i as $h}from"./AlertCircle-CtP28Oyz.js";import{s as zh}from"./Clock-DiHiAbv6.js";import{i as _h}from"./Code01-CTUZx8UP.js";import{a as Bh}from"./Copy01-BctGx-5E.js";import{i as tr}from"./Loading01-CdaWSExX.js";import{i as Li,n as Fh}from"./Play-CjVz5-Yt.js";import{s as $i}from"./XClose-D0utLGU3.js";import{u as Vh,O as Hh,M as Wh,F as qh,v as Uh}from"./index-K2EwRRk6.js";import{u as zi}from"./use-mcp-kCjFuvFP.js";import{M as On}from"./monaco-editor-BmVBfnK5.js";import{E as _i}from"./empty-state-DSGxvcRL.js";import{D as Kh,u as Jh}from"./use-binding-UNVemCFv.js";import{u as Gh}from"./use-gateway-BhC1hXIm.js";import{b as Xh,R as Bl,a as Yh}from"./resizable-djk090hC.js";import{h as Qh,q as Zh,r as $c,R as ep,s as tp,T as np}from"./index-BuPukvJG.js";import{d as rp,b as sp,a as op,c as ip,S as lp}from"./select-Bxj6_TSM.js";import{S as Ds}from"./spinner-C7HX4n17.js";import{V as ap}from"./view-mode-toggle-CVcyaB_S.js";import{i as cp}from"./GitBranch01-DWYSSAGj.js";import{a as Bi,b as Fi}from"./use-tool-call-BLplGau6.js";import{a as dp,D as up,g as fp,f as hp,c as pp,d as mp}from"./dialog-D9LHhl79.js";import"./index-Cw3bkeXO.js";import{s as zc}from"./Plus-CovnOzP9.js";import{i as Vi}from"./Check-Bkw0Gz-n.js";import{i as gp}from"./DotsHorizontal-MMZ1EZhB.js";import{b as yp,D as xp,a as bp,c as Fl}from"./dropdown-menu-DjFWyTtD.js";import{i as kp}from"./Grid01-BEpepbVy.js";import{B as un}from"./badge-8BCP2QJ_.js";import{i as _c}from"./X-DcqsnRSe.js";import"./use-organization-settings-DBRSoBd0.js";import"./ArrowLeft-Bps-R0_t.js";import"./mcp-oauth-BzcB2WNx.js";import"./auth-CNkA6dk2.js";import"./env-vars-editor-mM2KyO-W.js";import"./Trash01-DopdNXEu.js";import"./File06-nV81V8TD.js";import"./Key01-ChIWeKNh.js";import"./registry-utils-BIzwINzW.js";import"./Terminal-DYwA22tz.js";import"./index-o28bnKR9.js";import"./constants-8DEiLmV-.js";import"./extract-connection-data-DMhfaAiL.js";import"./github-icon-Dp3wHhYE.js";import"./generate-id-Dyweu44Y.js";import"./popover-QWczrvYc.js";import"./SearchMd-YxKkBPG0.js";import"./use-create-gateway-D8vNiD2K.js";import"./localstorage-keys-5oG1CfEQ.js";import"./alert-dialog-B2ogXLEp.js";import"./use-mobile-sd5ko6M_.js";import"./InfoCircle-BXctEVkS.js";import"./ChevronDown-mvTJP4-S.js";const Bc=We("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const Fc=We("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const Hi=We("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Wi=We("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Sp=We("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const wp=We("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const Vc=We("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Hc=We("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const Wc=We("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const qc=We("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const Uc=We("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),qi=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"M12 8v4m0 4h.01M2 8.523v6.954c0 .245 0 .367.028.482a1 1 0 0 0 .12.29c.061.1.148.187.32.36l4.923 4.922c.173.173.26.26.36.322.09.054.188.095.29.12.115.027.237.027.482.027h6.954c.245 0 .367 0 .482-.028a.998.998 0 0 0 .29-.12c.1-.061.187-.148.36-.32l4.922-4.923c.173-.173.26-.26.322-.36a.998.998 0 0 0 .12-.29c.027-.115.027-.237.027-.482V8.523c0-.245 0-.367-.028-.482a.998.998 0 0 0-.12-.29c-.061-.1-.148-.187-.32-.36L16.608 2.47c-.173-.173-.26-.26-.36-.322a1 1 0 0 0-.29-.12C15.844 2 15.722 2 15.477 2H8.523c-.245 0-.367 0-.482.028a1 1 0 0 0-.29.12c-.1.061-.187.148-.36.32L2.47 7.392c-.173.173-.26.26-.322.36a1 1 0 0 0-.12.29C2 8.156 2 8.278 2 8.523Z"}));qi.displayName="AlertOctagon";const Kc=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"M20.5 8v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.22 21 17.38 21 15.7 21H8.3c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3.5 18.72 3.5 17.88 3.5 16.2V8m.1-5h16.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C22 3.76 22 4.04 22 4.6v1.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C21.24 8 20.96 8 20.4 8H3.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C2 7.24 2 6.96 2 6.4V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C2.76 3 3.04 3 3.6 3Zm6 8.5h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 12.26 16 12.54 16 13.1v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437c-.214.109-.494.109-1.054.109H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 14.74 8 14.46 8 13.9v-.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 11.5 9.04 11.5 9.6 11.5Z"}));Kc.displayName="Box";const Jc=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"m22.7 11.5-2 2-2-2m2.245 1.5A9 9 0 1 0 19 17.657M12 7v5l3 2"}));Jc.displayName="ClockFastForward";const Gc=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18"}));Gc.displayName="Code02";const jr=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"M6.8 3h-.6c-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 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C10 19.48 10 18.92 10 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C8.48 3 7.92 3 6.8 3Zm11 0h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C14 4.52 14 5.08 14 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C15.52 21 16.08 21 17.2 21h.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 3Z"}));jr.displayName="Columns01";const Xc=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"M4 4v1.4c0 3.36 0 5.04.654 6.324a6 6 0 0 0 2.622 2.622C8.56 15 10.24 15 13.6 15H20m0 0-5-5m5 5-5 5"}));Xc.displayName="CornerDownRight";const Yc=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"M21 5c0 1.657-4.03 3-9 3S3 6.657 3 5m18 0c0-1.657-4.03-3-9-3S3 3.343 3 5m18 0v14c0 1.66-4 3-9 3s-9-1.34-9-3V5m18 7c0 1.66-4 3-9 3s-9-1.34-9-3"}));Yc.displayName="Database01";const Qc=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"m13 22-3-3m0 0 3-3m-3 3h5a7 7 0 0 0 3-13.326M6 18.326A7 7 0 0 1 9 5h5m0 0-3-3m3 3-3 3"}));Qc.displayName="Repeat03";const Ui=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"M15 8H8.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C7 7.24 7 6.96 7 6.4V3m10 18v-6.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C16.24 13 15.96 13 15.4 13H8.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C7 13.76 7 14.04 7 14.6V21M21 9.325V16.2c0 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 3h6.875c.489 0 .733 0 .963.055.204.05.4.13.579.24.201.123.374.296.72.642l3.126 3.126c.346.346.519.519.642.72.11.18.19.374.24.579.055.23.055.474.055.963Z"}));Ui.displayName="Save02";const Zc=({size:n=24,color:e="currentColor",...t})=>O.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},O.createElement("path",{d:"M15.631 7.631c-.396-.396-.594-.594-.668-.822a1 1 0 0 1 0-.618c.074-.228.272-.426.668-.822L18.47 2.53a6 6 0 0 0-8.3 6.895c.12.49.179.734.168.888a.849.849 0 0 1-.11.392c-.07.138-.207.274-.48.547L3.5 17.5a2.121 2.121 0 0 0 3 3l6.248-6.248c.273-.273.41-.41.547-.48a.849.849 0 0 1 .392-.11c.154-.011.399.049.888.168a6 6 0 0 0 6.895-8.3l-2.84 2.84c-.396.396-.594.594-.822.668a1 1 0 0 1-.618 0c-.228-.074-.426-.272-.822-.668l-.738-.738Z"}));Zc.displayName="Tool01";const{getOwnPropertyNames:vp,getOwnPropertySymbols:Cp}=Object,{hasOwnProperty:Np}=Object.prototype;function co(n,e){return function(r,s,o){return n(r,s,o)&&e(r,s,o)}}function kr(n){return function(t,r,s){if(!t||!r||typeof t!="object"||typeof r!="object")return n(t,r,s);const{cache:o}=s,i=o.get(t),l=o.get(r);if(i&&l)return i===r&&l===t;o.set(t,r),o.set(r,t);const a=n(t,r,s);return o.delete(t),o.delete(r),a}}function Ep(n){return n?.[Symbol.toStringTag]}function Vl(n){return vp(n).concat(Cp(n))}const Tp=Object.hasOwn||((n,e)=>Np.call(n,e));function Yt(n,e){return n===e||!n&&!e&&n!==n&&e!==e}const Mp="__v",Ap="__o",Op="_owner",{getOwnPropertyDescriptor:Hl,keys:Wl}=Object;function Ip(n,e){return n.byteLength===e.byteLength&&Br(new Uint8Array(n),new Uint8Array(e))}function Rp(n,e,t){let r=n.length;if(e.length!==r)return!1;for(;r-- >0;)if(!t.equals(n[r],e[r],r,r,n,e,t))return!1;return!0}function jp(n,e){return n.byteLength===e.byteLength&&Br(new Uint8Array(n.buffer,n.byteOffset,n.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function Dp(n,e){return Yt(n.getTime(),e.getTime())}function Pp(n,e){return n.name===e.name&&n.message===e.message&&n.cause===e.cause&&n.stack===e.stack}function Lp(n,e){return n===e}function ql(n,e,t){const r=n.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),o=n.entries();let i,l,a=0;for(;(i=o.next())&&!i.done;){const c=e.entries();let d=!1,u=0;for(;(l=c.next())&&!l.done;){if(s[u]){u++;continue}const f=i.value,h=l.value;if(t.equals(f[0],h[0],a,u,n,e,t)&&t.equals(f[1],h[1],f[0],h[0],n,e,t)){d=s[u]=!0;break}u++}if(!d)return!1;a++}return!0}const $p=Yt;function zp(n,e,t){const r=Wl(n);let s=r.length;if(Wl(e).length!==s)return!1;for(;s-- >0;)if(!ed(n,e,t,r[s]))return!1;return!0}function zn(n,e,t){const r=Vl(n);let s=r.length;if(Vl(e).length!==s)return!1;let o,i,l;for(;s-- >0;)if(o=r[s],!ed(n,e,t,o)||(i=Hl(n,o),l=Hl(e,o),(i||l)&&(!i||!l||i.configurable!==l.configurable||i.enumerable!==l.enumerable||i.writable!==l.writable)))return!1;return!0}function _p(n,e){return Yt(n.valueOf(),e.valueOf())}function Bp(n,e){return n.source===e.source&&n.flags===e.flags}function Ul(n,e,t){const r=n.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),o=n.values();let i,l;for(;(i=o.next())&&!i.done;){const a=e.values();let c=!1,d=0;for(;(l=a.next())&&!l.done;){if(!s[d]&&t.equals(i.value,l.value,i.value,l.value,n,e,t)){c=s[d]=!0;break}d++}if(!c)return!1}return!0}function Br(n,e){let t=n.byteLength;if(e.byteLength!==t||n.byteOffset!==e.byteOffset)return!1;for(;t-- >0;)if(n[t]!==e[t])return!1;return!0}function Fp(n,e){return n.hostname===e.hostname&&n.pathname===e.pathname&&n.protocol===e.protocol&&n.port===e.port&&n.hash===e.hash&&n.username===e.username&&n.password===e.password}function ed(n,e,t,r){return(r===Op||r===Ap||r===Mp)&&(n.$$typeof||e.$$typeof)?!0:Tp(e,r)&&t.equals(n[r],e[r],r,r,n,e,t)}const Vp="[object ArrayBuffer]",Hp="[object Arguments]",Wp="[object Boolean]",qp="[object DataView]",Up="[object Date]",Kp="[object Error]",Jp="[object Map]",Gp="[object Number]",Xp="[object Object]",Yp="[object RegExp]",Qp="[object Set]",Zp="[object String]",em={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},tm="[object URL]",nm=Object.prototype.toString;function rm({areArrayBuffersEqual:n,areArraysEqual:e,areDataViewsEqual:t,areDatesEqual:r,areErrorsEqual:s,areFunctionsEqual:o,areMapsEqual:i,areNumbersEqual:l,areObjectsEqual:a,arePrimitiveWrappersEqual:c,areRegExpsEqual:d,areSetsEqual:u,areTypedArraysEqual:f,areUrlsEqual:h,unknownTagComparators:p}){return function(g,x,b){if(g===x)return!0;if(g==null||x==null)return!1;const S=typeof g;if(S!==typeof x)return!1;if(S!=="object")return S==="number"?l(g,x,b):S==="function"?o(g,x,b):!1;const v=g.constructor;if(v!==x.constructor)return!1;if(v===Object)return a(g,x,b);if(Array.isArray(g))return e(g,x,b);if(v===Date)return r(g,x,b);if(v===RegExp)return d(g,x,b);if(v===Map)return i(g,x,b);if(v===Set)return u(g,x,b);const k=nm.call(g);if(k===Up)return r(g,x,b);if(k===Yp)return d(g,x,b);if(k===Jp)return i(g,x,b);if(k===Qp)return u(g,x,b);if(k===Xp)return typeof g.then!="function"&&typeof x.then!="function"&&a(g,x,b);if(k===tm)return h(g,x,b);if(k===Kp)return s(g,x,b);if(k===Hp)return a(g,x,b);if(em[k])return f(g,x,b);if(k===Vp)return n(g,x,b);if(k===qp)return t(g,x,b);if(k===Wp||k===Gp||k===Zp)return c(g,x,b);if(p){let w=p[k];if(!w){const C=Ep(g);C&&(w=p[C])}if(w)return w(g,x,b)}return!1}}function sm({circular:n,createCustomConfig:e,strict:t}){let r={areArrayBuffersEqual:Ip,areArraysEqual:t?zn:Rp,areDataViewsEqual:jp,areDatesEqual:Dp,areErrorsEqual:Pp,areFunctionsEqual:Lp,areMapsEqual:t?co(ql,zn):ql,areNumbersEqual:$p,areObjectsEqual:t?zn:zp,arePrimitiveWrappersEqual:_p,areRegExpsEqual:Bp,areSetsEqual:t?co(Ul,zn):Ul,areTypedArraysEqual:t?co(Br,zn):Br,areUrlsEqual:Fp,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),n){const s=kr(r.areArraysEqual),o=kr(r.areMapsEqual),i=kr(r.areObjectsEqual),l=kr(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:s,areMapsEqual:o,areObjectsEqual:i,areSetsEqual:l})}return r}function om(n){return function(e,t,r,s,o,i,l){return n(e,t,l)}}function im({circular:n,comparator:e,createState:t,equals:r,strict:s}){if(t)return function(l,a){const{cache:c=n?new WeakMap:void 0,meta:d}=t();return e(l,a,{cache:c,equals:r,meta:d,strict:s})};if(n)return function(l,a){return e(l,a,{cache:new WeakMap,equals:r,meta:void 0,strict:s})};const o={cache:void 0,equals:r,meta:void 0,strict:s};return function(l,a){return e(l,a,o)}}const lm=Tt();Tt({strict:!0});Tt({circular:!0});Tt({circular:!0,strict:!0});Tt({createInternalComparator:()=>Yt});Tt({strict:!0,createInternalComparator:()=>Yt});Tt({circular:!0,createInternalComparator:()=>Yt});Tt({circular:!0,createInternalComparator:()=>Yt,strict:!0});function Tt(n={}){const{circular:e=!1,createInternalComparator:t,createState:r,strict:s=!1}=n,o=sm(n),i=rm(o),l=t?t(i):om(i);return im({circular:e,comparator:i,createState:r,equals:l,strict:s})}mh({title:lo().min(1),description:lo().nullable(),body:lo()});function uo(n){for(const e of n.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function am(){const n=window.location.pathname.split("/").filter(Boolean),e=n.findIndex(r=>r==="mcps"),t=e>=0?n[e+1]:void 0;return t?decodeURIComponent(t):void 0}function cm(n){const e=I.c(13),{form:t}=n;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=m.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=r):r=e[0];let s;e[1]!==t.control?(s=m.jsxs("div",{className:"flex flex-col gap-4",children:[r,m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[m.jsx(ao,{control:t.control,name:"title",render:fm}),m.jsx(ao,{control:t.control,name:"description",render:um})]})]}),e[1]=t.control,e[2]=s):s=e[2];let o,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=m.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),i=m.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=o,e[4]=i):(o=e[3],i=e[4]);let l;e[5]!==t.control?(l=m.jsxs("div",{className:"flex flex-col gap-2",children:[o,i,m.jsx(ao,{control:t.control,name:"body",render:dm})]}),e[5]=t.control,e[6]=l):l=e[6];let a;e[7]!==s||e[8]!==l?(a=m.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[s,l]}),e[7]=s,e[8]=l,e[9]=a):a=e[9];let c;return e[10]!==t||e[11]!==a?(c=m.jsx(Ph,{...t,children:a}),e[10]=t,e[11]=a,e[12]=c):c=e[12],c}function dm(n){const{field:e}=n;return m.jsx(Ri,{children:m.jsx(ji,{children:m.jsx(Ho,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function um(n){const{field:e}=n;return m.jsxs(Ri,{children:[m.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),m.jsx(ji,{children:m.jsx(Ii,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function fm(n){const{field:e}=n;return m.jsxs(Ri,{children:[m.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),m.jsx(ji,{children:m.jsx(Ii,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function hm(n){const e=I.c(51),{providerId:t,promptId:r,onBack:s}=n,i=Ci().location.href,l=t||qt;let a;e[0]!==l?(a=qe(l),e[0]=l,e[1]=a):a=e[1];const c=a,d=Mi(t,"PROMPT",r,c),u=Ai(t,"PROMPT",c),f=u.update.isPending;let h;e[2]!==d?(h=d?{title:d.title,description:d.description??null,body:uo(d)}:void 0,e[2]=d,e[3]=h):h=e[3];let p;e[4]!==h?(p={values:h},e[4]=h,e[5]=p):p=e[5];const y=gh(p);let g;e[6]!==y||e[7]!==d?(g=()=>{d&&y.reset({title:d.title,description:d.description??null,body:uo(d)})},e[6]=y,e[7]=d,e[8]=g):g=e[8];const x=g;let b;e[9]!==u.update||e[10]!==y||e[11]!==r?(b=y.handleSubmit(async X=>{const fe=await u.update.mutateAsync({id:r,data:{title:X.title,description:X.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:X.body}}]}});y.reset({title:fe.title,description:fe.description??null,body:uo(fe)})}),e[9]=u.update,e[10]=y,e[11]=r,e[12]=b):b=e[12];const S=b;if(!d){let X;return e[13]===Symbol.for("react.memo_cache_sentinel")?(X=m.jsx("div",{className:"flex h-full w-full bg-background",children:m.jsx(jc,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[13]=X):X=e[13],X}let v;e[14]!==d.title?(v=m.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:d.title}),e[14]=d.title,e[15]=v):v=e[15];let k;e[16]!==d.description?(k=d.description?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),m.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:d.description})]}):null,e[16]=d.description,e[17]=k):k=e[17];let w;e[18]!==v||e[19]!==k?(w=m.jsx(Lc,{children:m.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[v,k]})}),e[18]=v,e[19]=k,e[20]=w):w=e[20];let C;e[21]!==d.title||e[22]!==i?(C=m.jsx(Oi,{title:d.title,url:i,icon:"description"}),e[21]=d.title,e[22]=i,e[23]=C):C=e[23];const T=!y.formState.isDirty||f;let A;e[24]===Symbol.for("react.memo_cache_sentinel")?(A=m.jsx(Pc,{size:14}),e[24]=A):A=e[24];let D;e[25]!==x||e[26]!==T?(D=m.jsx(Lt,{asChild:!0,children:m.jsx("span",{className:"inline-block",children:m.jsx(me,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:T,onClick:x,"aria-label":"Cancel",children:A})})}),e[25]=x,e[26]=T,e[27]=D):D=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=m.jsx($t,{side:"bottom",children:"Cancel"}),e[28]=j):j=e[28];let _;e[29]!==D?(_=m.jsx(zt,{children:m.jsxs(_t,{delayDuration:0,children:[D,j]})}),e[29]=D,e[30]=_):_=e[30];const V=!y.formState.isDirty||f;let B;e[31]!==S?(B=()=>{S()},e[31]=S,e[32]=B):B=e[32];let H;e[33]===Symbol.for("react.memo_cache_sentinel")?(H=m.jsx(Ui,{size:14}),e[33]=H):H=e[33];let N;e[34]!==V||e[35]!==B?(N=m.jsx(Lt,{asChild:!0,children:m.jsx("span",{className:"inline-block",children:m.jsx(me,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:V,onClick:B,"aria-label":"Save",children:H})})}),e[34]=V,e[35]=B,e[36]=N):N=e[36];let z;e[37]===Symbol.for("react.memo_cache_sentinel")?(z=m.jsx($t,{side:"bottom",children:"Save"}),e[37]=z):z=e[37];let P;e[38]!==N?(P=m.jsx(zt,{children:m.jsxs(_t,{delayDuration:0,children:[N,z]})}),e[38]=N,e[39]=P):P=e[39];let K;e[40]!==C||e[41]!==_||e[42]!==P?(K=m.jsxs(Di,{children:[C,_,P]}),e[40]=C,e[41]=_,e[42]=P,e[43]=K):K=e[43];let Q;e[44]!==y?(Q=m.jsx("div",{className:"h-full",children:m.jsx(cm,{form:y})}),e[44]=y,e[45]=Q):Q=e[45];let le;return e[46]!==s||e[47]!==K||e[48]!==Q||e[49]!==w?(le=m.jsxs(Sn,{onBack:s,children:[w,K,Q]}),e[46]=s,e[47]=K,e[48]=Q,e[49]=w,e[50]=le):le=e[50],le}function pm(n){const e=I.c(5),{itemId:t,onBack:r}=n;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=am()??qt,e[0]=s):s=e[0];const o=s;if(!o||o===qt){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=m.jsx("div",{className:"flex h-full w-full bg-background",children:m.jsx(jc,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=l):l=e[1],l}let i;return e[2]!==t||e[3]!==r?(i=m.jsx(Dc,{children:m.jsx(O.Suspense,{fallback:null,children:m.jsx(hm,{providerId:o,promptId:t,onBack:r})})}),e[2]=t,e[3]=r,e[4]=i):i=e[4],i}const mm=yh("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function gm(n){const e=I.c(10);let t,r,s;e[0]!==n?({className:t,variant:s,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=s):(t=e[1],r=e[2],s=e[3]);let o;e[4]!==t||e[5]!==s?(o=U(mm({variant:s}),t),e[4]=t,e[5]=s,e[6]=o):o=e[6];let i;return e[7]!==r||e[8]!==o?(i=m.jsx("div",{"data-slot":"alert",role:"alert",className:o,...r}),e[7]=r,e[8]=o,e[9]=i):i=e[9],i}function ym(n){const e=I.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=U("line-clamp-1 min-h-4 font-medium tracking-tight",t),e[3]=t,e[4]=s):s=e[4];let o;return e[5]!==r||e[6]!==s?(o=m.jsx("div",{"data-slot":"alert-title",className:s,...r}),e[5]=r,e[6]=s,e[7]=o):o=e[7],o}function xm(n){const e=I.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=U("text-muted-foreground leading-relaxed",t),e[3]=t,e[4]=s):s=e[4];let o;return e[5]!==r||e[6]!==s?(o=m.jsx("div",{"data-slot":"alert-description",className:s,...r}),e[5]=r,e[6]=s,e[7]=o):o=e[7],o}const bm=n=>n.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function km(n){const e=I.c(13),{toolName:t,connectionId:r,onBack:s}=n,o=`/mcp/${r}`;let i;e[0]!==o?(i=new URL(o,window.location.origin),e[0]=o,e[1]=i):i=e[1];const l=i;let a;e[2]!==r?(a={connectionId:r},e[2]=r,e[3]=a):a=e[3];const c=Vh(a);if(!c.isAuthenticated){let f;return e[4]!==c.supportsOAuth||e[5]!==s?(f=m.jsx("div",{className:"flex h-full items-center justify-center",children:c.supportsOAuth?m.jsx(Hh,{onAuthenticate:()=>s(),buttonText:"Go back to authenticate"}):m.jsx(Wh,{hasReadme:!1})}),e[4]=c.supportsOAuth,e[5]=s,e[6]=f):f=e[6],f}const d=`${r}:${t}`;let u;return e[7]!==r||e[8]!==l||e[9]!==s||e[10]!==d||e[11]!==t?(u=m.jsx(Sm,{toolName:t,connectionId:r,mcpProxyUrl:l,onBack:s},d),e[7]=r,e[8]=l,e[9]=s,e[10]=d,e[11]=t,e[12]=u):u=e[12],u}function Sm({toolName:n,connectionId:e,mcpProxyUrl:t,onBack:r}){const o=Ci().location.href,{replayId:i}=xh({strict:!1}),l=(()=>{if(!i)return null;const N=`replay-${i}`,z=sessionStorage.getItem(N);if(!z)return null;sessionStorage.removeItem(N);try{return JSON.parse(z)}catch{return null}})(),a=(()=>{if(!l)return null;const N={};for(const[z,P]of Object.entries(l))P!==null&&typeof P=="object"?N[z]=JSON.stringify(P,null,2):N[z]=P;return N})(),[c,d]=O.useState(a??{}),[u,f]=O.useState(l?JSON.stringify(l,null,2):"{}"),[h,p]=O.useState(null),[y,g]=O.useState(null),[x,b]=O.useState(!1),[S,v]=O.useState(null),k=Pi(e),w=zi({url:t.href});O.useEffect(()=>{w.error&&console.error("MCP Error:",w.error)},[w.error]);const C=w.tools?.find(N=>N.name===n),T=C?.inputSchema?.properties,A=T?Object.keys(T):[],D=A.length>0,j={};if(D&&C?.inputSchema?.properties)for(const N of A)j[N]=C.inputSchema.required?.includes(N)?"":void 0;const _=N=>Object.prototype.hasOwnProperty.call(c,N),V=async()=>{b(!0),g(null),p(null),v(null);const N=performance.now(),z=qe(e);try{const P=D?{...j,...c}:(()=>{const se=u.trim();if(!se)return{};const J=JSON.parse(se);if(J&&typeof J=="object")return J;throw new Error("Raw JSON input must be an object.")})();D&&C?.inputSchema?.properties&&Object.entries(C.inputSchema.properties).forEach(([se,J])=>{if((J.type==="object"||J.type==="array")&&typeof P[se]=="string")try{P[se]=JSON.parse(P[se])}catch{}});const K=await z(n,P),Q=performance.now(),le=Math.round(Q-N);p(K);const X=JSON.stringify(K),fe=new TextEncoder().encode(X).length;v({duration:`${le}ms`,bytes:`${fe} bytes`,tokens:`~${Math.ceil(fe/4)} tokens`,cost:"$0.0000"})}catch(P){const K=P instanceof Error?P.message:String(P);g(K||"Unknown error occurred");const Q=performance.now();v({duration:`${Math.round(Q-N)}ms`})}finally{b(!1)}},B=(N,z)=>{d(P=>({...P,[N]:z}))},H=()=>{p(null),g(null),v(null)};return m.jsxs(Sn,{onBack:r,children:[m.jsx(Di,{children:m.jsx(Oi,{title:C?.name??bm(n),url:o,icon:"build"})}),m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 h-full",children:[m.jsx("div",{className:"flex flex-col border-r border-border overflow-hidden",children:m.jsxs("div",{className:"flex-1 overflow-auto",children:[m.jsx("div",{className:"flex flex-col gap-4 p-6 border-b border-border min-h-28",children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(js,{icon:k?.icon||null,name:k?.title||n,size:"sm",className:"shadow-sm shrink-0"}),m.jsx("h1",{className:"text-lg font-medium text-foreground leading-none",children:n}),m.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit",children:[w.state==="ready"?m.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):w.state==="connecting"?m.jsx(tr,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):m.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),m.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:w.state.replace("_"," ")})]})]}),m.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:C?.description||"No description available"})]})}),m.jsxs("div",{className:"flex flex-col p-6 gap-4",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),C?.inputSchema?.required&&C.inputSchema.required.length>0&&m.jsxs("span",{className:"text-xs text-muted-foreground",children:[m.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),m.jsx("div",{className:"space-y-4",children:D&&C?.inputSchema?.properties?Object.entries(C.inputSchema.properties).map(([N,z])=>m.jsxs("div",{className:"space-y-2",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[N,C.inputSchema?.required?.includes(N)&&m.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),m.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:z.type})]}),z.description&&m.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:z.description}),z.type==="object"||z.type==="array"?m.jsx(Ho,{className:"font-mono text-xs",value:_(N)?c[N]??"":j[N]??"",onChange:P=>B(N,P.target.value),placeholder:`Enter ${N} as JSON...`,rows:3}):m.jsx(Ii,{value:_(N)?c[N]??"":j[N]??"",onChange:P=>B(N,P.target.value),placeholder:`Enter ${N}...`})]},N)):C?.inputSchema&&!D?m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),m.jsx(Ho,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:N=>f(N.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):m.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:m.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})})]})]})}),m.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[m.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-t lg:border-t-0 border-b border-border bg-background",children:[m.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),S&&m.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx(zh,{className:"h-3 w-3 text-muted-foreground"}),m.jsx("span",{className:"font-mono text-foreground",children:S.duration})]}),S.tokens&&m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx(Kc,{className:"h-3 w-3 text-muted-foreground"}),m.jsx("span",{className:"font-mono text-foreground",children:S.tokens})]}),S.bytes&&m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx(Yc,{className:"h-3 w-3 text-muted-foreground"}),m.jsx("span",{className:"font-mono text-foreground",children:S.bytes})]}),S.cost&&m.jsx("div",{className:"flex items-center gap-1.5",children:m.jsx("span",{className:"font-mono text-foreground",children:S.cost})})]})]}),m.jsx("div",{className:"flex items-center justify-end lg:justify-between px-4 h-14 border-b border-border bg-background",children:m.jsxs("div",{className:"flex items-center gap-2 w-full lg:w-auto",children:[m.jsx(me,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:V,disabled:x,children:x?m.jsxs(m.Fragment,{children:[m.jsx(tr,{size:14,className:"animate-spin"}),"Executing..."]}):m.jsxs(m.Fragment,{children:[m.jsx(Li,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),m.jsx(zt,{children:m.jsxs(_t,{children:[m.jsx(Lt,{asChild:!0,children:m.jsx(me,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0",onClick:H,disabled:!h&&!y,children:m.jsx($i,{size:14})})}),m.jsx($t,{children:m.jsx("p",{children:"Clear results"})})]})})]})}),y&&m.jsx("div",{className:"px-6 py-4 bg-background",children:m.jsx(gm,{variant:"destructive",children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx($h,{className:"h-4 w-4"}),m.jsx(ym,{className:"mb-0",children:"Execution Failed"})]}),m.jsx(xm,{className:"text-xs text-destructive",children:y})]})})}),m.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:h?m.jsxs(m.Fragment,{children:[m.jsx(On,{code:JSON.stringify(h,null,2),language:"json",height:"100%",readOnly:!0}),m.jsx(me,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(h,null,2)),Ec.success("Copied to clipboard")},children:m.jsx(Bh,{className:"h-3.5 w-3.5"})})]}):m.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[m.jsx(_h,{className:"h-12 w-12 mb-3 opacity-40"}),m.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})]})}function wm(n){const e=I.c(7),{itemId:t,onBack:r}=n;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[0]=s):s=e[0];const i=Et(s).connectionId??qt;if(!Pi(i)){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=m.jsx("div",{className:"flex h-full items-center justify-center",children:m.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[m.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),m.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[1]=d):d=e[1],d}let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=m.jsx("div",{className:"flex h-full items-center justify-center",children:m.jsx(tr,{size:32,className:"animate-spin text-muted-foreground"})}),e[2]=a):a=e[2];let c;return e[3]!==i||e[4]!==r||e[5]!==t?(c=m.jsx(O.Suspense,{fallback:a,children:m.jsx(km,{toolName:t,connectionId:i,onBack:r})}),e[3]=i,e[4]=r,e[5]=t,e[6]=c):c=e[6],c}const Kl=n=>{let e;const t=new Set,r=(c,d)=>{const u=typeof c=="function"?c(e):c;if(!Object.is(u,e)){const f=e;e=d??(typeof u!="object"||u===null)?u:Object.assign({},e,u),t.forEach(h=>h(e,f))}},s=()=>e,l={setState:r,getState:s,getInitialState:()=>a,subscribe:c=>(t.add(c),()=>t.delete(c))},a=e=n(r,s,l);return l},Ki=(n=>n?Kl(n):Kl),vm=n=>n;function Wo(n,e=vm){const t=ee.useSyncExternalStore(n.subscribe,ee.useCallback(()=>e(n.getState()),[n,e]),ee.useCallback(()=>e(n.getInitialState()),[n,e]));return ee.useDebugValue(t),t}const Cm=n=>{const e=Ki(n),t=r=>Wo(e,r);return Object.assign(t,e),t},Nm=(n=>Cm);function td(n,e){let t;try{t=n()}catch{return}return{getItem:s=>{var o;const i=a=>a===null?null:JSON.parse(a,void 0),l=(o=t.getItem(s))!=null?o:null;return l instanceof Promise?l.then(i):i(l)},setItem:(s,o)=>t.setItem(s,JSON.stringify(o,void 0)),removeItem:s=>t.removeItem(s)}}const qo=n=>e=>{try{const t=n(e);return t instanceof Promise?t:{then(r){return qo(r)(t)},catch(r){return this}}}catch(t){return{then(r){return this},catch(r){return qo(r)(t)}}}},Em=(n,e)=>(t,r,s)=>{let o={storage:td(()=>localStorage),partialize:g=>g,version:0,merge:(g,x)=>({...x,...g}),...e},i=!1,l=0;const a=new Set,c=new Set;let d=o.storage;if(!d)return n((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),t(...g)},r,s);const u=()=>{const g=o.partialize({...r()});return d.setItem(o.name,{state:g,version:o.version})},f=s.setState;s.setState=(g,x)=>(f(g,x),u());const h=n((...g)=>(t(...g),u()),r,s);s.getInitialState=()=>h;let p;const y=()=>{var g,x;if(!d)return;const b=++l;i=!1,a.forEach(v=>{var k;return v((k=r())!=null?k:h)});const S=((x=o.onRehydrateStorage)==null?void 0:x.call(o,(g=r())!=null?g:h))||void 0;return qo(d.getItem.bind(d))(o.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==o.version){if(o.migrate){const k=o.migrate(v.state,v.version);return k instanceof Promise?k.then(w=>[!0,w]):[!0,k]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,v.state];return[!1,void 0]}).then(v=>{var k;if(b!==l)return;const[w,C]=v;if(p=o.merge(C,(k=r())!=null?k:h),t(p,!0),w)return u()}).then(()=>{b===l&&(S?.(p,void 0),p=r(),i=!0,c.forEach(v=>v(p)))}).catch(v=>{b===l&&S?.(void 0,v)})};return s.persist={setOptions:g=>{o={...o,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d?.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>y(),hasHydrated:()=>i,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(c.add(g),()=>{c.delete(g)})},o.skipHydration||y(),p||h},nd=Em,{useSyncExternalStoreWithSelector:Tm}=bh,Mm=n=>n;function Am(n,e=Mm,t){const r=Tm(n.subscribe,n.getState,n.getInitialState,e,t);return ee.useDebugValue(r),r}const Jl=n=>Symbol.iterator in n,Gl=n=>"entries"in n,Xl=(n,e)=>{const t=n instanceof Map?n:new Map(n.entries()),r=e instanceof Map?e:new Map(e.entries());if(t.size!==r.size)return!1;for(const[s,o]of t)if(!r.has(s)||!Object.is(o,r.get(s)))return!1;return!0},Om=(n,e)=>{const t=n[Symbol.iterator](),r=e[Symbol.iterator]();let s=t.next(),o=r.next();for(;!s.done&&!o.done;){if(!Object.is(s.value,o.value))return!1;s=t.next(),o=r.next()}return!!s.done&&!!o.done};function Im(n,e){return Object.is(n,e)?!0:typeof n!="object"||n===null||typeof e!="object"||e===null||Object.getPrototypeOf(n)!==Object.getPrototypeOf(e)?!1:Jl(n)&&Jl(e)?Gl(n)&&Gl(e)?Xl(n,e):Om(n,e):Xl({entries:()=>Object.entries(n)},{entries:()=>Object.entries(e)})}function Rm(n,e="Output"){if(!n)return`interface ${e} {}`;function t(o){if(!o||typeof o!="object")return"unknown";const i=o.type;if(Array.isArray(i))return i.map(l=>r(l)).join(" | ");switch(i){case"string":return o.enum?o.enum.map(l=>`"${l}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const l=o.items;return l?`${t(l)}[]`:"unknown[]"}case"object":return s(o);default:return o.anyOf?o.anyOf.map(t).join(" | "):o.oneOf?o.oneOf.map(t).join(" | "):o.allOf?o.allOf.map(t).join(" & "):"unknown"}}function r(o){switch(o){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function s(o){const i=o.properties;if(!i)return"Record<string, unknown>";const l=new Set(o.required||[]);return`{
|
|
2
2
|
${Object.entries(i).map(([c,d])=>{const u=l.has(c)?"":"?";return`${d.description?` /** ${d.description} */
|
|
3
3
|
`:""} ${c}${u}: ${t(d)};`}).join(`
|
|
4
4
|
`)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,c as N,j as r}from"./index-
|
|
1
|
+
import{r as n,c as N,j as r}from"./index-Bz1LU39D.js";import{c as C,B as y}from"./input-CtiQUsvV.js";import{c as M,D as z,b as E,a as D}from"./dropdown-menu-DjFWyTtD.js";import{a as S,c as T}from"./Grid01-BEpepbVy.js";import{i as L}from"./Check-Bkw0Gz-n.js";import{a as V,c as B,b as _,T as W}from"./project-context-provider-_aLYBfO9.js";import{V as $}from"./view-mode-toggle-CVcyaB_S.js";const w=({size:s=24,color:e="currentColor",...t})=>n.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},n.createElement("path",{d:"M12 5v14m0 0 7-7m-7 7-7-7"}));w.displayName="ArrowDown";const k=({size:s=24,color:e="currentColor",...t})=>n.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},n.createElement("path",{d:"M21 12H9m12-6H9m12 12H9m-4-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm0-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm0 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}));k.displayName="List";const b=({size:s=24,color:e="currentColor",...t})=>n.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},n.createElement("path",{d:"M5 21v-7m0-4V3m7 18v-9m0-4V3m7 18v-5m0-4V3M2 14h6m1-6h6m1 8h6"}));b.displayName="Sliders01";function P(s){const e=N.c(16),{viewMode:t,onViewModeChange:g,sortKey:v,sortDirection:a,onSort:l,sortOptions:c}=s;let d;e[0]!==c?(d=c===void 0?[]:c,e[0]=c,e[1]=d):d=e[1];const m=d;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=r.jsx(V,{children:r.jsxs(B,{children:[r.jsx(_,{asChild:!0,children:r.jsx(z,{asChild:!0,children:r.jsx(y,{variant:"outline",size:"icon",className:"size-7 border border-input",children:r.jsx(b,{size:16})})})}),r.jsx(W,{children:"Search filters"})]})}),e[2]=h):h=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p={value:"table",icon:r.jsx(k,{})},e[3]=p):p=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=[p,{value:"cards",icon:r.jsx(T,{})}],e[4]=x):x=e[4];let o;e[5]!==g||e[6]!==t?(o=r.jsx("div",{className:"p-2 border-b border-border",children:r.jsx($,{value:t,onValueChange:g,fullWidth:!0,options:x})}),e[5]=g,e[6]=t,e[7]=o):o=e[7];let i;e[8]!==l||e[9]!==a||e[10]!==v||e[11]!==m?(i=m.length>0&&l&&r.jsxs("div",{className:"p-1 flex flex-col gap-0.5",children:[r.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),m.map(f=>{const j=v===f.id;return r.jsx(M,{onClick:()=>l(f.id),className:C("h-8 px-2 py-0 cursor-pointer",j&&"bg-accent"),children:r.jsxs("div",{className:"flex items-center gap-2 w-full",children:[j&&r.jsx(L,{size:16,className:"text-foreground shrink-0"}),!j&&r.jsx("div",{className:"w-4 shrink-0"}),r.jsx("span",{className:"text-sm text-foreground flex-1",children:f.label}),j&&a&&(a==="asc"?r.jsx(S,{size:16,className:"text-foreground shrink-0"}):r.jsx(w,{size:16,className:"text-foreground shrink-0"}))]})},f.id)})]}),e[8]=l,e[9]=a,e[10]=v,e[11]=m,e[12]=i):i=e[12];let u;return e[13]!==o||e[14]!==i?(u=r.jsxs(E,{children:[h,r.jsxs(D,{align:"end",className:"w-[200px] p-0 gap-0",children:[o,i]})]}),e[13]=o,e[14]=i,e[15]=u):u=e[15],u}export{P as C,w as n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as j,j as i}from"./index-
|
|
1
|
+
import{c as j,j as i}from"./index-Bz1LU39D.js";import{C as b}from"./collection-display-button-DroTLKfu.js";function g(h){const e=j.c(17),{title:d,viewMode:r,onViewModeChange:l,sortKey:m,sortDirection:f,onSort:x,sortOptions:n,ctaButton:p}=h;let c;e[0]!==n?(c=n===void 0?[]:n,e[0]=n,e[1]=c):c=e[1];const u=c;let t;e[2]!==d?(t=i.jsx("h1",{className:"text-sm font-medium text-foreground",children:d}),e[2]=d,e[3]=t):t=e[3];let s;e[4]!==x||e[5]!==l||e[6]!==f||e[7]!==m||e[8]!==u||e[9]!==r?(s=r&&l&&i.jsx(b,{viewMode:r,onViewModeChange:l,sortKey:m,sortDirection:f,onSort:x,sortOptions:u}),e[4]=x,e[5]=l,e[6]=f,e[7]=m,e[8]=u,e[9]=r,e[10]=s):s=e[10];let o;e[11]!==p||e[12]!==s?(o=i.jsxs("div",{className:"flex items-center gap-2",children:[s,p]}),e[11]=p,e[12]=s,e[13]=o):o=e[13];let a;return e[14]!==t||e[15]!==o?(a=i.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:i.jsxs("div",{className:"flex items-center justify-between gap-3 h-12 px-4",children:[t,o]})}),e[14]=t,e[15]=o,e[16]=a):a=e[16],a}export{g as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,j as c}from"./index-
|
|
1
|
+
import{c as s,j as c}from"./index-Bz1LU39D.js";function r(t){const e=s.c(2),{children:l}=t;let o;return e[0]!==l?(o=c.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden",children:l}),e[0]=l,e[1]=o):o=e[1],o}export{r as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,j as a}from"./index-
|
|
1
|
+
import{c as g,j as a}from"./index-Bz1LU39D.js";import{i as b}from"./Loading01-CdaWSExX.js";import{i as j}from"./SearchMd-YxKkBPG0.js";import{c as N,I as v}from"./input-CtiQUsvV.js";function z(p){const e=g.c(17),{value:n,onChange:c,placeholder:h,onKeyDown:m,className:f,isSearching:d}=p,x=h===void 0?"Search...":h;let s;e[0]!==f?(s=N("shrink-0 w-full border-b border-border h-12",f),e[0]=f,e[1]=s):s=e[1];let t;e[2]!==d?(t=d?a.jsx(b,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):a.jsx(j,{size:16,className:"text-muted-foreground shrink-0"}),e[2]=d,e[3]=t):t=e[3];let r;e[4]!==c?(r=u=>c(u.target.value),e[4]=c,e[5]=r):r=e[5];let l;e[6]!==m||e[7]!==x||e[8]!==r||e[9]!==n?(l=a.jsx(v,{value:n,onChange:r,onKeyDown:m,placeholder:x,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"}),e[6]=m,e[7]=x,e[8]=r,e[9]=n,e[10]=l):l=e[10];let o;e[11]!==t||e[12]!==l?(o=a.jsxs("label",{className:"flex items-center gap-2.5 h-12 px-4 cursor-text",children:[t,l]}),e[11]=t,e[12]=l,e[13]=o):o=e[13];let i;return e[14]!==s||e[15]!==o?(i=a.jsx("div",{className:s,children:o}),e[14]=s,e[15]=o,e[16]=i):i=e[16],i}export{z as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as ne,j as t,K as it,f as nt,k as lt,a as rt,r as at,t as ct}from"./index-DMNk-OUX.js";import{g as Ke}from"./generate-id-Dyweu44Y.js";import{I as Le,c as Re,a as dt,b as mt,E as ft}from"./empty-state-DzS1Zp7m.js";import{C as Ve}from"./collection-display-button-BGIcja12.js";import{C as ut}from"./collection-search-CYZk6T6Z.js";import{C as pt}from"./card-B3fsloDi.js";import{b as qe,D as Ge,a as We,c as F}from"./dropdown-menu-CnL8UM0z.js";import{B as Oe}from"./input-68J17rBp.js";import{a as He}from"./Copy01-Dadp_RDG.js";import{i as Je}from"./DotsVertical-BHUUUCDx.js";import{i as Qe}from"./Edit01-CxRkZTQ1.js";import{s as Ye,u as ht}from"./use-list-state-CPUcOhR_.js";import{s as Xe}from"./Trash01-CjDzx3jP.js";import{C as xt}from"./collection-table-wrapper-D2niE2Ci.js";import{E as Me}from"./empty-state-BmkZOMzL.js";import{n as Ue}from"./Inbox01-CgwXLK3n.js";import{A as ze}from"./avatar-D1o5pnzU.js";import{b as gt,c as jt}from"./use-connection-DoWszS3j.js";import{P as Ct}from"./pin-to-sidebar-button-B1xHHS9n.js";import{B as vt}from"./constants-Cy709IUA.js";import{A as bt,g as yt,c as Nt,b as wt,d as St,e as _t,a as Dt,f as At}from"./alert-dialog-_Gzpv9vf.js";import{s as Tt}from"./Plus-DaP4KLuJ.js";import{V as $t}from"./layout-Olb4shdE.js";function It(n,e){const s=n.properties||{};for(const i in s){const l=s[i];if(l&&l.type==="string"&&(l.format==="url"||l.format==="uri")&&e&&typeof e=="object"&&i in e&&e[i])return e[i]}const d=["image","img","avatar","icon","logo","thumbnail","cover"];for(const i of d)if(e&&typeof e=="object"&&i in e&&typeof e[i]=="string")return e[i]}function Pt(n){const e=ne.c(25),{item:s,schema:d,actions:i}=n;let l;e[0]!==s||e[1]!==d?(l=It(d,s),e[0]=s,e[1]=d,e[2]=l):l=e[2];const a=l,c=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let f;e[3]!==i?(f=i&&Object.keys(i).length>0,e[3]=i,e[4]=f):f=e[4];const o=f;let u;e[5]!==a||e[6]!==s.title?(u=t.jsx(Le,{icon:a,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=a,e[6]=s.title,e[7]=u):u=e[7];let v;e[8]!==s.title?(v=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=v):v=e[9];const h=c||"No description";let m;e[10]!==h?(m=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:h}),e[10]=h,e[11]=m):m=e[11];let x;e[12]!==v||e[13]!==m?(x=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[v,m]}),e[12]=v,e[13]=m,e[14]=x):x=e[14];let y;e[15]!==u||e[16]!==x?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[u,x]}),e[15]=u,e[16]=x,e[17]=y):y=e[17];let j;e[18]!==i||e[19]!==o||e[20]!==s?(j=o&&t.jsx("div",{className:"absolute top-6 right-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:kt,onMouseDown:Ot,children:t.jsxs(qe,{children:[t.jsx(Ge,{asChild:!0,children:t.jsx(Oe,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:zt,children:t.jsx(Je,{size:20})})}),t.jsxs(We,{align:"end",onClick:Et,children:[i.open&&t.jsxs(F,{onClick:r=>{r.stopPropagation(),i.open?.(s)},children:[t.jsx(Ye,{size:16}),"Open"]}),i.edit&&t.jsxs(F,{onClick:r=>{r.stopPropagation(),i.edit?.(s)},children:[t.jsx(Qe,{size:16}),"Edit"]}),i.duplicate&&t.jsxs(F,{onClick:r=>{r.stopPropagation(),i.duplicate?.(s)},children:[t.jsx(He,{size:16}),"Duplicate"]}),i.delete&&t.jsxs(F,{variant:"destructive",onClick:r=>{r.stopPropagation(),i.delete?.(s)},children:[t.jsx(Xe,{size:16}),"Delete"]})]})]})}),e[18]=i,e[19]=o,e[20]=s,e[21]=j):j=e[21];let S;return e[22]!==y||e[23]!==j?(S=t.jsxs(pt,{className:"cursor-pointer transition-colors h-full flex flex-col group relative",children:[y,j]}),e[22]=y,e[23]=j,e[24]=S):S=e[24],S}function Et(n){return n.stopPropagation()}function zt(n){return n.stopPropagation()}function Ot(n){return n.stopPropagation()}function kt(n){return n.stopPropagation()}function Ft(n){const e=ne.c(9);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=Re(),e[0]=s):s=e[0];const d=s;let i;e[1]!==n?(i=it.user(n),e[1]=n,e[2]=i):i=e[2];let l;e[3]!==n?(l=async()=>(await d("USER_GET",{id:n})).user,e[3]=n,e[4]=l):l=e[4];const a=!!n;let c;return e[5]!==i||e[6]!==l||e[7]!==a?(c={queryKey:i,queryFn:l,staleTime:3e5,retry:1,enabled:a},e[5]=i,e[6]=l,e[7]=a,e[8]=c):c=e[8],gt(c)}function Kt(n){const e=ne.c(33),{id:s,size:d,showEmail:i,className:l}=n,a=d===void 0?"xs":d,c=i===void 0?!1:i,{data:f,isLoading:o,isError:u}=Ft(s);if(o){const r=`flex items-center gap-2 ${l||""}`;let g;e[0]!==a?(g=t.jsx(ze.Skeleton,{shape:"circle",size:a}),e[0]=a,e[1]=g):g=e[1];let C;e[2]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"h-3 w-24 bg-muted animate-pulse rounded"}),e[2]=C):C=e[2];let p;e[3]!==c?(p=c&&t.jsx("div",{className:"h-2 w-32 bg-muted animate-pulse rounded"}),e[3]=c,e[4]=p):p=e[4];let _;e[5]!==p?(_=t.jsxs("div",{className:"flex flex-col gap-1",children:[C,p]}),e[5]=p,e[6]=_):_=e[6];let b;return e[7]!==r||e[8]!==g||e[9]!==_?(b=t.jsxs("div",{className:r,children:[g,_]}),e[7]=r,e[8]=g,e[9]=_,e[10]=b):b=e[10],b}if(u||!f){const r=`flex items-center gap-2 ${l||""}`;let g;e[11]!==a?(g=t.jsx(ze,{shape:"circle",size:a,fallback:"?",muted:!0}),e[11]=a,e[12]=g):g=e[12];let C;e[13]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"flex flex-col",children:t.jsx("div",{className:"text-sm text-muted-foreground",children:"Unknown User"})}),e[13]=C):C=e[13];let p;return e[14]!==r||e[15]!==g?(p=t.jsxs("div",{className:r,children:[g,C]}),e[14]=r,e[15]=g,e[16]=p):p=e[16],p}const v=`flex items-center gap-2 ${l||""}`,h=f.image??void 0;let m;e[17]!==a||e[18]!==h||e[19]!==f.name?(m=t.jsx(ze,{shape:"circle",size:a,url:h,fallback:f.name}),e[17]=a,e[18]=h,e[19]=f.name,e[20]=m):m=e[20];let x;e[21]!==f.name?(x=t.jsx("div",{className:"text-sm font-medium",children:f.name}),e[21]=f.name,e[22]=x):x=e[22];let y;e[23]!==c||e[24]!==f.email?(y=c&&t.jsx("div",{className:"text-xs text-muted-foreground",children:f.email}),e[23]=c,e[24]=f.email,e[25]=y):y=e[25];let j;e[26]!==x||e[27]!==y?(j=t.jsxs("div",{className:"flex flex-col",children:[x,y]}),e[26]=x,e[27]=y,e[28]=j):j=e[28];let S;return e[29]!==v||e[30]!==m||e[31]!==j?(S=t.jsxs("div",{className:v,children:[m,j]}),e[29]=v,e[30]=m,e[31]=j,e[32]=S):S=e[32],S}const Mt=["icon","avatar","logo"],Be=["created_at","created_by","id"];function Ut(n){return Object.keys(n).find(e=>Mt.includes(e.toLowerCase()))}function Ze(n,e){return Object.keys(n.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Bt(n){const e=ne.c(32),{data:s,schema:d,viewMode:i,onViewModeChange:l,search:a,sortKey:c,sortDirection:f,onSort:o,actions:u,onItemClick:v,headerActions:h,emptyState:m,readOnly:x,columns:y,hideToolbar:j,sortableFields:S}=n,r=l===void 0?Gt:l,g=f===void 0?"asc":f,C=o===void 0?qt:o;let p;e[0]!==u?(p=u===void 0?{}:u,e[0]=u,e[1]=p):p=e[1];const _=p,b=v===void 0?Vt:v,I=h===void 0?null:h,T=m===void 0?null:m,E=x===void 0?!1:x,N=y===void 0?void 0:y,P=j===void 0?!1:j,D=S===void 0?void 0:S;let z;e[2]!==N||e[3]!==d||e[4]!==D?(z=N?N.filter(Rt).filter(k=>!D||D.includes(k.id)).map(Lt):Ze(d,D),e[2]=N,e[3]=d,e[4]=D,e[5]=z):z=e[5];const K=z;let $;e[6]!==I||e[7]!==P||e[8]!==C||e[9]!==r||e[10]!==g||e[11]!==c||e[12]!==K||e[13]!==i?($=!P&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:I}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Ve,{viewMode:i,onViewModeChange:r,sortKey:c,sortDirection:g,onSort:C,sortOptions:K})})]})}),e[6]=I,e[7]=P,e[8]=C,e[9]=r,e[10]=g,e[11]=c,e[12]=K,e[13]=i,e[14]=$):$=e[14];let A;e[15]!==_||e[16]!==N||e[17]!==s||e[18]!==T||e[19]!==b||e[20]!==C||e[21]!==E||e[22]!==d||e[23]!==a||e[24]!==g||e[25]!==c||e[26]!==D||e[27]!==i?(A=i==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:T||t.jsx(Me,{icon:t.jsx(Ue,{size:36,className:"text-muted-foreground"}),title:"No items found",description:a?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:s.map(k=>t.jsx("div",{onClick:()=>b?.(k),className:"cursor-pointer h-full",children:t.jsx(Pt,{item:k,schema:d,readOnly:E,actions:_})},k.id))})}):t.jsx(xt,{columns:Jt(N,d,D,_),data:s,sortKey:c,sortDirection:g,onSort:C,onRowClick:b,emptyState:T||t.jsx(Me,{icon:t.jsx(Ue,{size:36,className:"text-muted-foreground"}),title:"No items found",description:a?"Try adjusting your search":"No items to display"})}),e[15]=_,e[16]=N,e[17]=s,e[18]=T,e[19]=b,e[20]=C,e[21]=E,e[22]=d,e[23]=a,e[24]=g,e[25]=c,e[26]=D,e[27]=i,e[28]=A):A=e[28];let O;return e[29]!==$||e[30]!==A?(O=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[$,A]}),e[29]=$,e[30]=A,e[31]=O):O=e[31],O}function Lt(n){return{id:n.id,label:typeof n.header=="string"?n.header:n.id}}function Rt(n){return n.sortable!==!1}function Vt(){}function qt(){}function Gt(){}function Wt(n){return{id:"actions",header:"",render:e=>t.jsxs(qe,{children:[t.jsx(Ge,{asChild:!0,children:t.jsx(Oe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(Je,{size:20})})}),t.jsxs(We,{align:"end",onClick:s=>s.stopPropagation(),children:[n.open&&t.jsxs(F,{onClick:s=>{s.stopPropagation(),n.open?.(e)},children:[t.jsx(Ye,{size:16}),"Open"]}),n.edit&&t.jsxs(F,{onClick:s=>{s.stopPropagation(),n.edit?.(e)},children:[t.jsx(Qe,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(F,{onClick:s=>{s.stopPropagation(),n.duplicate?.(e)},children:[t.jsx(He,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(F,{variant:"destructive",onClick:s=>{s.stopPropagation(),n.delete?.(e)},children:[t.jsx(Xe,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function et(n){const e=n.type;return Array.isArray(e)?e.every(s=>et({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function Ht(n,e){const s=n.properties||{},d=Object.keys(s).filter(o=>{const u=s[o];return u&&et(u)}),i=Ut(s),l=[],a=new Set;i&&d.includes(i)&&(l.push(i),a.add(i));const c=["title","description","updated_at","updated_by"];for(const o of c)d.includes(o)&&!a.has(o)&&(l.push(o),a.add(o));const f=d.filter(o=>!a.has(o)&&!Be.includes(o)).sort((o,u)=>o.localeCompare(u));for(const o of f)l.push(o),a.add(o);for(const o of Be)d.includes(o)&&!a.has(o)&&(l.push(o),a.add(o));return l.map(o=>{const u=s[o],v=e?e.includes(o):!["id"].includes(o);return o===i?{id:o,header:"",render:h=>{const m=h[o];return t.jsx(Le,{icon:m,name:h.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:o==="description"?{id:o,header:"Description",render:h=>{const m=h[o];return m==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(m)})},sortable:v,cellClassName:"max-w-[50ch]"}:o==="created_by"||o==="updated_by"?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:h=>{const m=h[o];return m?t.jsx(Kt,{id:String(m),size:"xs"}):"—"},sortable:v,cellClassName:"max-w-[250px]"}:u?.format==="date-time"||o.endsWith("_at")?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:h=>{const m=h[o];return m?t.jsx("span",{className:"block truncate max-w-full",children:new Date(m).toLocaleDateString()}):"—"},sortable:v,cellClassName:"max-w-[200px]"}:{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:h=>{const m=h[o];return m==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(m)})},sortable:v,cellClassName:"max-w-[200px]"}})}function Jt(n,e,s,d){const i=n||Ht(e,s);return i.some(c=>c.id==="actions")?i:Object.keys(d).length>0?[...i,Wt(d)]:i}function vs(n){const e=ne.c(117),{connectionId:s,org:d,activeCollection:i}=n,l=i.name,a=i.schema??vt,c=i.hasCreateTool,f=i.hasUpdateTool,o=i.hasDeleteTool,u=nt(),h=lt().location.href,{data:m}=rt.useSession(),x=m?.user?.id||"unknown",y=jt(s);let j;e[0]!==s?(j=Re(s),e[0]=s,e[1]=j):j=e[1];const S=j,r=dt(s,l,S),g=`${s}-${l}`;let C;e[2]!==d||e[3]!==g?(C={namespace:d,resource:g,defaultSortKey:"updated_at"},e[2]=d,e[3]=g,e[4]=C):C=e[4];const{search:p,searchTerm:_,setSearch:b,viewMode:I,setViewMode:T,sortKey:E,sortDirection:N,handleSort:P}=ht(C);let D;e[5]!==_||e[6]!==N||e[7]!==E?(D={searchTerm:_,sortKey:E,sortDirection:N},e[5]=_,e[6]=N,e[7]=E,e[8]=D):D=e[8];const z=mt(s,l,S,D),K=!c&&!f&&!o;let $;e[9]!==l||e[10]!==s||e[11]!==u||e[12]!==d?($=w=>{u({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:d,connectionId:s,collectionName:l,itemId:w.id}})},e[9]=l,e[10]=s,e[11]=u,e[12]=d,e[13]=$):$=e[13];const A=$;let O;e[14]!==r.create||e[15]!==x?(O=async w=>{const he=new Date().toISOString();await r.create.mutateAsync({...w,id:Ke("conn"),title:`${w.title} (Copy)`,created_at:he,updated_at:he,created_by:x,updated_by:x})},e[14]=r.create,e[15]=x,e[16]=O):O=e[16];const k=O,[M,xe]=at.useState(null);let le;e[17]===Symbol.for("react.memo_cache_sentinel")?(le=w=>{xe(w)},e[17]=le):le=e[17];const tt=le;let U;e[18]!==A||e[19]!==f?(U=f&&{edit:A},e[18]=A,e[19]=f,e[20]=U):U=e[20];let B;e[21]!==k||e[22]!==c?(B=c&&{duplicate:k},e[21]=k,e[22]=c,e[23]=B):B=e[23];let L;e[24]!==o?(L=o&&{delete:tt},e[24]=o,e[25]=L):L=e[25];let re;e[26]!==L||e[27]!==U||e[28]!==B?(re={...U,...B,...L},e[26]=L,e[27]=U,e[28]=B,e[29]=re):re=e[29];const ge=re;let ae;e[30]!==r.delete||e[31]!==M?(ae=async()=>{M&&(await r.delete.mutateAsync(M.id),xe(null))},e[30]=r.delete,e[31]=M,e[32]=ae):ae=e[32];const je=ae;let ce;e[33]!==r.create||e[34]!==l||e[35]!==s||e[36]!==c||e[37]!==u||e[38]!==d||e[39]!==x?(ce=async()=>{if(!c){ct.error("Create operation is not available for this collection");return}const w=new Date().toISOString(),he={id:Ke("conn"),title:"New Item",description:"A brief description of the item",created_at:w,updated_at:w,created_by:x,updated_by:x};try{const Ee=await r.create.mutateAsync(he);u({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:d,connectionId:s,collectionName:l,itemId:Ee.id}})}catch(Ee){console.error("Failed to create item:",Ee)}},e[33]=r.create,e[34]=l,e[35]=s,e[36]=c,e[37]=u,e[38]=d,e[39]=x,e[40]=ce):ce=e[40];const Ce=ce;let de;e[41]!==a?(de=Ze(a),e[41]=a,e[42]=de):de=e[42];const ve=de,ke=(z?.length??0)>0,st=c&&ke,ot=c&&!ke&&!p;let me;e[43]!==r.create||e[44]!==Ce||e[45]!==c?(me=c?t.jsxs(Oe,{onClick:Ce,size:"sm",disabled:r.create.isPending,className:"h-7",children:[t.jsx(Tt,{className:"mr-2 h-4 w-4"}),r.create.isPending?"Creating...":"Create"]}):null,e[43]=r.create,e[44]=Ce,e[45]=c,e[46]=me):me=e[46];const Fe=me,be=E;let R;e[47]!==P||e[48]!==T||e[49]!==N||e[50]!==ve||e[51]!==be||e[52]!==I?(R=t.jsx(Ve,{viewMode:I,onViewModeChange:T,sortKey:be,sortDirection:N,onSort:P,sortOptions:ve}),e[47]=P,e[48]=T,e[49]=N,e[50]=ve,e[51]=be,e[52]=I,e[53]=R):R=e[53];const ye=`${l}s`,Ne=y?.icon??"grid_view";let V;e[54]!==ye||e[55]!==Ne||e[56]!==h?(V=t.jsx(Ct,{title:ye,url:h,icon:Ne}),e[54]=ye,e[55]=Ne,e[56]=h,e[57]=V):V=e[57];const we=st&&Fe;let q;e[58]!==R||e[59]!==V||e[60]!==we?(q=t.jsxs($t,{children:[R,V,we]}),e[58]=R,e[59]=V,e[60]=we,e[61]=q):q=e[61];const Se=`Search ${l}...`;let G;e[62]!==b?(G=w=>{w.key==="Escape"&&(b(""),w.target.blur())},e[62]=b,e[63]=G):G=e[63];let W;e[64]!==p||e[65]!==b||e[66]!==Se||e[67]!==G?(W=t.jsx(ut,{value:p,onChange:b,placeholder:Se,onKeyDown:G}),e[64]=p,e[65]=b,e[66]=Se,e[67]=G,e[68]=W):W=e[68];let H;e[69]!==z?(H=z??[],e[69]=z,e[70]=H):H=e[70];const _e=E;let J;e[71]!==A?(J=w=>A(w),e[71]=A,e[72]=J):J=e[72];const De="No items found",Ae=p?"Try adjusting your search terms":"This collection doesn't have any items yet.",Te=ot?Fe:void 0;let Q;e[73]!==De||e[74]!==Ae||e[75]!==Te?(Q=t.jsx(ft,{image:null,title:De,description:Ae,actions:Te}),e[73]=De,e[74]=Ae,e[75]=Te,e[76]=Q):Q=e[76];let Y;e[77]!==P||e[78]!==K||e[79]!==ge||e[80]!==a||e[81]!==p||e[82]!==b||e[83]!==T||e[84]!==N||e[85]!==H||e[86]!==_e||e[87]!==J||e[88]!==Q||e[89]!==I?(Y=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Bt,{hideToolbar:!0,data:H,schema:a,viewMode:I,onViewModeChange:T,search:p,onSearchChange:b,sortKey:_e,sortDirection:N,onSort:P,actions:ge,onItemClick:J,readOnly:K,emptyState:Q})}),e[77]=P,e[78]=K,e[79]=ge,e[80]=a,e[81]=p,e[82]=b,e[83]=T,e[84]=N,e[85]=H,e[86]=_e,e[87]=J,e[88]=Q,e[89]=I,e[90]=Y):Y=e[90];let X;e[91]!==W||e[92]!==Y?(X=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[W,Y]}),e[91]=W,e[92]=Y,e[93]=X):X=e[93];const $e=!!M;let fe;e[94]===Symbol.for("react.memo_cache_sentinel")?(fe=w=>{w||xe(null)},e[94]=fe):fe=e[94];let ue;e[95]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx(Nt,{children:"Delete item?"}),e[95]=ue):ue=e[95];const Ie=M?.title;let Z;e[96]!==Ie?(Z=t.jsxs(wt,{children:[ue,t.jsxs(St,{children:['Are you sure you want to delete "',Ie,'"? This action cannot be undone.']})]}),e[96]=Ie,e[97]=Z):Z=e[97];let ee;e[98]!==r.delete.isPending?(ee=t.jsx(bt,{disabled:r.delete.isPending,children:"Cancel"}),e[98]=r.delete.isPending,e[99]=ee):ee=e[99];const Pe=r.delete.isPending?"Deleting...":"Delete";let te;e[100]!==r.delete.isPending||e[101]!==je||e[102]!==Pe?(te=t.jsx(yt,{onClick:je,disabled:r.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Pe}),e[100]=r.delete.isPending,e[101]=je,e[102]=Pe,e[103]=te):te=e[103];let se;e[104]!==ee||e[105]!==te?(se=t.jsxs(_t,{children:[ee,te]}),e[104]=ee,e[105]=te,e[106]=se):se=e[106];let oe;e[107]!==Z||e[108]!==se?(oe=t.jsxs(Dt,{children:[Z,se]}),e[107]=Z,e[108]=se,e[109]=oe):oe=e[109];let ie;e[110]!==$e||e[111]!==oe?(ie=t.jsx(At,{open:$e,onOpenChange:fe,children:oe}),e[110]=$e,e[111]=oe,e[112]=ie):ie=e[112];let pe;return e[113]!==q||e[114]!==X||e[115]!==ie?(pe=t.jsxs(t.Fragment,{children:[q,X,ie]}),e[113]=q,e[114]=X,e[115]=ie,e[116]=pe):pe=e[116],pe}export{vs as C};
|
|
1
|
+
import{c as ne,j as t,K as it,f as nt,k as lt,a as rt,r as at,t as ct}from"./index-Bz1LU39D.js";import{g as Ke}from"./generate-id-Dyweu44Y.js";import{I as Le,c as Re,a as dt,b as mt,E as ft}from"./empty-state-DgOO5bI1.js";import{C as Ve}from"./collection-display-button-DroTLKfu.js";import{C as ut}from"./collection-search-DIEJ7x7R.js";import{C as pt}from"./card-XgDm8_H9.js";import{b as qe,D as Ge,a as We,c as F}from"./dropdown-menu-DjFWyTtD.js";import{B as Oe}from"./input-CtiQUsvV.js";import{a as He}from"./Copy01-BctGx-5E.js";import{i as Je}from"./DotsVertical-CzCtj25W.js";import{i as Qe}from"./Edit01-BD5iJRQz.js";import{s as Ye,u as ht}from"./use-list-state-CAv4RNZg.js";import{s as Xe}from"./Trash01-DopdNXEu.js";import{C as xt}from"./collection-table-wrapper-x8zydyA0.js";import{E as Me}from"./empty-state-DSGxvcRL.js";import{n as Ue}from"./Inbox01-DkMyh-FB.js";import{A as ze}from"./avatar-KT16fAYd.js";import{b as gt,c as jt}from"./use-connection-BXdeHsm0.js";import{P as Ct}from"./pin-to-sidebar-button-C-akIZzz.js";import{B as vt}from"./constants-8DEiLmV-.js";import{A as bt,g as yt,c as Nt,b as wt,d as St,e as _t,a as Dt,f as At}from"./alert-dialog-B2ogXLEp.js";import{s as Tt}from"./Plus-CovnOzP9.js";import{V as $t}from"./layout-C8G6tSLB.js";function It(n,e){const s=n.properties||{};for(const i in s){const l=s[i];if(l&&l.type==="string"&&(l.format==="url"||l.format==="uri")&&e&&typeof e=="object"&&i in e&&e[i])return e[i]}const d=["image","img","avatar","icon","logo","thumbnail","cover"];for(const i of d)if(e&&typeof e=="object"&&i in e&&typeof e[i]=="string")return e[i]}function Pt(n){const e=ne.c(25),{item:s,schema:d,actions:i}=n;let l;e[0]!==s||e[1]!==d?(l=It(d,s),e[0]=s,e[1]=d,e[2]=l):l=e[2];const a=l,c=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let f;e[3]!==i?(f=i&&Object.keys(i).length>0,e[3]=i,e[4]=f):f=e[4];const o=f;let u;e[5]!==a||e[6]!==s.title?(u=t.jsx(Le,{icon:a,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=a,e[6]=s.title,e[7]=u):u=e[7];let v;e[8]!==s.title?(v=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=v):v=e[9];const h=c||"No description";let m;e[10]!==h?(m=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:h}),e[10]=h,e[11]=m):m=e[11];let x;e[12]!==v||e[13]!==m?(x=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[v,m]}),e[12]=v,e[13]=m,e[14]=x):x=e[14];let y;e[15]!==u||e[16]!==x?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[u,x]}),e[15]=u,e[16]=x,e[17]=y):y=e[17];let j;e[18]!==i||e[19]!==o||e[20]!==s?(j=o&&t.jsx("div",{className:"absolute top-6 right-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:kt,onMouseDown:Ot,children:t.jsxs(qe,{children:[t.jsx(Ge,{asChild:!0,children:t.jsx(Oe,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:zt,children:t.jsx(Je,{size:20})})}),t.jsxs(We,{align:"end",onClick:Et,children:[i.open&&t.jsxs(F,{onClick:r=>{r.stopPropagation(),i.open?.(s)},children:[t.jsx(Ye,{size:16}),"Open"]}),i.edit&&t.jsxs(F,{onClick:r=>{r.stopPropagation(),i.edit?.(s)},children:[t.jsx(Qe,{size:16}),"Edit"]}),i.duplicate&&t.jsxs(F,{onClick:r=>{r.stopPropagation(),i.duplicate?.(s)},children:[t.jsx(He,{size:16}),"Duplicate"]}),i.delete&&t.jsxs(F,{variant:"destructive",onClick:r=>{r.stopPropagation(),i.delete?.(s)},children:[t.jsx(Xe,{size:16}),"Delete"]})]})]})}),e[18]=i,e[19]=o,e[20]=s,e[21]=j):j=e[21];let S;return e[22]!==y||e[23]!==j?(S=t.jsxs(pt,{className:"cursor-pointer transition-colors h-full flex flex-col group relative",children:[y,j]}),e[22]=y,e[23]=j,e[24]=S):S=e[24],S}function Et(n){return n.stopPropagation()}function zt(n){return n.stopPropagation()}function Ot(n){return n.stopPropagation()}function kt(n){return n.stopPropagation()}function Ft(n){const e=ne.c(9);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=Re(),e[0]=s):s=e[0];const d=s;let i;e[1]!==n?(i=it.user(n),e[1]=n,e[2]=i):i=e[2];let l;e[3]!==n?(l=async()=>(await d("USER_GET",{id:n})).user,e[3]=n,e[4]=l):l=e[4];const a=!!n;let c;return e[5]!==i||e[6]!==l||e[7]!==a?(c={queryKey:i,queryFn:l,staleTime:3e5,retry:1,enabled:a},e[5]=i,e[6]=l,e[7]=a,e[8]=c):c=e[8],gt(c)}function Kt(n){const e=ne.c(33),{id:s,size:d,showEmail:i,className:l}=n,a=d===void 0?"xs":d,c=i===void 0?!1:i,{data:f,isLoading:o,isError:u}=Ft(s);if(o){const r=`flex items-center gap-2 ${l||""}`;let g;e[0]!==a?(g=t.jsx(ze.Skeleton,{shape:"circle",size:a}),e[0]=a,e[1]=g):g=e[1];let C;e[2]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"h-3 w-24 bg-muted animate-pulse rounded"}),e[2]=C):C=e[2];let p;e[3]!==c?(p=c&&t.jsx("div",{className:"h-2 w-32 bg-muted animate-pulse rounded"}),e[3]=c,e[4]=p):p=e[4];let _;e[5]!==p?(_=t.jsxs("div",{className:"flex flex-col gap-1",children:[C,p]}),e[5]=p,e[6]=_):_=e[6];let b;return e[7]!==r||e[8]!==g||e[9]!==_?(b=t.jsxs("div",{className:r,children:[g,_]}),e[7]=r,e[8]=g,e[9]=_,e[10]=b):b=e[10],b}if(u||!f){const r=`flex items-center gap-2 ${l||""}`;let g;e[11]!==a?(g=t.jsx(ze,{shape:"circle",size:a,fallback:"?",muted:!0}),e[11]=a,e[12]=g):g=e[12];let C;e[13]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"flex flex-col",children:t.jsx("div",{className:"text-sm text-muted-foreground",children:"Unknown User"})}),e[13]=C):C=e[13];let p;return e[14]!==r||e[15]!==g?(p=t.jsxs("div",{className:r,children:[g,C]}),e[14]=r,e[15]=g,e[16]=p):p=e[16],p}const v=`flex items-center gap-2 ${l||""}`,h=f.image??void 0;let m;e[17]!==a||e[18]!==h||e[19]!==f.name?(m=t.jsx(ze,{shape:"circle",size:a,url:h,fallback:f.name}),e[17]=a,e[18]=h,e[19]=f.name,e[20]=m):m=e[20];let x;e[21]!==f.name?(x=t.jsx("div",{className:"text-sm font-medium",children:f.name}),e[21]=f.name,e[22]=x):x=e[22];let y;e[23]!==c||e[24]!==f.email?(y=c&&t.jsx("div",{className:"text-xs text-muted-foreground",children:f.email}),e[23]=c,e[24]=f.email,e[25]=y):y=e[25];let j;e[26]!==x||e[27]!==y?(j=t.jsxs("div",{className:"flex flex-col",children:[x,y]}),e[26]=x,e[27]=y,e[28]=j):j=e[28];let S;return e[29]!==v||e[30]!==m||e[31]!==j?(S=t.jsxs("div",{className:v,children:[m,j]}),e[29]=v,e[30]=m,e[31]=j,e[32]=S):S=e[32],S}const Mt=["icon","avatar","logo"],Be=["created_at","created_by","id"];function Ut(n){return Object.keys(n).find(e=>Mt.includes(e.toLowerCase()))}function Ze(n,e){return Object.keys(n.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Bt(n){const e=ne.c(32),{data:s,schema:d,viewMode:i,onViewModeChange:l,search:a,sortKey:c,sortDirection:f,onSort:o,actions:u,onItemClick:v,headerActions:h,emptyState:m,readOnly:x,columns:y,hideToolbar:j,sortableFields:S}=n,r=l===void 0?Gt:l,g=f===void 0?"asc":f,C=o===void 0?qt:o;let p;e[0]!==u?(p=u===void 0?{}:u,e[0]=u,e[1]=p):p=e[1];const _=p,b=v===void 0?Vt:v,I=h===void 0?null:h,T=m===void 0?null:m,E=x===void 0?!1:x,N=y===void 0?void 0:y,P=j===void 0?!1:j,D=S===void 0?void 0:S;let z;e[2]!==N||e[3]!==d||e[4]!==D?(z=N?N.filter(Rt).filter(k=>!D||D.includes(k.id)).map(Lt):Ze(d,D),e[2]=N,e[3]=d,e[4]=D,e[5]=z):z=e[5];const K=z;let $;e[6]!==I||e[7]!==P||e[8]!==C||e[9]!==r||e[10]!==g||e[11]!==c||e[12]!==K||e[13]!==i?($=!P&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:I}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Ve,{viewMode:i,onViewModeChange:r,sortKey:c,sortDirection:g,onSort:C,sortOptions:K})})]})}),e[6]=I,e[7]=P,e[8]=C,e[9]=r,e[10]=g,e[11]=c,e[12]=K,e[13]=i,e[14]=$):$=e[14];let A;e[15]!==_||e[16]!==N||e[17]!==s||e[18]!==T||e[19]!==b||e[20]!==C||e[21]!==E||e[22]!==d||e[23]!==a||e[24]!==g||e[25]!==c||e[26]!==D||e[27]!==i?(A=i==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:T||t.jsx(Me,{icon:t.jsx(Ue,{size:36,className:"text-muted-foreground"}),title:"No items found",description:a?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:s.map(k=>t.jsx("div",{onClick:()=>b?.(k),className:"cursor-pointer h-full",children:t.jsx(Pt,{item:k,schema:d,readOnly:E,actions:_})},k.id))})}):t.jsx(xt,{columns:Jt(N,d,D,_),data:s,sortKey:c,sortDirection:g,onSort:C,onRowClick:b,emptyState:T||t.jsx(Me,{icon:t.jsx(Ue,{size:36,className:"text-muted-foreground"}),title:"No items found",description:a?"Try adjusting your search":"No items to display"})}),e[15]=_,e[16]=N,e[17]=s,e[18]=T,e[19]=b,e[20]=C,e[21]=E,e[22]=d,e[23]=a,e[24]=g,e[25]=c,e[26]=D,e[27]=i,e[28]=A):A=e[28];let O;return e[29]!==$||e[30]!==A?(O=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[$,A]}),e[29]=$,e[30]=A,e[31]=O):O=e[31],O}function Lt(n){return{id:n.id,label:typeof n.header=="string"?n.header:n.id}}function Rt(n){return n.sortable!==!1}function Vt(){}function qt(){}function Gt(){}function Wt(n){return{id:"actions",header:"",render:e=>t.jsxs(qe,{children:[t.jsx(Ge,{asChild:!0,children:t.jsx(Oe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(Je,{size:20})})}),t.jsxs(We,{align:"end",onClick:s=>s.stopPropagation(),children:[n.open&&t.jsxs(F,{onClick:s=>{s.stopPropagation(),n.open?.(e)},children:[t.jsx(Ye,{size:16}),"Open"]}),n.edit&&t.jsxs(F,{onClick:s=>{s.stopPropagation(),n.edit?.(e)},children:[t.jsx(Qe,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(F,{onClick:s=>{s.stopPropagation(),n.duplicate?.(e)},children:[t.jsx(He,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(F,{variant:"destructive",onClick:s=>{s.stopPropagation(),n.delete?.(e)},children:[t.jsx(Xe,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function et(n){const e=n.type;return Array.isArray(e)?e.every(s=>et({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function Ht(n,e){const s=n.properties||{},d=Object.keys(s).filter(o=>{const u=s[o];return u&&et(u)}),i=Ut(s),l=[],a=new Set;i&&d.includes(i)&&(l.push(i),a.add(i));const c=["title","description","updated_at","updated_by"];for(const o of c)d.includes(o)&&!a.has(o)&&(l.push(o),a.add(o));const f=d.filter(o=>!a.has(o)&&!Be.includes(o)).sort((o,u)=>o.localeCompare(u));for(const o of f)l.push(o),a.add(o);for(const o of Be)d.includes(o)&&!a.has(o)&&(l.push(o),a.add(o));return l.map(o=>{const u=s[o],v=e?e.includes(o):!["id"].includes(o);return o===i?{id:o,header:"",render:h=>{const m=h[o];return t.jsx(Le,{icon:m,name:h.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:o==="description"?{id:o,header:"Description",render:h=>{const m=h[o];return m==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(m)})},sortable:v,cellClassName:"max-w-[50ch]"}:o==="created_by"||o==="updated_by"?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:h=>{const m=h[o];return m?t.jsx(Kt,{id:String(m),size:"xs"}):"—"},sortable:v,cellClassName:"max-w-[250px]"}:u?.format==="date-time"||o.endsWith("_at")?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:h=>{const m=h[o];return m?t.jsx("span",{className:"block truncate max-w-full",children:new Date(m).toLocaleDateString()}):"—"},sortable:v,cellClassName:"max-w-[200px]"}:{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:h=>{const m=h[o];return m==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(m)})},sortable:v,cellClassName:"max-w-[200px]"}})}function Jt(n,e,s,d){const i=n||Ht(e,s);return i.some(c=>c.id==="actions")?i:Object.keys(d).length>0?[...i,Wt(d)]:i}function vs(n){const e=ne.c(117),{connectionId:s,org:d,activeCollection:i}=n,l=i.name,a=i.schema??vt,c=i.hasCreateTool,f=i.hasUpdateTool,o=i.hasDeleteTool,u=nt(),h=lt().location.href,{data:m}=rt.useSession(),x=m?.user?.id||"unknown",y=jt(s);let j;e[0]!==s?(j=Re(s),e[0]=s,e[1]=j):j=e[1];const S=j,r=dt(s,l,S),g=`${s}-${l}`;let C;e[2]!==d||e[3]!==g?(C={namespace:d,resource:g,defaultSortKey:"updated_at"},e[2]=d,e[3]=g,e[4]=C):C=e[4];const{search:p,searchTerm:_,setSearch:b,viewMode:I,setViewMode:T,sortKey:E,sortDirection:N,handleSort:P}=ht(C);let D;e[5]!==_||e[6]!==N||e[7]!==E?(D={searchTerm:_,sortKey:E,sortDirection:N},e[5]=_,e[6]=N,e[7]=E,e[8]=D):D=e[8];const z=mt(s,l,S,D),K=!c&&!f&&!o;let $;e[9]!==l||e[10]!==s||e[11]!==u||e[12]!==d?($=w=>{u({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:d,connectionId:s,collectionName:l,itemId:w.id}})},e[9]=l,e[10]=s,e[11]=u,e[12]=d,e[13]=$):$=e[13];const A=$;let O;e[14]!==r.create||e[15]!==x?(O=async w=>{const he=new Date().toISOString();await r.create.mutateAsync({...w,id:Ke("conn"),title:`${w.title} (Copy)`,created_at:he,updated_at:he,created_by:x,updated_by:x})},e[14]=r.create,e[15]=x,e[16]=O):O=e[16];const k=O,[M,xe]=at.useState(null);let le;e[17]===Symbol.for("react.memo_cache_sentinel")?(le=w=>{xe(w)},e[17]=le):le=e[17];const tt=le;let U;e[18]!==A||e[19]!==f?(U=f&&{edit:A},e[18]=A,e[19]=f,e[20]=U):U=e[20];let B;e[21]!==k||e[22]!==c?(B=c&&{duplicate:k},e[21]=k,e[22]=c,e[23]=B):B=e[23];let L;e[24]!==o?(L=o&&{delete:tt},e[24]=o,e[25]=L):L=e[25];let re;e[26]!==L||e[27]!==U||e[28]!==B?(re={...U,...B,...L},e[26]=L,e[27]=U,e[28]=B,e[29]=re):re=e[29];const ge=re;let ae;e[30]!==r.delete||e[31]!==M?(ae=async()=>{M&&(await r.delete.mutateAsync(M.id),xe(null))},e[30]=r.delete,e[31]=M,e[32]=ae):ae=e[32];const je=ae;let ce;e[33]!==r.create||e[34]!==l||e[35]!==s||e[36]!==c||e[37]!==u||e[38]!==d||e[39]!==x?(ce=async()=>{if(!c){ct.error("Create operation is not available for this collection");return}const w=new Date().toISOString(),he={id:Ke("conn"),title:"New Item",description:"A brief description of the item",created_at:w,updated_at:w,created_by:x,updated_by:x};try{const Ee=await r.create.mutateAsync(he);u({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:d,connectionId:s,collectionName:l,itemId:Ee.id}})}catch(Ee){console.error("Failed to create item:",Ee)}},e[33]=r.create,e[34]=l,e[35]=s,e[36]=c,e[37]=u,e[38]=d,e[39]=x,e[40]=ce):ce=e[40];const Ce=ce;let de;e[41]!==a?(de=Ze(a),e[41]=a,e[42]=de):de=e[42];const ve=de,ke=(z?.length??0)>0,st=c&&ke,ot=c&&!ke&&!p;let me;e[43]!==r.create||e[44]!==Ce||e[45]!==c?(me=c?t.jsxs(Oe,{onClick:Ce,size:"sm",disabled:r.create.isPending,className:"h-7",children:[t.jsx(Tt,{className:"mr-2 h-4 w-4"}),r.create.isPending?"Creating...":"Create"]}):null,e[43]=r.create,e[44]=Ce,e[45]=c,e[46]=me):me=e[46];const Fe=me,be=E;let R;e[47]!==P||e[48]!==T||e[49]!==N||e[50]!==ve||e[51]!==be||e[52]!==I?(R=t.jsx(Ve,{viewMode:I,onViewModeChange:T,sortKey:be,sortDirection:N,onSort:P,sortOptions:ve}),e[47]=P,e[48]=T,e[49]=N,e[50]=ve,e[51]=be,e[52]=I,e[53]=R):R=e[53];const ye=`${l}s`,Ne=y?.icon??"grid_view";let V;e[54]!==ye||e[55]!==Ne||e[56]!==h?(V=t.jsx(Ct,{title:ye,url:h,icon:Ne}),e[54]=ye,e[55]=Ne,e[56]=h,e[57]=V):V=e[57];const we=st&&Fe;let q;e[58]!==R||e[59]!==V||e[60]!==we?(q=t.jsxs($t,{children:[R,V,we]}),e[58]=R,e[59]=V,e[60]=we,e[61]=q):q=e[61];const Se=`Search ${l}...`;let G;e[62]!==b?(G=w=>{w.key==="Escape"&&(b(""),w.target.blur())},e[62]=b,e[63]=G):G=e[63];let W;e[64]!==p||e[65]!==b||e[66]!==Se||e[67]!==G?(W=t.jsx(ut,{value:p,onChange:b,placeholder:Se,onKeyDown:G}),e[64]=p,e[65]=b,e[66]=Se,e[67]=G,e[68]=W):W=e[68];let H;e[69]!==z?(H=z??[],e[69]=z,e[70]=H):H=e[70];const _e=E;let J;e[71]!==A?(J=w=>A(w),e[71]=A,e[72]=J):J=e[72];const De="No items found",Ae=p?"Try adjusting your search terms":"This collection doesn't have any items yet.",Te=ot?Fe:void 0;let Q;e[73]!==De||e[74]!==Ae||e[75]!==Te?(Q=t.jsx(ft,{image:null,title:De,description:Ae,actions:Te}),e[73]=De,e[74]=Ae,e[75]=Te,e[76]=Q):Q=e[76];let Y;e[77]!==P||e[78]!==K||e[79]!==ge||e[80]!==a||e[81]!==p||e[82]!==b||e[83]!==T||e[84]!==N||e[85]!==H||e[86]!==_e||e[87]!==J||e[88]!==Q||e[89]!==I?(Y=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Bt,{hideToolbar:!0,data:H,schema:a,viewMode:I,onViewModeChange:T,search:p,onSearchChange:b,sortKey:_e,sortDirection:N,onSort:P,actions:ge,onItemClick:J,readOnly:K,emptyState:Q})}),e[77]=P,e[78]=K,e[79]=ge,e[80]=a,e[81]=p,e[82]=b,e[83]=T,e[84]=N,e[85]=H,e[86]=_e,e[87]=J,e[88]=Q,e[89]=I,e[90]=Y):Y=e[90];let X;e[91]!==W||e[92]!==Y?(X=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[W,Y]}),e[91]=W,e[92]=Y,e[93]=X):X=e[93];const $e=!!M;let fe;e[94]===Symbol.for("react.memo_cache_sentinel")?(fe=w=>{w||xe(null)},e[94]=fe):fe=e[94];let ue;e[95]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx(Nt,{children:"Delete item?"}),e[95]=ue):ue=e[95];const Ie=M?.title;let Z;e[96]!==Ie?(Z=t.jsxs(wt,{children:[ue,t.jsxs(St,{children:['Are you sure you want to delete "',Ie,'"? This action cannot be undone.']})]}),e[96]=Ie,e[97]=Z):Z=e[97];let ee;e[98]!==r.delete.isPending?(ee=t.jsx(bt,{disabled:r.delete.isPending,children:"Cancel"}),e[98]=r.delete.isPending,e[99]=ee):ee=e[99];const Pe=r.delete.isPending?"Deleting...":"Delete";let te;e[100]!==r.delete.isPending||e[101]!==je||e[102]!==Pe?(te=t.jsx(yt,{onClick:je,disabled:r.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Pe}),e[100]=r.delete.isPending,e[101]=je,e[102]=Pe,e[103]=te):te=e[103];let se;e[104]!==ee||e[105]!==te?(se=t.jsxs(_t,{children:[ee,te]}),e[104]=ee,e[105]=te,e[106]=se):se=e[106];let oe;e[107]!==Z||e[108]!==se?(oe=t.jsxs(Dt,{children:[Z,se]}),e[107]=Z,e[108]=se,e[109]=oe):oe=e[109];let ie;e[110]!==$e||e[111]!==oe?(ie=t.jsx(At,{open:$e,onOpenChange:fe,children:oe}),e[110]=$e,e[111]=oe,e[112]=ie):ie=e[112];let pe;return e[113]!==q||e[114]!==X||e[115]!==ie?(pe=t.jsxs(t.Fragment,{children:[q,X,ie]}),e[113]=q,e[114]=X,e[115]=ie,e[116]=pe):pe=e[116],pe}export{vs as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,j as o}from"./index-
|
|
1
|
+
import{c as g,j as o}from"./index-Bz1LU39D.js";import{c as u}from"./input-CtiQUsvV.js";import{n as T}from"./collection-display-button-DroTLKfu.js";import{a as $}from"./Grid01-BEpepbVy.js";function R(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("div",{"data-slot":"table-container",className:"relative w-full min-w-0",children:o.jsx("table",{"data-slot":"table",className:l,...s})}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function H(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("[&_tr]:border-b",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("thead",{"data-slot":"table-header",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function L(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("tbody",{"data-slot":"table-body",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function S(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("tr",{"data-slot":"table-row",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function z(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("th",{"data-slot":"table-head",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function D(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("td",{"data-slot":"table-cell",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function E(a){const e=g.c(29),{columns:t,data:s,sortKey:l,sortDirection:r,onSort:f,onRowClick:c,rowClassName:x}=a;let h;e[0]!==r?(h=function(n,N){return o.jsx("div",{className:"w-4 flex items-center justify-center",children:N&&r&&(r==="asc"?o.jsx($,{size:16,className:"text-muted-foreground transition-colors"}):o.jsx(T,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=r,e[1]=h):h=e[1];const w=h;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=function(n,N){let C="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-xs h-9 uppercase tracking-wider";return n===N-1&&(C="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-xs h-9 uppercase tracking-wider w-8"),C},e[2]=p):p=e[2];const i=p;let d;if(e[3]!==t||e[4]!==f||e[5]!==w||e[6]!==l){let m;e[8]!==t.length||e[9]!==f||e[10]!==w||e[11]!==l?(m=(n,N)=>{const C=l===n.id;return o.jsx(z,{className:u(i(N,t.length),"group transition-colors select-none",n.sortable&&"hover:bg-accent cursor-pointer",n.rowClassName,n.cellClassName),onClick:n.sortable&&f?()=>f(n.id):void 0,children:o.jsxs("span",{className:"flex items-center gap-1",children:[n.header,n.sortable&&w(n.id,C)]})},n.id)},e[8]=t.length,e[9]=f,e[10]=w,e[11]=l,e[12]=m):m=e[12],d=t.map(m),e[3]=t,e[4]=f,e[5]=w,e[6]=l,e[7]=d}else d=e[7];let j;e[13]!==d?(j=o.jsx(H,{className:"sticky top-0 z-10 border-b-0 bg-muted/30",children:o.jsx(S,{className:"h-9 hover:bg-transparent border-b border-border",children:d})}),e[13]=d,e[14]=j):j=e[14];let v;if(e[15]!==t||e[16]!==s||e[17]!==c||e[18]!==x){let m;e[20]!==t||e[21]!==c||e[22]!==x?(m=(n,N)=>{const C=x?.(n);return o.jsx(S,{"data-row-index":N,className:u("group/data-row transition-colors border-b-0 hover:bg-accent/50",c?"cursor-pointer":"",C),onClick:c?()=>c(n):void 0,children:t.map(b=>o.jsx(D,{className:u("px-5 py-4 h-16 align-middle text-sm text-foreground",b.cellClassName,b.wrap?"whitespace-normal wrap-break-word":""),children:o.jsx("div",{className:u(b.wrap?"w-full":"min-w-0 w-full",!b.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:b.render?b.render(n):b.accessor?b.accessor(n):null})},b.id))},N)},e[20]=t,e[21]=c,e[22]=x,e[23]=m):m=e[23],v=s.map(m),e[15]=t,e[16]=s,e[17]=c,e[18]=x,e[19]=v}else v=e[19];let y;e[24]!==v?(y=o.jsx(L,{children:v}),e[24]=v,e[25]=y):y=e[25];let k;return e[26]!==j||e[27]!==y?(k=o.jsx("div",{className:"w-full bg-background min-w-0",children:o.jsxs(R,{className:"w-full border-collapse",children:[j,y]})}),e[26]=j,e[27]=y,e[28]=k):k=e[28],k}function W(a){const e=g.c(12),{columns:t,data:s,isLoading:l,sortKey:r,sortDirection:f,onSort:c,onRowClick:x,emptyState:h}=a;if(l===void 0?!1:l){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex items-center justify-center h-full",children:o.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=i):i=e[0],i}if(s.length===0){let i;e[1]!==h?(i=h||o.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=h,e[2]=i):i=e[2];let d;return e[3]!==i?(d=o.jsx("div",{className:"flex items-center justify-center h-full",children:i}),e[3]=i,e[4]=d):d=e[4],d}let p;return e[5]!==t||e[6]!==s||e[7]!==x||e[8]!==c||e[9]!==f||e[10]!==r?(p=o.jsx("div",{className:"flex-1 overflow-auto",children:o.jsx(E,{columns:t,data:s,sortKey:r,sortDirection:f,onSort:c,onRowClick:x})}),e[5]=t,e[6]=s,e[7]=x,e[8]=c,e[9]=f,e[10]=r,e[11]=p):p=e[11],p}export{W as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,j as s}from"./index-
|
|
1
|
+
import{c as S,j as s}from"./index-Bz1LU39D.js";import{C as _}from"./card-XgDm8_H9.js";import{c as j}from"./input-CtiQUsvV.js";import{I as A}from"./empty-state-DgOO5bI1.js";function H(h){const e=S.c(40),{connection:t,onClick:g,headerActions:v,footer:C,className:k,size:R,fallbackIcon:z}=h,b=R===void 0?"md":R,y=b==="sm"?"p-4":"p-6",I=b==="sm"?"text-sm":"text-base",w=b==="sm"?"text-xs":"text-sm",E=g&&"hover:bg-muted/50";let i;e[0]!==k||e[1]!==E?(i=j("cursor-pointer transition-colors group",E,k),e[0]=k,e[1]=E,e[2]=i):i=e[2];let l;e[3]!==y?(l=j("flex flex-col gap-4 relative",y),e[3]=y,e[4]=l):l=e[4];let o;e[5]!==t.icon||e[6]!==t.title||e[7]!==z?(o=s.jsx(A,{icon:t.icon,name:t.title,size:"md",className:"shrink-0 shadow-sm",fallbackIcon:z}),e[5]=t.icon,e[6]=t.title,e[7]=z,e[8]=o):o=e[8];let n;e[9]!==v?(n=v&&s.jsx("div",{className:j("transition-opacity","opacity-0 group-hover:opacity-100"),onClick:q,children:v}),e[9]=v,e[10]=n):n=e[10];let c;e[11]!==n?(c=s.jsx("div",{className:"relative",children:n}),e[11]=n,e[12]=c):c=e[12];let r;e[13]!==o||e[14]!==c?(r=s.jsxs("div",{className:"flex items-start justify-between",children:[o,c]}),e[13]=o,e[14]=c,e[15]=r):r=e[15];let a;e[16]!==I?(a=j("font-medium text-foreground truncate",I),e[16]=I,e[17]=a):a=e[17];let m;e[18]!==t.title||e[19]!==a?(m=s.jsx("h3",{className:a,children:t.title}),e[18]=t.title,e[19]=a,e[20]=m):m=e[20];let d;e[21]!==w?(d=j("text-muted-foreground line-clamp-2",w),e[21]=w,e[22]=d):d=e[22];const P=t.description||"No description";let f;e[23]!==d||e[24]!==P?(f=s.jsx("p",{className:d,children:P}),e[23]=d,e[24]=P,e[25]=f):f=e[25];let p;e[26]!==m||e[27]!==f?(p=s.jsxs("div",{className:"flex flex-col gap-0",children:[m,f]}),e[26]=m,e[27]=f,e[28]=p):p=e[28];let x;e[29]!==C?(x=C&&s.jsx("div",{onClick:$,children:C}),e[29]=C,e[30]=x):x=e[30];let u;e[31]!==p||e[32]!==x||e[33]!==l||e[34]!==r?(u=s.jsxs("div",{className:l,children:[r,p,x]}),e[31]=p,e[32]=x,e[33]=l,e[34]=r,e[35]=u):u=e[35];let N;return e[36]!==g||e[37]!==u||e[38]!==i?(N=s.jsx(_,{className:i,onClick:g,children:u}),e[36]=g,e[37]=u,e[38]=i,e[39]=N):N=e[39],N}function $(h){return h.stopPropagation()}function q(h){return h.stopPropagation()}export{H as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as q,j as o,f as W,k as J,r as z,d as ce,b as le,ar as ae}from"./index-DMNk-OUX.js";import{E as F,I as Q}from"./empty-state-DzS1Zp7m.js";import{E as X}from"./error-boundary-BQnJ9S9E.js";import{c as G,a as me}from"./use-connection-DoWszS3j.js";import{b as de}from"./use-binding-Dj4lal1A.js";import{u as ue,S as pe}from"./index-GoXtajA4.js";import{u as fe,a as he}from"./use-connection-resources-BywYCfzc.js";import{B as xe}from"./input-68J17rBp.js";import{i as Y}from"./Loading01-NW_f44Lz.js";import{R as ge}from"./resource-tabs-BKSlcL1W.js";import{V as Z,a as be,b as je}from"./layout-Olb4shdE.js";import{C as ye}from"./collection-tab-IeT0mJ-2.js";import{C as ee}from"./collection-display-button-BGIcja12.js";import{C as te}from"./collection-search-CYZk6T6Z.js";import{C as oe}from"./collection-table-wrapper-D2niE2Ci.js";import{P as se}from"./pin-to-sidebar-button-B1xHHS9n.js";import{C as ne}from"./card-B3fsloDi.js";import{R as Se,T as Ce}from"./tools-list-Dgf0oqyC.js";import"./project-context-provider-BJIP5a-U.js";import"./auth-C9dSkS_x.js";import"./mcp-oauth-Db8WtQ8u.js";import"./env-vars-editor-B_mIaT86.js";import"./Plus-DaP4KLuJ.js";import"./Trash01-CjDzx3jP.js";import"./use-tool-call-BBonHr6l.js";import"./File06-D0TXCuMx.js";import"./Key01-8ewaPBuD.js";import"./form-DrOt6d2d.js";import"./select-B9KJyTZZ.js";import"./Check-JFkjTCfG.js";import"./ChevronDown-HtFMO0lw.js";import"./Terminal-ANRX3jJ8.js";import"./use-gateway-CRpsitbG.js";import"./Grid01-BbdtRdR8.js";import"./index-Bb8rHnPb.js";import"./constants-Cy709IUA.js";import"./registry-utils-B7t_ZBUi.js";import"./extract-connection-data-DPoJQhk8.js";import"./github-icon-Dp3wHhYE.js";import"./generate-id-Dyweu44Y.js";import"./index-XOpbMEap.js";import"./index-CBIrwxtj.js";import"./popover-DC9U4d6e.js";import"./SearchMd-tOSOFUes.js";import"./use-create-gateway-Ca5SEa8I.js";import"./AlertCircle-Cso_Xxvk.js";import"./X-D3ljCSd1.js";import"./textarea-BAUX8Qgd.js";import"./localstorage-keys-C62ZbWuB.js";import"./Copy01-Dadp_RDG.js";import"./monaco-editor-B_MycISs.js";import"./spinner-B0sczm1j.js";import"./alert-dialog-_Gzpv9vf.js";import"./use-mobile--ytA5LT5.js";import"./InfoCircle-D6qJG9Nl.js";import"./badge-0b6sJe4S.js";import"./ArrowLeft-BrsZ2N_5.js";import"./dropdown-menu-CnL8UM0z.js";import"./DotsVertical-BHUUUCDx.js";import"./Edit01-CxRkZTQ1.js";import"./use-list-state-CPUcOhR_.js";import"./empty-state-BmkZOMzL.js";import"./Inbox01-CgwXLK3n.js";import"./avatar-D1o5pnzU.js";import"./view-mode-toggle-BpjQ6V4P.js";import"./use-organization-settings-D6rXW2c_.js";function ve(t){const e=q.c(42),{prompts:r,connectionId:n,org:s,connectionTitle:l,connectionIcon:f,onPromptClick:j,showToolbar:g,emptyMessage:N}=t,V=g===void 0?!0:g,L=N===void 0?"This connection doesn't have any prompts yet.":N,u=W(),y=J().location.href,[p,i]=z.useState(""),[w,a]=z.useState("table"),[h,k]=z.useState("name"),[d,_]=z.useState("asc");let b;e[0]!==d||e[1]!==h?(b=x=>{h===x?(_(Ie),d==="desc"&&k(void 0)):(k(x),_("asc"))},e[0]=d,e[1]=h,e[2]=b):b=e[2];const T=b;let P;e[3]!==n||e[4]!==u||e[5]!==j||e[6]!==s?(P=x=>{j?j(x):n&&s&&u({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:s,connectionId:n,collectionName:"prompts",itemId:encodeURIComponent(x.name)}})},e[3]=n,e[4]=u,e[5]=j,e[6]=s,e[7]=P):P=e[7];const A=P;let B;if(e[8]!==r||e[9]!==p||e[10]!==d||e[11]!==h){const x=!r||r.length===0?[]:p.trim()?(()=>{const S=p.toLowerCase();return r.filter(U=>U.name.toLowerCase().includes(S)||U.description&&U.description.toLowerCase().includes(S))})():r;B=!h||!d?x:[...x].sort((S,U)=>{const re=S[h]||"",ie=U[h]||"",H=String(re).localeCompare(String(ie));return d==="asc"?H:-H}),e[8]=r,e[9]=p,e[10]=d,e[11]=h,e[12]=B}else B=e[12];const m=B;let O;e[13]===Symbol.for("react.memo_cache_sentinel")?(O=[{id:"name",header:"Name",render:$e,sortable:!0},{id:"description",header:"Description",render:Te,cellClassName:"flex-1",sortable:!0}],e[13]=O):O=e[13];const E=O;let M;e[14]===Symbol.for("react.memo_cache_sentinel")?(M=E.filter(we).map(Ne),e[14]=M):M=e[14];const D=M;let $;e[15]!==f||e[16]!==l||e[17]!==T||e[18]!==V||e[19]!==d||e[20]!==h||e[21]!==y||e[22]!==w?($=V&&o.jsxs(Z,{children:[o.jsx(ee,{viewMode:w,onViewModeChange:a,sortKey:h,sortDirection:d,onSort:T,sortOptions:D}),o.jsx(se,{title:l?`${l}: Prompts`:"Prompts",url:y,icon:f??"description"})]}),e[15]=f,e[16]=l,e[17]=T,e[18]=V,e[19]=d,e[20]=h,e[21]=y,e[22]=w,e[23]=$):$=e[23];let I;e[24]===Symbol.for("react.memo_cache_sentinel")?(I=x=>{x.key==="Escape"&&(i(""),x.target.blur())},e[24]=I):I=e[24];let R;e[25]!==p?(R=o.jsx(te,{value:p,onChange:i,placeholder:"Search prompts...",onKeyDown:I}),e[25]=p,e[26]=R):R=e[26];let c;e[27]!==L||e[28]!==A||e[29]!==T||e[30]!==p||e[31]!==d||e[32]!==h||e[33]!==m||e[34]!==w?(c=w==="cards"?o.jsx("div",{className:"flex-1 overflow-auto p-5",children:m.length===0?o.jsx(F,{image:null,title:p?"No prompts found":"No prompts available",description:p?"Try adjusting your search terms":L}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:m.map(x=>o.jsx(ne,{className:"cursor-pointer transition-colors",onClick:()=>A(x),children:o.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[o.jsx(Q,{icon:null,name:x.name,size:"md",className:"shrink-0 shadow-sm"}),o.jsxs("div",{className:"flex flex-col gap-0",children:[o.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:x.name}),o.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:x.description||"No description"})]})]})},x.name))})}):o.jsx(oe,{columns:E,data:m,isLoading:!1,sortKey:h,sortDirection:d,onSort:T,onRowClick:x=>A(x),emptyState:o.jsx(F,{image:null,title:p?"No prompts found":"No prompts available",description:p?"Try adjusting your search terms":L})}),e[27]=L,e[28]=A,e[29]=T,e[30]=p,e[31]=d,e[32]=h,e[33]=m,e[34]=w,e[35]=c):c=e[35];let C;e[36]!==R||e[37]!==c?(C=o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[R,c]}),e[36]=R,e[37]=c,e[38]=C):C=e[38];let v;return e[39]!==C||e[40]!==$?(v=o.jsxs(o.Fragment,{children:[$,C]}),e[39]=C,e[40]=$,e[41]=v):v=e[41],v}function Ne(t){return{id:t.id,label:typeof t.header=="string"?t.header:t.id}}function we(t){return t.sortable}function Te(t){return o.jsx("span",{className:"text-sm text-foreground",children:t.description||"—"})}function $e(t){return o.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:t.name})}function Ie(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function Re(t){const e=q.c(6),{prompts:r,connectionId:n,org:s}=t,l=G(n),f=l?.title,j=l?.icon;let g;return e[0]!==n||e[1]!==s||e[2]!==r||e[3]!==f||e[4]!==j?(g=o.jsx(ve,{prompts:r,connectionId:n,org:s,connectionTitle:f,connectionIcon:j}),e[0]=n,e[1]=s,e[2]=r,e[3]=f,e[4]=j,e[5]=g):g=e[5],g}function ke(t){const e=q.c(2),{repository:r}=t;let n;return e[0]!==r?(n=o.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:o.jsx(Se,{repository:r})}),e[0]=r,e[1]=n):n=e[1],n}function _e(t){const e=q.c(39),{resources:r,connectionTitle:n,connectionIcon:s,onResourceClick:l,showToolbar:f,emptyMessage:j}=t,g=f===void 0?!0:f,N=j===void 0?"This connection doesn't have any resources yet.":j,L=J().location.href,[u,K]=z.useState(""),[y,p]=z.useState("table"),[i,w]=z.useState("name"),[a,h]=z.useState("asc");let k;e[0]!==a||e[1]!==i?(k=c=>{i===c?(h(De),a==="desc"&&w(void 0)):(w(c),h("asc"))},e[0]=a,e[1]=i,e[2]=k):k=e[2];const d=k;let _;e[3]!==l?(_=c=>{l&&l(c)},e[3]=l,e[4]=_):_=e[4];const b=_;let T;if(e[5]!==r||e[6]!==u||e[7]!==a||e[8]!==i){const c=!r||r.length===0?[]:u.trim()?(()=>{const C=u.toLowerCase();return r.filter(v=>v.uri.toLowerCase().includes(C)||v.name&&v.name.toLowerCase().includes(C)||v.description&&v.description.toLowerCase().includes(C))})():r;T=!i||!a?c:[...c].sort((C,v)=>{const x=C[i]||"",S=v[i]||"",U=String(x).localeCompare(String(S));return a==="asc"?U:-U}),e[5]=r,e[6]=u,e[7]=a,e[8]=i,e[9]=T}else T=e[9];const P=T;let A;e[10]===Symbol.for("react.memo_cache_sentinel")?(A=[{id:"name",header:"Name",render:Ae,sortable:!0},{id:"uri",header:"URI",render:Me,sortable:!0},{id:"description",header:"Description",render:Ee,cellClassName:"flex-1",sortable:!0},{id:"mimeType",header:"Type",render:Le,sortable:!0}],e[10]=A):A=e[10];const B=A;let m;e[11]===Symbol.for("react.memo_cache_sentinel")?(m=B.filter(Ve).map(Pe),e[11]=m):m=e[11];const O=m;let E;e[12]!==s||e[13]!==n||e[14]!==d||e[15]!==g||e[16]!==a||e[17]!==i||e[18]!==L||e[19]!==y?(E=g&&o.jsxs(Z,{children:[o.jsx(ee,{viewMode:y,onViewModeChange:p,sortKey:i,sortDirection:a,onSort:d,sortOptions:O}),o.jsx(se,{title:n?`${n}: Resources`:"Resources",url:L,icon:s??"folder"})]}),e[12]=s,e[13]=n,e[14]=d,e[15]=g,e[16]=a,e[17]=i,e[18]=L,e[19]=y,e[20]=E):E=e[20];let M;e[21]===Symbol.for("react.memo_cache_sentinel")?(M=c=>{c.key==="Escape"&&(K(""),c.target.blur())},e[21]=M):M=e[21];let D;e[22]!==u?(D=o.jsx(te,{value:u,onChange:K,placeholder:"Search resources...",onKeyDown:M}),e[22]=u,e[23]=D):D=e[23];let $;e[24]!==N||e[25]!==b||e[26]!==d||e[27]!==u||e[28]!==a||e[29]!==i||e[30]!==P||e[31]!==y?($=y==="cards"?o.jsx("div",{className:"flex-1 overflow-auto p-5",children:P.length===0?o.jsx(F,{image:null,title:u?"No resources found":"No resources available",description:u?"Try adjusting your search terms":N}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:P.map(c=>o.jsx(ne,{className:"cursor-pointer transition-colors",onClick:()=>b(c),children:o.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[o.jsx(Q,{icon:null,name:c.name||c.uri,size:"md",className:"shrink-0 shadow-sm"}),o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:c.name||c.uri}),o.jsx("p",{className:"text-xs font-mono text-muted-foreground truncate",children:c.uri}),c.description&&o.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mt-1",children:c.description})]})]})},c.uri))})}):o.jsx(oe,{columns:B,data:P,isLoading:!1,sortKey:i,sortDirection:a,onSort:d,onRowClick:c=>b(c),emptyState:o.jsx(F,{image:null,title:u?"No resources found":"No resources available",description:u?"Try adjusting your search terms":N})}),e[24]=N,e[25]=b,e[26]=d,e[27]=u,e[28]=a,e[29]=i,e[30]=P,e[31]=y,e[32]=$):$=e[32];let I;e[33]!==D||e[34]!==$?(I=o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[D,$]}),e[33]=D,e[34]=$,e[35]=I):I=e[35];let R;return e[36]!==I||e[37]!==E?(R=o.jsxs(o.Fragment,{children:[E,I]}),e[36]=I,e[37]=E,e[38]=R):R=e[38],R}function Pe(t){return{id:t.id,label:typeof t.header=="string"?t.header:t.id}}function Ve(t){return t.sortable}function Le(t){return o.jsx("span",{className:"text-sm text-muted-foreground",children:t.mimeType||"—"})}function Ee(t){return o.jsx("span",{className:"text-sm text-foreground",children:t.description||"—"})}function Me(t){return o.jsx("span",{className:"text-sm font-mono text-muted-foreground",children:t.uri})}function Ae(t){return o.jsx("span",{className:"text-sm font-medium text-foreground",children:t.name||t.uri})}function De(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function Be(t){const e=q.c(6),{resources:r,connectionId:n,org:s}=t,l=G(n),f=l?.title,j=l?.icon;let g;return e[0]!==n||e[1]!==s||e[2]!==r||e[3]!==f||e[4]!==j?(g=o.jsx(_e,{resources:r,connectionId:n,org:s,connectionTitle:f,connectionIcon:j}),e[0]=n,e[1]=s,e[2]=r,e[3]=f,e[4]=j,e[5]=g):g=e[5],g}function Ue(t){const e=q.c(4),{tools:r,connectionId:n,org:s}=t;let l;return e[0]!==n||e[1]!==s||e[2]!==r?(l=o.jsx(Ce,{tools:r,connectionId:n,org:s}),e[0]=n,e[1]=s,e[2]=r,e[3]=l):l=e[3],l}function Ke(t){const e=q.c(61),{connection:r,connectionId:n,org:s,requestedTabId:l,collections:f,onUpdate:j,isUpdating:g,prompts:N,resources:V}=t,L=ae();let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={from:"/$org/mcps/$connectionId"},e[0]=u):u=e[0];const K=W(u);let y;e[1]!==n?(y={connectionId:n},e[1]=n,e[2]=y):y=e[2];const p=ue(y),i=p.isAuthenticated,w=r?.metadata?.repository,a=!!w?.url,h=r?.tools?.length??0,k=N.length,d=V.length;let _;e[3]===Symbol.for("react.memo_cache_sentinel")?(_={id:"settings",label:"Settings"},e[3]=_):_=e[3];let b;e[4]!==i||e[5]!==h?(b=i&&h>0?[{id:"tools",label:"Tools",count:h}]:[],e[4]=i,e[5]=h,e[6]=b):b=e[6];let T;e[7]!==i||e[8]!==k?(T=i&&k>0?[{id:"prompts",label:"Prompts",count:k}]:[],e[7]=i,e[8]=k,e[9]=T):T=e[9];let P;e[10]!==i||e[11]!==d?(P=i&&d>0?[{id:"resources",label:"Resources",count:d}]:[],e[10]=i,e[11]=d,e[12]=P):P=e[12];let A;if(e[13]!==f||e[14]!==a||e[15]!==i||e[16]!==b||e[17]!==T||e[18]!==P){let S;e[20]!==a?(S=a?[{id:"readme",label:"README"}]:[],e[20]=a,e[21]=S):S=e[21],A=[_,...b,...T,...P,...i?(f||[]).map(Oe):[],...S],e[13]=f,e[14]=a,e[15]=i,e[16]=b,e[17]=T,e[18]=P,e[19]=A}else A=e[19];const B=A,m=B.some(S=>S.id===l)?l:"settings";let O;e[22]!==K?(O=S=>{K({search:U=>({...U,tab:S}),replace:!0})},e[22]=K,e[23]=O):O=e[23];const E=O;let M;e[24]!==f?(M=f||[],e[24]=f,e[25]=M):M=e[25];let D;if(e[26]!==m||e[27]!==M){let S;e[29]!==m?(S=U=>U.name===m,e[29]=m,e[30]=S):S=e[30],D=M.find(S),e[26]=m,e[27]=M,e[28]=D}else D=e[28];const $=D;let I;e[31]!==L.history?(I=()=>L.history.back(),e[31]=L.history,e[32]=I):I=e[32];let R;e[33]!==m||e[34]!==E||e[35]!==B?(R=o.jsx(be,{children:o.jsx(ge,{tabs:B,activeTab:m,onTabChange:E})}),e[33]=m,e[34]=E,e[35]=B,e[36]=R):R=e[36];let c;e[37]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Y,{size:32,className:"animate-spin text-muted-foreground"})}),e[37]=c):c=e[37];let C;e[38]!==$||e[39]!==m||e[40]!==p.isServerError||e[41]!==p.supportsOAuth||e[42]!==r||e[43]!==n||e[44]!==E||e[45]!==a||e[46]!==i||e[47]!==g||e[48]!==j||e[49]!==s||e[50]!==N||e[51]!==w||e[52]!==V?(C=o.jsx(z.Suspense,{fallback:c,children:m==="tools"?o.jsx(Ue,{tools:r.tools??void 0,connectionId:n,org:s}):m==="prompts"?o.jsx(Re,{prompts:N,connectionId:n,org:s}):m==="resources"?o.jsx(Be,{resources:V,connectionId:n,org:s}):m==="settings"?o.jsx(pe,{connection:r,onUpdate:j,isUpdating:g,isMCPAuthenticated:i,supportsOAuth:p.supportsOAuth,isServerError:p.isServerError,onViewReadme:a?()=>E("readme"):void 0}):m==="readme"&&a?o.jsx(ke,{repository:w}):$&&i?o.jsx(ye,{connectionId:n,org:s,activeCollection:$},m):o.jsx(F,{title:"Collection not found",description:"This collection may have been deleted or you may not have access."})}),e[38]=$,e[39]=m,e[40]=p.isServerError,e[41]=p.supportsOAuth,e[42]=r,e[43]=n,e[44]=E,e[45]=a,e[46]=i,e[47]=g,e[48]=j,e[49]=s,e[50]=N,e[51]=w,e[52]=V,e[53]=C):C=e[53];let v;e[54]!==m||e[55]!==C?(v=o.jsx("div",{className:"flex h-full w-full bg-background overflow-hidden",children:o.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-auto",children:o.jsx(X,{children:C},m)})}),e[54]=m,e[55]=C,e[56]=v):v=e[56];let x;return e[57]!==I||e[58]!==R||e[59]!==v?(x=o.jsxs(je,{onBack:I,children:[R,v]}),e[57]=I,e[58]=R,e[59]=v,e[60]=x):x=e[60],x}function Oe(t){return{id:t.name,label:t.displayName}}function ze(){const t=q.c(29);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/mcps/$connectionId"},t[0]=e):e=t[0];const r=W(e);let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/mcps/$connectionId"},t[1]=n):n=t[1];const{connectionId:s,org:l}=ce(n);let f;t[2]===Symbol.for("react.memo_cache_sentinel")?(f={from:"/shell/$org/mcps/$connectionId"},t[2]=f):f=t[2];const g=le(f).tab||"settings",N=G(s),V=me(),L=de(N??void 0);let u;t[3]!==s?(u=[s],t[3]=s,t[4]=u):u=t[4];const{promptsMap:K}=fe(u);let y;t[5]!==s?(y=[s],t[5]=s,t[6]=y):y=t[6];const{resourcesMap:p}=he(y);let i;t[7]!==s||t[8]!==K?(i=K.get(s)??[],t[7]=s,t[8]=K,t[9]=i):i=t[9];const w=i;let a;t[10]!==s||t[11]!==p?(a=p.get(s)??[],t[10]=s,t[11]=p,t[12]=a):a=t[12];const h=a;let k;t[13]!==V.update||t[14]!==s?(k=async b=>{await V.update.mutateAsync({id:s,data:b})},t[13]=V.update,t[14]=s,t[15]=k):k=t[15];const d=k;if(!N){let b;return t[16]!==r||t[17]!==l?(b=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(F,{title:"Connection not found",description:"This connection may have been deleted or you may not have access.",actions:o.jsx(xe,{variant:"outline",onClick:()=>r({to:"/$org/mcps",params:{org:l}}),children:"Back to connections"})})}),t[16]=r,t[17]=l,t[18]=b):b=t[18],b}let _;return t[19]!==V.update.isPending||t[20]!==L||t[21]!==N||t[22]!==s||t[23]!==d||t[24]!==l||t[25]!==w||t[26]!==g||t[27]!==h?(_=o.jsx(Ke,{org:l,connection:N,connectionId:s,requestedTabId:g,collections:L,onUpdate:d,isUpdating:V.update.isPending,prompts:w,resources:h}),t[19]=V.update.isPending,t[20]=L,t[21]=N,t[22]=s,t[23]=d,t[24]=l,t[25]=w,t[26]=g,t[27]=h,t[28]=_):_=t[28],_}function qe(){const t=q.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(X,{children:o.jsx(z.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:o.jsx(Y,{size:32,className:"animate-spin text-muted-foreground"})}),children:o.jsx(ze,{})})}),t[0]=e):e=t[0],e}function so(){const t=q.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(qe,{}),t[0]=e):e=t[0],e}export{so as default};
|
|
1
|
+
import{c as q,j as o,f as W,k as J,r as z,d as ce,b as le,ar as ae}from"./index-Bz1LU39D.js";import{E as F,I as Q}from"./empty-state-DgOO5bI1.js";import{E as X}from"./error-boundary-uBvOVTCE.js";import{c as G,a as me}from"./use-connection-BXdeHsm0.js";import{b as de}from"./use-binding-UNVemCFv.js";import{u as ue,S as pe}from"./index-K2EwRRk6.js";import{u as fe,a as he}from"./use-connection-resources-C8cAy7Nl.js";import{B as xe}from"./input-CtiQUsvV.js";import{i as Y}from"./Loading01-CdaWSExX.js";import{R as ge}from"./resource-tabs-GXDudjH9.js";import{V as Z,a as be,b as je}from"./layout-C8G6tSLB.js";import{C as ye}from"./collection-tab-BQr3sv8I.js";import{C as ee}from"./collection-display-button-DroTLKfu.js";import{C as te}from"./collection-search-DIEJ7x7R.js";import{C as oe}from"./collection-table-wrapper-x8zydyA0.js";import{P as se}from"./pin-to-sidebar-button-C-akIZzz.js";import{C as ne}from"./card-XgDm8_H9.js";import{R as Se,T as Ce}from"./tools-list-C2S7XIkI.js";import"./project-context-provider-_aLYBfO9.js";import"./auth-CNkA6dk2.js";import"./mcp-oauth-BzcB2WNx.js";import"./env-vars-editor-mM2KyO-W.js";import"./Plus-CovnOzP9.js";import"./Trash01-DopdNXEu.js";import"./use-tool-call-BLplGau6.js";import"./File06-nV81V8TD.js";import"./Key01-ChIWeKNh.js";import"./form-orY-xngM.js";import"./select-Bxj6_TSM.js";import"./Check-Bkw0Gz-n.js";import"./ChevronDown-mvTJP4-S.js";import"./registry-utils-BIzwINzW.js";import"./Terminal-DYwA22tz.js";import"./use-gateway-BhC1hXIm.js";import"./Grid01-BEpepbVy.js";import"./index-o28bnKR9.js";import"./constants-8DEiLmV-.js";import"./extract-connection-data-DMhfaAiL.js";import"./github-icon-Dp3wHhYE.js";import"./generate-id-Dyweu44Y.js";import"./index-Cw3bkeXO.js";import"./index-BuPukvJG.js";import"./popover-QWczrvYc.js";import"./SearchMd-YxKkBPG0.js";import"./use-create-gateway-D8vNiD2K.js";import"./AlertCircle-CtP28Oyz.js";import"./X-DcqsnRSe.js";import"./textarea-D76YOeHc.js";import"./localstorage-keys-5oG1CfEQ.js";import"./Copy01-BctGx-5E.js";import"./monaco-editor-BmVBfnK5.js";import"./spinner-C7HX4n17.js";import"./alert-dialog-B2ogXLEp.js";import"./use-mobile-sd5ko6M_.js";import"./InfoCircle-BXctEVkS.js";import"./badge-8BCP2QJ_.js";import"./ArrowLeft-Bps-R0_t.js";import"./dropdown-menu-DjFWyTtD.js";import"./DotsVertical-CzCtj25W.js";import"./Edit01-BD5iJRQz.js";import"./use-list-state-CAv4RNZg.js";import"./empty-state-DSGxvcRL.js";import"./Inbox01-DkMyh-FB.js";import"./avatar-KT16fAYd.js";import"./view-mode-toggle-CVcyaB_S.js";import"./use-organization-settings-DBRSoBd0.js";function ve(t){const e=q.c(42),{prompts:r,connectionId:n,org:s,connectionTitle:l,connectionIcon:f,onPromptClick:j,showToolbar:g,emptyMessage:N}=t,V=g===void 0?!0:g,L=N===void 0?"This connection doesn't have any prompts yet.":N,u=W(),y=J().location.href,[p,i]=z.useState(""),[w,a]=z.useState("table"),[h,k]=z.useState("name"),[d,_]=z.useState("asc");let b;e[0]!==d||e[1]!==h?(b=x=>{h===x?(_(Ie),d==="desc"&&k(void 0)):(k(x),_("asc"))},e[0]=d,e[1]=h,e[2]=b):b=e[2];const T=b;let P;e[3]!==n||e[4]!==u||e[5]!==j||e[6]!==s?(P=x=>{j?j(x):n&&s&&u({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:s,connectionId:n,collectionName:"prompts",itemId:encodeURIComponent(x.name)}})},e[3]=n,e[4]=u,e[5]=j,e[6]=s,e[7]=P):P=e[7];const A=P;let B;if(e[8]!==r||e[9]!==p||e[10]!==d||e[11]!==h){const x=!r||r.length===0?[]:p.trim()?(()=>{const S=p.toLowerCase();return r.filter(U=>U.name.toLowerCase().includes(S)||U.description&&U.description.toLowerCase().includes(S))})():r;B=!h||!d?x:[...x].sort((S,U)=>{const re=S[h]||"",ie=U[h]||"",H=String(re).localeCompare(String(ie));return d==="asc"?H:-H}),e[8]=r,e[9]=p,e[10]=d,e[11]=h,e[12]=B}else B=e[12];const m=B;let O;e[13]===Symbol.for("react.memo_cache_sentinel")?(O=[{id:"name",header:"Name",render:$e,sortable:!0},{id:"description",header:"Description",render:Te,cellClassName:"flex-1",sortable:!0}],e[13]=O):O=e[13];const E=O;let M;e[14]===Symbol.for("react.memo_cache_sentinel")?(M=E.filter(we).map(Ne),e[14]=M):M=e[14];const D=M;let $;e[15]!==f||e[16]!==l||e[17]!==T||e[18]!==V||e[19]!==d||e[20]!==h||e[21]!==y||e[22]!==w?($=V&&o.jsxs(Z,{children:[o.jsx(ee,{viewMode:w,onViewModeChange:a,sortKey:h,sortDirection:d,onSort:T,sortOptions:D}),o.jsx(se,{title:l?`${l}: Prompts`:"Prompts",url:y,icon:f??"description"})]}),e[15]=f,e[16]=l,e[17]=T,e[18]=V,e[19]=d,e[20]=h,e[21]=y,e[22]=w,e[23]=$):$=e[23];let I;e[24]===Symbol.for("react.memo_cache_sentinel")?(I=x=>{x.key==="Escape"&&(i(""),x.target.blur())},e[24]=I):I=e[24];let R;e[25]!==p?(R=o.jsx(te,{value:p,onChange:i,placeholder:"Search prompts...",onKeyDown:I}),e[25]=p,e[26]=R):R=e[26];let c;e[27]!==L||e[28]!==A||e[29]!==T||e[30]!==p||e[31]!==d||e[32]!==h||e[33]!==m||e[34]!==w?(c=w==="cards"?o.jsx("div",{className:"flex-1 overflow-auto p-5",children:m.length===0?o.jsx(F,{image:null,title:p?"No prompts found":"No prompts available",description:p?"Try adjusting your search terms":L}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:m.map(x=>o.jsx(ne,{className:"cursor-pointer transition-colors",onClick:()=>A(x),children:o.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[o.jsx(Q,{icon:null,name:x.name,size:"md",className:"shrink-0 shadow-sm"}),o.jsxs("div",{className:"flex flex-col gap-0",children:[o.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:x.name}),o.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:x.description||"No description"})]})]})},x.name))})}):o.jsx(oe,{columns:E,data:m,isLoading:!1,sortKey:h,sortDirection:d,onSort:T,onRowClick:x=>A(x),emptyState:o.jsx(F,{image:null,title:p?"No prompts found":"No prompts available",description:p?"Try adjusting your search terms":L})}),e[27]=L,e[28]=A,e[29]=T,e[30]=p,e[31]=d,e[32]=h,e[33]=m,e[34]=w,e[35]=c):c=e[35];let C;e[36]!==R||e[37]!==c?(C=o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[R,c]}),e[36]=R,e[37]=c,e[38]=C):C=e[38];let v;return e[39]!==C||e[40]!==$?(v=o.jsxs(o.Fragment,{children:[$,C]}),e[39]=C,e[40]=$,e[41]=v):v=e[41],v}function Ne(t){return{id:t.id,label:typeof t.header=="string"?t.header:t.id}}function we(t){return t.sortable}function Te(t){return o.jsx("span",{className:"text-sm text-foreground",children:t.description||"—"})}function $e(t){return o.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:t.name})}function Ie(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function Re(t){const e=q.c(6),{prompts:r,connectionId:n,org:s}=t,l=G(n),f=l?.title,j=l?.icon;let g;return e[0]!==n||e[1]!==s||e[2]!==r||e[3]!==f||e[4]!==j?(g=o.jsx(ve,{prompts:r,connectionId:n,org:s,connectionTitle:f,connectionIcon:j}),e[0]=n,e[1]=s,e[2]=r,e[3]=f,e[4]=j,e[5]=g):g=e[5],g}function ke(t){const e=q.c(2),{repository:r}=t;let n;return e[0]!==r?(n=o.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:o.jsx(Se,{repository:r})}),e[0]=r,e[1]=n):n=e[1],n}function _e(t){const e=q.c(39),{resources:r,connectionTitle:n,connectionIcon:s,onResourceClick:l,showToolbar:f,emptyMessage:j}=t,g=f===void 0?!0:f,N=j===void 0?"This connection doesn't have any resources yet.":j,L=J().location.href,[u,K]=z.useState(""),[y,p]=z.useState("table"),[i,w]=z.useState("name"),[a,h]=z.useState("asc");let k;e[0]!==a||e[1]!==i?(k=c=>{i===c?(h(De),a==="desc"&&w(void 0)):(w(c),h("asc"))},e[0]=a,e[1]=i,e[2]=k):k=e[2];const d=k;let _;e[3]!==l?(_=c=>{l&&l(c)},e[3]=l,e[4]=_):_=e[4];const b=_;let T;if(e[5]!==r||e[6]!==u||e[7]!==a||e[8]!==i){const c=!r||r.length===0?[]:u.trim()?(()=>{const C=u.toLowerCase();return r.filter(v=>v.uri.toLowerCase().includes(C)||v.name&&v.name.toLowerCase().includes(C)||v.description&&v.description.toLowerCase().includes(C))})():r;T=!i||!a?c:[...c].sort((C,v)=>{const x=C[i]||"",S=v[i]||"",U=String(x).localeCompare(String(S));return a==="asc"?U:-U}),e[5]=r,e[6]=u,e[7]=a,e[8]=i,e[9]=T}else T=e[9];const P=T;let A;e[10]===Symbol.for("react.memo_cache_sentinel")?(A=[{id:"name",header:"Name",render:Ae,sortable:!0},{id:"uri",header:"URI",render:Me,sortable:!0},{id:"description",header:"Description",render:Ee,cellClassName:"flex-1",sortable:!0},{id:"mimeType",header:"Type",render:Le,sortable:!0}],e[10]=A):A=e[10];const B=A;let m;e[11]===Symbol.for("react.memo_cache_sentinel")?(m=B.filter(Ve).map(Pe),e[11]=m):m=e[11];const O=m;let E;e[12]!==s||e[13]!==n||e[14]!==d||e[15]!==g||e[16]!==a||e[17]!==i||e[18]!==L||e[19]!==y?(E=g&&o.jsxs(Z,{children:[o.jsx(ee,{viewMode:y,onViewModeChange:p,sortKey:i,sortDirection:a,onSort:d,sortOptions:O}),o.jsx(se,{title:n?`${n}: Resources`:"Resources",url:L,icon:s??"folder"})]}),e[12]=s,e[13]=n,e[14]=d,e[15]=g,e[16]=a,e[17]=i,e[18]=L,e[19]=y,e[20]=E):E=e[20];let M;e[21]===Symbol.for("react.memo_cache_sentinel")?(M=c=>{c.key==="Escape"&&(K(""),c.target.blur())},e[21]=M):M=e[21];let D;e[22]!==u?(D=o.jsx(te,{value:u,onChange:K,placeholder:"Search resources...",onKeyDown:M}),e[22]=u,e[23]=D):D=e[23];let $;e[24]!==N||e[25]!==b||e[26]!==d||e[27]!==u||e[28]!==a||e[29]!==i||e[30]!==P||e[31]!==y?($=y==="cards"?o.jsx("div",{className:"flex-1 overflow-auto p-5",children:P.length===0?o.jsx(F,{image:null,title:u?"No resources found":"No resources available",description:u?"Try adjusting your search terms":N}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:P.map(c=>o.jsx(ne,{className:"cursor-pointer transition-colors",onClick:()=>b(c),children:o.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[o.jsx(Q,{icon:null,name:c.name||c.uri,size:"md",className:"shrink-0 shadow-sm"}),o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:c.name||c.uri}),o.jsx("p",{className:"text-xs font-mono text-muted-foreground truncate",children:c.uri}),c.description&&o.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mt-1",children:c.description})]})]})},c.uri))})}):o.jsx(oe,{columns:B,data:P,isLoading:!1,sortKey:i,sortDirection:a,onSort:d,onRowClick:c=>b(c),emptyState:o.jsx(F,{image:null,title:u?"No resources found":"No resources available",description:u?"Try adjusting your search terms":N})}),e[24]=N,e[25]=b,e[26]=d,e[27]=u,e[28]=a,e[29]=i,e[30]=P,e[31]=y,e[32]=$):$=e[32];let I;e[33]!==D||e[34]!==$?(I=o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[D,$]}),e[33]=D,e[34]=$,e[35]=I):I=e[35];let R;return e[36]!==I||e[37]!==E?(R=o.jsxs(o.Fragment,{children:[E,I]}),e[36]=I,e[37]=E,e[38]=R):R=e[38],R}function Pe(t){return{id:t.id,label:typeof t.header=="string"?t.header:t.id}}function Ve(t){return t.sortable}function Le(t){return o.jsx("span",{className:"text-sm text-muted-foreground",children:t.mimeType||"—"})}function Ee(t){return o.jsx("span",{className:"text-sm text-foreground",children:t.description||"—"})}function Me(t){return o.jsx("span",{className:"text-sm font-mono text-muted-foreground",children:t.uri})}function Ae(t){return o.jsx("span",{className:"text-sm font-medium text-foreground",children:t.name||t.uri})}function De(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function Be(t){const e=q.c(6),{resources:r,connectionId:n,org:s}=t,l=G(n),f=l?.title,j=l?.icon;let g;return e[0]!==n||e[1]!==s||e[2]!==r||e[3]!==f||e[4]!==j?(g=o.jsx(_e,{resources:r,connectionId:n,org:s,connectionTitle:f,connectionIcon:j}),e[0]=n,e[1]=s,e[2]=r,e[3]=f,e[4]=j,e[5]=g):g=e[5],g}function Ue(t){const e=q.c(4),{tools:r,connectionId:n,org:s}=t;let l;return e[0]!==n||e[1]!==s||e[2]!==r?(l=o.jsx(Ce,{tools:r,connectionId:n,org:s}),e[0]=n,e[1]=s,e[2]=r,e[3]=l):l=e[3],l}function Ke(t){const e=q.c(61),{connection:r,connectionId:n,org:s,requestedTabId:l,collections:f,onUpdate:j,isUpdating:g,prompts:N,resources:V}=t,L=ae();let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={from:"/$org/mcps/$connectionId"},e[0]=u):u=e[0];const K=W(u);let y;e[1]!==n?(y={connectionId:n},e[1]=n,e[2]=y):y=e[2];const p=ue(y),i=p.isAuthenticated,w=r?.metadata?.repository,a=!!w?.url,h=r?.tools?.length??0,k=N.length,d=V.length;let _;e[3]===Symbol.for("react.memo_cache_sentinel")?(_={id:"settings",label:"Settings"},e[3]=_):_=e[3];let b;e[4]!==i||e[5]!==h?(b=i&&h>0?[{id:"tools",label:"Tools",count:h}]:[],e[4]=i,e[5]=h,e[6]=b):b=e[6];let T;e[7]!==i||e[8]!==k?(T=i&&k>0?[{id:"prompts",label:"Prompts",count:k}]:[],e[7]=i,e[8]=k,e[9]=T):T=e[9];let P;e[10]!==i||e[11]!==d?(P=i&&d>0?[{id:"resources",label:"Resources",count:d}]:[],e[10]=i,e[11]=d,e[12]=P):P=e[12];let A;if(e[13]!==f||e[14]!==a||e[15]!==i||e[16]!==b||e[17]!==T||e[18]!==P){let S;e[20]!==a?(S=a?[{id:"readme",label:"README"}]:[],e[20]=a,e[21]=S):S=e[21],A=[_,...b,...T,...P,...i?(f||[]).map(Oe):[],...S],e[13]=f,e[14]=a,e[15]=i,e[16]=b,e[17]=T,e[18]=P,e[19]=A}else A=e[19];const B=A,m=B.some(S=>S.id===l)?l:"settings";let O;e[22]!==K?(O=S=>{K({search:U=>({...U,tab:S}),replace:!0})},e[22]=K,e[23]=O):O=e[23];const E=O;let M;e[24]!==f?(M=f||[],e[24]=f,e[25]=M):M=e[25];let D;if(e[26]!==m||e[27]!==M){let S;e[29]!==m?(S=U=>U.name===m,e[29]=m,e[30]=S):S=e[30],D=M.find(S),e[26]=m,e[27]=M,e[28]=D}else D=e[28];const $=D;let I;e[31]!==L.history?(I=()=>L.history.back(),e[31]=L.history,e[32]=I):I=e[32];let R;e[33]!==m||e[34]!==E||e[35]!==B?(R=o.jsx(be,{children:o.jsx(ge,{tabs:B,activeTab:m,onTabChange:E})}),e[33]=m,e[34]=E,e[35]=B,e[36]=R):R=e[36];let c;e[37]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Y,{size:32,className:"animate-spin text-muted-foreground"})}),e[37]=c):c=e[37];let C;e[38]!==$||e[39]!==m||e[40]!==p.isServerError||e[41]!==p.supportsOAuth||e[42]!==r||e[43]!==n||e[44]!==E||e[45]!==a||e[46]!==i||e[47]!==g||e[48]!==j||e[49]!==s||e[50]!==N||e[51]!==w||e[52]!==V?(C=o.jsx(z.Suspense,{fallback:c,children:m==="tools"?o.jsx(Ue,{tools:r.tools??void 0,connectionId:n,org:s}):m==="prompts"?o.jsx(Re,{prompts:N,connectionId:n,org:s}):m==="resources"?o.jsx(Be,{resources:V,connectionId:n,org:s}):m==="settings"?o.jsx(pe,{connection:r,onUpdate:j,isUpdating:g,isMCPAuthenticated:i,supportsOAuth:p.supportsOAuth,isServerError:p.isServerError,onViewReadme:a?()=>E("readme"):void 0}):m==="readme"&&a?o.jsx(ke,{repository:w}):$&&i?o.jsx(ye,{connectionId:n,org:s,activeCollection:$},m):o.jsx(F,{title:"Collection not found",description:"This collection may have been deleted or you may not have access."})}),e[38]=$,e[39]=m,e[40]=p.isServerError,e[41]=p.supportsOAuth,e[42]=r,e[43]=n,e[44]=E,e[45]=a,e[46]=i,e[47]=g,e[48]=j,e[49]=s,e[50]=N,e[51]=w,e[52]=V,e[53]=C):C=e[53];let v;e[54]!==m||e[55]!==C?(v=o.jsx("div",{className:"flex h-full w-full bg-background overflow-hidden",children:o.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-auto",children:o.jsx(X,{children:C},m)})}),e[54]=m,e[55]=C,e[56]=v):v=e[56];let x;return e[57]!==I||e[58]!==R||e[59]!==v?(x=o.jsxs(je,{onBack:I,children:[R,v]}),e[57]=I,e[58]=R,e[59]=v,e[60]=x):x=e[60],x}function Oe(t){return{id:t.name,label:t.displayName}}function ze(){const t=q.c(29);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/mcps/$connectionId"},t[0]=e):e=t[0];const r=W(e);let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/mcps/$connectionId"},t[1]=n):n=t[1];const{connectionId:s,org:l}=ce(n);let f;t[2]===Symbol.for("react.memo_cache_sentinel")?(f={from:"/shell/$org/mcps/$connectionId"},t[2]=f):f=t[2];const g=le(f).tab||"settings",N=G(s),V=me(),L=de(N??void 0);let u;t[3]!==s?(u=[s],t[3]=s,t[4]=u):u=t[4];const{promptsMap:K}=fe(u);let y;t[5]!==s?(y=[s],t[5]=s,t[6]=y):y=t[6];const{resourcesMap:p}=he(y);let i;t[7]!==s||t[8]!==K?(i=K.get(s)??[],t[7]=s,t[8]=K,t[9]=i):i=t[9];const w=i;let a;t[10]!==s||t[11]!==p?(a=p.get(s)??[],t[10]=s,t[11]=p,t[12]=a):a=t[12];const h=a;let k;t[13]!==V.update||t[14]!==s?(k=async b=>{await V.update.mutateAsync({id:s,data:b})},t[13]=V.update,t[14]=s,t[15]=k):k=t[15];const d=k;if(!N){let b;return t[16]!==r||t[17]!==l?(b=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(F,{title:"Connection not found",description:"This connection may have been deleted or you may not have access.",actions:o.jsx(xe,{variant:"outline",onClick:()=>r({to:"/$org/mcps",params:{org:l}}),children:"Back to connections"})})}),t[16]=r,t[17]=l,t[18]=b):b=t[18],b}let _;return t[19]!==V.update.isPending||t[20]!==L||t[21]!==N||t[22]!==s||t[23]!==d||t[24]!==l||t[25]!==w||t[26]!==g||t[27]!==h?(_=o.jsx(Ke,{org:l,connection:N,connectionId:s,requestedTabId:g,collections:L,onUpdate:d,isUpdating:V.update.isPending,prompts:w,resources:h}),t[19]=V.update.isPending,t[20]=L,t[21]=N,t[22]=s,t[23]=d,t[24]=l,t[25]=w,t[26]=g,t[27]=h,t[28]=_):_=t[28],_}function qe(){const t=q.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(X,{children:o.jsx(z.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:o.jsx(Y,{size:32,className:"animate-spin text-muted-foreground"})}),children:o.jsx(ze,{})})}),t[0]=e):e=t[0],e}function so(){const t=q.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(qe,{}),t[0]=e):e=t[0],e}export{so as default};
|