@blocklet/pages-kit-inner-components 0.6.58 → 0.6.60

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/lib/es/setting.js CHANGED
@@ -1,147 +1,147 @@
1
- import { jsx as r, jsxs as v, Fragment as M } from "react/jsx-runtime";
2
- import { Box as P, Alert as Xe, Typography as D, TextField as V, Stack as k, FormLabel as Z, TableContainer as Ze, Paper as $, Table as je, TableHead as ze, TableRow as ee, TableCell as re, TableBody as Ve, Button as A, IconButton as G, FormControlLabel as ge, Switch as Re, InputAdornment as _, alpha as ae, Tooltip as J, buttonClasses as er, Dialog as ye, DialogTitle as Ee, DialogContent as Ae, DialogActions as De, Checkbox as rr, Autocomplete as Te, MenuItem as ce, Collapse as tr, Divider as nr, Popper as ir } from "@mui/material";
3
- import { t as xe, f as te, a as ie, h as ve } from "./chunks/state-DdT-7UdS.js";
1
+ import { jsx as r, jsxs as C, Fragment as F } from "react/jsx-runtime";
2
+ import { Box as P, Alert as Ze, Typography as A, TextField as V, Stack as k, FormLabel as ee, TableContainer as er, Paper as _, Table as ze, TableHead as je, TableRow as re, TableCell as te, TableBody as Ve, Button as D, IconButton as G, FormControlLabel as ge, Switch as Re, InputAdornment as H, alpha as ce, Tooltip as B, buttonClasses as rr, Dialog as ye, DialogTitle as Ee, DialogContent as De, DialogActions as Ae, Checkbox as tr, Autocomplete as Te, MenuItem as de, Collapse as nr, Divider as ir, Popper as or } from "@mui/material";
3
+ import { t as xe, f as ne, a as oe, h as ve } from "./chunks/state-Biqa_a5U.js";
4
4
  import Y from "@arcblock/ux/lib/Empty";
5
5
  import { useLocaleContext as R } from "@arcblock/ux/lib/Locale/context";
6
6
  import { CodeEditor as Ce } from "@blocklet/code-editor";
7
- import or from "@mui/icons-material/AddRounded";
8
- import lr from "@mui/icons-material/ArrowDownward";
9
- import sr from "@mui/icons-material/ArrowUpward";
10
- import ar from "@mui/icons-material/DeleteOutline";
7
+ import lr from "@mui/icons-material/AddRounded";
8
+ import sr from "@mui/icons-material/ArrowDownward";
9
+ import ar from "@mui/icons-material/ArrowUpward";
10
+ import cr from "@mui/icons-material/DeleteOutline";
11
11
  import T from "lodash/sortBy";
12
- import { useCallback as W, useMemo as H, useState as U, useEffect as B, useImperativeHandle as cr, useRef as oe } from "react";
13
- import { useUpdate as We, useDebounce as dr } from "react-use";
14
- import { ColorItem as ur, ConfigColorDialog as pr } from "@blocklet/pages-kit/builtin/color-picker";
15
- import { getImageSize as de, getVideoSize as ue, UploaderButton as Pe, UploaderProvider as le, useUploader as mr } from "@blocklet/pages-kit/builtin/uploader";
16
- import { Icon as hr } from "@iconify-icon/react";
17
- import K from "lodash/isEmpty";
18
- import Ue from "lodash/set";
19
- import * as pe from "yaml";
20
- import me from "lodash/cloneDeep";
21
- import he from "@arcblock/ux/lib/Toast";
22
- import { CustomComponentRenderer as Ke, transpileAndLoadScript as fr, getPropertiesFromCode as br } from "@blocklet/pages-kit/components";
23
- import { parsePropertyValue as gr } from "@blocklet/pages-kit/utils/property";
24
- import { unstable_useNumberInput as yr, ClickAwayListener as xr } from "@mui/base";
25
- import { VisibilityOffRounded as vr, VisibilityRounded as Cr, DeleteOutlineRounded as Pr, DragIndicatorRounded as kr, TranslateRounded as Be, AddRounded as Le, InfoRounded as Me, PsychologyAlt as wr, StarRounded as Sr, SettingsRounded as Fe } from "@mui/icons-material";
12
+ import { useCallback as W, useMemo as $, useState as K, useEffect as L, useImperativeHandle as dr, useRef as le } from "react";
13
+ import { useUpdate as We, useDebounce as ur } from "react-use";
14
+ import { ColorItem as pr, ConfigColorDialog as mr } from "@blocklet/pages-kit/builtin/color-picker";
15
+ import { getImageSize as ue, getVideoSize as pe, UploaderButton as Pe, UploaderProvider as se, useUploader as hr } from "@blocklet/pages-kit/builtin/uploader";
16
+ import { Icon as fr } from "@iconify-icon/react";
17
+ import U from "lodash/isEmpty";
18
+ import Ke from "lodash/set";
19
+ import * as me from "yaml";
20
+ import he from "lodash/cloneDeep";
21
+ import fe from "@arcblock/ux/lib/Toast";
22
+ import { CustomComponentRenderer as Ue, transpileAndLoadScript as br, getPropertiesFromCode as gr } from "@blocklet/pages-kit/components";
23
+ import { parsePropertyValue as yr } from "@blocklet/pages-kit/utils/property";
24
+ import { unstable_useNumberInput as xr, ClickAwayListener as vr } from "@mui/base";
25
+ import { SyncRounded as Cr, SyncDisabledRounded as Pr, VisibilityOffRounded as kr, VisibilityRounded as wr, DeleteOutlineRounded as Sr, DragIndicatorRounded as Ir, TranslateRounded as Be, AddRounded as Le, InfoRounded as Me, PsychologyAlt as Or, StarRounded as Nr, SettingsRounded as Fe } from "@mui/icons-material";
26
26
  import { getYjsValue as q } from "@syncedstore/core";
27
- import { useReactive as Ir } from "ahooks";
28
- import Or from "lodash/assign";
29
- import Nr from "lodash/get";
30
- import jr from "lodash/has";
31
- import zr from "lodash/isEqual";
32
- import ne from "lodash/isNil";
33
- import Vr from "lodash/isObject";
34
- import Rr from "lodash/keyBy";
35
- import Er from "lodash/omit";
36
- import Ar from "lodash/pick";
37
- import Dr from "lodash/reduce";
38
- import { usePopupState as ke, bindTrigger as we, bindDialog as Je, bindPopper as Tr } from "material-ui-popup-state/hooks";
39
- import { ErrorBoundary as Wr } from "react-error-boundary";
40
- import { useSensors as Ur, useSensor as Ie, PointerSensor as Kr, KeyboardSensor as Br, DndContext as Lr, closestCorners as Mr, DragOverlay as Fr } from "@dnd-kit/core";
41
- import { SortableContext as Jr, verticalListSortingStrategy as _r, useSortable as Hr } from "@dnd-kit/sortable";
42
- import { CSS as $r } from "@dnd-kit/utilities";
43
- import { nextId as _e } from "@blocklet/pages-kit/utils/common";
44
- function Gr({ error: e }) {
45
- return /* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(Xe, { severity: "error", children: e.message }) });
27
+ import { useReactive as zr } from "ahooks";
28
+ import jr from "lodash/assign";
29
+ import Vr from "lodash/get";
30
+ import Rr from "lodash/has";
31
+ import Er from "lodash/isEqual";
32
+ import ie from "lodash/isNil";
33
+ import Dr from "lodash/isObject";
34
+ import Ar from "lodash/keyBy";
35
+ import Tr from "lodash/omit";
36
+ import Wr from "lodash/pick";
37
+ import Kr from "lodash/reduce";
38
+ import { usePopupState as ke, bindTrigger as we, bindDialog as Je, bindPopper as Ur } from "material-ui-popup-state/hooks";
39
+ import { ErrorBoundary as Br } from "react-error-boundary";
40
+ import { useSensors as Lr, useSensor as Ie, PointerSensor as Mr, KeyboardSensor as Fr, DndContext as Jr, closestCorners as Hr, DragOverlay as $r } from "@dnd-kit/core";
41
+ import { SortableContext as _r, verticalListSortingStrategy as Gr, useSortable as Yr } from "@dnd-kit/sortable";
42
+ import { CSS as qr } from "@dnd-kit/utilities";
43
+ import { nextId as He } from "@blocklet/pages-kit/utils/common";
44
+ function Qr({ error: e }) {
45
+ return /* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(Ze, { severity: "error", children: e.message }) });
46
46
  }
47
- function Yr({
47
+ function Xr({
48
48
  onClick: e,
49
49
  disabled: t,
50
- sx: n,
51
- ...l
50
+ sx: i,
51
+ ...s
52
52
  }) {
53
- return /* @__PURE__ */ r(G, { size: "small", color: "warning", variant: "outlined", disabled: t, onClick: e, ...l, children: /* @__PURE__ */ r(ar, { fontSize: "small" }) });
53
+ return /* @__PURE__ */ r(G, { size: "small", color: "warning", variant: "outlined", disabled: t, onClick: e, ...s, children: /* @__PURE__ */ r(cr, { fontSize: "small" }) });
54
54
  }
