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