@decocms/mesh 2.17.0 → 2.17.1
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-DOBZDZTf.js → AlertCircle-rclbzics.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CiX5attk.js → ArrowLeft-ClViT7Hc.js} +1 -1
- package/dist/client/assets/{ArrowUp-Cb5IgbXf.js → ArrowUp-BsQNKzS-.js} +1 -1
- package/dist/client/assets/{Check-D_y2LGJG.js → Check-C2R_Lcai.js} +1 -1
- package/dist/client/assets/{ChevronDown-CK8tBMwt.js → ChevronDown-CGAmRXVd.js} +1 -1
- package/dist/client/assets/{Code01-CHaKquD7.js → Code01-CVOtW_Yi.js} +1 -1
- package/dist/client/assets/{Copy01-DEYUyyKa.js → Copy01-BvrgG3_u.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-CJj2K5Fj.js → DotsHorizontal-D-_ECokQ.js} +1 -1
- package/dist/client/assets/{DotsVertical-DBgin8Gd.js → DotsVertical-BeOWu8ww.js} +1 -1
- package/dist/client/assets/{Download01-D480FrAl.js → Download01-C4VXJ4rj.js} +1 -1
- package/dist/client/assets/{Edit01-C2wyoLl_.js → Edit01-CkDEl3XN.js} +1 -1
- package/dist/client/assets/{File06-Dss_qxDP.js → File06-DcfM98WM.js} +1 -1
- package/dist/client/assets/{FilterLines-BIIc2m5u.js → FilterLines-BFhYlm1G.js} +1 -1
- package/dist/client/assets/{FlipBackward-C6tD49bS.js → FlipBackward-Bz0fRANc.js} +1 -1
- package/dist/client/assets/{GitBranch01-CCs9Y7UL.js → GitBranch01-Bc0tKWvO.js} +1 -1
- package/dist/client/assets/{Grid01-CPcgzk-j.js → Grid01-SL4tYH2-.js} +1 -1
- package/dist/client/assets/{Home02-B2DfszMd.js → Home02-C2IjHPBI.js} +1 -1
- package/dist/client/assets/{Image01-CWiMChMV.js → Image01-BQtv4av4.js} +1 -1
- package/dist/client/assets/{Inbox01-E54Xv1AH.js → Inbox01-Dq00_28Z.js} +1 -1
- package/dist/client/assets/{InfoCircle-C1Hk7qxK.js → InfoCircle-Cr1Ezl_g.js} +1 -1
- package/dist/client/assets/{Key01-D3jgPHnl.js → Key01-nM2KN2wI.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DXt_okRr.js → LinkExternal01-Cek4l5LT.js} +1 -1
- package/dist/client/assets/{List-vJTsFkGC.js → List-DhHX60HN.js} +1 -1
- package/dist/client/assets/{Loading01-CXxLrMyp.js → Loading01-CpEccvEO.js} +1 -1
- package/dist/client/assets/{Lock01-C0IcfwAr.js → Lock01-DkAqto6l.js} +1 -1
- package/dist/client/assets/{MessageChatSquare-BAK3msQ9.js → MessageChatSquare-B8VNN8W_.js} +1 -1
- package/dist/client/assets/{Play-D5UR01Yp.js → Play-gy0OXoTQ.js} +1 -1
- package/dist/client/assets/{Plus-BwqRnIpw.js → Plus-DjzFfDDP.js} +1 -1
- package/dist/client/assets/{SearchMd-B72GLhSo.js → SearchMd-Cg2el-z8.js} +1 -1
- package/dist/client/assets/{Terminal-C6oII67o.js → Terminal-Kg8grfTZ.js} +1 -1
- package/dist/client/assets/{Trash01-pQsQJfD7.js → Trash01-BnAfsqRe.js} +1 -1
- package/dist/client/assets/{Upload01-CPXoheIk.js → Upload01-DRgz8NgE.js} +1 -1
- package/dist/client/assets/{X-Ta7e64fd.js → X-CBga9b95.js} +1 -1
- package/dist/client/assets/{XClose-COWRVEvP.js → XClose-DEljIF8n.js} +1 -1
- package/dist/client/assets/{alert-dialog-CwDNNTWs.js → alert-dialog-BNxiLvEc.js} +1 -1
- package/dist/client/assets/{auth-catchall-DOIkjlbS.js → auth-catchall-DeehfEMz.js} +1 -1
- package/dist/client/assets/{avatar-Bbu1o6br.js → avatar-BXyXgGjh.js} +1 -1
- package/dist/client/assets/{badge-BF26aj7r.js → badge-Ctdv4gxt.js} +1 -1
- package/dist/client/assets/{binder-CZMsXyzM.js → binder-BxrAqFdA.js} +1 -1
- package/dist/client/assets/{button-CKEM3eQL.js → button-C0pnkZlC.js} +1 -1
- package/dist/client/assets/{card-2L27xRvH.js → card-DUUk5B6T.js} +1 -1
- package/dist/client/assets/{checkbox-D-u8zfFA.js → checkbox-DSzJrlMA.js} +1 -1
- package/dist/client/assets/{collection-detail-DRvlQkfI.js → collection-detail-iIrZ-zZ-.js} +1 -1
- package/dist/client/assets/{collection-display-button-BRmjKmXA.js → collection-display-button-DDxBelrQ.js} +1 -1
- package/dist/client/assets/{collection-header-DxthRGYV.js → collection-header-d89fPnWN.js} +1 -1
- package/dist/client/assets/{collection-page-D_yHhDuI.js → collection-page-DvY1awQQ.js} +1 -1
- package/dist/client/assets/{collection-search-B1XW3AZu.js → collection-search-DFSn4A42.js} +1 -1
- package/dist/client/assets/{collection-tab-tjhO7Mrn.js → collection-tab-J4NMpB8P.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-D0Ju0-U8.js → collection-table-wrapper-CB1f1HNV.js} +1 -1
- package/dist/client/assets/{connection-iGG9vveH.js → connection-CMutAR-q.js} +1 -1
- package/dist/client/assets/{connection-card-DtL0ugHI.js → connection-card-DJA7LSPP.js} +1 -1
- package/dist/client/assets/connection-detail-AyiveTST.js +1 -0
- package/dist/client/assets/{connections-D3zmX0Z9.js → connections-B5sVjhUZ.js} +1 -1
- package/dist/client/assets/constants-Bx2xP4ra.js +1 -0
- package/dist/client/assets/{create-organization-dialog-eRNW8Qxh.js → create-organization-dialog-FpknJphA.js} +1 -1
- package/dist/client/assets/{dialog-CDtau8Kt.js → dialog-DGipxHKv.js} +1 -1
- package/dist/client/assets/{dropdown-menu-wWS-zaMN.js → dropdown-menu-DXIsFCVQ.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-DputRlYb.js → dynamic-plugin-layout-p6uYyMI7.js} +1 -1
- package/dist/client/assets/{empty-state-CVNEuxZY.js → empty-state-BOQ8a8rM.js} +1 -1
- package/dist/client/assets/{empty-state-BHbK0lgC.js → empty-state-CsVvxFp9.js} +1 -1
- package/dist/client/assets/{env-vars-editor-C51mNjyA.js → env-vars-editor-DsDwdS2I.js} +1 -1
- package/dist/client/assets/{error-boundary-Bcxx4rfP.js → error-boundary-CiihS5J_.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Dpmksiuo.js → extract-connection-data-CZNqSTSO.js} +1 -1
- package/dist/client/assets/{file-browser-BGJT68ml.js → file-browser-DtPxgmLq.js} +2 -2
- package/dist/client/assets/{form-V7XQlTI9.js → form-Cq3oH5p8.js} +1 -1
- package/dist/client/assets/{gateway-detail-Dwo3tRMv.js → gateway-detail-Ds9jNsAy.js} +1 -1
- package/dist/client/assets/{gateways-zERSWoJy.js → gateways--0F8usoj.js} +1 -1
- package/dist/client/assets/{grid-view-D8luahOM.js → grid-view-DCCLpGyL.js} +1 -1
- package/dist/client/assets/{home-BzIxKv5R.js → home-C6YGDrtN.js} +1 -1
- package/dist/client/assets/{index-Dm3KUy-5.js → index-BEGxRCwV.js} +4 -4
- package/dist/client/assets/{index-D93bwXlh.js → index-BPAz_Wmi.js} +1 -1
- package/dist/client/assets/{index-BuhwJgoT.js → index-Ct-XKtSm.js} +1 -1
- package/dist/client/assets/{index-H8waGLZX.js → index-lLPOJwFP.js} +19 -19
- package/dist/client/assets/index-sjg7ALLH.js +25 -0
- package/dist/client/assets/{infiniteQueryObserver-CorNdPTl.js → infiniteQueryObserver-Cg5Uwm-m.js} +1 -1
- package/dist/client/assets/{input-B_S0H_Hl.js → input-BtvEWyY7.js} +1 -1
- package/dist/client/assets/{layout-CSDcjZIC.js → layout-D_5LiG9u.js} +1 -1
- package/dist/client/assets/{lazy-highlighter-C9yEt-oj.js → lazy-highlighter-D262jDd3.js} +1 -1
- package/dist/client/assets/{localstorage-keys-bcceq1xC.js → localstorage-keys-CrsmSVIa.js} +1 -1
- package/dist/client/assets/{login-BYnVwbER.js → login-D-eNDgSJ.js} +1 -1
- package/dist/client/assets/mcp-oauth-BlRDBNPG.js +1 -0
- package/dist/client/assets/{mcp-server-card-_ATNoXTX.js → mcp-server-card-h4-acR5C.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-DObA9nLB.js → mcp-server-detail-BIJFOf-1.js} +1 -1
- package/dist/client/assets/{members-BebBEAXI.js → members-JDeSn8de.js} +1 -1
- package/dist/client/assets/{monaco-editor-DKdQnknl.js → monaco-editor-h8_XpHnI.js} +1 -1
- package/dist/client/assets/{monitoring-CDDlEqUx.js → monitoring-B5veKGER.js} +12 -12
- package/dist/client/assets/{oauth-callback-gzfkrrQW.js → oauth-callback-B7GGjmT2.js} +1 -1
- package/dist/client/assets/{page-Do6tc7Ak.js → page-DRfRpAk9.js} +1 -1
- package/dist/client/assets/{page-CLLgwmPE.js → page-JPTyFV98.js} +1 -1
- package/dist/client/assets/{pin-to-sidebar-button-NqMT4AF7.js → pin-to-sidebar-button-DNtnmSb8.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CsEwK0UI.js → plugin-empty-state-DrcgOOcq.js} +1 -1
- package/dist/client/assets/{plugin-header-DMvUkTVw.js → plugin-header-riFgGbiI.js} +1 -1
- package/dist/client/assets/{plugins-femIOaN7.js → plugins-DoB7Ko8p.js} +1 -1
- package/dist/client/assets/{popover-CUHksX3w.js → popover-pNwa1deQ.js} +1 -1
- package/dist/client/assets/{project-context-provider-DTbOrAFq.js → project-context-provider-BMHXD39x.js} +1 -1
- package/dist/client/assets/{registry-utils-C5W-BZ_1.js → registry-utils-BkBVcE6w.js} +1 -1
- package/dist/client/assets/{resizable-BEUt05S8.js → resizable-jz1SBMEc.js} +1 -1
- package/dist/client/assets/{resource-tabs-kfeiBQEL.js → resource-tabs-DqRWX41r.js} +1 -1
- package/dist/client/assets/{select-H2esePZI.js → select-COJ5S7Rq.js} +1 -1
- package/dist/client/assets/{settings-DO0PkWA0.js → settings-CmNkIvY0.js} +1 -1
- package/dist/client/assets/{shell-layout-Bx8F46Gf.js → shell-layout-B43W-k9I.js} +1 -1
- package/dist/client/assets/{spinner-BZhaf6l_.js → spinner-Deoz6N0J.js} +1 -1
- package/dist/client/assets/{switch-CIfCfD81.js → switch-Z2NGTQao.js} +1 -1
- package/dist/client/assets/{textarea-CC9KHQpw.js → textarea-fD103gtG.js} +1 -1
- package/dist/client/assets/{tool-set-selector-Cty6fXdH.js → tool-set-selector-SxQbDynN.js} +1 -1
- package/dist/client/assets/{tools-list-rrG-PiCB.js → tools-list-9lgpWeKJ.js} +1 -1
- package/dist/client/assets/{tooltip-DixY1Sbc.js → tooltip-D0yN_jPS.js} +1 -1
- package/dist/client/assets/{use-binding-CPqdk4GE.js → use-binding-bdIG4ysm.js} +1 -1
- package/dist/client/assets/{use-collections-S6OVeMx0.js → use-collections-DiH8BH96.js} +1 -1
- package/dist/client/assets/{use-connection-C_QQYkok.js → use-connection-BvgGy_ae.js} +1 -1
- package/dist/client/assets/{use-connection-resources-h_CY6VEc.js → use-connection-resources-CazBLQYp.js} +1 -1
- package/dist/client/assets/{use-create-gateway-eDGGqEOS.js → use-create-gateway-DWTCcW8J.js} +1 -1
- package/dist/client/assets/{use-gateway-DMJjVwlU.js → use-gateway-Blme6XE1.js} +1 -1
- package/dist/client/assets/{use-gateway-system-prompt-CfIIyZId.js → use-gateway-system-prompt-DfRYNjlK.js} +1 -1
- package/dist/client/assets/{use-list-state-Bt6QEhtR.js → use-list-state-C9VeGRXh.js} +1 -1
- package/dist/client/assets/{use-mcp-DuKh-Xf7.js → use-mcp-ByUu9rNa.js} +1 -1
- package/dist/client/assets/{use-members-Hsme2FMs.js → use-members-A4eH5Mug.js} +1 -1
- package/dist/client/assets/{use-mobile-Bh6onNnL.js → use-mobile-DQFSnNx5.js} +1 -1
- package/dist/client/assets/{use-organization-settings-C4u9V1Gg.js → use-organization-settings-CFfwAQvt.js} +1 -1
- package/dist/client/assets/{use-tool-call-BSVniqlJ.js → use-tool-call-q6DaczOv.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-c0A7IUcG.js +1 -0
- package/dist/client/assets/{useMutation-DXyBs08e.js → useMutation-8xrpFP-l.js} +1 -1
- package/dist/client/assets/useQuery-CLJFoOtO.js +1 -0
- package/dist/client/assets/{value-EQeDZr5M.js → value-_3bvT1Yq.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CoxeG-5F.js → view-mode-toggle-C7lGZNG7.js} +1 -1
- package/dist/client/assets/{workflow-CdkAFtfl.js → workflow-DBXd52Rn.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +208 -208
- package/dist/server/migrate.js +186 -186
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/LICENSE +47 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/README.md +82 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.browser.d.ts +11 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.browser.mjs +43 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cjs +45 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cloudflare.cjs +46 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cloudflare.d.ts +11 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.d.ts +11 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.mjs +46 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.wasm +0 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.d.mts +83 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.d.ts +83 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.js +2 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.js.map +1 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.mjs +2 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.mjs.map +1 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.d.mts +20 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.d.ts +20 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.js +2 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.js.map +1 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.mjs +2 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.mjs.map +1 -0
- package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/package.json +61 -0
- package/dist/server/server.js +202 -202
- package/package.json +1 -1
- package/dist/client/assets/connection-detail-CfQ3feir.js +0 -1
- package/dist/client/assets/constants-rLrKmanL.js +0 -1
- package/dist/client/assets/index-COEG5bG9.js +0 -25
- package/dist/client/assets/mcp-oauth-BQzIgGw8.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BYo7uk8S.js +0 -1
- package/dist/client/assets/useQuery-9rHAo5k0.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as w,e as et,a as W,j as n,f as te,t as U,c as h,R as tt,T as st,D as at,C as nt,P as ot,g as rt,O as lt,h as it,i as ct,k as ve,p as dt,l as mt,d as we,m as Ne,n as Z,G as ft,o as ut,S as Se,q as pt,s as ht,N as xt,v as gt,K as bt,w as ye}from"./index-H8waGLZX.js";import{B as H,c as I}from"./button-CKEM3eQL.js";import{P as Ce,a as _e,b as ke}from"./popover-CUHksX3w.js";import{B as fe}from"./badge-BF26aj7r.js";import{i as ee}from"./Check-D_y2LGJG.js";import{n as ue}from"./Inbox01-E54Xv1AH.js";import{s as pe}from"./XClose-COWRVEvP.js";import{E as $e}from"./error-boundary-Bcxx4rfP.js";import{i as jt}from"./File06-Dss_qxDP.js";import{i as q}from"./X-Ta7e64fd.js";import{u as Y}from"./use-mobile-Bh6onNnL.js";import{T as ze,a as Ie,b as Oe,c as Te}from"./tooltip-DixY1Sbc.js";import{S as Me,i as vt,u as wt,C as A,a as Nt}from"./index-Dm3KUy-5.js";import{u as re,a as St}from"./use-organization-settings-C4u9V1Gg.js";import{u as se,L as he,P as yt,O as Ct}from"./project-context-provider-DTbOrAFq.js";import{n as _t,I as kt}from"./empty-state-CVNEuxZY.js";import{i as Ae}from"./use-gateway-DMJjVwlU.js";import{a as $t}from"./Home02-B2DfszMd.js";import{C as zt}from"./create-organization-dialog-eRNW8Qxh.js";import{I as It}from"./input-B_S0H_Hl.js";import{A as K}from"./avatar-Bbu1o6br.js";import{c as Ot}from"./Grid01-CPcgzk-j.js";import{D as Tt,a as Mt,b as At,c as Rt,d as xe}from"./dropdown-menu-wWS-zaMN.js";import{a as Re}from"./Copy01-DEYUyyKa.js";import{n as ge}from"./LinkExternal01-DXt_okRr.js";import{D as Pt,a as Et,b as Dt,c as Lt,d as Ht}from"./dialog-CDtau8Kt.js";import{L as Bt}from"./form-V7XQlTI9.js";import{S as Ut}from"./switch-CIfCfD81.js";import{i as Wt}from"./Code01-CHaKquD7.js";import{u as le,L as ie}from"./localstorage-keys-bcceq1xC.js";import{t as Ft}from"./MessageChatSquare-BAK3msQ9.js";import{R as Pe,a as Vt,b as Gt}from"./resizable-BEUt05S8.js";import{s as Kt}from"./Plus-BwqRnIpw.js";import"./textarea-CC9KHQpw.js";import"./AlertCircle-DOBZDZTf.js";import"./ArrowUp-Cb5IgbXf.js";import"./ChevronDown-CK8tBMwt.js";import"./Edit01-C2wyoLl_.js";import"./connection-iGG9vveH.js";import"./use-collections-S6OVeMx0.js";import"./useMutation-DXyBs08e.js";import"./use-connection-C_QQYkok.js";import"./use-binding-CPqdk4GE.js";import"./binder-CZMsXyzM.js";import"./use-gateway-system-prompt-CfIIyZId.js";import"./SearchMd-B72GLhSo.js";import"./use-create-gateway-eDGGqEOS.js";import"./select-H2esePZI.js";import"./Image01-CWiMChMV.js";import"./Terminal-C6oII67o.js";import"./monaco-editor-DKdQnknl.js";import"./spinner-BZhaf6l_.js";import"./alert-dialog-CwDNNTWs.js";import"./well-known-mcp-DOEdYmKO.js";import"./generate-id-Dyweu44Y.js";import"./Trash01-pQsQJfD7.js";import"./useQuery-9rHAo5k0.js";const Ee=({size:t=24,color:e="currentColor",...s})=>w.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},w.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"}));Ee.displayName="BarChart10";const De=({size:t=24,color:e="currentColor",...s})=>w.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},w.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"}));De.displayName="Building02";const Le=({size:t=24,color:e="currentColor",...s})=>w.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},w.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"}));Le.displayName="Globe01";const He=({size:t=24,color:e="currentColor",...s})=>w.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},w.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"}));He.displayName="LayoutRight";const Be=({size:t=24,color:e="currentColor",...s})=>w.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},w.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"}));Be.displayName="LogOut01";const Ue=({size:t=24,color:e="currentColor",...s})=>w.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},w.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"}));Ue.displayName="Mail01";const ce=({size:t=24,color:e="currentColor",...s})=>w.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},w.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}),w.createElement("path",{d:"M18.727 14.727a1.5 1.5 0 0 0 .3 1.655l.055.054a1.816 1.816 0 0 1 0 2.573 1.818 1.818 0 0 1-2.573 0l-.055-.055a1.5 1.5 0 0 0-1.654-.3 1.5 1.5 0 0 0-.91 1.373v.155a1.818 1.818 0 1 1-3.636 0V20.1a1.5 1.5 0 0 0-.981-1.373 1.5 1.5 0 0 0-1.655.3l-.054.055a1.818 1.818 0 0 1-3.106-1.287 1.818 1.818 0 0 1 .533-1.286l.054-.055a1.5 1.5 0 0 0 .3-1.654 1.5 1.5 0 0 0-1.372-.91h-.155a1.818 1.818 0 1 1 0-3.636H3.9a1.5 1.5 0 0 0 1.373-.981 1.5 1.5 0 0 0-.3-1.655l-.055-.054A1.818 1.818 0 1 1 7.491 4.99l.054.054a1.5 1.5 0 0 0 1.655.3h.073a1.5 1.5 0 0 0 .909-1.372v-.155a1.818 1.818 0 0 1 3.636 0V3.9a1.499 1.499 0 0 0 .91 1.373 1.5 1.5 0 0 0 1.654-.3l.054-.055a1.817 1.817 0 0 1 2.573 0 1.819 1.819 0 0 1 0 2.573l-.055.054a1.5 1.5 0 0 0-.3 1.655v.073a1.5 1.5 0 0 0 1.373.909h.155a1.818 1.818 0 0 1 0 3.636H20.1a1.499 1.499 0 0 0-1.373.91Z"}));ce.displayName="Settings01";const We=({size:t=24,color:e="currentColor",...s})=>w.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},w.createElement("path",{d:"M22 21v-2a4.002 4.002 0 0 0-3-3.874M15.5 3.291a4.001 4.001 0 0 1 0 7.418M17 21c0-1.864 0-2.796-.305-3.53a4 4 0 0 0-2.164-2.165C13.796 15 12.864 15 11 15H8c-1.864 0-2.796 0-3.53.305a4 4 0 0 0-2.166 2.164C2 18.204 2 19.136 2 21M13.5 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));We.displayName="Users01";const Fe=({size:t=24,color:e="currentColor",...s})=>w.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},w.createElement("path",{d:"M13 2 4.093 12.688c-.348.418-.523.628-.525.804a.5.5 0 0 0 .185.397c.138.111.41.111.955.111H12l-1 8 8.907-10.688c.348-.418.523-.628.525-.804a.5.5 0 0 0-.185-.397c-.138-.111-.41-.111-.955-.111H12l1-8Z"}));Fe.displayName="Zap";function Zt({invitation:t,onStatusChange:e}){const[s,a]=w.useState(!1),[o,r]=w.useState(!1),l=te(),i=async()=>{a(!0);try{const u=await W.organization.acceptInvitation({invitationId:t.id});if(u.error)U.error(u.error.message),a(!1);else{e(t.id,"accepted");const x=await W.organization.setActive({organizationId:t.organizationId});x?.data?.slug?(U.success("Invitation accepted!"),l({to:"/$org",params:{org:x.data.slug}})):(U.success("Invitation accepted! Redirecting..."),l({to:"/"}))}}catch{U.error("Failed to accept invitation"),a(!1)}},c=async()=>{r(!0);try{const u=await W.organization.rejectInvitation({invitationId:t.id});u.error?(U.error(u.error.message),r(!1)):(U.success("Invitation rejected"),e(t.id,"rejected"),r(!1))}catch{U.error("Failed to reject invitation"),r(!1)}},d=t.organizationName||t.organizationId,m=t.inviter?.name||t.inviter?.email||t.email||"Someone",f=t.status==="pending",p=t.status==="accepted",g=t.status==="rejected";return n.jsxs("div",{className:`flex items-center gap-3 px-3 py-2 h-12 border-b border-border/50 last:border-b-0 ${f?"":"opacity-50"}`,children:[n.jsx("div",{className:"shrink-0 size-5 flex items-center justify-center",children:n.jsx(Ue,{size:16,className:"text-muted-foreground"})}),n.jsxs("p",{className:"flex-1 text-sm text-foreground min-w-0 whitespace-nowrap overflow-hidden",children:[n.jsx("span",{className:"font-semibold inline-block max-w-[120px] truncate align-bottom",children:m})," invited you to join ",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:f?n.jsxs(n.Fragment,{children:[n.jsx(H,{variant:"ghost",size:"icon",onClick:c,disabled:s||o,className:"h-8 w-8",children:n.jsx(pe,{size:14})}),n.jsx(H,{variant:"outline",size:"icon",onClick:i,disabled:s||o,className:"h-8 w-8",children:n.jsx(ee,{size:14})})]}):p?n.jsxs(fe,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(ee,{size:12}),"Accepted"]}):g?n.jsxs(fe,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(pe,{size:12}),"Declined"]}):null})]})}function qt(){const[t,e]=w.useState(!1),s=w.useContext(et),{data:a}=s.hooks.useListUserInvitations(),{data:o}=W.useListOrganizations(),[r,l]=w.useState({}),d=(a??[]).map(u=>{const x=(o??[]).find(b=>b.id===u.organizationId);return{...u,organizationSlug:x?.slug||u.organizationSlug,organizationName:x?.name||u.organizationName}}).map(u=>({...u,status:r[u.id]||u.status})),m=[...d].sort((u,x)=>{const b={pending:0,accepted:1,rejected:2};return(b[u.status]??999)-(b[x.status]??999)}),p=d.filter(u=>u.status==="pending").length>0,g=(u,x)=>{l(b=>({...b,[u]:x}))};return n.jsxs(Ce,{open:t,onOpenChange:e,children:[n.jsx(_e,{asChild:!0,children:n.jsxs(H,{variant:"ghost",size:"sm",className:"relative h-7 w-7 p-0","aria-label":"Inbox",children:[n.jsx(ue,{size:18,className:"text-muted-foreground"}),p&&n.jsx("span",{className:"absolute bottom-1 right-0.5 h-2 w-2 rounded-full bg-destructive ring-2 ring-background"})]})}),n.jsxs(ke,{align:"end",className:"w-[480px] 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:m.length>0?m.map(u=>n.jsx(Zt,{invitation:u,onStatusChange:g},u.id)):n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[n.jsx(ue,{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 Yt(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(tt,{"data-slot":"sheet",...s}),e[2]=s,e[3]=a):a=e[3],a}function Jt(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(ot,{"data-slot":"sheet-portal",...s}),e[2]=s,e[3]=a):a=e[3],a}function Xt(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("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]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx(lt,{"data-slot":"sheet-overlay",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function Qt(t){const e=h.c(17);let s,a,o,r;e[0]!==t?({className:a,children:s,side:r,...o}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=r):(s=e[1],a=e[2],o=e[3],r=e[4]);const l=r===void 0?"right":r;let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Xt,{}),e[5]=i):i=e[5];const c=l==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",d=l==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",m=l==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",f=l==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let p;e[6]!==a||e[7]!==c||e[8]!==d||e[9]!==m||e[10]!==f?(p=I("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",c,d,m,f,a),e[6]=a,e[7]=c,e[8]=d,e[9]=m,e[10]=f,e[11]=p):p=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsxs(rt,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[n.jsx(q,{className:"size-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=g):g=e[12];let u;return e[13]!==s||e[14]!==o||e[15]!==p?(u=n.jsxs(Jt,{children:[i,n.jsxs(nt,{"data-slot":"sheet-content",className:p,...o,children:[s,g]})]}),e[13]=s,e[14]=o,e[15]=p,e[16]=u):u=e[16],u}function es(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("flex flex-col gap-1.5 p-4",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx("div",{"data-slot":"sheet-header",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function ts(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("text-foreground font-semibold",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx(st,{"data-slot":"sheet-title",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function ss(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("text-muted-foreground text-sm",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx(at,{"data-slot":"sheet-description",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}const as="sidebar_state",ns=3600*24*7,os="16rem",rs="18rem",ls="3rem",is="b",Ve=w.createContext(null);function de(){const t=w.useContext(Ve);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function cs(t){const e=h.c(21),{defaultOpen:s,open:a,onOpenChange:o,children:r}=t,l=s===void 0?!0:s,i=Y(),[c,d]=w.useState(!1),[m,f]=w.useState(l),p=a??m;let g;e[0]!==p||e[1]!==o?(g=$=>{const S=typeof $=="function"?$(p):$;o?o(S):f(S),document.cookie=`${as}=${S}; path=/; max-age=${ns}`},e[0]=p,e[1]=o,e[2]=g):g=e[2];const u=g;let x;e[3]!==i||e[4]!==u?(x=()=>i?d(ms):u(ds),e[3]=i,e[4]=u,e[5]=x):x=e[5];const b=x;let j,v;e[6]!==b?(j=()=>{const $=S=>{if(S.key===is&&(S.metaKey||S.ctrlKey)){const z=S.target;if(z.tagName==="INPUT"||z.tagName==="TEXTAREA"||z.isContentEditable)return;S.preventDefault(),b()}};return globalThis.addEventListener("keydown",$),()=>globalThis.removeEventListener("keydown",$)},v=[b],e[6]=b,e[7]=j,e[8]=v):(j=e[7],v=e[8]),w.useEffect(j,v);const N=p?"expanded":"collapsed";let k;e[9]!==i||e[10]!==p||e[11]!==c||e[12]!==u||e[13]!==N||e[14]!==b?(k={state:N,open:p,setOpen:u,isMobile:i,openMobile:c,setOpenMobile:d,toggleSidebar:b},e[9]=i,e[10]=p,e[11]=c,e[12]=u,e[13]=N,e[14]=b,e[15]=k):k=e[15];const y=k;let _;e[16]!==r?(_=n.jsx(Ie,{delayDuration:0,children:r}),e[16]=r,e[17]=_):_=e[17];let C;return e[18]!==y||e[19]!==_?(C=n.jsx(Ve.Provider,{value:y,children:_}),e[18]=y,e[19]=_,e[20]=C):C=e[20],C}function ds(t){return!t}function ms(t){return!t}function fs(t){const e=h.c(14);let s,a,o,r;e[0]!==t?({className:a,style:r,children:s,...o}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=r):(s=e[1],a=e[2],o=e[3],r=e[4]);let l;e[5]!==r?(l={"--sidebar-width":os,"--sidebar-width-icon":ls,...r},e[5]=r,e[6]=l):l=e[6];const i=l;let c;e[7]!==a?(c=I("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",a),e[7]=a,e[8]=c):c=e[8];let d;return e[9]!==s||e[10]!==o||e[11]!==i||e[12]!==c?(d=n.jsx("div",{"data-slot":"sidebar-wrapper",style:i,className:c,...o,children:s}),e[9]=s,e[10]=o,e[11]=i,e[12]=c,e[13]=d):d=e[13],d}function us(t){const e=h.c(46);let s,a,o,r,l,i;e[0]!==t?({side:r,variant:l,collapsible:i,className:a,children:s,...o}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=r,e[5]=l,e[6]=i):(s=e[1],a=e[2],o=e[3],r=e[4],l=e[5],i=e[6]);const c=r===void 0?"left":r,d=l===void 0?"sidebar":l,m=i===void 0?"offcanvas":i,{isMobile:f,state:p,openMobile:g,setOpenMobile:u}=de();if(m==="none"){let S;e[7]!==a?(S=I("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",a),e[7]=a,e[8]=S):S=e[8];let z;return e[9]!==s||e[10]!==o||e[11]!==S?(z=n.jsx("div",{"data-slot":"sidebar",className:S,...o,children:s}),e[9]=s,e[10]=o,e[11]=S,e[12]=z):z=e[12],z}if(f){let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S={"--sidebar-width":rs},e[13]=S):S=e[13];let z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsxs(es,{className:"sr-only",children:[n.jsx(ts,{children:"Sidebar"}),n.jsx(ss,{children:"Displays the mobile sidebar."})]}),e[14]=z):z=e[14];let O;e[15]!==s?(O=n.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=O):O=e[16];let T;e[17]!==c||e[18]!==O?(T=n.jsxs(Qt,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:S,side:c,children:[z,O]}),e[17]=c,e[18]=O,e[19]=T):T=e[19];let M;return e[20]!==g||e[21]!==o||e[22]!==u||e[23]!==T?(M=n.jsx(Yt,{open:g,onOpenChange:u,...o,children:T}),e[20]=g,e[21]=o,e[22]=u,e[23]=T,e[24]=M):M=e[24],M}const x=p==="collapsed"?m:"",b=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 j;e[25]!==b?(j=I("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",b),e[25]=b,e[26]=j):j=e[26];let v;e[27]!==j?(v=n.jsx("div",{"data-slot":"sidebar-gap",className:j}),e[27]=j,e[28]=v):v=e[28];const N=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)]",k=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 y;e[29]!==a||e[30]!==N||e[31]!==k?(y=I("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",N,k,a),e[29]=a,e[30]=N,e[31]=k,e[32]=y):y=e[32];let _;e[33]!==s?(_=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border py-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]=_):_=e[34];let C;e[35]!==o||e[36]!==y||e[37]!==_?(C=n.jsx("div",{"data-slot":"sidebar-container",className:y,...o,children:_}),e[35]=o,e[36]=y,e[37]=_,e[38]=C):C=e[38];let $;return e[39]!==c||e[40]!==p||e[41]!==C||e[42]!==x||e[43]!==v||e[44]!==d?($=n.jsxs("div",{className:"group peer text-foreground hidden md:block border-r","data-state":p,"data-collapsible":x,"data-variant":d,"data-side":c,"data-slot":"sidebar",children:[v,C]}),e[39]=c,e[40]=p,e[41]=C,e[42]=x,e[43]=v,e[44]=d,e[45]=$):$=e[45],$}function ps(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("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]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx("main",{"data-slot":"sidebar-inset",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function hs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("h-4 m-0! w-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx("div",{"data-sidebar":"separator",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function xs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function gs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function bs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("w-full text-sm",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function js(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("flex w-full min-w-0 flex-col gap-1",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function ae(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("group/menu-item relative",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}const vs=it("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 Ge(t){const e=h.c(28);let s,a,o,r,l,i,c;e[0]!==t?({asChild:o,isActive:r,variant:l,size:i,tooltip:c,className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=r,e[5]=l,e[6]=i,e[7]=c):(s=e[1],a=e[2],o=e[3],r=e[4],l=e[5],i=e[6],c=e[7]);const d=o===void 0?!1:o,m=r===void 0?!1:r,f=l===void 0?"default":l,p=i===void 0?"default":i,g=d?ct:"button",{isMobile:u,state:x}=de();let b;e[8]!==s||e[9]!==p||e[10]!==f?(b=I(vs({variant:f,size:p}),s),e[8]=s,e[9]=p,e[10]=f,e[11]=b):b=e[11];let j;e[12]!==g||e[13]!==m||e[14]!==a||e[15]!==p||e[16]!==b?(j=n.jsx(g,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":p,"data-active":m,className:b,...a}),e[12]=g,e[13]=m,e[14]=a,e[15]=p,e[16]=b,e[17]=j):j=e[17];const v=j;if(!c)return v;if(typeof c=="string"){let C;e[18]!==c?(C={children:c},e[18]=c,e[19]=C):C=e[19],c=C}let N;e[20]!==v?(N=n.jsx(Oe,{asChild:!0,children:v}),e[20]=v,e[21]=N):N=e[21];const k=x!=="collapsed"||u;let y;e[22]!==k||e[23]!==c?(y=n.jsx(ze,{side:"right",align:"center",hidden:k,...c}),e[22]=k,e[23]=c,e[24]=y):y=e[24];let _;return e[25]!==N||e[26]!==y?(_=n.jsxs(Te,{children:[N,y]}),e[25]=N,e[26]=y,e[27]=_):_=e[27],_}function ws(t){const e=h.c(26),{item:s}=t,a=te(),{org:o}=se(),r=re(o.id),l=St(o.id);let i;e[0]!==l.update||e[1]!==s.url||e[2]!==r?.sidebar_items?(i=async()=>{const k=(r?.sidebar_items||[]).filter(y=>y.url!==s.url);await l.update.mutateAsync({sidebar_items:k})},e[0]=l.update,e[1]=s.url,e[2]=r?.sidebar_items,e[3]=i):i=e[3];const c=i;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 p;e[7]!==s.url||e[8]!==a?(p=()=>{a({to:s.url})},e[7]=s.url,e[8]=a,e[9]=p):p=e[9];const g=s.title;let u;e[10]!==f||e[11]!==s.icon||e[12]!==s.title?(u=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(jt,{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]=u):u=e[13];let x;e[14]!==s.title?(x=s.title.toLocaleLowerCase(),e[14]=s.title,e[15]=x):x=e[15];let b;e[16]!==x?(b=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:x})}),e[16]=x,e[17]=b):b=e[17];let j;e[18]!==c?(j=n.jsx(q,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:N=>{N.preventDefault(),N.stopPropagation(),c()}}),e[18]=c,e[19]=j):j=e[19];let v;return e[20]!==s.title||e[21]!==p||e[22]!==u||e[23]!==b||e[24]!==j?(v=n.jsx(ae,{children:n.jsxs(Ge,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:p,tooltip:g,children:[u,b,j]})}),e[20]=s.title,e[21]=p,e[22]=u,e[23]=b,e[24]=j,e[25]=v):v=e[25],v}function Ns(){const t=h.c(4),{org:e}=se(),a=re(e.id)?.sidebar_items;if(!a?.length)return null;let o;t[0]!==a?(o=a.map(Ss),t[0]=a,t[1]=o):o=t[1];let r;return t[2]!==o?(r=n.jsx(Ke,{children:o}),t[2]=o,t[3]=r):r=t[3],r}function Ss(t){return n.jsx(ws,{item:t},t.url)}function be(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(ae,{children:n.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:n.jsx(Me,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function Ke(t){const e=h.c(4),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(hs,{className:"my-2 -ml-1"}),e[0]=a):a=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(ae,{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]=o):o=e[1];let r;return e[2]!==s?(r=n.jsxs(n.Fragment,{children:[a,o,s]}),e[2]=s,e[3]=r):r=e[3],r}function ys(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(w.Suspense,{fallback:n.jsxs(Ke,{children:[n.jsx(be,{}),n.jsx(be,{})]}),children:n.jsx(Ns,{})}),t[0]=e):e=t[0],e}function Cs(){const t=h.c(14),{locator:e,org:s}=se(),a=te(),o=ve(),{org:r}=he.parse(e);let l;t[0]!==e?(l=he.isOrgAdminProject(e),t[0]=e,t[1]=l):l=t[1];const i=l,c=re(s.id);let d;t[2]!==c?.enabled_plugins?(d=c?.enabled_plugins??[],t[2]=c?.enabled_plugins,t[3]=d):d=t[3];const m=d;let f;t[4]!==m?(f=C=>m.includes(C.pluginId),t[4]=m,t[5]=f):f=t[5];const p=dt.filter(f),g=o.location.pathname===`/${r}`||o.location.pathname===`/${r}/`;let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx($t,{}),t[6]=u):u=t[6];let x;t[7]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(De,{}),t[7]=x):x=t[7];let b;t[8]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(_t,{}),t[8]=b):b=t[8];let j;t[9]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(Ae,{}),t[9]=j):j=t[9];let v;t[10]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Fe,{}),t[10]=v):v=t[10];let N;t[11]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(Ee,{}),t[11]=N):N=t[11];let k;t[12]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(We,{}),t[12]=k):k=t[12];let y;t[13]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(ce,{}),t[13]=y):y=t[13];const _=[{key:"home",label:"Home",icon:u,onClick:()=>{g?window.dispatchEvent(new CustomEvent("reset-home-view")):a({to:"/$org",params:{org:r}})}},{key:"store",label:"Store",icon:x,onClick:()=>a({to:"/$org/store",params:{org:r}})},...p.map(C=>({key:C.pluginId,label:C.label,icon:C.icon,onClick:()=>a({to:"/$org/$pluginId",params:{org:r,pluginId:C.pluginId}})})),{key:"mcps",label:"Connections",icon:b,onClick:()=>a({to:"/$org/mcps",params:{org:r}})},{key:"gateways",label:"Agents",icon:j,onClick:()=>a({to:"/$org/gateways",params:{org:r}})},{key:"workflow",label:"Workflows",icon:v,onClick:()=>a({to:"/$org/workflows",params:{org:r}})},{key:"monitoring",label:"Monitoring",icon:N,onClick:()=>a({to:"/$org/monitoring",params:{org:r}})},{key:"members",label:"Members",icon:k,onClick:()=>a({to:"/$org/members",params:{org:r}})},{key:"settings",label:"Settings",icon:y,onClick:()=>a({to:"/$org/settings",params:{org:r}})}];return i?_:[]}function Ze(t){const e=h.c(10),{navigationItems:s,footer:a,additionalContent:o,variant:r,collapsible:l}=t,i=r===void 0?"sidebar":r,c=l===void 0?"icon":l;let d;e[0]!==s?(d=s.map(_s),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==o||e[3]!==d?(m=n.jsx(xs,{className:"flex-1 overflow-x-hidden",children:n.jsx(gs,{className:"font-medium",children:n.jsx(bs,{children:n.jsxs(js,{className:"gap-0.5",children:[d,o]})})})}),e[2]=o,e[3]=d,e[4]=m):m=e[4];let f;return e[5]!==c||e[6]!==a||e[7]!==m||e[8]!==i?(f=n.jsxs(us,{variant:i,collapsible:c,children:[m,a]}),e[5]=c,e[6]=a,e[7]=m,e[8]=i,e[9]=f):f=e[9],f}function _s(t){return n.jsx(ae,{children:n.jsxs(Ge,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:t.onClick,isActive:t.isActive,tooltip:t.label,children:[n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:t.icon}),n.jsx("span",{className:"truncate",children:t.label})]})},t.key)}Ze.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(Me,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};function ks(){const t=h.c(3),e=Cs();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(n.Fragment,{children:n.jsx($e,{children:n.jsx(w.Suspense,{fallback:null,children:n.jsx(ys,{})})})}),t[0]=s):s=t[0];let a;return t[1]!==e?(a=n.jsx(Ze,{navigationItems:e,additionalContent:s}),t[1]=e,t[2]=a):a=t[2],a}function $s(t){const e=h.c(12);let s,a,o,r;e[0]!==t?({className:s,orientation:o,decorative:r,...a}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=r):(s=e[1],a=e[2],o=e[3],r=e[4]);const l=o===void 0?"horizontal":o,i=r===void 0?!0:r;let c;e[5]!==s?(c=I("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]!==i||e[8]!==l||e[9]!==a||e[10]!==c?(d=n.jsx(mt,{"data-slot":"separator-root",decorative:i,orientation:l,className:c,...a}),e[7]=i,e[8]=l,e[9]=a,e[10]=c,e[11]=d):d=e[11],d}const qe=w.createContext(null);function zs(){const t=w.useContext(qe);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function Is(t){const e=h.c(10),{children:s,onItemHover:a}=t,[o,r]=w.useState(null);let l;e[0]!==a?(l=f=>{r(f),a?.(f)},e[0]=a,e[1]=l):l=e[1];const i=l;let c;e[2]!==o||e[3]!==i?(c={hoveredItem:o,setHoveredItem:i},e[2]=o,e[3]=i,e[4]=c):c=e[4];let d;e[5]!==s?(d=n.jsx(Ce,{children:s}),e[5]=s,e[6]=d):d=e[6];let m;return e[7]!==c||e[8]!==d?(m=n.jsx(qe.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=m):m=e[9],m}function Os(t){const e=h.c(6),{children:s,onClick:a}=t;let o;e[0]!==s||e[1]!==a?(o=n.jsx(H,{variant:"link",className:"p-0.5 h-auto",onClick:a,type:"button",children:s}),e[0]=s,e[1]=a,e[2]=o):o=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(_e,{asChild:!0,children:n.jsx(H,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:n.jsx(vt,{size:16,className:"opacity-50"})})}),e[3]=r):r=e[3];let l;return e[4]!==o?(l=n.jsxs("div",{className:"flex items-center gap-1",children:[o,r]}),e[4]=o,e[5]=l):l=e[5],l}function Ts(t){const e=h.c(8),{item:s,fallback:a}=t,o=a===void 0?"":a,r=s?.avatarUrl??"",l=s?.name??o;let i;e[0]!==r||e[1]!==l?(i=n.jsx(K,{url:r,fallback:l,size:"xs",objectFit:"contain"}),e[0]=r,e[1]=l,e[2]=i):i=e[2];const c=s?.name??o;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]!==i||e[6]!==d?(m=n.jsxs("div",{className:"flex items-center gap-2",children:[i,d]}),e[5]=i,e[6]=d,e[7]=m):m=e[7],m}function Ms(t){const e=h.c(6),{children:s,align:a}=t,o=a===void 0?"start":a,l=w.Children.toArray(s).filter(As).length===1?"280px":"480px";let i;e[0]!==l?(i={width:l},e[0]=l,e[1]=i):i=e[1];let c;return e[2]!==o||e[3]!==s||e[4]!==i?(c=n.jsx(ke,{align:o,className:"p-0 flex items-start",style:i,children:s}),e[2]=o,e[3]=s,e[4]=i,e[5]=c):c=e[5],c}function As(t){return w.isValidElement(t)&&(t.type===Je||t.type===Ye)}function Ye(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=I("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",a),e[0]=a,e[1]=o):o=e[1];let r;return e[2]!==s||e[3]!==o?(r=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=r):r=e[4],r}const Je=Ye;function Rs(t){const e=h.c(6),{placeholder:s,value:a,onChange:o}=t,r=s===void 0?"Search...":s;let l;e[0]!==o?(l=c=>o(c.target.value),e[0]=o,e[1]=l):l=e[1];let i;return e[2]!==r||e[3]!==l||e[4]!==a?(i=n.jsx(It,{placeholder:r,value:a,onChange:l,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=r,e[3]=l,e[4]=a,e[5]=i):i=e[5],i}function Ps(t){const e=h.c(6),{children:s,emptyMessage:a}=t,o=a===void 0?"No items found.":a,r=w.Children.count(s)>0;let l;e[0]!==o||e[1]!==r?(l=!r&&n.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:o}),e[0]=o,e[1]=r,e[2]=l):l=e[2];let i;return e[3]!==s||e[4]!==l?(i=n.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[l,s]}),e[3]=s,e[4]=l,e[5]=i):i=e[5],i}function Es(t){const e=h.c(15),{item:s,onClick:a,onHover:o,children:r}=t,l=zs();let i;e[0]!==l||e[1]!==s||e[2]!==o?(i=()=>{l.setHoveredItem(s.slug),o?.(s)},e[0]=l,e[1]=s,e[2]=o,e[3]=i):i=e[3];const c=i;let d;e[4]!==s||e[5]!==a?(d=()=>a(s),e[4]=s,e[5]=a,e[6]=d):d=e[6];let m;e[7]!==r||e[8]!==s.avatarUrl||e[9]!==s.name?(m=r||n.jsxs(n.Fragment,{children:[n.jsx(K,{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]=r,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(H,{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 Ds(t){const e=h.c(2),{children:s}=t;let a;return e[0]!==s?(a=n.jsx("div",{className:"px-1 pb-1 pt-0.5",children:s}),e[0]=s,e[1]=a):a=e[1],a}function Ls(t){const e=h.c(11),{onClick:s,icon:a,children:o,variant:r}=t,i=(r===void 0?"default":r)==="muted"&&"text-muted-foreground";let c;e[0]!==i?(c=I("w-full justify-start font-normal",i),e[0]=i,e[1]=c):c=e[1];let d;e[2]!==a?(d=a&&n.jsx("span",{className:"[&>svg]:size-4",children:a}),e[2]=a,e[3]=d):d=e[3];let m;e[4]!==o?(m=n.jsx("span",{children:o}),e[4]=o,e[5]=m):m=e[5];let f;return e[6]!==s||e[7]!==c||e[8]!==d||e[9]!==m?(f=n.jsxs(H,{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 Hs(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx($s,{}),t[0]=e):e=t[0],e}function Bs(){const t=h.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 P=Object.assign(Is,{Trigger:Os,CurrentItem:Ts,Content:Ms,Panel:Je,Search:Rs,Items:Ps,Item:Es,Actions:Ds,Action:Ls,Separator:Hs,Skeleton:Bs});function oe(){const t=h.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=we(e),{data:a}=W.useListOrganizations(),o=te();let r;t[1]!==s||t[2]!==a?(r=a?.find(R=>R.slug===s),t[1]=s,t[2]=a,t[3]=r):r=t[3];const l=r,[i,c]=w.useState(""),[d,m]=w.useState(!1);let f,p,g,u,x,b,j,v;if(t[4]!==l||t[5]!==o||t[6]!==s||t[7]!==i||t[8]!==a){const E=(a?(()=>{const B=a.filter(F=>F.name.toLowerCase().includes(i.toLowerCase()));if(s){const F=B.findIndex(X=>X.slug===s);if(F>0){const X=B[F];X&&(B.splice(F,1),B.unshift(X))}}return B})():[]).map(Us);let D;t[17]!==l?(D=l?{slug:l.slug,name:l.name,avatarUrl:l.logo}:void 0,t[17]=l,t[18]=D):D=t[18];const ne=D;u=P;let V;t[19]!==o||t[20]!==s?(V=()=>o({to:"/$org",params:{org:s??""}}),t[19]=o,t[20]=s,t[21]=V):V=t[21];let G;t[22]!==ne?(G=n.jsx(P.CurrentItem,{item:ne}),t[22]=ne,t[23]=G):G=t[23],t[24]!==V||t[25]!==G?(v=n.jsx(P.Trigger,{onClick:V,children:G}),t[24]=V,t[25]=G,t[26]=v):v=t[26],g=P.Content,p=P.Panel,t[27]!==i?(j=n.jsx(P.Search,{placeholder:"Search organizations...",value:i,onChange:c}),t[27]=i,t[28]=j):j=t[28],f=P.Items,x="No organizations found.";let J;t[29]!==o?(J=B=>n.jsx(P.Item,{item:B,onClick:F=>o({to:"/$org",params:{org:F.slug}})},B.slug),t[29]=o,t[30]=J):J=t[30],b=E.map(J),t[4]=l,t[5]=o,t[6]=s,t[7]=i,t[8]=a,t[9]=f,t[10]=p,t[11]=g,t[12]=u,t[13]=x,t[14]=b,t[15]=j,t[16]=v}else f=t[9],p=t[10],g=t[11],u=t[12],x=t[13],b=t[14],j=t[15],v=t[16];let N;t[31]!==f||t[32]!==x||t[33]!==b?(N=n.jsx(f,{emptyMessage:x,children:b}),t[31]=f,t[32]=x,t[33]=b,t[34]=N):N=t[34];let k,y;t[35]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(P.Actions,{children:n.jsx(P.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),y=n.jsx(P.Separator,{}),t[35]=k,t[36]=y):(k=t[35],y=t[36]);let _;t[37]!==o?(_=()=>o({to:"/"}),t[37]=o,t[38]=_):_=t[38];let C;t[39]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(Ot,{}),t[39]=C):C=t[39];let $;t[40]!==_?($=n.jsx(P.Actions,{children:n.jsx(P.Action,{onClick:_,icon:C,children:"See all organizations"})}),t[40]=_,t[41]=$):$=t[41];let S;t[42]!==p||t[43]!==$||t[44]!==j||t[45]!==N?(S=n.jsxs(p,{children:[j,N,k,y,$]}),t[42]=p,t[43]=$,t[44]=j,t[45]=N,t[46]=S):S=t[46];let z;t[47]!==g||t[48]!==S?(z=n.jsx(g,{children:S}),t[47]=g,t[48]=S,t[49]=z):z=t[49];let O;t[50]!==u||t[51]!==z||t[52]!==v?(O=n.jsxs(u,{children:[v,z]}),t[50]=u,t[51]=z,t[52]=v,t[53]=O):O=t[53];let T;t[54]!==d?(T=n.jsx(zt,{open:d,onOpenChange:m}),t[54]=d,t[55]=T):T=t[55];let M;return t[56]!==O||t[57]!==T?(M=n.jsxs(n.Fragment,{children:[O,T]}),t[56]=O,t[57]=T,t[58]=M):M=t[58],M}function Us(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}oe.Skeleton=P.Skeleton;function Ws({prop:t,defaultProp:e,onChange:s=()=>{}}){const[a,o]=Fs({defaultProp:e,onChange:s}),r=t!==void 0,l=r?t:a,i=Ne(s),c=w.useCallback(d=>{if(r){const f=typeof d=="function"?d(t):d;f!==t&&i(f)}else o(d)},[r,t,o,i]);return[l,c]}function Fs({defaultProp:t,onChange:e}){const s=w.useState(t),[a]=s,o=w.useRef(a),r=Ne(e);return w.useEffect(()=>{o.current!==a&&(r(a),o.current=a)},[a,o,r]),s}function Vs(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(Z.Root,{"data-slot":"drawer",...s}),e[2]=s,e[3]=a):a=e[3],a}function Gs(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(Z.Trigger,{"data-slot":"drawer-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Ks(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(Z.Portal,{"data-slot":"drawer-portal",...s}),e[2]=s,e[3]=a):a=e[3],a}function Zs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("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]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx(Z.Overlay,{"data-slot":"drawer-overlay",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function qs(t){const e=h.c(12);let s,a,o;e[0]!==t?({className:a,children:s,...o}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o):(s=e[1],a=e[2],o=e[3]);let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Zs,{}),e[4]=r):r=e[4];let l;e[5]!==a?(l=I("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",a),e[5]=a,e[6]=l):l=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=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]=i):i=e[7];let c;return e[8]!==s||e[9]!==o||e[10]!==l?(c=n.jsxs(Ks,{"data-slot":"drawer-portal",children:[r,n.jsxs(Z.Content,{"data-slot":"drawer-content",className:l,...o,children:[i,s]})]}),e[8]=s,e[9]=o,e[10]=l,e[11]=c):c=e[11],c}function Ys(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("flex flex-col gap-1.5 px-4 py-2",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx("div",{"data-slot":"drawer-header",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function Js(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("text-foreground font-semibold",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx(Z.Title,{"data-slot":"drawer-title",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}const Xe=w.createContext({setOpen:()=>{}}),Xs=()=>w.useContext(Xe),Qs=t=>{const e=h.c(25);let s,a,o,r,l;e[0]!==t?({children:s,defaultOpen:a,open:r,onOpenChange:o,...l}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=r,e[5]=l):(s=e[1],a=e[2],o=e[3],r=e[4],l=e[5]);const i=a??!1;let c;e[6]!==o||e[7]!==r||e[8]!==i?(c={prop:r,defaultProp:i,onChange:o},e[6]=o,e[7]=r,e[8]=i,e[9]=c):c=e[9];const[d,m]=Ws(c);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let p;e[12]!==s||e[13]!==d||e[14]!==l||e[15]!==m?(p=n.jsx(Vs,{open:d,onOpenChange:m,...l,children:s}),e[12]=s,e[13]=d,e[14]=l,e[15]=m,e[16]=p):p=e[16];let g;e[17]!==d||e[18]!==l||e[19]!==m||e[20]!==p?(g=n.jsx(At,{open:d,onOpenChange:m,...l,children:p}),e[17]=d,e[18]=l,e[19]=m,e[20]=p,e[21]=g):g=e[21];let u;return e[22]!==f||e[23]!==g?(u=n.jsx(Xe.Provider,{value:f,children:g}),e[22]=f,e[23]=g,e[24]=u):u=e[24],u},ea=t=>{const{children:e,title:s,...a}=t,o=Y(),{className:r,...l}=a;return o?n.jsxs(qs,{...l,children:[n.jsx(Ys,{className:"hidden",children:n.jsx(Js,{children:s})}),n.jsx("div",{className:I("flex flex-col gap-2 p-2 py-4",r),children:e})]}):n.jsx(Mt,{...a,children:e})},ta=t=>{const{children:e,...s}=t,{setOpen:a}=Xs(),o=Y(),{className:r,...l}=s;return o?n.jsx("div",{...l,onClick:i=>{a(!1);const{onClick:c}=l;c?.(i)},className:I("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",r),children:e}):n.jsx(Rt,{...s,children:e})},sa=t=>{const e=h.c(7);let s,a;e[0]!==t?({children:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);const o=Y();let r;return e[3]!==s||e[4]!==o||e[5]!==a?(r=o?n.jsx(Gs,{asChild:!0,children:s}):n.jsx(Tt,{...a,children:s}),e[3]=s,e[4]=o,e[5]=a,e[6]=r):r=e[6],r},aa=t=>{const e=h.c(7);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);const o=Y();let r;return e[3]!==s||e[4]!==o||e[5]!==a?(r=o?n.jsx(xe,{className:I(s),...a}):n.jsx(xe,{className:I(s),...a}),e[3]=s,e[4]=o,e[5]=a,e[6]=r):r=e[6],r};function na(t){const e=h.c(11),{user:s,trigger:a,align:o,children:r}=t,l=o===void 0?"start":o;let i;e[0]!==a||e[1]!==s?(i=a(s),e[0]=a,e[1]=s,e[2]=i):i=e[2];let c;e[3]!==i?(c=n.jsx(sa,{asChild:!0,children:n.jsx("div",{children:i})}),e[3]=i,e[4]=c):c=e[4];let d;e[5]!==l||e[6]!==r?(d=n.jsx(ea,{side:"top",align:l,className:"md:w-[240px]",children:r}),e[5]=l,e[6]=r,e[7]=d):d=e[7];let m;return e[8]!==c||e[9]!==d?(m=n.jsxs(Qs,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}function oa(t){const e=h.c(8),{children:s,onClick:a,className:o,asChild:r}=t;let l;e[0]!==r||e[1]!==s||e[2]!==a?(l=r?s:n.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:a,children:s}),e[0]=r,e[1]=s,e[2]=a,e[3]=l):l=e[3];let i;return e[4]!==r||e[5]!==o||e[6]!==l?(i=n.jsx(ta,{asChild:r,className:o,children:l}),e[4]=r,e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function ra(t){const e=h.c(2),{className:s}=t;let a;return e[0]!==s?(a=n.jsx(aa,{className:s}),e[0]=s,e[1]=a):a=e[1],a}function la(){const t=h.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 L=Object.assign(na,{Item:oa,Separator:ra,Skeleton:la});function ia(t){const e=h.c(48),{open:s,onOpenChange:a,user:o,userImage:r}=t,[l,i]=wt(),[c,d]=w.useState(!1);let m;e[0]!==o.id?(m=()=>{navigator.clipboard.writeText(o.id),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=o.id,e[1]=m):m=e[1];const f=m;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(Pt,{className:"text-base",children:"Profile Settings"}),e[2]=p):p=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsxs(Et,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[p,n.jsxs(Dt,{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(q,{size:16}),n.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[3]=g):g=e[3];const u=o.name||"U";let x;e[4]!==u||e[5]!==r?(x=n.jsx(K,{url:r,fallback:u,shape:"circle",size:"xl",className:"h-16 w-16"}),e[4]=u,e[5]=r,e[6]=x):x=e[6];const b=o.name||"User";let j;e[7]!==b?(j=n.jsx("span",{className:"text-base font-medium text-foreground",children:b}),e[7]=b,e[8]=j):j=e[8];let v;e[9]!==o.email?(v=n.jsx("span",{className:"text-sm text-muted-foreground",children:o.email}),e[9]=o.email,e[10]=v):v=e[10];let N;e[11]!==j||e[12]!==v?(N=n.jsxs("div",{className:"flex flex-col gap-1",children:[j,v]}),e[11]=j,e[12]=v,e[13]=N):N=e[13];let k;e[14]!==x||e[15]!==N?(k=n.jsxs("div",{className:"flex items-center gap-4",children:[x,N]}),e[14]=x,e[15]=N,e[16]=k):k=e[16];let y;e[17]!==l||e[18]!==i?(y=()=>i(!l),e[17]=l,e[18]=i,e[19]=y):y=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(Bt,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(Wt,{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 C;e[21]!==l||e[22]!==i?(C=n.jsx("div",{onClick:ca,children:n.jsx(Ut,{checked:l,onCheckedChange:i})}),e[21]=l,e[22]=i,e[23]=C):C=e[23];let $;e[24]!==y||e[25]!==C?($=n.jsxs("button",{type:"button",onClick:y,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[_,C]}),e[24]=y,e[25]=C,e[26]=$):$=e[26];let S;e[27]!==k||e[28]!==$?(S=n.jsxs("div",{className:"p-5 space-y-6 min-h-[225px]",children:[k,$]}),e[27]=k,e[28]=$,e[29]=S):S=e[29];let z;e[30]!==o.id?(z=n.jsx("span",{className:"font-mono text-xs",children:o.id}),e[30]=o.id,e[31]=z):z=e[31];let O;e[32]!==c?(O=c?n.jsx(ee,{size:14,className:"text-green-600"}):n.jsx(Re,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[32]=c,e[33]=O):O=e[33];let T;e[34]!==f||e[35]!==z||e[36]!==O?(T=n.jsx(Oe,{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:[z,O]})}),e[34]=f,e[35]=z,e[36]=O,e[37]=T):T=e[37];let M;e[38]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsx(ze,{side:"top",children:n.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[38]=M):M=e[38];let R;e[39]!==T?(R=n.jsx("div",{className:"border-t border-border px-5 py-4 flex items-center shrink-0",children:n.jsx(Ie,{children:n.jsxs(Te,{children:[T,M]})})}),e[39]=T,e[40]=R):R=e[40];let E;e[41]!==S||e[42]!==R?(E=n.jsxs(Lt,{className:"sm:max-w-lg sm:max-h-[85vh] p-0 flex flex-col",closeButtonClassName:"hidden",children:[g,n.jsxs("div",{className:"flex flex-col",children:[S,R]})]}),e[41]=S,e[42]=R,e[43]=E):E=e[43];let D;return e[44]!==a||e[45]!==s||e[46]!==E?(D=n.jsx(Ht,{open:s,onOpenChange:a,children:E}),e[44]=a,e[45]=s,e[46]=E,e[47]=D):D=e[47],D}function ca(t){return t.stopPropagation()}function da(t){const e=h.c(47),{user:s,userImage:a}=t,[o,r]=w.useState(!1),[l,i]=w.useState(!1);let c;e[0]!==s.email||e[1]!==s.id||e[2]!==s.name?(c=()=>{const D=`ID: ${s.id}
|
|
1
|
+
import{r as w,e as et,a as W,j as n,f as te,t as U,c as h,R as tt,T as st,D as at,C as nt,P as ot,g as rt,O as lt,h as it,i as ct,k as ve,p as dt,l as mt,d as we,m as Ne,n as Z,G as ft,o as ut,S as Se,q as pt,s as ht,N as xt,v as gt,K as bt,w as ye}from"./index-lLPOJwFP.js";import{B as H,c as I}from"./button-C0pnkZlC.js";import{P as Ce,a as _e,b as ke}from"./popover-pNwa1deQ.js";import{B as fe}from"./badge-Ctdv4gxt.js";import{i as ee}from"./Check-C2R_Lcai.js";import{n as ue}from"./Inbox01-Dq00_28Z.js";import{s as pe}from"./XClose-DEljIF8n.js";import{E as $e}from"./error-boundary-CiihS5J_.js";import{i as jt}from"./File06-DcfM98WM.js";import{i as q}from"./X-CBga9b95.js";import{u as Y}from"./use-mobile-DQFSnNx5.js";import{T as ze,a as Ie,b as Oe,c as Te}from"./tooltip-D0yN_jPS.js";import{S as Me,i as vt,u as wt,C as A,a as Nt}from"./index-BEGxRCwV.js";import{u as re,a as St}from"./use-organization-settings-CFfwAQvt.js";import{u as se,L as he,P as yt,O as Ct}from"./project-context-provider-BMHXD39x.js";import{n as _t,I as kt}from"./empty-state-BOQ8a8rM.js";import{i as Ae}from"./use-gateway-Blme6XE1.js";import{a as $t}from"./Home02-C2IjHPBI.js";import{C as zt}from"./create-organization-dialog-FpknJphA.js";import{I as It}from"./input-BtvEWyY7.js";import{A as K}from"./avatar-BXyXgGjh.js";import{c as Ot}from"./Grid01-SL4tYH2-.js";import{D as Tt,a as Mt,b as At,c as Rt,d as xe}from"./dropdown-menu-DXIsFCVQ.js";import{a as Re}from"./Copy01-BvrgG3_u.js";import{n as ge}from"./LinkExternal01-Cek4l5LT.js";import{D as Pt,a as Et,b as Dt,c as Lt,d as Ht}from"./dialog-DGipxHKv.js";import{L as Bt}from"./form-Cq3oH5p8.js";import{S as Ut}from"./switch-Z2NGTQao.js";import{i as Wt}from"./Code01-CVOtW_Yi.js";import{u as le,L as ie}from"./localstorage-keys-CrsmSVIa.js";import{t as Ft}from"./MessageChatSquare-B8VNN8W_.js";import{R as Pe,a as Vt,b as Gt}from"./resizable-jz1SBMEc.js";import{s as Kt}from"./Plus-DjzFfDDP.js";import"./textarea-fD103gtG.js";import"./AlertCircle-rclbzics.js";import"./ArrowUp-BsQNKzS-.js";import"./ChevronDown-CGAmRXVd.js";import"./Edit01-CkDEl3XN.js";import"./connection-CMutAR-q.js";import"./use-collections-DiH8BH96.js";import"./useMutation-8xrpFP-l.js";import"./use-connection-BvgGy_ae.js";import"./use-binding-bdIG4ysm.js";import"./binder-BxrAqFdA.js";import"./use-gateway-system-prompt-DfRYNjlK.js";import"./SearchMd-Cg2el-z8.js";import"./use-create-gateway-DWTCcW8J.js";import"./select-COJ5S7Rq.js";import"./Image01-BQtv4av4.js";import"./Terminal-Kg8grfTZ.js";import"./monaco-editor-h8_XpHnI.js";import"./spinner-Deoz6N0J.js";import"./alert-dialog-BNxiLvEc.js";import"./well-known-mcp-DOEdYmKO.js";import"./generate-id-Dyweu44Y.js";import"./Trash01-BnAfsqRe.js";import"./useQuery-CLJFoOtO.js";const Ee=({size:t=24,color:e="currentColor",...s})=>w.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},w.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"}));Ee.displayName="BarChart10";const De=({size:t=24,color:e="currentColor",...s})=>w.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},w.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"}));De.displayName="Building02";const Le=({size:t=24,color:e="currentColor",...s})=>w.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},w.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"}));Le.displayName="Globe01";const He=({size:t=24,color:e="currentColor",...s})=>w.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},w.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"}));He.displayName="LayoutRight";const Be=({size:t=24,color:e="currentColor",...s})=>w.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},w.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"}));Be.displayName="LogOut01";const Ue=({size:t=24,color:e="currentColor",...s})=>w.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},w.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"}));Ue.displayName="Mail01";const ce=({size:t=24,color:e="currentColor",...s})=>w.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},w.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}),w.createElement("path",{d:"M18.727 14.727a1.5 1.5 0 0 0 .3 1.655l.055.054a1.816 1.816 0 0 1 0 2.573 1.818 1.818 0 0 1-2.573 0l-.055-.055a1.5 1.5 0 0 0-1.654-.3 1.5 1.5 0 0 0-.91 1.373v.155a1.818 1.818 0 1 1-3.636 0V20.1a1.5 1.5 0 0 0-.981-1.373 1.5 1.5 0 0 0-1.655.3l-.054.055a1.818 1.818 0 0 1-3.106-1.287 1.818 1.818 0 0 1 .533-1.286l.054-.055a1.5 1.5 0 0 0 .3-1.654 1.5 1.5 0 0 0-1.372-.91h-.155a1.818 1.818 0 1 1 0-3.636H3.9a1.5 1.5 0 0 0 1.373-.981 1.5 1.5 0 0 0-.3-1.655l-.055-.054A1.818 1.818 0 1 1 7.491 4.99l.054.054a1.5 1.5 0 0 0 1.655.3h.073a1.5 1.5 0 0 0 .909-1.372v-.155a1.818 1.818 0 0 1 3.636 0V3.9a1.499 1.499 0 0 0 .91 1.373 1.5 1.5 0 0 0 1.654-.3l.054-.055a1.817 1.817 0 0 1 2.573 0 1.819 1.819 0 0 1 0 2.573l-.055.054a1.5 1.5 0 0 0-.3 1.655v.073a1.5 1.5 0 0 0 1.373.909h.155a1.818 1.818 0 0 1 0 3.636H20.1a1.499 1.499 0 0 0-1.373.91Z"}));ce.displayName="Settings01";const We=({size:t=24,color:e="currentColor",...s})=>w.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},w.createElement("path",{d:"M22 21v-2a4.002 4.002 0 0 0-3-3.874M15.5 3.291a4.001 4.001 0 0 1 0 7.418M17 21c0-1.864 0-2.796-.305-3.53a4 4 0 0 0-2.164-2.165C13.796 15 12.864 15 11 15H8c-1.864 0-2.796 0-3.53.305a4 4 0 0 0-2.166 2.164C2 18.204 2 19.136 2 21M13.5 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));We.displayName="Users01";const Fe=({size:t=24,color:e="currentColor",...s})=>w.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},w.createElement("path",{d:"M13 2 4.093 12.688c-.348.418-.523.628-.525.804a.5.5 0 0 0 .185.397c.138.111.41.111.955.111H12l-1 8 8.907-10.688c.348-.418.523-.628.525-.804a.5.5 0 0 0-.185-.397c-.138-.111-.41-.111-.955-.111H12l1-8Z"}));Fe.displayName="Zap";function Zt({invitation:t,onStatusChange:e}){const[s,a]=w.useState(!1),[o,r]=w.useState(!1),l=te(),i=async()=>{a(!0);try{const u=await W.organization.acceptInvitation({invitationId:t.id});if(u.error)U.error(u.error.message),a(!1);else{e(t.id,"accepted");const x=await W.organization.setActive({organizationId:t.organizationId});x?.data?.slug?(U.success("Invitation accepted!"),l({to:"/$org",params:{org:x.data.slug}})):(U.success("Invitation accepted! Redirecting..."),l({to:"/"}))}}catch{U.error("Failed to accept invitation"),a(!1)}},c=async()=>{r(!0);try{const u=await W.organization.rejectInvitation({invitationId:t.id});u.error?(U.error(u.error.message),r(!1)):(U.success("Invitation rejected"),e(t.id,"rejected"),r(!1))}catch{U.error("Failed to reject invitation"),r(!1)}},d=t.organizationName||t.organizationId,m=t.inviter?.name||t.inviter?.email||t.email||"Someone",f=t.status==="pending",p=t.status==="accepted",g=t.status==="rejected";return n.jsxs("div",{className:`flex items-center gap-3 px-3 py-2 h-12 border-b border-border/50 last:border-b-0 ${f?"":"opacity-50"}`,children:[n.jsx("div",{className:"shrink-0 size-5 flex items-center justify-center",children:n.jsx(Ue,{size:16,className:"text-muted-foreground"})}),n.jsxs("p",{className:"flex-1 text-sm text-foreground min-w-0 whitespace-nowrap overflow-hidden",children:[n.jsx("span",{className:"font-semibold inline-block max-w-[120px] truncate align-bottom",children:m})," invited you to join ",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:f?n.jsxs(n.Fragment,{children:[n.jsx(H,{variant:"ghost",size:"icon",onClick:c,disabled:s||o,className:"h-8 w-8",children:n.jsx(pe,{size:14})}),n.jsx(H,{variant:"outline",size:"icon",onClick:i,disabled:s||o,className:"h-8 w-8",children:n.jsx(ee,{size:14})})]}):p?n.jsxs(fe,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(ee,{size:12}),"Accepted"]}):g?n.jsxs(fe,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(pe,{size:12}),"Declined"]}):null})]})}function qt(){const[t,e]=w.useState(!1),s=w.useContext(et),{data:a}=s.hooks.useListUserInvitations(),{data:o}=W.useListOrganizations(),[r,l]=w.useState({}),d=(a??[]).map(u=>{const x=(o??[]).find(b=>b.id===u.organizationId);return{...u,organizationSlug:x?.slug||u.organizationSlug,organizationName:x?.name||u.organizationName}}).map(u=>({...u,status:r[u.id]||u.status})),m=[...d].sort((u,x)=>{const b={pending:0,accepted:1,rejected:2};return(b[u.status]??999)-(b[x.status]??999)}),p=d.filter(u=>u.status==="pending").length>0,g=(u,x)=>{l(b=>({...b,[u]:x}))};return n.jsxs(Ce,{open:t,onOpenChange:e,children:[n.jsx(_e,{asChild:!0,children:n.jsxs(H,{variant:"ghost",size:"sm",className:"relative h-7 w-7 p-0","aria-label":"Inbox",children:[n.jsx(ue,{size:18,className:"text-muted-foreground"}),p&&n.jsx("span",{className:"absolute bottom-1 right-0.5 h-2 w-2 rounded-full bg-destructive ring-2 ring-background"})]})}),n.jsxs(ke,{align:"end",className:"w-[480px] 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:m.length>0?m.map(u=>n.jsx(Zt,{invitation:u,onStatusChange:g},u.id)):n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[n.jsx(ue,{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 Yt(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(tt,{"data-slot":"sheet",...s}),e[2]=s,e[3]=a):a=e[3],a}function Jt(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(ot,{"data-slot":"sheet-portal",...s}),e[2]=s,e[3]=a):a=e[3],a}function Xt(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("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]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx(lt,{"data-slot":"sheet-overlay",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function Qt(t){const e=h.c(17);let s,a,o,r;e[0]!==t?({className:a,children:s,side:r,...o}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=r):(s=e[1],a=e[2],o=e[3],r=e[4]);const l=r===void 0?"right":r;let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Xt,{}),e[5]=i):i=e[5];const c=l==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",d=l==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",m=l==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",f=l==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let p;e[6]!==a||e[7]!==c||e[8]!==d||e[9]!==m||e[10]!==f?(p=I("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",c,d,m,f,a),e[6]=a,e[7]=c,e[8]=d,e[9]=m,e[10]=f,e[11]=p):p=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsxs(rt,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[n.jsx(q,{className:"size-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=g):g=e[12];let u;return e[13]!==s||e[14]!==o||e[15]!==p?(u=n.jsxs(Jt,{children:[i,n.jsxs(nt,{"data-slot":"sheet-content",className:p,...o,children:[s,g]})]}),e[13]=s,e[14]=o,e[15]=p,e[16]=u):u=e[16],u}function es(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("flex flex-col gap-1.5 p-4",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx("div",{"data-slot":"sheet-header",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function ts(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("text-foreground font-semibold",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx(st,{"data-slot":"sheet-title",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function ss(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("text-muted-foreground text-sm",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx(at,{"data-slot":"sheet-description",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}const as="sidebar_state",ns=3600*24*7,os="16rem",rs="18rem",ls="3rem",is="b",Ve=w.createContext(null);function de(){const t=w.useContext(Ve);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function cs(t){const e=h.c(21),{defaultOpen:s,open:a,onOpenChange:o,children:r}=t,l=s===void 0?!0:s,i=Y(),[c,d]=w.useState(!1),[m,f]=w.useState(l),p=a??m;let g;e[0]!==p||e[1]!==o?(g=$=>{const S=typeof $=="function"?$(p):$;o?o(S):f(S),document.cookie=`${as}=${S}; path=/; max-age=${ns}`},e[0]=p,e[1]=o,e[2]=g):g=e[2];const u=g;let x;e[3]!==i||e[4]!==u?(x=()=>i?d(ms):u(ds),e[3]=i,e[4]=u,e[5]=x):x=e[5];const b=x;let j,v;e[6]!==b?(j=()=>{const $=S=>{if(S.key===is&&(S.metaKey||S.ctrlKey)){const z=S.target;if(z.tagName==="INPUT"||z.tagName==="TEXTAREA"||z.isContentEditable)return;S.preventDefault(),b()}};return globalThis.addEventListener("keydown",$),()=>globalThis.removeEventListener("keydown",$)},v=[b],e[6]=b,e[7]=j,e[8]=v):(j=e[7],v=e[8]),w.useEffect(j,v);const N=p?"expanded":"collapsed";let k;e[9]!==i||e[10]!==p||e[11]!==c||e[12]!==u||e[13]!==N||e[14]!==b?(k={state:N,open:p,setOpen:u,isMobile:i,openMobile:c,setOpenMobile:d,toggleSidebar:b},e[9]=i,e[10]=p,e[11]=c,e[12]=u,e[13]=N,e[14]=b,e[15]=k):k=e[15];const y=k;let _;e[16]!==r?(_=n.jsx(Ie,{delayDuration:0,children:r}),e[16]=r,e[17]=_):_=e[17];let C;return e[18]!==y||e[19]!==_?(C=n.jsx(Ve.Provider,{value:y,children:_}),e[18]=y,e[19]=_,e[20]=C):C=e[20],C}function ds(t){return!t}function ms(t){return!t}function fs(t){const e=h.c(14);let s,a,o,r;e[0]!==t?({className:a,style:r,children:s,...o}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=r):(s=e[1],a=e[2],o=e[3],r=e[4]);let l;e[5]!==r?(l={"--sidebar-width":os,"--sidebar-width-icon":ls,...r},e[5]=r,e[6]=l):l=e[6];const i=l;let c;e[7]!==a?(c=I("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",a),e[7]=a,e[8]=c):c=e[8];let d;return e[9]!==s||e[10]!==o||e[11]!==i||e[12]!==c?(d=n.jsx("div",{"data-slot":"sidebar-wrapper",style:i,className:c,...o,children:s}),e[9]=s,e[10]=o,e[11]=i,e[12]=c,e[13]=d):d=e[13],d}function us(t){const e=h.c(46);let s,a,o,r,l,i;e[0]!==t?({side:r,variant:l,collapsible:i,className:a,children:s,...o}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=r,e[5]=l,e[6]=i):(s=e[1],a=e[2],o=e[3],r=e[4],l=e[5],i=e[6]);const c=r===void 0?"left":r,d=l===void 0?"sidebar":l,m=i===void 0?"offcanvas":i,{isMobile:f,state:p,openMobile:g,setOpenMobile:u}=de();if(m==="none"){let S;e[7]!==a?(S=I("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",a),e[7]=a,e[8]=S):S=e[8];let z;return e[9]!==s||e[10]!==o||e[11]!==S?(z=n.jsx("div",{"data-slot":"sidebar",className:S,...o,children:s}),e[9]=s,e[10]=o,e[11]=S,e[12]=z):z=e[12],z}if(f){let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S={"--sidebar-width":rs},e[13]=S):S=e[13];let z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsxs(es,{className:"sr-only",children:[n.jsx(ts,{children:"Sidebar"}),n.jsx(ss,{children:"Displays the mobile sidebar."})]}),e[14]=z):z=e[14];let O;e[15]!==s?(O=n.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=O):O=e[16];let T;e[17]!==c||e[18]!==O?(T=n.jsxs(Qt,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:S,side:c,children:[z,O]}),e[17]=c,e[18]=O,e[19]=T):T=e[19];let M;return e[20]!==g||e[21]!==o||e[22]!==u||e[23]!==T?(M=n.jsx(Yt,{open:g,onOpenChange:u,...o,children:T}),e[20]=g,e[21]=o,e[22]=u,e[23]=T,e[24]=M):M=e[24],M}const x=p==="collapsed"?m:"",b=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 j;e[25]!==b?(j=I("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",b),e[25]=b,e[26]=j):j=e[26];let v;e[27]!==j?(v=n.jsx("div",{"data-slot":"sidebar-gap",className:j}),e[27]=j,e[28]=v):v=e[28];const N=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)]",k=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 y;e[29]!==a||e[30]!==N||e[31]!==k?(y=I("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",N,k,a),e[29]=a,e[30]=N,e[31]=k,e[32]=y):y=e[32];let _;e[33]!==s?(_=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border py-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]=_):_=e[34];let C;e[35]!==o||e[36]!==y||e[37]!==_?(C=n.jsx("div",{"data-slot":"sidebar-container",className:y,...o,children:_}),e[35]=o,e[36]=y,e[37]=_,e[38]=C):C=e[38];let $;return e[39]!==c||e[40]!==p||e[41]!==C||e[42]!==x||e[43]!==v||e[44]!==d?($=n.jsxs("div",{className:"group peer text-foreground hidden md:block border-r","data-state":p,"data-collapsible":x,"data-variant":d,"data-side":c,"data-slot":"sidebar",children:[v,C]}),e[39]=c,e[40]=p,e[41]=C,e[42]=x,e[43]=v,e[44]=d,e[45]=$):$=e[45],$}function ps(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("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]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx("main",{"data-slot":"sidebar-inset",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function hs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("h-4 m-0! w-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx("div",{"data-sidebar":"separator",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function xs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function gs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function bs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("w-full text-sm",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function js(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("flex w-full min-w-0 flex-col gap-1",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function ae(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("group/menu-item relative",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}const vs=it("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 Ge(t){const e=h.c(28);let s,a,o,r,l,i,c;e[0]!==t?({asChild:o,isActive:r,variant:l,size:i,tooltip:c,className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=r,e[5]=l,e[6]=i,e[7]=c):(s=e[1],a=e[2],o=e[3],r=e[4],l=e[5],i=e[6],c=e[7]);const d=o===void 0?!1:o,m=r===void 0?!1:r,f=l===void 0?"default":l,p=i===void 0?"default":i,g=d?ct:"button",{isMobile:u,state:x}=de();let b;e[8]!==s||e[9]!==p||e[10]!==f?(b=I(vs({variant:f,size:p}),s),e[8]=s,e[9]=p,e[10]=f,e[11]=b):b=e[11];let j;e[12]!==g||e[13]!==m||e[14]!==a||e[15]!==p||e[16]!==b?(j=n.jsx(g,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":p,"data-active":m,className:b,...a}),e[12]=g,e[13]=m,e[14]=a,e[15]=p,e[16]=b,e[17]=j):j=e[17];const v=j;if(!c)return v;if(typeof c=="string"){let C;e[18]!==c?(C={children:c},e[18]=c,e[19]=C):C=e[19],c=C}let N;e[20]!==v?(N=n.jsx(Oe,{asChild:!0,children:v}),e[20]=v,e[21]=N):N=e[21];const k=x!=="collapsed"||u;let y;e[22]!==k||e[23]!==c?(y=n.jsx(ze,{side:"right",align:"center",hidden:k,...c}),e[22]=k,e[23]=c,e[24]=y):y=e[24];let _;return e[25]!==N||e[26]!==y?(_=n.jsxs(Te,{children:[N,y]}),e[25]=N,e[26]=y,e[27]=_):_=e[27],_}function ws(t){const e=h.c(26),{item:s}=t,a=te(),{org:o}=se(),r=re(o.id),l=St(o.id);let i;e[0]!==l.update||e[1]!==s.url||e[2]!==r?.sidebar_items?(i=async()=>{const k=(r?.sidebar_items||[]).filter(y=>y.url!==s.url);await l.update.mutateAsync({sidebar_items:k})},e[0]=l.update,e[1]=s.url,e[2]=r?.sidebar_items,e[3]=i):i=e[3];const c=i;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 p;e[7]!==s.url||e[8]!==a?(p=()=>{a({to:s.url})},e[7]=s.url,e[8]=a,e[9]=p):p=e[9];const g=s.title;let u;e[10]!==f||e[11]!==s.icon||e[12]!==s.title?(u=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(jt,{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]=u):u=e[13];let x;e[14]!==s.title?(x=s.title.toLocaleLowerCase(),e[14]=s.title,e[15]=x):x=e[15];let b;e[16]!==x?(b=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:x})}),e[16]=x,e[17]=b):b=e[17];let j;e[18]!==c?(j=n.jsx(q,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:N=>{N.preventDefault(),N.stopPropagation(),c()}}),e[18]=c,e[19]=j):j=e[19];let v;return e[20]!==s.title||e[21]!==p||e[22]!==u||e[23]!==b||e[24]!==j?(v=n.jsx(ae,{children:n.jsxs(Ge,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:p,tooltip:g,children:[u,b,j]})}),e[20]=s.title,e[21]=p,e[22]=u,e[23]=b,e[24]=j,e[25]=v):v=e[25],v}function Ns(){const t=h.c(4),{org:e}=se(),a=re(e.id)?.sidebar_items;if(!a?.length)return null;let o;t[0]!==a?(o=a.map(Ss),t[0]=a,t[1]=o):o=t[1];let r;return t[2]!==o?(r=n.jsx(Ke,{children:o}),t[2]=o,t[3]=r):r=t[3],r}function Ss(t){return n.jsx(ws,{item:t},t.url)}function be(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(ae,{children:n.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:n.jsx(Me,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function Ke(t){const e=h.c(4),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(hs,{className:"my-2 -ml-1"}),e[0]=a):a=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(ae,{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]=o):o=e[1];let r;return e[2]!==s?(r=n.jsxs(n.Fragment,{children:[a,o,s]}),e[2]=s,e[3]=r):r=e[3],r}function ys(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(w.Suspense,{fallback:n.jsxs(Ke,{children:[n.jsx(be,{}),n.jsx(be,{})]}),children:n.jsx(Ns,{})}),t[0]=e):e=t[0],e}function Cs(){const t=h.c(14),{locator:e,org:s}=se(),a=te(),o=ve(),{org:r}=he.parse(e);let l;t[0]!==e?(l=he.isOrgAdminProject(e),t[0]=e,t[1]=l):l=t[1];const i=l,c=re(s.id);let d;t[2]!==c?.enabled_plugins?(d=c?.enabled_plugins??[],t[2]=c?.enabled_plugins,t[3]=d):d=t[3];const m=d;let f;t[4]!==m?(f=C=>m.includes(C.pluginId),t[4]=m,t[5]=f):f=t[5];const p=dt.filter(f),g=o.location.pathname===`/${r}`||o.location.pathname===`/${r}/`;let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx($t,{}),t[6]=u):u=t[6];let x;t[7]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(De,{}),t[7]=x):x=t[7];let b;t[8]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(_t,{}),t[8]=b):b=t[8];let j;t[9]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(Ae,{}),t[9]=j):j=t[9];let v;t[10]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Fe,{}),t[10]=v):v=t[10];let N;t[11]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(Ee,{}),t[11]=N):N=t[11];let k;t[12]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(We,{}),t[12]=k):k=t[12];let y;t[13]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(ce,{}),t[13]=y):y=t[13];const _=[{key:"home",label:"Home",icon:u,onClick:()=>{g?window.dispatchEvent(new CustomEvent("reset-home-view")):a({to:"/$org",params:{org:r}})}},{key:"store",label:"Store",icon:x,onClick:()=>a({to:"/$org/store",params:{org:r}})},...p.map(C=>({key:C.pluginId,label:C.label,icon:C.icon,onClick:()=>a({to:"/$org/$pluginId",params:{org:r,pluginId:C.pluginId}})})),{key:"mcps",label:"Connections",icon:b,onClick:()=>a({to:"/$org/mcps",params:{org:r}})},{key:"gateways",label:"Agents",icon:j,onClick:()=>a({to:"/$org/gateways",params:{org:r}})},{key:"workflow",label:"Workflows",icon:v,onClick:()=>a({to:"/$org/workflows",params:{org:r}})},{key:"monitoring",label:"Monitoring",icon:N,onClick:()=>a({to:"/$org/monitoring",params:{org:r}})},{key:"members",label:"Members",icon:k,onClick:()=>a({to:"/$org/members",params:{org:r}})},{key:"settings",label:"Settings",icon:y,onClick:()=>a({to:"/$org/settings",params:{org:r}})}];return i?_:[]}function Ze(t){const e=h.c(10),{navigationItems:s,footer:a,additionalContent:o,variant:r,collapsible:l}=t,i=r===void 0?"sidebar":r,c=l===void 0?"icon":l;let d;e[0]!==s?(d=s.map(_s),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==o||e[3]!==d?(m=n.jsx(xs,{className:"flex-1 overflow-x-hidden",children:n.jsx(gs,{className:"font-medium",children:n.jsx(bs,{children:n.jsxs(js,{className:"gap-0.5",children:[d,o]})})})}),e[2]=o,e[3]=d,e[4]=m):m=e[4];let f;return e[5]!==c||e[6]!==a||e[7]!==m||e[8]!==i?(f=n.jsxs(us,{variant:i,collapsible:c,children:[m,a]}),e[5]=c,e[6]=a,e[7]=m,e[8]=i,e[9]=f):f=e[9],f}function _s(t){return n.jsx(ae,{children:n.jsxs(Ge,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:t.onClick,isActive:t.isActive,tooltip:t.label,children:[n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:t.icon}),n.jsx("span",{className:"truncate",children:t.label})]})},t.key)}Ze.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(Me,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};function ks(){const t=h.c(3),e=Cs();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(n.Fragment,{children:n.jsx($e,{children:n.jsx(w.Suspense,{fallback:null,children:n.jsx(ys,{})})})}),t[0]=s):s=t[0];let a;return t[1]!==e?(a=n.jsx(Ze,{navigationItems:e,additionalContent:s}),t[1]=e,t[2]=a):a=t[2],a}function $s(t){const e=h.c(12);let s,a,o,r;e[0]!==t?({className:s,orientation:o,decorative:r,...a}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=r):(s=e[1],a=e[2],o=e[3],r=e[4]);const l=o===void 0?"horizontal":o,i=r===void 0?!0:r;let c;e[5]!==s?(c=I("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]!==i||e[8]!==l||e[9]!==a||e[10]!==c?(d=n.jsx(mt,{"data-slot":"separator-root",decorative:i,orientation:l,className:c,...a}),e[7]=i,e[8]=l,e[9]=a,e[10]=c,e[11]=d):d=e[11],d}const qe=w.createContext(null);function zs(){const t=w.useContext(qe);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function Is(t){const e=h.c(10),{children:s,onItemHover:a}=t,[o,r]=w.useState(null);let l;e[0]!==a?(l=f=>{r(f),a?.(f)},e[0]=a,e[1]=l):l=e[1];const i=l;let c;e[2]!==o||e[3]!==i?(c={hoveredItem:o,setHoveredItem:i},e[2]=o,e[3]=i,e[4]=c):c=e[4];let d;e[5]!==s?(d=n.jsx(Ce,{children:s}),e[5]=s,e[6]=d):d=e[6];let m;return e[7]!==c||e[8]!==d?(m=n.jsx(qe.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=m):m=e[9],m}function Os(t){const e=h.c(6),{children:s,onClick:a}=t;let o;e[0]!==s||e[1]!==a?(o=n.jsx(H,{variant:"link",className:"p-0.5 h-auto",onClick:a,type:"button",children:s}),e[0]=s,e[1]=a,e[2]=o):o=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(_e,{asChild:!0,children:n.jsx(H,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:n.jsx(vt,{size:16,className:"opacity-50"})})}),e[3]=r):r=e[3];let l;return e[4]!==o?(l=n.jsxs("div",{className:"flex items-center gap-1",children:[o,r]}),e[4]=o,e[5]=l):l=e[5],l}function Ts(t){const e=h.c(8),{item:s,fallback:a}=t,o=a===void 0?"":a,r=s?.avatarUrl??"",l=s?.name??o;let i;e[0]!==r||e[1]!==l?(i=n.jsx(K,{url:r,fallback:l,size:"xs",objectFit:"contain"}),e[0]=r,e[1]=l,e[2]=i):i=e[2];const c=s?.name??o;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]!==i||e[6]!==d?(m=n.jsxs("div",{className:"flex items-center gap-2",children:[i,d]}),e[5]=i,e[6]=d,e[7]=m):m=e[7],m}function Ms(t){const e=h.c(6),{children:s,align:a}=t,o=a===void 0?"start":a,l=w.Children.toArray(s).filter(As).length===1?"280px":"480px";let i;e[0]!==l?(i={width:l},e[0]=l,e[1]=i):i=e[1];let c;return e[2]!==o||e[3]!==s||e[4]!==i?(c=n.jsx(ke,{align:o,className:"p-0 flex items-start",style:i,children:s}),e[2]=o,e[3]=s,e[4]=i,e[5]=c):c=e[5],c}function As(t){return w.isValidElement(t)&&(t.type===Je||t.type===Ye)}function Ye(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=I("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",a),e[0]=a,e[1]=o):o=e[1];let r;return e[2]!==s||e[3]!==o?(r=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=r):r=e[4],r}const Je=Ye;function Rs(t){const e=h.c(6),{placeholder:s,value:a,onChange:o}=t,r=s===void 0?"Search...":s;let l;e[0]!==o?(l=c=>o(c.target.value),e[0]=o,e[1]=l):l=e[1];let i;return e[2]!==r||e[3]!==l||e[4]!==a?(i=n.jsx(It,{placeholder:r,value:a,onChange:l,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=r,e[3]=l,e[4]=a,e[5]=i):i=e[5],i}function Ps(t){const e=h.c(6),{children:s,emptyMessage:a}=t,o=a===void 0?"No items found.":a,r=w.Children.count(s)>0;let l;e[0]!==o||e[1]!==r?(l=!r&&n.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:o}),e[0]=o,e[1]=r,e[2]=l):l=e[2];let i;return e[3]!==s||e[4]!==l?(i=n.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[l,s]}),e[3]=s,e[4]=l,e[5]=i):i=e[5],i}function Es(t){const e=h.c(15),{item:s,onClick:a,onHover:o,children:r}=t,l=zs();let i;e[0]!==l||e[1]!==s||e[2]!==o?(i=()=>{l.setHoveredItem(s.slug),o?.(s)},e[0]=l,e[1]=s,e[2]=o,e[3]=i):i=e[3];const c=i;let d;e[4]!==s||e[5]!==a?(d=()=>a(s),e[4]=s,e[5]=a,e[6]=d):d=e[6];let m;e[7]!==r||e[8]!==s.avatarUrl||e[9]!==s.name?(m=r||n.jsxs(n.Fragment,{children:[n.jsx(K,{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]=r,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(H,{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 Ds(t){const e=h.c(2),{children:s}=t;let a;return e[0]!==s?(a=n.jsx("div",{className:"px-1 pb-1 pt-0.5",children:s}),e[0]=s,e[1]=a):a=e[1],a}function Ls(t){const e=h.c(11),{onClick:s,icon:a,children:o,variant:r}=t,i=(r===void 0?"default":r)==="muted"&&"text-muted-foreground";let c;e[0]!==i?(c=I("w-full justify-start font-normal",i),e[0]=i,e[1]=c):c=e[1];let d;e[2]!==a?(d=a&&n.jsx("span",{className:"[&>svg]:size-4",children:a}),e[2]=a,e[3]=d):d=e[3];let m;e[4]!==o?(m=n.jsx("span",{children:o}),e[4]=o,e[5]=m):m=e[5];let f;return e[6]!==s||e[7]!==c||e[8]!==d||e[9]!==m?(f=n.jsxs(H,{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 Hs(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx($s,{}),t[0]=e):e=t[0],e}function Bs(){const t=h.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 P=Object.assign(Is,{Trigger:Os,CurrentItem:Ts,Content:Ms,Panel:Je,Search:Rs,Items:Ps,Item:Es,Actions:Ds,Action:Ls,Separator:Hs,Skeleton:Bs});function oe(){const t=h.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=we(e),{data:a}=W.useListOrganizations(),o=te();let r;t[1]!==s||t[2]!==a?(r=a?.find(R=>R.slug===s),t[1]=s,t[2]=a,t[3]=r):r=t[3];const l=r,[i,c]=w.useState(""),[d,m]=w.useState(!1);let f,p,g,u,x,b,j,v;if(t[4]!==l||t[5]!==o||t[6]!==s||t[7]!==i||t[8]!==a){const E=(a?(()=>{const B=a.filter(F=>F.name.toLowerCase().includes(i.toLowerCase()));if(s){const F=B.findIndex(X=>X.slug===s);if(F>0){const X=B[F];X&&(B.splice(F,1),B.unshift(X))}}return B})():[]).map(Us);let D;t[17]!==l?(D=l?{slug:l.slug,name:l.name,avatarUrl:l.logo}:void 0,t[17]=l,t[18]=D):D=t[18];const ne=D;u=P;let V;t[19]!==o||t[20]!==s?(V=()=>o({to:"/$org",params:{org:s??""}}),t[19]=o,t[20]=s,t[21]=V):V=t[21];let G;t[22]!==ne?(G=n.jsx(P.CurrentItem,{item:ne}),t[22]=ne,t[23]=G):G=t[23],t[24]!==V||t[25]!==G?(v=n.jsx(P.Trigger,{onClick:V,children:G}),t[24]=V,t[25]=G,t[26]=v):v=t[26],g=P.Content,p=P.Panel,t[27]!==i?(j=n.jsx(P.Search,{placeholder:"Search organizations...",value:i,onChange:c}),t[27]=i,t[28]=j):j=t[28],f=P.Items,x="No organizations found.";let J;t[29]!==o?(J=B=>n.jsx(P.Item,{item:B,onClick:F=>o({to:"/$org",params:{org:F.slug}})},B.slug),t[29]=o,t[30]=J):J=t[30],b=E.map(J),t[4]=l,t[5]=o,t[6]=s,t[7]=i,t[8]=a,t[9]=f,t[10]=p,t[11]=g,t[12]=u,t[13]=x,t[14]=b,t[15]=j,t[16]=v}else f=t[9],p=t[10],g=t[11],u=t[12],x=t[13],b=t[14],j=t[15],v=t[16];let N;t[31]!==f||t[32]!==x||t[33]!==b?(N=n.jsx(f,{emptyMessage:x,children:b}),t[31]=f,t[32]=x,t[33]=b,t[34]=N):N=t[34];let k,y;t[35]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(P.Actions,{children:n.jsx(P.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),y=n.jsx(P.Separator,{}),t[35]=k,t[36]=y):(k=t[35],y=t[36]);let _;t[37]!==o?(_=()=>o({to:"/"}),t[37]=o,t[38]=_):_=t[38];let C;t[39]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(Ot,{}),t[39]=C):C=t[39];let $;t[40]!==_?($=n.jsx(P.Actions,{children:n.jsx(P.Action,{onClick:_,icon:C,children:"See all organizations"})}),t[40]=_,t[41]=$):$=t[41];let S;t[42]!==p||t[43]!==$||t[44]!==j||t[45]!==N?(S=n.jsxs(p,{children:[j,N,k,y,$]}),t[42]=p,t[43]=$,t[44]=j,t[45]=N,t[46]=S):S=t[46];let z;t[47]!==g||t[48]!==S?(z=n.jsx(g,{children:S}),t[47]=g,t[48]=S,t[49]=z):z=t[49];let O;t[50]!==u||t[51]!==z||t[52]!==v?(O=n.jsxs(u,{children:[v,z]}),t[50]=u,t[51]=z,t[52]=v,t[53]=O):O=t[53];let T;t[54]!==d?(T=n.jsx(zt,{open:d,onOpenChange:m}),t[54]=d,t[55]=T):T=t[55];let M;return t[56]!==O||t[57]!==T?(M=n.jsxs(n.Fragment,{children:[O,T]}),t[56]=O,t[57]=T,t[58]=M):M=t[58],M}function Us(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}oe.Skeleton=P.Skeleton;function Ws({prop:t,defaultProp:e,onChange:s=()=>{}}){const[a,o]=Fs({defaultProp:e,onChange:s}),r=t!==void 0,l=r?t:a,i=Ne(s),c=w.useCallback(d=>{if(r){const f=typeof d=="function"?d(t):d;f!==t&&i(f)}else o(d)},[r,t,o,i]);return[l,c]}function Fs({defaultProp:t,onChange:e}){const s=w.useState(t),[a]=s,o=w.useRef(a),r=Ne(e);return w.useEffect(()=>{o.current!==a&&(r(a),o.current=a)},[a,o,r]),s}function Vs(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(Z.Root,{"data-slot":"drawer",...s}),e[2]=s,e[3]=a):a=e[3],a}function Gs(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(Z.Trigger,{"data-slot":"drawer-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Ks(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(Z.Portal,{"data-slot":"drawer-portal",...s}),e[2]=s,e[3]=a):a=e[3],a}function Zs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("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]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx(Z.Overlay,{"data-slot":"drawer-overlay",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function qs(t){const e=h.c(12);let s,a,o;e[0]!==t?({className:a,children:s,...o}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o):(s=e[1],a=e[2],o=e[3]);let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Zs,{}),e[4]=r):r=e[4];let l;e[5]!==a?(l=I("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",a),e[5]=a,e[6]=l):l=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=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]=i):i=e[7];let c;return e[8]!==s||e[9]!==o||e[10]!==l?(c=n.jsxs(Ks,{"data-slot":"drawer-portal",children:[r,n.jsxs(Z.Content,{"data-slot":"drawer-content",className:l,...o,children:[i,s]})]}),e[8]=s,e[9]=o,e[10]=l,e[11]=c):c=e[11],c}function Ys(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("flex flex-col gap-1.5 px-4 py-2",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx("div",{"data-slot":"drawer-header",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function Js(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=I("text-foreground font-semibold",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsx(Z.Title,{"data-slot":"drawer-title",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}const Xe=w.createContext({setOpen:()=>{}}),Xs=()=>w.useContext(Xe),Qs=t=>{const e=h.c(25);let s,a,o,r,l;e[0]!==t?({children:s,defaultOpen:a,open:r,onOpenChange:o,...l}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=r,e[5]=l):(s=e[1],a=e[2],o=e[3],r=e[4],l=e[5]);const i=a??!1;let c;e[6]!==o||e[7]!==r||e[8]!==i?(c={prop:r,defaultProp:i,onChange:o},e[6]=o,e[7]=r,e[8]=i,e[9]=c):c=e[9];const[d,m]=Ws(c);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let p;e[12]!==s||e[13]!==d||e[14]!==l||e[15]!==m?(p=n.jsx(Vs,{open:d,onOpenChange:m,...l,children:s}),e[12]=s,e[13]=d,e[14]=l,e[15]=m,e[16]=p):p=e[16];let g;e[17]!==d||e[18]!==l||e[19]!==m||e[20]!==p?(g=n.jsx(At,{open:d,onOpenChange:m,...l,children:p}),e[17]=d,e[18]=l,e[19]=m,e[20]=p,e[21]=g):g=e[21];let u;return e[22]!==f||e[23]!==g?(u=n.jsx(Xe.Provider,{value:f,children:g}),e[22]=f,e[23]=g,e[24]=u):u=e[24],u},ea=t=>{const{children:e,title:s,...a}=t,o=Y(),{className:r,...l}=a;return o?n.jsxs(qs,{...l,children:[n.jsx(Ys,{className:"hidden",children:n.jsx(Js,{children:s})}),n.jsx("div",{className:I("flex flex-col gap-2 p-2 py-4",r),children:e})]}):n.jsx(Mt,{...a,children:e})},ta=t=>{const{children:e,...s}=t,{setOpen:a}=Xs(),o=Y(),{className:r,...l}=s;return o?n.jsx("div",{...l,onClick:i=>{a(!1);const{onClick:c}=l;c?.(i)},className:I("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",r),children:e}):n.jsx(Rt,{...s,children:e})},sa=t=>{const e=h.c(7);let s,a;e[0]!==t?({children:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);const o=Y();let r;return e[3]!==s||e[4]!==o||e[5]!==a?(r=o?n.jsx(Gs,{asChild:!0,children:s}):n.jsx(Tt,{...a,children:s}),e[3]=s,e[4]=o,e[5]=a,e[6]=r):r=e[6],r},aa=t=>{const e=h.c(7);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);const o=Y();let r;return e[3]!==s||e[4]!==o||e[5]!==a?(r=o?n.jsx(xe,{className:I(s),...a}):n.jsx(xe,{className:I(s),...a}),e[3]=s,e[4]=o,e[5]=a,e[6]=r):r=e[6],r};function na(t){const e=h.c(11),{user:s,trigger:a,align:o,children:r}=t,l=o===void 0?"start":o;let i;e[0]!==a||e[1]!==s?(i=a(s),e[0]=a,e[1]=s,e[2]=i):i=e[2];let c;e[3]!==i?(c=n.jsx(sa,{asChild:!0,children:n.jsx("div",{children:i})}),e[3]=i,e[4]=c):c=e[4];let d;e[5]!==l||e[6]!==r?(d=n.jsx(ea,{side:"top",align:l,className:"md:w-[240px]",children:r}),e[5]=l,e[6]=r,e[7]=d):d=e[7];let m;return e[8]!==c||e[9]!==d?(m=n.jsxs(Qs,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}function oa(t){const e=h.c(8),{children:s,onClick:a,className:o,asChild:r}=t;let l;e[0]!==r||e[1]!==s||e[2]!==a?(l=r?s:n.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:a,children:s}),e[0]=r,e[1]=s,e[2]=a,e[3]=l):l=e[3];let i;return e[4]!==r||e[5]!==o||e[6]!==l?(i=n.jsx(ta,{asChild:r,className:o,children:l}),e[4]=r,e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function ra(t){const e=h.c(2),{className:s}=t;let a;return e[0]!==s?(a=n.jsx(aa,{className:s}),e[0]=s,e[1]=a):a=e[1],a}function la(){const t=h.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 L=Object.assign(na,{Item:oa,Separator:ra,Skeleton:la});function ia(t){const e=h.c(48),{open:s,onOpenChange:a,user:o,userImage:r}=t,[l,i]=wt(),[c,d]=w.useState(!1);let m;e[0]!==o.id?(m=()=>{navigator.clipboard.writeText(o.id),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=o.id,e[1]=m):m=e[1];const f=m;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(Pt,{className:"text-base",children:"Profile Settings"}),e[2]=p):p=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsxs(Et,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[p,n.jsxs(Dt,{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(q,{size:16}),n.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[3]=g):g=e[3];const u=o.name||"U";let x;e[4]!==u||e[5]!==r?(x=n.jsx(K,{url:r,fallback:u,shape:"circle",size:"xl",className:"h-16 w-16"}),e[4]=u,e[5]=r,e[6]=x):x=e[6];const b=o.name||"User";let j;e[7]!==b?(j=n.jsx("span",{className:"text-base font-medium text-foreground",children:b}),e[7]=b,e[8]=j):j=e[8];let v;e[9]!==o.email?(v=n.jsx("span",{className:"text-sm text-muted-foreground",children:o.email}),e[9]=o.email,e[10]=v):v=e[10];let N;e[11]!==j||e[12]!==v?(N=n.jsxs("div",{className:"flex flex-col gap-1",children:[j,v]}),e[11]=j,e[12]=v,e[13]=N):N=e[13];let k;e[14]!==x||e[15]!==N?(k=n.jsxs("div",{className:"flex items-center gap-4",children:[x,N]}),e[14]=x,e[15]=N,e[16]=k):k=e[16];let y;e[17]!==l||e[18]!==i?(y=()=>i(!l),e[17]=l,e[18]=i,e[19]=y):y=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(Bt,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(Wt,{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 C;e[21]!==l||e[22]!==i?(C=n.jsx("div",{onClick:ca,children:n.jsx(Ut,{checked:l,onCheckedChange:i})}),e[21]=l,e[22]=i,e[23]=C):C=e[23];let $;e[24]!==y||e[25]!==C?($=n.jsxs("button",{type:"button",onClick:y,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[_,C]}),e[24]=y,e[25]=C,e[26]=$):$=e[26];let S;e[27]!==k||e[28]!==$?(S=n.jsxs("div",{className:"p-5 space-y-6 min-h-[225px]",children:[k,$]}),e[27]=k,e[28]=$,e[29]=S):S=e[29];let z;e[30]!==o.id?(z=n.jsx("span",{className:"font-mono text-xs",children:o.id}),e[30]=o.id,e[31]=z):z=e[31];let O;e[32]!==c?(O=c?n.jsx(ee,{size:14,className:"text-green-600"}):n.jsx(Re,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[32]=c,e[33]=O):O=e[33];let T;e[34]!==f||e[35]!==z||e[36]!==O?(T=n.jsx(Oe,{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:[z,O]})}),e[34]=f,e[35]=z,e[36]=O,e[37]=T):T=e[37];let M;e[38]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsx(ze,{side:"top",children:n.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[38]=M):M=e[38];let R;e[39]!==T?(R=n.jsx("div",{className:"border-t border-border px-5 py-4 flex items-center shrink-0",children:n.jsx(Ie,{children:n.jsxs(Te,{children:[T,M]})})}),e[39]=T,e[40]=R):R=e[40];let E;e[41]!==S||e[42]!==R?(E=n.jsxs(Lt,{className:"sm:max-w-lg sm:max-h-[85vh] p-0 flex flex-col",closeButtonClassName:"hidden",children:[g,n.jsxs("div",{className:"flex flex-col",children:[S,R]})]}),e[41]=S,e[42]=R,e[43]=E):E=e[43];let D;return e[44]!==a||e[45]!==s||e[46]!==E?(D=n.jsx(Ht,{open:s,onOpenChange:a,children:E}),e[44]=a,e[45]=s,e[46]=E,e[47]=D):D=e[47],D}function ca(t){return t.stopPropagation()}function da(t){const e=h.c(47),{user:s,userImage:a}=t,[o,r]=w.useState(!1),[l,i]=w.useState(!1);let c;e[0]!==s.email||e[1]!==s.id||e[2]!==s.name?(c=()=>{const D=`ID: ${s.id}
|
|
2
2
|
Name: ${s.name||"N/A"}
|
|
3
3
|
Email: ${s.email}`;navigator.clipboard.writeText(D),i(!0),U.success("User info copied to clipboard"),setTimeout(()=>i(!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]!==a?(m=()=>n.jsx(K,{url:a,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]=a,e[7]=m):m=e[7];const f=s.name||s.email||"U";let p;e[8]!==f||e[9]!==a?(p=n.jsx(K,{url:a,fallback:f,shape:"circle",size:"sm"}),e[8]=f,e[9]=a,e[10]=p):p=e[10];const g=s.name||"User";let u;e[11]!==g?(u=n.jsx("div",{className:"text-sm font-medium truncate",children:g}),e[11]=g,e[12]=u):u=e[12];let x;e[13]!==s.email?(x=n.jsx("div",{className:"text-xs text-muted-foreground truncate",children:s.email}),e[13]=s.email,e[14]=x):x=e[14];let b;e[15]!==u||e[16]!==x?(b=n.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[u,x]}),e[15]=u,e[16]=x,e[17]=b):b=e[17];let j;e[18]!==l?(j=n.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:l?n.jsx(ee,{size:16,className:"text-green-600"}):n.jsx(Re,{size:16,className:"text-muted-foreground"})}),e[18]=l,e[19]=j):j=e[19];let v;e[20]!==p||e[21]!==b||e[22]!==j?(v=n.jsxs("div",{className:"group flex items-center gap-3 w-full py-1",children:[p,b,j]}),e[20]=p,e[21]=b,e[22]=j,e[23]=v):v=e[23];let N;e[24]!==d||e[25]!==v?(N=n.jsx(L.Item,{onClick:d,children:v}),e[24]=d,e[25]=v,e[26]=N):N=e[26];let k;e[27]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(L.Separator,{}),e[27]=k):k=e[27];let y,_;e[28]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsxs(L.Item,{onClick:()=>r(!0),children:[n.jsx(ce,{className:"text-muted-foreground",size:18}),"Profile Settings"]}),_=n.jsx(L.Separator,{}),e[28]=y,e[29]=_):(y=e[28],_=e[29]);let C;e[30]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(ft,{className:"w-4 h-4 text-muted-foreground"}),e[30]=C):C=e[30];let $;e[31]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(L.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:[C,"decocms/admin",n.jsx(ge,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[31]=$):$=e[31];let S;e[32]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Le,{className:"text-muted-foreground",size:18}),e[32]=S):S=e[32];let z,O;e[33]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsx(L.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:[S,"Homepage",n.jsx(ge,{size:18,className:"ml-auto text-muted-foreground"})]})}),O=n.jsx(L.Separator,{}),e[33]=z,e[34]=O):(z=e[33],O=e[34]);let T;e[35]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsxs(L.Item,{onClick:ma,children:[n.jsx(Be,{size:18,className:"text-muted-foreground"}),"Log out"]}),e[35]=T):T=e[35];let M;e[36]!==N||e[37]!==m||e[38]!==s?(M=n.jsxs(L,{user:s,trigger:m,align:"end",children:[N,k,y,_,$,z,O,T]}),e[36]=N,e[37]=m,e[38]=s,e[39]=M):M=e[39];let R;e[40]!==o||e[41]!==s||e[42]!==a?(R=o&&n.jsx(ia,{open:o,onOpenChange:r,user:s,userImage:a}),e[40]=o,e[41]=s,e[42]=a,e[43]=R):R=e[43];let E;return e[44]!==M||e[45]!==R?(E=n.jsxs(n.Fragment,{children:[M,R]}),e[44]=M,e[45]=R,e[46]=E):E=e[46],E}function ma(){return W.signOut()}function fa(){const t=h.c(7),{data:e}=W.useSession();if(!e?.user){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(K,{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,a=s.name??void 0;let o;t[1]!==a||t[2]!==s?(o={...s,name:a},t[1]=a,t[2]=s,t[3]=o):o=t[3];const r=o,l=s.image;let i;return t[4]!==l||t[5]!==r?(i=n.jsx(da,{user:r,userImage:l}),t[4]=l,t[5]=r,t[6]=i):i=t[6],i}function me(){const t=h.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=ie.decoChatOpen(),t[0]=e):e=t[0];const[s,a]=le(e,ua);let o;return t[1]!==s||t[2]!==a?(o=[s,a],t[1]=s,t[2]=a,t[3]=o):o=t[3],o}function ua(t){return!!(t??!1)}function pa(t){const e=h.c(6),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(ut,{children:n.jsx(Se,{})}),e[0]=a):a=e[0];let o;e[1]!==s?(o=n.jsx(pt,{children:s}),e[1]=s,e[2]=o):o=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ht,{children:n.jsx(xt,{to:"/login",replace:!0})}),e[3]=r):r=e[3];let l;return e[4]!==o?(l=n.jsxs(n.Fragment,{children:[a,o,r]}),e[4]=o,e[5]=l):l=e[5],l}function ha(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=I("fixed top-0 left-0 right-0 z-20 bg-sidebar flex items-center w-full h-12 border-b border-border",a),e[0]=a,e[1]=o):o=e[1];let r;return e[2]!==s||e[3]!==o?(r=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=r):r=e[4],r}function xa(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=I("flex items-center justify-center px-2.5 h-full border-r border-border",a),e[0]=a,e[1]=o):o=e[1];let r;return e[2]!==s||e[3]!==o?(r=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=r):r=e[4],r}function ga(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=I("flex items-center gap-2 px-2 h-full",a),e[0]=a,e[1]=o):o=e[1];let r;return e[2]!==s||e[3]!==o?(r=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=r):r=e[4],r}function ba(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=I("flex items-center gap-2 px-2 h-full flex-1",a),e[0]=a,e[1]=o):o=e[1];let r;return e[2]!==s||e[3]!==o?(r=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=r):r=e[4],r}function ja(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=I("flex items-center gap-2 px-2 h-full ml-auto",a),e[0]=a,e[1]=o):o=e[1];let r;return e[2]!==s||e[3]!==o?(r=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=r):r=e[4],r}function va(){const t=h.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 a;return t[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsxs("div",{className:"fixed top-0 left-0 right-0 z-20 bg-sidebar 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]=a):a=t[2],a}const Q=Object.assign(ha,{Sidebar:xa,Left:ga,Center:ba,Right:ja,Skeleton:va});function Qe(){const t=h.c(3),{toggleSidebar:e}=de();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(He,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:18}),t[0]=s):s=t[0];let a;return t[1]!==e?(a=n.jsx(n.Fragment,{children:n.jsx(H,{onClick:e,size:"icon",variant:"ghost",className:"w-7 h-7 rounded-md",children:s})}),t[1]=e,t[2]=a):a=t[2],a}Qe.Skeleton=function(){return n.jsx("div",{className:"w-7 h-7 bg-muted rounded-md animate-pulse"})};const wa="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function Na(t){const e=h.c(12),{text:s,className:a,speed:o}=t,r=a===void 0?"":a,l=o===void 0?30:o,i=s.length/l*1e3,c=s.length,d=`${s.length}ch`,m=`${i}ms`;let f;e[0]!==d||e[1]!==c||e[2]!==m?(f={"--typewriter-duration":m,"--typewriter-steps":c,"--typewriter-max-width":d},e[0]=d,e[1]=c,e[2]=m,e[3]=f):f=e[3];const p=f;let g;e[4]!==s?(g=n.jsx("span",{className:"typewriter-text",children:s}),e[4]=s,e[5]=g):g=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("style",{children:`
|
|
4
4
|
.typewriter-text {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as C,h as d,j as a}from"./index-
|
|
1
|
+
import{c as C,h as d,j as a}from"./index-lLPOJwFP.js";import{c as m}from"./button-C0pnkZlC.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 p(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{p as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,a5 as T,j as i,a6 as C,a3 as y,aa as I,a8 as M,aF as H,aE as z,c as A}from"./index-
|
|
1
|
+
import{r as c,a5 as T,j as i,a6 as C,a3 as y,aa as I,a8 as M,aF as H,aE as z,c as A}from"./index-lLPOJwFP.js";import{c as g}from"./button-C0pnkZlC.js";var b="Switch",[U]=T(b),[q,F]=U(b),E=c.forwardRef((s,e)=>{const{__scopeSwitch:t,name:r,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=s,[p,h]=c.useState(null),v=y(e,m=>h(m)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=I({prop:a,defaultProp:n??!1,onChange:k,caller:b});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:M(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=F(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 L="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:s,control:e,checked:t,bubbles:r=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=H(t),k=z(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=L;function j(s){return s?"checked":"unchecked"}var O=E,$=R;function X(s){const e=A.c(9);let t,r;e[0]!==s?({className:t,...r}=s,e[0]=s,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let a;e[3]!==t?(a=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx($,{"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(O,{"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 +1 @@
|
|
|
1
|
-
import{c as o,j as n}from"./index-
|
|
1
|
+
import{c as o,j as n}from"./index-lLPOJwFP.js";import{c as l}from"./button-C0pnkZlC.js";function u(s){const e=o.c(8);let r,i;e[0]!==s?({className:r,...i}=s,e[0]=s,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let t;e[3]!==r?(t=l("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-xl border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),e[3]=r,e[4]=t):t=e[4];let a;return e[5]!==i||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...i}),e[5]=i,e[6]=t,e[7]=a):a=e[7],a}export{u as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as v,c as z,j as t}from"./index-
|
|
1
|
+
import{r as v,c as z,j as t}from"./index-lLPOJwFP.js";import{I as F}from"./empty-state-BOQ8a8rM.js";import{C as I}from"./checkbox-DSzJrlMA.js";import{c as T,B as R}from"./button-C0pnkZlC.js";import{i as A}from"./ArrowLeft-ClViT7Hc.js";import{u as U}from"./use-connection-BvgGy_ae.js";import{C as V}from"./collection-search-DFSn4A42.js";const q=v.memo(function(S){const e=z.c(21),{connection:o,isSelected:m,hasToolsEnabled:r,activeToolsCount:h,totalToolsCount:p,onSelect:g,onToggle:x}=S,u=m?"bg-accent/50":"hover:bg-muted/50";let i;e[0]!==u?(i=T("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",u),e[0]=u,e[1]=i):i=e[1];let c;e[2]!==o.icon||e[3]!==o.title?(c=t.jsx(F,{icon:o.icon,name:o.title,size:"xs"}),e[2]=o.icon,e[3]=o.title,e[4]=c):c=e[4];let f;e[5]!==o.title?(f=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:o.title})}),e[5]=o.title,e[6]=f):f=e[6];let n;e[7]!==g||e[8]!==c||e[9]!==f?(n=t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:g,children:[c,f]}),e[7]=g,e[8]=c,e[9]=f,e[10]=n):n=e[10];let a;e[11]!==h||e[12]!==o.tools||e[13]!==r||e[14]!==x||e[15]!==p?(a=o.tools&&o.tools.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[h,"/",p]}),t.jsx(I,{checked:r,onCheckedChange:x,onClick:H})]}),e[11]=h,e[12]=o.tools,e[13]=r,e[14]=x,e[15]=p,e[16]=a):a=e[16];let N;return e[17]!==i||e[18]!==n||e[19]!==a?(N=t.jsxs("div",{className:i,children:[n,a]}),e[17]=i,e[18]=n,e[19]=a,e[20]=N):N=e[20],N}),G=v.memo(function(S){const e=z.c(18),{connectionId:o,tool:m,isSelected:r,onToggle:h}=S,p=`tool-${o}-${m.name}`,g=r?"text-foreground":"text-muted-foreground";let x;e[0]!==g?(x=T("text-sm font-medium",g),e[0]=g,e[1]=x):x=e[1];let u;e[2]!==x||e[3]!==m.name?(u=t.jsx("div",{className:"flex items-center gap-2 mb-1",children:t.jsx("span",{className:x,children:m.name})}),e[2]=x,e[3]=m.name,e[4]=u):u=e[4];let i;e[5]!==m.description?(i=m.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:m.description}),e[5]=m.description,e[6]=i):i=e[6];let c;e[7]!==u||e[8]!==i?(c=t.jsxs("div",{className:"flex-1 min-w-0",children:[u,i]}),e[7]=u,e[8]=i,e[9]=c):c=e[9];const f=`tool-${o}-${m.name}`;let n;e[10]!==r||e[11]!==h||e[12]!==f?(n=t.jsx("div",{className:"flex items-center shrink-0",children:t.jsx(I,{id:f,checked:r,onCheckedChange:h,onClick:J})}),e[10]=r,e[11]=h,e[12]=f,e[13]=n):n=e[13];let a;return e[14]!==p||e[15]!==c||e[16]!==n?(a=t.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:p,children:[c,n]}),e[14]=p,e[15]=c,e[16]=n,e[17]=a):a=e[17],a});function ee({toolSet:d,onToolSetChange:S}){const[e,o]=v.useState(""),m=v.useDeferredValue(e),[r,h]=v.useState("all"),[p,g]=v.useState(!1),x=v.useRef(new Set(Object.keys(d))),u=U({searchTerm:m.trim()||void 0}),i=x.current,c=[...i.values()].map(s=>u.find(l=>l.id===s)).filter(s=>s!==void 0),f=u.filter(s=>!i.has(s.id)),n=[...c,...f],a=s=>{const l=d[s];return l!==void 0&&l.length>0},N=n.filter(s=>{if(r==="all")return!0;const l=a(s.id);return r==="selected"?l:r==="unselected"?!l:!0}),[M,$]=v.useState(n[0]?.id??null),b=M?n.find(s=>s.id===M)??null:null,E=b?.tools??[],B=(s,l)=>d[s]?.includes(l)??!1,D=(s,l)=>{const j=d[s]??[],k=j.includes(l),w={...d};if(k){const y=j.filter(C=>C!==l);y.length===0?delete w[s]:w[s]=y}else w[s]=[...j,l];S(w)},O=s=>{const l=n.find(C=>C.id===s);if(!l?.tools)return;const j=d[s]??[],k=l.tools.map(C=>C.name),w=j.length>0&&k.every(C=>j.includes(C)),y={...d};w?delete y[s]:(y[s]=k,$(s)),S(y)},P=s=>{$(s),g(!0)},Q=()=>{g(!1)};return t.jsxs("div",{className:"flex h-full",children:[t.jsxs("div",{className:T("w-full md:w-80 border-r border-border flex flex-col",p&&"hidden md:flex"),children:[t.jsx(V,{value:e,onChange:o,placeholder:"Search MCP Servers..."}),t.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[t.jsx("button",{onClick:()=>h("all"),className:T("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),t.jsx("button",{onClick:()=>h("selected"),className:T("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),t.jsx("button",{onClick:()=>h("unselected"),className:T("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),t.jsx("div",{className:"flex-1 overflow-auto",children:N.length===0?t.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:e?"No connections found":r==="selected"?"No servers selected":r==="unselected"?"No unselected servers":"No connections available"}):t.jsx("div",{className:"p-2 space-y-1",children:N.map(s=>{const l=s.tools?.length??0,j=d[s.id]?.length??0;return t.jsx(q,{connection:s,isSelected:M===s.id,hasToolsEnabled:a(s.id),activeToolsCount:j,totalToolsCount:l,onSelect:()=>P(s.id),onToggle:()=>O(s.id)},s.id)})})})]}),t.jsx("div",{className:T("flex-1 flex-col",p?"flex":"hidden md:flex"),children:b?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[t.jsx(R,{variant:"ghost",size:"sm",onClick:Q,className:"h-8 w-8 p-0 shrink-0",children:t.jsx(A,{size:20})}),t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx(F,{icon:b.icon,name:b.title,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:b.title}),b.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:b.description})]})]})]}),t.jsx("div",{className:"flex-1 overflow-auto p-4",children:E.length===0?t.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:"This connection has no tools available"}):t.jsx("div",{className:"space-y-2",children:E.map(s=>t.jsx(G,{connectionId:b.id,tool:s,isSelected:B(b.id,s.name),onToggle:()=>D(b.id,s.name)},s.name))})})]}):t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"Select a connection to view its tools"})})})]})}function H(d){return d.stopPropagation()}function J(d){return d.stopPropagation()}export{ee as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{K as B,j as t,c as O,f as Q,r as k}from"./index-
|
|
1
|
+
import{K as B,j as t,c as O,f as Q,r as k}from"./index-lLPOJwFP.js";import{u as U}from"./useQuery-CLJFoOtO.js";import{i as W}from"./File06-DcfM98WM.js";import{i as Y}from"./Loading01-CpEccvEO.js";import{e as J}from"./github-icon-Dp3wHhYE.js";import{C as P}from"./collection-display-button-DDxBelrQ.js";import{C as X}from"./collection-search-DFSn4A42.js";import{C as Z}from"./collection-table-wrapper-CB1f1HNV.js";import{E as z,I as ee}from"./empty-state-BOQ8a8rM.js";import{C as te}from"./card-DUUk5B6T.js";import{V as se}from"./layout-D_5LiG9u.js";function oe(s){return s.replace(/<a[^>]*class="[^"]*anchor[^"]*"[^>]*>.*?<\/a>/gi,"")}function re(s){return s.replace(/<a\s+([^>]*href="[^"]*"[^>]*)>/gi,(e,i)=>i.includes("target=")?e.replace(/target="[^"]*"/gi,'target="_blank"'):`<a ${i} target="_blank" rel="noopener noreferrer">`)}function ne(s){let e=oe(s);return e=re(e),e}function we({repository:s}){const e=s?J(s):null,{data:i,isLoading:c}=U({queryKey:B.githubReadme(e?.owner,e?.repo),queryFn:async()=>{if(!e)return null;try{const l=await fetch(`https://api.github.com/repos/${e.owner}/${e.repo}/readme`,{headers:{Accept:"application/vnd.github.v3.html"}});if(!l.ok){if(l.status===404)return null;throw new Error(`Failed to fetch README: ${l.statusText}`)}const m=await l.text();return ne(m)}catch(l){return console.error("Error fetching README:",l),null}},enabled:!!e&&!!s,staleTime:3600*1e3,gcTime:1440*60*1e3});return c?t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx(Y,{size:32,className:"animate-spin text-muted-foreground"})}):i?t.jsx("div",{className:"p-5 markdown-body",style:{backgroundColor:"transparent"},dangerouslySetInnerHTML:{__html:i}}):t.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center p-6",children:[t.jsx(W,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"README not found"}),t.jsx("p",{className:"text-muted-foreground max-w-md",children:"This repository doesn't have a README file, or it's not publicly accessible."})]})}function ve(s){const e=O.c(39),{tools:i,connectionId:c,org:l,onToolClick:m,showToolbar:L,emptyMessage:M}=s,D=L===void 0?!0:L,j=M===void 0?"This connection doesn't have any tools yet.":M,I=Q(),[n,$]=k.useState(""),[d,H]=k.useState("table"),[r,A]=k.useState("name"),[a,_]=k.useState("asc");let y;e[0]!==a||e[1]!==r?(y=o=>{r===o?(_(me),a==="desc"&&A(void 0)):(A(o),_("asc"))},e[0]=a,e[1]=r,e[2]=y):y=e[2];const u=y;let N;e[3]!==c||e[4]!==I||e[5]!==m||e[6]!==l?(N=o=>{m?m(o):c&&l&&I({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:l,connectionId:c,collectionName:"tools",itemId:encodeURIComponent(o.name)}})},e[3]=c,e[4]=I,e[5]=m,e[6]=l,e[7]=N):N=e[7];const w=N;let v;if(e[8]!==n||e[9]!==a||e[10]!==r||e[11]!==i){const o=!i||i.length===0?[]:n.trim()?(()=>{const R=n.toLowerCase();return i.filter(b=>b.name.toLowerCase().includes(R)||b.description&&b.description.toLowerCase().includes(R))})():i;v=!r||!a?o:[...o].sort((R,b)=>{const q=R[r]||"",G=b[r]||"",K=String(q).localeCompare(String(G));return a==="asc"?K:-K}),e[8]=n,e[9]=a,e[10]=r,e[11]=i,e[12]=v}else v=e[12];const g=v;let C;e[13]===Symbol.for("react.memo_cache_sentinel")?(C=[{id:"name",header:"Name",render:ce,sortable:!0},{id:"description",header:"Description",render:le,cellClassName:"flex-1",sortable:!0}],e[13]=C):C=e[13];const V=C;let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=V.filter(ie).map(ae),e[14]=S):S=e[14];const F=S;let f;e[15]!==u||e[16]!==D||e[17]!==a||e[18]!==r||e[19]!==d?(f=D&&t.jsx(se,{children:t.jsx(P,{viewMode:d,onViewModeChange:H,sortKey:r,sortDirection:a,onSort:u,sortOptions:F})}),e[15]=u,e[16]=D,e[17]=a,e[18]=r,e[19]=d,e[20]=f):f=e[20];let E;e[21]===Symbol.for("react.memo_cache_sentinel")?(E=o=>{o.key==="Escape"&&($(""),o.target.blur())},e[21]=E):E=e[21];let p;e[22]!==n?(p=t.jsx(X,{value:n,onChange:$,placeholder:"Search tools...",onKeyDown:E}),e[22]=n,e[23]=p):p=e[23];let h;e[24]!==j||e[25]!==u||e[26]!==w||e[27]!==n||e[28]!==a||e[29]!==r||e[30]!==g||e[31]!==d?(h=d==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:g.length===0?t.jsx(z,{image:null,title:n?"No tools found":"No tools available",description:n?"Try adjusting your search terms":j}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:g.map(o=>t.jsx(te,{className:"cursor-pointer transition-colors",onClick:()=>w(o),children:t.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[t.jsx(ee,{icon:null,name:o.name,size:"md",className:"shrink-0 shadow-sm"}),t.jsxs("div",{className:"flex flex-col gap-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:o.name}),t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:o.description||"No description"})]})]})},o.name))})}):t.jsx(Z,{columns:V,data:g,isLoading:!1,sortKey:r,sortDirection:a,onSort:u,onRowClick:o=>w(o),emptyState:t.jsx(z,{image:null,title:n?"No tools found":"No tools available",description:n?"Try adjusting your search terms":j})}),e[24]=j,e[25]=u,e[26]=w,e[27]=n,e[28]=a,e[29]=r,e[30]=g,e[31]=d,e[32]=h):h=e[32];let x;e[33]!==p||e[34]!==h?(x=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[p,h]}),e[33]=p,e[34]=h,e[35]=x):x=e[35];let T;return e[36]!==x||e[37]!==f?(T=t.jsxs(t.Fragment,{children:[f,x]}),e[36]=x,e[37]=f,e[38]=T):T=e[38],T}function ae(s){return{id:s.id,label:typeof s.header=="string"?s.header:s.id}}function ie(s){return s.sortable}function le(s){return t.jsx("span",{className:"text-sm text-foreground",children:s.description||"—"})}function ce(s){return t.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:s.name})}function me(s){return s==="asc"?"desc":s==="desc"?null:"asc"}export{we as R,ve as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,j as c,a6 as S,a5 as J,a7 as H,al as Q,aj as $,an as Z,ao as ee,bu as te,a3 as G,as as oe,aa as re,am as ne,ak as se,a8 as C,ap as ae,c as j}from"./index-
|
|
1
|
+
import{r as a,j as c,a6 as S,a5 as J,a7 as H,al as Q,aj as $,an as Z,ao as ee,bu as te,a3 as G,as as oe,aa as re,am as ne,ak as se,a8 as C,ap as ae,c as j}from"./index-lLPOJwFP.js";import{c as ie}from"./button-C0pnkZlC.js";var le=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ce="VisuallyHidden",V=a.forwardRef((o,e)=>c.jsx(S.span,{...o,ref:e,style:{...le,...o.style}}));V.displayName=ce;var ue=V,[O]=J("Tooltip",[$]),D=$(),z="TooltipProvider",de=700,L="tooltip.open",[pe,k]=O(z),F=o=>{const{__scopeTooltip:e,delayDuration:t=de,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=a.useRef(!0),d=a.useRef(!1),i=a.useRef(0);return a.useEffect(()=>{const p=i.current;return()=>window.clearTimeout(p)},[]),c.jsx(pe,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(i.current),l.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};F.displayName=z;var R="Tooltip",[fe,_]=O(R),Y=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:d}=o,i=k(R,o.__scopeTooltip),p=D(e),[u,v]=a.useState(null),x=oe(),f=a.useRef(0),h=l??i.disableHoverableContent,m=d??i.delayDuration,g=a.useRef(!1),[y,T]=re({prop:r,defaultProp:n??!1,onChange:M=>{M?(i.onOpen(),document.dispatchEvent(new CustomEvent(L))):i.onClose(),s?.(M)},caller:R}),w=a.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,T(!0)},[T]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,T(!1)},[T]),I=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,T(!0),f.current=0},m)},[m,T]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(ne,{...p,children:c.jsx(fe,{scope:e,contentId:x,open:y,stateAttribute:w,trigger:u,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{i.isOpenDelayedRef.current?I():E()},[i.isOpenDelayedRef,I,E]),onTriggerLeave:a.useCallback(()=>{h?P():(window.clearTimeout(f.current),f.current=0)},[P,h]),onOpen:E,onClose:P,disableHoverableContent:h,children:t})})};Y.displayName=R;var A="TooltipTrigger",B=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(A,t),s=k(A,t),l=D(t),d=a.useRef(null),i=G(e,d,n.onTriggerChange),p=a.useRef(!1),u=a.useRef(!1),v=a.useCallback(()=>p.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),c.jsx(se,{asChild:!0,...l,children:c.jsx(S.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:C(o.onPointerMove,x=>{x.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});B.displayName=A;var N="TooltipPortal",[ve,xe]=O(N,{forceMount:void 0}),U=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(N,e);return c.jsx(ve,{scope:e,forceMount:t,children:c.jsx(H,{present:t||s.open,children:c.jsx(Q,{asChild:!0,container:n,children:r})})})};U.displayName=N;var b="TooltipContent",q=a.forwardRef((o,e)=>{const t=xe(b,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(b,o.__scopeTooltip);return c.jsx(H,{present:r||l.open,children:l.disableHoverableContent?c.jsx(W,{side:n,...s,ref:e}):c.jsx(he,{side:n,...s,ref:e})})}),he=a.forwardRef((o,e)=>{const t=_(b,o.__scopeTooltip),r=k(b,o.__scopeTooltip),n=a.useRef(null),s=G(e,n),[l,d]=a.useState(null),{trigger:i,onClose:p}=t,u=n.current,{onPointerInTransitChange:v}=r,x=a.useCallback(()=>{d(null),v(!1)},[v]),f=a.useCallback((h,m)=>{const g=h.currentTarget,y={x:h.clientX,y:h.clientY},T=ye(y,g.getBoundingClientRect()),w=Ce(y,T),E=be(m.getBoundingClientRect()),P=Ee([...w,...E]);d(P),v(!0)},[v]);return a.useEffect(()=>()=>x(),[x]),a.useEffect(()=>{if(i&&u){const h=g=>f(g,u),m=g=>f(g,i);return i.addEventListener("pointerleave",h),u.addEventListener("pointerleave",m),()=>{i.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",m)}}},[i,u,f,x]),a.useEffect(()=>{if(l){const h=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},T=i?.contains(g)||u?.contains(g),w=!we(y,l);T?x():w&&(x(),p())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[i,u,l,p,x]),c.jsx(W,{...o,ref:s})}),[ge,me]=O(R,{isInside:!1}),Te=te("TooltipContent"),W=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...d}=o,i=_(b,t),p=D(t),{onClose:u}=i;return a.useEffect(()=>(document.addEventListener(L,u),()=>document.removeEventListener(L,u)),[u]),a.useEffect(()=>{if(i.trigger){const v=x=>{x.target?.contains(i.trigger)&&u()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[i.trigger,u]),c.jsx(Z,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:u,children:c.jsxs(ee,{"data-state":i.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(Te,{children:r}),c.jsx(ge,{scope:t,isInside:!0,children:c.jsx(ue,{id:i.contentId,role:"tooltip",children:n||r})})]})})});q.displayName=b;var X="TooltipArrow",K=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=D(t);return me(X,t).isInside?null:c.jsx(ae,{...n,...r,ref:e})});K.displayName=X;function ye(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ce(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function be(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function we(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const d=e[s],i=e[l],p=d.x,u=d.y,v=i.x,x=i.y;u>r!=x>r&&t<(v-p)*(r-u)/(x-u)+p&&(n=!n)}return n}function Ee(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Pe(e)}function Pe(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Re=F,_e=Y,je=B,Oe=U,De=q,Le=K;function Ae(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(Re,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Ie(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Ae,{children:c.jsx(_e,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Me(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(je,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function Se(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let d;e[5]!==r?(d=ie("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(Le,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=i):i=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==d?(p=c.jsx(Oe,{children:c.jsxs(De,{"data-slot":"tooltip-content",sideOffset:l,className:d,...n,children:[t,i]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=d,e[12]=p):p=e[12],p}export{Se as T,le as V,Ae as a,Me as b,Ie as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as v}from"./binder-CZMsXyzM.js";import{bn as T,bm as O,y as t,z as e,J as p,I as c,bo as l,bp as R,_ as x,bq as U,aP as i,aK as u,L as g,aQ as n,aN as L,aG as b,aO as B,br as C}from"./index-H8waGLZX.js";const W=O.extend({avatar:e().describe("URL or data URI to the assistant's avatar image"),system_prompt:e().describe("System prompt that defines the assistant's behavior"),gateway_id:e().describe("Gateway ID to use for this assistant"),model:t({id:e().describe("Model ID"),connectionId:e().describe("Connection ID that provides the model")}).describe("Selected model reference for this assistant")}),F=T("assistant",W),G=[...F],w=L(()=>u([B(),e(),i(),g(),p(e(),w),c(w)])),f=p(e(),p(e(),w)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),E=t({type:n("text"),text:e().describe("The text content"),providerOptions:f}),q=t({type:n("text"),text:e().describe("The text content"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),j=e().describe("File data as URL string"),k=t({type:n("file"),filename:e().optional().describe("Optional filename of the file"),data:j,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:f}),J=t({type:n("file"),mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),data:e().describe("Generated file data as base64 encoded string")}),$=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerOptions:f}),K=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),z=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call, used to match with tool result"),toolName:e().describe("Name of the tool being called"),input:e().describe("Arguments of the tool call (JSON-serializable object matching tool input schema)"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerOptions:f}),H=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call"),toolName:e().describe("Name of the tool being called"),input:e().describe("Stringified JSON object with the tool call arguments"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),V=u([t({type:n("text"),value:e()}),t({type:n("json"),value:w}),t({type:n("error-text"),value:e()}),t({type:n("error-json"),value:w}),t({type:n("content"),value:c(u([t({type:n("text"),text:e().describe("Text content")}),t({type:n("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))})]),A=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output:V.describe("Result of the tool call"),result:b().describe("Unknown result of the tool call"),providerOptions:f}),X=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),result:l().describe("Result of the tool call (JSON-serializable)"),isError:g().optional().describe("Whether the result is an error or error message"),providerExecuted:g().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),Q=u([t({type:n("source"),sourceType:n("url"),id:e().describe("The ID of the source"),url:e().describe("The URL of the source"),title:e().optional().describe("The title of the source"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),t({type:n("source"),sourceType:n("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:l().optional().describe("Additional provider-specific metadata")})]),Y=t({role:n("system"),content:e().describe("System message content"),providerOptions:f}),Z=t({role:n("user"),content:c(u([E,k])).describe("User message content parts (text or file)"),providerOptions:f}),ee=t({role:n("assistant"),content:c(u([E,k,$,z,A])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:f}),te=t({role:n("tool"),content:c(A).describe("Tool message content (tool results)"),providerOptions:f}),oe=u([Y,Z,ee,te]),ae=c(oe).describe("A list of messages forming the prompt"),ie=t({prompt:ae.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:i().optional().describe("Maximum number of tokens to generate"),temperature:i().optional().describe("Temperature setting. The range depends on the provider and model"),topP:i().optional().describe("Nucleus sampling parameter"),topK:i().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:i().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:i().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:i().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:c(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:u([t({type:n("text")}),t({type:n("json"),schema:l().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:c(l()).optional().describe("The tools that are available for the model"),toolChoice:l().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:g().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:l().optional().describe("Abort signal for cancelling the operation"),providerOptions:l().optional().describe("Additional provider-specific options")}),ne=t({content:c(u([q,J,K,H,X,Q])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:x(["stop","length","content-filter","tool-calls","error","other","unknown"]).describe("Reason why generation stopped"),usage:R({inputTokens:i().optional(),outputTokens:i().optional(),totalTokens:i().optional(),reasoningTokens:i().optional()}).describe("Usage information for the language model call"),providerMetadata:l().optional().describe("Additional provider-specific metadata"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({id:e().optional().describe("ID for the generated response"),timestamp:U().optional().describe("Timestamp for the start of the generated response"),modelId:e().optional().describe("The ID of the response model that was used"),headers:p(e(),e()).optional().describe("Response headers"),body:l().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:c(l()).describe("Warnings for the call, e.g. unsupported settings")});t({stream:l().describe("ReadableStream of LanguageModelV2StreamPart"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({headers:p(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const se=t({supportedUrls:p(e(),c(e())).describe("Supported URL patterns by media type for the provider")});t({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const N=t({modelId:e().describe("The ID of the model"),callOptions:ie}),re=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),le=T("llm",re,{readOnly:!0}),ce=[{name:"LLM_METADATA",inputSchema:t({modelId:e().describe("The ID of the model")}),outputSchema:se},{name:"LLM_DO_STREAM",inputSchema:N,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:N,outputSchema:ne},...le],de=t({scopes:c(e()).describe("List of scopes available"),stateSchema:p(e(),b()).describe("JSON Schema (draft-07) defining the state structure")}),pe=[{name:"MCP_CONFIGURATION",inputSchema:t({}),outputSchema:de}],ue=t({toolName:e().describe("Name of the tool to invoke on that connection"),transformCode:e().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(input): Output { ... }`\n The input will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output. \n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),me=t({code:e().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(input): Output { ... }\`
|
|
1
|
+
import{c as v}from"./binder-BxrAqFdA.js";import{bn as T,bm as O,y as t,z as e,J as p,I as c,bo as l,bp as R,_ as x,bq as U,aP as i,aK as u,L as g,aQ as n,aN as L,aG as b,aO as B,br as C}from"./index-lLPOJwFP.js";const W=O.extend({avatar:e().describe("URL or data URI to the assistant's avatar image"),system_prompt:e().describe("System prompt that defines the assistant's behavior"),gateway_id:e().describe("Gateway ID to use for this assistant"),model:t({id:e().describe("Model ID"),connectionId:e().describe("Connection ID that provides the model")}).describe("Selected model reference for this assistant")}),F=T("assistant",W),G=[...F],w=L(()=>u([B(),e(),i(),g(),p(e(),w),c(w)])),f=p(e(),p(e(),w)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),E=t({type:n("text"),text:e().describe("The text content"),providerOptions:f}),q=t({type:n("text"),text:e().describe("The text content"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),j=e().describe("File data as URL string"),k=t({type:n("file"),filename:e().optional().describe("Optional filename of the file"),data:j,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:f}),J=t({type:n("file"),mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),data:e().describe("Generated file data as base64 encoded string")}),$=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerOptions:f}),K=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),z=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call, used to match with tool result"),toolName:e().describe("Name of the tool being called"),input:e().describe("Arguments of the tool call (JSON-serializable object matching tool input schema)"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerOptions:f}),H=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call"),toolName:e().describe("Name of the tool being called"),input:e().describe("Stringified JSON object with the tool call arguments"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),V=u([t({type:n("text"),value:e()}),t({type:n("json"),value:w}),t({type:n("error-text"),value:e()}),t({type:n("error-json"),value:w}),t({type:n("content"),value:c(u([t({type:n("text"),text:e().describe("Text content")}),t({type:n("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))})]),A=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output:V.describe("Result of the tool call"),result:b().describe("Unknown result of the tool call"),providerOptions:f}),X=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),result:l().describe("Result of the tool call (JSON-serializable)"),isError:g().optional().describe("Whether the result is an error or error message"),providerExecuted:g().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),Q=u([t({type:n("source"),sourceType:n("url"),id:e().describe("The ID of the source"),url:e().describe("The URL of the source"),title:e().optional().describe("The title of the source"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),t({type:n("source"),sourceType:n("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:l().optional().describe("Additional provider-specific metadata")})]),Y=t({role:n("system"),content:e().describe("System message content"),providerOptions:f}),Z=t({role:n("user"),content:c(u([E,k])).describe("User message content parts (text or file)"),providerOptions:f}),ee=t({role:n("assistant"),content:c(u([E,k,$,z,A])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:f}),te=t({role:n("tool"),content:c(A).describe("Tool message content (tool results)"),providerOptions:f}),oe=u([Y,Z,ee,te]),ae=c(oe).describe("A list of messages forming the prompt"),ie=t({prompt:ae.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:i().optional().describe("Maximum number of tokens to generate"),temperature:i().optional().describe("Temperature setting. The range depends on the provider and model"),topP:i().optional().describe("Nucleus sampling parameter"),topK:i().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:i().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:i().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:i().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:c(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:u([t({type:n("text")}),t({type:n("json"),schema:l().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:c(l()).optional().describe("The tools that are available for the model"),toolChoice:l().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:g().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:l().optional().describe("Abort signal for cancelling the operation"),providerOptions:l().optional().describe("Additional provider-specific options")}),ne=t({content:c(u([q,J,K,H,X,Q])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:x(["stop","length","content-filter","tool-calls","error","other","unknown"]).describe("Reason why generation stopped"),usage:R({inputTokens:i().optional(),outputTokens:i().optional(),totalTokens:i().optional(),reasoningTokens:i().optional()}).describe("Usage information for the language model call"),providerMetadata:l().optional().describe("Additional provider-specific metadata"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({id:e().optional().describe("ID for the generated response"),timestamp:U().optional().describe("Timestamp for the start of the generated response"),modelId:e().optional().describe("The ID of the response model that was used"),headers:p(e(),e()).optional().describe("Response headers"),body:l().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:c(l()).describe("Warnings for the call, e.g. unsupported settings")});t({stream:l().describe("ReadableStream of LanguageModelV2StreamPart"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({headers:p(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const se=t({supportedUrls:p(e(),c(e())).describe("Supported URL patterns by media type for the provider")});t({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const N=t({modelId:e().describe("The ID of the model"),callOptions:ie}),re=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),le=T("llm",re,{readOnly:!0}),ce=[{name:"LLM_METADATA",inputSchema:t({modelId:e().describe("The ID of the model")}),outputSchema:se},{name:"LLM_DO_STREAM",inputSchema:N,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:N,outputSchema:ne},...le],de=t({scopes:c(e()).describe("List of scopes available"),stateSchema:p(e(),b()).describe("JSON Schema (draft-07) defining the state structure")}),pe=[{name:"MCP_CONFIGURATION",inputSchema:t({}),outputSchema:de}],ue=t({toolName:e().describe("Name of the tool to invoke on that connection"),transformCode:e().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(input): Output { ... }`\n The input will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output. \n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),me=t({code:e().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(input): Output { ... }\`
|
|
2
2
|
The input is the resolved value of the references in the input field. Example:
|
|
3
3
|
{
|
|
4
4
|
"input": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as x,K as F,v as U,x as b,t as v}from"./index-
|
|
1
|
+
import{c as x,K as F,v as U,x as b,t as v}from"./index-lLPOJwFP.js";import{u as w}from"./useMutation-8xrpFP-l.js";import{u as I}from"./project-context-provider-BMHXD39x.js";function A(n,s,i){const t=[];if(n?.trim()){const e=n.trim(),r=i.map(o=>({field:[String(o)],operator:"contains",value:e}));r.length===1&&r[0]?t.push(r[0]):r.length>1&&t.push({operator:"or",conditions:r})}if(s&&s.length>0)for(const e of s)t.push({field:[e.column],operator:"eq",value:e.value});if(t.length!==0)return t.length===1?t[0]:{operator:"and",conditions:t}}function D(n,s,i){const t=n??i,e=s??"asc";return[{field:[String(t)],direction:e}]}function J(n,s,i,t){const e=x.c(14),{org:r}=I();let o;e[0]!==s?(o=s.toUpperCase(),e[0]=s,e[1]=o):o=e[1];const E=`COLLECTION_${o}_GET`;let a;e[2]!==s||e[3]!==i||e[4]!==r.slug||e[5]!==n?(a=F.collectionItem(r.slug,n,s,i??""),e[2]=s,e[3]=i,e[4]=r.slug,e[5]=n,e[6]=a):a=e[6];let c;e[7]!==E||e[8]!==i||e[9]!==t?(c=async()=>i?await t(E,{id:i}):{item:null},e[7]=E,e[8]=i,e[9]=t,e[10]=c):c=e[10];let u;e[11]!==a||e[12]!==c?(u={queryKey:a,queryFn:c,staleTime:6e4},e[11]=a,e[12]=c,e[13]=u):u=e[13];const{data:l}=U(u);return l.item}function K(n,s,i,t){const e=x.c(11),r=t===void 0?{}:t,{org:o}=I(),{searchTerm:L,filters:E,sortKey:a,sortDirection:c,searchFields:u,defaultSortKey:l,pageSize:_}=r,O=u===void 0?["title","description"]:u,S=l===void 0?"updated_at":l,p=_===void 0?100:_;let y;e[0]!==s?(y=s.toUpperCase(),e[0]=s,e[1]=y):y=e[1];const g=`COLLECTION_${y}_LIST`,f=A(L,E,O),m=D(a,c,S),$=JSON.stringify({where:f,orderBy:m,limit:p}),T=F.collectionList(o.slug,n,s,$);let d;e[2]!==g||e[3]!==m||e[4]!==p||e[5]!==i||e[6]!==f?(d=async()=>{const Q={...f&&{where:f},...m&&{orderBy:m},limit:p,offset:0};return(await i(g,Q))?.items??[]},e[2]=g,e[3]=m,e[4]=p,e[5]=i,e[6]=f,e[7]=d):d=e[7];let h;e[8]!==T||e[9]!==d?(h={queryKey:T,queryFn:d},e[8]=T,e[9]=d,e[10]=h):h=e[10];const{data:C}=U(h);return C}function M(n,s,i){const t=x.c(39),{org:e}=I(),r=b();let o;t[0]!==s?(o=s.toUpperCase(),t[0]=s,t[1]=o):o=t[1];const L=o,E=`COLLECTION_${L}_CREATE`,a=`COLLECTION_${L}_UPDATE`,c=`COLLECTION_${L}_DELETE`;let u;t[2]!==E||t[3]!==i?(u=async d=>(await i(E,{data:d})).item,t[2]=E,t[3]=i,t[4]=u):u=t[4];let l;t[5]!==s||t[6]!==e||t[7]!==r||t[8]!==n?(l=()=>{r.invalidateQueries({queryKey:F.collection(e.slug,n,s)}),v.success("Item created successfully")},t[5]=s,t[6]=e,t[7]=r,t[8]=n,t[9]=l):l=t[9];let _;t[10]!==u||t[11]!==l?(_={mutationFn:u,onSuccess:l,onError:P},t[10]=u,t[11]=l,t[12]=_):_=t[12];const O=w(_);let S;t[13]!==i||t[14]!==a?(S=async d=>{const{id:h,data:C}=d;return(await i(a,{id:h,data:C})).item},t[13]=i,t[14]=a,t[15]=S):S=t[15];let p;t[16]!==s||t[17]!==e||t[18]!==r||t[19]!==n?(p=()=>{r.invalidateQueries({queryKey:F.collection(e.slug,n,s)}),v.success("Item updated successfully")},t[16]=s,t[17]=e,t[18]=r,t[19]=n,t[20]=p):p=t[20];let y;t[21]!==S||t[22]!==p?(y={mutationFn:S,onSuccess:p,onError:B},t[21]=S,t[22]=p,t[23]=y):y=t[23];const q=w(y);let g;t[24]!==c||t[25]!==i?(g=async d=>(await i(c,{id:d})).item.id,t[24]=c,t[25]=i,t[26]=g):g=t[26];let f;t[27]!==s||t[28]!==e||t[29]!==r||t[30]!==n?(f=()=>{r.invalidateQueries({queryKey:F.collection(e.slug,n,s)}),v.success("Item deleted successfully")},t[27]=s,t[28]=e,t[29]=r,t[30]=n,t[31]=f):f=t[31];let m;t[32]!==g||t[33]!==f?(m={mutationFn:g,onSuccess:f,onError:z},t[32]=g,t[33]=f,t[34]=m):m=t[34];const $=w(m);let T;return t[35]!==O||t[36]!==$||t[37]!==q?(T={create:O,update:q,delete:$},t[35]=O,t[36]=$,t[37]=q,t[38]=T):T=t[38],T}function z(n){const s=n instanceof Error?n.message:String(n);v.error(`Failed to delete item: ${s}`)}function B(n){const s=n instanceof Error?n.message:String(n);v.error(`Failed to update item: ${s}`)}function P(n){const s=n instanceof Error?n.message:String(n);v.error(`Failed to create item: ${s}`)}export{M as a,K as b,J as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l}from"./index-
|
|
1
|
+
import{c as l}from"./index-lLPOJwFP.js";import{c as r}from"./connection-CMutAR-q.js";import{u as i}from"./project-context-provider-BMHXD39x.js";import{b as m,a as u,u as C}from"./use-collections-DiH8BH96.js";function O(t){const o=l.c(3);let e;o[0]!==t?(e=t===void 0?{}:t,o[0]=t,o[1]=e):e=o[1];const n=e,{org:c}=i();let s;o[2]===Symbol.for("react.memo_cache_sentinel")?(s=r(),o[2]=s):s=o[2];const a=s;return m(c.slug,"CONNECTIONS",a,n)}function S(t){const o=l.c(1),{org:e}=i();let n;o[0]===Symbol.for("react.memo_cache_sentinel")?(n=r(),o[0]=n):n=o[0];const c=n;return C(e.slug,"CONNECTIONS",t,c)}function _(){const t=l.c(1),{org:o}=i();let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r(),t[0]=e):e=t[0];const n=e;return u(o.slug,"CONNECTIONS",n)}export{_ as a,S as b,O as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,K as f}from"./index-
|
|
1
|
+
import{c as l,K as f}from"./index-lLPOJwFP.js";import{u as y}from"./index-BPAz_Wmi.js";async function h(t){const e=`/mcp/${t}`,s={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};try{const n=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{prompts:{}},clientInfo:{name:"mesh-prompts",version:"1.0.0"}}})});if(!n.ok)return[];const i=await n.json();if(i.error)return[];const{capabilities:o}=i.result;if(!o?.prompts)return[];const r=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"prompts/list",params:{}})});if(!r.ok)return[];const a=await r.json();return a.error?[]:a.result?.prompts||[]}catch{return[]}}function T(t){const e=l.c(13);let s;e[0]!==t?(s=t.map(q),e[0]=t,e[1]=s):s=e[1];let n;e[2]!==s?(n={queries:s},e[2]=s,e[3]=n):n=e[3];const i=y(n);let o,r;if(e[4]!==t||e[5]!==i){r=new Map;let p;e[8]!==i?(p=i.some(j),e[8]=i,e[9]=p):p=e[9],o=p,t.forEach((u,m)=>{const c=i[m];c?.data?r.set(u,c.data.map(d)):r.set(u,[])}),e[4]=t,e[5]=i,e[6]=o,e[7]=r}else o=e[6],r=e[7];let a;return e[10]!==o||e[11]!==r?(a={promptsMap:r,isLoading:o},e[10]=o,e[11]=r,e[12]=a):a=e[12],a}function d(t){return{name:t.name,description:t.description}}function j(t){return t.isLoading}function q(t){return{queryKey:f.connectionPrompts(t),queryFn:()=>h(t),staleTime:6e4,retry:!1}}async function w(t){const e=`/mcp/${t}`,s={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};try{const n=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{tools:{},resources:{},prompts:{}},clientInfo:{name:"mesh-resources",version:"1.0.0"}}})});if(!n.ok)return[];const i=await n.json();if(i.error)return[];const{capabilities:o}=i.result;if(!o?.resources)return[];const r=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"resources/list",params:{}})});if(!r.ok)return[];const a=await r.json();return a.error?[]:a.result?.resources||[]}catch{return[]}}function P(t){const e=l.c(13);let s;e[0]!==t?(s=t.map(g),e[0]=t,e[1]=s):s=e[1];let n;e[2]!==s?(n={queries:s},e[2]=s,e[3]=n):n=e[3];const i=y(n);let o,r;if(e[4]!==t||e[5]!==i){r=new Map;let p;e[8]!==i?(p=i.some(b),e[8]=i,e[9]=p):p=e[9],o=p,t.forEach((u,m)=>{const c=i[m];c?.data?r.set(u,c.data.map(S)):r.set(u,[])}),e[4]=t,e[5]=i,e[6]=o,e[7]=r}else o=e[6],r=e[7];let a;return e[10]!==o||e[11]!==r?(a={resourcesMap:r,isLoading:o},e[10]=o,e[11]=r,e[12]=a):a=e[12],a}function S(t){return{uri:t.uri,name:t.name,description:t.description}}function b(t){return t.isLoading}function g(t){return{queryKey:f.connectionResources(t),queryFn:()=>w(t),staleTime:6e4,retry:!1}}export{P as a,T as u};
|
package/dist/client/assets/{use-create-gateway-eDGGqEOS.js → use-create-gateway-DWTCcW8J.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,f as y}from"./index-
|
|
1
|
+
import{c as m,f as y}from"./index-lLPOJwFP.js";import{a as f}from"./use-gateway-Blme6XE1.js";import{u as p}from"./project-context-provider-BMHXD39x.js";function x(a){const e=m.c(10);let o;e[0]!==a?(o=a===void 0?{}:a,e[0]=a,e[1]=o):o=e[1];const d=o,{navigateOnCreate:u}=d,i=u===void 0?!1:u,{org:r}=p(),c=y(),t=f();let s;e[2]!==t.create||e[3]!==c||e[4]!==i||e[5]!==r?(s=async()=>{const l=await t.create.mutateAsync({title:"New Agent",description:"Agents let you securely expose integrated tools to the outside world.",status:"active",tool_selection_mode:"inclusion",connections:[]});return i&&c({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:l.id}}),{id:l.id,gateway:l}},e[2]=t.create,e[3]=c,e[4]=i,e[5]=r,e[6]=s):s=e[6];const g=s;let n;return e[7]!==t.create.isPending||e[8]!==g?(n={createGateway:g,isCreating:t.create.isPending},e[7]=t.create.isPending,e[8]=g,e[9]=n):n=e[9],n}export{x as u};
|