@decocms/mesh 2.84.0 → 2.86.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-DeobVPaG.js → AlertCircle-CZKkWliR.js} +1 -1
- package/dist/client/assets/AlertOctagon-CeHHEPVj.js +1 -0
- package/dist/client/assets/ArrowLeft-BRQUElkq.js +1 -0
- package/dist/client/assets/{ArrowUp-CsOsDXPa.js → ArrowUp-DglMchA5.js} +1 -1
- package/dist/client/assets/{Calendar-Dgp6D2He.js → Calendar-BsrCli7T.js} +1 -1
- package/dist/client/assets/{Check-B7tiH-XX.js → Check-D6aC5DTd.js} +1 -1
- package/dist/client/assets/{CheckCircle-vLELf6tG.js → CheckCircle-BFtRy3Ud.js} +1 -1
- package/dist/client/assets/{CheckDone01-W_IvTmR4.js → CheckDone01-CFLMeuPc.js} +1 -1
- package/dist/client/assets/{ChevronDown-4fM-ZApw.js → ChevronDown-CbbKn8HV.js} +1 -1
- package/dist/client/assets/{ChevronRight-C9SvVl2H.js → ChevronRight-Chr-Opwh.js} +1 -1
- package/dist/client/assets/{Code01-CtE9Fgo6.js → Code01-BrzyalBQ.js} +1 -1
- package/dist/client/assets/{Copy01-mHAXegMf.js → Copy01-DqRoI1-6.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-Cn6V45R5.js → DotsHorizontal-Bg70q80a.js} +1 -1
- package/dist/client/assets/{DotsVertical-C_NxHUxM.js → DotsVertical-D2hVHMV7.js} +1 -1
- package/dist/client/assets/{Download01-BjmCpoji.js → Download01-CK8wSuTm.js} +1 -1
- package/dist/client/assets/{Edit01-RMPmKiuh.js → Edit01-DdekSr5y.js} +1 -1
- package/dist/client/assets/Eye-DF_0-3p6.js +1 -0
- package/dist/client/assets/{File02-DW2JTynl.js → File02-Cyebv_VV.js} +1 -1
- package/dist/client/assets/{File06-BoQ3aZMK.js → File06-B40bEevg.js} +1 -1
- package/dist/client/assets/{FilterLines-C51ysYKP.js → FilterLines-Vmcdh-DQ.js} +1 -1
- package/dist/client/assets/{Globe02-CHTxbuvC.js → Globe02-CnvB05VP.js} +1 -1
- package/dist/client/assets/{Grid01-Dvk1xwJ4.js → Grid01-BSLssB32.js} +1 -1
- package/dist/client/assets/{Home02-DOyHFJiI.js → Home02-ByOV6OTK.js} +1 -1
- package/dist/client/assets/{Image01-BoPpKFMP.js → Image01-BHFBKHh1.js} +1 -1
- package/dist/client/assets/{Inbox01-DVhoyxIp.js → Inbox01-BCKz6bhQ.js} +1 -1
- package/dist/client/assets/{InfoCircle-CAfYuO0K.js → InfoCircle-pOOorbPI.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DxKrKPgL.js → LinkExternal01-X-xVeISQ.js} +1 -1
- package/dist/client/assets/{List-BdoaC21s.js → List-DU0cbaW8.js} +1 -1
- package/dist/client/assets/{Loading01-MSLql51R.js → Loading01-BPsj2Ikr.js} +1 -1
- package/dist/client/assets/{Lock01-CCP_kajf.js → Lock01-CS7UEcIJ.js} +1 -1
- package/dist/client/assets/{Pin01-DTGNcumy.js → Pin01-CiUUgpU9.js} +1 -1
- package/dist/client/assets/{Play-BQy9xsnN.js → Play-Dv4AMgTA.js} +1 -1
- package/dist/client/assets/{Plus-cL6uctg7.js → Plus-B_c8T2NA.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-Cn69ijk0.js → RefreshCcw01-Dh-nQZ6_.js} +1 -1
- package/dist/client/assets/{SearchMd-9opLTbt7.js → SearchMd-DUhyUDi8.js} +1 -1
- package/dist/client/assets/{Settings01-CymY9V-E.js → Settings01-BBv98jla.js} +1 -1
- package/dist/client/assets/{Settings02-D0x9l-th.js → Settings02-DDgRyQEW.js} +1 -1
- package/dist/client/assets/{Share07-DtkOeKXz.js → Share07-Cje8p_rj.js} +1 -1
- package/dist/client/assets/{Terminal-Dhv-FFhT.js → Terminal-y0YJjQ3t.js} +1 -1
- package/dist/client/assets/{Tool01-Dx-yLjWZ.js → Tool01-R-ugQCdx.js} +1 -1
- package/dist/client/assets/{Trash01-BYpgehDe.js → Trash01-5qyOQuDf.js} +1 -1
- package/dist/client/assets/{Upload01-CizOzq5O.js → Upload01-32MstECF.js} +1 -1
- package/dist/client/assets/{Users03-CA846Mh0.js → Users03-DH9LrHXm.js} +1 -1
- package/dist/client/assets/{X-DpveZ1aP.js → X-Hp3kXOcu.js} +1 -1
- package/dist/client/assets/{XClose-CfG5NO72.js → XClose-DH3KRZCt.js} +1 -1
- package/dist/client/assets/agent-connections-preview-LAUoc9nd.js +1 -0
- package/dist/client/assets/agent-detail-LxMqgUWr.js +1 -0
- package/dist/client/assets/agents-BGjJ8Gal.js +1 -0
- package/dist/client/assets/{alert-dialog-CEzvbVBM.js → alert-dialog-CDTYj-K3.js} +4 -4
- package/dist/client/assets/{auth-catchall-CtFwpTdR.js → auth-catchall-wy1AyoKc.js} +1 -1
- package/dist/client/assets/avatar-CwCwm6yK.js +1 -0
- package/dist/client/assets/badge-qV-BdFxU.js +1 -0
- package/dist/client/assets/{binder-Bq3_4LhY.js → binder-DLof5cwN.js} +1 -1
- package/dist/client/assets/breadcrumb-CpY5_MEM.js +1 -0
- package/dist/client/assets/button-BzzgqPA1.js +1 -0
- package/dist/client/assets/card-BMS2jWLg.js +1 -0
- package/dist/client/assets/checkbox-DGcmbWPy.js +1 -0
- package/dist/client/assets/{circle-alert-Bgl4tjaY.js → circle-alert-Dl1mKU53.js} +1 -1
- package/dist/client/assets/{collection-detail-ByJKKzFi.js → collection-detail-q4wl2I_I.js} +6 -6
- package/dist/client/assets/collection-search-C0EzGOfM.js +1 -0
- package/dist/client/assets/collection-tab-gslp5F0N.js +1 -0
- package/dist/client/assets/collection-table-wrapper-DIbesVyO.js +1 -0
- package/dist/client/assets/collection-tabs-DSThe4TZ.js +1 -0
- package/dist/client/assets/command-CuDo8_GW.js +1 -0
- package/dist/client/assets/connect-Dg03rIYV.js +1 -0
- package/dist/client/assets/connection-card-BdJz7ukQ.js +1 -0
- package/dist/client/assets/connection-detail-jgh_EmLL.js +1 -0
- package/dist/client/assets/connections-roV0pn7n.js +1 -0
- package/dist/client/assets/{constants-DLL8NriC.js → constants-BF_fvAn_.js} +1 -1
- package/dist/client/assets/constants-DUoC8L5w.js +1 -0
- package/dist/client/assets/{create-organization-dialog-KlMp4qjX.js → create-organization-dialog-DPv196Km.js} +1 -1
- package/dist/client/assets/create-project-dialog-2_Pd_aSh.js +1 -0
- package/dist/client/assets/dialog-QALiZUqS.js +1 -0
- package/dist/client/assets/dropdown-menu-BLDCY1bL.js +1 -0
- package/dist/client/assets/dynamic-plugin-layout-BAUs-04R.js +1 -0
- package/dist/client/assets/empty-state-CeiZxNhi.js +1 -0
- package/dist/client/assets/empty-state-Dk2L_oED.js +1 -0
- package/dist/client/assets/{env-vars-editor-C9cKLeQr.js → env-vars-editor-C-ecvZjs.js} +1 -1
- package/dist/client/assets/{error-boundary-DEpo81VO.js → error-boundary-BlQFrpbk.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DqOBaFRo.js → extract-connection-data-BsEN7v48.js} +1 -1
- package/dist/client/assets/file-browser-BEOrBYII.js +2 -0
- package/dist/client/assets/form-CbWGUyQf.js +1 -0
- package/dist/client/assets/format-time-CMKyl-GC.js +1 -0
- package/dist/client/assets/grid-view-wsw1RDPg.js +1 -0
- package/dist/client/assets/home-CWU0nrDB.js +1 -0
- package/dist/client/assets/index-BXpaQTBX.js +25 -0
- package/dist/client/assets/{index-1FNA2NMp.js → index-BidPkBMC.js} +1 -1
- package/dist/client/assets/{index-CDSE7RqG.js → index-Bu-mgyhF.js} +1 -1
- package/dist/client/assets/{index-NCAPotMz.js → index-CGEiLVgM.js} +1 -1
- package/dist/client/assets/{index-CbNc0YVi.js → index-Cc2Q-hXW.js} +1 -1
- package/dist/client/assets/{index-DSuycUKc.js → index-CfNE8P8f.js} +95 -95
- package/dist/client/assets/index-CwsYRpNw.css +1 -0
- package/dist/client/assets/{index-9O2flk3F.js → index-DDYx0w19.js} +1 -1
- package/dist/client/assets/index-DHPVwvvK.js +1 -0
- package/dist/client/assets/{index-BP5xHVRF.js → index-DUWyEHsq.js} +3 -3
- package/dist/client/assets/{infiniteQueryObserver-DFgsWYE3.js → infiniteQueryObserver-B0EWimPZ.js} +1 -1
- package/dist/client/assets/input-DIsbo1lI.js +1 -0
- package/dist/client/assets/integration-icon-DcCARkam.js +1 -0
- package/dist/client/assets/label-CP_MZF-0.js +1 -0
- package/dist/client/assets/{layout-BhJZaZF8.js → layout-0JlcWnLI.js} +1 -1
- package/dist/client/assets/{localstorage-keys-uz6xAIc7.js → localstorage-keys-R4XNPXwy.js} +1 -1
- package/dist/client/assets/login-_PPABhsV.js +1 -0
- package/dist/client/assets/{mcp-oauth-BSElItdx.js → mcp-oauth-BWHYGXC1.js} +1 -1
- package/dist/client/assets/mcp-server-card-cX2Tejap.js +1 -0
- package/dist/client/assets/mcp-server-detail-B28ZtBkh.js +2 -0
- package/dist/client/assets/members-DJOwIKYx.js +3 -0
- package/dist/client/assets/{monaco-editor-ISS3tjaj.js → monaco-editor-D_GBjMj0.js} +1 -1
- package/dist/client/assets/{monitoring-DwKvPUfp.js → monitoring-BNLqQvTt.js} +5 -5
- package/dist/client/assets/{oauth-callback-DkWmsnwk.js → oauth-callback-EdySGBJH.js} +1 -1
- package/dist/client/assets/page-C4vj3JO0.js +1 -0
- package/dist/client/assets/page-a94myL5U.js +1 -0
- package/dist/client/assets/{plugin-empty-state-BlvwQjtt.js → plugin-empty-state-nEolcCXS.js} +1 -1
- package/dist/client/assets/{plugin-header-CMMjHqBI.js → plugin-header-DE4En7D8.js} +1 -1
- package/dist/client/assets/popover-gPOnk7wt.js +1 -0
- package/dist/client/assets/project-layout-D32bBhDN.js +1 -0
- package/dist/client/assets/project-settings-BHpZshG9.js +1 -0
- package/dist/client/assets/projects-list-CwEp-lb0.js +1 -0
- package/dist/client/assets/{registry-utils-tzXl-1LP.js → registry-utils-D7Rmthqt.js} +1 -1
- package/dist/client/assets/resizable-6Lb0xMt4.js +1 -0
- package/dist/client/assets/select-BggQZ1Tx.js +1 -0
- package/dist/client/assets/shell-layout-CzYvgeZY.js +12 -0
- package/dist/client/assets/spinner-B_SBvaLu.js +1 -0
- package/dist/client/assets/{store-invite-Cg6GDp3D.js → store-invite-DLhQlLoS.js} +1 -1
- package/dist/client/assets/switch-D6vw18Yw.js +1 -0
- package/dist/client/assets/table-Do6WMe3W.js +1 -0
- package/dist/client/assets/tasks-Bq2Pr-RR.js +1 -0
- package/dist/client/assets/textarea-oHVaqxcw.js +1 -0
- package/dist/client/assets/{tools-list-BB-J8w9I.js → tools-list-CNOFWqOv.js} +1 -1
- package/dist/client/assets/{topbar-portal-YDFUK5ME.js → topbar-portal-req43WDK.js} +1 -1
- package/dist/client/assets/typewriter-title-CPAQ-LAN.js +16 -0
- package/dist/client/assets/{use-binding-eVzJ84ZZ.js → use-binding-Ci-Bobgy.js} +1 -1
- package/dist/client/assets/{use-connection-Dr483fc2.js → use-connection-DQ_s0J7q.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BMMjVvtG.js → use-create-virtual-mcp-dFxVUcUv.js} +1 -1
- package/dist/client/assets/use-deco-chat-open-Dt7HPs70.js +23 -0
- package/dist/client/assets/{use-install-from-registry-D-uRqpkm.js → use-install-from-registry-BwMZfHES.js} +1 -1
- package/dist/client/assets/use-list-state-B1GDSVRC.js +1 -0
- package/dist/client/assets/{use-llm-DMxQiXS5.js → use-llm-BQiFzTFE.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-n2y1aXdw.js → use-mcp-prompts-DW8bdyVk.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-D5uKhZdh.js → use-mcp-tools-CyxMU-U3.js} +1 -1
- package/dist/client/assets/{use-mobile-BG01tXEp.js → use-mobile-CwW2OqhO.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BOgqOHG5.js → use-organization-settings-DR0xAoRU.js} +1 -1
- package/dist/client/assets/{use-project-BXCfG1rp.js → use-project-D6K-Qkve.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BKDa8fdJ.js → use-virtual-mcp-YuqZrZuH.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DeQegkYt.js +1 -0
- package/dist/client/assets/{useMutation-xI92doIX.js → useMutation-CMum5GhU.js} +1 -1
- package/dist/client/assets/useQuery-BCcnZLQc.js +1 -0
- package/dist/client/assets/view-mode-toggle-4KKEmX6-.js +1 -0
- package/dist/client/assets/workflow-Dymxh2Yh.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +196 -250
- package/dist/server/migrate.js +150 -150
- package/dist/server/server.js +169 -223
- package/package.json +1 -1
- package/dist/client/assets/agent-connections-preview-CRroINZQ.js +0 -1
- package/dist/client/assets/agent-detail-Cd2Rwbj4.js +0 -1
- package/dist/client/assets/agents-CZXDFdz9.js +0 -1
- package/dist/client/assets/avatar-DQriEO9g.js +0 -1
- package/dist/client/assets/badge-c1ZDS4lj.js +0 -1
- package/dist/client/assets/breadcrumb--xT5xhrI.js +0 -1
- package/dist/client/assets/button-CaHjtgMH.js +0 -1
- package/dist/client/assets/card-188R77No.js +0 -1
- package/dist/client/assets/checkbox-BAAj2fcH.js +0 -1
- package/dist/client/assets/collection-search-HoWi-uQh.js +0 -1
- package/dist/client/assets/collection-tab-LmXN6j57.js +0 -1
- package/dist/client/assets/collection-table-wrapper-8d_2ogD8.js +0 -1
- package/dist/client/assets/collection-tabs-BgX62hK_.js +0 -1
- package/dist/client/assets/command-acDiQnsv.js +0 -1
- package/dist/client/assets/connect-DHfoqZeq.js +0 -1
- package/dist/client/assets/connection-card-Bvx5R369.js +0 -1
- package/dist/client/assets/connection-detail-BJZN3Ku4.js +0 -1
- package/dist/client/assets/connections-h5stFQau.js +0 -1
- package/dist/client/assets/constants-Dbui3Xcr.js +0 -1
- package/dist/client/assets/create-project-dialog-B3qmL-St.js +0 -1
- package/dist/client/assets/dialog-Je7S_n4B.js +0 -1
- package/dist/client/assets/dropdown-menu-6ZQ-yg3S.js +0 -1
- package/dist/client/assets/dynamic-plugin-layout-CizeXBED.js +0 -1
- package/dist/client/assets/empty-state-Cglctsv2.js +0 -1
- package/dist/client/assets/empty-state-DuUoirVq.js +0 -1
- package/dist/client/assets/file-browser-CVJSKTZS.js +0 -2
- package/dist/client/assets/form-eIVV-J09.js +0 -1
- package/dist/client/assets/grid-view-Cr52HZSj.js +0 -1
- package/dist/client/assets/home-CTqFE2fy.js +0 -1
- package/dist/client/assets/index-BEdPWc-P.css +0 -1
- package/dist/client/assets/index-DdE2vL1_.js +0 -1
- package/dist/client/assets/index-_A3ax9us.js +0 -25
- package/dist/client/assets/input-BYKrnlY1.js +0 -1
- package/dist/client/assets/integration-icon-Y1ojuvRD.js +0 -1
- package/dist/client/assets/label-CUkyLZ_S.js +0 -1
- package/dist/client/assets/login-BTG1UHZ2.js +0 -1
- package/dist/client/assets/mcp-server-card-Dj8YPxHe.js +0 -1
- package/dist/client/assets/mcp-server-detail-Bq02ivSO.js +0 -2
- package/dist/client/assets/members-DkmO8hoH.js +0 -3
- package/dist/client/assets/page-0NtxB3kF.js +0 -1
- package/dist/client/assets/page-DHvXJfyM.js +0 -1
- package/dist/client/assets/popover-0PZkfvQx.js +0 -1
- package/dist/client/assets/project-layout-DrtrZXRE.js +0 -1
- package/dist/client/assets/project-settings-D1POFx5m.js +0 -1
- package/dist/client/assets/projects-list-WIBXwQbi.js +0 -1
- package/dist/client/assets/resizable-1OTgE7WS.js +0 -1
- package/dist/client/assets/select-C3cCqPPl.js +0 -1
- package/dist/client/assets/shell-layout-Cba6DBEb.js +0 -12
- package/dist/client/assets/spinner-C93Wqcgz.js +0 -1
- package/dist/client/assets/switch-D1hmikqH.js +0 -1
- package/dist/client/assets/table-I9cwN_fJ.js +0 -1
- package/dist/client/assets/tasks-B_6Mkgqa.js +0 -1
- package/dist/client/assets/textarea-DQKbZOJF.js +0 -1
- package/dist/client/assets/typewriter-title-NPqFp9ey.js +0 -16
- package/dist/client/assets/use-deco-chat-open-DDkpn4wX.js +0 -23
- package/dist/client/assets/use-list-state-Crb7X_KW.js +0 -1
- package/dist/client/assets/useInfiniteQuery-B5e3lO4h.js +0 -1
- package/dist/client/assets/useQuery-DLTRHzuH.js +0 -1
- package/dist/client/assets/utils-NsYXf4VI.js +0 -1
- package/dist/client/assets/view-mode-toggle-CJh4RBXl.js +0 -1
- package/dist/client/assets/workflow-BRGJkOOc.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as H,u as W,z as X,O as Y,h as oe,k as ae,j as s,o as ce,s as G,K as U,t as R,r as q,aN as te,bp as ue,m as de,g as ge}from"./index-BP5xHVRF.js";import{P as Z}from"./index-DdE2vL1_.js";import{B as fe,a as pe,b as he,c as xe}from"./breadcrumb--xT5xhrI.js";import{u as ee}from"./useMutation-xI92doIX.js";import{a as ie,u as re}from"./constants-DLL8NriC.js";import{B as L}from"./button-CaHjtgMH.js";import{I as V}from"./input-BYKrnlY1.js";import{T as je}from"./textarea-DQKbZOJF.js";import{F as Q,d as M,a as me,b as $,c as K,e as se,f as J}from"./form-eIVV-J09.js";import{u as be}from"./useQuery-DLTRHzuH.js";import{S as ye}from"./switch-D1hmikqH.js";import{L as ve}from"./label-CUkyLZ_S.js";import{h as Ne}from"./use-connection-Dr483fc2.js";import{a as Ce,c as Se}from"./use-binding-eVzJ84ZZ.js";import{u as Pe}from"./use-install-from-registry-D-uRqpkm.js";import{i as we}from"./Loading01-MSLql51R.js";import{s as Ie}from"./Plus-cL6uctg7.js";import{S as Ee,a as Fe,b as De,c as _e,d as le}from"./select-C3cCqPPl.js";import{c as Oe}from"./utils-NsYXf4VI.js";import{i as Te}from"./Upload01-CizOzq5O.js";import{i as Ae}from"./X-DpveZ1aP.js";import{c as ze,h as Be,d as ke,b as Re,A as Le,e as Ue,g as qe,a as Me,f as $e}from"./alert-dialog-CEzvbVBM.js";import"./ChevronRight-C9SvVl2H.js";import"./binder-Bq3_4LhY.js";import"./extract-connection-data-DqOBaFRo.js";import"./constants-Dbui3Xcr.js";import"./github-icon-Dp3wHhYE.js";import"./registry-utils-tzXl-1LP.js";import"./generate-id-Dyweu44Y.js";import"./index-1FNA2NMp.js";import"./Check-B7tiH-XX.js";import"./ChevronDown-4fM-ZApw.js";const Ke=ce({name:G().min(1,"Name is required").max(200,"Name is too long"),description:G().max(1e3,"Description is too long").nullable()});function Ge(){const e=H.c(58),{org:t,project:i}=W(),o=X(),d=i.slug===Y;let g;e[0]!==t.id?(g={connectionId:ie,orgId:t.id},e[0]=t.id,e[1]=g):g=e[1];const u=re(g);let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=oe(Ke),e[2]=x):x=e[2];const j=i.name??"",b=i.description??"";let a;e[3]!==j||e[4]!==b?(a={resolver:x,values:{name:j,description:b}},e[3]=j,e[4]=b,e[5]=a):a=e[5];const c=ae(a);let f;e[6]!==u||e[7]!==i.id?(f=async B=>{const _=await u.callTool({name:"PROJECT_UPDATE",arguments:{projectId:i.id,name:B.name,description:B.description||null}});return _.structuredContent??_},e[6]=u,e[7]=i.id,e[8]=f):f=e[8];let p;e[9]!==c||e[10]!==t.id||e[11]!==i.slug||e[12]!==o?(p=()=>{o.invalidateQueries({queryKey:U.project(t.id,i.slug)}),o.invalidateQueries({queryKey:U.projects(t.id)}),R.success("Project updated successfully"),c.reset(c.getValues())},e[9]=c,e[10]=t.id,e[11]=i.slug,e[12]=o,e[13]=p):p=e[13];let w;e[14]!==f||e[15]!==p?(w={mutationFn:f,onSuccess:p,onError:Qe},e[14]=f,e[15]=p,e[16]=w):w=e[16];const m=ee(w);let y;e[17]!==m?(y=async B=>{await m.mutateAsync(B)},e[17]=m,e[18]=y):y=e[18];const P=y,C=c.formState.isDirty;let I;e[19]!==c||e[20]!==P?(I=c.handleSubmit(P),e[19]=c,e[20]=P,e[21]=I):I=e[21];let S;e[22]!==d||e[23]!==m.isPending?(S=B=>{const{field:_}=B;return s.jsxs($,{children:[s.jsx(K,{children:"Project Name"}),s.jsx(M,{children:s.jsx(V,{placeholder:"My Project",..._,disabled:d||m.isPending})}),d&&s.jsx(se,{children:"The organization admin project name cannot be changed."}),s.jsx(J,{})]})},e[22]=d,e[23]=m.isPending,e[24]=S):S=e[24];let n;e[25]!==c.control||e[26]!==S?(n=s.jsx(Q,{control:c.control,name:"name",render:S}),e[25]=c.control,e[26]=S,e[27]=n):n=e[27];let r;e[28]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(K,{children:"Slug"}),e[28]=r):r=e[28];let l;e[29]!==i.slug?(l=s.jsx(M,{children:s.jsx(V,{value:i.slug,disabled:!0,className:"bg-muted"})}),e[29]=i.slug,e[30]=l):l=e[30];let h;e[31]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(se,{children:"The project slug cannot be changed after creation."}),e[31]=h):h=e[31];let v;e[32]!==l?(v=s.jsxs($,{children:[r,l,h]}),e[32]=l,e[33]=v):v=e[33];let N;e[34]!==m.isPending?(N=B=>{const{field:_}=B;return s.jsxs($,{children:[s.jsx(K,{children:"Description"}),s.jsx(M,{children:s.jsx(je,{placeholder:"Optional project description...",rows:3,..._,value:_.value??"",disabled:m.isPending})}),s.jsx(J,{})]})},e[34]=m.isPending,e[35]=N):N=e[35];let F;e[36]!==c.control||e[37]!==N?(F=s.jsx(Q,{control:c.control,name:"description",render:N}),e[36]=c.control,e[37]=N,e[38]=F):F=e[38];const O=!C||m.isPending,T=m.isPending?"Saving...":"Save Changes";let D;e[39]!==O||e[40]!==T?(D=s.jsx(L,{type:"submit",disabled:O,className:"min-w-24",children:T}),e[39]=O,e[40]=T,e[41]=D):D=e[41];let A;e[42]!==c||e[43]!==C||e[44]!==m.isPending?(A=C&&s.jsx(L,{type:"button",variant:"outline",onClick:()=>c.reset(),disabled:m.isPending,children:"Cancel"}),e[42]=c,e[43]=C,e[44]=m.isPending,e[45]=A):A=e[45];let z;e[46]!==D||e[47]!==A?(z=s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[D,A]}),e[46]=D,e[47]=A,e[48]=z):z=e[48];let E;e[49]!==n||e[50]!==v||e[51]!==F||e[52]!==z||e[53]!==I?(E=s.jsxs("form",{onSubmit:I,className:"space-y-6",children:[n,v,F,z]}),e[49]=n,e[50]=v,e[51]=F,e[52]=z,e[53]=I,e[54]=E):E=e[54];let k;return e[55]!==c||e[56]!==E?(k=s.jsx(me,{...c,children:E}),e[55]=c,e[56]=E,e[57]=k):k=e[57],k}function Qe(e){R.error("Failed to update project: "+(e instanceof Error?e.message:"Unknown error"))}function Je({value:e,onValueChange:t,placeholder:i="Select a connection...",binding:o,bindingType:d,onAddNew:g,className:u,disabled:x=!1}){const[j,b]=q.useState(!1),{installByBinding:a,isInstalling:c}=Pe(),f=j||c,p=Ne(),w=Ce({connections:p,binding:typeof o=="string"?o:void 0}),m=!o||!p?p??[]:typeof o=="string"?w:Array.isArray(o)&&o.length>0?p.filter(n=>Se(n,o)):p,y=(()=>{if(!d?.startsWith("@"))return null;const[n,r]=d.replace("@","").split("/");return n&&r?{scope:n,appName:r}:null})(),P=(()=>{let n=m;const r=Array.isArray(o)&&o.length>0;if(y&&!r&&(n=n.filter(l=>{const h=l.app_name,v=l.metadata?.scopeName;return h===y.appName&&v===y.scope})),e&&!n.some(l=>l.id===e)){const l=p?.find(h=>h.id===e);if(l)return[l,...n]}return n})(),C=d?.startsWith("@"),I=async()=>{if(C&&d){b(!0);try{const n=await a(d);n&&t(n.id)}finally{b(!1)}return}g?.()},S=P.find(n=>n.id===e);return s.jsxs(Ee,{value:e??"none",onValueChange:n=>t(n==="none"?null:n),disabled:x,children:[s.jsx(Fe,{size:"sm",className:Oe("w-[200px]",u),children:s.jsx(De,{placeholder:i,children:S?s.jsxs("div",{className:"flex items-center gap-2",children:[S.icon?s.jsx("img",{src:S.icon,alt:S.title,className:"w-4 h-4 rounded shrink-0"}):s.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary shrink-0",children:S.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"truncate",children:S.title})]}):i})}),s.jsxs(_e,{children:[s.jsx(le,{value:"none",children:"No connection"}),P.length===0?s.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No compatible connections found"}):P.map(n=>s.jsx(le,{value:n.id,children:s.jsxs("div",{className:"flex items-center gap-2",children:[n.icon?s.jsx("img",{src:n.icon,alt:n.title,className:"w-4 h-4 rounded"}):s.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:n.title.slice(0,1).toUpperCase()}),s.jsx("span",{children:n.title})]})},n.id)),(g||C)&&s.jsx("div",{className:"border-t border-border",children:s.jsx(L,{onPointerDown:n=>n.stopPropagation(),onClick:n=>{n.preventDefault(),n.stopPropagation(),I()},disabled:f||x,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:f?s.jsxs(s.Fragment,{children:[s.jsx(we,{size:16,className:"animate-spin"}),s.jsx("span",{children:"Connecting..."})]}):s.jsxs(s.Fragment,{children:[s.jsx(Ie,{size:16}),s.jsx("span",{children:"Add Connection"})]})})})]})]})}const Ve=e=>{if(!e||typeof e!="object")return!1;const t=e;return t.type==="text"&&typeof t.text=="string"&&t.text.trim().toLowerCase().startsWith("error")},ne=e=>{const t=e.structuredContent??e,i=t&&typeof t=="object"?t:null,o=i?.content?.[0]?.text&&typeof i.content[0].text=="string"?i.content[0].text:null;if(i?.isError)throw new Error(o??"Tool call failed");if(Ve(t))throw new Error(t.text);return t};function He(e){return e.requiresMcpBinding===!0?!0:e.binding!==void 0}function We(e){const t=H.c(48),{plugin:i,isEnabled:o,isSaving:d,pendingBinding:g,description:u,label:x,icon:j,projectId:b,client:a,onBindingChange:c,onToggle:f}=e;let p;t[0]!==i?(p=He(i),t[0]=i,t[1]=p):p=t[1];const w=p;let m;t[2]!==i.id||t[3]!==b?(m=U.projectPluginConfig(b??"",i.id),t[2]=i.id,t[3]=b,t[4]=m):m=t[4];let y;t[5]!==a||t[6]!==i.id||t[7]!==b?(y=async()=>{if(!b)throw new Error("Project ID is required to load plugin config.");const E=await a.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:b,pluginId:i.id}});return ne(E)},t[5]=a,t[6]=i.id,t[7]=b,t[8]=y):y=t[8];const P=!!b&&w;let C;t[9]!==m||t[10]!==y||t[11]!==P?(C={queryKey:m,queryFn:y,enabled:P},t[9]=m,t[10]=y,t[11]=P,t[12]=C):C=t[12];const{data:I,isLoading:S}=be(C),n=I?.config?.connectionId??null,r=g!==void 0?g:n;let l;t[13]!==j?(l=j&&s.jsx("div",{className:"flex-shrink-0 text-muted-foreground [&>svg]:size-4",children:j}),t[13]=j,t[14]=l):l=t[14];let h;t[15]!==x?(h=s.jsx("div",{className:"text-sm font-medium text-foreground",children:x}),t[15]=x,t[16]=h):h=t[16];let v;t[17]!==u?(v=u&&s.jsx("p",{className:"text-xs text-muted-foreground",children:u}),t[17]=u,t[18]=v):v=t[18];let N;t[19]!==h||t[20]!==v?(N=s.jsxs("div",{className:"min-w-0",children:[h,v]}),t[19]=h,t[20]=v,t[21]=N):N=t[21];let F;t[22]!==l||t[23]!==N?(F=s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[l,N]}),t[22]=l,t[23]=N,t[24]=F):F=t[24];let O;t[25]!==f||t[26]!==i.id?(O=E=>f(i.id,E),t[25]=f,t[26]=i.id,t[27]=O):O=t[27];let T;t[28]!==o||t[29]!==d||t[30]!==O?(T=s.jsx(ye,{checked:o,onCheckedChange:O,disabled:d}),t[28]=o,t[29]=d,t[30]=O,t[31]=T):T=t[31];let D;t[32]!==F||t[33]!==T?(D=s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[F,T]}),t[32]=F,t[33]=T,t[34]=D):D=t[34];let A;t[35]!==S||t[36]!==o||t[37]!==d||t[38]!==w||t[39]!==c||t[40]!==i.binding||t[41]!==i.id||t[42]!==r||t[43]!==n?(A=o&&w&&s.jsxs("div",{className:"mt-3 pl-7 flex items-center gap-3",children:[s.jsx(ve,{className:"text-xs text-muted-foreground w-24",children:"Connection"}),s.jsx(Je,{value:r??null,onValueChange:E=>c(i.id,E,n),binding:i.binding,placeholder:"Select connection...",className:"w-56",disabled:d||S})]}),t[35]=S,t[36]=o,t[37]=d,t[38]=w,t[39]=c,t[40]=i.binding,t[41]=i.id,t[42]=r,t[43]=n,t[44]=A):A=t[44];let z;return t[45]!==D||t[46]!==A?(z=s.jsxs("div",{className:"py-3",children:[D,A]}),t[45]=D,t[46]=A,t[47]=z):z=t[47],z}function Ze(){const{org:e,project:t}=W(),i=X(),o=re({connectionId:ie,orgId:e.id}),[d,g]=q.useState({}),[u,x]=q.useState({}),[j,b]=q.useState(!1),a=t.enabledPlugins??[],c=n=>{const r=d[n];return r!==void 0?r:a.includes(n)},f=()=>{const n=new Set(a);for(const[r,l]of Object.entries(d))l?n.add(r):n.delete(r);return Array.from(n)},p=Object.keys(d).length>0||Object.keys(u).length>0,w=(n,r)=>{const l=a.includes(n);g(r===l?h=>{const{[n]:v,...N}=h;return N}:h=>({...h,[n]:r}))},m=(n,r,l)=>{if(r===l){x(h=>{const{[n]:v,...N}=h;return N});return}x(h=>({...h,[n]:r}))},y=ee({mutationFn:async n=>{const r=[];if(n.updatePlugins){const l=await o.callTool({name:"PROJECT_UPDATE",arguments:{projectId:t.id,enabledPlugins:n.enabledPlugins}});r.push(ne(l))}if(n.bindingUpdates.length>0){const l=await Promise.all(n.bindingUpdates.map(async({pluginId:h,connectionId:v})=>{const N=await o.callTool({name:"PROJECT_PLUGIN_CONFIG_UPDATE",arguments:{projectId:t.id,pluginId:h,connectionId:v}});return ne(N)}));r.push(...l)}return r},onSuccess:(n,r)=>{r.updatePlugins&&(i.invalidateQueries({queryKey:U.project(e.id,t.slug)}),i.invalidateQueries({queryKey:U.projects(e.id)})),r.bindingUpdates.forEach(({pluginId:l})=>{i.invalidateQueries({queryKey:U.projectPluginConfig(t.id??"",l)})}),g({}),x({}),R.success("Plugins updated successfully")},onError:n=>{R.error("Failed to update plugins: "+(n instanceof Error?n.message:"Unknown error"))},onSettled:()=>{b(!1)}}),P=()=>{b(!0),y.mutate({enabledPlugins:f(),updatePlugins:Object.keys(d).length>0,bindingUpdates:Object.entries(u).map(([n,r])=>({pluginId:n,connectionId:r}))})},C=()=>{g({}),x({})},I=n=>ue.find(r=>r.pluginId===n),S=n=>te.find(l=>l.id===n)?.description??null;return te.length===0?s.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}):s.jsxs("div",{className:"space-y-4",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Enable or disable plugins for this project. Enabled plugins will appear in the sidebar."}),s.jsx("div",{className:"divide-y divide-border border-y border-border",children:te.map(n=>{const r=I(n.id),l=S(n.id),h=c(n.id);return s.jsx(We,{plugin:n,isEnabled:h,isSaving:j,pendingBinding:u[n.id],description:l,label:r?.label??n.id,icon:r?.icon,projectId:t.id,client:o,onBindingChange:m,onToggle:w},n.id)})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(L,{variant:"outline",onClick:C,disabled:!p||j,children:"Cancel"}),s.jsx(L,{onClick:P,disabled:!p||j,className:"min-w-24",children:j?"Saving...":"Save Changes"})]})]})}const Ye=ce({name:G().min(1,"Name is required").max(255,"Name is too long"),slug:G().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:G().optional()});function Xe(e){const t=H.c(24),{value:i,onChange:o,name:d}=e,g=q.useRef(null);let u;t[0]!==o?(u=S=>{const n=S.target.files?.[0];if(n){if(n.size>2097152){R.error("Image must be smaller than 2MB");return}const r=new FileReader;r.onerror=()=>{const l=r.error;console.error("FileReader error:",l),R.error(l?.message||"Failed to read image file. Please try again."),g.current&&(g.current.value="")},r.onloadend=()=>{if(r.readyState===FileReader.DONE&&r.result){const l=r.result;o(l)}},r.readAsDataURL(n)}},t[0]=o,t[1]=u):u=t[1];const x=u;let j;t[2]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{g.current?.click()},t[2]=j):j=t[2];const b=j;let a;t[3]!==o?(a=S=>{S.stopPropagation(),o("")},t[3]=o,t[4]=a):a=t[4];const c=a;let f;t[5]!==x?(f=s.jsx("input",{type:"file",ref:g,className:"hidden",accept:"image/*",onChange:x}),t[5]=x,t[6]=f):f=t[6];let p;t[7]!==c||t[8]!==d||t[9]!==i?(p=i?s.jsxs("div",{className:"relative group",children:[s.jsx("div",{className:"h-20 w-20 rounded-lg border border-border bg-muted/20 overflow-hidden",children:s.jsx("img",{src:i,alt:d||"Organization logo",className:"w-full h-full object-cover"})}),s.jsx("button",{type:"button",onClick:c,className:"absolute -top-2 -right-2 h-6 w-6 rounded-full bg-destructive text-destructive-foreground opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:s.jsx(Ae,{className:"h-3 w-3"})})]}):s.jsxs("button",{type:"button",onClick:b,className:"h-20 w-20 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent/50 transition-colors flex flex-col items-center justify-center gap-1 text-muted-foreground hover:text-foreground",children:[s.jsx(Te,{className:"h-5 w-5"}),s.jsx("span",{className:"text-xs",children:"Upload"})]}),t[7]=c,t[8]=d,t[9]=i,t[10]=p):p=t[10];const w=i?"Change Logo":"Upload Logo";let m;t[11]!==w?(m=s.jsx(L,{type:"button",variant:"outline",size:"sm",onClick:b,className:"mb-2",children:w}),t[11]=w,t[12]=m):m=t[12];let y;t[13]!==c||t[14]!==i?(y=i&&s.jsx(L,{type:"button",variant:"ghost",size:"sm",onClick:c,className:"ml-2",children:"Remove"}),t[13]=c,t[14]=i,t[15]=y):y=t[15];let P;t[16]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),t[16]=P):P=t[16];let C;t[17]!==m||t[18]!==y?(C=s.jsxs("div",{className:"flex-1",children:[m,y,P]}),t[17]=m,t[18]=y,t[19]=C):C=t[19];let I;return t[20]!==C||t[21]!==f||t[22]!==p?(I=s.jsxs("div",{className:"flex items-start gap-4",children:[f,p,C]}),t[20]=C,t[21]=f,t[22]=p,t[23]=I):I=t[23],I}function et(){const e=de(),{org:t,project:i}=W(),o=X(),[d,g]=q.useState(!1),u=ae({resolver:oe(Ye),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),x=ee({mutationFn:async a=>{const c={name:a.name,slug:a.slug};a.logo&&(c.logo=a.logo);const f=await ge.organization.update({organizationId:t.id,data:c});if(f?.error)throw new Error(f.error.message||"Failed to update organization");return f},onSuccess:a=>{o.invalidateQueries({queryKey:U.organizations()}),o.invalidateQueries({queryKey:U.activeOrganization(t.slug)}),R.success("Organization settings updated successfully"),a?.data?.slug&&a.data.slug!==t.slug&&e({to:"/$org/$project/settings",params:{org:a.data.slug,project:i.slug}})},onError:a=>{R.error(a instanceof Error?a.message:"Failed to update organization")},onSettled:()=>{g(!1)}}),j=a=>{g(!0),x.mutate(a)},b=u.formState.isDirty;return s.jsx(me,{...u,children:s.jsxs("form",{onSubmit:u.handleSubmit(j),className:"space-y-6",children:[s.jsx(Q,{control:u.control,name:"name",render:({field:a})=>s.jsxs($,{children:[s.jsx(K,{children:"Organization Name"}),s.jsx(M,{children:s.jsx(V,{placeholder:"My Organization",...a,disabled:d})}),s.jsx(J,{})]})}),s.jsx(Q,{control:u.control,name:"slug",render:({field:a})=>s.jsxs($,{children:[s.jsx(K,{children:"Organization Slug"}),s.jsx(M,{children:s.jsx(V,{placeholder:"my-organization",...a,disabled:d,onChange:c=>{const f=c.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");a.onChange(f)}})}),s.jsx(se,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(J,{})]})}),s.jsx(Q,{control:u.control,name:"logo",render:({field:a})=>s.jsxs($,{children:[s.jsx(K,{children:"Logo"}),s.jsx(M,{children:s.jsx(Xe,{value:a.value,onChange:a.onChange,name:u.watch("name")})}),s.jsx(J,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(L,{type:"submit",disabled:!b||d,className:"min-w-24",children:d?"Saving...":"Save Changes"}),b&&s.jsx(L,{type:"button",variant:"outline",onClick:()=>u.reset(),disabled:d,children:"Cancel"})]})]})})}function tt(){const e=H.c(44),{org:t,project:i}=W(),o=de(),d=X(),[g,u]=q.useState(""),[x,j]=q.useState(!1),b=i.slug===Y;let a;e[0]!==t.id?(a={connectionId:ie,orgId:t.id},e[0]=t.id,e[1]=a):a=e[1];const c=re(a);let f;e[2]!==c||e[3]!==i.id?(f=async()=>{const _=await c.callTool({name:"PROJECT_DELETE",arguments:{projectId:i.id}});return _.structuredContent??_},e[2]=c,e[3]=i.id,e[4]=f):f=e[4];let p;e[5]!==o||e[6]!==t.id||e[7]!==t.slug||e[8]!==d?(p=_=>{_.success?(d.invalidateQueries({queryKey:U.projects(t.id)}),R.success("Project deleted"),o({to:"/$org/$project",params:{org:t.slug,project:Y}})):R.error(_.message??"Failed to delete project")},e[5]=o,e[6]=t.id,e[7]=t.slug,e[8]=d,e[9]=p):p=e[9];let w;e[10]!==f||e[11]!==p?(w={mutationFn:f,onSuccess:p,onError:st},e[10]=f,e[11]=p,e[12]=w):w=e[12];const m=ee(w);if(b)return null;const y=g===i.name;let P;e[13]!==m?(P=()=>{m.mutate()},e[13]=m,e[14]=P):P=e[14];const C=P;let I;e[15]===Symbol.for("react.memo_cache_sentinel")?(I=_=>{j(_),_||u("")},e[15]=I):I=e[15];const S=I;let n;e[16]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-destructive",children:"Danger Zone"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Irreversible and destructive actions."})]}),e[16]=n):n=e[16];let r;e[17]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Be,{asChild:!0,children:s.jsx(L,{variant:"destructive",children:"Delete Project"})}),e[17]=r):r=e[17];let l;e[18]!==i.name?(l=s.jsxs(ze,{children:['Delete "',i.name,'"?']}),e[18]=i.name,e[19]=l):l=e[19];let h;e[20]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ke,{children:"This action cannot be undone. All project data will be permanently deleted."}),e[20]=h):h=e[20];let v;e[21]!==l?(v=s.jsxs(Re,{children:[l,h]}),e[21]=l,e[22]=v):v=e[22];let N;e[23]!==i.name?(N=s.jsxs("p",{className:"text-sm mb-2",children:["Type ",s.jsx("strong",{children:i.name})," to confirm:"]}),e[23]=i.name,e[24]=N):N=e[24];let F;e[25]===Symbol.for("react.memo_cache_sentinel")?(F=_=>u(_.target.value),e[25]=F):F=e[25];let O;e[26]!==g||e[27]!==i.name?(O=s.jsx(V,{value:g,onChange:F,placeholder:i.name}),e[26]=g,e[27]=i.name,e[28]=O):O=e[28];let T;e[29]!==N||e[30]!==O?(T=s.jsxs("div",{className:"py-4",children:[N,O]}),e[29]=N,e[30]=O,e[31]=T):T=e[31];let D;e[32]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Le,{children:"Cancel"}),e[32]=D):D=e[32];const A=!y||m.isPending,z=m.isPending?"Deleting...":"Delete Project";let E;e[33]!==C||e[34]!==A||e[35]!==z?(E=s.jsxs(Ue,{children:[D,s.jsx(qe,{onClick:C,disabled:A,className:"bg-destructive hover:bg-destructive/90 text-destructive-foreground",children:z})]}),e[33]=C,e[34]=A,e[35]=z,e[36]=E):E=e[36];let k;e[37]!==v||e[38]!==T||e[39]!==E?(k=s.jsxs(Me,{children:[v,T,E]}),e[37]=v,e[38]=T,e[39]=E,e[40]=k):k=e[40];let B;return e[41]!==x||e[42]!==k?(B=s.jsxs("div",{className:"border border-destructive/50 rounded-lg p-4 space-y-4",children:[n,s.jsxs($e,{open:x,onOpenChange:S,children:[r,k]})]}),e[41]=x,e[42]=k,e[43]=B):B=e[43],B}function st(e){R.error("Failed to delete project: "+(e instanceof Error?e.message:"Unknown error"))}function zt(){const e=H.c(10),{project:t}=W(),i=t.slug===Y;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Z.Header,{children:s.jsx(Z.Header.Left,{children:s.jsx(fe,{children:s.jsx(pe,{children:s.jsx(he,{children:s.jsx(xe,{children:"Settings"})})})})})}),e[0]=o):o=e[0];let d;e[1]!==i?(d=i&&s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Organization"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Update your organization's name, slug, and logo."})]}),s.jsx(et,{})]}),e[1]=i,e[2]=d):d=e[2];let g;e[3]!==i?(g=!i&&s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"General"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Basic project information."})]}),s.jsx(Ge,{})]}),e[3]=i,e[4]=g):g=e[4];let u,x;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Plugins"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Manage which plugins are enabled and configure them."})]}),s.jsx(Ze,{})]}),x=s.jsx(tt,{}),e[5]=u,e[6]=x):(u=e[5],x=e[6]);let j;return e[7]!==d||e[8]!==g?(j=s.jsxs(Z,{children:[o,s.jsx(Z.Content,{children:s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx("div",{className:"p-5 max-w-2xl",children:s.jsxs("div",{className:"space-y-8",children:[d,g,u,x]})})})})})]}),e[7]=d,e[8]=g,e[9]=j):j=e[9],j}export{zt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aX as M,c as O,u as H,j as s,aM as U,r as I,m as G,O as V}from"./index-BP5xHVRF.js";import{a as q}from"./use-project-BXCfG1rp.js";import{P as D}from"./index-DdE2vL1_.js";import{C as F}from"./collection-search-HoWi-uQh.js";import{A as J}from"./avatar-DQriEO9g.js";import{c as K}from"./utils-NsYXf4VI.js";import{f as X}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as R}from"./empty-state-DuUoirVq.js";import{C as Q}from"./create-project-dialog-B3qmL-St.js";import{B as W,a as Y,b as Z,c as ee}from"./breadcrumb--xT5xhrI.js";import{B as T}from"./button-CaHjtgMH.js";import"./useQuery-DLTRHzuH.js";import"./constants-DLL8NriC.js";import"./Loading01-MSLql51R.js";import"./SearchMd-9opLTbt7.js";import"./input-BYKrnlY1.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./useMutation-xI92doIX.js";import"./dialog-Je7S_n4B.js";import"./X-DpveZ1aP.js";import"./form-eIVV-J09.js";import"./label-CUkyLZ_S.js";import"./textarea-DQKbZOJF.js";import"./Check-B7tiH-XX.js";import"./ChevronRight-C9SvVl2H.js";const te=M("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=X(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 E;return e[55]!==A||e[56]!==u?(E=s.jsx(U,{to:"/$org/$project",params:u,className:"block group",children:A}),e[55]=A,e[56]=u,e[57]=E):E=e[57],E}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 Ae(){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=G();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=D;let w;t[18]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(D.Header.Left,{children:s.jsx(W,{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(D.Header,{children:[w,s.jsx(D.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],_=D.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(Q,{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{Ae as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as f,aY as Pn,c as He,j as he}from"./index-BP5xHVRF.js";import{c as Je}from"./utils-NsYXf4VI.js";const Ye=({size:n=24,color:e="currentColor",...t})=>f.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},f.createElement("path",{d:"M12 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm7-14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));Ye.displayName="DotsGrid";const Ee=f.createContext(null);Ee.displayName="PanelGroupContext";const A={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},_e=10,ne=f.useLayoutEffect,Fe=Pn.useId,wn=typeof Fe=="function"?Fe:()=>null;let En=0;function Ge(n=null){const e=wn(),t=f.useRef(n||e||null);return t.current===null&&(t.current=""+En++),n??t.current}function Qe({children:n,className:e="",collapsedSize:t,collapsible:r,defaultSize:i,forwardedRef:o,id:l,maxSize:a,minSize:s,onCollapse:h,onExpand:w,onResize:p,order:u,style:v,tagName:z="div",...C}){const E=f.useContext(Ee);if(E===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:S,expandPanel:L,getPanelSize:N,getPanelStyle:D,groupId:V,isPanelCollapsed:R,reevaluatePanelConstraints:P,registerPanel:F,resizePanel:q,unregisterPanel:W}=E,G=Ge(l),M=f.useRef({callbacks:{onCollapse:h,onExpand:w,onResize:p},constraints:{collapsedSize:t,collapsible:r,defaultSize:i,maxSize:a,minSize:s},id:G,idIsFromProps:l!==void 0,order:u});f.useRef({didLogMissingDefaultSizeWarning:!1}),ne(()=>{const{callbacks:_,constraints:H}=M.current,B={...H};M.current.id=G,M.current.idIsFromProps=l!==void 0,M.current.order=u,_.onCollapse=h,_.onExpand=w,_.onResize=p,H.collapsedSize=t,H.collapsible=r,H.defaultSize=i,H.maxSize=a,H.minSize=s,(B.collapsedSize!==H.collapsedSize||B.collapsible!==H.collapsible||B.maxSize!==H.maxSize||B.minSize!==H.minSize)&&P(M.current,B)}),ne(()=>{const _=M.current;return F(_),()=>{W(_)}},[u,G,F,W]),f.useImperativeHandle(o,()=>({collapse:()=>{S(M.current)},expand:_=>{L(M.current,_)},getId(){return G},getSize(){return N(M.current)},isCollapsed(){return R(M.current)},isExpanded(){return!R(M.current)},resize:_=>{q(M.current,_)}}),[S,L,N,R,G,q]);const Y=D(M.current,i);return f.createElement(z,{...C,children:n,className:e,id:G,style:{...Y,...v},[A.groupId]:V,[A.panel]:"",[A.panelCollapsible]:r||void 0,[A.panelId]:G,[A.panelSize]:parseFloat(""+Y.flexGrow).toFixed(1)})}const en=f.forwardRef((n,e)=>f.createElement(Qe,{...n,forwardedRef:e}));Qe.displayName="Panel";en.displayName="forwardRef(Panel)";let De=null,Se=-1,J=null;function Cn(n,e){if(e){const t=(e&ln)!==0,r=(e&an)!==0,i=(e&sn)!==0,o=(e&un)!==0;if(t)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function In(){J!==null&&(document.head.removeChild(J),De=null,J=null,Se=-1)}function ke(n,e){var t,r;const i=Cn(n,e);if(De!==i){if(De=i,J===null&&(J=document.createElement("style"),document.head.appendChild(J)),Se>=0){var o;(o=J.sheet)===null||o===void 0||o.removeRule(Se)}Se=(t=(r=J.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&t!==void 0?t:-1}}function nn(n){return n.type==="keydown"}function tn(n){return n.type.startsWith("pointer")}function rn(n){return n.type.startsWith("mouse")}function Ce(n){if(tn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(rn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function Rn(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Ln(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function kn(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:Ve(n),b:Ve(e)};let r;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),r=n;x(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Ue(Ke(t.a)),b:Ue(Ke(t.b))};if(i.a===i.b){const o=r.childNodes,l={a:t.a.at(-1),b:t.b.at(-1)};let a=o.length;for(;a--;){const s=o[a];if(s===l.a)return 1;if(s===l.b)return-1}}return Math.sign(i.a-i.b)}const An=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Mn(n){var e;const t=getComputedStyle((e=on(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Nn(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Mn(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||An.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Ke(n){let e=n.length;for(;e--;){const t=n[e];if(x(t,"Missing node"),Nn(t))return t}return null}function Ue(n){return n&&Number(getComputedStyle(n).zIndex)||0}function Ve(n){const e=[];for(;n;)e.push(n),n=on(n);return e}function on(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const ln=1,an=2,sn=4,un=8,$n=Rn()==="coarse";let U=[],ae=!1,ee=new Map,Ie=new Map;const ze=new Set;function Dn(n,e,t,r,i){var o;const{ownerDocument:l}=e,a={direction:t,element:e,hitAreaMargins:r,setResizeHandlerState:i},s=(o=ee.get(l))!==null&&o!==void 0?o:0;return ee.set(l,s+1),ze.add(a),Pe(),function(){var w;Ie.delete(n),ze.delete(a);const p=(w=ee.get(l))!==null&&w!==void 0?w:1;if(ee.set(l,p-1),Pe(),p===1&&ee.delete(l),U.includes(a)){const u=U.indexOf(a);u>=0&&U.splice(u,1),Te(),i("up",!0,null)}}}function Hn(n){const{target:e}=n,{x:t,y:r}=Ce(n);ae=!0,Be({target:e,x:t,y:r}),Pe(),U.length>0&&(we("down",n),n.preventDefault(),cn(e)||n.stopImmediatePropagation())}function Ae(n){const{x:e,y:t}=Ce(n);if(ae&&n.buttons===0&&(ae=!1,we("up",n)),!ae){const{target:r}=n;Be({target:r,x:e,y:t})}we("move",n),Te(),U.length>0&&n.preventDefault()}function Me(n){const{target:e}=n,{x:t,y:r}=Ce(n);Ie.clear(),ae=!1,U.length>0&&(n.preventDefault(),cn(e)||n.stopImmediatePropagation()),we("up",n),Be({target:e,x:t,y:r}),Te(),Pe()}function cn(n){let e=n;for(;e;){if(e.hasAttribute(A.resizeHandle))return!0;e=e.parentElement}return!1}function Be({target:n,x:e,y:t}){U.splice(0);let r=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(r=n),ze.forEach(i=>{const{element:o,hitAreaMargins:l}=i,a=o.getBoundingClientRect(),{bottom:s,left:h,right:w,top:p}=a,u=$n?l.coarse:l.fine;if(e>=h-u&&e<=w+u&&t>=p-u&&t<=s+u){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&kn(r,o)>0){let z=r,C=!1;for(;z&&!z.contains(o);){if(Ln(z.getBoundingClientRect(),a)){C=!0;break}z=z.parentElement}if(C)return}U.push(i)}})}function Ne(n,e){Ie.set(n,e)}function Te(){let n=!1,e=!1;U.forEach(r=>{const{direction:i}=r;i==="horizontal"?n=!0:e=!0});let t=0;Ie.forEach(r=>{t|=r}),n&&e?ke("intersection",t):n?ke("horizontal",t):e?ke("vertical",t):In()}let $e=new AbortController;function Pe(){$e.abort(),$e=new AbortController;const n={capture:!0,signal:$e.signal};ze.size&&(ae?(U.length>0&&ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("contextmenu",Me,n),r.addEventListener("pointerleave",Ae,n),r.addEventListener("pointermove",Ae,n))}),window.addEventListener("pointerup",Me,n),window.addEventListener("pointercancel",Me,n)):ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("pointerdown",Hn,n),r.addEventListener("pointermove",Ae,n))}))}function we(n,e){ze.forEach(t=>{const{setResizeHandlerState:r}=t,i=U.includes(t);r(n,i,e)})}function _n(){const[n,e]=f.useState(0);return f.useCallback(()=>e(t=>t+1),[])}function x(n,e){if(!n)throw console.error(e),Error(e)}function te(n,e,t=_e){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function X(n,e,t=_e){return te(n,e,t)===0}function j(n,e,t){return te(n,e,t)===0}function Gn(n,e,t){if(n.length!==e.length)return!1;for(let r=0;r<n.length;r++){const i=n[r],o=e[r];if(!j(i,o,t))return!1}return!0}function le({panelConstraints:n,panelIndex:e,size:t}){const r=n[e];x(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:l=100,minSize:a=0}=r;if(te(t,a)<0)if(o){const s=(i+a)/2;te(t,s)<0?t=i:t=a}else t=a;return t=Math.min(l,t),t=parseFloat(t.toFixed(_e)),t}function ge({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:r,prevLayout:i,trigger:o}){if(j(n,0))return e;const l=[...e],[a,s]=r;x(a!=null,"Invalid first pivot index"),x(s!=null,"Invalid second pivot index");let h=0;if(o==="keyboard"){{const p=n<0?s:a,u=t[p];x(u,`Panel constraints not found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,v)){const S=C-E;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}{const p=n<0?a:s,u=t[p];x(u,`No panel constraints found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,C)){const S=E-v;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}}{const p=n<0?1:-1;let u=n<0?s:a,v=0;for(;;){const C=e[u];x(C!=null,`Previous layout not found for panel index ${u}`);const S=le({panelConstraints:t,panelIndex:u,size:100})-C;if(v+=S,u+=p,u<0||u>=t.length)break}const z=Math.min(Math.abs(n),Math.abs(v));n=n<0?0-z:z}{let u=n<0?a:s;for(;u>=0&&u<t.length;){const v=Math.abs(n)-Math.abs(h),z=e[u];x(z!=null,`Previous layout not found for panel index ${u}`);const C=z-v,E=le({panelConstraints:t,panelIndex:u,size:C});if(!j(z,E)&&(h+=z-E,l[u]=E,h.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?u--:u++}}if(Gn(i,l))return i;{const p=n<0?s:a,u=e[p];x(u!=null,`Previous layout not found for panel index ${p}`);const v=u+h,z=le({panelConstraints:t,panelIndex:p,size:v});if(l[p]=z,!j(z,v)){let C=v-z,S=n<0?s:a;for(;S>=0&&S<t.length;){const L=l[S];x(L!=null,`Previous layout not found for panel index ${S}`);const N=L+C,D=le({panelConstraints:t,panelIndex:S,size:N});if(j(L,D)||(C-=D-L,l[S]=D),j(C,0))break;n>0?S--:S++}}}const w=l.reduce((p,u)=>u+p,0);return j(w,100)?l:i}function Bn({layout:n,panelsArray:e,pivotIndices:t}){let r=0,i=100,o=0,l=0;const a=t[0];x(a!=null,"No pivot index found"),e.forEach((p,u)=>{const{constraints:v}=p,{maxSize:z=100,minSize:C=0}=v;u===a?(r=C,i=z):(o+=C,l+=z)});const s=Math.min(i,100-o),h=Math.max(r,100-l),w=n[a];return{valueMax:s,valueMin:h,valueNow:w}}function ye(n,e=document){return Array.from(e.querySelectorAll(`[${A.resizeHandleId}][data-panel-group-id="${n}"]`))}function fn(n,e,t=document){const i=ye(n,t).findIndex(o=>o.getAttribute(A.resizeHandleId)===e);return i??null}function dn(n,e,t){const r=fn(n,e,t);return r!=null?[r,r+1]:[-1,-1]}function pn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return r||null}function Re(n,e=document){const t=e.querySelector(`[${A.resizeHandleId}="${n}"]`);return t||null}function Tn(n,e,t,r=document){var i,o,l,a;const s=Re(e,r),h=ye(n,r),w=s?h.indexOf(s):-1,p=(i=(o=t[w])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,u=(l=(a=t[w+1])===null||a===void 0?void 0:a.id)!==null&&l!==void 0?l:null;return[p,u]}function Wn({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:l}){f.useRef({didWarnAboutMissingResizeHandle:!1}),ne(()=>{if(!o)return;const a=ye(t,o);for(let s=0;s<i.length-1;s++){const{valueMax:h,valueMin:w,valueNow:p}=Bn({layout:r,panelsArray:i,pivotIndices:[s,s+1]}),u=a[s];if(u!=null){const v=i[s];x(v,`No panel data found for index "${s}"`),u.setAttribute("aria-controls",v.id),u.setAttribute("aria-valuemax",""+Math.round(h)),u.setAttribute("aria-valuemin",""+Math.round(w)),u.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{a.forEach((s,h)=>{s.removeAttribute("aria-controls"),s.removeAttribute("aria-valuemax"),s.removeAttribute("aria-valuemin"),s.removeAttribute("aria-valuenow")})}},[t,r,i,o]),f.useEffect(()=>{if(!o)return;const a=e.current;x(a,"Eager values not found");const{panelDataArray:s}=a,h=pn(t,o);x(h!=null,`No group found for id "${t}"`);const w=ye(t,o);x(w,`No resize handles found for group id "${t}"`);const p=w.map(u=>{const v=u.getAttribute(A.resizeHandleId);x(v,"Resize handle element has no handle id attribute");const[z,C]=Tn(t,v,s,o);if(z==null||C==null)return()=>{};const E=S=>{if(!S.defaultPrevented)switch(S.key){case"Enter":{S.preventDefault();const L=s.findIndex(N=>N.id===z);if(L>=0){const N=s[L];x(N,`No panel data found for index ${L}`);const D=r[L],{collapsedSize:V=0,collapsible:R,minSize:P=0}=N.constraints;if(D!=null&&R){const F=ge({delta:j(D,V)?P-V:V-D,initialLayout:r,panelConstraints:s.map(q=>q.constraints),pivotIndices:dn(t,v,o),prevLayout:r,trigger:"keyboard"});r!==F&&l(F)}}break}}};return u.addEventListener("keydown",E),()=>{u.removeEventListener("keydown",E)}});return()=>{p.forEach(u=>u())}},[o,n,e,t,r,i,l])}function Ze(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function gn(n,e){const t=n==="horizontal",{x:r,y:i}=Ce(e);return t?r:i}function jn(n,e,t,r,i){const o=t==="horizontal",l=Re(e,i);x(l,`No resize handle element found for id "${e}"`);const a=l.getAttribute(A.groupId);x(a,"Resize handle element has no group id attribute");let{initialCursorPosition:s}=r;const h=gn(t,n),w=pn(a,i);x(w,`No group element found for id "${a}"`);const p=w.getBoundingClientRect(),u=o?p.width:p.height;return(h-s)/u*100}function Fn(n,e,t,r,i,o){if(nn(n)){const l=t==="horizontal";let a=0;n.shiftKey?a=100:i!=null?a=i:a=10;let s=0;switch(n.key){case"ArrowDown":s=l?0:a;break;case"ArrowLeft":s=l?-a:0;break;case"ArrowRight":s=l?a:0;break;case"ArrowUp":s=l?0:-a;break;case"End":s=100;break;case"Home":s=-100;break}return s}else return r==null?0:jn(n,e,t,r,o)}function Kn({panelDataArray:n}){const e=Array(n.length),t=n.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;a!=null&&(r++,e[o]=a,i-=a)}for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;if(a!=null)continue;const s=n.length-r,h=i/s;r++,e[o]=h,i-=h}return e}function oe(n,e,t){e.forEach((r,i)=>{const o=n[i];x(o,`Panel data not found for index ${i}`);const{callbacks:l,constraints:a,id:s}=o,{collapsedSize:h=0,collapsible:w}=a,p=t[s];if(p==null||r!==p){t[s]=r;const{onCollapse:u,onExpand:v,onResize:z}=l;z&&z(r,p),w&&(u||v)&&(v&&(p==null||X(p,h))&&!X(r,h)&&v(),u&&(p==null||!X(p,h))&&X(r,h)&&u())}})}function be(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Un({defaultSize:n,dragState:e,layout:t,panelData:r,panelIndex:i,precision:o=3}){const l=t[i];let a;return l==null?a=n!=null?n.toPrecision(o):"1":r.length===1?a="1":a=l.toPrecision(o),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Vn(n,e=10){let t=null;return(...i)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...i)},e)}}function Oe(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function mn(n){return`react-resizable-panels:${n}`}function hn(n){return n.map(e=>{const{constraints:t,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function zn(n,e){try{const t=mn(n),r=e.getItem(t);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function Zn(n,e,t){var r,i;const o=(r=zn(n,t))!==null&&r!==void 0?r:{},l=hn(e);return(i=o[l])!==null&&i!==void 0?i:null}function On(n,e,t,r,i){var o;const l=mn(n),a=hn(e),s=(o=zn(n,i))!==null&&o!==void 0?o:{};s[a]={expandToSizes:Object.fromEntries(t.entries()),layout:r};try{i.setItem(l,JSON.stringify(s))}catch(h){console.error(h)}}function qe({layout:n,panelConstraints:e}){const t=[...n],r=t.reduce((o,l)=>o+l,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(o=>`${o}%`).join(", ")}`);if(!j(r,100)&&t.length>0)for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=100/r*l;t[o]=a}let i=0;for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=le({panelConstraints:e,panelIndex:o,size:l});l!=a&&(i+=l-a,t[o]=a)}if(!j(i,0))for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=l+i,s=le({panelConstraints:e,panelIndex:o,size:a});if(l!==s&&(i-=s-l,t[o]=s,j(i,0)))break}return t}const qn=100,me={getItem:n=>(Oe(me),me.getItem(n)),setItem:(n,e)=>{Oe(me),me.setItem(n,e)}},Xe={};function yn({autoSaveId:n=null,children:e,className:t="",direction:r,forwardedRef:i,id:o=null,onLayout:l=null,keyboardResizeBy:a=null,storage:s=me,style:h,tagName:w="div",...p}){const u=Ge(o),v=f.useRef(null),[z,C]=f.useState(null),[E,S]=f.useState([]),L=_n(),N=f.useRef({}),D=f.useRef(new Map),V=f.useRef(0),R=f.useRef({autoSaveId:n,direction:r,dragState:z,id:u,keyboardResizeBy:a,onLayout:l,storage:s}),P=f.useRef({layout:E,panelDataArray:[],panelDataArrayChanged:!1});f.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),f.useImperativeHandle(i,()=>({getId:()=>R.current.id,getLayout:()=>{const{layout:c}=P.current;return c},setLayout:c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current,d=qe({layout:c,panelConstraints:g.map(y=>y.constraints)});Ze(b,d)||(S(d),P.current.layout=d,m&&m(d),oe(g,d,N.current))}}),[]),ne(()=>{R.current.autoSaveId=n,R.current.direction=r,R.current.dragState=z,R.current.id=u,R.current.onLayout=l,R.current.storage=s}),Wn({committedValuesRef:R,eagerValuesRef:P,groupId:u,layout:E,panelDataArray:P.current.panelDataArray,setLayout:S,panelGroupElement:v.current}),f.useEffect(()=>{const{panelDataArray:c}=P.current;if(n){if(E.length===0||E.length!==c.length)return;let m=Xe[n];m==null&&(m=Vn(On,qn),Xe[n]=m);const b=[...c],g=new Map(D.current);m(n,b,g,E,s)}},[n,E,s]),f.useEffect(()=>{});const F=f.useCallback(c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current;if(c.constraints.collapsible){const d=g.map(Z=>Z.constraints),{collapsedSize:y=0,panelSize:I,pivotIndices:$}=Q(g,c,b);if(x(I!=null,`Panel size not found for panel "${c.id}"`),!X(I,y)){D.current.set(c.id,I);const O=ie(g,c)===g.length-1?I-y:y-I,k=ge({delta:O,initialLayout:b,panelConstraints:d,pivotIndices:$,prevLayout:b,trigger:"imperative-api"});be(b,k)||(S(k),P.current.layout=k,m&&m(k),oe(g,k,N.current))}}},[]),q=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current;if(c.constraints.collapsible){const y=d.map(K=>K.constraints),{collapsedSize:I=0,panelSize:$=0,minSize:Z=0,pivotIndices:O}=Q(d,c,g),k=m??Z;if(X($,I)){const K=D.current.get(c.id),de=K!=null&&K>=k?K:k,Le=ie(d,c)===d.length-1?$-de:de-$,T=ge({delta:Le,initialLayout:g,panelConstraints:y,pivotIndices:O,prevLayout:g,trigger:"imperative-api"});be(g,T)||(S(T),P.current.layout=T,b&&b(T),oe(d,T,N.current))}}},[]),W=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{panelSize:g}=Q(b,c,m);return x(g!=null,`Panel size not found for panel "${c.id}"`),g},[]),G=f.useCallback((c,m)=>{const{panelDataArray:b}=P.current,g=ie(b,c);return Un({defaultSize:m,dragState:z,layout:E,panelData:b,panelIndex:g})},[z,E]),M=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),d===!0&&X(y,g)},[]),Y=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),!d||te(y,g)>0},[]),_=f.useCallback(c=>{const{panelDataArray:m}=P.current;m.push(c),m.sort((b,g)=>{const d=b.order,y=g.order;return d==null&&y==null?0:d==null?-1:y==null?1:d-y}),P.current.panelDataArrayChanged=!0,L()},[L]);ne(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:c,onLayout:m,storage:b}=R.current,{layout:g,panelDataArray:d}=P.current;let y=null;if(c){const $=Zn(c,d,b);$&&(D.current=new Map(Object.entries($.expandToSizes)),y=$.layout)}y==null&&(y=Kn({panelDataArray:d}));const I=qe({layout:y,panelConstraints:d.map($=>$.constraints)});Ze(g,I)||(S(I),P.current.layout=I,m&&m(I),oe(d,I,N.current))}}),ne(()=>{const c=P.current;return()=>{c.layout=[]}},[]);const H=f.useCallback(c=>{let m=!1;const b=v.current;return b&&window.getComputedStyle(b,null).getPropertyValue("direction")==="rtl"&&(m=!0),function(d){d.preventDefault();const y=v.current;if(!y)return()=>null;const{direction:I,dragState:$,id:Z,keyboardResizeBy:O,onLayout:k}=R.current,{layout:K,panelDataArray:de}=P.current,{initialLayout:ve}=$??{},Le=dn(Z,c,y);let T=Fn(d,c,I,$,O,y);const We=I==="horizontal";We&&m&&(T=-T);const bn=de.map(Sn=>Sn.constraints),pe=ge({delta:T,initialLayout:ve??K,panelConstraints:bn,pivotIndices:Le,prevLayout:K,trigger:nn(d)?"keyboard":"mouse-or-touch"}),je=!be(K,pe);(tn(d)||rn(d))&&V.current!=T&&(V.current=T,!je&&T!==0?We?Ne(c,T<0?ln:an):Ne(c,T<0?sn:un):Ne(c,0)),je&&(S(pe),P.current.layout=pe,k&&k(pe),oe(de,pe,N.current))}},[]),B=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current,y=d.map(K=>K.constraints),{panelSize:I,pivotIndices:$}=Q(d,c,g);x(I!=null,`Panel size not found for panel "${c.id}"`);const O=ie(d,c)===d.length-1?I-m:m-I,k=ge({delta:O,initialLayout:g,panelConstraints:y,pivotIndices:$,prevLayout:g,trigger:"imperative-api"});be(g,k)||(S(k),P.current.layout=k,b&&b(k),oe(d,k,N.current))},[]),se=f.useCallback((c,m)=>{const{layout:b,panelDataArray:g}=P.current,{collapsedSize:d=0,collapsible:y}=m,{collapsedSize:I=0,collapsible:$,maxSize:Z=100,minSize:O=0}=c.constraints,{panelSize:k}=Q(g,c,b);k!=null&&(y&&$&&X(k,d)?X(d,I)||B(c,I):k<O?B(c,O):k>Z&&B(c,Z))},[B]),ue=f.useCallback((c,m)=>{const{direction:b}=R.current,{layout:g}=P.current;if(!v.current)return;const d=Re(c,v.current);x(d,`Drag handle element not found for id "${c}"`);const y=gn(b,m);C({dragHandleId:c,dragHandleRect:d.getBoundingClientRect(),initialCursorPosition:y,initialLayout:g})},[]),ce=f.useCallback(()=>{C(null)},[]),xe=f.useCallback(c=>{const{panelDataArray:m}=P.current,b=ie(m,c);b>=0&&(m.splice(b,1),delete N.current[c.id],P.current.panelDataArrayChanged=!0,L())},[L]),re=f.useMemo(()=>({collapsePanel:F,direction:r,dragState:z,expandPanel:q,getPanelSize:W,getPanelStyle:G,groupId:u,isPanelCollapsed:M,isPanelExpanded:Y,reevaluatePanelConstraints:se,registerPanel:_,registerResizeHandle:H,resizePanel:B,startDragging:ue,stopDragging:ce,unregisterPanel:xe,panelGroupElement:v.current}),[F,z,r,q,W,G,u,M,Y,se,_,H,B,ue,ce,xe]),fe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return f.createElement(Ee.Provider,{value:re},f.createElement(w,{...p,children:e,className:t,id:o,ref:v,style:{...fe,...h},[A.group]:"",[A.groupDirection]:r,[A.groupId]:u}))}const xn=f.forwardRef((n,e)=>f.createElement(yn,{...n,forwardedRef:e}));yn.displayName="PanelGroup";xn.displayName="forwardRef(PanelGroup)";function ie(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function Q(n,e,t){const r=ie(n,e),o=r===n.length-1?[r-1,r]:[r,r+1],l=t[r];return{...e.constraints,panelSize:l,pivotIndices:o}}function Xn({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:r}){f.useEffect(()=>{if(n||t==null||r==null)return;const i=Re(e,r);if(i==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),t(l);break}case"F6":{l.preventDefault();const a=i.getAttribute(A.groupId);x(a,`No group element found for id "${a}"`);const s=ye(a,r),h=fn(a,e,r);x(h!==null,`No resize element found for id "${e}"`);const w=l.shiftKey?h>0?h-1:s.length-1:h+1<s.length?h+1:0;s[w].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,n,e,t])}function vn({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:r,id:i,onBlur:o,onClick:l,onDragging:a,onFocus:s,onPointerDown:h,onPointerUp:w,style:p={},tabIndex:u=0,tagName:v="div",...z}){var C,E;const S=f.useRef(null),L=f.useRef({onClick:l,onDragging:a,onPointerDown:h,onPointerUp:w});f.useEffect(()=>{L.current.onClick=l,L.current.onDragging=a,L.current.onPointerDown=h,L.current.onPointerUp=w});const N=f.useContext(Ee);if(N===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:D,groupId:V,registerResizeHandle:R,startDragging:P,stopDragging:F,panelGroupElement:q}=N,W=Ge(i),[G,M]=f.useState("inactive"),[Y,_]=f.useState(!1),[H,B]=f.useState(null),se=f.useRef({state:G});ne(()=>{se.current.state=G}),f.useEffect(()=>{if(t)B(null);else{const re=R(W);B(()=>re)}},[t,W,R]);const ue=(C=r?.coarse)!==null&&C!==void 0?C:15,ce=(E=r?.fine)!==null&&E!==void 0?E:5;f.useEffect(()=>{if(t||H==null)return;const re=S.current;x(re,"Element ref not attached");let fe=!1;return Dn(W,re,D,{coarse:ue,fine:ce},(m,b,g)=>{if(!b){M("inactive");return}switch(m){case"down":{M("drag"),fe=!1,x(g,'Expected event to be defined for "down" action'),P(W,g);const{onDragging:d,onPointerDown:y}=L.current;d?.(!0),y?.();break}case"move":{const{state:d}=se.current;fe=!0,d!=="drag"&&M("hover"),x(g,'Expected event to be defined for "move" action'),H(g);break}case"up":{M("hover"),F();const{onClick:d,onDragging:y,onPointerUp:I}=L.current;y?.(!1),I?.(),fe||d?.();break}}})},[ue,D,t,ce,R,W,H,P,F]),Xn({disabled:t,handleId:W,resizeHandler:H,panelGroupElement:q});const xe={touchAction:"none",userSelect:"none"};return f.createElement(v,{...z,children:n,className:e,id:i,onBlur:()=>{_(!1),o?.()},onFocus:()=>{_(!0),s?.()},ref:S,role:"separator",style:{...xe,...p},tabIndex:u,[A.groupDirection]:D,[A.groupId]:V,[A.resizeHandle]:"",[A.resizeHandleActive]:G==="drag"?"pointer":Y?"keyboard":void 0,[A.resizeHandleEnabled]:!t,[A.resizeHandleId]:W,[A.resizeHandleState]:G})}vn.displayName="PanelResizeHandle";function Qn(n){const e=He.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let i;e[3]!==t?(i=Je("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[3]=t,e[4]=i):i=e[4];let o;return e[5]!==r||e[6]!==i?(o=he.jsx(xn,{"data-slot":"resizable-panel-group",className:i,...r}),e[5]=r,e[6]=i,e[7]=o):o=e[7],o}function et(n){const e=He.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let r;return e[2]!==t?(r=he.jsx(en,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=r):r=e[3],r}function nt(n){const e=He.c(12);let t,r,i;e[0]!==n?({withHandle:i,className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i):(t=e[1],r=e[2],i=e[3]);let o;e[4]!==t?(o=Je("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=o):o=e[5];let l;e[6]!==i?(l=i&&he.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:he.jsx(Ye,{className:"size-2.5"})}),e[6]=i,e[7]=l):l=e[7];let a;return e[8]!==r||e[9]!==o||e[10]!==l?(a=he.jsx(vn,{"data-slot":"resizable-handle",className:o,...r,children:l}),e[8]=r,e[9]=o,e[10]=l,e[11]=a):a=e[11],a}export{nt as R,et as a,Qn as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as c,b0 as rt,am as Ne,j as d,as as st,at as be,al as k,au as lt,a3 as j,an as P,b1 as $,aw as at,a2 as _e,ax as Ee,b2 as it,ao as ct,b3 as dt,ay as ut,aB as pt,az as ft,aC as mt,aD as ht,aq as vt,aA as gt,aE as xt,aF as St,c as ee}from"./index-BP5xHVRF.js";import{V as wt}from"./index-1FNA2NMp.js";import{i as Ct}from"./Check-B7tiH-XX.js";import{t as Re}from"./ChevronDown-4fM-ZApw.js";import{c as oe}from"./utils-NsYXf4VI.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),[F,M]=c.useState(!1),re=rt(u),[_,O]=Ne({prop:o,defaultProp:r??!1,onChange:i,caller:J}),[U,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:F,onValueNodeHasChildrenChange:M,contentId:be(),value:U,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:U,onChange:E=>q(E.target.value),disabled:b,form:S,children:[U===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,F]=c.useState(null),[M,re]=c.useState(null),_=k(e,f=>F(f)),[O,U]=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)&&(U(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(),U=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const I=q.left-O.left,N=U.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-U.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[F,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:F},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",Fe=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),F=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=F>0?F:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Fe.displayName=we;var Ue="SelectGroup",[Dt,kt]=ne(Ue),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=Ue;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",Ft=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});Ft.displayName=Ie;var Ut="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=Ut;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=Fe,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,12 +0,0 @@
|
|
|
1
|
-
import{r as y,c as N,j as n,u as ie,m as ue,bt as Be,L as ke,bp as rs,bC as ls,O as Q,a4 as xt,v as os,y as is,g as oe,t as ce,a$ as as,bD as ht,a as et,bE as cs,b3 as gt,bF as _e,A as ds,S as jt,b as ms,e as fs,N as us,n as ps,K as xs,l as bt,P as hs}from"./index-BP5xHVRF.js";import{C as re,u as Fe,i as gs}from"./index-DSuycUKc.js";import{I as js,n as bs,a as De,c as vt,T as Re,b as He}from"./integration-icon-Y1ojuvRD.js";import{P as Ce}from"./index-DdE2vL1_.js";import{b as We,u as vs,S as ee,d as Nt,C as Ns,c as Ss,e as ys}from"./use-deco-chat-open-DDkpn4wX.js";import{c as z}from"./utils-NsYXf4VI.js";import{d as ws}from"./constants-DLL8NriC.js";import{T as Cs,i as ks,b as _s,S as zs,c as $s,d as Is,e as Os,f as Ps,t as St}from"./typewriter-title-NPqFp9ey.js";import{s as Ve}from"./Plus-cL6uctg7.js";import{t as yt}from"./Users03-CA846Mh0.js";import{i as Ue}from"./X-DpveZ1aP.js";import{E as wt}from"./error-boundary-DEpo81VO.js";import{C as Ct}from"./create-project-dialog-B3qmL-St.js";import{n as Ts}from"./CheckDone01-W_IvTmR4.js";import{a as Ms}from"./Home02-DOyHFJiI.js";import{u as Es,a as kt}from"./use-project-BXCfG1rp.js";import{u as Pe}from"./use-mobile-BG01tXEp.js";import{t as tt}from"./ChevronDown-4fM-ZApw.js";import{B as te}from"./button-CaHjtgMH.js";import{A as de}from"./avatar-DQriEO9g.js";import{b as st,P as nt,a as rt}from"./popover-0PZkfvQx.js";import{n as it}from"./Inbox01-DVhoyxIp.js";import{B as at}from"./badge-c1ZDS4lj.js";import{i as $e}from"./Check-B7tiH-XX.js";import{s as ct}from"./XClose-CfG5NO72.js";import{i as _t}from"./ChevronRight-C9SvVl2H.js";import{a as lt}from"./Settings02-D0x9l-th.js";import{C as zt}from"./create-organization-dialog-KlMp4qjX.js";import{c as As,b as Ls,g as Ds,a as Rs,D as Hs}from"./dialog-Je7S_n4B.js";import{L as dt}from"./label-CUkyLZ_S.js";import{S as mt}from"./switch-D1hmikqH.js";import{i as Us}from"./Code01-CtE9Fgo6.js";import{a as $t}from"./Copy01-mHAXegMf.js";import{u as It,a as Bs}from"./use-organization-settings-BOgqOHG5.js";import{i as Fs}from"./File06-BoQ3aZMK.js";import{I as Ws}from"./input-BYKrnlY1.js";import{c as Vs}from"./Grid01-Dvk1xwJ4.js";import{a as Gs,T as Ks}from"./topbar-portal-YDFUK5ME.js";import{a as Zs,b as Ys,D as qs,c as Js,g as ft}from"./dropdown-menu-6ZQ-yg3S.js";import{n as ut}from"./LinkExternal01-DxKrKPgL.js";import{t as Xs}from"./Settings01-CymY9V-E.js";import{u as Ot,L as Pt}from"./localstorage-keys-uz6xAIc7.js";import{R as Qs,a as Tt,b as en}from"./resizable-1OTgE7WS.js";import"./spinner-C93Wqcgz.js";import"./use-mcp-prompts-n2y1aXdw.js";import"./useQuery-DLTRHzuH.js";import"./form-eIVV-J09.js";import"./AlertCircle-DeobVPaG.js";import"./ArrowUp-CsOsDXPa.js";import"./Edit01-RMPmKiuh.js";import"./usage-B8eRkRZY.js";import"./Terminal-Dhv-FFhT.js";import"./monaco-editor-ISS3tjaj.js";import"./empty-state-DuUoirVq.js";import"./use-connection-Dr483fc2.js";import"./useMutation-xI92doIX.js";import"./generate-id-Dyweu44Y.js";import"./SearchMd-9opLTbt7.js";import"./Trash01-BYpgehDe.js";import"./use-virtual-mcp-BKDa8fdJ.js";import"./use-create-virtual-mcp-BMMjVvtG.js";import"./index-1FNA2NMp.js";import"./use-llm-DMxQiXS5.js";import"./use-binding-eVzJ84ZZ.js";import"./binder-Bq3_4LhY.js";import"./select-C3cCqPPl.js";import"./Image01-BoPpKFMP.js";import"./RefreshCcw01-Cn69ijk0.js";import"./textarea-DQKbZOJF.js";import"./alert-dialog-CEzvbVBM.js";import"./infiniteQueryObserver-DFgsWYE3.js";const qe=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M7 17 17 7m0 0H7m10 0v10"}));qe.displayName="ArrowUpRight";const Mt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M9 7H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 7.76 3 8.04 3 8.6v10.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21H9m0 0h6m-6 0V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 3 10.04 3 10.6 3h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 3.76 15 4.04 15 4.6V21m0-10h4.4c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C21 11.76 21 12.04 21 12.6v6.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C20.24 21 19.96 21 19.4 21H15"}));Mt.displayName="BarChart10";const Et=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m12 21-.1-.15c-.695-1.042-1.042-1.563-1.5-1.94a4 4 0 0 0-1.378-.737C8.453 18 7.827 18 6.575 18H5.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2 16.48 2 15.92 2 14.8V6.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C3.52 3 4.08 3 5.2 3h.4c2.24 0 3.36 0 4.216.436a4 4 0 0 1 1.748 1.748C12 6.04 12 7.16 12 9.4M12 21V9.4M12 21l.1-.15c.695-1.042 1.042-1.563 1.5-1.94a3.999 3.999 0 0 1 1.378-.737C15.547 18 16.173 18 17.425 18H18.8c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 16.48 22 15.92 22 14.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 3 19.92 3 18.8 3h-.4c-2.24 0-3.36 0-4.216.436a4 4 0 0 0-1.748 1.748C12 6.04 12 7.16 12 9.4"}));Et.displayName="BookOpen01";const At=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"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"}));At.displayName="Building02";const Lt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m18 17-5-5 5-5m-7 10-5-5 5-5"}));Lt.displayName="ChevronLeftDouble";const Dt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m6 17 5-5-5-5m7 10 5-5-5-5"}));Dt.displayName="ChevronRightDouble";const Je=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M11 4.5h7.3c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874c.218.428.218.988.218 2.108V9c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C19.898 12 19.432 12 18.5 12M13 19.5H5.7c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2.5 17.98 2.5 17.42 2.5 16.3V15c0-.932 0-1.398.152-1.765a2 2 0 0 1 1.083-1.083C4.102 12 4.568 12 5.5 12m4.8 2.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218c.055-.107.055-.247.055-.527v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C14.12 9.5 13.98 9.5 13.7 9.5h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218c-.055.107-.055.247-.055.527v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055Zm7.5 7.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218C22 21.62 22 21.48 22 21.2v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C21.62 17 21.48 17 21.2 17h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218C17 17.38 17 17.52 17 17.8v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055ZM2.8 7h3.4c.28 0 .42 0 .527-.054a.5.5 0 0 0 .218-.219C7 6.62 7 6.48 7 6.2V2.8c0-.28 0-.42-.054-.527a.5.5 0 0 0-.219-.219C6.62 2 6.48 2 6.2 2H2.8c-.28 0-.42 0-.527.054a.5.5 0 0 0-.219.219C2 2.38 2 2.52 2 2.8v3.4c0 .28 0 .42.054.527a.5.5 0 0 0 .219.218C2.38 7 2.52 7 2.8 7Z"}));Je.displayName="Dataflow03";const Rt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"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"}));Rt.displayName="FaceSmile";const Ht=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M2 12h20M2 12c0 5.523 4.477 10 10 10M2 12C2 6.477 6.477 2 12 2m10 10c0 5.523-4.477 10-10 10m10-10c0-5.523-4.477-10-10-10m0 0a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10m0-20a15.3 15.3 0 0 0-4 10 15.3 15.3 0 0 0 4 10"}));Ht.displayName="Globe01";const Ut=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));Ut.displayName="LayoutRight";const Bt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"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"}));Bt.displayName="LogOut01";const Ft=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m3 5c0 .93 0 1.395-.102 1.776a3 3 0 0 1-2.122 2.122C9.395 21 8.93 21 8 21h-.5c-1.398 0-2.097 0-2.648-.228a3 3 0 0 1-1.624-1.624C3 18.597 3 17.898 3 16.5v-9c0-1.398 0-2.097.228-2.648a3 3 0 0 1 1.624-1.624C5.403 3 6.102 3 7.5 3H8c.93 0 1.395 0 1.776.102a3 3 0 0 1 2.122 2.122C12 5.605 12 6.07 12 7"}));Ft.displayName="LogOut02";const Wt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));Wt.displayName="Mail01";const Vt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Zm-6 8h12M9 16a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));Vt.displayName="Settings04";function tn(){const t=N.c(65),{org:e}=ie(),[,s]=We(),{selectedVirtualMcp:r,modelsConnections:l,isChatEmpty:o,activeThreadId:i,createThread:a,switchToThread:c,threads:d}=vs();let m;if(t[0]!==i||t[1]!==d){let K;t[3]!==i?(K=J=>J.id===i,t[3]=i,t[4]=K):K=t[4],m=d.find(K),t[0]=i,t[1]=d,t[2]=m}else m=t[2];const f=m,[u,p]=y.useState(!1),[x,h]=y.useTransition();let j;t[5]!==e.id?(j=ws(e.id),t[5]=e.id,t[6]=j):j=t[6];const g=r??j;let v;t[7]!==a?(v=()=>{h(()=>{a()})},t[7]=a,t[8]=v):v=t[8];const S=v;if(l.length===0){let K;t[9]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx(Ce.Header.Left,{className:"gap-2"}),t[9]=K):K=t[9];let J;t[10]!==s?(J=()=>s(!1),t[10]=s,t[11]=J):J=t[11];let X;t[12]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(Ue,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=X):X=t[12];let P;t[13]!==J?(P=n.jsxs(Ce.Header,{className:"flex-none",children:[K,n.jsx(Ce.Header.Right,{className:"gap-1",children:n.jsx("button",{type:"button",onClick:J,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:X})})]}),t[13]=J,t[14]=P):P=t[14];let F;t[15]!==e?(F=n.jsx(re.Main,{className:"flex flex-col items-center",children:n.jsx(re.EmptyState,{children:n.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]=F):F=t[16];let Y;return t[17]!==P||t[18]!==F?(Y=n.jsxs(re,{children:[P,F]}),t[17]=P,t[18]=F,t[19]=Y):Y=t[19],Y}const C=u?"duration-300 opacity-0 -translate-x-4 pointer-events-none":x?"duration-200 opacity-0 pointer-events-none":"duration-300 opacity-100 translate-x-0";let w;t[20]!==C?(w=z("absolute inset-0 flex flex-col transition-all ease-in-out",C),t[20]=C,t[21]=w):w=t[21];let _;t[22]!==f||t[23]!==o?(_=!o&&f?.title&&n.jsx(Cs,{text:f.title,className:"text-sm font-medium text-foreground"}),t[22]=f,t[23]=o,t[24]=_):_=t[24];let O;t[25]!==_?(O=n.jsx(Ce.Header.Left,{className:"gap-2",children:_}),t[25]=_,t[26]=O):O=t[26];let k;t[27]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(Ve,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[27]=k):k=t[27];let $;t[28]!==S||t[29]!==x?($=n.jsx("button",{type:"button",onClick:S,disabled:x,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",title:"New chat",children:k}),t[28]=S,t[29]=x,t[30]=$):$=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=()=>p(!0),t[31]=I):I=t[31];let M;t[32]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsx("button",{type:"button",onClick:I,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:n.jsx(ks,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[32]=M):M=t[32];let T;t[33]!==s?(T=()=>s(!1),t[33]=s,t[34]=T):T=t[34];let U;t[35]===Symbol.for("react.memo_cache_sentinel")?(U=n.jsx(Ue,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[35]=U):U=t[35];let E;t[36]!==T?(E=n.jsx("button",{type:"button",onClick:T,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:U}),t[36]=T,t[37]=E):E=t[37];let L;t[38]!==E||t[39]!==$?(L=n.jsxs(Ce.Header.Right,{className:"gap-1",children:[$,M,E]}),t[38]=E,t[39]=$,t[40]=L):L=t[40];let D;t[41]!==L||t[42]!==O?(D=n.jsxs(Ce.Header,{className:"flex-none",children:[O,L]}),t[41]=L,t[42]=O,t[43]=D):D=t[43];let A;t[44]!==g||t[45]!==o?(A=n.jsx(re.Main,{children:o?n.jsx(re.EmptyState,{children:n.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[n.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[n.jsx(js,{icon:g.icon,name:g.title,size:"lg",fallbackIcon:n.jsx(yt,{size:32}),className:"size-[60px]! rounded-[18px]!"}),n.jsx("h3",{className:"text-xl font-medium text-foreground",children:g.title}),n.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:g.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),n.jsx(re.IceBreakers,{})]})}):n.jsx(re.Messages,{})}),t[44]=g,t[45]=o,t[46]=A):A=t[46];let R;t[47]===Symbol.for("react.memo_cache_sentinel")?(R=n.jsx(re.Footer,{children:n.jsx(re.Input,{})}),t[47]=R):R=t[47];let B;t[48]!==D||t[49]!==A||t[50]!==w?(B=n.jsxs("div",{className:w,children:[D,A,R]}),t[48]=D,t[49]=A,t[50]=w,t[51]=B):B=t[51];const H=u?"opacity-100 translate-x-0":"opacity-0 translate-x-4 pointer-events-none";let W;t[52]!==H?(W=z("absolute inset-0 flex flex-col transition-all duration-300 ease-in-out",H),t[52]=H,t[53]=W):W=t[53];let V;t[54]===Symbol.for("react.memo_cache_sentinel")?(V=()=>p(!1),t[54]=V):V=t[54];let q;t[55]!==i||t[56]!==c||t[57]!==d?(q=n.jsx(_s,{threads:d,activeThreadId:i,onThreadSelect:c,onClose:V}),t[55]=i,t[56]=c,t[57]=d,t[58]=q):q=t[58];let G;t[59]!==W||t[60]!==q?(G=n.jsx("div",{className:W,children:q}),t[59]=W,t[60]=q,t[61]=G):G=t[61];let Z;return t[62]!==B||t[63]!==G?(Z=n.jsxs(re,{className:"relative overflow-hidden",children:[B,G]}),t[62]=B,t[63]=G,t[64]=Z):Z=t[64],Z}function sn(){const t=N.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(re.Skeleton,{}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(wt,{fallback:e,children:n.jsx(y.Suspense,{fallback:n.jsx(re.Skeleton,{}),children:n.jsx(tn,{})})}),t[1]=s):s=t[1],s}function nn(){const t=N.c(33),[e]=Fe(),{locator:s,org:r}=ie(),l=ue(),o=Be(),{org:i,project:a}=ke.parse(s),c=ke.isOrgAdminProject(s),{data:d}=Es(r.id,a);let m;t[0]!==d?.enabledPlugins?(m=d?.enabledPlugins??[],t[0]=d?.enabledPlugins,t[1]=m):m=t[1];const f=m;let u;t[2]!==f?(u=P=>f.includes(P.pluginId),t[2]=f,t[3]=u):u=t[3];const p=rs.filter(u),x=o.location.pathname===`/${i}/${a}`||o.location.pathname===`/${i}/${a}/`;let h;t[4]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Ms,{}),t[4]=h):h=t[4];const j={key:"home",label:"Home",icon:h,onClick:()=>{x?window.dispatchEvent(new CustomEvent("reset-home-view")):l({to:"/$org/$project",params:{org:i,project:a}})}};let b;t[5]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(Ts,{}),t[5]=b):b=t[5];const g={key:"tasks",label:"Tasks",icon:b,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:Q}})};let v;t[6]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(bs,{}),t[6]=v):v=t[6];const S={key:"mcps",label:"Connections",icon:v,onClick:()=>l({to:"/$org/$project/mcps",params:{org:i,project:Q}})};let C;t[7]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(xt,{}),t[7]=C):C=t[7];const w={key:"projects",label:"Projects",icon:C,onClick:()=>l({to:"/$org/$project/projects",params:{org:i,project:Q}})};let _;t[8]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(At,{}),t[8]=_):_=t[8];const O={key:"store",label:"Store",icon:_,onClick:()=>l({to:"/$org/$project/store",params:{org:i,project:Q}})};let k;t[9]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(yt,{}),t[9]=k):k=t[9];const $={key:"agents",label:"Agents",icon:k,onClick:()=>l({to:"/$org/$project/agents",params:{org:i,project:Q}})};let I;t[10]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(Mt,{}),t[10]=I):I=t[10];const M={key:"monitoring",label:"Monitor",icon:I,onClick:()=>l({to:"/$org/$project/monitoring",params:{org:i,project:Q}})};let T;t[11]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(Je,{}),t[11]=T):T=t[11];const U={key:"workflows",label:"Workflows",icon:T,onClick:()=>l({to:"/$org/$project/workflows",params:{org:i,project:Q}})};let E;t[12]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(Rt,{}),t[12]=E):E=t[12];const L={key:"members",label:"Members",icon:E,onClick:()=>l({to:"/$org/$project/members",params:{org:i,project:Q}})},D=[g,S,U,...e.experimental_projects?[w]:[],O,$,M,L],A=p.map(P=>({key:P.pluginId,label:P.label,icon:P.icon,onClick:()=>l({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:P.pluginId}})}));let R;t[13]!==f?(R=P=>f.includes(P.pluginId),t[13]=f,t[14]=R):R=t[14];const H=ls.filter(R).map(P=>({type:"group",group:{id:`${P.pluginId}-${P.id}`,label:P.label,items:P.items.map((F,Y)=>({key:`${P.pluginId}-${P.id}-${Y}`,label:F.label,icon:F.icon,onClick:()=>l({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:P.pluginId}})})),defaultExpanded:P.defaultExpanded??!0}}));if(c){const P=[{type:"items",items:[j,...D]}];if(A.length>0){let F;t[15]===Symbol.for("react.memo_cache_sentinel")?(F={type:"divider"},t[15]=F):F=t[15],P.push(F);let Y;t[16]!==A?(Y={type:"items",items:A},t[16]=A,t[17]=Y):Y=t[17],P.push(Y)}if(H.length>0){if(A.length===0){let F;t[18]===Symbol.for("react.memo_cache_sentinel")?(F={type:"divider"},t[18]=F):F=t[18],P.push(F)}P.push(...H)}return P}let W;t[19]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(gs,{}),t[19]=W):W=t[19];let V;t[20]!==l||t[21]!==i||t[22]!==a?(V={key:"tasks",label:"Tasks",icon:W,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:a}})},t[20]=l,t[21]=i,t[22]=a,t[23]=V):V=t[23];const q=V;let G;t[24]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(Je,{}),t[24]=G):G=t[24];let Z;t[25]!==l||t[26]!==i||t[27]!==a?(Z={key:"workflows",label:"Workflows",icon:G,onClick:()=>l({to:"/$org/$project/workflows",params:{org:i,project:a}})},t[25]=l,t[26]=i,t[27]=a,t[28]=Z):Z=t[28];const X=[{type:"items",items:[j,q,Z]}];if(A.length>0){let P;t[29]===Symbol.for("react.memo_cache_sentinel")?(P={type:"divider"},t[29]=P):P=t[29],X.push(P);let F;t[30]!==A?(F={type:"items",items:A},t[30]=A,t[31]=F):F=t[31],X.push(F)}if(H.length>0){if(A.length===0){let P;t[32]===Symbol.for("react.memo_cache_sentinel")?(P={type:"divider"},t[32]=P):P=t[32],X.push(P)}X.push(...H)}return X}const rn="sidebar_state",ln=3600*24*7,on="16rem",an="18rem",cn="3rem",dn="b",Gt=y.createContext(null);function Ge(){const t=y.useContext(Gt);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function mn(t){const e=N.c(21),{defaultOpen:s,open:r,onOpenChange:l,children:o}=t,i=s===void 0?!0:s,a=Pe(),[c,d]=y.useState(!1),[m,f]=y.useState(i),u=r??m;let p;e[0]!==u||e[1]!==l?(p=O=>{const k=typeof O=="function"?O(u):O;l?l(k):f(k),document.cookie=`${rn}=${k}; path=/; max-age=${ln}`},e[0]=u,e[1]=l,e[2]=p):p=e[2];const x=p;let h;e[3]!==a||e[4]!==x?(h=()=>a?d(un):x(fn),e[3]=a,e[4]=x,e[5]=h):h=e[5];const j=h;let b,g;e[6]!==j?(b=()=>{const O=k=>{if(k.key===dn&&(k.metaKey||k.ctrlKey)){const $=k.target;if($.tagName==="INPUT"||$.tagName==="TEXTAREA"||$.isContentEditable)return;k.preventDefault(),j()}};return globalThis.addEventListener("keydown",O),()=>globalThis.removeEventListener("keydown",O)},g=[j],e[6]=j,e[7]=b,e[8]=g):(b=e[7],g=e[8]),y.useEffect(b,g);const v=u?"expanded":"collapsed";let S;e[9]!==a||e[10]!==u||e[11]!==c||e[12]!==x||e[13]!==v||e[14]!==j?(S={state:v,open:u,setOpen:x,isMobile:a,openMobile:c,setOpenMobile:d,toggleSidebar:j},e[9]=a,e[10]=u,e[11]=c,e[12]=x,e[13]=v,e[14]=j,e[15]=S):S=e[15];const C=S;let w;e[16]!==o?(w=n.jsx(vt,{delayDuration:0,children:o}),e[16]=o,e[17]=w):w=e[17];let _;return e[18]!==C||e[19]!==w?(_=n.jsx(Gt.Provider,{value:C,children:w}),e[18]=C,e[19]=w,e[20]=_):_=e[20],_}function fn(t){return!t}function un(t){return!t}function pn(t){const e=N.c(14);let s,r,l,o;e[0]!==t?({className:r,style:o,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o):(s=e[1],r=e[2],l=e[3],o=e[4]);let i;e[5]!==o?(i={"--sidebar-width":on,"--sidebar-width-icon":cn,...o},e[5]=o,e[6]=i):i=e[6];const a=i;let c;e[7]!==r?(c=z("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",r),e[7]=r,e[8]=c):c=e[8];let d;return e[9]!==s||e[10]!==l||e[11]!==a||e[12]!==c?(d=n.jsx("div",{"data-slot":"sidebar-wrapper",style:a,className:c,...l,children:s}),e[9]=s,e[10]=l,e[11]=a,e[12]=c,e[13]=d):d=e[13],d}function xn(t){const e=N.c(46);let s,r,l,o,i,a;e[0]!==t?({side:o,variant:i,collapsible:a,className:r,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5],a=e[6]);const c=o===void 0?"left":o,d=i===void 0?"sidebar":i,m=a===void 0?"offcanvas":a,{isMobile:f,state:u,openMobile:p,setOpenMobile:x}=Ge();if(m==="none"){let k;e[7]!==r?(k=z("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),e[7]=r,e[8]=k):k=e[8];let $;return e[9]!==s||e[10]!==l||e[11]!==k?($=n.jsx("div",{"data-slot":"sidebar",className:k,...l,children:s}),e[9]=s,e[10]=l,e[11]=k,e[12]=$):$=e[12],$}if(f){let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k={"--sidebar-width":an},e[13]=k):k=e[13];let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=n.jsxs($s,{className:"sr-only",children:[n.jsx(Is,{children:"Sidebar"}),n.jsx(Os,{children:"Displays the mobile sidebar."})]}),e[14]=$):$=e[14];let I;e[15]!==s?(I=n.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=I):I=e[16];let M;e[17]!==c||e[18]!==I?(M=n.jsxs(Ps,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:k,side:c,children:[$,I]}),e[17]=c,e[18]=I,e[19]=M):M=e[19];let T;return e[20]!==p||e[21]!==l||e[22]!==x||e[23]!==M?(T=n.jsx(zs,{open:p,onOpenChange:x,...l,children:M}),e[20]=p,e[21]=l,e[22]=x,e[23]=M,e[24]=T):T=e[24],T}const h=u==="collapsed"?m:"",j=d==="floating"||d==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let b;e[25]!==j?(b=z("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",j),e[25]=j,e[26]=b):b=e[26];let g;e[27]!==b?(g=n.jsx("div",{"data-slot":"sidebar-gap",className:b}),e[27]=b,e[28]=g):g=e[28];const v=c==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",S=d==="floating"||d==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let C;e[29]!==r||e[30]!==v||e[31]!==S?(C=z("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",v,S,r),e[29]=r,e[30]=v,e[31]=S,e[32]=C):C=e[32];let w;e[33]!==s?(w=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border pt-2 flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:s}),e[33]=s,e[34]=w):w=e[34];let _;e[35]!==l||e[36]!==C||e[37]!==w?(_=n.jsx("div",{"data-slot":"sidebar-container",className:C,...l,children:w}),e[35]=l,e[36]=C,e[37]=w,e[38]=_):_=e[38];let O;return e[39]!==c||e[40]!==u||e[41]!==_||e[42]!==h||e[43]!==g||e[44]!==d?(O=n.jsxs("div",{className:"group peer text-foreground hidden md:block","data-state":u,"data-collapsible":h,"data-variant":d,"data-side":c,"data-slot":"sidebar",children:[g,_]}),e[39]=c,e[40]=u,e[41]=_,e[42]=h,e[43]=g,e[44]=d,e[45]=O):O=e[45],O}function hn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("main",{"data-slot":"sidebar-inset",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Kt(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function gn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-2 px-2 items-start justify-start",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function ot(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("h-4 m-0! w-full",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-sidebar":"separator",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function jn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Ie(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Oe(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("w-full text-sm",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function me(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex w-full min-w-0 flex-col gap-1",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function le(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("group/menu-item relative",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}const bn=is("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg px-2 py-1.5 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding,colors] transition-colors duration-150 ease-out hover:transition-none focus-visible:ring-2 active:bg-sidebar-accent/75 disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent/75 [&>span:last-child]:truncate [&>svg]:size-[18px] [&>svg]:shrink-0 [&>svg]:text-muted-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent text-sidebar-foreground/80 active:text-sidebar-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-7 text-sm font-[450]",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Te(t){const e=N.c(28);let s,r,l,o,i,a,c;e[0]!==t?({asChild:l,isActive:o,variant:i,size:a,tooltip:c,className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a,e[7]=c):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5],a=e[6],c=e[7]);const d=l===void 0?!1:l,m=o===void 0?!1:o,f=i===void 0?"default":i,u=a===void 0?"default":a,p=d?os:"button",{isMobile:x,state:h}=Ge();let j;e[8]!==s||e[9]!==u||e[10]!==f?(j=z(bn({variant:f,size:u}),s),e[8]=s,e[9]=u,e[10]=f,e[11]=j):j=e[11];let b;e[12]!==p||e[13]!==m||e[14]!==r||e[15]!==u||e[16]!==j?(b=n.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":m,className:j,...r}),e[12]=p,e[13]=m,e[14]=r,e[15]=u,e[16]=j,e[17]=b):b=e[17];const g=b;if(!c)return g;if(typeof c=="string"){let _;e[18]!==c?(_={children:c},e[18]=c,e[19]=_):_=e[19],c=_}let v;e[20]!==g?(v=n.jsx(Re,{asChild:!0,children:g}),e[20]=g,e[21]=v):v=e[21];const S=h!=="collapsed"||x;let C;e[22]!==S||e[23]!==c?(C=n.jsx(De,{side:"right",align:"center",hidden:S,...c}),e[22]=S,e[23]=c,e[24]=C):C=e[24];let w;return e[25]!==v||e[26]!==C?(w=n.jsxs(He,{children:[v,C]}),e[25]=v,e[26]=C,e[27]=w):w=e[27],w}function vn(t){const e=N.c(18),{label:s,children:r,defaultExpanded:l}=t,o=l===void 0?!0:l,[i,a]=y.useState(o);let c;e[0]!==i?(c=()=>a(!i),e[0]=i,e[1]=c):c=e[1];let d;e[2]!==s?(d=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[2]=s,e[3]=d):d=e[3];const m=!i&&"-rotate-90";let f;e[4]!==m?(f=z("text-muted-foreground transition-transform duration-200",m),e[4]=m,e[5]=f):f=e[5];let u;e[6]!==f?(u=n.jsx(tt,{size:12,className:f}),e[6]=f,e[7]=u):u=e[7];let p;e[8]!==c||e[9]!==d||e[10]!==u?(p=n.jsx(me,{children:n.jsx(le,{children:n.jsxs(Te,{className:"h-6 cursor-pointer select-none",onClick:c,children:[d,u]})})}),e[8]=c,e[9]=d,e[10]=u,e[11]=p):p=e[11];let x;e[12]!==r||e[13]!==i?(x=i&&n.jsx(Oe,{children:n.jsx(me,{className:"gap-0.5",children:r})}),e[12]=r,e[13]=i,e[14]=x):x=e[14];let h;return e[15]!==p||e[16]!==x?(h=n.jsxs(Ie,{className:"py-0",children:[p,x]}),e[15]=p,e[16]=x,e[17]=h):h=e[17],h}function Zt(t){const e=N.c(13),{item:s}=t;let r;e[0]!==s.icon?(r=n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:s.icon}),e[0]=s.icon,e[1]=r):r=e[1];let l;e[2]!==s.label?(l=n.jsx("span",{className:"truncate",children:s.label}),e[2]=s.label,e[3]=l):l=e[3];let o;e[4]!==s.isActive||e[5]!==s.label||e[6]!==s.onClick||e[7]!==r||e[8]!==l?(o=n.jsxs(Te,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:s.onClick,isActive:s.isActive,tooltip:s.label,children:[r,l]}),e[4]=s.isActive,e[5]=s.label,e[6]=s.onClick,e[7]=r,e[8]=l,e[9]=o):o=e[9];let i;return e[10]!==s.key||e[11]!==o?(i=n.jsx(le,{children:o},s.key),e[10]=s.key,e[11]=o,e[12]=i):i=e[12],i}function Nn(t){const e=N.c(12),{section:s}=t;switch(s.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ot,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=s.group.label,l=s.group.defaultExpanded;let o;e[2]!==s.group.items?(o=s.group.items.map(yn),e[2]=s.group.items,e[3]=o):o=e[3];let i;return e[4]!==s.group.defaultExpanded||e[5]!==s.group.label||e[6]!==o?(i=n.jsx(vn,{label:r,defaultExpanded:l,children:o}),e[4]=s.group.defaultExpanded,e[5]=s.group.label,e[6]=o,e[7]=i):i=e[7],i}case"items":{let r;e[8]!==s.items?(r=s.items.map(Sn),e[8]=s.items,e[9]=r):r=e[9];let l;return e[10]!==r?(l=n.jsx(Ie,{className:"py-0",children:n.jsx(Oe,{children:n.jsx(me,{className:"gap-0.5",children:r})})}),e[10]=r,e[11]=l):l=e[11],l}}}function Sn(t){return n.jsx(Zt,{item:t},t.key)}function yn(t){return n.jsx(Zt,{item:t},t.key)}function Yt(t){const e=N.c(14),{sections:s,header:r,footer:l,additionalContent:o,variant:i,collapsible:a,contentClassName:c}=t,d=i===void 0?"sidebar":i,m=a===void 0?"icon":a;let f;e[0]!==c?(f=z("flex flex-col flex-1 overflow-x-hidden font-medium border-r pb-2",c),e[0]=c,e[1]=f):f=e[1];let u;e[2]!==s?(u=s.map(wn),e[2]=s,e[3]=u):u=e[3];let p;e[4]!==o||e[5]!==f||e[6]!==u?(p=n.jsxs(jn,{className:f,children:[u,o]}),e[4]=o,e[5]=f,e[6]=u,e[7]=p):p=e[7];let x;return e[8]!==m||e[9]!==l||e[10]!==r||e[11]!==p||e[12]!==d?(x=n.jsxs(xn,{variant:d,collapsible:m,children:[r,p,l]}),e[8]=m,e[9]=l,e[10]=r,e[11]=p,e[12]=d,e[13]=x):x=e[13],x}function wn(t,e){return n.jsx(Nn,{section:t},e)}Yt.Skeleton=function(){return n.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>n.jsx("div",{className:"w-full h-8",children:n.jsx(ee,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};const Cn="w-full h-8 justify-start gap-2 px-2 text-sm font-[450] text-sidebar-foreground hover:text-sidebar-foreground hover:bg-sidebar-accent active:bg-sidebar-accent/75 [&>svg]:size-[18px] [&>svg]:text-muted-foreground hover:[&>svg]:text-sidebar-foreground";function ze(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z(Cn,s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx(te,{variant:"ghost",size:"sm",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function kn({invitation:t,onStatusChange:e}){const[s,r]=y.useState(!1),[l,o]=y.useState(!1),i=ue(),a=async()=>{r(!0);try{const p=await oe.organization.acceptInvitation({invitationId:t.id});if(p.error)ce.error(p.error.message),r(!1);else{e(t.id,"accepted");const x=await oe.organization.setActive({organizationId:t.organizationId});x?.data?.slug?(ce.success("Invitation accepted!"),i({to:"/$org",params:{org:x.data.slug}})):(ce.success("Invitation accepted! Redirecting..."),i({to:"/"}))}}catch{ce.error("Failed to accept invitation"),r(!1)}},c=async()=>{o(!0);try{const p=await oe.organization.rejectInvitation({invitationId:t.id});p.error?(ce.error(p.error.message),o(!1)):(ce.success("Invitation rejected"),e(t.id,"rejected"),o(!1))}catch{ce.error("Failed to reject invitation"),o(!1)}},d=t.organizationName||t.organizationId,m=t.status==="pending",f=t.status==="accepted",u=t.status==="rejected";return n.jsxs("div",{className:z("flex items-center gap-3 px-3 py-2 h-12 border-b border-border/50 last:border-b-0",!m&&"opacity-50"),children:[n.jsx("div",{className:"shrink-0 size-5 flex items-center justify-center",children:n.jsx(Wt,{size:16,className:"text-muted-foreground"})}),n.jsxs("p",{className:"flex-1 text-sm text-foreground min-w-0 whitespace-nowrap overflow-hidden",children:["You have been invited to ",n.jsx("span",{className:"font-semibold inline-block max-w-[200px] truncate align-bottom",children:d})]}),n.jsx("div",{className:"flex items-center gap-1 shrink-0",children:m?n.jsxs(n.Fragment,{children:[n.jsx(te,{variant:"ghost",size:"icon",onClick:c,disabled:s||l,className:"h-8 w-8",children:n.jsx(ct,{size:14})}),n.jsx(te,{variant:"outline",size:"icon",onClick:a,disabled:s||l,className:"h-8 w-8",children:n.jsx($e,{size:14})})]}):f?n.jsxs(at,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx($e,{size:12}),"Accepted"]}):u?n.jsxs(at,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(ct,{size:12}),"Declined"]}):null})]})}function _n(){const[t,e]=y.useState(!1),s=y.useContext(as),{data:r}=s.hooks.useListUserInvitations(),{data:l}=oe.useListOrganizations(),[o,i]=y.useState({}),m=(r??[]).filter(h=>new Date(h.expiresAt)>new Date).map(h=>{const j=(l??[]).find(b=>b.id===h.organizationId);return{...h,organizationSlug:j?.slug||h.organizationSlug,organizationName:j?.name||h.organizationName}}).map(h=>({...h,status:o[h.id]||h.status})),f=[...m].sort((h,j)=>{const b={pending:0,accepted:1,rejected:2};return(b[h.status]??999)-(b[j.status]??999)}),p=m.filter(h=>h.status==="pending").length>0,x=(h,j)=>{i(b=>({...b,[h]:j}))};return n.jsxs(st,{open:t,onOpenChange:e,children:[n.jsx(nt,{asChild:!0,children:n.jsxs(ze,{children:[n.jsx(it,{size:18}),"Inbox",p&&n.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]})}),n.jsxs(rt,{side:"right",align:"start",className:"w-[400px] p-0 overflow-hidden",children:[n.jsx("div",{className:"px-4 py-3 border-b border-border",children:n.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Inbox"})}),n.jsx("div",{className:"max-h-96 overflow-auto",children:f.length>0?f.map(h=>n.jsx(kn,{invitation:h,onStatusChange:x},h.id)):n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[n.jsx(it,{size:32,className:"text-muted-foreground/40 mb-2"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"No invitations at the moment"})]})})]})]})}function zn(t){const e=N.c(29),{user:s,userImage:r,onOpenSettings:l}=t;let o;e[0]!==s?(o=async()=>{if(!s)return;const _=`ID: ${s.id}
|
|
2
|
-
Name: ${s.name||"N/A"}
|
|
3
|
-
Email: ${s.email}`;try{await navigator.clipboard.writeText(_),ce.success("User info copied to clipboard")}catch{ce.error("Failed to copy user info to clipboard")}},e[0]=s,e[1]=o):o=e[1];const i=o,a=s.name||s.email||"U";let c;e[2]!==a||e[3]!==r?(c=n.jsx(de,{url:r,fallback:a,shape:"circle",size:"sm",className:"size-8 shrink-0"}),e[2]=a,e[3]=r,e[4]=c):c=e[4];const d=s.name||"User";let m;e[5]!==d?(m=n.jsx("span",{className:"text-sm text-sidebar-foreground truncate font-[450]",children:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==s.email?(f=n.jsx("span",{className:"text-xs text-muted-foreground truncate font-normal",children:s.email}),e[7]=s.email,e[8]=f):f=e[8];let u;e[9]!==m||e[10]!==f?(u=n.jsxs("div",{className:"flex flex-col min-w-0 text-left",children:[m,f]}),e[9]=m,e[10]=f,e[11]=u):u=e[11];let p;e[12]!==i||e[13]!==c||e[14]!==u?(p=n.jsxs(te,{variant:"ghost",onClick:i,className:"h-auto p-2 m-1 mb-0 justify-start gap-2 hover:bg-sidebar-accent hover:text-inherit active:bg-sidebar-accent/75",children:[c,u]}),e[12]=i,e[13]=c,e[14]=u,e[15]=p):p=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(_n,{}),e[16]=x):x=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Vt,{size:18}),e[17]=h):h=e[17];let j;e[18]!==l?(j=n.jsxs(ze,{onClick:l,children:[h,"Preferences"]}),e[18]=l,e[19]=j):j=e[19];let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(ze,{asChild:!0,children:n.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(Et,{size:18}),n.jsx("span",{className:"flex-1",children:"Terms & Conditions"}),n.jsx(qe,{size:14})]})}),e[20]=b):b=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(ze,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(ht,{className:"size-[18px]"}),n.jsx("span",{className:"flex-1",children:"decocms/mesh"}),n.jsx(qe,{size:14})]})}),e[21]=g):g=e[21];let v;e[22]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsxs(ze,{onClick:$n,children:[n.jsx(Ft,{size:18}),"Log out"]}),e[22]=v):v=e[22];let S;e[23]!==j?(S=n.jsxs("div",{className:"p-1 flex flex-col",children:[x,j,b,g,v]}),e[23]=j,e[24]=S):S=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx("div",{className:"mt-auto px-3 py-2 border-t border-border",children:n.jsxs("span",{className:"text-[11px] text-muted-foreground/75",children:["v","2.84.0"]})}),e[25]=C):C=e[25];let w;return e[26]!==S||e[27]!==p?(w=n.jsx(n.Fragment,{children:n.jsxs("div",{className:"flex flex-col gap-0.5 bg-sidebar min-w-[250px]",children:[p,S,C]})}),e[26]=S,e[27]=p,e[28]=w):w=e[28],w}function $n(){return oe.signOut()}function In(t){const e=N.c(26),{org:s,isActive:r,isHovered:l,onClick:o,onSettings:i,onHover:a}=t,c=r,d=l&&!r,m=l&&"bg-accent/50",f=r&&!l&&"bg-accent hover:bg-accent";let u;e[0]!==m||e[1]!==f?(u=z("flex items-center gap-2 w-full justify-start font-normal h-10 px-2 rounded-lg cursor-pointer transition-colors",m,f),e[0]=m,e[1]=f,e[2]=u):u=e[2];let p;e[3]!==o?(p=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),o?.())},e[3]=o,e[4]=p):p=e[4];let x;e[5]!==a||e[6]!==s.id?(x=()=>a?.(s.id),e[5]=a,e[6]=s.id,e[7]=x):x=e[7];const h=s.logo??void 0;let j;e[8]!==s.name||e[9]!==h?(j=n.jsx(de,{url:h,fallback:s.name,size:"sm",className:"size-6 shrink-0 rounded-md",objectFit:"cover"}),e[8]=s.name,e[9]=h,e[10]=j):j=e[10];let b;e[11]!==s.name?(b=n.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:s.name}),e[11]=s.name,e[12]=b):b=e[12];let g;e[13]!==i||e[14]!==s.name||e[15]!==d||e[16]!==c?(g=i&&c?n.jsx("button",{type:"button","aria-label":`${s.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:S=>{S.stopPropagation(),i()},children:n.jsx(lt,{size:16,className:"text-muted-foreground"})}):d?n.jsx(_t,{size:16,className:"text-muted-foreground shrink-0"}):n.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[13]=i,e[14]=s.name,e[15]=d,e[16]=c,e[17]=g):g=e[17];let v;return e[18]!==o||e[19]!==u||e[20]!==p||e[21]!==x||e[22]!==j||e[23]!==b||e[24]!==g?(v=n.jsxs("div",{role:"button",tabIndex:0,className:u,onClick:o,onKeyDown:p,onMouseEnter:x,children:[j,b,g]}),e[18]=o,e[19]=u,e[20]=p,e[21]=x,e[22]=j,e[23]=b,e[24]=g,e[25]=v):v=e[25],v}function On(t){const e=N.c(34),{currentOrgSlug:s,hoveredOrgId:r,onOrgSelect:l,onOrgSettings:o,onPopoverClose:i,onCreateOrganization:a,onOrgHover:c}=t,{data:d}=oe.useListOrganizations();let m,f,u,p;if(e[0]!==s||e[1]!==r||e[2]!==a||e[3]!==c||e[4]!==l||e[5]!==o||e[6]!==i||e[7]!==d){let j;e[12]!==s?(j=(w,_)=>w.slug===s?-1:_.slug===s?1:w.name.localeCompare(_.name),e[12]=s,e[13]=j):j=e[13];const b=[...d??[]].sort(j);u="flex flex-col min-w-[240px] border-l border-border";let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:"Your Organizations"}),e[14]=g):g=e[14];let v;e[15]!==a||e[16]!==i?(v=()=>{i(),a()},e[15]=a,e[16]=i,e[17]=v):v=e[17];let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Ve,{size:16,className:"text-muted-foreground"}),e[18]=S):S=e[18],e[19]!==v?(p=n.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[g,n.jsx(te,{variant:"ghost",size:"icon",className:"size-5",onClick:v,children:S})]}),e[19]=v,e[20]=p):p=e[20],m="flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto";let C;e[21]!==s||e[22]!==r||e[23]!==c||e[24]!==l||e[25]!==o?(C=w=>n.jsx(In,{org:w,isActive:w.slug===s,isHovered:w.id===r,onClick:()=>l(w.slug),onSettings:()=>o(w.slug),onHover:c},w.slug),e[21]=s,e[22]=r,e[23]=c,e[24]=l,e[25]=o,e[26]=C):C=e[26],f=b.map(C),e[0]=s,e[1]=r,e[2]=a,e[3]=c,e[4]=l,e[5]=o,e[6]=i,e[7]=d,e[8]=m,e[9]=f,e[10]=u,e[11]=p}else m=e[8],f=e[9],u=e[10],p=e[11];let x;e[27]!==m||e[28]!==f?(x=n.jsx("div",{className:m,children:f}),e[27]=m,e[28]=f,e[29]=x):x=e[29];let h;return e[30]!==u||e[31]!==p||e[32]!==x?(h=n.jsxs("div",{className:u,children:[p,x]}),e[30]=u,e[31]=p,e[32]=x,e[33]=h):h=e[33],h}function Pn(t){const e=N.c(27),{project:s,isActive:r,onClick:l,onSettings:o}=t,[i,a]=y.useState(!1),c=r||i,d=s.ui?.themeColor??"#3B82F6",m=r&&"bg-accent hover:bg-accent";let f;e[0]!==m?(f=z("flex items-center gap-2 w-full justify-start font-normal h-10 px-2 rounded-lg cursor-pointer transition-colors hover:bg-accent/50",m),e[0]=m,e[1]=f):f=e[1];let u;e[2]!==l?(u=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),l?.())},e[2]=l,e[3]=u):u=e[3];let p,x;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>a(!0),x=()=>a(!1),e[4]=p,e[5]=x):(p=e[4],x=e[5]);let h;e[6]!==s.name||e[7]!==s.ui||e[8]!==d?(h=s.ui?.icon?n.jsx("img",{src:s.ui.icon,alt:"",className:"size-6 rounded-md object-cover shrink-0"}):n.jsx(de,{fallback:s.name,size:"sm",shape:"square",className:"size-6 shrink-0 rounded-md",style:{backgroundColor:d}}),e[6]=s.name,e[7]=s.ui,e[8]=d,e[9]=h):h=e[9];let j;e[10]!==s.name?(j=n.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:s.name}),e[10]=s.name,e[11]=j):j=e[11];let b;e[12]!==r?(b=r&&n.jsx($e,{size:16,className:"text-muted-foreground shrink-0"}),e[12]=r,e[13]=b):b=e[13];let g;e[14]!==r||e[15]!==o||e[16]!==s.name||e[17]!==c?(g=o&&c&&!r?n.jsx("button",{type:"button","aria-label":`${s.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:S=>{S.stopPropagation(),o()},children:n.jsx(lt,{size:16,className:"text-muted-foreground"})}):r?null:n.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[14]=r,e[15]=o,e[16]=s.name,e[17]=c,e[18]=g):g=e[18];let v;return e[19]!==l||e[20]!==f||e[21]!==u||e[22]!==h||e[23]!==j||e[24]!==b||e[25]!==g?(v=n.jsxs("div",{role:"button",tabIndex:0,className:f,onClick:l,onKeyDown:u,onMouseEnter:p,onMouseLeave:x,children:[h,j,b,g]}),e[19]=l,e[20]=f,e[21]=u,e[22]=h,e[23]=j,e[24]=b,e[25]=g,e[26]=v):v=e[26],v}function Tn(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"space-y-1 px-2 py-1",children:[n.jsx(ee,{className:"h-10 w-full"}),n.jsx(ee,{className:"h-10 w-full"})]}),t[0]=e):e=t[0],e}function Mn(t){const e=N.c(16),{organizationId:s,currentProjectSlug:r,onProjectSelect:l,onProjectSettings:o,orgSlug:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={suspense:!0},e[0]=a):a=e[0];const{data:c}=kt(s,a);let d,m;if(e[1]!==r||e[2]!==l||e[3]!==o||e[4]!==i||e[5]!==c){m=Symbol.for("react.early_return_sentinel");e:{const u=c?.filter(En)??[];if(u.length===0){let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("div",{className:"px-3 py-4 text-center text-sm text-muted-foreground",children:"No projects yet"}),e[8]=x):x=e[8],m=x;break e}let p;e[9]!==r||e[10]!==l||e[11]!==o||e[12]!==i?(p=x=>n.jsx(Pn,{project:x,isActive:r===x.slug,onClick:()=>l(i,x.slug),onSettings:o?()=>o(i,x.slug):void 0},x.id),e[9]=r,e[10]=l,e[11]=o,e[12]=i,e[13]=p):p=e[13],d=u.map(p)}e[1]=r,e[2]=l,e[3]=o,e[4]=i,e[5]=c,e[6]=d,e[7]=m}else d=e[6],m=e[7];if(m!==Symbol.for("react.early_return_sentinel"))return m;let f;return e[14]!==d?(f=n.jsx(n.Fragment,{children:d}),e[14]=d,e[15]=f):f=e[15],f}function En(t){return t.slug!==Q}function An(t){const e=N.c(17),{organizationId:s,organizationName:r,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,onCreateProject:a,orgSlug:c}=t;let d;e[0]!==r?(d=n.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["Projects in ",r]}),e[0]=r,e[1]=d):d=e[1];let m;e[2]!==a?(m=a&&n.jsx("button",{type:"button",className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:a,"aria-label":"Create project",children:n.jsx(Ve,{size:16,className:"text-muted-foreground"})}),e[2]=a,e[3]=m):m=e[3];let f;e[4]!==d||e[5]!==m?(f=n.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[d,m]}),e[4]=d,e[5]=m,e[6]=f):f=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Tn,{}),e[7]=u):u=e[7];let p;e[8]!==l||e[9]!==o||e[10]!==i||e[11]!==c||e[12]!==s?(p=n.jsx("div",{className:"flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto",children:n.jsx(y.Suspense,{fallback:u,children:n.jsx(Mn,{organizationId:s,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,orgSlug:c})})}),e[8]=l,e[9]=o,e[10]=i,e[11]=c,e[12]=s,e[13]=p):p=e[13];let x;return e[14]!==f||e[15]!==p?(x=n.jsxs("div",{className:"flex flex-col min-w-[250px] border-l border-border",children:[f,p]}),e[14]=f,e[15]=p,e[16]=x):x=e[16],x}function qt(t){const e=N.c(67),{open:s,onOpenChange:r,user:l,userImage:o}=t,[i,a]=Fe(),[c,d]=y.useState(!1);let m;e[0]!==l.id?(m=()=>{navigator.clipboard.writeText(l.id),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=l.id,e[1]=m):m=e[1];const f=m;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(As,{className:"text-base",children:"Profile Settings"}),e[2]=u):u=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsxs(Ls,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[u,n.jsxs(Ds,{className:"absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[n.jsx(Ue,{size:16}),n.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[3]=p):p=e[3];const x=l.name||"U";let h;e[4]!==x||e[5]!==o?(h=n.jsx(de,{url:o,fallback:x,shape:"circle",size:"xl",className:"h-16 w-16"}),e[4]=x,e[5]=o,e[6]=h):h=e[6];const j=l.name||"User";let b;e[7]!==j?(b=n.jsx("span",{className:"text-base font-medium text-foreground",children:j}),e[7]=j,e[8]=b):b=e[8];let g;e[9]!==l.email?(g=n.jsx("span",{className:"text-sm text-muted-foreground",children:l.email}),e[9]=l.email,e[10]=g):g=e[10];let v;e[11]!==b||e[12]!==g?(v=n.jsxs("div",{className:"flex flex-col gap-1",children:[b,g]}),e[11]=b,e[12]=g,e[13]=v):v=e[13];let S;e[14]!==h||e[15]!==v?(S=n.jsxs("div",{className:"flex items-center gap-4",children:[h,v]}),e[14]=h,e[15]=v,e[16]=S):S=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Preferences"}),e[17]=C):C=e[17];let w;e[18]!==a?(w=()=>a(Hn),e[18]=a,e[19]=w):w=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(dt,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(Us,{size:16,className:"text-muted-foreground"}),"Developer Mode"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Show technical details like JSON input/output for tool calls"})]}),e[20]=_):_=e[20];let O;e[21]!==a?(O=J=>a(X=>({...X,devMode:J})),e[21]=a,e[22]=O):O=e[22];let k;e[23]!==i.devMode||e[24]!==O?(k=n.jsx("div",{onClick:Rn,children:n.jsx(mt,{checked:i.devMode,onCheckedChange:O})}),e[23]=i.devMode,e[24]=O,e[25]=k):k=e[25];let $;e[26]!==w||e[27]!==k?($=n.jsxs("div",{className:"flex flex-col gap-2",children:[C,n.jsxs("button",{type:"button",onClick:w,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[_,k]})]}),e[26]=w,e[27]=k,e[28]=$):$=e[28];let I,M;e[29]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Experimental"}),M=n.jsx("p",{className:"text-xs text-muted-foreground",children:"Experimental features are unstable and may change or stop working at any time."}),e[29]=I,e[30]=M):(I=e[29],M=e[30]);let T;e[31]!==a?(T=()=>a(Dn),e[31]=a,e[32]=T):T=e[32];let U;e[33]===Symbol.for("react.memo_cache_sentinel")?(U=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(dt,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(xt,{size:16,className:"text-muted-foreground"}),"Projects"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the projects feature in the sidebar"})]}),e[33]=U):U=e[33];let E;e[34]!==a?(E=J=>a(X=>({...X,experimental_projects:J})),e[34]=a,e[35]=E):E=e[35];let L;e[36]!==i.experimental_projects||e[37]!==E?(L=n.jsx("div",{onClick:Ln,children:n.jsx(mt,{checked:i.experimental_projects,onCheckedChange:E})}),e[36]=i.experimental_projects,e[37]=E,e[38]=L):L=e[38];let D;e[39]!==T||e[40]!==L?(D=n.jsxs("div",{className:"flex flex-col gap-2",children:[I,M,n.jsxs("button",{type:"button",onClick:T,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[U,L]})]}),e[39]=T,e[40]=L,e[41]=D):D=e[41];let A;e[42]!==S||e[43]!==$||e[44]!==D?(A=n.jsxs("div",{className:"p-5 space-y-6 min-h-[225px]",children:[S,$,D]}),e[42]=S,e[43]=$,e[44]=D,e[45]=A):A=e[45];let R;e[46]!==l.id?(R=n.jsx("span",{className:"font-mono text-xs",children:l.id}),e[46]=l.id,e[47]=R):R=e[47];let B;e[48]!==c?(B=c?n.jsx($e,{size:14,className:"text-green-600"}):n.jsx($t,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[48]=c,e[49]=B):B=e[49];let H;e[50]!==f||e[51]!==R||e[52]!==B?(H=n.jsx(Re,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:f,className:"group flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[R,B]})}),e[50]=f,e[51]=R,e[52]=B,e[53]=H):H=e[53];let W;e[54]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(De,{side:"top",children:n.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[54]=W):W=e[54];let V;e[55]!==H?(V=n.jsx(vt,{children:n.jsxs(He,{children:[H,W]})}),e[55]=H,e[56]=V):V=e[56];let q;e[57]===Symbol.for("react.memo_cache_sentinel")?(q=n.jsxs("span",{className:"text-xs text-muted-foreground/75",children:["v","2.84.0"]}),e[57]=q):q=e[57];let G;e[58]!==V?(G=n.jsxs("div",{className:"border-t border-border px-5 py-4 flex items-center justify-between shrink-0",children:[V,q]}),e[58]=V,e[59]=G):G=e[59];let Z;e[60]!==A||e[61]!==G?(Z=n.jsxs(Rs,{className:"sm:max-w-lg sm:max-h-[85vh] p-0 flex flex-col",closeButtonClassName:"hidden",children:[p,n.jsxs("div",{className:"flex flex-col",children:[A,G]})]}),e[60]=A,e[61]=G,e[62]=Z):Z=e[62];let K;return e[63]!==r||e[64]!==s||e[65]!==Z?(K=n.jsx(Hs,{open:s,onOpenChange:r,children:Z}),e[63]=r,e[64]=s,e[65]=Z,e[66]=K):K=e[66],K}function Ln(t){return t.stopPropagation()}function Dn(t){return{...t,experimental_projects:!t.experimental_projects}}function Rn(t){return t.stopPropagation()}function Hn(t){return{...t,devMode:!t.devMode}}function Jt(t){const e=N.c(77),{isCollapsed:s,variant:r,onCreateProject:l}=t,o=s===void 0?!1:s,i=r===void 0?"light":r,[a]=Fe();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const{org:d,project:m}=et(c),{data:f}=oe.useListOrganizations(),{data:u}=oe.useSession(),p=ue(),x=i==="dark",j=ie()?.project;let b;e[1]!==d||e[2]!==f?(b=f?.find(se=>se.slug===d),e[1]=d,e[2]=f,e[3]=b):b=e[3];const g=b,[v,S]=y.useState(!1),[C,w]=y.useState(!1),[_,O]=y.useState(!1),[k,$]=y.useState(null),I=u?.user,M=I?.image;let T;e[4]!==g||e[5]!==k||e[6]!==f?(T=k?f?.find(se=>se.id===k):g,e[4]=g,e[5]=k,e[6]=f,e[7]=T):T=e[7];const U=T;let E;e[8]!==p?(E=se=>{S(!1),p({to:"/$org/$project/settings",params:{org:se,project:Q}})},e[8]=p,e[9]=E):E=e[9];const L=E;let D;e[10]!==p?(D=se=>{S(!1),p({to:"/$org/$project",params:{org:se,project:Q}})},e[10]=p,e[11]=D):D=e[11];const A=D;let R;e[12]!==p?(R=(se,Ye)=>{S(!1),p({to:"/$org/$project",params:{org:se,project:Ye}})},e[12]=p,e[13]=R):R=e[13];const B=R;let H;e[14]!==p?(H=(se,Ye)=>{S(!1),p({to:"/$org/$project/settings",params:{org:se,project:Ye}})},e[14]=p,e[15]=H):H=e[15];const W=H;let V;e[16]!==l?(V=l?()=>{S(!1),l()}:void 0,e[16]=l,e[17]=V):V=e[17];const q=V;let G;e[18]===Symbol.for("react.memo_cache_sentinel")?(G=se=>{S(se),se||$(null)},e[18]=G):G=e[18];const Z=G;let K;e[19]!==g?(K=()=>{g&&$(g.id)},e[19]=g,e[20]=K):K=e[20];const J=K,X=x?"hover:bg-zinc-800 text-white":"hover:bg-sidebar-accent",P=o?"justify-center":"justify-start",F=o?"":"pl-0.5! px-1.5 gap-1.5";let Y;e[21]!==X||e[22]!==P||e[23]!==F?(Y=z("h-7 min-w-0 max-w-full",X,P,F),e[21]=X,e[22]=P,e[23]=F,e[24]=Y):Y=e[24];const fe=g?.logo??"",Ke=g?.name??"",Ze=x&&"border-none";let pe;e[25]!==Ze?(pe=z("shrink-0 rounded-[5px]",Ze),e[25]=Ze,e[26]=pe):pe=e[26];let xe;e[27]!==fe||e[28]!==Ke||e[29]!==pe?(xe=n.jsx(de,{url:fe,fallback:Ke,size:"xs",className:pe,objectFit:"cover"}),e[27]=fe,e[28]=Ke,e[29]=pe,e[30]=xe):xe=e[30];let he;e[31]!==g?.name||e[32]!==j||e[33]!==o||e[34]!==x?(he=!o&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:z("min-w-0 text-left",x&&"flex-1"),children:x&&j?n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-[10px] text-zinc-500 leading-none truncate",children:g?.name??"Select org"}),n.jsx("p",{className:"text-sm text-white font-normal leading-tight mt-0.5 truncate",children:j.name??j.slug})]}):n.jsx("span",{className:"truncate text-[14px] tracking-[-0.00625rem] font-medium text-foreground",children:g?.name??"Select org"})}),x?n.jsx(Nt,{className:"size-3 text-zinc-500 shrink-0"}):n.jsx(tt,{className:"size-3.5 text-muted-foreground shrink-0"})]}),e[31]=g?.name,e[32]=j,e[33]=o,e[34]=x,e[35]=he):he=e[35];let ge;e[36]!==J||e[37]!==Y||e[38]!==xe||e[39]!==he?(ge=n.jsx(nt,{asChild:!0,children:n.jsxs(te,{variant:"ghost",size:"sm",onClick:J,className:Y,children:[xe,he]})}),e[36]=J,e[37]=Y,e[38]=xe,e[39]=he,e[40]=ge):ge=e[40];let je;e[41]!==I||e[42]!==M?(je=I&&n.jsx(zn,{user:I,userImage:M,onOpenSettings:()=>{w(!0),S(!1)}}),e[41]=I,e[42]=M,e[43]=je):je=e[43];let Me,Ee;e[44]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>S(!1),Ee=()=>O(!0),e[44]=Me,e[45]=Ee):(Me=e[44],Ee=e[45]);let be;e[46]!==L||e[47]!==A||e[48]!==k||e[49]!==d?(be=n.jsx(On,{currentOrgSlug:d,hoveredOrgId:k,onOrgSelect:A,onOrgSettings:L,onPopoverClose:Me,onCreateOrganization:Ee,onOrgHover:$}),e[46]=L,e[47]=A,e[48]=k,e[49]=d,e[50]=be):be=e[50];let ve;e[51]!==q||e[52]!==W||e[53]!==B||e[54]!==U||e[55]!==d||e[56]!==a.experimental_projects||e[57]!==m?(ve=a.experimental_projects&&U&&n.jsx(An,{organizationId:U.id,organizationName:U.name,orgSlug:U.slug,currentProjectSlug:U.slug===d?m:void 0,onProjectSelect:B,onProjectSettings:W,onCreateProject:q}),e[51]=q,e[52]=W,e[53]=B,e[54]=U,e[55]=d,e[56]=a.experimental_projects,e[57]=m,e[58]=ve):ve=e[58];let Ne;e[59]!==je||e[60]!==be||e[61]!==ve?(Ne=n.jsxs(rt,{align:"start",side:"bottom",className:"p-0 flex w-auto h-88 overflow-hidden",children:[je,be,ve]}),e[59]=je,e[60]=be,e[61]=ve,e[62]=Ne):Ne=e[62];let Se;e[63]!==v||e[64]!==ge||e[65]!==Ne?(Se=n.jsxs(st,{open:v,onOpenChange:Z,children:[ge,Ne]}),e[63]=v,e[64]=ge,e[65]=Ne,e[66]=Se):Se=e[66];let ye;e[67]!==C||e[68]!==I||e[69]!==M?(ye=I&&C&&I.email&&n.jsx(qt,{open:C,onOpenChange:w,user:{...I,name:I.name??void 0,email:I.email},userImage:M}),e[67]=C,e[68]=I,e[69]=M,e[70]=ye):ye=e[70];let we;e[71]!==_?(we=n.jsx(zt,{open:_,onOpenChange:O}),e[71]=_,e[72]=we):we=e[72];let Ae;return e[73]!==Se||e[74]!==ye||e[75]!==we?(Ae=n.jsxs(n.Fragment,{children:[Se,ye,we]}),e[73]=Se,e[74]=ye,e[75]=we,e[76]=Ae):Ae=e[76],Ae}Jt.Skeleton=function({variant:e="light"}){const s=e==="dark";return n.jsxs("div",{className:z("flex items-center gap-1.5 h-7 px-1.5 w-full",s&&"text-white"),children:[n.jsx(ee,{className:z("size-5 rounded-[5px] shrink-0",s&&"bg-zinc-800")}),n.jsx(ee,{className:z("h-3.5 flex-1",s&&"bg-zinc-800")})]})};function Xe(t){const e=N.c(71),{onCreateProject:s}=t,{state:r,toggleSidebar:l}=Ge(),o=r==="collapsed",[i,a]=We(),{locator:c}=ie();let d;e[0]!==c?(d=ke.isOrgAdminProject(c),e[0]=c,e[1]=d):d=e[1];const f=!d;let u;e[2]!==a?(u=()=>{a(Un)},e[2]=a,e[3]=u):u=e[3];const p=u,x=f&&"bg-[#030302] border-b border-zinc-800";let h;e[4]!==x?(h=z("h-12 gap-0 pt-0 border-r",x),e[4]=x,e[5]=h):h=e[5];const j=o&&"group-hover/switcher:opacity-0 group-hover/switcher:pointer-events-none group-hover/switcher:invisible";let b;e[6]!==j?(b=z("w-full min-w-0 transition-opacity",j),e[6]=j,e[7]=b):b=e[7];const g=f?"dark":"light";let v;e[8]!==o||e[9]!==s||e[10]!==g?(v=n.jsx(Jt,{isCollapsed:o,variant:g,onCreateProject:s}),e[8]=o,e[9]=s,e[10]=g,e[11]=v):v=e[11];let S;e[12]!==b||e[13]!==v?(S=n.jsx("div",{className:b,children:v}),e[12]=b,e[13]=v,e[14]=S):S=e[14];const C=f?"hover:bg-zinc-800 text-zinc-400":"hover:bg-sidebar-accent",w=o?"opacity-0 invisible pointer-events-none group-hover/switcher:opacity-100 group-hover/switcher:visible group-hover/switcher:pointer-events-auto":"opacity-0 invisible pointer-events-none";let _;e[15]!==C||e[16]!==w?(_=z("absolute inset-0 m-auto size-7 transition-opacity",C,w),e[15]=C,e[16]=w,e[17]=_):_=e[17];const O=!o,k=f?"text-zinc-400":"text-muted-foreground";let $;e[18]!==k?($=z("size-4 shrink-0",k),e[18]=k,e[19]=$):$=e[19];let I;e[20]!==$?(I=n.jsx(Dt,{className:$}),e[20]=$,e[21]=I):I=e[21];let M;e[22]!==_||e[23]!==O||e[24]!==I||e[25]!==l?(M=n.jsx(te,{variant:"ghost",size:"icon",className:_,onClick:l,"aria-label":"Expand sidebar",disabled:O,children:I}),e[22]=_,e[23]=O,e[24]=I,e[25]=l,e[26]=M):M=e[26];let T;e[27]!==M||e[28]!==S?(T=n.jsxs("div",{className:"group/switcher relative flex items-center justify-center gap-1.5 min-w-0 flex-1 overflow-hidden",children:[S,M]}),e[27]=M,e[28]=S,e[29]=T):T=e[29];const U=o&&"hidden";let E;e[30]!==U?(E=z("flex items-center gap-0.5 shrink-0",U),e[30]=U,e[31]=E):E=e[31];const L=f?"hover:bg-zinc-800 text-zinc-400 hover:text-white":"hover:bg-sidebar-accent";let D;e[32]!==L?(D=z("size-7",L),e[32]=L,e[33]=D):D=e[33];const A=f?"text-zinc-400":"text-muted-foreground";let R;e[34]!==A?(R=z("size-4",A),e[34]=A,e[35]=R):R=e[35];let B;e[36]!==R?(B=n.jsx(Lt,{className:R}),e[36]=R,e[37]=B):B=e[37];let H;e[38]!==o||e[39]!==D||e[40]!==B||e[41]!==l?(H=n.jsx(Re,{asChild:!0,children:n.jsx(te,{variant:"ghost",size:"icon",className:D,onClick:l,"aria-label":"Collapse sidebar",disabled:o,children:B})}),e[38]=o,e[39]=D,e[40]=B,e[41]=l,e[42]=H):H=e[42];let W;e[43]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(De,{side:"bottom",children:"Collapse sidebar"}),e[43]=W):W=e[43];let V;e[44]!==H?(V=n.jsxs(He,{children:[H,W]}),e[44]=H,e[45]=V):V=e[45];let q;e[46]!==i||e[47]!==f?(q=z("size-7",f?z("hover:bg-zinc-800 text-zinc-400 hover:text-white",i&&"bg-zinc-800 text-white"):z("hover:bg-sidebar-accent",i&&"bg-sidebar-accent")),e[46]=i,e[47]=f,e[48]=q):q=e[48];const G=f?"text-inherit":"text-muted-foreground";let Z;e[49]!==G?(Z=z(G),e[49]=G,e[50]=Z):Z=e[50];let K;e[51]!==Z?(K=n.jsx(St,{size:11,className:Z}),e[51]=Z,e[52]=K):K=e[52];let J;e[53]!==o||e[54]!==q||e[55]!==K||e[56]!==p?(J=n.jsx(Re,{asChild:!0,children:n.jsx(te,{variant:"ghost",size:"icon",className:q,onClick:p,"aria-label":"Toggle Decopilot",disabled:o,children:K})}),e[53]=o,e[54]=q,e[55]=K,e[56]=p,e[57]=J):J=e[57];let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(De,{side:"bottom",children:"Toggle Decopilot"}),e[58]=X):X=e[58];let P;e[59]!==J?(P=n.jsxs(He,{children:[J,X]}),e[59]=J,e[60]=P):P=e[60];let F;e[61]!==E||e[62]!==V||e[63]!==P?(F=n.jsxs("div",{className:E,children:[V,P]}),e[61]=E,e[62]=V,e[63]=P,e[64]=F):F=e[64];let Y;e[65]!==T||e[66]!==F?(Y=n.jsx(me,{children:n.jsx(le,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[T,F]})})}),e[65]=T,e[66]=F,e[67]=Y):Y=e[67];let fe;return e[68]!==Y||e[69]!==h?(fe=n.jsx(Kt,{className:h,children:Y}),e[68]=Y,e[69]=h,e[70]=fe):fe=e[70],fe}function Un(t){return!t}Xe.Skeleton=function({isDark:e=!1}){return n.jsx(Kt,{className:z("h-12 gap-0 pt-0",e&&"bg-[#030302] border-b border-zinc-800"),children:n.jsx(me,{children:n.jsx(le,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1 px-1.5",children:[n.jsx(ee,{className:z("size-5 rounded-[5px] shrink-0",e&&"bg-zinc-800")}),n.jsx(ee,{className:z("h-3.5 w-16",e&&"bg-zinc-800")})]}),n.jsxs("div",{className:"flex items-center gap-0.5",children:[n.jsx(ee,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")}),n.jsx(ee,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")})]})]})})})})};function Bn(){const t=N.c(10),{locator:e}=ie(),s=ue(),l=Be().location.pathname;let o;t[0]!==l?(o=l.includes("/settings"),t[0]=l,t[1]=o):o=t[1];const i=o;let a;t[2]!==e||t[3]!==s?(a=()=>{s({to:"/$org/$project/settings",params:ke.parse(e)})},t[2]=e,t[3]=s,t[4]=a):a=t[4];const c=a;let d,m;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:n.jsx(lt,{})}),m=n.jsx("span",{className:"truncate",children:"Settings"}),t[5]=d,t[6]=m):(d=t[5],m=t[6]);let f;return t[7]!==c||t[8]!==i?(f=n.jsx(gn,{className:"py-2 border-r",children:n.jsx(me,{children:n.jsx(le,{children:n.jsxs(Te,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:c,isActive:i,tooltip:"Settings",children:[d,m]})})})}),t[7]=c,t[8]=i,t[9]=f):f=t[9],f}function Xt(t){const e=N.c(4),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ot,{className:"my-2 -ml-1"}),e[0]=r):r=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(le,{children:n.jsx("div",{className:"group-data-[collapsible=icon]:hidden px-2 py-0 text-xs font-medium h-6 text-muted-foreground flex items-center justify-between",children:n.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=l):l=e[1];let o;return e[2]!==s?(o=n.jsxs(n.Fragment,{children:[r,l,s]}),e[2]=s,e[3]=o):o=e[3],o}function Fn(t){const e=N.c(26),{item:s}=t,r=ue(),{org:l}=ie(),o=It(l.id),i=Bs(l.id);let a;e[0]!==i.update||e[1]!==s.url||e[2]!==o?.sidebar_items?(a=async()=>{const S=(o?.sidebar_items||[]).filter(C=>C.url!==s.url);await i.update.mutateAsync({sidebar_items:S})},e[0]=i.update,e[1]=s.url,e[2]=o?.sidebar_items,e[3]=a):a=e[3];const c=a;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=/^https?:\/\/.+/,e[4]=d):d=e[4];let m;e[5]!==s.icon?(m=d.test(s.icon),e[5]=s.icon,e[6]=m):m=e[6];const f=m;let u;e[7]!==s.url||e[8]!==r?(u=()=>{r({to:s.url})},e[7]=s.url,e[8]=r,e[9]=u):u=e[9];const p=s.title;let x;e[10]!==f||e[11]!==s.icon||e[12]!==s.title?(x=n.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?n.jsx("img",{src:s.icon,alt:s.title,className:"h-4 w-4 rounded object-cover"}):n.jsx(Fs,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=f,e[11]=s.icon,e[12]=s.title,e[13]=x):x=e[13];let h;e[14]!==s.title?(h=s.title.toLocaleLowerCase(),e[14]=s.title,e[15]=h):h=e[15];let j;e[16]!==h?(j=n.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:n.jsx("span",{className:"truncate text-sm w-full capitalize",children:h})}),e[16]=h,e[17]=j):j=e[17];let b;e[18]!==c?(b=n.jsx(Ue,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:v=>{v.preventDefault(),v.stopPropagation(),c()}}),e[18]=c,e[19]=b):b=e[19];let g;return e[20]!==s.title||e[21]!==u||e[22]!==x||e[23]!==j||e[24]!==b?(g=n.jsx(le,{children:n.jsxs(Te,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:p,children:[x,j,b]})}),e[20]=s.title,e[21]=u,e[22]=x,e[23]=j,e[24]=b,e[25]=g):g=e[25],g}function pt(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(le,{children:n.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:n.jsx(ee,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function Wn(){const t=N.c(4),{org:e}=ie(),r=It(e.id)?.sidebar_items;if(!r?.length)return null;let l;t[0]!==r?(l=r.map(Vn),t[0]=r,t[1]=l):l=t[1];let o;return t[2]!==l?(o=n.jsx(Xt,{children:l}),t[2]=l,t[3]=o):o=t[3],o}function Vn(t){return n.jsx(Fn,{item:t},t.url)}function Gn(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(y.Suspense,{fallback:n.jsxs(Xt,{children:[n.jsx(pt,{}),n.jsx(pt,{})]}),children:n.jsx(Wn,{})}),t[0]=e):e=t[0],e}function Kn(t){const e=N.c(11),{project:s}=t,r=s.ui?.themeColor??"#60a5fa";if(s.ui?.icon){let c;return e[0]!==s.ui.icon?(c=n.jsx("img",{src:s.ui.icon,alt:"",className:"size-4 rounded object-cover border border-border/50"}),e[0]=s.ui.icon,e[1]=c):c=e[1],c}let l;e[2]!==r?(l={backgroundColor:r},e[2]=r,e[3]=l):l=e[3];let o;e[4]!==s.name?(o=s.name.charAt(0).toUpperCase(),e[4]=s.name,e[5]=o):o=e[5];let i;e[6]!==o?(i=n.jsx("span",{className:"text-[10px] font-medium text-white",children:o}),e[6]=o,e[7]=i):i=e[7];let a;return e[8]!==l||e[9]!==i?(a=n.jsx("div",{className:"size-4 rounded flex items-center justify-center border border-border/50",style:l,children:i}),e[8]=l,e[9]=i,e[10]=a):a=e[10],a}function Zn(t){const e=N.c(14),{project:s}=t,r=ue(),{org:l}=ie();let o;e[0]!==r||e[1]!==l.slug||e[2]!==s.slug?(o=()=>{r({to:"/$org/$project",params:{org:l.slug,project:s.slug}})},e[0]=r,e[1]=l.slug,e[2]=s.slug,e[3]=o):o=e[3];let i;e[4]!==s?(i=n.jsx(Kn,{project:s}),e[4]=s,e[5]=i):i=e[5];let a;e[6]!==s.name?(a=n.jsx("span",{className:"truncate flex-1",children:s.name}),e[6]=s.name,e[7]=a):a=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(_t,{size:12,className:"text-muted-foreground opacity-0 group-hover/item:opacity-100 transition-opacity"}),e[8]=c):c=e[8];let d;return e[9]!==s.name||e[10]!==o||e[11]!==i||e[12]!==a?(d=n.jsx(le,{children:n.jsxs(Te,{className:"group/item cursor-pointer text-foreground/90 hover:text-foreground",onClick:o,tooltip:s.name,children:[i,a,c]})}),e[9]=s.name,e[10]=o,e[11]=i,e[12]=a,e[13]=d):d=e[13],d}function Yn(){const t=N.c(54),{org:e}=ie(),{data:s,isLoading:r}=kt(e.id),[l,o]=y.useState(!0),[i,a]=y.useState(!1);let c,d,m,f,u,p,x,h,j,b,g,v,S;if(t[0]!==r||t[1]!==l||t[2]!==s){S=Symbol.for("react.early_return_sentinel");e:{const M=s?.filter(Jn)??[];if(r){let R;t[16]===Symbol.for("react.memo_cache_sentinel")?(R=n.jsx(le,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(ee,{className:"h-4 w-4 rounded"}),n.jsx(ee,{className:"h-4 flex-1"})]})}),t[16]=R):R=t[16];let B;t[17]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx(Ie,{className:"py-0",children:n.jsx(Oe,{children:n.jsxs(me,{className:"gap-0.5",children:[R,n.jsx(le,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(ee,{className:"h-4 w-4 rounded"}),n.jsx(ee,{className:"h-4 flex-1"})]})})]})})}),t[17]=B):B=t[17],S=B;break e}t[18]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(ot,{className:"my-2"}),t[18]=v):v=t[18],u=Ns,b=l,g=o,f=Ie,j="py-0",m=Oe,d=me,x="gap-0.5";let T;t[19]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx("span",{children:"Projects"}),t[19]=T):T=t[19];const U=!l&&"-rotate-90";let E;t[20]!==U?(E=z("transition-transform",U),t[20]=U,t[21]=E):E=t[21];let L;t[22]!==E?(L=n.jsx(Ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:"flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors",children:[T,n.jsx(tt,{size:12,className:E})]})}),t[22]=E,t[23]=L):L=t[23];let D;t[24]===Symbol.for("react.memo_cache_sentinel")?(D=()=>a(!0),t[24]=D):D=t[24];let A;t[25]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("button",{type:"button",onClick:D,className:"text-muted-foreground hover:text-foreground transition-colors p-0.5 rounded hover:bg-accent",title:"Create new project",children:n.jsx(Ve,{size:16})}),t[25]=A):A=t[25],t[26]!==L?(h=n.jsx(le,{children:n.jsxs("div",{className:"flex items-center justify-between px-2 h-6",children:[L,A]})}),t[26]=L,t[27]=h):h=t[27],c=ys,p=M.length===0?n.jsx(le,{children:n.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:"No projects yet"})}):M.map(qn)}t[0]=r,t[1]=l,t[2]=s,t[3]=c,t[4]=d,t[5]=m,t[6]=f,t[7]=u,t[8]=p,t[9]=x,t[10]=h,t[11]=j,t[12]=b,t[13]=g,t[14]=v,t[15]=S}else c=t[3],d=t[4],m=t[5],f=t[6],u=t[7],p=t[8],x=t[9],h=t[10],j=t[11],b=t[12],g=t[13],v=t[14],S=t[15];if(S!==Symbol.for("react.early_return_sentinel"))return S;let C;t[28]!==c||t[29]!==p?(C=n.jsx(c,{children:p}),t[28]=c,t[29]=p,t[30]=C):C=t[30];let w;t[31]!==d||t[32]!==x||t[33]!==h||t[34]!==C?(w=n.jsxs(d,{className:x,children:[h,C]}),t[31]=d,t[32]=x,t[33]=h,t[34]=C,t[35]=w):w=t[35];let _;t[36]!==m||t[37]!==w?(_=n.jsx(m,{children:w}),t[36]=m,t[37]=w,t[38]=_):_=t[38];let O;t[39]!==f||t[40]!==_||t[41]!==j?(O=n.jsx(f,{className:j,children:_}),t[39]=f,t[40]=_,t[41]=j,t[42]=O):O=t[42];let k;t[43]!==u||t[44]!==O||t[45]!==b||t[46]!==g?(k=n.jsx(u,{open:b,onOpenChange:g,children:O}),t[43]=u,t[44]=O,t[45]=b,t[46]=g,t[47]=k):k=t[47];let $;t[48]!==i?($=n.jsx(Ct,{open:i,onOpenChange:a}),t[48]=i,t[49]=$):$=t[49];let I;return t[50]!==k||t[51]!==$||t[52]!==v?(I=n.jsxs(n.Fragment,{children:[v,k,$]}),t[50]=k,t[51]=$,t[52]=v,t[53]=I):I=t[53],I}function qn(t){return n.jsx(Zn,{project:t},t.id)}function Jn(t){return t.slug!==Q}function Xn(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(y.Suspense,{fallback:n.jsx(Ie,{className:"py-0",children:n.jsx(Oe,{children:n.jsx(me,{className:"gap-0.5",children:n.jsx(le,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(ee,{className:"h-4 w-4 rounded"}),n.jsx(ee,{className:"h-4 flex-1"})]})})})})}),children:n.jsx(Yn,{})}),t[0]=e):e=t[0],e}function Qn(t){const e=N.c(16),{onCreateProject:s}=t,[r]=Fe(),l=nn(),{locator:o}=ie();let i;e[0]!==o?(i=ke.isOrgAdminProject(o),e[0]=o,e[1]=i):i=e[1];const a=i;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Xe.Skeleton,{}),e[2]=c):c=e[2];let d;e[3]!==s?(d=n.jsx(y.Suspense,{fallback:c,children:n.jsx(Xe,{onCreateProject:s})}),e[3]=s,e[4]=d):d=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(Bn,{}),e[5]=m):m=e[5];let f;e[6]!==a||e[7]!==r?(f=a?r.experimental_projects?n.jsx(Xn,{}):null:n.jsx(Gn,{}),e[6]=a,e[7]=r,e[8]=f):f=e[8];let u;e[9]!==f?(u=n.jsx(wt,{children:n.jsx(y.Suspense,{fallback:null,children:f})}),e[9]=f,e[10]=u):u=e[10];const p=a?void 0:"pt-3";let x;return e[11]!==l||e[12]!==d||e[13]!==u||e[14]!==p?(x=n.jsx(Yt,{sections:l,header:d,footer:m,additionalContent:u,contentClassName:p}),e[11]=l,e[12]=d,e[13]=u,e[14]=p,e[15]=x):x=e[15],x}function er(t){const e=N.c(12);let s,r,l,o;e[0]!==t?({className:s,orientation:l,decorative:o,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o):(s=e[1],r=e[2],l=e[3],o=e[4]);const i=l===void 0?"horizontal":l,a=o===void 0?!0:o;let c;e[5]!==s?(c=z("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",s),e[5]=s,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==i||e[9]!==r||e[10]!==c?(d=n.jsx(cs,{"data-slot":"separator-root",decorative:a,orientation:i,className:c,...r}),e[7]=a,e[8]=i,e[9]=r,e[10]=c,e[11]=d):d=e[11],d}const Qt=y.createContext(null);function tr(){const t=y.useContext(Qt);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function sr(t){const e=N.c(10),{children:s,onItemHover:r}=t,[l,o]=y.useState(null);let i;e[0]!==r?(i=f=>{o(f),r?.(f)},e[0]=r,e[1]=i):i=e[1];const a=i;let c;e[2]!==l||e[3]!==a?(c={hoveredItem:l,setHoveredItem:a},e[2]=l,e[3]=a,e[4]=c):c=e[4];let d;e[5]!==s?(d=n.jsx(st,{children:s}),e[5]=s,e[6]=d):d=e[6];let m;return e[7]!==c||e[8]!==d?(m=n.jsx(Qt.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=m):m=e[9],m}function nr(t){const e=N.c(6),{children:s,onClick:r}=t;let l;e[0]!==s||e[1]!==r?(l=n.jsx(te,{variant:"link",className:"p-0.5 h-auto",onClick:r,type:"button",children:s}),e[0]=s,e[1]=r,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(nt,{asChild:!0,children:n.jsx(te,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:n.jsx(Nt,{size:16,className:"opacity-50"})})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=n.jsxs("div",{className:"flex items-center gap-1",children:[l,o]}),e[4]=l,e[5]=i):i=e[5],i}function rr(t){const e=N.c(8),{item:s,fallback:r}=t,l=r===void 0?"":r,o=s?.avatarUrl??"",i=s?.name??l;let a;e[0]!==o||e[1]!==i?(a=n.jsx(de,{url:o,fallback:i,size:"xs",objectFit:"contain"}),e[0]=o,e[1]=i,e[2]=a):a=e[2];const c=s?.name??l;let d;e[3]!==c?(d=n.jsx("span",{children:c}),e[3]=c,e[4]=d):d=e[4];let m;return e[5]!==a||e[6]!==d?(m=n.jsxs("div",{className:"flex items-center gap-2",children:[a,d]}),e[5]=a,e[6]=d,e[7]=m):m=e[7],m}function lr(t){const e=N.c(6),{children:s,align:r}=t,l=r===void 0?"start":r,i=y.Children.toArray(s).filter(or).length===1?"280px":"480px";let a;e[0]!==i?(a={width:i},e[0]=i,e[1]=a):a=e[1];let c;return e[2]!==l||e[3]!==s||e[4]!==a?(c=n.jsx(rt,{align:l,className:"p-0 flex items-start",style:a,children:s}),e[2]=l,e[3]=s,e[4]=a,e[5]=c):c=e[5],c}function or(t){return y.isValidElement(t)&&(t.type===ts||t.type===es)}function es(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}const ts=es;function ir(t){const e=N.c(6),{placeholder:s,value:r,onChange:l}=t,o=s===void 0?"Search...":s;let i;e[0]!==l?(i=c=>l(c.target.value),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==o||e[3]!==i||e[4]!==r?(a=n.jsx(Ws,{placeholder:o,value:r,onChange:i,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=o,e[3]=i,e[4]=r,e[5]=a):a=e[5],a}function ar(t){const e=N.c(6),{children:s,emptyMessage:r}=t,l=r===void 0?"No items found.":r,o=y.Children.count(s)>0;let i;e[0]!==l||e[1]!==o?(i=!o&&n.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:l}),e[0]=l,e[1]=o,e[2]=i):i=e[2];let a;return e[3]!==s||e[4]!==i?(a=n.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[i,s]}),e[3]=s,e[4]=i,e[5]=a):a=e[5],a}function cr(t){const e=N.c(15),{item:s,onClick:r,onHover:l,children:o}=t,i=tr();let a;e[0]!==i||e[1]!==s||e[2]!==l?(a=()=>{i.setHoveredItem(s.slug),l?.(s)},e[0]=i,e[1]=s,e[2]=l,e[3]=a):a=e[3];const c=a;let d;e[4]!==s||e[5]!==r?(d=()=>r(s),e[4]=s,e[5]=r,e[6]=d):d=e[6];let m;e[7]!==o||e[8]!==s.avatarUrl||e[9]!==s.name?(m=o||n.jsxs(n.Fragment,{children:[n.jsx(de,{url:s.avatarUrl??"",fallback:s.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),n.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:s.name})]}),e[7]=o,e[8]=s.avatarUrl,e[9]=s.name,e[10]=m):m=e[10];let f;return e[11]!==c||e[12]!==d||e[13]!==m?(f=n.jsx(te,{onClick:d,onMouseEnter:c,variant:"ghost",size:"sm",className:"w-full justify-start font-normal",children:m}),e[11]=c,e[12]=d,e[13]=m,e[14]=f):f=e[14],f}function dr(t){const e=N.c(2),{children:s}=t;let r;return e[0]!==s?(r=n.jsx("div",{className:"px-1 pb-1 pt-0.5",children:s}),e[0]=s,e[1]=r):r=e[1],r}function mr(t){const e=N.c(11),{onClick:s,icon:r,children:l,variant:o}=t,a=(o===void 0?"default":o)==="muted"&&"text-muted-foreground";let c;e[0]!==a?(c=z("w-full justify-start font-normal",a),e[0]=a,e[1]=c):c=e[1];let d;e[2]!==r?(d=r&&n.jsx("span",{className:"[&>svg]:size-4",children:r}),e[2]=r,e[3]=d):d=e[3];let m;e[4]!==l?(m=n.jsx("span",{children:l}),e[4]=l,e[5]=m):m=e[5];let f;return e[6]!==s||e[7]!==c||e[8]!==d||e[9]!==m?(f=n.jsxs(te,{variant:"ghost",size:"sm",className:c,onClick:s,children:[d,m]}),e[6]=s,e[7]=c,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}function fr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(er,{}),t[0]=e):e=t[0],e}function ur(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const ne=Object.assign(sr,{Trigger:nr,CurrentItem:rr,Content:lr,Panel:ts,Search:ir,Items:ar,Item:cr,Actions:dr,Action:mr,Separator:fr,Skeleton:ur});function Qe(){const t=N.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=et(e),{data:r}=oe.useListOrganizations(),l=ue();let o;t[1]!==s||t[2]!==r?(o=r?.find(U=>U.slug===s),t[1]=s,t[2]=r,t[3]=o):o=t[3];const i=o,[a,c]=y.useState(""),[d,m]=y.useState(!1);let f,u,p,x,h,j,b,g;if(t[4]!==i||t[5]!==l||t[6]!==s||t[7]!==a||t[8]!==r){const E=(r?(()=>{const H=r.filter(W=>W.name.toLowerCase().includes(a.toLowerCase()));if(s){const W=H.findIndex(V=>V.slug===s);if(W>0){const V=H[W];V&&(H.splice(W,1),H.unshift(V))}}return H})():[]).map(pr);let L;t[17]!==i?(L=i?{slug:i.slug,name:i.name,avatarUrl:i.logo}:void 0,t[17]=i,t[18]=L):L=t[18];const D=L;x=ne;let A;t[19]!==l||t[20]!==s?(A=()=>l({to:"/$org",params:{org:s??""}}),t[19]=l,t[20]=s,t[21]=A):A=t[21];let R;t[22]!==D?(R=n.jsx(ne.CurrentItem,{item:D}),t[22]=D,t[23]=R):R=t[23],t[24]!==A||t[25]!==R?(g=n.jsx(ne.Trigger,{onClick:A,children:R}),t[24]=A,t[25]=R,t[26]=g):g=t[26],p=ne.Content,u=ne.Panel,t[27]!==a?(b=n.jsx(ne.Search,{placeholder:"Search organizations...",value:a,onChange:c}),t[27]=a,t[28]=b):b=t[28],f=ne.Items,h="No organizations found.";let B;t[29]!==l?(B=H=>n.jsx(ne.Item,{item:H,onClick:W=>l({to:"/$org",params:{org:W.slug}})},H.slug),t[29]=l,t[30]=B):B=t[30],j=E.map(B),t[4]=i,t[5]=l,t[6]=s,t[7]=a,t[8]=r,t[9]=f,t[10]=u,t[11]=p,t[12]=x,t[13]=h,t[14]=j,t[15]=b,t[16]=g}else f=t[9],u=t[10],p=t[11],x=t[12],h=t[13],j=t[14],b=t[15],g=t[16];let v;t[31]!==f||t[32]!==h||t[33]!==j?(v=n.jsx(f,{emptyMessage:h,children:j}),t[31]=f,t[32]=h,t[33]=j,t[34]=v):v=t[34];let S,C;t[35]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(ne.Actions,{children:n.jsx(ne.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),C=n.jsx(ne.Separator,{}),t[35]=S,t[36]=C):(S=t[35],C=t[36]);let w;t[37]!==l?(w=()=>l({to:"/"}),t[37]=l,t[38]=w):w=t[38];let _;t[39]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(Vs,{}),t[39]=_):_=t[39];let O;t[40]!==w?(O=n.jsx(ne.Actions,{children:n.jsx(ne.Action,{onClick:w,icon:_,children:"See all organizations"})}),t[40]=w,t[41]=O):O=t[41];let k;t[42]!==u||t[43]!==O||t[44]!==b||t[45]!==v?(k=n.jsxs(u,{children:[b,v,S,C,O]}),t[42]=u,t[43]=O,t[44]=b,t[45]=v,t[46]=k):k=t[46];let $;t[47]!==p||t[48]!==k?($=n.jsx(p,{children:k}),t[47]=p,t[48]=k,t[49]=$):$=t[49];let I;t[50]!==x||t[51]!==$||t[52]!==g?(I=n.jsxs(x,{children:[g,$]}),t[50]=x,t[51]=$,t[52]=g,t[53]=I):I=t[53];let M;t[54]!==d?(M=n.jsx(zt,{open:d,onOpenChange:m}),t[54]=d,t[55]=M):M=t[55];let T;return t[56]!==I||t[57]!==M?(T=n.jsxs(n.Fragment,{children:[I,M]}),t[56]=I,t[57]=M,t[58]=T):T=t[58],T}function pr(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}Qe.Skeleton=ne.Skeleton;function xr(){const t=N.c(10),{locator:e}=ie(),s=Gs();if(ke.isOrgAdminProject(e))return null;const l=s?.leftRef;let o;t[0]!==l?(o=n.jsx("div",{ref:l,className:"flex items-center gap-2 flex-1 min-w-0"}),t[0]=l,t[1]=o):o=t[1];const i=s?.centerRef;let a;t[2]!==i?(a=n.jsx("div",{ref:i,className:"flex flex-1 h-full items-center justify-center px-4 min-w-0 [&:empty]:hidden"}),t[2]=i,t[3]=a):a=t[3];const c=s?.rightRef;let d;t[4]!==c?(d=n.jsx("div",{ref:c,className:"flex flex-1 gap-2 h-full items-center justify-end min-w-0 [&:empty]:hidden"}),t[4]=c,t[5]=d):d=t[5];let m;return t[6]!==o||t[7]!==a||t[8]!==d?(m=n.jsx("div",{className:"dark",children:n.jsxs("header",{className:"sticky top-0 z-50 h-12 bg-background flex items-center px-4 shrink-0",children:[o,a,d]})}),t[6]=o,t[7]=a,t[8]=d,t[9]=m):m=t[9],m}function hr({prop:t,defaultProp:e,onChange:s=()=>{}}){const[r,l]=gr({defaultProp:e,onChange:s}),o=t!==void 0,i=o?t:r,a=gt(s),c=y.useCallback(d=>{if(o){const f=typeof d=="function"?d(t):d;f!==t&&a(f)}else l(d)},[o,t,l,a]);return[i,c]}function gr({defaultProp:t,onChange:e}){const s=y.useState(t),[r]=s,l=y.useRef(r),o=gt(e);return y.useEffect(()=>{l.current!==r&&(o(r),l.current=r)},[r,l,o]),s}function jr(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx(_e.Root,{"data-slot":"drawer",...s}),e[2]=s,e[3]=r):r=e[3],r}function br(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx(_e.Trigger,{"data-slot":"drawer-trigger",...s}),e[2]=s,e[3]=r):r=e[3],r}function vr(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx(_e.Portal,{"data-slot":"drawer-portal",...s}),e[2]=s,e[3]=r):r=e[3],r}function Nr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx(_e.Overlay,{"data-slot":"drawer-overlay",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Sr(t){const e=N.c(12);let s,r,l;e[0]!==t?({className:r,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l):(s=e[1],r=e[2],l=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Nr,{}),e[4]=o):o=e[4];let i;e[5]!==r?(i=z("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",r),e[5]=r,e[6]=i):i=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=a):a=e[7];let c;return e[8]!==s||e[9]!==l||e[10]!==i?(c=n.jsxs(vr,{"data-slot":"drawer-portal",children:[o,n.jsxs(_e.Content,{"data-slot":"drawer-content",className:i,...l,children:[a,s]})]}),e[8]=s,e[9]=l,e[10]=i,e[11]=c):c=e[11],c}function yr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-1.5 px-4 py-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"drawer-header",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function wr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("text-foreground font-semibold",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx(_e.Title,{"data-slot":"drawer-title",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}const ss=y.createContext({setOpen:()=>{}}),Cr=()=>y.useContext(ss),kr=t=>{const e=N.c(25);let s,r,l,o,i;e[0]!==t?({children:s,defaultOpen:r,open:o,onOpenChange:l,...i}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5]);const a=r??!1;let c;e[6]!==l||e[7]!==o||e[8]!==a?(c={prop:o,defaultProp:a,onChange:l},e[6]=l,e[7]=o,e[8]=a,e[9]=c):c=e[9];const[d,m]=hr(c);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let u;e[12]!==s||e[13]!==d||e[14]!==i||e[15]!==m?(u=n.jsx(jr,{open:d,onOpenChange:m,...i,children:s}),e[12]=s,e[13]=d,e[14]=i,e[15]=m,e[16]=u):u=e[16];let p;e[17]!==d||e[18]!==i||e[19]!==m||e[20]!==u?(p=n.jsx(qs,{open:d,onOpenChange:m,...i,children:u}),e[17]=d,e[18]=i,e[19]=m,e[20]=u,e[21]=p):p=e[21];let x;return e[22]!==f||e[23]!==p?(x=n.jsx(ss.Provider,{value:f,children:p}),e[22]=f,e[23]=p,e[24]=x):x=e[24],x},_r=t=>{const{children:e,title:s,...r}=t,l=Pe(),{className:o,...i}=r;return l?n.jsxs(Sr,{...i,children:[n.jsx(yr,{className:"hidden",children:n.jsx(wr,{children:s})}),n.jsx("div",{className:z("flex flex-col gap-2 p-2 py-4",o),children:e})]}):n.jsx(Ys,{...r,children:e})},zr=t=>{const{children:e,...s}=t,{setOpen:r}=Cr(),l=Pe(),{className:o,...i}=s;return l?n.jsx("div",{...i,onClick:a=>{r(!1);const{onClick:c}=i;c?.(a)},className:z("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),children:e}):n.jsx(Js,{...s,children:e})},$r=t=>{const e=N.c(7);let s,r;e[0]!==t?({children:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);const l=Pe();let o;return e[3]!==s||e[4]!==l||e[5]!==r?(o=l?n.jsx(br,{asChild:!0,children:s}):n.jsx(Zs,{...r,children:s}),e[3]=s,e[4]=l,e[5]=r,e[6]=o):o=e[6],o},Ir=t=>{const e=N.c(7);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);const l=Pe();let o;return e[3]!==s||e[4]!==l||e[5]!==r?(o=l?n.jsx(ft,{className:z(s),...r}):n.jsx(ft,{className:z(s),...r}),e[3]=s,e[4]=l,e[5]=r,e[6]=o):o=e[6],o};function Or(t){const e=N.c(11),{user:s,trigger:r,align:l,children:o}=t,i=l===void 0?"start":l;let a;e[0]!==r||e[1]!==s?(a=r(s),e[0]=r,e[1]=s,e[2]=a):a=e[2];let c;e[3]!==a?(c=n.jsx($r,{asChild:!0,children:n.jsx("div",{children:a})}),e[3]=a,e[4]=c):c=e[4];let d;e[5]!==i||e[6]!==o?(d=n.jsx(_r,{side:"top",align:i,className:"md:w-[240px]",children:o}),e[5]=i,e[6]=o,e[7]=d):d=e[7];let m;return e[8]!==c||e[9]!==d?(m=n.jsxs(kr,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}function Pr(t){const e=N.c(8),{children:s,onClick:r,className:l,asChild:o}=t;let i;e[0]!==o||e[1]!==s||e[2]!==r?(i=o?s:n.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:r,children:s}),e[0]=o,e[1]=s,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==o||e[5]!==l||e[6]!==i?(a=n.jsx(zr,{asChild:o,className:l,children:i}),e[4]=o,e[5]=l,e[6]=i,e[7]=a):a=e[7],a}function Tr(t){const e=N.c(2),{className:s}=t;let r;return e[0]!==s?(r=n.jsx(Ir,{className:s}),e[0]=s,e[1]=r):r=e[1],r}function Mr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const ae=Object.assign(Or,{Item:Pr,Separator:Tr,Skeleton:Mr});function Er(t){const e=N.c(49),{user:s,userImage:r}=t,[l,o]=y.useState(!1),[i,a]=y.useState(!1);let c;e[0]!==s.email||e[1]!==s.id||e[2]!==s.name?(c=()=>{const A=`ID: ${s.id}
|
|
4
|
-
Name: ${s.name||"N/A"}
|
|
5
|
-
Email: ${s.email}`;navigator.clipboard.writeText(A),a(!0),ce.success("User info copied to clipboard"),setTimeout(()=>a(!1),2e3)},e[0]=s.email,e[1]=s.id,e[2]=s.name,e[3]=c):c=e[3];const d=c;let m;e[4]!==s.email||e[5]!==s.name||e[6]!==r?(m=()=>n.jsx(de,{url:r,fallback:s.name||s.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all h-7 w-7"}),e[4]=s.email,e[5]=s.name,e[6]=r,e[7]=m):m=e[7];const f=s.name||s.email||"U";let u;e[8]!==f||e[9]!==r?(u=n.jsx(de,{url:r,fallback:f,shape:"circle",size:"sm"}),e[8]=f,e[9]=r,e[10]=u):u=e[10];const p=s.name||"User";let x;e[11]!==p?(x=n.jsx("div",{className:"text-sm font-medium truncate",children:p}),e[11]=p,e[12]=x):x=e[12];let h;e[13]!==s.email?(h=n.jsx("div",{className:"text-xs text-muted-foreground truncate",children:s.email}),e[13]=s.email,e[14]=h):h=e[14];let j;e[15]!==x||e[16]!==h?(j=n.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[x,h]}),e[15]=x,e[16]=h,e[17]=j):j=e[17];let b;e[18]!==i?(b=n.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:i?n.jsx($e,{size:16,className:"text-green-600"}):n.jsx($t,{size:16,className:"text-muted-foreground"})}),e[18]=i,e[19]=b):b=e[19];let g;e[20]!==u||e[21]!==j||e[22]!==b?(g=n.jsxs("div",{className:"group flex items-center gap-3 w-full py-1",children:[u,j,b]}),e[20]=u,e[21]=j,e[22]=b,e[23]=g):g=e[23];let v;e[24]!==d||e[25]!==g?(v=n.jsx(ae.Item,{onClick:d,children:g}),e[24]=d,e[25]=g,e[26]=v):v=e[26];let S;e[27]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(ae.Separator,{}),e[27]=S):S=e[27];let C,w;e[28]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsxs(ae.Item,{onClick:()=>o(!0),children:[n.jsx(Xs,{className:"text-muted-foreground",size:18}),"Profile Settings"]}),w=n.jsx(ae.Separator,{}),e[28]=C,e[29]=w):(C=e[28],w=e[29]);let _;e[30]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(ht,{className:"w-4 h-4 text-muted-foreground"}),e[30]=_):_=e[30];let O;e[31]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(ae.Item,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/admin",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[_,"decocms/admin",n.jsx(ut,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[31]=O):O=e[31];let k;e[32]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(Ht,{className:"text-muted-foreground",size:18}),e[32]=k):k=e[32];let $,I;e[33]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(ae.Item,{asChild:!0,children:n.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[k,"Homepage",n.jsx(ut,{size:18,className:"ml-auto text-muted-foreground"})]})}),I=n.jsx(ae.Separator,{}),e[33]=$,e[34]=I):($=e[33],I=e[34]);let M,T,U;e[35]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsxs(ae.Item,{onClick:Ar,children:[n.jsx(Bt,{size:18,className:"text-muted-foreground"}),"Log out"]}),T=n.jsx(ae.Separator,{}),U=n.jsxs("div",{className:"px-2 py-1.5 text-[11px] text-muted-foreground/75",children:["v","2.84.0"]}),e[35]=M,e[36]=T,e[37]=U):(M=e[35],T=e[36],U=e[37]);let E;e[38]!==v||e[39]!==m||e[40]!==s?(E=n.jsxs(ae,{user:s,trigger:m,align:"end",children:[v,S,C,w,O,$,I,M,T,U]}),e[38]=v,e[39]=m,e[40]=s,e[41]=E):E=e[41];let L;e[42]!==l||e[43]!==s||e[44]!==r?(L=l&&n.jsx(qt,{open:l,onOpenChange:o,user:s,userImage:r}),e[42]=l,e[43]=s,e[44]=r,e[45]=L):L=e[45];let D;return e[46]!==E||e[47]!==L?(D=n.jsxs(n.Fragment,{children:[E,L]}),e[46]=E,e[47]=L,e[48]=D):D=e[48],D}function Ar(){return oe.signOut()}function Lr(){const t=N.c(7),{data:e}=oe.useSession();if(!e?.user){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(de,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer h-7 w-7",muted:!0}),t[0]=c):c=t[0],c}const s=e.user,r=s.name??void 0;let l;t[1]!==r||t[2]!==s?(l={...s,name:r},t[1]=r,t[2]=s,t[3]=l):l=t[3];const o=l,i=s.image;let a;return t[4]!==i||t[5]!==o?(a=n.jsx(Er,{user:o,userImage:i}),t[4]=i,t[5]=o,t[6]=a):a=t[6],a}function Dr(){const t=N.c(2),s=Be().location.href;let r;return t[0]!==s?(r=n.jsx(us,{to:"/login",search:{next:s},replace:!0}),t[0]=s,t[1]=r):r=t[1],r}function Rr(t){const e=N.c(6),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ds,{children:n.jsx(jt,{})}),e[0]=r):r=e[0];let l;e[1]!==s?(l=n.jsx(ms,{children:s}),e[1]=s,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(fs,{children:n.jsx(Dr,{})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=n.jsxs(n.Fragment,{children:[r,l,o]}),e[4]=l,e[5]=i):i=e[5],i}function Hr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("fixed top-0 left-0 right-0 z-20 bg-background flex items-center w-full h-12 border-b border-border",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Ur(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center justify-center px-2.5 h-full border-r border-border",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Br(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Fr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full flex-1",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Wr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full ml-auto",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Vr(){const t=N.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center justify-center px-2 h-full border-r border-border",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})}),t[0]=e):e=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("div",{className:"flex items-center gap-2 px-2 h-full",children:n.jsx("div",{className:"w-32 h-6 bg-muted rounded-md animate-pulse"})}),t[1]=s):s=t[1];let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"fixed top-0 left-0 right-0 z-20 bg-background flex items-center w-full h-12 border-b border-border",children:[e,s,n.jsx("div",{className:"flex items-center gap-2 px-2 h-full ml-auto",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[2]=r):r=t[2],r}const Le=Object.assign(Hr,{Sidebar:Ur,Left:Br,Center:Fr,Right:Wr,Skeleton:Vr});function ns(){const t=N.c(3),{toggleSidebar:e}=Ge();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Ut,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:18}),t[0]=s):s=t[0];let r;return t[1]!==e?(r=n.jsx(n.Fragment,{children:n.jsx(te,{onClick:e,size:"icon",variant:"ghost",className:"w-7 h-7 rounded-md",children:s})}),t[1]=e,t[2]=r):r=t[2],r}ns.Skeleton=function(){return n.jsx("div",{className:"w-7 h-7 bg-muted rounded-md animate-pulse"})};function Gr({showSidebarToggle:t=!1,showOrgSwitcher:e=!1,showDecoChat:s=!1,disableDecoChat:r=!1}){const[l,o]=We(),i=y.useRef(r);r&&l&&i.current!==r&&o(!1),i.current=r;const a=()=>{r||o(c=>!c)};return n.jsxs(Le,{children:[t&&n.jsx(Le.Sidebar,{children:n.jsx(ns,{})}),n.jsx(Le.Left,{children:e&&n.jsx(y.Suspense,{fallback:n.jsx(Qe.Skeleton,{}),children:n.jsx(Qe,{})})}),n.jsxs(Le.Right,{className:"gap-2",children:[s&&!r&&n.jsxs(te,{size:"sm",variant:"default",onClick:a,className:"h-7 gap-2",children:[n.jsx(St,{size:16}),"Chat"]}),n.jsx(Lr,{})]})]})}function Kr(t){const e=N.c(10),{children:s,className:r}=t,[,l]=y.useTransition();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Pt.decoChatPanelWidth(),e[0]=o):o=e[0];const[i,a]=Ot(o,30);let c;e[1]!==a?(c=u=>l(()=>a(u)),e[1]=a,e[2]=c):c=e[2];const d=c;let m;e[3]!==r?(m=z("min-w-0",r),e[3]=r,e[4]=m):m=e[4];let f;return e[5]!==i||e[6]!==s||e[7]!==d||e[8]!==m?(f=n.jsx(Tt,{defaultSize:i,minSize:20,className:m,onResize:d,children:s}),e[5]=i,e[6]=s,e[7]=d,e[8]=m,e[9]=f):f=e[9],f}function Zr(t){const e=N.c(5),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=Pt.sidebarOpen(),e[0]=r):r=e[0];const[l,o]=Ot(r,!0);let i;return e[1]!==s||e[2]!==o||e[3]!==l?(i=n.jsx(mn,{open:l,onOpenChange:o,children:s}),e[1]=s,e[2]=o,e[3]=l,e[4]=i):i=e[4],i}function Yr(t){const e=N.c(6),{disableChat:s}=t,r=s===void 0?!1:s,[l]=We();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Tt,{className:"bg-background",children:n.jsx(bt,{})}),e[0]=o):o=e[0];let i;e[1]!==l||e[2]!==r?(i=!r&&n.jsxs(n.Fragment,{children:[n.jsx(Qs,{withHandle:l}),n.jsx(Kr,{className:z(l?"max-w-none":"max-w-0"),children:n.jsx(sn,{})})]}),e[1]=l,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==i?(a=n.jsxs(en,{direction:"horizontal",children:[o,i]}),e[4]=i,e[5]=a):a=e[5],a}function qr(){const{org:t,project:e}=et({strict:!1}),s=Be(),[r,l]=y.useState(!1),o=s.location.pathname===`/${t}/${e}`||s.location.pathname===`/${t}/${e}/`,i=e??Q,{data:a}=ps({queryKey:xs.activeOrganization(t),queryFn:async()=>{if(!t)return null;const{data:d}=await oe.organization.setActive({organizationSlug:t});return{org:d,project:{slug:i,isOrgAdmin:i===Q}}},gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1});if(!a)return n.jsxs("div",{className:"min-h-screen bg-background",children:[n.jsx(Gr,{}),n.jsx("div",{className:"pt-12",children:n.jsx(bt,{})})]});if(!a.org)return window.location.pathname!=="/"&&(window.location.href="/"),null;const c={...a,project:{...a.project,slug:i,isOrgAdmin:i===Q}};return n.jsxs(hs,{...c,children:[n.jsx(Zr,{children:n.jsxs("div",{className:"flex flex-col h-screen",style:{"--project-topbar-height":i===Q?"0px":"48px"},children:[n.jsx("style",{children:`
|
|
6
|
-
[data-slot="sidebar-container"] {
|
|
7
|
-
top: 0 !important;
|
|
8
|
-
}
|
|
9
|
-
[data-slot="sidebar-inner"] {
|
|
10
|
-
padding-top: 0 !important;
|
|
11
|
-
}
|
|
12
|
-
`}),n.jsx(re.Provider,{children:n.jsxs(pn,{className:"flex-1 bg-sidebar",style:{"--sidebar-width":"13rem","--sidebar-width-mobile":"11rem"},children:[n.jsx(Qn,{onCreateProject:()=>l(!0)}),n.jsx(hn,{className:"flex flex-col",children:n.jsxs(Ks,{children:[n.jsx(xr,{}),n.jsx("div",{className:"flex-1 overflow-hidden",children:n.jsx(Yr,{disableChat:o})})]})})]})})]})}),n.jsx(Ct,{open:r,onOpenChange:l})]})}function xo(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Rr,{children:n.jsx(y.Suspense,{fallback:n.jsx(jt,{}),children:n.jsx(qr,{})})}),t[0]=e):e=t[0],e}export{xo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as C,y as d,j as a}from"./index-BP5xHVRF.js";import{c as m}from"./utils-NsYXf4VI.js";const u=d("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",special:"fill-special text-backround"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=m(u({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let l,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=a.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=l,e[4]=i):(l=e[3],i=e[4]);let s;e[5]!==t?(s=a.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=a.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as c,j as i,a3 as C,al as y,am as T,an as I,ao as M,ap as H,aq as q,c as z}from"./index-BP5xHVRF.js";import{c as g}from"./utils-NsYXf4VI.js";var b="Switch",[A]=q(b),[U,L]=A(b),E=c.forwardRef((s,e)=>{const{__scopeSwitch:t,name:r,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=s,[p,h]=c.useState(null),v=y(e,m=>h(m)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:a,defaultProp:n??!1,onChange:k,caller:b});return i.jsxs(U,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(s.onClick,m=>{N(B=>!B),S&&(x.current=m.isPropagationStopped(),x.current||m.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=b;var P="SwitchThumb",R=c.forwardRef((s,e)=>{const{__scopeSwitch:t,...r}=s,a=L(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:e})});R.displayName=P;var O="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:s,control:e,checked:t,bubbles:r=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=O;function j(s){return s?"checked":"unchecked"}var $=E,D=R;function X(s){const e=z.c(9);let t,r;e[0]!==s?({className:t,...r}=s,e[0]=s,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let a;e[3]!==t?(a=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==a?(o=i.jsx($,{"data-slot":"switch",className:a,...r,children:n}),e[6]=r,e[7]=a,e[8]=o):o=e[8],o}export{X as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as r,j as c}from"./index-BP5xHVRF.js";import{c as i}from"./utils-NsYXf4VI.js";function b(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-background",children:c.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-background",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function u(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{u as T,f as a,m as b,x as c,p as d,b as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as o,j as e}from"./index-BP5xHVRF.js";import{E as m}from"./empty-state-DuUoirVq.js";import{P as a}from"./index-DdE2vL1_.js";import{B as i,a as c,b as n,c as l}from"./breadcrumb--xT5xhrI.js";import{n as d}from"./CheckDone01-W_IvTmR4.js";import"./utils-NsYXf4VI.js";import"./ChevronRight-C9SvVl2H.js";function b(){const s=o.c(2);let r;s[0]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsx(a.Header,{children:e.jsx(a.Header.Left,{children:e.jsx(i,{children:e.jsx(c,{children:e.jsx(n,{children:e.jsx(l,{children:"Tasks"})})})})})}),s[0]=r):r=s[0];let t;return s[1]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsxs(a,{children:[r,e.jsx(a.Content,{className:"flex",children:e.jsx(m,{image:e.jsx("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-muted",children:e.jsx(d,{size:32,className:"text-muted-foreground"})}),title:"Tasks",description:"Manage agent tasks and track progress on project goals. Coming soon."})})]}),s[1]=t):t=s[1],t}export{b as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as o,j as n}from"./index-BP5xHVRF.js";import{c as l}from"./utils-NsYXf4VI.js";function u(s){const e=o.c(8);let r,i;e[0]!==s?({className:r,...i}=s,e[0]=s,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let t;e[3]!==r?(t=l("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-xl border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),e[3]=r,e[4]=t):t=e[4];let a;return e[5]!==i||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...i}),e[5]=i,e[6]=t,e[7]=a):a=e[7],a}export{u as T};
|