@decocms/mesh 2.114.5 → 2.115.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-D4527ICU.js → AlertCircle-DiL2HrFE.js} +1 -1
- package/dist/client/assets/{AlertOctagon-COPWzaf0.js → AlertOctagon-2d8rAOd4.js} +1 -1
- package/dist/client/assets/{AlertTriangle-DCH5pYxh.js → AlertTriangle-VgUX_bsB.js} +1 -1
- package/dist/client/assets/{ArrowLeft-LkHGsmHm.js → ArrowLeft-Br1qiDir.js} +1 -1
- package/dist/client/assets/{ArrowUp-CDfQ8pyb.js → ArrowUp-BjfCYJa6.js} +1 -1
- package/dist/client/assets/{Check-CjRTK1W3.js → Check-B14Bp2E0.js} +1 -1
- package/dist/client/assets/{CheckCircle-D8HwQ_vF.js → CheckCircle-qs5k2cFp.js} +1 -1
- package/dist/client/assets/{CheckDone01-03ijxcax.js → CheckDone01-COU71F1q.js} +1 -1
- package/dist/client/assets/{CheckVerified02-CtD1r3r9.js → CheckVerified02-C_h0QKPV.js} +1 -1
- package/dist/client/assets/{ChevronDown-_RktpP9c.js → ChevronDown-DmZAA_RH.js} +1 -1
- package/dist/client/assets/{ChevronRight-CXCT1lCM.js → ChevronRight-IL2oOJI2.js} +1 -1
- package/dist/client/assets/{Clock-Bmdb1TRN.js → Clock-BeB-7xuQ.js} +1 -1
- package/dist/client/assets/{Code01-7zAo2TKF.js → Code01-DnUALMy9.js} +1 -1
- package/dist/client/assets/{Container-CX-RbvCV.js → Container-BGGgIzJh.js} +1 -1
- package/dist/client/assets/{Copy01-DH2d5VIk.js → Copy01-BZzZvWHY.js} +1 -1
- package/dist/client/assets/{Dataflow03-C0pv0bfM.js → Dataflow03-BnILNUas.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-idJQgrR0.js → DotsHorizontal-C1qTqyiq.js} +1 -1
- package/dist/client/assets/{DotsVertical-CeT-zlQ9.js → DotsVertical-B-SoXTlv.js} +1 -1
- package/dist/client/assets/{Download01-C6sOPnkz.js → Download01-CW2ve7I5.js} +1 -1
- package/dist/client/assets/{Edit01-LXqrrmB1.js → Edit01-CA_byL8x.js} +1 -1
- package/dist/client/assets/{Eye-VVPfHR4D.js → Eye-DuHzxuzN.js} +1 -1
- package/dist/client/assets/{File02-7lPfhcb8.js → File02-HWzOQAS5.js} +1 -1
- package/dist/client/assets/{File06-BMp646T6.js → File06-6ostm09J.js} +1 -1
- package/dist/client/assets/{FilterLines-BHBNEtwf.js → FilterLines-n9w8nbRb.js} +1 -1
- package/dist/client/assets/{Globe01-Kkx6XQlj.js → Globe01-C7OLr5gu.js} +1 -1
- package/dist/client/assets/{Globe02-BqaVWXob.js → Globe02-DCQdCg-U.js} +1 -1
- package/dist/client/assets/{Grid01-BHI_ERnP.js → Grid01--gwdVXxp.js} +1 -1
- package/dist/client/assets/{Hash02-CgVI0A1g.js → Hash02-B3ztCRZG.js} +1 -1
- package/dist/client/assets/{Home02-BTAwhHo8.js → Home02-5xEMThw1.js} +1 -1
- package/dist/client/assets/{Image01-CC_Iyvd-.js → Image01-CHvGzt2y.js} +1 -1
- package/dist/client/assets/{Inbox01-C0b_GP1p.js → Inbox01-D__eEiRp.js} +1 -1
- package/dist/client/assets/{InfoCircle-DuvmlJAv.js → InfoCircle-BaJSxaGK.js} +1 -1
- package/dist/client/assets/{Key01-DCtZGi5S.js → Key01-CAUAOxiV.js} +1 -1
- package/dist/client/assets/{LinkExternal01-B_y3HiQu.js → LinkExternal01-UC_M5qWQ.js} +1 -1
- package/dist/client/assets/{List-BM1ULKxF.js → List-BJooyaoM.js} +1 -1
- package/dist/client/assets/{Loading01-1snKai6N.js → Loading01-1Zu_WpPr.js} +1 -1
- package/dist/client/assets/{Lock01-C6ZOoLqK.js → Lock01-DPYIJ_nA.js} +1 -1
- package/dist/client/assets/{Pin01-DpYa83SH.js → Pin01-DJanT9uS.js} +1 -1
- package/dist/client/assets/{Play-CgqvBg2y.js → Play-CahYnURS.js} +1 -1
- package/dist/client/assets/{Plus-DP2vmrEk.js → Plus-CRFHrfK2.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-CYXSIN1J.js → RefreshCcw01-DuNb9sh9.js} +1 -1
- package/dist/client/assets/{RefreshCw01-nnfUzBDg.js → RefreshCw01-CppBn3YV.js} +1 -1
- package/dist/client/assets/{Rows03-DWahBVYP.js → Rows03-CjT39fIX.js} +1 -1
- package/dist/client/assets/{Save01-Bqg14Jsn.js → Save01-_XMAksec.js} +1 -1
- package/dist/client/assets/{SearchMd-DrKsMuei.js → SearchMd-CZA5t4_M.js} +1 -1
- package/dist/client/assets/{Settings01-DJTSpTEO.js → Settings01-CmfD9-kk.js} +1 -1
- package/dist/client/assets/{Share07-E1brkTmr.js → Share07-tPlC5hop.js} +1 -1
- package/dist/client/assets/{Shield01-Cpp9zCrW.js → Shield01-BTe6K6H4.js} +1 -1
- package/dist/client/assets/{Terminal-BsKlphFd.js → Terminal-JVvp8Qza.js} +1 -1
- package/dist/client/assets/{Tool01-NJWs-WhI.js → Tool01-BY8zBv5Q.js} +1 -1
- package/dist/client/assets/{Trash01-lACkPNMB.js → Trash01-uafi7Ilf.js} +1 -1
- package/dist/client/assets/{Upload01-Daxvc3MZ.js → Upload01-j9dbqfwl.js} +1 -1
- package/dist/client/assets/{Users03-NwL7-0U5.js → Users03-DcEKYrkA.js} +1 -1
- package/dist/client/assets/{XCircle-BI-IxNLe.js → XCircle-BUqdRo4A.js} +1 -1
- package/dist/client/assets/{XClose-BAk7dT8G.js → XClose-BmynBvu4.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-CAewQIAH.js → agent-connections-preview-PbH9WU_0.js} +1 -1
- package/dist/client/assets/agent-detail-Cq0CB4eM.js +1 -0
- package/dist/client/assets/agents-6ayYcmP9.js +1 -0
- package/dist/client/assets/alert-dialog-BXLdEhYw.js +7 -0
- package/dist/client/assets/{auth-catchall-GmhyR443.js → auth-catchall-BmN6aGyF.js} +1 -1
- package/dist/client/assets/{avatar-CtRXPznJ.js → avatar-Bc7s3LEL.js} +1 -1
- package/dist/client/assets/{badge-CjnLH2lI.js → badge-D4AHLMOm.js} +1 -1
- package/dist/client/assets/{binder-Dt_u4Ovx.js → binder-c0e82ZKj.js} +1 -1
- package/dist/client/assets/{breadcrumb-LjVmMbX-.js → breadcrumb-DM1tOdpW.js} +1 -1
- package/dist/client/assets/{button-B5dhenVQ.js → button-DlMEAXru.js} +1 -1
- package/dist/client/assets/{card-BMSXwRZK.js → card-BJlwqw9P.js} +1 -1
- package/dist/client/assets/{checkbox-B3V3lNLc.js → checkbox-2ZZDRGKg.js} +1 -1
- package/dist/client/assets/{circle-alert-B6KuKG9n.js → circle-alert-BU4aPU4k.js} +1 -1
- package/dist/client/assets/{collection-detail-D3hf0Jbk.js → collection-detail-CcvsZ6SX.js} +2 -2
- package/dist/client/assets/{collection-tab-BOEDXnQR.js → collection-tab-D1U8qcC9.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-aNY90kKS.js → collection-table-wrapper-CTR1SyIy.js} +1 -1
- package/dist/client/assets/{collection-tabs-BO5PAHk4.js → collection-tabs-DX49JXWl.js} +1 -1
- package/dist/client/assets/{command-yCoqBOON.js → command-CZie2XvG.js} +1 -1
- package/dist/client/assets/{connect-CQwVcgEv.js → connect-BuwxUgJG.js} +1 -1
- package/dist/client/assets/{connection-card-BhlZU1pr.js → connection-card-CI7L8iKE.js} +1 -1
- package/dist/client/assets/connection-detail-CRaZ-Ye2.js +1 -0
- package/dist/client/assets/connections-B0wIwXTZ.js +1 -0
- package/dist/client/assets/constants-4GzD41KM.js +1 -0
- package/dist/client/assets/constants-PL5hL4qd.js +1 -0
- package/dist/client/assets/{create-organization-dialog-DutMRH55.js → create-organization-dialog-CfW7SB8o.js} +1 -1
- package/dist/client/assets/{create-project-dialog-DRsHceJD.js → create-project-dialog-dfuHufiJ.js} +1 -1
- package/dist/client/assets/dialog-Cwnz3LEA.js +1 -0
- package/dist/client/assets/dropdown-menu-BJqdu9io.js +1 -0
- package/dist/client/assets/dynamic-plugin-layout-aRox8LyK.js +1 -0
- package/dist/client/assets/{empty-state-C2LxutXw.js → empty-state-BkmlXyqb.js} +1 -1
- package/dist/client/assets/{empty-state-DNFU252E.js → empty-state-BlBaHJ3u.js} +1 -1
- package/dist/client/assets/{env-vars-editor-CqAf8U3A.js → env-vars-editor-qzHFuA5w.js} +1 -1
- package/dist/client/assets/{error-boundary-BmYrMabK.js → error-boundary-Dk3_bHxS.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BRcwDsGF.js → extract-connection-data-Cl1h0kax.js} +1 -1
- package/dist/client/assets/{file-browser-CvXUou5l.js → file-browser-BpuuoaOY.js} +2 -2
- package/dist/client/assets/form-B3bK9lhs.js +1 -0
- package/dist/client/assets/{grid-view-CRcbOk5V.js → grid-view-tbrO-yA3.js} +1 -1
- package/dist/client/assets/{home-7gGufnUB.js → home-DEEFTVc1.js} +1 -1
- package/dist/client/assets/{index-x_TnqT5B.js → index-1CQrZ9Zl.js} +1 -1
- package/dist/client/assets/{index-DbAkcs1f.js → index-2jF2yJ2o.js} +1 -1
- package/dist/client/assets/{index-C8kkzFPl.js → index-BPtZHCt5.js} +2 -2
- package/dist/client/assets/index-CeXKeP7Z.js +1 -0
- package/dist/client/assets/{index-CGZdgHcu.js → index-DGrxQVii.js} +1 -1
- package/dist/client/assets/{index-BTp0980Q.js → index-DjF4GflS.js} +1 -1
- package/dist/client/assets/{index-DWibhftK.js → index-MzZr0KB3.js} +1 -1
- package/dist/client/assets/index-Pglfh9Lp.css +1 -0
- package/dist/client/assets/{index-Bunb17vv.js → index-oUlshpJJ.js} +30 -30
- package/dist/client/assets/{infiniteQueryObserver-BXks7odB.js → infiniteQueryObserver-CzTbTGuU.js} +1 -1
- package/dist/client/assets/{input-Mr1OFJyo.js → input-BTxNeBOO.js} +1 -1
- package/dist/client/assets/{integration-icon-D9Lac1Wz.js → integration-icon-CTPrN73-.js} +1 -1
- package/dist/client/assets/{label-BG1T_p3q.js → label-bLbRV7ZJ.js} +1 -1
- package/dist/client/assets/{layout-D99bjGJH.js → layout-D-svMqBO.js} +1 -1
- package/dist/client/assets/{localstorage-keys-COeOMfeR.js → localstorage-keys-z-WZ22Zi.js} +1 -1
- package/dist/client/assets/{login-JX4XQrOX.js → login-D0xu4-Fa.js} +1 -1
- package/dist/client/assets/{markdown-DmUzq0fW.js → markdown-CgNryeyO.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D6uou3Tk.js → mcp-oauth-Dj71M6pS.js} +1 -1
- package/dist/client/assets/{mcp-server-card-DcmKpSBn.js → mcp-server-card-Bc5AS-wf.js} +1 -1
- package/dist/client/assets/mcp-server-detail-D02AsVR7.js +2 -0
- package/dist/client/assets/members-EmtbbMjC.js +3 -0
- package/dist/client/assets/{monitoring-CUWH3-yc.js → monitoring-C-93CV4C.js} +1 -1
- package/dist/client/assets/monitoring-dashboard-edit-Bdp6e51N.js +1 -0
- package/dist/client/assets/{monitoring-dashboard-view-BpqD12ZC.js → monitoring-dashboard-view-Bx7z2_z0.js} +2 -2
- package/dist/client/assets/{oauth-callback-CA72LutH.js → oauth-callback-CkkG9d7v.js} +1 -1
- package/dist/client/assets/page-BGugjR0I.js +1 -0
- package/dist/client/assets/page-ITQU-Zp8.js +1 -0
- package/dist/client/assets/{plugin-empty-state-CQXNVuX5.js → plugin-empty-state-AgNFTQ0u.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-WYiH6sc2.js → plugin-empty-state-DlghdeMy.js} +1 -1
- package/dist/client/assets/{plugin-header-B84nx02H.js → plugin-header-BiKI-0GN.js} +1 -1
- package/dist/client/assets/{plugin-header-BHGQDET9.js → plugin-header-DxI4kgNA.js} +1 -1
- package/dist/client/assets/{popover-D1pzNMOP.js → popover-DK0-mkfJ.js} +1 -1
- package/dist/client/assets/project-layout-ClSoqo8C.js +1 -0
- package/dist/client/assets/projects-list-78EdWnMz.js +1 -0
- package/dist/client/assets/ranking-layout-BipS-5d4.js +1 -0
- package/dist/client/assets/{readme-viewer-DatdJZvZ.js → readme-viewer-CYVu4zA3.js} +1 -1
- package/dist/client/assets/{registry-layout-BUPa9s1k.js → registry-layout-DuUFYDsK.js} +3 -3
- package/dist/client/assets/{registry-utils-qr99zc3y.js → registry-utils-BJco7Nso.js} +1 -1
- package/dist/client/assets/{reports-layout-BEeAVx6X.js → reports-layout-DWL4B4XL.js} +2 -2
- package/dist/client/assets/{reset-password-B7QTemHG.js → reset-password-C7TFy7aQ.js} +1 -1
- package/dist/client/assets/{resizable-DVFWStNI.js → resizable-zYSMb8PO.js} +1 -1
- package/dist/client/assets/{save-actions-C1hqEO2Q.js → save-actions-BdnWXMVf.js} +1 -1
- package/dist/client/assets/{scroll-area-B96z0OJW.js → scroll-area-30X2y975.js} +1 -1
- package/dist/client/assets/select-Duopl7P2.js +1 -0
- package/dist/client/assets/shell-layout-CI23YHUg.js +3 -0
- package/dist/client/assets/skeleton-CmCa76Pe.js +1 -0
- package/dist/client/assets/{spinner-IfgQRFqp.js → spinner--6L1PAKk.js} +1 -1
- package/dist/client/assets/{store-invite-BhzFqpM6.js → store-invite-DNBT5DzD.js} +1 -1
- package/dist/client/assets/{switch-DGp6vNcC.js → switch-CzMTfJyd.js} +1 -1
- package/dist/client/assets/{table-CMMXy5Nr.js → table-DPbr8gQl.js} +1 -1
- package/dist/client/assets/tasks-CqaWmm56.js +1 -0
- package/dist/client/assets/{textarea-BmDkS1nd.js → textarea-BNPURYr9.js} +1 -1
- package/dist/client/assets/{time-range-picker-TrkvnH9b.js → time-range-picker-C-sEn-dP.js} +1 -1
- package/dist/client/assets/{toggle-group-BX6pY9Pe.js → toggle-group-bVqu9tww.js} +1 -1
- package/dist/client/assets/{tools-list-De4BYXHg.js → tools-list-D2XTdfAR.js} +1 -1
- package/dist/client/assets/tooltip-BnwJ5PQp.js +1 -0
- package/dist/client/assets/{topbar-portal-AI9OKodd.js → topbar-portal-CrFEl7XT.js} +1 -1
- package/dist/client/assets/{typewriter-title-BtVgakQ8.js → typewriter-title-Dh7JaY-s.js} +1 -1
- package/dist/client/assets/{use-binding-B9wXdfeU.js → use-binding-CSl5A5cE.js} +1 -1
- package/dist/client/assets/{use-connection-CP6jP6nm.js → use-connection-CJPryUMd.js} +1 -1
- package/dist/client/assets/{use-copy-0wW0qGhT.js → use-copy-DELXo_w6.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Cywd7YYe.js → use-create-virtual-mcp-CEbxqW61.js} +1 -1
- package/dist/client/assets/use-deco-chat-open-Bj4jxMD7.js +23 -0
- package/dist/client/assets/{use-install-from-registry-CiGE-z-O.js → use-install-from-registry-Vj4wJ4IH.js} +1 -1
- package/dist/client/assets/{use-list-state-D5zjpWht.js → use-list-state-cJ107QPf.js} +1 -1
- package/dist/client/assets/{use-llm-C4Bry7oS.js → use-llm-us82LJMh.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BKi3cw-d.js → use-mcp-prompts-Sqkswu5s.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Cr0Y8gRI.js → use-mcp-tools-Dj4ni5D7.js} +1 -1
- package/dist/client/assets/use-mobile-EmqlWdQN.js +1 -0
- package/dist/client/assets/{use-organization-settings-CcELpryj.js → use-organization-settings-CMrztk0j.js} +1 -1
- package/dist/client/assets/{use-project-C6-m-oFo.js → use-project-BYeZMfFI.js} +1 -1
- package/dist/client/assets/use-settings-modal-tvp-XYtD.js +1 -0
- package/dist/client/assets/use-view-mode-Dg_d9_Oy.js +1 -0
- package/dist/client/assets/{use-virtual-mcp-XvCSSoaL.js → use-virtual-mcp-BzAB1Jwk.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DS7Rp5Du.js +1 -0
- package/dist/client/assets/{useMutation-BOvwy9IK.js → useMutation-kpLmB8S8.js} +1 -1
- package/dist/client/assets/useQuery-Do4lYH9e.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-8nf2pI1w.js +1 -0
- package/dist/client/assets/workflow-DbuBBxB5.js +1 -0
- package/dist/client/index.html +2 -2
- package/package.json +1 -1
- package/dist/client/assets/agent-detail-BJ7e6hVZ.js +0 -1
- package/dist/client/assets/agents-BayHH4eE.js +0 -1
- package/dist/client/assets/alert-dialog-DXvpuu2v.js +0 -7
- package/dist/client/assets/connection-detail-qYhiAtw2.js +0 -1
- package/dist/client/assets/connections-B8mrWQPE.js +0 -1
- package/dist/client/assets/constants-CvNkH2U9.js +0 -1
- package/dist/client/assets/constants-DPkAIN6Z.js +0 -1
- package/dist/client/assets/dialog-D2hO-7NL.js +0 -1
- package/dist/client/assets/dropdown-menu-DTV9aWPi.js +0 -1
- package/dist/client/assets/dynamic-plugin-layout-Bo1D4pyt.js +0 -1
- package/dist/client/assets/form-DTE57Ssv.js +0 -1
- package/dist/client/assets/index-Fc-7NN6M.js +0 -1
- package/dist/client/assets/index-QsCquYg-.css +0 -1
- package/dist/client/assets/index-wFCrgWrj.js +0 -1
- package/dist/client/assets/mcp-server-detail-RQTYqb1-.js +0 -2
- package/dist/client/assets/members-BeOTjUuL.js +0 -3
- package/dist/client/assets/monitoring-dashboard-edit-B2Vjinzp.js +0 -1
- package/dist/client/assets/page-CUSTLK_m.js +0 -1
- package/dist/client/assets/page-CvZFXv7u.js +0 -1
- package/dist/client/assets/project-layout-C8NT4ALB.js +0 -1
- package/dist/client/assets/project-settings-Cha270fD.js +0 -1
- package/dist/client/assets/projects-list-CcpUdUj6.js +0 -1
- package/dist/client/assets/ranking-layout-BGN2gmsx.js +0 -1
- package/dist/client/assets/select-DltKl0vA.js +0 -1
- package/dist/client/assets/shell-layout-BEAbkctA.js +0 -3
- package/dist/client/assets/tasks-DjEN_dgb.js +0 -1
- package/dist/client/assets/tooltip-BOvHNvKx.js +0 -1
- package/dist/client/assets/use-deco-chat-open-Jl2cvCiJ.js +0 -23
- package/dist/client/assets/use-view-mode-qnYxn17S.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BA8HdwgM.js +0 -1
- package/dist/client/assets/useQuery-Bp4CuU6A.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CYNigxjg.js +0 -1
- package/dist/client/assets/workflow-WgVMIyEN.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b4 as U,c as O,u as H,j as s,aE as G,r as I,b as M,O as V}from"./index-Bunb17vv.js";import{a as q}from"./use-project-C6-m-oFo.js";import{P as E}from"./index-wFCrgWrj.js";import{E as R,C as F}from"./empty-state-DNFU252E.js";import{A as J}from"./avatar-CtRXPznJ.js";import{c as K,B as T}from"./button-B5dhenVQ.js";import{f as Q}from"./formatDistanceToNow-Cb2QZZJn.js";import{C as W}from"./create-project-dialog-DRsHceJD.js";import{B as X,a as Y,b as Z,c as ee}from"./breadcrumb-LjVmMbX-.js";import"./useQuery-Bp4CuU6A.js";import"./constants-DPkAIN6Z.js";import"./tooltip-BOvHNvKx.js";import"./index-Fc-7NN6M.js";import"./Loading01-1snKai6N.js";import"./SearchMd-DrKsMuei.js";import"./input-Mr1OFJyo.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./useMutation-BOvwy9IK.js";import"./dialog-D2hO-7NL.js";import"./form-DTE57Ssv.js";import"./label-BG1T_p3q.js";import"./textarea-BmDkS1nd.js";import"./Check-CjRTK1W3.js";import"./ChevronRight-CXCT1lCM.js";const te=U("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);function se(t){const e=O.c(58),{project:l,onSettingsClick:c}=t,{org:r}=H(),d=l.ui?.themeColor??"#60a5fa",b=l.ui?.bannerColor??d,m=l.ui?.banner?`url(${l.ui.banner})`:void 0;let i;e[0]!==b||e[1]!==m?(i={backgroundColor:b,backgroundImage:m,backgroundSize:"cover",backgroundPosition:"center"},e[0]=b,e[1]=m,e[2]=i):i=e[2];const _=i;let u;e[3]!==r.slug||e[4]!==l.slug?(u={org:r.slug,project:l.slug},e[3]=r.slug,e[4]=l.slug,e[5]=u):u=e[5];let f;e[6]!==c?(f=B=>{B.preventDefault(),B.stopPropagation(),c?.(B)},e[6]=c,e[7]=f):f=e[7];let x,v;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=K("absolute top-3 right-3 size-6 rounded-md flex items-center justify-center","bg-black/20 hover:bg-black/40 transition-colors","opacity-0 group-hover:opacity-100"),v=s.jsx(te,{className:"size-3.5 text-white"}),e[8]=x,e[9]=v):(x=e[8],v=e[9]);let g;e[10]!==f?(g=s.jsx("button",{type:"button",onClick:f,className:x,children:v}),e[10]=f,e[11]=g):g=e[11];let p;e[12]!==_||e[13]!==g?(p=s.jsx("div",{className:"h-20 relative",style:_,children:g}),e[12]=_,e[13]=g,e[14]=p):p=e[14];let n;e[15]!==l.name||e[16]!==l.ui||e[17]!==d?(n=l.ui?.icon?s.jsx("img",{src:l.ui.icon,alt:"",className:"size-8 rounded-md object-cover"}):s.jsx("div",{className:"size-8 rounded-md flex items-center justify-center",style:{backgroundColor:d},children:s.jsx("span",{className:"text-sm font-medium text-white",children:l.name.charAt(0).toUpperCase()})}),e[15]=l.name,e[16]=l.ui,e[17]=d,e[18]=n):n=e[18];let a;e[19]!==l.name?(a=s.jsx("h3",{className:"font-medium text-base text-foreground truncate",children:l.name}),e[19]=l.name,e[20]=a):a=e[20];let h;e[21]!==l.updatedAt?(h=Q(new Date(l.updatedAt),{addSuffix:!0}),e[21]=l.updatedAt,e[22]=h):h=e[22];let j;e[23]!==h?(j=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Edited"," ",h]}),e[23]=h,e[24]=j):j=e[24];let C;e[25]!==a||e[26]!==j?(C=s.jsxs("div",{className:"flex flex-col",children:[a,j]}),e[25]=a,e[26]=j,e[27]=C):C=e[27];let N;e[28]!==n||e[29]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-4",children:[n,C]}),e[28]=n,e[29]=C,e[30]=N):N=e[30];let k;e[31]!==l.boundConnections?(k=l.boundConnections.slice(0,4).map(le),e[31]=l.boundConnections,e[32]=k):k=e[32];let P;e[33]!==l.boundConnections.length?(P=l.boundConnections.length>4&&s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsxs("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center text-xs text-muted-foreground",children:["+",l.boundConnections.length-4]})}),e[33]=l.boundConnections.length,e[34]=P):P=e[34];let y;e[35]!==k||e[36]!==P?(y=s.jsxs("div",{className:"flex pr-2",children:[k,P]}),e[35]=k,e[36]=P,e[37]=y):y=e[37];const z=r.logo??void 0;let w;e[38]!==r.name||e[39]!==z?(w=s.jsx(J,{url:z,fallback:r.name,size:"2xs",className:"shrink-0 rounded",objectFit:"cover"}),e[38]=r.name,e[39]=z,e[40]=w):w=e[40];let S;e[41]!==r.name?(S=s.jsx("span",{className:"truncate max-w-20",children:r.name}),e[41]=r.name,e[42]=S):S=e[42];let o;e[43]!==w||e[44]!==S?(o=s.jsxs("div",{className:"flex items-center gap-2 text-xs text-foreground",children:[w,S]}),e[43]=w,e[44]=S,e[45]=o):o=e[45];let L;e[46]!==y||e[47]!==o?(L=s.jsxs("div",{className:"flex items-center justify-between mt-4",children:[y,o]}),e[46]=y,e[47]=o,e[48]=L):L=e[48];let $;e[49]!==N||e[50]!==L?($=s.jsxs("div",{className:"flex flex-col flex-1 justify-between p-4",children:[N,L]}),e[49]=N,e[50]=L,e[51]=$):$=e[51];let A;e[52]!==$||e[53]!==p?(A=s.jsxs("div",{className:"border border-border rounded-xl overflow-hidden bg-card",children:[p,$]}),e[52]=$,e[53]=p,e[54]=A):A=e[54];let D;return e[55]!==A||e[56]!==u?(D=s.jsx(G,{to:"/$org/$project",params:u,className:"block group",children:A}),e[55]=A,e[56]=u,e[57]=D):D=e[57],D}function le(t){return s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsx(re,{connection:t})},t.id)}function re(t){const e=O.c(13),{connection:l}=t;if(l.icon){let m;e[0]!==l.icon||e[1]!==l.title?(m=s.jsx("img",{src:l.icon,alt:l.title,className:"size-4 object-cover"}),e[0]=l.icon,e[1]=l.title,e[2]=m):m=e[2];let i;return e[3]!==l.title||e[4]!==m?(i=s.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:l.title,children:m}),e[3]=l.title,e[4]=m,e[5]=i):i=e[5],i}const c=l.title;let r;e[6]!==l.title?(r=l.title.charAt(0).toUpperCase(),e[6]=l.title,e[7]=r):r=e[7];let d;e[8]!==r?(d=s.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:r}),e[8]=r,e[9]=d):d=e[9];let b;return e[10]!==l.title||e[11]!==d?(b=s.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:c,children:d}),e[10]=l.title,e[11]=d,e[12]=b):b=e[12],b}function $e(){const t=O.c(40),{org:e}=H(),{data:l,isLoading:c}=q(e.id),[r,d]=I.useState(""),[b,m]=I.useState(!1),i=M();let _,u,f,x,v,g,p,n,a;if(t[0]!==c||t[1]!==i||t[2]!==e.slug||t[3]!==l||t[4]!==r){const N=l?.filter(ie)?.filter(o=>o.name.toLowerCase().includes(r.toLowerCase())||o.description?.toLowerCase().includes(r.toLowerCase()))??[];let k;t[14]!==i||t[15]!==e.slug?(k=o=>{i({to:"/$org/$project/settings",params:{org:e.slug,project:o}})},t[14]=i,t[15]=e.slug,t[16]=k):k=t[16];const P=k;let y;t[17]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{m(!0)},t[17]=y):y=t[17];const z=y;u=E;let w;t[18]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(E.Header.Left,{children:s.jsx(X,{children:s.jsx(Y,{children:s.jsx(Z,{children:s.jsx(ee,{children:"Projects"})})})})}),t[18]=w):w=t[18],t[19]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(E.Header,{children:[w,s.jsx(E.Header.Right,{children:s.jsx(T,{onClick:z,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Create new project"})})]}),t[19]=n):n=t[19];let S;t[20]===Symbol.for("react.memo_cache_sentinel")?(S=o=>{o.key==="Escape"&&(d(""),o.target.blur())},t[20]=S):S=t[20],t[21]!==r?(a=s.jsx(F,{value:r,onChange:d,placeholder:"Search for a project...",onKeyDown:S}),t[21]=r,t[22]=a):a=t[22],_=E.Content,f="@container",t[23]!==c?(x=c&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:[...Array(4)].map(oe)})}),t[23]=c,t[24]=x):x=t[24],v=!c&&N.length===0&&r&&s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(R,{title:"No projects found",description:`No projects match "${r}"`})}),g=!c&&N.length===0&&!r&&s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(R,{title:"No projects yet",description:"Create a project to get started.",actions:s.jsx(T,{onClick:z,children:"Create new project"})})}),p=!c&&N.length>0&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:N.map(o=>s.jsx(se,{project:o,onSettingsClick:()=>P(o.slug)},o.id))})}),t[0]=c,t[1]=i,t[2]=e.slug,t[3]=l,t[4]=r,t[5]=_,t[6]=u,t[7]=f,t[8]=x,t[9]=v,t[10]=g,t[11]=p,t[12]=n,t[13]=a}else _=t[5],u=t[6],f=t[7],x=t[8],v=t[9],g=t[10],p=t[11],n=t[12],a=t[13];let h;t[25]!==_||t[26]!==f||t[27]!==x||t[28]!==v||t[29]!==g||t[30]!==p?(h=s.jsxs(_,{className:f,children:[x,v,g,p]}),t[25]=_,t[26]=f,t[27]=x,t[28]=v,t[29]=g,t[30]=p,t[31]=h):h=t[31];let j;t[32]!==b?(j=s.jsx(W,{open:b,onOpenChange:m}),t[32]=b,t[33]=j):j=t[33];let C;return t[34]!==u||t[35]!==n||t[36]!==a||t[37]!==h||t[38]!==j?(C=s.jsxs(u,{children:[n,a,h,j]}),t[34]=u,t[35]=n,t[36]=a,t[37]=h,t[38]=j,t[39]=C):C=t[39],C}function oe(t,e){return s.jsx("div",{className:"h-[240px] rounded-xl bg-muted animate-pulse"},e)}function ie(t){return t.slug!==V}export{$e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as C,j as s,bC as V,r as B,bD as me,u as fe,a as ue,b as xe,bE as pe}from"./index-Bunb17vv.js";import{c as he}from"./binder-Dt_u4Ovx.js";import{u as W}from"./useQuery-Bp4CuU6A.js";import{h as ge}from"./use-connection-CP6jP6nm.js";import{a as je,u as be,j as Ne}from"./constants-DPkAIN6Z.js";import{u as le,P as ye}from"./topbar-portal-AI9OKodd.js";import{i as G}from"./Loading01-1snKai6N.js";import{t as ve}from"./Settings01-DJTSpTEO.js";import{c as E,B as _e}from"./button-B5dhenVQ.js";import{i as Y}from"./AlertCircle-D4527ICU.js";import{i as Se}from"./ArrowLeft-LkHGsmHm.js";import{s as ne}from"./Clock-Bmdb1TRN.js";import{i as Ce}from"./CheckCircle-D8HwQ_vF.js";import{i as we}from"./InfoCircle-DuvmlJAv.js";import{i as ke}from"./XCircle-BI-IxNLe.js";import{T as A,b as F,c as D,a as ie,d as re,e as oe}from"./table-CMMXy5Nr.js";import{M as $e}from"./markdown-DmUzq0fW.js";import{i as Te,n as Re}from"./ArrowUp-CDfQ8pyb.js";import{i as Ie}from"./CheckVerified02-CtD1r3r9.js";import{s as J,n as ze,i as Le}from"./Rows03-DWahBVYP.js";import{i as Ee}from"./File02-7lPfhcb8.js";import{s as Pe}from"./Hash02-CgVI0A1g.js";import{B as Ae,a as De,b as Oe,c as Me}from"./breadcrumb-LjVmMbX-.js";import{b as Be,c as Fe,d as Ke,a as qe,C as Ge}from"./card-BMSXwRZK.js";import{i as He}from"./SearchMd-DrKsMuei.js";import{I as Ue}from"./input-Mr1OFJyo.js";import{S as X,a as Z,b as ee,c as te,d as K}from"./select-DltKl0vA.js";import"./useMutation-BOvwy9IK.js";import"./ChevronRight-CXCT1lCM.js";import"./index-Fc-7NN6M.js";import"./Check-CjRTK1W3.js";import"./ChevronDown-_RktpP9c.js";const Q={reportsList:t=>["collection-reorder-ranking","reports","list",t],report:(t,e)=>["collection-reorder-ranking","reports","detail",t,e],pluginConfig:(t,e)=>["project-plugin-config",t,e]};function Ve(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(V,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No report source connected"}),s.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an MCP server that provides reports to view collection reorder ranking insights."})]}),t[0]=e):e=t[0],e}const q={passing:{label:"Passing",color:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",icon:Ce},warning:{label:"Warning",color:"bg-amber-500/15 text-amber-700 dark:text-amber-400 border-amber-500/25",icon:Y},failing:{label:"Failing",color:"bg-red-500/15 text-red-700 dark:text-red-400 border-red-500/25",icon:ke},info:{label:"Info",color:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",icon:we}};function ae(t){const e=C.c(10),{status:l,size:n}=t,i=n===void 0?"default":n,r=q[l]??q.info,o=r.icon,a=i==="sm",c=a?"px-2 py-0.5":"px-2.5 py-1";let d;e[0]!==r.color||e[1]!==c?(d=E("inline-flex items-center gap-1 rounded-full border text-xs font-medium",c,r.color),e[0]=r.color,e[1]=c,e[2]=d):d=e[2];const m=a?12:14;let f;e[3]!==o||e[4]!==m?(f=s.jsx(o,{size:m}),e[3]=o,e[4]=m,e[5]=f):f=e[5];let u;return e[6]!==r.label||e[7]!==d||e[8]!==f?(u=s.jsxs("span",{className:d,children:[f,r.label]}),e[6]=r.label,e[7]=d,e[8]=f,e[9]=u):u=e[9],u}function We(){const t=C.c(7),{connectionId:e,toolCaller:l}=le();let n;t[0]!==e?(n=Q.reportsList(e),t[0]=e,t[1]=n):n=t[1];let i;t[2]!==l?(i=async()=>await l("REPORTS_LIST",{}),t[2]=l,t[3]=i):i=t[3];let r;return t[4]!==n||t[5]!==i?(r={queryKey:n,queryFn:i,staleTime:6e4},t[4]=n,t[5]=i,t[6]=r):r=t[6],W(r)}function Ye(t){const e=C.c(10),{connectionId:l,toolCaller:n}=le();let i;e[0]!==l||e[1]!==t?(i=Q.report(l,t),e[0]=l,e[1]=t,e[2]=i):i=e[2];let r;e[3]!==t||e[4]!==n?(r=async()=>await n("REPORTS_GET",{id:t}),e[3]=t,e[4]=n,e[5]=r):r=e[5];const o=!!t;let a;return e[6]!==i||e[7]!==r||e[8]!==o?(a={queryKey:i,queryFn:r,enabled:o,staleTime:6e4},e[6]=i,e[7]=r,e[8]=o,e[9]=a):a=e[9],W(a)}const Je={passing:"bg-emerald-500",warning:"bg-amber-500",failing:"bg-red-500",info:"bg-blue-500"},se=["#A595FF","#FFC116","#DE3A6E"];function O(t){const e=C.c(7),{icon:l,title:n}=t;let i;e[0]!==l?(i=s.jsx(l,{size:16,className:"opacity-75 shrink-0 text-foreground"}),e[0]=l,e[1]=i):i=e[1];let r;e[2]!==n?(r=s.jsx("span",{className:"text-base text-foreground opacity-75",children:n}),e[2]=n,e[3]=r):r=e[3];let o;return e[4]!==i||e[5]!==r?(o=s.jsxs("div",{className:"flex gap-2 items-center",children:[i,r]}),e[4]=i,e[5]=r,e[6]=o):o=e[6],o}function Qe(t){const e=C.c(2),{content:l}=t;let n;return e[0]!==l?(n=s.jsx($e,{children:l}),e[0]=l,e[1]=n):n=e[1],n}function Xe(t){const e=C.c(15),{metric:l}=t;let n;e[0]!==l.unit?(n=l.unit&&s.jsx("span",{className:"text-base text-muted-foreground ml-1",children:l.unit}),e[0]=l.unit,e[1]=n):n=e[1];let i;e[2]!==l.value||e[3]!==n?(i=s.jsxs("div",{className:"text-2xl leading-8 text-foreground font-normal tabular-nums",children:[l.value,n]}),e[2]=l.value,e[3]=n,e[4]=i):i=e[4];let r;e[5]!==l.status?(r=l.status&&s.jsx("span",{className:E("inline-block size-2 rounded-full shrink-0",Je[l.status])}),e[5]=l.status,e[6]=r):r=e[6];let o;e[7]!==l.label?(o=s.jsx("span",{className:"text-sm text-foreground",children:l.label}),e[7]=l.label,e[8]=o):o=e[8];let a;e[9]!==r||e[10]!==o?(a=s.jsxs("div",{className:"flex gap-1.5 items-center",children:[r,o]}),e[9]=r,e[10]=o,e[11]=a):a=e[11];let c;return e[12]!==i||e[13]!==a?(c=s.jsxs("div",{className:"flex flex-col gap-3 items-start justify-end border border-border rounded-lg p-5 flex-1",children:[i,a]}),e[12]=i,e[13]=a,e[14]=c):c=e[14],c}function ce(t){const e=C.c(12),{title:l,items:n,stacked:i}=t,r=i===void 0?!1:i;let o;e[0]!==l?(o=l&&s.jsx(O,{icon:J,title:l}),e[0]=l,e[1]=o):o=e[1];const a=r?"flex-col items-stretch":"items-stretch";let c;e[2]!==a?(c=E("flex gap-4",a),e[2]=a,e[3]=c):c=e[3];let d;e[4]!==n?(d=n.map(Ze),e[4]=n,e[5]=d):d=e[5];let m;e[6]!==c||e[7]!==d?(m=s.jsx("div",{className:c,children:d}),e[6]=c,e[7]=d,e[8]=m):m=e[8];let f;return e[9]!==o||e[10]!==m?(f=s.jsxs("div",{className:"space-y-4",children:[o,m]}),e[9]=o,e[10]=m,e[11]=f):f=e[11],f}function Ze(t,e){return s.jsx(Xe,{metric:t},`${t.label}-${e}`)}function et(t){const e=C.c(16),{title:l,columns:n,rows:i}=t;let r;e[0]!==l?(r=l&&s.jsx(O,{icon:J,title:l}),e[0]=l,e[1]=r):r=e[1];let o;e[2]!==n?(o=n.map(lt),e[2]=n,e[3]=o):o=e[3];let a;e[4]!==o?(a=s.jsx(ie,{children:s.jsx(F,{children:o})}),e[4]=o,e[5]=a):a=e[5];let c;e[6]!==i?(c=i.map(tt),e[6]=i,e[7]=c):c=e[7];let d;e[8]!==c?(d=s.jsx(re,{children:c}),e[8]=c,e[9]=d):d=e[9];let m;e[10]!==a||e[11]!==d?(m=s.jsx("div",{className:"rounded-lg border overflow-hidden",children:s.jsxs(oe,{children:[a,d]})}),e[10]=a,e[11]=d,e[12]=m):m=e[12];let f;return e[13]!==r||e[14]!==m?(f=s.jsxs("div",{className:"space-y-4",children:[r,m]}),e[13]=r,e[14]=m,e[15]=f):f=e[15],f}function tt(t,e){return s.jsx(F,{children:t.map(st)},e)}function st(t,e){return s.jsx(D,{className:"text-sm",children:t??s.jsx("span",{className:"text-muted-foreground",children:"—"})},e)}function lt(t){return s.jsx(A,{className:"font-mono text-xs uppercase text-muted-foreground",children:t},t)}function de(t){const e=C.c(11),{title:l,items:n}=t;let i;e[0]!==l?(i=l&&s.jsx(O,{icon:Ie,title:l}),e[0]=l,e[1]=i):i=e[1];let r;if(e[2]!==n){let c;e[4]!==n.length?(c=(d,m)=>s.jsxs("div",{className:"flex gap-4 items-stretch",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center w-4 shrink-0",children:[s.jsx("div",{className:"h-full w-px bg-border"}),s.jsx("div",{className:"w-2 h-4 rounded-full flex",style:{backgroundColor:se[m%se.length]}}),s.jsx("div",{className:E("h-full w-px bg-border",m===n.length-1&&"invisible")})]}),s.jsxs("div",{className:"flex flex-col gap-2 items-start py-3 pb-4 min-w-0",children:[s.jsx("span",{className:"text-sm font-medium text-foreground leading-none",children:d.label}),d.description&&s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:d.description})]})]},`${d.label}-${m}`),e[4]=n.length,e[5]=c):c=e[5],r=n.map(c),e[2]=n,e[3]=r}else r=e[3];let o;e[6]!==r?(o=s.jsx("div",{className:"flex flex-col",children:r}),e[6]=r,e[7]=o):o=e[7];let a;return e[8]!==i||e[9]!==o?(a=s.jsxs("div",{className:"space-y-4",children:[i,o]}),e[8]=i,e[9]=o,e[10]=a):a=e[10],a}function nt(t){const e=C.c(3),{content:l}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(O,{icon:Ee,title:"Notas"}),e[0]=n):n=e[0];let i;return e[1]!==l?(i=s.jsxs("div",{className:"space-y-4",children:[n,s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:l})]}),e[1]=l,e[2]=i):i=e[2],i}function it(t){const e=C.c(11),{delta:l}=t;if(l===0){let d;return e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("span",{className:"inline-flex items-center justify-center",children:s.jsx(Le,{size:16,className:"text-muted-foreground"})}),e[0]=d):d=e[0],d}const n=l>0,i=n?"text-emerald-600":"text-destructive";let r;e[1]!==i?(r=E("inline-flex items-center gap-0.5 text-sm font-medium",i),e[1]=i,e[2]=r):r=e[2];let o;e[3]!==n?(o=n?s.jsx(Te,{size:16}):s.jsx(Re,{size:16}),e[3]=n,e[4]=o):o=e[4];let a;e[5]!==l?(a=Math.abs(l),e[5]=l,e[6]=a):a=e[6];let c;return e[7]!==r||e[8]!==o||e[9]!==a?(c=s.jsxs("span",{className:r,children:[o,a]}),e[7]=r,e[8]=o,e[9]=a,e[10]=c):c=e[10],c}function rt(t){return t.length===0?[]:t.map(e=>{const l=e.reference_position!==void 0?e.reference_position:e.position+(e.delta??0);return{...e,position:l,delta:0,reference_position:void 0}}).sort((e,l)=>e.position-l.position)}function U(t){const e=C.c(25),{rows:l,label:n}=t;let i;e[0]!==l?(i=Math.max(4,...l.map(dt)),e[0]=l,e[1]=i):i=e[1];const r=i;let o;e[2]!==r?(o=["IMPRESSIONS","SELECT RATE","ATC","PURCHASE RATE",...Array.from({length:Math.max(0,r-4)},ct)],e[2]=r,e[3]=o):o=e[3];const a=o;let c;e[4]!==n?(c=n&&s.jsx("span",{className:"text-xs font-mono uppercase text-muted-foreground opacity-60 tracking-wide px-1",children:n}),e[4]=n,e[5]=c):c=e[5];let d,m,f;e[6]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(A,{className:"font-mono text-xs uppercase text-muted-foreground w-[60px]",children:"#"}),m=s.jsx(A,{className:"font-mono text-xs uppercase text-muted-foreground w-[60px]",children:"DELTA"}),f=s.jsx(A,{className:"font-mono text-xs uppercase text-muted-foreground",children:"PRODUTO"}),e[6]=d,e[7]=m,e[8]=f):(d=e[6],m=e[7],f=e[8]);let u;e[9]!==r||e[10]!==a?(u=s.jsx(ie,{className:"sticky top-0 bg-background z-10",children:s.jsxs(F,{children:[d,m,f,a.slice(0,r).map(at)]})}),e[9]=r,e[10]=a,e[11]=u):u=e[11];let x;if(e[12]!==l||e[13]!==r){let y;e[15]!==r?(y=(N,w)=>{const p=N.reference_position!==void 0?N.reference_position-N.position:N.delta??0;return s.jsxs(F,{children:[s.jsx(D,{children:s.jsxs("div",{className:"flex items-center gap-1 opacity-50",children:[s.jsx(Pe,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground tabular-nums",children:N.position})]})}),s.jsx(D,{children:s.jsx(it,{delta:p})}),s.jsx(D,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[N.image&&s.jsx("img",{src:N.image,alt:"",className:"h-12 w-8 object-cover rounded-sm shrink-0 bg-muted"}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:N.label})]})}),(()=>{const k=["sessions","select_rate","add_to_cart_rate","purchase_rate"],R=typeof N.note=="object"&&N.note!==null?N.note:null;return Array.from({length:r},(L,$)=>R?.[k[$]??""]??N.values[$]??null).map(ot)})()]},w)},e[15]=r,e[16]=y):y=e[16],x=l.map(y),e[12]=l,e[13]=r,e[14]=x}else x=e[14];let h;e[17]!==x?(h=s.jsx(re,{children:x}),e[17]=x,e[18]=h):h=e[18];let g;e[19]!==u||e[20]!==h?(g=s.jsx("div",{className:"border border-border rounded-lg overflow-auto max-h-[820px]",children:s.jsxs(oe,{children:[u,h]})}),e[19]=u,e[20]=h,e[21]=g):g=e[21];let j;return e[22]!==g||e[23]!==c?(j=s.jsxs("div",{className:"flex flex-col gap-2 min-w-0 flex-1",children:[c,g]}),e[22]=g,e[23]=c,e[24]=j):j=e[24],j}function ot(t,e){return s.jsx(D,{className:"text-sm tabular-nums",children:t??"—"},e)}function at(t){return s.jsx(A,{className:"font-mono text-xs uppercase text-muted-foreground",children:t},t)}function ct(t,e){return`Val ${e+5}`}function dt(t){return t.values.length}function mt(t){const e=C.c(20),{title:l,rows:n}=t,[i,r]=B.useState(!1);let o;e[0]!==n?(o=rt(n),e[0]=n,e[1]=o):o=e[1];const a=o;let c;e[2]!==l?(c=l&&s.jsx(O,{icon:J,title:l}),e[2]=l,e[3]=c):c=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=()=>r(ft),e[4]=d):d=e[4];const m=i?"bg-primary text-primary-foreground border-primary":"bg-transparent text-muted-foreground border-border hover:text-foreground hover:border-foreground/30";let f;e[5]!==m?(f=E("inline-flex items-center gap-1.5 text-xs font-medium px-2.5 py-1.5 rounded-md border transition-colors",m),e[5]=m,e[6]=f):f=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ze,{size:14}),e[7]=u):u=e[7];let x;e[8]!==f?(x=s.jsxs("button",{type:"button",onClick:d,className:f,children:[u,"Comparar com Ordenação Atual"]}),e[8]=f,e[9]=x):x=e[9];let h;e[10]!==c||e[11]!==x?(h=s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[c,x]}),e[10]=c,e[11]=x,e[12]=h):h=e[12];let g;e[13]!==a||e[14]!==n||e[15]!==i?(g=i?s.jsxs("div",{className:"flex gap-4 items-start",children:[s.jsx(U,{rows:n,label:"Ordenação Proposta"}),s.jsx(U,{rows:a,label:"Ordenação Atual"})]}):s.jsx(U,{rows:n}),e[13]=a,e[14]=n,e[15]=i,e[16]=g):g=e[16];let j;return e[17]!==h||e[18]!==g?(j=s.jsxs("div",{className:"space-y-4",children:[h,g]}),e[17]=h,e[18]=g,e[19]=j):j=e[19],j}function ft(t){return!t}function ut(t){const e=C.c(17),{section:l}=t;switch(console.log("RankingSectionRenderer section:",l),l.type){case"markdown":{let n;return e[0]!==l.content?(n=s.jsx(Qe,{content:l.content}),e[0]=l.content,e[1]=n):n=e[1],n}case"metrics":{let n;return e[2]!==l.items||e[3]!==l.title?(n=s.jsx(ce,{title:l.title,items:l.items}),e[2]=l.items,e[3]=l.title,e[4]=n):n=e[4],n}case"table":{let n;return e[5]!==l.columns||e[6]!==l.rows||e[7]!==l.title?(n=s.jsx(et,{title:l.title,columns:l.columns,rows:l.rows}),e[5]=l.columns,e[6]=l.rows,e[7]=l.title,e[8]=n):n=e[8],n}case"criteria":{let n;return e[9]!==l.items||e[10]!==l.title?(n=s.jsx(de,{title:l.title,items:l.items}),e[9]=l.items,e[10]=l.title,e[11]=n):n=e[11],n}case"note":{let n;return e[12]!==l.content?(n=s.jsx(nt,{content:l.content}),e[12]=l.content,e[13]=n):n=e[13],n}case"ranked-list":{let n;return e[14]!==l.rows||e[15]!==l.title?(n=s.jsx(mt,{title:l.title,rows:l.rows}),e[14]=l.rows,e[15]=l.title,e[16]=n):n=e[16],n}default:return null}}function xt(t){return new Date(t).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}function pt(t){const e=C.c(49),{reportId:l,onBack:n}=t,{data:i,isLoading:r,error:o}=Ye(l);if(r){let _;return e[0]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(G,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading report..."})]}),e[0]=_):_=e[0],_}if(o||!i){let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Y,{size:48,className:"text-destructive mb-4"}),e[1]=_):_=e[1];const L=o?"Error loading report":"Report not found";let $;e[2]!==L?($=s.jsx("h3",{className:"text-lg font-medium mb-2",children:L}),e[2]=L,e[3]=$):$=e[3];const T=o?.message??"The requested report could not be found.";let I;e[4]!==T?(I=s.jsx("p",{className:"text-muted-foreground text-center mb-4",children:T}),e[4]=T,e[5]=I):I=e[5];let b;e[6]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Se,{size:14,className:"mr-1"}),e[6]=b):b=e[6];let S;e[7]!==n?(S=s.jsxs(_e,{variant:"outline",onClick:n,children:[b,"Back to reports"]}),e[7]=n,e[8]=S):S=e[8];let z;return e[9]!==$||e[10]!==I||e[11]!==S?(z=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[_,$,I,S]}),e[9]=$,e[10]=I,e[11]=S,e[12]=z):z=e[12],z}let a;e[13]!==i.title?(a=s.jsx("h1",{className:"text-xl font-semibold leading-tight",children:i.title}),e[13]=i.title,e[14]=a):a=e[14];let c;e[15]!==i.summary?(c=s.jsx("p",{className:"text-sm text-muted-foreground",children:i.summary}),e[15]=i.summary,e[16]=c):c=e[16];let d;e[17]!==a||e[18]!==c?(d=s.jsxs("div",{className:"space-y-1 min-w-0",children:[a,c]}),e[17]=a,e[18]=c,e[19]=d):d=e[19];let m;e[20]!==i.status?(m=s.jsx(ae,{status:i.status}),e[20]=i.status,e[21]=m):m=e[21];let f;e[22]!==d||e[23]!==m?(f=s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d,m]}),e[22]=d,e[23]=m,e[24]=f):f=e[24];let u;e[25]!==i.category?(u=s.jsx("span",{className:"capitalize",children:i.category}),e[25]=i.category,e[26]=u):u=e[26];let x;e[27]!==i.source?(x=i.source&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-border",children:"|"}),s.jsx("span",{children:i.source})]}),e[27]=i.source,e[28]=x):x=e[28];let h;e[29]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("span",{className:"text-border",children:"|"}),e[29]=h):h=e[29];let g;e[30]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ne,{size:12}),e[30]=g):g=e[30];let j;e[31]!==i.updatedAt?(j=xt(i.updatedAt),e[31]=i.updatedAt,e[32]=j):j=e[32];let y;e[33]!==j?(y=s.jsxs("span",{className:"inline-flex items-center gap-1",children:[g,j]}),e[33]=j,e[34]=y):y=e[34];let N;e[35]!==y||e[36]!==u||e[37]!==x?(N=s.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[u,x,h,y]}),e[35]=y,e[36]=u,e[37]=x,e[38]=N):N=e[38];let w;e[39]!==N||e[40]!==f?(w=s.jsxs("div",{className:"border-b border-border py-4 space-y-3",children:[f,N]}),e[39]=N,e[40]=f,e[41]=w):w=e[41];let p;e[42]!==i.sections?(p=me(i.sections??[]).map(ht),e[42]=i.sections,e[43]=p):p=e[43];let k;e[44]!==p?(k=s.jsx("div",{className:"flex-1 py-6 space-y-8",children:p}),e[44]=p,e[45]=k):k=e[45];let R;return e[46]!==w||e[47]!==k?(R=s.jsxs("div",{className:"flex flex-col h-full overflow-y-auto py-6 px-64",children:[w,k]}),e[46]=w,e[47]=k,e[48]=R):R=e[48],R}function ht(t){return t.type==="side-by-side"?s.jsxs("div",{className:"flex gap-6 items-start w-full",children:[s.jsx("div",{className:"w-full",children:s.jsx(de,{title:t.left.title,items:t.left.items})}),s.jsx("div",{className:"w-full",children:s.jsx(ce,{title:t.right.title,items:t.right.items,stacked:!0})})]},`${t.leftIdx}-${t.rightIdx}`):s.jsx(ut,{section:t.section},t.idx)}function gt(t){const e=C.c(21),{value:l,onChange:n,placeholder:i,onKeyDown:r,className:o,isSearching:a,disabled:c}=t,d=i===void 0?"Search...":i;let m;e[0]!==o?(m=E("shrink-0 w-full border-b border-border h-12",o),e[0]=o,e[1]=m):m=e[1];const f=c?"cursor-not-allowed opacity-50":"cursor-text";let u;e[2]!==f?(u=E("flex items-center gap-2.5 h-12 px-4",f),e[2]=f,e[3]=u):u=e[3];let x;e[4]!==a?(x=a?s.jsx(G,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):s.jsx(He,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=a,e[5]=x):x=e[5];let h;e[6]!==n?(h=N=>n(N.target.value),e[6]=n,e[7]=h):h=e[7];let g;e[8]!==c||e[9]!==r||e[10]!==d||e[11]!==h||e[12]!==l?(g=s.jsx(Ue,{value:l,onChange:h,onKeyDown:r,placeholder:d,disabled:c,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"}),e[8]=c,e[9]=r,e[10]=d,e[11]=h,e[12]=l,e[13]=g):g=e[13];let j;e[14]!==u||e[15]!==x||e[16]!==g?(j=s.jsxs("label",{className:u,children:[x,g]}),e[14]=u,e[15]=x,e[16]=g,e[17]=j):j=e[17];let y;return e[18]!==m||e[19]!==j?(y=s.jsx("div",{className:m,children:j}),e[18]=m,e[19]=j,e[20]=y):y=e[20],y}function jt(t){return new Date(t).toLocaleString(void 0,{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"})}function bt(t){const e=C.c(34),{report:l,onSelect:n}=t;let i;e[0]!==n||e[1]!==l.id?(i=()=>n(l.id),e[0]=n,e[1]=l.id,e[2]=i):i=e[2];let r;e[3]!==l.title?(r=s.jsx(Be,{className:"text-sm leading-snug line-clamp-2",children:l.title}),e[3]=l.title,e[4]=r):r=e[4];let o;e[5]!==l.status?(o=s.jsx(ae,{status:l.status,size:"sm"}),e[5]=l.status,e[6]=o):o=e[6];let a;e[7]!==r||e[8]!==o?(a=s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r,o]}),e[7]=r,e[8]=o,e[9]=a):a=e[9];let c;e[10]!==l.summary?(c=s.jsx(Fe,{className:"mt-1 line-clamp-2 text-xs",children:l.summary}),e[10]=l.summary,e[11]=c):c=e[11];let d;e[12]!==a||e[13]!==c?(d=s.jsxs(Ke,{className:"pb-2 pt-5 px-5",children:[a,c]}),e[12]=a,e[13]=c,e[14]=d):d=e[14];let m;e[15]!==l.category?(m=s.jsx("span",{className:"inline-flex items-center gap-1 capitalize",children:l.category}),e[15]=l.category,e[16]=m):m=e[16];let f;e[17]!==l.source?(f=l.source&&s.jsx("span",{className:"inline-flex items-center gap-1 text-muted-foreground/70",children:l.source}),e[17]=l.source,e[18]=f):f=e[18];let u;e[19]!==m||e[20]!==f?(u=s.jsxs("div",{className:"flex items-center gap-3",children:[m,f]}),e[19]=m,e[20]=f,e[21]=u):u=e[21];let x;e[22]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ne,{size:12}),e[22]=x):x=e[22];let h;e[23]!==l.updatedAt?(h=jt(l.updatedAt),e[23]=l.updatedAt,e[24]=h):h=e[24];let g;e[25]!==h?(g=s.jsxs("span",{className:"inline-flex items-center gap-1",children:[x,h]}),e[25]=h,e[26]=g):g=e[26];let j;e[27]!==g||e[28]!==u?(j=s.jsx(qe,{className:"px-5 pb-5",children:s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[u,g]})}),e[27]=g,e[28]=u,e[29]=j):j=e[29];let y;return e[30]!==i||e[31]!==j||e[32]!==d?(y=s.jsxs(Ge,{className:"group relative cursor-pointer transition-shadow hover:shadow-md",onClick:i,children:[d,j]}),e[30]=i,e[31]=j,e[32]=d,e[33]=y):y=e[33],y}const Nt={today:"Hoje",thisWeek:"Esta semana",older:"Mais antigos"};function yt(t){const e=new Date(t),l=new Date,n=new Date(l.getFullYear(),l.getMonth(),l.getDate()),i=1440*60*1e3,r=Math.floor((n.getTime()-e.getTime())/i);return r<=0?"today":r<=6?"thisWeek":"older"}function vt(t,e){if(!e.trim())return!0;const l=e.toLowerCase().trim();return t.title.toLowerCase().includes(l)||t.summary.toLowerCase().includes(l)||t.category.toLowerCase().includes(l)||(t.source?.toLowerCase().includes(l)??!1)||(t.tags?.some(n=>n.toLowerCase().includes(l))??!1)}function _t(t){const e=C.c(20),{onSelectReport:l}=t,{data:n,isLoading:i,error:r}=We(),o=n?.reports??[],[a,c]=B.useState(""),[d,m]=B.useState(null),[f,u]=B.useState(null);let x;e[0]!==f||e[1]!==a||e[2]!==d?(x=b=>!(!vt(b,a)||d&&b.status!==d||f&&b.category!==f),e[0]=f,e[1]=a,e[2]=d,e[3]=x):x=e[3];const h=o.filter(x),g=[...new Set(o.map(kt))].sort(),j=h.reduce(wt,{today:[],thisWeek:[],older:[]}),y=["today","thisWeek","older"];if(r){let b,S;e[4]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Y,{size:48,className:"text-destructive mb-4"}),S=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading reports"}),e[4]=b,e[5]=S):(b=e[4],S=e[5]);let z;return e[6]!==r.message?(z=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[b,S,s.jsx("p",{className:"text-muted-foreground text-center",children:r.message})]}),e[6]=r.message,e[7]=z):z=e[7],z}const N="flex flex-col h-full";let w;e[8]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"flex items-center gap-2 shrink-0 overflow-hidden",children:s.jsx(Ae,{children:s.jsx(De,{children:s.jsx(Oe,{children:s.jsx(Me,{children:"Collection Ranking"})})})})}),e[8]=w):w=e[8];const p=o.length>0&&s.jsxs("div",{className:"flex items-center gap-2 shrink-0 overflow-hidden border-l border-border pl-3",children:[s.jsxs(X,{value:f??"__all__",onValueChange:b=>u(b==="__all__"?null:b),children:[s.jsx(Z,{size:"sm",children:s.jsx(ee,{placeholder:"Todas as categorias"})}),s.jsxs(te,{children:[s.jsx(K,{value:"__all__",children:"Todas as categorias"}),g.map(Ct)]})]}),s.jsxs(X,{value:d??"__all__",onValueChange:b=>m(b==="__all__"?null:b),children:[s.jsx(Z,{size:"sm",children:s.jsx(ee,{placeholder:"Todos os status"})}),s.jsxs(te,{children:[s.jsx(K,{value:"__all__",children:"Todos os status"}),Object.keys(q).map(St)]})]})]});let k;e[9]!==p?(k=s.jsxs("div",{className:"shrink-0 w-full border-b border-border h-12 overflow-x-auto flex items-center justify-between gap-3 px-4 min-w-max",children:[w,p]}),e[9]=p,e[10]=k):k=e[10];let R;e[11]===Symbol.for("react.memo_cache_sentinel")?(R=b=>{b.key==="Escape"&&(c(""),b.target.blur())},e[11]=R):R=e[11];let _;e[12]!==a?(_=s.jsx(gt,{value:a,onChange:c,placeholder:"Search reports...",onKeyDown:R}),e[12]=a,e[13]=_):_=e[13];const L="flex-1 overflow-auto p-6",$=i?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(G,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading reports..."})]}):o.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[s.jsx(V,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No reports yet"}),s.jsx("p",{className:"text-muted-foreground max-w-sm",children:"Reports will appear here once the connected MCP server provides them."})]}):h.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[s.jsx(V,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No reports match filters"}),s.jsx("p",{className:"text-muted-foreground max-w-sm",children:"Try adjusting your search or filters."})]}):s.jsx("div",{className:"space-y-6",children:y.map(b=>{const S=j[b];return!S||S.length===0?null:s.jsxs("div",{className:"space-y-3",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:Nt[b]}),s.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3",children:S.map(z=>s.jsx(bt,{report:z,onSelect:l},z.id))})]},b)})});let T;e[14]!==$?(T=s.jsx("div",{className:L,children:$}),e[14]=$,e[15]=T):T=e[15];let I;return e[16]!==T||e[17]!==k||e[18]!==_?(I=s.jsxs("div",{className:N,children:[k,_,T]}),e[16]=T,e[17]=k,e[18]=_,e[19]=I):I=e[19],I}function St(t){return s.jsx(K,{value:t,children:q[t].label},t)}function Ct(t){return s.jsx(K,{value:t,children:s.jsx("span",{className:"capitalize",children:t})},t)}function wt(t,e){const l=yt(e.updatedAt);return t[l]||(t[l]=[]),t[l].push(e),t}function kt(t){return t.category}function $t(t){return t?t.filter(e=>he(e,pe)):[]}function as(){const t=C.c(50),{org:e,project:l}=fe();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const i=ue(n),r=xe(),o=ge(),a=i.reportId??null;let c;t[1]!==r?(c=v=>{r({search:v?{reportId:v}:{},replace:!0})},t[1]=r,t[2]=c):c=t[2];const d=c;let m;t[3]!==e.id?(m={connectionId:je,orgId:e.id},t[3]=e.id,t[4]=m):m=t[4];const f=be(m);let u;t[5]!==l.id?(u=Q.pluginConfig(l.id??"","collection-reorder-ranking"),t[5]=l.id,t[6]=u):u=t[6];let x;t[7]!==l.id||t[8]!==f?(x=async()=>{const v=await f.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:l.id,pluginId:"collection-reorder-ranking"}});return v.structuredContent??v},t[7]=l.id,t[8]=f,t[9]=x):x=t[9];const h=!!l.id;let g;t[10]!==u||t[11]!==x||t[12]!==h?(g={queryKey:u,queryFn:x,enabled:h},t[10]=u,t[11]=x,t[12]=h,t[13]=g):g=t[13];const{data:j,isLoading:y}=W(g);let N,w;if(t[14]!==o||t[15]!==j?.config?.connectionId){w=$t(o);const v=j?.config?.connectionId;N=v?w.find(H=>H.id===v):null,t[14]=o,t[15]=j?.config?.connectionId,t[16]=N,t[17]=w}else N=t[16],w=t[17];const p=N,k=p?.id;let R;t[18]!==e.id||t[19]!==k?(R={connectionId:k,orgId:e.id},t[18]=e.id,t[19]=k,t[20]=R):R=t[20];const _=Ne(R);let L;t[21]!==e.id||t[22]!==e.name||t[23]!==e.slug?(L={id:e.id,slug:e.slug,name:e.name},t[21]=e.id,t[22]=e.name,t[23]=e.slug,t[24]=L):L=t[24];const $=L;if(y){let v;return t[25]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(G,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),t[25]=v):v=t[25],v}if(w.length===0){let v;return t[26]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Ve,{}),t[26]=v):v=t[26],v}if(!p){let v;return t[27]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[s.jsx(ve,{size:48,className:"text-muted-foreground mb-2"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]})}),t[27]=v):v=t[27],v}let T;t[28]!==p.app_id||t[29]!==p.app_name||t[30]!==p.description||t[31]!==p.icon||t[32]!==p.id||t[33]!==p.metadata||t[34]!==p.title||t[35]!==p.tools?(T={id:p.id,title:p.title,icon:p.icon,description:p.description,app_name:p.app_name,app_id:p.app_id,tools:p.tools,metadata:p.metadata},t[28]=p.app_id,t[29]=p.app_name,t[30]=p.description,t[31]=p.icon,t[32]=p.id,t[33]=p.metadata,t[34]=p.title,t[35]=p.tools,t[36]=T):T=t[36];let I;t[37]!==_?(I=(v,H)=>_?_.callTool({name:v,arguments:H}).then(Tt):Promise.reject(new Error("MCP client is not available")),t[37]=_,t[38]=I):I=t[38];const b=I;let S;t[39]!==p.id||t[40]!==$||t[41]!==T||t[42]!==b?(S={connectionId:p.id,connection:T,toolCaller:b,org:$,session:null},t[39]=p.id,t[40]=$,t[41]=T,t[42]=b,t[43]=S):S=t[43];const z=S;let P;t[44]!==a||t[45]!==d?(P=s.jsx("div",{className:"flex flex-col h-full overflow-hidden",children:s.jsx("div",{className:"flex-1 overflow-hidden",children:a?s.jsx(pt,{reportId:a,onBack:()=>d(null)}):s.jsx(_t,{onSelectReport:d})})}),t[44]=a,t[45]=d,t[46]=P):P=t[46];let M;return t[47]!==z||t[48]!==P?(M=s.jsx(ye,{value:z,children:P}),t[47]=z,t[48]=P,t[49]=M):M=t[49],M}function Tt(t){return t.structuredContent??t}export{as as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as c,aq as rt,ar as Ne,j as d,aG as st,an as be,at as k,aH as lt,a9 as j,av as P,bn as $,aI as at,H as _e,aJ as Ee,bo as it,az as ct,bp as dt,aK as ut,aN as pt,aL as ft,aO as mt,aP as ht,ay as vt,aM as gt,aQ as xt,aR as St,c as ee}from"./index-Bunb17vv.js";import{V as wt}from"./index-Fc-7NN6M.js";import{i as Ct}from"./Check-CjRTK1W3.js";import{t as Re}from"./ChevronDown-_RktpP9c.js";import{c as oe}from"./button-B5dhenVQ.js";function Pe(n,[e,t]){return Math.min(t,Math.max(e,n))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,bt]=it(J),[ne]=vt(J,[bt,Ee]),pe=Ee(),[Tt,G]=ne(J),[Nt,Pt]=ne(J),je=n=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:r,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:b,required:w,form:S}=n,p=pe(e),[v,C]=c.useState(null),[m,x]=c.useState(null),[U,M]=c.useState(!1),re=rt(u),[_,O]=Ne({prop:o,defaultProp:r??!1,onChange:i,caller:J}),[F,q]=Ne({prop:s,defaultProp:l,onChange:a,caller:J}),L=c.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=c.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(st,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:U,onValueNodeHasChildrenChange:M,contentId:be(),value:F,onValueChange:q,open:_,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Nt,{scope:n.__scopeSelect,onNativeOptionAdd:c.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:c.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:g,value:F,onChange:E=>q(E.target.value),disabled:b,form:S,children:[F===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=c.forwardRef((n,e)=>{const{__scopeSelect:t,disabled:o=!1,...r}=n,i=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=c.useRef("touch"),[g,b,w]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(lt,{asChild:!0,...i,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...r,ref:a,onClick:P(r.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:P(r.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:P(r.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(v&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,children:i,placeholder:s="",...l}=n,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=i!==void 0,g=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):i})});De.displayName=Oe;var _t="SelectIcon",ke=c.forwardRef((n,e)=>{const{__scopeSelect:t,children:o,...r}=n;return d.jsx(j.span,{"aria-hidden":!0,...r,ref:e,children:o||"▼"})});ke.displayName=_t;var Et="SelectPortal",Le=n=>d.jsx(at,{asChild:!0,...n});Le.displayName=Et;var Q="SelectContent",Be=c.forwardRef((n,e)=>{const t=G(Q,n.__scopeSelect),[o,r]=c.useState();if($(()=>{r(new DocumentFragment)},[]),!t.open){const i=o;return i?_e.createPortal(d.jsx(Ve,{scope:n.__scopeSelect,children:d.jsx(de.Slot,{scope:n.__scopeSelect,children:d.jsx("div",{children:n.children})})}),i):null}return d.jsx(He,{...n,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=gt("SelectContent.RemoveScroll"),He=c.forwardRef((n,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=n,m=G(Q,t),[x,U]=c.useState(null),[M,re]=c.useState(null),_=k(e,f=>U(f)),[O,F]=c.useState(null),[q,L]=c.useState(null),B=ue(t),[W,V]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(x)return ut(x)},[x]),pt();const E=c.useCallback(f=>{const[T,...R]=B().map(N=>N.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const N of f)if(N===I||(N?.scrollIntoView({block:"nearest"}),N===T&&M&&(M.scrollTop=0),N===y&&M&&(M.scrollTop=M.scrollHeight),N?.focus(),document.activeElement!==I))return},[B,M]),D=c.useCallback(()=>E([O,x]),[E,O,x]);c.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;c.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),c.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(F(f),y&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(ft,{as:jt,allowPinchZoom:!0,children:d.jsx(mt,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:P(r,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:P(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,N=y.indexOf(I);y=y.slice(N+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=c.forwardRef((n,e)=>{const{__scopeSelect:t,onPlaced:o,...r}=n,i=G(Q,t),s=Y(Q,t),[l,a]=c.useState(null),[u,h]=c.useState(null),g=k(e,_=>h(_)),b=ue(t),w=c.useRef(!1),S=c.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&v&&C){const _=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),F=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const I=q.left-O.left,N=F.left-I,X=_.left-N,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,N=window.innerWidth-F.right-I,X=window.innerWidth-_.right-N,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=b(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=_.top+_.height/2-A,ie=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const N=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(I?he:0)+N+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&v===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,i.trigger,i.valueNode,l,u,p,v,C,i.dir,o]);$(()=>x(),[x]);const[U,M]=c.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=c.useCallback(_=>{_&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:U},children:d.jsx(j.div,{...r,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=c.forwardRef((n,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:r=A,...i}=n,s=pe(t);return d.jsx(xt,{...s,...i,ref:e,align:o,collisionPadding:r,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Ue=c.forwardRef((n,e)=>{const{__scopeSelect:t,nonce:o,...r}=n,i=Y(we,t),s=Te(we,t),l=k(e,i.onViewportChange),a=c.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:P(r.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=s;if(b?.current&&g){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+w,x=Math.min(S,m),U=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=U>0?U:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Ue.displayName=we;var Fe="SelectGroup",[Dt,kt]=ne(Fe),Lt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=be();return d.jsx(Dt,{scope:t,id:r,children:d.jsx(j.div,{role:"group","aria-labelledby":r,...o,ref:e})})});Lt.displayName=Fe;var We="SelectLabel",Bt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=kt(We,t);return d.jsx(j.div,{id:r.id,...o,ref:e})});Bt.displayName=We;var ce="SelectItem",[Vt,Ke]=ne(ce),$e=c.forwardRef((n,e)=>{const{__scopeSelect:t,value:o,disabled:r=!1,textValue:i,...s}=n,l=G(ce,t),a=Y(ce,t),u=l.value===o,[h,g]=c.useState(i??""),[b,w]=c.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,r)),p=be(),v=c.useRef("touch"),C=()=>{r||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:r,textId:p,isSelected:u,onItemTextChange:c.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:r,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:S,onFocus:P(s.onFocus,()=>w(!0)),onBlur:P(s.onBlur,()=>w(!1)),onClick:P(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:P(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:P(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:P(s.onPointerMove,m=>{v.current=m.pointerType,r?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:P(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ce;var le="SelectItemText",Ge=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,...i}=n,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=Pt(le,t),[h,g]=c.useState(null),b=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...i,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?_e.createPortal(i.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Xe=c.forwardRef((n,e)=>{const t=Y(Ce,n.__scopeSelect),o=Te(Ce,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;i(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Je,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=c.forwardRef((n,e)=>{const t=Y(ye,n.__scopeSelect),o=Te(ye,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;i(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Je,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Je=c.forwardRef((n,e)=>{const{__scopeSelect:t,onAutoScroll:o,...r}=n,i=Y("SelectScrollButton",t),s=c.useRef(null),l=ue(t),a=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...r,ref:e,style:{flexShrink:0,...r.style},onPointerDown:P(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:P(r.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:P(r.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ut=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=pe(t),i=G(Ie,t),s=Y(Ie,t);return i.open&&s.position==="popper"?d.jsx(St,{...r,...o,ref:e}):null});Ut.displayName=Ie;var Ft="SelectBubbleInput",Qe=c.forwardRef(({__scopeSelect:n,value:e,...t},o)=>{const r=c.useRef(null),i=k(o,r),s=ct(e);return c.useEffect(()=>{const l=r.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...wt,...t.style},ref:i,defaultValue:e})});Qe.displayName=Ft;function et(n){return n===""||n===void 0}function tt(n){const e=dt(n),t=c.useRef(""),o=c.useRef(0),r=c.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),i=c.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,r,i]}function ot(n,e,t){const r=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?n.indexOf(t):-1;let s=Wt(n,Math.max(i,0));r.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return a!==t?a:void 0}function Wt(n,e){return n.map((t,o)=>n[(e+o)%n.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Ue,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;const nt=({size:n=24,color:e="currentColor",...t})=>c.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},c.createElement("path",{d:"m18 15-6-6-6 6"}));nt.displayName="ChevronUp";function uo(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function fo(n){const e=ee.c(13);let t,o,r,i;e[0]!==n?({className:o,size:i,children:t,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?"default":i;let l;e[5]!==o?(l=oe("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]: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 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-10 data-[size=sm]:h-7 data-[size=xs]:h-7 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...r,children:[t,a]}),e[8]=t,e[9]=r,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function mo(n){const e=ee.c(25);let t,o,r,i,s;e[0]!==n?({className:o,children:t,position:i,hideScrollButtons:s,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i,e[5]=s):(t=e[1],o=e[2],r=e[3],i=e[4],s=e[5]);const l=i===void 0?"popper":i,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let g;e[9]!==a?(g=!a&&d.jsx(no,{}),e[9]=a,e[10]=g):g=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==r||e[20]!==h||e[21]!==g||e[22]!==S||e[23]!==p?(v=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:h,position:l,...r,children:[g,S,p]})}),e[18]=l,e[19]=r,e[20]=h,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function ho(n){const e=ee.c(16);let t,o,r,i;e[0]!==n?({className:o,children:t,hideCheck:i,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?!1:i;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(Ct,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==r||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...r,children:[a,u]}),e[11]=r,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(nt,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}function ro(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Re,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}export{uo as S,fo as a,po as b,mo as c,ho as d,Pe as e,nt as n};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{r as A,c as L,j as s,u as Ne,b as He,bz as Ue,L as We,bv as At,bG as Ot,O as X,I as tt,e as Ve,d as ge,t as he,bH as Tt,b6 as Mt,z as Lt,A as Et,S as st,f as Dt,h as Rt,N as Ht,n as Ut,K as Ft,m as nt,P as Bt}from"./index-Bunb17vv.js";import{C as re}from"./index-C8kkzFPl.js";import{I as Wt}from"./integration-icon-D9Lac1Wz.js";import{P as ke,u as rt,d as xe,e as ie,f as Fe,g as Ie,h as Pe,i as it,j as qt,k as Gt,l as lt,m as Vt,n as Zt,o as Kt,p as Yt}from"./index-wFCrgWrj.js";import{e as Ze,u as Qt,g as Ae,S as se,h as Jt,C as Xt,f as es,j as ts}from"./use-deco-chat-open-Jl2cvCiJ.js";import{c as K,B as Ee}from"./button-B5dhenVQ.js";import{d as ss}from"./constants-DPkAIN6Z.js";import{T as ns,i as rs,b as is}from"./typewriter-title-BtVgakQ8.js";import{s as ze}from"./Plus-DP2vmrEk.js";import{t as Ke}from"./Users03-NwL7-0U5.js";import{i as De,a as ot,b as at,T as ct,c as ls}from"./tooltip-BOvHNvKx.js";import{E as dt}from"./error-boundary-BmYrMabK.js";import{C as mt}from"./create-project-dialog-DRsHceJD.js";import{n as qe}from"./CheckDone01-03ijxcax.js";import{n as os}from"./Container-CX-RbvCV.js";import{e as as}from"./Dataflow03-C0pv0bfM.js";import{a as cs}from"./Home02-BTAwhHo8.js";import{t as Re}from"./Settings01-DJTSpTEO.js";import{u as ft,a as ut}from"./use-project-C6-m-oFo.js";import{t as xt}from"./ChevronDown-_RktpP9c.js";import{A as je}from"./avatar-CtRXPznJ.js";import{c as ee,g as $e,d as ds,e as ms,f as fs,b as pt,D as ht,a as gt}from"./dropdown-menu-DTV9aWPi.js";import{i as be}from"./Check-CjRTK1W3.js";import{C as us}from"./create-organization-dialog-DutMRH55.js";import{a as jt}from"./Copy01-DH2d5VIk.js";import{i as bt}from"./File06-BMp646T6.js";import{i as xs}from"./Globe01-Kkx6XQlj.js";import{n as _e}from"./LinkExternal01-B_y3HiQu.js";import{i as ps}from"./Shield01-Cpp9zCrW.js";import{c as hs,b as gs,g as js,a as bs,D as Ns}from"./dialog-D2hO-7NL.js";import{L as we}from"./label-BG1T_p3q.js";import{S as vs,a as ys,b as Ss,d as Be,c as ks}from"./select-DltKl0vA.js";import{S as Le}from"./switch-DGp6vNcC.js";import{i as Cs}from"./Code01-7zAo2TKF.js";import{a as _s,P as ws,b as zs}from"./popover-D1pzNMOP.js";import{n as Xe}from"./Inbox01-C0b_GP1p.js";import{s as $s}from"./XClose-BAk7dT8G.js";import{u as Nt,a as Is}from"./use-organization-settings-CcELpryj.js";import{i as Ps}from"./ChevronRight-CXCT1lCM.js";import{u as Ye,L as Qe}from"./localstorage-keys-COeOMfeR.js";import{R as As,a as vt,b as Os}from"./resizable-DVFWStNI.js";import"./spinner-IfgQRFqp.js";import"./use-mcp-prompts-BKi3cw-d.js";import"./useQuery-Bp4CuU6A.js";import"./form-DTE57Ssv.js";import"./input-Mr1OFJyo.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-CDfQ8pyb.js";import"./Edit01-LXqrrmB1.js";import"./XCircle-BI-IxNLe.js";import"./AlertCircle-D4527ICU.js";import"./AlertTriangle-DCH5pYxh.js";import"./ArrowLeft-LkHGsmHm.js";import"./use-copy-0wW0qGhT.js";import"./badge-CjnLH2lI.js";import"./use-virtual-mcp-XvCSSoaL.js";import"./use-connection-CP6jP6nm.js";import"./useMutation-BOvwy9IK.js";import"./SearchMd-DrKsMuei.js";import"./use-create-virtual-mcp-Cywd7YYe.js";import"./marked.esm-BaswSlok.js";import"./markdown-DmUzq0fW.js";import"./tools-list-De4BYXHg.js";import"./collection-table-wrapper-aNY90kKS.js";import"./Grid01-BHI_ERnP.js";import"./List-BM1ULKxF.js";import"./table-CMMXy5Nr.js";import"./empty-state-DNFU252E.js";import"./Loading01-1snKai6N.js";import"./card-BMSXwRZK.js";import"./Eye-VVPfHR4D.js";import"./Globe02-BqaVWXob.js";import"./RefreshCw01-nnfUzBDg.js";import"./layout-D99bjGJH.js";import"./generate-id-Dyweu44Y.js";import"./Clock-Bmdb1TRN.js";import"./Trash01-lACkPNMB.js";import"./use-llm-C4Bry7oS.js";import"./use-binding-B9wXdfeU.js";import"./binder-Dt_u4Ovx.js";import"./Image01-CC_Iyvd-.js";import"./RefreshCcw01-CYXSIN1J.js";import"./useSuspenseInfiniteQuery-CYNigxjg.js";import"./infiniteQueryObserver-BXks7odB.js";import"./index-Fc-7NN6M.js";import"./textarea-BmDkS1nd.js";import"./alert-dialog-DXvpuu2v.js";const yt=({size:t=24,color:e="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.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"}));yt.displayName="BarChart10";const St=({size:t=24,color:e="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"M9.354 21c.705.622 1.632 1 2.646 1s1.94-.378 2.646-1M18 8A6 6 0 1 0 6 8c0 3.09-.78 5.206-1.65 6.605-.735 1.18-1.102 1.771-1.089 1.936.015.182.054.252.2.36.133.099.732.099 1.928.099H18.61c1.196 0 1.795 0 1.927-.098.147-.11.186-.179.2-.361.014-.165-.353-.755-1.088-1.936C18.78 13.206 18 11.09 18 8Z"}));St.displayName="Bell01";const Je=({size:t=24,color:e="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.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"}));Je.displayName="Building02";const kt=({size:t=24,color:e="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.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"}));kt.displayName="FaceSmile";const Ct=({size:t=24,color:e="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.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"}));Ct.displayName="LogOut01";const _t=({size:t=24,color:e="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"M8 9.5h4M8 13h7m-3 8a9 9 0 1 0-8.342-5.616c.081.2.122.3.14.381a.907.907 0 0 1 .024.219c0 .083-.015.173-.045.353l-.593 3.558c-.062.373-.093.56-.035.694a.5.5 0 0 0 .262.262c.135.058.321.027.694-.035l3.558-.593c.18-.03.27-.045.353-.045.081 0 .14.006.219.024.08.018.18.059.38.14A8.973 8.973 0 0 0 12 21Z"}));_t.displayName="MessageTextCircle02";function Ts(){const t=L.c(65),{org:e}=Ne(),[,n]=Ze(),{selectedVirtualMcp:l,modelsConnections:i,isChatEmpty:a,activeThreadId:r,createThread:o,switchToThread:d,threads:c}=Qt();let m;if(t[0]!==r||t[1]!==c){let B;t[3]!==r?(B=W=>W.id===r,t[3]=r,t[4]=B):B=t[4],m=c.find(B),t[0]=r,t[1]=c,t[2]=m}else m=t[2];const u=m,[f,h]=A.useState(!1),[p,j]=A.useTransition();let g;t[5]!==e.id?(g=ss(e.id),t[5]=e.id,t[6]=g):g=t[6];const x=l??g;let b;t[7]!==o?(b=()=>{j(()=>{o()})},t[7]=o,t[8]=b):b=t[8];const v=b;if(i.length===0){let B;t[9]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(ke.Header.Left,{className:"gap-2"}),t[9]=B):B=t[9];let W;t[10]!==n?(W=()=>n(!1),t[10]=n,t[11]=W):W=t[11];let C;t[12]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(De,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=C):C=t[12];let q;t[13]!==W?(q=s.jsxs(ke.Header,{className:"flex-none",hideSidebarTrigger:!0,children:[B,s.jsx(ke.Header.Right,{className:"gap-1",children:s.jsx("button",{type:"button",onClick:W,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:C})})]}),t[13]=W,t[14]=q):q=t[14];let J;t[15]!==e?(J=s.jsx(re.Main,{className:"flex flex-col items-center",children:s.jsx(re.EmptyState,{children:s.jsx(re.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features.",org:e})})}),t[15]=e,t[16]=J):J=t[16];let le;return t[17]!==q||t[18]!==J?(le=s.jsxs(re,{className:"animate-in fade-in-0 duration-200",children:[q,J]}),t[17]=q,t[18]=J,t[19]=le):le=t[19],le}const N=f?"duration-300 opacity-0 -translate-x-4 pointer-events-none":p?"duration-150 opacity-0 pointer-events-none":"duration-300 opacity-100 translate-x-0";let y;t[20]!==N?(y=K("absolute inset-0 flex flex-col transition-[opacity,transform] ease-[var(--ease-out-quart)]",N),t[20]=N,t[21]=y):y=t[21];let S;t[22]!==u||t[23]!==a?(S=!a&&u?.title&&s.jsx(ns,{text:u.title,className:"text-sm font-medium text-foreground"}),t[22]=u,t[23]=a,t[24]=S):S=t[24];let z;t[25]!==S?(z=s.jsx(ke.Header.Left,{className:"gap-2",children:S}),t[25]=S,t[26]=z):z=t[26];let M;t[27]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(ze,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[27]=M):M=t[27];let E;t[28]!==v||t[29]!==p?(E=s.jsx("button",{type:"button",onClick:v,disabled:p,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:M}),t[28]=v,t[29]=p,t[30]=E):E=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=()=>h(!0),t[31]=I):I=t[31];let U;t[32]===Symbol.for("react.memo_cache_sentinel")?(U=s.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:s.jsx(rs,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[32]=U):U=t[32];let D;t[33]!==n?(D=()=>n(!1),t[33]=n,t[34]=D):D=t[34];let F;t[35]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(De,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[35]=F):F=t[35];let $;t[36]!==D?($=s.jsx("button",{type:"button",onClick:D,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:F}),t[36]=D,t[37]=$):$=t[37];let P;t[38]!==$||t[39]!==E?(P=s.jsxs(ke.Header.Right,{className:"gap-1",children:[E,U,$]}),t[38]=$,t[39]=E,t[40]=P):P=t[40];let _;t[41]!==P||t[42]!==z?(_=s.jsxs(ke.Header,{className:"flex-none",hideSidebarTrigger:!0,children:[z,P]}),t[41]=P,t[42]=z,t[43]=_):_=t[43];let O;t[44]!==x||t[45]!==a?(O=s.jsx(re.Main,{children:a?s.jsx(re.EmptyState,{children:s.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[s.jsx(Wt,{icon:x.icon,name:x.title,size:"lg",fallbackIcon:s.jsx(Ke,{size:32}),className:"size-[60px]! rounded-[18px]!"}),s.jsx("h3",{className:"text-xl font-medium text-foreground",children:x.title}),s.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:x.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),s.jsx(re.IceBreakers,{})]})}):s.jsx(re.Messages,{})}),t[44]=x,t[45]=a,t[46]=O):O=t[46];let T;t[47]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(re.Footer,{children:s.jsx(re.Input,{})}),t[47]=T):T=t[47];let R;t[48]!==_||t[49]!==O||t[50]!==y?(R=s.jsxs("div",{className:y,children:[_,O,T]}),t[48]=_,t[49]=O,t[50]=y,t[51]=R):R=t[51];const te=f?"opacity-100 translate-x-0":"opacity-0 translate-x-4 pointer-events-none";let Y;t[52]!==te?(Y=K("absolute inset-0 flex flex-col transition-[opacity,transform] duration-300 ease-[var(--ease-out-quart)]",te),t[52]=te,t[53]=Y):Y=t[53];let Q;t[54]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>h(!1),t[54]=Q):Q=t[54];let G;t[55]!==r||t[56]!==d||t[57]!==c?(G=s.jsx(is,{threads:c,activeThreadId:r,onThreadSelect:d,onClose:Q}),t[55]=r,t[56]=d,t[57]=c,t[58]=G):G=t[58];let H;t[59]!==Y||t[60]!==G?(H=s.jsx("div",{className:Y,children:G}),t[59]=Y,t[60]=G,t[61]=H):H=t[61];let V;return t[62]!==R||t[63]!==H?(V=s.jsxs(re,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[R,H]}),t[62]=R,t[63]=H,t[64]=V):V=t[64],V}function Ms(){const t=L.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(re.Skeleton,{}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(dt,{fallback:e,children:s.jsx(A.Suspense,{fallback:s.jsx(re.Skeleton,{}),children:s.jsx(Ts,{})})}),t[1]=n):n=t[1],n}function Ls(){const t=L.c(54),[e]=Ae(),{locator:n,org:l}=Ne(),i=He(),a=Ue(),{org:r,project:o}=We.parse(n),d=We.isOrgAdminProject(n),{data:c}=ft(l.id,o);let m;t[0]!==c?.enabledPlugins?(m=c?.enabledPlugins??[],t[0]=c?.enabledPlugins,t[1]=m):m=t[1];const u=m;let f;t[2]!==u?(f=w=>u.includes(w.pluginId),t[2]=u,t[3]=f):f=t[3];const h=At.filter(f),p=a.location.pathname,j=`/${r}/${o}`,g=p===j||p===`${j}/`;let k;t[4]!==j||t[5]!==p?(k=w=>p.startsWith(`${j}/${w}`),t[4]=j,t[5]=p,t[6]=k):k=t[6];const x=k;let b;t[7]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(cs,{}),t[7]=b):b=t[7];const v={key:"home",label:"Home",icon:b,isActive:g,onClick:()=>{g?window.dispatchEvent(new CustomEvent("reset-home-view")):i({to:"/$org/$project",params:{org:r,project:o}})}};let N;t[8]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(qe,{}),t[8]=N):N=t[8];const y={key:"tasks",label:"Tasks",icon:N,isActive:x("tasks"),onClick:()=>i({to:"/$org/$project/tasks",params:{org:r,project:X}})};let S;t[9]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(os,{}),t[9]=S):S=t[9];const z={key:"mcps",label:"Connections",icon:S,isActive:x("mcps"),onClick:()=>i({to:"/$org/$project/mcps",params:{org:r,project:X}})};let M;t[10]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(tt,{}),t[10]=M):M=t[10];const E={key:"projects",label:"Projects",icon:M,isActive:x("projects"),onClick:()=>i({to:"/$org/$project/projects",params:{org:r,project:X}})};let I;t[11]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(Je,{}),t[11]=I):I=t[11];const U={key:"store",label:"Store",icon:I,isActive:x("store"),onClick:()=>i({to:"/$org/$project/store",params:{org:r,project:X}})};let D;t[12]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Ke,{}),t[12]=D):D=t[12];const F={key:"agents",label:"Agents",icon:D,isActive:x("agents"),onClick:()=>i({to:"/$org/$project/agents",params:{org:r,project:X}})};let $;t[13]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(yt,{}),t[13]=$):$=t[13];const P={key:"monitoring",label:"Monitor",icon:$,isActive:x("monitoring"),onClick:()=>i({to:"/$org/$project/monitoring",params:{org:r,project:X}})};let _;t[14]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(kt,{}),t[14]=_):_=t[14];const O={key:"members",label:"Members",icon:_,isActive:x("members"),onClick:()=>i({to:"/$org/$project/members",params:{org:r,project:X}})},T=h.map(w=>({key:w.pluginId,label:w.label,icon:w.icon,isActive:x(w.pluginId),onClick:()=>i({to:"/$org/$project/$pluginId",params:{org:r,project:o,pluginId:w.pluginId}})}));let R;t[15]!==u?(R=w=>u.includes(w.pluginId),t[15]=u,t[16]=R):R=t[16];const Y=Ot.filter(R).map(w=>({type:"group",group:{id:`${w.pluginId}-${w.id}`,label:w.label,items:w.items.map((Z,ne)=>({key:`${w.pluginId}-${w.id}-${ne}`,label:Z.label,icon:Z.icon,isActive:x(w.pluginId),onClick:()=>i({to:"/$org/$project/$pluginId",params:{org:r,project:o,pluginId:w.pluginId}})})),defaultExpanded:w.defaultExpanded??!0}}));if(d){let w;t[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Re,{}),t[17]=w):w=t[17];let Z;t[18]!==x?(Z=x("settings"),t[18]=x,t[19]=Z):Z=t[19];let ne;t[20]!==i||t[21]!==r?(ne=()=>i({to:"/$org/$project/settings",params:{org:r,project:X}}),t[20]=i,t[21]=r,t[22]=ne):ne=t[22];let ce;t[23]!==Z||t[24]!==ne?(ce={key:"settings",label:"Settings",icon:w,isActive:Z,onClick:ne},t[23]=Z,t[24]=ne,t[25]=ce):ce=t[25];const pe=ce,me=[{type:"items",items:[v,...e.experimental_tasks?[y]:[],...e.experimental_projects?[E]:[]]},{type:"group",group:{id:"build",label:"Build",items:[F,z,U],defaultExpanded:!0}},{type:"group",group:{id:"manage",label:"Manage",items:[P,O,pe],defaultExpanded:!0}}];if(T.length>0){let de;t[26]!==T?(de={type:"items",items:T},t[26]=T,t[27]=de):de=t[27],me.push(de)}return Y.length>0&&me.push(...Y),me}let Q;t[28]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(qe,{}),t[28]=Q):Q=t[28];let G;t[29]!==x?(G=x("tasks"),t[29]=x,t[30]=G):G=t[30];let H;t[31]!==i||t[32]!==r||t[33]!==o?(H=()=>i({to:"/$org/$project/tasks",params:{org:r,project:o}}),t[31]=i,t[32]=r,t[33]=o,t[34]=H):H=t[34];let V;t[35]!==G||t[36]!==H?(V={key:"tasks",label:"Tasks",icon:Q,isActive:G,onClick:H},t[35]=G,t[36]=H,t[37]=V):V=t[37];const B=V;let W;t[38]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(as,{}),t[38]=W):W=t[38];let C;t[39]!==x?(C=x("workflows"),t[39]=x,t[40]=C):C=t[40];let q;t[41]!==i||t[42]!==r||t[43]!==o?(q=()=>i({to:"/$org/$project/workflows",params:{org:r,project:o}}),t[41]=i,t[42]=r,t[43]=o,t[44]=q):q=t[44];let J;t[45]!==C||t[46]!==q?(J={key:"workflows",label:"Workflows",icon:W,isActive:C,onClick:q},t[45]=C,t[46]=q,t[47]=J):J=t[47];const le=J;let oe;t[48]!==e.experimental_tasks||t[49]!==B?(oe=e.experimental_tasks?[B]:[],t[48]=e.experimental_tasks,t[49]=B,t[50]=oe):oe=t[50];const ae=[{type:"items",items:[v,...oe,le]}];if(T.length>0){let w;t[51]===Symbol.for("react.memo_cache_sentinel")?(w={type:"divider"},t[51]=w):w=t[51],ae.push(w);let Z;t[52]!==T?(Z={type:"items",items:T},t[52]=T,t[53]=Z):Z=t[53],ae.push(Z)}return Y.length>0&&ae.push(...Y),ae}function Es(t){const e=L.c(11),{label:n,children:l,defaultExpanded:i}=t,a=i===void 0?!0:i,[r,o]=A.useState(a),{state:d}=rt(),c=d==="collapsed";let m;e[0]!==r||e[1]!==c||e[2]!==n?(m=c?s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-8 rounded-full bg-sidebar-foreground/15"})}):s.jsx(xe,{children:s.jsx(ie,{children:s.jsxs(Fe,{className:"h-6 cursor-pointer select-none gap-1 [&>svg]:size-3",onClick:()=>o(!r),children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n}),s.jsx(xt,{size:12,className:K("text-muted-foreground transition-transform duration-200",!r&&"-rotate-90")})]})})}),e[0]=r,e[1]=c,e[2]=n,e[3]=m):m=e[3];let u;e[4]!==l||e[5]!==r||e[6]!==c?(u=(c||r)&&s.jsx(Ie,{children:s.jsx(xe,{className:"gap-0.5",children:l})}),e[4]=l,e[5]=r,e[6]=c,e[7]=u):u=e[7];let f;return e[8]!==m||e[9]!==u?(f=s.jsxs(Pe,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[m,u]}),e[8]=m,e[9]=u,e[10]=f):f=e[10],f}function wt(t){const e=L.c(13),{item:n}=t;let l;e[0]!==n.icon?(l=s.jsx("span",{className:"[&>svg]:size-4",children:n.icon}),e[0]=n.icon,e[1]=l):l=e[1];let i;e[2]!==n.label?(i=s.jsx("span",{className:"truncate group-data-[collapsible=icon]:hidden",children:n.label}),e[2]=n.label,e[3]=i):i=e[3];let a;e[4]!==n.isActive||e[5]!==n.label||e[6]!==n.onClick||e[7]!==l||e[8]!==i?(a=s.jsxs(Fe,{onClick:n.onClick,isActive:n.isActive,tooltip:n.label,children:[l,i]}),e[4]=n.isActive,e[5]=n.label,e[6]=n.onClick,e[7]=l,e[8]=i,e[9]=a):a=e[9];let r;return e[10]!==n.key||e[11]!==a?(r=s.jsx(ie,{children:a},n.key),e[10]=n.key,e[11]=a,e[12]=r):r=e[12],r}function Ds(t){const e=L.c(12),{section:n}=t;switch(n.type){case"divider":{let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(it,{className:"my-2"}),e[0]=l):l=e[0],l}case"spacer":{let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1"}),e[1]=l):l=e[1],l}case"group":{const l=n.group.label,i=n.group.defaultExpanded;let a;e[2]!==n.group.items?(a=n.group.items.map(Hs),e[2]=n.group.items,e[3]=a):a=e[3];let r;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==a?(r=s.jsx(Es,{label:l,defaultExpanded:i,children:a}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=a,e[7]=r):r=e[7],r}case"items":{let l;e[8]!==n.items?(l=n.items.map(Rs),e[8]=n.items,e[9]=l):l=e[9];let i;return e[10]!==l?(i=s.jsx(Pe,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Ie,{children:s.jsx(xe,{className:"gap-0.5",children:l})})}),e[10]=l,e[11]=i):i=e[11],i}}}function Rs(t){return s.jsx(wt,{item:t},t.key)}function Hs(t){return s.jsx(wt,{item:t},t.key)}function zt(t){const e=L.c(14),{sections:n,header:l,footer:i,additionalContent:a,variant:r,collapsible:o,contentClassName:d}=t,c=r===void 0?"sidebar":r,m=o===void 0?"icon":o;let u;e[0]!==d?(u=K("flex flex-col flex-1 overflow-x-hidden mt-1 px-3.5 pb-2 group-data-[collapsible=icon]:px-2",d),e[0]=d,e[1]=u):u=e[1];let f;e[2]!==n?(f=n.map(Us),e[2]=n,e[3]=f):f=e[3];let h;e[4]!==a||e[5]!==u||e[6]!==f?(h=s.jsxs(qt,{className:u,children:[f,a]}),e[4]=a,e[5]=u,e[6]=f,e[7]=h):h=e[7];let p;return e[8]!==m||e[9]!==i||e[10]!==l||e[11]!==h||e[12]!==c?(p=s.jsxs(Gt,{variant:c,collapsible:m,children:[l,h,i]}),e[8]=m,e[9]=i,e[10]=l,e[11]=h,e[12]=c,e[13]=p):p=e[13],p}function Us(t,e){return s.jsx(Ds,{section:t},e)}zt.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(se,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function Fs(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"space-y-0.5 px-1 py-1",children:[s.jsx(se,{className:"h-8 w-full rounded-lg"}),s.jsx(se,{className:"h-8 w-full rounded-lg"})]}),t[0]=e):e=t[0],e}function Bs(t){const e=L.c(12),{organizationId:n,currentProjectSlug:l,onSelect:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={suspense:!0},e[0]=a):a=e[0];const{data:r}=ut(n,a);let o,d;if(e[1]!==l||e[2]!==i||e[3]!==r){d=Symbol.for("react.early_return_sentinel");e:{const m=r?.filter(Ws)??[];if(m.length===0){let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"px-2 py-3 text-center text-xs text-muted-foreground",children:"No projects yet"}),e[6]=f):f=e[6],d=f;break e}let u;e[7]!==l||e[8]!==i?(u=f=>{const h=l===f.slug,p=f.ui?.themeColor??"#3B82F6";return s.jsxs(ee,{className:K("gap-2.5",h&&"bg-accent"),onClick:()=>i(f.slug),children:[s.jsx("div",{className:"size-6 rounded-md shrink-0 flex items-center justify-center overflow-hidden border border-border/50",style:{backgroundColor:p},children:f.ui?.icon?s.jsx("img",{src:f.ui.icon,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:"text-xs font-semibold text-white",children:f.name.charAt(0).toUpperCase()})}),s.jsx("span",{className:"flex-1 truncate",children:f.name}),h&&s.jsx(be,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},f.id)},e[7]=l,e[8]=i,e[9]=u):u=e[9],o=m.map(u)}e[1]=l,e[2]=i,e[3]=r,e[4]=o,e[5]=d}else o=e[4],d=e[5];if(d!==Symbol.for("react.early_return_sentinel"))return d;let c;return e[10]!==o?(c=s.jsx(s.Fragment,{children:o}),e[10]=o,e[11]=c):c=e[11],c}function Ws(t){return t.slug!==X}function qs(t){let e=0;for(let l=0;l<t.length;l++)e=t.charCodeAt(l)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function $t(t){const e=L.c(44),{isCollapsed:n,onCreateProject:l}=t,i=n===void 0?!1:n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const{org:r,project:o}=Ve(a),{data:d}=ge.useListOrganizations(),c=He(),m=d?.find(C=>C.slug===r),[u,f]=A.useState(!1),[h]=Ae(),p=h.experimental_projects,j=o===X,{data:g}=ft(m?.id??"",j?"":o??"");let k;e[1]!==r?(k=(C,q)=>C.slug===r?-1:q.slug===r?1:C.name.localeCompare(q.name),e[1]=r,e[2]=k):k=e[2];const x=[...d??[]].sort(k);let b;e[3]!==c||e[4]!==r?(b=()=>{r&&c({to:"/$org/$project",params:{org:r,project:X}})},e[3]=c,e[4]=r,e[5]=b):b=e[5];const v=b;let N;e[6]!==c||e[7]!==r?(N=C=>{r&&c({to:"/$org/$project",params:{org:r,project:C}})},e[6]=c,e[7]=r,e[8]=N):N=e[8];const y=N;let S;e[9]!==c?(S=C=>{c({to:"/$org/$project",params:{org:C,project:X}})},e[9]=c,e[10]=S):S=e[10];const z=S;let M;e[11]!==l?(M=l?()=>l():void 0,e[11]=l,e[12]=M):M=e[12];const E=M;let I;e[13]!==c||e[14]!==r||e[15]!==o?(I=()=>{!r||!o||c({to:"/$org/$project/settings",params:{org:r,project:o}})},e[13]=c,e[14]=r,e[15]=o,e[16]=I):I=e[16];const U=I,D=ht,F=i?"w-auto pr-1.5":"w-full";let $;e[17]!==F?($=K("flex items-center gap-3 rounded-md p-1.5 pr-2 text-left hover:bg-sidebar-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring min-h-[2.75rem]",F),e[17]=F,e[18]=$):$=e[18];const P=j?s.jsx("div",{className:K("shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden transition-[width,height] duration-300 ease-[var(--ease-out-quart)]",i?"size-6":"size-8"),style:m?.logo?void 0:qs(m?.name??""),children:m?.logo?s.jsx("img",{src:m.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:K("font-semibold leading-none",i?"text-[9px]":"text-xs"),children:(m?.name??"?").slice(0,2).toUpperCase()})}):s.jsx("div",{className:K("shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden transition-[width,height] duration-300 ease-[var(--ease-out-quart)]",i?"size-6":"size-8"),style:{backgroundColor:g?.ui?.themeColor??"#60a5fa"},children:g?.ui?.icon?s.jsx("img",{src:g.ui.icon,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:K("font-semibold text-white",i?"text-xs":"text-lg"),children:(g?.name??o??"?").charAt(0).toUpperCase()})});let _;e[19]!==m?.name||e[20]!==g?.name||e[21]!==p||e[22]!==i||e[23]!==j||e[24]!==o?(_=!i&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:p?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"block text-[11px] text-sidebar-foreground/50 leading-tight truncate",children:m?.name??"Select org"}),s.jsx("span",{className:"block text-sm font-semibold text-sidebar-foreground truncate leading-tight",children:j?"Studio":g?.name??o??""})]}):s.jsx("span",{className:"block text-sm font-semibold text-sidebar-foreground truncate leading-tight",children:m?.name??"Select org"})}),s.jsx(Jt,{size:16,className:"shrink-0 text-sidebar-foreground/40"})]}),e[19]=m?.name,e[20]=g?.name,e[21]=p,e[22]=i,e[23]=j,e[24]=o,e[25]=_):_=e[25];let O;e[26]!==$||e[27]!==P||e[28]!==_?(O=s.jsx(gt,{asChild:!0,children:s.jsxs("button",{type:"button",className:$,children:[P,_]})}),e[26]=$,e[27]=P,e[28]=_,e[29]=O):O=e[29];const T=pt,R="start",te="bottom",Y="w-64 flex flex-col gap-0.5",Q=Gs,G=p?s.jsxs(s.Fragment,{children:[s.jsxs(ee,{className:K("gap-2.5",j&&"bg-accent"),onClick:v,children:[s.jsx(je,{url:m?.logo??"",fallback:m?.name??"",size:"sm",className:"size-6 rounded-md shrink-0",objectFit:"cover"}),s.jsxs("span",{className:"flex-1 truncate",children:["Studio · ",m?.name]}),j&&s.jsx(be,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]}),s.jsx("p",{className:"px-2 pt-2 pb-0.5 text-[11px] font-medium text-muted-foreground/50 uppercase tracking-wider",children:"Projects"}),m&&s.jsx(A.Suspense,{fallback:s.jsx(Fs,{}),children:s.jsx(Bs,{organizationId:m.id,currentProjectSlug:o,orgSlug:r??"",onSelect:y})}),E&&s.jsxs(ee,{className:"gap-2.5",onClick:E,children:[s.jsx(ze,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Create project"})]}),s.jsx($e,{}),s.jsxs(ds,{children:[s.jsxs(ms,{className:"gap-2.5",children:[s.jsx(Je,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Switch organization"})]}),s.jsxs(fs,{className:"w-48 flex flex-col gap-0.5",children:[x.map(C=>s.jsxs(ee,{className:K("gap-2.5",C.slug===r&&"bg-accent"),onClick:()=>z(C.slug),children:[s.jsx(je,{url:C.logo??"",fallback:C.name,size:"xs",className:"size-5 rounded-md shrink-0",objectFit:"cover"}),s.jsx("span",{className:"flex-1 truncate",children:C.name}),C.slug===r&&s.jsx(be,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},C.id)),s.jsx($e,{}),s.jsxs(ee,{className:"gap-2.5",onClick:()=>f(!0),children:[s.jsx(ze,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Create organization"})]})]})]}),s.jsxs(ee,{className:"gap-2.5",onClick:U,children:[s.jsx(Re,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Settings"})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"px-2 pt-2 pb-0.5 text-[11px] font-medium text-muted-foreground/50 uppercase tracking-wider",children:"Organizations"}),x.map(C=>s.jsxs(ee,{className:K("gap-2.5",C.slug===r&&"bg-accent"),onClick:()=>z(C.slug),children:[s.jsx(je,{url:C.logo??"",fallback:C.name,size:"sm",className:"size-6 rounded-md shrink-0",objectFit:"cover"}),s.jsx("span",{className:"flex-1 truncate",children:C.name}),C.slug===r&&s.jsx(be,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},C.id)),s.jsxs(ee,{className:"gap-2.5",onClick:()=>f(!0),children:[s.jsx(ze,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Create organization"})]}),s.jsx($e,{}),s.jsxs(ee,{className:"gap-2.5",onClick:U,children:[s.jsx(Re,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Settings"})]})]});let H;e[30]!==T||e[31]!==Q||e[32]!==G?(H=s.jsx(T,{align:R,side:te,className:Y,onCloseAutoFocus:Q,children:G}),e[30]=T,e[31]=Q,e[32]=G,e[33]=H):H=e[33];let V;e[34]!==D||e[35]!==O||e[36]!==H?(V=s.jsxs(D,{children:[O,H]}),e[34]=D,e[35]=O,e[36]=H,e[37]=V):V=e[37];let B;e[38]!==u||e[39]!==f?(B=s.jsx(us,{open:u,onOpenChange:f}),e[38]=u,e[39]=f,e[40]=B):B=e[40];let W;return e[41]!==V||e[42]!==B?(W=s.jsxs(s.Fragment,{children:[V,B]}),e[41]=V,e[42]=B,e[43]=W):W=e[43],W}function Gs(t){return t.preventDefault()}$t.Skeleton=function(){return s.jsxs("div",{className:"flex items-center gap-1.5 h-7 px-1.5 w-full",children:[s.jsx(se,{className:"size-5 rounded-[5px] shrink-0 bg-sidebar-accent"}),s.jsx(se,{className:"h-3.5 flex-1 bg-sidebar-accent"})]})};function Ge(t){const e=L.c(23),{onCreateProject:n}=t,{state:l}=rt(),i=l==="collapsed",[a,r]=Ze();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const{org:d,project:c}=Ve(o),{location:m}=Ue(),u=m.pathname===`/${d}/${c}`||m.pathname===`/${d}/${c}/`;let f;e[1]!==r?(f=()=>{r(Vs)},e[1]=r,e[2]=f):f=e[2];const h=f;let p;e[3]!==i||e[4]!==n?(p=s.jsx("div",{className:"min-w-0 flex-1",children:s.jsx($t,{isCollapsed:i,onCreateProject:n})}),e[3]=i,e[4]=n,e[5]=p):p=e[5];const j=i||u?"max-w-0 opacity-0 pointer-events-none":"max-w-[2rem] opacity-100";let g;e[6]!==j?(g=K("flex items-center gap-0.5 shrink-0 overflow-hidden transition-[max-width,opacity] duration-300 ease-[var(--ease-out-quart)]",j),e[6]=j,e[7]=g):g=e[7];const k=a&&"bg-sidebar-accent text-sidebar-foreground";let x;e[8]!==k?(x=K("size-7 hover:bg-sidebar-accent text-sidebar-foreground/50 hover:text-sidebar-foreground",k),e[8]=k,e[9]=x):x=e[9];let b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_t,{size:14,className:"text-inherit"}),e[10]=b):b=e[10];let v;e[11]!==x||e[12]!==h?(v=s.jsx(ot,{asChild:!0,children:s.jsx(Ee,{variant:"ghost",size:"icon",className:x,onClick:h,"aria-label":"Toggle Decopilot",children:b})}),e[11]=x,e[12]=h,e[13]=v):v=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(at,{side:"bottom",children:"Toggle Decopilot"}),e[14]=N):N=e[14];let y;e[15]!==v?(y=s.jsxs(ct,{children:[v,N]}),e[15]=v,e[16]=y):y=e[16];let S;e[17]!==y||e[18]!==g?(S=s.jsx("div",{className:g,children:y}),e[17]=y,e[18]=g,e[19]=S):S=e[19];let z;return e[20]!==S||e[21]!==p?(z=s.jsx(lt,{className:"px-3 group-data-[collapsible=icon]:px-2 animate-in fade-in-0 duration-200",children:s.jsx(xe,{children:s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center justify-between w-full gap-1",children:[p,S]})})})}),e[20]=S,e[21]=p,e[22]=z):z=e[22],z}function Vs(t){return!t}Ge.Skeleton=function(){return s.jsx(lt,{className:"px-3",children:s.jsx(xe,{children:s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1 p-1.5",children:[s.jsx(se,{className:"size-8 rounded-md shrink-0 bg-sidebar-accent"}),s.jsx(se,{className:"h-3.5 w-16 bg-sidebar-accent"})]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(se,{className:"size-7 rounded-lg bg-sidebar-accent"}),s.jsx(se,{className:"size-7 rounded-lg bg-sidebar-accent"})]})]})})})})};function Zs(t){const e=L.c(108),{open:n,onOpenChange:l,user:i,userImage:a}=t,[r,o]=Ae(),[d,c]=A.useState(!1);let m;e[0]!==i.id?(m=()=>{navigator.clipboard.writeText(i.id),c(!0),setTimeout(()=>c(!1),2e3)},e[0]=i.id,e[1]=m):m=e[1];const u=m;let f;e[2]!==o?(f=async fe=>{if(fe&&await Notification.requestPermission()!=="granted"){he.error("Notifications denied. Please enable them in your browser settings."),o(sn);return}o(ue=>({...ue,enableNotifications:fe}))},e[2]=o,e[3]=f):f=e[3];const h=f;let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(hs,{className:"text-base",children:"Profile Settings"}),e[4]=p):p=e[4];let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsxs(gs,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[p,s.jsxs(js,{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:[s.jsx(De,{size:16}),s.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[5]=j):j=e[5];const g=i.name||"U";let k;e[6]!==g||e[7]!==a?(k=s.jsx(je,{url:a,fallback:g,shape:"circle",size:"xl",className:"h-16 w-16"}),e[6]=g,e[7]=a,e[8]=k):k=e[8];const x=i.name||"User";let b;e[9]!==x?(b=s.jsx("span",{className:"text-base font-medium text-foreground",children:x}),e[9]=x,e[10]=b):b=e[10];let v;e[11]!==i.email?(v=s.jsx("span",{className:"text-sm text-muted-foreground",children:i.email}),e[11]=i.email,e[12]=v):v=e[12];let N;e[13]!==b||e[14]!==v?(N=s.jsxs("div",{className:"flex flex-col gap-1",children:[b,v]}),e[13]=b,e[14]=v,e[15]=N):N=e[15];let y;e[16]!==N||e[17]!==k?(y=s.jsxs("div",{className:"flex items-center gap-4",children:[k,N]}),e[16]=N,e[17]=k,e[18]=y):y=e[18];let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Preferences"}),e[19]=S):S=e[19];let z;e[20]!==o?(z=()=>o(tn),e[20]=o,e[21]=z):z=e[21];let M;e[22]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(we,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(Cs,{size:16,className:"text-muted-foreground"}),"Developer Mode"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Show technical details like JSON input/output for tool calls"})]}),e[22]=M):M=e[22];let E;e[23]!==o?(E=fe=>o(ue=>({...ue,devMode:fe})),e[23]=o,e[24]=E):E=e[24];let I;e[25]!==r.devMode||e[26]!==E?(I=s.jsx("div",{onClick:en,children:s.jsx(Le,{checked:r.devMode,onCheckedChange:E})}),e[25]=r.devMode,e[26]=E,e[27]=I):I=e[27];let U;e[28]!==z||e[29]!==I?(U=s.jsxs("button",{type:"button",onClick:z,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:[M,I]}),e[28]=z,e[29]=I,e[30]=U):U=e[30];let D;e[31]!==h||e[32]!==r.enableNotifications?(D=()=>h(!r.enableNotifications),e[31]=h,e[32]=r.enableNotifications,e[33]=D):D=e[33];let F;e[34]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(we,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(St,{size:16,className:"text-muted-foreground"}),"Notifications"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Play a sound and show notifications when chat messages complete while app is unfocused"})]}),e[34]=F):F=e[34];let $;e[35]!==h||e[36]!==r.enableNotifications?($=s.jsx("div",{onClick:Xs,children:s.jsx(Le,{disabled:typeof Notification>"u",checked:r.enableNotifications,onCheckedChange:h})}),e[35]=h,e[36]=r.enableNotifications,e[37]=$):$=e[37];let P;e[38]!==D||e[39]!==$?(P=s.jsxs("button",{type:"button",disabled:typeof Notification>"u",onClick:D,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:[F,$]}),e[38]=D,e[39]=$,e[40]=P):P=e[40];let _;e[41]!==U||e[42]!==P?(_=s.jsxs("div",{className:"flex flex-col gap-2",children:[S,U,P]}),e[41]=U,e[42]=P,e[43]=_):_=e[43];let O,T;e[44]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(we,{className:"text-sm font-medium text-foreground",children:"Tool Approval"}),T=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Choose when to require approval before tools execute"}),e[44]=O,e[45]=T):(O=e[44],T=e[45]);let R;e[46]!==o?(R=fe=>o(ue=>({...ue,toolApprovalLevel:fe})),e[46]=o,e[47]=R):R=e[47];let te;e[48]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx(ys,{className:"w-full",children:s.jsx(Ss,{})}),e[48]=te):te=e[48];let Y;e[49]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(Be,{value:"none",children:s.jsxs("div",{className:"flex items-start flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"None"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Require approval for all tool calls"})]})}),e[49]=Y):Y=e[49];let Q;e[50]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(Be,{value:"readonly",children:s.jsxs("div",{className:"flex items-start flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Read-only"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[50]=Q):Q=e[50];let G;e[51]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsxs(ks,{children:[Y,Q,s.jsx(Be,{value:"yolo",children:s.jsxs("div",{className:"flex items-start flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"YOLO"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all tools without approval"})]})})]}),e[51]=G):G=e[51];let H;e[52]!==r.toolApprovalLevel||e[53]!==R?(H=s.jsxs("div",{className:"flex flex-col gap-2",children:[O,T,s.jsxs(vs,{value:r.toolApprovalLevel,onValueChange:R,children:[te,G]})]}),e[52]=r.toolApprovalLevel,e[53]=R,e[54]=H):H=e[54];let V,B;e[55]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Experimental"}),B=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Experimental features are unstable and may change or stop working at any time."}),e[55]=V,e[56]=B):(V=e[55],B=e[56]);let W;e[57]!==o?(W=()=>o(Js),e[57]=o,e[58]=W):W=e[58];let C;e[59]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(we,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(tt,{size:16,className:"text-muted-foreground"}),"Projects"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the projects feature in the sidebar"})]}),e[59]=C):C=e[59];let q;e[60]!==o?(q=fe=>o(ue=>({...ue,experimental_projects:fe})),e[60]=o,e[61]=q):q=e[61];let J;e[62]!==r.experimental_projects||e[63]!==q?(J=s.jsx("div",{onClick:Qs,children:s.jsx(Le,{checked:r.experimental_projects,onCheckedChange:q})}),e[62]=r.experimental_projects,e[63]=q,e[64]=J):J=e[64];let le;e[65]!==W||e[66]!==J?(le=s.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:[C,J]}),e[65]=W,e[66]=J,e[67]=le):le=e[67];let oe;e[68]!==o?(oe=()=>o(Ys),e[68]=o,e[69]=oe):oe=e[69];let Ce;e[70]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(we,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(qe,{size:16,className:"text-muted-foreground"}),"Tasks"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the tasks feature in the sidebar"})]}),e[70]=Ce):Ce=e[70];let ae;e[71]!==o?(ae=fe=>o(ue=>({...ue,experimental_tasks:fe})),e[71]=o,e[72]=ae):ae=e[72];let w;e[73]!==r.experimental_tasks||e[74]!==ae?(w=s.jsx("div",{onClick:Ks,children:s.jsx(Le,{checked:r.experimental_tasks,onCheckedChange:ae})}),e[73]=r.experimental_tasks,e[74]=ae,e[75]=w):w=e[75];let Z;e[76]!==oe||e[77]!==w?(Z=s.jsxs("button",{type:"button",onClick:oe,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:[Ce,w]}),e[76]=oe,e[77]=w,e[78]=Z):Z=e[78];let ne;e[79]!==le||e[80]!==Z?(ne=s.jsxs("div",{className:"flex flex-col gap-2",children:[V,B,le,Z]}),e[79]=le,e[80]=Z,e[81]=ne):ne=e[81];let ce;e[82]!==y||e[83]!==_||e[84]!==H||e[85]!==ne?(ce=s.jsxs("div",{className:"p-5 space-y-6 min-h-[225px] overflow-y-auto",children:[y,_,H,ne]}),e[82]=y,e[83]=_,e[84]=H,e[85]=ne,e[86]=ce):ce=e[86];let pe;e[87]!==i.id?(pe=s.jsx("span",{className:"font-mono text-xs",children:i.id}),e[87]=i.id,e[88]=pe):pe=e[88];let me;e[89]!==d?(me=d?s.jsx(be,{size:14,className:"text-green-600"}):s.jsx(jt,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[89]=d,e[90]=me):me=e[90];let de;e[91]!==u||e[92]!==pe||e[93]!==me?(de=s.jsx(ot,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:u,className:"group flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[pe,me]})}),e[91]=u,e[92]=pe,e[93]=me,e[94]=de):de=e[94];let Oe;e[95]===Symbol.for("react.memo_cache_sentinel")?(Oe=s.jsx(at,{side:"top",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[95]=Oe):Oe=e[95];let ve;e[96]!==de?(ve=s.jsx(ls,{children:s.jsxs(ct,{children:[de,Oe]})}),e[96]=de,e[97]=ve):ve=e[97];let Te;e[98]===Symbol.for("react.memo_cache_sentinel")?(Te=s.jsxs("span",{className:"text-xs text-muted-foreground/75",children:["v","2.114.5"]}),e[98]=Te):Te=e[98];let ye;e[99]!==ve?(ye=s.jsxs("div",{className:"border-t border-border px-5 py-4 flex items-center justify-between shrink-0",children:[ve,Te]}),e[99]=ve,e[100]=ye):ye=e[100];let Se;e[101]!==ce||e[102]!==ye?(Se=s.jsxs(bs,{className:"sm:max-w-lg sm:max-h-[85vh] p-0 flex flex-col",closeButtonClassName:"hidden",children:[j,s.jsxs("div",{className:"flex flex-col overflow-y-hidden",children:[ce,ye]})]}),e[101]=ce,e[102]=ye,e[103]=Se):Se=e[103];let Me;return e[104]!==l||e[105]!==n||e[106]!==Se?(Me=s.jsx(Ns,{open:n,onOpenChange:l,children:Se}),e[104]=l,e[105]=n,e[106]=Se,e[107]=Me):Me=e[107],Me}function Ks(t){return t.stopPropagation()}function Ys(t){return{...t,experimental_tasks:!t.experimental_tasks}}function Qs(t){return t.stopPropagation()}function Js(t){return{...t,experimental_projects:!t.experimental_projects}}function Xs(t){return t.stopPropagation()}function en(t){return t.stopPropagation()}function tn(t){return{...t,devMode:!t.devMode}}function sn(t){return{...t,enableNotifications:!1}}function nn(t){const e=L.c(50),{user:n,userImage:l}=t,[i,a]=A.useState(!1),[r,o]=A.useState(!1);let d;e[0]!==n.email||e[1]!==n.id||e[2]!==n.name?(d=()=>{const R=`ID: ${n.id}
|
|
2
|
-
Name: ${n.name||"N/A"}
|
|
3
|
-
Email: ${n.email}`;navigator.clipboard.writeText(R),o(!0),he.success("User info copied to clipboard"),setTimeout(()=>o(!1),2e3)},e[0]=n.email,e[1]=n.id,e[2]=n.name,e[3]=d):d=e[3];const c=d,m=n.name||n.email||"U";let u;e[4]!==m||e[5]!==l?(u=s.jsx(je,{url:l,fallback:m,shape:"circle",size:"2xs",className:"shrink-0 size-5"}),e[4]=m,e[5]=l,e[6]=u):u=e[6];const f=n.name||"User";let h;e[7]!==f?(h=s.jsx("div",{className:"flex-1 min-w-0 group-data-[collapsible=icon]:hidden",children:s.jsx("div",{className:"text-sm font-medium truncate text-sidebar-foreground leading-none",children:f})}),e[7]=f,e[8]=h):h=e[8];let p;e[9]!==u||e[10]!==h?(p=s.jsx(gt,{asChild:!0,children:s.jsxs("button",{className:"flex w-full h-8 items-center gap-2 rounded-md px-1 hover:bg-sidebar-accent transition-colors text-left min-w-0",children:[u,h]})}),e[9]=u,e[10]=h,e[11]=p):p=e[11];const j=n.name||n.email||"U";let g;e[12]!==j||e[13]!==l?(g=s.jsx(je,{url:l,fallback:j,shape:"circle",size:"sm",className:"shrink-0"}),e[12]=j,e[13]=l,e[14]=g):g=e[14];const k=n.name||"User";let x;e[15]!==k?(x=s.jsx("div",{className:"text-sm font-medium truncate",children:k}),e[15]=k,e[16]=x):x=e[16];let b;e[17]!==n.email?(b=s.jsx("div",{className:"text-xs text-muted-foreground truncate",children:n.email}),e[17]=n.email,e[18]=b):b=e[18];let v;e[19]!==x||e[20]!==b?(v=s.jsxs("div",{className:"flex-1 min-w-0",children:[x,b]}),e[19]=x,e[20]=b,e[21]=v):v=e[21];let N;e[22]!==r?(N=s.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:r?s.jsx(be,{size:14,className:"text-green-600"}):s.jsx(jt,{size:14,className:"text-muted-foreground"})}),e[22]=r,e[23]=N):N=e[23];let y;e[24]!==c||e[25]!==v||e[26]!==N||e[27]!==g?(y=s.jsxs(ee,{onClick:c,className:"gap-2.5 group",children:[g,v,N]}),e[24]=c,e[25]=v,e[26]=N,e[27]=g,e[28]=y):y=e[28];let S;e[29]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx($e,{}),e[29]=S):S=e[29];let z;e[30]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsxs(ee,{className:"gap-2.5",onClick:()=>a(!0),children:[s.jsx(Re,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Settings"})]}),e[30]=z):z=e[30];let M;e[31]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(ee,{asChild:!0,children:s.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(bt,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Terms of Use"}),s.jsx(_e,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[31]=M):M=e[31];let E;e[32]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(ee,{asChild:!0,children:s.jsxs("a",{href:"https://www.decocms.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(ps,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Privacy Policy"}),s.jsx(_e,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[32]=E):E=e[32];let I;e[33]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(ee,{asChild:!0,children:s.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(Tt,{className:"w-3.5 h-3.5 shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"decocms/mesh"}),s.jsx(_e,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[33]=I):I=e[33];let U;e[34]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(ee,{asChild:!0,children:s.jsxs("a",{href:"https://decocms.com/discord",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(Ke,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Community"}),s.jsx(_e,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[34]=U):U=e[34];let D,F;e[35]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(ee,{asChild:!0,children:s.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(xs,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Homepage"}),s.jsx(_e,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),F=s.jsx($e,{}),e[35]=D,e[36]=F):(D=e[35],F=e[36]);let $;e[37]===Symbol.for("react.memo_cache_sentinel")?($=s.jsxs(ee,{className:"gap-2.5",onClick:rn,children:[s.jsx(Ct,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Sign out"})]}),e[37]=$):$=e[37];let P;e[38]!==y?(P=s.jsxs(pt,{side:"top",align:"end",collisionPadding:8,className:"w-64 flex flex-col gap-0.5",onCloseAutoFocus:ln,children:[y,S,z,M,E,I,U,D,F,$]}),e[38]=y,e[39]=P):P=e[39];let _;e[40]!==P||e[41]!==p?(_=s.jsxs(ht,{children:[p,P]}),e[40]=P,e[41]=p,e[42]=_):_=e[42];let O;e[43]!==i||e[44]!==n||e[45]!==l?(O=i&&s.jsx(Zs,{open:i,onOpenChange:a,user:n,userImage:l}),e[43]=i,e[44]=n,e[45]=l,e[46]=O):O=e[46];let T;return e[47]!==_||e[48]!==O?(T=s.jsxs(s.Fragment,{children:[_,O]}),e[47]=_,e[48]=O,e[49]=T):T=e[49],T}function rn(){return ge.signOut()}function ln(t){return t.preventDefault()}function It(){const t=L.c(7),{data:e}=ge.useSession();if(!e?.user){let d;return t[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(je,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer h-7 w-7",muted:!0}),t[0]=d):d=t[0],d}const n=e.user,l=n.name??void 0;let i;t[1]!==l||t[2]!==n?(i={...n,name:l},t[1]=l,t[2]=n,t[3]=i):i=t[3];const a=i,r=n.image;let o;return t[4]!==r||t[5]!==a?(o=s.jsx(nn,{user:a,userImage:r}),t[4]=r,t[5]=a,t[6]=o):o=t[6],o}function on({invitation:t}){const[e,n]=A.useState(!1),[l,i]=A.useState(!1),a=Lt(),r=async()=>{n(!0);try{const d=await ge.organization.acceptInvitation({invitationId:t.id});if(d.error)he.error(d.error.message),n(!1);else{const c=await ge.organization.setActive({organizationId:t.organizationId});he.success("Invitation accepted!");const m=c?.data?.slug;window.location.href=m?`/${m}`:"/"}}catch{he.error("Failed to accept invitation"),n(!1)}},o=async()=>{i(!0);try{const d=await ge.organization.rejectInvitation({invitationId:t.id});d.error?(he.error(d.error.message),i(!1)):(he.success("Invitation declined"),a.invalidateQueries())}catch{he.error("Failed to decline invitation"),i(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"You've been invited to join"}),s.jsx("p",{className:"text-sm font-medium truncate",children:t.organizationName??"Unknown organization"})]}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s.jsx(Ee,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:r,disabled:e||l,"aria-label":"Accept invitation",children:s.jsx(be,{size:14})}),s.jsx(Ee,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:o,disabled:e||l,"aria-label":"Decline invitation",children:s.jsx($s,{size:14})})]})]})}function an(){const t=A.useContext(Mt),{data:e}=t.hooks.useListUserInvitations();return(e??[]).filter(l=>l.status==="pending"&&new Date(l.expiresAt)>new Date)}function cn(){const t=L.c(12),e=an();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(It,{})}),t[0]=n):n=t[0];let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ws,{asChild:!0,children:s.jsx(Ee,{variant:"ghost",size:"icon",className:"size-8 text-sidebar-foreground/50 hover:text-sidebar-foreground hover:bg-sidebar-accent","aria-label":"Open inbox",children:s.jsx(Xe,{size:16})})}),t[1]=l):l=t[1];let i;t[2]!==e.length?(i=e.length>0&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-red-500 ring-2 ring-sidebar pointer-events-none"}),t[2]=e.length,t[3]=i):i=t[3];let a;t[4]!==i?(a=s.jsxs("div",{className:"relative",children:[l,i]}),t[4]=i,t[5]=a):a=t[5];let r;t[6]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"px-4 py-3 border-b border-border shrink-0",children:s.jsx("h3",{className:"text-sm font-medium",children:"Inbox"})}),t[6]=r):r=t[6];let o;t[7]!==e?(o=s.jsxs(_s,{side:"right",align:"end",sideOffset:24,className:"w-[400px] p-0 h-[650px] flex flex-col",children:[r,e.length===0?s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[s.jsx(Xe,{size:24,className:"text-muted-foreground/50"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:"No messages or invites pending"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Messages, workspace and project invitations will appear here"})]}):s.jsx("div",{className:"overflow-y-auto flex-1",children:e.map(dn)})]}),t[7]=e,t[8]=o):o=t[8];let d;return t[9]!==a||t[10]!==o?(d=s.jsx(Vt,{className:"px-3.5 pb-3 group-data-[collapsible=icon]:px-2",children:s.jsx(xe,{children:s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center w-full gap-1",children:[n,s.jsx("div",{className:"group-data-[collapsible=icon]:hidden",children:s.jsxs(zs,{children:[a,o]})})]})})})}),t[9]=a,t[10]=o,t[11]=d):d=t[11],d}function dn(t){return s.jsx(on,{invitation:t},t.id)}function Pt(t){const e=L.c(4),{children:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(it,{className:"my-2"}),e[0]=l):l=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ie,{children:s.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:s.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=i):i=e[1];let a;return e[2]!==n?(a=s.jsxs(s.Fragment,{children:[l,i,n]}),e[2]=n,e[3]=a):a=e[3],a}function mn(t){const e=L.c(26),{item:n}=t,l=He(),{org:i}=Ne(),a=Nt(i.id),r=Is(i.id);let o;e[0]!==r.update||e[1]!==n.url||e[2]!==a?.sidebar_items?(o=async()=>{const v=(a?.sidebar_items||[]).filter(N=>N.url!==n.url);await r.update.mutateAsync({sidebar_items:v})},e[0]=r.update,e[1]=n.url,e[2]=a?.sidebar_items,e[3]=o):o=e[3];const d=o;let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=/^https?:\/\/.+/,e[4]=c):c=e[4];let m;e[5]!==n.icon?(m=c.test(n.icon),e[5]=n.icon,e[6]=m):m=e[6];const u=m;let f;e[7]!==n.url||e[8]!==l?(f=()=>{l({to:n.url})},e[7]=n.url,e[8]=l,e[9]=f):f=e[9];const h=n.title;let p;e[10]!==u||e[11]!==n.icon||e[12]!==n.title?(p=s.jsx("div",{className:"flex items-center justify-center shrink-0",children:u?s.jsx("img",{src:n.icon,alt:n.title,className:"h-4 w-4 rounded object-cover"}):s.jsx(bt,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=u,e[11]=n.icon,e[12]=n.title,e[13]=p):p=e[13];let j;e[14]!==n.title?(j=n.title.toLocaleLowerCase(),e[14]=n.title,e[15]=j):j=e[15];let g;e[16]!==j?(g=s.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:s.jsx("span",{className:"truncate text-sm w-full capitalize",children:j})}),e[16]=j,e[17]=g):g=e[17];let k;e[18]!==d?(k=s.jsx(De,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:b=>{b.preventDefault(),b.stopPropagation(),d()}}),e[18]=d,e[19]=k):k=e[19];let x;return e[20]!==n.title||e[21]!==f||e[22]!==p||e[23]!==g||e[24]!==k?(x=s.jsx(ie,{children:s.jsxs(Fe,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:f,tooltip:h,children:[p,g,k]})}),e[20]=n.title,e[21]=f,e[22]=p,e[23]=g,e[24]=k,e[25]=x):x=e[25],x}function et(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ie,{children:s.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:s.jsx(se,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function fn(){const t=L.c(4),{org:e}=Ne(),l=Nt(e.id)?.sidebar_items;if(!l?.length)return null;let i;t[0]!==l?(i=l.map(un),t[0]=l,t[1]=i):i=t[1];let a;return t[2]!==i?(a=s.jsx(Pt,{children:i}),t[2]=i,t[3]=a):a=t[3],a}function un(t){return s.jsx(mn,{item:t},t.url)}function xn(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(A.Suspense,{fallback:s.jsxs(Pt,{children:[s.jsx(et,{}),s.jsx(et,{})]}),children:s.jsx(fn,{})}),t[0]=e):e=t[0],e}function pn(t){const e=L.c(11),{project:n}=t,l=n.ui?.themeColor??"#60a5fa";if(n.ui?.icon){let d;return e[0]!==n.ui.icon?(d=s.jsx("img",{src:n.ui.icon,alt:"",className:"size-4 rounded object-cover border border-border/50"}),e[0]=n.ui.icon,e[1]=d):d=e[1],d}let i;e[2]!==l?(i={backgroundColor:l},e[2]=l,e[3]=i):i=e[3];let a;e[4]!==n.name?(a=n.name.charAt(0).toUpperCase(),e[4]=n.name,e[5]=a):a=e[5];let r;e[6]!==a?(r=s.jsx("span",{className:"text-[10px] font-medium text-white",children:a}),e[6]=a,e[7]=r):r=e[7];let o;return e[8]!==i||e[9]!==r?(o=s.jsx("div",{className:"size-4 rounded flex items-center justify-center border border-border/50",style:i,children:r}),e[8]=i,e[9]=r,e[10]=o):o=e[10],o}function hn(t){const e=L.c(14),{project:n}=t,l=He(),{org:i}=Ne();let a;e[0]!==l||e[1]!==i.slug||e[2]!==n.slug?(a=()=>{l({to:"/$org/$project",params:{org:i.slug,project:n.slug}})},e[0]=l,e[1]=i.slug,e[2]=n.slug,e[3]=a):a=e[3];let r;e[4]!==n?(r=s.jsx(pn,{project:n}),e[4]=n,e[5]=r):r=e[5];let o;e[6]!==n.name?(o=s.jsx("span",{className:"truncate flex-1 group-data-[collapsible=icon]:hidden",children:n.name}),e[6]=n.name,e[7]=o):o=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ps,{size:12,className:"text-muted-foreground opacity-0 group-hover/item:opacity-100 transition-opacity group-data-[collapsible=icon]:hidden"}),e[8]=d):d=e[8];let c;return e[9]!==n.name||e[10]!==a||e[11]!==r||e[12]!==o?(c=s.jsx(ie,{children:s.jsxs(Fe,{onClick:a,tooltip:n.name,children:[r,o,d]})}),e[9]=n.name,e[10]=a,e[11]=r,e[12]=o,e[13]=c):c=e[13],c}function gn(){const t=L.c(55),{org:e}=Ne(),{data:n,isLoading:l}=ut(e.id),[i,a]=A.useState(!0),[r,o]=A.useState(!1);let d,c,m,u,f,h,p,j,g,k,x,b,v;if(t[0]!==l||t[1]!==i||t[2]!==n){v=Symbol.for("react.early_return_sentinel");e:{const D=n?.filter(bn)??[];if(l){let R;t[16]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(se,{className:"h-4 w-4 rounded"}),s.jsx(se,{className:"h-4 flex-1"})]})}),t[16]=R):R=t[16];let te;t[17]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx(Pe,{className:"py-0 px-0",children:s.jsx(Ie,{children:s.jsxs(xe,{className:"gap-0.5",children:[R,s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(se,{className:"h-4 w-4 rounded"}),s.jsx(se,{className:"h-4 flex-1"})]})})]})})}),t[17]=te):te=t[17],v=te;break e}b="group/projects-section mt-2",f=Xt,k=i,x=a,u=Pe,g="py-0 px-0",m=Ie,c=xe,p="gap-0.5";let F;t[18]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Projects"}),t[18]=F):F=t[18];const $=!i&&"-rotate-90";let P;t[19]!==$?(P=K("text-muted-foreground shrink-0 transition-transform duration-200",$),t[19]=$,t[20]=P):P=t[20];let _;t[21]!==P?(_=s.jsx(es,{asChild:!0,children:s.jsxs("button",{type:"button",className:"flex flex-1 items-center gap-1 cursor-pointer min-w-0",children:[F,s.jsx(xt,{size:12,className:P})]})}),t[21]=P,t[22]=_):_=t[22];let O;t[23]===Symbol.for("react.memo_cache_sentinel")?(O=()=>o(!0),t[23]=O):O=t[23];let T;t[24]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx("button",{type:"button",onClick:O,title:"Create new project",className:"opacity-0 group-hover/projects-section:opacity-100 transition-opacity text-muted-foreground hover:text-foreground flex items-center justify-center h-4 rounded shrink-0",children:s.jsx(ze,{size:16})}),t[24]=T):T=t[24],t[25]!==_?(j=s.jsx(ie,{className:"group-data-[collapsible=icon]:hidden",children:s.jsxs("div",{className:"flex h-6 w-full items-center gap-1 rounded-md pl-1.5 pr-0.5 hover:bg-sidebar-accent transition-colors",children:[_,T]})}),t[25]=_,t[26]=j):j=t[26],d=ts,h=D.length===0?s.jsx(ie,{children:s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:"No projects yet"})}):D.map(jn)}t[0]=l,t[1]=i,t[2]=n,t[3]=d,t[4]=c,t[5]=m,t[6]=u,t[7]=f,t[8]=h,t[9]=p,t[10]=j,t[11]=g,t[12]=k,t[13]=x,t[14]=b,t[15]=v}else d=t[3],c=t[4],m=t[5],u=t[6],f=t[7],h=t[8],p=t[9],j=t[10],g=t[11],k=t[12],x=t[13],b=t[14],v=t[15];if(v!==Symbol.for("react.early_return_sentinel"))return v;let N;t[27]!==d||t[28]!==h?(N=s.jsx(d,{children:h}),t[27]=d,t[28]=h,t[29]=N):N=t[29];let y;t[30]!==c||t[31]!==p||t[32]!==j||t[33]!==N?(y=s.jsxs(c,{className:p,children:[j,N]}),t[30]=c,t[31]=p,t[32]=j,t[33]=N,t[34]=y):y=t[34];let S;t[35]!==m||t[36]!==y?(S=s.jsx(m,{children:y}),t[35]=m,t[36]=y,t[37]=S):S=t[37];let z;t[38]!==u||t[39]!==S||t[40]!==g?(z=s.jsx(u,{className:g,children:S}),t[38]=u,t[39]=S,t[40]=g,t[41]=z):z=t[41];let M;t[42]!==f||t[43]!==z||t[44]!==k||t[45]!==x?(M=s.jsx(f,{open:k,onOpenChange:x,children:z}),t[42]=f,t[43]=z,t[44]=k,t[45]=x,t[46]=M):M=t[46];let E;t[47]!==M||t[48]!==b?(E=s.jsx("div",{className:b,children:M}),t[47]=M,t[48]=b,t[49]=E):E=t[49];let I;t[50]!==r?(I=s.jsx(mt,{open:r,onOpenChange:o}),t[50]=r,t[51]=I):I=t[51];let U;return t[52]!==E||t[53]!==I?(U=s.jsxs(s.Fragment,{children:[E,I]}),t[52]=E,t[53]=I,t[54]=U):U=t[54],U}function jn(t){return s.jsx(hn,{project:t},t.id)}function bn(t){return t.slug!==X}function Nn(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(A.Suspense,{fallback:s.jsx(Pe,{className:"py-0 px-0",children:s.jsx(Ie,{children:s.jsx(xe,{className:"gap-0.5",children:s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(se,{className:"h-4 w-4 rounded"}),s.jsx(se,{className:"h-4 flex-1"})]})})})})}),children:s.jsx(gn,{})}),t[0]=e):e=t[0],e}function vn(t){const e=L.c(15),{onCreateProject:n}=t,[l]=Ae(),i=Ls(),{locator:a}=Ne();let r;e[0]!==a?(r=We.isOrgAdminProject(a),e[0]=a,e[1]=r):r=e[1];const o=r;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ge.Skeleton,{}),e[2]=d):d=e[2];let c;e[3]!==n?(c=s.jsx(A.Suspense,{fallback:d,children:s.jsx(Ge,{onCreateProject:n})}),e[3]=n,e[4]=c):c=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(cn,{}),e[5]=m):m=e[5];let u;e[6]!==o||e[7]!==l?(u=o?l.experimental_projects?s.jsx(Nn,{}):null:s.jsx(xn,{}),e[6]=o,e[7]=l,e[8]=u):u=e[8];let f;e[9]!==u?(f=s.jsx(dt,{children:s.jsx(A.Suspense,{fallback:null,children:u})}),e[9]=u,e[10]=f):f=e[10];let h;return e[11]!==i||e[12]!==c||e[13]!==f?(h=s.jsx(zt,{sections:i,header:c,footer:m,additionalContent:f}),e[11]=i,e[12]=c,e[13]=f,e[14]=h):h=e[14],h}function yn(){const t=L.c(2),n=Ue().location.href;let l;return t[0]!==n?(l=s.jsx(Ht,{to:"/login",search:{next:n},replace:!0}),t[0]=n,t[1]=l):l=t[1],l}function Sn(t){const e=L.c(6),{children:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Et,{children:s.jsx(st,{})}),e[0]=l):l=e[0];let i;e[1]!==n?(i=s.jsx(Dt,{children:n}),e[1]=n,e[2]=i):i=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Rt,{children:s.jsx(yn,{})}),e[3]=a):a=e[3];let r;return e[4]!==i?(r=s.jsxs(s.Fragment,{children:[l,i,a]}),e[4]=i,e[5]=r):r=e[5],r}function kn(t){const e=L.c(10),{children:n,className:l}=t,[,i]=A.useTransition();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=Qe.decoChatPanelWidth(),e[0]=a):a=e[0];const[r,o]=Ye(a,30);let d;e[1]!==o?(d=f=>i(()=>o(f)),e[1]=o,e[2]=d):d=e[2];const c=d;let m;e[3]!==l?(m=K("min-w-0",l),e[3]=l,e[4]=m):m=e[4];let u;return e[5]!==r||e[6]!==n||e[7]!==c||e[8]!==m?(u=s.jsx(vt,{defaultSize:r,minSize:20,className:m,onResize:c,children:n}),e[5]=r,e[6]=n,e[7]=c,e[8]=m,e[9]=u):u=e[9],u}function Cn(t){const e=L.c(5),{children:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Qe.sidebarOpen(),e[0]=l):l=e[0];const[i,a]=Ye(l,!0);let r;return e[1]!==n||e[2]!==a||e[3]!==i?(r=s.jsx(Zt,{open:i,onOpenChange:a,children:n}),e[1]=n,e[2]=a,e[3]=i,e[4]=r):r=e[4],r}function _n(t){const e=L.c(24),{isStudio:n,isHomeRoute:l,onCreateProject:i}=t,[a]=Ze();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=Qe.decoChatPanelWidth(),e[0]=r):r=e[0];const[o]=Ye(r,30),[d]=Ae(),c=n&&d.experimental_projects?"":void 0,m=`${o}cqi`;let u;e[1]!==m?(u={"--sidebar-width":"13.5rem","--sidebar-width-mobile":"11rem","--chat-panel-w":m},e[1]=m,e[2]=u):u=e[2];const f=u;let h;e[3]!==i?(h=s.jsx(vn,{onCreateProject:i}),e[3]=i,e[4]=h):h=e[4];let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p={background:"transparent",containerType:"inline-size"},e[5]=p):p=e[5];let j;e[6]===Symbol.for("react.memo_cache_sentinel")?(j={overflow:"visible"},e[6]=j):j=e[6];let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g={overflow:"visible"},e[7]=g):g=e[7];const k=a&&"rounded-tr-[0.75rem] border-r";let x;e[8]!==k?(x=K("flex flex-col flex-1 min-h-0 bg-card overflow-hidden","border-t border-l border-sidebar-border","rounded-tl-[0.75rem]","transition-[border-radius] duration-200 ease-[var(--ease-out-quart)]",k),e[8]=k,e[9]=x):x=e[9];let b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(nt,{})}),e[10]=b):b=e[10];let v;e[11]!==x?(v=s.jsx(vt,{className:"min-w-0 flex flex-col",style:g,children:s.jsx("div",{className:x,children:b})}),e[11]=x,e[12]=v):v=e[12];let N;e[13]!==a||e[14]!==l?(N=!l&&s.jsxs(s.Fragment,{children:[s.jsx(As,{className:"bg-sidebar"}),s.jsx(kn,{className:K("transition-[max-width] duration-200 ease-[var(--ease-out-quart)] overflow-hidden",a?"max-w-[var(--chat-panel-w)] bg-sidebar":"max-w-0"),children:s.jsx("div",{className:"h-full min-w-[var(--chat-panel-w)] pl-1.5 pr-1.5 pb-1.5",children:s.jsx("div",{className:"h-full bg-background rounded-[0.75rem] overflow-hidden border border-sidebar-border shadow-sm",children:s.jsx(Ms,{})})})})]}),e[13]=a,e[14]=l,e[15]=N):N=e[15];let y;e[16]!==v||e[17]!==N?(y=s.jsx(Kt,{className:"pt-1.5",style:p,children:s.jsxs(Os,{direction:"horizontal",className:"h-full",style:j,children:[v,N]})}),e[16]=v,e[17]=N,e[18]=y):y=e[18];let S;return e[19]!==y||e[20]!==c||e[21]!==f||e[22]!==h?(S=s.jsxs(Yt,{className:"flex-1 bg-sidebar","data-studio":c,style:f,children:[h,y]}),e[19]=y,e[20]=c,e[21]=f,e[22]=h,e[23]=S):S=e[23],S}function wn(){const{org:t,project:e}=Ve({strict:!1}),n=Ue(),[l,i]=A.useState(!1),a=n.location.pathname===`/${t}/${e}`||n.location.pathname===`/${t}/${e}/`,r=e??X,{data:o}=Ut({queryKey:Ft.activeOrganization(t),queryFn:async()=>{if(!t)return null;const{data:m}=await ge.organization.setActive({organizationSlug:t});return{org:m,project:{slug:r,isOrgAdmin:r===X}}},gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1});if(!o)return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx("header",{className:"h-12 flex items-center justify-end px-4 border-b border-border",children:s.jsx(It,{})}),s.jsx(nt,{})]});if(!o.org)return window.location.pathname!=="/"&&(window.location.href="/"),null;const d={...o,project:{...o.project,slug:r,isOrgAdmin:r===X}},c=r===X;return s.jsxs(Bt,{...d,children:[s.jsx(Cn,{children:s.jsx("div",{className:"flex flex-col h-screen overflow-hidden",children:s.jsx(re.Provider,{children:s.jsx(_n,{isStudio:c,isHomeRoute:a,onCreateProject:()=>i(!0)})})})}),s.jsx(mt,{open:l,onOpenChange:i})]})}function oi(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Sn,{children:s.jsx(A.Suspense,{fallback:s.jsx(st,{}),children:s.jsx(wn,{})})}),t[0]=e):e=t[0],e}export{oi as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as B,j as r,r as F,u as O,b as W,n as Q,K as Y}from"./index-Bunb17vv.js";import"./index-C8kkzFPl.js";import{C as G,a as J}from"./collection-table-wrapper-aNY90kKS.js";import{C as X,E as I}from"./empty-state-DNFU252E.js";import{E as Z}from"./error-boundary-BmYrMabK.js";import{P as h}from"./index-wFCrgWrj.js";import{u as ee,U as te}from"./use-list-state-D5zjpWht.js";import{f as re}from"./format-time-CMKyl-GC.js";import{a as se,u as oe}from"./constants-DPkAIN6Z.js";import{B as ie,a as ae,b as le,c as ne}from"./breadcrumb-LjVmMbX-.js";import{B as f}from"./badge-CjnLH2lI.js";import{i as ce}from"./AlertCircle-D4527ICU.js";import{c as me}from"./AlertOctagon-COPWzaf0.js";import{n as V}from"./CheckDone01-03ijxcax.js";import{i as de}from"./Check-CjRTK1W3.js";import{s as pe}from"./Clock-Bmdb1TRN.js";import{i as R}from"./Loading01-1snKai6N.js";import{u as ue}from"./use-deco-chat-open-Jl2cvCiJ.js";import"./button-B5dhenVQ.js";import"./popover-D1pzNMOP.js";import"./spinner-IfgQRFqp.js";import"./tooltip-BOvHNvKx.js";import"./index-Fc-7NN6M.js";import"./use-mcp-prompts-BKi3cw-d.js";import"./useQuery-Bp4CuU6A.js";import"./dialog-D2hO-7NL.js";import"./form-DTE57Ssv.js";import"./label-BG1T_p3q.js";import"./input-Mr1OFJyo.js";import"./integration-icon-D9Lac1Wz.js";import"./Container-CX-RbvCV.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-CDfQ8pyb.js";import"./ChevronDown-_RktpP9c.js";import"./Edit01-LXqrrmB1.js";import"./Users03-NwL7-0U5.js";import"./XCircle-BI-IxNLe.js";import"./AlertTriangle-DCH5pYxh.js";import"./ArrowLeft-LkHGsmHm.js";import"./use-copy-0wW0qGhT.js";import"./Code01-7zAo2TKF.js";import"./use-virtual-mcp-XvCSSoaL.js";import"./use-connection-CP6jP6nm.js";import"./useMutation-BOvwy9IK.js";import"./SearchMd-DrKsMuei.js";import"./use-create-virtual-mcp-Cywd7YYe.js";import"./ChevronRight-CXCT1lCM.js";import"./marked.esm-BaswSlok.js";import"./markdown-DmUzq0fW.js";import"./Copy01-DH2d5VIk.js";import"./tools-list-De4BYXHg.js";import"./card-BMSXwRZK.js";import"./Eye-VVPfHR4D.js";import"./Globe02-BqaVWXob.js";import"./RefreshCw01-nnfUzBDg.js";import"./layout-D99bjGJH.js";import"./generate-id-Dyweu44Y.js";import"./Trash01-lACkPNMB.js";import"./dropdown-menu-DTV9aWPi.js";import"./Grid01-BHI_ERnP.js";import"./List-BM1ULKxF.js";import"./table-CMMXy5Nr.js";import"./avatar-CtRXPznJ.js";import"./use-view-mode-qnYxn17S.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-llm-C4Bry7oS.js";import"./use-binding-B9wXdfeU.js";import"./binder-Dt_u4Ovx.js";import"./localstorage-keys-COeOMfeR.js";import"./select-DltKl0vA.js";import"./File06-BMp646T6.js";import"./Image01-CC_Iyvd-.js";import"./RefreshCcw01-CYXSIN1J.js";import"./Settings01-DJTSpTEO.js";import"./useSuspenseInfiniteQuery-CYNigxjg.js";import"./infiniteQueryObserver-BXks7odB.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 b;e[16]!==v||e[17]!==s.slug||e[18]!==a.slug||e[19]!==k?(b=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]=b):b=e[20];const E=b;let _;e[21]===Symbol.for("react.memo_cache_sentinel")?(_=[{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]=_):_=e[21];const A=_;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 Ut(){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{Ut as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,at as H,j as c,aH as J,a9 as Q,av as C,ax as $,aI as Z,an as ee,ar as te,aG as oe,aJ as G,aP as re,aQ as ne,ay as se,aU as ae,aR as ie,c as _}from"./index-Bunb17vv.js";import{R as le}from"./index-Fc-7NN6M.js";import{c as ce}from"./button-B5dhenVQ.js";var[O]=se("Tooltip",[G]),L=G(),B="TooltipProvider",ue=700,k="tooltip.open",[de,A]=O(B),z=o=>{const{__scopeTooltip:e,delayDuration:t=ue,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,i=a.useRef(!0),d=a.useRef(!1),l=a.useRef(0);return a.useEffect(()=>{const p=l.current;return()=>window.clearTimeout(p)},[]),c.jsx(de,{scope:e,isOpenDelayedRef:i,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};z.displayName=B;var R="Tooltip",[pe,j]=O(R),F=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:i,delayDuration:d}=o,l=A(R,o.__scopeTooltip),p=L(e),[u,h]=a.useState(null),v=ee(),f=a.useRef(0),x=i??l.disableHoverableContent,g=d??l.delayDuration,m=a.useRef(!1),[y,T]=te({prop:r,defaultProp:n??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(k))):l.onClose(),s?.(S)},caller:R}),w=a.useMemo(()=>y?m.current?"delayed-open":"instant-open":"closed",[y]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,m.current=!1,T(!0)},[T]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,T(!1)},[T]),N=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{m.current=!0,T(!0),f.current=0},g)},[g,T]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(oe,{...p,children:c.jsx(pe,{scope:e,contentId:v,open:y,stateAttribute:w,trigger:u,onTriggerChange:h,onTriggerEnter:a.useCallback(()=>{l.isOpenDelayedRef.current?N():E()},[l.isOpenDelayedRef,N,E]),onTriggerLeave:a.useCallback(()=>{x?P():(window.clearTimeout(f.current),f.current=0)},[P,x]),onOpen:E,onClose:P,disableHoverableContent:x,children:t})})};F.displayName=R;var M="TooltipTrigger",U=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=j(M,t),s=A(M,t),i=L(t),d=a.useRef(null),l=H(e,d,n.onTriggerChange),p=a.useRef(!1),u=a.useRef(!1),h=a.useCallback(()=>p.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),c.jsx(J,{asChild:!0,...i,children:c.jsx(Q.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:l,onPointerMove:C(o.onPointerMove,v=>{v.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:C(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});U.displayName=M;var I="TooltipPortal",[fe,he]=O(I,{forceMount:void 0}),q=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=j(I,e);return c.jsx(fe,{scope:e,forceMount:t,children:c.jsx($,{present:t||s.open,children:c.jsx(Z,{asChild:!0,container:n,children:r})})})};q.displayName=I;var b="TooltipContent",V=a.forwardRef((o,e)=>{const t=he(b,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,i=j(b,o.__scopeTooltip);return c.jsx($,{present:r||i.open,children:i.disableHoverableContent?c.jsx(W,{side:n,...s,ref:e}):c.jsx(ve,{side:n,...s,ref:e})})}),ve=a.forwardRef((o,e)=>{const t=j(b,o.__scopeTooltip),r=A(b,o.__scopeTooltip),n=a.useRef(null),s=H(e,n),[i,d]=a.useState(null),{trigger:l,onClose:p}=t,u=n.current,{onPointerInTransitChange:h}=r,v=a.useCallback(()=>{d(null),h(!1)},[h]),f=a.useCallback((x,g)=>{const m=x.currentTarget,y={x:x.clientX,y:x.clientY},T=Te(y,m.getBoundingClientRect()),w=ye(y,T),E=Ce(g.getBoundingClientRect()),P=we([...w,...E]);d(P),h(!0)},[h]);return a.useEffect(()=>()=>v(),[v]),a.useEffect(()=>{if(l&&u){const x=m=>f(m,u),g=m=>f(m,l);return l.addEventListener("pointerleave",x),u.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",x),u.removeEventListener("pointerleave",g)}}},[l,u,f,v]),a.useEffect(()=>{if(i){const x=g=>{const m=g.target,y={x:g.clientX,y:g.clientY},T=l?.contains(m)||u?.contains(m),w=!be(y,i);T?v():w&&(v(),p())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,u,i,p,v]),c.jsx(W,{...o,ref:s})}),[xe,me]=O(R,{isInside:!1}),ge=ae("TooltipContent"),W=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:i,...d}=o,l=j(b,t),p=L(t),{onClose:u}=l;return a.useEffect(()=>(document.addEventListener(k,u),()=>document.removeEventListener(k,u)),[u]),a.useEffect(()=>{if(l.trigger){const h=v=>{v.target?.contains(l.trigger)&&u()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[l.trigger,u]),c.jsx(re,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:u,children:c.jsxs(ne,{"data-state":l.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(ge,{children:r}),c.jsx(xe,{scope:t,isInside:!0,children:c.jsx(le,{id:l.contentId,role:"tooltip",children:n||r})})]})})});V.displayName=b;var X="TooltipArrow",Y=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=L(t);return me(X,t).isInside?null:c.jsx(ie,{...n,...r,ref:e})});Y.displayName=X;function Te(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function ye(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function Ce(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function be(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,i=e.length-1;s<e.length;i=s++){const d=e[s],l=e[i],p=d.x,u=d.y,h=l.x,v=l.y;u>r!=v>r&&t<(h-p)*(r-u)/(v-u)+p&&(n=!n)}return n}function we(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Ee(e)}function Ee(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],i=e[e.length-2];if((s.x-i.x)*(n.y-i.y)>=(s.y-i.y)*(n.x-i.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(n.y-i.y)>=(s.y-i.y)*(n.x-i.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Pe=z,Re=F,_e=U,je=q,Oe=V,Le=Y;const De=({size:o=24,color:e="currentColor",...t})=>a.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},a.createElement("path",{d:"M17 7 7 17M7 7l10 10"}));De.displayName="X";const K=768,D=()=>globalThis.innerWidth<K;function Ne(){const o=_.c(2),[e,t]=a.useState(D);let r,n;return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{const s=()=>t(D),i=globalThis.matchMedia(`(max-width: ${K-1}px)`);return i.addEventListener("change",s),t(D),()=>i.removeEventListener("change",s)},n=[],o[0]=r,o[1]=n):(r=o[0],n=o[1]),a.useEffect(r,n),e}function ke(o){const e=_.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(Pe,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Se(o){const e=_.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(ke,{children:c.jsx(Re,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function He(o){const e=_.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(_e,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function $e(o){const e=_.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const i=s===void 0?0:s;let d;e[5]!==r?(d=ce("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let l;e[7]===Symbol.for("react.memo_cache_sentinel")?(l=c.jsx(Le,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=l):l=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==i||e[11]!==d?(p=c.jsx(je,{children:c.jsxs(Oe,{"data-slot":"tooltip-content",sideOffset:i,className:d,...n,children:[t,l]})}),e[8]=t,e[9]=n,e[10]=i,e[11]=d,e[12]=p):p=e[12],p}export{Se as T,He as a,$e as b,ke as c,De as i,Ne as u};
|