@mesantosrai/pipeline-canvas 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +545 -0
  3. package/dist/_virtual/dynamic-import-helper.mjs +17 -0
  4. package/dist/_virtual/dynamic-import-helper.mjs.map +1 -0
  5. package/dist/components/CustomHandle.d.ts +9 -0
  6. package/dist/components/CustomHandle.d.ts.map +1 -0
  7. package/dist/components/CustomHandle.mjs +18 -0
  8. package/dist/components/CustomHandle.mjs.map +1 -0
  9. package/dist/components/ExecutionLogsPanel.d.ts +3 -0
  10. package/dist/components/ExecutionLogsPanel.d.ts.map +1 -0
  11. package/dist/components/ExecutionLogsPanel.mjs +189 -0
  12. package/dist/components/ExecutionLogsPanel.mjs.map +1 -0
  13. package/dist/components/NodeContextMenu.d.ts +15 -0
  14. package/dist/components/NodeContextMenu.d.ts.map +1 -0
  15. package/dist/components/NodeContextMenu.mjs +110 -0
  16. package/dist/components/NodeContextMenu.mjs.map +1 -0
  17. package/dist/components/PipelineCanvas.d.ts +4 -0
  18. package/dist/components/PipelineCanvas.d.ts.map +1 -0
  19. package/dist/components/PipelineCanvas.mjs +1016 -0
  20. package/dist/components/PipelineCanvas.mjs.map +1 -0
  21. package/dist/components/PipelineCanvasProvider.d.ts +30 -0
  22. package/dist/components/PipelineCanvasProvider.d.ts.map +1 -0
  23. package/dist/components/PipelineCanvasProvider.mjs +7 -0
  24. package/dist/components/PipelineCanvasProvider.mjs.map +1 -0
  25. package/dist/components/PipelineExecution.d.ts +16 -0
  26. package/dist/components/PipelineExecution.d.ts.map +1 -0
  27. package/dist/components/PipelineExecution.mjs +310 -0
  28. package/dist/components/PipelineExecution.mjs.map +1 -0
  29. package/dist/components/PipelineManager.d.ts +8 -0
  30. package/dist/components/PipelineManager.d.ts.map +1 -0
  31. package/dist/components/PipelineManager.mjs +143 -0
  32. package/dist/components/PipelineManager.mjs.map +1 -0
  33. package/dist/components/PipelineNodeConfig.d.ts +11 -0
  34. package/dist/components/PipelineNodeConfig.d.ts.map +1 -0
  35. package/dist/components/PipelineNodeConfig.mjs +1808 -0
  36. package/dist/components/PipelineNodeConfig.mjs.map +1 -0
  37. package/dist/components/PipelineNodePalette.d.ts +3 -0
  38. package/dist/components/PipelineNodePalette.d.ts.map +1 -0
  39. package/dist/components/PipelineNodePalette.mjs +87 -0
  40. package/dist/components/PipelineNodePalette.mjs.map +1 -0
  41. package/dist/components/SavePipelineDialog.d.ts +9 -0
  42. package/dist/components/SavePipelineDialog.d.ts.map +1 -0
  43. package/dist/components/SavePipelineDialog.mjs +140 -0
  44. package/dist/components/SavePipelineDialog.mjs.map +1 -0
  45. package/dist/components/SavedPipelinesList.d.ts +3 -0
  46. package/dist/components/SavedPipelinesList.d.ts.map +1 -0
  47. package/dist/components/SavedPipelinesList.mjs +172 -0
  48. package/dist/components/SavedPipelinesList.mjs.map +1 -0
  49. package/dist/components/index.d.ts +8 -0
  50. package/dist/components/index.d.ts.map +1 -0
  51. package/dist/components/ui/alert.d.ts +9 -0
  52. package/dist/components/ui/alert.d.ts.map +1 -0
  53. package/dist/components/ui/alert.mjs +51 -0
  54. package/dist/components/ui/alert.mjs.map +1 -0
  55. package/dist/components/ui/button.d.ts +12 -0
  56. package/dist/components/ui/button.d.ts.map +1 -0
  57. package/dist/components/ui/button.mjs +45 -0
  58. package/dist/components/ui/button.mjs.map +1 -0
  59. package/dist/components/ui/dialog.d.ts +20 -0
  60. package/dist/components/ui/dialog.d.ts.map +1 -0
  61. package/dist/components/ui/dialog.mjs +99 -0
  62. package/dist/components/ui/dialog.mjs.map +1 -0
  63. package/dist/components/ui/index.d.ts +8 -0
  64. package/dist/components/ui/index.d.ts.map +1 -0
  65. package/dist/components/ui/input.d.ts +6 -0
  66. package/dist/components/ui/input.d.ts.map +1 -0
  67. package/dist/components/ui/input.mjs +22 -0
  68. package/dist/components/ui/input.mjs.map +1 -0
  69. package/dist/components/ui/label.d.ts +6 -0
  70. package/dist/components/ui/label.d.ts.map +1 -0
  71. package/dist/components/ui/label.mjs +20 -0
  72. package/dist/components/ui/label.mjs.map +1 -0
  73. package/dist/components/ui/select.d.ts +14 -0
  74. package/dist/components/ui/select.d.ts.map +1 -0
  75. package/dist/components/ui/select.mjs +121 -0
  76. package/dist/components/ui/select.mjs.map +1 -0
  77. package/dist/components/ui/tooltip.d.ts +8 -0
  78. package/dist/components/ui/tooltip.d.ts.map +1 -0
  79. package/dist/components/ui/tooltip.mjs +24 -0
  80. package/dist/components/ui/tooltip.mjs.map +1 -0
  81. package/dist/context/PipelineContext.d.ts +50 -0
  82. package/dist/context/PipelineContext.d.ts.map +1 -0
  83. package/dist/context/PipelineContext.mjs +36 -0
  84. package/dist/context/PipelineContext.mjs.map +1 -0
  85. package/dist/index.d.ts +12 -0
  86. package/dist/index.d.ts.map +1 -0
  87. package/dist/index.mjs +45 -0
  88. package/dist/index.mjs.map +1 -0
  89. package/dist/lib/utils.d.ts +3 -0
  90. package/dist/lib/utils.d.ts.map +1 -0
  91. package/dist/lib/utils.mjs +9 -0
  92. package/dist/lib/utils.mjs.map +1 -0
  93. package/dist/node_modules/zustand/esm/middleware.mjs +256 -0
  94. package/dist/node_modules/zustand/esm/middleware.mjs.map +1 -0
  95. package/dist/nodes/alphafold_node/node.json.mjs +82 -0
  96. package/dist/nodes/alphafold_node/node.json.mjs.map +1 -0
  97. package/dist/nodes/http_request_node/node.json.mjs +383 -0
  98. package/dist/nodes/http_request_node/node.json.mjs.map +1 -0
  99. package/dist/nodes/input_node/node.json.mjs +51 -0
  100. package/dist/nodes/input_node/node.json.mjs.map +1 -0
  101. package/dist/nodes/message_input_node/node.json.mjs +90 -0
  102. package/dist/nodes/message_input_node/node.json.mjs.map +1 -0
  103. package/dist/nodes/proteinmpnn_node/node.json.mjs +83 -0
  104. package/dist/nodes/proteinmpnn_node/node.json.mjs.map +1 -0
  105. package/dist/nodes/rfdiffusion_node/node.json.mjs +281 -0
  106. package/dist/nodes/rfdiffusion_node/node.json.mjs.map +1 -0
  107. package/dist/store/pipelineStore.d.ts +108 -0
  108. package/dist/store/pipelineStore.d.ts.map +1 -0
  109. package/dist/store/pipelineStore.mjs +633 -0
  110. package/dist/store/pipelineStore.mjs.map +1 -0
  111. package/dist/style.css +1 -0
  112. package/dist/types/dependencies.d.ts +93 -0
  113. package/dist/types/dependencies.d.ts.map +1 -0
  114. package/dist/types/index.d.ts +56 -0
  115. package/dist/types/index.d.ts.map +1 -0
  116. package/dist/types/logger.d.ts +67 -0
  117. package/dist/types/logger.d.ts.map +1 -0
  118. package/dist/types/logger.mjs +22 -0
  119. package/dist/types/logger.mjs.map +1 -0
  120. package/dist/utils/executionEngine.d.ts +27 -0
  121. package/dist/utils/executionEngine.d.ts.map +1 -0
  122. package/dist/utils/executionEngine.mjs +461 -0
  123. package/dist/utils/executionEngine.mjs.map +1 -0
  124. package/dist/utils/index.d.ts +6 -0
  125. package/dist/utils/index.d.ts.map +1 -0
  126. package/dist/utils/logger.d.ts +23 -0
  127. package/dist/utils/logger.d.ts.map +1 -0
  128. package/dist/utils/logger.mjs +29 -0
  129. package/dist/utils/logger.mjs.map +1 -0
  130. package/dist/utils/nodeLoader.d.ts +76 -0
  131. package/dist/utils/nodeLoader.d.ts.map +1 -0
  132. package/dist/utils/nodeLoader.mjs +48 -0
  133. package/dist/utils/nodeLoader.mjs.map +1 -0
  134. package/dist/utils/templateResolver.d.ts +10 -0
  135. package/dist/utils/templateResolver.d.ts.map +1 -0
  136. package/dist/utils/templateResolver.mjs +64 -0
  137. package/dist/utils/templateResolver.mjs.map +1 -0
  138. package/dist/utils/topologicalSort.d.ts +10 -0
  139. package/dist/utils/topologicalSort.d.ts.map +1 -0
  140. package/dist/utils/topologicalSort.mjs +25 -0
  141. package/dist/utils/topologicalSort.mjs.map +1 -0
  142. package/nodes/alphafold_node/node.json +77 -0
  143. package/nodes/http_request_node/node.json +311 -0
  144. package/nodes/input_node/node.json +47 -0
  145. package/nodes/message_input_node/node.json +56 -0
  146. package/nodes/proteinmpnn_node/node.json +78 -0
  147. package/nodes/rfdiffusion_node/node.json +231 -0
  148. package/package.json +94 -0
