@decocms/mesh 2.5.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/dist/client/assets/{AlertCircle-DAyHhLS6.js → AlertCircle-CaSWziXY.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-Bpp_SsGd.js → ArrowLeft-C60SDpN2.js} +1 -1
  3. package/dist/client/assets/{ChevronDown-CsOv8W2I.js → ChevronDown-DYrAWIje.js} +1 -1
  4. package/dist/client/assets/Clock-9AM4S8g5.js +1 -0
  5. package/dist/client/assets/{Copy01-BrkhNqAw.js → Copy01-BOtwmMJy.js} +1 -1
  6. package/dist/client/assets/{DotsHorizontal-Bv4IcguS.js → DotsHorizontal-7SjfN6lZ.js} +1 -1
  7. package/dist/client/assets/{DotsVertical-cXTBD68H.js → DotsVertical-BP_-eK2T.js} +1 -1
  8. package/dist/client/assets/{File06-l4-3IHqa.js → File06-B3qh7Ea8.js} +1 -1
  9. package/dist/client/assets/{FilterLines-D2prJuZ_.js → FilterLines-Bt7sP2Ln.js} +1 -1
  10. package/dist/client/assets/{FlipBackward-Cuwh5H4e.js → FlipBackward-D4n1zrEs.js} +1 -1
  11. package/dist/client/assets/{GitBranch01-DDKUuZMu.js → GitBranch01-LrMvLleM.js} +1 -1
  12. package/dist/client/assets/Grid01-Bt5T8Kvn.js +1 -0
  13. package/dist/client/assets/{Inbox01-CEyXxA8m.js → Inbox01-B9Rg6DmE.js} +1 -1
  14. package/dist/client/assets/{InfoCircle-C2iaXmlJ.js → InfoCircle-ByoMVITX.js} +1 -1
  15. package/dist/client/assets/{Key01-CcMWzP51.js → Key01-VE6cE4ge.js} +1 -1
  16. package/dist/client/assets/{LinkExternal01-31BeOzKc.js → LinkExternal01-DQ7LiU13.js} +1 -1
  17. package/dist/client/assets/{Loading01-BqUL1Os2.js → Loading01-DU_er3oJ.js} +1 -1
  18. package/dist/client/assets/{Lock01-BfDepLwB.js → Lock01-w8OXtDqR.js} +1 -1
  19. package/dist/client/assets/{Play-DqaoplmY.js → Play-6JV_6CG8.js} +1 -1
  20. package/dist/client/assets/{Plus-CJASgavw.js → Plus-BZfgyBux.js} +1 -1
  21. package/dist/client/assets/{Terminal-e-eRty6Q.js → Terminal-DMx2ygGG.js} +1 -1
  22. package/dist/client/assets/{Trash01-C3O36hTP.js → Trash01-Dvb7krv8.js} +1 -1
  23. package/dist/client/assets/{X-D4fwyn55.js → X-DoVCUrhK.js} +1 -1
  24. package/dist/client/assets/{XClose-Bfbqr-bg.js → XClose-C1ZaoDkv.js} +1 -1
  25. package/dist/client/assets/{alert-dialog-F5nkQKBj.js → alert-dialog-CLLIrm4F.js} +2 -2
  26. package/dist/client/assets/{auth-m66JRmI1.js → auth-CgxcLwue.js} +1 -1
  27. package/dist/client/assets/{auth-catchall-BAZuaH8l.js → auth-catchall-BkCa4_aN.js} +1 -1
  28. package/dist/client/assets/{avatar-MdaY7dDq.js → avatar-CzWl5S-m.js} +1 -1
  29. package/dist/client/assets/{badge-BRpJ4D36.js → badge-Bbeqjlvl.js} +1 -1
  30. package/dist/client/assets/{card-DPsjHi5_.js → card-DDRZjhLd.js} +1 -1
  31. package/dist/client/assets/{checkbox-dB50xYpN.js → checkbox-CdriYHbe.js} +1 -1
  32. package/dist/client/assets/{collection-detail-glRN62L4.js → collection-detail-BizUvdqx.js} +27 -27
  33. package/dist/client/assets/{collection-display-button-BEkWecO6.js → collection-display-button-GYzwE1Yk.js} +1 -1
  34. package/dist/client/assets/{collection-header-DS84Dz-Z.js → collection-header-Dgpak6RG.js} +1 -1
  35. package/dist/client/assets/{collection-page-Dw7iXEq1.js → collection-page-DsXQH-Im.js} +1 -1
  36. package/dist/client/assets/{collection-search-Dwhflp6J.js → collection-search-BLCr2u4s.js} +1 -1
  37. package/dist/client/assets/{collection-tab-CQ_V1h26.js → collection-tab-B94jr-UP.js} +1 -1
  38. package/dist/client/assets/{collection-table-wrapper-Tc6aoQU4.js → collection-table-wrapper-lPNgMir7.js} +1 -1
  39. package/dist/client/assets/{connection-card-BOHNc6OM.js → connection-card-ChEaWCU7.js} +1 -1
  40. package/dist/client/assets/connection-detail-BdAq7uXe.js +1 -0
  41. package/dist/client/assets/connections-eTByBVoM.js +1 -0
  42. package/dist/client/assets/constants-DUH_OOTp.js +1 -0
  43. package/dist/client/assets/{create-organization-dialog-BW64m1n3.js → create-organization-dialog-BkLQZAga.js} +1 -1
  44. package/dist/client/assets/{dialog-dVO4tnyX.js → dialog-CjOzZCyT.js} +1 -1
  45. package/dist/client/assets/dropdown-menu-FKTXuLg3.js +1 -0
  46. package/dist/client/assets/{empty-state-Ctkb5o27.js → empty-state-Dg_1FyPv.js} +1 -1
  47. package/dist/client/assets/{env-vars-editor-BH1jNoL-.js → env-vars-editor-DILQqQln.js} +1 -1
  48. package/dist/client/assets/{error-boundary-NRHN5Y9-.js → error-boundary-DF-uZuEV.js} +1 -1
  49. package/dist/client/assets/{extract-connection-data-BaLXzQ_k.js → extract-connection-data-BorCHusn.js} +1 -1
  50. package/dist/client/assets/{form-BYRg0fLZ.js → form-B-vcq0Ib.js} +1 -1
  51. package/dist/client/assets/{gateway-detail-BfXnCLYA.js → gateway-detail-Dd3TUg5f.js} +1 -1
  52. package/dist/client/assets/gateways-CQnn2_8x.js +1 -0
  53. package/dist/client/assets/{home-4Azy8yCf.js → home-DqPSvVQ4.js} +1 -1
  54. package/dist/client/assets/{index-CiFNe-N2.js → index-CKWTMWxC.js} +1 -1
  55. package/dist/client/assets/{index-DsWTyaMI.js → index-DwHtQhMK.js} +2 -2
  56. package/dist/client/assets/index-PdYB8SsR.js +88 -0
  57. package/dist/client/assets/index-dJdCvohv.js +25 -0
  58. package/dist/client/assets/{input-Bjw47IqN.js → input-BL_6s-Bq.js} +1 -1
  59. package/dist/client/assets/{layout-CSrwjVH6.js → layout-D5OcxKMp.js} +1 -1
  60. package/dist/client/assets/{lazy-highlighter-3jMk7DX6.js → lazy-highlighter-DW141_mY.js} +1 -1
  61. package/dist/client/assets/{localstorage-keys-mgwVhAgB.js → localstorage-keys-DAcoYlkD.js} +1 -1
  62. package/dist/client/assets/{login-B4k1yizo.js → login-BPLTUQ2o.js} +1 -1
  63. package/dist/client/assets/{mcp-oauth-CYe4lbkF.js → mcp-oauth-C_b3SC0X.js} +1 -1
  64. package/dist/client/assets/mcp-server-detail-BFJ_9U28.js +1 -0
  65. package/dist/client/assets/members-nhvM4_hF.js +3 -0
  66. package/dist/client/assets/{monaco-editor-CiWfYNhn.js → monaco-editor-Fv58AQ_j.js} +4 -4
  67. package/dist/client/assets/{monitoring-C2NQS-B1.js → monitoring-0mZRbE8v.js} +4 -4
  68. package/dist/client/assets/{oauth-callback-CVfImHX4.js → oauth-callback-DOKfTw2N.js} +1 -1
  69. package/dist/client/assets/page-CWgyoE-b.js +1 -0
  70. package/dist/client/assets/page-bm876z4u.js +35 -0
  71. package/dist/client/assets/{pin-to-sidebar-button-B_8L8Vb0.js → pin-to-sidebar-button-CaUox-8X.js} +1 -1
  72. package/dist/client/assets/{popover-BAqz8iCu.js → popover-D6Sus4Ok.js} +1 -1
  73. package/dist/client/assets/{project-context-provider-4_jnbmhf.js → project-context-provider-cpEbmTch.js} +1 -1
  74. package/dist/client/assets/{resizable-BQxIvKty.js → resizable-CbIgPFul.js} +1 -1
  75. package/dist/client/assets/{resource-tabs-N7R8QmbK.js → resource-tabs-DsuwPs-x.js} +1 -1
  76. package/dist/client/assets/{select-D0sx2072.js → select-JyLqSDVb.js} +1 -1
  77. package/dist/client/assets/settings-Dod8lcbL.js +1 -0
  78. package/dist/client/assets/shell-layout-Boits0hC.js +1 -0
  79. package/dist/client/assets/{spinner-DZG16LrV.js → spinner-CzUKFN-O.js} +1 -1
  80. package/dist/client/assets/{switch-BRK3ymGn.js → switch-Bpj46bRm.js} +1 -1
  81. package/dist/client/assets/{textarea-Ct5hMebK.js → textarea-S1Ffk72a.js} +1 -1
  82. package/dist/client/assets/thread-history-popover-Do-vVWjf.js +48 -0
  83. package/dist/client/assets/{tools-list-B6Grd2aY.js → tools-list-BSUlyyag.js} +1 -1
  84. package/dist/client/assets/{use-binding-CocjKJdo.js → use-binding-DV8L0ZvU.js} +1 -1
  85. package/dist/client/assets/{use-connection-BRzCmTOd.js → use-connection-Sf8hW5yA.js} +2 -2
  86. package/dist/client/assets/{use-connection-resources-AWPWi-RH.js → use-connection-resources-DYe3vNOl.js} +1 -1
  87. package/dist/client/assets/use-gateway-BRb-QnWG.js +1 -0
  88. package/dist/client/assets/{use-gateway-system-prompt-DscZjM_A.js → use-gateway-system-prompt-BCFIzB-i.js} +1 -1
  89. package/dist/client/assets/{use-list-state-C9bMHTQK.js → use-list-state-CNeFnW0c.js} +1 -1
  90. package/dist/client/assets/{use-mcp-Xq1C6Xb8.js → use-mcp-Ck8Xxjhl.js} +1 -1
  91. package/dist/client/assets/{use-members-DwaDlN2k.js → use-members-C6E9q5SL.js} +1 -1
  92. package/dist/client/assets/{use-mobile-b2I183jd.js → use-mobile-DmpRnaSP.js} +1 -1
  93. package/dist/client/assets/{use-organization-settings-D21MRe-D.js → use-organization-settings-CUeUwHGc.js} +1 -1
  94. package/dist/client/assets/{use-tool-call-DWmlWS7M.js → use-tool-call-CFZ9HTpW.js} +1 -1
  95. package/dist/client/assets/{useQueries-BLLM0cVq.js → useQueries-KKCw7uoR.js} +1 -1
  96. package/dist/client/assets/useQuery-f5EeixK5.js +1 -0
  97. package/dist/client/assets/{value-D6kCdY90.js → value-Fk3OaX_V.js} +1 -1
  98. package/dist/client/assets/{view-mode-toggle-DlhHZSZ6.js → view-mode-toggle-B5QpL180.js} +1 -1
  99. package/dist/client/assets/workflow-DWBbOhIt.js +1 -0
  100. package/dist/client/index.html +1 -1
  101. package/dist/server/cli.js +1 -1
  102. package/dist/server/server.js +1 -1
  103. package/package.json +1 -1
  104. package/dist/client/assets/ChevronRight-Boh94iyZ.js +0 -1
  105. package/dist/client/assets/Grid01-COCXYn3t.js +0 -1
  106. package/dist/client/assets/Stop-CRrts02X.js +0 -1
  107. package/dist/client/assets/connection-detail-yed7lEwn.js +0 -1
  108. package/dist/client/assets/connections-Cyw4vKCR.js +0 -1
  109. package/dist/client/assets/constants-DgMd8oVj.js +0 -1
  110. package/dist/client/assets/dropdown-menu-Dl6PURsy.js +0 -1
  111. package/dist/client/assets/gateway-selector-DAEirbF5.js +0 -1
  112. package/dist/client/assets/gateways-BJBU4jqZ.js +0 -1
  113. package/dist/client/assets/index-DJlsJ8uo.js +0 -25
  114. package/dist/client/assets/mcp-server-detail-BncapnIe.js +0 -1
  115. package/dist/client/assets/members-CvcRBE7N.js +0 -3
  116. package/dist/client/assets/page-4Om70maF.js +0 -1
  117. package/dist/client/assets/page-DWpNpeBI.js +0 -35
  118. package/dist/client/assets/settings-DBVtWxtX.js +0 -1
  119. package/dist/client/assets/shell-layout-yGeudWHM.js +0 -1
  120. package/dist/client/assets/thread-history-popover-CUQ7xqpL.js +0 -135
  121. package/dist/client/assets/use-gateway-LBTVY8TW.js +0 -1
  122. package/dist/client/assets/useQuery-BXYZ1U8o.js +0 -1
  123. package/dist/client/assets/workflow-DufdLkFQ.js +0 -1
