@decocms/mesh 2.85.0 → 2.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-Dv-pGVbe.js → AlertCircle-CMI4YiF8.js} +1 -1
- package/dist/client/assets/AlertOctagon-BGF96GWN.js +1 -0
- package/dist/client/assets/{ArrowLeft-DmjHPtds.js → ArrowLeft-F0qy4hoF.js} +1 -1
- package/dist/client/assets/{ArrowUp-CNNhUiSK.js → ArrowUp-Cr88yR39.js} +1 -1
- package/dist/client/assets/{Calendar-DvFZbDSm.js → Calendar-DedByLtP.js} +1 -1
- package/dist/client/assets/{Check-D0-doi3D.js → Check-BVqX6VG5.js} +1 -1
- package/dist/client/assets/{CheckCircle-B7BcMa43.js → CheckCircle-ByeMMv-P.js} +1 -1
- package/dist/client/assets/{CheckDone01-BFFxKfwE.js → CheckDone01-CPH_fc9F.js} +1 -1
- package/dist/client/assets/{ChevronDown-DhDohZgY.js → ChevronDown-C753dD5M.js} +1 -1
- package/dist/client/assets/{ChevronRight-YlJxRSER.js → ChevronRight-sGXl7Bvf.js} +1 -1
- package/dist/client/assets/{Code01-BALFVt_U.js → Code01-Cz0GM-Ln.js} +1 -1
- package/dist/client/assets/{Copy01-CdI1uSIx.js → Copy01-Bl99tdzP.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-BBNdFqaM.js → DotsHorizontal-CWs48tCN.js} +1 -1
- package/dist/client/assets/{DotsVertical-eKFCZgNz.js → DotsVertical-CWQ3-YKt.js} +1 -1
- package/dist/client/assets/{Download01-ByYU943d.js → Download01-CiBv1aKv.js} +1 -1
- package/dist/client/assets/{Edit01-BLqaLVsN.js → Edit01-DkLw19ks.js} +1 -1
- package/dist/client/assets/Eye-BiLrFCnc.js +1 -0
- package/dist/client/assets/{File02-ChsZyHSt.js → File02-DvBeqAHS.js} +1 -1
- package/dist/client/assets/{File06-ZuO2Pzkt.js → File06-qYvBtC4a.js} +1 -1
- package/dist/client/assets/{FilterLines-kdqwOMYU.js → FilterLines-BWCVYnM7.js} +1 -1
- package/dist/client/assets/{Globe02-R_O247ek.js → Globe02-Dh-HvcG9.js} +1 -1
- package/dist/client/assets/{Grid01-Hl_fTaOZ.js → Grid01-BQKiQdYB.js} +1 -1
- package/dist/client/assets/{Home02-DCuV9I0Z.js → Home02-DUBJ2iBn.js} +1 -1
- package/dist/client/assets/{Image01-UevfVWVa.js → Image01-BuH4rRqA.js} +1 -1
- package/dist/client/assets/{Inbox01-DkILVHwB.js → Inbox01-D63wnQw5.js} +1 -1
- package/dist/client/assets/{InfoCircle-OFmSmQRy.js → InfoCircle-DvVvj0EU.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CzCmb0H9.js → LinkExternal01-qLFklxmU.js} +1 -1
- package/dist/client/assets/{List-CziLidfU.js → List-DbyYoAK0.js} +1 -1
- package/dist/client/assets/{Loading01-Bnk-9-nZ.js → Loading01-DislDZSB.js} +1 -1
- package/dist/client/assets/{Lock01-D1Ke74xN.js → Lock01-kQXkJGwl.js} +1 -1
- package/dist/client/assets/{Pin01-BY5CK8qS.js → Pin01-CWqaADuz.js} +1 -1
- package/dist/client/assets/{Play-D6Lfsz7v.js → Play-whHXhfHd.js} +1 -1
- package/dist/client/assets/{Plus-BsvHyKJ8.js → Plus-B4n0HRX4.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-BjGY5EQM.js → RefreshCcw01-CDxZBXaR.js} +1 -1
- package/dist/client/assets/{SearchMd-B2tl0hgr.js → SearchMd-BkDBIRnQ.js} +1 -1
- package/dist/client/assets/{Settings01-DFEntEgk.js → Settings01-CUwZ36an.js} +1 -1
- package/dist/client/assets/{Settings02-BKH7FnCM.js → Settings02-C3-5vMxP.js} +1 -1
- package/dist/client/assets/{Share07-BoaRx3Mk.js → Share07-DKYwpJPj.js} +1 -1
- package/dist/client/assets/{Terminal-DAZzR_ZP.js → Terminal-rAB0v_E_.js} +1 -1
- package/dist/client/assets/{Tool01-CwDTk-Rs.js → Tool01-CFguOYlQ.js} +1 -1
- package/dist/client/assets/{Trash01-DCp8kuDe.js → Trash01-By04ijdF.js} +1 -1
- package/dist/client/assets/{Upload01-u4nRmrqT.js → Upload01-fJcjR0fH.js} +1 -1
- package/dist/client/assets/{Users03-B2zsfnpN.js → Users03-DItk6Nms.js} +1 -1
- package/dist/client/assets/{X-CERPEbZp.js → X-r5buNXf-.js} +1 -1
- package/dist/client/assets/{XClose-Vbmhp4-x.js → XClose-pySsKDwU.js} +1 -1
- package/dist/client/assets/agent-connections-preview-BKCm87yT.js +1 -0
- package/dist/client/assets/agent-detail-CZkw7Ahi.js +1 -0
- package/dist/client/assets/agents-BuaAs0iL.js +1 -0
- package/dist/client/assets/{alert-dialog-DZUHuYRj.js → alert-dialog-D0wLSh9n.js} +4 -4
- package/dist/client/assets/{auth-catchall-WiUbh3Vy.js → auth-catchall-CkUsUOEC.js} +1 -1
- package/dist/client/assets/avatar-DZVTlnSA.js +1 -0
- package/dist/client/assets/badge-BfrnxbIP.js +1 -0
- package/dist/client/assets/{binder-Dm6uKx_q.js → binder-B99OawxF.js} +1 -1
- package/dist/client/assets/breadcrumb-2c6yAn4J.js +1 -0
- package/dist/client/assets/button-CsJ-BTyU.js +1 -0
- package/dist/client/assets/card-CzebRix7.js +1 -0
- package/dist/client/assets/checkbox-FhfzoNwb.js +1 -0
- package/dist/client/assets/{circle-alert-CFYGWMlI.js → circle-alert-4rPD_PO-.js} +1 -1
- package/dist/client/assets/{collection-detail-CtGRRRDt.js → collection-detail-BrenkDdG.js} +6 -6
- package/dist/client/assets/collection-search-Yrefv2Yh.js +1 -0
- package/dist/client/assets/collection-tab-Dhc32y8D.js +1 -0
- package/dist/client/assets/collection-table-wrapper-D9zZsdiL.js +1 -0
- package/dist/client/assets/collection-tabs-Q-Uo1s-L.js +1 -0
- package/dist/client/assets/command-DAtVXyWP.js +1 -0
- package/dist/client/assets/connect-CYIDebRt.js +1 -0
- package/dist/client/assets/connection-card-D4lpnLQO.js +1 -0
- package/dist/client/assets/connection-detail-ClB2aBZr.js +1 -0
- package/dist/client/assets/connections-BfatqPWY.js +1 -0
- package/dist/client/assets/constants-BSCbneKJ.js +1 -0
- package/dist/client/assets/{constants-DeSBGDil.js → constants-CucT8Y-Y.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-DTTLW3st.js → create-organization-dialog-DwKaHJep.js} +1 -1
- package/dist/client/assets/create-project-dialog-C2-PEMvv.js +1 -0
- package/dist/client/assets/dialog-3EB-J4B_.js +1 -0
- package/dist/client/assets/dropdown-menu-Bshnl7f0.js +1 -0
- package/dist/client/assets/dynamic-plugin-layout-Drg1aSlq.js +1 -0
- package/dist/client/assets/empty-state-1NB9yQ1t.js +1 -0
- package/dist/client/assets/empty-state-Bi-BkSth.js +1 -0
- package/dist/client/assets/{env-vars-editor-hgEfXkCQ.js → env-vars-editor-CbswziBn.js} +1 -1
- package/dist/client/assets/{error-boundary-BWYaX2Wu.js → error-boundary-CaGh18_R.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CYX0n8Dz.js → extract-connection-data-kKvsSLaN.js} +1 -1
- package/dist/client/assets/file-browser-BzKEwz78.js +2 -0
- package/dist/client/assets/form-BlwP3Tk9.js +1 -0
- package/dist/client/assets/format-time-CMKyl-GC.js +1 -0
- package/dist/client/assets/grid-view-gsYISlPb.js +1 -0
- package/dist/client/assets/home-DWWCnfpS.js +1 -0
- package/dist/client/assets/{index-DyoRyDg0.js → index-BF7Y1e9M.js} +3 -3
- package/dist/client/assets/{index-CkIIowTe.js → index-CA62CANi.js} +1 -1
- package/dist/client/assets/index-CNTzRs2a.js +1 -0
- package/dist/client/assets/{index-Cu9TDLt5.js → index-CgOYGmVd.js} +1 -1
- package/dist/client/assets/index-Cj8gXlq-.css +1 -0
- package/dist/client/assets/{index-BleD0AWt.js → index-DIQUoNYB.js} +1 -1
- package/dist/client/assets/{index-DjoTHPX-.js → index-DLNbywI1.js} +2 -2
- package/dist/client/assets/{index-ZW5LgkfR.js → index-DW5LacML.js} +92 -90
- package/dist/client/assets/{index-Cj2ccTyE.js → index-DwiHvE3c.js} +1 -1
- package/dist/client/assets/{index-DIarRfAA.js → index-DwztszwS.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-4tHvFsCT.js → infiniteQueryObserver-AHDpBxLi.js} +1 -1
- package/dist/client/assets/input-Barosnhy.js +1 -0
- package/dist/client/assets/integration-icon-DL_7q6rJ.js +1 -0
- package/dist/client/assets/label-CsZ9MmGa.js +1 -0
- package/dist/client/assets/{layout-CiQVyOtU.js → layout-B0BvAjMd.js} +1 -1
- package/dist/client/assets/{localstorage-keys-BVi4c9Wu.js → localstorage-keys-amV_-5pn.js} +1 -1
- package/dist/client/assets/login-SfQqXsDc.js +1 -0
- package/dist/client/assets/{mcp-oauth-D5ZIKdBG.js → mcp-oauth-BX6v5RXg.js} +1 -1
- package/dist/client/assets/mcp-server-card-CFw7RlTN.js +1 -0
- package/dist/client/assets/mcp-server-detail-FV0O-BTM.js +2 -0
- package/dist/client/assets/members-SrNL520t.js +3 -0
- package/dist/client/assets/{monaco-editor-D8XjYu_I.js → monaco-editor-HT_HkhlE.js} +1 -1
- package/dist/client/assets/{monitoring-CDhjTLeQ.js → monitoring-YxclJtDc.js} +5 -5
- package/dist/client/assets/{oauth-callback-BeReH52R.js → oauth-callback-CgawdzC7.js} +1 -1
- package/dist/client/assets/page-BipGfR0N.js +1 -0
- package/dist/client/assets/page-CBPeBj68.js +1 -0
- package/dist/client/assets/{plugin-empty-state-DJs75tbR.js → plugin-empty-state-DmoMnSvF.js} +1 -1
- package/dist/client/assets/{plugin-header-B9k5Jlo7.js → plugin-header-DrwRXir0.js} +1 -1
- package/dist/client/assets/popover-Du0axOQk.js +1 -0
- package/dist/client/assets/project-layout-CXHLC50z.js +1 -0
- package/dist/client/assets/project-settings-BdUIjng2.js +1 -0
- package/dist/client/assets/projects-list-JxHyiVdW.js +1 -0
- package/dist/client/assets/{registry-utils-BSsNDH8z.js → registry-utils-DHqoUP2c.js} +1 -1
- package/dist/client/assets/resizable-DKYqWYE_.js +1 -0
- package/dist/client/assets/select-C2Pbxf7c.js +1 -0
- package/dist/client/assets/shell-layout-DuY0czp2.js +12 -0
- package/dist/client/assets/spinner-Bk2Kv7Is.js +1 -0
- package/dist/client/assets/{store-invite-OC-5AI4v.js → store-invite-DoxlK9jX.js} +1 -1
- package/dist/client/assets/switch-pRBwY2MA.js +1 -0
- package/dist/client/assets/table-Bgaai9wR.js +1 -0
- package/dist/client/assets/tasks-CSRJCIUq.js +1 -0
- package/dist/client/assets/textarea-CUDbyNiv.js +1 -0
- package/dist/client/assets/{tools-list-B4uqUufu.js → tools-list-CjTy5P6D.js} +1 -1
- package/dist/client/assets/{topbar-portal-BkkURAkp.js → topbar-portal-BJiAJ4h2.js} +1 -1
- package/dist/client/assets/typewriter-title-CGvoRlOT.js +16 -0
- package/dist/client/assets/{use-binding-jnlj8haE.js → use-binding-ltfl3cPA.js} +1 -1
- package/dist/client/assets/{use-connection-CdUUg5oM.js → use-connection-_6bZJd3j.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Brpfqy1S.js → use-create-virtual-mcp-CSiBFS-p.js} +1 -1
- package/dist/client/assets/{use-deco-chat-open-BIqIiDW-.js → use-deco-chat-open-CVTwRQoh.js} +3 -3
- package/dist/client/assets/{use-install-from-registry-zPimeqjE.js → use-install-from-registry-Box3PA1m.js} +1 -1
- package/dist/client/assets/use-list-state-FXqJjHJh.js +1 -0
- package/dist/client/assets/{use-llm-AxlP2IMZ.js → use-llm-CETK0xwr.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-B4-jhghr.js → use-mcp-prompts-DVE5aYwA.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CwSPwOy3.js → use-mcp-tools-CERNk3IX.js} +1 -1
- package/dist/client/assets/{use-mobile-CZgmHxJy.js → use-mobile-DgWdzZzh.js} +1 -1
- package/dist/client/assets/{use-organization-settings-7U_CYDtf.js → use-organization-settings-6lqaWqmf.js} +1 -1
- package/dist/client/assets/{use-project-DHmrO9yE.js → use-project-CpFgjzox.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-B_EKKbiX.js → use-virtual-mcp-BaDN22Su.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DUcr56bw.js +1 -0
- package/dist/client/assets/{useMutation-BZJqJibi.js → useMutation-GLUqnj57.js} +1 -1
- package/dist/client/assets/useQuery-BS0MQvhs.js +1 -0
- package/dist/client/assets/view-mode-toggle-BiQRnCj0.js +1 -0
- package/dist/client/assets/workflow-B4shDfav.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +201 -176
- package/dist/server/migrate.js +150 -150
- package/dist/server/server.js +175 -150
- package/package.json +1 -1
- package/dist/client/assets/agent-connections-preview-C8us1TXi.js +0 -1
- package/dist/client/assets/agent-detail-DPvjIJq8.js +0 -1
- package/dist/client/assets/agents-B_Mc2Y0p.js +0 -1
- package/dist/client/assets/avatar-BlXkFPmj.js +0 -1
- package/dist/client/assets/badge-DspY47ru.js +0 -1
- package/dist/client/assets/breadcrumb-Ds3Lal_V.js +0 -1
- package/dist/client/assets/button-DyxB0Yk5.js +0 -1
- package/dist/client/assets/card-Czo4WORA.js +0 -1
- package/dist/client/assets/checkbox-BJHuci-0.js +0 -1
- package/dist/client/assets/collection-search-B1sfCtHP.js +0 -1
- package/dist/client/assets/collection-tab-C0EGq1kq.js +0 -1
- package/dist/client/assets/collection-table-wrapper-CWAiVtOh.js +0 -1
- package/dist/client/assets/collection-tabs-BBncsSV1.js +0 -1
- package/dist/client/assets/command-DwjGvSxM.js +0 -1
- package/dist/client/assets/connect-79qxws_p.js +0 -1
- package/dist/client/assets/connection-card-BNG8RiKR.js +0 -1
- package/dist/client/assets/connection-detail-DpJ2obA4.js +0 -1
- package/dist/client/assets/connections-BOIKCGcJ.js +0 -1
- package/dist/client/assets/constants-Bo5G03e3.js +0 -1
- package/dist/client/assets/create-project-dialog-b2rgBy6I.js +0 -1
- package/dist/client/assets/dialog-RkqsUuro.js +0 -1
- package/dist/client/assets/dropdown-menu-DJfLCcXj.js +0 -1
- package/dist/client/assets/dynamic-plugin-layout-C-BX9dZD.js +0 -1
- package/dist/client/assets/empty-state-B1qLg3Wj.js +0 -1
- package/dist/client/assets/empty-state-C70KsS8J.js +0 -1
- package/dist/client/assets/file-browser-luwLtvt1.js +0 -2
- package/dist/client/assets/form-CPHFoWqg.js +0 -1
- package/dist/client/assets/grid-view-BYwAtmMs.js +0 -1
- package/dist/client/assets/home-6BSXWwE-.js +0 -1
- package/dist/client/assets/index-NuPnrQEp.js +0 -1
- package/dist/client/assets/index-tYpHqvxs.css +0 -1
- package/dist/client/assets/input-BGIEfDaw.js +0 -1
- package/dist/client/assets/integration-icon-BRZY1p3G.js +0 -1
- package/dist/client/assets/label-nYOkPUBD.js +0 -1
- package/dist/client/assets/login-ZhUdP3Du.js +0 -1
- package/dist/client/assets/mcp-server-card-BluZeoJV.js +0 -1
- package/dist/client/assets/mcp-server-detail-DA38ZVYK.js +0 -2
- package/dist/client/assets/members-CcwWOeY4.js +0 -3
- package/dist/client/assets/page-BL5oRGL8.js +0 -1
- package/dist/client/assets/page-KDOuYuNd.js +0 -1
- package/dist/client/assets/popover-CRq_6wOS.js +0 -1
- package/dist/client/assets/project-layout-BNYVyor9.js +0 -1
- package/dist/client/assets/project-settings-BB9OYyku.js +0 -1
- package/dist/client/assets/projects-list-tCSe-p9p.js +0 -1
- package/dist/client/assets/resizable-IICqdC0P.js +0 -1
- package/dist/client/assets/select-f15wOonn.js +0 -1
- package/dist/client/assets/shell-layout-Du8t77ur.js +0 -12
- package/dist/client/assets/spinner-DnPscNbk.js +0 -1
- package/dist/client/assets/switch-BIO6p3F2.js +0 -1
- package/dist/client/assets/table-BECdubXZ.js +0 -1
- package/dist/client/assets/tasks-07lkw73y.js +0 -1
- package/dist/client/assets/textarea-Beyy6QRE.js +0 -1
- package/dist/client/assets/typewriter-title-CXc5iNqe.js +0 -16
- package/dist/client/assets/use-list-state-C8dJBLRY.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DiBxunOm.js +0 -1
- package/dist/client/assets/useQuery-B0sG-lD7.js +0 -1
- package/dist/client/assets/utils-CDly9l2F.js +0 -1
- package/dist/client/assets/view-mode-toggle-DFlygBbR.js +0 -1
- package/dist/client/assets/workflow-CyeaW6pw.js +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{r as y,c as N,j as n,u as ae,m as xe,bt as We,L as ze,bp as ls,bC as os,O as ee,a4 as xt,v as is,y as as,g as ie,t as de,a$ as cs,bD as ht,a as st,bE as ds,b3 as gt,bF as $e,A as ms,S as jt,b as fs,e as us,N as ps,n as xs,K as hs,l as bt,P as gs}from"./index-BF7Y1e9M.js";import{C as le,u as Ve,i as js}from"./index-DW5LacML.js";import{I as bs,n as vs,a as He,c as vt,T as Ue,b as Be}from"./integration-icon-DL_7q6rJ.js";import{P as _e}from"./index-CNTzRs2a.js";import{e as Ge,u as Ns,S as te,g as Nt,C as Ss,f as ys,h as ws}from"./use-deco-chat-open-CVTwRQoh.js";import{c as z,B as se}from"./button-CsJ-BTyU.js";import{d as Cs}from"./constants-CucT8Y-Y.js";import{T as ks,i as _s,b as zs,S as $s,c as Is,d as Os,e as Ps,f as Ts,t as St}from"./typewriter-title-CGvoRlOT.js";import{s as Ke}from"./Plus-B4n0HRX4.js";import{t as yt}from"./Users03-DItk6Nms.js";import{i as Fe}from"./X-r5buNXf-.js";import{E as wt}from"./error-boundary-CaGh18_R.js";import{C as Ct}from"./create-project-dialog-C2-PEMvv.js";import{n as kt}from"./CheckDone01-CPH_fc9F.js";import{a as Ms}from"./Home02-DUBJ2iBn.js";import{u as Es,a as _t}from"./use-project-CpFgjzox.js";import{u as Me}from"./use-mobile-DgWdzZzh.js";import{t as nt}from"./ChevronDown-C753dD5M.js";import{A as me}from"./avatar-DZVTlnSA.js";import{b as rt,P as lt,a as ot}from"./popover-Du0axOQk.js";import{n as ct}from"./Inbox01-D63wnQw5.js";import{B as dt}from"./badge-BfrnxbIP.js";import{i as Oe}from"./Check-BVqX6VG5.js";import{s as mt}from"./XClose-pySsKDwU.js";import{i as zt}from"./ChevronRight-sGXl7Bvf.js";import{a as it}from"./Settings02-C3-5vMxP.js";import{C as $t}from"./create-organization-dialog-DwKaHJep.js";import{c as As,b as Ls,g as Ds,a as Rs,D as Hs}from"./dialog-3EB-J4B_.js";import{L as qe}from"./label-CsZ9MmGa.js";import{S as Je}from"./switch-pRBwY2MA.js";import{i as Us}from"./Code01-Cz0GM-Ln.js";import{a as It}from"./Copy01-Bl99tdzP.js";import{u as Ot,a as Bs}from"./use-organization-settings-6lqaWqmf.js";import{i as Fs}from"./File06-qYvBtC4a.js";import{I as Ws}from"./input-Barosnhy.js";import{c as Vs}from"./Grid01-BQKiQdYB.js";import{a as Gs,T as Ks}from"./topbar-portal-BJiAJ4h2.js";import{a as Zs,b as Ys,D as qs,c as Js,g as ft}from"./dropdown-menu-Bshnl7f0.js";import{n as ut}from"./LinkExternal01-qLFklxmU.js";import{t as Xs}from"./Settings01-CUwZ36an.js";import{u as Pt,L as Tt}from"./localstorage-keys-amV_-5pn.js";import{R as Qs,a as Mt,b as en}from"./resizable-DKYqWYE_.js";import"./spinner-Bk2Kv7Is.js";import"./use-mcp-prompts-DVE5aYwA.js";import"./useQuery-BS0MQvhs.js";import"./form-BlwP3Tk9.js";import"./ArrowUp-Cr88yR39.js";import"./Edit01-DkLw19ks.js";import"./AlertCircle-CMI4YiF8.js";import"./ArrowLeft-F0qy4hoF.js";import"./use-virtual-mcp-BaDN22Su.js";import"./use-connection-_6bZJd3j.js";import"./useMutation-GLUqnj57.js";import"./SearchMd-BkDBIRnQ.js";import"./use-create-virtual-mcp-CSiBFS-p.js";import"./usage-B8eRkRZY.js";import"./Terminal-rAB0v_E_.js";import"./monaco-editor-HT_HkhlE.js";import"./empty-state-Bi-BkSth.js";import"./generate-id-Dyweu44Y.js";import"./Trash01-By04ijdF.js";import"./index-CA62CANi.js";import"./use-llm-CETK0xwr.js";import"./use-binding-ltfl3cPA.js";import"./binder-B99OawxF.js";import"./select-C2Pbxf7c.js";import"./Image01-BuH4rRqA.js";import"./RefreshCcw01-CDxZBXaR.js";import"./textarea-CUDbyNiv.js";import"./alert-dialog-D0wLSh9n.js";import"./infiniteQueryObserver-AHDpBxLi.js";const Xe=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M7 17 17 7m0 0H7m10 0v10"}));Xe.displayName="ArrowUpRight";const Et=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M9 7H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 7.76 3 8.04 3 8.6v10.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21H9m0 0h6m-6 0V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 3 10.04 3 10.6 3h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 3.76 15 4.04 15 4.6V21m0-10h4.4c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C21 11.76 21 12.04 21 12.6v6.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C20.24 21 19.96 21 19.4 21H15"}));Et.displayName="BarChart10";const At=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m12 21-.1-.15c-.695-1.042-1.042-1.563-1.5-1.94a4 4 0 0 0-1.378-.737C8.453 18 7.827 18 6.575 18H5.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2 16.48 2 15.92 2 14.8V6.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C3.52 3 4.08 3 5.2 3h.4c2.24 0 3.36 0 4.216.436a4 4 0 0 1 1.748 1.748C12 6.04 12 7.16 12 9.4M12 21V9.4M12 21l.1-.15c.695-1.042 1.042-1.563 1.5-1.94a3.999 3.999 0 0 1 1.378-.737C15.547 18 16.173 18 17.425 18H18.8c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 16.48 22 15.92 22 14.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 3 19.92 3 18.8 3h-.4c-2.24 0-3.36 0-4.216.436a4 4 0 0 0-1.748 1.748C12 6.04 12 7.16 12 9.4"}));At.displayName="BookOpen01";const Lt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M15 21v-5.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 14 13.96 14 13.4 14h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 14.76 9 15.04 9 15.6V21M3 7a3 3 0 0 0 6 0 3 3 0 1 0 6 0 3 3 0 1 0 6 0M6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21Z"}));Lt.displayName="Building02";const Dt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m18 17-5-5 5-5m-7 10-5-5 5-5"}));Dt.displayName="ChevronLeftDouble";const Rt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m6 17 5-5-5-5m7 10 5-5-5-5"}));Rt.displayName="ChevronRightDouble";const Qe=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M11 4.5h7.3c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874c.218.428.218.988.218 2.108V9c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C19.898 12 19.432 12 18.5 12M13 19.5H5.7c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2.5 17.98 2.5 17.42 2.5 16.3V15c0-.932 0-1.398.152-1.765a2 2 0 0 1 1.083-1.083C4.102 12 4.568 12 5.5 12m4.8 2.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218c.055-.107.055-.247.055-.527v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C14.12 9.5 13.98 9.5 13.7 9.5h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218c-.055.107-.055.247-.055.527v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055Zm7.5 7.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218C22 21.62 22 21.48 22 21.2v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C21.62 17 21.48 17 21.2 17h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218C17 17.38 17 17.52 17 17.8v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055ZM2.8 7h3.4c.28 0 .42 0 .527-.054a.5.5 0 0 0 .218-.219C7 6.62 7 6.48 7 6.2V2.8c0-.28 0-.42-.054-.527a.5.5 0 0 0-.219-.219C6.62 2 6.48 2 6.2 2H2.8c-.28 0-.42 0-.527.054a.5.5 0 0 0-.219.219C2 2.38 2 2.52 2 2.8v3.4c0 .28 0 .42.054.527a.5.5 0 0 0 .219.218C2.38 7 2.52 7 2.8 7Z"}));Qe.displayName="Dataflow03";const Ht=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M8 14s1.5 2 4 2 4-2 4-2m-1-5h.01M9 9h.01M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-6.5-3a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Zm-6 0a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Z"}));Ht.displayName="FaceSmile";const Ut=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M2 12h20M2 12c0 5.523 4.477 10 10 10M2 12C2 6.477 6.477 2 12 2m10 10c0 5.523-4.477 10-10 10m10-10c0-5.523-4.477-10-10-10m0 0a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10m0-20a15.3 15.3 0 0 0-4 10 15.3 15.3 0 0 0 4 10"}));Ut.displayName="Globe01";const Bt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));Bt.displayName="LayoutRight";const Ft=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m0-9H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H9"}));Ft.displayName="LogOut01";const Wt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m3 5c0 .93 0 1.395-.102 1.776a3 3 0 0 1-2.122 2.122C9.395 21 8.93 21 8 21h-.5c-1.398 0-2.097 0-2.648-.228a3 3 0 0 1-1.624-1.624C3 18.597 3 17.898 3 16.5v-9c0-1.398 0-2.097.228-2.648a3 3 0 0 1 1.624-1.624C5.403 3 6.102 3 7.5 3H8c.93 0 1.395 0 1.776.102a3 3 0 0 1 2.122 2.122C12 5.605 12 6.07 12 7"}));Wt.displayName="LogOut02";const Vt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));Vt.displayName="Mail01";const Gt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Zm-6 8h12M9 16a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));Gt.displayName="Settings04";function tn(){const t=N.c(65),{org:e}=ae(),[,s]=Ge(),{selectedVirtualMcp:r,modelsConnections:l,isChatEmpty:o,activeThreadId:i,createThread:a,switchToThread:c,threads:d}=Ns();let m;if(t[0]!==i||t[1]!==d){let G;t[3]!==i?(G=K=>K.id===i,t[3]=i,t[4]=G):G=t[4],m=d.find(G),t[0]=i,t[1]=d,t[2]=m}else m=t[2];const f=m,[u,p]=y.useState(!1),[x,h]=y.useTransition();let j;t[5]!==e.id?(j=Cs(e.id),t[5]=e.id,t[6]=j):j=t[6];const g=r??j;let v;t[7]!==a?(v=()=>{h(()=>{a()})},t[7]=a,t[8]=v):v=t[8];const S=v;if(l.length===0){let G;t[9]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(_e.Header.Left,{className:"gap-2"}),t[9]=G):G=t[9];let K;t[10]!==s?(K=()=>s(!1),t[10]=s,t[11]=K):K=t[11];let X;t[12]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(Fe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=X):X=t[12];let Y;t[13]!==K?(Y=n.jsxs(_e.Header,{className:"flex-none",children:[G,n.jsx(_e.Header.Right,{className:"gap-1",children:n.jsx("button",{type:"button",onClick:K,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:X})})]}),t[13]=K,t[14]=Y):Y=t[14];let O;t[15]!==e?(O=n.jsx(le.Main,{className:"flex flex-col items-center",children:n.jsx(le.EmptyState,{children:n.jsx(le.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features.",org:e})})}),t[15]=e,t[16]=O):O=t[16];let L;return t[17]!==Y||t[18]!==O?(L=n.jsxs(le,{children:[Y,O]}),t[17]=Y,t[18]=O,t[19]=L):L=t[19],L}const C=u?"duration-300 opacity-0 -translate-x-4 pointer-events-none":x?"duration-200 opacity-0 pointer-events-none":"duration-300 opacity-100 translate-x-0";let w;t[20]!==C?(w=z("absolute inset-0 flex flex-col transition-all ease-in-out",C),t[20]=C,t[21]=w):w=t[21];let _;t[22]!==f||t[23]!==o?(_=!o&&f?.title&&n.jsx(ks,{text:f.title,className:"text-sm font-medium text-foreground"}),t[22]=f,t[23]=o,t[24]=_):_=t[24];let P;t[25]!==_?(P=n.jsx(_e.Header.Left,{className:"gap-2",children:_}),t[25]=_,t[26]=P):P=t[26];let k;t[27]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(Ke,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[27]=k):k=t[27];let $;t[28]!==S||t[29]!==x?($=n.jsx("button",{type:"button",onClick:S,disabled:x,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",title:"New chat",children:k}),t[28]=S,t[29]=x,t[30]=$):$=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=()=>p(!0),t[31]=I):I=t[31];let M;t[32]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsx("button",{type:"button",onClick:I,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:n.jsx(_s,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[32]=M):M=t[32];let T;t[33]!==s?(T=()=>s(!1),t[33]=s,t[34]=T):T=t[34];let B;t[35]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx(Fe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[35]=B):B=t[35];let E;t[36]!==T?(E=n.jsx("button",{type:"button",onClick:T,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:B}),t[36]=T,t[37]=E):E=t[37];let D;t[38]!==E||t[39]!==$?(D=n.jsxs(_e.Header.Right,{className:"gap-1",children:[$,M,E]}),t[38]=E,t[39]=$,t[40]=D):D=t[40];let R;t[41]!==D||t[42]!==P?(R=n.jsxs(_e.Header,{className:"flex-none",children:[P,D]}),t[41]=D,t[42]=P,t[43]=R):R=t[43];let A;t[44]!==g||t[45]!==o?(A=n.jsx(le.Main,{children:o?n.jsx(le.EmptyState,{children:n.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[n.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[n.jsx(bs,{icon:g.icon,name:g.title,size:"lg",fallbackIcon:n.jsx(yt,{size:32}),className:"size-[60px]! rounded-[18px]!"}),n.jsx("h3",{className:"text-xl font-medium text-foreground",children:g.title}),n.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:g.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),n.jsx(le.IceBreakers,{})]})}):n.jsx(le.Messages,{})}),t[44]=g,t[45]=o,t[46]=A):A=t[46];let H;t[47]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(le.Footer,{children:n.jsx(le.Input,{})}),t[47]=H):H=t[47];let F;t[48]!==R||t[49]!==A||t[50]!==w?(F=n.jsxs("div",{className:w,children:[R,A,H]}),t[48]=R,t[49]=A,t[50]=w,t[51]=F):F=t[51];const U=u?"opacity-100 translate-x-0":"opacity-0 translate-x-4 pointer-events-none";let W;t[52]!==U?(W=z("absolute inset-0 flex flex-col transition-all duration-300 ease-in-out",U),t[52]=U,t[53]=W):W=t[53];let V;t[54]===Symbol.for("react.memo_cache_sentinel")?(V=()=>p(!1),t[54]=V):V=t[54];let Z;t[55]!==i||t[56]!==c||t[57]!==d?(Z=n.jsx(zs,{threads:d,activeThreadId:i,onThreadSelect:c,onClose:V}),t[55]=i,t[56]=c,t[57]=d,t[58]=Z):Z=t[58];let q;t[59]!==W||t[60]!==Z?(q=n.jsx("div",{className:W,children:Z}),t[59]=W,t[60]=Z,t[61]=q):q=t[61];let J;return t[62]!==F||t[63]!==q?(J=n.jsxs(le,{className:"relative overflow-hidden",children:[F,q]}),t[62]=F,t[63]=q,t[64]=J):J=t[64],J}function sn(){const t=N.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(le.Skeleton,{}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(wt,{fallback:e,children:n.jsx(y.Suspense,{fallback:n.jsx(le.Skeleton,{}),children:n.jsx(tn,{})})}),t[1]=s):s=t[1],s}function nn(){const t=N.c(36),[e]=Ve(),{locator:s,org:r}=ae(),l=xe(),o=We(),{org:i,project:a}=ze.parse(s),c=ze.isOrgAdminProject(s),{data:d}=Es(r.id,a);let m;t[0]!==d?.enabledPlugins?(m=d?.enabledPlugins??[],t[0]=d?.enabledPlugins,t[1]=m):m=t[1];const f=m;let u;t[2]!==f?(u=O=>f.includes(O.pluginId),t[2]=f,t[3]=u):u=t[3];const p=ls.filter(u),x=o.location.pathname===`/${i}/${a}`||o.location.pathname===`/${i}/${a}/`;let h;t[4]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Ms,{}),t[4]=h):h=t[4];const j={key:"home",label:"Home",icon:h,onClick:()=>{x?window.dispatchEvent(new CustomEvent("reset-home-view")):l({to:"/$org/$project",params:{org:i,project:a}})}};let b;t[5]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(kt,{}),t[5]=b):b=t[5];const g={key:"tasks",label:"Tasks",icon:b,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:ee}})};let v;t[6]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(vs,{}),t[6]=v):v=t[6];const S={key:"mcps",label:"Connections",icon:v,onClick:()=>l({to:"/$org/$project/mcps",params:{org:i,project:ee}})};let C;t[7]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(xt,{}),t[7]=C):C=t[7];const w={key:"projects",label:"Projects",icon:C,onClick:()=>l({to:"/$org/$project/projects",params:{org:i,project:ee}})};let _;t[8]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(Lt,{}),t[8]=_):_=t[8];const P={key:"store",label:"Store",icon:_,onClick:()=>l({to:"/$org/$project/store",params:{org:i,project:ee}})};let k;t[9]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(yt,{}),t[9]=k):k=t[9];const $={key:"agents",label:"Agents",icon:k,onClick:()=>l({to:"/$org/$project/agents",params:{org:i,project:ee}})};let I;t[10]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(Et,{}),t[10]=I):I=t[10];const M={key:"monitoring",label:"Monitor",icon:I,onClick:()=>l({to:"/$org/$project/monitoring",params:{org:i,project:ee}})};let T;t[11]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(Qe,{}),t[11]=T):T=t[11];const B={key:"workflows",label:"Workflows",icon:T,onClick:()=>l({to:"/$org/$project/workflows",params:{org:i,project:ee}})};let E;t[12]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(Ht,{}),t[12]=E):E=t[12];const D={key:"members",label:"Members",icon:E,onClick:()=>l({to:"/$org/$project/members",params:{org:i,project:ee}})},R=[...e.experimental_tasks?[g]:[],S,B,...e.experimental_projects?[w]:[],P,$,M,D],A=p.map(O=>({key:O.pluginId,label:O.label,icon:O.icon,onClick:()=>l({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:O.pluginId}})}));let H;t[13]!==f?(H=O=>f.includes(O.pluginId),t[13]=f,t[14]=H):H=t[14];const U=os.filter(H).map(O=>({type:"group",group:{id:`${O.pluginId}-${O.id}`,label:O.label,items:O.items.map((L,Q)=>({key:`${O.pluginId}-${O.id}-${Q}`,label:L.label,icon:L.icon,onClick:()=>l({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:O.pluginId}})})),defaultExpanded:O.defaultExpanded??!0}}));if(c){const O=[{type:"items",items:[j,...R]}];if(A.length>0){let L;t[15]===Symbol.for("react.memo_cache_sentinel")?(L={type:"divider"},t[15]=L):L=t[15],O.push(L);let Q;t[16]!==A?(Q={type:"items",items:A},t[16]=A,t[17]=Q):Q=t[17],O.push(Q)}if(U.length>0){if(A.length===0){let L;t[18]===Symbol.for("react.memo_cache_sentinel")?(L={type:"divider"},t[18]=L):L=t[18],O.push(L)}O.push(...U)}return O}let W;t[19]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(js,{}),t[19]=W):W=t[19];let V;t[20]!==l||t[21]!==i||t[22]!==a?(V={key:"tasks",label:"Tasks",icon:W,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:a}})},t[20]=l,t[21]=i,t[22]=a,t[23]=V):V=t[23];const Z=V;let q;t[24]===Symbol.for("react.memo_cache_sentinel")?(q=n.jsx(Qe,{}),t[24]=q):q=t[24];let J;t[25]!==l||t[26]!==i||t[27]!==a?(J={key:"workflows",label:"Workflows",icon:q,onClick:()=>l({to:"/$org/$project/workflows",params:{org:i,project:a}})},t[25]=l,t[26]=i,t[27]=a,t[28]=J):J=t[28];const G=J;let K;t[29]!==e.experimental_tasks||t[30]!==Z?(K=e.experimental_tasks?[Z]:[],t[29]=e.experimental_tasks,t[30]=Z,t[31]=K):K=t[31];const Y=[{type:"items",items:[j,...K,G]}];if(A.length>0){let O;t[32]===Symbol.for("react.memo_cache_sentinel")?(O={type:"divider"},t[32]=O):O=t[32],Y.push(O);let L;t[33]!==A?(L={type:"items",items:A},t[33]=A,t[34]=L):L=t[34],Y.push(L)}if(U.length>0){if(A.length===0){let O;t[35]===Symbol.for("react.memo_cache_sentinel")?(O={type:"divider"},t[35]=O):O=t[35],Y.push(O)}Y.push(...U)}return Y}const rn="sidebar_state",ln=3600*24*7,on="16rem",an="18rem",cn="3rem",dn="b",Kt=y.createContext(null);function Ze(){const t=y.useContext(Kt);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function mn(t){const e=N.c(21),{defaultOpen:s,open:r,onOpenChange:l,children:o}=t,i=s===void 0?!0:s,a=Me(),[c,d]=y.useState(!1),[m,f]=y.useState(i),u=r??m;let p;e[0]!==u||e[1]!==l?(p=P=>{const k=typeof P=="function"?P(u):P;l?l(k):f(k),document.cookie=`${rn}=${k}; path=/; max-age=${ln}`},e[0]=u,e[1]=l,e[2]=p):p=e[2];const x=p;let h;e[3]!==a||e[4]!==x?(h=()=>a?d(un):x(fn),e[3]=a,e[4]=x,e[5]=h):h=e[5];const j=h;let b,g;e[6]!==j?(b=()=>{const P=k=>{if(k.key===dn&&(k.metaKey||k.ctrlKey)){const $=k.target;if($.tagName==="INPUT"||$.tagName==="TEXTAREA"||$.isContentEditable)return;k.preventDefault(),j()}};return globalThis.addEventListener("keydown",P),()=>globalThis.removeEventListener("keydown",P)},g=[j],e[6]=j,e[7]=b,e[8]=g):(b=e[7],g=e[8]),y.useEffect(b,g);const v=u?"expanded":"collapsed";let S;e[9]!==a||e[10]!==u||e[11]!==c||e[12]!==x||e[13]!==v||e[14]!==j?(S={state:v,open:u,setOpen:x,isMobile:a,openMobile:c,setOpenMobile:d,toggleSidebar:j},e[9]=a,e[10]=u,e[11]=c,e[12]=x,e[13]=v,e[14]=j,e[15]=S):S=e[15];const C=S;let w;e[16]!==o?(w=n.jsx(vt,{delayDuration:0,children:o}),e[16]=o,e[17]=w):w=e[17];let _;return e[18]!==C||e[19]!==w?(_=n.jsx(Kt.Provider,{value:C,children:w}),e[18]=C,e[19]=w,e[20]=_):_=e[20],_}function fn(t){return!t}function un(t){return!t}function pn(t){const e=N.c(14);let s,r,l,o;e[0]!==t?({className:r,style:o,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o):(s=e[1],r=e[2],l=e[3],o=e[4]);let i;e[5]!==o?(i={"--sidebar-width":on,"--sidebar-width-icon":cn,...o},e[5]=o,e[6]=i):i=e[6];const a=i;let c;e[7]!==r?(c=z("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",r),e[7]=r,e[8]=c):c=e[8];let d;return e[9]!==s||e[10]!==l||e[11]!==a||e[12]!==c?(d=n.jsx("div",{"data-slot":"sidebar-wrapper",style:a,className:c,...l,children:s}),e[9]=s,e[10]=l,e[11]=a,e[12]=c,e[13]=d):d=e[13],d}function xn(t){const e=N.c(46);let s,r,l,o,i,a;e[0]!==t?({side:o,variant:i,collapsible:a,className:r,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5],a=e[6]);const c=o===void 0?"left":o,d=i===void 0?"sidebar":i,m=a===void 0?"offcanvas":a,{isMobile:f,state:u,openMobile:p,setOpenMobile:x}=Ze();if(m==="none"){let k;e[7]!==r?(k=z("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),e[7]=r,e[8]=k):k=e[8];let $;return e[9]!==s||e[10]!==l||e[11]!==k?($=n.jsx("div",{"data-slot":"sidebar",className:k,...l,children:s}),e[9]=s,e[10]=l,e[11]=k,e[12]=$):$=e[12],$}if(f){let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k={"--sidebar-width":an},e[13]=k):k=e[13];let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=n.jsxs(Is,{className:"sr-only",children:[n.jsx(Os,{children:"Sidebar"}),n.jsx(Ps,{children:"Displays the mobile sidebar."})]}),e[14]=$):$=e[14];let I;e[15]!==s?(I=n.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=I):I=e[16];let M;e[17]!==c||e[18]!==I?(M=n.jsxs(Ts,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:k,side:c,children:[$,I]}),e[17]=c,e[18]=I,e[19]=M):M=e[19];let T;return e[20]!==p||e[21]!==l||e[22]!==x||e[23]!==M?(T=n.jsx($s,{open:p,onOpenChange:x,...l,children:M}),e[20]=p,e[21]=l,e[22]=x,e[23]=M,e[24]=T):T=e[24],T}const h=u==="collapsed"?m:"",j=d==="floating"||d==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let b;e[25]!==j?(b=z("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",j),e[25]=j,e[26]=b):b=e[26];let g;e[27]!==b?(g=n.jsx("div",{"data-slot":"sidebar-gap",className:b}),e[27]=b,e[28]=g):g=e[28];const v=c==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",S=d==="floating"||d==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let C;e[29]!==r||e[30]!==v||e[31]!==S?(C=z("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",v,S,r),e[29]=r,e[30]=v,e[31]=S,e[32]=C):C=e[32];let w;e[33]!==s?(w=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border pt-2 flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:s}),e[33]=s,e[34]=w):w=e[34];let _;e[35]!==l||e[36]!==C||e[37]!==w?(_=n.jsx("div",{"data-slot":"sidebar-container",className:C,...l,children:w}),e[35]=l,e[36]=C,e[37]=w,e[38]=_):_=e[38];let P;return e[39]!==c||e[40]!==u||e[41]!==_||e[42]!==h||e[43]!==g||e[44]!==d?(P=n.jsxs("div",{className:"group peer text-foreground hidden md:block","data-state":u,"data-collapsible":h,"data-variant":d,"data-side":c,"data-slot":"sidebar",children:[g,_]}),e[39]=c,e[40]=u,e[41]=_,e[42]=h,e[43]=g,e[44]=d,e[45]=P):P=e[45],P}function hn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("main",{"data-slot":"sidebar-inset",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Zt(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function gn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-2 px-2 items-start justify-start",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function at(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("h-4 m-0! w-full",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-sidebar":"separator",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function jn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Pe(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Te(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("w-full text-sm",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function pe(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex w-full min-w-0 flex-col gap-1",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function oe(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("group/menu-item relative",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}const bn=as("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg px-2 py-1.5 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding,colors] transition-colors duration-150 ease-out hover:transition-none focus-visible:ring-2 active:bg-sidebar-accent/75 disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent/75 [&>span:last-child]:truncate [&>svg]:size-[18px] [&>svg]:shrink-0 [&>svg]:text-muted-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent text-sidebar-foreground/80 active:text-sidebar-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-7 text-sm font-[450]",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ee(t){const e=N.c(28);let s,r,l,o,i,a,c;e[0]!==t?({asChild:l,isActive:o,variant:i,size:a,tooltip:c,className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a,e[7]=c):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5],a=e[6],c=e[7]);const d=l===void 0?!1:l,m=o===void 0?!1:o,f=i===void 0?"default":i,u=a===void 0?"default":a,p=d?is:"button",{isMobile:x,state:h}=Ze();let j;e[8]!==s||e[9]!==u||e[10]!==f?(j=z(bn({variant:f,size:u}),s),e[8]=s,e[9]=u,e[10]=f,e[11]=j):j=e[11];let b;e[12]!==p||e[13]!==m||e[14]!==r||e[15]!==u||e[16]!==j?(b=n.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":m,className:j,...r}),e[12]=p,e[13]=m,e[14]=r,e[15]=u,e[16]=j,e[17]=b):b=e[17];const g=b;if(!c)return g;if(typeof c=="string"){let _;e[18]!==c?(_={children:c},e[18]=c,e[19]=_):_=e[19],c=_}let v;e[20]!==g?(v=n.jsx(Ue,{asChild:!0,children:g}),e[20]=g,e[21]=v):v=e[21];const S=h!=="collapsed"||x;let C;e[22]!==S||e[23]!==c?(C=n.jsx(He,{side:"right",align:"center",hidden:S,...c}),e[22]=S,e[23]=c,e[24]=C):C=e[24];let w;return e[25]!==v||e[26]!==C?(w=n.jsxs(Be,{children:[v,C]}),e[25]=v,e[26]=C,e[27]=w):w=e[27],w}function vn(t){const e=N.c(18),{label:s,children:r,defaultExpanded:l}=t,o=l===void 0?!0:l,[i,a]=y.useState(o);let c;e[0]!==i?(c=()=>a(!i),e[0]=i,e[1]=c):c=e[1];let d;e[2]!==s?(d=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[2]=s,e[3]=d):d=e[3];const m=!i&&"-rotate-90";let f;e[4]!==m?(f=z("text-muted-foreground transition-transform duration-200",m),e[4]=m,e[5]=f):f=e[5];let u;e[6]!==f?(u=n.jsx(nt,{size:12,className:f}),e[6]=f,e[7]=u):u=e[7];let p;e[8]!==c||e[9]!==d||e[10]!==u?(p=n.jsx(pe,{children:n.jsx(oe,{children:n.jsxs(Ee,{className:"h-6 cursor-pointer select-none",onClick:c,children:[d,u]})})}),e[8]=c,e[9]=d,e[10]=u,e[11]=p):p=e[11];let x;e[12]!==r||e[13]!==i?(x=i&&n.jsx(Te,{children:n.jsx(pe,{className:"gap-0.5",children:r})}),e[12]=r,e[13]=i,e[14]=x):x=e[14];let h;return e[15]!==p||e[16]!==x?(h=n.jsxs(Pe,{className:"py-0",children:[p,x]}),e[15]=p,e[16]=x,e[17]=h):h=e[17],h}function Yt(t){const e=N.c(13),{item:s}=t;let r;e[0]!==s.icon?(r=n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:s.icon}),e[0]=s.icon,e[1]=r):r=e[1];let l;e[2]!==s.label?(l=n.jsx("span",{className:"truncate",children:s.label}),e[2]=s.label,e[3]=l):l=e[3];let o;e[4]!==s.isActive||e[5]!==s.label||e[6]!==s.onClick||e[7]!==r||e[8]!==l?(o=n.jsxs(Ee,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:s.onClick,isActive:s.isActive,tooltip:s.label,children:[r,l]}),e[4]=s.isActive,e[5]=s.label,e[6]=s.onClick,e[7]=r,e[8]=l,e[9]=o):o=e[9];let i;return e[10]!==s.key||e[11]!==o?(i=n.jsx(oe,{children:o},s.key),e[10]=s.key,e[11]=o,e[12]=i):i=e[12],i}function Nn(t){const e=N.c(12),{section:s}=t;switch(s.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(at,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=s.group.label,l=s.group.defaultExpanded;let o;e[2]!==s.group.items?(o=s.group.items.map(yn),e[2]=s.group.items,e[3]=o):o=e[3];let i;return e[4]!==s.group.defaultExpanded||e[5]!==s.group.label||e[6]!==o?(i=n.jsx(vn,{label:r,defaultExpanded:l,children:o}),e[4]=s.group.defaultExpanded,e[5]=s.group.label,e[6]=o,e[7]=i):i=e[7],i}case"items":{let r;e[8]!==s.items?(r=s.items.map(Sn),e[8]=s.items,e[9]=r):r=e[9];let l;return e[10]!==r?(l=n.jsx(Pe,{className:"py-0",children:n.jsx(Te,{children:n.jsx(pe,{className:"gap-0.5",children:r})})}),e[10]=r,e[11]=l):l=e[11],l}}}function Sn(t){return n.jsx(Yt,{item:t},t.key)}function yn(t){return n.jsx(Yt,{item:t},t.key)}function qt(t){const e=N.c(14),{sections:s,header:r,footer:l,additionalContent:o,variant:i,collapsible:a,contentClassName:c}=t,d=i===void 0?"sidebar":i,m=a===void 0?"icon":a;let f;e[0]!==c?(f=z("flex flex-col flex-1 overflow-x-hidden font-medium border-r pb-2",c),e[0]=c,e[1]=f):f=e[1];let u;e[2]!==s?(u=s.map(wn),e[2]=s,e[3]=u):u=e[3];let p;e[4]!==o||e[5]!==f||e[6]!==u?(p=n.jsxs(jn,{className:f,children:[u,o]}),e[4]=o,e[5]=f,e[6]=u,e[7]=p):p=e[7];let x;return e[8]!==m||e[9]!==l||e[10]!==r||e[11]!==p||e[12]!==d?(x=n.jsxs(xn,{variant:d,collapsible:m,children:[r,p,l]}),e[8]=m,e[9]=l,e[10]=r,e[11]=p,e[12]=d,e[13]=x):x=e[13],x}function wn(t,e){return n.jsx(Nn,{section:t},e)}qt.Skeleton=function(){return n.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>n.jsx("div",{className:"w-full h-8",children:n.jsx(te,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};const Cn="w-full h-8 justify-start gap-2 px-2 text-sm font-[450] text-sidebar-foreground hover:text-sidebar-foreground hover:bg-sidebar-accent active:bg-sidebar-accent/75 [&>svg]:size-[18px] [&>svg]:text-muted-foreground hover:[&>svg]:text-sidebar-foreground";function Ie(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z(Cn,s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx(se,{variant:"ghost",size:"sm",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function kn({invitation:t,onStatusChange:e}){const[s,r]=y.useState(!1),[l,o]=y.useState(!1),i=xe(),a=async()=>{r(!0);try{const p=await ie.organization.acceptInvitation({invitationId:t.id});if(p.error)de.error(p.error.message),r(!1);else{e(t.id,"accepted");const x=await ie.organization.setActive({organizationId:t.organizationId});x?.data?.slug?(de.success("Invitation accepted!"),i({to:"/$org",params:{org:x.data.slug}})):(de.success("Invitation accepted! Redirecting..."),i({to:"/"}))}}catch{de.error("Failed to accept invitation"),r(!1)}},c=async()=>{o(!0);try{const p=await ie.organization.rejectInvitation({invitationId:t.id});p.error?(de.error(p.error.message),o(!1)):(de.success("Invitation rejected"),e(t.id,"rejected"),o(!1))}catch{de.error("Failed to reject invitation"),o(!1)}},d=t.organizationName||t.organizationId,m=t.status==="pending",f=t.status==="accepted",u=t.status==="rejected";return n.jsxs("div",{className:z("flex items-center gap-3 px-3 py-2 h-12 border-b border-border/50 last:border-b-0",!m&&"opacity-50"),children:[n.jsx("div",{className:"shrink-0 size-5 flex items-center justify-center",children:n.jsx(Vt,{size:16,className:"text-muted-foreground"})}),n.jsxs("p",{className:"flex-1 text-sm text-foreground min-w-0 whitespace-nowrap overflow-hidden",children:["You have been invited to ",n.jsx("span",{className:"font-semibold inline-block max-w-[200px] truncate align-bottom",children:d})]}),n.jsx("div",{className:"flex items-center gap-1 shrink-0",children:m?n.jsxs(n.Fragment,{children:[n.jsx(se,{variant:"ghost",size:"icon",onClick:c,disabled:s||l,className:"h-8 w-8",children:n.jsx(mt,{size:14})}),n.jsx(se,{variant:"outline",size:"icon",onClick:a,disabled:s||l,className:"h-8 w-8",children:n.jsx(Oe,{size:14})})]}):f?n.jsxs(dt,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(Oe,{size:12}),"Accepted"]}):u?n.jsxs(dt,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(mt,{size:12}),"Declined"]}):null})]})}function _n(){const[t,e]=y.useState(!1),s=y.useContext(cs),{data:r}=s.hooks.useListUserInvitations(),{data:l}=ie.useListOrganizations(),[o,i]=y.useState({}),m=(r??[]).filter(h=>new Date(h.expiresAt)>new Date).map(h=>{const j=(l??[]).find(b=>b.id===h.organizationId);return{...h,organizationSlug:j?.slug||h.organizationSlug,organizationName:j?.name||h.organizationName}}).map(h=>({...h,status:o[h.id]||h.status})),f=[...m].sort((h,j)=>{const b={pending:0,accepted:1,rejected:2};return(b[h.status]??999)-(b[j.status]??999)}),p=m.filter(h=>h.status==="pending").length>0,x=(h,j)=>{i(b=>({...b,[h]:j}))};return n.jsxs(rt,{open:t,onOpenChange:e,children:[n.jsx(lt,{asChild:!0,children:n.jsxs(Ie,{children:[n.jsx(ct,{size:18}),"Inbox",p&&n.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]})}),n.jsxs(ot,{side:"right",align:"start",className:"w-[400px] p-0 overflow-hidden",children:[n.jsx("div",{className:"px-4 py-3 border-b border-border",children:n.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Inbox"})}),n.jsx("div",{className:"max-h-96 overflow-auto",children:f.length>0?f.map(h=>n.jsx(kn,{invitation:h,onStatusChange:x},h.id)):n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[n.jsx(ct,{size:32,className:"text-muted-foreground/40 mb-2"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"No invitations at the moment"})]})})]})]})}function zn(t){const e=N.c(29),{user:s,userImage:r,onOpenSettings:l}=t;let o;e[0]!==s?(o=async()=>{if(!s)return;const _=`ID: ${s.id}
|
|
2
|
+
Name: ${s.name||"N/A"}
|
|
3
|
+
Email: ${s.email}`;try{await navigator.clipboard.writeText(_),de.success("User info copied to clipboard")}catch{de.error("Failed to copy user info to clipboard")}},e[0]=s,e[1]=o):o=e[1];const i=o,a=s.name||s.email||"U";let c;e[2]!==a||e[3]!==r?(c=n.jsx(me,{url:r,fallback:a,shape:"circle",size:"sm",className:"size-8 shrink-0"}),e[2]=a,e[3]=r,e[4]=c):c=e[4];const d=s.name||"User";let m;e[5]!==d?(m=n.jsx("span",{className:"text-sm text-sidebar-foreground truncate font-[450]",children:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==s.email?(f=n.jsx("span",{className:"text-xs text-muted-foreground truncate font-normal",children:s.email}),e[7]=s.email,e[8]=f):f=e[8];let u;e[9]!==m||e[10]!==f?(u=n.jsxs("div",{className:"flex flex-col min-w-0 text-left",children:[m,f]}),e[9]=m,e[10]=f,e[11]=u):u=e[11];let p;e[12]!==i||e[13]!==c||e[14]!==u?(p=n.jsxs(se,{variant:"ghost",onClick:i,className:"h-auto p-2 m-1 mb-0 justify-start gap-2 hover:bg-sidebar-accent hover:text-inherit active:bg-sidebar-accent/75",children:[c,u]}),e[12]=i,e[13]=c,e[14]=u,e[15]=p):p=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(_n,{}),e[16]=x):x=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Gt,{size:18}),e[17]=h):h=e[17];let j;e[18]!==l?(j=n.jsxs(Ie,{onClick:l,children:[h,"Preferences"]}),e[18]=l,e[19]=j):j=e[19];let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(Ie,{asChild:!0,children:n.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(At,{size:18}),n.jsx("span",{className:"flex-1",children:"Terms & Conditions"}),n.jsx(Xe,{size:14})]})}),e[20]=b):b=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(Ie,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(ht,{className:"size-[18px]"}),n.jsx("span",{className:"flex-1",children:"decocms/mesh"}),n.jsx(Xe,{size:14})]})}),e[21]=g):g=e[21];let v;e[22]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsxs(Ie,{onClick:$n,children:[n.jsx(Wt,{size:18}),"Log out"]}),e[22]=v):v=e[22];let S;e[23]!==j?(S=n.jsxs("div",{className:"p-1 flex flex-col",children:[x,j,b,g,v]}),e[23]=j,e[24]=S):S=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx("div",{className:"mt-auto px-3 py-2 border-t border-border",children:n.jsxs("span",{className:"text-[11px] text-muted-foreground/75",children:["v","2.87.0"]})}),e[25]=C):C=e[25];let w;return e[26]!==S||e[27]!==p?(w=n.jsx(n.Fragment,{children:n.jsxs("div",{className:"flex flex-col gap-0.5 bg-sidebar min-w-[250px]",children:[p,S,C]})}),e[26]=S,e[27]=p,e[28]=w):w=e[28],w}function $n(){return ie.signOut()}function In(t){const e=N.c(26),{org:s,isActive:r,isHovered:l,onClick:o,onSettings:i,onHover:a}=t,c=r,d=l&&!r,m=l&&"bg-accent/50",f=r&&!l&&"bg-accent hover:bg-accent";let u;e[0]!==m||e[1]!==f?(u=z("flex items-center gap-2 w-full justify-start font-normal h-10 px-2 rounded-lg cursor-pointer transition-colors",m,f),e[0]=m,e[1]=f,e[2]=u):u=e[2];let p;e[3]!==o?(p=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),o?.())},e[3]=o,e[4]=p):p=e[4];let x;e[5]!==a||e[6]!==s.id?(x=()=>a?.(s.id),e[5]=a,e[6]=s.id,e[7]=x):x=e[7];const h=s.logo??void 0;let j;e[8]!==s.name||e[9]!==h?(j=n.jsx(me,{url:h,fallback:s.name,size:"sm",className:"size-6 shrink-0 rounded-md",objectFit:"cover"}),e[8]=s.name,e[9]=h,e[10]=j):j=e[10];let b;e[11]!==s.name?(b=n.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:s.name}),e[11]=s.name,e[12]=b):b=e[12];let g;e[13]!==i||e[14]!==s.name||e[15]!==d||e[16]!==c?(g=i&&c?n.jsx("button",{type:"button","aria-label":`${s.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:S=>{S.stopPropagation(),i()},children:n.jsx(it,{size:16,className:"text-muted-foreground"})}):d?n.jsx(zt,{size:16,className:"text-muted-foreground shrink-0"}):n.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[13]=i,e[14]=s.name,e[15]=d,e[16]=c,e[17]=g):g=e[17];let v;return e[18]!==o||e[19]!==u||e[20]!==p||e[21]!==x||e[22]!==j||e[23]!==b||e[24]!==g?(v=n.jsxs("div",{role:"button",tabIndex:0,className:u,onClick:o,onKeyDown:p,onMouseEnter:x,children:[j,b,g]}),e[18]=o,e[19]=u,e[20]=p,e[21]=x,e[22]=j,e[23]=b,e[24]=g,e[25]=v):v=e[25],v}function On(t){const e=N.c(34),{currentOrgSlug:s,hoveredOrgId:r,onOrgSelect:l,onOrgSettings:o,onPopoverClose:i,onCreateOrganization:a,onOrgHover:c}=t,{data:d}=ie.useListOrganizations();let m,f,u,p;if(e[0]!==s||e[1]!==r||e[2]!==a||e[3]!==c||e[4]!==l||e[5]!==o||e[6]!==i||e[7]!==d){let j;e[12]!==s?(j=(w,_)=>w.slug===s?-1:_.slug===s?1:w.name.localeCompare(_.name),e[12]=s,e[13]=j):j=e[13];const b=[...d??[]].sort(j);u="flex flex-col min-w-[240px] border-l border-border";let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:"Your Organizations"}),e[14]=g):g=e[14];let v;e[15]!==a||e[16]!==i?(v=()=>{i(),a()},e[15]=a,e[16]=i,e[17]=v):v=e[17];let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Ke,{size:16,className:"text-muted-foreground"}),e[18]=S):S=e[18],e[19]!==v?(p=n.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[g,n.jsx(se,{variant:"ghost",size:"icon",className:"size-5",onClick:v,children:S})]}),e[19]=v,e[20]=p):p=e[20],m="flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto";let C;e[21]!==s||e[22]!==r||e[23]!==c||e[24]!==l||e[25]!==o?(C=w=>n.jsx(In,{org:w,isActive:w.slug===s,isHovered:w.id===r,onClick:()=>l(w.slug),onSettings:()=>o(w.slug),onHover:c},w.slug),e[21]=s,e[22]=r,e[23]=c,e[24]=l,e[25]=o,e[26]=C):C=e[26],f=b.map(C),e[0]=s,e[1]=r,e[2]=a,e[3]=c,e[4]=l,e[5]=o,e[6]=i,e[7]=d,e[8]=m,e[9]=f,e[10]=u,e[11]=p}else m=e[8],f=e[9],u=e[10],p=e[11];let x;e[27]!==m||e[28]!==f?(x=n.jsx("div",{className:m,children:f}),e[27]=m,e[28]=f,e[29]=x):x=e[29];let h;return e[30]!==u||e[31]!==p||e[32]!==x?(h=n.jsxs("div",{className:u,children:[p,x]}),e[30]=u,e[31]=p,e[32]=x,e[33]=h):h=e[33],h}function Pn(t){const e=N.c(27),{project:s,isActive:r,onClick:l,onSettings:o}=t,[i,a]=y.useState(!1),c=r||i,d=s.ui?.themeColor??"#3B82F6",m=r&&"bg-accent hover:bg-accent";let f;e[0]!==m?(f=z("flex items-center gap-2 w-full justify-start font-normal h-10 px-2 rounded-lg cursor-pointer transition-colors hover:bg-accent/50",m),e[0]=m,e[1]=f):f=e[1];let u;e[2]!==l?(u=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),l?.())},e[2]=l,e[3]=u):u=e[3];let p,x;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>a(!0),x=()=>a(!1),e[4]=p,e[5]=x):(p=e[4],x=e[5]);let h;e[6]!==s.name||e[7]!==s.ui||e[8]!==d?(h=s.ui?.icon?n.jsx("img",{src:s.ui.icon,alt:"",className:"size-6 rounded-md object-cover shrink-0"}):n.jsx(me,{fallback:s.name,size:"sm",shape:"square",className:"size-6 shrink-0 rounded-md",style:{backgroundColor:d}}),e[6]=s.name,e[7]=s.ui,e[8]=d,e[9]=h):h=e[9];let j;e[10]!==s.name?(j=n.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:s.name}),e[10]=s.name,e[11]=j):j=e[11];let b;e[12]!==r?(b=r&&n.jsx(Oe,{size:16,className:"text-muted-foreground shrink-0"}),e[12]=r,e[13]=b):b=e[13];let g;e[14]!==r||e[15]!==o||e[16]!==s.name||e[17]!==c?(g=o&&c&&!r?n.jsx("button",{type:"button","aria-label":`${s.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:S=>{S.stopPropagation(),o()},children:n.jsx(it,{size:16,className:"text-muted-foreground"})}):r?null:n.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[14]=r,e[15]=o,e[16]=s.name,e[17]=c,e[18]=g):g=e[18];let v;return e[19]!==l||e[20]!==f||e[21]!==u||e[22]!==h||e[23]!==j||e[24]!==b||e[25]!==g?(v=n.jsxs("div",{role:"button",tabIndex:0,className:f,onClick:l,onKeyDown:u,onMouseEnter:p,onMouseLeave:x,children:[h,j,b,g]}),e[19]=l,e[20]=f,e[21]=u,e[22]=h,e[23]=j,e[24]=b,e[25]=g,e[26]=v):v=e[26],v}function Tn(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"space-y-1 px-2 py-1",children:[n.jsx(te,{className:"h-10 w-full"}),n.jsx(te,{className:"h-10 w-full"})]}),t[0]=e):e=t[0],e}function Mn(t){const e=N.c(16),{organizationId:s,currentProjectSlug:r,onProjectSelect:l,onProjectSettings:o,orgSlug:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={suspense:!0},e[0]=a):a=e[0];const{data:c}=_t(s,a);let d,m;if(e[1]!==r||e[2]!==l||e[3]!==o||e[4]!==i||e[5]!==c){m=Symbol.for("react.early_return_sentinel");e:{const u=c?.filter(En)??[];if(u.length===0){let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("div",{className:"px-3 py-4 text-center text-sm text-muted-foreground",children:"No projects yet"}),e[8]=x):x=e[8],m=x;break e}let p;e[9]!==r||e[10]!==l||e[11]!==o||e[12]!==i?(p=x=>n.jsx(Pn,{project:x,isActive:r===x.slug,onClick:()=>l(i,x.slug),onSettings:o?()=>o(i,x.slug):void 0},x.id),e[9]=r,e[10]=l,e[11]=o,e[12]=i,e[13]=p):p=e[13],d=u.map(p)}e[1]=r,e[2]=l,e[3]=o,e[4]=i,e[5]=c,e[6]=d,e[7]=m}else d=e[6],m=e[7];if(m!==Symbol.for("react.early_return_sentinel"))return m;let f;return e[14]!==d?(f=n.jsx(n.Fragment,{children:d}),e[14]=d,e[15]=f):f=e[15],f}function En(t){return t.slug!==ee}function An(t){const e=N.c(17),{organizationId:s,organizationName:r,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,onCreateProject:a,orgSlug:c}=t;let d;e[0]!==r?(d=n.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["Projects in ",r]}),e[0]=r,e[1]=d):d=e[1];let m;e[2]!==a?(m=a&&n.jsx("button",{type:"button",className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:a,"aria-label":"Create project",children:n.jsx(Ke,{size:16,className:"text-muted-foreground"})}),e[2]=a,e[3]=m):m=e[3];let f;e[4]!==d||e[5]!==m?(f=n.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[d,m]}),e[4]=d,e[5]=m,e[6]=f):f=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Tn,{}),e[7]=u):u=e[7];let p;e[8]!==l||e[9]!==o||e[10]!==i||e[11]!==c||e[12]!==s?(p=n.jsx("div",{className:"flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto",children:n.jsx(y.Suspense,{fallback:u,children:n.jsx(Mn,{organizationId:s,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,orgSlug:c})})}),e[8]=l,e[9]=o,e[10]=i,e[11]=c,e[12]=s,e[13]=p):p=e[13];let x;return e[14]!==f||e[15]!==p?(x=n.jsxs("div",{className:"flex flex-col min-w-[250px] border-l border-border",children:[f,p]}),e[14]=f,e[15]=p,e[16]=x):x=e[16],x}function Jt(t){const e=N.c(81),{open:s,onOpenChange:r,user:l,userImage:o}=t,[i,a]=Ve(),[c,d]=y.useState(!1);let m;e[0]!==l.id?(m=()=>{navigator.clipboard.writeText(l.id),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=l.id,e[1]=m):m=e[1];const f=m;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(As,{className:"text-base",children:"Profile Settings"}),e[2]=u):u=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsxs(Ls,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[u,n.jsxs(Ds,{className:"absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[n.jsx(Fe,{size:16}),n.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[3]=p):p=e[3];const x=l.name||"U";let h;e[4]!==x||e[5]!==o?(h=n.jsx(me,{url:o,fallback:x,shape:"circle",size:"xl",className:"h-16 w-16"}),e[4]=x,e[5]=o,e[6]=h):h=e[6];const j=l.name||"User";let b;e[7]!==j?(b=n.jsx("span",{className:"text-base font-medium text-foreground",children:j}),e[7]=j,e[8]=b):b=e[8];let g;e[9]!==l.email?(g=n.jsx("span",{className:"text-sm text-muted-foreground",children:l.email}),e[9]=l.email,e[10]=g):g=e[10];let v;e[11]!==b||e[12]!==g?(v=n.jsxs("div",{className:"flex flex-col gap-1",children:[b,g]}),e[11]=b,e[12]=g,e[13]=v):v=e[13];let S;e[14]!==h||e[15]!==v?(S=n.jsxs("div",{className:"flex items-center gap-4",children:[h,v]}),e[14]=h,e[15]=v,e[16]=S):S=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Preferences"}),e[17]=C):C=e[17];let w;e[18]!==a?(w=()=>a(Bn),e[18]=a,e[19]=w):w=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(qe,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(Us,{size:16,className:"text-muted-foreground"}),"Developer Mode"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Show technical details like JSON input/output for tool calls"})]}),e[20]=_):_=e[20];let P;e[21]!==a?(P=fe=>a(ue=>({...ue,devMode:fe})),e[21]=a,e[22]=P):P=e[22];let k;e[23]!==i.devMode||e[24]!==P?(k=n.jsx("div",{onClick:Un,children:n.jsx(Je,{checked:i.devMode,onCheckedChange:P})}),e[23]=i.devMode,e[24]=P,e[25]=k):k=e[25];let $;e[26]!==w||e[27]!==k?($=n.jsxs("div",{className:"flex flex-col gap-2",children:[C,n.jsxs("button",{type:"button",onClick:w,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[_,k]})]}),e[26]=w,e[27]=k,e[28]=$):$=e[28];let I,M;e[29]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Experimental"}),M=n.jsx("p",{className:"text-xs text-muted-foreground",children:"Experimental features are unstable and may change or stop working at any time."}),e[29]=I,e[30]=M):(I=e[29],M=e[30]);let T;e[31]!==a?(T=()=>a(Hn),e[31]=a,e[32]=T):T=e[32];let B;e[33]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(qe,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(xt,{size:16,className:"text-muted-foreground"}),"Projects"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the projects feature in the sidebar"})]}),e[33]=B):B=e[33];let E;e[34]!==a?(E=fe=>a(ue=>({...ue,experimental_projects:fe})),e[34]=a,e[35]=E):E=e[35];let D;e[36]!==i.experimental_projects||e[37]!==E?(D=n.jsx("div",{onClick:Rn,children:n.jsx(Je,{checked:i.experimental_projects,onCheckedChange:E})}),e[36]=i.experimental_projects,e[37]=E,e[38]=D):D=e[38];let R;e[39]!==T||e[40]!==D?(R=n.jsxs("button",{type:"button",onClick:T,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[B,D]}),e[39]=T,e[40]=D,e[41]=R):R=e[41];let A;e[42]!==a?(A=()=>a(Dn),e[42]=a,e[43]=A):A=e[43];let H;e[44]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(qe,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(kt,{size:16,className:"text-muted-foreground"}),"Tasks"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the tasks feature in the sidebar"})]}),e[44]=H):H=e[44];let F;e[45]!==a?(F=fe=>a(ue=>({...ue,experimental_tasks:fe})),e[45]=a,e[46]=F):F=e[46];let U;e[47]!==i.experimental_tasks||e[48]!==F?(U=n.jsx("div",{onClick:Ln,children:n.jsx(Je,{checked:i.experimental_tasks,onCheckedChange:F})}),e[47]=i.experimental_tasks,e[48]=F,e[49]=U):U=e[49];let W;e[50]!==A||e[51]!==U?(W=n.jsxs("button",{type:"button",onClick:A,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[H,U]}),e[50]=A,e[51]=U,e[52]=W):W=e[52];let V;e[53]!==R||e[54]!==W?(V=n.jsxs("div",{className:"flex flex-col gap-2",children:[I,M,R,W]}),e[53]=R,e[54]=W,e[55]=V):V=e[55];let Z;e[56]!==S||e[57]!==$||e[58]!==V?(Z=n.jsxs("div",{className:"p-5 space-y-6 min-h-[225px]",children:[S,$,V]}),e[56]=S,e[57]=$,e[58]=V,e[59]=Z):Z=e[59];let q;e[60]!==l.id?(q=n.jsx("span",{className:"font-mono text-xs",children:l.id}),e[60]=l.id,e[61]=q):q=e[61];let J;e[62]!==c?(J=c?n.jsx(Oe,{size:14,className:"text-green-600"}):n.jsx(It,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[62]=c,e[63]=J):J=e[63];let G;e[64]!==f||e[65]!==q||e[66]!==J?(G=n.jsx(Ue,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:f,className:"group flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[q,J]})}),e[64]=f,e[65]=q,e[66]=J,e[67]=G):G=e[67];let K;e[68]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx(He,{side:"top",children:n.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[68]=K):K=e[68];let X;e[69]!==G?(X=n.jsx(vt,{children:n.jsxs(Be,{children:[G,K]})}),e[69]=G,e[70]=X):X=e[70];let Y;e[71]===Symbol.for("react.memo_cache_sentinel")?(Y=n.jsxs("span",{className:"text-xs text-muted-foreground/75",children:["v","2.87.0"]}),e[71]=Y):Y=e[71];let O;e[72]!==X?(O=n.jsxs("div",{className:"border-t border-border px-5 py-4 flex items-center justify-between shrink-0",children:[X,Y]}),e[72]=X,e[73]=O):O=e[73];let L;e[74]!==Z||e[75]!==O?(L=n.jsxs(Rs,{className:"sm:max-w-lg sm:max-h-[85vh] p-0 flex flex-col",closeButtonClassName:"hidden",children:[p,n.jsxs("div",{className:"flex flex-col",children:[Z,O]})]}),e[74]=Z,e[75]=O,e[76]=L):L=e[76];let Q;return e[77]!==r||e[78]!==s||e[79]!==L?(Q=n.jsx(Hs,{open:s,onOpenChange:r,children:L}),e[77]=r,e[78]=s,e[79]=L,e[80]=Q):Q=e[80],Q}function Ln(t){return t.stopPropagation()}function Dn(t){return{...t,experimental_tasks:!t.experimental_tasks}}function Rn(t){return t.stopPropagation()}function Hn(t){return{...t,experimental_projects:!t.experimental_projects}}function Un(t){return t.stopPropagation()}function Bn(t){return{...t,devMode:!t.devMode}}function Xt(t){const e=N.c(77),{isCollapsed:s,variant:r,onCreateProject:l}=t,o=s===void 0?!1:s,i=r===void 0?"light":r,[a]=Ve();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const{org:d,project:m}=st(c),{data:f}=ie.useListOrganizations(),{data:u}=ie.useSession(),p=xe(),x=i==="dark",j=ae()?.project;let b;e[1]!==d||e[2]!==f?(b=f?.find(ne=>ne.slug===d),e[1]=d,e[2]=f,e[3]=b):b=e[3];const g=b,[v,S]=y.useState(!1),[C,w]=y.useState(!1),[_,P]=y.useState(!1),[k,$]=y.useState(null),I=u?.user,M=I?.image;let T;e[4]!==g||e[5]!==k||e[6]!==f?(T=k?f?.find(ne=>ne.id===k):g,e[4]=g,e[5]=k,e[6]=f,e[7]=T):T=e[7];const B=T;let E;e[8]!==p?(E=ne=>{S(!1),p({to:"/$org/$project/settings",params:{org:ne,project:ee}})},e[8]=p,e[9]=E):E=e[9];const D=E;let R;e[10]!==p?(R=ne=>{S(!1),p({to:"/$org/$project",params:{org:ne,project:ee}})},e[10]=p,e[11]=R):R=e[11];const A=R;let H;e[12]!==p?(H=(ne,Ye)=>{S(!1),p({to:"/$org/$project",params:{org:ne,project:Ye}})},e[12]=p,e[13]=H):H=e[13];const F=H;let U;e[14]!==p?(U=(ne,Ye)=>{S(!1),p({to:"/$org/$project/settings",params:{org:ne,project:Ye}})},e[14]=p,e[15]=U):U=e[15];const W=U;let V;e[16]!==l?(V=l?()=>{S(!1),l()}:void 0,e[16]=l,e[17]=V):V=e[17];const Z=V;let q;e[18]===Symbol.for("react.memo_cache_sentinel")?(q=ne=>{S(ne),ne||$(null)},e[18]=q):q=e[18];const J=q;let G;e[19]!==g?(G=()=>{g&&$(g.id)},e[19]=g,e[20]=G):G=e[20];const K=G,X=x?"hover:bg-zinc-800 text-white":"hover:bg-sidebar-accent",Y=o?"justify-center":"justify-start",O=o?"":"pl-0.5! px-1.5 gap-1.5";let L;e[21]!==X||e[22]!==Y||e[23]!==O?(L=z("h-7 min-w-0 max-w-full",X,Y,O),e[21]=X,e[22]=Y,e[23]=O,e[24]=L):L=e[24];const Q=g?.logo??"",fe=g?.name??"",ue=x&&"border-none";let he;e[25]!==ue?(he=z("shrink-0 rounded-[5px]",ue),e[25]=ue,e[26]=he):he=e[26];let ge;e[27]!==Q||e[28]!==fe||e[29]!==he?(ge=n.jsx(me,{url:Q,fallback:fe,size:"xs",className:he,objectFit:"cover"}),e[27]=Q,e[28]=fe,e[29]=he,e[30]=ge):ge=e[30];let je;e[31]!==g?.name||e[32]!==j||e[33]!==o||e[34]!==x?(je=!o&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"min-w-0 flex-1 text-left",children:x&&j?n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-[10px] text-zinc-500 leading-none truncate",children:g?.name??"Select org"}),n.jsx("p",{className:"text-sm text-white font-normal leading-tight mt-0.5 truncate",children:j.name??j.slug})]}):n.jsx("span",{className:"block truncate text-[14px] tracking-[-0.00625rem] font-medium text-foreground",children:g?.name??"Select org"})}),x?n.jsx(Nt,{className:"size-3 text-zinc-500 shrink-0"}):n.jsx(nt,{className:"size-3.5 text-muted-foreground shrink-0"})]}),e[31]=g?.name,e[32]=j,e[33]=o,e[34]=x,e[35]=je):je=e[35];let be;e[36]!==K||e[37]!==L||e[38]!==ge||e[39]!==je?(be=n.jsx(lt,{asChild:!0,children:n.jsxs(se,{variant:"ghost",size:"sm",onClick:K,className:L,children:[ge,je]})}),e[36]=K,e[37]=L,e[38]=ge,e[39]=je,e[40]=be):be=e[40];let ve;e[41]!==I||e[42]!==M?(ve=I&&n.jsx(zn,{user:I,userImage:M,onOpenSettings:()=>{w(!0),S(!1)}}),e[41]=I,e[42]=M,e[43]=ve):ve=e[43];let Ae,Le;e[44]===Symbol.for("react.memo_cache_sentinel")?(Ae=()=>S(!1),Le=()=>P(!0),e[44]=Ae,e[45]=Le):(Ae=e[44],Le=e[45]);let Ne;e[46]!==D||e[47]!==A||e[48]!==k||e[49]!==d?(Ne=n.jsx(On,{currentOrgSlug:d,hoveredOrgId:k,onOrgSelect:A,onOrgSettings:D,onPopoverClose:Ae,onCreateOrganization:Le,onOrgHover:$}),e[46]=D,e[47]=A,e[48]=k,e[49]=d,e[50]=Ne):Ne=e[50];let Se;e[51]!==Z||e[52]!==W||e[53]!==F||e[54]!==B||e[55]!==d||e[56]!==a.experimental_projects||e[57]!==m?(Se=a.experimental_projects&&B&&n.jsx(An,{organizationId:B.id,organizationName:B.name,orgSlug:B.slug,currentProjectSlug:B.slug===d?m:void 0,onProjectSelect:F,onProjectSettings:W,onCreateProject:Z}),e[51]=Z,e[52]=W,e[53]=F,e[54]=B,e[55]=d,e[56]=a.experimental_projects,e[57]=m,e[58]=Se):Se=e[58];let ye;e[59]!==ve||e[60]!==Ne||e[61]!==Se?(ye=n.jsxs(ot,{align:"start",side:"bottom",className:"p-0 flex w-auto h-88 overflow-hidden",children:[ve,Ne,Se]}),e[59]=ve,e[60]=Ne,e[61]=Se,e[62]=ye):ye=e[62];let we;e[63]!==v||e[64]!==be||e[65]!==ye?(we=n.jsxs(rt,{open:v,onOpenChange:J,children:[be,ye]}),e[63]=v,e[64]=be,e[65]=ye,e[66]=we):we=e[66];let Ce;e[67]!==C||e[68]!==I||e[69]!==M?(Ce=I&&C&&I.email&&n.jsx(Jt,{open:C,onOpenChange:w,user:{...I,name:I.name??void 0,email:I.email},userImage:M}),e[67]=C,e[68]=I,e[69]=M,e[70]=Ce):Ce=e[70];let ke;e[71]!==_?(ke=n.jsx($t,{open:_,onOpenChange:P}),e[71]=_,e[72]=ke):ke=e[72];let De;return e[73]!==we||e[74]!==Ce||e[75]!==ke?(De=n.jsxs(n.Fragment,{children:[we,Ce,ke]}),e[73]=we,e[74]=Ce,e[75]=ke,e[76]=De):De=e[76],De}Xt.Skeleton=function({variant:e="light"}){const s=e==="dark";return n.jsxs("div",{className:z("flex items-center gap-1.5 h-7 px-1.5 w-full",s&&"text-white"),children:[n.jsx(te,{className:z("size-5 rounded-[5px] shrink-0",s&&"bg-zinc-800")}),n.jsx(te,{className:z("h-3.5 flex-1",s&&"bg-zinc-800")})]})};function et(t){const e=N.c(71),{onCreateProject:s}=t,{state:r,toggleSidebar:l}=Ze(),o=r==="collapsed",[i,a]=Ge(),{locator:c}=ae();let d;e[0]!==c?(d=ze.isOrgAdminProject(c),e[0]=c,e[1]=d):d=e[1];const f=!d;let u;e[2]!==a?(u=()=>{a(Fn)},e[2]=a,e[3]=u):u=e[3];const p=u,x=f&&"bg-[#030302] border-b border-zinc-800";let h;e[4]!==x?(h=z("h-12 gap-0 pt-0 border-r",x),e[4]=x,e[5]=h):h=e[5];const j=o&&"group-hover/switcher:opacity-0 group-hover/switcher:pointer-events-none group-hover/switcher:invisible";let b;e[6]!==j?(b=z("w-full min-w-0 transition-opacity",j),e[6]=j,e[7]=b):b=e[7];const g=f?"dark":"light";let v;e[8]!==o||e[9]!==s||e[10]!==g?(v=n.jsx(Xt,{isCollapsed:o,variant:g,onCreateProject:s}),e[8]=o,e[9]=s,e[10]=g,e[11]=v):v=e[11];let S;e[12]!==b||e[13]!==v?(S=n.jsx("div",{className:b,children:v}),e[12]=b,e[13]=v,e[14]=S):S=e[14];const C=f?"hover:bg-zinc-800 text-zinc-400":"hover:bg-sidebar-accent",w=o?"opacity-0 invisible pointer-events-none group-hover/switcher:opacity-100 group-hover/switcher:visible group-hover/switcher:pointer-events-auto":"opacity-0 invisible pointer-events-none";let _;e[15]!==C||e[16]!==w?(_=z("absolute inset-0 m-auto size-7 transition-opacity",C,w),e[15]=C,e[16]=w,e[17]=_):_=e[17];const P=!o,k=f?"text-zinc-400":"text-muted-foreground";let $;e[18]!==k?($=z("size-4 shrink-0",k),e[18]=k,e[19]=$):$=e[19];let I;e[20]!==$?(I=n.jsx(Rt,{className:$}),e[20]=$,e[21]=I):I=e[21];let M;e[22]!==_||e[23]!==P||e[24]!==I||e[25]!==l?(M=n.jsx(se,{variant:"ghost",size:"icon",className:_,onClick:l,"aria-label":"Expand sidebar",disabled:P,children:I}),e[22]=_,e[23]=P,e[24]=I,e[25]=l,e[26]=M):M=e[26];let T;e[27]!==M||e[28]!==S?(T=n.jsxs("div",{className:"group/switcher relative flex items-center justify-center gap-1.5 min-w-0 flex-1 overflow-hidden",children:[S,M]}),e[27]=M,e[28]=S,e[29]=T):T=e[29];const B=o&&"hidden";let E;e[30]!==B?(E=z("flex items-center gap-0.5 shrink-0",B),e[30]=B,e[31]=E):E=e[31];const D=f?"hover:bg-zinc-800 text-zinc-400 hover:text-white":"hover:bg-sidebar-accent";let R;e[32]!==D?(R=z("size-7",D),e[32]=D,e[33]=R):R=e[33];const A=f?"text-zinc-400":"text-muted-foreground";let H;e[34]!==A?(H=z("size-4",A),e[34]=A,e[35]=H):H=e[35];let F;e[36]!==H?(F=n.jsx(Dt,{className:H}),e[36]=H,e[37]=F):F=e[37];let U;e[38]!==o||e[39]!==R||e[40]!==F||e[41]!==l?(U=n.jsx(Ue,{asChild:!0,children:n.jsx(se,{variant:"ghost",size:"icon",className:R,onClick:l,"aria-label":"Collapse sidebar",disabled:o,children:F})}),e[38]=o,e[39]=R,e[40]=F,e[41]=l,e[42]=U):U=e[42];let W;e[43]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(He,{side:"bottom",children:"Collapse sidebar"}),e[43]=W):W=e[43];let V;e[44]!==U?(V=n.jsxs(Be,{children:[U,W]}),e[44]=U,e[45]=V):V=e[45];let Z;e[46]!==i||e[47]!==f?(Z=z("size-7",f?z("hover:bg-zinc-800 text-zinc-400 hover:text-white",i&&"bg-zinc-800 text-white"):z("hover:bg-sidebar-accent",i&&"bg-sidebar-accent")),e[46]=i,e[47]=f,e[48]=Z):Z=e[48];const q=f?"text-inherit":"text-muted-foreground";let J;e[49]!==q?(J=z(q),e[49]=q,e[50]=J):J=e[50];let G;e[51]!==J?(G=n.jsx(St,{size:11,className:J}),e[51]=J,e[52]=G):G=e[52];let K;e[53]!==o||e[54]!==Z||e[55]!==G||e[56]!==p?(K=n.jsx(Ue,{asChild:!0,children:n.jsx(se,{variant:"ghost",size:"icon",className:Z,onClick:p,"aria-label":"Toggle Decopilot",disabled:o,children:G})}),e[53]=o,e[54]=Z,e[55]=G,e[56]=p,e[57]=K):K=e[57];let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(He,{side:"bottom",children:"Toggle Decopilot"}),e[58]=X):X=e[58];let Y;e[59]!==K?(Y=n.jsxs(Be,{children:[K,X]}),e[59]=K,e[60]=Y):Y=e[60];let O;e[61]!==E||e[62]!==V||e[63]!==Y?(O=n.jsxs("div",{className:E,children:[V,Y]}),e[61]=E,e[62]=V,e[63]=Y,e[64]=O):O=e[64];let L;e[65]!==T||e[66]!==O?(L=n.jsx(pe,{children:n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[T,O]})})}),e[65]=T,e[66]=O,e[67]=L):L=e[67];let Q;return e[68]!==L||e[69]!==h?(Q=n.jsx(Zt,{className:h,children:L}),e[68]=L,e[69]=h,e[70]=Q):Q=e[70],Q}function Fn(t){return!t}et.Skeleton=function({isDark:e=!1}){return n.jsx(Zt,{className:z("h-12 gap-0 pt-0",e&&"bg-[#030302] border-b border-zinc-800"),children:n.jsx(pe,{children:n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1 px-1.5",children:[n.jsx(te,{className:z("size-5 rounded-[5px] shrink-0",e&&"bg-zinc-800")}),n.jsx(te,{className:z("h-3.5 w-16",e&&"bg-zinc-800")})]}),n.jsxs("div",{className:"flex items-center gap-0.5",children:[n.jsx(te,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")}),n.jsx(te,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")})]})]})})})})};function Wn(){const t=N.c(10),{locator:e}=ae(),s=xe(),l=We().location.pathname;let o;t[0]!==l?(o=l.includes("/settings"),t[0]=l,t[1]=o):o=t[1];const i=o;let a;t[2]!==e||t[3]!==s?(a=()=>{s({to:"/$org/$project/settings",params:ze.parse(e)})},t[2]=e,t[3]=s,t[4]=a):a=t[4];const c=a;let d,m;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:n.jsx(it,{})}),m=n.jsx("span",{className:"truncate",children:"Settings"}),t[5]=d,t[6]=m):(d=t[5],m=t[6]);let f;return t[7]!==c||t[8]!==i?(f=n.jsx(gn,{className:"py-2 border-r",children:n.jsx(pe,{children:n.jsx(oe,{children:n.jsxs(Ee,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:c,isActive:i,tooltip:"Settings",children:[d,m]})})})}),t[7]=c,t[8]=i,t[9]=f):f=t[9],f}function Qt(t){const e=N.c(4),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(at,{className:"my-2 -ml-1"}),e[0]=r):r=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(oe,{children:n.jsx("div",{className:"group-data-[collapsible=icon]:hidden px-2 py-0 text-xs font-medium h-6 text-muted-foreground flex items-center justify-between",children:n.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=l):l=e[1];let o;return e[2]!==s?(o=n.jsxs(n.Fragment,{children:[r,l,s]}),e[2]=s,e[3]=o):o=e[3],o}function Vn(t){const e=N.c(26),{item:s}=t,r=xe(),{org:l}=ae(),o=Ot(l.id),i=Bs(l.id);let a;e[0]!==i.update||e[1]!==s.url||e[2]!==o?.sidebar_items?(a=async()=>{const S=(o?.sidebar_items||[]).filter(C=>C.url!==s.url);await i.update.mutateAsync({sidebar_items:S})},e[0]=i.update,e[1]=s.url,e[2]=o?.sidebar_items,e[3]=a):a=e[3];const c=a;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=/^https?:\/\/.+/,e[4]=d):d=e[4];let m;e[5]!==s.icon?(m=d.test(s.icon),e[5]=s.icon,e[6]=m):m=e[6];const f=m;let u;e[7]!==s.url||e[8]!==r?(u=()=>{r({to:s.url})},e[7]=s.url,e[8]=r,e[9]=u):u=e[9];const p=s.title;let x;e[10]!==f||e[11]!==s.icon||e[12]!==s.title?(x=n.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?n.jsx("img",{src:s.icon,alt:s.title,className:"h-4 w-4 rounded object-cover"}):n.jsx(Fs,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=f,e[11]=s.icon,e[12]=s.title,e[13]=x):x=e[13];let h;e[14]!==s.title?(h=s.title.toLocaleLowerCase(),e[14]=s.title,e[15]=h):h=e[15];let j;e[16]!==h?(j=n.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:n.jsx("span",{className:"truncate text-sm w-full capitalize",children:h})}),e[16]=h,e[17]=j):j=e[17];let b;e[18]!==c?(b=n.jsx(Fe,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:v=>{v.preventDefault(),v.stopPropagation(),c()}}),e[18]=c,e[19]=b):b=e[19];let g;return e[20]!==s.title||e[21]!==u||e[22]!==x||e[23]!==j||e[24]!==b?(g=n.jsx(oe,{children:n.jsxs(Ee,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:p,children:[x,j,b]})}),e[20]=s.title,e[21]=u,e[22]=x,e[23]=j,e[24]=b,e[25]=g):g=e[25],g}function pt(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(oe,{children:n.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:n.jsx(te,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function Gn(){const t=N.c(4),{org:e}=ae(),r=Ot(e.id)?.sidebar_items;if(!r?.length)return null;let l;t[0]!==r?(l=r.map(Kn),t[0]=r,t[1]=l):l=t[1];let o;return t[2]!==l?(o=n.jsx(Qt,{children:l}),t[2]=l,t[3]=o):o=t[3],o}function Kn(t){return n.jsx(Vn,{item:t},t.url)}function Zn(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(y.Suspense,{fallback:n.jsxs(Qt,{children:[n.jsx(pt,{}),n.jsx(pt,{})]}),children:n.jsx(Gn,{})}),t[0]=e):e=t[0],e}function Yn(t){const e=N.c(11),{project:s}=t,r=s.ui?.themeColor??"#60a5fa";if(s.ui?.icon){let c;return e[0]!==s.ui.icon?(c=n.jsx("img",{src:s.ui.icon,alt:"",className:"size-4 rounded object-cover border border-border/50"}),e[0]=s.ui.icon,e[1]=c):c=e[1],c}let l;e[2]!==r?(l={backgroundColor:r},e[2]=r,e[3]=l):l=e[3];let o;e[4]!==s.name?(o=s.name.charAt(0).toUpperCase(),e[4]=s.name,e[5]=o):o=e[5];let i;e[6]!==o?(i=n.jsx("span",{className:"text-[10px] font-medium text-white",children:o}),e[6]=o,e[7]=i):i=e[7];let a;return e[8]!==l||e[9]!==i?(a=n.jsx("div",{className:"size-4 rounded flex items-center justify-center border border-border/50",style:l,children:i}),e[8]=l,e[9]=i,e[10]=a):a=e[10],a}function qn(t){const e=N.c(14),{project:s}=t,r=xe(),{org:l}=ae();let o;e[0]!==r||e[1]!==l.slug||e[2]!==s.slug?(o=()=>{r({to:"/$org/$project",params:{org:l.slug,project:s.slug}})},e[0]=r,e[1]=l.slug,e[2]=s.slug,e[3]=o):o=e[3];let i;e[4]!==s?(i=n.jsx(Yn,{project:s}),e[4]=s,e[5]=i):i=e[5];let a;e[6]!==s.name?(a=n.jsx("span",{className:"truncate flex-1",children:s.name}),e[6]=s.name,e[7]=a):a=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(zt,{size:12,className:"text-muted-foreground opacity-0 group-hover/item:opacity-100 transition-opacity"}),e[8]=c):c=e[8];let d;return e[9]!==s.name||e[10]!==o||e[11]!==i||e[12]!==a?(d=n.jsx(oe,{children:n.jsxs(Ee,{className:"group/item cursor-pointer text-foreground/90 hover:text-foreground",onClick:o,tooltip:s.name,children:[i,a,c]})}),e[9]=s.name,e[10]=o,e[11]=i,e[12]=a,e[13]=d):d=e[13],d}function Jn(){const t=N.c(54),{org:e}=ae(),{data:s,isLoading:r}=_t(e.id),[l,o]=y.useState(!0),[i,a]=y.useState(!1);let c,d,m,f,u,p,x,h,j,b,g,v,S;if(t[0]!==r||t[1]!==l||t[2]!==s){S=Symbol.for("react.early_return_sentinel");e:{const M=s?.filter(Qn)??[];if(r){let H;t[16]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(te,{className:"h-4 w-4 rounded"}),n.jsx(te,{className:"h-4 flex-1"})]})}),t[16]=H):H=t[16];let F;t[17]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(Pe,{className:"py-0",children:n.jsx(Te,{children:n.jsxs(pe,{className:"gap-0.5",children:[H,n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(te,{className:"h-4 w-4 rounded"}),n.jsx(te,{className:"h-4 flex-1"})]})})]})})}),t[17]=F):F=t[17],S=F;break e}t[18]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(at,{className:"my-2"}),t[18]=v):v=t[18],u=Ss,b=l,g=o,f=Pe,j="py-0",m=Te,d=pe,x="gap-0.5";let T;t[19]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx("span",{children:"Projects"}),t[19]=T):T=t[19];const B=!l&&"-rotate-90";let E;t[20]!==B?(E=z("transition-transform",B),t[20]=B,t[21]=E):E=t[21];let D;t[22]!==E?(D=n.jsx(ys,{asChild:!0,children:n.jsxs("button",{type:"button",className:"flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors",children:[T,n.jsx(nt,{size:12,className:E})]})}),t[22]=E,t[23]=D):D=t[23];let R;t[24]===Symbol.for("react.memo_cache_sentinel")?(R=()=>a(!0),t[24]=R):R=t[24];let A;t[25]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("button",{type:"button",onClick:R,className:"text-muted-foreground hover:text-foreground transition-colors p-0.5 rounded hover:bg-accent",title:"Create new project",children:n.jsx(Ke,{size:16})}),t[25]=A):A=t[25],t[26]!==D?(h=n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center justify-between px-2 h-6",children:[D,A]})}),t[26]=D,t[27]=h):h=t[27],c=ws,p=M.length===0?n.jsx(oe,{children:n.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:"No projects yet"})}):M.map(Xn)}t[0]=r,t[1]=l,t[2]=s,t[3]=c,t[4]=d,t[5]=m,t[6]=f,t[7]=u,t[8]=p,t[9]=x,t[10]=h,t[11]=j,t[12]=b,t[13]=g,t[14]=v,t[15]=S}else c=t[3],d=t[4],m=t[5],f=t[6],u=t[7],p=t[8],x=t[9],h=t[10],j=t[11],b=t[12],g=t[13],v=t[14],S=t[15];if(S!==Symbol.for("react.early_return_sentinel"))return S;let C;t[28]!==c||t[29]!==p?(C=n.jsx(c,{children:p}),t[28]=c,t[29]=p,t[30]=C):C=t[30];let w;t[31]!==d||t[32]!==x||t[33]!==h||t[34]!==C?(w=n.jsxs(d,{className:x,children:[h,C]}),t[31]=d,t[32]=x,t[33]=h,t[34]=C,t[35]=w):w=t[35];let _;t[36]!==m||t[37]!==w?(_=n.jsx(m,{children:w}),t[36]=m,t[37]=w,t[38]=_):_=t[38];let P;t[39]!==f||t[40]!==_||t[41]!==j?(P=n.jsx(f,{className:j,children:_}),t[39]=f,t[40]=_,t[41]=j,t[42]=P):P=t[42];let k;t[43]!==u||t[44]!==P||t[45]!==b||t[46]!==g?(k=n.jsx(u,{open:b,onOpenChange:g,children:P}),t[43]=u,t[44]=P,t[45]=b,t[46]=g,t[47]=k):k=t[47];let $;t[48]!==i?($=n.jsx(Ct,{open:i,onOpenChange:a}),t[48]=i,t[49]=$):$=t[49];let I;return t[50]!==k||t[51]!==$||t[52]!==v?(I=n.jsxs(n.Fragment,{children:[v,k,$]}),t[50]=k,t[51]=$,t[52]=v,t[53]=I):I=t[53],I}function Xn(t){return n.jsx(qn,{project:t},t.id)}function Qn(t){return t.slug!==ee}function er(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(y.Suspense,{fallback:n.jsx(Pe,{className:"py-0",children:n.jsx(Te,{children:n.jsx(pe,{className:"gap-0.5",children:n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(te,{className:"h-4 w-4 rounded"}),n.jsx(te,{className:"h-4 flex-1"})]})})})})}),children:n.jsx(Jn,{})}),t[0]=e):e=t[0],e}function tr(t){const e=N.c(16),{onCreateProject:s}=t,[r]=Ve(),l=nn(),{locator:o}=ae();let i;e[0]!==o?(i=ze.isOrgAdminProject(o),e[0]=o,e[1]=i):i=e[1];const a=i;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(et.Skeleton,{}),e[2]=c):c=e[2];let d;e[3]!==s?(d=n.jsx(y.Suspense,{fallback:c,children:n.jsx(et,{onCreateProject:s})}),e[3]=s,e[4]=d):d=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(Wn,{}),e[5]=m):m=e[5];let f;e[6]!==a||e[7]!==r?(f=a?r.experimental_projects?n.jsx(er,{}):null:n.jsx(Zn,{}),e[6]=a,e[7]=r,e[8]=f):f=e[8];let u;e[9]!==f?(u=n.jsx(wt,{children:n.jsx(y.Suspense,{fallback:null,children:f})}),e[9]=f,e[10]=u):u=e[10];const p=a?void 0:"pt-3";let x;return e[11]!==l||e[12]!==d||e[13]!==u||e[14]!==p?(x=n.jsx(qt,{sections:l,header:d,footer:m,additionalContent:u,contentClassName:p}),e[11]=l,e[12]=d,e[13]=u,e[14]=p,e[15]=x):x=e[15],x}function sr(t){const e=N.c(12);let s,r,l,o;e[0]!==t?({className:s,orientation:l,decorative:o,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o):(s=e[1],r=e[2],l=e[3],o=e[4]);const i=l===void 0?"horizontal":l,a=o===void 0?!0:o;let c;e[5]!==s?(c=z("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",s),e[5]=s,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==i||e[9]!==r||e[10]!==c?(d=n.jsx(ds,{"data-slot":"separator-root",decorative:a,orientation:i,className:c,...r}),e[7]=a,e[8]=i,e[9]=r,e[10]=c,e[11]=d):d=e[11],d}const es=y.createContext(null);function nr(){const t=y.useContext(es);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function rr(t){const e=N.c(10),{children:s,onItemHover:r}=t,[l,o]=y.useState(null);let i;e[0]!==r?(i=f=>{o(f),r?.(f)},e[0]=r,e[1]=i):i=e[1];const a=i;let c;e[2]!==l||e[3]!==a?(c={hoveredItem:l,setHoveredItem:a},e[2]=l,e[3]=a,e[4]=c):c=e[4];let d;e[5]!==s?(d=n.jsx(rt,{children:s}),e[5]=s,e[6]=d):d=e[6];let m;return e[7]!==c||e[8]!==d?(m=n.jsx(es.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=m):m=e[9],m}function lr(t){const e=N.c(6),{children:s,onClick:r}=t;let l;e[0]!==s||e[1]!==r?(l=n.jsx(se,{variant:"link",className:"p-0.5 h-auto",onClick:r,type:"button",children:s}),e[0]=s,e[1]=r,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(lt,{asChild:!0,children:n.jsx(se,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:n.jsx(Nt,{size:16,className:"opacity-50"})})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=n.jsxs("div",{className:"flex items-center gap-1",children:[l,o]}),e[4]=l,e[5]=i):i=e[5],i}function or(t){const e=N.c(8),{item:s,fallback:r}=t,l=r===void 0?"":r,o=s?.avatarUrl??"",i=s?.name??l;let a;e[0]!==o||e[1]!==i?(a=n.jsx(me,{url:o,fallback:i,size:"xs",objectFit:"contain"}),e[0]=o,e[1]=i,e[2]=a):a=e[2];const c=s?.name??l;let d;e[3]!==c?(d=n.jsx("span",{children:c}),e[3]=c,e[4]=d):d=e[4];let m;return e[5]!==a||e[6]!==d?(m=n.jsxs("div",{className:"flex items-center gap-2",children:[a,d]}),e[5]=a,e[6]=d,e[7]=m):m=e[7],m}function ir(t){const e=N.c(6),{children:s,align:r}=t,l=r===void 0?"start":r,i=y.Children.toArray(s).filter(ar).length===1?"280px":"480px";let a;e[0]!==i?(a={width:i},e[0]=i,e[1]=a):a=e[1];let c;return e[2]!==l||e[3]!==s||e[4]!==a?(c=n.jsx(ot,{align:l,className:"p-0 flex items-start",style:a,children:s}),e[2]=l,e[3]=s,e[4]=a,e[5]=c):c=e[5],c}function ar(t){return y.isValidElement(t)&&(t.type===ss||t.type===ts)}function ts(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}const ss=ts;function cr(t){const e=N.c(6),{placeholder:s,value:r,onChange:l}=t,o=s===void 0?"Search...":s;let i;e[0]!==l?(i=c=>l(c.target.value),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==o||e[3]!==i||e[4]!==r?(a=n.jsx(Ws,{placeholder:o,value:r,onChange:i,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=o,e[3]=i,e[4]=r,e[5]=a):a=e[5],a}function dr(t){const e=N.c(6),{children:s,emptyMessage:r}=t,l=r===void 0?"No items found.":r,o=y.Children.count(s)>0;let i;e[0]!==l||e[1]!==o?(i=!o&&n.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:l}),e[0]=l,e[1]=o,e[2]=i):i=e[2];let a;return e[3]!==s||e[4]!==i?(a=n.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[i,s]}),e[3]=s,e[4]=i,e[5]=a):a=e[5],a}function mr(t){const e=N.c(15),{item:s,onClick:r,onHover:l,children:o}=t,i=nr();let a;e[0]!==i||e[1]!==s||e[2]!==l?(a=()=>{i.setHoveredItem(s.slug),l?.(s)},e[0]=i,e[1]=s,e[2]=l,e[3]=a):a=e[3];const c=a;let d;e[4]!==s||e[5]!==r?(d=()=>r(s),e[4]=s,e[5]=r,e[6]=d):d=e[6];let m;e[7]!==o||e[8]!==s.avatarUrl||e[9]!==s.name?(m=o||n.jsxs(n.Fragment,{children:[n.jsx(me,{url:s.avatarUrl??"",fallback:s.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),n.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:s.name})]}),e[7]=o,e[8]=s.avatarUrl,e[9]=s.name,e[10]=m):m=e[10];let f;return e[11]!==c||e[12]!==d||e[13]!==m?(f=n.jsx(se,{onClick:d,onMouseEnter:c,variant:"ghost",size:"sm",className:"w-full justify-start font-normal",children:m}),e[11]=c,e[12]=d,e[13]=m,e[14]=f):f=e[14],f}function fr(t){const e=N.c(2),{children:s}=t;let r;return e[0]!==s?(r=n.jsx("div",{className:"px-1 pb-1 pt-0.5",children:s}),e[0]=s,e[1]=r):r=e[1],r}function ur(t){const e=N.c(11),{onClick:s,icon:r,children:l,variant:o}=t,a=(o===void 0?"default":o)==="muted"&&"text-muted-foreground";let c;e[0]!==a?(c=z("w-full justify-start font-normal",a),e[0]=a,e[1]=c):c=e[1];let d;e[2]!==r?(d=r&&n.jsx("span",{className:"[&>svg]:size-4",children:r}),e[2]=r,e[3]=d):d=e[3];let m;e[4]!==l?(m=n.jsx("span",{children:l}),e[4]=l,e[5]=m):m=e[5];let f;return e[6]!==s||e[7]!==c||e[8]!==d||e[9]!==m?(f=n.jsxs(se,{variant:"ghost",size:"sm",className:c,onClick:s,children:[d,m]}),e[6]=s,e[7]=c,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}function pr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(sr,{}),t[0]=e):e=t[0],e}function xr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const re=Object.assign(rr,{Trigger:lr,CurrentItem:or,Content:ir,Panel:ss,Search:cr,Items:dr,Item:mr,Actions:fr,Action:ur,Separator:pr,Skeleton:xr});function tt(){const t=N.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=st(e),{data:r}=ie.useListOrganizations(),l=xe();let o;t[1]!==s||t[2]!==r?(o=r?.find(B=>B.slug===s),t[1]=s,t[2]=r,t[3]=o):o=t[3];const i=o,[a,c]=y.useState(""),[d,m]=y.useState(!1);let f,u,p,x,h,j,b,g;if(t[4]!==i||t[5]!==l||t[6]!==s||t[7]!==a||t[8]!==r){const E=(r?(()=>{const U=r.filter(W=>W.name.toLowerCase().includes(a.toLowerCase()));if(s){const W=U.findIndex(V=>V.slug===s);if(W>0){const V=U[W];V&&(U.splice(W,1),U.unshift(V))}}return U})():[]).map(hr);let D;t[17]!==i?(D=i?{slug:i.slug,name:i.name,avatarUrl:i.logo}:void 0,t[17]=i,t[18]=D):D=t[18];const R=D;x=re;let A;t[19]!==l||t[20]!==s?(A=()=>l({to:"/$org",params:{org:s??""}}),t[19]=l,t[20]=s,t[21]=A):A=t[21];let H;t[22]!==R?(H=n.jsx(re.CurrentItem,{item:R}),t[22]=R,t[23]=H):H=t[23],t[24]!==A||t[25]!==H?(g=n.jsx(re.Trigger,{onClick:A,children:H}),t[24]=A,t[25]=H,t[26]=g):g=t[26],p=re.Content,u=re.Panel,t[27]!==a?(b=n.jsx(re.Search,{placeholder:"Search organizations...",value:a,onChange:c}),t[27]=a,t[28]=b):b=t[28],f=re.Items,h="No organizations found.";let F;t[29]!==l?(F=U=>n.jsx(re.Item,{item:U,onClick:W=>l({to:"/$org",params:{org:W.slug}})},U.slug),t[29]=l,t[30]=F):F=t[30],j=E.map(F),t[4]=i,t[5]=l,t[6]=s,t[7]=a,t[8]=r,t[9]=f,t[10]=u,t[11]=p,t[12]=x,t[13]=h,t[14]=j,t[15]=b,t[16]=g}else f=t[9],u=t[10],p=t[11],x=t[12],h=t[13],j=t[14],b=t[15],g=t[16];let v;t[31]!==f||t[32]!==h||t[33]!==j?(v=n.jsx(f,{emptyMessage:h,children:j}),t[31]=f,t[32]=h,t[33]=j,t[34]=v):v=t[34];let S,C;t[35]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(re.Actions,{children:n.jsx(re.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),C=n.jsx(re.Separator,{}),t[35]=S,t[36]=C):(S=t[35],C=t[36]);let w;t[37]!==l?(w=()=>l({to:"/"}),t[37]=l,t[38]=w):w=t[38];let _;t[39]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(Vs,{}),t[39]=_):_=t[39];let P;t[40]!==w?(P=n.jsx(re.Actions,{children:n.jsx(re.Action,{onClick:w,icon:_,children:"See all organizations"})}),t[40]=w,t[41]=P):P=t[41];let k;t[42]!==u||t[43]!==P||t[44]!==b||t[45]!==v?(k=n.jsxs(u,{children:[b,v,S,C,P]}),t[42]=u,t[43]=P,t[44]=b,t[45]=v,t[46]=k):k=t[46];let $;t[47]!==p||t[48]!==k?($=n.jsx(p,{children:k}),t[47]=p,t[48]=k,t[49]=$):$=t[49];let I;t[50]!==x||t[51]!==$||t[52]!==g?(I=n.jsxs(x,{children:[g,$]}),t[50]=x,t[51]=$,t[52]=g,t[53]=I):I=t[53];let M;t[54]!==d?(M=n.jsx($t,{open:d,onOpenChange:m}),t[54]=d,t[55]=M):M=t[55];let T;return t[56]!==I||t[57]!==M?(T=n.jsxs(n.Fragment,{children:[I,M]}),t[56]=I,t[57]=M,t[58]=T):T=t[58],T}function hr(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}tt.Skeleton=re.Skeleton;function gr(){const t=N.c(10),{locator:e}=ae(),s=Gs();if(ze.isOrgAdminProject(e))return null;const l=s?.leftRef;let o;t[0]!==l?(o=n.jsx("div",{ref:l,className:"flex items-center gap-2 flex-1 min-w-0"}),t[0]=l,t[1]=o):o=t[1];const i=s?.centerRef;let a;t[2]!==i?(a=n.jsx("div",{ref:i,className:"flex flex-1 h-full items-center justify-center px-4 min-w-0 [&:empty]:hidden"}),t[2]=i,t[3]=a):a=t[3];const c=s?.rightRef;let d;t[4]!==c?(d=n.jsx("div",{ref:c,className:"flex flex-1 gap-2 h-full items-center justify-end min-w-0 [&:empty]:hidden"}),t[4]=c,t[5]=d):d=t[5];let m;return t[6]!==o||t[7]!==a||t[8]!==d?(m=n.jsx("div",{className:"dark",children:n.jsxs("header",{className:"sticky top-0 z-50 h-12 bg-background flex items-center px-4 shrink-0",children:[o,a,d]})}),t[6]=o,t[7]=a,t[8]=d,t[9]=m):m=t[9],m}function jr({prop:t,defaultProp:e,onChange:s=()=>{}}){const[r,l]=br({defaultProp:e,onChange:s}),o=t!==void 0,i=o?t:r,a=gt(s),c=y.useCallback(d=>{if(o){const f=typeof d=="function"?d(t):d;f!==t&&a(f)}else l(d)},[o,t,l,a]);return[i,c]}function br({defaultProp:t,onChange:e}){const s=y.useState(t),[r]=s,l=y.useRef(r),o=gt(e);return y.useEffect(()=>{l.current!==r&&(o(r),l.current=r)},[r,l,o]),s}function vr(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx($e.Root,{"data-slot":"drawer",...s}),e[2]=s,e[3]=r):r=e[3],r}function Nr(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx($e.Trigger,{"data-slot":"drawer-trigger",...s}),e[2]=s,e[3]=r):r=e[3],r}function Sr(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx($e.Portal,{"data-slot":"drawer-portal",...s}),e[2]=s,e[3]=r):r=e[3],r}function yr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx($e.Overlay,{"data-slot":"drawer-overlay",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function wr(t){const e=N.c(12);let s,r,l;e[0]!==t?({className:r,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l):(s=e[1],r=e[2],l=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(yr,{}),e[4]=o):o=e[4];let i;e[5]!==r?(i=z("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",r),e[5]=r,e[6]=i):i=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=a):a=e[7];let c;return e[8]!==s||e[9]!==l||e[10]!==i?(c=n.jsxs(Sr,{"data-slot":"drawer-portal",children:[o,n.jsxs($e.Content,{"data-slot":"drawer-content",className:i,...l,children:[a,s]})]}),e[8]=s,e[9]=l,e[10]=i,e[11]=c):c=e[11],c}function Cr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-1.5 px-4 py-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"drawer-header",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function kr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("text-foreground font-semibold",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx($e.Title,{"data-slot":"drawer-title",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}const ns=y.createContext({setOpen:()=>{}}),_r=()=>y.useContext(ns),zr=t=>{const e=N.c(25);let s,r,l,o,i;e[0]!==t?({children:s,defaultOpen:r,open:o,onOpenChange:l,...i}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5]);const a=r??!1;let c;e[6]!==l||e[7]!==o||e[8]!==a?(c={prop:o,defaultProp:a,onChange:l},e[6]=l,e[7]=o,e[8]=a,e[9]=c):c=e[9];const[d,m]=jr(c);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let u;e[12]!==s||e[13]!==d||e[14]!==i||e[15]!==m?(u=n.jsx(vr,{open:d,onOpenChange:m,...i,children:s}),e[12]=s,e[13]=d,e[14]=i,e[15]=m,e[16]=u):u=e[16];let p;e[17]!==d||e[18]!==i||e[19]!==m||e[20]!==u?(p=n.jsx(qs,{open:d,onOpenChange:m,...i,children:u}),e[17]=d,e[18]=i,e[19]=m,e[20]=u,e[21]=p):p=e[21];let x;return e[22]!==f||e[23]!==p?(x=n.jsx(ns.Provider,{value:f,children:p}),e[22]=f,e[23]=p,e[24]=x):x=e[24],x},$r=t=>{const{children:e,title:s,...r}=t,l=Me(),{className:o,...i}=r;return l?n.jsxs(wr,{...i,children:[n.jsx(Cr,{className:"hidden",children:n.jsx(kr,{children:s})}),n.jsx("div",{className:z("flex flex-col gap-2 p-2 py-4",o),children:e})]}):n.jsx(Ys,{...r,children:e})},Ir=t=>{const{children:e,...s}=t,{setOpen:r}=_r(),l=Me(),{className:o,...i}=s;return l?n.jsx("div",{...i,onClick:a=>{r(!1);const{onClick:c}=i;c?.(a)},className:z("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),children:e}):n.jsx(Js,{...s,children:e})},Or=t=>{const e=N.c(7);let s,r;e[0]!==t?({children:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);const l=Me();let o;return e[3]!==s||e[4]!==l||e[5]!==r?(o=l?n.jsx(Nr,{asChild:!0,children:s}):n.jsx(Zs,{...r,children:s}),e[3]=s,e[4]=l,e[5]=r,e[6]=o):o=e[6],o},Pr=t=>{const e=N.c(7);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);const l=Me();let o;return e[3]!==s||e[4]!==l||e[5]!==r?(o=l?n.jsx(ft,{className:z(s),...r}):n.jsx(ft,{className:z(s),...r}),e[3]=s,e[4]=l,e[5]=r,e[6]=o):o=e[6],o};function Tr(t){const e=N.c(11),{user:s,trigger:r,align:l,children:o}=t,i=l===void 0?"start":l;let a;e[0]!==r||e[1]!==s?(a=r(s),e[0]=r,e[1]=s,e[2]=a):a=e[2];let c;e[3]!==a?(c=n.jsx(Or,{asChild:!0,children:n.jsx("div",{children:a})}),e[3]=a,e[4]=c):c=e[4];let d;e[5]!==i||e[6]!==o?(d=n.jsx($r,{side:"top",align:i,className:"md:w-[240px]",children:o}),e[5]=i,e[6]=o,e[7]=d):d=e[7];let m;return e[8]!==c||e[9]!==d?(m=n.jsxs(zr,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}function Mr(t){const e=N.c(8),{children:s,onClick:r,className:l,asChild:o}=t;let i;e[0]!==o||e[1]!==s||e[2]!==r?(i=o?s:n.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:r,children:s}),e[0]=o,e[1]=s,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==o||e[5]!==l||e[6]!==i?(a=n.jsx(Ir,{asChild:o,className:l,children:i}),e[4]=o,e[5]=l,e[6]=i,e[7]=a):a=e[7],a}function Er(t){const e=N.c(2),{className:s}=t;let r;return e[0]!==s?(r=n.jsx(Pr,{className:s}),e[0]=s,e[1]=r):r=e[1],r}function Ar(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const ce=Object.assign(Tr,{Item:Mr,Separator:Er,Skeleton:Ar});function Lr(t){const e=N.c(49),{user:s,userImage:r}=t,[l,o]=y.useState(!1),[i,a]=y.useState(!1);let c;e[0]!==s.email||e[1]!==s.id||e[2]!==s.name?(c=()=>{const A=`ID: ${s.id}
|
|
4
|
+
Name: ${s.name||"N/A"}
|
|
5
|
+
Email: ${s.email}`;navigator.clipboard.writeText(A),a(!0),de.success("User info copied to clipboard"),setTimeout(()=>a(!1),2e3)},e[0]=s.email,e[1]=s.id,e[2]=s.name,e[3]=c):c=e[3];const d=c;let m;e[4]!==s.email||e[5]!==s.name||e[6]!==r?(m=()=>n.jsx(me,{url:r,fallback:s.name||s.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all h-7 w-7"}),e[4]=s.email,e[5]=s.name,e[6]=r,e[7]=m):m=e[7];const f=s.name||s.email||"U";let u;e[8]!==f||e[9]!==r?(u=n.jsx(me,{url:r,fallback:f,shape:"circle",size:"sm"}),e[8]=f,e[9]=r,e[10]=u):u=e[10];const p=s.name||"User";let x;e[11]!==p?(x=n.jsx("div",{className:"text-sm font-medium truncate",children:p}),e[11]=p,e[12]=x):x=e[12];let h;e[13]!==s.email?(h=n.jsx("div",{className:"text-xs text-muted-foreground truncate",children:s.email}),e[13]=s.email,e[14]=h):h=e[14];let j;e[15]!==x||e[16]!==h?(j=n.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[x,h]}),e[15]=x,e[16]=h,e[17]=j):j=e[17];let b;e[18]!==i?(b=n.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:i?n.jsx(Oe,{size:16,className:"text-green-600"}):n.jsx(It,{size:16,className:"text-muted-foreground"})}),e[18]=i,e[19]=b):b=e[19];let g;e[20]!==u||e[21]!==j||e[22]!==b?(g=n.jsxs("div",{className:"group flex items-center gap-3 w-full py-1",children:[u,j,b]}),e[20]=u,e[21]=j,e[22]=b,e[23]=g):g=e[23];let v;e[24]!==d||e[25]!==g?(v=n.jsx(ce.Item,{onClick:d,children:g}),e[24]=d,e[25]=g,e[26]=v):v=e[26];let S;e[27]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(ce.Separator,{}),e[27]=S):S=e[27];let C,w;e[28]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsxs(ce.Item,{onClick:()=>o(!0),children:[n.jsx(Xs,{className:"text-muted-foreground",size:18}),"Profile Settings"]}),w=n.jsx(ce.Separator,{}),e[28]=C,e[29]=w):(C=e[28],w=e[29]);let _;e[30]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(ht,{className:"w-4 h-4 text-muted-foreground"}),e[30]=_):_=e[30];let P;e[31]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx(ce.Item,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/admin",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[_,"decocms/admin",n.jsx(ut,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[31]=P):P=e[31];let k;e[32]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(Ut,{className:"text-muted-foreground",size:18}),e[32]=k):k=e[32];let $,I;e[33]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(ce.Item,{asChild:!0,children:n.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[k,"Homepage",n.jsx(ut,{size:18,className:"ml-auto text-muted-foreground"})]})}),I=n.jsx(ce.Separator,{}),e[33]=$,e[34]=I):($=e[33],I=e[34]);let M,T,B;e[35]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsxs(ce.Item,{onClick:Dr,children:[n.jsx(Ft,{size:18,className:"text-muted-foreground"}),"Log out"]}),T=n.jsx(ce.Separator,{}),B=n.jsxs("div",{className:"px-2 py-1.5 text-[11px] text-muted-foreground/75",children:["v","2.87.0"]}),e[35]=M,e[36]=T,e[37]=B):(M=e[35],T=e[36],B=e[37]);let E;e[38]!==v||e[39]!==m||e[40]!==s?(E=n.jsxs(ce,{user:s,trigger:m,align:"end",children:[v,S,C,w,P,$,I,M,T,B]}),e[38]=v,e[39]=m,e[40]=s,e[41]=E):E=e[41];let D;e[42]!==l||e[43]!==s||e[44]!==r?(D=l&&n.jsx(Jt,{open:l,onOpenChange:o,user:s,userImage:r}),e[42]=l,e[43]=s,e[44]=r,e[45]=D):D=e[45];let R;return e[46]!==E||e[47]!==D?(R=n.jsxs(n.Fragment,{children:[E,D]}),e[46]=E,e[47]=D,e[48]=R):R=e[48],R}function Dr(){return ie.signOut()}function Rr(){const t=N.c(7),{data:e}=ie.useSession();if(!e?.user){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(me,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer h-7 w-7",muted:!0}),t[0]=c):c=t[0],c}const s=e.user,r=s.name??void 0;let l;t[1]!==r||t[2]!==s?(l={...s,name:r},t[1]=r,t[2]=s,t[3]=l):l=t[3];const o=l,i=s.image;let a;return t[4]!==i||t[5]!==o?(a=n.jsx(Lr,{user:o,userImage:i}),t[4]=i,t[5]=o,t[6]=a):a=t[6],a}function Hr(){const t=N.c(2),s=We().location.href;let r;return t[0]!==s?(r=n.jsx(ps,{to:"/login",search:{next:s},replace:!0}),t[0]=s,t[1]=r):r=t[1],r}function Ur(t){const e=N.c(6),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ms,{children:n.jsx(jt,{})}),e[0]=r):r=e[0];let l;e[1]!==s?(l=n.jsx(fs,{children:s}),e[1]=s,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(us,{children:n.jsx(Hr,{})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=n.jsxs(n.Fragment,{children:[r,l,o]}),e[4]=l,e[5]=i):i=e[5],i}function Br(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("fixed top-0 left-0 right-0 z-20 bg-background flex items-center w-full h-12 border-b border-border",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Fr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center justify-center px-2.5 h-full border-r border-border",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Wr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Vr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full flex-1",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Gr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full ml-auto",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Kr(){const t=N.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center justify-center px-2 h-full border-r border-border",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})}),t[0]=e):e=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("div",{className:"flex items-center gap-2 px-2 h-full",children:n.jsx("div",{className:"w-32 h-6 bg-muted rounded-md animate-pulse"})}),t[1]=s):s=t[1];let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"fixed top-0 left-0 right-0 z-20 bg-background flex items-center w-full h-12 border-b border-border",children:[e,s,n.jsx("div",{className:"flex items-center gap-2 px-2 h-full ml-auto",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[2]=r):r=t[2],r}const Re=Object.assign(Br,{Sidebar:Fr,Left:Wr,Center:Vr,Right:Gr,Skeleton:Kr});function rs(){const t=N.c(3),{toggleSidebar:e}=Ze();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Bt,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:18}),t[0]=s):s=t[0];let r;return t[1]!==e?(r=n.jsx(n.Fragment,{children:n.jsx(se,{onClick:e,size:"icon",variant:"ghost",className:"w-7 h-7 rounded-md",children:s})}),t[1]=e,t[2]=r):r=t[2],r}rs.Skeleton=function(){return n.jsx("div",{className:"w-7 h-7 bg-muted rounded-md animate-pulse"})};function Zr({showSidebarToggle:t=!1,showOrgSwitcher:e=!1,showDecoChat:s=!1,disableDecoChat:r=!1}){const[l,o]=Ge(),i=y.useRef(r);r&&l&&i.current!==r&&o(!1),i.current=r;const a=()=>{r||o(c=>!c)};return n.jsxs(Re,{children:[t&&n.jsx(Re.Sidebar,{children:n.jsx(rs,{})}),n.jsx(Re.Left,{children:e&&n.jsx(y.Suspense,{fallback:n.jsx(tt.Skeleton,{}),children:n.jsx(tt,{})})}),n.jsxs(Re.Right,{className:"gap-2",children:[s&&!r&&n.jsxs(se,{size:"sm",variant:"default",onClick:a,className:"h-7 gap-2",children:[n.jsx(St,{size:16}),"Chat"]}),n.jsx(Rr,{})]})]})}function Yr(t){const e=N.c(10),{children:s,className:r}=t,[,l]=y.useTransition();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Tt.decoChatPanelWidth(),e[0]=o):o=e[0];const[i,a]=Pt(o,30);let c;e[1]!==a?(c=u=>l(()=>a(u)),e[1]=a,e[2]=c):c=e[2];const d=c;let m;e[3]!==r?(m=z("min-w-0",r),e[3]=r,e[4]=m):m=e[4];let f;return e[5]!==i||e[6]!==s||e[7]!==d||e[8]!==m?(f=n.jsx(Mt,{defaultSize:i,minSize:20,className:m,onResize:d,children:s}),e[5]=i,e[6]=s,e[7]=d,e[8]=m,e[9]=f):f=e[9],f}function qr(t){const e=N.c(5),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=Tt.sidebarOpen(),e[0]=r):r=e[0];const[l,o]=Pt(r,!0);let i;return e[1]!==s||e[2]!==o||e[3]!==l?(i=n.jsx(mn,{open:l,onOpenChange:o,children:s}),e[1]=s,e[2]=o,e[3]=l,e[4]=i):i=e[4],i}function Jr(t){const e=N.c(6),{disableChat:s}=t,r=s===void 0?!1:s,[l]=Ge();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Mt,{className:"bg-background",children:n.jsx(bt,{})}),e[0]=o):o=e[0];let i;e[1]!==l||e[2]!==r?(i=!r&&n.jsxs(n.Fragment,{children:[n.jsx(Qs,{withHandle:l}),n.jsx(Yr,{className:z(l?"max-w-none":"max-w-0"),children:n.jsx(sn,{})})]}),e[1]=l,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==i?(a=n.jsxs(en,{direction:"horizontal",children:[o,i]}),e[4]=i,e[5]=a):a=e[5],a}function Xr(){const{org:t,project:e}=st({strict:!1}),s=We(),[r,l]=y.useState(!1),o=s.location.pathname===`/${t}/${e}`||s.location.pathname===`/${t}/${e}/`,i=e??ee,{data:a}=xs({queryKey:hs.activeOrganization(t),queryFn:async()=>{if(!t)return null;const{data:d}=await ie.organization.setActive({organizationSlug:t});return{org:d,project:{slug:i,isOrgAdmin:i===ee}}},gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1});if(!a)return n.jsxs("div",{className:"min-h-screen bg-background",children:[n.jsx(Zr,{}),n.jsx("div",{className:"pt-12",children:n.jsx(bt,{})})]});if(!a.org)return window.location.pathname!=="/"&&(window.location.href="/"),null;const c={...a,project:{...a.project,slug:i,isOrgAdmin:i===ee}};return n.jsxs(gs,{...c,children:[n.jsx(qr,{children:n.jsxs("div",{className:"flex flex-col h-screen",style:{"--project-topbar-height":i===ee?"0px":"48px"},children:[n.jsx("style",{children:`
|
|
6
|
+
[data-slot="sidebar-container"] {
|
|
7
|
+
top: 0 !important;
|
|
8
|
+
}
|
|
9
|
+
[data-slot="sidebar-inner"] {
|
|
10
|
+
padding-top: 0 !important;
|
|
11
|
+
}
|
|
12
|
+
`}),n.jsx(le.Provider,{children:n.jsxs(pn,{className:"flex-1 bg-sidebar",style:{"--sidebar-width":"13rem","--sidebar-width-mobile":"11rem"},children:[n.jsx(tr,{onCreateProject:()=>l(!0)}),n.jsx(hn,{className:"flex flex-col",children:n.jsxs(Ks,{children:[n.jsx(gr,{}),n.jsx("div",{className:"flex-1 overflow-hidden",children:n.jsx(Jr,{disableChat:o})})]})})]})})]})}),n.jsx(Ct,{open:r,onOpenChange:l})]})}function go(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Ur,{children:n.jsx(y.Suspense,{fallback:n.jsx(jt,{}),children:n.jsx(Xr,{})})}),t[0]=e):e=t[0],e}export{go as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as C,y as d,j as a}from"./index-BF7Y1e9M.js";import{c as m}from"./button-CsJ-BTyU.js";const u=d("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",special:"fill-special text-backround"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=m(u({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let l,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=a.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=l,e[4]=i):(l=e[3],i=e[4]);let s;e[5]!==t?(s=a.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=a.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as h,a as S,j as o,A as x,S as g,b as j,e as b,f as _,g as y,O as N,N as p}from"./index-
|
|
1
|
+
import{c as h,a as S,j as o,A as x,S as g,b as j,e as b,f as _,g as y,O as N,N as p}from"./index-BF7Y1e9M.js";function R(e){const t=h.c(5),{appName:l}=e;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[0]=s):s=t[0];const n=_(s);let a;if(t[1]!==n){const r=new URLSearchParams;for(const[d,u]of Object.entries(n))u!=null&&r.set(d,String(u));a=r.toString(),t[1]=n,t[2]=a}else a=t[2];const f=a,c=`/store/${encodeURIComponent(l)}${f?`?${f}`:""}`;let i;return t[3]!==c?(i=o.jsx(p,{to:"/login",search:{next:c},replace:!0}),t[3]=c,t[4]=i):i=t[4],i}function $(){const e=h.c(10);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[1]=s):s=e[1];const n=_(s),{data:a,isPending:f}=y.useListOrganizations();if(f){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(g,{}),e[2]=r):r=e[2],r}const m=a?.[0];if(!m){let r;return e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(p,{to:"/",replace:!0}),e[3]=r):r=e[3],r}let c;e[4]!==l||e[5]!==m.slug?(c={org:m.slug,project:N,appName:l},e[4]=l,e[5]=m.slug,e[6]=c):c=e[6];let i;return e[7]!==n||e[8]!==c?(i=o.jsx(p,{to:"/$org/$project/store/$appName",params:c,search:n,replace:!0}),e[7]=n,e[8]=c,e[9]=i):i=e[9],i}function v(){const e=h.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(x,{children:o.jsx(g,{})}),e[1]=s):s=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(j,{children:o.jsx($,{})}),e[2]=n):n=e[2];let a;return e[3]!==l?(a=o.jsxs(o.Fragment,{children:[s,n,o.jsx(b,{children:o.jsx(R,{appName:l})})]}),e[3]=l,e[4]=a):a=e[4],a}export{v as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,j as i,a3 as C,aj as y,ak as T,al as I,am as M,an as H,ao as z,c as A}from"./index-BF7Y1e9M.js";import{c as g}from"./button-CsJ-BTyU.js";var b="Switch",[U]=z(b),[q,L]=U(b),E=c.forwardRef((s,e)=>{const{__scopeSwitch:t,name:r,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=s,[p,h]=c.useState(null),v=y(e,m=>h(m)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:a,defaultProp:n??!1,onChange:k,caller:b});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(s.onClick,m=>{N(B=>!B),S&&(x.current=m.isPropagationStopped(),x.current||m.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=b;var P="SwitchThumb",R=c.forwardRef((s,e)=>{const{__scopeSwitch:t,...r}=s,a=L(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:e})});R.displayName=P;var O="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:s,control:e,checked:t,bubbles:r=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=O;function j(s){return s?"checked":"unchecked"}var $=E,D=R;function X(s){const e=A.c(9);let t,r;e[0]!==s?({className:t,...r}=s,e[0]=s,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let a;e[3]!==t?(a=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==a?(o=i.jsx($,{"data-slot":"switch",className:a,...r,children:n}),e[6]=r,e[7]=a,e[8]=o):o=e[8],o}export{X as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as r,j as c}from"./index-BF7Y1e9M.js";import{c as i}from"./button-CsJ-BTyU.js";function b(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-background",children:c.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-background",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function u(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{u as T,f as a,m as b,x as c,p as d,b as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as B,j as r,r as F,u as O,m as W,n as Q,K as Y}from"./index-BF7Y1e9M.js";import"./index-DW5LacML.js";import{C as G,a as J}from"./collection-table-wrapper-D9zZsdiL.js";import{C as X}from"./collection-search-Yrefv2Yh.js";import{E as I}from"./empty-state-Bi-BkSth.js";import{E as Z}from"./error-boundary-CaGh18_R.js";import{P as h}from"./index-CNTzRs2a.js";import{u as ee,U as te}from"./use-list-state-FXqJjHJh.js";import{f as re}from"./format-time-CMKyl-GC.js";import{a as se,u as oe}from"./constants-CucT8Y-Y.js";import{B as ie,a as ae,b as le,c as ne}from"./breadcrumb-2c6yAn4J.js";import{B as f}from"./badge-BfrnxbIP.js";import{i as ce}from"./AlertCircle-CMI4YiF8.js";import{c as me}from"./AlertOctagon-BGF96GWN.js";import{n as V}from"./CheckDone01-CPH_fc9F.js";import{i as de}from"./Check-BVqX6VG5.js";import{s as pe}from"./monaco-editor-HT_HkhlE.js";import{i as R}from"./Loading01-DislDZSB.js";import{u as ue}from"./use-deco-chat-open-CVTwRQoh.js";import"./button-CsJ-BTyU.js";import"./popover-Du0axOQk.js";import"./spinner-Bk2Kv7Is.js";import"./integration-icon-DL_7q6rJ.js";import"./index-CA62CANi.js";import"./use-mcp-prompts-DVE5aYwA.js";import"./useQuery-BS0MQvhs.js";import"./dialog-3EB-J4B_.js";import"./X-r5buNXf-.js";import"./form-BlwP3Tk9.js";import"./label-CsZ9MmGa.js";import"./input-Barosnhy.js";import"./ArrowUp-Cr88yR39.js";import"./ChevronDown-C753dD5M.js";import"./Edit01-DkLw19ks.js";import"./Users03-DItk6Nms.js";import"./ArrowLeft-F0qy4hoF.js";import"./Code01-Cz0GM-Ln.js";import"./infiniteQueryObserver-AHDpBxLi.js";import"./use-virtual-mcp-BaDN22Su.js";import"./use-connection-_6bZJd3j.js";import"./useMutation-GLUqnj57.js";import"./SearchMd-BkDBIRnQ.js";import"./use-create-virtual-mcp-CSiBFS-p.js";import"./usage-B8eRkRZY.js";import"./ChevronRight-sGXl7Bvf.js";import"./Copy01-Bl99tdzP.js";import"./Terminal-rAB0v_E_.js";import"./localstorage-keys-amV_-5pn.js";import"./generate-id-Dyweu44Y.js";import"./Trash01-By04ijdF.js";import"./dropdown-menu-Bshnl7f0.js";import"./Grid01-BQKiQdYB.js";import"./List-DbyYoAK0.js";import"./view-mode-toggle-BiQRnCj0.js";import"./table-Bgaai9wR.js";import"./avatar-DZVTlnSA.js";import"./use-mobile-DgWdzZzh.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-llm-CETK0xwr.js";import"./use-binding-ltfl3cPA.js";import"./binder-B99OawxF.js";import"./select-C2Pbxf7c.js";import"./File06-qYvBtC4a.js";import"./Image01-BuH4rRqA.js";import"./RefreshCcw01-CDxZBXaR.js";function fe(e){const s=B.c(7),{status:a}=e;switch(a){case"in_progress":{let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsxs(f,{variant:"secondary",className:"gap-1",children:[r.jsx(R,{size:11,className:"animate-spin"}),"Running"]}),s[0]=o):o=s[0],o}case"completed":{let o;return s[1]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsxs(f,{variant:"success",className:"gap-1",children:[r.jsx(de,{size:11}),"Completed"]}),s[1]=o):o=s[1],o}case"requires_action":{let o;return s[2]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsxs(f,{variant:"outline",className:"gap-1 text-blue-600 border-blue-600/40",children:[r.jsx(ce,{size:11}),"Waiting for input"]}),s[2]=o):o=s[2],o}case"failed":{let o;return s[3]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsxs(f,{variant:"destructive",className:"gap-1",children:[r.jsx(me,{size:11}),"Failed"]}),s[3]=o):o=s[3],o}case"expired":{let o;return s[4]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsxs(f,{variant:"outline",className:"gap-1 text-warning border-warning/40",children:[r.jsx(pe,{size:11}),"Timed out"]}),s[4]=o):o=s[4],o}default:{let o;return s[5]!==a?(o=r.jsx(f,{variant:"secondary",className:"gap-1",children:a}),s[5]=a,s[6]=o):o=s[6],o}}}function he(){const e=B.c(49),{org:s,project:a,locator:o}=O();let x;e[0]!==s.id?(x={connectionId:se,orgId:s.id},e[0]=s.id,e[1]=x):x=e[1];const g=oe(x),v=W(),{switchToThread:k}=ue();let j;e[2]!==s.slug?(j={namespace:s.slug,resource:"tasks",defaultSortKey:"updated_at",defaultViewMode:"table"},e[2]=s.slug,e[3]=j):j=e[3];const t=ee(j);let l;e[4]!==o?(l=Y.taskThreads(o),e[4]=o,e[5]=l):l=e[5];let n;e[6]!==g?(n=async()=>{if(!g)throw new Error("MCP client is not available");const i=await g.callTool({name:"COLLECTION_THREADS_LIST",arguments:{limit:100,offset:0}});return(i.structuredContent??i).items??[]},e[6]=g,e[7]=n):n=e[7];let y;e[8]!==l||e[9]!==n?(y={queryKey:l,queryFn:n,staleTime:3e4},e[8]=l,e[9]=n,e[10]=y):y=e[10];const{data:D}=Q(y);let S;if(e[11]!==D||e[12]!==t){const i=D.filter(Se),z=t.searchTerm?i.filter(M=>M.title.toLowerCase().includes(t.searchTerm.toLowerCase())):i;let T;e[14]!==t?(T=(M,H)=>{const{sortKey:L,sortDirection:P}=t;if(!L||!P)return 0;const U=String(M[L]??""),q=String(H[L]??""),$=U.localeCompare(q);return P==="asc"?$:-$},e[14]=t,e[15]=T):T=e[15],S=[...z].sort(T),e[11]=D,e[12]=t,e[13]=S}else S=e[13];const K=S;let _;e[16]!==v||e[17]!==s.slug||e[18]!==a.slug||e[19]!==k?(_=async i=>{await k(i.id),v({to:"/$org/$project",params:{org:s.slug,project:a.slug}})},e[16]=v,e[17]=s.slug,e[18]=a.slug,e[19]=k,e[20]=_):_=e[20];const E=_;let b;e[21]===Symbol.for("react.memo_cache_sentinel")?(b=[{id:"title",header:"Title",render:ye,cellClassName:"flex-1 min-w-0",sortable:!0},{id:"status",header:"Status",render:je,cellClassName:"w-40 shrink-0",sortable:!0},{id:"created_by",header:"Created by",render:ge,cellClassName:"w-32 shrink-0"},{id:"updated_at",header:"Updated",render:xe,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0}],e[21]=b):b=e[21];const A=b;let w;e[22]===Symbol.for("react.memo_cache_sentinel")?(w=r.jsx(h.Header.Left,{children:r.jsx(ie,{children:r.jsx(ae,{children:r.jsx(le,{children:r.jsx(ne,{children:"Tasks"})})})})}),e[22]=w):w=e[22];let C;e[23]===Symbol.for("react.memo_cache_sentinel")?(C=[{id:"title",label:"Title"},{id:"status",label:"Status"},{id:"updated_at",label:"Updated"}],e[23]=C):C=e[23];let c;e[24]!==t.handleSort||e[25]!==t.setViewMode||e[26]!==t.sortDirection||e[27]!==t.sortKey||e[28]!==t.viewMode?(c=r.jsxs(h.Header,{children:[w,r.jsx(h.Header.Right,{children:r.jsx(G,{viewMode:t.viewMode,onViewModeChange:t.setViewMode,sortKey:t.sortKey,sortDirection:t.sortDirection,onSort:t.handleSort,sortOptions:C})})]}),e[24]=t.handleSort,e[25]=t.setViewMode,e[26]=t.sortDirection,e[27]=t.sortKey,e[28]=t.viewMode,e[29]=c):c=e[29];let m;e[30]!==t?(m=i=>{i.key==="Escape"&&(t.setSearch(""),i.target.blur())},e[30]=t,e[31]=m):m=e[31];let d;e[32]!==t.search||e[33]!==t.setSearch||e[34]!==m?(d=r.jsx(X,{value:t.search,onChange:t.setSearch,placeholder:"Search tasks...",onKeyDown:m}),e[32]=t.search,e[33]=t.setSearch,e[34]=m,e[35]=d):d=e[35];let p;e[36]!==t.search?(p=t.search?r.jsx(I,{image:r.jsx(V,{size:36,className:"text-muted-foreground"}),title:"No tasks found",description:`No tasks match "${t.search}"`}):r.jsx(I,{image:r.jsx("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-muted",children:r.jsx(V,{size:32,className:"text-muted-foreground"})}),title:"No tasks yet",description:"Tasks will appear here when agents start processing work."}),e[36]=t.search,e[37]=p):p=e[37];let u;e[38]!==t.handleSort||e[39]!==t.sortDirection||e[40]!==t.sortKey||e[41]!==E||e[42]!==p||e[43]!==K?(u=r.jsx(h.Content,{children:r.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:r.jsx(J,{columns:A,data:K,isLoading:!1,sortKey:t.sortKey,sortDirection:t.sortDirection,onSort:t.handleSort,onRowClick:E,emptyState:p})})}),e[38]=t.handleSort,e[39]=t.sortDirection,e[40]=t.sortKey,e[41]=E,e[42]=p,e[43]=K,e[44]=u):u=e[44];let N;return e[45]!==c||e[46]!==d||e[47]!==u?(N=r.jsxs(h,{children:[c,d,u]}),e[45]=c,e[46]=d,e[47]=u,e[48]=N):N=e[48],N}function xe(e){return r.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:e.updated_at?re(new Date(e.updated_at)):"—"})}function ge(e){return r.jsx(te,{id:e.created_by,size:"3xs"})}function je(e){return r.jsx(fe,{status:e.status??"completed"})}function ye(e){return r.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})}function Se(e){return!e.hidden}function Mt(){const e=B.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx(Z,{children:r.jsx(F.Suspense,{fallback:r.jsx("div",{className:"flex h-full items-center justify-center",children:r.jsx(R,{size:32,className:"animate-spin text-muted-foreground"})}),children:r.jsx(he,{})})}),e[0]=s):s=e[0],s}export{Mt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as o,j as n}from"./index-BF7Y1e9M.js";import{c as l}from"./button-CsJ-BTyU.js";function u(s){const e=o.c(8);let r,i;e[0]!==s?({className:r,...i}=s,e[0]=s,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let t;e[3]!==r?(t=l("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-xl border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),e[3]=r,e[4]=t):t=e[4];let a;return e[5]!==i||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...i}),e[5]=i,e[6]=t,e[7]=a):a=e[7],a}export{u as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as O,K as J,j as t,m as P,r as K,O as Q}from"./index-
|
|
1
|
+
import{c as O,K as J,j as t,m as P,r as K,O as Q}from"./index-BF7Y1e9M.js";import{u as W}from"./useQuery-BS0MQvhs.js";import{i as Y}from"./File06-qYvBtC4a.js";import{i as X}from"./Loading01-DislDZSB.js";import{e as Z}from"./github-icon-Dp3wHhYE.js";import{a as ee,C as te}from"./collection-table-wrapper-D9zZsdiL.js";import{C as oe}from"./collection-search-Yrefv2Yh.js";import{E as z}from"./empty-state-Bi-BkSth.js";import{I as se}from"./integration-icon-DL_7q6rJ.js";import{C as re}from"./card-CzebRix7.js";import{V as ne}from"./layout-B0BvAjMd.js";function ie(o){return o.replace(/<a[^>]*class="[^"]*anchor[^"]*"[^>]*>.*?<\/a>/gi,"")}function le(o){return o.replace(/<a\s+([^>]*href="[^"]*"[^>]*)>/gi,(e,s)=>{let r=e;return s.includes("target=")?r=r.replace(/target="[^"]*"/gi,'target="_blank"'):r=r.replace(/>/,' target="_blank">'),s.includes("rel=")?r=r.replace(/rel="[^"]*"/gi,'rel="noopener noreferrer"'):r=r.replace(/>/,' rel="noopener noreferrer">'),r})}function ae(o){let e=ie(o);return e=le(e),e}async function ce(o,e){try{const s=await fetch(`https://api.github.com/repos/${o}/${e}/readme`,{headers:{Accept:"application/vnd.github.v3.html"}});if(!s.ok){if(s.status===404)return null;throw new Error(`Failed to fetch README: ${s.statusText}`)}const r=await s.text();return ae(r)}catch(s){return console.error("Error fetching README:",s),null}}function Ee(o){const e=O.c(18),{repository:s,html:r,isLoading:b,queryKey:p}=o;let a,u,f,h;e[0]!==r||e[1]!==p||e[2]!==s?(a=s?Z(s):null,u=!!a&&r===void 0,h=W,f=p??J.githubReadme(a?.owner,a?.repo),e[0]=r,e[1]=p,e[2]=s,e[3]=a,e[4]=u,e[5]=f,e[6]=h):(a=e[3],u=e[4],f=e[5],h=e[6]);let d;e[7]!==a?(d=async()=>a?ce(a.owner,a.repo):null,e[7]=a,e[8]=d):d=e[8];let g;e[9]!==u||e[10]!==f||e[11]!==d?(g={queryKey:f,queryFn:d,enabled:u,staleTime:36e5,gcTime:864e5},e[9]=u,e[10]=f,e[11]=d,e[12]=g):g=e[12];const{data:E,isLoading:l}=h(g),x=r??E;if(b??(u&&l)){let m;return e[13]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),e[13]=m):m=e[13],m}if(!x){let m;return e[14]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center p-6",children:[t.jsx(Y,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"README not found"}),t.jsx("p",{className:"text-muted-foreground max-w-md",children:"This repository doesn't have a README file, or it's not publicly accessible."})]}),e[14]=m):m=e[14],m}let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j={backgroundColor:"transparent"},e[15]=j):j=e[15];let n;return e[16]!==x?(n=t.jsx("div",{className:"p-5 markdown-body",style:j,dangerouslySetInnerHTML:{__html:x}}),e[16]=x,e[17]=n):n=e[17],n}function Te(o){const e=O.c(40),{tools:s,connectionId:r,org:b,onToolClick:p,showToolbar:a,emptyMessage:u,isLoading:f}=o,h=a===void 0?!0:a,d=u===void 0?"This connection doesn't have any tools yet.":u,g=f===void 0?!1:f,E=P(),[l,x]=K.useState(""),[y,j]=K.useState("table"),[n,m]=K.useState("name"),[c,V]=K.useState("asc");let R;e[0]!==c||e[1]!==n?(R=i=>{n===i?(V(pe),c==="desc"&&m(void 0)):(m(i),V("asc"))},e[0]=c,e[1]=n,e[2]=R):R=e[2];const N=R;let L;e[3]!==r||e[4]!==E||e[5]!==p||e[6]!==b?(L=i=>{p?p(i):r&&b&&E({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:b,project:Q,connectionId:r,collectionName:"tools",itemId:encodeURIComponent(i.name)}})},e[3]=r,e[4]=E,e[5]=p,e[6]=b,e[7]=L):L=e[7];const I=L;let k;if(e[8]!==l||e[9]!==c||e[10]!==n||e[11]!==s){const i=!s||s.length===0?[]:l.trim()?(()=>{const H=l.toLowerCase();return s.filter(_=>_.name.toLowerCase().includes(H)||_.description&&_.description.toLowerCase().includes(H))})():s;k=!n||!c?i:[...i].sort((H,_)=>{const U=H[n]||"",B=_[n]||"",G=String(U).localeCompare(String(B));return c==="asc"?G:-G}),e[8]=l,e[9]=c,e[10]=n,e[11]=s,e[12]=k}else k=e[12];const T=k;let M;e[13]===Symbol.for("react.memo_cache_sentinel")?(M=[{id:"name",header:"Name",render:fe,sortable:!0},{id:"description",header:"Description",render:ue,cellClassName:"flex-1",sortable:!0}],e[13]=M):M=e[13];const F=M;let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=F.filter(de).map(me),e[14]=$):$=e[14];const q=$;let v;e[15]!==N||e[16]!==h||e[17]!==c||e[18]!==n||e[19]!==y?(v=h&&t.jsx(ne,{children:t.jsx(te,{viewMode:y,onViewModeChange:j,sortKey:n,sortDirection:c,onSort:N,sortOptions:q})}),e[15]=N,e[16]=h,e[17]=c,e[18]=n,e[19]=y,e[20]=v):v=e[20];let D;e[21]===Symbol.for("react.memo_cache_sentinel")?(D=i=>{i.key==="Escape"&&(x(""),i.target.blur())},e[21]=D):D=e[21];let S;e[22]!==l?(S=t.jsx(oe,{value:l,onChange:x,placeholder:"Search tools...",onKeyDown:D}),e[22]=l,e[23]=S):S=e[23];let w;e[24]!==d||e[25]!==N||e[26]!==I||e[27]!==g||e[28]!==l||e[29]!==c||e[30]!==n||e[31]!==T||e[32]!==y?(w=y==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:T.length===0?t.jsx(z,{image:null,title:l?"No tools found":"No tools available",description:l?"Try adjusting your search terms":d}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:T.map(i=>t.jsx(re,{className:"cursor-pointer transition-colors",onClick:()=>I(i),children:t.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[t.jsx(se,{icon:null,name:i.name,size:"md",className:"shrink-0 shadow-sm"}),t.jsxs("div",{className:"flex flex-col gap-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:i.name}),t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:i.description||"No description"})]})]})},i.name))})}):t.jsx(ee,{columns:F,data:T,isLoading:g,sortKey:n,sortDirection:c,onSort:N,onRowClick:i=>I(i),emptyState:t.jsx(z,{image:null,title:l?"No tools found":"No tools available",description:l?"Try adjusting your search terms":d})}),e[24]=d,e[25]=N,e[26]=I,e[27]=g,e[28]=l,e[29]=c,e[30]=n,e[31]=T,e[32]=y,e[33]=w):w=e[33];let C;e[34]!==S||e[35]!==w?(C=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[S,w]}),e[34]=S,e[35]=w,e[36]=C):C=e[36];let A;return e[37]!==C||e[38]!==v?(A=t.jsxs(t.Fragment,{children:[v,C]}),e[37]=C,e[38]=v,e[39]=A):A=e[39],A}function me(o){return{id:o.id,label:typeof o.header=="string"?o.header:o.id}}function de(o){return o.sortable}function ue(o){return t.jsx("span",{className:"text-sm text-foreground",children:o.description||"—"})}function fe(o){return t.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:o.name})}function pe(o){return o==="asc"?"desc":o==="desc"?null:"asc"}export{Ee as R,Te as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,c as x,j as P}from"./index-
|
|
1
|
+
import{r as c,c as x,j as P}from"./index-BF7Y1e9M.js";const C=c.createContext(null);function g(e){const t=x.c(3),{value:s,children:r}=e,l=s;let n;return t[0]!==r||t[1]!==l?(n=P.jsx(C.Provider,{value:l,children:r}),t[0]=r,t[1]=l,t[2]=n):n=t[2],n}function d(e){const t=c.useContext(C);if(!t)throw new Error("usePluginContext must be used within a PluginContextProvider");if(!t.connectionId||!t.connection||!t.toolCaller)throw new Error("usePluginContext requires a valid connection. Use { partial: true } in empty state components.");return t}const E=c.createContext(null);function h(e){const t=x.c(7),{children:s}=e,[r,l]=c.useState(null),[n,u]=c.useState(null),[i,a]=c.useState(null);let o;t[0]!==n||t[1]!==r||t[2]!==i?(o={leftEl:r,centerEl:n,rightEl:i,setLeftEl:l,setCenterEl:u,setRightEl:a},t[0]=n,t[1]=r,t[2]=i,t[3]=o):o=t[3];let f;return t[4]!==s||t[5]!==o?(f=P.jsx(E.Provider,{value:o,children:s}),t[4]=s,t[5]=o,t[6]=f):f=t[6],f}function v(){const e=x.c(10),t=c.useContext(E);let s;e[0]!==t?(s=o=>t?.setLeftEl(o),e[0]=t,e[1]=s):s=e[1];const r=s;let l;e[2]!==t?(l=o=>t?.setCenterEl(o),e[2]=t,e[3]=l):l=e[3];const n=l;let u;e[4]!==t?(u=o=>t?.setRightEl(o),e[4]=t,e[5]=u):u=e[5];const i=u;if(!t)return null;let a;return e[6]!==n||e[7]!==r||e[8]!==i?(a={leftRef:r,centerRef:n,rightRef:i},e[6]=n,e[7]=r,e[8]=i,e[9]=a):a=e[9],a}export{g as P,h as T,v as a,d as u};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{r as T,c as j,j as l,T as E,D as z,B as H,G as L,J as D,H as V,E as I}from"./index-BF7Y1e9M.js";import{I as R}from"./input-Barosnhy.js";import{i as M}from"./X-r5buNXf-.js";import{c as b}from"./button-CsJ-BTyU.js";import{i as O}from"./SearchMd-BkDBIRnQ.js";const W=({size:n=24,color:e="currentColor",...t})=>T.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},T.createElement("path",{d:"m22.7 13.5-2-2-2 2M21 12a9 9 0 1 1-1.245-4.57M12 7v5l3 2"}));W.displayName="ClockRewind";const _=({size:n=24,color:e="currentColor",...t})=>T.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},T.createElement("path",{d:"m10 15-3.075 3.114c-.43.434-.644.651-.828.666a.5.5 0 0 1-.421-.172c-.12-.14-.12-.446-.12-1.056v-1.56c0-.548-.449-.944-.99-1.024v0a3 3 0 0 1-2.534-2.533C2 12.219 2 11.96 2 11.445V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 2 5.12 2 6.8 2h7.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C19 4.28 19 5.12 19 6.8V11m0 11-2.176-1.513c-.306-.213-.46-.32-.626-.395a2.002 2.002 0 0 0-.462-.145c-.18-.033-.367-.033-.74-.033H13.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C10 18.394 10 17.834 10 16.714V14.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C11.52 11 12.08 11 13.2 11h5.6c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 12.52 22 13.08 22 14.2v2.714c0 .932 0 1.398-.152 1.766a2 2 0 0 1-1.083 1.082c-.367.152-.833.152-1.765.152V22Z"}));_.displayName="MessageChatSquare";function A(n){const e=j.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(H,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(n){const e=j.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(L,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function Q(n){const e=j.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=l.jsx(V,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function q(n){const e=j.c(17);let t,s,a,o;e[0]!==n?({className:s,children:t,side:o,...a}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);const c=o===void 0?"right":o;let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=l.jsx(Q,{}),e[5]=h):h=e[5];const d=c==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",i=c==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",r=c==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",v=c==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let m;e[6]!==s||e[7]!==d||e[8]!==i||e[9]!==r||e[10]!==v?(m=b("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",d,i,r,v,s),e[6]=s,e[7]=d,e[8]=i,e[9]=r,e[10]=v,e[11]=m):m=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=l.jsxs(D,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[l.jsx(M,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=u):u=e[12];let f;return e[13]!==t||e[14]!==a||e[15]!==m?(f=l.jsxs(P,{children:[h,l.jsxs(z,{"data-slot":"sheet-content",className:m,...a,children:[t,u]})]}),e[13]=t,e[14]=a,e[15]=m,e[16]=f):f=e[16],f}function F(n){const e=j.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=l.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function G(n){const e=j.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=l.jsx(E,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function Y(n){const e=j.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=l.jsx(I,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(n){const e=j.c(24),{threads:t,activeThreadId:s,onThreadSelect:a,onClose:o,showHeader:c,showBackButton:h}=n,d=c===void 0?!0:c,i=h===void 0?!1:h,[r,v]=T.useState("");let m;e[0]!==r||e[1]!==t?(m=r.trim()?t.filter(p=>(p.title||"New chat").toLowerCase().includes(r.toLowerCase())):t,e[0]=r,e[1]=t,e[2]=m):m=e[2];const u=m;let f;e[3]!==o||e[4]!==a?(f=p=>{a(p),o&&o()},e[3]=o,e[4]=a,e[5]=f):f=e[5];const k=f;let y;e[6]!==o||e[7]!==i||e[8]!==d?(y=d&&l.jsxs("div",{className:"h-12 px-4 flex items-center justify-between border-b shrink-0",children:[l.jsx("span",{className:"text-sm font-medium",children:"Chat History"}),i&&l.jsx("button",{type:"button",onClick:o,className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Back to chat"})]}),e[6]=o,e[7]=i,e[8]=d,e[9]=y):y=e[9];let C;e[10]===Symbol.for("react.memo_cache_sentinel")?(C=b("px-3 py-3 border-b","shrink-0"),e[10]=C):C=e[10];let S;e[11]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(O,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[11]=S):S=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=p=>v(p.target.value),e[12]=g):g=e[12];let x;e[13]!==r?(x=l.jsx("div",{className:C,children:l.jsxs("div",{className:"relative",children:[S,l.jsx(R,{type:"text",placeholder:"Search conversations...",value:r,onChange:g,className:"pl-9 h-9 text-sm"})]})}),e[13]=r,e[14]=x):x=e[14];let w;e[15]!==s||e[16]!==u||e[17]!==k||e[18]!==r?(w=l.jsx("div",{className:"flex-1 overflow-y-auto",children:u.length===0?l.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-12 px-4 text-center",children:[l.jsx("div",{className:"size-12 rounded-full bg-muted/50 flex items-center justify-center",children:l.jsx(_,{size:24,className:"text-muted-foreground"})}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-sm font-medium text-foreground",children:r?"No results found":"No conversations yet"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:r?"Try a different search term":"Start a new chat to see your history here"})]})]}):l.jsx("div",{className:"flex flex-col py-2",children:u.map(p=>{const $=p.id===s;return l.jsx("button",{type:"button",onClick:()=>k(p.id),className:b("flex items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-accent/50",$&&"bg-accent/50"),children:l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:b("text-sm truncate",$?"font-medium text-foreground":"text-muted-foreground"),children:p.title||"New chat"}),l.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:new Date(p.updated_at).toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})]})},p.id)})})}),e[15]=s,e[16]=u,e[17]=k,e[18]=r,e[19]=w):w=e[19];let N;return e[20]!==w||e[21]!==y||e[22]!==x?(N=l.jsxs(l.Fragment,{children:[y,x,w]}),e[20]=w,e[21]=y,e[22]=x,e[23]=N):N=e[23],N}function ee(n){const e=j.c(9),{open:t,onOpenChange:s,threads:a,activeThreadId:o,onThreadSelect:c}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=l.jsx(F,{className:"h-12 px-4 flex flex-row items-center justify-between border-b shrink-0",children:l.jsx(G,{className:"text-sm font-medium",children:"Chat History"})}),e[0]=h):h=e[0];let d;e[1]!==o||e[2]!==c||e[3]!==a?(d=l.jsxs(q,{side:"right",className:"w-[320px] sm:w-[380px] p-0 flex flex-col",children:[h,l.jsx(B,{threads:a,activeThreadId:o,onThreadSelect:c,showHeader:!1})]}),e[1]=o,e[2]=c,e[3]=a,e[4]=d):d=e[4];let i;return e[5]!==s||e[6]!==t||e[7]!==d?(i=l.jsx(A,{open:t,onOpenChange:s,children:d}),e[5]=s,e[6]=t,e[7]=d,e[8]=i):i=e[8],i}function te(n){const e=j.c(5),{threads:t,activeThreadId:s,onThreadSelect:a,onClose:o}=n;let c;return e[0]!==s||e[1]!==o||e[2]!==a||e[3]!==t?(c=l.jsx("div",{className:"flex flex-col h-full w-full bg-background",children:l.jsx(B,{threads:t,activeThreadId:s,onThreadSelect:a,onClose:o,showBackButton:!0})}),e[0]=s,e[1]=o,e[2]=a,e[3]=t,e[4]=c):c=e[4],c}function se(n){const e=j.c(22),{text:t,className:s,speed:a}=n,o=s===void 0?"":s,c=a===void 0?30:a,[h,d]=T.useState(!1),i=t.length/c*1e3,r=t.length,v=`${t.length}ch`;let m;e[0]!==i?(m=()=>{d(!1);const p=setTimeout(()=>{d(!0)},i);return()=>clearTimeout(p)},e[0]=i,e[1]=m):m=e[1];let u;e[2]!==i||e[3]!==t?(u=[t,i],e[2]=i,e[3]=t,e[4]=u):u=e[4],T.useEffect(m,u);let f;e[5]!==o?(f=b(o,"block overflow-hidden inline-flex"),e[5]=o,e[6]=f):f=e[6];const k=`${i}ms`;let y;e[7]!==v||e[8]!==r||e[9]!==k?(y={"--typewriter-duration":k,"--typewriter-steps":r,"--typewriter-max-width":v},e[7]=v,e[8]=r,e[9]=k,e[10]=y):y=e[10];const C=y,S=h&&"truncate";let g;e[11]!==S?(g=b("typewriter-text",S),e[11]=S,e[12]=g):g=e[12];let x;e[13]!==g||e[14]!==t?(x=l.jsx("span",{className:g,children:t}),e[13]=g,e[14]=t,e[15]=x):x=e[15];let w;e[16]===Symbol.for("react.memo_cache_sentinel")?(w=l.jsx("style",{children:`
|
|
2
|
+
.typewriter-text {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
width: 0;
|
|
5
|
+
max-width: 100%;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
white-space: nowrap;
|
|
8
|
+
animation: typewriter var(--typewriter-duration) steps(var(--typewriter-steps)) forwards;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@keyframes typewriter {
|
|
12
|
+
to {
|
|
13
|
+
width: min(var(--typewriter-max-width), 100%);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
`}),e[16]=w):w=e[16];let N;return e[17]!==x||e[18]!==f||e[19]!==C||e[20]!==t?(N=l.jsxs("span",{className:f,style:C,children:[x,w]},t),e[17]=x,e[18]=f,e[19]=C,e[20]=t,e[21]=N):N=e[21],N}export{A as S,se as T,ee as a,te as b,F as c,G as d,Y as e,q as f,W as i,_ as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as v}from"./binder-Dm6uKx_q.js";import{b9 as T,Q as O,o as t,s as e,ba as p,aj as l,bb as c,bc as R,bd as U,be as i,ak as x,bf as u,bg as g,bh as n,bi as b,bj as L,bk as B,bl as C}from"./index-DyoRyDg0.js";const W=O.extend({avatar:e().describe("URL or data URI to the assistant's avatar image"),system_prompt:e().describe("System prompt that defines the assistant's behavior"),virtual_mcp_id:e().describe("Virtual MCP ID to use for this assistant"),model:t({id:e().describe("Model ID"),connectionId:e().describe("Connection ID that provides the model")}).describe("Selected model reference for this assistant")}),F=T("assistant",W),G=[...F],w=L(()=>u([B(),e(),i(),g(),p(e(),w),l(w)])),f=p(e(),p(e(),w)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),E=t({type:n("text"),text:e().describe("The text content"),providerOptions:f}),q=t({type:n("text"),text:e().describe("The text content"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),j=e().describe("File data as URL string"),k=t({type:n("file"),filename:e().optional().describe("Optional filename of the file"),data:j,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:f}),$=t({type:n("file"),mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),data:e().describe("Generated file data as base64 encoded string")}),J=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerOptions:f}),K=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),V=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call, used to match with tool result"),toolName:e().describe("Name of the tool being called"),input:e().describe("Arguments of the tool call (JSON-serializable object matching tool input schema)"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerOptions:f}),z=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call"),toolName:e().describe("Name of the tool being called"),input:e().describe("Stringified JSON object with the tool call arguments"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),H=u([t({type:n("text"),value:e()}),t({type:n("json"),value:w}),t({type:n("error-text"),value:e()}),t({type:n("error-json"),value:w}),t({type:n("content"),value:l(u([t({type:n("text"),text:e().describe("Text content")}),t({type:n("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))})]),A=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output:H.describe("Result of the tool call"),result:b().describe("Unknown result of the tool call"),providerOptions:f}),X=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),result:c().describe("Result of the tool call (JSON-serializable)"),isError:g().optional().describe("Whether the result is an error or error message"),providerExecuted:g().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),Q=u([t({type:n("source"),sourceType:n("url"),id:e().describe("The ID of the source"),url:e().describe("The URL of the source"),title:e().optional().describe("The title of the source"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),t({type:n("source"),sourceType:n("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:c().optional().describe("Additional provider-specific metadata")})]),Y=t({role:n("system"),content:e().describe("System message content"),providerOptions:f}),Z=t({role:n("user"),content:l(u([E,k])).describe("User message content parts (text or file)"),providerOptions:f}),ee=t({role:n("assistant"),content:l(u([E,k,J,V,A])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:f}),te=t({role:n("tool"),content:l(A).describe("Tool message content (tool results)"),providerOptions:f}),oe=u([Y,Z,ee,te]),ae=l(oe).describe("A list of messages forming the prompt"),ie=t({prompt:ae.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:i().optional().describe("Maximum number of tokens to generate"),temperature:i().optional().describe("Temperature setting. The range depends on the provider and model"),topP:i().optional().describe("Nucleus sampling parameter"),topK:i().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:i().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:i().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:i().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:l(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:u([t({type:n("text")}),t({type:n("json"),schema:c().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:l(c()).optional().describe("The tools that are available for the model"),toolChoice:c().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:g().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:c().optional().describe("Abort signal for cancelling the operation"),providerOptions:c().optional().describe("Additional provider-specific options")}),ne=t({content:l(u([q,$,K,z,X,Q])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:x(["stop","length","content-filter","tool-calls","error","other","unknown"]).describe("Reason why generation stopped"),usage:U({inputTokens:i().optional(),outputTokens:i().optional(),totalTokens:i().optional(),reasoningTokens:i().optional()}).describe("Usage information for the language model call"),providerMetadata:c().optional().describe("Additional provider-specific metadata"),request:t({body:c().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({id:e().optional().describe("ID for the generated response"),timestamp:R().optional().describe("Timestamp for the start of the generated response"),modelId:e().optional().describe("The ID of the response model that was used"),headers:p(e(),e()).optional().describe("Response headers"),body:c().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:l(c()).describe("Warnings for the call, e.g. unsupported settings")});t({stream:c().describe("ReadableStream of LanguageModelV2StreamPart"),request:t({body:c().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({headers:p(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const se=t({supportedUrls:p(e(),l(e())).describe("Supported URL patterns by media type for the provider")});t({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:l(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const N=t({modelId:e().describe("The ID of the model"),callOptions:ie}),re=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:l(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),le=T("llm",re,{readOnly:!0}),ce=[{name:"LLM_METADATA",inputSchema:t({modelId:e().describe("The ID of the model")}),outputSchema:se},{name:"LLM_DO_STREAM",inputSchema:N,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:N,outputSchema:ne},...le],de=t({scopes:l(e()).describe("List of scopes available"),stateSchema:p(e(),b()).describe("JSON Schema (draft-07) defining the state structure")}),pe=[{name:"MCP_CONFIGURATION",inputSchema:t({}),outputSchema:de}],ue=t({toolName:e().describe("Name of the tool to invoke on that connection"),transformCode:e().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(input): Output { ... }`\n The input will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output. \n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),me=t({code:e().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(input): Output { ... }\`
|
|
1
|
+
import{a as v}from"./binder-B99OawxF.js";import{ba as T,Q as O,o as t,s as e,bb as p,ah as l,bc as c,bd as R,be as U,bf as i,ai as x,bg as u,bh as g,bi as n,bj as b,bk as L,bl as B,bm as C}from"./index-BF7Y1e9M.js";const W=O.extend({avatar:e().describe("URL or data URI to the assistant's avatar image"),system_prompt:e().describe("System prompt that defines the assistant's behavior"),virtual_mcp_id:e().describe("Virtual MCP ID to use for this assistant"),model:t({id:e().describe("Model ID"),connectionId:e().describe("Connection ID that provides the model")}).describe("Selected model reference for this assistant")}),F=T("assistant",W),G=[...F],w=L(()=>u([B(),e(),i(),g(),p(e(),w),l(w)])),f=p(e(),p(e(),w)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),E=t({type:n("text"),text:e().describe("The text content"),providerOptions:f}),q=t({type:n("text"),text:e().describe("The text content"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),j=e().describe("File data as URL string"),k=t({type:n("file"),filename:e().optional().describe("Optional filename of the file"),data:j,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:f}),$=t({type:n("file"),mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),data:e().describe("Generated file data as base64 encoded string")}),J=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerOptions:f}),K=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),V=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call, used to match with tool result"),toolName:e().describe("Name of the tool being called"),input:e().describe("Arguments of the tool call (JSON-serializable object matching tool input schema)"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerOptions:f}),z=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call"),toolName:e().describe("Name of the tool being called"),input:e().describe("Stringified JSON object with the tool call arguments"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),H=u([t({type:n("text"),value:e()}),t({type:n("json"),value:w}),t({type:n("error-text"),value:e()}),t({type:n("error-json"),value:w}),t({type:n("content"),value:l(u([t({type:n("text"),text:e().describe("Text content")}),t({type:n("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))})]),A=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output:H.describe("Result of the tool call"),result:b().describe("Unknown result of the tool call"),providerOptions:f}),X=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),result:c().describe("Result of the tool call (JSON-serializable)"),isError:g().optional().describe("Whether the result is an error or error message"),providerExecuted:g().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),Q=u([t({type:n("source"),sourceType:n("url"),id:e().describe("The ID of the source"),url:e().describe("The URL of the source"),title:e().optional().describe("The title of the source"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),t({type:n("source"),sourceType:n("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:c().optional().describe("Additional provider-specific metadata")})]),Y=t({role:n("system"),content:e().describe("System message content"),providerOptions:f}),Z=t({role:n("user"),content:l(u([E,k])).describe("User message content parts (text or file)"),providerOptions:f}),ee=t({role:n("assistant"),content:l(u([E,k,J,V,A])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:f}),te=t({role:n("tool"),content:l(A).describe("Tool message content (tool results)"),providerOptions:f}),oe=u([Y,Z,ee,te]),ae=l(oe).describe("A list of messages forming the prompt"),ie=t({prompt:ae.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:i().optional().describe("Maximum number of tokens to generate"),temperature:i().optional().describe("Temperature setting. The range depends on the provider and model"),topP:i().optional().describe("Nucleus sampling parameter"),topK:i().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:i().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:i().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:i().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:l(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:u([t({type:n("text")}),t({type:n("json"),schema:c().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:l(c()).optional().describe("The tools that are available for the model"),toolChoice:c().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:g().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:c().optional().describe("Abort signal for cancelling the operation"),providerOptions:c().optional().describe("Additional provider-specific options")}),ne=t({content:l(u([q,$,K,z,X,Q])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:x(["stop","length","content-filter","tool-calls","error","other","unknown"]).describe("Reason why generation stopped"),usage:U({inputTokens:i().optional(),outputTokens:i().optional(),totalTokens:i().optional(),reasoningTokens:i().optional()}).describe("Usage information for the language model call"),providerMetadata:c().optional().describe("Additional provider-specific metadata"),request:t({body:c().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({id:e().optional().describe("ID for the generated response"),timestamp:R().optional().describe("Timestamp for the start of the generated response"),modelId:e().optional().describe("The ID of the response model that was used"),headers:p(e(),e()).optional().describe("Response headers"),body:c().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:l(c()).describe("Warnings for the call, e.g. unsupported settings")});t({stream:c().describe("ReadableStream of LanguageModelV2StreamPart"),request:t({body:c().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({headers:p(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const se=t({supportedUrls:p(e(),l(e())).describe("Supported URL patterns by media type for the provider")});t({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:l(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const N=t({modelId:e().describe("The ID of the model"),callOptions:ie}),re=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:l(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),le=T("llm",re,{readOnly:!0}),ce=[{name:"LLM_METADATA",inputSchema:t({modelId:e().describe("The ID of the model")}),outputSchema:se},{name:"LLM_DO_STREAM",inputSchema:N,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:N,outputSchema:ne},...le],de=t({scopes:l(e()).describe("List of scopes available"),stateSchema:p(e(),b()).describe("JSON Schema (draft-07) defining the state structure")}),pe=[{name:"MCP_CONFIGURATION",inputSchema:t({}),outputSchema:de}],ue=t({toolName:e().describe("Name of the tool to invoke on that connection"),transformCode:e().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(input): Output { ... }`\n The input will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output. \n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),me=t({code:e().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(input): Output { ... }\`
|
|
2
2
|
The input is the resolved value of the references in the input field. Example:
|
|
3
3
|
{
|
|
4
4
|
"input": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as P,c as w,z as Q,t as h,u as v}from"./index-
|
|
1
|
+
import{n as P,c as w,z as Q,t as h,u as v}from"./index-BF7Y1e9M.js";import{u as F}from"./useMutation-GLUqnj57.js";import{K as x,a as q,u as U}from"./constants-CucT8Y-Y.js";function b(o,n,s){const e=[];if(o?.trim()){const t=o.trim(),r=s.map(a=>({field:[String(a)],operator:"contains",value:t}));r.length===1&&r[0]?e.push(r[0]):r.length>1&&e.push({operator:"or",conditions:r})}if(n&&n.length>0)for(const t of n)e.push({field:[t.column],operator:"eq",value:t.value});if(e.length!==0)return e.length===1?e[0]:{operator:"and",conditions:e}}function D(o,n,s){const e=o??s,t=n??"asc";return[{field:[String(e)],direction:t}]}function I(o){if(!o||typeof o!="object")throw new Error("Invalid result");if("isError"in o&&o.isError)throw new Error("content"in o&&Array.isArray(o.content)&&o.content[0]?.type==="text"?o.content[0].text:"Unknown error");if("structuredContent"in o)return o.structuredContent;throw new Error("No structured content found")}function k(o,n,s,e){const t=w.c(13);let r;t[0]!==n?(r=n.toUpperCase(),t[0]=n,t[1]=r):r=t[1];const i=`COLLECTION_${r}_GET`;let c;t[2]!==e||t[3]!==i||t[4]!==s?(c=x.mcpToolCall(e,i,s??""),t[2]=e,t[3]=i,t[4]=s,t[5]=c):c=t[5];let l;t[6]!==e||t[7]!==i||t[8]!==s?(l=async()=>{if(!s)return{item:null};const p=await e.callTool({name:i,arguments:{id:s}});return I(p)},t[6]=e,t[7]=i,t[8]=s,t[9]=l):l=t[9];let d;t[10]!==c||t[11]!==l?(d={queryKey:c,queryFn:l,staleTime:6e4},t[10]=c,t[11]=l,t[12]=d):d=t[12];const{data:f}=P(d);return f?.item??null}const z={structuredContent:{items:[]},isError:!1};function B(o,n,s,e={}){const{searchTerm:t,filters:r,sortKey:a,sortDirection:i,searchFields:c=["title","description"],defaultSortKey:l="updated_at",pageSize:d=100}=e,p=`COLLECTION_${n.toUpperCase()}_LIST`,m=b(t,r,c),y=D(a,i,l),E={...m&&{where:m},...y&&{orderBy:y},limit:d,offset:0},C=JSON.stringify(E),g=x.mcpToolCall(s,p,C),{data:N}=P({queryKey:g,queryFn:async()=>s?await s.callTool({name:p,arguments:E}):z,staleTime:3e4,retry:!1,select:S=>I(S??{})?.items??[]});return N}function X(o,n,s,e={}){const{searchTerm:t,filters:r,sortKey:a,sortDirection:i,searchFields:c=["title","description"],defaultSortKey:l="updated_at",pageSize:d=100}=e,p=`COLLECTION_${n.toUpperCase()}_LIST`,m=b(t,r,c),y=D(a,i,l),E={...m&&{where:m},...y&&{orderBy:y},limit:d,offset:0},C=JSON.stringify(E);return x.mcpToolCall(o,p,C)}function R(o,n,s){const e=w.c(33),t=Q();let r;e[0]!==n?(r=n.toUpperCase(),e[0]=n,e[1]=r):r=e[1];const a=r,i=`COLLECTION_${a}_CREATE`,c=`COLLECTION_${a}_UPDATE`,l=`COLLECTION_${a}_DELETE`;let d;e[2]!==t||e[3]!==a?(d=()=>{t.invalidateQueries({predicate:_=>{const u=_.queryKey;if(u[0]!=="mcp"||u[1]!=="client"||u[3]!=="tool-call")return!1;const L=u[4];return typeof L=="string"&&L.startsWith(`COLLECTION_${a}_`)}})},e[2]=t,e[3]=a,e[4]=d):d=e[4];const f=d;let p;e[5]!==s||e[6]!==i?(p=async _=>{const u=await s.callTool({name:i,arguments:{data:_}});if(u.isError)throw new Error(Array.isArray(u.content)?u.content[0]?.text:String(u.content));return I(u).item},e[5]=s,e[6]=i,e[7]=p):p=e[7];let m;e[8]!==f?(m=()=>{f(),h.success("Item created successfully")},e[8]=f,e[9]=m):m=e[9];let y;e[10]!==p||e[11]!==m?(y={mutationFn:p,onSuccess:m,onError:W},e[10]=p,e[11]=m,e[12]=y):y=e[12];const E=F(y);let C;e[13]!==s||e[14]!==c?(C=async _=>{const{id:u,data:L}=_,M=await s.callTool({name:c,arguments:{id:u,data:L}});return I(M).item},e[13]=s,e[14]=c,e[15]=C):C=e[15];let g;e[16]!==f?(g=()=>{f(),h.success("Item updated successfully")},e[16]=f,e[17]=g):g=e[17];let N;e[18]!==C||e[19]!==g?(N={mutationFn:C,onSuccess:g,onError:J},e[18]=C,e[19]=g,e[20]=N):N=e[20];const S=F(N);let T;e[21]!==s||e[22]!==l?(T=async _=>{const u=await s.callTool({name:l,arguments:{id:_}});return I(u).item.id},e[21]=s,e[22]=l,e[23]=T):T=e[23];let O;e[24]!==f?(O=()=>{f(),h.success("Item deleted successfully")},e[24]=f,e[25]=O):O=e[25];let K;e[26]!==T||e[27]!==O?(K={mutationFn:T,onSuccess:O,onError:j},e[26]=T,e[27]=O,e[28]=K):K=e[28];const A=F(K);let $;return e[29]!==E||e[30]!==A||e[31]!==S?($={create:E,update:S,delete:A},e[29]=E,e[30]=A,e[31]=S,e[32]=$):$=e[32],$}function j(o){const n=o instanceof Error?o.message:String(o);h.error(`Failed to delete item: ${n}`)}function J(o){const n=o instanceof Error?o.message:String(o);h.error(`Failed to update item: ${n}`)}function W(o){const n=o instanceof Error?o.message:String(o);h.error(`Failed to create item: ${n}`)}function Z(o){const n=w.c(4);let s;n[0]!==o?(s=o===void 0?{}:o,n[0]=o,n[1]=s):s=n[1];const e=s,{org:t}=v();let r;n[2]!==t.id?(r={connectionId:q,orgId:t.id},n[2]=t.id,n[3]=r):r=n[3];const a=U(r);return B(t.id,"CONNECTIONS",a,e)}function ee(o){const n=w.c(2),{org:s}=v();let e;n[0]!==s.id?(e={connectionId:q,orgId:s.id},n[0]=s.id,n[1]=e):e=n[1];const t=U(e);return k(s.id,"CONNECTIONS",o,t)}function te(){const o=w.c(2),{org:n}=v();let s;o[0]!==n.id?(s={connectionId:q,orgId:n.id},o[0]=n.id,o[1]=s):s=o[1];const e=U(s);return R(n.id,"CONNECTIONS",e)}export{z as E,D as a,X as b,b as c,k as d,B as e,ee as f,te as g,Z as h,R as u};
|
package/dist/client/assets/{use-create-virtual-mcp-Brpfqy1S.js → use-create-virtual-mcp-CSiBFS-p.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,u as m,m as C,O as f}from"./index-
|
|
1
|
+
import{c as p,u as m,m as C,O as f}from"./index-BF7Y1e9M.js";import{a as v}from"./use-virtual-mcp-BaDN22Su.js";function M(s){const e=p.c(10);let a;e[0]!==s?(a=s===void 0?{}:s,e[0]=s,e[1]=a):a=e[1];const d=a,{navigateOnCreate:l}=d,o=l===void 0?!1:l,{org:r}=m(),c=C(),t=v();let n;e[2]!==t.create||e[3]!==c||e[4]!==o||e[5]!==r?(n=async()=>{const g=await t.create.mutateAsync({title:"New Agent",description:"Agents let you securely expose integrated tools to the outside world.",status:"active",connections:[]});return o&&c({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:f,agentId:g.id}}),{id:g.id,virtualMcp:g}},e[2]=t.create,e[3]=c,e[4]=o,e[5]=r,e[6]=n):n=e[6];const u=n;let i;return e[7]!==t.create.isPending||e[8]!==u?(i={createVirtualMCP:u,isCreating:t.create.isPending},e[7]=t.create.isPending,e[8]=u,e[9]=i):i=e[9],i}export{M as u};
|