@decocms/mesh 2.44.2 → 2.44.3

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 (134) hide show
  1. package/dist/client/assets/{AlertCircle-C1oaexcn.js → AlertCircle-9_AbzfZV.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-B1SBiQVA.js → ArrowLeft-2xAygwK8.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-BvlJhwmz.js → ArrowUp-PDh8aKqr.js} +1 -1
  4. package/dist/client/assets/{Check-DImC9hlR.js → Check-DCOgSIim.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-CJiuDn-R.js → ChevronDown-B9uETHHQ.js} +1 -1
  6. package/dist/client/assets/{Code01-C3PLJdIe.js → Code01-Bpv3xznV.js} +1 -1
  7. package/dist/client/assets/{Copy01-CJVQGg2V.js → Copy01-C5lSJKpp.js} +1 -1
  8. package/dist/client/assets/{CpuChip02-CvTMaFgN.js → CpuChip02-B0kuxhX5.js} +1 -1
  9. package/dist/client/assets/{DotsHorizontal-BQhkzfkG.js → DotsHorizontal-R5qKOO-N.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-RAbtNrG6.js → DotsVertical-qocOLS4A.js} +1 -1
  11. package/dist/client/assets/{Download01-DJRyuQwN.js → Download01-B-rCvX3Z.js} +1 -1
  12. package/dist/client/assets/{Edit01-DsrgmMbR.js → Edit01-DHPNOaMT.js} +1 -1
  13. package/dist/client/assets/{File06-DdyNkMaH.js → File06-BM3tW-ao.js} +1 -1
  14. package/dist/client/assets/{FilterLines-DudXubI6.js → FilterLines-DSbTCxDv.js} +1 -1
  15. package/dist/client/assets/{FlipBackward-BT14MhEV.js → FlipBackward-BQuWvmOt.js} +1 -1
  16. package/dist/client/assets/{GitBranch01-DMdTTGPv.js → GitBranch01-DZYIjDzk.js} +1 -1
  17. package/dist/client/assets/{Grid01-F6FBpTXb.js → Grid01-CHS_jF02.js} +1 -1
  18. package/dist/client/assets/{Home02-CXLfj9Lm.js → Home02-BuP7hann.js} +1 -1
  19. package/dist/client/assets/{Image01-CGATMxv1.js → Image01-5bkPZ70X.js} +1 -1
  20. package/dist/client/assets/{Inbox01-BExxQniM.js → Inbox01-39gPJAMl.js} +1 -1
  21. package/dist/client/assets/{InfoCircle-BwBXEQXi.js → InfoCircle-Dt8NaYCm.js} +1 -1
  22. package/dist/client/assets/{Key01-BPqaf5vy.js → Key01-8WmQn7uV.js} +1 -1
  23. package/dist/client/assets/{LinkExternal01-CxomLdJd.js → LinkExternal01-DQw1Qc9U.js} +1 -1
  24. package/dist/client/assets/{List-taDOKmLS.js → List-C7xsEmxx.js} +1 -1
  25. package/dist/client/assets/{Loading01-C5WNj1RN.js → Loading01-CopTTh4g.js} +1 -1
  26. package/dist/client/assets/{Lock01-Di-2F0aX.js → Lock01-BdnY_MsG.js} +1 -1
  27. package/dist/client/assets/{Play-CrFW3Xap.js → Play-yVQdEMOg.js} +1 -1
  28. package/dist/client/assets/{Plus-Rzuz08cb.js → Plus-erQKhzFc.js} +1 -1
  29. package/dist/client/assets/{SearchMd-CQBqMKg_.js → SearchMd-CHkFEvMn.js} +1 -1
  30. package/dist/client/assets/{Terminal-kk64xKO9.js → Terminal-nMH6minT.js} +1 -1
  31. package/dist/client/assets/{Trash01-NIFttcxe.js → Trash01-CSFSnmeR.js} +1 -1
  32. package/dist/client/assets/{Upload01-DN0UV10S.js → Upload01-CDd2Qhk0.js} +1 -1
  33. package/dist/client/assets/{X-DmFAeozb.js → X-C7jTJYwd.js} +1 -1
  34. package/dist/client/assets/{XClose-CbwF-zr_.js → XClose-CqnirkQ-.js} +1 -1
  35. package/dist/client/assets/{agent-detail-COGqHNUz.js → agent-detail-BXGFUOb3.js} +1 -1
  36. package/dist/client/assets/{agents-B3iPqEqm.js → agents-CJ-N0UGt.js} +1 -1
  37. package/dist/client/assets/{alert-dialog-nojSsjex.js → alert-dialog-JUSgghwR.js} +1 -1
  38. package/dist/client/assets/{auth-catchall-C_OoShX7.js → auth-catchall-DuMCH5D-.js} +1 -1
  39. package/dist/client/assets/{avatar-HSzeBtSD.js → avatar-BIPSK-nZ.js} +1 -1
  40. package/dist/client/assets/{badge-D7yW7Ams.js → badge-Blh93jrG.js} +1 -1
  41. package/dist/client/assets/{binder-BvGWgf0j.js → binder-ku-JM_HB.js} +1 -1
  42. package/dist/client/assets/{button-B9UDEwx9.js → button-BNEclrG2.js} +1 -1
  43. package/dist/client/assets/card-kDbUMtCL.js +1 -0
  44. package/dist/client/assets/{checkbox-DmHZ3Xhg.js → checkbox-DZe4E6Kn.js} +1 -1
  45. package/dist/client/assets/{collection-detail-Cmda52TC.js → collection-detail-MFOY08Kp.js} +2 -2
  46. package/dist/client/assets/{collection-display-button-BAinwubP.js → collection-display-button-Bv_XCGpu.js} +1 -1
  47. package/dist/client/assets/{collection-header-d_96L4kd.js → collection-header-BMM2Ppyf.js} +1 -1
  48. package/dist/client/assets/{collection-page-BuBCnaqK.js → collection-page-CHEPcLha.js} +1 -1
  49. package/dist/client/assets/{collection-search-Cp9Rg8cG.js → collection-search-ClAji_RX.js} +1 -1
  50. package/dist/client/assets/{collection-tab-DGpjXcu1.js → collection-tab-Eyar9Ax-.js} +1 -1
  51. package/dist/client/assets/{collection-table-wrapper-Cfb-5BQo.js → collection-table-wrapper-BdCz63Jd.js} +1 -1
  52. package/dist/client/assets/connect-_JtLK9IP.js +1 -0
  53. package/dist/client/assets/{connection-card-DSC3U6N-.js → connection-card-C5RmKpx-.js} +1 -1
  54. package/dist/client/assets/connection-detail-OBVHxVs9.js +1 -0
  55. package/dist/client/assets/{connections-3QeHd0Af.js → connections-BJK-Unmt.js} +1 -1
  56. package/dist/client/assets/constants-Cp5o6xb6.js +1 -0
  57. package/dist/client/assets/{constants-C8DVLjyM.js → constants-l6jfVkIP.js} +1 -1
  58. package/dist/client/assets/{create-organization-dialog-JxPXU7zP.js → create-organization-dialog-DnFctc5e.js} +1 -1
  59. package/dist/client/assets/{dialog-DUXNadw5.js → dialog-cbRNFkUF.js} +1 -1
  60. package/dist/client/assets/{dropdown-menu-5V-XyUMl.js → dropdown-menu-B5X7QG53.js} +1 -1
  61. package/dist/client/assets/{dynamic-plugin-layout-Ba9BM3q2.js → dynamic-plugin-layout-AVNjiCzl.js} +1 -1
  62. package/dist/client/assets/{empty-state-D6Pye5dp.js → empty-state-Bnk561r4.js} +1 -1
  63. package/dist/client/assets/{empty-state-Ba4zQn5e.js → empty-state-DHhGwZ9F.js} +1 -1
  64. package/dist/client/assets/{env-vars-editor-BKG_L2uV.js → env-vars-editor-C22VVc0j.js} +1 -1
  65. package/dist/client/assets/{error-boundary-BYKWfLka.js → error-boundary-CwJYCTYr.js} +1 -1
  66. package/dist/client/assets/{extract-connection-data-CDfHtG_N.js → extract-connection-data-CuvIF5Zc.js} +1 -1
  67. package/dist/client/assets/{file-browser-D32InLNO.js → file-browser-Ds1nWCpa.js} +2 -2
  68. package/dist/client/assets/{form-DufpJhV9.js → form-0ZBALKH0.js} +1 -1
  69. package/dist/client/assets/{grid-view-CnSMlDZ4.js → grid-view-DIwzP_dG.js} +1 -1
  70. package/dist/client/assets/{home-MusYVBVC.js → home-BtTYUCCq.js} +1 -1
  71. package/dist/client/assets/{index-kxFCfKdx.js → index-BTX95t7l.js} +11 -11
  72. package/dist/client/assets/index-CXM9c79w.js +25 -0
  73. package/dist/client/assets/{index-fVdZwXbQ.js → index-DALSTBZ2.js} +1 -1
  74. package/dist/client/assets/{index-g9oC-3mV.js → index-DHqToqKZ.js} +1 -1
  75. package/dist/client/assets/{index-CVzDWVip.js → index-DwgBtTXr.js} +1 -1
  76. package/dist/client/assets/{index-CNdaxvBl.js → index-dMwHjnnN.js} +1 -1
  77. package/dist/client/assets/{infiniteQueryObserver-Q9Ch1SlH.js → infiniteQueryObserver-DgpNxMlA.js} +1 -1
  78. package/dist/client/assets/{input-CJuUYj5Y.js → input-Vw7XIX0r.js} +1 -1
  79. package/dist/client/assets/{layout-BdEZp7Lm.js → layout-DKHrwMN9.js} +1 -1
  80. package/dist/client/assets/{localstorage-keys-DuVpM8xt.js → localstorage-keys-BpjSpnih.js} +1 -1
  81. package/dist/client/assets/{login-Baj4wuxy.js → login-SBFyv6s2.js} +1 -1
  82. package/dist/client/assets/{mcp-oauth-BCtnFmpv.js → mcp-oauth-CrWnEeM3.js} +1 -1
  83. package/dist/client/assets/{mcp-server-card-DaxbgdWa.js → mcp-server-card-CgncAkll.js} +1 -1
  84. package/dist/client/assets/{mcp-server-detail-C4n2ElKE.js → mcp-server-detail-BJ7r3PGK.js} +2 -2
  85. package/dist/client/assets/{members-C-QMSOdo.js → members-BWzPhwIh.js} +1 -1
  86. package/dist/client/assets/{monaco-editor-1VMfvFaT.js → monaco-editor-DcKPEfxo.js} +3 -3
  87. package/dist/client/assets/{monitoring-CyqwraZN.js → monitoring-1I6U1Wzz.js} +1 -1
  88. package/dist/client/assets/{oauth-callback-UvAveY4Q.js → oauth-callback-BchO0M4E.js} +1 -1
  89. package/dist/client/assets/{page-IMRDmGp_.js → page-BPc0iUzq.js} +1 -1
  90. package/dist/client/assets/{page-o9rm9dBG.js → page-Zz3f3l9F.js} +1 -1
  91. package/dist/client/assets/{pin-to-sidebar-button-DKtGxFhi.js → pin-to-sidebar-button-CDjTUMWb.js} +1 -1
  92. package/dist/client/assets/{plugin-empty-state-DqfmD7Lv.js → plugin-empty-state-CwFHEPBt.js} +1 -1
  93. package/dist/client/assets/{plugin-header-BfXGZdm2.js → plugin-header-CMNaIaJK.js} +1 -1
  94. package/dist/client/assets/{plugins-B-FlFz3o.js → plugins-Cv7F5xoL.js} +1 -1
  95. package/dist/client/assets/{popover-IWCGO-jB.js → popover-pmxV9P13.js} +1 -1
  96. package/dist/client/assets/{registry-utils-9nMczNLD.js → registry-utils-Dda0cOYu.js} +1 -1
  97. package/dist/client/assets/{resizable-oTpquxsO.js → resizable-DGeBeBFx.js} +1 -1
  98. package/dist/client/assets/{resource-tabs-DNjaGx4N.js → resource-tabs-B4vVuVvd.js} +1 -1
  99. package/dist/client/assets/{select-6QIp3PPA.js → select-BJmQF-t1.js} +1 -1
  100. package/dist/client/assets/{settings-DmEN7q-R.js → settings-awh6NdSn.js} +1 -1
  101. package/dist/client/assets/{shell-layout-f9QetI-r.js → shell-layout-CZgMrEjK.js} +2 -2
  102. package/dist/client/assets/{spinner-CHfAw4LE.js → spinner-DXcv41zw.js} +1 -1
  103. package/dist/client/assets/{switch-B8GiDtx0.js → switch-l3-49lJA.js} +1 -1
  104. package/dist/client/assets/{textarea-CO4qLNDj.js → textarea-DoBy6xpq.js} +1 -1
  105. package/dist/client/assets/{tool-set-selector-uL1FTDsj.js → tool-set-selector-DbGPsYZu.js} +1 -1
  106. package/dist/client/assets/{tools-list-BE1mq5Cn.js → tools-list-8U1et6rm.js} +1 -1
  107. package/dist/client/assets/{tooltip-DPmy6Yc4.js → tooltip-Mf5UtuF2.js} +1 -1
  108. package/dist/client/assets/{typewriter-title-D2-DYqDP.js → typewriter-title-B2NtHvjD.js} +1 -1
  109. package/dist/client/assets/{use-binding-Bpukv3gt.js → use-binding-BM0mjywS.js} +1 -1
  110. package/dist/client/assets/{use-collections-DWOZCISS.js → use-collections-M-ZucrNc.js} +1 -1
  111. package/dist/client/assets/{use-connection-ASBc3U14.js → use-connection-B7MC5D37.js} +1 -1
  112. package/dist/client/assets/{use-create-virtual-mcp-DlrAoyaQ.js → use-create-virtual-mcp-mR4PpEB5.js} +1 -1
  113. package/dist/client/assets/{use-list-state-ZDRP3zFW.js → use-list-state-5iRHLEuj.js} +1 -1
  114. package/dist/client/assets/{use-mcp-prompts-DXLHacDq.js → use-mcp-prompts-Cwl3wuSJ.js} +1 -1
  115. package/dist/client/assets/{use-members-CTEqdwIL.js → use-members-DQCYK0dI.js} +1 -1
  116. package/dist/client/assets/{use-mobile-BuEGyUe0.js → use-mobile-C3BU8S8_.js} +1 -1
  117. package/dist/client/assets/{use-organization-settings-hA9VwO-v.js → use-organization-settings-Djf-qkBb.js} +1 -1
  118. package/dist/client/assets/{use-virtual-mcp-BR9Cj6JE.js → use-virtual-mcp-TJpzrF0-.js} +1 -1
  119. package/dist/client/assets/useInfiniteQuery-DMGU-oe6.js +1 -0
  120. package/dist/client/assets/{useMutation-ClL17OKX.js → useMutation-BuhKRt0C.js} +1 -1
  121. package/dist/client/assets/useQuery-CnjlQpZk.js +1 -0
  122. package/dist/client/assets/{value-CzHdinJY.js → value-DN_0rG_i.js} +1 -1
  123. package/dist/client/assets/{view-mode-toggle-B5HElat6.js → view-mode-toggle-C5CEe5h-.js} +1 -1
  124. package/dist/client/assets/{workflow-Lt3GFUiP.js → workflow-B7pAFqx9.js} +1 -1
  125. package/dist/client/index.html +1 -1
  126. package/package.json +1 -1
  127. package/dist/client/assets/card-D-ZcDLJM.js +0 -1
  128. package/dist/client/assets/circle-alert-CsGRs6FI.js +0 -1
  129. package/dist/client/assets/connect-ChWwgYE3.js +0 -1
  130. package/dist/client/assets/connection-detail-D9V3bixZ.js +0 -1
  131. package/dist/client/assets/constants-CuO4IXOK.js +0 -1
  132. package/dist/client/assets/index-BJd9JH52.js +0 -25
  133. package/dist/client/assets/useInfiniteQuery-CnqRaniP.js +0 -1
  134. package/dist/client/assets/useQuery-CVADJf0h.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a as v}from"./binder-BvGWgf0j.js";import{bh as T,B as O,o as t,s as e,ab as p,k as c,bi as l,bj as R,bk as U,bl as i,_ as C,ad as u,aa as g,bm as n,ac as b,bn as L,bo as B,bp as x}from"./index-kxFCfKdx.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),c(w)])),f=p(e(),p(e(),w)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),E=t({type:n("text"),text:e().describe("The text content"),providerOptions:f}),q=t({type:n("text"),text:e().describe("The text content"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),j=e().describe("File data as URL string"),k=t({type:n("file"),filename:e().optional().describe("Optional filename of the file"),data:j,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:f}),$=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:l().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:l().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:c(u([t({type:n("text"),text:e().describe("Text content")}),t({type:n("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))})]),A=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output: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:l().describe("Result of the tool call (JSON-serializable)"),isError:g().optional().describe("Whether the result is an error or error message"),providerExecuted:g().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),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:l().optional().describe("Additional provider-specific metadata")}),t({type:n("source"),sourceType:n("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:l().optional().describe("Additional provider-specific metadata")})]),Z=t({role:n("system"),content:e().describe("System message content"),providerOptions:f}),Q=t({role:n("user"),content:c(u([E,k])).describe("User message content parts (text or file)"),providerOptions:f}),ee=t({role:n("assistant"),content:c(u([E,k,J,V,A])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:f}),te=t({role:n("tool"),content:c(A).describe("Tool message content (tool results)"),providerOptions:f}),oe=u([Z,Q,ee,te]),ae=c(oe).describe("A list of messages forming the prompt"),ie=t({prompt:ae.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:i().optional().describe("Maximum number of tokens to generate"),temperature:i().optional().describe("Temperature setting. The range depends on the provider and model"),topP:i().optional().describe("Nucleus sampling parameter"),topK:i().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:i().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:i().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:i().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:c(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:u([t({type:n("text")}),t({type:n("json"),schema:l().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:c(l()).optional().describe("The tools that are available for the model"),toolChoice:l().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:g().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:l().optional().describe("Abort signal for cancelling the operation"),providerOptions:l().optional().describe("Additional provider-specific options")}),ne=t({content:c(u([q,$,K,z,X,Y])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:C(["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:l().optional().describe("Additional provider-specific metadata"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({id:e().optional().describe("ID for the generated response"),timestamp: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:l().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:c(l()).describe("Warnings for the call, e.g. unsupported settings")});t({stream:l().describe("ReadableStream of LanguageModelV2StreamPart"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({headers:p(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const se=t({supportedUrls:p(e(),c(e())).describe("Supported URL patterns by media type for the provider")});t({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:C(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const N=t({modelId:e().describe("The ID of the model"),callOptions:ie}),re=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:C(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),le=T("llm",re,{readOnly:!0}),ce=[{name:"LLM_METADATA",inputSchema:t({modelId:e().describe("The ID of the model")}),outputSchema:se},{name:"LLM_DO_STREAM",inputSchema:N,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:N,outputSchema:ne},...le],de=t({scopes:c(e()).describe("List of scopes available"),stateSchema:p(e(),b()).describe("JSON Schema (draft-07) defining the state structure")}),pe=[{name:"MCP_CONFIGURATION",inputSchema:t({}),outputSchema:de}],ue=t({toolName:e().describe("Name of the tool to invoke on that connection"),transformCode:e().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(input): Output { ... }`\n The input will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output. \n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),me=t({code:e().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(input): Output { ... }\`
1
+ import{a as v}from"./binder-ku-JM_HB.js";import{bh as T,B as O,o as t,s as e,ab as p,k as c,bi as l,bj as R,bk as U,bl as i,_ as C,ad as u,aa as g,bm as n,ac as b,bn as L,bo as B,bp as x}from"./index-BTX95t7l.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),c(w)])),f=p(e(),p(e(),w)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),E=t({type:n("text"),text:e().describe("The text content"),providerOptions:f}),q=t({type:n("text"),text:e().describe("The text content"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),j=e().describe("File data as URL string"),k=t({type:n("file"),filename:e().optional().describe("Optional filename of the file"),data:j,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:f}),$=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:l().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:l().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:c(u([t({type:n("text"),text:e().describe("Text content")}),t({type:n("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))})]),A=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output: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:l().describe("Result of the tool call (JSON-serializable)"),isError:g().optional().describe("Whether the result is an error or error message"),providerExecuted:g().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),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:l().optional().describe("Additional provider-specific metadata")}),t({type:n("source"),sourceType:n("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:l().optional().describe("Additional provider-specific metadata")})]),Z=t({role:n("system"),content:e().describe("System message content"),providerOptions:f}),Q=t({role:n("user"),content:c(u([E,k])).describe("User message content parts (text or file)"),providerOptions:f}),ee=t({role:n("assistant"),content:c(u([E,k,J,V,A])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:f}),te=t({role:n("tool"),content:c(A).describe("Tool message content (tool results)"),providerOptions:f}),oe=u([Z,Q,ee,te]),ae=c(oe).describe("A list of messages forming the prompt"),ie=t({prompt:ae.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:i().optional().describe("Maximum number of tokens to generate"),temperature:i().optional().describe("Temperature setting. The range depends on the provider and model"),topP:i().optional().describe("Nucleus sampling parameter"),topK:i().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:i().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:i().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:i().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:c(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:u([t({type:n("text")}),t({type:n("json"),schema:l().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:c(l()).optional().describe("The tools that are available for the model"),toolChoice:l().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:g().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:l().optional().describe("Abort signal for cancelling the operation"),providerOptions:l().optional().describe("Additional provider-specific options")}),ne=t({content:c(u([q,$,K,z,X,Y])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:C(["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:l().optional().describe("Additional provider-specific metadata"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({id:e().optional().describe("ID for the generated response"),timestamp: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:l().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:c(l()).describe("Warnings for the call, e.g. unsupported settings")});t({stream:l().describe("ReadableStream of LanguageModelV2StreamPart"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({headers:p(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const se=t({supportedUrls:p(e(),c(e())).describe("Supported URL patterns by media type for the provider")});t({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:C(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const N=t({modelId:e().describe("The ID of the model"),callOptions:ie}),re=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:C(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),le=T("llm",re,{readOnly:!0}),ce=[{name:"LLM_METADATA",inputSchema:t({modelId:e().describe("The ID of the model")}),outputSchema:se},{name:"LLM_DO_STREAM",inputSchema:N,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:N,outputSchema:ne},...le],de=t({scopes:c(e()).describe("List of scopes available"),stateSchema:p(e(),b()).describe("JSON Schema (draft-07) defining the state structure")}),pe=[{name:"MCP_CONFIGURATION",inputSchema:t({}),outputSchema:de}],ue=t({toolName:e().describe("Name of the tool to invoke on that connection"),transformCode:e().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(input): Output { ... }`\n The input will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output. \n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),me=t({code:e().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(input): Output { ... }\`
2
2
  The input is the resolved value of the references in the input field. Example:
3
3
  {
4
4
  "input": {
@@ -1 +1 @@
1
- import{c as K,l as Q,N as b,a8 as q}from"./index-kxFCfKdx.js";import{u as M}from"./useMutation-ClL17OKX.js";import{u as x}from"./useQuery-CVADJf0h.js";import{K as P}from"./constants-C8DVLjyM.js";function H(n){const e=K.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=P.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 r=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==t||e[9]!==l||e[10]!==r?(a={...s,queryKey:t,queryFn:l,staleTime:r,retry:!1},e[7]=s,e[8]=t,e[9]=l,e[10]=r,e[11]=a):a=e[11],x(a)}function U(n){const e=K.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 r,a,c;if(e[5]!==o||e[6]!==s||e[7]!==t||e[8]!==l){const m=JSON.stringify(t??{});c=Q,r=s,a=P.mcpToolCall(o,l,m),e[5]=o,e[6]=s,e[7]=t,e[8]=l,e[9]=r,e[10]=a,e[11]=c}else r=e[9],a=e[10],c=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 u;return e[16]!==r||e[17]!==a||e[18]!==i||e[19]!==f?(u={...r,queryKey:a,queryFn:i,staleTime:f,retry:!1},e[16]=r,e[17]=a,e[18]=i,e[19]=f,e[20]=u):u=e[20],c(u)}function V(n){const e=K.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 r,a,c;if(e[5]!==o||e[6]!==s||e[7]!==t||e[8]!==l){const m=JSON.stringify(t??{});c=x,r=s,a=P.mcpToolCall(o,l,m),e[5]=o,e[6]=s,e[7]=t,e[8]=l,e[9]=r,e[10]=a,e[11]=c}else r=e[9],a=e[10],c=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 u;return e[16]!==r||e[17]!==a||e[18]!==i||e[19]!==f?(u={...r,queryKey:a,queryFn:i,staleTime:f,retry:!1},e[16]=r,e[17]=a,e[18]=i,e[19]=f,e[20]=u):u=e[20],c(u)}function X(n){const e=K.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 r=>await o.callTool(r),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],M(l)}function D(n,e,o){const s=[];if(n?.trim()){const t=n.trim(),l=o.map(r=>({field:[String(r)],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 w(n){const e=n;return e&&typeof e=="object"&&"structuredContent"in e?e.structuredContent:e}function Z(n,e,o,s){const t=K.c(13);let l;t[0]!==e?(l=e.toUpperCase(),t[0]=e,t[1]=l):l=t[1];const a=`COLLECTION_${l}_GET`;let c;t[2]!==s||t[3]!==a||t[4]!==o?(c=P.mcpToolCall(s,a,o??""),t[2]=s,t[3]=a,t[4]=o,t[5]=c):c=t[5];let i;t[6]!==s||t[7]!==a||t[8]!==o?(i=async()=>{if(!o)return{item:null};const m=await s.callTool({name:a,arguments:{id:o}});return w(m)},t[6]=s,t[7]=a,t[8]=o,t[9]=i):i=t[9];let f;t[10]!==c||t[11]!==i?(f={queryKey:c,queryFn:i,staleTime:6e4},t[10]=c,t[11]=i,t[12]=f):f=t[12];const{data:u}=Q(f);return u?.item??null}function ee(n,e,o,s){const t=K.c(26);let l;t[0]!==s?(l=s===void 0?{}:s,t[0]=s,t[1]=l):l=t[1];const r=l,{searchTerm:a,filters:c,sortKey:i,sortDirection:f,searchFields:u,defaultSortKey:m,pageSize:E}=r;let _;t[2]!==u?(_=u===void 0?["title","description"]:u,t[2]=u,t[3]=_):_=t[3];const h=_,T=m===void 0?"updated_at":m,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]!==c||t[7]!==h||t[8]!==a?(d=D(a,c,h),t[6]=c,t[7]=h,t[8]=a,t[9]=d):d=t[9];const N=d;let $;t[10]!==T||t[11]!==f||t[12]!==i?($=k(i,f,T),t[10]=T,t[11]=f,t[12]=i,t[13]=$):$=t[13];const S=$;let y;t[14]!==N?(y=N&&{where:N},t[14]=N,t[15]=y):y=t[15];let p;t[16]!==S?(p=S&&{orderBy:S},t[16]=S,t[17]=p):p=t[17];let L;t[18]!==C||t[19]!==p||t[20]!==y?(L={...y,...p,limit:C,offset:0},t[18]=C,t[19]=p,t[20]=y,t[21]=L):L=t[21];const F=L;let v;t[22]!==o||t[23]!==g||t[24]!==F?(v={client:o,toolName:g,toolArguments:F,select:z},t[22]=o,t[23]=g,t[24]=F,t[25]=v):v=t[25];const{data:I}=U(v);return I}function z(n){return w(n)?.items??[]}function te(n,e,o){const s=K.c(33),t=b();let l;s[0]!==e?(l=e.toUpperCase(),s[0]=e,s[1]=l):l=s[1];const r=l,a=`COLLECTION_${r}_CREATE`,c=`COLLECTION_${r}_UPDATE`,i=`COLLECTION_${r}_DELETE`;let f;s[2]!==t||s[3]!==r?(f=()=>{t.invalidateQueries({predicate:y=>{const p=y.queryKey;return p[0]!=="mcp"||p[1]!=="client"||p[3]!=="tool-call"?!1:p[4]?.startsWith(`COLLECTION_${r}_`)}})},s[2]=t,s[3]=r,s[4]=f):f=s[4];const u=f;let m;s[5]!==o||s[6]!==a?(m=async y=>{const p=await o.callTool({name:a,arguments:{data:y}});return w(p).item},s[5]=o,s[6]=a,s[7]=m):m=s[7];let E;s[8]!==u?(E=()=>{u(),q.success("Item created successfully")},s[8]=u,s[9]=E):E=s[9];let _;s[10]!==m||s[11]!==E?(_={mutationFn:m,onSuccess:E,onError:R},s[10]=m,s[11]=E,s[12]=_):_=s[12];const h=M(_);let T;s[13]!==o||s[14]!==c?(T=async y=>{const{id:p,data:L}=y,F=await o.callTool({name:c,arguments:{id:p,data:L}});return w(F).item},s[13]=o,s[14]=c,s[15]=T):T=s[15];let C;s[16]!==u?(C=()=>{u(),q.success("Item updated successfully")},s[16]=u,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 A=M(O);let g;s[21]!==o||s[22]!==i?(g=async y=>{const p=await o.callTool({name:i,arguments:{id:y}});return w(p).item.id},s[21]=o,s[22]=i,s[23]=g):g=s[23];let d;s[24]!==u?(d=()=>{u(),q.success("Item deleted successfully")},s[24]=u,s[25]=d):d=s[25];let N;s[26]!==g||s[27]!==d?(N={mutationFn:g,onSuccess:d,onError:B},s[26]=g,s[27]=d,s[28]=N):N=s[28];const $=M(N);let S;return s[29]!==h||s[30]!==$||s[31]!==A?(S={create:h,update:A,delete:$},s[29]=h,s[30]=$,s[31]=A,s[32]=S):S=s[32],S}function B(n){const e=n instanceof Error?n.message:String(n);q.error(`Failed to delete item: ${e}`)}function J(n){const e=n instanceof Error?n.message:String(n);q.error(`Failed to update item: ${e}`)}function R(n){const e=n instanceof Error?n.message:String(n);q.error(`Failed to create item: ${e}`)}export{Z as a,ee as b,U as c,X as d,V as e,H as f,te as u};
1
+ import{c as K,l as Q,N as b,a8 as q}from"./index-BTX95t7l.js";import{u as M}from"./useMutation-BuhKRt0C.js";import{u as x}from"./useQuery-CnjlQpZk.js";import{K as P}from"./constants-l6jfVkIP.js";function H(n){const e=K.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=P.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 r=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==t||e[9]!==l||e[10]!==r?(a={...s,queryKey:t,queryFn:l,staleTime:r,retry:!1},e[7]=s,e[8]=t,e[9]=l,e[10]=r,e[11]=a):a=e[11],x(a)}function U(n){const e=K.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 r,a,c;if(e[5]!==o||e[6]!==s||e[7]!==t||e[8]!==l){const m=JSON.stringify(t??{});c=Q,r=s,a=P.mcpToolCall(o,l,m),e[5]=o,e[6]=s,e[7]=t,e[8]=l,e[9]=r,e[10]=a,e[11]=c}else r=e[9],a=e[10],c=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 u;return e[16]!==r||e[17]!==a||e[18]!==i||e[19]!==f?(u={...r,queryKey:a,queryFn:i,staleTime:f,retry:!1},e[16]=r,e[17]=a,e[18]=i,e[19]=f,e[20]=u):u=e[20],c(u)}function V(n){const e=K.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 r,a,c;if(e[5]!==o||e[6]!==s||e[7]!==t||e[8]!==l){const m=JSON.stringify(t??{});c=x,r=s,a=P.mcpToolCall(o,l,m),e[5]=o,e[6]=s,e[7]=t,e[8]=l,e[9]=r,e[10]=a,e[11]=c}else r=e[9],a=e[10],c=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 u;return e[16]!==r||e[17]!==a||e[18]!==i||e[19]!==f?(u={...r,queryKey:a,queryFn:i,staleTime:f,retry:!1},e[16]=r,e[17]=a,e[18]=i,e[19]=f,e[20]=u):u=e[20],c(u)}function X(n){const e=K.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 r=>await o.callTool(r),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],M(l)}function D(n,e,o){const s=[];if(n?.trim()){const t=n.trim(),l=o.map(r=>({field:[String(r)],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 w(n){const e=n;return e&&typeof e=="object"&&"structuredContent"in e?e.structuredContent:e}function Z(n,e,o,s){const t=K.c(13);let l;t[0]!==e?(l=e.toUpperCase(),t[0]=e,t[1]=l):l=t[1];const a=`COLLECTION_${l}_GET`;let c;t[2]!==s||t[3]!==a||t[4]!==o?(c=P.mcpToolCall(s,a,o??""),t[2]=s,t[3]=a,t[4]=o,t[5]=c):c=t[5];let i;t[6]!==s||t[7]!==a||t[8]!==o?(i=async()=>{if(!o)return{item:null};const m=await s.callTool({name:a,arguments:{id:o}});return w(m)},t[6]=s,t[7]=a,t[8]=o,t[9]=i):i=t[9];let f;t[10]!==c||t[11]!==i?(f={queryKey:c,queryFn:i,staleTime:6e4},t[10]=c,t[11]=i,t[12]=f):f=t[12];const{data:u}=Q(f);return u?.item??null}function ee(n,e,o,s){const t=K.c(26);let l;t[0]!==s?(l=s===void 0?{}:s,t[0]=s,t[1]=l):l=t[1];const r=l,{searchTerm:a,filters:c,sortKey:i,sortDirection:f,searchFields:u,defaultSortKey:m,pageSize:E}=r;let _;t[2]!==u?(_=u===void 0?["title","description"]:u,t[2]=u,t[3]=_):_=t[3];const h=_,T=m===void 0?"updated_at":m,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]!==c||t[7]!==h||t[8]!==a?(d=D(a,c,h),t[6]=c,t[7]=h,t[8]=a,t[9]=d):d=t[9];const N=d;let $;t[10]!==T||t[11]!==f||t[12]!==i?($=k(i,f,T),t[10]=T,t[11]=f,t[12]=i,t[13]=$):$=t[13];const S=$;let y;t[14]!==N?(y=N&&{where:N},t[14]=N,t[15]=y):y=t[15];let p;t[16]!==S?(p=S&&{orderBy:S},t[16]=S,t[17]=p):p=t[17];let L;t[18]!==C||t[19]!==p||t[20]!==y?(L={...y,...p,limit:C,offset:0},t[18]=C,t[19]=p,t[20]=y,t[21]=L):L=t[21];const F=L;let v;t[22]!==o||t[23]!==g||t[24]!==F?(v={client:o,toolName:g,toolArguments:F,select:z},t[22]=o,t[23]=g,t[24]=F,t[25]=v):v=t[25];const{data:I}=U(v);return I}function z(n){return w(n)?.items??[]}function te(n,e,o){const s=K.c(33),t=b();let l;s[0]!==e?(l=e.toUpperCase(),s[0]=e,s[1]=l):l=s[1];const r=l,a=`COLLECTION_${r}_CREATE`,c=`COLLECTION_${r}_UPDATE`,i=`COLLECTION_${r}_DELETE`;let f;s[2]!==t||s[3]!==r?(f=()=>{t.invalidateQueries({predicate:y=>{const p=y.queryKey;return p[0]!=="mcp"||p[1]!=="client"||p[3]!=="tool-call"?!1:p[4]?.startsWith(`COLLECTION_${r}_`)}})},s[2]=t,s[3]=r,s[4]=f):f=s[4];const u=f;let m;s[5]!==o||s[6]!==a?(m=async y=>{const p=await o.callTool({name:a,arguments:{data:y}});return w(p).item},s[5]=o,s[6]=a,s[7]=m):m=s[7];let E;s[8]!==u?(E=()=>{u(),q.success("Item created successfully")},s[8]=u,s[9]=E):E=s[9];let _;s[10]!==m||s[11]!==E?(_={mutationFn:m,onSuccess:E,onError:R},s[10]=m,s[11]=E,s[12]=_):_=s[12];const h=M(_);let T;s[13]!==o||s[14]!==c?(T=async y=>{const{id:p,data:L}=y,F=await o.callTool({name:c,arguments:{id:p,data:L}});return w(F).item},s[13]=o,s[14]=c,s[15]=T):T=s[15];let C;s[16]!==u?(C=()=>{u(),q.success("Item updated successfully")},s[16]=u,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 A=M(O);let g;s[21]!==o||s[22]!==i?(g=async y=>{const p=await o.callTool({name:i,arguments:{id:y}});return w(p).item.id},s[21]=o,s[22]=i,s[23]=g):g=s[23];let d;s[24]!==u?(d=()=>{u(),q.success("Item deleted successfully")},s[24]=u,s[25]=d):d=s[25];let N;s[26]!==g||s[27]!==d?(N={mutationFn:g,onSuccess:d,onError:B},s[26]=g,s[27]=d,s[28]=N):N=s[28];const $=M(N);let S;return s[29]!==h||s[30]!==$||s[31]!==A?(S={create:h,update:A,delete:$},s[29]=h,s[30]=$,s[31]=A,s[32]=S):S=s[32],S}function B(n){const e=n instanceof Error?n.message:String(n);q.error(`Failed to delete item: ${e}`)}function J(n){const e=n instanceof Error?n.message:String(n);q.error(`Failed to update item: ${e}`)}function R(n){const e=n instanceof Error?n.message:String(n);q.error(`Failed to create item: ${e}`)}export{Z as a,ee as b,U as c,X as d,V as e,H as f,te as u};
@@ -1 +1 @@
1
- import{c,u as r}from"./index-kxFCfKdx.js";import{b as C,u as a,a as I}from"./use-collections-DWOZCISS.js";import{a as d,u as l}from"./constants-C8DVLjyM.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-BTX95t7l.js";import{b as C,u as a,a as I}from"./use-collections-M-ZucrNc.js";import{a as d,u as l}from"./constants-l6jfVkIP.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,f as m}from"./index-kxFCfKdx.js";import{a as v}from"./use-virtual-mcp-BR9Cj6JE.js";function x(s){const e=p.c(10);let n;e[0]!==s?(n=s===void 0?{}:s,e[0]=s,e[1]=n):n=e[1];const d=n,{navigateOnCreate:g}=d,a=g===void 0?!1:g,{org:r}=f(),c=m(),t=v();let i;e[2]!==t.create||e[3]!==c||e[4]!==a||e[5]!==r?(i=async()=>{const u=await t.create.mutateAsync({title:"New Agent",description:"Agents let you securely expose integrated tools to the outside world.",status:"active",tool_selection_mode:"inclusion",connections:[]});return a&&c({to:"/$org/agents/$agentId",params:{org:r.slug,agentId:u.id}}),{id:u.id,virtualMcp:u}},e[2]=t.create,e[3]=c,e[4]=a,e[5]=r,e[6]=i):i=e[6];const l=i;let o;return e[7]!==t.create.isPending||e[8]!==l?(o={createVirtualMCP:l,isCreating:t.create.isPending},e[7]=t.create.isPending,e[8]=l,e[9]=o):o=e[9],o}export{x as u};
1
+ import{c as p,u as f,f as m}from"./index-BTX95t7l.js";import{a as v}from"./use-virtual-mcp-TJpzrF0-.js";function x(s){const e=p.c(10);let n;e[0]!==s?(n=s===void 0?{}:s,e[0]=s,e[1]=n):n=e[1];const d=n,{navigateOnCreate:g}=d,a=g===void 0?!1:g,{org:r}=f(),c=m(),t=v();let i;e[2]!==t.create||e[3]!==c||e[4]!==a||e[5]!==r?(i=async()=>{const u=await t.create.mutateAsync({title:"New Agent",description:"Agents let you securely expose integrated tools to the outside world.",status:"active",tool_selection_mode:"inclusion",connections:[]});return a&&c({to:"/$org/agents/$agentId",params:{org:r.slug,agentId:u.id}}),{id:u.id,virtualMcp:u}},e[2]=t.create,e[3]=c,e[4]=a,e[5]=r,e[6]=i):i=e[6];const l=i;let o;return e[7]!==t.create.isPending||e[8]!==l?(o={createVirtualMCP:l,isCreating:t.create.isPending},e[7]=t.create.isPending,e[8]=l,e[9]=o):o=e[9],o}export{x as u};
@@ -1 +1 @@
1
- import{r as a,c as T}from"./index-kxFCfKdx.js";import{u as D}from"./use-mobile-BuEGyUe0.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-BTX95t7l.js";import{u as D}from"./use-mobile-C3BU8S8_.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,l as m}from"./index-kxFCfKdx.js";import{u as c}from"./useQuery-CVADJf0h.js";import{K as n}from"./constants-C8DVLjyM.js";async function f(r){return r.getServerCapabilities()?.resources?await r.listResources():{resources:[]}}async function q(r,e){return await r.readResource({uri:e})}function g(r){const e=u.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpResourcesList(t),e[3]=t,e[4]=i):i=e[4];let a;e[5]!==t?(a=()=>f(t),e[5]=t,e[6]=a):a=e[6];const o=s.staleTime??3e4;let l;return e[7]!==s||e[8]!==i||e[9]!==a||e[10]!==o?(l={...s,queryKey:i,queryFn:a,staleTime:o,retry:!1},e[7]=s,e[8]=i,e[9]=a,e[10]=o,e[11]=l):l=e[11],c(l)}async function p(r){return r.getServerCapabilities()?.prompts?await r.listPrompts():{prompts:[]}}async function R(r,e,t){if(!r.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await r.getPrompt({name:e,arguments:t??{}})}function w(r){const e=u.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpPromptsList(t),e[3]=t,e[4]=i):i=e[4];let a;e[5]!==t?(a=()=>p(t),e[5]=t,e[6]=a):a=e[6];const o=s.staleTime??3e4;let l;return e[7]!==s||e[8]!==i||e[9]!==a||e[10]!==o?(l={...s,queryKey:i,queryFn:a,staleTime:o,retry:!1},e[7]=s,e[8]=i,e[9]=a,e[10]=o,e[11]=l):l=e[11],m(l)}function C(r){const e=u.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpPromptsList(t),e[3]=t,e[4]=i):i=e[4];let a;e[5]!==t?(a=()=>p(t),e[5]=t,e[6]=a):a=e[6];const o=s.staleTime??3e4;let l;return e[7]!==s||e[8]!==i||e[9]!==a||e[10]!==o?(l={...s,queryKey:i,queryFn:a,staleTime:o,retry:!1},e[7]=s,e[8]=i,e[9]=a,e[10]=o,e[11]=l):l=e[11],c(l)}export{f as a,C as b,g as c,R as g,p as l,q as r,w as u};
1
+ import{c as u,l as m}from"./index-BTX95t7l.js";import{u as c}from"./useQuery-CnjlQpZk.js";import{K as n}from"./constants-l6jfVkIP.js";async function f(r){return r.getServerCapabilities()?.resources?await r.listResources():{resources:[]}}async function q(r,e){return await r.readResource({uri:e})}function g(r){const e=u.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpResourcesList(t),e[3]=t,e[4]=i):i=e[4];let a;e[5]!==t?(a=()=>f(t),e[5]=t,e[6]=a):a=e[6];const o=s.staleTime??3e4;let l;return e[7]!==s||e[8]!==i||e[9]!==a||e[10]!==o?(l={...s,queryKey:i,queryFn:a,staleTime:o,retry:!1},e[7]=s,e[8]=i,e[9]=a,e[10]=o,e[11]=l):l=e[11],c(l)}async function p(r){return r.getServerCapabilities()?.prompts?await r.listPrompts():{prompts:[]}}async function R(r,e,t){if(!r.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await r.getPrompt({name:e,arguments:t??{}})}function w(r){const e=u.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpPromptsList(t),e[3]=t,e[4]=i):i=e[4];let a;e[5]!==t?(a=()=>p(t),e[5]=t,e[6]=a):a=e[6];const o=s.staleTime??3e4;let l;return e[7]!==s||e[8]!==i||e[9]!==a||e[10]!==o?(l={...s,queryKey:i,queryFn:a,staleTime:o,retry:!1},e[7]=s,e[8]=i,e[9]=a,e[10]=o,e[11]=l):l=e[11],m(l)}function C(r){const e=u.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpPromptsList(t),e[3]=t,e[4]=i):i=e[4];let a;e[5]!==t?(a=()=>p(t),e[5]=t,e[6]=a):a=e[6];const o=s.staleTime??3e4;let l;return e[7]!==s||e[8]!==i||e[9]!==a||e[10]!==o?(l={...s,queryKey:i,queryFn:a,staleTime:o,retry:!1},e[7]=s,e[8]=i,e[9]=a,e[10]=o,e[11]=l):l=e[11],c(l)}export{f as a,C as b,g as c,R as g,p as l,q as r,w as u};
@@ -1 +1 @@
1
- import{c as n,u as o,l as u,K as i,e as a}from"./index-kxFCfKdx.js";function m(){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{m as u};
1
+ import{c as n,u as o,l as u,K as i,e as a}from"./index-BTX95t7l.js";function m(){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{m as u};
@@ -1 +1 @@
1
- import{c as m,r}from"./index-kxFCfKdx.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-BTX95t7l.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,l as d,N as y,K as g}from"./index-kxFCfKdx.js";import{u as _}from"./useMutation-ClL17OKX.js";import{a as p,u as A}from"./constants-C8DVLjyM.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,l as d,N as y,K as g}from"./index-BTX95t7l.js";import{u as _}from"./useMutation-BuhKRt0C.js";import{a as p,u as A}from"./constants-l6jfVkIP.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-kxFCfKdx.js";import{b as a,u as C,a as I}from"./use-collections-DWOZCISS.js";import{a as l,u}from"./constants-C8DVLjyM.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-BTX95t7l.js";import{b as a,u as C,a as I}from"./use-collections-M-ZucrNc.js";import{a as l,u}from"./constants-l6jfVkIP.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-DgpNxMlA.js";import{W as i}from"./index-BTX95t7l.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +1 @@
1
- import{aP as l,aQ as p,aR as n,aS as d,aT as h,N as b,r as o,aU as m,aV as f}from"./index-kxFCfKdx.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??d();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=b(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{aP as l,aQ as p,aR as n,aS as d,aT as h,N as b,r as o,aU as m,aV as f}from"./index-BTX95t7l.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??d();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=b(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{W as u,X as s}from"./index-BTX95t7l.js";function o(e,r){return u(e,s,r)}export{o as u};
@@ -1 +1 @@
1
- import{r as z,ae as A,j as c,ai as M,aj as ge,bB as h,b8 as he,b9 as X,aq as pe,b6 as be,b7 as me,m as ve,c as Y}from"./index-kxFCfKdx.js";import{c as Z}from"./button-B9UDEwx9.js";var ee="Toggle",te=z.forwardRef((t,e)=>{const{pressed:r,defaultPressed:n,onPressedChange:a,...o}=t,[i,s]=A({prop:r,onChange:a,defaultProp:n??!1,caller:ee});return c.jsx(M.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":t.disabled?"":void 0,...o,ref:e,onClick:ge(t.onClick,()=>{t.disabled||s(!i)})})});te.displayName=ee;var b="ToggleGroup",[re]=pe(b,[X]),ne=X(),S=h.forwardRef((t,e)=>{const{type:r,...n}=t;if(r==="single"){const a=n;return c.jsx(we,{...a,ref:e})}if(r==="multiple"){const a=n;return c.jsx(ye,{...a,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${b}\``)});S.displayName=b;var[ae,ie]=re(b),we=h.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...o}=t,[i,s]=A({prop:r,defaultProp:n??"",onChange:a,caller:b});return c.jsx(ae,{scope:t.__scopeToggleGroup,type:"single",value:h.useMemo(()=>i?[i]:[],[i]),onItemActivate:s,onItemDeactivate:h.useCallback(()=>s(""),[s]),children:c.jsx(oe,{...o,ref:e})})}),ye=h.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...o}=t,[i,s]=A({prop:r,defaultProp:n??[],onChange:a,caller:b}),f=h.useCallback(l=>s((d=[])=>[...d,l]),[s]),u=h.useCallback(l=>s((d=[])=>d.filter(xe=>xe!==l)),[s]);return c.jsx(ae,{scope:t.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:f,onItemDeactivate:u,children:c.jsx(oe,{...o,ref:e})})});S.displayName=b;var[$e,Ne]=re(b),oe=h.forwardRef((t,e)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:a=!0,orientation:o,dir:i,loop:s=!0,...f}=t,u=ne(r),l=be(i),d={role:"group",dir:l,...f};return c.jsx($e,{scope:r,rovingFocus:a,disabled:n,children:a?c.jsx(me,{asChild:!0,...u,orientation:o,dir:l,loop:s,children:c.jsx(M.div,{...d,ref:e})}):c.jsx(M.div,{...d,ref:e})})}),k="ToggleGroupItem",se=h.forwardRef((t,e)=>{const r=ie(k,t.__scopeToggleGroup),n=Ne(k,t.__scopeToggleGroup),a=ne(t.__scopeToggleGroup),o=r.value.includes(t.value),i=n.disabled||t.disabled,s={...t,pressed:o,disabled:i},f=h.useRef(null);return n.rovingFocus?c.jsx(he,{asChild:!0,...a,focusable:!i,active:o,ref:f,children:c.jsx(D,{...s,ref:e})}):c.jsx(D,{...s,ref:e})});se.displayName=k;var D=h.forwardRef((t,e)=>{const{__scopeToggleGroup:r,value:n,...a}=t,o=ie(k,r),i={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},s=o.type==="single"?i:void 0;return c.jsx(te,{...s,...a,ref:e,onPressedChange:f=>{f?o.onItemActivate(n):o.onItemDeactivate(n)}})}),Ge=S,Pe=se;const Re=ve("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),fe=z.createContext({size:"default",variant:"default"});function Ye(t){const e=Y.c(20);let r,n,a,o,i;e[0]!==t?({className:n,variant:i,size:o,children:r,...a}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=o,e[5]=i):(r=e[1],n=e[2],a=e[3],o=e[4],i=e[5]);let s;e[6]!==n?(s=Z("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",n),e[6]=n,e[7]=s):s=e[7];let f;e[8]!==o||e[9]!==i?(f={variant:i,size:o},e[8]=o,e[9]=i,e[10]=f):f=e[10];let u;e[11]!==r||e[12]!==f?(u=c.jsx(fe.Provider,{value:f,children:r}),e[11]=r,e[12]=f,e[13]=u):u=e[13];let l;return e[14]!==a||e[15]!==o||e[16]!==s||e[17]!==u||e[18]!==i?(l=c.jsx(Ge,{"data-slot":"toggle-group","data-variant":i,"data-size":o,className:s,...a,children:u}),e[14]=a,e[15]=o,e[16]=s,e[17]=u,e[18]=i,e[19]=l):l=e[19],l}function Ze(t){const e=Y.c(18);let r,n,a,o,i;e[0]!==t?({className:n,children:r,variant:i,size:o,...a}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=o,e[5]=i):(r=e[1],n=e[2],a=e[3],o=e[4],i=e[5]);const s=z.useContext(fe),f=s.variant||i,u=s.size||o;let l;e[6]!==n||e[7]!==s.size||e[8]!==s.variant||e[9]!==o||e[10]!==i?(l=Z(Re({variant:s.variant||i,size:s.size||o}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",n),e[6]=n,e[7]=s.size,e[8]=s.variant,e[9]=o,e[10]=i,e[11]=l):l=e[11];let d;return e[12]!==r||e[13]!==a||e[14]!==f||e[15]!==u||e[16]!==l?(d=c.jsx(Pe,{"data-slot":"toggle-group-item","data-variant":f,"data-size":u,className:l,...a,children:r}),e[12]=r,e[13]=a,e[14]=f,e[15]=u,e[16]=l,e[17]=d):d=e[17],d}function V(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function le(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function G(){}var y=.7,j=1/y,w="\\s*([+-]?\\d+)\\s*",$="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",p="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ke=/^#([0-9a-f]{3,8})$/,je=new RegExp(`^rgb\\(${w},${w},${w}\\)$`),Ce=new RegExp(`^rgb\\(${p},${p},${p}\\)$`),Te=new RegExp(`^rgba\\(${w},${w},${w},${$}\\)$`),_e=new RegExp(`^rgba\\(${p},${p},${p},${$}\\)$`),Me=new RegExp(`^hsl\\(${$},${p},${p}\\)$`),Ie=new RegExp(`^hsla\\(${$},${p},${p},${$}\\)$`),F={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};V(G,N,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:O,formatHex:O,formatHex8:Ee,formatHsl:He,formatRgb:B,toString:B});function O(){return this.rgb().formatHex()}function Ee(){return this.rgb().formatHex8()}function He(){return ue(this).formatHsl()}function B(){return this.rgb().formatRgb()}function N(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=ke.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?L(e):r===3?new x(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?P(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?P(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=je.exec(t))?new x(e[1],e[2],e[3],1):(e=Ce.exec(t))?new x(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Te.exec(t))?P(e[1],e[2],e[3],e[4]):(e=_e.exec(t))?P(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Me.exec(t))?K(e[1],e[2]/100,e[3]/100,1):(e=Ie.exec(t))?K(e[1],e[2]/100,e[3]/100,e[4]):F.hasOwnProperty(t)?L(F[t]):t==="transparent"?new x(NaN,NaN,NaN,0):null}function L(t){return new x(t>>16&255,t>>8&255,t&255,1)}function P(t,e,r,n){return n<=0&&(t=e=r=NaN),new x(t,e,r,n)}function ze(t){return t instanceof G||(t=N(t)),t?(t=t.rgb(),new x(t.r,t.g,t.b,t.opacity)):new x}function I(t,e,r,n){return arguments.length===1?ze(t):new x(t,e,r,n??1)}function x(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}V(x,I,le(G,{brighter(t){return t=t==null?j:Math.pow(j,t),new x(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?y:Math.pow(y,t),new x(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new x(v(this.r),v(this.g),v(this.b),C(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:U,formatHex:U,formatHex8:Ae,formatRgb:J,toString:J}));function U(){return`#${m(this.r)}${m(this.g)}${m(this.b)}`}function Ae(){return`#${m(this.r)}${m(this.g)}${m(this.b)}${m((isNaN(this.opacity)?1:this.opacity)*255)}`}function J(){const t=C(this.opacity);return`${t===1?"rgb(":"rgba("}${v(this.r)}, ${v(this.g)}, ${v(this.b)}${t===1?")":`, ${t})`}`}function C(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function v(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function m(t){return t=v(t),(t<16?"0":"")+t.toString(16)}function K(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new g(t,e,r,n)}function ue(t){if(t instanceof g)return new g(t.h,t.s,t.l,t.opacity);if(t instanceof G||(t=N(t)),!t)return new g;if(t instanceof g)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,a=Math.min(e,r,n),o=Math.max(e,r,n),i=NaN,s=o-a,f=(o+a)/2;return s?(e===o?i=(r-n)/s+(r<n)*6:r===o?i=(n-e)/s+2:i=(e-r)/s+4,s/=f<.5?o+a:2-o-a,i*=60):s=f>0&&f<1?0:i,new g(i,s,f,t.opacity)}function Se(t,e,r,n){return arguments.length===1?ue(t):new g(t,e,r,n??1)}function g(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}V(g,Se,le(G,{brighter(t){return t=t==null?j:Math.pow(j,t),new g(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?y:Math.pow(y,t),new g(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,a=2*r-n;return new x(T(t>=240?t-240:t+120,a,n),T(t,a,n),T(t<120?t+240:t-120,a,n),this.opacity)},clamp(){return new g(Q(this.h),R(this.s),R(this.l),C(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=C(this.opacity);return`${t===1?"hsl(":"hsla("}${Q(this.h)}, ${R(this.s)*100}%, ${R(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Q(t){return t=(t||0)%360,t<0?t+360:t}function R(t){return Math.max(0,Math.min(1,t||0))}function T(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const q=t=>()=>t;function Ve(t,e){return function(r){return t+r*e}}function qe(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function De(t){return(t=+t)==1?ce:function(e,r){return r-e?qe(e,r,t):q(isNaN(e)?r:e)}}function ce(t,e){var r=e-t;return r?Ve(t,r):q(isNaN(t)?e:t)}const W=(function t(e){var r=De(e);function n(a,o){var i=r((a=I(a)).r,(o=I(o)).r),s=r(a.g,o.g),f=r(a.b,o.b),u=ce(a.opacity,o.opacity);return function(l){return a.r=i(l),a.g=s(l),a.b=f(l),a.opacity=u(l),a+""}}return n.gamma=t,n})(1);function Fe(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),a;return function(o){for(a=0;a<r;++a)n[a]=t[a]*(1-o)+e[a]*o;return n}}function Oe(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Be(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,a=new Array(n),o=new Array(r),i;for(i=0;i<n;++i)a[i]=de(t[i],e[i]);for(;i<r;++i)o[i]=e[i];return function(s){for(i=0;i<n;++i)o[i]=a[i](s);return o}}function Le(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function E(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function Ue(t,e){var r={},n={},a;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(a in e)a in t?r[a]=de(t[a],e[a]):n[a]=e[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var H=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_=new RegExp(H.source,"g");function Je(t){return function(){return t}}function Ke(t){return function(e){return t(e)+""}}function Qe(t,e){var r=H.lastIndex=_.lastIndex=0,n,a,o,i=-1,s=[],f=[];for(t=t+"",e=e+"";(n=H.exec(t))&&(a=_.exec(e));)(o=a.index)>r&&(o=e.slice(r,o),s[i]?s[i]+=o:s[++i]=o),(n=n[0])===(a=a[0])?s[i]?s[i]+=a:s[++i]=a:(s[++i]=null,f.push({i,x:E(n,a)})),r=_.lastIndex;return r<e.length&&(o=e.slice(r),s[i]?s[i]+=o:s[++i]=o),s.length<2?f[0]?Ke(f[0].x):Je(e):(e=f.length,function(u){for(var l=0,d;l<e;++l)s[(d=f[l]).i]=d.x(u);return s.join("")})}function de(t,e){var r=typeof e,n;return e==null||r==="boolean"?q(e):(r==="number"?E:r==="string"?(n=N(e))?(e=n,W):Qe:e instanceof N?W:e instanceof Date?Le:Oe(e)?Fe:Array.isArray(e)?Be:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Ue:E)(t,e)}export{Ze as T,W as a,Qe as b,N as c,de as d,Ye as e,E as i};
1
+ import{r as H,ae as A,j as c,ai as M,aj as ge,bz as h,b8 as he,b9 as X,aq as pe,b6 as be,b7 as me,m as ve,c as Y}from"./index-BTX95t7l.js";import{c as Z}from"./button-BNEclrG2.js";var ee="Toggle",te=H.forwardRef((t,e)=>{const{pressed:r,defaultPressed:n,onPressedChange:a,...o}=t,[i,s]=A({prop:r,onChange:a,defaultProp:n??!1,caller:ee});return c.jsx(M.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":t.disabled?"":void 0,...o,ref:e,onClick:ge(t.onClick,()=>{t.disabled||s(!i)})})});te.displayName=ee;var b="ToggleGroup",[re]=pe(b,[X]),ne=X(),S=h.forwardRef((t,e)=>{const{type:r,...n}=t;if(r==="single"){const a=n;return c.jsx(we,{...a,ref:e})}if(r==="multiple"){const a=n;return c.jsx(ye,{...a,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${b}\``)});S.displayName=b;var[ae,ie]=re(b),we=h.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...o}=t,[i,s]=A({prop:r,defaultProp:n??"",onChange:a,caller:b});return c.jsx(ae,{scope:t.__scopeToggleGroup,type:"single",value:h.useMemo(()=>i?[i]:[],[i]),onItemActivate:s,onItemDeactivate:h.useCallback(()=>s(""),[s]),children:c.jsx(oe,{...o,ref:e})})}),ye=h.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...o}=t,[i,s]=A({prop:r,defaultProp:n??[],onChange:a,caller:b}),f=h.useCallback(l=>s((d=[])=>[...d,l]),[s]),u=h.useCallback(l=>s((d=[])=>d.filter(xe=>xe!==l)),[s]);return c.jsx(ae,{scope:t.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:f,onItemDeactivate:u,children:c.jsx(oe,{...o,ref:e})})});S.displayName=b;var[$e,Ne]=re(b),oe=h.forwardRef((t,e)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:a=!0,orientation:o,dir:i,loop:s=!0,...f}=t,u=ne(r),l=be(i),d={role:"group",dir:l,...f};return c.jsx($e,{scope:r,rovingFocus:a,disabled:n,children:a?c.jsx(me,{asChild:!0,...u,orientation:o,dir:l,loop:s,children:c.jsx(M.div,{...d,ref:e})}):c.jsx(M.div,{...d,ref:e})})}),k="ToggleGroupItem",se=h.forwardRef((t,e)=>{const r=ie(k,t.__scopeToggleGroup),n=Ne(k,t.__scopeToggleGroup),a=ne(t.__scopeToggleGroup),o=r.value.includes(t.value),i=n.disabled||t.disabled,s={...t,pressed:o,disabled:i},f=h.useRef(null);return n.rovingFocus?c.jsx(he,{asChild:!0,...a,focusable:!i,active:o,ref:f,children:c.jsx(D,{...s,ref:e})}):c.jsx(D,{...s,ref:e})});se.displayName=k;var D=h.forwardRef((t,e)=>{const{__scopeToggleGroup:r,value:n,...a}=t,o=ie(k,r),i={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},s=o.type==="single"?i:void 0;return c.jsx(te,{...s,...a,ref:e,onPressedChange:f=>{f?o.onItemActivate(n):o.onItemDeactivate(n)}})}),Ge=S,Pe=se;const Re=ve("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),fe=H.createContext({size:"default",variant:"default"});function Ye(t){const e=Y.c(20);let r,n,a,o,i;e[0]!==t?({className:n,variant:i,size:o,children:r,...a}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=o,e[5]=i):(r=e[1],n=e[2],a=e[3],o=e[4],i=e[5]);let s;e[6]!==n?(s=Z("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",n),e[6]=n,e[7]=s):s=e[7];let f;e[8]!==o||e[9]!==i?(f={variant:i,size:o},e[8]=o,e[9]=i,e[10]=f):f=e[10];let u;e[11]!==r||e[12]!==f?(u=c.jsx(fe.Provider,{value:f,children:r}),e[11]=r,e[12]=f,e[13]=u):u=e[13];let l;return e[14]!==a||e[15]!==o||e[16]!==s||e[17]!==u||e[18]!==i?(l=c.jsx(Ge,{"data-slot":"toggle-group","data-variant":i,"data-size":o,className:s,...a,children:u}),e[14]=a,e[15]=o,e[16]=s,e[17]=u,e[18]=i,e[19]=l):l=e[19],l}function Ze(t){const e=Y.c(18);let r,n,a,o,i;e[0]!==t?({className:n,children:r,variant:i,size:o,...a}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=o,e[5]=i):(r=e[1],n=e[2],a=e[3],o=e[4],i=e[5]);const s=H.useContext(fe),f=s.variant||i,u=s.size||o;let l;e[6]!==n||e[7]!==s.size||e[8]!==s.variant||e[9]!==o||e[10]!==i?(l=Z(Re({variant:s.variant||i,size:s.size||o}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",n),e[6]=n,e[7]=s.size,e[8]=s.variant,e[9]=o,e[10]=i,e[11]=l):l=e[11];let d;return e[12]!==r||e[13]!==a||e[14]!==f||e[15]!==u||e[16]!==l?(d=c.jsx(Pe,{"data-slot":"toggle-group-item","data-variant":f,"data-size":u,className:l,...a,children:r}),e[12]=r,e[13]=a,e[14]=f,e[15]=u,e[16]=l,e[17]=d):d=e[17],d}function V(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function le(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function G(){}var y=.7,j=1/y,w="\\s*([+-]?\\d+)\\s*",$="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",p="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ke=/^#([0-9a-f]{3,8})$/,je=new RegExp(`^rgb\\(${w},${w},${w}\\)$`),Ce=new RegExp(`^rgb\\(${p},${p},${p}\\)$`),Te=new RegExp(`^rgba\\(${w},${w},${w},${$}\\)$`),_e=new RegExp(`^rgba\\(${p},${p},${p},${$}\\)$`),Me=new RegExp(`^hsl\\(${$},${p},${p}\\)$`),Ie=new RegExp(`^hsla\\(${$},${p},${p},${$}\\)$`),F={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};V(G,N,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:O,formatHex:O,formatHex8:Ee,formatHsl:ze,formatRgb:B,toString:B});function O(){return this.rgb().formatHex()}function Ee(){return this.rgb().formatHex8()}function ze(){return ue(this).formatHsl()}function B(){return this.rgb().formatRgb()}function N(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=ke.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?L(e):r===3?new x(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?P(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?P(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=je.exec(t))?new x(e[1],e[2],e[3],1):(e=Ce.exec(t))?new x(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Te.exec(t))?P(e[1],e[2],e[3],e[4]):(e=_e.exec(t))?P(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Me.exec(t))?K(e[1],e[2]/100,e[3]/100,1):(e=Ie.exec(t))?K(e[1],e[2]/100,e[3]/100,e[4]):F.hasOwnProperty(t)?L(F[t]):t==="transparent"?new x(NaN,NaN,NaN,0):null}function L(t){return new x(t>>16&255,t>>8&255,t&255,1)}function P(t,e,r,n){return n<=0&&(t=e=r=NaN),new x(t,e,r,n)}function He(t){return t instanceof G||(t=N(t)),t?(t=t.rgb(),new x(t.r,t.g,t.b,t.opacity)):new x}function I(t,e,r,n){return arguments.length===1?He(t):new x(t,e,r,n??1)}function x(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}V(x,I,le(G,{brighter(t){return t=t==null?j:Math.pow(j,t),new x(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?y:Math.pow(y,t),new x(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new x(v(this.r),v(this.g),v(this.b),C(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:U,formatHex:U,formatHex8:Ae,formatRgb:J,toString:J}));function U(){return`#${m(this.r)}${m(this.g)}${m(this.b)}`}function Ae(){return`#${m(this.r)}${m(this.g)}${m(this.b)}${m((isNaN(this.opacity)?1:this.opacity)*255)}`}function J(){const t=C(this.opacity);return`${t===1?"rgb(":"rgba("}${v(this.r)}, ${v(this.g)}, ${v(this.b)}${t===1?")":`, ${t})`}`}function C(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function v(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function m(t){return t=v(t),(t<16?"0":"")+t.toString(16)}function K(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new g(t,e,r,n)}function ue(t){if(t instanceof g)return new g(t.h,t.s,t.l,t.opacity);if(t instanceof G||(t=N(t)),!t)return new g;if(t instanceof g)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,a=Math.min(e,r,n),o=Math.max(e,r,n),i=NaN,s=o-a,f=(o+a)/2;return s?(e===o?i=(r-n)/s+(r<n)*6:r===o?i=(n-e)/s+2:i=(e-r)/s+4,s/=f<.5?o+a:2-o-a,i*=60):s=f>0&&f<1?0:i,new g(i,s,f,t.opacity)}function Se(t,e,r,n){return arguments.length===1?ue(t):new g(t,e,r,n??1)}function g(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}V(g,Se,le(G,{brighter(t){return t=t==null?j:Math.pow(j,t),new g(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?y:Math.pow(y,t),new g(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,a=2*r-n;return new x(T(t>=240?t-240:t+120,a,n),T(t,a,n),T(t<120?t+240:t-120,a,n),this.opacity)},clamp(){return new g(Q(this.h),R(this.s),R(this.l),C(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=C(this.opacity);return`${t===1?"hsl(":"hsla("}${Q(this.h)}, ${R(this.s)*100}%, ${R(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Q(t){return t=(t||0)%360,t<0?t+360:t}function R(t){return Math.max(0,Math.min(1,t||0))}function T(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const q=t=>()=>t;function Ve(t,e){return function(r){return t+r*e}}function qe(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function De(t){return(t=+t)==1?ce:function(e,r){return r-e?qe(e,r,t):q(isNaN(e)?r:e)}}function ce(t,e){var r=e-t;return r?Ve(t,r):q(isNaN(t)?e:t)}const W=(function t(e){var r=De(e);function n(a,o){var i=r((a=I(a)).r,(o=I(o)).r),s=r(a.g,o.g),f=r(a.b,o.b),u=ce(a.opacity,o.opacity);return function(l){return a.r=i(l),a.g=s(l),a.b=f(l),a.opacity=u(l),a+""}}return n.gamma=t,n})(1);function Fe(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),a;return function(o){for(a=0;a<r;++a)n[a]=t[a]*(1-o)+e[a]*o;return n}}function Oe(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Be(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,a=new Array(n),o=new Array(r),i;for(i=0;i<n;++i)a[i]=de(t[i],e[i]);for(;i<r;++i)o[i]=e[i];return function(s){for(i=0;i<n;++i)o[i]=a[i](s);return o}}function Le(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function E(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function Ue(t,e){var r={},n={},a;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(a in e)a in t?r[a]=de(t[a],e[a]):n[a]=e[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var z=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_=new RegExp(z.source,"g");function Je(t){return function(){return t}}function Ke(t){return function(e){return t(e)+""}}function Qe(t,e){var r=z.lastIndex=_.lastIndex=0,n,a,o,i=-1,s=[],f=[];for(t=t+"",e=e+"";(n=z.exec(t))&&(a=_.exec(e));)(o=a.index)>r&&(o=e.slice(r,o),s[i]?s[i]+=o:s[++i]=o),(n=n[0])===(a=a[0])?s[i]?s[i]+=a:s[++i]=a:(s[++i]=null,f.push({i,x:E(n,a)})),r=_.lastIndex;return r<e.length&&(o=e.slice(r),s[i]?s[i]+=o:s[++i]=o),s.length<2?f[0]?Ke(f[0].x):Je(e):(e=f.length,function(u){for(var l=0,d;l<e;++l)s[(d=f[l]).i]=d.x(u);return s.join("")})}function de(t,e){var r=typeof e,n;return e==null||r==="boolean"?q(e):(r==="number"?E:r==="string"?(n=N(e))?(e=n,W):Qe:e instanceof N?W:e instanceof Date?Le:Oe(e)?Fe:Array.isArray(e)?Be:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Ue:E)(t,e)}export{Ze as T,W as a,Qe as b,N as c,de as d,Ye as e,E as i};
@@ -1 +1 @@
1
- import{c as Y,r as V,j as i}from"./index-kxFCfKdx.js";import{c as n}from"./button-B9UDEwx9.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-BTX95t7l.js";import{c as n}from"./button-BNEclrG2.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,e as L,f as P,r as v,j as e,c as B}from"./index-kxFCfKdx.js";import{b as _}from"./constants-C8DVLjyM.js";import{C as R}from"./collection-tab-DGpjXcu1.js";import{a as z,b as A}from"./use-connection-ASBc3U14.js";import{B as y}from"./button-B9UDEwx9.js";import{E as F}from"./empty-state-D6Pye5dp.js";import{C as M}from"./collection-header-d_96L4kd.js";import{a as O,b as H}from"./use-binding-Bpukv3gt.js";import{i as T}from"./Loading01-C5WNj1RN.js";import"./generate-id-Dyweu44Y.js";import"./collection-display-button-BAinwubP.js";import"./dropdown-menu-5V-XyUMl.js";import"./Grid01-F6FBpTXb.js";import"./ArrowUp-BvlJhwmz.js";import"./Check-DImC9hlR.js";import"./List-taDOKmLS.js";import"./tooltip-DPmy6Yc4.js";import"./view-mode-toggle-B5HElat6.js";import"./collection-search-Cp9Rg8cG.js";import"./SearchMd-CQBqMKg_.js";import"./input-CJuUYj5Y.js";import"./card-D-ZcDLJM.js";import"./Copy01-CJVQGg2V.js";import"./DotsVertical-RAbtNrG6.js";import"./Edit01-DsrgmMbR.js";import"./use-list-state-ZDRP3zFW.js";import"./use-mobile-BuEGyUe0.js";import"./Trash01-NIFttcxe.js";import"./collection-table-wrapper-Cfb-5BQo.js";import"./empty-state-Ba4zQn5e.js";import"./Inbox01-BExxQniM.js";import"./avatar-HSzeBtSD.js";import"./useQuery-CVADJf0h.js";import"./pin-to-sidebar-button-DKtGxFhi.js";import"./use-organization-settings-hA9VwO-v.js";import"./useMutation-ClL17OKX.js";import"./use-collections-DWOZCISS.js";import"./constants-CuO4IXOK.js";import"./alert-dialog-nojSsjex.js";import"./Plus-Rzuz08cb.js";import"./layout-BdEZp7Lm.js";import"./ArrowLeft-B1SBiQVA.js";import"./binder-BvGWgf0j.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 b;t[10]===Symbol.for("react.memo_cache_sentinel")?(b=e.jsx(T,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t[10]=b):b=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:[b,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 I;return t[25]!==d||t[26]!==x?(I=e.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[d,x]}),t[25]=d,t[26]=x,t[27]=I):I=t[27],I}function _t(){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{_t as default};
1
+ import{u as k,e as L,f as P,r as v,j as e,c as B}from"./index-BTX95t7l.js";import{b as _}from"./constants-l6jfVkIP.js";import{C as R}from"./collection-tab-Eyar9Ax-.js";import{a as z,b as A}from"./use-connection-B7MC5D37.js";import{B as y}from"./button-BNEclrG2.js";import{E as F}from"./empty-state-Bnk561r4.js";import{C as M}from"./collection-header-BMM2Ppyf.js";import{a as O,b as H}from"./use-binding-BM0mjywS.js";import{i as T}from"./Loading01-CopTTh4g.js";import"./generate-id-Dyweu44Y.js";import"./collection-display-button-Bv_XCGpu.js";import"./dropdown-menu-B5X7QG53.js";import"./Grid01-CHS_jF02.js";import"./ArrowUp-PDh8aKqr.js";import"./Check-DCOgSIim.js";import"./List-C7xsEmxx.js";import"./tooltip-Mf5UtuF2.js";import"./view-mode-toggle-C5CEe5h-.js";import"./collection-search-ClAji_RX.js";import"./SearchMd-CHkFEvMn.js";import"./input-Vw7XIX0r.js";import"./card-kDbUMtCL.js";import"./Copy01-C5lSJKpp.js";import"./DotsVertical-qocOLS4A.js";import"./Edit01-DHPNOaMT.js";import"./use-list-state-5iRHLEuj.js";import"./use-mobile-C3BU8S8_.js";import"./Trash01-CSFSnmeR.js";import"./collection-table-wrapper-BdCz63Jd.js";import"./empty-state-DHhGwZ9F.js";import"./Inbox01-39gPJAMl.js";import"./avatar-BIPSK-nZ.js";import"./useQuery-CnjlQpZk.js";import"./pin-to-sidebar-button-CDjTUMWb.js";import"./use-organization-settings-Djf-qkBb.js";import"./useMutation-BuhKRt0C.js";import"./use-collections-M-ZucrNc.js";import"./constants-Cp5o6xb6.js";import"./alert-dialog-JUSgghwR.js";import"./Plus-erQKhzFc.js";import"./layout-DKHrwMN9.js";import"./ArrowLeft-2xAygwK8.js";import"./binder-ku-JM_HB.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 b;t[10]===Symbol.for("react.memo_cache_sentinel")?(b=e.jsx(T,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t[10]=b):b=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:[b,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 I;return t[25]!==d||t[26]!==x?(I=e.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[d,x]}),t[25]=d,t[26]=x,t[27]=I):I=t[27],I}function _t(){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{_t 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-kxFCfKdx.js"></script>
6
+ <script type="module" crossorigin src="/assets/index-BTX95t7l.js"></script>
7
7
  <link rel="stylesheet" crossorigin href="/assets/index-B0qsrDFa.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.44.2",
3
+ "version": "2.44.3",
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{c,j as l}from"./index-kxFCfKdx.js";import{c as n}from"./button-B9UDEwx9.js";function f(o){const e=c.c(8);let r,t;e[0]!==o?({className:r,...t}=o,e[0]=o,e[1]=r,e[2]=t):(r=e[1],t=e[2]);let s;e[3]!==r?(s=n("bg-card text-card-foreground hover:bg-accent/50 flex flex-col gap-6 rounded-xl border border-border/75",r),e[3]=r,e[4]=s):s=e[4];let a;return e[5]!==t||e[6]!==s?(a=l.jsx("div",{"data-slot":"card",className:s,...t}),e[5]=t,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(4);let r;e[0]!==o?({...r}=o,e[0]=o,e[1]=r):r=e[1];let t;return e[2]!==r?(t=l.jsx("div",{"data-slot":"card-content",...r}),e[2]=r,e[3]=t):t=e[3],t}export{f as C,p as a};
@@ -1 +0,0 @@
1
- import{r as c}from"./index-kxFCfKdx.js";const h=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase()),i=t=>{const e=y(t);return e.charAt(0).toUpperCase()+e.slice(1)},l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim(),f=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const w=c.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:s="",children:a,iconNode:p,...n},d)=>c.createElement("svg",{ref:d,...k,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",s),...!a&&!f(n)&&{"aria-hidden":"true"},...n},[...p.map(([m,C])=>c.createElement(m,C)),...Array.isArray(a)?a:[a]]));const u=(t,e)=>{const r=c.forwardRef(({className:o,...s},a)=>c.createElement(w,{ref:a,iconNode:e,className:l(`lucide-${h(i(t))}`,`lucide-${t}`,o),...s}));return r.displayName=i(t),r};const g=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],b=u("check",g);const x=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],L=u("circle-alert",x);export{L as C,b as a,u as c};
@@ -1 +0,0 @@
1
- import{c as T,bu as M,j as e,bv as P,N as q,r as R,a8 as h,a as O}from"./index-kxFCfKdx.js";import{u as A}from"./useQuery-CVADJf0h.js";import{u as _}from"./useMutation-ClL17OKX.js";import{B as y}from"./button-B9UDEwx9.js";import{C as N,a as v}from"./card-D-ZcDLJM.js";import{i as L,a as U}from"./mcp-oauth-BCtnFmpv.js";import{c as C,C as K,a as k}from"./circle-alert-CsGRs6FI.js";const Q=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],D=C("external-link",Q);const H=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],w=C("loader-circle",H);const J=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],B=C("refresh-cw",J),Y=t=>{const n=T.c(6);let i;n[0]!==t?({...i}=t,n[0]=t,n[1]=i):i=n[1];const{theme:a}=M(),d=a===void 0?"system":a;let r;n[2]===Symbol.for("react.memo_cache_sentinel")?(r={"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},n[2]=r):r=n[2];let m;return n[3]!==i||n[4]!==d?(m=e.jsx(P,{theme:d,className:"toaster group",style:r,...i}),n[3]=i,n[4]=d,n[5]=m):m=n[5],m},b={session:t=>["user-sandbox-session",t]};function V({sessionId:t,onComplete:n,onError:i}){const a=q(),[p,d]=R.useState(null),{data:r,isLoading:m,error:j}=A({queryKey:b.session(t),queryFn:async()=>{const s=await fetch(`/api/user-sandbox/sessions/${t}`);if(!s.ok){const o=await s.json();throw new Error(o.error||"Failed to load session")}return s.json()}}),F=_({mutationFn:async({appName:s,connectionId:o})=>{const l=await fetch(`/api/user-sandbox/sessions/${t}/configure`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app_name:s,connection_id:o})});if(!l.ok){const u=await l.json();throw new Error(u.error||"Configuration failed")}return l.json()},onSuccess:()=>{a.invalidateQueries({queryKey:b.session(t)})}}),x=_({mutationFn:async()=>{const s=await fetch(`/api/user-sandbox/sessions/${t}/complete`,{method:"POST",headers:{"Content-Type":"application/json"}});if(!s.ok){const o=await s.json();throw new Error(o.error||"Failed to complete")}return s.json()},onSuccess:s=>{s.redirectUrl?window.location.href=s.redirectUrl:(h.success("Setup complete!"),a.invalidateQueries({queryKey:b.session(t)}),n?.({agentId:s.agentId,redirectUrl:s.redirectUrl}))},onError:s=>{const o=s instanceof Error?s:new Error("Failed to complete");h.error(o.message),i?.(o)}}),S=async s=>{d(s.app_name);try{const o=await fetch(`/api/user-sandbox/sessions/${t}/provision`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app_name:s.app_name})});if(!o.ok){const g=await o.json();throw new Error(g.error||"Failed to provision connection")}const u=(await o.json()).connection_id;if(s.connection_type==="HTTP"||s.connection_type==="SSE"||s.connection_type==="Websocket"){const g=`/mcp/${u}`,z=await L({url:g,token:null});if(!z.isAuthenticated&&z.supportsOAuth){h.info("Opening authentication window...");const c=await U({connectionId:u,clientName:s.title,timeout:3e5});if(c.error)throw new Error(c.error);if(c.tokenInfo){const E=await fetch(`/api/connections/${u}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:c.tokenInfo.accessToken,refreshToken:c.tokenInfo.refreshToken,expiresIn:c.tokenInfo.expiresIn,scope:c.tokenInfo.scope,clientId:c.tokenInfo.clientId,clientSecret:c.tokenInfo.clientSecret,tokenEndpoint:c.tokenInfo.tokenEndpoint})});if(!E.ok){const $=await E.json().catch(()=>({}));throw new Error($.error||"Failed to save authentication tokens. Please try again.")}}}}await F.mutateAsync({appName:s.app_name,connectionId:u}),h.success(`${s.title} connected successfully`)}catch(o){console.error("Connection error:",o);const l=o instanceof Error?o:new Error("Failed to connect");h.error(l.message),i?.(l)}finally{d(null)}},I=r?.apps.every(s=>s.status.configured),f=r?.session.status==="completed";return m?e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:e.jsx(w,{className:"size-8 animate-spin text-muted-foreground"})}):j?e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:e.jsx(N,{className:"max-w-md w-full",children:e.jsx(v,{className:"pt-6",children:e.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[e.jsx("div",{className:"size-12 rounded-full bg-destructive/10 flex items-center justify-center",children:e.jsx(K,{className:"size-6 text-destructive"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Session Error"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:j instanceof Error?j.message:"Failed to load"})]})]})})})}):r?e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(Y,{}),e.jsxs("div",{className:"max-w-lg mx-auto px-4 py-12",children:[e.jsxs("div",{className:"text-center mb-8",children:[r.template.icon&&e.jsx("div",{className:"size-16 mx-auto mb-4 rounded-xl bg-muted flex items-center justify-center overflow-hidden",children:e.jsx("img",{src:r.template.icon,alt:"",className:"size-10 object-contain"})}),e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:r.template.title}),r.template.description&&e.jsx("p",{className:"text-muted-foreground mt-2",children:r.template.description})]}),f&&e.jsx(N,{className:"mb-6 border-green-500/20 bg-green-500/5",children:e.jsx(v,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"size-10 rounded-full bg-green-500/10 flex items-center justify-center",children:e.jsx(k,{className:"size-5 text-green-500"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Setup Complete"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your integrations are ready to use."})]})]})})}),e.jsx("div",{className:"space-y-3",children:r.apps.map(s=>e.jsx(N,{children:e.jsx(v,{className:"py-4",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"size-10 rounded-lg bg-muted flex items-center justify-center shrink-0 overflow-hidden",children:s.icon?e.jsx("img",{src:s.icon,alt:"",className:"size-6 object-contain"}):e.jsx("span",{className:"text-lg",children:"📦"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium truncate",children:s.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.status.configured?e.jsxs("span",{className:"text-green-600 dark:text-green-400 flex items-center gap-1",children:[e.jsx(k,{className:"size-3"})," Connected"]}):s.requires_oauth?"Requires authentication":"Ready to connect"})]}),!s.status.configured&&!f&&e.jsx(y,{size:"sm",onClick:()=>S(s),disabled:p!==null||x.isPending,children:p===s.app_name?e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"size-4 mr-2 animate-spin"}),"Connecting..."]}):e.jsxs(e.Fragment,{children:[e.jsx(D,{className:"size-4 mr-2"}),"Connect"]})}),s.status.configured&&!f&&e.jsxs(y,{size:"sm",variant:"outline",onClick:()=>S(s),disabled:p!==null||x.isPending,children:[e.jsx(B,{className:"size-4 mr-2"}),"Reconnect"]}),f&&e.jsx("div",{className:"size-8 rounded-full bg-green-500/10 flex items-center justify-center",children:e.jsx(k,{className:"size-4 text-green-500"})})]})})},s.app_name))}),I&&!f&&e.jsx("div",{className:"mt-6",children:e.jsx(y,{className:"w-full",size:"lg",onClick:()=>x.mutate(),disabled:x.isPending,children:x.isPending?e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"size-4 mr-2 animate-spin"}),"Completing..."]}):"Complete Setup"})}),e.jsx("div",{className:"mt-8 pt-6 border-t text-center",children:e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Session expires:"," ",new Date(r.session.expires_at).toLocaleString()]})})]})]}):null}function oe(){const t=T.c(3);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/connect/$sessionId"},t[0]=n):n=t[0];const{sessionId:i}=O(n);let a;return t[1]!==i?(a=e.jsx(V,{sessionId:i}),t[1]=i,t[2]=a):a=t[2],a}export{oe as default};
@@ -1 +0,0 @@
1
- import{c as Q,j as o,f as H,bg as X,r as q,a as ce,u as ae,g as le,bq as me}from"./index-kxFCfKdx.js";import{E as G,I as Y}from"./empty-state-D6Pye5dp.js";import{E as Z}from"./error-boundary-BYKWfLka.js";import{b as de}from"./use-binding-Bpukv3gt.js";import{u as ue,S as pe}from"./index-BJd9JH52.js";import{f as fe}from"./use-collections-DWOZCISS.js";import{u as J,a as he}from"./use-connection-ASBc3U14.js";import{u as xe}from"./constants-C8DVLjyM.js";import{b as ge,c as be}from"./use-mcp-prompts-DXLHacDq.js";import{B as je}from"./button-B9UDEwx9.js";import{R as ye}from"./resource-tabs-DNjaGx4N.js";import{i as ee}from"./Loading01-C5WNj1RN.js";import{V as te,a as Se,b as Ce}from"./layout-BdEZp7Lm.js";import{C as ve}from"./collection-tab-DGpjXcu1.js";import{C as oe}from"./collection-display-button-BAinwubP.js";import{C as se}from"./collection-search-Cp9Rg8cG.js";import{C as ne}from"./collection-table-wrapper-Cfb-5BQo.js";import{P as re}from"./pin-to-sidebar-button-DKtGxFhi.js";import{C as ie}from"./card-D-ZcDLJM.js";import{R as Ne,T as Te}from"./tools-list-BE1mq5Cn.js";import"./binder-BvGWgf0j.js";import"./mcp-oauth-BCtnFmpv.js";import"./env-vars-editor-BKG_L2uV.js";import"./input-CJuUYj5Y.js";import"./Plus-Rzuz08cb.js";import"./Trash01-NIFttcxe.js";import"./File06-DdyNkMaH.js";import"./Key01-BPqaf5vy.js";import"./badge-D7yW7Ams.js";import"./dropdown-menu-5V-XyUMl.js";import"./Grid01-F6FBpTXb.js";import"./form-DufpJhV9.js";import"./select-6QIp3PPA.js";import"./tooltip-DPmy6Yc4.js";import"./Check-DImC9hlR.js";import"./ChevronDown-CJiuDn-R.js";import"./extract-connection-data-CDfHtG_N.js";import"./constants-CuO4IXOK.js";import"./github-icon-Dp3wHhYE.js";import"./registry-utils-9nMczNLD.js";import"./generate-id-Dyweu44Y.js";import"./CpuChip02-CvTMaFgN.js";import"./Terminal-kk64xKO9.js";import"./use-virtual-mcp-BR9Cj6JE.js";import"./index-fVdZwXbQ.js";import"./index-CVzDWVip.js";import"./circle-alert-CsGRs6FI.js";import"./index-g9oC-3mV.js";import"./X-DmFAeozb.js";import"./monaco-editor-1VMfvFaT.js";import"./infiniteQueryObserver-Q9Ch1SlH.js";import"./spinner-CHfAw4LE.js";import"./localstorage-keys-DuVpM8xt.js";import"./useQuery-CVADJf0h.js";import"./useMutation-ClL17OKX.js";import"./popover-IWCGO-jB.js";import"./Image01-CGATMxv1.js";import"./SearchMd-CQBqMKg_.js";import"./dialog-DUXNadw5.js";import"./AlertCircle-C1oaexcn.js";import"./ArrowUp-BvlJhwmz.js";import"./Edit01-DsrgmMbR.js";import"./Copy01-CJVQGg2V.js";import"./use-create-virtual-mcp-DlrAoyaQ.js";import"./ArrowLeft-B1SBiQVA.js";import"./DotsVertical-RAbtNrG6.js";import"./use-list-state-ZDRP3zFW.js";import"./use-mobile-BuEGyUe0.js";import"./empty-state-Ba4zQn5e.js";import"./Inbox01-BExxQniM.js";import"./avatar-HSzeBtSD.js";import"./alert-dialog-nojSsjex.js";import"./List-taDOKmLS.js";import"./view-mode-toggle-B5HElat6.js";import"./use-organization-settings-hA9VwO-v.js";function we(t){const e=Q.c(42),{prompts:n,connectionId:s,org:r,connectionTitle:d,connectionIcon:l,onPromptClick:b,showToolbar:T,emptyMessage:E}=t,I=T===void 0?!0:T,R=E===void 0?"This connection doesn't have any prompts yet.":E,u=H(),x=X().location.href,[j,f]=q.useState(""),[g,i]=q.useState("table"),[p,w]=q.useState("name"),[m,D]=q.useState("asc");let V;e[0]!==m||e[1]!==p?(V=h=>{p===h?(D(_e),m==="desc"&&w(void 0)):(w(h),D("asc"))},e[0]=m,e[1]=p,e[2]=V):V=e[2];const v=V;let k;e[3]!==s||e[4]!==u||e[5]!==b||e[6]!==r?(k=h=>{b?b(h):s&&r&&u({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:r,connectionId:s,collectionName:"prompts",itemId:encodeURIComponent(h.name)}})},e[3]=s,e[4]=u,e[5]=b,e[6]=r,e[7]=k):k=e[7];const _=k;let $;if(e[8]!==n||e[9]!==j||e[10]!==m||e[11]!==p){const h=!n||n.length===0?[]:j.trim()?(()=>{const K=j.toLowerCase();return n.filter(B=>B.name.toLowerCase().includes(K)||B.description&&B.description.toLowerCase().includes(K))})():n;$=!p||!m?h:[...h].sort((K,B)=>{const F=K[p]||"",U=B[p]||"",W=String(F).localeCompare(String(U));return m==="asc"?W:-W}),e[8]=n,e[9]=j,e[10]=m,e[11]=p,e[12]=$}else $=e[12];const N=$;let O;e[13]===Symbol.for("react.memo_cache_sentinel")?(O=[{id:"name",header:"Name",render:ke,sortable:!0},{id:"description",header:"Description",render:Re,cellClassName:"flex-1",sortable:!0}],e[13]=O):O=e[13];const L=O;let a;e[14]===Symbol.for("react.memo_cache_sentinel")?(a=L.filter(Ie).map($e),e[14]=a):a=e[14];const A=a;let y;e[15]!==l||e[16]!==d||e[17]!==v||e[18]!==I||e[19]!==m||e[20]!==p||e[21]!==x||e[22]!==g?(y=I&&o.jsxs(te,{children:[o.jsx(oe,{viewMode:g,onViewModeChange:i,sortKey:p,sortDirection:m,onSort:v,sortOptions:A}),o.jsx(re,{title:d?`${d}: Prompts`:"Prompts",url:x,icon:l??"description"})]}),e[15]=l,e[16]=d,e[17]=v,e[18]=I,e[19]=m,e[20]=p,e[21]=x,e[22]=g,e[23]=y):y=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S=h=>{h.key==="Escape"&&(f(""),h.target.blur())},e[24]=S):S=e[24];let C;e[25]!==j?(C=o.jsx(se,{value:j,onChange:f,placeholder:"Search prompts...",onKeyDown:S}),e[25]=j,e[26]=C):C=e[26];let c;e[27]!==R||e[28]!==_||e[29]!==v||e[30]!==j||e[31]!==m||e[32]!==p||e[33]!==N||e[34]!==g?(c=g==="cards"?o.jsx("div",{className:"flex-1 overflow-auto p-5",children:N.length===0?o.jsx(G,{image:null,title:j?"No prompts found":"No prompts available",description:j?"Try adjusting your search terms":R}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:N.map(h=>o.jsx(ie,{className:"cursor-pointer transition-colors",onClick:()=>_(h),children:o.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[o.jsx(Y,{icon:null,name:h.name,size:"md",className:"shrink-0 shadow-sm"}),o.jsxs("div",{className:"flex flex-col gap-0",children:[o.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:h.name}),o.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:h.description||"No description"})]})]})},h.name))})}):o.jsx(ne,{columns:L,data:N,isLoading:!1,sortKey:p,sortDirection:m,onSort:v,onRowClick:h=>_(h),emptyState:o.jsx(G,{image:null,title:j?"No prompts found":"No prompts available",description:j?"Try adjusting your search terms":R})}),e[27]=R,e[28]=_,e[29]=v,e[30]=j,e[31]=m,e[32]=p,e[33]=N,e[34]=g,e[35]=c):c=e[35];let P;e[36]!==C||e[37]!==c?(P=o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[C,c]}),e[36]=C,e[37]=c,e[38]=P):P=e[38];let M;return e[39]!==P||e[40]!==y?(M=o.jsxs(o.Fragment,{children:[y,P]}),e[39]=P,e[40]=y,e[41]=M):M=e[41],M}function $e(t){return{id:t.id,label:typeof t.header=="string"?t.header:t.id}}function Ie(t){return t.sortable}function Re(t){return o.jsx("span",{className:"text-sm text-foreground",children:t.description||"—"})}function ke(t){return o.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:t.name})}function _e(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function Le(t){const e=Q.c(6),{prompts:n,connectionId:s,org:r}=t,d=J(s),l=d?.title,b=d?.icon;let T;return e[0]!==s||e[1]!==r||e[2]!==n||e[3]!==l||e[4]!==b?(T=o.jsx(we,{prompts:n,connectionId:s,org:r,connectionTitle:l,connectionIcon:b}),e[0]=s,e[1]=r,e[2]=n,e[3]=l,e[4]=b,e[5]=T):T=e[5],T}function Pe(t){const e=Q.c(2),{repository:n}=t;let s;return e[0]!==n?(s=o.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:o.jsx(Ne,{repository:n})}),e[0]=n,e[1]=s):s=e[1],s}function Me(t){const e=Q.c(39),{resources:n,connectionTitle:s,connectionIcon:r,onResourceClick:d,showToolbar:l,emptyMessage:b}=t,T=l===void 0?!0:l,E=b===void 0?"This connection doesn't have any resources yet.":b,R=X().location.href,[u,z]=q.useState(""),[x,j]=q.useState("table"),[f,g]=q.useState("name"),[i,p]=q.useState("asc");let w;e[0]!==i||e[1]!==f?(w=c=>{f===c?(p(Ue),i==="desc"&&g(void 0)):(g(c),p("asc"))},e[0]=i,e[1]=f,e[2]=w):w=e[2];const m=w;let D;e[3]!==d?(D=c=>{d&&d(c)},e[3]=d,e[4]=D):D=e[4];const V=D;let v;if(e[5]!==n||e[6]!==u||e[7]!==i||e[8]!==f){const c=!n||n.length===0?[]:u.trim()?(()=>{const P=u.toLowerCase();return n.filter(M=>M.uri.toLowerCase().includes(P)||M.name&&M.name.toLowerCase().includes(P)||M.description&&M.description.toLowerCase().includes(P))})():n;v=!f||!i?c:[...c].sort((P,M)=>{const h=P[f]||"",K=M[f]||"",B=String(h).localeCompare(String(K));return i==="asc"?B:-B}),e[5]=n,e[6]=u,e[7]=i,e[8]=f,e[9]=v}else v=e[9];const k=v;let _;e[10]===Symbol.for("react.memo_cache_sentinel")?(_=[{id:"name",header:"Name",render:Be,sortable:!0},{id:"uri",header:"URI",render:Oe,sortable:!0},{id:"description",header:"Description",render:De,cellClassName:"flex-1",sortable:!0},{id:"mimeType",header:"Type",render:Ee,sortable:!0}],e[10]=_):_=e[10];const $=_;let N;e[11]===Symbol.for("react.memo_cache_sentinel")?(N=$.filter(Ae).map(Ve),e[11]=N):N=e[11];const O=N;let L;e[12]!==r||e[13]!==s||e[14]!==m||e[15]!==T||e[16]!==i||e[17]!==f||e[18]!==R||e[19]!==x?(L=T&&o.jsxs(te,{children:[o.jsx(oe,{viewMode:x,onViewModeChange:j,sortKey:f,sortDirection:i,onSort:m,sortOptions:O}),o.jsx(re,{title:s?`${s}: Resources`:"Resources",url:R,icon:r??"folder"})]}),e[12]=r,e[13]=s,e[14]=m,e[15]=T,e[16]=i,e[17]=f,e[18]=R,e[19]=x,e[20]=L):L=e[20];let a;e[21]===Symbol.for("react.memo_cache_sentinel")?(a=c=>{c.key==="Escape"&&(z(""),c.target.blur())},e[21]=a):a=e[21];let A;e[22]!==u?(A=o.jsx(se,{value:u,onChange:z,placeholder:"Search resources...",onKeyDown:a}),e[22]=u,e[23]=A):A=e[23];let y;e[24]!==E||e[25]!==V||e[26]!==m||e[27]!==u||e[28]!==i||e[29]!==f||e[30]!==k||e[31]!==x?(y=x==="cards"?o.jsx("div",{className:"flex-1 overflow-auto p-5",children:k.length===0?o.jsx(G,{image:null,title:u?"No resources found":"No resources available",description:u?"Try adjusting your search terms":E}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:k.map(c=>o.jsx(ie,{className:"cursor-pointer transition-colors",onClick:()=>V(c),children:o.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[o.jsx(Y,{icon:null,name:c.name||c.uri,size:"md",className:"shrink-0 shadow-sm"}),o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:c.name||c.uri}),o.jsx("p",{className:"text-xs font-mono text-muted-foreground truncate",children:c.uri}),c.description&&o.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mt-1",children:c.description})]})]})},c.uri))})}):o.jsx(ne,{columns:$,data:k,isLoading:!1,sortKey:f,sortDirection:i,onSort:m,onRowClick:c=>V(c),emptyState:o.jsx(G,{image:null,title:u?"No resources found":"No resources available",description:u?"Try adjusting your search terms":E})}),e[24]=E,e[25]=V,e[26]=m,e[27]=u,e[28]=i,e[29]=f,e[30]=k,e[31]=x,e[32]=y):y=e[32];let S;e[33]!==A||e[34]!==y?(S=o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[A,y]}),e[33]=A,e[34]=y,e[35]=S):S=e[35];let C;return e[36]!==S||e[37]!==L?(C=o.jsxs(o.Fragment,{children:[L,S]}),e[36]=S,e[37]=L,e[38]=C):C=e[38],C}function Ve(t){return{id:t.id,label:typeof t.header=="string"?t.header:t.id}}function Ae(t){return t.sortable}function Ee(t){return o.jsx("span",{className:"text-sm text-muted-foreground",children:t.mimeType||"—"})}function De(t){return o.jsx("span",{className:"text-sm text-foreground",children:t.description||"—"})}function Oe(t){return o.jsx("span",{className:"text-sm font-mono text-muted-foreground",children:t.uri})}function Be(t){return o.jsx("span",{className:"text-sm font-medium text-foreground",children:t.name||t.uri})}function Ue(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function Ke(t){const e=Q.c(6),{resources:n,connectionId:s,org:r}=t,d=J(s),l=d?.title,b=d?.icon;let T;return e[0]!==s||e[1]!==r||e[2]!==n||e[3]!==l||e[4]!==b?(T=o.jsx(Me,{resources:n,connectionId:s,org:r,connectionTitle:l,connectionIcon:b}),e[0]=s,e[1]=r,e[2]=n,e[3]=l,e[4]=b,e[5]=T):T=e[5],T}function ze(t){const e=Q.c(5),{tools:n,connectionId:s,org:r,isLoading:d}=t;let l;return e[0]!==s||e[1]!==d||e[2]!==r||e[3]!==n?(l=o.jsx(Te,{tools:n,connectionId:s,org:r,isLoading:d}),e[0]=s,e[1]=d,e[2]=r,e[3]=n,e[4]=l):l=e[4],l}function qe(t){const e=Q.c(66),{connection:n,connectionId:s,org:r,requestedTabId:d,collections:l,onUpdate:b,isUpdating:T,prompts:E,resources:I,tools:R,isLoadingTools:u}=t,z=me();let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x={from:"/$org/mcps/$connectionId"},e[0]=x):x=e[0];const j=H(x);let f;e[1]!==s?(f={connectionId:s},e[1]=s,e[2]=f):f=e[2];const g=ue(f),i=g.isAuthenticated,p=n?.metadata?.repository,w=!!p?.url,m=R.length,D=E.length,V=I.length,v=m>0||u;let k;e[3]===Symbol.for("react.memo_cache_sentinel")?(k={id:"settings",label:"Settings"},e[3]=k):k=e[3];let _;e[4]!==u||e[5]!==i||e[6]!==v||e[7]!==m?(_=i&&v?[{id:"tools",label:"Tools",count:u?void 0:m}]:[],e[4]=u,e[5]=i,e[6]=v,e[7]=m,e[8]=_):_=e[8];let $;e[9]!==i||e[10]!==D?($=i&&D>0?[{id:"prompts",label:"Prompts",count:D}]:[],e[9]=i,e[10]=D,e[11]=$):$=e[11];let N;e[12]!==i||e[13]!==V?(N=i&&V>0?[{id:"resources",label:"Resources",count:V}]:[],e[12]=i,e[13]=V,e[14]=N):N=e[14];let O;if(e[15]!==l||e[16]!==w||e[17]!==i||e[18]!==_||e[19]!==$||e[20]!==N){let U;e[22]!==w?(U=w?[{id:"readme",label:"README"}]:[],e[22]=w,e[23]=U):U=e[23],O=[k,..._,...$,...N,...i?(l||[]).map(Qe):[],...U],e[15]=l,e[16]=w,e[17]=i,e[18]=_,e[19]=$,e[20]=N,e[21]=O}else O=e[21];const L=O,a=L.some(U=>U.id===d)?d:"settings";let A;e[24]!==j?(A=U=>{j({search:W=>({...W,tab:U}),replace:!0})},e[24]=j,e[25]=A):A=e[25];const y=A;let S;e[26]!==l?(S=l||[],e[26]=l,e[27]=S):S=e[27];let C;if(e[28]!==a||e[29]!==S){let U;e[31]!==a?(U=W=>W.name===a,e[31]=a,e[32]=U):U=e[32],C=S.find(U),e[28]=a,e[29]=S,e[30]=C}else C=e[30];const c=C;let P;e[33]!==z.history?(P=()=>z.history.back(),e[33]=z.history,e[34]=P):P=e[34];let M;e[35]!==a||e[36]!==y||e[37]!==L?(M=o.jsx(Se,{children:o.jsx(ye,{tabs:L,activeTab:a,onTabChange:y})}),e[35]=a,e[36]=y,e[37]=L,e[38]=M):M=e[38];let h;e[39]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(ee,{size:32,className:"animate-spin text-muted-foreground"})}),e[39]=h):h=e[39];let K;e[40]!==c||e[41]!==a||e[42]!==g.hasOAuthToken||e[43]!==g.isServerError||e[44]!==g.supportsOAuth||e[45]!==n||e[46]!==s||e[47]!==y||e[48]!==w||e[49]!==u||e[50]!==i||e[51]!==T||e[52]!==b||e[53]!==r||e[54]!==E||e[55]!==p||e[56]!==I||e[57]!==R?(K=o.jsx(q.Suspense,{fallback:h,children:a==="tools"?o.jsx(ze,{tools:R,connectionId:s,org:r,isLoading:u}):a==="prompts"?o.jsx(Le,{prompts:E,connectionId:s,org:r}):a==="resources"?o.jsx(Ke,{resources:I,connectionId:s,org:r}):a==="settings"?o.jsx(pe,{connection:n,onUpdate:b,isUpdating:T,isMCPAuthenticated:i,supportsOAuth:g.supportsOAuth,hasOAuthToken:g.hasOAuthToken,isServerError:g.isServerError,onViewReadme:w?()=>y("readme"):void 0}):a==="readme"&&w?o.jsx(Pe,{repository:p}):c&&i?o.jsx(ve,{connectionId:s,org:r,activeCollection:c},a):o.jsx(G,{title:"Collection not found",description:"This collection may have been deleted or you may not have access."})}),e[40]=c,e[41]=a,e[42]=g.hasOAuthToken,e[43]=g.isServerError,e[44]=g.supportsOAuth,e[45]=n,e[46]=s,e[47]=y,e[48]=w,e[49]=u,e[50]=i,e[51]=T,e[52]=b,e[53]=r,e[54]=E,e[55]=p,e[56]=I,e[57]=R,e[58]=K):K=e[58];let B;e[59]!==a||e[60]!==K?(B=o.jsx("div",{className:"flex h-full w-full bg-background overflow-hidden",children:o.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-auto",children:o.jsx(Z,{children:K},a)})}),e[59]=a,e[60]=K,e[61]=B):B=e[61];let F;return e[62]!==P||e[63]!==M||e[64]!==B?(F=o.jsxs(Ce,{onBack:P,children:[M,B]}),e[62]=P,e[63]=M,e[64]=B,e[65]=F):F=e[65],F}function Qe(t){return{id:t.name,label:t.displayName}}function Fe(){const t=Q.c(43);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/mcps/$connectionId"},t[0]=e):e=t[0];const n=H(e);let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/mcps/$connectionId"},t[1]=s):s=t[1];const{connectionId:r,org:d}=ce(s),{org:l}=ae();let b;t[2]===Symbol.for("react.memo_cache_sentinel")?(b={from:"/shell/$org/mcps/$connectionId"},t[2]=b):b=t[2];const E=le(b).tab||"settings",I=J(r),R=he(),u=de(I??void 0);let z;t[3]!==r||t[4]!==l.id?(z={connectionId:r,orgId:l.id},t[3]=r,t[4]=l.id,t[5]=z):z=t[5];const x=xe(z);let j;t[6]!==x?(j={client:x},t[6]=x,t[7]=j):j=t[7];const{data:f}=ge(j);let g;t[8]!==x?(g={client:x},t[8]=x,t[9]=g):g=t[9];const{data:i}=be(g),p=I?.tools&&I.tools.length>0,w=!p;let m;t[10]!==x||t[11]!==w?(m={client:x,enabled:w},t[10]=x,t[11]=w,t[12]=m):m=t[12];const{data:D,isLoading:V}=fe(m);let v;t[13]!==f?.prompts?(v=f?.prompts??[],t[13]=f?.prompts,t[14]=v):v=t[14];let k;t[15]!==v?(k=v.map(He),t[15]=v,t[16]=k):k=t[16];const _=k;let $;t[17]!==i?.resources?($=i?.resources??[],t[17]=i?.resources,t[18]=$):$=t[18];let N;t[19]!==$?(N=$.map(Ge),t[19]=$,t[20]=N):N=t[20];const O=N;let L;t[21]!==I||t[22]!==p||t[23]!==D?.tools?(L=p?I.tools??[]:(D?.tools??[]).map(We),t[21]=I,t[22]=p,t[23]=D?.tools,t[24]=L):L=t[24];const a=L;let A;t[25]!==R.update||t[26]!==r?(A=async C=>{await R.update.mutateAsync({id:r,data:C})},t[25]=R.update,t[26]=r,t[27]=A):A=t[27];const y=A;if(!I){let C;return t[28]!==n||t[29]!==d?(C=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(G,{title:"Connection not found",description:"This connection may have been deleted or you may not have access.",actions:o.jsx(je,{variant:"outline",onClick:()=>n({to:"/$org/mcps",params:{org:d}}),children:"Back to connections"})})}),t[28]=n,t[29]=d,t[30]=C):C=t[30],C}let S;return t[31]!==R.update.isPending||t[32]!==u||t[33]!==I||t[34]!==r||t[35]!==y||t[36]!==V||t[37]!==d||t[38]!==_||t[39]!==E||t[40]!==O||t[41]!==a?(S=o.jsx(qe,{org:d,connection:I,connectionId:r,requestedTabId:E,collections:u,onUpdate:y,isUpdating:R.update.isPending,prompts:_,resources:O,tools:a,isLoadingTools:V}),t[31]=R.update.isPending,t[32]=u,t[33]=I,t[34]=r,t[35]=y,t[36]=V,t[37]=d,t[38]=_,t[39]=E,t[40]=O,t[41]=a,t[42]=S):S=t[42],S}function We(t){return{name:t.name,description:t.description,inputSchema:t.inputSchema}}function Ge(t){return{uri:t.uri,name:t.name,description:t.description}}function He(t){return{name:t.name,description:t.description}}function Je(){const t=Q.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(Z,{children:o.jsx(q.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:o.jsx(ee,{size:32,className:"animate-spin text-muted-foreground"})}),children:o.jsx(Fe,{})})}),t[0]=e):e=t[0],e}function jo(){const t=Q.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(Je,{}),t[0]=e):e=t[0],e}export{jo as default};
@@ -1 +0,0 @@
1
- import{x as t,B as a}from"./index-kxFCfKdx.js";const e=t(a,{target:"draft-7"});export{e as B};