@@ -1 +1 @@
1
- import{r as I,a0 as ye,s as fe,W as F,v as S,Q as Ue,c as W,j as t,h as Be,d as nt,b as it,i as rt,aG as at,w as ct,x as dt,t as Ae}from"./index-DsWTyaMI.js";import{I as Me,u as qe,E as mt}from"./use-connection-BRzCmTOd.js";import{E as He}from"./error-boundary-NRHN5Y9-.js";import{C as Je}from"./checkbox-dB50xYpN.js";import{c as te,B as L,I as $e}from"./input-Bjw47IqN.js";import{i as ut}from"./ArrowLeft-Bpp_SsGd.js";import{C as ft}from"./collection-search-Dwhflp6J.js";import{s as ht}from"./Plus-CJASgavw.js";import{i as xt}from"./X-D4fwyn55.js";import{P as pt}from"./pin-to-sidebar-button-B_8L8Vb0.js";import{T as gt,S as bt}from"./switch-BRK3ymGn.js";import{b as jt,a as yt,i as vt}from"./use-gateway-LBTVY8TW.js";import{u as _t,a as St}from"./use-connection-resources-AWPWi-RH.js";import{u as Ct}from"./use-gateway-system-prompt-DscZjM_A.js";import{s as wt}from"./slugify-CEUa2lfQ.js";import{D as Nt,a as It,c as kt,d as Tt}from"./dialog-dVO4tnyX.js";import{F as be,a as $t,b as ve,d as _e,f as Se,c as Qe}from"./form-BYRg0fLZ.js";import{R as zt}from"./resource-tabs-N7R8QmbK.js";import{S as Ze,a as Ke,b as Xe,c as Ye,d as je}from"./select-D0sx2072.js";import{T as Pt}from"./textarea-Ct5hMebK.js";import{a as K,c as X,b as Y,T as ee,i as De}from"./project-context-provider-4_jnbmhf.js";import{a as et}from"./Copy01-BrkhNqAw.js";import{i as Rt}from"./FlipBackward-Cuwh5H4e.js";import{i as tt}from"./InfoCircle-C2iaXmlJ.js";import{i as Ee}from"./Loading01-BqUL1Os2.js";import{a as At,V as Dt,b as Et}from"./layout-CSrwjVH6.js";import"./use-organization-settings-D21MRe-D.js";import"./useQueries-BLLM0cVq.js";import"./localstorage-keys-mgwVhAgB.js";import"./useQuery-BXYZ1U8o.js";import"./badge-BRpJ4D36.js";import"./ChevronDown-CsOv8W2I.js";const st=({size:o=24,color:e="currentColor",...s})=>I.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},I.createElement("path",{d:"M7 3v3.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C7.76 8 8.04 8 8.6 8h6.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C17 7.24 17 6.96 17 6.4V4m0 17v-6.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C16.24 13 15.96 13 15.4 13H8.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C7 13.76 7 14.04 7 14.6V21M21 9.325V16.2c0 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 3h6.875c.489 0 .733 0 .963.055.204.05.4.13.579.24.201.123.374.296.72.642l3.126 3.126c.346.346.519.519.642.72.11.18.19.374.24.579.055.23.055.474.055.963Z"}));st.displayName="Save01";const ot=({size:o=24,color:e="currentColor",...s})=>I.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},I.createElement("path",{d:"m8.59 13.51 6.83 3.98m-.01-10.98-6.82 3.98M21 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM9 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm12 7a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));ot.displayName="Share07";const Oe=ye(["inclusion","exclusion"]).describe("Tool selection mode: 'inclusion' = include selected (default), 'exclusion' = exclude selected"),Ve=ye(["passthrough","smart_tool_selection","code_execution"]).describe("Gateway tool selection strategy: 'passthrough' (default), 'smart_tool_selection', or 'code_execution'"),Ut=fe({connection_id:S().describe("Connection ID"),selected_tools:F(S()).nullable().describe("Selected tool names. With 'inclusion' mode: null = all tools included. With 'exclusion' mode: null = entire connection excluded"),selected_resources:F(S()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. With 'inclusion' mode: null = all resources included."),selected_prompts:F(S()).nullable().describe("Selected prompt names. With 'inclusion' mode: null = all prompts included. With 'exclusion' mode: null = entire connection excluded.")}),Mt=fe({id:S().describe("Unique identifier for the gateway"),title:S().describe("Human-readable name for the gateway"),description:S().nullable().describe("Description of the gateway"),icon:S().nullable().optional().describe("Icon URL for the gateway"),created_at:S().describe("When the gateway was created"),updated_at:S().describe("When the gateway was last updated"),created_by:S().describe("User ID who created the gateway"),updated_by:S().optional().describe("User ID who last updated the gateway"),organization_id:S().describe("Organization ID this gateway belongs to"),tool_selection_strategy:Ve.describe("Gateway behavior strategy (metadata for now): 'passthrough', 'smart_tool_selection', or 'code_execution'"),tool_selection_mode:Oe.describe("Tool selection mode: 'inclusion' = include selected, 'exclusion' = exclude selected"),status:ye(["active","inactive"]).describe("Current status"),is_default:Ue().describe("Whether this is the Organization Agent for the organization"),connections:F(Ut).describe("Connections with their selected tools (behavior depends on tool_selection_mode)")});fe({title:S().min(1).max(255).describe("Name for the gateway"),description:S().nullable().optional().describe("Optional description"),tool_selection_strategy:Ve.optional().default("passthrough").describe("Gateway behavior strategy (defaults to 'passthrough')"),tool_selection_mode:Oe.optional().default("inclusion").describe("Tool selection mode (defaults to 'inclusion')"),icon:S().nullable().optional().describe("Optional icon URL"),status:ye(["active","inactive"]).optional().default("active").describe("Initial status"),is_default:Ue().optional().default(!1).describe("Whether this is the Organization Agent for the organization"),connections:F(fe({connection_id:S().describe("Connection ID"),selected_tools:F(S()).nullable().optional().describe("Selected tool names (null/undefined = all tools or full exclusion)"),selected_resources:F(S()).nullable().optional().describe("Selected resource URIs or patterns with * and ** wildcards (null/undefined = all resources)"),selected_prompts:F(S()).nullable().optional().describe("Selected prompt names (null/undefined = all prompts or full exclusion)")})).describe("Connections to include/exclude (can be empty for exclusion mode)")});fe({title:S().min(1).max(255).optional().describe("New name"),description:S().nullable().optional().describe("New description (null to clear)"),tool_selection_strategy:Ve.optional().describe("New gateway behavior strategy"),tool_selection_mode:Oe.optional().describe("New tool selection mode"),icon:S().nullable().optional().describe("New icon URL (null to clear)"),status:ye(["active","inactive"]).optional().describe("New status"),is_default:Ue().optional().describe("Set as Organization Agent for the organization"),connections:F(fe({connection_id:S().describe("Connection ID"),selected_tools:F(S()).nullable().optional().describe("Selected tool names (null/undefined = all tools or full exclusion)"),selected_resources:F(S()).nullable().optional().describe("Selected resource URIs or patterns with * and ** wildcards (null/undefined = all resources)"),selected_prompts:F(S()).nullable().optional().describe("Selected prompt names (null/undefined = all prompts or full exclusion)")})).optional().describe("New connections (replaces existing)")});const Ot=I.memo(function(e){const s=W.c(20),{connection:l,isSelected:a,hasItemsEnabled:i,activeItemsCount:x,totalItemsCount:d,onSelect:m,onToggle:n}=e,c=a?"bg-accent/50":"hover:bg-muted/50";let u;s[0]!==c?(u=te("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",c),s[0]=c,s[1]=u):u=s[1];let r;s[2]!==l.icon||s[3]!==l.title?(r=t.jsx(Me,{icon:l.icon,name:l.title,size:"xs"}),s[2]=l.icon,s[3]=l.title,s[4]=r):r=s[4];let g;s[5]!==l.title?(g=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:l.title})}),s[5]=l.title,s[6]=g):g=s[6];let f;s[7]!==m||s[8]!==r||s[9]!==g?(f=t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:m,children:[r,g]}),s[7]=m,s[8]=r,s[9]=g,s[10]=f):f=s[10];let p;s[11]!==x||s[12]!==i||s[13]!==n||s[14]!==d?(p=d>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[x,"/",d]}),t.jsx(Je,{checked:i,onCheckedChange:n,onClick:Gt})]}),s[11]=x,s[12]=i,s[13]=n,s[14]=d,s[15]=p):p=s[15];let j;return s[16]!==u||s[17]!==f||s[18]!==p?(j=t.jsxs("div",{className:u,children:[f,p]}),s[16]=u,s[17]=f,s[18]=p,s[19]=j):j=s[19],j}),Vt=I.memo(function(e){const s=W.c(18),{connectionId:l,item:a,isSelected:i,onToggle:x}=e,d=`item-${l}-${a.id}`,m=i?"text-foreground":"text-muted-foreground";let n;s[0]!==m?(n=te("text-sm font-medium",m),s[0]=m,s[1]=n):n=s[1];let c;s[2]!==a.name||s[3]!==n?(c=t.jsx("div",{className:"flex items-center gap-2 mb-1",children:t.jsx("span",{className:n,children:a.name})}),s[2]=a.name,s[3]=n,s[4]=c):c=s[4];let u;s[5]!==a.description?(u=a.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:a.description}),s[5]=a.description,s[6]=u):u=s[6];let r;s[7]!==c||s[8]!==u?(r=t.jsxs("div",{className:"flex-1 min-w-0",children:[c,u]}),s[7]=c,s[8]=u,s[9]=r):r=s[9];const g=`item-${l}-${a.id}`;let f;s[10]!==i||s[11]!==x||s[12]!==g?(f=t.jsx("div",{className:"flex items-center shrink-0",children:t.jsx(Je,{id:g,checked:i,onCheckedChange:x,onClick:Ft})}),s[10]=i,s[11]=x,s[12]=g,s[13]=f):f=s[13];let p;return s[14]!==d||s[15]!==r||s[16]!==f?(p=t.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:d,children:[r,f]}),s[14]=d,s[15]=r,s[16]=f,s[17]=p):p=s[17],p});function lt({itemSet:o,onItemSetChange:e,getItems:s,itemLabel:l,emptyItemsMessage:a,extraContent:i}){const[x,d]=I.useState(""),m=I.useDeferredValue(x),[n,c]=I.useState("all"),[u,r]=I.useState(!1),g=I.useRef(new Set(Object.keys(o))),f=qe({searchTerm:m.trim()||void 0}),p=g.current,j=[...p.values()].map(h=>f.find(_=>_.id===h)).filter(h=>h!==void 0),y=f.filter(h=>!p.has(h.id)),v=[...j,...y],b=h=>{const _=o[h];return _!==void 0&&_.length>0},C=v.filter(h=>{if(n==="all")return!0;const _=b(h.id);return n==="selected"?_:n==="unselected"?!_:!0}),[N,k]=I.useState(v[0]?.id??null),w=N?v.find(h=>h.id===N)??null:null,E=w?s(w):[],A=(h,_)=>o[h]?.includes(_)??!1,B=(h,_)=>{const $=o[h]??[],z=$.includes(_),U={...o};if(z){const P=$.filter(M=>M!==_);P.length===0?delete U[h]:U[h]=P}else U[h]=[...$,_];e(U)},Z=h=>{const _=v.find(D=>D.id===h);if(!_)return;const $=s(_);if($.length===0)return;const z=o[h]??[],U=$.map(D=>D.id),P=z.length>0&&U.every(D=>z.includes(D)),M={...o};P?delete M[h]:(M[h]=U,k(h)),e(M)},O=h=>{k(h),r(!0)},V=()=>{r(!1)};return t.jsxs("div",{className:"flex h-full",children:[t.jsxs("div",{className:te("w-full md:w-80 border-r border-border flex flex-col",u&&"hidden md:flex"),children:[t.jsx(ft,{value:x,onChange:d,placeholder:"Search Connections..."}),t.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[t.jsx("button",{onClick:()=>c("all"),className:te("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",n==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),t.jsx("button",{onClick:()=>c("selected"),className:te("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",n==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),t.jsx("button",{onClick:()=>c("unselected"),className:te("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",n==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),t.jsx("div",{className:"flex-1 overflow-auto",children:C.length===0?t.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:x?"No connections found":n==="selected"?"No servers selected":n==="unselected"?"No unselected servers":"No connections available"}):t.jsx("div",{className:"p-2 space-y-1",children:C.map(h=>{const $=s(h).length,z=o[h.id]?.length??0;return t.jsx(Ot,{connection:h,isSelected:N===h.id,hasItemsEnabled:b(h.id),activeItemsCount:z,totalItemsCount:$,onSelect:()=>O(h.id),onToggle:()=>Z(h.id)},h.id)})})})]}),t.jsx("div",{className:te("flex-1 flex-col",u?"flex":"hidden md:flex"),children:w?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(L,{variant:"ghost",size:"sm",onClick:V,className:"h-8 w-8 p-0 shrink-0",children:t.jsx(ut,{size:20})}),t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx(Me,{icon:w.icon,name:w.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:w.title}),w.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:w.description})]})]})]}),i,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:a||`This connection has no ${l} available`}):t.jsx("div",{className:"space-y-2",children:E.map(h=>t.jsx(Vt,{connectionId:w.id,item:h,isSelected:A(w.id,h.id),onToggle:()=>B(w.id,h.id)},h.id))})})]}):t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Select a connection to view its ",l]})})})]})}function Gt(o){return o.stopPropagation()}function Ft(o){return o.stopPropagation()}function Lt(o){const e=W.c(6),{promptSet:s,onPromptSetChange:l,connectionPrompts:a}=o;let i;e[0]!==a?(i=m=>(a.get(m.id)??[]).map(Wt),e[0]=a,e[1]=i):i=e[1];const x=i;let d;return e[2]!==x||e[3]!==l||e[4]!==s?(d=t.jsx(lt,{itemSet:s,onItemSetChange:l,getItems:x,itemLabel:"prompts",emptyItemsMessage:"This connection has no prompts available"}),e[2]=x,e[3]=l,e[4]=s,e[5]=d):d=e[5],d}function Wt(o){return{id:o.name,name:o.name,description:o.description}}function Bt(o){return o.includes("*")}function qt(o){const e=W.c(27),{patterns:s,onAddPattern:l,onRemovePattern:a}=o,[i,x]=I.useState("");let d;e[0]!==i||e[1]!==l||e[2]!==s?(d=()=>{const r=i.trim();r&&!s.includes(r)&&(l(r),x(""))},e[0]=i,e[1]=l,e[2]=s,e[3]=d):d=e[3];const m=d;let n;e[4]!==m?(n=r=>{r.key==="Enter"&&(r.preventDefault(),m())},e[4]=m,e[5]=n):n=e[5];const c=n;let u;if(e[6]!==m||e[7]!==c||e[8]!==i||e[9]!==a||e[10]!==s){const r=s.filter(Bt);let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("code",{children:"*"}),e[12]=g):g=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsxs("div",{className:"text-xs text-muted-foreground",children:["Add URI patterns to match multiple resources. Use ",g," for single segment and ",t.jsx("code",{children:"**"})," for multiple segments."]}),e[13]=f):f=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=k=>x(k.target.value),e[14]=p):p=e[14];let j;e[15]!==c||e[16]!==i?(j=t.jsx($e,{value:i,onChange:p,onKeyDown:c,placeholder:"e.g., file:///**/*.ts or db://users/*",className:"flex-1 text-sm"}),e[15]=c,e[16]=i,e[17]=j):j=e[17];let y;e[18]!==i?(y=i.trim(),e[18]=i,e[19]=y):y=e[19];const v=!y;let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(ht,{size:16}),e[20]=b):b=e[20];let C;e[21]!==m||e[22]!==v?(C=t.jsx(L,{type:"button",variant:"outline",size:"sm",onClick:m,disabled:v,children:b}),e[21]=m,e[22]=v,e[23]=C):C=e[23];let N;e[24]!==C||e[25]!==j?(N=t.jsxs("div",{className:"flex gap-2",children:[j,C]}),e[24]=C,e[25]=j,e[26]=N):N=e[26],u=t.jsxs("div",{className:"border-b border-border p-4 space-y-3",children:[f,N,r.length>0&&t.jsx("div",{className:"flex flex-wrap gap-2",children:r.map(k=>t.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-muted rounded-md text-xs",children:[t.jsx("code",{className:"text-foreground",children:k}),t.jsx("button",{type:"button",onClick:()=>a(k),className:"text-muted-foreground hover:text-foreground",children:t.jsx(xt,{size:12})})]},k))})]}),e[6]=m,e[7]=c,e[8]=i,e[9]=a,e[10]=s,e[11]=u}else u=e[11];return u}function Ht(o){const e=W.c(23),{resourceSet:s,onResourceSetChange:l,connectionResources:a}=o,[i]=I.useState(null);let x;e[0]!==a?(x=b=>(a.get(b.id)??[]).map(Jt),e[0]=a,e[1]=x):x=e[1];const d=x;let m;e[2]!==l||e[3]!==s?(m=(b,C)=>{const N=s[b]??[];N.includes(C)||l({...s,[b]:[...N,C]})},e[2]=l,e[3]=s,e[4]=m):m=e[4];const n=m;let c;e[5]!==l||e[6]!==s?(c=(b,C)=>{const k=(s[b]??[]).filter(w=>w!==C);if(k.length===0){const w={...s};delete w[b],l(w)}else l({...s,[b]:k})},e[5]=l,e[6]=s,e[7]=c):c=e[7];const u=c;let r;e[8]!==l?(r=b=>{l(b)},e[8]=l,e[9]=r):r=e[9];const g=r;let f;e[10]!==s||e[11]!==i?(f=i?s[i]??[]:[],e[10]=s,e[11]=i,e[12]=f):f=e[12];const p=f;let j;e[13]!==n||e[14]!==u||e[15]!==i||e[16]!==p?(j=i?t.jsx(qt,{patterns:p,onAddPattern:b=>n(i,b),onRemovePattern:b=>u(i,b)}):null,e[13]=n,e[14]=u,e[15]=i,e[16]=p,e[17]=j):j=e[17];const y=j;let v;return e[18]!==y||e[19]!==d||e[20]!==g||e[21]!==s?(v=t.jsx("div",{className:"h-full",children:t.jsx(lt,{itemSet:s,onItemSetChange:g,getItems:d,itemLabel:"resources",emptyItemsMessage:"This connection has no resources available",extraContent:y})}),e[18]=y,e[19]=d,e[20]=g,e[21]=s,e[22]=v):v=e[22],v}function Jt(o){return{id:o.uri,name:o.name||o.uri,description:o.description||o.uri}}function Qt(o){const s=new TextEncoder().encode(o),l=Array.from(s,a=>String.fromCharCode(a)).join("");return btoa(l)}function Zt(o){const e=W.c(52),{serverName:s,gatewayUrl:l}=o,[a,i]=I.useState(!1),[x,d]=I.useState(null),m=wt(s);let n,c,u,r;if(e[0]!==l||e[1]!==m){const R={type:"http",url:l},he={[m]:R};n=JSON.stringify(he,null,2);const se=pe=>JSON.stringify({...R,headers:{"x-mesh-client":pe}},null,2),oe=Qt(se("Cursor"));c=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(m)}&config=${encodeURIComponent(oe)}`;const xe=se("Claude Code");u=m;let Q;e[6]===Symbol.for("react.memo_cache_sentinel")?(Q=/'/g,e[6]=Q):Q=e[6],r=xe.replace(Q,"'\\''"),e[0]=l,e[1]=m,e[2]=n,e[3]=c,e[4]=u,e[5]=r}else n=e[2],c=e[3],u=e[4],r=e[5];const g=`claude mcp add "${u}" --config '${r}'`;let f;e[7]!==n?(f=async()=>{await navigator.clipboard.writeText(n),i(!0),Ae.success("Configuration copied to clipboard"),setTimeout(()=>i(!1),2e3)},e[7]=n,e[8]=f):f=e[8];const p=f;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=async(R,he)=>{await navigator.clipboard.writeText(R),d(he),Ae.success(`${he} command copied`),setTimeout(()=>d(null),2e3)},e[9]=j):j=e[9];const y=j,v=Kt;let b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mb-1",children:"Install in your IDE"})}),e[10]=b):b=e[10];let C;e[11]!==a?(C=a?t.jsx(De,{size:14}):t.jsx(et,{size:14}),e[11]=a,e[12]=C):C=e[12];let N;e[13]!==p||e[14]!==C?(N=t.jsx(Y,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 shrink-0",onClick:p,children:C})}),e[13]=p,e[14]=C,e[15]=N):N=e[15];let k;e[16]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(ee,{children:"Copy configuration"}),e[16]=k):k=e[16];let w;e[17]!==N?(w=t.jsx("div",{className:"absolute top-2 right-2",children:t.jsx(K,{children:t.jsxs(X,{children:[N,k]})})}),e[17]=N,e[18]=w):w=e[18];let E;e[19]!==n||e[20]!==p?(E=t.jsx("pre",{className:"text-xs font-mono text-foreground overflow-auto max-h-40 whitespace-pre-wrap wrap-break-word cursor-pointer",onClick:p,children:n}),e[19]=n,e[20]=p,e[21]=E):E=e[21];let A;e[22]!==E||e[23]!==w?(A=t.jsxs("div",{className:"relative flex flex-col gap-2 p-3 bg-muted/50 rounded-lg",children:[w,E]}),e[22]=E,e[23]=w,e[24]=A):A=e[24];let B;e[25]!==c?(B=()=>v(c),e[25]=c,e[26]=B):B=e[26];let Z,O;e[27]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-6 w-6",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),O=t.jsx("span",{className:"text-sm font-medium",children:"Cursor"}),e[27]=Z,e[28]=O):(Z=e[27],O=e[28]);let V;e[29]!==B?(V=t.jsx(Y,{asChild:!0,children:t.jsxs(L,{variant:"outline",className:"h-auto py-3 px-4 justify-center gap-2 flex-1 min-w-fit",onClick:B,children:[Z,O]})}),e[29]=B,e[30]=V):V=e[30];let h;e[31]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(ee,{children:"Add to Cursor"}),e[31]=h):h=e[31];let _;e[32]!==V?(_=t.jsx(K,{children:t.jsxs(X,{children:[V,h]})}),e[32]=V,e[33]=_):_=e[33];let $;e[34]!==g?($=()=>y(g,"Claude"),e[34]=g,e[35]=$):$=e[35];let z,U;e[36]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-6 w-6",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),U=t.jsx("span",{className:"text-sm font-medium",children:"Claude Code"}),e[36]=z,e[37]=U):(z=e[36],U=e[37]);let P;e[38]!==x?(P=x==="Claude"&&t.jsx(De,{size:14,className:"ml-2 text-green-500"}),e[38]=x,e[39]=P):P=e[39];let M;e[40]!==$||e[41]!==P?(M=t.jsx(Y,{asChild:!0,children:t.jsxs(L,{variant:"outline",className:"h-auto py-3 px-4 justify-center gap-2 flex-1 min-w-fit",onClick:$,children:[z,U,P]})}),e[40]=$,e[41]=P,e[42]=M):M=e[42];let D;e[43]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(ee,{children:"Add to Claude Code"}),e[43]=D):D=e[43];let q;e[44]!==M?(q=t.jsx(K,{children:t.jsxs(X,{children:[M,D]})}),e[44]=M,e[45]=q):q=e[45];let H;e[46]!==_||e[47]!==q?(H=t.jsxs("div",{className:"flex flex-wrap gap-2",children:[_,q]}),e[46]=_,e[47]=q,e[48]=H):H=e[48];let J;return e[49]!==A||e[50]!==H?(J=t.jsxs("div",{className:"flex flex-col gap-4",children:[b,A,H]}),e[49]=A,e[50]=H,e[51]=J):J=e[51],J}function Kt(o){window.open(o,"_blank")}const Xt=Mt.pick({title:!0,description:!0,status:!0,tool_selection_mode:!0,tool_selection_strategy:!0}).extend({title:S().min(1,"Name is required").max(255)});function Fe(o,e){const s={};for(const l of o.connections)if(l.selected_tools===null){const a=e.get(l.connection_id)??[];a.length>0&&(s[l.connection_id]=a)}else l.selected_tools.length>0&&(s[l.connection_id]=l.selected_tools);return s}function Le(o){const e={};for(const s of o.connections)s.selected_resources!==null&&s.selected_resources!==void 0&&s.selected_resources.length>0&&(e[s.connection_id]=s.selected_resources);return e}function We(o){const e={};for(const s of o.connections)s.selected_prompts!==null&&s.selected_prompts!==void 0&&s.selected_prompts.length>0&&(e[s.connection_id]=s.selected_prompts);return e}function Yt(o,e,s,l){const a=new Set([...Object.keys(o),...Object.keys(e),...Object.keys(s)]);return Array.from(a).map(i=>{const x=o[i]??[],d=l.get(i)??[],m=d.length>0&&d.every(n=>x.includes(n));return{connection_id:i,selected_tools:x.length===0||m?null:x,selected_resources:e[i]??null,selected_prompts:s[i]??null}})}function es(o){const e=W.c(27),{open:s,onOpenChange:l,gateway:a}=o,[i,x]=I.useState(!1),d=`${window.location.origin}/mcp/gateway/${a.id}`;let m;e[0]!==d?(m=async()=>{await navigator.clipboard.writeText(d),x(!0),Ae.success("Agent URL copied to clipboard"),setTimeout(()=>x(!1),2e3)},e[0]=d,e[1]=m):m=e[1];const n=m;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Nt,{children:t.jsx(It,{children:"Share Agent"})}),e[2]=c):c=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsxs("div",{children:[t.jsx("h4",{className:"text-sm font-medium text-foreground mb-1",children:"Agent URL"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Share this URL to connect to the agent"})]}),e[3]=u):u=e[3];let r;e[4]!==d?(r=t.jsx($e,{value:d,readOnly:!0,className:"font-mono text-xs"}),e[4]=d,e[5]=r):r=e[5];let g;e[6]!==i?(g=i?t.jsx(De,{size:16}):t.jsx(et,{size:16}),e[6]=i,e[7]=g):g=e[7];let f;e[8]!==n||e[9]!==g?(f=t.jsx(L,{type:"button",variant:"outline",size:"icon",onClick:n,className:"shrink-0",children:g}),e[8]=n,e[9]=g,e[10]=f):f=e[10];let p;e[11]!==r||e[12]!==f?(p=t.jsxs("div",{className:"flex flex-col gap-3",children:[u,t.jsxs("div",{className:"flex gap-2",children:[r,f]})]}),e[11]=r,e[12]=f,e[13]=p):p=e[13];let j;e[14]!==a.id||e[15]!==a.title?(j=a.title||`agent-${a.id.slice(0,8)}`,e[14]=a.id,e[15]=a.title,e[16]=j):j=e[16];let y;e[17]!==d||e[18]!==j?(y=t.jsx("div",{className:"border-t border-border pt-6",children:t.jsx(Zt,{serverName:j,gatewayUrl:d})}),e[17]=d,e[18]=j,e[19]=y):y=e[19];let v;e[20]!==p||e[21]!==y?(v=t.jsxs(kt,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[c,t.jsxs("div",{className:"flex flex-col gap-6",children:[p,y]})]}),e[20]=p,e[21]=y,e[22]=v):v=e[22];let b;return e[23]!==l||e[24]!==s||e[25]!==v?(b=t.jsx(Tt,{open:s,onOpenChange:l,children:v}),e[23]=l,e[24]=s,e[25]=v,e[26]=b):b=e[26],b}function ts(o){const e=W.c(31),{form:s,icon:l,gatewayId:a}=o,[i,x]=Ct(a);let d;e[0]!==s?(d=s.watch("title")||"Agent",e[0]=s,e[1]=d):d=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(vt,{}),e[2]=m):m=e[2];let n;e[3]!==l||e[4]!==d?(n=t.jsx(Me,{icon:l,name:d,size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:m}),e[3]=l,e[4]=d,e[5]=n):n=e[5];let c;e[6]!==s.control?(c=t.jsx(be,{control:s.control,name:"status",render:is}),e[6]=s.control,e[7]=c):c=e[7];let u;e[8]!==n||e[9]!==c?(u=t.jsxs("div",{className:"flex items-start justify-between",children:[n,c]}),e[8]=n,e[9]=c,e[10]=u):u=e[10];let r;e[11]!==s.control?(r=t.jsxs("div",{className:"flex flex-col",children:[t.jsx(be,{control:s.control,name:"title",render:ns}),t.jsx(be,{control:s.control,name:"description",render:ls})]}),e[11]=s.control,e[12]=r):r=e[12];let g;e[13]!==u||e[14]!==r?(g=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[u,r]}),e[13]=u,e[14]=r,e[15]=g):g=e[15];let f;e[16]!==s.control?(f=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[t.jsx(be,{control:s.control,name:"tool_selection_mode",render:os}),t.jsx(be,{control:s.control,name:"tool_selection_strategy",render:ss})]}),e[16]=s.control,e[17]=f):f=e[17];let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsxs("div",{children:[t.jsx("h4",{className:"text-sm font-medium text-foreground mb-1",children:"System Prompt"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Stored locally for now"})]}),e[18]=p):p=e[18];let j;e[19]!==x?(j=C=>x(C.target.value),e[19]=x,e[20]=j):j=e[20];let y;e[21]!==i||e[22]!==j?(y=t.jsxs("div",{className:"flex flex-col gap-3 p-5",children:[p,t.jsx(Pt,{value:i,onChange:j,placeholder:"Enter system prompt instructions...",className:"min-h-[240px] resize-none text-sm leading-relaxed"})]}),e[21]=i,e[22]=j,e[23]=y):y=e[23];let v;e[24]!==y||e[25]!==g||e[26]!==f?(v=t.jsxs("div",{className:"flex flex-col",children:[g,f,y]}),e[24]=y,e[25]=g,e[26]=f,e[27]=v):v=e[27];let b;return e[28]!==s||e[29]!==v?(b=t.jsx("div",{className:"flex flex-col h-full overflow-auto",children:t.jsx($t,{...s,children:v})}),e[28]=s,e[29]=v,e[30]=b):b=e[30],b}function ss(o){const{field:e}=o;return t.jsxs(ve,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx(Qe,{className:"mb-0",children:"Agent Strategy"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(K,{children:t.jsxs(X,{children:[t.jsx(Y,{asChild:!0,children:t.jsx(L,{type:"button",variant:"ghost",size:"icon",className:"size-7","aria-label":"Agent strategy help",children:t.jsx(tt,{size:14,className:"text-muted-foreground"})})}),t.jsx(ee,{side:"left",className:"max-w-sm",children:t.jsxs("div",{className:"text-xs space-y-1",children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Passthrough:"})," Pass tools through as-is (default)."]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Smart Tool Selection:"})," ","Intelligent tool selection behavior."]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Code Execution:"})," Code execution behavior."]})]})})]})}),t.jsxs(Ze,{value:e.value,onValueChange:e.onChange,children:[t.jsx(_e,{children:t.jsx(Ke,{className:"w-[180px]",children:t.jsx(Xe,{})})}),t.jsxs(Ye,{children:[t.jsx(je,{value:"passthrough",children:"Passthrough"}),t.jsx(je,{value:"smart_tool_selection",children:"Smart Tool Selection"}),t.jsx(je,{value:"code_execution",children:"Code Execution"})]})]})]})]}),t.jsx(Se,{})]})}function os(o){const{field:e}=o;return t.jsxs(ve,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx(Qe,{className:"mb-0",children:"Selection Mode"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(K,{children:t.jsxs(X,{children:[t.jsx(Y,{asChild:!0,children:t.jsx(L,{type:"button",variant:"ghost",size:"icon",className:"size-7","aria-label":"Selection mode help",children:t.jsx(tt,{size:14,className:"text-muted-foreground"})})}),t.jsx(ee,{side:"left",className:"max-w-sm",children:t.jsxs("div",{className:"text-xs space-y-1",children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Include:"})," Only selected items are exposed."]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Exclude:"})," All items except selected ones are exposed."]})]})})]})}),t.jsxs(Ze,{value:e.value,onValueChange:e.onChange,children:[t.jsx(_e,{children:t.jsx(Ke,{className:"w-[180px]",children:t.jsx(Xe,{})})}),t.jsxs(Ye,{children:[t.jsx(je,{value:"inclusion",children:"Include Selected"}),t.jsx(je,{value:"exclusion",children:"Exclude Selected"})]})]})]})]}),t.jsx(Se,{})]})}function ls(o){const{field:e}=o;return t.jsxs(ve,{className:"w-full space-y-0",children:[t.jsx(_e,{children:t.jsx($e,{...e,value:e.value||"",className:"h-auto text-base text-muted-foreground leading-6 px-0 border-transparent hover:border-input focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})}),t.jsx(Se,{})]})}function ns(o){const{field:e}=o;return t.jsxs(ve,{className:"w-full space-y-0",children:[t.jsx(_e,{children:t.jsx($e,{...e,className:"h-auto text-lg! font-medium leading-7 px-0 border-transparent hover:border-input focus:border-input bg-transparent transition-all",placeholder:"Agent Name"})}),t.jsx(Se,{})]})}function is(o){const{field:e}=o;return t.jsxs(ve,{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:e.value==="active"?"Active":"Inactive"}),t.jsx(_e,{children:t.jsx(bt,{checked:e.value==="active",onCheckedChange:s=>e.onChange(s?"active":"inactive")})})]}),t.jsx(Se,{})]})}function rs(o){const e=W.c(82),{gateway:s,gatewayId:l,requestedTabId:a}=o,x=rt().location.href,d=at();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={from:"/$org/gateways/$gatewayId"},e[0]=m):m=e[0];const n=Be(m),c=yt();let u;e[1]===Symbol.for("react.memo_cache_sentinel")?(u={},e[1]=u):u=e[1];const r=qe(u);let g;e[2]!==r?(g=r.map(cs),e[2]=r,e[3]=g):g=e[3];const f=g,{promptsMap:p}=_t(f),{resourcesMap:j}=St(f);let y;if(e[4]!==r){y=new Map;for(const T of r)T.tools&&T.tools.length>0&&y.set(T.id,T.tools.map(as));e[4]=r,e[5]=y}else y=e[5];let v;e[6]!==y||e[7]!==s?(v=()=>Fe(s,y),e[6]=y,e[7]=s,e[8]=v):v=e[8];const[b,C]=I.useState(v);let N;e[9]!==s?(N=()=>Le(s),e[9]=s,e[10]=N):N=e[10];const[k,w]=I.useState(N);let E;e[11]!==s?(E=()=>We(s),e[11]=s,e[12]=E):E=e[12];const[A,B]=I.useState(E),[Z,O]=I.useState(!1),[V,h]=I.useState(!1);let _;e[13]===Symbol.for("react.memo_cache_sentinel")?(_=T=>{C(T),O(!0)},e[13]=_):_=e[13];const $=_;let z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=T=>{w(T),O(!0)},e[14]=z):z=e[14];const U=z;let P;e[15]===Symbol.for("react.memo_cache_sentinel")?(P=T=>{B(T),O(!0)},e[15]=P):P=e[15];const M=P;let D;e[16]===Symbol.for("react.memo_cache_sentinel")?(D=ct(Xt),e[16]=D):D=e[16];const q=s.tool_selection_mode??"inclusion",H=s.tool_selection_strategy??"passthrough";let J;e[17]!==s.description||e[18]!==s.status||e[19]!==s.title||e[20]!==q||e[21]!==H?(J={resolver:D,defaultValues:{title:s.title,description:s.description,status:s.status,tool_selection_mode:q,tool_selection_strategy:H}},e[17]=s.description,e[18]=s.status,e[19]=s.title,e[20]=q,e[21]=H,e[22]=J):J=e[22];const R=dt(J),se=R.formState.isDirty||Z;let oe;e[23]!==c.update||e[24]!==y||e[25]!==R||e[26]!==l||e[27]!==A||e[28]!==k||e[29]!==b?(oe=async()=>{const T=R.getValues(),Re=Yt(b,k,A,y);await c.update.mutateAsync({id:l,data:{title:T.title,description:T.description,status:T.status,tool_selection_mode:T.tool_selection_mode,tool_selection_strategy:T.tool_selection_strategy,connections:Re}}),R.reset(T),O(!1)},e[23]=c.update,e[24]=y,e[25]=R,e[26]=l,e[27]=A,e[28]=k,e[29]=b,e[30]=oe):oe=e[30];const xe=oe;let Q;e[31]!==y||e[32]!==R||e[33]!==s?(Q=()=>{R.reset({title:s.title,description:s.description,status:s.status,tool_selection_mode:s.tool_selection_mode??"inclusion",tool_selection_strategy:s.tool_selection_strategy??"passthrough"}),C(Fe(s,y)),w(Le(s)),B(We(s)),O(!1)},e[31]=y,e[32]=R,e[33]=s,e[34]=Q):Q=e[34];const pe=Q;let Ce;e[35]===Symbol.for("react.memo_cache_sentinel")?(Ce=[{id:"settings",label:"Settings"},{id:"tools",label:"Tools"},{id:"resources",label:"Resources"},{id:"prompts",label:"Prompts"}],e[35]=Ce):Ce=e[35];const Ge=Ce,G=Ge.some(T=>T.id===a)?a:"settings";let we;e[36]!==n?(we=T=>{n({search:Re=>({...Re,tab:T}),replace:!0})},e[36]=n,e[37]=we):we=e[37];const ze=we,ge=c.update.isPending;let le;e[38]!==d.history?(le=()=>d.history.back(),e[38]=d.history,e[39]=le):le=e[39];let ne;e[40]!==G||e[41]!==ze?(ne=t.jsx(At,{children:t.jsx(zt,{tabs:Ge,activeTab:G,onTabChange:ze})}),e[40]=G,e[41]=ze,e[42]=ne):ne=e[42];let ie;e[43]!==pe||e[44]!==xe||e[45]!==se||e[46]!==ge?(ie=se&&t.jsxs(t.Fragment,{children:[t.jsx(K,{children:t.jsxs(X,{delayDuration:0,children:[t.jsx(Y,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(L,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:ge,onClick:pe,"aria-label":"Cancel",children:t.jsx(Rt,{size:14})})})}),t.jsx(ee,{side:"bottom",children:"Cancel"})]})}),t.jsx(K,{children:t.jsxs(X,{delayDuration:0,children:[t.jsx(Y,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(L,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:ge,onClick:xe,"aria-label":"Save",children:ge?t.jsx(Ee,{size:14,className:"animate-spin"}):t.jsx(st,{size:14})})})}),t.jsx(ee,{side:"bottom",children:"Save"})]})})]}),e[43]=pe,e[44]=xe,e[45]=se,e[46]=ge,e[47]=ie):ie=e[47];let Ne;e[48]===Symbol.for("react.memo_cache_sentinel")?(Ne=()=>h(!0),e[48]=Ne):Ne=e[48];let Ie;e[49]===Symbol.for("react.memo_cache_sentinel")?(Ie=t.jsx(K,{children:t.jsxs(X,{delayDuration:0,children:[t.jsx(Y,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(L,{variant:"outline",size:"icon",className:"size-7 border border-input",onClick:Ne,"aria-label":"Share",children:t.jsx(ot,{size:14})})})}),t.jsx(ee,{side:"bottom",children:"Share"})]})}),e[49]=Ie):Ie=e[49];const Pe=s.icon??"cpu_chip";let re;e[50]!==s.title||e[51]!==Pe||e[52]!==x?(re=t.jsx(pt,{title:s.title,url:x,icon:Pe}),e[50]=s.title,e[51]=Pe,e[52]=x,e[53]=re):re=e[53];let ae;e[54]!==ie||e[55]!==re?(ae=t.jsxs(Dt,{children:[ie,Ie,re]}),e[54]=ie,e[55]=re,e[56]=ae):ae=e[56];let ke;e[57]===Symbol.for("react.memo_cache_sentinel")?(ke=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Ee,{size:32,className:"animate-spin text-muted-foreground"})}),e[57]=ke):ke=e[57];let ce;e[58]!==G||e[59]!==p||e[60]!==j||e[61]!==R||e[62]!==s.icon||e[63]!==l||e[64]!==A||e[65]!==k||e[66]!==b?(ce=G==="settings"?t.jsx(ts,{form:R,icon:s.icon,gatewayId:l}):G==="tools"?t.jsx(gt,{toolSet:b,onToolSetChange:$}):G==="resources"?t.jsx(Ht,{resourceSet:k,onResourceSetChange:U,connectionResources:j}):G==="prompts"?t.jsx(Lt,{promptSet:A,onPromptSetChange:M,connectionPrompts:p}):null,e[58]=G,e[59]=p,e[60]=j,e[61]=R,e[62]=s.icon,e[63]=l,e[64]=A,e[65]=k,e[66]=b,e[67]=ce):ce=e[67];let de;e[68]!==ce?(de=t.jsx(I.Suspense,{fallback:ke,children:ce}),e[68]=ce,e[69]=de):de=e[69];let me;e[70]!==G||e[71]!==de?(me=t.jsx("div",{className:"flex h-full w-full bg-background overflow-hidden",children:t.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-hidden",children:t.jsx("div",{className:"h-full overflow-auto",children:t.jsx(He,{children:de},G)})})}),e[70]=G,e[71]=de,e[72]=me):me=e[72];let ue;e[73]!==s||e[74]!==V?(ue=t.jsx(es,{open:V,onOpenChange:h,gateway:s}),e[73]=s,e[74]=V,e[75]=ue):ue=e[75];let Te;return e[76]!==le||e[77]!==ne||e[78]!==ae||e[79]!==me||e[80]!==ue?(Te=t.jsxs(Et,{onBack:le,children:[ne,ae,me,ue]}),e[76]=le,e[77]=ne,e[78]=ae,e[79]=me,e[80]=ue,e[81]=Te):Te=e[81],Te}function as(o){return o.name}function cs(o){return o.id}function ds(){const o=W.c(10);let e;o[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/gateways/$gatewayId"},o[0]=e):e=o[0];const s=Be(e);let l;o[1]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/gateways/$gatewayId"},o[1]=l):l=o[1];const{gatewayId:a,org:i}=nt(l);let x;o[2]===Symbol.for("react.memo_cache_sentinel")?(x={from:"/shell/$org/gateways/$gatewayId"},o[2]=x):x=o[2];const m=it(x).tab||"settings",n=jt(a);if(!n){let u;return o[3]!==s||o[4]!==i?(u=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(mt,{title:"Agent not found",description:"This Agent may have been deleted or you may not have access.",actions:t.jsx(L,{variant:"outline",onClick:()=>s({to:"/$org/gateways",params:{org:i}}),children:"Back to agents"})})}),o[3]=s,o[4]=i,o[5]=u):u=o[5],u}let c;return o[6]!==n||o[7]!==a||o[8]!==m?(c=t.jsx(rs,{gateway:n,gatewayId:a,requestedTabId:m}),o[6]=n,o[7]=a,o[8]=m,o[9]=c):c=o[9],c}function ms(){const o=W.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(He,{children:t.jsx(I.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Ee,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(ds,{})})}),o[0]=e):e=o[0],e}function Ws(){const o=W.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ms,{}),o[0]=e):e=o[0],e}export{Ws as default};
1
+ import{r as I,a0 as ye,s as fe,W as G,v as S,Q as Ue,c as W,j as t,h as Be,d as nt,b as it,i as rt,aF as at,w as ct,x as dt,t as Ae}from"./index-DwHtQhMK.js";import{I as Me,u as qe,E as mt}from"./use-connection-Sf8hW5yA.js";import{E as He}from"./error-boundary-DF-uZuEV.js";import{C as Je}from"./checkbox-CdriYHbe.js";import{c as te,B as L,I as $e}from"./input-BL_6s-Bq.js";import{i as ut}from"./ArrowLeft-C60SDpN2.js";import{C as ft}from"./collection-search-BLCr2u4s.js";import{s as ht}from"./Plus-BZfgyBux.js";import{i as xt}from"./X-DoVCUrhK.js";import{P as pt}from"./pin-to-sidebar-button-CaUox-8X.js";import{T as gt,S as bt}from"./switch-Bpj46bRm.js";import{b as jt,a as yt,i as vt}from"./use-gateway-BRb-QnWG.js";import{u as _t,a as St}from"./use-connection-resources-DYe3vNOl.js";import{u as Ct}from"./use-gateway-system-prompt-BCFIzB-i.js";import{s as wt}from"./slugify-CEUa2lfQ.js";import{D as Nt,a as It,c as kt,d as Tt}from"./dialog-CjOzZCyT.js";import{F as be,a as $t,b as ve,d as _e,f as Se,c as Qe}from"./form-B-vcq0Ib.js";import{R as zt}from"./resource-tabs-DsuwPs-x.js";import{S as Ze,a as Ke,b as Xe,c as Ye,d as je}from"./select-JyLqSDVb.js";import{T as Pt}from"./textarea-S1Ffk72a.js";import{a as K,c as X,b as Y,T as ee,i as De}from"./project-context-provider-cpEbmTch.js";import{a as et}from"./Copy01-BOtwmMJy.js";import{i as Rt}from"./FlipBackward-D4n1zrEs.js";import{i as tt}from"./InfoCircle-ByoMVITX.js";import{i as Ee}from"./Loading01-DU_er3oJ.js";import{a as At,V as Dt,b as Et}from"./layout-D5OcxKMp.js";import"./use-organization-settings-CUeUwHGc.js";import"./useQueries-KKCw7uoR.js";import"./localstorage-keys-DAcoYlkD.js";import"./useQuery-f5EeixK5.js";import"./badge-Bbeqjlvl.js";import"./ChevronDown-DYrAWIje.js";const st=({size:o=24,color:e="currentColor",...s})=>I.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},I.createElement("path",{d:"M7 3v3.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C7.76 8 8.04 8 8.6 8h6.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C17 7.24 17 6.96 17 6.4V4m0 17v-6.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C16.24 13 15.96 13 15.4 13H8.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C7 13.76 7 14.04 7 14.6V21M21 9.325V16.2c0 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 3h6.875c.489 0 .733 0 .963.055.204.05.4.13.579.24.201.123.374.296.72.642l3.126 3.126c.346.346.519.519.642.72.11.18.19.374.24.579.055.23.055.474.055.963Z"}));st.displayName="Save01";const ot=({size:o=24,color:e="currentColor",...s})=>I.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},I.createElement("path",{d:"m8.59 13.51 6.83 3.98m-.01-10.98-6.82 3.98M21 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM9 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm12 7a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));ot.displayName="Share07";const Oe=ye(["inclusion","exclusion"]).describe("Tool selection mode: 'inclusion' = include selected (default), 'exclusion' = exclude selected"),Ve=ye(["passthrough","smart_tool_selection","code_execution"]).describe("Gateway tool selection strategy: 'passthrough' (default), 'smart_tool_selection', or 'code_execution'"),Ut=fe({connection_id:S().describe("Connection ID"),selected_tools:G(S()).nullable().describe("Selected tool names. With 'inclusion' mode: null = all tools included. With 'exclusion' mode: null = entire connection excluded"),selected_resources:G(S()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. With 'inclusion' mode: null = all resources included."),selected_prompts:G(S()).nullable().describe("Selected prompt names. With 'inclusion' mode: null = all prompts included. With 'exclusion' mode: null = entire connection excluded.")}),Mt=fe({id:S().describe("Unique identifier for the gateway"),title:S().describe("Human-readable name for the gateway"),description:S().nullable().describe("Description of the gateway"),icon:S().nullable().optional().describe("Icon URL for the gateway"),created_at:S().describe("When the gateway was created"),updated_at:S().describe("When the gateway was last updated"),created_by:S().describe("User ID who created the gateway"),updated_by:S().optional().describe("User ID who last updated the gateway"),organization_id:S().describe("Organization ID this gateway belongs to"),tool_selection_strategy:Ve.describe("Gateway behavior strategy (metadata for now): 'passthrough', 'smart_tool_selection', or 'code_execution'"),tool_selection_mode:Oe.describe("Tool selection mode: 'inclusion' = include selected, 'exclusion' = exclude selected"),status:ye(["active","inactive"]).describe("Current status"),is_default:Ue().describe("Whether this is the Organization Agent for the organization"),connections:G(Ut).describe("Connections with their selected tools (behavior depends on tool_selection_mode)")});fe({title:S().min(1).max(255).describe("Name for the gateway"),description:S().nullable().optional().describe("Optional description"),tool_selection_strategy:Ve.optional().default("passthrough").describe("Gateway behavior strategy (defaults to 'passthrough')"),tool_selection_mode:Oe.optional().default("inclusion").describe("Tool selection mode (defaults to 'inclusion')"),icon:S().nullable().optional().describe("Optional icon URL"),status:ye(["active","inactive"]).optional().default("active").describe("Initial status"),is_default:Ue().optional().default(!1).describe("Whether this is the Organization Agent for the organization"),connections:G(fe({connection_id:S().describe("Connection ID"),selected_tools:G(S()).nullable().optional().describe("Selected tool names (null/undefined = all tools or full exclusion)"),selected_resources:G(S()).nullable().optional().describe("Selected resource URIs or patterns with * and ** wildcards (null/undefined = all resources)"),selected_prompts:G(S()).nullable().optional().describe("Selected prompt names (null/undefined = all prompts or full exclusion)")})).describe("Connections to include/exclude (can be empty for exclusion mode)")});fe({title:S().min(1).max(255).optional().describe("New name"),description:S().nullable().optional().describe("New description (null to clear)"),tool_selection_strategy:Ve.optional().describe("New gateway behavior strategy"),tool_selection_mode:Oe.optional().describe("New tool selection mode"),icon:S().nullable().optional().describe("New icon URL (null to clear)"),status:ye(["active","inactive"]).optional().describe("New status"),is_default:Ue().optional().describe("Set as Organization Agent for the organization"),connections:G(fe({connection_id:S().describe("Connection ID"),selected_tools:G(S()).nullable().optional().describe("Selected tool names (null/undefined = all tools or full exclusion)"),selected_resources:G(S()).nullable().optional().describe("Selected resource URIs or patterns with * and ** wildcards (null/undefined = all resources)"),selected_prompts:G(S()).nullable().optional().describe("Selected prompt names (null/undefined = all prompts or full exclusion)")})).optional().describe("New connections (replaces existing)")});const Ot=I.memo(function(e){const s=W.c(20),{connection:l,isSelected:a,hasItemsEnabled:i,activeItemsCount:x,totalItemsCount:d,onSelect:m,onToggle:n}=e,c=a?"bg-accent/50":"hover:bg-muted/50";let u;s[0]!==c?(u=te("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",c),s[0]=c,s[1]=u):u=s[1];let r;s[2]!==l.icon||s[3]!==l.title?(r=t.jsx(Me,{icon:l.icon,name:l.title,size:"xs"}),s[2]=l.icon,s[3]=l.title,s[4]=r):r=s[4];let g;s[5]!==l.title?(g=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:l.title})}),s[5]=l.title,s[6]=g):g=s[6];let f;s[7]!==m||s[8]!==r||s[9]!==g?(f=t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:m,children:[r,g]}),s[7]=m,s[8]=r,s[9]=g,s[10]=f):f=s[10];let p;s[11]!==x||s[12]!==i||s[13]!==n||s[14]!==d?(p=d>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[x,"/",d]}),t.jsx(Je,{checked:i,onCheckedChange:n,onClick:Ft})]}),s[11]=x,s[12]=i,s[13]=n,s[14]=d,s[15]=p):p=s[15];let j;return s[16]!==u||s[17]!==f||s[18]!==p?(j=t.jsxs("div",{className:u,children:[f,p]}),s[16]=u,s[17]=f,s[18]=p,s[19]=j):j=s[19],j}),Vt=I.memo(function(e){const s=W.c(18),{connectionId:l,item:a,isSelected:i,onToggle:x}=e,d=`item-${l}-${a.id}`,m=i?"text-foreground":"text-muted-foreground";let n;s[0]!==m?(n=te("text-sm font-medium",m),s[0]=m,s[1]=n):n=s[1];let c;s[2]!==a.name||s[3]!==n?(c=t.jsx("div",{className:"flex items-center gap-2 mb-1",children:t.jsx("span",{className:n,children:a.name})}),s[2]=a.name,s[3]=n,s[4]=c):c=s[4];let u;s[5]!==a.description?(u=a.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:a.description}),s[5]=a.description,s[6]=u):u=s[6];let r;s[7]!==c||s[8]!==u?(r=t.jsxs("div",{className:"flex-1 min-w-0",children:[c,u]}),s[7]=c,s[8]=u,s[9]=r):r=s[9];const g=`item-${l}-${a.id}`;let f;s[10]!==i||s[11]!==x||s[12]!==g?(f=t.jsx("div",{className:"flex items-center shrink-0",children:t.jsx(Je,{id:g,checked:i,onCheckedChange:x,onClick:Gt})}),s[10]=i,s[11]=x,s[12]=g,s[13]=f):f=s[13];let p;return s[14]!==d||s[15]!==r||s[16]!==f?(p=t.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:d,children:[r,f]}),s[14]=d,s[15]=r,s[16]=f,s[17]=p):p=s[17],p});function lt({itemSet:o,onItemSetChange:e,getItems:s,itemLabel:l,emptyItemsMessage:a,extraContent:i}){const[x,d]=I.useState(""),m=I.useDeferredValue(x),[n,c]=I.useState("all"),[u,r]=I.useState(!1),g=I.useRef(new Set(Object.keys(o))),f=qe({searchTerm:m.trim()||void 0}),p=g.current,j=[...p.values()].map(h=>f.find(_=>_.id===h)).filter(h=>h!==void 0),y=f.filter(h=>!p.has(h.id)),v=[...j,...y],b=h=>{const _=o[h];return _!==void 0&&_.length>0},C=v.filter(h=>{if(n==="all")return!0;const _=b(h.id);return n==="selected"?_:n==="unselected"?!_:!0}),[N,k]=I.useState(v[0]?.id??null),w=N?v.find(h=>h.id===N)??null:null,E=w?s(w):[],A=(h,_)=>o[h]?.includes(_)??!1,B=(h,_)=>{const $=o[h]??[],z=$.includes(_),U={...o};if(z){const P=$.filter(M=>M!==_);P.length===0?delete U[h]:U[h]=P}else U[h]=[...$,_];e(U)},Z=h=>{const _=v.find(D=>D.id===h);if(!_)return;const $=s(_);if($.length===0)return;const z=o[h]??[],U=$.map(D=>D.id),P=z.length>0&&U.every(D=>z.includes(D)),M={...o};P?delete M[h]:(M[h]=U,k(h)),e(M)},O=h=>{k(h),r(!0)},V=()=>{r(!1)};return t.jsxs("div",{className:"flex h-full",children:[t.jsxs("div",{className:te("w-full md:w-80 border-r border-border flex flex-col",u&&"hidden md:flex"),children:[t.jsx(ft,{value:x,onChange:d,placeholder:"Search Connections..."}),t.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[t.jsx("button",{onClick:()=>c("all"),className:te("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",n==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),t.jsx("button",{onClick:()=>c("selected"),className:te("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",n==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),t.jsx("button",{onClick:()=>c("unselected"),className:te("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",n==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),t.jsx("div",{className:"flex-1 overflow-auto",children:C.length===0?t.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:x?"No connections found":n==="selected"?"No servers selected":n==="unselected"?"No unselected servers":"No connections available"}):t.jsx("div",{className:"p-2 space-y-1",children:C.map(h=>{const $=s(h).length,z=o[h.id]?.length??0;return t.jsx(Ot,{connection:h,isSelected:N===h.id,hasItemsEnabled:b(h.id),activeItemsCount:z,totalItemsCount:$,onSelect:()=>O(h.id),onToggle:()=>Z(h.id)},h.id)})})})]}),t.jsx("div",{className:te("flex-1 flex-col",u?"flex":"hidden md:flex"),children:w?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(L,{variant:"ghost",size:"sm",onClick:V,className:"h-8 w-8 p-0 shrink-0",children:t.jsx(ut,{size:20})}),t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx(Me,{icon:w.icon,name:w.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:w.title}),w.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:w.description})]})]})]}),i,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:a||`This connection has no ${l} available`}):t.jsx("div",{className:"space-y-2",children:E.map(h=>t.jsx(Vt,{connectionId:w.id,item:h,isSelected:A(w.id,h.id),onToggle:()=>B(w.id,h.id)},h.id))})})]}):t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Select a connection to view its ",l]})})})]})}function Ft(o){return o.stopPropagation()}function Gt(o){return o.stopPropagation()}function Lt(o){const e=W.c(6),{promptSet:s,onPromptSetChange:l,connectionPrompts:a}=o;let i;e[0]!==a?(i=m=>(a.get(m.id)??[]).map(Wt),e[0]=a,e[1]=i):i=e[1];const x=i;let d;return e[2]!==x||e[3]!==l||e[4]!==s?(d=t.jsx(lt,{itemSet:s,onItemSetChange:l,getItems:x,itemLabel:"prompts",emptyItemsMessage:"This connection has no prompts available"}),e[2]=x,e[3]=l,e[4]=s,e[5]=d):d=e[5],d}function Wt(o){return{id:o.name,name:o.name,description:o.description}}function Bt(o){return o.includes("*")}function qt(o){const e=W.c(27),{patterns:s,onAddPattern:l,onRemovePattern:a}=o,[i,x]=I.useState("");let d;e[0]!==i||e[1]!==l||e[2]!==s?(d=()=>{const r=i.trim();r&&!s.includes(r)&&(l(r),x(""))},e[0]=i,e[1]=l,e[2]=s,e[3]=d):d=e[3];const m=d;let n;e[4]!==m?(n=r=>{r.key==="Enter"&&(r.preventDefault(),m())},e[4]=m,e[5]=n):n=e[5];const c=n;let u;if(e[6]!==m||e[7]!==c||e[8]!==i||e[9]!==a||e[10]!==s){const r=s.filter(Bt);let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("code",{children:"*"}),e[12]=g):g=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsxs("div",{className:"text-xs text-muted-foreground",children:["Add URI patterns to match multiple resources. Use ",g," for single segment and ",t.jsx("code",{children:"**"})," for multiple segments."]}),e[13]=f):f=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=k=>x(k.target.value),e[14]=p):p=e[14];let j;e[15]!==c||e[16]!==i?(j=t.jsx($e,{value:i,onChange:p,onKeyDown:c,placeholder:"e.g., file:///**/*.ts or db://users/*",className:"flex-1 text-sm"}),e[15]=c,e[16]=i,e[17]=j):j=e[17];let y;e[18]!==i?(y=i.trim(),e[18]=i,e[19]=y):y=e[19];const v=!y;let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(ht,{size:16}),e[20]=b):b=e[20];let C;e[21]!==m||e[22]!==v?(C=t.jsx(L,{type:"button",variant:"outline",size:"sm",onClick:m,disabled:v,children:b}),e[21]=m,e[22]=v,e[23]=C):C=e[23];let N;e[24]!==C||e[25]!==j?(N=t.jsxs("div",{className:"flex gap-2",children:[j,C]}),e[24]=C,e[25]=j,e[26]=N):N=e[26],u=t.jsxs("div",{className:"border-b border-border p-4 space-y-3",children:[f,N,r.length>0&&t.jsx("div",{className:"flex flex-wrap gap-2",children:r.map(k=>t.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-muted rounded-md text-xs",children:[t.jsx("code",{className:"text-foreground",children:k}),t.jsx("button",{type:"button",onClick:()=>a(k),className:"text-muted-foreground hover:text-foreground",children:t.jsx(xt,{size:12})})]},k))})]}),e[6]=m,e[7]=c,e[8]=i,e[9]=a,e[10]=s,e[11]=u}else u=e[11];return u}function Ht(o){const e=W.c(23),{resourceSet:s,onResourceSetChange:l,connectionResources:a}=o,[i]=I.useState(null);let x;e[0]!==a?(x=b=>(a.get(b.id)??[]).map(Jt),e[0]=a,e[1]=x):x=e[1];const d=x;let m;e[2]!==l||e[3]!==s?(m=(b,C)=>{const N=s[b]??[];N.includes(C)||l({...s,[b]:[...N,C]})},e[2]=l,e[3]=s,e[4]=m):m=e[4];const n=m;let c;e[5]!==l||e[6]!==s?(c=(b,C)=>{const k=(s[b]??[]).filter(w=>w!==C);if(k.length===0){const w={...s};delete w[b],l(w)}else l({...s,[b]:k})},e[5]=l,e[6]=s,e[7]=c):c=e[7];const u=c;let r;e[8]!==l?(r=b=>{l(b)},e[8]=l,e[9]=r):r=e[9];const g=r;let f;e[10]!==s||e[11]!==i?(f=i?s[i]??[]:[],e[10]=s,e[11]=i,e[12]=f):f=e[12];const p=f;let j;e[13]!==n||e[14]!==u||e[15]!==i||e[16]!==p?(j=i?t.jsx(qt,{patterns:p,onAddPattern:b=>n(i,b),onRemovePattern:b=>u(i,b)}):null,e[13]=n,e[14]=u,e[15]=i,e[16]=p,e[17]=j):j=e[17];const y=j;let v;return e[18]!==y||e[19]!==d||e[20]!==g||e[21]!==s?(v=t.jsx("div",{className:"h-full",children:t.jsx(lt,{itemSet:s,onItemSetChange:g,getItems:d,itemLabel:"resources",emptyItemsMessage:"This connection has no resources available",extraContent:y})}),e[18]=y,e[19]=d,e[20]=g,e[21]=s,e[22]=v):v=e[22],v}function Jt(o){return{id:o.uri,name:o.name||o.uri,description:o.description||o.uri}}function Qt(o){const s=new TextEncoder().encode(o),l=Array.from(s,a=>String.fromCharCode(a)).join("");return btoa(l)}function Zt(o){const e=W.c(52),{serverName:s,gatewayUrl:l}=o,[a,i]=I.useState(!1),[x,d]=I.useState(null),m=wt(s);let n,c,u,r;if(e[0]!==l||e[1]!==m){const R={type:"http",url:l},he={[m]:R};n=JSON.stringify(he,null,2);const se=pe=>JSON.stringify({...R,headers:{"x-mesh-client":pe}},null,2),oe=Qt(se("Cursor"));c=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(m)}&config=${encodeURIComponent(oe)}`;const xe=se("Claude Code");u=m;let Q;e[6]===Symbol.for("react.memo_cache_sentinel")?(Q=/'/g,e[6]=Q):Q=e[6],r=xe.replace(Q,"'\\''"),e[0]=l,e[1]=m,e[2]=n,e[3]=c,e[4]=u,e[5]=r}else n=e[2],c=e[3],u=e[4],r=e[5];const g=`claude mcp add "${u}" --config '${r}'`;let f;e[7]!==n?(f=async()=>{await navigator.clipboard.writeText(n),i(!0),Ae.success("Configuration copied to clipboard"),setTimeout(()=>i(!1),2e3)},e[7]=n,e[8]=f):f=e[8];const p=f;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=async(R,he)=>{await navigator.clipboard.writeText(R),d(he),Ae.success(`${he} command copied`),setTimeout(()=>d(null),2e3)},e[9]=j):j=e[9];const y=j,v=Kt;let b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mb-1",children:"Install in your IDE"})}),e[10]=b):b=e[10];let C;e[11]!==a?(C=a?t.jsx(De,{size:14}):t.jsx(et,{size:14}),e[11]=a,e[12]=C):C=e[12];let N;e[13]!==p||e[14]!==C?(N=t.jsx(Y,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 shrink-0",onClick:p,children:C})}),e[13]=p,e[14]=C,e[15]=N):N=e[15];let k;e[16]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(ee,{children:"Copy configuration"}),e[16]=k):k=e[16];let w;e[17]!==N?(w=t.jsx("div",{className:"absolute top-2 right-2",children:t.jsx(K,{children:t.jsxs(X,{children:[N,k]})})}),e[17]=N,e[18]=w):w=e[18];let E;e[19]!==n||e[20]!==p?(E=t.jsx("pre",{className:"text-xs font-mono text-foreground overflow-auto max-h-40 whitespace-pre-wrap wrap-break-word cursor-pointer",onClick:p,children:n}),e[19]=n,e[20]=p,e[21]=E):E=e[21];let A;e[22]!==E||e[23]!==w?(A=t.jsxs("div",{className:"relative flex flex-col gap-2 p-3 bg-muted/50 rounded-lg",children:[w,E]}),e[22]=E,e[23]=w,e[24]=A):A=e[24];let B;e[25]!==c?(B=()=>v(c),e[25]=c,e[26]=B):B=e[26];let Z,O;e[27]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-6 w-6",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),O=t.jsx("span",{className:"text-sm font-medium",children:"Cursor"}),e[27]=Z,e[28]=O):(Z=e[27],O=e[28]);let V;e[29]!==B?(V=t.jsx(Y,{asChild:!0,children:t.jsxs(L,{variant:"outline",className:"h-auto py-3 px-4 justify-center gap-2 flex-1 min-w-fit",onClick:B,children:[Z,O]})}),e[29]=B,e[30]=V):V=e[30];let h;e[31]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(ee,{children:"Add to Cursor"}),e[31]=h):h=e[31];let _;e[32]!==V?(_=t.jsx(K,{children:t.jsxs(X,{children:[V,h]})}),e[32]=V,e[33]=_):_=e[33];let $;e[34]!==g?($=()=>y(g,"Claude"),e[34]=g,e[35]=$):$=e[35];let z,U;e[36]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-6 w-6",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),U=t.jsx("span",{className:"text-sm font-medium",children:"Claude Code"}),e[36]=z,e[37]=U):(z=e[36],U=e[37]);let P;e[38]!==x?(P=x==="Claude"&&t.jsx(De,{size:14,className:"ml-2 text-green-500"}),e[38]=x,e[39]=P):P=e[39];let M;e[40]!==$||e[41]!==P?(M=t.jsx(Y,{asChild:!0,children:t.jsxs(L,{variant:"outline",className:"h-auto py-3 px-4 justify-center gap-2 flex-1 min-w-fit",onClick:$,children:[z,U,P]})}),e[40]=$,e[41]=P,e[42]=M):M=e[42];let D;e[43]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(ee,{children:"Add to Claude Code"}),e[43]=D):D=e[43];let q;e[44]!==M?(q=t.jsx(K,{children:t.jsxs(X,{children:[M,D]})}),e[44]=M,e[45]=q):q=e[45];let H;e[46]!==_||e[47]!==q?(H=t.jsxs("div",{className:"flex flex-wrap gap-2",children:[_,q]}),e[46]=_,e[47]=q,e[48]=H):H=e[48];let J;return e[49]!==A||e[50]!==H?(J=t.jsxs("div",{className:"flex flex-col gap-4",children:[b,A,H]}),e[49]=A,e[50]=H,e[51]=J):J=e[51],J}function Kt(o){window.open(o,"_blank")}const Xt=Mt.pick({title:!0,description:!0,status:!0,tool_selection_mode:!0,tool_selection_strategy:!0}).extend({title:S().min(1,"Name is required").max(255)});function Ge(o,e){const s={};for(const l of o.connections)if(l.selected_tools===null){const a=e.get(l.connection_id)??[];a.length>0&&(s[l.connection_id]=a)}else l.selected_tools.length>0&&(s[l.connection_id]=l.selected_tools);return s}function Le(o){const e={};for(const s of o.connections)s.selected_resources!==null&&s.selected_resources!==void 0&&s.selected_resources.length>0&&(e[s.connection_id]=s.selected_resources);return e}function We(o){const e={};for(const s of o.connections)s.selected_prompts!==null&&s.selected_prompts!==void 0&&s.selected_prompts.length>0&&(e[s.connection_id]=s.selected_prompts);return e}function Yt(o,e,s,l){const a=new Set([...Object.keys(o),...Object.keys(e),...Object.keys(s)]);return Array.from(a).map(i=>{const x=o[i]??[],d=l.get(i)??[],m=d.length>0&&d.every(n=>x.includes(n));return{connection_id:i,selected_tools:x.length===0||m?null:x,selected_resources:e[i]??null,selected_prompts:s[i]??null}})}function es(o){const e=W.c(27),{open:s,onOpenChange:l,gateway:a}=o,[i,x]=I.useState(!1),d=`${window.location.origin}/mcp/gateway/${a.id}`;let m;e[0]!==d?(m=async()=>{await navigator.clipboard.writeText(d),x(!0),Ae.success("Agent URL copied to clipboard"),setTimeout(()=>x(!1),2e3)},e[0]=d,e[1]=m):m=e[1];const n=m;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Nt,{children:t.jsx(It,{children:"Share Agent"})}),e[2]=c):c=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsxs("div",{children:[t.jsx("h4",{className:"text-sm font-medium text-foreground mb-1",children:"Agent URL"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Share this URL to connect to the agent"})]}),e[3]=u):u=e[3];let r;e[4]!==d?(r=t.jsx($e,{value:d,readOnly:!0,className:"font-mono text-xs"}),e[4]=d,e[5]=r):r=e[5];let g;e[6]!==i?(g=i?t.jsx(De,{size:16}):t.jsx(et,{size:16}),e[6]=i,e[7]=g):g=e[7];let f;e[8]!==n||e[9]!==g?(f=t.jsx(L,{type:"button",variant:"outline",size:"icon",onClick:n,className:"shrink-0",children:g}),e[8]=n,e[9]=g,e[10]=f):f=e[10];let p;e[11]!==r||e[12]!==f?(p=t.jsxs("div",{className:"flex flex-col gap-3",children:[u,t.jsxs("div",{className:"flex gap-2",children:[r,f]})]}),e[11]=r,e[12]=f,e[13]=p):p=e[13];let j;e[14]!==a.id||e[15]!==a.title?(j=a.title||`agent-${a.id.slice(0,8)}`,e[14]=a.id,e[15]=a.title,e[16]=j):j=e[16];let y;e[17]!==d||e[18]!==j?(y=t.jsx("div",{className:"border-t border-border pt-6",children:t.jsx(Zt,{serverName:j,gatewayUrl:d})}),e[17]=d,e[18]=j,e[19]=y):y=e[19];let v;e[20]!==p||e[21]!==y?(v=t.jsxs(kt,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[c,t.jsxs("div",{className:"flex flex-col gap-6",children:[p,y]})]}),e[20]=p,e[21]=y,e[22]=v):v=e[22];let b;return e[23]!==l||e[24]!==s||e[25]!==v?(b=t.jsx(Tt,{open:s,onOpenChange:l,children:v}),e[23]=l,e[24]=s,e[25]=v,e[26]=b):b=e[26],b}function ts(o){const e=W.c(31),{form:s,icon:l,gatewayId:a}=o,[i,x]=Ct(a);let d;e[0]!==s?(d=s.watch("title")||"Agent",e[0]=s,e[1]=d):d=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(vt,{}),e[2]=m):m=e[2];let n;e[3]!==l||e[4]!==d?(n=t.jsx(Me,{icon:l,name:d,size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:m}),e[3]=l,e[4]=d,e[5]=n):n=e[5];let c;e[6]!==s.control?(c=t.jsx(be,{control:s.control,name:"status",render:is}),e[6]=s.control,e[7]=c):c=e[7];let u;e[8]!==n||e[9]!==c?(u=t.jsxs("div",{className:"flex items-start justify-between",children:[n,c]}),e[8]=n,e[9]=c,e[10]=u):u=e[10];let r;e[11]!==s.control?(r=t.jsxs("div",{className:"flex flex-col",children:[t.jsx(be,{control:s.control,name:"title",render:ns}),t.jsx(be,{control:s.control,name:"description",render:ls})]}),e[11]=s.control,e[12]=r):r=e[12];let g;e[13]!==u||e[14]!==r?(g=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[u,r]}),e[13]=u,e[14]=r,e[15]=g):g=e[15];let f;e[16]!==s.control?(f=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[t.jsx(be,{control:s.control,name:"tool_selection_mode",render:os}),t.jsx(be,{control:s.control,name:"tool_selection_strategy",render:ss})]}),e[16]=s.control,e[17]=f):f=e[17];let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsxs("div",{children:[t.jsx("h4",{className:"text-sm font-medium text-foreground mb-1",children:"System Prompt"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Stored locally for now"})]}),e[18]=p):p=e[18];let j;e[19]!==x?(j=C=>x(C.target.value),e[19]=x,e[20]=j):j=e[20];let y;e[21]!==i||e[22]!==j?(y=t.jsxs("div",{className:"flex flex-col gap-3 p-5",children:[p,t.jsx(Pt,{value:i,onChange:j,placeholder:"Enter system prompt instructions...",className:"min-h-[240px] resize-none text-sm leading-relaxed"})]}),e[21]=i,e[22]=j,e[23]=y):y=e[23];let v;e[24]!==y||e[25]!==g||e[26]!==f?(v=t.jsxs("div",{className:"flex flex-col",children:[g,f,y]}),e[24]=y,e[25]=g,e[26]=f,e[27]=v):v=e[27];let b;return e[28]!==s||e[29]!==v?(b=t.jsx("div",{className:"flex flex-col h-full overflow-auto",children:t.jsx($t,{...s,children:v})}),e[28]=s,e[29]=v,e[30]=b):b=e[30],b}function ss(o){const{field:e}=o;return t.jsxs(ve,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx(Qe,{className:"mb-0",children:"Agent Strategy"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(K,{children:t.jsxs(X,{children:[t.jsx(Y,{asChild:!0,children:t.jsx(L,{type:"button",variant:"ghost",size:"icon",className:"size-7","aria-label":"Agent strategy help",children:t.jsx(tt,{size:14,className:"text-muted-foreground"})})}),t.jsx(ee,{side:"left",className:"max-w-sm",children:t.jsxs("div",{className:"text-xs space-y-1",children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Passthrough:"})," Pass tools through as-is (default)."]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Smart Tool Selection:"})," ","Intelligent tool selection behavior."]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Code Execution:"})," Code execution behavior."]})]})})]})}),t.jsxs(Ze,{value:e.value,onValueChange:e.onChange,children:[t.jsx(_e,{children:t.jsx(Ke,{className:"w-[180px]",children:t.jsx(Xe,{})})}),t.jsxs(Ye,{children:[t.jsx(je,{value:"passthrough",children:"Passthrough"}),t.jsx(je,{value:"smart_tool_selection",children:"Smart Tool Selection"}),t.jsx(je,{value:"code_execution",children:"Code Execution"})]})]})]})]}),t.jsx(Se,{})]})}function os(o){const{field:e}=o;return t.jsxs(ve,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx(Qe,{className:"mb-0",children:"Selection Mode"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(K,{children:t.jsxs(X,{children:[t.jsx(Y,{asChild:!0,children:t.jsx(L,{type:"button",variant:"ghost",size:"icon",className:"size-7","aria-label":"Selection mode help",children:t.jsx(tt,{size:14,className:"text-muted-foreground"})})}),t.jsx(ee,{side:"left",className:"max-w-sm",children:t.jsxs("div",{className:"text-xs space-y-1",children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Include:"})," Only selected items are exposed."]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Exclude:"})," All items except selected ones are exposed."]})]})})]})}),t.jsxs(Ze,{value:e.value,onValueChange:e.onChange,children:[t.jsx(_e,{children:t.jsx(Ke,{className:"w-[180px]",children:t.jsx(Xe,{})})}),t.jsxs(Ye,{children:[t.jsx(je,{value:"inclusion",children:"Include Selected"}),t.jsx(je,{value:"exclusion",children:"Exclude Selected"})]})]})]})]}),t.jsx(Se,{})]})}function ls(o){const{field:e}=o;return t.jsxs(ve,{className:"w-full space-y-0",children:[t.jsx(_e,{children:t.jsx($e,{...e,value:e.value||"",className:"h-auto text-base text-muted-foreground leading-6 px-0 border-transparent hover:border-input focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})}),t.jsx(Se,{})]})}function ns(o){const{field:e}=o;return t.jsxs(ve,{className:"w-full space-y-0",children:[t.jsx(_e,{children:t.jsx($e,{...e,className:"h-auto text-lg! font-medium leading-7 px-0 border-transparent hover:border-input focus:border-input bg-transparent transition-all",placeholder:"Agent Name"})}),t.jsx(Se,{})]})}function is(o){const{field:e}=o;return t.jsxs(ve,{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:e.value==="active"?"Active":"Inactive"}),t.jsx(_e,{children:t.jsx(bt,{checked:e.value==="active",onCheckedChange:s=>e.onChange(s?"active":"inactive")})})]}),t.jsx(Se,{})]})}function rs(o){const e=W.c(82),{gateway:s,gatewayId:l,requestedTabId:a}=o,x=rt().location.href,d=at();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={from:"/$org/gateways/$gatewayId"},e[0]=m):m=e[0];const n=Be(m),c=yt();let u;e[1]===Symbol.for("react.memo_cache_sentinel")?(u={},e[1]=u):u=e[1];const r=qe(u);let g;e[2]!==r?(g=r.map(cs),e[2]=r,e[3]=g):g=e[3];const f=g,{promptsMap:p}=_t(f),{resourcesMap:j}=St(f);let y;if(e[4]!==r){y=new Map;for(const T of r)T.tools&&T.tools.length>0&&y.set(T.id,T.tools.map(as));e[4]=r,e[5]=y}else y=e[5];let v;e[6]!==y||e[7]!==s?(v=()=>Ge(s,y),e[6]=y,e[7]=s,e[8]=v):v=e[8];const[b,C]=I.useState(v);let N;e[9]!==s?(N=()=>Le(s),e[9]=s,e[10]=N):N=e[10];const[k,w]=I.useState(N);let E;e[11]!==s?(E=()=>We(s),e[11]=s,e[12]=E):E=e[12];const[A,B]=I.useState(E),[Z,O]=I.useState(!1),[V,h]=I.useState(!1);let _;e[13]===Symbol.for("react.memo_cache_sentinel")?(_=T=>{C(T),O(!0)},e[13]=_):_=e[13];const $=_;let z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=T=>{w(T),O(!0)},e[14]=z):z=e[14];const U=z;let P;e[15]===Symbol.for("react.memo_cache_sentinel")?(P=T=>{B(T),O(!0)},e[15]=P):P=e[15];const M=P;let D;e[16]===Symbol.for("react.memo_cache_sentinel")?(D=ct(Xt),e[16]=D):D=e[16];const q=s.tool_selection_mode??"inclusion",H=s.tool_selection_strategy??"passthrough";let J;e[17]!==s.description||e[18]!==s.status||e[19]!==s.title||e[20]!==q||e[21]!==H?(J={resolver:D,defaultValues:{title:s.title,description:s.description,status:s.status,tool_selection_mode:q,tool_selection_strategy:H}},e[17]=s.description,e[18]=s.status,e[19]=s.title,e[20]=q,e[21]=H,e[22]=J):J=e[22];const R=dt(J),se=R.formState.isDirty||Z;let oe;e[23]!==c.update||e[24]!==y||e[25]!==R||e[26]!==l||e[27]!==A||e[28]!==k||e[29]!==b?(oe=async()=>{const T=R.getValues(),Re=Yt(b,k,A,y);await c.update.mutateAsync({id:l,data:{title:T.title,description:T.description,status:T.status,tool_selection_mode:T.tool_selection_mode,tool_selection_strategy:T.tool_selection_strategy,connections:Re}}),R.reset(T),O(!1)},e[23]=c.update,e[24]=y,e[25]=R,e[26]=l,e[27]=A,e[28]=k,e[29]=b,e[30]=oe):oe=e[30];const xe=oe;let Q;e[31]!==y||e[32]!==R||e[33]!==s?(Q=()=>{R.reset({title:s.title,description:s.description,status:s.status,tool_selection_mode:s.tool_selection_mode??"inclusion",tool_selection_strategy:s.tool_selection_strategy??"passthrough"}),C(Ge(s,y)),w(Le(s)),B(We(s)),O(!1)},e[31]=y,e[32]=R,e[33]=s,e[34]=Q):Q=e[34];const pe=Q;let Ce;e[35]===Symbol.for("react.memo_cache_sentinel")?(Ce=[{id:"settings",label:"Settings"},{id:"tools",label:"Tools"},{id:"resources",label:"Resources"},{id:"prompts",label:"Prompts"}],e[35]=Ce):Ce=e[35];const Fe=Ce,F=Fe.some(T=>T.id===a)?a:"settings";let we;e[36]!==n?(we=T=>{n({search:Re=>({...Re,tab:T}),replace:!0})},e[36]=n,e[37]=we):we=e[37];const ze=we,ge=c.update.isPending;let le;e[38]!==d.history?(le=()=>d.history.back(),e[38]=d.history,e[39]=le):le=e[39];let ne;e[40]!==F||e[41]!==ze?(ne=t.jsx(At,{children:t.jsx(zt,{tabs:Fe,activeTab:F,onTabChange:ze})}),e[40]=F,e[41]=ze,e[42]=ne):ne=e[42];let ie;e[43]!==pe||e[44]!==xe||e[45]!==se||e[46]!==ge?(ie=se&&t.jsxs(t.Fragment,{children:[t.jsx(K,{children:t.jsxs(X,{delayDuration:0,children:[t.jsx(Y,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(L,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:ge,onClick:pe,"aria-label":"Cancel",children:t.jsx(Rt,{size:14})})})}),t.jsx(ee,{side:"bottom",children:"Cancel"})]})}),t.jsx(K,{children:t.jsxs(X,{delayDuration:0,children:[t.jsx(Y,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(L,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:ge,onClick:xe,"aria-label":"Save",children:ge?t.jsx(Ee,{size:14,className:"animate-spin"}):t.jsx(st,{size:14})})})}),t.jsx(ee,{side:"bottom",children:"Save"})]})})]}),e[43]=pe,e[44]=xe,e[45]=se,e[46]=ge,e[47]=ie):ie=e[47];let Ne;e[48]===Symbol.for("react.memo_cache_sentinel")?(Ne=()=>h(!0),e[48]=Ne):Ne=e[48];let Ie;e[49]===Symbol.for("react.memo_cache_sentinel")?(Ie=t.jsx(K,{children:t.jsxs(X,{delayDuration:0,children:[t.jsx(Y,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(L,{variant:"outline",size:"icon",className:"size-7 border border-input",onClick:Ne,"aria-label":"Share",children:t.jsx(ot,{size:14})})})}),t.jsx(ee,{side:"bottom",children:"Share"})]})}),e[49]=Ie):Ie=e[49];const Pe=s.icon??"cpu_chip";let re;e[50]!==s.title||e[51]!==Pe||e[52]!==x?(re=t.jsx(pt,{title:s.title,url:x,icon:Pe}),e[50]=s.title,e[51]=Pe,e[52]=x,e[53]=re):re=e[53];let ae;e[54]!==ie||e[55]!==re?(ae=t.jsxs(Dt,{children:[ie,Ie,re]}),e[54]=ie,e[55]=re,e[56]=ae):ae=e[56];let ke;e[57]===Symbol.for("react.memo_cache_sentinel")?(ke=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Ee,{size:32,className:"animate-spin text-muted-foreground"})}),e[57]=ke):ke=e[57];let ce;e[58]!==F||e[59]!==p||e[60]!==j||e[61]!==R||e[62]!==s.icon||e[63]!==l||e[64]!==A||e[65]!==k||e[66]!==b?(ce=F==="settings"?t.jsx(ts,{form:R,icon:s.icon,gatewayId:l}):F==="tools"?t.jsx(gt,{toolSet:b,onToolSetChange:$}):F==="resources"?t.jsx(Ht,{resourceSet:k,onResourceSetChange:U,connectionResources:j}):F==="prompts"?t.jsx(Lt,{promptSet:A,onPromptSetChange:M,connectionPrompts:p}):null,e[58]=F,e[59]=p,e[60]=j,e[61]=R,e[62]=s.icon,e[63]=l,e[64]=A,e[65]=k,e[66]=b,e[67]=ce):ce=e[67];let de;e[68]!==ce?(de=t.jsx(I.Suspense,{fallback:ke,children:ce}),e[68]=ce,e[69]=de):de=e[69];let me;e[70]!==F||e[71]!==de?(me=t.jsx("div",{className:"flex h-full w-full bg-background overflow-hidden",children:t.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-hidden",children:t.jsx("div",{className:"h-full overflow-auto",children:t.jsx(He,{children:de},F)})})}),e[70]=F,e[71]=de,e[72]=me):me=e[72];let ue;e[73]!==s||e[74]!==V?(ue=t.jsx(es,{open:V,onOpenChange:h,gateway:s}),e[73]=s,e[74]=V,e[75]=ue):ue=e[75];let Te;return e[76]!==le||e[77]!==ne||e[78]!==ae||e[79]!==me||e[80]!==ue?(Te=t.jsxs(Et,{onBack:le,children:[ne,ae,me,ue]}),e[76]=le,e[77]=ne,e[78]=ae,e[79]=me,e[80]=ue,e[81]=Te):Te=e[81],Te}function as(o){return o.name}function cs(o){return o.id}function ds(){const o=W.c(10);let e;o[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/gateways/$gatewayId"},o[0]=e):e=o[0];const s=Be(e);let l;o[1]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/gateways/$gatewayId"},o[1]=l):l=o[1];const{gatewayId:a,org:i}=nt(l);let x;o[2]===Symbol.for("react.memo_cache_sentinel")?(x={from:"/shell/$org/gateways/$gatewayId"},o[2]=x):x=o[2];const m=it(x).tab||"settings",n=jt(a);if(!n){let u;return o[3]!==s||o[4]!==i?(u=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(mt,{title:"Agent not found",description:"This Agent may have been deleted or you may not have access.",actions:t.jsx(L,{variant:"outline",onClick:()=>s({to:"/$org/gateways",params:{org:i}}),children:"Back to agents"})})}),o[3]=s,o[4]=i,o[5]=u):u=o[5],u}let c;return o[6]!==n||o[7]!==a||o[8]!==m?(c=t.jsx(rs,{gateway:n,gatewayId:a,requestedTabId:m}),o[6]=n,o[7]=a,o[8]=m,o[9]=c):c=o[9],c}function ms(){const o=W.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(He,{children:t.jsx(I.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Ee,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(ds,{})})}),o[0]=e):e=o[0],e}function Ws(){const o=W.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ms,{}),o[0]=e):e=o[0],e}export{Ws as default};
@@ -0,0 +1 @@
1
+ import{c as te,j as t,r as se,h as ne,t as re}from"./index-DwHtQhMK.js";import{C as ie}from"./collection-header-Dgpak6RG.js";import{C as ae}from"./collection-page-DsXQH-Im.js";import{C as le}from"./collection-search-BLCr2u4s.js";import{C as ce}from"./collection-table-wrapper-lPNgMir7.js";import{C as de}from"./connection-card-ChEaWCU7.js";import{u as me,E as q,I as ue}from"./use-connection-Sf8hW5yA.js";import{E as ge}from"./error-boundary-DF-uZuEV.js";import{a as pe,u as he,i as j}from"./use-gateway-BRb-QnWG.js";import{u as fe,s as Q}from"./use-list-state-CNeFnW0c.js";import{u as xe}from"./project-context-provider-cpEbmTch.js";import{c as je,b as ye,d as we,A as Ce,e as Ne,g as De,a as Se,f as ve}from"./alert-dialog-CLLIrm4F.js";import{B as oe}from"./badge-Bbeqjlvl.js";import{B as J}from"./input-BL_6s-Bq.js";import{b as U,D as X,a as Y,c as G}from"./dropdown-menu-FKTXuLg3.js";import{i as Z}from"./DotsVertical-BP_-eK2T.js";import{i as be}from"./Loading01-DU_er3oJ.js";import{s as ee}from"./Trash01-Dvb7krv8.js";import"./collection-display-button-GYzwE1Yk.js";import"./Grid01-Bt5T8Kvn.js";import"./view-mode-toggle-B5QpL180.js";import"./card-DDRZjhLd.js";import"./use-mobile-DmpRnaSP.js";function ke(e,n){switch(n.type){case"delete":return{mode:"deleting",gateway:n.gateway};case"close":return{mode:"idle"}}}function _e(){const e=te.c(68),{org:n}=xe(),r=ne();let y;e[0]!==n.slug?(y={namespace:n.slug,resource:"gateways"},e[0]=n.slug,e[1]=y):y=e[1];const s=fe(y),i=pe(),x=he(s);let w;e[2]===Symbol.for("react.memo_cache_sentinel")?(w={},e[2]=w):w=e[2];const R=me(w);let C;e[3]===Symbol.for("react.memo_cache_sentinel")?(C={mode:"idle"},e[3]=C):C=e[3];const[a,N]=se.useReducer(ke,C);let D;e[4]!==i.create||e[5]!==R.length||e[6]!==r||e[7]!==n.slug?(D=async()=>{if(R.length===0){re.error("Create at least one Connection first");return}const o=await i.create.mutateAsync({title:"New Agent",description:"Agents let you securely expose integrated tools to the outside world.",status:"active",tool_selection_strategy:"passthrough",tool_selection_mode:"inclusion",connections:[]});r({to:"/$org/gateways/$gatewayId",params:{org:n.slug,gatewayId:o.id}})},e[4]=i.create,e[5]=R.length,e[6]=r,e[7]=n.slug,e[8]=D):D=e[8];const T=D;let S;e[9]!==i.delete||e[10]!==a.gateway||e[11]!==a.mode?(S=async()=>{if(a.mode!=="deleting")return;const o=a.gateway.id;N({type:"close"});try{await i.delete.mutateAsync(o)}catch{}},e[9]=i.delete,e[10]=a.gateway,e[11]=a.mode,e[12]=S):S=e[12];const O=S;let v,b,k,_,I,A;e[13]===Symbol.for("react.memo_cache_sentinel")?(b={id:"icon",header:"",render:Ge,cellClassName:"w-16 shrink-0",wrap:!0},k={id:"title",header:"Name",render:Be,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},_={id:"description",header:"Description",render:Ke,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},I={id:"mode",header:"Mode",accessor:Ee,cellClassName:"w-[100px]"},A={id:"connections",header:"Connections",render:Pe,cellClassName:"w-24 shrink-0"},v={id:"status",header:"Status",render:ze,cellClassName:"w-24 shrink-0",sortable:!0},e[13]=v,e[14]=b,e[15]=k,e[16]=_,e[17]=I,e[18]=A):(v=e[13],b=e[14],k=e[15],_=e[16],I=e[17],A=e[18]);let $;e[19]!==r||e[20]!==n.slug?($=[b,k,_,I,A,v,{id:"actions",header:"",render:o=>t.jsxs(U,{children:[t.jsx(X,{asChild:!0,children:t.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Me,children:t.jsx(Z,{size:20})})}),t.jsxs(Y,{align:"end",onClick:$e,children:[t.jsxs(G,{onClick:l=>{l.stopPropagation(),r({to:"/$org/gateways/$gatewayId",params:{org:n.slug,gatewayId:o.id}})},children:[t.jsx(Q,{size:16}),"Inspect"]}),t.jsxs(G,{variant:"destructive",onClick:l=>{l.stopPropagation(),N({type:"delete",gateway:o})},children:[t.jsx(ee,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[19]=r,e[20]=n.slug,e[21]=$):$=e[21];const V=$,H=i.create.isPending?"Creating...":"Create Agent";let M;e[22]!==i.create.isPending||e[23]!==T||e[24]!==H?(M=t.jsx(J,{onClick:T,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:i.create.isPending,children:H}),e[22]=i.create.isPending,e[23]=T,e[24]=H,e[25]=M):M=e[25];const L=M,F=a.mode==="deleting";let z;e[26]===Symbol.for("react.memo_cache_sentinel")?(z=o=>!o&&N({type:"close"}),e[26]=z):z=e[26];let P;e[27]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(je,{children:"Delete Agent?"}),e[27]=P):P=e[27];const W=a.mode==="deleting"&&a.gateway.title;let c;e[28]!==W?(c=t.jsxs(ye,{children:[P,t.jsxs(we,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:W}),"."]})]}),e[28]=W,e[29]=c):c=e[29];let E;e[30]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(Ce,{children:"Cancel"}),e[30]=E):E=e[30];let d;e[31]!==O?(d=t.jsxs(Ne,{children:[E,t.jsx(De,{onClick:O,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[31]=O,e[32]=d):d=e[32];let m;e[33]!==c||e[34]!==d?(m=t.jsxs(Se,{children:[c,d]}),e[33]=c,e[34]=d,e[35]=m):m=e[35];let u;e[36]!==F||e[37]!==m?(u=t.jsx(ve,{open:F,onOpenChange:z,children:m}),e[36]=F,e[37]=m,e[38]=u):u=e[38];let K;e[39]===Symbol.for("react.memo_cache_sentinel")?(K=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"status",label:"Status"}],e[39]=K):K=e[39];let g;e[40]!==L||e[41]!==s.handleSort||e[42]!==s.setViewMode||e[43]!==s.sortDirection||e[44]!==s.sortKey||e[45]!==s.viewMode?(g=t.jsx(ie,{title:"Agents",viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:K,ctaButton:L}),e[40]=L,e[41]=s.handleSort,e[42]=s.setViewMode,e[43]=s.sortDirection,e[44]=s.sortKey,e[45]=s.viewMode,e[46]=g):g=e[46];let p;e[47]!==s?(p=o=>{o.key==="Escape"&&(s.setSearch(""),o.target.blur())},e[47]=s,e[48]=p):p=e[48];let h;e[49]!==s.search||e[50]!==s.setSearch||e[51]!==p?(h=t.jsx(le,{value:s.search,onChange:s.setSearch,placeholder:"Search for an agent...",onKeyDown:p}),e[49]=s.search,e[50]=s.setSearch,e[51]=p,e[52]=h):h=e[52];let f;e[53]!==V||e[54]!==x||e[55]!==s.handleSort||e[56]!==s.search||e[57]!==s.sortDirection||e[58]!==s.sortKey||e[59]!==s.viewMode||e[60]!==r||e[61]!==n.slug?(f=s.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:x.length===0?t.jsx(q,{image:t.jsx(j,{size:36,className:"text-muted-foreground"}),title:s.search?"No agents found":"No agents yet",description:s.search?`No agents match "${s.search}"`:"Create an agent to aggregate tools from multiple Connections."}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:x.map(o=>t.jsx(de,{connection:{id:o.id,title:o.title,description:o.description,icon:o.icon,status:o.status},fallbackIcon:t.jsx(j,{}),onClick:()=>r({to:"/$org/gateways/$gatewayId",params:{org:n.slug,gatewayId:o.id}}),footer:t.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[t.jsxs("span",{children:[o.connections.length," connection",o.connections.length!==1?"s":""]}),t.jsx("span",{children:"•"}),t.jsx("span",{children:o.tool_selection_mode==="exclusion"?"Exclude":"Include"})]}),headerActions:t.jsxs(U,{children:[t.jsx(X,{asChild:!0,children:t.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ae,children:t.jsx(Z,{size:20})})}),t.jsxs(Y,{align:"end",onClick:Ie,children:[t.jsxs(G,{onClick:l=>{l.stopPropagation(),r({to:"/$org/gateways/$gatewayId",params:{org:n.slug,gatewayId:o.id}})},children:[t.jsx(Q,{size:16}),"Inspect"]}),t.jsxs(G,{variant:"destructive",onClick:l=>{l.stopPropagation(),N({type:"delete",gateway:o})},children:[t.jsx(ee,{size:16}),"Delete"]})]})]})},o.id))})}):t.jsx(ce,{columns:V,data:x,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:o=>r({to:"/$org/gateways/$gatewayId",params:{org:n.slug,gatewayId:o.id}}),emptyState:s.search?t.jsx(q,{image:t.jsx(j,{size:36,className:"text-muted-foreground"}),title:"No agents found",description:`No agents match "${s.search}"`}):t.jsx(q,{image:t.jsx(j,{size:36,className:"text-muted-foreground"}),title:"No agents yet",description:"Create an agent to aggregate tools from multiple Connections."})}),e[53]=V,e[54]=x,e[55]=s.handleSort,e[56]=s.search,e[57]=s.sortDirection,e[58]=s.sortKey,e[59]=s.viewMode,e[60]=r,e[61]=n.slug,e[62]=f):f=e[62];let B;return e[63]!==u||e[64]!==g||e[65]!==h||e[66]!==f?(B=t.jsxs(ae,{children:[u,g,h,f]}),e[63]=u,e[64]=g,e[65]=h,e[66]=f,e[67]=B):B=e[67],B}function Ie(e){return e.stopPropagation()}function Ae(e){return e.stopPropagation()}function $e(e){return e.stopPropagation()}function Me(e){return e.stopPropagation()}function ze(e){return t.jsx(oe,{variant:e.status==="active"?"default":"outline",children:e.status})}function Pe(e){return t.jsx("span",{className:"text-sm text-muted-foreground",children:e.connections.length})}function Ee(e){return t.jsx(oe,{variant:"outline",className:"text-xs",children:e.tool_selection_mode==="exclusion"?"Exclude":"Include"})}function Ke(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function Be(e){return t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})}function Ge(e){return t.jsx(ue,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(j,{size:16})})}function lt(){const e=te.c(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(ge,{children:t.jsx(se.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(be,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(_e,{})})}),e[0]=n):n=e[0],n}export{lt as default};
@@ -1 +1 @@
1
- import{c as u,j as i,a as w,r as C,h as E}from"./index-DsWTyaMI.js";import{C as _}from"./card-DPsjHi5_.js";import{c as v,I as $,B as k}from"./input-Bjw47IqN.js";import{A}from"./avatar-MdaY7dDq.js";import{i as O}from"./AlertCircle-DAyHhLS6.js";import{s as L}from"./Plus-CJASgavw.js";import{C as D}from"./create-organization-dialog-BW64m1n3.js";import"./alert-dialog-F5nkQKBj.js";import"./form-BYRg0fLZ.js";import"./spinner-DZG16LrV.js";function F(t){const e=u.c(10),{children:n,className:l,onNavigate:s,showHoverRing:r}=t,x=r===void 0?!1:r;let o;e[0]!==s?(o=p=>{s&&s(p)},e[0]=s,e[1]=o):o=e[1];const m=o,d=s&&"cursor-pointer",c=x&&"hover:ring-2 hover:ring-primary";let a;e[2]!==l||e[3]!==d||e[4]!==c?(a=v("group transition-all flex flex-col gap-0",d,c,l),e[2]=l,e[3]=d,e[4]=c,e[5]=a):a=e[5];let g;return e[6]!==n||e[7]!==m||e[8]!==a?(g=i.jsx(_,{className:a,onClick:m,children:n}),e[6]=n,e[7]=m,e[8]=a,e[9]=g):g=e[9],g}function H(t){const e=u.c(7),{url:n,fallback:l,shape:s,size:r,objectFit:x,className:o}=t,m=s===void 0?"square":s,d=r===void 0?"lg":r,c=x===void 0?"contain":x;let a;return e[0]!==o||e[1]!==l||e[2]!==c||e[3]!==m||e[4]!==d||e[5]!==n?(a=i.jsx(A,{url:n,fallback:l,shape:m,size:d,objectFit:c,className:o}),e[0]=o,e[1]=l,e[2]=c,e[3]=m,e[4]=d,e[5]=n,e[6]=a):a=e[6],a}function R(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("p-4 flex flex-col gap-4",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function B(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("font-medium truncate",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("p",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function G(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("text-sm text-muted-foreground truncate",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("h3",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function q(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex flex-col gap-[2px]",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function I(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex justify-between items-start",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function M(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("p-4 border-t border-border flex justify-between items-center",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function Q(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex items-center text-xs text-muted-foreground",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function T(){const t=u.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"flex justify-between items-start",children:i.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[e,i.jsxs("div",{className:"flex flex-col gap-[2px]",children:[i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg animate-pulse"}),i.jsx("div",{className:"h-4 w-40 bg-muted rounded-lg animate-pulse"})]})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsxs(_,{className:"group transition-colors flex flex-col",children:[n,i.jsxs("div",{className:"p-4 border-t border-border flex justify-between items-center",children:[i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]}),t[2]=l):l=t[2],l}const b=Object.assign(F,{Avatar:H,AvatarSection:I,Header:R,Title:B,Subtitle:G,Content:q,Footer:M,Badge:Q,Skeleton:T}),P={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8"},V={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8"},X={1:"@min-3xl:grid-cols-1",2:"@min-3xl:grid-cols-2",3:"@min-3xl:grid-cols-3",4:"@min-3xl:grid-cols-4",5:"@min-3xl:grid-cols-5",6:"@min-3xl:grid-cols-6",7:"@min-3xl:grid-cols-7",8:"@min-3xl:grid-cols-8"},J={1:"@min-6xl:grid-cols-1",2:"@min-6xl:grid-cols-2",3:"@min-6xl:grid-cols-3",4:"@min-6xl:grid-cols-4",5:"@min-6xl:grid-cols-5",6:"@min-6xl:grid-cols-6",7:"@min-6xl:grid-cols-7",8:"@min-6xl:grid-cols-8"},K={1:"@min-7xl:grid-cols-1",2:"@min-7xl:grid-cols-2",3:"@min-7xl:grid-cols-3",4:"@min-7xl:grid-cols-4",5:"@min-7xl:grid-cols-5",6:"@min-7xl:grid-cols-6",7:"@min-7xl:grid-cols-7",8:"@min-7xl:grid-cols-8"},U={1:"@min-8xl:grid-cols-1",2:"@min-8xl:grid-cols-2",3:"@min-8xl:grid-cols-3",4:"@min-8xl:grid-cols-4",5:"@min-8xl:grid-cols-5",6:"@min-8xl:grid-cols-6",7:"@min-8xl:grid-cols-7",8:"@min-8xl:grid-cols-8"};function z(t){const e=u.c(13),{children:n,columns:l,gap:s,className:r}=t;let x;e[0]!==l?(x=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=x):x=e[1];const o=x,d=P[s===void 0?4:s],c=o.sm&&V[o.sm],a=o.md&&X[o.md],g=o.lg&&J[o.lg],p=o.xl&&K[o.xl],j=o["2xl"]&&U[o["2xl"]];let h;e[2]!==r||e[3]!==d||e[4]!==c||e[5]!==a||e[6]!==g||e[7]!==p||e[8]!==j?(h=v("w-full grid",d,c,a,g,p,j,r),e[2]=r,e[3]=d,e[4]=c,e[5]=a,e[6]=g,e[7]=p,e[8]=j,e[9]=h):h=e[9];const N=h;let f;return e[10]!==n||e[11]!==N?(f=i.jsx("div",{className:N,children:n}),e[10]=n,e[11]=N,e[12]=f):f=e[12],f}function W(t){const e=u.c(9),{count:n,columns:l,gap:s,className:r}=t,x=n===void 0?8:n;let o;e[0]!==l?(o=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=o):o=e[1];const m=o,d=s===void 0?4:s;let c;e[2]!==x?(c=Array.from({length:x}).map(Y),e[2]=x,e[3]=c):c=e[3];let a;return e[4]!==r||e[5]!==m||e[6]!==d||e[7]!==c?(a=i.jsx(z,{columns:m,gap:d,className:r,children:c}),e[4]=r,e[5]=m,e[6]=d,e[7]=c,e[8]=a):a=e[8],a}function Y(t,e){return i.jsxs("div",{className:"bg-card hover:bg-accent transition-colors flex flex-col rounded-lg animate-pulse",children:[i.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[i.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg"}),i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"}),i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"})]}),i.jsxs("div",{className:"p-4 border-t border-border flex items-center",children:[i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]},e)}const S=Object.assign(z,{Skeleton:W});function Z(t){const e=u.c(14),{query:n}=t,{data:l}=w.useListOrganizations(),s=E();let r;e[0]!==l||e[1]!==n?(r=l?n?(()=>{const c=n.toLowerCase();return l.filter(a=>a.name.toLowerCase().includes(c)||a.slug.toLowerCase().includes(c))})():l:[],e[0]=l,e[1]=n,e[2]=r):r=e[2];const x=r;if(!l||l.length===0){let c;return e[3]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:i.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"No organizations yet. Create your first organization to get started."})}),e[3]=c):c=e[3],c}if(x.length===0){let c;return e[4]!==n?(c=i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:i.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:['No organizations found matching "',n,'".']})}),e[4]=n,e[5]=c):c=e[5],c}let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o={sm:2,md:3,lg:4},e[6]=o):o=e[6];let m;if(e[7]!==x||e[8]!==s){let c;e[10]!==s?(c=a=>i.jsxs(b,{onNavigate:()=>s({to:"/$org",params:{org:a.slug}}),children:[i.jsxs(b.Header,{children:[i.jsx(b.AvatarSection,{children:i.jsx(b.Avatar,{url:a.logo||"",fallback:a.name,size:"lg",objectFit:"contain"})}),i.jsxs(b.Content,{children:[i.jsxs(b.Subtitle,{children:["@",a.slug]}),i.jsx(b.Title,{children:a.name})]})]}),i.jsx(b.Footer,{children:i.jsxs("div",{className:"text-xs text-muted-foreground",children:["Created:"," ",new Date(a.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]})})]},a.id),e[10]=s,e[11]=c):c=e[11],m=x.map(c),e[7]=x,e[8]=s,e[9]=m}else m=e[9];let d;return e[12]!==m?(d=i.jsx(S,{columns:o,children:m}),e[12]=m,e[13]=d):d=e[13],d}function ee(t){const e=u.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(O,{size:24,className:"text-destructive"}),e[0]=l):l=e[0];let s;return e[1]!==n.message?(s=i.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:[l,i.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Error loading organizations: ",n.message]})]}),e[1]=n.message,e[2]=s):s=e[2],s}function te(){const t=u.c(20),{error:e,isPending:n}=w.useListOrganizations(),[l,s]=C.useState(""),[r,x]=C.useState(!1),o=C.useDeferredValue(l);if(n){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx("div",{className:"flex items-center justify-between mb-8",children:i.jsx("h2",{className:"text-xl font-medium",children:"My organizations"})}),t[0]=f):f=t[0];let y;return t[1]===Symbol.for("react.memo_cache_sentinel")?(y=i.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[f,i.jsx("div",{className:"@container",children:i.jsx(S.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}})})]}),t[1]=y):y=t[1],y}if(e){let f;return t[2]!==e?(f=i.jsx(ee,{error:e}),t[2]=e,t[3]=f):f=t[3],f}let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx("h2",{className:"text-xl font-medium",children:"My organizations"}),t[4]=m):m=t[4];let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=f=>s(f.target.value),t[5]=d):d=t[5];let c;t[6]!==l?(c=i.jsx($,{className:"max-w-xs",placeholder:"Search",value:l,onChange:d}),t[6]=l,t[7]=c):c=t[7];let a;t[8]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsxs(k,{variant:"default",onClick:()=>x(!0),children:[i.jsx(L,{size:16}),i.jsx("span",{children:"New organization"})]}),t[8]=a):a=t[8];let g;t[9]!==c?(g=i.jsxs("div",{className:"flex items-center justify-between mb-8",children:[m,i.jsxs("div",{className:"flex items-center gap-2",children:[c,a]})]}),t[9]=c,t[10]=g):g=t[10];let p;t[11]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx(S.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}}),t[11]=p):p=t[11];let j;t[12]!==o?(j=i.jsx("div",{className:"@container",children:i.jsx(C.Suspense,{fallback:p,children:i.jsx(Z,{query:o})})}),t[12]=o,t[13]=j):j=t[13];let h;t[14]!==r?(h=i.jsx(D,{open:r,onOpenChange:x}),t[14]=r,t[15]=h):h=t[15];let N;return t[16]!==g||t[17]!==j||t[18]!==h?(N=i.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[g,j,h]}),t[16]=g,t[17]=j,t[18]=h,t[19]=N):N=t[19],N}function xe(){const t=u.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"min-h-full",children:i.jsx(te,{})}),t[0]=e):e=t[0],e}export{xe as default};
1
+ import{c as u,j as i,a as w,r as C,h as E}from"./index-DwHtQhMK.js";import{C as _}from"./card-DDRZjhLd.js";import{c as v,I as $,B as k}from"./input-BL_6s-Bq.js";import{A}from"./avatar-CzWl5S-m.js";import{i as O}from"./AlertCircle-CaSWziXY.js";import{s as L}from"./Plus-BZfgyBux.js";import{C as D}from"./create-organization-dialog-BkLQZAga.js";import"./alert-dialog-CLLIrm4F.js";import"./form-B-vcq0Ib.js";import"./spinner-CzUKFN-O.js";function F(t){const e=u.c(10),{children:n,className:l,onNavigate:s,showHoverRing:r}=t,x=r===void 0?!1:r;let o;e[0]!==s?(o=p=>{s&&s(p)},e[0]=s,e[1]=o):o=e[1];const m=o,d=s&&"cursor-pointer",c=x&&"hover:ring-2 hover:ring-primary";let a;e[2]!==l||e[3]!==d||e[4]!==c?(a=v("group transition-all flex flex-col gap-0",d,c,l),e[2]=l,e[3]=d,e[4]=c,e[5]=a):a=e[5];let g;return e[6]!==n||e[7]!==m||e[8]!==a?(g=i.jsx(_,{className:a,onClick:m,children:n}),e[6]=n,e[7]=m,e[8]=a,e[9]=g):g=e[9],g}function H(t){const e=u.c(7),{url:n,fallback:l,shape:s,size:r,objectFit:x,className:o}=t,m=s===void 0?"square":s,d=r===void 0?"lg":r,c=x===void 0?"contain":x;let a;return e[0]!==o||e[1]!==l||e[2]!==c||e[3]!==m||e[4]!==d||e[5]!==n?(a=i.jsx(A,{url:n,fallback:l,shape:m,size:d,objectFit:c,className:o}),e[0]=o,e[1]=l,e[2]=c,e[3]=m,e[4]=d,e[5]=n,e[6]=a):a=e[6],a}function R(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("p-4 flex flex-col gap-4",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function B(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("font-medium truncate",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("p",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function G(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("text-sm text-muted-foreground truncate",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("h3",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function q(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex flex-col gap-[2px]",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function I(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex justify-between items-start",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function M(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("p-4 border-t border-border flex justify-between items-center",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function Q(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex items-center text-xs text-muted-foreground",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function T(){const t=u.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"flex justify-between items-start",children:i.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[e,i.jsxs("div",{className:"flex flex-col gap-[2px]",children:[i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg animate-pulse"}),i.jsx("div",{className:"h-4 w-40 bg-muted rounded-lg animate-pulse"})]})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsxs(_,{className:"group transition-colors flex flex-col",children:[n,i.jsxs("div",{className:"p-4 border-t border-border flex justify-between items-center",children:[i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]}),t[2]=l):l=t[2],l}const b=Object.assign(F,{Avatar:H,AvatarSection:I,Header:R,Title:B,Subtitle:G,Content:q,Footer:M,Badge:Q,Skeleton:T}),P={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8"},V={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8"},X={1:"@min-3xl:grid-cols-1",2:"@min-3xl:grid-cols-2",3:"@min-3xl:grid-cols-3",4:"@min-3xl:grid-cols-4",5:"@min-3xl:grid-cols-5",6:"@min-3xl:grid-cols-6",7:"@min-3xl:grid-cols-7",8:"@min-3xl:grid-cols-8"},J={1:"@min-6xl:grid-cols-1",2:"@min-6xl:grid-cols-2",3:"@min-6xl:grid-cols-3",4:"@min-6xl:grid-cols-4",5:"@min-6xl:grid-cols-5",6:"@min-6xl:grid-cols-6",7:"@min-6xl:grid-cols-7",8:"@min-6xl:grid-cols-8"},K={1:"@min-7xl:grid-cols-1",2:"@min-7xl:grid-cols-2",3:"@min-7xl:grid-cols-3",4:"@min-7xl:grid-cols-4",5:"@min-7xl:grid-cols-5",6:"@min-7xl:grid-cols-6",7:"@min-7xl:grid-cols-7",8:"@min-7xl:grid-cols-8"},U={1:"@min-8xl:grid-cols-1",2:"@min-8xl:grid-cols-2",3:"@min-8xl:grid-cols-3",4:"@min-8xl:grid-cols-4",5:"@min-8xl:grid-cols-5",6:"@min-8xl:grid-cols-6",7:"@min-8xl:grid-cols-7",8:"@min-8xl:grid-cols-8"};function z(t){const e=u.c(13),{children:n,columns:l,gap:s,className:r}=t;let x;e[0]!==l?(x=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=x):x=e[1];const o=x,d=P[s===void 0?4:s],c=o.sm&&V[o.sm],a=o.md&&X[o.md],g=o.lg&&J[o.lg],p=o.xl&&K[o.xl],j=o["2xl"]&&U[o["2xl"]];let h;e[2]!==r||e[3]!==d||e[4]!==c||e[5]!==a||e[6]!==g||e[7]!==p||e[8]!==j?(h=v("w-full grid",d,c,a,g,p,j,r),e[2]=r,e[3]=d,e[4]=c,e[5]=a,e[6]=g,e[7]=p,e[8]=j,e[9]=h):h=e[9];const N=h;let f;return e[10]!==n||e[11]!==N?(f=i.jsx("div",{className:N,children:n}),e[10]=n,e[11]=N,e[12]=f):f=e[12],f}function W(t){const e=u.c(9),{count:n,columns:l,gap:s,className:r}=t,x=n===void 0?8:n;let o;e[0]!==l?(o=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=o):o=e[1];const m=o,d=s===void 0?4:s;let c;e[2]!==x?(c=Array.from({length:x}).map(Y),e[2]=x,e[3]=c):c=e[3];let a;return e[4]!==r||e[5]!==m||e[6]!==d||e[7]!==c?(a=i.jsx(z,{columns:m,gap:d,className:r,children:c}),e[4]=r,e[5]=m,e[6]=d,e[7]=c,e[8]=a):a=e[8],a}function Y(t,e){return i.jsxs("div",{className:"bg-card hover:bg-accent transition-colors flex flex-col rounded-lg animate-pulse",children:[i.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[i.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg"}),i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"}),i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"})]}),i.jsxs("div",{className:"p-4 border-t border-border flex items-center",children:[i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]},e)}const S=Object.assign(z,{Skeleton:W});function Z(t){const e=u.c(14),{query:n}=t,{data:l}=w.useListOrganizations(),s=E();let r;e[0]!==l||e[1]!==n?(r=l?n?(()=>{const c=n.toLowerCase();return l.filter(a=>a.name.toLowerCase().includes(c)||a.slug.toLowerCase().includes(c))})():l:[],e[0]=l,e[1]=n,e[2]=r):r=e[2];const x=r;if(!l||l.length===0){let c;return e[3]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:i.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"No organizations yet. Create your first organization to get started."})}),e[3]=c):c=e[3],c}if(x.length===0){let c;return e[4]!==n?(c=i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:i.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:['No organizations found matching "',n,'".']})}),e[4]=n,e[5]=c):c=e[5],c}let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o={sm:2,md:3,lg:4},e[6]=o):o=e[6];let m;if(e[7]!==x||e[8]!==s){let c;e[10]!==s?(c=a=>i.jsxs(b,{onNavigate:()=>s({to:"/$org",params:{org:a.slug}}),children:[i.jsxs(b.Header,{children:[i.jsx(b.AvatarSection,{children:i.jsx(b.Avatar,{url:a.logo||"",fallback:a.name,size:"lg",objectFit:"contain"})}),i.jsxs(b.Content,{children:[i.jsxs(b.Subtitle,{children:["@",a.slug]}),i.jsx(b.Title,{children:a.name})]})]}),i.jsx(b.Footer,{children:i.jsxs("div",{className:"text-xs text-muted-foreground",children:["Created:"," ",new Date(a.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]})})]},a.id),e[10]=s,e[11]=c):c=e[11],m=x.map(c),e[7]=x,e[8]=s,e[9]=m}else m=e[9];let d;return e[12]!==m?(d=i.jsx(S,{columns:o,children:m}),e[12]=m,e[13]=d):d=e[13],d}function ee(t){const e=u.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(O,{size:24,className:"text-destructive"}),e[0]=l):l=e[0];let s;return e[1]!==n.message?(s=i.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:[l,i.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Error loading organizations: ",n.message]})]}),e[1]=n.message,e[2]=s):s=e[2],s}function te(){const t=u.c(20),{error:e,isPending:n}=w.useListOrganizations(),[l,s]=C.useState(""),[r,x]=C.useState(!1),o=C.useDeferredValue(l);if(n){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx("div",{className:"flex items-center justify-between mb-8",children:i.jsx("h2",{className:"text-xl font-medium",children:"My organizations"})}),t[0]=f):f=t[0];let y;return t[1]===Symbol.for("react.memo_cache_sentinel")?(y=i.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[f,i.jsx("div",{className:"@container",children:i.jsx(S.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}})})]}),t[1]=y):y=t[1],y}if(e){let f;return t[2]!==e?(f=i.jsx(ee,{error:e}),t[2]=e,t[3]=f):f=t[3],f}let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx("h2",{className:"text-xl font-medium",children:"My organizations"}),t[4]=m):m=t[4];let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=f=>s(f.target.value),t[5]=d):d=t[5];let c;t[6]!==l?(c=i.jsx($,{className:"max-w-xs",placeholder:"Search",value:l,onChange:d}),t[6]=l,t[7]=c):c=t[7];let a;t[8]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsxs(k,{variant:"default",onClick:()=>x(!0),children:[i.jsx(L,{size:16}),i.jsx("span",{children:"New organization"})]}),t[8]=a):a=t[8];let g;t[9]!==c?(g=i.jsxs("div",{className:"flex items-center justify-between mb-8",children:[m,i.jsxs("div",{className:"flex items-center gap-2",children:[c,a]})]}),t[9]=c,t[10]=g):g=t[10];let p;t[11]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx(S.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}}),t[11]=p):p=t[11];let j;t[12]!==o?(j=i.jsx("div",{className:"@container",children:i.jsx(C.Suspense,{fallback:p,children:i.jsx(Z,{query:o})})}),t[12]=o,t[13]=j):j=t[13];let h;t[14]!==r?(h=i.jsx(D,{open:r,onOpenChange:x}),t[14]=r,t[15]=h):h=t[15];let N;return t[16]!==g||t[17]!==j||t[18]!==h?(N=i.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[g,j,h]}),t[16]=g,t[17]=j,t[18]=h,t[19]=N):N=t[19],N}function xe(){const t=u.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"min-h-full",children:i.jsx(te,{})}),t[0]=e):e=t[0],e}export{xe as default};
@@ -1 +1 @@
1
- import{a1 as Ie,r as u,av as K,aX as F,R as Re,P as Ce,O as $e,C as Me,aY as z}from"./index-DsWTyaMI.js";var Q={exports:{}},h={};var fe;function Ae(){if(fe)return h;fe=1;var t=Symbol.for("react.element"),l=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),d=Symbol.for("react.context"),v=Symbol.for("react.server_context"),y=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),$;$=Symbol.for("react.module.reference");function k(n){if(typeof n=="object"&&n!==null){var M=n.$$typeof;switch(M){case t:switch(n=n.type,n){case r:case a:case f:case i:case p:return n;default:switch(n=n&&n.$$typeof,n){case v:case d:case y:case E:case b:case c:return n;default:return M}}case l:return M}}}return h.ContextConsumer=d,h.ContextProvider=c,h.Element=t,h.ForwardRef=y,h.Fragment=r,h.Lazy=E,h.Memo=b,h.Portal=l,h.Profiler=a,h.StrictMode=f,h.Suspense=i,h.SuspenseList=p,h.isAsyncMode=function(){return!1},h.isConcurrentMode=function(){return!1},h.isContextConsumer=function(n){return k(n)===d},h.isContextProvider=function(n){return k(n)===c},h.isElement=function(n){return typeof n=="object"&&n!==null&&n.$$typeof===t},h.isForwardRef=function(n){return k(n)===y},h.isFragment=function(n){return k(n)===r},h.isLazy=function(n){return k(n)===E},h.isMemo=function(n){return k(n)===b},h.isPortal=function(n){return k(n)===l},h.isProfiler=function(n){return k(n)===a},h.isStrictMode=function(n){return k(n)===f},h.isSuspense=function(n){return k(n)===i},h.isSuspenseList=function(n){return k(n)===p},h.isValidElementType=function(n){return typeof n=="string"||typeof n=="function"||n===r||n===a||n===f||n===i||n===p||n===x||typeof n=="object"&&n!==null&&(n.$$typeof===E||n.$$typeof===b||n.$$typeof===c||n.$$typeof===d||n.$$typeof===y||n.$$typeof===$||n.getModuleId!==void 0)},h.typeOf=k,h}var me;function Fe(){return me||(me=1,Q.exports=Ae()),Q.exports}var Pe=Fe();const lt=Ie(Pe);var ve=1,De=.9,qe=.8,je=.17,Z=.1,ee=.999,Le=.9999,Ke=.99,Ve=/[\\\/_+.#"@\[\(\{&]/,Oe=/[\\\/_+.#"@\[\(\{&]/g,ze=/[\s-]/,be=/[\s-]/g;function re(t,l,r,f,a,c,d){if(c===l.length)return a===t.length?ve:Ke;var v=`${a},${c}`;if(d[v]!==void 0)return d[v];for(var y=f.charAt(c),i=r.indexOf(y,a),p=0,b,E,x,$;i>=0;)b=re(t,l,r,f,i+1,c+1,d),b>p&&(i===a?b*=ve:Ve.test(t.charAt(i-1))?(b*=qe,x=t.slice(a,i-1).match(Oe),x&&a>0&&(b*=Math.pow(ee,x.length))):ze.test(t.charAt(i-1))?(b*=De,$=t.slice(a,i-1).match(be),$&&a>0&&(b*=Math.pow(ee,$.length))):(b*=je,a>0&&(b*=Math.pow(ee,i-a))),t.charAt(i)!==l.charAt(c)&&(b*=Le)),(b<Z&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(E=re(t,l,r,f,i+1,c+2,d),E*Z>b&&(b=E*Z)),b>p&&(p=b),i=r.indexOf(y,i+1);return d[v]=p,p}function pe(t){return t.toLowerCase().replace(be," ")}function Be(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,re(t,l,pe(t),pe(l),0,0,{})}var O='[cmdk-group=""]',te='[cmdk-group-items=""]',_e='[cmdk-group-heading=""]',ge='[cmdk-item=""]',he=`${ge}:not([aria-disabled="true"])`,ne="cmdk-item-select",j="data-value",Te=(t,l,r)=>Be(t,l,r),ye=u.createContext(void 0),B=()=>u.useContext(ye),Se=u.createContext(void 0),le=()=>u.useContext(Se),we=u.createContext(void 0),Ee=u.forwardRef((t,l)=>{let r=L(()=>{var e,s;return{search:"",value:(s=(e=t.value)!=null?e:t.defaultValue)!=null?s:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=L(()=>new Set),a=L(()=>new Map),c=L(()=>new Map),d=L(()=>new Set),v=xe(t),{label:y,children:i,value:p,onValueChange:b,filter:E,shouldFilter:x,loop:$,disablePointerSelection:k=!1,vimBindings:n=!0,...M}=t,U=K(),ue=K(),H=K(),P=u.useRef(null),w=et();D(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,R.emit()}},[p]),D(()=>{w(6,oe)},[]);let R=u.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,s,m)=>{var o,g,S,C;if(!Object.is(r.current[e],s)){if(r.current[e]=s,e==="search")Y(),W(),w(1,X);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let I=document.getElementById(H);I?I.focus():(o=document.getElementById(U))==null||o.focus()}if(w(7,()=>{var I;r.current.selectedItemId=(I=q())==null?void 0:I.id,R.emit()}),m||w(5,oe),((g=v.current)==null?void 0:g.value)!==void 0){let I=s??"";(C=(S=v.current).onValueChange)==null||C.call(S,I);return}}R.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),N=u.useMemo(()=>({value:(e,s,m)=>{var o;s!==((o=c.current.get(e))==null?void 0:o.value)&&(c.current.set(e,{value:s,keywords:m}),r.current.filtered.items.set(e,ae(s,m)),w(2,()=>{W(),R.emit()}))},item:(e,s)=>(f.current.add(e),s&&(a.current.has(s)?a.current.get(s).add(e):a.current.set(s,new Set([e]))),w(3,()=>{Y(),W(),r.current.value||X(),R.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let m=q();w(4,()=>{Y(),m?.getAttribute("id")===e&&X(),R.emit()})}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{c.current.delete(e),a.current.delete(e)}),filter:()=>v.current.shouldFilter,label:y||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:U,inputId:H,labelId:ue,listInnerRef:P}),[]);function ae(e,s){var m,o;let g=(o=(m=v.current)==null?void 0:m.filter)!=null?o:Te;return e?g(e,r.current.search,s):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,s=[];r.current.filtered.groups.forEach(o=>{let g=a.current.get(o),S=0;g.forEach(C=>{let I=e.get(C);S=Math.max(I,S)}),s.push([o,S])});let m=P.current;V().sort((o,g)=>{var S,C;let I=o.getAttribute("id"),_=g.getAttribute("id");return((S=e.get(_))!=null?S:0)-((C=e.get(I))!=null?C:0)}).forEach(o=>{let g=o.closest(te);g?g.appendChild(o.parentElement===g?o:o.closest(`${te} > *`)):m.appendChild(o.parentElement===m?o:o.closest(`${te} > *`))}),s.sort((o,g)=>g[1]-o[1]).forEach(o=>{var g;let S=(g=P.current)==null?void 0:g.querySelector(`${O}[${j}="${encodeURIComponent(o[0])}"]`);S?.parentElement.appendChild(S)})}function X(){let e=V().find(m=>m.getAttribute("aria-disabled")!=="true"),s=e?.getAttribute(j);R.setState("value",s||void 0)}function Y(){var e,s,m,o;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let g=0;for(let S of f.current){let C=(s=(e=c.current.get(S))==null?void 0:e.value)!=null?s:"",I=(o=(m=c.current.get(S))==null?void 0:m.keywords)!=null?o:[],_=ae(C,I);r.current.filtered.items.set(S,_),_>0&&g++}for(let[S,C]of a.current)for(let I of C)if(r.current.filtered.items.get(I)>0){r.current.filtered.groups.add(S);break}r.current.filtered.count=g}function oe(){var e,s,m;let o=q();o&&(((e=o.parentElement)==null?void 0:e.firstChild)===o&&((m=(s=o.closest(O))==null?void 0:s.querySelector(_e))==null||m.scrollIntoView({block:"nearest"})),o.scrollIntoView({block:"nearest"}))}function q(){var e;return(e=P.current)==null?void 0:e.querySelector(`${ge}[aria-selected="true"]`)}function V(){var e;return Array.from(((e=P.current)==null?void 0:e.querySelectorAll(he))||[])}function G(e){let s=V()[e];s&&R.setState("value",s.getAttribute(j))}function J(e){var s;let m=q(),o=V(),g=o.findIndex(C=>C===m),S=o[g+e];(s=v.current)!=null&&s.loop&&(S=g+e<0?o[o.length-1]:g+e===o.length?o[0]:o[g+e]),S&&R.setState("value",S.getAttribute(j))}function ie(e){let s=q(),m=s?.closest(O),o;for(;m&&!o;)m=e>0?Qe(m,O):Ze(m,O),o=m?.querySelector(he);o?R.setState("value",o.getAttribute(j)):J(e)}let ce=()=>G(V().length-1),se=e=>{e.preventDefault(),e.metaKey?ce():e.altKey?ie(1):J(1)},de=e=>{e.preventDefault(),e.metaKey?G(0):e.altKey?ie(-1):J(-1)};return u.createElement(F.div,{ref:l,tabIndex:-1,...M,"cmdk-root":"",onKeyDown:e=>{var s;(s=M.onKeyDown)==null||s.call(M,e);let m=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||m))switch(e.key){case"n":case"j":{n&&e.ctrlKey&&se(e);break}case"ArrowDown":{se(e);break}case"p":case"k":{n&&e.ctrlKey&&de(e);break}case"ArrowUp":{de(e);break}case"Home":{e.preventDefault(),G(0);break}case"End":{e.preventDefault(),ce();break}case"Enter":{e.preventDefault();let o=q();if(o){let g=new Event(ne);o.dispatchEvent(g)}}}}},u.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:rt},y),T(t,e=>u.createElement(Se.Provider,{value:R},u.createElement(ye.Provider,{value:N},e))))}),Ue=u.forwardRef((t,l)=>{var r,f;let a=K(),c=u.useRef(null),d=u.useContext(we),v=B(),y=xe(t),i=(f=(r=y.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;D(()=>{if(!i)return v.item(a,d?.id)},[i]);let p=ke(a,c,[t.value,t.children,c],t.keywords),b=le(),E=A(w=>w.value&&w.value===p.current),x=A(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(a)>0:!0);u.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(ne,$),()=>w.removeEventListener(ne,$)},[x,t.onSelect,t.disabled]);function $(){var w,R;k(),(R=(w=y.current).onSelect)==null||R.call(w,p.current)}function k(){b.setState("value",p.current,!0)}if(!x)return null;let{disabled:n,value:M,onSelect:U,forceMount:ue,keywords:H,...P}=t;return u.createElement(F.div,{ref:z(c,l),...P,id:a,"cmdk-item":"",role:"option","aria-disabled":!!n,"aria-selected":!!E,"data-disabled":!!n,"data-selected":!!E,onPointerMove:n||v.getDisablePointerSelection()?void 0:k,onClick:n?void 0:$},t.children)}),He=u.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:a,...c}=t,d=K(),v=u.useRef(null),y=u.useRef(null),i=K(),p=B(),b=A(x=>a||p.filter()===!1?!0:x.search?x.filtered.groups.has(d):!0);D(()=>p.group(d),[]),ke(d,v,[t.value,t.heading,y]);let E=u.useMemo(()=>({id:d,forceMount:a}),[a]);return u.createElement(F.div,{ref:z(v,l),...c,"cmdk-group":"",role:"presentation",hidden:b?void 0:!0},r&&u.createElement("div",{ref:y,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),T(t,x=>u.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},u.createElement(we.Provider,{value:E},x))))}),Ne=u.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,a=u.useRef(null),c=A(d=>!d.search);return!r&&!c?null:u.createElement(F.div,{ref:z(a,l),...f,"cmdk-separator":"",role:"separator"})}),We=u.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,a=t.value!=null,c=le(),d=A(i=>i.search),v=A(i=>i.selectedItemId),y=B();return u.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),u.createElement(F.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":y.listId,"aria-labelledby":y.labelId,"aria-activedescendant":v,id:y.inputId,type:"text",value:a?t.value:d,onChange:i=>{a||c.setState("search",i.target.value),r?.(i.target.value)}})}),Xe=u.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...a}=t,c=u.useRef(null),d=u.useRef(null),v=A(i=>i.selectedItemId),y=B();return u.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,b,E=new ResizeObserver(()=>{b=requestAnimationFrame(()=>{let x=i.offsetHeight;p.style.setProperty("--cmdk-list-height",x.toFixed(1)+"px")})});return E.observe(i),()=>{cancelAnimationFrame(b),E.unobserve(i)}}},[]),u.createElement(F.div,{ref:z(c,l),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:y.listId},T(t,i=>u.createElement("div",{ref:z(d,y.listInnerRef),"cmdk-list-sizer":""},i)))}),Ye=u.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:a,contentClassName:c,container:d,...v}=t;return u.createElement(Re,{open:r,onOpenChange:f},u.createElement(Ce,{container:d},u.createElement($e,{"cmdk-overlay":"",className:a}),u.createElement(Me,{"aria-label":t.label,"cmdk-dialog":"",className:c},u.createElement(Ee,{ref:l,...v}))))}),Ge=u.forwardRef((t,l)=>A(r=>r.filtered.count===0)?u.createElement(F.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),Je=u.forwardRef((t,l)=>{let{progress:r,children:f,label:a="Loading...",...c}=t;return u.createElement(F.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},T(t,d=>u.createElement("div",{"aria-hidden":!0},d)))}),ut=Object.assign(Ee,{List:Xe,Item:Ue,Input:We,Group:He,Separator:Ne,Dialog:Ye,Empty:Ge,Loading:Je});function Qe(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Ze(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function xe(t){let l=u.useRef(t);return D(()=>{l.current=t}),l}var D=typeof window>"u"?u.useEffect:u.useLayoutEffect;function L(t){let l=u.useRef();return l.current===void 0&&(l.current=t()),l}function A(t){let l=le(),r=()=>t(l.snapshot());return u.useSyncExternalStore(l.subscribe,r,r)}function ke(t,l,r,f=[]){let a=u.useRef(),c=B();return D(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():a.current}})(),y=f.map(i=>i.trim());c.value(t,v,y),(d=l.current)==null||d.setAttribute(j,v),a.current=v}),a}var et=()=>{let[t,l]=u.useState(),r=L(()=>new Map);return D(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,a)=>{r.current.set(f,a),l({})}};function tt(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function T({asChild:t,children:l},r){return t&&u.isValidElement(l)?u.cloneElement(tt(l),{ref:l.ref},r(l.props.children)):r(l)}var rt={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{lt as R,ut as _,Pe as r};
1
+ import{a1 as Ie,r as u,au as K,aX as F,R as Re,P as Ce,O as $e,C as Me,aY as z}from"./index-DwHtQhMK.js";var Q={exports:{}},h={};var fe;function Ae(){if(fe)return h;fe=1;var t=Symbol.for("react.element"),l=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),d=Symbol.for("react.context"),v=Symbol.for("react.server_context"),y=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),$;$=Symbol.for("react.module.reference");function k(n){if(typeof n=="object"&&n!==null){var M=n.$$typeof;switch(M){case t:switch(n=n.type,n){case r:case a:case f:case i:case p:return n;default:switch(n=n&&n.$$typeof,n){case v:case d:case y:case E:case b:case c:return n;default:return M}}case l:return M}}}return h.ContextConsumer=d,h.ContextProvider=c,h.Element=t,h.ForwardRef=y,h.Fragment=r,h.Lazy=E,h.Memo=b,h.Portal=l,h.Profiler=a,h.StrictMode=f,h.Suspense=i,h.SuspenseList=p,h.isAsyncMode=function(){return!1},h.isConcurrentMode=function(){return!1},h.isContextConsumer=function(n){return k(n)===d},h.isContextProvider=function(n){return k(n)===c},h.isElement=function(n){return typeof n=="object"&&n!==null&&n.$$typeof===t},h.isForwardRef=function(n){return k(n)===y},h.isFragment=function(n){return k(n)===r},h.isLazy=function(n){return k(n)===E},h.isMemo=function(n){return k(n)===b},h.isPortal=function(n){return k(n)===l},h.isProfiler=function(n){return k(n)===a},h.isStrictMode=function(n){return k(n)===f},h.isSuspense=function(n){return k(n)===i},h.isSuspenseList=function(n){return k(n)===p},h.isValidElementType=function(n){return typeof n=="string"||typeof n=="function"||n===r||n===a||n===f||n===i||n===p||n===x||typeof n=="object"&&n!==null&&(n.$$typeof===E||n.$$typeof===b||n.$$typeof===c||n.$$typeof===d||n.$$typeof===y||n.$$typeof===$||n.getModuleId!==void 0)},h.typeOf=k,h}var me;function Fe(){return me||(me=1,Q.exports=Ae()),Q.exports}var Pe=Fe();const lt=Ie(Pe);var ve=1,De=.9,qe=.8,je=.17,Z=.1,ee=.999,Le=.9999,Ke=.99,Ve=/[\\\/_+.#"@\[\(\{&]/,Oe=/[\\\/_+.#"@\[\(\{&]/g,ze=/[\s-]/,be=/[\s-]/g;function re(t,l,r,f,a,c,d){if(c===l.length)return a===t.length?ve:Ke;var v=`${a},${c}`;if(d[v]!==void 0)return d[v];for(var y=f.charAt(c),i=r.indexOf(y,a),p=0,b,E,x,$;i>=0;)b=re(t,l,r,f,i+1,c+1,d),b>p&&(i===a?b*=ve:Ve.test(t.charAt(i-1))?(b*=qe,x=t.slice(a,i-1).match(Oe),x&&a>0&&(b*=Math.pow(ee,x.length))):ze.test(t.charAt(i-1))?(b*=De,$=t.slice(a,i-1).match(be),$&&a>0&&(b*=Math.pow(ee,$.length))):(b*=je,a>0&&(b*=Math.pow(ee,i-a))),t.charAt(i)!==l.charAt(c)&&(b*=Le)),(b<Z&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(E=re(t,l,r,f,i+1,c+2,d),E*Z>b&&(b=E*Z)),b>p&&(p=b),i=r.indexOf(y,i+1);return d[v]=p,p}function pe(t){return t.toLowerCase().replace(be," ")}function Be(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,re(t,l,pe(t),pe(l),0,0,{})}var O='[cmdk-group=""]',te='[cmdk-group-items=""]',_e='[cmdk-group-heading=""]',ge='[cmdk-item=""]',he=`${ge}:not([aria-disabled="true"])`,ne="cmdk-item-select",j="data-value",Te=(t,l,r)=>Be(t,l,r),ye=u.createContext(void 0),B=()=>u.useContext(ye),Se=u.createContext(void 0),le=()=>u.useContext(Se),we=u.createContext(void 0),Ee=u.forwardRef((t,l)=>{let r=L(()=>{var e,s;return{search:"",value:(s=(e=t.value)!=null?e:t.defaultValue)!=null?s:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=L(()=>new Set),a=L(()=>new Map),c=L(()=>new Map),d=L(()=>new Set),v=xe(t),{label:y,children:i,value:p,onValueChange:b,filter:E,shouldFilter:x,loop:$,disablePointerSelection:k=!1,vimBindings:n=!0,...M}=t,U=K(),ue=K(),H=K(),P=u.useRef(null),w=et();D(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,R.emit()}},[p]),D(()=>{w(6,oe)},[]);let R=u.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,s,m)=>{var o,g,S,C;if(!Object.is(r.current[e],s)){if(r.current[e]=s,e==="search")Y(),W(),w(1,X);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let I=document.getElementById(H);I?I.focus():(o=document.getElementById(U))==null||o.focus()}if(w(7,()=>{var I;r.current.selectedItemId=(I=q())==null?void 0:I.id,R.emit()}),m||w(5,oe),((g=v.current)==null?void 0:g.value)!==void 0){let I=s??"";(C=(S=v.current).onValueChange)==null||C.call(S,I);return}}R.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),N=u.useMemo(()=>({value:(e,s,m)=>{var o;s!==((o=c.current.get(e))==null?void 0:o.value)&&(c.current.set(e,{value:s,keywords:m}),r.current.filtered.items.set(e,ae(s,m)),w(2,()=>{W(),R.emit()}))},item:(e,s)=>(f.current.add(e),s&&(a.current.has(s)?a.current.get(s).add(e):a.current.set(s,new Set([e]))),w(3,()=>{Y(),W(),r.current.value||X(),R.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let m=q();w(4,()=>{Y(),m?.getAttribute("id")===e&&X(),R.emit()})}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{c.current.delete(e),a.current.delete(e)}),filter:()=>v.current.shouldFilter,label:y||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:U,inputId:H,labelId:ue,listInnerRef:P}),[]);function ae(e,s){var m,o;let g=(o=(m=v.current)==null?void 0:m.filter)!=null?o:Te;return e?g(e,r.current.search,s):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,s=[];r.current.filtered.groups.forEach(o=>{let g=a.current.get(o),S=0;g.forEach(C=>{let I=e.get(C);S=Math.max(I,S)}),s.push([o,S])});let m=P.current;V().sort((o,g)=>{var S,C;let I=o.getAttribute("id"),_=g.getAttribute("id");return((S=e.get(_))!=null?S:0)-((C=e.get(I))!=null?C:0)}).forEach(o=>{let g=o.closest(te);g?g.appendChild(o.parentElement===g?o:o.closest(`${te} > *`)):m.appendChild(o.parentElement===m?o:o.closest(`${te} > *`))}),s.sort((o,g)=>g[1]-o[1]).forEach(o=>{var g;let S=(g=P.current)==null?void 0:g.querySelector(`${O}[${j}="${encodeURIComponent(o[0])}"]`);S?.parentElement.appendChild(S)})}function X(){let e=V().find(m=>m.getAttribute("aria-disabled")!=="true"),s=e?.getAttribute(j);R.setState("value",s||void 0)}function Y(){var e,s,m,o;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let g=0;for(let S of f.current){let C=(s=(e=c.current.get(S))==null?void 0:e.value)!=null?s:"",I=(o=(m=c.current.get(S))==null?void 0:m.keywords)!=null?o:[],_=ae(C,I);r.current.filtered.items.set(S,_),_>0&&g++}for(let[S,C]of a.current)for(let I of C)if(r.current.filtered.items.get(I)>0){r.current.filtered.groups.add(S);break}r.current.filtered.count=g}function oe(){var e,s,m;let o=q();o&&(((e=o.parentElement)==null?void 0:e.firstChild)===o&&((m=(s=o.closest(O))==null?void 0:s.querySelector(_e))==null||m.scrollIntoView({block:"nearest"})),o.scrollIntoView({block:"nearest"}))}function q(){var e;return(e=P.current)==null?void 0:e.querySelector(`${ge}[aria-selected="true"]`)}function V(){var e;return Array.from(((e=P.current)==null?void 0:e.querySelectorAll(he))||[])}function G(e){let s=V()[e];s&&R.setState("value",s.getAttribute(j))}function J(e){var s;let m=q(),o=V(),g=o.findIndex(C=>C===m),S=o[g+e];(s=v.current)!=null&&s.loop&&(S=g+e<0?o[o.length-1]:g+e===o.length?o[0]:o[g+e]),S&&R.setState("value",S.getAttribute(j))}function ie(e){let s=q(),m=s?.closest(O),o;for(;m&&!o;)m=e>0?Qe(m,O):Ze(m,O),o=m?.querySelector(he);o?R.setState("value",o.getAttribute(j)):J(e)}let ce=()=>G(V().length-1),se=e=>{e.preventDefault(),e.metaKey?ce():e.altKey?ie(1):J(1)},de=e=>{e.preventDefault(),e.metaKey?G(0):e.altKey?ie(-1):J(-1)};return u.createElement(F.div,{ref:l,tabIndex:-1,...M,"cmdk-root":"",onKeyDown:e=>{var s;(s=M.onKeyDown)==null||s.call(M,e);let m=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||m))switch(e.key){case"n":case"j":{n&&e.ctrlKey&&se(e);break}case"ArrowDown":{se(e);break}case"p":case"k":{n&&e.ctrlKey&&de(e);break}case"ArrowUp":{de(e);break}case"Home":{e.preventDefault(),G(0);break}case"End":{e.preventDefault(),ce();break}case"Enter":{e.preventDefault();let o=q();if(o){let g=new Event(ne);o.dispatchEvent(g)}}}}},u.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:rt},y),T(t,e=>u.createElement(Se.Provider,{value:R},u.createElement(ye.Provider,{value:N},e))))}),Ue=u.forwardRef((t,l)=>{var r,f;let a=K(),c=u.useRef(null),d=u.useContext(we),v=B(),y=xe(t),i=(f=(r=y.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;D(()=>{if(!i)return v.item(a,d?.id)},[i]);let p=ke(a,c,[t.value,t.children,c],t.keywords),b=le(),E=A(w=>w.value&&w.value===p.current),x=A(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(a)>0:!0);u.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(ne,$),()=>w.removeEventListener(ne,$)},[x,t.onSelect,t.disabled]);function $(){var w,R;k(),(R=(w=y.current).onSelect)==null||R.call(w,p.current)}function k(){b.setState("value",p.current,!0)}if(!x)return null;let{disabled:n,value:M,onSelect:U,forceMount:ue,keywords:H,...P}=t;return u.createElement(F.div,{ref:z(c,l),...P,id:a,"cmdk-item":"",role:"option","aria-disabled":!!n,"aria-selected":!!E,"data-disabled":!!n,"data-selected":!!E,onPointerMove:n||v.getDisablePointerSelection()?void 0:k,onClick:n?void 0:$},t.children)}),He=u.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:a,...c}=t,d=K(),v=u.useRef(null),y=u.useRef(null),i=K(),p=B(),b=A(x=>a||p.filter()===!1?!0:x.search?x.filtered.groups.has(d):!0);D(()=>p.group(d),[]),ke(d,v,[t.value,t.heading,y]);let E=u.useMemo(()=>({id:d,forceMount:a}),[a]);return u.createElement(F.div,{ref:z(v,l),...c,"cmdk-group":"",role:"presentation",hidden:b?void 0:!0},r&&u.createElement("div",{ref:y,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),T(t,x=>u.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},u.createElement(we.Provider,{value:E},x))))}),Ne=u.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,a=u.useRef(null),c=A(d=>!d.search);return!r&&!c?null:u.createElement(F.div,{ref:z(a,l),...f,"cmdk-separator":"",role:"separator"})}),We=u.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,a=t.value!=null,c=le(),d=A(i=>i.search),v=A(i=>i.selectedItemId),y=B();return u.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),u.createElement(F.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":y.listId,"aria-labelledby":y.labelId,"aria-activedescendant":v,id:y.inputId,type:"text",value:a?t.value:d,onChange:i=>{a||c.setState("search",i.target.value),r?.(i.target.value)}})}),Xe=u.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...a}=t,c=u.useRef(null),d=u.useRef(null),v=A(i=>i.selectedItemId),y=B();return u.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,b,E=new ResizeObserver(()=>{b=requestAnimationFrame(()=>{let x=i.offsetHeight;p.style.setProperty("--cmdk-list-height",x.toFixed(1)+"px")})});return E.observe(i),()=>{cancelAnimationFrame(b),E.unobserve(i)}}},[]),u.createElement(F.div,{ref:z(c,l),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:y.listId},T(t,i=>u.createElement("div",{ref:z(d,y.listInnerRef),"cmdk-list-sizer":""},i)))}),Ye=u.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:a,contentClassName:c,container:d,...v}=t;return u.createElement(Re,{open:r,onOpenChange:f},u.createElement(Ce,{container:d},u.createElement($e,{"cmdk-overlay":"",className:a}),u.createElement(Me,{"aria-label":t.label,"cmdk-dialog":"",className:c},u.createElement(Ee,{ref:l,...v}))))}),Ge=u.forwardRef((t,l)=>A(r=>r.filtered.count===0)?u.createElement(F.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),Je=u.forwardRef((t,l)=>{let{progress:r,children:f,label:a="Loading...",...c}=t;return u.createElement(F.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},T(t,d=>u.createElement("div",{"aria-hidden":!0},d)))}),ut=Object.assign(Ee,{List:Xe,Item:Ue,Input:We,Group:He,Separator:Ne,Dialog:Ye,Empty:Ge,Loading:Je});function Qe(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Ze(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function xe(t){let l=u.useRef(t);return D(()=>{l.current=t}),l}var D=typeof window>"u"?u.useEffect:u.useLayoutEffect;function L(t){let l=u.useRef();return l.current===void 0&&(l.current=t()),l}function A(t){let l=le(),r=()=>t(l.snapshot());return u.useSyncExternalStore(l.subscribe,r,r)}function ke(t,l,r,f=[]){let a=u.useRef(),c=B();return D(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():a.current}})(),y=f.map(i=>i.trim());c.value(t,v,y),(d=l.current)==null||d.setAttribute(j,v),a.current=v}),a}var et=()=>{let[t,l]=u.useState(),r=L(()=>new Map);return D(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,a)=>{r.current.set(f,a),l({})}};function tt(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function T({asChild:t,children:l},r){return t&&u.isValidElement(l)?u.cloneElement(tt(l),{ref:l.ref},r(l.props.children)):r(l)}var rt={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{lt as R,ut as _,Pe as r};
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-B4k1yizo.js","assets/input-Bjw47IqN.js","assets/shell-layout-yGeudWHM.js","assets/error-boundary-NRHN5Y9-.js","assets/File06-l4-3IHqa.js","assets/X-D4fwyn55.js","assets/use-mobile-b2I183jd.js","assets/project-context-provider-4_jnbmhf.js","assets/use-organization-settings-D21MRe-D.js","assets/use-connection-BRzCmTOd.js","assets/use-gateway-LBTVY8TW.js","assets/create-organization-dialog-BW64m1n3.js","assets/alert-dialog-F5nkQKBj.js","assets/form-BYRg0fLZ.js","assets/spinner-DZG16LrV.js","assets/popover-BAqz8iCu.js","assets/avatar-MdaY7dDq.js","assets/Grid01-COCXYn3t.js","assets/gateway-selector-DAEirbF5.js","assets/select-D0sx2072.js","assets/ChevronDown-CsOv8W2I.js","assets/dropdown-menu-Dl6PURsy.js","assets/ChevronRight-Boh94iyZ.js","assets/Copy01-BrkhNqAw.js","assets/LinkExternal01-31BeOzKc.js","assets/dialog-dVO4tnyX.js","assets/localstorage-keys-mgwVhAgB.js","assets/useQuery-BXYZ1U8o.js","assets/thread-history-popover-CUQ7xqpL.js","assets/use-binding-CocjKJdo.js","assets/auth-m66JRmI1.js","assets/use-gateway-system-prompt-DscZjM_A.js","assets/AlertCircle-DAyHhLS6.js","assets/Stop-CRrts02X.js","assets/textarea-Ct5hMebK.js","assets/Terminal-e-eRty6Q.js","assets/monaco-editor-CiWfYNhn.js","assets/InfoCircle-C2iaXmlJ.js","assets/well-known-mcp-D13f-8h2.js","assets/generate-id-Dyweu44Y.js","assets/Trash01-C3O36hTP.js","assets/resizable-BQxIvKty.js","assets/Loading01-BqUL1Os2.js","assets/Plus-CJASgavw.js","assets/home-4Azy8yCf.js","assets/card-DPsjHi5_.js","assets/page-DWpNpeBI.js","assets/view-mode-toggle-DlhHZSZ6.js","assets/GitBranch01-DDKUuZMu.js","assets/use-tool-call-DWmlWS7M.js","assets/value-D6kCdY90.js","assets/page-BZV40eAE.css","assets/members-CvcRBE7N.js","assets/collection-header-DS84Dz-Z.js","assets/collection-display-button-BEkWecO6.js","assets/collection-page-Dw7iXEq1.js","assets/collection-search-Dwhflp6J.js","assets/collection-table-wrapper-Tc6aoQU4.js","assets/switch-BRK3ymGn.js","assets/checkbox-dB50xYpN.js","assets/ArrowLeft-Bpp_SsGd.js","assets/use-members-DwaDlN2k.js","assets/badge-BRpJ4D36.js","assets/DotsHorizontal-Bv4IcguS.js","assets/Lock01-BfDepLwB.js","assets/DotsVertical-cXTBD68H.js","assets/Key01-CcMWzP51.js","assets/XClose-Bfbqr-bg.js","assets/connections-Cyw4vKCR.js","assets/connection-card-BOHNc6OM.js","assets/use-list-state-C9bMHTQK.js","assets/env-vars-editor-BH1jNoL-.js","assets/registry-utils-B7t_ZBUi.js","assets/settings-DBVtWxtX.js","assets/monitoring-C2NQS-B1.js","assets/FilterLines-D2prJuZ_.js","assets/Play-DqaoplmY.js","assets/index-CiFNe-N2.js","assets/resource-tabs-N7R8QmbK.js","assets/page-4Om70maF.js","assets/Inbox01-CEyXxA8m.js","assets/slugify-CEUa2lfQ.js","assets/github-icon-Dp3wHhYE.js","assets/server-name-C3ttWdyD.js","assets/mcp-server-detail-BncapnIe.js","assets/tools-list-B6Grd2aY.js","assets/layout-CSrwjVH6.js","assets/tools-list-CSRUKxnt.css","assets/use-mcp-Xq1C6Xb8.js","assets/extract-connection-data-BaLXzQ_k.js","assets/constants-DgMd8oVj.js","assets/connection-detail-yed7lEwn.js","assets/index-DJlsJ8uo.js","assets/mcp-oauth-CYe4lbkF.js","assets/pin-to-sidebar-button-B_8L8Vb0.js","assets/useQueries-BLLM0cVq.js","assets/use-connection-resources-AWPWi-RH.js","assets/collection-tab-CQ_V1h26.js","assets/empty-state-Ctkb5o27.js","assets/collection-detail-glRN62L4.js","assets/FlipBackward-Cuwh5H4e.js","assets/gateways-BJBU4jqZ.js","assets/gateway-detail-BfXnCLYA.js","assets/workflow-DufdLkFQ.js","assets/oauth-callback-CVfImHX4.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-BPLTUQ2o.js","assets/input-BL_6s-Bq.js","assets/shell-layout-Boits0hC.js","assets/error-boundary-DF-uZuEV.js","assets/File06-B3qh7Ea8.js","assets/X-DoVCUrhK.js","assets/use-mobile-DmpRnaSP.js","assets/project-context-provider-cpEbmTch.js","assets/use-organization-settings-CUeUwHGc.js","assets/use-connection-Sf8hW5yA.js","assets/use-gateway-BRb-QnWG.js","assets/create-organization-dialog-BkLQZAga.js","assets/alert-dialog-CLLIrm4F.js","assets/form-B-vcq0Ib.js","assets/spinner-CzUKFN-O.js","assets/popover-D6Sus4Ok.js","assets/avatar-CzWl5S-m.js","assets/Grid01-Bt5T8Kvn.js","assets/index-PdYB8SsR.js","assets/AlertCircle-CaSWziXY.js","assets/textarea-S1Ffk72a.js","assets/localstorage-keys-DAcoYlkD.js","assets/useQuery-f5EeixK5.js","assets/Copy01-BOtwmMJy.js","assets/Terminal-DMx2ygGG.js","assets/monaco-editor-Fv58AQ_j.js","assets/select-JyLqSDVb.js","assets/ChevronDown-DYrAWIje.js","assets/InfoCircle-ByoMVITX.js","assets/use-binding-DV8L0ZvU.js","assets/auth-CgxcLwue.js","assets/dropdown-menu-FKTXuLg3.js","assets/LinkExternal01-DQ7LiU13.js","assets/dialog-CjOzZCyT.js","assets/thread-history-popover-Do-vVWjf.js","assets/use-gateway-system-prompt-BCFIzB-i.js","assets/well-known-mcp-D13f-8h2.js","assets/generate-id-Dyweu44Y.js","assets/Clock-9AM4S8g5.js","assets/Trash01-Dvb7krv8.js","assets/resizable-CbIgPFul.js","assets/Loading01-DU_er3oJ.js","assets/Plus-BZfgyBux.js","assets/home-DqPSvVQ4.js","assets/card-DDRZjhLd.js","assets/page-bm876z4u.js","assets/view-mode-toggle-B5QpL180.js","assets/GitBranch01-LrMvLleM.js","assets/use-tool-call-CFZ9HTpW.js","assets/value-Fk3OaX_V.js","assets/page-BZV40eAE.css","assets/members-nhvM4_hF.js","assets/collection-header-Dgpak6RG.js","assets/collection-display-button-GYzwE1Yk.js","assets/collection-page-DsXQH-Im.js","assets/collection-search-BLCr2u4s.js","assets/collection-table-wrapper-lPNgMir7.js","assets/switch-Bpj46bRm.js","assets/checkbox-CdriYHbe.js","assets/ArrowLeft-C60SDpN2.js","assets/use-members-C6E9q5SL.js","assets/badge-Bbeqjlvl.js","assets/DotsHorizontal-7SjfN6lZ.js","assets/Lock01-w8OXtDqR.js","assets/DotsVertical-BP_-eK2T.js","assets/Key01-VE6cE4ge.js","assets/XClose-C1ZaoDkv.js","assets/connections-eTByBVoM.js","assets/connection-card-ChEaWCU7.js","assets/use-list-state-CNeFnW0c.js","assets/env-vars-editor-DILQqQln.js","assets/registry-utils-B7t_ZBUi.js","assets/settings-Dod8lcbL.js","assets/monitoring-0mZRbE8v.js","assets/FilterLines-Bt7sP2Ln.js","assets/Play-6JV_6CG8.js","assets/index-CKWTMWxC.js","assets/resource-tabs-DsuwPs-x.js","assets/page-CWgyoE-b.js","assets/Inbox01-B9Rg6DmE.js","assets/slugify-CEUa2lfQ.js","assets/github-icon-Dp3wHhYE.js","assets/server-name-C3ttWdyD.js","assets/mcp-server-detail-BFJ_9U28.js","assets/tools-list-BSUlyyag.js","assets/layout-D5OcxKMp.js","assets/tools-list-CSRUKxnt.css","assets/use-mcp-Ck8Xxjhl.js","assets/extract-connection-data-BorCHusn.js","assets/constants-DUH_OOTp.js","assets/connection-detail-BdAq7uXe.js","assets/index-dJdCvohv.js","assets/mcp-oauth-C_b3SC0X.js","assets/pin-to-sidebar-button-CaUox-8X.js","assets/useQueries-KKCw7uoR.js","assets/use-connection-resources-DYe3vNOl.js","assets/collection-tab-B94jr-UP.js","assets/empty-state-Dg_1FyPv.js","assets/collection-detail-BizUvdqx.js","assets/FlipBackward-D4n1zrEs.js","assets/gateways-CQnn2_8x.js","assets/gateway-detail-Dd3TUg5f.js","assets/workflow-DWBbOhIt.js","assets/oauth-callback-DOKfTw2N.js"])))=>i.map(i=>d[i]);
2
2
  function f4(e,t){for(var n=0;n<t.length;n++){const o=t[n];if(typeof o!="string"&&!Array.isArray(o)){for(const i in o)if(i!=="default"&&!(i in e)){const l=Object.getOwnPropertyDescriptor(o,i);l&&Object.defineProperty(e,i,l.get?l:{enumerable:!0,get:()=>o[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function o(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();const h4="modulepreload",p4=function(e){return"/"+e},p_={},Tn=function(t,n,o){let i=Promise.resolve();if(n&&n.length>0){let c=function(h){return Promise.all(h.map(v=>Promise.resolve(v).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),f=d?.nonce||d?.getAttribute("nonce");i=c(n.map(h=>{if(h=p4(h),h in p_)return;p_[h]=!0;const v=h.endsWith(".css"),p=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const g=document.createElement("link");if(g.rel=v?"stylesheet":h4,v||(g.as="script"),g.crossOrigin="",g.href=h,f&&g.setAttribute("nonce",f),document.head.appendChild(g),v)return new Promise((_,S)=>{g.addEventListener("load",_),g.addEventListener("error",()=>S(Error(`Unable to preload CSS for ${h}`)))})}))}function l(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return i.then(c=>{for(const d of c||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})};var hH=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yp={exports:{}},Cl={};var m_;function m4(){if(m_)return Cl;m_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(o,i,l){var c=null;if(l!==void 0&&(c=""+l),i.key!==void 0&&(c=""+i.key),"key"in i){l={};for(var d in i)d!=="key"&&(l[d]=i[d])}else l=i;return i=l.ref,{$$typeof:e,type:o,key:c,ref:i!==void 0?i:null,props:l}}return Cl.Fragment=t,Cl.jsx=n,Cl.jsxs=n,Cl}var v_;function v4(){return v_||(v_=1,Yp.exports=m4()),Yp.exports}var b=v4(),Kp={exports:{}},Il={},Wp={exports:{}},Qp={};var g_;function g4(){return g_||(g_=1,(function(e){function t(L,F){var G=L.length;L.push(F);e:for(;0<G;){var re=G-1>>>1,be=L[re];if(0<i(be,F))L[re]=F,L[G]=be,G=re;else break e}}function n(L){return L.length===0?null:L[0]}function o(L){if(L.length===0)return null;var F=L[0],G=L.pop();if(G!==F){L[0]=G;e:for(var re=0,be=L.length,P=be>>>1;re<P;){var Q=2*(re+1)-1,te=L[Q],se=Q+1,me=L[se];if(0>i(te,G))se<be&&0>i(me,te)?(L[re]=me,L[se]=G,re=se):(L[re]=te,L[Q]=G,re=Q);else if(se<be&&0>i(me,G))L[re]=me,L[se]=G,re=se;else break e}}return F}function i(L,F){var G=L.sortIndex-F.sortIndex;return G!==0?G:L.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],h=[],v=1,p=null,g=3,_=!1,S=!1,w=!1,T=!1,R=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function O(L){for(var F=n(h);F!==null;){if(F.callback===null)o(h);else if(F.startTime<=L)o(h),F.sortIndex=F.expirationTime,t(f,F);else break;F=n(h)}}function I(L){if(w=!1,O(L),!S)if(n(f)!==null)S=!0,k||(k=!0,q());else{var F=n(h);F!==null&&oe(I,F.startTime-L)}}var k=!1,D=-1,N=5,z=-1;function W(){return T?!0:!(e.unstable_now()-z<N)}function V(){if(T=!1,k){var L=e.unstable_now();z=L;var F=!0;try{e:{S=!1,w&&(w=!1,A(D),D=-1),_=!0;var G=g;try{t:{for(O(L),p=n(f);p!==null&&!(p.expirationTime>L&&W());){var re=p.callback;if(typeof re=="function"){p.callback=null,g=p.priorityLevel;var be=re(p.expirationTime<=L);if(L=e.unstable_now(),typeof be=="function"){p.callback=be,O(L),F=!0;break t}p===n(f)&&o(f),O(L)}else o(f);p=n(f)}if(p!==null)F=!0;else{var P=n(h);P!==null&&oe(I,P.startTime-L),F=!1}}break e}finally{p=null,g=G,_=!1}F=void 0}}finally{F?q():k=!1}}}var q;if(typeof C=="function")q=function(){C(V)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,X=j.port2;j.port1.onmessage=V,q=function(){X.postMessage(null)}}else q=function(){R(V,0)};function oe(L,F){D=R(function(){L(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(L){switch(g){case 1:case 2:case 3:var F=3;break;default:F=g}var G=g;g=F;try{return L()}finally{g=G}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function(L,F){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var G=g;g=L;try{return F()}finally{g=G}},e.unstable_scheduleCallback=function(L,F,G){var re=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?re+G:re):G=re,L){case 1:var be=-1;break;case 2:be=250;break;case 5:be=1073741823;break;case 4:be=1e4;break;default:be=5e3}return be=G+be,L={id:v++,callback:F,priorityLevel:L,startTime:G,expirationTime:be,sortIndex:-1},G>re?(L.sortIndex=G,t(h,L),n(f)===null&&L===n(h)&&(w?(A(D),D=-1):w=!0,oe(I,G-re))):(L.sortIndex=be,t(f,L),S||_||(S=!0,k||(k=!0,q()))),L},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(L){var F=g;return function(){var G=g;g=F;try{return L.apply(this,arguments)}finally{g=G}}}})(Qp)),Qp}var y_;function y4(){return y_||(y_=1,Wp.exports=g4()),Wp.exports}var Xp={exports:{}},Fe={};var b_;function b4(){if(b_)return Fe;b_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function _(P){return P===null||typeof P!="object"?null:(P=g&&P[g]||P["@@iterator"],typeof P=="function"?P:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,T={};function R(P,Q,te){this.props=P,this.context=Q,this.refs=T,this.updater=te||S}R.prototype.isReactComponent={},R.prototype.setState=function(P,Q){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,Q,"setState")},R.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function A(){}A.prototype=R.prototype;function C(P,Q,te){this.props=P,this.context=Q,this.refs=T,this.updater=te||S}var O=C.prototype=new A;O.constructor=C,w(O,R.prototype),O.isPureReactComponent=!0;var I=Array.isArray;function k(){}var D={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function z(P,Q,te){var se=te.ref;return{$$typeof:e,type:P,key:Q,ref:se!==void 0?se:null,props:te}}function W(P,Q){return z(P.type,Q,P.props)}function V(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function q(P){var Q={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(te){return Q[te]})}var j=/\/+/g;function X(P,Q){return typeof P=="object"&&P!==null&&P.key!=null?q(""+P.key):Q.toString(36)}function oe(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(k,k):(P.status="pending",P.then(function(Q){P.status==="pending"&&(P.status="fulfilled",P.value=Q)},function(Q){P.status==="pending"&&(P.status="rejected",P.reason=Q)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function L(P,Q,te,se,me){var _e=typeof P;(_e==="undefined"||_e==="boolean")&&(P=null);var ye=!1;if(P===null)ye=!0;else switch(_e){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(P.$$typeof){case e:case t:ye=!0;break;case v:return ye=P._init,L(ye(P._payload),Q,te,se,me)}}if(ye)return me=me(P),ye=se===""?"."+X(P,0):se,I(me)?(te="",ye!=null&&(te=ye.replace(j,"$&/")+"/"),L(me,Q,te,"",function(Le){return Le})):me!=null&&(V(me)&&(me=W(me,te+(me.key==null||P&&P.key===me.key?"":(""+me.key).replace(j,"$&/")+"/")+ye)),Q.push(me)),1;ye=0;var Se=se===""?".":se+":";if(I(P))for(var De=0;De<P.length;De++)se=P[De],_e=Se+X(se,De),ye+=L(se,Q,te,_e,me);else if(De=_(P),typeof De=="function")for(P=De.call(P),De=0;!(se=P.next()).done;)se=se.value,_e=Se+X(se,De++),ye+=L(se,Q,te,_e,me);else if(_e==="object"){if(typeof P.then=="function")return L(oe(P),Q,te,se,me);throw Q=String(P),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return ye}function F(P,Q,te){if(P==null)return P;var se=[],me=0;return L(P,se,"","",function(_e){return Q.call(te,_e,me++)}),se}function G(P){if(P._status===-1){var Q=P._result;Q=Q(),Q.then(function(te){(P._status===0||P._status===-1)&&(P._status=1,P._result=te)},function(te){(P._status===0||P._status===-1)&&(P._status=2,P._result=te)}),P._status===-1&&(P._status=0,P._result=Q)}if(P._status===1)return P._result.default;throw P._result}var re=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},be={map:F,forEach:function(P,Q,te){F(P,function(){Q.apply(this,arguments)},te)},count:function(P){var Q=0;return F(P,function(){Q++}),Q},toArray:function(P){return F(P,function(Q){return Q})||[]},only:function(P){if(!V(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return Fe.Activity=p,Fe.Children=be,Fe.Component=R,Fe.Fragment=n,Fe.Profiler=i,Fe.PureComponent=C,Fe.StrictMode=o,Fe.Suspense=f,Fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Fe.__COMPILER_RUNTIME={__proto__:null,c:function(P){return D.H.useMemoCache(P)}},Fe.cache=function(P){return function(){return P.apply(null,arguments)}},Fe.cacheSignal=function(){return null},Fe.cloneElement=function(P,Q,te){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var se=w({},P.props),me=P.key;if(Q!=null)for(_e in Q.key!==void 0&&(me=""+Q.key),Q)!N.call(Q,_e)||_e==="key"||_e==="__self"||_e==="__source"||_e==="ref"&&Q.ref===void 0||(se[_e]=Q[_e]);var _e=arguments.length-2;if(_e===1)se.children=te;else if(1<_e){for(var ye=Array(_e),Se=0;Se<_e;Se++)ye[Se]=arguments[Se+2];se.children=ye}return z(P.type,me,se)},Fe.createContext=function(P){return P={$$typeof:c,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:l,_context:P},P},Fe.createElement=function(P,Q,te){var se,me={},_e=null;if(Q!=null)for(se in Q.key!==void 0&&(_e=""+Q.key),Q)N.call(Q,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(me[se]=Q[se]);var ye=arguments.length-2;if(ye===1)me.children=te;else if(1<ye){for(var Se=Array(ye),De=0;De<ye;De++)Se[De]=arguments[De+2];me.children=Se}if(P&&P.defaultProps)for(se in ye=P.defaultProps,ye)me[se]===void 0&&(me[se]=ye[se]);return z(P,_e,me)},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(P){return{$$typeof:d,render:P}},Fe.isValidElement=V,Fe.lazy=function(P){return{$$typeof:v,_payload:{_status:-1,_result:P},_init:G}},Fe.memo=function(P,Q){return{$$typeof:h,type:P,compare:Q===void 0?null:Q}},Fe.startTransition=function(P){var Q=D.T,te={};D.T=te;try{var se=P(),me=D.S;me!==null&&me(te,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(k,re)}catch(_e){re(_e)}finally{Q!==null&&te.types!==null&&(Q.types=te.types),D.T=Q}},Fe.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Fe.use=function(P){return D.H.use(P)},Fe.useActionState=function(P,Q,te){return D.H.useActionState(P,Q,te)},Fe.useCallback=function(P,Q){return D.H.useCallback(P,Q)},Fe.useContext=function(P){return D.H.useContext(P)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(P,Q){return D.H.useDeferredValue(P,Q)},Fe.useEffect=function(P,Q){return D.H.useEffect(P,Q)},Fe.useEffectEvent=function(P){return D.H.useEffectEvent(P)},Fe.useId=function(){return D.H.useId()},Fe.useImperativeHandle=function(P,Q,te){return D.H.useImperativeHandle(P,Q,te)},Fe.useInsertionEffect=function(P,Q){return D.H.useInsertionEffect(P,Q)},Fe.useLayoutEffect=function(P,Q){return D.H.useLayoutEffect(P,Q)},Fe.useMemo=function(P,Q){return D.H.useMemo(P,Q)},Fe.useOptimistic=function(P,Q){return D.H.useOptimistic(P,Q)},Fe.useReducer=function(P,Q,te){return D.H.useReducer(P,Q,te)},Fe.useRef=function(P){return D.H.useRef(P)},Fe.useState=function(P){return D.H.useState(P)},Fe.useSyncExternalStore=function(P,Q,te){return D.H.useSyncExternalStore(P,Q,te)},Fe.useTransition=function(){return D.H.useTransition()},Fe.version="19.2.3",Fe}var __;function ka(){return __||(__=1,Xp.exports=b4()),Xp.exports}var Jp={exports:{}},Dn={};var E_;function _4(){if(E_)return Dn;E_=1;var e=ka();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var o={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function l(f,h,v){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:f,containerInfo:h,implementation:v}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Dn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Dn.createPortal=function(f,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(f,h,null,v)},Dn.flushSync=function(f){var h=c.T,v=o.p;try{if(c.T=null,o.p=2,f)return f()}finally{c.T=h,o.p=v,o.d.f()}},Dn.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(f,h))},Dn.prefetchDNS=function(f){typeof f=="string"&&o.d.D(f)},Dn.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var v=h.as,p=d(v,h.crossOrigin),g=typeof h.integrity=="string"?h.integrity:void 0,_=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?o.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:_}):v==="script"&&o.d.X(f,{crossOrigin:p,integrity:g,fetchPriority:_,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Dn.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=d(h.as,h.crossOrigin);o.d.M(f,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(f)},Dn.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,p=d(v,h.crossOrigin);o.d.L(f,v,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Dn.preloadModule=function(f,h){if(typeof f=="string")if(h){var v=d(h.as,h.crossOrigin);o.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(f)},Dn.requestFormReset=function(f){o.d.r(f)},Dn.unstable_batchedUpdates=function(f,h){return f(h)},Dn.useFormState=function(f,h,v){return c.H.useFormState(f,h,v)},Dn.useFormStatus=function(){return c.H.useHostTransitionStatus()},Dn.version="19.2.3",Dn}var S_;function _w(){if(S_)return Jp.exports;S_=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Jp.exports=_4(),Jp.exports}var w_;function E4(){if(w_)return Il;w_=1;var e=y4(),t=ka(),n=_w();function o(r){var a="https://react.dev/errors/"+r;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)a+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+r+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var a=r,s=r;if(r.alternate)for(;a.return;)a=a.return;else{r=a;do a=r,(a.flags&4098)!==0&&(s=a.return),r=a.return;while(r)}return a.tag===3?s:null}function c(r){if(r.tag===13){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function d(r){if(r.tag===31){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function f(r){if(l(r)!==r)throw Error(o(188))}function h(r){var a=r.alternate;if(!a){if(a=l(r),a===null)throw Error(o(188));return a!==r?null:r}for(var s=r,u=a;;){var m=s.return;if(m===null)break;var y=m.alternate;if(y===null){if(u=m.return,u!==null){s=u;continue}break}if(m.child===y.child){for(y=m.child;y;){if(y===s)return f(m),r;if(y===u)return f(m),a;y=y.sibling}throw Error(o(188))}if(s.return!==u.return)s=m,u=y;else{for(var x=!1,M=m.child;M;){if(M===s){x=!0,s=m,u=y;break}if(M===u){x=!0,u=m,s=y;break}M=M.sibling}if(!x){for(M=y.child;M;){if(M===s){x=!0,s=y,u=m;break}if(M===u){x=!0,u=y,s=m;break}M=M.sibling}if(!x)throw Error(o(189))}}if(s.alternate!==u)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?r:a}function v(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r;for(r=r.child;r!==null;){if(a=v(r),a!==null)return a;r=r.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),C=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function q(r){return r===null||typeof r!="object"?null:(r=V&&r[V]||r["@@iterator"],typeof r=="function"?r:null)}var j=Symbol.for("react.client.reference");function X(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===j?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case w:return"Fragment";case R:return"Profiler";case T:return"StrictMode";case I:return"Suspense";case k:return"SuspenseList";case z:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case S:return"Portal";case C:return r.displayName||"Context";case A:return(r._context.displayName||"Context")+".Consumer";case O:var a=r.render;return r=r.displayName,r||(r=a.displayName||a.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case D:return a=r.displayName||null,a!==null?a:X(r.type)||"Memo";case N:a=r._payload,r=r._init;try{return X(r(a))}catch{}}return null}var oe=Array.isArray,L=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},re=[],be=-1;function P(r){return{current:r}}function Q(r){0>be||(r.current=re[be],re[be]=null,be--)}function te(r,a){be++,re[be]=r.current,r.current=a}var se=P(null),me=P(null),_e=P(null),ye=P(null);function Se(r,a){switch(te(_e,a),te(me,r),te(se,null),a.nodeType){case 9:case 11:r=(r=a.documentElement)&&(r=r.namespaceURI)?jb(r):0;break;default:if(r=a.tagName,a=a.namespaceURI)a=jb(a),r=zb(a,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Q(se),te(se,r)}function De(){Q(se),Q(me),Q(_e)}function Le(r){r.memoizedState!==null&&te(ye,r);var a=se.current,s=zb(a,r.type);a!==s&&(te(me,r),te(se,s))}function Ee(r){me.current===r&&(Q(se),Q(me)),ye.current===r&&(Q(ye),Rl._currentValue=G)}var ze,Nt;function ge(r){if(ze===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);ze=a&&a[1]||"",Nt=-1<s.stack.indexOf(`
3
3
  at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
4
4
  `+ze+r+Nt}var ve=!1;function Re(r,a){if(!r||ve)return"";ve=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(ae){var ne=ae}Reflect.construct(r,[],de)}else{try{de.call()}catch(ae){ne=ae}r.call(de.prototype)}}else{try{throw Error()}catch(ae){ne=ae}(de=r())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(ae){if(ae&&ne&&typeof ae.stack=="string")return[ae.stack,ne.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=u.DetermineComponentFrameRoot(),x=y[0],M=y[1];if(x&&M){var B=x.split(`
@@ -160,4 +160,4 @@ ${o}
160
160
  ${o}
161
161
  }`)}if(n.length>0){const o=document.createElement("style");o.id="mesh-theme-overrides",o.textContent=n.join(`
162
162
 
163
- `),document.head.appendChild(o)}}function VV(e){const t=mc.c(6),{children:n}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={queryKey:Dw.publicConfig(),queryFn:FV,staleTime:1/0},t[0]=o):o=t[0];const{data:i}=Nw(o);let l,c;t[1]!==i.theme?(l=()=>{$V(i.theme)},c=[i.theme],t[1]=i.theme,t[2]=l,t[3]=c):(l=t[2],c=t[3]),E.useLayoutEffect(l,c);let d;return t[4]!==n?(d=b.jsx(b.Fragment,{children:n}),t[4]=n,t[5]=d):d=t[5],d}function JT(){const e=mc.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=b.jsx("div",{className:"flex items-center justify-center min-h-screen",children:b.jsx("div",{className:"text-gray-500",children:"Loading..."})}),e[0]=t):t=e[0],t}const HV=new Y4;function GV(e){const t=mc.c(4),{children:n}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=b.jsx(ZP,{}),t[0]=o):o=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=b.jsx(JT,{}),t[1]=i):i=t[1];let l;return t[2]!==n?(l=b.jsxs(W4,{client:HV,children:[o,b.jsx(E.Suspense,{fallback:i,children:b.jsx(VV,{children:b.jsx(u3,{children:b.jsx(UV,{children:n})})})})]}),t[2]=n,t[3]=l):l=t[3],l}const qV=function(){return null},Mc=U5({component:()=>b.jsxs(GV,{children:[b.jsx(E.Suspense,{fallback:b.jsx(JT,{}),children:b.jsx(rx,{})}),b.jsx(qV,{})]})}),ZV=yn({getParentRoute:()=>Mc,path:"/login",component:An(()=>Tn(()=>import("./login-B4k1yizo.js"),__vite__mapDeps([0,1]))),validateSearch:Ua(()=>bn({next:Ve().optional(),client_id:Ve().optional(),redirect_uri:Ve().optional(),response_type:Ve().optional(),state:Ve().optional(),scope:Ve().optional(),code_challenge:Ve().optional(),code_challenge_method:Ve().optional()}))}),YV=yn({getParentRoute:()=>Mc,path:"/auth/$pathname",component:An(()=>Tn(()=>import("./auth-catchall-BAZuaH8l.js"),[]))}),yr=yn({getParentRoute:()=>Mc,id:"shell",component:An(()=>Tn(()=>import("./shell-layout-yGeudWHM.js"),__vite__mapDeps([2,3,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43])))}),KV=yn({getParentRoute:()=>yr,path:"/",component:An(()=>Tn(()=>import("./home-4Azy8yCf.js"),__vite__mapDeps([44,45,1,16,32,43,11,12,13,14])))}),WV=yn({getParentRoute:()=>yr,path:"/$org",component:An(()=>Tn(()=>import("./page-DWpNpeBI.js"),__vite__mapDeps([46,28,1,7,29,30,10,9,31,26,27,15,32,3,5,17,33,34,22,23,35,36,14,12,18,19,20,6,4,37,38,39,40,47,48,42,43,49,50,51])))}),QV=yn({getParentRoute:()=>yr,path:"/$org/members",component:An(()=>Tn(()=>import("./members-CvcRBE7N.js"),__vite__mapDeps([52,53,54,1,21,22,17,7,47,55,56,42,9,57,58,59,60,61,38,27,16,62,12,25,5,63,64,43,40,3,13,19,20,34,45,65,66,67])))}),XV=yn({getParentRoute:()=>yr,path:"/$org/mcps",component:An(()=>Tn(()=>import("./connections-Cyw4vKCR.js"),__vite__mapDeps([68,53,54,1,21,22,17,7,47,55,56,42,9,57,69,45,3,29,30,70,6,12,62,25,5,13,65,71,43,40,35,19,20,34,39,49,27,72]))),validateSearch:Ua(()=>bn({action:ic(["create"]).optional()}))}),JV=yn({getParentRoute:()=>yr,path:"/$org/settings",component:An(()=>Tn(()=>import("./settings-DBVtWxtX.js"),__vite__mapDeps([73,53,54,1,21,22,17,7,47,55,13,5])))}),eH=yn({getParentRoute:()=>yr,path:"/$org/monitoring",component:An(()=>Tn(()=>import("./monitoring-C2NQS-B1.js"),__vite__mapDeps([74,9,1,7,53,54,21,22,17,47,55,56,42,3,62,20,15,23,75,66,76,36,14,77,50,10,61,43,40,59,19,34,78,49,27]))),validateSearch:Ua(()=>bn({tab:ic(["logs","analytics"]).default("logs"),from:Ve().default("now-24h"),to:Ve().default("now"),connectionId:xv(Ve()).optional().default([]),gatewayId:xv(Ve()).optional().default([]),tool:Ve().default(""),status:ic(["all","success","errors"]).default("all"),search:Ve().default(""),page:O2().optional(),streaming:Rg().default(!0),propertyFilters:Ve().default("")}))}),eA=yn({getParentRoute:()=>yr,path:"/$org/store",component:An(()=>Tn(()=>import("./page-4Om70maF.js"),__vite__mapDeps([79,38,53,54,1,21,22,17,7,47,75,80,42,9,72,81,56,64,45,82,83,15,20,67,19,43,29,30,26,27])))}),tH=yn({getParentRoute:()=>eA,path:"/$appName",component:An(()=>Tn(()=>import("./mcp-server-detail-BncapnIe.js"),__vite__mapDeps([84,32,42,1,60,9,7,20,43,21,22,24,85,27,4,82,54,17,47,56,57,45,86,87,78,62,29,30,49,88,89,90,72,39,81,83,37]))),validateSearch:Ua(()=>bn({registryId:Ve().optional(),serverName:Ve().optional(),itemId:Ve().optional()}))}),nH=yn({getParentRoute:()=>yr,path:"/$org/mcps/$connectionId",component:An(()=>Tn(()=>import("./connection-detail-yed7lEwn.js"),__vite__mapDeps([91,9,1,7,3,29,30,92,93,71,43,40,49,27,94,8,4,66,42,86,60,13,19,20,35,10,22,95,90,72,89,82,39,77,18,6,96,78,62,97,54,21,17,47,56,45,23,65,70,57,98,80,16,12,85,87]))),validateSearch:Ua(()=>bn({tab:Ve().optional()}))}),rH=yn({getParentRoute:()=>yr,path:"/$org/mcps/$connectionId/$collectionName/$itemId",component:An(()=>Tn(()=>import("./collection-detail-glRN62L4.js"),__vite__mapDeps([99,9,1,7,3,94,8,13,34,100,86,60,32,36,14,76,23,42,67,92,93,30,71,43,40,29,49,27,4,66,19,20,35,10,22,95,90,72,89,82,39,77,18,6,88,98,41,47,48,33,25,5,63,21,62]))),validateSearch:Ua(()=>bn({replayId:Ve().optional()}))}),oH=yn({getParentRoute:()=>yr,path:"/$org/gateways",component:An(()=>Tn(()=>import("./gateways-BJBU4jqZ.js"),__vite__mapDeps([101,53,54,1,21,22,17,7,47,55,56,42,9,57,69,45,3,10,70,6,12,62,65,40]))),validateSearch:Ua(()=>bn({action:ic(["create"]).optional()}))}),aH=yn({getParentRoute:()=>yr,path:"/$org/gateways/$gatewayId",component:An(()=>Tn(()=>import("./gateway-detail-BfXnCLYA.js"),__vite__mapDeps([102,9,1,7,3,59,60,56,42,43,5,94,8,58,10,96,95,31,26,27,81,25,13,78,62,19,20,34,23,100,37,86]))),validateSearch:Ua(()=>bn({tab:Ve().optional()}))}),iH=yn({getParentRoute:()=>yr,path:"/$org/workflows",component:An(()=>Tn(()=>import("./workflow-DufdLkFQ.js"),__vite__mapDeps([103,38,97,39,9,1,7,54,21,22,17,47,56,42,45,23,65,70,6,40,57,98,80,16,27,94,8,90,29,30,12,43,86,60,53])))}),sH=yn({getParentRoute:()=>Mc,path:"/oauth/callback",component:An(()=>Tn(()=>import("./oauth-callback-CVfImHX4.js"),__vite__mapDeps([104,42,93,30])))}),lH=eA.addChildren([tH]),cH=yr.addChildren([KV,WV,QV,XV,oH,aH,eH,lH,JV,iH,nH,rH]),uH=Mc.addChildren([cH,ZV,YV,sH]),dH=Y5({routeTree:uH}),fH=document.getElementById("root");w4.createRoot(fH).render(b.jsx(E.StrictMode,{children:b.jsx(Q5,{router:dH})}));export{RH as $,GH as A,K4 as B,Uj as C,jH as D,KL as E,EH as F,X$ as G,T8 as H,NH as I,Ua as J,Dw as K,wH as L,O2 as M,bH as N,zj as O,jj as P,Rg as Q,Pj as R,JT as S,Bj as T,HH as U,CH as V,xv as W,IH as X,wv as Y,TH as Z,DH as _,yI as a,On as a$,ic as a0,_i as a1,Tn as a2,l3 as a3,o3 as a4,hH as a5,vx as a6,Xw as a7,mf as a8,uf as a9,cc as aA,oR as aB,Vg as aC,$g as aD,sz as aE,lz as aF,er as aG,In as aH,$U as aI,ex as aJ,U2 as aK,I7 as aL,IR as aM,O7 as aN,vg as aO,L7 as aP,iM as aQ,JO as aR,tT as aS,UU as aT,dB as aU,HR as aV,VH as aW,Tc as aX,_c as aY,kj as aZ,vc as a_,ka as aa,Fo as ab,dn as ac,MR as ad,wi as ae,Ut as af,Go as ag,Ge as ah,Wr as ai,Kr as aj,Ec as ak,rO as al,_z as am,bz as an,pH as ao,F4 as ap,P_ as aq,vH as ar,mH as as,qR as at,tO as au,Ia as av,iz as aw,Hg as ax,hR as ay,Gg as az,mg as b,sv as b0,Sw as b1,Q4 as b2,e3 as b3,a3 as b4,t3 as b5,n3 as b6,Qn as b7,s3 as b8,k_ as b9,DU as bA,LU as bB,PU as bC,kU as bD,BH as bE,FH as bF,$H as bG,UH as bH,tc as bI,G4 as bJ,xw as bK,X8 as bL,jE as bM,SH as bN,_H as bO,J8 as bP,i3 as ba,r3 as bb,z7 as bc,k7 as bd,j7 as be,jg as bf,KU as bg,WU as bh,YU as bi,xH as bj,A2 as bk,xg as bl,MH as bm,o8 as bn,AH as bo,O8 as bp,I8 as bq,Og as br,N8 as bs,xM as bt,OH as bu,zL as bv,PH as bw,kH as bx,LH as by,NU as bz,mc as c,pg as d,zH as e,ik as f,X2 as g,gc as h,Jn as i,b as j,D$ as k,qe as l,qH as m,ZH as n,YH as o,Nw as p,rx as q,E as r,bn as s,$E as t,gH as u,Ve as v,vo as w,mo as x,yH as y,$ as z};
163
+ `),document.head.appendChild(o)}}function VV(e){const t=mc.c(6),{children:n}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={queryKey:Dw.publicConfig(),queryFn:FV,staleTime:1/0},t[0]=o):o=t[0];const{data:i}=Nw(o);let l,c;t[1]!==i.theme?(l=()=>{$V(i.theme)},c=[i.theme],t[1]=i.theme,t[2]=l,t[3]=c):(l=t[2],c=t[3]),E.useLayoutEffect(l,c);let d;return t[4]!==n?(d=b.jsx(b.Fragment,{children:n}),t[4]=n,t[5]=d):d=t[5],d}function JT(){const e=mc.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=b.jsx("div",{className:"flex items-center justify-center min-h-screen",children:b.jsx("div",{className:"text-gray-500",children:"Loading..."})}),e[0]=t):t=e[0],t}const HV=new Y4;function GV(e){const t=mc.c(4),{children:n}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=b.jsx(ZP,{}),t[0]=o):o=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=b.jsx(JT,{}),t[1]=i):i=t[1];let l;return t[2]!==n?(l=b.jsxs(W4,{client:HV,children:[o,b.jsx(E.Suspense,{fallback:i,children:b.jsx(VV,{children:b.jsx(u3,{children:b.jsx(UV,{children:n})})})})]}),t[2]=n,t[3]=l):l=t[3],l}const qV=function(){return null},Mc=U5({component:()=>b.jsxs(GV,{children:[b.jsx(E.Suspense,{fallback:b.jsx(JT,{}),children:b.jsx(rx,{})}),b.jsx(qV,{})]})}),ZV=yn({getParentRoute:()=>Mc,path:"/login",component:An(()=>Tn(()=>import("./login-BPLTUQ2o.js"),__vite__mapDeps([0,1]))),validateSearch:Ua(()=>bn({next:Ve().optional(),client_id:Ve().optional(),redirect_uri:Ve().optional(),response_type:Ve().optional(),state:Ve().optional(),scope:Ve().optional(),code_challenge:Ve().optional(),code_challenge_method:Ve().optional()}))}),YV=yn({getParentRoute:()=>Mc,path:"/auth/$pathname",component:An(()=>Tn(()=>import("./auth-catchall-BkCa4_aN.js"),[]))}),yr=yn({getParentRoute:()=>Mc,id:"shell",component:An(()=>Tn(()=>import("./shell-layout-Boits0hC.js"),__vite__mapDeps([2,3,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42])))}),KV=yn({getParentRoute:()=>yr,path:"/",component:An(()=>Tn(()=>import("./home-DqPSvVQ4.js"),__vite__mapDeps([43,44,1,16,19,42,11,12,13,14])))}),WV=yn({getParentRoute:()=>yr,path:"/$org",component:An(()=>Tn(()=>import("./page-bm876z4u.js"),__vite__mapDeps([45,18,7,1,10,9,19,3,5,17,20,21,22,23,24,25,14,12,26,27,6,4,28,29,30,34,35,15,36,37,38,39,46,47,41,42,48,49,50])))}),QV=yn({getParentRoute:()=>yr,path:"/$org/members",component:An(()=>Tn(()=>import("./members-nhvM4_hF.js"),__vite__mapDeps([51,52,53,1,31,17,7,46,54,55,41,9,56,57,58,59,60,36,22,16,61,12,33,5,62,63,42,39,3,13,26,27,20,44,64,65,66])))}),XV=yn({getParentRoute:()=>yr,path:"/$org/mcps",component:An(()=>Tn(()=>import("./connections-eTByBVoM.js"),__vite__mapDeps([67,52,53,1,31,17,7,46,54,55,41,9,56,68,44,3,29,30,69,6,12,61,33,5,13,64,70,42,39,24,26,27,20,37,48,22,71]))),validateSearch:Ua(()=>bn({action:ic(["create"]).optional()}))}),JV=yn({getParentRoute:()=>yr,path:"/$org/settings",component:An(()=>Tn(()=>import("./settings-Dod8lcbL.js"),__vite__mapDeps([72,52,53,1,31,17,7,46,54,13,5])))}),eH=yn({getParentRoute:()=>yr,path:"/$org/monitoring",component:An(()=>Tn(()=>import("./monitoring-0mZRbE8v.js"),__vite__mapDeps([73,9,1,7,52,53,31,17,46,54,55,41,3,61,27,15,23,74,65,75,25,14,76,49,10,60,42,39,58,26,38,20,77,48,22]))),validateSearch:Ua(()=>bn({tab:ic(["logs","analytics"]).default("logs"),from:Ve().default("now-24h"),to:Ve().default("now"),connectionId:xv(Ve()).optional().default([]),gatewayId:xv(Ve()).optional().default([]),tool:Ve().default(""),status:ic(["all","success","errors"]).default("all"),search:Ve().default(""),page:O2().optional(),streaming:Rg().default(!0),propertyFilters:Ve().default("")}))}),eA=yn({getParentRoute:()=>yr,path:"/$org/store",component:An(()=>Tn(()=>import("./page-CWgyoE-b.js"),__vite__mapDeps([78,36,52,53,1,31,17,7,46,74,79,41,9,71,80,55,63,44,81,82,15,27,66,26,42,29,30,21,22])))}),tH=yn({getParentRoute:()=>eA,path:"/$appName",component:An(()=>Tn(()=>import("./mcp-server-detail-BFJ_9U28.js"),__vite__mapDeps([83,19,41,1,59,9,7,27,42,31,17,32,84,22,4,81,53,46,55,56,44,85,86,77,61,29,30,48,87,88,89,71,37,80,82,28]))),validateSearch:Ua(()=>bn({registryId:Ve().optional(),serverName:Ve().optional(),itemId:Ve().optional()}))}),nH=yn({getParentRoute:()=>yr,path:"/$org/mcps/$connectionId",component:An(()=>Tn(()=>import("./connection-detail-BdAq7uXe.js"),__vite__mapDeps([90,9,1,7,3,29,30,91,92,70,42,39,48,22,93,8,4,65,41,85,59,13,26,27,24,10,17,94,89,71,88,81,37,76,18,19,5,20,21,23,25,14,12,6,28,95,77,61,96,53,31,46,55,44,64,69,56,97,79,16,84,86]))),validateSearch:Ua(()=>bn({tab:Ve().optional()}))}),rH=yn({getParentRoute:()=>yr,path:"/$org/mcps/$connectionId/$collectionName/$itemId",component:An(()=>Tn(()=>import("./collection-detail-BizUvdqx.js"),__vite__mapDeps([98,9,1,7,3,93,8,13,20,99,85,59,19,38,75,23,41,66,91,92,30,70,42,39,29,48,22,4,65,26,27,24,10,17,94,89,71,88,81,37,76,18,5,21,25,14,12,6,28,87,97,40,46,47,33,62,31,61]))),validateSearch:Ua(()=>bn({replayId:Ve().optional()}))}),oH=yn({getParentRoute:()=>yr,path:"/$org/gateways",component:An(()=>Tn(()=>import("./gateways-CQnn2_8x.js"),__vite__mapDeps([100,52,53,1,31,17,7,46,54,55,41,9,56,68,44,3,10,69,6,12,61,64,39]))),validateSearch:Ua(()=>bn({action:ic(["create"]).optional()}))}),aH=yn({getParentRoute:()=>yr,path:"/$org/gateways/$gatewayId",component:An(()=>Tn(()=>import("./gateway-detail-Dd3TUg5f.js"),__vite__mapDeps([101,9,1,7,3,58,59,55,41,42,5,93,8,57,10,95,94,35,21,22,80,33,13,77,61,26,27,20,23,99,28,85]))),validateSearch:Ua(()=>bn({tab:Ve().optional()}))}),iH=yn({getParentRoute:()=>yr,path:"/$org/workflows",component:An(()=>Tn(()=>import("./workflow-DWBbOhIt.js"),__vite__mapDeps([102,36,96,37,9,1,7,53,31,17,46,55,41,44,23,64,69,6,39,56,97,79,16,22,93,8,89,29,30,12,42,85,59,52])))}),sH=yn({getParentRoute:()=>Mc,path:"/oauth/callback",component:An(()=>Tn(()=>import("./oauth-callback-DOKfTw2N.js"),__vite__mapDeps([103,41,92,30])))}),lH=eA.addChildren([tH]),cH=yr.addChildren([KV,WV,QV,XV,oH,aH,eH,lH,JV,iH,nH,rH]),uH=Mc.addChildren([cH,ZV,YV,sH]),dH=Y5({routeTree:uH}),fH=document.getElementById("root");w4.createRoot(fH).render(b.jsx(E.StrictMode,{children:b.jsx(Q5,{router:dH})}));export{RH as $,GH as A,K4 as B,Uj as C,jH as D,KL as E,EH as F,X$ as G,T8 as H,NH as I,Ua as J,Dw as K,wH as L,O2 as M,bH as N,zj as O,jj as P,Rg as Q,Pj as R,JT as S,Bj as T,HH as U,CH as V,xv as W,IH as X,wv as Y,TH as Z,DH as _,yI as a,On as a$,ic as a0,_i as a1,l3 as a2,o3 as a3,hH as a4,vx as a5,Xw as a6,mf as a7,uf as a8,ka as a9,oR as aA,Vg as aB,$g as aC,sz as aD,lz as aE,er as aF,In as aG,$U as aH,ex as aI,U2 as aJ,I7 as aK,IR as aL,O7 as aM,vg as aN,L7 as aO,iM as aP,JO as aQ,tT as aR,UU as aS,dB as aT,HR as aU,VH as aV,Tn as aW,Tc as aX,_c as aY,kj as aZ,vc as a_,Fo as aa,dn as ab,MR as ac,wi as ad,Ut as ae,Go as af,Ge as ag,Wr as ah,Kr as ai,Ec as aj,rO as ak,_z as al,bz as am,pH as an,F4 as ao,P_ as ap,vH as aq,mH as ar,qR as as,tO as at,Ia as au,iz as av,Hg as aw,hR as ax,Gg as ay,cc as az,mg as b,sv as b0,Sw as b1,Q4 as b2,e3 as b3,a3 as b4,t3 as b5,n3 as b6,Qn as b7,s3 as b8,k_ as b9,DU as bA,LU as bB,PU as bC,kU as bD,BH as bE,FH as bF,$H as bG,UH as bH,tc as bI,G4 as bJ,xw as bK,X8 as bL,jE as bM,SH as bN,_H as bO,J8 as bP,i3 as ba,r3 as bb,z7 as bc,k7 as bd,j7 as be,jg as bf,KU as bg,WU as bh,YU as bi,xH as bj,A2 as bk,xg as bl,MH as bm,o8 as bn,AH as bo,O8 as bp,I8 as bq,Og as br,N8 as bs,xM as bt,OH as bu,zL as bv,PH as bw,kH as bx,LH as by,NU as bz,mc as c,pg as d,zH as e,ik as f,X2 as g,gc as h,Jn as i,b as j,D$ as k,qe as l,qH as m,ZH as n,YH as o,Nw as p,rx as q,E as r,bn as s,$E as t,gH as u,Ve as v,vo as w,mo as x,yH as y,$ as z};