@decocms/mesh 2.59.5 → 2.59.6

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 (138) hide show
  1. package/dist/client/assets/{AlertCircle-BmzagJTS.js → AlertCircle-BFXBDrUr.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-BkK50n5W.js → ArrowLeft-CDtoEGeL.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-BjUPYtOi.js → ArrowUp-BDaeP-ZF.js} +1 -1
  4. package/dist/client/assets/{Calendar-DZcEp1o3.js → Calendar-Do1_EcNl.js} +1 -1
  5. package/dist/client/assets/{Check-CeorNg_Q.js → Check-C7bGyGOC.js} +1 -1
  6. package/dist/client/assets/{ChevronDown-DHgzfDOn.js → ChevronDown-DY2hRH3P.js} +1 -1
  7. package/dist/client/assets/{Code01-C3uTkWw7.js → Code01-Bti_O9RL.js} +1 -1
  8. package/dist/client/assets/{Copy01-D2UqUo7F.js → Copy01-Cql6iNiT.js} +1 -1
  9. package/dist/client/assets/{DotsHorizontal-C2Cp4F2y.js → DotsHorizontal-Bn70vF_C.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-CbPPn03K.js → DotsVertical-55vBqpF9.js} +1 -1
  11. package/dist/client/assets/{Download01-BrsFevks.js → Download01-CY_txTIU.js} +1 -1
  12. package/dist/client/assets/{Edit01-D4kKualc.js → Edit01-BcXXA0Bn.js} +1 -1
  13. package/dist/client/assets/{File02-CJChiHT7.js → File02-CZ_CP680.js} +1 -1
  14. package/dist/client/assets/{File06-D3YhRSWf.js → File06-OiAbO58I.js} +1 -1
  15. package/dist/client/assets/{FilterLines-Dm0iR9nQ.js → FilterLines-8ygYuAAi.js} +1 -1
  16. package/dist/client/assets/{Grid01-C0Yt3TrW.js → Grid01-Bdrpv4xX.js} +1 -1
  17. package/dist/client/assets/{Home02-BXCJMmnc.js → Home02-BeNorB_C.js} +1 -1
  18. package/dist/client/assets/{Image01-BxGEkI20.js → Image01-DvLyxsOA.js} +1 -1
  19. package/dist/client/assets/{Inbox01-pqRVnVhd.js → Inbox01-BPkfViyI.js} +1 -1
  20. package/dist/client/assets/{InfoCircle-CItUremO.js → InfoCircle-BJ2AMXf3.js} +1 -1
  21. package/dist/client/assets/{Key01-CG2VBx47.js → Key01-D8HCSb8P.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-CsuKk35n.js → LinkExternal01-BrLuchvz.js} +1 -1
  23. package/dist/client/assets/{List-Tf6_FYvd.js → List-bC7xiZ2s.js} +1 -1
  24. package/dist/client/assets/{Loading01-D7Nk5rBn.js → Loading01-BiNUjLDw.js} +1 -1
  25. package/dist/client/assets/{Lock01-DV6G4OAL.js → Lock01-Bg5yU8Wj.js} +1 -1
  26. package/dist/client/assets/{Pin01-EjlLL7Hj.js → Pin01-iTXtWrRE.js} +1 -1
  27. package/dist/client/assets/{Play-CaQCPrdk.js → Play-C3Hph8xY.js} +1 -1
  28. package/dist/client/assets/{Plus-BAl5ksmH.js → Plus-BuZ2XoBN.js} +1 -1
  29. package/dist/client/assets/{SearchMd-XlpqEN-D.js → SearchMd-BeBVRrdw.js} +1 -1
  30. package/dist/client/assets/{Share07-Dw_Ho0Fm.js → Share07-DldJlk64.js} +1 -1
  31. package/dist/client/assets/{Terminal-BK5I3Y1e.js → Terminal-EcSYzT5u.js} +1 -1
  32. package/dist/client/assets/{Tool01-BLwXizsZ.js → Tool01-CH0MYN-2.js} +1 -1
  33. package/dist/client/assets/{Trash01-CdZ-Jz57.js → Trash01-DSwoFZY0.js} +1 -1
  34. package/dist/client/assets/{Upload01-D7Wikn5K.js → Upload01-CpcqtTNa.js} +1 -1
  35. package/dist/client/assets/{Users03-9f86Wop8.js → Users03-B6orUjW9.js} +1 -1
  36. package/dist/client/assets/{X-CjLPt87f.js → X-DLZk4kqC.js} +1 -1
  37. package/dist/client/assets/{XClose-DSGHFh4M.js → XClose-C2SJXRFh.js} +1 -1
  38. package/dist/client/assets/agent-detail-1edzdNo4.js +1 -0
  39. package/dist/client/assets/{agents-CPStualW.js → agents-CA-rSchF.js} +1 -1
  40. package/dist/client/assets/{alert-dialog-D0Pbwyv-.js → alert-dialog-Dllib4My.js} +1 -1
  41. package/dist/client/assets/{auth-catchall-C8EKwBMn.js → auth-catchall-BOn2OyMJ.js} +1 -1
  42. package/dist/client/assets/{avatar-DwsJKOst.js → avatar-BfuaGHdb.js} +1 -1
  43. package/dist/client/assets/{badge-C6I3bZub.js → badge-DF_3zhMz.js} +1 -1
  44. package/dist/client/assets/{binder-DMkBMJDe.js → binder-CC8WnynZ.js} +1 -1
  45. package/dist/client/assets/{button-BVfOTfpc.js → button-0ydgHweE.js} +1 -1
  46. package/dist/client/assets/{card-C1ZVlkU0.js → card-DFhzHX-B.js} +1 -1
  47. package/dist/client/assets/{checkbox-DAuxoUuR.js → checkbox-JnNCVINs.js} +1 -1
  48. package/dist/client/assets/{circle-alert-DuAEeMx-.js → circle-alert-C96B7toE.js} +1 -1
  49. package/dist/client/assets/{collapsible-GqoDHWGA.js → collapsible-CDAezpyL.js} +1 -1
  50. package/dist/client/assets/{collection-detail-ComoILCe.js → collection-detail-ClXHe-PG.js} +1 -1
  51. package/dist/client/assets/{collection-display-button-ChMvUn2E.js → collection-display-button-C0Qj_mDn.js} +1 -1
  52. package/dist/client/assets/{collection-header-CJErncxY.js → collection-header-CHcRbSVg.js} +1 -1
  53. package/dist/client/assets/{collection-page-Bi-tbERp.js → collection-page-pQhPuVgo.js} +1 -1
  54. package/dist/client/assets/{collection-search-BzoiV2-u.js → collection-search-rOPXHeEr.js} +1 -1
  55. package/dist/client/assets/{collection-tab-1YVo2yy8.js → collection-tab-e3o0S9Wa.js} +1 -1
  56. package/dist/client/assets/{collection-table-wrapper-thG71bGI.js → collection-table-wrapper-C4t2ZZhF.js} +1 -1
  57. package/dist/client/assets/{connect-Cdro5khB.js → connect-DP_OT-gv.js} +1 -1
  58. package/dist/client/assets/{connection-card-ss7oQ1sY.js → connection-card-BLTFMSZS.js} +1 -1
  59. package/dist/client/assets/{connection-detail-D8BVZUed.js → connection-detail-C5TmRjj1.js} +1 -1
  60. package/dist/client/assets/{connections-BmxtYRou.js → connections-I2Vy-typ.js} +1 -1
  61. package/dist/client/assets/{constants-BW4JZ47T.js → constants-Mpett05j.js} +1 -1
  62. package/dist/client/assets/constants-OFVhPv4G.js +1 -0
  63. package/dist/client/assets/{create-organization-dialog-5VVOifK_.js → create-organization-dialog-WqiCWTM4.js} +1 -1
  64. package/dist/client/assets/{dialog-BKc0uyIf.js → dialog-6FUpHXs_.js} +1 -1
  65. package/dist/client/assets/{dropdown-menu-COxc-l2r.js → dropdown-menu-CvHFB3Gz.js} +1 -1
  66. package/dist/client/assets/{dynamic-plugin-layout-D0Ome1yQ.js → dynamic-plugin-layout-Mnd5muQb.js} +1 -1
  67. package/dist/client/assets/{empty-state-Cu7Vuwtc.js → empty-state-7hq4AubF.js} +1 -1
  68. package/dist/client/assets/{empty-state-BA1dna4T.js → empty-state-BJnVPwS4.js} +1 -1
  69. package/dist/client/assets/{env-vars-editor-V0t9-7eJ.js → env-vars-editor--TqeS791.js} +1 -1
  70. package/dist/client/assets/{error-boundary-DGWOOFEb.js → error-boundary-B6RXO2oI.js} +1 -1
  71. package/dist/client/assets/{extract-connection-data-CUU0Xk9N.js → extract-connection-data-Cl2cHkSz.js} +1 -1
  72. package/dist/client/assets/{file-browser-DlzXa6OC.js → file-browser-EXbuz5vW.js} +2 -2
  73. package/dist/client/assets/{form-CVtLpajs.js → form-Bu0daHLu.js} +1 -1
  74. package/dist/client/assets/{grid-view-C-AwkYIf.js → grid-view-C6S8iSjv.js} +1 -1
  75. package/dist/client/assets/{home-CNkoFZIO.js → home-2CTqvtNy.js} +1 -1
  76. package/dist/client/assets/index-6m1DUVC_.js +1 -0
  77. package/dist/client/assets/{index-CCsaEkmm.js → index-BDvGMi--.js} +8 -8
  78. package/dist/client/assets/{index-D47Uffzr.js → index-CXUcNyKS.js} +1 -1
  79. package/dist/client/assets/{index-Der3_fHk.js → index-CymrbMj5.js} +1 -1
  80. package/dist/client/assets/{index-BcdQIGUF.js → index-DZqSbjFw.js} +2 -2
  81. package/dist/client/assets/{index-DmpB2YV8.js → index-Ez2DTosS.js} +1 -1
  82. package/dist/client/assets/{infiniteQueryObserver-DrveVX8A.js → infiniteQueryObserver-DmKtj9SR.js} +1 -1
  83. package/dist/client/assets/{input-CUCPZMz2.js → input-u1hHzCA4.js} +1 -1
  84. package/dist/client/assets/{layout-BbogDOP_.js → layout-DspSCzsh.js} +1 -1
  85. package/dist/client/assets/{localstorage-keys-du1r-Z9U.js → localstorage-keys-DpM3uKv7.js} +1 -1
  86. package/dist/client/assets/{login-DmgPNC9v.js → login-DoMEd-lv.js} +1 -1
  87. package/dist/client/assets/{mcp-oauth-JUhR-zCP.js → mcp-oauth-C7tn4XA4.js} +1 -1
  88. package/dist/client/assets/{mcp-server-card-BljG3HDb.js → mcp-server-card-HpdQ81Kj.js} +1 -1
  89. package/dist/client/assets/{mcp-server-detail-CnzqXowm.js → mcp-server-detail-DhHV0S77.js} +2 -2
  90. package/dist/client/assets/{members-C_HxHJzG.js → members-NoyLiC53.js} +1 -1
  91. package/dist/client/assets/{monaco-editor-CBeaXMU-.js → monaco-editor-CZ0mtshA.js} +1 -1
  92. package/dist/client/assets/{monitoring-Bvmrto3t.js → monitoring-rg9mX2h3.js} +1 -1
  93. package/dist/client/assets/{oauth-callback-CKCDA102.js → oauth-callback-BskSq0jW.js} +1 -1
  94. package/dist/client/assets/{page-CR4MuyMw.js → page-BpnXhWf3.js} +1 -1
  95. package/dist/client/assets/{page-dZAP2FO7.js → page-KXdqzJaF.js} +1 -1
  96. package/dist/client/assets/{pin-to-sidebar-button-D1PDIW9U.js → pin-to-sidebar-button-Bsv2_7kr.js} +1 -1
  97. package/dist/client/assets/{plugin-empty-state-UWD4gqMv.js → plugin-empty-state-rg6DAYSw.js} +1 -1
  98. package/dist/client/assets/{plugin-header--R1hkRV-.js → plugin-header-Cnc4tGD7.js} +1 -1
  99. package/dist/client/assets/{plugins-B39yvsMR.js → plugins-CW7mTNa6.js} +1 -1
  100. package/dist/client/assets/{popover-LSiJhuO3.js → popover-DEmRxXmY.js} +1 -1
  101. package/dist/client/assets/{registry-utils-BtoR-qhS.js → registry-utils-BFBDFgyu.js} +1 -1
  102. package/dist/client/assets/{resizable-CQSJSF2D.js → resizable-akHzriSj.js} +1 -1
  103. package/dist/client/assets/{resource-tabs-4g29YzhM.js → resource-tabs-1el8gNET.js} +1 -1
  104. package/dist/client/assets/{select-Bti-BgCx.js → select-BKwPUbTK.js} +1 -1
  105. package/dist/client/assets/{settings-DiOvc3SE.js → settings-ZWpf163v.js} +1 -1
  106. package/dist/client/assets/{shell-layout-BEh2pmUE.js → shell-layout-D0SSCuI2.js} +2 -2
  107. package/dist/client/assets/{spinner-Fg4ciUuT.js → spinner-Bwqz03rl.js} +1 -1
  108. package/dist/client/assets/{store-invite-fnQnsnI3.js → store-invite-DJTXOg3a.js} +1 -1
  109. package/dist/client/assets/{switch-Dj3WkUS4.js → switch-DNIxf6Z3.js} +1 -1
  110. package/dist/client/assets/{textarea-DeK9qU4Z.js → textarea-CLIBzUIu.js} +1 -1
  111. package/dist/client/assets/{tools-list-BeFKqIIs.js → tools-list-DopNeyHc.js} +1 -1
  112. package/dist/client/assets/{tooltip-DDTkATYg.js → tooltip-9zLX7HP0.js} +1 -1
  113. package/dist/client/assets/{typewriter-title-DbQkTfun.js → typewriter-title-BJariIWR.js} +1 -1
  114. package/dist/client/assets/{use-binding-Cx0cnXwg.js → use-binding-B1LqCJr8.js} +1 -1
  115. package/dist/client/assets/{use-collections-D97KvVa9.js → use-collections-DtjYeVzj.js} +1 -1
  116. package/dist/client/assets/{use-connection-C76BYat1.js → use-connection-BzhGWFyL.js} +1 -1
  117. package/dist/client/assets/{use-create-virtual-mcp-DazESShZ.js → use-create-virtual-mcp-D-7Y6G3j.js} +1 -1
  118. package/dist/client/assets/{use-deco-chat-open-u5zZi1de.js → use-deco-chat-open-CrQFHW7J.js} +1 -1
  119. package/dist/client/assets/{use-list-state-BrsvhCvu.js → use-list-state-BfmIALu7.js} +1 -1
  120. package/dist/client/assets/{use-mcp-prompts-DzCHcPVg.js → use-mcp-prompts-C2Az2O1z.js} +1 -1
  121. package/dist/client/assets/{use-members-BGZRzPKD.js → use-members-KzHxearI.js} +1 -1
  122. package/dist/client/assets/{use-mobile-0MLmfurT.js → use-mobile-VtwOaDa5.js} +1 -1
  123. package/dist/client/assets/{use-organization-settings-K9WNKRlW.js → use-organization-settings-DMGaX8N0.js} +1 -1
  124. package/dist/client/assets/{use-virtual-mcp-TOs4GWZq.js → use-virtual-mcp-D3UgDP8i.js} +1 -1
  125. package/dist/client/assets/useInfiniteQuery-CaX6JmUq.js +1 -0
  126. package/dist/client/assets/{useMutation-C7y5vUn8.js → useMutation-BReaxe_W.js} +1 -1
  127. package/dist/client/assets/useQuery-KlPPWaKy.js +1 -0
  128. package/dist/client/assets/useSuspenseInfiniteQuery-jy6MmqiZ.js +1 -0
  129. package/dist/client/assets/{view-mode-toggle-JXEPDzFm.js → view-mode-toggle-DR9UFNqr.js} +1 -1
  130. package/dist/client/assets/{workflow-BUf_HFcm.js → workflow-B1lnmdqO.js} +1 -1
  131. package/dist/client/index.html +1 -1
  132. package/package.json +1 -1
  133. package/dist/client/assets/agent-detail-7FOys_Jg.js +0 -1
  134. package/dist/client/assets/constants-CBcj5NvV.js +0 -1
  135. package/dist/client/assets/index-DXup9nzR.js +0 -1
  136. package/dist/client/assets/useInfiniteQuery-etEZJXp8.js +0 -1
  137. package/dist/client/assets/useQuery-frKnQxkY.js +0 -1
  138. package/dist/client/assets/useSuspenseInfiniteQuery-7GUdjJBj.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a as v}from"./binder-DMkBMJDe.js";import{b7 as T,a1 as O,o as t,s as e,b8 as p,n as l,b9 as c,ba as R,bb as U,bc as i,_ as x,bd as u,be as g,bf as n,bg as b,bh as L,bi as B,bj as C}from"./index-BcdQIGUF.js";const W=O.extend({avatar:e().describe("URL or data URI to the assistant's avatar image"),system_prompt:e().describe("System prompt that defines the assistant's behavior"),virtual_mcp_id:e().describe("Virtual MCP ID to use for this assistant"),model:t({id:e().describe("Model ID"),connectionId:e().describe("Connection ID that provides the model")}).describe("Selected model reference for this assistant")}),F=T("assistant",W),G=[...F],w=L(()=>u([B(),e(),i(),g(),p(e(),w),l(w)])),f=p(e(),p(e(),w)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),E=t({type:n("text"),text:e().describe("The text content"),providerOptions:f}),q=t({type:n("text"),text:e().describe("The text content"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),j=e().describe("File data as URL string"),k=t({type:n("file"),filename:e().optional().describe("Optional filename of the file"),data:j,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:f}),$=t({type:n("file"),mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),data:e().describe("Generated file data as base64 encoded string")}),J=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerOptions:f}),K=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),V=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call, used to match with tool result"),toolName:e().describe("Name of the tool being called"),input:e().describe("Arguments of the tool call (JSON-serializable object matching tool input schema)"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerOptions:f}),z=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call"),toolName:e().describe("Name of the tool being called"),input:e().describe("Stringified JSON object with the tool call arguments"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),H=u([t({type:n("text"),value:e()}),t({type:n("json"),value:w}),t({type:n("error-text"),value:e()}),t({type:n("error-json"),value:w}),t({type:n("content"),value:l(u([t({type:n("text"),text:e().describe("Text content")}),t({type:n("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))})]),A=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output:H.describe("Result of the tool call"),result:b().describe("Unknown result of the tool call"),providerOptions:f}),X=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),result:c().describe("Result of the tool call (JSON-serializable)"),isError:g().optional().describe("Whether the result is an error or error message"),providerExecuted:g().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),Y=u([t({type:n("source"),sourceType:n("url"),id:e().describe("The ID of the source"),url:e().describe("The URL of the source"),title:e().optional().describe("The title of the source"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),t({type:n("source"),sourceType:n("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:c().optional().describe("Additional provider-specific metadata")})]),Z=t({role:n("system"),content:e().describe("System message content"),providerOptions:f}),Q=t({role:n("user"),content:l(u([E,k])).describe("User message content parts (text or file)"),providerOptions:f}),ee=t({role:n("assistant"),content:l(u([E,k,J,V,A])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:f}),te=t({role:n("tool"),content:l(A).describe("Tool message content (tool results)"),providerOptions:f}),oe=u([Z,Q,ee,te]),ae=l(oe).describe("A list of messages forming the prompt"),ie=t({prompt:ae.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:i().optional().describe("Maximum number of tokens to generate"),temperature:i().optional().describe("Temperature setting. The range depends on the provider and model"),topP:i().optional().describe("Nucleus sampling parameter"),topK:i().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:i().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:i().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:i().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:l(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:u([t({type:n("text")}),t({type:n("json"),schema:c().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:l(c()).optional().describe("The tools that are available for the model"),toolChoice:c().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:g().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:c().optional().describe("Abort signal for cancelling the operation"),providerOptions:c().optional().describe("Additional provider-specific options")}),ne=t({content:l(u([q,$,K,z,X,Y])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:x(["stop","length","content-filter","tool-calls","error","other","unknown"]).describe("Reason why generation stopped"),usage:U({inputTokens:i().optional(),outputTokens:i().optional(),totalTokens:i().optional(),reasoningTokens:i().optional()}).describe("Usage information for the language model call"),providerMetadata:c().optional().describe("Additional provider-specific metadata"),request:t({body:c().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({id:e().optional().describe("ID for the generated response"),timestamp:R().optional().describe("Timestamp for the start of the generated response"),modelId:e().optional().describe("The ID of the response model that was used"),headers:p(e(),e()).optional().describe("Response headers"),body:c().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:l(c()).describe("Warnings for the call, e.g. unsupported settings")});t({stream:c().describe("ReadableStream of LanguageModelV2StreamPart"),request:t({body:c().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({headers:p(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const se=t({supportedUrls:p(e(),l(e())).describe("Supported URL patterns by media type for the provider")});t({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:l(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const N=t({modelId:e().describe("The ID of the model"),callOptions:ie}),re=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:l(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),le=T("llm",re,{readOnly:!0}),ce=[{name:"LLM_METADATA",inputSchema:t({modelId:e().describe("The ID of the model")}),outputSchema:se},{name:"LLM_DO_STREAM",inputSchema:N,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:N,outputSchema:ne},...le],de=t({scopes:l(e()).describe("List of scopes available"),stateSchema:p(e(),b()).describe("JSON Schema (draft-07) defining the state structure")}),pe=[{name:"MCP_CONFIGURATION",inputSchema:t({}),outputSchema:de}],ue=t({toolName:e().describe("Name of the tool to invoke on that connection"),transformCode:e().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(input): Output { ... }`\n The input will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output. \n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),me=t({code:e().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(input): Output { ... }\`
1
+ import{a as v}from"./binder-CC8WnynZ.js";import{b7 as T,a1 as O,o as t,s as e,b8 as p,n as l,b9 as c,ba as R,bb as U,bc as i,_ as x,bd as u,be as g,bf as n,bg as b,bh as L,bi as B,bj as C}from"./index-DZqSbjFw.js";const W=O.extend({avatar:e().describe("URL or data URI to the assistant's avatar image"),system_prompt:e().describe("System prompt that defines the assistant's behavior"),virtual_mcp_id:e().describe("Virtual MCP ID to use for this assistant"),model:t({id:e().describe("Model ID"),connectionId:e().describe("Connection ID that provides the model")}).describe("Selected model reference for this assistant")}),F=T("assistant",W),G=[...F],w=L(()=>u([B(),e(),i(),g(),p(e(),w),l(w)])),f=p(e(),p(e(),w)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),E=t({type:n("text"),text:e().describe("The text content"),providerOptions:f}),q=t({type:n("text"),text:e().describe("The text content"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),j=e().describe("File data as URL string"),k=t({type:n("file"),filename:e().optional().describe("Optional filename of the file"),data:j,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:f}),$=t({type:n("file"),mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),data:e().describe("Generated file data as base64 encoded string")}),J=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerOptions:f}),K=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),V=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call, used to match with tool result"),toolName:e().describe("Name of the tool being called"),input:e().describe("Arguments of the tool call (JSON-serializable object matching tool input schema)"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerOptions:f}),z=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call"),toolName:e().describe("Name of the tool being called"),input:e().describe("Stringified JSON object with the tool call arguments"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),H=u([t({type:n("text"),value:e()}),t({type:n("json"),value:w}),t({type:n("error-text"),value:e()}),t({type:n("error-json"),value:w}),t({type:n("content"),value:l(u([t({type:n("text"),text:e().describe("Text content")}),t({type:n("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))})]),A=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output:H.describe("Result of the tool call"),result:b().describe("Unknown result of the tool call"),providerOptions:f}),X=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),result:c().describe("Result of the tool call (JSON-serializable)"),isError:g().optional().describe("Whether the result is an error or error message"),providerExecuted:g().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),Y=u([t({type:n("source"),sourceType:n("url"),id:e().describe("The ID of the source"),url:e().describe("The URL of the source"),title:e().optional().describe("The title of the source"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),t({type:n("source"),sourceType:n("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:c().optional().describe("Additional provider-specific metadata")})]),Z=t({role:n("system"),content:e().describe("System message content"),providerOptions:f}),Q=t({role:n("user"),content:l(u([E,k])).describe("User message content parts (text or file)"),providerOptions:f}),ee=t({role:n("assistant"),content:l(u([E,k,J,V,A])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:f}),te=t({role:n("tool"),content:l(A).describe("Tool message content (tool results)"),providerOptions:f}),oe=u([Z,Q,ee,te]),ae=l(oe).describe("A list of messages forming the prompt"),ie=t({prompt:ae.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:i().optional().describe("Maximum number of tokens to generate"),temperature:i().optional().describe("Temperature setting. The range depends on the provider and model"),topP:i().optional().describe("Nucleus sampling parameter"),topK:i().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:i().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:i().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:i().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:l(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:u([t({type:n("text")}),t({type:n("json"),schema:c().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:l(c()).optional().describe("The tools that are available for the model"),toolChoice:c().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:g().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:c().optional().describe("Abort signal for cancelling the operation"),providerOptions:c().optional().describe("Additional provider-specific options")}),ne=t({content:l(u([q,$,K,z,X,Y])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:x(["stop","length","content-filter","tool-calls","error","other","unknown"]).describe("Reason why generation stopped"),usage:U({inputTokens:i().optional(),outputTokens:i().optional(),totalTokens:i().optional(),reasoningTokens:i().optional()}).describe("Usage information for the language model call"),providerMetadata:c().optional().describe("Additional provider-specific metadata"),request:t({body:c().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({id:e().optional().describe("ID for the generated response"),timestamp:R().optional().describe("Timestamp for the start of the generated response"),modelId:e().optional().describe("The ID of the response model that was used"),headers:p(e(),e()).optional().describe("Response headers"),body:c().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:l(c()).describe("Warnings for the call, e.g. unsupported settings")});t({stream:c().describe("ReadableStream of LanguageModelV2StreamPart"),request:t({body:c().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({headers:p(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const se=t({supportedUrls:p(e(),l(e())).describe("Supported URL patterns by media type for the provider")});t({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:l(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const N=t({modelId:e().describe("The ID of the model"),callOptions:ie}),re=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:l(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),le=T("llm",re,{readOnly:!0}),ce=[{name:"LLM_METADATA",inputSchema:t({modelId:e().describe("The ID of the model")}),outputSchema:se},{name:"LLM_DO_STREAM",inputSchema:N,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:N,outputSchema:ne},...le],de=t({scopes:l(e()).describe("List of scopes available"),stateSchema:p(e(),b()).describe("JSON Schema (draft-07) defining the state structure")}),pe=[{name:"MCP_CONFIGURATION",inputSchema:t({}),outputSchema:de}],ue=t({toolName:e().describe("Name of the tool to invoke on that connection"),transformCode:e().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(input): Output { ... }`\n The input will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output. \n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),me=t({code:e().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(input): Output { ... }\`
2
2
  The input is the resolved value of the references in the input field. Example:
3
3
  {
4
4
  "input": {
@@ -1 +1 @@
1
- import{c as $,q as x,ab as I,ao as K}from"./index-BcdQIGUF.js";import{u as P}from"./useMutation-C7y5vUn8.js";import{u as Q}from"./useQuery-frKnQxkY.js";import{K as A}from"./constants-BW4JZ47T.js";function H(n){const e=$.c(12);let o,s;e[0]!==n?({client:o,...s}=n,e[0]=n,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let t;e[3]!==o?(t=A.mcpToolsList(o),e[3]=o,e[4]=t):t=e[4];let l;e[5]!==o?(l=async()=>await o.listTools(),e[5]=o,e[6]=l):l=e[6];const a=s.staleTime??3e4;let r;return e[7]!==s||e[8]!==t||e[9]!==l||e[10]!==a?(r={...s,queryKey:t,queryFn:l,staleTime:a,retry:!1},e[7]=s,e[8]=t,e[9]=l,e[10]=a,e[11]=r):r=e[11],x(r)}function V(n){const e=$.c(12);let o,s;e[0]!==n?({client:o,...s}=n,e[0]=n,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let t;e[3]!==o?(t=A.mcpToolsList(o),e[3]=o,e[4]=t):t=e[4];let l;e[5]!==o?(l=async()=>await o.listTools(),e[5]=o,e[6]=l):l=e[6];const a=s.staleTime??3e4;let r;return e[7]!==s||e[8]!==t||e[9]!==l||e[10]!==a?(r={...s,queryKey:t,queryFn:l,staleTime:a,retry:!1},e[7]=s,e[8]=t,e[9]=l,e[10]=a,e[11]=r):r=e[11],Q(r)}function U(n){const e=$.c(21);let o,s,t,l;e[0]!==n?({client:o,toolName:l,toolArguments:t,...s}=n,e[0]=n,e[1]=o,e[2]=s,e[3]=t,e[4]=l):(o=e[1],s=e[2],t=e[3],l=e[4]);let a,r,u;if(e[5]!==o||e[6]!==s||e[7]!==t||e[8]!==l){const p=JSON.stringify(t??{});u=x,a=s,r=A.mcpToolCall(o,l,p),e[5]=o,e[6]=s,e[7]=t,e[8]=l,e[9]=a,e[10]=r,e[11]=u}else a=e[9],r=e[10],u=e[11];let i;e[12]!==o||e[13]!==t||e[14]!==l?(i=async()=>await o.callTool({name:l,arguments:t}),e[12]=o,e[13]=t,e[14]=l,e[15]=i):i=e[15];const f=s.staleTime??3e4;let c;return e[16]!==a||e[17]!==r||e[18]!==i||e[19]!==f?(c={...a,queryKey:r,queryFn:i,staleTime:f,retry:!1},e[16]=a,e[17]=r,e[18]=i,e[19]=f,e[20]=c):c=e[20],u(c)}function X(n){const e=$.c(21);let o,s,t,l;e[0]!==n?({client:o,toolName:l,toolArguments:t,...s}=n,e[0]=n,e[1]=o,e[2]=s,e[3]=t,e[4]=l):(o=e[1],s=e[2],t=e[3],l=e[4]);let a,r,u;if(e[5]!==o||e[6]!==s||e[7]!==t||e[8]!==l){const p=JSON.stringify(t??{});u=Q,a=s,r=A.mcpToolCall(o,l,p),e[5]=o,e[6]=s,e[7]=t,e[8]=l,e[9]=a,e[10]=r,e[11]=u}else a=e[9],r=e[10],u=e[11];let i;e[12]!==o||e[13]!==t||e[14]!==l?(i=async()=>await o.callTool({name:l,arguments:t}),e[12]=o,e[13]=t,e[14]=l,e[15]=i):i=e[15];const f=s.staleTime??3e4;let c;return e[16]!==a||e[17]!==r||e[18]!==i||e[19]!==f?(c={...a,queryKey:r,queryFn:i,staleTime:f,retry:!1},e[16]=a,e[17]=r,e[18]=i,e[19]=f,e[20]=c):c=e[20],u(c)}function Z(n){const e=$.c(8);let o,s;e[0]!==n?({client:o,...s}=n,e[0]=n,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let t;e[3]!==o?(t=async a=>await o.callTool(a),e[3]=o,e[4]=t):t=e[4];let l;return e[5]!==s||e[6]!==t?(l={...s,mutationFn:t},e[5]=s,e[6]=t,e[7]=l):l=e[7],P(l)}function D(n,e,o){const s=[];if(n?.trim()){const t=n.trim(),l=o.map(a=>({field:[String(a)],operator:"contains",value:t}));l.length===1&&l[0]?s.push(l[0]):l.length>1&&s.push({operator:"or",conditions:l})}if(e&&e.length>0)for(const t of e)s.push({field:[t.column],operator:"eq",value:t.value});if(s.length!==0)return s.length===1?s[0]:{operator:"and",conditions:s}}function k(n,e,o){const s=n??o,t=e??"asc";return[{field:[String(s)],direction:t}]}function v(n){const e=n;return e&&typeof e=="object"&&"structuredContent"in e?e.structuredContent:e}function ee(n,e,o,s){const t=$.c(13);let l;t[0]!==e?(l=e.toUpperCase(),t[0]=e,t[1]=l):l=t[1];const r=`COLLECTION_${l}_GET`;let u;t[2]!==s||t[3]!==r||t[4]!==o?(u=A.mcpToolCall(s,r,o??""),t[2]=s,t[3]=r,t[4]=o,t[5]=u):u=t[5];let i;t[6]!==s||t[7]!==r||t[8]!==o?(i=async()=>{if(!o)return{item:null};const p=await s.callTool({name:r,arguments:{id:o}});return v(p)},t[6]=s,t[7]=r,t[8]=o,t[9]=i):i=t[9];let f;t[10]!==u||t[11]!==i?(f={queryKey:u,queryFn:i,staleTime:6e4},t[10]=u,t[11]=i,t[12]=f):f=t[12];const{data:c}=x(f);return c?.item??null}function te(n,e,o,s){const t=$.c(26);let l;t[0]!==s?(l=s===void 0?{}:s,t[0]=s,t[1]=l):l=t[1];const a=l,{searchTerm:r,filters:u,sortKey:i,sortDirection:f,searchFields:c,defaultSortKey:p,pageSize:E}=a;let _;t[2]!==c?(_=c===void 0?["title","description"]:c,t[2]=c,t[3]=_):_=t[3];const h=_,T=p===void 0?"updated_at":p,C=E===void 0?100:E;let O;t[4]!==e?(O=e.toUpperCase(),t[4]=e,t[5]=O):O=t[5];const g=`COLLECTION_${O}_LIST`;let d;t[6]!==u||t[7]!==h||t[8]!==r?(d=D(r,u,h),t[6]=u,t[7]=h,t[8]=r,t[9]=d):d=t[9];const L=d;let N;t[10]!==T||t[11]!==f||t[12]!==i?(N=k(i,f,T),t[10]=T,t[11]=f,t[12]=i,t[13]=N):N=t[13];const S=N;let y;t[14]!==L?(y=L&&{where:L},t[14]=L,t[15]=y):y=t[15];let m;t[16]!==S?(m=S&&{orderBy:S},t[16]=S,t[17]=m):m=t[17];let q;t[18]!==C||t[19]!==m||t[20]!==y?(q={...y,...m,limit:C,offset:0},t[18]=C,t[19]=m,t[20]=y,t[21]=q):q=t[21];const F=q;let w;t[22]!==o||t[23]!==g||t[24]!==F?(w={client:o,toolName:g,toolArguments:F,select:z},t[22]=o,t[23]=g,t[24]=F,t[25]=w):w=t[25];const{data:b}=U(w);return b}function z(n){return v(n)?.items??[]}function se(n,e,o){const s=$.c(33),t=I();let l;s[0]!==e?(l=e.toUpperCase(),s[0]=e,s[1]=l):l=s[1];const a=l,r=`COLLECTION_${a}_CREATE`,u=`COLLECTION_${a}_UPDATE`,i=`COLLECTION_${a}_DELETE`;let f;s[2]!==t||s[3]!==a?(f=()=>{t.invalidateQueries({predicate:y=>{const m=y.queryKey;return m[0]!=="mcp"||m[1]!=="client"||m[3]!=="tool-call"?!1:m[4]?.startsWith(`COLLECTION_${a}_`)}})},s[2]=t,s[3]=a,s[4]=f):f=s[4];const c=f;let p;s[5]!==o||s[6]!==r?(p=async y=>{const m=await o.callTool({name:r,arguments:{data:y}});if(m.isError)throw new Error(Array.isArray(m.content)?m.content[0]?.text:String(m.content));return v(m).item},s[5]=o,s[6]=r,s[7]=p):p=s[7];let E;s[8]!==c?(E=()=>{c(),K.success("Item created successfully")},s[8]=c,s[9]=E):E=s[9];let _;s[10]!==p||s[11]!==E?(_={mutationFn:p,onSuccess:E,onError:R},s[10]=p,s[11]=E,s[12]=_):_=s[12];const h=P(_);let T;s[13]!==o||s[14]!==u?(T=async y=>{const{id:m,data:q}=y,F=await o.callTool({name:u,arguments:{id:m,data:q}});return v(F).item},s[13]=o,s[14]=u,s[15]=T):T=s[15];let C;s[16]!==c?(C=()=>{c(),K.success("Item updated successfully")},s[16]=c,s[17]=C):C=s[17];let O;s[18]!==T||s[19]!==C?(O={mutationFn:T,onSuccess:C,onError:J},s[18]=T,s[19]=C,s[20]=O):O=s[20];const M=P(O);let g;s[21]!==o||s[22]!==i?(g=async y=>{const m=await o.callTool({name:i,arguments:{id:y}});return v(m).item.id},s[21]=o,s[22]=i,s[23]=g):g=s[23];let d;s[24]!==c?(d=()=>{c(),K.success("Item deleted successfully")},s[24]=c,s[25]=d):d=s[25];let L;s[26]!==g||s[27]!==d?(L={mutationFn:g,onSuccess:d,onError:B},s[26]=g,s[27]=d,s[28]=L):L=s[28];const N=P(L);let S;return s[29]!==h||s[30]!==N||s[31]!==M?(S={create:h,update:M,delete:N},s[29]=h,s[30]=N,s[31]=M,s[32]=S):S=s[32],S}function B(n){const e=n instanceof Error?n.message:String(n);K.error(`Failed to delete item: ${e}`)}function J(n){const e=n instanceof Error?n.message:String(n);K.error(`Failed to update item: ${e}`)}function R(n){const e=n instanceof Error?n.message:String(n);K.error(`Failed to create item: ${e}`)}export{ee as a,te as b,U as c,Z as d,X as e,H as f,V as g,se as u};
1
+ import{c as $,q as x,ab as I,ao as K}from"./index-DZqSbjFw.js";import{u as P}from"./useMutation-BReaxe_W.js";import{u as Q}from"./useQuery-KlPPWaKy.js";import{K as A}from"./constants-Mpett05j.js";function H(n){const e=$.c(12);let o,s;e[0]!==n?({client:o,...s}=n,e[0]=n,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let t;e[3]!==o?(t=A.mcpToolsList(o),e[3]=o,e[4]=t):t=e[4];let l;e[5]!==o?(l=async()=>await o.listTools(),e[5]=o,e[6]=l):l=e[6];const a=s.staleTime??3e4;let r;return e[7]!==s||e[8]!==t||e[9]!==l||e[10]!==a?(r={...s,queryKey:t,queryFn:l,staleTime:a,retry:!1},e[7]=s,e[8]=t,e[9]=l,e[10]=a,e[11]=r):r=e[11],x(r)}function V(n){const e=$.c(12);let o,s;e[0]!==n?({client:o,...s}=n,e[0]=n,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let t;e[3]!==o?(t=A.mcpToolsList(o),e[3]=o,e[4]=t):t=e[4];let l;e[5]!==o?(l=async()=>await o.listTools(),e[5]=o,e[6]=l):l=e[6];const a=s.staleTime??3e4;let r;return e[7]!==s||e[8]!==t||e[9]!==l||e[10]!==a?(r={...s,queryKey:t,queryFn:l,staleTime:a,retry:!1},e[7]=s,e[8]=t,e[9]=l,e[10]=a,e[11]=r):r=e[11],Q(r)}function U(n){const e=$.c(21);let o,s,t,l;e[0]!==n?({client:o,toolName:l,toolArguments:t,...s}=n,e[0]=n,e[1]=o,e[2]=s,e[3]=t,e[4]=l):(o=e[1],s=e[2],t=e[3],l=e[4]);let a,r,u;if(e[5]!==o||e[6]!==s||e[7]!==t||e[8]!==l){const p=JSON.stringify(t??{});u=x,a=s,r=A.mcpToolCall(o,l,p),e[5]=o,e[6]=s,e[7]=t,e[8]=l,e[9]=a,e[10]=r,e[11]=u}else a=e[9],r=e[10],u=e[11];let i;e[12]!==o||e[13]!==t||e[14]!==l?(i=async()=>await o.callTool({name:l,arguments:t}),e[12]=o,e[13]=t,e[14]=l,e[15]=i):i=e[15];const f=s.staleTime??3e4;let c;return e[16]!==a||e[17]!==r||e[18]!==i||e[19]!==f?(c={...a,queryKey:r,queryFn:i,staleTime:f,retry:!1},e[16]=a,e[17]=r,e[18]=i,e[19]=f,e[20]=c):c=e[20],u(c)}function X(n){const e=$.c(21);let o,s,t,l;e[0]!==n?({client:o,toolName:l,toolArguments:t,...s}=n,e[0]=n,e[1]=o,e[2]=s,e[3]=t,e[4]=l):(o=e[1],s=e[2],t=e[3],l=e[4]);let a,r,u;if(e[5]!==o||e[6]!==s||e[7]!==t||e[8]!==l){const p=JSON.stringify(t??{});u=Q,a=s,r=A.mcpToolCall(o,l,p),e[5]=o,e[6]=s,e[7]=t,e[8]=l,e[9]=a,e[10]=r,e[11]=u}else a=e[9],r=e[10],u=e[11];let i;e[12]!==o||e[13]!==t||e[14]!==l?(i=async()=>await o.callTool({name:l,arguments:t}),e[12]=o,e[13]=t,e[14]=l,e[15]=i):i=e[15];const f=s.staleTime??3e4;let c;return e[16]!==a||e[17]!==r||e[18]!==i||e[19]!==f?(c={...a,queryKey:r,queryFn:i,staleTime:f,retry:!1},e[16]=a,e[17]=r,e[18]=i,e[19]=f,e[20]=c):c=e[20],u(c)}function Z(n){const e=$.c(8);let o,s;e[0]!==n?({client:o,...s}=n,e[0]=n,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let t;e[3]!==o?(t=async a=>await o.callTool(a),e[3]=o,e[4]=t):t=e[4];let l;return e[5]!==s||e[6]!==t?(l={...s,mutationFn:t},e[5]=s,e[6]=t,e[7]=l):l=e[7],P(l)}function D(n,e,o){const s=[];if(n?.trim()){const t=n.trim(),l=o.map(a=>({field:[String(a)],operator:"contains",value:t}));l.length===1&&l[0]?s.push(l[0]):l.length>1&&s.push({operator:"or",conditions:l})}if(e&&e.length>0)for(const t of e)s.push({field:[t.column],operator:"eq",value:t.value});if(s.length!==0)return s.length===1?s[0]:{operator:"and",conditions:s}}function k(n,e,o){const s=n??o,t=e??"asc";return[{field:[String(s)],direction:t}]}function v(n){const e=n;return e&&typeof e=="object"&&"structuredContent"in e?e.structuredContent:e}function ee(n,e,o,s){const t=$.c(13);let l;t[0]!==e?(l=e.toUpperCase(),t[0]=e,t[1]=l):l=t[1];const r=`COLLECTION_${l}_GET`;let u;t[2]!==s||t[3]!==r||t[4]!==o?(u=A.mcpToolCall(s,r,o??""),t[2]=s,t[3]=r,t[4]=o,t[5]=u):u=t[5];let i;t[6]!==s||t[7]!==r||t[8]!==o?(i=async()=>{if(!o)return{item:null};const p=await s.callTool({name:r,arguments:{id:o}});return v(p)},t[6]=s,t[7]=r,t[8]=o,t[9]=i):i=t[9];let f;t[10]!==u||t[11]!==i?(f={queryKey:u,queryFn:i,staleTime:6e4},t[10]=u,t[11]=i,t[12]=f):f=t[12];const{data:c}=x(f);return c?.item??null}function te(n,e,o,s){const t=$.c(26);let l;t[0]!==s?(l=s===void 0?{}:s,t[0]=s,t[1]=l):l=t[1];const a=l,{searchTerm:r,filters:u,sortKey:i,sortDirection:f,searchFields:c,defaultSortKey:p,pageSize:E}=a;let _;t[2]!==c?(_=c===void 0?["title","description"]:c,t[2]=c,t[3]=_):_=t[3];const h=_,T=p===void 0?"updated_at":p,C=E===void 0?100:E;let O;t[4]!==e?(O=e.toUpperCase(),t[4]=e,t[5]=O):O=t[5];const g=`COLLECTION_${O}_LIST`;let d;t[6]!==u||t[7]!==h||t[8]!==r?(d=D(r,u,h),t[6]=u,t[7]=h,t[8]=r,t[9]=d):d=t[9];const L=d;let N;t[10]!==T||t[11]!==f||t[12]!==i?(N=k(i,f,T),t[10]=T,t[11]=f,t[12]=i,t[13]=N):N=t[13];const S=N;let y;t[14]!==L?(y=L&&{where:L},t[14]=L,t[15]=y):y=t[15];let m;t[16]!==S?(m=S&&{orderBy:S},t[16]=S,t[17]=m):m=t[17];let q;t[18]!==C||t[19]!==m||t[20]!==y?(q={...y,...m,limit:C,offset:0},t[18]=C,t[19]=m,t[20]=y,t[21]=q):q=t[21];const F=q;let w;t[22]!==o||t[23]!==g||t[24]!==F?(w={client:o,toolName:g,toolArguments:F,select:z},t[22]=o,t[23]=g,t[24]=F,t[25]=w):w=t[25];const{data:b}=U(w);return b}function z(n){return v(n)?.items??[]}function se(n,e,o){const s=$.c(33),t=I();let l;s[0]!==e?(l=e.toUpperCase(),s[0]=e,s[1]=l):l=s[1];const a=l,r=`COLLECTION_${a}_CREATE`,u=`COLLECTION_${a}_UPDATE`,i=`COLLECTION_${a}_DELETE`;let f;s[2]!==t||s[3]!==a?(f=()=>{t.invalidateQueries({predicate:y=>{const m=y.queryKey;return m[0]!=="mcp"||m[1]!=="client"||m[3]!=="tool-call"?!1:m[4]?.startsWith(`COLLECTION_${a}_`)}})},s[2]=t,s[3]=a,s[4]=f):f=s[4];const c=f;let p;s[5]!==o||s[6]!==r?(p=async y=>{const m=await o.callTool({name:r,arguments:{data:y}});if(m.isError)throw new Error(Array.isArray(m.content)?m.content[0]?.text:String(m.content));return v(m).item},s[5]=o,s[6]=r,s[7]=p):p=s[7];let E;s[8]!==c?(E=()=>{c(),K.success("Item created successfully")},s[8]=c,s[9]=E):E=s[9];let _;s[10]!==p||s[11]!==E?(_={mutationFn:p,onSuccess:E,onError:R},s[10]=p,s[11]=E,s[12]=_):_=s[12];const h=P(_);let T;s[13]!==o||s[14]!==u?(T=async y=>{const{id:m,data:q}=y,F=await o.callTool({name:u,arguments:{id:m,data:q}});return v(F).item},s[13]=o,s[14]=u,s[15]=T):T=s[15];let C;s[16]!==c?(C=()=>{c(),K.success("Item updated successfully")},s[16]=c,s[17]=C):C=s[17];let O;s[18]!==T||s[19]!==C?(O={mutationFn:T,onSuccess:C,onError:J},s[18]=T,s[19]=C,s[20]=O):O=s[20];const M=P(O);let g;s[21]!==o||s[22]!==i?(g=async y=>{const m=await o.callTool({name:i,arguments:{id:y}});return v(m).item.id},s[21]=o,s[22]=i,s[23]=g):g=s[23];let d;s[24]!==c?(d=()=>{c(),K.success("Item deleted successfully")},s[24]=c,s[25]=d):d=s[25];let L;s[26]!==g||s[27]!==d?(L={mutationFn:g,onSuccess:d,onError:B},s[26]=g,s[27]=d,s[28]=L):L=s[28];const N=P(L);let S;return s[29]!==h||s[30]!==N||s[31]!==M?(S={create:h,update:M,delete:N},s[29]=h,s[30]=N,s[31]=M,s[32]=S):S=s[32],S}function B(n){const e=n instanceof Error?n.message:String(n);K.error(`Failed to delete item: ${e}`)}function J(n){const e=n instanceof Error?n.message:String(n);K.error(`Failed to update item: ${e}`)}function R(n){const e=n instanceof Error?n.message:String(n);K.error(`Failed to create item: ${e}`)}export{ee as a,te as b,U as c,Z as d,X as e,H as f,V as g,se as u};
@@ -1 +1 @@
1
- import{c,u as r}from"./index-BcdQIGUF.js";import{b as C,u as a,a as I}from"./use-collections-D97KvVa9.js";import{a as d,u as l}from"./constants-BW4JZ47T.js";function p(t){const o=c.c(4);let n;o[0]!==t?(n=t===void 0?{}:t,o[0]=t,o[1]=n):n=o[1];const e=n,{org:i}=r();let s;o[2]!==i.id?(s={connectionId:d,orgId:i.id},o[2]=i.id,o[3]=s):s=o[3];const u=l(s);return C(i.id,"CONNECTIONS",u,e)}function g(t){const o=c.c(2),{org:n}=r();let e;o[0]!==n.id?(e={connectionId:d,orgId:n.id},o[0]=n.id,o[1]=e):e=o[1];const i=l(e);return I(n.id,"CONNECTIONS",t,i)}function O(){const t=c.c(2),{org:o}=r();let n;t[0]!==o.id?(n={connectionId:d,orgId:o.id},t[0]=o.id,t[1]=n):n=t[1];const e=l(n);return a(o.id,"CONNECTIONS",e)}export{O as a,p as b,g as u};
1
+ import{c,u as r}from"./index-DZqSbjFw.js";import{b as C,u as a,a as I}from"./use-collections-DtjYeVzj.js";import{a as d,u as l}from"./constants-Mpett05j.js";function p(t){const o=c.c(4);let n;o[0]!==t?(n=t===void 0?{}:t,o[0]=t,o[1]=n):n=o[1];const e=n,{org:i}=r();let s;o[2]!==i.id?(s={connectionId:d,orgId:i.id},o[2]=i.id,o[3]=s):s=o[3];const u=l(s);return C(i.id,"CONNECTIONS",u,e)}function g(t){const o=c.c(2),{org:n}=r();let e;o[0]!==n.id?(e={connectionId:d,orgId:n.id},o[0]=n.id,o[1]=e):e=o[1];const i=l(e);return I(n.id,"CONNECTIONS",t,i)}function O(){const t=c.c(2),{org:o}=r();let n;t[0]!==o.id?(n={connectionId:d,orgId:o.id},t[0]=o.id,t[1]=n):n=t[1];const e=l(n);return a(o.id,"CONNECTIONS",e)}export{O as a,p as b,g as u};
@@ -1 +1 @@
1
- import{c as p,u as f,l as m}from"./index-BcdQIGUF.js";import{a as v}from"./use-virtual-mcp-TOs4GWZq.js";function x(s){const e=p.c(10);let a;e[0]!==s?(a=s===void 0?{}:s,e[0]=s,e[1]=a):a=e[1];const d=a,{navigateOnCreate:g}=d,o=g===void 0?!1:g,{org:r}=f(),c=m(),t=v();let n;e[2]!==t.create||e[3]!==c||e[4]!==o||e[5]!==r?(n=async()=>{const l=await t.create.mutateAsync({title:"New Agent",description:"Agents let you securely expose integrated tools to the outside world.",status:"active",connections:[]});return o&&c({to:"/$org/agents/$agentId",params:{org:r.slug,agentId:l.id}}),{id:l.id,virtualMcp:l}},e[2]=t.create,e[3]=c,e[4]=o,e[5]=r,e[6]=n):n=e[6];const u=n;let i;return e[7]!==t.create.isPending||e[8]!==u?(i={createVirtualMCP:u,isCreating:t.create.isPending},e[7]=t.create.isPending,e[8]=u,e[9]=i):i=e[9],i}export{x as u};
1
+ import{c as p,u as f,l as m}from"./index-DZqSbjFw.js";import{a as v}from"./use-virtual-mcp-D3UgDP8i.js";function x(s){const e=p.c(10);let a;e[0]!==s?(a=s===void 0?{}:s,e[0]=s,e[1]=a):a=e[1];const d=a,{navigateOnCreate:g}=d,o=g===void 0?!1:g,{org:r}=f(),c=m(),t=v();let n;e[2]!==t.create||e[3]!==c||e[4]!==o||e[5]!==r?(n=async()=>{const l=await t.create.mutateAsync({title:"New Agent",description:"Agents let you securely expose integrated tools to the outside world.",status:"active",connections:[]});return o&&c({to:"/$org/agents/$agentId",params:{org:r.slug,agentId:l.id}}),{id:l.id,virtualMcp:l}},e[2]=t.create,e[3]=c,e[4]=o,e[5]=r,e[6]=n):n=e[6];const u=n;let i;return e[7]!==t.create.isPending||e[8]!==u?(i={createVirtualMCP:u,isCreating:t.create.isPending},e[7]=t.create.isPending,e[8]=u,e[9]=i):i=e[9],i}export{x as u};
@@ -1 +1 @@
1
- import{c as s}from"./index-BcdQIGUF.js";import{u as a,L as c}from"./localstorage-keys-du1r-Z9U.js";function i(){const e=s.c(4);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=c.decoChatOpen(),e[0]=t):t=e[0];const[n,r]=a(t,l);let o;return e[1]!==n||e[2]!==r?(o=[n,r],e[1]=n,e[2]=r,e[3]=o):o=e[3],o}function l(e){return!!(e??!1)}export{i as u};
1
+ import{c as s}from"./index-DZqSbjFw.js";import{u as a,L as c}from"./localstorage-keys-DpM3uKv7.js";function i(){const e=s.c(4);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=c.decoChatOpen(),e[0]=t):t=e[0];const[n,r]=a(t,l);let o;return e[1]!==n||e[2]!==r?(o=[n,r],e[1]=n,e[2]=r,e[3]=o):o=e[3],o}function l(e){return!!(e??!1)}export{i as u};
@@ -1 +1 @@
1
- import{r as a,c as T}from"./index-BcdQIGUF.js";import{u as D}from"./use-mobile-0MLmfurT.js";const W=({size:l=24,color:e="currentColor",...t})=>a.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},a.createElement("path",{d:"M2.42 12.713c-.136-.215-.204-.323-.242-.49a1.173 1.173 0 0 1 0-.446c.038-.167.106-.274.242-.49C3.546 9.505 6.895 5 12 5s8.455 4.505 9.58 6.287c.137.215.205.323.243.49.029.125.029.322 0 .446-.038.167-.106.274-.242.49C20.455 14.495 17.105 19 12 19c-5.106 0-8.455-4.505-9.58-6.287Z"}),a.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}));W.displayName="Eye";function k(l){const e=`deco-filters-${l}`,[t,c]=a.useState(()=>{try{const o=globalThis.localStorage?.getItem(e);if(o)return JSON.parse(o)}catch(o){console.error("Failed to parse stored filters:",o)}return[]});return[t,o=>{c(o);try{globalThis.localStorage?.setItem(e,JSON.stringify(o))}catch(i){console.error("Failed to save filters:",i)}}]}function C(l){const e=T.c(7),[t,c]=a.useState(l),[s,o]=a.useState(l?"desc":null);let i;e[0]!==s||e[1]!==t?(i=h=>{t!==h?(c(h),o("asc")):s==="asc"?o("desc"):s==="desc"&&(c(void 0),o(null))},e[0]=s,e[1]=t,e[2]=i):i=e[2];const u=i;let r;return e[3]!==u||e[4]!==s||e[5]!==t?(r={sortKey:t,sortDirection:s,handleSort:u},e[3]=u,e[4]=s,e[5]=t,e[6]=r):r=e[6],r}function L(l,e){const t=T.c(12),c=e===void 0?"cards":e,s=D(),o=a.useRef(s),i=l?`deco-view-mode-${l}`:"deco-view-mode";let u;t[0]!==c||t[1]!==i?(u=()=>{const d=globalThis.localStorage?.getItem(i);return d==="cards"||d==="table"?d:c},t[0]=c,t[1]=i,t[2]=u):u=t[2];const[r,h]=a.useState(u);let f;t[3]!==i?(f=d=>{h(d),globalThis.localStorage?.setItem(i,d)},t[3]=i,t[4]=f):f=t[4];const p=f;let S,g;t[5]!==s||t[6]!==r?(S=()=>{!o.current&&s&&r==="table"&&h("cards"),o.current=s},g=[s,r],t[5]=s,t[6]=r,t[7]=S,t[8]=g):(S=t[7],g=t[8]),a.useEffect(S,g);let n;return t[9]!==p||t[10]!==r?(n=[r,p],t[9]=p,t[10]=r,t[11]=n):n=t[11],n}function O(l){const e=T.c(20),{namespace:t,resource:c,defaultSortKey:s,defaultViewMode:o}=l,i=s===void 0?"title":s,u=o===void 0?"table":o,[r,h]=a.useState(""),f=a.useDeferredValue(r),p=`${t}-${c}`,[S,g]=k(p),n=`mesh-${c}-filter-visible-${t}`;let d;e[0]!==n?(d=()=>globalThis.localStorage?.getItem(n)==="true",e[0]=n,e[1]=d):d=e[1];const[m,B]=a.useState(d);let y;e[2]!==n?(y=I=>{B(I),globalThis.localStorage?.setItem(n,String(I))},e[2]=n,e[3]=y):y=e[3];const b=y;let M;e[4]!==m||e[5]!==b?(M=()=>{b(!m)},e[4]=m,e[5]=b,e[6]=M):M=e[6];const w=M,[V,$]=L(`mesh-${c}-${t}`,u),{sortKey:x,sortDirection:F,handleSort:K}=C(i),E=x;let v;return e[7]!==m||e[8]!==S||e[9]!==K||e[10]!==r||e[11]!==f||e[12]!==b||e[13]!==g||e[14]!==$||e[15]!==F||e[16]!==E||e[17]!==w||e[18]!==V?(v={search:r,searchTerm:f,setSearch:h,filters:S,setFilters:g,filterBarVisible:m,setFilterBarVisible:b,toggleFilterBar:w,viewMode:V,setViewMode:$,sortKey:E,sortDirection:F,handleSort:K},e[7]=m,e[8]=S,e[9]=K,e[10]=r,e[11]=f,e[12]=b,e[13]=g,e[14]=$,e[15]=F,e[16]=E,e[17]=w,e[18]=V,e[19]=v):v=e[19],v}export{W as s,O as u};
1
+ import{r as a,c as T}from"./index-DZqSbjFw.js";import{u as D}from"./use-mobile-VtwOaDa5.js";const W=({size:l=24,color:e="currentColor",...t})=>a.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},a.createElement("path",{d:"M2.42 12.713c-.136-.215-.204-.323-.242-.49a1.173 1.173 0 0 1 0-.446c.038-.167.106-.274.242-.49C3.546 9.505 6.895 5 12 5s8.455 4.505 9.58 6.287c.137.215.205.323.243.49.029.125.029.322 0 .446-.038.167-.106.274-.242.49C20.455 14.495 17.105 19 12 19c-5.106 0-8.455-4.505-9.58-6.287Z"}),a.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}));W.displayName="Eye";function k(l){const e=`deco-filters-${l}`,[t,c]=a.useState(()=>{try{const o=globalThis.localStorage?.getItem(e);if(o)return JSON.parse(o)}catch(o){console.error("Failed to parse stored filters:",o)}return[]});return[t,o=>{c(o);try{globalThis.localStorage?.setItem(e,JSON.stringify(o))}catch(i){console.error("Failed to save filters:",i)}}]}function C(l){const e=T.c(7),[t,c]=a.useState(l),[s,o]=a.useState(l?"desc":null);let i;e[0]!==s||e[1]!==t?(i=h=>{t!==h?(c(h),o("asc")):s==="asc"?o("desc"):s==="desc"&&(c(void 0),o(null))},e[0]=s,e[1]=t,e[2]=i):i=e[2];const u=i;let r;return e[3]!==u||e[4]!==s||e[5]!==t?(r={sortKey:t,sortDirection:s,handleSort:u},e[3]=u,e[4]=s,e[5]=t,e[6]=r):r=e[6],r}function L(l,e){const t=T.c(12),c=e===void 0?"cards":e,s=D(),o=a.useRef(s),i=l?`deco-view-mode-${l}`:"deco-view-mode";let u;t[0]!==c||t[1]!==i?(u=()=>{const d=globalThis.localStorage?.getItem(i);return d==="cards"||d==="table"?d:c},t[0]=c,t[1]=i,t[2]=u):u=t[2];const[r,h]=a.useState(u);let f;t[3]!==i?(f=d=>{h(d),globalThis.localStorage?.setItem(i,d)},t[3]=i,t[4]=f):f=t[4];const p=f;let S,g;t[5]!==s||t[6]!==r?(S=()=>{!o.current&&s&&r==="table"&&h("cards"),o.current=s},g=[s,r],t[5]=s,t[6]=r,t[7]=S,t[8]=g):(S=t[7],g=t[8]),a.useEffect(S,g);let n;return t[9]!==p||t[10]!==r?(n=[r,p],t[9]=p,t[10]=r,t[11]=n):n=t[11],n}function O(l){const e=T.c(20),{namespace:t,resource:c,defaultSortKey:s,defaultViewMode:o}=l,i=s===void 0?"title":s,u=o===void 0?"table":o,[r,h]=a.useState(""),f=a.useDeferredValue(r),p=`${t}-${c}`,[S,g]=k(p),n=`mesh-${c}-filter-visible-${t}`;let d;e[0]!==n?(d=()=>globalThis.localStorage?.getItem(n)==="true",e[0]=n,e[1]=d):d=e[1];const[m,B]=a.useState(d);let y;e[2]!==n?(y=I=>{B(I),globalThis.localStorage?.setItem(n,String(I))},e[2]=n,e[3]=y):y=e[3];const b=y;let M;e[4]!==m||e[5]!==b?(M=()=>{b(!m)},e[4]=m,e[5]=b,e[6]=M):M=e[6];const w=M,[V,$]=L(`mesh-${c}-${t}`,u),{sortKey:x,sortDirection:F,handleSort:K}=C(i),E=x;let v;return e[7]!==m||e[8]!==S||e[9]!==K||e[10]!==r||e[11]!==f||e[12]!==b||e[13]!==g||e[14]!==$||e[15]!==F||e[16]!==E||e[17]!==w||e[18]!==V?(v={search:r,searchTerm:f,setSearch:h,filters:S,setFilters:g,filterBarVisible:m,setFilterBarVisible:b,toggleFilterBar:w,viewMode:V,setViewMode:$,sortKey:E,sortDirection:F,handleSort:K},e[7]=m,e[8]=S,e[9]=K,e[10]=r,e[11]=f,e[12]=b,e[13]=g,e[14]=$,e[15]=F,e[16]=E,e[17]=w,e[18]=V,e[19]=v):v=e[19],v}export{W as s,O as u};
@@ -1 +1 @@
1
- import{c as u,q as c}from"./index-BcdQIGUF.js";import{u as p}from"./useQuery-frKnQxkY.js";import{K as n}from"./constants-BW4JZ47T.js";async function f(l){return l.getServerCapabilities()?.resources?await l.listResources():{resources:[]}}async function b(l,e){return await l.readResource({uri:e})}function R(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpResourcesList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>f(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],c(a)}function L(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpResourcesList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>f(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],p(a)}async function m(l){return l.getServerCapabilities()?.prompts?await l.listPrompts():{prompts:[]}}async function T(l,e,t){if(!l.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await l.getPrompt({name:e,arguments:t??{}})}function g(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>m(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],c(a)}function C(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>m(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],p(a)}export{f as a,C as b,R as c,L as d,T as g,m as l,b as r,g as u};
1
+ import{c as u,q as c}from"./index-DZqSbjFw.js";import{u as p}from"./useQuery-KlPPWaKy.js";import{K as n}from"./constants-Mpett05j.js";async function f(l){return l.getServerCapabilities()?.resources?await l.listResources():{resources:[]}}async function b(l,e){return await l.readResource({uri:e})}function R(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpResourcesList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>f(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],c(a)}function L(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpResourcesList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>f(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],p(a)}async function m(l){return l.getServerCapabilities()?.prompts?await l.listPrompts():{prompts:[]}}async function T(l,e,t){if(!l.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await l.getPrompt({name:e,arguments:t??{}})}function g(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>m(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],c(a)}function C(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>m(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],p(a)}export{f as a,C as b,R as c,L as d,T as g,m as l,b as r,g as u};
@@ -1 +1 @@
1
- import{c as n,u as o,q as u,K as i,g as a}from"./index-BcdQIGUF.js";function l(){const e=n.c(4),{locator:r}=o();let t;e[0]!==r?(t=i.members(r),e[0]=r,e[1]=t):t=e[1];let s;return e[2]!==t?(s={queryKey:t,queryFn:c},e[2]=t,e[3]=s):s=e[3],u(s)}function c(){return a.organization.listMembers()}export{l as u};
1
+ import{c as n,u as o,q as u,K as i,g as a}from"./index-DZqSbjFw.js";function l(){const e=n.c(4),{locator:r}=o();let t;e[0]!==r?(t=i.members(r),e[0]=r,e[1]=t):t=e[1];let s;return e[2]!==t?(s={queryKey:t,queryFn:c},e[2]=t,e[3]=s):s=e[3],u(s)}function c(){return a.organization.listMembers()}export{l as u};
@@ -1 +1 @@
1
- import{c as m,r}from"./index-BcdQIGUF.js";const a=768,o=()=>globalThis.innerWidth<a;function u(){const e=m.c(2),[l,n]=r.useState(o);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{const i=()=>n(o),c=globalThis.matchMedia(`(max-width: ${a-1}px)`);return c.addEventListener("change",i),n(o),()=>c.removeEventListener("change",i)},s=[],e[0]=t,e[1]=s):(t=e[0],s=e[1]),r.useEffect(t,s),l}export{u};
1
+ import{c as m,r}from"./index-DZqSbjFw.js";const a=768,o=()=>globalThis.innerWidth<a;function u(){const e=m.c(2),[l,n]=r.useState(o);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{const i=()=>n(o),c=globalThis.matchMedia(`(max-width: ${a-1}px)`);return c.addEventListener("change",i),n(o),()=>c.removeEventListener("change",i)},s=[],e[0]=t,e[1]=s):(t=e[0],s=e[1]),r.useEffect(t,s),l}export{u};
@@ -1 +1 @@
1
- import{c as m,u as T,q as d,ab as y,K as g}from"./index-BcdQIGUF.js";import{u as _}from"./useMutation-C7y5vUn8.js";import{a as p,u as A}from"./constants-BW4JZ47T.js";function D(e){const t=m.c(10),{org:i}=T();let l;t[0]!==i.id?(l={connectionId:p,orgId:i.id},t[0]=i.id,t[1]=l):l=t[1];const c=A(l);let u;t[2]!==e?(u=g.organizationSettings(e),t[2]=e,t[3]=u):u=t[3];let s;t[4]!==c||t[5]!==e?(s=async()=>{const a=await c.callTool({name:"ORGANIZATION_SETTINGS_GET",arguments:{}}),r=a.structuredContent??a;return r||{organizationId:e,sidebar_items:null,enabled_plugins:null,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}},t[4]=c,t[5]=e,t[6]=s):s=t[6];let n;t[7]!==u||t[8]!==s?(n={queryKey:u,queryFn:s,staleTime:6e4},t[7]=u,t[8]=s,t[9]=n):n=t[9];const{data:o}=d(n);return o}function G(e){const t=m.c(13),i=y(),{org:l}=T();let c;t[0]!==l.id?(c={connectionId:p,orgId:l.id},t[0]=l.id,t[1]=c):c=t[1];const u=A(c);let s;t[2]!==u||t[3]!==e?(s=async S=>{const f=await u.callTool({name:"ORGANIZATION_SETTINGS_UPDATE",arguments:{organizationId:e,...S}});return f.structuredContent??f},t[2]=u,t[3]=e,t[4]=s):s=t[4];let n;t[5]!==e||t[6]!==i?(n=S=>{i.setQueryData(g.organizationSettings(e),S)},t[5]=e,t[6]=i,t[7]=n):n=t[7];let o;t[8]!==s||t[9]!==n?(o={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=o):o=t[10];const a=_(o);let r;return t[11]!==a?(r={update:a},t[11]=a,t[12]=r):r=t[12],r}export{G as a,D as u};
1
+ import{c as m,u as T,q as d,ab as y,K as g}from"./index-DZqSbjFw.js";import{u as _}from"./useMutation-BReaxe_W.js";import{a as p,u as A}from"./constants-Mpett05j.js";function D(e){const t=m.c(10),{org:i}=T();let l;t[0]!==i.id?(l={connectionId:p,orgId:i.id},t[0]=i.id,t[1]=l):l=t[1];const c=A(l);let u;t[2]!==e?(u=g.organizationSettings(e),t[2]=e,t[3]=u):u=t[3];let s;t[4]!==c||t[5]!==e?(s=async()=>{const a=await c.callTool({name:"ORGANIZATION_SETTINGS_GET",arguments:{}}),r=a.structuredContent??a;return r||{organizationId:e,sidebar_items:null,enabled_plugins:null,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}},t[4]=c,t[5]=e,t[6]=s):s=t[6];let n;t[7]!==u||t[8]!==s?(n={queryKey:u,queryFn:s,staleTime:6e4},t[7]=u,t[8]=s,t[9]=n):n=t[9];const{data:o}=d(n);return o}function G(e){const t=m.c(13),i=y(),{org:l}=T();let c;t[0]!==l.id?(c={connectionId:p,orgId:l.id},t[0]=l.id,t[1]=c):c=t[1];const u=A(c);let s;t[2]!==u||t[3]!==e?(s=async S=>{const f=await u.callTool({name:"ORGANIZATION_SETTINGS_UPDATE",arguments:{organizationId:e,...S}});return f.structuredContent??f},t[2]=u,t[3]=e,t[4]=s):s=t[4];let n;t[5]!==e||t[6]!==i?(n=S=>{i.setQueryData(g.organizationSettings(e),S)},t[5]=e,t[6]=i,t[7]=n):n=t[7];let o;t[8]!==s||t[9]!==n?(o={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=o):o=t[10];const a=_(o);let r;return t[11]!==a?(r={update:a},t[11]=a,t[12]=r):r=t[12],r}export{G as a,D as u};
@@ -1 +1 @@
1
- import{c,u as r}from"./index-BcdQIGUF.js";import{b as a,u as C,a as I}from"./use-collections-D97KvVa9.js";import{a as l,u}from"./constants-BW4JZ47T.js";function m(i){const t=c.c(4);let o;t[0]!==i?(o=i===void 0?{}:i,t[0]=i,t[1]=o):o=t[1];const n=o,{org:e}=r();let s;t[2]!==e.id?(s={connectionId:l,orgId:e.id},t[2]=e.id,t[3]=s):s=t[3];const d=u(s);return a(e.id,"VIRTUAL_MCP",d,n)}function V(i){const t=c.c(2),{org:o}=r();let n;t[0]!==o.id?(n={connectionId:l,orgId:o.id},t[0]=o.id,t[1]=n):n=t[1];const e=u(n);return I(o.id,"VIRTUAL_MCP",i??void 0,e)}function p(){const i=c.c(2),{org:t}=r();let o;i[0]!==t.id?(o={connectionId:l,orgId:t.id},i[0]=t.id,i[1]=o):o=i[1];const n=u(o);return C(t.id,"VIRTUAL_MCP",n)}export{p as a,m as b,V as u};
1
+ import{c,u as r}from"./index-DZqSbjFw.js";import{b as a,u as C,a as I}from"./use-collections-DtjYeVzj.js";import{a as l,u}from"./constants-Mpett05j.js";function m(i){const t=c.c(4);let o;t[0]!==i?(o=i===void 0?{}:i,t[0]=i,t[1]=o):o=t[1];const n=o,{org:e}=r();let s;t[2]!==e.id?(s={connectionId:l,orgId:e.id},t[2]=e.id,t[3]=s):s=t[3];const d=u(s);return a(e.id,"VIRTUAL_MCP",d,n)}function V(i){const t=c.c(2),{org:o}=r();let n;t[0]!==o.id?(n={connectionId:l,orgId:o.id},t[0]=o.id,t[1]=n):n=t[1];const e=u(n);return I(o.id,"VIRTUAL_MCP",i??void 0,e)}function p(){const i=c.c(2),{org:t}=r();let o;i[0]!==t.id?(o={connectionId:l,orgId:t.id},i[0]=t.id,i[1]=o):o=i[1];const n=u(o);return C(t.id,"VIRTUAL_MCP",n)}export{p as a,m as b,V as u};
@@ -0,0 +1 @@
1
+ import{I as u}from"./infiniteQueryObserver-DmKtj9SR.js";import{Y as i}from"./index-DZqSbjFw.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +1 @@
1
- import{aT as l,aU as p,aV as n,aW as b,aX as h,ab as d,r as o,aY as m,aZ as f}from"./index-BcdQIGUF.js";var v=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),p(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&n(s.mutationKey)!==n(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??b();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,i=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#e.onSuccess?.(t.data,s,i,e),this.#e.onSettled?.(t.data,null,s,i,e)):t?.type==="error"&&(this.#e.onError?.(t.error,s,i,e),this.#e.onSettled?.(void 0,t.error,s,i,e))}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const i=d(s),[e]=o.useState(()=>new v(i,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const r=o.useSyncExternalStore(o.useCallback(a=>e.subscribe(h.batchCalls(a)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((a,c)=>{e.mutate(a,c).catch(m)},[e]);if(r.error&&f(e.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:u,mutateAsync:r.mutate}}export{O as u};
1
+ import{aT as l,aU as p,aV as n,aW as b,aX as h,ab as d,r as o,aY as m,aZ as f}from"./index-DZqSbjFw.js";var v=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),p(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&n(s.mutationKey)!==n(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??b();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,i=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#e.onSuccess?.(t.data,s,i,e),this.#e.onSettled?.(t.data,null,s,i,e)):t?.type==="error"&&(this.#e.onError?.(t.error,s,i,e),this.#e.onSettled?.(void 0,t.error,s,i,e))}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const i=d(s),[e]=o.useState(()=>new v(i,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const r=o.useSyncExternalStore(o.useCallback(a=>e.subscribe(h.batchCalls(a)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((a,c)=>{e.mutate(a,c).catch(m)},[e]);if(r.error&&f(e.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:u,mutateAsync:r.mutate}}export{O as u};
@@ -0,0 +1 @@
1
+ import{Y as u,ag as s}from"./index-DZqSbjFw.js";function o(e,r){return u(e,s,r)}export{o as u};
@@ -0,0 +1 @@
1
+ import{I as s}from"./infiniteQueryObserver-DmKtj9SR.js";import{Y as u,Z as n}from"./index-DZqSbjFw.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
@@ -1 +1 @@
1
- import{c as Y,r as V,j as i}from"./index-BcdQIGUF.js";import{c as n}from"./button-BVfOTfpc.js";const Z={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function oe(J){const e=Y.c(66),{value:o,onValueChange:l,options:t,size:D,fullWidth:F,className:W}=J,K=D===void 0?"sm":D,w=F===void 0?!1:F,G=V.useRef(null),H=V.useRef(null);let R;e[0]===Symbol.for("react.memo_cache_sentinel")?(R={left:0,width:0,opacity:0},e[0]=R):R=e[0];const[N,O]=V.useState(R);let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=S=>{if(!S.current)return;const{offsetLeft:U,offsetWidth:X}=S.current;O({left:U,width:X,opacity:1})},e[1]=_):_=e[1];const Q=_;let C;e[2]!==t[0].value||e[3]!==o?(C=()=>{const S=o===t[0].value?G:H;Q(S)},e[2]=t[0].value,e[3]=o,e[4]=C):C=e[4];let E;e[5]!==t||e[6]!==o?(E=[o,t],e[5]=t,e[6]=o,e[7]=E):E=e[7],V.useEffect(C,E);const s=Z[K];let a;e[8]!==W?(a=n("relative flex gap-0 bg-muted rounded-lg",W),e[8]=W,e[9]=a):a=e[9];let c;e[10]!==l||e[11]!==t[0].value?(c=()=>l(t[0].value),e[10]=l,e[11]=t[0].value,e[12]=c):c=e[12];const $=w?"flex-1 h-12 px-4":s.button,I=!w&&t[0].label?"px-3":"";let r;e[13]!==I||e[14]!==$?(r=n("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",$,I),e[13]=I,e[14]=$,e[15]=r):r=e[15];const P=o===t[0].value?"text-foreground":"text-muted-foreground";let u;e[16]!==s.icon||e[17]!==P?(u=n("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",s.icon,P),e[16]=s.icon,e[17]=P,e[18]=u):u=e[18];let f;e[19]!==t[0].icon||e[20]!==u?(f=i.jsx("span",{className:u,children:t[0].icon}),e[19]=t[0].icon,e[20]=u,e[21]=f):f=e[21];let d;e[22]!==t[0].label||e[23]!==t[0].value||e[24]!==o?(d=t[0].label&&i.jsx("span",{className:n("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[0].value?"text-foreground":"text-muted-foreground"),children:t[0].label}),e[22]=t[0].label,e[23]=t[0].value,e[24]=o,e[25]=d):d=e[25];let m;e[26]!==r||e[27]!==f||e[28]!==d||e[29]!==c?(m=i.jsxs("button",{ref:G,type:"button",onClick:c,className:r,children:[f,d]}),e[26]=r,e[27]=f,e[28]=d,e[29]=c,e[30]=m):m=e[30];let x;e[31]!==l||e[32]!==t[1].value?(x=()=>l(t[1].value),e[31]=l,e[32]=t[1].value,e[33]=x):x=e[33];const L=w?"flex-1 h-12 px-4":s.button,M=!w&&t[1].label?"px-3":"";let p;e[34]!==L||e[35]!==M?(p=n("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",L,M),e[34]=L,e[35]=M,e[36]=p):p=e[36];const T=o===t[1].value?"text-foreground":"text-muted-foreground";let b;e[37]!==s.icon||e[38]!==T?(b=n("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",s.icon,T),e[37]=s.icon,e[38]=T,e[39]=b):b=e[39];let v;e[40]!==t[1].icon||e[41]!==b?(v=i.jsx("span",{className:b,children:t[1].icon}),e[40]=t[1].icon,e[41]=b,e[42]=v):v=e[42];let g;e[43]!==t[1].label||e[44]!==t[1].value||e[45]!==o?(g=t[1].label&&i.jsx("span",{className:n("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[1].value?"text-foreground":"text-muted-foreground"),children:t[1].label}),e[43]=t[1].label,e[44]=t[1].value,e[45]=o,e[46]=g):g=e[46];let h;e[47]!==x||e[48]!==p||e[49]!==v||e[50]!==g?(h=i.jsxs("button",{ref:H,type:"button",onClick:x,className:p,children:[v,g]}),e[47]=x,e[48]=p,e[49]=v,e[50]=g,e[51]=h):h=e[51];const q=w?"h-12":s.button;let y;e[52]!==q?(y=n("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",q),e[52]=q,e[53]=y):y=e[53];const A=`${N.left}px`,B=`${N.width}px`;let j;e[54]!==N.opacity||e[55]!==A||e[56]!==B?(j={left:A,width:B,opacity:N.opacity},e[54]=N.opacity,e[55]=A,e[56]=B,e[57]=j):j=e[57];let z;e[58]!==y||e[59]!==j?(z=i.jsx("div",{className:y,style:j}),e[58]=y,e[59]=j,e[60]=z):z=e[60];let k;return e[61]!==m||e[62]!==h||e[63]!==z||e[64]!==a?(k=i.jsxs("div",{className:a,children:[m,h,z]}),e[61]=m,e[62]=h,e[63]=z,e[64]=a,e[65]=k):k=e[65],k}export{oe as V};
1
+ import{c as Y,r as V,j as i}from"./index-DZqSbjFw.js";import{c as n}from"./button-0ydgHweE.js";const Z={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function oe(J){const e=Y.c(66),{value:o,onValueChange:l,options:t,size:D,fullWidth:F,className:W}=J,K=D===void 0?"sm":D,w=F===void 0?!1:F,G=V.useRef(null),H=V.useRef(null);let R;e[0]===Symbol.for("react.memo_cache_sentinel")?(R={left:0,width:0,opacity:0},e[0]=R):R=e[0];const[N,O]=V.useState(R);let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=S=>{if(!S.current)return;const{offsetLeft:U,offsetWidth:X}=S.current;O({left:U,width:X,opacity:1})},e[1]=_):_=e[1];const Q=_;let C;e[2]!==t[0].value||e[3]!==o?(C=()=>{const S=o===t[0].value?G:H;Q(S)},e[2]=t[0].value,e[3]=o,e[4]=C):C=e[4];let E;e[5]!==t||e[6]!==o?(E=[o,t],e[5]=t,e[6]=o,e[7]=E):E=e[7],V.useEffect(C,E);const s=Z[K];let a;e[8]!==W?(a=n("relative flex gap-0 bg-muted rounded-lg",W),e[8]=W,e[9]=a):a=e[9];let c;e[10]!==l||e[11]!==t[0].value?(c=()=>l(t[0].value),e[10]=l,e[11]=t[0].value,e[12]=c):c=e[12];const $=w?"flex-1 h-12 px-4":s.button,I=!w&&t[0].label?"px-3":"";let r;e[13]!==I||e[14]!==$?(r=n("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",$,I),e[13]=I,e[14]=$,e[15]=r):r=e[15];const P=o===t[0].value?"text-foreground":"text-muted-foreground";let u;e[16]!==s.icon||e[17]!==P?(u=n("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",s.icon,P),e[16]=s.icon,e[17]=P,e[18]=u):u=e[18];let f;e[19]!==t[0].icon||e[20]!==u?(f=i.jsx("span",{className:u,children:t[0].icon}),e[19]=t[0].icon,e[20]=u,e[21]=f):f=e[21];let d;e[22]!==t[0].label||e[23]!==t[0].value||e[24]!==o?(d=t[0].label&&i.jsx("span",{className:n("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[0].value?"text-foreground":"text-muted-foreground"),children:t[0].label}),e[22]=t[0].label,e[23]=t[0].value,e[24]=o,e[25]=d):d=e[25];let m;e[26]!==r||e[27]!==f||e[28]!==d||e[29]!==c?(m=i.jsxs("button",{ref:G,type:"button",onClick:c,className:r,children:[f,d]}),e[26]=r,e[27]=f,e[28]=d,e[29]=c,e[30]=m):m=e[30];let x;e[31]!==l||e[32]!==t[1].value?(x=()=>l(t[1].value),e[31]=l,e[32]=t[1].value,e[33]=x):x=e[33];const L=w?"flex-1 h-12 px-4":s.button,M=!w&&t[1].label?"px-3":"";let p;e[34]!==L||e[35]!==M?(p=n("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",L,M),e[34]=L,e[35]=M,e[36]=p):p=e[36];const T=o===t[1].value?"text-foreground":"text-muted-foreground";let b;e[37]!==s.icon||e[38]!==T?(b=n("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",s.icon,T),e[37]=s.icon,e[38]=T,e[39]=b):b=e[39];let v;e[40]!==t[1].icon||e[41]!==b?(v=i.jsx("span",{className:b,children:t[1].icon}),e[40]=t[1].icon,e[41]=b,e[42]=v):v=e[42];let g;e[43]!==t[1].label||e[44]!==t[1].value||e[45]!==o?(g=t[1].label&&i.jsx("span",{className:n("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[1].value?"text-foreground":"text-muted-foreground"),children:t[1].label}),e[43]=t[1].label,e[44]=t[1].value,e[45]=o,e[46]=g):g=e[46];let h;e[47]!==x||e[48]!==p||e[49]!==v||e[50]!==g?(h=i.jsxs("button",{ref:H,type:"button",onClick:x,className:p,children:[v,g]}),e[47]=x,e[48]=p,e[49]=v,e[50]=g,e[51]=h):h=e[51];const q=w?"h-12":s.button;let y;e[52]!==q?(y=n("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",q),e[52]=q,e[53]=y):y=e[53];const A=`${N.left}px`,B=`${N.width}px`;let j;e[54]!==N.opacity||e[55]!==A||e[56]!==B?(j={left:A,width:B,opacity:N.opacity},e[54]=N.opacity,e[55]=A,e[56]=B,e[57]=j):j=e[57];let z;e[58]!==y||e[59]!==j?(z=i.jsx("div",{className:y,style:j}),e[58]=y,e[59]=j,e[60]=z):z=e[60];let k;return e[61]!==m||e[62]!==h||e[63]!==z||e[64]!==a?(k=i.jsxs("div",{className:a,children:[m,h,z]}),e[61]=m,e[62]=h,e[63]=z,e[64]=a,e[65]=k):k=e[65],k}export{oe as V};
@@ -1 +1 @@
1
- import{u as k,g as L,l as P,r as v,j as e,c as B}from"./index-BcdQIGUF.js";import{e as _}from"./constants-BW4JZ47T.js";import{C as R}from"./collection-tab-1YVo2yy8.js";import{a as z,b as A}from"./use-connection-C76BYat1.js";import{B as y}from"./button-BVfOTfpc.js";import{E as F}from"./empty-state-BA1dna4T.js";import{C as M}from"./collection-header-CJErncxY.js";import{a as O,b as H}from"./use-binding-Cx0cnXwg.js";import{i as T}from"./Loading01-D7Nk5rBn.js";import"./generate-id-Dyweu44Y.js";import"./collection-display-button-ChMvUn2E.js";import"./dropdown-menu-COxc-l2r.js";import"./Grid01-C0Yt3TrW.js";import"./ArrowUp-BjUPYtOi.js";import"./Check-CeorNg_Q.js";import"./List-Tf6_FYvd.js";import"./tooltip-DDTkATYg.js";import"./view-mode-toggle-JXEPDzFm.js";import"./collection-search-BzoiV2-u.js";import"./SearchMd-XlpqEN-D.js";import"./input-CUCPZMz2.js";import"./card-C1ZVlkU0.js";import"./Copy01-D2UqUo7F.js";import"./DotsVertical-CbPPn03K.js";import"./Edit01-D4kKualc.js";import"./use-list-state-BrsvhCvu.js";import"./use-mobile-0MLmfurT.js";import"./Trash01-CdZ-Jz57.js";import"./collection-table-wrapper-thG71bGI.js";import"./empty-state-Cu7Vuwtc.js";import"./Inbox01-pqRVnVhd.js";import"./avatar-DwsJKOst.js";import"./useQuery-frKnQxkY.js";import"./pin-to-sidebar-button-D1PDIW9U.js";import"./Pin01-EjlLL7Hj.js";import"./use-organization-settings-K9WNKRlW.js";import"./useMutation-C7y5vUn8.js";import"./use-collections-D97KvVa9.js";import"./constants-CBcj5NvV.js";import"./alert-dialog-D0Pbwyv-.js";import"./Plus-BAl5ksmH.js";import"./layout-BbogDOP_.js";import"./ArrowLeft-BkK50n5W.js";import"./binder-DMkBMJDe.js";function V({title:i,description:t,wellKnownMcp:o,imageSrc:n,onConnected:s}){const r=z(),{org:{slug:m}}=k(),{data:h}=L.useSession(),p=P(),[a,w]=v.useState(!1),l=async()=>{if(!(!o||!h?.user?.id)){w(!0);try{const c=await r.create.mutateAsync(o);s?.(c.id),p({to:"/$org/mcps/$connectionId",params:{org:m,connectionId:c.id}})}finally{w(!1)}}},j=()=>{p({to:"/$org/mcps",params:{org:m},search:{action:"create"}})};return e.jsx(F,{image:n?e.jsx("img",{src:n,alt:i,width:336,height:320,className:"max-w-full h-auto"}):null,title:i,description:t,actions:e.jsxs(e.Fragment,{children:[e.jsxs(y,{variant:"outline",onClick:l,disabled:a||!o,children:[o?.icon&&e.jsx("img",{src:o.icon,alt:"",className:"size-4"}),a?"Installing...":`Install ${o?.title||"MCP"}`]}),e.jsx(y,{variant:"outline",onClick:j,children:"Custom Connection"})]})})}function q(i){const t=B.c(28),{bindingName:o,collectionName:n,title:s,emptyState:r,wellKnownMcp:m}=i,{org:h}=k(),p=A();let a;t[0]!==p||t[1]!==o?(a={connections:p,binding:o},t[0]=p,t[1]=o,t[2]=a):a=t[2];const l=O(a)[0],j=H(l);let c;if(t[3]!==n||t[4]!==j){let C;t[6]!==n?(C=$=>$.name.toLowerCase()===n.toLowerCase(),t[6]=n,t[7]=C):C=t[7],c=j.find(C),t[3]=n,t[4]=j,t[5]=c}else c=t[5];const S=c,[E,W]=v.useState(null),N=l&&S&&(l.id||E);let d;t[8]!==s?(d=e.jsx(M,{title:s}),t[8]=s,t[9]=d):d=t[9];let I;t[10]===Symbol.for("react.memo_cache_sentinel")?(I=e.jsx(T,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t[10]=I):I=t[10];let f;t[11]!==s?(f=s.toLowerCase(),t[11]=s,t[12]=f):f=t[12];let u;t[13]!==f?(u=e.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[I,e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Loading ",f,"..."]})]}),t[13]=f,t[14]=u):u=t[14];let g;t[15]!==S||t[16]!==l||t[17]!==r||t[18]!==h||t[19]!==N||t[20]!==m?(g=N?e.jsx(R,{connectionId:l.id,org:h.slug,activeCollection:S}):e.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:e.jsx(V,{title:r.title,description:r.description,wellKnownMcp:m,imageSrc:r.imageSrc,onConnected:C=>{W(C)}})}),t[15]=S,t[16]=l,t[17]=r,t[18]=h,t[19]=N,t[20]=m,t[21]=g):g=t[21];let x;t[22]!==u||t[23]!==g?(x=e.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:e.jsx(v.Suspense,{fallback:u,children:g})}),t[22]=u,t[23]=g,t[24]=x):x=t[24];let b;return t[25]!==d||t[26]!==x?(b=e.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[d,x]}),t[25]=d,t[26]=x,t[27]=b):b=t[27],b}function Rt(){const i=B.c(1);let t;return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(q,{bindingName:"WORKFLOW",collectionName:"workflow",title:"Workflows",emptyState:{title:"Create Workflows",description:"Install MCP Studio to create and manage automated workflows with multiple steps and integrations."},wellKnownMcp:_()}),i[0]=t):t=i[0],t}export{Rt as default};
1
+ import{u as k,g as L,l as P,r as v,j as e,c as B}from"./index-DZqSbjFw.js";import{e as _}from"./constants-Mpett05j.js";import{C as R}from"./collection-tab-e3o0S9Wa.js";import{a as z,b as A}from"./use-connection-BzhGWFyL.js";import{B as y}from"./button-0ydgHweE.js";import{E as F}from"./empty-state-BJnVPwS4.js";import{C as M}from"./collection-header-CHcRbSVg.js";import{a as O,b as H}from"./use-binding-B1LqCJr8.js";import{i as T}from"./Loading01-BiNUjLDw.js";import"./generate-id-Dyweu44Y.js";import"./collection-display-button-C0Qj_mDn.js";import"./dropdown-menu-CvHFB3Gz.js";import"./Grid01-Bdrpv4xX.js";import"./ArrowUp-BDaeP-ZF.js";import"./Check-C7bGyGOC.js";import"./List-bC7xiZ2s.js";import"./tooltip-9zLX7HP0.js";import"./view-mode-toggle-DR9UFNqr.js";import"./collection-search-rOPXHeEr.js";import"./SearchMd-BeBVRrdw.js";import"./input-u1hHzCA4.js";import"./card-DFhzHX-B.js";import"./Copy01-Cql6iNiT.js";import"./DotsVertical-55vBqpF9.js";import"./Edit01-BcXXA0Bn.js";import"./use-list-state-BfmIALu7.js";import"./use-mobile-VtwOaDa5.js";import"./Trash01-DSwoFZY0.js";import"./collection-table-wrapper-C4t2ZZhF.js";import"./empty-state-7hq4AubF.js";import"./Inbox01-BPkfViyI.js";import"./avatar-BfuaGHdb.js";import"./useQuery-KlPPWaKy.js";import"./pin-to-sidebar-button-Bsv2_7kr.js";import"./Pin01-iTXtWrRE.js";import"./use-organization-settings-DMGaX8N0.js";import"./useMutation-BReaxe_W.js";import"./use-collections-DtjYeVzj.js";import"./constants-OFVhPv4G.js";import"./alert-dialog-Dllib4My.js";import"./Plus-BuZ2XoBN.js";import"./layout-DspSCzsh.js";import"./ArrowLeft-CDtoEGeL.js";import"./binder-CC8WnynZ.js";function V({title:i,description:t,wellKnownMcp:o,imageSrc:n,onConnected:s}){const r=z(),{org:{slug:m}}=k(),{data:h}=L.useSession(),p=P(),[a,w]=v.useState(!1),l=async()=>{if(!(!o||!h?.user?.id)){w(!0);try{const c=await r.create.mutateAsync(o);s?.(c.id),p({to:"/$org/mcps/$connectionId",params:{org:m,connectionId:c.id}})}finally{w(!1)}}},j=()=>{p({to:"/$org/mcps",params:{org:m},search:{action:"create"}})};return e.jsx(F,{image:n?e.jsx("img",{src:n,alt:i,width:336,height:320,className:"max-w-full h-auto"}):null,title:i,description:t,actions:e.jsxs(e.Fragment,{children:[e.jsxs(y,{variant:"outline",onClick:l,disabled:a||!o,children:[o?.icon&&e.jsx("img",{src:o.icon,alt:"",className:"size-4"}),a?"Installing...":`Install ${o?.title||"MCP"}`]}),e.jsx(y,{variant:"outline",onClick:j,children:"Custom Connection"})]})})}function q(i){const t=B.c(28),{bindingName:o,collectionName:n,title:s,emptyState:r,wellKnownMcp:m}=i,{org:h}=k(),p=A();let a;t[0]!==p||t[1]!==o?(a={connections:p,binding:o},t[0]=p,t[1]=o,t[2]=a):a=t[2];const l=O(a)[0],j=H(l);let c;if(t[3]!==n||t[4]!==j){let C;t[6]!==n?(C=$=>$.name.toLowerCase()===n.toLowerCase(),t[6]=n,t[7]=C):C=t[7],c=j.find(C),t[3]=n,t[4]=j,t[5]=c}else c=t[5];const S=c,[E,W]=v.useState(null),N=l&&S&&(l.id||E);let d;t[8]!==s?(d=e.jsx(M,{title:s}),t[8]=s,t[9]=d):d=t[9];let I;t[10]===Symbol.for("react.memo_cache_sentinel")?(I=e.jsx(T,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t[10]=I):I=t[10];let f;t[11]!==s?(f=s.toLowerCase(),t[11]=s,t[12]=f):f=t[12];let u;t[13]!==f?(u=e.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[I,e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Loading ",f,"..."]})]}),t[13]=f,t[14]=u):u=t[14];let g;t[15]!==S||t[16]!==l||t[17]!==r||t[18]!==h||t[19]!==N||t[20]!==m?(g=N?e.jsx(R,{connectionId:l.id,org:h.slug,activeCollection:S}):e.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:e.jsx(V,{title:r.title,description:r.description,wellKnownMcp:m,imageSrc:r.imageSrc,onConnected:C=>{W(C)}})}),t[15]=S,t[16]=l,t[17]=r,t[18]=h,t[19]=N,t[20]=m,t[21]=g):g=t[21];let x;t[22]!==u||t[23]!==g?(x=e.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:e.jsx(v.Suspense,{fallback:u,children:g})}),t[22]=u,t[23]=g,t[24]=x):x=t[24];let b;return t[25]!==d||t[26]!==x?(b=e.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[d,x]}),t[25]=d,t[26]=x,t[27]=b):b=t[27],b}function Rt(){const i=B.c(1);let t;return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(q,{bindingName:"WORKFLOW",collectionName:"workflow",title:"Workflows",emptyState:{title:"Create Workflows",description:"Install MCP Studio to create and manage automated workflows with multiple steps and integrations."},wellKnownMcp:_()}),i[0]=t):t=i[0],t}export{Rt as default};
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <title>MCP Mesh</title>
5
5
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6
- <script type="module" crossorigin src="/assets/index-BcdQIGUF.js"></script>
6
+ <script type="module" crossorigin src="/assets/index-DZqSbjFw.js"></script>
7
7
  <link rel="stylesheet" crossorigin href="/assets/index-CqeIU8-o.css">
8
8
  </head>
9
9
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decocms/mesh",
3
- "version": "2.59.5",
3
+ "version": "2.59.6",
4
4
  "description": "MCP Mesh - Self-hostable MCP Gateway for managing AI connections and tools",
5
5
  "author": "Deco team",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- import{r as j,v as ft,w as pt,j as t,x as ue,aw as xt,R as ht,I as gt,z as ve,D as bt,B as He,E as vt,c as C,u as Ae,V as jt,s as Nt,ao as Oe,l as yt,a as Ct,b6 as kt,bn as Tt,k as St,h as _t,as as wt}from"./index-BcdQIGUF.js";import{u as It,C as Et,a as At}from"./collapsible-GqoDHWGA.js";import{I as le,E as Ot}from"./empty-state-BA1dna4T.js";import{E as me,i as Dt}from"./error-boundary-DGWOOFEb.js";import{P as $t}from"./pin-to-sidebar-button-D1PDIW9U.js";import{u as zt}from"./use-deco-chat-open-u5zZi1de.js";import{B as De}from"./badge-C6I3bZub.js";import{c as F,B as V}from"./button-BVfOTfpc.js";import{I as Fe}from"./input-CUCPZMz2.js";import{S as Lt}from"./switch-Dj3WkUS4.js";import{T as Rt}from"./textarea-DeK9qU4Z.js";import{T as H,b as je,c as W,a as U}from"./tooltip-DDTkATYg.js";import{b as Pt,u as We}from"./use-connection-C76BYat1.js";import{u as Mt,a as Vt}from"./use-virtual-mcp-TOs4GWZq.js";import{i as Ue}from"./Grid01-C0Yt3TrW.js";import{n as Ft}from"./select-Bti-BgCx.js";import{i as $e}from"./File02-CJChiHT7.js";import{a as ze,i as Bt}from"./Tool01-BLwXizsZ.js";import{i as Le}from"./Loading01-D7Nk5rBn.js";import{i as Gt}from"./Play-CaQCPrdk.js";import{s as Be}from"./Plus-BAl5ksmH.js";import{i as Ht}from"./Share07-Dw_Ho0Fm.js";import{b as Wt,V as Ut}from"./layout-BbogDOP_.js";import{C as Kt}from"./collection-search-BzoiV2-u.js";import{C as Re}from"./checkbox-DAuxoUuR.js";import{e as qt,a as Ke,D as qe,b as Yt,c as Zt}from"./dialog-BKc0uyIf.js";import{f as Jt}from"./use-collections-D97KvVa9.js";import{u as Pe}from"./constants-BW4JZ47T.js";import{c as Qt,u as Xt}from"./use-mcp-prompts-DzCHcPVg.js";import{s as Ye}from"./slugify-CEUa2lfQ.js";import{I as es,R as ts,a as ss}from"./index-D47Uffzr.js";import{i as Ze}from"./Check-CeorNg_Q.js";import{i as ls}from"./Code01-C3uTkWw7.js";import{a as os}from"./Copy01-D2UqUo7F.js";import{i as Ne}from"./InfoCircle-CItUremO.js";import"./use-binding-Cx0cnXwg.js";import"./binder-DMkBMJDe.js";import"./useSuspenseInfiniteQuery-7GUdjJBj.js";import"./infiniteQueryObserver-DrveVX8A.js";import"./localstorage-keys-du1r-Z9U.js";import"./useQuery-frKnQxkY.js";import"./useMutation-C7y5vUn8.js";import"./popover-LSiJhuO3.js";import"./ChevronDown-DHgzfDOn.js";import"./File06-D3YhRSWf.js";import"./Image01-BxGEkI20.js";import"./SearchMd-XlpqEN-D.js";import"./Pin01-EjlLL7Hj.js";import"./use-organization-settings-K9WNKRlW.js";import"./ArrowLeft-BkK50n5W.js";import"./X-CjLPt87f.js";const Je=({size:l=24,color:e="currentColor",...s})=>j.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},j.createElement("path",{d:"M4 7h11m0 0-4 4m4-4-4-4M4 17h16m0 0-4 4m4-4-4-4"}));Je.displayName="ArrowsRight";const Qe=({size:l=24,color:e="currentColor",...s})=>j.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},j.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}));Qe.displayName="Circle";const Xe=({size:l=24,color:e="currentColor",...s})=>j.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},j.createElement("path",{d:"M9 2v3m6-3v3M9 19v3m6-3v3m4-13h3m-3 5h3M2 9h3m-3 5h3m4.8 5h4.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C19 16.72 19 15.88 19 14.2V9.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C16.72 5 15.88 5 14.2 5H9.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C5 7.28 5 8.12 5 9.8v4.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C7.28 19 8.12 19 9.8 19Z"}));Xe.displayName="CpuChip02";const fe=({size:l=24,color:e="currentColor",...s})=>j.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},j.createElement("path",{d:"m9.75 20.75 1.473.818c.284.158.425.237.576.268.133.027.27.027.402 0 .15-.031.292-.11.576-.268l1.473-.818m-9-2.5-1.427-.793c-.3-.166-.45-.25-.558-.368a1 1 0 0 1-.215-.364C3 16.573 3 16.401 3 16.06V14.5m0-5V7.942c0-.343 0-.514.05-.667a1 1 0 0 1 .215-.364c.109-.119.258-.202.558-.368L5.25 5.75m4.5-2.5 1.473-.818c.284-.158.425-.237.576-.267a1 1 0 0 1 .402 0c.15.03.292.11.576.267l1.473.818m4.5 2.5 1.427.793c.3.166.45.25.558.368a1 1 0 0 1 .215.364c.05.153.05.324.05.667V9.5m0 5v1.559c0 .342 0 .514-.05.666a.999.999 0 0 1-.215.364c-.109.119-.258.202-.558.368l-1.427.793m-9-7.5L12 12m0 0 2.25-1.25M12 12v2.5M3 7l2.25 1.25m13.5 0L21 7m-9 12.5V22"}));fe.displayName="CubeOutline";const et=({size:l=24,color:e="currentColor",...s})=>j.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},j.createElement("path",{d:"M10 17.659V20a2 2 0 1 0 4 0v-2.341M12 2v1m-9 9H2m3.5-6.5-.6-.6m13.6.6.6-.6M22 12h-1m-3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z"}));et.displayName="Lightbulb02";const tt=({size:l=24,color:e="currentColor",...s})=>j.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},j.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"}));tt.displayName="Save01";var pe="Tabs",[ns]=vt(pe,[He]),st=He(),[rs,Me]=ns(pe),lt=j.forwardRef((l,e)=>{const{__scopeTabs:s,value:o,onValueChange:n,defaultValue:r,orientation:d="horizontal",dir:i,activationMode:c="automatic",...m}=l,u=ft(i),[a,f]=pt({prop:o,onChange:n,defaultProp:r??"",caller:pe});return t.jsx(rs,{scope:s,baseId:xt(),value:a,onValueChange:f,orientation:d,dir:u,activationMode:c,children:t.jsx(ue.div,{dir:u,"data-orientation":d,...m,ref:e})})});lt.displayName=pe;var ot="TabsList",nt=j.forwardRef((l,e)=>{const{__scopeTabs:s,loop:o=!0,...n}=l,r=Me(ot,s),d=st(s);return t.jsx(ht,{asChild:!0,...d,orientation:r.orientation,dir:r.dir,loop:o,children:t.jsx(ue.div,{role:"tablist","aria-orientation":r.orientation,...n,ref:e})})});nt.displayName=ot;var rt="TabsTrigger",it=j.forwardRef((l,e)=>{const{__scopeTabs:s,value:o,disabled:n=!1,...r}=l,d=Me(rt,s),i=st(s),c=dt(d.baseId,o),m=mt(d.baseId,o),u=o===d.value;return t.jsx(gt,{asChild:!0,...i,focusable:!n,active:u,children:t.jsx(ue.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":m,"data-state":u?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:c,...r,ref:e,onMouseDown:ve(l.onMouseDown,a=>{!n&&a.button===0&&a.ctrlKey===!1?d.onValueChange(o):a.preventDefault()}),onKeyDown:ve(l.onKeyDown,a=>{[" ","Enter"].includes(a.key)&&d.onValueChange(o)}),onFocus:ve(l.onFocus,()=>{const a=d.activationMode!=="manual";!u&&!n&&a&&d.onValueChange(o)})})})});it.displayName=rt;var at="TabsContent",ct=j.forwardRef((l,e)=>{const{__scopeTabs:s,value:o,forceMount:n,children:r,...d}=l,i=Me(at,s),c=dt(i.baseId,o),m=mt(i.baseId,o),u=o===i.value,a=j.useRef(u);return j.useEffect(()=>{const f=requestAnimationFrame(()=>a.current=!1);return()=>cancelAnimationFrame(f)},[]),t.jsx(bt,{present:n||u,children:({present:f})=>t.jsx(ue.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":c,hidden:!f,id:m,tabIndex:0,...d,ref:e,style:{...l.style,animationDuration:a.current?"0s":void 0},children:f&&r})})});ct.displayName=at;function dt(l,e){return`${l}-trigger-${e}`}function mt(l,e){return`${l}-content-${e}`}var is=lt,as=nt,cs=it,ds=ct;function ms(l){const e=C.c(10);let s,o,n;e[0]!==l?({className:s,variant:n,...o}=l,e[0]=l,e[1]=s,e[2]=o,e[3]=n):(s=e[1],o=e[2],n=e[3]);const r=n===void 0?"pill":n;let d;e[4]!==s?(d=F("flex flex-col gap-2",s),e[4]=s,e[5]=d):d=e[5];let i;return e[6]!==o||e[7]!==d||e[8]!==r?(i=t.jsx(is,{"data-slot":"tabs","data-variant":r,className:d,...o}),e[6]=o,e[7]=d,e[8]=r,e[9]=i):i=e[9],i}function us(l){const e=C.c(11);let s,o,n;e[0]!==l?({className:s,variant:n,...o}=l,e[0]=l,e[1]=s,e[2]=o,e[3]=n):(s=e[1],o=e[2],n=e[3]);const r=n||"pill",d=r==="underline"?"flex h-[52px] items-center border-b border-border":r==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==s||e[5]!==d?(i=F(d,s),e[4]=s,e[5]=d,e[6]=i):i=e[6];let c;return e[7]!==r||e[8]!==o||e[9]!==i?(c=t.jsx(as,{"data-slot":"tabs-list","data-variant":r,className:i,...o}),e[7]=r,e[8]=o,e[9]=i,e[10]=c):c=e[10],c}function ye(l){const e=C.c(11);let s,o,n;e[0]!==l?({className:s,variant:n,...o}=l,e[0]=l,e[1]=s,e[2]=o,e[3]=n):(s=e[1],o=e[2],n=e[3]);const r=n||"pill",d=r==="underline"?"cursor-pointer flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-foreground disabled:pointer-events-none disabled:opacity-50":r==="canvas"?"cursor-pointer flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground cursor-pointer focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==s||e[5]!==d?(i=F(d,s),e[4]=s,e[5]=d,e[6]=i):i=e[6];let c;return e[7]!==r||e[8]!==o||e[9]!==i?(c=t.jsx(cs,{"data-slot":"tabs-trigger","data-variant":r,className:i,...o}),e[7]=r,e[8]=o,e[9]=i,e[10]=c):c=e[10],c}function Ce(l){const e=C.c(8);let s,o;e[0]!==l?({className:s,...o}=l,e[0]=l,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let n;e[3]!==s?(n=F("flex-1 outline-none h-full",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==o||e[6]!==n?(r=t.jsx(ds,{"data-slot":"tabs-content",className:n,...o}),e[5]=o,e[6]=n,e[7]=r):r=e[7],r}function ke(l){return l===null?"all":l?.length??0}function fs(l,e){const s=l[e];if(!s)return"";const o=[];return s.tools===null?o.push("all tools"):s.tools&&s.tools.length>0&&o.push(`${s.tools.length} tools`),s.resources===null?o.push("all resources"):s.resources&&s.resources.length>0&&o.push(`${s.resources.length} resources`),s.prompts===null?o.push("all prompts"):s.prompts&&s.prompts.length>0&&o.push(`${s.prompts.length} prompts`),o.join(", ")}function ps(l,e){const s=l[e];return s?!((s.tools===void 0||s.tools!==null&&s.tools.length===0)&&(s.resources===void 0||s.resources!==null&&s.resources.length===0)&&(s.prompts===void 0||s.prompts!==null&&s.prompts.length===0)):!1}const xs={tools:null,resources:null,prompts:null};function Te(){const l=C.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex items-center justify-center h-32",children:t.jsx(Le,{className:"animate-spin text-muted-foreground",size:24})}),l[0]=e):e=l[0],e}function Se(l){return({error:e})=>e?.message?.includes("Method not found")||e?.code===-32601?t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:l})}):t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(Dt,{className:"h-6 w-6 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:e?.message||"An unexpected error occurred"})]})]})}function hs(l){const e=C.c(18),{item:s,isSelected:o,onToggle:n,disabled:r}=l,d=r?"cursor-not-allowed opacity-50":"cursor-pointer",i=o?"bg-accent/25":"hover:bg-muted/50";let c;e[0]!==d||e[1]!==i?(c=F("flex items-start gap-3 p-4 rounded-lg transition-colors",d,i),e[0]=d,e[1]=i,e[2]=c):c=e[2];let m;e[3]!==s.name?(m=t.jsx("p",{className:"text-sm font-medium leading-none",children:s.name}),e[3]=s.name,e[4]=m):m=e[4];let u;e[5]!==s.description?(u=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:s.description}),e[5]=s.description,e[6]=u):u=e[6];let a;e[7]!==m||e[8]!==u?(a=t.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[m,u]}),e[7]=m,e[8]=u,e[9]=a):a=e[9];let f;e[10]!==r||e[11]!==o||e[12]!==n?(f=t.jsx(Re,{checked:o,onCheckedChange:n,disabled:r,className:"mt-0.5"}),e[10]=r,e[11]=o,e[12]=n,e[13]=f):f=e[13];let g;return e[14]!==c||e[15]!==a||e[16]!==f?(g=t.jsxs("label",{className:c,children:[a,f]}),e[14]=c,e[15]=a,e[16]=f,e[17]=g):g=e[17],g}function Ve(l){const e=C.c(32),{items:s,selections:o,onToggle:n,onToggleAll:r,emptyMessage:d,disabled:i}=l;let c,m,u,a,f;if(e[0]!==i||e[1]!==d||e[2]!==s||e[3]!==n||e[4]!==r||e[5]!==o){f=Symbol.for("react.early_return_sentinel");e:{const p=s.map(gs);if(s.length===0){let y;e[11]!==d?(y=t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:d})}),e[11]=d,e[12]=y):y=e[12],f=y;break e}u="flex flex-col h-full";const N=i?"cursor-not-allowed opacity-50":"cursor-pointer";let v;e[13]!==N?(v=F("flex items-start gap-3 p-4",N),e[13]=N,e[14]=v):v=e[14];let x;e[15]!==s.length?(x=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("span",{className:"text-sm font-medium",children:["Select All (",s.length,")"]})}),e[15]=s.length,e[16]=x):x=e[16];const T=o===null;let S;e[17]!==i||e[18]!==r||e[19]!==T?(S=t.jsx(Re,{checked:T,onCheckedChange:r,disabled:i,className:"mt-0.5"}),e[17]=i,e[18]=r,e[19]=T,e[20]=S):S=e[20],e[21]!==S||e[22]!==v||e[23]!==x?(a=t.jsx("div",{className:"px-4 border-b border-border shrink-0",children:t.jsxs("label",{className:v,children:[x,S]})}),e[21]=S,e[22]=v,e[23]=x,e[24]=a):a=e[24],c="flex-1 overflow-auto px-4 py-3 space-y-1",m=s.map(y=>t.jsx(hs,{item:y,isSelected:o===null||o?.includes(y.id),onToggle:()=>n(y.id,p),disabled:i},y.id))}e[0]=i,e[1]=d,e[2]=s,e[3]=n,e[4]=r,e[5]=o,e[6]=c,e[7]=m,e[8]=u,e[9]=a,e[10]=f}else c=e[6],m=e[7],u=e[8],a=e[9],f=e[10];if(f!==Symbol.for("react.early_return_sentinel"))return f;let g;e[25]!==c||e[26]!==m?(g=t.jsx("div",{className:c,children:m}),e[25]=c,e[26]=m,e[27]=g):g=e[27];let h;return e[28]!==u||e[29]!==a||e[30]!==g?(h=t.jsxs("div",{className:u,children:[a,g]}),e[28]=u,e[29]=a,e[30]=g,e[31]=h):h=e[31],h}function gs(l){return l.id}function bs(l){const e=C.c(13),{connectionId:s,selections:o,onToggle:n,onToggleAll:r,disabled:d}=l,{org:i}=Ae();let c;e[0]!==s||e[1]!==i.id?(c={connectionId:s,orgId:i.id},e[0]=s,e[1]=i.id,e[2]=c):c=e[2];const m=Pe(c);let u;e[3]!==m?(u={client:m},e[3]=m,e[4]=u):u=e[4];const{data:a}=Jt(u);let f;e[5]!==a.tools?(f=a.tools.map(vs),e[5]=a.tools,e[6]=f):f=e[6];const g=f;let h;return e[7]!==d||e[8]!==g||e[9]!==n||e[10]!==r||e[11]!==o?(h=t.jsx(Ve,{items:g,selections:o,onToggle:n,onToggleAll:r,emptyMessage:"No tools available",disabled:d}),e[7]=d,e[8]=g,e[9]=n,e[10]=r,e[11]=o,e[12]=h):h=e[12],h}function vs(l){return{id:l.name,name:l.name,description:l.description}}function js(l){const e=C.c(13),{connectionId:s,selections:o,onToggle:n,onToggleAll:r,disabled:d}=l,{org:i}=Ae();let c;e[0]!==s||e[1]!==i.id?(c={connectionId:s,orgId:i.id},e[0]=s,e[1]=i.id,e[2]=c):c=e[2];const m=Pe(c);let u;e[3]!==m?(u={client:m},e[3]=m,e[4]=u):u=e[4];const{data:a}=Qt(u);let f;e[5]!==a.resources?(f=a.resources.map(Ns),e[5]=a.resources,e[6]=f):f=e[6];const g=f;let h;return e[7]!==d||e[8]!==g||e[9]!==n||e[10]!==r||e[11]!==o?(h=t.jsx(Ve,{items:g,selections:o,onToggle:n,onToggleAll:r,emptyMessage:"No resources available",disabled:d}),e[7]=d,e[8]=g,e[9]=n,e[10]=r,e[11]=o,e[12]=h):h=e[12],h}function Ns(l){return{id:l.name||l.uri,name:l.name||l.uri,description:l.description}}function ys(l){const e=C.c(13),{connectionId:s,selections:o,onToggle:n,onToggleAll:r,disabled:d}=l,{org:i}=Ae();let c;e[0]!==s||e[1]!==i.id?(c={connectionId:s,orgId:i.id},e[0]=s,e[1]=i.id,e[2]=c):c=e[2];const m=Pe(c);let u;e[3]!==m?(u={client:m},e[3]=m,e[4]=u):u=e[4];const{data:a}=Xt(u);let f;e[5]!==a.prompts?(f=a.prompts.map(Cs),e[5]=a.prompts,e[6]=f):f=e[6];const g=f;let h;return e[7]!==d||e[8]!==g||e[9]!==n||e[10]!==r||e[11]!==o?(h=t.jsx(Ve,{items:g,selections:o,onToggle:n,onToggleAll:r,emptyMessage:"No prompts available",disabled:d}),e[7]=d,e[8]=g,e[9]=n,e[10]=r,e[11]=o,e[12]=h):h=e[12],h}function Cs(l){return{id:l.name,name:l.name,description:l.description}}function ks(l){const e=C.c(24),{connection:s,isSelected:o,hasSelections:n,summary:r,onClick:d,onToggleAll:i,disabled:c}=l,m=c?"cursor-not-allowed opacity-50":"cursor-pointer",u=o?"bg-accent":"hover:bg-muted/50";let a;e[0]!==m||e[1]!==u?(a=F("flex items-center gap-2 p-2 h-12 rounded-lg transition-colors",m,u),e[0]=m,e[1]=u,e[2]=a):a=e[2];const f=c?void 0:d;let g;e[3]!==s.icon||e[4]!==s.title?(g=t.jsx(le,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[3]=s.icon,e[4]=s.title,e[5]=g):g=e[5];let h;e[6]!==s.title?(h=t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[6]=s.title,e[7]=h):h=e[7];let p;e[8]!==n||e[9]!==r?(p=n&&r&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:r}),e[8]=n,e[9]=r,e[10]=p):p=e[10];let N;e[11]!==h||e[12]!==p?(N=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[h,p]}),e[11]=h,e[12]=p,e[13]=N):N=e[13];let v;e[14]!==c||e[15]!==n||e[16]!==i?(v=t.jsx(Re,{checked:n,onCheckedChange:i,onClick:Ts,disabled:c,className:"shrink-0"}),e[14]=c,e[15]=n,e[16]=i,e[17]=v):v=e[17];let x;return e[18]!==a||e[19]!==f||e[20]!==g||e[21]!==N||e[22]!==v?(x=t.jsxs("div",{className:a,onClick:f,children:[g,N,v]}),e[18]=a,e[19]=f,e[20]=g,e[21]=N,e[22]=v,e[23]=x):x=e[23],x}function Ts(l){return l.stopPropagation()}function Ss(l){const e=C.c(22),{allConnections:s,searchTerm:o,selectedId:n,hasSelections:r,getSelectionSummary:d,onConnectionClick:i,onToggleAll:c,disabled:m}=l;let u;e[0]!==s||e[1]!==o?(u=o?s.filter(h=>h.title.toLowerCase().includes(o.toLowerCase())||h.description?.toLowerCase().includes(o.toLowerCase())):s,e[0]=s,e[1]=o,e[2]=u):u=e[2];const a=u;if(a.length===0){const h=o?"No connections found":"No connections available";let p;return e[3]!==h?(p=t.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4",children:h}),e[3]=h,e[4]=p):p=e[4],p}let f;if(e[5]!==m||e[6]!==a||e[7]!==d||e[8]!==r||e[9]!==i||e[10]!==c||e[11]!==n){let h;e[13]!==m||e[14]!==d||e[15]!==r||e[16]!==i||e[17]!==c||e[18]!==n?(h=p=>t.jsx(ks,{connection:p,isSelected:n===p.id,hasSelections:r(p.id),summary:d(p.id),onClick:()=>i(p.id),onToggleAll:()=>c(p.id),disabled:m},p.id),e[13]=m,e[14]=d,e[15]=r,e[16]=i,e[17]=c,e[18]=n,e[19]=h):h=e[19],f=a.map(h),e[5]=m,e[6]=a,e[7]=d,e[8]=r,e[9]=i,e[10]=c,e[11]=n,e[12]=f}else f=e[12];let g;return e[20]!==f?(g=t.jsx("div",{className:"flex flex-col gap-0.5",children:f}),e[20]=f,e[21]=g):g=e[21],g}function _s(l){const e={};for(const s of l)e[s.connection_id]={tools:s.selected_tools,resources:s.selected_resources??null,prompts:s.selected_prompts??null};return e}function _e(l){return Object.entries(l).map(([e,s])=>({connection_id:e,selected_tools:s.tools,selected_resources:s.resources,selected_prompts:s.prompts}))}function ws(l,e){switch(e.type){case"SET_SEARCH_TERM":return{...l,searchTerm:e.payload};case"SET_SELECTED":return{...l,selectedId:e.payload};case"SET_ACTIVE_TAB":return{...l,activeTab:e.payload};case"RESET":return{searchTerm:"",selectedId:e.payload.selectedId??e.payload.firstConnectionId??null,activeTab:"tools"};case"SELECT_CONNECTION":return{...l,selectedId:e.payload,activeTab:"tools"};default:return l}}const Ge=(l,e)=>l.find(s=>s.id===e)??l[0];function Is(l){const e=C.c(79),{open:s,onOpenChange:o,selectedId:n,form:r,connections:d}=l;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={},e[0]=i):i=e[0];const c=Pt(i);let m;e[1]!==c||e[2]!==n?(m=Ge(c,n)?.id??null,e[1]=c,e[2]=n,e[3]=m):m=e[3];let u;e[4]!==m?(u={activeTab:"tools",searchTerm:"",selectedId:m},e[4]=m,e[5]=u):u=e[5];const[a,f]=j.useReducer(ws,u);let g;e[6]!==d?(g=d??[],e[6]=d,e[7]=g):g=e[7];let h;e[8]!==g?(h=_s(g),e[8]=g,e[9]=h):h=e[9];const p=h;let N;e[10]!==c||e[11]!==a.selectedId?(N=Ge(c,a.selectedId),e[10]=c,e[11]=a.selectedId,e[12]=N):N=e[12];const v=N;let x;e[13]!==p?(x=b=>ps(p,b),e[13]=p,e[14]=x):x=e[14];const T=x;let S;e[15]!==p?(S=b=>fs(p,b),e[15]=p,e[16]=S):S=e[16];const y=S;let R;e[17]!==r||e[18]!==p?(R=(b,k,I,G)=>{const te=p[b]?.[k];let E;te===null?E=G.filter(be=>be!==I):te?.includes(I)?E=te.filter(be=>be!==I):(E=[...te??[],I],E.length===G.length&&(E=null));const se={...p};se[b]?se[b]={...se[b]}:se[b]={tools:null,resources:null,prompts:null},se[b][k]=E,r.setValue("connections",_e(se),{shouldDirty:!0,shouldTouch:!0})},e[17]=r,e[18]=p,e[19]=R):R=e[19];const _=R;let P;e[20]!==r||e[21]!==p?(P=(b,k)=>{const te=p[b]?.[k]===null?[]:null,E={...p};E[b]?E[b]={...E[b]}:E[b]={tools:null,resources:null,prompts:null},E[b][k]=te,r.setValue("connections",_e(E),{shouldDirty:!0,shouldTouch:!0})},e[20]=r,e[21]=p,e[22]=P):P=e[22];const w=P;let A;e[23]!==_?(A=(b,k,I)=>_(b,"tools",k,I),e[23]=_,e[24]=A):A=e[24];const $=A;let O;e[25]!==_?(O=(b,k,I)=>_(b,"resources",k,I),e[25]=_,e[26]=O):O=e[26];const z=O;let D;e[27]!==_?(D=(b,k,I)=>_(b,"prompts",k,I),e[27]=_,e[28]=D):D=e[28];const L=D;let M;e[29]!==w?(M=b=>w(b,"tools"),e[29]=w,e[30]=M):M=e[30];const B=M;let oe;e[31]!==w?(oe=b=>w(b,"resources"),e[31]=w,e[32]=oe):oe=e[32];const xe=oe;let ne;e[33]!==w?(ne=b=>w(b,"prompts"),e[33]=w,e[34]=ne):ne=e[34];const he=ne;let re;e[35]!==r||e[36]!==p?(re=b=>{const k=p[b],I=k&&k.tools===null&&k.resources===null&&k.prompts===null,G={...p};I?delete G[b]:G[b]=xs,r.setValue("connections",_e(G),{shouldDirty:!0,shouldTouch:!0})},e[35]=r,e[36]=p,e[37]=re):re=e[37];const ge=re;let ie;e[38]!==c||e[39]!==o||e[40]!==n?(ie=b=>{b&&f({type:"RESET",payload:{selectedId:n,firstConnectionId:c[0]?.id??null}}),o(b)},e[38]=c,e[39]=o,e[40]=n,e[41]=ie):ie=e[41];const K=ie;let ae;e[42]===Symbol.for("react.memo_cache_sentinel")?(ae=b=>{f({type:"SELECT_CONNECTION",payload:b})},e[42]=ae):ae=e[42];const ut=ae;let ce;e[43]===Symbol.for("react.memo_cache_sentinel")?(ce=b=>f({type:"SET_SEARCH_TERM",payload:b}),e[43]=ce):ce=e[43];let q;e[44]!==a.searchTerm?(q=t.jsx(Kt,{value:a.searchTerm,onChange:ce,placeholder:"Search connections..."}),e[44]=a.searchTerm,e[45]=q):q=e[45];let Y;e[46]!==c||e[47]!==a.searchTerm||e[48]!==a.selectedId||e[49]!==y||e[50]!==T||e[51]!==ge?(Y=t.jsx("div",{className:"flex-1 overflow-auto p-2",children:t.jsx(Ss,{allConnections:c,searchTerm:a.searchTerm,selectedId:a.selectedId,hasSelections:T,getSelectionSummary:y,onConnectionClick:ut,onToggleAll:ge})}),e[46]=c,e[47]=a.searchTerm,e[48]=a.selectedId,e[49]=y,e[50]=T,e[51]=ge,e[52]=Y):Y=e[52];let Z;e[53]!==q||e[54]!==Y?(Z=t.jsxs("div",{className:"w-full sm:w-72 sm:border-r border-b sm:border-b-0 border-border flex flex-col bg-background sm:h-full max-h-[40vh] sm:max-h-full",children:[q,Y]}),e[53]=q,e[54]=Y,e[55]=Z):Z=e[55];let J;e[56]!==v||e[57]!==a.activeTab||e[58]!==a.selectedId||e[59]!==p||e[60]!==he||e[61]!==xe||e[62]!==B||e[63]!==L||e[64]!==z||e[65]!==$?(J=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:v&&a.selectedId?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"p-6 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(le,{icon:v.icon,name:v.title,size:"md",className:"shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h2",{className:"text-lg font-semibold truncate",children:v.title}),v.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:v.description})]})]})}),t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:t.jsxs(ms,{value:a.activeTab,onValueChange:b=>f({type:"SET_ACTIVE_TAB",payload:b}),variant:"underline",className:"flex-1 flex flex-col overflow-hidden",children:[t.jsxs(us,{variant:"underline",className:"shrink-0 px-6",children:[t.jsxs(ye,{value:"tools",variant:"underline",className:"gap-2",children:[t.jsx(ze,{size:16}),"Tools"]}),t.jsxs(ye,{value:"resources",variant:"underline",className:"gap-2",children:[t.jsx(fe,{size:16}),"Resources"]}),t.jsxs(ye,{value:"prompts",variant:"underline",className:"gap-2",children:[t.jsx($e,{size:16}),"Prompts"]})]}),t.jsx(Ce,{value:"tools",className:"flex-1 overflow-hidden mt-0",children:t.jsx(me,{fallback:Se("Tools not supported by this server"),children:t.jsx(j.Suspense,{fallback:t.jsx(Te,{}),children:t.jsx(bs,{connectionId:a.selectedId,selections:a.selectedId&&p[a.selectedId]?p[a.selectedId].tools:[],onToggle:(b,k)=>a.selectedId&&$(a.selectedId,b,k),onToggleAll:()=>a.selectedId&&B(a.selectedId)})})})}),t.jsx(Ce,{value:"resources",className:"flex-1 overflow-hidden mt-0",children:t.jsx(me,{fallback:Se("Resources not supported by this server"),children:t.jsx(j.Suspense,{fallback:t.jsx(Te,{}),children:t.jsx(js,{connectionId:a.selectedId,selections:a.selectedId&&p[a.selectedId]?p[a.selectedId].resources:[],onToggle:(b,k)=>a.selectedId&&z(a.selectedId,b,k),onToggleAll:()=>a.selectedId&&xe(a.selectedId)})})})}),t.jsx(Ce,{value:"prompts",className:"flex-1 overflow-hidden mt-0",children:t.jsx(me,{fallback:Se("Prompts not supported by this server"),children:t.jsx(j.Suspense,{fallback:t.jsx(Te,{}),children:t.jsx(ys,{connectionId:a.selectedId,selections:a.selectedId&&p[a.selectedId]?p[a.selectedId].prompts:[],onToggle:(b,k)=>a.selectedId&&L(a.selectedId,b,k),onToggleAll:()=>a.selectedId&&he(a.selectedId)})})})})]})})]}):t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"Select a connection to view its tools, resources, and prompts"})}),e[56]=v,e[57]=a.activeTab,e[58]=a.selectedId,e[59]=p,e[60]=he,e[61]=xe,e[62]=B,e[63]=L,e[64]=z,e[65]=$,e[66]=J):J=e[66];let Q;e[67]!==Z||e[68]!==J?(Q=t.jsxs("div",{className:"flex-1 flex overflow-hidden min-h-0 flex-col sm:flex-row",children:[Z,J]}),e[67]=Z,e[68]=J,e[69]=Q):Q=e[69];let X;e[70]!==K?(X=t.jsx(qt,{className:"px-6 py-4 border-t border-border shrink-0",children:t.jsx(V,{variant:"outline",onClick:()=>K(!1),children:"Done"})}),e[70]=K,e[71]=X):X=e[71];let ee;e[72]!==Q||e[73]!==X?(ee=t.jsxs(Ke,{className:"sm:max-w-5xl h-[80vh] max-h-[80vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[Q,X]}),e[72]=Q,e[73]=X,e[74]=ee):ee=e[74];let de;return e[75]!==K||e[76]!==s||e[77]!==ee?(de=t.jsx(qe,{open:s,onOpenChange:K,children:ee}),e[75]=K,e[76]=s,e[77]=ee,e[78]=de):de=e[78],de}const Es=jt.pick({title:!0,description:!0,status:!0,metadata:!0,connections:!0}).extend({title:Nt().min(1,"Name is required").max(255)});function As(l){const e=C.c(8);let s,o;e[0]!==l?({className:s,...o}=l,e[0]=l,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let n;e[3]!==s?(n=F("grid gap-3",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==o||e[6]!==n?(r=t.jsx(ts,{"data-slot":"radio-group",className:n,...o}),e[5]=o,e[6]=n,e[7]=r):r=e[7],r}function we(l){const e=C.c(9);let s,o;e[0]!==l?({className:s,...o}=l,e[0]=l,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let n;e[3]!==s?(n=F("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",s),e[3]=s,e[4]=n):n=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(ss,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:t.jsx(Qe,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})}),e[5]=r):r=e[5];let d;return e[6]!==o||e[7]!==n?(d=t.jsx(es,{"data-slot":"radio-group-item",className:n,...o,children:r}),e[6]=o,e[7]=n,e[8]=d):d=e[8],d}function Os(l){const s=new TextEncoder().encode(l),o=Array.from(s,n=>String.fromCharCode(n)).join("");return btoa(o)}function Ds(l){const e=C.c(10),{url:s}=l,[o,n]=j.useState(!1);let r;e[0]!==s?(r=async()=>{await navigator.clipboard.writeText(s),n(!0),Oe.success("Agent URL copied to clipboard"),setTimeout(()=>n(!1),2e3)},e[0]=s,e[1]=r):r=e[1];const d=r;let i;e[2]!==o?(i=o?t.jsx(Ze,{size:20,className:"text-green-600"}):t.jsx(os,{size:20}),e[2]=o,e[3]=i):i=e[3];const c=o?"Copied!":"Copy URL";let m;e[4]!==c?(m=t.jsx("span",{className:"text-xs font-medium",children:c}),e[4]=c,e[5]=m):m=e[5];let u;return e[6]!==d||e[7]!==i||e[8]!==m?(u=t.jsxs(V,{type:"button",variant:"outline",onClick:d,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[i,m]}),e[6]=d,e[7]=i,e[8]=m,e[9]=u):u=e[9],u}function $s(l){const e=C.c(7),{url:s,serverName:o}=l;let n;e[0]!==o||e[1]!==s?(n=()=>{const m=Ye(o),a=Os(JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Cursor"}},null,2)),f=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(m)}&config=${encodeURIComponent(a)}`;window.open(f,"_blank"),Oe.success("Opening Cursor...")},e[0]=o,e[1]=s,e[2]=n):n=e[2];const r=n;let d,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),i=t.jsx("span",{className:"text-xs font-medium",children:"Install on Cursor"}),e[3]=d,e[4]=i):(d=e[3],i=e[4]);let c;return e[5]!==r?(c=t.jsxs(V,{type:"button",variant:"outline",onClick:r,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[d,i]}),e[5]=r,e[6]=c):c=e[6],c}function zs(l){const e=C.c(11),{url:s,serverName:o}=l,[n,r]=j.useState(!1);let d;e[0]!==o||e[1]!==s?(d=async()=>{const f=Ye(o),h=JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Claude Code"}},null,2),p=`claude mcp add-json "${f}" '${h.replace(/'/g,"'\\''")}'`;await navigator.clipboard.writeText(p),r(!0),Oe.success("Claude Code command copied to clipboard"),setTimeout(()=>r(!1),2e3)},e[0]=o,e[1]=s,e[2]=d):d=e[2];const i=d;let c;e[3]!==n?(c=n?t.jsx(Ze,{size:20,className:"text-green-600"}):t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),e[3]=n,e[4]=c):c=e[4];const m=n?"Copied!":"Install on Claude";let u;e[5]!==m?(u=t.jsx("span",{className:"text-xs font-medium",children:m}),e[5]=m,e[6]=u):u=e[6];let a;return e[7]!==i||e[8]!==c||e[9]!==u?(a=t.jsxs(V,{type:"button",variant:"outline",onClick:i,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[c,u]}),e[7]=i,e[8]=c,e[9]=u,e[10]=a):a=e[10],a}function Ls(l){const e=C.c(40),{open:s,onOpenChange:o,virtualMcp:n}=l,[r,d]=j.useState("code_execution");let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=B=>{(B==="passthrough"||B==="smart_tool_selection"||B==="code_execution")&&d(B)},e[0]=i):i=e[0];const c=i;let m;e[1]!==r||e[2]!==n.id?(m=new URL(`/mcp/virtual-mcp/${n.id}`,window.location.origin),m.searchParams.set("mode",r),e[1]=r,e[2]=n.id,e[3]=m):m=e[3];let u;e[4]!==n.id||e[5]!==n.title?(u=n.title||`agent-${n.id?.slice(0,8)??"default"}`,e[4]=n.id,e[5]=n.title,e[6]=u):u=e[6];const a=u;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(Yt,{children:t.jsx(Zt,{children:"Share Agent"})}),e[7]=f):f=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mt-1",children:"How should this agent work?"})}),e[8]=g):g=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(Je,{className:"size-5 text-muted-foreground"})}),e[9]=h):h=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Direct access"}),e[10]=p):p=e[10];let N;e[11]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(H,{asChild:!0,children:t.jsx(Ne,{className:"size-3.5 text-muted-foreground"})}),e[11]=N):N=e[11];let v;e[12]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsxs("label",{htmlFor:"mode-passthrough",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[h,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[p,t.jsx(je,{children:t.jsxs(W,{children:[N,t.jsx(U,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"All tools are exposed directly via tools/list. Best for small tool surfaces with deterministic behavior."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Best for small teams or when you need predictable behavior"})]}),t.jsx(we,{id:"mode-passthrough",value:"passthrough"})]}),e[12]=v):v=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(et,{className:"size-5 text-muted-foreground"})}),e[13]=x):x=e[13];let T;e[14]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart discovery"}),e[14]=T):T=e[14];let S;e[15]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(H,{asChild:!0,children:t.jsx(Ne,{className:"size-3.5 text-muted-foreground"})}),e[15]=S):S=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsxs("label",{htmlFor:"mode-smart",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[x,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[T,t.jsx(je,{children:t.jsxs(W,{children:[S,t.jsx(U,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"Uses meta-tools (GATEWAY_SEARCH_TOOLS, GATEWAY_DESCRIBE_TOOLS, GATEWAY_CALL_TOOL) to keep the tool list small and request details on demand."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Ideal for large teams with many tools - AI finds what it needs"})]}),t.jsx(we,{id:"mode-smart",value:"smart_tool_selection"})]}),e[16]=y):y=e[16];let R;e[17]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(ls,{className:"size-5 text-muted-foreground"})}),e[17]=R):R=e[17];let _;e[18]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart execution"}),e[18]=_):_=e[18];let P;e[19]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(H,{asChild:!0,children:t.jsx(Ne,{className:"size-3.5 text-muted-foreground"})}),e[19]=P):P=e[19];let w;e[20]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsxs("label",{htmlFor:"mode-code",className:"relative flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[R,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[_,t.jsx(je,{children:t.jsxs(W,{children:[P,t.jsx(U,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"Exposes meta-tools for discovery + sandboxed execution (GATEWAY_RUN_CODE). Reduces overhead on large surfaces by shifting work into a controlled runtime."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Maximum flexibility - AI can write code to orchestrate tools"})]}),t.jsx(we,{id:"mode-code",value:"code_execution"}),t.jsx(De,{variant:"outline",className:"absolute -top-2.5 left-1/2 -translate-x-1/2 bg-background z-10",children:"Recommended"})]}),e[20]=w):w=e[20];let A;e[21]!==r?(A=t.jsxs("div",{className:"flex flex-col gap-3",children:[g,t.jsxs(As,{value:r,onValueChange:c,className:"flex flex-col gap-4.5",children:[v,y,w]})]}),e[21]=r,e[22]=A):A=e[22];let $;e[23]!==m.href?($=t.jsx(Ds,{url:m.href}),e[23]=m.href,e[24]=$):$=e[24];let O,z;e[25]!==a||e[26]!==m.href?(O=t.jsx($s,{url:m.href,serverName:a}),z=t.jsx(zs,{url:m.href,serverName:a}),e[25]=a,e[26]=m.href,e[27]=O,e[28]=z):(O=e[27],z=e[28]);let D;e[29]!==$||e[30]!==O||e[31]!==z?(D=t.jsx("div",{className:"flex flex-col gap-3 pt-2",children:t.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[$,O,z]})}),e[29]=$,e[30]=O,e[31]=z,e[32]=D):D=e[32];let L;e[33]!==A||e[34]!==D?(L=t.jsxs(Ke,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[f,t.jsxs("div",{className:"flex flex-col gap-6",children:[A,D]})]}),e[33]=A,e[34]=D,e[35]=L):L=e[35];let M;return e[36]!==o||e[37]!==s||e[38]!==L?(M=t.jsx(qe,{open:s,onOpenChange:o,children:L}),e[36]=o,e[37]=s,e[38]=L,e[39]=M):M=e[39],M}function Rs(l,e){switch(e.type){case"SET_SHARE_DIALOG_OPEN":return{...l,shareDialogOpen:e.payload};case"SET_CONNECTION_DIALOG_OPEN":return{...l,connectionDialogOpen:e.payload};case"SET_EDITING_CONNECTION_ID":return{...l,editingConnectionId:e.payload};case"SET_SKILLS_OPEN":return{...l,skillsOpen:e.payload};default:return l}}function Ie(l){const e=C.c(3),{connection_id:s}=l,o=We(s);if(!o)return null;let n;return e[0]!==o.icon||e[1]!==o.title?(n=t.jsx("div",{className:"shrink-0 bg-background ring-1 ring-background rounded-lg",children:t.jsx(le,{icon:o.icon,name:o.title,size:"xs"})}),e[0]=o.icon,e[1]=o.title,e[2]=n):n=e[2],n}Ie.Fallback=function(){return t.jsx("div",{className:"shrink-0 bg-background ring-1 ring-background rounded-lg",children:t.jsx("div",{className:"size-5 rounded bg-muted animate-pulse"})})};function Ee(l){const e=C.c(27),{connection_id:s,selected_tools:o,selected_resources:n,selected_prompts:r,onClick:d}=l,i=We(s);if(!i)return null;let c;e[0]!==o?(c=ke(o),e[0]=o,e[1]=c):c=e[1];const m=c;let u;e[2]!==n?(u=ke(n),e[2]=n,e[3]=u):u=e[3];const a=u;let f;e[4]!==r?(f=ke(r),e[4]=r,e[5]=f):f=e[5];const g=f;let h;e[6]!==i.icon||e[7]!==i.title?(h=t.jsx(le,{icon:i.icon,name:i.title,size:"xs"}),e[6]=i.icon,e[7]=i.title,e[8]=h):h=e[8];let p;e[9]!==i.title?(p=t.jsx("p",{className:"flex-1 text-sm font-normal text-foreground truncate",children:i.title}),e[9]=i.title,e[10]=p):p=e[10];let N;e[11]!==m?(N=m!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:m==="all"?"all":m}),t.jsx(ze,{size:12})]}),e[11]=m,e[12]=N):N=e[12];let v;e[13]!==a?(v=a!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:a==="all"?"all":a}),t.jsx(fe,{size:12})]}),e[13]=a,e[14]=v):v=e[14];let x;e[15]!==g?(x=g!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:g==="all"?"all":g}),t.jsx($e,{size:12})]}),e[15]=g,e[16]=x):x=e[16];let T;e[17]!==N||e[18]!==v||e[19]!==x?(T=t.jsxs(De,{variant:"secondary",className:"bg-muted h-5 gap-2 px-1.5 py-1 flex items-center",children:[N,v,x]}),e[17]=N,e[18]=v,e[19]=x,e[20]=T):T=e[20];let S;e[21]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(Ue,{size:16,className:"text-muted-foreground shrink-0"}),e[21]=S):S=e[21];let y;return e[22]!==d||e[23]!==h||e[24]!==p||e[25]!==T?(y=t.jsxs("div",{onClick:d,className:"w-full h-12 flex items-center gap-2 px-3 rounded-lg border border-border hover:bg-accent/50 transition-colors cursor-pointer",children:[h,p,T,S]}),e[22]=d,e[23]=h,e[24]=p,e[25]=T,e[26]=y):y=e[26],y}Ee.Fallback=function(){return t.jsxs("div",{className:"w-full h-12 flex items-center gap-2 px-3 rounded-lg border border-border",children:[t.jsx("div",{className:"size-5 rounded bg-muted animate-pulse shrink-0"}),t.jsx("div",{className:"flex-1 h-4 rounded bg-muted animate-pulse"}),t.jsxs(De,{variant:"secondary",className:"bg-muted h-5 gap-2 px-1.5 py-1 flex items-center",children:[t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(ze,{size:12})]}),t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(fe,{size:12})]}),t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx($e,{size:12})]})]}),t.jsx(Ue,{size:16,className:"text-muted-foreground shrink-0"})]})};function Ps({virtualMcp:l}){const s=kt().location.href,o=Tt(),n=Vt(),r=St({resolver:_t(Es),defaultValues:l}),d=r.watch("connections"),[i,c]=j.useReducer(Rs,{shareDialogOpen:!1,connectionDialogOpen:!1,editingConnectionId:null,skillsOpen:!1}),[,m]=zt(),{setVirtualMcpId:u}=It();j.useEffect(()=>{m(!0),u(l.id)},[l.id]);const a=()=>{u(l.id),m(!0)},f=r.formState.isDirty,g=async()=>{const x=r.getValues(),T=await n.update.mutateAsync({id:l.id,data:x});r.reset(T)},h=()=>{r.reset(l)},p=()=>{c({type:"SET_EDITING_CONNECTION_ID",payload:null}),c({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},N=x=>{c({type:"SET_EDITING_CONNECTION_ID",payload:x}),c({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},v=n.update.isPending;return t.jsxs(Wt,{onBack:()=>o.history.back(),children:[t.jsxs(Ut,{children:[t.jsxs(W,{delayDuration:0,children:[t.jsx(H,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(V,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:!f||v,onClick:h,"aria-label":"Cancel",children:t.jsx(Bt,{size:14})})})}),t.jsx(U,{side:"bottom",children:"Cancel"})]}),t.jsxs(W,{delayDuration:0,children:[t.jsx(H,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(V,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:!f||v,onClick:g,"aria-label":"Save",children:v?t.jsx(Le,{size:14,className:"animate-spin"}):t.jsx(tt,{size:14})})})}),t.jsx(U,{side:"bottom",children:"Save"})]}),t.jsxs(W,{delayDuration:0,children:[t.jsx(H,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsxs(V,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2 border border-input",onClick:a,"aria-label":"Test Agent",children:[t.jsx(Gt,{size:14}),"Test Agent"]})})}),t.jsx(U,{side:"bottom",children:"Test this agent in chat"})]}),t.jsxs(W,{delayDuration:0,children:[t.jsx(H,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(V,{variant:"outline",size:"icon",className:"size-7 border border-input",onClick:()=>c({type:"SET_SHARE_DIALOG_OPEN",payload:!0}),"aria-label":"Share",children:t.jsx(Ht,{size:14})})})}),t.jsx(U,{side:"bottom",children:"Share"})]}),t.jsx($t,{title:l.title,url:s,icon:l.icon??"cpu_chip"})]}),t.jsx("div",{className:"flex h-full w-full bg-background overflow-auto",children:t.jsxs("div",{className:"flex flex-col w-full",children:[t.jsxs("div",{className:"flex items-start justify-between gap-4 p-6 shrink-0",children:[t.jsxs("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[t.jsx(le,{icon:l.icon,name:r.watch("title")||"Agent",size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(Xe,{})}),t.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[t.jsx(Fe,{...r.register("title"),className:"h-auto py-0.5 text-lg! font-medium leading-7 px-1 -mx-1 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Agent Name"}),t.jsx(Fe,{...r.register("description"),className:"h-auto py-0.5 text-base text-muted-foreground leading-6 px-1 -mx-1 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})]})]}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Lt,{checked:r.watch("status")==="active",onCheckedChange:x=>r.setValue("status",x?"active":"inactive",{shouldDirty:!0})})})]}),t.jsxs(Et,{open:i.skillsOpen,onOpenChange:x=>c({type:"SET_SKILLS_OPEN",payload:x}),className:"border-t border-border shrink-0 max-h-[400px] overflow-hidden flex flex-col",children:[d.length===0?t.jsxs("button",{type:"button",onClick:p,className:"w-full flex items-center justify-between px-6 py-4 hover:bg-muted/50 transition-colors cursor-pointer",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Skills"}),t.jsxs("div",{className:"h-7 px-2 inline-flex items-center justify-center gap-1 rounded-md text-sm text-muted-foreground",children:[t.jsx(Be,{size:14}),"Add"]})]}):t.jsx(At,{asChild:!0,children:t.jsxs("button",{type:"button",className:"w-full flex items-center justify-between px-6 py-4 hover:bg-muted/50 transition-colors cursor-pointer",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Skills"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"flex items-center -space-x-2 ease-(--ease-out-expo)",style:{width:i.skillsOpen?0:"auto",marginRight:i.skillsOpen?0:4,opacity:i.skillsOpen?0:1,pointerEvents:i.skillsOpen?"none":"auto",transitionProperty:"all",transitionDuration:i.skillsOpen?"0ms":"200ms"},children:d.slice(0,4).map(x=>t.jsx(j.Suspense,{fallback:t.jsx(Ie.Fallback,{}),children:t.jsx(Ie,{connection_id:x.connection_id})},x.connection_id))}),t.jsxs("div",{role:"button",tabIndex:0,className:"h-7 inline-flex items-center justify-center rounded-md text-sm text-muted-foreground overflow-hidden transition-all duration-200 ease-(--ease-out-expo) hover:bg-accent hover:text-accent-foreground",style:{width:i.skillsOpen?"auto":28,paddingLeft:i.skillsOpen?8:0,paddingRight:i.skillsOpen?8:0,gap:i.skillsOpen?4:0},onPointerDown:x=>{x.stopPropagation()},onClick:x=>{x.stopPropagation(),x.preventDefault(),p()},onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.stopPropagation(),x.preventDefault(),p())},children:[t.jsx(Be,{size:14,className:"shrink-0"}),t.jsx("span",{className:"overflow-hidden whitespace-nowrap transition-all duration-200 ease-(--ease-out-expo)",style:{width:i.skillsOpen?"auto":0,opacity:i.skillsOpen?1:0},children:"Add"})]}),t.jsx("div",{className:"h-7 inline-flex items-center justify-center overflow-hidden transition-all duration-200 ease-(--ease-out-expo)",style:{width:i.skillsOpen?28:0,opacity:i.skillsOpen?1:0},children:t.jsx(Ft,{size:16,className:"shrink-0"})})]})]})}),t.jsx("div",{className:"grid overflow-hidden transition-[grid-template-rows] duration-200 ease-(--ease-out-expo)",style:{gridTemplateRows:i.skillsOpen?"1fr":"0fr"},children:t.jsx("div",{className:"min-h-0 overflow-hidden",children:t.jsx("div",{className:"overflow-y-auto max-h-[300px] mask-[linear-gradient(to_bottom,black_calc(100%-40px),transparent_100%)]",children:t.jsx("div",{className:"flex flex-col gap-2 px-6 pb-4 pt-2",children:d.map(x=>t.jsx(j.Suspense,{fallback:t.jsx(Ee.Fallback,{}),children:t.jsx(Ee,{connection_id:x.connection_id,selected_tools:x.selected_tools,selected_resources:x.selected_resources,selected_prompts:x.selected_prompts,onClick:()=>N(x.connection_id)})},x.connection_id))})})})})]}),t.jsxs("div",{className:"flex flex-col flex-1 p-6 border-t border-border overflow-auto",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Instructions"}),t.jsx(wt,{name:"metadata.instructions",control:r.control,render:({field:x})=>t.jsx(Rt,{...x,value:x.value??"",placeholder:"Write instructions here...",className:"min-h-[200px] resize-none text-sm placeholder:text-muted-foreground/50 leading-relaxed border-0 rounded-none shadow-none px-0 focus-visible:ring-0 focus-visible:ring-offset-0 focus:border-0 bg-transparent"})})]})]})}),t.jsx(Is,{open:i.connectionDialogOpen,onOpenChange:x=>c({type:"SET_CONNECTION_DIALOG_OPEN",payload:x}),selectedId:i.editingConnectionId,form:r,connections:d}),t.jsx(Ls,{open:i.shareDialogOpen,onOpenChange:x=>c({type:"SET_SHARE_DIALOG_OPEN",payload:x}),virtualMcp:l})]})}function Ms(){const l=C.c(6),e=yt();let s;l[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/agents/$agentId"},l[0]=s):s=l[0];const o=Ct(s),{org:n,agentId:r}=o,d=Mt(r);if(!d){let c;return l[1]!==e||l[2]!==n?(c=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ot,{title:"Agent not found",description:"This Agent may have been deleted or you may not have access.",actions:t.jsx(V,{variant:"outline",onClick:()=>e({to:"/$org/agents",params:{org:n}}),children:"Back to agents"})})}),l[1]=e,l[2]=n,l[3]=c):c=l[3],c}let i;return l[4]!==d?(i=t.jsx(Ps,{virtualMcp:d}),l[4]=d,l[5]=i):i=l[5],i}function Rl(){const l=C.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(me,{children:t.jsx(j.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Le,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Ms,{})})}),l[0]=e):e=l[0],e}export{Rl as default};
@@ -1 +0,0 @@
1
- import{a0 as a,a1 as t}from"./index-BcdQIGUF.js";const e=a(t,{target:"draft-7"});export{e as B};
@@ -1 +0,0 @@
1
- import{bq as Ie,r as u,aw as K,x as F,H as Re,Q as Ce,U as $e,J as Me,br as O}from"./index-BcdQIGUF.js";var Y={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"),o=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 o: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=o,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)===o},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===o||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,Y.exports=Ae()),Y.exports}var qe=Fe();const lt=Ie(qe);var ve=1,De=.9,Pe=.8,je=.17,Z=.1,ee=.999,Le=.9999,Ke=.99,Ve=/[\\\/_+.#"@\[\(\{&]/,ze=/[\\\/_+.#"@\[\(\{&]/g,Oe=/[\s-]/,be=/[\s-]/g;function re(t,l,r,f,o,c,d){if(c===l.length)return o===t.length?ve:Ke;var v=`${o},${c}`;if(d[v]!==void 0)return d[v];for(var y=f.charAt(c),i=r.indexOf(y,o),p=0,b,E,x,$;i>=0;)b=re(t,l,r,f,i+1,c+1,d),b>p&&(i===o?b*=ve:Ve.test(t.charAt(i-1))?(b*=Pe,x=t.slice(o,i-1).match(ze),x&&o>0&&(b*=Math.pow(ee,x.length))):Oe.test(t.charAt(i-1))?(b*=De,$=t.slice(o,i-1).match(be),$&&o>0&&(b*=Math.pow(ee,$.length))):(b*=je,o>0&&(b*=Math.pow(ee,i-o))),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 z='[cmdk-group=""]',te='[cmdk-group-items=""]',Ue='[cmdk-group-heading=""]',ge='[cmdk-item=""]',he=`${ge}:not([aria-disabled="true"])`,ne="cmdk-item-select",j="data-value",_e=(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),o=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,H=K(),ue=K(),T=K(),q=u.useRef(null),w=et();D(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,R.emit()}},[p]),D(()=>{w(6,ae)},[]);let R=u.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,s,m)=>{var a,g,S,C;if(!Object.is(r.current[e],s)){if(r.current[e]=s,e==="search")G(),N(),w(1,W);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let I=document.getElementById(T);I?I.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var I;r.current.selectedItemId=(I=P())==null?void 0:I.id,R.emit()}),m||w(5,ae),((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())}}),[]),J=u.useMemo(()=>({value:(e,s,m)=>{var a;s!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:s,keywords:m}),r.current.filtered.items.set(e,oe(s,m)),w(2,()=>{N(),R.emit()}))},item:(e,s)=>(f.current.add(e),s&&(o.current.has(s)?o.current.get(s).add(e):o.current.set(s,new Set([e]))),w(3,()=>{G(),N(),r.current.value||W(),R.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let m=P();w(4,()=>{G(),m?.getAttribute("id")===e&&W(),R.emit()})}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{c.current.delete(e),o.current.delete(e)}),filter:()=>v.current.shouldFilter,label:y||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:T,labelId:ue,listInnerRef:q}),[]);function oe(e,s){var m,a;let g=(a=(m=v.current)==null?void 0:m.filter)!=null?a:_e;return e?g(e,r.current.search,s):0}function N(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,s=[];r.current.filtered.groups.forEach(a=>{let g=o.current.get(a),S=0;g.forEach(C=>{let I=e.get(C);S=Math.max(I,S)}),s.push([a,S])});let m=q.current;V().sort((a,g)=>{var S,C;let I=a.getAttribute("id"),U=g.getAttribute("id");return((S=e.get(U))!=null?S:0)-((C=e.get(I))!=null?C:0)}).forEach(a=>{let g=a.closest(te);g?g.appendChild(a.parentElement===g?a:a.closest(`${te} > *`)):m.appendChild(a.parentElement===m?a:a.closest(`${te} > *`))}),s.sort((a,g)=>g[1]-a[1]).forEach(a=>{var g;let S=(g=q.current)==null?void 0:g.querySelector(`${z}[${j}="${encodeURIComponent(a[0])}"]`);S?.parentElement.appendChild(S)})}function W(){let e=V().find(m=>m.getAttribute("aria-disabled")!=="true"),s=e?.getAttribute(j);R.setState("value",s||void 0)}function G(){var e,s,m,a;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=(a=(m=c.current.get(S))==null?void 0:m.keywords)!=null?a:[],U=oe(C,I);r.current.filtered.items.set(S,U),U>0&&g++}for(let[S,C]of o.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 ae(){var e,s,m;let a=P();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((m=(s=a.closest(z))==null?void 0:s.querySelector(Ue))==null||m.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function P(){var e;return(e=q.current)==null?void 0:e.querySelector(`${ge}[aria-selected="true"]`)}function V(){var e;return Array.from(((e=q.current)==null?void 0:e.querySelectorAll(he))||[])}function Q(e){let s=V()[e];s&&R.setState("value",s.getAttribute(j))}function X(e){var s;let m=P(),a=V(),g=a.findIndex(C=>C===m),S=a[g+e];(s=v.current)!=null&&s.loop&&(S=g+e<0?a[a.length-1]:g+e===a.length?a[0]:a[g+e]),S&&R.setState("value",S.getAttribute(j))}function ie(e){let s=P(),m=s?.closest(z),a;for(;m&&!a;)m=e>0?Ye(m,z):Ze(m,z),a=m?.querySelector(he);a?R.setState("value",a.getAttribute(j)):X(e)}let ce=()=>Q(V().length-1),se=e=>{e.preventDefault(),e.metaKey?ce():e.altKey?ie(1):X(1)},de=e=>{e.preventDefault(),e.metaKey?Q(0):e.altKey?ie(-1):X(-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(),Q(0);break}case"End":{e.preventDefault(),ce();break}case"Enter":{e.preventDefault();let a=P();if(a){let g=new Event(ne);a.dispatchEvent(g)}}}}},u.createElement("label",{"cmdk-label":"",htmlFor:J.inputId,id:J.labelId,style:rt},y),_(t,e=>u.createElement(Se.Provider,{value:R},u.createElement(ye.Provider,{value:J},e))))}),He=u.forwardRef((t,l)=>{var r,f;let o=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(o,d?.id)},[i]);let p=ke(o,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(o)>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:H,forceMount:ue,keywords:T,...q}=t;return u.createElement(F.div,{ref:O(c,l),...q,id:o,"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)}),Te=u.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:o,...c}=t,d=K(),v=u.useRef(null),y=u.useRef(null),i=K(),p=B(),b=A(x=>o||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:o}),[o]);return u.createElement(F.div,{ref:O(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,x=>u.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},u.createElement(we.Provider,{value:E},x))))}),Je=u.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,o=u.useRef(null),c=A(d=>!d.search);return!r&&!c?null:u.createElement(F.div,{ref:O(o,l),...f,"cmdk-separator":"",role:"separator"})}),Ne=u.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,o=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:o?t.value:d,onChange:i=>{o||c.setState("search",i.target.value),r?.(i.target.value)}})}),We=u.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...o}=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:O(c,l),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:y.listId},_(t,i=>u.createElement("div",{ref:O(d,y.listInnerRef),"cmdk-list-sizer":""},i)))}),Ge=u.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:o,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:o}),u.createElement(Me,{"aria-label":t.label,"cmdk-dialog":"",className:c},u.createElement(Ee,{ref:l,...v}))))}),Qe=u.forwardRef((t,l)=>A(r=>r.filtered.count===0)?u.createElement(F.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),Xe=u.forwardRef((t,l)=>{let{progress:r,children:f,label:o="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":o},_(t,d=>u.createElement("div",{"aria-hidden":!0},d)))}),ut=Object.assign(Ee,{List:We,Item:He,Input:Ne,Group:Te,Separator:Je,Dialog:Ge,Empty:Qe,Loading:Xe});function Ye(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 o=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():o.current}})(),y=f.map(i=>i.trim());c.value(t,v,y),(d=l.current)==null||d.setAttribute(j,v),o.current=v}),o}var et=()=>{let[t,l]=u.useState(),r=L(()=>new Map);return D(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,o)=>{r.current.set(f,o),l({})}};function tt(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function _({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 _,qe as r};
@@ -1 +0,0 @@
1
- import{I as u}from"./infiniteQueryObserver-DrveVX8A.js";import{Y as i}from"./index-BcdQIGUF.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{Y as u,ag as s}from"./index-BcdQIGUF.js";function o(e,r){return u(e,s,r)}export{o as u};
@@ -1 +0,0 @@
1
- import{I as s}from"./infiniteQueryObserver-DrveVX8A.js";import{Y as u,Z as n}from"./index-BcdQIGUF.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};