@mcp-use/inspector 20.0.0-beta.14 → 20.0.0-beta.15

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 (139) hide show
  1. package/dist/cdn/inspector.js +76858 -9272
  2. package/dist/cli.js +1 -1
  3. package/dist/server/cdn-shell.js +2 -2
  4. package/dist/server/{chunk-3XD7J5NX.js → chunk-WNQGHIZ3.js} +1 -1
  5. package/dist/server/{chunk-DLHO3Q42.js → chunk-XKCUJ6ZJ.js} +1 -1
  6. package/dist/server/{chunk-N3VXWLT6.js → chunk-ZPGABKXL.js} +1 -1
  7. package/dist/server/cli.js +2 -2
  8. package/dist/server/index.js +3 -3
  9. package/dist/server/middleware.js +3 -3
  10. package/dist/server/version.js +1 -1
  11. package/dist/web/assets/index-Bqfsh_Rp.js +643 -0
  12. package/dist/web/index.html +2 -10
  13. package/package.json +1 -1
  14. package/dist/cdn/AnimatePresence-D1bZ5_-l.js +0 -394
  15. package/dist/cdn/ChatTab-D_2TXR3X.js +0 -6811
  16. package/dist/cdn/CheckboxIndicator-BjF73mGX.js +0 -252
  17. package/dist/cdn/ConnectionSettingsForm-BqH0PcZF.js +0 -929
  18. package/dist/cdn/ConnectionSettingsTab-Duhb1uQP.js +0 -151
  19. package/dist/cdn/ElicitationTab-PEmEDvC5.js +0 -655
  20. package/dist/cdn/FormContext-NtUiZclE.js +0 -135
  21. package/dist/cdn/InspectorContext-BBKCdfmK.js +0 -123
  22. package/dist/cdn/JSONDisplay-BJqMz7Ny.js +0 -324
  23. package/dist/cdn/ListTabHeader-DzmTtN1e.js +0 -89
  24. package/dist/cdn/MCPAppsDebugControls-w5NRWhlZ.js +0 -2174
  25. package/dist/cdn/ManufactOAuthCallback-ChbbjFIT.js +0 -31
  26. package/dist/cdn/MarkdownRenderer-BIsUE0bf.js +0 -3610
  27. package/dist/cdn/McpAppsViewPanel-B3_76u7O.js +0 -56
  28. package/dist/cdn/NotificationsTab-B7uebqMV.js +0 -290
  29. package/dist/cdn/OAuthCallback-CtLoXa3h.js +0 -58
  30. package/dist/cdn/PromptsTab-DpE0XLzk.js +0 -902
  31. package/dist/cdn/ResourcesTab-DQS24z5p.js +0 -566
  32. package/dist/cdn/SamplingTab-ZDeu0CjJ.js +0 -659
  33. package/dist/cdn/ServerMetadataTab-BM3VhSLf.js +0 -244
  34. package/dist/cdn/StatusIcon-Q3n3YRtE.js +0 -65
  35. package/dist/cdn/ToolsTab-LtviZSWA.js +0 -2045
  36. package/dist/cdn/ViewPreview-BwC_tbF_.js +0 -238
  37. package/dist/cdn/WidgetDebugContext-B6yoOVVV.js +0 -314
  38. package/dist/cdn/WidgetWrapper-BlbQAh_X.js +0 -12
  39. package/dist/cdn/basePath-B8HuhIMu.js +0 -25
  40. package/dist/cdn/bell-GrTZcnD2.js +0 -10
  41. package/dist/cdn/browser-DG2Z8392.js +0 -42
  42. package/dist/cdn/brush-CelVvMGp.js +0 -17
  43. package/dist/cdn/button-CB4uOoUV.js +0 -2509
  44. package/dist/cdn/card-BA-DQk-G.js +0 -41
  45. package/dist/cdn/cfWorker-Bxcs9rNe.js +0 -10799
  46. package/dist/cdn/checkbox-kwVa4gRX.js +0 -20
  47. package/dist/cdn/chunk-QUQL4437-XnDcYQEx.js +0 -1508
  48. package/dist/cdn/clock-YMF8Gtw5.js +0 -12
  49. package/dist/cdn/code-C8sN2OGR.js +0 -10
  50. package/dist/cdn/createLucideIcon-BONxC1L5.js +0 -213
  51. package/dist/cdn/dialog-CJGnC5Ag.js +0 -1028
  52. package/dist/cdn/dist-CHKts0NS.js +0 -2307
  53. package/dist/cdn/dist-CTJnCYmk.js +0 -616
  54. package/dist/cdn/external-link-Bo4lQxr1.js +0 -17
  55. package/dist/cdn/eye-pSGG7nvf.js +0 -29
  56. package/dist/cdn/folder-open-aM8CPtBO.js +0 -7
  57. package/dist/cdn/hash-DDs2vE1k.js +0 -33
  58. package/dist/cdn/history-BfUFpL1d.js +0 -17
  59. package/dist/cdn/index-browser-DO-sd0TA.js +0 -1853
  60. package/dist/cdn/info-BMkB68mB.js +0 -19
  61. package/dist/cdn/input-BCpgLXU1.js +0 -9654
  62. package/dist/cdn/inspector-settings-layout-0VDsjeqb.js +0 -4
  63. package/dist/cdn/label-A0UGV8FE.js +0 -60
  64. package/dist/cdn/loader-circle-BKRHJEB7.js +0 -7
  65. package/dist/cdn/manufact-auth-BQMHhbLV.js +0 -423
  66. package/dist/cdn/maximize-2-DdrB_spi.js +0 -21
  67. package/dist/cdn/maximize-hSOCz133.js +0 -21
  68. package/dist/cdn/message-square-D3tKB3uJ.js +0 -7
  69. package/dist/cdn/not-found-BajFyZpp.js +0 -32
  70. package/dist/cdn/play-B1leulYf.js +0 -7
  71. package/dist/cdn/providerMeta-CjGU4rID.js +0 -436
  72. package/dist/cdn/react-BDA-xrgK.js +0 -5421
  73. package/dist/cdn/react-BIs9pQ3H.js +0 -926
  74. package/dist/cdn/refresh-cw-CyvXrS91.js +0 -21
  75. package/dist/cdn/save-CmdEPUAm.js +0 -34
  76. package/dist/cdn/schemaHelpers-DTV38jGq.js +0 -16
  77. package/dist/cdn/select-CCFHjOGk.js +0 -2595
  78. package/dist/cdn/servers-Dd0Vcp81.js +0 -30
  79. package/dist/cdn/shared-CJVHJhag.js +0 -1700
  80. package/dist/cdn/sheet-oyq1mIyg.js +0 -2078
  81. package/dist/cdn/sparkles-CxeZpVtX.js +0 -23
  82. package/dist/cdn/spinner-Be1GlSGX.js +0 -15
  83. package/dist/cdn/square-check-big-C_4wbfwF.js +0 -10
  84. package/dist/cdn/switch-DHXEA_N5.js +0 -665
  85. package/dist/cdn/tabs-subtle-Dubd6Kj8.js +0 -788
  86. package/dist/cdn/telemetry-e4uEESP7.js +0 -208
  87. package/dist/cdn/textarea-CwmI8_uI.js +0 -14
  88. package/dist/cdn/trash-2-BhumJAFE.js +0 -25
  89. package/dist/cdn/useAriaLabelledBy-Cra6w3YY.js +0 -30
  90. package/dist/cdn/useCompositeItem-Dhnm-7el.js +0 -26
  91. package/dist/cdn/useConfig-Dw_6Ztzr.js +0 -235
  92. package/dist/cdn/useSavedRequests-mSIsDd4c.js +0 -51
  93. package/dist/cdn/useViewHostProps-BPApUBaM.js +0 -364
  94. package/dist/cdn/wrench-DvK20LUT.js +0 -7
  95. package/dist/cdn/x-EilKPiCX.js +0 -10
  96. package/dist/cdn/zap-0Wr9QO7N.js +0 -10
  97. package/dist/web/assets/AnimatePresence-FfDQQNFJ.js +0 -9
  98. package/dist/web/assets/ChatTab-BhoU_ges.js +0 -18
  99. package/dist/web/assets/ConnectionSettingsTab-vJcr7uI3.js +0 -1
  100. package/dist/web/assets/ElicitationTab-4my-wtXf.js +0 -1
  101. package/dist/web/assets/FormContext-sV-yByKz.js +0 -1
  102. package/dist/web/assets/ListTabHeader-CrGae306.js +0 -1
  103. package/dist/web/assets/MCPAppsDebugControls-Cd4s9mr1.js +0 -34
  104. package/dist/web/assets/ManufactOAuthCallback-CCRWJhuT.js +0 -1
  105. package/dist/web/assets/MarkdownRenderer-BUDZYHqm.js +0 -47
  106. package/dist/web/assets/McpAppsViewPanel-Cil7Fdy4.js +0 -1
  107. package/dist/web/assets/NotificationsTab-Bl3O5PRb.js +0 -1
  108. package/dist/web/assets/OAuthCallback-CceVgo-9.js +0 -1
  109. package/dist/web/assets/PromptsTab-8lSxb8x-.js +0 -15
  110. package/dist/web/assets/ResourcesTab-DtGfgsPv.js +0 -2
  111. package/dist/web/assets/SamplingTab-XC-DTfOo.js +0 -1
  112. package/dist/web/assets/ServerMetadataTab-C5d_dI3_.js +0 -1
  113. package/dist/web/assets/ToolsTab-DuHPXItY.js +0 -8
  114. package/dist/web/assets/ViewPreview-DXswO9q8.js +0 -1
  115. package/dist/web/assets/WidgetWrapper-cv_BM1bY.js +0 -1
  116. package/dist/web/assets/brush-DX0UZ_pI.js +0 -1
  117. package/dist/web/assets/button-C8Xa2k4x.js +0 -1
  118. package/dist/web/assets/checkbox-DAfdiGl1.js +0 -1
  119. package/dist/web/assets/code-B14rVdNt.js +0 -1
  120. package/dist/web/assets/createLucideIcon-BEHeJH0M.js +0 -1
  121. package/dist/web/assets/dist-C2Y1wkk6.js +0 -21
  122. package/dist/web/assets/index-tu5-QdSJ.js +0 -499
  123. package/dist/web/assets/input-C0OQCUZy.js +0 -1
  124. package/dist/web/assets/inspector-settings-layout-yjKRJDai.js +0 -1
  125. package/dist/web/assets/label-CI7JWQOo.js +0 -1
  126. package/dist/web/assets/maximize-2-Br1WQzT2.js +0 -1
  127. package/dist/web/assets/maximize-CJNgRe6S.js +0 -1
  128. package/dist/web/assets/react-CU_d2d5K.js +0 -1
  129. package/dist/web/assets/refresh-cw-B5iaAZKn.js +0 -1
  130. package/dist/web/assets/save-TM6fvNrt.js +0 -1
  131. package/dist/web/assets/schemaHelpers-DLNTQr_6.js +0 -1
  132. package/dist/web/assets/select-D6jzbLJn.js +0 -1
  133. package/dist/web/assets/shared-c1Yr-wvV.js +0 -1
  134. package/dist/web/assets/sparkles-BGYTDThM.js +0 -1
  135. package/dist/web/assets/tabs-subtle-CHvFXVIA.js +0 -1
  136. package/dist/web/assets/textarea-CRTXuRmE.js +0 -1
  137. package/dist/web/assets/useConfig-9UVqLmR_.js +0 -1
  138. package/dist/web/assets/useViewHostProps-BBoPQYEl.js +0 -1
  139. package/dist/web/assets/zap-BDWHCVHU.js +0 -1
