decocms 2.186.9 → 2.186.10
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-DoDnREQU.js → AlertCircle-Cbtm5L98.js} +1 -1
- package/dist/client/assets/{ArrowLeft-1uQ4hoAA.js → ArrowLeft-CCViWpBS.js} +1 -1
- package/dist/client/assets/{ArrowUp-CiCCsmLU.js → ArrowUp-PknJL_3i.js} +1 -1
- package/dist/client/assets/{Check-DsqqbwRv.js → Check-Cj1LnSt2.js} +1 -1
- package/dist/client/assets/{ChevronDown-DMIUCeXF.js → ChevronDown-CHOEDpCq.js} +1 -1
- package/dist/client/assets/{ChevronRight-BvErZvXV.js → ChevronRight-DY2lrGOn.js} +1 -1
- package/dist/client/assets/{ChevronUp-BPTkFtVQ.js → ChevronUp-B38OwFL_.js} +1 -1
- package/dist/client/assets/{Container-D8gJR-V9.js → Container-DLm11uCu.js} +1 -1
- package/dist/client/assets/{Dataflow03-D9B0IMv1.js → Dataflow03-Ba3PnLD-.js} +1 -1
- package/dist/client/assets/{FolderClosed-DtTyOuV-.js → FolderClosed-rrRpN158.js} +1 -1
- package/dist/client/assets/{Loading01-DTPGNGDe.js → Loading01-CJFbgK59.js} +1 -1
- package/dist/client/assets/{Play-BSN624z4.js → Play-CsSGdP4Z.js} +1 -1
- package/dist/client/assets/{Plus-VNSvGQN9.js → Plus-CfD-fvi9.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-Dbe0-ztA.js → RefreshCcw01-Cja044eH.js} +1 -1
- package/dist/client/assets/{SearchMd-BVguqJPF.js → SearchMd-B4W5fcyf.js} +1 -1
- package/dist/client/assets/{Settings01-BKawEeOc.js → Settings01-CMhz8juF.js} +1 -1
- package/dist/client/assets/{Trash01-p_-P7rrZ.js → Trash01-Cl6ql_TT.js} +1 -1
- package/dist/client/assets/{Type01-D1knZTdC.js → Type01-UhdL8ksX.js} +1 -1
- package/dist/client/assets/{Upload01-D-cgBdXK.js → Upload01-DX94fj05.js} +1 -1
- package/dist/client/assets/{User01-C1Py8RLi.js → User01-BgxUQ8sC.js} +1 -1
- package/dist/client/assets/{X-AnvD8fGN.js → X-De9pN2CV.js} +1 -1
- package/dist/client/assets/{XCircle-Of71XlDY.js → XCircle-wueTdlAa.js} +1 -1
- package/dist/client/assets/{XClose-CIHCEBuc.js → XClose-CZL78D4W.js} +1 -1
- package/dist/client/assets/{Zap-Cbf8Gxw3.js → Zap-CeI4Bf9r.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-9beskZXW.js → agent-connections-preview-DgOyqMmO.js} +1 -1
- package/dist/client/assets/{agent-detail-CpQCW--v.js → agent-detail-BrPBEK2H.js} +1 -1
- package/dist/client/assets/{agents-C4-J6TQS.js → agents-C0fbUAlo.js} +1 -1
- package/dist/client/assets/{ai-providers-logos-Du8KzWpH.js → ai-providers-logos-BditdJqa.js} +1 -1
- package/dist/client/assets/{alert-dialog-BIZOEctM.js → alert-dialog-BTHm3OB6.js} +1 -1
- package/dist/client/assets/{auth-catchall-BjYN1-n9.js → auth-catchall-c350Gt_l.js} +1 -1
- package/dist/client/assets/{automation-detail-Ca2mfThk.js → automation-detail-KCkCQOlG.js} +1 -1
- package/dist/client/assets/{automations-D_MLQzBu.js → automations-DlYjNJ-T.js} +1 -1
- package/dist/client/assets/{avatar-BDzYYIB_.js → avatar-B2cKnsRn.js} +1 -1
- package/dist/client/assets/{badge-CintUB2m.js → badge-BHawtHqt.js} +1 -1
- package/dist/client/assets/{breadcrumb-CCT_gYCX.js → breadcrumb-D8w6T3TH.js} +1 -1
- package/dist/client/assets/{card-DiqqquYR.js → card-DP3El98a.js} +1 -1
- package/dist/client/assets/{checkbox-B5yMaD1U.js → checkbox-B17TL9Yy.js} +1 -1
- package/dist/client/assets/{collapsible-CUnNCwaM.js → collapsible-DbjcsjQi.js} +1 -1
- package/dist/client/assets/{collection-detail-DYyODume.js → collection-detail-C6eOIJhR.js} +1 -1
- package/dist/client/assets/{collection-display-button-6w4fqzbK.js → collection-display-button-CCE6Hf4p.js} +1 -1
- package/dist/client/assets/{collection-search-R3szwhKc.js → collection-search-DQX16wbn.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BYkH4l2b.js → collection-table-wrapper-Csa2FMUQ.js} +1 -1
- package/dist/client/assets/{collection-tabs-CTpzw-QP.js → collection-tabs-CNP12Tiu.js} +1 -1
- package/dist/client/assets/{collections-Md0axhBZ.js → collections-nigUfX75.js} +1 -1
- package/dist/client/assets/{command-oqXofzFf.js → command-CEWGR7a5.js} +1 -1
- package/dist/client/assets/{connection-card-u3N2FMhV.js → connection-card-4f__CZNa.js} +1 -1
- package/dist/client/assets/{connection-detail-DkArP4xi.js → connection-detail-B9kB7yu6.js} +1 -1
- package/dist/client/assets/{connections-DYEJw6-9.js → connections-BCGXism-.js} +1 -1
- package/dist/client/assets/{constants-Cf6w8uWj.js → constants-B5ylLz8P.js} +1 -1
- package/dist/client/assets/constants-G9TKH6sR.js +1 -0
- package/dist/client/assets/{context-BNN0sjtQ.js → context-DRHBeAGs.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-Dxw___Aq.js → create-organization-dialog-CWSHs2rw.js} +1 -1
- package/dist/client/assets/{create-project-dialog-Db-cXCFP.js → create-project-dialog-CX--SrDy.js} +1 -1
- package/dist/client/assets/{danger-D0MixhKB.js → danger-CGFCjSd5.js} +1 -1
- package/dist/client/assets/{danger-zone-DJu8uIZo.js → danger-zone-DS1p5Z1H.js} +1 -1
- package/dist/client/assets/{dependencies-DKpj5-z2.js → dependencies-DzKDg0s7.js} +1 -1
- package/dist/client/assets/{dialog-B_ZBKGcK.js → dialog-D7WigTyK.js} +1 -1
- package/dist/client/assets/{drawer-DxTGqDKY.js → drawer-DkpraRh8.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BGBf4SQr.js → dropdown-menu-PjKkpqts.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-BwaaiDL6.js → dynamic-plugin-layout--G8RvSxX.js} +1 -1
- package/dist/client/assets/{editable-task-title-mwJckul7.js → editable-task-title-DW-xTRvX.js} +1 -1
- package/dist/client/assets/{empty-state-Dt5CC_E7.js → empty-state-CAvSvSHU.js} +1 -1
- package/dist/client/assets/{empty-state-5hCgVmoA.js → empty-state-D14a0Zxq.js} +1 -1
- package/dist/client/assets/{env-vars-editor-CSLx760Y.js → env-vars-editor-Kwm2KcaP.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BdJfym5q.js → extract-connection-data-BhDGo06G.js} +1 -1
- package/dist/client/assets/{form-BAfFoDTS.js → form-DXxHt_ci.js} +1 -1
- package/dist/client/assets/{general-ihPcNIOb.js → general-BQAd2Vf4.js} +1 -1
- package/dist/client/assets/{home-BSU9U8m-.js → home-C9Hjf4rP.js} +1 -1
- package/dist/client/assets/{import-from-deco-dialog-CxiHwpr_.js → import-from-deco-dialog-B6yW7KqN.js} +1 -1
- package/dist/client/assets/{index-BUla3j6g.js → index-B-Jlqnye.js} +1 -1
- package/dist/client/assets/{index-DzY5efun.js → index-BBdUsNQs.js} +1 -1
- package/dist/client/assets/{index-ALdwmNA1.js → index-BxcI4xNK.js} +1 -1
- package/dist/client/assets/{index-CT7BYuwf.js → index-D3056qAr.js} +1 -1
- package/dist/client/assets/{index-BlVIyhiN.js → index-DWiV_aLY.js} +1 -1
- package/dist/client/assets/{index-BB9dnQ8g.js → index-DlX3m2OJ.js} +1 -1
- package/dist/client/assets/{index-BclDkWx8.js → index-Dqx4k4bH.js} +1 -1
- package/dist/client/assets/{index-D2soXfaG.js → index-Drzwukrz.js} +1 -1
- package/dist/client/assets/{index-CGKC8BVy.js → index-cjdRPOfg.js} +1 -1
- package/dist/client/assets/{index-Y_g6-sbQ.js → index-fnzLSheB.js} +2 -2
- package/dist/client/assets/{index-TzbVkru2.js → index-mZiJdp7F.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BvNG1QG_.js → infiniteQueryObserver-DN95LZQa.js} +1 -1
- package/dist/client/assets/{input-BJjZBSH8.js → input-CBI5HJST.js} +1 -1
- package/dist/client/assets/{integration-icon-7Bz6GmNv.js → integration-icon-3E3I1Ow-.js} +1 -1
- package/dist/client/assets/{label-BagqgWUv.js → label-_1-T_NFE.js} +1 -1
- package/dist/client/assets/{layout-BPbh2R4B.js → layout-6qPsvkaE.js} +1 -1
- package/dist/client/assets/{layout-BL6sB2DL.js → layout-Bz1664Tv.js} +1 -1
- package/dist/client/assets/{login-DfPhQ0qS.js → login-C_txKEQ0.js} +1 -1
- package/dist/client/assets/{logo-upload-BlhGNrgV.js → logo-upload-mdUsABL8.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BSLoo8nT.js → mcp-app-renderer-B2FWYfE4.js} +1 -1
- package/dist/client/assets/{mcp-server-card-DV_BN-gm.js → mcp-server-card-BIEWzRvB.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-CZ_j8X5E.js → mcp-server-detail-BOnb8TLh.js} +2 -2
- package/dist/client/assets/{members-2b6Jtq6P.js → members-ayS36sMo.js} +1 -1
- package/dist/client/assets/{monaco-editor-CzOYJf-q.js → monaco-editor-WEkFmf8F.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-BltMP3h3.js → monitoring-dashboard-edit-Cjg34Kwl.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-CwHqCHxn.js → monitoring-dashboard-view-Sy_NtlSG.js} +1 -1
- package/dist/client/assets/{monitoring-B3bfHtHG.js → monitoring-oPPTc1LP.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DdkGoKLi.js → monitoring-stats-row-Bn9Uwk5d.js} +1 -1
- package/dist/client/assets/{oauth-callback-Csht94Tu.js → oauth-callback-49UXjt9V.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-4QVXXmM1.js → oauth-callback-ai-provider-BVZyJ0h5.js} +1 -1
- package/dist/client/assets/{org-ai-providers-Udjn3QRR.js → org-ai-providers-BM6HJKuc.js} +1 -1
- package/dist/client/assets/{page-CZ2WRv_I.js → page-DZsI7Ctd.js} +1 -1
- package/dist/client/assets/{page-Bu3owRsU.js → page-DqQHSwAo.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-2Yos5GOU.js → plugin-empty-state-ChNZcRJs.js} +1 -1
- package/dist/client/assets/{plugin-header-CqAMfljl.js → plugin-header-D6KTV5fu.js} +1 -1
- package/dist/client/assets/plugins-DWpFeozR.js +1 -0
- package/dist/client/assets/{popover-lD-HtMf4.js → popover-DoT6XNod.js} +1 -1
- package/dist/client/assets/{project-app-view-BuPOn3s0.js → project-app-view-D27YxwOB.js} +1 -1
- package/dist/client/assets/project-layout-CxV9JRT2.js +1 -0
- package/dist/client/assets/{project-plugins-CIRGXDFY.js → project-plugins-DWXQnNI_.js} +1 -1
- package/dist/client/assets/{projects-list-BcL7c7DQ.js → projects-list-DGwgAc0o.js} +1 -1
- package/dist/client/assets/{registry-layout-j-JX07UN.js → registry-layout-D_7EozeN.js} +1 -1
- package/dist/client/assets/{registry-utils-DDsRF62n.js → registry-utils-BiwNNrLy.js} +1 -1
- package/dist/client/assets/{reset-password-CHFMULJN.js → reset-password-D4joRU3v.js} +1 -1
- package/dist/client/assets/{resizable-CTPIKv4j.js → resizable-BTe7pUxK.js} +1 -1
- package/dist/client/assets/{save-actions-xo9lGU3J.js → save-actions-r3fCxT64.js} +1 -1
- package/dist/client/assets/{scroll-area-Dvs0ghbP.js → scroll-area-DcQSaz6_.js} +1 -1
- package/dist/client/assets/{select-9VPJVrM5.js → select-CuLy3REb.js} +1 -1
- package/dist/client/assets/{select-virtual-mcp-B6M52JVi.js → select-virtual-mcp-DF77Fde_.js} +1 -1
- package/dist/client/assets/{shell-layout-DO1T7Kx6.js → shell-layout-ORIDPuR9.js} +2 -2
- package/dist/client/assets/{sidebar-settings-CZn76McG.js → sidebar-settings-C0JRgwvB.js} +1 -1
- package/dist/client/assets/{skeleton-DPPFiXsR.js → skeleton-kJ_1M0ks.js} +1 -1
- package/dist/client/assets/{spinner-DRNxYthF.js → spinner-CJLGQeTL.js} +1 -1
- package/dist/client/assets/{store-invite-CrG3z_Nw.js → store-invite-BvklUdrL.js} +1 -1
- package/dist/client/assets/{switch-BHSO5vl3.js → switch-uIQMlKq6.js} +1 -1
- package/dist/client/assets/{table-CvtSPXA4.js → table-BTOlVJn3.js} +1 -1
- package/dist/client/assets/{tabs-CdWME6KE.js → tabs-CxRF-CYj.js} +1 -1
- package/dist/client/assets/{task-status-DFJ-29wD.js → task-status-zYkVm9gw.js} +1 -1
- package/dist/client/assets/tasks-cDGgR1rD.js +1 -0
- package/dist/client/assets/{tasks-panel-BRc3ZfGK.js → tasks-panel-otVJY_Br.js} +1 -1
- package/dist/client/assets/{textarea-Dtfhz_OA.js → textarea-rEHudfyV.js} +1 -1
- package/dist/client/assets/{time-range-picker-DcKa3AFf.js → time-range-picker-BCnME4zz.js} +1 -1
- package/dist/client/assets/{toggle-group-iephCdnh.js → toggle-group-vE44W8pW.js} +1 -1
- package/dist/client/assets/{tools-list-CDbT-l23.js → tools-list-BZyPUTpN.js} +1 -1
- package/dist/client/assets/{tooltip-Cem552VW.js → tooltip-hlHlzWhV.js} +1 -1
- package/dist/client/assets/{types-DmDUXWAD.js → types-BMfsriOE.js} +1 -1
- package/dist/client/assets/{use-automations-DSFrBv_6.js → use-automations-BNWbF42a.js} +1 -1
- package/dist/client/assets/{use-collections-D0k_QRc1.js → use-collections-B0VCcn8e.js} +1 -1
- package/dist/client/assets/{use-connection-CP_xYk4Q.js → use-connection-BUxUpG_F.js} +1 -1
- package/dist/client/assets/{use-copy-d-3iM6J5.js → use-copy-J8HCGL54.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Dl6pqwaW.js → use-create-virtual-mcp-CSUTkPbs.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DtHbnYey.js → use-infinite-scroll-ztH4kpTo.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-DZlZY82P.js → use-install-from-registry-BkNDTVYn.js} +1 -1
- package/dist/client/assets/{use-list-state-DlUAsHMe.js → use-list-state-DYEAn42K.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-8NM9rwku.js → use-mcp-prompts-vhovBlsL.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-CHuUMbyT.js → use-mcp-resources-BR6sQvU6.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BhKK8D6X.js → use-mcp-tools-CfZSf4F7.js} +1 -1
- package/dist/client/assets/{use-members-dsS5L-Vf.js → use-members-DgXFii4e.js} +1 -1
- package/dist/client/assets/{use-project-3rL77wj_.js → use-project-_2326oBQ.js} +1 -1
- package/dist/client/assets/{use-store-discovery-CbIFZaKF.js → use-store-discovery-QlCtGR49.js} +1 -1
- package/dist/client/assets/{use-view-mode-CUtH8BDh.js → use-view-mode-Ctjdtgx6.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-tHRSpblC.js → use-virtual-mcp-DtVNlpR8.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-COM61pAf.js +1 -0
- package/dist/client/assets/{useMutation-09-2Qwl6.js → useMutation-CsiTkFgY.js} +1 -1
- package/dist/client/assets/useQuery-D7A6izWp.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-aZXW_lbE.js +1 -0
- package/dist/client/assets/{user-BOuwXTIR.js → user-Bs9OrNKP.js} +1 -1
- package/dist/client/assets/{workflow-D4GNw4Q9.js → workflow--ij0aqKH.js} +1 -1
- package/dist/client/assets/{workflow-BXPIrAUA.js → workflow-XMMRqOtB.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/constants-B4UGdbkn.js +0 -1
- package/dist/client/assets/plugins-CCu6p4dx.js +0 -1
- package/dist/client/assets/project-layout-u1PVsl6x.js +0 -1
- package/dist/client/assets/tasks-BlhTZX1-.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CjAl-HeV.js +0 -1
- package/dist/client/assets/useQuery-DKMHT49Q.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DZTp9qX4.js +0 -1
- package/dist/server/node_modules/pg/LICENSE +0 -21
- package/dist/server/node_modules/pg/README.md +0 -95
- package/dist/server/node_modules/pg/esm/index.mjs +0 -20
- package/dist/server/node_modules/pg/lib/client.js +0 -743
- package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -171
- package/dist/server/node_modules/pg/lib/connection.js +0 -221
- package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +0 -122
- package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -212
- package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -43
- package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -89
- package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
- package/dist/server/node_modules/pg/lib/defaults.js +0 -91
- package/dist/server/node_modules/pg/lib/index.js +0 -73
- package/dist/server/node_modules/pg/lib/native/client.js +0 -323
- package/dist/server/node_modules/pg/lib/native/index.js +0 -2
- package/dist/server/node_modules/pg/lib/native/query.js +0 -165
- package/dist/server/node_modules/pg/lib/query.js +0 -252
- package/dist/server/node_modules/pg/lib/result.js +0 -109
- package/dist/server/node_modules/pg/lib/stream.js +0 -83
- package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
- package/dist/server/node_modules/pg/lib/utils.js +0 -217
- package/dist/server/node_modules/pg/package.json +0 -76
- package/dist/server/node_modules/postgres-array/index.d.ts +0 -4
- package/dist/server/node_modules/postgres-array/index.js +0 -97
- package/dist/server/node_modules/postgres-array/license +0 -21
- package/dist/server/node_modules/postgres-array/package.json +0 -35
- package/dist/server/node_modules/postgres-array/readme.md +0 -43
- package/dist/server/node_modules/postgres-bytea/index.js +0 -33
- package/dist/server/node_modules/postgres-bytea/license +0 -21
- package/dist/server/node_modules/postgres-bytea/package.json +0 -34
- package/dist/server/node_modules/postgres-bytea/readme.md +0 -34
- package/dist/server/node_modules/postgres-date/index.js +0 -116
- package/dist/server/node_modules/postgres-date/license +0 -21
- package/dist/server/node_modules/postgres-date/package.json +0 -33
- package/dist/server/node_modules/postgres-date/readme.md +0 -49
- package/dist/server/node_modules/split2/LICENSE +0 -13
- package/dist/server/node_modules/split2/README.md +0 -85
- package/dist/server/node_modules/split2/bench.js +0 -27
- package/dist/server/node_modules/split2/index.js +0 -141
- package/dist/server/node_modules/split2/package.json +0 -39
- package/dist/server/node_modules/split2/test.js +0 -409
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as j,r as w,j as s,y as S,B as te,c as se,E as xe,u as pe,g as oe}from"./index-Y_g6-sbQ.js";import{C as b}from"./task-status-DFJ-29wD.js";import{C as ue,E as he}from"./editable-task-title-mwJckul7.js";import{a as ie}from"./tasks-panel-BRc3ZfGK.js";import{u as le,r as ge,a as re}from"./context-BNN0sjtQ.js";import{V as je}from"./select-virtual-mcp-B6M52JVi.js";import{I as U,t as be,m as Ne,n as ve,A as W,o as we}from"./integration-icon-7Bz6GmNv.js";import{a as ye,b as Se,P as Ce}from"./popover-lD-HtMf4.js";import{S as q}from"./skeleton-DPPFiXsR.js";import{i as ke,d as _e}from"./constants-Cf6w8uWj.js";import{b as Ie}from"./use-virtual-mcp-tHRSpblC.js";import{i as ze}from"./ChevronRight-BvErZvXV.js";import{s as ne}from"./Plus-VNSvGQN9.js";import{u as F}from"./tooltip-Cem552VW.js";import{a as Ee,D as Ae,b as Me,c as Te}from"./dialog-B_ZBKGcK.js";import{D as ae,a as ce,b as Oe,c as De}from"./drawer-DxTGqDKY.js";import{I as me}from"./import-from-deco-dialog-CxiHwpr_.js";import{u as Pe}from"./use-create-virtual-mcp-Dl6pqwaW.js";import{P as H}from"./index-BlVIyhiN.js";import{R as G,a as K,b as Re}from"./resizable-CTPIKv4j.js";import{u as $e}from"./useQuery-DKMHT49Q.js";import{d as Ve}from"./XCircle-Of71XlDY.js";import"./spinner-DRNxYthF.js";import"./use-mcp-prompts-8NM9rwku.js";import"./form-BAfFoDTS.js";import"./label-BagqgWUv.js";import"./input-BJjZBSH8.js";import"./index-BUla3j6g.js";import"./usage-BW6ztpN6.js";import"./ArrowUp-CiCCsmLU.js";import"./ChevronDown-DMIUCeXF.js";import"./org-ai-providers-Udjn3QRR.js";import"./useMutation-09-2Qwl6.js";import"./AlertCircle-DoDnREQU.js";import"./RefreshCcw01-Dbe0-ztA.js";import"./Play-BSN624z4.js";import"./Trash01-p_-P7rrZ.js";import"./card-DiqqquYR.js";import"./toggle-group-iephCdnh.js";import"./avatar-BDzYYIB_.js";import"./User01-C1Py8RLi.js";import"./ai-providers-logos-Du8KzWpH.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./X-AnvD8fGN.js";import"./select-9VPJVrM5.js";import"./index-BdQq_4o_.js";import"./index-CT7BYuwf.js";import"./Check-DsqqbwRv.js";import"./ChevronUp-BPTkFtVQ.js";import"./ArrowLeft-1uQ4hoAA.js";import"./use-copy-d-3iM6J5.js";import"./marked.esm-BaswSlok.js";import"./tabs-CdWME6KE.js";import"./checkbox-B5yMaD1U.js";import"./SearchMd-BVguqJPF.js";import"./Settings01-BKawEeOc.js";import"./use-mcp-resources-CHuUMbyT.js";import"./collapsible-CUnNCwaM.js";import"./index-TzbVkru2.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BSLoo8nT.js";import"./types-DmDUXWAD.js";import"./XClose-CIHCEBuc.js";import"./Type01-D1knZTdC.js";import"./use-collections-D0k_QRc1.js";import"./useSuspenseInfiniteQuery-DZTp9qX4.js";import"./infiniteQueryObserver-BvNG1QG_.js";import"./Loading01-DTPGNGDe.js";import"./collection-search-R3szwhKc.js";import"./user-BOuwXTIR.js";import"./format-time-CMKyl-GC.js";import"./empty-state-5hCgVmoA.js";import"./dropdown-menu-BGBf4SQr.js";import"./decopilot-events-Brt4gAR6.js";import"./index-BclDkWx8.js";import"./Container-D8gJR-V9.js";import"./Dataflow03-D9B0IMv1.js";import"./FolderClosed-DtTyOuV-.js";import"./Upload01-D-cgBdXK.js";import"./Zap-Cbf8Gxw3.js";import"./generate-id-Dyweu44Y.js";import"./slug-DcxyEoi0.js";const He=[{id:"deco",title:"Import from deco.cx",buttonLabel:"Import site",comingSoon:!1,image:"/import-decocx.png"},{id:"github",title:"Existing GitHub project",buttonLabel:"Coming Soon",comingSoon:!0,image:"/import-github.png"},{id:"scratch",title:"Start from scratch",buttonLabel:"Coming Soon",comingSoon:!0,image:"/import-scratch.png"}];function Q(t){const e=j.c(8),{onCardAction:r,mobile:o}=t,a=o?"flex flex-col flex-1 min-h-0 gap-3":"flex flex-col gap-3";let l;e[0]!==a?(l=S("sm:grid sm:grid-cols-3 sm:gap-4",a),e[0]=a,e[1]=l):l=e[1];let c;e[2]!==o||e[3]!==r?(c=He.map(i=>s.jsxs("button",{type:"button",disabled:i.comingSoon,onClick:()=>r(i.id),className:S("rounded-xl border border-border bg-card overflow-hidden text-left","transition-transform duration-150 ease-out will-change-transform","flex flex-row items-center sm:flex-col",o&&"flex-1 min-h-0",!i.comingSoon&&"[@media(hover:hover)]:hover:scale-[1.03] sm:[@media(hover:hover)]:hover:scale-[1.05] active:scale-[0.98] cursor-pointer",i.comingSoon&&"cursor-default"),children:[s.jsx("div",{className:S("w-28 shrink-0 self-stretch sm:w-full sm:aspect-[4/3] sm:self-auto bg-muted overflow-hidden",i.comingSoon&&"opacity-40"),children:i.image&&s.jsx("img",{src:i.image,alt:i.title,className:"w-full h-full object-cover"})}),s.jsxs("div",{className:"flex flex-1 flex-row items-center justify-between gap-3 px-4 py-3 sm:flex-col sm:items-stretch sm:px-5 sm:py-4 sm:gap-0",children:[s.jsx("p",{className:"font-medium text-foreground text-sm sm:text-base sm:text-center sm:mb-4",children:i.title}),s.jsx(te,{className:"shrink-0 cursor-pointer sm:w-full",size:"sm",variant:i.comingSoon?"outline":"default",disabled:i.comingSoon,onClick:d=>{d.stopPropagation(),r(i.id)},children:i.buttonLabel})]})]},i.id)),e[2]=o,e[3]=r,e[4]=c):c=e[4];let n;return e[5]!==l||e[6]!==c?(n=s.jsx("div",{className:l,children:c}),e[5]=l,e[6]=c,e[7]=n):n=e[7],n}const X=s.jsx(U,{icon:"icon://Globe01?color=violet",name:"Site Editor",size:"sm"});function Be(t){const e=j.c(15),{open:r,onOpenChange:o}=t,[a,l]=w.useState(!1),c=F();let n;e[0]!==o?(n=u=>{u==="deco"&&(o(!1),l(!0))},e[0]=o,e[1]=n):n=e[1];const i=n;let d;e[2]!==i||e[3]!==c||e[4]!==o||e[5]!==r?(d=c?s.jsx(ae,{open:r,onOpenChange:o,children:s.jsxs(ce,{className:"h-[70dvh]",children:[s.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:s.jsxs("div",{className:"flex items-center gap-3",children:[X,s.jsx(De,{className:"text-xl font-semibold",children:"Get started with Site Editor"})]})}),s.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:s.jsx(Q,{onCardAction:i,mobile:!0})})]})}):s.jsx(Ee,{open:r,onOpenChange:o,children:s.jsxs(Ae,{className:"sm:max-w-[900px] p-8",children:[s.jsx(Me,{className:"mb-8",children:s.jsxs("div",{className:"flex items-center gap-3",children:[X,s.jsx(Te,{className:"text-xl font-semibold",children:"Get started with Site Editor"})]})}),s.jsx(Q,{onCardAction:i})]})}),e[2]=i,e[3]=c,e[4]=o,e[5]=r,e[6]=d):d=e[6];let m;e[7]!==o?(m=()=>{l(!1),o(!0)},e[7]=o,e[8]=m):m=e[8];let f;e[9]!==a||e[10]!==m?(f=s.jsx(me,{open:a,onOpenChange:l,onBack:m}),e[9]=a,e[10]=m,e[11]=f):f=e[11];let x;return e[12]!==d||e[13]!==f?(x=s.jsxs(s.Fragment,{children:[d,f]}),e[12]=d,e[13]=f,e[14]=x):x=e[14],x}function de(t){const e=j.c(16),{agent:r,onSpecialClick:o}=t,{setVirtualMcpId:a}=le();let l;e[0]!==r.id||e[1]!==o||e[2]!==a?(l=()=>{o?o():a(r.id)},e[0]=r.id,e[1]=o,e[2]=a,e[3]=l):l=e[3];const c=l;let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=S("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[88px]","group"),e[4]=n):n=e[4];const i=`Select agent ${r.title}`;let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(be,{size:24}),e[5]=d):d=e[5];let m;e[6]!==r.icon||e[7]!==r.title?(m=s.jsx(U,{icon:r.icon,name:r.title,size:"md",fallbackIcon:d,className:"transition-transform group-hover:scale-110"}),e[6]=r.icon,e[7]=r.title,e[8]=m):m=e[8];let f;e[9]!==r.title?(f=s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight line-clamp-2",children:r.title}),e[9]=r.title,e[10]=f):f=e[10];let x;return e[11]!==c||e[12]!==i||e[13]!==m||e[14]!==f?(x=s.jsxs("button",{type:"button",onClick:c,className:n,"aria-label":i,children:[m,f]}),e[11]=c,e[12]=i,e[13]=m,e[14]=f,e[15]=x):x=e[15],x}function Le(t){const e=j.c(15),{virtualMcps:r,selectedVirtualMcpId:o,onVirtualMcpChange:a}=t,[l,c]=w.useState(!1),n=w.useRef(null),i=F();let d,m;e[0]!==i||e[1]!==l?(d=()=>{l&&!i&&setTimeout(()=>{n.current?.focus()},0)},m=[l,i],e[0]=i,e[1]=l,e[2]=d,e[3]=m):(d=e[2],m=e[3]),w.useEffect(d,m);let f;e[4]!==a?(f=N=>{a(N),c(!1)},e[4]=a,e[5]=f):f=e[5];const x=f;let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=S("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[88px]","group"),e[6]=u):u=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ye,{asChild:!0,children:s.jsxs("button",{type:"button",className:u,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-xl bg-accent flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:s.jsx(ze,{size:20,className:"text-foreground"})}),s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"See all"})]})}),e[7]=h):h=e[7];let p;e[8]!==x||e[9]!==o||e[10]!==r?(p=s.jsx(Se,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(je,{virtualMcps:r,selectedVirtualMcpId:o,onVirtualMcpChange:x,searchInputRef:n})}),e[8]=x,e[9]=o,e[10]=r,e[11]=p):p=e[11];let g;return e[12]!==l||e[13]!==p?(g=s.jsxs(Ce,{open:l,onOpenChange:c,children:[h,p]}),e[12]=l,e[13]=p,e[14]=g):g=e[14],g}const J={id:"site-editor",title:"Site Editor",icon:"icon://Globe01?color=violet"};function Fe(){const t=j.c(9);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={navigateOnCreate:!0},t[0]=e):e=t[0];const{createVirtualMCP:r,isCreating:o}=Pe(e);let a;t[1]!==r?(a=()=>r(),t[1]=r,t[2]=a):a=t[2];let l;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=S("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[88px]","group","disabled:opacity-50 disabled:cursor-not-allowed"),t[3]=l):l=t[3];let c,n;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-xl bg-background border-2 border-dashed border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:s.jsx(ne,{size:20,className:"text-muted-foreground"})}),n=s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"Create agent"}),t[4]=c,t[5]=n):(c=t[4],n=t[5]);let i;return t[6]!==o||t[7]!==a?(i=s.jsxs("button",{type:"button",onClick:a,disabled:o,className:l,"aria-label":"Create agent",children:[c,n]}),t[6]=o,t[7]=a,t[8]=i):i=t[8],i}function Ge(){const t=j.c(30),e=Ie(),{selectedVirtualMcp:r,setVirtualMcpId:o}=le(),{locator:a}=se(),[l,c]=w.useState(!1);let n,i,d,m,f,x;if(t[0]!==a||t[1]!==e){const z=ge(a),k=e.filter(qe).sort((_,I)=>{const B=z.indexOf(_.id),v=z.indexOf(I.id);return B!==-1&&v!==-1?B-v:B!==-1?-1:v!==-1?1:new Date(I.updated_at).getTime()-new Date(_.updated_at).getTime()}).slice(0,5);let y;t[8]!==e?(y=e.map(We),t[8]=e,t[9]=y):y=t[9],x=y,n=k.length>0,f="w-full",i="flex flex-wrap justify-center gap-2",t[10]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(de,{agent:J,onSpecialClick:()=>c(!0)},J.id),t[10]=d):d=t[10],m=k.map(Ue),t[0]=a,t[1]=e,t[2]=n,t[3]=i,t[4]=d,t[5]=m,t[6]=f,t[7]=x}else n=t[2],i=t[3],d=t[4],m=t[5],f=t[6],x=t[7];let u;t[11]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Fe,{}),t[11]=u):u=t[11];let h;t[12]!==n||t[13]!==r?.id||t[14]!==o||t[15]!==x?(h=n&&s.jsx(Le,{virtualMcps:x,selectedVirtualMcpId:r?.id??null,onVirtualMcpChange:o}),t[12]=n,t[13]=r?.id,t[14]=o,t[15]=x,t[16]=h):h=t[16];let p;t[17]!==i||t[18]!==d||t[19]!==m||t[20]!==h?(p=s.jsxs("div",{className:i,children:[d,m,u,h]}),t[17]=i,t[18]=d,t[19]=m,t[20]=h,t[21]=p):p=t[21];let g;t[22]!==f||t[23]!==p?(g=s.jsx("div",{className:f,children:p}),t[22]=f,t[23]=p,t[24]=g):g=t[24];let N;t[25]!==l?(N=s.jsx(Be,{open:l,onOpenChange:c}),t[25]=l,t[26]=N):N=t[26];let C;return t[27]!==g||t[28]!==N?(C=s.jsxs(s.Fragment,{children:[g,N]}),t[27]=g,t[28]=N,t[29]=C):C=t[29],C}function Ue(t){return s.jsx(de,{agent:t},t.id??"default")}function We(t){return{id:t.id,title:t.title,description:t.description,icon:t.icon}}function qe(t){return t.id!==null&&!ke(t.id)}function Ke(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"w-full",children:s.jsx("div",{className:"flex flex-wrap justify-center gap-2",children:Array.from({length:7}).map(Qe)})}),t[0]=e):e=t[0],e}function Qe(t,e){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 w-[88px]",children:[s.jsx(q,{className:"size-12 rounded-xl shrink-0"}),s.jsx(q,{className:"h-3 sm:h-4 w-full"})]},e)}function Y(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(w.Suspense,{fallback:s.jsx(Ke,{}),children:s.jsx(Ge,{})}),t[0]=e):e=t[0],e}const Xe=`url("data:image/svg+xml;utf8,<svg viewBox='0 0 500 64' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><rect x='0' y='0' height='100%' width='100%' fill='url(%23grad)' opacity='0.6'/><defs><radialGradient id='grad' gradientUnits='userSpaceOnUse' cx='0' cy='0' r='10' gradientTransform='matrix(55.083 -7.55 1.4151 14.867 -37.917 86)'><stop stop-color='rgba(165,149,255,1)' offset='0.0045422'/><stop stop-color='rgba(210,202,255,1)' offset='0.16426'/><stop stop-color='rgba(255,255,255,1)' offset='0.32398'/><stop stop-color='rgba(255,255,255,0.3)' offset='0.68776'/><stop stop-color='rgba(255,224,139,0.3)' offset='0.74761'/><stop stop-color='rgba(255,209,80,0.3)' offset='0.77753'/><stop stop-color='rgba(255,193,22,0.3)' offset='0.80745'/><stop stop-color='rgba(208,236,26,1)' offset='0.96307'/></radialGradient></defs></svg>")`,Je="/decotexture.svg";function Z(t){const e=j.c(7),{onClick:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={backgroundImage:Xe,backgroundSize:"100% 100%"},e[0]=o):o=e[0];let a,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"relative shrink-0 p-1.5 bg-[var(--brand-green-light)] rounded-lg border border-border",children:s.jsx(U,{icon:"/logos/deco%20logo.svg",name:"deco.cx",size:"xs",className:"border-0 rounded-none"})}),l=s.jsx("p",{className:"flex-1 relative text-sm font-medium text-foreground leading-none whitespace-nowrap",children:"Import your deco.cx site"}),e[1]=a,e[2]=l):(a=e[1],l=e[2]);let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("img",{src:Je,alt:"","aria-hidden":!0,className:"absolute pointer-events-none",style:{width:"274.5px",height:"272.25px",left:"calc(50% + 145.5px)",top:"calc(50% + 40px)",transform:"translate(-50%, -50%)"}}),e[3]=c):c=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"relative bg-background flex items-center justify-center size-8 rounded-md shrink-0",children:s.jsx(Ve,{size:16,className:"text-foreground transition-transform group-hover:translate-x-0.5"})}),e[4]=n):n=e[4];let i;return e[5]!==r?(i=s.jsxs("button",{type:"button",onClick:r,className:"w-full relative flex items-center gap-4 px-4 py-4 rounded-lg border border-border bg-background overflow-hidden transition-colors text-left cursor-pointer group",style:o,children:[a,l,c,n]}),e[5]=r,e[6]=i):i=e[6],i}function Ye(){const t=j.c(5),{data:e}=oe.useSession(),r=e?.user?.email;let o;t[0]!==r?(o=["deco-profile",r],t[0]=r,t[1]=o):o=t[1];const a=!!e?.user?.email;let l;t[2]!==o||t[3]!==a?(l={queryKey:o,queryFn:Ze,enabled:a,staleTime:3e5},t[2]=o,t[3]=a,t[4]=l):l=t[4];const{data:c}=$e(l);return c?.isDecoUser??!1}async function Ze(){const t=await fetch("/api/deco-sites/profile");return t.ok?t.json():{isDecoUser:!1}}function ee(t){const e=j.c(48),{showContext:r,setShowContext:o}=t,{org:a}=se(),l=pe(),{data:c}=oe.useSession(),{isChatEmpty:n,activeTaskId:i,tasks:d,selectedVirtualMcp:m,createTask:f,switchToTask:x}=re();let u;if(e[0]!==i||e[1]!==d){let V;e[3]!==i?(V=fe=>fe.id===i,e[3]=i,e[4]=V):V=e[4],u=d.find(V),e[0]=i,e[1]=d,e[2]=u}else u=e[2];const h=u,p=F(),[g,N]=w.useState(!1),[C,z]=w.useState(!1),k=Ye();let y;e[5]!==c?.user?.name?(y=c?.user?.name?.split(" ")[0]||"there",e[5]=c?.user?.name,e[6]=y):y=e[6];const _=y;let I;e[7]!==a.id?(I=_e(a.id),e[7]=a.id,e[8]=I):I=e[8];const v=m??I;let E;e[9]!==h?(E=h?.title&&s.jsx(he,{taskId:h.id,text:h.title,className:"text-sm font-medium text-foreground"}),e[9]=h,e[10]=E):E=e[10];let A;e[11]!==E?(A=s.jsx(H.Header.Left,{className:"gap-2",children:E}),e[11]=E,e[12]=A):A=e[12];let M;e[13]!==f||e[14]!==n||e[15]!==p?(M=p&&s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",onClick:()=>f(),disabled:n,className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors disabled:opacity-40 disabled:cursor-not-allowed",title:"New chat",children:s.jsx(ne,{size:16,className:"text-muted-foreground"})}),s.jsx("button",{type:"button",onClick:()=>N(!0),className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors",title:"Tasks",children:s.jsx(we,{size:16,className:"text-muted-foreground"})})]}),e[13]=f,e[14]=n,e[15]=p,e[16]=M):M=e[16];let T;e[17]!==n||e[18]!==p||e[19]!==o||e[20]!==r?(T=!n&&!p&&s.jsx("button",{type:"button",onClick:()=>o(et),className:S("flex size-7 items-center justify-center rounded-md border border-input hover:bg-accent transition-colors",r&&"bg-accent"),title:"Toggle context panel",children:s.jsx(ve,{size:14,className:"text-muted-foreground"})}),e[17]=n,e[18]=p,e[19]=o,e[20]=r,e[21]=T):T=e[21];let O;e[22]!==M||e[23]!==T?(O=s.jsxs(H.Header.Right,{className:"gap-1",children:[M,T]}),e[22]=M,e[23]=T,e[24]=O):O=e[24];let D;e[25]!==A||e[26]!==O?(D=s.jsxs(H.Header,{className:"flex-none z-10 bg-background",children:[A,O]}),e[25]=A,e[26]=O,e[27]=D):D=e[27];let P;e[28]!==p||e[29]!==g||e[30]!==x?(P=p&&s.jsx(ae,{open:g,onOpenChange:N,direction:"bottom",children:s.jsx(ce,{className:"h-[90vh] max-h-[90vh]",children:s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(ie,{onTaskSelect:async V=>{await x(V),N(!1)}})})})}),e[28]=p,e[29]=g,e[30]=x,e[31]=P):P=e[31];let R;e[32]!==v||e[33]!==n||e[34]!==k||e[35]!==p||e[36]!==l||e[37]!==m||e[38]!==o||e[39]!==_?(R=n?p?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center px-4",children:s.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(W,{icon:v.icon,name:v.title,size:"md",className:S("transition-opacity duration-200",!m&&"invisible")})}),s.jsx("div",{className:"text-center",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",_,"?"]})})]})}),s.jsxs("div",{className:"shrink-0 flex flex-col items-center w-full gap-3 pb-2",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-2xl mx-auto gap-4 px-4",children:[s.jsx(b.IceBreakers,{className:"w-full"}),l&&s.jsx("div",{className:"flex flex-col items-center w-full",children:s.jsx(Y,{})}),k&&l&&s.jsx("div",{className:"w-full max-w-[500px] mx-auto",children:s.jsx(Z,{onClick:()=>z(!0)})})]}),s.jsx(b.Footer,{children:s.jsx(b.Input,{})})]})]}):s.jsxs("div",{className:"flex-1 flex flex-col items-center px-10",children:[s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(W,{icon:v.icon,name:v.title,size:"md",className:S("transition-opacity duration-200",!m&&"invisible")})}),s.jsx("div",{className:"text-center mb-6",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",_,"?"]})}),s.jsx(b.IceBreakers,{className:"w-full"}),s.jsx("div",{className:"w-full",children:s.jsx(b.Input,{onOpenContextPanel:()=>o(!0)})})]}),l&&s.jsx("div",{className:"w-full max-w-[800px] mt-10 mx-auto",children:s.jsx(Y,{})})]}),k&&l&&s.jsx("div",{className:"w-full max-w-[500px] mx-auto pb-6",children:s.jsx(Z,{onClick:()=>z(!0)})})]}):s.jsxs(s.Fragment,{children:[s.jsx(b.Main,{children:s.jsx(b.Messages,{})}),s.jsx(b.Footer,{children:s.jsx(b.Input,{onOpenContextPanel:()=>o(!0)})})]}),e[32]=v,e[33]=n,e[34]=k,e[35]=p,e[36]=l,e[37]=m,e[38]=o,e[39]=_,e[40]=R):R=e[40];let $;e[41]!==C?($=s.jsx(me,{open:C,onOpenChange:z}),e[41]=C,e[42]=$):$=e[42];let L;return e[43]!==P||e[44]!==R||e[45]!==$||e[46]!==D?(L=s.jsxs(b,{className:"h-full bg-background",children:[D,P,R,$]}),e[43]=P,e[44]=R,e[45]=$,e[46]=D,e[47]=L):L=e[47],L}function et(t){return!t}function tt(){const t=j.c(15),{allModelsConnections:e}=re(),r=F(),[o,a]=w.useState(!1);if(e.length===0){let x;return t[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"flex flex-col h-full bg-background items-center justify-center",children:s.jsx(b.NoLlmBindingEmptyState,{})}),t[0]=x):x=t[0],x}if(r){let x;return t[1]!==o?(x=s.jsx("div",{className:"size-full",children:s.jsx(ee,{showContext:o,setShowContext:a})}),t[1]=o,t[2]=x):x=t[2],x}let l,c;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(G,{defaultSize:20,minSize:10,id:"tasks",order:1,children:s.jsx(ie,{})}),c=s.jsx(K,{className:"bg-border/30"}),t[3]=l,t[4]=c):(l=t[3],c=t[4]);const n=o?50:80;let i;t[5]!==o?(i=s.jsx(ee,{showContext:o,setShowContext:a}),t[5]=o,t[6]=i):i=t[6];let d;t[7]!==n||t[8]!==i?(d=s.jsx(G,{defaultSize:n,minSize:30,id:"main",order:2,children:i}),t[7]=n,t[8]=i,t[9]=d):d=t[9];let m;t[10]!==o?(m=o&&s.jsxs(s.Fragment,{children:[s.jsx(K,{className:"bg-border/30"}),s.jsx(G,{defaultSize:30,minSize:15,id:"context",order:3,children:s.jsx(ue,{onClose:()=>a(!1)})})]}),t[10]=o,t[11]=m):m=t[11];let f;return t[12]!==d||t[13]!==m?(f=s.jsxs(Re,{direction:"horizontal",className:"size-full",children:[l,c,d,m]}),t[12]=d,t[13]=m,t[14]=f):f=t[14],f}function st(t){const e=j.c(14),{error:r,onRetry:o}=t,a=r?.message?.includes("401")||r?.message?.toLowerCase().includes("unauthorized");let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(H.Header,{className:"flex-none",children:[s.jsx(H.Header.Left,{className:"gap-2"}),s.jsx(H.Header.Right,{className:"gap-1"})]}),e[0]=l):l=e[0];let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(Ne,{className:"h-6 w-6 text-destructive"})}),e[1]=c):c=e[1];const n=a?"Unable to load models":"Something went wrong";let i;e[2]!==n?(i=s.jsx("h3",{className:"text-lg font-medium",children:n}),e[2]=n,e[3]=i):i=e[3];const d=a?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":r?.message||"An unexpected error occurred";let m;e[4]!==d?(m=s.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[4]=d,e[5]=m):m=e[5];let f;e[6]!==i||e[7]!==m?(f=s.jsxs("div",{className:"space-y-2",children:[i,m]}),e[6]=i,e[7]=m,e[8]=f):f=e[8];let x;e[9]!==o?(x=s.jsx(te,{variant:"outline",onClick:o,children:"Try again"}),e[9]=o,e[10]=x):x=e[10];let u;return e[11]!==f||e[12]!==x?(u=s.jsxs(b,{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:[c,f,x]})})]}),e[11]=f,e[12]=x,e[13]=u):u=e[13],u}function Ts(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(xe,{fallback:ot,children:s.jsx(w.Suspense,{fallback:s.jsx(b.Skeleton,{}),children:s.jsx(tt,{})})}),t[0]=e):e=t[0],e}function ot(t){const{error:e,resetError:r}=t;return s.jsx(st,{error:e,onRetry:r})}export{Ts as default};
|
|
1
|
+
import{d as j,r as w,j as s,y as S,B as te,c as se,E as xe,u as pe,g as oe}from"./index-fnzLSheB.js";import{C as b}from"./task-status-zYkVm9gw.js";import{C as ue,E as he}from"./editable-task-title-DW-xTRvX.js";import{a as ie}from"./tasks-panel-otVJY_Br.js";import{u as le,r as ge,a as re}from"./context-DRHBeAGs.js";import{V as je}from"./select-virtual-mcp-DF77Fde_.js";import{I as U,t as be,m as Ne,n as ve,A as W,o as we}from"./integration-icon-3E3I1Ow-.js";import{a as ye,b as Se,P as Ce}from"./popover-DoT6XNod.js";import{S as q}from"./skeleton-kJ_1M0ks.js";import{i as ke,d as _e}from"./constants-B5ylLz8P.js";import{b as Ie}from"./use-virtual-mcp-DtVNlpR8.js";import{i as ze}from"./ChevronRight-DY2lrGOn.js";import{s as ne}from"./Plus-CfD-fvi9.js";import{u as F}from"./tooltip-hlHlzWhV.js";import{a as Ee,D as Ae,b as Me,c as Te}from"./dialog-D7WigTyK.js";import{D as ae,a as ce,b as Oe,c as De}from"./drawer-DkpraRh8.js";import{I as me}from"./import-from-deco-dialog-B6yW7KqN.js";import{u as Pe}from"./use-create-virtual-mcp-CSUTkPbs.js";import{P as H}from"./index-DWiV_aLY.js";import{R as G,a as K,b as Re}from"./resizable-BTe7pUxK.js";import{u as $e}from"./useQuery-D7A6izWp.js";import{d as Ve}from"./XCircle-wueTdlAa.js";import"./spinner-CJLGQeTL.js";import"./use-mcp-prompts-vhovBlsL.js";import"./form-DXxHt_ci.js";import"./label-_1-T_NFE.js";import"./input-CBI5HJST.js";import"./index-B-Jlqnye.js";import"./usage-BW6ztpN6.js";import"./ArrowUp-PknJL_3i.js";import"./ChevronDown-CHOEDpCq.js";import"./org-ai-providers-BM6HJKuc.js";import"./useMutation-CsiTkFgY.js";import"./AlertCircle-Cbtm5L98.js";import"./RefreshCcw01-Cja044eH.js";import"./Play-CsSGdP4Z.js";import"./Trash01-Cl6ql_TT.js";import"./card-DP3El98a.js";import"./toggle-group-vE44W8pW.js";import"./avatar-B2cKnsRn.js";import"./User01-BgxUQ8sC.js";import"./ai-providers-logos-BditdJqa.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./X-De9pN2CV.js";import"./select-CuLy3REb.js";import"./index-BdQq_4o_.js";import"./index-D3056qAr.js";import"./Check-Cj1LnSt2.js";import"./ChevronUp-B38OwFL_.js";import"./ArrowLeft-CCViWpBS.js";import"./use-copy-J8HCGL54.js";import"./marked.esm-BaswSlok.js";import"./tabs-CxRF-CYj.js";import"./checkbox-B17TL9Yy.js";import"./SearchMd-B4W5fcyf.js";import"./Settings01-CMhz8juF.js";import"./use-mcp-resources-BR6sQvU6.js";import"./collapsible-DbjcsjQi.js";import"./index-mZiJdp7F.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-B2FWYfE4.js";import"./types-BMfsriOE.js";import"./XClose-CZL78D4W.js";import"./Type01-UhdL8ksX.js";import"./use-collections-B0VCcn8e.js";import"./useSuspenseInfiniteQuery-aZXW_lbE.js";import"./infiniteQueryObserver-DN95LZQa.js";import"./Loading01-CJFbgK59.js";import"./collection-search-DQX16wbn.js";import"./user-Bs9OrNKP.js";import"./format-time-CMKyl-GC.js";import"./empty-state-D14a0Zxq.js";import"./dropdown-menu-PjKkpqts.js";import"./decopilot-events-Brt4gAR6.js";import"./index-Dqx4k4bH.js";import"./Container-DLm11uCu.js";import"./Dataflow03-Ba3PnLD-.js";import"./FolderClosed-rrRpN158.js";import"./Upload01-DX94fj05.js";import"./Zap-CeI4Bf9r.js";import"./generate-id-Dyweu44Y.js";import"./slug-DcxyEoi0.js";const He=[{id:"deco",title:"Import from deco.cx",buttonLabel:"Import site",comingSoon:!1,image:"/import-decocx.png"},{id:"github",title:"Existing GitHub project",buttonLabel:"Coming Soon",comingSoon:!0,image:"/import-github.png"},{id:"scratch",title:"Start from scratch",buttonLabel:"Coming Soon",comingSoon:!0,image:"/import-scratch.png"}];function Q(t){const e=j.c(8),{onCardAction:r,mobile:o}=t,a=o?"flex flex-col flex-1 min-h-0 gap-3":"flex flex-col gap-3";let l;e[0]!==a?(l=S("sm:grid sm:grid-cols-3 sm:gap-4",a),e[0]=a,e[1]=l):l=e[1];let c;e[2]!==o||e[3]!==r?(c=He.map(i=>s.jsxs("button",{type:"button",disabled:i.comingSoon,onClick:()=>r(i.id),className:S("rounded-xl border border-border bg-card overflow-hidden text-left","transition-transform duration-150 ease-out will-change-transform","flex flex-row items-center sm:flex-col",o&&"flex-1 min-h-0",!i.comingSoon&&"[@media(hover:hover)]:hover:scale-[1.03] sm:[@media(hover:hover)]:hover:scale-[1.05] active:scale-[0.98] cursor-pointer",i.comingSoon&&"cursor-default"),children:[s.jsx("div",{className:S("w-28 shrink-0 self-stretch sm:w-full sm:aspect-[4/3] sm:self-auto bg-muted overflow-hidden",i.comingSoon&&"opacity-40"),children:i.image&&s.jsx("img",{src:i.image,alt:i.title,className:"w-full h-full object-cover"})}),s.jsxs("div",{className:"flex flex-1 flex-row items-center justify-between gap-3 px-4 py-3 sm:flex-col sm:items-stretch sm:px-5 sm:py-4 sm:gap-0",children:[s.jsx("p",{className:"font-medium text-foreground text-sm sm:text-base sm:text-center sm:mb-4",children:i.title}),s.jsx(te,{className:"shrink-0 cursor-pointer sm:w-full",size:"sm",variant:i.comingSoon?"outline":"default",disabled:i.comingSoon,onClick:d=>{d.stopPropagation(),r(i.id)},children:i.buttonLabel})]})]},i.id)),e[2]=o,e[3]=r,e[4]=c):c=e[4];let n;return e[5]!==l||e[6]!==c?(n=s.jsx("div",{className:l,children:c}),e[5]=l,e[6]=c,e[7]=n):n=e[7],n}const X=s.jsx(U,{icon:"icon://Globe01?color=violet",name:"Site Editor",size:"sm"});function Be(t){const e=j.c(15),{open:r,onOpenChange:o}=t,[a,l]=w.useState(!1),c=F();let n;e[0]!==o?(n=u=>{u==="deco"&&(o(!1),l(!0))},e[0]=o,e[1]=n):n=e[1];const i=n;let d;e[2]!==i||e[3]!==c||e[4]!==o||e[5]!==r?(d=c?s.jsx(ae,{open:r,onOpenChange:o,children:s.jsxs(ce,{className:"h-[70dvh]",children:[s.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:s.jsxs("div",{className:"flex items-center gap-3",children:[X,s.jsx(De,{className:"text-xl font-semibold",children:"Get started with Site Editor"})]})}),s.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:s.jsx(Q,{onCardAction:i,mobile:!0})})]})}):s.jsx(Ee,{open:r,onOpenChange:o,children:s.jsxs(Ae,{className:"sm:max-w-[900px] p-8",children:[s.jsx(Me,{className:"mb-8",children:s.jsxs("div",{className:"flex items-center gap-3",children:[X,s.jsx(Te,{className:"text-xl font-semibold",children:"Get started with Site Editor"})]})}),s.jsx(Q,{onCardAction:i})]})}),e[2]=i,e[3]=c,e[4]=o,e[5]=r,e[6]=d):d=e[6];let m;e[7]!==o?(m=()=>{l(!1),o(!0)},e[7]=o,e[8]=m):m=e[8];let f;e[9]!==a||e[10]!==m?(f=s.jsx(me,{open:a,onOpenChange:l,onBack:m}),e[9]=a,e[10]=m,e[11]=f):f=e[11];let x;return e[12]!==d||e[13]!==f?(x=s.jsxs(s.Fragment,{children:[d,f]}),e[12]=d,e[13]=f,e[14]=x):x=e[14],x}function de(t){const e=j.c(16),{agent:r,onSpecialClick:o}=t,{setVirtualMcpId:a}=le();let l;e[0]!==r.id||e[1]!==o||e[2]!==a?(l=()=>{o?o():a(r.id)},e[0]=r.id,e[1]=o,e[2]=a,e[3]=l):l=e[3];const c=l;let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=S("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[88px]","group"),e[4]=n):n=e[4];const i=`Select agent ${r.title}`;let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(be,{size:24}),e[5]=d):d=e[5];let m;e[6]!==r.icon||e[7]!==r.title?(m=s.jsx(U,{icon:r.icon,name:r.title,size:"md",fallbackIcon:d,className:"transition-transform group-hover:scale-110"}),e[6]=r.icon,e[7]=r.title,e[8]=m):m=e[8];let f;e[9]!==r.title?(f=s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight line-clamp-2",children:r.title}),e[9]=r.title,e[10]=f):f=e[10];let x;return e[11]!==c||e[12]!==i||e[13]!==m||e[14]!==f?(x=s.jsxs("button",{type:"button",onClick:c,className:n,"aria-label":i,children:[m,f]}),e[11]=c,e[12]=i,e[13]=m,e[14]=f,e[15]=x):x=e[15],x}function Le(t){const e=j.c(15),{virtualMcps:r,selectedVirtualMcpId:o,onVirtualMcpChange:a}=t,[l,c]=w.useState(!1),n=w.useRef(null),i=F();let d,m;e[0]!==i||e[1]!==l?(d=()=>{l&&!i&&setTimeout(()=>{n.current?.focus()},0)},m=[l,i],e[0]=i,e[1]=l,e[2]=d,e[3]=m):(d=e[2],m=e[3]),w.useEffect(d,m);let f;e[4]!==a?(f=N=>{a(N),c(!1)},e[4]=a,e[5]=f):f=e[5];const x=f;let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=S("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[88px]","group"),e[6]=u):u=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ye,{asChild:!0,children:s.jsxs("button",{type:"button",className:u,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-xl bg-accent flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:s.jsx(ze,{size:20,className:"text-foreground"})}),s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"See all"})]})}),e[7]=h):h=e[7];let p;e[8]!==x||e[9]!==o||e[10]!==r?(p=s.jsx(Se,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(je,{virtualMcps:r,selectedVirtualMcpId:o,onVirtualMcpChange:x,searchInputRef:n})}),e[8]=x,e[9]=o,e[10]=r,e[11]=p):p=e[11];let g;return e[12]!==l||e[13]!==p?(g=s.jsxs(Ce,{open:l,onOpenChange:c,children:[h,p]}),e[12]=l,e[13]=p,e[14]=g):g=e[14],g}const J={id:"site-editor",title:"Site Editor",icon:"icon://Globe01?color=violet"};function Fe(){const t=j.c(9);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={navigateOnCreate:!0},t[0]=e):e=t[0];const{createVirtualMCP:r,isCreating:o}=Pe(e);let a;t[1]!==r?(a=()=>r(),t[1]=r,t[2]=a):a=t[2];let l;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=S("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[88px]","group","disabled:opacity-50 disabled:cursor-not-allowed"),t[3]=l):l=t[3];let c,n;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-xl bg-background border-2 border-dashed border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:s.jsx(ne,{size:20,className:"text-muted-foreground"})}),n=s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"Create agent"}),t[4]=c,t[5]=n):(c=t[4],n=t[5]);let i;return t[6]!==o||t[7]!==a?(i=s.jsxs("button",{type:"button",onClick:a,disabled:o,className:l,"aria-label":"Create agent",children:[c,n]}),t[6]=o,t[7]=a,t[8]=i):i=t[8],i}function Ge(){const t=j.c(30),e=Ie(),{selectedVirtualMcp:r,setVirtualMcpId:o}=le(),{locator:a}=se(),[l,c]=w.useState(!1);let n,i,d,m,f,x;if(t[0]!==a||t[1]!==e){const z=ge(a),k=e.filter(qe).sort((_,I)=>{const B=z.indexOf(_.id),v=z.indexOf(I.id);return B!==-1&&v!==-1?B-v:B!==-1?-1:v!==-1?1:new Date(I.updated_at).getTime()-new Date(_.updated_at).getTime()}).slice(0,5);let y;t[8]!==e?(y=e.map(We),t[8]=e,t[9]=y):y=t[9],x=y,n=k.length>0,f="w-full",i="flex flex-wrap justify-center gap-2",t[10]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(de,{agent:J,onSpecialClick:()=>c(!0)},J.id),t[10]=d):d=t[10],m=k.map(Ue),t[0]=a,t[1]=e,t[2]=n,t[3]=i,t[4]=d,t[5]=m,t[6]=f,t[7]=x}else n=t[2],i=t[3],d=t[4],m=t[5],f=t[6],x=t[7];let u;t[11]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Fe,{}),t[11]=u):u=t[11];let h;t[12]!==n||t[13]!==r?.id||t[14]!==o||t[15]!==x?(h=n&&s.jsx(Le,{virtualMcps:x,selectedVirtualMcpId:r?.id??null,onVirtualMcpChange:o}),t[12]=n,t[13]=r?.id,t[14]=o,t[15]=x,t[16]=h):h=t[16];let p;t[17]!==i||t[18]!==d||t[19]!==m||t[20]!==h?(p=s.jsxs("div",{className:i,children:[d,m,u,h]}),t[17]=i,t[18]=d,t[19]=m,t[20]=h,t[21]=p):p=t[21];let g;t[22]!==f||t[23]!==p?(g=s.jsx("div",{className:f,children:p}),t[22]=f,t[23]=p,t[24]=g):g=t[24];let N;t[25]!==l?(N=s.jsx(Be,{open:l,onOpenChange:c}),t[25]=l,t[26]=N):N=t[26];let C;return t[27]!==g||t[28]!==N?(C=s.jsxs(s.Fragment,{children:[g,N]}),t[27]=g,t[28]=N,t[29]=C):C=t[29],C}function Ue(t){return s.jsx(de,{agent:t},t.id??"default")}function We(t){return{id:t.id,title:t.title,description:t.description,icon:t.icon}}function qe(t){return t.id!==null&&!ke(t.id)}function Ke(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"w-full",children:s.jsx("div",{className:"flex flex-wrap justify-center gap-2",children:Array.from({length:7}).map(Qe)})}),t[0]=e):e=t[0],e}function Qe(t,e){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 w-[88px]",children:[s.jsx(q,{className:"size-12 rounded-xl shrink-0"}),s.jsx(q,{className:"h-3 sm:h-4 w-full"})]},e)}function Y(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(w.Suspense,{fallback:s.jsx(Ke,{}),children:s.jsx(Ge,{})}),t[0]=e):e=t[0],e}const Xe=`url("data:image/svg+xml;utf8,<svg viewBox='0 0 500 64' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><rect x='0' y='0' height='100%' width='100%' fill='url(%23grad)' opacity='0.6'/><defs><radialGradient id='grad' gradientUnits='userSpaceOnUse' cx='0' cy='0' r='10' gradientTransform='matrix(55.083 -7.55 1.4151 14.867 -37.917 86)'><stop stop-color='rgba(165,149,255,1)' offset='0.0045422'/><stop stop-color='rgba(210,202,255,1)' offset='0.16426'/><stop stop-color='rgba(255,255,255,1)' offset='0.32398'/><stop stop-color='rgba(255,255,255,0.3)' offset='0.68776'/><stop stop-color='rgba(255,224,139,0.3)' offset='0.74761'/><stop stop-color='rgba(255,209,80,0.3)' offset='0.77753'/><stop stop-color='rgba(255,193,22,0.3)' offset='0.80745'/><stop stop-color='rgba(208,236,26,1)' offset='0.96307'/></radialGradient></defs></svg>")`,Je="/decotexture.svg";function Z(t){const e=j.c(7),{onClick:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={backgroundImage:Xe,backgroundSize:"100% 100%"},e[0]=o):o=e[0];let a,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"relative shrink-0 p-1.5 bg-[var(--brand-green-light)] rounded-lg border border-border",children:s.jsx(U,{icon:"/logos/deco%20logo.svg",name:"deco.cx",size:"xs",className:"border-0 rounded-none"})}),l=s.jsx("p",{className:"flex-1 relative text-sm font-medium text-foreground leading-none whitespace-nowrap",children:"Import your deco.cx site"}),e[1]=a,e[2]=l):(a=e[1],l=e[2]);let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("img",{src:Je,alt:"","aria-hidden":!0,className:"absolute pointer-events-none",style:{width:"274.5px",height:"272.25px",left:"calc(50% + 145.5px)",top:"calc(50% + 40px)",transform:"translate(-50%, -50%)"}}),e[3]=c):c=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"relative bg-background flex items-center justify-center size-8 rounded-md shrink-0",children:s.jsx(Ve,{size:16,className:"text-foreground transition-transform group-hover:translate-x-0.5"})}),e[4]=n):n=e[4];let i;return e[5]!==r?(i=s.jsxs("button",{type:"button",onClick:r,className:"w-full relative flex items-center gap-4 px-4 py-4 rounded-lg border border-border bg-background overflow-hidden transition-colors text-left cursor-pointer group",style:o,children:[a,l,c,n]}),e[5]=r,e[6]=i):i=e[6],i}function Ye(){const t=j.c(5),{data:e}=oe.useSession(),r=e?.user?.email;let o;t[0]!==r?(o=["deco-profile",r],t[0]=r,t[1]=o):o=t[1];const a=!!e?.user?.email;let l;t[2]!==o||t[3]!==a?(l={queryKey:o,queryFn:Ze,enabled:a,staleTime:3e5},t[2]=o,t[3]=a,t[4]=l):l=t[4];const{data:c}=$e(l);return c?.isDecoUser??!1}async function Ze(){const t=await fetch("/api/deco-sites/profile");return t.ok?t.json():{isDecoUser:!1}}function ee(t){const e=j.c(48),{showContext:r,setShowContext:o}=t,{org:a}=se(),l=pe(),{data:c}=oe.useSession(),{isChatEmpty:n,activeTaskId:i,tasks:d,selectedVirtualMcp:m,createTask:f,switchToTask:x}=re();let u;if(e[0]!==i||e[1]!==d){let V;e[3]!==i?(V=fe=>fe.id===i,e[3]=i,e[4]=V):V=e[4],u=d.find(V),e[0]=i,e[1]=d,e[2]=u}else u=e[2];const h=u,p=F(),[g,N]=w.useState(!1),[C,z]=w.useState(!1),k=Ye();let y;e[5]!==c?.user?.name?(y=c?.user?.name?.split(" ")[0]||"there",e[5]=c?.user?.name,e[6]=y):y=e[6];const _=y;let I;e[7]!==a.id?(I=_e(a.id),e[7]=a.id,e[8]=I):I=e[8];const v=m??I;let E;e[9]!==h?(E=h?.title&&s.jsx(he,{taskId:h.id,text:h.title,className:"text-sm font-medium text-foreground"}),e[9]=h,e[10]=E):E=e[10];let A;e[11]!==E?(A=s.jsx(H.Header.Left,{className:"gap-2",children:E}),e[11]=E,e[12]=A):A=e[12];let M;e[13]!==f||e[14]!==n||e[15]!==p?(M=p&&s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",onClick:()=>f(),disabled:n,className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors disabled:opacity-40 disabled:cursor-not-allowed",title:"New chat",children:s.jsx(ne,{size:16,className:"text-muted-foreground"})}),s.jsx("button",{type:"button",onClick:()=>N(!0),className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors",title:"Tasks",children:s.jsx(we,{size:16,className:"text-muted-foreground"})})]}),e[13]=f,e[14]=n,e[15]=p,e[16]=M):M=e[16];let T;e[17]!==n||e[18]!==p||e[19]!==o||e[20]!==r?(T=!n&&!p&&s.jsx("button",{type:"button",onClick:()=>o(et),className:S("flex size-7 items-center justify-center rounded-md border border-input hover:bg-accent transition-colors",r&&"bg-accent"),title:"Toggle context panel",children:s.jsx(ve,{size:14,className:"text-muted-foreground"})}),e[17]=n,e[18]=p,e[19]=o,e[20]=r,e[21]=T):T=e[21];let O;e[22]!==M||e[23]!==T?(O=s.jsxs(H.Header.Right,{className:"gap-1",children:[M,T]}),e[22]=M,e[23]=T,e[24]=O):O=e[24];let D;e[25]!==A||e[26]!==O?(D=s.jsxs(H.Header,{className:"flex-none z-10 bg-background",children:[A,O]}),e[25]=A,e[26]=O,e[27]=D):D=e[27];let P;e[28]!==p||e[29]!==g||e[30]!==x?(P=p&&s.jsx(ae,{open:g,onOpenChange:N,direction:"bottom",children:s.jsx(ce,{className:"h-[90vh] max-h-[90vh]",children:s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(ie,{onTaskSelect:async V=>{await x(V),N(!1)}})})})}),e[28]=p,e[29]=g,e[30]=x,e[31]=P):P=e[31];let R;e[32]!==v||e[33]!==n||e[34]!==k||e[35]!==p||e[36]!==l||e[37]!==m||e[38]!==o||e[39]!==_?(R=n?p?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center px-4",children:s.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(W,{icon:v.icon,name:v.title,size:"md",className:S("transition-opacity duration-200",!m&&"invisible")})}),s.jsx("div",{className:"text-center",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",_,"?"]})})]})}),s.jsxs("div",{className:"shrink-0 flex flex-col items-center w-full gap-3 pb-2",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-2xl mx-auto gap-4 px-4",children:[s.jsx(b.IceBreakers,{className:"w-full"}),l&&s.jsx("div",{className:"flex flex-col items-center w-full",children:s.jsx(Y,{})}),k&&l&&s.jsx("div",{className:"w-full max-w-[500px] mx-auto",children:s.jsx(Z,{onClick:()=>z(!0)})})]}),s.jsx(b.Footer,{children:s.jsx(b.Input,{})})]})]}):s.jsxs("div",{className:"flex-1 flex flex-col items-center px-10",children:[s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(W,{icon:v.icon,name:v.title,size:"md",className:S("transition-opacity duration-200",!m&&"invisible")})}),s.jsx("div",{className:"text-center mb-6",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",_,"?"]})}),s.jsx(b.IceBreakers,{className:"w-full"}),s.jsx("div",{className:"w-full",children:s.jsx(b.Input,{onOpenContextPanel:()=>o(!0)})})]}),l&&s.jsx("div",{className:"w-full max-w-[800px] mt-10 mx-auto",children:s.jsx(Y,{})})]}),k&&l&&s.jsx("div",{className:"w-full max-w-[500px] mx-auto pb-6",children:s.jsx(Z,{onClick:()=>z(!0)})})]}):s.jsxs(s.Fragment,{children:[s.jsx(b.Main,{children:s.jsx(b.Messages,{})}),s.jsx(b.Footer,{children:s.jsx(b.Input,{onOpenContextPanel:()=>o(!0)})})]}),e[32]=v,e[33]=n,e[34]=k,e[35]=p,e[36]=l,e[37]=m,e[38]=o,e[39]=_,e[40]=R):R=e[40];let $;e[41]!==C?($=s.jsx(me,{open:C,onOpenChange:z}),e[41]=C,e[42]=$):$=e[42];let L;return e[43]!==P||e[44]!==R||e[45]!==$||e[46]!==D?(L=s.jsxs(b,{className:"h-full bg-background",children:[D,P,R,$]}),e[43]=P,e[44]=R,e[45]=$,e[46]=D,e[47]=L):L=e[47],L}function et(t){return!t}function tt(){const t=j.c(15),{allModelsConnections:e}=re(),r=F(),[o,a]=w.useState(!1);if(e.length===0){let x;return t[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"flex flex-col h-full bg-background items-center justify-center",children:s.jsx(b.NoLlmBindingEmptyState,{})}),t[0]=x):x=t[0],x}if(r){let x;return t[1]!==o?(x=s.jsx("div",{className:"size-full",children:s.jsx(ee,{showContext:o,setShowContext:a})}),t[1]=o,t[2]=x):x=t[2],x}let l,c;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(G,{defaultSize:20,minSize:10,id:"tasks",order:1,children:s.jsx(ie,{})}),c=s.jsx(K,{className:"bg-border/30"}),t[3]=l,t[4]=c):(l=t[3],c=t[4]);const n=o?50:80;let i;t[5]!==o?(i=s.jsx(ee,{showContext:o,setShowContext:a}),t[5]=o,t[6]=i):i=t[6];let d;t[7]!==n||t[8]!==i?(d=s.jsx(G,{defaultSize:n,minSize:30,id:"main",order:2,children:i}),t[7]=n,t[8]=i,t[9]=d):d=t[9];let m;t[10]!==o?(m=o&&s.jsxs(s.Fragment,{children:[s.jsx(K,{className:"bg-border/30"}),s.jsx(G,{defaultSize:30,minSize:15,id:"context",order:3,children:s.jsx(ue,{onClose:()=>a(!1)})})]}),t[10]=o,t[11]=m):m=t[11];let f;return t[12]!==d||t[13]!==m?(f=s.jsxs(Re,{direction:"horizontal",className:"size-full",children:[l,c,d,m]}),t[12]=d,t[13]=m,t[14]=f):f=t[14],f}function st(t){const e=j.c(14),{error:r,onRetry:o}=t,a=r?.message?.includes("401")||r?.message?.toLowerCase().includes("unauthorized");let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(H.Header,{className:"flex-none",children:[s.jsx(H.Header.Left,{className:"gap-2"}),s.jsx(H.Header.Right,{className:"gap-1"})]}),e[0]=l):l=e[0];let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(Ne,{className:"h-6 w-6 text-destructive"})}),e[1]=c):c=e[1];const n=a?"Unable to load models":"Something went wrong";let i;e[2]!==n?(i=s.jsx("h3",{className:"text-lg font-medium",children:n}),e[2]=n,e[3]=i):i=e[3];const d=a?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":r?.message||"An unexpected error occurred";let m;e[4]!==d?(m=s.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[4]=d,e[5]=m):m=e[5];let f;e[6]!==i||e[7]!==m?(f=s.jsxs("div",{className:"space-y-2",children:[i,m]}),e[6]=i,e[7]=m,e[8]=f):f=e[8];let x;e[9]!==o?(x=s.jsx(te,{variant:"outline",onClick:o,children:"Try again"}),e[9]=o,e[10]=x):x=e[10];let u;return e[11]!==f||e[12]!==x?(u=s.jsxs(b,{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:[c,f,x]})})]}),e[11]=f,e[12]=x,e[13]=u):u=e[13],u}function Ts(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(xe,{fallback:ot,children:s.jsx(w.Suspense,{fallback:s.jsx(b.Skeleton,{}),children:s.jsx(tt,{})})}),t[0]=e):e=t[0],e}function ot(t){const{error:e,resetError:r}=t;return s.jsx(st,{error:e,onRetry:r})}export{Ts as default};
|
package/dist/client/assets/{plugin-empty-state-2Yos5GOU.js → plugin-empty-state-ChNZcRJs.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as s,j as t}from"./index-
|
|
1
|
+
import{d as s,j as t}from"./index-fnzLSheB.js";import{e as r}from"./Dataflow03-Ba3PnLD-.js";function a(){const o=s.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(r,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),o[0]=e):e=o[0],e}export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as S,j as s,r as w}from"./index-
|
|
1
|
+
import{d as S,j as s,r as w}from"./index-fnzLSheB.js";import{i as R}from"./Check-Cj1LnSt2.js";import{t as _}from"./ChevronDown-CHOEDpCq.js";import{e as y}from"./Dataflow03-Ba3PnLD-.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as r,j as i}from"./index-fnzLSheB.js";import{P as m}from"./project-plugins-DWXQnNI_.js";import"./useQuery-D7A6izWp.js";import"./useMutation-CsiTkFgY.js";import"./constants-B5ylLz8P.js";import"./switch-uIQMlKq6.js";import"./label-_1-T_NFE.js";import"./Container-DLm11uCu.js";import"./use-connection-BUxUpG_F.js";import"./use-collections-B0VCcn8e.js";import"./registry-utils-BiwNNrLy.js";import"./workflow-XMMRqOtB.js";import"./collections-nigUfX75.js";import"./use-install-from-registry-BkNDTVYn.js";import"./extract-connection-data-BhDGo06G.js";import"./constants-G9TKH6sR.js";import"./generate-id-Dyweu44Y.js";import"./Loading01-CJFbgK59.js";import"./Plus-CfD-fvi9.js";import"./select-CuLy3REb.js";import"./index-BdQq_4o_.js";import"./index-D3056qAr.js";import"./Check-Cj1LnSt2.js";import"./ChevronDown-CHOEDpCq.js";import"./ChevronUp-B38OwFL_.js";function w(){const o=r.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(m,{}),o[0]=t):t=o[0],t}export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,Z as $,j as c,b5 as L,aa as z,a0 as O,$ as A,a2 as g,b6 as _,a4 as j,b7 as G,b8 as w,b9 as H,ba as K,a5 as Z,bb as U,bc as V,bd as W,be as q,bf as B,bg as J,d as R,y as Q}from"./index-
|
|
1
|
+
import{r as i,Z as $,j as c,b5 as L,aa as z,a0 as O,$ as A,a2 as g,b6 as _,a4 as j,b7 as G,b8 as w,b9 as H,ba as K,a5 as Z,bb as U,bc as V,bd as W,be as q,bf as B,bg as J,d as R,y as Q}from"./index-fnzLSheB.js";var C="Popover",[E]=Z(C,[w]),P=w(),[X,u]=E(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(X,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(_,{...s,...r,ref:e})});Y.displayName=F;var y="PopoverTrigger",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(y,o),s=P(o),a=O(e,n.triggerRef),p=c.jsx(A.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(_,{asChild:!0,...s,children:p})});S.displayName=y;var b="PopoverPortal",[ee,oe]=E(b,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(b,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=b;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(j,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=U("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=O(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return V(),c.jsx(W,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(q,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(B,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...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)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(A.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=S,le=D,de=M;function fe(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 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(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,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Q("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 d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{fe as P,ve as a,ge as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as P,k as A,j as r,E as y,r as R,c as T}from"./index-
|
|
1
|
+
import{d as P,k as A,j as r,E as y,r as R,c as T}from"./index-fnzLSheB.js";import{u as S}from"./use-connection-BUxUpG_F.js";import{u as U}from"./constants-B5ylLz8P.js";import{u as v}from"./use-mcp-tools-CfZSf4F7.js";import{c as E}from"./content-blocks-o63cs2vh.js";import{M as H}from"./mcp-app-renderer-B2FWYfE4.js";import{g as O,M as $}from"./types-BMfsriOE.js";import{u as k}from"./context-DRHBeAGs.js";import{P as _,a as D}from"./index-DWiV_aLY.js";import"./use-collections-B0VCcn8e.js";import"./useMutation-CsiTkFgY.js";import"./useQuery-D7A6izWp.js";import"./use-mcp-resources-BR6sQvU6.js";import"./decopilot-events-Brt4gAR6.js";import"./index-Dqx4k4bH.js";import"./tooltip-hlHlzWhV.js";import"./index-D3056qAr.js";import"./X-De9pN2CV.js";const b={};function w(t){const e=P.c(22),{client:o,resourceURI:m,tool:i,connectionId:d}=t,{sendMessage:a,setAppContext:c,clearAppContext:n}=k(),[,p]=D(),l=`${d}:${i.name}`;let f;e[0]!==o||e[1]!==i.name?(f={client:o,toolName:i.name,toolArguments:b},e[0]=o,e[1]=i.name,e[2]=f):f=e[2];const{data:u}=v(f);let s;e[3]!==a||e[4]!==p?(s=N=>{const M=E(N.content);M.content.length>0&&(p(!0),a(M))},e[3]=a,e[4]=p,e[5]=s):s=e[5];const g=s,I=i;let x;e[6]!==I?(x={tool:I},e[6]=I,e[7]=x):x=e[7];let h;e[8]!==c||e[9]!==l?(h=N=>c(l,N),e[8]=c,e[9]=l,e[10]=h):h=e[10];let j;e[11]!==n||e[12]!==l?(j=()=>n(l),e[11]=n,e[12]=l,e[13]=j):j=e[13];let C;return e[14]!==o||e[15]!==g||e[16]!==m||e[17]!==x||e[18]!==h||e[19]!==j||e[20]!==u?(C=r.jsx(H,{resourceURI:m,toolInfo:x,toolInput:b,toolResult:u,displayMode:"fullscreen",minHeight:$.fullscreen.minHeight,maxHeight:$.fullscreen.maxHeight,client:o,onMessage:g,onUpdateModelContext:h,onTeardown:j,className:"h-full"}),e[14]=o,e[15]=g,e[16]=m,e[17]=x,e[18]=h,e[19]=j,e[20]=u,e[21]=C):C=e[21],C}function L(t){const e=P.c(17),{connectionId:o,toolName:m}=t,{org:i}=T();let d;e[0]!==o||e[1]!==i.id?(d={connectionId:o,orgId:i.id},e[0]=o,e[1]=i.id,e[2]=d):d=e[2];const a=U(d),c=S(o),n=decodeURIComponent(m);let p,l;if(e[3]!==c?.tools||e[4]!==n){let s;e[7]!==n?(s=g=>g.name===n,e[7]=n,e[8]=s):s=e[8],l=(c?.tools??[]).find(s),p=l?._meta?O(l._meta):void 0,e[3]=c?.tools,e[4]=n,e[5]=p,e[6]=l}else p=e[5],l=e[6];const f=p;if(!c){let s;return e[9]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("p",{className:"text-sm text-muted-foreground",children:"Connection not found"})}),e[9]=s):s=e[9],s}if(!l||!f){let s;return e[10]!==n?(s=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',n,'" not found or has no UI']})}),e[10]=n,e[11]=s):s=e[11],s}let u;return e[12]!==a||e[13]!==o||e[14]!==f||e[15]!==l?(u=r.jsx(w,{client:a,resourceURI:f,tool:l,connectionId:o}),e[12]=a,e[13]=o,e[14]=f,e[15]=l,e[16]=u):u=e[16],u}function le(){const t=P.c(9);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/apps/$connectionId/$toolName"},t[0]=e):e=t[0];const{connectionId:o,toolName:m}=A(e);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(_.Header,{}),t[1]=i):i=t[1];const d=`${o}:${m}`;let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[r.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),r.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),t[2]=a):a=t[2];let c;t[3]!==o||t[4]!==m?(c=r.jsx(R.Suspense,{fallback:a,children:r.jsx(L,{connectionId:o,toolName:m})}),t[3]=o,t[4]=m,t[5]=c):c=t[5];let n;return t[6]!==d||t[7]!==c?(n=r.jsxs(_,{children:[i,r.jsx(_.Content,{children:r.jsx(y,{fallback:void 0,children:c},d)})]}),t[6]=d,t[7]=c,t[8]=n):n=t[8],n}export{le as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as w,g as ne,j as s,y as V,r as I,w as oe,o as he,q as W,f as ie,c as re,x as ge,v as je,t as be,K as ae,B as Q,O as D,P as fe,S as le,k as ye,aU as ve}from"./index-fnzLSheB.js";import{u as ue}from"./use-project-_2326oBQ.js";import{c as Se,D as Ne,a as _e}from"./dialog-D7WigTyK.js";import{i as ke}from"./ArrowLeft-CCViWpBS.js";import{i as ce}from"./X-De9pN2CV.js";import{S as G}from"./skeleton-kJ_1M0ks.js";import{u as Ce,a as we,O as Pe}from"./org-ai-providers-BM6HJKuc.js";import{A as pe}from"./avatar-B2cKnsRn.js";import{M as ze,N as $e,t as Ae,O as Ie,P as Oe}from"./integration-icon-3E3I1Ow-.js";import{t as Me}from"./Settings01-CMhz8juF.js";import{i as Fe}from"./Zap-CeI4Bf9r.js";import{a as Le,b as Ee,c as Te,T as De}from"./tooltip-hlHlzWhV.js";import{i as Ue}from"./Check-Cj1LnSt2.js";import{c as qe}from"./Play-CsSGdP4Z.js";import{S as Y}from"./switch-uIQMlKq6.js";import{S as Re,a as Be,d as H,c as Ge}from"./select-CuLy3REb.js";import{i as Ke}from"./Type01-UhdL8ksX.js";import{a as Ve}from"./RefreshCcw01-Cja044eH.js";import"./index-Dqx4k4bH.js";import{u as Qe}from"./useMutation-CsiTkFgY.js";import{a as Je,F as X,b as Z,c as ee,d as te,f as se,e as We}from"./form-DXxHt_ci.js";import{I as me}from"./input-CBI5HJST.js";import{L as Ye}from"./logo-upload-mdUsABL8.js";import{P as He}from"./project-plugins-DWXQnNI_.js";import Xe from"./members-ayS36sMo.js";import"./useQuery-D7A6izWp.js";import"./constants-B5ylLz8P.js";import"./index-DWiV_aLY.js";import"./AlertCircle-Cbtm5L98.js";import"./XCircle-wueTdlAa.js";import"./Trash01-Cl6ql_TT.js";import"./card-DP3El98a.js";import"./toggle-group-vE44W8pW.js";import"./popover-DoT6XNod.js";import"./ai-providers-logos-BditdJqa.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./User01-BgxUQ8sC.js";import"./Container-DLm11uCu.js";import"./ArrowUp-PknJL_3i.js";import"./ChevronDown-CHOEDpCq.js";import"./ChevronRight-DY2lrGOn.js";import"./ChevronUp-B38OwFL_.js";import"./Dataflow03-Ba3PnLD-.js";import"./FolderClosed-rrRpN158.js";import"./Loading01-CJFbgK59.js";import"./Plus-CfD-fvi9.js";import"./SearchMd-B4W5fcyf.js";import"./Upload01-DX94fj05.js";import"./XClose-CZL78D4W.js";import"./index-D3056qAr.js";import"./index-BdQq_4o_.js";import"./label-_1-T_NFE.js";import"./use-connection-BUxUpG_F.js";import"./use-collections-B0VCcn8e.js";import"./registry-utils-BiwNNrLy.js";import"./workflow-XMMRqOtB.js";import"./collections-nigUfX75.js";import"./use-install-from-registry-BkNDTVYn.js";import"./extract-connection-data-BhDGo06G.js";import"./constants-G9TKH6sR.js";import"./generate-id-Dyweu44Y.js";import"./collection-display-button-CCE6Hf4p.js";import"./dropdown-menu-PjKkpqts.js";import"./badge-BHawtHqt.js";import"./collection-search-DQX16wbn.js";import"./breadcrumb-D8w6T3TH.js";import"./collection-table-wrapper-Csa2FMUQ.js";import"./table-BTOlVJn3.js";import"./checkbox-B17TL9Yy.js";import"./use-members-DgXFii4e.js";import"./alert-dialog-BTHm3OB6.js";import"./empty-state-D14a0Zxq.js";import"./textarea-rEHudfyV.js";import"./command-CEWGR7a5.js";import"./index-BBdUsNQs.js";function Ze(e){const t=w.c(26),{activeSection:n,onNavigate:o}=e,{data:a}=ne.useSession(),r=a?.user,l=r?.image,c=r?.name??"Profile",m=r?.name??"U";let f;t[0]!==m||t[1]!==l?(f=s.jsx(pe,{url:l,fallback:m,shape:"circle",size:"2xs",className:"size-4 shrink-0"}),t[0]=m,t[1]=l,t[2]=f):f=t[2];let i;t[3]!==c||t[4]!==f?(i={key:"account.profile",label:c,icon:f},t[3]=c,t[4]=f,t[5]=i):i=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p={key:"account.preferences",label:"Preferences",icon:s.jsx(Me,{size:14})},t[6]=p):p=t[6];let x;t[7]!==i?(x=[i,p],t[7]=i,t[8]=x):x=t[8];const g=x;let u;t[9]===Symbol.for("react.memo_cache_sentinel")?(u={key:"org.general",label:"General",icon:s.jsx(ze,{size:14})},t[9]=u):u=t[9];let d;t[10]===Symbol.for("react.memo_cache_sentinel")?(d={key:"org.plugins",label:"Features",icon:s.jsx(Fe,{size:14})},t[10]=d):d=t[10];let j;t[11]===Symbol.for("react.memo_cache_sentinel")?(j={key:"org.ai-providers",label:"AI Providers",icon:s.jsx($e,{size:14})},t[11]=j):j=t[11];let h;t[12]===Symbol.for("react.memo_cache_sentinel")?(h=[u,d,j,{key:"org.members",label:"Members",icon:s.jsx(Ae,{size:14})}],t[12]=h):h=t[12];const _=h;let b;t[13]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Account"}),t[13]=b):b=t[13];let y;t[14]!==g||t[15]!==n||t[16]!==o?(y=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[b,g.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:V("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===v.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:v.icon}),s.jsx("span",{className:"truncate",children:v.label})]},v.key))]}),t[14]=g,t[15]=n,t[16]=o,t[17]=y):y=t[17];let N;t[18]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Organization"}),t[18]=N):N=t[18];let S;t[19]!==n||t[20]!==o?(S=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[N,_.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:V("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===v.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:v.icon}),s.jsx("span",{className:"truncate",children:v.label})]},v.key))]}),t[19]=n,t[20]=o,t[21]=S):S=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","2.186.10"]})}),t[22]=C):C=t[22];let k;return t[23]!==y||t[24]!==S?(k=s.jsxs("div",{className:"w-full sm:w-52 shrink-0 sm:border-r border-border bg-sidebar/50 overflow-y-auto py-3 flex flex-col gap-4 flex-1",children:[y,S,C]}),t[23]=y,t[24]=S,t[25]=k):k=t[25],k}function et(){const e=w.c(32),{data:t}=ne.useSession(),[n,o]=I.useState(!1),a=t?.user,r=a?.image;let l;e[0]!==a?(l=()=>{a?.id&&navigator.clipboard.writeText(a.id).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)})},e[0]=a,e[1]=l):l=e[1];const c=l;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Profile"})}),e[2]=m):m=e[2];const f=a?.name??"U";let i;e[3]!==f||e[4]!==r?(i=s.jsx(pe,{url:r,fallback:f,shape:"circle",size:"xl",className:"size-16 shrink-0"}),e[3]=f,e[4]=r,e[5]=i):i=e[5];const p=a?.name??"User";let x;e[6]!==p?(x=s.jsx("span",{className:"text-sm font-semibold text-foreground truncate",children:p}),e[6]=p,e[7]=x):x=e[7];const g=a?.email;let u;e[8]!==g?(u=s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:g}),e[8]=g,e[9]=u):u=e[9];let d;e[10]!==x||e[11]!==u?(d=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[x,u]}),e[10]=x,e[11]=u,e[12]=d):d=e[12];let j;e[13]!==i||e[14]!==d?(j=s.jsxs("div",{className:"flex items-center gap-4",children:[i,d]}),e[13]=i,e[14]=d,e[15]=j):j=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"User ID"}),e[16]=h):h=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("p",{className:"text-sm text-muted-foreground",children:"User ID"}),e[17]=_):_=e[17];const b=a?.id;let y;e[18]!==b?(y=s.jsx("span",{className:"font-mono text-sm",children:b}),e[18]=b,e[19]=y):y=e[19];let N;e[20]!==n?(N=n?s.jsx(Ue,{size:14,className:"text-green-600 shrink-0"}):s.jsx(qe,{size:14,className:"shrink-0 opacity-70 group-hover:opacity-100 transition-opacity"}),e[20]=n,e[21]=N):N=e[21];let S;e[22]!==c||e[23]!==y||e[24]!==N?(S=s.jsx(Le,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:c,className:"group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[y,N]})}),e[22]=c,e[23]=y,e[24]=N,e[25]=S):S=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Ee,{side:"left",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[26]=C):C=e[26];let k;e[27]!==S?(k=s.jsxs("div",{className:"flex flex-col",children:[h,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[_,s.jsx(Te,{children:s.jsxs(De,{children:[S,C]})})]})]}),e[27]=S,e[28]=k):k=e[28];let v;return e[29]!==k||e[30]!==j?(v=s.jsxs("div",{className:"flex flex-col gap-8",children:[m,j,k]}),e[29]=k,e[30]=j,e[31]=v):v=e[31],v}function K(e){const t=w.c(27),{icon:n,label:o,description:a,control:r,onClick:l,disabled:c}=e,m=c?void 0:l,f=l?"button":void 0,i=l&&!c?0:void 0;let p;t[0]!==c||t[1]!==l?(p=l&&!c?N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),l())}:void 0,t[0]=c,t[1]=l,t[2]=p):p=t[2];const x=l&&!c?"pointer":void 0;let g;t[3]!==x?(g={cursor:x},t[3]=x,t[4]=g):g=t[4];let u;t[5]!==n?(u=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:n}),t[5]=n,t[6]=u):u=t[6];let d;t[7]!==o?(d=s.jsx("p",{className:"text-sm font-medium text-foreground",children:o}),t[7]=o,t[8]=d):d=t[8];let j;t[9]!==a?(j=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:a}),t[9]=a,t[10]=j):j=t[10];let h;t[11]!==d||t[12]!==j?(h=s.jsxs("div",{className:"min-w-0",children:[d,j]}),t[11]=d,t[12]=j,t[13]=h):h=t[13];let _;t[14]!==h||t[15]!==u?(_=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[u,h]}),t[14]=h,t[15]=u,t[16]=_):_=t[16];let b;t[17]!==r?(b=s.jsx("div",{onClick:tt,className:"shrink-0",children:r}),t[17]=r,t[18]=b):b=t[18];let y;return t[19]!==m||t[20]!==_||t[21]!==b||t[22]!==f||t[23]!==i||t[24]!==p||t[25]!==g?(y=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0",onClick:m,role:f,tabIndex:i,onKeyDown:p,style:g,children:[_,b]}),t[19]=m,t[20]=_,t[21]=b,t[22]=f,t[23]=i,t[24]=p,t[25]=g,t[26]=y):y=t[26],y}function tt(e){return e.stopPropagation()}function de(){const e=w.c(47),[t,n]=Ce();let o;e[0]!==n?(o=async P=>{if(P&&await Notification.requestPermission()!=="granted"){oe.error("Notifications denied. Please enable them in your browser settings."),n(lt);return}n(z=>({...z,enableNotifications:P}))},e[0]=n,e[1]=o):o=e[1];const a=o;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Preferences"})}),e[2]=r):r=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ke,{size:16}),e[3]=l):l=e[3];let c;e[4]!==n?(c=()=>n(ot),e[4]=n,e[5]=c):c=e[5];let m;e[6]!==n?(m=P=>n(z=>({...z,devMode:P})),e[6]=n,e[7]=m):m=e[7];let f;e[8]!==t.devMode||e[9]!==m?(f=s.jsx(Y,{checked:t.devMode,onCheckedChange:m}),e[8]=t.devMode,e[9]=m,e[10]=f):f=e[10];let i;e[11]!==c||e[12]!==f?(i=s.jsx(K,{icon:l,label:"Developer Mode",description:"Show technical details like JSON input/output for tool calls.",onClick:c,control:f}),e[11]=c,e[12]=f,e[13]=i):i=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ie,{size:16}),e[14]=p):p=e[14];let x;e[15]!==a||e[16]!==t.enableNotifications?(x=s.jsx(K,{icon:p,label:"Notifications",description:"Play a sound and show a notification when chat messages complete while the app is unfocused.",disabled:typeof Notification>"u",onClick:()=>a(!t.enableNotifications),control:s.jsx(Y,{disabled:typeof Notification>"u",checked:t.enableNotifications,onCheckedChange:a})}),e[15]=a,e[16]=t.enableNotifications,e[17]=x):x=e[17];let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Ve,{size:16}),e[18]=g):g=e[18];let u;e[19]!==n?(u=()=>n(st),e[19]=n,e[20]=u):u=e[20];let d;e[21]!==n?(d=P=>n(z=>({...z,experimentalAutomations:P})),e[21]=n,e[22]=d):d=e[22];let j;e[23]!==t.experimentalAutomations||e[24]!==d?(j=s.jsx(Y,{checked:t.experimentalAutomations,onCheckedChange:d}),e[23]=t.experimentalAutomations,e[24]=d,e[25]=j):j=e[25];let h;e[26]!==u||e[27]!==j?(h=s.jsx(K,{icon:g,label:"Experimental: Automations",description:"Enable the Automations feature in the sidebar. This is an experimental feature under active development.",onClick:u,control:j}),e[26]=u,e[27]=j,e[28]=h):h=e[28];let _;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Oe,{size:16}),e[29]=_):_=e[29];let b;e[30]!==n?(b=P=>n(z=>({...z,toolApprovalLevel:P})),e[30]=n,e[31]=b):b=e[31];let y;e[32]===Symbol.for("react.memo_cache_sentinel")?(y={readonly:"Skip read-only",auto:"Auto-approve all",plan:"Plan mode"},e[32]=y):y=e[32];const N=y[t.toolApprovalLevel];let S;e[33]!==N?(S=s.jsx(Be,{className:"w-36",children:s.jsx("span",{children:N})}),e[33]=N,e[34]=S):S=e[34];let C;e[35]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(H,{value:"readonly",textValue:"Skip read-only",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Skip read-only"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools, ask for others"})]})}),e[35]=C):C=e[35];let k;e[36]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(H,{value:"auto",textValue:"Auto-approve all",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Auto-approve all"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all tools without approval"})]})}),e[36]=k):k=e[36];let v;e[37]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs(Ge,{children:[C,k,s.jsx(H,{value:"plan",textValue:"Plan mode",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Plan mode"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Read-only exploration, then propose a plan"})]})})]}),e[37]=v):v=e[37];let A;e[38]!==t.toolApprovalLevel||e[39]!==b||e[40]!==S?(A=s.jsx(K,{icon:_,label:"Tool Approval",description:"Choose when to require approval before tools execute.",control:s.jsxs(Re,{value:t.toolApprovalLevel,onValueChange:b,children:[S,v]})}),e[38]=t.toolApprovalLevel,e[39]=b,e[40]=S,e[41]=A):A=e[41];let $;return e[42]!==h||e[43]!==A||e[44]!==i||e[45]!==x?($=s.jsxs("div",{className:"flex flex-col gap-6",children:[r,s.jsxs("div",{className:"flex flex-col",children:[i,x,h,A]})]}),e[42]=h,e[43]=A,e[44]=i,e[45]=x,e[46]=$):$=e[46],$}function st(e){return{...e,experimentalAutomations:!e.experimentalAutomations}}function ot(e){return{...e,devMode:!e.devMode}}function lt(e){return{...e,enableNotifications:!1}}const nt=he({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:W().optional()});function it(){const e=ie(),{org:t,project:n}=re(),o=ge(),[a,r]=I.useState(!1),l=je({resolver:be(nt),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),c=Qe({mutationFn:async i=>{const p={name:i.name,slug:i.slug};i.logo&&(p.logo=i.logo);const x=await ne.organization.update({organizationId:t.id,data:p});if(x?.error)throw new Error(x.error.message||"Failed to update organization");return x},onSuccess:i=>{o.invalidateQueries({queryKey:ae.organizations()}),o.invalidateQueries({queryKey:ae.activeOrganization(t.slug)}),oe.success("Organization settings updated successfully"),i?.data?.slug&&i.data.slug!==t.slug&&e({to:"/$org/$project/settings",params:{org:i.data.slug,project:n.slug}})},onError:i=>{oe.error(i instanceof Error?i.message:"Failed to update organization")},onSettled:()=>{r(!1)}}),m=i=>{r(!0),c.mutate(i)},f=l.formState.isDirty;return s.jsx(Je,{...l,children:s.jsxs("form",{onSubmit:l.handleSubmit(m),className:"space-y-6",children:[s.jsx(X,{control:l.control,name:"name",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Organization Name"}),s.jsx(te,{children:s.jsx(me,{placeholder:"My Organization",...i,disabled:a})}),s.jsx(se,{})]})}),s.jsx(X,{control:l.control,name:"slug",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Organization Slug"}),s.jsx(te,{children:s.jsx(me,{placeholder:"my-organization",...i,disabled:a,onChange:p=>{const x=p.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");i.onChange(x)}})}),s.jsx(We,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(se,{})]})}),s.jsx(X,{control:l.control,name:"logo",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Logo"}),s.jsx(te,{children:s.jsx(Ye,{value:i.value,onChange:i.onChange,name:l.watch("name"),disabled:a})}),s.jsx(se,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(Q,{type:"submit",disabled:!f||a,className:"min-w-24",children:a?"Saving...":"Save Changes"}),f&&s.jsx(Q,{type:"button",variant:"outline",onClick:()=>l.reset(),disabled:a,children:"Cancel"})]})]})})}function rt(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Organization"})}),s.jsx(it,{})]}),e[0]=t):t=e[0],t}function at(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Xe,{}),e[0]=t):t=e[0],t}function xe(){const e=w.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(G,{className:"h-6 w-48"}),n=s.jsx(G,{className:"h-4 w-80"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[t,n,s.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[s.jsx(G,{className:"h-12 w-full"}),s.jsx(G,{className:"h-12 w-full"})]})]}),e[2]=o):o=e[2],o}function ct(e){const t=w.c(14),{projectSlug:n,children:o}=e,{org:a}=re(),{data:r,isLoading:l}=ue(a.id,n);if(l||!r){let p;return t[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xe,{}),t[0]=p):p=t[0],p}const c=n===D;let m;t[1]!==r.description||t[2]!==r.enabledPlugins||t[3]!==r.id||t[4]!==r.name||t[5]!==r.organizationId||t[6]!==r.slug||t[7]!==r.ui||t[8]!==c?(m={id:r.id,organizationId:r.organizationId,slug:r.slug,name:r.name,description:r.description,enabledPlugins:r.enabledPlugins,ui:r.ui,isOrgAdmin:c},t[1]=r.description,t[2]=r.enabledPlugins,t[3]=r.id,t[4]=r.name,t[5]=r.organizationId,t[6]=r.slug,t[7]=r.ui,t[8]=c,t[9]=m):m=t[9];const f=m;let i;return t[10]!==o||t[11]!==f||t[12]!==a?(i=s.jsx(fe,{org:a,project:f,children:o}),t[10]=o,t[11]=f,t[12]=a,t[13]=i):i=t[13],i}function mt(e){const t=w.c(7),{section:n}=e;switch(n){case"account.profile":{let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(et,{}),t[0]=o):o=t[0],o}case"account.preferences":{let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(de,{}),t[1]=o):o=t[1],o}case"org.general":{let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(rt,{}),t[2]=o):o=t[2],o}case"org.plugins":{let o;return t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ct,{projectSlug:D,children:s.jsx(He,{})}),t[3]=o):o=t[3],o}case"org.ai-providers":{let o;return t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Pe,{}),t[4]=o):o=t[4],o}case"org.members":{let o;return t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(at,{}),t[5]=o):o=t[5],o}default:{let o;return t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(de,{}),t[6]=o):o=t[6],o}}}const dt={"account.profile":"Profile","account.preferences":"Preferences","org.general":"General","org.plugins":"Features","org.ai-providers":"AI Providers","org.billing":"Billing","org.members":"Members"};function ft(){const e=w.c(49),{isOpen:t,activeSection:n,open:o,close:a}=we(),[r,l]=I.useState(!1),[c,m]=I.useState(t);c!==t&&(m(t),l(t));let f;e[0]!==o?(f=J=>{o(J),l(!0)},e[0]=o,e[1]=f):f=e[1];const i=f;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{l(!1)},e[2]=p):p=e[2];const x=p;let g;e[3]!==a?(g=J=>{J||(a(),l(!1))},e[3]=a,e[4]=g):g=e[4];const u=g;let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Se,{className:"sr-only",children:"Settings"}),e[5]=d):d=e[5];const j=r?"hidden":"flex";let h;e[6]!==j?(h=V(j,"sm:flex flex-col w-full sm:w-auto"),e[6]=j,e[7]=h):h=e[7];let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("span",{className:"text-base font-semibold",children:"Settings"}),e[8]=_):_=e[8];let b;e[9]!==u?(b=()=>u(!1),e[9]=u,e[10]=b):b=e[10];let y,N;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ce,{size:16}),N=s.jsx("span",{className:"sr-only",children:"Close"}),e[11]=y,e[12]=N):(y=e[11],N=e[12]);let S;e[13]!==b?(S=s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border sm:hidden",children:[_,s.jsxs("button",{type:"button",onClick:b,className:"rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity",children:[y,N]})]}),e[13]=b,e[14]=S):S=e[14];let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"w-full sm:w-52 shrink-0 border-r border-border"}),e[15]=C):C=e[15];let k;e[16]!==n||e[17]!==i?(k=s.jsx(I.Suspense,{fallback:C,children:s.jsx(Ze,{activeSection:n,onNavigate:i})}),e[16]=n,e[17]=i,e[18]=k):k=e[18];let v;e[19]!==S||e[20]!==k||e[21]!==h?(v=s.jsxs("div",{className:h,children:[S,k]}),e[19]=S,e[20]=k,e[21]=h,e[22]=v):v=e[22];const A=r?"flex":"hidden";let $;e[23]!==A?($=V(A,"sm:flex flex-1 min-w-0 overflow-y-auto relative flex-col overflow-hidden"),e[23]=A,e[24]=$):$=e[24];let P;e[25]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs("button",{type:"button",onClick:x,className:"rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity",children:[s.jsx(ke,{size:16}),s.jsx("span",{className:"sr-only",children:"Back"})]}),e[25]=P):P=e[25];const z=dt[n];let O;e[26]!==z?(O=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-border sm:hidden",children:[P,s.jsx("span",{className:"text-base font-semibold",children:z})]}),e[26]=z,e[27]=O):O=e[27];let M;e[28]!==u?(M=()=>u(!1),e[28]=u,e[29]=M):M=e[29];let U,q;e[30]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(ce,{size:16}),q=s.jsx("span",{className:"sr-only",children:"Close"}),e[30]=U,e[31]=q):(U=e[30],q=e[31]);let F;e[32]!==M?(F=s.jsxs("button",{type:"button",onClick:M,className:"hidden sm:block absolute top-4 right-4 z-10 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-ring",children:[U,q]}),e[32]=M,e[33]=F):F=e[33];let R;e[34]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(xe,{}),e[34]=R):R=e[34];let L;e[35]!==n?(L=s.jsx("div",{className:"p-5 sm:p-8 flex-1 overflow-y-auto",children:s.jsx(I.Suspense,{fallback:R,children:s.jsx(mt,{section:n})})}),e[35]=n,e[36]=L):L=e[36];let E;e[37]!==$||e[38]!==O||e[39]!==F||e[40]!==L?(E=s.jsxs("div",{className:$,children:[O,F,L]}),e[37]=$,e[38]=O,e[39]=F,e[40]=L,e[41]=E):E=e[41];let T;e[42]!==v||e[43]!==E?(T=s.jsxs(Ne,{className:"sm:max-w-[1100px] h-[100dvh] sm:h-[85vh] max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-[1100px] rounded-none sm:rounded-xl p-0 overflow-hidden flex flex-col gap-0 border-0 sm:border",closeButtonClassName:"hidden",children:[d,s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[v,E]})]}),e[42]=v,e[43]=E,e[44]=T):T=e[44];let B;return e[45]!==u||e[46]!==t||e[47]!==T?(B=s.jsx(_e,{open:t,onOpenChange:u,children:T}),e[45]=u,e[46]=t,e[47]=T,e[48]=B):B=e[48],B}function ut(e){const t=w.c(12),{projectSlug:n,orgSlug:o,error:a}=e,r=ie();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("h1",{className:"text-xl font-semibold",children:"Failed to load project"}),t[0]=l):l=t[0];let c;t[1]!==n?(c=s.jsxs("p",{className:"text-muted-foreground text-center",children:['There was an error loading the project "',n,'".']}),t[1]=n,t[2]=c):c=t[2];let m;t[3]!==a.message?(m=s.jsx("p",{className:"text-sm text-muted-foreground",children:a.message}),t[3]=a.message,t[4]=m):m=t[4];let f;t[5]!==r||t[6]!==o?(f=s.jsx(Q,{variant:"link",onClick:()=>r({to:"/$org/$project",params:{org:o,project:D}}),children:"Go to organization home"}),t[5]=r,t[6]=o,t[7]=f):f=t[7];let i;return t[8]!==c||t[9]!==m||t[10]!==f?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[l,c,m,f]}),t[8]=c,t[9]=m,t[10]=f,t[11]=i):i=t[11],i}function pt(e){const t=w.c(9),{projectSlug:n,orgSlug:o}=e,a=ie();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 l;t[1]!==n?(l=s.jsxs("p",{className:"text-muted-foreground text-center",children:['The project "',n,'" does not exist in this organization.']}),t[1]=n,t[2]=l):l=t[2];let c;t[3]!==a||t[4]!==o?(c=s.jsx(Q,{variant:"link",onClick:()=>a({to:"/$org/$project",params:{org:o,project:D}}),children:"Go to organization home"}),t[3]=a,t[4]=o,t[5]=c):c=t[5];let m;return t[6]!==l||t[7]!==c?(m=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[r,l,c]}),t[6]=l,t[7]=c,t[8]=m):m=t[8],m}function xt(){const e=w.c(23);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=ye(t),{org:o}=re(),a=n.org,r=n.project,{data:l,isLoading:c,error:m}=ue(o.id,r);if(c){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(le,{}),e[1]=d):d=e[1],d}if(m){let d;return e[2]!==m||e[3]!==a||e[4]!==r?(d=s.jsx(ut,{projectSlug:r,orgSlug:a,error:m}),e[2]=m,e[3]=a,e[4]=r,e[5]=d):d=e[5],d}if(!l){let d;return e[6]!==a||e[7]!==r?(d=s.jsx(pt,{projectSlug:r,orgSlug:a}),e[6]=a,e[7]=r,e[8]=d):d=e[8],d}const f=l.slug===D;let i;e[9]!==l.description||e[10]!==l.enabledPlugins||e[11]!==l.id||e[12]!==l.name||e[13]!==l.organizationId||e[14]!==l.slug||e[15]!==l.ui||e[16]!==f?(i={id:l.id,organizationId:l.organizationId,slug:l.slug,name:l.name,description:l.description,enabledPlugins:l.enabledPlugins,ui:l.ui,isOrgAdmin:f},e[9]=l.description,e[10]=l.enabledPlugins,e[11]=l.id,e[12]=l.name,e[13]=l.organizationId,e[14]=l.slug,e[15]=l.ui,e[16]=f,e[17]=i):i=e[17];const p=i;let x,g;e[18]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(I.Suspense,{fallback:s.jsx(le,{}),children:s.jsx(ve,{})}),g=s.jsx(ft,{}),e[18]=x,e[19]=g):(x=e[18],g=e[19]);let u;return e[20]!==p||e[21]!==o?(u=s.jsxs(fe,{org:o,project:p,children:[x,g]}),e[20]=p,e[21]=o,e[22]=u):u=e[22],u}function Ts(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(I.Suspense,{fallback:s.jsx(le,{}),children:s.jsx(xt,{})}),e[0]=t):t=e[0],t}export{Ts as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as _,j as n,y as J,B as G,c as V,x as W,w as M,K as q,bn as D,bo as $,d as Q}from"./index-
|
|
1
|
+
import{r as _,j as n,y as J,B as G,c as V,x as W,w as M,K as q,bn as D,bo as $,d as Q}from"./index-fnzLSheB.js";import{u as Y}from"./useQuery-D7A6izWp.js";import{u as H}from"./useMutation-CsiTkFgY.js";import{u as X,a as Z}from"./constants-B5ylLz8P.js";import{S as ee}from"./switch-uIQMlKq6.js";import{L as te}from"./label-_1-T_NFE.js";import{n as ne}from"./Container-DLm11uCu.js";import{b as se}from"./use-connection-BUxUpG_F.js";import{d as ie,h as re}from"./registry-utils-BiwNNrLy.js";import{u as oe}from"./use-install-from-registry-BkNDTVYn.js";import{i as le}from"./Loading01-CJFbgK59.js";import{s as ae}from"./Plus-CfD-fvi9.js";import{S as ce,a as de,b as ue,c as me,d as z}from"./select-CuLy3REb.js";function ge({value:o,onValueChange:e,placeholder:r="Select a connection...",binding:l,bindingType:a,onAddNew:y,className:x,disabled:h=!1}){const[j,d]=_.useState(!1),{installByBinding:N,isInstalling:S}=oe(),b=j||S,u=se(),w=ie({connections:u,binding:typeof l=="string"?l:void 0}),C=!l||!u?u??[]:typeof l=="string"?w:Array.isArray(l)&&l.length>0?u.filter(t=>re(t,l)):u,m=(()=>{if(!a?.startsWith("@"))return null;const[t,s]=a.replace("@","").split("/");return t&&s?{scope:t,appName:s}:null})(),P=(()=>{let t=C;const s=Array.isArray(l)&&l.length>0;if(m&&!s&&(t=t.filter(i=>{const c=i.app_name,p=i.metadata?.scopeName;return c===m.appName&&p===m.scope})),o&&!t.some(i=>i.id===o)){const i=u?.find(c=>c.id===o);if(i)return[i,...t]}return t})(),v=a?.startsWith("@"),A=async()=>{if(v&&a){d(!0);try{const t=await N(a);t&&e(t.id)}finally{d(!1)}return}y?.()},g=P.find(t=>t.id===o);return n.jsxs(ce,{value:o??"none",onValueChange:t=>e(t==="none"?null:t),disabled:h,children:[n.jsx(de,{size:"sm",className:J("w-[200px]",x),children:n.jsx(ue,{placeholder:r,children:g?n.jsxs("div",{className:"flex items-center gap-2",children:[g.icon?n.jsx("img",{src:g.icon,alt:g.title,className:"w-4 h-4 rounded shrink-0"}):n.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:g.title.slice(0,1).toUpperCase()}),n.jsx("span",{className:"truncate",children:g.title})]}):r})}),n.jsxs(me,{children:[n.jsx(z,{value:"none",children:"No connection"}),P.length===0?n.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No compatible connections found"}):P.map(t=>n.jsx(z,{value:t.id,children:n.jsxs("div",{className:"flex items-center gap-2",children:[t.icon?n.jsx("img",{src:t.icon,alt:t.title,className:"w-4 h-4 rounded"}):n.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:t.title.slice(0,1).toUpperCase()}),n.jsx("span",{children:t.title})]})},t.id)),(y||v)&&n.jsx("div",{className:"border-t border-border",children:n.jsx(G,{onPointerDown:t=>t.stopPropagation(),onClick:t=>{t.preventDefault(),t.stopPropagation(),A()},disabled:b||h,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:b?n.jsxs(n.Fragment,{children:[n.jsx(le,{size:16,className:"animate-spin"}),n.jsx("span",{children:"Connecting..."})]}):n.jsxs(n.Fragment,{children:[n.jsx(ae,{size:16}),n.jsx("span",{children:"Add Connection"})]})})})]})]})}const pe=o=>{if(!o||typeof o!="object")return!1;const e=o;return e.type==="text"&&typeof e.text=="string"&&e.text.trim().toLowerCase().startsWith("error")},K=o=>{const e=o.structuredContent??o,r=e&&typeof e=="object"?e:null,l=r?.content?.[0]?.text&&typeof r.content[0].text=="string"?r.content[0].text:null;if(r?.isError)throw new Error(l??"Tool call failed");if(pe(e))throw new Error(e.text);return e};function fe(o){return o.requiresMcpBinding===!0?!0:o.binding!==void 0}function xe(o){const e=Q.c(57),{plugin:r,isEnabled:l,isSaving:a,pendingBinding:y,description:x,label:h,icon:j,projectId:d,client:N,onBindingChange:S,onToggle:b}=o;let u;e[0]!==r?(u=fe(r),e[0]=r,e[1]=u):u=e[1];const w=u;let C;e[2]!==r.id||e[3]!==d?(C=q.projectPluginConfig(d??"",r.id),e[2]=r.id,e[3]=d,e[4]=C):C=e[4];let m;e[5]!==N||e[6]!==r.id||e[7]!==d?(m=async()=>{if(!d)throw new Error("Project ID is required to load plugin config.");const O=await N.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:d,pluginId:r.id}});return K(O)},e[5]=N,e[6]=r.id,e[7]=d,e[8]=m):m=e[8];const P=!!d&&w;let v;e[9]!==C||e[10]!==m||e[11]!==P?(v={queryKey:C,queryFn:m,enabled:P},e[9]=C,e[10]=m,e[11]=P,e[12]=v):v=e[12];const{data:A,isLoading:g}=Y(v),t=A?.config?.connectionId??null,s=y!==void 0?y:t;let i;e[13]!==l||e[14]!==a||e[15]!==b||e[16]!==r.id?(i=()=>!a&&b(r.id,!l),e[13]=l,e[14]=a,e[15]=b,e[16]=r.id,e[17]=i):i=e[17];const c=a?void 0:"pointer";let p;e[18]!==c?(p={cursor:c},e[18]=c,e[19]=p):p=e[19];let f;e[20]!==j?(f=j&&n.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0 [&>svg]:size-4",children:j}),e[20]=j,e[21]=f):f=e[21];let I;e[22]!==h?(I=n.jsx("p",{className:"text-sm font-medium text-foreground",children:h}),e[22]=h,e[23]=I):I=e[23];let E;e[24]!==x?(E=x&&n.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:x}),e[24]=x,e[25]=E):E=e[25];let B;e[26]!==I||e[27]!==E?(B=n.jsxs("div",{className:"min-w-0",children:[I,E]}),e[26]=I,e[27]=E,e[28]=B):B=e[28];let k;e[29]!==B||e[30]!==f?(k=n.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[f,B]}),e[29]=B,e[30]=f,e[31]=k):k=e[31];let T;e[32]!==b||e[33]!==r.id?(T=O=>b(r.id,O),e[32]=b,e[33]=r.id,e[34]=T):T=e[34];let F;e[35]!==l||e[36]!==a||e[37]!==T?(F=n.jsx("div",{onClick:je,className:"shrink-0",children:n.jsx(ee,{checked:l,onCheckedChange:T,disabled:a})}),e[35]=l,e[36]=a,e[37]=T,e[38]=F):F=e[38];let L;e[39]!==k||e[40]!==F?(L=n.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[k,F]}),e[39]=k,e[40]=F,e[41]=L):L=e[41];let U;e[42]!==g||e[43]!==l||e[44]!==a||e[45]!==w||e[46]!==S||e[47]!==r.binding||e[48]!==r.id||e[49]!==s||e[50]!==t?(U=l&&w&&n.jsx("div",{className:"pb-4 pl-7 space-y-2",onClick:he,children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(te,{className:"text-xs text-muted-foreground w-24",children:"Connection"}),n.jsx(ge,{value:s??null,onValueChange:O=>S(r.id,O,t),binding:r.binding,placeholder:"Select connection...",className:"w-56",disabled:a||g})]})}),e[42]=g,e[43]=l,e[44]=a,e[45]=w,e[46]=S,e[47]=r.binding,e[48]=r.id,e[49]=s,e[50]=t,e[51]=U):U=e[51];let R;return e[52]!==L||e[53]!==U||e[54]!==i||e[55]!==p?(R=n.jsxs("div",{className:"flex flex-col border-b border-border last:border-0",onClick:i,style:p,children:[L,U]}),e[52]=L,e[53]=U,e[54]=i,e[55]=p,e[56]=R):R=e[56],R}function he(o){return o.stopPropagation()}function je(o){return o.stopPropagation()}function be(){const{org:o,project:e}=V(),r=W(),l=X({connectionId:Z,orgId:o.id}),[a,y]=_.useState({}),[x,h]=_.useState({}),[j,d]=_.useState(!1),N=e.enabledPlugins??[],S=t=>{const s=a[t];return s!==void 0?s:N.includes(t)},b=()=>{const t=new Set(N);for(const[s,i]of Object.entries(a))i?t.add(s):t.delete(s);return Array.from(t)},u=Object.keys(a).length>0||Object.keys(x).length>0,w=(t,s)=>{const i=N.includes(t);y(s===i?c=>{const{[t]:p,...f}=c;return f}:c=>({...c,[t]:s}))},C=(t,s,i)=>{if(s===i){h(c=>{const{[t]:p,...f}=c;return f});return}h(c=>({...c,[t]:s}))},m=H({mutationFn:async t=>{const s=[];if(t.updatePlugins){const i=await l.callTool({name:"PROJECT_UPDATE",arguments:{projectId:e.id,enabledPlugins:t.enabledPlugins}});s.push(K(i))}if(t.bindingUpdates.length>0){const i=await Promise.all(t.bindingUpdates.map(async({pluginId:c,connectionId:p,settings:f})=>{const I=await l.callTool({name:"PROJECT_PLUGIN_CONFIG_UPDATE",arguments:{projectId:e.id,pluginId:c,connectionId:p,settings:f}});return K(I)}));s.push(...i)}return s},onSuccess:(t,s)=>{s.updatePlugins&&(r.invalidateQueries({queryKey:q.project(o.id,e.slug)}),r.invalidateQueries({queryKey:q.projects(o.id)})),s.bindingUpdates.forEach(({pluginId:i})=>{r.invalidateQueries({queryKey:q.projectPluginConfig(e.id??"",i)})}),y({}),h({}),M.success("Plugins updated successfully")},onError:t=>{M.error("Failed to update plugins: "+(t instanceof Error?t.message:"Unknown error"))},onSettled:()=>{d(!1)}}),P=()=>{d(!0);const t=Object.keys(x).map(s=>{const i=x[s];return{pluginId:s,connectionId:i!==void 0?i:void 0}});m.mutate({enabledPlugins:b(),updatePlugins:Object.keys(a).length>0,bindingUpdates:t})},v=()=>{y({}),h({})},A=t=>{const s=$.find(i=>i.pluginId===t);return s?{label:s.label,icon:s.items[0]?.icon}:null},g=t=>D.find(i=>i.id===t)?.description??null;return D.length===0?n.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}):n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"flex flex-col",children:D.map(t=>{const s=A(t.id),i=g(t.id),c=S(t.id);return n.jsx(xe,{plugin:t,isEnabled:c,isSaving:j,pendingBinding:x[t.id],description:i,label:s?.label??t.id,icon:s?.icon??n.jsx(ne,{size:14}),projectId:e.id,client:l,onBindingChange:C,onToggle:w},t.id)})}),n.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[n.jsx(G,{variant:"outline",onClick:v,disabled:!u||j,children:"Cancel"}),n.jsx(G,{onClick:P,disabled:!u||j,className:"min-w-24",children:j?"Saving...":"Save Changes"})]})]})}function Le(){const o=Q.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"flex flex-col gap-6",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Features"}),n.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Extend your project with built-in capabilities that activate automatically on any connection that supports them."})]}),n.jsx(be,{})]}),o[0]=e):e=o[0],e}export{Le as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bm as T,d as A,c as H,y as K,j as r,H as U,x as q,K as G,r as O,f as M,B as R,O as Q}from"./index-Y_g6-sbQ.js";import{a as V}from"./use-project-3rL77wj_.js";import{P as I}from"./index-BlVIyhiN.js";import{C as J}from"./collection-search-R3szwhKc.js";import{A as Y}from"./avatar-BDzYYIB_.js";import{f as W}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as X}from"./empty-state-5hCgVmoA.js";import{C as Z}from"./create-project-dialog-Db-cXCFP.js";import{I as ee}from"./import-from-deco-dialog-CxiHwpr_.js";import{B as te,a as se,b as re,c as oe}from"./breadcrumb-CCT_gYCX.js";import{s as le}from"./FolderClosed-DtTyOuV-.js";import{s as F}from"./Plus-VNSvGQN9.js";import"./useQuery-DKMHT49Q.js";import"./constants-Cf6w8uWj.js";import"./useMutation-09-2Qwl6.js";import"./tooltip-Cem552VW.js";import"./index-CT7BYuwf.js";import"./X-AnvD8fGN.js";import"./Loading01-DTPGNGDe.js";import"./SearchMd-BVguqJPF.js";import"./input-BJjZBSH8.js";import"./User01-C1Py8RLi.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dialog-B_ZBKGcK.js";import"./form-BAfFoDTS.js";import"./label-BagqgWUv.js";import"./textarea-Dtfhz_OA.js";import"./slug-DcxyEoi0.js";import"./Check-DsqqbwRv.js";import"./ArrowLeft-1uQ4hoAA.js";import"./generate-id-Dyweu44Y.js";import"./ChevronRight-BvErZvXV.js";const ie=T("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 ne(t){const e=A.c(58),{project:s,onSettingsClick:i}=t,{org:o}=H(),l=s.ui?.themeColor??"#60a5fa",C=s.ui?.bannerColor??l,d=s.ui?.banner?`url(${s.ui.banner})`:void 0;let b;e[0]!==C||e[1]!==d?(b={backgroundColor:C,backgroundImage:d,backgroundSize:"cover",backgroundPosition:"center"},e[0]=C,e[1]=d,e[2]=b):b=e[2];const _=b;let m;e[3]!==o.slug||e[4]!==s.slug?(m={org:o.slug,project:s.slug},e[3]=o.slug,e[4]=s.slug,e[5]=m):m=e[5];let u;e[6]!==i?(u=B=>{B.preventDefault(),B.stopPropagation(),i?.(B)},e[6]=i,e[7]=u):u=e[7];let v,f;e[8]===Symbol.for("react.memo_cache_sentinel")?(v=K("absolute top-3 right-3 size-6 rounded-md flex items-center justify-center","bg-black/20 hover:bg-black/40 transition-colors"),f=r.jsx(ie,{className:"size-3.5 text-white"}),e[8]=v,e[9]=f):(v=e[8],f=e[9]);let x;e[10]!==u?(x=r.jsx("button",{type:"button",onClick:u,className:v,children:f}),e[10]=u,e[11]=x):x=e[11];let g;e[12]!==_||e[13]!==x?(g=r.jsx("div",{className:"h-20 relative",style:_,children:x}),e[12]=_,e[13]=x,e[14]=g):g=e[14];let a;e[15]!==s.name||e[16]!==s.ui||e[17]!==l?(a=s.ui?.icon?r.jsx("img",{src:s.ui.icon,alt:"",className:"size-8 rounded-md object-cover"}):r.jsx("div",{className:"size-8 rounded-md flex items-center justify-center",style:{backgroundColor:l},children:r.jsx("span",{className:"text-sm font-medium text-white",children:s.name.charAt(0).toUpperCase()})}),e[15]=s.name,e[16]=s.ui,e[17]=l,e[18]=a):a=e[18];let c;e[19]!==s.name?(c=r.jsx("h3",{className:"font-medium text-base text-foreground truncate",children:s.name}),e[19]=s.name,e[20]=c):c=e[20];let p;e[21]!==s.updatedAt?(p=W(new Date(s.updatedAt),{addSuffix:!0}),e[21]=s.updatedAt,e[22]=p):p=e[22];let h;e[23]!==p?(h=r.jsxs("p",{className:"text-sm text-muted-foreground",children:["Edited"," ",p]}),e[23]=p,e[24]=h):h=e[24];let N;e[25]!==c||e[26]!==h?(N=r.jsxs("div",{className:"flex flex-col",children:[c,h]}),e[25]=c,e[26]=h,e[27]=N):N=e[27];let P;e[28]!==a||e[29]!==N?(P=r.jsxs("div",{className:"flex flex-col gap-4",children:[a,N]}),e[28]=a,e[29]=N,e[30]=P):P=e[30];let k;e[31]!==s.boundConnections?(k=s.boundConnections.slice(0,4).map(ae),e[31]=s.boundConnections,e[32]=k):k=e[32];let D;e[33]!==s.boundConnections.length?(D=s.boundConnections.length>4&&r.jsx("div",{className:"-mr-2 rounded-md border border-background",children:r.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:["+",s.boundConnections.length-4]})}),e[33]=s.boundConnections.length,e[34]=D):D=e[34];let y;e[35]!==k||e[36]!==D?(y=r.jsxs("div",{className:"flex pr-2",children:[k,D]}),e[35]=k,e[36]=D,e[37]=y):y=e[37];const $=o.logo??void 0;let S;e[38]!==o.name||e[39]!==$?(S=r.jsx(Y,{url:$,fallback:o.name,size:"2xs",className:"shrink-0 rounded",objectFit:"cover"}),e[38]=o.name,e[39]=$,e[40]=S):S=e[40];let j;e[41]!==o.name?(j=r.jsx("span",{className:"truncate max-w-20",children:o.name}),e[41]=o.name,e[42]=j):j=e[42];let w;e[43]!==S||e[44]!==j?(w=r.jsxs("div",{className:"flex items-center gap-2 text-xs text-foreground",children:[S,j]}),e[43]=S,e[44]=j,e[45]=w):w=e[45];let z;e[46]!==y||e[47]!==w?(z=r.jsxs("div",{className:"flex items-center justify-between mt-4",children:[y,w]}),e[46]=y,e[47]=w,e[48]=z):z=e[48];let n;e[49]!==P||e[50]!==z?(n=r.jsxs("div",{className:"flex flex-col flex-1 justify-between p-4",children:[P,z]}),e[49]=P,e[50]=z,e[51]=n):n=e[51];let L;e[52]!==n||e[53]!==g?(L=r.jsxs("div",{className:"border border-border rounded-xl overflow-hidden bg-card",children:[g,n]}),e[52]=n,e[53]=g,e[54]=L):L=e[54];let E;return e[55]!==L||e[56]!==m?(E=r.jsx(U,{to:"/$org/$project",params:m,className:"block group",children:L}),e[55]=L,e[56]=m,e[57]=E):E=e[57],E}function ae(t){return r.jsx("div",{className:"-mr-2 rounded-md border border-background",children:r.jsx(ce,{connection:t})},t.id)}function ce(t){const e=A.c(13),{connection:s}=t;if(s.icon){let d;e[0]!==s.icon||e[1]!==s.title?(d=r.jsx("img",{src:s.icon,alt:s.title,className:"size-4 object-cover"}),e[0]=s.icon,e[1]=s.title,e[2]=d):d=e[2];let b;return e[3]!==s.title||e[4]!==d?(b=r.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:s.title,children:d}),e[3]=s.title,e[4]=d,e[5]=b):b=e[5],b}const i=s.title;let o;e[6]!==s.title?(o=s.title.charAt(0).toUpperCase(),e[6]=s.title,e[7]=o):o=e[7];let l;e[8]!==o?(l=r.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:o}),e[8]=o,e[9]=l):l=e[9];let C;return e[10]!==s.title||e[11]!==l?(C=r.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:i,children:l}),e[10]=s.title,e[11]=l,e[12]=C):C=e[12],C}function de(){const t=A.c(2),e=q();let s;return t[0]!==e?(s=e.getQueryData(G.publicConfig())??{},t[0]=e,t[1]=s):s=t[1],s}function me(){const t=A.c(3),[e,s]=O.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(R,{variant:"outline",onClick:()=>s(!0),size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Import from deco.cx"}),t[0]=i):i=t[0];let o;return t[1]!==e?(o=r.jsxs(r.Fragment,{children:[i,r.jsx(ee,{open:e,onOpenChange:s})]}),t[1]=e,t[2]=o):o=t[2],o}function Me(){const t=A.c(43),{org:e}=H(),{data:s,isLoading:i}=V(e.id),{enableDecoImport:o}=de(),[l,C]=O.useState(""),[d,b]=O.useState(!1),_=M();let m,u,v,f,x,g,a,c;if(t[0]!==o||t[1]!==i||t[2]!==_||t[3]!==e.slug||t[4]!==s||t[5]!==l){const P=s?.filter(fe)?.filter(n=>n.name.toLowerCase().includes(l.toLowerCase())||n.description?.toLowerCase().includes(l.toLowerCase()))??[];let k;t[14]!==_||t[15]!==e.slug?(k=n=>{_({to:"/$org/$project/settings/general",params:{org:e.slug,project:n}})},t[14]=_,t[15]=e.slug,t[16]=k):k=t[16];const D=k;let y;t[17]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{b(!0)},t[17]=y):y=t[17];const $=y;u=I;let S;t[18]===Symbol.for("react.memo_cache_sentinel")?(S=r.jsx(I.Header.Left,{children:r.jsx(te,{children:r.jsx(se,{children:r.jsx(re,{children:r.jsx(oe,{children:"Projects"})})})})}),t[18]=S):S=t[18];let j;t[19]!==o?(j=o&&r.jsx(me,{}),t[19]=o,t[20]=j):j=t[20];let w;t[21]===Symbol.for("react.memo_cache_sentinel")?(w=r.jsxs(R,{onClick:$,size:"sm",children:[r.jsx(F,{size:14}),"Create Project"]}),t[21]=w):w=t[21],t[22]!==j?(a=r.jsxs(I.Header,{children:[S,r.jsxs(I.Header.Right,{children:[j,w]})]}),t[22]=j,t[23]=a):a=t[23];let z;t[24]===Symbol.for("react.memo_cache_sentinel")?(z=n=>{n.key==="Escape"&&(C(""),n.target.blur())},t[24]=z):z=t[24],t[25]!==l?(c=r.jsx(J,{value:l,onChange:C,placeholder:"Search for a project...",onKeyDown:z}),t[25]=l,t[26]=c):c=t[26],m=I.Content,v="@container",t[27]!==i?(f=i&&r.jsx("div",{className:"p-5",children:r.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(ue)})}),t[27]=i,t[28]=f):f=t[28],x=!i&&P.length===0&&r.jsx("div",{className:"flex items-center h-full",children:r.jsx(X,{image:r.jsx(le,{size:48,className:"text-muted-foreground"}),title:l?"No projects found":"No projects yet",description:l?`No projects match "${l}"`:"Create a project to get started.",actions:!l&&r.jsxs(R,{size:"sm",onClick:$,children:[r.jsx(F,{size:14}),"Create Project"]})})}),g=!i&&P.length>0&&r.jsx("div",{className:"p-5",children:r.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:P.map(n=>r.jsx(ne,{project:n,onSettingsClick:()=>D(n.slug)},n.id))})}),t[0]=o,t[1]=i,t[2]=_,t[3]=e.slug,t[4]=s,t[5]=l,t[6]=m,t[7]=u,t[8]=v,t[9]=f,t[10]=x,t[11]=g,t[12]=a,t[13]=c}else m=t[6],u=t[7],v=t[8],f=t[9],x=t[10],g=t[11],a=t[12],c=t[13];let p;t[29]!==m||t[30]!==v||t[31]!==f||t[32]!==x||t[33]!==g?(p=r.jsxs(m,{className:v,children:[f,x,g]}),t[29]=m,t[30]=v,t[31]=f,t[32]=x,t[33]=g,t[34]=p):p=t[34];let h;t[35]!==d?(h=r.jsx(Z,{open:d,onOpenChange:b}),t[35]=d,t[36]=h):h=t[36];let N;return t[37]!==u||t[38]!==a||t[39]!==c||t[40]!==p||t[41]!==h?(N=r.jsxs(u,{children:[a,c,p,h]}),t[37]=u,t[38]=a,t[39]=c,t[40]=p,t[41]=h,t[42]=N):N=t[42],N}function ue(t,e){return r.jsx("div",{className:"h-[240px] rounded-xl bg-muted animate-pulse"},e)}function fe(t){return t.slug!==Q}export{Me as default};
|
|
1
|
+
import{bm as T,d as A,c as H,y as K,j as r,H as U,x as q,K as G,r as O,f as M,B as R,O as Q}from"./index-fnzLSheB.js";import{a as V}from"./use-project-_2326oBQ.js";import{P as I}from"./index-DWiV_aLY.js";import{C as J}from"./collection-search-DQX16wbn.js";import{A as Y}from"./avatar-B2cKnsRn.js";import{f as W}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as X}from"./empty-state-D14a0Zxq.js";import{C as Z}from"./create-project-dialog-CX--SrDy.js";import{I as ee}from"./import-from-deco-dialog-B6yW7KqN.js";import{B as te,a as se,b as re,c as oe}from"./breadcrumb-D8w6T3TH.js";import{s as le}from"./FolderClosed-rrRpN158.js";import{s as F}from"./Plus-CfD-fvi9.js";import"./useQuery-D7A6izWp.js";import"./constants-B5ylLz8P.js";import"./useMutation-CsiTkFgY.js";import"./tooltip-hlHlzWhV.js";import"./index-D3056qAr.js";import"./X-De9pN2CV.js";import"./Loading01-CJFbgK59.js";import"./SearchMd-B4W5fcyf.js";import"./input-CBI5HJST.js";import"./User01-BgxUQ8sC.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dialog-D7WigTyK.js";import"./form-DXxHt_ci.js";import"./label-_1-T_NFE.js";import"./textarea-rEHudfyV.js";import"./slug-DcxyEoi0.js";import"./Check-Cj1LnSt2.js";import"./ArrowLeft-CCViWpBS.js";import"./generate-id-Dyweu44Y.js";import"./ChevronRight-DY2lrGOn.js";const ie=T("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 ne(t){const e=A.c(58),{project:s,onSettingsClick:i}=t,{org:o}=H(),l=s.ui?.themeColor??"#60a5fa",C=s.ui?.bannerColor??l,d=s.ui?.banner?`url(${s.ui.banner})`:void 0;let b;e[0]!==C||e[1]!==d?(b={backgroundColor:C,backgroundImage:d,backgroundSize:"cover",backgroundPosition:"center"},e[0]=C,e[1]=d,e[2]=b):b=e[2];const _=b;let m;e[3]!==o.slug||e[4]!==s.slug?(m={org:o.slug,project:s.slug},e[3]=o.slug,e[4]=s.slug,e[5]=m):m=e[5];let u;e[6]!==i?(u=B=>{B.preventDefault(),B.stopPropagation(),i?.(B)},e[6]=i,e[7]=u):u=e[7];let v,f;e[8]===Symbol.for("react.memo_cache_sentinel")?(v=K("absolute top-3 right-3 size-6 rounded-md flex items-center justify-center","bg-black/20 hover:bg-black/40 transition-colors"),f=r.jsx(ie,{className:"size-3.5 text-white"}),e[8]=v,e[9]=f):(v=e[8],f=e[9]);let x;e[10]!==u?(x=r.jsx("button",{type:"button",onClick:u,className:v,children:f}),e[10]=u,e[11]=x):x=e[11];let g;e[12]!==_||e[13]!==x?(g=r.jsx("div",{className:"h-20 relative",style:_,children:x}),e[12]=_,e[13]=x,e[14]=g):g=e[14];let a;e[15]!==s.name||e[16]!==s.ui||e[17]!==l?(a=s.ui?.icon?r.jsx("img",{src:s.ui.icon,alt:"",className:"size-8 rounded-md object-cover"}):r.jsx("div",{className:"size-8 rounded-md flex items-center justify-center",style:{backgroundColor:l},children:r.jsx("span",{className:"text-sm font-medium text-white",children:s.name.charAt(0).toUpperCase()})}),e[15]=s.name,e[16]=s.ui,e[17]=l,e[18]=a):a=e[18];let c;e[19]!==s.name?(c=r.jsx("h3",{className:"font-medium text-base text-foreground truncate",children:s.name}),e[19]=s.name,e[20]=c):c=e[20];let p;e[21]!==s.updatedAt?(p=W(new Date(s.updatedAt),{addSuffix:!0}),e[21]=s.updatedAt,e[22]=p):p=e[22];let h;e[23]!==p?(h=r.jsxs("p",{className:"text-sm text-muted-foreground",children:["Edited"," ",p]}),e[23]=p,e[24]=h):h=e[24];let N;e[25]!==c||e[26]!==h?(N=r.jsxs("div",{className:"flex flex-col",children:[c,h]}),e[25]=c,e[26]=h,e[27]=N):N=e[27];let P;e[28]!==a||e[29]!==N?(P=r.jsxs("div",{className:"flex flex-col gap-4",children:[a,N]}),e[28]=a,e[29]=N,e[30]=P):P=e[30];let k;e[31]!==s.boundConnections?(k=s.boundConnections.slice(0,4).map(ae),e[31]=s.boundConnections,e[32]=k):k=e[32];let D;e[33]!==s.boundConnections.length?(D=s.boundConnections.length>4&&r.jsx("div",{className:"-mr-2 rounded-md border border-background",children:r.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:["+",s.boundConnections.length-4]})}),e[33]=s.boundConnections.length,e[34]=D):D=e[34];let y;e[35]!==k||e[36]!==D?(y=r.jsxs("div",{className:"flex pr-2",children:[k,D]}),e[35]=k,e[36]=D,e[37]=y):y=e[37];const $=o.logo??void 0;let S;e[38]!==o.name||e[39]!==$?(S=r.jsx(Y,{url:$,fallback:o.name,size:"2xs",className:"shrink-0 rounded",objectFit:"cover"}),e[38]=o.name,e[39]=$,e[40]=S):S=e[40];let j;e[41]!==o.name?(j=r.jsx("span",{className:"truncate max-w-20",children:o.name}),e[41]=o.name,e[42]=j):j=e[42];let w;e[43]!==S||e[44]!==j?(w=r.jsxs("div",{className:"flex items-center gap-2 text-xs text-foreground",children:[S,j]}),e[43]=S,e[44]=j,e[45]=w):w=e[45];let z;e[46]!==y||e[47]!==w?(z=r.jsxs("div",{className:"flex items-center justify-between mt-4",children:[y,w]}),e[46]=y,e[47]=w,e[48]=z):z=e[48];let n;e[49]!==P||e[50]!==z?(n=r.jsxs("div",{className:"flex flex-col flex-1 justify-between p-4",children:[P,z]}),e[49]=P,e[50]=z,e[51]=n):n=e[51];let L;e[52]!==n||e[53]!==g?(L=r.jsxs("div",{className:"border border-border rounded-xl overflow-hidden bg-card",children:[g,n]}),e[52]=n,e[53]=g,e[54]=L):L=e[54];let E;return e[55]!==L||e[56]!==m?(E=r.jsx(U,{to:"/$org/$project",params:m,className:"block group",children:L}),e[55]=L,e[56]=m,e[57]=E):E=e[57],E}function ae(t){return r.jsx("div",{className:"-mr-2 rounded-md border border-background",children:r.jsx(ce,{connection:t})},t.id)}function ce(t){const e=A.c(13),{connection:s}=t;if(s.icon){let d;e[0]!==s.icon||e[1]!==s.title?(d=r.jsx("img",{src:s.icon,alt:s.title,className:"size-4 object-cover"}),e[0]=s.icon,e[1]=s.title,e[2]=d):d=e[2];let b;return e[3]!==s.title||e[4]!==d?(b=r.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:s.title,children:d}),e[3]=s.title,e[4]=d,e[5]=b):b=e[5],b}const i=s.title;let o;e[6]!==s.title?(o=s.title.charAt(0).toUpperCase(),e[6]=s.title,e[7]=o):o=e[7];let l;e[8]!==o?(l=r.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:o}),e[8]=o,e[9]=l):l=e[9];let C;return e[10]!==s.title||e[11]!==l?(C=r.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:i,children:l}),e[10]=s.title,e[11]=l,e[12]=C):C=e[12],C}function de(){const t=A.c(2),e=q();let s;return t[0]!==e?(s=e.getQueryData(G.publicConfig())??{},t[0]=e,t[1]=s):s=t[1],s}function me(){const t=A.c(3),[e,s]=O.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(R,{variant:"outline",onClick:()=>s(!0),size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Import from deco.cx"}),t[0]=i):i=t[0];let o;return t[1]!==e?(o=r.jsxs(r.Fragment,{children:[i,r.jsx(ee,{open:e,onOpenChange:s})]}),t[1]=e,t[2]=o):o=t[2],o}function Me(){const t=A.c(43),{org:e}=H(),{data:s,isLoading:i}=V(e.id),{enableDecoImport:o}=de(),[l,C]=O.useState(""),[d,b]=O.useState(!1),_=M();let m,u,v,f,x,g,a,c;if(t[0]!==o||t[1]!==i||t[2]!==_||t[3]!==e.slug||t[4]!==s||t[5]!==l){const P=s?.filter(fe)?.filter(n=>n.name.toLowerCase().includes(l.toLowerCase())||n.description?.toLowerCase().includes(l.toLowerCase()))??[];let k;t[14]!==_||t[15]!==e.slug?(k=n=>{_({to:"/$org/$project/settings/general",params:{org:e.slug,project:n}})},t[14]=_,t[15]=e.slug,t[16]=k):k=t[16];const D=k;let y;t[17]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{b(!0)},t[17]=y):y=t[17];const $=y;u=I;let S;t[18]===Symbol.for("react.memo_cache_sentinel")?(S=r.jsx(I.Header.Left,{children:r.jsx(te,{children:r.jsx(se,{children:r.jsx(re,{children:r.jsx(oe,{children:"Projects"})})})})}),t[18]=S):S=t[18];let j;t[19]!==o?(j=o&&r.jsx(me,{}),t[19]=o,t[20]=j):j=t[20];let w;t[21]===Symbol.for("react.memo_cache_sentinel")?(w=r.jsxs(R,{onClick:$,size:"sm",children:[r.jsx(F,{size:14}),"Create Project"]}),t[21]=w):w=t[21],t[22]!==j?(a=r.jsxs(I.Header,{children:[S,r.jsxs(I.Header.Right,{children:[j,w]})]}),t[22]=j,t[23]=a):a=t[23];let z;t[24]===Symbol.for("react.memo_cache_sentinel")?(z=n=>{n.key==="Escape"&&(C(""),n.target.blur())},t[24]=z):z=t[24],t[25]!==l?(c=r.jsx(J,{value:l,onChange:C,placeholder:"Search for a project...",onKeyDown:z}),t[25]=l,t[26]=c):c=t[26],m=I.Content,v="@container",t[27]!==i?(f=i&&r.jsx("div",{className:"p-5",children:r.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(ue)})}),t[27]=i,t[28]=f):f=t[28],x=!i&&P.length===0&&r.jsx("div",{className:"flex items-center h-full",children:r.jsx(X,{image:r.jsx(le,{size:48,className:"text-muted-foreground"}),title:l?"No projects found":"No projects yet",description:l?`No projects match "${l}"`:"Create a project to get started.",actions:!l&&r.jsxs(R,{size:"sm",onClick:$,children:[r.jsx(F,{size:14}),"Create Project"]})})}),g=!i&&P.length>0&&r.jsx("div",{className:"p-5",children:r.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:P.map(n=>r.jsx(ne,{project:n,onSettingsClick:()=>D(n.slug)},n.id))})}),t[0]=o,t[1]=i,t[2]=_,t[3]=e.slug,t[4]=s,t[5]=l,t[6]=m,t[7]=u,t[8]=v,t[9]=f,t[10]=x,t[11]=g,t[12]=a,t[13]=c}else m=t[6],u=t[7],v=t[8],f=t[9],x=t[10],g=t[11],a=t[12],c=t[13];let p;t[29]!==m||t[30]!==v||t[31]!==f||t[32]!==x||t[33]!==g?(p=r.jsxs(m,{className:v,children:[f,x,g]}),t[29]=m,t[30]=v,t[31]=f,t[32]=x,t[33]=g,t[34]=p):p=t[34];let h;t[35]!==d?(h=r.jsx(Z,{open:d,onOpenChange:b}),t[35]=d,t[36]=h):h=t[36];let N;return t[37]!==u||t[38]!==a||t[39]!==c||t[40]!==p||t[41]!==h?(N=r.jsxs(u,{children:[a,c,p,h]}),t[37]=u,t[38]=a,t[39]=c,t[40]=p,t[41]=h,t[42]=N):N=t[42],N}function ue(t,e){return r.jsx("div",{className:"h-[240px] rounded-xl bg-muted animate-pulse"},e)}function fe(t){return t.slug!==Q}export{Me as default};
|