@decocms/mesh 2.114.5 → 2.115.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-D4527ICU.js → AlertCircle-DiL2HrFE.js} +1 -1
- package/dist/client/assets/{AlertOctagon-COPWzaf0.js → AlertOctagon-2d8rAOd4.js} +1 -1
- package/dist/client/assets/{AlertTriangle-DCH5pYxh.js → AlertTriangle-VgUX_bsB.js} +1 -1
- package/dist/client/assets/{ArrowLeft-LkHGsmHm.js → ArrowLeft-Br1qiDir.js} +1 -1
- package/dist/client/assets/{ArrowUp-CDfQ8pyb.js → ArrowUp-BjfCYJa6.js} +1 -1
- package/dist/client/assets/{Check-CjRTK1W3.js → Check-B14Bp2E0.js} +1 -1
- package/dist/client/assets/{CheckCircle-D8HwQ_vF.js → CheckCircle-qs5k2cFp.js} +1 -1
- package/dist/client/assets/{CheckDone01-03ijxcax.js → CheckDone01-COU71F1q.js} +1 -1
- package/dist/client/assets/{CheckVerified02-CtD1r3r9.js → CheckVerified02-C_h0QKPV.js} +1 -1
- package/dist/client/assets/{ChevronDown-_RktpP9c.js → ChevronDown-DmZAA_RH.js} +1 -1
- package/dist/client/assets/{ChevronRight-CXCT1lCM.js → ChevronRight-IL2oOJI2.js} +1 -1
- package/dist/client/assets/{Clock-Bmdb1TRN.js → Clock-BeB-7xuQ.js} +1 -1
- package/dist/client/assets/{Code01-7zAo2TKF.js → Code01-DnUALMy9.js} +1 -1
- package/dist/client/assets/{Container-CX-RbvCV.js → Container-BGGgIzJh.js} +1 -1
- package/dist/client/assets/{Copy01-DH2d5VIk.js → Copy01-BZzZvWHY.js} +1 -1
- package/dist/client/assets/{Dataflow03-C0pv0bfM.js → Dataflow03-BnILNUas.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-idJQgrR0.js → DotsHorizontal-C1qTqyiq.js} +1 -1
- package/dist/client/assets/{DotsVertical-CeT-zlQ9.js → DotsVertical-B-SoXTlv.js} +1 -1
- package/dist/client/assets/{Download01-C6sOPnkz.js → Download01-CW2ve7I5.js} +1 -1
- package/dist/client/assets/{Edit01-LXqrrmB1.js → Edit01-CA_byL8x.js} +1 -1
- package/dist/client/assets/{Eye-VVPfHR4D.js → Eye-DuHzxuzN.js} +1 -1
- package/dist/client/assets/{File02-7lPfhcb8.js → File02-HWzOQAS5.js} +1 -1
- package/dist/client/assets/{File06-BMp646T6.js → File06-6ostm09J.js} +1 -1
- package/dist/client/assets/{FilterLines-BHBNEtwf.js → FilterLines-n9w8nbRb.js} +1 -1
- package/dist/client/assets/{Globe01-Kkx6XQlj.js → Globe01-C7OLr5gu.js} +1 -1
- package/dist/client/assets/{Globe02-BqaVWXob.js → Globe02-DCQdCg-U.js} +1 -1
- package/dist/client/assets/{Grid01-BHI_ERnP.js → Grid01--gwdVXxp.js} +1 -1
- package/dist/client/assets/{Hash02-CgVI0A1g.js → Hash02-B3ztCRZG.js} +1 -1
- package/dist/client/assets/{Home02-BTAwhHo8.js → Home02-5xEMThw1.js} +1 -1
- package/dist/client/assets/{Image01-CC_Iyvd-.js → Image01-CHvGzt2y.js} +1 -1
- package/dist/client/assets/{Inbox01-C0b_GP1p.js → Inbox01-D__eEiRp.js} +1 -1
- package/dist/client/assets/{InfoCircle-DuvmlJAv.js → InfoCircle-BaJSxaGK.js} +1 -1
- package/dist/client/assets/{Key01-DCtZGi5S.js → Key01-CAUAOxiV.js} +1 -1
- package/dist/client/assets/{LinkExternal01-B_y3HiQu.js → LinkExternal01-UC_M5qWQ.js} +1 -1
- package/dist/client/assets/{List-BM1ULKxF.js → List-BJooyaoM.js} +1 -1
- package/dist/client/assets/{Loading01-1snKai6N.js → Loading01-1Zu_WpPr.js} +1 -1
- package/dist/client/assets/{Lock01-C6ZOoLqK.js → Lock01-DPYIJ_nA.js} +1 -1
- package/dist/client/assets/{Pin01-DpYa83SH.js → Pin01-DJanT9uS.js} +1 -1
- package/dist/client/assets/{Play-CgqvBg2y.js → Play-CahYnURS.js} +1 -1
- package/dist/client/assets/{Plus-DP2vmrEk.js → Plus-CRFHrfK2.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-CYXSIN1J.js → RefreshCcw01-DuNb9sh9.js} +1 -1
- package/dist/client/assets/{RefreshCw01-nnfUzBDg.js → RefreshCw01-CppBn3YV.js} +1 -1
- package/dist/client/assets/{Rows03-DWahBVYP.js → Rows03-CjT39fIX.js} +1 -1
- package/dist/client/assets/{Save01-Bqg14Jsn.js → Save01-_XMAksec.js} +1 -1
- package/dist/client/assets/{SearchMd-DrKsMuei.js → SearchMd-CZA5t4_M.js} +1 -1
- package/dist/client/assets/{Settings01-DJTSpTEO.js → Settings01-CmfD9-kk.js} +1 -1
- package/dist/client/assets/{Share07-E1brkTmr.js → Share07-tPlC5hop.js} +1 -1
- package/dist/client/assets/{Shield01-Cpp9zCrW.js → Shield01-BTe6K6H4.js} +1 -1
- package/dist/client/assets/{Terminal-BsKlphFd.js → Terminal-JVvp8Qza.js} +1 -1
- package/dist/client/assets/{Tool01-NJWs-WhI.js → Tool01-BY8zBv5Q.js} +1 -1
- package/dist/client/assets/{Trash01-lACkPNMB.js → Trash01-uafi7Ilf.js} +1 -1
- package/dist/client/assets/{Upload01-Daxvc3MZ.js → Upload01-j9dbqfwl.js} +1 -1
- package/dist/client/assets/{Users03-NwL7-0U5.js → Users03-DcEKYrkA.js} +1 -1
- package/dist/client/assets/{XCircle-BI-IxNLe.js → XCircle-BUqdRo4A.js} +1 -1
- package/dist/client/assets/{XClose-BAk7dT8G.js → XClose-BmynBvu4.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-CAewQIAH.js → agent-connections-preview-PbH9WU_0.js} +1 -1
- package/dist/client/assets/agent-detail-Cq0CB4eM.js +1 -0
- package/dist/client/assets/agents-6ayYcmP9.js +1 -0
- package/dist/client/assets/alert-dialog-BXLdEhYw.js +7 -0
- package/dist/client/assets/{auth-catchall-GmhyR443.js → auth-catchall-BmN6aGyF.js} +1 -1
- package/dist/client/assets/{avatar-CtRXPznJ.js → avatar-Bc7s3LEL.js} +1 -1
- package/dist/client/assets/{badge-CjnLH2lI.js → badge-D4AHLMOm.js} +1 -1
- package/dist/client/assets/{binder-Dt_u4Ovx.js → binder-c0e82ZKj.js} +1 -1
- package/dist/client/assets/{breadcrumb-LjVmMbX-.js → breadcrumb-DM1tOdpW.js} +1 -1
- package/dist/client/assets/{button-B5dhenVQ.js → button-DlMEAXru.js} +1 -1
- package/dist/client/assets/{card-BMSXwRZK.js → card-BJlwqw9P.js} +1 -1
- package/dist/client/assets/{checkbox-B3V3lNLc.js → checkbox-2ZZDRGKg.js} +1 -1
- package/dist/client/assets/{circle-alert-B6KuKG9n.js → circle-alert-BU4aPU4k.js} +1 -1
- package/dist/client/assets/{collection-detail-D3hf0Jbk.js → collection-detail-CcvsZ6SX.js} +2 -2
- package/dist/client/assets/{collection-tab-BOEDXnQR.js → collection-tab-D1U8qcC9.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-aNY90kKS.js → collection-table-wrapper-CTR1SyIy.js} +1 -1
- package/dist/client/assets/{collection-tabs-BO5PAHk4.js → collection-tabs-DX49JXWl.js} +1 -1
- package/dist/client/assets/{command-yCoqBOON.js → command-CZie2XvG.js} +1 -1
- package/dist/client/assets/{connect-CQwVcgEv.js → connect-BuwxUgJG.js} +1 -1
- package/dist/client/assets/{connection-card-BhlZU1pr.js → connection-card-CI7L8iKE.js} +1 -1
- package/dist/client/assets/connection-detail-CRaZ-Ye2.js +1 -0
- package/dist/client/assets/connections-B0wIwXTZ.js +1 -0
- package/dist/client/assets/constants-4GzD41KM.js +1 -0
- package/dist/client/assets/constants-PL5hL4qd.js +1 -0
- package/dist/client/assets/{create-organization-dialog-DutMRH55.js → create-organization-dialog-CfW7SB8o.js} +1 -1
- package/dist/client/assets/{create-project-dialog-DRsHceJD.js → create-project-dialog-dfuHufiJ.js} +1 -1
- package/dist/client/assets/dialog-Cwnz3LEA.js +1 -0
- package/dist/client/assets/dropdown-menu-BJqdu9io.js +1 -0
- package/dist/client/assets/dynamic-plugin-layout-aRox8LyK.js +1 -0
- package/dist/client/assets/{empty-state-C2LxutXw.js → empty-state-BkmlXyqb.js} +1 -1
- package/dist/client/assets/{empty-state-DNFU252E.js → empty-state-BlBaHJ3u.js} +1 -1
- package/dist/client/assets/{env-vars-editor-CqAf8U3A.js → env-vars-editor-qzHFuA5w.js} +1 -1
- package/dist/client/assets/{error-boundary-BmYrMabK.js → error-boundary-Dk3_bHxS.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BRcwDsGF.js → extract-connection-data-Cl1h0kax.js} +1 -1
- package/dist/client/assets/{file-browser-CvXUou5l.js → file-browser-BpuuoaOY.js} +2 -2
- package/dist/client/assets/form-B3bK9lhs.js +1 -0
- package/dist/client/assets/{grid-view-CRcbOk5V.js → grid-view-tbrO-yA3.js} +1 -1
- package/dist/client/assets/{home-7gGufnUB.js → home-DEEFTVc1.js} +1 -1
- package/dist/client/assets/{index-x_TnqT5B.js → index-1CQrZ9Zl.js} +1 -1
- package/dist/client/assets/{index-DbAkcs1f.js → index-2jF2yJ2o.js} +1 -1
- package/dist/client/assets/{index-C8kkzFPl.js → index-BPtZHCt5.js} +2 -2
- package/dist/client/assets/index-CeXKeP7Z.js +1 -0
- package/dist/client/assets/{index-CGZdgHcu.js → index-DGrxQVii.js} +1 -1
- package/dist/client/assets/{index-BTp0980Q.js → index-DjF4GflS.js} +1 -1
- package/dist/client/assets/{index-DWibhftK.js → index-MzZr0KB3.js} +1 -1
- package/dist/client/assets/index-Pglfh9Lp.css +1 -0
- package/dist/client/assets/{index-Bunb17vv.js → index-oUlshpJJ.js} +30 -30
- package/dist/client/assets/{infiniteQueryObserver-BXks7odB.js → infiniteQueryObserver-CzTbTGuU.js} +1 -1
- package/dist/client/assets/{input-Mr1OFJyo.js → input-BTxNeBOO.js} +1 -1
- package/dist/client/assets/{integration-icon-D9Lac1Wz.js → integration-icon-CTPrN73-.js} +1 -1
- package/dist/client/assets/{label-BG1T_p3q.js → label-bLbRV7ZJ.js} +1 -1
- package/dist/client/assets/{layout-D99bjGJH.js → layout-D-svMqBO.js} +1 -1
- package/dist/client/assets/{localstorage-keys-COeOMfeR.js → localstorage-keys-z-WZ22Zi.js} +1 -1
- package/dist/client/assets/{login-JX4XQrOX.js → login-D0xu4-Fa.js} +1 -1
- package/dist/client/assets/{markdown-DmUzq0fW.js → markdown-CgNryeyO.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D6uou3Tk.js → mcp-oauth-Dj71M6pS.js} +1 -1
- package/dist/client/assets/{mcp-server-card-DcmKpSBn.js → mcp-server-card-Bc5AS-wf.js} +1 -1
- package/dist/client/assets/mcp-server-detail-D02AsVR7.js +2 -0
- package/dist/client/assets/members-EmtbbMjC.js +3 -0
- package/dist/client/assets/{monitoring-CUWH3-yc.js → monitoring-C-93CV4C.js} +1 -1
- package/dist/client/assets/monitoring-dashboard-edit-Bdp6e51N.js +1 -0
- package/dist/client/assets/{monitoring-dashboard-view-BpqD12ZC.js → monitoring-dashboard-view-Bx7z2_z0.js} +2 -2
- package/dist/client/assets/{oauth-callback-CA72LutH.js → oauth-callback-CkkG9d7v.js} +1 -1
- package/dist/client/assets/page-BGugjR0I.js +1 -0
- package/dist/client/assets/page-ITQU-Zp8.js +1 -0
- package/dist/client/assets/{plugin-empty-state-CQXNVuX5.js → plugin-empty-state-AgNFTQ0u.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-WYiH6sc2.js → plugin-empty-state-DlghdeMy.js} +1 -1
- package/dist/client/assets/{plugin-header-B84nx02H.js → plugin-header-BiKI-0GN.js} +1 -1
- package/dist/client/assets/{plugin-header-BHGQDET9.js → plugin-header-DxI4kgNA.js} +1 -1
- package/dist/client/assets/{popover-D1pzNMOP.js → popover-DK0-mkfJ.js} +1 -1
- package/dist/client/assets/project-layout-ClSoqo8C.js +1 -0
- package/dist/client/assets/projects-list-78EdWnMz.js +1 -0
- package/dist/client/assets/ranking-layout-BipS-5d4.js +1 -0
- package/dist/client/assets/{readme-viewer-DatdJZvZ.js → readme-viewer-CYVu4zA3.js} +1 -1
- package/dist/client/assets/{registry-layout-BUPa9s1k.js → registry-layout-DuUFYDsK.js} +3 -3
- package/dist/client/assets/{registry-utils-qr99zc3y.js → registry-utils-BJco7Nso.js} +1 -1
- package/dist/client/assets/{reports-layout-BEeAVx6X.js → reports-layout-DWL4B4XL.js} +2 -2
- package/dist/client/assets/{reset-password-B7QTemHG.js → reset-password-C7TFy7aQ.js} +1 -1
- package/dist/client/assets/{resizable-DVFWStNI.js → resizable-zYSMb8PO.js} +1 -1
- package/dist/client/assets/{save-actions-C1hqEO2Q.js → save-actions-BdnWXMVf.js} +1 -1
- package/dist/client/assets/{scroll-area-B96z0OJW.js → scroll-area-30X2y975.js} +1 -1
- package/dist/client/assets/select-Duopl7P2.js +1 -0
- package/dist/client/assets/shell-layout-CI23YHUg.js +3 -0
- package/dist/client/assets/skeleton-CmCa76Pe.js +1 -0
- package/dist/client/assets/{spinner-IfgQRFqp.js → spinner--6L1PAKk.js} +1 -1
- package/dist/client/assets/{store-invite-BhzFqpM6.js → store-invite-DNBT5DzD.js} +1 -1
- package/dist/client/assets/{switch-DGp6vNcC.js → switch-CzMTfJyd.js} +1 -1
- package/dist/client/assets/{table-CMMXy5Nr.js → table-DPbr8gQl.js} +1 -1
- package/dist/client/assets/tasks-CqaWmm56.js +1 -0
- package/dist/client/assets/{textarea-BmDkS1nd.js → textarea-BNPURYr9.js} +1 -1
- package/dist/client/assets/{time-range-picker-TrkvnH9b.js → time-range-picker-C-sEn-dP.js} +1 -1
- package/dist/client/assets/{toggle-group-BX6pY9Pe.js → toggle-group-bVqu9tww.js} +1 -1
- package/dist/client/assets/{tools-list-De4BYXHg.js → tools-list-D2XTdfAR.js} +1 -1
- package/dist/client/assets/tooltip-BnwJ5PQp.js +1 -0
- package/dist/client/assets/{topbar-portal-AI9OKodd.js → topbar-portal-CrFEl7XT.js} +1 -1
- package/dist/client/assets/{typewriter-title-BtVgakQ8.js → typewriter-title-Dh7JaY-s.js} +1 -1
- package/dist/client/assets/{use-binding-B9wXdfeU.js → use-binding-CSl5A5cE.js} +1 -1
- package/dist/client/assets/{use-connection-CP6jP6nm.js → use-connection-CJPryUMd.js} +1 -1
- package/dist/client/assets/{use-copy-0wW0qGhT.js → use-copy-DELXo_w6.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Cywd7YYe.js → use-create-virtual-mcp-CEbxqW61.js} +1 -1
- package/dist/client/assets/use-deco-chat-open-Bj4jxMD7.js +23 -0
- package/dist/client/assets/{use-install-from-registry-CiGE-z-O.js → use-install-from-registry-Vj4wJ4IH.js} +1 -1
- package/dist/client/assets/{use-list-state-D5zjpWht.js → use-list-state-cJ107QPf.js} +1 -1
- package/dist/client/assets/{use-llm-C4Bry7oS.js → use-llm-us82LJMh.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BKi3cw-d.js → use-mcp-prompts-Sqkswu5s.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Cr0Y8gRI.js → use-mcp-tools-Dj4ni5D7.js} +1 -1
- package/dist/client/assets/use-mobile-EmqlWdQN.js +1 -0
- package/dist/client/assets/{use-organization-settings-CcELpryj.js → use-organization-settings-CMrztk0j.js} +1 -1
- package/dist/client/assets/{use-project-C6-m-oFo.js → use-project-BYeZMfFI.js} +1 -1
- package/dist/client/assets/use-settings-modal-tvp-XYtD.js +1 -0
- package/dist/client/assets/use-view-mode-Dg_d9_Oy.js +1 -0
- package/dist/client/assets/{use-virtual-mcp-XvCSSoaL.js → use-virtual-mcp-BzAB1Jwk.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DS7Rp5Du.js +1 -0
- package/dist/client/assets/{useMutation-BOvwy9IK.js → useMutation-kpLmB8S8.js} +1 -1
- package/dist/client/assets/useQuery-Do4lYH9e.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-8nf2pI1w.js +1 -0
- package/dist/client/assets/workflow-DbuBBxB5.js +1 -0
- package/dist/client/index.html +2 -2
- package/package.json +1 -1
- package/dist/client/assets/agent-detail-BJ7e6hVZ.js +0 -1
- package/dist/client/assets/agents-BayHH4eE.js +0 -1
- package/dist/client/assets/alert-dialog-DXvpuu2v.js +0 -7
- package/dist/client/assets/connection-detail-qYhiAtw2.js +0 -1
- package/dist/client/assets/connections-B8mrWQPE.js +0 -1
- package/dist/client/assets/constants-CvNkH2U9.js +0 -1
- package/dist/client/assets/constants-DPkAIN6Z.js +0 -1
- package/dist/client/assets/dialog-D2hO-7NL.js +0 -1
- package/dist/client/assets/dropdown-menu-DTV9aWPi.js +0 -1
- package/dist/client/assets/dynamic-plugin-layout-Bo1D4pyt.js +0 -1
- package/dist/client/assets/form-DTE57Ssv.js +0 -1
- package/dist/client/assets/index-Fc-7NN6M.js +0 -1
- package/dist/client/assets/index-QsCquYg-.css +0 -1
- package/dist/client/assets/index-wFCrgWrj.js +0 -1
- package/dist/client/assets/mcp-server-detail-RQTYqb1-.js +0 -2
- package/dist/client/assets/members-BeOTjUuL.js +0 -3
- package/dist/client/assets/monitoring-dashboard-edit-B2Vjinzp.js +0 -1
- package/dist/client/assets/page-CUSTLK_m.js +0 -1
- package/dist/client/assets/page-CvZFXv7u.js +0 -1
- package/dist/client/assets/project-layout-C8NT4ALB.js +0 -1
- package/dist/client/assets/project-settings-Cha270fD.js +0 -1
- package/dist/client/assets/projects-list-CcpUdUj6.js +0 -1
- package/dist/client/assets/ranking-layout-BGN2gmsx.js +0 -1
- package/dist/client/assets/select-DltKl0vA.js +0 -1
- package/dist/client/assets/shell-layout-BEAbkctA.js +0 -3
- package/dist/client/assets/tasks-DjEN_dgb.js +0 -1
- package/dist/client/assets/tooltip-BOvHNvKx.js +0 -1
- package/dist/client/assets/use-deco-chat-open-Jl2cvCiJ.js +0 -23
- package/dist/client/assets/use-view-mode-qnYxn17S.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BA8HdwgM.js +0 -1
- package/dist/client/assets/useQuery-Bp4CuU6A.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CYNigxjg.js +0 -1
- package/dist/client/assets/workflow-WgVMIyEN.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as N,c as we,e as Te,j as t,u as Ee,y as Me,m as Re,K as ve,aE as ze,t as pe}from"./index-oUlshpJJ.js";import{E as Ae}from"./error-boundary-Dk3_bHxS.js";import{h as Le}from"./use-connection-CJPryUMd.js";import{u as Oe,a as We}from"./constants-4GzD41KM.js";import{B as re}from"./button-DlMEAXru.js";import{I as le}from"./input-BTxNeBOO.js";import{I as ke}from"./integration-icon-CTPrN73-.js";import{C as $e}from"./checkbox-2ZZDRGKg.js";import{b as Ve,P as Ue,a as Ge}from"./popover-DK0-mkfJ.js";import{t as Fe}from"./ChevronDown-DmZAA_RH.js";import{S as je,a as be,b as ye,c as Ne,d as w,n as He}from"./select-Duopl7P2.js";import{s as Ke}from"./Hash02-B3ztCRZG.js";import{i as qe}from"./Play-CahYnURS.js";import{s as Qe}from"./Plus-CRFHrfK2.js";import{s as Ie}from"./RefreshCw01-CppBn3YV.js";import{s as Je}from"./Trash01-uafi7Ilf.js";import{T as Ye,a as Se}from"./toggle-group-bVqu9tww.js";import{a as Ze,V as Xe}from"./layout-D-svMqBO.js";import{S as et}from"./save-actions-BdnWXMVf.js";import{B as tt,a as st,b as Pe,d as rt,e as lt,c as at}from"./breadcrumb-DM1tOdpW.js";import"./AlertTriangle-VgUX_bsB.js";import"./useMutation-kpLmB8S8.js";import"./Container-BGGgIzJh.js";import"./Check-B14Bp2E0.js";import"./index-CeXKeP7Z.js";import"./use-mobile-EmqlWdQN.js";import"./tooltip-BnwJ5PQp.js";import"./Save01-_XMAksec.js";import"./Loading01-1Zu_WpPr.js";import"./ChevronRight-IL2oOJI2.js";const Be=({size:l=24,color:e="currentColor",...s})=>N.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},N.createElement("path",{d:"M16 10H3m17-4H3m17 8H3m13 4H3"}));Be.displayName="AlignLeft";const _e=({size:l=24,color:e="currentColor",...s})=>N.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},N.createElement("path",{d:"M8 15v2m4-6v6m4-10v10m-8.2 4h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.72 21 17.88 21 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 3 17.88 3 16.2 3H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21Z"}));_e.displayName="BarChartSquare02";function De(l){return{id:l.id,name:l.name,type:l.type,sourcePath:l.source.path,sourceFrom:l.source.from,aggregationFn:l.aggregation.fn,groupBy:l.aggregation.groupBy||"",interval:l.aggregation.interval||""}}function it(l){return{id:l.id,name:l.name,type:l.type,source:{path:l.sourcePath,from:l.sourceFrom},aggregation:{fn:l.aggregationFn,groupBy:l.type==="table"&&l.groupBy?l.groupBy:void 0,interval:l.type==="timeseries"&&l.interval?l.interval:void 0}}}const Ce={id:crypto.randomUUID(),name:"",type:"metric",sourcePath:"$.usage.total_tokens",sourceFrom:"output",aggregationFn:"sum",groupBy:"",interval:""};function nt(l){const e=we.c(36),{result:s,widget:o}=l;if(s.error){let i;return e[0]!==s.error?(i=t.jsx("div",{className:"text-sm text-destructive bg-destructive/10 rounded p-3",children:s.error}),e[0]=s.error,e[1]=i):i=e[1],i}if(o.type==="metric"){const i=s.value??0;let d;e[2]!==i?(d=i>=1e6?`${(i/1e6).toFixed(2)}M`:i>=1e3?`${(i/1e3).toFixed(2)}K`:typeof i=="number"?i.toFixed(2):String(i),e[2]=i,e[3]=d):d=e[3];const c=d;let m;e[4]!==c?(m=t.jsx("div",{className:"text-3xl font-bold tabular-nums",children:c}),e[4]=c,e[5]=m):m=e[5];const h=s.matchedRecords??0;let x;e[6]!==h?(x=t.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[h," records matched"]}),e[6]=h,e[7]=x):x=e[7];let f;return e[8]!==m||e[9]!==x?(f=t.jsxs("div",{className:"text-center py-4",children:[m,x]}),e[8]=m,e[9]=x,e[10]=f):f=e[10],f}if(o.type==="table"&&s.groups){let i;e[11]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("thead",{className:"bg-muted/50 sticky top-0",children:t.jsxs("tr",{children:[t.jsx("th",{className:"text-left px-3 py-1.5 text-xs font-medium",children:"Key"}),t.jsx("th",{className:"text-right px-3 py-1.5 text-xs font-medium",children:"Value"})]})}),e[11]=i):i=e[11];let d;e[12]!==s.groups?(d=s.groups.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:2,className:"px-3 py-4 text-center text-muted-foreground text-xs",children:"No data"})}):s.groups.slice(0,10).map(ct),e[12]=s.groups,e[13]=d):d=e[13];let c;e[14]!==d?(c=t.jsxs("table",{className:"w-full text-sm",children:[i,t.jsx("tbody",{children:d})]}),e[14]=d,e[15]=c):c=e[15];let m;e[16]!==s.groups.length?(m=s.groups.length>10&&t.jsxs("div",{className:"text-xs text-muted-foreground text-center py-2",children:["+",s.groups.length-10," more rows"]}),e[16]=s.groups.length,e[17]=m):m=e[17];let h;return e[18]!==c||e[19]!==m?(h=t.jsxs("div",{className:"max-h-[200px] overflow-auto",children:[c,m]}),e[18]=c,e[19]=m,e[20]=h):h=e[20],h}if(o.type==="timeseries"&&s.timeseries){let i;e[21]!==s.timeseries?(i=Math.max(...s.timeseries.map(ot),1),e[21]=s.timeseries,e[22]=i):i=e[22];const d=i;let c;if(e[23]!==d||e[24]!==s.timeseries){let f;e[26]!==d?(f=(u,S)=>t.jsx("div",{className:"flex-1 bg-primary/80 rounded-t",style:{height:`${u.value/d*100}%`,minHeight:u.value>0?"2px":"0px"},title:`${new Date(u.timestamp).toLocaleString()}: ${u.value}`},S),e[26]=d,e[27]=f):f=e[27],c=s.timeseries.slice(-24).map(f),e[23]=d,e[24]=s.timeseries,e[25]=c}else c=e[25];let m;e[28]!==c?(m=t.jsx("div",{className:"flex items-end gap-0.5 h-[80px]",children:c}),e[28]=c,e[29]=m):m=e[29];let h;e[30]!==s.timeseries.length?(h=t.jsxs("div",{className:"text-xs text-muted-foreground text-center mt-2",children:[s.timeseries.length," data points"]}),e[30]=s.timeseries.length,e[31]=h):h=e[31];let x;return e[32]!==m||e[33]!==h?(x=t.jsxs("div",{className:"py-2",children:[m,h]}),e[32]=m,e[33]=h,e[34]=x):x=e[34],x}let j;return e[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"text-sm text-muted-foreground text-center py-4",children:"No preview data"}),e[35]=j):j=e[35],j}function ot(l){return l.value}function ct(l,e){return t.jsxs("tr",{className:"border-t",children:[t.jsx("td",{className:"px-3 py-1.5 font-mono text-xs",children:l.key}),t.jsx("td",{className:"px-3 py-1.5 text-right tabular-nums text-xs",children:l.value.toLocaleString()})]},e)}function mt(l){const e=we.c(113),{widget:s,onChange:o,onRemove:j,canRemove:i,onMoveUp:d,onMoveDown:c,canMoveUp:m,canMoveDown:h,onPreview:x,previewResult:f,isPreviewing:u}=l,S=!m;let z;e[0]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(He,{size:14}),e[0]=z):z=e[0];let D;e[1]!==d||e[2]!==S?(D=t.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:d,disabled:S,children:z}),e[1]=d,e[2]=S,e[3]=D):D=e[3];const ae=!h;let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Fe,{size:14}),e[4]=g):g=e[4];let p;e[5]!==c||e[6]!==ae?(p=t.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:c,disabled:ae,children:g}),e[5]=c,e[6]=ae,e[7]=p):p=e[7];let k;e[8]!==D||e[9]!==p?(k=t.jsxs("div",{className:"flex items-center gap-0.5",children:[D,p]}),e[8]=D,e[9]=p,e[10]=k):k=e[10];let C;e[11]!==s.type?(C=t.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:s.type}),e[11]=s.type,e[12]=C):C=e[12];let F;e[13]!==s.name?(F=s.name&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted-foreground",children:"·"}),t.jsx("span",{className:"text-sm font-medium",children:s.name})]}),e[13]=s.name,e[14]=F):F=e[14];let B;e[15]!==k||e[16]!==C||e[17]!==F?(B=t.jsxs("div",{className:"flex items-center gap-2",children:[k,C,F]}),e[15]=k,e[16]=C,e[17]=F,e[18]=B):B=e[18];let P;e[19]!==u?(P=u?t.jsx(Ie,{size:14,className:"animate-spin"}):t.jsx(qe,{size:14}),e[19]=u,e[20]=P):P=e[20];let _;e[21]!==u||e[22]!==x||e[23]!==P?(_=t.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:x,disabled:u,children:P}),e[21]=u,e[22]=x,e[23]=P,e[24]=_):_=e[24];const A=!i,ie=i?"visible":"hidden";let T;e[25]!==ie?(T={visibility:ie},e[25]=ie,e[26]=T):T=e[26];let L;e[27]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(Je,{size:14}),e[27]=L):L=e[27];let E;e[28]!==j||e[29]!==A||e[30]!==T?(E=t.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:j,disabled:A,style:T,children:L}),e[28]=j,e[29]=A,e[30]=T,e[31]=E):E=e[31];let M;e[32]!==_||e[33]!==E?(M=t.jsxs("div",{className:"flex items-center gap-1",children:[_,E]}),e[32]=_,e[33]=E,e[34]=M):M=e[34];let R;e[35]!==B||e[36]!==M?(R=t.jsxs("div",{className:"flex items-center justify-between px-4 h-11 border-b bg-muted/30",children:[B,M]}),e[35]=B,e[36]=M,e[37]=R):R=e[37];let r;e[38]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Widget Name"}),e[38]=r):r=e[38];let a;e[39]!==o||e[40]!==s?(a=b=>o({...s,name:b.target.value}),e[39]=o,e[40]=s,e[41]=a):a=e[41];let n;e[42]!==a||e[43]!==s.name?(n=t.jsxs("div",{children:[r,t.jsx(le,{placeholder:"e.g., Total Tokens",value:s.name,onChange:a})]}),e[42]=a,e[43]=s.name,e[44]=n):n=e[44];let v;e[45]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Type"}),e[45]=v):v=e[45];let y;e[46]!==o||e[47]!==s?(y=b=>{b&&o({...s,type:b,groupBy:b==="table"?s.groupBy:"",interval:b==="timeseries"?s.interval||"1h":""})},e[46]=o,e[47]=s,e[48]=y):y=e[48];let I;e[49]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(Se,{value:"metric",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Metric",children:t.jsx(Ke,{size:14})}),e[49]=I):I=e[49];let O;e[50]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(Se,{value:"timeseries",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Timeseries",children:t.jsx(_e,{size:14})}),e[50]=O):O=e[50];let ne;e[51]===Symbol.for("react.memo_cache_sentinel")?(ne=t.jsx(Se,{value:"table",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Table",children:t.jsx(Be,{size:14})}),e[51]=ne):ne=e[51];let W;e[52]!==y||e[53]!==s.type?(W=t.jsxs("div",{children:[v,t.jsxs(Ye,{type:"single",variant:"outline",size:"sm",value:s.type,onValueChange:y,className:"w-full h-10",children:[I,O,ne]})]}),e[52]=y,e[53]=s.type,e[54]=W):W=e[54];let $;e[55]!==n||e[56]!==W?($=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n,W]}),e[55]=n,e[56]=W,e[57]=$):$=e[57];let oe;e[58]===Symbol.for("react.memo_cache_sentinel")?(oe=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"JSONPath Expression"}),e[58]=oe):oe=e[58];let V;e[59]!==o||e[60]!==s?(V=b=>o({...s,sourcePath:b.target.value}),e[59]=o,e[60]=s,e[61]=V):V=e[61];let U;e[62]!==V||e[63]!==s.sourcePath?(U=t.jsx(le,{placeholder:"$.usage.total_tokens",value:s.sourcePath,onChange:V,className:"font-mono text-sm"}),e[62]=V,e[63]=s.sourcePath,e[64]=U):U=e[64];let G;e[65]!==s.sourceFrom?(G=t.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Path to extract from tool call ",s.sourceFrom]}),e[65]=s.sourceFrom,e[66]=G):G=e[66];let H;e[67]!==U||e[68]!==G?(H=t.jsxs("div",{children:[oe,U,G]}),e[67]=U,e[68]=G,e[69]=H):H=e[69];let ce;e[70]===Symbol.for("react.memo_cache_sentinel")?(ce=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Extract From"}),e[70]=ce):ce=e[70];let K;e[71]!==o||e[72]!==s?(K=b=>o({...s,sourceFrom:b}),e[71]=o,e[72]=s,e[73]=K):K=e[73];let me;e[74]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(be,{children:t.jsx(ye,{})}),e[74]=me):me=e[74];let de;e[75]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsxs(Ne,{children:[t.jsx(w,{value:"output",children:"Output"}),t.jsx(w,{value:"input",children:"Input"})]}),e[75]=de):de=e[75];let q;e[76]!==K||e[77]!==s.sourceFrom?(q=t.jsxs("div",{children:[ce,t.jsxs(je,{value:s.sourceFrom,onValueChange:K,children:[me,de]})]}),e[76]=K,e[77]=s.sourceFrom,e[78]=q):q=e[78];let ue;e[79]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Aggregation"}),e[79]=ue):ue=e[79];let Q;e[80]!==o||e[81]!==s?(Q=b=>o({...s,aggregationFn:b}),e[80]=o,e[81]=s,e[82]=Q):Q=e[82];let he;e[83]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx(be,{children:t.jsx(ye,{})}),e[83]=he):he=e[83];let xe;e[84]===Symbol.for("react.memo_cache_sentinel")?(xe=t.jsxs(Ne,{children:[t.jsx(w,{value:"sum",children:"Sum"}),t.jsx(w,{value:"avg",children:"Average"}),t.jsx(w,{value:"min",children:"Minimum"}),t.jsx(w,{value:"max",children:"Maximum"}),t.jsx(w,{value:"count",children:"Count"}),t.jsx(w,{value:"last",children:"Last"})]}),e[84]=xe):xe=e[84];let J;e[85]!==Q||e[86]!==s.aggregationFn?(J=t.jsxs("div",{children:[ue,t.jsxs(je,{value:s.aggregationFn,onValueChange:Q,children:[he,xe]})]}),e[85]=Q,e[86]=s.aggregationFn,e[87]=J):J=e[87];let Y;e[88]!==q||e[89]!==J?(Y=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[q,J]}),e[88]=q,e[89]=J,e[90]=Y):Y=e[90];let Z;e[91]!==o||e[92]!==s?(Z=s.type==="table"&&t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Group By (JSONPath)"}),t.jsx(le,{placeholder:"$.model",value:s.groupBy,onChange:b=>o({...s,groupBy:b.target.value}),className:"font-mono text-sm"})]}),e[91]=o,e[92]=s,e[93]=Z):Z=e[93];let X;e[94]!==o||e[95]!==s?(X=s.type==="timeseries"&&t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Time Interval"}),t.jsxs(je,{value:s.interval||"1h",onValueChange:b=>o({...s,interval:b}),children:[t.jsx(be,{children:t.jsx(ye,{})}),t.jsxs(Ne,{children:[t.jsx(w,{value:"15m",children:"15 minutes"}),t.jsx(w,{value:"1h",children:"1 hour"}),t.jsx(w,{value:"1d",children:"1 day"})]})]})]}),e[94]=o,e[95]=s,e[96]=X):X=e[96];let ee;e[97]!==$||e[98]!==H||e[99]!==Y||e[100]!==Z||e[101]!==X?(ee=t.jsxs("div",{className:"space-y-4",children:[$,H,Y,Z,X]}),e[97]=$,e[98]=H,e[99]=Y,e[100]=Z,e[101]=X,e[102]=ee):ee=e[102];let fe;e[103]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx("div",{className:"px-3 py-2 border-b text-xs font-medium text-muted-foreground",children:"Preview (last 24h)"}),e[103]=fe):fe=e[103];let te;e[104]!==f||e[105]!==s?(te=t.jsxs("div",{className:"border rounded-lg bg-muted/20 flex flex-col",children:[fe,t.jsx("div",{className:"p-3 flex-1 flex items-center justify-center",children:f?t.jsx(nt,{result:f,widget:s}):t.jsx("div",{className:"text-sm text-muted-foreground text-center",children:'Click "Preview" to test your aggregation'})})]}),e[104]=f,e[105]=s,e[106]=te):te=e[106];let se;e[107]!==ee||e[108]!==te?(se=t.jsx("div",{className:"p-4",children:t.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[ee,te]})}),e[107]=ee,e[108]=te,e[109]=se):se=e[109];let ge;return e[110]!==R||e[111]!==se?(ge=t.jsxs("div",{className:"border rounded-lg bg-card overflow-hidden",children:[R,se]}),e[110]=R,e[111]=se,e[112]=ge):ge=e[112],ge}function dt({dashboardId:l}){const{org:e,project:s,locator:o}=Ee(),j=Me(),i=Oe({connectionId:We,orgId:e.id}),d=Le(),{data:c}=Re({queryKey:ve.monitoringDashboardDetails(o,l),queryFn:async()=>{if(!i)throw new Error("MCP client not available");const r=await i.callTool({name:"MONITORING_DASHBOARD_GET",arguments:{id:l}});return r.structuredContent??r}}),[m,h]=N.useState(c?.name??""),[x,f]=N.useState(c?.description??""),[u,S]=N.useState(c?.widgets?.map(De)??[{...Ce}]),[z,D]=N.useState(!1),[ae,g]=N.useState(!1),[p,k]=N.useState(c?.filters?.connectionIds??[]),[C,F]=N.useState(c?.filters?.toolNames?.[0]??""),[B,P]=N.useState({}),[_,A]=N.useState(new Set),ie=()=>{S([...u,{...Ce,id:crypto.randomUUID()}]),g(!0)},T=r=>{S(u.filter((a,n)=>n!==r)),g(!0)},L=(r,a)=>{const n=[...u];n[r]=a,S(n),g(!0),P(v=>{const y={...v};return delete y[a.id],y})},E=async r=>{if(i){A(a=>new Set(a).add(r.id));try{const a=new Date,n=new Date(a.getTime()-1440*60*1e3),v={};p.length>0&&(v.connectionIds=p),C.trim()&&(v.toolNames=[C.trim()]);const I=(await i.callTool({name:"MONITORING_WIDGET_PREVIEW",arguments:{widget:{type:r.type,source:{path:r.sourcePath,from:r.sourceFrom},aggregation:{fn:r.aggregationFn,groupBy:r.type==="table"&&r.groupBy?r.groupBy:void 0,interval:r.type==="timeseries"&&r.interval?r.interval:void 0},filter:Object.keys(v).length>0?v:void 0},timeRange:{startDate:n.toISOString(),endDate:a.toISOString()}}})).structuredContent;P(O=>({...O,[r.id]:{value:I?.value,groups:I?.groups,timeseries:I?.timeseries,matchedRecords:I?.matchedRecords??0}}))}catch(a){console.error("Preview failed:",a),P(n=>({...n,[r.id]:{error:"Preview failed. Check your JSONPath expression."}}))}finally{A(a=>{const n=new Set(a);return n.delete(r.id),n})}}},M=async()=>{if(i){if(!m.trim()){pe.error("Please enter a dashboard name");return}if(u.some(r=>!r.name.trim())){pe.error("Please enter a name for all widgets");return}D(!0);try{const r={};p.length>0&&(r.connectionIds=p),C.trim()&&(r.toolNames=[C.trim()]),await i.callTool({name:"MONITORING_DASHBOARD_UPDATE",arguments:{id:l,name:m.trim(),description:x.trim()||null,filters:Object.keys(r).length>0?r:null,widgets:u.map(it)}}),pe.success("Dashboard saved"),g(!1),j.invalidateQueries({queryKey:ve.monitoringDashboards(o)}),j.invalidateQueries({queryKey:ve.monitoringDashboardDetails(o,l)})}catch(r){pe.error("Failed to save dashboard"),console.error(r)}finally{D(!1)}}};if(!c)return t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Dashboard not found"});const R=t.jsx(tt,{children:t.jsxs(st,{children:[t.jsx(Pe,{children:t.jsx(rt,{asChild:!0,children:t.jsx(ze,{to:"/$org/$project/monitoring",params:{org:e.slug,project:s.slug},search:{tab:"dashboards"},children:"Monitoring"})})}),t.jsx(lt,{}),t.jsx(Pe,{children:t.jsxs(at,{children:["Edit ",c.name]})})]})});return t.jsxs(Ze,{breadcrumb:R,children:[t.jsx(Xe,{children:t.jsx(et,{onSave:M,onUndo:()=>{h(c?.name??""),f(c?.description??""),S(c?.widgets?.map(De)??[{...Ce}]),k(c?.filters?.connectionIds??[]),F(c?.filters?.toolNames?.[0]??""),g(!1)},isDirty:ae,isSaving:z})}),t.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:t.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Dashboard Name"}),t.jsx(le,{placeholder:"e.g., LLM Usage Overview",value:m,onChange:r=>{h(r.target.value),g(!0)}})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Description"}),t.jsx(le,{placeholder:"What does this dashboard show?",value:x,onChange:r=>{f(r.target.value),g(!0)}})]})]}),t.jsxs("div",{className:"border rounded-lg p-4 bg-muted/30",children:[t.jsxs("h2",{className:"text-sm font-medium mb-3",children:["Dashboard Filters",t.jsx("span",{className:"text-muted-foreground font-normal ml-2",children:"(applied to all widgets)"})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Servers"}),t.jsxs(Ve,{children:[t.jsx(Ue,{asChild:!0,children:t.jsxs(re,{variant:"outline",className:"w-full justify-between font-normal",children:[t.jsx("span",{className:"flex items-center gap-2 truncate",children:p.length===0?t.jsx("span",{className:"text-muted-foreground",children:"All servers"}):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"flex items-center -space-x-1",children:p.slice(0,3).map(r=>{const a=(d??[]).find(n=>n.id===r);return a?t.jsx(ke,{icon:a.icon,name:a.title||a.id,size:"xs"},r):null})}),t.jsxs("span",{children:[p.length," server",p.length!==1?"s":""]})]})}),t.jsx(Fe,{size:14,className:"text-muted-foreground shrink-0"})]})}),t.jsxs(Ge,{align:"start",className:"w-72 p-1",children:[t.jsx("div",{className:"max-h-[240px] overflow-y-auto",children:(d??[]).map(r=>{const a=p.includes(r.id);return t.jsxs("button",{type:"button",className:"flex items-center gap-3 w-full rounded-md px-2 py-2 text-sm hover:bg-muted transition-colors",onClick:()=>{k(n=>a?n.filter(v=>v!==r.id):[...n,r.id]),g(!0)},children:[t.jsx($e,{checked:a}),t.jsx(ke,{icon:r.icon,name:r.title||r.id,size:"xs"}),t.jsx("span",{className:"truncate",children:r.title||r.id})]},r.id)})}),p.length>0&&t.jsx("div",{className:"border-t p-1",children:t.jsx("button",{type:"button",className:"w-full text-xs text-muted-foreground hover:text-foreground py-1.5 transition-colors",onClick:()=>{k([]),g(!0)},children:"Clear selection"})})]})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Tool Name Filter"}),t.jsx(le,{placeholder:"e.g., openai_chat",value:C,onChange:r=>{F(r.target.value),g(!0)},className:"font-mono text-sm"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Filter to specific tool names (partial match)"})]})]})]}),t.jsxs("div",{className:"mt-12",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h2",{className:"text-lg font-medium",children:"Widgets"}),t.jsxs(re,{variant:"outline",size:"sm",onClick:ie,children:[t.jsx(Qe,{size:14,className:"mr-1.5"}),"Add Widget"]})]}),t.jsx("div",{className:"space-y-4",children:u.map((r,a)=>t.jsx(mt,{widget:r,onChange:n=>L(a,n),onRemove:()=>T(a),canRemove:u.length>1,onMoveUp:()=>{const n=[...u],v=n[a-1],y=n[a];n[a-1]=y,n[a]=v,S(n),g(!0)},onMoveDown:()=>{const n=[...u],v=n[a],y=n[a+1];n[a]=y,n[a+1]=v,S(n),g(!0)},canMoveUp:a>0,canMoveDown:a<u.length-1,onPreview:()=>E(r),previewResult:B[r.id]??null,isPreviewing:_.has(r.id)},r.id))})]})]})})]})}function $t(){const l=we.c(5);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},l[0]=e):e=l[0];const{dashboardId:s}=Te(e);let o;l[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboard editor"}),l[1]=o):o=l[1];let j;l[2]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ie,{size:24,className:"animate-spin text-muted-foreground"})}),l[2]=j):j=l[2];let i;return l[3]!==s?(i=t.jsx(Ae,{fallback:o,children:t.jsx(N.Suspense,{fallback:j,children:t.jsx(dt,{dashboardId:s})})}),l[3]=s,l[4]=i):i=l[4],i}export{$t as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as t,c as D,
|
|
1
|
+
import{r as $,j as t,c as D,y as xe,u as fe,m as ne,K as oe,aE as ge,e as pe,b as he}from"./index-oUlshpJJ.js";import{a as je,u as be}from"./constants-4GzD41KM.js";import{B as R}from"./button-DlMEAXru.js";import{p as ee,a as ce,s as ye,b as ve,e as me,i as Ne,T as we}from"./time-range-picker-C-sEn-dP.js";import{s as re}from"./RefreshCw01-CppBn3YV.js";import{E as ke}from"./error-boundary-Dk3_bHxS.js";import{V as Se,a as Ce}from"./layout-D-svMqBO.js";import{b as de,c as $e,d as Fe,e as Re,B as De,a as Te}from"./breadcrumb-DM1tOdpW.js";import{B as _e}from"./badge-D4AHLMOm.js";import{I as ue}from"./input-BTxNeBOO.js";import{b as Pe,P as Ie,a as Me}from"./popover-DK0-mkfJ.js";import{S as ze,a as Be,b as Ee,c as Oe,d as Ae}from"./select-Duopl7P2.js";import{T as Ke}from"./textarea-BNPURYr9.js";import{T as Le,a as Ve,b as qe}from"./tooltip-BnwJ5PQp.js";import{i as Qe}from"./Code01-DnUALMy9.js";import{i as We}from"./FilterLines-n9w8nbRb.js";import{c as Ge}from"./Grid01--gwdVXxp.js";import{s as He}from"./Plus-CRFHrfK2.js";import{s as Ye}from"./Trash01-uafi7Ilf.js";import{s as Ue}from"./XClose-BmynBvu4.js";import"./Check-B14Bp2E0.js";import"./Copy01-BZzZvWHY.js";import"./Download01-CW2ve7I5.js";import"./Key01-CAUAOxiV.js";import"./Play-CahYnURS.js";import"./scroll-area-30X2y975.js";import"./spinner--6L1PAKk.js";import"./ChevronDown-DmZAA_RH.js";import"./Clock-BeB-7xuQ.js";import"./ChevronRight-IL2oOJI2.js";import"./AlertTriangle-VgUX_bsB.js";import"./index-CeXKeP7Z.js";import"./use-mobile-EmqlWdQN.js";const Je=[{value:"eq",label:"equals"},{value:"contains",label:"contains"},{value:"in",label:"in (list)"},{value:"exists",label:"exists"}];function Xe({value:s,onChange:e}){const[r,i]=$.useState(!1),[l,n]=$.useState("raw"),[c,o]=$.useState(s),[m,d]=$.useState(ee(s)),g=$.useRef(s);g.current!==s&&(g.current=s,o(s),d(ee(s)));const f=()=>{e(c.filter(a=>a.key.trim()))},p=()=>{const a=ce(m);o(a),e(a)},j=()=>{if(l==="raw"){const a=ce(m);o(a),n("form")}else d(ee(c)),n("raw")},v=(a,x)=>{const u=[...c],h=u[a];h&&(u[a]={key:x.key??h.key,operator:x.operator??h.operator,value:x.value??h.value},o(u))},b=()=>{o([...c,{key:"",operator:"eq",value:""}])},w=a=>{const x=c.filter((u,h)=>h!==a);o(x),d(ee(x)),e(x.filter(u=>u.key.trim()))},y=()=>{o([]),d(""),e([]),i(!1)},k=s.filter(a=>a.key.trim()).length;return t.jsxs("div",{className:"flex items-center gap-1.5",children:[s.filter(a=>a.key.trim()).map((a,x)=>{const u=a.operator==="exists"?`${a.key}?`:a.operator==="contains"?`${a.key}~${a.value}`:a.operator==="in"?`${a.key}@${a.value}`:`${a.key}=${a.value}`;return t.jsxs(_e,{variant:"secondary",className:"gap-1 pl-2 pr-1 h-7 text-xs font-mono font-normal cursor-default",children:[u,t.jsx("button",{type:"button",className:"ml-0.5 rounded-full p-0.5 hover:bg-muted-foreground/20 transition-colors",onClick:()=>{const h=s.filter((C,F)=>F!==x);e(h)},children:t.jsx(Ue,{size:12})})]},`${a.key}-${x}`)}),t.jsxs(Pe,{open:r,onOpenChange:i,children:[t.jsx(Ie,{asChild:!0,children:t.jsxs(R,{variant:"outline",size:"sm",className:"h-7 px-2 gap-1.5",children:[t.jsx(We,{className:"h-3.5 w-3.5 text-muted-foreground"}),k===0?t.jsx("span",{className:"text-sm",children:"Filter"}):t.jsx("span",{className:"text-sm",children:k})]})}),t.jsxs(Me,{className:"w-[380px] p-4",align:"end",sideOffset:4,children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsx("h4",{className:"text-sm font-medium",children:"Property Filters"}),t.jsxs(Le,{children:[t.jsx(Ve,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:j,children:l==="raw"?t.jsx(Ge,{size:14}):t.jsx(Qe,{size:14})})}),t.jsx(qe,{children:l==="raw"?"Switch to form view":"Switch to raw text"})]})]}),l==="raw"?t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(Ke,{placeholder:`Paste property filters here:
|
|
2
2
|
thread_id=abc123
|
|
3
3
|
user~test
|
|
4
|
-
debug?`,value:m,onChange:a=>d(a.target.value),onBlur:p,onKeyDown:a=>{a.key==="Enter"&&a.metaKey&&p()},className:"font-mono text-sm min-h-[80px] resize-none"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["One per line:"," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key=value"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key~contains"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key@in_list"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key?"})]})]}):t.jsxs("div",{className:"space-y-3",children:[c.map((a,x)=>t.jsxs("div",{className:"p-2.5 rounded-md border border-border bg-muted/30 space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("span",{className:"text-xs text-muted-foreground",children:["Filter ",x+1]}),t.jsx(R,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>w(x),children:t.jsx(Ye,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(ue,{placeholder:"Key (e.g., thread_id)",value:a.key,onChange:u=>v(x,{key:u.target.value}),onBlur:f,onKeyDown:u=>{u.key==="Enter"&&f()},className:"flex-1 font-mono text-sm"}),t.jsxs(Me,{value:a.operator,onValueChange:u=>{const h=[...c],C=h[x];C&&(h[x]={...C,operator:u,value:u==="exists"?"":C.value},o(h),e(h.filter(F=>F.key.trim())))},children:[t.jsx(Be,{className:"w-28",children:t.jsx(Ee,{})}),t.jsx(Oe,{children:Je.map(u=>t.jsx(Ae,{value:u.value,children:u.label},u.value))})]})]}),a.operator!=="exists"&&t.jsx(ue,{placeholder:"Value",value:a.value,onChange:u=>v(x,{value:u.target.value}),onBlur:f,onKeyDown:u=>{u.key==="Enter"&&f()},className:"w-full font-mono text-sm"})]},x)),t.jsxs(R,{variant:"outline",size:"sm",className:"w-full",onClick:b,children:[t.jsx(He,{size:14,className:"mr-1.5"}),"Add filter"]})]}),k>0&&t.jsx(R,{variant:"ghost",size:"sm",className:"w-full mt-3 text-muted-foreground",onClick:y,children:"Clear all filters"})]})]})]})}function G(s,e){return e||Number.isInteger(s)?s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:s.toLocaleString():s>=1e6?`${(s/1e6).toFixed(2)}M`:s>=1e3?`${(s/1e3).toFixed(2)}K`:s.toFixed(2)}function ae(s){return{sum:"Total",avg:"Average",min:"Minimum",max:"Maximum",count:"Count",last:"Latest"}[s]??s}function le(s){const e=D.c(7),{name:r,subtitle:i}=s;let l;e[0]!==r?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:r}),e[0]=r,e[1]=l):l=e[1];let n;e[2]!==i?(n=t.jsx("div",{className:"text-xs text-muted-foreground",children:i}),e[2]=i,e[3]=n):n=e[3];let c;return e[4]!==l||e[5]!==n?(c=t.jsxs("div",{className:"px-4 py-3",children:[l,n]}),e[4]=l,e[5]=n,e[6]=c):c=e[6],c}function Ze(s){const e=D.c(13),{widget:r,result:i}=s,l=i?.value??0,n=r.aggregation.fn==="count",c=r.name;let o;e[0]!==r.aggregation.fn?(o=ae(r.aggregation.fn),e[0]=r.aggregation.fn,e[1]=o):o=e[1];let m;e[2]!==o||e[3]!==r.name?(m=t.jsx(le,{name:c,subtitle:o}),e[2]=o,e[3]=r.name,e[4]=m):m=e[4];let d;e[5]!==n||e[6]!==l?(d=G(l,n),e[5]=n,e[6]=l,e[7]=d):d=e[7];let g;e[8]!==d?(g=t.jsx("div",{className:"px-4 pb-4 mt-auto",children:t.jsx("div",{className:"text-4xl font-bold tabular-nums",children:d})}),e[8]=d,e[9]=g):g=e[9];let f;return e[10]!==m||e[11]!==g?(f=t.jsxs("div",{className:"border rounded-lg bg-card flex flex-col h-full",children:[m,g]}),e[10]=m,e[11]=g,e[12]=f):f=e[12],f}function et(s){const e=D.c(15),{widget:r,result:i}=s;let l,n;e[0]!==i?.groups?(l=i?.groups??[],n=Math.max(...l.map(tt),1),e[0]=i?.groups,e[1]=l,e[2]=n):(l=e[1],n=e[2]);const c=n;let o;e[3]!==r.aggregation.fn||e[4]!==r.aggregation.groupBy?(o=r.aggregation.groupBy?`Grouped by ${r.aggregation.groupBy}`:ae(r.aggregation.fn),e[3]=r.aggregation.fn,e[4]=r.aggregation.groupBy,e[5]=o):o=e[5];let m;e[6]!==o||e[7]!==r.name?(m=t.jsx(le,{name:r.name,subtitle:o}),e[6]=o,e[7]=r.name,e[8]=m):m=e[8];let d;e[9]!==l||e[10]!==c?(d=t.jsx("div",{className:"max-h-[300px] overflow-auto",children:l.length===0?t.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"No data available for this query"}):t.jsx("div",{className:"divide-y",children:l.map(f=>t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2",children:[t.jsx("span",{className:"text-sm truncate flex-1 min-w-0",children:f.key||"(empty)"}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 w-32",children:[t.jsx("div",{className:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden",children:t.jsx("div",{className:"h-full bg-primary rounded-full",style:{width:`${f.value/c*100}%`}})}),t.jsx("span",{className:"text-xs tabular-nums text-muted-foreground w-10 text-right",children:G(f.value,!0)})]})]},f.key))})}),e[9]=l,e[10]=c,e[11]=d):d=e[11];let g;return e[12]!==m||e[13]!==d?(g=t.jsxs("div",{className:"border rounded-lg bg-card overflow-hidden flex flex-col h-full",children:[m,d]}),e[12]=m,e[13]=d,e[14]=g):g=e[14],g}function tt(s){return s.value}function st(s){const e=D.c(37),{widget:r,result:i}=s;let l,n,c,o,m,d,g,f,p;if(e[0]!==i?.timeseries||e[1]!==r.aggregation.fn||e[2]!==r.aggregation.interval||e[3]!==r.name){p=i?.timeseries??[],n=Math.max(...p.map(at),1);const a=p.reduce(rt,0);l=r.aggregation.fn==="count",f="border rounded-lg bg-card overflow-hidden flex flex-col h-full",d="flex items-start justify-between pr-4";const x=r.name;let u;e[13]!==r.aggregation.fn?(u=ae(r.aggregation.fn),e[13]=r.aggregation.fn,e[14]=u):u=e[14];const h=`${u} per ${r.aggregation.interval}`;e[15]!==h||e[16]!==r.name?(g=t.jsx(le,{name:x,subtitle:h}),e[15]=h,e[16]=r.name,e[17]=g):g=e[17],m="text-right pt-3",c="text-lg font-semibold tabular-nums leading-tight",o=G(a,l),e[0]=i?.timeseries,e[1]=r.aggregation.fn,e[2]=r.aggregation.interval,e[3]=r.name,e[4]=l,e[5]=n,e[6]=c,e[7]=o,e[8]=m,e[9]=d,e[10]=g,e[11]=f,e[12]=p}else l=e[4],n=e[5],c=e[6],o=e[7],m=e[8],d=e[9],g=e[10],f=e[11],p=e[12];let j;e[18]!==c||e[19]!==o?(j=t.jsx("div",{className:c,children:o}),e[18]=c,e[19]=o,e[20]=j):j=e[20];let v;e[21]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"text-xs text-muted-foreground",children:"total"}),e[21]=v):v=e[21];let b;e[22]!==m||e[23]!==j?(b=t.jsxs("div",{className:m,children:[j,v]}),e[22]=m,e[23]=j,e[24]=b):b=e[24];let w;e[25]!==d||e[26]!==g||e[27]!==b?(w=t.jsxs("div",{className:d,children:[g,b]}),e[25]=d,e[26]=g,e[27]=b,e[28]=w):w=e[28];let y;e[29]!==l||e[30]!==n||e[31]!==p?(y=t.jsx("div",{className:"px-4 pb-3 flex-1 flex flex-col min-h-0",children:p.length===0?t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"No data available"}):t.jsxs("div",{className:"flex-1 flex flex-col",children:[t.jsx("div",{className:"text-[10px] text-muted-foreground mb-1 tabular-nums",children:G(n,l)}),t.jsx("div",{className:"flex items-end gap-[2px] flex-1",children:p.map((a,x)=>t.jsx("div",{className:"group relative flex-1 bg-primary/70 rounded-t transition-all hover:bg-primary cursor-default",style:{height:`${a.value/n*100}%`,minHeight:a.value>0?"3px":"0px"},children:t.jsx("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-1.5 hidden group-hover:block z-10 pointer-events-none",children:t.jsx("div",{className:"bg-foreground text-background text-[10px] px-1.5 py-0.5 rounded whitespace-nowrap tabular-nums",children:G(a.value,l)})})},x))}),t.jsx("div",{className:"flex justify-between text-[10px] text-muted-foreground mt-1.5 tabular-nums",children:p.length>0&&(()=>{const a=new Date(p[0].timestamp),x=new Date(p[p.length-1].timestamp),C=x.getTime()-a.getTime()>864e5?{month:"short",day:"numeric"}:{hour:"2-digit",minute:"2-digit"};return t.jsxs(t.Fragment,{children:[t.jsx("span",{children:a.toLocaleString([],C)}),t.jsx("span",{children:x.toLocaleString([],C)})]})})()})]})}),e[29]=l,e[30]=n,e[31]=p,e[32]=y):y=e[32];let k;return e[33]!==w||e[34]!==y||e[35]!==f?(k=t.jsxs("div",{className:f,children:[w,y]}),e[33]=w,e[34]=y,e[35]=f,e[36]=k):k=e[36],k}function rt(s,e){return s+e.value}function at(s){return s.value}function lt(s){const e=D.c(81),{dashboardId:r,timeRange:i,propertyFilters:l,onEdit:n,onRefresh:c,onTimeRangeChange:o,onPropertyFiltersChange:m}=s,{org:d,project:g,locator:f}=fe();let p;e[0]!==d.id?(p={connectionId:je,orgId:d.id},e[0]=d.id,e[1]=p):p=e[1];const j=be(p);let v;e[2]!==r||e[3]!==f?(v=oe.monitoringDashboardDetails(f,r),e[2]=r,e[3]=f,e[4]=v):v=e[4];let b;e[5]!==j||e[6]!==r?(b=async()=>{if(!j)throw new Error("MCP client not available");const N=await j.callTool({name:"MONITORING_DASHBOARD_GET",arguments:{id:r}});return N.structuredContent??N},e[5]=j,e[6]=r,e[7]=b):b=e[7];let w;e[8]!==v||e[9]!==b?(w={queryKey:v,queryFn:b},e[8]=v,e[9]=b,e[10]=w):w=e[10];const{data:y}=ne(w);let k,a,x;if(e[11]!==r||e[12]!==f||e[13]!==l||e[14]!==i.from||e[15]!==i.to){const N=l.filter(ot),S=ye(N);k=N.length>0?ve(N):void 0,x=ne,a=oe.monitoringDashboardQuery(f,r,i.from,i.to,S||void 0),e[11]=r,e[12]=f,e[13]=l,e[14]=i.from,e[15]=i.to,e[16]=k,e[17]=a,e[18]=x}else k=e[16],a=e[17],x=e[18];let u;e[19]!==k||e[20]!==j||e[21]!==r||e[22]!==i.from||e[23]!==i.to?(u=async()=>{if(!j)throw new Error("MCP client not available");const N=me(i.from),S=me(i.to),W=N.date||new Date(Date.now()-864e5),se=S.date||new Date,ie=await j.callTool({name:"MONITORING_DASHBOARD_QUERY",arguments:{dashboardId:r,timeRange:{startDate:W.toISOString(),endDate:se.toISOString()},...k?{propertyFilters:k}:{}}});return ie.structuredContent??ie},e[19]=k,e[20]=j,e[21]=r,e[22]=i.from,e[23]=i.to,e[24]=u):u=e[24];let h;e[25]!==a||e[26]!==u?(h={queryKey:a,queryFn:u,refetchInterval:3e4},e[25]=a,e[26]=u,e[27]=h):h=e[27];const{data:C,isRefetching:F}=x(h);if(!y){let N;return e[28]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Dashboard not found"}),e[28]=N):N=e[28],N}let H;e[29]!==C?.results?(H=new Map(C?.results?.map(nt)??[]),e[29]=C?.results,e[30]=H):H=e[30];const Q=H;let T;e[31]!==d.slug||e[32]!==g.slug?(T={org:d.slug,project:g.slug},e[31]=d.slug,e[32]=g.slug,e[33]=T):T=e[33];let Y;e[34]===Symbol.for("react.memo_cache_sentinel")?(Y={tab:"dashboards"},e[34]=Y):Y=e[34];let _;e[35]!==T?(_=t.jsx(de,{children:t.jsx(Fe,{asChild:!0,children:t.jsx(ge,{to:"/$org/$project/monitoring",params:T,search:Y,children:"Monitoring"})})}),e[35]=T,e[36]=_):_=e[36];let U;e[37]===Symbol.for("react.memo_cache_sentinel")?(U=t.jsx(Re,{}),e[37]=U):U=e[37];let P;e[38]!==y.name?(P=t.jsx(de,{children:t.jsx($e,{children:y.name})}),e[38]=y.name,e[39]=P):P=e[39];let J;e[40]!==_||e[41]!==P?(J=t.jsx(De,{children:t.jsxs(Te,{children:[_,U,P]})}),e[40]=_,e[41]=P,e[42]=J):J=e[42];const te=J;let z;e[43]!==n?(z=n&&t.jsx(R,{variant:"outline",size:"icon",className:"h-7 w-7",onClick:n,children:t.jsx(Ne,{size:14})}),e[43]=n,e[44]=z):z=e[44];let X;e[45]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsx(re,{size:14}),e[45]=X):X=e[45];let I;e[46]!==c?(I=t.jsx(R,{variant:"outline",size:"icon",className:"h-7 w-7",onClick:c,children:X}),e[46]=c,e[47]=I):I=e[47];let M;e[48]!==m||e[49]!==l?(M=t.jsx(Xe,{value:l,onChange:m}),e[48]=m,e[49]=l,e[50]=M):M=e[50];let B;e[51]!==i.from||e[52]!==i.to?(B={from:i.from,to:i.to},e[51]=i.from,e[52]=i.to,e[53]=B):B=e[53];let E;e[54]!==o||e[55]!==B?(E=t.jsx(we,{value:B,onChange:o,className:"min-w-0"}),e[54]=o,e[55]=B,e[56]=E):E=e[56];let O;e[57]!==z||e[58]!==I||e[59]!==M||e[60]!==E?(O=t.jsxs(Se,{children:[z,I,M,E]}),e[57]=z,e[58]=I,e[59]=M,e[60]=E,e[61]=O):O=e[61];let A;e[62]!==y.description?(A=y.description&&t.jsx("div",{className:"mb-6",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:y.description})}),e[62]=y.description,e[63]=A):A=e[63];let K;if(e[64]!==y.widgets||e[65]!==Q){let N;e[67]!==Q?(N=S=>{const W=Q.get(S.id),se=S.type==="metric"?"":"col-span-2";return t.jsxs("div",{className:se,children:[S.type==="metric"&&t.jsx(Ze,{widget:S,result:W}),S.type==="table"&&t.jsx(et,{widget:S,result:W}),S.type==="timeseries"&&t.jsx(st,{widget:S,result:W})]},S.id)},e[67]=Q,e[68]=N):N=e[68],K=y.widgets.map(N),e[64]=y.widgets,e[65]=Q,e[66]=K}else K=e[66];let L;e[69]!==K?(L=t.jsx("div",{className:"grid grid-cols-5 gap-4",ref:it,children:K}),e[69]=K,e[70]=L):L=e[70];let V;e[71]!==F?(V=F&&t.jsxs("div",{className:"fixed bottom-4 right-4 bg-background border rounded-lg px-3 py-2 shadow-lg flex items-center gap-2 text-sm",children:[t.jsx(re,{size:14,className:"animate-spin"}),"Refreshing..."]}),e[71]=F,e[72]=V):V=e[72];let q;e[73]!==A||e[74]!==L||e[75]!==V?(q=t.jsxs("div",{className:"flex-1 flex flex-col overflow-auto p-5",children:[A,L,V]}),e[73]=A,e[74]=L,e[75]=V,e[76]=q):q=e[76];let Z;return e[77]!==te||e[78]!==O||e[79]!==q?(Z=t.jsxs(Ce,{breadcrumb:te,children:[O,q]}),e[77]=te,e[78]=O,e[79]=q,e[80]=Z):Z=e[80],Z}function it(s){if(!s)return;const e=()=>{const i=(s.clientWidth-64)/5;s.style.gridAutoRows=`${i}px`};e(),new ResizeObserver(e).observe(s)}function nt(s){return[s.widgetId,s]}function ot(s){return s.key.trim()}function ct(s){const e=D.c(13),{dashboardId:r,onEdit:i}=s,l=xe();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"now-24h",to:"now"},e[0]=n):n=e[0];const[c,o]=$.useState(n);let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=[],e[1]=m):m=e[1];const[d,g]=$.useState(m);let f;e[2]!==r||e[3]!==l?(f=()=>{l.invalidateQueries({predicate:w=>w.queryKey[0]==="monitoringDashboardQuery"&&w.queryKey[2]===r})},e[2]=r,e[3]=l,e[4]=f):f=e[4];const p=f;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboard"}),e[5]=j):j=e[5];let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(re,{size:24,className:"animate-spin text-muted-foreground"})}),e[6]=v):v=e[6];let b;return e[7]!==r||e[8]!==p||e[9]!==i||e[10]!==d||e[11]!==c?(b=t.jsx(ke,{fallback:j,children:t.jsx($.Suspense,{fallback:v,children:t.jsx(lt,{dashboardId:r,timeRange:c,propertyFilters:d,onEdit:i,onRefresh:p,onTimeRangeChange:o,onPropertyFiltersChange:g})})}),e[7]=r,e[8]=p,e[9]=i,e[10]=d,e[11]=c,e[12]=b):b=e[12],b}function Vt(){const s=D.c(9);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},s[0]=e):e=s[0];const{dashboardId:r}=pe(e),{org:i,project:l}=fe(),n=he();let c;s[1]!==r||s[2]!==n||s[3]!==i.slug||s[4]!==l.slug?(c=()=>{n({to:"/$org/$project/monitoring/dashboards/$dashboardId/edit",params:{org:i.slug,project:l.slug,dashboardId:r}})},s[1]=r,s[2]=n,s[3]=i.slug,s[4]=l.slug,s[5]=c):c=s[5];const o=c;let m;return s[6]!==r||s[7]!==o?(m=t.jsx(ct,{dashboardId:r,onEdit:o}),s[6]=r,s[7]=o,s[8]=m):m=s[8],m}export{Vt as default};
|
|
4
|
+
debug?`,value:m,onChange:a=>d(a.target.value),onBlur:p,onKeyDown:a=>{a.key==="Enter"&&a.metaKey&&p()},className:"font-mono text-sm min-h-[80px] resize-none"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["One per line:"," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key=value"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key~contains"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key@in_list"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key?"})]})]}):t.jsxs("div",{className:"space-y-3",children:[c.map((a,x)=>t.jsxs("div",{className:"p-2.5 rounded-md border border-border bg-muted/30 space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("span",{className:"text-xs text-muted-foreground",children:["Filter ",x+1]}),t.jsx(R,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>w(x),children:t.jsx(Ye,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(ue,{placeholder:"Key (e.g., thread_id)",value:a.key,onChange:u=>v(x,{key:u.target.value}),onBlur:f,onKeyDown:u=>{u.key==="Enter"&&f()},className:"flex-1 font-mono text-sm"}),t.jsxs(ze,{value:a.operator,onValueChange:u=>{const h=[...c],C=h[x];C&&(h[x]={...C,operator:u,value:u==="exists"?"":C.value},o(h),e(h.filter(F=>F.key.trim())))},children:[t.jsx(Be,{className:"w-28",children:t.jsx(Ee,{})}),t.jsx(Oe,{children:Je.map(u=>t.jsx(Ae,{value:u.value,children:u.label},u.value))})]})]}),a.operator!=="exists"&&t.jsx(ue,{placeholder:"Value",value:a.value,onChange:u=>v(x,{value:u.target.value}),onBlur:f,onKeyDown:u=>{u.key==="Enter"&&f()},className:"w-full font-mono text-sm"})]},x)),t.jsxs(R,{variant:"outline",size:"sm",className:"w-full",onClick:b,children:[t.jsx(He,{size:14,className:"mr-1.5"}),"Add filter"]})]}),k>0&&t.jsx(R,{variant:"ghost",size:"sm",className:"w-full mt-3 text-muted-foreground",onClick:y,children:"Clear all filters"})]})]})]})}function G(s,e){return e||Number.isInteger(s)?s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:s.toLocaleString():s>=1e6?`${(s/1e6).toFixed(2)}M`:s>=1e3?`${(s/1e3).toFixed(2)}K`:s.toFixed(2)}function ae(s){return{sum:"Total",avg:"Average",min:"Minimum",max:"Maximum",count:"Count",last:"Latest"}[s]??s}function le(s){const e=D.c(7),{name:r,subtitle:i}=s;let l;e[0]!==r?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:r}),e[0]=r,e[1]=l):l=e[1];let n;e[2]!==i?(n=t.jsx("div",{className:"text-xs text-muted-foreground",children:i}),e[2]=i,e[3]=n):n=e[3];let c;return e[4]!==l||e[5]!==n?(c=t.jsxs("div",{className:"px-4 py-3",children:[l,n]}),e[4]=l,e[5]=n,e[6]=c):c=e[6],c}function Ze(s){const e=D.c(13),{widget:r,result:i}=s,l=i?.value??0,n=r.aggregation.fn==="count",c=r.name;let o;e[0]!==r.aggregation.fn?(o=ae(r.aggregation.fn),e[0]=r.aggregation.fn,e[1]=o):o=e[1];let m;e[2]!==o||e[3]!==r.name?(m=t.jsx(le,{name:c,subtitle:o}),e[2]=o,e[3]=r.name,e[4]=m):m=e[4];let d;e[5]!==n||e[6]!==l?(d=G(l,n),e[5]=n,e[6]=l,e[7]=d):d=e[7];let g;e[8]!==d?(g=t.jsx("div",{className:"px-4 pb-4 mt-auto",children:t.jsx("div",{className:"text-4xl font-bold tabular-nums",children:d})}),e[8]=d,e[9]=g):g=e[9];let f;return e[10]!==m||e[11]!==g?(f=t.jsxs("div",{className:"border rounded-lg bg-card flex flex-col h-full",children:[m,g]}),e[10]=m,e[11]=g,e[12]=f):f=e[12],f}function et(s){const e=D.c(15),{widget:r,result:i}=s;let l,n;e[0]!==i?.groups?(l=i?.groups??[],n=Math.max(...l.map(tt),1),e[0]=i?.groups,e[1]=l,e[2]=n):(l=e[1],n=e[2]);const c=n;let o;e[3]!==r.aggregation.fn||e[4]!==r.aggregation.groupBy?(o=r.aggregation.groupBy?`Grouped by ${r.aggregation.groupBy}`:ae(r.aggregation.fn),e[3]=r.aggregation.fn,e[4]=r.aggregation.groupBy,e[5]=o):o=e[5];let m;e[6]!==o||e[7]!==r.name?(m=t.jsx(le,{name:r.name,subtitle:o}),e[6]=o,e[7]=r.name,e[8]=m):m=e[8];let d;e[9]!==l||e[10]!==c?(d=t.jsx("div",{className:"max-h-[300px] overflow-auto",children:l.length===0?t.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"No data available for this query"}):t.jsx("div",{className:"divide-y",children:l.map(f=>t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2",children:[t.jsx("span",{className:"text-sm truncate flex-1 min-w-0",children:f.key||"(empty)"}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 w-32",children:[t.jsx("div",{className:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden",children:t.jsx("div",{className:"h-full bg-primary rounded-full",style:{width:`${f.value/c*100}%`}})}),t.jsx("span",{className:"text-xs tabular-nums text-muted-foreground w-10 text-right",children:G(f.value,!0)})]})]},f.key))})}),e[9]=l,e[10]=c,e[11]=d):d=e[11];let g;return e[12]!==m||e[13]!==d?(g=t.jsxs("div",{className:"border rounded-lg bg-card overflow-hidden flex flex-col h-full",children:[m,d]}),e[12]=m,e[13]=d,e[14]=g):g=e[14],g}function tt(s){return s.value}function st(s){const e=D.c(37),{widget:r,result:i}=s;let l,n,c,o,m,d,g,f,p;if(e[0]!==i?.timeseries||e[1]!==r.aggregation.fn||e[2]!==r.aggregation.interval||e[3]!==r.name){p=i?.timeseries??[],n=Math.max(...p.map(at),1);const a=p.reduce(rt,0);l=r.aggregation.fn==="count",f="border rounded-lg bg-card overflow-hidden flex flex-col h-full",d="flex items-start justify-between pr-4";const x=r.name;let u;e[13]!==r.aggregation.fn?(u=ae(r.aggregation.fn),e[13]=r.aggregation.fn,e[14]=u):u=e[14];const h=`${u} per ${r.aggregation.interval}`;e[15]!==h||e[16]!==r.name?(g=t.jsx(le,{name:x,subtitle:h}),e[15]=h,e[16]=r.name,e[17]=g):g=e[17],m="text-right pt-3",c="text-lg font-semibold tabular-nums leading-tight",o=G(a,l),e[0]=i?.timeseries,e[1]=r.aggregation.fn,e[2]=r.aggregation.interval,e[3]=r.name,e[4]=l,e[5]=n,e[6]=c,e[7]=o,e[8]=m,e[9]=d,e[10]=g,e[11]=f,e[12]=p}else l=e[4],n=e[5],c=e[6],o=e[7],m=e[8],d=e[9],g=e[10],f=e[11],p=e[12];let j;e[18]!==c||e[19]!==o?(j=t.jsx("div",{className:c,children:o}),e[18]=c,e[19]=o,e[20]=j):j=e[20];let v;e[21]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"text-xs text-muted-foreground",children:"total"}),e[21]=v):v=e[21];let b;e[22]!==m||e[23]!==j?(b=t.jsxs("div",{className:m,children:[j,v]}),e[22]=m,e[23]=j,e[24]=b):b=e[24];let w;e[25]!==d||e[26]!==g||e[27]!==b?(w=t.jsxs("div",{className:d,children:[g,b]}),e[25]=d,e[26]=g,e[27]=b,e[28]=w):w=e[28];let y;e[29]!==l||e[30]!==n||e[31]!==p?(y=t.jsx("div",{className:"px-4 pb-3 flex-1 flex flex-col min-h-0",children:p.length===0?t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"No data available"}):t.jsxs("div",{className:"flex-1 flex flex-col",children:[t.jsx("div",{className:"text-[10px] text-muted-foreground mb-1 tabular-nums",children:G(n,l)}),t.jsx("div",{className:"flex items-end gap-[2px] flex-1",children:p.map((a,x)=>t.jsx("div",{className:"group relative flex-1 bg-primary/70 rounded-t transition-all hover:bg-primary cursor-default",style:{height:`${a.value/n*100}%`,minHeight:a.value>0?"3px":"0px"},children:t.jsx("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-1.5 hidden group-hover:block z-10 pointer-events-none",children:t.jsx("div",{className:"bg-foreground text-background text-[10px] px-1.5 py-0.5 rounded whitespace-nowrap tabular-nums",children:G(a.value,l)})})},x))}),t.jsx("div",{className:"flex justify-between text-[10px] text-muted-foreground mt-1.5 tabular-nums",children:p.length>0&&(()=>{const a=new Date(p[0].timestamp),x=new Date(p[p.length-1].timestamp),C=x.getTime()-a.getTime()>864e5?{month:"short",day:"numeric"}:{hour:"2-digit",minute:"2-digit"};return t.jsxs(t.Fragment,{children:[t.jsx("span",{children:a.toLocaleString([],C)}),t.jsx("span",{children:x.toLocaleString([],C)})]})})()})]})}),e[29]=l,e[30]=n,e[31]=p,e[32]=y):y=e[32];let k;return e[33]!==w||e[34]!==y||e[35]!==f?(k=t.jsxs("div",{className:f,children:[w,y]}),e[33]=w,e[34]=y,e[35]=f,e[36]=k):k=e[36],k}function rt(s,e){return s+e.value}function at(s){return s.value}function lt(s){const e=D.c(81),{dashboardId:r,timeRange:i,propertyFilters:l,onEdit:n,onRefresh:c,onTimeRangeChange:o,onPropertyFiltersChange:m}=s,{org:d,project:g,locator:f}=fe();let p;e[0]!==d.id?(p={connectionId:je,orgId:d.id},e[0]=d.id,e[1]=p):p=e[1];const j=be(p);let v;e[2]!==r||e[3]!==f?(v=oe.monitoringDashboardDetails(f,r),e[2]=r,e[3]=f,e[4]=v):v=e[4];let b;e[5]!==j||e[6]!==r?(b=async()=>{if(!j)throw new Error("MCP client not available");const N=await j.callTool({name:"MONITORING_DASHBOARD_GET",arguments:{id:r}});return N.structuredContent??N},e[5]=j,e[6]=r,e[7]=b):b=e[7];let w;e[8]!==v||e[9]!==b?(w={queryKey:v,queryFn:b},e[8]=v,e[9]=b,e[10]=w):w=e[10];const{data:y}=ne(w);let k,a,x;if(e[11]!==r||e[12]!==f||e[13]!==l||e[14]!==i.from||e[15]!==i.to){const N=l.filter(ot),S=ye(N);k=N.length>0?ve(N):void 0,x=ne,a=oe.monitoringDashboardQuery(f,r,i.from,i.to,S||void 0),e[11]=r,e[12]=f,e[13]=l,e[14]=i.from,e[15]=i.to,e[16]=k,e[17]=a,e[18]=x}else k=e[16],a=e[17],x=e[18];let u;e[19]!==k||e[20]!==j||e[21]!==r||e[22]!==i.from||e[23]!==i.to?(u=async()=>{if(!j)throw new Error("MCP client not available");const N=me(i.from),S=me(i.to),W=N.date||new Date(Date.now()-864e5),se=S.date||new Date,ie=await j.callTool({name:"MONITORING_DASHBOARD_QUERY",arguments:{dashboardId:r,timeRange:{startDate:W.toISOString(),endDate:se.toISOString()},...k?{propertyFilters:k}:{}}});return ie.structuredContent??ie},e[19]=k,e[20]=j,e[21]=r,e[22]=i.from,e[23]=i.to,e[24]=u):u=e[24];let h;e[25]!==a||e[26]!==u?(h={queryKey:a,queryFn:u,refetchInterval:3e4},e[25]=a,e[26]=u,e[27]=h):h=e[27];const{data:C,isRefetching:F}=x(h);if(!y){let N;return e[28]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Dashboard not found"}),e[28]=N):N=e[28],N}let H;e[29]!==C?.results?(H=new Map(C?.results?.map(nt)??[]),e[29]=C?.results,e[30]=H):H=e[30];const Q=H;let T;e[31]!==d.slug||e[32]!==g.slug?(T={org:d.slug,project:g.slug},e[31]=d.slug,e[32]=g.slug,e[33]=T):T=e[33];let Y;e[34]===Symbol.for("react.memo_cache_sentinel")?(Y={tab:"dashboards"},e[34]=Y):Y=e[34];let _;e[35]!==T?(_=t.jsx(de,{children:t.jsx(Fe,{asChild:!0,children:t.jsx(ge,{to:"/$org/$project/monitoring",params:T,search:Y,children:"Monitoring"})})}),e[35]=T,e[36]=_):_=e[36];let U;e[37]===Symbol.for("react.memo_cache_sentinel")?(U=t.jsx(Re,{}),e[37]=U):U=e[37];let P;e[38]!==y.name?(P=t.jsx(de,{children:t.jsx($e,{children:y.name})}),e[38]=y.name,e[39]=P):P=e[39];let J;e[40]!==_||e[41]!==P?(J=t.jsx(De,{children:t.jsxs(Te,{children:[_,U,P]})}),e[40]=_,e[41]=P,e[42]=J):J=e[42];const te=J;let I;e[43]!==n?(I=n&&t.jsx(R,{variant:"outline",size:"icon",className:"h-7 w-7",onClick:n,children:t.jsx(Ne,{size:14})}),e[43]=n,e[44]=I):I=e[44];let X;e[45]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsx(re,{size:14}),e[45]=X):X=e[45];let M;e[46]!==c?(M=t.jsx(R,{variant:"outline",size:"icon",className:"h-7 w-7",onClick:c,children:X}),e[46]=c,e[47]=M):M=e[47];let z;e[48]!==m||e[49]!==l?(z=t.jsx(Xe,{value:l,onChange:m}),e[48]=m,e[49]=l,e[50]=z):z=e[50];let B;e[51]!==i.from||e[52]!==i.to?(B={from:i.from,to:i.to},e[51]=i.from,e[52]=i.to,e[53]=B):B=e[53];let E;e[54]!==o||e[55]!==B?(E=t.jsx(we,{value:B,onChange:o,className:"min-w-0"}),e[54]=o,e[55]=B,e[56]=E):E=e[56];let O;e[57]!==I||e[58]!==M||e[59]!==z||e[60]!==E?(O=t.jsxs(Se,{children:[I,M,z,E]}),e[57]=I,e[58]=M,e[59]=z,e[60]=E,e[61]=O):O=e[61];let A;e[62]!==y.description?(A=y.description&&t.jsx("div",{className:"mb-6",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:y.description})}),e[62]=y.description,e[63]=A):A=e[63];let K;if(e[64]!==y.widgets||e[65]!==Q){let N;e[67]!==Q?(N=S=>{const W=Q.get(S.id),se=S.type==="metric"?"":"col-span-2";return t.jsxs("div",{className:se,children:[S.type==="metric"&&t.jsx(Ze,{widget:S,result:W}),S.type==="table"&&t.jsx(et,{widget:S,result:W}),S.type==="timeseries"&&t.jsx(st,{widget:S,result:W})]},S.id)},e[67]=Q,e[68]=N):N=e[68],K=y.widgets.map(N),e[64]=y.widgets,e[65]=Q,e[66]=K}else K=e[66];let L;e[69]!==K?(L=t.jsx("div",{className:"grid grid-cols-5 gap-4",ref:it,children:K}),e[69]=K,e[70]=L):L=e[70];let V;e[71]!==F?(V=F&&t.jsxs("div",{className:"fixed bottom-4 right-4 bg-background border rounded-lg px-3 py-2 shadow-lg flex items-center gap-2 text-sm",children:[t.jsx(re,{size:14,className:"animate-spin"}),"Refreshing..."]}),e[71]=F,e[72]=V):V=e[72];let q;e[73]!==A||e[74]!==L||e[75]!==V?(q=t.jsxs("div",{className:"flex-1 flex flex-col overflow-auto p-5",children:[A,L,V]}),e[73]=A,e[74]=L,e[75]=V,e[76]=q):q=e[76];let Z;return e[77]!==te||e[78]!==O||e[79]!==q?(Z=t.jsxs(Ce,{breadcrumb:te,children:[O,q]}),e[77]=te,e[78]=O,e[79]=q,e[80]=Z):Z=e[80],Z}function it(s){if(!s)return;const e=()=>{const i=(s.clientWidth-64)/5;s.style.gridAutoRows=`${i}px`};e(),new ResizeObserver(e).observe(s)}function nt(s){return[s.widgetId,s]}function ot(s){return s.key.trim()}function ct(s){const e=D.c(13),{dashboardId:r,onEdit:i}=s,l=xe();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"now-24h",to:"now"},e[0]=n):n=e[0];const[c,o]=$.useState(n);let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=[],e[1]=m):m=e[1];const[d,g]=$.useState(m);let f;e[2]!==r||e[3]!==l?(f=()=>{l.invalidateQueries({predicate:w=>w.queryKey[0]==="monitoringDashboardQuery"&&w.queryKey[2]===r})},e[2]=r,e[3]=l,e[4]=f):f=e[4];const p=f;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboard"}),e[5]=j):j=e[5];let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(re,{size:24,className:"animate-spin text-muted-foreground"})}),e[6]=v):v=e[6];let b;return e[7]!==r||e[8]!==p||e[9]!==i||e[10]!==d||e[11]!==c?(b=t.jsx(ke,{fallback:j,children:t.jsx($.Suspense,{fallback:v,children:t.jsx(lt,{dashboardId:r,timeRange:c,propertyFilters:d,onEdit:i,onRefresh:p,onTimeRangeChange:o,onPropertyFiltersChange:g})})}),e[7]=r,e[8]=p,e[9]=i,e[10]=d,e[11]=c,e[12]=b):b=e[12],b}function Vt(){const s=D.c(9);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},s[0]=e):e=s[0];const{dashboardId:r}=pe(e),{org:i,project:l}=fe(),n=he();let c;s[1]!==r||s[2]!==n||s[3]!==i.slug||s[4]!==l.slug?(c=()=>{n({to:"/$org/$project/monitoring/dashboards/$dashboardId/edit",params:{org:i.slug,project:l.slug,dashboardId:r}})},s[1]=r,s[2]=n,s[3]=i.slug,s[4]=l.slug,s[5]=c):c=s[5];const o=c;let m;return s[6]!==r||s[7]!==o?(m=t.jsx(ct,{dashboardId:r,onEdit:o}),s[6]=r,s[7]=o,s[8]=m):m=s[8],m}export{Vt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as e}from"./index-
|
|
1
|
+
import{r as i,j as e}from"./index-oUlshpJJ.js";import{i as n}from"./Loading01-1Zu_WpPr.js";import{h as l}from"./mcp-oauth-Dj71M6pS.js";function h(){const[s,c]=i.useState(null),[r,a]=i.useState(!1);return i.useEffect(()=>{(async()=>{try{const t=await l();if(!t.success){c(t.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(t){c(t instanceof Error?t.message:String(t)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[r&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!r&&!s&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),s&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s?"Authentication Failed":r?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:s}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):r?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as Q,r as U,u as re,K as oe,bx as we,j as t,b as me,O as de,d as Ie,by as Te,bz as ne,aD as Re}from"./index-oUlshpJJ.js";import{P as X}from"./index-CeXKeP7Z.js";import{B as Pe,a as ze,b as $e,c as ke}from"./breadcrumb-DM1tOdpW.js";import{i as ue}from"./AlertTriangle-VgUX_bsB.js";import{i as fe}from"./FilterLines-n9w8nbRb.js";import{n as xe}from"./Inbox01-D__eEiRp.js";import{i as se}from"./Loading01-1Zu_WpPr.js";import{s as ge}from"./RefreshCw01-CppBn3YV.js";import{i as pe}from"./SearchMd-CZA5t4_M.js";import{u as he}from"./useQuery-Do4lYH9e.js";import{u as Le}from"./useInfiniteQuery-DS7Rp5Du.js";import{a as Fe,f as Ee,b as Oe}from"./registry-utils-BJco7Nso.js";import{u as je,W as Ke,a as _e,h as Ae,b as Me}from"./constants-4GzD41KM.js";import{f as Be,g as ye,h as De}from"./use-connection-CJPryUMd.js";import{s as Ge}from"./slugify-CEUa2lfQ.js";import{C as We,E as Ve}from"./empty-state-BlBaHJ3u.js";import{M as ae}from"./mcp-server-card-Bc5AS-wf.js";import{c as ie,B as Y}from"./button-DlMEAXru.js";import{I as qe}from"./input-BTxNeBOO.js";import{b as ve,P as be,a as Ne}from"./popover-DK0-mkfJ.js";import{i as Ce}from"./Check-B14Bp2E0.js";import{t as Se}from"./ChevronDown-DmZAA_RH.js";import{s as te}from"./XClose-BmynBvu4.js";import{s as Ue}from"./Plus-CRFHrfK2.js";import{u as He}from"./use-binding-CSl5A5cE.js";import{L as Je,u as Qe}from"./localstorage-keys-z-WZ22Zi.js";import{E as Ye}from"./error-boundary-Dk3_bHxS.js";import"./use-mobile-EmqlWdQN.js";import"./tooltip-BnwJ5PQp.js";import"./ChevronRight-IL2oOJI2.js";import"./infiniteQueryObserver-CzTbTGuU.js";import"./useMutation-kpLmB8S8.js";import"./CheckVerified02-C_h0QKPV.js";import"./Globe02-DCQdCg-U.js";import"./Lock01-DPYIJ_nA.js";import"./Terminal-JVvp8Qza.js";import"./card-BJlwqw9P.js";import"./integration-icon-CTPrN73-.js";import"./Container-BGGgIzJh.js";import"./github-icon-Dp3wHhYE.js";import"./binder-c0e82ZKj.js";function Ze(s,e){const r=Q.c(4),[l,m]=U.useState(s),n=U.useRef(null),o=U.useRef(!0);let c,a;return r[0]!==e||r[1]!==s?(c=()=>{if(o.current){o.current=!1;return}return n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{m(s)},e),()=>{n.current&&clearTimeout(n.current)}},a=[s,e],r[0]=e,r[1]=s,r[2]=c,r[3]=a):(c=r[2],a=r[3]),U.useEffect(c,a),l}function Xe(s){const e=Q.c(14),r=U.useRef(null),l=`scroll-position:${s}`,m=U.useRef(null);let n;e[0]!==l?(n=()=>{r.current&&sessionStorage.setItem(l,String(r.current.scrollTop))},e[0]=l,e[1]=n):n=e[1];const o=n;let c;e[2]!==l?(c=()=>{if(m.current===l)return;const j=sessionStorage.getItem(l);if(j&&r.current){const S=Number.parseInt(j,10);r.current.scrollTop=S}m.current=l},e[2]=l,e[3]=c):c=e[3];const a=c;let g;e[4]!==a||e[5]!==l?(g=()=>{m.current!==l&&a()},e[4]=a,e[5]=l,e[6]=g):g=e[6];const I=g;let i;e[7]!==a||e[8]!==l?(i=j=>{r.current=j,j&&m.current!==l&&requestAnimationFrame(()=>{a()})},e[7]=a,e[8]=l,e[9]=i):i=e[9];const p=i;let d;return e[10]!==I||e[11]!==o||e[12]!==p?(d={scrollRef:p,saveScrollPosition:o,handleScroll:I},e[10]=I,e[11]=o,e[12]=p,e[13]=d):d=e[13],d}const et=24;function tt(s){const e=Q.c(54),{registryId:r,listToolName:l,filtersToolName:m,search:n}=s,{org:o}=re();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=[],e[0]=c):c=e[0];const[a,g]=U.useState(c);let I;e[1]===Symbol.for("react.memo_cache_sentinel")?(I=[],e[1]=I):I=e[1];const[i,p]=U.useState(I),d=r||null;let j;e[2]!==o.id||e[3]!==d?(j={connectionId:d,orgId:o.id},e[2]=o.id,e[3]=d,e[4]=j):j=e[4];const S=je(j),R=!!m;let b;e[5]!==m||e[6]!==r?(b=oe.toolCall(r,m||"no-filters","{}"),e[5]=m,e[6]=r,e[7]=b):b=e[7];let N;e[8]!==S||e[9]!==m?(N=async()=>{if(!m)return{tags:[],categories:[]};const f=await S.callTool({name:m,arguments:{}});return f.structuredContent??f},e[8]=S,e[9]=m,e[10]=N):N=e[10];let P;e[11]!==b||e[12]!==N?(P={queryKey:b,queryFn:N,staleTime:36e5,retry:2},e[11]=b,e[12]=N,e[13]=P):P=e[13];const{data:z}=he(P);let h,C,$;if(e[14]!==l||e[15]!==r||e[16]!==n||e[17]!==i||e[18]!==a){const f=n?.trim()?{operator:"or",conditions:[{field:["name"],operator:"contains",value:n},{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}:void 0;h={limit:et,...a.length>0&&{tags:a},...i.length>0&&{categories:i},...f&&{where:f}},$=Le,C=oe.toolCall(r,l,JSON.stringify(h)),e[14]=l,e[15]=r,e[16]=n,e[17]=i,e[18]=a,e[19]=h,e[20]=C,e[21]=$}else h=e[19],C=e[20],$=e[21];let v;e[22]!==S||e[23]!==h||e[24]!==l?(v=async f=>{const{pageParam:Z}=f,le=Z?{...h,cursor:Z}:h,ee=await S.callTool({name:l,arguments:le});return ee.structuredContent??ee},e[22]=S,e[23]=h,e[24]=l,e[25]=v):v=e[25];let k;e[26]!==v||e[27]!==C?(k={queryKey:C,queryFn:v,initialPageParam:void 0,getNextPageParam:st,staleTime:36e5,placeholderData:we,retry:2},e[26]=v,e[27]=C,e[28]=k):k=e[28];const{data:w,fetchNextPage:x,hasNextPage:y,isFetchingNextPage:u,isFetching:T,isLoading:L,error:F}=$(k);let K;e:{if(!w?.pages||w.pages.length===0){K=null;break e}const f=w.pages[0];if(typeof f=="object"&&f!==null&&"totalCount"in f&&typeof f.totalCount=="number"){K=f.totalCount;break e}K=null}const _=K,E=w?.pages;let G;e[29]!==E?(G=Fe(E),e[29]=E,e[30]=G):G=e[30];const H=G;let W;e[31]!==n||e[32]!==i.length||e[33]!==a.length?(W=a.length>0||i.length>0||!!n?.trim(),e[31]=n,e[32]=i.length,e[33]=a.length,e[34]=W):W=e[34];const D=W,B=T&&!u&&!L&&D;let A;e[35]!==x||e[36]!==y||e[37]!==u?(A=()=>{y&&!u&&x()},e[35]=x,e[36]=y,e[37]=u,e[38]=A):A=e[38];const V=A,O=y??!1,M=R?z?.tags:void 0,q=R?z?.categories:void 0;let J;return e[39]!==D||e[40]!==T||e[41]!==u||e[42]!==B||e[43]!==L||e[44]!==H||e[45]!==F||e[46]!==V||e[47]!==i||e[48]!==a||e[49]!==O||e[50]!==M||e[51]!==q||e[52]!==_?(J={items:H,totalCount:_,hasMore:O,isLoadingMore:u,isFiltering:B,isInitialLoading:L,isFetching:T,error:F,loadMore:V,availableTags:M,availableCategories:q,selectedTags:a,selectedCategories:i,setSelectedTags:g,setSelectedCategories:p,hasActiveFilters:D},e[39]=D,e[40]=T,e[41]=u,e[42]=B,e[43]=L,e[44]=H,e[45]=F,e[46]=V,e[47]=i,e[48]=a,e[49]=O,e[50]=M,e[51]=q,e[52]=_,e[53]=J):J=e[53],J}function st(s){if(typeof s=="object"&&s!==null){const e=s.nextCursor||s.cursor;if(e)return e}}function rt(s,e){return[...s].sort((r,l)=>l.count-r.count).slice(0,e)}function ce(s){const e=Q.c(52),{label:r,items:l,selectedItems:m,onToggle:n,onClear:o}=s,[c,a]=U.useState(""),[g,I]=U.useState(!1);let i,p,d,j,S,R,b,N,P,z,h;if(e[0]!==l||e[1]!==r||e[2]!==n||e[3]!==g||e[4]!==c||e[5]!==m){const x=[...c?l.filter(E=>E.value.toLowerCase().includes(c.toLowerCase())):l].sort(lt);d=m.length,p=ve,P=g,z=I;let y;e[17]!==r?(y=t.jsx("span",{children:r}),e[17]=r,e[18]=y):y=e[18];let u;e[19]!==d?(u=d>0&&t.jsx("span",{className:"ml-1 rounded-full bg-primary text-primary-foreground px-1.5 py-0.5 text-[10px] font-medium",children:d}),e[19]=d,e[20]=u):u=e[20];let T;e[21]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(Se,{size:14,className:"opacity-50"}),e[21]=T):T=e[21],e[22]!==u||e[23]!==y?(h=t.jsx(be,{asChild:!0,children:t.jsxs(Y,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[y,u,T]})}),e[22]=u,e[23]=y,e[24]=h):h=e[24],i=Ne,R="w-64 p-0",b="start";let L;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(pe,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=L):L=e[25];let F;e[26]!==r?(F=r.toLowerCase(),e[26]=r,e[27]=F):F=e[27];const K=`Search ${F}...`;let _;e[28]===Symbol.for("react.memo_cache_sentinel")?(_=E=>a(E.target.value),e[28]=_):_=e[28],e[29]!==c||e[30]!==K?(N=t.jsx("div",{className:"shrink-0 w-full border-b border-border h-10",children:t.jsxs("label",{className:"flex items-center gap-2.5 h-10 px-4 cursor-text",children:[L,t.jsx(qe,{type:"text",placeholder:K,value:c,onChange:_,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[29]=c,e[30]=K,e[31]=N):N=e[31],j="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",S=x.length===0?t.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):x.map(E=>{const G=m.includes(E.value);return t.jsxs("button",{onClick:()=>n(E.value),className:ie("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",G?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[t.jsxs("span",{className:"truncate flex items-center gap-2",children:[G&&t.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0"}),E.value]}),t.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:E.count})]},E.value)}),e[0]=l,e[1]=r,e[2]=n,e[3]=g,e[4]=c,e[5]=m,e[6]=i,e[7]=p,e[8]=d,e[9]=j,e[10]=S,e[11]=R,e[12]=b,e[13]=N,e[14]=P,e[15]=z,e[16]=h}else i=e[6],p=e[7],d=e[8],j=e[9],S=e[10],R=e[11],b=e[12],N=e[13],P=e[14],z=e[15],h=e[16];let C;e[32]!==j||e[33]!==S?(C=t.jsx("div",{className:j,children:S}),e[32]=j,e[33]=S,e[34]=C):C=e[34];let $;e[35]!==r||e[36]!==o||e[37]!==d?($=d>0&&t.jsx("div",{className:"p-2 border-t border-border",children:t.jsxs(Y,{variant:"ghost",size:"sm",onClick:o,className:"w-full text-xs text-muted-foreground hover:text-foreground",children:["Clear ",r.toLowerCase()]})}),e[35]=r,e[36]=o,e[37]=d,e[38]=$):$=e[38];let v;e[39]!==i||e[40]!==$||e[41]!==R||e[42]!==b||e[43]!==N||e[44]!==C?(v=t.jsxs(i,{className:R,align:b,children:[N,C,$]}),e[39]=i,e[40]=$,e[41]=R,e[42]=b,e[43]=N,e[44]=C,e[45]=v):v=e[45];let k;return e[46]!==p||e[47]!==v||e[48]!==P||e[49]!==z||e[50]!==h?(k=t.jsxs(p,{open:P,onOpenChange:z,children:[h,v]}),e[46]=p,e[47]=v,e[48]=P,e[49]=z,e[50]=h,e[51]=k):k=e[51],k}function lt(s,e){return e.count-s.count}function nt(s){const e=Q.c(67),{availableTags:r,availableCategories:l,selectedTags:m,selectedCategories:n,onTagChange:o,onCategoryChange:c}=s,a=r&&r.length>0||l&&l.length>0,g=m.length>0||n.length>0;if(!a)return null;let I;e[0]!==o||e[1]!==m?(I=y=>{m.includes(y)?o(m.filter(u=>u!==y)):o([...m,y])},e[0]=o,e[1]=m,e[2]=I):I=e[2];const i=I;let p;e[3]!==c||e[4]!==n?(p=y=>{n.includes(y)?c(n.filter(u=>u!==y)):c([...n,y])},e[3]=c,e[4]=n,e[5]=p):p=e[5];const d=p;let j;e[6]!==c||e[7]!==o?(j=()=>{o([]),c([])},e[6]=c,e[7]=o,e[8]=j):j=e[8];const S=j;let R,b,N,P,z,h,C;if(e[9]!==l||e[10]!==r||e[11]!==c||e[12]!==o||e[13]!==n||e[14]!==m||e[15]!==d||e[16]!==i){const y=l?rt(l,6):[];R=n,b=m,C=new Set(y.map(ot)),z="flex items-center border-b border-border";let u;e[24]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:t.jsx(fe,{size:16})}),e[24]=u):u=e[24];let T;e[25]!==l||e[26]!==c||e[27]!==n||e[28]!==d?(T=l&&l.length>0&&t.jsx(ce,{label:"Categories",items:l,selectedItems:n,onToggle:d,onClear:()=>c([])}),e[25]=l,e[26]=c,e[27]=n,e[28]=d,e[29]=T):T=e[29];let L;e[30]!==r||e[31]!==o||e[32]!==m||e[33]!==i?(L=r&&r.length>0&&t.jsx(ce,{label:"Tags",items:r,selectedItems:m,onToggle:i,onClear:()=>o([])}),e[30]=r,e[31]=o,e[32]=m,e[33]=i,e[34]=L):L=e[34],e[35]!==L||e[36]!==T?(h=t.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[u,T,L]}),e[35]=L,e[36]=T,e[37]=h):h=e[37],N="flex items-center gap-3 flex-wrap px-5 py-3";let F;e[38]!==n||e[39]!==d?(F=K=>{const _=n.includes(K.value);return t.jsxs("div",{onClick:()=>d(K.value),className:ie("inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer",_?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"),children:[t.jsx("span",{children:K.value}),_&&t.jsx("span",{onClick:E=>{E.stopPropagation(),d(K.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:t.jsx(te,{size:12})})]},K.value)},e[38]=n,e[39]=d,e[40]=F):F=e[40],P=y.map(F),e[9]=l,e[10]=r,e[11]=c,e[12]=o,e[13]=n,e[14]=m,e[15]=d,e[16]=i,e[17]=R,e[18]=b,e[19]=N,e[20]=P,e[21]=z,e[22]=h,e[23]=C}else R=e[17],b=e[18],N=e[19],P=e[20],z=e[21],h=e[22],C=e[23];let $;if(e[41]!==R||e[42]!==d||e[43]!==C){let y;e[45]!==C?(y=T=>!C.has(T),e[45]=C,e[46]=y):y=e[46];let u;e[47]!==d?(u=T=>t.jsxs("div",{onClick:()=>d(T),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[t.jsx("span",{children:T}),t.jsx("span",{onClick:L=>{L.stopPropagation(),d(T)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:t.jsx(te,{size:12})})]},`cat-${T}`),e[47]=d,e[48]=u):u=e[48],$=R.filter(y).map(u),e[41]=R,e[42]=d,e[43]=C,e[44]=$}else $=e[44];let v;if(e[49]!==b||e[50]!==i){let y;e[52]!==i?(y=u=>t.jsxs("div",{onClick:()=>i(u),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[t.jsx("span",{children:u}),t.jsx("span",{onClick:T=>{T.stopPropagation(),i(u)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:t.jsx(te,{size:12})})]},`tag-${u}`),e[52]=i,e[53]=y):y=e[53],v=b.map(y),e[49]=b,e[50]=i,e[51]=v}else v=e[51];let k;e[54]!==S||e[55]!==g?(k=g&&t.jsxs(Y,{variant:"ghost",size:"sm",onClick:S,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[t.jsx(te,{size:14}),"Clear all"]}),e[54]=S,e[55]=g,e[56]=k):k=e[56];let w;e[57]!==k||e[58]!==N||e[59]!==P||e[60]!==$||e[61]!==v?(w=t.jsxs("div",{className:N,children:[P,$,v,k]}),e[57]=k,e[58]=N,e[59]=P,e[60]=$,e[61]=v,e[62]=w):w=e[62];let x;return e[63]!==w||e[64]!==z||e[65]!==h?(x=t.jsxs("div",{className:z,children:[h,w]}),e[63]=w,e[64]=z,e[65]=h,e[66]=x):x=e[66],x}function ot(s){return s.value}function it(s,e){if(!e)return s;const r=e.toLowerCase();return s.filter(l=>(l.name||l.title||"").toLowerCase().includes(r)||(l.description||l.server?.description||"").toLowerCase().includes(r))}function at(s){return s.verified===!0||s._meta?.["mcp.mesh"]?.verified===!0}function ct(s){const e=Q.c(55),{registryId:r,listToolName:l,filtersToolName:m,storePrivateOnly:n}=s,[o,c]=U.useState(""),a=Ze(o,300),g=me(),{org:I}=re(),{scrollRef:i,saveScrollPosition:p,handleScroll:d}=Xe(`store-discovery:${r}`);let j;e[0]!==a||e[1]!==m||e[2]!==l||e[3]!==r?(j={registryId:r,listToolName:l,filtersToolName:m,search:a},e[0]=a,e[1]=m,e[2]=l,e[3]=r,e[4]=j):j=e[4];const{items:S,hasMore:R,isLoadingMore:b,isInitialLoading:N,isFetching:P,error:z,loadMore:h,availableTags:C,availableCategories:$,selectedTags:v,selectedCategories:k,setSelectedTags:w,setSelectedCategories:x,hasActiveFilters:y}=tt(j);let u,T,L,F;if(e[5]!==a||e[6]!==P||e[7]!==N||e[8]!==S||e[9]!==o||e[10]!==n){const O=o?it(S,o):S;F=n?O.filter(dt):O,u=(o!==a||P)&&!N&&!!o,L=F.filter(at),T=F.filter(M=>!L.find(q=>q.id===M.id)),e[5]=a,e[6]=P,e[7]=N,e[8]=S,e[9]=o,e[10]=n,e[11]=u,e[12]=T,e[13]=L,e[14]=F}else u=e[11],T=e[12],L=e[13],F=e[14];const K=T;let _;e[15]!==g||e[16]!==I.slug||e[17]!==r||e[18]!==p?(_=O=>{p();const M=Ge(O.name||O.title||O.server?.title||""),q=typeof O.id=="string"&&O.id.includes("/"),J=typeof O.server?.name=="string"&&O.server.name.includes("/"),f=q&&!J?O.id:O.server?.name||O.id||"";g({to:"/$org/$project/store/$appName",params:{org:I.slug,project:de,appName:M},search:{registryId:r,serverName:f}})},e[15]=g,e[16]=I.slug,e[17]=r,e[18]=p,e[19]=_):_=e[19];const E=_;let G;e[20]!==d||e[21]!==R||e[22]!==b||e[23]!==h?(G=O=>{if(d(),!R||b)return;const M=O.currentTarget;M.scrollHeight-M.scrollTop-M.clientHeight<200&&h()},e[20]=d,e[21]=R,e[22]=b,e[23]=h,e[24]=G):G=e[24];const H=G;let W;e[25]!==u||e[26]!==o?(W=t.jsx(We,{value:o,onChange:c,placeholder:"Search for an MCP Server...",isSearching:u}),e[25]=u,e[26]=o,e[27]=W):W=e[27];let D;e[28]!==$||e[29]!==C||e[30]!==k||e[31]!==v||e[32]!==x||e[33]!==w?(D=t.jsx(nt,{availableTags:C,availableCategories:$,selectedTags:v,selectedCategories:k,onTagChange:w,onCategoryChange:x}),e[28]=$,e[29]=C,e[30]=k,e[31]=v,e[32]=x,e[33]=w,e[34]=D):D=e[34];let B;e[35]!==K||e[36]!==z||e[37]!==E||e[38]!==y||e[39]!==R||e[40]!==N||e[41]!==b||e[42]!==u||e[43]!==o||e[44]!==L||e[45]!==F?(B=t.jsx("div",{className:"p-5",children:t.jsx("div",{children:z&&!N?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(ue,{className:"size-8 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Registry unavailable"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"Could not load items from this registry. It may be temporarily offline."}),z.message&&t.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:z.message})]}),t.jsxs(Y,{variant:"outline",size:"sm",onClick:mt,children:[t.jsx(ge,{className:"size-4"}),"Try again"]})]}):N?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(se,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):F.length===0&&!y?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(xe,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),t.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):F.length===0&&y&&!o?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(fe,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No matching items"}),t.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to find more results."})]}):o&&F.length===0&&!u?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(pe,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),t.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):t.jsxs("div",{className:"flex flex-col gap-8",children:[u&&F.length===0&&t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(se,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),L.length>0&&t.jsx(ae,{items:L,title:"Verified",onItemClick:E}),K.length>0&&t.jsx(ae,{items:K,title:L.length>0?"All":"",onItemClick:E}),R&&b&&t.jsx("div",{className:"flex justify-center py-8",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(se,{size:20,className:"animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[35]=K,e[36]=z,e[37]=E,e[38]=y,e[39]=R,e[40]=N,e[41]=b,e[42]=u,e[43]=o,e[44]=L,e[45]=F,e[46]=B):B=e[46];let A;e[47]!==H||e[48]!==i||e[49]!==B?(A=t.jsx("div",{ref:i,className:"flex-1 overflow-y-auto",onScroll:H,children:B}),e[47]=H,e[48]=i,e[49]=B,e[50]=A):A=e[50];let V;return e[51]!==W||e[52]!==D||e[53]!==A?(V=t.jsxs("div",{className:"flex flex-col h-full",children:[W,D,A]}),e[51]=W,e[52]=D,e[53]=A,e[54]=V):V=e[54],V}function mt(){return window.location.reload()}function dt(s){return s.is_public!==!0}function ut(s){const e=Q.c(11),{registryId:r,storePrivateOnly:l}=s,m=Be(r),n=m?.tools;let o;e[0]!==n?(o=Ee(n),e[0]=n,e[1]=o):o=e[1];const c=o;if(!c){let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"bg-muted p-3 rounded-full",children:t.jsx(xe,{className:"size-8 text-muted-foreground"})}),e[2]=d):d=e[2];let j;return e[3]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12 text-center space-y-4",children:[d,t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Registry not available"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"This registry does not support listing store items, or the connection is not responding."})]})]}),e[3]=j):j=e[3],j}const a=m?.tools;let g;e[4]!==a?(g=Oe(a),e[4]=a,e[5]=g):g=e[5];const i=g||void 0;let p;return e[6]!==c||e[7]!==r||e[8]!==l||e[9]!==i?(p=t.jsx(ct,{registryId:r,listToolName:c,filtersToolName:i,storePrivateOnly:l}),e[6]=c,e[7]=r,e[8]=l,e[9]=i,e[10]=p):p=e[10],p}function ft(s){const e=Q.c(43),{registries:r,value:l,onValueChange:m,onAddWellKnown:n,wellKnownRegistries:o,placeholder:c}=s,a=c===void 0?"Select a registry...":c,[g,I]=U.useState(!1);let i,p,d,j,S,R,b,N;if(e[0]!==g||e[1]!==a||e[2]!==r||e[3]!==l){let w;e[12]!==l?(w=y=>y.id===l,e[12]=l,e[13]=w):w=e[13];const x=r.find(w);p=ve,b=g,N=I,i=be,R=!0,d="button",e[14]===Symbol.for("react.memo_cache_sentinel")?(j=ie("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] h-7 min-w-[160px]"),e[14]=j):j=e[14],S=x?t.jsxs("span",{className:"flex items-center gap-2",children:[x.icon?t.jsx("img",{src:x.icon,alt:x.name,className:"w-4 h-4 rounded"}):t.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:x.name.slice(0,1).toUpperCase()}),t.jsx("span",{children:x.name})]}):t.jsx("span",{className:"text-muted-foreground",children:a}),e[0]=g,e[1]=a,e[2]=r,e[3]=l,e[4]=i,e[5]=p,e[6]=d,e[7]=j,e[8]=S,e[9]=R,e[10]=b,e[11]=N}else i=e[4],p=e[5],d=e[6],j=e[7],S=e[8],R=e[9],b=e[10],N=e[11];let P;e[15]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(Se,{className:"size-4 opacity-50"}),e[15]=P):P=e[15];let z;e[16]!==d||e[17]!==j||e[18]!==S?(z=t.jsxs("button",{type:d,className:j,children:[S,P]}),e[16]=d,e[17]=j,e[18]=S,e[19]=z):z=e[19];let h;e[20]!==i||e[21]!==R||e[22]!==z?(h=t.jsx(i,{asChild:R,children:z}),e[20]=i,e[21]=R,e[22]=z,e[23]=h):h=e[23];let C;if(e[24]!==m||e[25]!==r||e[26]!==l){let w;e[28]!==m||e[29]!==l?(w=x=>t.jsxs("button",{type:"button",onClick:()=>{m(x.id??x.name),I(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[x.icon?t.jsx("img",{src:x.icon,alt:x.name,className:"w-4 h-4 rounded"}):t.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:x.name.slice(0,1).toUpperCase()}),t.jsx("span",{children:x.name})]}),l===(x.id??x.name)&&t.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:t.jsx(Ce,{className:"size-4"})})]},x.id??x.name),e[28]=m,e[29]=l,e[30]=w):w=e[30],C=r.map(w),e[24]=m,e[25]=r,e[26]=l,e[27]=C}else C=e[27];let $;e[31]!==n||e[32]!==o?($=o.length>0&&t.jsxs("div",{className:"border-t border-border pt-1 mt-1",children:[t.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),o.map(w=>t.jsxs("button",{type:"button",onClick:()=>{n(w),I(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[w.icon?t.jsx("img",{src:w.icon,alt:w.title,className:"w-4 h-4 rounded"}):t.jsx("span",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:w.title.slice(0,1).toUpperCase()}),t.jsx("span",{className:"flex-1",children:w.title})]}),t.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:t.jsx(Ue,{size:16})})]},w.id??w.title))]}),e[31]=n,e[32]=o,e[33]=$):$=e[33];let v;e[34]!==C||e[35]!==$?(v=t.jsxs(Ne,{align:"end",className:"w-auto min-w-[200px] p-1",children:[C,$]}),e[34]=C,e[35]=$,e[36]=v):v=e[36];let k;return e[37]!==p||e[38]!==h||e[39]!==v||e[40]!==b||e[41]!==N?(k=t.jsxs(p,{open:b,onOpenChange:N,children:[h,v]}),e[37]=p,e[38]=h,e[39]=v,e[40]=b,e[41]=N,e[42]=k):k=e[42],k}function xt({registries:s,onConnected:e}){const r=ye(),{org:{slug:l}}=re(),{data:m}=Ie.useSession(),n=me(),[o,c]=U.useState(!1),a=s[0],g=async()=>{if(!(!a||!m?.user?.id)){c(!0);try{const i=await r.create.mutateAsync(a);e?.(i.id)}finally{c(!1)}}},I=()=>{n({to:"/$org/$project/mcps",params:{org:l,project:de},search:{action:"create"}})};return t.jsx(Ve,{image:t.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:336,height:320,className:"max-w-full h-auto"}),title:"Connect to registry",description:"Connect to discover and use Connections from the community.",actions:t.jsxs(t.Fragment,{children:[t.jsxs(Y,{variant:"outline",onClick:g,disabled:o||!a,children:[a?.icon&&t.jsx("img",{src:a.icon,alt:"",className:"size-4"}),o?"Installing...":"Install Registry"]}),t.jsx(Y,{variant:"outline",onClick:I,children:"Custom Connection"})]})})}function gt(s){const e=Q.c(15),{error:r,onRetry:l,registryName:m}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(ue,{className:"h-6 w-6 text-destructive"})}),e[0]=n):n=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("h3",{className:"text-lg font-medium",children:"Unable to load store"}),e[1]=o):o=e[1];let c;e[2]!==m?(c=t.jsxs("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:["The ",t.jsx("strong",{children:m})," registry is currently unreachable. This may be a temporary issue — try again in a moment."]}),e[2]=m,e[3]=c):c=e[3];let a;e[4]!==r?(a=r?.message&&t.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:r.message}),e[4]=r,e[5]=a):a=e[5];let g;e[6]!==c||e[7]!==a?(g=t.jsxs("div",{className:"space-y-2",children:[o,c,a]}),e[6]=c,e[7]=a,e[8]=g):g=e[8];let I;e[9]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(ge,{className:"size-4"}),e[9]=I):I=e[9];let i;e[10]!==l?(i=t.jsxs(Y,{variant:"outline",size:"sm",onClick:l,children:[I,"Try again"]}),e[10]=l,e[11]=i):i=e[11];let p;return e[12]!==g||e[13]!==i?(p=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[n,g,i]}),e[12]=g,e[13]=i,e[14]=p):p=e[14],p}function ns(){const s=Q.c(49),{org:e,project:r}=re(),l=De(),m=ye(),n=Te(),o=n.location.pathname.includes("/store/")&&n.location.pathname.split("/").length>3,c=He(l);let a;s[0]!==e.id?(a=Ke.SELF(e.id),s[0]=e.id,s[1]=a):a=s[1];const g=a,I=r.enabledPlugins,i=I==null||I.includes(ne),p=c.filter(f=>f.id!==g?!0:i);let d;s[2]!==g?(d=f=>f.id===g,s[2]=g,s[3]=d):d=s[3];const j=p.some(d);let S;s[4]!==e.id?(S={connectionId:_e,orgId:e.id},s[4]=e.id,s[5]=S):S=s[5];const R=je(S);let b;s[6]!==r.id||s[7]!==R?(b=async()=>{const f=await R.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:r.id,pluginId:ne}});return f.structuredContent??f},s[6]=r.id,s[7]=R,s[8]=b):b=s[8];const{data:N}=he({queryKey:oe.projectPluginConfig(r.id??"",ne),queryFn:b,enabled:j&&!!r.id,staleTime:6e4}),P=N?.config?.settings;let z;s[9]!==P||s[10]!==g?(z=f=>f.id===g&&P?{id:f.id,name:P.registryName||f.title,icon:P.registryIcon||f.icon||void 0}:{id:f.id,name:f.title,icon:f.icon||void 0},s[9]=P,s[10]=g,s[11]=z):z=s[11];const h=p.map(z);let C;s[12]!==e.slug?(C=Je.selectedRegistry(e.slug),s[12]=e.slug,s[13]=C):C=s[13];const[$,v]=Qe(C,ht);let k;s[14]!==$?(k=f=>f.id===$,s[14]=$,s[15]=k):k=s[15];const x=p.find(k)?.id||p[0]?.id||"",y=x===g&&P?.storePrivateOnly===!0;let u;s[16]!==e.id?(u=Ae(e.id),s[16]=e.id,s[17]=u):u=s[17];let T;s[18]!==u?(T=[u],s[18]=u,s[19]=T):T=s[19];const L=T;let F;s[20]===Symbol.for("react.memo_cache_sentinel")?(F=[Me()],s[20]=F):F=s[20];const K=F;let _;s[21]!==m.create||s[22]!==v?(_=async f=>{const Z=await m.create.mutateAsync(f);v(Z.id)},s[21]=m.create,s[22]=v,s[23]=_):_=s[23];const E=_,G=new Set(p.map(pt)),H=L.filter(f=>f.id&&!G.has(f.id)),W=K.filter(f=>f.id&&!G.has(f.id));if(o){let f;return s[24]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(Re,{}),s[24]=f):f=s[24],f}let D;s[25]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(X.Header.Left,{children:t.jsx(Pe,{children:t.jsx(ze,{children:t.jsx($e,{children:t.jsx(ke,{children:"Store"})})})})}),s[25]=D):D=s[25];let B;s[26]!==E?(B=async f=>E(f),s[26]=E,s[27]=B):B=s[27];let A;s[28]!==H||s[29]!==x||s[30]!==h||s[31]!==v||s[32]!==B?(A=t.jsxs(X.Header,{children:[D,t.jsx(X.Header.Right,{children:t.jsx(ft,{wellKnownRegistries:H,registries:h,value:x,onValueChange:v,onAddWellKnown:B,placeholder:"Select store..."})})]}),s[28]=H,s[29]=x,s[30]=h,s[31]=v,s[32]=B,s[33]=A):A=s[33];let V;s[34]!==x||s[35]!==h?(V=f=>{const{error:Z,resetError:le}=f;return t.jsx(gt,{error:Z,onRetry:le,registryName:h.find(ee=>ee.id===x)?.name??"registry"})},s[34]=x,s[35]=h,s[36]=V):V=s[36];let O;s[37]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[t.jsx(se,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),s[37]=O):O=s[37];let M;s[38]!==W||s[39]!==x||s[40]!==v||s[41]!==y?(M=t.jsx(U.Suspense,{fallback:O,children:x?t.jsx(ut,{registryId:x,storePrivateOnly:y}):t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(xt,{registries:W,onConnected:f=>{v(f)}})})}),s[38]=W,s[39]=x,s[40]=v,s[41]=y,s[42]=M):M=s[42];let q;s[43]!==V||s[44]!==M?(q=t.jsx(X.Content,{children:t.jsx(Ye,{fallback:V,children:M})}),s[43]=V,s[44]=M,s[45]=q):q=s[45];let J;return s[46]!==A||s[47]!==q?(J=t.jsxs(X,{children:[A,q]}),s[46]=A,s[47]=q,s[48]=J):J=s[48],J}function pt(s){return s.id}function ht(s){return s??""}export{ns as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as b,j as s,r as A,u as oe,d as ne,t as ee}from"./index-oUlshpJJ.js";import{V as ae,C as j}from"./index-BPtZHCt5.js";import{T as ce,i as me,a as de,t as fe}from"./typewriter-title-Dh7JaY-s.js";import{E as pe}from"./error-boundary-Dk3_bHxS.js";import{u as Z}from"./use-deco-chat-open-Bj4jxMD7.js";import{I as te}from"./integration-icon-CTPrN73-.js";import{P as ue,a as he,b as xe}from"./popover-DK0-mkfJ.js";import{S as Y}from"./skeleton-CmCa76Pe.js";import{c as se,B as H}from"./button-DlMEAXru.js";import{i as je,d as ge}from"./constants-4GzD41KM.js";import{b as be}from"./use-virtual-mcp-BzAB1Jwk.js";import{i as ye}from"./ChevronRight-IL2oOJI2.js";import{t as ie}from"./Users03-DcEKYrkA.js";import{P as E}from"./index-CeXKeP7Z.js";import{a as J,b as Q,T as X}from"./tooltip-BnwJ5PQp.js";import{c as Ne}from"./Pin01-DJanT9uS.js";import{s as _e}from"./Plus-CRFHrfK2.js";import{i as Se}from"./Share07-tPlC5hop.js";import"./spinner--6L1PAKk.js";import"./use-mcp-prompts-Sqkswu5s.js";import"./useQuery-Do4lYH9e.js";import"./dialog-Cwnz3LEA.js";import"./form-B3bK9lhs.js";import"./label-bLbRV7ZJ.js";import"./input-BTxNeBOO.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-BjfCYJa6.js";import"./ChevronDown-DmZAA_RH.js";import"./Edit01-CA_byL8x.js";import"./XCircle-BUqdRo4A.js";import"./AlertCircle-DiL2HrFE.js";import"./AlertTriangle-VgUX_bsB.js";import"./ArrowLeft-Br1qiDir.js";import"./use-copy-DELXo_w6.js";import"./badge-D4AHLMOm.js";import"./Check-B14Bp2E0.js";import"./Code01-DnUALMy9.js";import"./SearchMd-CZA5t4_M.js";import"./use-create-virtual-mcp-CEbxqW61.js";import"./marked.esm-BaswSlok.js";import"./markdown-CgNryeyO.js";import"./Copy01-BZzZvWHY.js";import"./tools-list-D2XTdfAR.js";import"./collection-table-wrapper-CTR1SyIy.js";import"./dropdown-menu-BJqdu9io.js";import"./Grid01--gwdVXxp.js";import"./List-BJooyaoM.js";import"./table-DPbr8gQl.js";import"./empty-state-BlBaHJ3u.js";import"./Loading01-1Zu_WpPr.js";import"./card-BJlwqw9P.js";import"./Eye-DuHzxuzN.js";import"./Globe02-DCQdCg-U.js";import"./RefreshCw01-CppBn3YV.js";import"./layout-D-svMqBO.js";import"./use-connection-CJPryUMd.js";import"./useMutation-kpLmB8S8.js";import"./generate-id-Dyweu44Y.js";import"./Clock-BeB-7xuQ.js";import"./Trash01-uafi7Ilf.js";import"./use-llm-us82LJMh.js";import"./use-binding-CSl5A5cE.js";import"./binder-c0e82ZKj.js";import"./localstorage-keys-z-WZ22Zi.js";import"./select-Duopl7P2.js";import"./File06-6ostm09J.js";import"./Image01-CHvGzt2y.js";import"./RefreshCcw01-DuNb9sh9.js";import"./Settings01-CmfD9-kk.js";import"./useSuspenseInfiniteQuery-8nf2pI1w.js";import"./infiniteQueryObserver-CzTbTGuU.js";import"./Container-BGGgIzJh.js";import"./use-mobile-EmqlWdQN.js";function ve(e){const t=b.c(15),{agent:i}=e,{setVirtualMcpId:u}=Z();let l;t[0]!==i.id||t[1]!==u?(l=()=>{u(i.id)},t[0]=i.id,t[1]=u,t[2]=l):l=t[2];const r=l;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=se("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[3]=m):m=t[3];const d=`Select agent ${i.title}`;let o;t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ie,{size:20}),t[4]=o):o=t[4];let c;t[5]!==i.icon||t[6]!==i.title?(c=s.jsx(te,{icon:i.icon,name:i.title,fallbackIcon:o}),t[5]=i.icon,t[6]=i.title,t[7]=c):c=t[7];let n;t[8]!==i.title?(n=s.jsx("p",{className:"text-sm text-foreground text-center leading-tight line-clamp-2",children:i.title}),t[8]=i.title,t[9]=n):n=t[9];let a;return t[10]!==r||t[11]!==d||t[12]!==c||t[13]!==n?(a=s.jsxs("button",{type:"button",onClick:r,className:m,"aria-label":d,children:[c,n]}),t[10]=r,t[11]=d,t[12]=c,t[13]=n,t[14]=a):a=t[14],a}function Ce(e){const t=b.c(14),{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:l}=e,[r,m]=A.useState(!1),d=A.useRef(null);let o,c;t[0]!==r?(o=()=>{r&&setTimeout(()=>{d.current?.focus()},0)},c=[r],t[0]=r,t[1]=o,t[2]=c):(o=t[1],c=t[2]),A.useEffect(o,c);let n;t[3]!==l?(n=y=>{l(y),m(!1)},t[3]=l,t[4]=n):n=t[4];const a=n;let f;t[5]===Symbol.for("react.memo_cache_sentinel")?(f=se("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[5]=f):f=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ue,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-lg bg-accent flex items-center justify-center shrink-0",children:s.jsx(ye,{size:24,className:"text-foreground"})}),s.jsx("p",{className:"text-sm text-foreground text-center leading-tight",children:"See all"})]})}),t[6]=p):p=t[6];let h;t[7]!==a||t[8]!==u||t[9]!==i?(h=s.jsx(he,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(ae,{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:a,searchInputRef:d})}),t[7]=a,t[8]=u,t[9]=i,t[10]=h):h=t[10];let g;return t[11]!==r||t[12]!==h?(g=s.jsxs(xe,{open:r,onOpenChange:m,children:[p,h]}),t[11]=r,t[12]=h,t[13]=g):g=t[13],g}function we(){const e=b.c(20),t=be(),{selectedVirtualMcp:i,setVirtualMcpId:u}=Z();let l,r,m,d,o,c;if(e[0]!==t){o=Symbol.for("react.early_return_sentinel");e:{const h=t.filter(ze).slice(0,6);if(h.length===0){o=null;break e}c=t.map(Te),m="w-full max-w-[800px]",e[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("h2",{className:"text-sm font-medium text-muted-foreground mb-4",children:"Recently used agents"}),e[7]=d):d=e[7],l="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",r=h.map(ke)}e[0]=t,e[1]=l,e[2]=r,e[3]=m,e[4]=d,e[5]=o,e[6]=c}else l=e[1],r=e[2],m=e[3],d=e[4],o=e[5],c=e[6];if(o!==Symbol.for("react.early_return_sentinel"))return o;const n=i?.id??null;let a;e[8]!==u||e[9]!==n||e[10]!==c?(a=s.jsx(Ce,{virtualMcps:c,selectedVirtualMcpId:n,onVirtualMcpChange:u}),e[8]=u,e[9]=n,e[10]=c,e[11]=a):a=e[11];let f;e[12]!==l||e[13]!==r||e[14]!==a?(f=s.jsxs("div",{className:l,children:[r,a]}),e[12]=l,e[13]=r,e[14]=a,e[15]=f):f=e[15];let p;return e[16]!==m||e[17]!==d||e[18]!==f?(p=s.jsxs("div",{className:m,children:[d,f]}),e[16]=m,e[17]=d,e[18]=f,e[19]=p):p=e[19],p}function ke(e){return s.jsx(ve,{agent:e},e.id??"default")}function Te(e){return{id:e.id,title:e.title,description:e.description,icon:e.icon}}function ze(e){return e.id!==null&&!je(e.id)}function Me(){const e=b.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Y,{className:"h-5 w-40 mb-4"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"w-full max-w-[800px]",children:[t,s.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",children:Array.from({length:7}).map(Ie)})]}),e[1]=i):i=e[1],i}function Ie(e,t){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 self-stretch",children:[s.jsx(Y,{className:"size-6 rounded-md shrink-0"}),s.jsx(Y,{className:"h-4 w-full"})]},t)}function Pe(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(A.Suspense,{fallback:s.jsx(Me,{}),children:s.jsx(we,{})}),e[0]=t):t=e[0],t}function $e(){const e=new Date().getHours();return e>=5&&e<12?"Morning":e>=12&&e<17?"Afternoon":e>=17&&e<22?"Evening":"Night"}function Ve(){const e=b.c(61),{org:t}=oe(),{data:i}=ne.useSession(),{modelsConnections:u,isChatEmpty:l,activeThreadId:r,createThread:m,switchToThread:d,threads:o,selectedVirtualMcp:c}=Z();let n;if(e[0]!==r||e[1]!==o){let x;e[3]!==r?(x=le=>le.id===r,e[3]=r,e[4]=x):x=e[4],n=o.find(x),e[0]=r,e[1]=o,e[2]=n}else n=e[2];const a=n,[f,p]=A.useState(!1);let h;e[5]!==i?.user?.name?(h=i?.user?.name?.split(" ")[0]||"there",e[5]=i?.user?.name,e[6]=h):h=e[6];const g=h;let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=$e(),e[7]=y):y=e[7];const re=y;let R;e[8]!==t.id?(R=ge(t.id),e[8]=t.id,e[9]=R):R=e[9];const B=c??R;if(u.length===0){let x;return e[10]!==t?(x=s.jsx("div",{className:"flex flex-col size-full bg-background items-center justify-center",children:s.jsx(j.NoLlmBindingEmptyState,{org:t})}),e[10]=t,e[11]=x):x=e[11],x}let N;e[12]!==a?(N=a?.title&&s.jsx(ce,{text:a.title,className:"text-sm font-medium text-foreground"}),e[12]=a,e[13]=N):N=e[13];let _;e[14]!==N?(_=s.jsx(E.Header.Left,{className:"gap-2",children:N}),e[14]=N,e[15]=_):_=e[15];let S;e[16]!==m?(S=()=>m(),e[16]=m,e[17]=S):S=e[17];let L;e[18]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(_e,{size:16}),e[18]=L):L=e[18];let v;e[19]!==l||e[20]!==S?(v=s.jsx(J,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:S,disabled:l,"aria-label":"New chat",children:L})}),e[19]=l,e[20]=S,e[21]=v):v=e[21];let O;e[22]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Q,{children:"New chat"}),e[22]=O):O=e[22];let C;e[23]!==v?(C=s.jsxs(X,{children:[v,O]}),e[23]=v,e[24]=C):C=e[24];let D;e[25]===Symbol.for("react.memo_cache_sentinel")?(D=()=>p(!0),e[25]=D):D=e[25];let F;e[26]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsxs(X,{children:[s.jsx(J,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:D,"aria-label":"Chat history",children:s.jsx(me,{size:16})})}),s.jsx(Q,{children:"Chat history"})]}),e[26]=F):F=e[26];let W;e[27]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Ne,{size:16}),e[27]=W):W=e[27];let w;e[28]!==l?(w=s.jsx(J,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:Ee,disabled:l,"aria-label":"Pin chat",children:W})}),e[28]=l,e[29]=w):w=e[29];let q;e[30]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(Q,{children:"Pin chat"}),e[30]=q):q=e[30];let k;e[31]!==w?(k=s.jsxs(X,{children:[w,q]}),e[31]=w,e[32]=k):k=e[32];let G;e[33]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(Se,{size:16}),e[33]=G):G=e[33];let T;e[34]!==l?(T=s.jsx(J,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:Ae,disabled:l,"aria-label":"Share chat",children:G})}),e[34]=l,e[35]=T):T=e[35];let K;e[36]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(Q,{children:"Share chat"}),e[36]=K):K=e[36];let z;e[37]!==T?(z=s.jsxs(X,{children:[T,K]}),e[37]=T,e[38]=z):z=e[38];let M;e[39]!==C||e[40]!==k||e[41]!==z?(M=s.jsxs(E.Header.Right,{className:"gap-1",children:[C,F,k,z]}),e[39]=C,e[40]=k,e[41]=z,e[42]=M):M=e[42];let I;e[43]!==M||e[44]!==_?(I=s.jsxs(E.Header,{className:"flex-none z-10 bg-background",children:[_,M]}),e[43]=M,e[44]=_,e[45]=I):I=e[45];let P;e[46]!==B||e[47]!==l||e[48]!==g?(P=l?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center px-10 pb-32 pt-10",children:[s.jsxs("div",{className:"flex flex-col items-center gap-3 w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center",children:s.jsx(te,{icon:B.icon,name:B.title,size:"md",fallbackIcon:s.jsx(ie,{size:20}),className:"size-12 rounded-xl border border-stone-200/60 shadow-sm aspect-square transition-opacity duration-200"})}),s.jsxs("div",{className:"text-center",children:[s.jsxs("p",{className:"text-lg font-medium text-foreground",children:[re," ",g,","]}),s.jsx("p",{className:"text-base text-muted-foreground opacity-50 mb-0",children:"What are we building today?"})]}),s.jsx("div",{className:"w-full -mt-1",children:s.jsx(j.Input,{})}),s.jsx(j.IceBreakers,{className:"w-full"})]}),s.jsx("div",{className:"flex flex-col items-center w-full mt-4",children:s.jsx(Pe,{})})]}):s.jsxs(s.Fragment,{children:[s.jsx(j.Main,{children:s.jsx(j.Messages,{})}),s.jsx(j.Footer,{children:s.jsx(j.Input,{})})]}),e[46]=B,e[47]=l,e[48]=g,e[49]=P):P=e[49];let $;e[50]!==d?($=async x=>{await d(x),p(!1)},e[50]=d,e[51]=$):$=e[51];let V;e[52]!==r||e[53]!==f||e[54]!==$||e[55]!==o?(V=s.jsx(de,{open:f,onOpenChange:p,threads:o,activeThreadId:r,onThreadSelect:$}),e[52]=r,e[53]=f,e[54]=$,e[55]=o,e[56]=V):V=e[56];let U;return e[57]!==I||e[58]!==P||e[59]!==V?(U=s.jsxs(j,{children:[I,P,V]}),e[57]=I,e[58]=P,e[59]=V,e[60]=U):U=e[60],U}function Ae(){ee.info("Share feature coming soon")}function Ee(){ee.info("Pin feature coming soon")}function He(e){const t=b.c(14),{error:i,onRetry:u}=e,l=i?.message?.includes("401")||i?.message?.toLowerCase().includes("unauthorized");let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(E.Header,{className:"flex-none",children:[s.jsx(E.Header.Left,{className:"gap-2"}),s.jsx(E.Header.Right,{className:"gap-1"})]}),t[0]=r):r=t[0];let m;t[1]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(fe,{className:"h-6 w-6 text-destructive"})}),t[1]=m):m=t[1];const d=l?"Unable to load models":"Something went wrong";let o;t[2]!==d?(o=s.jsx("h3",{className:"text-lg font-medium",children:d}),t[2]=d,t[3]=o):o=t[3];const c=l?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":i?.message||"An unexpected error occurred";let n;t[4]!==c?(n=s.jsx("p",{className:"text-sm text-muted-foreground",children:c}),t[4]=c,t[5]=n):n=t[5];let a;t[6]!==o||t[7]!==n?(a=s.jsxs("div",{className:"space-y-2",children:[o,n]}),t[6]=o,t[7]=n,t[8]=a):a=t[8];let f;t[9]!==u?(f=s.jsx(H,{variant:"outline",onClick:u,children:"Try again"}),t[9]=u,t[10]=f):f=t[10];let p;return t[11]!==a||t[12]!==f?(p=s.jsxs(j,{children:[r,s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:s.jsxs("div",{className:"max-w-sm space-y-4",children:[m,a,f]})})]}),t[11]=a,t[12]=f,t[13]=p):p=t[13],p}function ls(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(pe,{fallback:Re,children:s.jsx(A.Suspense,{fallback:s.jsx(j.Skeleton,{}),children:s.jsx(Ve,{})})}),e[0]=t):t=e[0],t}function Re(e){const{error:t,resetError:i}=e;return s.jsx(He,{error:t,onRetry:i})}export{ls as default};
|
package/dist/client/assets/{plugin-empty-state-CQXNVuX5.js → plugin-empty-state-AgNFTQ0u.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,j as t,
|
|
1
|
+
import{c as n,j as t,H as o}from"./index-oUlshpJJ.js";function c(){const s=n.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(o,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No storage connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an S3-compatible storage service to browse and manage files."})]}),s[0]=e):e=s[0],e}export{c as default};
|
package/dist/client/assets/{plugin-empty-state-WYiH6sc2.js → plugin-empty-state-DlghdeMy.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,j as t}from"./index-
|
|
1
|
+
import{c as s,j as t}from"./index-oUlshpJJ.js";import{e as r}from"./Dataflow03-BnILNUas.js";function a(){const o=s.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(r,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),o[0]=e):e=o[0],e}export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as w,j as s,r as S,
|
|
1
|
+
import{c as w,j as s,r as S,H as y}from"./index-oUlshpJJ.js";import{i as _}from"./Check-B14Bp2E0.js";import{t as k}from"./ChevronDown-DmZAA_RH.js";function E(x){const e=w.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=S.useState(!1),C=S.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const R=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Storage";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let a;e[15]!==i?(a=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=a):a=e[16];const v=i?.title||"Select storage";let c;e[17]!==v?(c=s.jsx("span",{children:v}),e[17]=v,e[18]=c):c=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(k,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==a||e[22]!==c?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[a,c,b]}),e[20]=o,e[21]=a,e[22]=c,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(_,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:R,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function I(x){const e=w.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,j as s,r as w}from"./index-
|
|
1
|
+
import{c as S,j as s,r as w}from"./index-oUlshpJJ.js";import{i as R}from"./Check-B14Bp2E0.js";import{t as _}from"./ChevronDown-DmZAA_RH.js";import{e as y}from"./Dataflow03-BnILNUas.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:r,onConnectionChange:N}=x,[n,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==r){let t;e[3]!==r?(t=u=>u.id===r,e[3]=r,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=r,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==n?(o=()=>z(!n),e[13]=n,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==n||e[26]!==N||e[27]!==r?(m=n&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===r&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=n,e[26]=N,e[27]=r,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function H(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{H as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,
|
|
1
|
+
import{r as i,ap as $,j as c,aG as L,al as G,as as A,ar as _,au as P,aH as w,aw as j,aI as H,aJ as E,aK as z,aL as K,ax as J,aM as Q,aN as U,aO as V,aP as W,aQ as Z,aR as q,c as R}from"./index-oUlshpJJ.js";import{c as B}from"./button-DlMEAXru.js";var m="Popover",[b]=J(m,[E]),g=E(),[X,d]=b(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:a,modal:s=!1}=t,p=g(e),l=i.useRef(null),[u,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:a,caller:m});return c.jsx(L,{...p,children:c.jsx(X,{scope:e,contentId:G(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(C=>!C),[f]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:s,children:o})})};N.displayName=m;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(F,o),a=g(o),{onCustomAnchorAdd:s,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(s(),()=>p()),[s,p]),c.jsx(w,{...a,...r,ref:e})});Y.displayName=F;var S="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(S,o),a=g(o),s=A(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":k(n.open),...r,ref:s,onClick:P(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(w,{asChild:!0,...a,children:p})});y.displayName=S;var O="PopoverPortal",[ee,oe]=b(O,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,a=d(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||a.open,children:c.jsx(H,{asChild:!0,container:n,children:r})})})};M.displayName=O;var v="PopoverContent",D=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,a=d(v,t.__scopePopover);return c.jsx(j,{present:r||a.open,children:a.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});D.displayName=v;var te=Q("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),a=i.useRef(!1);return i.useEffect(()=>{const s=r.current;if(s)return z(s)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(I,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(t.onCloseAutoFocus,s=>{s.preventDefault(),a.current||o.triggerRef.current?.focus()}),onPointerDownOutside:P(t.onPointerDownOutside,s=>{const p=s.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,u=p.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:P(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(I,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{t.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||o.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:a=>{t.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const s=a.target;o.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),I=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:h,...x}=t,f=d(v,o),C=g(o);return U(),c.jsx(V,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:a,children:c.jsx(W,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(Z,{"data-state":k(f.open),role:"dialog",id:f.contentId,...C,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",ae=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(T,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:P(t.onClick,()=>n.onOpenChange(!1))})});ae.displayName=T;var se="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=g(o);return c.jsx(q,{...n,...r,ref:e})});ce.displayName=se;function k(t){return t?"open":"closed"}var ie=N,pe=y,le=M,ue=D;function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,a;e[0]!==t?({className:o,align:n,sideOffset:a,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=a):(o=e[1],r=e[2],n=e[3],a=e[4]);const s=n===void 0?"center":n,p=a===void 0?4:a;let l;e[5]!==o?(l=B("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let u;return e[7]!==s||e[8]!==r||e[9]!==p||e[10]!==l?(u=c.jsx(le,{children:c.jsx(ue,{"data-slot":"popover-content",align:s,sideOffset:p,className:l,...r})}),e[7]=s,e[8]=r,e[9]=p,e[10]=l,e[11]=u):u=e[11],u}export{Pe as P,ge as a,ve as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as O,c as z,d as me,j as s,u as J,O as G,t as R,H as Le,o as ve,s as W,b as ne,y as le,l as Ne,k as Se,K as q,aF as re,bF as Be,P as Ce,S as ae,e as Re,aD as Me}from"./index-oUlshpJJ.js";import{u as Ue,a as _e}from"./use-project-BYeZMfFI.js";import{c as X,B as U}from"./button-DlMEAXru.js";import{a as qe,D as Ge}from"./dialog-Cwnz3LEA.js";import{a as Ke,b as Qe,c as Ve,T as Je,i as Pe}from"./tooltip-BnwJ5PQp.js";import{u as ue,S as te}from"./skeleton-CmCa76Pe.js";import{p as ke,a as pe,t as We,u as Ze}from"./use-settings-modal-tvp-XYtD.js";import{A as we}from"./avatar-Bc7s3LEL.js";import{t as Ie}from"./Settings01-CmfD9-kk.js";import{i as He}from"./Check-B14Bp2E0.js";import{a as Ye}from"./Copy01-BZzZvWHY.js";import{S as se}from"./switch-CzMTfJyd.js";import{S as ze,a as Ee,d as Y,c as $e,b as Xe}from"./select-Duopl7P2.js";import{i as et}from"./Code01-DnUALMy9.js";import{i as tt}from"./Shield01-BTe6K6H4.js";import{n as st}from"./CheckDone01-COU71F1q.js";import{u as oe}from"./useMutation-kpLmB8S8.js";import{a as De,F as Z,b as K,c as Q,d as V,f as H,e as ce}from"./form-B3bK9lhs.js";import{I as ee}from"./input-BTxNeBOO.js";import{i as nt}from"./Upload01-j9dbqfwl.js";import{a as fe,u as xe}from"./constants-4GzD41KM.js";import{T as lt}from"./textarea-BNPURYr9.js";import{c as ot,h as rt,d as it,b as at,A as ct,e as dt,g as mt,a as ut,f as ft}from"./alert-dialog-BXLdEhYw.js";import{u as xt}from"./useQuery-Do4lYH9e.js";import{L as gt}from"./label-bLbRV7ZJ.js";import{n as pt}from"./Container-BGGgIzJh.js";import{h as ht}from"./use-connection-CJPryUMd.js";import{a as jt,c as bt}from"./use-binding-CSl5A5cE.js";import{u as yt}from"./use-install-from-registry-Vj4wJ4IH.js";import{i as vt}from"./Loading01-1Zu_WpPr.js";import{s as Nt}from"./Plus-CRFHrfK2.js";import"./localstorage-keys-z-WZ22Zi.js";import"./ChevronDown-DmZAA_RH.js";import"./binder-c0e82ZKj.js";import"./extract-connection-data-Cl1h0kax.js";import"./constants-PL5hL4qd.js";import"./github-icon-Dp3wHhYE.js";import"./registry-utils-BJco7Nso.js";import"./generate-id-Dyweu44Y.js";const Oe=({size:e=24,color:t="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M10 2v4.66c0 .218 0 .326-.033.413a.47.47 0 0 1-.138.198c-.07.06-.183.102-.409.185a7.5 7.5 0 1 0 5.16 0c-.226-.083-.339-.125-.409-.185a.469.469 0 0 1-.138-.198C14 6.986 14 6.878 14 6.66V2M8.5 2h7"}));Oe.displayName="Beaker01";const Te=({size:e=24,color:t="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M9.354 21c.705.622 1.632 1 2.646 1s1.94-.378 2.646-1M18 8A6 6 0 1 0 6 8c0 3.09-.78 5.206-1.65 6.605-.735 1.18-1.102 1.771-1.089 1.936.015.182.054.252.2.36.133.099.732.099 1.928.099H18.61c1.196 0 1.795 0 1.927-.098.147-.11.186-.179.2-.361.014-.165-.353-.755-1.088-1.936C18.78 13.206 18 11.09 18 8Z"}));Te.displayName="Bell01";const ge=({size:e=24,color:t="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M13 2 4.093 12.688c-.348.418-.523.628-.525.804a.5.5 0 0 0 .185.397c.138.111.41.111.955.111H12l-1 8 8.907-10.688c.348-.418.523-.628.525-.804a.5.5 0 0 0-.185-.397c-.138-.111-.41-.111-.955-.111H12l1-8Z"}));ge.displayName="Zap";const St=[{key:"general",label:"General",icon:s.jsx(Ie,{size:14})},{key:"plugins",label:"Plugins",icon:s.jsx(ge,{size:14})}];function Ct(e){const t=z.c(14),{activeSection:n,onNavigate:r}=e,{org:i}=J();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={suspense:!0},t[0]=l):l=t[0];const{data:o}=Ue(i.id,l);let m;t[1]!==n?(m=ke(n),t[1]=n,t[2]=m):m=t[2];const u=m;let f;if(t[3]!==u?.slug||t[4]!==n||t[5]!==r||t[6]!==o){let x;t[8]!==u?.slug||t[9]!==n||t[10]!==r?(x=a=>{const g=u?.slug===a.slug;return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("button",{type:"button",onClick:()=>r(pe(a.slug,"general")),className:X("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",g?"text-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("div",{className:"size-4 shrink-0 rounded-[3px] flex items-center justify-center overflow-hidden border border-border/50",style:{backgroundColor:a.ui?.themeColor??"#60a5fa"},children:a.ui?.icon?s.jsx("img",{src:a.ui.icon,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:"text-[8px] font-semibold text-white leading-none",children:(a.name??a.slug).charAt(0).toUpperCase()})}),s.jsx("span",{className:"truncate",children:a.name??a.slug})]}),g&&s.jsx("div",{className:"ml-3 flex flex-col gap-0.5 border-l border-border pl-2.5",children:St.map(j=>{const h=pe(a.slug,j.key);return s.jsxs("button",{type:"button",onClick:()=>r(h),className:X("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===h?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:j.icon}),s.jsx("span",{className:"truncate",children:j.label})]},j.key)})})]},a.slug)},t[8]=u?.slug,t[9]=n,t[10]=r,t[11]=x):x=t[11],f=(o??[]).filter(_t).map(x),t[3]=u?.slug,t[4]=n,t[5]=r,t[6]=o,t[7]=f}else f=t[7];let d;return t[12]!==f?(d=s.jsx(s.Fragment,{children:f}),t[12]=f,t[13]=d):d=t[13],d}function _t(e){return e.slug!==G}function Pt(e){const t=z.c(29),{activeSection:n,onNavigate:r}=e,{data:i}=me.useSession(),[l]=ue(),o=i?.user,m=o?.image,u=o?.name??"Profile",f=o?.name??"U";let d;t[0]!==f||t[1]!==m?(d=s.jsx(we,{url:m,fallback:f,shape:"circle",size:"2xs",className:"size-4 shrink-0"}),t[0]=f,t[1]=m,t[2]=d):d=t[2];let x;t[3]!==u||t[4]!==d?(x={key:"account.profile",label:u,icon:d},t[3]=u,t[4]=d,t[5]=x):x=t[5];let a;t[6]===Symbol.for("react.memo_cache_sentinel")?(a={key:"account.preferences",label:"Preferences",icon:s.jsx(Ie,{size:14})},t[6]=a):a=t[6];let g;t[7]===Symbol.for("react.memo_cache_sentinel")?(g={key:"account.experimental",label:"Experimental",icon:s.jsx(Oe,{size:14})},t[7]=g):g=t[7];let j;t[8]!==x?(j=[x,a,g],t[8]=x,t[9]=j):j=t[9];const h=j;let y;t[10]===Symbol.for("react.memo_cache_sentinel")?(y={key:"org.general",label:"General",icon:s.jsx(We,{size:14})},t[10]=y):y=t[10];let S;t[11]===Symbol.for("react.memo_cache_sentinel")?(S=[y,{key:"org.plugins",label:"Plugins",icon:s.jsx(ge,{size:14})}],t[11]=S):S=t[11];const C=S;let _;t[12]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Account"}),t[12]=_):_=t[12];let v;t[13]!==h||t[14]!==n||t[15]!==r?(v=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[_,h.map(P=>s.jsxs("button",{type:"button",onClick:()=>r(P.key),className:X("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===P.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:P.icon}),s.jsx("span",{className:"truncate",children:P.label})]},P.key))]}),t[13]=h,t[14]=n,t[15]=r,t[16]=v):v=t[16];let c;t[17]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Organization"}),t[17]=c):c=t[17];let p;t[18]!==n||t[19]!==r?(p=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[c,C.map(P=>s.jsxs("button",{type:"button",onClick:()=>r(P.key),className:X("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===P.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:P.icon}),s.jsx("span",{className:"truncate",children:P.label})]},P.key))]}),t[18]=n,t[19]=r,t[20]=p):p=t[20];let b;t[21]!==n||t[22]!==r||t[23]!==l.experimental_projects?(b=l.experimental_projects&&s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Projects"}),s.jsx(O.Suspense,{fallback:s.jsx("div",{className:"px-2 py-1.5 text-xs text-muted-foreground/50",children:"Loading…"}),children:s.jsx(Ct,{activeSection:n,onNavigate:r})})]}),t[21]=n,t[22]=r,t[23]=l.experimental_projects,t[24]=b):b=t[24];let N;return t[25]!==v||t[26]!==p||t[27]!==b?(N=s.jsxs("div",{className:"w-52 shrink-0 border-r border-border bg-sidebar/50 overflow-y-auto py-3 flex flex-col gap-4",children:[v,p,b]}),t[25]=v,t[26]=p,t[27]=b,t[28]=N):N=t[28],N}function kt(){const e=z.c(32),{data:t}=me.useSession(),[n,r]=O.useState(!1),i=t?.user,l=i?.image;let o;e[0]!==i?(o=()=>{i?.id&&navigator.clipboard.writeText(i.id).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)})},e[0]=i,e[1]=o):o=e[1];const m=o;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Profile"})}),e[2]=u):u=e[2];const f=i?.name??"U";let d;e[3]!==f||e[4]!==l?(d=s.jsx(we,{url:l,fallback:f,shape:"circle",size:"xl",className:"size-16 shrink-0"}),e[3]=f,e[4]=l,e[5]=d):d=e[5];const x=i?.name??"User";let a;e[6]!==x?(a=s.jsx("span",{className:"text-sm font-semibold text-foreground truncate",children:x}),e[6]=x,e[7]=a):a=e[7];const g=i?.email;let j;e[8]!==g?(j=s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:g}),e[8]=g,e[9]=j):j=e[9];let h;e[10]!==a||e[11]!==j?(h=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[a,j]}),e[10]=a,e[11]=j,e[12]=h):h=e[12];let y;e[13]!==d||e[14]!==h?(y=s.jsxs("div",{className:"flex items-center gap-4",children:[d,h]}),e[13]=d,e[14]=h,e[15]=y):y=e[15];let S;e[16]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"User ID"}),e[16]=S):S=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("p",{className:"text-sm text-muted-foreground",children:"User ID"}),e[17]=C):C=e[17];const _=i?.id;let v;e[18]!==_?(v=s.jsx("span",{className:"font-mono text-sm",children:_}),e[18]=_,e[19]=v):v=e[19];let c;e[20]!==n?(c=n?s.jsx(He,{size:14,className:"text-green-600 shrink-0"}):s.jsx(Ye,{size:14,className:"shrink-0 opacity-70 group-hover:opacity-100 transition-opacity"}),e[20]=n,e[21]=c):c=e[21];let p;e[22]!==m||e[23]!==v||e[24]!==c?(p=s.jsx(Ke,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:m,className:"group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[v,c]})}),e[22]=m,e[23]=v,e[24]=c,e[25]=p):p=e[25];let b;e[26]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Qe,{side:"left",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[26]=b):b=e[26];let N;e[27]!==p?(N=s.jsxs("div",{className:"flex flex-col",children:[S,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[C,s.jsx(Ve,{children:s.jsxs(Je,{children:[p,b]})})]})]}),e[27]=p,e[28]=N):N=e[28];let P;return e[29]!==N||e[30]!==y?(P=s.jsxs("div",{className:"flex flex-col gap-8",children:[u,y,N]}),e[29]=N,e[30]=y,e[31]=P):P=e[31],P}function ie(e){const t=z.c(27),{icon:n,label:r,description:i,control:l,onClick:o,disabled:m}=e,u=m?void 0:o,f=o?"button":void 0,d=o&&!m?0:void 0;let x;t[0]!==m||t[1]!==o?(x=o&&!m?c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),o())}:void 0,t[0]=m,t[1]=o,t[2]=x):x=t[2];const a=o&&!m?"pointer":void 0;let g;t[3]!==a?(g={cursor:a},t[3]=a,t[4]=g):g=t[4];let j;t[5]!==n?(j=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:n}),t[5]=n,t[6]=j):j=t[6];let h;t[7]!==r?(h=s.jsx("p",{className:"text-sm font-medium text-foreground",children:r}),t[7]=r,t[8]=h):h=t[8];let y;t[9]!==i?(y=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:i}),t[9]=i,t[10]=y):y=t[10];let S;t[11]!==h||t[12]!==y?(S=s.jsxs("div",{className:"min-w-0",children:[h,y]}),t[11]=h,t[12]=y,t[13]=S):S=t[13];let C;t[14]!==S||t[15]!==j?(C=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[j,S]}),t[14]=S,t[15]=j,t[16]=C):C=t[16];let _;t[17]!==l?(_=s.jsx("div",{onClick:wt,className:"shrink-0",children:l}),t[17]=l,t[18]=_):_=t[18];let v;return t[19]!==u||t[20]!==C||t[21]!==_||t[22]!==f||t[23]!==d||t[24]!==x||t[25]!==g?(v=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0",onClick:u,role:f,tabIndex:d,onKeyDown:x,style:g,children:[C,_]}),t[19]=u,t[20]=C,t[21]=_,t[22]=f,t[23]=d,t[24]=x,t[25]=g,t[26]=v):v=t[26],v}function wt(e){return e.stopPropagation()}function he(){const e=z.c(35),[t,n]=ue();let r;e[0]!==n?(r=async b=>{if(b&&await Notification.requestPermission()!=="granted"){R.error("Notifications denied. Please enable them in your browser settings."),n(zt);return}n(N=>({...N,enableNotifications:b}))},e[0]=n,e[1]=r):r=e[1];const i=r;let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Preferences"})}),e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(et,{size:16}),e[3]=o):o=e[3];let m;e[4]!==n?(m=()=>n(It),e[4]=n,e[5]=m):m=e[5];let u;e[6]!==n?(u=b=>n(N=>({...N,devMode:b})),e[6]=n,e[7]=u):u=e[7];let f;e[8]!==t.devMode||e[9]!==u?(f=s.jsx(se,{checked:t.devMode,onCheckedChange:u}),e[8]=t.devMode,e[9]=u,e[10]=f):f=e[10];let d;e[11]!==m||e[12]!==f?(d=s.jsx(ie,{icon:o,label:"Developer Mode",description:"Show technical details like JSON input/output for tool calls.",onClick:m,control:f}),e[11]=m,e[12]=f,e[13]=d):d=e[13];let x;e[14]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Te,{size:16}),e[14]=x):x=e[14];let a;e[15]!==i||e[16]!==t.enableNotifications?(a=s.jsx(ie,{icon:x,label:"Notifications",description:"Play a sound and show a notification when chat messages complete while the app is unfocused.",disabled:typeof Notification>"u",onClick:()=>i(!t.enableNotifications),control:s.jsx(se,{disabled:typeof Notification>"u",checked:t.enableNotifications,onCheckedChange:i})}),e[15]=i,e[16]=t.enableNotifications,e[17]=a):a=e[17];let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(tt,{size:16}),e[18]=g):g=e[18];let j;e[19]!==n?(j=b=>n(N=>({...N,toolApprovalLevel:b})),e[19]=n,e[20]=j):j=e[20];let h;e[21]===Symbol.for("react.memo_cache_sentinel")?(h={none:"None",readonly:"Read-only",yolo:"YOLO"},e[21]=h):h=e[21];const y=h[t.toolApprovalLevel];let S;e[22]!==y?(S=s.jsx(Ee,{className:"w-36",children:s.jsx("span",{children:y})}),e[22]=y,e[23]=S):S=e[23];let C;e[24]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Y,{value:"none",textValue:"None",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"None"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Require approval for all tool calls"})]})}),e[24]=C):C=e[24];let _;e[25]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Y,{value:"readonly",textValue:"Read-only",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Read-only"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[25]=_):_=e[25];let v;e[26]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs($e,{children:[C,_,s.jsx(Y,{value:"yolo",textValue:"YOLO",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"YOLO"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all tools without approval"})]})})]}),e[26]=v):v=e[26];let c;e[27]!==t.toolApprovalLevel||e[28]!==j||e[29]!==S?(c=s.jsx(ie,{icon:g,label:"Tool Approval",description:"Choose when to require approval before tools execute.",control:s.jsxs(ze,{value:t.toolApprovalLevel,onValueChange:j,children:[S,v]})}),e[27]=t.toolApprovalLevel,e[28]=j,e[29]=S,e[30]=c):c=e[30];let p;return e[31]!==c||e[32]!==d||e[33]!==a?(p=s.jsxs("div",{className:"flex flex-col gap-6",children:[l,s.jsxs("div",{className:"flex flex-col",children:[d,a,c]})]}),e[31]=c,e[32]=d,e[33]=a,e[34]=p):p=e[34],p}function It(e){return{...e,devMode:!e.devMode}}function zt(e){return{...e,enableNotifications:!1}}function je(e){const t=z.c(22),{icon:n,label:r,description:i,checked:l,onCheckedChange:o}=e;let m;t[0]!==l||t[1]!==o?(m=()=>o(!l),t[0]=l,t[1]=o,t[2]=m):m=t[2];let u;t[3]!==n?(u=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:n}),t[3]=n,t[4]=u):u=t[4];let f;t[5]!==r?(f=s.jsx("p",{className:"text-sm font-medium text-foreground",children:r}),t[5]=r,t[6]=f):f=t[6];let d;t[7]!==i?(d=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:i}),t[7]=i,t[8]=d):d=t[8];let x;t[9]!==f||t[10]!==d?(x=s.jsxs("div",{className:"min-w-0",children:[f,d]}),t[9]=f,t[10]=d,t[11]=x):x=t[11];let a;t[12]!==u||t[13]!==x?(a=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[u,x]}),t[12]=u,t[13]=x,t[14]=a):a=t[14];let g;t[15]!==l||t[16]!==o?(g=s.jsx("div",{onClick:Et,className:"shrink-0",children:s.jsx(se,{checked:l,onCheckedChange:o})}),t[15]=l,t[16]=o,t[17]=g):g=t[17];let j;return t[18]!==m||t[19]!==a||t[20]!==g?(j=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0 cursor-pointer",onClick:m,children:[a,g]}),t[18]=m,t[19]=a,t[20]=g,t[21]=j):j=t[21],j}function Et(e){return e.stopPropagation()}function $t(){const e=z.c(16),[t,n]=ue();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{children:[s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Experimental"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"These features are unstable and may change or stop working at any time."})]}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Le,{size:16}),e[1]=i):i=e[1];let l;e[2]!==n?(l=x=>n(a=>({...a,experimental_projects:x})),e[2]=n,e[3]=l):l=e[3];let o;e[4]!==t.experimental_projects||e[5]!==l?(o=s.jsx(je,{icon:i,label:"Projects",description:"Enable the projects feature in the sidebar.",checked:t.experimental_projects,onCheckedChange:l}),e[4]=t.experimental_projects,e[5]=l,e[6]=o):o=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(st,{size:16}),e[7]=m):m=e[7];let u;e[8]!==n?(u=x=>n(a=>({...a,experimental_tasks:x})),e[8]=n,e[9]=u):u=e[9];let f;e[10]!==t.experimental_tasks||e[11]!==u?(f=s.jsx(je,{icon:m,label:"Tasks",description:"Enable the tasks feature in the sidebar.",checked:t.experimental_tasks,onCheckedChange:u}),e[10]=t.experimental_tasks,e[11]=u,e[12]=f):f=e[12];let d;return e[13]!==o||e[14]!==f?(d=s.jsxs("div",{className:"flex flex-col gap-6",children:[r,s.jsxs("div",{className:"flex flex-col rounded-lg border border-border bg-muted/25 px-4",children:[o,f]})]}),e[13]=o,e[14]=f,e[15]=d):d=e[15],d}const Dt=ve({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:W().optional()});function Ot(e){const t=z.c(24),{value:n,onChange:r,name:i}=e,l=O.useRef(null);let o;t[0]!==r?(o=v=>{const c=v.target.files?.[0];if(c){if(c.size>2097152){R.error("Image must be smaller than 2MB");return}const p=new FileReader;p.onerror=()=>{const b=p.error;console.error("FileReader error:",b),R.error(b?.message||"Failed to read image file. Please try again."),l.current&&(l.current.value="")},p.onloadend=()=>{if(p.readyState===FileReader.DONE&&p.result){const b=p.result;r(b)}},p.readAsDataURL(c)}},t[0]=r,t[1]=o):o=t[1];const m=o;let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{l.current?.click()},t[2]=u):u=t[2];const f=u;let d;t[3]!==r?(d=v=>{v.stopPropagation(),r("")},t[3]=r,t[4]=d):d=t[4];const x=d;let a;t[5]!==m?(a=s.jsx("input",{type:"file",ref:l,className:"hidden",accept:"image/*",onChange:m}),t[5]=m,t[6]=a):a=t[6];let g;t[7]!==x||t[8]!==i||t[9]!==n?(g=n?s.jsxs("div",{className:"relative group",children:[s.jsx("div",{className:"h-20 w-20 rounded-lg border border-border bg-muted/20 overflow-hidden",children:s.jsx("img",{src:n,alt:i||"Organization logo",className:"w-full h-full object-cover"})}),s.jsx("button",{type:"button",onClick:x,className:"absolute -top-2 -right-2 h-6 w-6 rounded-full bg-destructive text-destructive-foreground opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:s.jsx(Pe,{className:"h-3 w-3"})})]}):s.jsxs("button",{type:"button",onClick:f,className:"h-20 w-20 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent/50 transition-colors flex flex-col items-center justify-center gap-1 text-muted-foreground hover:text-foreground",children:[s.jsx(nt,{className:"h-5 w-5"}),s.jsx("span",{className:"text-xs",children:"Upload"})]}),t[7]=x,t[8]=i,t[9]=n,t[10]=g):g=t[10];const j=n?"Change Logo":"Upload Logo";let h;t[11]!==j?(h=s.jsx(U,{type:"button",variant:"outline",size:"sm",onClick:f,className:"mb-2",children:j}),t[11]=j,t[12]=h):h=t[12];let y;t[13]!==x||t[14]!==n?(y=n&&s.jsx(U,{type:"button",variant:"ghost",size:"sm",onClick:x,className:"ml-2",children:"Remove"}),t[13]=x,t[14]=n,t[15]=y):y=t[15];let S;t[16]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),t[16]=S):S=t[16];let C;t[17]!==h||t[18]!==y?(C=s.jsxs("div",{className:"flex-1",children:[h,y,S]}),t[17]=h,t[18]=y,t[19]=C):C=t[19];let _;return t[20]!==C||t[21]!==a||t[22]!==g?(_=s.jsxs("div",{className:"flex items-start gap-4",children:[a,g,C]}),t[20]=C,t[21]=a,t[22]=g,t[23]=_):_=t[23],_}function Tt(){const e=ne(),{org:t,project:n}=J(),r=le(),[i,l]=O.useState(!1),o=Ne({resolver:Se(Dt),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),m=oe({mutationFn:async d=>{const x={name:d.name,slug:d.slug};d.logo&&(x.logo=d.logo);const a=await me.organization.update({organizationId:t.id,data:x});if(a?.error)throw new Error(a.error.message||"Failed to update organization");return a},onSuccess:d=>{r.invalidateQueries({queryKey:q.organizations()}),r.invalidateQueries({queryKey:q.activeOrganization(t.slug)}),R.success("Organization settings updated successfully"),d?.data?.slug&&d.data.slug!==t.slug&&e({to:"/$org/$project/settings",params:{org:d.data.slug,project:n.slug}})},onError:d=>{R.error(d instanceof Error?d.message:"Failed to update organization")},onSettled:()=>{l(!1)}}),u=d=>{l(!0),m.mutate(d)},f=o.formState.isDirty;return s.jsx(De,{...o,children:s.jsxs("form",{onSubmit:o.handleSubmit(u),className:"space-y-6",children:[s.jsx(Z,{control:o.control,name:"name",render:({field:d})=>s.jsxs(K,{children:[s.jsx(Q,{children:"Organization Name"}),s.jsx(V,{children:s.jsx(ee,{placeholder:"My Organization",...d,disabled:i})}),s.jsx(H,{})]})}),s.jsx(Z,{control:o.control,name:"slug",render:({field:d})=>s.jsxs(K,{children:[s.jsx(Q,{children:"Organization Slug"}),s.jsx(V,{children:s.jsx(ee,{placeholder:"my-organization",...d,disabled:i,onChange:x=>{const a=x.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");d.onChange(a)}})}),s.jsx(ce,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(H,{})]})}),s.jsx(Z,{control:o.control,name:"logo",render:({field:d})=>s.jsxs(K,{children:[s.jsx(Q,{children:"Logo"}),s.jsx(V,{children:s.jsx(Ot,{value:d.value,onChange:d.onChange,name:o.watch("name")})}),s.jsx(H,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(U,{type:"submit",disabled:!f||i,className:"min-w-24",children:i?"Saving...":"Save Changes"}),f&&s.jsx(U,{type:"button",variant:"outline",onClick:()=>o.reset(),disabled:i,children:"Cancel"})]})]})})}function At(){const e=z.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Organization"})}),s.jsx(Tt,{})]}),e[0]=t):t=e[0],t}const Ft=ve({name:W().min(1,"Name is required").max(200,"Name is too long"),description:W().max(1e3,"Description is too long").nullable(),themeColor:W().nullable()});function Lt(){const e=z.c(63),{org:t,project:n}=J(),r=le(),i=n.slug===G;let l;e[0]!==t.id?(l={connectionId:fe,orgId:t.id},e[0]=t.id,e[1]=l):l=e[1];const o=xe(l);let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=Se(Ft),e[2]=m):m=e[2];const u=n.name??"",f=n.description??"",d=n.ui?.themeColor??"#60a5fa";let x;e[3]!==u||e[4]!==f||e[5]!==d?(x={resolver:m,values:{name:u,description:f,themeColor:d}},e[3]=u,e[4]=f,e[5]=d,e[6]=x):x=e[6];const a=Ne(x);let g;e[7]!==o||e[8]!==n.id||e[9]!==n.ui?.banner||e[10]!==n.ui?.bannerColor||e[11]!==n.ui?.icon?(g=async k=>{const w=await o.callTool({name:"PROJECT_UPDATE",arguments:{projectId:n.id,name:k.name,description:k.description||null,ui:{themeColor:k.themeColor||null,banner:n.ui?.banner??null,bannerColor:n.ui?.bannerColor??null,icon:n.ui?.icon??null}}});return w.structuredContent??w},e[7]=o,e[8]=n.id,e[9]=n.ui?.banner,e[10]=n.ui?.bannerColor,e[11]=n.ui?.icon,e[12]=g):g=e[12];let j;e[13]!==a||e[14]!==t.id||e[15]!==n.slug||e[16]!==r?(j=()=>{r.invalidateQueries({queryKey:q.project(t.id,n.slug)}),r.invalidateQueries({queryKey:q.projects(t.id)}),a.reset(a.getValues())},e[13]=a,e[14]=t.id,e[15]=n.slug,e[16]=r,e[17]=j):j=e[17];let h;e[18]!==g||e[19]!==j?(h={mutationFn:g,onSuccess:j,onError:Bt},e[18]=g,e[19]=j,e[20]=h):h=e[20];const y=oe(h);let S;e[21]!==y?(S=async k=>{await y.mutateAsync(k)},e[21]=y,e[22]=S):S=e[22];const C=S;let _;e[23]!==a||e[24]!==C?(_=k=>{k(),a.handleSubmit(C)()},e[23]=a,e[24]=C,e[25]=_):_=e[25];const v=_;let c;e[26]!==a||e[27]!==C?(c=a.handleSubmit(C),e[26]=a,e[27]=C,e[28]=c):c=e[28];let p;e[29]!==i||e[30]!==y.isPending||e[31]!==v?(p=k=>{const{field:w}=k;return s.jsxs(K,{children:[s.jsx(Q,{children:"Project Name"}),s.jsx(V,{children:s.jsx(ee,{placeholder:"My Project",...w,onBlur:()=>v(w.onBlur),disabled:i||y.isPending})}),i&&s.jsx(ce,{children:"The organization admin project name cannot be changed."}),s.jsx(H,{})]})},e[29]=i,e[30]=y.isPending,e[31]=v,e[32]=p):p=e[32];let b;e[33]!==a.control||e[34]!==p?(b=s.jsx(Z,{control:a.control,name:"name",render:p}),e[33]=a.control,e[34]=p,e[35]=b):b=e[35];let N;e[36]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Q,{children:"Slug"}),e[36]=N):N=e[36];let P;e[37]!==n.slug?(P=s.jsx(V,{children:s.jsx(ee,{value:n.slug,disabled:!0,className:"bg-muted"})}),e[37]=n.slug,e[38]=P):P=e[38];let I;e[39]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(ce,{children:"The project slug cannot be changed after creation."}),e[39]=I):I=e[39];let E;e[40]!==P?(E=s.jsxs(K,{children:[N,P,I]}),e[40]=P,e[41]=E):E=e[41];let T;e[42]!==y.isPending||e[43]!==v?(T=k=>{const{field:w}=k;return s.jsxs(K,{children:[s.jsx(Q,{children:"Description"}),s.jsx(V,{children:s.jsx(lt,{placeholder:"Optional project description...",rows:3,...w,value:w.value??"",onBlur:()=>v(w.onBlur),disabled:y.isPending})}),s.jsx(H,{})]})},e[42]=y.isPending,e[43]=v,e[44]=T):T=e[44];let $;e[45]!==a.control||e[46]!==T?($=s.jsx(Z,{control:a.control,name:"description",render:T}),e[45]=a.control,e[46]=T,e[47]=$):$=e[47];let D;e[48]!==y.isPending||e[49]!==v?(D=k=>{const{field:w}=k;return s.jsxs(K,{children:[s.jsx(Q,{children:"Color"}),s.jsx(V,{children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"size-9 rounded-md border border-input overflow-hidden cursor-pointer shrink-0",style:{backgroundColor:w.value??"#60a5fa"},children:s.jsx("input",{type:"color",value:w.value??"#60a5fa",onChange:B=>w.onChange(B.target.value),onBlur:()=>v(w.onBlur),disabled:y.isPending,className:"opacity-0 w-full h-full cursor-pointer"})}),s.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:w.value??"#60a5fa"})]})}),s.jsx(H,{})]})},e[48]=y.isPending,e[49]=v,e[50]=D):D=e[50];let A;e[51]!==a.control||e[52]!==D?(A=s.jsx(Z,{control:a.control,name:"themeColor",render:D}),e[51]=a.control,e[52]=D,e[53]=A):A=e[53];let F;e[54]!==c||e[55]!==b||e[56]!==E||e[57]!==$||e[58]!==A?(F=s.jsxs("form",{onSubmit:c,className:"space-y-6",children:[b,E,$,A]}),e[54]=c,e[55]=b,e[56]=E,e[57]=$,e[58]=A,e[59]=F):F=e[59];let L;return e[60]!==a||e[61]!==F?(L=s.jsx("div",{className:"flex flex-col",children:s.jsx(De,{...a,children:F})}),e[60]=a,e[61]=F,e[62]=L):L=e[62],L}function Bt(e){R.error("Failed to update project: "+(e instanceof Error?e.message:"Unknown error"))}function Ae(){const e=z.c(45),{org:t,project:n}=J(),r=ne(),i=le(),[l,o]=O.useState(""),[m,u]=O.useState(!1),f=n.slug===G;let d;e[0]!==t.id?(d={connectionId:fe,orgId:t.id},e[0]=t.id,e[1]=d):d=e[1];const x=xe(d);let a;e[2]!==x||e[3]!==n.id?(a=async()=>{const M=await x.callTool({name:"PROJECT_DELETE",arguments:{projectId:n.id}});return M.structuredContent??M},e[2]=x,e[3]=n.id,e[4]=a):a=e[4];let g;e[5]!==r||e[6]!==t.id||e[7]!==t.slug||e[8]!==i?(g=M=>{M.success?(i.invalidateQueries({queryKey:q.projects(t.id)}),R.success("Project deleted"),r({to:"/$org/$project",params:{org:t.slug,project:G}})):R.error(M.message??"Failed to delete project")},e[5]=r,e[6]=t.id,e[7]=t.slug,e[8]=i,e[9]=g):g=e[9];let j;e[10]!==a||e[11]!==g?(j={mutationFn:a,onSuccess:g,onError:Rt},e[10]=a,e[11]=g,e[12]=j):j=e[12];const h=oe(j);if(f)return null;const y=l===n.name;let S;e[13]!==h?(S=()=>{h.mutate()},e[13]=h,e[14]=S):S=e[14];const C=S;let _;e[15]===Symbol.for("react.memo_cache_sentinel")?(_=M=>{u(M),M||o("")},e[15]=_):_=e[15];const v=_;let c;e[16]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"Danger Zone"}),e[16]=c):c=e[16];let p;e[17]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Delete Project"}),s.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Permanently delete this project and all its data. This action cannot be undone."})]}),e[17]=p):p=e[17];let b;e[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(rt,{asChild:!0,children:s.jsx(U,{variant:"outline",className:"shrink-0 bg-destructive/10 text-destructive border-0 hover:bg-destructive/15 hover:text-destructive",children:"Delete Project"})}),e[18]=b):b=e[18];let N;e[19]!==n.name?(N=s.jsxs(ot,{children:['Delete "',n.name,'"?']}),e[19]=n.name,e[20]=N):N=e[20];let P;e[21]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(it,{children:"This action cannot be undone. All project data will be permanently deleted."}),e[21]=P):P=e[21];let I;e[22]!==N?(I=s.jsxs(at,{children:[N,P]}),e[22]=N,e[23]=I):I=e[23];let E;e[24]!==n.name?(E=s.jsxs("p",{className:"text-sm mb-2",children:["Type ",s.jsx("strong",{children:n.name})," to confirm:"]}),e[24]=n.name,e[25]=E):E=e[25];let T;e[26]===Symbol.for("react.memo_cache_sentinel")?(T=M=>o(M.target.value),e[26]=T):T=e[26];let $;e[27]!==l||e[28]!==n.name?($=s.jsx(ee,{value:l,onChange:T,placeholder:n.name}),e[27]=l,e[28]=n.name,e[29]=$):$=e[29];let D;e[30]!==E||e[31]!==$?(D=s.jsxs("div",{className:"py-4",children:[E,$]}),e[30]=E,e[31]=$,e[32]=D):D=e[32];let A;e[33]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(ct,{children:"Cancel"}),e[33]=A):A=e[33];const F=!y||h.isPending,L=h.isPending?"Deleting...":"Delete Project";let k;e[34]!==C||e[35]!==F||e[36]!==L?(k=s.jsxs(dt,{children:[A,s.jsx(mt,{onClick:C,disabled:F,className:"bg-destructive/10 text-destructive hover:bg-destructive/15 hover:text-destructive border-0",children:L})]}),e[34]=C,e[35]=F,e[36]=L,e[37]=k):k=e[37];let w;e[38]!==I||e[39]!==D||e[40]!==k?(w=s.jsxs(ut,{children:[I,D,k]}),e[38]=I,e[39]=D,e[40]=k,e[41]=w):w=e[41];let B;return e[42]!==m||e[43]!==w?(B=s.jsxs("div",{className:"flex flex-col",children:[c,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[p,s.jsxs(ft,{open:m,onOpenChange:v,children:[b,w]})]})]}),e[42]=m,e[43]=w,e[44]=B):B=e[44],B}function Rt(e){R.error("Failed to delete project: "+(e instanceof Error?e.message:"Unknown error"))}function Mt(){const e=z.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"General"}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"flex flex-col",children:[t,s.jsxs("div",{className:"pt-6 flex flex-col gap-6",children:[s.jsx(Lt,{}),s.jsx(Ae,{})]})]}),e[1]=n):n=e[1],n}function Ut({value:e,onValueChange:t,placeholder:n="Select a connection...",binding:r,bindingType:i,onAddNew:l,className:o,disabled:m=!1}){const[u,f]=O.useState(!1),{installByBinding:d,isInstalling:x}=yt(),a=u||x,g=ht(),j=jt({connections:g,binding:typeof r=="string"?r:void 0}),h=!r||!g?g??[]:typeof r=="string"?j:Array.isArray(r)&&r.length>0?g.filter(c=>bt(c,r)):g,y=(()=>{if(!i?.startsWith("@"))return null;const[c,p]=i.replace("@","").split("/");return c&&p?{scope:c,appName:p}:null})(),S=(()=>{let c=h;const p=Array.isArray(r)&&r.length>0;if(y&&!p&&(c=c.filter(b=>{const N=b.app_name,P=b.metadata?.scopeName;return N===y.appName&&P===y.scope})),e&&!c.some(b=>b.id===e)){const b=g?.find(N=>N.id===e);if(b)return[b,...c]}return c})(),C=i?.startsWith("@"),_=async()=>{if(C&&i){f(!0);try{const c=await d(i);c&&t(c.id)}finally{f(!1)}return}l?.()},v=S.find(c=>c.id===e);return s.jsxs(ze,{value:e??"none",onValueChange:c=>t(c==="none"?null:c),disabled:m,children:[s.jsx(Ee,{size:"sm",className:X("w-[200px]",o),children:s.jsx(Xe,{placeholder:n,children:v?s.jsxs("div",{className:"flex items-center gap-2",children:[v.icon?s.jsx("img",{src:v.icon,alt:v.title,className:"w-4 h-4 rounded shrink-0"}):s.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary shrink-0",children:v.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"truncate",children:v.title})]}):n})}),s.jsxs($e,{children:[s.jsx(Y,{value:"none",children:"No connection"}),S.length===0?s.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No compatible connections found"}):S.map(c=>s.jsx(Y,{value:c.id,children:s.jsxs("div",{className:"flex items-center gap-2",children:[c.icon?s.jsx("img",{src:c.icon,alt:c.title,className:"w-4 h-4 rounded"}):s.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:c.title.slice(0,1).toUpperCase()}),s.jsx("span",{children:c.title})]})},c.id)),(l||C)&&s.jsx("div",{className:"border-t border-border",children:s.jsx(U,{onPointerDown:c=>c.stopPropagation(),onClick:c=>{c.preventDefault(),c.stopPropagation(),_()},disabled:a||m,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:a?s.jsxs(s.Fragment,{children:[s.jsx(vt,{size:16,className:"animate-spin"}),s.jsx("span",{children:"Connecting..."})]}):s.jsxs(s.Fragment,{children:[s.jsx(Nt,{size:16}),s.jsx("span",{children:"Add Connection"})]})})})]})]})}const qt=e=>{if(!e||typeof e!="object")return!1;const t=e;return t.type==="text"&&typeof t.text=="string"&&t.text.trim().toLowerCase().startsWith("error")},de=e=>{const t=e.structuredContent??e,n=t&&typeof t=="object"?t:null,r=n?.content?.[0]?.text&&typeof n.content[0].text=="string"?n.content[0].text:null;if(n?.isError)throw new Error(r??"Tool call failed");if(qt(t))throw new Error(t.text);return t};function Gt(e){return e.requiresMcpBinding===!0?!0:e.binding!==void 0}function Kt(e){const t=z.c(57),{plugin:n,isEnabled:r,isSaving:i,pendingBinding:l,description:o,label:m,icon:u,projectId:f,client:d,onBindingChange:x,onToggle:a}=e;let g;t[0]!==n?(g=Gt(n),t[0]=n,t[1]=g):g=t[1];const j=g;let h;t[2]!==n.id||t[3]!==f?(h=q.projectPluginConfig(f??"",n.id),t[2]=n.id,t[3]=f,t[4]=h):h=t[4];let y;t[5]!==d||t[6]!==n.id||t[7]!==f?(y=async()=>{if(!f)throw new Error("Project ID is required to load plugin config.");const B=await d.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:f,pluginId:n.id}});return de(B)},t[5]=d,t[6]=n.id,t[7]=f,t[8]=y):y=t[8];const S=!!f&&j;let C;t[9]!==h||t[10]!==y||t[11]!==S?(C={queryKey:h,queryFn:y,enabled:S},t[9]=h,t[10]=y,t[11]=S,t[12]=C):C=t[12];const{data:_,isLoading:v}=xt(C),c=_?.config?.connectionId??null,p=l!==void 0?l:c;let b;t[13]!==r||t[14]!==i||t[15]!==a||t[16]!==n.id?(b=()=>!i&&a(n.id,!r),t[13]=r,t[14]=i,t[15]=a,t[16]=n.id,t[17]=b):b=t[17];const N=i?void 0:"pointer";let P;t[18]!==N?(P={cursor:N},t[18]=N,t[19]=P):P=t[19];let I;t[20]!==u?(I=u&&s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0 [&>svg]:size-4",children:u}),t[20]=u,t[21]=I):I=t[21];let E;t[22]!==m?(E=s.jsx("p",{className:"text-sm font-medium text-foreground",children:m}),t[22]=m,t[23]=E):E=t[23];let T;t[24]!==o?(T=o&&s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:o}),t[24]=o,t[25]=T):T=t[25];let $;t[26]!==E||t[27]!==T?($=s.jsxs("div",{className:"min-w-0",children:[E,T]}),t[26]=E,t[27]=T,t[28]=$):$=t[28];let D;t[29]!==$||t[30]!==I?(D=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[I,$]}),t[29]=$,t[30]=I,t[31]=D):D=t[31];let A;t[32]!==a||t[33]!==n.id?(A=B=>a(n.id,B),t[32]=a,t[33]=n.id,t[34]=A):A=t[34];let F;t[35]!==r||t[36]!==i||t[37]!==A?(F=s.jsx("div",{onClick:Vt,className:"shrink-0",children:s.jsx(se,{checked:r,onCheckedChange:A,disabled:i})}),t[35]=r,t[36]=i,t[37]=A,t[38]=F):F=t[38];let L;t[39]!==D||t[40]!==F?(L=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[D,F]}),t[39]=D,t[40]=F,t[41]=L):L=t[41];let k;t[42]!==v||t[43]!==r||t[44]!==i||t[45]!==j||t[46]!==x||t[47]!==n.binding||t[48]!==n.id||t[49]!==p||t[50]!==c?(k=r&&j&&s.jsxs("div",{onClick:Qt,className:"pb-4 pl-7 flex items-center gap-3",children:[s.jsx(gt,{className:"text-xs text-muted-foreground w-24",children:"Connection"}),s.jsx(Ut,{value:p??null,onValueChange:B=>x(n.id,B,c),binding:n.binding,placeholder:"Select connection...",className:"w-56",disabled:i||v})]}),t[42]=v,t[43]=r,t[44]=i,t[45]=j,t[46]=x,t[47]=n.binding,t[48]=n.id,t[49]=p,t[50]=c,t[51]=k):k=t[51];let w;return t[52]!==L||t[53]!==k||t[54]!==b||t[55]!==P?(w=s.jsxs("div",{className:"flex flex-col border-b border-border last:border-0",onClick:b,style:P,children:[L,k]}),t[52]=L,t[53]=k,t[54]=b,t[55]=P,t[56]=w):w=t[56],w}function Qt(e){return e.stopPropagation()}function Vt(e){return e.stopPropagation()}function Jt(){const{org:e,project:t}=J(),n=le(),r=xe({connectionId:fe,orgId:e.id}),[i,l]=O.useState({}),[o,m]=O.useState({}),[u,f]=O.useState(!1),d=t.enabledPlugins??[],x=c=>{const p=i[c];return p!==void 0?p:d.includes(c)},a=()=>{const c=new Set(d);for(const[p,b]of Object.entries(i))b?c.add(p):c.delete(p);return Array.from(c)},g=Object.keys(i).length>0||Object.keys(o).length>0,j=(c,p)=>{const b=d.includes(c);l(p===b?N=>{const{[c]:P,...I}=N;return I}:N=>({...N,[c]:p}))},h=(c,p,b)=>{if(p===b){m(N=>{const{[c]:P,...I}=N;return I});return}m(N=>({...N,[c]:p}))},y=oe({mutationFn:async c=>{const p=[];if(c.updatePlugins){const b=await r.callTool({name:"PROJECT_UPDATE",arguments:{projectId:t.id,enabledPlugins:c.enabledPlugins}});p.push(de(b))}if(c.bindingUpdates.length>0){const b=await Promise.all(c.bindingUpdates.map(async({pluginId:N,connectionId:P})=>{const I=await r.callTool({name:"PROJECT_PLUGIN_CONFIG_UPDATE",arguments:{projectId:t.id,pluginId:N,connectionId:P}});return de(I)}));p.push(...b)}return p},onSuccess:(c,p)=>{p.updatePlugins&&(n.invalidateQueries({queryKey:q.project(e.id,t.slug)}),n.invalidateQueries({queryKey:q.projects(e.id)})),p.bindingUpdates.forEach(({pluginId:b})=>{n.invalidateQueries({queryKey:q.projectPluginConfig(t.id??"",b)})}),l({}),m({}),R.success("Plugins updated successfully")},onError:c=>{R.error("Failed to update plugins: "+(c instanceof Error?c.message:"Unknown error"))},onSettled:()=>{f(!1)}}),S=()=>{f(!0),y.mutate({enabledPlugins:a(),updatePlugins:Object.keys(i).length>0,bindingUpdates:Object.entries(o).map(([c,p])=>({pluginId:c,connectionId:p}))})},C=()=>{l({}),m({})},_=c=>{const p=Be.find(b=>b.pluginId===c);return p?{label:p.label,icon:p.items[0]?.icon}:null},v=c=>re.find(b=>b.id===c)?.description??null;return re.length===0?s.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}):s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"flex flex-col",children:re.map(c=>{const p=_(c.id),b=v(c.id),N=x(c.id);return s.jsx(Kt,{plugin:c,isEnabled:N,isSaving:u,pendingBinding:o[c.id],description:b,label:p?.label??c.id,icon:p?.icon??s.jsx(pt,{size:14}),projectId:t.id,client:r,onBindingChange:h,onToggle:j},c.id)})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(U,{variant:"outline",onClick:C,disabled:!g||u,children:"Cancel"}),s.jsx(U,{onClick:S,disabled:!g||u,className:"min-w-24",children:u?"Saving...":"Save Changes"})]})]})}function be(){const e=z.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Plugins"})}),s.jsx(Jt,{})]}),e[0]=t):t=e[0],t}function Wt(){const e=z.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Danger Zone"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Irreversible and destructive actions."})]}),s.jsx(Ae,{})]}),e[0]=t):t=e[0],t}function Fe(){const e=z.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(te,{className:"h-6 w-48"}),n=s.jsx(te,{className:"h-4 w-80"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[t,n,s.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[s.jsx(te,{className:"h-12 w-full"}),s.jsx(te,{className:"h-12 w-full"})]})]}),e[2]=r):r=e[2],r}function ye(e){const t=z.c(14),{projectSlug:n,children:r}=e,{org:i}=J(),{data:l,isLoading:o}=_e(i.id,n);if(o||!l){let x;return t[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Fe,{}),t[0]=x):x=t[0],x}const m=n===G;let u;t[1]!==l.description||t[2]!==l.enabledPlugins||t[3]!==l.id||t[4]!==l.name||t[5]!==l.organizationId||t[6]!==l.slug||t[7]!==l.ui||t[8]!==m?(u={id:l.id,organizationId:l.organizationId,slug:l.slug,name:l.name,description:l.description,enabledPlugins:l.enabledPlugins,ui:l.ui,isOrgAdmin:m},t[1]=l.description,t[2]=l.enabledPlugins,t[3]=l.id,t[4]=l.name,t[5]=l.organizationId,t[6]=l.slug,t[7]=l.ui,t[8]=m,t[9]=u):u=t[9];const f=u;let d;return t[10]!==r||t[11]!==f||t[12]!==i?(d=s.jsx(Ce,{org:i,project:f,children:r}),t[10]=r,t[11]=f,t[12]=i,t[13]=d):d=t[13],d}function Zt(e){const t=z.c(19),{section:n}=e;let r;t[0]!==n?(r=ke(n),t[0]=n,t[1]=r):r=t[1];const i=r;if(i){let l;t[2]!==i.sub?(l=i.sub==="general"&&s.jsx(Mt,{}),t[2]=i.sub,t[3]=l):l=t[3];let o;t[4]!==i.sub?(o=i.sub==="plugins"&&s.jsx(be,{}),t[4]=i.sub,t[5]=o):o=t[5];let m;t[6]!==i.sub?(m=i.sub==="danger"&&s.jsx(Wt,{}),t[6]=i.sub,t[7]=m):m=t[7];let u;return t[8]!==i.slug||t[9]!==l||t[10]!==o||t[11]!==m?(u=s.jsxs(ye,{projectSlug:i.slug,children:[l,o,m]}),t[8]=i.slug,t[9]=l,t[10]=o,t[11]=m,t[12]=u):u=t[12],u}switch(n){case"account.profile":{let l;return t[13]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(kt,{}),t[13]=l):l=t[13],l}case"account.preferences":{let l;return t[14]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(he,{}),t[14]=l):l=t[14],l}case"account.experimental":{let l;return t[15]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx($t,{}),t[15]=l):l=t[15],l}case"org.general":{let l;return t[16]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(At,{}),t[16]=l):l=t[16],l}case"org.plugins":{let l;return t[17]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ye,{projectSlug:G,children:s.jsx(be,{})}),t[17]=l):l=t[17],l}default:{let l;return t[18]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(he,{}),t[18]=l):l=t[18],l}}}function Ht(){const e=z.c(23),{isOpen:t,activeSection:n,open:r,close:i}=Ze();let l;e[0]!==i?(l=y=>!y&&i(),e[0]=i,e[1]=l):l=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"w-52 shrink-0 border-r border-border"}),e[2]=o):o=e[2];let m;e[3]!==n||e[4]!==r?(m=s.jsx(O.Suspense,{fallback:o,children:s.jsx(Pt,{activeSection:n,onNavigate:r})}),e[3]=n,e[4]=r,e[5]=m):m=e[5];let u,f;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Pe,{size:16}),f=s.jsx("span",{className:"sr-only",children:"Close"}),e[6]=u,e[7]=f):(u=e[6],f=e[7]);let d;e[8]!==i?(d=s.jsxs("button",{type:"button",onClick:i,className:"absolute top-4 right-4 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-ring",children:[u,f]}),e[8]=i,e[9]=d):d=e[9];let x;e[10]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Fe,{}),e[10]=x):x=e[10];let a;e[11]!==n?(a=s.jsx(O.Suspense,{fallback:x,children:s.jsx(Zt,{section:n})}),e[11]=n,e[12]=a):a=e[12];let g;e[13]!==d||e[14]!==a?(g=s.jsxs("div",{className:"flex-1 overflow-y-auto p-8 min-w-0 relative",children:[d,a]}),e[13]=d,e[14]=a,e[15]=g):g=e[15];let j;e[16]!==m||e[17]!==g?(j=s.jsx(qe,{className:"sm:max-w-[1100px] h-[85vh] p-0 overflow-hidden flex flex-col gap-0",closeButtonClassName:"hidden",children:s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[m,g]})}),e[16]=m,e[17]=g,e[18]=j):j=e[18];let h;return e[19]!==t||e[20]!==l||e[21]!==j?(h=s.jsx(Ge,{open:t,onOpenChange:l,children:j}),e[19]=t,e[20]=l,e[21]=j,e[22]=h):h=e[22],h}function Yt(e){const t=z.c(12),{projectSlug:n,orgSlug:r,error:i}=e,l=ne();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("h1",{className:"text-xl font-semibold",children:"Failed to load project"}),t[0]=o):o=t[0];let m;t[1]!==n?(m=s.jsxs("p",{className:"text-muted-foreground text-center",children:['There was an error loading the project "',n,'".']}),t[1]=n,t[2]=m):m=t[2];let u;t[3]!==i.message?(u=s.jsx("p",{className:"text-sm text-muted-foreground",children:i.message}),t[3]=i.message,t[4]=u):u=t[4];let f;t[5]!==l||t[6]!==r?(f=s.jsx(U,{variant:"link",onClick:()=>l({to:"/$org/$project",params:{org:r,project:G}}),children:"Go to organization home"}),t[5]=l,t[6]=r,t[7]=f):f=t[7];let d;return t[8]!==m||t[9]!==u||t[10]!==f?(d=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[o,m,u,f]}),t[8]=m,t[9]=u,t[10]=f,t[11]=d):d=t[11],d}function Xt(e){const t=z.c(9),{projectSlug:n,orgSlug:r}=e,i=ne();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("h1",{className:"text-xl font-semibold",children:"Project not found"}),t[0]=l):l=t[0];let o;t[1]!==n?(o=s.jsxs("p",{className:"text-muted-foreground text-center",children:['The project "',n,'" does not exist in this organization.']}),t[1]=n,t[2]=o):o=t[2];let m;t[3]!==i||t[4]!==r?(m=s.jsx(U,{variant:"link",onClick:()=>i({to:"/$org/$project",params:{org:r,project:G}}),children:"Go to organization home"}),t[3]=i,t[4]=r,t[5]=m):m=t[5];let u;return t[6]!==o||t[7]!==m?(u=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[l,o,m]}),t[6]=o,t[7]=m,t[8]=u):u=t[8],u}function es(){const e=z.c(23);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=Re(t),{org:r}=J(),i=n.org,l=n.project,{data:o,isLoading:m,error:u}=_e(r.id,l);if(m){let h;return e[1]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ae,{}),e[1]=h):h=e[1],h}if(u){let h;return e[2]!==u||e[3]!==i||e[4]!==l?(h=s.jsx(Yt,{projectSlug:l,orgSlug:i,error:u}),e[2]=u,e[3]=i,e[4]=l,e[5]=h):h=e[5],h}if(!o){let h;return e[6]!==i||e[7]!==l?(h=s.jsx(Xt,{projectSlug:l,orgSlug:i}),e[6]=i,e[7]=l,e[8]=h):h=e[8],h}const f=o.slug===G;let d;e[9]!==o.description||e[10]!==o.enabledPlugins||e[11]!==o.id||e[12]!==o.name||e[13]!==o.organizationId||e[14]!==o.slug||e[15]!==o.ui||e[16]!==f?(d={id:o.id,organizationId:o.organizationId,slug:o.slug,name:o.name,description:o.description,enabledPlugins:o.enabledPlugins,ui:o.ui,isOrgAdmin:f},e[9]=o.description,e[10]=o.enabledPlugins,e[11]=o.id,e[12]=o.name,e[13]=o.organizationId,e[14]=o.slug,e[15]=o.ui,e[16]=f,e[17]=d):d=e[17];const x=d;let a,g;e[18]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(O.Suspense,{fallback:s.jsx(ae,{}),children:s.jsx(Me,{})}),g=s.jsx(Ht,{}),e[18]=a,e[19]=g):(a=e[18],g=e[19]);let j;return e[20]!==x||e[21]!==r?(j=s.jsxs(Ce,{org:r,project:x,children:[a,g]}),e[20]=x,e[21]=r,e[22]=j):j=e[22],j}function Rs(){const e=z.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(O.Suspense,{fallback:s.jsx(ae,{}),children:s.jsx(es,{})}),e[0]=t):t=e[0],t}export{Rs as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b4 as U,c as O,u as H,j as s,aE as G,r as I,b as M,O as V}from"./index-oUlshpJJ.js";import{u as q}from"./use-project-BYeZMfFI.js";import{P as E}from"./index-CeXKeP7Z.js";import{E as R,C as F}from"./empty-state-BlBaHJ3u.js";import{A as J}from"./avatar-Bc7s3LEL.js";import{c as K,B as T}from"./button-DlMEAXru.js";import{f as Q}from"./formatDistanceToNow-Cb2QZZJn.js";import{C as W}from"./create-project-dialog-dfuHufiJ.js";import{B as X,a as Y,b as Z,c as ee}from"./breadcrumb-DM1tOdpW.js";import"./useQuery-Do4lYH9e.js";import"./constants-4GzD41KM.js";import"./use-mobile-EmqlWdQN.js";import"./tooltip-BnwJ5PQp.js";import"./Loading01-1Zu_WpPr.js";import"./SearchMd-CZA5t4_M.js";import"./input-BTxNeBOO.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./useMutation-kpLmB8S8.js";import"./dialog-Cwnz3LEA.js";import"./form-B3bK9lhs.js";import"./label-bLbRV7ZJ.js";import"./textarea-BNPURYr9.js";import"./Check-B14Bp2E0.js";import"./ChevronRight-IL2oOJI2.js";const te=U("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);function se(t){const e=O.c(58),{project:l,onSettingsClick:c}=t,{org:r}=H(),d=l.ui?.themeColor??"#60a5fa",b=l.ui?.bannerColor??d,m=l.ui?.banner?`url(${l.ui.banner})`:void 0;let i;e[0]!==b||e[1]!==m?(i={backgroundColor:b,backgroundImage:m,backgroundSize:"cover",backgroundPosition:"center"},e[0]=b,e[1]=m,e[2]=i):i=e[2];const _=i;let u;e[3]!==r.slug||e[4]!==l.slug?(u={org:r.slug,project:l.slug},e[3]=r.slug,e[4]=l.slug,e[5]=u):u=e[5];let f;e[6]!==c?(f=B=>{B.preventDefault(),B.stopPropagation(),c?.(B)},e[6]=c,e[7]=f):f=e[7];let x,v;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=K("absolute top-3 right-3 size-6 rounded-md flex items-center justify-center","bg-black/20 hover:bg-black/40 transition-colors","opacity-0 group-hover:opacity-100"),v=s.jsx(te,{className:"size-3.5 text-white"}),e[8]=x,e[9]=v):(x=e[8],v=e[9]);let g;e[10]!==f?(g=s.jsx("button",{type:"button",onClick:f,className:x,children:v}),e[10]=f,e[11]=g):g=e[11];let p;e[12]!==_||e[13]!==g?(p=s.jsx("div",{className:"h-20 relative",style:_,children:g}),e[12]=_,e[13]=g,e[14]=p):p=e[14];let n;e[15]!==l.name||e[16]!==l.ui||e[17]!==d?(n=l.ui?.icon?s.jsx("img",{src:l.ui.icon,alt:"",className:"size-8 rounded-md object-cover"}):s.jsx("div",{className:"size-8 rounded-md flex items-center justify-center",style:{backgroundColor:d},children:s.jsx("span",{className:"text-sm font-medium text-white",children:l.name.charAt(0).toUpperCase()})}),e[15]=l.name,e[16]=l.ui,e[17]=d,e[18]=n):n=e[18];let a;e[19]!==l.name?(a=s.jsx("h3",{className:"font-medium text-base text-foreground truncate",children:l.name}),e[19]=l.name,e[20]=a):a=e[20];let h;e[21]!==l.updatedAt?(h=Q(new Date(l.updatedAt),{addSuffix:!0}),e[21]=l.updatedAt,e[22]=h):h=e[22];let j;e[23]!==h?(j=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Edited"," ",h]}),e[23]=h,e[24]=j):j=e[24];let C;e[25]!==a||e[26]!==j?(C=s.jsxs("div",{className:"flex flex-col",children:[a,j]}),e[25]=a,e[26]=j,e[27]=C):C=e[27];let N;e[28]!==n||e[29]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-4",children:[n,C]}),e[28]=n,e[29]=C,e[30]=N):N=e[30];let k;e[31]!==l.boundConnections?(k=l.boundConnections.slice(0,4).map(le),e[31]=l.boundConnections,e[32]=k):k=e[32];let P;e[33]!==l.boundConnections.length?(P=l.boundConnections.length>4&&s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsxs("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center text-xs text-muted-foreground",children:["+",l.boundConnections.length-4]})}),e[33]=l.boundConnections.length,e[34]=P):P=e[34];let y;e[35]!==k||e[36]!==P?(y=s.jsxs("div",{className:"flex pr-2",children:[k,P]}),e[35]=k,e[36]=P,e[37]=y):y=e[37];const z=r.logo??void 0;let w;e[38]!==r.name||e[39]!==z?(w=s.jsx(J,{url:z,fallback:r.name,size:"2xs",className:"shrink-0 rounded",objectFit:"cover"}),e[38]=r.name,e[39]=z,e[40]=w):w=e[40];let S;e[41]!==r.name?(S=s.jsx("span",{className:"truncate max-w-20",children:r.name}),e[41]=r.name,e[42]=S):S=e[42];let o;e[43]!==w||e[44]!==S?(o=s.jsxs("div",{className:"flex items-center gap-2 text-xs text-foreground",children:[w,S]}),e[43]=w,e[44]=S,e[45]=o):o=e[45];let L;e[46]!==y||e[47]!==o?(L=s.jsxs("div",{className:"flex items-center justify-between mt-4",children:[y,o]}),e[46]=y,e[47]=o,e[48]=L):L=e[48];let $;e[49]!==N||e[50]!==L?($=s.jsxs("div",{className:"flex flex-col flex-1 justify-between p-4",children:[N,L]}),e[49]=N,e[50]=L,e[51]=$):$=e[51];let A;e[52]!==$||e[53]!==p?(A=s.jsxs("div",{className:"border border-border rounded-xl overflow-hidden bg-card",children:[p,$]}),e[52]=$,e[53]=p,e[54]=A):A=e[54];let D;return e[55]!==A||e[56]!==u?(D=s.jsx(G,{to:"/$org/$project",params:u,className:"block group",children:A}),e[55]=A,e[56]=u,e[57]=D):D=e[57],D}function le(t){return s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsx(re,{connection:t})},t.id)}function re(t){const e=O.c(13),{connection:l}=t;if(l.icon){let m;e[0]!==l.icon||e[1]!==l.title?(m=s.jsx("img",{src:l.icon,alt:l.title,className:"size-4 object-cover"}),e[0]=l.icon,e[1]=l.title,e[2]=m):m=e[2];let i;return e[3]!==l.title||e[4]!==m?(i=s.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:l.title,children:m}),e[3]=l.title,e[4]=m,e[5]=i):i=e[5],i}const c=l.title;let r;e[6]!==l.title?(r=l.title.charAt(0).toUpperCase(),e[6]=l.title,e[7]=r):r=e[7];let d;e[8]!==r?(d=s.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:r}),e[8]=r,e[9]=d):d=e[9];let b;return e[10]!==l.title||e[11]!==d?(b=s.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:c,children:d}),e[10]=l.title,e[11]=d,e[12]=b):b=e[12],b}function $e(){const t=O.c(40),{org:e}=H(),{data:l,isLoading:c}=q(e.id),[r,d]=I.useState(""),[b,m]=I.useState(!1),i=M();let _,u,f,x,v,g,p,n,a;if(t[0]!==c||t[1]!==i||t[2]!==e.slug||t[3]!==l||t[4]!==r){const N=l?.filter(ie)?.filter(o=>o.name.toLowerCase().includes(r.toLowerCase())||o.description?.toLowerCase().includes(r.toLowerCase()))??[];let k;t[14]!==i||t[15]!==e.slug?(k=o=>{i({to:"/$org/$project/settings",params:{org:e.slug,project:o}})},t[14]=i,t[15]=e.slug,t[16]=k):k=t[16];const P=k;let y;t[17]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{m(!0)},t[17]=y):y=t[17];const z=y;u=E;let w;t[18]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(E.Header.Left,{children:s.jsx(X,{children:s.jsx(Y,{children:s.jsx(Z,{children:s.jsx(ee,{children:"Projects"})})})})}),t[18]=w):w=t[18],t[19]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(E.Header,{children:[w,s.jsx(E.Header.Right,{children:s.jsx(T,{onClick:z,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Create new project"})})]}),t[19]=n):n=t[19];let S;t[20]===Symbol.for("react.memo_cache_sentinel")?(S=o=>{o.key==="Escape"&&(d(""),o.target.blur())},t[20]=S):S=t[20],t[21]!==r?(a=s.jsx(F,{value:r,onChange:d,placeholder:"Search for a project...",onKeyDown:S}),t[21]=r,t[22]=a):a=t[22],_=E.Content,f="@container",t[23]!==c?(x=c&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:[...Array(4)].map(oe)})}),t[23]=c,t[24]=x):x=t[24],v=!c&&N.length===0&&r&&s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(R,{title:"No projects found",description:`No projects match "${r}"`})}),g=!c&&N.length===0&&!r&&s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(R,{title:"No projects yet",description:"Create a project to get started.",actions:s.jsx(T,{onClick:z,children:"Create new project"})})}),p=!c&&N.length>0&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:N.map(o=>s.jsx(se,{project:o,onSettingsClick:()=>P(o.slug)},o.id))})}),t[0]=c,t[1]=i,t[2]=e.slug,t[3]=l,t[4]=r,t[5]=_,t[6]=u,t[7]=f,t[8]=x,t[9]=v,t[10]=g,t[11]=p,t[12]=n,t[13]=a}else _=t[5],u=t[6],f=t[7],x=t[8],v=t[9],g=t[10],p=t[11],n=t[12],a=t[13];let h;t[25]!==_||t[26]!==f||t[27]!==x||t[28]!==v||t[29]!==g||t[30]!==p?(h=s.jsxs(_,{className:f,children:[x,v,g,p]}),t[25]=_,t[26]=f,t[27]=x,t[28]=v,t[29]=g,t[30]=p,t[31]=h):h=t[31];let j;t[32]!==b?(j=s.jsx(W,{open:b,onOpenChange:m}),t[32]=b,t[33]=j):j=t[33];let C;return t[34]!==u||t[35]!==n||t[36]!==a||t[37]!==h||t[38]!==j?(C=s.jsxs(u,{children:[n,a,h,j]}),t[34]=u,t[35]=n,t[36]=a,t[37]=h,t[38]=j,t[39]=C):C=t[39],C}function oe(t,e){return s.jsx("div",{className:"h-[240px] rounded-xl bg-muted animate-pulse"},e)}function ie(t){return t.slug!==V}export{$e as default};
|