55
- function qr({
55
+ function Zr({
56
56
  onClick: e,
57
57
  disabled: t,
58
- sx: n,
59
- ...l
58
+ sx: i,
59
+ ...s
60
60
  }) {
61
- return /* @__PURE__ */ r(G, { size: "small", color: "primary", disabled: t, onClick: e, ...l, children: /* @__PURE__ */ r(sr, { fontSize: "small" }) });
61
+ return /* @__PURE__ */ r(G, { size: "small", color: "primary", disabled: t, onClick: e, ...s, children: /* @__PURE__ */ r(ar, { fontSize: "small" }) });
62
62
  }
63
- function Qr({
63
+ function et({
64
64
  onClick: e,
65
65
  disabled: t,
66
- sx: n,
67
- ...l
66
+ sx: i,
67
+ ...s
68
68
  }) {
69
- return /* @__PURE__ */ r(G, { size: "small", color: "primary", disabled: t, onClick: e, ...l, children: /* @__PURE__ */ r(lr, { fontSize: "small" }) });
69
+ return /* @__PURE__ */ r(G, { size: "small", color: "primary", disabled: t, onClick: e, ...s, children: /* @__PURE__ */ r(sr, { fontSize: "small" }) });
70
70
  }
71
- function Xr({
71
+ function rt({
72
72
  label: e,
73
73
  value: t,
74
- onChange: n,
75
- disabled: l = !1,
74
+ onChange: i,
75
+ disabled: s = !1,
76
76
  itemLabel: h = "",
77
77
  emptyHeight: p = 40,
78
- property: c,
79
- renderItem: g,
78
+ property: u,
79
+ renderItem: y,
80
80
  ...m
81
81
  }) {
82
- const { t: d, locale: s } = R(), a = We(), i = W(
83
- (b) => {
84
- n(xe(b, c.type));
82
+ const { t: c, locale: a } = R(), l = We(), o = W(
83
+ (g) => {
84
+ i(xe(g, u.type));
85
85
  },
86
- [n, c.type]
87
- ), o = H(() => Array.isArray(t) ? t : [], [t]), f = W(() => {
88
- const b = [...o, ""];
89
- i(b), a();
90
- }, [o, i, a]), y = W(() => {
91
- if (!c || !c.subProperties)
86
+ [i, u.type]
87
+ ), n = $(() => Array.isArray(t) ? t : [], [t]), f = W(() => {
88
+ const g = [...n, ""];
89
+ o(g), l();
90
+ }, [n, o, l]), b = W(() => {
91
+ if (!u || !u.subProperties)
92
92
  return f();
93
- const b = {};
94
- T(Object.values(c.subProperties), "index").forEach(({ data: z }) => {
95
- if (!z.key) return;
96
- const E = z.locales?.[s]?.defaultValue ?? "";
97
- b[z.key] = E;
93
+ const g = {};
94
+ T(Object.values(u.subProperties), "index").forEach(({ data: j }) => {
95
+ if (!j.key) return;
96
+ const E = j.locales?.[a]?.defaultValue ?? "";
97
+ g[j.key] = E;
98
98
  });
99
- const O = [...o, b];
100
- i(O), a();
101
- }, [o, i, a, c, s, f]), u = W(
102
- (b) => {
99
+ const O = [...n, g];
100
+ o(O), l();
101
+ }, [n, o, l, u, a, f]), d = W(
102
+ (g) => {
103
103
  try {
104
- const x = JSON.parse(b);
105
- Array.isArray(x) ? i(x) : console.error("JSON解析结果不是数组");
106
- } catch (x) {
107
- console.error("JSON解析错误:", x);
104
+ const v = JSON.parse(g);
105
+ Array.isArray(v) ? o(v) : console.error("JSON解析结果不是数组");
106
+ } catch (v) {
107
+ console.error("JSON解析错误:", v);
108
108
  }
109
109
  },
110
- [i]
111
- ), C = W(
112
- (b) => {
113
- const x = o.filter((O, z) => z !== b);
114
- i(x), a();
110
+ [o]
111
+ ), x = W(
112
+ (g) => {
113
+ const v = n.filter((O, j) => j !== g);
114
+ o(v), l();
115
115
  },
116
- [o, i, a]
116
+ [n, o, l]
117
117
  ), w = W(
118
- (b) => {
119
- if (b <= 0) return;
120
- const x = [...o], O = x[b];
121
- x[b] = x[b - 1], x[b - 1] = O, i(x), a();
118
+ (g) => {
119
+ if (g <= 0) return;
120
+ const v = [...n], O = v[g];
121
+ v[g] = v[g - 1], v[g - 1] = O, o(v), l();
122
122
  },
123
- [o, i, a]
123
+ [n, o, l]
124
124
  ), N = W(
125
- (b) => {
126
- if (b >= o.length - 1) return;
127
- const x = [...o], O = x[b];
128
- x[b] = x[b + 1], x[b + 1] = O, i(x), a();
125
+ (g) => {
126
+ if (g >= n.length - 1) return;
127
+ const v = [...n], O = v[g];
128
+ v[g] = v[g + 1], v[g + 1] = O, o(v), l();
129
129
  },
130
- [o, i, a]
130
+ [n, o, l]
131
131
  ), S = W(
132
- (b, x) => {
133
- const O = [...o];
134
- O[b] = x, i(O);
132
+ (g, v) => {
133
+ const O = [...n];
134
+ O[g] = v, o(O);
135
135
  },
136
- [o, i]
137
- ), I = c && c.subProperties && Object.keys(c.subProperties).length > 0, j = H(() => [
136
+ [n, o]
137
+ ), I = u && u.subProperties && Object.keys(u.subProperties).length > 0, z = $(() => [
138
138
  {
139
139
  field: "index",
140
140
  headerName: "#",
141
141
  width: 40,
142
142
  align: "center",
143
- renderCell: ({ index: b }) => /* @__PURE__ */ r(
144
- D,
143
+ renderCell: ({ index: g }) => /* @__PURE__ */ r(
144
+ A,
145
145
  {
146
146
  variant: "body1",
147
147
  sx: {
@@ -154,27 +154,27 @@ function Xr({
154
154
  justifyContent: "center",
155
155
  color: "text.secondary"
156
156
  },
157
- children: b + 1
157
+ children: g + 1
158
158
  }
159
159
  )
160
160
  },
161
161
  {
162
162
  field: "content",
163
163
  headerName: "",
164
- renderCell: ({ row: b, index: x }) => g && I ? g({
165
- item: b,
166
- index: x,
167
- property: c,
168
- onChange: (O) => S(x, O)
164
+ renderCell: ({ row: g, index: v }) => y && I ? y({
165
+ item: g,
166
+ index: v,
167
+ property: u,
168
+ onChange: (O) => S(v, O)
169
169
  }) : /* @__PURE__ */ r(
170
170
  V,
171
171
  {
172
172
  fullWidth: !0,
173
173
  size: "small",
174
- disabled: l,
175
- value: b,
176
- placeholder: h || `${d("item")} ${x + 1}`,
177
- onChange: (O) => S(x, O.target.value),
174
+ disabled: s,
175
+ value: g,
176
+ placeholder: h || `${c("item")} ${v + 1}`,
177
+ onChange: (O) => S(v, O.target.value),
178
178
  ...m
179
179
  }
180
180
  )
@@ -185,33 +185,33 @@ function Xr({
185
185
  width: 30,
186
186
  // 增加宽度以容纳更多按钮
187
187
  align: "center",
188
- renderCell: ({ index: b }) => /* @__PURE__ */ v(k, { direction: "column", spacing: 0.25, children: [
189
- /* @__PURE__ */ r(qr, { disabled: l || b === 0, onClick: () => w(b) }),
188
+ renderCell: ({ index: g }) => /* @__PURE__ */ C(k, { direction: "column", spacing: 0.25, children: [
189
+ /* @__PURE__ */ r(Zr, { disabled: s || g === 0, onClick: () => w(g) }),
190
190
  /* @__PURE__ */ r(
191
- Qr,
191
+ et,
192
192
  {
193
- disabled: l || b === o.length - 1,
194
- onClick: () => N(b)
193
+ disabled: s || g === n.length - 1,
194
+ onClick: () => N(g)
195
195
  }
196
196
  ),
197
- /* @__PURE__ */ r(Yr, { disabled: l, onClick: () => C(b) })
197
+ /* @__PURE__ */ r(Xr, { disabled: s, onClick: () => x(g) })
198
198
  ] })
199
199
  }
200
200
  ], [
201
- g,
201
+ y,
202
202
  I,
203
- c,
203
+ u,
204
204
  S,
205
205
  h,
206
- d,
207
- l,
206
+ c,
207
+ s,
208
208
  m,
209
- C,
209
+ x,
210
210
  w,
211
211
  N,
212
- o.length
212
+ n.length
213
213
  ]);
214
- return I ? /* @__PURE__ */ v(
214
+ return I ? /* @__PURE__ */ C(
215
215
  k,
216
216
  {
217
217
  sx: {
@@ -219,9 +219,9 @@ function Xr({
219
219
  gap: 1
220
220
  },
221
221
  children: [
222
- e && /* @__PURE__ */ r(Z, { children: e }),
223
- o.length > 0 ? /* @__PURE__ */ r(Ze, { component: $, variant: "outlined", sx: { borderRadius: 1, mb: 1 }, children: /* @__PURE__ */ v(
224
- je,
222
+ e && /* @__PURE__ */ r(ee, { children: e }),
223
+ n.length > 0 ? /* @__PURE__ */ r(er, { component: _, variant: "outlined", sx: { borderRadius: 1, mb: 1 }, children: /* @__PURE__ */ C(
224
+ ze,
225
225
  {
226
226
  size: "small",
227
227
  sx: {
@@ -238,63 +238,63 @@ function Xr({
238
238
  borderCollapse: "collapse"
239
239
  },
240
240
  children: [
241
- /* @__PURE__ */ r(ze, { sx: { display: "none" }, children: /* @__PURE__ */ r(ee, { children: j.map((b) => /* @__PURE__ */ r(
242
- re,
241
+ /* @__PURE__ */ r(je, { sx: { display: "none" }, children: /* @__PURE__ */ r(re, { children: z.map((g) => /* @__PURE__ */ r(
242
+ te,
243
243
  {
244
- width: b.width,
245
- align: b.align || "left",
244
+ width: g.width,
245
+ align: g.align || "left",
246
246
  sx: { fontWeight: "bold" },
247
- children: b.renderHeader ? b.renderHeader() : b.headerName
247
+ children: g.renderHeader ? g.renderHeader() : g.headerName
248
248
  },
249
- b.field
249
+ g.field
250
250
  )) }) }),
251
- /* @__PURE__ */ r(Ve, { children: o.map((b, x, O) => /* @__PURE__ */ r(
252
- ee,
251
+ /* @__PURE__ */ r(Ve, { children: n.map((g, v, O) => /* @__PURE__ */ r(
252
+ re,
253
253
  {
254
254
  sx: {
255
- borderBottom: x < O.length - 1 ? "1px solid" : "none",
255
+ borderBottom: v < O.length - 1 ? "1px solid" : "none",
256
256
  borderColor: "divider",
257
257
  "&:hover": {
258
258
  backgroundColor: "action.hover"
259
259
  }
260
260
  },
261
- children: j.map((z) => /* @__PURE__ */ r(
262
- re,
261
+ children: z.map((j) => /* @__PURE__ */ r(
262
+ te,
263
263
  {
264
- width: z.width,
265
- align: z.align || "left",
264
+ width: j.width,
265
+ align: j.align || "left",
266
266
  sx: {
267
267
  borderBottom: "none"
268
268
  },
269
- children: z.renderCell({
270
- row: b,
271
- index: x,
272
- onChange: (E) => S(x, E)
269
+ children: j.renderCell({
270
+ row: g,
271
+ index: v,
272
+ onChange: (E) => S(v, E)
273
273
  })
274
274
  },
275
- `${x}-${z.field}`
275
+ `${v}-${j.field}`
276
276
  ))
277
277
  },
278
- x
278
+ v
279
279
  )) })
280
280
  ]
281
281
  }
282
- ) }) : /* @__PURE__ */ r(Y, { style: { fontSize: 12, height: p }, children: d("maker.properties.arrayEmpty") }),
282
+ ) }) : /* @__PURE__ */ r(Y, { style: { fontSize: 12, height: p }, children: c("maker.properties.arrayEmpty") }),
283
283
  /* @__PURE__ */ r(
284
- A,
284
+ D,
285
285
  {
286
286
  fullWidth: !0,
287
287
  size: "small",
288
288
  variant: "outlined",
289
- disabled: l,
290
- startIcon: /* @__PURE__ */ r(or, {}),
291
- onClick: y,
292
- children: d("maker.properties.addArrayItem")
289
+ disabled: s,
290
+ startIcon: /* @__PURE__ */ r(lr, {}),
291
+ onClick: b,
292
+ children: c("maker.properties.addArrayItem")
293
293
  }
294
294
  )
295
295
  ]
296
296
  }
297
- ) : /* @__PURE__ */ v(
297
+ ) : /* @__PURE__ */ C(
298
298
  k,
299
299
  {
300
300
  sx: {
@@ -302,74 +302,74 @@ function Xr({
302
302
  gap: 1
303
303
  },
304
304
  children: [
305
- e && /* @__PURE__ */ r(Z, { children: e }),
305
+ e && /* @__PURE__ */ r(ee, { children: e }),
306
306
  /* @__PURE__ */ r(P, { sx: { border: 1, borderColor: "divider", borderRadius: 1, minHeight: 150 }, children: /* @__PURE__ */ r(
307
307
  Ce,
308
308
  {
309
- keyId: c.id,
310
- locale: s,
309
+ keyId: u.id,
310
+ locale: a,
311
311
  language: "json",
312
- value: JSON.stringify(o, null, 2),
313
- onChange: (b) => u(b || ""),
312
+ value: JSON.stringify(n, null, 2),
313
+ onChange: (g) => d(g || ""),
314
314
  fullScreenOptions: {
315
315
  enableEscExit: !0,
316
316
  targetContainer: () => document.getElementById("parameters-config-dialog") || null
317
317
  }
318
318
  },
319
- c.id
319
+ u.id
320
320
  ) })
321
321
  ]
322
322
  }
323
323
  );
324
324
  }
325
- function Zr({
325
+ function tt({
326
326
  ref: e,
327
327
  showMarkdown: t,
328
- markdown: n,
329
- onMarkdownChange: l,
328
+ markdown: i,
329
+ onMarkdownChange: s,
330
330
  showUploader: h,
331
331
  value: p,
332
- meta: c,
333
- onChange: g,
332
+ meta: u,
333
+ onChange: y,
334
334
  ...m
335
335
  }) {
336
- const [d, s] = U("");
337
- B(() => {
338
- s(p || "");
339
- }, [p, s]);
340
- const a = async () => {
341
- if (d !== p) {
342
- const o = te(d);
343
- if (!o) {
344
- g(d, void 0);
336
+ const [c, a] = K("");
337
+ L(() => {
338
+ a(p || "");
339
+ }, [p, a]);
340
+ const l = async () => {
341
+ if (c !== p) {
342
+ const n = ne(c);
343
+ if (!n) {
344
+ y(c, void 0);
345
345
  return;
346
346
  }
347
- const f = await de(o).catch(() => ue(o)).catch(() => {
347
+ const f = await ue(n).catch(() => pe(n)).catch(() => {
348
348
  });
349
- g(d, { ...f, filename: d });
349
+ y(c, { ...f, filename: c });
350
350
  }
351
351
  };
352
- dr(
352
+ ur(
353
353
  () => {
354
- d !== p && g(d);
354
+ c !== p && y(c);
355
355
  },
356
356
  300,
357
- [d]
358
- ), cr(e, () => ({
359
- submit: a
357
+ [c]
358
+ ), dr(e, () => ({
359
+ submit: l
360
360
  }));
361
- const i = {};
362
- return h && (i.InputProps = {
361
+ const o = {};
362
+ return h && (o.InputProps = {
363
363
  sx: { pr: 0 },
364
- endAdornment: /* @__PURE__ */ r(_, { position: "end", sx: { mx: 0.5 }, children: /* @__PURE__ */ r(
364
+ endAdornment: /* @__PURE__ */ r(H, { position: "end", sx: { mx: 0.5 }, children: /* @__PURE__ */ r(
365
365
  Pe,
366
366
  {
367
- onChange: async ({ response: o }) => {
368
- const f = o?.data?.filename, y = te(f) || "";
369
- let u = {};
370
- y && (u = await de(y).catch(() => ue(y)).catch(() => {
371
- })), g(f, {
372
- ...u,
367
+ onChange: async ({ response: n }) => {
368
+ const f = n?.data?.filename, b = ne(f) || "";
369
+ let d = {};
370
+ b && (d = await ue(b).catch(() => pe(b)).catch(() => {
371
+ })), y(f, {
372
+ ...d,
373
373
  filename: f
374
374
  });
375
375
  }
@@ -381,7 +381,7 @@ function Zr({
381
381
  size: "small",
382
382
  fullWidth: !0,
383
383
  ...m,
384
- label: /* @__PURE__ */ v(
384
+ label: /* @__PURE__ */ C(
385
385
  k,
386
386
  {
387
387
  direction: "row",
@@ -391,17 +391,17 @@ function Zr({
391
391
  },
392
392
  children: [
393
393
  m.label,
394
- t && /* @__PURE__ */ v(M, { children: [
394
+ t && /* @__PURE__ */ C(F, { children: [
395
395
  " (",
396
396
  /* @__PURE__ */ r(
397
397
  ge,
398
398
  {
399
- checked: n,
400
- label: /* @__PURE__ */ r(P, { component: hr, icon: "tabler:markdown", sx: { verticalAlign: "middle" } }),
399
+ checked: i,
400
+ label: /* @__PURE__ */ r(P, { component: fr, icon: "tabler:markdown", sx: { verticalAlign: "middle" } }),
401
401
  labelPlacement: "start",
402
402
  control: /* @__PURE__ */ r(Re, { size: "small" }),
403
403
  sx: { ml: 0.25, pr: 1 },
404
- onChange: (o, f) => l?.(f)
404
+ onChange: (n, f) => s?.(f)
405
405
  }
406
406
  ),
407
407
  ")"
@@ -409,11 +409,11 @@ function Zr({
409
409
  ]
410
410
  }
411
411
  ),
412
- value: d,
413
- onChange: (o) => s(o.target.value),
414
- ...i,
415
- onKeyDown: (o) => {
416
- o.keyCode !== 229 && o.key === "Enter" && a();
412
+ value: c,
413
+ onChange: (n) => a(n.target.value),
414
+ ...o,
415
+ onKeyDown: (n) => {
416
+ n.keyCode !== 229 && n.key === "Enter" && l();
417
417
  },
418
418
  slotProps: {
419
419
  inputLabel: { shrink: !0, ...m.InputLabelProps }
@@ -421,23 +421,23 @@ function Zr({
421
421
  }
422
422
  );
423
423
  }
424
- function et({
424
+ function nt({
425
425
  value: e,
426
426
  onChange: t,
427
- disableGradient: n = !1,
428
- ...l
427
+ disableGradient: i = !1,
428
+ ...s
429
429
  }) {
430
- const h = oe(null);
431
- return /* @__PURE__ */ v(M, { children: [
430
+ const h = le(null);
431
+ return /* @__PURE__ */ C(F, { children: [
432
432
  /* @__PURE__ */ r(
433
- Zr,
433
+ tt,
434
434
  {
435
- ...l,
435
+ ...s,
436
436
  value: e,
437
437
  onChange: t,
438
438
  InputProps: {
439
- endAdornment: /* @__PURE__ */ r(_, { position: "end", children: /* @__PURE__ */ r(
440
- ur,
439
+ endAdornment: /* @__PURE__ */ r(H, { position: "end", children: /* @__PURE__ */ r(
440
+ pr,
441
441
  {
442
442
  color: e ?? "",
443
443
  style: { width: "1.5rem", height: "1.5rem", padding: 0 },
@@ -450,76 +450,76 @@ function et({
450
450
  }
451
451
  ),
452
452
  /* @__PURE__ */ r(
453
- pr,
453
+ mr,
454
454
  {
455
455
  ref: h,
456
- onSave: ({ value: p }, c) => {
457
- t(p), c();
456
+ onSave: ({ value: p }, u) => {
457
+ t(p), u();
458
458
  },
459
- disableGradient: n
459
+ disableGradient: i
460
460
  }
461
461
  )
462
462
  ] });
463
463
  }
464
- function rt({
464
+ function it({
465
465
  label: e,
466
466
  value: t,
467
- onChange: n,
468
- property: l,
467
+ onChange: i,
468
+ property: s,
469
469
  component: h,
470
470
  defaultLocale: p,
471
- allComponents: c,
472
- PropertyValueField: g,
471
+ allComponents: u,
472
+ PropertyValueField: y,
473
473
  onUpload: m
474
474
  }) {
475
- const { locale: d } = R(), s = oe(null);
476
- if (!K(l.subProperties)) {
477
- const i = T(Object.values(l.subProperties || {}), "index").filter(
478
- (o) => o.data.visible !== !1 && o.data.key
475
+ const { locale: c } = R(), a = le(null);
476
+ if (!U(s.subProperties)) {
477
+ const o = T(Object.values(s.subProperties || {}), "index").filter(
478
+ (n) => n.data.visible !== !1 && n.data.key
479
479
  );
480
- return /* @__PURE__ */ v(
480
+ return /* @__PURE__ */ C(
481
481
  k,
482
482
  {
483
483
  sx: {
484
484
  width: "100%"
485
485
  },
486
486
  children: [
487
- /* @__PURE__ */ r(Z, { sx: { px: 0.25, py: 0.5 }, children: e }),
488
- /* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(P, { sx: { position: "relative" }, children: i.map((o, f) => {
489
- const { data: y } = o, u = y.key ?? y.id, C = f === i.length - 1;
487
+ /* @__PURE__ */ r(ee, { sx: { px: 0.25, py: 0.5 }, children: e }),
488
+ /* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(P, { sx: { position: "relative" }, children: o.map((n, f) => {
489
+ const { data: b } = n, d = b.key ?? b.id, x = f === o.length - 1;
490
490
  let w = null;
491
491
  try {
492
- t && typeof t == "object" ? w = t[u] : typeof t == "string" && (w = (l.type === "yaml" ? pe.parse(t || "") : JSON.parse(t || "{}"))[u]);
492
+ t && typeof t == "object" ? w = t[d] : typeof t == "string" && (w = (s.type === "yaml" ? me.parse(t || "") : JSON.parse(t || "{}"))[d]);
493
493
  } catch {
494
494
  }
495
- w == null && (y.locales && d && y.locales[d] ? w = y.locales[d].defaultValue : y.locales && p && y.locales[p] && (w = y.locales[p].defaultValue));
495
+ w == null && (b.locales && c && b.locales[c] ? w = b.locales[c].defaultValue : b.locales && p && b.locales[p] && (w = b.locales[p].defaultValue));
496
496
  const N = (I) => {
497
497
  try {
498
- let j = {};
498
+ let z = {};
499
499
  if (typeof t == "string")
500
500
  try {
501
- j = l.type === "yaml" ? pe.parse(t || "") : JSON.parse(t || "{}");
501
+ z = s.type === "yaml" ? me.parse(t || "") : JSON.parse(t || "{}");
502
502
  } catch {
503
503
  }
504
- else typeof t == "object" && t !== null && (j = { ...t });
505
- Ue(j, u, I);
506
- const b = xe(j, l.type);
507
- n?.(b);
508
- } catch (j) {
509
- console.error("Error updating property:", j);
504
+ else typeof t == "object" && t !== null && (z = { ...t });
505
+ Ke(z, d, I);
506
+ const g = xe(z, s.type);
507
+ i?.(g);
508
+ } catch (z) {
509
+ console.error("Error updating property:", z);
510
510
  }
511
511
  }, S = 8;
512
- return /* @__PURE__ */ v(
512
+ return /* @__PURE__ */ C(
513
513
  P,
514
514
  {
515
515
  sx: {
516
- mb: C ? 0 : 1,
516
+ mb: x ? 0 : 1,
517
517
  // 底部边距,最后一项不需要
518
518
  display: "flex",
519
519
  flexDirection: "row"
520
520
  },
521
521
  children: [
522
- /* @__PURE__ */ v(
522
+ /* @__PURE__ */ C(
523
523
  P,
524
524
  {
525
525
  sx: {
@@ -558,7 +558,7 @@ function rt({
558
558
  }
559
559
  }
560
560
  ),
561
- !C && /* @__PURE__ */ r(
561
+ !x && /* @__PURE__ */ r(
562
562
  P,
563
563
  {
564
564
  sx: {
@@ -578,21 +578,21 @@ function rt({
578
578
  }
579
579
  ),
580
580
  /* @__PURE__ */ r(P, { sx: { flexGrow: 1 }, children: /* @__PURE__ */ r(
581
- g,
581
+ y,
582
582
  {
583
583
  component: h,
584
- property: y,
584
+ property: b,
585
585
  value: w,
586
586
  onChange: N,
587
587
  size: "small",
588
588
  fullWidth: !0,
589
589
  defaultLocale: p,
590
- allComponents: c
590
+ allComponents: u
591
591
  }
592
592
  ) })
593
593
  ]
594
594
  },
595
- y.id
595
+ b.id
596
596
  );
597
597
  }) }) })
598
598
  ]
@@ -606,7 +606,7 @@ function rt({
606
606
  width: "100%",
607
607
  gap: 2
608
608
  },
609
- children: /* @__PURE__ */ v(
609
+ children: /* @__PURE__ */ C(
610
610
  k,
611
611
  {
612
612
  sx: {
@@ -620,7 +620,7 @@ function rt({
620
620
  },
621
621
  children: [
622
622
  /* @__PURE__ */ r(
623
- Z,
623
+ ee,
624
624
  {
625
625
  sx: {
626
626
  position: "absolute",
@@ -634,22 +634,22 @@ function rt({
634
634
  /* @__PURE__ */ r(
635
635
  Ce,
636
636
  {
637
- keyId: l.id,
638
- locale: d,
639
- language: l.type === "yaml" ? "yaml" : "json",
637
+ keyId: s.id,
638
+ locale: c,
639
+ language: s.type === "yaml" ? "yaml" : "json",
640
640
  value: typeof t == "string" ? t : "",
641
- onChange: (i) => {
642
- n?.(i);
641
+ onChange: (o) => {
642
+ i?.(o);
643
643
  },
644
- onUpload: (i) => {
645
- s.current = i, m && m(i);
644
+ onUpload: (o) => {
645
+ a.current = o, m && m(o);
646
646
  },
647
647
  fullScreenOptions: {
648
648
  enableEscExit: !0,
649
649
  targetContainer: () => document.getElementById("parameters-config-dialog") || null
650
650
  }
651
651
  },
652
- l.id
652
+ s.id
653
653
  ),
654
654
  /* @__PURE__ */ r(
655
655
  P,
@@ -677,46 +677,45 @@ function rt({
677
677
  }
678
678
  );
679
679
  }
680
- const tt = ["string", "multiline", "json", "yaml", "url", "component", "custom", "array"];
681
680
  function Oe(e) {
682
- return e.type ? !tt.includes(e.type) : !1;
681
+ return !!e.shared;
683
682
  }
684
- function He({
683
+ function $e({
685
684
  disabled: e,
686
685
  list: t,
687
- renderItem: n,
688
- ...l
686
+ renderItem: i,
687
+ ...s
689
688
  }) {
690
- const h = T(Object.entries(t), ([, f]) => f.index), p = h.map(([f]) => f), [c, g] = U(null), [m, d] = U(null), s = Ur(
691
- Ie(Kr, {
689
+ const h = T(Object.entries(t), ([, f]) => f.index), p = h.map(([f]) => f), [u, y] = K(null), [m, c] = K(null), a = Lr(
690
+ Ie(Mr, {
692
691
  activationConstraint: {
693
692
  distance: 8
694
693
  // 8px movement required to start drag
695
694
  }
696
695
  }),
697
- Ie(Br)
696
+ Ie(Fr)
698
697
  );
699
- return /* @__PURE__ */ v(
700
- Lr,
698
+ return /* @__PURE__ */ C(
699
+ Jr,
701
700
  {
702
- sensors: s,
703
- collisionDetection: Mr,
701
+ sensors: a,
702
+ collisionDetection: Hr,
704
703
  onDragStart: (f) => {
705
- const { active: y } = f, u = t[y.id];
706
- u && (d(y.id), g(u.data));
704
+ const { active: b } = f, d = t[b.id];
705
+ d && (c(b.id), y(d.data));
707
706
  },
708
707
  onDragOver: () => {
709
708
  },
710
709
  onDragEnd: (f) => {
711
- const { active: y, over: u } = f;
712
- if (d(null), g(null), !u || y.id === u.id)
710
+ const { active: b, over: d } = f;
711
+ if (c(null), y(null), !d || b.id === d.id)
713
712
  return;
714
- const C = y.id, w = u.id;
715
- if (t[C] && t[w]) {
713
+ const x = b.id, w = d.id;
714
+ if (t[x] && t[w]) {
716
715
  const N = () => {
717
- const j = Object.entries(t).sort(([, z], [, E]) => z.index - E.index), b = j.findIndex(([z]) => z === C), x = j.findIndex(([z]) => z === w), [O] = j.splice(b, 1);
718
- O && j.splice(x, 0, O), j.forEach(([, z], E) => {
719
- z.index = E;
716
+ const z = Object.entries(t).sort(([, j], [, E]) => j.index - E.index), g = z.findIndex(([j]) => j === x), v = z.findIndex(([j]) => j === w), [O] = z.splice(g, 1);
717
+ O && z.splice(v, 0, O), z.forEach(([, j], E) => {
718
+ j.index = E;
720
719
  });
721
720
  }, S = q(t)?.doc;
722
721
  S ? S.transact(() => {
@@ -725,7 +724,7 @@ function He({
725
724
  }
726
725
  },
727
726
  children: [
728
- /* @__PURE__ */ r(Jr, { items: p, strategy: _r, children: /* @__PURE__ */ r(k, { ...l, children: h.map(([f, y], u) => /* @__PURE__ */ r(nt, { id: f, disabled: e, isDragging: m === f, children: n(y.data, u, {
727
+ /* @__PURE__ */ r(_r, { items: p, strategy: Gr, children: /* @__PURE__ */ r(k, { ...s, children: h.map(([f, b], d) => /* @__PURE__ */ r(ot, { id: f, disabled: e, isDragging: m === f, children: i(b.data, d, {
729
728
  isDragging: m === f,
730
729
  drag: null,
731
730
  // Legacy compatibility
@@ -734,7 +733,7 @@ function He({
734
733
  preview: null
735
734
  // Legacy compatibility
736
735
  }) }, f)) }) }),
737
- /* @__PURE__ */ r(Fr, { children: c && m ? /* @__PURE__ */ r(
736
+ /* @__PURE__ */ r($r, { children: u && m ? /* @__PURE__ */ r(
738
737
  P,
739
738
  {
740
739
  sx: {
@@ -746,7 +745,7 @@ function He({
746
745
  boxShadow: 2,
747
746
  maxWidth: 400
748
747
  },
749
- children: n(c, 0, {
748
+ children: i(u, 0, {
750
749
  isDragging: !0,
751
750
  drag: null,
752
751
  drop: null,
@@ -758,33 +757,35 @@ function He({
758
757
  }
759
758
  );
760
759
  }
761
- function nt({
760
+ function ot({
762
761
  id: e,
763
762
  disabled: t,
764
- isDragging: n,
765
- children: l
763
+ isDragging: i,
764
+ children: s
766
765
  }) {
767
- const { attributes: h, listeners: p, setNodeRef: c, transform: g, transition: m } = Hr({
766
+ const { attributes: h, listeners: p, setNodeRef: u, transform: y, transition: m } = Yr({
768
767
  id: e,
769
768
  disabled: t
770
- }), d = {
771
- transform: $r.Transform.toString(g),
769
+ }), c = {
770
+ transform: qr.Transform.toString(y),
772
771
  transition: m,
773
- opacity: n ? 0.5 : 1
772
+ opacity: i ? 0.5 : 1
774
773
  };
775
- return /* @__PURE__ */ r(P, { ref: c, style: d, ...h, ...p, children: l });
774
+ return /* @__PURE__ */ r(P, { ref: u, style: c, ...h, ...p, children: s });
776
775
  }
777
- function it({
776
+ function lt({
778
777
  disabled: e,
779
778
  isDragging: t,
780
- children: n,
781
- onDelete: l,
779
+ children: i,
780
+ onDelete: s,
782
781
  onVisibilityChange: h,
783
782
  visible: p = !0,
784
- actions: c,
785
- alwaysShowActions: g = !1
783
+ onSharedChange: u,
784
+ shared: y = !1,
785
+ actions: m,
786
+ alwaysShowActions: c = !1
786
787
  }) {
787
- const { t: m } = R();
788
+ const { t: a } = R();
788
789
  return /* @__PURE__ */ r(
789
790
  P,
790
791
  {
@@ -792,7 +793,7 @@ function it({
792
793
  ":hover .hover-visible": { maxWidth: "100%" },
793
794
  opacity: p ? 1 : 0.5
794
795
  },
795
- children: /* @__PURE__ */ v(P, { sx: { position: "relative" }, children: [
796
+ children: /* @__PURE__ */ C(P, { sx: { position: "relative" }, children: [
796
797
  /* @__PURE__ */ r(
797
798
  P,
798
799
  {
@@ -803,30 +804,30 @@ function it({
803
804
  opacity: 0.9999
804
805
  // NOTE: make preview effective
805
806
  },
806
- children: n
807
+ children: i
807
808
  }
808
809
  ),
809
810
  !e && /* @__PURE__ */ r(
810
811
  P,
811
812
  {
812
- className: g ? "" : "hover-visible",
813
+ className: c ? "" : "hover-visible",
813
814
  sx: {
814
- maxWidth: g ? "100%" : 0,
815
+ maxWidth: c ? "100%" : 0,
815
816
  overflow: "hidden",
816
817
  position: "absolute",
817
818
  right: 2,
818
819
  top: 2,
819
820
  transition: "max-width 0.3s ease-in-out"
820
821
  },
821
- children: /* @__PURE__ */ v(
822
+ children: /* @__PURE__ */ C(
822
823
  k,
823
824
  {
824
825
  direction: "row",
825
826
  sx: {
826
- bgcolor: (d) => ae(d.palette.grey[200], 0.9),
827
+ bgcolor: (l) => ce(l.palette.grey[200], 0.9),
827
828
  borderRadius: 1,
828
829
  p: 0.5,
829
- [`.${er.root}`]: {
830
+ [`.${rr.root}`]: {
830
831
  minWidth: 24,
831
832
  width: 24,
832
833
  height: 24,
@@ -834,10 +835,11 @@ function it({
834
835
  }
835
836
  },
836
837
  children: [
837
- c,
838
- h && /* @__PURE__ */ r(J, { title: m(p ? "hideParameter" : "showParameter"), disableInteractive: !0, placement: "top", children: /* @__PURE__ */ r(A, { onClick: () => h(!p), children: p ? /* @__PURE__ */ r(vr, { sx: { fontSize: "1.25rem", color: "grey.500" } }) : /* @__PURE__ */ r(Cr, { sx: { fontSize: "1.25rem", color: "grey.500" } }) }) }),
839
- l && /* @__PURE__ */ r(J, { title: m("delete"), disableInteractive: !0, placement: "top", children: /* @__PURE__ */ r(A, { onClick: l, children: /* @__PURE__ */ r(Pr, { sx: { fontSize: "1.25rem", color: "grey.500" } }) }) }),
840
- /* @__PURE__ */ r(J, { title: m("dragSort"), disableInteractive: !0, placement: "top", children: /* @__PURE__ */ r(A, { children: /* @__PURE__ */ r(kr, { sx: { color: "grey.500" } }) }) })
838
+ m,
839
+ u && /* @__PURE__ */ r(B, { title: a(y ? "disableSharing" : "enableSharing"), disableInteractive: !0, placement: "top", children: /* @__PURE__ */ r(D, { onClick: () => u(!y), children: y ? /* @__PURE__ */ r(Cr, { sx: { fontSize: "1.25rem", color: "primary.main" } }) : /* @__PURE__ */ r(Pr, { sx: { fontSize: "1.25rem", color: "grey.500" } }) }) }),
840
+ h && /* @__PURE__ */ r(B, { title: a(p ? "hideParameter" : "showParameter"), disableInteractive: !0, placement: "top", children: /* @__PURE__ */ r(D, { onClick: () => h(!p), children: p ? /* @__PURE__ */ r(kr, { sx: { fontSize: "1.25rem", color: "grey.500" } }) : /* @__PURE__ */ r(wr, { sx: { fontSize: "1.25rem", color: "grey.500" } }) }) }),
841
+ s && /* @__PURE__ */ r(B, { title: a("delete"), disableInteractive: !0, placement: "top", children: /* @__PURE__ */ r(D, { onClick: s, children: /* @__PURE__ */ r(Sr, { sx: { fontSize: "1.25rem", color: "grey.500" } }) }) }),
842
+ /* @__PURE__ */ r(B, { title: a("dragSort"), disableInteractive: !0, placement: "top", children: /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(Ir, { sx: { color: "grey.500" } }) }) })
841
843
  ]
842
844
  }
843
845
  )
@@ -847,122 +849,122 @@ function it({
847
849
  }
848
850
  );
849
851
  }
850
- function ot(e) {
851
- const t = ["string", "json", "array", "url", "multiline"], n = ["style", "fontSize", "color", "content", "type"];
852
- return !!(t.includes(e.type || "") && !n.includes(e.key || ""));
852
+ function st(e) {
853
+ const t = ["string", "json", "array", "url", "multiline"], i = ["style", "fontSize", "color", "content", "type"];
854
+ return !!(t.includes(e.type || "") && !i.includes(e.key || ""));
853
855
  }
854
- function lt(e, t, n) {
855
- return e.locales && e.locales[t] && e.locales[t].name ? e.locales[t].name : n && e.locales && e.locales[n] && e.locales[n].name ? e.locales[n].name : e.key ? e.key : e.id;
856
+ function at(e, t, i) {
857
+ return e.locales && e.locales[t] && e.locales[t].name ? e.locales[t].name : i && e.locales && e.locales[i] && e.locales[i].name ? e.locales[i].name : e.key ? e.key : e.id;
856
858
  }
857
- const $e = (e, t, n, l) => {
859
+ const _e = (e, t, i, s) => {
858
860
  const h = {};
859
- return T(Object.entries(e), ([, c]) => c.index).forEach(([c, g]) => {
860
- const m = g.data;
861
+ return T(Object.entries(e), ([, u]) => u.index).forEach(([u, y]) => {
862
+ const m = y.data;
861
863
  if (!m) return;
862
- const d = m.key || m.id, s = n ? lt(m, n, l || "") : d, a = t?.[m.id], i = {
863
- key: d,
864
- isNeedGenerate: a?.isNeedGenerate ?? ot(m),
864
+ const c = m.key || m.id, a = i ? at(m, i, s || "") : c, l = t?.[m.id], o = {
865
+ key: c,
866
+ isNeedGenerate: l?.isNeedGenerate ?? st(m),
865
867
  // 如果存在使用现有值,否则默认勾选
866
- describe: a?.describe ?? "",
867
- displayName: s
868
+ describe: l?.describe ?? "",
869
+ displayName: a
868
870
  };
869
- m.subProperties && !K(m.subProperties) && (i.subProperties = $e(
871
+ m.subProperties && !U(m.subProperties) && (o.subProperties = _e(
870
872
  m.subProperties,
871
- a?.subProperties,
872
- n,
873
- l
874
- )), h[m.id] = i;
873
+ l?.subProperties,
874
+ i,
875
+ s
876
+ )), h[m.id] = o;
875
877
  }), h;
876
878
  };
877
- function st({
879
+ function ct({
878
880
  open: e,
879
881
  onClose: t,
880
- onConfirm: n,
881
- component: l,
882
+ onConfirm: i,
883
+ component: s,
882
884
  initialConfig: h,
883
885
  locale: p,
884
- defaultLocale: c,
885
- title: g,
886
+ defaultLocale: u,
887
+ title: y,
886
888
  loading: m = !1
887
889
  }) {
888
- const { t: d } = R(), [s, a] = U(null);
889
- B(() => {
890
- if (e && l) {
891
- const u = { properties: {} };
892
- if (l.properties) {
893
- const C = h?.properties;
894
- u.properties = $e(l.properties, C, p, c);
890
+ const { t: c } = R(), [a, l] = K(null);
891
+ L(() => {
892
+ if (e && s) {
893
+ const d = { properties: {} };
894
+ if (s.properties) {
895
+ const x = h?.properties;
896
+ d.properties = _e(s.properties, x, p, u);
895
897
  }
896
- a(u);
898
+ l(d);
897
899
  }
898
- }, [e, l, h, p, c]);
899
- const i = () => {
900
+ }, [e, s, h, p, u]);
901
+ const o = () => {
900
902
  t();
901
- }, o = () => {
902
- s && (n(s), t());
903
- }, f = (u, C, w) => {
904
- if (!s || !u.length) return;
905
- const N = JSON.parse(JSON.stringify(s));
903
+ }, n = () => {
904
+ a && (i(a), t());
905
+ }, f = (d, x, w) => {
906
+ if (!a || !d.length) return;
907
+ const N = JSON.parse(JSON.stringify(a));
906
908
  let S = N.properties, I = null;
907
- for (let b = 0; b < u.length - 1; b++) {
908
- const x = u[b];
909
- if (!x || !S[x])
909
+ for (let g = 0; g < d.length - 1; g++) {
910
+ const v = d[g];
911
+ if (!v || !S[v])
910
912
  return;
911
913
  I = S;
912
- const O = S[x];
914
+ const O = S[v];
913
915
  O.subProperties || (O.subProperties = {}), S = O.subProperties;
914
916
  }
915
- const j = u[u.length - 1];
916
- if (j) {
917
+ const z = d[d.length - 1];
918
+ if (z) {
917
919
  if ("isNeedGenerate" in w) {
918
- const b = w.isNeedGenerate, x = {
919
- ...C,
920
+ const g = w.isNeedGenerate, v = {
921
+ ...x,
920
922
  ...w
921
923
  };
922
- if (C.subProperties && !K(C.subProperties)) {
923
- const O = (z, E) => {
924
- const F = {};
925
- return Object.entries(z).forEach(([Qe, Q]) => {
926
- const se = { ...Q };
927
- E !== null && (se.isNeedGenerate = E), Q.subProperties && !K(Q.subProperties) && (se.subProperties = O(
924
+ if (x.subProperties && !U(x.subProperties)) {
925
+ const O = (j, E) => {
926
+ const J = {};
927
+ return Object.entries(j).forEach(([Xe, Q]) => {
928
+ const ae = { ...Q };
929
+ E !== null && (ae.isNeedGenerate = E), Q.subProperties && !U(Q.subProperties) && (ae.subProperties = O(
928
930
  Q.subProperties,
929
931
  E !== null ? E : null
930
- )), F[Qe] = se;
931
- }), F;
932
+ )), J[Xe] = ae;
933
+ }), J;
932
934
  };
933
- x.subProperties = O(
934
- C.subProperties,
935
- b === !1 ? !1 : null
935
+ v.subProperties = O(
936
+ x.subProperties,
937
+ g === !1 ? !1 : null
936
938
  );
937
939
  }
938
- if (u.length === 1)
939
- N.properties[j] = x;
940
- else if (I && u.length >= 2) {
941
- const O = u[u.length - 2];
942
- O && I[O] && (I[O].subProperties || (I[O].subProperties = {}), I[O].subProperties[j] = x);
940
+ if (d.length === 1)
941
+ N.properties[z] = v;
942
+ else if (I && d.length >= 2) {
943
+ const O = d[d.length - 2];
944
+ O && I[O] && (I[O].subProperties || (I[O].subProperties = {}), I[O].subProperties[z] = v);
943
945
  }
944
- } else if (u.length === 1)
945
- N.properties[j] = {
946
- ...C,
946
+ } else if (d.length === 1)
947
+ N.properties[z] = {
948
+ ...x,
947
949
  ...w
948
950
  };
949
- else if (I && u.length >= 2) {
950
- const b = u[u.length - 2];
951
- b && I[b] && I[b].subProperties && (I[b].subProperties[j] = {
952
- ...C,
951
+ else if (I && d.length >= 2) {
952
+ const g = d[d.length - 2];
953
+ g && I[g] && I[g].subProperties && (I[g].subProperties[z] = {
954
+ ...x,
953
955
  ...w
954
956
  });
955
957
  }
956
- a(N);
958
+ l(N);
957
959
  }
958
- }, y = (u, C = [], w = !0) => {
959
- if (!u || K(u))
960
- return /* @__PURE__ */ r(Y, { children: d("maker.properties.noProperties") });
961
- const N = T(Object.entries(u), ([, S]) => S.displayName);
962
- return /* @__PURE__ */ r(k, { spacing: 1.5, children: N.map(([S, I], j) => {
963
- const b = [...C, S], x = j === N.length - 1, O = I.subProperties && !K(I.subProperties), z = I.displayName || S, E = !w;
964
- return /* @__PURE__ */ r(P, { sx: { position: "relative" }, children: /* @__PURE__ */ v(k, { direction: "row", children: [
965
- C.length > 0 && /* @__PURE__ */ v(
960
+ }, b = (d, x = [], w = !0) => {
961
+ if (!d || U(d))
962
+ return /* @__PURE__ */ r(Y, { children: c("maker.properties.noProperties") });
963
+ const N = T(Object.entries(d), ([, S]) => S.displayName);
964
+ return /* @__PURE__ */ r(k, { spacing: 1.5, children: N.map(([S, I], z) => {
965
+ const g = [...x, S], v = z === N.length - 1, O = I.subProperties && !U(I.subProperties), j = I.displayName || S, E = !w;
966
+ return /* @__PURE__ */ r(P, { sx: { position: "relative" }, children: /* @__PURE__ */ C(k, { direction: "row", children: [
967
+ x.length > 0 && /* @__PURE__ */ C(
966
968
  P,
967
969
  {
968
970
  sx: {
@@ -999,7 +1001,7 @@ function st({
999
1001
  }
1000
1002
  }
1001
1003
  ),
1002
- !x && /* @__PURE__ */ r(
1004
+ !v && /* @__PURE__ */ r(
1003
1005
  P,
1004
1006
  {
1005
1007
  sx: {
@@ -1016,8 +1018,8 @@ function st({
1016
1018
  ]
1017
1019
  }
1018
1020
  ),
1019
- /* @__PURE__ */ v(k, { spacing: 1.5, sx: { flexGrow: 1 }, children: [
1020
- /* @__PURE__ */ v(
1021
+ /* @__PURE__ */ C(k, { spacing: 1.5, sx: { flexGrow: 1 }, children: [
1022
+ /* @__PURE__ */ C(
1021
1023
  k,
1022
1024
  {
1023
1025
  direction: { xs: "column", md: "row" },
@@ -1031,18 +1033,18 @@ function st({
1031
1033
  ge,
1032
1034
  {
1033
1035
  control: /* @__PURE__ */ r(
1034
- rr,
1036
+ tr,
1035
1037
  {
1036
1038
  checked: I.isNeedGenerate,
1037
1039
  disabled: E,
1038
- onChange: (F) => {
1039
- f(b, I, {
1040
- isNeedGenerate: F.target.checked
1040
+ onChange: (J) => {
1041
+ f(g, I, {
1042
+ isNeedGenerate: J.target.checked
1041
1043
  });
1042
1044
  }
1043
1045
  }
1044
1046
  ),
1045
- label: z,
1047
+ label: j,
1046
1048
  sx: {
1047
1049
  minWidth: "180px",
1048
1050
  maxWidth: "280px",
@@ -1058,11 +1060,11 @@ function st({
1058
1060
  {
1059
1061
  size: "small",
1060
1062
  fullWidth: !0,
1061
- label: d("maker.properties.llmPropertyDescribe"),
1063
+ label: c("maker.properties.llmPropertyDescribe"),
1062
1064
  value: I.describe,
1063
- onChange: (F) => {
1064
- f(b, I, {
1065
- describe: F.target.value
1065
+ onChange: (J) => {
1066
+ f(g, I, {
1067
+ describe: J.target.value
1066
1068
  });
1067
1069
  },
1068
1070
  disabled: !I.isNeedGenerate
@@ -1071,42 +1073,42 @@ function st({
1071
1073
  ]
1072
1074
  }
1073
1075
  ),
1074
- O && /* @__PURE__ */ r(P, { sx: { ml: 3 }, children: y(
1076
+ O && /* @__PURE__ */ r(P, { sx: { ml: 3 }, children: b(
1075
1077
  I.subProperties,
1076
- b,
1078
+ g,
1077
1079
  I.isNeedGenerate && w
1078
1080
  ) })
1079
1081
  ] })
1080
1082
  ] }) }, S);
1081
1083
  }) });
1082
1084
  };
1083
- return /* @__PURE__ */ v(ye, { open: e, onClose: i, maxWidth: "lg", fullWidth: !0, children: [
1084
- /* @__PURE__ */ r(Ee, { children: g || d("maker.properties.llmConfigTitle") }),
1085
- /* @__PURE__ */ r(Ae, { children: /* @__PURE__ */ r(
1085
+ return /* @__PURE__ */ C(ye, { open: e, onClose: o, maxWidth: "lg", fullWidth: !0, children: [
1086
+ /* @__PURE__ */ r(Ee, { children: y || c("maker.properties.llmConfigTitle") }),
1087
+ /* @__PURE__ */ r(De, { children: /* @__PURE__ */ r(
1086
1088
  P,
1087
1089
  {
1088
1090
  sx: {
1089
1091
  my: 3
1090
1092
  },
1091
- children: m ? /* @__PURE__ */ r(D, { children: d("maker.properties.loading") }) : l ? s ? /* @__PURE__ */ v(k, { spacing: 3, children: [
1092
- /* @__PURE__ */ r(D, { variant: "subtitle2", children: d("maker.properties.llmConfigInstructions") }),
1093
- y(s.properties)
1094
- ] }) : /* @__PURE__ */ r(D, { children: d("maker.properties.loading") }) : /* @__PURE__ */ r(D, { color: "error", children: d("maker.properties.componentNotFound") })
1093
+ children: m ? /* @__PURE__ */ r(A, { children: c("maker.properties.loading") }) : s ? a ? /* @__PURE__ */ C(k, { spacing: 3, children: [
1094
+ /* @__PURE__ */ r(A, { variant: "subtitle2", children: c("maker.properties.llmConfigInstructions") }),
1095
+ b(a.properties)
1096
+ ] }) : /* @__PURE__ */ r(A, { children: c("maker.properties.loading") }) : /* @__PURE__ */ r(A, { color: "error", children: c("maker.properties.componentNotFound") })
1095
1097
  }
1096
1098
  ) }),
1097
- /* @__PURE__ */ v(De, { children: [
1098
- /* @__PURE__ */ r(A, { onClick: i, children: d("common.cancel") }),
1099
- /* @__PURE__ */ r(A, { variant: "contained", onClick: o, disabled: !s || m, children: d("common.confirm") })
1099
+ /* @__PURE__ */ C(Ae, { children: [
1100
+ /* @__PURE__ */ r(D, { onClick: o, children: c("common.cancel") }),
1101
+ /* @__PURE__ */ r(D, { variant: "contained", onClick: n, disabled: !a || m, children: c("common.confirm") })
1100
1102
  ] })
1101
1103
  ] });
1102
1104
  }
1103
- function at({
1105
+ function dt({
1104
1106
  label: e,
1105
1107
  value: t,
1106
- onChange: n
1108
+ onChange: i
1107
1109
  }) {
1108
- const [l, h] = U(!1);
1109
- return /* @__PURE__ */ v(
1110
+ const [s, h] = K(!1);
1111
+ return /* @__PURE__ */ C(
1110
1112
  k,
1111
1113
  {
1112
1114
  sx: {
@@ -1119,18 +1121,18 @@ function at({
1119
1121
  label: e,
1120
1122
  size: "small",
1121
1123
  value: t,
1122
- onChange: (p) => n?.(p.target.value),
1124
+ onChange: (p) => i?.(p.target.value),
1123
1125
  slotProps: {
1124
1126
  input: {
1125
1127
  sx: {
1126
1128
  pr: 0
1127
1129
  },
1128
- endAdornment: /* @__PURE__ */ r(_, { position: "end", children: /* @__PURE__ */ r(
1130
+ endAdornment: /* @__PURE__ */ r(H, { position: "end", children: /* @__PURE__ */ r(
1129
1131
  Pe,
1130
1132
  {
1131
1133
  onChange: ({ response: p }) => {
1132
- const c = p?.data?.filename;
1133
- c && n?.(c);
1134
+ const u = p?.data?.filename;
1135
+ u && i?.(u);
1134
1136
  }
1135
1137
  }
1136
1138
  ) })
@@ -1142,7 +1144,7 @@ function at({
1142
1144
  P,
1143
1145
  {
1144
1146
  component: "img",
1145
- src: te(t),
1147
+ src: ne(t),
1146
1148
  alt: e,
1147
1149
  onClick: () => h(!0),
1148
1150
  sx: {
@@ -1155,18 +1157,18 @@ function at({
1155
1157
  }
1156
1158
  }
1157
1159
  ),
1158
- /* @__PURE__ */ r(ye, { open: l, onClose: () => h(!1), children: /* @__PURE__ */ r(P, { component: "img", sx: { objectFit: "contain" }, src: te(t), alt: e }) })
1160
+ /* @__PURE__ */ r(ye, { open: s, onClose: () => h(!1), children: /* @__PURE__ */ r(P, { component: "img", sx: { objectFit: "contain" }, src: ne(t), alt: e }) })
1159
1161
  ]
1160
1162
  }
1161
1163
  );
1162
1164
  }
1163
- function fe(e, t = "") {
1164
- return Dr(e, (n, l, h) => {
1165
+ function be(e, t = "") {
1166
+ return Kr(e, (i, s, h) => {
1165
1167
  const p = t ? `${t}.${h}` : h;
1166
- return Vr(l) ? Or(n, fe(l, p)) : n[p] = l, n;
1168
+ return Dr(s) ? jr(i, be(s, p)) : i[p] = s, i;
1167
1169
  }, {});
1168
1170
  }
1169
- const ct = [
1171
+ const ut = [
1170
1172
  { value: "string", label: "Text" },
1171
1173
  { value: "multiline", label: "Text (Multiline)" },
1172
1174
  { value: "number", label: "Number" },
@@ -1180,15 +1182,18 @@ const ct = [
1180
1182
  { value: "component", label: "Component" },
1181
1183
  { value: "custom", label: "Custom (Render by a Component)" }
1182
1184
  ];
1183
- function X(e, t, n) {
1184
- return !e || !n ? !1 : Object.values(e).some(({ data: l }) => l.id !== t && l.key === n);
1185
+ function X(e, t, i) {
1186
+ return !e || !i ? !1 : Object.values(e).some(({ data: s }) => s.id !== t && s.key === i);
1185
1187
  }
1186
- function be(e, t) {
1188
+ function Z(e, t) {
1187
1189
  return !e || !t ? !1 : e[t]?.data.visible ?? !0;
1188
1190
  }
1189
- function pn({ componentId: e }) {
1190
- const { state: { components: t } } = ie(), l = t[e]?.data;
1191
- return l ? /* @__PURE__ */ r(k, {
1191
+ function Ge(e, t) {
1192
+ return !e || !t ? !1 : e[t]?.data.shared ?? !1;
1193
+ }
1194
+ function hn({ componentId: e }) {
1195
+ const { state: { components: t } } = oe(), s = t[e]?.data;
1196
+ return s ? /* @__PURE__ */ r(k, {
1192
1197
  sx: {
1193
1198
  maxHeight: "100%",
1194
1199
  overflow: "auto"
@@ -1197,56 +1202,56 @@ function pn({ componentId: e }) {
1197
1202
  sx: {
1198
1203
  p: 2
1199
1204
  },
1200
- children: /* @__PURE__ */ r(Wr, { FallbackComponent: Gr, resetKeys: [e], children: /* @__PURE__ */ r(dt, { value: l, componentId: e }) })
1205
+ children: /* @__PURE__ */ r(Br, { FallbackComponent: Qr, resetKeys: [e], children: /* @__PURE__ */ r(pt, { value: s, componentId: e }) })
1201
1206
  })
1202
1207
  }) : null;
1203
1208
  }
1204
- function dt({ value: e, componentId: t }) {
1205
- const { t: n } = R(), { localState: { currentLocale: l, customComponentPreviewerProperties: h }, state: { config: { defaultLocale: p } }, localActions: { setCustomComponentPreviewerProperties: c } } = ie(), g = q(e).doc, m = ve(), d = H(() => h?.[t] ?? {}, [t, h]), s = Ir({
1209
+ function pt({ value: e, componentId: t }) {
1210
+ const { t: i } = R(), { localState: { currentLocale: s, customComponentPreviewerProperties: h }, state: { config: { defaultLocale: p } }, localActions: { setCustomComponentPreviewerProperties: u } } = oe(), y = q(e).doc, m = ve(), c = $(() => h?.[t] ?? {}, [t, h]), a = zr({
1206
1211
  componentId: t,
1207
1212
  propertiesValue: {
1208
- ...d
1213
+ ...c
1209
1214
  }
1210
1215
  });
1211
- return B(() => {
1212
- s.componentId !== t && (s.componentId = t, s.propertiesValue = {
1213
- ...d
1216
+ return L(() => {
1217
+ a.componentId !== t && (a.componentId = t, a.propertiesValue = {
1218
+ ...c
1214
1219
  });
1215
- }, [t, d, s]), B(() => {
1216
- if (s.componentId !== t)
1220
+ }, [t, c, a]), L(() => {
1221
+ if (a.componentId !== t)
1217
1222
  return;
1218
- const a = Object.fromEntries(Object.values(e.properties ?? {}).map(({ data: i }) => [
1219
- i.id,
1223
+ const l = Object.fromEntries(Object.values(e.properties ?? {}).map(({ data: o }) => [
1224
+ o.id,
1220
1225
  {
1221
- value: s.propertiesValue[i.id]?.value ?? gr(i, i.locales?.[l]?.defaultValue ?? i.locales?.[p]?.defaultValue, {
1222
- locale: l,
1226
+ value: a.propertiesValue[o.id]?.value ?? yr(o, o.locales?.[s]?.defaultValue ?? o.locales?.[p]?.defaultValue, {
1227
+ locale: s,
1223
1228
  defaultLocale: p
1224
1229
  })
1225
1230
  }
1226
1231
  ]));
1227
- c(t, a);
1228
- }, [JSON.stringify(s.propertiesValue), t, s.componentId]), /* @__PURE__ */ r(k, {
1232
+ u(t, l);
1233
+ }, [JSON.stringify(a.propertiesValue), t, a.componentId]), /* @__PURE__ */ r(k, {
1229
1234
  sx: {
1230
1235
  height: "100%"
1231
1236
  },
1232
- children: /* @__PURE__ */ v(k, {
1237
+ children: /* @__PURE__ */ C(k, {
1233
1238
  sx: {
1234
1239
  gap: 2
1235
1240
  },
1236
1241
  children: [
1237
- /* @__PURE__ */ r(ut, { config: e }),
1238
- /* @__PURE__ */ r(mt, {
1242
+ /* @__PURE__ */ r(mt, { config: e }),
1243
+ /* @__PURE__ */ r(ft, {
1239
1244
  config: e,
1240
- currentLocale: l,
1245
+ currentLocale: s,
1241
1246
  defaultLocale: p,
1242
1247
  allComponents: m,
1243
- onUpdateConfig: (a) => {
1244
- g.transact(() => {
1245
- a(e);
1248
+ onUpdateConfig: (l) => {
1249
+ y.transact(() => {
1250
+ l(e);
1246
1251
  });
1247
1252
  }
1248
1253
  }),
1249
- /* @__PURE__ */ v(k, {
1254
+ /* @__PURE__ */ C(k, {
1250
1255
  direction: "row",
1251
1256
  sx: {
1252
1257
  gap: 2,
@@ -1254,46 +1259,46 @@ function dt({ value: e, componentId: t }) {
1254
1259
  alignItems: "center"
1255
1260
  },
1256
1261
  children: [
1257
- /* @__PURE__ */ r(D, { variant: "subtitle1", children: n("renderer") }),
1258
- /* @__PURE__ */ v(V, {
1262
+ /* @__PURE__ */ r(A, { variant: "subtitle1", children: i("renderer") }),
1263
+ /* @__PURE__ */ C(V, {
1259
1264
  hiddenLabel: !0,
1260
1265
  size: "small",
1261
1266
  select: !0,
1262
1267
  value: e.renderer?.type || "react-component",
1263
- onChange: (a) => {
1264
- g.transact(() => {
1265
- const i = a.target.value;
1266
- e.renderer ??= { type: i }, e.renderer.type = i;
1268
+ onChange: (l) => {
1269
+ y.transact(() => {
1270
+ const o = l.target.value;
1271
+ e.renderer ??= { type: o }, e.renderer.type = o;
1267
1272
  });
1268
1273
  },
1269
1274
  slotProps: {
1270
1275
  select: { autoWidth: !0 }
1271
1276
  },
1272
1277
  children: [
1273
- /* @__PURE__ */ r(ce, { value: "react-component", children: "React Component" }),
1274
- /* @__PURE__ */ r(ce, { value: "component", children: "Custom Component" })
1278
+ /* @__PURE__ */ r(de, { value: "react-component", children: "React Component" }),
1279
+ /* @__PURE__ */ r(de, { value: "component", children: "Custom Component" })
1275
1280
  ]
1276
1281
  })
1277
1282
  ]
1278
1283
  }),
1279
- e.renderer?.type === "component" && /* @__PURE__ */ r(Ct, { value: e }),
1280
- e.renderer?.type === "react-component" && /* @__PURE__ */ r(vt, { value: e }),
1281
- /* @__PURE__ */ r(qe, {
1284
+ e.renderer?.type === "component" && /* @__PURE__ */ r(kt, { value: e }),
1285
+ e.renderer?.type === "react-component" && /* @__PURE__ */ r(Pt, { value: e }),
1286
+ /* @__PURE__ */ r(Qe, {
1282
1287
  config: e,
1283
- currentLocale: l,
1288
+ currentLocale: s,
1284
1289
  defaultLocale: p,
1285
1290
  allComponents: m,
1286
- propertiesValue: s.propertiesValue,
1287
- onChange: ({ value: a, id: i, path: o }) => {
1288
- const f = [...o, "data"];
1289
- if (!Nr(e, f)) {
1290
- he.warning(n("cannotFindPropertyKey", {
1291
+ propertiesValue: a.propertiesValue,
1292
+ onChange: ({ value: l, id: o, path: n }) => {
1293
+ const f = [...n, "data"];
1294
+ if (!Vr(e, f)) {
1295
+ fe.warning(i("cannotFindPropertyKey", {
1291
1296
  key: f.join(".")
1292
1297
  }));
1293
1298
  return;
1294
1299
  }
1295
- s.propertiesValue[i] = {
1296
- value: a.value
1300
+ a.propertiesValue[o] = {
1301
+ value: l.value
1297
1302
  };
1298
1303
  }
1299
1304
  })
@@ -1301,19 +1306,19 @@ function dt({ value: e, componentId: t }) {
1301
1306
  })
1302
1307
  });
1303
1308
  }
1304
- function ut({ config: e }) {
1309
+ function mt({ config: e }) {
1305
1310
  const { t } = R();
1306
- return /* @__PURE__ */ r(le, { children: /* @__PURE__ */ v(k, {
1311
+ return /* @__PURE__ */ r(se, { children: /* @__PURE__ */ C(k, {
1307
1312
  sx: {
1308
1313
  gap: 2
1309
1314
  },
1310
1315
  children: [
1311
- /* @__PURE__ */ r(D, { variant: "subtitle1", children: t("basicInfo") }),
1316
+ /* @__PURE__ */ r(A, { variant: "subtitle1", children: t("basicInfo") }),
1312
1317
  /* @__PURE__ */ r(V, {
1313
1318
  label: t("name"),
1314
1319
  size: "small",
1315
1320
  value: e.name || "",
1316
- onChange: (n) => e.name = n.target.value
1321
+ onChange: (i) => e.name = i.target.value
1317
1322
  }),
1318
1323
  /* @__PURE__ */ r(V, {
1319
1324
  label: t("description"),
@@ -1322,10 +1327,10 @@ function ut({ config: e }) {
1322
1327
  minRows: 2,
1323
1328
  maxRows: 10,
1324
1329
  value: e.description || "",
1325
- onChange: (n) => e.description = n.target.value,
1330
+ onChange: (i) => e.description = i.target.value,
1326
1331
  slotProps: {
1327
1332
  input: {
1328
- endAdornment: /* @__PURE__ */ r(_, { position: "end", sx: { mt: -1.5 }, children: /* @__PURE__ */ r(Pt, { config: e }) })
1333
+ endAdornment: /* @__PURE__ */ r(H, { position: "end", sx: { mt: -1.5 }, children: /* @__PURE__ */ r(wt, { config: e }) })
1329
1334
  },
1330
1335
  htmlInput: { maxLength: 200 }
1331
1336
  }
@@ -1336,81 +1341,88 @@ function ut({ config: e }) {
1336
1341
  multiple: !0,
1337
1342
  freeSolo: !0,
1338
1343
  value: e.tags ?? [],
1339
- onChange: (n, l) => e.tags = l,
1340
- renderInput: (n) => /* @__PURE__ */ r(V, { label: t("tags"), ...n })
1344
+ onChange: (i, s) => e.tags = s,
1345
+ renderInput: (i) => /* @__PURE__ */ r(V, { label: t("tags"), ...i })
1341
1346
  }),
1342
- /* @__PURE__ */ r(at, {
1347
+ /* @__PURE__ */ r(dt, {
1343
1348
  label: t("previewImage"),
1344
1349
  value: e.previewImage || "",
1345
- onChange: (n) => e.previewImage = n
1350
+ onChange: (i) => e.previewImage = i
1346
1351
  })
1347
1352
  ]
1348
1353
  }) });
1349
1354
  }
1350
- function Ge({ data: e, params: t, visible: n, config: l, currentLocale: h, defaultLocale: p, allComponents: c, onUpdateConfig: g }) {
1351
- const { t: m } = R(), d = H(() => e.type === "json" || e.type === "yaml" || e.type === "array" ? bt : L, [e.type]);
1352
- return /* @__PURE__ */ r(it, {
1355
+ function Ye({ data: e, params: t, visible: i, shared: s, config: h, currentLocale: p, defaultLocale: u, allComponents: y, onUpdateConfig: m }) {
1356
+ const { t: c } = R(), a = $(() => e.type === "json" || e.type === "yaml" || e.type === "array" ? yt : M, [e.type]);
1357
+ return /* @__PURE__ */ r(lt, {
1353
1358
  preview: t.preview,
1354
1359
  drop: t.drop,
1355
1360
  drag: t.drag,
1356
1361
  isDragging: t.isDragging,
1357
1362
  onDelete: () => {
1358
- g((s) => {
1359
- if (s.properties) {
1360
- const i = Object.entries(s.properties).sort(([, f], [, y]) => f.index - y.index);
1361
- delete s.properties[e.id], i.filter(([f]) => f !== e.id).forEach(([, f], y) => {
1362
- f.index = y;
1363
+ m((l) => {
1364
+ if (l.properties) {
1365
+ const n = Object.entries(l.properties).sort(([, b], [, d]) => b.index - d.index);
1366
+ delete l.properties[e.id], n.filter(([b]) => b !== e.id).forEach(([, b], d) => {
1367
+ b.index = d;
1363
1368
  });
1364
1369
  }
1365
1370
  });
1366
1371
  },
1367
- visible: n,
1368
- onVisibilityChange: (s) => {
1369
- g((a) => {
1370
- const i = a.properties[e.id].data;
1371
- i.visible = s;
1372
+ visible: i,
1373
+ onVisibilityChange: (l) => {
1374
+ m((o) => {
1375
+ const n = o.properties[e.id].data;
1376
+ n.visible = l;
1377
+ });
1378
+ },
1379
+ shared: s,
1380
+ onSharedChange: (l) => {
1381
+ m((o) => {
1382
+ const n = o.properties[e.id].data;
1383
+ n.shared = l;
1372
1384
  });
1373
1385
  },
1374
1386
  alwaysShowActions: !0,
1375
- children: /* @__PURE__ */ v(k, {
1387
+ children: /* @__PURE__ */ C(k, {
1376
1388
  direction: "column",
1377
1389
  sx: {
1378
1390
  gap: 2
1379
1391
  },
1380
1392
  children: [
1381
1393
  /* @__PURE__ */ r(V, {
1382
- label: m("key"),
1394
+ label: c("key"),
1383
1395
  size: "small",
1384
1396
  required: !0,
1385
1397
  sx: {
1386
- width: "calc(100% - 80px - 8px)",
1398
+ width: "calc(100% - 104px - 8px)",
1387
1399
  flex: 1,
1388
1400
  "& .MuiOutlinedInput-root": {
1389
- borderColor: e.key ? X(l.properties, e.id, e.key) ? "warning.main" : void 0 : "error.main"
1401
+ borderColor: e.key ? X(h.properties, e.id, e.key) ? "warning.main" : void 0 : "error.main"
1390
1402
  },
1391
1403
  "& .MuiFormLabel-root": {
1392
- color: e.key ? X(l.properties, e.id, e.key) ? "warning.main" : "text.secondary" : "error.main"
1404
+ color: e.key ? X(h.properties, e.id, e.key) ? "warning.main" : "text.secondary" : "error.main"
1393
1405
  },
1394
1406
  "& .MuiFormLabel-root.Mui-focused": {
1395
- color: e.key ? X(l.properties, e.id, e.key) ? "warning.main" : "primary.main" : "error.main"
1407
+ color: e.key ? X(h.properties, e.id, e.key) ? "warning.main" : "primary.main" : "error.main"
1396
1408
  }
1397
1409
  },
1398
1410
  value: e.key || "",
1399
- onChange: (s) => {
1400
- g((a) => {
1401
- const i = a.properties[e.id].data;
1402
- i.key = s.target.value.trim();
1411
+ onChange: (l) => {
1412
+ m((o) => {
1413
+ const n = o.properties[e.id].data;
1414
+ n.key = l.target.value.trim();
1403
1415
  });
1404
1416
  },
1405
1417
  slotProps: {
1406
1418
  input: {
1407
- endAdornment: !e.key || e.key && X(l.properties, e.id, e.key) ? /* @__PURE__ */ r(_, {
1419
+ endAdornment: !e.key || e.key && X(h.properties, e.id, e.key) ? /* @__PURE__ */ r(H, {
1408
1420
  position: "end",
1409
1421
  sx: {
1410
1422
  width: 16,
1411
1423
  ml: 0
1412
1424
  },
1413
- children: /* @__PURE__ */ r(J, { title: e.key ? m("duplicateKey") : m("requiredKey"), children: /* @__PURE__ */ r(Me, {
1425
+ children: /* @__PURE__ */ r(B, { title: e.key ? c("duplicateKey") : c("requiredKey"), children: /* @__PURE__ */ r(Me, {
1414
1426
  sx: {
1415
1427
  color: e.key ? "warning.main" : "error.main",
1416
1428
  fontSize: 16
@@ -1420,101 +1432,101 @@ function Ge({ data: e, params: t, visible: n, config: l, currentLocale: h, defau
1420
1432
  }
1421
1433
  }
1422
1434
  }),
1423
- /* @__PURE__ */ v(k, {
1435
+ /* @__PURE__ */ C(k, {
1424
1436
  direction: "row",
1425
1437
  sx: {
1426
1438
  gap: 1
1427
1439
  },
1428
1440
  children: [
1429
1441
  /* @__PURE__ */ r(V, {
1430
- label: m("label"),
1442
+ label: c("label"),
1431
1443
  size: "small",
1432
1444
  sx: { flex: 1 },
1433
- value: (e.locales?.[h]?.name ?? e.locales?.[p]?.name) || "",
1434
- onChange: (s) => {
1435
- g((a) => {
1436
- const i = a.properties[e.id].data;
1437
- i.locales ??= {}, i.locales[h] ??= {}, i.locales[h].name = s.target.value;
1445
+ value: (e.locales?.[p]?.name ?? e.locales?.[u]?.name) || "",
1446
+ onChange: (l) => {
1447
+ m((o) => {
1448
+ const n = o.properties[e.id].data;
1449
+ n.locales ??= {}, n.locales[p] ??= {}, n.locales[p].name = l.target.value;
1438
1450
  });
1439
1451
  }
1440
1452
  }),
1441
1453
  /* @__PURE__ */ r(V, {
1442
- label: m("type"),
1454
+ label: c("type"),
1443
1455
  size: "small",
1444
1456
  select: !0,
1445
1457
  sx: { flex: 1 },
1446
1458
  value: e.type === "string" && e.multiline ? "multiline" : e.type || "string",
1447
- onChange: (s) => {
1448
- g((a) => {
1449
- const i = a.properties[e.id].data;
1450
- if (i.locales)
1451
- for (const f of Object.keys(i.locales))
1452
- i.locales[f].defaultValue = void 0;
1453
- const o = s.target.value;
1454
- o === "multiline" ? (i.type = "string", i.multiline = !0) : (typeof i.multiline < "u" && delete i.multiline, i.type = o);
1459
+ onChange: (l) => {
1460
+ m((o) => {
1461
+ const n = o.properties[e.id].data;
1462
+ if (n.locales)
1463
+ for (const b of Object.keys(n.locales))
1464
+ n.locales[b].defaultValue = void 0;
1465
+ const f = l.target.value;
1466
+ f === "multiline" ? (n.type = "string", n.multiline = !0) : (typeof n.multiline < "u" && delete n.multiline, n.type = f);
1455
1467
  });
1456
1468
  },
1457
- children: ct.map((s) => /* @__PURE__ */ r(ce, { value: s.value, children: s.label }, s.value))
1469
+ children: ut.map((l) => /* @__PURE__ */ r(de, { value: l.value, children: l.label }, l.value))
1458
1470
  })
1459
1471
  ]
1460
1472
  }),
1461
- /* @__PURE__ */ v(k, {
1473
+ /* @__PURE__ */ C(k, {
1462
1474
  direction: "row",
1463
1475
  sx: {
1464
1476
  gap: 1
1465
1477
  },
1466
1478
  children: [
1467
- /* @__PURE__ */ r(d, {
1468
- allComponents: c,
1469
- defaultLocale: p,
1470
- component: l,
1479
+ /* @__PURE__ */ r(a, {
1480
+ allComponents: y,
1481
+ defaultLocale: u,
1482
+ component: h,
1471
1483
  property: e,
1472
- label: m("defaultValue"),
1484
+ label: c("defaultValue"),
1473
1485
  size: "small",
1474
1486
  fullWidth: !0,
1475
- value: e.locales?.[h]?.defaultValue,
1476
- onChange: (s, a) => {
1477
- g((i) => {
1478
- const o = i.properties[e.id].data;
1479
- if (a?.forceUpdateProperty) {
1480
- const f = fe(o), y = fe(s);
1481
- Object.keys(y).forEach((u) => {
1482
- f[u] || Ue(o, u, y[u]);
1487
+ value: e.locales?.[p]?.defaultValue,
1488
+ onChange: (l, o) => {
1489
+ m((n) => {
1490
+ const f = n.properties[e.id].data;
1491
+ if (o?.forceUpdateProperty) {
1492
+ const b = be(f), d = be(l);
1493
+ Object.keys(d).forEach((x) => {
1494
+ b[x] || Ke(f, x, d[x]);
1483
1495
  });
1484
1496
  } else
1485
- o.locales ??= {}, o.locales[h] ??= {}, o.locales[h].defaultValue = s;
1497
+ f.locales ??= {}, f.locales[p] ??= {}, f.locales[p].defaultValue = l;
1486
1498
  });
1487
1499
  }
1488
1500
  }),
1489
- e.type === "custom" ? /* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(ht, { property: e, allComponents: c }) }) : null
1501
+ e.type === "custom" ? /* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(bt, { property: e, allComponents: y }) }) : null
1490
1502
  ]
1491
1503
  })
1492
1504
  ]
1493
1505
  })
1494
1506
  });
1495
1507
  }
1496
- function pt(e, t) {
1497
- const [n, l] = U(0);
1498
- return B(() => {
1508
+ function ht(e, t) {
1509
+ const [i, s] = K(0);
1510
+ return L(() => {
1499
1511
  const p = setTimeout(() => {
1500
1512
  if (e.current) {
1501
- let c = e.current.parentElement, g = 0;
1502
- for (; c; )
1503
- c.classList.contains("property-container") && g++, c = c.parentElement;
1504
- l(g);
1513
+ let u = e.current.parentElement, y = 0;
1514
+ for (; u; )
1515
+ u.classList.contains("property-container") && y++, u = u.parentElement;
1516
+ s(y);
1505
1517
  }
1506
1518
  }, 100);
1507
1519
  return () => clearTimeout(p);
1508
- }, [e, t]), n;
1520
+ }, [e, t]), i;
1509
1521
  }
1510
- function mt({ config: e, currentLocale: t, defaultLocale: n, allComponents: l, onUpdateConfig: h, useI18nEditor: p = !0 }) {
1511
- const { t: c } = R(), g = ke({ variant: "dialog" }), m = e.properties && T(Object.values(e.properties), "index");
1512
- return /* @__PURE__ */ r(le, { children: /* @__PURE__ */ v(k, {
1522
+ function ft({ config: e, currentLocale: t, defaultLocale: i, allComponents: s, onUpdateConfig: h, useI18nEditor: p = !0 }) {
1523
+ const { t: u } = R(), y = ke({ variant: "dialog" }), m = e.properties && T(Object.values(e.properties), "index");
1524
+ return /* @__PURE__ */ r(se, { children: /* @__PURE__ */ C(k, {
1513
1525
  sx: {
1514
1526
  gap: 2
1515
1527
  },
1516
1528
  children: [
1517
- /* @__PURE__ */ v(k, {
1529
+ /* @__PURE__ */ C(k, {
1518
1530
  direction: "row",
1519
1531
  sx: {
1520
1532
  gap: 1,
@@ -1522,94 +1534,95 @@ function mt({ config: e, currentLocale: t, defaultLocale: n, allComponents: l, o
1522
1534
  justifyContent: "space-between"
1523
1535
  },
1524
1536
  children: [
1525
- /* @__PURE__ */ r(D, { variant: "subtitle1", children: c("properties") }),
1537
+ /* @__PURE__ */ r(A, { variant: "subtitle1", children: u("properties") }),
1526
1538
  /* @__PURE__ */ r(P, {
1527
1539
  sx: {
1528
1540
  flex: 1
1529
1541
  }
1530
1542
  }),
1531
- p && /* @__PURE__ */ r(A, { sx: { minWidth: 32, minHeight: 32, p: 0 }, ...we(g), children: /* @__PURE__ */ r(Be, { fontSize: "small" }) })
1543
+ p && /* @__PURE__ */ r(D, { sx: { minWidth: 32, minHeight: 32, p: 0 }, ...we(y), children: /* @__PURE__ */ r(Be, { fontSize: "small" }) })
1532
1544
  ]
1533
1545
  }),
1534
- e.properties && Object.keys(e.properties).length > 0 ? /* @__PURE__ */ r(He, {
1546
+ e.properties && Object.keys(e.properties).length > 0 ? /* @__PURE__ */ r($e, {
1535
1547
  component: k,
1536
1548
  gap: 2,
1537
1549
  list: e.properties,
1538
- renderItem: (d, s, a) => {
1539
- const i = be(e.properties, d.id);
1540
- return /* @__PURE__ */ r($, {
1550
+ renderItem: (c, a, l) => {
1551
+ const o = Z(e.properties, c.id), n = Ge(e.properties, c.id);
1552
+ return /* @__PURE__ */ r(_, {
1541
1553
  elevation: 0,
1542
1554
  className: "property-container",
1543
1555
  sx: {
1544
1556
  p: 1.25,
1545
1557
  borderRadius: 1,
1546
- border: i ? "1px solid" : "1px dashed",
1558
+ border: o ? "1px solid" : "1px dashed",
1547
1559
  borderColor: "divider"
1548
1560
  },
1549
1561
  children: /* @__PURE__ */ r(k, {
1550
1562
  sx: {
1551
1563
  gap: 2
1552
1564
  },
1553
- children: /* @__PURE__ */ r(Ge, {
1554
- data: d,
1555
- params: a,
1556
- visible: i,
1565
+ children: /* @__PURE__ */ r(Ye, {
1566
+ data: c,
1567
+ params: l,
1568
+ visible: o,
1569
+ shared: n,
1557
1570
  config: e,
1558
1571
  currentLocale: t,
1559
- defaultLocale: n,
1560
- allComponents: l,
1572
+ defaultLocale: i,
1573
+ allComponents: s,
1561
1574
  onUpdateConfig: h
1562
1575
  })
1563
1576
  })
1564
- }, d.id);
1577
+ }, c.id);
1565
1578
  }
1566
- }) : /* @__PURE__ */ r(Y, { style: { fontSize: 12 }, children: c("maker.properties.noProperties") }),
1567
- /* @__PURE__ */ r(A, {
1579
+ }) : /* @__PURE__ */ r(Y, { style: { fontSize: 12 }, children: u("maker.properties.noProperties") }),
1580
+ /* @__PURE__ */ r(D, {
1568
1581
  fullWidth: !0,
1569
1582
  variant: "outlined",
1570
1583
  className: "ignore-style-override",
1571
1584
  onClick: () => {
1572
- h((d) => {
1573
- const s = _e();
1574
- d.properties ??= {}, d.properties[s] ??= { index: m?.length || 0, data: { id: s } };
1585
+ h((c) => {
1586
+ const a = He();
1587
+ c.properties ??= {}, c.properties[a] ??= { index: m?.length || 0, data: { id: a, shared: !1 } };
1575
1588
  });
1576
1589
  },
1577
1590
  startIcon: /* @__PURE__ */ r(Le, {}),
1578
- children: c("addObject", { object: c("property") })
1591
+ children: u("addObject", { object: u("property") })
1579
1592
  }),
1580
- p && /* @__PURE__ */ r(Ye, { ...Je(g), component: e })
1593
+ p && /* @__PURE__ */ r(qe, { ...Je(y), component: e })
1581
1594
  ]
1582
1595
  }) });
1583
1596
  }
1584
- function ht({ property: e, allComponents: t }) {
1585
- const n = ke({ variant: "popper" });
1586
- return /* @__PURE__ */ v(M, { children: [
1587
- /* @__PURE__ */ r(A, { sx: { minWidth: 0 }, ...we(n), children: /* @__PURE__ */ r(Fe, { fontSize: "small" }) }),
1588
- /* @__PURE__ */ r(ir, { ...Tr(n), children: /* @__PURE__ */ r(xr, { onClickAway: n.close, children: /* @__PURE__ */ r($, { children: /* @__PURE__ */ r(P, {
1597
+ function bt({ property: e, allComponents: t }) {
1598
+ const i = ke({ variant: "popper" });
1599
+ return /* @__PURE__ */ C(F, { children: [
1600
+ /* @__PURE__ */ r(D, { sx: { minWidth: 0 }, ...we(i), children: /* @__PURE__ */ r(Fe, { fontSize: "small" }) }),
1601
+ /* @__PURE__ */ r(or, { ...Ur(i), children: /* @__PURE__ */ r(vr, { onClickAway: i.close, children: /* @__PURE__ */ r(_, { children: /* @__PURE__ */ r(P, {
1589
1602
  sx: {
1590
1603
  width: 500,
1591
1604
  p: 2
1592
1605
  },
1593
1606
  children: /* @__PURE__ */ r(Se, {
1594
1607
  value: e.componentId,
1595
- onChange: (l, h) => e.componentId = h,
1608
+ onChange: (s, h) => e.componentId = h,
1596
1609
  allComponents: t
1597
1610
  })
1598
1611
  }) }) }) })
1599
1612
  ] });
1600
1613
  }
1601
- function ft({ value: e, valueImmutable: t, onChange: n, defaultLocale: l, allComponents: h }) {
1602
- const [p, c] = U(!1), { t: g, locale: m } = R(), d = typeof e?.componentId == "string" ? h[e.componentId]?.data : void 0;
1603
- return d ? /* @__PURE__ */ v(P, { sx: { width: "100%", position: "relative" }, children: [
1614
+ function gt({ value: e, valueImmutable: t, onChange: i, defaultLocale: s, allComponents: h }) {
1615
+ const [p, u] = K(!1), { t: y, locale: m } = R(), c = typeof e?.componentId == "string" ? h[e.componentId]?.data : void 0;
1616
+ return c ? /* @__PURE__ */ C(P, { sx: { width: "100%", position: "relative" }, children: [
1604
1617
  /* @__PURE__ */ r(G, {
1605
1618
  sx: { minWidth: 0 },
1606
- disabled: !d,
1619
+ disabled: !c,
1607
1620
  size: "small",
1608
- onClick: () => c(!p),
1621
+ onClick: () => u(!p),
1609
1622
  color: p ? "primary" : "default",
1610
1623
  children: /* @__PURE__ */ r(Fe, { fontSize: "small" })
1611
1624
  }),
1612
- p && /* @__PURE__ */ r(tr, { in: p, timeout: "auto", unmountOnExit: !0, sx: { width: "100%", zIndex: 10 }, children: /* @__PURE__ */ v($, {
1625
+ p && /* @__PURE__ */ r(nr, { in: p, timeout: "auto", unmountOnExit: !0, sx: { width: "100%", zIndex: 10 }, children: /* @__PURE__ */ C(_, {
1613
1626
  elevation: 1,
1614
1627
  sx: {
1615
1628
  mt: 1,
@@ -1625,207 +1638,208 @@ function ft({ value: e, valueImmutable: t, onChange: n, defaultLocale: l, allCom
1625
1638
  width: "100%",
1626
1639
  mb: 2
1627
1640
  },
1628
- children: /* @__PURE__ */ r(qe, {
1629
- config: d,
1641
+ children: /* @__PURE__ */ r(Qe, {
1642
+ config: c,
1630
1643
  currentLocale: m,
1631
- defaultLocale: l,
1644
+ defaultLocale: s,
1632
1645
  allComponents: h,
1633
1646
  propertiesValue: e?.properties,
1634
- onChange: ({ id: s, value: a }) => {
1635
- const i = me(a.value), o = JSON.parse(JSON.stringify(e));
1636
- o?.componentId && (t ? n?.({ ...o, properties: { ...o.properties, [s]: { value: i } } }) : (o.properties = o.properties ?? {}, o.properties[s] = { value: i }, n?.(o)));
1647
+ onChange: ({ id: a, value: l }) => {
1648
+ const o = he(l.value), n = JSON.parse(JSON.stringify(e));
1649
+ n?.componentId && (t ? i?.({ ...n, properties: { ...n.properties, [a]: { value: o } } }) : (n.properties = n.properties ?? {}, n.properties[a] = { value: o }, i?.(n)));
1637
1650
  }
1638
1651
  })
1639
1652
  }),
1640
- /* @__PURE__ */ r(A, { size: "small", onClick: () => c(!1), sx: { mt: 1 }, children: g("close") })
1653
+ /* @__PURE__ */ r(D, { size: "small", onClick: () => u(!1), sx: { mt: 1 }, children: y("close") })
1641
1654
  ]
1642
1655
  }) })
1643
1656
  ] }) : null;
1644
1657
  }
1645
- function Ye({ type: e = "properties", component: t, ...n }) {
1646
- const { t: l } = R(), { state: { components: h, supportedLocales: p, config: { defaultLocale: c } } } = ie(), g = ve(), m = q(t).doc, d = e === "properties" ? t.properties : e === "parameters" && t.renderer?.type === "component" ? h[t.renderer.componentId]?.data.properties : void 0, s = t.renderer?.type === "component" ? t : void 0;
1647
- return /* @__PURE__ */ v(ye, { ...n, fullWidth: !0, maxWidth: "lg", children: [
1648
- /* @__PURE__ */ r(Ee, { children: l("i18nEditorTitle") }),
1649
- /* @__PURE__ */ r(Ae, { children: d && /* @__PURE__ */ r(k, { children: /* @__PURE__ */ v(je, { stickyHeader: !0, sx: { td: { verticalAlign: "top" } }, children: [
1650
- /* @__PURE__ */ r(ze, { children: /* @__PURE__ */ r(ee, { children: p.map(({ locale: a, name: i }) => /* @__PURE__ */ r(re, { children: /* @__PURE__ */ v(D, {
1658
+ function qe({ type: e = "properties", component: t, ...i }) {
1659
+ const { t: s } = R(), { state: { components: h, supportedLocales: p, config: { defaultLocale: u } } } = oe(), y = ve(), m = q(t).doc, c = e === "properties" ? t.properties : e === "parameters" && t.renderer?.type === "component" ? h[t.renderer.componentId]?.data.properties : void 0, a = t.renderer?.type === "component" ? t : void 0;
1660
+ return /* @__PURE__ */ C(ye, { ...i, fullWidth: !0, maxWidth: "lg", children: [
1661
+ /* @__PURE__ */ r(Ee, { children: s("i18nEditorTitle") }),
1662
+ /* @__PURE__ */ r(De, { children: c && /* @__PURE__ */ r(k, { children: /* @__PURE__ */ C(ze, { stickyHeader: !0, sx: { td: { verticalAlign: "top" } }, children: [
1663
+ /* @__PURE__ */ r(je, { children: /* @__PURE__ */ r(re, { children: p.map(({ locale: l, name: o }) => /* @__PURE__ */ r(te, { children: /* @__PURE__ */ C(A, {
1651
1664
  sx: {
1652
1665
  color: "text.primary"
1653
1666
  },
1654
1667
  children: [
1655
- i,
1656
- c === a && /* @__PURE__ */ r(Sr, { sx: { fontSize: 12 } })
1668
+ o,
1669
+ u === l && /* @__PURE__ */ r(Nr, { sx: { fontSize: 12 } })
1657
1670
  ]
1658
- }) }, a)) }) }),
1659
- /* @__PURE__ */ r(Ve, { children: T(Object.values(d), "index").map(({ data: a }) => /* @__PURE__ */ r(ee, { children: p.map(({ locale: i }) => /* @__PURE__ */ r(re, { children: /* @__PURE__ */ r(k, {
1671
+ }) }, l)) }) }),
1672
+ /* @__PURE__ */ r(Ve, { children: T(Object.values(c), "index").map(({ data: l }) => /* @__PURE__ */ r(re, { children: p.map(({ locale: o }) => /* @__PURE__ */ r(te, { children: /* @__PURE__ */ r(k, {
1660
1673
  sx: {
1661
1674
  gap: 1
1662
1675
  },
1663
- children: e === "properties" ? /* @__PURE__ */ v(M, { children: [
1676
+ children: e === "properties" ? /* @__PURE__ */ C(F, { children: [
1664
1677
  /* @__PURE__ */ r(V, {
1665
1678
  size: "small",
1666
1679
  label: "Key",
1667
- value: a.key || "",
1668
- onChange: (o) => {
1680
+ value: l.key || "",
1681
+ onChange: (n) => {
1669
1682
  m.transact(() => {
1670
- a.key = o.target.value.trim();
1683
+ l.key = n.target.value.trim();
1671
1684
  });
1672
1685
  }
1673
1686
  }),
1674
1687
  /* @__PURE__ */ r(V, {
1675
1688
  size: "small",
1676
- label: l("label"),
1677
- value: (a.locales?.[i]?.name ?? a.locales?.[c]?.name) || "",
1678
- onChange: (o) => {
1689
+ label: s("label"),
1690
+ value: (l.locales?.[o]?.name ?? l.locales?.[u]?.name) || "",
1691
+ onChange: (n) => {
1679
1692
  m.transact(() => {
1680
- a.locales ??= {}, a.locales[i] ??= {}, a.locales[i].name = o.target.value;
1693
+ l.locales ??= {}, l.locales[o] ??= {}, l.locales[o].name = n.target.value;
1681
1694
  });
1682
1695
  }
1683
1696
  }),
1684
- /* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(L, {
1685
- allComponents: g,
1686
- defaultLocale: c,
1697
+ /* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(M, {
1698
+ allComponents: y,
1699
+ defaultLocale: u,
1687
1700
  component: t,
1688
- property: a,
1701
+ property: l,
1689
1702
  size: "small",
1690
1703
  fullWidth: !0,
1691
1704
  label: "Default Value",
1692
- valueImmutable: ne(a.locales?.[i]?.defaultValue),
1693
- value: a.locales?.[i]?.defaultValue ?? a.locales?.[c]?.defaultValue,
1694
- onChange: (o) => {
1705
+ valueImmutable: ie(l.locales?.[o]?.defaultValue),
1706
+ value: l.locales?.[o]?.defaultValue ?? l.locales?.[u]?.defaultValue,
1707
+ onChange: (n) => {
1695
1708
  m.transact(() => {
1696
- a.locales ??= {}, a.locales[i] ??= {}, a.locales[i].defaultValue = o;
1709
+ l.locales ??= {}, l.locales[o] ??= {}, l.locales[o].defaultValue = n;
1697
1710
  });
1698
1711
  }
1699
1712
  }) })
1700
- ] }) : e === "parameters" && s ? /* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(L, {
1701
- allComponents: g,
1702
- defaultLocale: c,
1713
+ ] }) : e === "parameters" && a ? /* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(M, {
1714
+ allComponents: y,
1715
+ defaultLocale: u,
1703
1716
  component: t,
1704
- property: a,
1717
+ property: l,
1705
1718
  size: "small",
1706
1719
  fullWidth: !0,
1707
- valueImmutable: ne(s.renderer.properties?.[a.id]?.locales?.[i]?.value),
1708
- value: s.renderer.properties?.[a.id]?.locales?.[i]?.value ?? s.renderer.properties?.[a.id]?.locales?.[c]?.value ?? a.locales?.[i]?.defaultValue ?? a.locales?.[c]?.defaultValue,
1709
- onChange: (o) => {
1720
+ valueImmutable: ie(a.renderer.properties?.[l.id]?.locales?.[o]?.value),
1721
+ value: a.renderer.properties?.[l.id]?.locales?.[o]?.value ?? a.renderer.properties?.[l.id]?.locales?.[u]?.value ?? l.locales?.[o]?.defaultValue ?? l.locales?.[u]?.defaultValue,
1722
+ onChange: (n) => {
1710
1723
  m.transact(() => {
1711
- s.renderer.properties ??= {}, s.renderer.properties[a.id] ??= {}, s.renderer.properties[a.id].locales ??= {}, s.renderer.properties[a.id].locales[i] ??= {}, s.renderer.properties[a.id].locales[i].value = o;
1724
+ a.renderer.properties ??= {}, a.renderer.properties[l.id] ??= {}, a.renderer.properties[l.id].locales ??= {}, a.renderer.properties[l.id].locales[o] ??= {}, a.renderer.properties[l.id].locales[o].value = n;
1712
1725
  });
1713
1726
  }
1714
1727
  }) }) : null
1715
- }, a.id) }, i)) }, a.id)) })
1728
+ }, l.id) }, o)) }, l.id)) })
1716
1729
  ] }) }) }),
1717
- /* @__PURE__ */ r(De, { children: /* @__PURE__ */ r(A, { onClick: (a) => n.onClose?.(a, "escapeKeyDown"), children: l("close") }) })
1730
+ /* @__PURE__ */ r(Ae, { children: /* @__PURE__ */ r(D, { onClick: (l) => i.onClose?.(l, "escapeKeyDown"), children: s("close") }) })
1718
1731
  ] });
1719
1732
  }
1720
- const Ne = (e, t) => (n) => {
1721
- const l = [
1722
- n.palette.info.main,
1723
- n.palette.primary.main,
1724
- n.palette.secondary.main,
1725
- n.palette.success.main,
1726
- n.palette.warning.main
1727
- ], h = Math.min(l.length - 1, e), p = l[h], c = ae(p, 0.5), g = ae(p, 1);
1733
+ const Ne = (e, t) => (i) => {
1734
+ const s = [
1735
+ i.palette.info.main,
1736
+ i.palette.primary.main,
1737
+ i.palette.secondary.main,
1738
+ i.palette.success.main,
1739
+ i.palette.warning.main
1740
+ ], h = Math.min(s.length - 1, e), p = s[h], u = ce(p, 0.5), y = ce(p, 1);
1728
1741
  return {
1729
1742
  // 保留原有的边框样式
1730
- borderColor: `${c} !important`,
1743
+ borderColor: `${u} !important`,
1731
1744
  borderLeft: "3px solid !important",
1732
1745
  // 稍粗的左侧边框
1733
- borderLeftColor: c,
1746
+ borderLeftColor: u,
1734
1747
  // 使用透明度适应深色/浅色模式
1735
- color: g,
1748
+ color: y,
1736
1749
  ...t
1737
1750
  };
1738
1751
  };
1739
- function bt({ property: e, onChange: t, defaultLocale: n, allComponents: l }) {
1740
- const { t: h, locale: p } = R(), c = oe(null), g = pt(c, e), m = W(() => {
1752
+ function yt({ property: e, onChange: t, defaultLocale: i, allComponents: s }) {
1753
+ const { t: h, locale: p } = R(), u = le(null), y = ht(u, e), m = W(() => {
1741
1754
  if (!(e.type !== "json" && e.type !== "yaml" && e.type !== "array") && e.subProperties)
1742
1755
  try {
1743
- let d = {};
1744
- T(Object.values(e.subProperties), "index").filter((i) => i.data.visible !== !1 && i.data.key).forEach(({ data: i }) => {
1745
- if (!i.key)
1756
+ let c = {};
1757
+ T(Object.values(e.subProperties), "index").filter((o) => o.data.visible !== !1 && o.data.key).forEach(({ data: o }) => {
1758
+ if (!o.key)
1746
1759
  return;
1747
- let o = i.locales?.[p]?.defaultValue ?? i.locales?.[n]?.defaultValue;
1748
- if (i.type === "number")
1749
- o = Number(o);
1750
- else if (i.type === "boolean")
1751
- o = o === !0 || o === "true";
1752
- else if ((i.type === "json" || i.type === "yaml") && typeof o == "string")
1760
+ let n = o.locales?.[p]?.defaultValue ?? o.locales?.[i]?.defaultValue;
1761
+ if (o.type === "number")
1762
+ n = Number(n);
1763
+ else if (o.type === "boolean")
1764
+ n = n === !0 || n === "true";
1765
+ else if ((o.type === "json" || o.type === "yaml") && typeof n == "string")
1753
1766
  try {
1754
- i.type === "json" ? o = JSON.parse(o) : o = pe.parse(o);
1767
+ o.type === "json" ? n = JSON.parse(n) : n = me.parse(n);
1755
1768
  } catch (f) {
1756
- console.error("Error parsing nested value", o, f), o = {};
1769
+ console.error("Error parsing nested value", n, f), n = {};
1757
1770
  }
1758
- d[i.key] = o;
1759
- }), e.type === "array" && !Array.isArray(d) && (d = K(d) ? [] : [d]);
1760
- const a = xe(d, e.type);
1761
- t?.(a);
1762
- } catch (d) {
1763
- console.error("Error converting structure to text:", d);
1771
+ c[o.key] = n;
1772
+ }), e.type === "array" && !Array.isArray(c) && (c = U(c) ? [] : [c]);
1773
+ const l = xe(c, e.type);
1774
+ t?.(l);
1775
+ } catch (c) {
1776
+ console.error("Error converting structure to text:", c);
1764
1777
  }
1765
- }, [e, p, n, t]);
1766
- return e.type !== "json" && e.type !== "yaml" && e.type !== "array" ? null : /* @__PURE__ */ v(k, {
1778
+ }, [e, p, i, t]);
1779
+ return e.type !== "json" && e.type !== "yaml" && e.type !== "array" ? null : /* @__PURE__ */ C(k, {
1767
1780
  direction: "column",
1768
- ref: c,
1781
+ ref: u,
1769
1782
  sx: {
1770
1783
  gap: 1.5,
1771
1784
  width: "100%"
1772
1785
  },
1773
1786
  children: [
1774
- /* @__PURE__ */ r(nr, { sx: { mt: -1 }, children: /* @__PURE__ */ r(D, {
1787
+ /* @__PURE__ */ r(ir, { sx: { mt: -1 }, children: /* @__PURE__ */ r(A, {
1775
1788
  variant: "caption",
1776
1789
  sx: {
1777
1790
  color: "text.secondary"
1778
1791
  },
1779
1792
  children: h("maker.properties.subProperties")
1780
1793
  }) }),
1781
- e.subProperties && Object.keys(e.subProperties).length > 0 ? /* @__PURE__ */ r(He, {
1794
+ e.subProperties && Object.keys(e.subProperties).length > 0 ? /* @__PURE__ */ r($e, {
1782
1795
  component: k,
1783
1796
  gap: 2,
1784
1797
  list: e.subProperties,
1785
- renderItem: (d, s, a) => {
1786
- const i = d.visible !== !1;
1787
- return /* @__PURE__ */ r($, {
1798
+ renderItem: (c, a, l) => {
1799
+ const o = c.visible !== !1, n = c.shared ?? !1;
1800
+ return /* @__PURE__ */ r(_, {
1788
1801
  elevation: 0,
1789
1802
  className: "property-container",
1790
1803
  sx: {
1791
1804
  p: 1.25,
1792
1805
  borderRadius: 1,
1793
- border: i ? "1px solid" : "1px dashed",
1794
- "&": Ne(g)
1806
+ border: o ? "1px solid" : "1px dashed",
1807
+ "&": Ne(y)
1795
1808
  },
1796
1809
  children: /* @__PURE__ */ r(k, {
1797
1810
  sx: {
1798
1811
  gap: 2
1799
1812
  },
1800
- children: /* @__PURE__ */ r(Ge, {
1801
- data: d,
1802
- params: a,
1803
- visible: i,
1813
+ children: /* @__PURE__ */ r(Ye, {
1814
+ data: c,
1815
+ params: l,
1816
+ visible: o,
1817
+ shared: n,
1804
1818
  config: {
1805
1819
  properties: e.subProperties
1806
1820
  },
1807
1821
  currentLocale: p,
1808
- defaultLocale: n,
1809
- allComponents: l,
1810
- onUpdateConfig: (o) => {
1822
+ defaultLocale: i,
1823
+ allComponents: s,
1824
+ onUpdateConfig: (f) => {
1811
1825
  try {
1812
- const f = { properties: e.subProperties || {} };
1813
- o(f);
1814
- const y = {
1826
+ const b = { properties: e.subProperties || {} };
1827
+ f(b);
1828
+ const d = {
1815
1829
  ...e,
1816
- subProperties: f.properties
1830
+ subProperties: b.properties
1817
1831
  };
1818
- t?.(y, { forceUpdateProperty: !0 }), m();
1819
- } catch (f) {
1820
- console.error("Error updating property:", f);
1832
+ t?.(d, { forceUpdateProperty: !0 }), m();
1833
+ } catch (b) {
1834
+ console.error("Error updating property:", b);
1821
1835
  }
1822
1836
  }
1823
1837
  })
1824
1838
  })
1825
- }, d.id);
1839
+ }, c.id);
1826
1840
  }
1827
1841
  }) : /* @__PURE__ */ r(Y, { style: { fontSize: 12, height: 100 }, children: h("maker.properties.noSubProperties") }),
1828
- /* @__PURE__ */ r(A, {
1842
+ /* @__PURE__ */ r(D, {
1829
1843
  fullWidth: !0,
1830
1844
  variant: "outlined",
1831
1845
  className: "ignore-style-override",
@@ -1833,13 +1847,14 @@ function bt({ property: e, onChange: t, defaultLocale: n, allComponents: l }) {
1833
1847
  startIcon: /* @__PURE__ */ r(Le, {}),
1834
1848
  onClick: () => {
1835
1849
  try {
1836
- const d = e.subProperties || {}, s = _e(), i = {
1837
- index: Object.values(d).length,
1850
+ const c = e.subProperties || {}, a = He(), o = {
1851
+ index: Object.values(c).length,
1838
1852
  data: {
1839
- id: s,
1853
+ id: a,
1840
1854
  key: "",
1841
1855
  type: "string",
1842
1856
  visible: !0,
1857
+ shared: !1,
1843
1858
  locales: {
1844
1859
  [p]: {
1845
1860
  name: "",
@@ -1849,20 +1864,20 @@ function bt({ property: e, onChange: t, defaultLocale: n, allComponents: l }) {
1849
1864
  // 为嵌套属性预初始化
1850
1865
  subProperties: {}
1851
1866
  }
1852
- }, o = {
1867
+ }, n = {
1853
1868
  ...e,
1854
1869
  subProperties: {
1855
- ...d,
1856
- [s]: i
1870
+ ...c,
1871
+ [a]: o
1857
1872
  }
1858
1873
  };
1859
- t?.(o, { forceUpdateProperty: !0 }), m();
1860
- } catch (d) {
1861
- console.error("Error adding property:", d);
1874
+ t?.(n, { forceUpdateProperty: !0 }), m();
1875
+ } catch (c) {
1876
+ console.error("Error adding property:", c);
1862
1877
  }
1863
1878
  },
1864
1879
  sx: {
1865
- "&": Ne(g, {
1880
+ "&": Ne(y, {
1866
1881
  // borderLeft: undefined,
1867
1882
  })
1868
1883
  },
@@ -1871,91 +1886,91 @@ function bt({ property: e, onChange: t, defaultLocale: n, allComponents: l }) {
1871
1886
  ]
1872
1887
  });
1873
1888
  }
1874
- function L({ component: e, property: t, value: n, onChange: l, valueImmutable: h, defaultLocale: p, allComponents: c, ...g }) {
1875
- const { locale: m } = R(), d = mr(), s = oe(null), a = () => {
1876
- const o = d?.current?.getUploader();
1877
- o?.open(), s.current && o.onceUploadSuccess(({ response: f }) => {
1878
- let y = f?.data?.filename || "";
1879
- y && (y = `mediakit://${y}`, n && !n.includes("mediakit://") && (y += " # please use < import { getMediaKitAbsoluteUrl } from '@blocklet/pages-kit/builtin/utils' > to get the full address")), s.current?.(y);
1889
+ function M({ component: e, property: t, value: i, onChange: s, valueImmutable: h, defaultLocale: p, allComponents: u, ...y }) {
1890
+ const { locale: m } = R(), c = hr(), a = le(null), l = () => {
1891
+ const n = c?.current?.getUploader();
1892
+ n?.open(), a.current && n.onceUploadSuccess(({ response: f }) => {
1893
+ let b = f?.data?.filename || "";
1894
+ b && (b = `mediakit://${b}`, i && !i.includes("mediakit://") && (b += " # please use < import { getMediaKitAbsoluteUrl } from '@blocklet/pages-kit/builtin/utils' > to get the full address")), a.current?.(b);
1880
1895
  });
1881
- }, i = g.label ?? (t.locales?.[m]?.name || t.locales?.[p]?.name || t.key || t.id);
1896
+ }, o = y.label ?? (t.locales?.[m]?.name || t.locales?.[p]?.name || t.key || t.id);
1882
1897
  if (t.type === "number")
1883
- return /* @__PURE__ */ r(gt, {
1884
- ...g,
1885
- label: i,
1898
+ return /* @__PURE__ */ r(xt, {
1899
+ ...y,
1900
+ label: o,
1886
1901
  NumberProps: {
1887
- value: ["number", "string"].includes(typeof n) ? n : null,
1888
- onChange: (o, f) => l?.(f)
1902
+ value: ["number", "string"].includes(typeof i) ? i : null,
1903
+ onChange: (n, f) => s?.(f)
1889
1904
  }
1890
1905
  });
1891
1906
  if (t.type === "decimal")
1892
1907
  return /* @__PURE__ */ r(V, {
1893
- ...g,
1894
- label: i,
1908
+ ...y,
1909
+ label: o,
1895
1910
  type: "text",
1896
- value: n ?? "",
1897
- onChange: (o) => {
1898
- const f = o.target.value;
1911
+ value: i ?? "",
1912
+ onChange: (n) => {
1913
+ const f = n.target.value;
1899
1914
  if (f === "" || f === "-") {
1900
- l?.(f);
1915
+ s?.(f);
1901
1916
  return;
1902
1917
  }
1903
1918
  if (/^-?(?!.*\..*\.)[0-9]*(\.[0-9]{0,9})?$/.test(f)) {
1904
- let u = f;
1905
- /^-?[1-9]+[0-9]*(\.[0-9]{1,9})?$/.test(u) && (u = Number(u)), l?.(u);
1919
+ let d = f;
1920
+ /^-?[1-9]+[0-9]*(\.[0-9]{1,9})?$/.test(d) && (d = Number(d)), s?.(d);
1906
1921
  }
1907
1922
  }
1908
1923
  });
1909
1924
  if (t.type === "boolean")
1910
1925
  return /* @__PURE__ */ r(ge, {
1911
- label: i,
1926
+ label: o,
1912
1927
  labelPlacement: "start",
1913
- control: /* @__PURE__ */ r(Re, { checked: n === !0, onChange: (o, f) => l?.(f) })
1928
+ control: /* @__PURE__ */ r(Re, { checked: i === !0, onChange: (n, f) => s?.(f) })
1914
1929
  });
1915
1930
  if (t.type === "color")
1916
- return /* @__PURE__ */ r(et, {
1917
- label: i,
1918
- value: n,
1919
- onChange: (o) => {
1920
- l?.(o);
1931
+ return /* @__PURE__ */ r(nt, {
1932
+ label: o,
1933
+ value: i,
1934
+ onChange: (n) => {
1935
+ s?.(n);
1921
1936
  }
1922
1937
  });
1923
1938
  if (t.type === "json" || t.type === "yaml")
1924
- return /* @__PURE__ */ r(rt, {
1925
- label: i,
1926
- value: n,
1927
- onChange: (o) => {
1928
- l?.(o);
1939
+ return /* @__PURE__ */ r(it, {
1940
+ label: o,
1941
+ value: i,
1942
+ onChange: (n) => {
1943
+ s?.(n);
1929
1944
  },
1930
1945
  property: t,
1931
1946
  component: e,
1932
1947
  defaultLocale: p,
1933
- allComponents: c,
1934
- PropertyValueField: L,
1935
- onUpload: (o) => {
1936
- s.current = o, a();
1948
+ allComponents: u,
1949
+ PropertyValueField: M,
1950
+ onUpload: (n) => {
1951
+ a.current = n, l();
1937
1952
  }
1938
1953
  });
1939
1954
  if (t.type === "custom") {
1940
- const o = c[t.componentId]?.data;
1941
- return o ? /* @__PURE__ */ r(P, {
1955
+ const n = u[t.componentId]?.data;
1956
+ return n ? /* @__PURE__ */ r(P, {
1942
1957
  sx: {
1943
1958
  width: "100%"
1944
1959
  },
1945
- children: /* @__PURE__ */ r(Ke, {
1946
- componentId: o.id,
1947
- props: { label: i, value: n, onChange: l },
1960
+ children: /* @__PURE__ */ r(Ue, {
1961
+ componentId: n.id,
1962
+ props: { label: o, value: i, onChange: s },
1948
1963
  locale: m,
1949
1964
  dev: {
1950
1965
  mode: "draft",
1951
- components: c,
1966
+ components: u,
1952
1967
  defaultLocale: p
1953
1968
  }
1954
1969
  })
1955
- }) : /* @__PURE__ */ r(V, { ...g, label: i, disabled: !0, placeholder: "Click right button select a component" });
1970
+ }) : /* @__PURE__ */ r(V, { ...y, label: o, disabled: !0, placeholder: "Click right button select a component" });
1956
1971
  }
1957
1972
  if (t.type === "component")
1958
- return /* @__PURE__ */ v(k, {
1973
+ return /* @__PURE__ */ C(k, {
1959
1974
  direction: "column",
1960
1975
  sx: {
1961
1976
  width: "100%",
@@ -1963,40 +1978,40 @@ function L({ component: e, property: t, value: n, onChange: l, valueImmutable: h
1963
1978
  },
1964
1979
  children: [
1965
1980
  /* @__PURE__ */ r(Se, {
1966
- allComponents: c,
1967
- label: i,
1968
- value: n?.componentId,
1969
- onChange: (o, f) => {
1970
- h || !n ? l?.({ ...n && JSON.parse(JSON.stringify(n)), componentId: f }) : typeof n == "object" && (n.componentId = f, l?.({ ...n && JSON.parse(JSON.stringify(n)), componentId: f }));
1981
+ allComponents: u,
1982
+ label: o,
1983
+ value: i?.componentId,
1984
+ onChange: (n, f) => {
1985
+ h || !i ? s?.({ ...i && JSON.parse(JSON.stringify(i)), componentId: f }) : typeof i == "object" && (i.componentId = f, s?.({ ...i && JSON.parse(JSON.stringify(i)), componentId: f }));
1971
1986
  }
1972
1987
  }),
1973
- n?.componentId && /* @__PURE__ */ r(ft, {
1974
- value: n,
1988
+ i?.componentId && /* @__PURE__ */ r(gt, {
1989
+ value: i,
1975
1990
  valueImmutable: h,
1976
- onChange: l,
1991
+ onChange: s,
1977
1992
  defaultLocale: p,
1978
- allComponents: c
1993
+ allComponents: u
1979
1994
  })
1980
1995
  ]
1981
1996
  });
1982
1997
  if (!t.type || ["string", "url", "multiline"].includes(t.type)) {
1983
- let o = t.type === "string" ? t.multiline : void 0;
1984
- t.type === "multiline" && (o = !0);
1985
- const f = t.type === "url" ? n?.url : n;
1998
+ let n = t.type === "string" ? t.multiline : void 0;
1999
+ t.type === "multiline" && (n = !0);
2000
+ const f = t.type === "url" ? i?.url : i;
1986
2001
  return /* @__PURE__ */ r(V, {
1987
- ...g,
1988
- label: i,
2002
+ ...y,
2003
+ label: o,
1989
2004
  value: typeof f == "string" ? f : "",
1990
- multiline: o,
1991
- minRows: o ? 2 : void 0,
1992
- maxRows: o ? 10 : void 0,
1993
- onChange: (y) => l?.(t.type === "url" ? { ...n, url: y.target.value, mediaKitUrl: y.target.value } : y.target.value),
2005
+ multiline: n,
2006
+ minRows: n ? 2 : void 0,
2007
+ maxRows: n ? 10 : void 0,
2008
+ onChange: (b) => s?.(t.type === "url" ? { ...i, url: b.target.value, mediaKitUrl: b.target.value } : b.target.value),
1994
2009
  slotProps: {
1995
2010
  input: t.type === "url" ? {
1996
2011
  sx: {
1997
2012
  pr: 0
1998
2013
  },
1999
- endAdornment: /* @__PURE__ */ v(_, {
2014
+ endAdornment: /* @__PURE__ */ C(H, {
2000
2015
  position: "end",
2001
2016
  sx: {
2002
2017
  display: "flex",
@@ -2005,63 +2020,63 @@ function L({ component: e, property: t, value: n, onChange: l, valueImmutable: h
2005
2020
  },
2006
2021
  children: [
2007
2022
  /* @__PURE__ */ r(Pe, {
2008
- onChange: async ({ response: y }) => {
2009
- const u = y?.data?.url || y?.data?.fileUrl;
2010
- let C;
2011
- u && (C = await de(u).catch(() => ue(u)).catch(() => {
2023
+ onChange: async ({ response: b }) => {
2024
+ const d = b?.data?.url || b?.data?.fileUrl;
2025
+ let x;
2026
+ d && (x = await ue(d).catch(() => pe(d)).catch(() => {
2012
2027
  }));
2013
- let w = y?.data?.filename || "";
2014
- w && (w = `mediakit://${w}`), l?.({
2015
- url: u,
2028
+ let w = b?.data?.filename || "";
2029
+ w && (w = `mediakit://${w}`), s?.({
2030
+ url: d,
2016
2031
  mediaKitUrl: w,
2017
- width: C?.naturalWidth,
2018
- height: C?.naturalHeight
2032
+ width: x?.naturalWidth,
2033
+ height: x?.naturalHeight
2019
2034
  });
2020
2035
  }
2021
2036
  }),
2022
- /* @__PURE__ */ r(J, { title: "If you are using the 'mediaKitUrl' property, please use < import { getMediaKitAbsoluteUrl } from '@blocklet/pages-kit/builtin/utils' > to get the full address.", children: /* @__PURE__ */ r(Me, { sx: { cursor: "default", mr: 1 }, fontSize: "small" }) })
2037
+ /* @__PURE__ */ r(B, { title: "If you are using the 'mediaKitUrl' property, please use < import { getMediaKitAbsoluteUrl } from '@blocklet/pages-kit/builtin/utils' > to get the full address.", children: /* @__PURE__ */ r(Me, { sx: { cursor: "default", mr: 1 }, fontSize: "small" }) })
2023
2038
  ]
2024
2039
  })
2025
2040
  } : void 0
2026
2041
  }
2027
2042
  });
2028
2043
  }
2029
- return t.type === "array" ? /* @__PURE__ */ r(Xr, {
2030
- label: i,
2031
- value: Array.isArray(n) ? n : [],
2032
- onChange: (o) => l?.(o),
2044
+ return t.type === "array" ? /* @__PURE__ */ r(rt, {
2045
+ label: o,
2046
+ value: Array.isArray(i) ? i : [],
2047
+ onChange: (n) => s?.(n),
2033
2048
  property: t,
2034
- renderItem: ({ item: o, index: f, onChange: y }) => t.subProperties && Object.keys(t.subProperties).length > 0 ? /* @__PURE__ */ r(k, {
2049
+ renderItem: ({ item: n, index: f, onChange: b }) => t.subProperties && Object.keys(t.subProperties).length > 0 ? /* @__PURE__ */ r(k, {
2035
2050
  sx: {
2036
2051
  gap: 1,
2037
2052
  width: "100%"
2038
2053
  },
2039
- children: T(Object.values(t.subProperties), "index").filter((u) => u.data.visible !== !1).map(({ data: u }) => u.key ? /* @__PURE__ */ r(L, {
2054
+ children: T(Object.values(t.subProperties), "index").filter((d) => d.data.visible !== !1).map(({ data: d }) => d.key ? /* @__PURE__ */ r(M, {
2040
2055
  component: e,
2041
- property: u,
2042
- value: o[u.key],
2043
- onChange: (C) => {
2044
- const w = { ...o, [u.key]: C };
2045
- y(w);
2056
+ property: d,
2057
+ value: n[d.key],
2058
+ onChange: (x) => {
2059
+ const w = { ...n, [d.key]: x };
2060
+ b(w);
2046
2061
  },
2047
2062
  size: "small",
2048
2063
  fullWidth: !0,
2049
2064
  defaultLocale: p,
2050
- allComponents: c
2051
- }, u.id) : null)
2052
- }, f) : /* @__PURE__ */ r(V, { size: g.size, fullWidth: !0, value: o, onChange: (u) => y(u.target.value) })
2065
+ allComponents: u
2066
+ }, d.id) : null)
2067
+ }, f) : /* @__PURE__ */ r(V, { size: y.size, fullWidth: !0, value: n, onChange: (d) => b(d.target.value) })
2053
2068
  }) : (console.error("Unsupported property type", t.type), null);
2054
2069
  }
2055
- function gt({ NumberProps: e, ...t }) {
2056
- const { getInputProps: n } = yr(e), l = n();
2070
+ function xt({ NumberProps: e, ...t }) {
2071
+ const { getInputProps: i } = xr(e), s = i();
2057
2072
  return /* @__PURE__ */ r(V, {
2058
2073
  ...t,
2059
2074
  slotProps: {
2060
- htmlInput: l
2075
+ htmlInput: s
2061
2076
  }
2062
2077
  });
2063
2078
  }
2064
- const yt = `import React from '@blocklet/pages-kit/builtin/react'
2079
+ const vt = `import React from '@blocklet/pages-kit/builtin/react'
2065
2080
  import { Box } from '@blocklet/pages-kit/builtin/mui/material'
2066
2081
 
2067
2082
  export default function () {
@@ -2070,14 +2085,14 @@ export default function () {
2070
2085
  Hello World
2071
2086
  </Box>
2072
2087
  )
2073
- }`, xt = `console.log('hello')
2088
+ }`, Ct = `console.log('hello')
2074
2089
  `;
2075
- function vt({ value: e }) {
2076
- const { locale: t } = R(), n = We(), l = q(e).doc;
2077
- return B(() => {
2078
- e.renderer?.script || (l.transact(() => {
2079
- e.renderer.script = e.renderer.type === "react-component" ? yt : xt;
2080
- }), n());
2090
+ function Pt({ value: e }) {
2091
+ const { locale: t } = R(), i = We(), s = q(e).doc;
2092
+ return L(() => {
2093
+ e.renderer?.script || (s.transact(() => {
2094
+ e.renderer.script = e.renderer.type === "react-component" ? vt : Ct;
2095
+ }), i());
2081
2096
  }, [e]), /* @__PURE__ */ r(P, { sx: { border: 1, borderColor: "divider", borderRadius: 1, overflow: "hidden" }, children: /* @__PURE__ */ r(Ce, {
2082
2097
  keyId: e.id,
2083
2098
  locale: t,
@@ -2090,173 +2105,175 @@ function vt({ value: e }) {
2090
2105
  }
2091
2106
  }, e.id) });
2092
2107
  }
2093
- function Ct({ value: e }) {
2094
- const { t } = R(), n = q(e).doc, { state: { components: l, config: { defaultLocale: h }, resources: p }, localState: { currentLocale: c } } = ie(), g = ve(), m = l[e.renderer.componentId]?.data ?? p.components?.[e.renderer.componentId]?.component, d = ke({ variant: "dialog" });
2095
- return /* @__PURE__ */ r(le, { children: /* @__PURE__ */ v(k, {
2108
+ function kt({ value: e }) {
2109
+ const { t } = R(), i = q(e).doc, { state: { components: s, config: { defaultLocale: h }, resources: p }, localState: { currentLocale: u } } = oe(), y = ve(), m = s[e.renderer.componentId]?.data ?? p.components?.[e.renderer.componentId]?.component, c = ke({ variant: "dialog" });
2110
+ return /* @__PURE__ */ r(se, { children: /* @__PURE__ */ C(k, {
2096
2111
  sx: {
2097
2112
  gap: 1
2098
2113
  },
2099
2114
  children: [
2100
2115
  /* @__PURE__ */ r(Se, {
2101
- allComponents: g,
2116
+ allComponents: y,
2102
2117
  excludes: [e.id],
2103
2118
  value: e.renderer.componentId,
2104
- onChange: (s, a) => e.renderer.componentId = a
2119
+ onChange: (a, l) => e.renderer.componentId = l
2105
2120
  }),
2106
- m && /* @__PURE__ */ v(M, { children: [
2107
- /* @__PURE__ */ v(k, {
2121
+ m && /* @__PURE__ */ C(F, { children: [
2122
+ /* @__PURE__ */ C(k, {
2108
2123
  direction: "row",
2109
2124
  sx: {
2110
2125
  justifyContent: "space-between",
2111
2126
  alignItems: "center"
2112
2127
  },
2113
2128
  children: [
2114
- /* @__PURE__ */ r(D, { variant: "subtitle2", children: t("parameters") }),
2115
- /* @__PURE__ */ r(A, { sx: { minWidth: 32, minHeight: 32, p: 0 }, ...we(d), children: /* @__PURE__ */ r(Be, { fontSize: "small" }) })
2129
+ /* @__PURE__ */ r(A, { variant: "subtitle2", children: t("parameters") }),
2130
+ /* @__PURE__ */ r(D, { sx: { minWidth: 32, minHeight: 32, p: 0 }, ...we(c), children: /* @__PURE__ */ r(Be, { fontSize: "small" }) })
2116
2131
  ]
2117
2132
  }),
2118
- m.properties && T(Object.values(m.properties), "index").map(({ data: s }) => /* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(L, {
2119
- allComponents: g,
2133
+ m.properties && T(Object.values(m.properties), "index").map(({ data: a }) => /* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(M, {
2134
+ allComponents: y,
2120
2135
  defaultLocale: h,
2121
2136
  component: m,
2122
- property: s,
2137
+ property: a,
2123
2138
  fullWidth: !0,
2124
2139
  size: "small",
2125
- valueImmutable: ne(e.renderer.properties?.[s.id]?.locales?.[c]?.value),
2126
- value: e.renderer.properties?.[s.id]?.locales?.[c]?.value ?? e.renderer.properties?.[s.id]?.locales?.[h]?.value ?? s.locales?.[c]?.defaultValue ?? s.locales?.[h]?.defaultValue,
2127
- onChange: (a) => {
2128
- n.transact(() => {
2129
- e.renderer.properties ??= {}, e.renderer.properties[s.id] ??= {}, e.renderer.properties[s.id].locales ??= {}, e.renderer.properties[s.id].locales[c] ??= {}, e.renderer.properties[s.id].locales[c].value = a;
2140
+ valueImmutable: ie(e.renderer.properties?.[a.id]?.locales?.[u]?.value),
2141
+ value: e.renderer.properties?.[a.id]?.locales?.[u]?.value ?? e.renderer.properties?.[a.id]?.locales?.[h]?.value ?? a.locales?.[u]?.defaultValue ?? a.locales?.[h]?.defaultValue,
2142
+ onChange: (l) => {
2143
+ i.transact(() => {
2144
+ e.renderer.properties ??= {}, e.renderer.properties[a.id] ??= {}, e.renderer.properties[a.id].locales ??= {}, e.renderer.properties[a.id].locales[u] ??= {}, e.renderer.properties[a.id].locales[u].value = l;
2130
2145
  });
2131
2146
  }
2132
- }) }, s.id)),
2133
- /* @__PURE__ */ r(Ye, { ...Je(d), component: e, type: "parameters" })
2147
+ }) }, a.id)),
2148
+ /* @__PURE__ */ r(qe, { ...Je(c), component: e, type: "parameters" })
2134
2149
  ] })
2135
2150
  ]
2136
2151
  }) });
2137
2152
  }
2138
- function Se({ label: e, options: t, excludes: n, value: l, onChange: h, allComponents: p, ...c }) {
2139
- const { t: g } = R(), m = t ?? T(Object.values(Er(p, ...n ?? [])), "index").map((s) => s.data), d = (typeof l == "string" ? p[l]?.data : void 0) ?? null;
2153
+ function Se({ label: e, options: t, excludes: i, value: s, onChange: h, allComponents: p, ...u }) {
2154
+ const { t: y } = R(), m = t ?? T(Object.values(Tr(p, ...i ?? [])), "index").map((a) => a.data), c = (typeof s == "string" ? p[s]?.data : void 0) ?? null;
2140
2155
  return /* @__PURE__ */ r(Te, {
2141
- ...c,
2156
+ ...u,
2142
2157
  size: "small",
2143
2158
  options: m,
2144
2159
  autoHighlight: !0,
2145
- isOptionEqualToValue: (s, a) => s.id === a.id,
2146
- getOptionKey: (s) => s.id,
2147
- getOptionLabel: (s) => s.name || s.id,
2148
- renderInput: (s) => /* @__PURE__ */ r(V, { label: e || g("component"), ...s }),
2149
- value: d,
2150
- onChange: (s, a) => {
2151
- let i = {};
2152
- a && (i = {
2153
- blockletId: p[a?.id]?.blockletId,
2154
- blockletTitle: p[a?.id]?.blockletTitle,
2155
- componentName: p[a?.id]?.data?.name || p[a?.id]?.data?.id
2156
- }), h?.(s, a?.id, i);
2160
+ isOptionEqualToValue: (a, l) => a.id === l.id,
2161
+ getOptionKey: (a) => a.id,
2162
+ getOptionLabel: (a) => a.name || a.id,
2163
+ renderInput: (a) => /* @__PURE__ */ r(V, { label: e || y("component"), ...a }),
2164
+ value: c,
2165
+ onChange: (a, l) => {
2166
+ let o = {};
2167
+ l && (o = {
2168
+ blockletId: p[l?.id]?.blockletId,
2169
+ blockletTitle: p[l?.id]?.blockletTitle,
2170
+ componentName: p[l?.id]?.data?.name || p[l?.id]?.data?.id
2171
+ }), h?.(a, l?.id, o);
2157
2172
  }
2158
2173
  });
2159
2174
  }
2160
- function qe({ config: e, allComponents: t, defaultLocale: n, propertiesValue: l, currentLocale: h, onChange: p, props: c }) {
2161
- const { t: g } = R(), [m, d] = U(me(e?.properties)), [s, a] = U(null);
2162
- B(() => {
2175
+ function Qe({ config: e, allComponents: t, defaultLocale: i, propertiesValue: s, currentLocale: h, onChange: p, props: u }) {
2176
+ const { t: y } = R(), [m, c] = K(he(e?.properties)), [a, l] = K(null);
2177
+ L(() => {
2163
2178
  (() => {
2164
- e?.renderer?.type === "react-component" && K(e?.properties) ? fr(e?.renderer?.script).then((C) => {
2165
- const w = br(C);
2166
- d(w);
2167
- }) : d(me(e?.properties));
2179
+ e?.renderer?.type === "react-component" && U(e?.properties) ? br(e?.renderer?.script).then((x) => {
2180
+ const w = gr(x);
2181
+ c(w);
2182
+ }) : c(he(e?.properties));
2168
2183
  })();
2169
2184
  }, [JSON.stringify(e)]);
2170
- const i = W(() => !e || !m ? {} : Object.values(m).reduce((u, { data: C }) => {
2171
- const w = C.key || C.id;
2172
- return u[C.id] = {
2185
+ const o = W(() => !e || !m ? {} : Object.values(m).reduce((d, { data: x }) => {
2186
+ const w = x.key || x.id;
2187
+ return d[x.id] = {
2173
2188
  key: w,
2174
- value: c?.[w] ?? l?.[C.id]?.value ?? C.locales?.[h]?.defaultValue ?? C.locales?.[n]?.defaultValue,
2175
- id: C.id,
2176
- type: C.type
2177
- }, u;
2178
- }, {}), [JSON.stringify(m), e, l, h, n]), o = H(() => {
2189
+ value: u?.[w] ?? s?.[x.id]?.value ?? x.locales?.[h]?.defaultValue ?? x.locales?.[i]?.defaultValue,
2190
+ id: x.id,
2191
+ type: x.type,
2192
+ visible: Z(m, x.id),
2193
+ shared: Ge(m, x.id)
2194
+ }, d;
2195
+ }, {}), [JSON.stringify(m), e, s, h, i]), n = $(() => {
2179
2196
  if (!m)
2180
2197
  return {
2181
2198
  canUseProperties: [],
2182
2199
  visibleProperties: [],
2183
2200
  canUsePropertiesKeys: []
2184
2201
  };
2185
- const u = T(Object.values(m), "index"), C = u.filter(({ data: S }) => S.key && be(m, S.id)), w = u.filter(({ data: S }) => S.key && S.type !== "component"), N = w.map(({ data: S }) => S.key);
2202
+ const d = T(Object.values(m), "index"), x = d.filter(({ data: S }) => S.key && Z(m, S.id)), w = d.filter(({ data: S }) => S.key && S.type !== "component"), N = w.map(({ data: S }) => S.key);
2186
2203
  return {
2187
2204
  canUseProperties: w,
2188
- visibleProperties: C,
2205
+ visibleProperties: x,
2189
2206
  canUsePropertiesKeys: N
2190
2207
  };
2191
- }, [JSON.stringify(m)]), f = i(), y = Rr(f, "key");
2192
- return /* @__PURE__ */ r(le, { children: /* @__PURE__ */ v(k, {
2208
+ }, [JSON.stringify(m)]), f = o(), b = Ar(f, "key");
2209
+ return /* @__PURE__ */ r(se, { children: /* @__PURE__ */ C(k, {
2193
2210
  sx: {
2194
2211
  gap: 2
2195
2212
  },
2196
2213
  children: [
2197
- /* @__PURE__ */ r(D, { variant: "subtitle1", children: g("maker.properties.parameters") }),
2198
- !e || o.canUsePropertiesKeys.length === 0 ? /* @__PURE__ */ r(Y, { style: { fontSize: 12 }, children: g("maker.properties.noParameters") }) : /* @__PURE__ */ v(M, { children: [
2214
+ /* @__PURE__ */ r(A, { variant: "subtitle1", children: y("maker.properties.parameters") }),
2215
+ !e || n.canUsePropertiesKeys.length === 0 ? /* @__PURE__ */ r(Y, { style: { fontSize: 12 }, children: y("maker.properties.noParameters") }) : /* @__PURE__ */ C(F, { children: [
2199
2216
  /* @__PURE__ */ r(k, {
2200
2217
  sx: {
2201
2218
  gap: 2
2202
2219
  },
2203
- children: o.visibleProperties.map(({ data: u }) => /* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(L, {
2220
+ children: n.visibleProperties.map(({ data: d }) => /* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(M, {
2204
2221
  allComponents: t,
2205
- defaultLocale: n,
2222
+ defaultLocale: i,
2206
2223
  size: "small",
2207
2224
  fullWidth: !0,
2208
2225
  component: e,
2209
- property: u,
2210
- valueImmutable: ne(l?.[u.id]?.value),
2211
- value: c?.[u.key || u.id] ?? f[u.id]?.value,
2212
- onChange: (C) => {
2226
+ property: d,
2227
+ valueImmutable: ie(s?.[d.id]?.value),
2228
+ value: u?.[d.key || d.id] ?? f[d.id]?.value,
2229
+ onChange: (x) => {
2213
2230
  p({
2214
- path: ["properties", u.id],
2215
- id: u.id,
2216
- value: { value: C },
2217
- shouldSync: Oe(u),
2231
+ path: ["properties", d.id],
2232
+ id: d.id,
2233
+ value: { value: x },
2234
+ shouldSync: Oe(d),
2218
2235
  excludeKeys: [],
2219
- key: u.key || u.id
2236
+ key: d.key || d.id
2220
2237
  });
2221
2238
  }
2222
- }) }, u.id))
2239
+ }) }, d.id))
2223
2240
  }),
2224
2241
  /* @__PURE__ */ r(k, {
2225
2242
  sx: {
2226
2243
  gap: 2,
2227
2244
  width: "100%"
2228
2245
  },
2229
- children: /* @__PURE__ */ r(Ke, {
2246
+ children: /* @__PURE__ */ r(Ue, {
2230
2247
  componentId: e?.id || "",
2231
2248
  renderType: "setting",
2232
2249
  locale: h,
2233
2250
  properties: f,
2234
- dev: { mode: "draft", components: t, defaultLocale: n },
2251
+ dev: { mode: "draft", components: t, defaultLocale: i },
2235
2252
  props: {
2236
- ...Ar(c ?? {}, o.canUsePropertiesKeys),
2237
- onChange: (u) => {
2238
- const { canUsePropertiesKeys: C } = o;
2239
- Object.keys(u).filter((N) => !zr(u[N], y?.[N]?.value)).filter((N) => !(N === "locale" && !jr(y[N], "locale") || y[N]?.type === "component" || (y[N]?.type === "yaml" || y[N]?.type === "json") && be(m, y[N]?.id))).reduce((N, S) => N.then(() => {
2240
- const I = y[S], j = C.includes(S);
2241
- if (I?.id && j)
2253
+ ...Wr(u ?? {}, n.canUsePropertiesKeys),
2254
+ onChange: (d) => {
2255
+ const { canUsePropertiesKeys: x } = n;
2256
+ Object.keys(d).filter((N) => !Er(d[N], b?.[N]?.value)).filter((N) => !(N === "locale" && !Rr(b[N], "locale") || b[N]?.type === "component" || (b[N]?.type === "yaml" || b[N]?.type === "json") && Z(m, b[N]?.id))).reduce((N, S) => N.then(() => {
2257
+ const I = b[S], z = x.includes(S);
2258
+ if (I?.id && z)
2242
2259
  return p({
2243
2260
  path: ["properties", I.id],
2244
2261
  id: I.id,
2245
- value: { value: u[S] },
2262
+ value: { value: d[S] },
2246
2263
  shouldSync: Oe(I),
2247
2264
  excludeKeys: [],
2248
2265
  key: I.key || I.id
2249
2266
  }), Promise.resolve();
2250
- const b = `propertyNotFound${S}`;
2251
- if (s === b)
2267
+ const g = `propertyNotFound${S}`;
2268
+ if (a === g)
2252
2269
  return Promise.resolve();
2253
- he.close(s);
2254
- const x = he.warning(g("maker.properties.propertyNotFound", {
2270
+ fe.close(a);
2271
+ const v = fe.warning(y("maker.properties.propertyNotFound", {
2255
2272
  key: S
2256
2273
  }), {
2257
- key: b
2274
+ key: g
2258
2275
  });
2259
- return a(x), Promise.resolve();
2276
+ return l(v), Promise.resolve();
2260
2277
  }), Promise.resolve());
2261
2278
  }
2262
2279
  }
@@ -2264,33 +2281,33 @@ function qe({ config: e, allComponents: t, defaultLocale: n, propertiesValue: l,
2264
2281
  })
2265
2282
  ] })
2266
2283
  ]
2267
- }) });
2284
+ }, h) });
2268
2285
  }
2269
- function Pt({ config: e }) {
2270
- const { t, locale: n } = R(), [l, h] = U(!1), p = (c) => {
2271
- e.llmConfig = c;
2286
+ function wt({ config: e }) {
2287
+ const { t, locale: i } = R(), [s, h] = K(!1), p = (u) => {
2288
+ e.llmConfig = u;
2272
2289
  };
2273
- return /* @__PURE__ */ v(M, { children: [
2274
- /* @__PURE__ */ r(J, { title: t("maker.properties.configLLMDescription"), children: /* @__PURE__ */ r(G, { color: "primary", onClick: () => h(!0), size: "small", children: /* @__PURE__ */ r(wr, {}) }) }),
2275
- l && /* @__PURE__ */ r(st, {
2276
- open: l,
2290
+ return /* @__PURE__ */ C(F, { children: [
2291
+ /* @__PURE__ */ r(B, { title: t("maker.properties.configLLMDescription"), children: /* @__PURE__ */ r(G, { color: "primary", onClick: () => h(!0), size: "small", children: /* @__PURE__ */ r(Or, {}) }) }),
2292
+ s && /* @__PURE__ */ r(ct, {
2293
+ open: s,
2277
2294
  onClose: () => h(!1),
2278
2295
  onConfirm: p,
2279
2296
  component: e,
2280
2297
  initialConfig: e.llmConfig,
2281
- locale: n,
2298
+ locale: i,
2282
2299
  defaultLocale: "en",
2283
2300
  title: t("maker.properties.llmConfigTitle")
2284
2301
  })
2285
2302
  ] });
2286
2303
  }
2287
2304
  export {
2288
- ut as BasicInfo,
2305
+ mt as BasicInfo,
2289
2306
  Se as CustomComponentAutocomplete,
2290
- pn as CustomComponentSettings,
2291
- yt as DefaultReactComponentScriptTemplate,
2292
- xt as DefaultWebComponentScriptTemplate,
2293
- qe as ParametersConfig,
2294
- mt as PropertiesConfig,
2295
- L as PropertyValueField
2307
+ hn as CustomComponentSettings,
2308
+ vt as DefaultReactComponentScriptTemplate,
2309
+ Ct as DefaultWebComponentScriptTemplate,
2310
+ Qe as ParametersConfig,
2311
+ ft as PropertiesConfig,
2312
+ M as PropertyValueField
2296
2313
  };