@decocms/mesh 2.96.0 → 2.96.1
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-DWz9vHEs.js → AlertCircle-Uhm-vg87.js} +1 -1
- package/dist/client/assets/{AlertOctagon-CwSM6d3T.js → AlertOctagon-BnG7_0Lj.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CsFFtBUs.js → ArrowLeft-DZdpcFcm.js} +1 -1
- package/dist/client/assets/{ArrowRight-pCJhk5MV.js → ArrowRight-DDCJ7vCm.js} +1 -1
- package/dist/client/assets/{ArrowUp--iCyDep1.js → ArrowUp-o8GkJfpb.js} +1 -1
- package/dist/client/assets/{Check-BpnmtlNp.js → Check-RSjbQD0O.js} +1 -1
- package/dist/client/assets/{CheckCircle-Bbwk4wSu.js → CheckCircle-BabFBaUr.js} +1 -1
- package/dist/client/assets/{CheckDone01-DVPSPPOk.js → CheckDone01-TcspZYjj.js} +1 -1
- package/dist/client/assets/{ChevronDown-ATEjQZt3.js → ChevronDown-C42nqF2a.js} +1 -1
- package/dist/client/assets/{ChevronRight-bn8bbclH.js → ChevronRight-CYPNNnez.js} +1 -1
- package/dist/client/assets/{Clock-DzsDw-Lk.js → Clock-DXNO1b12.js} +1 -1
- package/dist/client/assets/{Code01-CNVlz5lN.js → Code01-n69ilXrX.js} +1 -1
- package/dist/client/assets/{Container-iEhX8Mjo.js → Container-CS-v1KY-.js} +1 -1
- package/dist/client/assets/{Copy01-BFLkziTz.js → Copy01-BCPsfObr.js} +1 -1
- package/dist/client/assets/{Dataflow03-CFDyQjKC.js → Dataflow03-Dh760DjE.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-BJtQvuZG.js → DotsHorizontal-Ctv-gwuL.js} +1 -1
- package/dist/client/assets/{DotsVertical-DpOdk4Aq.js → DotsVertical-BAQdtXzK.js} +1 -1
- package/dist/client/assets/{Download01-BDQiTMNS.js → Download01-k9Xf7rXk.js} +1 -1
- package/dist/client/assets/{Edit01-DzfsJhj_.js → Edit01-BR94fmFd.js} +1 -1
- package/dist/client/assets/{Eye-wuUqxO-f.js → Eye-BRCzsGxl.js} +1 -1
- package/dist/client/assets/{File02-D3u4LB90.js → File02-Di-6VT8b.js} +1 -1
- package/dist/client/assets/{File06-CmtIyx8Z.js → File06-CSDN93G4.js} +1 -1
- package/dist/client/assets/{FilterLines-CM0gEnCF.js → FilterLines-BqWnRXAG.js} +1 -1
- package/dist/client/assets/{Globe01-DkRBapfM.js → Globe01-Bxre7Rfj.js} +1 -1
- package/dist/client/assets/{Grid01-BjNp0_tt.js → Grid01-pdQxycFL.js} +1 -1
- package/dist/client/assets/{Home02-D4O0kFTp.js → Home02-DKf-8C4k.js} +1 -1
- package/dist/client/assets/{Image01-WgjZm0cC.js → Image01-Bsy7A2Dk.js} +1 -1
- package/dist/client/assets/{Inbox01-CnjldfLD.js → Inbox01-C1fHCz6f.js} +1 -1
- package/dist/client/assets/{InfoCircle-C6eivBOj.js → InfoCircle-CLk2ditJ.js} +1 -1
- package/dist/client/assets/{Key01-CKkKmHQm.js → Key01-C1I0sRBn.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CyUrx3FH.js → LinkExternal01-BYZW5cd9.js} +1 -1
- package/dist/client/assets/{List-D1Rifs9-.js → List-Dd8vk8oh.js} +1 -1
- package/dist/client/assets/{Loading01-DO6hmuEv.js → Loading01-CXnHH69h.js} +1 -1
- package/dist/client/assets/{Lock01-BDIBTbi7.js → Lock01-JsNkKI7l.js} +1 -1
- package/dist/client/assets/{Pin01-Ca7VEPAf.js → Pin01-yqsENtKk.js} +1 -1
- package/dist/client/assets/{Play-IvEoWYu9.js → Play-lOQ1Ymlo.js} +1 -1
- package/dist/client/assets/{Plus-trDN35Hh.js → Plus-D0x-Dibo.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-BCwUI-kJ.js → RefreshCcw01-h4iMlxqc.js} +1 -1
- package/dist/client/assets/{RefreshCw01-5uPDNj5k.js → RefreshCw01-DMkeO6TB.js} +1 -1
- package/dist/client/assets/{Save01-j0pUB0Af.js → Save01-B2I-fdos.js} +1 -1
- package/dist/client/assets/{SearchMd-D-napS-q.js → SearchMd-vTjANW25.js} +1 -1
- package/dist/client/assets/{Settings01-CHmmjc2d.js → Settings01-GQQE44Uf.js} +1 -1
- package/dist/client/assets/{Settings02-BI3GZSHv.js → Settings02-5UGbAEAm.js} +1 -1
- package/dist/client/assets/{Share07-JEbMXLIQ.js → Share07-B1IjUJ7I.js} +1 -1
- package/dist/client/assets/{Terminal-D2icqTVW.js → Terminal-D3JARzN3.js} +1 -1
- package/dist/client/assets/{Tool01-DyS3oeZz.js → Tool01-CoNpy80w.js} +1 -1
- package/dist/client/assets/{Trash01-5avAF0B3.js → Trash01-ULZyLlT5.js} +1 -1
- package/dist/client/assets/{Upload01-Cf6OgDth.js → Upload01-C_yAut88.js} +1 -1
- package/dist/client/assets/{Users03-Cvs9KIQ2.js → Users03-CrTVA02D.js} +1 -1
- package/dist/client/assets/{X-CV-Sy3w0.js → X-CMKSGw1c.js} +1 -1
- package/dist/client/assets/{XClose-BjDMx1sg.js → XClose-fbnekwJM.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-BxNi6W68.js → agent-connections-preview-BATYW9_y.js} +1 -1
- package/dist/client/assets/{agent-detail-RnxlmLhV.js → agent-detail-DuEm4NiU.js} +1 -1
- package/dist/client/assets/{agents-Dh-F1tFs.js → agents-63xbxJ_E.js} +1 -1
- package/dist/client/assets/{alert-dialog-BuC_3NDu.js → alert-dialog-CqIibzn6.js} +1 -1
- package/dist/client/assets/{auth-catchall-D3FO_yG9.js → auth-catchall-DMyukblD.js} +1 -1
- package/dist/client/assets/{avatar-DPb5yQt1.js → avatar-CNNflJo3.js} +1 -1
- package/dist/client/assets/{badge-gZvW6kwJ.js → badge-DEQawiWd.js} +1 -1
- package/dist/client/assets/{binder-B_yBrcGV.js → binder-Dgk1prvv.js} +1 -1
- package/dist/client/assets/{breadcrumb-C8g_xf1t.js → breadcrumb-DLtCbZMJ.js} +1 -1
- package/dist/client/assets/{button-DD0bNYN6.js → button-CJa3f3rL.js} +1 -1
- package/dist/client/assets/{card-SDw6XSoH.js → card-CsxzEYEk.js} +1 -1
- package/dist/client/assets/{checkbox-wgnH9WP4.js → checkbox-BCyD8z4q.js} +1 -1
- package/dist/client/assets/{circle-alert-QyHXpaKB.js → circle-alert-uu9PM4o-.js} +1 -1
- package/dist/client/assets/{collection-detail-CX948-ZO.js → collection-detail-BisjiYIh.js} +1 -1
- package/dist/client/assets/{collection-search-U29ZLnk0.js → collection-search-BzW9Bci5.js} +1 -1
- package/dist/client/assets/{collection-tab-BXo1GiD8.js → collection-tab-DNw4-AZ3.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Ctn9Tw-j.js → collection-table-wrapper-DuKaQpn1.js} +1 -1
- package/dist/client/assets/{collection-tabs-Dz4-VYoa.js → collection-tabs-DFXuzfRm.js} +1 -1
- package/dist/client/assets/{command-BVIlxEjZ.js → command-1Xg305EH.js} +1 -1
- package/dist/client/assets/{connect-CzqgEwro.js → connect-DEAY8vzy.js} +1 -1
- package/dist/client/assets/{connection-card-D41BPNVo.js → connection-card-Dc-oh5tv.js} +1 -1
- package/dist/client/assets/{connection-detail-wbcknZ18.js → connection-detail-DimjcjkK.js} +1 -1
- package/dist/client/assets/{connections-CTuNkro9.js → connections-U7rjaHrz.js} +1 -1
- package/dist/client/assets/constants-CXdUDujD.js +1 -0
- package/dist/client/assets/{constants-Cq6ZE1z8.js → constants-LnQa4w9L.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-EYOvqvAw.js → create-organization-dialog-BuI8Z4tH.js} +1 -1
- package/dist/client/assets/{create-project-dialog-CmNoChIc.js → create-project-dialog-DNH_FaKC.js} +1 -1
- package/dist/client/assets/{dialog-S8xIC8mc.js → dialog-Bzq7eXqS.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DWIfkCpI.js → dropdown-menu-DC2vYQhY.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-BbcHKrqQ.js → dynamic-plugin-layout-lKDUzSNP.js} +1 -1
- package/dist/client/assets/{empty-state-ByBuL-mR.js → empty-state-CegLfGmA.js} +1 -1
- package/dist/client/assets/{empty-state-BXZMP5as.js → empty-state-K93degI9.js} +1 -1
- package/dist/client/assets/{env-vars-editor-CEHG413S.js → env-vars-editor-A56x5u0c.js} +1 -1
- package/dist/client/assets/{error-boundary-DQU90rbd.js → error-boundary-BHZBr65c.js} +1 -1
- package/dist/client/assets/{extract-connection-data-nGEdjJnK.js → extract-connection-data-Bagxseai.js} +1 -1
- package/dist/client/assets/{file-browser-DeO9pu4B.js → file-browser-BcBVgyZ_.js} +2 -2
- package/dist/client/assets/{form-BAcIqAgh.js → form-BiNvV3_m.js} +1 -1
- package/dist/client/assets/{grid-view-BjDIJsmI.js → grid-view-C_FVYERW.js} +1 -1
- package/dist/client/assets/{home-CHY0i-UK.js → home-HO-4OJaE.js} +1 -1
- package/dist/client/assets/{index-BlqE1bYr.js → index-B75ddzLB.js} +1 -1
- package/dist/client/assets/{index-neYARi1Z.js → index-BuinBUAv.js} +1 -1
- package/dist/client/assets/{index-DL9SrQB4.js → index-CbHJdukr.js} +1 -1
- package/dist/client/assets/{index-FIifjCsC.js → index-CxGA93Pi.js} +1 -1
- package/dist/client/assets/{index-D8YdWWJr.js → index-DBhC1Bw_.js} +1 -1
- package/dist/client/assets/{index-CFGId0Wt.js → index-DQZLC-Ha.js} +1 -1
- package/dist/client/assets/{index-_8KOOZTs.js → index-Dp8TDmPV.js} +2 -2
- package/dist/client/assets/{index-Bg-Ly6_n.js → index-wYRfl08q.js} +1 -1
- package/dist/client/assets/{index-DWRBWJGd.js → index-zbOyivpa.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-MVVKCTut.js → infiniteQueryObserver-D_e-0DLm.js} +1 -1
- package/dist/client/assets/{input-BSJwtDuS.js → input-DNUbpYNz.js} +1 -1
- package/dist/client/assets/{integration-icon-Cyi91paQ.js → integration-icon-BrB9FdFC.js} +1 -1
- package/dist/client/assets/{label-D4ILATg5.js → label-SUAIjh3i.js} +1 -1
- package/dist/client/assets/{layout-DKMOqzAv.js → layout-Co6gOE--.js} +1 -1
- package/dist/client/assets/{localstorage-keys-CZnnuuZJ.js → localstorage-keys-DvX9S-u8.js} +1 -1
- package/dist/client/assets/{login-CyyAlxll.js → login-CqtWDfWF.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D_NlOAWN.js → mcp-oauth-BkEfZYjh.js} +1 -1
- package/dist/client/assets/{mcp-server-card-D3xgIV0P.js → mcp-server-card-CPLkUd67.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-B2_xECGw.js → mcp-server-detail-BqnowxA3.js} +2 -2
- package/dist/client/assets/{members-BWXqxwPj.js → members-C_lwQkhW.js} +1 -1
- package/dist/client/assets/{monitoring-BGBGUfTC.js → monitoring-Cura7IdF.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-CT7D7btB.js → monitoring-dashboard-edit-DS-AAspi.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-BgB6M8hp.js → monitoring-dashboard-view-Drr802Ja.js} +1 -1
- package/dist/client/assets/{oauth-callback-C55QalAS.js → oauth-callback-BjD4G2wX.js} +1 -1
- package/dist/client/assets/{page-DjrOHbSz.js → page-MGUA0r79.js} +1 -1
- package/dist/client/assets/page-d0dzeaxa.js +1 -0
- package/dist/client/assets/{plugin-empty-state-COcI3glI.js → plugin-empty-state--d7z38bx.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CkhDG6pV.js → plugin-empty-state-DUWxbNZT.js} +1 -1
- package/dist/client/assets/{plugin-header-D2QI0Bk4.js → plugin-header-BA3h83Bj.js} +1 -1
- package/dist/client/assets/{plugin-header-xjq8_xw3.js → plugin-header-BAHaZxid.js} +1 -1
- package/dist/client/assets/{popover-CSF7PfO2.js → popover-NmdUTNcA.js} +1 -1
- package/dist/client/assets/{project-layout-Dq2g6hz2.js → project-layout-BYeS0BnN.js} +1 -1
- package/dist/client/assets/{project-settings-C7VGgkwF.js → project-settings-SIbKavxy.js} +1 -1
- package/dist/client/assets/{projects-list-DLkFlDRG.js → projects-list-Denhxpmm.js} +1 -1
- package/dist/client/assets/{registry-layout-DkJX9Fm4.js → registry-layout-CPldmLnW.js} +1 -1
- package/dist/client/assets/{registry-utils-B9cy_o0B.js → registry-utils-DB2T-f6C.js} +1 -1
- package/dist/client/assets/{resizable-D07jK0w7.js → resizable-T_yUYvbE.js} +1 -1
- package/dist/client/assets/{save-actions-BOAzgl8N.js → save-actions-5R6BlOXt.js} +1 -1
- package/dist/client/assets/{scroll-area-B3trwOGp.js → scroll-area-CBpNMZKr.js} +1 -1
- package/dist/client/assets/{select-DKi1SL5l.js → select-C2nUbKfi.js} +1 -1
- package/dist/client/assets/{shell-layout-BpIyj6lO.js → shell-layout-BhIOsSah.js} +3 -3
- package/dist/client/assets/{spinner-BzK9Vf2y.js → spinner-uWSwEI1n.js} +1 -1
- package/dist/client/assets/{store-invite-L6l49UL9.js → store-invite-NFRL1rLj.js} +1 -1
- package/dist/client/assets/{switch-a94x2zYD.js → switch-B_mHCx3S.js} +1 -1
- package/dist/client/assets/{table-Dh1z1vWK.js → table-C_SqJ2pz.js} +1 -1
- package/dist/client/assets/{tasks-Drgk-xxk.js → tasks-DvY2XPl_.js} +1 -1
- package/dist/client/assets/{textarea-CI2HqKmr.js → textarea-CTzgIHFy.js} +1 -1
- package/dist/client/assets/{time-range-picker-DYTUjJWs.js → time-range-picker-DC9mhGh1.js} +1 -1
- package/dist/client/assets/{toggle-group-D6X7tUq6.js → toggle-group-Dz6DkmD4.js} +1 -1
- package/dist/client/assets/{tools-list-Be0NUYiE.js → tools-list-plHC71me.js} +1 -1
- package/dist/client/assets/{tooltip-DcxH7ctA.js → tooltip-C8pD5y5P.js} +1 -1
- package/dist/client/assets/{topbar-portal-DG6ElOlI.js → topbar-portal-DAwgzTHb.js} +1 -1
- package/dist/client/assets/{typewriter-title-DrskIJnv.js → typewriter-title-e9bmrxry.js} +1 -1
- package/dist/client/assets/{use-binding-e5wAJ2Zj.js → use-binding-BMUJf9fk.js} +1 -1
- package/dist/client/assets/{use-connection-DXTPjN_m.js → use-connection-Bpj__KJl.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-7TS5231X.js → use-create-virtual-mcp-2ig7XE3k.js} +1 -1
- package/dist/client/assets/{use-deco-chat-open-T5zpYStk.js → use-deco-chat-open-cRBnqBrA.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-CE6U_BtA.js → use-install-from-registry-C0CQR1XL.js} +1 -1
- package/dist/client/assets/{use-list-state-Cptq1-Ae.js → use-list-state-j_os04A2.js} +1 -1
- package/dist/client/assets/{use-llm-BvKc0lkk.js → use-llm-C9Qa_Kzo.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DDp9WMI6.js → use-mcp-prompts-BgJx9Ng3.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Dy2cCGvB.js → use-mcp-tools-kVBrFVQ_.js} +1 -1
- package/dist/client/assets/{use-mobile-CE6w0z-T.js → use-mobile-BhG5mqie.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CwkUwgxY.js → use-organization-settings-CrqFuGPr.js} +1 -1
- package/dist/client/assets/{use-project-BVzIiugr.js → use-project-BDU5VGwr.js} +1 -1
- package/dist/client/assets/{use-view-mode-B3y7tfmu.js → use-view-mode-B21E886q.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DCx6MwPh.js → use-virtual-mcp-CamkpUx0.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-R7yz1vmu.js +1 -0
- package/dist/client/assets/{useMutation-DToMWBEW.js → useMutation-CkwG6xTN.js} +1 -1
- package/dist/client/assets/useQuery-DCx9kDUK.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-CYwzFakG.js +1 -0
- package/dist/client/assets/{view-mode-toggle-CHWTbO-_.js → view-mode-toggle-CkMs1Dwx.js} +1 -1
- package/dist/client/assets/{workflow-CJsx3NLU.js → workflow-B9m2KhXI.js} +1 -1
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/dist/client/assets/constants-Dn6qg1rG.js +0 -1
- package/dist/client/assets/page-B_Dk_-1Z.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DYN5Q3LS.js +0 -1
- package/dist/client/assets/useQuery-DJPFtjTr.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DXOkA22M.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,j as s,r as A,u as ne,g as oe,t as ee}from"./index-_8KOOZTs.js";import{V as ae,C as g}from"./index-neYARi1Z.js";import{T as ce,i as me,a as de,t as fe}from"./typewriter-title-DrskIJnv.js";import{E as ue}from"./error-boundary-DQU90rbd.js";import{u as Z,S as Y}from"./use-deco-chat-open-T5zpYStk.js";import{I as te}from"./integration-icon-Cyi91paQ.js";import{P as pe,a as he,b as xe}from"./popover-CSF7PfO2.js";import{c as se,B as H}from"./button-DD0bNYN6.js";import{i as ge,d as je}from"./constants-Cq6ZE1z8.js";import{b as be}from"./use-virtual-mcp-DCx6MwPh.js";import{i as ye}from"./ChevronRight-bn8bbclH.js";import{t as ie}from"./Users03-Cvs9KIQ2.js";import{P as E}from"./index-CFGId0Wt.js";import{T as J,a as Q,b as X}from"./tooltip-DcxH7ctA.js";import{c as Ne}from"./Pin01-Ca7VEPAf.js";import{s as _e}from"./Plus-trDN35Hh.js";import{i as Se}from"./Share07-JEbMXLIQ.js";import"./spinner-BzK9Vf2y.js";import"./use-mcp-prompts-DDp9WMI6.js";import"./useQuery-DJPFtjTr.js";import"./dialog-S8xIC8mc.js";import"./X-CV-Sy3w0.js";import"./form-BAcIqAgh.js";import"./label-D4ILATg5.js";import"./input-BSJwtDuS.js";import"./ArrowUp--iCyDep1.js";import"./ChevronDown-ATEjQZt3.js";import"./Edit01-DzfsJhj_.js";import"./AlertCircle-DWz9vHEs.js";import"./ArrowLeft-CsFFtBUs.js";import"./ArrowRight-pCJhk5MV.js";import"./badge-gZvW6kwJ.js";import"./Check-BpnmtlNp.js";import"./Code01-CNVlz5lN.js";import"./SearchMd-D-napS-q.js";import"./use-create-virtual-mcp-7TS5231X.js";import"./usage-B8eRkRZY.js";import"./marked.esm-BaswSlok.js";import"./Copy01-BFLkziTz.js";import"./empty-state-ByBuL-mR.js";import"./use-connection-DXTPjN_m.js";import"./useMutation-DToMWBEW.js";import"./generate-id-Dyweu44Y.js";import"./Clock-DzsDw-Lk.js";import"./Trash01-5avAF0B3.js";import"./use-llm-BvKc0lkk.js";import"./use-binding-e5wAJ2Zj.js";import"./binder-B_yBrcGV.js";import"./localstorage-keys-CZnnuuZJ.js";import"./select-DKi1SL5l.js";import"./index-D8YdWWJr.js";import"./File06-CmtIyx8Z.js";import"./Grid01-BjNp0_tt.js";import"./Image01-WgjZm0cC.js";import"./RefreshCcw01-BCwUI-kJ.js";import"./useSuspenseInfiniteQuery-DXOkA22M.js";import"./infiniteQueryObserver-MVVKCTut.js";import"./Container-iEhX8Mjo.js";function ve(e){const t=b.c(15),{agent:i}=e,{setVirtualMcpId:p}=Z();let r;t[0]!==i.id||t[1]!==p?(r=()=>{p(i.id)},t[0]=i.id,t[1]=p,t[2]=r):r=t[2];const l=r;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 n;t[4]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ie,{size:20}),t[4]=n):n=t[4];let c;t[5]!==i.icon||t[6]!==i.title?(c=s.jsx(te,{icon:i.icon,name:i.title,fallbackIcon:n}),t[5]=i.icon,t[6]=i.title,t[7]=c):c=t[7];let o;t[8]!==i.title?(o=s.jsx("p",{className:"text-sm text-foreground text-center leading-tight line-clamp-2",children:i.title}),t[8]=i.title,t[9]=o):o=t[9];let a;return t[10]!==l||t[11]!==d||t[12]!==c||t[13]!==o?(a=s.jsxs("button",{type:"button",onClick:l,className:m,"aria-label":d,children:[c,o]}),t[10]=l,t[11]=d,t[12]=c,t[13]=o,t[14]=a):a=t[14],a}function Ce(e){const t=b.c(14),{virtualMcps:i,selectedVirtualMcpId:p,onVirtualMcpChange:r}=e,[l,m]=A.useState(!1),d=A.useRef(null);let n,c;t[0]!==l?(n=()=>{l&&setTimeout(()=>{d.current?.focus()},0)},c=[l],t[0]=l,t[1]=n,t[2]=c):(n=t[1],c=t[2]),A.useEffect(n,c);let o;t[3]!==r?(o=y=>{r(y),m(!1)},t[3]=r,t[4]=o):o=t[4];const a=o;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 u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(pe,{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]=u):u=t[6];let h;t[7]!==a||t[8]!==p||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:p,onVirtualMcpChange:a,searchInputRef:d})}),t[7]=a,t[8]=p,t[9]=i,t[10]=h):h=t[10];let j;return t[11]!==l||t[12]!==h?(j=s.jsxs(xe,{open:l,onOpenChange:m,children:[u,h]}),t[11]=l,t[12]=h,t[13]=j):j=t[13],j}function we(){const e=b.c(20),t=be(),{selectedVirtualMcp:i,setVirtualMcpId:p}=Z();let r,l,m,d,n,c;if(e[0]!==t){n=Symbol.for("react.early_return_sentinel");e:{const h=t.filter(ze).slice(0,6);if(h.length===0){n=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],r="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",l=h.map(ke)}e[0]=t,e[1]=r,e[2]=l,e[3]=m,e[4]=d,e[5]=n,e[6]=c}else r=e[1],l=e[2],m=e[3],d=e[4],n=e[5],c=e[6];if(n!==Symbol.for("react.early_return_sentinel"))return n;const o=i?.id??null;let a;e[8]!==p||e[9]!==o||e[10]!==c?(a=s.jsx(Ce,{virtualMcps:c,selectedVirtualMcpId:o,onVirtualMcpChange:p}),e[8]=p,e[9]=o,e[10]=c,e[11]=a):a=e[11];let f;e[12]!==r||e[13]!==l||e[14]!==a?(f=s.jsxs("div",{className:r,children:[l,a]}),e[12]=r,e[13]=l,e[14]=a,e[15]=f):f=e[15];let u;return e[16]!==m||e[17]!==d||e[18]!==f?(u=s.jsxs("div",{className:m,children:[d,f]}),e[16]=m,e[17]=d,e[18]=f,e[19]=u):u=e[19],u}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&&!ge(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}=ne(),{data:i}=oe.useSession(),{modelsConnections:p,isChatEmpty:r,activeThreadId:l,createThread:m,switchToThread:d,threads:n,selectedVirtualMcp:c}=Z();let o;if(e[0]!==l||e[1]!==n){let x;e[3]!==l?(x=re=>re.id===l,e[3]=l,e[4]=x):x=e[4],o=n.find(x),e[0]=l,e[1]=n,e[2]=o}else o=e[2];const a=o,[f,u]=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 j=h;let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=$e(),e[7]=y):y=e[7];const le=y;let R;e[8]!==t.id?(R=je(t.id),e[8]=t.id,e[9]=R):R=e[9];const B=c??R;if(p.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(g.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]!==r||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:r,"aria-label":"New chat",children:L})}),e[19]=r,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=()=>u(!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]!==r?(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:r,"aria-label":"Pin chat",children:W})}),e[28]=r,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]!==r?(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:r,"aria-label":"Share chat",children:G})}),e[34]=r,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]!==r||e[48]!==j?(P=r?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:[le," ",j,","]}),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(g.Input,{})}),s.jsx(g.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(g.Main,{children:s.jsx(g.Messages,{})}),s.jsx(g.Footer,{children:s.jsx(g.Input,{})})]}),e[46]=B,e[47]=r,e[48]=j,e[49]=P):P=e[49];let $;e[50]!==d?($=async x=>{await d(x),u(!1)},e[50]=d,e[51]=$):$=e[51];let V;e[52]!==l||e[53]!==f||e[54]!==$||e[55]!==n?(V=s.jsx(de,{open:f,onOpenChange:u,threads:n,activeThreadId:l,onThreadSelect:$}),e[52]=l,e[53]=f,e[54]=$,e[55]=n,e[56]=V):V=e[56];let U;return e[57]!==I||e[58]!==P||e[59]!==V?(U=s.jsxs(g,{className:"bg-background",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:p}=e,r=i?.message?.includes("401")||i?.message?.toLowerCase().includes("unauthorized");let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=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]=l):l=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=r?"Unable to load models":"Something went wrong";let n;t[2]!==d?(n=s.jsx("h3",{className:"text-lg font-medium",children:d}),t[2]=d,t[3]=n):n=t[3];const c=r?"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 o;t[4]!==c?(o=s.jsx("p",{className:"text-sm text-muted-foreground",children:c}),t[4]=c,t[5]=o):o=t[5];let a;t[6]!==n||t[7]!==o?(a=s.jsxs("div",{className:"space-y-2",children:[n,o]}),t[6]=n,t[7]=o,t[8]=a):a=t[8];let f;t[9]!==p?(f=s.jsx(H,{variant:"outline",onClick:p,children:"Try again"}),t[9]=p,t[10]=f):f=t[10];let u;return t[11]!==a||t[12]!==f?(u=s.jsxs(g,{className:"bg-background",children:[l,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]=u):u=t[13],u}function Wt(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ue,{fallback:Re,children:s.jsx(A.Suspense,{fallback:s.jsx(g.Skeleton,{className:"bg-background"}),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{Wt as default};
|
|
1
|
+
import{c as b,j as s,r as A,u as ne,g as oe,t as ee}from"./index-Dp8TDmPV.js";import{V as ae,C as g}from"./index-BuinBUAv.js";import{T as ce,i as me,a as de,t as fe}from"./typewriter-title-e9bmrxry.js";import{E as ue}from"./error-boundary-BHZBr65c.js";import{u as Z,S as Y}from"./use-deco-chat-open-cRBnqBrA.js";import{I as te}from"./integration-icon-BrB9FdFC.js";import{P as pe,a as he,b as xe}from"./popover-NmdUTNcA.js";import{c as se,B as H}from"./button-CJa3f3rL.js";import{i as ge,d as je}from"./constants-LnQa4w9L.js";import{b as be}from"./use-virtual-mcp-CamkpUx0.js";import{i as ye}from"./ChevronRight-CYPNNnez.js";import{t as ie}from"./Users03-CrTVA02D.js";import{P as E}from"./index-DQZLC-Ha.js";import{T as J,a as Q,b as X}from"./tooltip-C8pD5y5P.js";import{c as Ne}from"./Pin01-yqsENtKk.js";import{s as _e}from"./Plus-D0x-Dibo.js";import{i as Se}from"./Share07-B1IjUJ7I.js";import"./spinner-uWSwEI1n.js";import"./use-mcp-prompts-BgJx9Ng3.js";import"./useQuery-DCx9kDUK.js";import"./dialog-Bzq7eXqS.js";import"./X-CMKSGw1c.js";import"./form-BiNvV3_m.js";import"./label-SUAIjh3i.js";import"./input-DNUbpYNz.js";import"./ArrowUp-o8GkJfpb.js";import"./ChevronDown-C42nqF2a.js";import"./Edit01-BR94fmFd.js";import"./AlertCircle-Uhm-vg87.js";import"./ArrowLeft-DZdpcFcm.js";import"./ArrowRight-DDCJ7vCm.js";import"./badge-DEQawiWd.js";import"./Check-RSjbQD0O.js";import"./Code01-n69ilXrX.js";import"./SearchMd-vTjANW25.js";import"./use-create-virtual-mcp-2ig7XE3k.js";import"./usage-B8eRkRZY.js";import"./marked.esm-BaswSlok.js";import"./Copy01-BCPsfObr.js";import"./empty-state-CegLfGmA.js";import"./use-connection-Bpj__KJl.js";import"./useMutation-CkwG6xTN.js";import"./generate-id-Dyweu44Y.js";import"./Clock-DXNO1b12.js";import"./Trash01-ULZyLlT5.js";import"./use-llm-C9Qa_Kzo.js";import"./use-binding-BMUJf9fk.js";import"./binder-Dgk1prvv.js";import"./localstorage-keys-DvX9S-u8.js";import"./select-C2nUbKfi.js";import"./index-DBhC1Bw_.js";import"./File06-CSDN93G4.js";import"./Grid01-pdQxycFL.js";import"./Image01-Bsy7A2Dk.js";import"./RefreshCcw01-h4iMlxqc.js";import"./useSuspenseInfiniteQuery-CYwzFakG.js";import"./infiniteQueryObserver-D_e-0DLm.js";import"./Container-CS-v1KY-.js";function ve(e){const t=b.c(15),{agent:i}=e,{setVirtualMcpId:p}=Z();let r;t[0]!==i.id||t[1]!==p?(r=()=>{p(i.id)},t[0]=i.id,t[1]=p,t[2]=r):r=t[2];const l=r;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 n;t[4]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ie,{size:20}),t[4]=n):n=t[4];let c;t[5]!==i.icon||t[6]!==i.title?(c=s.jsx(te,{icon:i.icon,name:i.title,fallbackIcon:n}),t[5]=i.icon,t[6]=i.title,t[7]=c):c=t[7];let o;t[8]!==i.title?(o=s.jsx("p",{className:"text-sm text-foreground text-center leading-tight line-clamp-2",children:i.title}),t[8]=i.title,t[9]=o):o=t[9];let a;return t[10]!==l||t[11]!==d||t[12]!==c||t[13]!==o?(a=s.jsxs("button",{type:"button",onClick:l,className:m,"aria-label":d,children:[c,o]}),t[10]=l,t[11]=d,t[12]=c,t[13]=o,t[14]=a):a=t[14],a}function Ce(e){const t=b.c(14),{virtualMcps:i,selectedVirtualMcpId:p,onVirtualMcpChange:r}=e,[l,m]=A.useState(!1),d=A.useRef(null);let n,c;t[0]!==l?(n=()=>{l&&setTimeout(()=>{d.current?.focus()},0)},c=[l],t[0]=l,t[1]=n,t[2]=c):(n=t[1],c=t[2]),A.useEffect(n,c);let o;t[3]!==r?(o=y=>{r(y),m(!1)},t[3]=r,t[4]=o):o=t[4];const a=o;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 u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(pe,{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]=u):u=t[6];let h;t[7]!==a||t[8]!==p||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:p,onVirtualMcpChange:a,searchInputRef:d})}),t[7]=a,t[8]=p,t[9]=i,t[10]=h):h=t[10];let j;return t[11]!==l||t[12]!==h?(j=s.jsxs(xe,{open:l,onOpenChange:m,children:[u,h]}),t[11]=l,t[12]=h,t[13]=j):j=t[13],j}function we(){const e=b.c(20),t=be(),{selectedVirtualMcp:i,setVirtualMcpId:p}=Z();let r,l,m,d,n,c;if(e[0]!==t){n=Symbol.for("react.early_return_sentinel");e:{const h=t.filter(ze).slice(0,6);if(h.length===0){n=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],r="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",l=h.map(ke)}e[0]=t,e[1]=r,e[2]=l,e[3]=m,e[4]=d,e[5]=n,e[6]=c}else r=e[1],l=e[2],m=e[3],d=e[4],n=e[5],c=e[6];if(n!==Symbol.for("react.early_return_sentinel"))return n;const o=i?.id??null;let a;e[8]!==p||e[9]!==o||e[10]!==c?(a=s.jsx(Ce,{virtualMcps:c,selectedVirtualMcpId:o,onVirtualMcpChange:p}),e[8]=p,e[9]=o,e[10]=c,e[11]=a):a=e[11];let f;e[12]!==r||e[13]!==l||e[14]!==a?(f=s.jsxs("div",{className:r,children:[l,a]}),e[12]=r,e[13]=l,e[14]=a,e[15]=f):f=e[15];let u;return e[16]!==m||e[17]!==d||e[18]!==f?(u=s.jsxs("div",{className:m,children:[d,f]}),e[16]=m,e[17]=d,e[18]=f,e[19]=u):u=e[19],u}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&&!ge(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}=ne(),{data:i}=oe.useSession(),{modelsConnections:p,isChatEmpty:r,activeThreadId:l,createThread:m,switchToThread:d,threads:n,selectedVirtualMcp:c}=Z();let o;if(e[0]!==l||e[1]!==n){let x;e[3]!==l?(x=re=>re.id===l,e[3]=l,e[4]=x):x=e[4],o=n.find(x),e[0]=l,e[1]=n,e[2]=o}else o=e[2];const a=o,[f,u]=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 j=h;let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=$e(),e[7]=y):y=e[7];const le=y;let R;e[8]!==t.id?(R=je(t.id),e[8]=t.id,e[9]=R):R=e[9];const B=c??R;if(p.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(g.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]!==r||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:r,"aria-label":"New chat",children:L})}),e[19]=r,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=()=>u(!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]!==r?(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:r,"aria-label":"Pin chat",children:W})}),e[28]=r,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]!==r?(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:r,"aria-label":"Share chat",children:G})}),e[34]=r,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]!==r||e[48]!==j?(P=r?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:[le," ",j,","]}),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(g.Input,{})}),s.jsx(g.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(g.Main,{children:s.jsx(g.Messages,{})}),s.jsx(g.Footer,{children:s.jsx(g.Input,{})})]}),e[46]=B,e[47]=r,e[48]=j,e[49]=P):P=e[49];let $;e[50]!==d?($=async x=>{await d(x),u(!1)},e[50]=d,e[51]=$):$=e[51];let V;e[52]!==l||e[53]!==f||e[54]!==$||e[55]!==n?(V=s.jsx(de,{open:f,onOpenChange:u,threads:n,activeThreadId:l,onThreadSelect:$}),e[52]=l,e[53]=f,e[54]=$,e[55]=n,e[56]=V):V=e[56];let U;return e[57]!==I||e[58]!==P||e[59]!==V?(U=s.jsxs(g,{className:"bg-background",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:p}=e,r=i?.message?.includes("401")||i?.message?.toLowerCase().includes("unauthorized");let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=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]=l):l=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=r?"Unable to load models":"Something went wrong";let n;t[2]!==d?(n=s.jsx("h3",{className:"text-lg font-medium",children:d}),t[2]=d,t[3]=n):n=t[3];const c=r?"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 o;t[4]!==c?(o=s.jsx("p",{className:"text-sm text-muted-foreground",children:c}),t[4]=c,t[5]=o):o=t[5];let a;t[6]!==n||t[7]!==o?(a=s.jsxs("div",{className:"space-y-2",children:[n,o]}),t[6]=n,t[7]=o,t[8]=a):a=t[8];let f;t[9]!==p?(f=s.jsx(H,{variant:"outline",onClick:p,children:"Try again"}),t[9]=p,t[10]=f):f=t[10];let u;return t[11]!==a||t[12]!==f?(u=s.jsxs(g,{className:"bg-background",children:[l,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]=u):u=t[13],u}function Wt(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ue,{fallback:Re,children:s.jsx(A.Suspense,{fallback:s.jsx(g.Skeleton,{className:"bg-background"}),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{Wt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as J,r as U,u as se,K as ne,by as we,j as t,m as me,O as de,g as Te,bz as Ie,bA as le,l as Re}from"./index-Dp8TDmPV.js";import{P as Z}from"./index-DQZLC-Ha.js";import{B as Pe,a as ze,b as ke,c as $e}from"./breadcrumb-DLtCbZMJ.js";import{i as ue,E as Le}from"./error-boundary-BHZBr65c.js";import{i as fe}from"./FilterLines-BqWnRXAG.js";import{n as xe}from"./Inbox01-C1fHCz6f.js";import{i as te}from"./Loading01-CXnHH69h.js";import{s as ge}from"./RefreshCw01-DMkeO6TB.js";import{i as pe}from"./SearchMd-vTjANW25.js";import{u as he}from"./useQuery-DCx9kDUK.js";import{u as Fe}from"./useInfiniteQuery-R7yz1vmu.js";import{a as Ee,f as _e,b as Ae}from"./registry-utils-DB2T-f6C.js";import{u as je,W as Ke,a as Me,h as Oe,b as Be}from"./constants-LnQa4w9L.js";import{f as De,g as ye,h as Ge}from"./use-connection-Bpj__KJl.js";import{s as We}from"./slugify-CEUa2lfQ.js";import{C as Ve}from"./collection-search-BzW9Bci5.js";import{M as ae}from"./mcp-server-card-CPLkUd67.js";import{c as oe,B as Y}from"./button-CJa3f3rL.js";import{I as qe}from"./input-DNUbpYNz.js";import{b as ve,P as be,a as Ne}from"./popover-NmdUTNcA.js";import{i as Ce}from"./Check-RSjbQD0O.js";import{t as Se}from"./ChevronDown-C42nqF2a.js";import{s as ee}from"./XClose-fbnekwJM.js";import{s as Ue}from"./Plus-D0x-Dibo.js";import{E as He}from"./empty-state-CegLfGmA.js";import{u as Je}from"./use-binding-BMUJf9fk.js";import{L as Qe,u as Ye}from"./localstorage-keys-DvX9S-u8.js";import"./ChevronRight-CYPNNnez.js";import"./infiniteQueryObserver-D_e-0DLm.js";import"./useMutation-CkwG6xTN.js";import"./tooltip-C8pD5y5P.js";import"./index-DBhC1Bw_.js";import"./Terminal-D3JARzN3.js";import"./Lock01-JsNkKI7l.js";import"./card-CsxzEYEk.js";import"./integration-icon-BrB9FdFC.js";import"./Container-CS-v1KY-.js";import"./github-icon-Dp3wHhYE.js";import"./binder-Dgk1prvv.js";function Ze(s,e){const r=J.c(4),[n,a]=U.useState(s),l=U.useRef(null),u=U.useRef(!0);let o,c;return r[0]!==e||r[1]!==s?(o=()=>{if(u.current){u.current=!1;return}return l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{a(s)},e),()=>{l.current&&clearTimeout(l.current)}},c=[s,e],r[0]=e,r[1]=s,r[2]=o,r[3]=c):(o=r[2],c=r[3]),U.useEffect(o,c),n}function Xe(s){const e=J.c(14),r=U.useRef(null),n=`scroll-position:${s}`,a=U.useRef(null);let l;e[0]!==n?(l=()=>{r.current&&sessionStorage.setItem(n,String(r.current.scrollTop))},e[0]=n,e[1]=l):l=e[1];const u=l;let o;e[2]!==n?(o=()=>{if(a.current===n)return;const h=sessionStorage.getItem(n);if(h&&r.current){const C=Number.parseInt(h,10);r.current.scrollTop=C}a.current=n},e[2]=n,e[3]=o):o=e[3];const c=o;let y;e[4]!==c||e[5]!==n?(y=()=>{a.current!==n&&c()},e[4]=c,e[5]=n,e[6]=y):y=e[6];const N=y;let i;e[7]!==c||e[8]!==n?(i=h=>{r.current=h,h&&a.current!==n&&requestAnimationFrame(()=>{c()})},e[7]=c,e[8]=n,e[9]=i):i=e[9];const g=i;let m;return e[10]!==N||e[11]!==u||e[12]!==g?(m={scrollRef:g,saveScrollPosition:u,handleScroll:N},e[10]=N,e[11]=u,e[12]=g,e[13]=m):m=e[13],m}const et=24;function tt(s){const e=J.c(54),{registryId:r,listToolName:n,filtersToolName:a,search:l}=s,{org:u}=se();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=[],e[0]=o):o=e[0];const[c,y]=U.useState(o);let N;e[1]===Symbol.for("react.memo_cache_sentinel")?(N=[],e[1]=N):N=e[1];const[i,g]=U.useState(N),m=r||null;let h;e[2]!==u.id||e[3]!==m?(h={connectionId:m,orgId:u.id},e[2]=u.id,e[3]=m,e[4]=h):h=e[4];const C=je(h),R=!!a;let v;e[5]!==a||e[6]!==r?(v=ne.toolCall(r,a||"no-filters","{}"),e[5]=a,e[6]=r,e[7]=v):v=e[7];let T;e[8]!==C||e[9]!==a?(T=async()=>{if(!a)return{tags:[],categories:[]};const D=await C.callTool({name:a,arguments:{}});return D.structuredContent??D},e[8]=C,e[9]=a,e[10]=T):T=e[10];let I;e[11]!==v||e[12]!==T?(I={queryKey:v,queryFn:T,staleTime:36e5,retry:2},e[11]=v,e[12]=T,e[13]=I):I=e[13];const{data:k}=he(I);let p,S,P;if(e[14]!==n||e[15]!==r||e[16]!==l||e[17]!==i||e[18]!==c){const D=l?.trim()?{operator:"or",conditions:[{field:["name"],operator:"contains",value:l},{field:["title"],operator:"contains",value:l},{field:["description"],operator:"contains",value:l}]}:void 0;p={limit:et,...c.length>0&&{tags:c},...i.length>0&&{categories:i},...D&&{where:D}},P=Fe,S=ne.toolCall(r,n,JSON.stringify(p)),e[14]=n,e[15]=r,e[16]=l,e[17]=i,e[18]=c,e[19]=p,e[20]=S,e[21]=P}else p=e[19],S=e[20],P=e[21];let j;e[22]!==C||e[23]!==p||e[24]!==n?(j=async D=>{const{pageParam:X}=D,re=X?{...p,cursor:X}:p,ie=await C.callTool({name:n,arguments:re});return ie.structuredContent??ie},e[22]=C,e[23]=p,e[24]=n,e[25]=j):j=e[25];let L;e[26]!==j||e[27]!==S?(L={queryKey:S,queryFn:j,initialPageParam:void 0,getNextPageParam:st,staleTime:36e5,placeholderData:we,retry:2},e[26]=j,e[27]=S,e[28]=L):L=e[28];const{data:w,fetchNextPage:x,hasNextPage:d,isFetchingNextPage:f,isFetching:$,isLoading:z,error:_}=P(L);let F;e:{if(!w?.pages||w.pages.length===0){F=null;break e}const D=w.pages[0];if(typeof D=="object"&&D!==null&&"totalCount"in D&&typeof D.totalCount=="number"){F=D.totalCount;break e}F=null}const A=F,E=w?.pages;let V;e[29]!==E?(V=Ee(E),e[29]=E,e[30]=V):V=e[30];const q=V;let G;e[31]!==l||e[32]!==i.length||e[33]!==c.length?(G=c.length>0||i.length>0||!!l?.trim(),e[31]=l,e[32]=i.length,e[33]=c.length,e[34]=G):G=e[34];const K=G,B=$&&!f&&!z&&K;let W;e[35]!==x||e[36]!==d||e[37]!==f?(W=()=>{d&&!f&&x()},e[35]=x,e[36]=d,e[37]=f,e[38]=W):W=e[38];const M=W,O=d??!1,H=R?k?.tags:void 0,Q=R?k?.categories:void 0;let b;return e[39]!==K||e[40]!==$||e[41]!==f||e[42]!==B||e[43]!==z||e[44]!==q||e[45]!==_||e[46]!==M||e[47]!==i||e[48]!==c||e[49]!==O||e[50]!==H||e[51]!==Q||e[52]!==A?(b={items:q,totalCount:A,hasMore:O,isLoadingMore:f,isFiltering:B,isInitialLoading:z,isFetching:$,error:_,loadMore:M,availableTags:H,availableCategories:Q,selectedTags:c,selectedCategories:i,setSelectedTags:y,setSelectedCategories:g,hasActiveFilters:K},e[39]=K,e[40]=$,e[41]=f,e[42]=B,e[43]=z,e[44]=q,e[45]=_,e[46]=M,e[47]=i,e[48]=c,e[49]=O,e[50]=H,e[51]=Q,e[52]=A,e[53]=b):b=e[53],b}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,n)=>n.count-r.count).slice(0,e)}function ce(s){const e=J.c(52),{label:r,items:n,selectedItems:a,onToggle:l,onClear:u}=s,[o,c]=U.useState(""),[y,N]=U.useState(!1);let i,g,m,h,C,R,v,T,I,k,p;if(e[0]!==n||e[1]!==r||e[2]!==l||e[3]!==y||e[4]!==o||e[5]!==a){const x=[...o?n.filter(E=>E.value.toLowerCase().includes(o.toLowerCase())):n].sort(lt);m=a.length,g=ve,I=y,k=N;let d;e[17]!==r?(d=t.jsx("span",{children:r}),e[17]=r,e[18]=d):d=e[18];let f;e[19]!==m?(f=m>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:m}),e[19]=m,e[20]=f):f=e[20];let $;e[21]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(Se,{size:14,className:"opacity-50"}),e[21]=$):$=e[21],e[22]!==f||e[23]!==d?(p=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:[d,f,$]})}),e[22]=f,e[23]=d,e[24]=p):p=e[24],i=Ne,R="w-64 p-0",v="start";let z;e[25]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(pe,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=z):z=e[25];let _;e[26]!==r?(_=r.toLowerCase(),e[26]=r,e[27]=_):_=e[27];const F=`Search ${_}...`;let A;e[28]===Symbol.for("react.memo_cache_sentinel")?(A=E=>c(E.target.value),e[28]=A):A=e[28],e[29]!==o||e[30]!==F?(T=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:[z,t.jsx(qe,{type:"text",placeholder:F,value:o,onChange:A,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]=o,e[30]=F,e[31]=T):T=e[31],h="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",C=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 V=a.includes(E.value);return t.jsxs("button",{onClick:()=>l(E.value),className:oe("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",V?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[t.jsxs("span",{className:"truncate flex items-center gap-2",children:[V&&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]=n,e[1]=r,e[2]=l,e[3]=y,e[4]=o,e[5]=a,e[6]=i,e[7]=g,e[8]=m,e[9]=h,e[10]=C,e[11]=R,e[12]=v,e[13]=T,e[14]=I,e[15]=k,e[16]=p}else i=e[6],g=e[7],m=e[8],h=e[9],C=e[10],R=e[11],v=e[12],T=e[13],I=e[14],k=e[15],p=e[16];let S;e[32]!==h||e[33]!==C?(S=t.jsx("div",{className:h,children:C}),e[32]=h,e[33]=C,e[34]=S):S=e[34];let P;e[35]!==r||e[36]!==u||e[37]!==m?(P=m>0&&t.jsx("div",{className:"p-2 border-t border-border",children:t.jsxs(Y,{variant:"ghost",size:"sm",onClick:u,className:"w-full text-xs text-muted-foreground hover:text-foreground",children:["Clear ",r.toLowerCase()]})}),e[35]=r,e[36]=u,e[37]=m,e[38]=P):P=e[38];let j;e[39]!==i||e[40]!==P||e[41]!==R||e[42]!==v||e[43]!==T||e[44]!==S?(j=t.jsxs(i,{className:R,align:v,children:[T,S,P]}),e[39]=i,e[40]=P,e[41]=R,e[42]=v,e[43]=T,e[44]=S,e[45]=j):j=e[45];let L;return e[46]!==g||e[47]!==j||e[48]!==I||e[49]!==k||e[50]!==p?(L=t.jsxs(g,{open:I,onOpenChange:k,children:[p,j]}),e[46]=g,e[47]=j,e[48]=I,e[49]=k,e[50]=p,e[51]=L):L=e[51],L}function lt(s,e){return e.count-s.count}function nt(s){const e=J.c(67),{availableTags:r,availableCategories:n,selectedTags:a,selectedCategories:l,onTagChange:u,onCategoryChange:o}=s,c=r&&r.length>0||n&&n.length>0,y=a.length>0||l.length>0;if(!c)return null;let N;e[0]!==u||e[1]!==a?(N=d=>{a.includes(d)?u(a.filter(f=>f!==d)):u([...a,d])},e[0]=u,e[1]=a,e[2]=N):N=e[2];const i=N;let g;e[3]!==o||e[4]!==l?(g=d=>{l.includes(d)?o(l.filter(f=>f!==d)):o([...l,d])},e[3]=o,e[4]=l,e[5]=g):g=e[5];const m=g;let h;e[6]!==o||e[7]!==u?(h=()=>{u([]),o([])},e[6]=o,e[7]=u,e[8]=h):h=e[8];const C=h;let R,v,T,I,k,p,S;if(e[9]!==n||e[10]!==r||e[11]!==o||e[12]!==u||e[13]!==l||e[14]!==a||e[15]!==m||e[16]!==i){const d=n?rt(n,6):[];R=l,v=a,S=new Set(d.map(ot)),k="flex items-center border-b border-border";let f;e[24]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:t.jsx(fe,{size:16})}),e[24]=f):f=e[24];let $;e[25]!==n||e[26]!==o||e[27]!==l||e[28]!==m?($=n&&n.length>0&&t.jsx(ce,{label:"Categories",items:n,selectedItems:l,onToggle:m,onClear:()=>o([])}),e[25]=n,e[26]=o,e[27]=l,e[28]=m,e[29]=$):$=e[29];let z;e[30]!==r||e[31]!==u||e[32]!==a||e[33]!==i?(z=r&&r.length>0&&t.jsx(ce,{label:"Tags",items:r,selectedItems:a,onToggle:i,onClear:()=>u([])}),e[30]=r,e[31]=u,e[32]=a,e[33]=i,e[34]=z):z=e[34],e[35]!==z||e[36]!==$?(p=t.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[f,$,z]}),e[35]=z,e[36]=$,e[37]=p):p=e[37],T="flex items-center gap-3 flex-wrap px-5 py-3";let _;e[38]!==l||e[39]!==m?(_=F=>{const A=l.includes(F.value);return t.jsxs("div",{onClick:()=>m(F.value),className:oe("inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer",A?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"),children:[t.jsx("span",{children:F.value}),A&&t.jsx("span",{onClick:E=>{E.stopPropagation(),m(F.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:t.jsx(ee,{size:12})})]},F.value)},e[38]=l,e[39]=m,e[40]=_):_=e[40],I=d.map(_),e[9]=n,e[10]=r,e[11]=o,e[12]=u,e[13]=l,e[14]=a,e[15]=m,e[16]=i,e[17]=R,e[18]=v,e[19]=T,e[20]=I,e[21]=k,e[22]=p,e[23]=S}else R=e[17],v=e[18],T=e[19],I=e[20],k=e[21],p=e[22],S=e[23];let P;if(e[41]!==R||e[42]!==m||e[43]!==S){let d;e[45]!==S?(d=$=>!S.has($),e[45]=S,e[46]=d):d=e[46];let f;e[47]!==m?(f=$=>t.jsxs("div",{onClick:()=>m($),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.jsx("span",{onClick:z=>{z.stopPropagation(),m($)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:t.jsx(ee,{size:12})})]},`cat-${$}`),e[47]=m,e[48]=f):f=e[48],P=R.filter(d).map(f),e[41]=R,e[42]=m,e[43]=S,e[44]=P}else P=e[44];let j;if(e[49]!==v||e[50]!==i){let d;e[52]!==i?(d=f=>t.jsxs("div",{onClick:()=>i(f),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:f}),t.jsx("span",{onClick:$=>{$.stopPropagation(),i(f)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:t.jsx(ee,{size:12})})]},`tag-${f}`),e[52]=i,e[53]=d):d=e[53],j=v.map(d),e[49]=v,e[50]=i,e[51]=j}else j=e[51];let L;e[54]!==C||e[55]!==y?(L=y&&t.jsxs(Y,{variant:"ghost",size:"sm",onClick:C,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[t.jsx(ee,{size:14}),"Clear all"]}),e[54]=C,e[55]=y,e[56]=L):L=e[56];let w;e[57]!==L||e[58]!==T||e[59]!==I||e[60]!==P||e[61]!==j?(w=t.jsxs("div",{className:T,children:[I,P,j,L]}),e[57]=L,e[58]=T,e[59]=I,e[60]=P,e[61]=j,e[62]=w):w=e[62];let x;return e[63]!==w||e[64]!==k||e[65]!==p?(x=t.jsxs("div",{className:k,children:[p,w]}),e[63]=w,e[64]=k,e[65]=p,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(n=>(n.name||n.title||"").toLowerCase().includes(r)||(n.description||n.server?.description||"").toLowerCase().includes(r))}function at(s){return s.verified===!0||s._meta?.["mcp.mesh"]?.verified===!0}function ct(s){const e=J.c(55),{registryId:r,listToolName:n,filtersToolName:a}=s,[l,u]=U.useState(""),o=Ze(l,300),c=me(),{org:y}=se(),{scrollRef:N,saveScrollPosition:i,handleScroll:g}=Xe(`store-discovery:${r}`);let m;e[0]!==o||e[1]!==a||e[2]!==n||e[3]!==r?(m={registryId:r,listToolName:n,filtersToolName:a,search:o},e[0]=o,e[1]=a,e[2]=n,e[3]=r,e[4]=m):m=e[4];const{items:h,hasMore:C,isLoadingMore:R,isInitialLoading:v,isFetching:T,error:I,loadMore:k,availableTags:p,availableCategories:S,selectedTags:P,selectedCategories:j,setSelectedTags:L,setSelectedCategories:w,hasActiveFilters:x}=tt(m);let d,f,$,z;e[5]!==o||e[6]!==T||e[7]!==v||e[8]!==h||e[9]!==l?(d=l?it(h,l):h,f=(l!==o||T)&&!v&&!!l,z=d.filter(at),$=d.filter(M=>!z.find(O=>O.id===M.id)),e[5]=o,e[6]=T,e[7]=v,e[8]=h,e[9]=l,e[10]=d,e[11]=f,e[12]=$,e[13]=z):(d=e[10],f=e[11],$=e[12],z=e[13]);const _=$;let F;e[14]!==c||e[15]!==y.slug||e[16]!==r||e[17]!==i?(F=M=>{i();const O=We(M.name||M.title||M.server?.title||""),H=M.server?.name||M.id;c({to:"/$org/$project/store/$appName",params:{org:y.slug,project:de,appName:O},search:{registryId:r,serverName:H}})},e[14]=c,e[15]=y.slug,e[16]=r,e[17]=i,e[18]=F):F=e[18];const A=F;let E;e[19]!==g||e[20]!==C||e[21]!==R||e[22]!==k?(E=M=>{if(g(),!C||R)return;const O=M.currentTarget;O.scrollHeight-O.scrollTop-O.clientHeight<200&&k()},e[19]=g,e[20]=C,e[21]=R,e[22]=k,e[23]=E):E=e[23];const V=E;let q;e[24]!==f||e[25]!==l?(q=t.jsx(Ve,{value:l,onChange:u,placeholder:"Search for an MCP Server...",isSearching:f}),e[24]=f,e[25]=l,e[26]=q):q=e[26];let G;e[27]!==S||e[28]!==p||e[29]!==j||e[30]!==P||e[31]!==w||e[32]!==L?(G=t.jsx(nt,{availableTags:p,availableCategories:S,selectedTags:P,selectedCategories:j,onTagChange:L,onCategoryChange:w}),e[27]=S,e[28]=p,e[29]=j,e[30]=P,e[31]=w,e[32]=L,e[33]=G):G=e[33];let K;e[34]!==_||e[35]!==I||e[36]!==d||e[37]!==A||e[38]!==x||e[39]!==C||e[40]!==v||e[41]!==R||e[42]!==f||e[43]!==h||e[44]!==l||e[45]!==z?(K=t.jsx("div",{className:"p-5",children:t.jsx("div",{children:I&&!v?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."}),I.message&&t.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:I.message})]}),t.jsxs(Y,{variant:"outline",size:"sm",onClick:mt,children:[t.jsx(ge,{className:"size-4"}),"Try again"]})]}):v?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(te,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):h.length===0&&!x?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."})]}):h.length===0&&x&&!l?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."})]}):l&&d.length===0&&!f?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:[f&&d.length===0&&t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(te,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),z.length>0&&t.jsx(ae,{items:z,title:"Verified",onItemClick:A}),_.length>0&&t.jsx(ae,{items:_,title:z.length>0?"All":"",onItemClick:A}),C&&R&&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(te,{size:20,className:"animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[34]=_,e[35]=I,e[36]=d,e[37]=A,e[38]=x,e[39]=C,e[40]=v,e[41]=R,e[42]=f,e[43]=h,e[44]=l,e[45]=z,e[46]=K):K=e[46];let B;e[47]!==V||e[48]!==N||e[49]!==K?(B=t.jsx("div",{ref:N,className:"flex-1 overflow-y-auto",onScroll:V,children:K}),e[47]=V,e[48]=N,e[49]=K,e[50]=B):B=e[50];let W;return e[51]!==q||e[52]!==G||e[53]!==B?(W=t.jsxs("div",{className:"flex flex-col h-full",children:[q,G,B]}),e[51]=q,e[52]=G,e[53]=B,e[54]=W):W=e[54],W}function mt(){return window.location.reload()}function dt(s){const e=J.c(10),{registryId:r}=s,n=De(r),a=n?.tools;let l;e[0]!==a?(l=_e(a),e[0]=a,e[1]=l):l=e[1];const u=l;if(!u){let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"bg-muted p-3 rounded-full",children:t.jsx(xe,{className:"size-8 text-muted-foreground"})}),e[2]=g):g=e[2];let m;return e[3]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12 text-center space-y-4",children:[g,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]=m):m=e[3],m}const o=n?.tools;let c;e[4]!==o?(c=Ae(o),e[4]=o,e[5]=c):c=e[5];const N=c||void 0;let i;return e[6]!==u||e[7]!==r||e[8]!==N?(i=t.jsx(ct,{registryId:r,listToolName:u,filtersToolName:N}),e[6]=u,e[7]=r,e[8]=N,e[9]=i):i=e[9],i}function ut(s){const e=J.c(43),{registries:r,value:n,onValueChange:a,onAddWellKnown:l,wellKnownRegistries:u,placeholder:o}=s,c=o===void 0?"Select a registry...":o,[y,N]=U.useState(!1);let i,g,m,h,C,R,v,T;if(e[0]!==y||e[1]!==c||e[2]!==r||e[3]!==n){let w;e[12]!==n?(w=d=>d.id===n,e[12]=n,e[13]=w):w=e[13];const x=r.find(w);g=ve,v=y,T=N,i=be,R=!0,m="button",e[14]===Symbol.for("react.memo_cache_sentinel")?(h=oe("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]=h):h=e[14],C=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:c}),e[0]=y,e[1]=c,e[2]=r,e[3]=n,e[4]=i,e[5]=g,e[6]=m,e[7]=h,e[8]=C,e[9]=R,e[10]=v,e[11]=T}else i=e[4],g=e[5],m=e[6],h=e[7],C=e[8],R=e[9],v=e[10],T=e[11];let I;e[15]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(Se,{className:"size-4 opacity-50"}),e[15]=I):I=e[15];let k;e[16]!==m||e[17]!==h||e[18]!==C?(k=t.jsxs("button",{type:m,className:h,children:[C,I]}),e[16]=m,e[17]=h,e[18]=C,e[19]=k):k=e[19];let p;e[20]!==i||e[21]!==R||e[22]!==k?(p=t.jsx(i,{asChild:R,children:k}),e[20]=i,e[21]=R,e[22]=k,e[23]=p):p=e[23];let S;if(e[24]!==a||e[25]!==r||e[26]!==n){let w;e[28]!==a||e[29]!==n?(w=x=>t.jsxs("button",{type:"button",onClick:()=>{a(x.id??x.name),N(!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})]}),n===(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]=a,e[29]=n,e[30]=w):w=e[30],S=r.map(w),e[24]=a,e[25]=r,e[26]=n,e[27]=S}else S=e[27];let P;e[31]!==l||e[32]!==u?(P=u.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"}),u.map(w=>t.jsxs("button",{type:"button",onClick:()=>{l(w),N(!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]=l,e[32]=u,e[33]=P):P=e[33];let j;e[34]!==S||e[35]!==P?(j=t.jsxs(Ne,{align:"end",className:"w-auto min-w-[200px] p-1",children:[S,P]}),e[34]=S,e[35]=P,e[36]=j):j=e[36];let L;return e[37]!==g||e[38]!==p||e[39]!==j||e[40]!==v||e[41]!==T?(L=t.jsxs(g,{open:v,onOpenChange:T,children:[p,j]}),e[37]=g,e[38]=p,e[39]=j,e[40]=v,e[41]=T,e[42]=L):L=e[42],L}function ft({registries:s,onConnected:e}){const r=ye(),{org:{slug:n}}=se(),{data:a}=Te.useSession(),l=me(),[u,o]=U.useState(!1),c=s[0],y=async()=>{if(!(!c||!a?.user?.id)){o(!0);try{const i=await r.create.mutateAsync(c);e?.(i.id)}finally{o(!1)}}},N=()=>{l({to:"/$org/$project/mcps",params:{org:n,project:de},search:{action:"create"}})};return t.jsx(He,{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:y,disabled:u||!c,children:[c?.icon&&t.jsx("img",{src:c.icon,alt:"",className:"size-4"}),u?"Installing...":"Install Registry"]}),t.jsx(Y,{variant:"outline",onClick:N,children:"Custom Connection"})]})})}function xt(s){const e=J.c(15),{error:r,onRetry:n,registryName:a}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(ue,{className:"h-6 w-6 text-destructive"})}),e[0]=l):l=e[0];let u;e[1]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("h3",{className:"text-lg font-medium",children:"Unable to load store"}),e[1]=u):u=e[1];let o;e[2]!==a?(o=t.jsxs("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:["The ",t.jsx("strong",{children:a})," registry is currently unreachable. This may be a temporary issue — try again in a moment."]}),e[2]=a,e[3]=o):o=e[3];let c;e[4]!==r?(c=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]=c):c=e[5];let y;e[6]!==o||e[7]!==c?(y=t.jsxs("div",{className:"space-y-2",children:[u,o,c]}),e[6]=o,e[7]=c,e[8]=y):y=e[8];let N;e[9]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(ge,{className:"size-4"}),e[9]=N):N=e[9];let i;e[10]!==n?(i=t.jsxs(Y,{variant:"outline",size:"sm",onClick:n,children:[N,"Try again"]}),e[10]=n,e[11]=i):i=e[11];let g;return e[12]!==y||e[13]!==i?(g=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[l,y,i]}),e[12]=y,e[13]=i,e[14]=g):g=e[14],g}function ss(){const s=J.c(48),{org:e,project:r}=se(),n=Ge(),a=ye(),l=Ie(),u=l.location.pathname.includes("/store/")&&l.location.pathname.split("/").length>3,o=Je(n);let c;s[0]!==e.id?(c=Ke.SELF(e.id),s[0]=e.id,s[1]=c):c=s[1];const y=c,N=r.enabledPlugins,i=N==null||N.includes(le),g=o.filter(b=>b.id!==y?!0:i);let m;s[2]!==y?(m=b=>b.id===y,s[2]=y,s[3]=m):m=s[3];const h=g.some(m);let C;s[4]!==e.id?(C={connectionId:Me,orgId:e.id},s[4]=e.id,s[5]=C):C=s[5];const R=je(C);let v;s[6]!==r.id||s[7]!==R?(v=async()=>{const b=await R.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:r.id,pluginId:le}});return b.structuredContent??b},s[6]=r.id,s[7]=R,s[8]=v):v=s[8];const{data:T}=he({queryKey:ne.projectPluginConfig(r.id??"",le),queryFn:v,enabled:h&&!!r.id,staleTime:6e4}),I=T?.config?.settings;let k;s[9]!==I||s[10]!==y?(k=b=>b.id===y&&I?{id:b.id,name:I.registryName||b.title,icon:I.registryIcon||b.icon||void 0}:{id:b.id,name:b.title,icon:b.icon||void 0},s[9]=I,s[10]=y,s[11]=k):k=s[11];const p=g.map(k);let S;s[12]!==e.slug?(S=Qe.selectedRegistry(e.slug),s[12]=e.slug,s[13]=S):S=s[13];const[P,j]=Ye(S,pt);let L;s[14]!==P?(L=b=>b.id===P,s[14]=P,s[15]=L):L=s[15];const x=g.find(L)?.id||g[0]?.id||"";let d;s[16]!==e.id?(d=Oe(e.id),s[16]=e.id,s[17]=d):d=s[17];let f;s[18]!==d?(f=[d],s[18]=d,s[19]=f):f=s[19];const $=f;let z;s[20]===Symbol.for("react.memo_cache_sentinel")?(z=[Be()],s[20]=z):z=s[20];const _=z;let F;s[21]!==a.create||s[22]!==j?(F=async b=>{const D=await a.create.mutateAsync(b);j(D.id)},s[21]=a.create,s[22]=j,s[23]=F):F=s[23];const A=F,E=new Set(g.map(gt)),V=$.filter(b=>b.id&&!E.has(b.id)),q=_.filter(b=>b.id&&!E.has(b.id));if(u){let b;return s[24]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(Re,{}),s[24]=b):b=s[24],b}let G;s[25]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx(Z.Header.Left,{children:t.jsx(Pe,{children:t.jsx(ze,{children:t.jsx(ke,{children:t.jsx($e,{children:"Store"})})})})}),s[25]=G):G=s[25];let K;s[26]!==A?(K=async b=>A(b),s[26]=A,s[27]=K):K=s[27];let B;s[28]!==V||s[29]!==x||s[30]!==p||s[31]!==j||s[32]!==K?(B=t.jsxs(Z.Header,{children:[G,t.jsx(Z.Header.Right,{children:t.jsx(ut,{wellKnownRegistries:V,registries:p,value:x,onValueChange:j,onAddWellKnown:K,placeholder:"Select store..."})})]}),s[28]=V,s[29]=x,s[30]=p,s[31]=j,s[32]=K,s[33]=B):B=s[33];let W;s[34]!==x||s[35]!==p?(W=b=>{const{error:D,resetError:X}=b;return t.jsx(xt,{error:D,onRetry:X,registryName:p.find(re=>re.id===x)?.name??"registry"})},s[34]=x,s[35]=p,s[36]=W):W=s[36];let M;s[37]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[t.jsx(te,{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]=M):M=s[37];let O;s[38]!==q||s[39]!==x||s[40]!==j?(O=t.jsx(U.Suspense,{fallback:M,children:x?t.jsx(dt,{registryId:x}):t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(ft,{registries:q,onConnected:b=>{j(b)}})})}),s[38]=q,s[39]=x,s[40]=j,s[41]=O):O=s[41];let H;s[42]!==W||s[43]!==O?(H=t.jsx(Z.Content,{children:t.jsx(Le,{fallback:W,children:O})}),s[42]=W,s[43]=O,s[44]=H):H=s[44];let Q;return s[45]!==B||s[46]!==H?(Q=t.jsxs(Z,{children:[B,H]}),s[45]=B,s[46]=H,s[47]=Q):Q=s[47],Q}function gt(s){return s.id}function pt(s){return s??""}export{ss as default};
|
package/dist/client/assets/{plugin-empty-state-COcI3glI.js → plugin-empty-state--d7z38bx.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,j as t}from"./index-
|
|
1
|
+
import{c as s,j as t}from"./index-Dp8TDmPV.js";import{e as r}from"./Dataflow03-Dh760DjE.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};
|
package/dist/client/assets/{plugin-empty-state-CkhDG6pV.js → plugin-empty-state-DUWxbNZT.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,j as t,I as o}from"./index-
|
|
1
|
+
import{c as n,j as t,I as o}from"./index-Dp8TDmPV.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};
|
|
@@ -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-Dp8TDmPV.js";import{i as R}from"./Check-RSjbQD0O.js";import{t as _}from"./ChevronDown-C42nqF2a.js";import{e as y}from"./Dataflow03-Dh760DjE.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{c as w,j as s,r as S,I as y}from"./index-
|
|
1
|
+
import{c as w,j as s,r as S,I as y}from"./index-Dp8TDmPV.js";import{i as _}from"./Check-RSjbQD0O.js";import{t as k}from"./ChevronDown-C42nqF2a.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 O(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{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,ar as $,j as c,aF as L,an as G,at as A,a9 as _,av as P,aG as E,ax as j,aE as H,aJ as w,aO as z,aP as K,ay as J,aQ as Q,aR as U,aS as V,aH as W,aI as Z,aL as q,c as R}from"./index-
|
|
1
|
+
import{r as i,ar as $,j as c,aF as L,an as G,at as A,a9 as _,av as P,aG as E,ax as j,aE as H,aJ as w,aO as z,aP as K,ay as J,aQ as Q,aR as U,aS as V,aH as W,aI as Z,aL as q,c as R}from"./index-Dp8TDmPV.js";import{c as B}from"./button-CJa3f3rL.js";var m="Popover",[b]=J(m,[w]),g=w(),[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(E,{...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(E,{asChild:!0,...a,children:p})});y.displayName=S;var O="PopoverPortal",[ee,oe]=b(O,{forceMount:void 0}),D=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})})})};D.displayName=O;var v="PopoverContent",M=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})})});M.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=D,ue=M;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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as j,j as s,r as S,S as p,a as b,u as y,O as h,l as N,P as v,m as P}from"./index-
|
|
1
|
+
import{c as j,j as s,r as S,S as p,a as b,u as y,O as h,l as N,P as v,m as P}from"./index-Dp8TDmPV.js";import{u as $}from"./use-project-BDU5VGwr.js";import{B as _}from"./button-CJa3f3rL.js";import"./useQuery-DCx9kDUK.js";import"./constants-LnQa4w9L.js";function z(e){const t=j.c(12),{projectSlug:m,orgSlug:c,error:i}=e,r=P();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 l;t[1]!==m?(l=s.jsxs("p",{className:"text-muted-foreground text-center",children:['There was an error loading the project "',m,'".']}),t[1]=m,t[2]=l):l=t[2];let n;t[3]!==i.message?(n=s.jsx("p",{className:"text-sm text-muted-foreground",children:i.message}),t[3]=i.message,t[4]=n):n=t[4];let u;t[5]!==r||t[6]!==c?(u=s.jsx(_,{variant:"link",onClick:()=>r({to:"/$org/$project",params:{org:c,project:h}}),children:"Go to organization home"}),t[5]=r,t[6]=c,t[7]=u):u=t[7];let d;return t[8]!==l||t[9]!==n||t[10]!==u?(d=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[o,l,n,u]}),t[8]=l,t[9]=n,t[10]=u,t[11]=d):d=t[11],d}function k(e){const t=j.c(9),{projectSlug:m,orgSlug:c}=e,i=P();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("h1",{className:"text-xl font-semibold",children:"Project not found"}),t[0]=r):r=t[0];let o;t[1]!==m?(o=s.jsxs("p",{className:"text-muted-foreground text-center",children:['The project "',m,'" does not exist in this organization.']}),t[1]=m,t[2]=o):o=t[2];let l;t[3]!==i||t[4]!==c?(l=s.jsx(_,{variant:"link",onClick:()=>i({to:"/$org/$project",params:{org:c,project:h}}),children:"Go to organization home"}),t[3]=i,t[4]=c,t[5]=l):l=t[5];let n;return t[6]!==o||t[7]!==l?(n=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[r,o,l]}),t[6]=o,t[7]=l,t[8]=n):n=t[8],n}function C(){const e=j.c(22);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const m=b(t),{org:c}=y(),i=m.org,r=m.project,{data:o,isLoading:l,error:n}=$(c.id,r);if(l){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(p,{}),e[1]=a):a=e[1],a}if(n){let a;return e[2]!==n||e[3]!==i||e[4]!==r?(a=s.jsx(z,{projectSlug:r,orgSlug:i,error:n}),e[2]=n,e[3]=i,e[4]=r,e[5]=a):a=e[5],a}if(!o){let a;return e[6]!==i||e[7]!==r?(a=s.jsx(k,{projectSlug:r,orgSlug:i}),e[6]=i,e[7]=r,e[8]=a):a=e[8],a}const u=o.slug===h;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]!==u?(d={id:o.id,organizationId:o.organizationId,slug:o.slug,name:o.name,description:o.description,enabledPlugins:o.enabledPlugins,ui:o.ui,isOrgAdmin:u},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]=u,e[17]=d):d=e[17];const x=d;let f;e[18]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(S.Suspense,{fallback:s.jsx(p,{}),children:s.jsx(N,{})}),e[18]=f):f=e[18];let g;return e[19]!==x||e[20]!==c?(g=s.jsx(v,{org:c,project:x,children:f}),e[19]=x,e[20]=c,e[21]=g):g=e[21],g}function L(){const e=j.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(S.Suspense,{fallback:s.jsx(p,{}),children:s.jsx(C,{})}),e[0]=t):t=e[0],t}export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as H,u as W,z as X,O as Y,h as oe,k as ae,j as s,o as ce,s as G,K as U,t as R,r as q,aN as te,bv as ue,m as de,g as ge}from"./index-_8KOOZTs.js";import{P as Z}from"./index-CFGId0Wt.js";import{B as fe,a as he,b as pe,c as xe}from"./breadcrumb-C8g_xf1t.js";import{u as ee}from"./useMutation-DToMWBEW.js";import{a as ie,u as re}from"./constants-Cq6ZE1z8.js";import{B as L,c as je}from"./button-DD0bNYN6.js";import{I as V}from"./input-BSJwtDuS.js";import{T as be}from"./textarea-CI2HqKmr.js";import{F as Q,d as M,a as me,b as $,c as K,e as se,f as J}from"./form-BAcIqAgh.js";import{u as ye}from"./useQuery-DJPFtjTr.js";import{S as ve}from"./switch-a94x2zYD.js";import{L as Ne}from"./label-D4ILATg5.js";import{h as Ce}from"./use-connection-DXTPjN_m.js";import{a as Se,c as Pe}from"./use-binding-e5wAJ2Zj.js";import{u as we}from"./use-install-from-registry-CE6U_BtA.js";import{i as Ie}from"./Loading01-DO6hmuEv.js";import{s as Ee}from"./Plus-trDN35Hh.js";import{S as Fe,a as De,b as _e,c as Oe,d as le}from"./select-DKi1SL5l.js";import{i as Te}from"./Upload01-Cf6OgDth.js";import{i as Ae}from"./X-CV-Sy3w0.js";import{c as ze,h as Be,d as ke,b as Re,A as Le,e as Ue,g as qe,a as Me,f as $e}from"./alert-dialog-BuC_3NDu.js";import"./ChevronRight-bn8bbclH.js";import"./binder-B_yBrcGV.js";import"./extract-connection-data-nGEdjJnK.js";import"./constants-Dn6qg1rG.js";import"./github-icon-Dp3wHhYE.js";import"./registry-utils-B9cy_o0B.js";import"./generate-id-Dyweu44Y.js";import"./index-D8YdWWJr.js";import"./Check-BpnmtlNp.js";import"./ChevronDown-ATEjQZt3.js";const Ke=ce({name:G().min(1,"Name is required").max(200,"Name is too long"),description:G().max(1e3,"Description is too long").nullable()});function Ge(){const e=H.c(58),{org:t,project:i}=W(),o=X(),d=i.slug===Y;let g;e[0]!==t.id?(g={connectionId:ie,orgId:t.id},e[0]=t.id,e[1]=g):g=e[1];const u=re(g);let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=oe(Ke),e[2]=x):x=e[2];const j=i.name??"",b=i.description??"";let a;e[3]!==j||e[4]!==b?(a={resolver:x,values:{name:j,description:b}},e[3]=j,e[4]=b,e[5]=a):a=e[5];const c=ae(a);let f;e[6]!==u||e[7]!==i.id?(f=async B=>{const _=await u.callTool({name:"PROJECT_UPDATE",arguments:{projectId:i.id,name:B.name,description:B.description||null}});return _.structuredContent??_},e[6]=u,e[7]=i.id,e[8]=f):f=e[8];let h;e[9]!==c||e[10]!==t.id||e[11]!==i.slug||e[12]!==o?(h=()=>{o.invalidateQueries({queryKey:U.project(t.id,i.slug)}),o.invalidateQueries({queryKey:U.projects(t.id)}),R.success("Project updated successfully"),c.reset(c.getValues())},e[9]=c,e[10]=t.id,e[11]=i.slug,e[12]=o,e[13]=h):h=e[13];let w;e[14]!==f||e[15]!==h?(w={mutationFn:f,onSuccess:h,onError:Qe},e[14]=f,e[15]=h,e[16]=w):w=e[16];const m=ee(w);let y;e[17]!==m?(y=async B=>{await m.mutateAsync(B)},e[17]=m,e[18]=y):y=e[18];const P=y,C=c.formState.isDirty;let I;e[19]!==c||e[20]!==P?(I=c.handleSubmit(P),e[19]=c,e[20]=P,e[21]=I):I=e[21];let S;e[22]!==d||e[23]!==m.isPending?(S=B=>{const{field:_}=B;return s.jsxs($,{children:[s.jsx(K,{children:"Project Name"}),s.jsx(M,{children:s.jsx(V,{placeholder:"My Project",..._,disabled:d||m.isPending})}),d&&s.jsx(se,{children:"The organization admin project name cannot be changed."}),s.jsx(J,{})]})},e[22]=d,e[23]=m.isPending,e[24]=S):S=e[24];let n;e[25]!==c.control||e[26]!==S?(n=s.jsx(Q,{control:c.control,name:"name",render:S}),e[25]=c.control,e[26]=S,e[27]=n):n=e[27];let r;e[28]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(K,{children:"Slug"}),e[28]=r):r=e[28];let l;e[29]!==i.slug?(l=s.jsx(M,{children:s.jsx(V,{value:i.slug,disabled:!0,className:"bg-muted"})}),e[29]=i.slug,e[30]=l):l=e[30];let p;e[31]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(se,{children:"The project slug cannot be changed after creation."}),e[31]=p):p=e[31];let v;e[32]!==l?(v=s.jsxs($,{children:[r,l,p]}),e[32]=l,e[33]=v):v=e[33];let N;e[34]!==m.isPending?(N=B=>{const{field:_}=B;return s.jsxs($,{children:[s.jsx(K,{children:"Description"}),s.jsx(M,{children:s.jsx(be,{placeholder:"Optional project description...",rows:3,..._,value:_.value??"",disabled:m.isPending})}),s.jsx(J,{})]})},e[34]=m.isPending,e[35]=N):N=e[35];let F;e[36]!==c.control||e[37]!==N?(F=s.jsx(Q,{control:c.control,name:"description",render:N}),e[36]=c.control,e[37]=N,e[38]=F):F=e[38];const O=!C||m.isPending,T=m.isPending?"Saving...":"Save Changes";let D;e[39]!==O||e[40]!==T?(D=s.jsx(L,{type:"submit",disabled:O,className:"min-w-24",children:T}),e[39]=O,e[40]=T,e[41]=D):D=e[41];let A;e[42]!==c||e[43]!==C||e[44]!==m.isPending?(A=C&&s.jsx(L,{type:"button",variant:"outline",onClick:()=>c.reset(),disabled:m.isPending,children:"Cancel"}),e[42]=c,e[43]=C,e[44]=m.isPending,e[45]=A):A=e[45];let z;e[46]!==D||e[47]!==A?(z=s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[D,A]}),e[46]=D,e[47]=A,e[48]=z):z=e[48];let E;e[49]!==n||e[50]!==v||e[51]!==F||e[52]!==z||e[53]!==I?(E=s.jsxs("form",{onSubmit:I,className:"space-y-6",children:[n,v,F,z]}),e[49]=n,e[50]=v,e[51]=F,e[52]=z,e[53]=I,e[54]=E):E=e[54];let k;return e[55]!==c||e[56]!==E?(k=s.jsx(me,{...c,children:E}),e[55]=c,e[56]=E,e[57]=k):k=e[57],k}function Qe(e){R.error("Failed to update project: "+(e instanceof Error?e.message:"Unknown error"))}function Je({value:e,onValueChange:t,placeholder:i="Select a connection...",binding:o,bindingType:d,onAddNew:g,className:u,disabled:x=!1}){const[j,b]=q.useState(!1),{installByBinding:a,isInstalling:c}=we(),f=j||c,h=Ce(),w=Se({connections:h,binding:typeof o=="string"?o:void 0}),m=!o||!h?h??[]:typeof o=="string"?w:Array.isArray(o)&&o.length>0?h.filter(n=>Pe(n,o)):h,y=(()=>{if(!d?.startsWith("@"))return null;const[n,r]=d.replace("@","").split("/");return n&&r?{scope:n,appName:r}:null})(),P=(()=>{let n=m;const r=Array.isArray(o)&&o.length>0;if(y&&!r&&(n=n.filter(l=>{const p=l.app_name,v=l.metadata?.scopeName;return p===y.appName&&v===y.scope})),e&&!n.some(l=>l.id===e)){const l=h?.find(p=>p.id===e);if(l)return[l,...n]}return n})(),C=d?.startsWith("@"),I=async()=>{if(C&&d){b(!0);try{const n=await a(d);n&&t(n.id)}finally{b(!1)}return}g?.()},S=P.find(n=>n.id===e);return s.jsxs(Fe,{value:e??"none",onValueChange:n=>t(n==="none"?null:n),disabled:x,children:[s.jsx(De,{size:"sm",className:je("w-[200px]",u),children:s.jsx(_e,{placeholder:i,children:S?s.jsxs("div",{className:"flex items-center gap-2",children:[S.icon?s.jsx("img",{src:S.icon,alt:S.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:S.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"truncate",children:S.title})]}):i})}),s.jsxs(Oe,{children:[s.jsx(le,{value:"none",children:"No connection"}),P.length===0?s.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No compatible connections found"}):P.map(n=>s.jsx(le,{value:n.id,children:s.jsxs("div",{className:"flex items-center gap-2",children:[n.icon?s.jsx("img",{src:n.icon,alt:n.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:n.title.slice(0,1).toUpperCase()}),s.jsx("span",{children:n.title})]})},n.id)),(g||C)&&s.jsx("div",{className:"border-t border-border",children:s.jsx(L,{onPointerDown:n=>n.stopPropagation(),onClick:n=>{n.preventDefault(),n.stopPropagation(),I()},disabled:f||x,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:f?s.jsxs(s.Fragment,{children:[s.jsx(Ie,{size:16,className:"animate-spin"}),s.jsx("span",{children:"Connecting..."})]}):s.jsxs(s.Fragment,{children:[s.jsx(Ee,{size:16}),s.jsx("span",{children:"Add Connection"})]})})})]})]})}const Ve=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")},ne=e=>{const t=e.structuredContent??e,i=t&&typeof t=="object"?t:null,o=i?.content?.[0]?.text&&typeof i.content[0].text=="string"?i.content[0].text:null;if(i?.isError)throw new Error(o??"Tool call failed");if(Ve(t))throw new Error(t.text);return t};function He(e){return e.requiresMcpBinding===!0?!0:e.binding!==void 0}function We(e){const t=H.c(48),{plugin:i,isEnabled:o,isSaving:d,pendingBinding:g,description:u,label:x,icon:j,projectId:b,client:a,onBindingChange:c,onToggle:f}=e;let h;t[0]!==i?(h=He(i),t[0]=i,t[1]=h):h=t[1];const w=h;let m;t[2]!==i.id||t[3]!==b?(m=U.projectPluginConfig(b??"",i.id),t[2]=i.id,t[3]=b,t[4]=m):m=t[4];let y;t[5]!==a||t[6]!==i.id||t[7]!==b?(y=async()=>{if(!b)throw new Error("Project ID is required to load plugin config.");const E=await a.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:b,pluginId:i.id}});return ne(E)},t[5]=a,t[6]=i.id,t[7]=b,t[8]=y):y=t[8];const P=!!b&&w;let C;t[9]!==m||t[10]!==y||t[11]!==P?(C={queryKey:m,queryFn:y,enabled:P},t[9]=m,t[10]=y,t[11]=P,t[12]=C):C=t[12];const{data:I,isLoading:S}=ye(C),n=I?.config?.connectionId??null,r=g!==void 0?g:n;let l;t[13]!==j?(l=j&&s.jsx("div",{className:"flex-shrink-0 text-muted-foreground [&>svg]:size-4",children:j}),t[13]=j,t[14]=l):l=t[14];let p;t[15]!==x?(p=s.jsx("div",{className:"text-sm font-medium text-foreground",children:x}),t[15]=x,t[16]=p):p=t[16];let v;t[17]!==u?(v=u&&s.jsx("p",{className:"text-xs text-muted-foreground",children:u}),t[17]=u,t[18]=v):v=t[18];let N;t[19]!==p||t[20]!==v?(N=s.jsxs("div",{className:"min-w-0",children:[p,v]}),t[19]=p,t[20]=v,t[21]=N):N=t[21];let F;t[22]!==l||t[23]!==N?(F=s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[l,N]}),t[22]=l,t[23]=N,t[24]=F):F=t[24];let O;t[25]!==f||t[26]!==i.id?(O=E=>f(i.id,E),t[25]=f,t[26]=i.id,t[27]=O):O=t[27];let T;t[28]!==o||t[29]!==d||t[30]!==O?(T=s.jsx(ve,{checked:o,onCheckedChange:O,disabled:d}),t[28]=o,t[29]=d,t[30]=O,t[31]=T):T=t[31];let D;t[32]!==F||t[33]!==T?(D=s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[F,T]}),t[32]=F,t[33]=T,t[34]=D):D=t[34];let A;t[35]!==S||t[36]!==o||t[37]!==d||t[38]!==w||t[39]!==c||t[40]!==i.binding||t[41]!==i.id||t[42]!==r||t[43]!==n?(A=o&&w&&s.jsxs("div",{className:"mt-3 pl-7 flex items-center gap-3",children:[s.jsx(Ne,{className:"text-xs text-muted-foreground w-24",children:"Connection"}),s.jsx(Je,{value:r??null,onValueChange:E=>c(i.id,E,n),binding:i.binding,placeholder:"Select connection...",className:"w-56",disabled:d||S})]}),t[35]=S,t[36]=o,t[37]=d,t[38]=w,t[39]=c,t[40]=i.binding,t[41]=i.id,t[42]=r,t[43]=n,t[44]=A):A=t[44];let z;return t[45]!==D||t[46]!==A?(z=s.jsxs("div",{className:"py-3",children:[D,A]}),t[45]=D,t[46]=A,t[47]=z):z=t[47],z}function Ze(){const{org:e,project:t}=W(),i=X(),o=re({connectionId:ie,orgId:e.id}),[d,g]=q.useState({}),[u,x]=q.useState({}),[j,b]=q.useState(!1),a=t.enabledPlugins??[],c=n=>{const r=d[n];return r!==void 0?r:a.includes(n)},f=()=>{const n=new Set(a);for(const[r,l]of Object.entries(d))l?n.add(r):n.delete(r);return Array.from(n)},h=Object.keys(d).length>0||Object.keys(u).length>0,w=(n,r)=>{const l=a.includes(n);g(r===l?p=>{const{[n]:v,...N}=p;return N}:p=>({...p,[n]:r}))},m=(n,r,l)=>{if(r===l){x(p=>{const{[n]:v,...N}=p;return N});return}x(p=>({...p,[n]:r}))},y=ee({mutationFn:async n=>{const r=[];if(n.updatePlugins){const l=await o.callTool({name:"PROJECT_UPDATE",arguments:{projectId:t.id,enabledPlugins:n.enabledPlugins}});r.push(ne(l))}if(n.bindingUpdates.length>0){const l=await Promise.all(n.bindingUpdates.map(async({pluginId:p,connectionId:v})=>{const N=await o.callTool({name:"PROJECT_PLUGIN_CONFIG_UPDATE",arguments:{projectId:t.id,pluginId:p,connectionId:v}});return ne(N)}));r.push(...l)}return r},onSuccess:(n,r)=>{r.updatePlugins&&(i.invalidateQueries({queryKey:U.project(e.id,t.slug)}),i.invalidateQueries({queryKey:U.projects(e.id)})),r.bindingUpdates.forEach(({pluginId:l})=>{i.invalidateQueries({queryKey:U.projectPluginConfig(t.id??"",l)})}),g({}),x({}),R.success("Plugins updated successfully")},onError:n=>{R.error("Failed to update plugins: "+(n instanceof Error?n.message:"Unknown error"))},onSettled:()=>{b(!1)}}),P=()=>{b(!0),y.mutate({enabledPlugins:f(),updatePlugins:Object.keys(d).length>0,bindingUpdates:Object.entries(u).map(([n,r])=>({pluginId:n,connectionId:r}))})},C=()=>{g({}),x({})},I=n=>ue.find(r=>r.pluginId===n),S=n=>te.find(l=>l.id===n)?.description??null;return te.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("p",{className:"text-sm text-muted-foreground",children:"Enable or disable plugins for this project. Enabled plugins will appear in the sidebar."}),s.jsx("div",{className:"divide-y divide-border border-y border-border",children:te.map(n=>{const r=I(n.id),l=S(n.id),p=c(n.id);return s.jsx(We,{plugin:n,isEnabled:p,isSaving:j,pendingBinding:u[n.id],description:l,label:r?.label??n.id,icon:r?.icon,projectId:t.id,client:o,onBindingChange:m,onToggle:w},n.id)})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(L,{variant:"outline",onClick:C,disabled:!h||j,children:"Cancel"}),s.jsx(L,{onClick:P,disabled:!h||j,className:"min-w-24",children:j?"Saving...":"Save Changes"})]})]})}const Ye=ce({name:G().min(1,"Name is required").max(255,"Name is too long"),slug:G().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:G().optional()});function Xe(e){const t=H.c(24),{value:i,onChange:o,name:d}=e,g=q.useRef(null);let u;t[0]!==o?(u=S=>{const n=S.target.files?.[0];if(n){if(n.size>2097152){R.error("Image must be smaller than 2MB");return}const r=new FileReader;r.onerror=()=>{const l=r.error;console.error("FileReader error:",l),R.error(l?.message||"Failed to read image file. Please try again."),g.current&&(g.current.value="")},r.onloadend=()=>{if(r.readyState===FileReader.DONE&&r.result){const l=r.result;o(l)}},r.readAsDataURL(n)}},t[0]=o,t[1]=u):u=t[1];const x=u;let j;t[2]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{g.current?.click()},t[2]=j):j=t[2];const b=j;let a;t[3]!==o?(a=S=>{S.stopPropagation(),o("")},t[3]=o,t[4]=a):a=t[4];const c=a;let f;t[5]!==x?(f=s.jsx("input",{type:"file",ref:g,className:"hidden",accept:"image/*",onChange:x}),t[5]=x,t[6]=f):f=t[6];let h;t[7]!==c||t[8]!==d||t[9]!==i?(h=i?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:i,alt:d||"Organization logo",className:"w-full h-full object-cover"})}),s.jsx("button",{type:"button",onClick:c,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(Ae,{className:"h-3 w-3"})})]}):s.jsxs("button",{type:"button",onClick:b,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(Te,{className:"h-5 w-5"}),s.jsx("span",{className:"text-xs",children:"Upload"})]}),t[7]=c,t[8]=d,t[9]=i,t[10]=h):h=t[10];const w=i?"Change Logo":"Upload Logo";let m;t[11]!==w?(m=s.jsx(L,{type:"button",variant:"outline",size:"sm",onClick:b,className:"mb-2",children:w}),t[11]=w,t[12]=m):m=t[12];let y;t[13]!==c||t[14]!==i?(y=i&&s.jsx(L,{type:"button",variant:"ghost",size:"sm",onClick:c,className:"ml-2",children:"Remove"}),t[13]=c,t[14]=i,t[15]=y):y=t[15];let P;t[16]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),t[16]=P):P=t[16];let C;t[17]!==m||t[18]!==y?(C=s.jsxs("div",{className:"flex-1",children:[m,y,P]}),t[17]=m,t[18]=y,t[19]=C):C=t[19];let I;return t[20]!==C||t[21]!==f||t[22]!==h?(I=s.jsxs("div",{className:"flex items-start gap-4",children:[f,h,C]}),t[20]=C,t[21]=f,t[22]=h,t[23]=I):I=t[23],I}function et(){const e=de(),{org:t,project:i}=W(),o=X(),[d,g]=q.useState(!1),u=ae({resolver:oe(Ye),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),x=ee({mutationFn:async a=>{const c={name:a.name,slug:a.slug};a.logo&&(c.logo=a.logo);const f=await ge.organization.update({organizationId:t.id,data:c});if(f?.error)throw new Error(f.error.message||"Failed to update organization");return f},onSuccess:a=>{o.invalidateQueries({queryKey:U.organizations()}),o.invalidateQueries({queryKey:U.activeOrganization(t.slug)}),R.success("Organization settings updated successfully"),a?.data?.slug&&a.data.slug!==t.slug&&e({to:"/$org/$project/settings",params:{org:a.data.slug,project:i.slug}})},onError:a=>{R.error(a instanceof Error?a.message:"Failed to update organization")},onSettled:()=>{g(!1)}}),j=a=>{g(!0),x.mutate(a)},b=u.formState.isDirty;return s.jsx(me,{...u,children:s.jsxs("form",{onSubmit:u.handleSubmit(j),className:"space-y-6",children:[s.jsx(Q,{control:u.control,name:"name",render:({field:a})=>s.jsxs($,{children:[s.jsx(K,{children:"Organization Name"}),s.jsx(M,{children:s.jsx(V,{placeholder:"My Organization",...a,disabled:d})}),s.jsx(J,{})]})}),s.jsx(Q,{control:u.control,name:"slug",render:({field:a})=>s.jsxs($,{children:[s.jsx(K,{children:"Organization Slug"}),s.jsx(M,{children:s.jsx(V,{placeholder:"my-organization",...a,disabled:d,onChange:c=>{const f=c.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");a.onChange(f)}})}),s.jsx(se,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(J,{})]})}),s.jsx(Q,{control:u.control,name:"logo",render:({field:a})=>s.jsxs($,{children:[s.jsx(K,{children:"Logo"}),s.jsx(M,{children:s.jsx(Xe,{value:a.value,onChange:a.onChange,name:u.watch("name")})}),s.jsx(J,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(L,{type:"submit",disabled:!b||d,className:"min-w-24",children:d?"Saving...":"Save Changes"}),b&&s.jsx(L,{type:"button",variant:"outline",onClick:()=>u.reset(),disabled:d,children:"Cancel"})]})]})})}function tt(){const e=H.c(44),{org:t,project:i}=W(),o=de(),d=X(),[g,u]=q.useState(""),[x,j]=q.useState(!1),b=i.slug===Y;let a;e[0]!==t.id?(a={connectionId:ie,orgId:t.id},e[0]=t.id,e[1]=a):a=e[1];const c=re(a);let f;e[2]!==c||e[3]!==i.id?(f=async()=>{const _=await c.callTool({name:"PROJECT_DELETE",arguments:{projectId:i.id}});return _.structuredContent??_},e[2]=c,e[3]=i.id,e[4]=f):f=e[4];let h;e[5]!==o||e[6]!==t.id||e[7]!==t.slug||e[8]!==d?(h=_=>{_.success?(d.invalidateQueries({queryKey:U.projects(t.id)}),R.success("Project deleted"),o({to:"/$org/$project",params:{org:t.slug,project:Y}})):R.error(_.message??"Failed to delete project")},e[5]=o,e[6]=t.id,e[7]=t.slug,e[8]=d,e[9]=h):h=e[9];let w;e[10]!==f||e[11]!==h?(w={mutationFn:f,onSuccess:h,onError:st},e[10]=f,e[11]=h,e[12]=w):w=e[12];const m=ee(w);if(b)return null;const y=g===i.name;let P;e[13]!==m?(P=()=>{m.mutate()},e[13]=m,e[14]=P):P=e[14];const C=P;let I;e[15]===Symbol.for("react.memo_cache_sentinel")?(I=_=>{j(_),_||u("")},e[15]=I):I=e[15];const S=I;let n;e[16]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-destructive",children:"Danger Zone"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Irreversible and destructive actions."})]}),e[16]=n):n=e[16];let r;e[17]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Be,{asChild:!0,children:s.jsx(L,{variant:"destructive",children:"Delete Project"})}),e[17]=r):r=e[17];let l;e[18]!==i.name?(l=s.jsxs(ze,{children:['Delete "',i.name,'"?']}),e[18]=i.name,e[19]=l):l=e[19];let p;e[20]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ke,{children:"This action cannot be undone. All project data will be permanently deleted."}),e[20]=p):p=e[20];let v;e[21]!==l?(v=s.jsxs(Re,{children:[l,p]}),e[21]=l,e[22]=v):v=e[22];let N;e[23]!==i.name?(N=s.jsxs("p",{className:"text-sm mb-2",children:["Type ",s.jsx("strong",{children:i.name})," to confirm:"]}),e[23]=i.name,e[24]=N):N=e[24];let F;e[25]===Symbol.for("react.memo_cache_sentinel")?(F=_=>u(_.target.value),e[25]=F):F=e[25];let O;e[26]!==g||e[27]!==i.name?(O=s.jsx(V,{value:g,onChange:F,placeholder:i.name}),e[26]=g,e[27]=i.name,e[28]=O):O=e[28];let T;e[29]!==N||e[30]!==O?(T=s.jsxs("div",{className:"py-4",children:[N,O]}),e[29]=N,e[30]=O,e[31]=T):T=e[31];let D;e[32]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Le,{children:"Cancel"}),e[32]=D):D=e[32];const A=!y||m.isPending,z=m.isPending?"Deleting...":"Delete Project";let E;e[33]!==C||e[34]!==A||e[35]!==z?(E=s.jsxs(Ue,{children:[D,s.jsx(qe,{onClick:C,disabled:A,className:"bg-destructive hover:bg-destructive/90 text-destructive-foreground",children:z})]}),e[33]=C,e[34]=A,e[35]=z,e[36]=E):E=e[36];let k;e[37]!==v||e[38]!==T||e[39]!==E?(k=s.jsxs(Me,{children:[v,T,E]}),e[37]=v,e[38]=T,e[39]=E,e[40]=k):k=e[40];let B;return e[41]!==x||e[42]!==k?(B=s.jsxs("div",{className:"border border-destructive/50 rounded-lg p-4 space-y-4",children:[n,s.jsxs($e,{open:x,onOpenChange:S,children:[r,k]})]}),e[41]=x,e[42]=k,e[43]=B):B=e[43],B}function st(e){R.error("Failed to delete project: "+(e instanceof Error?e.message:"Unknown error"))}function At(){const e=H.c(10),{project:t}=W(),i=t.slug===Y;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Z.Header,{children:s.jsx(Z.Header.Left,{children:s.jsx(fe,{children:s.jsx(he,{children:s.jsx(pe,{children:s.jsx(xe,{children:"Settings"})})})})})}),e[0]=o):o=e[0];let d;e[1]!==i?(d=i&&s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Organization"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Update your organization's name, slug, and logo."})]}),s.jsx(et,{})]}),e[1]=i,e[2]=d):d=e[2];let g;e[3]!==i?(g=!i&&s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"General"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Basic project information."})]}),s.jsx(Ge,{})]}),e[3]=i,e[4]=g):g=e[4];let u,x;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Plugins"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Manage which plugins are enabled and configure them."})]}),s.jsx(Ze,{})]}),x=s.jsx(tt,{}),e[5]=u,e[6]=x):(u=e[5],x=e[6]);let j;return e[7]!==d||e[8]!==g?(j=s.jsxs(Z,{children:[o,s.jsx(Z.Content,{children:s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx("div",{className:"p-5 max-w-2xl",children:s.jsxs("div",{className:"space-y-8",children:[d,g,u,x]})})})})})]}),e[7]=d,e[8]=g,e[9]=j):j=e[9],j}export{At as default};
|
|
1
|
+
import{c as H,u as W,z as X,O as Y,h as oe,k as ae,j as s,o as ce,s as G,K as U,t as R,r as q,aN as te,bv as ue,m as de,g as ge}from"./index-Dp8TDmPV.js";import{P as Z}from"./index-DQZLC-Ha.js";import{B as fe,a as he,b as pe,c as xe}from"./breadcrumb-DLtCbZMJ.js";import{u as ee}from"./useMutation-CkwG6xTN.js";import{a as ie,u as re}from"./constants-LnQa4w9L.js";import{B as L,c as je}from"./button-CJa3f3rL.js";import{I as V}from"./input-DNUbpYNz.js";import{T as be}from"./textarea-CTzgIHFy.js";import{F as Q,d as M,a as me,b as $,c as K,e as se,f as J}from"./form-BiNvV3_m.js";import{u as ye}from"./useQuery-DCx9kDUK.js";import{S as ve}from"./switch-B_mHCx3S.js";import{L as Ne}from"./label-SUAIjh3i.js";import{h as Ce}from"./use-connection-Bpj__KJl.js";import{a as Se,c as Pe}from"./use-binding-BMUJf9fk.js";import{u as we}from"./use-install-from-registry-C0CQR1XL.js";import{i as Ie}from"./Loading01-CXnHH69h.js";import{s as Ee}from"./Plus-D0x-Dibo.js";import{S as Fe,a as De,b as _e,c as Oe,d as le}from"./select-C2nUbKfi.js";import{i as Te}from"./Upload01-C_yAut88.js";import{i as Ae}from"./X-CMKSGw1c.js";import{c as ze,h as Be,d as ke,b as Re,A as Le,e as Ue,g as qe,a as Me,f as $e}from"./alert-dialog-CqIibzn6.js";import"./ChevronRight-CYPNNnez.js";import"./binder-Dgk1prvv.js";import"./extract-connection-data-Bagxseai.js";import"./constants-CXdUDujD.js";import"./github-icon-Dp3wHhYE.js";import"./registry-utils-DB2T-f6C.js";import"./generate-id-Dyweu44Y.js";import"./index-DBhC1Bw_.js";import"./Check-RSjbQD0O.js";import"./ChevronDown-C42nqF2a.js";const Ke=ce({name:G().min(1,"Name is required").max(200,"Name is too long"),description:G().max(1e3,"Description is too long").nullable()});function Ge(){const e=H.c(58),{org:t,project:i}=W(),o=X(),d=i.slug===Y;let g;e[0]!==t.id?(g={connectionId:ie,orgId:t.id},e[0]=t.id,e[1]=g):g=e[1];const u=re(g);let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=oe(Ke),e[2]=x):x=e[2];const j=i.name??"",b=i.description??"";let a;e[3]!==j||e[4]!==b?(a={resolver:x,values:{name:j,description:b}},e[3]=j,e[4]=b,e[5]=a):a=e[5];const c=ae(a);let f;e[6]!==u||e[7]!==i.id?(f=async B=>{const _=await u.callTool({name:"PROJECT_UPDATE",arguments:{projectId:i.id,name:B.name,description:B.description||null}});return _.structuredContent??_},e[6]=u,e[7]=i.id,e[8]=f):f=e[8];let h;e[9]!==c||e[10]!==t.id||e[11]!==i.slug||e[12]!==o?(h=()=>{o.invalidateQueries({queryKey:U.project(t.id,i.slug)}),o.invalidateQueries({queryKey:U.projects(t.id)}),R.success("Project updated successfully"),c.reset(c.getValues())},e[9]=c,e[10]=t.id,e[11]=i.slug,e[12]=o,e[13]=h):h=e[13];let w;e[14]!==f||e[15]!==h?(w={mutationFn:f,onSuccess:h,onError:Qe},e[14]=f,e[15]=h,e[16]=w):w=e[16];const m=ee(w);let y;e[17]!==m?(y=async B=>{await m.mutateAsync(B)},e[17]=m,e[18]=y):y=e[18];const P=y,C=c.formState.isDirty;let I;e[19]!==c||e[20]!==P?(I=c.handleSubmit(P),e[19]=c,e[20]=P,e[21]=I):I=e[21];let S;e[22]!==d||e[23]!==m.isPending?(S=B=>{const{field:_}=B;return s.jsxs($,{children:[s.jsx(K,{children:"Project Name"}),s.jsx(M,{children:s.jsx(V,{placeholder:"My Project",..._,disabled:d||m.isPending})}),d&&s.jsx(se,{children:"The organization admin project name cannot be changed."}),s.jsx(J,{})]})},e[22]=d,e[23]=m.isPending,e[24]=S):S=e[24];let n;e[25]!==c.control||e[26]!==S?(n=s.jsx(Q,{control:c.control,name:"name",render:S}),e[25]=c.control,e[26]=S,e[27]=n):n=e[27];let r;e[28]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(K,{children:"Slug"}),e[28]=r):r=e[28];let l;e[29]!==i.slug?(l=s.jsx(M,{children:s.jsx(V,{value:i.slug,disabled:!0,className:"bg-muted"})}),e[29]=i.slug,e[30]=l):l=e[30];let p;e[31]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(se,{children:"The project slug cannot be changed after creation."}),e[31]=p):p=e[31];let v;e[32]!==l?(v=s.jsxs($,{children:[r,l,p]}),e[32]=l,e[33]=v):v=e[33];let N;e[34]!==m.isPending?(N=B=>{const{field:_}=B;return s.jsxs($,{children:[s.jsx(K,{children:"Description"}),s.jsx(M,{children:s.jsx(be,{placeholder:"Optional project description...",rows:3,..._,value:_.value??"",disabled:m.isPending})}),s.jsx(J,{})]})},e[34]=m.isPending,e[35]=N):N=e[35];let F;e[36]!==c.control||e[37]!==N?(F=s.jsx(Q,{control:c.control,name:"description",render:N}),e[36]=c.control,e[37]=N,e[38]=F):F=e[38];const O=!C||m.isPending,T=m.isPending?"Saving...":"Save Changes";let D;e[39]!==O||e[40]!==T?(D=s.jsx(L,{type:"submit",disabled:O,className:"min-w-24",children:T}),e[39]=O,e[40]=T,e[41]=D):D=e[41];let A;e[42]!==c||e[43]!==C||e[44]!==m.isPending?(A=C&&s.jsx(L,{type:"button",variant:"outline",onClick:()=>c.reset(),disabled:m.isPending,children:"Cancel"}),e[42]=c,e[43]=C,e[44]=m.isPending,e[45]=A):A=e[45];let z;e[46]!==D||e[47]!==A?(z=s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[D,A]}),e[46]=D,e[47]=A,e[48]=z):z=e[48];let E;e[49]!==n||e[50]!==v||e[51]!==F||e[52]!==z||e[53]!==I?(E=s.jsxs("form",{onSubmit:I,className:"space-y-6",children:[n,v,F,z]}),e[49]=n,e[50]=v,e[51]=F,e[52]=z,e[53]=I,e[54]=E):E=e[54];let k;return e[55]!==c||e[56]!==E?(k=s.jsx(me,{...c,children:E}),e[55]=c,e[56]=E,e[57]=k):k=e[57],k}function Qe(e){R.error("Failed to update project: "+(e instanceof Error?e.message:"Unknown error"))}function Je({value:e,onValueChange:t,placeholder:i="Select a connection...",binding:o,bindingType:d,onAddNew:g,className:u,disabled:x=!1}){const[j,b]=q.useState(!1),{installByBinding:a,isInstalling:c}=we(),f=j||c,h=Ce(),w=Se({connections:h,binding:typeof o=="string"?o:void 0}),m=!o||!h?h??[]:typeof o=="string"?w:Array.isArray(o)&&o.length>0?h.filter(n=>Pe(n,o)):h,y=(()=>{if(!d?.startsWith("@"))return null;const[n,r]=d.replace("@","").split("/");return n&&r?{scope:n,appName:r}:null})(),P=(()=>{let n=m;const r=Array.isArray(o)&&o.length>0;if(y&&!r&&(n=n.filter(l=>{const p=l.app_name,v=l.metadata?.scopeName;return p===y.appName&&v===y.scope})),e&&!n.some(l=>l.id===e)){const l=h?.find(p=>p.id===e);if(l)return[l,...n]}return n})(),C=d?.startsWith("@"),I=async()=>{if(C&&d){b(!0);try{const n=await a(d);n&&t(n.id)}finally{b(!1)}return}g?.()},S=P.find(n=>n.id===e);return s.jsxs(Fe,{value:e??"none",onValueChange:n=>t(n==="none"?null:n),disabled:x,children:[s.jsx(De,{size:"sm",className:je("w-[200px]",u),children:s.jsx(_e,{placeholder:i,children:S?s.jsxs("div",{className:"flex items-center gap-2",children:[S.icon?s.jsx("img",{src:S.icon,alt:S.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:S.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"truncate",children:S.title})]}):i})}),s.jsxs(Oe,{children:[s.jsx(le,{value:"none",children:"No connection"}),P.length===0?s.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No compatible connections found"}):P.map(n=>s.jsx(le,{value:n.id,children:s.jsxs("div",{className:"flex items-center gap-2",children:[n.icon?s.jsx("img",{src:n.icon,alt:n.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:n.title.slice(0,1).toUpperCase()}),s.jsx("span",{children:n.title})]})},n.id)),(g||C)&&s.jsx("div",{className:"border-t border-border",children:s.jsx(L,{onPointerDown:n=>n.stopPropagation(),onClick:n=>{n.preventDefault(),n.stopPropagation(),I()},disabled:f||x,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:f?s.jsxs(s.Fragment,{children:[s.jsx(Ie,{size:16,className:"animate-spin"}),s.jsx("span",{children:"Connecting..."})]}):s.jsxs(s.Fragment,{children:[s.jsx(Ee,{size:16}),s.jsx("span",{children:"Add Connection"})]})})})]})]})}const Ve=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")},ne=e=>{const t=e.structuredContent??e,i=t&&typeof t=="object"?t:null,o=i?.content?.[0]?.text&&typeof i.content[0].text=="string"?i.content[0].text:null;if(i?.isError)throw new Error(o??"Tool call failed");if(Ve(t))throw new Error(t.text);return t};function He(e){return e.requiresMcpBinding===!0?!0:e.binding!==void 0}function We(e){const t=H.c(48),{plugin:i,isEnabled:o,isSaving:d,pendingBinding:g,description:u,label:x,icon:j,projectId:b,client:a,onBindingChange:c,onToggle:f}=e;let h;t[0]!==i?(h=He(i),t[0]=i,t[1]=h):h=t[1];const w=h;let m;t[2]!==i.id||t[3]!==b?(m=U.projectPluginConfig(b??"",i.id),t[2]=i.id,t[3]=b,t[4]=m):m=t[4];let y;t[5]!==a||t[6]!==i.id||t[7]!==b?(y=async()=>{if(!b)throw new Error("Project ID is required to load plugin config.");const E=await a.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:b,pluginId:i.id}});return ne(E)},t[5]=a,t[6]=i.id,t[7]=b,t[8]=y):y=t[8];const P=!!b&&w;let C;t[9]!==m||t[10]!==y||t[11]!==P?(C={queryKey:m,queryFn:y,enabled:P},t[9]=m,t[10]=y,t[11]=P,t[12]=C):C=t[12];const{data:I,isLoading:S}=ye(C),n=I?.config?.connectionId??null,r=g!==void 0?g:n;let l;t[13]!==j?(l=j&&s.jsx("div",{className:"flex-shrink-0 text-muted-foreground [&>svg]:size-4",children:j}),t[13]=j,t[14]=l):l=t[14];let p;t[15]!==x?(p=s.jsx("div",{className:"text-sm font-medium text-foreground",children:x}),t[15]=x,t[16]=p):p=t[16];let v;t[17]!==u?(v=u&&s.jsx("p",{className:"text-xs text-muted-foreground",children:u}),t[17]=u,t[18]=v):v=t[18];let N;t[19]!==p||t[20]!==v?(N=s.jsxs("div",{className:"min-w-0",children:[p,v]}),t[19]=p,t[20]=v,t[21]=N):N=t[21];let F;t[22]!==l||t[23]!==N?(F=s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[l,N]}),t[22]=l,t[23]=N,t[24]=F):F=t[24];let O;t[25]!==f||t[26]!==i.id?(O=E=>f(i.id,E),t[25]=f,t[26]=i.id,t[27]=O):O=t[27];let T;t[28]!==o||t[29]!==d||t[30]!==O?(T=s.jsx(ve,{checked:o,onCheckedChange:O,disabled:d}),t[28]=o,t[29]=d,t[30]=O,t[31]=T):T=t[31];let D;t[32]!==F||t[33]!==T?(D=s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[F,T]}),t[32]=F,t[33]=T,t[34]=D):D=t[34];let A;t[35]!==S||t[36]!==o||t[37]!==d||t[38]!==w||t[39]!==c||t[40]!==i.binding||t[41]!==i.id||t[42]!==r||t[43]!==n?(A=o&&w&&s.jsxs("div",{className:"mt-3 pl-7 flex items-center gap-3",children:[s.jsx(Ne,{className:"text-xs text-muted-foreground w-24",children:"Connection"}),s.jsx(Je,{value:r??null,onValueChange:E=>c(i.id,E,n),binding:i.binding,placeholder:"Select connection...",className:"w-56",disabled:d||S})]}),t[35]=S,t[36]=o,t[37]=d,t[38]=w,t[39]=c,t[40]=i.binding,t[41]=i.id,t[42]=r,t[43]=n,t[44]=A):A=t[44];let z;return t[45]!==D||t[46]!==A?(z=s.jsxs("div",{className:"py-3",children:[D,A]}),t[45]=D,t[46]=A,t[47]=z):z=t[47],z}function Ze(){const{org:e,project:t}=W(),i=X(),o=re({connectionId:ie,orgId:e.id}),[d,g]=q.useState({}),[u,x]=q.useState({}),[j,b]=q.useState(!1),a=t.enabledPlugins??[],c=n=>{const r=d[n];return r!==void 0?r:a.includes(n)},f=()=>{const n=new Set(a);for(const[r,l]of Object.entries(d))l?n.add(r):n.delete(r);return Array.from(n)},h=Object.keys(d).length>0||Object.keys(u).length>0,w=(n,r)=>{const l=a.includes(n);g(r===l?p=>{const{[n]:v,...N}=p;return N}:p=>({...p,[n]:r}))},m=(n,r,l)=>{if(r===l){x(p=>{const{[n]:v,...N}=p;return N});return}x(p=>({...p,[n]:r}))},y=ee({mutationFn:async n=>{const r=[];if(n.updatePlugins){const l=await o.callTool({name:"PROJECT_UPDATE",arguments:{projectId:t.id,enabledPlugins:n.enabledPlugins}});r.push(ne(l))}if(n.bindingUpdates.length>0){const l=await Promise.all(n.bindingUpdates.map(async({pluginId:p,connectionId:v})=>{const N=await o.callTool({name:"PROJECT_PLUGIN_CONFIG_UPDATE",arguments:{projectId:t.id,pluginId:p,connectionId:v}});return ne(N)}));r.push(...l)}return r},onSuccess:(n,r)=>{r.updatePlugins&&(i.invalidateQueries({queryKey:U.project(e.id,t.slug)}),i.invalidateQueries({queryKey:U.projects(e.id)})),r.bindingUpdates.forEach(({pluginId:l})=>{i.invalidateQueries({queryKey:U.projectPluginConfig(t.id??"",l)})}),g({}),x({}),R.success("Plugins updated successfully")},onError:n=>{R.error("Failed to update plugins: "+(n instanceof Error?n.message:"Unknown error"))},onSettled:()=>{b(!1)}}),P=()=>{b(!0),y.mutate({enabledPlugins:f(),updatePlugins:Object.keys(d).length>0,bindingUpdates:Object.entries(u).map(([n,r])=>({pluginId:n,connectionId:r}))})},C=()=>{g({}),x({})},I=n=>ue.find(r=>r.pluginId===n),S=n=>te.find(l=>l.id===n)?.description??null;return te.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("p",{className:"text-sm text-muted-foreground",children:"Enable or disable plugins for this project. Enabled plugins will appear in the sidebar."}),s.jsx("div",{className:"divide-y divide-border border-y border-border",children:te.map(n=>{const r=I(n.id),l=S(n.id),p=c(n.id);return s.jsx(We,{plugin:n,isEnabled:p,isSaving:j,pendingBinding:u[n.id],description:l,label:r?.label??n.id,icon:r?.icon,projectId:t.id,client:o,onBindingChange:m,onToggle:w},n.id)})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(L,{variant:"outline",onClick:C,disabled:!h||j,children:"Cancel"}),s.jsx(L,{onClick:P,disabled:!h||j,className:"min-w-24",children:j?"Saving...":"Save Changes"})]})]})}const Ye=ce({name:G().min(1,"Name is required").max(255,"Name is too long"),slug:G().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:G().optional()});function Xe(e){const t=H.c(24),{value:i,onChange:o,name:d}=e,g=q.useRef(null);let u;t[0]!==o?(u=S=>{const n=S.target.files?.[0];if(n){if(n.size>2097152){R.error("Image must be smaller than 2MB");return}const r=new FileReader;r.onerror=()=>{const l=r.error;console.error("FileReader error:",l),R.error(l?.message||"Failed to read image file. Please try again."),g.current&&(g.current.value="")},r.onloadend=()=>{if(r.readyState===FileReader.DONE&&r.result){const l=r.result;o(l)}},r.readAsDataURL(n)}},t[0]=o,t[1]=u):u=t[1];const x=u;let j;t[2]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{g.current?.click()},t[2]=j):j=t[2];const b=j;let a;t[3]!==o?(a=S=>{S.stopPropagation(),o("")},t[3]=o,t[4]=a):a=t[4];const c=a;let f;t[5]!==x?(f=s.jsx("input",{type:"file",ref:g,className:"hidden",accept:"image/*",onChange:x}),t[5]=x,t[6]=f):f=t[6];let h;t[7]!==c||t[8]!==d||t[9]!==i?(h=i?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:i,alt:d||"Organization logo",className:"w-full h-full object-cover"})}),s.jsx("button",{type:"button",onClick:c,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(Ae,{className:"h-3 w-3"})})]}):s.jsxs("button",{type:"button",onClick:b,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(Te,{className:"h-5 w-5"}),s.jsx("span",{className:"text-xs",children:"Upload"})]}),t[7]=c,t[8]=d,t[9]=i,t[10]=h):h=t[10];const w=i?"Change Logo":"Upload Logo";let m;t[11]!==w?(m=s.jsx(L,{type:"button",variant:"outline",size:"sm",onClick:b,className:"mb-2",children:w}),t[11]=w,t[12]=m):m=t[12];let y;t[13]!==c||t[14]!==i?(y=i&&s.jsx(L,{type:"button",variant:"ghost",size:"sm",onClick:c,className:"ml-2",children:"Remove"}),t[13]=c,t[14]=i,t[15]=y):y=t[15];let P;t[16]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),t[16]=P):P=t[16];let C;t[17]!==m||t[18]!==y?(C=s.jsxs("div",{className:"flex-1",children:[m,y,P]}),t[17]=m,t[18]=y,t[19]=C):C=t[19];let I;return t[20]!==C||t[21]!==f||t[22]!==h?(I=s.jsxs("div",{className:"flex items-start gap-4",children:[f,h,C]}),t[20]=C,t[21]=f,t[22]=h,t[23]=I):I=t[23],I}function et(){const e=de(),{org:t,project:i}=W(),o=X(),[d,g]=q.useState(!1),u=ae({resolver:oe(Ye),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),x=ee({mutationFn:async a=>{const c={name:a.name,slug:a.slug};a.logo&&(c.logo=a.logo);const f=await ge.organization.update({organizationId:t.id,data:c});if(f?.error)throw new Error(f.error.message||"Failed to update organization");return f},onSuccess:a=>{o.invalidateQueries({queryKey:U.organizations()}),o.invalidateQueries({queryKey:U.activeOrganization(t.slug)}),R.success("Organization settings updated successfully"),a?.data?.slug&&a.data.slug!==t.slug&&e({to:"/$org/$project/settings",params:{org:a.data.slug,project:i.slug}})},onError:a=>{R.error(a instanceof Error?a.message:"Failed to update organization")},onSettled:()=>{g(!1)}}),j=a=>{g(!0),x.mutate(a)},b=u.formState.isDirty;return s.jsx(me,{...u,children:s.jsxs("form",{onSubmit:u.handleSubmit(j),className:"space-y-6",children:[s.jsx(Q,{control:u.control,name:"name",render:({field:a})=>s.jsxs($,{children:[s.jsx(K,{children:"Organization Name"}),s.jsx(M,{children:s.jsx(V,{placeholder:"My Organization",...a,disabled:d})}),s.jsx(J,{})]})}),s.jsx(Q,{control:u.control,name:"slug",render:({field:a})=>s.jsxs($,{children:[s.jsx(K,{children:"Organization Slug"}),s.jsx(M,{children:s.jsx(V,{placeholder:"my-organization",...a,disabled:d,onChange:c=>{const f=c.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");a.onChange(f)}})}),s.jsx(se,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(J,{})]})}),s.jsx(Q,{control:u.control,name:"logo",render:({field:a})=>s.jsxs($,{children:[s.jsx(K,{children:"Logo"}),s.jsx(M,{children:s.jsx(Xe,{value:a.value,onChange:a.onChange,name:u.watch("name")})}),s.jsx(J,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(L,{type:"submit",disabled:!b||d,className:"min-w-24",children:d?"Saving...":"Save Changes"}),b&&s.jsx(L,{type:"button",variant:"outline",onClick:()=>u.reset(),disabled:d,children:"Cancel"})]})]})})}function tt(){const e=H.c(44),{org:t,project:i}=W(),o=de(),d=X(),[g,u]=q.useState(""),[x,j]=q.useState(!1),b=i.slug===Y;let a;e[0]!==t.id?(a={connectionId:ie,orgId:t.id},e[0]=t.id,e[1]=a):a=e[1];const c=re(a);let f;e[2]!==c||e[3]!==i.id?(f=async()=>{const _=await c.callTool({name:"PROJECT_DELETE",arguments:{projectId:i.id}});return _.structuredContent??_},e[2]=c,e[3]=i.id,e[4]=f):f=e[4];let h;e[5]!==o||e[6]!==t.id||e[7]!==t.slug||e[8]!==d?(h=_=>{_.success?(d.invalidateQueries({queryKey:U.projects(t.id)}),R.success("Project deleted"),o({to:"/$org/$project",params:{org:t.slug,project:Y}})):R.error(_.message??"Failed to delete project")},e[5]=o,e[6]=t.id,e[7]=t.slug,e[8]=d,e[9]=h):h=e[9];let w;e[10]!==f||e[11]!==h?(w={mutationFn:f,onSuccess:h,onError:st},e[10]=f,e[11]=h,e[12]=w):w=e[12];const m=ee(w);if(b)return null;const y=g===i.name;let P;e[13]!==m?(P=()=>{m.mutate()},e[13]=m,e[14]=P):P=e[14];const C=P;let I;e[15]===Symbol.for("react.memo_cache_sentinel")?(I=_=>{j(_),_||u("")},e[15]=I):I=e[15];const S=I;let n;e[16]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-destructive",children:"Danger Zone"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Irreversible and destructive actions."})]}),e[16]=n):n=e[16];let r;e[17]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Be,{asChild:!0,children:s.jsx(L,{variant:"destructive",children:"Delete Project"})}),e[17]=r):r=e[17];let l;e[18]!==i.name?(l=s.jsxs(ze,{children:['Delete "',i.name,'"?']}),e[18]=i.name,e[19]=l):l=e[19];let p;e[20]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ke,{children:"This action cannot be undone. All project data will be permanently deleted."}),e[20]=p):p=e[20];let v;e[21]!==l?(v=s.jsxs(Re,{children:[l,p]}),e[21]=l,e[22]=v):v=e[22];let N;e[23]!==i.name?(N=s.jsxs("p",{className:"text-sm mb-2",children:["Type ",s.jsx("strong",{children:i.name})," to confirm:"]}),e[23]=i.name,e[24]=N):N=e[24];let F;e[25]===Symbol.for("react.memo_cache_sentinel")?(F=_=>u(_.target.value),e[25]=F):F=e[25];let O;e[26]!==g||e[27]!==i.name?(O=s.jsx(V,{value:g,onChange:F,placeholder:i.name}),e[26]=g,e[27]=i.name,e[28]=O):O=e[28];let T;e[29]!==N||e[30]!==O?(T=s.jsxs("div",{className:"py-4",children:[N,O]}),e[29]=N,e[30]=O,e[31]=T):T=e[31];let D;e[32]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Le,{children:"Cancel"}),e[32]=D):D=e[32];const A=!y||m.isPending,z=m.isPending?"Deleting...":"Delete Project";let E;e[33]!==C||e[34]!==A||e[35]!==z?(E=s.jsxs(Ue,{children:[D,s.jsx(qe,{onClick:C,disabled:A,className:"bg-destructive hover:bg-destructive/90 text-destructive-foreground",children:z})]}),e[33]=C,e[34]=A,e[35]=z,e[36]=E):E=e[36];let k;e[37]!==v||e[38]!==T||e[39]!==E?(k=s.jsxs(Me,{children:[v,T,E]}),e[37]=v,e[38]=T,e[39]=E,e[40]=k):k=e[40];let B;return e[41]!==x||e[42]!==k?(B=s.jsxs("div",{className:"border border-destructive/50 rounded-lg p-4 space-y-4",children:[n,s.jsxs($e,{open:x,onOpenChange:S,children:[r,k]})]}),e[41]=x,e[42]=k,e[43]=B):B=e[43],B}function st(e){R.error("Failed to delete project: "+(e instanceof Error?e.message:"Unknown error"))}function At(){const e=H.c(10),{project:t}=W(),i=t.slug===Y;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Z.Header,{children:s.jsx(Z.Header.Left,{children:s.jsx(fe,{children:s.jsx(he,{children:s.jsx(pe,{children:s.jsx(xe,{children:"Settings"})})})})})}),e[0]=o):o=e[0];let d;e[1]!==i?(d=i&&s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Organization"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Update your organization's name, slug, and logo."})]}),s.jsx(et,{})]}),e[1]=i,e[2]=d):d=e[2];let g;e[3]!==i?(g=!i&&s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"General"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Basic project information."})]}),s.jsx(Ge,{})]}),e[3]=i,e[4]=g):g=e[4];let u,x;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Plugins"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Manage which plugins are enabled and configure them."})]}),s.jsx(Ze,{})]}),x=s.jsx(tt,{}),e[5]=u,e[6]=x):(u=e[5],x=e[6]);let j;return e[7]!==d||e[8]!==g?(j=s.jsxs(Z,{children:[o,s.jsx(Z.Content,{children:s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx("div",{className:"p-5 max-w-2xl",children:s.jsxs("div",{className:"space-y-8",children:[d,g,u,x]})})})})})]}),e[7]=d,e[8]=g,e[9]=j):j=e[9],j}export{At as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b4 as M,c as O,u as H,j as s,aM as U,r as I,m as G,O as V}from"./index-
|
|
1
|
+
import{b4 as M,c as O,u as H,j as s,aM as U,r as I,m as G,O as V}from"./index-Dp8TDmPV.js";import{a as q}from"./use-project-BDU5VGwr.js";import{P as D}from"./index-DQZLC-Ha.js";import{C as F}from"./collection-search-BzW9Bci5.js";import{A as J}from"./avatar-CNNflJo3.js";import{c as K,B as R}from"./button-CJa3f3rL.js";import{f as Q}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as T}from"./empty-state-CegLfGmA.js";import{C as W}from"./create-project-dialog-DNH_FaKC.js";import{B as X,a as Y,b as Z,c as ee}from"./breadcrumb-DLtCbZMJ.js";import"./useQuery-DCx9kDUK.js";import"./constants-LnQa4w9L.js";import"./Loading01-CXnHH69h.js";import"./SearchMd-vTjANW25.js";import"./input-DNUbpYNz.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./useMutation-CkwG6xTN.js";import"./dialog-Bzq7eXqS.js";import"./X-CMKSGw1c.js";import"./form-BiNvV3_m.js";import"./label-SUAIjh3i.js";import"./textarea-CTzgIHFy.js";import"./Check-RSjbQD0O.js";import"./ChevronRight-CYPNNnez.js";const te=M("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 E;return e[55]!==A||e[56]!==u?(E=s.jsx(U,{to:"/$org/$project",params:u,className:"block group",children:A}),e[55]=A,e[56]=u,e[57]=E):E=e[57],E}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=G();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=D;let w;t[18]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(D.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(D.Header,{children:[w,s.jsx(D.Header.Right,{children:s.jsx(R,{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],_=D.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(T,{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(T,{title:"No projects yet",description:"Create a project to get started.",actions:s.jsx(R,{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};
|