decocms 2.185.0 → 2.186.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BO0kzcBv.js → AlertCircle-vb3SCqTR.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CrI91Scn.js → ArrowLeft-UgY0HH3_.js} +1 -1
- package/dist/client/assets/{ArrowUp-FfROzAyV.js → ArrowUp-BQ0GwMhq.js} +1 -1
- package/dist/client/assets/{Check-BXqqUm0J.js → Check-EBIfpKfk.js} +1 -1
- package/dist/client/assets/{ChevronDown-B6V9GzuP.js → ChevronDown-TWcZ4kJ9.js} +1 -1
- package/dist/client/assets/{ChevronRight-BSFLHUtv.js → ChevronRight-BpkTLj3y.js} +1 -1
- package/dist/client/assets/{ChevronUp-BYpnL-9F.js → ChevronUp-DMmIo8iD.js} +1 -1
- package/dist/client/assets/{Container-BZeblIrR.js → Container-Dt8UalAF.js} +1 -1
- package/dist/client/assets/{Dataflow03-CTwEKVcs.js → Dataflow03-DLl2RzQp.js} +1 -1
- package/dist/client/assets/{Download01-D7T-WxGL.js → Download01-Dw7P9-4i.js} +1 -1
- package/dist/client/assets/{FolderClosed-BPzjOG-5.js → FolderClosed-D8TIwtpx.js} +1 -1
- package/dist/client/assets/{Grid01-Bwsn0nh2.js → Grid01-CmDjkAry.js} +1 -1
- package/dist/client/assets/{List-Bq1Yvo6z.js → List-3ufZUeAi.js} +1 -1
- package/dist/client/assets/{Loading01-DCKwAh-U.js → Loading01-oEWzHjsc.js} +1 -1
- package/dist/client/assets/{Play-Bw_aeuhq.js → Play-eTAbgb-w.js} +1 -1
- package/dist/client/assets/{Plus-BW2fNoEy.js → Plus-BA7Rfpr-.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-YXuL16Jx.js → RefreshCcw01-B6mp4o28.js} +1 -1
- package/dist/client/assets/{SearchMd-C_bEWIlQ.js → SearchMd-4_up1TLU.js} +1 -1
- package/dist/client/assets/{Settings01-BoOhxJJj.js → Settings01-lbicxKIn.js} +1 -1
- package/dist/client/assets/{Trash01-D9O3UWX6.js → Trash01-eIuymuN8.js} +1 -1
- package/dist/client/assets/{Type01-CjsMMlh6.js → Type01-DCWXkwdC.js} +1 -1
- package/dist/client/assets/{Upload01-Bpjo_QI4.js → Upload01-BSFuoakK.js} +1 -1
- package/dist/client/assets/{User01-BRC1qZ-u.js → User01-DN32uzYn.js} +1 -1
- package/dist/client/assets/{VideoRecorder-DkcbdsZk.js → VideoRecorder-BQGrK2bZ.js} +1 -1
- package/dist/client/assets/{X-BL1q6dsE.js → X-DaCoKlVZ.js} +1 -1
- package/dist/client/assets/{XCircle-DxcmI8rf.js → XCircle-DZHeGFcX.js} +1 -1
- package/dist/client/assets/{XClose-CslgPORS.js → XClose-D_0o1f9F.js} +1 -1
- package/dist/client/assets/{Zap-DERWnfoj.js → Zap-D0bIVVjW.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-Dq0Ojrk0.js → agent-connections-preview-BI-eeQCx.js} +1 -1
- package/dist/client/assets/{agent-detail-YxF3rQGf.js → agent-detail-Cawai6IA.js} +1 -1
- package/dist/client/assets/{agents-C2G5xDCJ.js → agents-BoYaKa_N.js} +1 -1
- package/dist/client/assets/{ai-providers-logos-BbTN2hb6.js → ai-providers-logos-D_53AnVk.js} +1 -1
- package/dist/client/assets/{alert-dialog-yWVMNVBj.js → alert-dialog-C5dI6ng4.js} +1 -1
- package/dist/client/assets/{auth-catchall-CTzVQ5KH.js → auth-catchall-O2S6cfz6.js} +1 -1
- package/dist/client/assets/{automation-detail-MKjn-Qas.js → automation-detail-BlNEANzL.js} +1 -1
- package/dist/client/assets/{automations-DpKH4m8F.js → automations-BQAwNfu2.js} +1 -1
- package/dist/client/assets/{avatar-87qJKKK_.js → avatar-CojTV7kK.js} +1 -1
- package/dist/client/assets/{badge-C2jHxnoS.js → badge-Cj2aOlgl.js} +1 -1
- package/dist/client/assets/{binder-BaB8rAtx.js → binder-2uXLdWyj.js} +1 -1
- package/dist/client/assets/{breadcrumb-CBpEGiAs.js → breadcrumb--82F68FS.js} +1 -1
- package/dist/client/assets/{card-CUrYBr2J.js → card-ChQFWIen.js} +1 -1
- package/dist/client/assets/{checkbox-RHvkU3ym.js → checkbox-D_kbciPC.js} +1 -1
- package/dist/client/assets/{collapsible-BaB71DBr.js → collapsible-Doonaq5y.js} +1 -1
- package/dist/client/assets/{collection-detail-iBwR9WNE.js → collection-detail-BLWjMoWG.js} +1 -1
- package/dist/client/assets/{collection-display-button-BetF6DhL.js → collection-display-button-B_YB0Pvz.js} +1 -1
- package/dist/client/assets/{collection-search-DcVVKJ8Q.js → collection-search-BWbixDRp.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-D9WWtdCi.js → collection-table-wrapper-DQMCUU4F.js} +1 -1
- package/dist/client/assets/{collection-tabs-Df3Ptc0I.js → collection-tabs-BnCzVfgA.js} +1 -1
- package/dist/client/assets/{command-CMOZJSSv.js → command-CtOWm1VV.js} +1 -1
- package/dist/client/assets/{connection-card-CKJwNgpO.js → connection-card-DcT51RGy.js} +1 -1
- package/dist/client/assets/{connection-detail-Dbycfmu5.js → connection-detail-BRK14vIh.js} +1 -1
- package/dist/client/assets/{connections-jKPi1hZg.js → connections-D2sLUHTG.js} +1 -1
- package/dist/client/assets/constants-BLFOykPL.js +1 -0
- package/dist/client/assets/{constants-Dzy_AMuL.js → constants-DEVLPir8.js} +1 -1
- package/dist/client/assets/{context-BL_7JbXZ.js → context-BPeBGjOy.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-Cycga0XC.js → create-organization-dialog-R77KhBvZ.js} +1 -1
- package/dist/client/assets/{create-project-dialog-BRQDkCBr.js → create-project-dialog-D41xkdsb.js} +1 -1
- package/dist/client/assets/{danger-D5sT_SDt.js → danger-zX3Qk8cM.js} +1 -1
- package/dist/client/assets/{danger-zone-CI7wNXdQ.js → danger-zone-DqYkGDIc.js} +1 -1
- package/dist/client/assets/{dependencies-XXGkpDMX.js → dependencies-9-wz4Xxc.js} +1 -1
- package/dist/client/assets/{dialog-Dmm_af5q.js → dialog-BCMFAhkI.js} +1 -1
- package/dist/client/assets/{drawer-SktUP7-X.js → drawer-Bl6NlnaH.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BtgYu0Kc.js → dropdown-menu-BbHSISkN.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-DncjSb8M.js → dynamic-plugin-layout-BIILduy1.js} +1 -1
- package/dist/client/assets/{editable-task-title-DBtH_3H-.js → editable-task-title-Br5O_iLC.js} +1 -1
- package/dist/client/assets/{empty-state-BgKAQr0C.js → empty-state-5noOSGfK.js} +1 -1
- package/dist/client/assets/{empty-state-Cx44yC3Y.js → empty-state-C0dwe4U0.js} +1 -1
- package/dist/client/assets/{env-vars-editor-DPFQeE92.js → env-vars-editor-CmxN_shK.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Zw5RYEyS.js → extract-connection-data-DJbja1-q.js} +1 -1
- package/dist/client/assets/{file-browser-AWmMc57j.js → file-browser-DUjv8sIJ.js} +2 -2
- package/dist/client/assets/{form-Obbe7UIk.js → form-DUoo-ylF.js} +1 -1
- package/dist/client/assets/{general-DDuzkv9d.js → general-CGJ44hLj.js} +1 -1
- package/dist/client/assets/{grid-view-DsTxgJvN.js → grid-view-BoGBtir5.js} +1 -1
- package/dist/client/assets/{home-C1G2fDyc.js → home-C0TXQswt.js} +1 -1
- package/dist/client/assets/{index-75eZ1uI1.js → index-BHTlDqaD.js} +1 -1
- package/dist/client/assets/{index-DLW7tZdu.js → index-BKxenrdO.js} +3 -3
- package/dist/client/assets/{index-CUtX0cOT.js → index-BZ1qyalZ.js} +1 -1
- package/dist/client/assets/{index-CDNLqNNq.js → index-C7rxOK6C.js} +1 -1
- package/dist/client/assets/{index-C0Ne6xGI.js → index-CJahu32N.js} +1 -1
- package/dist/client/assets/{index-CdQYIu_6.js → index-D-VE8zlf.js} +1 -1
- package/dist/client/assets/{index-B1ylaSc7.js → index-D73K8P0E.js} +1 -1
- package/dist/client/assets/{index-BtvKqHu_.js → index-DHg1fc5U.js} +1 -1
- package/dist/client/assets/{index-CdK7iTUb.js → index-DaynUkW8.js} +1 -1
- package/dist/client/assets/{index-DCtU4ndp.js → index-Do3azGem.js} +1 -1
- package/dist/client/assets/{index-CQPlxt4u.js → index-hk9wzRwg.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BdQSrFrR.js → infiniteQueryObserver-D-mOGz06.js} +1 -1
- package/dist/client/assets/{input-DgJ0xjPE.js → input-BOFUz0aj.js} +1 -1
- package/dist/client/assets/{integration-icon-C-I4Z6Dk.js → integration-icon-DgW660ho.js} +1 -1
- package/dist/client/assets/{label-BL4fRnZZ.js → label-CwYk_3Ey.js} +1 -1
- package/dist/client/assets/{layout-DAuICUV3.js → layout-C3AUYf3J.js} +1 -1
- package/dist/client/assets/{layout-p-PoyTJz.js → layout-DAeDMG0b.js} +1 -1
- package/dist/client/assets/{login-Bvsz1l56.js → login-DuIR9S1j.js} +1 -1
- package/dist/client/assets/{logo-upload-CGF8q63h.js → logo-upload-CgauH7P2.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DzztYEVX.js → mcp-app-renderer-DGEXm5IH.js} +1 -1
- package/dist/client/assets/{mcp-server-card-Dz2MeUmM.js → mcp-server-card-CK4sGKdu.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-cX9p8Afl.js → mcp-server-detail-D69tJNJ-.js} +2 -2
- package/dist/client/assets/{members-BX_g15fi.js → members-BE0-LX8z.js} +1 -1
- package/dist/client/assets/{monaco-editor-DX4p-sBy.js → monaco-editor-DKgjhGyK.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-cUuCGr6O.js → monitoring-dashboard-edit-BU6wqp6k.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-DFc0vQzd.js → monitoring-dashboard-view-DpgR3HBD.js} +1 -1
- package/dist/client/assets/{monitoring-C9346vXd.js → monitoring-mL0YGaG3.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BDkVd8_E.js → monitoring-stats-row-DGTvXy8L.js} +1 -1
- package/dist/client/assets/{oauth-callback-Bt5QJgEG.js → oauth-callback-DXq4VAB4.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DgK7Rkwm.js → oauth-callback-ai-provider-DLq9Afvv.js} +1 -1
- package/dist/client/assets/{org-ai-providers-DQw8Ry8m.js → org-ai-providers-Cz242a6o.js} +1 -1
- package/dist/client/assets/{page-BNkRheIf.js → page-D3b1s6a2.js} +1 -1
- package/dist/client/assets/{page-BPTnb_7u.js → page-x_-Jc14s.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-DZ2dLLg8.js → plugin-empty-state-B3_dpS13.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-D5d0HyD_.js → plugin-empty-state-Cj0RnDfG.js} +1 -1
- package/dist/client/assets/{plugin-header-DToCRz-E.js → plugin-header-BKXZ081u.js} +1 -1
- package/dist/client/assets/{plugin-header-DaNytvgS.js → plugin-header-DlN-1PR6.js} +1 -1
- package/dist/client/assets/plugins-D1_YmAIA.js +1 -0
- package/dist/client/assets/{popover-DnM-fBUa.js → popover-CRZZJD6X.js} +1 -1
- package/dist/client/assets/{project-app-view-BmSeum6S.js → project-app-view-Dei8g4l2.js} +1 -1
- package/dist/client/assets/{project-layout-B6exvEKF.js → project-layout-dAA71zE-.js} +1 -1
- package/dist/client/assets/{project-plugins-CzyuvjoL.js → project-plugins-BaJYUdT2.js} +1 -1
- package/dist/client/assets/{projects-list-C1JxN737.js → projects-list-Cv_y3Y1y.js} +1 -1
- package/dist/client/assets/{registry-layout-D-kGw5vE.js → registry-layout-C04LM3fN.js} +1 -1
- package/dist/client/assets/{registry-utils-D6No_i4P.js → registry-utils-C0FVK22y.js} +1 -1
- package/dist/client/assets/{reset-password-CUY6IwDL.js → reset-password-CKoF4675.js} +1 -1
- package/dist/client/assets/{resizable-CAbzuUb1.js → resizable-nYmcarWg.js} +1 -1
- package/dist/client/assets/{save-actions-DGqTWEQL.js → save-actions-eZ1LrcFs.js} +1 -1
- package/dist/client/assets/{scroll-area-BCIFp-8p.js → scroll-area-BTvSahh5.js} +1 -1
- package/dist/client/assets/{select-DeOQOwBi.js → select-LSyRUUkM.js} +1 -1
- package/dist/client/assets/{select-virtual-mcp-B78FWMF5.js → select-virtual-mcp-CQf_NH1Z.js} +1 -1
- package/dist/client/assets/{shell-layout-BX9tUo-C.js → shell-layout-DaNKzCH1.js} +2 -2
- package/dist/client/assets/{sidebar-settings-CxzW8gJz.js → sidebar-settings-CArfFMjP.js} +1 -1
- package/dist/client/assets/{skeleton-BwiQLrEa.js → skeleton-DdkQJ8Ke.js} +1 -1
- package/dist/client/assets/{spinner-D4Lh5lMu.js → spinner-BbwK2nZf.js} +1 -1
- package/dist/client/assets/{store-invite-CdO_aWdO.js → store-invite-38lQwS2V.js} +1 -1
- package/dist/client/assets/{switch-DqWbwfAd.js → switch-C4iOvYgm.js} +1 -1
- package/dist/client/assets/{table-CbTCyRX5.js → table-CvG2iH0y.js} +1 -1
- package/dist/client/assets/{tabs-zzjdf6a0.js → tabs-D48yslt8.js} +1 -1
- package/dist/client/assets/{task-status-hmfgdVgC.js → task-status-CfdaAVDd.js} +1 -1
- package/dist/client/assets/tasks-CHK2wNRc.js +1 -0
- package/dist/client/assets/{tasks-panel-BKxSsDFe.js → tasks-panel-CngVyrSR.js} +1 -1
- package/dist/client/assets/{textarea-CJ-1DHFH.js → textarea-pMGiDvfM.js} +1 -1
- package/dist/client/assets/{time-range-picker-BBbi_2IF.js → time-range-picker-hMmDbLQS.js} +1 -1
- package/dist/client/assets/{toggle-group-DaaATQ-5.js → toggle-group-DB7gCSVI.js} +1 -1
- package/dist/client/assets/{tools-list-DLZSPKIc.js → tools-list-DqDOl_iw.js} +1 -1
- package/dist/client/assets/{tooltip-D-QYbPJS.js → tooltip-BYpVdvUr.js} +1 -1
- package/dist/client/assets/{topbar-portal-D3vr1IIh.js → topbar-portal-BT3L0OHL.js} +1 -1
- package/dist/client/assets/{types-vQT8OD6B.js → types-1J8PljZw.js} +1 -1
- package/dist/client/assets/{use-automations-BIoacnri.js → use-automations-BMRGIsk5.js} +1 -1
- package/dist/client/assets/{use-collections-BJxMmWLX.js → use-collections-DNZPF16v.js} +1 -1
- package/dist/client/assets/{use-connection-DPMknCkO.js → use-connection-OaJxXLK-.js} +1 -1
- package/dist/client/assets/{use-copy-CkgWv__W.js → use-copy-RSAu7_j7.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-pWj6n63S.js → use-create-virtual-mcp-CrkA34pw.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BU1rPA0T.js → use-infinite-scroll-cI-C0iaq.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-C1XqHuwX.js → use-install-from-registry-Cw1tOxSk.js} +1 -1
- package/dist/client/assets/{use-list-state-B6nYBLyk.js → use-list-state-CSTOpaV4.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BmK_9UQh.js → use-mcp-prompts-FfAzq9P9.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-DQ2GW_FE.js → use-mcp-resources-Jm6NvGgP.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-KIPxuDyk.js → use-mcp-tools-B10GVMq1.js} +1 -1
- package/dist/client/assets/{use-members-BRZ5u_Eq.js → use-members-BEgSet5G.js} +1 -1
- package/dist/client/assets/{use-project-DVq_144v.js → use-project-BxO41BBL.js} +1 -1
- package/dist/client/assets/{use-store-discovery-aQCBFuCU.js → use-store-discovery-DVCWh6aJ.js} +1 -1
- package/dist/client/assets/{use-view-mode-lmHuCoZm.js → use-view-mode-0u9SIVO4.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BEia5q72.js → use-virtual-mcp-BZiKlRZJ.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DzvJ2Vyd.js +1 -0
- package/dist/client/assets/{useMutation-BatnVMWS.js → useMutation-BaFlpWJP.js} +1 -1
- package/dist/client/assets/useQuery-DG4WKkPy.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DKieyXx7.js +1 -0
- package/dist/client/assets/{user-Aw6SqZpK.js → user-Bx46t5R3.js} +1 -1
- package/dist/client/assets/{workflow-CRjl6sOP.js → workflow-BIBTFj9e.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/node_modules/{postgres-bytea/license → pg/LICENSE} +6 -6
- package/dist/server/node_modules/pg/README.md +95 -0
- package/dist/server/node_modules/pg/esm/index.mjs +20 -0
- package/dist/server/node_modules/pg/lib/client.js +743 -0
- package/dist/server/node_modules/pg/lib/connection-parameters.js +171 -0
- package/dist/server/node_modules/pg/lib/connection.js +221 -0
- package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +122 -0
- package/dist/server/node_modules/pg/lib/crypto/sasl.js +212 -0
- package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +43 -0
- package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +89 -0
- package/dist/server/node_modules/pg/lib/crypto/utils.js +9 -0
- package/dist/server/node_modules/pg/lib/defaults.js +91 -0
- package/dist/server/node_modules/pg/lib/index.js +73 -0
- package/dist/server/node_modules/pg/lib/native/client.js +323 -0
- package/dist/server/node_modules/pg/lib/native/index.js +2 -0
- package/dist/server/node_modules/pg/lib/native/query.js +165 -0
- package/dist/server/node_modules/pg/lib/query.js +252 -0
- package/dist/server/node_modules/pg/lib/result.js +109 -0
- package/dist/server/node_modules/pg/lib/stream.js +83 -0
- package/dist/server/node_modules/pg/lib/type-overrides.js +35 -0
- package/dist/server/node_modules/pg/lib/utils.js +217 -0
- package/dist/server/node_modules/pg/package.json +76 -0
- package/dist/server/node_modules/xtend/.jshintrc +30 -0
- package/dist/server/node_modules/{postgres-interval/license → xtend/LICENSE} +1 -2
- package/dist/server/node_modules/xtend/README.md +32 -0
- package/dist/server/node_modules/xtend/immutable.js +19 -0
- package/dist/server/node_modules/xtend/mutable.js +17 -0
- package/dist/server/node_modules/xtend/package.json +55 -0
- package/dist/server/node_modules/xtend/test.js +103 -0
- package/package.json +1 -1
- package/dist/client/assets/constants-BTMGn0Px.js +0 -1
- package/dist/client/assets/plugins-LyhHmrtr.js +0 -1
- package/dist/client/assets/tasks-C6cfAkGR.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DpWHrz5z.js +0 -1
- package/dist/client/assets/useQuery-YHvrmKkI.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Cv31oWYI.js +0 -1
- package/dist/server/node_modules/async-exit-hook/CHANGELOG.md +0 -62
- package/dist/server/node_modules/async-exit-hook/index.js +0 -171
- package/dist/server/node_modules/async-exit-hook/license +0 -21
- package/dist/server/node_modules/async-exit-hook/package.json +0 -66
- package/dist/server/node_modules/async-exit-hook/readme.md +0 -118
- package/dist/server/node_modules/postgres-bytea/index.js +0 -33
- 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-interval/index.d.ts +0 -20
- package/dist/server/node_modules/postgres-interval/index.js +0 -125
- package/dist/server/node_modules/postgres-interval/package.json +0 -36
- package/dist/server/node_modules/postgres-interval/readme.md +0 -48
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,j as t,r as N,D as A,E as q,B as J,u as Q,f as X}from"./index-DLW7tZdu.js";import{C as h}from"./task-status-hmfgdVgC.js";import{C as Y,E as Z}from"./editable-task-title-DBtH_3H-.js";import{a as W}from"./tasks-panel-BKxSsDFe.js";import{u as G,a as K}from"./context-BL_7JbXZ.js";import{V as ee}from"./select-virtual-mcp-B78FWMF5.js";import{I as te,t as se,g as le,h as ie,A as B,n as re}from"./integration-icon-C-I4Z6Dk.js";import{a as oe,b as ne,P as ae}from"./popover-DnM-fBUa.js";import{S as L}from"./skeleton-BwiQLrEa.js";import{i as ce,d as me}from"./constants-Dzy_AMuL.js";import{b as de}from"./use-virtual-mcp-BEia5q72.js";import{i as fe}from"./ChevronRight-BSFLHUtv.js";import{u as H}from"./tooltip-D-QYbPJS.js";import{P as T}from"./index-75eZ1uI1.js";import{R,a as O,b as xe}from"./resizable-CAbzuUb1.js";import{D as pe,a as ue}from"./drawer-SktUP7-X.js";import{s as he}from"./Plus-BW2fNoEy.js";import"./spinner-D4Lh5lMu.js";import"./use-mcp-prompts-BmK_9UQh.js";import"./useQuery-YHvrmKkI.js";import"./dialog-Dmm_af5q.js";import"./X-BL1q6dsE.js";import"./form-Obbe7UIk.js";import"./label-BL4fRnZZ.js";import"./input-DgJ0xjPE.js";import"./index-C0Ne6xGI.js";import"./usage-BW6ztpN6.js";import"./ArrowUp-FfROzAyV.js";import"./ChevronDown-B6V9GzuP.js";import"./XCircle-DxcmI8rf.js";import"./org-ai-providers-DQw8Ry8m.js";import"./useMutation-BatnVMWS.js";import"./AlertCircle-BO0kzcBv.js";import"./RefreshCcw01-YXuL16Jx.js";import"./Play-Bw_aeuhq.js";import"./Trash01-D9O3UWX6.js";import"./card-CUrYBr2J.js";import"./toggle-group-DaaATQ-5.js";import"./avatar-87qJKKK_.js";import"./User01-BRC1qZ-u.js";import"./ai-providers-logos-BbTN2hb6.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./select-DeOQOwBi.js";import"./index-BdQq_4o_.js";import"./index-CQPlxt4u.js";import"./Check-BXqqUm0J.js";import"./ChevronUp-BYpnL-9F.js";import"./ArrowLeft-CrI91Scn.js";import"./use-copy-CkgWv__W.js";import"./marked.esm-BaswSlok.js";import"./tabs-zzjdf6a0.js";import"./checkbox-RHvkU3ym.js";import"./VideoRecorder-DkcbdsZk.js";import"./SearchMd-C_bEWIlQ.js";import"./Settings01-BoOhxJJj.js";import"./use-mcp-resources-DQ2GW_FE.js";import"./collapsible-BaB71DBr.js";import"./index-B1ylaSc7.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DzztYEVX.js";import"./types-vQT8OD6B.js";import"./XClose-CslgPORS.js";import"./Type01-CjsMMlh6.js";import"./use-collections-BJxMmWLX.js";import"./useSuspenseInfiniteQuery-Cv31oWYI.js";import"./infiniteQueryObserver-BdQSrFrR.js";import"./Loading01-DCKwAh-U.js";import"./collection-search-DcVVKJ8Q.js";import"./user-Aw6SqZpK.js";import"./format-time-CMKyl-GC.js";import"./empty-state-Cx44yC3Y.js";import"./dropdown-menu-BtgYu0Kc.js";import"./decopilot-events-Brt4gAR6.js";import"./index-CdK7iTUb.js";import"./use-create-virtual-mcp-pWj6n63S.js";import"./Container-BZeblIrR.js";import"./Dataflow03-CTwEKVcs.js";import"./Download01-D7T-WxGL.js";import"./List-Bq1Yvo6z.js";import"./FolderClosed-BPzjOG-5.js";import"./Grid01-Bwsn0nh2.js";import"./Upload01-Bpjo_QI4.js";import"./Zap-DERWnfoj.js";function je(s){const e=g.c(15),{agent:m}=s,{setVirtualMcpId:i}=G();let x;e[0]!==m.id||e[1]!==i?(x=()=>{i(m.id)},e[0]=m.id,e[1]=i,e[2]=x):x=e[2];const n=x;let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=A("flex flex-col items-center gap-1.5 sm:gap-3 p-1.5 sm:p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),e[3]=r):r=e[3];const f=`Select agent ${m.title}`;let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(se,{size:24}),e[4]=o):o=e[4];let a;e[5]!==m.icon||e[6]!==m.title?(a=t.jsx(te,{icon:m.icon,name:m.title,size:"md",fallbackIcon:o}),e[5]=m.icon,e[6]=m.title,e[7]=a):a=e[7];let l;e[8]!==m.title?(l=t.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight line-clamp-2",children:m.title}),e[8]=m.title,e[9]=l):l=e[9];let c;return e[10]!==n||e[11]!==f||e[12]!==a||e[13]!==l?(c=t.jsxs("button",{type:"button",onClick:n,className:r,"aria-label":f,children:[a,l]}),e[10]=n,e[11]=f,e[12]=a,e[13]=l,e[14]=c):c=e[14],c}function ge(s){const e=g.c(15),{virtualMcps:m,selectedVirtualMcpId:i,onVirtualMcpChange:x}=s,[n,r]=N.useState(!1),f=N.useRef(null),o=H();let a,l;e[0]!==o||e[1]!==n?(a=()=>{n&&!o&&setTimeout(()=>{f.current?.focus()},0)},l=[n,o],e[0]=o,e[1]=n,e[2]=a,e[3]=l):(a=e[2],l=e[3]),N.useEffect(a,l);let c;e[4]!==x?(c=v=>{x(v),r(!1)},e[4]=x,e[5]=c):c=e[5];const d=c;let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=A("flex flex-col items-center gap-1.5 sm:gap-3 p-1.5 sm:p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),e[6]=p):p=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(oe,{asChild:!0,children:t.jsxs("button",{type:"button",className:p,"aria-label":"See all agents",children:[t.jsx("div",{className:"size-12 rounded-xl bg-accent flex items-center justify-center shrink-0",children:t.jsx(fe,{size:20,className:"text-foreground"})}),t.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"See all"})]})}),e[7]=u):u=e[7];let j;e[8]!==d||e[9]!==i||e[10]!==m?(j=t.jsx(ne,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:t.jsx(ee,{virtualMcps:m,selectedVirtualMcpId:i,onVirtualMcpChange:d,searchInputRef:f})}),e[8]=d,e[9]=i,e[10]=m,e[11]=j):j=e[11];let b;return e[12]!==n||e[13]!==j?(b=t.jsxs(ae,{open:n,onOpenChange:r,children:[u,j]}),e[12]=n,e[13]=j,e[14]=b):b=e[14],b}function be(){const s=g.c(17),e=de(),{selectedVirtualMcp:m,setVirtualMcpId:i}=G();let x,n,r,f,o;if(s[0]!==e){f=Symbol.for("react.early_return_sentinel");e:{const p=e.filter(ye).slice(0,6);if(p.length===0){f=null;break e}o=e.map(ve),r="w-full max-w-[800px]",x="flex gap-4 overflow-x-auto no-scrollbar py-2 sm:py-0 sm:grid sm:grid-cols-4 md:grid-cols-7 sm:gap-6",n=p.map(Ne)}s[0]=e,s[1]=x,s[2]=n,s[3]=r,s[4]=f,s[5]=o}else x=s[1],n=s[2],r=s[3],f=s[4],o=s[5];if(f!==Symbol.for("react.early_return_sentinel"))return f;const a=m?.id??null;let l;s[6]!==i||s[7]!==a||s[8]!==o?(l=t.jsx(ge,{virtualMcps:o,selectedVirtualMcpId:a,onVirtualMcpChange:i}),s[6]=i,s[7]=a,s[8]=o,s[9]=l):l=s[9];let c;s[10]!==x||s[11]!==n||s[12]!==l?(c=t.jsxs("div",{className:x,children:[n,l]}),s[10]=x,s[11]=n,s[12]=l,s[13]=c):c=s[13];let d;return s[14]!==r||s[15]!==c?(d=t.jsx("div",{className:r,children:c}),s[14]=r,s[15]=c,s[16]=d):d=s[16],d}function Ne(s){return t.jsx(je,{agent:s},s.id??"default")}function ve(s){return{id:s.id,title:s.title,description:s.description,icon:s.icon}}function ye(s){return s.id!==null&&!ce(s.id)}function we(){const s=g.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"w-full max-w-[800px]",children:t.jsx("div",{className:"flex gap-4 overflow-x-auto no-scrollbar py-2 sm:py-0 sm:grid sm:grid-cols-4 md:grid-cols-7 sm:gap-6",children:Array.from({length:7}).map(Ce)})}),s[0]=e):e=s[0],e}function Ce(s,e){return t.jsxs("div",{className:"flex flex-col items-center gap-1.5 sm:gap-3 p-1.5 sm:p-2 self-stretch",children:[t.jsx(L,{className:"size-12 rounded-xl shrink-0"}),t.jsx(L,{className:"h-3 sm:h-4 w-full"})]},e)}function D(){const s=g.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(N.Suspense,{fallback:t.jsx(we,{}),children:t.jsx(be,{})}),s[0]=e):e=s[0],e}function F(s){const e=g.c(43),{showContext:m,setShowContext:i}=s,{org:x}=Q(),{data:n}=X.useSession(),{isChatEmpty:r,activeTaskId:f,tasks:o,selectedVirtualMcp:a,createTask:l,switchToTask:c}=K();let d;if(e[0]!==f||e[1]!==o){let P;e[3]!==f?(P=U=>U.id===f,e[3]=f,e[4]=P):P=e[4],d=o.find(P),e[0]=f,e[1]=o,e[2]=d}else d=e[2];const p=d,u=H(),[j,b]=N.useState(!1);let v;e[5]!==n?.user?.name?(v=n?.user?.name?.split(" ")[0]||"there",e[5]=n?.user?.name,e[6]=v):v=e[6];const V=v;let $;e[7]!==x.id?($=me(x.id),e[7]=x.id,e[8]=$):$=e[8];const y=a??$;let w;e[9]!==p?(w=p?.title&&t.jsx(Z,{taskId:p.id,text:p.title,className:"text-sm font-medium text-foreground"}),e[9]=p,e[10]=w):w=e[10];let C;e[11]!==w?(C=t.jsx(T.Header.Left,{className:"gap-2",children:w}),e[11]=w,e[12]=C):C=e[12];let S;e[13]!==l||e[14]!==r||e[15]!==u?(S=u&&t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>l(),disabled:r,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:t.jsx(he,{size:16,className:"text-muted-foreground"})}),t.jsx("button",{type:"button",onClick:()=>b(!0),className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors",title:"Tasks",children:t.jsx(re,{size:16,className:"text-muted-foreground"})})]}),e[13]=l,e[14]=r,e[15]=u,e[16]=S):S=e[16];let k;e[17]!==r||e[18]!==u||e[19]!==i||e[20]!==m?(k=!r&&!u&&t.jsx("button",{type:"button",onClick:()=>i(Se),className:A("flex size-7 items-center justify-center rounded-md border border-input hover:bg-accent transition-colors",m&&"bg-accent"),title:"Toggle context panel",children:t.jsx(ie,{size:14,className:"text-muted-foreground"})}),e[17]=r,e[18]=u,e[19]=i,e[20]=m,e[21]=k):k=e[21];let _;e[22]!==S||e[23]!==k?(_=t.jsxs(T.Header.Right,{className:"gap-1",children:[S,k]}),e[22]=S,e[23]=k,e[24]=_):_=e[24];let z;e[25]!==C||e[26]!==_?(z=t.jsxs(T.Header,{className:"flex-none z-10 bg-background",children:[C,_]}),e[25]=C,e[26]=_,e[27]=z):z=e[27];let M;e[28]!==u||e[29]!==j||e[30]!==c?(M=u&&t.jsx(pe,{open:j,onOpenChange:b,direction:"bottom",children:t.jsx(ue,{className:"h-[90vh] max-h-[90vh]",children:t.jsx("div",{className:"flex-1 overflow-hidden",children:t.jsx(W,{onTaskSelect:async P=>{await c(P),b(!1)}})})})}),e[28]=u,e[29]=j,e[30]=c,e[31]=M):M=e[31];let I;e[32]!==y||e[33]!==r||e[34]!==u||e[35]!==a||e[36]!==i||e[37]!==V?(I=r?u?t.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[t.jsx("div",{className:"flex-1 flex flex-col items-center justify-center px-4",children:t.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[t.jsx("div",{className:"flex justify-center mb-4",children:t.jsx(B,{icon:y.icon,name:y.title,size:"md",className:A("transition-opacity duration-200",!a&&"invisible")})}),t.jsx("div",{className:"text-center",children:t.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",V,"?"]})})]})}),t.jsxs("div",{className:"shrink-0 flex flex-col items-center w-full gap-3 pb-2",children:[t.jsxs("div",{className:"flex flex-col items-center w-full max-w-2xl mx-auto gap-4 px-4",children:[t.jsx(h.IceBreakers,{className:"w-full"}),t.jsx("div",{className:"flex flex-col items-center w-full",children:t.jsx(D,{})})]}),t.jsx(h.Footer,{children:t.jsx(h.Input,{})})]})]}):t.jsx("div",{className:"flex-1 flex flex-col items-center justify-center px-10",children:t.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[t.jsx("div",{className:"flex justify-center mb-4",children:t.jsx(B,{icon:y.icon,name:y.title,size:"md",className:A("transition-opacity duration-200",!a&&"invisible")})}),t.jsx("div",{className:"text-center mb-6",children:t.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",V,"?"]})}),t.jsx(h.IceBreakers,{className:"w-full"}),t.jsx("div",{className:"w-full",children:t.jsx(h.Input,{onOpenContextPanel:()=>i(!0)})}),t.jsx("div",{className:"flex flex-col items-center w-full mt-16",children:t.jsx(D,{})})]})}):t.jsxs(t.Fragment,{children:[t.jsx(h.Main,{children:t.jsx(h.Messages,{})}),t.jsx(h.Footer,{children:t.jsx(h.Input,{onOpenContextPanel:()=>i(!0)})})]}),e[32]=y,e[33]=r,e[34]=u,e[35]=a,e[36]=i,e[37]=V,e[38]=I):I=e[38];let E;return e[39]!==M||e[40]!==I||e[41]!==z?(E=t.jsxs(h,{className:"h-full bg-background",children:[z,M,I]}),e[39]=M,e[40]=I,e[41]=z,e[42]=E):E=e[42],E}function Se(s){return!s}function ke(){const s=g.c(15),{allModelsConnections:e}=K(),m=H(),[i,x]=N.useState(!1);if(e.length===0){let d;return s[0]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"flex flex-col h-full bg-background items-center justify-center",children:t.jsx(h.NoLlmBindingEmptyState,{})}),s[0]=d):d=s[0],d}if(m){let d;return s[1]!==i?(d=t.jsx("div",{className:"size-full",children:t.jsx(F,{showContext:i,setShowContext:x})}),s[1]=i,s[2]=d):d=s[2],d}let n,r;s[3]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(R,{defaultSize:20,minSize:10,id:"tasks",order:1,children:t.jsx(W,{})}),r=t.jsx(O,{className:"bg-border/30"}),s[3]=n,s[4]=r):(n=s[3],r=s[4]);const f=i?50:80;let o;s[5]!==i?(o=t.jsx(F,{showContext:i,setShowContext:x}),s[5]=i,s[6]=o):o=s[6];let a;s[7]!==f||s[8]!==o?(a=t.jsx(R,{defaultSize:f,minSize:30,id:"main",order:2,children:o}),s[7]=f,s[8]=o,s[9]=a):a=s[9];let l;s[10]!==i?(l=i&&t.jsxs(t.Fragment,{children:[t.jsx(O,{className:"bg-border/30"}),t.jsx(R,{defaultSize:30,minSize:15,id:"context",order:3,children:t.jsx(Y,{onClose:()=>x(!1)})})]}),s[10]=i,s[11]=l):l=s[11];let c;return s[12]!==a||s[13]!==l?(c=t.jsxs(xe,{direction:"horizontal",className:"size-full",children:[n,r,a,l]}),s[12]=a,s[13]=l,s[14]=c):c=s[14],c}function _e(s){const e=g.c(14),{error:m,onRetry:i}=s,x=m?.message?.includes("401")||m?.message?.toLowerCase().includes("unauthorized");let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs(T.Header,{className:"flex-none",children:[t.jsx(T.Header.Left,{className:"gap-2"}),t.jsx(T.Header.Right,{className:"gap-1"})]}),e[0]=n):n=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:t.jsx(le,{className:"h-6 w-6 text-destructive"})}),e[1]=r):r=e[1];const f=x?"Unable to load models":"Something went wrong";let o;e[2]!==f?(o=t.jsx("h3",{className:"text-lg font-medium",children:f}),e[2]=f,e[3]=o):o=e[3];const a=x?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":m?.message||"An unexpected error occurred";let l;e[4]!==a?(l=t.jsx("p",{className:"text-sm text-muted-foreground",children:a}),e[4]=a,e[5]=l):l=e[5];let c;e[6]!==o||e[7]!==l?(c=t.jsxs("div",{className:"space-y-2",children:[o,l]}),e[6]=o,e[7]=l,e[8]=c):c=e[8];let d;e[9]!==i?(d=t.jsx(J,{variant:"outline",onClick:i,children:"Try again"}),e[9]=i,e[10]=d):d=e[10];let p;return e[11]!==c||e[12]!==d?(p=t.jsxs(h,{children:[n,t.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:t.jsxs("div",{className:"max-w-sm space-y-4",children:[r,c,d]})})]}),e[11]=c,e[12]=d,e[13]=p):p=e[13],p}function os(){const s=g.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(q,{fallback:ze,children:t.jsx(N.Suspense,{fallback:t.jsx(h.Skeleton,{}),children:t.jsx(ke,{})})}),s[0]=e):e=s[0],e}function ze(s){const{error:e,resetError:m}=s;return t.jsx(_e,{error:e,onRetry:m})}export{os as default};
|
|
1
|
+
import{c as g,j as t,r as N,D as A,E as q,B as J,u as Q,f as X}from"./index-BKxenrdO.js";import{C as h}from"./task-status-CfdaAVDd.js";import{C as Y,E as Z}from"./editable-task-title-Br5O_iLC.js";import{a as W}from"./tasks-panel-CngVyrSR.js";import{u as G,a as K}from"./context-BPeBGjOy.js";import{V as ee}from"./select-virtual-mcp-CQf_NH1Z.js";import{I as te,t as se,g as le,h as ie,A as B,n as re}from"./integration-icon-DgW660ho.js";import{a as oe,b as ne,P as ae}from"./popover-CRZZJD6X.js";import{S as L}from"./skeleton-DdkQJ8Ke.js";import{i as ce,d as me}from"./constants-DEVLPir8.js";import{b as de}from"./use-virtual-mcp-BZiKlRZJ.js";import{i as fe}from"./ChevronRight-BpkTLj3y.js";import{u as H}from"./tooltip-BYpVdvUr.js";import{P as T}from"./index-BHTlDqaD.js";import{R,a as O,b as xe}from"./resizable-nYmcarWg.js";import{D as pe,a as ue}from"./drawer-Bl6NlnaH.js";import{s as he}from"./Plus-BA7Rfpr-.js";import"./spinner-BbwK2nZf.js";import"./use-mcp-prompts-FfAzq9P9.js";import"./useQuery-DG4WKkPy.js";import"./dialog-BCMFAhkI.js";import"./X-DaCoKlVZ.js";import"./form-DUoo-ylF.js";import"./label-CwYk_3Ey.js";import"./input-BOFUz0aj.js";import"./index-CJahu32N.js";import"./usage-BW6ztpN6.js";import"./ArrowUp-BQ0GwMhq.js";import"./ChevronDown-TWcZ4kJ9.js";import"./XCircle-DZHeGFcX.js";import"./org-ai-providers-Cz242a6o.js";import"./useMutation-BaFlpWJP.js";import"./AlertCircle-vb3SCqTR.js";import"./RefreshCcw01-B6mp4o28.js";import"./Play-eTAbgb-w.js";import"./Trash01-eIuymuN8.js";import"./card-ChQFWIen.js";import"./toggle-group-DB7gCSVI.js";import"./avatar-CojTV7kK.js";import"./User01-DN32uzYn.js";import"./ai-providers-logos-D_53AnVk.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./select-LSyRUUkM.js";import"./index-BdQq_4o_.js";import"./index-hk9wzRwg.js";import"./Check-EBIfpKfk.js";import"./ChevronUp-DMmIo8iD.js";import"./ArrowLeft-UgY0HH3_.js";import"./use-copy-RSAu7_j7.js";import"./marked.esm-BaswSlok.js";import"./tabs-D48yslt8.js";import"./checkbox-D_kbciPC.js";import"./VideoRecorder-BQGrK2bZ.js";import"./SearchMd-4_up1TLU.js";import"./Settings01-lbicxKIn.js";import"./use-mcp-resources-Jm6NvGgP.js";import"./collapsible-Doonaq5y.js";import"./index-D73K8P0E.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DGEXm5IH.js";import"./types-1J8PljZw.js";import"./XClose-D_0o1f9F.js";import"./Type01-DCWXkwdC.js";import"./use-collections-DNZPF16v.js";import"./useSuspenseInfiniteQuery-DKieyXx7.js";import"./infiniteQueryObserver-D-mOGz06.js";import"./Loading01-oEWzHjsc.js";import"./collection-search-BWbixDRp.js";import"./user-Bx46t5R3.js";import"./format-time-CMKyl-GC.js";import"./empty-state-C0dwe4U0.js";import"./dropdown-menu-BbHSISkN.js";import"./decopilot-events-Brt4gAR6.js";import"./index-DaynUkW8.js";import"./use-create-virtual-mcp-CrkA34pw.js";import"./Container-Dt8UalAF.js";import"./Dataflow03-DLl2RzQp.js";import"./Download01-Dw7P9-4i.js";import"./List-3ufZUeAi.js";import"./FolderClosed-D8TIwtpx.js";import"./Grid01-CmDjkAry.js";import"./Upload01-BSFuoakK.js";import"./Zap-D0bIVVjW.js";function je(s){const e=g.c(15),{agent:m}=s,{setVirtualMcpId:i}=G();let x;e[0]!==m.id||e[1]!==i?(x=()=>{i(m.id)},e[0]=m.id,e[1]=i,e[2]=x):x=e[2];const n=x;let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=A("flex flex-col items-center gap-1.5 sm:gap-3 p-1.5 sm:p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),e[3]=r):r=e[3];const f=`Select agent ${m.title}`;let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(se,{size:24}),e[4]=o):o=e[4];let a;e[5]!==m.icon||e[6]!==m.title?(a=t.jsx(te,{icon:m.icon,name:m.title,size:"md",fallbackIcon:o}),e[5]=m.icon,e[6]=m.title,e[7]=a):a=e[7];let l;e[8]!==m.title?(l=t.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight line-clamp-2",children:m.title}),e[8]=m.title,e[9]=l):l=e[9];let c;return e[10]!==n||e[11]!==f||e[12]!==a||e[13]!==l?(c=t.jsxs("button",{type:"button",onClick:n,className:r,"aria-label":f,children:[a,l]}),e[10]=n,e[11]=f,e[12]=a,e[13]=l,e[14]=c):c=e[14],c}function ge(s){const e=g.c(15),{virtualMcps:m,selectedVirtualMcpId:i,onVirtualMcpChange:x}=s,[n,r]=N.useState(!1),f=N.useRef(null),o=H();let a,l;e[0]!==o||e[1]!==n?(a=()=>{n&&!o&&setTimeout(()=>{f.current?.focus()},0)},l=[n,o],e[0]=o,e[1]=n,e[2]=a,e[3]=l):(a=e[2],l=e[3]),N.useEffect(a,l);let c;e[4]!==x?(c=v=>{x(v),r(!1)},e[4]=x,e[5]=c):c=e[5];const d=c;let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=A("flex flex-col items-center gap-1.5 sm:gap-3 p-1.5 sm:p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),e[6]=p):p=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(oe,{asChild:!0,children:t.jsxs("button",{type:"button",className:p,"aria-label":"See all agents",children:[t.jsx("div",{className:"size-12 rounded-xl bg-accent flex items-center justify-center shrink-0",children:t.jsx(fe,{size:20,className:"text-foreground"})}),t.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"See all"})]})}),e[7]=u):u=e[7];let j;e[8]!==d||e[9]!==i||e[10]!==m?(j=t.jsx(ne,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:t.jsx(ee,{virtualMcps:m,selectedVirtualMcpId:i,onVirtualMcpChange:d,searchInputRef:f})}),e[8]=d,e[9]=i,e[10]=m,e[11]=j):j=e[11];let b;return e[12]!==n||e[13]!==j?(b=t.jsxs(ae,{open:n,onOpenChange:r,children:[u,j]}),e[12]=n,e[13]=j,e[14]=b):b=e[14],b}function be(){const s=g.c(17),e=de(),{selectedVirtualMcp:m,setVirtualMcpId:i}=G();let x,n,r,f,o;if(s[0]!==e){f=Symbol.for("react.early_return_sentinel");e:{const p=e.filter(ye).slice(0,6);if(p.length===0){f=null;break e}o=e.map(ve),r="w-full max-w-[800px]",x="flex gap-4 overflow-x-auto no-scrollbar py-2 sm:py-0 sm:grid sm:grid-cols-4 md:grid-cols-7 sm:gap-6",n=p.map(Ne)}s[0]=e,s[1]=x,s[2]=n,s[3]=r,s[4]=f,s[5]=o}else x=s[1],n=s[2],r=s[3],f=s[4],o=s[5];if(f!==Symbol.for("react.early_return_sentinel"))return f;const a=m?.id??null;let l;s[6]!==i||s[7]!==a||s[8]!==o?(l=t.jsx(ge,{virtualMcps:o,selectedVirtualMcpId:a,onVirtualMcpChange:i}),s[6]=i,s[7]=a,s[8]=o,s[9]=l):l=s[9];let c;s[10]!==x||s[11]!==n||s[12]!==l?(c=t.jsxs("div",{className:x,children:[n,l]}),s[10]=x,s[11]=n,s[12]=l,s[13]=c):c=s[13];let d;return s[14]!==r||s[15]!==c?(d=t.jsx("div",{className:r,children:c}),s[14]=r,s[15]=c,s[16]=d):d=s[16],d}function Ne(s){return t.jsx(je,{agent:s},s.id??"default")}function ve(s){return{id:s.id,title:s.title,description:s.description,icon:s.icon}}function ye(s){return s.id!==null&&!ce(s.id)}function we(){const s=g.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"w-full max-w-[800px]",children:t.jsx("div",{className:"flex gap-4 overflow-x-auto no-scrollbar py-2 sm:py-0 sm:grid sm:grid-cols-4 md:grid-cols-7 sm:gap-6",children:Array.from({length:7}).map(Ce)})}),s[0]=e):e=s[0],e}function Ce(s,e){return t.jsxs("div",{className:"flex flex-col items-center gap-1.5 sm:gap-3 p-1.5 sm:p-2 self-stretch",children:[t.jsx(L,{className:"size-12 rounded-xl shrink-0"}),t.jsx(L,{className:"h-3 sm:h-4 w-full"})]},e)}function D(){const s=g.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(N.Suspense,{fallback:t.jsx(we,{}),children:t.jsx(be,{})}),s[0]=e):e=s[0],e}function F(s){const e=g.c(43),{showContext:m,setShowContext:i}=s,{org:x}=Q(),{data:n}=X.useSession(),{isChatEmpty:r,activeTaskId:f,tasks:o,selectedVirtualMcp:a,createTask:l,switchToTask:c}=K();let d;if(e[0]!==f||e[1]!==o){let P;e[3]!==f?(P=U=>U.id===f,e[3]=f,e[4]=P):P=e[4],d=o.find(P),e[0]=f,e[1]=o,e[2]=d}else d=e[2];const p=d,u=H(),[j,b]=N.useState(!1);let v;e[5]!==n?.user?.name?(v=n?.user?.name?.split(" ")[0]||"there",e[5]=n?.user?.name,e[6]=v):v=e[6];const V=v;let $;e[7]!==x.id?($=me(x.id),e[7]=x.id,e[8]=$):$=e[8];const y=a??$;let w;e[9]!==p?(w=p?.title&&t.jsx(Z,{taskId:p.id,text:p.title,className:"text-sm font-medium text-foreground"}),e[9]=p,e[10]=w):w=e[10];let C;e[11]!==w?(C=t.jsx(T.Header.Left,{className:"gap-2",children:w}),e[11]=w,e[12]=C):C=e[12];let S;e[13]!==l||e[14]!==r||e[15]!==u?(S=u&&t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>l(),disabled:r,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:t.jsx(he,{size:16,className:"text-muted-foreground"})}),t.jsx("button",{type:"button",onClick:()=>b(!0),className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors",title:"Tasks",children:t.jsx(re,{size:16,className:"text-muted-foreground"})})]}),e[13]=l,e[14]=r,e[15]=u,e[16]=S):S=e[16];let k;e[17]!==r||e[18]!==u||e[19]!==i||e[20]!==m?(k=!r&&!u&&t.jsx("button",{type:"button",onClick:()=>i(Se),className:A("flex size-7 items-center justify-center rounded-md border border-input hover:bg-accent transition-colors",m&&"bg-accent"),title:"Toggle context panel",children:t.jsx(ie,{size:14,className:"text-muted-foreground"})}),e[17]=r,e[18]=u,e[19]=i,e[20]=m,e[21]=k):k=e[21];let _;e[22]!==S||e[23]!==k?(_=t.jsxs(T.Header.Right,{className:"gap-1",children:[S,k]}),e[22]=S,e[23]=k,e[24]=_):_=e[24];let z;e[25]!==C||e[26]!==_?(z=t.jsxs(T.Header,{className:"flex-none z-10 bg-background",children:[C,_]}),e[25]=C,e[26]=_,e[27]=z):z=e[27];let M;e[28]!==u||e[29]!==j||e[30]!==c?(M=u&&t.jsx(pe,{open:j,onOpenChange:b,direction:"bottom",children:t.jsx(ue,{className:"h-[90vh] max-h-[90vh]",children:t.jsx("div",{className:"flex-1 overflow-hidden",children:t.jsx(W,{onTaskSelect:async P=>{await c(P),b(!1)}})})})}),e[28]=u,e[29]=j,e[30]=c,e[31]=M):M=e[31];let I;e[32]!==y||e[33]!==r||e[34]!==u||e[35]!==a||e[36]!==i||e[37]!==V?(I=r?u?t.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[t.jsx("div",{className:"flex-1 flex flex-col items-center justify-center px-4",children:t.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[t.jsx("div",{className:"flex justify-center mb-4",children:t.jsx(B,{icon:y.icon,name:y.title,size:"md",className:A("transition-opacity duration-200",!a&&"invisible")})}),t.jsx("div",{className:"text-center",children:t.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",V,"?"]})})]})}),t.jsxs("div",{className:"shrink-0 flex flex-col items-center w-full gap-3 pb-2",children:[t.jsxs("div",{className:"flex flex-col items-center w-full max-w-2xl mx-auto gap-4 px-4",children:[t.jsx(h.IceBreakers,{className:"w-full"}),t.jsx("div",{className:"flex flex-col items-center w-full",children:t.jsx(D,{})})]}),t.jsx(h.Footer,{children:t.jsx(h.Input,{})})]})]}):t.jsx("div",{className:"flex-1 flex flex-col items-center justify-center px-10",children:t.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[t.jsx("div",{className:"flex justify-center mb-4",children:t.jsx(B,{icon:y.icon,name:y.title,size:"md",className:A("transition-opacity duration-200",!a&&"invisible")})}),t.jsx("div",{className:"text-center mb-6",children:t.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",V,"?"]})}),t.jsx(h.IceBreakers,{className:"w-full"}),t.jsx("div",{className:"w-full",children:t.jsx(h.Input,{onOpenContextPanel:()=>i(!0)})}),t.jsx("div",{className:"flex flex-col items-center w-full mt-16",children:t.jsx(D,{})})]})}):t.jsxs(t.Fragment,{children:[t.jsx(h.Main,{children:t.jsx(h.Messages,{})}),t.jsx(h.Footer,{children:t.jsx(h.Input,{onOpenContextPanel:()=>i(!0)})})]}),e[32]=y,e[33]=r,e[34]=u,e[35]=a,e[36]=i,e[37]=V,e[38]=I):I=e[38];let E;return e[39]!==M||e[40]!==I||e[41]!==z?(E=t.jsxs(h,{className:"h-full bg-background",children:[z,M,I]}),e[39]=M,e[40]=I,e[41]=z,e[42]=E):E=e[42],E}function Se(s){return!s}function ke(){const s=g.c(15),{allModelsConnections:e}=K(),m=H(),[i,x]=N.useState(!1);if(e.length===0){let d;return s[0]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"flex flex-col h-full bg-background items-center justify-center",children:t.jsx(h.NoLlmBindingEmptyState,{})}),s[0]=d):d=s[0],d}if(m){let d;return s[1]!==i?(d=t.jsx("div",{className:"size-full",children:t.jsx(F,{showContext:i,setShowContext:x})}),s[1]=i,s[2]=d):d=s[2],d}let n,r;s[3]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(R,{defaultSize:20,minSize:10,id:"tasks",order:1,children:t.jsx(W,{})}),r=t.jsx(O,{className:"bg-border/30"}),s[3]=n,s[4]=r):(n=s[3],r=s[4]);const f=i?50:80;let o;s[5]!==i?(o=t.jsx(F,{showContext:i,setShowContext:x}),s[5]=i,s[6]=o):o=s[6];let a;s[7]!==f||s[8]!==o?(a=t.jsx(R,{defaultSize:f,minSize:30,id:"main",order:2,children:o}),s[7]=f,s[8]=o,s[9]=a):a=s[9];let l;s[10]!==i?(l=i&&t.jsxs(t.Fragment,{children:[t.jsx(O,{className:"bg-border/30"}),t.jsx(R,{defaultSize:30,minSize:15,id:"context",order:3,children:t.jsx(Y,{onClose:()=>x(!1)})})]}),s[10]=i,s[11]=l):l=s[11];let c;return s[12]!==a||s[13]!==l?(c=t.jsxs(xe,{direction:"horizontal",className:"size-full",children:[n,r,a,l]}),s[12]=a,s[13]=l,s[14]=c):c=s[14],c}function _e(s){const e=g.c(14),{error:m,onRetry:i}=s,x=m?.message?.includes("401")||m?.message?.toLowerCase().includes("unauthorized");let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs(T.Header,{className:"flex-none",children:[t.jsx(T.Header.Left,{className:"gap-2"}),t.jsx(T.Header.Right,{className:"gap-1"})]}),e[0]=n):n=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:t.jsx(le,{className:"h-6 w-6 text-destructive"})}),e[1]=r):r=e[1];const f=x?"Unable to load models":"Something went wrong";let o;e[2]!==f?(o=t.jsx("h3",{className:"text-lg font-medium",children:f}),e[2]=f,e[3]=o):o=e[3];const a=x?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":m?.message||"An unexpected error occurred";let l;e[4]!==a?(l=t.jsx("p",{className:"text-sm text-muted-foreground",children:a}),e[4]=a,e[5]=l):l=e[5];let c;e[6]!==o||e[7]!==l?(c=t.jsxs("div",{className:"space-y-2",children:[o,l]}),e[6]=o,e[7]=l,e[8]=c):c=e[8];let d;e[9]!==i?(d=t.jsx(J,{variant:"outline",onClick:i,children:"Try again"}),e[9]=i,e[10]=d):d=e[10];let p;return e[11]!==c||e[12]!==d?(p=t.jsxs(h,{children:[n,t.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:t.jsxs("div",{className:"max-w-sm space-y-4",children:[r,c,d]})})]}),e[11]=c,e[12]=d,e[13]=p):p=e[13],p}function os(){const s=g.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(q,{fallback:ze,children:t.jsx(N.Suspense,{fallback:t.jsx(h.Skeleton,{}),children:t.jsx(ke,{})})}),s[0]=e):e=s[0],e}function ze(s){const{error:e,resetError:m}=s;return t.jsx(_e,{error:e,onRetry:m})}export{os as default};
|
package/dist/client/assets/{plugin-empty-state-DZ2dLLg8.js → plugin-empty-state-B3_dpS13.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,j as t}from"./index-
|
|
1
|
+
import{c as s,j as t}from"./index-BKxenrdO.js";import{e as r}from"./Dataflow03-DLl2RzQp.js";function a(){const o=s.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(r,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),o[0]=e):e=o[0],e}export{a as default};
|
package/dist/client/assets/{plugin-empty-state-D5d0HyD_.js → plugin-empty-state-Cj0RnDfG.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,j as t,aM as n}from"./index-
|
|
1
|
+
import{c as a,j as t,aM as n}from"./index-BKxenrdO.js";function c(){const s=a.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(n,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No storage connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an S3-compatible storage service to browse and manage files."})]}),s[0]=e):e=s[0],e}export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as w,j as s,r as S,aM as y}from"./index-
|
|
1
|
+
import{c as w,j as s,r as S,aM as y}from"./index-BKxenrdO.js";import{i as _}from"./Check-EBIfpKfk.js";import{t as k}from"./ChevronDown-TWcZ4kJ9.js";function E(x){const e=w.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=S.useState(!1),C=S.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const R=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Storage";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let a;e[15]!==i?(a=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=a):a=e[16];const v=i?.title||"Select storage";let c;e[17]!==v?(c=s.jsx("span",{children:v}),e[17]=v,e[18]=c):c=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(k,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==a||e[22]!==c?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[a,c,b]}),e[20]=o,e[21]=a,e[22]=c,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(_,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:R,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function O(x){const e=w.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,j as s,r as w}from"./index-
|
|
1
|
+
import{c as S,j as s,r as w}from"./index-BKxenrdO.js";import{i as R}from"./Check-EBIfpKfk.js";import{t as _}from"./ChevronDown-TWcZ4kJ9.js";import{e as y}from"./Dataflow03-DLl2RzQp.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{c as r,j as i}from"./index-BKxenrdO.js";import{P as m}from"./project-plugins-BaJYUdT2.js";import"./useQuery-DG4WKkPy.js";import"./useMutation-BaFlpWJP.js";import"./constants-DEVLPir8.js";import"./switch-C4iOvYgm.js";import"./label-CwYk_3Ey.js";import"./Container-Dt8UalAF.js";import"./use-connection-OaJxXLK-.js";import"./use-collections-DNZPF16v.js";import"./registry-utils-C0FVK22y.js";import"./binder-2uXLdWyj.js";import"./use-install-from-registry-Cw1tOxSk.js";import"./extract-connection-data-DJbja1-q.js";import"./constants-BLFOykPL.js";import"./generate-id-Dyweu44Y.js";import"./Loading01-oEWzHjsc.js";import"./Plus-BA7Rfpr-.js";import"./select-LSyRUUkM.js";import"./index-BdQq_4o_.js";import"./index-hk9wzRwg.js";import"./Check-EBIfpKfk.js";import"./ChevronDown-TWcZ4kJ9.js";import"./ChevronUp-DMmIo8iD.js";function v(){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{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,Y as $,j as c,b2 as L,a9 as z,$ as O,_ as A,a1 as g,b3 as _,a3 as j,b4 as G,b5 as w,b6 as H,b7 as K,a4 as U,b8 as V,b9 as W,ba as Y,bb as Z,bc as q,bd as B,c as R,D as J}from"./index-
|
|
1
|
+
import{r as i,Y as $,j as c,b2 as L,a9 as z,$ as O,_ as A,a1 as g,b3 as _,a3 as j,b4 as G,b5 as w,b6 as H,b7 as K,a4 as U,b8 as V,b9 as W,ba as Y,bb as Z,bc as q,bd as B,c as R,D as J}from"./index-BKxenrdO.js";var C="Popover",[E]=U(C,[w]),P=w(),[Q,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(Q,{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",X=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})});X.displayName=F;var S="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,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})});y.displayName=S;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=V("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 W(),c.jsx(Y,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(q,{"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(B,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,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=J("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{c as P,g as A,j as r,E as y,r as R,u as T}from"./index-
|
|
1
|
+
import{c as P,g as A,j as r,E as y,r as R,u as T}from"./index-BKxenrdO.js";import{u as S}from"./use-connection-OaJxXLK-.js";import{u as U}from"./constants-DEVLPir8.js";import{u as v}from"./use-mcp-tools-B10GVMq1.js";import{c as E}from"./content-blocks-o63cs2vh.js";import{M as H}from"./mcp-app-renderer-DGEXm5IH.js";import{g as O,M as $}from"./types-1J8PljZw.js";import{u as D}from"./context-BPeBGjOy.js";import{P as _,a as k}from"./index-BHTlDqaD.js";import"./use-collections-DNZPF16v.js";import"./useMutation-BaFlpWJP.js";import"./useQuery-DG4WKkPy.js";import"./use-mcp-resources-Jm6NvGgP.js";import"./decopilot-events-Brt4gAR6.js";import"./index-DaynUkW8.js";import"./tooltip-BYpVdvUr.js";import"./index-hk9wzRwg.js";import"./X-DaCoKlVZ.js";const b={};function w(t){const e=P.c(22),{client:o,resourceURI:m,tool:i,connectionId:f}=t,{sendMessage:a,setAppContext:c,clearAppContext:n}=D(),[,p]=k(),l=`${f}:${i.name}`;let d;e[0]!==o||e[1]!==i.name?(d={client:o,toolName:i.name,toolArguments:b},e[0]=o,e[1]=i.name,e[2]=d):d=e[2];const{data:u}=v(d);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 f;e[0]!==o||e[1]!==i.id?(f={connectionId:o,orgId:i.id},e[0]=o,e[1]=i.id,e[2]=f):f=e[2];const a=U(f),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 d=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||!d){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]!==d||e[15]!==l?(u=r.jsx(w,{client:a,resourceURI:d,tool:l,connectionId:o}),e[12]=a,e[13]=o,e[14]=d,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 f=`${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]!==f||t[7]!==c?(n=r.jsxs(_,{children:[i,r.jsx(_.Content,{children:r.jsx(y,{fallback:void 0,children:c},f)})]}),t[6]=f,t[7]=c,t[8]=n):n=t[8],n}export{le as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as w,f as ne,j as s,D as V,r as I,v as oe,o as he,n as W,e as ie,u as re,w as ge,t as je,q as be,K as ae,B as Q,O as D,P as fe,S as le,g as ye,aO as ve}from"./index-DLW7tZdu.js";import{u as ue}from"./use-project-DVq_144v.js";import{c as Se,a as Ne,D as _e}from"./dialog-Dmm_af5q.js";import{i as ke}from"./ArrowLeft-CrI91Scn.js";import{i as ce}from"./X-BL1q6dsE.js";import{S as G}from"./skeleton-BwiQLrEa.js";import{u as Ce,a as we,O as Pe}from"./org-ai-providers-DQw8Ry8m.js";import{A as pe}from"./avatar-87qJKKK_.js";import{K as ze,L as $e,t as Ae,M as Ie,N as Oe}from"./integration-icon-C-I4Z6Dk.js";import{t as Me}from"./Settings01-BoOhxJJj.js";import{i as Le}from"./Zap-DERWnfoj.js";import{a as Fe,b as Ee,c as Te,T as De}from"./tooltip-D-QYbPJS.js";import{i as Ue}from"./Check-BXqqUm0J.js";import{c as qe}from"./Play-Bw_aeuhq.js";import{S as Y}from"./switch-DqWbwfAd.js";import{S as Re,a as Be,d as H,c as Ge}from"./select-DeOQOwBi.js";import{i as Ke}from"./Type01-CjsMMlh6.js";import{a as Ve}from"./RefreshCcw01-YXuL16Jx.js";import"./index-CdK7iTUb.js";import{u as Qe}from"./useMutation-BatnVMWS.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-Obbe7UIk.js";import{I as me}from"./input-DgJ0xjPE.js";import{L as Ye}from"./logo-upload-CGF8q63h.js";import{P as He}from"./project-plugins-CzyuvjoL.js";import Xe from"./members-BX_g15fi.js";import"./useQuery-YHvrmKkI.js";import"./constants-Dzy_AMuL.js";import"./index-75eZ1uI1.js";import"./AlertCircle-BO0kzcBv.js";import"./XCircle-DxcmI8rf.js";import"./Trash01-D9O3UWX6.js";import"./card-CUrYBr2J.js";import"./toggle-group-DaaATQ-5.js";import"./popover-DnM-fBUa.js";import"./ai-providers-logos-BbTN2hb6.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./User01-BRC1qZ-u.js";import"./Container-BZeblIrR.js";import"./ArrowUp-FfROzAyV.js";import"./ChevronDown-B6V9GzuP.js";import"./ChevronRight-BSFLHUtv.js";import"./ChevronUp-BYpnL-9F.js";import"./Dataflow03-CTwEKVcs.js";import"./Download01-D7T-WxGL.js";import"./List-Bq1Yvo6z.js";import"./VideoRecorder-DkcbdsZk.js";import"./FolderClosed-BPzjOG-5.js";import"./Grid01-Bwsn0nh2.js";import"./Loading01-DCKwAh-U.js";import"./Plus-BW2fNoEy.js";import"./SearchMd-C_bEWIlQ.js";import"./Upload01-Bpjo_QI4.js";import"./XClose-CslgPORS.js";import"./index-CQPlxt4u.js";import"./index-BdQq_4o_.js";import"./label-BL4fRnZZ.js";import"./use-connection-DPMknCkO.js";import"./use-collections-BJxMmWLX.js";import"./registry-utils-D6No_i4P.js";import"./binder-BaB8rAtx.js";import"./use-install-from-registry-C1XqHuwX.js";import"./extract-connection-data-Zw5RYEyS.js";import"./constants-BTMGn0Px.js";import"./generate-id-Dyweu44Y.js";import"./collection-display-button-BetF6DhL.js";import"./dropdown-menu-BtgYu0Kc.js";import"./badge-C2jHxnoS.js";import"./collection-search-DcVVKJ8Q.js";import"./breadcrumb-CBpEGiAs.js";import"./collection-table-wrapper-D9WWtdCi.js";import"./table-CbTCyRX5.js";import"./checkbox-RHvkU3ym.js";import"./use-members-BRZ5u_Eq.js";import"./alert-dialog-yWVMNVBj.js";import"./empty-state-Cx44yC3Y.js";import"./textarea-CJ-1DHFH.js";import"./command-CMOZJSSv.js";import"./index-DCtU4ndp.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(Le,{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.185.0"]})}),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(Fe,{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 L;e[32]!==M?(L=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]=L):L=e[33];let R;e[34]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(xe,{}),e[34]=R):R=e[34];let F;e[35]!==n?(F=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]=F):F=e[36];let E;e[37]!==$||e[38]!==O||e[39]!==L||e[40]!==F?(E=s.jsxs("div",{className:$,children:[O,L,F]}),e[37]=$,e[38]=O,e[39]=L,e[40]=F,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 qs(){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{qs as default};
|
|
1
|
+
import{c as w,f as ne,j as s,D as V,r as I,v as oe,o as he,n as W,e as ie,u as re,w as ge,t as je,q as be,K as ae,B as Q,O as D,P as fe,S as le,g as ye,aO as ve}from"./index-BKxenrdO.js";import{u as ue}from"./use-project-BxO41BBL.js";import{c as Se,a as Ne,D as _e}from"./dialog-BCMFAhkI.js";import{i as ke}from"./ArrowLeft-UgY0HH3_.js";import{i as ce}from"./X-DaCoKlVZ.js";import{S as G}from"./skeleton-DdkQJ8Ke.js";import{u as Ce,a as we,O as Pe}from"./org-ai-providers-Cz242a6o.js";import{A as pe}from"./avatar-CojTV7kK.js";import{K as ze,L as $e,t as Ae,M as Ie,N as Oe}from"./integration-icon-DgW660ho.js";import{t as Me}from"./Settings01-lbicxKIn.js";import{i as Le}from"./Zap-D0bIVVjW.js";import{a as Fe,b as Ee,c as Te,T as De}from"./tooltip-BYpVdvUr.js";import{i as Ue}from"./Check-EBIfpKfk.js";import{c as qe}from"./Play-eTAbgb-w.js";import{S as Y}from"./switch-C4iOvYgm.js";import{S as Re,a as Be,d as H,c as Ge}from"./select-LSyRUUkM.js";import{i as Ke}from"./Type01-DCWXkwdC.js";import{a as Ve}from"./RefreshCcw01-B6mp4o28.js";import"./index-DaynUkW8.js";import{u as Qe}from"./useMutation-BaFlpWJP.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-DUoo-ylF.js";import{I as me}from"./input-BOFUz0aj.js";import{L as Ye}from"./logo-upload-CgauH7P2.js";import{P as He}from"./project-plugins-BaJYUdT2.js";import Xe from"./members-BE0-LX8z.js";import"./useQuery-DG4WKkPy.js";import"./constants-DEVLPir8.js";import"./index-BHTlDqaD.js";import"./AlertCircle-vb3SCqTR.js";import"./XCircle-DZHeGFcX.js";import"./Trash01-eIuymuN8.js";import"./card-ChQFWIen.js";import"./toggle-group-DB7gCSVI.js";import"./popover-CRZZJD6X.js";import"./ai-providers-logos-D_53AnVk.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./User01-DN32uzYn.js";import"./Container-Dt8UalAF.js";import"./ArrowUp-BQ0GwMhq.js";import"./ChevronDown-TWcZ4kJ9.js";import"./ChevronRight-BpkTLj3y.js";import"./ChevronUp-DMmIo8iD.js";import"./Dataflow03-DLl2RzQp.js";import"./Download01-Dw7P9-4i.js";import"./List-3ufZUeAi.js";import"./VideoRecorder-BQGrK2bZ.js";import"./FolderClosed-D8TIwtpx.js";import"./Grid01-CmDjkAry.js";import"./Loading01-oEWzHjsc.js";import"./Plus-BA7Rfpr-.js";import"./SearchMd-4_up1TLU.js";import"./Upload01-BSFuoakK.js";import"./XClose-D_0o1f9F.js";import"./index-hk9wzRwg.js";import"./index-BdQq_4o_.js";import"./label-CwYk_3Ey.js";import"./use-connection-OaJxXLK-.js";import"./use-collections-DNZPF16v.js";import"./registry-utils-C0FVK22y.js";import"./binder-2uXLdWyj.js";import"./use-install-from-registry-Cw1tOxSk.js";import"./extract-connection-data-DJbja1-q.js";import"./constants-BLFOykPL.js";import"./generate-id-Dyweu44Y.js";import"./collection-display-button-B_YB0Pvz.js";import"./dropdown-menu-BbHSISkN.js";import"./badge-Cj2aOlgl.js";import"./collection-search-BWbixDRp.js";import"./breadcrumb--82F68FS.js";import"./collection-table-wrapper-DQMCUU4F.js";import"./table-CvG2iH0y.js";import"./checkbox-D_kbciPC.js";import"./use-members-BEgSet5G.js";import"./alert-dialog-C5dI6ng4.js";import"./empty-state-C0dwe4U0.js";import"./textarea-pMGiDvfM.js";import"./command-CtOWm1VV.js";import"./index-Do3azGem.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(Le,{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.0"]})}),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(Fe,{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 L;e[32]!==M?(L=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]=L):L=e[33];let R;e[34]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(xe,{}),e[34]=R):R=e[34];let F;e[35]!==n?(F=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]=F):F=e[36];let E;e[37]!==$||e[38]!==O||e[39]!==L||e[40]!==F?(E=s.jsxs("div",{className:$,children:[O,L,F]}),e[37]=$,e[38]=O,e[39]=L,e[40]=F,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 qs(){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{qs as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as _,j as n,D as J,B as G,u as V,w as W,v as M,K as q,bj as D,bl as $,c as Q}from"./index-
|
|
1
|
+
import{r as _,j as n,D as J,B as G,u as V,w as W,v as M,K as q,bj as D,bl as $,c as Q}from"./index-BKxenrdO.js";import{u as Y}from"./useQuery-DG4WKkPy.js";import{u as H}from"./useMutation-BaFlpWJP.js";import{u as X,a as Z}from"./constants-DEVLPir8.js";import{S as ee}from"./switch-C4iOvYgm.js";import{L as te}from"./label-CwYk_3Ey.js";import{n as ne}from"./Container-Dt8UalAF.js";import{b as se}from"./use-connection-OaJxXLK-.js";import{d as ie,h as re}from"./registry-utils-C0FVK22y.js";import{u as oe}from"./use-install-from-registry-Cw1tOxSk.js";import{i as le}from"./Loading01-oEWzHjsc.js";import{s as ae}from"./Plus-BA7Rfpr-.js";import{S as ce,a as de,b as ue,c as me,d as z}from"./select-LSyRUUkM.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:v,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})(),N=(()=>{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})(),P=a?.startsWith("@"),A=async()=>{if(P&&a){d(!0);try{const t=await v(a);t&&e(t.id)}finally{d(!1)}return}y?.()},g=N.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"}),N.length===0?n.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No compatible connections found"}):N.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||P)&&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:v,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]!==v||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 v.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:d,pluginId:r.id}});return K(O)},e[5]=v,e[6]=r.id,e[7]=d,e[8]=m):m=e[8];const N=!!d&&w;let P;e[9]!==C||e[10]!==m||e[11]!==N?(P={queryKey:C,queryFn:m,enabled:N},e[9]=C,e[10]=m,e[11]=N,e[12]=P):P=e[12];const{data:A,isLoading:g}=Y(P),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),v=e.enabledPlugins??[],S=t=>{const s=a[t];return s!==void 0?s:v.includes(t)},b=()=>{const t=new Set(v);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=v.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)}}),N=()=>{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})},P=()=>{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:P,disabled:!u||j,children:"Cancel"}),n.jsx(G,{onClick:N,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{bk as pe,c as V,u as le,D as ae,j as s,G as he,e as ce,w as de,f as je,r as Q,B as G,K as me,v as ue,O as be}from"./index-DLW7tZdu.js";import{a as Ce}from"./use-project-DVq_144v.js";import{P as H}from"./index-75eZ1uI1.js";import{C as Ne}from"./collection-search-DcVVKJ8Q.js";import{A as ye}from"./avatar-87qJKKK_.js";import{f as ve}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as Se}from"./empty-state-Cx44yC3Y.js";import{g as we,C as ke}from"./create-project-dialog-BRQDkCBr.js";import{u as _e}from"./useQuery-YHvrmKkI.js";import{u as Ie}from"./useMutation-BatnVMWS.js";import{a as Pe,u as De}from"./constants-Dzy_AMuL.js";import{a as Ee,D as $e,c as ze,b as Le,d as Te,e as Oe}from"./dialog-Dmm_af5q.js";import{I as Ae}from"./input-DgJ0xjPE.js";import{g as Fe}from"./generate-id-Dyweu44Y.js";import{B as Re,a as Be,b as Me,c as qe}from"./breadcrumb-CBpEGiAs.js";import{s as Je}from"./FolderClosed-BPzjOG-5.js";import{s as ie}from"./Plus-BW2fNoEy.js";import"./tooltip-D-QYbPJS.js";import"./index-CQPlxt4u.js";import"./X-BL1q6dsE.js";import"./Loading01-DCKwAh-U.js";import"./SearchMd-C_bEWIlQ.js";import"./User01-BRC1qZ-u.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./form-Obbe7UIk.js";import"./label-BL4fRnZZ.js";import"./textarea-CJ-1DHFH.js";import"./Check-BXqqUm0J.js";import"./ChevronRight-BSFLHUtv.js";const Ke=pe("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 Ue(t){const e=V.c(58),{project:o,onSettingsClick:i}=t,{org:n}=le(),l=o.ui?.themeColor??"#60a5fa",k=o.ui?.bannerColor??l,h=o.ui?.banner?`url(${o.ui.banner})`:void 0;let c;e[0]!==k||e[1]!==h?(c={backgroundColor:k,backgroundImage:h,backgroundSize:"cover",backgroundPosition:"center"},e[0]=k,e[1]=h,e[2]=c):c=e[2];const E=c;let d;e[3]!==n.slug||e[4]!==o.slug?(d={org:n.slug,project:o.slug},e[3]=n.slug,e[4]=o.slug,e[5]=d):d=e[5];let N;e[6]!==i?(N=O=>{O.preventDefault(),O.stopPropagation(),i?.(O)},e[6]=i,e[7]=N):N=e[7];let y,x;e[8]===Symbol.for("react.memo_cache_sentinel")?(y=ae("absolute top-3 right-3 size-6 rounded-md flex items-center justify-center","bg-black/20 hover:bg-black/40 transition-colors"),x=s.jsx(Ke,{className:"size-3.5 text-white"}),e[8]=y,e[9]=x):(y=e[8],x=e[9]);let C;e[10]!==N?(C=s.jsx("button",{type:"button",onClick:N,className:y,children:x}),e[10]=N,e[11]=C):C=e[11];let m;e[12]!==E||e[13]!==C?(m=s.jsx("div",{className:"h-20 relative",style:E,children:C}),e[12]=E,e[13]=C,e[14]=m):m=e[14];let p;e[15]!==o.name||e[16]!==o.ui||e[17]!==l?(p=o.ui?.icon?s.jsx("img",{src:o.ui.icon,alt:"",className:"size-8 rounded-md object-cover"}):s.jsx("div",{className:"size-8 rounded-md flex items-center justify-center",style:{backgroundColor:l},children:s.jsx("span",{className:"text-sm font-medium text-white",children:o.name.charAt(0).toUpperCase()})}),e[15]=o.name,e[16]=o.ui,e[17]=l,e[18]=p):p=e[18];let u;e[19]!==o.name?(u=s.jsx("h3",{className:"font-medium text-base text-foreground truncate",children:o.name}),e[19]=o.name,e[20]=u):u=e[20];let _;e[21]!==o.updatedAt?(_=ve(new Date(o.updatedAt),{addSuffix:!0}),e[21]=o.updatedAt,e[22]=_):_=e[22];let f;e[23]!==_?(f=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Edited"," ",_]}),e[23]=_,e[24]=f):f=e[24];let P;e[25]!==u||e[26]!==f?(P=s.jsxs("div",{className:"flex flex-col",children:[u,f]}),e[25]=u,e[26]=f,e[27]=P):P=e[27];let I;e[28]!==p||e[29]!==P?(I=s.jsxs("div",{className:"flex flex-col gap-4",children:[p,P]}),e[28]=p,e[29]=P,e[30]=I):I=e[30];let v;e[31]!==o.boundConnections?(v=o.boundConnections.slice(0,4).map(Ve),e[31]=o.boundConnections,e[32]=v):v=e[32];let j;e[33]!==o.boundConnections.length?(j=o.boundConnections.length>4&&s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsxs("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center text-xs text-muted-foreground",children:["+",o.boundConnections.length-4]})}),e[33]=o.boundConnections.length,e[34]=j):j=e[34];let S;e[35]!==v||e[36]!==j?(S=s.jsxs("div",{className:"flex pr-2",children:[v,j]}),e[35]=v,e[36]=j,e[37]=S):S=e[37];const $=n.logo??void 0;let D;e[38]!==n.name||e[39]!==$?(D=s.jsx(ye,{url:$,fallback:n.name,size:"2xs",className:"shrink-0 rounded",objectFit:"cover"}),e[38]=n.name,e[39]=$,e[40]=D):D=e[40];let g;e[41]!==n.name?(g=s.jsx("span",{className:"truncate max-w-20",children:n.name}),e[41]=n.name,e[42]=g):g=e[42];let b;e[43]!==D||e[44]!==g?(b=s.jsxs("div",{className:"flex items-center gap-2 text-xs text-foreground",children:[D,g]}),e[43]=D,e[44]=g,e[45]=b):b=e[45];let w;e[46]!==S||e[47]!==b?(w=s.jsxs("div",{className:"flex items-center justify-between mt-4",children:[S,b]}),e[46]=S,e[47]=b,e[48]=w):w=e[48];let r;e[49]!==I||e[50]!==w?(r=s.jsxs("div",{className:"flex flex-col flex-1 justify-between p-4",children:[I,w]}),e[49]=I,e[50]=w,e[51]=r):r=e[51];let z;e[52]!==r||e[53]!==m?(z=s.jsxs("div",{className:"border border-border rounded-xl overflow-hidden bg-card",children:[m,r]}),e[52]=r,e[53]=m,e[54]=z):z=e[54];let T;return e[55]!==z||e[56]!==d?(T=s.jsx(he,{to:"/$org/$project",params:d,className:"block group",children:z}),e[55]=z,e[56]=d,e[57]=T):T=e[57],T}function Ve(t){return s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsx(He,{connection:t})},t.id)}function He(t){const e=V.c(13),{connection:o}=t;if(o.icon){let h;e[0]!==o.icon||e[1]!==o.title?(h=s.jsx("img",{src:o.icon,alt:o.title,className:"size-4 object-cover"}),e[0]=o.icon,e[1]=o.title,e[2]=h):h=e[2];let c;return e[3]!==o.title||e[4]!==h?(c=s.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:o.title,children:h}),e[3]=o.title,e[4]=h,e[5]=c):c=e[5],c}const i=o.title;let n;e[6]!==o.title?(n=o.title.charAt(0).toUpperCase(),e[6]=o.title,e[7]=n):n=e[7];let l;e[8]!==n?(l=s.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:n}),e[8]=n,e[9]=l):l=e[9];let k;return e[10]!==o.title||e[11]!==l?(k=s.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]=o.title,e[11]=l,e[12]=k):k=e[12],k}async function Qe(){const t=await fetch("/api/deco-sites");if(!t.ok){const e=await t.json().catch(()=>({}));throw new Error(e.error??`Failed to load sites (${t.status})`)}return t.json()}function Ge(t){const e=V.c(57),{open:o,onOpenChange:i}=t,{org:n}=le(),l=ce(),k=de(),{data:h}=je.useSession(),[c,E]=Q.useState(null),[d,N]=Q.useState("");let y;e[0]!==n.id?(y={connectionId:Pe,orgId:n.id},e[0]=n.id,e[1]=y):y=e[1];const x=De(y),C=h?.user?.email;let m;e[2]!==C?(m=["deco-sites",C],e[2]=C,e[3]=m):m=e[3];const p=o&&!!h?.user?.email;let u;e[4]!==m||e[5]!==p?(u={queryKey:m,queryFn:Qe,enabled:p,staleTime:6e4,retry:!1},e[4]=m,e[5]=p,e[6]=u):u=e[6];const{data:_,isLoading:f,error:P}=_e(u),I=_?.sites??[];let v;e[7]!==i?(v=a=>{a||(E(null),N("")),i(a)},e[7]=i,e[8]=v):v=e[8];const j=v;let S;e[9]!==d?(S=a=>a.name.toLowerCase().includes(d.toLowerCase())||a.domains?.[0]?.domain.toLowerCase().includes(d.toLowerCase()),e[9]=d,e[10]=S):S=e[10];const $=I.filter(S),D=!c||$.some(a=>a.name===c);let g;e[11]!==x||e[12]!==n.id?(g=async a=>{const L=Fe("conn"),oe=await fetch("/api/deco-sites/connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:a,connId:L,orgId:n.id})});if(!oe.ok){const xe=await oe.json().catch(Ye);throw new Error(xe.error??`Failed to create connection (${oe.status})`)}const re=await x.callTool({name:"PROJECT_CREATE",arguments:{organizationId:n.id,slug:we(a),name:a,description:"Imported from deco.cx",enabledPlugins:[],ui:{banner:null,bannerColor:"#22C55E",icon:null,themeColor:"#22C55E"}}}),ne=(re.structuredContent??re).project;return await x.callTool({name:"PROJECT_CONNECTION_ADD",arguments:{projectId:ne.id,connectionId:L}}),await x.callTool({name:"PROJECT_PINNED_VIEWS_UPDATE",arguments:{projectId:ne.id,pinnedViews:[{connectionId:L,toolName:"file_explorer",label:"Preview",icon:null},{connectionId:L,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:L,toolName:"get_monitor_data",label:"Monitor",icon:null}]}}),{project:ne,connId:L}},e[11]=x,e[12]=n.id,e[13]=g):g=e[13];let b;e[14]!==j||e[15]!==l||e[16]!==n.id||e[17]!==n.slug||e[18]!==k?(b=a=>{const{project:L}=a;k.invalidateQueries({queryKey:me.projects(n.id)}),ue.success(`Imported ${L.slug} from deco.cx`),j(!1),l({to:"/$org/$project",params:{org:n.slug,project:L.slug}})},e[14]=j,e[15]=l,e[16]=n.id,e[17]=n.slug,e[18]=k,e[19]=b):b=e[19];let w;e[20]!==g||e[21]!==b?(w={mutationFn:g,onSuccess:b,onError:We},e[20]=g,e[21]=b,e[22]=w):w=e[22];const r=Ie(w),z=h?.user?.email??"",T=$e,O=Ee,fe="max-w-md";let W;e[23]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(ze,{children:"Import from deco.cx"}),e[23]=W):W=e[23];const X=z?`Sites available for ${z}`:"Select the site you want to import.";let A;e[24]!==X?(A=s.jsxs(Le,{children:[W,s.jsx(Te,{children:X})]}),e[24]=X,e[25]=A):A=e[25];const ge="min-h-24";let F;e[26]!==f?(F=f&&s.jsx("div",{className:"flex items-center justify-center h-24 text-sm text-muted-foreground",children:"Loading sites..."}),e[26]=f,e[27]=F):F=e[27];const Z=!f&&!P&&I.length===0&&s.jsx("div",{className:"flex items-center justify-center h-24 text-sm text-muted-foreground",children:"No sites found for this account."}),ee=!f&&I.length>0&&s.jsxs("div",{className:"space-y-3",children:[s.jsx(Ae,{placeholder:"Search sites...",value:d,onChange:a=>N(a.target.value),autoFocus:!0}),s.jsxs("div",{className:"space-y-2 max-h-64 overflow-y-auto pr-1",children:[$.length===0&&s.jsxs("p",{className:"text-sm text-muted-foreground text-center py-4",children:["No sites match “",d,"”"]}),$.map(a=>s.jsxs("button",{type:"button",onClick:()=>E(a.name),className:ae("flex flex-col w-full text-left rounded-lg border px-4 py-3 transition-colors",c===a.name?"border-primary bg-primary/5 ring-1 ring-primary":"border-border hover:bg-muted/50"),children:[s.jsx("span",{className:"text-sm font-medium",children:a.name}),a.domains?.[0]&&s.jsx("span",{className:"text-xs text-muted-foreground",children:a.domains[0].domain})]},a.name))]})]});let R;e[28]!==F||e[29]!==Z||e[30]!==ee?(R=s.jsxs("div",{className:ge,children:[F,Z,ee]}),e[28]=F,e[29]=Z,e[30]=ee,e[31]=R):R=e[31];let B;e[32]!==j?(B=()=>j(!1),e[32]=j,e[33]=B):B=e[33];let M;e[34]!==r.isPending||e[35]!==B?(M=s.jsx(G,{variant:"outline",onClick:B,disabled:r.isPending,children:"Cancel"}),e[34]=r.isPending,e[35]=B,e[36]=M):M=e[36];const te=!c||!D||r.isPending||f;let q;e[37]!==r||e[38]!==c?(q=()=>c&&r.mutate(c),e[37]=r,e[38]=c,e[39]=q):q=e[39];const se=r.isPending?"Importing...":"Import";let J;e[40]!==te||e[41]!==q||e[42]!==se?(J=s.jsx(G,{disabled:te,onClick:q,children:se}),e[40]=te,e[41]=q,e[42]=se,e[43]=J):J=e[43];let K;e[44]!==M||e[45]!==J?(K=s.jsxs(Oe,{children:[M,J]}),e[44]=M,e[45]=J,e[46]=K):K=e[46];let U;e[47]!==O||e[48]!==A||e[49]!==R||e[50]!==K?(U=s.jsxs(O,{className:fe,children:[A,R,K]}),e[47]=O,e[48]=A,e[49]=R,e[50]=K,e[51]=U):U=e[51];let Y;return e[52]!==T||e[53]!==j||e[54]!==o||e[55]!==U?(Y=s.jsx(T,{open:o,onOpenChange:j,children:U}),e[52]=T,e[53]=j,e[54]=o,e[55]=U,e[56]=Y):Y=e[56],Y}function We(t){ue.error("Import failed: "+(t instanceof Error?t.message:"Unknown error"))}function Ye(){return{}}function Xe(){const t=V.c(2),e=de();let o;return t[0]!==e?(o=e.getQueryData(me.publicConfig())??{},t[0]=e,t[1]=o):o=t[1],o}function Ze(){const t=V.c(3),[e,o]=Q.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(G,{variant:"outline",onClick:()=>o(!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 n;return t[1]!==e?(n=s.jsxs(s.Fragment,{children:[i,s.jsx(Ge,{open:e,onOpenChange:o})]}),t[1]=e,t[2]=n):n=t[2],n}function $t(){const t=V.c(43),{org:e}=le(),{data:o,isLoading:i}=Ce(e.id),{enableDecoImport:n}=Xe(),[l,k]=Q.useState(""),[h,c]=Q.useState(!1),E=ce();let d,N,y,x,C,m,p,u;if(t[0]!==n||t[1]!==i||t[2]!==E||t[3]!==e.slug||t[4]!==o||t[5]!==l){const I=o?.filter(tt)?.filter(r=>r.name.toLowerCase().includes(l.toLowerCase())||r.description?.toLowerCase().includes(l.toLowerCase()))??[];let v;t[14]!==E||t[15]!==e.slug?(v=r=>{E({to:"/$org/$project/settings/general",params:{org:e.slug,project:r}})},t[14]=E,t[15]=e.slug,t[16]=v):v=t[16];const j=v;let S;t[17]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{c(!0)},t[17]=S):S=t[17];const $=S;N=H;let D;t[18]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(H.Header.Left,{children:s.jsx(Re,{children:s.jsx(Be,{children:s.jsx(Me,{children:s.jsx(qe,{children:"Projects"})})})})}),t[18]=D):D=t[18];let g;t[19]!==n?(g=n&&s.jsx(Ze,{}),t[19]=n,t[20]=g):g=t[20];let b;t[21]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsxs(G,{onClick:$,size:"sm",children:[s.jsx(ie,{size:14}),"Create Project"]}),t[21]=b):b=t[21],t[22]!==g?(p=s.jsxs(H.Header,{children:[D,s.jsxs(H.Header.Right,{children:[g,b]})]}),t[22]=g,t[23]=p):p=t[23];let w;t[24]===Symbol.for("react.memo_cache_sentinel")?(w=r=>{r.key==="Escape"&&(k(""),r.target.blur())},t[24]=w):w=t[24],t[25]!==l?(u=s.jsx(Ne,{value:l,onChange:k,placeholder:"Search for a project...",onKeyDown:w}),t[25]=l,t[26]=u):u=t[26],d=H.Content,y="@container",t[27]!==i?(x=i&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:[...Array(4)].map(et)})}),t[27]=i,t[28]=x):x=t[28],C=!i&&I.length===0&&s.jsx("div",{className:"flex items-center h-full",children:s.jsx(Se,{image:s.jsx(Je,{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&&s.jsxs(G,{size:"sm",onClick:$,children:[s.jsx(ie,{size:14}),"Create Project"]})})}),m=!i&&I.length>0&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:I.map(r=>s.jsx(Ue,{project:r,onSettingsClick:()=>j(r.slug)},r.id))})}),t[0]=n,t[1]=i,t[2]=E,t[3]=e.slug,t[4]=o,t[5]=l,t[6]=d,t[7]=N,t[8]=y,t[9]=x,t[10]=C,t[11]=m,t[12]=p,t[13]=u}else d=t[6],N=t[7],y=t[8],x=t[9],C=t[10],m=t[11],p=t[12],u=t[13];let _;t[29]!==d||t[30]!==y||t[31]!==x||t[32]!==C||t[33]!==m?(_=s.jsxs(d,{className:y,children:[x,C,m]}),t[29]=d,t[30]=y,t[31]=x,t[32]=C,t[33]=m,t[34]=_):_=t[34];let f;t[35]!==h?(f=s.jsx(ke,{open:h,onOpenChange:c}),t[35]=h,t[36]=f):f=t[36];let P;return t[37]!==N||t[38]!==p||t[39]!==u||t[40]!==_||t[41]!==f?(P=s.jsxs(N,{children:[p,u,_,f]}),t[37]=N,t[38]=p,t[39]=u,t[40]=_,t[41]=f,t[42]=P):P=t[42],P}function et(t,e){return s.jsx("div",{className:"h-[240px] rounded-xl bg-muted animate-pulse"},e)}function tt(t){return t.slug!==be}export{$t as default};
|
|
1
|
+
import{bk as pe,c as V,u as le,D as ae,j as s,G as he,e as ce,w as de,f as je,r as Q,B as G,K as me,v as ue,O as be}from"./index-BKxenrdO.js";import{a as Ce}from"./use-project-BxO41BBL.js";import{P as H}from"./index-BHTlDqaD.js";import{C as Ne}from"./collection-search-BWbixDRp.js";import{A as ye}from"./avatar-CojTV7kK.js";import{f as ve}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as Se}from"./empty-state-C0dwe4U0.js";import{g as we,C as ke}from"./create-project-dialog-D41xkdsb.js";import{u as _e}from"./useQuery-DG4WKkPy.js";import{u as Ie}from"./useMutation-BaFlpWJP.js";import{a as Pe,u as De}from"./constants-DEVLPir8.js";import{a as Ee,D as $e,c as ze,b as Le,d as Te,e as Oe}from"./dialog-BCMFAhkI.js";import{I as Ae}from"./input-BOFUz0aj.js";import{g as Fe}from"./generate-id-Dyweu44Y.js";import{B as Re,a as Be,b as Me,c as qe}from"./breadcrumb--82F68FS.js";import{s as Je}from"./FolderClosed-D8TIwtpx.js";import{s as ie}from"./Plus-BA7Rfpr-.js";import"./tooltip-BYpVdvUr.js";import"./index-hk9wzRwg.js";import"./X-DaCoKlVZ.js";import"./Loading01-oEWzHjsc.js";import"./SearchMd-4_up1TLU.js";import"./User01-DN32uzYn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./form-DUoo-ylF.js";import"./label-CwYk_3Ey.js";import"./textarea-pMGiDvfM.js";import"./Check-EBIfpKfk.js";import"./ChevronRight-BpkTLj3y.js";const Ke=pe("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 Ue(t){const e=V.c(58),{project:o,onSettingsClick:i}=t,{org:n}=le(),l=o.ui?.themeColor??"#60a5fa",k=o.ui?.bannerColor??l,h=o.ui?.banner?`url(${o.ui.banner})`:void 0;let c;e[0]!==k||e[1]!==h?(c={backgroundColor:k,backgroundImage:h,backgroundSize:"cover",backgroundPosition:"center"},e[0]=k,e[1]=h,e[2]=c):c=e[2];const E=c;let d;e[3]!==n.slug||e[4]!==o.slug?(d={org:n.slug,project:o.slug},e[3]=n.slug,e[4]=o.slug,e[5]=d):d=e[5];let N;e[6]!==i?(N=O=>{O.preventDefault(),O.stopPropagation(),i?.(O)},e[6]=i,e[7]=N):N=e[7];let y,x;e[8]===Symbol.for("react.memo_cache_sentinel")?(y=ae("absolute top-3 right-3 size-6 rounded-md flex items-center justify-center","bg-black/20 hover:bg-black/40 transition-colors"),x=s.jsx(Ke,{className:"size-3.5 text-white"}),e[8]=y,e[9]=x):(y=e[8],x=e[9]);let C;e[10]!==N?(C=s.jsx("button",{type:"button",onClick:N,className:y,children:x}),e[10]=N,e[11]=C):C=e[11];let m;e[12]!==E||e[13]!==C?(m=s.jsx("div",{className:"h-20 relative",style:E,children:C}),e[12]=E,e[13]=C,e[14]=m):m=e[14];let p;e[15]!==o.name||e[16]!==o.ui||e[17]!==l?(p=o.ui?.icon?s.jsx("img",{src:o.ui.icon,alt:"",className:"size-8 rounded-md object-cover"}):s.jsx("div",{className:"size-8 rounded-md flex items-center justify-center",style:{backgroundColor:l},children:s.jsx("span",{className:"text-sm font-medium text-white",children:o.name.charAt(0).toUpperCase()})}),e[15]=o.name,e[16]=o.ui,e[17]=l,e[18]=p):p=e[18];let u;e[19]!==o.name?(u=s.jsx("h3",{className:"font-medium text-base text-foreground truncate",children:o.name}),e[19]=o.name,e[20]=u):u=e[20];let _;e[21]!==o.updatedAt?(_=ve(new Date(o.updatedAt),{addSuffix:!0}),e[21]=o.updatedAt,e[22]=_):_=e[22];let f;e[23]!==_?(f=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Edited"," ",_]}),e[23]=_,e[24]=f):f=e[24];let P;e[25]!==u||e[26]!==f?(P=s.jsxs("div",{className:"flex flex-col",children:[u,f]}),e[25]=u,e[26]=f,e[27]=P):P=e[27];let I;e[28]!==p||e[29]!==P?(I=s.jsxs("div",{className:"flex flex-col gap-4",children:[p,P]}),e[28]=p,e[29]=P,e[30]=I):I=e[30];let v;e[31]!==o.boundConnections?(v=o.boundConnections.slice(0,4).map(Ve),e[31]=o.boundConnections,e[32]=v):v=e[32];let j;e[33]!==o.boundConnections.length?(j=o.boundConnections.length>4&&s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsxs("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center text-xs text-muted-foreground",children:["+",o.boundConnections.length-4]})}),e[33]=o.boundConnections.length,e[34]=j):j=e[34];let S;e[35]!==v||e[36]!==j?(S=s.jsxs("div",{className:"flex pr-2",children:[v,j]}),e[35]=v,e[36]=j,e[37]=S):S=e[37];const $=n.logo??void 0;let D;e[38]!==n.name||e[39]!==$?(D=s.jsx(ye,{url:$,fallback:n.name,size:"2xs",className:"shrink-0 rounded",objectFit:"cover"}),e[38]=n.name,e[39]=$,e[40]=D):D=e[40];let g;e[41]!==n.name?(g=s.jsx("span",{className:"truncate max-w-20",children:n.name}),e[41]=n.name,e[42]=g):g=e[42];let b;e[43]!==D||e[44]!==g?(b=s.jsxs("div",{className:"flex items-center gap-2 text-xs text-foreground",children:[D,g]}),e[43]=D,e[44]=g,e[45]=b):b=e[45];let w;e[46]!==S||e[47]!==b?(w=s.jsxs("div",{className:"flex items-center justify-between mt-4",children:[S,b]}),e[46]=S,e[47]=b,e[48]=w):w=e[48];let r;e[49]!==I||e[50]!==w?(r=s.jsxs("div",{className:"flex flex-col flex-1 justify-between p-4",children:[I,w]}),e[49]=I,e[50]=w,e[51]=r):r=e[51];let z;e[52]!==r||e[53]!==m?(z=s.jsxs("div",{className:"border border-border rounded-xl overflow-hidden bg-card",children:[m,r]}),e[52]=r,e[53]=m,e[54]=z):z=e[54];let T;return e[55]!==z||e[56]!==d?(T=s.jsx(he,{to:"/$org/$project",params:d,className:"block group",children:z}),e[55]=z,e[56]=d,e[57]=T):T=e[57],T}function Ve(t){return s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsx(He,{connection:t})},t.id)}function He(t){const e=V.c(13),{connection:o}=t;if(o.icon){let h;e[0]!==o.icon||e[1]!==o.title?(h=s.jsx("img",{src:o.icon,alt:o.title,className:"size-4 object-cover"}),e[0]=o.icon,e[1]=o.title,e[2]=h):h=e[2];let c;return e[3]!==o.title||e[4]!==h?(c=s.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:o.title,children:h}),e[3]=o.title,e[4]=h,e[5]=c):c=e[5],c}const i=o.title;let n;e[6]!==o.title?(n=o.title.charAt(0).toUpperCase(),e[6]=o.title,e[7]=n):n=e[7];let l;e[8]!==n?(l=s.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:n}),e[8]=n,e[9]=l):l=e[9];let k;return e[10]!==o.title||e[11]!==l?(k=s.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]=o.title,e[11]=l,e[12]=k):k=e[12],k}async function Qe(){const t=await fetch("/api/deco-sites");if(!t.ok){const e=await t.json().catch(()=>({}));throw new Error(e.error??`Failed to load sites (${t.status})`)}return t.json()}function Ge(t){const e=V.c(57),{open:o,onOpenChange:i}=t,{org:n}=le(),l=ce(),k=de(),{data:h}=je.useSession(),[c,E]=Q.useState(null),[d,N]=Q.useState("");let y;e[0]!==n.id?(y={connectionId:Pe,orgId:n.id},e[0]=n.id,e[1]=y):y=e[1];const x=De(y),C=h?.user?.email;let m;e[2]!==C?(m=["deco-sites",C],e[2]=C,e[3]=m):m=e[3];const p=o&&!!h?.user?.email;let u;e[4]!==m||e[5]!==p?(u={queryKey:m,queryFn:Qe,enabled:p,staleTime:6e4,retry:!1},e[4]=m,e[5]=p,e[6]=u):u=e[6];const{data:_,isLoading:f,error:P}=_e(u),I=_?.sites??[];let v;e[7]!==i?(v=a=>{a||(E(null),N("")),i(a)},e[7]=i,e[8]=v):v=e[8];const j=v;let S;e[9]!==d?(S=a=>a.name.toLowerCase().includes(d.toLowerCase())||a.domains?.[0]?.domain.toLowerCase().includes(d.toLowerCase()),e[9]=d,e[10]=S):S=e[10];const $=I.filter(S),D=!c||$.some(a=>a.name===c);let g;e[11]!==x||e[12]!==n.id?(g=async a=>{const L=Fe("conn"),oe=await fetch("/api/deco-sites/connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:a,connId:L,orgId:n.id})});if(!oe.ok){const xe=await oe.json().catch(Ye);throw new Error(xe.error??`Failed to create connection (${oe.status})`)}const re=await x.callTool({name:"PROJECT_CREATE",arguments:{organizationId:n.id,slug:we(a),name:a,description:"Imported from deco.cx",enabledPlugins:[],ui:{banner:null,bannerColor:"#22C55E",icon:null,themeColor:"#22C55E"}}}),ne=(re.structuredContent??re).project;return await x.callTool({name:"PROJECT_CONNECTION_ADD",arguments:{projectId:ne.id,connectionId:L}}),await x.callTool({name:"PROJECT_PINNED_VIEWS_UPDATE",arguments:{projectId:ne.id,pinnedViews:[{connectionId:L,toolName:"file_explorer",label:"Preview",icon:null},{connectionId:L,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:L,toolName:"get_monitor_data",label:"Monitor",icon:null}]}}),{project:ne,connId:L}},e[11]=x,e[12]=n.id,e[13]=g):g=e[13];let b;e[14]!==j||e[15]!==l||e[16]!==n.id||e[17]!==n.slug||e[18]!==k?(b=a=>{const{project:L}=a;k.invalidateQueries({queryKey:me.projects(n.id)}),ue.success(`Imported ${L.slug} from deco.cx`),j(!1),l({to:"/$org/$project",params:{org:n.slug,project:L.slug}})},e[14]=j,e[15]=l,e[16]=n.id,e[17]=n.slug,e[18]=k,e[19]=b):b=e[19];let w;e[20]!==g||e[21]!==b?(w={mutationFn:g,onSuccess:b,onError:We},e[20]=g,e[21]=b,e[22]=w):w=e[22];const r=Ie(w),z=h?.user?.email??"",T=$e,O=Ee,fe="max-w-md";let W;e[23]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(ze,{children:"Import from deco.cx"}),e[23]=W):W=e[23];const X=z?`Sites available for ${z}`:"Select the site you want to import.";let A;e[24]!==X?(A=s.jsxs(Le,{children:[W,s.jsx(Te,{children:X})]}),e[24]=X,e[25]=A):A=e[25];const ge="min-h-24";let F;e[26]!==f?(F=f&&s.jsx("div",{className:"flex items-center justify-center h-24 text-sm text-muted-foreground",children:"Loading sites..."}),e[26]=f,e[27]=F):F=e[27];const Z=!f&&!P&&I.length===0&&s.jsx("div",{className:"flex items-center justify-center h-24 text-sm text-muted-foreground",children:"No sites found for this account."}),ee=!f&&I.length>0&&s.jsxs("div",{className:"space-y-3",children:[s.jsx(Ae,{placeholder:"Search sites...",value:d,onChange:a=>N(a.target.value),autoFocus:!0}),s.jsxs("div",{className:"space-y-2 max-h-64 overflow-y-auto pr-1",children:[$.length===0&&s.jsxs("p",{className:"text-sm text-muted-foreground text-center py-4",children:["No sites match “",d,"”"]}),$.map(a=>s.jsxs("button",{type:"button",onClick:()=>E(a.name),className:ae("flex flex-col w-full text-left rounded-lg border px-4 py-3 transition-colors",c===a.name?"border-primary bg-primary/5 ring-1 ring-primary":"border-border hover:bg-muted/50"),children:[s.jsx("span",{className:"text-sm font-medium",children:a.name}),a.domains?.[0]&&s.jsx("span",{className:"text-xs text-muted-foreground",children:a.domains[0].domain})]},a.name))]})]});let R;e[28]!==F||e[29]!==Z||e[30]!==ee?(R=s.jsxs("div",{className:ge,children:[F,Z,ee]}),e[28]=F,e[29]=Z,e[30]=ee,e[31]=R):R=e[31];let B;e[32]!==j?(B=()=>j(!1),e[32]=j,e[33]=B):B=e[33];let M;e[34]!==r.isPending||e[35]!==B?(M=s.jsx(G,{variant:"outline",onClick:B,disabled:r.isPending,children:"Cancel"}),e[34]=r.isPending,e[35]=B,e[36]=M):M=e[36];const te=!c||!D||r.isPending||f;let q;e[37]!==r||e[38]!==c?(q=()=>c&&r.mutate(c),e[37]=r,e[38]=c,e[39]=q):q=e[39];const se=r.isPending?"Importing...":"Import";let J;e[40]!==te||e[41]!==q||e[42]!==se?(J=s.jsx(G,{disabled:te,onClick:q,children:se}),e[40]=te,e[41]=q,e[42]=se,e[43]=J):J=e[43];let K;e[44]!==M||e[45]!==J?(K=s.jsxs(Oe,{children:[M,J]}),e[44]=M,e[45]=J,e[46]=K):K=e[46];let U;e[47]!==O||e[48]!==A||e[49]!==R||e[50]!==K?(U=s.jsxs(O,{className:fe,children:[A,R,K]}),e[47]=O,e[48]=A,e[49]=R,e[50]=K,e[51]=U):U=e[51];let Y;return e[52]!==T||e[53]!==j||e[54]!==o||e[55]!==U?(Y=s.jsx(T,{open:o,onOpenChange:j,children:U}),e[52]=T,e[53]=j,e[54]=o,e[55]=U,e[56]=Y):Y=e[56],Y}function We(t){ue.error("Import failed: "+(t instanceof Error?t.message:"Unknown error"))}function Ye(){return{}}function Xe(){const t=V.c(2),e=de();let o;return t[0]!==e?(o=e.getQueryData(me.publicConfig())??{},t[0]=e,t[1]=o):o=t[1],o}function Ze(){const t=V.c(3),[e,o]=Q.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(G,{variant:"outline",onClick:()=>o(!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 n;return t[1]!==e?(n=s.jsxs(s.Fragment,{children:[i,s.jsx(Ge,{open:e,onOpenChange:o})]}),t[1]=e,t[2]=n):n=t[2],n}function $t(){const t=V.c(43),{org:e}=le(),{data:o,isLoading:i}=Ce(e.id),{enableDecoImport:n}=Xe(),[l,k]=Q.useState(""),[h,c]=Q.useState(!1),E=ce();let d,N,y,x,C,m,p,u;if(t[0]!==n||t[1]!==i||t[2]!==E||t[3]!==e.slug||t[4]!==o||t[5]!==l){const I=o?.filter(tt)?.filter(r=>r.name.toLowerCase().includes(l.toLowerCase())||r.description?.toLowerCase().includes(l.toLowerCase()))??[];let v;t[14]!==E||t[15]!==e.slug?(v=r=>{E({to:"/$org/$project/settings/general",params:{org:e.slug,project:r}})},t[14]=E,t[15]=e.slug,t[16]=v):v=t[16];const j=v;let S;t[17]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{c(!0)},t[17]=S):S=t[17];const $=S;N=H;let D;t[18]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(H.Header.Left,{children:s.jsx(Re,{children:s.jsx(Be,{children:s.jsx(Me,{children:s.jsx(qe,{children:"Projects"})})})})}),t[18]=D):D=t[18];let g;t[19]!==n?(g=n&&s.jsx(Ze,{}),t[19]=n,t[20]=g):g=t[20];let b;t[21]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsxs(G,{onClick:$,size:"sm",children:[s.jsx(ie,{size:14}),"Create Project"]}),t[21]=b):b=t[21],t[22]!==g?(p=s.jsxs(H.Header,{children:[D,s.jsxs(H.Header.Right,{children:[g,b]})]}),t[22]=g,t[23]=p):p=t[23];let w;t[24]===Symbol.for("react.memo_cache_sentinel")?(w=r=>{r.key==="Escape"&&(k(""),r.target.blur())},t[24]=w):w=t[24],t[25]!==l?(u=s.jsx(Ne,{value:l,onChange:k,placeholder:"Search for a project...",onKeyDown:w}),t[25]=l,t[26]=u):u=t[26],d=H.Content,y="@container",t[27]!==i?(x=i&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:[...Array(4)].map(et)})}),t[27]=i,t[28]=x):x=t[28],C=!i&&I.length===0&&s.jsx("div",{className:"flex items-center h-full",children:s.jsx(Se,{image:s.jsx(Je,{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&&s.jsxs(G,{size:"sm",onClick:$,children:[s.jsx(ie,{size:14}),"Create Project"]})})}),m=!i&&I.length>0&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:I.map(r=>s.jsx(Ue,{project:r,onSettingsClick:()=>j(r.slug)},r.id))})}),t[0]=n,t[1]=i,t[2]=E,t[3]=e.slug,t[4]=o,t[5]=l,t[6]=d,t[7]=N,t[8]=y,t[9]=x,t[10]=C,t[11]=m,t[12]=p,t[13]=u}else d=t[6],N=t[7],y=t[8],x=t[9],C=t[10],m=t[11],p=t[12],u=t[13];let _;t[29]!==d||t[30]!==y||t[31]!==x||t[32]!==C||t[33]!==m?(_=s.jsxs(d,{className:y,children:[x,C,m]}),t[29]=d,t[30]=y,t[31]=x,t[32]=C,t[33]=m,t[34]=_):_=t[34];let f;t[35]!==h?(f=s.jsx(ke,{open:h,onOpenChange:c}),t[35]=h,t[36]=f):f=t[36];let P;return t[37]!==N||t[38]!==p||t[39]!==u||t[40]!==_||t[41]!==f?(P=s.jsxs(N,{children:[p,u,_,f]}),t[37]=N,t[38]=p,t[39]=u,t[40]=_,t[41]=f,t[42]=P):P=t[42],P}function et(t,e){return s.jsx("div",{className:"h-[240px] rounded-xl bg-muted animate-pulse"},e)}function tt(t){return t.slug!==be}export{$t as default};
|