@@ -0,0 +1,1808 @@
1
+ import { jsx as e, jsxs as a, Fragment as D } from "react/jsx-runtime";
2
+ import { useEffect as ee, useState as X, useRef as _t } from "react";
3
+ import { usePipelineStore as z } from "../store/pipelineStore.mjs";
4
+ import { usePipelineContext as wt } from "../context/PipelineContext.mjs";
5
+ import { ArrowLeft as kt, Play as Ct, X as oe, Trash2 as St, CheckCircle2 as jt, Info as Ot, AlertCircle as pt, Copy as Tt, Search as Pt, File as gt, Upload as At } from "lucide-react";
6
+ import { Input as S } from "./ui/input.mjs";
7
+ import { Label as w } from "./ui/label.mjs";
8
+ import { Select as te, SelectTrigger as ae, SelectValue as se, SelectContent as re, SelectItem as k } from "./ui/select.mjs";
9
+ import { Button as le } from "./ui/button.mjs";
10
+ import { Alert as Dt, AlertDescription as Ft } from "./ui/alert.mjs";
11
+ import { TooltipProvider as qt, Tooltip as Rt, TooltipTrigger as Ut, TooltipContent as Et } from "./ui/tooltip.mjs";
12
+ const It = (m, W, ne, B) => {
13
+ var Y, G, t, M, I, Q, R, $, K, v, V, F;
14
+ const j = ne.filter((q) => q.target === m);
15
+ if (j.length === 0)
16
+ return { sourceNode: null, inputData: null };
17
+ const i = W.find((q) => q.id === j[0].source);
18
+ if (!i)
19
+ return { sourceNode: null, inputData: null };
20
+ if (B === "message_input_node" && i.result_metadata)
21
+ return {
22
+ sourceNode: i,
23
+ inputData: i.result_metadata
24
+ };
25
+ if (i.type === "input_node") {
26
+ const q = ((Y = i.result_metadata) == null ? void 0 : Y.file_info) || ((G = i.result_metadata) == null ? void 0 : G.data) || {
27
+ type: "pdb_file",
28
+ filename: (t = i.config) == null ? void 0 : t.filename,
29
+ file_id: (M = i.config) == null ? void 0 : M.file_id,
30
+ file_url: (I = i.config) == null ? void 0 : I.file_url,
31
+ chains: (Q = i.config) == null ? void 0 : Q.chains,
32
+ total_residues: (R = i.config) == null ? void 0 : R.total_residues,
33
+ suggested_contigs: ($ = i.config) == null ? void 0 : $.suggested_contigs,
34
+ chain_residue_counts: (K = i.config) == null ? void 0 : K.chain_residue_counts,
35
+ atoms: (v = i.config) == null ? void 0 : v.atoms
36
+ };
37
+ return {
38
+ sourceNode: i,
39
+ inputData: q
40
+ };
41
+ }
42
+ return (V = i.result_metadata) != null && V.output_file ? {
43
+ sourceNode: i,
44
+ inputData: {
45
+ type: "pdb_file",
46
+ output_file: i.result_metadata.output_file
47
+ }
48
+ } : i.type === "proteinmpnn_node" && ((F = i.result_metadata) != null && F.sequence) ? {
49
+ sourceNode: i,
50
+ inputData: {
51
+ type: "sequence",
52
+ sequence: i.result_metadata.sequence
53
+ }
54
+ } : i.result_metadata ? {
55
+ sourceNode: i,
56
+ inputData: i.result_metadata
57
+ } : { sourceNode: i, inputData: null };
58
+ }, Wt = ({
59
+ nodeId: m,
60
+ onUpdate: W,
61
+ onDelete: ne,
62
+ onClose: B
63
+ }) => {
64
+ var ue, me, fe, he, pe, ge, xe, ye, be, Ne, ve, _e, we, ke;
65
+ const { currentPipeline: j, currentExecution: i, executeSingleNode: Y } = z(), { getAuthHeaders: G } = wt(), t = j == null ? void 0 : j.nodes.find((r) => r.id === m);
66
+ ee(() => {
67
+ var r, c;
68
+ (t == null ? void 0 : t.type) === "input_node" && console.log("[PipelineNodeConfig] Node config updated:", {
69
+ nodeId: m,
70
+ hasConfig: !!t.config,
71
+ configKeys: t.config ? Object.keys(t.config) : null,
72
+ filename: (r = t.config) == null ? void 0 : r.filename,
73
+ file_id: (c = t.config) == null ? void 0 : c.file_id,
74
+ fullConfig: JSON.parse(JSON.stringify(t.config || {}))
75
+ // Deep clone to see current state
76
+ });
77
+ }, [m, (ue = t == null ? void 0 : t.config) == null ? void 0 : ue.filename, (me = t == null ? void 0 : t.config) == null ? void 0 : me.file_id, t == null ? void 0 : t.config]);
78
+ const [M, I] = X(null), [Q, R] = X(null), [$, K] = X(!1), [v, V] = X("parameters"), [F, q] = X("json"), Z = _t(null), s = i == null ? void 0 : i.logs.find(
79
+ (r) => r.nodeId === m
80
+ );
81
+ ee(() => {
82
+ var r, c, f, h, g, u, p, x, y, d;
83
+ (t == null ? void 0 : t.type) === "input_node" && v === "output" && console.log("[PipelineNodeConfig] Input node - Output tab opened:", {
84
+ nodeId: m,
85
+ hasNodeLog: !!s,
86
+ hasConfig: !!t.config,
87
+ hasFilename: !!((r = t.config) != null && r.filename),
88
+ hasFileId: !!((c = t.config) != null && c.file_id),
89
+ filename: (f = t.config) == null ? void 0 : f.filename,
90
+ fileId: (h = t.config) == null ? void 0 : h.file_id,
91
+ hasResultMetadata: !!t.result_metadata,
92
+ hasFileInfo: !!((g = t.result_metadata) != null && g.file_info),
93
+ hasResultData: !!((u = t.result_metadata) != null && u.data),
94
+ configKeys: t.config ? Object.keys(t.config) : null,
95
+ shouldShowOutput: !!(s || (p = t.config) != null && p.filename || (x = t.config) != null && x.file_id || (y = t.result_metadata) != null && y.file_info || (d = t.result_metadata) != null && d.data)
96
+ });
97
+ }, [m, t == null ? void 0 : t.type, v, t == null ? void 0 : t.config, t == null ? void 0 : t.result_metadata, s]), ee(() => {
98
+ var r, c;
99
+ (t == null ? void 0 : t.type) === "http_request_node" && console.log("[PipelineNodeConfig] nodeLog changed:", {
100
+ nodeId: m,
101
+ hasCurrentExecution: !!i,
102
+ currentExecutionId: i == null ? void 0 : i.id,
103
+ logsCount: ((r = i == null ? void 0 : i.logs) == null ? void 0 : r.length) || 0,
104
+ allLogNodeIds: ((c = i == null ? void 0 : i.logs) == null ? void 0 : c.map((f) => f.nodeId)) || [],
105
+ hasNodeLog: !!s,
106
+ nodeLogStatus: s == null ? void 0 : s.status,
107
+ nodeLogKeys: s ? Object.keys(s) : null,
108
+ nodeLogResponse: s == null ? void 0 : s.response,
109
+ nodeLogOutput: s == null ? void 0 : s.output,
110
+ activeTab: v,
111
+ fullNodeLog: s
112
+ // Log entire nodeLog for debugging
113
+ });
114
+ }, [m, t == null ? void 0 : t.type, i, s, v]), ee(() => {
115
+ var r, c, f, h, g, u, p, x, y, d;
116
+ (t == null ? void 0 : t.type) === "input_node" && console.log("[PipelineNodeConfig] Input node state:", {
117
+ nodeId: m,
118
+ activeTab: v,
119
+ hasNodeLog: !!s,
120
+ hasCurrentExecution: !!i,
121
+ hasConfig: !!t.config,
122
+ configKeys: t.config ? Object.keys(t.config) : null,
123
+ hasFilename: !!((r = t.config) != null && r.filename),
124
+ filename: (c = t.config) == null ? void 0 : c.filename,
125
+ hasFileId: !!((f = t.config) != null && f.file_id),
126
+ fileId: (h = t.config) == null ? void 0 : h.file_id,
127
+ hasResultMetadata: !!t.result_metadata,
128
+ hasFileInfo: !!((g = t.result_metadata) != null && g.file_info),
129
+ hasResultData: !!((u = t.result_metadata) != null && u.data),
130
+ shouldShowOutput: !!(s || (p = t.config) != null && p.filename || (x = t.config) != null && x.file_id || (y = t.result_metadata) != null && y.file_info || (d = t.result_metadata) != null && d.data),
131
+ fullConfig: t.config,
132
+ fullResultMetadata: t.result_metadata
133
+ });
134
+ }, [m, t == null ? void 0 : t.type, v, t == null ? void 0 : t.config, t == null ? void 0 : t.result_metadata, s, i]);
135
+ const { sourceNode: L, inputData: _ } = j ? It(m, j.nodes, j.edges, t == null ? void 0 : t.type) : { sourceNode: null, inputData: null }, ce = (t == null ? void 0 : t.type) !== "input_node" && (j == null ? void 0 : j.edges.some((r) => r.target === m));
136
+ if (!t)
137
+ return /* @__PURE__ */ e("div", { className: "text-sm text-gray-400", children: "Node not found" });
138
+ const n = (r, c) => {
139
+ var u;
140
+ const f = (u = z.getState().currentPipeline) == null ? void 0 : u.nodes.find((p) => p.id === m), h = (f == null ? void 0 : f.config) || t.config || {}, g = {
141
+ ...h,
142
+ [r]: c
143
+ };
144
+ (t == null ? void 0 : t.type) === "input_node" && console.log("[PipelineNodeConfig] handleConfigChange for input node:", {
145
+ nodeId: m,
146
+ key: r,
147
+ value: c,
148
+ oldConfig: h,
149
+ newConfig: g,
150
+ usingLatestNode: f !== t
151
+ }), W({
152
+ config: g
153
+ }), setTimeout(() => {
154
+ var p, x, y;
155
+ if ((t == null ? void 0 : t.type) === "input_node") {
156
+ const d = (p = z.getState().currentPipeline) == null ? void 0 : p.nodes.find((C) => C.id === m);
157
+ console.log("[PipelineNodeConfig] After onUpdate - checking store:", {
158
+ nodeId: m,
159
+ hasUpdatedNode: !!d,
160
+ updatedConfig: d == null ? void 0 : d.config,
161
+ updatedFilename: (x = d == null ? void 0 : d.config) == null ? void 0 : x.filename,
162
+ updatedFileId: (y = d == null ? void 0 : d.config) == null ? void 0 : y.file_id
163
+ });
164
+ }
165
+ }, 100);
166
+ }, xt = async (r) => {
167
+ var c;
168
+ I(r), R(null), K(!0);
169
+ try {
170
+ const f = new FormData();
171
+ f.append("file", r);
172
+ const h = G ? G() : {}, g = await fetch("/api/upload/pdb", {
173
+ method: "POST",
174
+ headers: h,
175
+ body: f
176
+ });
177
+ if (!g.ok) {
178
+ const d = await g.json();
179
+ throw new Error(d.detail || "Upload failed");
180
+ }
181
+ const u = await g.json();
182
+ console.log("[PipelineNodeConfig] File upload result:", {
183
+ nodeId: m,
184
+ result: u,
185
+ fileInfo: u.file_info
186
+ });
187
+ const p = (c = z.getState().currentPipeline) == null ? void 0 : c.nodes.find((d) => d.id === m), x = (p == null ? void 0 : p.config) || t.config || {}, y = {
188
+ ...x,
189
+ filename: u.file_info.filename,
190
+ file_id: u.file_info.file_id,
191
+ file_url: u.file_info.file_url,
192
+ ...u.file_info.chain_residue_counts && { chain_residue_counts: u.file_info.chain_residue_counts },
193
+ ...u.file_info.total_residues && { total_residues: u.file_info.total_residues },
194
+ ...u.file_info.suggested_contigs && { suggested_contigs: u.file_info.suggested_contigs },
195
+ ...u.file_info.chains && { chains: u.file_info.chains },
196
+ ...u.file_info.atoms && { atoms: u.file_info.atoms }
197
+ };
198
+ console.log("[PipelineNodeConfig] Updating config with all values at once:", {
199
+ nodeId: m,
200
+ currentConfig: x,
201
+ updatedConfig: y
202
+ }), W({
203
+ config: y
204
+ }), console.log("[PipelineNodeConfig] After onUpdate call:", {
205
+ nodeId: m,
206
+ filename: u.file_info.filename,
207
+ file_id: u.file_info.file_id
208
+ }), setTimeout(() => {
209
+ var C, O, T;
210
+ const d = (C = z.getState().currentPipeline) == null ? void 0 : C.nodes.find((P) => P.id === m);
211
+ console.log("[PipelineNodeConfig] After onUpdate - verifying store:", {
212
+ nodeId: m,
213
+ hasUpdatedNode: !!d,
214
+ updatedConfig: d == null ? void 0 : d.config,
215
+ updatedFilename: (O = d == null ? void 0 : d.config) == null ? void 0 : O.filename,
216
+ updatedFileId: (T = d == null ? void 0 : d.config) == null ? void 0 : T.file_id
217
+ });
218
+ }, 100), I(null), K(!1);
219
+ } catch (f) {
220
+ const h = f instanceof Error ? f.message : "Failed to upload file";
221
+ R(h), K(!1), I(null);
222
+ }
223
+ }, de = () => {
224
+ I(null), R(null), n("filename", ""), n("file_id", ""), n("file_url", ""), n("chain_residue_counts", {}), n("total_residues", 0), n("suggested_contigs", ""), n("chains", []), n("atoms", 0), Z.current && (Z.current.value = "");
225
+ }, yt = (r) => {
226
+ var f;
227
+ const c = (f = r.target.files) == null ? void 0 : f[0];
228
+ if (c) {
229
+ if (!c.name.toLowerCase().endsWith(".pdb")) {
230
+ R("Please select a PDB file (.pdb extension required)");
231
+ return;
232
+ }
233
+ const h = 10 * 1024 * 1024;
234
+ if (c.size > h) {
235
+ R("File too large. Maximum size is 10MB.");
236
+ return;
237
+ }
238
+ xt(c);
239
+ }
240
+ r.target.value = "";
241
+ }, bt = () => {
242
+ var r;
243
+ (r = Z.current) == null || r.click();
244
+ }, o = "w-full px-3 py-2 text-sm bg-gray-800/50 border border-gray-600/50 rounded-lg text-gray-200 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500/50 transition-colors", ie = () => {
245
+ Y(m);
246
+ }, Nt = () => {
247
+ var r, c, f, h, g, u, p, x, y, d, C, O, T, P, U, E, b, N, A, J, H, Ce, Se, je, Oe, Te, Pe, Ae, De, Fe, qe, Re, Ue, Ee, Ie, Je, He, Be, Me, $e, Ke, Ve, ze, Ge, Qe, Xe, We, Ye, Ze, Le, et, tt, at, st, rt, lt, nt, it, ot, ct, dt, ut, mt, ft, ht;
248
+ switch (t.type) {
249
+ case "input_node":
250
+ return /* @__PURE__ */ a("div", { className: "space-y-4", children: [
251
+ /* @__PURE__ */ a("div", { children: [
252
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "PDB File" }),
253
+ /* @__PURE__ */ a("div", { className: "space-y-2", children: [
254
+ M ? /* @__PURE__ */ a("div", { className: "flex items-center gap-2 px-3 py-2 bg-gray-800/50 border border-gray-600/50 rounded-lg", children: [
255
+ /* @__PURE__ */ e(gt, { className: "w-4 h-4 text-blue-400 flex-shrink-0" }),
256
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-200 flex-1 truncate", title: M.name, children: M.name }),
257
+ $ ? /* @__PURE__ */ e("span", { className: "text-xs text-gray-400", children: "Uploading..." }) : /* @__PURE__ */ e(
258
+ "button",
259
+ {
260
+ type: "button",
261
+ onClick: de,
262
+ disabled: $,
263
+ className: "p-1 hover:bg-gray-700/50 rounded disabled:opacity-50 transition-colors",
264
+ title: "Remove file",
265
+ children: /* @__PURE__ */ e(oe, { className: "w-3 h-3 text-gray-400" })
266
+ }
267
+ )
268
+ ] }) : (r = t.config) != null && r.filename ? /* @__PURE__ */ a("div", { className: "flex items-center gap-2 px-3 py-2 bg-gray-800/30 border border-gray-700/50 rounded-lg", children: [
269
+ /* @__PURE__ */ e(gt, { className: "w-4 h-4 text-green-400 flex-shrink-0" }),
270
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-300 flex-1 truncate", title: t.config.filename, children: t.config.filename }),
271
+ /* @__PURE__ */ e(
272
+ "button",
273
+ {
274
+ type: "button",
275
+ onClick: de,
276
+ className: "p-1 hover:bg-gray-700/50 rounded transition-colors",
277
+ title: "Remove file",
278
+ children: /* @__PURE__ */ e(oe, { className: "w-3 h-3 text-gray-400" })
279
+ }
280
+ )
281
+ ] }) : /* @__PURE__ */ a(
282
+ le,
283
+ {
284
+ type: "button",
285
+ onClick: bt,
286
+ disabled: $,
287
+ variant: "outline",
288
+ className: "w-full bg-gray-800/50 border-gray-600/50 text-gray-200 hover:bg-gray-800/70",
289
+ children: [
290
+ /* @__PURE__ */ e(At, { className: "w-4 h-4 mr-2" }),
291
+ "Upload PDB File"
292
+ ]
293
+ }
294
+ ),
295
+ Q && /* @__PURE__ */ a(Dt, { variant: "destructive", className: "mt-2", children: [
296
+ /* @__PURE__ */ e(pt, { className: "h-4 w-4" }),
297
+ /* @__PURE__ */ e(Ft, { className: "text-xs", children: Q })
298
+ ] }),
299
+ /* @__PURE__ */ e(
300
+ "input",
301
+ {
302
+ ref: Z,
303
+ type: "file",
304
+ accept: ".pdb",
305
+ onChange: yt,
306
+ className: "hidden"
307
+ }
308
+ )
309
+ ] })
310
+ ] }),
311
+ ((c = t.config) == null ? void 0 : c.filename) && ((f = t.config) == null ? void 0 : f.total_residues) && /* @__PURE__ */ a("div", { className: "space-y-3 pt-2 border-t border-gray-700/50", children: [
312
+ /* @__PURE__ */ a("div", { children: [
313
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Structure Information" }),
314
+ /* @__PURE__ */ a("div", { className: "bg-gray-800/30 rounded-lg p-3 space-y-2 text-xs", children: [
315
+ /* @__PURE__ */ a("div", { className: "flex justify-between", children: [
316
+ /* @__PURE__ */ e("span", { className: "text-gray-500", children: "Total Residues:" }),
317
+ /* @__PURE__ */ e("span", { className: "text-gray-200 font-medium", children: t.config.total_residues })
318
+ ] }),
319
+ /* @__PURE__ */ a("div", { className: "flex justify-between", children: [
320
+ /* @__PURE__ */ e("span", { className: "text-gray-500", children: "Atoms:" }),
321
+ /* @__PURE__ */ e("span", { className: "text-gray-200 font-medium", children: t.config.atoms || "N/A" })
322
+ ] }),
323
+ /* @__PURE__ */ a("div", { className: "flex justify-between", children: [
324
+ /* @__PURE__ */ e("span", { className: "text-gray-500", children: "Chains:" }),
325
+ /* @__PURE__ */ e("span", { className: "text-gray-200 font-medium", children: Array.isArray(t.config.chains) ? t.config.chains.join(", ") : "N/A" })
326
+ ] }),
327
+ t.config.chain_residue_counts && typeof t.config.chain_residue_counts == "object" && /* @__PURE__ */ a("div", { className: "pt-2 border-t border-gray-700/30", children: [
328
+ /* @__PURE__ */ e("span", { className: "text-gray-500 block mb-1", children: "Residues per Chain:" }),
329
+ /* @__PURE__ */ e("div", { className: "space-y-1", children: Object.entries(t.config.chain_residue_counts).map(([l, vt]) => /* @__PURE__ */ a("div", { className: "flex justify-between pl-2", children: [
330
+ /* @__PURE__ */ a("span", { className: "text-gray-400", children: [
331
+ "Chain ",
332
+ l,
333
+ ":"
334
+ ] }),
335
+ /* @__PURE__ */ a("span", { className: "text-gray-200", children: [
336
+ vt,
337
+ " residues"
338
+ ] })
339
+ ] }, l)) })
340
+ ] })
341
+ ] })
342
+ ] }),
343
+ ((h = t.config) == null ? void 0 : h.suggested_contigs) && /* @__PURE__ */ a("div", { children: [
344
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Suggested RFdiffusion Parameters" }),
345
+ /* @__PURE__ */ a("div", { className: "bg-blue-900/20 border border-blue-700/30 rounded-lg p-3 space-y-2 text-xs", children: [
346
+ /* @__PURE__ */ a("div", { className: "flex items-start gap-2", children: [
347
+ /* @__PURE__ */ e("span", { className: "text-blue-400 font-medium", children: "Contigs:" }),
348
+ /* @__PURE__ */ e("code", { className: "flex-1 text-blue-300 bg-gray-900/50 px-2 py-1 rounded font-mono", children: t.config.suggested_contigs })
349
+ ] }),
350
+ /* @__PURE__ */ e("p", { className: "text-gray-400 text-xs mt-2", children: "This suggestion is based on your PDB structure. You can use this value in RFdiffusion nodes connected to this input." })
351
+ ] })
352
+ ] })
353
+ ] })
354
+ ] });
355
+ case "rfdiffusion_node":
356
+ return /* @__PURE__ */ a("div", { className: "space-y-4", children: [
357
+ /* @__PURE__ */ a("div", { children: [
358
+ /* @__PURE__ */ e(w, { className: "text-xs font-medium text-gray-400 mb-2", children: "Method" }),
359
+ /* @__PURE__ */ a(
360
+ te,
361
+ {
362
+ value: ((g = t.config) == null ? void 0 : g.method) || "POST",
363
+ onValueChange: (l) => n("method", l),
364
+ children: [
365
+ /* @__PURE__ */ e(ae, { className: o, children: /* @__PURE__ */ e(se, {}) }),
366
+ /* @__PURE__ */ a(re, { children: [
367
+ /* @__PURE__ */ e(k, { value: "GET", children: "GET" }),
368
+ /* @__PURE__ */ e(k, { value: "POST", children: "POST" }),
369
+ /* @__PURE__ */ e(k, { value: "PUT", children: "PUT" }),
370
+ /* @__PURE__ */ e(k, { value: "PATCH", children: "PATCH" }),
371
+ /* @__PURE__ */ e(k, { value: "DELETE", children: "DELETE" })
372
+ ] })
373
+ ]
374
+ }
375
+ )
376
+ ] }),
377
+ /* @__PURE__ */ a("div", { children: [
378
+ /* @__PURE__ */ e(w, { className: "text-xs font-medium text-gray-400 mb-2", children: "URL" }),
379
+ /* @__PURE__ */ e(
380
+ S,
381
+ {
382
+ type: "text",
383
+ value: ((u = t.config) == null ? void 0 : u.url) || "/rfdiffusion/run",
384
+ onChange: (l) => n("url", l.target.value),
385
+ className: o,
386
+ placeholder: "/rfdiffusion/run"
387
+ }
388
+ ),
389
+ /* @__PURE__ */ e(qt, { children: /* @__PURE__ */ a(Rt, { children: [
390
+ /* @__PURE__ */ e(Ut, { asChild: !0, children: /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5 cursor-help", children: "API endpoint URL (relative or absolute)" }) }),
391
+ /* @__PURE__ */ e(Et, { children: /* @__PURE__ */ e("p", { children: "Enter the API endpoint URL. Can be relative (e.g., /api/endpoint) or absolute (e.g., https://api.example.com/endpoint)" }) })
392
+ ] }) })
393
+ ] }),
394
+ /* @__PURE__ */ a("div", { children: [
395
+ /* @__PURE__ */ e(w, { className: "text-xs font-medium text-gray-400 mb-2", children: "API Key" }),
396
+ /* @__PURE__ */ e(
397
+ S,
398
+ {
399
+ type: "password",
400
+ value: ((p = t.config) == null ? void 0 : p.api_key) || "",
401
+ onChange: (l) => n("api_key", l.target.value),
402
+ className: o,
403
+ placeholder: "Enter NVIDIA API key (optional)"
404
+ }
405
+ ),
406
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5", children: "Leave empty to use global API key from settings" })
407
+ ] }),
408
+ /* @__PURE__ */ a("div", { children: [
409
+ /* @__PURE__ */ e(w, { className: "text-xs font-medium text-gray-400 mb-2", children: "Design Mode" }),
410
+ /* @__PURE__ */ a(
411
+ te,
412
+ {
413
+ value: ((x = t.config) == null ? void 0 : x.design_mode) || "unconditional",
414
+ onValueChange: (l) => n("design_mode", l),
415
+ children: [
416
+ /* @__PURE__ */ e(ae, { className: o, children: /* @__PURE__ */ e(se, {}) }),
417
+ /* @__PURE__ */ a(re, { children: [
418
+ /* @__PURE__ */ e(k, { value: "unconditional", children: "Unconditional Design" }),
419
+ /* @__PURE__ */ e(k, { value: "motif_scaffolding", children: "Motif Scaffolding" }),
420
+ /* @__PURE__ */ e(k, { value: "partial_diffusion", children: "Partial Diffusion" })
421
+ ] })
422
+ ]
423
+ }
424
+ ),
425
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5", children: "Unconditional: new proteins | Motif: around structures | Partial: modify regions" })
426
+ ] }),
427
+ /* @__PURE__ */ a("div", { children: [
428
+ /* @__PURE__ */ e(w, { className: "text-xs font-medium text-gray-400 mb-2", children: "PDB ID (optional)" }),
429
+ /* @__PURE__ */ e(
430
+ S,
431
+ {
432
+ type: "text",
433
+ value: ((y = t.config) == null ? void 0 : y.pdb_id) || "",
434
+ onChange: (l) => n("pdb_id", l.target.value),
435
+ className: o,
436
+ placeholder: "e.g., 1R42"
437
+ }
438
+ ),
439
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5", children: "Optional PDB ID to use as template (4-character code)" })
440
+ ] }),
441
+ /* @__PURE__ */ a("div", { children: [
442
+ /* @__PURE__ */ e(w, { className: "text-xs font-medium text-gray-400 mb-2", children: "Contigs *" }),
443
+ /* @__PURE__ */ e(
444
+ S,
445
+ {
446
+ type: "text",
447
+ value: ((d = t.config) == null ? void 0 : d.contigs) || "A50-150",
448
+ onChange: (l) => n("contigs", l.target.value),
449
+ className: o,
450
+ placeholder: "A50-150"
451
+ }
452
+ ),
453
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5", children: 'Contig specification (e.g., "A50-150" or "A20-60/0 50-100")' })
454
+ ] }),
455
+ /* @__PURE__ */ a("div", { children: [
456
+ /* @__PURE__ */ e(w, { className: "text-xs font-medium text-gray-400 mb-2", children: "Hotspot Residues (optional)" }),
457
+ /* @__PURE__ */ e(
458
+ S,
459
+ {
460
+ type: "text",
461
+ value: ((C = t.config) == null ? void 0 : C.hotspot_res) || "",
462
+ onChange: (l) => n("hotspot_res", l.target.value),
463
+ className: o,
464
+ placeholder: "A50, A51, A52"
465
+ }
466
+ ),
467
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5", children: 'Comma-separated list of residues to preserve (e.g., "A50, A51, A52")' })
468
+ ] }),
469
+ /* @__PURE__ */ a("div", { children: [
470
+ /* @__PURE__ */ e(w, { className: "text-xs font-medium text-gray-400 mb-2", children: "Diffusion Steps" }),
471
+ /* @__PURE__ */ e(
472
+ S,
473
+ {
474
+ type: "number",
475
+ min: "1",
476
+ max: "100",
477
+ value: ((O = t.config) == null ? void 0 : O.diffusion_steps) || 15,
478
+ onChange: (l) => n("diffusion_steps", parseInt(l.target.value) || 15),
479
+ className: o
480
+ }
481
+ ),
482
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5", children: "Number of diffusion steps (1-100, higher = better quality but slower)" })
483
+ ] }),
484
+ /* @__PURE__ */ a("div", { children: [
485
+ /* @__PURE__ */ e(w, { className: "text-xs font-medium text-gray-400 mb-2", children: "Number of Designs" }),
486
+ /* @__PURE__ */ e(
487
+ S,
488
+ {
489
+ type: "number",
490
+ min: "1",
491
+ max: "10",
492
+ value: ((T = t.config) == null ? void 0 : T.num_designs) || 1,
493
+ onChange: (l) => n("num_designs", parseInt(l.target.value) || 1),
494
+ className: o
495
+ }
496
+ ),
497
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5", children: "Number of design variants to generate (1-10)" })
498
+ ] }),
499
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
500
+ /* @__PURE__ */ a("div", { children: [
501
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Send Query Parameters" }),
502
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500", children: "Include query parameters in the URL" })
503
+ ] }),
504
+ /* @__PURE__ */ a("label", { className: "relative inline-flex items-center cursor-pointer", children: [
505
+ /* @__PURE__ */ e(
506
+ "input",
507
+ {
508
+ type: "checkbox",
509
+ checked: ((P = t.config) == null ? void 0 : P.send_query_params) || !1,
510
+ onChange: (l) => n("send_query_params", l.target.checked),
511
+ className: "sr-only peer"
512
+ }
513
+ ),
514
+ /* @__PURE__ */ e("div", { className: "w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-purple-600" })
515
+ ] })
516
+ ] }),
517
+ ((U = t.config) == null ? void 0 : U.send_query_params) && /* @__PURE__ */ a("div", { children: [
518
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Query Parameters" }),
519
+ /* @__PURE__ */ e(
520
+ "textarea",
521
+ {
522
+ value: ((E = t.config) == null ? void 0 : E.query_params) || "{}",
523
+ onChange: (l) => n("query_params", l.target.value),
524
+ className: `${o} font-mono text-xs`,
525
+ rows: 3,
526
+ placeholder: '{"key": "value"}'
527
+ }
528
+ ),
529
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5", children: "JSON object with query parameters" })
530
+ ] }),
531
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
532
+ /* @__PURE__ */ a("div", { children: [
533
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Send Headers" }),
534
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500", children: "Include custom headers in the request" })
535
+ ] }),
536
+ /* @__PURE__ */ a("label", { className: "relative inline-flex items-center cursor-pointer", children: [
537
+ /* @__PURE__ */ e(
538
+ "input",
539
+ {
540
+ type: "checkbox",
541
+ checked: ((b = t.config) == null ? void 0 : b.send_headers) !== !1,
542
+ onChange: (l) => n("send_headers", l.target.checked),
543
+ className: "sr-only peer"
544
+ }
545
+ ),
546
+ /* @__PURE__ */ e("div", { className: "w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-purple-600" })
547
+ ] })
548
+ ] }),
549
+ ((N = t.config) == null ? void 0 : N.send_headers) !== !1 && /* @__PURE__ */ a("div", { children: [
550
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Custom Headers" }),
551
+ /* @__PURE__ */ e(
552
+ "textarea",
553
+ {
554
+ value: ((A = t.config) == null ? void 0 : A.custom_headers) || "{}",
555
+ onChange: (l) => n("custom_headers", l.target.value),
556
+ className: `${o} font-mono text-xs`,
557
+ rows: 3,
558
+ placeholder: '{"Content-Type": "application/json"}'
559
+ }
560
+ ),
561
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5", children: "JSON object with custom headers" })
562
+ ] }),
563
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
564
+ /* @__PURE__ */ a("div", { children: [
565
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Send Body" }),
566
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500", children: "Include request body" })
567
+ ] }),
568
+ /* @__PURE__ */ a("label", { className: "relative inline-flex items-center cursor-pointer", children: [
569
+ /* @__PURE__ */ e(
570
+ "input",
571
+ {
572
+ type: "checkbox",
573
+ checked: ((J = t.config) == null ? void 0 : J.send_body) !== !1,
574
+ onChange: (l) => n("send_body", l.target.checked),
575
+ className: "sr-only peer"
576
+ }
577
+ ),
578
+ /* @__PURE__ */ e("div", { className: "w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-purple-600" })
579
+ ] })
580
+ ] }),
581
+ ((H = t.config) == null ? void 0 : H.send_body) !== !1 && /* @__PURE__ */ a(D, { children: [
582
+ /* @__PURE__ */ a("div", { children: [
583
+ /* @__PURE__ */ e(w, { className: "text-xs font-medium text-gray-400 mb-2", children: "Body Content Type" }),
584
+ /* @__PURE__ */ a(
585
+ te,
586
+ {
587
+ value: ((Ce = t.config) == null ? void 0 : Ce.body_content_type) || "json",
588
+ onValueChange: (l) => n("body_content_type", l),
589
+ children: [
590
+ /* @__PURE__ */ e(ae, { className: o, children: /* @__PURE__ */ e(se, {}) }),
591
+ /* @__PURE__ */ a(re, { children: [
592
+ /* @__PURE__ */ e(k, { value: "json", children: "JSON" }),
593
+ /* @__PURE__ */ e(k, { value: "form-data", children: "Form Data" }),
594
+ /* @__PURE__ */ e(k, { value: "x-www-form-urlencoded", children: "Form URL Encoded" }),
595
+ /* @__PURE__ */ e(k, { value: "raw", children: "Raw" })
596
+ ] })
597
+ ]
598
+ }
599
+ )
600
+ ] }),
601
+ /* @__PURE__ */ a("div", { children: [
602
+ /* @__PURE__ */ e(w, { className: "text-xs font-medium text-gray-400 mb-2", children: "Specify Body" }),
603
+ /* @__PURE__ */ a(
604
+ te,
605
+ {
606
+ value: ((Se = t.config) == null ? void 0 : Se.body_specify) || "json",
607
+ onValueChange: (l) => n("body_specify", l),
608
+ children: [
609
+ /* @__PURE__ */ e(ae, { className: o, children: /* @__PURE__ */ e(se, {}) }),
610
+ /* @__PURE__ */ a(re, { children: [
611
+ /* @__PURE__ */ e(k, { value: "json", children: "Using JSON" }),
612
+ /* @__PURE__ */ e(k, { value: "expression", children: "Using Expression" }),
613
+ /* @__PURE__ */ e(k, { value: "fixed", children: "Fixed" })
614
+ ] })
615
+ ]
616
+ }
617
+ )
618
+ ] }),
619
+ /* @__PURE__ */ a("div", { children: [
620
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "JSON" }),
621
+ /* @__PURE__ */ e(
622
+ "textarea",
623
+ {
624
+ value: ((je = t.config) == null ? void 0 : je.body_json) || `{
625
+ "pdb_file": "{{input.target}}",
626
+ "contigs": "{{config.contigs}}",
627
+ "num_designs": "{{config.num_designs}}"
628
+ }`,
629
+ onChange: (l) => n("body_json", l.target.value),
630
+ className: `${o} font-mono text-xs`,
631
+ rows: 6,
632
+ placeholder: '{"pdb_file": "{{input.target}}", "contigs": "{{config.contigs}}"}'
633
+ }
634
+ ),
635
+ /* @__PURE__ */ a("p", { className: "text-xs text-gray-500 mt-1.5", children: [
636
+ "JSON body content (supports template variables like ",
637
+ "{{input.target}}",
638
+ ")"
639
+ ] })
640
+ ] })
641
+ ] }),
642
+ /* @__PURE__ */ a("div", { className: "border-t border-gray-700 pt-4 mt-4", children: [
643
+ /* @__PURE__ */ e("p", { className: "text-xs font-medium text-gray-400 mb-3", children: "Legacy Parameters" }),
644
+ /* @__PURE__ */ a("div", { children: [
645
+ /* @__PURE__ */ e(w, { className: "text-xs font-medium text-gray-400 mb-2", children: "Contigs" }),
646
+ /* @__PURE__ */ e(
647
+ S,
648
+ {
649
+ type: "text",
650
+ value: ((Oe = t.config) == null ? void 0 : Oe.contigs) || "50",
651
+ onChange: (l) => n("contigs", l.target.value),
652
+ className: o,
653
+ placeholder: "50"
654
+ }
655
+ ),
656
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5", children: 'Contig specification (e.g., "50" or "A1-50")' })
657
+ ] }),
658
+ /* @__PURE__ */ a("div", { className: "mt-4", children: [
659
+ /* @__PURE__ */ e(w, { className: "text-xs font-medium text-gray-400 mb-2", children: "Number of Designs" }),
660
+ /* @__PURE__ */ e(
661
+ S,
662
+ {
663
+ type: "number",
664
+ value: ((Te = t.config) == null ? void 0 : Te.num_designs) || 1,
665
+ onChange: (l) => n("num_designs", parseInt(l.target.value) || 1),
666
+ className: o,
667
+ min: "1",
668
+ max: "10"
669
+ }
670
+ )
671
+ ] })
672
+ ] })
673
+ ] });
674
+ case "proteinmpnn_node":
675
+ return /* @__PURE__ */ a("div", { className: "space-y-4", children: [
676
+ /* @__PURE__ */ a("div", { children: [
677
+ /* @__PURE__ */ e(w, { className: "text-xs font-medium text-gray-400 mb-2", children: "Number of Sequences" }),
678
+ /* @__PURE__ */ e(
679
+ S,
680
+ {
681
+ type: "number",
682
+ value: ((Pe = t.config) == null ? void 0 : Pe.num_sequences) || 8,
683
+ onChange: (l) => n("num_sequences", parseInt(l.target.value) || 8),
684
+ className: o,
685
+ min: "1",
686
+ max: "100"
687
+ }
688
+ )
689
+ ] }),
690
+ /* @__PURE__ */ a("div", { children: [
691
+ /* @__PURE__ */ e(w, { className: "text-xs font-medium text-gray-400 mb-2", children: "Temperature" }),
692
+ /* @__PURE__ */ e(
693
+ S,
694
+ {
695
+ type: "number",
696
+ step: "0.1",
697
+ value: ((Ae = t.config) == null ? void 0 : Ae.temperature) || 0.1,
698
+ onChange: (l) => n("temperature", parseFloat(l.target.value) || 0.1),
699
+ className: o,
700
+ min: "0.1",
701
+ max: "1.0"
702
+ }
703
+ )
704
+ ] })
705
+ ] });
706
+ case "alphafold_node":
707
+ return /* @__PURE__ */ a("div", { className: "space-y-4", children: [
708
+ /* @__PURE__ */ a("div", { children: [
709
+ /* @__PURE__ */ e(w, { className: "text-xs font-medium text-gray-400 mb-2", children: "Recycle Count" }),
710
+ /* @__PURE__ */ e(
711
+ S,
712
+ {
713
+ type: "number",
714
+ value: ((De = t.config) == null ? void 0 : De.recycle_count) || 3,
715
+ onChange: (l) => n("recycle_count", parseInt(l.target.value) || 3),
716
+ className: o,
717
+ min: "1",
718
+ max: "20"
719
+ }
720
+ )
721
+ ] }),
722
+ /* @__PURE__ */ a("div", { children: [
723
+ /* @__PURE__ */ e(w, { className: "text-xs font-medium text-gray-400 mb-2", children: "Number of Relax Steps" }),
724
+ /* @__PURE__ */ e(
725
+ S,
726
+ {
727
+ type: "number",
728
+ value: ((Fe = t.config) == null ? void 0 : Fe.num_relax) || 0,
729
+ onChange: (l) => n("num_relax", parseInt(l.target.value) || 0),
730
+ className: o,
731
+ min: "0",
732
+ max: "10"
733
+ }
734
+ )
735
+ ] })
736
+ ] });
737
+ case "message_input_node":
738
+ return /* @__PURE__ */ a("div", { className: "space-y-4", children: [
739
+ /* @__PURE__ */ a("div", { children: [
740
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Code" }),
741
+ /* @__PURE__ */ e(
742
+ "textarea",
743
+ {
744
+ value: ((qe = t.config) == null ? void 0 : qe.code) || "",
745
+ onChange: (l) => n("code", l.target.value),
746
+ className: `${o} font-mono text-xs`,
747
+ rows: 16,
748
+ placeholder: `// Access input data via 'input' object
749
+ // Access node config via 'config' object
750
+ // Access node metadata via 'node' object
751
+ // IMPORTANT: Return a value to see it in the OUTPUT panel
752
+ // console.log() outputs to browser console (F12), not the OUTPUT panel
753
+
754
+ const message = config.message || 'Hello from code execution!';
755
+ console.log('[Code Execution]', message); // This goes to browser console
756
+
757
+ // Return value to see it in OUTPUT panel
758
+ return {
759
+ message: message,
760
+ executedAt: new Date().toISOString(),
761
+ inputKeys: Object.keys(input),
762
+ configKeys: Object.keys(config)
763
+ };`
764
+ }
765
+ ),
766
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5", children: "JavaScript code to execute. Use 'input' for input data, 'config' for node config, and 'node' for node metadata. Return the result." }),
767
+ /* @__PURE__ */ e("div", { className: "mt-2 px-3 py-2 bg-yellow-900/20 border border-yellow-700/30 rounded-lg", children: /* @__PURE__ */ e("p", { className: "text-xs text-yellow-300", children: "💡 Type $ for a list of special vars/methods. Debug by using console.log() statements and viewing their output in the browser console." }) })
768
+ ] }),
769
+ /* @__PURE__ */ a("div", { children: [
770
+ /* @__PURE__ */ a("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: [
771
+ "Message ",
772
+ /* @__PURE__ */ e("span", { className: "text-gray-600", children: "(Optional)" })
773
+ ] }),
774
+ /* @__PURE__ */ e(
775
+ "input",
776
+ {
777
+ type: "text",
778
+ value: ((Re = t.config) == null ? void 0 : Re.message) || "",
779
+ onChange: (l) => n("message", l.target.value),
780
+ className: o,
781
+ placeholder: "Enter a message..."
782
+ }
783
+ ),
784
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5", children: "Optional message that can be accessed in code via config.message" })
785
+ ] })
786
+ ] });
787
+ case "http_request_node":
788
+ return /* @__PURE__ */ a("div", { className: "space-y-4", children: [
789
+ /* @__PURE__ */ a("div", { children: [
790
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Method" }),
791
+ /* @__PURE__ */ a(
792
+ "select",
793
+ {
794
+ value: ((Ue = t.config) == null ? void 0 : Ue.method) || "GET",
795
+ onChange: (l) => n("method", l.target.value),
796
+ className: o,
797
+ children: [
798
+ /* @__PURE__ */ e("option", { value: "GET", children: "GET" }),
799
+ /* @__PURE__ */ e("option", { value: "POST", children: "POST" }),
800
+ /* @__PURE__ */ e("option", { value: "PUT", children: "PUT" }),
801
+ /* @__PURE__ */ e("option", { value: "PATCH", children: "PATCH" }),
802
+ /* @__PURE__ */ e("option", { value: "DELETE", children: "DELETE" }),
803
+ /* @__PURE__ */ e("option", { value: "HEAD", children: "HEAD" }),
804
+ /* @__PURE__ */ e("option", { value: "OPTIONS", children: "OPTIONS" })
805
+ ]
806
+ }
807
+ )
808
+ ] }),
809
+ /* @__PURE__ */ a("div", { children: [
810
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "URL" }),
811
+ /* @__PURE__ */ e(
812
+ "input",
813
+ {
814
+ type: "text",
815
+ value: ((Ee = t.config) == null ? void 0 : Ee.url) || "https://jsonplaceholder.typicode.com/todos/1",
816
+ onChange: (l) => n("url", l.target.value),
817
+ className: o,
818
+ placeholder: "https://api.example.com/endpoint"
819
+ }
820
+ ),
821
+ /* @__PURE__ */ a("p", { className: "text-xs text-gray-500 mt-1.5", children: [
822
+ "Full URL for the HTTP request (supports template variables like ",
823
+ "{{input.field}}",
824
+ ")"
825
+ ] })
826
+ ] }),
827
+ /* @__PURE__ */ a("div", { children: [
828
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Authentication" }),
829
+ /* @__PURE__ */ a(
830
+ "select",
831
+ {
832
+ value: ((Ie = t.config) == null ? void 0 : Ie.authentication) || "none",
833
+ onChange: (l) => n("authentication", l.target.value),
834
+ className: o,
835
+ children: [
836
+ /* @__PURE__ */ e("option", { value: "none", children: "None" }),
837
+ /* @__PURE__ */ e("option", { value: "basic", children: "Basic Auth" }),
838
+ /* @__PURE__ */ e("option", { value: "bearer", children: "Bearer Token" }),
839
+ /* @__PURE__ */ e("option", { value: "custom", children: "Custom Header" })
840
+ ]
841
+ }
842
+ )
843
+ ] }),
844
+ ((Je = t.config) == null ? void 0 : Je.authentication) === "basic" && /* @__PURE__ */ a(D, { children: [
845
+ /* @__PURE__ */ a("div", { children: [
846
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Username" }),
847
+ /* @__PURE__ */ e(
848
+ "input",
849
+ {
850
+ type: "text",
851
+ value: ((He = t.config) == null ? void 0 : He.basic_auth_username) || "",
852
+ onChange: (l) => n("basic_auth_username", l.target.value),
853
+ className: o,
854
+ placeholder: "Username"
855
+ }
856
+ )
857
+ ] }),
858
+ /* @__PURE__ */ a("div", { children: [
859
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Password" }),
860
+ /* @__PURE__ */ e(
861
+ "input",
862
+ {
863
+ type: "password",
864
+ value: ((Be = t.config) == null ? void 0 : Be.basic_auth_password) || "",
865
+ onChange: (l) => n("basic_auth_password", l.target.value),
866
+ className: o,
867
+ placeholder: "Password"
868
+ }
869
+ )
870
+ ] })
871
+ ] }),
872
+ ((Me = t.config) == null ? void 0 : Me.authentication) === "bearer" && /* @__PURE__ */ a("div", { children: [
873
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Bearer Token" }),
874
+ /* @__PURE__ */ e(
875
+ "input",
876
+ {
877
+ type: "password",
878
+ value: (($e = t.config) == null ? void 0 : $e.bearer_token) || "",
879
+ onChange: (l) => n("bearer_token", l.target.value),
880
+ className: o,
881
+ placeholder: "Bearer token"
882
+ }
883
+ )
884
+ ] }),
885
+ ((Ke = t.config) == null ? void 0 : Ke.authentication) === "custom" && /* @__PURE__ */ a(D, { children: [
886
+ /* @__PURE__ */ a("div", { children: [
887
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Header Name" }),
888
+ /* @__PURE__ */ e(
889
+ "input",
890
+ {
891
+ type: "text",
892
+ value: ((Ve = t.config) == null ? void 0 : Ve.custom_auth_header_name) || "Authorization",
893
+ onChange: (l) => n("custom_auth_header_name", l.target.value),
894
+ className: o,
895
+ placeholder: "Header name"
896
+ }
897
+ )
898
+ ] }),
899
+ /* @__PURE__ */ a("div", { children: [
900
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Header Value" }),
901
+ /* @__PURE__ */ e(
902
+ "input",
903
+ {
904
+ type: "password",
905
+ value: ((ze = t.config) == null ? void 0 : ze.custom_auth_header_value) || "",
906
+ onChange: (l) => n("custom_auth_header_value", l.target.value),
907
+ className: o,
908
+ placeholder: "Header value"
909
+ }
910
+ )
911
+ ] })
912
+ ] }),
913
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
914
+ /* @__PURE__ */ a("div", { children: [
915
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Send Query Parameters" }),
916
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500", children: "Include query parameters in the URL" })
917
+ ] }),
918
+ /* @__PURE__ */ a("label", { className: "relative inline-flex items-center cursor-pointer", children: [
919
+ /* @__PURE__ */ e(
920
+ "input",
921
+ {
922
+ type: "checkbox",
923
+ checked: ((Ge = t.config) == null ? void 0 : Ge.send_query_params) || !1,
924
+ onChange: (l) => n("send_query_params", l.target.checked),
925
+ className: "sr-only peer"
926
+ }
927
+ ),
928
+ /* @__PURE__ */ e("div", { className: "w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600" })
929
+ ] })
930
+ ] }),
931
+ ((Qe = t.config) == null ? void 0 : Qe.send_query_params) && /* @__PURE__ */ a("div", { children: [
932
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Query Parameters" }),
933
+ /* @__PURE__ */ e(
934
+ "textarea",
935
+ {
936
+ value: ((Xe = t.config) == null ? void 0 : Xe.query_params) || "{}",
937
+ onChange: (l) => n("query_params", l.target.value),
938
+ className: `${o} font-mono text-xs`,
939
+ rows: 3,
940
+ placeholder: '{"key": "value", "page": 1}'
941
+ }
942
+ ),
943
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5", children: "JSON object with query parameters" })
944
+ ] }),
945
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
946
+ /* @__PURE__ */ a("div", { children: [
947
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Send Headers" }),
948
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500", children: "Include custom headers in the request" })
949
+ ] }),
950
+ /* @__PURE__ */ a("label", { className: "relative inline-flex items-center cursor-pointer", children: [
951
+ /* @__PURE__ */ e(
952
+ "input",
953
+ {
954
+ type: "checkbox",
955
+ checked: ((We = t.config) == null ? void 0 : We.send_headers) || !1,
956
+ onChange: (l) => n("send_headers", l.target.checked),
957
+ className: "sr-only peer"
958
+ }
959
+ ),
960
+ /* @__PURE__ */ e("div", { className: "w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600" })
961
+ ] })
962
+ ] }),
963
+ ((Ye = t.config) == null ? void 0 : Ye.send_headers) && /* @__PURE__ */ a("div", { children: [
964
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Custom Headers" }),
965
+ /* @__PURE__ */ e(
966
+ "textarea",
967
+ {
968
+ value: ((Ze = t.config) == null ? void 0 : Ze.custom_headers) || "{}",
969
+ onChange: (l) => n("custom_headers", l.target.value),
970
+ className: `${o} font-mono text-xs`,
971
+ rows: 3,
972
+ placeholder: '{"Content-Type": "application/json", "X-Custom-Header": "value"}'
973
+ }
974
+ ),
975
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5", children: "JSON object with custom headers" })
976
+ ] }),
977
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
978
+ /* @__PURE__ */ a("div", { children: [
979
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Send Body" }),
980
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500", children: "Include request body (only for POST, PUT, PATCH methods)" })
981
+ ] }),
982
+ /* @__PURE__ */ a("label", { className: "relative inline-flex items-center cursor-pointer", children: [
983
+ /* @__PURE__ */ e(
984
+ "input",
985
+ {
986
+ type: "checkbox",
987
+ checked: ((Le = t.config) == null ? void 0 : Le.send_body) || !1,
988
+ onChange: (l) => n("send_body", l.target.checked),
989
+ className: "sr-only peer"
990
+ }
991
+ ),
992
+ /* @__PURE__ */ e("div", { className: "w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600" })
993
+ ] })
994
+ ] }),
995
+ ((et = t.config) == null ? void 0 : et.send_body) && /* @__PURE__ */ a(D, { children: [
996
+ /* @__PURE__ */ a("div", { children: [
997
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Body Content Type" }),
998
+ /* @__PURE__ */ a(
999
+ "select",
1000
+ {
1001
+ value: ((tt = t.config) == null ? void 0 : tt.body_content_type) || "json",
1002
+ onChange: (l) => n("body_content_type", l.target.value),
1003
+ className: o,
1004
+ children: [
1005
+ /* @__PURE__ */ e("option", { value: "json", children: "JSON" }),
1006
+ /* @__PURE__ */ e("option", { value: "form-data", children: "Form Data" }),
1007
+ /* @__PURE__ */ e("option", { value: "x-www-form-urlencoded", children: "Form URL Encoded" }),
1008
+ /* @__PURE__ */ e("option", { value: "raw", children: "Raw" }),
1009
+ /* @__PURE__ */ e("option", { value: "text", children: "Text" }),
1010
+ /* @__PURE__ */ e("option", { value: "xml", children: "XML" })
1011
+ ]
1012
+ }
1013
+ )
1014
+ ] }),
1015
+ (((at = t.config) == null ? void 0 : at.body_content_type) === "json" || !((st = t.config) != null && st.body_content_type)) && /* @__PURE__ */ a("div", { children: [
1016
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Specify Body" }),
1017
+ /* @__PURE__ */ a(
1018
+ "select",
1019
+ {
1020
+ value: ((rt = t.config) == null ? void 0 : rt.body_specify) || "json",
1021
+ onChange: (l) => n("body_specify", l.target.value),
1022
+ className: o,
1023
+ children: [
1024
+ /* @__PURE__ */ e("option", { value: "json", children: "Using JSON" }),
1025
+ /* @__PURE__ */ e("option", { value: "expression", children: "Using Expression" }),
1026
+ /* @__PURE__ */ e("option", { value: "fixed", children: "Fixed" })
1027
+ ]
1028
+ }
1029
+ )
1030
+ ] }),
1031
+ (((lt = t.config) == null ? void 0 : lt.body_content_type) === "json" || !((nt = t.config) != null && nt.body_content_type)) && /* @__PURE__ */ a("div", { children: [
1032
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "JSON" }),
1033
+ /* @__PURE__ */ e(
1034
+ "textarea",
1035
+ {
1036
+ value: ((it = t.config) == null ? void 0 : it.body_json) || "",
1037
+ onChange: (l) => n("body_json", l.target.value),
1038
+ className: `${o} font-mono text-xs`,
1039
+ rows: 6,
1040
+ placeholder: '{"key": "value"} or use template variables like {{input.field}}'
1041
+ }
1042
+ ),
1043
+ /* @__PURE__ */ a("p", { className: "text-xs text-gray-500 mt-1.5", children: [
1044
+ "JSON body content (supports template variables like ",
1045
+ "{{input.field}}",
1046
+ ")"
1047
+ ] })
1048
+ ] }),
1049
+ (((ot = t.config) == null ? void 0 : ot.body_content_type) === "raw" || ((ct = t.config) == null ? void 0 : ct.body_content_type) === "text" || ((dt = t.config) == null ? void 0 : dt.body_content_type) === "xml") && /* @__PURE__ */ a("div", { children: [
1050
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Raw Body" }),
1051
+ /* @__PURE__ */ e(
1052
+ "textarea",
1053
+ {
1054
+ value: ((ut = t.config) == null ? void 0 : ut.body_raw) || "",
1055
+ onChange: (l) => n("body_raw", l.target.value),
1056
+ className: `${o} font-mono text-xs`,
1057
+ rows: 6,
1058
+ placeholder: "Raw body content"
1059
+ }
1060
+ ),
1061
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5", children: "Raw body content (for raw, text, or XML content types)" })
1062
+ ] })
1063
+ ] }),
1064
+ /* @__PURE__ */ a("div", { className: "border-t border-gray-700 pt-4 mt-4", children: [
1065
+ /* @__PURE__ */ e("p", { className: "text-xs font-medium text-gray-400 mb-3", children: "Options" }),
1066
+ /* @__PURE__ */ a("div", { children: [
1067
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Timeout (ms)" }),
1068
+ /* @__PURE__ */ e(
1069
+ "input",
1070
+ {
1071
+ type: "number",
1072
+ value: ((mt = t.config) == null ? void 0 : mt.options_timeout) || 3e4,
1073
+ onChange: (l) => n("options_timeout", parseInt(l.target.value) || 3e4),
1074
+ className: o,
1075
+ min: "1000",
1076
+ max: "300000"
1077
+ }
1078
+ ),
1079
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5", children: "Request timeout in milliseconds (default: 30000)" })
1080
+ ] }),
1081
+ /* @__PURE__ */ a("div", { className: "mt-4 flex items-center justify-between", children: [
1082
+ /* @__PURE__ */ a("div", { children: [
1083
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Follow Redirects" }),
1084
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500", children: "Automatically follow HTTP redirects" })
1085
+ ] }),
1086
+ /* @__PURE__ */ a("label", { className: "relative inline-flex items-center cursor-pointer", children: [
1087
+ /* @__PURE__ */ e(
1088
+ "input",
1089
+ {
1090
+ type: "checkbox",
1091
+ checked: ((ft = t.config) == null ? void 0 : ft.options_follow_redirects) !== !1,
1092
+ onChange: (l) => n("options_follow_redirects", l.target.checked),
1093
+ className: "sr-only peer"
1094
+ }
1095
+ ),
1096
+ /* @__PURE__ */ e("div", { className: "w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600" })
1097
+ ] })
1098
+ ] }),
1099
+ /* @__PURE__ */ a("div", { className: "mt-4 flex items-center justify-between", children: [
1100
+ /* @__PURE__ */ a("div", { children: [
1101
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Ignore SSL Errors" }),
1102
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500", children: "Ignore SSL certificate errors (not recommended for production)" })
1103
+ ] }),
1104
+ /* @__PURE__ */ a("label", { className: "relative inline-flex items-center cursor-pointer", children: [
1105
+ /* @__PURE__ */ e(
1106
+ "input",
1107
+ {
1108
+ type: "checkbox",
1109
+ checked: ((ht = t.config) == null ? void 0 : ht.options_ignore_ssl_errors) || !1,
1110
+ onChange: (l) => n("options_ignore_ssl_errors", l.target.checked),
1111
+ className: "sr-only peer"
1112
+ }
1113
+ ),
1114
+ /* @__PURE__ */ e("div", { className: "w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600" })
1115
+ ] })
1116
+ ] })
1117
+ ] }),
1118
+ /* @__PURE__ */ e("div", { className: "mt-4 px-3 py-2 bg-amber-900/20 border border-amber-700/30 rounded-lg", children: /* @__PURE__ */ e("p", { className: "text-xs text-amber-300", children: "You can view the raw requests this node makes in your browser's developer console." }) })
1119
+ ] });
1120
+ default:
1121
+ return /* @__PURE__ */ e("div", { className: "text-sm text-gray-400", children: "No configuration available" });
1122
+ }
1123
+ };
1124
+ return /* @__PURE__ */ a("div", { className: "h-full flex flex-col bg-[#1e1e32]", children: [
1125
+ /* @__PURE__ */ a("div", { className: "px-4 py-3 border-b border-gray-700/50 bg-gray-800/30 flex items-center justify-between", children: [
1126
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
1127
+ B && /* @__PURE__ */ e(
1128
+ le,
1129
+ {
1130
+ variant: "ghost",
1131
+ size: "icon",
1132
+ onClick: B,
1133
+ className: "text-gray-400 hover:text-gray-200",
1134
+ children: /* @__PURE__ */ e(kt, { className: "w-4 h-4" })
1135
+ }
1136
+ ),
1137
+ /* @__PURE__ */ a("div", { children: [
1138
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-gray-200", children: t.label }),
1139
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500", children: t.type })
1140
+ ] })
1141
+ ] }),
1142
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
1143
+ /* @__PURE__ */ a(
1144
+ le,
1145
+ {
1146
+ onClick: ie,
1147
+ size: "sm",
1148
+ className: "bg-orange-600 hover:bg-orange-500 text-white",
1149
+ children: [
1150
+ /* @__PURE__ */ e(Ct, { className: "w-3.5 h-3.5 mr-1.5" }),
1151
+ "Execute step"
1152
+ ]
1153
+ }
1154
+ ),
1155
+ B && /* @__PURE__ */ e(
1156
+ le,
1157
+ {
1158
+ variant: "ghost",
1159
+ size: "icon",
1160
+ onClick: B,
1161
+ className: "text-gray-400 hover:text-gray-200",
1162
+ title: "Close panel",
1163
+ children: /* @__PURE__ */ e(oe, { className: "w-4 h-4" })
1164
+ }
1165
+ )
1166
+ ] })
1167
+ ] }),
1168
+ /* @__PURE__ */ a("div", { className: "px-4 border-b border-gray-700/50 flex items-center gap-1", children: [
1169
+ /* @__PURE__ */ a(
1170
+ "button",
1171
+ {
1172
+ onClick: () => V("parameters"),
1173
+ className: `px-3 py-2 text-xs font-medium transition-colors relative ${v === "parameters" ? "text-gray-200" : "text-gray-500 hover:text-gray-300"}`,
1174
+ children: [
1175
+ "Parameters",
1176
+ v === "parameters" && /* @__PURE__ */ e("div", { className: "absolute bottom-0 left-0 right-0 h-0.5 bg-red-500" })
1177
+ ]
1178
+ }
1179
+ ),
1180
+ /* @__PURE__ */ a(
1181
+ "button",
1182
+ {
1183
+ onClick: () => V("settings"),
1184
+ className: `px-3 py-2 text-xs font-medium transition-colors relative ${v === "settings" ? "text-gray-200" : "text-gray-500 hover:text-gray-300"}`,
1185
+ children: [
1186
+ "Settings",
1187
+ v === "settings" && /* @__PURE__ */ e("div", { className: "absolute bottom-0 left-0 right-0 h-0.5 bg-red-500" })
1188
+ ]
1189
+ }
1190
+ ),
1191
+ /* @__PURE__ */ a(
1192
+ "button",
1193
+ {
1194
+ onClick: () => V("output"),
1195
+ className: `px-3 py-2 text-xs font-medium transition-colors relative ${v === "output" ? "text-gray-200" : "text-gray-500 hover:text-gray-300"}`,
1196
+ children: [
1197
+ "Output",
1198
+ v === "output" && /* @__PURE__ */ e("div", { className: "absolute bottom-0 left-0 right-0 h-0.5 bg-red-500" })
1199
+ ]
1200
+ }
1201
+ ),
1202
+ /* @__PURE__ */ e(
1203
+ "a",
1204
+ {
1205
+ href: "#",
1206
+ className: "ml-auto text-xs text-gray-500 hover:text-gray-400 transition-colors",
1207
+ children: "Docs"
1208
+ }
1209
+ )
1210
+ ] }),
1211
+ /* @__PURE__ */ a("div", { className: "flex-1 flex min-h-0", children: [
1212
+ /* @__PURE__ */ a("div", { className: "w-[25%] min-w-[200px] max-w-[300px] border-r border-gray-700/50 bg-[#1a1a2e] flex flex-col flex-shrink-0", children: [
1213
+ /* @__PURE__ */ e("div", { className: "px-4 py-3 border-b border-gray-700/50 bg-[#1e1e32]", children: /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-gray-200", children: "INPUT" }) }),
1214
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto p-4", children: ce && _ ? /* @__PURE__ */ a("div", { className: "space-y-3", children: [
1215
+ _.type === "pdb_file" && /* @__PURE__ */ a(D, { children: [
1216
+ _.filename && /* @__PURE__ */ a("div", { children: [
1217
+ /* @__PURE__ */ e("div", { className: "text-xs font-medium text-gray-400 mb-1", children: "File" }),
1218
+ /* @__PURE__ */ e("div", { className: "text-xs text-gray-300 bg-gray-800/50 px-2 py-1 rounded", children: _.filename })
1219
+ ] }),
1220
+ _.chains && Array.isArray(_.chains) && /* @__PURE__ */ a("div", { children: [
1221
+ /* @__PURE__ */ e("div", { className: "text-xs font-medium text-gray-400 mb-1", children: "Chains" }),
1222
+ /* @__PURE__ */ e("div", { className: "text-xs text-gray-300 bg-gray-800/50 px-2 py-1 rounded", children: _.chains.join(", ") })
1223
+ ] }),
1224
+ _.total_residues && /* @__PURE__ */ a("div", { children: [
1225
+ /* @__PURE__ */ e("div", { className: "text-xs font-medium text-gray-400 mb-1", children: "Total Residues" }),
1226
+ /* @__PURE__ */ e("div", { className: "text-xs text-gray-300 bg-gray-800/50 px-2 py-1 rounded", children: _.total_residues })
1227
+ ] }),
1228
+ _.suggested_contigs && /* @__PURE__ */ a("div", { children: [
1229
+ /* @__PURE__ */ e("div", { className: "text-xs font-medium text-gray-400 mb-1", children: "Suggested Contigs" }),
1230
+ /* @__PURE__ */ e("div", { className: "text-xs text-blue-300 bg-blue-900/20 border border-blue-700/30 px-2 py-1 rounded font-mono", children: _.suggested_contigs })
1231
+ ] }),
1232
+ L && /* @__PURE__ */ a("div", { className: "pt-2 border-t border-gray-700/30", children: [
1233
+ /* @__PURE__ */ e("div", { className: "text-xs font-medium text-gray-400 mb-1", children: "From Node" }),
1234
+ /* @__PURE__ */ e("div", { className: "text-xs text-gray-300", children: L.label })
1235
+ ] })
1236
+ ] }),
1237
+ _.type === "sequence" && /* @__PURE__ */ a("div", { children: [
1238
+ /* @__PURE__ */ e("div", { className: "text-xs font-medium text-gray-400 mb-1", children: "Sequence" }),
1239
+ /* @__PURE__ */ a("div", { className: "text-xs text-gray-300 bg-gray-800/50 px-2 py-1 rounded font-mono break-all", children: [
1240
+ (fe = _.sequence) == null ? void 0 : fe.substring(0, 100),
1241
+ ((he = _.sequence) == null ? void 0 : he.length) > 100 ? "..." : ""
1242
+ ] })
1243
+ ] }),
1244
+ (!_.type || _.type === "any" || (t == null ? void 0 : t.type) === "message_input_node") && /* @__PURE__ */ a("div", { className: "space-y-2", children: [
1245
+ /* @__PURE__ */ e("div", { className: "text-xs font-medium text-gray-400 mb-2", children: "Input Data" }),
1246
+ /* @__PURE__ */ e("pre", { className: "text-xs text-gray-300 bg-gray-800/50 px-3 py-2 rounded font-mono overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(_, null, 2) }),
1247
+ L && /* @__PURE__ */ a("div", { className: "pt-2 border-t border-gray-700/30", children: [
1248
+ /* @__PURE__ */ e("div", { className: "text-xs font-medium text-gray-400 mb-1", children: "From Node" }),
1249
+ /* @__PURE__ */ e("div", { className: "text-xs text-gray-300", children: L.label })
1250
+ ] })
1251
+ ] })
1252
+ ] }) : /* @__PURE__ */ e("div", { className: "h-full flex items-center justify-center", children: /* @__PURE__ */ a("div", { className: "text-center", children: [
1253
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mb-2", children: "No input data yet" }),
1254
+ ce && /* @__PURE__ */ a(D, { children: [
1255
+ /* @__PURE__ */ e(
1256
+ "button",
1257
+ {
1258
+ onClick: ie,
1259
+ className: "text-xs text-gray-400 hover:text-gray-300 transition-colors",
1260
+ title: "Execute previous nodes",
1261
+ children: "Execute previous nodes"
1262
+ }
1263
+ ),
1264
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-600 mt-1", children: "(From the earliest node that needs it ?)" })
1265
+ ] })
1266
+ ] }) }) })
1267
+ ] }),
1268
+ /* @__PURE__ */ e("div", { className: "flex-1 border-r border-gray-700/50 overflow-y-auto bg-[#1e1e32]", children: /* @__PURE__ */ e("div", { className: "p-4 space-y-4", children: v === "parameters" ? /* @__PURE__ */ e(D, { children: Nt() }) : v === "output" ? /* @__PURE__ */ e("div", { className: "space-y-4", children: s ? /* @__PURE__ */ a(D, { children: [
1269
+ /* @__PURE__ */ a("div", { className: "border border-gray-700/50 rounded-lg p-3 bg-gray-800/30", children: [
1270
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-between mb-2", children: [
1271
+ /* @__PURE__ */ e("span", { className: "text-xs font-medium text-gray-400", children: "Status" }),
1272
+ /* @__PURE__ */ e("span", { className: `text-xs font-semibold ${s.status === "success" || s.status === "completed" ? "text-green-400" : s.status === "error" ? "text-red-400" : s.status === "running" ? "text-blue-400" : "text-gray-400"}`, children: s.status.toUpperCase() })
1273
+ ] }),
1274
+ s.duration !== void 0 && /* @__PURE__ */ a("div", { className: "flex items-center justify-between mt-2", children: [
1275
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-500", children: "Duration" }),
1276
+ /* @__PURE__ */ a("span", { className: "text-xs text-gray-300 font-mono", children: [
1277
+ s.duration,
1278
+ "ms"
1279
+ ] })
1280
+ ] })
1281
+ ] }),
1282
+ s.request && /* @__PURE__ */ a("div", { className: "border border-gray-700/50 rounded-lg overflow-hidden", children: [
1283
+ /* @__PURE__ */ e("div", { className: "px-3 py-2 bg-gray-800/30 border-b border-gray-700/50", children: /* @__PURE__ */ e("span", { className: "text-xs font-medium text-gray-300", children: "Request" }) }),
1284
+ /* @__PURE__ */ a("div", { className: "p-3 space-y-2", children: [
1285
+ s.request.method && s.request.url && /* @__PURE__ */ a("div", { children: [
1286
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-500", children: "Method & URL" }),
1287
+ /* @__PURE__ */ a("div", { className: "mt-1 text-xs font-mono text-gray-300 bg-gray-900/50 px-2 py-1 rounded", children: [
1288
+ s.request.method,
1289
+ " ",
1290
+ s.request.url
1291
+ ] })
1292
+ ] }),
1293
+ s.request.headers && Object.keys(s.request.headers).length > 0 && /* @__PURE__ */ a("div", { children: [
1294
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-500", children: "Headers" }),
1295
+ /* @__PURE__ */ e("pre", { className: "mt-1 text-xs font-mono text-gray-300 bg-gray-900/50 px-2 py-1 rounded overflow-x-auto", children: JSON.stringify(s.request.headers, null, 2) })
1296
+ ] }),
1297
+ s.request.queryParams && Object.keys(s.request.queryParams).length > 0 && /* @__PURE__ */ a("div", { children: [
1298
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-500", children: "Query Parameters" }),
1299
+ /* @__PURE__ */ e("pre", { className: "mt-1 text-xs font-mono text-gray-300 bg-gray-900/50 px-2 py-1 rounded overflow-x-auto", children: JSON.stringify(s.request.queryParams, null, 2) })
1300
+ ] }),
1301
+ s.request.body && /* @__PURE__ */ a("div", { children: [
1302
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-500", children: "Body" }),
1303
+ /* @__PURE__ */ e("pre", { className: "mt-1 text-xs font-mono text-gray-300 bg-gray-900/50 px-2 py-1 rounded overflow-x-auto max-h-48 overflow-y-auto", children: JSON.stringify(s.request.body, null, 2) })
1304
+ ] })
1305
+ ] })
1306
+ ] }),
1307
+ s.response && /* @__PURE__ */ a("div", { className: "border border-gray-700/50 rounded-lg overflow-hidden", children: [
1308
+ /* @__PURE__ */ e("div", { className: "px-3 py-2 bg-gray-800/30 border-b border-gray-700/50", children: /* @__PURE__ */ e("span", { className: "text-xs font-medium text-gray-300", children: "Response" }) }),
1309
+ /* @__PURE__ */ a("div", { className: "p-3 space-y-2", children: [
1310
+ s.response.status && /* @__PURE__ */ a("div", { children: [
1311
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-500", children: "Status" }),
1312
+ /* @__PURE__ */ a("div", { className: `mt-1 text-xs font-mono px-2 py-1 rounded ${s.response.status >= 200 && s.response.status < 300 ? "text-green-400 bg-green-900/20" : "text-red-400 bg-red-900/20"}`, children: [
1313
+ s.response.status,
1314
+ " ",
1315
+ s.response.statusText || ""
1316
+ ] })
1317
+ ] }),
1318
+ s.response.headers && Object.keys(s.response.headers).length > 0 && /* @__PURE__ */ a("div", { children: [
1319
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-500", children: "Headers" }),
1320
+ /* @__PURE__ */ e("pre", { className: "mt-1 text-xs font-mono text-gray-300 bg-gray-900/50 px-2 py-1 rounded overflow-x-auto", children: JSON.stringify(s.response.headers, null, 2) })
1321
+ ] }),
1322
+ s.response.data && /* @__PURE__ */ a("div", { children: [
1323
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-500", children: "Data" }),
1324
+ /* @__PURE__ */ e("pre", { className: "mt-1 text-xs font-mono text-gray-300 bg-gray-900/50 px-2 py-1 rounded overflow-x-auto max-h-64 overflow-y-auto", children: JSON.stringify(s.response.data, null, 2) })
1325
+ ] })
1326
+ ] })
1327
+ ] }),
1328
+ s.output && /* @__PURE__ */ a("div", { className: "border border-gray-700/50 rounded-lg overflow-hidden", children: [
1329
+ /* @__PURE__ */ e("div", { className: "px-3 py-2 bg-gray-800/30 border-b border-gray-700/50", children: /* @__PURE__ */ e("span", { className: "text-xs font-medium text-gray-300", children: "Output" }) }),
1330
+ /* @__PURE__ */ e("div", { className: "p-3", children: /* @__PURE__ */ e("pre", { className: "text-xs font-mono text-gray-300 bg-gray-900/50 px-2 py-1 rounded overflow-x-auto max-h-64 overflow-y-auto", children: JSON.stringify(s.output, null, 2) }) })
1331
+ ] }),
1332
+ s.error && /* @__PURE__ */ a("div", { className: "border border-red-700/50 rounded-lg overflow-hidden bg-red-900/10", children: [
1333
+ /* @__PURE__ */ e("div", { className: "px-3 py-2 bg-red-800/30 border-b border-red-700/50", children: /* @__PURE__ */ e("span", { className: "text-xs font-medium text-red-300", children: "Error" }) }),
1334
+ /* @__PURE__ */ e("div", { className: "p-3", children: /* @__PURE__ */ e("pre", { className: "text-xs font-mono text-red-300 whitespace-pre-wrap", children: s.error }) })
1335
+ ] })
1336
+ ] }) : /* @__PURE__ */ e("div", { className: "h-full flex items-center justify-center py-12", children: /* @__PURE__ */ a("div", { className: "text-center", children: [
1337
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mb-2", children: "No execution logs yet" }),
1338
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-600", children: "Execute the node to see request/response details" })
1339
+ ] }) }) }) : /* @__PURE__ */ a("div", { className: "space-y-4", children: [
1340
+ /* @__PURE__ */ a("div", { children: [
1341
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Node ID" }),
1342
+ /* @__PURE__ */ e(
1343
+ "input",
1344
+ {
1345
+ type: "text",
1346
+ value: t.id,
1347
+ disabled: !0,
1348
+ className: o + " opacity-50 cursor-not-allowed"
1349
+ }
1350
+ )
1351
+ ] }),
1352
+ /* @__PURE__ */ a("div", { children: [
1353
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Node Type" }),
1354
+ /* @__PURE__ */ e(
1355
+ "input",
1356
+ {
1357
+ type: "text",
1358
+ value: t.type,
1359
+ disabled: !0,
1360
+ className: o + " opacity-50 cursor-not-allowed"
1361
+ }
1362
+ )
1363
+ ] }),
1364
+ /* @__PURE__ */ a("div", { className: "border-t border-gray-700/50 pt-4 space-y-4", children: [
1365
+ /* @__PURE__ */ e("p", { className: "text-xs font-medium text-gray-400 mb-3", children: "Execution Settings" }),
1366
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
1367
+ /* @__PURE__ */ a("div", { children: [
1368
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-1", children: "Always Output Data" }),
1369
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500", children: "Always produce output even if empty" })
1370
+ ] }),
1371
+ /* @__PURE__ */ a("label", { className: "relative inline-flex items-center cursor-pointer", children: [
1372
+ /* @__PURE__ */ e(
1373
+ "input",
1374
+ {
1375
+ type: "checkbox",
1376
+ checked: ((pe = t.config) == null ? void 0 : pe.always_output_data) || !1,
1377
+ onChange: (r) => n("always_output_data", r.target.checked),
1378
+ className: "sr-only peer"
1379
+ }
1380
+ ),
1381
+ /* @__PURE__ */ e("div", { className: "w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-purple-600" })
1382
+ ] })
1383
+ ] }),
1384
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
1385
+ /* @__PURE__ */ a("div", { children: [
1386
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-1", children: "Execute Once" }),
1387
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500", children: "Execute this node only once per workflow run" })
1388
+ ] }),
1389
+ /* @__PURE__ */ a("label", { className: "relative inline-flex items-center cursor-pointer", children: [
1390
+ /* @__PURE__ */ e(
1391
+ "input",
1392
+ {
1393
+ type: "checkbox",
1394
+ checked: ((ge = t.config) == null ? void 0 : ge.execute_once) || !1,
1395
+ onChange: (r) => n("execute_once", r.target.checked),
1396
+ className: "sr-only peer"
1397
+ }
1398
+ ),
1399
+ /* @__PURE__ */ e("div", { className: "w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-purple-600" })
1400
+ ] })
1401
+ ] }),
1402
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
1403
+ /* @__PURE__ */ a("div", { children: [
1404
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-1", children: "Retry On Fail" }),
1405
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500", children: "Automatically retry if execution fails" })
1406
+ ] }),
1407
+ /* @__PURE__ */ a("label", { className: "relative inline-flex items-center cursor-pointer", children: [
1408
+ /* @__PURE__ */ e(
1409
+ "input",
1410
+ {
1411
+ type: "checkbox",
1412
+ checked: ((xe = t.config) == null ? void 0 : xe.retry_on_fail) || !1,
1413
+ onChange: (r) => n("retry_on_fail", r.target.checked),
1414
+ className: "sr-only peer"
1415
+ }
1416
+ ),
1417
+ /* @__PURE__ */ e("div", { className: "w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-purple-600" })
1418
+ ] })
1419
+ ] }),
1420
+ /* @__PURE__ */ a("div", { children: [
1421
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "On Error" }),
1422
+ /* @__PURE__ */ a(
1423
+ "select",
1424
+ {
1425
+ value: ((ye = t.config) == null ? void 0 : ye.on_error) || "stop_workflow",
1426
+ onChange: (r) => n("on_error", r.target.value),
1427
+ className: o,
1428
+ children: [
1429
+ /* @__PURE__ */ e("option", { value: "stop_workflow", children: "Stop Workflow" }),
1430
+ /* @__PURE__ */ e("option", { value: "continue_workflow", children: "Continue Workflow" }),
1431
+ /* @__PURE__ */ e("option", { value: "retry", children: "Retry" }),
1432
+ /* @__PURE__ */ e("option", { value: "skip_node", children: "Skip Node" })
1433
+ ]
1434
+ }
1435
+ ),
1436
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5", children: "Action to take when this node encounters an error" })
1437
+ ] })
1438
+ ] }),
1439
+ /* @__PURE__ */ a("div", { className: "border-t border-gray-700/50 pt-4 space-y-4", children: [
1440
+ /* @__PURE__ */ e("p", { className: "text-xs font-medium text-gray-400 mb-3", children: "Notes" }),
1441
+ /* @__PURE__ */ a("div", { children: [
1442
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-2", children: "Notes" }),
1443
+ /* @__PURE__ */ e(
1444
+ "textarea",
1445
+ {
1446
+ value: ((be = t.config) == null ? void 0 : be.notes) || "",
1447
+ onChange: (r) => n("notes", r.target.value),
1448
+ className: `${o} resize-y`,
1449
+ rows: 4,
1450
+ placeholder: "Add notes about this node..."
1451
+ }
1452
+ ),
1453
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 mt-1.5", children: "Add notes or documentation for this node" })
1454
+ ] }),
1455
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
1456
+ /* @__PURE__ */ a("div", { children: [
1457
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-400 mb-1", children: "Display Note in Flow?" }),
1458
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-500", children: "Show notes on the node in the canvas" })
1459
+ ] }),
1460
+ /* @__PURE__ */ a("label", { className: "relative inline-flex items-center cursor-pointer", children: [
1461
+ /* @__PURE__ */ e(
1462
+ "input",
1463
+ {
1464
+ type: "checkbox",
1465
+ checked: ((Ne = t.config) == null ? void 0 : Ne.display_note_in_flow) || !1,
1466
+ onChange: (r) => n("display_note_in_flow", r.target.checked),
1467
+ className: "sr-only peer"
1468
+ }
1469
+ ),
1470
+ /* @__PURE__ */ e("div", { className: "w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-purple-600" })
1471
+ ] })
1472
+ ] })
1473
+ ] }),
1474
+ /* @__PURE__ */ e("div", { className: "border-t border-gray-700/50 pt-4", children: /* @__PURE__ */ a(
1475
+ "button",
1476
+ {
1477
+ onClick: ne,
1478
+ className: "w-full px-3 py-2 text-sm bg-red-600/20 text-red-400 border border-red-600/30 rounded-lg hover:bg-red-600/30 flex items-center justify-center gap-2 transition-colors",
1479
+ children: [
1480
+ /* @__PURE__ */ e(St, { className: "w-4 h-4" }),
1481
+ "Delete Node"
1482
+ ]
1483
+ }
1484
+ ) })
1485
+ ] }) }) }),
1486
+ /* @__PURE__ */ a("div", { className: "w-[30%] min-w-[250px] max-w-[400px] bg-[#1a1a2e] flex flex-col flex-shrink-0", children: [
1487
+ /* @__PURE__ */ e("div", { className: "px-4 py-3 border-b border-gray-700/50 bg-[#1e1e32] flex items-center justify-between", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
1488
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-gray-200", children: "OUTPUT" }),
1489
+ s && (s.status === "success" || s.status === "completed") && /* @__PURE__ */ a(D, { children: [
1490
+ /* @__PURE__ */ e("div", { className: "w-4 h-4 rounded-full bg-green-500 flex items-center justify-center", children: /* @__PURE__ */ e(jt, { className: "w-3 h-3 text-white" }) }),
1491
+ /* @__PURE__ */ e(Ot, { className: "w-4 h-4 text-gray-400" })
1492
+ ] }),
1493
+ s && s.status === "error" && /* @__PURE__ */ e(pt, { className: "w-4 h-4 text-yellow-400" })
1494
+ ] }) }),
1495
+ (s || (t == null ? void 0 : t.type) === "input_node" && (((ve = t.config) == null ? void 0 : ve.filename) || ((_e = t.result_metadata) == null ? void 0 : _e.file_info) || ((we = t.result_metadata) == null ? void 0 : we.data))) && /* @__PURE__ */ a("div", { className: "flex border-b border-gray-700/50 bg-[#1e1e32]", children: [
1496
+ /* @__PURE__ */ e(
1497
+ "button",
1498
+ {
1499
+ onClick: () => q("table"),
1500
+ className: `px-4 py-2 text-xs font-medium transition-colors ${F === "table" ? "text-gray-200 border-b-2 border-gray-200" : "text-gray-500 hover:text-gray-300"}`,
1501
+ children: "Table"
1502
+ }
1503
+ ),
1504
+ /* @__PURE__ */ e(
1505
+ "button",
1506
+ {
1507
+ onClick: () => q("json"),
1508
+ className: `px-4 py-2 text-xs font-medium transition-colors ${F === "json" ? "text-gray-200 border-b-2 border-gray-200" : "text-gray-500 hover:text-gray-300"}`,
1509
+ children: "JSON"
1510
+ }
1511
+ ),
1512
+ /* @__PURE__ */ e(
1513
+ "button",
1514
+ {
1515
+ onClick: () => q("schema"),
1516
+ className: `px-4 py-2 text-xs font-medium transition-colors ${F === "schema" ? "text-gray-200 border-b-2 border-gray-200" : "text-gray-500 hover:text-gray-300"}`,
1517
+ children: "Schema"
1518
+ }
1519
+ )
1520
+ ] }),
1521
+ /* @__PURE__ */ a("div", { className: "flex-1 overflow-y-auto p-4", children: [
1522
+ t.type === "rfdiffusion_node" && !s && /* @__PURE__ */ a("div", { className: "mb-4 bg-gray-800/50 border border-gray-700/50 rounded-lg p-3 flex items-start gap-2", children: [
1523
+ /* @__PURE__ */ e("div", { className: "w-4 h-4 rounded-full bg-blue-500/20 flex items-center justify-center flex-shrink-0 mt-0.5", children: /* @__PURE__ */ e("span", { className: "text-blue-400 text-xs font-bold", children: "i" }) }),
1524
+ /* @__PURE__ */ e("p", { className: "text-xs text-gray-400 leading-relaxed", children: "Use the suggested contigs from the input node for optimal results. The contigs parameter specifies which regions of the structure to design." })
1525
+ ] }),
1526
+ (() => {
1527
+ var f, h, g, u, p, x, y, d, C, O, T, P, U, E;
1528
+ const r = (t == null ? void 0 : t.type) === "input_node" && (((f = t.config) == null ? void 0 : f.filename) || ((h = t.config) == null ? void 0 : h.file_id) || ((g = t.result_metadata) == null ? void 0 : g.file_info) || ((u = t.result_metadata) == null ? void 0 : u.data)), c = s || r;
1529
+ return (t == null ? void 0 : t.type) === "input_node" && console.log("[PipelineNodeConfig] Output section render check:", {
1530
+ nodeId: m,
1531
+ shouldShowOutput: !!c,
1532
+ hasNodeLog: !!s,
1533
+ hasConfig: !!t.config,
1534
+ configObject: t.config,
1535
+ configKeys: t.config ? Object.keys(t.config) : null,
1536
+ hasConfigFilename: !!((p = t.config) != null && p.filename),
1537
+ configFilename: (x = t.config) == null ? void 0 : x.filename,
1538
+ hasConfigFileId: !!((y = t.config) != null && y.file_id),
1539
+ configFileId: (d = t.config) == null ? void 0 : d.file_id,
1540
+ hasResultMetadataFileInfo: !!((C = t.result_metadata) != null && C.file_info),
1541
+ hasResultMetadataData: !!((O = t.result_metadata) != null && O.data),
1542
+ hasFileData: !!r,
1543
+ conditionBreakdown: {
1544
+ isInputNode: (t == null ? void 0 : t.type) === "input_node",
1545
+ hasFilename: !!((T = t.config) != null && T.filename),
1546
+ hasFileId: !!((P = t.config) != null && P.file_id),
1547
+ hasFileInfo: !!((U = t.result_metadata) != null && U.file_info),
1548
+ hasResultData: !!((E = t.result_metadata) != null && E.data)
1549
+ }
1550
+ }), !!c;
1551
+ })() ? /* @__PURE__ */ e("div", { className: "space-y-4", children: (() => {
1552
+ var f, h, g, u, p, x, y, d, C, O, T, P, U, E;
1553
+ let r = null, c = 0;
1554
+ return (t == null ? void 0 : t.type) === "input_node" && console.log("[PipelineNodeConfig] Starting output data extraction for input node:", {
1555
+ nodeId: m,
1556
+ hasNodeLog: !!s,
1557
+ hasConfig: !!t.config
1558
+ }), (t == null ? void 0 : t.type) === "http_request_node" && console.log("[PipelineNodeConfig] Extracting output for HTTP request:", {
1559
+ nodeId: m,
1560
+ hasNodeLog: !!s,
1561
+ hasError: !!(s != null && s.error),
1562
+ hasOutput: !!(s != null && s.output),
1563
+ hasResponse: !!(s != null && s.response),
1564
+ responseData: (f = s == null ? void 0 : s.response) == null ? void 0 : f.data,
1565
+ outputType: typeof (s == null ? void 0 : s.output),
1566
+ outputKeys: s != null && s.output && typeof (s == null ? void 0 : s.output) == "object" ? Object.keys(s.output) : null
1567
+ }), (t == null ? void 0 : t.type) === "input_node" ? ((h = t.result_metadata) != null && h.file_info ? r = t.result_metadata.file_info : (g = t.result_metadata) != null && g.data ? r = t.result_metadata.data : (u = s == null ? void 0 : s.output) != null && u.data ? r = s.output.data : s != null && s.output ? r = s.output : ((p = t.config) != null && p.filename || (x = t.config) != null && x.file_id) && (r = {
1568
+ type: "pdb_file",
1569
+ filename: t.config.filename || "Unknown",
1570
+ file_id: t.config.file_id,
1571
+ file_url: t.config.file_url,
1572
+ chains: t.config.chains,
1573
+ total_residues: t.config.total_residues,
1574
+ suggested_contigs: t.config.suggested_contigs,
1575
+ chain_residue_counts: t.config.chain_residue_counts,
1576
+ atoms: t.config.atoms
1577
+ }), console.log("[PipelineNodeConfig] Input node output data extraction:", {
1578
+ nodeId: m,
1579
+ hasNodeLog: !!s,
1580
+ hasResultMetadata: !!t.result_metadata,
1581
+ hasFileInfo: !!((y = t.result_metadata) != null && y.file_info),
1582
+ hasResultData: !!((d = t.result_metadata) != null && d.data),
1583
+ hasConfigFilename: !!((C = t.config) != null && C.filename),
1584
+ configKeys: t.config ? Object.keys(t.config) : null,
1585
+ outputData: r,
1586
+ outputDataType: typeof r,
1587
+ outputDataKeys: r && typeof r == "object" ? Object.keys(r) : null
1588
+ }), r != null && (Array.isArray(r) ? c = r.length : typeof r == "object" ? c = Object.keys(r).length > 0 ? 1 : 0 : c = 1)) : s && (s != null && s.error ? (r = {
1589
+ error: s.error,
1590
+ status: s.status,
1591
+ ...s.response && { response: s.response }
1592
+ }, c = 1) : ((O = s == null ? void 0 : s.response) == null ? void 0 : O.data) !== void 0 && ((T = s == null ? void 0 : s.response) == null ? void 0 : T.data) !== null ? r = s.response.data : (s == null ? void 0 : s.output) !== void 0 && (s == null ? void 0 : s.output) !== null && (typeof s.output == "object" && "data" in s.output && s.output.data !== void 0 ? r = s.output.data : r = s.output), r != null && (Array.isArray(r) ? c = r.length : typeof r == "object" ? c = Object.keys(r).length > 0 ? 1 : 0 : c = 1)), (t == null ? void 0 : t.type) === "http_request_node" && console.log("[PipelineNodeConfig] Extracted output data:", {
1593
+ nodeId: m,
1594
+ hasNodeLog: !!s,
1595
+ nodeLogKeys: s ? Object.keys(s) : null,
1596
+ hasResponse: !!(s != null && s.response),
1597
+ responseKeys: s != null && s.response ? Object.keys(s.response) : null,
1598
+ responseData: (P = s == null ? void 0 : s.response) == null ? void 0 : P.data,
1599
+ hasOutput: !!(s != null && s.output),
1600
+ outputValue: s == null ? void 0 : s.output,
1601
+ hasOutputData: r != null,
1602
+ outputDataType: typeof r,
1603
+ outputDataKeys: r && typeof r == "object" ? Object.keys(r) : null,
1604
+ outputDataValue: r,
1605
+ itemCount: c
1606
+ }), /* @__PURE__ */ a(D, { children: [
1607
+ c > 0 && /* @__PURE__ */ a("div", { className: "text-xs text-gray-500", children: [
1608
+ c,
1609
+ " ",
1610
+ c === 1 ? "item" : "items"
1611
+ ] }),
1612
+ /* @__PURE__ */ a("div", { className: "relative", children: [
1613
+ r && /* @__PURE__ */ a("div", { className: "absolute top-2 right-2 flex items-center gap-2 z-10", children: [
1614
+ /* @__PURE__ */ e(
1615
+ "button",
1616
+ {
1617
+ onClick: () => {
1618
+ const b = JSON.stringify(r, null, 2);
1619
+ navigator.clipboard.writeText(b);
1620
+ },
1621
+ className: "p-1.5 hover:bg-gray-700/50 rounded transition-colors",
1622
+ title: "Copy output",
1623
+ children: /* @__PURE__ */ e(Tt, { className: "w-4 h-4 text-gray-400" })
1624
+ }
1625
+ ),
1626
+ /* @__PURE__ */ e(
1627
+ "button",
1628
+ {
1629
+ className: "p-1.5 hover:bg-gray-700/50 rounded transition-colors",
1630
+ title: "Search",
1631
+ children: /* @__PURE__ */ e(Pt, { className: "w-4 h-4 text-gray-400" })
1632
+ }
1633
+ )
1634
+ ] }),
1635
+ F === "json" && /* @__PURE__ */ e("div", { className: `rounded-lg p-4 text-xs font-mono overflow-x-auto border min-h-[200px] ${r != null && r.error ? "bg-red-900/20 border-red-700/50 text-red-300" : "bg-gray-900/50 border-gray-700/30 text-gray-300"}`, children: /* @__PURE__ */ e("pre", { className: "whitespace-pre-wrap", children: r != null ? JSON.stringify(r, null, 2) : /* @__PURE__ */ a("span", { className: "text-gray-500 italic", children: [
1636
+ "No output data available",
1637
+ (t == null ? void 0 : t.type) === "input_node" && /* @__PURE__ */ a("div", { className: "mt-2 text-xs space-y-1", children: [
1638
+ /* @__PURE__ */ a("div", { children: [
1639
+ "Debug: nodeLog exists: ",
1640
+ s ? "yes" : "no"
1641
+ ] }),
1642
+ /* @__PURE__ */ a("div", { children: [
1643
+ "hasConfig: ",
1644
+ t.config ? "yes" : "no"
1645
+ ] }),
1646
+ /* @__PURE__ */ a("div", { children: [
1647
+ "hasFilename: ",
1648
+ (U = t.config) != null && U.filename ? "yes" : "no"
1649
+ ] }),
1650
+ /* @__PURE__ */ a("div", { children: [
1651
+ "filename: ",
1652
+ ((E = t.config) == null ? void 0 : E.filename) || "none"
1653
+ ] }),
1654
+ /* @__PURE__ */ a("div", { children: [
1655
+ "hasResultMetadata: ",
1656
+ t.result_metadata ? "yes" : "no"
1657
+ ] }),
1658
+ /* @__PURE__ */ a("div", { children: [
1659
+ "configKeys: ",
1660
+ t.config ? Object.keys(t.config).join(", ") : "none"
1661
+ ] })
1662
+ ] }),
1663
+ (t == null ? void 0 : t.type) === "http_request_node" && /* @__PURE__ */ a("div", { className: "mt-2 text-xs", children: [
1664
+ "Debug: nodeLog exists: ",
1665
+ s ? "yes" : "no",
1666
+ ", hasResponse: ",
1667
+ s != null && s.response ? "yes" : "no",
1668
+ ", hasOutput: ",
1669
+ s != null && s.output ? "yes" : "no"
1670
+ ] })
1671
+ ] }) }) }),
1672
+ F === "table" && /* @__PURE__ */ e("div", { className: "bg-gray-900/50 rounded-lg p-4 border border-gray-700/30 min-h-[200px]", children: (t == null ? void 0 : t.type) === "input_node" && r && typeof r == "object" && r.type === "pdb_file" ? /* @__PURE__ */ a("div", { className: "space-y-4", children: [
1673
+ /* @__PURE__ */ a("div", { className: "space-y-3", children: [
1674
+ /* @__PURE__ */ e("h4", { className: "text-sm font-semibold text-gray-200 border-b border-gray-700 pb-2", children: "File Information" }),
1675
+ /* @__PURE__ */ a("div", { className: "grid grid-cols-2 gap-3", children: [
1676
+ /* @__PURE__ */ a("div", { children: [
1677
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-500", children: "Filename:" }),
1678
+ /* @__PURE__ */ e("div", { className: "text-xs text-gray-300 mt-1 font-mono", children: r.filename || "N/A" })
1679
+ ] }),
1680
+ /* @__PURE__ */ a("div", { children: [
1681
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-500", children: "File ID:" }),
1682
+ /* @__PURE__ */ e("div", { className: "text-xs text-gray-300 mt-1 font-mono", children: r.file_id || "N/A" })
1683
+ ] }),
1684
+ r.file_url && /* @__PURE__ */ a("div", { className: "col-span-2", children: [
1685
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-500", children: "File URL:" }),
1686
+ /* @__PURE__ */ e("div", { className: "text-xs text-gray-300 mt-1 font-mono break-all", children: r.file_url })
1687
+ ] })
1688
+ ] })
1689
+ ] }),
1690
+ (r.chains || r.total_residues || r.atoms) && /* @__PURE__ */ a("div", { className: "space-y-3 pt-3 border-t border-gray-700", children: [
1691
+ /* @__PURE__ */ e("h4", { className: "text-sm font-semibold text-gray-200 border-b border-gray-700 pb-2", children: "Structure Information" }),
1692
+ /* @__PURE__ */ a("div", { className: "grid grid-cols-2 gap-3", children: [
1693
+ r.atoms && /* @__PURE__ */ a("div", { children: [
1694
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-500", children: "Atoms:" }),
1695
+ /* @__PURE__ */ e("div", { className: "text-xs text-gray-300 mt-1", children: r.atoms.toLocaleString() })
1696
+ ] }),
1697
+ r.total_residues && /* @__PURE__ */ a("div", { children: [
1698
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-500", children: "Total Residues:" }),
1699
+ /* @__PURE__ */ e("div", { className: "text-xs text-gray-300 mt-1", children: r.total_residues.toLocaleString() })
1700
+ ] }),
1701
+ r.chains && Array.isArray(r.chains) && /* @__PURE__ */ a("div", { className: "col-span-2", children: [
1702
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-500", children: "Chains:" }),
1703
+ /* @__PURE__ */ a("div", { className: "text-xs text-gray-300 mt-1", children: [
1704
+ r.chains.join(", "),
1705
+ " (",
1706
+ r.chains.length,
1707
+ " chain",
1708
+ r.chains.length !== 1 ? "s" : "",
1709
+ ")"
1710
+ ] })
1711
+ ] })
1712
+ ] })
1713
+ ] }),
1714
+ r.chain_residue_counts && typeof r.chain_residue_counts == "object" && Object.keys(r.chain_residue_counts).length > 0 && /* @__PURE__ */ a("div", { className: "space-y-3 pt-3 border-t border-gray-700", children: [
1715
+ /* @__PURE__ */ e("h4", { className: "text-sm font-semibold text-gray-200 border-b border-gray-700 pb-2", children: "Chain Residue Counts" }),
1716
+ /* @__PURE__ */ e("div", { className: "space-y-2", children: Object.entries(r.chain_residue_counts).map(([b, N]) => /* @__PURE__ */ a("div", { className: "flex items-center justify-between text-xs", children: [
1717
+ /* @__PURE__ */ a("span", { className: "text-gray-500", children: [
1718
+ "Chain ",
1719
+ b,
1720
+ ":"
1721
+ ] }),
1722
+ /* @__PURE__ */ a("span", { className: "text-gray-300 font-medium", children: [
1723
+ N,
1724
+ " residues"
1725
+ ] })
1726
+ ] }, b)) })
1727
+ ] }),
1728
+ r.suggested_contigs && /* @__PURE__ */ a("div", { className: "space-y-3 pt-3 border-t border-gray-700", children: [
1729
+ /* @__PURE__ */ e("h4", { className: "text-sm font-semibold text-gray-200 border-b border-gray-700 pb-2", children: "RFdiffusion Suggestions" }),
1730
+ /* @__PURE__ */ a("div", { className: "bg-blue-500/10 border border-blue-500/30 rounded-lg p-3", children: [
1731
+ /* @__PURE__ */ e("div", { className: "text-xs text-gray-500 mb-1", children: "Suggested Contigs:" }),
1732
+ /* @__PURE__ */ e("div", { className: "text-xs text-blue-300 font-mono", children: r.suggested_contigs }),
1733
+ /* @__PURE__ */ e("div", { className: "text-xs text-gray-500 mt-2 italic", children: "Use this value in RFdiffusion nodes for optimal design results." })
1734
+ ] })
1735
+ ] })
1736
+ ] }) : r && typeof r == "object" && !Array.isArray(r) ? /* @__PURE__ */ e("div", { className: "space-y-2", children: Object.entries(r).map(([b, N]) => /* @__PURE__ */ a("div", { className: "flex items-start gap-2 text-xs", children: [
1737
+ /* @__PURE__ */ a("span", { className: "text-gray-500 font-medium min-w-[120px]", children: [
1738
+ b,
1739
+ ":"
1740
+ ] }),
1741
+ /* @__PURE__ */ e("span", { className: "text-gray-300 flex-1", children: typeof N == "object" ? JSON.stringify(N, null, 2) : String(N) })
1742
+ ] }, b)) }) : Array.isArray(r) ? /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ a("table", { className: "w-full text-xs", children: [
1743
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { className: "border-b border-gray-700", children: r.length > 0 && Object.keys(r[0]).map((b) => /* @__PURE__ */ e("th", { className: "text-left py-2 px-2 text-gray-400 font-medium", children: b }, b)) }) }),
1744
+ /* @__PURE__ */ e("tbody", { children: r.map((b, N) => /* @__PURE__ */ e("tr", { className: "border-b border-gray-800", children: Object.values(b).map((A, J) => /* @__PURE__ */ e("td", { className: "py-2 px-2 text-gray-300", children: typeof A == "object" ? JSON.stringify(A) : String(A) }, J)) }, N)) })
1745
+ ] }) }) : /* @__PURE__ */ e("div", { className: "text-xs text-gray-500 italic", children: "Table view not available for this data type" }) }),
1746
+ F === "schema" && /* @__PURE__ */ e("div", { className: "bg-gray-900/50 rounded-lg p-4 border border-gray-700/30 min-h-[200px]", children: r && typeof r == "object" ? /* @__PURE__ */ e("div", { className: "text-xs font-mono text-gray-300", children: /* @__PURE__ */ e("pre", { className: "whitespace-pre-wrap", children: JSON.stringify(
1747
+ (() => {
1748
+ const b = (N) => {
1749
+ if (Array.isArray(N) && N.length > 0)
1750
+ return [b(N[0])];
1751
+ if (typeof N == "object" && N !== null) {
1752
+ const A = {};
1753
+ for (const [J, H] of Object.entries(N))
1754
+ typeof H == "object" && H !== null ? A[J] = b(H) : A[J] = typeof H;
1755
+ return A;
1756
+ }
1757
+ return typeof N;
1758
+ };
1759
+ return b(r);
1760
+ })(),
1761
+ null,
1762
+ 2
1763
+ ) }) }) : /* @__PURE__ */ e("div", { className: "text-xs text-gray-500 italic", children: "Schema view not available for this data type" }) })
1764
+ ] })
1765
+ ] });
1766
+ })() }) : /* @__PURE__ */ e("div", { className: "h-full flex items-center justify-center", children: /* @__PURE__ */ a("div", { className: "text-center space-y-3", children: [
1767
+ /* @__PURE__ */ e("p", { className: "text-sm text-gray-500 mb-1", children: "Execute this node to view data" }),
1768
+ /* @__PURE__ */ a("div", { className: "text-xs text-gray-600 mt-2 p-2 bg-gray-800/50 rounded", children: [
1769
+ "Debug: hasCurrentExecution=",
1770
+ i ? "yes" : "no",
1771
+ ", logsCount=",
1772
+ ((ke = i == null ? void 0 : i.logs) == null ? void 0 : ke.length) || 0,
1773
+ ", hasNodeLog=",
1774
+ s ? "yes" : "no",
1775
+ ", nodeId=",
1776
+ m,
1777
+ ", nodeType=",
1778
+ t == null ? void 0 : t.type,
1779
+ ", isExecuting=",
1780
+ z.getState().isExecuting
1781
+ ] }),
1782
+ /* @__PURE__ */ e(
1783
+ "button",
1784
+ {
1785
+ onClick: ie,
1786
+ className: "text-xs text-red-400 hover:text-red-300 transition-colors",
1787
+ children: "or set mock data"
1788
+ }
1789
+ ),
1790
+ (t == null ? void 0 : t.type) === "message_input_node" && /* @__PURE__ */ a("div", { className: "mt-4 px-3 py-2 bg-blue-900/20 border border-blue-700/30 rounded-lg text-left max-w-xs", children: [
1791
+ /* @__PURE__ */ e("p", { className: "text-xs text-blue-300 font-medium mb-1", children: "💡 Tip:" }),
1792
+ /* @__PURE__ */ a("p", { className: "text-xs text-gray-400 leading-relaxed", children: [
1793
+ /* @__PURE__ */ e("code", { className: "text-blue-300", children: "console.log()" }),
1794
+ " outputs to the browser console (F12). To see output here, ",
1795
+ /* @__PURE__ */ e("code", { className: "text-blue-300", children: "return" }),
1796
+ " a value from your code."
1797
+ ] })
1798
+ ] })
1799
+ ] }) })
1800
+ ] })
1801
+ ] })
1802
+ ] })
1803
+ ] });
1804
+ };
1805
+ export {
1806
+ Wt as PipelineNodeConfig
1807
+ };
1808
+ //# sourceMappingURL=PipelineNodeConfig.mjs.map