@pstdio/ui 0.39.0 → 0.41.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 (82) hide show
  1. package/dist/{MermaidComponent-81jr28u4.js → MermaidComponent-BCiI63_G.js} +3 -3
  2. package/dist/{MermaidComponent-81jr28u4.js.map → MermaidComponent-BCiI63_G.js.map} +1 -1
  3. package/dist/chat-question-bubble-w2vMbFsS.js +68 -0
  4. package/dist/chat-question-bubble-w2vMbFsS.js.map +1 -0
  5. package/dist/chat-ui.d.ts +94 -17
  6. package/dist/chat-ui.js +2240 -1476
  7. package/dist/chat-ui.js.map +1 -1
  8. package/dist/{data-table-stats-row-CpRe_xK2.js → data-table-stats-row-EiTEONdY.js} +2 -2
  9. package/dist/{data-table-stats-row-CpRe_xK2.js.map → data-table-stats-row-EiTEONdY.js.map} +1 -1
  10. package/dist/data-table.d.ts +27 -7
  11. package/dist/data-table.js +1035 -872
  12. package/dist/data-table.js.map +1 -1
  13. package/dist/diff-bubble-DewUd_2w.js +61 -0
  14. package/dist/diff-bubble-DewUd_2w.js.map +1 -0
  15. package/dist/{diff-drawer-45rpk3aq.js → diff-drawer-BwZBOObe.js} +106 -85
  16. package/dist/diff-drawer-BwZBOObe.js.map +1 -0
  17. package/dist/diff-viewer-kOOd7C7h.js +574 -0
  18. package/dist/diff-viewer-kOOd7C7h.js.map +1 -0
  19. package/dist/diff.d.ts +11 -0
  20. package/dist/diff.js +107 -98
  21. package/dist/diff.js.map +1 -1
  22. package/dist/display-sort-control-DPxc0e5z.js +587 -0
  23. package/dist/display-sort-control-DPxc0e5z.js.map +1 -0
  24. package/dist/{workspace-badge-Brm3Xr3m.d.ts → host-storage-DP0RLj4i.d.ts} +15 -1
  25. package/dist/{index-BfFLdci8.d.ts → index-C9mywhyX.d.ts} +49 -13
  26. package/dist/index-D3UJyWWh.d.ts +501 -0
  27. package/dist/index.d.ts +38 -13
  28. package/dist/index.js +941 -908
  29. package/dist/index.js.map +1 -1
  30. package/dist/kanban-renderer.d.ts +2 -326
  31. package/dist/kanban-renderer.js +991 -610
  32. package/dist/kanban-renderer.js.map +1 -1
  33. package/dist/list-row-DM0DiIrN.js +1167 -0
  34. package/dist/list-row-DM0DiIrN.js.map +1 -0
  35. package/dist/{mermaid-renderer-DImi0fDp.js → mermaid-renderer-0PmNkOXI.js} +29 -29
  36. package/dist/mermaid-renderer-0PmNkOXI.js.map +1 -0
  37. package/dist/mermaid.js +1 -1
  38. package/dist/param-editor.js +2 -3
  39. package/dist/prism-JVIsQMoJ.js +1029 -0
  40. package/dist/prism-JVIsQMoJ.js.map +1 -0
  41. package/dist/{resource-badge-95WPVlZf.d.ts → resource-badge-nOWPqxFU.d.ts} +1 -0
  42. package/dist/rich-text-DM24VNQZ.js +10447 -0
  43. package/dist/rich-text-DM24VNQZ.js.map +1 -0
  44. package/dist/rich-text.d.ts +2 -2
  45. package/dist/rich-text.js +2 -2
  46. package/dist/style.css +1 -1
  47. package/dist/terminal.d.ts +5 -63
  48. package/dist/terminal.js +102 -122
  49. package/dist/terminal.js.map +1 -1
  50. package/dist/{theme-BsOWAIi2.js → theme-at0rtSnX.js} +441 -246
  51. package/dist/theme-at0rtSnX.js.map +1 -0
  52. package/dist/theme-kKuLN2jb.js +80 -0
  53. package/dist/theme-kKuLN2jb.js.map +1 -0
  54. package/dist/theme-preference-BV4cbJNB.js +115 -0
  55. package/dist/theme-preference-BV4cbJNB.js.map +1 -0
  56. package/dist/theme.js +3 -2
  57. package/dist/{tree-list-WhISG-cz.js → tree-list-Cqgl8mnN.js} +400 -377
  58. package/dist/tree-list-Cqgl8mnN.js.map +1 -0
  59. package/package.json +4 -4
  60. package/dist/diff-bubble-DZsarmSG.js +0 -61
  61. package/dist/diff-bubble-DZsarmSG.js.map +0 -1
  62. package/dist/diff-drawer-45rpk3aq.js.map +0 -1
  63. package/dist/diff-viewer-DJ1B5hxL.js +0 -558
  64. package/dist/diff-viewer-DJ1B5hxL.js.map +0 -1
  65. package/dist/list-row-uqD-q4gv.js +0 -1018
  66. package/dist/list-row-uqD-q4gv.js.map +0 -1
  67. package/dist/mermaid-renderer-DImi0fDp.js.map +0 -1
  68. package/dist/param-editor-BQd4AOUP.js +0 -225
  69. package/dist/param-editor-BQd4AOUP.js.map +0 -1
  70. package/dist/param-editor-field-BJ_rLUnV.js +0 -2385
  71. package/dist/param-editor-field-BJ_rLUnV.js.map +0 -1
  72. package/dist/prism-BStPsJSB.js +0 -658
  73. package/dist/prism-BStPsJSB.js.map +0 -1
  74. package/dist/rich-text-VYAmEigU.js +0 -6979
  75. package/dist/rich-text-VYAmEigU.js.map +0 -1
  76. package/dist/slider-hwHYe98I.js +0 -423
  77. package/dist/slider-hwHYe98I.js.map +0 -1
  78. package/dist/theme-BsOWAIi2.js.map +0 -1
  79. package/dist/theme-preference-pzfuK5cH.js +0 -101
  80. package/dist/theme-preference-pzfuK5cH.js.map +0 -1
  81. package/dist/tree-list-WhISG-cz.js.map +0 -1
  82. package/dist/types-DWA3enV6.d.ts +0 -182