@@ -1,929 +0,0 @@
1
- import { s as e, t } from "./react-BIs9pQ3H.js";
2
- import { t as n } from "./input-BCpgLXU1.js";
3
- import { n as r, t as i } from "./createLucideIcon-BONxC1L5.js";
4
- import { U as a, t as o } from "./button-CB4uOoUV.js";
5
- import { t as s } from "./label-A0UGV8FE.js";
6
- import { a as c, i as l, n as u, r as d, t as f } from "./select-CCFHjOGk.js";
7
- import { c as p, l as m, n as h, o as g, r as _, t as v, w as y, x as b } from "./dialog-CJGnC5Ag.js";
8
- import { i as ee, t as te } from "./browser-DG2Z8392.js";
9
- import { n as x, t as S } from "./eye-pSGG7nvf.js";
10
- import { t as C } from "./trash-2-BhumJAFE.js";
11
- import { t as w } from "./react-BDA-xrgK.js";
12
- import { r as T } from "./basePath-B8HuhIMu.js";
13
- import { a as ne, i as re } from "./servers-Dd0Vcp81.js";
14
- import { n as E } from "./dist-CTJnCYmk.js";
15
- import { a as D, i as O, n as k, r as A, t as j } from "./card-BA-DQk-G.js";
16
- var ie = i("cog", [
17
- ["path", {
18
- d: "M11 10.27 7 3.34",
19
- key: "16pf9h"
20
- }],
21
- ["path", {
22
- d: "m11 13.73-4 6.93",
23
- key: "794ttg"
24
- }],
25
- ["path", {
26
- d: "M12 22v-2",
27
- key: "1osdcq"
28
- }],
29
- ["path", {
30
- d: "M12 2v2",
31
- key: "tus03m"
32
- }],
33
- ["path", {
34
- d: "M14 12h8",
35
- key: "4f43i9"
36
- }],
37
- ["path", {
38
- d: "m17 20.66-1-1.73",
39
- key: "eq3orb"
40
- }],
41
- ["path", {
42
- d: "m17 3.34-1 1.73",
43
- key: "2wel8s"
44
- }],
45
- ["path", {
46
- d: "M2 12h2",
47
- key: "1t8f8n"
48
- }],
49
- ["path", {
50
- d: "m20.66 17-1.73-1",
51
- key: "sg0v6f"
52
- }],
53
- ["path", {
54
- d: "m20.66 7-1.73 1",
55
- key: "1ow05n"
56
- }],
57
- ["path", {
58
- d: "m3.34 17 1.73-1",
59
- key: "nuk764"
60
- }],
61
- ["path", {
62
- d: "m3.34 7 1.73 1",
63
- key: "1ulond"
64
- }],
65
- ["circle", {
66
- cx: "12",
67
- cy: "12",
68
- r: "2",
69
- key: "1c9p78"
70
- }],
71
- ["circle", {
72
- cx: "12",
73
- cy: "12",
74
- r: "8",
75
- key: "46899m"
76
- }]
77
- ]), ae = i("file-text", [
78
- ["path", {
79
- d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
80
- key: "1oefj6"
81
- }],
82
- ["path", {
83
- d: "M14 2v5a1 1 0 0 0 1 1h5",
84
- key: "wfsgrz"
85
- }],
86
- ["path", {
87
- d: "M10 9H8",
88
- key: "b1mrlr"
89
- }],
90
- ["path", {
91
- d: "M16 13H8",
92
- key: "t4e002"
93
- }],
94
- ["path", {
95
- d: "M16 17H8",
96
- key: "z1uh3a"
97
- }]
98
- ]), M = /* @__PURE__ */ e(t(), 1), N = r(), P = "2026-07-28";
99
- function oe(e) {
100
- switch (e) {
101
- case "v1": return "legacy";
102
- case "v2": return { pin: P };
103
- default: return "auto";
104
- }
105
- }
106
- function F(e) {
107
- return e === "legacy" ? "v1" : typeof e == "object" && e?.pin ? "v2" : "auto";
108
- }
109
- function I() {
110
- if (typeof window > "u") return "";
111
- let e = window.__MCP_PROXY_URL__;
112
- return e === null ? "" : `${window.location.origin}${e || T("proxy")}`;
113
- }
114
- function L(e, t, n = !1) {
115
- return e === "auto" || e === "direct" || e === "proxy" ? e : t === "Via Proxy" ? "proxy" : t === "Direct" ? "auto" : n ? "proxy" : "auto";
116
- }
117
- function R(e) {
118
- return !e || typeof e == "boolean" ? "" : e.proxyAddress?.trim() || "";
119
- }
120
- var z = [
121
- "requestTimeout",
122
- "resetTimeoutOnProgress",
123
- "maxTotalTimeout"
124
- ];
125
- function B(e) {
126
- if (!e) return {};
127
- let t = {};
128
- for (let n of z) {
129
- let r = e[n];
130
- r !== void 0 && (t[n] = r);
131
- }
132
- return t;
133
- }
134
- function V(e, t) {
135
- try {
136
- let n = localStorage.getItem("mcp-inspector-connections"), r = n ? JSON.parse(n) : {};
137
- r[e] = {
138
- ...r[e],
139
- ...t
140
- }, localStorage.setItem("mcp-inspector-connections", JSON.stringify(r));
141
- } catch {}
142
- }
143
- function H(e, t, n) {
144
- let r = e.trim(), i = t.trim(), a = n.trim();
145
- if (!(!r && !a)) return {
146
- ...r ? { clientId: r } : {},
147
- ...r && i ? { clientSecret: i } : {},
148
- ...a ? { scope: a } : {}
149
- };
150
- }
151
- function U(e) {
152
- let t = e.headers || e.proxyConfig?.headers || e.proxyConfig?.customHeaders;
153
- return t && Object.keys(t).length > 0 ? t : void 0;
154
- }
155
- function W(e) {
156
- let t = e.proxyConfig, n = e.headers || e.customHeaders, r = t?.headers || t?.customHeaders || void 0, i = n || r, a = t ? {
157
- ...t,
158
- ...r ? { headers: r } : {},
159
- customHeaders: void 0
160
- } : void 0, { customHeaders: o, connectionType: s, transportType: c, ...l } = e;
161
- return {
162
- ...l,
163
- ...i && !a?.proxyAddress ? { headers: i } : {},
164
- ...a ? { proxyConfig: a } : {},
165
- connectionMode: L(e.connectionMode, e.connectionType, !!a?.proxyAddress)
166
- };
167
- }
168
- function G(e) {
169
- let t = J(e), n = e.proxyConfig?.proxyAddress?.trim() || R(e.autoProxyFallback), r = L(e.connectionMode, e.connectionType, !!n), i = {
170
- url: e.url,
171
- displayName: e.name?.trim() || e.url,
172
- connectionMode: r,
173
- protocolNegotiation: e.protocolNegotiation ?? "auto",
174
- ...e.oauth ? { oauth: e.oauth } : {}
175
- };
176
- return r === "proxy" && n ? i.proxyConfig = {
177
- proxyAddress: n,
178
- ...Object.keys(t).length > 0 ? { headers: t } : {}
179
- } : Object.keys(t).length > 0 && (i.headers = t), r === "auto" && (i.autoProxyFallback = e.autoProxyFallback ?? (n ? {
180
- enabled: !0,
181
- proxyAddress: n
182
- } : !1)), i;
183
- }
184
- function K(e, t) {
185
- let n = t ? W(t) : e, r = U(e) || {}, i = n.proxyConfig?.proxyAddress?.trim() || R(n.autoProxyFallback);
186
- return {
187
- url: e.url || "",
188
- name: e.displayName || e.url || "",
189
- transportType: "http",
190
- connectionMode: L(n.connectionMode, void 0, !!i),
191
- connectionType: n.connectionMode === "proxy" ? "Via Proxy" : "Direct",
192
- proxyConfig: n.connectionMode === "proxy" && i ? {
193
- proxyAddress: i,
194
- ...Object.keys(r).length > 0 ? { headers: r } : {}
195
- } : void 0,
196
- headers: r,
197
- oauth: n.oauth,
198
- autoProxyFallback: n.autoProxyFallback,
199
- protocolNegotiation: n.protocolNegotiation ?? "auto",
200
- ...B(t)
201
- };
202
- }
203
- function q(e) {
204
- try {
205
- let t = localStorage.getItem("mcp-inspector-connections");
206
- return t && JSON.parse(t)[e] || null;
207
- } catch {
208
- return null;
209
- }
210
- }
211
- function J(e) {
212
- let t = e.proxyConfig?.headers || e.proxyConfig?.customHeaders || e.headers || e.customHeaders || {};
213
- return Object.fromEntries(Object.entries(t).filter(([e, t]) => e && t).map(([e, t]) => [e, String(t)]).sort(([e], [t]) => e.localeCompare(t)));
214
- }
215
- function Y(e) {
216
- let t = e.url?.trim() || "", n = e.proxyConfig?.proxyAddress?.trim() || R(e.autoProxyFallback);
217
- return {
218
- url: t,
219
- name: e.name?.trim() || t,
220
- transportType: e.transportType || "http",
221
- proxyAddress: n,
222
- connectionMode: L(e.connectionMode, e.connectionType, !!n),
223
- headers: J(e),
224
- oauthClientId: e.oauth?.clientId?.trim() || "",
225
- oauthClientSecret: e.oauth?.clientSecret?.trim() || "",
226
- oauthScope: e.oauth?.scope?.trim() || "",
227
- requestTimeout: "requestTimeout" in e ? e.requestTimeout : void 0,
228
- resetTimeoutOnProgress: "resetTimeoutOnProgress" in e ? e.resetTimeoutOnProgress : void 0,
229
- maxTotalTimeout: "maxTotalTimeout" in e ? e.maxTotalTimeout : void 0,
230
- protocolMode: F(e.protocolNegotiation)
231
- };
232
- }
233
- function X(e, t) {
234
- let n = Y(e), r = Y(t);
235
- return n.url === r.url && n.transportType === r.transportType && n.proxyAddress === r.proxyAddress && n.connectionMode === r.connectionMode && JSON.stringify(n.headers) === JSON.stringify(r.headers) && n.oauthClientId === r.oauthClientId && n.oauthClientSecret === r.oauthClientSecret && n.oauthScope === r.oauthScope && n.requestTimeout === r.requestTimeout && n.resetTimeoutOnProgress === r.resetTimeoutOnProgress && n.maxTotalTimeout === r.maxTotalTimeout && n.protocolMode === r.protocolMode && n.name !== r.name;
236
- }
237
- var se = class extends w {
238
- setServers(e) {
239
- let t = this.readRawStoredServers(), n = Object.fromEntries(Object.entries(e).map(([e, n]) => [e, {
240
- ...B(t[e]),
241
- ...n,
242
- ...re(e) && typeof n.url == "string" && ne(n.url) ? { url: e } : {}
243
- }]));
244
- super.setServers(n);
245
- }
246
- setServer(e, t) {
247
- let n = this.getServers();
248
- n[e] = {
249
- ...B(this.readRawStoredServers()[e]),
250
- ...t
251
- }, this.setServers(n);
252
- }
253
- readRawStoredServers() {
254
- try {
255
- let e = localStorage.getItem("mcp-inspector-connections");
256
- return e ? JSON.parse(e) : {};
257
- } catch {
258
- return {};
259
- }
260
- }
261
- };
262
- //#endregion
263
- //#region src/client/components/CustomHeadersEditor.tsx
264
- function ce({ headers: e, onChange: t, onSave: r, className: i, title: c = "Custom Headers", description: l = "Headers with both name and value will be sent", maxHeaders: u = 50 }) {
265
- let [d, f] = (0, M.useState)({}), [p, m] = (0, M.useState)(null), h = (0, M.useRef)({});
266
- (0, M.useEffect)(() => {
267
- p && h.current[p] && (h.current[p]?.focus(), m(null));
268
- }, [p, e]);
269
- let g = () => Math.random().toString(36).slice(2, 11), _ = () => {
270
- if (e.length >= u) return;
271
- let n = {
272
- id: g(),
273
- name: "",
274
- value: ""
275
- };
276
- t([...e, n]);
277
- }, v = (n) => {
278
- t(e.filter((e) => e.id !== n));
279
- }, b = (n, r, i) => {
280
- t(e.map((e) => e.id === n ? {
281
- ...e,
282
- [r]: i
283
- } : e));
284
- }, ee = (e) => {
285
- f((t) => ({
286
- ...t,
287
- [e]: !t[e]
288
- }));
289
- };
290
- return /* @__PURE__ */ (0, N.jsxs)("div", {
291
- className: a("space-y-3", i),
292
- children: [
293
- /* @__PURE__ */ (0, N.jsxs)("div", {
294
- className: "space-y-2",
295
- children: [/* @__PURE__ */ (0, N.jsx)(s, {
296
- className: "text-base font-medium",
297
- children: c
298
- }), /* @__PURE__ */ (0, N.jsx)("p", {
299
- className: "text-sm text-muted-foreground",
300
- children: l
301
- })]
302
- }),
303
- /* @__PURE__ */ (0, N.jsxs)("div", {
304
- className: "space-y-2",
305
- children: [
306
- /* @__PURE__ */ (0, N.jsxs)("div", {
307
- className: "grid grid-cols-[1fr_1fr] gap-4 text-sm font-medium text-muted-foreground",
308
- children: [/* @__PURE__ */ (0, N.jsx)("div", { children: "Name" }), /* @__PURE__ */ (0, N.jsx)("div", { children: "Value" })]
309
- }),
310
- e.length === 0 ? /* @__PURE__ */ (0, N.jsxs)("div", {
311
- className: "grid grid-cols-[1fr_1fr] gap-4 items-center",
312
- children: [/* @__PURE__ */ (0, N.jsx)(n, {
313
- placeholder: "Authorization",
314
- value: "",
315
- onChange: (e) => {
316
- if (e.target.value.trim()) {
317
- let n = g();
318
- t([{
319
- id: n,
320
- name: e.target.value,
321
- value: ""
322
- }]), m(n);
323
- }
324
- },
325
- className: "text-sm",
326
- autoComplete: "off"
327
- }), /* @__PURE__ */ (0, N.jsxs)("div", {
328
- className: "flex items-center gap-2",
329
- children: [
330
- /* @__PURE__ */ (0, N.jsx)(n, {
331
- placeholder: "Bearer token...",
332
- value: "",
333
- onChange: () => {},
334
- type: "password",
335
- className: "font-mono text-sm",
336
- autoComplete: "off",
337
- disabled: !0
338
- }),
339
- /* @__PURE__ */ (0, N.jsx)(o, {
340
- type: "button",
341
- variant: "ghost",
342
- size: "icon-sm",
343
- className: "h-8 w-8 p-0",
344
- disabled: !0,
345
- children: /* @__PURE__ */ (0, N.jsx)(S, { className: "h-4 w-4" })
346
- }),
347
- /* @__PURE__ */ (0, N.jsx)(o, {
348
- type: "button",
349
- variant: "ghost",
350
- size: "icon-sm",
351
- className: "h-8 w-8 p-0",
352
- disabled: !0,
353
- children: /* @__PURE__ */ (0, N.jsx)(C, { className: "h-4 w-4" })
354
- })
355
- ]
356
- })]
357
- }) : e.map((e) => /* @__PURE__ */ (0, N.jsxs)("div", {
358
- className: "grid grid-cols-[1fr_1fr] gap-4 items-center",
359
- children: [/* @__PURE__ */ (0, N.jsx)(n, {
360
- ref: (t) => {
361
- h.current[e.id] = t;
362
- },
363
- placeholder: "Authorization",
364
- value: e.name,
365
- onChange: (t) => b(e.id, "name", t.target.value),
366
- className: "text-sm",
367
- autoComplete: "off"
368
- }), /* @__PURE__ */ (0, N.jsxs)("div", {
369
- className: "flex items-center gap-2",
370
- children: [
371
- /* @__PURE__ */ (0, N.jsx)(n, {
372
- placeholder: "",
373
- value: e.value,
374
- onChange: (t) => b(e.id, "value", t.target.value),
375
- type: d[e.id] ? "text" : "password",
376
- className: "font-mono text-sm",
377
- autoComplete: "off"
378
- }),
379
- /* @__PURE__ */ (0, N.jsx)(o, {
380
- type: "button",
381
- variant: "ghost",
382
- size: "icon-sm",
383
- onClick: () => ee(e.id),
384
- className: "h-8 w-8 p-0",
385
- children: d[e.id] ? /* @__PURE__ */ (0, N.jsx)(x, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, N.jsx)(S, { className: "h-4 w-4" })
386
- }),
387
- /* @__PURE__ */ (0, N.jsx)(o, {
388
- type: "button",
389
- variant: "ghost",
390
- size: "icon-sm",
391
- onClick: () => v(e.id),
392
- className: "h-8 w-8 p-0",
393
- children: /* @__PURE__ */ (0, N.jsx)(C, { className: "h-4 w-4" })
394
- })
395
- ]
396
- })]
397
- }, e.id)),
398
- /* @__PURE__ */ (0, N.jsx)("div", {
399
- className: "flex justify-start mt-4",
400
- children: /* @__PURE__ */ (0, N.jsxs)(o, {
401
- type: "button",
402
- variant: "outline",
403
- size: "sm",
404
- onClick: _,
405
- disabled: e.length >= u,
406
- className: "flex items-center gap-2",
407
- children: [/* @__PURE__ */ (0, N.jsx)(y, { className: "h-4 w-4" }), "Add"]
408
- })
409
- })
410
- ]
411
- }),
412
- r && /* @__PURE__ */ (0, N.jsx)("div", {
413
- className: "flex justify-end",
414
- children: /* @__PURE__ */ (0, N.jsx)(o, {
415
- type: "button",
416
- onClick: r,
417
- className: "bg-black text-white hover:bg-gray-800",
418
- children: "Save"
419
- })
420
- })
421
- ]
422
- });
423
- }
424
- //#endregion
425
- //#region src/client/components/ConnectionSettingsForm.tsx
426
- function le({ alias: e, setAlias: t, url: r, setUrl: i, connectionMode: y, setConnectionMode: x, protocolMode: S, setProtocolMode: C, customHeaders: w, setCustomHeaders: T, requestTimeout: ne, setRequestTimeout: re, resetTimeoutOnProgress: P, setResetTimeoutOnProgress: I, maxTotalTimeout: R, setMaxTotalTimeout: z, proxyAddress: B, setProxyAddress: V, clientId: H, setClientId: U, clientSecret: W, setClientSecret: G, scope: K, setScope: q, onConnect: J, onSave: Y, onCancel: X, variant: se = "default", showConnectButton: le = !1, showSaveButton: ue = !1, showExportButton: de = !1, isConnecting: fe = !1, inlineSections: Z = !1, cardSections: Q = !1 }) {
427
- let [pe, me] = (0, M.useState)(!1), [he, ge] = (0, M.useState)(!1), [_e, ve] = (0, M.useState)(!1), ye = (0, M.useRef)(!1), be = async () => {
428
- if (!r.trim()) {
429
- E.error("Please enter a URL first");
430
- return;
431
- }
432
- let t = {
433
- url: r,
434
- ...e.trim() ? { name: e.trim() } : {},
435
- transportType: "http",
436
- connectionMode: y,
437
- protocolNegotiation: oe(S),
438
- connectionType: y === "proxy" ? "Via Proxy" : "Direct",
439
- proxyConfig: y === "proxy" && B.trim() ? {
440
- proxyAddress: B.trim(),
441
- customHeaders: w.reduce((e, t) => (t.name && t.value && (e[t.name] = t.value), e), {})
442
- } : void 0,
443
- autoProxyFallback: y === "auto" && B.trim() ? {
444
- enabled: !0,
445
- proxyAddress: B.trim()
446
- } : void 0,
447
- customHeaders: w.reduce((e, t) => (t.name && t.value && (e[t.name] = t.value), e), {}),
448
- requestTimeout: Number.parseInt(ne, 10),
449
- resetTimeoutOnProgress: P === "True",
450
- maxTotalTimeout: Number.parseInt(R, 10),
451
- oauth: H || K ? {
452
- clientId: H,
453
- ...H && W ? { clientSecret: W } : {},
454
- scope: K
455
- } : void 0
456
- };
457
- try {
458
- await te(JSON.stringify(t, null, 2)), E.success("Configuration copied to clipboard");
459
- } catch {
460
- E.error("Failed to copy configuration to clipboard");
461
- }
462
- }, $ = se === "styled", xe = $ ? "bg-white/10 border-white/20 text-white placeholder:text-white/50" : "", Se = $ ? "text-white/90" : "", Ce = $ ? "bg-white/10 border-white/20 text-white hover:bg-white/20" : "", we = async (e) => {
463
- let n = e.clipboardData.getData("text");
464
- try {
465
- let r = JSON.parse(n);
466
- if (r.url && typeof r.url == "string") {
467
- e.preventDefault(), i(r.url), t(typeof r.name == "string" && r.name !== r.url ? r.name : "");
468
- let n = r.proxyConfig?.proxyAddress || (typeof r.autoProxyFallback == "object" ? r.autoProxyFallback.proxyAddress : void 0);
469
- x(L(r.connectionMode, r.connectionType, !!n)), C(F(r.protocolNegotiation)), n && V(n);
470
- let a = r.proxyConfig?.customHeaders || r.proxyConfig?.headers || r.customHeaders || r.headers || {};
471
- Object.keys(a).length > 0 && T(Object.entries(a).map(([e, t], n) => ({
472
- id: `header-${n}`,
473
- name: e,
474
- value: String(t)
475
- }))), r.requestTimeout && re(String(r.requestTimeout)), r.resetTimeoutOnProgress !== void 0 && I(r.resetTimeoutOnProgress ? "True" : "False"), r.maxTotalTimeout && z(String(r.maxTotalTimeout)), r.oauth && (U(r.oauth.clientId || ""), G(r.oauth.clientSecret || ""), q(r.oauth.scope || "")), E.success("Configuration pasted and form populated");
476
- }
477
- } catch {}
478
- }, Te = (e) => {
479
- ye.current || e.nativeEvent.isComposing || e.keyCode === 229 || e.key === "Enter" && !e.shiftKey && !e.metaKey && !e.ctrlKey && e.target.tagName !== "TEXTAREA" && (e.preventDefault(), J && r.trim() && J());
480
- }, Ee = /* @__PURE__ */ (0, N.jsxs)("div", {
481
- className: "grid gap-4 sm:grid-cols-2",
482
- children: [
483
- !Q && /* @__PURE__ */ (0, N.jsx)("h4", {
484
- className: "text-sm font-medium sm:col-span-2",
485
- children: "OAuth 2.0"
486
- }),
487
- /* @__PURE__ */ (0, N.jsxs)("div", {
488
- className: "space-y-2",
489
- children: [/* @__PURE__ */ (0, N.jsx)(s, {
490
- className: "text-sm",
491
- children: "Client ID"
492
- }), /* @__PURE__ */ (0, N.jsx)(n, {
493
- "data-testid": "auth-dialog-client-id-input",
494
- placeholder: "Client ID",
495
- value: H,
496
- onChange: (e) => U(e.target.value)
497
- })]
498
- }),
499
- /* @__PURE__ */ (0, N.jsxs)("div", {
500
- className: "space-y-2",
501
- children: [
502
- /* @__PURE__ */ (0, N.jsx)(s, {
503
- className: "text-sm",
504
- children: "Client Secret"
505
- }),
506
- /* @__PURE__ */ (0, N.jsx)(n, {
507
- "data-testid": "auth-dialog-client-secret-input",
508
- type: "password",
509
- placeholder: "Client Secret (optional)",
510
- value: W,
511
- onChange: (e) => G(e.target.value)
512
- }),
513
- /* @__PURE__ */ (0, N.jsx)("p", {
514
- className: "text-xs text-muted-foreground",
515
- children: "Stored in your browser's localStorage."
516
- })
517
- ]
518
- }),
519
- /* @__PURE__ */ (0, N.jsxs)("div", {
520
- className: "space-y-2 sm:col-span-2",
521
- children: [/* @__PURE__ */ (0, N.jsx)(s, {
522
- className: "text-sm",
523
- children: "Scope"
524
- }), /* @__PURE__ */ (0, N.jsx)(n, {
525
- "data-testid": "auth-dialog-scope-input",
526
- placeholder: "Scope (space-separated)",
527
- value: K,
528
- onChange: (e) => q(e.target.value)
529
- })]
530
- })
531
- ]
532
- }), De = /* @__PURE__ */ (0, N.jsx)(ce, {
533
- title: /* @__PURE__ */ (0, N.jsx)(N.Fragment, {}),
534
- headers: w,
535
- onChange: T
536
- }), Oe = /* @__PURE__ */ (0, N.jsxs)("div", {
537
- className: "grid gap-4 sm:grid-cols-2",
538
- children: [
539
- /* @__PURE__ */ (0, N.jsxs)("div", {
540
- className: "space-y-2",
541
- children: [
542
- /* @__PURE__ */ (0, N.jsx)(s, {
543
- className: "text-sm",
544
- children: "Connection Mode"
545
- }),
546
- /* @__PURE__ */ (0, N.jsxs)(f, {
547
- value: y,
548
- onValueChange: (e) => x(e),
549
- children: [/* @__PURE__ */ (0, N.jsx)(l, {
550
- className: "w-full",
551
- "data-testid": "config-dialog-connection-mode-select",
552
- children: /* @__PURE__ */ (0, N.jsx)(c, {})
553
- }), /* @__PURE__ */ (0, N.jsxs)(u, { children: [
554
- /* @__PURE__ */ (0, N.jsx)(d, {
555
- value: "auto",
556
- children: "Auto"
557
- }),
558
- /* @__PURE__ */ (0, N.jsx)(d, {
559
- value: "direct",
560
- children: "Direct"
561
- }),
562
- /* @__PURE__ */ (0, N.jsx)(d, {
563
- value: "proxy",
564
- children: "Proxy"
565
- })
566
- ] })]
567
- }),
568
- /* @__PURE__ */ (0, N.jsx)("p", {
569
- className: "text-xs text-muted-foreground",
570
- children: "Auto tries a direct connection first and falls back to the proxy. Direct bypasses the proxy; Proxy always routes through it."
571
- })
572
- ]
573
- }),
574
- /* @__PURE__ */ (0, N.jsxs)("div", {
575
- className: "space-y-2",
576
- children: [
577
- /* @__PURE__ */ (0, N.jsx)(s, {
578
- className: "text-sm",
579
- children: "Protocol"
580
- }),
581
- /* @__PURE__ */ (0, N.jsxs)(f, {
582
- value: S,
583
- onValueChange: (e) => C(e),
584
- children: [/* @__PURE__ */ (0, N.jsx)(l, {
585
- className: "w-full",
586
- "data-testid": "config-dialog-protocol-mode-select",
587
- children: /* @__PURE__ */ (0, N.jsx)(c, {})
588
- }), /* @__PURE__ */ (0, N.jsxs)(u, { children: [
589
- /* @__PURE__ */ (0, N.jsx)(d, {
590
- value: "auto",
591
- children: "Auto (recommended)"
592
- }),
593
- /* @__PURE__ */ (0, N.jsx)(d, {
594
- value: "v1",
595
- children: "Force v1 (2024/2025)"
596
- }),
597
- /* @__PURE__ */ (0, N.jsx)(d, {
598
- value: "v2",
599
- children: "Force v2 (2026-07-28)"
600
- })
601
- ] })]
602
- }),
603
- /* @__PURE__ */ (0, N.jsx)("p", {
604
- className: "text-xs text-muted-foreground",
605
- children: "Auto probes for v2 and falls back to the legacy v1 initialize flow. Forced modes fail when the server is incompatible."
606
- })
607
- ]
608
- }),
609
- /* @__PURE__ */ (0, N.jsxs)("div", {
610
- className: "space-y-2",
611
- children: [/* @__PURE__ */ (0, N.jsx)(s, {
612
- className: "text-sm",
613
- children: "Proxy Endpoint"
614
- }), /* @__PURE__ */ (0, N.jsx)(n, {
615
- "data-testid": "config-dialog-proxy-address-input",
616
- value: B,
617
- onChange: (e) => V(e.target.value)
618
- })]
619
- }),
620
- /* @__PURE__ */ (0, N.jsxs)("div", {
621
- className: "space-y-2",
622
- children: [/* @__PURE__ */ (0, N.jsx)(s, {
623
- className: "text-sm",
624
- children: "Request Timeout"
625
- }), /* @__PURE__ */ (0, N.jsx)(n, {
626
- "data-testid": "config-dialog-request-timeout-input",
627
- type: "number",
628
- value: ne,
629
- onChange: (e) => re(e.target.value)
630
- })]
631
- }),
632
- /* @__PURE__ */ (0, N.jsxs)("div", {
633
- className: "space-y-2",
634
- children: [/* @__PURE__ */ (0, N.jsx)(s, {
635
- className: "text-sm",
636
- children: "Maximum Total Timeout"
637
- }), /* @__PURE__ */ (0, N.jsx)(n, {
638
- "data-testid": "config-dialog-max-timeout-input",
639
- type: "number",
640
- value: R,
641
- onChange: (e) => z(e.target.value)
642
- })]
643
- }),
644
- /* @__PURE__ */ (0, N.jsxs)("div", {
645
- className: "space-y-2",
646
- children: [/* @__PURE__ */ (0, N.jsx)(s, {
647
- className: "text-sm",
648
- children: "Reset Timeout on Progress"
649
- }), /* @__PURE__ */ (0, N.jsxs)(f, {
650
- value: P,
651
- onValueChange: I,
652
- children: [/* @__PURE__ */ (0, N.jsx)(l, {
653
- className: "w-full",
654
- "data-testid": "config-dialog-reset-timeout-select",
655
- children: /* @__PURE__ */ (0, N.jsx)(c, {})
656
- }), /* @__PURE__ */ (0, N.jsxs)(u, { children: [/* @__PURE__ */ (0, N.jsx)(d, {
657
- value: "True",
658
- children: "True"
659
- }), /* @__PURE__ */ (0, N.jsx)(d, {
660
- value: "False",
661
- children: "False"
662
- })] })]
663
- })]
664
- })
665
- ]
666
- }), ke = /* @__PURE__ */ (0, N.jsxs)("div", {
667
- className: Z || Q ? "grid gap-4 sm:grid-cols-2" : "space-y-4",
668
- children: [/* @__PURE__ */ (0, N.jsxs)("div", {
669
- className: "space-y-2",
670
- children: [/* @__PURE__ */ (0, N.jsx)(s, {
671
- className: Se,
672
- children: "Alias"
673
- }), /* @__PURE__ */ (0, N.jsx)(n, {
674
- "data-testid": "connection-form-alias-input",
675
- placeholder: "Optional server alias",
676
- value: e,
677
- onChange: (e) => t(e.target.value),
678
- className: xe
679
- })]
680
- }), /* @__PURE__ */ (0, N.jsxs)("div", {
681
- className: "space-y-2",
682
- children: [
683
- /* @__PURE__ */ (0, N.jsx)(s, {
684
- className: Se,
685
- children: "URL"
686
- }),
687
- /* @__PURE__ */ (0, N.jsx)(n, {
688
- "data-testid": "connection-form-url-input",
689
- placeholder: "http://localhost:3000",
690
- value: r,
691
- onChange: (e) => i(e.target.value),
692
- onPaste: we,
693
- className: xe
694
- }),
695
- /* @__PURE__ */ (0, N.jsx)("p", {
696
- className: a("text-xs text-muted-foreground", $ ? "text-white/60" : ""),
697
- children: "Tip: You can paste a copied connection config (JSON) to auto-populate the form"
698
- })
699
- ]
700
- })]
701
- }), Ae = {
702
- onCompositionStart: () => {
703
- ye.current = !0;
704
- },
705
- onCompositionEnd: () => {
706
- ye.current = !1;
707
- },
708
- onKeyDown: Te
709
- }, je = de ? /* @__PURE__ */ (0, N.jsxs)(o, {
710
- "data-testid": "connection-form-copy-config-button",
711
- variant: "ghost",
712
- onClick: be,
713
- className: a($ ? "absolute top-0 right-0 z-10 text-white hover:bg-white/20 dark:hover:bg-white/20" : "w-full", !$ && "mb-2"),
714
- children: [/* @__PURE__ */ (0, N.jsx)(ee, { className: "mr-2 h-4 w-4" }), "Copy Config"]
715
- }) : null;
716
- return Z && Q ? /* @__PURE__ */ (0, N.jsxs)("div", {
717
- className: "relative space-y-6 @container",
718
- ...Ae,
719
- children: [
720
- je,
721
- /* @__PURE__ */ (0, N.jsxs)(j, {
722
- className: "border",
723
- children: [/* @__PURE__ */ (0, N.jsxs)(O, { children: [/* @__PURE__ */ (0, N.jsx)(D, {
724
- className: "text-base font-medium",
725
- children: "Endpoint"
726
- }), /* @__PURE__ */ (0, N.jsx)(A, { children: "MCP server URL and display alias" })] }), /* @__PURE__ */ (0, N.jsx)(k, {
727
- className: "pt-0",
728
- children: ke
729
- })]
730
- }),
731
- /* @__PURE__ */ (0, N.jsxs)(j, {
732
- className: "border",
733
- children: [/* @__PURE__ */ (0, N.jsxs)(O, { children: [/* @__PURE__ */ (0, N.jsx)(D, {
734
- className: "text-base font-medium",
735
- children: "Authentication"
736
- }), /* @__PURE__ */ (0, N.jsx)(A, { children: "OAuth 2.0 client credentials" })] }), /* @__PURE__ */ (0, N.jsx)(k, {
737
- className: "pt-0",
738
- children: Ee
739
- })]
740
- }),
741
- /* @__PURE__ */ (0, N.jsxs)(j, {
742
- className: "border",
743
- children: [/* @__PURE__ */ (0, N.jsxs)(O, { children: [/* @__PURE__ */ (0, N.jsx)(D, {
744
- className: "text-base font-medium",
745
- children: "Custom Headers"
746
- }), /* @__PURE__ */ (0, N.jsx)(A, { children: "Extra HTTP headers sent with MCP requests" })] }), /* @__PURE__ */ (0, N.jsx)(k, {
747
- className: "pt-0",
748
- children: De
749
- })]
750
- }),
751
- /* @__PURE__ */ (0, N.jsxs)(j, {
752
- className: "border",
753
- children: [/* @__PURE__ */ (0, N.jsxs)(O, { children: [/* @__PURE__ */ (0, N.jsx)(D, {
754
- className: "text-base font-medium",
755
- children: "Configuration"
756
- }), /* @__PURE__ */ (0, N.jsx)(A, { children: "Connection mode, proxy, and request timeouts" })] }), /* @__PURE__ */ (0, N.jsx)(k, {
757
- className: "pt-0",
758
- children: Oe
759
- })]
760
- })
761
- ]
762
- }) : /* @__PURE__ */ (0, N.jsxs)("div", {
763
- className: "relative space-y-4 @container",
764
- ...Ae,
765
- children: [
766
- !Z && /* @__PURE__ */ (0, N.jsx)("h3", {
767
- className: "mb-4 text-xl font-semibold text-white",
768
- children: "Connect"
769
- }),
770
- je,
771
- ke,
772
- Z && !Q && /* @__PURE__ */ (0, N.jsxs)("div", {
773
- className: "space-y-8 pt-2",
774
- children: [
775
- /* @__PURE__ */ (0, N.jsxs)("section", {
776
- className: "space-y-4",
777
- children: [/* @__PURE__ */ (0, N.jsx)("h3", {
778
- className: "text-xs font-medium uppercase tracking-wide text-muted-foreground",
779
- children: "Authentication"
780
- }), Ee]
781
- }),
782
- /* @__PURE__ */ (0, N.jsxs)("section", {
783
- className: "space-y-4",
784
- children: [/* @__PURE__ */ (0, N.jsx)("h3", {
785
- className: "text-xs font-medium uppercase tracking-wide text-muted-foreground",
786
- children: "Custom Headers"
787
- }), De]
788
- }),
789
- /* @__PURE__ */ (0, N.jsxs)("section", {
790
- className: "space-y-4",
791
- children: [/* @__PURE__ */ (0, N.jsx)("h3", {
792
- className: "text-xs font-medium uppercase tracking-wide text-muted-foreground",
793
- children: "Configuration"
794
- }), Oe]
795
- })
796
- ]
797
- }),
798
- !Z && /* @__PURE__ */ (0, N.jsxs)("div", {
799
- className: "flex flex-row gap-3 @lg:flex-col",
800
- children: [
801
- /* @__PURE__ */ (0, N.jsxs)(v, {
802
- open: he,
803
- onOpenChange: ge,
804
- children: [/* @__PURE__ */ (0, N.jsx)(m, {
805
- render: /* @__PURE__ */ (0, N.jsx)("div", {
806
- className: "relative flex-1 ",
807
- children: /* @__PURE__ */ (0, N.jsxs)(o, {
808
- "data-testid": "connection-form-auth-button",
809
- variant: "outline",
810
- className: a((H || W || K) && "border-2", "w-full justify-center hover:text-white cursor-pointer", Ce),
811
- children: [/* @__PURE__ */ (0, N.jsx)(b, { className: "w-4 h-4 mr-0" }), "Authentication"]
812
- })
813
- }),
814
- nativeButton: !1
815
- }), /* @__PURE__ */ (0, N.jsxs)(_, {
816
- scrollable: !0,
817
- className: "w-[calc(100vw-2rem)] sm:w-full max-w-2xl max-h-[80vh]",
818
- children: [/* @__PURE__ */ (0, N.jsx)(g, { children: /* @__PURE__ */ (0, N.jsx)(p, { children: "Authentication" }) }), /* @__PURE__ */ (0, N.jsxs)(h, {
819
- className: "space-y-4",
820
- children: [Ee, /* @__PURE__ */ (0, N.jsx)("div", {
821
- className: "flex justify-end",
822
- children: /* @__PURE__ */ (0, N.jsx)(o, {
823
- onClick: () => ge(!1),
824
- children: "Save"
825
- })
826
- })]
827
- })]
828
- })]
829
- }),
830
- /* @__PURE__ */ (0, N.jsxs)(v, {
831
- open: pe,
832
- onOpenChange: me,
833
- children: [/* @__PURE__ */ (0, N.jsx)(m, {
834
- render: /* @__PURE__ */ (0, N.jsx)("div", {
835
- className: "relative flex-1 ",
836
- children: /* @__PURE__ */ (0, N.jsxs)(o, {
837
- "data-testid": "connection-form-headers-button",
838
- variant: "outline",
839
- className: a("w-full justify-center hover:text-white cursor-pointer", Ce),
840
- children: [/* @__PURE__ */ (0, N.jsx)(ae, { className: "w-4 h-4" }), "Custom Headers"]
841
- })
842
- }),
843
- nativeButton: !1
844
- }), /* @__PURE__ */ (0, N.jsxs)(_, {
845
- scrollable: !0,
846
- className: "w-full max-w-2xl max-h-[80vh]",
847
- children: [/* @__PURE__ */ (0, N.jsx)(g, { children: /* @__PURE__ */ (0, N.jsx)(p, { children: "Custom Headers" }) }), /* @__PURE__ */ (0, N.jsx)(h, { children: /* @__PURE__ */ (0, N.jsx)(ce, {
848
- title: /* @__PURE__ */ (0, N.jsx)(N.Fragment, {}),
849
- headers: w,
850
- onChange: T,
851
- onSave: () => me(!1)
852
- }) })]
853
- })]
854
- }),
855
- /* @__PURE__ */ (0, N.jsxs)(v, {
856
- open: _e,
857
- onOpenChange: ve,
858
- children: [/* @__PURE__ */ (0, N.jsx)(m, {
859
- render: /* @__PURE__ */ (0, N.jsxs)(o, {
860
- "data-testid": "connection-form-config-button",
861
- variant: "outline",
862
- className: a("flex-1 justify-center hover:text-white cursor-pointer", Ce),
863
- children: [/* @__PURE__ */ (0, N.jsx)(ie, { className: "w-4 h-4" }), "Configuration"]
864
- }),
865
- nativeButton: !0
866
- }), /* @__PURE__ */ (0, N.jsxs)(_, {
867
- scrollable: !0,
868
- className: "w-full max-w-2xl max-h-[80vh]",
869
- children: [/* @__PURE__ */ (0, N.jsx)(g, { children: /* @__PURE__ */ (0, N.jsx)(p, { children: "Configuration" }) }), /* @__PURE__ */ (0, N.jsxs)(h, {
870
- className: "space-y-4",
871
- children: [Oe, /* @__PURE__ */ (0, N.jsx)("div", {
872
- className: "flex justify-end",
873
- children: /* @__PURE__ */ (0, N.jsx)(o, {
874
- onClick: () => ve(!1),
875
- children: "Save"
876
- })
877
- })]
878
- })]
879
- })]
880
- })
881
- ]
882
- }),
883
- le && /* @__PURE__ */ (0, N.jsx)(o, {
884
- "data-testid": "connection-form-connect-button",
885
- onClick: J,
886
- disabled: !r.trim() || fe,
887
- size: $ ? "lg" : void 0,
888
- className: a("w-full font-semibold", $ ? "rounded-full text-black [&_[aria-hidden]]:bg-white hover:[&_[aria-hidden]]:bg-white/90 group-active:[&_[aria-hidden]]:bg-white/80" : ""),
889
- children: fe ? /* @__PURE__ */ (0, N.jsxs)(N.Fragment, { children: [/* @__PURE__ */ (0, N.jsx)("svg", {
890
- className: "w-4 h-4 mr-2 animate-spin",
891
- fill: "none",
892
- stroke: "currentColor",
893
- viewBox: "0 0 24 24",
894
- children: /* @__PURE__ */ (0, N.jsx)("path", {
895
- strokeLinecap: "round",
896
- strokeLinejoin: "round",
897
- strokeWidth: 2,
898
- d: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
899
- })
900
- }), "Connecting..."] }) : /* @__PURE__ */ (0, N.jsxs)(N.Fragment, { children: [/* @__PURE__ */ (0, N.jsx)("svg", {
901
- className: "w-4 h-4 mr-2",
902
- fill: "none",
903
- stroke: "currentColor",
904
- viewBox: "0 0 24 24",
905
- children: /* @__PURE__ */ (0, N.jsx)("path", {
906
- strokeLinecap: "round",
907
- strokeLinejoin: "round",
908
- strokeWidth: 2,
909
- d: "M13 10V3L4 14h7v7l9-11h-7z"
910
- })
911
- }), "Connect"] })
912
- }),
913
- ue && /* @__PURE__ */ (0, N.jsxs)("div", {
914
- className: "flex justify-end gap-2",
915
- children: [X && /* @__PURE__ */ (0, N.jsx)(o, {
916
- variant: "outline",
917
- onClick: X,
918
- children: "Cancel"
919
- }), /* @__PURE__ */ (0, N.jsx)(o, {
920
- "data-testid": "connection-form-save-button",
921
- onClick: Y,
922
- children: "Save Connection Options"
923
- })]
924
- })
925
- ]
926
- });
927
- }
928
- //#endregion
929
- export { U as a, L as c, V as d, K as f, I as i, F as l, ae as m, se as n, q as o, G as p, H as r, X as s, le as t, oe as u };