decocms 2.186.7 → 2.186.8
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-CE4aMC_6.js → AlertCircle-BD5gSXQu.js} +1 -1
- package/dist/client/assets/{ArrowLeft-VzQjF5nf.js → ArrowLeft-DN3D0Zrv.js} +1 -1
- package/dist/client/assets/{ArrowUp-DVMY0e13.js → ArrowUp-D6ltkV3R.js} +1 -1
- package/dist/client/assets/{Check-BgcEZAFd.js → Check-Dczm9Dfw.js} +1 -1
- package/dist/client/assets/{ChevronDown-Ca93y5Zg.js → ChevronDown-CDxBhn_l.js} +1 -1
- package/dist/client/assets/{ChevronRight-iThFOnTS.js → ChevronRight-Dxvchjxo.js} +1 -1
- package/dist/client/assets/{ChevronUp-Dfrjh0kb.js → ChevronUp-BLNd6dNq.js} +1 -1
- package/dist/client/assets/{Container-BQWbDEy6.js → Container-CMPDG7Cp.js} +1 -1
- package/dist/client/assets/{Dataflow03-DdTzEDv9.js → Dataflow03-slF1Ax9G.js} +1 -1
- package/dist/client/assets/{FolderClosed-jb7WzUeW.js → FolderClosed-BKB_NgWm.js} +1 -1
- package/dist/client/assets/{Loading01-CrI0NwPE.js → Loading01-BVCg1O_G.js} +1 -1
- package/dist/client/assets/{Play-DSddPPya.js → Play-Bb4cvvVL.js} +1 -1
- package/dist/client/assets/{Plus-ltkKoqJz.js → Plus-DcVtqCMV.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-DN-y3At7.js → RefreshCcw01-Co0-i94o.js} +1 -1
- package/dist/client/assets/{SearchMd-CS43V34Y.js → SearchMd-CVvF1HpM.js} +1 -1
- package/dist/client/assets/{Settings01-ClJz1ULQ.js → Settings01-DpZ_tsoX.js} +1 -1
- package/dist/client/assets/{Trash01-fCw8HP0s.js → Trash01-CBP9WLeP.js} +1 -1
- package/dist/client/assets/{Type01-Dp2k0by5.js → Type01-CySkENi6.js} +1 -1
- package/dist/client/assets/{Upload01-3AVPYkeL.js → Upload01-BzGPegBj.js} +1 -1
- package/dist/client/assets/{User01-CKoZ8ZDH.js → User01-CItwHvE1.js} +1 -1
- package/dist/client/assets/{X-BNpME-HX.js → X-Dr-hR03I.js} +1 -1
- package/dist/client/assets/{XCircle-MpsZU5qt.js → XCircle-Z-JTmQ8v.js} +1 -1
- package/dist/client/assets/{XClose-DKDxXEaA.js → XClose-BLvk3pvY.js} +1 -1
- package/dist/client/assets/{Zap-kD49gPEF.js → Zap-CiHJmamA.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-DusvXNLB.js → agent-connections-preview-BQSZMPrI.js} +1 -1
- package/dist/client/assets/{agent-detail-B-PecVBx.js → agent-detail-eyC4qU2J.js} +1 -1
- package/dist/client/assets/{agents-DTWgODy0.js → agents-DrhC84qH.js} +1 -1
- package/dist/client/assets/{ai-providers-logos-Bp_JBc4Z.js → ai-providers-logos-idzpcoUr.js} +1 -1
- package/dist/client/assets/{alert-dialog-DPu-w5FH.js → alert-dialog-Bke1xnyn.js} +1 -1
- package/dist/client/assets/{auth-catchall-CVoq5acq.js → auth-catchall-omtOF0fb.js} +1 -1
- package/dist/client/assets/{automation-detail-BtlNzqYH.js → automation-detail-Bc9ASowB.js} +1 -1
- package/dist/client/assets/{automations-B9MMi9MY.js → automations-Bp3tAuBH.js} +1 -1
- package/dist/client/assets/{avatar-DJ_eE6FL.js → avatar-BZ4Frci2.js} +1 -1
- package/dist/client/assets/{badge-Dg_rRuRo.js → badge-DGQ0gFlp.js} +1 -1
- package/dist/client/assets/{breadcrumb-B3Pzyfpg.js → breadcrumb-BBMvtdg-.js} +1 -1
- package/dist/client/assets/{card-CQTuw0Xi.js → card-CKN-JP9M.js} +1 -1
- package/dist/client/assets/{checkbox-pwwqVDt-.js → checkbox-Dzy6oaRF.js} +1 -1
- package/dist/client/assets/{collapsible-BpfdSPbv.js → collapsible-D84K6rP8.js} +1 -1
- package/dist/client/assets/{collection-detail-7hb0Mplz.js → collection-detail-w8yO-_Ye.js} +1 -1
- package/dist/client/assets/{collection-display-button-DgaN6ief.js → collection-display-button-ZvHBt_eA.js} +1 -1
- package/dist/client/assets/{collection-search-BxbLLE-D.js → collection-search-fzGK39qM.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DhM52ivn.js → collection-table-wrapper-DsHGysPH.js} +1 -1
- package/dist/client/assets/{collection-tabs-B87Atjwc.js → collection-tabs-vUhndfXI.js} +1 -1
- package/dist/client/assets/{collections-pcWRi6G6.js → collections-BsFnKFn5.js} +1 -1
- package/dist/client/assets/{command-CIWQeRGP.js → command-BnzawGxz.js} +1 -1
- package/dist/client/assets/{connection-card-CM5AlZwH.js → connection-card-D7msIZJv.js} +1 -1
- package/dist/client/assets/{connection-detail-O3fmkpqe.js → connection-detail-D84CXhKZ.js} +1 -1
- package/dist/client/assets/{connections-BCkT2NPr.js → connections-CbWHLS_c.js} +1 -1
- package/dist/client/assets/constants-BqeudQjB.js +1 -0
- package/dist/client/assets/{constants-B7D0VCWO.js → constants-TLV7MTwP.js} +1 -1
- package/dist/client/assets/{context-IJmL4QO_.js → context-BSzlpoxW.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-ixA2WoW7.js → create-organization-dialog-OZCitfn2.js} +1 -1
- package/dist/client/assets/{create-project-dialog-B6n_03Ug.js → create-project-dialog-RIITFpVV.js} +1 -1
- package/dist/client/assets/{danger-CYvp_RGb.js → danger-DuoByYJO.js} +1 -1
- package/dist/client/assets/{danger-zone-xpmW0-9o.js → danger-zone-CEP2ON89.js} +1 -1
- package/dist/client/assets/{dependencies-C9e_dQDy.js → dependencies-LZwXzbBO.js} +1 -1
- package/dist/client/assets/{dialog-Ce95gXqs.js → dialog-DCrLu7TC.js} +1 -1
- package/dist/client/assets/{drawer-ByM8CEL_.js → drawer-CwKj53Jm.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BT7g2ayh.js → dropdown-menu-BK29e1o0.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-exCUjntN.js → dynamic-plugin-layout-C5CHlaVD.js} +1 -1
- package/dist/client/assets/{editable-task-title-wQy-5KA-.js → editable-task-title-HEFeF21g.js} +1 -1
- package/dist/client/assets/{empty-state-8546_PpL.js → empty-state-B8NhLY9v.js} +1 -1
- package/dist/client/assets/{empty-state-CjwgvmoI.js → empty-state-D4ck9NGY.js} +1 -1
- package/dist/client/assets/{env-vars-editor-Cn7u3DNm.js → env-vars-editor-CvqhjBEu.js} +1 -1
- package/dist/client/assets/{extract-connection-data-OUAaU9Od.js → extract-connection-data-NSojo21r.js} +1 -1
- package/dist/client/assets/{form-BxnLhCD_.js → form-DPsme8JL.js} +1 -1
- package/dist/client/assets/{general-CnJT7yxb.js → general-CPYyC5Rn.js} +1 -1
- package/dist/client/assets/{home-CVvG2Fqq.js → home-Cg6y-M7X.js} +1 -1
- package/dist/client/assets/{import-from-deco-dialog-Chrnp3Cw.js → import-from-deco-dialog-CBUqBAZP.js} +1 -1
- package/dist/client/assets/{index-CMA-66KF.js → index-2hR_U2H-.js} +1 -1
- package/dist/client/assets/{index-DXw26Swq.js → index-3WTtRDrt.js} +1 -1
- package/dist/client/assets/{index-DAKvcNkQ.js → index-BZyxukAe.js} +1 -1
- package/dist/client/assets/{index-CsLoKsqY.js → index-Bgix03M4.js} +1 -1
- package/dist/client/assets/{index-BcOdsrKl.js → index-BkAoKVx8.js} +1 -1
- package/dist/client/assets/{index-C-wrel8E.js → index-CoIN7QlF.js} +1 -1
- package/dist/client/assets/{index-DNarCA5m.js → index-CtkIjbbq.js} +1 -1
- package/dist/client/assets/{index-B62MiQAu.js → index-D49VqQ7Q.js} +2 -2
- package/dist/client/assets/{index-DrtlaMfG.js → index-D_CXrtwd.js} +1 -1
- package/dist/client/assets/{index-3yf2NnlI.js → index-Dg9iIj2F.js} +1 -1
- package/dist/client/assets/{index-DehDS4SM.js → index-DxaXuxCe.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-C4rkYsAc.js → infiniteQueryObserver-DiY9IZXI.js} +1 -1
- package/dist/client/assets/{input-BNSWRvAr.js → input-BoNWsfmK.js} +1 -1
- package/dist/client/assets/{integration-icon-BByVvYW2.js → integration-icon-ByIZ-Vgj.js} +1 -1
- package/dist/client/assets/{label-C-5U7XF4.js → label-DF2jcg2U.js} +1 -1
- package/dist/client/assets/{layout-DuIBVgOo.js → layout-CgN1mZAZ.js} +1 -1
- package/dist/client/assets/{layout-CxMMzlDg.js → layout-Dp8uiQPy.js} +1 -1
- package/dist/client/assets/{login-ayW5J8kp.js → login-EJWlcxg3.js} +1 -1
- package/dist/client/assets/{logo-upload-Cnlppzw5.js → logo-upload-D5UEFEut.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-C5hh7NUh.js → mcp-app-renderer-C8wEMNqP.js} +1 -1
- package/dist/client/assets/{mcp-server-card-3TrMzryK.js → mcp-server-card-xRGKpDYM.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-BHg2jU2j.js → mcp-server-detail-Dfcu5k0K.js} +2 -2
- package/dist/client/assets/{members-DR64AFBa.js → members-b1hYnwix.js} +1 -1
- package/dist/client/assets/{monaco-editor-0MGgMe6Z.js → monaco-editor-D1C0-UAW.js} +1 -1
- package/dist/client/assets/{monitoring-zjAHbr2Y.js → monitoring-DmCgdBgZ.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-D0wDbirt.js → monitoring-dashboard-edit-DL4fVGYY.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-Cye--xow.js → monitoring-dashboard-view-BfDYcRJx.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Br-gOcw_.js → monitoring-stats-row-Bzy3PCZQ.js} +1 -1
- package/dist/client/assets/{oauth-callback-C5qRKz1E.js → oauth-callback-N1SniIFs.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Belxh9YS.js → oauth-callback-ai-provider-BZ8yDxr9.js} +1 -1
- package/dist/client/assets/{org-ai-providers-vLOcM2IN.js → org-ai-providers-DFHn6TCP.js} +1 -1
- package/dist/client/assets/{page-Bk-6gYjF.js → page-B721jXQm.js} +1 -1
- package/dist/client/assets/{page-D9taTz3x.js → page-BgKYb-6_.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-DwTx3Irb.js → plugin-empty-state-BIg-myPi.js} +1 -1
- package/dist/client/assets/{plugin-header-_SJ-AMks.js → plugin-header-CBfXQAQ5.js} +1 -1
- package/dist/client/assets/plugins-D7XVdEz7.js +1 -0
- package/dist/client/assets/{popover-CW4G5neq.js → popover-CvIauBBG.js} +1 -1
- package/dist/client/assets/{project-app-view-Cxge46GP.js → project-app-view-Wq81-D6Q.js} +1 -1
- package/dist/client/assets/{project-layout-CszLr05H.js → project-layout-ByRNQhjx.js} +1 -1
- package/dist/client/assets/{project-plugins-CB_lBTqe.js → project-plugins-8LQo3YBE.js} +1 -1
- package/dist/client/assets/{projects-list-BAFLJ8Ur.js → projects-list-CfdMQhGh.js} +1 -1
- package/dist/client/assets/{registry-layout-BFPpF2ab.js → registry-layout-BfWTztsz.js} +1 -1
- package/dist/client/assets/{registry-utils-DWGplsmC.js → registry-utils-Cz03qmOa.js} +1 -1
- package/dist/client/assets/{reset-password-D2kT9zWB.js → reset-password-Cj1A6uL-.js} +1 -1
- package/dist/client/assets/{resizable-DFwU4W6w.js → resizable-BceA9DHD.js} +1 -1
- package/dist/client/assets/{save-actions-CmbT6lbz.js → save-actions-BENpgKCD.js} +1 -1
- package/dist/client/assets/{scroll-area-DEb4D9kS.js → scroll-area-4KH7xRn7.js} +1 -1
- package/dist/client/assets/{select-BY6esNmT.js → select-DaOZXaTi.js} +1 -1
- package/dist/client/assets/{select-virtual-mcp-C6Eik732.js → select-virtual-mcp-CjfXEnho.js} +1 -1
- package/dist/client/assets/{shell-layout-BPQbdNig.js → shell-layout-85fLFVwf.js} +2 -2
- package/dist/client/assets/{sidebar-settings-LoxM-jfH.js → sidebar-settings-CvK0z-ir.js} +1 -1
- package/dist/client/assets/{skeleton-H6tvOoEj.js → skeleton-CLUePAN0.js} +1 -1
- package/dist/client/assets/{spinner-X15c9Qjw.js → spinner-7bhznOFa.js} +1 -1
- package/dist/client/assets/{store-invite-CbJMqLqm.js → store-invite-fWGyKl7o.js} +1 -1
- package/dist/client/assets/{switch-1W8o5vam.js → switch-yIP7Yj81.js} +1 -1
- package/dist/client/assets/{table-oKRuJlES.js → table-w828HACk.js} +1 -1
- package/dist/client/assets/{tabs-wloAa-G_.js → tabs-Du7uGFqP.js} +1 -1
- package/dist/client/assets/{task-status-DtA3vCfp.js → task-status-RaaIa42V.js} +1 -1
- package/dist/client/assets/{tasks-panel-CfTCpIaN.js → tasks-panel-CT_8gQvL.js} +1 -1
- package/dist/client/assets/tasks-x-XNinod.js +1 -0
- package/dist/client/assets/{textarea-Db5eGrte.js → textarea-D30IrLHN.js} +1 -1
- package/dist/client/assets/{time-range-picker-kvCom5E0.js → time-range-picker-DVyznax9.js} +1 -1
- package/dist/client/assets/{toggle-group-nuX--X8U.js → toggle-group-DN_3BuPh.js} +1 -1
- package/dist/client/assets/{tools-list-CzNHOfxQ.js → tools-list-BQiqsKN2.js} +1 -1
- package/dist/client/assets/{tooltip-Cz2tQy7f.js → tooltip-DJkxXViN.js} +1 -1
- package/dist/client/assets/{types-B85FeN8J.js → types-llndI7Ky.js} +1 -1
- package/dist/client/assets/{use-automations-Bmzs_h6Z.js → use-automations-DhJnP2CA.js} +1 -1
- package/dist/client/assets/{use-collections-Cw-CkhM5.js → use-collections-Dmxer7H8.js} +1 -1
- package/dist/client/assets/{use-connection-u5F7YTDM.js → use-connection-Yjy9d1tW.js} +1 -1
- package/dist/client/assets/{use-copy-DXoYLkGY.js → use-copy-DYNuGKRz.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-B6BY4hNy.js → use-create-virtual-mcp-CEBO__7d.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BCAoqpbu.js → use-infinite-scroll-JQzncaIM.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-Bh4CcElp.js → use-install-from-registry-Du1Xu864.js} +1 -1
- package/dist/client/assets/{use-list-state-J17yqbOy.js → use-list-state-BG8gUSh9.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-C4rv2YNo.js → use-mcp-prompts-DY_yf0WC.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-C2RRZo8d.js → use-mcp-resources-BnmpykKD.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CS9dH9Hk.js → use-mcp-tools-CmOfbC2t.js} +1 -1
- package/dist/client/assets/{use-members-L6twvwj_.js → use-members-BZM-R1qG.js} +1 -1
- package/dist/client/assets/{use-project-DmzlV8IR.js → use-project-W-5l7vWa.js} +1 -1
- package/dist/client/assets/{use-store-discovery-B_zVCnQi.js → use-store-discovery-DfcEdPeQ.js} +1 -1
- package/dist/client/assets/{use-view-mode-DDZQlalb.js → use-view-mode-BGEJ9JzM.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BQ1ML2v_.js → use-virtual-mcp-2qhGJdPe.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-D8TjRj27.js +1 -0
- package/dist/client/assets/{useMutation-5tF0rOhi.js → useMutation-BTUmJffP.js} +1 -1
- package/dist/client/assets/useQuery-CvkH2gG1.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DRfcYfXZ.js +1 -0
- package/dist/client/assets/{user-Wn7CHNY8.js → user-DXILGeu2.js} +1 -1
- package/dist/client/assets/{workflow-DGOWYrJv.js → workflow-CBGVBFDu.js} +1 -1
- package/dist/client/assets/{workflow-CehUk0kO.js → workflow-ClE3y6g8.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +231 -231
- package/package.json +1 -1
- package/dist/client/assets/constants-B_S2_Dfe.js +0 -1
- package/dist/client/assets/plugins-_-cF0kV-.js +0 -1
- package/dist/client/assets/tasks-DYQdfmG5.js +0 -1
- package/dist/client/assets/useInfiniteQuery-D_7z7Ekt.js +0 -1
- package/dist/client/assets/useQuery-Cr3Ibn6v.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-UikfpG9C.js +0 -1
- package/dist/server/node_modules/onetime/index.d.ts +0 -64
- package/dist/server/node_modules/onetime/index.js +0 -44
- package/dist/server/node_modules/onetime/license +0 -9
- package/dist/server/node_modules/onetime/package.json +0 -43
- package/dist/server/node_modules/onetime/readme.md +0 -94
- package/dist/server/node_modules/xtend/.jshintrc +0 -30
- package/dist/server/node_modules/xtend/LICENSE +0 -20
- package/dist/server/node_modules/xtend/README.md +0 -32
- package/dist/server/node_modules/xtend/immutable.js +0 -19
- package/dist/server/node_modules/xtend/mutable.js +0 -17
- package/dist/server/node_modules/xtend/package.json +0 -55
- package/dist/server/node_modules/xtend/test.js +0 -103
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as j,r as w,j as s,y as S,B as te,c as se,E as xe,u as pe,g as oe}from"./index-B62MiQAu.js";import{C as b}from"./task-status-DtA3vCfp.js";import{C as ue,E as he}from"./editable-task-title-wQy-5KA-.js";import{a as ie}from"./tasks-panel-CfTCpIaN.js";import{u as le,r as ge,a as re}from"./context-IJmL4QO_.js";import{V as je}from"./select-virtual-mcp-C6Eik732.js";import{I as U,t as be,m as Ne,n as ve,A as W,o as we}from"./integration-icon-BByVvYW2.js";import{a as ye,b as Se,P as Ce}from"./popover-CW4G5neq.js";import{S as q}from"./skeleton-H6tvOoEj.js";import{i as ke,d as _e}from"./constants-B7D0VCWO.js";import{b as Ie}from"./use-virtual-mcp-BQ1ML2v_.js";import{i as ze}from"./ChevronRight-iThFOnTS.js";import{s as ne}from"./Plus-ltkKoqJz.js";import{u as F}from"./tooltip-Cz2tQy7f.js";import{a as Ee,D as Ae,b as Me,c as Te}from"./dialog-Ce95gXqs.js";import{D as ae,a as ce,b as Oe,c as De}from"./drawer-ByM8CEL_.js";import{I as me}from"./import-from-deco-dialog-Chrnp3Cw.js";import{u as Pe}from"./use-create-virtual-mcp-B6BY4hNy.js";import{P as H}from"./index-DNarCA5m.js";import{R as G,a as K,b as Re}from"./resizable-DFwU4W6w.js";import{u as $e}from"./useQuery-Cr3Ibn6v.js";import{d as Ve}from"./XCircle-MpsZU5qt.js";import"./spinner-X15c9Qjw.js";import"./use-mcp-prompts-C4rv2YNo.js";import"./form-BxnLhCD_.js";import"./label-C-5U7XF4.js";import"./input-BNSWRvAr.js";import"./index-CsLoKsqY.js";import"./usage-BW6ztpN6.js";import"./ArrowUp-DVMY0e13.js";import"./ChevronDown-Ca93y5Zg.js";import"./org-ai-providers-vLOcM2IN.js";import"./useMutation-5tF0rOhi.js";import"./AlertCircle-CE4aMC_6.js";import"./RefreshCcw01-DN-y3At7.js";import"./Play-DSddPPya.js";import"./Trash01-fCw8HP0s.js";import"./card-CQTuw0Xi.js";import"./toggle-group-nuX--X8U.js";import"./avatar-DJ_eE6FL.js";import"./User01-CKoZ8ZDH.js";import"./ai-providers-logos-Bp_JBc4Z.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./X-BNpME-HX.js";import"./select-BY6esNmT.js";import"./index-BdQq_4o_.js";import"./index-BcOdsrKl.js";import"./Check-BgcEZAFd.js";import"./ChevronUp-Dfrjh0kb.js";import"./ArrowLeft-VzQjF5nf.js";import"./use-copy-DXoYLkGY.js";import"./marked.esm-BaswSlok.js";import"./tabs-wloAa-G_.js";import"./checkbox-pwwqVDt-.js";import"./SearchMd-CS43V34Y.js";import"./Settings01-ClJz1ULQ.js";import"./use-mcp-resources-C2RRZo8d.js";import"./collapsible-BpfdSPbv.js";import"./index-3yf2NnlI.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-C5hh7NUh.js";import"./types-B85FeN8J.js";import"./XClose-DKDxXEaA.js";import"./Type01-Dp2k0by5.js";import"./use-collections-Cw-CkhM5.js";import"./useSuspenseInfiniteQuery-UikfpG9C.js";import"./infiniteQueryObserver-C4rkYsAc.js";import"./Loading01-CrI0NwPE.js";import"./collection-search-BxbLLE-D.js";import"./user-Wn7CHNY8.js";import"./format-time-CMKyl-GC.js";import"./empty-state-8546_PpL.js";import"./dropdown-menu-BT7g2ayh.js";import"./decopilot-events-Brt4gAR6.js";import"./index-CMA-66KF.js";import"./Container-BQWbDEy6.js";import"./Dataflow03-DdTzEDv9.js";import"./FolderClosed-jb7WzUeW.js";import"./Upload01-3AVPYkeL.js";import"./Zap-kD49gPEF.js";import"./generate-id-Dyweu44Y.js";import"./slug-DcxyEoi0.js";const He=[{id:"deco",title:"Import from deco.cx",buttonLabel:"Import site",comingSoon:!1,image:"/import-decocx.png"},{id:"github",title:"Existing GitHub project",buttonLabel:"Coming Soon",comingSoon:!0,image:"/import-github.png"},{id:"scratch",title:"Start from scratch",buttonLabel:"Coming Soon",comingSoon:!0,image:"/import-scratch.png"}];function Q(t){const e=j.c(8),{onCardAction:r,mobile:o}=t,a=o?"flex flex-col flex-1 min-h-0 gap-3":"flex flex-col gap-3";let l;e[0]!==a?(l=S("sm:grid sm:grid-cols-3 sm:gap-4",a),e[0]=a,e[1]=l):l=e[1];let c;e[2]!==o||e[3]!==r?(c=He.map(i=>s.jsxs("button",{type:"button",disabled:i.comingSoon,onClick:()=>r(i.id),className:S("rounded-xl border border-border bg-card overflow-hidden text-left","transition-transform duration-150 ease-out will-change-transform","flex flex-row items-center sm:flex-col",o&&"flex-1 min-h-0",!i.comingSoon&&"[@media(hover:hover)]:hover:scale-[1.03] sm:[@media(hover:hover)]:hover:scale-[1.05] active:scale-[0.98] cursor-pointer",i.comingSoon&&"cursor-default"),children:[s.jsx("div",{className:S("w-28 shrink-0 self-stretch sm:w-full sm:aspect-[4/3] sm:self-auto bg-muted overflow-hidden",i.comingSoon&&"opacity-40"),children:i.image&&s.jsx("img",{src:i.image,alt:i.title,className:"w-full h-full object-cover"})}),s.jsxs("div",{className:"flex flex-1 flex-row items-center justify-between gap-3 px-4 py-3 sm:flex-col sm:items-stretch sm:px-5 sm:py-4 sm:gap-0",children:[s.jsx("p",{className:"font-medium text-foreground text-sm sm:text-base sm:text-center sm:mb-4",children:i.title}),s.jsx(te,{className:"shrink-0 cursor-pointer sm:w-full",size:"sm",variant:i.comingSoon?"outline":"default",disabled:i.comingSoon,onClick:d=>{d.stopPropagation(),r(i.id)},children:i.buttonLabel})]})]},i.id)),e[2]=o,e[3]=r,e[4]=c):c=e[4];let n;return e[5]!==l||e[6]!==c?(n=s.jsx("div",{className:l,children:c}),e[5]=l,e[6]=c,e[7]=n):n=e[7],n}const X=s.jsx(U,{icon:"icon://Globe01?color=violet",name:"Site Editor",size:"sm"});function Be(t){const e=j.c(15),{open:r,onOpenChange:o}=t,[a,l]=w.useState(!1),c=F();let n;e[0]!==o?(n=u=>{u==="deco"&&(o(!1),l(!0))},e[0]=o,e[1]=n):n=e[1];const i=n;let d;e[2]!==i||e[3]!==c||e[4]!==o||e[5]!==r?(d=c?s.jsx(ae,{open:r,onOpenChange:o,children:s.jsxs(ce,{className:"h-[70dvh]",children:[s.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:s.jsxs("div",{className:"flex items-center gap-3",children:[X,s.jsx(De,{className:"text-xl font-semibold",children:"Get started with Site Editor"})]})}),s.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:s.jsx(Q,{onCardAction:i,mobile:!0})})]})}):s.jsx(Ee,{open:r,onOpenChange:o,children:s.jsxs(Ae,{className:"sm:max-w-[900px] p-8",children:[s.jsx(Me,{className:"mb-8",children:s.jsxs("div",{className:"flex items-center gap-3",children:[X,s.jsx(Te,{className:"text-xl font-semibold",children:"Get started with Site Editor"})]})}),s.jsx(Q,{onCardAction:i})]})}),e[2]=i,e[3]=c,e[4]=o,e[5]=r,e[6]=d):d=e[6];let m;e[7]!==o?(m=()=>{l(!1),o(!0)},e[7]=o,e[8]=m):m=e[8];let f;e[9]!==a||e[10]!==m?(f=s.jsx(me,{open:a,onOpenChange:l,onBack:m}),e[9]=a,e[10]=m,e[11]=f):f=e[11];let x;return e[12]!==d||e[13]!==f?(x=s.jsxs(s.Fragment,{children:[d,f]}),e[12]=d,e[13]=f,e[14]=x):x=e[14],x}function de(t){const e=j.c(16),{agent:r,onSpecialClick:o}=t,{setVirtualMcpId:a}=le();let l;e[0]!==r.id||e[1]!==o||e[2]!==a?(l=()=>{o?o():a(r.id)},e[0]=r.id,e[1]=o,e[2]=a,e[3]=l):l=e[3];const c=l;let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=S("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[88px]","group"),e[4]=n):n=e[4];const i=`Select agent ${r.title}`;let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(be,{size:24}),e[5]=d):d=e[5];let m;e[6]!==r.icon||e[7]!==r.title?(m=s.jsx(U,{icon:r.icon,name:r.title,size:"md",fallbackIcon:d,className:"transition-transform group-hover:scale-110"}),e[6]=r.icon,e[7]=r.title,e[8]=m):m=e[8];let f;e[9]!==r.title?(f=s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight line-clamp-2",children:r.title}),e[9]=r.title,e[10]=f):f=e[10];let x;return e[11]!==c||e[12]!==i||e[13]!==m||e[14]!==f?(x=s.jsxs("button",{type:"button",onClick:c,className:n,"aria-label":i,children:[m,f]}),e[11]=c,e[12]=i,e[13]=m,e[14]=f,e[15]=x):x=e[15],x}function Le(t){const e=j.c(15),{virtualMcps:r,selectedVirtualMcpId:o,onVirtualMcpChange:a}=t,[l,c]=w.useState(!1),n=w.useRef(null),i=F();let d,m;e[0]!==i||e[1]!==l?(d=()=>{l&&!i&&setTimeout(()=>{n.current?.focus()},0)},m=[l,i],e[0]=i,e[1]=l,e[2]=d,e[3]=m):(d=e[2],m=e[3]),w.useEffect(d,m);let f;e[4]!==a?(f=N=>{a(N),c(!1)},e[4]=a,e[5]=f):f=e[5];const x=f;let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=S("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[88px]","group"),e[6]=u):u=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ye,{asChild:!0,children:s.jsxs("button",{type:"button",className:u,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-xl bg-accent flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:s.jsx(ze,{size:20,className:"text-foreground"})}),s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"See all"})]})}),e[7]=h):h=e[7];let p;e[8]!==x||e[9]!==o||e[10]!==r?(p=s.jsx(Se,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(je,{virtualMcps:r,selectedVirtualMcpId:o,onVirtualMcpChange:x,searchInputRef:n})}),e[8]=x,e[9]=o,e[10]=r,e[11]=p):p=e[11];let g;return e[12]!==l||e[13]!==p?(g=s.jsxs(Ce,{open:l,onOpenChange:c,children:[h,p]}),e[12]=l,e[13]=p,e[14]=g):g=e[14],g}const J={id:"site-editor",title:"Site Editor",icon:"icon://Globe01?color=violet"};function Fe(){const t=j.c(9);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={navigateOnCreate:!0},t[0]=e):e=t[0];const{createVirtualMCP:r,isCreating:o}=Pe(e);let a;t[1]!==r?(a=()=>r(),t[1]=r,t[2]=a):a=t[2];let l;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=S("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[88px]","group","disabled:opacity-50 disabled:cursor-not-allowed"),t[3]=l):l=t[3];let c,n;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-xl bg-background border-2 border-dashed border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:s.jsx(ne,{size:20,className:"text-muted-foreground"})}),n=s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"Create agent"}),t[4]=c,t[5]=n):(c=t[4],n=t[5]);let i;return t[6]!==o||t[7]!==a?(i=s.jsxs("button",{type:"button",onClick:a,disabled:o,className:l,"aria-label":"Create agent",children:[c,n]}),t[6]=o,t[7]=a,t[8]=i):i=t[8],i}function Ge(){const t=j.c(30),e=Ie(),{selectedVirtualMcp:r,setVirtualMcpId:o}=le(),{locator:a}=se(),[l,c]=w.useState(!1);let n,i,d,m,f,x;if(t[0]!==a||t[1]!==e){const z=ge(a),k=e.filter(qe).sort((_,I)=>{const B=z.indexOf(_.id),v=z.indexOf(I.id);return B!==-1&&v!==-1?B-v:B!==-1?-1:v!==-1?1:new Date(I.updated_at).getTime()-new Date(_.updated_at).getTime()}).slice(0,5);let y;t[8]!==e?(y=e.map(We),t[8]=e,t[9]=y):y=t[9],x=y,n=k.length>0,f="w-full",i="flex flex-wrap justify-center gap-2",t[10]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(de,{agent:J,onSpecialClick:()=>c(!0)},J.id),t[10]=d):d=t[10],m=k.map(Ue),t[0]=a,t[1]=e,t[2]=n,t[3]=i,t[4]=d,t[5]=m,t[6]=f,t[7]=x}else n=t[2],i=t[3],d=t[4],m=t[5],f=t[6],x=t[7];let u;t[11]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Fe,{}),t[11]=u):u=t[11];let h;t[12]!==n||t[13]!==r?.id||t[14]!==o||t[15]!==x?(h=n&&s.jsx(Le,{virtualMcps:x,selectedVirtualMcpId:r?.id??null,onVirtualMcpChange:o}),t[12]=n,t[13]=r?.id,t[14]=o,t[15]=x,t[16]=h):h=t[16];let p;t[17]!==i||t[18]!==d||t[19]!==m||t[20]!==h?(p=s.jsxs("div",{className:i,children:[d,m,u,h]}),t[17]=i,t[18]=d,t[19]=m,t[20]=h,t[21]=p):p=t[21];let g;t[22]!==f||t[23]!==p?(g=s.jsx("div",{className:f,children:p}),t[22]=f,t[23]=p,t[24]=g):g=t[24];let N;t[25]!==l?(N=s.jsx(Be,{open:l,onOpenChange:c}),t[25]=l,t[26]=N):N=t[26];let C;return t[27]!==g||t[28]!==N?(C=s.jsxs(s.Fragment,{children:[g,N]}),t[27]=g,t[28]=N,t[29]=C):C=t[29],C}function Ue(t){return s.jsx(de,{agent:t},t.id??"default")}function We(t){return{id:t.id,title:t.title,description:t.description,icon:t.icon}}function qe(t){return t.id!==null&&!ke(t.id)}function Ke(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"w-full",children:s.jsx("div",{className:"flex flex-wrap justify-center gap-2",children:Array.from({length:7}).map(Qe)})}),t[0]=e):e=t[0],e}function Qe(t,e){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 w-[88px]",children:[s.jsx(q,{className:"size-12 rounded-xl shrink-0"}),s.jsx(q,{className:"h-3 sm:h-4 w-full"})]},e)}function Y(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(w.Suspense,{fallback:s.jsx(Ke,{}),children:s.jsx(Ge,{})}),t[0]=e):e=t[0],e}const Xe=`url("data:image/svg+xml;utf8,<svg viewBox='0 0 500 64' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><rect x='0' y='0' height='100%' width='100%' fill='url(%23grad)' opacity='0.6'/><defs><radialGradient id='grad' gradientUnits='userSpaceOnUse' cx='0' cy='0' r='10' gradientTransform='matrix(55.083 -7.55 1.4151 14.867 -37.917 86)'><stop stop-color='rgba(165,149,255,1)' offset='0.0045422'/><stop stop-color='rgba(210,202,255,1)' offset='0.16426'/><stop stop-color='rgba(255,255,255,1)' offset='0.32398'/><stop stop-color='rgba(255,255,255,0.3)' offset='0.68776'/><stop stop-color='rgba(255,224,139,0.3)' offset='0.74761'/><stop stop-color='rgba(255,209,80,0.3)' offset='0.77753'/><stop stop-color='rgba(255,193,22,0.3)' offset='0.80745'/><stop stop-color='rgba(208,236,26,1)' offset='0.96307'/></radialGradient></defs></svg>")`,Je="/decotexture.svg";function Z(t){const e=j.c(7),{onClick:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={backgroundImage:Xe,backgroundSize:"100% 100%"},e[0]=o):o=e[0];let a,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"relative shrink-0 p-1.5 bg-[var(--brand-green-light)] rounded-lg border border-border",children:s.jsx(U,{icon:"/logos/deco%20logo.svg",name:"deco.cx",size:"xs",className:"border-0 rounded-none"})}),l=s.jsx("p",{className:"flex-1 relative text-sm font-medium text-foreground leading-none whitespace-nowrap",children:"Import your deco.cx site"}),e[1]=a,e[2]=l):(a=e[1],l=e[2]);let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("img",{src:Je,alt:"","aria-hidden":!0,className:"absolute pointer-events-none",style:{width:"274.5px",height:"272.25px",left:"calc(50% + 145.5px)",top:"calc(50% + 40px)",transform:"translate(-50%, -50%)"}}),e[3]=c):c=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"relative bg-background flex items-center justify-center size-8 rounded-md shrink-0",children:s.jsx(Ve,{size:16,className:"text-foreground transition-transform group-hover:translate-x-0.5"})}),e[4]=n):n=e[4];let i;return e[5]!==r?(i=s.jsxs("button",{type:"button",onClick:r,className:"w-full relative flex items-center gap-4 px-4 py-4 rounded-lg border border-border bg-background overflow-hidden transition-colors text-left cursor-pointer group",style:o,children:[a,l,c,n]}),e[5]=r,e[6]=i):i=e[6],i}function Ye(){const t=j.c(5),{data:e}=oe.useSession(),r=e?.user?.email;let o;t[0]!==r?(o=["deco-profile",r],t[0]=r,t[1]=o):o=t[1];const a=!!e?.user?.email;let l;t[2]!==o||t[3]!==a?(l={queryKey:o,queryFn:Ze,enabled:a,staleTime:3e5},t[2]=o,t[3]=a,t[4]=l):l=t[4];const{data:c}=$e(l);return c?.isDecoUser??!1}async function Ze(){const t=await fetch("/api/deco-sites/profile");return t.ok?t.json():{isDecoUser:!1}}function ee(t){const e=j.c(48),{showContext:r,setShowContext:o}=t,{org:a}=se(),l=pe(),{data:c}=oe.useSession(),{isChatEmpty:n,activeTaskId:i,tasks:d,selectedVirtualMcp:m,createTask:f,switchToTask:x}=re();let u;if(e[0]!==i||e[1]!==d){let V;e[3]!==i?(V=fe=>fe.id===i,e[3]=i,e[4]=V):V=e[4],u=d.find(V),e[0]=i,e[1]=d,e[2]=u}else u=e[2];const h=u,p=F(),[g,N]=w.useState(!1),[C,z]=w.useState(!1),k=Ye();let y;e[5]!==c?.user?.name?(y=c?.user?.name?.split(" ")[0]||"there",e[5]=c?.user?.name,e[6]=y):y=e[6];const _=y;let I;e[7]!==a.id?(I=_e(a.id),e[7]=a.id,e[8]=I):I=e[8];const v=m??I;let E;e[9]!==h?(E=h?.title&&s.jsx(he,{taskId:h.id,text:h.title,className:"text-sm font-medium text-foreground"}),e[9]=h,e[10]=E):E=e[10];let A;e[11]!==E?(A=s.jsx(H.Header.Left,{className:"gap-2",children:E}),e[11]=E,e[12]=A):A=e[12];let M;e[13]!==f||e[14]!==n||e[15]!==p?(M=p&&s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",onClick:()=>f(),disabled:n,className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors disabled:opacity-40 disabled:cursor-not-allowed",title:"New chat",children:s.jsx(ne,{size:16,className:"text-muted-foreground"})}),s.jsx("button",{type:"button",onClick:()=>N(!0),className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors",title:"Tasks",children:s.jsx(we,{size:16,className:"text-muted-foreground"})})]}),e[13]=f,e[14]=n,e[15]=p,e[16]=M):M=e[16];let T;e[17]!==n||e[18]!==p||e[19]!==o||e[20]!==r?(T=!n&&!p&&s.jsx("button",{type:"button",onClick:()=>o(et),className:S("flex size-7 items-center justify-center rounded-md border border-input hover:bg-accent transition-colors",r&&"bg-accent"),title:"Toggle context panel",children:s.jsx(ve,{size:14,className:"text-muted-foreground"})}),e[17]=n,e[18]=p,e[19]=o,e[20]=r,e[21]=T):T=e[21];let O;e[22]!==M||e[23]!==T?(O=s.jsxs(H.Header.Right,{className:"gap-1",children:[M,T]}),e[22]=M,e[23]=T,e[24]=O):O=e[24];let D;e[25]!==A||e[26]!==O?(D=s.jsxs(H.Header,{className:"flex-none z-10 bg-background",children:[A,O]}),e[25]=A,e[26]=O,e[27]=D):D=e[27];let P;e[28]!==p||e[29]!==g||e[30]!==x?(P=p&&s.jsx(ae,{open:g,onOpenChange:N,direction:"bottom",children:s.jsx(ce,{className:"h-[90vh] max-h-[90vh]",children:s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(ie,{onTaskSelect:async V=>{await x(V),N(!1)}})})})}),e[28]=p,e[29]=g,e[30]=x,e[31]=P):P=e[31];let R;e[32]!==v||e[33]!==n||e[34]!==k||e[35]!==p||e[36]!==l||e[37]!==m||e[38]!==o||e[39]!==_?(R=n?p?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center px-4",children:s.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(W,{icon:v.icon,name:v.title,size:"md",className:S("transition-opacity duration-200",!m&&"invisible")})}),s.jsx("div",{className:"text-center",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",_,"?"]})})]})}),s.jsxs("div",{className:"shrink-0 flex flex-col items-center w-full gap-3 pb-2",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-2xl mx-auto gap-4 px-4",children:[s.jsx(b.IceBreakers,{className:"w-full"}),l&&s.jsx("div",{className:"flex flex-col items-center w-full",children:s.jsx(Y,{})}),k&&l&&s.jsx("div",{className:"w-full max-w-[500px] mx-auto",children:s.jsx(Z,{onClick:()=>z(!0)})})]}),s.jsx(b.Footer,{children:s.jsx(b.Input,{})})]})]}):s.jsxs("div",{className:"flex-1 flex flex-col items-center px-10",children:[s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(W,{icon:v.icon,name:v.title,size:"md",className:S("transition-opacity duration-200",!m&&"invisible")})}),s.jsx("div",{className:"text-center mb-6",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",_,"?"]})}),s.jsx(b.IceBreakers,{className:"w-full"}),s.jsx("div",{className:"w-full",children:s.jsx(b.Input,{onOpenContextPanel:()=>o(!0)})})]}),l&&s.jsx("div",{className:"w-full max-w-[800px] mt-10 mx-auto",children:s.jsx(Y,{})})]}),k&&l&&s.jsx("div",{className:"w-full max-w-[500px] mx-auto pb-6",children:s.jsx(Z,{onClick:()=>z(!0)})})]}):s.jsxs(s.Fragment,{children:[s.jsx(b.Main,{children:s.jsx(b.Messages,{})}),s.jsx(b.Footer,{children:s.jsx(b.Input,{onOpenContextPanel:()=>o(!0)})})]}),e[32]=v,e[33]=n,e[34]=k,e[35]=p,e[36]=l,e[37]=m,e[38]=o,e[39]=_,e[40]=R):R=e[40];let $;e[41]!==C?($=s.jsx(me,{open:C,onOpenChange:z}),e[41]=C,e[42]=$):$=e[42];let L;return e[43]!==P||e[44]!==R||e[45]!==$||e[46]!==D?(L=s.jsxs(b,{className:"h-full bg-background",children:[D,P,R,$]}),e[43]=P,e[44]=R,e[45]=$,e[46]=D,e[47]=L):L=e[47],L}function et(t){return!t}function tt(){const t=j.c(15),{allModelsConnections:e}=re(),r=F(),[o,a]=w.useState(!1);if(e.length===0){let x;return t[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"flex flex-col h-full bg-background items-center justify-center",children:s.jsx(b.NoLlmBindingEmptyState,{})}),t[0]=x):x=t[0],x}if(r){let x;return t[1]!==o?(x=s.jsx("div",{className:"size-full",children:s.jsx(ee,{showContext:o,setShowContext:a})}),t[1]=o,t[2]=x):x=t[2],x}let l,c;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(G,{defaultSize:20,minSize:10,id:"tasks",order:1,children:s.jsx(ie,{})}),c=s.jsx(K,{className:"bg-border/30"}),t[3]=l,t[4]=c):(l=t[3],c=t[4]);const n=o?50:80;let i;t[5]!==o?(i=s.jsx(ee,{showContext:o,setShowContext:a}),t[5]=o,t[6]=i):i=t[6];let d;t[7]!==n||t[8]!==i?(d=s.jsx(G,{defaultSize:n,minSize:30,id:"main",order:2,children:i}),t[7]=n,t[8]=i,t[9]=d):d=t[9];let m;t[10]!==o?(m=o&&s.jsxs(s.Fragment,{children:[s.jsx(K,{className:"bg-border/30"}),s.jsx(G,{defaultSize:30,minSize:15,id:"context",order:3,children:s.jsx(ue,{onClose:()=>a(!1)})})]}),t[10]=o,t[11]=m):m=t[11];let f;return t[12]!==d||t[13]!==m?(f=s.jsxs(Re,{direction:"horizontal",className:"size-full",children:[l,c,d,m]}),t[12]=d,t[13]=m,t[14]=f):f=t[14],f}function st(t){const e=j.c(14),{error:r,onRetry:o}=t,a=r?.message?.includes("401")||r?.message?.toLowerCase().includes("unauthorized");let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(H.Header,{className:"flex-none",children:[s.jsx(H.Header.Left,{className:"gap-2"}),s.jsx(H.Header.Right,{className:"gap-1"})]}),e[0]=l):l=e[0];let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(Ne,{className:"h-6 w-6 text-destructive"})}),e[1]=c):c=e[1];const n=a?"Unable to load models":"Something went wrong";let i;e[2]!==n?(i=s.jsx("h3",{className:"text-lg font-medium",children:n}),e[2]=n,e[3]=i):i=e[3];const d=a?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":r?.message||"An unexpected error occurred";let m;e[4]!==d?(m=s.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[4]=d,e[5]=m):m=e[5];let f;e[6]!==i||e[7]!==m?(f=s.jsxs("div",{className:"space-y-2",children:[i,m]}),e[6]=i,e[7]=m,e[8]=f):f=e[8];let x;e[9]!==o?(x=s.jsx(te,{variant:"outline",onClick:o,children:"Try again"}),e[9]=o,e[10]=x):x=e[10];let u;return e[11]!==f||e[12]!==x?(u=s.jsxs(b,{children:[l,s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:s.jsxs("div",{className:"max-w-sm space-y-4",children:[c,f,x]})})]}),e[11]=f,e[12]=x,e[13]=u):u=e[13],u}function Ts(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(xe,{fallback:ot,children:s.jsx(w.Suspense,{fallback:s.jsx(b.Skeleton,{}),children:s.jsx(tt,{})})}),t[0]=e):e=t[0],e}function ot(t){const{error:e,resetError:r}=t;return s.jsx(st,{error:e,onRetry:r})}export{Ts as default};
|
|
1
|
+
import{d as j,r as w,j as s,y as S,B as te,c as se,E as xe,u as pe,g as oe}from"./index-D49VqQ7Q.js";import{C as b}from"./task-status-RaaIa42V.js";import{C as ue,E as he}from"./editable-task-title-HEFeF21g.js";import{a as ie}from"./tasks-panel-CT_8gQvL.js";import{u as le,r as ge,a as re}from"./context-BSzlpoxW.js";import{V as je}from"./select-virtual-mcp-CjfXEnho.js";import{I as U,t as be,m as Ne,n as ve,A as W,o as we}from"./integration-icon-ByIZ-Vgj.js";import{a as ye,b as Se,P as Ce}from"./popover-CvIauBBG.js";import{S as q}from"./skeleton-CLUePAN0.js";import{i as ke,d as _e}from"./constants-TLV7MTwP.js";import{b as Ie}from"./use-virtual-mcp-2qhGJdPe.js";import{i as ze}from"./ChevronRight-Dxvchjxo.js";import{s as ne}from"./Plus-DcVtqCMV.js";import{u as F}from"./tooltip-DJkxXViN.js";import{a as Ee,D as Ae,b as Me,c as Te}from"./dialog-DCrLu7TC.js";import{D as ae,a as ce,b as Oe,c as De}from"./drawer-CwKj53Jm.js";import{I as me}from"./import-from-deco-dialog-CBUqBAZP.js";import{u as Pe}from"./use-create-virtual-mcp-CEBO__7d.js";import{P as H}from"./index-CtkIjbbq.js";import{R as G,a as K,b as Re}from"./resizable-BceA9DHD.js";import{u as $e}from"./useQuery-CvkH2gG1.js";import{d as Ve}from"./XCircle-Z-JTmQ8v.js";import"./spinner-7bhznOFa.js";import"./use-mcp-prompts-DY_yf0WC.js";import"./form-DPsme8JL.js";import"./label-DF2jcg2U.js";import"./input-BoNWsfmK.js";import"./index-Bgix03M4.js";import"./usage-BW6ztpN6.js";import"./ArrowUp-D6ltkV3R.js";import"./ChevronDown-CDxBhn_l.js";import"./org-ai-providers-DFHn6TCP.js";import"./useMutation-BTUmJffP.js";import"./AlertCircle-BD5gSXQu.js";import"./RefreshCcw01-Co0-i94o.js";import"./Play-Bb4cvvVL.js";import"./Trash01-CBP9WLeP.js";import"./card-CKN-JP9M.js";import"./toggle-group-DN_3BuPh.js";import"./avatar-BZ4Frci2.js";import"./User01-CItwHvE1.js";import"./ai-providers-logos-idzpcoUr.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./X-Dr-hR03I.js";import"./select-DaOZXaTi.js";import"./index-BdQq_4o_.js";import"./index-BkAoKVx8.js";import"./Check-Dczm9Dfw.js";import"./ChevronUp-BLNd6dNq.js";import"./ArrowLeft-DN3D0Zrv.js";import"./use-copy-DYNuGKRz.js";import"./marked.esm-BaswSlok.js";import"./tabs-Du7uGFqP.js";import"./checkbox-Dzy6oaRF.js";import"./SearchMd-CVvF1HpM.js";import"./Settings01-DpZ_tsoX.js";import"./use-mcp-resources-BnmpykKD.js";import"./collapsible-D84K6rP8.js";import"./index-Dg9iIj2F.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-C8wEMNqP.js";import"./types-llndI7Ky.js";import"./XClose-BLvk3pvY.js";import"./Type01-CySkENi6.js";import"./use-collections-Dmxer7H8.js";import"./useSuspenseInfiniteQuery-DRfcYfXZ.js";import"./infiniteQueryObserver-DiY9IZXI.js";import"./Loading01-BVCg1O_G.js";import"./collection-search-fzGK39qM.js";import"./user-DXILGeu2.js";import"./format-time-CMKyl-GC.js";import"./empty-state-B8NhLY9v.js";import"./dropdown-menu-BK29e1o0.js";import"./decopilot-events-Brt4gAR6.js";import"./index-2hR_U2H-.js";import"./Container-CMPDG7Cp.js";import"./Dataflow03-slF1Ax9G.js";import"./FolderClosed-BKB_NgWm.js";import"./Upload01-BzGPegBj.js";import"./Zap-CiHJmamA.js";import"./generate-id-Dyweu44Y.js";import"./slug-DcxyEoi0.js";const He=[{id:"deco",title:"Import from deco.cx",buttonLabel:"Import site",comingSoon:!1,image:"/import-decocx.png"},{id:"github",title:"Existing GitHub project",buttonLabel:"Coming Soon",comingSoon:!0,image:"/import-github.png"},{id:"scratch",title:"Start from scratch",buttonLabel:"Coming Soon",comingSoon:!0,image:"/import-scratch.png"}];function Q(t){const e=j.c(8),{onCardAction:r,mobile:o}=t,a=o?"flex flex-col flex-1 min-h-0 gap-3":"flex flex-col gap-3";let l;e[0]!==a?(l=S("sm:grid sm:grid-cols-3 sm:gap-4",a),e[0]=a,e[1]=l):l=e[1];let c;e[2]!==o||e[3]!==r?(c=He.map(i=>s.jsxs("button",{type:"button",disabled:i.comingSoon,onClick:()=>r(i.id),className:S("rounded-xl border border-border bg-card overflow-hidden text-left","transition-transform duration-150 ease-out will-change-transform","flex flex-row items-center sm:flex-col",o&&"flex-1 min-h-0",!i.comingSoon&&"[@media(hover:hover)]:hover:scale-[1.03] sm:[@media(hover:hover)]:hover:scale-[1.05] active:scale-[0.98] cursor-pointer",i.comingSoon&&"cursor-default"),children:[s.jsx("div",{className:S("w-28 shrink-0 self-stretch sm:w-full sm:aspect-[4/3] sm:self-auto bg-muted overflow-hidden",i.comingSoon&&"opacity-40"),children:i.image&&s.jsx("img",{src:i.image,alt:i.title,className:"w-full h-full object-cover"})}),s.jsxs("div",{className:"flex flex-1 flex-row items-center justify-between gap-3 px-4 py-3 sm:flex-col sm:items-stretch sm:px-5 sm:py-4 sm:gap-0",children:[s.jsx("p",{className:"font-medium text-foreground text-sm sm:text-base sm:text-center sm:mb-4",children:i.title}),s.jsx(te,{className:"shrink-0 cursor-pointer sm:w-full",size:"sm",variant:i.comingSoon?"outline":"default",disabled:i.comingSoon,onClick:d=>{d.stopPropagation(),r(i.id)},children:i.buttonLabel})]})]},i.id)),e[2]=o,e[3]=r,e[4]=c):c=e[4];let n;return e[5]!==l||e[6]!==c?(n=s.jsx("div",{className:l,children:c}),e[5]=l,e[6]=c,e[7]=n):n=e[7],n}const X=s.jsx(U,{icon:"icon://Globe01?color=violet",name:"Site Editor",size:"sm"});function Be(t){const e=j.c(15),{open:r,onOpenChange:o}=t,[a,l]=w.useState(!1),c=F();let n;e[0]!==o?(n=u=>{u==="deco"&&(o(!1),l(!0))},e[0]=o,e[1]=n):n=e[1];const i=n;let d;e[2]!==i||e[3]!==c||e[4]!==o||e[5]!==r?(d=c?s.jsx(ae,{open:r,onOpenChange:o,children:s.jsxs(ce,{className:"h-[70dvh]",children:[s.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:s.jsxs("div",{className:"flex items-center gap-3",children:[X,s.jsx(De,{className:"text-xl font-semibold",children:"Get started with Site Editor"})]})}),s.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:s.jsx(Q,{onCardAction:i,mobile:!0})})]})}):s.jsx(Ee,{open:r,onOpenChange:o,children:s.jsxs(Ae,{className:"sm:max-w-[900px] p-8",children:[s.jsx(Me,{className:"mb-8",children:s.jsxs("div",{className:"flex items-center gap-3",children:[X,s.jsx(Te,{className:"text-xl font-semibold",children:"Get started with Site Editor"})]})}),s.jsx(Q,{onCardAction:i})]})}),e[2]=i,e[3]=c,e[4]=o,e[5]=r,e[6]=d):d=e[6];let m;e[7]!==o?(m=()=>{l(!1),o(!0)},e[7]=o,e[8]=m):m=e[8];let f;e[9]!==a||e[10]!==m?(f=s.jsx(me,{open:a,onOpenChange:l,onBack:m}),e[9]=a,e[10]=m,e[11]=f):f=e[11];let x;return e[12]!==d||e[13]!==f?(x=s.jsxs(s.Fragment,{children:[d,f]}),e[12]=d,e[13]=f,e[14]=x):x=e[14],x}function de(t){const e=j.c(16),{agent:r,onSpecialClick:o}=t,{setVirtualMcpId:a}=le();let l;e[0]!==r.id||e[1]!==o||e[2]!==a?(l=()=>{o?o():a(r.id)},e[0]=r.id,e[1]=o,e[2]=a,e[3]=l):l=e[3];const c=l;let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=S("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[88px]","group"),e[4]=n):n=e[4];const i=`Select agent ${r.title}`;let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(be,{size:24}),e[5]=d):d=e[5];let m;e[6]!==r.icon||e[7]!==r.title?(m=s.jsx(U,{icon:r.icon,name:r.title,size:"md",fallbackIcon:d,className:"transition-transform group-hover:scale-110"}),e[6]=r.icon,e[7]=r.title,e[8]=m):m=e[8];let f;e[9]!==r.title?(f=s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight line-clamp-2",children:r.title}),e[9]=r.title,e[10]=f):f=e[10];let x;return e[11]!==c||e[12]!==i||e[13]!==m||e[14]!==f?(x=s.jsxs("button",{type:"button",onClick:c,className:n,"aria-label":i,children:[m,f]}),e[11]=c,e[12]=i,e[13]=m,e[14]=f,e[15]=x):x=e[15],x}function Le(t){const e=j.c(15),{virtualMcps:r,selectedVirtualMcpId:o,onVirtualMcpChange:a}=t,[l,c]=w.useState(!1),n=w.useRef(null),i=F();let d,m;e[0]!==i||e[1]!==l?(d=()=>{l&&!i&&setTimeout(()=>{n.current?.focus()},0)},m=[l,i],e[0]=i,e[1]=l,e[2]=d,e[3]=m):(d=e[2],m=e[3]),w.useEffect(d,m);let f;e[4]!==a?(f=N=>{a(N),c(!1)},e[4]=a,e[5]=f):f=e[5];const x=f;let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=S("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[88px]","group"),e[6]=u):u=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ye,{asChild:!0,children:s.jsxs("button",{type:"button",className:u,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-xl bg-accent flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:s.jsx(ze,{size:20,className:"text-foreground"})}),s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"See all"})]})}),e[7]=h):h=e[7];let p;e[8]!==x||e[9]!==o||e[10]!==r?(p=s.jsx(Se,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(je,{virtualMcps:r,selectedVirtualMcpId:o,onVirtualMcpChange:x,searchInputRef:n})}),e[8]=x,e[9]=o,e[10]=r,e[11]=p):p=e[11];let g;return e[12]!==l||e[13]!==p?(g=s.jsxs(Ce,{open:l,onOpenChange:c,children:[h,p]}),e[12]=l,e[13]=p,e[14]=g):g=e[14],g}const J={id:"site-editor",title:"Site Editor",icon:"icon://Globe01?color=violet"};function Fe(){const t=j.c(9);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={navigateOnCreate:!0},t[0]=e):e=t[0];const{createVirtualMCP:r,isCreating:o}=Pe(e);let a;t[1]!==r?(a=()=>r(),t[1]=r,t[2]=a):a=t[2];let l;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=S("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[88px]","group","disabled:opacity-50 disabled:cursor-not-allowed"),t[3]=l):l=t[3];let c,n;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-xl bg-background border-2 border-dashed border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:s.jsx(ne,{size:20,className:"text-muted-foreground"})}),n=s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"Create agent"}),t[4]=c,t[5]=n):(c=t[4],n=t[5]);let i;return t[6]!==o||t[7]!==a?(i=s.jsxs("button",{type:"button",onClick:a,disabled:o,className:l,"aria-label":"Create agent",children:[c,n]}),t[6]=o,t[7]=a,t[8]=i):i=t[8],i}function Ge(){const t=j.c(30),e=Ie(),{selectedVirtualMcp:r,setVirtualMcpId:o}=le(),{locator:a}=se(),[l,c]=w.useState(!1);let n,i,d,m,f,x;if(t[0]!==a||t[1]!==e){const z=ge(a),k=e.filter(qe).sort((_,I)=>{const B=z.indexOf(_.id),v=z.indexOf(I.id);return B!==-1&&v!==-1?B-v:B!==-1?-1:v!==-1?1:new Date(I.updated_at).getTime()-new Date(_.updated_at).getTime()}).slice(0,5);let y;t[8]!==e?(y=e.map(We),t[8]=e,t[9]=y):y=t[9],x=y,n=k.length>0,f="w-full",i="flex flex-wrap justify-center gap-2",t[10]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(de,{agent:J,onSpecialClick:()=>c(!0)},J.id),t[10]=d):d=t[10],m=k.map(Ue),t[0]=a,t[1]=e,t[2]=n,t[3]=i,t[4]=d,t[5]=m,t[6]=f,t[7]=x}else n=t[2],i=t[3],d=t[4],m=t[5],f=t[6],x=t[7];let u;t[11]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Fe,{}),t[11]=u):u=t[11];let h;t[12]!==n||t[13]!==r?.id||t[14]!==o||t[15]!==x?(h=n&&s.jsx(Le,{virtualMcps:x,selectedVirtualMcpId:r?.id??null,onVirtualMcpChange:o}),t[12]=n,t[13]=r?.id,t[14]=o,t[15]=x,t[16]=h):h=t[16];let p;t[17]!==i||t[18]!==d||t[19]!==m||t[20]!==h?(p=s.jsxs("div",{className:i,children:[d,m,u,h]}),t[17]=i,t[18]=d,t[19]=m,t[20]=h,t[21]=p):p=t[21];let g;t[22]!==f||t[23]!==p?(g=s.jsx("div",{className:f,children:p}),t[22]=f,t[23]=p,t[24]=g):g=t[24];let N;t[25]!==l?(N=s.jsx(Be,{open:l,onOpenChange:c}),t[25]=l,t[26]=N):N=t[26];let C;return t[27]!==g||t[28]!==N?(C=s.jsxs(s.Fragment,{children:[g,N]}),t[27]=g,t[28]=N,t[29]=C):C=t[29],C}function Ue(t){return s.jsx(de,{agent:t},t.id??"default")}function We(t){return{id:t.id,title:t.title,description:t.description,icon:t.icon}}function qe(t){return t.id!==null&&!ke(t.id)}function Ke(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"w-full",children:s.jsx("div",{className:"flex flex-wrap justify-center gap-2",children:Array.from({length:7}).map(Qe)})}),t[0]=e):e=t[0],e}function Qe(t,e){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 w-[88px]",children:[s.jsx(q,{className:"size-12 rounded-xl shrink-0"}),s.jsx(q,{className:"h-3 sm:h-4 w-full"})]},e)}function Y(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(w.Suspense,{fallback:s.jsx(Ke,{}),children:s.jsx(Ge,{})}),t[0]=e):e=t[0],e}const Xe=`url("data:image/svg+xml;utf8,<svg viewBox='0 0 500 64' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><rect x='0' y='0' height='100%' width='100%' fill='url(%23grad)' opacity='0.6'/><defs><radialGradient id='grad' gradientUnits='userSpaceOnUse' cx='0' cy='0' r='10' gradientTransform='matrix(55.083 -7.55 1.4151 14.867 -37.917 86)'><stop stop-color='rgba(165,149,255,1)' offset='0.0045422'/><stop stop-color='rgba(210,202,255,1)' offset='0.16426'/><stop stop-color='rgba(255,255,255,1)' offset='0.32398'/><stop stop-color='rgba(255,255,255,0.3)' offset='0.68776'/><stop stop-color='rgba(255,224,139,0.3)' offset='0.74761'/><stop stop-color='rgba(255,209,80,0.3)' offset='0.77753'/><stop stop-color='rgba(255,193,22,0.3)' offset='0.80745'/><stop stop-color='rgba(208,236,26,1)' offset='0.96307'/></radialGradient></defs></svg>")`,Je="/decotexture.svg";function Z(t){const e=j.c(7),{onClick:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={backgroundImage:Xe,backgroundSize:"100% 100%"},e[0]=o):o=e[0];let a,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"relative shrink-0 p-1.5 bg-[var(--brand-green-light)] rounded-lg border border-border",children:s.jsx(U,{icon:"/logos/deco%20logo.svg",name:"deco.cx",size:"xs",className:"border-0 rounded-none"})}),l=s.jsx("p",{className:"flex-1 relative text-sm font-medium text-foreground leading-none whitespace-nowrap",children:"Import your deco.cx site"}),e[1]=a,e[2]=l):(a=e[1],l=e[2]);let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("img",{src:Je,alt:"","aria-hidden":!0,className:"absolute pointer-events-none",style:{width:"274.5px",height:"272.25px",left:"calc(50% + 145.5px)",top:"calc(50% + 40px)",transform:"translate(-50%, -50%)"}}),e[3]=c):c=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"relative bg-background flex items-center justify-center size-8 rounded-md shrink-0",children:s.jsx(Ve,{size:16,className:"text-foreground transition-transform group-hover:translate-x-0.5"})}),e[4]=n):n=e[4];let i;return e[5]!==r?(i=s.jsxs("button",{type:"button",onClick:r,className:"w-full relative flex items-center gap-4 px-4 py-4 rounded-lg border border-border bg-background overflow-hidden transition-colors text-left cursor-pointer group",style:o,children:[a,l,c,n]}),e[5]=r,e[6]=i):i=e[6],i}function Ye(){const t=j.c(5),{data:e}=oe.useSession(),r=e?.user?.email;let o;t[0]!==r?(o=["deco-profile",r],t[0]=r,t[1]=o):o=t[1];const a=!!e?.user?.email;let l;t[2]!==o||t[3]!==a?(l={queryKey:o,queryFn:Ze,enabled:a,staleTime:3e5},t[2]=o,t[3]=a,t[4]=l):l=t[4];const{data:c}=$e(l);return c?.isDecoUser??!1}async function Ze(){const t=await fetch("/api/deco-sites/profile");return t.ok?t.json():{isDecoUser:!1}}function ee(t){const e=j.c(48),{showContext:r,setShowContext:o}=t,{org:a}=se(),l=pe(),{data:c}=oe.useSession(),{isChatEmpty:n,activeTaskId:i,tasks:d,selectedVirtualMcp:m,createTask:f,switchToTask:x}=re();let u;if(e[0]!==i||e[1]!==d){let V;e[3]!==i?(V=fe=>fe.id===i,e[3]=i,e[4]=V):V=e[4],u=d.find(V),e[0]=i,e[1]=d,e[2]=u}else u=e[2];const h=u,p=F(),[g,N]=w.useState(!1),[C,z]=w.useState(!1),k=Ye();let y;e[5]!==c?.user?.name?(y=c?.user?.name?.split(" ")[0]||"there",e[5]=c?.user?.name,e[6]=y):y=e[6];const _=y;let I;e[7]!==a.id?(I=_e(a.id),e[7]=a.id,e[8]=I):I=e[8];const v=m??I;let E;e[9]!==h?(E=h?.title&&s.jsx(he,{taskId:h.id,text:h.title,className:"text-sm font-medium text-foreground"}),e[9]=h,e[10]=E):E=e[10];let A;e[11]!==E?(A=s.jsx(H.Header.Left,{className:"gap-2",children:E}),e[11]=E,e[12]=A):A=e[12];let M;e[13]!==f||e[14]!==n||e[15]!==p?(M=p&&s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",onClick:()=>f(),disabled:n,className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors disabled:opacity-40 disabled:cursor-not-allowed",title:"New chat",children:s.jsx(ne,{size:16,className:"text-muted-foreground"})}),s.jsx("button",{type:"button",onClick:()=>N(!0),className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors",title:"Tasks",children:s.jsx(we,{size:16,className:"text-muted-foreground"})})]}),e[13]=f,e[14]=n,e[15]=p,e[16]=M):M=e[16];let T;e[17]!==n||e[18]!==p||e[19]!==o||e[20]!==r?(T=!n&&!p&&s.jsx("button",{type:"button",onClick:()=>o(et),className:S("flex size-7 items-center justify-center rounded-md border border-input hover:bg-accent transition-colors",r&&"bg-accent"),title:"Toggle context panel",children:s.jsx(ve,{size:14,className:"text-muted-foreground"})}),e[17]=n,e[18]=p,e[19]=o,e[20]=r,e[21]=T):T=e[21];let O;e[22]!==M||e[23]!==T?(O=s.jsxs(H.Header.Right,{className:"gap-1",children:[M,T]}),e[22]=M,e[23]=T,e[24]=O):O=e[24];let D;e[25]!==A||e[26]!==O?(D=s.jsxs(H.Header,{className:"flex-none z-10 bg-background",children:[A,O]}),e[25]=A,e[26]=O,e[27]=D):D=e[27];let P;e[28]!==p||e[29]!==g||e[30]!==x?(P=p&&s.jsx(ae,{open:g,onOpenChange:N,direction:"bottom",children:s.jsx(ce,{className:"h-[90vh] max-h-[90vh]",children:s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(ie,{onTaskSelect:async V=>{await x(V),N(!1)}})})})}),e[28]=p,e[29]=g,e[30]=x,e[31]=P):P=e[31];let R;e[32]!==v||e[33]!==n||e[34]!==k||e[35]!==p||e[36]!==l||e[37]!==m||e[38]!==o||e[39]!==_?(R=n?p?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center px-4",children:s.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(W,{icon:v.icon,name:v.title,size:"md",className:S("transition-opacity duration-200",!m&&"invisible")})}),s.jsx("div",{className:"text-center",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",_,"?"]})})]})}),s.jsxs("div",{className:"shrink-0 flex flex-col items-center w-full gap-3 pb-2",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-2xl mx-auto gap-4 px-4",children:[s.jsx(b.IceBreakers,{className:"w-full"}),l&&s.jsx("div",{className:"flex flex-col items-center w-full",children:s.jsx(Y,{})}),k&&l&&s.jsx("div",{className:"w-full max-w-[500px] mx-auto",children:s.jsx(Z,{onClick:()=>z(!0)})})]}),s.jsx(b.Footer,{children:s.jsx(b.Input,{})})]})]}):s.jsxs("div",{className:"flex-1 flex flex-col items-center px-10",children:[s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(W,{icon:v.icon,name:v.title,size:"md",className:S("transition-opacity duration-200",!m&&"invisible")})}),s.jsx("div",{className:"text-center mb-6",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",_,"?"]})}),s.jsx(b.IceBreakers,{className:"w-full"}),s.jsx("div",{className:"w-full",children:s.jsx(b.Input,{onOpenContextPanel:()=>o(!0)})})]}),l&&s.jsx("div",{className:"w-full max-w-[800px] mt-10 mx-auto",children:s.jsx(Y,{})})]}),k&&l&&s.jsx("div",{className:"w-full max-w-[500px] mx-auto pb-6",children:s.jsx(Z,{onClick:()=>z(!0)})})]}):s.jsxs(s.Fragment,{children:[s.jsx(b.Main,{children:s.jsx(b.Messages,{})}),s.jsx(b.Footer,{children:s.jsx(b.Input,{onOpenContextPanel:()=>o(!0)})})]}),e[32]=v,e[33]=n,e[34]=k,e[35]=p,e[36]=l,e[37]=m,e[38]=o,e[39]=_,e[40]=R):R=e[40];let $;e[41]!==C?($=s.jsx(me,{open:C,onOpenChange:z}),e[41]=C,e[42]=$):$=e[42];let L;return e[43]!==P||e[44]!==R||e[45]!==$||e[46]!==D?(L=s.jsxs(b,{className:"h-full bg-background",children:[D,P,R,$]}),e[43]=P,e[44]=R,e[45]=$,e[46]=D,e[47]=L):L=e[47],L}function et(t){return!t}function tt(){const t=j.c(15),{allModelsConnections:e}=re(),r=F(),[o,a]=w.useState(!1);if(e.length===0){let x;return t[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"flex flex-col h-full bg-background items-center justify-center",children:s.jsx(b.NoLlmBindingEmptyState,{})}),t[0]=x):x=t[0],x}if(r){let x;return t[1]!==o?(x=s.jsx("div",{className:"size-full",children:s.jsx(ee,{showContext:o,setShowContext:a})}),t[1]=o,t[2]=x):x=t[2],x}let l,c;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(G,{defaultSize:20,minSize:10,id:"tasks",order:1,children:s.jsx(ie,{})}),c=s.jsx(K,{className:"bg-border/30"}),t[3]=l,t[4]=c):(l=t[3],c=t[4]);const n=o?50:80;let i;t[5]!==o?(i=s.jsx(ee,{showContext:o,setShowContext:a}),t[5]=o,t[6]=i):i=t[6];let d;t[7]!==n||t[8]!==i?(d=s.jsx(G,{defaultSize:n,minSize:30,id:"main",order:2,children:i}),t[7]=n,t[8]=i,t[9]=d):d=t[9];let m;t[10]!==o?(m=o&&s.jsxs(s.Fragment,{children:[s.jsx(K,{className:"bg-border/30"}),s.jsx(G,{defaultSize:30,minSize:15,id:"context",order:3,children:s.jsx(ue,{onClose:()=>a(!1)})})]}),t[10]=o,t[11]=m):m=t[11];let f;return t[12]!==d||t[13]!==m?(f=s.jsxs(Re,{direction:"horizontal",className:"size-full",children:[l,c,d,m]}),t[12]=d,t[13]=m,t[14]=f):f=t[14],f}function st(t){const e=j.c(14),{error:r,onRetry:o}=t,a=r?.message?.includes("401")||r?.message?.toLowerCase().includes("unauthorized");let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(H.Header,{className:"flex-none",children:[s.jsx(H.Header.Left,{className:"gap-2"}),s.jsx(H.Header.Right,{className:"gap-1"})]}),e[0]=l):l=e[0];let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(Ne,{className:"h-6 w-6 text-destructive"})}),e[1]=c):c=e[1];const n=a?"Unable to load models":"Something went wrong";let i;e[2]!==n?(i=s.jsx("h3",{className:"text-lg font-medium",children:n}),e[2]=n,e[3]=i):i=e[3];const d=a?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":r?.message||"An unexpected error occurred";let m;e[4]!==d?(m=s.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[4]=d,e[5]=m):m=e[5];let f;e[6]!==i||e[7]!==m?(f=s.jsxs("div",{className:"space-y-2",children:[i,m]}),e[6]=i,e[7]=m,e[8]=f):f=e[8];let x;e[9]!==o?(x=s.jsx(te,{variant:"outline",onClick:o,children:"Try again"}),e[9]=o,e[10]=x):x=e[10];let u;return e[11]!==f||e[12]!==x?(u=s.jsxs(b,{children:[l,s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:s.jsxs("div",{className:"max-w-sm space-y-4",children:[c,f,x]})})]}),e[11]=f,e[12]=x,e[13]=u):u=e[13],u}function Ts(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(xe,{fallback:ot,children:s.jsx(w.Suspense,{fallback:s.jsx(b.Skeleton,{}),children:s.jsx(tt,{})})}),t[0]=e):e=t[0],e}function ot(t){const{error:e,resetError:r}=t;return s.jsx(st,{error:e,onRetry:r})}export{Ts as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as Q,r as D,j as s,y as ce,B as te,f as ue,c as me,a8 as xe,G as pe,O as ge,g as Re,aT as Te,bQ as oe,K as Pe,F as ze,E as $e,aU as ke}from"./index-B62MiQAu.js";import{u as Le,P as se}from"./index-DNarCA5m.js";import{B as Ee,a as Fe,b as Oe,c as Ke}from"./breadcrumb-B3Pzyfpg.js";import{a as he}from"./Play-DSddPPya.js";import{r as je}from"./integration-icon-BByVvYW2.js";import{i as le}from"./Loading01-CrI0NwPE.js";import{i as ye}from"./SearchMd-CS43V34Y.js";import{u as Ae}from"./use-store-discovery-B_zVCnQi.js";import{u as _e,a as ve,b as Be}from"./use-connection-u5F7YTDM.js";import{s as Me}from"./slugify-CEUa2lfQ.js";import{f as De,i as Ge,u as Ue}from"./registry-utils-DWGplsmC.js";import{C as Ve}from"./collection-search-BxbLLE-D.js";import{M as ae}from"./mcp-server-card-3TrMzryK.js";import{I as We}from"./input-BNSWRvAr.js";import{P as be,a as Ne,b as Ce}from"./popover-CW4G5neq.js";import{i as Se}from"./Check-BgcEZAFd.js";import{t as we}from"./ChevronDown-Ca93y5Zg.js";import{s as re}from"./XClose-DKDxXEaA.js";import{s as He}from"./Plus-ltkKoqJz.js";import{E as qe}from"./empty-state-8546_PpL.js";import{u as Je}from"./useQuery-Cr3Ibn6v.js";import{W as Qe,a as Ye,u as Xe,e as Ze,b as et}from"./constants-B7D0VCWO.js";import"./useMutation-5tF0rOhi.js";import"./tooltip-Cz2tQy7f.js";import"./index-BcOdsrKl.js";import"./X-BNpME-HX.js";import"./ChevronRight-iThFOnTS.js";import"./Container-BQWbDEy6.js";import"./AlertCircle-CE4aMC_6.js";import"./ArrowUp-DVMY0e13.js";import"./ArrowLeft-VzQjF5nf.js";import"./XCircle-MpsZU5qt.js";import"./Type01-Dp2k0by5.js";import"./ChevronUp-Dfrjh0kb.js";import"./RefreshCcw01-DN-y3At7.js";import"./Dataflow03-DdTzEDv9.js";import"./FolderClosed-jb7WzUeW.js";import"./Settings01-ClJz1ULQ.js";import"./Trash01-fCw8HP0s.js";import"./Upload01-3AVPYkeL.js";import"./User01-CKoZ8ZDH.js";import"./Zap-kD49gPEF.js";import"./useInfiniteQuery-D_7z7Ekt.js";import"./infiniteQueryObserver-C4rkYsAc.js";import"./use-collections-Cw-CkhM5.js";import"./workflow-DGOWYrJv.js";import"./collections-pcWRi6G6.js";import"./card-CQTuw0Xi.js";function tt(t,e){const r=Q.c(4),[l,d]=D.useState(t),o=D.useRef(null),n=D.useRef(!0);let a,f;return r[0]!==e||r[1]!==t?(a=()=>{if(n.current){n.current=!1;return}return o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{d(t)},e),()=>{o.current&&clearTimeout(o.current)}},f=[t,e],r[0]=e,r[1]=t,r[2]=a,r[3]=f):(a=r[2],f=r[3]),D.useEffect(a,f),l}function st(t){const e=Q.c(14),r=D.useRef(null),l=`scroll-position:${t}`,d=D.useRef(null);let o;e[0]!==l?(o=()=>{r.current&&sessionStorage.setItem(l,String(r.current.scrollTop))},e[0]=l,e[1]=o):o=e[1];const n=o;let a;e[2]!==l?(a=()=>{if(d.current===l)return;const p=sessionStorage.getItem(l);if(p&&r.current){const k=Number.parseInt(p,10);r.current.scrollTop=k}d.current=l},e[2]=l,e[3]=a):a=e[3];const f=a;let c;e[4]!==f||e[5]!==l?(c=()=>{d.current!==l&&f()},e[4]=f,e[5]=l,e[6]=c):c=e[6];const T=c;let m;e[7]!==f||e[8]!==l?(m=p=>{r.current=p,p&&d.current!==l&&requestAnimationFrame(()=>{f()})},e[7]=f,e[8]=l,e[9]=m):m=e[9];const x=m;let i;return e[10]!==T||e[11]!==n||e[12]!==x?(i={scrollRef:x,saveScrollPosition:n,handleScroll:T},e[10]=T,e[11]=n,e[12]=x,e[13]=i):i=e[13],i}function rt(t,e){return[...t].sort((r,l)=>l.count-r.count).slice(0,e)}function fe(t){const e=Q.c(52),{label:r,items:l,selectedItems:d,onToggle:o,onClear:n}=t,[a,f]=D.useState(""),[c,T]=D.useState(!1);let m,x,i,p,k,C,R,y,L,v,b;if(e[0]!==l||e[1]!==r||e[2]!==o||e[3]!==c||e[4]!==a||e[5]!==d){const S=[...a?l.filter(O=>O.value.toLowerCase().includes(a.toLowerCase())):l].sort(lt);i=d.length,x=be,L=c,v=T;let g;e[17]!==r?(g=s.jsx("span",{children:r}),e[17]=r,e[18]=g):g=e[18];let w;e[19]!==i?(w=i>0&&s.jsx("span",{className:"ml-1 rounded-full bg-primary text-primary-foreground px-1.5 py-0.5 text-[10px] font-medium",children:i}),e[19]=i,e[20]=w):w=e[20];let h;e[21]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(we,{size:14,className:"opacity-50"}),e[21]=h):h=e[21],e[22]!==w||e[23]!==g?(b=s.jsx(Ne,{asChild:!0,children:s.jsxs(te,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[g,w,h]})}),e[22]=w,e[23]=g,e[24]=b):b=e[24],m=Ce,C="w-64 p-0",R="start";let E;e[25]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(ye,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=E):E=e[25];let I;e[26]!==r?(I=r.toLowerCase(),e[26]=r,e[27]=I):I=e[27];const F=`Search ${I}...`;let A;e[28]===Symbol.for("react.memo_cache_sentinel")?(A=O=>f(O.target.value),e[28]=A):A=e[28],e[29]!==a||e[30]!==F?(y=s.jsx("div",{className:"shrink-0 w-full border-b border-border h-10",children:s.jsxs("label",{className:"flex items-center gap-2.5 h-10 px-4 cursor-text",children:[E,s.jsx(We,{type:"text",placeholder:F,value:a,onChange:A,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[29]=a,e[30]=F,e[31]=y):y=e[31],p="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",k=S.length===0?s.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):S.map(O=>{const H=d.includes(O.value);return s.jsxs("button",{onClick:()=>o(O.value),className:ce("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",H?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[s.jsxs("span",{className:"truncate flex items-center gap-2",children:[H&&s.jsx(Se,{size:16,className:"text-muted-foreground shrink-0"}),O.value]}),s.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:O.count})]},O.value)}),e[0]=l,e[1]=r,e[2]=o,e[3]=c,e[4]=a,e[5]=d,e[6]=m,e[7]=x,e[8]=i,e[9]=p,e[10]=k,e[11]=C,e[12]=R,e[13]=y,e[14]=L,e[15]=v,e[16]=b}else m=e[6],x=e[7],i=e[8],p=e[9],k=e[10],C=e[11],R=e[12],y=e[13],L=e[14],v=e[15],b=e[16];let N;e[32]!==p||e[33]!==k?(N=s.jsx("div",{className:p,children:k}),e[32]=p,e[33]=k,e[34]=N):N=e[34];let z;e[35]!==r||e[36]!==n||e[37]!==i?(z=i>0&&s.jsx("div",{className:"p-2 border-t border-border",children:s.jsxs(te,{variant:"ghost",size:"sm",onClick:n,className:"w-full text-xs text-muted-foreground hover:text-foreground",children:["Clear ",r.toLowerCase()]})}),e[35]=r,e[36]=n,e[37]=i,e[38]=z):z=e[38];let $;e[39]!==m||e[40]!==z||e[41]!==C||e[42]!==R||e[43]!==y||e[44]!==N?($=s.jsxs(m,{className:C,align:R,children:[y,N,z]}),e[39]=m,e[40]=z,e[41]=C,e[42]=R,e[43]=y,e[44]=N,e[45]=$):$=e[45];let P;return e[46]!==x||e[47]!==$||e[48]!==L||e[49]!==v||e[50]!==b?(P=s.jsxs(x,{open:L,onOpenChange:v,children:[b,$]}),e[46]=x,e[47]=$,e[48]=L,e[49]=v,e[50]=b,e[51]=P):P=e[51],P}function lt(t,e){return e.count-t.count}function nt(t){const e=Q.c(67),{availableTags:r,availableCategories:l,selectedTags:d,selectedCategories:o,onTagChange:n,onCategoryChange:a}=t,f=r&&r.length>0||l&&l.length>0,c=d.length>0||o.length>0;if(!f)return null;let T;e[0]!==n||e[1]!==d?(T=g=>{d.includes(g)?n(d.filter(w=>w!==g)):n([...d,g])},e[0]=n,e[1]=d,e[2]=T):T=e[2];const m=T;let x;e[3]!==a||e[4]!==o?(x=g=>{o.includes(g)?a(o.filter(w=>w!==g)):a([...o,g])},e[3]=a,e[4]=o,e[5]=x):x=e[5];const i=x;let p;e[6]!==a||e[7]!==n?(p=()=>{n([]),a([])},e[6]=a,e[7]=n,e[8]=p):p=e[8];const k=p;let C,R,y,L,v,b,N;if(e[9]!==l||e[10]!==r||e[11]!==a||e[12]!==n||e[13]!==o||e[14]!==d||e[15]!==i||e[16]!==m){const g=l?rt(l,6):[];C=o,R=d,N=new Set(g.map(it)),v="flex items-center border-b border-border";let w;e[24]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:s.jsx(he,{size:16})}),e[24]=w):w=e[24];let h;e[25]!==l||e[26]!==a||e[27]!==o||e[28]!==i?(h=l&&l.length>0&&s.jsx(fe,{label:"Categories",items:l,selectedItems:o,onToggle:i,onClear:()=>a([])}),e[25]=l,e[26]=a,e[27]=o,e[28]=i,e[29]=h):h=e[29];let E;e[30]!==r||e[31]!==n||e[32]!==d||e[33]!==m?(E=r&&r.length>0&&s.jsx(fe,{label:"Tags",items:r,selectedItems:d,onToggle:m,onClear:()=>n([])}),e[30]=r,e[31]=n,e[32]=d,e[33]=m,e[34]=E):E=e[34],e[35]!==E||e[36]!==h?(b=s.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[w,h,E]}),e[35]=E,e[36]=h,e[37]=b):b=e[37],y="flex items-center gap-3 flex-wrap px-5 py-3";let I;e[38]!==o||e[39]!==i?(I=F=>{const A=o.includes(F.value);return s.jsxs("div",{onClick:()=>i(F.value),className:ce("inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer",A?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"),children:[s.jsx("span",{children:F.value}),A&&s.jsx("span",{onClick:O=>{O.stopPropagation(),i(F.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},F.value)},e[38]=o,e[39]=i,e[40]=I):I=e[40],L=g.map(I),e[9]=l,e[10]=r,e[11]=a,e[12]=n,e[13]=o,e[14]=d,e[15]=i,e[16]=m,e[17]=C,e[18]=R,e[19]=y,e[20]=L,e[21]=v,e[22]=b,e[23]=N}else C=e[17],R=e[18],y=e[19],L=e[20],v=e[21],b=e[22],N=e[23];let z;if(e[41]!==C||e[42]!==i||e[43]!==N){let g;e[45]!==N?(g=h=>!N.has(h),e[45]=N,e[46]=g):g=e[46];let w;e[47]!==i?(w=h=>s.jsxs("div",{onClick:()=>i(h),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:h}),s.jsx("span",{onClick:E=>{E.stopPropagation(),i(h)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`cat-${h}`),e[47]=i,e[48]=w):w=e[48],z=C.filter(g).map(w),e[41]=C,e[42]=i,e[43]=N,e[44]=z}else z=e[44];let $;if(e[49]!==R||e[50]!==m){let g;e[52]!==m?(g=w=>s.jsxs("div",{onClick:()=>m(w),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:w}),s.jsx("span",{onClick:h=>{h.stopPropagation(),m(w)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`tag-${w}`),e[52]=m,e[53]=g):g=e[53],$=R.map(g),e[49]=R,e[50]=m,e[51]=$}else $=e[51];let P;e[54]!==k||e[55]!==c?(P=c&&s.jsxs(te,{variant:"ghost",size:"sm",onClick:k,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[s.jsx(re,{size:14}),"Clear all"]}),e[54]=k,e[55]=c,e[56]=P):P=e[56];let j;e[57]!==P||e[58]!==y||e[59]!==L||e[60]!==z||e[61]!==$?(j=s.jsxs("div",{className:y,children:[L,z,$,P]}),e[57]=P,e[58]=y,e[59]=L,e[60]=z,e[61]=$,e[62]=j):j=e[62];let S;return e[63]!==j||e[64]!==v||e[65]!==b?(S=s.jsxs("div",{className:v,children:[b,j]}),e[63]=j,e[64]=v,e[65]=b,e[66]=S):S=e[66],S}function it(t){return t.value}function ot(t,e){if(!e)return t;const r=e.toLowerCase();return t.filter(l=>(l.name||l.title||"").toLowerCase().includes(r)||(l.description||l.server?.description||"").toLowerCase().includes(r))}function Ie(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0}function de(t){return t._meta?.["mcp.mesh"]?.official===!0}function at(t){const e=Q.c(58),{registryId:r,listToolName:l,filtersToolName:d,storePrivateOnly:o}=t,[n,a]=D.useState(""),f=tt(n,300),c=ue(),{org:T}=me(),{scrollRef:m,saveScrollPosition:x,handleScroll:i}=st(`store-discovery:${r}`);let p;e[0]!==f||e[1]!==d||e[2]!==l||e[3]!==r?(p={registryId:r,listToolName:l,filtersToolName:d,search:f},e[0]=f,e[1]=d,e[2]=l,e[3]=r,e[4]=p):p=e[4];const{items:k,hasMore:C,isLoadingMore:R,isInitialLoading:y,isFetching:L,error:v,loadMore:b,availableTags:N,availableCategories:z,selectedTags:$,selectedCategories:P,setSelectedTags:j,setSelectedCategories:S,hasActiveFilters:g}=Ae(p);let w;e[5]!==k||e[6]!==n?(w=n?ot(k,n):k,e[5]=k,e[6]=n,e[7]=w):w=e[7];const h=w;let E;e[8]!==h||e[9]!==o?(E=o?h.filter(ft):h,e[8]=h,e[9]=o,e[10]=E):E=e[10];const I=E,F=(n!==f||L)&&!y&&!!n;let A;e[11]!==I?(A=I.filter(de),e[11]=I,e[12]=A):A=e[12];const O=A;let H;e[13]!==I?(H=I.filter(dt),e[13]=I,e[14]=H):H=e[14];const V=H;let Y;e[15]!==I?(Y=I.filter(mt),e[15]=I,e[16]=Y):Y=e[16];const ee=Y;let X;e[17]!==c||e[18]!==T.slug||e[19]!==r||e[20]!==x?(X=K=>{x();const u=Me(K.name||K.title||K.server?.title||""),Z=typeof K.id=="string"&&K.id.includes("/"),ne=typeof K.server?.name=="string"&&K.server.name.includes("/"),ie=Z&&!ne?K.id:K.server?.name||K.id||"";c({to:"/$org/$project/store/$appName",params:{org:T.slug,project:ge,appName:u},search:{registryId:r,serverName:ie}})},e[17]=c,e[18]=T.slug,e[19]=r,e[20]=x,e[21]=X):X=e[21];const q=X;let J;e[22]!==i||e[23]!==C||e[24]!==R||e[25]!==b?(J=K=>{if(i(),!C||R)return;const u=K.currentTarget;u.scrollHeight-u.scrollTop-u.clientHeight<200&&b()},e[22]=i,e[23]=C,e[24]=R,e[25]=b,e[26]=J):J=e[26];const W=J;let _;e[27]!==F||e[28]!==n?(_=s.jsx(Ve,{value:n,onChange:a,placeholder:"Search for an MCP Server...",isSearching:F}),e[27]=F,e[28]=n,e[29]=_):_=e[29];let B;e[30]!==z||e[31]!==N||e[32]!==P||e[33]!==$||e[34]!==S||e[35]!==j?(B=s.jsx(nt,{availableTags:N,availableCategories:z,selectedTags:$,selectedCategories:P,onTagChange:j,onCategoryChange:S}),e[30]=z,e[31]=N,e[32]=P,e[33]=$,e[34]=S,e[35]=j,e[36]=B):B=e[36];let G;e[37]!==ee||e[38]!==v||e[39]!==q||e[40]!==g||e[41]!==C||e[42]!==y||e[43]!==R||e[44]!==F||e[45]!==O||e[46]!==n||e[47]!==V||e[48]!==I.length?(G=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:v&&!y?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center space-y-4",children:[s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(xe,{className:"size-8 text-destructive"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry unavailable"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"Could not load items from this registry. It may be temporarily offline."}),v.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:v.message})]}),s.jsxs(te,{variant:"outline",size:"sm",onClick:ct,children:[s.jsx(pe,{className:"size-4"}),"Try again"]})]}):y?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):I.length===0&&!g?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(je,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),s.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):I.length===0&&g&&!n?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(he,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No matching items"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to find more results."})]}):n&&I.length===0&&!F?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ye,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):s.jsxs("div",{className:"flex flex-col gap-8",children:[F&&I.length===0&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),O.length>0&&s.jsx(ae,{items:O,title:"Official",onItemClick:q}),V.length>0&&s.jsx(ae,{items:V,title:"Verified",onItemClick:q}),ee.length>0&&s.jsx(ae,{items:ee,title:O.length>0||V.length>0?"All":"",onItemClick:q}),C&&R&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(le,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[37]=ee,e[38]=v,e[39]=q,e[40]=g,e[41]=C,e[42]=y,e[43]=R,e[44]=F,e[45]=O,e[46]=n,e[47]=V,e[48]=I.length,e[49]=G):G=e[49];let M;e[50]!==W||e[51]!==m||e[52]!==G?(M=s.jsx("div",{ref:m,className:"flex-1 overflow-y-auto",onScroll:W,children:G}),e[50]=W,e[51]=m,e[52]=G,e[53]=M):M=e[53];let U;return e[54]!==B||e[55]!==M||e[56]!==_?(U=s.jsxs("div",{className:"flex flex-col h-full",children:[_,B,M]}),e[54]=B,e[55]=M,e[56]=_,e[57]=U):U=e[57],U}function ct(){return window.location.reload()}function mt(t){return!Ie(t)&&!de(t)}function dt(t){return Ie(t)&&!de(t)}function ft(t){return t.is_public!==!0}function ut(t){const e=Q.c(11),{registryId:r,storePrivateOnly:l}=t,d=_e(r),o=d?.tools;let n;e[0]!==o?(n=De(o),e[0]=o,e[1]=n):n=e[1];const a=n;if(!a){let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(je,{className:"size-8 text-muted-foreground"})}),e[2]=i):i=e[2];let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12 text-center space-y-4",children:[i,s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry not available"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"This registry does not support listing store items, or the connection is not responding."})]})]}),e[3]=p):p=e[3],p}const f=d?.tools;let c;e[4]!==f?(c=Ge(f),e[4]=f,e[5]=c):c=e[5];const m=c||void 0;let x;return e[6]!==a||e[7]!==r||e[8]!==l||e[9]!==m?(x=s.jsx(at,{registryId:r,listToolName:a,filtersToolName:m,storePrivateOnly:l}),e[6]=a,e[7]=r,e[8]=l,e[9]=m,e[10]=x):x=e[10],x}function xt(t){const e=Q.c(43),{registries:r,value:l,onValueChange:d,onAddWellKnown:o,wellKnownRegistries:n,placeholder:a}=t,f=a===void 0?"Select a registry...":a,[c,T]=D.useState(!1);let m,x,i,p,k,C,R,y;if(e[0]!==c||e[1]!==f||e[2]!==r||e[3]!==l){let j;e[12]!==l?(j=g=>g.id===l,e[12]=l,e[13]=j):j=e[13];const S=r.find(j);x=be,R=c,y=T,m=Ne,C=!0,i="button",e[14]===Symbol.for("react.memo_cache_sentinel")?(p=ce("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] h-7 min-w-[160px]"),e[14]=p):p=e[14],k=S?s.jsxs("span",{className:"flex items-center gap-2",children:[S.icon?s.jsx("img",{src:S.icon,alt:S.name,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:S.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:S.name})]}):s.jsx("span",{className:"text-muted-foreground",children:f}),e[0]=c,e[1]=f,e[2]=r,e[3]=l,e[4]=m,e[5]=x,e[6]=i,e[7]=p,e[8]=k,e[9]=C,e[10]=R,e[11]=y}else m=e[4],x=e[5],i=e[6],p=e[7],k=e[8],C=e[9],R=e[10],y=e[11];let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(we,{className:"size-4 opacity-50"}),e[15]=L):L=e[15];let v;e[16]!==i||e[17]!==p||e[18]!==k?(v=s.jsxs("button",{type:i,className:p,children:[k,L]}),e[16]=i,e[17]=p,e[18]=k,e[19]=v):v=e[19];let b;e[20]!==m||e[21]!==C||e[22]!==v?(b=s.jsx(m,{asChild:C,children:v}),e[20]=m,e[21]=C,e[22]=v,e[23]=b):b=e[23];let N;if(e[24]!==d||e[25]!==r||e[26]!==l){let j;e[28]!==d||e[29]!==l?(j=S=>s.jsxs("button",{type:"button",onClick:()=>{d(S.id??S.name),T(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[S.icon?s.jsx("img",{src:S.icon,alt:S.name,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:S.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:S.name})]}),l===(S.id??S.name)&&s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:s.jsx(Se,{className:"size-4"})})]},S.id??S.name),e[28]=d,e[29]=l,e[30]=j):j=e[30],N=r.map(j),e[24]=d,e[25]=r,e[26]=l,e[27]=N}else N=e[27];let z;e[31]!==o||e[32]!==n?(z=n.length>0&&s.jsxs("div",{className:"border-t border-border pt-1 mt-1",children:[s.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),n.map(j=>s.jsxs("button",{type:"button",onClick:()=>{o(j),T(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[j.icon?s.jsx("img",{src:j.icon,alt:j.title,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:j.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:j.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(He,{size:16})})]},j.id??j.title))]}),e[31]=o,e[32]=n,e[33]=z):z=e[33];let $;e[34]!==N||e[35]!==z?($=s.jsxs(Ce,{align:"end",className:"w-auto min-w-[200px] p-1",children:[N,z]}),e[34]=N,e[35]=z,e[36]=$):$=e[36];let P;return e[37]!==x||e[38]!==b||e[39]!==$||e[40]!==R||e[41]!==y?(P=s.jsxs(x,{open:R,onOpenChange:y,children:[b,$]}),e[37]=x,e[38]=b,e[39]=$,e[40]=R,e[41]=y,e[42]=P):P=e[42],P}function pt({registries:t,onConnected:e}){const r=ve(),{org:{slug:l}}=me(),{data:d}=Re.useSession(),o=ue(),[n,a]=D.useState(!1),f=t[0],c=async()=>{if(!(!f||!d?.user?.id)){a(!0);try{const m=await r.create.mutateAsync(f);e?.(m.id)}finally{a(!1)}}},T=()=>{o({to:"/$org/$project/mcps",params:{org:l,project:ge},search:{action:"create"}})};return s.jsx(qe,{image:s.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:336,height:320,className:"max-w-full h-auto"}),title:"Connect to registry",description:"Connect to discover and use Connections from the community.",actions:s.jsxs(s.Fragment,{children:[s.jsxs(te,{variant:"outline",onClick:c,disabled:n||!f,children:[f?.icon&&s.jsx("img",{src:f.icon,alt:"",className:"size-4"}),n?"Installing...":"Install Registry"]}),s.jsx(te,{variant:"outline",onClick:T,children:"Custom Connection"})]})})}function gt(t){const e=Q.c(15),{error:r,onRetry:l,registryName:d}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(xe,{className:"h-6 w-6 text-destructive"})}),e[0]=o):o=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("h3",{className:"text-lg font-medium",children:"Unable to load store"}),e[1]=n):n=e[1];let a;e[2]!==d?(a=s.jsxs("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:["The ",s.jsx("strong",{children:d})," registry is currently unreachable. This may be a temporary issue — try again in a moment."]}),e[2]=d,e[3]=a):a=e[3];let f;e[4]!==r?(f=r?.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:r.message}),e[4]=r,e[5]=f):f=e[5];let c;e[6]!==a||e[7]!==f?(c=s.jsxs("div",{className:"space-y-2",children:[n,a,f]}),e[6]=a,e[7]=f,e[8]=c):c=e[8];let T;e[9]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(pe,{className:"size-4"}),e[9]=T):T=e[9];let m;e[10]!==l?(m=s.jsxs(te,{variant:"outline",size:"sm",onClick:l,children:[T,"Try again"]}),e[10]=l,e[11]=m):m=e[11];let x;return e[12]!==c||e[13]!==m?(x=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[o,c,m]}),e[12]=c,e[13]=m,e[14]=x):x=e[14],x}function us(){const t=Q.c(53),{org:e,project:r}=me(),l=Be(),d=ve(),o=Te(),n=o.location.pathname.includes("/store/")&&o.location.pathname.split("/").length>3,a=Ue(l);let f;t[0]!==e.id?(f=Qe.SELF(e.id),t[0]=e.id,t[1]=f):f=t[1];const c=f,T=r.enabledPlugins,m=T==null||T.includes(oe);let x;t[2]!==c?(x=(u,Z)=>u.id===c?1:Z.id===c?-1:0,t[2]=c,t[3]=x):x=t[3];const i=a.filter(u=>u.id!==c?!0:m).sort(x);let p;t[4]!==c?(p=u=>u.id===c,t[4]=c,t[5]=p):p=t[5];const k=i.some(p);let C;t[6]!==e.id?(C={connectionId:Ye,orgId:e.id},t[6]=e.id,t[7]=C):C=t[7];const R=Xe(C);let y;t[8]!==r.id||t[9]!==R?(y=async()=>{const u=await R.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:r.id,pluginId:oe}});return u.structuredContent??u},t[8]=r.id,t[9]=R,t[10]=y):y=t[10];const{data:L}=Je({queryKey:Pe.projectPluginConfig(r.id??"",oe),queryFn:y,enabled:k&&!!r.id,staleTime:6e4}),v=L?.config?.settings;let b;t[11]!==v||t[12]!==c?(b=u=>u.id===c&&v?{id:u.id,name:v.registryName||u.title,icon:v.registryIcon||u.icon||void 0}:{id:u.id,name:u.title,icon:u.icon||void 0},t[11]=v,t[12]=c,t[13]=b):b=t[13];const N=i.map(b);let z;t[14]!==e.slug?(z=ze.selectedRegistry(e.slug),t[14]=e.slug,t[15]=z):z=t[15];const[$,P]=Le(z,jt);let j;t[16]!==$?(j=u=>u.id===$,t[16]=$,t[17]=j):j=t[17];const S=i.find(j);let g;t[18]!==c?(g=u=>u.id!==c,t[18]=c,t[19]=g):g=t[19];const w=i.find(g),h=S?.id||w?.id||i[0]?.id||"",E=h===c&&v?.storePrivateOnly===!0;let I;t[20]!==e.id?(I=Ze(e.id),t[20]=e.id,t[21]=I):I=t[21];let F;t[22]!==I?(F=[I],t[22]=I,t[23]=F):F=t[23];const A=F;let O;t[24]===Symbol.for("react.memo_cache_sentinel")?(O=[et()],t[24]=O):O=t[24];const H=O;let V;t[25]!==d.create||t[26]!==P?(V=async u=>{const Z=await d.create.mutateAsync(u);P(Z.id)},t[25]=d.create,t[26]=P,t[27]=V):V=t[27];const Y=V,ee=new Set(i.map(ht)),X=A.filter(u=>u.id&&!ee.has(u.id)),q=H.filter(u=>u.id&&!ee.has(u.id));if(n){let u;return t[28]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ke,{}),t[28]=u):u=t[28],u}let J;t[29]===Symbol.for("react.memo_cache_sentinel")?(J=s.jsx(se.Header.Left,{children:s.jsx(Ee,{children:s.jsx(Fe,{children:s.jsx(Oe,{children:s.jsx(Ke,{children:"Store"})})})})}),t[29]=J):J=t[29];let W;t[30]!==Y?(W=async u=>Y(u),t[30]=Y,t[31]=W):W=t[31];let _;t[32]!==X||t[33]!==h||t[34]!==N||t[35]!==P||t[36]!==W?(_=s.jsxs(se.Header,{children:[J,s.jsx(se.Header.Right,{children:s.jsx(xt,{wellKnownRegistries:X,registries:N,value:h,onValueChange:P,onAddWellKnown:W,placeholder:"Select store..."})})]}),t[32]=X,t[33]=h,t[34]=N,t[35]=P,t[36]=W,t[37]=_):_=t[37];let B;t[38]!==h||t[39]!==N?(B=u=>{const{error:Z,resetError:ne}=u;return s.jsx(gt,{error:Z,onRetry:ne,registryName:N.find(ie=>ie.id===h)?.name??"registry"})},t[38]=h,t[39]=N,t[40]=B):B=t[40];let G;t[41]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),t[41]=G):G=t[41];let M;t[42]!==q||t[43]!==h||t[44]!==P||t[45]!==E?(M=s.jsx(D.Suspense,{fallback:G,children:h?s.jsx(ut,{registryId:h,storePrivateOnly:E}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(pt,{registries:q,onConnected:u=>{P(u)}})})}),t[42]=q,t[43]=h,t[44]=P,t[45]=E,t[46]=M):M=t[46];let U;t[47]!==B||t[48]!==M?(U=s.jsx(se.Content,{children:s.jsx($e,{fallback:B,children:M})}),t[47]=B,t[48]=M,t[49]=U):U=t[49];let K;return t[50]!==_||t[51]!==U?(K=s.jsxs(se,{children:[_,U]}),t[50]=_,t[51]=U,t[52]=K):K=t[52],K}function ht(t){return t.id}function jt(t){return t??""}export{us as default};
|
|
1
|
+
import{d as Q,r as D,j as s,y as ce,B as te,f as ue,c as me,a8 as xe,G as pe,O as ge,g as Re,aT as Te,bQ as oe,K as Pe,F as ze,E as $e,aU as ke}from"./index-D49VqQ7Q.js";import{u as Le,P as se}from"./index-CtkIjbbq.js";import{B as Ee,a as Fe,b as Oe,c as Ke}from"./breadcrumb-BBMvtdg-.js";import{a as he}from"./Play-Bb4cvvVL.js";import{r as je}from"./integration-icon-ByIZ-Vgj.js";import{i as le}from"./Loading01-BVCg1O_G.js";import{i as ye}from"./SearchMd-CVvF1HpM.js";import{u as Ae}from"./use-store-discovery-DfcEdPeQ.js";import{u as _e,a as ve,b as Be}from"./use-connection-Yjy9d1tW.js";import{s as Me}from"./slugify-CEUa2lfQ.js";import{f as De,i as Ge,u as Ue}from"./registry-utils-Cz03qmOa.js";import{C as Ve}from"./collection-search-fzGK39qM.js";import{M as ae}from"./mcp-server-card-xRGKpDYM.js";import{I as We}from"./input-BoNWsfmK.js";import{P as be,a as Ne,b as Ce}from"./popover-CvIauBBG.js";import{i as Se}from"./Check-Dczm9Dfw.js";import{t as we}from"./ChevronDown-CDxBhn_l.js";import{s as re}from"./XClose-BLvk3pvY.js";import{s as He}from"./Plus-DcVtqCMV.js";import{E as qe}from"./empty-state-B8NhLY9v.js";import{u as Je}from"./useQuery-CvkH2gG1.js";import{W as Qe,a as Ye,u as Xe,e as Ze,b as et}from"./constants-TLV7MTwP.js";import"./useMutation-BTUmJffP.js";import"./tooltip-DJkxXViN.js";import"./index-BkAoKVx8.js";import"./X-Dr-hR03I.js";import"./ChevronRight-Dxvchjxo.js";import"./Container-CMPDG7Cp.js";import"./AlertCircle-BD5gSXQu.js";import"./ArrowUp-D6ltkV3R.js";import"./ArrowLeft-DN3D0Zrv.js";import"./XCircle-Z-JTmQ8v.js";import"./Type01-CySkENi6.js";import"./ChevronUp-BLNd6dNq.js";import"./RefreshCcw01-Co0-i94o.js";import"./Dataflow03-slF1Ax9G.js";import"./FolderClosed-BKB_NgWm.js";import"./Settings01-DpZ_tsoX.js";import"./Trash01-CBP9WLeP.js";import"./Upload01-BzGPegBj.js";import"./User01-CItwHvE1.js";import"./Zap-CiHJmamA.js";import"./useInfiniteQuery-D8TjRj27.js";import"./infiniteQueryObserver-DiY9IZXI.js";import"./use-collections-Dmxer7H8.js";import"./workflow-CBGVBFDu.js";import"./collections-BsFnKFn5.js";import"./card-CKN-JP9M.js";function tt(t,e){const r=Q.c(4),[l,d]=D.useState(t),o=D.useRef(null),n=D.useRef(!0);let a,f;return r[0]!==e||r[1]!==t?(a=()=>{if(n.current){n.current=!1;return}return o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{d(t)},e),()=>{o.current&&clearTimeout(o.current)}},f=[t,e],r[0]=e,r[1]=t,r[2]=a,r[3]=f):(a=r[2],f=r[3]),D.useEffect(a,f),l}function st(t){const e=Q.c(14),r=D.useRef(null),l=`scroll-position:${t}`,d=D.useRef(null);let o;e[0]!==l?(o=()=>{r.current&&sessionStorage.setItem(l,String(r.current.scrollTop))},e[0]=l,e[1]=o):o=e[1];const n=o;let a;e[2]!==l?(a=()=>{if(d.current===l)return;const p=sessionStorage.getItem(l);if(p&&r.current){const k=Number.parseInt(p,10);r.current.scrollTop=k}d.current=l},e[2]=l,e[3]=a):a=e[3];const f=a;let c;e[4]!==f||e[5]!==l?(c=()=>{d.current!==l&&f()},e[4]=f,e[5]=l,e[6]=c):c=e[6];const T=c;let m;e[7]!==f||e[8]!==l?(m=p=>{r.current=p,p&&d.current!==l&&requestAnimationFrame(()=>{f()})},e[7]=f,e[8]=l,e[9]=m):m=e[9];const x=m;let i;return e[10]!==T||e[11]!==n||e[12]!==x?(i={scrollRef:x,saveScrollPosition:n,handleScroll:T},e[10]=T,e[11]=n,e[12]=x,e[13]=i):i=e[13],i}function rt(t,e){return[...t].sort((r,l)=>l.count-r.count).slice(0,e)}function fe(t){const e=Q.c(52),{label:r,items:l,selectedItems:d,onToggle:o,onClear:n}=t,[a,f]=D.useState(""),[c,T]=D.useState(!1);let m,x,i,p,k,C,R,y,L,v,b;if(e[0]!==l||e[1]!==r||e[2]!==o||e[3]!==c||e[4]!==a||e[5]!==d){const S=[...a?l.filter(O=>O.value.toLowerCase().includes(a.toLowerCase())):l].sort(lt);i=d.length,x=be,L=c,v=T;let g;e[17]!==r?(g=s.jsx("span",{children:r}),e[17]=r,e[18]=g):g=e[18];let w;e[19]!==i?(w=i>0&&s.jsx("span",{className:"ml-1 rounded-full bg-primary text-primary-foreground px-1.5 py-0.5 text-[10px] font-medium",children:i}),e[19]=i,e[20]=w):w=e[20];let h;e[21]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(we,{size:14,className:"opacity-50"}),e[21]=h):h=e[21],e[22]!==w||e[23]!==g?(b=s.jsx(Ne,{asChild:!0,children:s.jsxs(te,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[g,w,h]})}),e[22]=w,e[23]=g,e[24]=b):b=e[24],m=Ce,C="w-64 p-0",R="start";let E;e[25]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(ye,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=E):E=e[25];let I;e[26]!==r?(I=r.toLowerCase(),e[26]=r,e[27]=I):I=e[27];const F=`Search ${I}...`;let A;e[28]===Symbol.for("react.memo_cache_sentinel")?(A=O=>f(O.target.value),e[28]=A):A=e[28],e[29]!==a||e[30]!==F?(y=s.jsx("div",{className:"shrink-0 w-full border-b border-border h-10",children:s.jsxs("label",{className:"flex items-center gap-2.5 h-10 px-4 cursor-text",children:[E,s.jsx(We,{type:"text",placeholder:F,value:a,onChange:A,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[29]=a,e[30]=F,e[31]=y):y=e[31],p="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",k=S.length===0?s.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):S.map(O=>{const H=d.includes(O.value);return s.jsxs("button",{onClick:()=>o(O.value),className:ce("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",H?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[s.jsxs("span",{className:"truncate flex items-center gap-2",children:[H&&s.jsx(Se,{size:16,className:"text-muted-foreground shrink-0"}),O.value]}),s.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:O.count})]},O.value)}),e[0]=l,e[1]=r,e[2]=o,e[3]=c,e[4]=a,e[5]=d,e[6]=m,e[7]=x,e[8]=i,e[9]=p,e[10]=k,e[11]=C,e[12]=R,e[13]=y,e[14]=L,e[15]=v,e[16]=b}else m=e[6],x=e[7],i=e[8],p=e[9],k=e[10],C=e[11],R=e[12],y=e[13],L=e[14],v=e[15],b=e[16];let N;e[32]!==p||e[33]!==k?(N=s.jsx("div",{className:p,children:k}),e[32]=p,e[33]=k,e[34]=N):N=e[34];let z;e[35]!==r||e[36]!==n||e[37]!==i?(z=i>0&&s.jsx("div",{className:"p-2 border-t border-border",children:s.jsxs(te,{variant:"ghost",size:"sm",onClick:n,className:"w-full text-xs text-muted-foreground hover:text-foreground",children:["Clear ",r.toLowerCase()]})}),e[35]=r,e[36]=n,e[37]=i,e[38]=z):z=e[38];let $;e[39]!==m||e[40]!==z||e[41]!==C||e[42]!==R||e[43]!==y||e[44]!==N?($=s.jsxs(m,{className:C,align:R,children:[y,N,z]}),e[39]=m,e[40]=z,e[41]=C,e[42]=R,e[43]=y,e[44]=N,e[45]=$):$=e[45];let P;return e[46]!==x||e[47]!==$||e[48]!==L||e[49]!==v||e[50]!==b?(P=s.jsxs(x,{open:L,onOpenChange:v,children:[b,$]}),e[46]=x,e[47]=$,e[48]=L,e[49]=v,e[50]=b,e[51]=P):P=e[51],P}function lt(t,e){return e.count-t.count}function nt(t){const e=Q.c(67),{availableTags:r,availableCategories:l,selectedTags:d,selectedCategories:o,onTagChange:n,onCategoryChange:a}=t,f=r&&r.length>0||l&&l.length>0,c=d.length>0||o.length>0;if(!f)return null;let T;e[0]!==n||e[1]!==d?(T=g=>{d.includes(g)?n(d.filter(w=>w!==g)):n([...d,g])},e[0]=n,e[1]=d,e[2]=T):T=e[2];const m=T;let x;e[3]!==a||e[4]!==o?(x=g=>{o.includes(g)?a(o.filter(w=>w!==g)):a([...o,g])},e[3]=a,e[4]=o,e[5]=x):x=e[5];const i=x;let p;e[6]!==a||e[7]!==n?(p=()=>{n([]),a([])},e[6]=a,e[7]=n,e[8]=p):p=e[8];const k=p;let C,R,y,L,v,b,N;if(e[9]!==l||e[10]!==r||e[11]!==a||e[12]!==n||e[13]!==o||e[14]!==d||e[15]!==i||e[16]!==m){const g=l?rt(l,6):[];C=o,R=d,N=new Set(g.map(it)),v="flex items-center border-b border-border";let w;e[24]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:s.jsx(he,{size:16})}),e[24]=w):w=e[24];let h;e[25]!==l||e[26]!==a||e[27]!==o||e[28]!==i?(h=l&&l.length>0&&s.jsx(fe,{label:"Categories",items:l,selectedItems:o,onToggle:i,onClear:()=>a([])}),e[25]=l,e[26]=a,e[27]=o,e[28]=i,e[29]=h):h=e[29];let E;e[30]!==r||e[31]!==n||e[32]!==d||e[33]!==m?(E=r&&r.length>0&&s.jsx(fe,{label:"Tags",items:r,selectedItems:d,onToggle:m,onClear:()=>n([])}),e[30]=r,e[31]=n,e[32]=d,e[33]=m,e[34]=E):E=e[34],e[35]!==E||e[36]!==h?(b=s.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[w,h,E]}),e[35]=E,e[36]=h,e[37]=b):b=e[37],y="flex items-center gap-3 flex-wrap px-5 py-3";let I;e[38]!==o||e[39]!==i?(I=F=>{const A=o.includes(F.value);return s.jsxs("div",{onClick:()=>i(F.value),className:ce("inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer",A?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"),children:[s.jsx("span",{children:F.value}),A&&s.jsx("span",{onClick:O=>{O.stopPropagation(),i(F.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},F.value)},e[38]=o,e[39]=i,e[40]=I):I=e[40],L=g.map(I),e[9]=l,e[10]=r,e[11]=a,e[12]=n,e[13]=o,e[14]=d,e[15]=i,e[16]=m,e[17]=C,e[18]=R,e[19]=y,e[20]=L,e[21]=v,e[22]=b,e[23]=N}else C=e[17],R=e[18],y=e[19],L=e[20],v=e[21],b=e[22],N=e[23];let z;if(e[41]!==C||e[42]!==i||e[43]!==N){let g;e[45]!==N?(g=h=>!N.has(h),e[45]=N,e[46]=g):g=e[46];let w;e[47]!==i?(w=h=>s.jsxs("div",{onClick:()=>i(h),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:h}),s.jsx("span",{onClick:E=>{E.stopPropagation(),i(h)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`cat-${h}`),e[47]=i,e[48]=w):w=e[48],z=C.filter(g).map(w),e[41]=C,e[42]=i,e[43]=N,e[44]=z}else z=e[44];let $;if(e[49]!==R||e[50]!==m){let g;e[52]!==m?(g=w=>s.jsxs("div",{onClick:()=>m(w),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:w}),s.jsx("span",{onClick:h=>{h.stopPropagation(),m(w)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`tag-${w}`),e[52]=m,e[53]=g):g=e[53],$=R.map(g),e[49]=R,e[50]=m,e[51]=$}else $=e[51];let P;e[54]!==k||e[55]!==c?(P=c&&s.jsxs(te,{variant:"ghost",size:"sm",onClick:k,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[s.jsx(re,{size:14}),"Clear all"]}),e[54]=k,e[55]=c,e[56]=P):P=e[56];let j;e[57]!==P||e[58]!==y||e[59]!==L||e[60]!==z||e[61]!==$?(j=s.jsxs("div",{className:y,children:[L,z,$,P]}),e[57]=P,e[58]=y,e[59]=L,e[60]=z,e[61]=$,e[62]=j):j=e[62];let S;return e[63]!==j||e[64]!==v||e[65]!==b?(S=s.jsxs("div",{className:v,children:[b,j]}),e[63]=j,e[64]=v,e[65]=b,e[66]=S):S=e[66],S}function it(t){return t.value}function ot(t,e){if(!e)return t;const r=e.toLowerCase();return t.filter(l=>(l.name||l.title||"").toLowerCase().includes(r)||(l.description||l.server?.description||"").toLowerCase().includes(r))}function Ie(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0}function de(t){return t._meta?.["mcp.mesh"]?.official===!0}function at(t){const e=Q.c(58),{registryId:r,listToolName:l,filtersToolName:d,storePrivateOnly:o}=t,[n,a]=D.useState(""),f=tt(n,300),c=ue(),{org:T}=me(),{scrollRef:m,saveScrollPosition:x,handleScroll:i}=st(`store-discovery:${r}`);let p;e[0]!==f||e[1]!==d||e[2]!==l||e[3]!==r?(p={registryId:r,listToolName:l,filtersToolName:d,search:f},e[0]=f,e[1]=d,e[2]=l,e[3]=r,e[4]=p):p=e[4];const{items:k,hasMore:C,isLoadingMore:R,isInitialLoading:y,isFetching:L,error:v,loadMore:b,availableTags:N,availableCategories:z,selectedTags:$,selectedCategories:P,setSelectedTags:j,setSelectedCategories:S,hasActiveFilters:g}=Ae(p);let w;e[5]!==k||e[6]!==n?(w=n?ot(k,n):k,e[5]=k,e[6]=n,e[7]=w):w=e[7];const h=w;let E;e[8]!==h||e[9]!==o?(E=o?h.filter(ft):h,e[8]=h,e[9]=o,e[10]=E):E=e[10];const I=E,F=(n!==f||L)&&!y&&!!n;let A;e[11]!==I?(A=I.filter(de),e[11]=I,e[12]=A):A=e[12];const O=A;let H;e[13]!==I?(H=I.filter(dt),e[13]=I,e[14]=H):H=e[14];const V=H;let Y;e[15]!==I?(Y=I.filter(mt),e[15]=I,e[16]=Y):Y=e[16];const ee=Y;let X;e[17]!==c||e[18]!==T.slug||e[19]!==r||e[20]!==x?(X=K=>{x();const u=Me(K.name||K.title||K.server?.title||""),Z=typeof K.id=="string"&&K.id.includes("/"),ne=typeof K.server?.name=="string"&&K.server.name.includes("/"),ie=Z&&!ne?K.id:K.server?.name||K.id||"";c({to:"/$org/$project/store/$appName",params:{org:T.slug,project:ge,appName:u},search:{registryId:r,serverName:ie}})},e[17]=c,e[18]=T.slug,e[19]=r,e[20]=x,e[21]=X):X=e[21];const q=X;let J;e[22]!==i||e[23]!==C||e[24]!==R||e[25]!==b?(J=K=>{if(i(),!C||R)return;const u=K.currentTarget;u.scrollHeight-u.scrollTop-u.clientHeight<200&&b()},e[22]=i,e[23]=C,e[24]=R,e[25]=b,e[26]=J):J=e[26];const W=J;let _;e[27]!==F||e[28]!==n?(_=s.jsx(Ve,{value:n,onChange:a,placeholder:"Search for an MCP Server...",isSearching:F}),e[27]=F,e[28]=n,e[29]=_):_=e[29];let B;e[30]!==z||e[31]!==N||e[32]!==P||e[33]!==$||e[34]!==S||e[35]!==j?(B=s.jsx(nt,{availableTags:N,availableCategories:z,selectedTags:$,selectedCategories:P,onTagChange:j,onCategoryChange:S}),e[30]=z,e[31]=N,e[32]=P,e[33]=$,e[34]=S,e[35]=j,e[36]=B):B=e[36];let G;e[37]!==ee||e[38]!==v||e[39]!==q||e[40]!==g||e[41]!==C||e[42]!==y||e[43]!==R||e[44]!==F||e[45]!==O||e[46]!==n||e[47]!==V||e[48]!==I.length?(G=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:v&&!y?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center space-y-4",children:[s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(xe,{className:"size-8 text-destructive"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry unavailable"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"Could not load items from this registry. It may be temporarily offline."}),v.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:v.message})]}),s.jsxs(te,{variant:"outline",size:"sm",onClick:ct,children:[s.jsx(pe,{className:"size-4"}),"Try again"]})]}):y?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):I.length===0&&!g?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(je,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),s.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):I.length===0&&g&&!n?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(he,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No matching items"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to find more results."})]}):n&&I.length===0&&!F?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ye,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):s.jsxs("div",{className:"flex flex-col gap-8",children:[F&&I.length===0&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),O.length>0&&s.jsx(ae,{items:O,title:"Official",onItemClick:q}),V.length>0&&s.jsx(ae,{items:V,title:"Verified",onItemClick:q}),ee.length>0&&s.jsx(ae,{items:ee,title:O.length>0||V.length>0?"All":"",onItemClick:q}),C&&R&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(le,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[37]=ee,e[38]=v,e[39]=q,e[40]=g,e[41]=C,e[42]=y,e[43]=R,e[44]=F,e[45]=O,e[46]=n,e[47]=V,e[48]=I.length,e[49]=G):G=e[49];let M;e[50]!==W||e[51]!==m||e[52]!==G?(M=s.jsx("div",{ref:m,className:"flex-1 overflow-y-auto",onScroll:W,children:G}),e[50]=W,e[51]=m,e[52]=G,e[53]=M):M=e[53];let U;return e[54]!==B||e[55]!==M||e[56]!==_?(U=s.jsxs("div",{className:"flex flex-col h-full",children:[_,B,M]}),e[54]=B,e[55]=M,e[56]=_,e[57]=U):U=e[57],U}function ct(){return window.location.reload()}function mt(t){return!Ie(t)&&!de(t)}function dt(t){return Ie(t)&&!de(t)}function ft(t){return t.is_public!==!0}function ut(t){const e=Q.c(11),{registryId:r,storePrivateOnly:l}=t,d=_e(r),o=d?.tools;let n;e[0]!==o?(n=De(o),e[0]=o,e[1]=n):n=e[1];const a=n;if(!a){let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(je,{className:"size-8 text-muted-foreground"})}),e[2]=i):i=e[2];let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12 text-center space-y-4",children:[i,s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry not available"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"This registry does not support listing store items, or the connection is not responding."})]})]}),e[3]=p):p=e[3],p}const f=d?.tools;let c;e[4]!==f?(c=Ge(f),e[4]=f,e[5]=c):c=e[5];const m=c||void 0;let x;return e[6]!==a||e[7]!==r||e[8]!==l||e[9]!==m?(x=s.jsx(at,{registryId:r,listToolName:a,filtersToolName:m,storePrivateOnly:l}),e[6]=a,e[7]=r,e[8]=l,e[9]=m,e[10]=x):x=e[10],x}function xt(t){const e=Q.c(43),{registries:r,value:l,onValueChange:d,onAddWellKnown:o,wellKnownRegistries:n,placeholder:a}=t,f=a===void 0?"Select a registry...":a,[c,T]=D.useState(!1);let m,x,i,p,k,C,R,y;if(e[0]!==c||e[1]!==f||e[2]!==r||e[3]!==l){let j;e[12]!==l?(j=g=>g.id===l,e[12]=l,e[13]=j):j=e[13];const S=r.find(j);x=be,R=c,y=T,m=Ne,C=!0,i="button",e[14]===Symbol.for("react.memo_cache_sentinel")?(p=ce("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] h-7 min-w-[160px]"),e[14]=p):p=e[14],k=S?s.jsxs("span",{className:"flex items-center gap-2",children:[S.icon?s.jsx("img",{src:S.icon,alt:S.name,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:S.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:S.name})]}):s.jsx("span",{className:"text-muted-foreground",children:f}),e[0]=c,e[1]=f,e[2]=r,e[3]=l,e[4]=m,e[5]=x,e[6]=i,e[7]=p,e[8]=k,e[9]=C,e[10]=R,e[11]=y}else m=e[4],x=e[5],i=e[6],p=e[7],k=e[8],C=e[9],R=e[10],y=e[11];let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(we,{className:"size-4 opacity-50"}),e[15]=L):L=e[15];let v;e[16]!==i||e[17]!==p||e[18]!==k?(v=s.jsxs("button",{type:i,className:p,children:[k,L]}),e[16]=i,e[17]=p,e[18]=k,e[19]=v):v=e[19];let b;e[20]!==m||e[21]!==C||e[22]!==v?(b=s.jsx(m,{asChild:C,children:v}),e[20]=m,e[21]=C,e[22]=v,e[23]=b):b=e[23];let N;if(e[24]!==d||e[25]!==r||e[26]!==l){let j;e[28]!==d||e[29]!==l?(j=S=>s.jsxs("button",{type:"button",onClick:()=>{d(S.id??S.name),T(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[S.icon?s.jsx("img",{src:S.icon,alt:S.name,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:S.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:S.name})]}),l===(S.id??S.name)&&s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:s.jsx(Se,{className:"size-4"})})]},S.id??S.name),e[28]=d,e[29]=l,e[30]=j):j=e[30],N=r.map(j),e[24]=d,e[25]=r,e[26]=l,e[27]=N}else N=e[27];let z;e[31]!==o||e[32]!==n?(z=n.length>0&&s.jsxs("div",{className:"border-t border-border pt-1 mt-1",children:[s.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),n.map(j=>s.jsxs("button",{type:"button",onClick:()=>{o(j),T(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[j.icon?s.jsx("img",{src:j.icon,alt:j.title,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:j.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:j.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(He,{size:16})})]},j.id??j.title))]}),e[31]=o,e[32]=n,e[33]=z):z=e[33];let $;e[34]!==N||e[35]!==z?($=s.jsxs(Ce,{align:"end",className:"w-auto min-w-[200px] p-1",children:[N,z]}),e[34]=N,e[35]=z,e[36]=$):$=e[36];let P;return e[37]!==x||e[38]!==b||e[39]!==$||e[40]!==R||e[41]!==y?(P=s.jsxs(x,{open:R,onOpenChange:y,children:[b,$]}),e[37]=x,e[38]=b,e[39]=$,e[40]=R,e[41]=y,e[42]=P):P=e[42],P}function pt({registries:t,onConnected:e}){const r=ve(),{org:{slug:l}}=me(),{data:d}=Re.useSession(),o=ue(),[n,a]=D.useState(!1),f=t[0],c=async()=>{if(!(!f||!d?.user?.id)){a(!0);try{const m=await r.create.mutateAsync(f);e?.(m.id)}finally{a(!1)}}},T=()=>{o({to:"/$org/$project/mcps",params:{org:l,project:ge},search:{action:"create"}})};return s.jsx(qe,{image:s.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:336,height:320,className:"max-w-full h-auto"}),title:"Connect to registry",description:"Connect to discover and use Connections from the community.",actions:s.jsxs(s.Fragment,{children:[s.jsxs(te,{variant:"outline",onClick:c,disabled:n||!f,children:[f?.icon&&s.jsx("img",{src:f.icon,alt:"",className:"size-4"}),n?"Installing...":"Install Registry"]}),s.jsx(te,{variant:"outline",onClick:T,children:"Custom Connection"})]})})}function gt(t){const e=Q.c(15),{error:r,onRetry:l,registryName:d}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(xe,{className:"h-6 w-6 text-destructive"})}),e[0]=o):o=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("h3",{className:"text-lg font-medium",children:"Unable to load store"}),e[1]=n):n=e[1];let a;e[2]!==d?(a=s.jsxs("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:["The ",s.jsx("strong",{children:d})," registry is currently unreachable. This may be a temporary issue — try again in a moment."]}),e[2]=d,e[3]=a):a=e[3];let f;e[4]!==r?(f=r?.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:r.message}),e[4]=r,e[5]=f):f=e[5];let c;e[6]!==a||e[7]!==f?(c=s.jsxs("div",{className:"space-y-2",children:[n,a,f]}),e[6]=a,e[7]=f,e[8]=c):c=e[8];let T;e[9]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(pe,{className:"size-4"}),e[9]=T):T=e[9];let m;e[10]!==l?(m=s.jsxs(te,{variant:"outline",size:"sm",onClick:l,children:[T,"Try again"]}),e[10]=l,e[11]=m):m=e[11];let x;return e[12]!==c||e[13]!==m?(x=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[o,c,m]}),e[12]=c,e[13]=m,e[14]=x):x=e[14],x}function us(){const t=Q.c(53),{org:e,project:r}=me(),l=Be(),d=ve(),o=Te(),n=o.location.pathname.includes("/store/")&&o.location.pathname.split("/").length>3,a=Ue(l);let f;t[0]!==e.id?(f=Qe.SELF(e.id),t[0]=e.id,t[1]=f):f=t[1];const c=f,T=r.enabledPlugins,m=T==null||T.includes(oe);let x;t[2]!==c?(x=(u,Z)=>u.id===c?1:Z.id===c?-1:0,t[2]=c,t[3]=x):x=t[3];const i=a.filter(u=>u.id!==c?!0:m).sort(x);let p;t[4]!==c?(p=u=>u.id===c,t[4]=c,t[5]=p):p=t[5];const k=i.some(p);let C;t[6]!==e.id?(C={connectionId:Ye,orgId:e.id},t[6]=e.id,t[7]=C):C=t[7];const R=Xe(C);let y;t[8]!==r.id||t[9]!==R?(y=async()=>{const u=await R.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:r.id,pluginId:oe}});return u.structuredContent??u},t[8]=r.id,t[9]=R,t[10]=y):y=t[10];const{data:L}=Je({queryKey:Pe.projectPluginConfig(r.id??"",oe),queryFn:y,enabled:k&&!!r.id,staleTime:6e4}),v=L?.config?.settings;let b;t[11]!==v||t[12]!==c?(b=u=>u.id===c&&v?{id:u.id,name:v.registryName||u.title,icon:v.registryIcon||u.icon||void 0}:{id:u.id,name:u.title,icon:u.icon||void 0},t[11]=v,t[12]=c,t[13]=b):b=t[13];const N=i.map(b);let z;t[14]!==e.slug?(z=ze.selectedRegistry(e.slug),t[14]=e.slug,t[15]=z):z=t[15];const[$,P]=Le(z,jt);let j;t[16]!==$?(j=u=>u.id===$,t[16]=$,t[17]=j):j=t[17];const S=i.find(j);let g;t[18]!==c?(g=u=>u.id!==c,t[18]=c,t[19]=g):g=t[19];const w=i.find(g),h=S?.id||w?.id||i[0]?.id||"",E=h===c&&v?.storePrivateOnly===!0;let I;t[20]!==e.id?(I=Ze(e.id),t[20]=e.id,t[21]=I):I=t[21];let F;t[22]!==I?(F=[I],t[22]=I,t[23]=F):F=t[23];const A=F;let O;t[24]===Symbol.for("react.memo_cache_sentinel")?(O=[et()],t[24]=O):O=t[24];const H=O;let V;t[25]!==d.create||t[26]!==P?(V=async u=>{const Z=await d.create.mutateAsync(u);P(Z.id)},t[25]=d.create,t[26]=P,t[27]=V):V=t[27];const Y=V,ee=new Set(i.map(ht)),X=A.filter(u=>u.id&&!ee.has(u.id)),q=H.filter(u=>u.id&&!ee.has(u.id));if(n){let u;return t[28]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ke,{}),t[28]=u):u=t[28],u}let J;t[29]===Symbol.for("react.memo_cache_sentinel")?(J=s.jsx(se.Header.Left,{children:s.jsx(Ee,{children:s.jsx(Fe,{children:s.jsx(Oe,{children:s.jsx(Ke,{children:"Store"})})})})}),t[29]=J):J=t[29];let W;t[30]!==Y?(W=async u=>Y(u),t[30]=Y,t[31]=W):W=t[31];let _;t[32]!==X||t[33]!==h||t[34]!==N||t[35]!==P||t[36]!==W?(_=s.jsxs(se.Header,{children:[J,s.jsx(se.Header.Right,{children:s.jsx(xt,{wellKnownRegistries:X,registries:N,value:h,onValueChange:P,onAddWellKnown:W,placeholder:"Select store..."})})]}),t[32]=X,t[33]=h,t[34]=N,t[35]=P,t[36]=W,t[37]=_):_=t[37];let B;t[38]!==h||t[39]!==N?(B=u=>{const{error:Z,resetError:ne}=u;return s.jsx(gt,{error:Z,onRetry:ne,registryName:N.find(ie=>ie.id===h)?.name??"registry"})},t[38]=h,t[39]=N,t[40]=B):B=t[40];let G;t[41]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),t[41]=G):G=t[41];let M;t[42]!==q||t[43]!==h||t[44]!==P||t[45]!==E?(M=s.jsx(D.Suspense,{fallback:G,children:h?s.jsx(ut,{registryId:h,storePrivateOnly:E}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(pt,{registries:q,onConnected:u=>{P(u)}})})}),t[42]=q,t[43]=h,t[44]=P,t[45]=E,t[46]=M):M=t[46];let U;t[47]!==B||t[48]!==M?(U=s.jsx(se.Content,{children:s.jsx($e,{fallback:B,children:M})}),t[47]=B,t[48]=M,t[49]=U):U=t[49];let K;return t[50]!==_||t[51]!==U?(K=s.jsxs(se,{children:[_,U]}),t[50]=_,t[51]=U,t[52]=K):K=t[52],K}function ht(t){return t.id}function jt(t){return t??""}export{us as default};
|
package/dist/client/assets/{plugin-empty-state-DwTx3Irb.js → plugin-empty-state-BIg-myPi.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as s,j as t}from"./index-
|
|
1
|
+
import{d as s,j as t}from"./index-D49VqQ7Q.js";import{e as r}from"./Dataflow03-slF1Ax9G.js";function a(){const o=s.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(r,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),o[0]=e):e=o[0],e}export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as S,j as s,r as w}from"./index-
|
|
1
|
+
import{d as S,j as s,r as w}from"./index-D49VqQ7Q.js";import{i as R}from"./Check-Dczm9Dfw.js";import{t as _}from"./ChevronDown-CDxBhn_l.js";import{e as y}from"./Dataflow03-slF1Ax9G.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:r,onConnectionChange:N}=x,[n,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==r){let t;e[3]!==r?(t=u=>u.id===r,e[3]=r,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=r,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==n?(o=()=>z(!n),e[13]=n,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==n||e[26]!==N||e[27]!==r?(m=n&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===r&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=n,e[26]=N,e[27]=r,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function H(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{H as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as r,j as i}from"./index-D49VqQ7Q.js";import{P as m}from"./project-plugins-8LQo3YBE.js";import"./useQuery-CvkH2gG1.js";import"./useMutation-BTUmJffP.js";import"./constants-TLV7MTwP.js";import"./switch-yIP7Yj81.js";import"./label-DF2jcg2U.js";import"./Container-CMPDG7Cp.js";import"./use-connection-Yjy9d1tW.js";import"./use-collections-Dmxer7H8.js";import"./registry-utils-Cz03qmOa.js";import"./workflow-CBGVBFDu.js";import"./collections-BsFnKFn5.js";import"./use-install-from-registry-Du1Xu864.js";import"./extract-connection-data-NSojo21r.js";import"./constants-BqeudQjB.js";import"./generate-id-Dyweu44Y.js";import"./Loading01-BVCg1O_G.js";import"./Plus-DcVtqCMV.js";import"./select-DaOZXaTi.js";import"./index-BdQq_4o_.js";import"./index-BkAoKVx8.js";import"./Check-Dczm9Dfw.js";import"./ChevronDown-CDxBhn_l.js";import"./ChevronUp-BLNd6dNq.js";function w(){const o=r.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(m,{}),o[0]=t):t=o[0],t}export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,Z as $,j as c,b5 as L,aa as z,a0 as O,$ as A,a2 as g,b6 as _,a4 as j,b7 as G,b8 as w,b9 as H,ba as K,a5 as Z,bb as U,bc as V,bd as W,be as q,bf as B,bg as J,d as R,y as Q}from"./index-
|
|
1
|
+
import{r as i,Z as $,j as c,b5 as L,aa as z,a0 as O,$ as A,a2 as g,b6 as _,a4 as j,b7 as G,b8 as w,b9 as H,ba as K,a5 as Z,bb as U,bc as V,bd as W,be as q,bf as B,bg as J,d as R,y as Q}from"./index-D49VqQ7Q.js";var C="Popover",[E]=Z(C,[w]),P=w(),[X,u]=E(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(X,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(_,{...s,...r,ref:e})});Y.displayName=F;var y="PopoverTrigger",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(y,o),s=P(o),a=O(e,n.triggerRef),p=c.jsx(A.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(_,{asChild:!0,...s,children:p})});S.displayName=y;var b="PopoverPortal",[ee,oe]=E(b,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(b,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=b;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(j,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=U("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=O(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return V(),c.jsx(W,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(q,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(B,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(A.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=S,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{fe as P,ve as a,ge as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as P,k as A,j as r,E as y,r as R,c as T}from"./index-
|
|
1
|
+
import{d as P,k as A,j as r,E as y,r as R,c as T}from"./index-D49VqQ7Q.js";import{u as S}from"./use-connection-Yjy9d1tW.js";import{u as U}from"./constants-TLV7MTwP.js";import{u as v}from"./use-mcp-tools-CmOfbC2t.js";import{c as E}from"./content-blocks-o63cs2vh.js";import{M as H}from"./mcp-app-renderer-C8wEMNqP.js";import{g as O,M as $}from"./types-llndI7Ky.js";import{u as k}from"./context-BSzlpoxW.js";import{P as _,a as D}from"./index-CtkIjbbq.js";import"./use-collections-Dmxer7H8.js";import"./useMutation-BTUmJffP.js";import"./useQuery-CvkH2gG1.js";import"./use-mcp-resources-BnmpykKD.js";import"./decopilot-events-Brt4gAR6.js";import"./index-2hR_U2H-.js";import"./tooltip-DJkxXViN.js";import"./index-BkAoKVx8.js";import"./X-Dr-hR03I.js";const b={};function w(t){const e=P.c(22),{client:o,resourceURI:m,tool:i,connectionId:d}=t,{sendMessage:a,setAppContext:c,clearAppContext:n}=k(),[,p]=D(),l=`${d}:${i.name}`;let f;e[0]!==o||e[1]!==i.name?(f={client:o,toolName:i.name,toolArguments:b},e[0]=o,e[1]=i.name,e[2]=f):f=e[2];const{data:u}=v(f);let s;e[3]!==a||e[4]!==p?(s=N=>{const M=E(N.content);M.content.length>0&&(p(!0),a(M))},e[3]=a,e[4]=p,e[5]=s):s=e[5];const g=s,I=i;let x;e[6]!==I?(x={tool:I},e[6]=I,e[7]=x):x=e[7];let h;e[8]!==c||e[9]!==l?(h=N=>c(l,N),e[8]=c,e[9]=l,e[10]=h):h=e[10];let j;e[11]!==n||e[12]!==l?(j=()=>n(l),e[11]=n,e[12]=l,e[13]=j):j=e[13];let C;return e[14]!==o||e[15]!==g||e[16]!==m||e[17]!==x||e[18]!==h||e[19]!==j||e[20]!==u?(C=r.jsx(H,{resourceURI:m,toolInfo:x,toolInput:b,toolResult:u,displayMode:"fullscreen",minHeight:$.fullscreen.minHeight,maxHeight:$.fullscreen.maxHeight,client:o,onMessage:g,onUpdateModelContext:h,onTeardown:j,className:"h-full"}),e[14]=o,e[15]=g,e[16]=m,e[17]=x,e[18]=h,e[19]=j,e[20]=u,e[21]=C):C=e[21],C}function L(t){const e=P.c(17),{connectionId:o,toolName:m}=t,{org:i}=T();let d;e[0]!==o||e[1]!==i.id?(d={connectionId:o,orgId:i.id},e[0]=o,e[1]=i.id,e[2]=d):d=e[2];const a=U(d),c=S(o),n=decodeURIComponent(m);let p,l;if(e[3]!==c?.tools||e[4]!==n){let s;e[7]!==n?(s=g=>g.name===n,e[7]=n,e[8]=s):s=e[8],l=(c?.tools??[]).find(s),p=l?._meta?O(l._meta):void 0,e[3]=c?.tools,e[4]=n,e[5]=p,e[6]=l}else p=e[5],l=e[6];const f=p;if(!c){let s;return e[9]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("p",{className:"text-sm text-muted-foreground",children:"Connection not found"})}),e[9]=s):s=e[9],s}if(!l||!f){let s;return e[10]!==n?(s=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',n,'" not found or has no UI']})}),e[10]=n,e[11]=s):s=e[11],s}let u;return e[12]!==a||e[13]!==o||e[14]!==f||e[15]!==l?(u=r.jsx(w,{client:a,resourceURI:f,tool:l,connectionId:o}),e[12]=a,e[13]=o,e[14]=f,e[15]=l,e[16]=u):u=e[16],u}function le(){const t=P.c(9);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/apps/$connectionId/$toolName"},t[0]=e):e=t[0];const{connectionId:o,toolName:m}=A(e);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(_.Header,{}),t[1]=i):i=t[1];const d=`${o}:${m}`;let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[r.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),r.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),t[2]=a):a=t[2];let c;t[3]!==o||t[4]!==m?(c=r.jsx(R.Suspense,{fallback:a,children:r.jsx(L,{connectionId:o,toolName:m})}),t[3]=o,t[4]=m,t[5]=c):c=t[5];let n;return t[6]!==d||t[7]!==c?(n=r.jsxs(_,{children:[i,r.jsx(_.Content,{children:r.jsx(y,{fallback:void 0,children:c},d)})]}),t[6]=d,t[7]=c,t[8]=n):n=t[8],n}export{le as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as w,g as ne,j as s,y as V,r as I,w as oe,o as he,q as W,f as ie,c as re,x as ge,v as je,t as be,K as ae,B as Q,O as D,P as fe,S as le,k as ye,aU as ve}from"./index-B62MiQAu.js";import{u as ue}from"./use-project-DmzlV8IR.js";import{c as Se,D as Ne,a as _e}from"./dialog-Ce95gXqs.js";import{i as ke}from"./ArrowLeft-VzQjF5nf.js";import{i as ce}from"./X-BNpME-HX.js";import{S as G}from"./skeleton-H6tvOoEj.js";import{u as Ce,a as we,O as Pe}from"./org-ai-providers-vLOcM2IN.js";import{A as pe}from"./avatar-DJ_eE6FL.js";import{M as ze,N as $e,t as Ae,O as Ie,P as Oe}from"./integration-icon-BByVvYW2.js";import{t as Me}from"./Settings01-ClJz1ULQ.js";import{i as Fe}from"./Zap-kD49gPEF.js";import{a as Le,b as Ee,c as Te,T as De}from"./tooltip-Cz2tQy7f.js";import{i as Ue}from"./Check-BgcEZAFd.js";import{c as qe}from"./Play-DSddPPya.js";import{S as Y}from"./switch-1W8o5vam.js";import{S as Re,a as Be,d as H,c as Ge}from"./select-BY6esNmT.js";import{i as Ke}from"./Type01-Dp2k0by5.js";import{a as Ve}from"./RefreshCcw01-DN-y3At7.js";import"./index-CMA-66KF.js";import{u as Qe}from"./useMutation-5tF0rOhi.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-BxnLhCD_.js";import{I as me}from"./input-BNSWRvAr.js";import{L as Ye}from"./logo-upload-Cnlppzw5.js";import{P as He}from"./project-plugins-CB_lBTqe.js";import Xe from"./members-DR64AFBa.js";import"./useQuery-Cr3Ibn6v.js";import"./constants-B7D0VCWO.js";import"./index-DNarCA5m.js";import"./AlertCircle-CE4aMC_6.js";import"./XCircle-MpsZU5qt.js";import"./Trash01-fCw8HP0s.js";import"./card-CQTuw0Xi.js";import"./toggle-group-nuX--X8U.js";import"./popover-CW4G5neq.js";import"./ai-providers-logos-Bp_JBc4Z.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./User01-CKoZ8ZDH.js";import"./Container-BQWbDEy6.js";import"./ArrowUp-DVMY0e13.js";import"./ChevronDown-Ca93y5Zg.js";import"./ChevronRight-iThFOnTS.js";import"./ChevronUp-Dfrjh0kb.js";import"./Dataflow03-DdTzEDv9.js";import"./FolderClosed-jb7WzUeW.js";import"./Loading01-CrI0NwPE.js";import"./Plus-ltkKoqJz.js";import"./SearchMd-CS43V34Y.js";import"./Upload01-3AVPYkeL.js";import"./XClose-DKDxXEaA.js";import"./index-BcOdsrKl.js";import"./index-BdQq_4o_.js";import"./label-C-5U7XF4.js";import"./use-connection-u5F7YTDM.js";import"./use-collections-Cw-CkhM5.js";import"./registry-utils-DWGplsmC.js";import"./workflow-DGOWYrJv.js";import"./collections-pcWRi6G6.js";import"./use-install-from-registry-Bh4CcElp.js";import"./extract-connection-data-OUAaU9Od.js";import"./constants-B_S2_Dfe.js";import"./generate-id-Dyweu44Y.js";import"./collection-display-button-DgaN6ief.js";import"./dropdown-menu-BT7g2ayh.js";import"./badge-Dg_rRuRo.js";import"./collection-search-BxbLLE-D.js";import"./breadcrumb-B3Pzyfpg.js";import"./collection-table-wrapper-DhM52ivn.js";import"./table-oKRuJlES.js";import"./checkbox-pwwqVDt-.js";import"./use-members-L6twvwj_.js";import"./alert-dialog-DPu-w5FH.js";import"./empty-state-8546_PpL.js";import"./textarea-Db5eGrte.js";import"./command-CIWQeRGP.js";import"./index-DAKvcNkQ.js";function Ze(e){const t=w.c(26),{activeSection:n,onNavigate:o}=e,{data:a}=ne.useSession(),r=a?.user,l=r?.image,c=r?.name??"Profile",m=r?.name??"U";let f;t[0]!==m||t[1]!==l?(f=s.jsx(pe,{url:l,fallback:m,shape:"circle",size:"2xs",className:"size-4 shrink-0"}),t[0]=m,t[1]=l,t[2]=f):f=t[2];let i;t[3]!==c||t[4]!==f?(i={key:"account.profile",label:c,icon:f},t[3]=c,t[4]=f,t[5]=i):i=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p={key:"account.preferences",label:"Preferences",icon:s.jsx(Me,{size:14})},t[6]=p):p=t[6];let x;t[7]!==i?(x=[i,p],t[7]=i,t[8]=x):x=t[8];const g=x;let u;t[9]===Symbol.for("react.memo_cache_sentinel")?(u={key:"org.general",label:"General",icon:s.jsx(ze,{size:14})},t[9]=u):u=t[9];let d;t[10]===Symbol.for("react.memo_cache_sentinel")?(d={key:"org.plugins",label:"Features",icon:s.jsx(Fe,{size:14})},t[10]=d):d=t[10];let j;t[11]===Symbol.for("react.memo_cache_sentinel")?(j={key:"org.ai-providers",label:"AI Providers",icon:s.jsx($e,{size:14})},t[11]=j):j=t[11];let h;t[12]===Symbol.for("react.memo_cache_sentinel")?(h=[u,d,j,{key:"org.members",label:"Members",icon:s.jsx(Ae,{size:14})}],t[12]=h):h=t[12];const _=h;let b;t[13]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Account"}),t[13]=b):b=t[13];let y;t[14]!==g||t[15]!==n||t[16]!==o?(y=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[b,g.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:V("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===v.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:v.icon}),s.jsx("span",{className:"truncate",children:v.label})]},v.key))]}),t[14]=g,t[15]=n,t[16]=o,t[17]=y):y=t[17];let N;t[18]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Organization"}),t[18]=N):N=t[18];let S;t[19]!==n||t[20]!==o?(S=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[N,_.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:V("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===v.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:v.icon}),s.jsx("span",{className:"truncate",children:v.label})]},v.key))]}),t[19]=n,t[20]=o,t[21]=S):S=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","2.186.7"]})}),t[22]=C):C=t[22];let k;return t[23]!==y||t[24]!==S?(k=s.jsxs("div",{className:"w-full sm:w-52 shrink-0 sm:border-r border-border bg-sidebar/50 overflow-y-auto py-3 flex flex-col gap-4 flex-1",children:[y,S,C]}),t[23]=y,t[24]=S,t[25]=k):k=t[25],k}function et(){const e=w.c(32),{data:t}=ne.useSession(),[n,o]=I.useState(!1),a=t?.user,r=a?.image;let l;e[0]!==a?(l=()=>{a?.id&&navigator.clipboard.writeText(a.id).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)})},e[0]=a,e[1]=l):l=e[1];const c=l;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Profile"})}),e[2]=m):m=e[2];const f=a?.name??"U";let i;e[3]!==f||e[4]!==r?(i=s.jsx(pe,{url:r,fallback:f,shape:"circle",size:"xl",className:"size-16 shrink-0"}),e[3]=f,e[4]=r,e[5]=i):i=e[5];const p=a?.name??"User";let x;e[6]!==p?(x=s.jsx("span",{className:"text-sm font-semibold text-foreground truncate",children:p}),e[6]=p,e[7]=x):x=e[7];const g=a?.email;let u;e[8]!==g?(u=s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:g}),e[8]=g,e[9]=u):u=e[9];let d;e[10]!==x||e[11]!==u?(d=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[x,u]}),e[10]=x,e[11]=u,e[12]=d):d=e[12];let j;e[13]!==i||e[14]!==d?(j=s.jsxs("div",{className:"flex items-center gap-4",children:[i,d]}),e[13]=i,e[14]=d,e[15]=j):j=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"User ID"}),e[16]=h):h=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("p",{className:"text-sm text-muted-foreground",children:"User ID"}),e[17]=_):_=e[17];const b=a?.id;let y;e[18]!==b?(y=s.jsx("span",{className:"font-mono text-sm",children:b}),e[18]=b,e[19]=y):y=e[19];let N;e[20]!==n?(N=n?s.jsx(Ue,{size:14,className:"text-green-600 shrink-0"}):s.jsx(qe,{size:14,className:"shrink-0 opacity-70 group-hover:opacity-100 transition-opacity"}),e[20]=n,e[21]=N):N=e[21];let S;e[22]!==c||e[23]!==y||e[24]!==N?(S=s.jsx(Le,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:c,className:"group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[y,N]})}),e[22]=c,e[23]=y,e[24]=N,e[25]=S):S=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Ee,{side:"left",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[26]=C):C=e[26];let k;e[27]!==S?(k=s.jsxs("div",{className:"flex flex-col",children:[h,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[_,s.jsx(Te,{children:s.jsxs(De,{children:[S,C]})})]})]}),e[27]=S,e[28]=k):k=e[28];let v;return e[29]!==k||e[30]!==j?(v=s.jsxs("div",{className:"flex flex-col gap-8",children:[m,j,k]}),e[29]=k,e[30]=j,e[31]=v):v=e[31],v}function K(e){const t=w.c(27),{icon:n,label:o,description:a,control:r,onClick:l,disabled:c}=e,m=c?void 0:l,f=l?"button":void 0,i=l&&!c?0:void 0;let p;t[0]!==c||t[1]!==l?(p=l&&!c?N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),l())}:void 0,t[0]=c,t[1]=l,t[2]=p):p=t[2];const x=l&&!c?"pointer":void 0;let g;t[3]!==x?(g={cursor:x},t[3]=x,t[4]=g):g=t[4];let u;t[5]!==n?(u=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:n}),t[5]=n,t[6]=u):u=t[6];let d;t[7]!==o?(d=s.jsx("p",{className:"text-sm font-medium text-foreground",children:o}),t[7]=o,t[8]=d):d=t[8];let j;t[9]!==a?(j=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:a}),t[9]=a,t[10]=j):j=t[10];let h;t[11]!==d||t[12]!==j?(h=s.jsxs("div",{className:"min-w-0",children:[d,j]}),t[11]=d,t[12]=j,t[13]=h):h=t[13];let _;t[14]!==h||t[15]!==u?(_=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[u,h]}),t[14]=h,t[15]=u,t[16]=_):_=t[16];let b;t[17]!==r?(b=s.jsx("div",{onClick:tt,className:"shrink-0",children:r}),t[17]=r,t[18]=b):b=t[18];let y;return t[19]!==m||t[20]!==_||t[21]!==b||t[22]!==f||t[23]!==i||t[24]!==p||t[25]!==g?(y=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0",onClick:m,role:f,tabIndex:i,onKeyDown:p,style:g,children:[_,b]}),t[19]=m,t[20]=_,t[21]=b,t[22]=f,t[23]=i,t[24]=p,t[25]=g,t[26]=y):y=t[26],y}function tt(e){return e.stopPropagation()}function de(){const e=w.c(47),[t,n]=Ce();let o;e[0]!==n?(o=async P=>{if(P&&await Notification.requestPermission()!=="granted"){oe.error("Notifications denied. Please enable them in your browser settings."),n(lt);return}n(z=>({...z,enableNotifications:P}))},e[0]=n,e[1]=o):o=e[1];const a=o;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Preferences"})}),e[2]=r):r=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ke,{size:16}),e[3]=l):l=e[3];let c;e[4]!==n?(c=()=>n(ot),e[4]=n,e[5]=c):c=e[5];let m;e[6]!==n?(m=P=>n(z=>({...z,devMode:P})),e[6]=n,e[7]=m):m=e[7];let f;e[8]!==t.devMode||e[9]!==m?(f=s.jsx(Y,{checked:t.devMode,onCheckedChange:m}),e[8]=t.devMode,e[9]=m,e[10]=f):f=e[10];let i;e[11]!==c||e[12]!==f?(i=s.jsx(K,{icon:l,label:"Developer Mode",description:"Show technical details like JSON input/output for tool calls.",onClick:c,control:f}),e[11]=c,e[12]=f,e[13]=i):i=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ie,{size:16}),e[14]=p):p=e[14];let x;e[15]!==a||e[16]!==t.enableNotifications?(x=s.jsx(K,{icon:p,label:"Notifications",description:"Play a sound and show a notification when chat messages complete while the app is unfocused.",disabled:typeof Notification>"u",onClick:()=>a(!t.enableNotifications),control:s.jsx(Y,{disabled:typeof Notification>"u",checked:t.enableNotifications,onCheckedChange:a})}),e[15]=a,e[16]=t.enableNotifications,e[17]=x):x=e[17];let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Ve,{size:16}),e[18]=g):g=e[18];let u;e[19]!==n?(u=()=>n(st),e[19]=n,e[20]=u):u=e[20];let d;e[21]!==n?(d=P=>n(z=>({...z,experimentalAutomations:P})),e[21]=n,e[22]=d):d=e[22];let j;e[23]!==t.experimentalAutomations||e[24]!==d?(j=s.jsx(Y,{checked:t.experimentalAutomations,onCheckedChange:d}),e[23]=t.experimentalAutomations,e[24]=d,e[25]=j):j=e[25];let h;e[26]!==u||e[27]!==j?(h=s.jsx(K,{icon:g,label:"Experimental: Automations",description:"Enable the Automations feature in the sidebar. This is an experimental feature under active development.",onClick:u,control:j}),e[26]=u,e[27]=j,e[28]=h):h=e[28];let _;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Oe,{size:16}),e[29]=_):_=e[29];let b;e[30]!==n?(b=P=>n(z=>({...z,toolApprovalLevel:P})),e[30]=n,e[31]=b):b=e[31];let y;e[32]===Symbol.for("react.memo_cache_sentinel")?(y={readonly:"Skip read-only",auto:"Auto-approve all",plan:"Plan mode"},e[32]=y):y=e[32];const N=y[t.toolApprovalLevel];let S;e[33]!==N?(S=s.jsx(Be,{className:"w-36",children:s.jsx("span",{children:N})}),e[33]=N,e[34]=S):S=e[34];let C;e[35]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(H,{value:"readonly",textValue:"Skip read-only",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Skip read-only"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools, ask for others"})]})}),e[35]=C):C=e[35];let k;e[36]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(H,{value:"auto",textValue:"Auto-approve all",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Auto-approve all"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all tools without approval"})]})}),e[36]=k):k=e[36];let v;e[37]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs(Ge,{children:[C,k,s.jsx(H,{value:"plan",textValue:"Plan mode",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Plan mode"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Read-only exploration, then propose a plan"})]})})]}),e[37]=v):v=e[37];let A;e[38]!==t.toolApprovalLevel||e[39]!==b||e[40]!==S?(A=s.jsx(K,{icon:_,label:"Tool Approval",description:"Choose when to require approval before tools execute.",control:s.jsxs(Re,{value:t.toolApprovalLevel,onValueChange:b,children:[S,v]})}),e[38]=t.toolApprovalLevel,e[39]=b,e[40]=S,e[41]=A):A=e[41];let $;return e[42]!==h||e[43]!==A||e[44]!==i||e[45]!==x?($=s.jsxs("div",{className:"flex flex-col gap-6",children:[r,s.jsxs("div",{className:"flex flex-col",children:[i,x,h,A]})]}),e[42]=h,e[43]=A,e[44]=i,e[45]=x,e[46]=$):$=e[46],$}function st(e){return{...e,experimentalAutomations:!e.experimentalAutomations}}function ot(e){return{...e,devMode:!e.devMode}}function lt(e){return{...e,enableNotifications:!1}}const nt=he({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:W().optional()});function it(){const e=ie(),{org:t,project:n}=re(),o=ge(),[a,r]=I.useState(!1),l=je({resolver:be(nt),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),c=Qe({mutationFn:async i=>{const p={name:i.name,slug:i.slug};i.logo&&(p.logo=i.logo);const x=await ne.organization.update({organizationId:t.id,data:p});if(x?.error)throw new Error(x.error.message||"Failed to update organization");return x},onSuccess:i=>{o.invalidateQueries({queryKey:ae.organizations()}),o.invalidateQueries({queryKey:ae.activeOrganization(t.slug)}),oe.success("Organization settings updated successfully"),i?.data?.slug&&i.data.slug!==t.slug&&e({to:"/$org/$project/settings",params:{org:i.data.slug,project:n.slug}})},onError:i=>{oe.error(i instanceof Error?i.message:"Failed to update organization")},onSettled:()=>{r(!1)}}),m=i=>{r(!0),c.mutate(i)},f=l.formState.isDirty;return s.jsx(Je,{...l,children:s.jsxs("form",{onSubmit:l.handleSubmit(m),className:"space-y-6",children:[s.jsx(X,{control:l.control,name:"name",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Organization Name"}),s.jsx(te,{children:s.jsx(me,{placeholder:"My Organization",...i,disabled:a})}),s.jsx(se,{})]})}),s.jsx(X,{control:l.control,name:"slug",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Organization Slug"}),s.jsx(te,{children:s.jsx(me,{placeholder:"my-organization",...i,disabled:a,onChange:p=>{const x=p.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");i.onChange(x)}})}),s.jsx(We,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(se,{})]})}),s.jsx(X,{control:l.control,name:"logo",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Logo"}),s.jsx(te,{children:s.jsx(Ye,{value:i.value,onChange:i.onChange,name:l.watch("name"),disabled:a})}),s.jsx(se,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(Q,{type:"submit",disabled:!f||a,className:"min-w-24",children:a?"Saving...":"Save Changes"}),f&&s.jsx(Q,{type:"button",variant:"outline",onClick:()=>l.reset(),disabled:a,children:"Cancel"})]})]})})}function rt(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Organization"})}),s.jsx(it,{})]}),e[0]=t):t=e[0],t}function at(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Xe,{}),e[0]=t):t=e[0],t}function xe(){const e=w.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(G,{className:"h-6 w-48"}),n=s.jsx(G,{className:"h-4 w-80"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[t,n,s.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[s.jsx(G,{className:"h-12 w-full"}),s.jsx(G,{className:"h-12 w-full"})]})]}),e[2]=o):o=e[2],o}function ct(e){const t=w.c(14),{projectSlug:n,children:o}=e,{org:a}=re(),{data:r,isLoading:l}=ue(a.id,n);if(l||!r){let p;return t[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xe,{}),t[0]=p):p=t[0],p}const c=n===D;let m;t[1]!==r.description||t[2]!==r.enabledPlugins||t[3]!==r.id||t[4]!==r.name||t[5]!==r.organizationId||t[6]!==r.slug||t[7]!==r.ui||t[8]!==c?(m={id:r.id,organizationId:r.organizationId,slug:r.slug,name:r.name,description:r.description,enabledPlugins:r.enabledPlugins,ui:r.ui,isOrgAdmin:c},t[1]=r.description,t[2]=r.enabledPlugins,t[3]=r.id,t[4]=r.name,t[5]=r.organizationId,t[6]=r.slug,t[7]=r.ui,t[8]=c,t[9]=m):m=t[9];const f=m;let i;return t[10]!==o||t[11]!==f||t[12]!==a?(i=s.jsx(fe,{org:a,project:f,children:o}),t[10]=o,t[11]=f,t[12]=a,t[13]=i):i=t[13],i}function mt(e){const t=w.c(7),{section:n}=e;switch(n){case"account.profile":{let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(et,{}),t[0]=o):o=t[0],o}case"account.preferences":{let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(de,{}),t[1]=o):o=t[1],o}case"org.general":{let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(rt,{}),t[2]=o):o=t[2],o}case"org.plugins":{let o;return t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ct,{projectSlug:D,children:s.jsx(He,{})}),t[3]=o):o=t[3],o}case"org.ai-providers":{let o;return t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Pe,{}),t[4]=o):o=t[4],o}case"org.members":{let o;return t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(at,{}),t[5]=o):o=t[5],o}default:{let o;return t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(de,{}),t[6]=o):o=t[6],o}}}const dt={"account.profile":"Profile","account.preferences":"Preferences","org.general":"General","org.plugins":"Features","org.ai-providers":"AI Providers","org.billing":"Billing","org.members":"Members"};function ft(){const e=w.c(49),{isOpen:t,activeSection:n,open:o,close:a}=we(),[r,l]=I.useState(!1),[c,m]=I.useState(t);c!==t&&(m(t),l(t));let f;e[0]!==o?(f=J=>{o(J),l(!0)},e[0]=o,e[1]=f):f=e[1];const i=f;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{l(!1)},e[2]=p):p=e[2];const x=p;let g;e[3]!==a?(g=J=>{J||(a(),l(!1))},e[3]=a,e[4]=g):g=e[4];const u=g;let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Se,{className:"sr-only",children:"Settings"}),e[5]=d):d=e[5];const j=r?"hidden":"flex";let h;e[6]!==j?(h=V(j,"sm:flex flex-col w-full sm:w-auto"),e[6]=j,e[7]=h):h=e[7];let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("span",{className:"text-base font-semibold",children:"Settings"}),e[8]=_):_=e[8];let b;e[9]!==u?(b=()=>u(!1),e[9]=u,e[10]=b):b=e[10];let y,N;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ce,{size:16}),N=s.jsx("span",{className:"sr-only",children:"Close"}),e[11]=y,e[12]=N):(y=e[11],N=e[12]);let S;e[13]!==b?(S=s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border sm:hidden",children:[_,s.jsxs("button",{type:"button",onClick:b,className:"rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity",children:[y,N]})]}),e[13]=b,e[14]=S):S=e[14];let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"w-full sm:w-52 shrink-0 border-r border-border"}),e[15]=C):C=e[15];let k;e[16]!==n||e[17]!==i?(k=s.jsx(I.Suspense,{fallback:C,children:s.jsx(Ze,{activeSection:n,onNavigate:i})}),e[16]=n,e[17]=i,e[18]=k):k=e[18];let v;e[19]!==S||e[20]!==k||e[21]!==h?(v=s.jsxs("div",{className:h,children:[S,k]}),e[19]=S,e[20]=k,e[21]=h,e[22]=v):v=e[22];const A=r?"flex":"hidden";let $;e[23]!==A?($=V(A,"sm:flex flex-1 min-w-0 overflow-y-auto relative flex-col overflow-hidden"),e[23]=A,e[24]=$):$=e[24];let P;e[25]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs("button",{type:"button",onClick:x,className:"rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity",children:[s.jsx(ke,{size:16}),s.jsx("span",{className:"sr-only",children:"Back"})]}),e[25]=P):P=e[25];const z=dt[n];let O;e[26]!==z?(O=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-border sm:hidden",children:[P,s.jsx("span",{className:"text-base font-semibold",children:z})]}),e[26]=z,e[27]=O):O=e[27];let M;e[28]!==u?(M=()=>u(!1),e[28]=u,e[29]=M):M=e[29];let U,q;e[30]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(ce,{size:16}),q=s.jsx("span",{className:"sr-only",children:"Close"}),e[30]=U,e[31]=q):(U=e[30],q=e[31]);let F;e[32]!==M?(F=s.jsxs("button",{type:"button",onClick:M,className:"hidden sm:block absolute top-4 right-4 z-10 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-ring",children:[U,q]}),e[32]=M,e[33]=F):F=e[33];let R;e[34]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(xe,{}),e[34]=R):R=e[34];let L;e[35]!==n?(L=s.jsx("div",{className:"p-5 sm:p-8 flex-1 overflow-y-auto",children:s.jsx(I.Suspense,{fallback:R,children:s.jsx(mt,{section:n})})}),e[35]=n,e[36]=L):L=e[36];let E;e[37]!==$||e[38]!==O||e[39]!==F||e[40]!==L?(E=s.jsxs("div",{className:$,children:[O,F,L]}),e[37]=$,e[38]=O,e[39]=F,e[40]=L,e[41]=E):E=e[41];let T;e[42]!==v||e[43]!==E?(T=s.jsxs(Ne,{className:"sm:max-w-[1100px] h-[100dvh] sm:h-[85vh] max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-[1100px] rounded-none sm:rounded-xl p-0 overflow-hidden flex flex-col gap-0 border-0 sm:border",closeButtonClassName:"hidden",children:[d,s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[v,E]})]}),e[42]=v,e[43]=E,e[44]=T):T=e[44];let B;return e[45]!==u||e[46]!==t||e[47]!==T?(B=s.jsx(_e,{open:t,onOpenChange:u,children:T}),e[45]=u,e[46]=t,e[47]=T,e[48]=B):B=e[48],B}function ut(e){const t=w.c(12),{projectSlug:n,orgSlug:o,error:a}=e,r=ie();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("h1",{className:"text-xl font-semibold",children:"Failed to load project"}),t[0]=l):l=t[0];let c;t[1]!==n?(c=s.jsxs("p",{className:"text-muted-foreground text-center",children:['There was an error loading the project "',n,'".']}),t[1]=n,t[2]=c):c=t[2];let m;t[3]!==a.message?(m=s.jsx("p",{className:"text-sm text-muted-foreground",children:a.message}),t[3]=a.message,t[4]=m):m=t[4];let f;t[5]!==r||t[6]!==o?(f=s.jsx(Q,{variant:"link",onClick:()=>r({to:"/$org/$project",params:{org:o,project:D}}),children:"Go to organization home"}),t[5]=r,t[6]=o,t[7]=f):f=t[7];let i;return t[8]!==c||t[9]!==m||t[10]!==f?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[l,c,m,f]}),t[8]=c,t[9]=m,t[10]=f,t[11]=i):i=t[11],i}function pt(e){const t=w.c(9),{projectSlug:n,orgSlug:o}=e,a=ie();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("h1",{className:"text-xl font-semibold",children:"Project not found"}),t[0]=r):r=t[0];let l;t[1]!==n?(l=s.jsxs("p",{className:"text-muted-foreground text-center",children:['The project "',n,'" does not exist in this organization.']}),t[1]=n,t[2]=l):l=t[2];let c;t[3]!==a||t[4]!==o?(c=s.jsx(Q,{variant:"link",onClick:()=>a({to:"/$org/$project",params:{org:o,project:D}}),children:"Go to organization home"}),t[3]=a,t[4]=o,t[5]=c):c=t[5];let m;return t[6]!==l||t[7]!==c?(m=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[r,l,c]}),t[6]=l,t[7]=c,t[8]=m):m=t[8],m}function xt(){const e=w.c(23);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=ye(t),{org:o}=re(),a=n.org,r=n.project,{data:l,isLoading:c,error:m}=ue(o.id,r);if(c){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(le,{}),e[1]=d):d=e[1],d}if(m){let d;return e[2]!==m||e[3]!==a||e[4]!==r?(d=s.jsx(ut,{projectSlug:r,orgSlug:a,error:m}),e[2]=m,e[3]=a,e[4]=r,e[5]=d):d=e[5],d}if(!l){let d;return e[6]!==a||e[7]!==r?(d=s.jsx(pt,{projectSlug:r,orgSlug:a}),e[6]=a,e[7]=r,e[8]=d):d=e[8],d}const f=l.slug===D;let i;e[9]!==l.description||e[10]!==l.enabledPlugins||e[11]!==l.id||e[12]!==l.name||e[13]!==l.organizationId||e[14]!==l.slug||e[15]!==l.ui||e[16]!==f?(i={id:l.id,organizationId:l.organizationId,slug:l.slug,name:l.name,description:l.description,enabledPlugins:l.enabledPlugins,ui:l.ui,isOrgAdmin:f},e[9]=l.description,e[10]=l.enabledPlugins,e[11]=l.id,e[12]=l.name,e[13]=l.organizationId,e[14]=l.slug,e[15]=l.ui,e[16]=f,e[17]=i):i=e[17];const p=i;let x,g;e[18]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(I.Suspense,{fallback:s.jsx(le,{}),children:s.jsx(ve,{})}),g=s.jsx(ft,{}),e[18]=x,e[19]=g):(x=e[18],g=e[19]);let u;return e[20]!==p||e[21]!==o?(u=s.jsxs(fe,{org:o,project:p,children:[x,g]}),e[20]=p,e[21]=o,e[22]=u):u=e[22],u}function Ts(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(I.Suspense,{fallback:s.jsx(le,{}),children:s.jsx(xt,{})}),e[0]=t):t=e[0],t}export{Ts as default};
|
|
1
|
+
import{d as w,g as ne,j as s,y as V,r as I,w as oe,o as he,q as W,f as ie,c as re,x as ge,v as je,t as be,K as ae,B as Q,O as D,P as fe,S as le,k as ye,aU as ve}from"./index-D49VqQ7Q.js";import{u as ue}from"./use-project-W-5l7vWa.js";import{c as Se,D as Ne,a as _e}from"./dialog-DCrLu7TC.js";import{i as ke}from"./ArrowLeft-DN3D0Zrv.js";import{i as ce}from"./X-Dr-hR03I.js";import{S as G}from"./skeleton-CLUePAN0.js";import{u as Ce,a as we,O as Pe}from"./org-ai-providers-DFHn6TCP.js";import{A as pe}from"./avatar-BZ4Frci2.js";import{M as ze,N as $e,t as Ae,O as Ie,P as Oe}from"./integration-icon-ByIZ-Vgj.js";import{t as Me}from"./Settings01-DpZ_tsoX.js";import{i as Fe}from"./Zap-CiHJmamA.js";import{a as Le,b as Ee,c as Te,T as De}from"./tooltip-DJkxXViN.js";import{i as Ue}from"./Check-Dczm9Dfw.js";import{c as qe}from"./Play-Bb4cvvVL.js";import{S as Y}from"./switch-yIP7Yj81.js";import{S as Re,a as Be,d as H,c as Ge}from"./select-DaOZXaTi.js";import{i as Ke}from"./Type01-CySkENi6.js";import{a as Ve}from"./RefreshCcw01-Co0-i94o.js";import"./index-2hR_U2H-.js";import{u as Qe}from"./useMutation-BTUmJffP.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-DPsme8JL.js";import{I as me}from"./input-BoNWsfmK.js";import{L as Ye}from"./logo-upload-D5UEFEut.js";import{P as He}from"./project-plugins-8LQo3YBE.js";import Xe from"./members-b1hYnwix.js";import"./useQuery-CvkH2gG1.js";import"./constants-TLV7MTwP.js";import"./index-CtkIjbbq.js";import"./AlertCircle-BD5gSXQu.js";import"./XCircle-Z-JTmQ8v.js";import"./Trash01-CBP9WLeP.js";import"./card-CKN-JP9M.js";import"./toggle-group-DN_3BuPh.js";import"./popover-CvIauBBG.js";import"./ai-providers-logos-idzpcoUr.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./User01-CItwHvE1.js";import"./Container-CMPDG7Cp.js";import"./ArrowUp-D6ltkV3R.js";import"./ChevronDown-CDxBhn_l.js";import"./ChevronRight-Dxvchjxo.js";import"./ChevronUp-BLNd6dNq.js";import"./Dataflow03-slF1Ax9G.js";import"./FolderClosed-BKB_NgWm.js";import"./Loading01-BVCg1O_G.js";import"./Plus-DcVtqCMV.js";import"./SearchMd-CVvF1HpM.js";import"./Upload01-BzGPegBj.js";import"./XClose-BLvk3pvY.js";import"./index-BkAoKVx8.js";import"./index-BdQq_4o_.js";import"./label-DF2jcg2U.js";import"./use-connection-Yjy9d1tW.js";import"./use-collections-Dmxer7H8.js";import"./registry-utils-Cz03qmOa.js";import"./workflow-CBGVBFDu.js";import"./collections-BsFnKFn5.js";import"./use-install-from-registry-Du1Xu864.js";import"./extract-connection-data-NSojo21r.js";import"./constants-BqeudQjB.js";import"./generate-id-Dyweu44Y.js";import"./collection-display-button-ZvHBt_eA.js";import"./dropdown-menu-BK29e1o0.js";import"./badge-DGQ0gFlp.js";import"./collection-search-fzGK39qM.js";import"./breadcrumb-BBMvtdg-.js";import"./collection-table-wrapper-DsHGysPH.js";import"./table-w828HACk.js";import"./checkbox-Dzy6oaRF.js";import"./use-members-BZM-R1qG.js";import"./alert-dialog-Bke1xnyn.js";import"./empty-state-B8NhLY9v.js";import"./textarea-D30IrLHN.js";import"./command-BnzawGxz.js";import"./index-BZyxukAe.js";function Ze(e){const t=w.c(26),{activeSection:n,onNavigate:o}=e,{data:a}=ne.useSession(),r=a?.user,l=r?.image,c=r?.name??"Profile",m=r?.name??"U";let f;t[0]!==m||t[1]!==l?(f=s.jsx(pe,{url:l,fallback:m,shape:"circle",size:"2xs",className:"size-4 shrink-0"}),t[0]=m,t[1]=l,t[2]=f):f=t[2];let i;t[3]!==c||t[4]!==f?(i={key:"account.profile",label:c,icon:f},t[3]=c,t[4]=f,t[5]=i):i=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p={key:"account.preferences",label:"Preferences",icon:s.jsx(Me,{size:14})},t[6]=p):p=t[6];let x;t[7]!==i?(x=[i,p],t[7]=i,t[8]=x):x=t[8];const g=x;let u;t[9]===Symbol.for("react.memo_cache_sentinel")?(u={key:"org.general",label:"General",icon:s.jsx(ze,{size:14})},t[9]=u):u=t[9];let d;t[10]===Symbol.for("react.memo_cache_sentinel")?(d={key:"org.plugins",label:"Features",icon:s.jsx(Fe,{size:14})},t[10]=d):d=t[10];let j;t[11]===Symbol.for("react.memo_cache_sentinel")?(j={key:"org.ai-providers",label:"AI Providers",icon:s.jsx($e,{size:14})},t[11]=j):j=t[11];let h;t[12]===Symbol.for("react.memo_cache_sentinel")?(h=[u,d,j,{key:"org.members",label:"Members",icon:s.jsx(Ae,{size:14})}],t[12]=h):h=t[12];const _=h;let b;t[13]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Account"}),t[13]=b):b=t[13];let y;t[14]!==g||t[15]!==n||t[16]!==o?(y=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[b,g.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:V("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===v.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:v.icon}),s.jsx("span",{className:"truncate",children:v.label})]},v.key))]}),t[14]=g,t[15]=n,t[16]=o,t[17]=y):y=t[17];let N;t[18]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Organization"}),t[18]=N):N=t[18];let S;t[19]!==n||t[20]!==o?(S=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[N,_.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:V("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===v.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:v.icon}),s.jsx("span",{className:"truncate",children:v.label})]},v.key))]}),t[19]=n,t[20]=o,t[21]=S):S=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","2.186.8"]})}),t[22]=C):C=t[22];let k;return t[23]!==y||t[24]!==S?(k=s.jsxs("div",{className:"w-full sm:w-52 shrink-0 sm:border-r border-border bg-sidebar/50 overflow-y-auto py-3 flex flex-col gap-4 flex-1",children:[y,S,C]}),t[23]=y,t[24]=S,t[25]=k):k=t[25],k}function et(){const e=w.c(32),{data:t}=ne.useSession(),[n,o]=I.useState(!1),a=t?.user,r=a?.image;let l;e[0]!==a?(l=()=>{a?.id&&navigator.clipboard.writeText(a.id).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)})},e[0]=a,e[1]=l):l=e[1];const c=l;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Profile"})}),e[2]=m):m=e[2];const f=a?.name??"U";let i;e[3]!==f||e[4]!==r?(i=s.jsx(pe,{url:r,fallback:f,shape:"circle",size:"xl",className:"size-16 shrink-0"}),e[3]=f,e[4]=r,e[5]=i):i=e[5];const p=a?.name??"User";let x;e[6]!==p?(x=s.jsx("span",{className:"text-sm font-semibold text-foreground truncate",children:p}),e[6]=p,e[7]=x):x=e[7];const g=a?.email;let u;e[8]!==g?(u=s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:g}),e[8]=g,e[9]=u):u=e[9];let d;e[10]!==x||e[11]!==u?(d=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[x,u]}),e[10]=x,e[11]=u,e[12]=d):d=e[12];let j;e[13]!==i||e[14]!==d?(j=s.jsxs("div",{className:"flex items-center gap-4",children:[i,d]}),e[13]=i,e[14]=d,e[15]=j):j=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"User ID"}),e[16]=h):h=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("p",{className:"text-sm text-muted-foreground",children:"User ID"}),e[17]=_):_=e[17];const b=a?.id;let y;e[18]!==b?(y=s.jsx("span",{className:"font-mono text-sm",children:b}),e[18]=b,e[19]=y):y=e[19];let N;e[20]!==n?(N=n?s.jsx(Ue,{size:14,className:"text-green-600 shrink-0"}):s.jsx(qe,{size:14,className:"shrink-0 opacity-70 group-hover:opacity-100 transition-opacity"}),e[20]=n,e[21]=N):N=e[21];let S;e[22]!==c||e[23]!==y||e[24]!==N?(S=s.jsx(Le,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:c,className:"group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[y,N]})}),e[22]=c,e[23]=y,e[24]=N,e[25]=S):S=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Ee,{side:"left",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[26]=C):C=e[26];let k;e[27]!==S?(k=s.jsxs("div",{className:"flex flex-col",children:[h,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[_,s.jsx(Te,{children:s.jsxs(De,{children:[S,C]})})]})]}),e[27]=S,e[28]=k):k=e[28];let v;return e[29]!==k||e[30]!==j?(v=s.jsxs("div",{className:"flex flex-col gap-8",children:[m,j,k]}),e[29]=k,e[30]=j,e[31]=v):v=e[31],v}function K(e){const t=w.c(27),{icon:n,label:o,description:a,control:r,onClick:l,disabled:c}=e,m=c?void 0:l,f=l?"button":void 0,i=l&&!c?0:void 0;let p;t[0]!==c||t[1]!==l?(p=l&&!c?N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),l())}:void 0,t[0]=c,t[1]=l,t[2]=p):p=t[2];const x=l&&!c?"pointer":void 0;let g;t[3]!==x?(g={cursor:x},t[3]=x,t[4]=g):g=t[4];let u;t[5]!==n?(u=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:n}),t[5]=n,t[6]=u):u=t[6];let d;t[7]!==o?(d=s.jsx("p",{className:"text-sm font-medium text-foreground",children:o}),t[7]=o,t[8]=d):d=t[8];let j;t[9]!==a?(j=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:a}),t[9]=a,t[10]=j):j=t[10];let h;t[11]!==d||t[12]!==j?(h=s.jsxs("div",{className:"min-w-0",children:[d,j]}),t[11]=d,t[12]=j,t[13]=h):h=t[13];let _;t[14]!==h||t[15]!==u?(_=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[u,h]}),t[14]=h,t[15]=u,t[16]=_):_=t[16];let b;t[17]!==r?(b=s.jsx("div",{onClick:tt,className:"shrink-0",children:r}),t[17]=r,t[18]=b):b=t[18];let y;return t[19]!==m||t[20]!==_||t[21]!==b||t[22]!==f||t[23]!==i||t[24]!==p||t[25]!==g?(y=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0",onClick:m,role:f,tabIndex:i,onKeyDown:p,style:g,children:[_,b]}),t[19]=m,t[20]=_,t[21]=b,t[22]=f,t[23]=i,t[24]=p,t[25]=g,t[26]=y):y=t[26],y}function tt(e){return e.stopPropagation()}function de(){const e=w.c(47),[t,n]=Ce();let o;e[0]!==n?(o=async P=>{if(P&&await Notification.requestPermission()!=="granted"){oe.error("Notifications denied. Please enable them in your browser settings."),n(lt);return}n(z=>({...z,enableNotifications:P}))},e[0]=n,e[1]=o):o=e[1];const a=o;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Preferences"})}),e[2]=r):r=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ke,{size:16}),e[3]=l):l=e[3];let c;e[4]!==n?(c=()=>n(ot),e[4]=n,e[5]=c):c=e[5];let m;e[6]!==n?(m=P=>n(z=>({...z,devMode:P})),e[6]=n,e[7]=m):m=e[7];let f;e[8]!==t.devMode||e[9]!==m?(f=s.jsx(Y,{checked:t.devMode,onCheckedChange:m}),e[8]=t.devMode,e[9]=m,e[10]=f):f=e[10];let i;e[11]!==c||e[12]!==f?(i=s.jsx(K,{icon:l,label:"Developer Mode",description:"Show technical details like JSON input/output for tool calls.",onClick:c,control:f}),e[11]=c,e[12]=f,e[13]=i):i=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ie,{size:16}),e[14]=p):p=e[14];let x;e[15]!==a||e[16]!==t.enableNotifications?(x=s.jsx(K,{icon:p,label:"Notifications",description:"Play a sound and show a notification when chat messages complete while the app is unfocused.",disabled:typeof Notification>"u",onClick:()=>a(!t.enableNotifications),control:s.jsx(Y,{disabled:typeof Notification>"u",checked:t.enableNotifications,onCheckedChange:a})}),e[15]=a,e[16]=t.enableNotifications,e[17]=x):x=e[17];let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Ve,{size:16}),e[18]=g):g=e[18];let u;e[19]!==n?(u=()=>n(st),e[19]=n,e[20]=u):u=e[20];let d;e[21]!==n?(d=P=>n(z=>({...z,experimentalAutomations:P})),e[21]=n,e[22]=d):d=e[22];let j;e[23]!==t.experimentalAutomations||e[24]!==d?(j=s.jsx(Y,{checked:t.experimentalAutomations,onCheckedChange:d}),e[23]=t.experimentalAutomations,e[24]=d,e[25]=j):j=e[25];let h;e[26]!==u||e[27]!==j?(h=s.jsx(K,{icon:g,label:"Experimental: Automations",description:"Enable the Automations feature in the sidebar. This is an experimental feature under active development.",onClick:u,control:j}),e[26]=u,e[27]=j,e[28]=h):h=e[28];let _;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Oe,{size:16}),e[29]=_):_=e[29];let b;e[30]!==n?(b=P=>n(z=>({...z,toolApprovalLevel:P})),e[30]=n,e[31]=b):b=e[31];let y;e[32]===Symbol.for("react.memo_cache_sentinel")?(y={readonly:"Skip read-only",auto:"Auto-approve all",plan:"Plan mode"},e[32]=y):y=e[32];const N=y[t.toolApprovalLevel];let S;e[33]!==N?(S=s.jsx(Be,{className:"w-36",children:s.jsx("span",{children:N})}),e[33]=N,e[34]=S):S=e[34];let C;e[35]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(H,{value:"readonly",textValue:"Skip read-only",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Skip read-only"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools, ask for others"})]})}),e[35]=C):C=e[35];let k;e[36]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(H,{value:"auto",textValue:"Auto-approve all",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Auto-approve all"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all tools without approval"})]})}),e[36]=k):k=e[36];let v;e[37]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs(Ge,{children:[C,k,s.jsx(H,{value:"plan",textValue:"Plan mode",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Plan mode"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Read-only exploration, then propose a plan"})]})})]}),e[37]=v):v=e[37];let A;e[38]!==t.toolApprovalLevel||e[39]!==b||e[40]!==S?(A=s.jsx(K,{icon:_,label:"Tool Approval",description:"Choose when to require approval before tools execute.",control:s.jsxs(Re,{value:t.toolApprovalLevel,onValueChange:b,children:[S,v]})}),e[38]=t.toolApprovalLevel,e[39]=b,e[40]=S,e[41]=A):A=e[41];let $;return e[42]!==h||e[43]!==A||e[44]!==i||e[45]!==x?($=s.jsxs("div",{className:"flex flex-col gap-6",children:[r,s.jsxs("div",{className:"flex flex-col",children:[i,x,h,A]})]}),e[42]=h,e[43]=A,e[44]=i,e[45]=x,e[46]=$):$=e[46],$}function st(e){return{...e,experimentalAutomations:!e.experimentalAutomations}}function ot(e){return{...e,devMode:!e.devMode}}function lt(e){return{...e,enableNotifications:!1}}const nt=he({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:W().optional()});function it(){const e=ie(),{org:t,project:n}=re(),o=ge(),[a,r]=I.useState(!1),l=je({resolver:be(nt),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),c=Qe({mutationFn:async i=>{const p={name:i.name,slug:i.slug};i.logo&&(p.logo=i.logo);const x=await ne.organization.update({organizationId:t.id,data:p});if(x?.error)throw new Error(x.error.message||"Failed to update organization");return x},onSuccess:i=>{o.invalidateQueries({queryKey:ae.organizations()}),o.invalidateQueries({queryKey:ae.activeOrganization(t.slug)}),oe.success("Organization settings updated successfully"),i?.data?.slug&&i.data.slug!==t.slug&&e({to:"/$org/$project/settings",params:{org:i.data.slug,project:n.slug}})},onError:i=>{oe.error(i instanceof Error?i.message:"Failed to update organization")},onSettled:()=>{r(!1)}}),m=i=>{r(!0),c.mutate(i)},f=l.formState.isDirty;return s.jsx(Je,{...l,children:s.jsxs("form",{onSubmit:l.handleSubmit(m),className:"space-y-6",children:[s.jsx(X,{control:l.control,name:"name",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Organization Name"}),s.jsx(te,{children:s.jsx(me,{placeholder:"My Organization",...i,disabled:a})}),s.jsx(se,{})]})}),s.jsx(X,{control:l.control,name:"slug",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Organization Slug"}),s.jsx(te,{children:s.jsx(me,{placeholder:"my-organization",...i,disabled:a,onChange:p=>{const x=p.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");i.onChange(x)}})}),s.jsx(We,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(se,{})]})}),s.jsx(X,{control:l.control,name:"logo",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Logo"}),s.jsx(te,{children:s.jsx(Ye,{value:i.value,onChange:i.onChange,name:l.watch("name"),disabled:a})}),s.jsx(se,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(Q,{type:"submit",disabled:!f||a,className:"min-w-24",children:a?"Saving...":"Save Changes"}),f&&s.jsx(Q,{type:"button",variant:"outline",onClick:()=>l.reset(),disabled:a,children:"Cancel"})]})]})})}function rt(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Organization"})}),s.jsx(it,{})]}),e[0]=t):t=e[0],t}function at(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Xe,{}),e[0]=t):t=e[0],t}function xe(){const e=w.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(G,{className:"h-6 w-48"}),n=s.jsx(G,{className:"h-4 w-80"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[t,n,s.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[s.jsx(G,{className:"h-12 w-full"}),s.jsx(G,{className:"h-12 w-full"})]})]}),e[2]=o):o=e[2],o}function ct(e){const t=w.c(14),{projectSlug:n,children:o}=e,{org:a}=re(),{data:r,isLoading:l}=ue(a.id,n);if(l||!r){let p;return t[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xe,{}),t[0]=p):p=t[0],p}const c=n===D;let m;t[1]!==r.description||t[2]!==r.enabledPlugins||t[3]!==r.id||t[4]!==r.name||t[5]!==r.organizationId||t[6]!==r.slug||t[7]!==r.ui||t[8]!==c?(m={id:r.id,organizationId:r.organizationId,slug:r.slug,name:r.name,description:r.description,enabledPlugins:r.enabledPlugins,ui:r.ui,isOrgAdmin:c},t[1]=r.description,t[2]=r.enabledPlugins,t[3]=r.id,t[4]=r.name,t[5]=r.organizationId,t[6]=r.slug,t[7]=r.ui,t[8]=c,t[9]=m):m=t[9];const f=m;let i;return t[10]!==o||t[11]!==f||t[12]!==a?(i=s.jsx(fe,{org:a,project:f,children:o}),t[10]=o,t[11]=f,t[12]=a,t[13]=i):i=t[13],i}function mt(e){const t=w.c(7),{section:n}=e;switch(n){case"account.profile":{let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(et,{}),t[0]=o):o=t[0],o}case"account.preferences":{let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(de,{}),t[1]=o):o=t[1],o}case"org.general":{let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(rt,{}),t[2]=o):o=t[2],o}case"org.plugins":{let o;return t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ct,{projectSlug:D,children:s.jsx(He,{})}),t[3]=o):o=t[3],o}case"org.ai-providers":{let o;return t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Pe,{}),t[4]=o):o=t[4],o}case"org.members":{let o;return t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(at,{}),t[5]=o):o=t[5],o}default:{let o;return t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(de,{}),t[6]=o):o=t[6],o}}}const dt={"account.profile":"Profile","account.preferences":"Preferences","org.general":"General","org.plugins":"Features","org.ai-providers":"AI Providers","org.billing":"Billing","org.members":"Members"};function ft(){const e=w.c(49),{isOpen:t,activeSection:n,open:o,close:a}=we(),[r,l]=I.useState(!1),[c,m]=I.useState(t);c!==t&&(m(t),l(t));let f;e[0]!==o?(f=J=>{o(J),l(!0)},e[0]=o,e[1]=f):f=e[1];const i=f;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{l(!1)},e[2]=p):p=e[2];const x=p;let g;e[3]!==a?(g=J=>{J||(a(),l(!1))},e[3]=a,e[4]=g):g=e[4];const u=g;let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Se,{className:"sr-only",children:"Settings"}),e[5]=d):d=e[5];const j=r?"hidden":"flex";let h;e[6]!==j?(h=V(j,"sm:flex flex-col w-full sm:w-auto"),e[6]=j,e[7]=h):h=e[7];let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("span",{className:"text-base font-semibold",children:"Settings"}),e[8]=_):_=e[8];let b;e[9]!==u?(b=()=>u(!1),e[9]=u,e[10]=b):b=e[10];let y,N;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ce,{size:16}),N=s.jsx("span",{className:"sr-only",children:"Close"}),e[11]=y,e[12]=N):(y=e[11],N=e[12]);let S;e[13]!==b?(S=s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border sm:hidden",children:[_,s.jsxs("button",{type:"button",onClick:b,className:"rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity",children:[y,N]})]}),e[13]=b,e[14]=S):S=e[14];let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"w-full sm:w-52 shrink-0 border-r border-border"}),e[15]=C):C=e[15];let k;e[16]!==n||e[17]!==i?(k=s.jsx(I.Suspense,{fallback:C,children:s.jsx(Ze,{activeSection:n,onNavigate:i})}),e[16]=n,e[17]=i,e[18]=k):k=e[18];let v;e[19]!==S||e[20]!==k||e[21]!==h?(v=s.jsxs("div",{className:h,children:[S,k]}),e[19]=S,e[20]=k,e[21]=h,e[22]=v):v=e[22];const A=r?"flex":"hidden";let $;e[23]!==A?($=V(A,"sm:flex flex-1 min-w-0 overflow-y-auto relative flex-col overflow-hidden"),e[23]=A,e[24]=$):$=e[24];let P;e[25]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs("button",{type:"button",onClick:x,className:"rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity",children:[s.jsx(ke,{size:16}),s.jsx("span",{className:"sr-only",children:"Back"})]}),e[25]=P):P=e[25];const z=dt[n];let O;e[26]!==z?(O=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-border sm:hidden",children:[P,s.jsx("span",{className:"text-base font-semibold",children:z})]}),e[26]=z,e[27]=O):O=e[27];let M;e[28]!==u?(M=()=>u(!1),e[28]=u,e[29]=M):M=e[29];let U,q;e[30]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(ce,{size:16}),q=s.jsx("span",{className:"sr-only",children:"Close"}),e[30]=U,e[31]=q):(U=e[30],q=e[31]);let F;e[32]!==M?(F=s.jsxs("button",{type:"button",onClick:M,className:"hidden sm:block absolute top-4 right-4 z-10 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-ring",children:[U,q]}),e[32]=M,e[33]=F):F=e[33];let R;e[34]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(xe,{}),e[34]=R):R=e[34];let L;e[35]!==n?(L=s.jsx("div",{className:"p-5 sm:p-8 flex-1 overflow-y-auto",children:s.jsx(I.Suspense,{fallback:R,children:s.jsx(mt,{section:n})})}),e[35]=n,e[36]=L):L=e[36];let E;e[37]!==$||e[38]!==O||e[39]!==F||e[40]!==L?(E=s.jsxs("div",{className:$,children:[O,F,L]}),e[37]=$,e[38]=O,e[39]=F,e[40]=L,e[41]=E):E=e[41];let T;e[42]!==v||e[43]!==E?(T=s.jsxs(Ne,{className:"sm:max-w-[1100px] h-[100dvh] sm:h-[85vh] max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-[1100px] rounded-none sm:rounded-xl p-0 overflow-hidden flex flex-col gap-0 border-0 sm:border",closeButtonClassName:"hidden",children:[d,s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[v,E]})]}),e[42]=v,e[43]=E,e[44]=T):T=e[44];let B;return e[45]!==u||e[46]!==t||e[47]!==T?(B=s.jsx(_e,{open:t,onOpenChange:u,children:T}),e[45]=u,e[46]=t,e[47]=T,e[48]=B):B=e[48],B}function ut(e){const t=w.c(12),{projectSlug:n,orgSlug:o,error:a}=e,r=ie();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("h1",{className:"text-xl font-semibold",children:"Failed to load project"}),t[0]=l):l=t[0];let c;t[1]!==n?(c=s.jsxs("p",{className:"text-muted-foreground text-center",children:['There was an error loading the project "',n,'".']}),t[1]=n,t[2]=c):c=t[2];let m;t[3]!==a.message?(m=s.jsx("p",{className:"text-sm text-muted-foreground",children:a.message}),t[3]=a.message,t[4]=m):m=t[4];let f;t[5]!==r||t[6]!==o?(f=s.jsx(Q,{variant:"link",onClick:()=>r({to:"/$org/$project",params:{org:o,project:D}}),children:"Go to organization home"}),t[5]=r,t[6]=o,t[7]=f):f=t[7];let i;return t[8]!==c||t[9]!==m||t[10]!==f?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[l,c,m,f]}),t[8]=c,t[9]=m,t[10]=f,t[11]=i):i=t[11],i}function pt(e){const t=w.c(9),{projectSlug:n,orgSlug:o}=e,a=ie();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("h1",{className:"text-xl font-semibold",children:"Project not found"}),t[0]=r):r=t[0];let l;t[1]!==n?(l=s.jsxs("p",{className:"text-muted-foreground text-center",children:['The project "',n,'" does not exist in this organization.']}),t[1]=n,t[2]=l):l=t[2];let c;t[3]!==a||t[4]!==o?(c=s.jsx(Q,{variant:"link",onClick:()=>a({to:"/$org/$project",params:{org:o,project:D}}),children:"Go to organization home"}),t[3]=a,t[4]=o,t[5]=c):c=t[5];let m;return t[6]!==l||t[7]!==c?(m=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[r,l,c]}),t[6]=l,t[7]=c,t[8]=m):m=t[8],m}function xt(){const e=w.c(23);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=ye(t),{org:o}=re(),a=n.org,r=n.project,{data:l,isLoading:c,error:m}=ue(o.id,r);if(c){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(le,{}),e[1]=d):d=e[1],d}if(m){let d;return e[2]!==m||e[3]!==a||e[4]!==r?(d=s.jsx(ut,{projectSlug:r,orgSlug:a,error:m}),e[2]=m,e[3]=a,e[4]=r,e[5]=d):d=e[5],d}if(!l){let d;return e[6]!==a||e[7]!==r?(d=s.jsx(pt,{projectSlug:r,orgSlug:a}),e[6]=a,e[7]=r,e[8]=d):d=e[8],d}const f=l.slug===D;let i;e[9]!==l.description||e[10]!==l.enabledPlugins||e[11]!==l.id||e[12]!==l.name||e[13]!==l.organizationId||e[14]!==l.slug||e[15]!==l.ui||e[16]!==f?(i={id:l.id,organizationId:l.organizationId,slug:l.slug,name:l.name,description:l.description,enabledPlugins:l.enabledPlugins,ui:l.ui,isOrgAdmin:f},e[9]=l.description,e[10]=l.enabledPlugins,e[11]=l.id,e[12]=l.name,e[13]=l.organizationId,e[14]=l.slug,e[15]=l.ui,e[16]=f,e[17]=i):i=e[17];const p=i;let x,g;e[18]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(I.Suspense,{fallback:s.jsx(le,{}),children:s.jsx(ve,{})}),g=s.jsx(ft,{}),e[18]=x,e[19]=g):(x=e[18],g=e[19]);let u;return e[20]!==p||e[21]!==o?(u=s.jsxs(fe,{org:o,project:p,children:[x,g]}),e[20]=p,e[21]=o,e[22]=u):u=e[22],u}function Ts(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(I.Suspense,{fallback:s.jsx(le,{}),children:s.jsx(xt,{})}),e[0]=t):t=e[0],t}export{Ts as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as _,j as n,y as J,B as G,c as V,x as W,w as M,K as q,bn as D,bo as $,d as Q}from"./index-
|
|
1
|
+
import{r as _,j as n,y as J,B as G,c as V,x as W,w as M,K as q,bn as D,bo as $,d as Q}from"./index-D49VqQ7Q.js";import{u as Y}from"./useQuery-CvkH2gG1.js";import{u as H}from"./useMutation-BTUmJffP.js";import{u as X,a as Z}from"./constants-TLV7MTwP.js";import{S as ee}from"./switch-yIP7Yj81.js";import{L as te}from"./label-DF2jcg2U.js";import{n as ne}from"./Container-CMPDG7Cp.js";import{b as se}from"./use-connection-Yjy9d1tW.js";import{d as ie,h as re}from"./registry-utils-Cz03qmOa.js";import{u as oe}from"./use-install-from-registry-Du1Xu864.js";import{i as le}from"./Loading01-BVCg1O_G.js";import{s as ae}from"./Plus-DcVtqCMV.js";import{S as ce,a as de,b as ue,c as me,d as z}from"./select-DaOZXaTi.js";function ge({value:o,onValueChange:e,placeholder:r="Select a connection...",binding:l,bindingType:a,onAddNew:y,className:x,disabled:h=!1}){const[j,d]=_.useState(!1),{installByBinding:N,isInstalling:S}=oe(),b=j||S,u=se(),w=ie({connections:u,binding:typeof l=="string"?l:void 0}),C=!l||!u?u??[]:typeof l=="string"?w:Array.isArray(l)&&l.length>0?u.filter(t=>re(t,l)):u,m=(()=>{if(!a?.startsWith("@"))return null;const[t,s]=a.replace("@","").split("/");return t&&s?{scope:t,appName:s}:null})(),P=(()=>{let t=C;const s=Array.isArray(l)&&l.length>0;if(m&&!s&&(t=t.filter(i=>{const c=i.app_name,p=i.metadata?.scopeName;return c===m.appName&&p===m.scope})),o&&!t.some(i=>i.id===o)){const i=u?.find(c=>c.id===o);if(i)return[i,...t]}return t})(),v=a?.startsWith("@"),A=async()=>{if(v&&a){d(!0);try{const t=await N(a);t&&e(t.id)}finally{d(!1)}return}y?.()},g=P.find(t=>t.id===o);return n.jsxs(ce,{value:o??"none",onValueChange:t=>e(t==="none"?null:t),disabled:h,children:[n.jsx(de,{size:"sm",className:J("w-[200px]",x),children:n.jsx(ue,{placeholder:r,children:g?n.jsxs("div",{className:"flex items-center gap-2",children:[g.icon?n.jsx("img",{src:g.icon,alt:g.title,className:"w-4 h-4 rounded shrink-0"}):n.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary shrink-0",children:g.title.slice(0,1).toUpperCase()}),n.jsx("span",{className:"truncate",children:g.title})]}):r})}),n.jsxs(me,{children:[n.jsx(z,{value:"none",children:"No connection"}),P.length===0?n.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No compatible connections found"}):P.map(t=>n.jsx(z,{value:t.id,children:n.jsxs("div",{className:"flex items-center gap-2",children:[t.icon?n.jsx("img",{src:t.icon,alt:t.title,className:"w-4 h-4 rounded"}):n.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:t.title.slice(0,1).toUpperCase()}),n.jsx("span",{children:t.title})]})},t.id)),(y||v)&&n.jsx("div",{className:"border-t border-border",children:n.jsx(G,{onPointerDown:t=>t.stopPropagation(),onClick:t=>{t.preventDefault(),t.stopPropagation(),A()},disabled:b||h,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:b?n.jsxs(n.Fragment,{children:[n.jsx(le,{size:16,className:"animate-spin"}),n.jsx("span",{children:"Connecting..."})]}):n.jsxs(n.Fragment,{children:[n.jsx(ae,{size:16}),n.jsx("span",{children:"Add Connection"})]})})})]})]})}const pe=o=>{if(!o||typeof o!="object")return!1;const e=o;return e.type==="text"&&typeof e.text=="string"&&e.text.trim().toLowerCase().startsWith("error")},K=o=>{const e=o.structuredContent??o,r=e&&typeof e=="object"?e:null,l=r?.content?.[0]?.text&&typeof r.content[0].text=="string"?r.content[0].text:null;if(r?.isError)throw new Error(l??"Tool call failed");if(pe(e))throw new Error(e.text);return e};function fe(o){return o.requiresMcpBinding===!0?!0:o.binding!==void 0}function xe(o){const e=Q.c(57),{plugin:r,isEnabled:l,isSaving:a,pendingBinding:y,description:x,label:h,icon:j,projectId:d,client:N,onBindingChange:S,onToggle:b}=o;let u;e[0]!==r?(u=fe(r),e[0]=r,e[1]=u):u=e[1];const w=u;let C;e[2]!==r.id||e[3]!==d?(C=q.projectPluginConfig(d??"",r.id),e[2]=r.id,e[3]=d,e[4]=C):C=e[4];let m;e[5]!==N||e[6]!==r.id||e[7]!==d?(m=async()=>{if(!d)throw new Error("Project ID is required to load plugin config.");const O=await N.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:d,pluginId:r.id}});return K(O)},e[5]=N,e[6]=r.id,e[7]=d,e[8]=m):m=e[8];const P=!!d&&w;let v;e[9]!==C||e[10]!==m||e[11]!==P?(v={queryKey:C,queryFn:m,enabled:P},e[9]=C,e[10]=m,e[11]=P,e[12]=v):v=e[12];const{data:A,isLoading:g}=Y(v),t=A?.config?.connectionId??null,s=y!==void 0?y:t;let i;e[13]!==l||e[14]!==a||e[15]!==b||e[16]!==r.id?(i=()=>!a&&b(r.id,!l),e[13]=l,e[14]=a,e[15]=b,e[16]=r.id,e[17]=i):i=e[17];const c=a?void 0:"pointer";let p;e[18]!==c?(p={cursor:c},e[18]=c,e[19]=p):p=e[19];let f;e[20]!==j?(f=j&&n.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0 [&>svg]:size-4",children:j}),e[20]=j,e[21]=f):f=e[21];let I;e[22]!==h?(I=n.jsx("p",{className:"text-sm font-medium text-foreground",children:h}),e[22]=h,e[23]=I):I=e[23];let E;e[24]!==x?(E=x&&n.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:x}),e[24]=x,e[25]=E):E=e[25];let B;e[26]!==I||e[27]!==E?(B=n.jsxs("div",{className:"min-w-0",children:[I,E]}),e[26]=I,e[27]=E,e[28]=B):B=e[28];let k;e[29]!==B||e[30]!==f?(k=n.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[f,B]}),e[29]=B,e[30]=f,e[31]=k):k=e[31];let T;e[32]!==b||e[33]!==r.id?(T=O=>b(r.id,O),e[32]=b,e[33]=r.id,e[34]=T):T=e[34];let F;e[35]!==l||e[36]!==a||e[37]!==T?(F=n.jsx("div",{onClick:je,className:"shrink-0",children:n.jsx(ee,{checked:l,onCheckedChange:T,disabled:a})}),e[35]=l,e[36]=a,e[37]=T,e[38]=F):F=e[38];let L;e[39]!==k||e[40]!==F?(L=n.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[k,F]}),e[39]=k,e[40]=F,e[41]=L):L=e[41];let U;e[42]!==g||e[43]!==l||e[44]!==a||e[45]!==w||e[46]!==S||e[47]!==r.binding||e[48]!==r.id||e[49]!==s||e[50]!==t?(U=l&&w&&n.jsx("div",{className:"pb-4 pl-7 space-y-2",onClick:he,children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(te,{className:"text-xs text-muted-foreground w-24",children:"Connection"}),n.jsx(ge,{value:s??null,onValueChange:O=>S(r.id,O,t),binding:r.binding,placeholder:"Select connection...",className:"w-56",disabled:a||g})]})}),e[42]=g,e[43]=l,e[44]=a,e[45]=w,e[46]=S,e[47]=r.binding,e[48]=r.id,e[49]=s,e[50]=t,e[51]=U):U=e[51];let R;return e[52]!==L||e[53]!==U||e[54]!==i||e[55]!==p?(R=n.jsxs("div",{className:"flex flex-col border-b border-border last:border-0",onClick:i,style:p,children:[L,U]}),e[52]=L,e[53]=U,e[54]=i,e[55]=p,e[56]=R):R=e[56],R}function he(o){return o.stopPropagation()}function je(o){return o.stopPropagation()}function be(){const{org:o,project:e}=V(),r=W(),l=X({connectionId:Z,orgId:o.id}),[a,y]=_.useState({}),[x,h]=_.useState({}),[j,d]=_.useState(!1),N=e.enabledPlugins??[],S=t=>{const s=a[t];return s!==void 0?s:N.includes(t)},b=()=>{const t=new Set(N);for(const[s,i]of Object.entries(a))i?t.add(s):t.delete(s);return Array.from(t)},u=Object.keys(a).length>0||Object.keys(x).length>0,w=(t,s)=>{const i=N.includes(t);y(s===i?c=>{const{[t]:p,...f}=c;return f}:c=>({...c,[t]:s}))},C=(t,s,i)=>{if(s===i){h(c=>{const{[t]:p,...f}=c;return f});return}h(c=>({...c,[t]:s}))},m=H({mutationFn:async t=>{const s=[];if(t.updatePlugins){const i=await l.callTool({name:"PROJECT_UPDATE",arguments:{projectId:e.id,enabledPlugins:t.enabledPlugins}});s.push(K(i))}if(t.bindingUpdates.length>0){const i=await Promise.all(t.bindingUpdates.map(async({pluginId:c,connectionId:p,settings:f})=>{const I=await l.callTool({name:"PROJECT_PLUGIN_CONFIG_UPDATE",arguments:{projectId:e.id,pluginId:c,connectionId:p,settings:f}});return K(I)}));s.push(...i)}return s},onSuccess:(t,s)=>{s.updatePlugins&&(r.invalidateQueries({queryKey:q.project(o.id,e.slug)}),r.invalidateQueries({queryKey:q.projects(o.id)})),s.bindingUpdates.forEach(({pluginId:i})=>{r.invalidateQueries({queryKey:q.projectPluginConfig(e.id??"",i)})}),y({}),h({}),M.success("Plugins updated successfully")},onError:t=>{M.error("Failed to update plugins: "+(t instanceof Error?t.message:"Unknown error"))},onSettled:()=>{d(!1)}}),P=()=>{d(!0);const t=Object.keys(x).map(s=>{const i=x[s];return{pluginId:s,connectionId:i!==void 0?i:void 0}});m.mutate({enabledPlugins:b(),updatePlugins:Object.keys(a).length>0,bindingUpdates:t})},v=()=>{y({}),h({})},A=t=>{const s=$.find(i=>i.pluginId===t);return s?{label:s.label,icon:s.items[0]?.icon}:null},g=t=>D.find(i=>i.id===t)?.description??null;return D.length===0?n.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}):n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"flex flex-col",children:D.map(t=>{const s=A(t.id),i=g(t.id),c=S(t.id);return n.jsx(xe,{plugin:t,isEnabled:c,isSaving:j,pendingBinding:x[t.id],description:i,label:s?.label??t.id,icon:s?.icon??n.jsx(ne,{size:14}),projectId:e.id,client:l,onBindingChange:C,onToggle:w},t.id)})}),n.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[n.jsx(G,{variant:"outline",onClick:v,disabled:!u||j,children:"Cancel"}),n.jsx(G,{onClick:P,disabled:!u||j,className:"min-w-24",children:j?"Saving...":"Save Changes"})]})]})}function Le(){const o=Q.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"flex flex-col gap-6",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Features"}),n.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Extend your project with built-in capabilities that activate automatically on any connection that supports them."})]}),n.jsx(be,{})]}),o[0]=e):e=o[0],e}export{Le as P};
|