@@ -1,2385 +0,0 @@
1
- import { n as e, r as t } from "./prism-BStPsJSB.js";
2
- import { n } from "./scroll-area-Cr1lNXAr.js";
3
- import { i as r, r as i, t as a } from "./list-row-uqD-q4gv.js";
4
- import { n as o, o as s, s as c, t as l } from "./slider-hwHYe98I.js";
5
- import { _ as u, p as d, v as f } from "./rich-text-VYAmEigU.js";
6
- import { Badge as p, Box as m, Button as h, ColorPicker as g, Flex as _, Grid as v, Group as y, HStack as b, Icon as x, IconButton as S, Image as C, Input as w, Menu as T, Popover as E, Portal as D, Spinner as O, Stack as k, Text as A, Textarea as j, Wrap as M, parseColor as N } from "@chakra-ui/react";
7
- import { c as P } from "react/compiler-runtime";
8
- import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
9
- import { useEffect as R, useRef as z, useState as B } from "react";
10
- import { Check as V, ChevronDown as H, CircleAlert as U, CircleCheck as W, Clock3 as G, Info as K, Paperclip as q, Plus as J, Square as ee, SquareCheck as Y } from "lucide-react";
11
- //#region src/components/param-editor/param-editor-label.tsx
12
- var X = (e) => {
13
- let t = P(11), { name: r, description: i, compact: a } = e, o = a !== void 0 && a, s = o ? "label/XS/medium" : "label/S/medium", c = o ? "0.08em" : void 0, l = o ? "uppercase" : void 0, u;
14
- t[0] !== r || t[1] !== s || t[2] !== c || t[3] !== l ? (u = /* @__PURE__ */ I(A, {
15
- textStyle: s,
16
- color: "fg.muted",
17
- letterSpacing: c,
18
- textTransform: l,
19
- truncate: !0,
20
- children: r
21
- }), t[0] = r, t[1] = s, t[2] = c, t[3] = l, t[4] = u) : u = t[4];
22
- let d;
23
- t[5] !== i || t[6] !== r ? (d = i ? /* @__PURE__ */ I(n, {
24
- content: i,
25
- portalled: !1,
26
- positioning: {
27
- placement: "bottom-start",
28
- strategy: "fixed",
29
- hideWhenDetached: !0
30
- },
31
- children: /* @__PURE__ */ I(x, {
32
- asChild: !0,
33
- role: "img",
34
- "aria-label": `About ${r}`,
35
- "aria-hidden": !1,
36
- focusable: "true",
37
- tabIndex: 0,
38
- boxSize: "3",
39
- color: "fg.muted",
40
- flexShrink: 0,
41
- children: /* @__PURE__ */ I(K, {})
42
- })
43
- }) : null, t[5] = i, t[6] = r, t[7] = d) : d = t[7];
44
- let f;
45
- return t[8] !== u || t[9] !== d ? (f = /* @__PURE__ */ L(b, {
46
- gap: "1",
47
- alignItems: "center",
48
- minW: "0",
49
- children: [u, d]
50
- }), t[8] = u, t[9] = d, t[10] = f) : f = t[10], f;
51
- }, Z = (e) => {
52
- let t = P(17), { name: n, description: r, hideLabel: i, fullWidth: a, orientation: o, labelTrailing: s, children: c } = e, l = i !== void 0 && i, u = a !== void 0 && a, d = o === void 0 ? "auto" : o, f;
53
- t[0] !== r || t[1] !== l || t[2] !== n ? (f = l || !n ? null : /* @__PURE__ */ I(X, {
54
- name: n,
55
- description: r
56
- }), t[0] = r, t[1] = l, t[2] = n, t[3] = f) : f = t[3];
57
- let p = f;
58
- if ((d === "auto" ? u ? "stacked" : "inline" : d) === "stacked") {
59
- let e = p || s, n;
60
- t[4] !== e || t[5] !== p || t[6] !== s ? (n = e ? /* @__PURE__ */ L(_, {
61
- alignItems: "center",
62
- justifyContent: "space-between",
63
- gap: "xs",
64
- mb: "xs",
65
- minW: "0",
66
- children: [p, s]
67
- }) : null, t[4] = e, t[5] = p, t[6] = s, t[7] = n) : n = t[7];
68
- let r;
69
- return t[8] !== c || t[9] !== n ? (r = /* @__PURE__ */ L(m, {
70
- minW: "0",
71
- children: [n, c]
72
- }), t[8] = c, t[9] = n, t[10] = r) : r = t[10], r;
73
- }
74
- let h;
75
- t[11] !== c || t[12] !== s ? (h = /* @__PURE__ */ L(_, {
76
- alignItems: "center",
77
- gap: "xs",
78
- minW: "0",
79
- children: [s, c]
80
- }), t[11] = c, t[12] = s, t[13] = h) : h = t[13];
81
- let g;
82
- return t[14] !== p || t[15] !== h ? (g = /* @__PURE__ */ L(_, {
83
- alignItems: "center",
84
- justifyContent: "space-between",
85
- minHeight: "2rem",
86
- gap: "xs",
87
- minW: "0",
88
- children: [p, h]
89
- }), t[14] = p, t[15] = h, t[16] = g) : g = t[16], g;
90
- }, Q = (e) => {
91
- let t = P(8), n, r, i;
92
- t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({children: r, preserveWhitespace: i, ...n} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
93
- let a = i !== void 0 && i ? "pre-wrap" : void 0, o;
94
- return t[4] !== n || t[5] !== r || t[6] !== a ? (o = /* @__PURE__ */ I(m, {
95
- minW: "0",
96
- textStyle: "label/S/regular",
97
- whiteSpace: a,
98
- ...n,
99
- children: r
100
- }), t[4] = n, t[5] = r, t[6] = a, t[7] = o) : o = t[7], o;
101
- }, te = (t) => {
102
- let n = P(27), { id: r, name: i, description: a, defaultValue: o, onChange: s, readOnly: c, hideLabel: l, fullWidth: u, size: d } = t, f = d === void 0 ? "sm" : d, [p, m] = B(o), h, g;
103
- if (n[0] === o ? (h = n[1], g = n[2]) : (h = () => {
104
- m(o);
105
- }, g = [o], n[0] = o, n[1] = h, n[2] = g), R(h, g), c) {
106
- let e = String(p), t;
107
- n[3] === e ? t = n[4] : (t = /* @__PURE__ */ I(Q, { children: e }), n[3] = e, n[4] = t);
108
- let r;
109
- return n[5] !== a || n[6] !== u || n[7] !== l || n[8] !== i || n[9] !== t ? (r = /* @__PURE__ */ I(Z, {
110
- name: i,
111
- description: a,
112
- hideLabel: l,
113
- fullWidth: u,
114
- orientation: "inline",
115
- children: t
116
- }), n[5] = a, n[6] = u, n[7] = l, n[8] = i, n[9] = t, n[10] = r) : r = n[10], r;
117
- }
118
- let _;
119
- n[11] === i ? _ = n[12] : (_ = { "aria-label": i }, n[11] = i, n[12] = _);
120
- let v;
121
- n[13] !== r || n[14] !== s ? (v = (e) => {
122
- m(e.checked), s(r, e.checked);
123
- }, n[13] = r, n[14] = s, n[15] = v) : v = n[15];
124
- let y;
125
- n[16] !== f || n[17] !== _ || n[18] !== v || n[19] !== p ? (y = /* @__PURE__ */ I(e, {
126
- size: f,
127
- checked: p,
128
- inputProps: _,
129
- onCheckedChange: v
130
- }), n[16] = f, n[17] = _, n[18] = v, n[19] = p, n[20] = y) : y = n[20];
131
- let b;
132
- return n[21] !== a || n[22] !== u || n[23] !== l || n[24] !== i || n[25] !== y ? (b = /* @__PURE__ */ I(Z, {
133
- name: i,
134
- description: a,
135
- hideLabel: l,
136
- fullWidth: u,
137
- orientation: "inline",
138
- children: y
139
- }), n[21] = a, n[22] = u, n[23] = l, n[24] = i, n[25] = y, n[26] = b) : b = n[26], b;
140
- }, ne = (e) => {
141
- let t = P(69), { id: n, defaultValue: r, name: i, onChange: a, description: o, readOnly: s, hideLabel: c, fullWidth: l, size: u } = e, d = c !== void 0 && c, f = l !== void 0 && l, p = u === void 0 ? "sm" : u, [h, v] = B(r), [y, b] = B(!1), x = z(null), S = z(null), C = z(null), w;
142
- t[0] !== n || t[1] !== a ? (w = (e) => {
143
- C.current && clearTimeout(C.current), C.current = setTimeout(() => a(n, e), 540);
144
- }, t[0] = n, t[1] = a, t[2] = w) : w = t[2];
145
- let T = w, E, D;
146
- t[3] === r ? (E = t[4], D = t[5]) : (E = () => {
147
- v(r);
148
- }, D = [r], t[3] = r, t[4] = E, t[5] = D), R(E, D);
149
- let O, k;
150
- t[6] === y ? (O = t[7], k = t[8]) : (O = () => {
151
- if (!y) return;
152
- let e = (e) => {
153
- let t = e;
154
- return x.current?.contains(t) || S.current?.contains(t);
155
- }, t = (t) => {
156
- e(t.target) || b(!1);
157
- };
158
- return document.addEventListener("focusin", t, !0), document.addEventListener("pointerdown", t, !0), document.addEventListener("click", t, !0), () => {
159
- document.removeEventListener("focusin", t, !0), document.removeEventListener("pointerdown", t, !0), document.removeEventListener("click", t, !0);
160
- };
161
- }, k = [y], t[6] = y, t[7] = O, t[8] = k), R(O, k);
162
- let A;
163
- t[9] === T ? A = t[10] : (A = (e) => {
164
- v(e), T(e);
165
- }, t[9] = T, t[10] = A);
166
- let j = A, M;
167
- t[11] === Symbol.for("react.memo_cache_sentinel") ? (M = (e) => {
168
- let t = e.currentTarget;
169
- setTimeout(() => {
170
- t.contains(t.ownerDocument.activeElement) || b(!1);
171
- });
172
- }, t[11] = M) : M = t[11];
173
- let F = M;
174
- if (s) {
175
- let e;
176
- t[12] === h ? e = t[13] : (e = /* @__PURE__ */ I(Q, { children: /* @__PURE__ */ L(_, {
177
- alignItems: "center",
178
- gap: "xs",
179
- children: [/* @__PURE__ */ I(m, {
180
- boxSize: "0.75rem",
181
- borderRadius: "xs",
182
- bg: h
183
- }), /* @__PURE__ */ I(m, {
184
- as: "span",
185
- children: h
186
- })]
187
- }) }), t[12] = h, t[13] = e);
188
- let n = e;
189
- if (f) {
190
- let e;
191
- t[14] !== o || t[15] !== d || t[16] !== i ? (e = !d && /* @__PURE__ */ I(m, {
192
- mb: "xs",
193
- children: /* @__PURE__ */ I(X, {
194
- name: i,
195
- description: o
196
- })
197
- }), t[14] = o, t[15] = d, t[16] = i, t[17] = e) : e = t[17];
198
- let r;
199
- return t[18] !== e || t[19] !== n ? (r = /* @__PURE__ */ L(m, { children: [e, n] }), t[18] = e, t[19] = n, t[20] = r) : r = t[20], r;
200
- }
201
- let r;
202
- t[21] !== o || t[22] !== d || t[23] !== i ? (r = !d && /* @__PURE__ */ I(X, {
203
- name: i,
204
- description: o
205
- }), t[21] = o, t[22] = d, t[23] = i, t[24] = r) : r = t[24];
206
- let a;
207
- return t[25] !== r || t[26] !== n ? (a = /* @__PURE__ */ I(m, { children: /* @__PURE__ */ L(_, {
208
- alignItems: "center",
209
- justifyContent: "space-between",
210
- minHeight: "2rem",
211
- gap: "xs",
212
- children: [r, n]
213
- }) }), t[25] = r, t[26] = n, t[27] = a) : a = t[27], a;
214
- }
215
- let V;
216
- t[28] === h ? V = t[29] : (V = N(h), t[28] = h, t[29] = V);
217
- let H, U, W;
218
- t[30] === Symbol.for("react.memo_cache_sentinel") ? (H = (e) => b(e.open), U = () => b(!1), W = () => b(!1), t[30] = H, t[31] = U, t[32] = W) : (H = t[30], U = t[31], W = t[32]);
219
- let G;
220
- t[33] === j ? G = t[34] : (G = (e) => j(e.value.toString("hex")), t[33] = j, t[34] = G);
221
- let K;
222
- t[35] !== y || t[36] !== s || t[37] !== V || t[38] !== G ? (K = {
223
- value: V,
224
- open: y,
225
- onOpenChange: H,
226
- onFocusOutside: U,
227
- onInteractOutside: W,
228
- onBlur: F,
229
- onValueChange: G,
230
- disabled: s
231
- }, t[35] = y, t[36] = s, t[37] = V, t[38] = G, t[39] = K) : K = t[39];
232
- let q = K, J = f ? "100%" : "8.75rem", ee;
233
- t[40] === Symbol.for("react.memo_cache_sentinel") ? (ee = /* @__PURE__ */ I(g.HiddenInput, {}), t[40] = ee) : ee = t[40];
234
- let Y;
235
- t[41] === i ? Y = t[42] : (Y = /* @__PURE__ */ I(g.Label, {
236
- srOnly: !0,
237
- children: i
238
- }), t[41] = i, t[42] = Y);
239
- let Z;
240
- t[43] === Symbol.for("react.memo_cache_sentinel") ? (Z = () => b(!1), t[43] = Z) : Z = t[43];
241
- let te;
242
- t[44] === s ? te = t[45] : (te = /* @__PURE__ */ I(g.Input, {
243
- readOnly: s,
244
- onFocus: Z
245
- }), t[44] = s, t[45] = te);
246
- let ne;
247
- t[46] === Symbol.for("react.memo_cache_sentinel") ? (ne = /* @__PURE__ */ I(g.Trigger, {}), t[46] = ne) : ne = t[46];
248
- let re;
249
- t[47] === te ? re = t[48] : (re = /* @__PURE__ */ L(g.Control, { children: [te, ne] }), t[47] = te, t[48] = re);
250
- let ie, ae;
251
- t[49] === Symbol.for("react.memo_cache_sentinel") ? (ie = /* @__PURE__ */ I(g.Area, {}), ae = /* @__PURE__ */ I(g.Sliders, {}), t[49] = ie, t[50] = ae) : (ie = t[49], ae = t[50]);
252
- let oe;
253
- t[51] === h ? oe = t[52] : (oe = /* @__PURE__ */ I(g.Swatch, { value: h }), t[51] = h, t[52] = oe);
254
- let se;
255
- t[53] !== oe || t[54] !== h ? (se = /* @__PURE__ */ I(g.Positioner, { children: /* @__PURE__ */ L(g.Content, {
256
- ref: S,
257
- onBlur: F,
258
- children: [
259
- ie,
260
- ae,
261
- /* @__PURE__ */ I(g.SwatchGroup, { children: /* @__PURE__ */ I(g.SwatchTrigger, {
262
- value: h,
263
- children: oe
264
- }) })
265
- ]
266
- }) }), t[53] = oe, t[54] = h, t[55] = se) : se = t[55];
267
- let ce;
268
- t[56] !== q || t[57] !== p || t[58] !== J || t[59] !== Y || t[60] !== re || t[61] !== se ? (ce = /* @__PURE__ */ L(g.Root, {
269
- ref: x,
270
- ...q,
271
- size: p,
272
- width: J,
273
- maxW: "100%",
274
- children: [
275
- ee,
276
- Y,
277
- re,
278
- se
279
- ]
280
- }), t[56] = q, t[57] = p, t[58] = J, t[59] = Y, t[60] = re, t[61] = se, t[62] = ce) : ce = t[62];
281
- let le = ce, ue;
282
- return t[63] !== o || t[64] !== f || t[65] !== d || t[66] !== i || t[67] !== le ? (ue = /* @__PURE__ */ I(m, { children: f ? /* @__PURE__ */ L(m, { children: [!d && /* @__PURE__ */ I(m, {
283
- mb: "xs",
284
- children: /* @__PURE__ */ I(X, {
285
- name: i,
286
- description: o
287
- })
288
- }), le] }) : /* @__PURE__ */ L(_, {
289
- alignItems: "center",
290
- justifyContent: "space-between",
291
- minHeight: "2rem",
292
- gap: "xs",
293
- children: [!d && /* @__PURE__ */ I(X, {
294
- name: i,
295
- description: o
296
- }), le]
297
- }) }), t[63] = o, t[64] = f, t[65] = d, t[66] = i, t[67] = le, t[68] = ue) : ue = t[68], ue;
298
- }, re = (e) => {
299
- let t = P(35), { id: n, defaultValue: r, name: i, min: a, max: o, onChange: s, description: c, readOnly: l, hideLabel: u, fullWidth: d, size: f } = e, p = u !== void 0 && u, h = d !== void 0 && d, g = f === void 0 ? "sm" : f, [v, y] = B(r), b = z(null), x;
300
- t[0] !== n || t[1] !== s ? (x = (e) => {
301
- b.current && clearTimeout(b.current), b.current = setTimeout(() => s(n, e), 540);
302
- }, t[0] = n, t[1] = s, t[2] = x) : x = t[2];
303
- let S = x, C, T;
304
- t[3] === r ? (C = t[4], T = t[5]) : (C = () => {
305
- y(r);
306
- }, T = [r], t[3] = r, t[4] = C, t[5] = T), R(C, T);
307
- let E;
308
- t[6] === S ? E = t[7] : (E = (e) => {
309
- y(e), S(e);
310
- }, t[6] = S, t[7] = E);
311
- let D = E;
312
- if (l) {
313
- let e;
314
- t[8] === v ? e = t[9] : (e = /* @__PURE__ */ I(Q, { children: v }), t[8] = v, t[9] = e);
315
- let n = e;
316
- if (h) {
317
- let e;
318
- t[10] !== c || t[11] !== p || t[12] !== i ? (e = !p && /* @__PURE__ */ I(m, {
319
- mb: "xs",
320
- children: /* @__PURE__ */ I(X, {
321
- name: i,
322
- description: c
323
- })
324
- }), t[10] = c, t[11] = p, t[12] = i, t[13] = e) : e = t[13];
325
- let r;
326
- return t[14] !== e || t[15] !== n ? (r = /* @__PURE__ */ L(m, { children: [e, n] }), t[14] = e, t[15] = n, t[16] = r) : r = t[16], r;
327
- }
328
- let r;
329
- t[17] !== c || t[18] !== p || t[19] !== i ? (r = !p && /* @__PURE__ */ I(X, {
330
- name: i,
331
- description: c
332
- }), t[17] = c, t[18] = p, t[19] = i, t[20] = r) : r = t[20];
333
- let a;
334
- return t[21] !== r || t[22] !== n ? (a = /* @__PURE__ */ I(m, { children: /* @__PURE__ */ L(_, {
335
- alignItems: "center",
336
- justifyContent: "space-between",
337
- minHeight: "2rem",
338
- gap: "xs",
339
- children: [r, n]
340
- }) }), t[21] = r, t[22] = n, t[23] = a) : a = t[23], a;
341
- }
342
- let O;
343
- return t[24] !== c || t[25] !== h || t[26] !== D || t[27] !== p || t[28] !== o || t[29] !== a || t[30] !== i || t[31] !== l || t[32] !== g || t[33] !== v ? (O = /* @__PURE__ */ I(m, { children: h ? /* @__PURE__ */ L(m, { children: [!p && /* @__PURE__ */ I(m, {
344
- mb: "xs",
345
- children: /* @__PURE__ */ I(X, {
346
- name: i,
347
- description: c
348
- })
349
- }), /* @__PURE__ */ I(w, {
350
- className: "nodrag",
351
- readOnly: l,
352
- width: "100%",
353
- size: g,
354
- type: "date",
355
- placeholder: p ? i : void 0,
356
- value: v,
357
- min: a,
358
- max: o,
359
- onChange: (e) => D(e.target.value),
360
- onKeyUp: ie
361
- })] }) : /* @__PURE__ */ L(_, {
362
- alignItems: "center",
363
- justifyContent: "space-between",
364
- minHeight: "2rem",
365
- gap: "xs",
366
- children: [!p && /* @__PURE__ */ I(X, {
367
- name: i,
368
- description: c
369
- }), /* @__PURE__ */ I(w, {
370
- className: "nodrag",
371
- readOnly: l,
372
- width: "8.75rem",
373
- size: g,
374
- type: "date",
375
- placeholder: p ? i : void 0,
376
- value: v,
377
- min: a,
378
- max: o,
379
- onChange: (e) => D(e.target.value),
380
- onKeyUp: ae
381
- })]
382
- }) }), t[24] = c, t[25] = h, t[26] = D, t[27] = p, t[28] = o, t[29] = a, t[30] = i, t[31] = l, t[32] = g, t[33] = v, t[34] = O) : O = t[34], O;
383
- };
384
- function ie(e) {
385
- e.key === "Enter" && e.currentTarget.blur();
386
- }
387
- function ae(e) {
388
- e.key === "Enter" && e.currentTarget.blur();
389
- }
390
- //#endregion
391
- //#region src/components/param-editor/inputs/horizontal-text-input.tsx
392
- var oe = (e) => {
393
- let t = P(33), { id: n, defaultValue: r, name: i, onChange: a, description: o, readOnly: s, hideLabel: c, size: l } = e, u = c !== void 0 && c, d = l === void 0 ? "sm" : l, [f, p] = B(r), [h, g] = B(!1), v = z(null), y;
394
- t[0] !== n || t[1] !== a ? (y = (e) => {
395
- v.current && clearTimeout(v.current), v.current = setTimeout(() => a(n, e), 540);
396
- }, t[0] = n, t[1] = a, t[2] = y) : y = t[2];
397
- let b = y, x, S;
398
- t[3] === r ? (x = t[4], S = t[5]) : (x = () => {
399
- p(r);
400
- }, S = [r], t[3] = r, t[4] = x, t[5] = S), R(x, S);
401
- let C;
402
- t[6] === b ? C = t[7] : (C = (e) => {
403
- p(e), b(e);
404
- }, t[6] = b, t[7] = C);
405
- let T = C, E;
406
- t[8] === s ? E = t[9] : (E = () => {
407
- s || g(!0);
408
- }, t[8] = s, t[9] = E);
409
- let D = E, O;
410
- t[10] === f ? O = t[11] : (O = () => {
411
- f.trim().length === 0 && g(!1);
412
- }, t[10] = f, t[11] = O);
413
- let k = O, A;
414
- t[12] === Symbol.for("react.memo_cache_sentinel") ? (A = (e) => {
415
- e.key === "Escape" && (g(!1), e.preventDefault());
416
- }, t[12] = A) : A = t[12];
417
- let M = A;
418
- if (s) {
419
- let e;
420
- t[13] !== o || t[14] !== u || t[15] !== i ? (e = !u && /* @__PURE__ */ I(X, {
421
- name: i,
422
- description: o
423
- }), t[13] = o, t[14] = u, t[15] = i, t[16] = e) : e = t[16];
424
- let n;
425
- t[17] === f ? n = t[18] : (n = /* @__PURE__ */ I(Q, {
426
- preserveWhitespace: !0,
427
- children: f
428
- }), t[17] = f, t[18] = n);
429
- let r;
430
- return t[19] !== n || t[20] !== e ? (r = /* @__PURE__ */ I(m, {
431
- position: "relative",
432
- flex: "1",
433
- minW: "12.5rem",
434
- children: /* @__PURE__ */ L(_, {
435
- alignItems: "center",
436
- justifyContent: "space-between",
437
- minHeight: "2rem",
438
- gap: "xs",
439
- children: [e, n]
440
- })
441
- }), t[19] = n, t[20] = e, t[21] = r) : r = t[21], r;
442
- }
443
- let N;
444
- return t[22] !== o || t[23] !== k || t[24] !== T || t[25] !== D || t[26] !== u || t[27] !== h || t[28] !== i || t[29] !== s || t[30] !== d || t[31] !== f ? (N = /* @__PURE__ */ I(m, {
445
- position: "relative",
446
- flex: "1",
447
- minW: "12.5rem",
448
- children: /* @__PURE__ */ I(m, {
449
- position: "relative",
450
- minHeight: "2rem",
451
- children: h ? /* @__PURE__ */ L(m, {
452
- position: "absolute",
453
- top: "0",
454
- left: "0",
455
- right: "0",
456
- zIndex: "10",
457
- bg: "bg",
458
- borderWidth: "1px",
459
- borderStyle: "solid",
460
- borderColor: "border",
461
- borderRadius: "lg",
462
- p: "2",
463
- transition: "border-color 0.2s ease-in-out",
464
- boxShadow: "none",
465
- _hover: { borderColor: "border.accent-light" },
466
- _active: { borderColor: "border.accent-light" },
467
- _focusWithin: {
468
- borderColor: "border.accent-light",
469
- boxShadow: "none"
470
- },
471
- children: [!u && /* @__PURE__ */ I(m, {
472
- mb: "sm",
473
- children: /* @__PURE__ */ I(X, {
474
- name: i,
475
- description: o
476
- })
477
- }), /* @__PURE__ */ I(j, {
478
- "aria-label": i,
479
- className: "nodrag",
480
- readOnly: s,
481
- width: "100%",
482
- size: d,
483
- placeholder: u ? i : void 0,
484
- value: f,
485
- onChange: (e) => T(e.target.value),
486
- onBlur: k,
487
- onKeyDown: M,
488
- rows: 3,
489
- resize: "vertical",
490
- autoFocus: !0
491
- })]
492
- }) : /* @__PURE__ */ L(_, {
493
- alignItems: "center",
494
- justifyContent: "space-between",
495
- height: "2rem",
496
- gap: "xs",
497
- children: [!u && /* @__PURE__ */ I(X, {
498
- name: i,
499
- description: o
500
- }), /* @__PURE__ */ I(w, {
501
- "aria-label": i,
502
- className: "nodrag",
503
- readOnly: s,
504
- flex: "1",
505
- maxW: "12.5rem",
506
- size: d,
507
- type: "text",
508
- placeholder: u ? i : void 0,
509
- value: f,
510
- onClick: D,
511
- onChange: (e) => T(e.target.value),
512
- onKeyUp: se
513
- })]
514
- })
515
- })
516
- }), t[22] = o, t[23] = k, t[24] = T, t[25] = D, t[26] = u, t[27] = h, t[28] = i, t[29] = s, t[30] = d, t[31] = f, t[32] = N) : N = t[32], N;
517
- };
518
- function se(e) {
519
- e.key === "Enter" && e.currentTarget.blur();
520
- }
521
- //#endregion
522
- //#region src/components/param-editor/inputs/markdown-input.tsx
523
- var ce = (e) => {
524
- let t = P(28), { id: n, name: r, description: i, defaultValue: a, placeholder: o, onChange: s, readOnly: c, presentation: l, size: u } = e, f = l === void 0 ? "stacked" : l, p = u === void 0 ? "sm" : u, [h, g] = B(a), [v, y] = B(!1), b, x;
525
- t[0] === a ? (b = t[1], x = t[2]) : (b = () => {
526
- g(a);
527
- }, x = [a], t[0] = a, t[1] = b, t[2] = x), R(b, x);
528
- let S;
529
- t[3] !== n || t[4] !== s ? (S = (e) => {
530
- g(e), s(n, e);
531
- }, t[3] = n, t[4] = s, t[5] = S) : S = t[5];
532
- let C = S, T;
533
- t[6] !== C || t[7] !== o || t[8] !== c ? (T = (e) => /* @__PURE__ */ I(m, {
534
- borderWidth: "1px",
535
- borderColor: "border",
536
- borderRadius: "xs",
537
- minH: "7rem",
538
- minW: "0",
539
- overflow: "visible",
540
- width: "full",
541
- children: /* @__PURE__ */ I(d, {
542
- defaultState: e,
543
- isEditable: !c,
544
- placeholder: o,
545
- scrollable: !1,
546
- onChange: C
547
- })
548
- }), t[6] = C, t[7] = o, t[8] = c, t[9] = T) : T = t[9];
549
- let E = T, D;
550
- t[10] !== i || t[11] !== r ? (D = /* @__PURE__ */ I(X, {
551
- name: r,
552
- description: i
553
- }), t[10] = i, t[11] = r, t[12] = D) : D = t[12];
554
- let O = D;
555
- if (f === "horizontal") {
556
- if (c) {
557
- let e;
558
- return t[13] === h ? e = t[14] : (e = /* @__PURE__ */ I(m, {
559
- position: "relative",
560
- flex: "1",
561
- minW: "12.5rem",
562
- children: /* @__PURE__ */ I(_, {
563
- alignItems: "center",
564
- minHeight: "2rem",
565
- children: /* @__PURE__ */ I(Q, {
566
- preserveWhitespace: !0,
567
- children: h
568
- })
569
- })
570
- }), t[13] = h, t[14] = e), e;
571
- }
572
- let e;
573
- return t[15] !== C || t[16] !== E || t[17] !== v || t[18] !== r || t[19] !== p || t[20] !== h ? (e = /* @__PURE__ */ I(m, {
574
- position: "relative",
575
- flex: "1",
576
- minW: "12.5rem",
577
- children: /* @__PURE__ */ I(m, {
578
- position: "relative",
579
- minHeight: "2rem",
580
- children: v ? /* @__PURE__ */ I(m, {
581
- position: "absolute",
582
- top: "0",
583
- left: "0",
584
- right: "0",
585
- zIndex: "10",
586
- bg: "bg",
587
- borderWidth: "1px",
588
- borderColor: "border",
589
- borderRadius: "lg",
590
- p: "2",
591
- transition: "border-color 0.2s ease-in-out",
592
- _hover: { borderColor: "border.accent-light" },
593
- _focusWithin: { borderColor: "border.accent-light" },
594
- onKeyDown: (e) => {
595
- e.key === "Escape" && (y(!1), e.preventDefault());
596
- },
597
- children: E(h)
598
- }) : /* @__PURE__ */ I(w, {
599
- className: "nodrag",
600
- flex: "1",
601
- maxW: "12.5rem",
602
- size: p,
603
- type: "text",
604
- placeholder: r,
605
- value: h,
606
- onClick: () => {
607
- y(!0);
608
- },
609
- onChange: (e) => C(e.target.value)
610
- })
611
- })
612
- }), t[15] = C, t[16] = E, t[17] = v, t[18] = r, t[19] = p, t[20] = h, t[21] = e) : e = t[21], e;
613
- }
614
- let A;
615
- t[22] !== E || t[23] !== h ? (A = E(h), t[22] = E, t[23] = h, t[24] = A) : A = t[24];
616
- let j;
617
- return t[25] !== O || t[26] !== A ? (j = /* @__PURE__ */ L(k, {
618
- gap: "xs",
619
- minW: "0",
620
- width: "full",
621
- children: [O, A]
622
- }), t[25] = O, t[26] = A, t[27] = j) : j = t[27], j;
623
- }, le = (e) => {
624
- let t = P(50), { id: n, defaultValue: r, name: i, step: a, min: o, max: s, onChange: c, description: d, readOnly: p, hideLabel: h, hideSlider: g, fullWidth: v, size: y } = e, b = a === void 0 ? 1 : a, x = h !== void 0 && h, S = g !== void 0 && g, C = v !== void 0 && v, w = y === void 0 ? "sm" : y, [T, E] = B(r), D = o !== void 0 && s !== void 0 && !S, O = C && !D, k = z(null), A = z(null), j;
625
- t[0] !== n || t[1] !== c ? (j = (e) => {
626
- k.current && clearTimeout(k.current), A.current = e, k.current = setTimeout(() => {
627
- A.current = null, c(n, e);
628
- }, 540);
629
- }, t[0] = n, t[1] = c, t[2] = j) : j = t[2];
630
- let M = j, N;
631
- t[3] !== n || t[4] !== c ? (N = () => {
632
- if (A.current === null) return;
633
- k.current && clearTimeout(k.current);
634
- let e = A.current;
635
- A.current = null, c(n, e);
636
- }, t[3] = n, t[4] = c, t[5] = N) : N = t[5];
637
- let F = N, V, H;
638
- if (t[6] === r ? (V = t[7], H = t[8]) : (V = () => {
639
- E(r);
640
- }, H = [r], t[6] = r, t[7] = V, t[8] = H), R(V, H), p) {
641
- let e;
642
- t[9] === T ? e = t[10] : (e = /* @__PURE__ */ I(Q, { children: T }), t[9] = T, t[10] = e);
643
- let n = e;
644
- if (C) {
645
- let e;
646
- t[11] !== d || t[12] !== x || t[13] !== i ? (e = !x && /* @__PURE__ */ I(m, {
647
- mb: "xs",
648
- children: /* @__PURE__ */ I(X, {
649
- name: i,
650
- description: d
651
- })
652
- }), t[11] = d, t[12] = x, t[13] = i, t[14] = e) : e = t[14];
653
- let r;
654
- return t[15] !== e || t[16] !== n ? (r = /* @__PURE__ */ L(m, { children: [e, n] }), t[15] = e, t[16] = n, t[17] = r) : r = t[17], r;
655
- }
656
- let r;
657
- t[18] !== d || t[19] !== x || t[20] !== i ? (r = !x && /* @__PURE__ */ I(X, {
658
- name: i,
659
- description: d
660
- }), t[18] = d, t[19] = x, t[20] = i, t[21] = r) : r = t[21];
661
- let a;
662
- return t[22] !== r || t[23] !== n ? (a = /* @__PURE__ */ I(m, { children: /* @__PURE__ */ L(_, {
663
- alignItems: "center",
664
- justifyContent: "space-between",
665
- minHeight: "2rem",
666
- gap: "xs",
667
- children: [r, n]
668
- }) }), t[22] = r, t[23] = n, t[24] = a) : a = t[24], a;
669
- }
670
- let U;
671
- t[25] !== d || t[26] !== F || t[27] !== x || t[28] !== s || t[29] !== o || t[30] !== i || t[31] !== p || t[32] !== M || t[33] !== w || t[34] !== b || t[35] !== O || t[36] !== T ? (U = O ? /* @__PURE__ */ L(m, { children: [!x && /* @__PURE__ */ I(m, {
672
- mb: "xs",
673
- children: /* @__PURE__ */ I(X, {
674
- name: i,
675
- description: d
676
- })
677
- }), /* @__PURE__ */ I(f, {
678
- disabled: p,
679
- width: "100%",
680
- size: w,
681
- value: `${T}`,
682
- step: b,
683
- min: o,
684
- max: s,
685
- onValueChange: (e) => {
686
- let t = Number.isNaN(e.valueAsNumber) ? o ?? 0 : e.valueAsNumber;
687
- E(t), M(t);
688
- },
689
- children: /* @__PURE__ */ I(u, {
690
- className: "nodrag",
691
- readOnly: p,
692
- placeholder: x ? i : void 0,
693
- onBlur: F,
694
- onKeyUp: ue
695
- })
696
- })] }) : /* @__PURE__ */ L(_, {
697
- alignItems: "center",
698
- justifyContent: "space-between",
699
- minHeight: "2rem",
700
- gap: "xs",
701
- children: [!x && /* @__PURE__ */ I(X, {
702
- name: i,
703
- description: d
704
- }), /* @__PURE__ */ I(f, {
705
- disabled: p,
706
- width: "5rem",
707
- size: w,
708
- value: `${T}`,
709
- step: b,
710
- min: o,
711
- max: s,
712
- onValueChange: (e) => {
713
- let t = Number.isNaN(e.valueAsNumber) ? o ?? 0 : e.valueAsNumber;
714
- E(t), M(t);
715
- },
716
- children: /* @__PURE__ */ I(u, {
717
- className: "nodrag",
718
- readOnly: p,
719
- placeholder: x ? i : void 0,
720
- onBlur: F,
721
- onKeyUp: de
722
- })
723
- })]
724
- }), t[25] = d, t[26] = F, t[27] = x, t[28] = s, t[29] = o, t[30] = i, t[31] = p, t[32] = M, t[33] = w, t[34] = b, t[35] = O, t[36] = T, t[37] = U) : U = t[37];
725
- let W;
726
- t[38] !== n || t[39] !== s || t[40] !== o || t[41] !== c || t[42] !== p || t[43] !== D || t[44] !== b || t[45] !== T ? (W = D && /* @__PURE__ */ I(l, {
727
- disabled: p,
728
- value: [T],
729
- step: b,
730
- min: o,
731
- max: s,
732
- onValueChange: (e) => {
733
- E(e.value[0]);
734
- },
735
- onValueChangeEnd: (e) => {
736
- c(n, e.value[0]);
737
- }
738
- }), t[38] = n, t[39] = s, t[40] = o, t[41] = c, t[42] = p, t[43] = D, t[44] = b, t[45] = T, t[46] = W) : W = t[46];
739
- let G;
740
- return t[47] !== W || t[48] !== U ? (G = /* @__PURE__ */ L(m, { children: [U, W] }), t[47] = W, t[48] = U, t[49] = G) : G = t[49], G;
741
- };
742
- function ue(e) {
743
- e.key === "Enter" && e.currentTarget.blur();
744
- }
745
- function de(e) {
746
- e.key === "Enter" && e.currentTarget.blur();
747
- }
748
- //#endregion
749
- //#region src/components/param-editor/inputs/resource-input-chips.tsx
750
- var fe = (e) => /* @__PURE__ */ I(x, {
751
- as: o(e.icon),
752
- boxSize: "14px",
753
- color: e.color ? `${e.color}.500` : "fg.muted"
754
- }), pe = (e) => window.open(e, "_blank", "noreferrer"), me = (e) => void navigator.clipboard?.writeText(e).catch(() => void 0), he = (e) => {
755
- let n = P(18), { option: r, onOpenResource: i, onRemove: a } = e;
756
- if (!(r.href || r.ref || r.copyText)) {
757
- let e;
758
- return n[0] === r.name ? e = n[1] : (e = /* @__PURE__ */ I(s, { children: r.name }), n[0] = r.name, n[1] = e), e;
759
- }
760
- let o;
761
- n[2] !== i || n[3] !== r.copyText || n[4] !== r.href || n[5] !== r.ref ? (o = r.href && r.href.length > 0 ? () => pe(r.href) : r.ref && i ? () => i(r.ref) : r.copyText ? () => me(r.copyText) : void 0, n[2] = i, n[3] = r.copyText, n[4] = r.href, n[5] = r.ref, n[6] = o) : o = n[6];
762
- let c = o, l = r.name, u;
763
- n[7] === r ? u = n[8] : (u = fe(r), n[7] = r, n[8] = u);
764
- let d;
765
- n[9] === c ? d = n[10] : (d = c ? () => c() : void 0, n[9] = c, n[10] = d);
766
- let f;
767
- n[11] === a ? f = n[12] : (f = a ? () => a() : void 0, n[11] = a, n[12] = f);
768
- let p;
769
- return n[13] !== r.name || n[14] !== u || n[15] !== d || n[16] !== f ? (p = /* @__PURE__ */ I(t, {
770
- fileName: l,
771
- icon: u,
772
- size: "md",
773
- onSelect: d,
774
- onRemove: f
775
- }), n[13] = r.name, n[14] = u, n[15] = d, n[16] = f, n[17] = p) : p = n[17], p;
776
- }, ge = (e) => {
777
- let t = P(11), { options: n, onOpenResource: r, onRemove: i, emptyText: a } = e;
778
- if (n.length === 0) {
779
- let e = a ?? "None", n;
780
- return t[0] === e ? n = t[1] : (n = /* @__PURE__ */ I(A, {
781
- textStyle: "label/S/regular",
782
- color: "fg.muted",
783
- children: e
784
- }), t[0] = e, t[1] = n), n;
785
- }
786
- let o;
787
- if (t[2] !== r || t[3] !== i || t[4] !== n) {
788
- let e;
789
- t[6] !== r || t[7] !== i ? (e = (e) => /* @__PURE__ */ I(he, {
790
- option: e,
791
- onOpenResource: r,
792
- onRemove: i ? () => i(e.id) : void 0
793
- }, e.id), t[6] = r, t[7] = i, t[8] = e) : e = t[8], o = n.map(e), t[2] = r, t[3] = i, t[4] = n, t[5] = o;
794
- } else o = t[5];
795
- let s;
796
- return t[9] === o ? s = t[10] : (s = /* @__PURE__ */ I(M, {
797
- gap: "2xs",
798
- children: o
799
- }), t[9] = o, t[10] = s), s;
800
- }, _e = (e, t) => e ? /* @__PURE__ */ I(x, {
801
- as: t ? Y : ee,
802
- boxSize: "14px",
803
- color: t ? "fg" : "fg.muted"
804
- }) : t ? /* @__PURE__ */ I(x, {
805
- as: V,
806
- boxSize: "14px",
807
- color: "fg"
808
- }) : null, ve = (e) => e?.icon ? o(e.icon) : void 0, ye = (e, t) => e?.icon ? /* @__PURE__ */ I(x, {
809
- as: o(e.icon),
810
- boxSize: t,
811
- color: e.color ? `${e.color}.500` : "fg.muted"
812
- }) : null, be = (e) => {
813
- let t = P(62), { triggerLabel: n, options: o, selectedIds: s, multiSelect: c, reselectable: l, disabled: u, searchable: d, allowCustomValues: f, searchPlaceholder: p, emptyText: m, group: g, fullWidth: v, triggerVariant: y, triggerAriaLabel: b, size: x, onToggle: C, onGroupChange: w } = e, E = l !== void 0 && l, O = d !== void 0 && d, k = f !== void 0 && f, A = p === void 0 ? "Search options…" : p, j = m === void 0 ? "No options found" : m, M = y === void 0 ? "button" : y, N = x === void 0 ? "sm" : x, F;
814
- t[0] !== g || t[1] !== w ? (F = w && g && !g.disabled && g.options.some((e) => !e.disabled && e.id !== g.defaultValue), t[0] = g, t[1] = w, t[2] = F) : F = t[2];
815
- let R = !!F, z;
816
- if (t[3] !== c || t[4] !== o || t[5] !== E || t[6] !== s) {
817
- let e;
818
- t[8] !== c || t[9] !== E || t[10] !== s ? (e = (e) => !e.disabled && (c || E || !s.includes(e.id)), t[8] = c, t[9] = E, t[10] = s, t[11] = e) : e = t[11], z = o.some(e), t[3] = c, t[4] = o, t[5] = E, t[6] = s, t[7] = z;
819
- } else z = t[7];
820
- let B = u || !k && !z && !R, V;
821
- t[12] !== v || t[13] !== B || t[14] !== N || t[15] !== b || t[16] !== n || t[17] !== M ? (V = M === "icon" ? /* @__PURE__ */ I(S, {
822
- "aria-label": b ?? "Open options",
823
- size: "2xs",
824
- variant: "ghost",
825
- disabled: B,
826
- children: n
827
- }) : /* @__PURE__ */ I(h, {
828
- size: N,
829
- borderWidth: "1px",
830
- borderStyle: "solid",
831
- borderColor: "border",
832
- disabled: B,
833
- textStyle: N === "xs" ? "label/XS" : "label/S/regular",
834
- width: v ? "100%" : void 0,
835
- _hover: {
836
- bg: "bg.hover",
837
- borderColor: "border.accent-light"
838
- },
839
- _active: {
840
- bg: "bg.active",
841
- borderColor: "border.accent-light"
842
- },
843
- _expanded: {
844
- bg: "bg.active",
845
- borderColor: "border.accent-light"
846
- },
847
- _focusVisible: {
848
- borderColor: "border.accent-light",
849
- outline: "none",
850
- boxShadow: "none"
851
- },
852
- children: /* @__PURE__ */ L(_, {
853
- alignItems: "center",
854
- justifyContent: "space-between",
855
- gap: "xs",
856
- w: v ? "full" : void 0,
857
- children: [/* @__PURE__ */ I(_, {
858
- alignItems: "center",
859
- gap: "xs",
860
- children: n
861
- }), /* @__PURE__ */ I(H, { size: 14 })]
862
- })
863
- }), t[12] = v, t[13] = B, t[14] = N, t[15] = b, t[16] = n, t[17] = M, t[18] = V) : V = t[18];
864
- let U = V;
865
- if (O || k || g) {
866
- let e;
867
- if (t[19] !== C || t[20] !== o || t[21] !== s) {
868
- let n;
869
- t[23] !== C || t[24] !== s ? (n = (e) => ({
870
- id: e.id,
871
- label: e.name,
872
- searchText: [e.id, e.description].filter(Boolean).join(" "),
873
- secondaryLabel: e.description,
874
- icon: ve(e),
875
- isDisabled: e.disabled,
876
- isSelected: s.includes(e.id),
877
- onSelect: () => C(e.id)
878
- }), t[23] = C, t[24] = s, t[25] = n) : n = t[25], e = o.map(n), t[19] = C, t[20] = o, t[21] = s, t[22] = e;
879
- } else e = t[22];
880
- let n = e, l;
881
- if (t[26] !== k || t[27] !== R || t[28] !== j || t[29] !== g || t[30] !== n || t[31] !== c || t[32] !== w || t[33] !== C || t[34] !== o || t[35] !== A || t[36] !== O || t[37] !== U) {
882
- let e = g?.options.find((e) => e.id === g.defaultValue), s;
883
- t[39] !== k || t[40] !== C || t[41] !== o ? (s = (e, t) => {
884
- let n = r(e, t), i = t.trim();
885
- return !k || !i || o.some((e) => e.id === i) ? n : [...n, {
886
- id: i,
887
- label: `Use "${i}"`,
888
- onSelect: () => C(i)
889
- }];
890
- }, t[39] = k, t[40] = C, t[41] = o, t[42] = s) : s = t[42];
891
- let u;
892
- t[43] === j ? u = t[44] : (u = /* @__PURE__ */ I(T.Item, {
893
- value: "empty",
894
- disabled: !0,
895
- asChild: !0,
896
- children: /* @__PURE__ */ I(a, {
897
- asChild: !0,
898
- variant: "full-width",
899
- id: "empty",
900
- label: j,
901
- disabled: !0
902
- })
903
- }), t[43] = j, t[44] = u), l = /* @__PURE__ */ I(i, {
904
- trigger: U,
905
- items: n,
906
- listId: g?.defaultValue,
907
- showSearch: O || k,
908
- filterItems: s,
909
- searchPlaceholder: A,
910
- closeOnSelect: !c,
911
- emptyState: u,
912
- parentList: g ? {
913
- items: g.options.map((e) => ({
914
- id: e.id,
915
- label: e.name,
916
- searchText: [e.id, e.description].filter(Boolean).join(" "),
917
- secondaryLabel: e.description,
918
- icon: ve(e),
919
- isDisabled: e.disabled,
920
- isSelected: e.id === g.defaultValue
921
- })),
922
- selectedLabel: e?.name ?? g.placeholder ?? `Select ${g.name.toLowerCase()}`,
923
- selectedIcon: ve(e),
924
- ariaLabel: g.name,
925
- disabled: !R,
926
- showSearch: g.searchable,
927
- searchPlaceholder: g.searchPlaceholder ?? `Search ${g.name.toLowerCase()}…`,
928
- emptyState: /* @__PURE__ */ I(T.Item, {
929
- value: "group-empty",
930
- disabled: !0,
931
- asChild: !0,
932
- children: /* @__PURE__ */ I(a, {
933
- asChild: !0,
934
- variant: "full-width",
935
- id: "group-empty",
936
- label: g.emptyText ?? `No ${g.name.toLowerCase()} found`,
937
- disabled: !0
938
- })
939
- }),
940
- onSelect: (e) => w?.(e.id)
941
- } : void 0
942
- }), t[26] = k, t[27] = R, t[28] = j, t[29] = g, t[30] = n, t[31] = c, t[32] = w, t[33] = C, t[34] = o, t[35] = A, t[36] = O, t[37] = U, t[38] = l;
943
- } else l = t[38];
944
- return l;
945
- }
946
- let W = !c, G;
947
- t[45] === U ? G = t[46] : (G = /* @__PURE__ */ I(T.Trigger, {
948
- asChild: !0,
949
- children: U
950
- }), t[45] = U, t[46] = G);
951
- let K;
952
- if (t[47] !== c || t[48] !== C || t[49] !== o || t[50] !== s) {
953
- let e;
954
- t[52] !== c || t[53] !== C || t[54] !== s ? (e = (e) => {
955
- let t = s.includes(e.id);
956
- return /* @__PURE__ */ I(T.Item, {
957
- value: e.id,
958
- disabled: e.disabled,
959
- asChild: !0,
960
- children: /* @__PURE__ */ I(a, {
961
- asChild: !0,
962
- variant: "full-width",
963
- role: c ? "menuitemcheckbox" : "menuitemradio",
964
- "aria-checked": t,
965
- id: e.id,
966
- label: e.name,
967
- icon: ye(e, "16px"),
968
- tooltip: e.description,
969
- disabled: e.disabled,
970
- isSelected: t,
971
- endContent: _e(c, t),
972
- onActivate: () => C(e.id)
973
- })
974
- }, e.id);
975
- }, t[52] = c, t[53] = C, t[54] = s, t[55] = e) : e = t[55], K = o.map(e), t[47] = c, t[48] = C, t[49] = o, t[50] = s, t[51] = K;
976
- } else K = t[51];
977
- let q;
978
- t[56] === K ? q = t[57] : (q = /* @__PURE__ */ I(D, { children: /* @__PURE__ */ I(T.Positioner, { children: /* @__PURE__ */ I(T.Content, { children: K }) }) }), t[56] = K, t[57] = q);
979
- let J;
980
- return t[58] !== W || t[59] !== G || t[60] !== q ? (J = /* @__PURE__ */ L(T.Root, {
981
- closeOnSelect: W,
982
- children: [G, q]
983
- }), t[58] = W, t[59] = G, t[60] = q, t[61] = J) : J = t[61], J;
984
- }, xe = (e) => Array.isArray(e) ? e : e ? [e] : [], Se = (e, t) => e.map((e) => t.find((t) => t.id === e)).filter((e) => !!e), Ce = (e) => {
985
- let t = P(11), { fullWidth: n, label: r, control: i, presentation: a } = e;
986
- if (a === "horizontal") {
987
- let e;
988
- return t[0] !== i || t[1] !== r ? (e = /* @__PURE__ */ L(k, {
989
- gap: "2xs",
990
- alignItems: "start",
991
- minW: "0",
992
- children: [r, i]
993
- }), t[0] = i, t[1] = r, t[2] = e) : e = t[2], e;
994
- }
995
- if (n) {
996
- let e;
997
- t[3] === r ? e = t[4] : (e = /* @__PURE__ */ I(m, {
998
- mb: "xs",
999
- children: r
1000
- }), t[3] = r, t[4] = e);
1001
- let n;
1002
- return t[5] !== i || t[6] !== e ? (n = /* @__PURE__ */ L(m, { children: [e, i] }), t[5] = i, t[6] = e, t[7] = n) : n = t[7], n;
1003
- }
1004
- let o;
1005
- return t[8] !== i || t[9] !== r ? (o = /* @__PURE__ */ L(_, {
1006
- alignItems: "center",
1007
- justifyContent: "space-between",
1008
- minHeight: "2rem",
1009
- gap: "xs",
1010
- children: [r, i]
1011
- }), t[8] = i, t[9] = r, t[10] = o) : o = t[10], o;
1012
- }, we = (e) => {
1013
- let t = P(9), { triggerLabel: n, options: r, selectedIds: i, multiSelect: a, triggerVariant: o, triggerAriaLabel: s, size: c, onToggle: l } = e, u;
1014
- return t[0] !== a || t[1] !== l || t[2] !== r || t[3] !== i || t[4] !== c || t[5] !== s || t[6] !== n || t[7] !== o ? (u = /* @__PURE__ */ I(be, {
1015
- triggerLabel: n,
1016
- options: r,
1017
- selectedIds: i,
1018
- multiSelect: a,
1019
- reselectable: !0,
1020
- triggerVariant: o,
1021
- triggerAriaLabel: s,
1022
- size: c,
1023
- onToggle: l
1024
- }), t[0] = a, t[1] = l, t[2] = r, t[3] = i, t[4] = c, t[5] = s, t[6] = n, t[7] = o, t[8] = u) : u = t[8], u;
1025
- }, Te = (e) => {
1026
- let t = P(19), { id: n, name: r, description: i, defaultValue: a, options: o, onChange: s, onOpenResource: c, readOnly: l, editable: u, multiSelect: d, placeholder: f, emptyText: p, fullWidth: m, presentation: h, size: g } = e, v = u !== void 0 && u, y = d !== void 0 && d, b = m !== void 0 && m, S = h === void 0 ? "stacked" : h, C = g === void 0 ? "sm" : g, [w, T] = B(a), E = z(null), D, O;
1027
- t[0] === a ? (D = t[1], O = t[2]) : (D = () => {
1028
- T(a);
1029
- }, O = [a], t[0] = a, t[1] = D, t[2] = O), R(D, O);
1030
- let k = (e) => {
1031
- E.current && clearTimeout(E.current), s(n, e);
1032
- }, A = (e) => {
1033
- E.current && clearTimeout(E.current), E.current = setTimeout(() => s(n, e), 540);
1034
- }, j = xe(w), M = Se(j, o), N = v && !l, F = S === "horizontal", V;
1035
- t[3] !== i || t[4] !== r || t[5] !== F ? (V = /* @__PURE__ */ I(X, {
1036
- name: r,
1037
- description: i,
1038
- compact: F
1039
- }), t[3] = i, t[4] = r, t[5] = F, t[6] = V) : V = t[6];
1040
- let H = V;
1041
- if (!N) return /* @__PURE__ */ I(Ce, {
1042
- fullWidth: b,
1043
- label: H,
1044
- presentation: S,
1045
- control: /* @__PURE__ */ I(ge, {
1046
- options: M,
1047
- onOpenResource: c,
1048
- emptyText: p
1049
- })
1050
- });
1051
- let U = (e) => {
1052
- if (y) {
1053
- let t = j.includes(e) ? j.filter((t) => t !== e) : [...j, e];
1054
- T(t), A(t);
1055
- return;
1056
- }
1057
- let t = j.includes(e) ? "" : e;
1058
- T(t), k(t);
1059
- }, W = (e) => {
1060
- let t = j.filter((t) => t !== e);
1061
- T(t), A(t);
1062
- };
1063
- if (y) {
1064
- let e;
1065
- t[7] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ I(x, {
1066
- as: J,
1067
- boxSize: "12px"
1068
- }), t[7] = e) : e = t[7];
1069
- let n = /* @__PURE__ */ L(_, {
1070
- gap: "2xs",
1071
- alignItems: "center",
1072
- flexWrap: "wrap",
1073
- minW: "0",
1074
- children: [M.length > 0 ? /* @__PURE__ */ I(ge, {
1075
- options: M,
1076
- onOpenResource: c,
1077
- onRemove: W,
1078
- emptyText: p
1079
- }) : null, /* @__PURE__ */ I(we, {
1080
- triggerLabel: e,
1081
- options: o,
1082
- selectedIds: j,
1083
- multiSelect: !0,
1084
- triggerVariant: "icon",
1085
- triggerAriaLabel: f ?? `Add ${r}`,
1086
- size: C,
1087
- onToggle: U
1088
- })]
1089
- });
1090
- return /* @__PURE__ */ I(Ce, {
1091
- fullWidth: b,
1092
- label: H,
1093
- control: n,
1094
- presentation: S
1095
- });
1096
- }
1097
- let G = M[0], K = G ? /* @__PURE__ */ L(_, {
1098
- align: "center",
1099
- gap: "2xs",
1100
- minW: "0",
1101
- children: [ye(G, "14px"), G.name]
1102
- }) : f ?? "Select", q;
1103
- t[8] !== o || t[9] !== j || t[10] !== C || t[11] !== U || t[12] !== K ? (q = /* @__PURE__ */ I(we, {
1104
- triggerLabel: K,
1105
- options: o,
1106
- selectedIds: j,
1107
- multiSelect: !1,
1108
- size: C,
1109
- onToggle: U
1110
- }), t[8] = o, t[9] = j, t[10] = C, t[11] = U, t[12] = K, t[13] = q) : q = t[13];
1111
- let ee;
1112
- return t[14] !== b || t[15] !== H || t[16] !== S || t[17] !== q ? (ee = /* @__PURE__ */ I(Ce, {
1113
- fullWidth: b,
1114
- label: H,
1115
- presentation: S,
1116
- control: q
1117
- }), t[14] = b, t[15] = H, t[16] = S, t[17] = q, t[18] = ee) : ee = t[18], ee;
1118
- }, Ee = (e, t, n) => n ? [...e, ...t.filter((t) => !e.some((e) => e.id === t)).map((e) => ({
1119
- id: e,
1120
- name: e
1121
- }))] : e, De = (e) => {
1122
- let t = P(81), { id: n, defaultValue: r, name: i, options: a, onChange: o, description: s, readOnly: c, hideLabel: l, multiSelect: u, placeholder: d, fullWidth: f, clearable: p, disabled: h, searchable: g, allowCustomValues: v, searchPlaceholder: y, emptyText: b, group: x, size: S } = e, C = l !== void 0 && l, w = u !== void 0 && u, T = f !== void 0 && f, E = p !== void 0 && p, D = h !== void 0 && h, O = g !== void 0 && g, k = v !== void 0 && v, A = S === void 0 ? "sm" : S, [j, M] = B(r), [N, z] = B(x?.defaultValue ?? ""), V, H;
1123
- t[0] === r ? (V = t[1], H = t[2]) : (V = () => {
1124
- M(r);
1125
- }, H = [r], t[0] = r, t[1] = V, t[2] = H), R(V, H);
1126
- let U;
1127
- t[3] === x?.defaultValue ? U = t[4] : (U = () => {
1128
- z(x?.defaultValue ?? "");
1129
- }, t[3] = x?.defaultValue, t[4] = U);
1130
- let W = x?.defaultValue, G;
1131
- t[5] === W ? G = t[6] : (G = [W], t[5] = W, t[6] = G), R(U, G);
1132
- let K, q, J, ee, Y, Z, te, ne, re;
1133
- if (t[7] !== k || t[8] !== E || t[9] !== s || t[10] !== T || t[11] !== x || t[12] !== N || t[13] !== C || t[14] !== n || t[15] !== w || t[16] !== i || t[17] !== o || t[18] !== a || t[19] !== d || t[20] !== c || t[21] !== j) {
1134
- re = Symbol.for("react.early_return_sentinel");
1135
- bb0: {
1136
- Z = w ? Array.isArray(j) ? j : [] : typeof j == "string" && j ? [j] : [], q = Ee(a, Z, k);
1137
- let e = () => {
1138
- let e = Z.map((e) => q.find((t) => t.id === e)?.name).filter(Oe);
1139
- return e.length === 0 ? d || "Select" : e.length <= 3 ? e.join(", ") : `${e.slice(0, 3).join(", ")} +${(e.length - 3).toString()}`;
1140
- }, r;
1141
- t[31] !== n || t[32] !== o ? (r = (e) => {
1142
- M(e), o(n, e);
1143
- }, t[31] = n, t[32] = o, t[33] = r) : r = t[33];
1144
- let l = r;
1145
- ee = (e) => {
1146
- if (!w) {
1147
- l(E && Z.includes(e) ? "" : e);
1148
- return;
1149
- }
1150
- l(Z.includes(e) ? Z.filter((t) => t !== e) : [...Z, e]);
1151
- };
1152
- let u;
1153
- t[34] !== x || t[35] !== N || t[36] !== o ? (u = (e) => {
1154
- x && e !== N && (z(e), o(x.id, e));
1155
- }, t[34] = x, t[35] = N, t[36] = o, t[37] = u) : u = t[37], J = u;
1156
- let f = Z.length === 1 ? a.find((e) => e.id === Z[0]) : void 0, p;
1157
- if (t[38] !== s || t[39] !== C || t[40] !== i ? (p = C ? null : /* @__PURE__ */ I(X, {
1158
- name: i,
1159
- description: s
1160
- }), t[38] = s, t[39] = C, t[40] = i, t[41] = p) : p = t[41], Y = p, c) {
1161
- let n = /* @__PURE__ */ I(Q, { children: e() });
1162
- if (T) {
1163
- let e;
1164
- t[42] === Y ? e = t[43] : (e = Y ? /* @__PURE__ */ I(m, {
1165
- mb: "xs",
1166
- children: Y
1167
- }) : null, t[42] = Y, t[43] = e);
1168
- let r;
1169
- t[44] !== e || t[45] !== n ? (r = /* @__PURE__ */ L(m, { children: [e, n] }), t[44] = e, t[45] = n, t[46] = r) : r = t[46], re = r;
1170
- break bb0;
1171
- }
1172
- let r;
1173
- t[47] !== Y || t[48] !== n ? (r = /* @__PURE__ */ I(m, { children: /* @__PURE__ */ L(_, {
1174
- alignItems: "center",
1175
- justifyContent: "space-between",
1176
- minHeight: "2rem",
1177
- gap: "xs",
1178
- children: [Y, n]
1179
- }) }), t[47] = Y, t[48] = n, t[49] = r) : r = t[49], re = r;
1180
- break bb0;
1181
- }
1182
- K = be, te = ye(f, "14px"), ne = e();
1183
- }
1184
- t[7] = k, t[8] = E, t[9] = s, t[10] = T, t[11] = x, t[12] = N, t[13] = C, t[14] = n, t[15] = w, t[16] = i, t[17] = o, t[18] = a, t[19] = d, t[20] = c, t[21] = j, t[22] = K, t[23] = q, t[24] = J, t[25] = ee, t[26] = Y, t[27] = Z, t[28] = te, t[29] = ne, t[30] = re;
1185
- } else K = t[22], q = t[23], J = t[24], ee = t[25], Y = t[26], Z = t[27], te = t[28], ne = t[29], re = t[30];
1186
- if (re !== Symbol.for("react.early_return_sentinel")) return re;
1187
- let ie;
1188
- t[50] !== te || t[51] !== ne ? (ie = /* @__PURE__ */ L(F, { children: [te, ne] }), t[50] = te, t[51] = ne, t[52] = ie) : ie = t[52];
1189
- let ae;
1190
- t[53] !== x || t[54] !== N ? (ae = x ? {
1191
- ...x,
1192
- defaultValue: N
1193
- } : void 0, t[53] = x, t[54] = N, t[55] = ae) : ae = t[55];
1194
- let oe;
1195
- t[56] !== K || t[57] !== k || t[58] !== q || t[59] !== E || t[60] !== D || t[61] !== b || t[62] !== T || t[63] !== J || t[64] !== ee || t[65] !== w || t[66] !== y || t[67] !== O || t[68] !== Z || t[69] !== A || t[70] !== ie || t[71] !== ae ? (oe = /* @__PURE__ */ I(K, {
1196
- triggerLabel: ie,
1197
- options: q,
1198
- allowCustomValues: k,
1199
- selectedIds: Z,
1200
- multiSelect: w,
1201
- reselectable: E,
1202
- disabled: D,
1203
- searchable: O,
1204
- searchPlaceholder: y,
1205
- emptyText: b,
1206
- group: ae,
1207
- fullWidth: T,
1208
- size: A,
1209
- onToggle: ee,
1210
- onGroupChange: J
1211
- }), t[56] = K, t[57] = k, t[58] = q, t[59] = E, t[60] = D, t[61] = b, t[62] = T, t[63] = J, t[64] = ee, t[65] = w, t[66] = y, t[67] = O, t[68] = Z, t[69] = A, t[70] = ie, t[71] = ae, t[72] = oe) : oe = t[72];
1212
- let se = oe;
1213
- if (T) {
1214
- let e;
1215
- t[73] === Y ? e = t[74] : (e = Y ? /* @__PURE__ */ I(m, {
1216
- mb: "xs",
1217
- children: Y
1218
- }) : null, t[73] = Y, t[74] = e);
1219
- let n;
1220
- return t[75] !== se || t[76] !== e ? (n = /* @__PURE__ */ L(m, { children: [e, se] }), t[75] = se, t[76] = e, t[77] = n) : n = t[77], n;
1221
- }
1222
- let ce;
1223
- return t[78] !== Y || t[79] !== se ? (ce = /* @__PURE__ */ I(m, { children: /* @__PURE__ */ L(_, {
1224
- alignItems: "center",
1225
- justifyContent: "space-between",
1226
- minHeight: "2rem",
1227
- gap: "xs",
1228
- children: [Y, se]
1229
- }) }), t[78] = Y, t[79] = se, t[80] = ce) : ce = t[80], ce;
1230
- };
1231
- function Oe(e) {
1232
- return !!e;
1233
- }
1234
- //#endregion
1235
- //#region src/components/param-editor/inputs/text-input.tsx
1236
- var ke = (e) => {
1237
- let t = P(40), { id: n, defaultValue: r, name: i, onChange: a, description: o, readOnly: s, singleLine: c, hideLabel: l, fullWidth: u, size: d } = e, f = c === void 0 || c, p = l !== void 0 && l, h = u !== void 0 && u, g = d === void 0 ? "sm" : d, [v, y] = B(r), b = z(null), x;
1238
- t[0] !== n || t[1] !== a ? (x = (e) => {
1239
- b.current && clearTimeout(b.current), b.current = setTimeout(() => a(n, e), 540);
1240
- }, t[0] = n, t[1] = a, t[2] = x) : x = t[2];
1241
- let S = x, C, T;
1242
- t[3] === r ? (C = t[4], T = t[5]) : (C = () => {
1243
- y(r);
1244
- }, T = [r], t[3] = r, t[4] = C, t[5] = T), R(C, T);
1245
- let E;
1246
- t[6] === S ? E = t[7] : (E = (e) => {
1247
- y(e), S(e);
1248
- }, t[6] = S, t[7] = E);
1249
- let D = E, O;
1250
- t[8] !== n || t[9] !== a || t[10] !== v ? (O = () => {
1251
- b.current && (clearTimeout(b.current), b.current = null, a(n, v));
1252
- }, t[8] = n, t[9] = a, t[10] = v, t[11] = O) : O = t[11];
1253
- let k = O;
1254
- if (s) {
1255
- let e = !f, n;
1256
- t[12] !== e || t[13] !== v ? (n = /* @__PURE__ */ I(Q, {
1257
- preserveWhitespace: e,
1258
- children: v
1259
- }), t[12] = e, t[13] = v, t[14] = n) : n = t[14];
1260
- let r = n;
1261
- if (f && !h) {
1262
- let e;
1263
- t[15] !== o || t[16] !== p || t[17] !== i ? (e = !p && /* @__PURE__ */ I(X, {
1264
- name: i,
1265
- description: o
1266
- }), t[15] = o, t[16] = p, t[17] = i, t[18] = e) : e = t[18];
1267
- let n;
1268
- return t[19] !== e || t[20] !== r ? (n = /* @__PURE__ */ I(m, { children: /* @__PURE__ */ L(_, {
1269
- alignItems: "center",
1270
- justifyContent: "space-between",
1271
- minHeight: "2rem",
1272
- gap: "xs",
1273
- children: [e, r]
1274
- }) }), t[19] = e, t[20] = r, t[21] = n) : n = t[21], n;
1275
- }
1276
- let a;
1277
- t[22] !== o || t[23] !== p || t[24] !== i ? (a = !p && /* @__PURE__ */ I(m, {
1278
- mb: "xs",
1279
- children: /* @__PURE__ */ I(X, {
1280
- name: i,
1281
- description: o
1282
- })
1283
- }), t[22] = o, t[23] = p, t[24] = i, t[25] = a) : a = t[25];
1284
- let s;
1285
- return t[26] !== a || t[27] !== r ? (s = /* @__PURE__ */ L(m, { children: [a, r] }), t[26] = a, t[27] = r, t[28] = s) : s = t[28], s;
1286
- }
1287
- let A;
1288
- return t[29] !== o || t[30] !== h || t[31] !== k || t[32] !== D || t[33] !== p || t[34] !== i || t[35] !== s || t[36] !== f || t[37] !== g || t[38] !== v ? (A = /* @__PURE__ */ I(m, { children: f && !h ? /* @__PURE__ */ L(_, {
1289
- alignItems: "center",
1290
- justifyContent: "space-between",
1291
- minHeight: "2rem",
1292
- gap: "xs",
1293
- children: [!p && /* @__PURE__ */ I(X, {
1294
- name: i,
1295
- description: o
1296
- }), /* @__PURE__ */ I(w, {
1297
- "aria-label": i,
1298
- className: "nodrag",
1299
- readOnly: s,
1300
- flex: "1",
1301
- maxW: "12.5rem",
1302
- size: g,
1303
- type: "text",
1304
- placeholder: p ? i : void 0,
1305
- value: v,
1306
- onChange: (e) => D(e.target.value),
1307
- onBlur: k,
1308
- onKeyUp: Ae
1309
- })]
1310
- }) : /* @__PURE__ */ L(m, { children: [!p && /* @__PURE__ */ I(m, {
1311
- mb: "xs",
1312
- children: /* @__PURE__ */ I(X, {
1313
- name: i,
1314
- description: o
1315
- })
1316
- }), f ? /* @__PURE__ */ I(w, {
1317
- "aria-label": i,
1318
- className: "nodrag",
1319
- readOnly: s,
1320
- width: "100%",
1321
- size: g,
1322
- type: "text",
1323
- placeholder: p ? i : void 0,
1324
- value: v,
1325
- onChange: (e) => D(e.target.value),
1326
- onBlur: k,
1327
- onKeyUp: je
1328
- }) : /* @__PURE__ */ I(j, {
1329
- "aria-label": i,
1330
- className: "nodrag",
1331
- readOnly: s,
1332
- width: "100%",
1333
- size: g,
1334
- placeholder: p ? i : void 0,
1335
- value: v,
1336
- onChange: (e) => D(e.target.value),
1337
- onBlur: k,
1338
- rows: 3,
1339
- resize: "vertical"
1340
- })] }) }), t[29] = o, t[30] = h, t[31] = k, t[32] = D, t[33] = p, t[34] = i, t[35] = s, t[36] = f, t[37] = g, t[38] = v, t[39] = A) : A = t[39], A;
1341
- };
1342
- function Ae(e) {
1343
- e.key === "Enter" && e.currentTarget.blur();
1344
- }
1345
- function je(e) {
1346
- e.key === "Enter" && e.currentTarget.blur();
1347
- }
1348
- //#endregion
1349
- //#region src/components/param-editor/inputs/action-input.tsx
1350
- var Me = (e) => {
1351
- let t = P(33), { id: n, name: r, description: i, defaultValue: a, options: o, onChange: s, readOnly: c, presentation: l } = e, u = l === void 0 ? "stacked" : l, [d, f] = B(a), p, m;
1352
- t[0] === a ? (p = t[1], m = t[2]) : (p = () => {
1353
- f(a);
1354
- }, m = [a], t[0] = a, t[1] = p, t[2] = m), R(p, m);
1355
- let g;
1356
- t[3] !== n || t[4] !== s ? (g = (e) => {
1357
- f(e), s(n, e);
1358
- }, t[3] = n, t[4] = s, t[5] = g) : g = t[5];
1359
- let v = g, y = u === "horizontal", b;
1360
- t[6] !== d || t[7] !== r || t[8] !== o ? (b = o.find((e) => e.id === d)?.name ?? r, t[6] = d, t[7] = r, t[8] = o, t[9] = b) : b = t[9];
1361
- let x = b;
1362
- if (y) {
1363
- let e;
1364
- t[10] === d ? e = t[11] : (e = d ? [d] : [], t[10] = d, t[11] = e);
1365
- let n;
1366
- return t[12] !== o || t[13] !== c || t[14] !== v || t[15] !== x || t[16] !== e ? (n = /* @__PURE__ */ I(be, {
1367
- triggerLabel: x,
1368
- options: o,
1369
- selectedIds: e,
1370
- multiSelect: !1,
1371
- reselectable: !0,
1372
- disabled: c,
1373
- onToggle: v
1374
- }), t[12] = o, t[13] = c, t[14] = v, t[15] = x, t[16] = e, t[17] = n) : n = t[17], n;
1375
- }
1376
- let S;
1377
- if (t[18] !== d || t[19] !== o || t[20] !== c || t[21] !== v) {
1378
- let e;
1379
- t[23] !== d || t[24] !== c || t[25] !== v ? (e = (e) => /* @__PURE__ */ I(h, {
1380
- size: "xs",
1381
- variant: d === e.id ? "subtle" : "outline",
1382
- disabled: e.disabled || c,
1383
- _hover: {
1384
- bg: "bg.hover",
1385
- borderColor: "border.accent-light"
1386
- },
1387
- _active: {
1388
- bg: "bg.active",
1389
- borderColor: "border.accent-light"
1390
- },
1391
- _focusVisible: {
1392
- borderColor: "border.accent-light",
1393
- outline: "none",
1394
- boxShadow: "none"
1395
- },
1396
- onClick: () => v(e.id),
1397
- children: e.name
1398
- }, e.id), t[23] = d, t[24] = c, t[25] = v, t[26] = e) : e = t[26], S = o.map(e), t[18] = d, t[19] = o, t[20] = c, t[21] = v, t[22] = S;
1399
- } else S = t[22];
1400
- let C;
1401
- t[27] === S ? C = t[28] : (C = /* @__PURE__ */ I(_, {
1402
- gap: "xs",
1403
- wrap: "wrap",
1404
- children: S
1405
- }), t[27] = S, t[28] = C);
1406
- let w = C, T;
1407
- return t[29] !== i || t[30] !== r || t[31] !== w ? (T = /* @__PURE__ */ I(Z, {
1408
- name: r,
1409
- description: i,
1410
- orientation: "stacked",
1411
- children: w
1412
- }), t[29] = i, t[30] = r, t[31] = w, t[32] = T) : T = t[32], T;
1413
- }, Ne = [
1414
- "top-left",
1415
- "top",
1416
- "top-right",
1417
- "left",
1418
- "center",
1419
- "right",
1420
- "bottom-left",
1421
- "bottom",
1422
- "bottom-right"
1423
- ], Pe = (e) => typeof e == "string" && Ne.includes(e), Fe = (e) => {
1424
- let t = P(23), { id: n, name: r, description: i, defaultValue: a, onChange: o, readOnly: s, fullWidth: c } = e, [l, u] = B(a), d, f;
1425
- t[0] === a ? (d = t[1], f = t[2]) : (d = () => {
1426
- u(a);
1427
- }, f = [a], t[0] = a, t[1] = d, t[2] = f), R(d, f);
1428
- let p;
1429
- t[3] !== n || t[4] !== o ? (p = (e) => {
1430
- u(e), o(n, e);
1431
- }, t[3] = n, t[4] = o, t[5] = p) : p = t[5];
1432
- let h = p;
1433
- if (s) {
1434
- let e;
1435
- t[6] === l ? e = t[7] : (e = /* @__PURE__ */ I(Q, { children: l }), t[6] = l, t[7] = e);
1436
- let n;
1437
- return t[8] !== i || t[9] !== c || t[10] !== r || t[11] !== e ? (n = /* @__PURE__ */ I(Z, {
1438
- name: r,
1439
- description: i,
1440
- fullWidth: c,
1441
- children: e
1442
- }), t[8] = i, t[9] = c, t[10] = r, t[11] = e, t[12] = n) : n = t[12], n;
1443
- }
1444
- let g;
1445
- t[13] !== h || t[14] !== l ? (g = Ne.map((e) => {
1446
- let t = e === l;
1447
- return /* @__PURE__ */ I(S, {
1448
- "aria-label": e,
1449
- "aria-pressed": t,
1450
- size: "2xs",
1451
- variant: "ghost",
1452
- bg: t ? "fg" : "bg",
1453
- _hover: { bg: t ? "fg" : "bg.muted" },
1454
- borderRadius: "0",
1455
- onClick: () => h(e),
1456
- children: /* @__PURE__ */ I(m, {
1457
- boxSize: "0.375rem",
1458
- borderRadius: "full",
1459
- bg: t ? "bg" : "fg.muted"
1460
- })
1461
- }, e);
1462
- }), t[13] = h, t[14] = l, t[15] = g) : g = t[15];
1463
- let _;
1464
- t[16] === g ? _ = t[17] : (_ = /* @__PURE__ */ I(v, {
1465
- templateColumns: "repeat(3, 1.5rem)",
1466
- gap: "1px",
1467
- width: "fit-content",
1468
- bg: "border.subtle",
1469
- p: "1px",
1470
- borderRadius: "sm",
1471
- overflow: "hidden",
1472
- children: g
1473
- }), t[16] = g, t[17] = _);
1474
- let y = _, b = c ? "stacked" : "inline", x;
1475
- return t[18] !== i || t[19] !== y || t[20] !== r || t[21] !== b ? (x = /* @__PURE__ */ I(Z, {
1476
- name: r,
1477
- description: i,
1478
- orientation: b,
1479
- children: y
1480
- }), t[18] = i, t[19] = y, t[20] = r, t[21] = b, t[22] = x) : x = t[22], x;
1481
- }, Ie = (e, t) => `${e.name}-${e.size.toString()}-${e.lastModified.toString()}-${t.toString()}`, Le = (e, t, n) => {
1482
- let r = n ? t.length : 0, i = e.map((e, t) => ({
1483
- id: Ie(e, r + t),
1484
- file: e,
1485
- status: "queued"
1486
- }));
1487
- return n ? [...t, ...i] : i.slice(0, 1);
1488
- }, Re = (e) => {
1489
- let t = [
1490
- "uploading",
1491
- "error",
1492
- "queued",
1493
- "complete"
1494
- ].find((t) => e.some((e) => e.status === t)) ?? "empty";
1495
- return {
1496
- state: t,
1497
- count: t === "empty" ? 0 : e.filter((e) => e.status === t).length
1498
- };
1499
- }, ze = (e) => {
1500
- let t = P(21), { values: n } = e, r, i, a, o, s, c, l;
1501
- if (t[0] !== n) {
1502
- l = Symbol.for("react.early_return_sentinel");
1503
- bb0: {
1504
- if (i = Re(n), i.state === "empty") {
1505
- l = null;
1506
- break bb0;
1507
- }
1508
- r = i.count === 1 ? "file" : "files", o = `${i.count.toString()} ${r} queued`, s = `Uploading ${i.count.toString()} ${r}`, c = `${i.count.toString()} ${r} uploaded`, a = i.count.toString();
1509
- }
1510
- t[0] = n, t[1] = r, t[2] = i, t[3] = a, t[4] = o, t[5] = s, t[6] = c, t[7] = l;
1511
- } else r = t[1], i = t[2], a = t[3], o = t[4], s = t[5], c = t[6], l = t[7];
1512
- if (l !== Symbol.for("react.early_return_sentinel")) return l;
1513
- let u = `${a} ${r} failed`, d;
1514
- t[8] !== o || t[9] !== s || t[10] !== c || t[11] !== u ? (d = {
1515
- queued: o,
1516
- uploading: s,
1517
- complete: c,
1518
- error: u,
1519
- empty: ""
1520
- }, t[8] = o, t[9] = s, t[10] = c, t[11] = u, t[12] = d) : d = t[12];
1521
- let f = d, p;
1522
- t[13] === i.state ? p = t[14] : (p = i.state === "uploading" ? /* @__PURE__ */ I(O, {
1523
- boxSize: "12px",
1524
- borderWidth: "1px"
1525
- }) : /* @__PURE__ */ I(x, {
1526
- as: i.state === "error" ? U : i.state === "complete" ? W : G,
1527
- boxSize: "12px"
1528
- }), t[13] = i.state, t[14] = p);
1529
- let m = p, h = i.state === "error" ? "fg.error" : "fg.muted", g = f[i.state], v;
1530
- t[15] === g ? v = t[16] : (v = /* @__PURE__ */ I(A, {
1531
- textStyle: "label/XS/medium",
1532
- children: g
1533
- }), t[15] = g, t[16] = v);
1534
- let y;
1535
- return t[17] !== m || t[18] !== v || t[19] !== h ? (y = /* @__PURE__ */ L(_, {
1536
- alignItems: "center",
1537
- gap: "2xs",
1538
- color: h,
1539
- children: [m, v]
1540
- }), t[17] = m, t[18] = v, t[19] = h, t[20] = y) : y = t[20], y;
1541
- }, Be = (e) => {
1542
- let t = P(14), { readOnly: n, values: r, onRemove: i } = e;
1543
- if (r.length === 0) return null;
1544
- let a;
1545
- t[0] === r ? a = t[1] : (a = /* @__PURE__ */ I(ze, { values: r }), t[0] = r, t[1] = a);
1546
- let o;
1547
- if (t[2] !== i || t[3] !== n || t[4] !== r) {
1548
- let e;
1549
- t[6] !== i || t[7] !== n ? (e = (e) => /* @__PURE__ */ I(c, {
1550
- file: e.file,
1551
- disabled: n,
1552
- removeLabel: `Remove ${e.file.name}`,
1553
- onRemove: () => i(e.id)
1554
- }, e.id), t[6] = i, t[7] = n, t[8] = e) : e = t[8], o = r.map(e), t[2] = i, t[3] = n, t[4] = r, t[5] = o;
1555
- } else o = t[5];
1556
- let s;
1557
- t[9] === o ? s = t[10] : (s = /* @__PURE__ */ I(M, {
1558
- gap: "2xs",
1559
- children: o
1560
- }), t[9] = o, t[10] = s);
1561
- let l;
1562
- return t[11] !== a || t[12] !== s ? (l = /* @__PURE__ */ L(k, {
1563
- gap: "2xs",
1564
- minW: "0",
1565
- children: [a, s]
1566
- }), t[11] = a, t[12] = s, t[13] = l) : l = t[13], l;
1567
- }, Ve = (e) => {
1568
- let t = P(40), { id: n, name: r, description: i, defaultValue: a, accept: o, multiple: s, uploadLabel: c, onChange: l, readOnly: u, presentation: d } = e, f = s === void 0 || s, p = c === void 0 ? "Attach files" : c, m = d === void 0 ? "stacked" : d, [g, v] = B(a), y = z(null), b, S;
1569
- t[0] === a ? (b = t[1], S = t[2]) : (b = () => {
1570
- v(a);
1571
- }, S = [a], t[0] = a, t[1] = b, t[2] = S), R(b, S);
1572
- let C;
1573
- t[3] !== n || t[4] !== l ? (C = (e) => {
1574
- v(e), l(n, e);
1575
- }, t[3] = n, t[4] = l, t[5] = C) : C = t[5];
1576
- let w = C, T;
1577
- t[6] !== w || t[7] !== g ? (T = (e) => w(g.filter((t) => t.id !== e)), t[6] = w, t[7] = g, t[8] = T) : T = t[8];
1578
- let E = T, D;
1579
- t[9] !== u || t[10] !== p ? (D = u ? null : /* @__PURE__ */ L(h, {
1580
- size: "xs",
1581
- variant: "ghost",
1582
- flexShrink: 0,
1583
- onClick: () => y.current?.click(),
1584
- children: [/* @__PURE__ */ I(x, {
1585
- as: q,
1586
- boxSize: "14px"
1587
- }), p]
1588
- }), t[9] = u, t[10] = p, t[11] = D) : D = t[11];
1589
- let O = D, A;
1590
- t[12] !== w || t[13] !== f || t[14] !== g ? (A = (e) => {
1591
- w(Le(Array.from(e.currentTarget.files ?? []), g, f)), e.currentTarget.value = "";
1592
- }, t[12] = w, t[13] = f, t[14] = g, t[15] = A) : A = t[15];
1593
- let j;
1594
- t[16] !== o || t[17] !== f || t[18] !== A ? (j = /* @__PURE__ */ I("input", {
1595
- ref: y,
1596
- hidden: !0,
1597
- type: "file",
1598
- accept: o,
1599
- multiple: f,
1600
- onChange: A
1601
- }), t[16] = o, t[17] = f, t[18] = A, t[19] = j) : j = t[19];
1602
- let M = j;
1603
- if (m === "horizontal") {
1604
- let e;
1605
- t[20] !== u || t[21] !== E || t[22] !== g ? (e = /* @__PURE__ */ I(Be, {
1606
- readOnly: u,
1607
- values: g,
1608
- onRemove: E
1609
- }), t[20] = u, t[21] = E, t[22] = g, t[23] = e) : e = t[23];
1610
- let n;
1611
- return t[24] !== O || t[25] !== M || t[26] !== e ? (n = /* @__PURE__ */ L(_, {
1612
- alignItems: "center",
1613
- gap: "sm",
1614
- minW: "0",
1615
- width: "full",
1616
- children: [
1617
- M,
1618
- O,
1619
- e
1620
- ]
1621
- }), t[24] = O, t[25] = M, t[26] = e, t[27] = n) : n = t[27], n;
1622
- }
1623
- let N;
1624
- t[28] !== u || t[29] !== E || t[30] !== g ? (N = /* @__PURE__ */ I(Be, {
1625
- readOnly: u,
1626
- values: g,
1627
- onRemove: E
1628
- }), t[28] = u, t[29] = E, t[30] = g, t[31] = N) : N = t[31];
1629
- let F;
1630
- t[32] !== O || t[33] !== M || t[34] !== N ? (F = /* @__PURE__ */ L(k, {
1631
- alignItems: "start",
1632
- gap: "xs",
1633
- minW: "0",
1634
- children: [
1635
- M,
1636
- O,
1637
- N
1638
- ]
1639
- }), t[32] = O, t[33] = M, t[34] = N, t[35] = F) : F = t[35];
1640
- let V;
1641
- return t[36] !== i || t[37] !== r || t[38] !== F ? (V = /* @__PURE__ */ I(Z, {
1642
- name: r,
1643
- description: i,
1644
- orientation: "stacked",
1645
- children: F
1646
- }), t[36] = i, t[37] = r, t[38] = F, t[39] = V) : V = t[39], V;
1647
- }, He = (e, t, n) => {
1648
- let r = Math.min(t, n), i = Math.max(t, n);
1649
- return e < r ? r : e > i ? i : e;
1650
- }, Ue = (e, t, n = 0) => t > 0 ? n + Math.round((e - n) / t) * t : e, We = (e, t) => {
1651
- let n = Number.isInteger(e) ? `${e}` : `${Number(e.toFixed(3))}`;
1652
- return t ? `${n}${t}` : n;
1653
- }, Ge = (e, t, n, r) => {
1654
- let i = He(e[0], t, n), a = He(e[1], t, n), o = Math.min(i, a), s = Math.max(i, a);
1655
- return r && r > 0 && (o = He(Ue(o, r, t), t, n), s = He(Ue(s, r, t), t, n)), [o, s];
1656
- }, Ke = (e) => {
1657
- let t = P(4), { count: n } = e;
1658
- if (!n || n < 2) return null;
1659
- let r;
1660
- t[0] === n ? r = t[1] : (r = Array.from({ length: n }, (e, t) => t / (n - 1)), t[0] = n, t[1] = r);
1661
- let i = r, a;
1662
- return t[2] === i ? a = t[3] : (a = /* @__PURE__ */ I(_, {
1663
- justifyContent: "space-between",
1664
- mt: "2xs",
1665
- "aria-hidden": "true",
1666
- children: i.map(qe)
1667
- }), t[2] = i, t[3] = a), a;
1668
- };
1669
- function qe(e) {
1670
- return /* @__PURE__ */ I(m, {
1671
- width: "1px",
1672
- height: "0.375rem",
1673
- bg: "border.subtle"
1674
- }, e);
1675
- }
1676
- //#endregion
1677
- //#region src/components/param-editor/inputs/range-input.tsx
1678
- var Je = (e) => {
1679
- let t = P(71), { id: n, name: r, description: i, defaultValue: a, min: o, max: s, step: c, unit: u, markerCount: d, onChange: f, readOnly: p, fullWidth: g, presentation: v } = e, y = c === void 0 ? 1 : c, b = v === void 0 ? "stacked" : v, S;
1680
- t[0] !== a || t[1] !== s || t[2] !== o || t[3] !== y ? (S = () => Ge(a, o, s, y), t[0] = a, t[1] = s, t[2] = o, t[3] = y, t[4] = S) : S = t[4];
1681
- let [C, w] = B(S), T, D;
1682
- t[5] !== a || t[6] !== s || t[7] !== o || t[8] !== y ? (T = () => {
1683
- w(Ge(a, o, s, y));
1684
- }, D = [
1685
- a,
1686
- o,
1687
- s,
1688
- y
1689
- ], t[5] = a, t[6] = s, t[7] = o, t[8] = y, t[9] = T, t[10] = D) : (T = t[9], D = t[10]), R(T, D);
1690
- let O;
1691
- t[11] !== u || t[12] !== C[0] ? (O = We(C[0], u), t[11] = u, t[12] = C[0], t[13] = O) : O = t[13];
1692
- let j;
1693
- t[14] !== u || t[15] !== C[1] ? (j = We(C[1], u), t[14] = u, t[15] = C[1], t[16] = j) : j = t[16];
1694
- let M = `${O} – ${j}`, N = b === "horizontal";
1695
- if (p) {
1696
- if (N) {
1697
- let e;
1698
- return t[17] === M ? e = t[18] : (e = /* @__PURE__ */ I(Q, { children: M }), t[17] = M, t[18] = e), e;
1699
- }
1700
- let e;
1701
- t[19] === M ? e = t[20] : (e = /* @__PURE__ */ I(Q, { children: M }), t[19] = M, t[20] = e);
1702
- let n;
1703
- return t[21] !== i || t[22] !== g || t[23] !== r || t[24] !== e ? (n = /* @__PURE__ */ I(Z, {
1704
- name: r,
1705
- description: i,
1706
- fullWidth: g,
1707
- children: e
1708
- }), t[21] = i, t[22] = g, t[23] = r, t[24] = e, t[25] = n) : n = t[25], n;
1709
- }
1710
- let F;
1711
- t[26] === M ? F = t[27] : (F = /* @__PURE__ */ I(A, {
1712
- textStyle: "label/S/regular",
1713
- color: "fg.muted",
1714
- whiteSpace: "nowrap",
1715
- children: M
1716
- }), t[26] = M, t[27] = F);
1717
- let z = F, V;
1718
- t[28] !== s || t[29] !== o || t[30] !== y ? (V = (e) => w(Ge(e.value, o, s, y)), t[28] = s, t[29] = o, t[30] = y, t[31] = V) : V = t[31];
1719
- let U;
1720
- t[32] !== n || t[33] !== s || t[34] !== o || t[35] !== f || t[36] !== y ? (U = (e) => {
1721
- let t = Ge(e.value, o, s, y);
1722
- w(t), f(n, t);
1723
- }, t[32] = n, t[33] = s, t[34] = o, t[35] = f, t[36] = y, t[37] = U) : U = t[37];
1724
- let W;
1725
- t[38] !== s || t[39] !== o || t[40] !== y || t[41] !== V || t[42] !== U || t[43] !== C ? (W = /* @__PURE__ */ I(l, {
1726
- size: "sm",
1727
- value: C,
1728
- min: o,
1729
- max: s,
1730
- step: y,
1731
- onValueChange: V,
1732
- onValueChangeEnd: U
1733
- }), t[38] = s, t[39] = o, t[40] = y, t[41] = V, t[42] = U, t[43] = C, t[44] = W) : W = t[44];
1734
- let G;
1735
- t[45] === d ? G = t[46] : (G = /* @__PURE__ */ I(Ke, { count: d }), t[45] = d, t[46] = G);
1736
- let K;
1737
- t[47] !== W || t[48] !== G ? (K = /* @__PURE__ */ L(m, { children: [W, G] }), t[47] = W, t[48] = G, t[49] = K) : K = t[49];
1738
- let q = K;
1739
- if (N) {
1740
- let e;
1741
- t[50] === Symbol.for("react.memo_cache_sentinel") ? (e = {
1742
- placement: "bottom-start",
1743
- offset: { mainAxis: 4 }
1744
- }, t[50] = e) : e = t[50];
1745
- let n = `${r}: ${M}`, i;
1746
- t[51] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ I(x, {
1747
- as: H,
1748
- boxSize: "14px"
1749
- }), t[51] = i) : i = t[51];
1750
- let a;
1751
- t[52] !== M || t[53] !== n ? (a = /* @__PURE__ */ I(E.Trigger, {
1752
- asChild: !0,
1753
- children: /* @__PURE__ */ L(h, {
1754
- size: "xs",
1755
- variant: "ghost",
1756
- "aria-label": n,
1757
- children: [M, i]
1758
- })
1759
- }), t[52] = M, t[53] = n, t[54] = a) : a = t[54];
1760
- let o;
1761
- t[55] === r ? o = t[56] : (o = /* @__PURE__ */ I(A, {
1762
- textStyle: "label/S/medium",
1763
- children: r
1764
- }), t[55] = r, t[56] = o);
1765
- let s;
1766
- t[57] !== o || t[58] !== z ? (s = /* @__PURE__ */ L(_, {
1767
- alignItems: "center",
1768
- justifyContent: "space-between",
1769
- gap: "xs",
1770
- children: [o, z]
1771
- }), t[57] = o, t[58] = z, t[59] = s) : s = t[59];
1772
- let c;
1773
- t[60] !== q || t[61] !== s ? (c = /* @__PURE__ */ I(E.Positioner, { children: /* @__PURE__ */ I(E.Content, {
1774
- width: "60",
1775
- padding: "sm",
1776
- background: "bg",
1777
- children: /* @__PURE__ */ L(k, {
1778
- gap: "xs",
1779
- children: [s, q]
1780
- })
1781
- }) }), t[60] = q, t[61] = s, t[62] = c) : c = t[62];
1782
- let l;
1783
- return t[63] !== a || t[64] !== c ? (l = /* @__PURE__ */ L(E.Root, {
1784
- positioning: e,
1785
- children: [a, c]
1786
- }), t[63] = a, t[64] = c, t[65] = l) : l = t[65], l;
1787
- }
1788
- let J;
1789
- return t[66] !== i || t[67] !== r || t[68] !== q || t[69] !== z ? (J = /* @__PURE__ */ I(Z, {
1790
- name: r,
1791
- description: i,
1792
- orientation: "stacked",
1793
- labelTrailing: z,
1794
- children: q
1795
- }), t[66] = i, t[67] = r, t[68] = q, t[69] = z, t[70] = J) : J = t[70], J;
1796
- }, Ye = (e) => {
1797
- let t = P(42), { id: n, name: r, description: i, defaultValue: a, options: o, variant: s, onChange: c, readOnly: l, fullWidth: u, presentation: d } = e, f = s === void 0 ? "default" : s, p = d === void 0 ? "stacked" : d, [g, _] = B(a), v, b;
1798
- t[0] === a ? (v = t[1], b = t[2]) : (v = () => {
1799
- _(a);
1800
- }, b = [a], t[0] = a, t[1] = v, t[2] = b), R(v, b);
1801
- let x;
1802
- t[3] !== n || t[4] !== c ? (x = (e) => {
1803
- _(e), c(n, e);
1804
- }, t[3] = n, t[4] = c, t[5] = x) : x = t[5];
1805
- let S = x, C;
1806
- t[6] !== o || t[7] !== g ? (C = o.find((e) => e.id === g)?.name ?? g, t[6] = o, t[7] = g, t[8] = C) : C = t[8];
1807
- let w = C, T = p === "horizontal";
1808
- if (l) {
1809
- let e;
1810
- t[9] === w ? e = t[10] : (e = /* @__PURE__ */ I(Q, { children: w }), t[9] = w, t[10] = e);
1811
- let n;
1812
- return t[11] !== i || t[12] !== u || t[13] !== T || t[14] !== r || t[15] !== e ? (n = /* @__PURE__ */ I(Z, {
1813
- name: r,
1814
- description: i,
1815
- hideLabel: T,
1816
- fullWidth: u,
1817
- children: e
1818
- }), t[11] = i, t[12] = u, t[13] = T, t[14] = r, t[15] = e, t[16] = n) : n = t[16], n;
1819
- }
1820
- if (T) {
1821
- let e;
1822
- t[17] === g ? e = t[18] : (e = [g], t[17] = g, t[18] = e);
1823
- let n;
1824
- return t[19] !== o || t[20] !== S || t[21] !== w || t[22] !== e ? (n = /* @__PURE__ */ I(be, {
1825
- triggerLabel: w,
1826
- options: o,
1827
- selectedIds: e,
1828
- multiSelect: !1,
1829
- onToggle: S
1830
- }), t[19] = o, t[20] = S, t[21] = w, t[22] = e, t[23] = n) : n = t[23], n;
1831
- }
1832
- let E, D, O;
1833
- t[24] === Symbol.for("react.memo_cache_sentinel") ? (E = { borderColor: "border.accent-light" }, D = { borderColor: "border.accent-light" }, O = {
1834
- borderColor: "border.accent-light",
1835
- boxShadow: "none"
1836
- }, t[24] = E, t[25] = D, t[26] = O) : (E = t[24], D = t[25], O = t[26]);
1837
- let k;
1838
- if (t[27] !== o || t[28] !== S || t[29] !== g || t[30] !== f) {
1839
- let e;
1840
- t[32] !== S || t[33] !== g || t[34] !== f ? (e = (e) => {
1841
- let t = e.id === g;
1842
- return /* @__PURE__ */ L(h, {
1843
- flex: "1",
1844
- size: "xs",
1845
- variant: t ? "subtle" : "ghost",
1846
- borderRadius: "0",
1847
- "aria-pressed": t,
1848
- onClick: () => S(e.id),
1849
- children: [f === "dots" ? /* @__PURE__ */ I(m, {
1850
- boxSize: "0.5rem",
1851
- borderRadius: "full",
1852
- bg: e.indicatorColor ?? "fg.muted",
1853
- mr: "1"
1854
- }) : null, e.name]
1855
- }, e.id);
1856
- }, t[32] = S, t[33] = g, t[34] = f, t[35] = e) : e = t[35], k = o.map(e), t[27] = o, t[28] = S, t[29] = g, t[30] = f, t[31] = k;
1857
- } else k = t[31];
1858
- let A;
1859
- t[36] === k ? A = t[37] : (A = /* @__PURE__ */ I(y, {
1860
- attached: !0,
1861
- width: "full",
1862
- borderWidth: "1px",
1863
- borderColor: "border",
1864
- borderRadius: "xs",
1865
- overflow: "hidden",
1866
- transition: "border-color 0.2s ease-in-out",
1867
- _hover: E,
1868
- _active: D,
1869
- _focusWithin: O,
1870
- children: k
1871
- }), t[36] = k, t[37] = A);
1872
- let j = A, M;
1873
- return t[38] !== i || t[39] !== j || t[40] !== r ? (M = /* @__PURE__ */ I(Z, {
1874
- name: r,
1875
- description: i,
1876
- orientation: "stacked",
1877
- children: j
1878
- }), t[38] = i, t[39] = j, t[40] = r, t[41] = M) : M = t[41], M;
1879
- }, Xe = (e) => {
1880
- let t = P(6), n, r;
1881
- t[0] === e ? (n = t[1], r = t[2]) : ({children: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
1882
- let i;
1883
- return t[3] !== n || t[4] !== r ? (i = /* @__PURE__ */ I(_, {
1884
- alignItems: "center",
1885
- gap: "xs",
1886
- minW: "0",
1887
- ...r,
1888
- children: n
1889
- }), t[3] = n, t[4] = r, t[5] = i) : i = t[5], i;
1890
- }, Ze = (e, t) => t.min === void 0 && t.max === void 0 ? e : He(e, t.min ?? -Infinity, t.max ?? Infinity), Qe = (e, t, n, r = {}) => {
1891
- let i = Ze(n, r);
1892
- return t === "x" ? {
1893
- x: i,
1894
- y: e.y
1895
- } : {
1896
- x: e.x,
1897
- y: i
1898
- };
1899
- }, $e = (e) => {
1900
- let t = P(15), { label: n, fieldId: r, value: i, min: a, max: o, step: s, onCommit: c } = e, l;
1901
- t[0] === n ? l = t[1] : (l = /* @__PURE__ */ I(A, {
1902
- textStyle: "label/XS/regular",
1903
- color: "fg.muted",
1904
- width: "1rem",
1905
- flexShrink: 0,
1906
- children: n
1907
- }), t[0] = n, t[1] = l);
1908
- let u;
1909
- t[2] === c ? u = t[3] : (u = (e, t) => c(t), t[2] = c, t[3] = u);
1910
- let d;
1911
- t[4] !== r || t[5] !== n || t[6] !== o || t[7] !== a || t[8] !== s || t[9] !== u || t[10] !== i ? (d = /* @__PURE__ */ I(le, {
1912
- id: r,
1913
- name: n,
1914
- description: "",
1915
- defaultValue: i,
1916
- min: a,
1917
- max: o,
1918
- step: s,
1919
- hideLabel: !0,
1920
- hideSlider: !0,
1921
- onChange: u
1922
- }), t[4] = r, t[5] = n, t[6] = o, t[7] = a, t[8] = s, t[9] = u, t[10] = i, t[11] = d) : d = t[11];
1923
- let f;
1924
- return t[12] !== l || t[13] !== d ? (f = /* @__PURE__ */ L(_, {
1925
- alignItems: "center",
1926
- gap: "1",
1927
- flexShrink: 0,
1928
- children: [l, d]
1929
- }), t[12] = l, t[13] = d, t[14] = f) : f = t[14], f;
1930
- }, et = (e) => {
1931
- let t = P(42), { id: n, name: r, description: i, defaultValue: a, xLabel: o, yLabel: s, min: c, max: l, step: u, onChange: d, readOnly: f } = e, p = o === void 0 ? "X" : o, m = s === void 0 ? "Y" : s, h = u === void 0 ? 1 : u, [g, _] = B(a), v, y;
1932
- t[0] === a ? (v = t[1], y = t[2]) : (v = () => {
1933
- _(a);
1934
- }, y = [a], t[0] = a, t[1] = v, t[2] = y), R(v, y);
1935
- let b;
1936
- t[3] !== n || t[4] !== l || t[5] !== c || t[6] !== d || t[7] !== g ? (b = (e, t) => {
1937
- let r = Qe(g, e, t, {
1938
- min: c,
1939
- max: l
1940
- });
1941
- _(r), d(n, r);
1942
- }, t[3] = n, t[4] = l, t[5] = c, t[6] = d, t[7] = g, t[8] = b) : b = t[8];
1943
- let x = b;
1944
- if (f) {
1945
- let e = `${g.x}, ${g.y}`, n;
1946
- t[9] === e ? n = t[10] : (n = /* @__PURE__ */ I(Q, { children: e }), t[9] = e, t[10] = n);
1947
- let a;
1948
- return t[11] !== i || t[12] !== r || t[13] !== n ? (a = /* @__PURE__ */ I(Z, {
1949
- name: r,
1950
- description: i,
1951
- children: n
1952
- }), t[11] = i, t[12] = r, t[13] = n, t[14] = a) : a = t[14], a;
1953
- }
1954
- let S = `${n}.x`, C;
1955
- t[15] === x ? C = t[16] : (C = (e) => x("x", e), t[15] = x, t[16] = C);
1956
- let w;
1957
- t[17] !== l || t[18] !== c || t[19] !== h || t[20] !== S || t[21] !== C || t[22] !== g.x || t[23] !== p ? (w = /* @__PURE__ */ I($e, {
1958
- label: p,
1959
- fieldId: S,
1960
- value: g.x,
1961
- min: c,
1962
- max: l,
1963
- step: h,
1964
- onCommit: C
1965
- }), t[17] = l, t[18] = c, t[19] = h, t[20] = S, t[21] = C, t[22] = g.x, t[23] = p, t[24] = w) : w = t[24];
1966
- let T = `${n}.y`, E;
1967
- t[25] === x ? E = t[26] : (E = (e) => x("y", e), t[25] = x, t[26] = E);
1968
- let D;
1969
- t[27] !== l || t[28] !== c || t[29] !== h || t[30] !== E || t[31] !== T || t[32] !== g.y || t[33] !== m ? (D = /* @__PURE__ */ I($e, {
1970
- label: m,
1971
- fieldId: T,
1972
- value: g.y,
1973
- min: c,
1974
- max: l,
1975
- step: h,
1976
- onCommit: E
1977
- }), t[27] = l, t[28] = c, t[29] = h, t[30] = E, t[31] = T, t[32] = g.y, t[33] = m, t[34] = D) : D = t[34];
1978
- let O;
1979
- t[35] !== D || t[36] !== w ? (O = /* @__PURE__ */ L(Xe, { children: [w, D] }), t[35] = D, t[36] = w, t[37] = O) : O = t[37];
1980
- let k;
1981
- return t[38] !== i || t[39] !== r || t[40] !== O ? (k = /* @__PURE__ */ I(Z, {
1982
- name: r,
1983
- description: i,
1984
- orientation: "stacked",
1985
- children: O
1986
- }), t[38] = i, t[39] = r, t[40] = O, t[41] = k) : k = t[41], k;
1987
- }, $ = (e, t, n) => e[t] === void 0 ? n : e[t], tt = (e) => {
1988
- let t = P(81), { param: n, defaultValues: r, onChange: i, readOnly: a, fullWidth: o, presentation: s } = e, c = a || n.readOnly, l = s !== "horizontal" && o, u;
1989
- t[0] !== i || t[1] !== n.id || t[2] !== c || t[3] !== l ? (u = {
1990
- id: n.id,
1991
- readOnly: c,
1992
- onChange: i,
1993
- fullWidth: l
1994
- }, t[0] = i, t[1] = n.id, t[2] = c, t[3] = l, t[4] = u) : u = t[4];
1995
- let d = u;
1996
- switch (n.type) {
1997
- case "range": {
1998
- let e = n.name, i = n.description, a;
1999
- t[5] !== r || t[6] !== n.defaultValue || t[7] !== n.id ? (a = $(r, n.id, n.defaultValue), t[5] = r, t[6] = n.defaultValue, t[7] = n.id, t[8] = a) : a = t[8];
2000
- let o;
2001
- return t[9] !== d || t[10] !== n.description || t[11] !== n.markerCount || t[12] !== n.max || t[13] !== n.min || t[14] !== n.name || t[15] !== n.step || t[16] !== n.unit || t[17] !== s || t[18] !== a ? (o = /* @__PURE__ */ I(Je, {
2002
- ...d,
2003
- name: e,
2004
- description: i,
2005
- defaultValue: a,
2006
- min: n.min,
2007
- max: n.max,
2008
- step: n.step,
2009
- unit: n.unit,
2010
- markerCount: n.markerCount,
2011
- presentation: s
2012
- }), t[9] = d, t[10] = n.description, t[11] = n.markerCount, t[12] = n.max, t[13] = n.min, t[14] = n.name, t[15] = n.step, t[16] = n.unit, t[17] = s, t[18] = a, t[19] = o) : o = t[19], o;
2013
- }
2014
- case "segmented": {
2015
- let e = n.name, i = n.description, a;
2016
- t[20] !== r || t[21] !== n.defaultValue || t[22] !== n.id ? (a = $(r, n.id, n.defaultValue), t[20] = r, t[21] = n.defaultValue, t[22] = n.id, t[23] = a) : a = t[23];
2017
- let o;
2018
- return t[24] !== d || t[25] !== n.description || t[26] !== n.name || t[27] !== n.options || t[28] !== n.variant || t[29] !== s || t[30] !== a ? (o = /* @__PURE__ */ I(Ye, {
2019
- ...d,
2020
- name: e,
2021
- description: i,
2022
- defaultValue: a,
2023
- options: n.options,
2024
- variant: n.variant,
2025
- presentation: s
2026
- }), t[24] = d, t[25] = n.description, t[26] = n.name, t[27] = n.options, t[28] = n.variant, t[29] = s, t[30] = a, t[31] = o) : o = t[31], o;
2027
- }
2028
- case "actions": {
2029
- let e = n.name, i = n.description, a;
2030
- t[32] !== r || t[33] !== n.defaultValue || t[34] !== n.id ? (a = $(r, n.id, n.defaultValue), t[32] = r, t[33] = n.defaultValue, t[34] = n.id, t[35] = a) : a = t[35];
2031
- let o;
2032
- return t[36] !== d || t[37] !== n.description || t[38] !== n.name || t[39] !== n.options || t[40] !== s || t[41] !== a ? (o = /* @__PURE__ */ I(Me, {
2033
- ...d,
2034
- name: e,
2035
- description: i,
2036
- defaultValue: a,
2037
- options: n.options,
2038
- presentation: s
2039
- }), t[36] = d, t[37] = n.description, t[38] = n.name, t[39] = n.options, t[40] = s, t[41] = a, t[42] = o) : o = t[42], o;
2040
- }
2041
- case "anchorGrid": {
2042
- if (s === "horizontal") return null;
2043
- let e = n.name, i = n.description, a;
2044
- t[43] !== r || t[44] !== n.defaultValue || t[45] !== n.id ? (a = $(r, n.id, n.defaultValue), t[43] = r, t[44] = n.defaultValue, t[45] = n.id, t[46] = a) : a = t[46];
2045
- let o;
2046
- return t[47] !== d || t[48] !== n.description || t[49] !== n.name || t[50] !== a ? (o = /* @__PURE__ */ I(Fe, {
2047
- ...d,
2048
- name: e,
2049
- description: i,
2050
- defaultValue: a
2051
- }), t[47] = d, t[48] = n.description, t[49] = n.name, t[50] = a, t[51] = o) : o = t[51], o;
2052
- }
2053
- case "vector": {
2054
- let e = n.name, i = n.description, a;
2055
- t[52] !== r || t[53] !== n.defaultValue || t[54] !== n.id ? (a = $(r, n.id, n.defaultValue), t[52] = r, t[53] = n.defaultValue, t[54] = n.id, t[55] = a) : a = t[55];
2056
- let o;
2057
- return t[56] !== d || t[57] !== n.description || t[58] !== n.max || t[59] !== n.min || t[60] !== n.name || t[61] !== n.step || t[62] !== n.xLabel || t[63] !== n.yLabel || t[64] !== a ? (o = /* @__PURE__ */ I(et, {
2058
- ...d,
2059
- name: e,
2060
- description: i,
2061
- defaultValue: a,
2062
- xLabel: n.xLabel,
2063
- yLabel: n.yLabel,
2064
- min: n.min,
2065
- max: n.max,
2066
- step: n.step
2067
- }), t[56] = d, t[57] = n.description, t[58] = n.max, t[59] = n.min, t[60] = n.name, t[61] = n.step, t[62] = n.xLabel, t[63] = n.yLabel, t[64] = a, t[65] = o) : o = t[65], o;
2068
- }
2069
- case "fileUpload": {
2070
- let e = n.id, a = n.name, o = n.description, c;
2071
- t[66] !== r || t[67] !== n.defaultValue || t[68] !== n.id ? (c = $(r, n.id, n.defaultValue), t[66] = r, t[67] = n.defaultValue, t[68] = n.id, t[69] = c) : c = t[69];
2072
- let l;
2073
- return t[70] !== d.readOnly || t[71] !== i || t[72] !== n.accept || t[73] !== n.description || t[74] !== n.id || t[75] !== n.multiple || t[76] !== n.name || t[77] !== n.uploadLabel || t[78] !== s || t[79] !== c ? (l = /* @__PURE__ */ I(Ve, {
2074
- id: e,
2075
- name: a,
2076
- description: o,
2077
- defaultValue: c,
2078
- accept: n.accept,
2079
- multiple: n.multiple,
2080
- uploadLabel: n.uploadLabel,
2081
- readOnly: d.readOnly,
2082
- presentation: s,
2083
- onChange: i
2084
- }), t[70] = d.readOnly, t[71] = i, t[72] = n.accept, t[73] = n.description, t[74] = n.id, t[75] = n.multiple, t[76] = n.name, t[77] = n.uploadLabel, t[78] = s, t[79] = c, t[80] = l) : l = t[80], l;
2085
- }
2086
- }
2087
- }, nt = (e) => e.type === "fileUpload", rt = (e) => e.type !== "anchorGrid", it = (e) => e === null || e === "" ? "Not provided" : String(e), at = (e) => {
2088
- let t = P(23), { value: n } = e;
2089
- if (Array.isArray(n)) {
2090
- if (n.length === 0) {
2091
- let e;
2092
- return t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ I(Q, {
2093
- color: "fg.muted",
2094
- children: "None"
2095
- }), t[0] = e) : e = t[0], e;
2096
- }
2097
- let e;
2098
- t[1] === n ? e = t[2] : (e = n.map(st), t[1] = n, t[2] = e);
2099
- let r;
2100
- return t[3] === e ? r = t[4] : (r = /* @__PURE__ */ I(b, {
2101
- gap: "2xs",
2102
- flexWrap: "wrap",
2103
- children: e
2104
- }), t[3] = e, t[4] = r), r;
2105
- }
2106
- if (typeof n == "object" && n) {
2107
- let e;
2108
- t[5] !== n.alt || t[6] !== n.images || t[7] !== n.src || t[8] !== n.type ? (e = n.type === "image" ? [{
2109
- src: n.src,
2110
- alt: n.alt
2111
- }] : n.images, t[5] = n.alt, t[6] = n.images, t[7] = n.src, t[8] = n.type, t[9] = e) : e = t[9];
2112
- let r = e, i;
2113
- t[10] === r ? i = t[11] : (i = r.map(ct), t[10] = r, t[11] = i);
2114
- let a;
2115
- return t[12] === i ? a = t[13] : (a = /* @__PURE__ */ I(b, {
2116
- gap: "2xs",
2117
- flexWrap: "wrap",
2118
- children: i
2119
- }), t[12] = i, t[13] = a), a;
2120
- }
2121
- if (typeof n == "boolean") {
2122
- let e;
2123
- t[14] === n ? e = t[15] : (e = it(n), t[14] = n, t[15] = e);
2124
- let r;
2125
- return t[16] === e ? r = t[17] : (r = /* @__PURE__ */ I(Q, { children: e }), t[16] = e, t[17] = r), r;
2126
- }
2127
- let r = n === null || n === "" ? "fg.muted" : "fg", i;
2128
- t[18] === n ? i = t[19] : (i = it(n), t[18] = n, t[19] = i);
2129
- let a;
2130
- return t[20] !== r || t[21] !== i ? (a = /* @__PURE__ */ I(Q, {
2131
- color: r,
2132
- children: i
2133
- }), t[20] = r, t[21] = i, t[22] = a) : a = t[22], a;
2134
- }, ot = (e) => {
2135
- let t = P(7), { param: n, fullWidth: r } = e, i;
2136
- t[0] === n.value ? i = t[1] : (i = /* @__PURE__ */ I(at, { value: n.value }), t[0] = n.value, t[1] = i);
2137
- let a;
2138
- return t[2] !== r || t[3] !== n.description || t[4] !== n.name || t[5] !== i ? (a = /* @__PURE__ */ I(Z, {
2139
- name: n.name,
2140
- description: n.description,
2141
- fullWidth: r,
2142
- children: i
2143
- }), t[2] = r, t[3] = n.description, t[4] = n.name, t[5] = i, t[6] = a) : a = t[6], a;
2144
- };
2145
- function st(e, t) {
2146
- return /* @__PURE__ */ I(p, {
2147
- variant: "subtle",
2148
- colorPalette: "gray",
2149
- children: it(e)
2150
- }, `${String(e)}-${t}`);
2151
- }
2152
- function ct(e) {
2153
- return /* @__PURE__ */ I(C, {
2154
- src: e.src,
2155
- alt: e.alt,
2156
- width: "96px",
2157
- height: "72px",
2158
- borderRadius: "sm",
2159
- borderWidth: "1px",
2160
- borderColor: "border.subtle",
2161
- objectFit: "cover"
2162
- }, `${e.src}-${e.alt}`);
2163
- }
2164
- //#endregion
2165
- //#region src/components/param-editor/param-editor-field.tsx
2166
- var lt = (e) => {
2167
- let t = P(16), { param: n, fullWidth: r } = e;
2168
- if (r) {
2169
- let e;
2170
- t[0] !== n.description || t[1] !== n.name ? (e = /* @__PURE__ */ I(m, {
2171
- mb: "xs",
2172
- children: /* @__PURE__ */ I(X, {
2173
- name: n.name,
2174
- description: n.description
2175
- })
2176
- }), t[0] = n.description, t[1] = n.name, t[2] = e) : e = t[2];
2177
- let r;
2178
- t[3] === n.value ? r = t[4] : (r = /* @__PURE__ */ I(Q, { children: n.value }), t[3] = n.value, t[4] = r);
2179
- let i;
2180
- return t[5] !== e || t[6] !== r ? (i = /* @__PURE__ */ L(m, { children: [e, r] }), t[5] = e, t[6] = r, t[7] = i) : i = t[7], i;
2181
- }
2182
- let i;
2183
- t[8] !== n.description || t[9] !== n.name ? (i = /* @__PURE__ */ I(X, {
2184
- name: n.name,
2185
- description: n.description
2186
- }), t[8] = n.description, t[9] = n.name, t[10] = i) : i = t[10];
2187
- let a;
2188
- t[11] === n.value ? a = t[12] : (a = /* @__PURE__ */ I(Q, { children: n.value }), t[11] = n.value, t[12] = a);
2189
- let o;
2190
- return t[13] !== i || t[14] !== a ? (o = /* @__PURE__ */ L(_, {
2191
- alignItems: "center",
2192
- justifyContent: "space-between",
2193
- minHeight: "2rem",
2194
- gap: "xs",
2195
- children: [i, a]
2196
- }), t[13] = i, t[14] = a, t[15] = o) : o = t[15], o;
2197
- }, ut = (e) => {
2198
- let t = P(138), { param: n, defaultValues: r, onChange: i, onOpenResource: a, readOnly: o, fullWidth: s, presentation: c, size: l } = e, u = s !== void 0 && s, d = c === void 0 ? "stacked" : c, f = l === void 0 ? "sm" : l, p = d === "horizontal", m;
2199
- t[0] === n ? m = t[1] : (m = nt(n), t[0] = n, t[1] = m);
2200
- let h = m, g = o || n.readOnly, _ = p ? h : u, v;
2201
- t[2] !== i || t[3] !== n.id || t[4] !== f || t[5] !== g || t[6] !== _ ? (v = {
2202
- id: n.id,
2203
- readOnly: g,
2204
- onChange: i,
2205
- fullWidth: _,
2206
- size: f
2207
- }, t[2] = i, t[3] = n.id, t[4] = f, t[5] = g, t[6] = _, t[7] = v) : v = t[7];
2208
- let y = v;
2209
- switch (n.type) {
2210
- case "number": {
2211
- let e = n.name, i = n.description || "", a;
2212
- t[8] !== r || t[9] !== n.defaultValue || t[10] !== n.id ? (a = $(r, n.id, n.defaultValue), t[8] = r, t[9] = n.defaultValue, t[10] = n.id, t[11] = a) : a = t[11];
2213
- let o;
2214
- return t[12] !== y || t[13] !== p || t[14] !== n.max || t[15] !== n.min || t[16] !== n.name || t[17] !== n.step || t[18] !== i || t[19] !== a ? (o = /* @__PURE__ */ I(le, {
2215
- ...y,
2216
- name: e,
2217
- description: i,
2218
- defaultValue: a,
2219
- min: n.min,
2220
- max: n.max,
2221
- step: n.step,
2222
- hideLabel: p,
2223
- hideSlider: p
2224
- }), t[12] = y, t[13] = p, t[14] = n.max, t[15] = n.min, t[16] = n.name, t[17] = n.step, t[18] = i, t[19] = a, t[20] = o) : o = t[20], o;
2225
- }
2226
- case "boolean": {
2227
- let e = n.name, i = n.description, a;
2228
- t[21] !== r || t[22] !== n.defaultValue || t[23] !== n.id ? (a = $(r, n.id, n.defaultValue), t[21] = r, t[22] = n.defaultValue, t[23] = n.id, t[24] = a) : a = t[24];
2229
- let o;
2230
- return t[25] !== y || t[26] !== p || t[27] !== n.description || t[28] !== n.name || t[29] !== a ? (o = /* @__PURE__ */ I(te, {
2231
- ...y,
2232
- name: e,
2233
- description: i,
2234
- defaultValue: a,
2235
- hideLabel: p
2236
- }), t[25] = y, t[26] = p, t[27] = n.description, t[28] = n.name, t[29] = a, t[30] = o) : o = t[30], o;
2237
- }
2238
- case "text": {
2239
- if (p) {
2240
- let e = n.name, i = n.description || "", a;
2241
- t[31] !== r || t[32] !== n.defaultValue || t[33] !== n.id ? (a = $(r, n.id, n.defaultValue), t[31] = r, t[32] = n.defaultValue, t[33] = n.id, t[34] = a) : a = t[34];
2242
- let o;
2243
- return t[35] !== y || t[36] !== n.name || t[37] !== i || t[38] !== a ? (o = /* @__PURE__ */ I(oe, {
2244
- ...y,
2245
- name: e,
2246
- description: i,
2247
- defaultValue: a,
2248
- hideLabel: !0
2249
- }), t[35] = y, t[36] = n.name, t[37] = i, t[38] = a, t[39] = o) : o = t[39], o;
2250
- }
2251
- let e = n.name, i = n.description || "", a;
2252
- t[40] !== r || t[41] !== n.defaultValue || t[42] !== n.id ? (a = $(r, n.id, n.defaultValue), t[40] = r, t[41] = n.defaultValue, t[42] = n.id, t[43] = a) : a = t[43];
2253
- let o;
2254
- return t[44] !== y || t[45] !== n.name || t[46] !== n.singleLine || t[47] !== i || t[48] !== a ? (o = /* @__PURE__ */ I(ke, {
2255
- ...y,
2256
- name: e,
2257
- description: i,
2258
- defaultValue: a,
2259
- singleLine: n.singleLine
2260
- }), t[44] = y, t[45] = n.name, t[46] = n.singleLine, t[47] = i, t[48] = a, t[49] = o) : o = t[49], o;
2261
- }
2262
- case "markdown": {
2263
- let e = n.id, a = n.name, o = n.description, s;
2264
- t[50] !== r || t[51] !== n.defaultValue || t[52] !== n.id ? (s = $(r, n.id, n.defaultValue), t[50] = r, t[51] = n.defaultValue, t[52] = n.id, t[53] = s) : s = t[53];
2265
- let c;
2266
- return t[54] !== y.readOnly || t[55] !== i || t[56] !== n.description || t[57] !== n.id || t[58] !== n.name || t[59] !== n.placeholder || t[60] !== d || t[61] !== f || t[62] !== s ? (c = /* @__PURE__ */ I(ce, {
2267
- id: e,
2268
- name: a,
2269
- description: o,
2270
- defaultValue: s,
2271
- placeholder: n.placeholder,
2272
- readOnly: y.readOnly,
2273
- presentation: d,
2274
- size: f,
2275
- onChange: i
2276
- }), t[54] = y.readOnly, t[55] = i, t[56] = n.description, t[57] = n.id, t[58] = n.name, t[59] = n.placeholder, t[60] = d, t[61] = f, t[62] = s, t[63] = c) : c = t[63], c;
2277
- }
2278
- case "selection": {
2279
- let e = n.name, i = n.description || "", a;
2280
- t[64] !== r || t[65] !== n.defaultValue || t[66] !== n.id ? (a = $(r, n.id, n.defaultValue), t[64] = r, t[65] = n.defaultValue, t[66] = n.id, t[67] = a) : a = t[67];
2281
- let o;
2282
- t[68] !== r || t[69] !== n.group ? (o = n.group ? {
2283
- ...n.group,
2284
- defaultValue: $(r, n.group.id, n.group.defaultValue)
2285
- } : void 0, t[68] = r, t[69] = n.group, t[70] = o) : o = t[70];
2286
- let s;
2287
- return t[71] !== y || t[72] !== p || t[73] !== n.allowCustomValues || t[74] !== n.clearable || t[75] !== n.disabled || t[76] !== n.emptyText || t[77] !== n.multiSelect || t[78] !== n.name || t[79] !== n.options || t[80] !== n.placeholder || t[81] !== n.searchPlaceholder || t[82] !== n.searchable || t[83] !== o || t[84] !== i || t[85] !== a ? (s = /* @__PURE__ */ I(De, {
2288
- ...y,
2289
- name: e,
2290
- description: i,
2291
- defaultValue: a,
2292
- options: n.options,
2293
- multiSelect: n.multiSelect,
2294
- placeholder: n.placeholder,
2295
- clearable: n.clearable,
2296
- disabled: n.disabled,
2297
- searchable: n.searchable,
2298
- allowCustomValues: n.allowCustomValues,
2299
- searchPlaceholder: n.searchPlaceholder,
2300
- emptyText: n.emptyText,
2301
- group: o,
2302
- hideLabel: p
2303
- }), t[71] = y, t[72] = p, t[73] = n.allowCustomValues, t[74] = n.clearable, t[75] = n.disabled, t[76] = n.emptyText, t[77] = n.multiSelect, t[78] = n.name, t[79] = n.options, t[80] = n.placeholder, t[81] = n.searchPlaceholder, t[82] = n.searchable, t[83] = o, t[84] = i, t[85] = a, t[86] = s) : s = t[86], s;
2304
- }
2305
- case "date": {
2306
- let e = n.name, i = n.description || "", a;
2307
- t[87] !== r || t[88] !== n.defaultValue || t[89] !== n.id ? (a = $(r, n.id, n.defaultValue), t[87] = r, t[88] = n.defaultValue, t[89] = n.id, t[90] = a) : a = t[90];
2308
- let o;
2309
- return t[91] !== y || t[92] !== p || t[93] !== n.max || t[94] !== n.min || t[95] !== n.name || t[96] !== i || t[97] !== a ? (o = /* @__PURE__ */ I(re, {
2310
- ...y,
2311
- name: e,
2312
- description: i,
2313
- defaultValue: a,
2314
- min: n.min,
2315
- max: n.max,
2316
- hideLabel: p
2317
- }), t[91] = y, t[92] = p, t[93] = n.max, t[94] = n.min, t[95] = n.name, t[96] = i, t[97] = a, t[98] = o) : o = t[98], o;
2318
- }
2319
- case "color": {
2320
- let e = n.name, i = n.description || "", a;
2321
- t[99] !== r || t[100] !== n.defaultValue || t[101] !== n.id ? (a = $(r, n.id, n.defaultValue), t[99] = r, t[100] = n.defaultValue, t[101] = n.id, t[102] = a) : a = t[102];
2322
- let o;
2323
- return t[103] !== y || t[104] !== p || t[105] !== n.name || t[106] !== i || t[107] !== a ? (o = /* @__PURE__ */ I(ne, {
2324
- ...y,
2325
- name: e,
2326
- description: i,
2327
- defaultValue: a,
2328
- hideLabel: p
2329
- }), t[103] = y, t[104] = p, t[105] = n.name, t[106] = i, t[107] = a, t[108] = o) : o = t[108], o;
2330
- }
2331
- case "property": {
2332
- let e = !p && u, r;
2333
- return t[109] !== n || t[110] !== e ? (r = /* @__PURE__ */ I(lt, {
2334
- param: n,
2335
- fullWidth: e
2336
- }), t[109] = n, t[110] = e, t[111] = r) : r = t[111], r;
2337
- }
2338
- case "readOnly": {
2339
- let e = !p && u, r;
2340
- return t[112] !== n || t[113] !== e ? (r = /* @__PURE__ */ I(ot, {
2341
- param: n,
2342
- fullWidth: e
2343
- }), t[112] = n, t[113] = e, t[114] = r) : r = t[114], r;
2344
- }
2345
- case "resource": {
2346
- let e = n.name, i = n.description, o;
2347
- t[115] !== r || t[116] !== n.defaultValue || t[117] !== n.id ? (o = $(r, n.id, n.defaultValue), t[115] = r, t[116] = n.defaultValue, t[117] = n.id, t[118] = o) : o = t[118];
2348
- let s;
2349
- return t[119] !== y || t[120] !== a || t[121] !== n.description || t[122] !== n.editable || t[123] !== n.emptyText || t[124] !== n.multiSelect || t[125] !== n.name || t[126] !== n.options || t[127] !== n.placeholder || t[128] !== d || t[129] !== o ? (s = /* @__PURE__ */ I(Te, {
2350
- ...y,
2351
- name: e,
2352
- description: i,
2353
- defaultValue: o,
2354
- options: n.options,
2355
- multiSelect: n.multiSelect,
2356
- editable: n.editable,
2357
- placeholder: n.placeholder,
2358
- emptyText: n.emptyText,
2359
- onOpenResource: a,
2360
- presentation: d
2361
- }), t[119] = y, t[120] = a, t[121] = n.description, t[122] = n.editable, t[123] = n.emptyText, t[124] = n.multiSelect, t[125] = n.name, t[126] = n.options, t[127] = n.placeholder, t[128] = d, t[129] = o, t[130] = s) : s = t[130], s;
2362
- }
2363
- case "range":
2364
- case "segmented":
2365
- case "actions":
2366
- case "anchorGrid":
2367
- case "vector":
2368
- case "fileUpload": {
2369
- let e;
2370
- return t[131] !== r || t[132] !== u || t[133] !== i || t[134] !== n || t[135] !== d || t[136] !== o ? (e = /* @__PURE__ */ I(tt, {
2371
- param: n,
2372
- defaultValues: r,
2373
- onChange: i,
2374
- readOnly: o,
2375
- fullWidth: u,
2376
- presentation: d
2377
- }), t[131] = r, t[132] = u, t[133] = i, t[134] = n, t[135] = d, t[136] = o, t[137] = e) : e = t[137], e;
2378
- }
2379
- default: return null;
2380
- }
2381
- };
2382
- //#endregion
2383
- export { Q as C, te as S, X as T, le as _, et as a, re as b, Je as c, Ne as d, Pe as f, Te as g, De as h, nt as i, Ve as l, ke as m, ot as n, Xe as o, Me as p, rt as r, Ye as s, ut as t, Fe as u, ce as v, Z as w, ne as x, oe as y };
2384
-
2385
- //# sourceMappingURL=param-editor-field-BJ_rLUnV.js.map