@tenorlab/react-dashboard 1.4.3 → 1.4.4
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/README.md +346 -22
- package/dist/react-dashboard.d.ts +49 -0
- package/dist/react-dashboard.es.js +880 -874
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { create as gt } from "zustand";
|
|
2
2
|
import { blankDashboardConfig as xe, ensureContainersSequence as mt, getDistinctCssClasses as G, ensureZoomScaleIsWithinRange as pt, parseContainerTitle as nt, getWidgetMetaFromCatalog as yt, dashboardSettingsUtils as bt } from "./core.es.js";
|
|
3
3
|
import be, { useState as ae, useCallback as ce, useMemo as rt, forwardRef as se, useRef as vt, Suspense as xt, useEffect as Ct } from "react";
|
|
4
|
-
import { jsxs as
|
|
4
|
+
import { jsxs as $, jsx as n } from "react/jsx-runtime";
|
|
5
5
|
import ot from "react-dom";
|
|
6
6
|
const wt = (e) => {
|
|
7
7
|
const i = e.widgets.filter((o) => o.includes("WidgetContainer")).map((o) => Number(o.split("_")[1].replace("container", "")));
|
|
@@ -10,9 +10,9 @@ const wt = (e) => {
|
|
|
10
10
|
const t = wt(e);
|
|
11
11
|
return `${i}_${t}`;
|
|
12
12
|
}, Dt = (e) => {
|
|
13
|
-
const { dashboardConfig: i, widgetKey: t, parentWidgetKey: o, noDuplicatedWidgets:
|
|
13
|
+
const { dashboardConfig: i, widgetKey: t, parentWidgetKey: o, noDuplicatedWidgets: s } = e;
|
|
14
14
|
if (o) {
|
|
15
|
-
if (
|
|
15
|
+
if (s && i.childWidgetsConfig.find(
|
|
16
16
|
(c) => c.parentWidgetKey === o && c.widgetKey === t
|
|
17
17
|
))
|
|
18
18
|
return {
|
|
@@ -33,7 +33,7 @@ const wt = (e) => {
|
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
} else {
|
|
36
|
-
if (
|
|
36
|
+
if (s && i.widgets.includes(t))
|
|
37
37
|
return {
|
|
38
38
|
success: !1,
|
|
39
39
|
message: `DashboardStore: addWidget: Widget already added (${t})`,
|
|
@@ -49,72 +49,78 @@ const wt = (e) => {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
}, Tt = (e, i, t) => {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
const o = `${i}`.trim().toLowerCase(), s = `${t}`.trim().toLowerCase();
|
|
53
|
+
if (s.length > 0) {
|
|
54
|
+
const r = e.childWidgetsConfig.filter(
|
|
55
|
+
(m) => `${m.parentWidgetKey}`.trim().toLowerCase() !== s
|
|
56
|
+
), c = e.childWidgetsConfig.filter(
|
|
57
|
+
(m) => `${m.parentWidgetKey}`.trim().toLowerCase() === s && `${m.widgetKey}`.trim().toLowerCase() !== o
|
|
58
|
+
), h = [...r, ...c];
|
|
59
|
+
let D = {
|
|
59
60
|
...e,
|
|
60
|
-
childWidgetsConfig:
|
|
61
|
+
childWidgetsConfig: h
|
|
61
62
|
};
|
|
62
|
-
return
|
|
63
|
+
return o.includes("container") && (D = mt(D)), {
|
|
63
64
|
success: !0,
|
|
64
|
-
updatedDashboardConfig:
|
|
65
|
+
updatedDashboardConfig: D
|
|
65
66
|
};
|
|
66
67
|
} else {
|
|
67
|
-
const
|
|
68
|
-
(
|
|
68
|
+
const r = e.widgets.filter(
|
|
69
|
+
(h) => `${h}`.trim().toLowerCase() !== o
|
|
70
|
+
), c = e.childWidgetsConfig.filter(
|
|
71
|
+
(h) => `${h.parentWidgetKey}`.trim().toLowerCase() !== o
|
|
69
72
|
);
|
|
70
73
|
return {
|
|
71
74
|
success: !0,
|
|
72
75
|
updatedDashboardConfig: {
|
|
73
76
|
...e,
|
|
74
|
-
widgets:
|
|
75
|
-
childWidgetsConfig:
|
|
77
|
+
widgets: r,
|
|
78
|
+
childWidgetsConfig: c
|
|
76
79
|
}
|
|
77
80
|
};
|
|
78
81
|
}
|
|
79
82
|
}, Nt = (e, i, t, o) => {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
const s = `${t}`.trim().toLowerCase(), r = `${o}`.trim().toLowerCase();
|
|
84
|
+
if (r.length > 0) {
|
|
85
|
+
const c = e.childWidgetsConfig.filter(
|
|
86
|
+
(p) => `${p.parentWidgetKey}`.trim().toLowerCase() !== r
|
|
83
87
|
);
|
|
84
|
-
let
|
|
85
|
-
(
|
|
88
|
+
let h = e.childWidgetsConfig.filter(
|
|
89
|
+
(p) => `${p.parentWidgetKey}`.trim().toLowerCase() === r
|
|
86
90
|
);
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
const D = h.find(
|
|
92
|
+
(p) => `${p.widgetKey}`.trim().toLowerCase() === s
|
|
93
|
+
), v = h.indexOf(D);
|
|
94
|
+
let m = v + i;
|
|
95
|
+
if (m = Math.max(0, m), m = Math.min(h.length - 1, m), m === v)
|
|
90
96
|
return {
|
|
91
97
|
success: !1,
|
|
92
98
|
message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
|
|
93
99
|
updatedDashboardConfig: e
|
|
94
100
|
};
|
|
95
|
-
const
|
|
96
|
-
return
|
|
101
|
+
const d = [...h], [y] = d.splice(v, 1);
|
|
102
|
+
return d.splice(m, 0, y), {
|
|
97
103
|
success: !0,
|
|
98
104
|
updatedDashboardConfig: {
|
|
99
105
|
...e,
|
|
100
|
-
childWidgetsConfig: [...
|
|
106
|
+
childWidgetsConfig: [...c, ...d]
|
|
101
107
|
}
|
|
102
108
|
};
|
|
103
109
|
} else {
|
|
104
|
-
const
|
|
105
|
-
let
|
|
106
|
-
if (
|
|
110
|
+
const c = e.widgets || [], h = c.find((y) => `${y}`.trim().toLowerCase() === s), D = c.indexOf(h);
|
|
111
|
+
let v = D + i;
|
|
112
|
+
if (v = Math.max(0, v), v = Math.min(c.length - 1, v), v === D)
|
|
107
113
|
return {
|
|
108
114
|
success: !1,
|
|
109
115
|
message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
|
|
110
116
|
updatedDashboardConfig: e
|
|
111
117
|
};
|
|
112
|
-
const
|
|
113
|
-
return
|
|
118
|
+
const m = [...c], [d] = m.splice(D, 1);
|
|
119
|
+
return m.splice(v, 0, d), {
|
|
114
120
|
success: !0,
|
|
115
121
|
updatedDashboardConfig: {
|
|
116
122
|
...e,
|
|
117
|
-
widgets:
|
|
123
|
+
widgets: m
|
|
118
124
|
}
|
|
119
125
|
};
|
|
120
126
|
}
|
|
@@ -133,64 +139,64 @@ const wt = (e) => {
|
|
|
133
139
|
setTargetContainerKey: (t) => (e(() => ({ targetContainerKey: t })), t),
|
|
134
140
|
setAllDashboardConfigs: (t) => (e(() => ({ allDashboardConfigs: t })), i().allDashboardConfigs),
|
|
135
141
|
setCurrentDashboardConfig: (t) => {
|
|
136
|
-
const o = i(),
|
|
142
|
+
const o = i(), s = [
|
|
137
143
|
...o.allDashboardConfigs.filter((r) => r.dashboardId !== t.dashboardId),
|
|
138
144
|
t
|
|
139
145
|
];
|
|
140
146
|
return e(() => ({
|
|
141
147
|
...o,
|
|
142
|
-
allDashboardConfigs:
|
|
148
|
+
allDashboardConfigs: s,
|
|
143
149
|
currentDashboardConfig: t
|
|
144
|
-
})),
|
|
150
|
+
})), s;
|
|
145
151
|
},
|
|
146
152
|
addDashboardConfig: (t) => {
|
|
147
|
-
const o = i(),
|
|
153
|
+
const o = i(), s = [
|
|
148
154
|
...o.allDashboardConfigs.filter((r) => r.dashboardId !== t.dashboardId),
|
|
149
155
|
t
|
|
150
156
|
];
|
|
151
157
|
return e(() => ({
|
|
152
158
|
...o,
|
|
153
|
-
allDashboardConfigs:
|
|
159
|
+
allDashboardConfigs: s,
|
|
154
160
|
currentDashboardConfig: t
|
|
155
|
-
})),
|
|
161
|
+
})), s;
|
|
156
162
|
},
|
|
157
163
|
deleteDashboardConfigById: (t) => {
|
|
158
|
-
const o = i(),
|
|
164
|
+
const o = i(), s = [...o.allDashboardConfigs.filter((r) => r.dashboardId !== t)];
|
|
159
165
|
return e(() => ({
|
|
160
166
|
...o,
|
|
161
|
-
allDashboardConfigs:
|
|
162
|
-
currentDashboardConfig:
|
|
163
|
-
})),
|
|
167
|
+
allDashboardConfigs: s,
|
|
168
|
+
currentDashboardConfig: s[0] || xe
|
|
169
|
+
})), s;
|
|
164
170
|
},
|
|
165
171
|
selectDashboardById: (t) => (e(() => {
|
|
166
|
-
const o = i(),
|
|
167
|
-
return
|
|
168
|
-
currentDashboardConfig:
|
|
172
|
+
const o = i(), s = o.allDashboardConfigs.find((r) => r.dashboardId === t);
|
|
173
|
+
return s ? {
|
|
174
|
+
currentDashboardConfig: s
|
|
169
175
|
} : {
|
|
170
176
|
...o
|
|
171
177
|
};
|
|
172
178
|
}), i().currentDashboardConfig),
|
|
173
179
|
addWidget: (t) => {
|
|
174
|
-
const o = i(),
|
|
180
|
+
const o = i(), s = Dt({
|
|
175
181
|
dashboardConfig: o.currentDashboardConfig,
|
|
176
182
|
...t
|
|
177
183
|
}), r = [
|
|
178
184
|
...o.allDashboardConfigs.filter(
|
|
179
|
-
(c) => c.dashboardId !==
|
|
185
|
+
(c) => c.dashboardId !== s.updatedDashboardConfig.dashboardId
|
|
180
186
|
),
|
|
181
|
-
|
|
187
|
+
s.updatedDashboardConfig
|
|
182
188
|
];
|
|
183
|
-
return
|
|
189
|
+
return s.success && e(() => ({
|
|
184
190
|
allDashboardConfigs: r,
|
|
185
|
-
currentDashboardConfig:
|
|
191
|
+
currentDashboardConfig: s.updatedDashboardConfig
|
|
186
192
|
})), {
|
|
187
|
-
...
|
|
193
|
+
...s,
|
|
188
194
|
allUpdatedDashboardConfigs: r
|
|
189
195
|
};
|
|
190
196
|
},
|
|
191
197
|
removeWidget: (t, o) => {
|
|
192
|
-
const
|
|
193
|
-
...
|
|
198
|
+
const s = i(), r = Tt(s.currentDashboardConfig, t, o), c = [
|
|
199
|
+
...s.allDashboardConfigs.filter(
|
|
194
200
|
(h) => h.dashboardId !== r.updatedDashboardConfig.dashboardId
|
|
195
201
|
),
|
|
196
202
|
r.updatedDashboardConfig
|
|
@@ -203,8 +209,8 @@ const wt = (e) => {
|
|
|
203
209
|
allUpdatedDashboardConfigs: c
|
|
204
210
|
};
|
|
205
211
|
},
|
|
206
|
-
moveWidget: (t, o,
|
|
207
|
-
const r = i(), c = Nt(r.currentDashboardConfig, t, o,
|
|
212
|
+
moveWidget: (t, o, s) => {
|
|
213
|
+
const r = i(), c = Nt(r.currentDashboardConfig, t, o, s), h = [
|
|
208
214
|
...r.allDashboardConfigs.filter(
|
|
209
215
|
(D) => D.dashboardId !== c.updatedDashboardConfig.dashboardId
|
|
210
216
|
),
|
|
@@ -221,66 +227,66 @@ const wt = (e) => {
|
|
|
221
227
|
}), un = gt()((...e) => ({
|
|
222
228
|
...Et(...e)
|
|
223
229
|
})), fn = () => {
|
|
224
|
-
const [e, i] = ae({}), [t, o] = ae({}),
|
|
225
|
-
const
|
|
230
|
+
const [e, i] = ae({}), [t, o] = ae({}), s = ce((m) => {
|
|
231
|
+
const d = m.dashboardId;
|
|
226
232
|
i((y) => {
|
|
227
233
|
const p = {
|
|
228
234
|
undoIndex: 0,
|
|
229
|
-
config:
|
|
235
|
+
config: m
|
|
230
236
|
};
|
|
231
237
|
return o((T) => ({
|
|
232
238
|
...T,
|
|
233
|
-
[
|
|
239
|
+
[d]: 0
|
|
234
240
|
})), {
|
|
235
241
|
...y,
|
|
236
|
-
[
|
|
242
|
+
[d]: [p]
|
|
237
243
|
// Forces a reset to just this one entry
|
|
238
244
|
};
|
|
239
245
|
});
|
|
240
246
|
}, []), r = ce(
|
|
241
|
-
(
|
|
242
|
-
i((
|
|
243
|
-
const y =
|
|
247
|
+
(m) => {
|
|
248
|
+
i((d) => {
|
|
249
|
+
const y = m.dashboardId, p = d[y] || [], T = t[y] ?? -1, g = p.slice(0, T + 1), b = {
|
|
244
250
|
undoIndex: g.length,
|
|
245
251
|
// New index based on trimmed length
|
|
246
|
-
config:
|
|
247
|
-
},
|
|
252
|
+
config: m
|
|
253
|
+
}, C = [...g, b];
|
|
248
254
|
return o((N) => ({
|
|
249
255
|
...N,
|
|
250
|
-
[y]:
|
|
256
|
+
[y]: C.length - 1
|
|
251
257
|
// Index is now the last element's index
|
|
252
258
|
})), {
|
|
253
|
-
...
|
|
254
|
-
[y]:
|
|
259
|
+
...d,
|
|
260
|
+
[y]: C
|
|
255
261
|
};
|
|
256
262
|
});
|
|
257
263
|
},
|
|
258
264
|
[t]
|
|
259
|
-
), c = ce((
|
|
260
|
-
i((
|
|
261
|
-
if (!
|
|
262
|
-
return
|
|
263
|
-
const { [
|
|
265
|
+
), c = ce((m) => {
|
|
266
|
+
i((d) => {
|
|
267
|
+
if (!d[m])
|
|
268
|
+
return d;
|
|
269
|
+
const { [m]: y, ...p } = d;
|
|
264
270
|
return p;
|
|
265
|
-
}), o((
|
|
266
|
-
const { [
|
|
271
|
+
}), o((d) => {
|
|
272
|
+
const { [m]: y, ...p } = d;
|
|
267
273
|
return p;
|
|
268
274
|
});
|
|
269
275
|
}, []), h = ce(
|
|
270
|
-
(
|
|
271
|
-
o((
|
|
272
|
-
const y =
|
|
273
|
-
return p !== y ? { ...
|
|
276
|
+
(m) => {
|
|
277
|
+
o((d) => {
|
|
278
|
+
const y = d[m] ?? -1, p = Math.max(0, y - 1);
|
|
279
|
+
return p !== y ? { ...d, [m]: p } : d;
|
|
274
280
|
});
|
|
275
281
|
},
|
|
276
282
|
[
|
|
277
283
|
//loadConfigFromHistory
|
|
278
284
|
]
|
|
279
285
|
), D = ce(
|
|
280
|
-
(
|
|
281
|
-
o((
|
|
282
|
-
const y = e[
|
|
283
|
-
return T !== p ? { ...
|
|
286
|
+
(m) => {
|
|
287
|
+
o((d) => {
|
|
288
|
+
const y = e[m]?.length || 0, p = d[m] ?? -1, T = Math.min(y - 1, p + 1);
|
|
289
|
+
return T !== p ? { ...d, [m]: T } : d;
|
|
284
290
|
});
|
|
285
291
|
},
|
|
286
292
|
[
|
|
@@ -289,14 +295,14 @@ const wt = (e) => {
|
|
|
289
295
|
]
|
|
290
296
|
);
|
|
291
297
|
return {
|
|
292
|
-
initializeHistoryForDashboard:
|
|
298
|
+
initializeHistoryForDashboard: s,
|
|
293
299
|
resetAllHistory: () => i({}),
|
|
294
300
|
addUndoEntry: r,
|
|
295
301
|
removeUndoHistoryForDashboard: c,
|
|
296
302
|
undo: h,
|
|
297
303
|
redo: D,
|
|
298
|
-
getUndoStatus: (
|
|
299
|
-
const
|
|
304
|
+
getUndoStatus: (m) => {
|
|
305
|
+
const d = t[m] ?? -1, y = e[m]?.length || 0, p = d <= 0, T = d >= y - 1;
|
|
300
306
|
return { isUndoDisabled: p, isRedoDisabled: T };
|
|
301
307
|
},
|
|
302
308
|
undoHistory: e,
|
|
@@ -304,7 +310,7 @@ const wt = (e) => {
|
|
|
304
310
|
// (Optional: You might expose undoHistory and historyIndex if needed for debugging)
|
|
305
311
|
};
|
|
306
312
|
};
|
|
307
|
-
function
|
|
313
|
+
function B({
|
|
308
314
|
children: e,
|
|
309
315
|
className: i
|
|
310
316
|
}) {
|
|
@@ -326,14 +332,14 @@ function K({
|
|
|
326
332
|
);
|
|
327
333
|
}
|
|
328
334
|
function hn({ className: e }) {
|
|
329
|
-
return /* @__PURE__ */
|
|
335
|
+
return /* @__PURE__ */ $(B, { className: `lucide lucide-circle-plus-icon lucide-circle-plus ${e}`, children: [
|
|
330
336
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
|
|
331
337
|
/* @__PURE__ */ n("path", { d: "M8 12h8" }),
|
|
332
338
|
/* @__PURE__ */ n("path", { d: "M12 8v8" })
|
|
333
339
|
] });
|
|
334
340
|
}
|
|
335
341
|
function gn({ className: e }) {
|
|
336
|
-
return /* @__PURE__ */
|
|
342
|
+
return /* @__PURE__ */ $(B, { className: `lucide lucide-trash2-icon lucide-trash-2 ${e}`, children: [
|
|
337
343
|
/* @__PURE__ */ n("path", { d: "M10 11v6" }),
|
|
338
344
|
/* @__PURE__ */ n("path", { d: "M14 11v6" }),
|
|
339
345
|
/* @__PURE__ */ n("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
|
|
@@ -342,13 +348,13 @@ function gn({ className: e }) {
|
|
|
342
348
|
] });
|
|
343
349
|
}
|
|
344
350
|
function mn({ className: e }) {
|
|
345
|
-
return /* @__PURE__ */
|
|
351
|
+
return /* @__PURE__ */ $(B, { className: `lucide lucide-square-pen-icon lucide-square-pen ${e}`, children: [
|
|
346
352
|
/* @__PURE__ */ n("path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
347
353
|
/* @__PURE__ */ n("path", { d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" })
|
|
348
354
|
] });
|
|
349
355
|
}
|
|
350
356
|
function pn({ className: e }) {
|
|
351
|
-
return /* @__PURE__ */
|
|
357
|
+
return /* @__PURE__ */ $(B, { className: `lucide lucide-grid3x3-icon lucide-grid-3x3 ${e}`, children: [
|
|
352
358
|
/* @__PURE__ */ n("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
353
359
|
/* @__PURE__ */ n("path", { d: "M3 9h18" }),
|
|
354
360
|
/* @__PURE__ */ n("path", { d: "M3 15h18" }),
|
|
@@ -357,15 +363,15 @@ function pn({ className: e }) {
|
|
|
357
363
|
] });
|
|
358
364
|
}
|
|
359
365
|
function yn({ className: e }) {
|
|
360
|
-
return /* @__PURE__ */
|
|
366
|
+
return /* @__PURE__ */ $(B, { className: `lucide lucide-monitor-icon lucide-monitor ${e}`, children: [
|
|
361
367
|
/* @__PURE__ */ n("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
|
|
362
368
|
/* @__PURE__ */ n("line", { x1: "8", x2: "16", y1: "21", y2: "21" }),
|
|
363
369
|
/* @__PURE__ */ n("line", { x1: "12", x2: "12", y1: "17", y2: "21" })
|
|
364
370
|
] });
|
|
365
371
|
}
|
|
366
372
|
function bn({ className: e }) {
|
|
367
|
-
return /* @__PURE__ */
|
|
368
|
-
|
|
373
|
+
return /* @__PURE__ */ $(
|
|
374
|
+
B,
|
|
369
375
|
{
|
|
370
376
|
className: `lucide lucide-monitor-smartphone-icon lucide-monitor-smartphone ${e}`,
|
|
371
377
|
children: [
|
|
@@ -378,8 +384,8 @@ function bn({ className: e }) {
|
|
|
378
384
|
);
|
|
379
385
|
}
|
|
380
386
|
function it({ className: e }) {
|
|
381
|
-
return /* @__PURE__ */
|
|
382
|
-
|
|
387
|
+
return /* @__PURE__ */ $(
|
|
388
|
+
B,
|
|
383
389
|
{
|
|
384
390
|
className: `lucide lucide-circle-arrow-left-icon lucide-circle-arrow-left ${e}`,
|
|
385
391
|
children: [
|
|
@@ -391,8 +397,8 @@ function it({ className: e }) {
|
|
|
391
397
|
);
|
|
392
398
|
}
|
|
393
399
|
function at({ className: e }) {
|
|
394
|
-
return /* @__PURE__ */
|
|
395
|
-
|
|
400
|
+
return /* @__PURE__ */ $(
|
|
401
|
+
B,
|
|
396
402
|
{
|
|
397
403
|
className: `lucide lucide-circle-arrow-right-icon lucide-circle-arrow-right ${e}`,
|
|
398
404
|
children: [
|
|
@@ -404,14 +410,14 @@ function at({ className: e }) {
|
|
|
404
410
|
);
|
|
405
411
|
}
|
|
406
412
|
function _t({ className: e }) {
|
|
407
|
-
return /* @__PURE__ */
|
|
413
|
+
return /* @__PURE__ */ $(B, { className: `lucide lucide-settings-icon lucide-settings ${e}`, children: [
|
|
408
414
|
/* @__PURE__ */ n("path", { d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }),
|
|
409
415
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "3" })
|
|
410
416
|
] });
|
|
411
417
|
}
|
|
412
418
|
function vn({ className: e }) {
|
|
413
|
-
return /* @__PURE__ */
|
|
414
|
-
|
|
419
|
+
return /* @__PURE__ */ $(
|
|
420
|
+
B,
|
|
415
421
|
{
|
|
416
422
|
className: `lucide lucide-tablet-smartphone-icon lucide-tablet-smartphone ${e}`,
|
|
417
423
|
children: [
|
|
@@ -423,14 +429,14 @@ function vn({ className: e }) {
|
|
|
423
429
|
);
|
|
424
430
|
}
|
|
425
431
|
function st({ className: e }) {
|
|
426
|
-
return /* @__PURE__ */
|
|
432
|
+
return /* @__PURE__ */ $(B, { className: `lucide lucide-circle-x-icon lucide-circle-x ${e}`, children: [
|
|
427
433
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
|
|
428
434
|
/* @__PURE__ */ n("path", { d: "m15 9-6 6" }),
|
|
429
435
|
/* @__PURE__ */ n("path", { d: "m9 9 6 6" })
|
|
430
436
|
] });
|
|
431
437
|
}
|
|
432
438
|
function xn({ className: e }) {
|
|
433
|
-
return /* @__PURE__ */
|
|
439
|
+
return /* @__PURE__ */ $(B, { className: `lucide lucide-zoom-in-icon lucide-zoom-in ${e}`, children: [
|
|
434
440
|
/* @__PURE__ */ n("circle", { cx: "11", cy: "11", r: "8" }),
|
|
435
441
|
/* @__PURE__ */ n("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
|
|
436
442
|
/* @__PURE__ */ n("line", { x1: "11", x2: "11", y1: "8", y2: "14" }),
|
|
@@ -438,14 +444,14 @@ function xn({ className: e }) {
|
|
|
438
444
|
] });
|
|
439
445
|
}
|
|
440
446
|
function Cn({ className: e }) {
|
|
441
|
-
return /* @__PURE__ */
|
|
447
|
+
return /* @__PURE__ */ $(B, { className: `lucide lucide-zoom-out-icon lucide-zoom-out ${e}`, children: [
|
|
442
448
|
/* @__PURE__ */ n("circle", { cx: "11", cy: "11", r: "8" }),
|
|
443
449
|
/* @__PURE__ */ n("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
|
|
444
450
|
/* @__PURE__ */ n("line", { x1: "8", x2: "14", y1: "11", y2: "11" })
|
|
445
451
|
] });
|
|
446
452
|
}
|
|
447
453
|
function Mt({ className: e }) {
|
|
448
|
-
return /* @__PURE__ */
|
|
454
|
+
return /* @__PURE__ */ $(B, { className: `lucide lucide-timer-reset-icon lucide-timer-reset ${e}`, children: [
|
|
449
455
|
/* @__PURE__ */ n("path", { d: "M10 2h4" }),
|
|
450
456
|
/* @__PURE__ */ n("path", { d: "M12 14v-4" }),
|
|
451
457
|
/* @__PURE__ */ n("path", { d: "M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6" }),
|
|
@@ -453,19 +459,19 @@ function Mt({ className: e }) {
|
|
|
453
459
|
] });
|
|
454
460
|
}
|
|
455
461
|
function Pt({ className: e }) {
|
|
456
|
-
return /* @__PURE__ */
|
|
462
|
+
return /* @__PURE__ */ $(B, { className: `lucide lucide-undo-icon lucide-undo ${e}`, children: [
|
|
457
463
|
/* @__PURE__ */ n("path", { d: "M3 7v6h6" }),
|
|
458
464
|
/* @__PURE__ */ n("path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" })
|
|
459
465
|
] });
|
|
460
466
|
}
|
|
461
|
-
function
|
|
462
|
-
return /* @__PURE__ */
|
|
467
|
+
function $t({ className: e }) {
|
|
468
|
+
return /* @__PURE__ */ $(B, { className: `lucide lucide-redo-icon lucide-redo ${e}`, children: [
|
|
463
469
|
/* @__PURE__ */ n("path", { d: "M21 7v6h-6" }),
|
|
464
470
|
/* @__PURE__ */ n("path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7" })
|
|
465
471
|
] });
|
|
466
472
|
}
|
|
467
|
-
function
|
|
468
|
-
return /* @__PURE__ */
|
|
473
|
+
function Rt({ className: e }) {
|
|
474
|
+
return /* @__PURE__ */ $(B, { className: `lucide lucide-hand-icon lucide-hand ${e}`, children: [
|
|
469
475
|
/* @__PURE__ */ n("path", { d: "M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2" }),
|
|
470
476
|
/* @__PURE__ */ n("path", { d: "M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" }),
|
|
471
477
|
/* @__PURE__ */ n("path", { d: "M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8" }),
|
|
@@ -473,7 +479,7 @@ function $t({ className: e }) {
|
|
|
473
479
|
] });
|
|
474
480
|
}
|
|
475
481
|
function It({ className: e }) {
|
|
476
|
-
return /* @__PURE__ */
|
|
482
|
+
return /* @__PURE__ */ $(B, { className: `lucide lucide-hand-grab-icon lucide-hand-grab ${e}`, children: [
|
|
477
483
|
/* @__PURE__ */ n("path", { d: "M18 11.5V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1.4" }),
|
|
478
484
|
/* @__PURE__ */ n("path", { d: "M14 10V8a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" }),
|
|
479
485
|
/* @__PURE__ */ n("path", { d: "M10 9.9V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v5" }),
|
|
@@ -481,8 +487,8 @@ function It({ className: e }) {
|
|
|
481
487
|
/* @__PURE__ */ n("path", { d: "M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-4a8 8 0 0 1-8-8 2 2 0 1 1 4 0" })
|
|
482
488
|
] });
|
|
483
489
|
}
|
|
484
|
-
function
|
|
485
|
-
return /* @__PURE__ */
|
|
490
|
+
function Wt({ className: e }) {
|
|
491
|
+
return /* @__PURE__ */ $(B, { className: `lucide lucide-crosshair-icon lucide-crosshair ${e}`, children: [
|
|
486
492
|
/* @__PURE__ */ n("line", { x1: "22", x2: "18", y1: "12", y2: "12" }),
|
|
487
493
|
/* @__PURE__ */ n("line", { x1: "6", x2: "2", y1: "12", y2: "12" }),
|
|
488
494
|
/* @__PURE__ */ n("line", { x1: "12", x2: "12", y1: "6", y2: "2" }),
|
|
@@ -490,15 +496,15 @@ function Ot({ className: e }) {
|
|
|
490
496
|
] });
|
|
491
497
|
}
|
|
492
498
|
function wn({ className: e }) {
|
|
493
|
-
return /* @__PURE__ */
|
|
499
|
+
return /* @__PURE__ */ $(B, { className: `lucide lucide-target-icon lucide-target ${e}`, children: [
|
|
494
500
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
|
|
495
501
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "6" }),
|
|
496
502
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "2" })
|
|
497
503
|
] });
|
|
498
504
|
}
|
|
499
|
-
function
|
|
500
|
-
return /* @__PURE__ */
|
|
501
|
-
|
|
505
|
+
function Ot({ className: e }) {
|
|
506
|
+
return /* @__PURE__ */ $(
|
|
507
|
+
B,
|
|
502
508
|
{
|
|
503
509
|
className: `lucide lucide-file-question-mark-icon lucide-file-question-mark ${e}`,
|
|
504
510
|
children: [
|
|
@@ -514,18 +520,18 @@ const lt = ({
|
|
|
514
520
|
className: i,
|
|
515
521
|
size: t = "medium",
|
|
516
522
|
value: o,
|
|
517
|
-
onChange:
|
|
523
|
+
onChange: s,
|
|
518
524
|
onKeyDown: r,
|
|
519
525
|
placeholder: c = ""
|
|
520
526
|
}) => {
|
|
521
|
-
const h = rt(() => t === "small" ? "py-1.5 px-3 text-sm" : "py-2.5 px-4 text-base", [t]), D = G("flex flex-col mb-4", i || ""),
|
|
527
|
+
const h = rt(() => t === "small" ? "py-1.5 px-3 text-sm" : "py-2.5 px-4 text-base", [t]), D = G("flex flex-col mb-4", i || ""), m = `${G(`
|
|
522
528
|
block w-full rounded-md px-3 py-1.5 text-base
|
|
523
529
|
bg-formfield content-formfield
|
|
524
530
|
outline-1 -outline-offset-1 outline-primary
|
|
525
531
|
placeholder:text-disabled
|
|
526
532
|
focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-200 sm:text-sm/6
|
|
527
533
|
`)} ${h}`;
|
|
528
|
-
return /* @__PURE__ */
|
|
534
|
+
return /* @__PURE__ */ $("div", { className: D, children: [
|
|
529
535
|
/* @__PURE__ */ n("label", { htmlFor: e, className: "block text-sm/6 font-medium mb-1.5", children: e }),
|
|
530
536
|
/* @__PURE__ */ n(
|
|
531
537
|
"input",
|
|
@@ -533,10 +539,10 @@ const lt = ({
|
|
|
533
539
|
id: e,
|
|
534
540
|
type: "text",
|
|
535
541
|
value: o,
|
|
536
|
-
onChange:
|
|
537
|
-
onKeyDown: (
|
|
542
|
+
onChange: s,
|
|
543
|
+
onKeyDown: (d) => r && r(d),
|
|
538
544
|
placeholder: c,
|
|
539
|
-
className:
|
|
545
|
+
className: m,
|
|
540
546
|
"aria-label": e
|
|
541
547
|
}
|
|
542
548
|
)
|
|
@@ -556,23 +562,23 @@ function J(e) {
|
|
|
556
562
|
tooltip: i,
|
|
557
563
|
disabled: t,
|
|
558
564
|
isIconButton: o,
|
|
559
|
-
className:
|
|
565
|
+
className: s,
|
|
560
566
|
buttonType: r,
|
|
561
567
|
category: c,
|
|
562
568
|
px: h,
|
|
563
569
|
py: D,
|
|
564
|
-
children:
|
|
565
|
-
...
|
|
566
|
-
} = e,
|
|
567
|
-
const p = e.isIconButton || !1, T = e.category || "primary", g = e.buttonType || "normal",
|
|
568
|
-
let
|
|
569
|
-
|
|
570
|
-
const l = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), M = e.shadow || "sm",
|
|
570
|
+
children: v,
|
|
571
|
+
...m
|
|
572
|
+
} = e, d = () => {
|
|
573
|
+
const p = e.isIconButton || !1, T = e.category || "primary", g = e.buttonType || "normal", b = e.disabled || !1, C = e.className || "", N = e.font || "semibold", w = Number((e.border || 0) > 0 ? e.border : 0);
|
|
574
|
+
let S = (e.borderColor || "").trim();
|
|
575
|
+
S = S.length > 0 ? S : "";
|
|
576
|
+
const l = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), M = e.shadow || "sm", a = e.shadowHover || "md", f = (e.addCss || "").trim(), u = e.justifyCss || "justify-center";
|
|
571
577
|
if (p)
|
|
572
578
|
return G(
|
|
573
579
|
"flex flex-row items-center",
|
|
574
|
-
|
|
575
|
-
|
|
580
|
+
b ? "text-disabled" : `text-${T} hover:brightness-110 cursor-pointer`,
|
|
581
|
+
C || ""
|
|
576
582
|
);
|
|
577
583
|
const _ = [
|
|
578
584
|
"relative cursor-pointer",
|
|
@@ -581,37 +587,37 @@ function J(e) {
|
|
|
581
587
|
"text-sm",
|
|
582
588
|
`font-${N}`
|
|
583
589
|
];
|
|
584
|
-
if (
|
|
590
|
+
if (b)
|
|
585
591
|
g === "ghost" ? _.push("text-disabled border-disabled cursor-not-allowed") : _.push("bg-disabled content-disabled border-disabled cursor-not-allowed");
|
|
586
592
|
else {
|
|
587
593
|
_.push("cursor-pointer");
|
|
588
|
-
let
|
|
589
|
-
Ce.has(g) ?
|
|
590
|
-
const z =
|
|
594
|
+
let R = "";
|
|
595
|
+
Ce.has(g) ? R = `${Ce.get(g)}` : R = `${Ce.get("normal")}`, w < 1 && (R = R.replace("border-[category]", ""));
|
|
596
|
+
const z = R.replace(/\[category\]/g, T).trim();
|
|
591
597
|
_.push(z);
|
|
592
598
|
}
|
|
593
|
-
return
|
|
599
|
+
return w > 0 ? (_.push(`border-[${w}px]`), _.push(`border-${S}`)) : (_.push("border-[1px]"), _.push("border-transparent")), l > 0 ? (_.push(`hover:border-[${l}px] group-hover:border-[${l}px]`), _.push(`hover:border-${S} group-hover:border-${S}`)) : _.push("hover:border-[1px] group-hover:border-[1px]"), _.push(`shadow-${M}`), _.push(`hover:shadow-${a} group-hover:shadow-${a}`), f.length > 0 && _.push(f), f.indexOf("hidden") === -1 && _.push("inline-flex"), _.push(u), _.join(" ").trim();
|
|
594
600
|
}, y = () => {
|
|
595
601
|
const p = e.px || 0.7, T = e.py || 0.25;
|
|
596
602
|
return {
|
|
597
603
|
padding: o ? 0 : `${T}rem ${p}rem `
|
|
598
604
|
};
|
|
599
605
|
};
|
|
600
|
-
return /* @__PURE__ */ n("button", { type: "button", disabled: t, className:
|
|
606
|
+
return /* @__PURE__ */ n("button", { type: "button", disabled: t, className: d(), style: y(), ...m, children: v });
|
|
601
607
|
}
|
|
602
608
|
const kt = (e) => e.direction === "row" ? G("flex flex-row items-center gap-2", e.classNames || "") : G("flex flex-col gap-2 w-full", e.classNames || "");
|
|
603
609
|
function jt(e) {
|
|
604
|
-
const { children: i, testId: t, classNames: o, direction:
|
|
610
|
+
const { children: i, testId: t, classNames: o, direction: s, ...r } = e, c = kt(e);
|
|
605
611
|
return /* @__PURE__ */ n("div", { "data-testid": t || "not-set", className: c, ...r, children: i });
|
|
606
612
|
}
|
|
607
613
|
const Sn = se(
|
|
608
614
|
(e, i) => {
|
|
609
|
-
const { classNames: t, innerClass: o, ...
|
|
615
|
+
const { classNames: t, innerClass: o, ...s } = e, r = G(t || "", "w-full"), c = G(
|
|
610
616
|
`w-full flex overflow-hidden justify-between items-center gap-0
|
|
611
617
|
rounded-md border`,
|
|
612
618
|
o || ""
|
|
613
619
|
);
|
|
614
|
-
return /* @__PURE__ */ n(jt, { direction: "row", classNames: r, ...
|
|
620
|
+
return /* @__PURE__ */ n(jt, { direction: "row", classNames: r, ...s, children: /* @__PURE__ */ n("div", { className: c, children: e.children }) });
|
|
615
621
|
}
|
|
616
622
|
), Dn = se((e, i) => /* @__PURE__ */ n(
|
|
617
623
|
"div",
|
|
@@ -648,29 +654,29 @@ const Sn = se(
|
|
|
648
654
|
function At(e) {
|
|
649
655
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
650
656
|
}
|
|
651
|
-
var de = { exports: {} }, we = {}, he = { exports: {} }, ge = { exports: {} },
|
|
657
|
+
var de = { exports: {} }, we = {}, he = { exports: {} }, ge = { exports: {} }, K = {};
|
|
652
658
|
var ke;
|
|
653
659
|
function Lt() {
|
|
654
|
-
if (ke) return
|
|
660
|
+
if (ke) return K;
|
|
655
661
|
ke = 1;
|
|
656
|
-
var e = typeof Symbol == "function" && Symbol.for, i = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, o = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107,
|
|
657
|
-
function
|
|
662
|
+
var e = typeof Symbol == "function" && Symbol.for, i = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, o = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, s = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, r = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, c = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, h = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, D = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, v = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, m = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, d = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, y = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, p = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, T = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, g = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, b = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, C = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, N = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
663
|
+
function w(l) {
|
|
658
664
|
if (typeof l == "object" && l !== null) {
|
|
659
665
|
var M = l.$$typeof;
|
|
660
666
|
switch (M) {
|
|
661
667
|
case i:
|
|
662
668
|
switch (l = l.type, l) {
|
|
663
669
|
case D:
|
|
664
|
-
case
|
|
670
|
+
case v:
|
|
665
671
|
case o:
|
|
666
672
|
case r:
|
|
667
|
-
case
|
|
668
|
-
case
|
|
673
|
+
case s:
|
|
674
|
+
case d:
|
|
669
675
|
return l;
|
|
670
676
|
default:
|
|
671
677
|
switch (l = l && l.$$typeof, l) {
|
|
672
678
|
case h:
|
|
673
|
-
case
|
|
679
|
+
case m:
|
|
674
680
|
case T:
|
|
675
681
|
case p:
|
|
676
682
|
case c:
|
|
@@ -684,47 +690,47 @@ function Lt() {
|
|
|
684
690
|
}
|
|
685
691
|
}
|
|
686
692
|
}
|
|
687
|
-
function
|
|
688
|
-
return
|
|
693
|
+
function S(l) {
|
|
694
|
+
return w(l) === v;
|
|
689
695
|
}
|
|
690
|
-
return
|
|
691
|
-
return
|
|
692
|
-
},
|
|
693
|
-
return
|
|
694
|
-
},
|
|
695
|
-
return
|
|
696
|
-
},
|
|
696
|
+
return K.AsyncMode = D, K.ConcurrentMode = v, K.ContextConsumer = h, K.ContextProvider = c, K.Element = i, K.ForwardRef = m, K.Fragment = o, K.Lazy = T, K.Memo = p, K.Portal = t, K.Profiler = r, K.StrictMode = s, K.Suspense = d, K.isAsyncMode = function(l) {
|
|
697
|
+
return S(l) || w(l) === D;
|
|
698
|
+
}, K.isConcurrentMode = S, K.isContextConsumer = function(l) {
|
|
699
|
+
return w(l) === h;
|
|
700
|
+
}, K.isContextProvider = function(l) {
|
|
701
|
+
return w(l) === c;
|
|
702
|
+
}, K.isElement = function(l) {
|
|
697
703
|
return typeof l == "object" && l !== null && l.$$typeof === i;
|
|
698
|
-
},
|
|
699
|
-
return
|
|
700
|
-
},
|
|
701
|
-
return
|
|
702
|
-
},
|
|
703
|
-
return
|
|
704
|
-
},
|
|
705
|
-
return
|
|
706
|
-
},
|
|
707
|
-
return
|
|
708
|
-
},
|
|
709
|
-
return
|
|
710
|
-
},
|
|
711
|
-
return
|
|
712
|
-
},
|
|
713
|
-
return
|
|
714
|
-
},
|
|
715
|
-
return typeof l == "string" || typeof l == "function" || l === o || l ===
|
|
716
|
-
},
|
|
704
|
+
}, K.isForwardRef = function(l) {
|
|
705
|
+
return w(l) === m;
|
|
706
|
+
}, K.isFragment = function(l) {
|
|
707
|
+
return w(l) === o;
|
|
708
|
+
}, K.isLazy = function(l) {
|
|
709
|
+
return w(l) === T;
|
|
710
|
+
}, K.isMemo = function(l) {
|
|
711
|
+
return w(l) === p;
|
|
712
|
+
}, K.isPortal = function(l) {
|
|
713
|
+
return w(l) === t;
|
|
714
|
+
}, K.isProfiler = function(l) {
|
|
715
|
+
return w(l) === r;
|
|
716
|
+
}, K.isStrictMode = function(l) {
|
|
717
|
+
return w(l) === s;
|
|
718
|
+
}, K.isSuspense = function(l) {
|
|
719
|
+
return w(l) === d;
|
|
720
|
+
}, K.isValidElementType = function(l) {
|
|
721
|
+
return typeof l == "string" || typeof l == "function" || l === o || l === v || l === r || l === s || l === d || l === y || typeof l == "object" && l !== null && (l.$$typeof === T || l.$$typeof === p || l.$$typeof === c || l.$$typeof === h || l.$$typeof === m || l.$$typeof === b || l.$$typeof === C || l.$$typeof === N || l.$$typeof === g);
|
|
722
|
+
}, K.typeOf = w, K;
|
|
717
723
|
}
|
|
718
|
-
var
|
|
724
|
+
var Y = {};
|
|
719
725
|
var je;
|
|
720
726
|
function qt() {
|
|
721
727
|
return je || (je = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
722
|
-
var e = typeof Symbol == "function" && Symbol.for, i = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, o = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107,
|
|
723
|
-
function
|
|
728
|
+
var e = typeof Symbol == "function" && Symbol.for, i = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, o = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, s = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, r = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, c = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, h = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, D = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, v = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, m = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, d = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, y = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, p = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, T = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, g = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, b = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, C = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, N = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
729
|
+
function w(E) {
|
|
724
730
|
return typeof E == "string" || typeof E == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
725
|
-
E === o || E ===
|
|
731
|
+
E === o || E === v || E === r || E === s || E === d || E === y || typeof E == "object" && E !== null && (E.$$typeof === T || E.$$typeof === p || E.$$typeof === c || E.$$typeof === h || E.$$typeof === m || E.$$typeof === b || E.$$typeof === C || E.$$typeof === N || E.$$typeof === g);
|
|
726
732
|
}
|
|
727
|
-
function
|
|
733
|
+
function S(E) {
|
|
728
734
|
if (typeof E == "object" && E !== null) {
|
|
729
735
|
var te = E.$$typeof;
|
|
730
736
|
switch (te) {
|
|
@@ -732,21 +738,21 @@ function qt() {
|
|
|
732
738
|
var fe = E.type;
|
|
733
739
|
switch (fe) {
|
|
734
740
|
case D:
|
|
735
|
-
case
|
|
741
|
+
case v:
|
|
736
742
|
case o:
|
|
737
743
|
case r:
|
|
738
|
-
case
|
|
739
|
-
case
|
|
744
|
+
case s:
|
|
745
|
+
case d:
|
|
740
746
|
return fe;
|
|
741
747
|
default:
|
|
742
|
-
var
|
|
743
|
-
switch (
|
|
748
|
+
var Oe = fe && fe.$$typeof;
|
|
749
|
+
switch (Oe) {
|
|
744
750
|
case h:
|
|
745
|
-
case
|
|
751
|
+
case m:
|
|
746
752
|
case T:
|
|
747
753
|
case p:
|
|
748
754
|
case c:
|
|
749
|
-
return
|
|
755
|
+
return Oe;
|
|
750
756
|
default:
|
|
751
757
|
return te;
|
|
752
758
|
}
|
|
@@ -756,55 +762,55 @@ function qt() {
|
|
|
756
762
|
}
|
|
757
763
|
}
|
|
758
764
|
}
|
|
759
|
-
var l = D, M =
|
|
765
|
+
var l = D, M = v, a = h, f = c, u = i, _ = m, R = o, z = T, X = p, V = t, Q = r, H = s, ee = d, ie = !1;
|
|
760
766
|
function le(E) {
|
|
761
|
-
return ie || (ie = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),
|
|
767
|
+
return ie || (ie = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), x(E) || S(E) === D;
|
|
762
768
|
}
|
|
763
|
-
function
|
|
764
|
-
return
|
|
769
|
+
function x(E) {
|
|
770
|
+
return S(E) === v;
|
|
765
771
|
}
|
|
766
772
|
function P(E) {
|
|
767
|
-
return
|
|
773
|
+
return S(E) === h;
|
|
768
774
|
}
|
|
769
775
|
function j(E) {
|
|
770
|
-
return
|
|
776
|
+
return S(E) === c;
|
|
771
777
|
}
|
|
772
|
-
function
|
|
778
|
+
function O(E) {
|
|
773
779
|
return typeof E == "object" && E !== null && E.$$typeof === i;
|
|
774
780
|
}
|
|
775
781
|
function I(E) {
|
|
776
|
-
return
|
|
782
|
+
return S(E) === m;
|
|
777
783
|
}
|
|
778
784
|
function A(E) {
|
|
779
|
-
return
|
|
785
|
+
return S(E) === o;
|
|
780
786
|
}
|
|
781
|
-
function
|
|
782
|
-
return
|
|
787
|
+
function W(E) {
|
|
788
|
+
return S(E) === T;
|
|
783
789
|
}
|
|
784
790
|
function k(E) {
|
|
785
|
-
return
|
|
791
|
+
return S(E) === p;
|
|
786
792
|
}
|
|
787
793
|
function L(E) {
|
|
788
|
-
return
|
|
794
|
+
return S(E) === t;
|
|
789
795
|
}
|
|
790
|
-
function
|
|
791
|
-
return
|
|
796
|
+
function U(E) {
|
|
797
|
+
return S(E) === r;
|
|
792
798
|
}
|
|
793
799
|
function q(E) {
|
|
794
|
-
return
|
|
800
|
+
return S(E) === s;
|
|
795
801
|
}
|
|
796
802
|
function Z(E) {
|
|
797
|
-
return
|
|
803
|
+
return S(E) === d;
|
|
798
804
|
}
|
|
799
|
-
|
|
800
|
-
})()),
|
|
805
|
+
Y.AsyncMode = l, Y.ConcurrentMode = M, Y.ContextConsumer = a, Y.ContextProvider = f, Y.Element = u, Y.ForwardRef = _, Y.Fragment = R, Y.Lazy = z, Y.Memo = X, Y.Portal = V, Y.Profiler = Q, Y.StrictMode = H, Y.Suspense = ee, Y.isAsyncMode = le, Y.isConcurrentMode = x, Y.isContextConsumer = P, Y.isContextProvider = j, Y.isElement = O, Y.isForwardRef = I, Y.isFragment = A, Y.isLazy = W, Y.isMemo = k, Y.isPortal = L, Y.isProfiler = U, Y.isStrictMode = q, Y.isSuspense = Z, Y.isValidElementType = w, Y.typeOf = S;
|
|
806
|
+
})()), Y;
|
|
801
807
|
}
|
|
802
808
|
var Ae;
|
|
803
809
|
function ct() {
|
|
804
810
|
return Ae || (Ae = 1, process.env.NODE_ENV === "production" ? ge.exports = Lt() : ge.exports = qt()), ge.exports;
|
|
805
811
|
}
|
|
806
812
|
var Se, Le;
|
|
807
|
-
function
|
|
813
|
+
function Kt() {
|
|
808
814
|
if (Le) return Se;
|
|
809
815
|
Le = 1;
|
|
810
816
|
var e = Object.getOwnPropertySymbols, i = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
|
|
@@ -813,7 +819,7 @@ function Yt() {
|
|
|
813
819
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
814
820
|
return Object(r);
|
|
815
821
|
}
|
|
816
|
-
function
|
|
822
|
+
function s() {
|
|
817
823
|
try {
|
|
818
824
|
if (!Object.assign)
|
|
819
825
|
return !1;
|
|
@@ -822,52 +828,52 @@ function Yt() {
|
|
|
822
828
|
return !1;
|
|
823
829
|
for (var c = {}, h = 0; h < 10; h++)
|
|
824
830
|
c["_" + String.fromCharCode(h)] = h;
|
|
825
|
-
var D = Object.getOwnPropertyNames(c).map(function(
|
|
826
|
-
return c[
|
|
831
|
+
var D = Object.getOwnPropertyNames(c).map(function(m) {
|
|
832
|
+
return c[m];
|
|
827
833
|
});
|
|
828
834
|
if (D.join("") !== "0123456789")
|
|
829
835
|
return !1;
|
|
830
|
-
var
|
|
831
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
832
|
-
|
|
833
|
-
}), Object.keys(Object.assign({},
|
|
836
|
+
var v = {};
|
|
837
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(m) {
|
|
838
|
+
v[m] = m;
|
|
839
|
+
}), Object.keys(Object.assign({}, v)).join("") === "abcdefghijklmnopqrst";
|
|
834
840
|
} catch {
|
|
835
841
|
return !1;
|
|
836
842
|
}
|
|
837
843
|
}
|
|
838
|
-
return Se =
|
|
839
|
-
for (var h, D = o(r),
|
|
840
|
-
h = Object(arguments[
|
|
841
|
-
for (var
|
|
842
|
-
i.call(h,
|
|
844
|
+
return Se = s() ? Object.assign : function(r, c) {
|
|
845
|
+
for (var h, D = o(r), v, m = 1; m < arguments.length; m++) {
|
|
846
|
+
h = Object(arguments[m]);
|
|
847
|
+
for (var d in h)
|
|
848
|
+
i.call(h, d) && (D[d] = h[d]);
|
|
843
849
|
if (e) {
|
|
844
|
-
|
|
845
|
-
for (var y = 0; y <
|
|
846
|
-
t.call(h,
|
|
850
|
+
v = e(h);
|
|
851
|
+
for (var y = 0; y < v.length; y++)
|
|
852
|
+
t.call(h, v[y]) && (D[v[y]] = h[v[y]]);
|
|
847
853
|
}
|
|
848
854
|
}
|
|
849
855
|
return D;
|
|
850
856
|
}, Se;
|
|
851
857
|
}
|
|
852
858
|
var De, qe;
|
|
853
|
-
function
|
|
859
|
+
function Re() {
|
|
854
860
|
if (qe) return De;
|
|
855
861
|
qe = 1;
|
|
856
862
|
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
857
863
|
return De = e, De;
|
|
858
864
|
}
|
|
859
|
-
var Te,
|
|
865
|
+
var Te, Ke;
|
|
860
866
|
function dt() {
|
|
861
|
-
return
|
|
867
|
+
return Ke || (Ke = 1, Te = Function.call.bind(Object.prototype.hasOwnProperty)), Te;
|
|
862
868
|
}
|
|
863
|
-
var Ne,
|
|
864
|
-
function
|
|
865
|
-
if (
|
|
866
|
-
|
|
869
|
+
var Ne, Ye;
|
|
870
|
+
function Yt() {
|
|
871
|
+
if (Ye) return Ne;
|
|
872
|
+
Ye = 1;
|
|
867
873
|
var e = function() {
|
|
868
874
|
};
|
|
869
875
|
if (process.env.NODE_ENV !== "production") {
|
|
870
|
-
var i = /* @__PURE__ */
|
|
876
|
+
var i = /* @__PURE__ */ Re(), t = {}, o = /* @__PURE__ */ dt();
|
|
871
877
|
e = function(r) {
|
|
872
878
|
var c = "Warning: " + r;
|
|
873
879
|
typeof console < "u" && console.error(c);
|
|
@@ -877,43 +883,43 @@ function Ut() {
|
|
|
877
883
|
}
|
|
878
884
|
};
|
|
879
885
|
}
|
|
880
|
-
function
|
|
886
|
+
function s(r, c, h, D, v) {
|
|
881
887
|
if (process.env.NODE_ENV !== "production") {
|
|
882
|
-
for (var
|
|
883
|
-
if (o(r,
|
|
884
|
-
var
|
|
888
|
+
for (var m in r)
|
|
889
|
+
if (o(r, m)) {
|
|
890
|
+
var d;
|
|
885
891
|
try {
|
|
886
|
-
if (typeof r[
|
|
892
|
+
if (typeof r[m] != "function") {
|
|
887
893
|
var y = Error(
|
|
888
|
-
(D || "React class") + ": " + h + " type `" +
|
|
894
|
+
(D || "React class") + ": " + h + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
889
895
|
);
|
|
890
896
|
throw y.name = "Invariant Violation", y;
|
|
891
897
|
}
|
|
892
|
-
|
|
898
|
+
d = r[m](c, m, D, h, null, i);
|
|
893
899
|
} catch (T) {
|
|
894
|
-
|
|
900
|
+
d = T;
|
|
895
901
|
}
|
|
896
|
-
if (
|
|
897
|
-
(D || "React class") + ": type specification of " + h + " `" +
|
|
898
|
-
),
|
|
899
|
-
t[
|
|
900
|
-
var p =
|
|
902
|
+
if (d && !(d instanceof Error) && e(
|
|
903
|
+
(D || "React class") + ": type specification of " + h + " `" + m + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof d + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
904
|
+
), d instanceof Error && !(d.message in t)) {
|
|
905
|
+
t[d.message] = !0;
|
|
906
|
+
var p = v ? v() : "";
|
|
901
907
|
e(
|
|
902
|
-
"Failed " + h + " type: " +
|
|
908
|
+
"Failed " + h + " type: " + d.message + (p ?? "")
|
|
903
909
|
);
|
|
904
910
|
}
|
|
905
911
|
}
|
|
906
912
|
}
|
|
907
913
|
}
|
|
908
|
-
return
|
|
914
|
+
return s.resetWarningCache = function() {
|
|
909
915
|
process.env.NODE_ENV !== "production" && (t = {});
|
|
910
|
-
}, Ne =
|
|
916
|
+
}, Ne = s, Ne;
|
|
911
917
|
}
|
|
912
|
-
var Ee,
|
|
913
|
-
function
|
|
914
|
-
if (
|
|
915
|
-
|
|
916
|
-
var e = ct(), i =
|
|
918
|
+
var Ee, Ue;
|
|
919
|
+
function Ut() {
|
|
920
|
+
if (Ue) return Ee;
|
|
921
|
+
Ue = 1;
|
|
922
|
+
var e = ct(), i = Kt(), t = /* @__PURE__ */ Re(), o = /* @__PURE__ */ dt(), s = /* @__PURE__ */ Yt(), r = function() {
|
|
917
923
|
};
|
|
918
924
|
process.env.NODE_ENV !== "production" && (r = function(h) {
|
|
919
925
|
var D = "Warning: " + h;
|
|
@@ -927,44 +933,44 @@ function Ft() {
|
|
|
927
933
|
return null;
|
|
928
934
|
}
|
|
929
935
|
return Ee = function(h, D) {
|
|
930
|
-
var
|
|
931
|
-
function
|
|
932
|
-
var P =
|
|
936
|
+
var v = typeof Symbol == "function" && Symbol.iterator, m = "@@iterator";
|
|
937
|
+
function d(x) {
|
|
938
|
+
var P = x && (v && x[v] || x[m]);
|
|
933
939
|
if (typeof P == "function")
|
|
934
940
|
return P;
|
|
935
941
|
}
|
|
936
942
|
var y = "<<anonymous>>", p = {
|
|
937
|
-
array:
|
|
938
|
-
bigint:
|
|
939
|
-
bool:
|
|
940
|
-
func:
|
|
941
|
-
number:
|
|
942
|
-
object:
|
|
943
|
-
string:
|
|
944
|
-
symbol:
|
|
943
|
+
array: C("array"),
|
|
944
|
+
bigint: C("bigint"),
|
|
945
|
+
bool: C("boolean"),
|
|
946
|
+
func: C("function"),
|
|
947
|
+
number: C("number"),
|
|
948
|
+
object: C("object"),
|
|
949
|
+
string: C("string"),
|
|
950
|
+
symbol: C("symbol"),
|
|
945
951
|
any: N(),
|
|
946
|
-
arrayOf:
|
|
947
|
-
element:
|
|
952
|
+
arrayOf: w,
|
|
953
|
+
element: S(),
|
|
948
954
|
elementType: l(),
|
|
949
955
|
instanceOf: M,
|
|
950
956
|
node: _(),
|
|
951
|
-
objectOf:
|
|
952
|
-
oneOf:
|
|
953
|
-
oneOfType:
|
|
957
|
+
objectOf: f,
|
|
958
|
+
oneOf: a,
|
|
959
|
+
oneOfType: u,
|
|
954
960
|
shape: z,
|
|
955
961
|
exact: X
|
|
956
962
|
};
|
|
957
|
-
function T(
|
|
958
|
-
return
|
|
963
|
+
function T(x, P) {
|
|
964
|
+
return x === P ? x !== 0 || 1 / x === 1 / P : x !== x && P !== P;
|
|
959
965
|
}
|
|
960
|
-
function g(
|
|
961
|
-
this.message =
|
|
966
|
+
function g(x, P) {
|
|
967
|
+
this.message = x, this.data = P && typeof P == "object" ? P : {}, this.stack = "";
|
|
962
968
|
}
|
|
963
969
|
g.prototype = Error.prototype;
|
|
964
|
-
function
|
|
970
|
+
function b(x) {
|
|
965
971
|
if (process.env.NODE_ENV !== "production")
|
|
966
972
|
var P = {}, j = 0;
|
|
967
|
-
function
|
|
973
|
+
function O(A, W, k, L, U, q, Z) {
|
|
968
974
|
if (L = L || y, q = q || k, Z !== t) {
|
|
969
975
|
if (D) {
|
|
970
976
|
var E = new Error(
|
|
@@ -979,208 +985,208 @@ function Ft() {
|
|
|
979
985
|
), P[te] = !0, j++);
|
|
980
986
|
}
|
|
981
987
|
}
|
|
982
|
-
return
|
|
988
|
+
return W[k] == null ? A ? W[k] === null ? new g("The " + U + " `" + q + "` is marked as required " + ("in `" + L + "`, but its value is `null`.")) : new g("The " + U + " `" + q + "` is marked as required in " + ("`" + L + "`, but its value is `undefined`.")) : null : x(W, k, L, U, q);
|
|
983
989
|
}
|
|
984
|
-
var I =
|
|
985
|
-
return I.isRequired =
|
|
990
|
+
var I = O.bind(null, !1);
|
|
991
|
+
return I.isRequired = O.bind(null, !0), I;
|
|
986
992
|
}
|
|
987
|
-
function x
|
|
988
|
-
function P(j,
|
|
989
|
-
var L = j[
|
|
990
|
-
if (
|
|
993
|
+
function C(x) {
|
|
994
|
+
function P(j, O, I, A, W, k) {
|
|
995
|
+
var L = j[O], U = H(L);
|
|
996
|
+
if (U !== x) {
|
|
991
997
|
var q = ee(L);
|
|
992
998
|
return new g(
|
|
993
|
-
"Invalid " + A + " `" +
|
|
994
|
-
{ expectedType:
|
|
999
|
+
"Invalid " + A + " `" + W + "` of type " + ("`" + q + "` supplied to `" + I + "`, expected ") + ("`" + x + "`."),
|
|
1000
|
+
{ expectedType: x }
|
|
995
1001
|
);
|
|
996
1002
|
}
|
|
997
1003
|
return null;
|
|
998
1004
|
}
|
|
999
|
-
return
|
|
1005
|
+
return b(P);
|
|
1000
1006
|
}
|
|
1001
1007
|
function N() {
|
|
1002
|
-
return
|
|
1008
|
+
return b(c);
|
|
1003
1009
|
}
|
|
1004
|
-
function
|
|
1005
|
-
function P(j,
|
|
1006
|
-
if (typeof
|
|
1007
|
-
return new g("Property `" +
|
|
1008
|
-
var k = j[
|
|
1010
|
+
function w(x) {
|
|
1011
|
+
function P(j, O, I, A, W) {
|
|
1012
|
+
if (typeof x != "function")
|
|
1013
|
+
return new g("Property `" + W + "` of component `" + I + "` has invalid PropType notation inside arrayOf.");
|
|
1014
|
+
var k = j[O];
|
|
1009
1015
|
if (!Array.isArray(k)) {
|
|
1010
1016
|
var L = H(k);
|
|
1011
|
-
return new g("Invalid " + A + " `" +
|
|
1017
|
+
return new g("Invalid " + A + " `" + W + "` of type " + ("`" + L + "` supplied to `" + I + "`, expected an array."));
|
|
1012
1018
|
}
|
|
1013
|
-
for (var
|
|
1014
|
-
var q =
|
|
1019
|
+
for (var U = 0; U < k.length; U++) {
|
|
1020
|
+
var q = x(k, U, I, A, W + "[" + U + "]", t);
|
|
1015
1021
|
if (q instanceof Error)
|
|
1016
1022
|
return q;
|
|
1017
1023
|
}
|
|
1018
1024
|
return null;
|
|
1019
1025
|
}
|
|
1020
|
-
return
|
|
1021
|
-
}
|
|
1022
|
-
function
|
|
1023
|
-
function
|
|
1024
|
-
var
|
|
1025
|
-
if (!h(
|
|
1026
|
-
var k = H(
|
|
1027
|
-
return new g("Invalid " + I + " `" + A + "` of type " + ("`" + k + "` supplied to `" +
|
|
1026
|
+
return b(P);
|
|
1027
|
+
}
|
|
1028
|
+
function S() {
|
|
1029
|
+
function x(P, j, O, I, A) {
|
|
1030
|
+
var W = P[j];
|
|
1031
|
+
if (!h(W)) {
|
|
1032
|
+
var k = H(W);
|
|
1033
|
+
return new g("Invalid " + I + " `" + A + "` of type " + ("`" + k + "` supplied to `" + O + "`, expected a single ReactElement."));
|
|
1028
1034
|
}
|
|
1029
1035
|
return null;
|
|
1030
1036
|
}
|
|
1031
|
-
return
|
|
1037
|
+
return b(x);
|
|
1032
1038
|
}
|
|
1033
1039
|
function l() {
|
|
1034
|
-
function
|
|
1035
|
-
var
|
|
1036
|
-
if (!e.isValidElementType(
|
|
1037
|
-
var k = H(
|
|
1038
|
-
return new g("Invalid " + I + " `" + A + "` of type " + ("`" + k + "` supplied to `" +
|
|
1040
|
+
function x(P, j, O, I, A) {
|
|
1041
|
+
var W = P[j];
|
|
1042
|
+
if (!e.isValidElementType(W)) {
|
|
1043
|
+
var k = H(W);
|
|
1044
|
+
return new g("Invalid " + I + " `" + A + "` of type " + ("`" + k + "` supplied to `" + O + "`, expected a single ReactElement type."));
|
|
1039
1045
|
}
|
|
1040
1046
|
return null;
|
|
1041
1047
|
}
|
|
1042
|
-
return
|
|
1048
|
+
return b(x);
|
|
1043
1049
|
}
|
|
1044
|
-
function M(
|
|
1045
|
-
function P(j,
|
|
1046
|
-
if (!(j[
|
|
1047
|
-
var k =
|
|
1048
|
-
return new g("Invalid " + A + " `" +
|
|
1050
|
+
function M(x) {
|
|
1051
|
+
function P(j, O, I, A, W) {
|
|
1052
|
+
if (!(j[O] instanceof x)) {
|
|
1053
|
+
var k = x.name || y, L = le(j[O]);
|
|
1054
|
+
return new g("Invalid " + A + " `" + W + "` of type " + ("`" + L + "` supplied to `" + I + "`, expected ") + ("instance of `" + k + "`."));
|
|
1049
1055
|
}
|
|
1050
1056
|
return null;
|
|
1051
1057
|
}
|
|
1052
|
-
return
|
|
1058
|
+
return b(P);
|
|
1053
1059
|
}
|
|
1054
|
-
function
|
|
1055
|
-
if (!Array.isArray(
|
|
1060
|
+
function a(x) {
|
|
1061
|
+
if (!Array.isArray(x))
|
|
1056
1062
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? r(
|
|
1057
1063
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
1058
1064
|
) : r("Invalid argument supplied to oneOf, expected an array.")), c;
|
|
1059
|
-
function P(j,
|
|
1060
|
-
for (var k = j[
|
|
1061
|
-
if (T(k,
|
|
1065
|
+
function P(j, O, I, A, W) {
|
|
1066
|
+
for (var k = j[O], L = 0; L < x.length; L++)
|
|
1067
|
+
if (T(k, x[L]))
|
|
1062
1068
|
return null;
|
|
1063
|
-
var
|
|
1069
|
+
var U = JSON.stringify(x, function(Z, E) {
|
|
1064
1070
|
var te = ee(E);
|
|
1065
1071
|
return te === "symbol" ? String(E) : E;
|
|
1066
1072
|
});
|
|
1067
|
-
return new g("Invalid " + A + " `" +
|
|
1073
|
+
return new g("Invalid " + A + " `" + W + "` of value `" + String(k) + "` " + ("supplied to `" + I + "`, expected one of " + U + "."));
|
|
1068
1074
|
}
|
|
1069
|
-
return
|
|
1075
|
+
return b(P);
|
|
1070
1076
|
}
|
|
1071
|
-
function
|
|
1072
|
-
function P(j,
|
|
1073
|
-
if (typeof
|
|
1074
|
-
return new g("Property `" +
|
|
1075
|
-
var k = j[
|
|
1077
|
+
function f(x) {
|
|
1078
|
+
function P(j, O, I, A, W) {
|
|
1079
|
+
if (typeof x != "function")
|
|
1080
|
+
return new g("Property `" + W + "` of component `" + I + "` has invalid PropType notation inside objectOf.");
|
|
1081
|
+
var k = j[O], L = H(k);
|
|
1076
1082
|
if (L !== "object")
|
|
1077
|
-
return new g("Invalid " + A + " `" +
|
|
1078
|
-
for (var
|
|
1079
|
-
if (o(k,
|
|
1080
|
-
var q =
|
|
1083
|
+
return new g("Invalid " + A + " `" + W + "` of type " + ("`" + L + "` supplied to `" + I + "`, expected an object."));
|
|
1084
|
+
for (var U in k)
|
|
1085
|
+
if (o(k, U)) {
|
|
1086
|
+
var q = x(k, U, I, A, W + "." + U, t);
|
|
1081
1087
|
if (q instanceof Error)
|
|
1082
1088
|
return q;
|
|
1083
1089
|
}
|
|
1084
1090
|
return null;
|
|
1085
1091
|
}
|
|
1086
|
-
return
|
|
1092
|
+
return b(P);
|
|
1087
1093
|
}
|
|
1088
|
-
function
|
|
1089
|
-
if (!Array.isArray(
|
|
1094
|
+
function u(x) {
|
|
1095
|
+
if (!Array.isArray(x))
|
|
1090
1096
|
return process.env.NODE_ENV !== "production" && r("Invalid argument supplied to oneOfType, expected an instance of array."), c;
|
|
1091
|
-
for (var P = 0; P <
|
|
1092
|
-
var j =
|
|
1097
|
+
for (var P = 0; P < x.length; P++) {
|
|
1098
|
+
var j = x[P];
|
|
1093
1099
|
if (typeof j != "function")
|
|
1094
1100
|
return r(
|
|
1095
1101
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ie(j) + " at index " + P + "."
|
|
1096
1102
|
), c;
|
|
1097
1103
|
}
|
|
1098
|
-
function
|
|
1099
|
-
for (var
|
|
1100
|
-
var Z =
|
|
1104
|
+
function O(I, A, W, k, L) {
|
|
1105
|
+
for (var U = [], q = 0; q < x.length; q++) {
|
|
1106
|
+
var Z = x[q], E = Z(I, A, W, k, L, t);
|
|
1101
1107
|
if (E == null)
|
|
1102
1108
|
return null;
|
|
1103
|
-
E.data && o(E.data, "expectedType") &&
|
|
1109
|
+
E.data && o(E.data, "expectedType") && U.push(E.data.expectedType);
|
|
1104
1110
|
}
|
|
1105
|
-
var te =
|
|
1106
|
-
return new g("Invalid " + k + " `" + L + "` supplied to " + ("`" +
|
|
1111
|
+
var te = U.length > 0 ? ", expected one of type [" + U.join(", ") + "]" : "";
|
|
1112
|
+
return new g("Invalid " + k + " `" + L + "` supplied to " + ("`" + W + "`" + te + "."));
|
|
1107
1113
|
}
|
|
1108
|
-
return
|
|
1114
|
+
return b(O);
|
|
1109
1115
|
}
|
|
1110
1116
|
function _() {
|
|
1111
|
-
function
|
|
1112
|
-
return V(P[j]) ? null : new g("Invalid " + I + " `" + A + "` supplied to " + ("`" +
|
|
1117
|
+
function x(P, j, O, I, A) {
|
|
1118
|
+
return V(P[j]) ? null : new g("Invalid " + I + " `" + A + "` supplied to " + ("`" + O + "`, expected a ReactNode."));
|
|
1113
1119
|
}
|
|
1114
|
-
return
|
|
1120
|
+
return b(x);
|
|
1115
1121
|
}
|
|
1116
|
-
function
|
|
1122
|
+
function R(x, P, j, O, I) {
|
|
1117
1123
|
return new g(
|
|
1118
|
-
(
|
|
1124
|
+
(x || "React class") + ": " + P + " type `" + j + "." + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + I + "`."
|
|
1119
1125
|
);
|
|
1120
1126
|
}
|
|
1121
|
-
function z(
|
|
1122
|
-
function P(j,
|
|
1123
|
-
var k = j[
|
|
1127
|
+
function z(x) {
|
|
1128
|
+
function P(j, O, I, A, W) {
|
|
1129
|
+
var k = j[O], L = H(k);
|
|
1124
1130
|
if (L !== "object")
|
|
1125
|
-
return new g("Invalid " + A + " `" +
|
|
1126
|
-
for (var
|
|
1127
|
-
var q =
|
|
1131
|
+
return new g("Invalid " + A + " `" + W + "` of type `" + L + "` " + ("supplied to `" + I + "`, expected `object`."));
|
|
1132
|
+
for (var U in x) {
|
|
1133
|
+
var q = x[U];
|
|
1128
1134
|
if (typeof q != "function")
|
|
1129
|
-
return
|
|
1130
|
-
var Z = q(k,
|
|
1135
|
+
return R(I, A, W, U, ee(q));
|
|
1136
|
+
var Z = q(k, U, I, A, W + "." + U, t);
|
|
1131
1137
|
if (Z)
|
|
1132
1138
|
return Z;
|
|
1133
1139
|
}
|
|
1134
1140
|
return null;
|
|
1135
1141
|
}
|
|
1136
|
-
return
|
|
1142
|
+
return b(P);
|
|
1137
1143
|
}
|
|
1138
|
-
function X(
|
|
1139
|
-
function P(j,
|
|
1140
|
-
var k = j[
|
|
1144
|
+
function X(x) {
|
|
1145
|
+
function P(j, O, I, A, W) {
|
|
1146
|
+
var k = j[O], L = H(k);
|
|
1141
1147
|
if (L !== "object")
|
|
1142
|
-
return new g("Invalid " + A + " `" +
|
|
1143
|
-
var
|
|
1144
|
-
for (var q in
|
|
1145
|
-
var Z =
|
|
1146
|
-
if (o(
|
|
1147
|
-
return
|
|
1148
|
+
return new g("Invalid " + A + " `" + W + "` of type `" + L + "` " + ("supplied to `" + I + "`, expected `object`."));
|
|
1149
|
+
var U = i({}, j[O], x);
|
|
1150
|
+
for (var q in U) {
|
|
1151
|
+
var Z = x[q];
|
|
1152
|
+
if (o(x, q) && typeof Z != "function")
|
|
1153
|
+
return R(I, A, W, q, ee(Z));
|
|
1148
1154
|
if (!Z)
|
|
1149
1155
|
return new g(
|
|
1150
|
-
"Invalid " + A + " `" +
|
|
1151
|
-
Valid keys: ` + JSON.stringify(Object.keys(
|
|
1156
|
+
"Invalid " + A + " `" + W + "` key `" + q + "` supplied to `" + I + "`.\nBad object: " + JSON.stringify(j[O], null, " ") + `
|
|
1157
|
+
Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
1152
1158
|
);
|
|
1153
|
-
var E = Z(k, q, I, A,
|
|
1159
|
+
var E = Z(k, q, I, A, W + "." + q, t);
|
|
1154
1160
|
if (E)
|
|
1155
1161
|
return E;
|
|
1156
1162
|
}
|
|
1157
1163
|
return null;
|
|
1158
1164
|
}
|
|
1159
|
-
return
|
|
1165
|
+
return b(P);
|
|
1160
1166
|
}
|
|
1161
|
-
function V(
|
|
1162
|
-
switch (typeof
|
|
1167
|
+
function V(x) {
|
|
1168
|
+
switch (typeof x) {
|
|
1163
1169
|
case "number":
|
|
1164
1170
|
case "string":
|
|
1165
1171
|
case "undefined":
|
|
1166
1172
|
return !0;
|
|
1167
1173
|
case "boolean":
|
|
1168
|
-
return !
|
|
1174
|
+
return !x;
|
|
1169
1175
|
case "object":
|
|
1170
|
-
if (Array.isArray(
|
|
1171
|
-
return
|
|
1172
|
-
if (
|
|
1176
|
+
if (Array.isArray(x))
|
|
1177
|
+
return x.every(V);
|
|
1178
|
+
if (x === null || h(x))
|
|
1173
1179
|
return !0;
|
|
1174
|
-
var P =
|
|
1180
|
+
var P = d(x);
|
|
1175
1181
|
if (P) {
|
|
1176
|
-
var j = P.call(
|
|
1177
|
-
if (P !==
|
|
1178
|
-
for (; !(
|
|
1179
|
-
if (!V(
|
|
1182
|
+
var j = P.call(x), O;
|
|
1183
|
+
if (P !== x.entries) {
|
|
1184
|
+
for (; !(O = j.next()).done; )
|
|
1185
|
+
if (!V(O.value))
|
|
1180
1186
|
return !1;
|
|
1181
1187
|
} else
|
|
1182
|
-
for (; !(
|
|
1183
|
-
var I =
|
|
1188
|
+
for (; !(O = j.next()).done; ) {
|
|
1189
|
+
var I = O.value;
|
|
1184
1190
|
if (I && !V(I[1]))
|
|
1185
1191
|
return !1;
|
|
1186
1192
|
}
|
|
@@ -1191,27 +1197,27 @@ Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
|
|
|
1191
1197
|
return !1;
|
|
1192
1198
|
}
|
|
1193
1199
|
}
|
|
1194
|
-
function Q(
|
|
1195
|
-
return
|
|
1200
|
+
function Q(x, P) {
|
|
1201
|
+
return x === "symbol" ? !0 : P ? P["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && P instanceof Symbol : !1;
|
|
1196
1202
|
}
|
|
1197
|
-
function H(
|
|
1198
|
-
var P = typeof
|
|
1199
|
-
return Array.isArray(
|
|
1203
|
+
function H(x) {
|
|
1204
|
+
var P = typeof x;
|
|
1205
|
+
return Array.isArray(x) ? "array" : x instanceof RegExp ? "object" : Q(P, x) ? "symbol" : P;
|
|
1200
1206
|
}
|
|
1201
|
-
function ee(
|
|
1202
|
-
if (typeof
|
|
1203
|
-
return "" +
|
|
1204
|
-
var P = H(
|
|
1207
|
+
function ee(x) {
|
|
1208
|
+
if (typeof x > "u" || x === null)
|
|
1209
|
+
return "" + x;
|
|
1210
|
+
var P = H(x);
|
|
1205
1211
|
if (P === "object") {
|
|
1206
|
-
if (
|
|
1212
|
+
if (x instanceof Date)
|
|
1207
1213
|
return "date";
|
|
1208
|
-
if (
|
|
1214
|
+
if (x instanceof RegExp)
|
|
1209
1215
|
return "regexp";
|
|
1210
1216
|
}
|
|
1211
1217
|
return P;
|
|
1212
1218
|
}
|
|
1213
|
-
function ie(
|
|
1214
|
-
var P = ee(
|
|
1219
|
+
function ie(x) {
|
|
1220
|
+
var P = ee(x);
|
|
1215
1221
|
switch (P) {
|
|
1216
1222
|
case "array":
|
|
1217
1223
|
case "object":
|
|
@@ -1224,24 +1230,24 @@ Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
|
|
|
1224
1230
|
return P;
|
|
1225
1231
|
}
|
|
1226
1232
|
}
|
|
1227
|
-
function le(
|
|
1228
|
-
return !
|
|
1233
|
+
function le(x) {
|
|
1234
|
+
return !x.constructor || !x.constructor.name ? y : x.constructor.name;
|
|
1229
1235
|
}
|
|
1230
|
-
return p.checkPropTypes =
|
|
1236
|
+
return p.checkPropTypes = s, p.resetWarningCache = s.resetWarningCache, p.PropTypes = p, p;
|
|
1231
1237
|
}, Ee;
|
|
1232
1238
|
}
|
|
1233
|
-
var _e,
|
|
1234
|
-
function
|
|
1235
|
-
if (
|
|
1236
|
-
|
|
1237
|
-
var e = /* @__PURE__ */
|
|
1239
|
+
var _e, Fe;
|
|
1240
|
+
function Ft() {
|
|
1241
|
+
if (Fe) return _e;
|
|
1242
|
+
Fe = 1;
|
|
1243
|
+
var e = /* @__PURE__ */ Re();
|
|
1238
1244
|
function i() {
|
|
1239
1245
|
}
|
|
1240
1246
|
function t() {
|
|
1241
1247
|
}
|
|
1242
1248
|
return t.resetWarningCache = i, _e = function() {
|
|
1243
|
-
function o(c, h, D,
|
|
1244
|
-
if (
|
|
1249
|
+
function o(c, h, D, v, m, d) {
|
|
1250
|
+
if (d !== e) {
|
|
1245
1251
|
var y = new Error(
|
|
1246
1252
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1247
1253
|
);
|
|
@@ -1249,7 +1255,7 @@ function Bt() {
|
|
|
1249
1255
|
}
|
|
1250
1256
|
}
|
|
1251
1257
|
o.isRequired = o;
|
|
1252
|
-
function
|
|
1258
|
+
function s() {
|
|
1253
1259
|
return o;
|
|
1254
1260
|
}
|
|
1255
1261
|
var r = {
|
|
@@ -1262,57 +1268,57 @@ function Bt() {
|
|
|
1262
1268
|
string: o,
|
|
1263
1269
|
symbol: o,
|
|
1264
1270
|
any: o,
|
|
1265
|
-
arrayOf:
|
|
1271
|
+
arrayOf: s,
|
|
1266
1272
|
element: o,
|
|
1267
1273
|
elementType: o,
|
|
1268
|
-
instanceOf:
|
|
1274
|
+
instanceOf: s,
|
|
1269
1275
|
node: o,
|
|
1270
|
-
objectOf:
|
|
1271
|
-
oneOf:
|
|
1272
|
-
oneOfType:
|
|
1273
|
-
shape:
|
|
1274
|
-
exact:
|
|
1276
|
+
objectOf: s,
|
|
1277
|
+
oneOf: s,
|
|
1278
|
+
oneOfType: s,
|
|
1279
|
+
shape: s,
|
|
1280
|
+
exact: s,
|
|
1275
1281
|
checkPropTypes: t,
|
|
1276
1282
|
resetWarningCache: i
|
|
1277
1283
|
};
|
|
1278
1284
|
return r.PropTypes = r, r;
|
|
1279
1285
|
}, _e;
|
|
1280
1286
|
}
|
|
1281
|
-
var
|
|
1287
|
+
var Be;
|
|
1282
1288
|
function ut() {
|
|
1283
|
-
if (
|
|
1284
|
-
if (
|
|
1289
|
+
if (Be) return he.exports;
|
|
1290
|
+
if (Be = 1, process.env.NODE_ENV !== "production") {
|
|
1285
1291
|
var e = ct(), i = !0;
|
|
1286
|
-
he.exports = /* @__PURE__ */
|
|
1292
|
+
he.exports = /* @__PURE__ */ Ut()(e.isElement, i);
|
|
1287
1293
|
} else
|
|
1288
|
-
he.exports = /* @__PURE__ */
|
|
1294
|
+
he.exports = /* @__PURE__ */ Ft()();
|
|
1289
1295
|
return he.exports;
|
|
1290
1296
|
}
|
|
1291
1297
|
var me = { exports: {} }, He;
|
|
1292
|
-
function
|
|
1298
|
+
function Bt() {
|
|
1293
1299
|
if (He) return me.exports;
|
|
1294
1300
|
He = 1;
|
|
1295
1301
|
function e(t) {
|
|
1296
|
-
var o,
|
|
1302
|
+
var o, s, r = "";
|
|
1297
1303
|
if (typeof t == "string" || typeof t == "number") r += t;
|
|
1298
1304
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
1299
1305
|
var c = t.length;
|
|
1300
|
-
for (o = 0; o < c; o++) t[o] && (
|
|
1301
|
-
} else for (
|
|
1306
|
+
for (o = 0; o < c; o++) t[o] && (s = e(t[o])) && (r && (r += " "), r += s);
|
|
1307
|
+
} else for (s in t) t[s] && (r && (r += " "), r += s);
|
|
1302
1308
|
return r;
|
|
1303
1309
|
}
|
|
1304
1310
|
function i() {
|
|
1305
|
-
for (var t, o,
|
|
1311
|
+
for (var t, o, s = 0, r = "", c = arguments.length; s < c; s++) (t = arguments[s]) && (o = e(t)) && (r && (r += " "), r += o);
|
|
1306
1312
|
return r;
|
|
1307
1313
|
}
|
|
1308
1314
|
return me.exports = i, me.exports.clsx = i, me.exports;
|
|
1309
1315
|
}
|
|
1310
|
-
var
|
|
1316
|
+
var F = {}, re = {}, ze;
|
|
1311
1317
|
function ve() {
|
|
1312
1318
|
if (ze) return re;
|
|
1313
1319
|
ze = 1, Object.defineProperty(re, "__esModule", {
|
|
1314
1320
|
value: !0
|
|
1315
|
-
}), re.dontSetMe =
|
|
1321
|
+
}), re.dontSetMe = s, re.findInArray = e, re.int = o, re.isFunction = i, re.isNum = t;
|
|
1316
1322
|
function e(r, c) {
|
|
1317
1323
|
for (let h = 0, D = r.length; h < D; h++)
|
|
1318
1324
|
if (c.apply(c, [r[h], h, r])) return r[h];
|
|
@@ -1326,7 +1332,7 @@ function ve() {
|
|
|
1326
1332
|
function o(r) {
|
|
1327
1333
|
return parseInt(r, 10);
|
|
1328
1334
|
}
|
|
1329
|
-
function
|
|
1335
|
+
function s(r, c, h) {
|
|
1330
1336
|
if (r[c])
|
|
1331
1337
|
return new Error(`Invalid prop ${c} passed to ${h} - do not set this, set it on the child.`);
|
|
1332
1338
|
}
|
|
@@ -1349,12 +1355,12 @@ function Ht() {
|
|
|
1349
1355
|
return "";
|
|
1350
1356
|
}
|
|
1351
1357
|
function t(r, c) {
|
|
1352
|
-
return c ? `${c}${
|
|
1358
|
+
return c ? `${c}${s(r)}` : r;
|
|
1353
1359
|
}
|
|
1354
1360
|
function o(r, c) {
|
|
1355
1361
|
return c ? `-${c.toLowerCase()}-${r}` : r;
|
|
1356
1362
|
}
|
|
1357
|
-
function
|
|
1363
|
+
function s(r) {
|
|
1358
1364
|
let c = "", h = !0;
|
|
1359
1365
|
for (let D = 0; D < r.length; D++)
|
|
1360
1366
|
h ? (c += r[D].toUpperCase(), h = !1) : r[D] === "-" ? h = !0 : c += r[D];
|
|
@@ -1364,194 +1370,194 @@ function Ht() {
|
|
|
1364
1370
|
}
|
|
1365
1371
|
var Ve;
|
|
1366
1372
|
function Ie() {
|
|
1367
|
-
if (Ve) return
|
|
1368
|
-
Ve = 1, Object.defineProperty(
|
|
1373
|
+
if (Ve) return F;
|
|
1374
|
+
Ve = 1, Object.defineProperty(F, "__esModule", {
|
|
1369
1375
|
value: !0
|
|
1370
|
-
}),
|
|
1376
|
+
}), F.addClassName = l, F.addEvent = c, F.addUserSelectStyles = N, F.createCSSTransform = p, F.createSVGTransform = T, F.getTouch = b, F.getTouchIdentifier = C, F.getTranslation = g, F.innerHeight = m, F.innerWidth = d, F.matchesSelector = s, F.matchesSelectorAndParentsTo = r, F.offsetXYFromParent = y, F.outerHeight = D, F.outerWidth = v, F.removeClassName = M, F.removeEvent = h, F.scheduleRemoveUserSelectStyles = w;
|
|
1371
1377
|
var e = ve(), i = t(Ht());
|
|
1372
|
-
function t(
|
|
1373
|
-
if (typeof WeakMap == "function") var
|
|
1374
|
-
return (t = function(
|
|
1375
|
-
if (!z &&
|
|
1376
|
-
var X, V, Q = { __proto__: null, default:
|
|
1377
|
-
if (
|
|
1378
|
-
if (X = z ? _ :
|
|
1379
|
-
if (X.has(
|
|
1380
|
-
X.set(
|
|
1378
|
+
function t(a, f) {
|
|
1379
|
+
if (typeof WeakMap == "function") var u = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakMap();
|
|
1380
|
+
return (t = function(R, z) {
|
|
1381
|
+
if (!z && R && R.__esModule) return R;
|
|
1382
|
+
var X, V, Q = { __proto__: null, default: R };
|
|
1383
|
+
if (R === null || typeof R != "object" && typeof R != "function") return Q;
|
|
1384
|
+
if (X = z ? _ : u) {
|
|
1385
|
+
if (X.has(R)) return X.get(R);
|
|
1386
|
+
X.set(R, Q);
|
|
1381
1387
|
}
|
|
1382
|
-
for (const H in
|
|
1388
|
+
for (const H in R) H !== "default" && {}.hasOwnProperty.call(R, H) && ((V = (X = Object.defineProperty) && Object.getOwnPropertyDescriptor(R, H)) && (V.get || V.set) ? X(Q, H, V) : Q[H] = R[H]);
|
|
1383
1389
|
return Q;
|
|
1384
|
-
})(
|
|
1390
|
+
})(a, f);
|
|
1385
1391
|
}
|
|
1386
1392
|
let o = "";
|
|
1387
|
-
function a
|
|
1388
|
-
return o || (o = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(
|
|
1389
|
-
return (0, e.isFunction)(
|
|
1390
|
-
})), (0, e.isFunction)(
|
|
1393
|
+
function s(a, f) {
|
|
1394
|
+
return o || (o = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(u) {
|
|
1395
|
+
return (0, e.isFunction)(a[u]);
|
|
1396
|
+
})), (0, e.isFunction)(a[o]) ? a[o](f) : !1;
|
|
1391
1397
|
}
|
|
1392
|
-
function r(
|
|
1393
|
-
let _ =
|
|
1398
|
+
function r(a, f, u) {
|
|
1399
|
+
let _ = a;
|
|
1394
1400
|
do {
|
|
1395
|
-
if (
|
|
1396
|
-
if (_ ===
|
|
1401
|
+
if (s(_, f)) return !0;
|
|
1402
|
+
if (_ === u) return !1;
|
|
1397
1403
|
_ = _.parentNode;
|
|
1398
1404
|
} while (_);
|
|
1399
1405
|
return !1;
|
|
1400
1406
|
}
|
|
1401
|
-
function c(
|
|
1402
|
-
if (!
|
|
1403
|
-
const
|
|
1407
|
+
function c(a, f, u, _) {
|
|
1408
|
+
if (!a) return;
|
|
1409
|
+
const R = {
|
|
1404
1410
|
capture: !0,
|
|
1405
1411
|
..._
|
|
1406
1412
|
};
|
|
1407
|
-
|
|
1413
|
+
a.addEventListener ? a.addEventListener(f, u, R) : a.attachEvent ? a.attachEvent("on" + f, u) : a["on" + f] = u;
|
|
1408
1414
|
}
|
|
1409
|
-
function h(
|
|
1410
|
-
if (!
|
|
1411
|
-
const
|
|
1415
|
+
function h(a, f, u, _) {
|
|
1416
|
+
if (!a) return;
|
|
1417
|
+
const R = {
|
|
1412
1418
|
capture: !0,
|
|
1413
1419
|
..._
|
|
1414
1420
|
};
|
|
1415
|
-
|
|
1421
|
+
a.removeEventListener ? a.removeEventListener(f, u, R) : a.detachEvent ? a.detachEvent("on" + f, u) : a["on" + f] = null;
|
|
1416
1422
|
}
|
|
1417
|
-
function D(
|
|
1418
|
-
let
|
|
1419
|
-
const
|
|
1420
|
-
return
|
|
1423
|
+
function D(a) {
|
|
1424
|
+
let f = a.clientHeight;
|
|
1425
|
+
const u = a.ownerDocument.defaultView.getComputedStyle(a);
|
|
1426
|
+
return f += (0, e.int)(u.borderTopWidth), f += (0, e.int)(u.borderBottomWidth), f;
|
|
1421
1427
|
}
|
|
1422
|
-
function
|
|
1423
|
-
let
|
|
1424
|
-
const
|
|
1425
|
-
return
|
|
1428
|
+
function v(a) {
|
|
1429
|
+
let f = a.clientWidth;
|
|
1430
|
+
const u = a.ownerDocument.defaultView.getComputedStyle(a);
|
|
1431
|
+
return f += (0, e.int)(u.borderLeftWidth), f += (0, e.int)(u.borderRightWidth), f;
|
|
1426
1432
|
}
|
|
1427
|
-
function
|
|
1428
|
-
let
|
|
1429
|
-
const
|
|
1430
|
-
return
|
|
1433
|
+
function m(a) {
|
|
1434
|
+
let f = a.clientHeight;
|
|
1435
|
+
const u = a.ownerDocument.defaultView.getComputedStyle(a);
|
|
1436
|
+
return f -= (0, e.int)(u.paddingTop), f -= (0, e.int)(u.paddingBottom), f;
|
|
1431
1437
|
}
|
|
1432
|
-
function
|
|
1433
|
-
let
|
|
1434
|
-
const
|
|
1435
|
-
return
|
|
1438
|
+
function d(a) {
|
|
1439
|
+
let f = a.clientWidth;
|
|
1440
|
+
const u = a.ownerDocument.defaultView.getComputedStyle(a);
|
|
1441
|
+
return f -= (0, e.int)(u.paddingLeft), f -= (0, e.int)(u.paddingRight), f;
|
|
1436
1442
|
}
|
|
1437
|
-
function y(
|
|
1438
|
-
const
|
|
1443
|
+
function y(a, f, u) {
|
|
1444
|
+
const R = f === f.ownerDocument.body ? {
|
|
1439
1445
|
left: 0,
|
|
1440
1446
|
top: 0
|
|
1441
|
-
} :
|
|
1447
|
+
} : f.getBoundingClientRect(), z = (a.clientX + f.scrollLeft - R.left) / u, X = (a.clientY + f.scrollTop - R.top) / u;
|
|
1442
1448
|
return {
|
|
1443
1449
|
x: z,
|
|
1444
1450
|
y: X
|
|
1445
1451
|
};
|
|
1446
1452
|
}
|
|
1447
|
-
function p(
|
|
1448
|
-
const
|
|
1453
|
+
function p(a, f) {
|
|
1454
|
+
const u = g(a, f, "px");
|
|
1449
1455
|
return {
|
|
1450
|
-
[(0, i.browserPrefixToKey)("transform", i.default)]:
|
|
1456
|
+
[(0, i.browserPrefixToKey)("transform", i.default)]: u
|
|
1451
1457
|
};
|
|
1452
1458
|
}
|
|
1453
|
-
function T(
|
|
1454
|
-
return g(
|
|
1459
|
+
function T(a, f) {
|
|
1460
|
+
return g(a, f, "");
|
|
1455
1461
|
}
|
|
1456
|
-
function g(
|
|
1462
|
+
function g(a, f, u) {
|
|
1457
1463
|
let {
|
|
1458
1464
|
x: _,
|
|
1459
|
-
y:
|
|
1460
|
-
} =
|
|
1461
|
-
if (
|
|
1462
|
-
const X = `${typeof
|
|
1465
|
+
y: R
|
|
1466
|
+
} = a, z = `translate(${_}${u},${R}${u})`;
|
|
1467
|
+
if (f) {
|
|
1468
|
+
const X = `${typeof f.x == "string" ? f.x : f.x + u}`, V = `${typeof f.y == "string" ? f.y : f.y + u}`;
|
|
1463
1469
|
z = `translate(${X}, ${V})` + z;
|
|
1464
1470
|
}
|
|
1465
1471
|
return z;
|
|
1466
1472
|
}
|
|
1467
|
-
function
|
|
1468
|
-
return
|
|
1473
|
+
function b(a, f) {
|
|
1474
|
+
return a.targetTouches && (0, e.findInArray)(a.targetTouches, (u) => f === u.identifier) || a.changedTouches && (0, e.findInArray)(a.changedTouches, (u) => f === u.identifier);
|
|
1469
1475
|
}
|
|
1470
|
-
function
|
|
1471
|
-
if (
|
|
1472
|
-
if (
|
|
1476
|
+
function C(a) {
|
|
1477
|
+
if (a.targetTouches && a.targetTouches[0]) return a.targetTouches[0].identifier;
|
|
1478
|
+
if (a.changedTouches && a.changedTouches[0]) return a.changedTouches[0].identifier;
|
|
1473
1479
|
}
|
|
1474
|
-
function N(
|
|
1475
|
-
if (!
|
|
1476
|
-
let
|
|
1477
|
-
|
|
1478
|
-
`,
|
|
1479
|
-
`,
|
|
1480
|
+
function N(a) {
|
|
1481
|
+
if (!a) return;
|
|
1482
|
+
let f = a.getElementById("react-draggable-style-el");
|
|
1483
|
+
f || (f = a.createElement("style"), f.type = "text/css", f.id = "react-draggable-style-el", f.innerHTML = `.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
1484
|
+
`, f.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
1485
|
+
`, a.getElementsByTagName("head")[0].appendChild(f)), a.body && l(a.body, "react-draggable-transparent-selection");
|
|
1480
1486
|
}
|
|
1481
|
-
function
|
|
1487
|
+
function w(a) {
|
|
1482
1488
|
window.requestAnimationFrame ? window.requestAnimationFrame(() => {
|
|
1483
|
-
|
|
1484
|
-
}) :
|
|
1489
|
+
S(a);
|
|
1490
|
+
}) : S(a);
|
|
1485
1491
|
}
|
|
1486
|
-
function
|
|
1487
|
-
if (
|
|
1492
|
+
function S(a) {
|
|
1493
|
+
if (a)
|
|
1488
1494
|
try {
|
|
1489
|
-
if (
|
|
1490
|
-
|
|
1495
|
+
if (a.body && M(a.body, "react-draggable-transparent-selection"), a.selection)
|
|
1496
|
+
a.selection.empty();
|
|
1491
1497
|
else {
|
|
1492
|
-
const
|
|
1493
|
-
|
|
1498
|
+
const f = (a.defaultView || window).getSelection();
|
|
1499
|
+
f && f.type !== "Caret" && f.removeAllRanges();
|
|
1494
1500
|
}
|
|
1495
1501
|
} catch {
|
|
1496
1502
|
}
|
|
1497
1503
|
}
|
|
1498
|
-
function l(
|
|
1499
|
-
|
|
1504
|
+
function l(a, f) {
|
|
1505
|
+
a.classList ? a.classList.add(f) : a.className.match(new RegExp(`(?:^|\\s)${f}(?!\\S)`)) || (a.className += ` ${f}`);
|
|
1500
1506
|
}
|
|
1501
|
-
function M(
|
|
1502
|
-
|
|
1507
|
+
function M(a, f) {
|
|
1508
|
+
a.classList ? a.classList.remove(f) : a.className = a.className.replace(new RegExp(`(?:^|\\s)${f}(?!\\S)`, "g"), "");
|
|
1503
1509
|
}
|
|
1504
|
-
return
|
|
1510
|
+
return F;
|
|
1505
1511
|
}
|
|
1506
1512
|
var ne = {}, Ge;
|
|
1507
1513
|
function ft() {
|
|
1508
1514
|
if (Ge) return ne;
|
|
1509
1515
|
Ge = 1, Object.defineProperty(ne, "__esModule", {
|
|
1510
1516
|
value: !0
|
|
1511
|
-
}), ne.canDragX =
|
|
1517
|
+
}), ne.canDragX = s, ne.canDragY = r, ne.createCoreData = h, ne.createDraggableData = D, ne.getBoundPosition = t, ne.getControlPosition = c, ne.snapToGrid = o;
|
|
1512
1518
|
var e = ve(), i = Ie();
|
|
1513
|
-
function t(
|
|
1514
|
-
if (!
|
|
1519
|
+
function t(d, y, p) {
|
|
1520
|
+
if (!d.props.bounds) return [y, p];
|
|
1515
1521
|
let {
|
|
1516
1522
|
bounds: T
|
|
1517
|
-
} =
|
|
1518
|
-
T = typeof T == "string" ? T :
|
|
1519
|
-
const g =
|
|
1523
|
+
} = d.props;
|
|
1524
|
+
T = typeof T == "string" ? T : v(T);
|
|
1525
|
+
const g = m(d);
|
|
1520
1526
|
if (typeof T == "string") {
|
|
1521
1527
|
const {
|
|
1522
|
-
ownerDocument:
|
|
1523
|
-
} = g,
|
|
1528
|
+
ownerDocument: b
|
|
1529
|
+
} = g, C = b.defaultView;
|
|
1524
1530
|
let N;
|
|
1525
|
-
if (T === "parent" ? N = g.parentNode : N = g.getRootNode().querySelector(T), !(N instanceof
|
|
1531
|
+
if (T === "parent" ? N = g.parentNode : N = g.getRootNode().querySelector(T), !(N instanceof C.HTMLElement))
|
|
1526
1532
|
throw new Error('Bounds selector "' + T + '" could not find an element.');
|
|
1527
|
-
const
|
|
1533
|
+
const w = N, S = C.getComputedStyle(g), l = C.getComputedStyle(w);
|
|
1528
1534
|
T = {
|
|
1529
|
-
left: -g.offsetLeft + (0, e.int)(l.paddingLeft) + (0, e.int)(
|
|
1530
|
-
top: -g.offsetTop + (0, e.int)(l.paddingTop) + (0, e.int)(
|
|
1531
|
-
right: (0, i.innerWidth)(
|
|
1532
|
-
bottom: (0, i.innerHeight)(
|
|
1535
|
+
left: -g.offsetLeft + (0, e.int)(l.paddingLeft) + (0, e.int)(S.marginLeft),
|
|
1536
|
+
top: -g.offsetTop + (0, e.int)(l.paddingTop) + (0, e.int)(S.marginTop),
|
|
1537
|
+
right: (0, i.innerWidth)(w) - (0, i.outerWidth)(g) - g.offsetLeft + (0, e.int)(l.paddingRight) - (0, e.int)(S.marginRight),
|
|
1538
|
+
bottom: (0, i.innerHeight)(w) - (0, i.outerHeight)(g) - g.offsetTop + (0, e.int)(l.paddingBottom) - (0, e.int)(S.marginBottom)
|
|
1533
1539
|
};
|
|
1534
1540
|
}
|
|
1535
1541
|
return (0, e.isNum)(T.right) && (y = Math.min(y, T.right)), (0, e.isNum)(T.bottom) && (p = Math.min(p, T.bottom)), (0, e.isNum)(T.left) && (y = Math.max(y, T.left)), (0, e.isNum)(T.top) && (p = Math.max(p, T.top)), [y, p];
|
|
1536
1542
|
}
|
|
1537
|
-
function o(
|
|
1538
|
-
const T = Math.round(y /
|
|
1543
|
+
function o(d, y, p) {
|
|
1544
|
+
const T = Math.round(y / d[0]) * d[0], g = Math.round(p / d[1]) * d[1];
|
|
1539
1545
|
return [T, g];
|
|
1540
1546
|
}
|
|
1541
|
-
function
|
|
1542
|
-
return
|
|
1547
|
+
function s(d) {
|
|
1548
|
+
return d.props.axis === "both" || d.props.axis === "x";
|
|
1543
1549
|
}
|
|
1544
|
-
function r(
|
|
1545
|
-
return
|
|
1550
|
+
function r(d) {
|
|
1551
|
+
return d.props.axis === "both" || d.props.axis === "y";
|
|
1546
1552
|
}
|
|
1547
|
-
function c(
|
|
1548
|
-
const T = typeof y == "number" ? (0, i.getTouch)(
|
|
1553
|
+
function c(d, y, p) {
|
|
1554
|
+
const T = typeof y == "number" ? (0, i.getTouch)(d, y) : null;
|
|
1549
1555
|
if (typeof y == "number" && !T) return null;
|
|
1550
|
-
const g =
|
|
1551
|
-
return (0, i.offsetXYFromParent)(T ||
|
|
1556
|
+
const g = m(p), b = p.props.offsetParent || g.offsetParent || g.ownerDocument.body;
|
|
1557
|
+
return (0, i.offsetXYFromParent)(T || d, b, p.props.scale);
|
|
1552
1558
|
}
|
|
1553
|
-
function h(
|
|
1554
|
-
const T = !(0, e.isNum)(
|
|
1559
|
+
function h(d, y, p) {
|
|
1560
|
+
const T = !(0, e.isNum)(d.lastX), g = m(d);
|
|
1555
1561
|
return T ? {
|
|
1556
1562
|
node: g,
|
|
1557
1563
|
deltaX: 0,
|
|
@@ -1562,36 +1568,36 @@ function ft() {
|
|
|
1562
1568
|
y: p
|
|
1563
1569
|
} : {
|
|
1564
1570
|
node: g,
|
|
1565
|
-
deltaX: y -
|
|
1566
|
-
deltaY: p -
|
|
1567
|
-
lastX:
|
|
1568
|
-
lastY:
|
|
1571
|
+
deltaX: y - d.lastX,
|
|
1572
|
+
deltaY: p - d.lastY,
|
|
1573
|
+
lastX: d.lastX,
|
|
1574
|
+
lastY: d.lastY,
|
|
1569
1575
|
x: y,
|
|
1570
1576
|
y: p
|
|
1571
1577
|
};
|
|
1572
1578
|
}
|
|
1573
|
-
function D(
|
|
1574
|
-
const p =
|
|
1579
|
+
function D(d, y) {
|
|
1580
|
+
const p = d.props.scale;
|
|
1575
1581
|
return {
|
|
1576
1582
|
node: y.node,
|
|
1577
|
-
x:
|
|
1578
|
-
y:
|
|
1583
|
+
x: d.state.x + y.deltaX / p,
|
|
1584
|
+
y: d.state.y + y.deltaY / p,
|
|
1579
1585
|
deltaX: y.deltaX / p,
|
|
1580
1586
|
deltaY: y.deltaY / p,
|
|
1581
|
-
lastX:
|
|
1582
|
-
lastY:
|
|
1587
|
+
lastX: d.state.x,
|
|
1588
|
+
lastY: d.state.y
|
|
1583
1589
|
};
|
|
1584
1590
|
}
|
|
1585
|
-
function
|
|
1591
|
+
function v(d) {
|
|
1586
1592
|
return {
|
|
1587
|
-
left:
|
|
1588
|
-
top:
|
|
1589
|
-
right:
|
|
1590
|
-
bottom:
|
|
1593
|
+
left: d.left,
|
|
1594
|
+
top: d.top,
|
|
1595
|
+
right: d.right,
|
|
1596
|
+
bottom: d.bottom
|
|
1591
1597
|
};
|
|
1592
1598
|
}
|
|
1593
|
-
function
|
|
1594
|
-
const y =
|
|
1599
|
+
function m(d) {
|
|
1600
|
+
const y = d.findDOMNode();
|
|
1595
1601
|
if (!y)
|
|
1596
1602
|
throw new Error("<DraggableCore>: Unmounted during event!");
|
|
1597
1603
|
return y;
|
|
@@ -1614,40 +1620,40 @@ function zt() {
|
|
|
1614
1620
|
Je = 1, Object.defineProperty(ue, "__esModule", {
|
|
1615
1621
|
value: !0
|
|
1616
1622
|
}), ue.default = void 0;
|
|
1617
|
-
var e = D(be), i = h(/* @__PURE__ */ ut()), t = h(ot), o = Ie(),
|
|
1623
|
+
var e = D(be), i = h(/* @__PURE__ */ ut()), t = h(ot), o = Ie(), s = ft(), r = ve(), c = h(ht());
|
|
1618
1624
|
function h(g) {
|
|
1619
1625
|
return g && g.__esModule ? g : { default: g };
|
|
1620
1626
|
}
|
|
1621
|
-
function D(g,
|
|
1622
|
-
if (typeof WeakMap == "function") var
|
|
1623
|
-
return (D = function(
|
|
1624
|
-
if (!
|
|
1625
|
-
var l, M,
|
|
1626
|
-
if (
|
|
1627
|
-
if (l =
|
|
1628
|
-
if (l.has(
|
|
1629
|
-
l.set(
|
|
1627
|
+
function D(g, b) {
|
|
1628
|
+
if (typeof WeakMap == "function") var C = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap();
|
|
1629
|
+
return (D = function(w, S) {
|
|
1630
|
+
if (!S && w && w.__esModule) return w;
|
|
1631
|
+
var l, M, a = { __proto__: null, default: w };
|
|
1632
|
+
if (w === null || typeof w != "object" && typeof w != "function") return a;
|
|
1633
|
+
if (l = S ? N : C) {
|
|
1634
|
+
if (l.has(w)) return l.get(w);
|
|
1635
|
+
l.set(w, a);
|
|
1630
1636
|
}
|
|
1631
|
-
for (const
|
|
1632
|
-
return
|
|
1633
|
-
})(g,
|
|
1637
|
+
for (const f in w) f !== "default" && {}.hasOwnProperty.call(w, f) && ((M = (l = Object.defineProperty) && Object.getOwnPropertyDescriptor(w, f)) && (M.get || M.set) ? l(a, f, M) : a[f] = w[f]);
|
|
1638
|
+
return a;
|
|
1639
|
+
})(g, b);
|
|
1634
1640
|
}
|
|
1635
|
-
function
|
|
1636
|
-
return (
|
|
1641
|
+
function v(g, b, C) {
|
|
1642
|
+
return (b = m(b)) in g ? Object.defineProperty(g, b, { value: C, enumerable: !0, configurable: !0, writable: !0 }) : g[b] = C, g;
|
|
1637
1643
|
}
|
|
1638
|
-
function
|
|
1639
|
-
var
|
|
1640
|
-
return typeof
|
|
1644
|
+
function m(g) {
|
|
1645
|
+
var b = d(g, "string");
|
|
1646
|
+
return typeof b == "symbol" ? b : b + "";
|
|
1641
1647
|
}
|
|
1642
|
-
function
|
|
1648
|
+
function d(g, b) {
|
|
1643
1649
|
if (typeof g != "object" || !g) return g;
|
|
1644
|
-
var
|
|
1645
|
-
if (
|
|
1646
|
-
var N =
|
|
1650
|
+
var C = g[Symbol.toPrimitive];
|
|
1651
|
+
if (C !== void 0) {
|
|
1652
|
+
var N = C.call(g, b);
|
|
1647
1653
|
if (typeof N != "object") return N;
|
|
1648
1654
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1649
1655
|
}
|
|
1650
|
-
return (
|
|
1656
|
+
return (b === "string" ? String : Number)(g);
|
|
1651
1657
|
}
|
|
1652
1658
|
const y = {
|
|
1653
1659
|
touch: {
|
|
@@ -1663,84 +1669,84 @@ function zt() {
|
|
|
1663
1669
|
};
|
|
1664
1670
|
let p = y.mouse, T = class extends e.Component {
|
|
1665
1671
|
constructor() {
|
|
1666
|
-
super(...arguments),
|
|
1667
|
-
if (this.props.onMouseDown(
|
|
1668
|
-
const
|
|
1669
|
-
if (!
|
|
1672
|
+
super(...arguments), v(this, "dragging", !1), v(this, "lastX", NaN), v(this, "lastY", NaN), v(this, "touchIdentifier", null), v(this, "mounted", !1), v(this, "handleDragStart", (b) => {
|
|
1673
|
+
if (this.props.onMouseDown(b), !this.props.allowAnyClick && typeof b.button == "number" && b.button !== 0) return !1;
|
|
1674
|
+
const C = this.findDOMNode();
|
|
1675
|
+
if (!C || !C.ownerDocument || !C.ownerDocument.body)
|
|
1670
1676
|
throw new Error("<DraggableCore> not mounted on DragStart!");
|
|
1671
1677
|
const {
|
|
1672
1678
|
ownerDocument: N
|
|
1673
|
-
} =
|
|
1674
|
-
if (this.props.disabled || !(
|
|
1679
|
+
} = C;
|
|
1680
|
+
if (this.props.disabled || !(b.target instanceof N.defaultView.Node) || this.props.handle && !(0, o.matchesSelectorAndParentsTo)(b.target, this.props.handle, C) || this.props.cancel && (0, o.matchesSelectorAndParentsTo)(b.target, this.props.cancel, C))
|
|
1675
1681
|
return;
|
|
1676
|
-
|
|
1677
|
-
const
|
|
1678
|
-
this.touchIdentifier =
|
|
1679
|
-
const
|
|
1680
|
-
if (
|
|
1682
|
+
b.type === "touchstart" && !this.props.allowMobileScroll && b.preventDefault();
|
|
1683
|
+
const w = (0, o.getTouchIdentifier)(b);
|
|
1684
|
+
this.touchIdentifier = w;
|
|
1685
|
+
const S = (0, s.getControlPosition)(b, w, this);
|
|
1686
|
+
if (S == null) return;
|
|
1681
1687
|
const {
|
|
1682
1688
|
x: l,
|
|
1683
1689
|
y: M
|
|
1684
|
-
} =
|
|
1685
|
-
(0, c.default)("DraggableCore: handleDragStart: %j",
|
|
1686
|
-
}),
|
|
1687
|
-
const
|
|
1688
|
-
if (
|
|
1690
|
+
} = S, a = (0, s.createCoreData)(this, l, M);
|
|
1691
|
+
(0, c.default)("DraggableCore: handleDragStart: %j", a), (0, c.default)("calling", this.props.onStart), !(this.props.onStart(b, a) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, o.addUserSelectStyles)(N), this.dragging = !0, this.lastX = l, this.lastY = M, (0, o.addEvent)(N, p.move, this.handleDrag), (0, o.addEvent)(N, p.stop, this.handleDragStop));
|
|
1692
|
+
}), v(this, "handleDrag", (b) => {
|
|
1693
|
+
const C = (0, s.getControlPosition)(b, this.touchIdentifier, this);
|
|
1694
|
+
if (C == null) return;
|
|
1689
1695
|
let {
|
|
1690
1696
|
x: N,
|
|
1691
|
-
y:
|
|
1692
|
-
} =
|
|
1697
|
+
y: w
|
|
1698
|
+
} = C;
|
|
1693
1699
|
if (Array.isArray(this.props.grid)) {
|
|
1694
|
-
let M = N - this.lastX,
|
|
1695
|
-
if ([M,
|
|
1696
|
-
N = this.lastX + M,
|
|
1700
|
+
let M = N - this.lastX, a = w - this.lastY;
|
|
1701
|
+
if ([M, a] = (0, s.snapToGrid)(this.props.grid, M, a), !M && !a) return;
|
|
1702
|
+
N = this.lastX + M, w = this.lastY + a;
|
|
1697
1703
|
}
|
|
1698
|
-
const
|
|
1699
|
-
if ((0, c.default)("DraggableCore: handleDrag: %j",
|
|
1704
|
+
const S = (0, s.createCoreData)(this, N, w);
|
|
1705
|
+
if ((0, c.default)("DraggableCore: handleDrag: %j", S), this.props.onDrag(b, S) === !1 || this.mounted === !1) {
|
|
1700
1706
|
try {
|
|
1701
1707
|
this.handleDragStop(new MouseEvent("mouseup"));
|
|
1702
1708
|
} catch {
|
|
1703
|
-
const
|
|
1704
|
-
|
|
1709
|
+
const a = document.createEvent("MouseEvents");
|
|
1710
|
+
a.initMouseEvent("mouseup", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), this.handleDragStop(a);
|
|
1705
1711
|
}
|
|
1706
1712
|
return;
|
|
1707
1713
|
}
|
|
1708
|
-
this.lastX = N, this.lastY =
|
|
1709
|
-
}),
|
|
1714
|
+
this.lastX = N, this.lastY = w;
|
|
1715
|
+
}), v(this, "handleDragStop", (b) => {
|
|
1710
1716
|
if (!this.dragging) return;
|
|
1711
|
-
const
|
|
1712
|
-
if (
|
|
1717
|
+
const C = (0, s.getControlPosition)(b, this.touchIdentifier, this);
|
|
1718
|
+
if (C == null) return;
|
|
1713
1719
|
let {
|
|
1714
1720
|
x: N,
|
|
1715
|
-
y:
|
|
1716
|
-
} =
|
|
1721
|
+
y: w
|
|
1722
|
+
} = C;
|
|
1717
1723
|
if (Array.isArray(this.props.grid)) {
|
|
1718
|
-
let
|
|
1719
|
-
[
|
|
1724
|
+
let a = N - this.lastX || 0, f = w - this.lastY || 0;
|
|
1725
|
+
[a, f] = (0, s.snapToGrid)(this.props.grid, a, f), N = this.lastX + a, w = this.lastY + f;
|
|
1720
1726
|
}
|
|
1721
|
-
const
|
|
1722
|
-
if (this.props.onStop(
|
|
1727
|
+
const S = (0, s.createCoreData)(this, N, w);
|
|
1728
|
+
if (this.props.onStop(b, S) === !1 || this.mounted === !1) return !1;
|
|
1723
1729
|
const M = this.findDOMNode();
|
|
1724
|
-
M && this.props.enableUserSelectHack && (0, o.scheduleRemoveUserSelectStyles)(M.ownerDocument), (0, c.default)("DraggableCore: handleDragStop: %j",
|
|
1725
|
-
}),
|
|
1730
|
+
M && this.props.enableUserSelectHack && (0, o.scheduleRemoveUserSelectStyles)(M.ownerDocument), (0, c.default)("DraggableCore: handleDragStop: %j", S), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, M && ((0, c.default)("DraggableCore: Removing handlers"), (0, o.removeEvent)(M.ownerDocument, p.move, this.handleDrag), (0, o.removeEvent)(M.ownerDocument, p.stop, this.handleDragStop));
|
|
1731
|
+
}), v(this, "onMouseDown", (b) => (p = y.mouse, this.handleDragStart(b))), v(this, "onMouseUp", (b) => (p = y.mouse, this.handleDragStop(b))), v(this, "onTouchStart", (b) => (p = y.touch, this.handleDragStart(b))), v(this, "onTouchEnd", (b) => (p = y.touch, this.handleDragStop(b)));
|
|
1726
1732
|
}
|
|
1727
1733
|
componentDidMount() {
|
|
1728
1734
|
this.mounted = !0;
|
|
1729
|
-
const
|
|
1730
|
-
|
|
1735
|
+
const b = this.findDOMNode();
|
|
1736
|
+
b && (0, o.addEvent)(b, y.touch.start, this.onTouchStart, {
|
|
1731
1737
|
passive: !1
|
|
1732
1738
|
});
|
|
1733
1739
|
}
|
|
1734
1740
|
componentWillUnmount() {
|
|
1735
1741
|
this.mounted = !1;
|
|
1736
|
-
const
|
|
1737
|
-
if (
|
|
1742
|
+
const b = this.findDOMNode();
|
|
1743
|
+
if (b) {
|
|
1738
1744
|
const {
|
|
1739
|
-
ownerDocument:
|
|
1740
|
-
} =
|
|
1741
|
-
(0, o.removeEvent)(
|
|
1745
|
+
ownerDocument: C
|
|
1746
|
+
} = b;
|
|
1747
|
+
(0, o.removeEvent)(C, y.mouse.move, this.handleDrag), (0, o.removeEvent)(C, y.touch.move, this.handleDrag), (0, o.removeEvent)(C, y.mouse.stop, this.handleDragStop), (0, o.removeEvent)(C, y.touch.stop, this.handleDragStop), (0, o.removeEvent)(b, y.touch.start, this.onTouchStart, {
|
|
1742
1748
|
passive: !1
|
|
1743
|
-
}), this.props.enableUserSelectHack && (0, o.scheduleRemoveUserSelectStyles)(
|
|
1749
|
+
}), this.props.enableUserSelectHack && (0, o.scheduleRemoveUserSelectStyles)(C);
|
|
1744
1750
|
}
|
|
1745
1751
|
}
|
|
1746
1752
|
// React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
|
|
@@ -1761,7 +1767,7 @@ function zt() {
|
|
|
1761
1767
|
});
|
|
1762
1768
|
}
|
|
1763
1769
|
};
|
|
1764
|
-
return ue.default = T,
|
|
1770
|
+
return ue.default = T, v(T, "displayName", "DraggableCore"), v(T, "propTypes", {
|
|
1765
1771
|
/**
|
|
1766
1772
|
* `allowAnyClick` allows dragging using any mouse button.
|
|
1767
1773
|
* By default, we only accept the left button.
|
|
@@ -1793,8 +1799,8 @@ function zt() {
|
|
|
1793
1799
|
* `offsetParent`, if set, uses the passed DOM node to compute drag offsets
|
|
1794
1800
|
* instead of using the parent node.
|
|
1795
1801
|
*/
|
|
1796
|
-
offsetParent: function(g,
|
|
1797
|
-
if (g[
|
|
1802
|
+
offsetParent: function(g, b) {
|
|
1803
|
+
if (g[b] && g[b].nodeType !== 1)
|
|
1798
1804
|
throw new Error("Draggable's offsetParent must be a DOM Node.");
|
|
1799
1805
|
},
|
|
1800
1806
|
/**
|
|
@@ -1891,7 +1897,7 @@ function zt() {
|
|
|
1891
1897
|
className: r.dontSetMe,
|
|
1892
1898
|
style: r.dontSetMe,
|
|
1893
1899
|
transform: r.dontSetMe
|
|
1894
|
-
}),
|
|
1900
|
+
}), v(T, "defaultProps", {
|
|
1895
1901
|
allowAnyClick: !1,
|
|
1896
1902
|
// by default only accept left click
|
|
1897
1903
|
allowMobileScroll: !1,
|
|
@@ -1919,81 +1925,81 @@ function Xt() {
|
|
|
1919
1925
|
return D.default;
|
|
1920
1926
|
}
|
|
1921
1927
|
}), e.default = void 0;
|
|
1922
|
-
var i =
|
|
1923
|
-
function
|
|
1924
|
-
return
|
|
1928
|
+
var i = d(be), t = m(/* @__PURE__ */ ut()), o = m(ot), s = Bt(), r = Ie(), c = ft(), h = ve(), D = m(zt()), v = m(ht());
|
|
1929
|
+
function m(C) {
|
|
1930
|
+
return C && C.__esModule ? C : { default: C };
|
|
1925
1931
|
}
|
|
1926
|
-
function
|
|
1927
|
-
if (typeof WeakMap == "function") var
|
|
1928
|
-
return (
|
|
1932
|
+
function d(C, N) {
|
|
1933
|
+
if (typeof WeakMap == "function") var w = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap();
|
|
1934
|
+
return (d = function(l, M) {
|
|
1929
1935
|
if (!M && l && l.__esModule) return l;
|
|
1930
|
-
var
|
|
1931
|
-
if (l === null || typeof l != "object" && typeof l != "function") return
|
|
1932
|
-
if (
|
|
1933
|
-
if (
|
|
1934
|
-
|
|
1936
|
+
var a, f, u = { __proto__: null, default: l };
|
|
1937
|
+
if (l === null || typeof l != "object" && typeof l != "function") return u;
|
|
1938
|
+
if (a = M ? S : w) {
|
|
1939
|
+
if (a.has(l)) return a.get(l);
|
|
1940
|
+
a.set(l, u);
|
|
1935
1941
|
}
|
|
1936
|
-
for (const _ in l) _ !== "default" && {}.hasOwnProperty.call(l, _) && ((
|
|
1937
|
-
return
|
|
1938
|
-
})(
|
|
1942
|
+
for (const _ in l) _ !== "default" && {}.hasOwnProperty.call(l, _) && ((f = (a = Object.defineProperty) && Object.getOwnPropertyDescriptor(l, _)) && (f.get || f.set) ? a(u, _, f) : u[_] = l[_]);
|
|
1943
|
+
return u;
|
|
1944
|
+
})(C, N);
|
|
1939
1945
|
}
|
|
1940
1946
|
function y() {
|
|
1941
|
-
return y = Object.assign ? Object.assign.bind() : function(
|
|
1947
|
+
return y = Object.assign ? Object.assign.bind() : function(C) {
|
|
1942
1948
|
for (var N = 1; N < arguments.length; N++) {
|
|
1943
|
-
var
|
|
1944
|
-
for (var
|
|
1949
|
+
var w = arguments[N];
|
|
1950
|
+
for (var S in w) ({}).hasOwnProperty.call(w, S) && (C[S] = w[S]);
|
|
1945
1951
|
}
|
|
1946
|
-
return
|
|
1952
|
+
return C;
|
|
1947
1953
|
}, y.apply(null, arguments);
|
|
1948
1954
|
}
|
|
1949
|
-
function p(
|
|
1950
|
-
return (N = T(N)) in
|
|
1955
|
+
function p(C, N, w) {
|
|
1956
|
+
return (N = T(N)) in C ? Object.defineProperty(C, N, { value: w, enumerable: !0, configurable: !0, writable: !0 }) : C[N] = w, C;
|
|
1951
1957
|
}
|
|
1952
|
-
function T(
|
|
1953
|
-
var N = g(
|
|
1958
|
+
function T(C) {
|
|
1959
|
+
var N = g(C, "string");
|
|
1954
1960
|
return typeof N == "symbol" ? N : N + "";
|
|
1955
1961
|
}
|
|
1956
|
-
function g(
|
|
1957
|
-
if (typeof
|
|
1958
|
-
var
|
|
1959
|
-
if (
|
|
1960
|
-
var
|
|
1961
|
-
if (typeof
|
|
1962
|
+
function g(C, N) {
|
|
1963
|
+
if (typeof C != "object" || !C) return C;
|
|
1964
|
+
var w = C[Symbol.toPrimitive];
|
|
1965
|
+
if (w !== void 0) {
|
|
1966
|
+
var S = w.call(C, N);
|
|
1967
|
+
if (typeof S != "object") return S;
|
|
1962
1968
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1963
1969
|
}
|
|
1964
|
-
return (N === "string" ? String : Number)(
|
|
1970
|
+
return (N === "string" ? String : Number)(C);
|
|
1965
1971
|
}
|
|
1966
|
-
class
|
|
1972
|
+
class b extends i.Component {
|
|
1967
1973
|
// React 16.3+
|
|
1968
1974
|
// Arity (props, state)
|
|
1969
|
-
static getDerivedStateFromProps(N,
|
|
1975
|
+
static getDerivedStateFromProps(N, w) {
|
|
1970
1976
|
let {
|
|
1971
|
-
position:
|
|
1977
|
+
position: S
|
|
1972
1978
|
} = N, {
|
|
1973
1979
|
prevPropsPosition: l
|
|
1974
|
-
} =
|
|
1975
|
-
return
|
|
1976
|
-
position:
|
|
1980
|
+
} = w;
|
|
1981
|
+
return S && (!l || S.x !== l.x || S.y !== l.y) ? ((0, v.default)("Draggable: getDerivedStateFromProps %j", {
|
|
1982
|
+
position: S,
|
|
1977
1983
|
prevPropsPosition: l
|
|
1978
1984
|
}), {
|
|
1979
|
-
x:
|
|
1980
|
-
y:
|
|
1985
|
+
x: S.x,
|
|
1986
|
+
y: S.y,
|
|
1981
1987
|
prevPropsPosition: {
|
|
1982
|
-
...
|
|
1988
|
+
...S
|
|
1983
1989
|
}
|
|
1984
1990
|
}) : null;
|
|
1985
1991
|
}
|
|
1986
1992
|
constructor(N) {
|
|
1987
|
-
super(N), p(this, "onDragStart", (
|
|
1988
|
-
if ((0,
|
|
1993
|
+
super(N), p(this, "onDragStart", (w, S) => {
|
|
1994
|
+
if ((0, v.default)("Draggable: onDragStart: %j", S), this.props.onStart(w, (0, c.createDraggableData)(this, S)) === !1) return !1;
|
|
1989
1995
|
this.setState({
|
|
1990
1996
|
dragging: !0,
|
|
1991
1997
|
dragged: !0
|
|
1992
1998
|
});
|
|
1993
|
-
}), p(this, "onDrag", (
|
|
1999
|
+
}), p(this, "onDrag", (w, S) => {
|
|
1994
2000
|
if (!this.state.dragging) return !1;
|
|
1995
|
-
(0,
|
|
1996
|
-
const l = (0, c.createDraggableData)(this,
|
|
2001
|
+
(0, v.default)("Draggable: onDrag: %j", S);
|
|
2002
|
+
const l = (0, c.createDraggableData)(this, S), M = {
|
|
1997
2003
|
x: l.x,
|
|
1998
2004
|
y: l.y,
|
|
1999
2005
|
slackX: 0,
|
|
@@ -2001,18 +2007,18 @@ function Xt() {
|
|
|
2001
2007
|
};
|
|
2002
2008
|
if (this.props.bounds) {
|
|
2003
2009
|
const {
|
|
2004
|
-
x:
|
|
2005
|
-
y:
|
|
2010
|
+
x: f,
|
|
2011
|
+
y: u
|
|
2006
2012
|
} = M;
|
|
2007
2013
|
M.x += this.state.slackX, M.y += this.state.slackY;
|
|
2008
|
-
const [_,
|
|
2009
|
-
M.x = _, M.y =
|
|
2014
|
+
const [_, R] = (0, c.getBoundPosition)(this, M.x, M.y);
|
|
2015
|
+
M.x = _, M.y = R, M.slackX = this.state.slackX + (f - M.x), M.slackY = this.state.slackY + (u - M.y), l.x = M.x, l.y = M.y, l.deltaX = M.x - this.state.x, l.deltaY = M.y - this.state.y;
|
|
2010
2016
|
}
|
|
2011
|
-
if (this.props.onDrag(
|
|
2017
|
+
if (this.props.onDrag(w, l) === !1) return !1;
|
|
2012
2018
|
this.setState(M);
|
|
2013
|
-
}), p(this, "onDragStop", (
|
|
2014
|
-
if (!this.state.dragging || this.props.onStop(
|
|
2015
|
-
(0,
|
|
2019
|
+
}), p(this, "onDragStop", (w, S) => {
|
|
2020
|
+
if (!this.state.dragging || this.props.onStop(w, (0, c.createDraggableData)(this, S)) === !1) return !1;
|
|
2021
|
+
(0, v.default)("Draggable: onDragStop: %j", S);
|
|
2016
2022
|
const M = {
|
|
2017
2023
|
dragging: !1,
|
|
2018
2024
|
slackX: 0,
|
|
@@ -2020,10 +2026,10 @@ function Xt() {
|
|
|
2020
2026
|
};
|
|
2021
2027
|
if (!!this.props.position) {
|
|
2022
2028
|
const {
|
|
2023
|
-
x:
|
|
2024
|
-
y:
|
|
2029
|
+
x: f,
|
|
2030
|
+
y: u
|
|
2025
2031
|
} = this.props.position;
|
|
2026
|
-
M.x =
|
|
2032
|
+
M.x = f, M.y = u;
|
|
2027
2033
|
}
|
|
2028
2034
|
this.setState(M);
|
|
2029
2035
|
}), this.state = {
|
|
@@ -2062,44 +2068,44 @@ function Xt() {
|
|
|
2062
2068
|
render() {
|
|
2063
2069
|
const {
|
|
2064
2070
|
axis: N,
|
|
2065
|
-
bounds:
|
|
2066
|
-
children:
|
|
2071
|
+
bounds: w,
|
|
2072
|
+
children: S,
|
|
2067
2073
|
defaultPosition: l,
|
|
2068
2074
|
defaultClassName: M,
|
|
2069
|
-
defaultClassNameDragging:
|
|
2070
|
-
defaultClassNameDragged:
|
|
2071
|
-
position:
|
|
2075
|
+
defaultClassNameDragging: a,
|
|
2076
|
+
defaultClassNameDragged: f,
|
|
2077
|
+
position: u,
|
|
2072
2078
|
positionOffset: _,
|
|
2073
|
-
scale:
|
|
2079
|
+
scale: R,
|
|
2074
2080
|
...z
|
|
2075
2081
|
} = this.props;
|
|
2076
2082
|
let X = {}, V = null;
|
|
2077
|
-
const H = !!!
|
|
2083
|
+
const H = !!!u || this.state.dragging, ee = u || l, ie = {
|
|
2078
2084
|
// Set left if horizontal drag is enabled
|
|
2079
2085
|
x: (0, c.canDragX)(this) && H ? this.state.x : ee.x,
|
|
2080
2086
|
// Set top if vertical drag is enabled
|
|
2081
2087
|
y: (0, c.canDragY)(this) && H ? this.state.y : ee.y
|
|
2082
2088
|
};
|
|
2083
2089
|
this.state.isElementSVG ? V = (0, r.createSVGTransform)(ie, _) : X = (0, r.createCSSTransform)(ie, _);
|
|
2084
|
-
const le = (0,
|
|
2085
|
-
[
|
|
2086
|
-
[
|
|
2090
|
+
const le = (0, s.clsx)(S.props.className || "", M, {
|
|
2091
|
+
[a]: this.state.dragging,
|
|
2092
|
+
[f]: this.state.dragged
|
|
2087
2093
|
});
|
|
2088
2094
|
return /* @__PURE__ */ i.createElement(D.default, y({}, z, {
|
|
2089
2095
|
onStart: this.onDragStart,
|
|
2090
2096
|
onDrag: this.onDrag,
|
|
2091
2097
|
onStop: this.onDragStop
|
|
2092
|
-
}), /* @__PURE__ */ i.cloneElement(i.Children.only(
|
|
2098
|
+
}), /* @__PURE__ */ i.cloneElement(i.Children.only(S), {
|
|
2093
2099
|
className: le,
|
|
2094
2100
|
style: {
|
|
2095
|
-
...
|
|
2101
|
+
...S.props.style,
|
|
2096
2102
|
...X
|
|
2097
2103
|
},
|
|
2098
2104
|
transform: V
|
|
2099
2105
|
}));
|
|
2100
2106
|
}
|
|
2101
2107
|
}
|
|
2102
|
-
e.default =
|
|
2108
|
+
e.default = b, p(b, "displayName", "Draggable"), p(b, "propTypes", {
|
|
2103
2109
|
// Accepts all props <DraggableCore> accepts.
|
|
2104
2110
|
...D.default.propTypes,
|
|
2105
2111
|
/**
|
|
@@ -2206,7 +2212,7 @@ function Xt() {
|
|
|
2206
2212
|
className: h.dontSetMe,
|
|
2207
2213
|
style: h.dontSetMe,
|
|
2208
2214
|
transform: h.dontSetMe
|
|
2209
|
-
}), p(
|
|
2215
|
+
}), p(b, "defaultProps", {
|
|
2210
2216
|
...D.default.defaultProps,
|
|
2211
2217
|
axis: "both",
|
|
2212
2218
|
bounds: !1,
|
|
@@ -2250,20 +2256,20 @@ const Zt = /* @__PURE__ */ At(Gt), Jt = se((e, i) => {
|
|
|
2250
2256
|
boxShadow: "rgba(0, 0, 0, 0.5) 7px 7px 10px 0px"
|
|
2251
2257
|
},
|
|
2252
2258
|
...e.style || {}
|
|
2253
|
-
},
|
|
2259
|
+
}, s = e.testId || "not-set", r = e.className || "panel", c = vt(null);
|
|
2254
2260
|
return (
|
|
2255
2261
|
// 3. Pass the internal ref to the Draggable component via 'nodeRef'
|
|
2256
2262
|
/* @__PURE__ */ n(
|
|
2257
2263
|
Zt,
|
|
2258
2264
|
{
|
|
2259
2265
|
nodeRef: c,
|
|
2260
|
-
"data-testid":
|
|
2266
|
+
"data-testid": s,
|
|
2261
2267
|
axis: "both",
|
|
2262
2268
|
handle: ".handle",
|
|
2263
|
-
onStart: (
|
|
2269
|
+
onStart: (v, m) => {
|
|
2264
2270
|
e.onDraggingChange?.(!0);
|
|
2265
2271
|
},
|
|
2266
|
-
onStop: (
|
|
2272
|
+
onStop: (v, m) => {
|
|
2267
2273
|
setTimeout(() => {
|
|
2268
2274
|
e.onDraggingChange?.(!1);
|
|
2269
2275
|
}, 100);
|
|
@@ -2298,22 +2304,22 @@ function Mn({ children: e, addCssClasses: i }) {
|
|
|
2298
2304
|
}
|
|
2299
2305
|
const Pn = (e) => {
|
|
2300
2306
|
console.warn("showToast TODO", e);
|
|
2301
|
-
}, Qt = (e) => e < 0.8 ? 1 : e <= 1 ? 0 : e > 1 ? -1 : 0,
|
|
2307
|
+
}, Qt = (e) => e < 0.8 ? 1 : e <= 1 ? 0 : e > 1 ? -1 : 0, $n = se((e, i) => {
|
|
2302
2308
|
let t = pt(Number(e.zoomScale || 0));
|
|
2303
|
-
const o = e.responsiveGrid || !1,
|
|
2309
|
+
const o = e.responsiveGrid || !1, s = e.isEditing || !1, r = {
|
|
2304
2310
|
"--bwj-dashboard-transform-scale": t,
|
|
2305
2311
|
"--bwj-dashboard-add-cols": Qt(t)
|
|
2306
2312
|
}, c = G(
|
|
2307
2313
|
"dashboard-main-grid w-full",
|
|
2308
|
-
|
|
2314
|
+
s ? "editing" : "",
|
|
2309
2315
|
o ? "responsive-grid" : "",
|
|
2310
|
-
`border border-dashed ${
|
|
2316
|
+
`border border-dashed ${s ? "border-primary border-opacity-50" : "border-transparent"}`
|
|
2311
2317
|
);
|
|
2312
2318
|
return /* @__PURE__ */ n("div", { className: c, style: r, children: e.children });
|
|
2313
2319
|
}), Me = "size-5", en = (e, i) => {
|
|
2314
2320
|
const t = e.hideTitle && !e.isEditing, o = e.noBorder;
|
|
2315
|
-
let
|
|
2316
|
-
o ?
|
|
2321
|
+
let s = `dashboard-widget ${e.isEditing ? "editing" : ""} border border-solid`;
|
|
2322
|
+
o ? s = `${s} border-transparent border-opacity-0` : (e.borderCssClasses || "").trim().length > 0 ? s = `${s} ${e.borderCssClasses}` : s = `${s} border-card-invert border-opacity-20`, e.noShadow && (s = `${s} no-shadow`), e.noPadding && (s = `${s} no-padding p-0`), (e.backgroundCssClasses || "").trim().length > 0 ? s = `${s} ${e.backgroundCssClasses}` : s = `${s} bg-card content-card`, ["large", "xlarge"].indexOf(e.size || "") > -1 && (s = `${s} ${e.size}-widget`);
|
|
2317
2323
|
const r = () => {
|
|
2318
2324
|
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey, e.parentWidgetKey);
|
|
2319
2325
|
}, c = (D) => {
|
|
@@ -2323,18 +2329,18 @@ const Pn = (e) => {
|
|
|
2323
2329
|
t ? "hidden" : "flex items-center justify-between border-b border-solid border-card-invert",
|
|
2324
2330
|
t ? "border-opacity-0" : "border-opacity-20"
|
|
2325
2331
|
);
|
|
2326
|
-
return /* @__PURE__ */
|
|
2327
|
-
/* @__PURE__ */
|
|
2328
|
-
/* @__PURE__ */
|
|
2329
|
-
/* @__PURE__ */
|
|
2332
|
+
return /* @__PURE__ */ $("div", { className: s, children: [
|
|
2333
|
+
/* @__PURE__ */ $("div", { className: h, children: [
|
|
2334
|
+
/* @__PURE__ */ $("div", { className: "widget-title-wrapper w-full flex flex-row gap-2 items-center justify-between", children: [
|
|
2335
|
+
/* @__PURE__ */ $("h2", { className: "widget-title", children: [
|
|
2330
2336
|
e.title,
|
|
2331
2337
|
" "
|
|
2332
2338
|
] }),
|
|
2333
2339
|
/* @__PURE__ */ n("div", {})
|
|
2334
2340
|
] }),
|
|
2335
|
-
/* @__PURE__ */ n("div", { "data-testid": "collapse-and-other-actions", children: /* @__PURE__ */
|
|
2341
|
+
/* @__PURE__ */ n("div", { "data-testid": "collapse-and-other-actions", children: /* @__PURE__ */ $("div", { className: "actions-inner", children: [
|
|
2336
2342
|
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n("span", { className: "hidden", children: "Widget" }) }),
|
|
2337
|
-
/* @__PURE__ */
|
|
2343
|
+
/* @__PURE__ */ $("div", { className: "actions-buttons-container", children: [
|
|
2338
2344
|
/* @__PURE__ */ n(
|
|
2339
2345
|
J,
|
|
2340
2346
|
{
|
|
@@ -2382,11 +2388,11 @@ const Pn = (e) => {
|
|
|
2382
2388
|
/* @__PURE__ */ n("div", { className: "widget-inner", children: e.children })
|
|
2383
2389
|
] });
|
|
2384
2390
|
}, tt = se(en), tn = (e, i) => {
|
|
2385
|
-
const t = (r) => r.replace(/[^0-9.]/g, ""), o = t(e).split(".").map(Number),
|
|
2386
|
-
return !(o[0] !==
|
|
2391
|
+
const t = (r) => r.replace(/[^0-9.]/g, ""), o = t(e).split(".").map(Number), s = t(i).split(".").map(Number);
|
|
2392
|
+
return !(o[0] !== s[0] || o[1] < s[1]);
|
|
2387
2393
|
};
|
|
2388
2394
|
function nn(e) {
|
|
2389
|
-
return /* @__PURE__ */ n("div", { className: "dashboard-widget", children: /* @__PURE__ */
|
|
2395
|
+
return /* @__PURE__ */ n("div", { className: "dashboard-widget", children: /* @__PURE__ */ $("div", { className: "absolute inset-0 bg-black flex flex-col items-center justify-center text-center", children: [
|
|
2390
2396
|
/* @__PURE__ */ n("div", { className: "w-full absolute opacity-100 text-primary", children: e.title }),
|
|
2391
2397
|
/* @__PURE__ */ n("div", { className: "animate-ping rounded-full h-32 w-32 border-8 border-white" })
|
|
2392
2398
|
] }) });
|
|
@@ -2396,70 +2402,70 @@ function rn({
|
|
|
2396
2402
|
maxIndex: i,
|
|
2397
2403
|
widgetKey: t,
|
|
2398
2404
|
parentWidgetKey: o,
|
|
2399
|
-
targetContainerKey:
|
|
2405
|
+
targetContainerKey: s,
|
|
2400
2406
|
childWidgetsConfig: r,
|
|
2401
2407
|
widgetCatalog: c,
|
|
2402
2408
|
isEditing: h,
|
|
2403
2409
|
// for additional props passed to all widget from the dashboard through the DynamicWidgetLoader:
|
|
2404
2410
|
extraProps: D,
|
|
2405
|
-
onRemoveClick:
|
|
2406
|
-
onMoveClick:
|
|
2407
|
-
selectContainer:
|
|
2411
|
+
onRemoveClick: v,
|
|
2412
|
+
onMoveClick: m,
|
|
2413
|
+
selectContainer: d
|
|
2408
2414
|
}) {
|
|
2409
2415
|
const y = `${t}`.split("_"), p = y.length > 1, T = p ? y[0] : t, g = c.get(T);
|
|
2410
2416
|
if (!g)
|
|
2411
|
-
return /* @__PURE__ */ n("div", { className: "flex", children: /* @__PURE__ */
|
|
2417
|
+
return /* @__PURE__ */ n("div", { className: "flex", children: /* @__PURE__ */ $("p", { children: [
|
|
2412
2418
|
"Widget not found in catalog: ",
|
|
2413
2419
|
T
|
|
2414
2420
|
] }) });
|
|
2415
|
-
let
|
|
2416
|
-
const N = !!g.isContainer,
|
|
2421
|
+
let b = null, C = !1;
|
|
2422
|
+
const N = !!g.isContainer, w = p ? nt(t) : "", S = N ? (r || []).filter((a) => a.parentWidgetKey === t) : [], l = {
|
|
2417
2423
|
index: e,
|
|
2418
2424
|
maxIndex: i,
|
|
2419
2425
|
widgetKey: t,
|
|
2420
2426
|
parentWidgetKey: o,
|
|
2421
2427
|
isEditing: h,
|
|
2422
2428
|
extraProps: D,
|
|
2423
|
-
title: p ?
|
|
2424
|
-
onRemoveClick:
|
|
2425
|
-
onMoveClick:
|
|
2429
|
+
title: p ? w : g.title,
|
|
2430
|
+
onRemoveClick: v,
|
|
2431
|
+
onMoveClick: m
|
|
2426
2432
|
};
|
|
2427
|
-
if (g.component ? (
|
|
2433
|
+
if (g.component ? (b = g.component, C = !1) : g.loader && (C = !0, b = rt(() => {
|
|
2428
2434
|
if (!g) return null;
|
|
2429
|
-
const
|
|
2430
|
-
if (
|
|
2431
|
-
const _ =
|
|
2432
|
-
if (!tn(
|
|
2435
|
+
const a = typeof __HOST_REACT_VERSION__ < "u" ? __HOST_REACT_VERSION__ : "19.2.3", f = g.meta?.externalDependencies || [], u = f.find((_) => _.startsWith("react@"));
|
|
2436
|
+
if (u) {
|
|
2437
|
+
const _ = u.split("@")[1];
|
|
2438
|
+
if (!tn(a, _))
|
|
2433
2439
|
return be.lazy(async () => ({
|
|
2434
|
-
default: () => /* @__PURE__ */ n(tt, { ...l, children: /* @__PURE__ */
|
|
2435
|
-
/* @__PURE__ */
|
|
2440
|
+
default: () => /* @__PURE__ */ n(tt, { ...l, children: /* @__PURE__ */ $("div", { className: "p-4 border border-dashed border-danger", children: [
|
|
2441
|
+
/* @__PURE__ */ $("p", { className: "font-bold", children: [
|
|
2436
2442
|
'Failed to load "',
|
|
2437
2443
|
t,
|
|
2438
2444
|
'"'
|
|
2439
2445
|
] }),
|
|
2440
|
-
/* @__PURE__ */
|
|
2446
|
+
/* @__PURE__ */ $("p", { className: "text-xs italic", children: [
|
|
2441
2447
|
"The remote plugin is unavailable or incompatible.",
|
|
2442
|
-
/* @__PURE__ */
|
|
2448
|
+
/* @__PURE__ */ $("p", { className: "font-bold text-sm", children: [
|
|
2443
2449
|
"Version Mismatch: ",
|
|
2444
2450
|
t
|
|
2445
2451
|
] }),
|
|
2446
|
-
/* @__PURE__ */
|
|
2452
|
+
/* @__PURE__ */ $("p", { className: "text-xs", children: [
|
|
2447
2453
|
"Widget requires ",
|
|
2448
|
-
/* @__PURE__ */
|
|
2454
|
+
/* @__PURE__ */ $("strong", { children: [
|
|
2449
2455
|
"React ",
|
|
2450
2456
|
_
|
|
2451
2457
|
] }),
|
|
2452
2458
|
". Host is running",
|
|
2453
2459
|
" ",
|
|
2454
|
-
/* @__PURE__ */ n("strong", { children:
|
|
2460
|
+
/* @__PURE__ */ n("strong", { children: a }),
|
|
2455
2461
|
"."
|
|
2456
2462
|
] })
|
|
2457
2463
|
] }),
|
|
2458
|
-
/* @__PURE__ */
|
|
2464
|
+
/* @__PURE__ */ $("div", { className: "flex flex-col mt-3", children: [
|
|
2459
2465
|
/* @__PURE__ */ n("h5", { children: "Externals:" }),
|
|
2460
|
-
/* @__PURE__ */ n("dl", { className: "ml-2 flex flex-col text-xs", children:
|
|
2466
|
+
/* @__PURE__ */ n("dl", { className: "ml-2 flex flex-col text-xs", children: f.map((R, z) => /* @__PURE__ */ $("dd", { children: [
|
|
2461
2467
|
"- ",
|
|
2462
|
-
|
|
2468
|
+
R
|
|
2463
2469
|
] }, z)) })
|
|
2464
2470
|
] })
|
|
2465
2471
|
] }) })
|
|
@@ -2471,10 +2477,10 @@ function rn({
|
|
|
2471
2477
|
const _ = async () => {
|
|
2472
2478
|
try {
|
|
2473
2479
|
return await g.loader();
|
|
2474
|
-
} catch (
|
|
2475
|
-
return console.error(`CDN Load Failure for ${t}:`,
|
|
2476
|
-
default: () => /* @__PURE__ */ n(tt, { ...l, children: /* @__PURE__ */
|
|
2477
|
-
/* @__PURE__ */
|
|
2480
|
+
} catch (R) {
|
|
2481
|
+
return console.error(`CDN Load Failure for ${t}:`, R), {
|
|
2482
|
+
default: () => /* @__PURE__ */ n(tt, { ...l, children: /* @__PURE__ */ $("div", { className: "p-4 border border-dashed border-danger", children: [
|
|
2483
|
+
/* @__PURE__ */ $("p", { className: "font-bold", children: [
|
|
2478
2484
|
'Failed to load "',
|
|
2479
2485
|
t,
|
|
2480
2486
|
'"'
|
|
@@ -2488,48 +2494,48 @@ function rn({
|
|
|
2488
2494
|
return be.lazy(_);
|
|
2489
2495
|
}
|
|
2490
2496
|
return null;
|
|
2491
|
-
}, [g, t])), !
|
|
2492
|
-
return /* @__PURE__ */ n("div", { className: "flex", children: /* @__PURE__ */
|
|
2497
|
+
}, [g, t])), !b)
|
|
2498
|
+
return /* @__PURE__ */ n("div", { className: "flex", children: /* @__PURE__ */ $("p", { children: [
|
|
2493
2499
|
"Widget definition incomplete: ",
|
|
2494
2500
|
T
|
|
2495
2501
|
] }) });
|
|
2496
2502
|
const M = N ? {
|
|
2497
|
-
highlight:
|
|
2498
|
-
selectContainer:
|
|
2503
|
+
highlight: s === t,
|
|
2504
|
+
selectContainer: d,
|
|
2499
2505
|
// The children prop is the recursive call back to DynamicWidgetLoader
|
|
2500
|
-
children:
|
|
2506
|
+
children: S.map((a, f) => /* @__PURE__ */ n(
|
|
2501
2507
|
rn,
|
|
2502
2508
|
{
|
|
2503
|
-
index:
|
|
2504
|
-
maxIndex:
|
|
2505
|
-
widgetKey:
|
|
2506
|
-
parentWidgetKey:
|
|
2509
|
+
index: f,
|
|
2510
|
+
maxIndex: S.length - 1,
|
|
2511
|
+
widgetKey: a.widgetKey,
|
|
2512
|
+
parentWidgetKey: a.parentWidgetKey,
|
|
2507
2513
|
widgetCatalog: c,
|
|
2508
2514
|
isEditing: h,
|
|
2509
2515
|
extraProps: D,
|
|
2510
|
-
onRemoveClick:
|
|
2511
|
-
onMoveClick:
|
|
2516
|
+
onRemoveClick: v,
|
|
2517
|
+
onMoveClick: m
|
|
2512
2518
|
},
|
|
2513
|
-
`${
|
|
2519
|
+
`${a.widgetKey}_${f}`
|
|
2514
2520
|
))
|
|
2515
2521
|
} : {};
|
|
2516
|
-
return
|
|
2522
|
+
return C ? /* @__PURE__ */ n(xt, { fallback: /* @__PURE__ */ n(nn, { title: `Loading ${g.title}` }), children: /* @__PURE__ */ n(b, { ...l, ...M }) }) : /* @__PURE__ */ n(b, { ...l, ...M });
|
|
2517
2523
|
}
|
|
2518
2524
|
const ye = "size-5";
|
|
2519
|
-
function
|
|
2520
|
-
const i = e.highlight || !1, t = e.direction || "column", o = e.children.length > 0,
|
|
2521
|
-
let h = i ? "border-transparent" :
|
|
2525
|
+
function We(e) {
|
|
2526
|
+
const i = e.highlight || !1, t = e.direction || "column", o = e.children.length > 0, s = e.isEditing || !1;
|
|
2527
|
+
let h = i ? "border-transparent" : s && !o ? "border-card-invert" : "border-transparent";
|
|
2522
2528
|
const D = ["large", "xlarge"].includes(e.size || "");
|
|
2523
|
-
let
|
|
2524
|
-
["large", "xlarge"].indexOf(e.size || "") > -1 && (
|
|
2525
|
-
let
|
|
2526
|
-
t === "row" && !o ?
|
|
2527
|
-
let
|
|
2529
|
+
let v = "";
|
|
2530
|
+
["large", "xlarge"].indexOf(e.size || "") > -1 && (v = `${e.size}-widget`);
|
|
2531
|
+
let m = "";
|
|
2532
|
+
t === "row" && !o ? m = "min-h-48" : t === "column" && !o && (m = "min-h-96");
|
|
2533
|
+
let d = G(
|
|
2528
2534
|
"dashboard-widget-container relative ",
|
|
2529
2535
|
o ? "" : "has-no-children",
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2536
|
+
s ? "editing" : "",
|
|
2537
|
+
m,
|
|
2538
|
+
v,
|
|
2533
2539
|
D ? "widget-container-grid" : "widget-container-flex",
|
|
2534
2540
|
`direction-${t}`,
|
|
2535
2541
|
`border ${h}`,
|
|
@@ -2537,13 +2543,13 @@ function Oe(e) {
|
|
|
2537
2543
|
), y = `widget-container-header direction-${t} flex items-center border-1 ${h}`;
|
|
2538
2544
|
const p = () => {
|
|
2539
2545
|
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey);
|
|
2540
|
-
}, T = (
|
|
2541
|
-
e.onMoveClick && e.widgetKey && e.onMoveClick(
|
|
2546
|
+
}, T = (b) => {
|
|
2547
|
+
e.onMoveClick && e.widgetKey && e.onMoveClick(b, e.widgetKey, e.parentWidgetKey);
|
|
2542
2548
|
}, g = () => {
|
|
2543
2549
|
e.selectContainer && e.widgetKey && e.selectContainer(e.widgetKey);
|
|
2544
2550
|
};
|
|
2545
|
-
return /* @__PURE__ */
|
|
2546
|
-
/* @__PURE__ */
|
|
2551
|
+
return /* @__PURE__ */ $("div", { "data-testid": `container_${e.widgetKey}`, className: d, children: [
|
|
2552
|
+
/* @__PURE__ */ $("div", { className: y, children: [
|
|
2547
2553
|
/* @__PURE__ */ n(
|
|
2548
2554
|
"div",
|
|
2549
2555
|
{
|
|
@@ -2552,7 +2558,7 @@ function Oe(e) {
|
|
|
2552
2558
|
children: /* @__PURE__ */ n("span", { className: "text-sm font-semibold capitalize", children: e.title })
|
|
2553
2559
|
}
|
|
2554
2560
|
),
|
|
2555
|
-
/* @__PURE__ */ n("div", { "data-testid": "collapse-and-other-actions", children: /* @__PURE__ */ n("div", { className: "actions-inner", children: /* @__PURE__ */
|
|
2561
|
+
/* @__PURE__ */ n("div", { "data-testid": "collapse-and-other-actions", children: /* @__PURE__ */ n("div", { className: "actions-inner", children: /* @__PURE__ */ $("div", { className: "actions-buttons-container", children: [
|
|
2556
2562
|
/* @__PURE__ */ n(
|
|
2557
2563
|
J,
|
|
2558
2564
|
{
|
|
@@ -2565,7 +2571,7 @@ function Oe(e) {
|
|
|
2565
2571
|
},
|
|
2566
2572
|
onClick: g,
|
|
2567
2573
|
children: /* @__PURE__ */ n(
|
|
2568
|
-
|
|
2574
|
+
Wt,
|
|
2569
2575
|
{
|
|
2570
2576
|
className: `${ye} ${i ? "text-success" : "text-disabled"}`
|
|
2571
2577
|
}
|
|
@@ -2618,17 +2624,17 @@ function Oe(e) {
|
|
|
2618
2624
|
/* @__PURE__ */ n("div", { "data-testid": `childrenwrapper_${e.widgetKey}`, className: "widget-container-inner", children: e.children })
|
|
2619
2625
|
] });
|
|
2620
2626
|
}
|
|
2621
|
-
function
|
|
2627
|
+
function Rn(e) {
|
|
2622
2628
|
const { direction: i, ...t } = e;
|
|
2623
|
-
return /* @__PURE__ */ n(
|
|
2629
|
+
return /* @__PURE__ */ n(We, { direction: "column", ...t });
|
|
2624
2630
|
}
|
|
2625
2631
|
function In(e) {
|
|
2626
2632
|
const { size: i, ...t } = e;
|
|
2627
|
-
return /* @__PURE__ */ n(
|
|
2633
|
+
return /* @__PURE__ */ n(We, { size: "large", ...t });
|
|
2628
2634
|
}
|
|
2629
|
-
function
|
|
2635
|
+
function Wn(e) {
|
|
2630
2636
|
const { direction: i, ...t } = e;
|
|
2631
|
-
return /* @__PURE__ */ n(
|
|
2637
|
+
return /* @__PURE__ */ n(We, { direction: "row", ...t });
|
|
2632
2638
|
}
|
|
2633
2639
|
function Pe({
|
|
2634
2640
|
// widgetKey,
|
|
@@ -2636,25 +2642,25 @@ function Pe({
|
|
|
2636
2642
|
alreadyAdded: i,
|
|
2637
2643
|
addWidget: t
|
|
2638
2644
|
}) {
|
|
2639
|
-
const [o,
|
|
2645
|
+
const [o, s] = ae(!1), r = e.icon || Ot, c = e.name || "Unknown", h = e.description || "---", v = (e.noDuplicatedWidgets || !1) && i, m = G(`
|
|
2640
2646
|
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
2641
|
-
${
|
|
2647
|
+
${v ? "border-disabled fill-disabled text-disabled" : "cursor-pointer border-primary fill-danger hover:fill-primary content-primary hover:brightness-110"}
|
|
2642
2648
|
`);
|
|
2643
|
-
return /* @__PURE__ */
|
|
2644
|
-
|
|
2649
|
+
return /* @__PURE__ */ $("div", { className: m, style: { width: "calc(100% - 1rem)" }, onClick: () => {
|
|
2650
|
+
v || t();
|
|
2645
2651
|
}, children: [
|
|
2646
2652
|
/* @__PURE__ */ n(r, { className: "" }),
|
|
2647
|
-
/* @__PURE__ */
|
|
2648
|
-
/* @__PURE__ */
|
|
2653
|
+
/* @__PURE__ */ $("div", { className: "w-full", children: [
|
|
2654
|
+
/* @__PURE__ */ $("div", { className: "flex flex-row items-center gap-2 justify-between", children: [
|
|
2649
2655
|
/* @__PURE__ */ n("span", { className: "font-bold", children: c }),
|
|
2650
|
-
/* @__PURE__ */ n("div", { className: "text-xs", children:
|
|
2656
|
+
/* @__PURE__ */ n("div", { className: "text-xs", children: v ? "(Added)" : "" })
|
|
2651
2657
|
] }),
|
|
2652
|
-
/* @__PURE__ */
|
|
2658
|
+
/* @__PURE__ */ $("div", { className: "flex flex-col text-xs", children: [
|
|
2653
2659
|
/* @__PURE__ */ n("div", { children: h }),
|
|
2654
2660
|
/* @__PURE__ */ n("div", { className: "mt-3 cursor-pointer", onClick: (p) => {
|
|
2655
|
-
p.stopPropagation(), p.preventDefault(),
|
|
2661
|
+
p.stopPropagation(), p.preventDefault(), s(!o);
|
|
2656
2662
|
}, children: "Externals:" }),
|
|
2657
|
-
o && /* @__PURE__ */ n("dl", { className: "ml-2 flex flex-col text-xs", children: e.externalDependencies.map((p, T) => /* @__PURE__ */
|
|
2663
|
+
o && /* @__PURE__ */ n("dl", { className: "ml-2 flex flex-col text-xs", children: e.externalDependencies.map((p, T) => /* @__PURE__ */ $("dd", { children: [
|
|
2658
2664
|
"- ",
|
|
2659
2665
|
p
|
|
2660
2666
|
] }, T)) })
|
|
@@ -2663,17 +2669,17 @@ function Pe({
|
|
|
2663
2669
|
] });
|
|
2664
2670
|
}
|
|
2665
2671
|
function on({ item: e, onSettingItemChanged: i }) {
|
|
2666
|
-
const t = e.name || "Unknown", o = e.description || "---",
|
|
2672
|
+
const t = e.name || "Unknown", o = e.description || "---", s = G(`
|
|
2667
2673
|
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
2668
2674
|
`), r = (h) => {
|
|
2669
2675
|
const D = h.key;
|
|
2670
2676
|
if (["ArrowUp", "ArrowDown"].includes(D)) {
|
|
2671
2677
|
h.preventDefault();
|
|
2672
|
-
const
|
|
2678
|
+
const v = bt.incrementOrDecrementValue(
|
|
2673
2679
|
e,
|
|
2674
2680
|
D === "ArrowUp" ? 1 : -1
|
|
2675
2681
|
);
|
|
2676
|
-
i(
|
|
2682
|
+
i(v);
|
|
2677
2683
|
}
|
|
2678
2684
|
}, c = (h) => {
|
|
2679
2685
|
i({
|
|
@@ -2681,10 +2687,10 @@ function on({ item: e, onSettingItemChanged: i }) {
|
|
|
2681
2687
|
value: h.target.value || ""
|
|
2682
2688
|
});
|
|
2683
2689
|
};
|
|
2684
|
-
return /* @__PURE__ */ n("div", { className:
|
|
2690
|
+
return /* @__PURE__ */ n("div", { className: s, style: { width: "calc(100% - 1rem)" }, children: /* @__PURE__ */ $("div", { className: "w-full", children: [
|
|
2685
2691
|
/* @__PURE__ */ n("div", { className: "flex flex-row items-center gap-2 justify-between", children: /* @__PURE__ */ n("span", { className: "font-bold", children: t }) }),
|
|
2686
2692
|
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2 text-xs", children: /* @__PURE__ */ n("div", { children: o }) }),
|
|
2687
|
-
/* @__PURE__ */
|
|
2693
|
+
/* @__PURE__ */ $("div", { children: [
|
|
2688
2694
|
"Value:",
|
|
2689
2695
|
/* @__PURE__ */ n(
|
|
2690
2696
|
lt,
|
|
@@ -2700,45 +2706,45 @@ function on({ item: e, onSettingItemChanged: i }) {
|
|
|
2700
2706
|
] })
|
|
2701
2707
|
] }) });
|
|
2702
2708
|
}
|
|
2703
|
-
const
|
|
2709
|
+
const $e = (e, i) => [
|
|
2704
2710
|
...i.widgets.filter((o) => o.indexOf("Container") === -1),
|
|
2705
2711
|
...i.childWidgetsConfig.map((o) => o.widgetKey)
|
|
2706
2712
|
].includes(e);
|
|
2707
|
-
function
|
|
2713
|
+
function On(e) {
|
|
2708
2714
|
const {
|
|
2709
2715
|
currentDashboardConfig: i,
|
|
2710
2716
|
undoStatus: t,
|
|
2711
2717
|
addContainer: o,
|
|
2712
|
-
onResetToDefaultDashboardClick:
|
|
2718
|
+
onResetToDefaultDashboardClick: s,
|
|
2713
2719
|
onUndoOrRedo: r,
|
|
2714
2720
|
onDoneClick: c
|
|
2715
|
-
} = e, [h, D] = ae("Editing"), [
|
|
2716
|
-
widgetKey:
|
|
2717
|
-
metaData: yt(
|
|
2718
|
-
})), g = !!e.targetContainerKey,
|
|
2719
|
-
y(
|
|
2720
|
-
},
|
|
2721
|
-
const _ =
|
|
2722
|
-
return _.length < 1 ? !0 :
|
|
2723
|
-
}, N = (
|
|
2724
|
-
const _ =
|
|
2725
|
-
return _.length < 1 ? !0 :
|
|
2726
|
-
},
|
|
2721
|
+
} = e, [h, D] = ae("Editing"), [v, m] = ae(0), [d, y] = ae(""), T = Array.from(e.widgetsCatalog.keys()).map((u) => ({
|
|
2722
|
+
widgetKey: u,
|
|
2723
|
+
metaData: yt(u, e.widgetsCatalog)
|
|
2724
|
+
})), g = !!e.targetContainerKey, b = (u) => {
|
|
2725
|
+
y(u.target.value);
|
|
2726
|
+
}, C = (u) => {
|
|
2727
|
+
const _ = d.trim().toLowerCase();
|
|
2728
|
+
return _.length < 1 ? !0 : u.name.trim().toLowerCase().includes(_) || u.description.toLowerCase().includes(_);
|
|
2729
|
+
}, N = (u) => {
|
|
2730
|
+
const _ = d.trim().toLowerCase();
|
|
2731
|
+
return _.length < 1 ? !0 : u.name.trim().toLowerCase().includes(_) || u.description.toLowerCase().includes(_);
|
|
2732
|
+
}, w = (u) => G(
|
|
2727
2733
|
"px-4 py-2 font-medium cursor-pointer border-b-2 border-transparent hover:border-primary focus:outline-none",
|
|
2728
|
-
|
|
2729
|
-
),
|
|
2730
|
-
g ? e.addWidget(
|
|
2731
|
-
}, l = (
|
|
2732
|
-
const _ = (e.currentDashboardConfig.cssSettings || []).map((
|
|
2734
|
+
u === v ? "text-primary border-primary" : ""
|
|
2735
|
+
), S = (u) => {
|
|
2736
|
+
g ? e.addWidget(u, e.targetContainerKey) : e.addWidget(u);
|
|
2737
|
+
}, l = (u) => {
|
|
2738
|
+
const _ = (e.currentDashboardConfig.cssSettings || []).map((R) => R.key === u.key ? u : R);
|
|
2733
2739
|
e.onSettingItemsUpdated(_);
|
|
2734
|
-
}, [M,
|
|
2735
|
-
|
|
2740
|
+
}, [M, a] = ae(!1), f = (u) => {
|
|
2741
|
+
a(u);
|
|
2736
2742
|
};
|
|
2737
2743
|
return Ct(() => {
|
|
2738
2744
|
if (e.targetContainerKey) {
|
|
2739
|
-
|
|
2740
|
-
const
|
|
2741
|
-
D(`Editing ${
|
|
2745
|
+
m(0);
|
|
2746
|
+
const u = nt(e.targetContainerKey);
|
|
2747
|
+
D(`Editing ${u}`);
|
|
2742
2748
|
} else
|
|
2743
2749
|
D("Editing Dashboard");
|
|
2744
2750
|
}, [e.targetContainerKey]), /* @__PURE__ */ n(
|
|
@@ -2753,11 +2759,11 @@ function Wn(e) {
|
|
|
2753
2759
|
minHeight: "360px",
|
|
2754
2760
|
backdropFilter: "blur(8px)"
|
|
2755
2761
|
},
|
|
2756
|
-
onDraggingChange:
|
|
2757
|
-
children: /* @__PURE__ */
|
|
2758
|
-
/* @__PURE__ */
|
|
2759
|
-
/* @__PURE__ */
|
|
2760
|
-
M ? /* @__PURE__ */ n(It, { className: "size-5" }) : /* @__PURE__ */ n(
|
|
2762
|
+
onDraggingChange: f,
|
|
2763
|
+
children: /* @__PURE__ */ $("div", { className: "flex flex-col gap-2 p-2", children: [
|
|
2764
|
+
/* @__PURE__ */ $("div", { className: "flex flex-row gap-2 justify-between", children: [
|
|
2765
|
+
/* @__PURE__ */ $("div", { className: "handle flex-1 flex gap-2 w-full hover:text-primary cursor-grab", children: [
|
|
2766
|
+
M ? /* @__PURE__ */ n(It, { className: "size-5" }) : /* @__PURE__ */ n(Rt, { className: "size-5" }),
|
|
2761
2767
|
/* @__PURE__ */ n(
|
|
2762
2768
|
"h2",
|
|
2763
2769
|
{
|
|
@@ -2767,7 +2773,7 @@ function Wn(e) {
|
|
|
2767
2773
|
}
|
|
2768
2774
|
)
|
|
2769
2775
|
] }),
|
|
2770
|
-
/* @__PURE__ */
|
|
2776
|
+
/* @__PURE__ */ $("div", { className: "flex flex-row gap-2 items-center", children: [
|
|
2771
2777
|
/* @__PURE__ */ n(
|
|
2772
2778
|
J,
|
|
2773
2779
|
{
|
|
@@ -2793,7 +2799,7 @@ function Wn(e) {
|
|
|
2793
2799
|
},
|
|
2794
2800
|
disabled: t.isRedoDisabled,
|
|
2795
2801
|
onClick: () => r("Redo"),
|
|
2796
|
-
children: /* @__PURE__ */ n(
|
|
2802
|
+
children: /* @__PURE__ */ n($t, { className: "size-5" })
|
|
2797
2803
|
}
|
|
2798
2804
|
),
|
|
2799
2805
|
/* @__PURE__ */ n(
|
|
@@ -2805,17 +2811,17 @@ function Wn(e) {
|
|
|
2805
2811
|
placement: "bottom",
|
|
2806
2812
|
title: "Reset this dashboard to the default configuration"
|
|
2807
2813
|
},
|
|
2808
|
-
onClick:
|
|
2814
|
+
onClick: s,
|
|
2809
2815
|
children: /* @__PURE__ */ n(Mt, { className: "size-5" })
|
|
2810
2816
|
}
|
|
2811
2817
|
)
|
|
2812
2818
|
] })
|
|
2813
2819
|
] }),
|
|
2814
|
-
/* @__PURE__ */
|
|
2815
|
-
/* @__PURE__ */ n("button", { onClick: () =>
|
|
2816
|
-
/* @__PURE__ */ n("button", { onClick: () =>
|
|
2817
|
-
!g && /* @__PURE__ */ n("button", { onClick: () =>
|
|
2818
|
-
!g && /* @__PURE__ */ n("button", { onClick: () =>
|
|
2820
|
+
/* @__PURE__ */ $("div", { className: "flex border-b border-gray-200", children: [
|
|
2821
|
+
/* @__PURE__ */ n("button", { onClick: () => m(0), className: w(0), children: "Widgets" }),
|
|
2822
|
+
/* @__PURE__ */ n("button", { onClick: () => m(1), className: w(1), children: "Charts" }),
|
|
2823
|
+
!g && /* @__PURE__ */ n("button", { onClick: () => m(2), className: w(2), children: "Containers" }),
|
|
2824
|
+
!g && /* @__PURE__ */ n("button", { onClick: () => m(3), className: w(3), children: /* @__PURE__ */ n(_t, {}) })
|
|
2819
2825
|
] }),
|
|
2820
2826
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between gap-1 w-full", children: /* @__PURE__ */ n(
|
|
2821
2827
|
lt,
|
|
@@ -2823,11 +2829,11 @@ function Wn(e) {
|
|
|
2823
2829
|
label: "Filter...",
|
|
2824
2830
|
size: "small",
|
|
2825
2831
|
className: "w-full",
|
|
2826
|
-
value:
|
|
2827
|
-
onChange:
|
|
2832
|
+
value: d,
|
|
2833
|
+
onChange: b
|
|
2828
2834
|
}
|
|
2829
2835
|
) }),
|
|
2830
|
-
/* @__PURE__ */
|
|
2836
|
+
/* @__PURE__ */ $(
|
|
2831
2837
|
"div",
|
|
2832
2838
|
{
|
|
2833
2839
|
className: "flex flex-col gap-2 overflow-x-hidden overflow-y-auto",
|
|
@@ -2835,47 +2841,47 @@ function Wn(e) {
|
|
|
2835
2841
|
maxHeight: "360px"
|
|
2836
2842
|
},
|
|
2837
2843
|
children: [
|
|
2838
|
-
|
|
2839
|
-
(
|
|
2840
|
-
).map((
|
|
2844
|
+
v === 0 && T.filter(
|
|
2845
|
+
(u) => u.metaData.categories.includes("Widget") && C(u.metaData)
|
|
2846
|
+
).map((u) => /* @__PURE__ */ n(
|
|
2841
2847
|
Pe,
|
|
2842
2848
|
{
|
|
2843
|
-
widgetKey:
|
|
2844
|
-
metaData:
|
|
2845
|
-
alreadyAdded:
|
|
2846
|
-
addWidget: () =>
|
|
2849
|
+
widgetKey: u.widgetKey,
|
|
2850
|
+
metaData: u.metaData,
|
|
2851
|
+
alreadyAdded: $e(u.widgetKey, i),
|
|
2852
|
+
addWidget: () => S(u.widgetKey)
|
|
2847
2853
|
},
|
|
2848
|
-
|
|
2854
|
+
u.widgetKey
|
|
2849
2855
|
)),
|
|
2850
|
-
|
|
2851
|
-
(
|
|
2852
|
-
).map((
|
|
2856
|
+
v === 1 && T.filter(
|
|
2857
|
+
(u) => u.metaData.categories.includes("Chart") && C(u.metaData)
|
|
2858
|
+
).map((u) => /* @__PURE__ */ n(
|
|
2853
2859
|
Pe,
|
|
2854
2860
|
{
|
|
2855
|
-
widgetKey:
|
|
2856
|
-
metaData:
|
|
2857
|
-
alreadyAdded:
|
|
2858
|
-
addWidget: () =>
|
|
2861
|
+
widgetKey: u.widgetKey,
|
|
2862
|
+
metaData: u.metaData,
|
|
2863
|
+
alreadyAdded: $e(u.widgetKey, i),
|
|
2864
|
+
addWidget: () => S(u.widgetKey)
|
|
2859
2865
|
},
|
|
2860
|
-
|
|
2866
|
+
u.widgetKey
|
|
2861
2867
|
)),
|
|
2862
|
-
!g &&
|
|
2868
|
+
!g && v === 2 && T.filter((u) => u.metaData.categories.includes("Container")).map((u) => /* @__PURE__ */ n(
|
|
2863
2869
|
Pe,
|
|
2864
2870
|
{
|
|
2865
|
-
widgetKey:
|
|
2866
|
-
metaData:
|
|
2867
|
-
alreadyAdded:
|
|
2868
|
-
addWidget: () => o(
|
|
2871
|
+
widgetKey: u.widgetKey,
|
|
2872
|
+
metaData: u.metaData,
|
|
2873
|
+
alreadyAdded: $e(u.widgetKey, i),
|
|
2874
|
+
addWidget: () => o(u.widgetKey)
|
|
2869
2875
|
},
|
|
2870
|
-
|
|
2876
|
+
u.widgetKey
|
|
2871
2877
|
)),
|
|
2872
|
-
!g &&
|
|
2878
|
+
!g && v === 3 && (i.cssSettings || []).filter(N).map((u) => /* @__PURE__ */ n(
|
|
2873
2879
|
on,
|
|
2874
2880
|
{
|
|
2875
|
-
item:
|
|
2881
|
+
item: u,
|
|
2876
2882
|
onSettingItemChanged: l
|
|
2877
2883
|
},
|
|
2878
|
-
|
|
2884
|
+
u.key
|
|
2879
2885
|
))
|
|
2880
2886
|
]
|
|
2881
2887
|
}
|
|
@@ -2899,9 +2905,9 @@ function Wn(e) {
|
|
|
2899
2905
|
export {
|
|
2900
2906
|
hn as AddIcon,
|
|
2901
2907
|
J as Button,
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2908
|
+
Ot as CircleQuestionMark,
|
|
2909
|
+
Wt as CrosshairIcon,
|
|
2910
|
+
$n as DashboardGrid,
|
|
2905
2911
|
tt as DashboardWidgetBase,
|
|
2906
2912
|
gn as DeleteIcon,
|
|
2907
2913
|
Jt as DraggablePanel,
|
|
@@ -2909,7 +2915,7 @@ export {
|
|
|
2909
2915
|
mn as EditIcon,
|
|
2910
2916
|
pn as GridIcon,
|
|
2911
2917
|
It as HandGrabIcon,
|
|
2912
|
-
|
|
2918
|
+
Rt as HandIcon,
|
|
2913
2919
|
Sn as ListItem,
|
|
2914
2920
|
Dn as ListItemLeftChild,
|
|
2915
2921
|
Tn as ListItemMiddleChild,
|
|
@@ -2918,19 +2924,19 @@ export {
|
|
|
2918
2924
|
bn as MonitorSmartphoneIcon,
|
|
2919
2925
|
it as MoveLeftIcon,
|
|
2920
2926
|
at as MoveRightIcon,
|
|
2921
|
-
|
|
2927
|
+
$t as RedoIcon,
|
|
2922
2928
|
_t as SettingsIcon,
|
|
2923
2929
|
jt as Stack,
|
|
2924
|
-
|
|
2930
|
+
B as SvgBaseWrapper,
|
|
2925
2931
|
vn as TabletSmartphoneIcon,
|
|
2926
2932
|
wn as TargetIcon,
|
|
2927
2933
|
lt as TextField,
|
|
2928
2934
|
Mt as TimerResetIcon,
|
|
2929
2935
|
Pt as UndoIcon,
|
|
2930
|
-
|
|
2936
|
+
Rn as WidgetContainerColumn,
|
|
2931
2937
|
In as WidgetContainerLarge,
|
|
2932
|
-
|
|
2933
|
-
|
|
2938
|
+
Wn as WidgetContainerRow,
|
|
2939
|
+
On as WidgetsCatalogFlyout,
|
|
2934
2940
|
_n as WrapperColumnContent,
|
|
2935
2941
|
Mn as WrapperColumnContentListItem,
|
|
2936
2942
|
st as XCircleIcon,
|