@tenorlab/react-dashboard 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -0
- package/dist/components/DashboardGrid.d.ts +2 -0
- package/dist/components/DashboardWidgetBase.d.ts +4 -0
- package/dist/components/DynamicWidgetLoader.d.ts +23 -0
- package/dist/components/WidgetContainer.d.ts +4 -0
- package/dist/components/WidgetsCatalogFlyout.d.ts +14 -0
- package/dist/components/dashboard-primitives/Buttons.d.ts +2 -0
- package/dist/components/dashboard-primitives/DraggablePanel.d.ts +10 -0
- package/dist/components/dashboard-primitives/ListItem.d.ts +14 -0
- package/dist/components/dashboard-primitives/Stack.d.ts +9 -0
- package/dist/components/dashboard-primitives/TextField.d.ts +6 -0
- package/dist/components/dashboard-primitives/color-utils.d.ts +12 -0
- package/dist/components/dashboard-primitives/css-vars-utils.d.ts +6 -0
- package/dist/components/dashboard-primitives/icons/index.d.ts +29 -0
- package/dist/components/dashboard-primitives/index.d.ts +12 -0
- package/dist/components/dashboard-primitives/interfaces.d.ts +46 -0
- package/dist/components/dashboard-primitives/parse-container-title.d.ts +2 -0
- package/dist/components/dashboard-primitives/use-distinct-css-classes.d.ts +1 -0
- package/dist/components/dashboard-settings/dashboard-settings-utils.d.ts +4 -0
- package/dist/components/dashboard-settings/dashboard-settings.d.ts +2 -0
- package/dist/components/dashboard-settings/index.d.ts +2 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/components/interfaces/core-react.interfaces.d.ts +20 -0
- package/dist/components/interfaces/core.base.d.ts +62 -0
- package/dist/components/interfaces/core.interfaces.d.ts +40 -0
- package/dist/components/interfaces/core.utils.d.ts +28 -0
- package/dist/components/interfaces/index.d.ts +7 -0
- package/dist/components/interfaces/storage-service.interfaces.d.ts +7 -0
- package/dist/components/use-dashboard-storage-service.d.ts +2 -0
- package/dist/components/use-dashboard-store.d.ts +33 -0
- package/dist/components/use-dashboard-undo-service.d.ts +13 -0
- package/dist/index.d.ts +1 -0
- package/dist/react-dashboard.es.js +3146 -0
- package/package.json +66 -0
|
@@ -0,0 +1,3146 @@
|
|
|
1
|
+
import se, { useState as ce, useCallback as ue, useMemo as it, forwardRef as le, useRef as xt, Suspense as wt, useEffect as St } from "react";
|
|
2
|
+
import { jsxs as I, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import at from "react-dom";
|
|
4
|
+
const Ct = [
|
|
5
|
+
{
|
|
6
|
+
key: "grid-gap",
|
|
7
|
+
displayName: "Gap",
|
|
8
|
+
description: "Set the gap between widgets in the dashboard grid",
|
|
9
|
+
cssProperty: "--bwj-dashboard-gap",
|
|
10
|
+
step: 0.1,
|
|
11
|
+
defaultUnit: "rem",
|
|
12
|
+
minValue: 0,
|
|
13
|
+
defaultValue: "1.25rem",
|
|
14
|
+
value: "1.25rem"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
key: "widget-width",
|
|
18
|
+
displayName: "Widget Width",
|
|
19
|
+
description: "Set the min width for the widgets",
|
|
20
|
+
cssProperty: "--bwj-widget-width",
|
|
21
|
+
step: 0.1,
|
|
22
|
+
defaultUnit: "rem",
|
|
23
|
+
minValue: 6,
|
|
24
|
+
defaultValue: "21rem",
|
|
25
|
+
value: "21rem"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
key: "widget-border-radius",
|
|
29
|
+
displayName: "Widget Border Radius",
|
|
30
|
+
description: "Set the border radius for the widgets",
|
|
31
|
+
cssProperty: "--bwj-widget-border-radius",
|
|
32
|
+
step: 0.1,
|
|
33
|
+
defaultUnit: "rem",
|
|
34
|
+
minValue: 0,
|
|
35
|
+
defaultValue: "0.33rem",
|
|
36
|
+
value: "0.33rem"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
key: "widget-inner-padding-x",
|
|
40
|
+
displayName: "Widget Horiz Padding",
|
|
41
|
+
description: "Set the horizontal padding for the widgets",
|
|
42
|
+
cssProperty: "--bwj-widget-inner-px",
|
|
43
|
+
step: 0.1,
|
|
44
|
+
defaultUnit: "rem",
|
|
45
|
+
minValue: 0,
|
|
46
|
+
defaultValue: "1.0rem",
|
|
47
|
+
value: "1.0rem"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
key: "widget-inner-padding-y",
|
|
51
|
+
displayName: "Widget Vertical Padding",
|
|
52
|
+
description: "Set the vertical padding for the widgets",
|
|
53
|
+
cssProperty: "--bwj-widget-inner-py",
|
|
54
|
+
step: 0.1,
|
|
55
|
+
defaultUnit: "rem",
|
|
56
|
+
minValue: 0,
|
|
57
|
+
defaultValue: "0.75rem",
|
|
58
|
+
value: "0.75rem"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
key: "widget-header-padding-y",
|
|
62
|
+
displayName: "Widget Header Vertical Padding",
|
|
63
|
+
description: "Set the vertical padding for the widget headers",
|
|
64
|
+
cssProperty: "--bwj-widget-header-py",
|
|
65
|
+
step: 0.1,
|
|
66
|
+
defaultUnit: "rem",
|
|
67
|
+
minValue: 0,
|
|
68
|
+
defaultValue: "1.0rem",
|
|
69
|
+
value: "1.0rem"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
key: "widget-title-font-size",
|
|
73
|
+
displayName: "Widget Title Font Size",
|
|
74
|
+
description: "Set the font size for the widget titles",
|
|
75
|
+
cssProperty: "--bwj-widget-title-size",
|
|
76
|
+
step: 0.1,
|
|
77
|
+
defaultUnit: "rem",
|
|
78
|
+
minValue: 0,
|
|
79
|
+
defaultValue: "1.0rem",
|
|
80
|
+
value: "1.0rem"
|
|
81
|
+
}
|
|
82
|
+
], Dt = ["rem", "pc", "cm", "in", "em", "vh", "vw", "%"], Tt = (e, n) => Dt.includes(e) ? n : 1, Nt = {
|
|
83
|
+
incrementOrDecrementValue: (e, n) => {
|
|
84
|
+
const t = e.value.match(/([\d.]+)/), r = t ? parseFloat(t[1]) : 0, i = e.value.match(/([^\d.]+)/), o = i ? i[1] : e.defaultUnit, s = Tt(o, e.step) * n, y = `${Math.max(r + s, e.minValue).toFixed(1)}${o}`;
|
|
85
|
+
return {
|
|
86
|
+
...e,
|
|
87
|
+
value: y
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
}, we = {
|
|
91
|
+
userID: 0,
|
|
92
|
+
clientAppKey: "",
|
|
93
|
+
dashboardId: "default",
|
|
94
|
+
dashboardName: "Default",
|
|
95
|
+
zoomScale: 1,
|
|
96
|
+
responsiveGrid: !1,
|
|
97
|
+
widgets: [],
|
|
98
|
+
childWidgetsConfig: [],
|
|
99
|
+
cssSettings: [...Ct]
|
|
100
|
+
}, je = 0.7, Ae = 1, Et = 0.05, st = (e) => {
|
|
101
|
+
let n = Number(e || 0);
|
|
102
|
+
return n < je && (n = je), n > Ae && (n = Ae), n;
|
|
103
|
+
}, Tn = (e, n) => {
|
|
104
|
+
let t = Number(Number((Et * n).toFixed(2)).toFixed(2)), r = Number((Number(e) + t).toFixed(2));
|
|
105
|
+
return st(r);
|
|
106
|
+
}, lt = (e, n) => {
|
|
107
|
+
const t = `${e}`.includes("Container"), r = t ? ["Container"] : ["Widget"], i = n?.title || e, o = n?.description || (t ? "Container" : "Unknown");
|
|
108
|
+
return {
|
|
109
|
+
title: i,
|
|
110
|
+
displayName: e,
|
|
111
|
+
description: o,
|
|
112
|
+
categories: r,
|
|
113
|
+
noDuplicatedWidgets: !0,
|
|
114
|
+
icon: void 0
|
|
115
|
+
};
|
|
116
|
+
}, Nn = (e, n, t) => {
|
|
117
|
+
const r = n[e];
|
|
118
|
+
return r || lt(e, t);
|
|
119
|
+
}, _t = (e, n) => {
|
|
120
|
+
const r = n.get(e)?.meta;
|
|
121
|
+
return r || lt(e);
|
|
122
|
+
}, En = (e) => {
|
|
123
|
+
let n = {
|
|
124
|
+
...e
|
|
125
|
+
};
|
|
126
|
+
return n.widgets = n.widgets.filter((t) => {
|
|
127
|
+
if (`${t}`.includes("WidgetContainer")) {
|
|
128
|
+
const r = n.childWidgetsConfig.filter(
|
|
129
|
+
(i) => i.parentWidgetKey === t
|
|
130
|
+
);
|
|
131
|
+
if (!r || r.length === 0)
|
|
132
|
+
return n.widgets = n.widgets.filter(
|
|
133
|
+
(i) => i !== t
|
|
134
|
+
), !1;
|
|
135
|
+
}
|
|
136
|
+
return !0;
|
|
137
|
+
}), n;
|
|
138
|
+
}, Mt = (e) => {
|
|
139
|
+
const n = e.widgets.filter(
|
|
140
|
+
(r) => r.includes("WidgetContainer")
|
|
141
|
+
), t = {};
|
|
142
|
+
return n.forEach((r, i) => {
|
|
143
|
+
const u = `${r.split("_container")[0]}_container${i + 1}`;
|
|
144
|
+
t[r] = u;
|
|
145
|
+
}), e.widgets = e.widgets.map((r) => t[r] || r), e.childWidgetsConfig = e.childWidgetsConfig.map((r) => {
|
|
146
|
+
const i = r.parentWidgetKey, o = t[i];
|
|
147
|
+
return {
|
|
148
|
+
...r,
|
|
149
|
+
// If a new key exists, use it. If not, keep the original key.
|
|
150
|
+
parentWidgetKey: o || i
|
|
151
|
+
};
|
|
152
|
+
}), e;
|
|
153
|
+
}, Le = (e) => {
|
|
154
|
+
let n;
|
|
155
|
+
const t = /* @__PURE__ */ new Set(), r = (m, h) => {
|
|
156
|
+
const d = typeof m == "function" ? m(n) : m;
|
|
157
|
+
if (!Object.is(d, n)) {
|
|
158
|
+
const g = n;
|
|
159
|
+
n = h ?? (typeof d != "object" || d === null) ? d : Object.assign({}, n, d), t.forEach((p) => p(n, g));
|
|
160
|
+
}
|
|
161
|
+
}, i = () => n, u = { setState: r, getState: i, getInitialState: () => y, subscribe: (m) => (t.add(m), () => t.delete(m)) }, y = n = e(r, i, u);
|
|
162
|
+
return u;
|
|
163
|
+
}, Pt = ((e) => e ? Le(e) : Le), $t = (e) => e;
|
|
164
|
+
function It(e, n = $t) {
|
|
165
|
+
const t = se.useSyncExternalStore(
|
|
166
|
+
e.subscribe,
|
|
167
|
+
se.useCallback(() => n(e.getState()), [e, n]),
|
|
168
|
+
se.useCallback(() => n(e.getInitialState()), [e, n])
|
|
169
|
+
);
|
|
170
|
+
return se.useDebugValue(t), t;
|
|
171
|
+
}
|
|
172
|
+
const Wt = (e) => {
|
|
173
|
+
const n = Pt(e), t = (r) => It(n, r);
|
|
174
|
+
return Object.assign(t, n), t;
|
|
175
|
+
}, Ot = ((e) => Wt), Rt = (e) => {
|
|
176
|
+
const n = e.widgets.filter((r) => r.includes("WidgetContainer")).map((r) => Number(r.split("_")[1].replace("container", "")));
|
|
177
|
+
return `container${n.length > 0 ? Math.max(...n) + 1 : 1}`;
|
|
178
|
+
}, kt = (e, n) => {
|
|
179
|
+
const t = Rt(e);
|
|
180
|
+
return `${n}_${t}`;
|
|
181
|
+
}, jt = (e) => {
|
|
182
|
+
const { dashboardConfig: n, widgetKey: t, parentWidgetKey: r, noDuplicatedWidgets: i } = e;
|
|
183
|
+
if (r) {
|
|
184
|
+
if (i && n.childWidgetsConfig.find(
|
|
185
|
+
(s) => s.parentWidgetKey === r && s.widgetKey === t
|
|
186
|
+
))
|
|
187
|
+
return {
|
|
188
|
+
success: !1,
|
|
189
|
+
message: `DashboardStore: addWidget: Widget already added (${t})`,
|
|
190
|
+
updatedDashboardConfig: n
|
|
191
|
+
};
|
|
192
|
+
const o = [
|
|
193
|
+
...n.childWidgetsConfig,
|
|
194
|
+
{ parentWidgetKey: r, widgetKey: t }
|
|
195
|
+
// new entry
|
|
196
|
+
];
|
|
197
|
+
return {
|
|
198
|
+
success: !0,
|
|
199
|
+
updatedDashboardConfig: {
|
|
200
|
+
...n,
|
|
201
|
+
childWidgetsConfig: o
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
} else {
|
|
205
|
+
if (i && n.widgets.includes(t))
|
|
206
|
+
return {
|
|
207
|
+
success: !1,
|
|
208
|
+
message: `DashboardStore: addWidget: Widget already added (${t})`,
|
|
209
|
+
updatedDashboardConfig: n
|
|
210
|
+
};
|
|
211
|
+
const o = [...n.widgets, t];
|
|
212
|
+
return {
|
|
213
|
+
success: !0,
|
|
214
|
+
updatedDashboardConfig: {
|
|
215
|
+
...n,
|
|
216
|
+
widgets: o
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
}, At = (e, n, t) => {
|
|
221
|
+
if ((t || "").trim().length > 0) {
|
|
222
|
+
const r = e.childWidgetsConfig.filter(
|
|
223
|
+
(y) => y.parentWidgetKey !== t
|
|
224
|
+
), i = e.childWidgetsConfig.filter(
|
|
225
|
+
(y) => y.parentWidgetKey === t && y.widgetKey !== n
|
|
226
|
+
), o = [...r, ...i];
|
|
227
|
+
let s = {
|
|
228
|
+
...e,
|
|
229
|
+
childWidgetsConfig: o
|
|
230
|
+
};
|
|
231
|
+
return `${n}`.includes("Container") && (s = Mt(s)), {
|
|
232
|
+
success: !0,
|
|
233
|
+
updatedDashboardConfig: s
|
|
234
|
+
};
|
|
235
|
+
} else {
|
|
236
|
+
const r = e.widgets.filter((o) => o !== n), i = e.childWidgetsConfig.filter(
|
|
237
|
+
(o) => o.parentWidgetKey !== n
|
|
238
|
+
);
|
|
239
|
+
return {
|
|
240
|
+
success: !0,
|
|
241
|
+
updatedDashboardConfig: {
|
|
242
|
+
...e,
|
|
243
|
+
widgets: r,
|
|
244
|
+
childWidgetsConfig: i
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
}, Lt = (e, n, t, r) => {
|
|
249
|
+
if ((r || "").trim().length > 0) {
|
|
250
|
+
const i = e.childWidgetsConfig.filter(
|
|
251
|
+
(h) => h.parentWidgetKey !== r
|
|
252
|
+
);
|
|
253
|
+
let o = e.childWidgetsConfig.filter(
|
|
254
|
+
(h) => h.parentWidgetKey === r
|
|
255
|
+
);
|
|
256
|
+
const s = o.indexOf(t);
|
|
257
|
+
let u = s + n;
|
|
258
|
+
if (u = Math.max(0, u), u = Math.min(o.length - 1, u), u === s)
|
|
259
|
+
return {
|
|
260
|
+
success: !1,
|
|
261
|
+
message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
|
|
262
|
+
updatedDashboardConfig: e
|
|
263
|
+
};
|
|
264
|
+
const y = [...o], [m] = y.splice(s, 1);
|
|
265
|
+
return y.splice(u, 0, m), {
|
|
266
|
+
success: !0,
|
|
267
|
+
updatedDashboardConfig: {
|
|
268
|
+
...e,
|
|
269
|
+
childWidgetsConfig: [...i, ...y]
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
} else {
|
|
273
|
+
const i = e.widgets || [], o = i.indexOf(t);
|
|
274
|
+
let s = o + n;
|
|
275
|
+
if (s = Math.max(0, s), s = Math.min(i.length - 1, s), s === o)
|
|
276
|
+
return {
|
|
277
|
+
success: !1,
|
|
278
|
+
message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
|
|
279
|
+
updatedDashboardConfig: e
|
|
280
|
+
};
|
|
281
|
+
const u = [...i], [y] = u.splice(o, 1);
|
|
282
|
+
return u.splice(s, 0, y), {
|
|
283
|
+
success: !0,
|
|
284
|
+
updatedDashboardConfig: {
|
|
285
|
+
...e,
|
|
286
|
+
widgets: u
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
}, Ft = (e, n) => ({
|
|
291
|
+
isLoading: !1,
|
|
292
|
+
isEditing: !1,
|
|
293
|
+
allDashboardConfigs: [we],
|
|
294
|
+
currentDashboardConfig: we,
|
|
295
|
+
targetContainerKey: void 0,
|
|
296
|
+
getNextContainerKey: (t) => kt(n().currentDashboardConfig, t),
|
|
297
|
+
setIsLoading: (t) => (e(() => ({ isLoading: t })), t),
|
|
298
|
+
setIsEditing: (t) => {
|
|
299
|
+
let r = n().targetContainerKey;
|
|
300
|
+
return t || (r = void 0), e(() => ({ isEditing: t, targetContainerKey: r })), t;
|
|
301
|
+
},
|
|
302
|
+
setTargetContainerKey: (t) => (e(() => ({ targetContainerKey: t })), t),
|
|
303
|
+
setAllDashboardConfigs: (t) => (e(() => ({ allDashboardConfigs: t })), n().allDashboardConfigs),
|
|
304
|
+
setCurrentDashboardConfig: (t) => {
|
|
305
|
+
const r = n(), i = [
|
|
306
|
+
...r.allDashboardConfigs.filter((o) => o.dashboardId !== t.dashboardId),
|
|
307
|
+
t
|
|
308
|
+
];
|
|
309
|
+
return e(() => ({
|
|
310
|
+
...r,
|
|
311
|
+
allDashboardConfigs: i,
|
|
312
|
+
currentDashboardConfig: t
|
|
313
|
+
})), i;
|
|
314
|
+
},
|
|
315
|
+
addDashboardConfig: (t) => {
|
|
316
|
+
const r = n(), i = [
|
|
317
|
+
...r.allDashboardConfigs.filter((o) => o.dashboardId !== t.dashboardId),
|
|
318
|
+
t
|
|
319
|
+
];
|
|
320
|
+
return e(() => ({
|
|
321
|
+
...r,
|
|
322
|
+
allDashboardConfigs: i,
|
|
323
|
+
currentDashboardConfig: t
|
|
324
|
+
})), i;
|
|
325
|
+
},
|
|
326
|
+
deleteDashboardConfigById: (t) => {
|
|
327
|
+
const r = n(), i = [...r.allDashboardConfigs.filter((o) => o.dashboardId !== t)];
|
|
328
|
+
return e(() => ({
|
|
329
|
+
...r,
|
|
330
|
+
allDashboardConfigs: i,
|
|
331
|
+
currentDashboardConfig: i[0] || we
|
|
332
|
+
})), i;
|
|
333
|
+
},
|
|
334
|
+
selectDashboardById: (t) => (e(() => {
|
|
335
|
+
const r = n(), i = r.allDashboardConfigs.find((o) => o.dashboardId === t);
|
|
336
|
+
return i ? {
|
|
337
|
+
currentDashboardConfig: i
|
|
338
|
+
} : {
|
|
339
|
+
...r
|
|
340
|
+
};
|
|
341
|
+
}), n().currentDashboardConfig),
|
|
342
|
+
addWidget: (t) => {
|
|
343
|
+
const r = n(), i = jt({
|
|
344
|
+
dashboardConfig: r.currentDashboardConfig,
|
|
345
|
+
...t
|
|
346
|
+
}), o = [
|
|
347
|
+
...r.allDashboardConfigs.filter(
|
|
348
|
+
(s) => s.dashboardId !== i.updatedDashboardConfig.dashboardId
|
|
349
|
+
),
|
|
350
|
+
i.updatedDashboardConfig
|
|
351
|
+
];
|
|
352
|
+
return i.success && e(() => ({
|
|
353
|
+
allDashboardConfigs: o,
|
|
354
|
+
currentDashboardConfig: i.updatedDashboardConfig
|
|
355
|
+
})), {
|
|
356
|
+
...i,
|
|
357
|
+
allUpdatedDashboardConfigs: o
|
|
358
|
+
};
|
|
359
|
+
},
|
|
360
|
+
removeWidget: (t, r) => {
|
|
361
|
+
const i = n(), o = At(i.currentDashboardConfig, t, r), s = [
|
|
362
|
+
...i.allDashboardConfigs.filter(
|
|
363
|
+
(u) => u.dashboardId !== o.updatedDashboardConfig.dashboardId
|
|
364
|
+
),
|
|
365
|
+
o.updatedDashboardConfig
|
|
366
|
+
];
|
|
367
|
+
return o.success && e(() => ({
|
|
368
|
+
allDashboardConfigs: s,
|
|
369
|
+
currentDashboardConfig: o.updatedDashboardConfig
|
|
370
|
+
})), {
|
|
371
|
+
...o,
|
|
372
|
+
allUpdatedDashboardConfigs: s
|
|
373
|
+
};
|
|
374
|
+
},
|
|
375
|
+
moveWidget: (t, r, i) => {
|
|
376
|
+
const o = n(), s = Lt(o.currentDashboardConfig, t, r, i), u = [
|
|
377
|
+
...o.allDashboardConfigs.filter(
|
|
378
|
+
(y) => y.dashboardId !== s.updatedDashboardConfig.dashboardId
|
|
379
|
+
),
|
|
380
|
+
s.updatedDashboardConfig
|
|
381
|
+
];
|
|
382
|
+
return s.success && e(() => ({
|
|
383
|
+
allDashboardConfigs: u,
|
|
384
|
+
currentDashboardConfig: s.updatedDashboardConfig
|
|
385
|
+
})), {
|
|
386
|
+
...s,
|
|
387
|
+
allUpdatedDashboardConfigs: u
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
}), _n = Ot()((...e) => ({
|
|
391
|
+
...Ft(...e)
|
|
392
|
+
})), ct = (e, n) => `dashboards_${n}_${e}`, Ut = async (e, n, t, r) => {
|
|
393
|
+
const i = localStorage.getItem(ct(e, n));
|
|
394
|
+
if (i)
|
|
395
|
+
try {
|
|
396
|
+
const o = JSON.parse(i);
|
|
397
|
+
return o.length < 1 ? [r] : (o.forEach((s) => {
|
|
398
|
+
s.dashboardId || (s.dashboardId = "default"), s.dashboardName || (s.dashboardName = `Dashboard ${s.dashboardId}`), s.responsiveGrid = s.responsiveGrid ?? !1, (s.widgets || []).length < 1 && (s.widgets = r.widgets);
|
|
399
|
+
const u = (s.cssSettings || []).filter(
|
|
400
|
+
(y) => r.cssSettings.some((m) => m.key === y.key)
|
|
401
|
+
);
|
|
402
|
+
if (u.length < 1)
|
|
403
|
+
s.cssSettings = [...r.cssSettings];
|
|
404
|
+
else {
|
|
405
|
+
u.forEach((m) => {
|
|
406
|
+
m.value = (m.value || "").replace(/NaN/g, "");
|
|
407
|
+
const h = r.cssSettings.find(
|
|
408
|
+
(d) => d.key === m.key
|
|
409
|
+
);
|
|
410
|
+
h && (Object.keys(h).forEach((d) => {
|
|
411
|
+
d in m || (m[d] = h[d]);
|
|
412
|
+
}), m.step = h.step, m.minValue = h.minValue, m.defaultValue = h.defaultValue, m.defaultUnit = h.defaultUnit, /\d+/g.test(m.value) === !1 && (m.value = h ? h.value : "1.0rem"));
|
|
413
|
+
});
|
|
414
|
+
const y = r.cssSettings.filter((m) => !u.some(
|
|
415
|
+
(h) => h.key === m.key
|
|
416
|
+
));
|
|
417
|
+
s.cssSettings = [...u, ...y];
|
|
418
|
+
}
|
|
419
|
+
s.widgets = s.widgets.filter(
|
|
420
|
+
(y) => y.includes("WidgetContainer") || t.has(y)
|
|
421
|
+
), s.childWidgetsConfig = s.childWidgetsConfig.filter(
|
|
422
|
+
(y) => t.has(y.widgetKey)
|
|
423
|
+
), s.zoomScale ? s.zoomScale < 0.7 && (s.zoomScale = 0.7) : s.zoomScale = 1;
|
|
424
|
+
}), o);
|
|
425
|
+
} catch (o) {
|
|
426
|
+
console.warn("Error parsing saved dashboard config:", o);
|
|
427
|
+
}
|
|
428
|
+
return [r];
|
|
429
|
+
}, Vt = async (e, n, t, r) => {
|
|
430
|
+
t.forEach((o) => {
|
|
431
|
+
if (o.userID = e, o.clientAppKey = n, o.responsiveGrid = o.responsiveGrid ?? !1, typeof o != "object")
|
|
432
|
+
throw new Error("Invalid dashboard configuration");
|
|
433
|
+
o.widgets = o.widgets.filter(
|
|
434
|
+
(s) => s.includes("WidgetContainer") || r.has(s)
|
|
435
|
+
), o.childWidgetsConfig = o.childWidgetsConfig.filter(
|
|
436
|
+
(s) => r.has(s.widgetKey)
|
|
437
|
+
), o.zoomScale ? o.zoomScale < 0.7 && (o.zoomScale = 0.7) : o.zoomScale = 1;
|
|
438
|
+
});
|
|
439
|
+
const i = JSON.stringify(t);
|
|
440
|
+
return localStorage.setItem(ct(e, n), i), !0;
|
|
441
|
+
}, Yt = {
|
|
442
|
+
getSavedDashboards: Ut,
|
|
443
|
+
saveDashboards: Vt
|
|
444
|
+
}, Mn = () => Yt, Pn = () => {
|
|
445
|
+
const [e, n] = ce({}), [t, r] = ce({}), i = ue((h) => {
|
|
446
|
+
const d = h.dashboardId;
|
|
447
|
+
n((g) => {
|
|
448
|
+
const p = {
|
|
449
|
+
undoIndex: 0,
|
|
450
|
+
config: h
|
|
451
|
+
};
|
|
452
|
+
return r((w) => ({
|
|
453
|
+
...w,
|
|
454
|
+
[d]: 0
|
|
455
|
+
})), {
|
|
456
|
+
...g,
|
|
457
|
+
[d]: [p]
|
|
458
|
+
// Forces a reset to just this one entry
|
|
459
|
+
};
|
|
460
|
+
});
|
|
461
|
+
}, []), o = ue(
|
|
462
|
+
(h) => {
|
|
463
|
+
n((d) => {
|
|
464
|
+
const g = h.dashboardId, p = d[g] || [], w = t[g] ?? -1, b = p.slice(0, w + 1), v = {
|
|
465
|
+
undoIndex: b.length,
|
|
466
|
+
// New index based on trimmed length
|
|
467
|
+
config: h
|
|
468
|
+
}, S = [...b, v];
|
|
469
|
+
return r((T) => ({
|
|
470
|
+
...T,
|
|
471
|
+
[g]: S.length - 1
|
|
472
|
+
// Index is now the last element's index
|
|
473
|
+
})), {
|
|
474
|
+
...d,
|
|
475
|
+
[g]: S
|
|
476
|
+
};
|
|
477
|
+
});
|
|
478
|
+
},
|
|
479
|
+
[t]
|
|
480
|
+
), s = ue((h) => {
|
|
481
|
+
n((d) => {
|
|
482
|
+
if (!d[h])
|
|
483
|
+
return d;
|
|
484
|
+
const { [h]: g, ...p } = d;
|
|
485
|
+
return p;
|
|
486
|
+
}), r((d) => {
|
|
487
|
+
const { [h]: g, ...p } = d;
|
|
488
|
+
return p;
|
|
489
|
+
});
|
|
490
|
+
}, []), u = ue(
|
|
491
|
+
(h) => {
|
|
492
|
+
r((d) => {
|
|
493
|
+
const g = d[h] ?? -1, p = Math.max(0, g - 1);
|
|
494
|
+
return p !== g ? { ...d, [h]: p } : d;
|
|
495
|
+
});
|
|
496
|
+
},
|
|
497
|
+
[
|
|
498
|
+
//loadConfigFromHistory
|
|
499
|
+
]
|
|
500
|
+
), y = ue(
|
|
501
|
+
(h) => {
|
|
502
|
+
r((d) => {
|
|
503
|
+
const g = e[h]?.length || 0, p = d[h] ?? -1, w = Math.min(g - 1, p + 1);
|
|
504
|
+
return w !== p ? { ...d, [h]: w } : d;
|
|
505
|
+
});
|
|
506
|
+
},
|
|
507
|
+
[
|
|
508
|
+
e
|
|
509
|
+
//loadConfigFromHistory,
|
|
510
|
+
]
|
|
511
|
+
);
|
|
512
|
+
return {
|
|
513
|
+
initializeHistoryForDashboard: i,
|
|
514
|
+
resetAllHistory: () => n({}),
|
|
515
|
+
addUndoEntry: o,
|
|
516
|
+
removeUndoHistoryForDashboard: s,
|
|
517
|
+
undo: u,
|
|
518
|
+
redo: y,
|
|
519
|
+
getUndoStatus: (h) => {
|
|
520
|
+
const d = t[h] ?? -1, g = e[h]?.length || 0, p = d <= 0, w = d >= g - 1;
|
|
521
|
+
return { isUndoDisabled: p, isRedoDisabled: w };
|
|
522
|
+
},
|
|
523
|
+
undoHistory: e,
|
|
524
|
+
historyIndex: t
|
|
525
|
+
// (Optional: You might expose undoHistory and historyIndex if needed for debugging)
|
|
526
|
+
};
|
|
527
|
+
};
|
|
528
|
+
function K({
|
|
529
|
+
children: e,
|
|
530
|
+
className: n
|
|
531
|
+
}) {
|
|
532
|
+
return /* @__PURE__ */ a(
|
|
533
|
+
"svg",
|
|
534
|
+
{
|
|
535
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
536
|
+
width: "24",
|
|
537
|
+
height: "24",
|
|
538
|
+
viewBox: "0 0 24 24",
|
|
539
|
+
fill: "none",
|
|
540
|
+
stroke: "currentColor",
|
|
541
|
+
strokeWidth: "2",
|
|
542
|
+
strokeLinecap: "round",
|
|
543
|
+
strokeLinejoin: "round",
|
|
544
|
+
className: n,
|
|
545
|
+
children: e
|
|
546
|
+
}
|
|
547
|
+
);
|
|
548
|
+
}
|
|
549
|
+
function $n({ className: e }) {
|
|
550
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-circle-plus-icon lucide-circle-plus ${e}`, children: [
|
|
551
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
552
|
+
/* @__PURE__ */ a("path", { d: "M8 12h8" }),
|
|
553
|
+
/* @__PURE__ */ a("path", { d: "M12 8v8" })
|
|
554
|
+
] });
|
|
555
|
+
}
|
|
556
|
+
function In({ className: e }) {
|
|
557
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-trash2-icon lucide-trash-2 ${e}`, children: [
|
|
558
|
+
/* @__PURE__ */ a("path", { d: "M10 11v6" }),
|
|
559
|
+
/* @__PURE__ */ a("path", { d: "M14 11v6" }),
|
|
560
|
+
/* @__PURE__ */ a("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
|
|
561
|
+
/* @__PURE__ */ a("path", { d: "M3 6h18" }),
|
|
562
|
+
/* @__PURE__ */ a("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
563
|
+
] });
|
|
564
|
+
}
|
|
565
|
+
function Wn({ className: e }) {
|
|
566
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-square-pen-icon lucide-square-pen ${e}`, children: [
|
|
567
|
+
/* @__PURE__ */ a("path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
568
|
+
/* @__PURE__ */ a("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" })
|
|
569
|
+
] });
|
|
570
|
+
}
|
|
571
|
+
function On({ className: e }) {
|
|
572
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-grid3x3-icon lucide-grid-3x3 ${e}`, children: [
|
|
573
|
+
/* @__PURE__ */ a("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
574
|
+
/* @__PURE__ */ a("path", { d: "M3 9h18" }),
|
|
575
|
+
/* @__PURE__ */ a("path", { d: "M3 15h18" }),
|
|
576
|
+
/* @__PURE__ */ a("path", { d: "M9 3v18" }),
|
|
577
|
+
/* @__PURE__ */ a("path", { d: "M15 3v18" })
|
|
578
|
+
] });
|
|
579
|
+
}
|
|
580
|
+
function Rn({ className: e }) {
|
|
581
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-monitor-icon lucide-monitor ${e}`, children: [
|
|
582
|
+
/* @__PURE__ */ a("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
|
|
583
|
+
/* @__PURE__ */ a("line", { x1: "8", x2: "16", y1: "21", y2: "21" }),
|
|
584
|
+
/* @__PURE__ */ a("line", { x1: "12", x2: "12", y1: "17", y2: "21" })
|
|
585
|
+
] });
|
|
586
|
+
}
|
|
587
|
+
function kn({ className: e }) {
|
|
588
|
+
return /* @__PURE__ */ I(
|
|
589
|
+
K,
|
|
590
|
+
{
|
|
591
|
+
className: `lucide lucide-monitor-smartphone-icon lucide-monitor-smartphone ${e}`,
|
|
592
|
+
children: [
|
|
593
|
+
/* @__PURE__ */ a("path", { d: "M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8" }),
|
|
594
|
+
/* @__PURE__ */ a("path", { d: "M10 19v-3.96 3.15" }),
|
|
595
|
+
/* @__PURE__ */ a("path", { d: "M7 19h5" }),
|
|
596
|
+
/* @__PURE__ */ a("rect", { width: "6", height: "10", x: "16", y: "12", rx: "2" })
|
|
597
|
+
]
|
|
598
|
+
}
|
|
599
|
+
);
|
|
600
|
+
}
|
|
601
|
+
function dt({ className: e }) {
|
|
602
|
+
return /* @__PURE__ */ I(
|
|
603
|
+
K,
|
|
604
|
+
{
|
|
605
|
+
className: `lucide lucide-circle-arrow-left-icon lucide-circle-arrow-left ${e}`,
|
|
606
|
+
children: [
|
|
607
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
608
|
+
/* @__PURE__ */ a("path", { d: "m12 8-4 4 4 4" }),
|
|
609
|
+
/* @__PURE__ */ a("path", { d: "M16 12H8" })
|
|
610
|
+
]
|
|
611
|
+
}
|
|
612
|
+
);
|
|
613
|
+
}
|
|
614
|
+
function ut({ className: e }) {
|
|
615
|
+
return /* @__PURE__ */ I(
|
|
616
|
+
K,
|
|
617
|
+
{
|
|
618
|
+
className: `lucide lucide-circle-arrow-right-icon lucide-circle-arrow-right ${e}`,
|
|
619
|
+
children: [
|
|
620
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
621
|
+
/* @__PURE__ */ a("path", { d: "m12 16 4-4-4-4" }),
|
|
622
|
+
/* @__PURE__ */ a("path", { d: "M8 12h8" })
|
|
623
|
+
]
|
|
624
|
+
}
|
|
625
|
+
);
|
|
626
|
+
}
|
|
627
|
+
function qt({ className: e }) {
|
|
628
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-settings-icon lucide-settings ${e}`, children: [
|
|
629
|
+
/* @__PURE__ */ a("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" }),
|
|
630
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "3" })
|
|
631
|
+
] });
|
|
632
|
+
}
|
|
633
|
+
function jn({ className: e }) {
|
|
634
|
+
return /* @__PURE__ */ I(
|
|
635
|
+
K,
|
|
636
|
+
{
|
|
637
|
+
className: `lucide lucide-tablet-smartphone-icon lucide-tablet-smartphone ${e}`,
|
|
638
|
+
children: [
|
|
639
|
+
/* @__PURE__ */ a("rect", { width: "10", height: "14", x: "3", y: "8", rx: "2" }),
|
|
640
|
+
/* @__PURE__ */ a("path", { d: "M5 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2h-2.4" }),
|
|
641
|
+
/* @__PURE__ */ a("path", { d: "M8 18h.01" })
|
|
642
|
+
]
|
|
643
|
+
}
|
|
644
|
+
);
|
|
645
|
+
}
|
|
646
|
+
function ft({ className: e }) {
|
|
647
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-circle-x-icon lucide-circle-x ${e}`, children: [
|
|
648
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
649
|
+
/* @__PURE__ */ a("path", { d: "m15 9-6 6" }),
|
|
650
|
+
/* @__PURE__ */ a("path", { d: "m9 9 6 6" })
|
|
651
|
+
] });
|
|
652
|
+
}
|
|
653
|
+
function An({ className: e }) {
|
|
654
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-zoom-in-icon lucide-zoom-in ${e}`, children: [
|
|
655
|
+
/* @__PURE__ */ a("circle", { cx: "11", cy: "11", r: "8" }),
|
|
656
|
+
/* @__PURE__ */ a("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
|
|
657
|
+
/* @__PURE__ */ a("line", { x1: "11", x2: "11", y1: "8", y2: "14" }),
|
|
658
|
+
/* @__PURE__ */ a("line", { x1: "8", x2: "14", y1: "11", y2: "11" })
|
|
659
|
+
] });
|
|
660
|
+
}
|
|
661
|
+
function Ln({ className: e }) {
|
|
662
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-zoom-out-icon lucide-zoom-out ${e}`, children: [
|
|
663
|
+
/* @__PURE__ */ a("circle", { cx: "11", cy: "11", r: "8" }),
|
|
664
|
+
/* @__PURE__ */ a("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
|
|
665
|
+
/* @__PURE__ */ a("line", { x1: "8", x2: "14", y1: "11", y2: "11" })
|
|
666
|
+
] });
|
|
667
|
+
}
|
|
668
|
+
function zt({ className: e }) {
|
|
669
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-timer-reset-icon lucide-timer-reset ${e}`, children: [
|
|
670
|
+
/* @__PURE__ */ a("path", { d: "M10 2h4" }),
|
|
671
|
+
/* @__PURE__ */ a("path", { d: "M12 14v-4" }),
|
|
672
|
+
/* @__PURE__ */ a("path", { d: "M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6" }),
|
|
673
|
+
/* @__PURE__ */ a("path", { d: "M9 17H4v5" })
|
|
674
|
+
] });
|
|
675
|
+
}
|
|
676
|
+
function Bt({ className: e }) {
|
|
677
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-undo-icon lucide-undo ${e}`, children: [
|
|
678
|
+
/* @__PURE__ */ a("path", { d: "M3 7v6h6" }),
|
|
679
|
+
/* @__PURE__ */ a("path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" })
|
|
680
|
+
] });
|
|
681
|
+
}
|
|
682
|
+
function Kt({ className: e }) {
|
|
683
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-redo-icon lucide-redo ${e}`, children: [
|
|
684
|
+
/* @__PURE__ */ a("path", { d: "M21 7v6h-6" }),
|
|
685
|
+
/* @__PURE__ */ a("path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7" })
|
|
686
|
+
] });
|
|
687
|
+
}
|
|
688
|
+
function Ht({ className: e }) {
|
|
689
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-hand-icon lucide-hand ${e}`, children: [
|
|
690
|
+
/* @__PURE__ */ a("path", { d: "M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2" }),
|
|
691
|
+
/* @__PURE__ */ a("path", { d: "M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" }),
|
|
692
|
+
/* @__PURE__ */ a("path", { d: "M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8" }),
|
|
693
|
+
/* @__PURE__ */ a("path", { d: "M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15" })
|
|
694
|
+
] });
|
|
695
|
+
}
|
|
696
|
+
function Xt({ className: e }) {
|
|
697
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-hand-grab-icon lucide-hand-grab ${e}`, children: [
|
|
698
|
+
/* @__PURE__ */ a("path", { d: "M18 11.5V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1.4" }),
|
|
699
|
+
/* @__PURE__ */ a("path", { d: "M14 10V8a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" }),
|
|
700
|
+
/* @__PURE__ */ a("path", { d: "M10 9.9V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v5" }),
|
|
701
|
+
/* @__PURE__ */ a("path", { d: "M6 14a2 2 0 0 0-2-2a2 2 0 0 0-2 2" }),
|
|
702
|
+
/* @__PURE__ */ a("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" })
|
|
703
|
+
] });
|
|
704
|
+
}
|
|
705
|
+
function Gt({ className: e }) {
|
|
706
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-crosshair-icon lucide-crosshair ${e}`, children: [
|
|
707
|
+
/* @__PURE__ */ a("line", { x1: "22", x2: "18", y1: "12", y2: "12" }),
|
|
708
|
+
/* @__PURE__ */ a("line", { x1: "6", x2: "2", y1: "12", y2: "12" }),
|
|
709
|
+
/* @__PURE__ */ a("line", { x1: "12", x2: "12", y1: "6", y2: "2" }),
|
|
710
|
+
/* @__PURE__ */ a("line", { x1: "12", x2: "12", y1: "22", y2: "18" })
|
|
711
|
+
] });
|
|
712
|
+
}
|
|
713
|
+
function Fn({ className: e }) {
|
|
714
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-target-icon lucide-target ${e}`, children: [
|
|
715
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
716
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "6" }),
|
|
717
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "2" })
|
|
718
|
+
] });
|
|
719
|
+
}
|
|
720
|
+
function Zt({ className: e }) {
|
|
721
|
+
return /* @__PURE__ */ I(
|
|
722
|
+
K,
|
|
723
|
+
{
|
|
724
|
+
className: `lucide lucide-file-question-mark-icon lucide-file-question-mark ${e}`,
|
|
725
|
+
children: [
|
|
726
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
727
|
+
/* @__PURE__ */ a("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
|
728
|
+
/* @__PURE__ */ a("path", { d: "M12 17h.01" })
|
|
729
|
+
]
|
|
730
|
+
}
|
|
731
|
+
);
|
|
732
|
+
}
|
|
733
|
+
const Z = (e, ...n) => [
|
|
734
|
+
...new Set(
|
|
735
|
+
[e || "", ...n].join(" ").trim().replace(/\n+/gi, " ").replace(/\s+/gi, " ").split(" ")
|
|
736
|
+
)
|
|
737
|
+
].join(" ").trim(), re = (e, n = "color") => {
|
|
738
|
+
if (typeof window > "u") return "#FFFFFF";
|
|
739
|
+
const t = document.createElement("div");
|
|
740
|
+
Array.isArray(e) ? e.forEach((i) => t.classList.add(i)) : e.split(" ").forEach((i) => t.classList.add(i)), t.style.display = "none", document.body.appendChild(t);
|
|
741
|
+
const r = window.getComputedStyle(t)[n];
|
|
742
|
+
return document.body.removeChild(t), r;
|
|
743
|
+
}, Un = {
|
|
744
|
+
primary: re("text-primary", "color"),
|
|
745
|
+
secondary: re("text-secondary", "color"),
|
|
746
|
+
success: re("text-success", "color"),
|
|
747
|
+
danger: re("text-danger", "color"),
|
|
748
|
+
warning: re("text-warning", "color"),
|
|
749
|
+
info: re("text-info", "color"),
|
|
750
|
+
disabled: re("text-disabled", "color"),
|
|
751
|
+
neutral: re("text-neutral", "color"),
|
|
752
|
+
body: re("text-body", "color")
|
|
753
|
+
}, Vn = {
|
|
754
|
+
getCssVariableValue: (e) => {
|
|
755
|
+
const n = document.documentElement;
|
|
756
|
+
return getComputedStyle(n).getPropertyValue(e).trim() || null;
|
|
757
|
+
},
|
|
758
|
+
setCssVariableValue: (e, n) => {
|
|
759
|
+
document.documentElement.style.setProperty(e, n);
|
|
760
|
+
},
|
|
761
|
+
restoreCssVarsFromSettings: (e) => {
|
|
762
|
+
const n = document.documentElement;
|
|
763
|
+
e.forEach((t) => {
|
|
764
|
+
n.style.setProperty(t.cssProperty, t.value);
|
|
765
|
+
});
|
|
766
|
+
}
|
|
767
|
+
}, ht = (e) => {
|
|
768
|
+
const n = `${e}`.split("_");
|
|
769
|
+
return n.length > 1 ? n[1].replace(/(\D)(\d+)/, "$1 $2") : "Container";
|
|
770
|
+
}, gt = ({
|
|
771
|
+
label: e,
|
|
772
|
+
className: n,
|
|
773
|
+
size: t = "medium",
|
|
774
|
+
value: r,
|
|
775
|
+
onChange: i,
|
|
776
|
+
onKeyDown: o,
|
|
777
|
+
placeholder: s = ""
|
|
778
|
+
}) => {
|
|
779
|
+
const u = it(() => t === "small" ? "py-1.5 px-3 text-sm" : "py-2.5 px-4 text-base", [t]), y = Z("flex flex-col mb-4", n || ""), h = `${Z(`
|
|
780
|
+
block w-full rounded-md px-3 py-1.5 text-base
|
|
781
|
+
bg-formfield content-formfield
|
|
782
|
+
outline-1 -outline-offset-1 outline-primary
|
|
783
|
+
placeholder:text-disabled
|
|
784
|
+
focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-200 sm:text-sm/6
|
|
785
|
+
`)} ${u}`;
|
|
786
|
+
return /* @__PURE__ */ I("div", { className: y, children: [
|
|
787
|
+
/* @__PURE__ */ a("label", { htmlFor: e, className: "block text-sm/6 font-medium mb-1.5", children: e }),
|
|
788
|
+
/* @__PURE__ */ a(
|
|
789
|
+
"input",
|
|
790
|
+
{
|
|
791
|
+
id: e,
|
|
792
|
+
type: "text",
|
|
793
|
+
value: r,
|
|
794
|
+
onChange: i,
|
|
795
|
+
onKeyDown: (d) => o && o(d),
|
|
796
|
+
placeholder: s,
|
|
797
|
+
className: h,
|
|
798
|
+
"aria-label": e
|
|
799
|
+
}
|
|
800
|
+
)
|
|
801
|
+
] });
|
|
802
|
+
}, Se = /* @__PURE__ */ new Map([
|
|
803
|
+
[
|
|
804
|
+
"normal",
|
|
805
|
+
"group bg-[category] content-[category] hover:bg-[category] group-hover:bg-[category] focus:outline-[category] focus:outline-offset-[category]"
|
|
806
|
+
],
|
|
807
|
+
[
|
|
808
|
+
"ghost",
|
|
809
|
+
"group bg-transparent border-[category] text-[category] hover:text-[category] group-hover:text-[category] focus:outline-[category] focus:outline-offset-[category]"
|
|
810
|
+
]
|
|
811
|
+
]);
|
|
812
|
+
function J(e) {
|
|
813
|
+
const {
|
|
814
|
+
tooltip: n,
|
|
815
|
+
disabled: t,
|
|
816
|
+
isIconButton: r,
|
|
817
|
+
className: i,
|
|
818
|
+
buttonType: o,
|
|
819
|
+
category: s,
|
|
820
|
+
px: u,
|
|
821
|
+
py: y,
|
|
822
|
+
children: m,
|
|
823
|
+
...h
|
|
824
|
+
} = e, d = () => {
|
|
825
|
+
const p = e.isIconButton || !1, w = e.category || "primary", b = e.buttonType || "normal", v = e.disabled || !1, S = e.className || "", T = e.font || "semibold", C = Number((e.border || 0) > 0 ? e.border : 0);
|
|
826
|
+
let D = (e.borderColor || "").trim();
|
|
827
|
+
D = D.length > 0 ? D : "";
|
|
828
|
+
const c = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), N = e.shadow || "sm", l = e.shadowHover || "md", f = (e.addCss || "").trim(), P = e.justifyCss || "justify-center";
|
|
829
|
+
if (p)
|
|
830
|
+
return Z(
|
|
831
|
+
"flex flex-row items-center",
|
|
832
|
+
v ? "text-disabled" : `text-${w} hover:brightness-110 cursor-pointer`,
|
|
833
|
+
S || ""
|
|
834
|
+
);
|
|
835
|
+
const $ = [
|
|
836
|
+
"relative cursor-pointer",
|
|
837
|
+
"rounded-sm focus:outline-none focus:ring focus:ring-offset",
|
|
838
|
+
"transition-all duration-150",
|
|
839
|
+
"text-sm",
|
|
840
|
+
`font-${T}`
|
|
841
|
+
];
|
|
842
|
+
if (v)
|
|
843
|
+
b === "ghost" ? $.push("text-disabled border-disabled cursor-not-allowed") : $.push("bg-disabled content-disabled border-disabled cursor-not-allowed");
|
|
844
|
+
else {
|
|
845
|
+
$.push("cursor-pointer");
|
|
846
|
+
let O = "";
|
|
847
|
+
Se.has(b) ? O = `${Se.get(b)}` : O = `${Se.get("normal")}`, C < 1 && (O = O.replace("border-[category]", ""));
|
|
848
|
+
const E = O.replace(/\[category\]/g, w).trim();
|
|
849
|
+
$.push(E);
|
|
850
|
+
}
|
|
851
|
+
return C > 0 ? ($.push(`border-[${C}px]`), $.push(`border-${D}`)) : ($.push("border-[1px]"), $.push("border-transparent")), c > 0 ? ($.push(`hover:border-[${c}px] group-hover:border-[${c}px]`), $.push(`hover:border-${D} group-hover:border-${D}`)) : $.push("hover:border-[1px] group-hover:border-[1px]"), $.push(`shadow-${N}`), $.push(`hover:shadow-${l} group-hover:shadow-${l}`), f.length > 0 && $.push(f), f.indexOf("hidden") === -1 && $.push("inline-flex"), $.push(P), $.join(" ").trim();
|
|
852
|
+
}, g = () => {
|
|
853
|
+
const p = e.px || 0.7, w = e.py || 0.25;
|
|
854
|
+
return {
|
|
855
|
+
padding: r ? 0 : `${w}rem ${p}rem `
|
|
856
|
+
};
|
|
857
|
+
};
|
|
858
|
+
return /* @__PURE__ */ a("button", { type: "button", disabled: t, className: d(), style: g(), ...h, children: m });
|
|
859
|
+
}
|
|
860
|
+
const Jt = (e) => e.direction === "row" ? Z("flex flex-row items-center gap-2", e.classNames || "") : Z("flex flex-col gap-2 w-full", e.classNames || "");
|
|
861
|
+
function Qt(e) {
|
|
862
|
+
const { children: n, testId: t, classNames: r, direction: i, ...o } = e, s = Jt(e);
|
|
863
|
+
return /* @__PURE__ */ a("div", { "data-testid": t || "not-set", className: s, ...o, children: n });
|
|
864
|
+
}
|
|
865
|
+
const Yn = le(
|
|
866
|
+
(e, n) => {
|
|
867
|
+
const { classNames: t, innerClass: r, ...i } = e, o = Z(t || "", "w-full"), s = Z(
|
|
868
|
+
`w-full flex overflow-hidden justify-between items-center gap-0
|
|
869
|
+
rounded-md border`,
|
|
870
|
+
r || ""
|
|
871
|
+
);
|
|
872
|
+
return /* @__PURE__ */ a(Qt, { direction: "row", classNames: o, ...i, children: /* @__PURE__ */ a("div", { className: s, children: e.children }) });
|
|
873
|
+
}
|
|
874
|
+
), qn = le((e, n) => /* @__PURE__ */ a(
|
|
875
|
+
"div",
|
|
876
|
+
{
|
|
877
|
+
"data-testid": e.testId || "not-set",
|
|
878
|
+
className: "flex items-center justify-center",
|
|
879
|
+
style: {
|
|
880
|
+
flexShrink: 0,
|
|
881
|
+
padding: "0.75rem 0 0.75rem 0.75rem"
|
|
882
|
+
},
|
|
883
|
+
children: e.children
|
|
884
|
+
}
|
|
885
|
+
)), zn = le(
|
|
886
|
+
(e, n) => /* @__PURE__ */ a(
|
|
887
|
+
"div",
|
|
888
|
+
{
|
|
889
|
+
"data-testid": e.testId || "not-set",
|
|
890
|
+
className: "flex-1 flex flex-col gap-0 truncate p-2",
|
|
891
|
+
children: e.children
|
|
892
|
+
}
|
|
893
|
+
)
|
|
894
|
+
), Bn = le((e, n) => /* @__PURE__ */ a(
|
|
895
|
+
"div",
|
|
896
|
+
{
|
|
897
|
+
"data-testid": e.testId || "not-set",
|
|
898
|
+
className: "flex flex-row items-center justify-between gap-1 h-full",
|
|
899
|
+
style: {
|
|
900
|
+
flexShrink: 0,
|
|
901
|
+
paddingRight: "0.65rem"
|
|
902
|
+
},
|
|
903
|
+
children: e.children
|
|
904
|
+
}
|
|
905
|
+
));
|
|
906
|
+
function en(e) {
|
|
907
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
908
|
+
}
|
|
909
|
+
var fe = { exports: {} }, Ce = {}, me = { exports: {} }, pe = { exports: {} }, V = {};
|
|
910
|
+
var Fe;
|
|
911
|
+
function tn() {
|
|
912
|
+
if (Fe) return V;
|
|
913
|
+
Fe = 1;
|
|
914
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, s = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, u = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, y = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, m = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, h = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, d = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, g = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, p = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, w = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, b = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, v = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, S = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, T = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
915
|
+
function C(c) {
|
|
916
|
+
if (typeof c == "object" && c !== null) {
|
|
917
|
+
var N = c.$$typeof;
|
|
918
|
+
switch (N) {
|
|
919
|
+
case n:
|
|
920
|
+
switch (c = c.type, c) {
|
|
921
|
+
case y:
|
|
922
|
+
case m:
|
|
923
|
+
case r:
|
|
924
|
+
case o:
|
|
925
|
+
case i:
|
|
926
|
+
case d:
|
|
927
|
+
return c;
|
|
928
|
+
default:
|
|
929
|
+
switch (c = c && c.$$typeof, c) {
|
|
930
|
+
case u:
|
|
931
|
+
case h:
|
|
932
|
+
case w:
|
|
933
|
+
case p:
|
|
934
|
+
case s:
|
|
935
|
+
return c;
|
|
936
|
+
default:
|
|
937
|
+
return N;
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
case t:
|
|
941
|
+
return N;
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
function D(c) {
|
|
946
|
+
return C(c) === m;
|
|
947
|
+
}
|
|
948
|
+
return V.AsyncMode = y, V.ConcurrentMode = m, V.ContextConsumer = u, V.ContextProvider = s, V.Element = n, V.ForwardRef = h, V.Fragment = r, V.Lazy = w, V.Memo = p, V.Portal = t, V.Profiler = o, V.StrictMode = i, V.Suspense = d, V.isAsyncMode = function(c) {
|
|
949
|
+
return D(c) || C(c) === y;
|
|
950
|
+
}, V.isConcurrentMode = D, V.isContextConsumer = function(c) {
|
|
951
|
+
return C(c) === u;
|
|
952
|
+
}, V.isContextProvider = function(c) {
|
|
953
|
+
return C(c) === s;
|
|
954
|
+
}, V.isElement = function(c) {
|
|
955
|
+
return typeof c == "object" && c !== null && c.$$typeof === n;
|
|
956
|
+
}, V.isForwardRef = function(c) {
|
|
957
|
+
return C(c) === h;
|
|
958
|
+
}, V.isFragment = function(c) {
|
|
959
|
+
return C(c) === r;
|
|
960
|
+
}, V.isLazy = function(c) {
|
|
961
|
+
return C(c) === w;
|
|
962
|
+
}, V.isMemo = function(c) {
|
|
963
|
+
return C(c) === p;
|
|
964
|
+
}, V.isPortal = function(c) {
|
|
965
|
+
return C(c) === t;
|
|
966
|
+
}, V.isProfiler = function(c) {
|
|
967
|
+
return C(c) === o;
|
|
968
|
+
}, V.isStrictMode = function(c) {
|
|
969
|
+
return C(c) === i;
|
|
970
|
+
}, V.isSuspense = function(c) {
|
|
971
|
+
return C(c) === d;
|
|
972
|
+
}, V.isValidElementType = function(c) {
|
|
973
|
+
return typeof c == "string" || typeof c == "function" || c === r || c === m || c === o || c === i || c === d || c === g || typeof c == "object" && c !== null && (c.$$typeof === w || c.$$typeof === p || c.$$typeof === s || c.$$typeof === u || c.$$typeof === h || c.$$typeof === v || c.$$typeof === S || c.$$typeof === T || c.$$typeof === b);
|
|
974
|
+
}, V.typeOf = C, V;
|
|
975
|
+
}
|
|
976
|
+
var Y = {};
|
|
977
|
+
var Ue;
|
|
978
|
+
function nn() {
|
|
979
|
+
return Ue || (Ue = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
980
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, s = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, u = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, y = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, m = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, h = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, d = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, g = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, p = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, w = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, b = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, v = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, S = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, T = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
981
|
+
function C(_) {
|
|
982
|
+
return typeof _ == "string" || typeof _ == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
983
|
+
_ === r || _ === m || _ === o || _ === i || _ === d || _ === g || typeof _ == "object" && _ !== null && (_.$$typeof === w || _.$$typeof === p || _.$$typeof === s || _.$$typeof === u || _.$$typeof === h || _.$$typeof === v || _.$$typeof === S || _.$$typeof === T || _.$$typeof === b);
|
|
984
|
+
}
|
|
985
|
+
function D(_) {
|
|
986
|
+
if (typeof _ == "object" && _ !== null) {
|
|
987
|
+
var te = _.$$typeof;
|
|
988
|
+
switch (te) {
|
|
989
|
+
case n:
|
|
990
|
+
var ge = _.type;
|
|
991
|
+
switch (ge) {
|
|
992
|
+
case y:
|
|
993
|
+
case m:
|
|
994
|
+
case r:
|
|
995
|
+
case o:
|
|
996
|
+
case i:
|
|
997
|
+
case d:
|
|
998
|
+
return ge;
|
|
999
|
+
default:
|
|
1000
|
+
var ke = ge && ge.$$typeof;
|
|
1001
|
+
switch (ke) {
|
|
1002
|
+
case u:
|
|
1003
|
+
case h:
|
|
1004
|
+
case w:
|
|
1005
|
+
case p:
|
|
1006
|
+
case s:
|
|
1007
|
+
return ke;
|
|
1008
|
+
default:
|
|
1009
|
+
return te;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
case t:
|
|
1013
|
+
return te;
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
var c = y, N = m, l = u, f = s, P = n, $ = h, O = r, E = w, z = p, X = t, Q = o, H = i, ee = d, ae = !1;
|
|
1018
|
+
function de(_) {
|
|
1019
|
+
return ae || (ae = !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(_) || D(_) === y;
|
|
1020
|
+
}
|
|
1021
|
+
function x(_) {
|
|
1022
|
+
return D(_) === m;
|
|
1023
|
+
}
|
|
1024
|
+
function M(_) {
|
|
1025
|
+
return D(_) === u;
|
|
1026
|
+
}
|
|
1027
|
+
function A(_) {
|
|
1028
|
+
return D(_) === s;
|
|
1029
|
+
}
|
|
1030
|
+
function k(_) {
|
|
1031
|
+
return typeof _ == "object" && _ !== null && _.$$typeof === n;
|
|
1032
|
+
}
|
|
1033
|
+
function W(_) {
|
|
1034
|
+
return D(_) === h;
|
|
1035
|
+
}
|
|
1036
|
+
function L(_) {
|
|
1037
|
+
return D(_) === r;
|
|
1038
|
+
}
|
|
1039
|
+
function R(_) {
|
|
1040
|
+
return D(_) === w;
|
|
1041
|
+
}
|
|
1042
|
+
function j(_) {
|
|
1043
|
+
return D(_) === p;
|
|
1044
|
+
}
|
|
1045
|
+
function F(_) {
|
|
1046
|
+
return D(_) === t;
|
|
1047
|
+
}
|
|
1048
|
+
function q(_) {
|
|
1049
|
+
return D(_) === o;
|
|
1050
|
+
}
|
|
1051
|
+
function U(_) {
|
|
1052
|
+
return D(_) === i;
|
|
1053
|
+
}
|
|
1054
|
+
function G(_) {
|
|
1055
|
+
return D(_) === d;
|
|
1056
|
+
}
|
|
1057
|
+
Y.AsyncMode = c, Y.ConcurrentMode = N, Y.ContextConsumer = l, Y.ContextProvider = f, Y.Element = P, Y.ForwardRef = $, Y.Fragment = O, Y.Lazy = E, Y.Memo = z, Y.Portal = X, Y.Profiler = Q, Y.StrictMode = H, Y.Suspense = ee, Y.isAsyncMode = de, Y.isConcurrentMode = x, Y.isContextConsumer = M, Y.isContextProvider = A, Y.isElement = k, Y.isForwardRef = W, Y.isFragment = L, Y.isLazy = R, Y.isMemo = j, Y.isPortal = F, Y.isProfiler = q, Y.isStrictMode = U, Y.isSuspense = G, Y.isValidElementType = C, Y.typeOf = D;
|
|
1058
|
+
})()), Y;
|
|
1059
|
+
}
|
|
1060
|
+
var Ve;
|
|
1061
|
+
function mt() {
|
|
1062
|
+
return Ve || (Ve = 1, process.env.NODE_ENV === "production" ? pe.exports = tn() : pe.exports = nn()), pe.exports;
|
|
1063
|
+
}
|
|
1064
|
+
var De, Ye;
|
|
1065
|
+
function rn() {
|
|
1066
|
+
if (Ye) return De;
|
|
1067
|
+
Ye = 1;
|
|
1068
|
+
var e = Object.getOwnPropertySymbols, n = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
|
|
1069
|
+
function r(o) {
|
|
1070
|
+
if (o == null)
|
|
1071
|
+
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
1072
|
+
return Object(o);
|
|
1073
|
+
}
|
|
1074
|
+
function i() {
|
|
1075
|
+
try {
|
|
1076
|
+
if (!Object.assign)
|
|
1077
|
+
return !1;
|
|
1078
|
+
var o = new String("abc");
|
|
1079
|
+
if (o[5] = "de", Object.getOwnPropertyNames(o)[0] === "5")
|
|
1080
|
+
return !1;
|
|
1081
|
+
for (var s = {}, u = 0; u < 10; u++)
|
|
1082
|
+
s["_" + String.fromCharCode(u)] = u;
|
|
1083
|
+
var y = Object.getOwnPropertyNames(s).map(function(h) {
|
|
1084
|
+
return s[h];
|
|
1085
|
+
});
|
|
1086
|
+
if (y.join("") !== "0123456789")
|
|
1087
|
+
return !1;
|
|
1088
|
+
var m = {};
|
|
1089
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(h) {
|
|
1090
|
+
m[h] = h;
|
|
1091
|
+
}), Object.keys(Object.assign({}, m)).join("") === "abcdefghijklmnopqrst";
|
|
1092
|
+
} catch {
|
|
1093
|
+
return !1;
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
return De = i() ? Object.assign : function(o, s) {
|
|
1097
|
+
for (var u, y = r(o), m, h = 1; h < arguments.length; h++) {
|
|
1098
|
+
u = Object(arguments[h]);
|
|
1099
|
+
for (var d in u)
|
|
1100
|
+
n.call(u, d) && (y[d] = u[d]);
|
|
1101
|
+
if (e) {
|
|
1102
|
+
m = e(u);
|
|
1103
|
+
for (var g = 0; g < m.length; g++)
|
|
1104
|
+
t.call(u, m[g]) && (y[m[g]] = u[m[g]]);
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
return y;
|
|
1108
|
+
}, De;
|
|
1109
|
+
}
|
|
1110
|
+
var Te, qe;
|
|
1111
|
+
function We() {
|
|
1112
|
+
if (qe) return Te;
|
|
1113
|
+
qe = 1;
|
|
1114
|
+
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
1115
|
+
return Te = e, Te;
|
|
1116
|
+
}
|
|
1117
|
+
var Ne, ze;
|
|
1118
|
+
function pt() {
|
|
1119
|
+
return ze || (ze = 1, Ne = Function.call.bind(Object.prototype.hasOwnProperty)), Ne;
|
|
1120
|
+
}
|
|
1121
|
+
var Ee, Be;
|
|
1122
|
+
function on() {
|
|
1123
|
+
if (Be) return Ee;
|
|
1124
|
+
Be = 1;
|
|
1125
|
+
var e = function() {
|
|
1126
|
+
};
|
|
1127
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1128
|
+
var n = /* @__PURE__ */ We(), t = {}, r = /* @__PURE__ */ pt();
|
|
1129
|
+
e = function(o) {
|
|
1130
|
+
var s = "Warning: " + o;
|
|
1131
|
+
typeof console < "u" && console.error(s);
|
|
1132
|
+
try {
|
|
1133
|
+
throw new Error(s);
|
|
1134
|
+
} catch {
|
|
1135
|
+
}
|
|
1136
|
+
};
|
|
1137
|
+
}
|
|
1138
|
+
function i(o, s, u, y, m) {
|
|
1139
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1140
|
+
for (var h in o)
|
|
1141
|
+
if (r(o, h)) {
|
|
1142
|
+
var d;
|
|
1143
|
+
try {
|
|
1144
|
+
if (typeof o[h] != "function") {
|
|
1145
|
+
var g = Error(
|
|
1146
|
+
(y || "React class") + ": " + u + " type `" + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[h] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
1147
|
+
);
|
|
1148
|
+
throw g.name = "Invariant Violation", g;
|
|
1149
|
+
}
|
|
1150
|
+
d = o[h](s, h, y, u, null, n);
|
|
1151
|
+
} catch (w) {
|
|
1152
|
+
d = w;
|
|
1153
|
+
}
|
|
1154
|
+
if (d && !(d instanceof Error) && e(
|
|
1155
|
+
(y || "React class") + ": type specification of " + u + " `" + h + "` 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)."
|
|
1156
|
+
), d instanceof Error && !(d.message in t)) {
|
|
1157
|
+
t[d.message] = !0;
|
|
1158
|
+
var p = m ? m() : "";
|
|
1159
|
+
e(
|
|
1160
|
+
"Failed " + u + " type: " + d.message + (p ?? "")
|
|
1161
|
+
);
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
return i.resetWarningCache = function() {
|
|
1167
|
+
process.env.NODE_ENV !== "production" && (t = {});
|
|
1168
|
+
}, Ee = i, Ee;
|
|
1169
|
+
}
|
|
1170
|
+
var _e, Ke;
|
|
1171
|
+
function an() {
|
|
1172
|
+
if (Ke) return _e;
|
|
1173
|
+
Ke = 1;
|
|
1174
|
+
var e = mt(), n = rn(), t = /* @__PURE__ */ We(), r = /* @__PURE__ */ pt(), i = /* @__PURE__ */ on(), o = function() {
|
|
1175
|
+
};
|
|
1176
|
+
process.env.NODE_ENV !== "production" && (o = function(u) {
|
|
1177
|
+
var y = "Warning: " + u;
|
|
1178
|
+
typeof console < "u" && console.error(y);
|
|
1179
|
+
try {
|
|
1180
|
+
throw new Error(y);
|
|
1181
|
+
} catch {
|
|
1182
|
+
}
|
|
1183
|
+
});
|
|
1184
|
+
function s() {
|
|
1185
|
+
return null;
|
|
1186
|
+
}
|
|
1187
|
+
return _e = function(u, y) {
|
|
1188
|
+
var m = typeof Symbol == "function" && Symbol.iterator, h = "@@iterator";
|
|
1189
|
+
function d(x) {
|
|
1190
|
+
var M = x && (m && x[m] || x[h]);
|
|
1191
|
+
if (typeof M == "function")
|
|
1192
|
+
return M;
|
|
1193
|
+
}
|
|
1194
|
+
var g = "<<anonymous>>", p = {
|
|
1195
|
+
array: S("array"),
|
|
1196
|
+
bigint: S("bigint"),
|
|
1197
|
+
bool: S("boolean"),
|
|
1198
|
+
func: S("function"),
|
|
1199
|
+
number: S("number"),
|
|
1200
|
+
object: S("object"),
|
|
1201
|
+
string: S("string"),
|
|
1202
|
+
symbol: S("symbol"),
|
|
1203
|
+
any: T(),
|
|
1204
|
+
arrayOf: C,
|
|
1205
|
+
element: D(),
|
|
1206
|
+
elementType: c(),
|
|
1207
|
+
instanceOf: N,
|
|
1208
|
+
node: $(),
|
|
1209
|
+
objectOf: f,
|
|
1210
|
+
oneOf: l,
|
|
1211
|
+
oneOfType: P,
|
|
1212
|
+
shape: E,
|
|
1213
|
+
exact: z
|
|
1214
|
+
};
|
|
1215
|
+
function w(x, M) {
|
|
1216
|
+
return x === M ? x !== 0 || 1 / x === 1 / M : x !== x && M !== M;
|
|
1217
|
+
}
|
|
1218
|
+
function b(x, M) {
|
|
1219
|
+
this.message = x, this.data = M && typeof M == "object" ? M : {}, this.stack = "";
|
|
1220
|
+
}
|
|
1221
|
+
b.prototype = Error.prototype;
|
|
1222
|
+
function v(x) {
|
|
1223
|
+
if (process.env.NODE_ENV !== "production")
|
|
1224
|
+
var M = {}, A = 0;
|
|
1225
|
+
function k(L, R, j, F, q, U, G) {
|
|
1226
|
+
if (F = F || g, U = U || j, G !== t) {
|
|
1227
|
+
if (y) {
|
|
1228
|
+
var _ = new Error(
|
|
1229
|
+
"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"
|
|
1230
|
+
);
|
|
1231
|
+
throw _.name = "Invariant Violation", _;
|
|
1232
|
+
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
1233
|
+
var te = F + ":" + j;
|
|
1234
|
+
!M[te] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
1235
|
+
A < 3 && (o(
|
|
1236
|
+
"You are manually calling a React.PropTypes validation function for the `" + U + "` prop on `" + F + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
1237
|
+
), M[te] = !0, A++);
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
return R[j] == null ? L ? R[j] === null ? new b("The " + q + " `" + U + "` is marked as required " + ("in `" + F + "`, but its value is `null`.")) : new b("The " + q + " `" + U + "` is marked as required in " + ("`" + F + "`, but its value is `undefined`.")) : null : x(R, j, F, q, U);
|
|
1241
|
+
}
|
|
1242
|
+
var W = k.bind(null, !1);
|
|
1243
|
+
return W.isRequired = k.bind(null, !0), W;
|
|
1244
|
+
}
|
|
1245
|
+
function S(x) {
|
|
1246
|
+
function M(A, k, W, L, R, j) {
|
|
1247
|
+
var F = A[k], q = H(F);
|
|
1248
|
+
if (q !== x) {
|
|
1249
|
+
var U = ee(F);
|
|
1250
|
+
return new b(
|
|
1251
|
+
"Invalid " + L + " `" + R + "` of type " + ("`" + U + "` supplied to `" + W + "`, expected ") + ("`" + x + "`."),
|
|
1252
|
+
{ expectedType: x }
|
|
1253
|
+
);
|
|
1254
|
+
}
|
|
1255
|
+
return null;
|
|
1256
|
+
}
|
|
1257
|
+
return v(M);
|
|
1258
|
+
}
|
|
1259
|
+
function T() {
|
|
1260
|
+
return v(s);
|
|
1261
|
+
}
|
|
1262
|
+
function C(x) {
|
|
1263
|
+
function M(A, k, W, L, R) {
|
|
1264
|
+
if (typeof x != "function")
|
|
1265
|
+
return new b("Property `" + R + "` of component `" + W + "` has invalid PropType notation inside arrayOf.");
|
|
1266
|
+
var j = A[k];
|
|
1267
|
+
if (!Array.isArray(j)) {
|
|
1268
|
+
var F = H(j);
|
|
1269
|
+
return new b("Invalid " + L + " `" + R + "` of type " + ("`" + F + "` supplied to `" + W + "`, expected an array."));
|
|
1270
|
+
}
|
|
1271
|
+
for (var q = 0; q < j.length; q++) {
|
|
1272
|
+
var U = x(j, q, W, L, R + "[" + q + "]", t);
|
|
1273
|
+
if (U instanceof Error)
|
|
1274
|
+
return U;
|
|
1275
|
+
}
|
|
1276
|
+
return null;
|
|
1277
|
+
}
|
|
1278
|
+
return v(M);
|
|
1279
|
+
}
|
|
1280
|
+
function D() {
|
|
1281
|
+
function x(M, A, k, W, L) {
|
|
1282
|
+
var R = M[A];
|
|
1283
|
+
if (!u(R)) {
|
|
1284
|
+
var j = H(R);
|
|
1285
|
+
return new b("Invalid " + W + " `" + L + "` of type " + ("`" + j + "` supplied to `" + k + "`, expected a single ReactElement."));
|
|
1286
|
+
}
|
|
1287
|
+
return null;
|
|
1288
|
+
}
|
|
1289
|
+
return v(x);
|
|
1290
|
+
}
|
|
1291
|
+
function c() {
|
|
1292
|
+
function x(M, A, k, W, L) {
|
|
1293
|
+
var R = M[A];
|
|
1294
|
+
if (!e.isValidElementType(R)) {
|
|
1295
|
+
var j = H(R);
|
|
1296
|
+
return new b("Invalid " + W + " `" + L + "` of type " + ("`" + j + "` supplied to `" + k + "`, expected a single ReactElement type."));
|
|
1297
|
+
}
|
|
1298
|
+
return null;
|
|
1299
|
+
}
|
|
1300
|
+
return v(x);
|
|
1301
|
+
}
|
|
1302
|
+
function N(x) {
|
|
1303
|
+
function M(A, k, W, L, R) {
|
|
1304
|
+
if (!(A[k] instanceof x)) {
|
|
1305
|
+
var j = x.name || g, F = de(A[k]);
|
|
1306
|
+
return new b("Invalid " + L + " `" + R + "` of type " + ("`" + F + "` supplied to `" + W + "`, expected ") + ("instance of `" + j + "`."));
|
|
1307
|
+
}
|
|
1308
|
+
return null;
|
|
1309
|
+
}
|
|
1310
|
+
return v(M);
|
|
1311
|
+
}
|
|
1312
|
+
function l(x) {
|
|
1313
|
+
if (!Array.isArray(x))
|
|
1314
|
+
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
|
|
1315
|
+
"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])."
|
|
1316
|
+
) : o("Invalid argument supplied to oneOf, expected an array.")), s;
|
|
1317
|
+
function M(A, k, W, L, R) {
|
|
1318
|
+
for (var j = A[k], F = 0; F < x.length; F++)
|
|
1319
|
+
if (w(j, x[F]))
|
|
1320
|
+
return null;
|
|
1321
|
+
var q = JSON.stringify(x, function(G, _) {
|
|
1322
|
+
var te = ee(_);
|
|
1323
|
+
return te === "symbol" ? String(_) : _;
|
|
1324
|
+
});
|
|
1325
|
+
return new b("Invalid " + L + " `" + R + "` of value `" + String(j) + "` " + ("supplied to `" + W + "`, expected one of " + q + "."));
|
|
1326
|
+
}
|
|
1327
|
+
return v(M);
|
|
1328
|
+
}
|
|
1329
|
+
function f(x) {
|
|
1330
|
+
function M(A, k, W, L, R) {
|
|
1331
|
+
if (typeof x != "function")
|
|
1332
|
+
return new b("Property `" + R + "` of component `" + W + "` has invalid PropType notation inside objectOf.");
|
|
1333
|
+
var j = A[k], F = H(j);
|
|
1334
|
+
if (F !== "object")
|
|
1335
|
+
return new b("Invalid " + L + " `" + R + "` of type " + ("`" + F + "` supplied to `" + W + "`, expected an object."));
|
|
1336
|
+
for (var q in j)
|
|
1337
|
+
if (r(j, q)) {
|
|
1338
|
+
var U = x(j, q, W, L, R + "." + q, t);
|
|
1339
|
+
if (U instanceof Error)
|
|
1340
|
+
return U;
|
|
1341
|
+
}
|
|
1342
|
+
return null;
|
|
1343
|
+
}
|
|
1344
|
+
return v(M);
|
|
1345
|
+
}
|
|
1346
|
+
function P(x) {
|
|
1347
|
+
if (!Array.isArray(x))
|
|
1348
|
+
return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), s;
|
|
1349
|
+
for (var M = 0; M < x.length; M++) {
|
|
1350
|
+
var A = x[M];
|
|
1351
|
+
if (typeof A != "function")
|
|
1352
|
+
return o(
|
|
1353
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ae(A) + " at index " + M + "."
|
|
1354
|
+
), s;
|
|
1355
|
+
}
|
|
1356
|
+
function k(W, L, R, j, F) {
|
|
1357
|
+
for (var q = [], U = 0; U < x.length; U++) {
|
|
1358
|
+
var G = x[U], _ = G(W, L, R, j, F, t);
|
|
1359
|
+
if (_ == null)
|
|
1360
|
+
return null;
|
|
1361
|
+
_.data && r(_.data, "expectedType") && q.push(_.data.expectedType);
|
|
1362
|
+
}
|
|
1363
|
+
var te = q.length > 0 ? ", expected one of type [" + q.join(", ") + "]" : "";
|
|
1364
|
+
return new b("Invalid " + j + " `" + F + "` supplied to " + ("`" + R + "`" + te + "."));
|
|
1365
|
+
}
|
|
1366
|
+
return v(k);
|
|
1367
|
+
}
|
|
1368
|
+
function $() {
|
|
1369
|
+
function x(M, A, k, W, L) {
|
|
1370
|
+
return X(M[A]) ? null : new b("Invalid " + W + " `" + L + "` supplied to " + ("`" + k + "`, expected a ReactNode."));
|
|
1371
|
+
}
|
|
1372
|
+
return v(x);
|
|
1373
|
+
}
|
|
1374
|
+
function O(x, M, A, k, W) {
|
|
1375
|
+
return new b(
|
|
1376
|
+
(x || "React class") + ": " + M + " type `" + A + "." + k + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + W + "`."
|
|
1377
|
+
);
|
|
1378
|
+
}
|
|
1379
|
+
function E(x) {
|
|
1380
|
+
function M(A, k, W, L, R) {
|
|
1381
|
+
var j = A[k], F = H(j);
|
|
1382
|
+
if (F !== "object")
|
|
1383
|
+
return new b("Invalid " + L + " `" + R + "` of type `" + F + "` " + ("supplied to `" + W + "`, expected `object`."));
|
|
1384
|
+
for (var q in x) {
|
|
1385
|
+
var U = x[q];
|
|
1386
|
+
if (typeof U != "function")
|
|
1387
|
+
return O(W, L, R, q, ee(U));
|
|
1388
|
+
var G = U(j, q, W, L, R + "." + q, t);
|
|
1389
|
+
if (G)
|
|
1390
|
+
return G;
|
|
1391
|
+
}
|
|
1392
|
+
return null;
|
|
1393
|
+
}
|
|
1394
|
+
return v(M);
|
|
1395
|
+
}
|
|
1396
|
+
function z(x) {
|
|
1397
|
+
function M(A, k, W, L, R) {
|
|
1398
|
+
var j = A[k], F = H(j);
|
|
1399
|
+
if (F !== "object")
|
|
1400
|
+
return new b("Invalid " + L + " `" + R + "` of type `" + F + "` " + ("supplied to `" + W + "`, expected `object`."));
|
|
1401
|
+
var q = n({}, A[k], x);
|
|
1402
|
+
for (var U in q) {
|
|
1403
|
+
var G = x[U];
|
|
1404
|
+
if (r(x, U) && typeof G != "function")
|
|
1405
|
+
return O(W, L, R, U, ee(G));
|
|
1406
|
+
if (!G)
|
|
1407
|
+
return new b(
|
|
1408
|
+
"Invalid " + L + " `" + R + "` key `" + U + "` supplied to `" + W + "`.\nBad object: " + JSON.stringify(A[k], null, " ") + `
|
|
1409
|
+
Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
1410
|
+
);
|
|
1411
|
+
var _ = G(j, U, W, L, R + "." + U, t);
|
|
1412
|
+
if (_)
|
|
1413
|
+
return _;
|
|
1414
|
+
}
|
|
1415
|
+
return null;
|
|
1416
|
+
}
|
|
1417
|
+
return v(M);
|
|
1418
|
+
}
|
|
1419
|
+
function X(x) {
|
|
1420
|
+
switch (typeof x) {
|
|
1421
|
+
case "number":
|
|
1422
|
+
case "string":
|
|
1423
|
+
case "undefined":
|
|
1424
|
+
return !0;
|
|
1425
|
+
case "boolean":
|
|
1426
|
+
return !x;
|
|
1427
|
+
case "object":
|
|
1428
|
+
if (Array.isArray(x))
|
|
1429
|
+
return x.every(X);
|
|
1430
|
+
if (x === null || u(x))
|
|
1431
|
+
return !0;
|
|
1432
|
+
var M = d(x);
|
|
1433
|
+
if (M) {
|
|
1434
|
+
var A = M.call(x), k;
|
|
1435
|
+
if (M !== x.entries) {
|
|
1436
|
+
for (; !(k = A.next()).done; )
|
|
1437
|
+
if (!X(k.value))
|
|
1438
|
+
return !1;
|
|
1439
|
+
} else
|
|
1440
|
+
for (; !(k = A.next()).done; ) {
|
|
1441
|
+
var W = k.value;
|
|
1442
|
+
if (W && !X(W[1]))
|
|
1443
|
+
return !1;
|
|
1444
|
+
}
|
|
1445
|
+
} else
|
|
1446
|
+
return !1;
|
|
1447
|
+
return !0;
|
|
1448
|
+
default:
|
|
1449
|
+
return !1;
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
function Q(x, M) {
|
|
1453
|
+
return x === "symbol" ? !0 : M ? M["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && M instanceof Symbol : !1;
|
|
1454
|
+
}
|
|
1455
|
+
function H(x) {
|
|
1456
|
+
var M = typeof x;
|
|
1457
|
+
return Array.isArray(x) ? "array" : x instanceof RegExp ? "object" : Q(M, x) ? "symbol" : M;
|
|
1458
|
+
}
|
|
1459
|
+
function ee(x) {
|
|
1460
|
+
if (typeof x > "u" || x === null)
|
|
1461
|
+
return "" + x;
|
|
1462
|
+
var M = H(x);
|
|
1463
|
+
if (M === "object") {
|
|
1464
|
+
if (x instanceof Date)
|
|
1465
|
+
return "date";
|
|
1466
|
+
if (x instanceof RegExp)
|
|
1467
|
+
return "regexp";
|
|
1468
|
+
}
|
|
1469
|
+
return M;
|
|
1470
|
+
}
|
|
1471
|
+
function ae(x) {
|
|
1472
|
+
var M = ee(x);
|
|
1473
|
+
switch (M) {
|
|
1474
|
+
case "array":
|
|
1475
|
+
case "object":
|
|
1476
|
+
return "an " + M;
|
|
1477
|
+
case "boolean":
|
|
1478
|
+
case "date":
|
|
1479
|
+
case "regexp":
|
|
1480
|
+
return "a " + M;
|
|
1481
|
+
default:
|
|
1482
|
+
return M;
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
function de(x) {
|
|
1486
|
+
return !x.constructor || !x.constructor.name ? g : x.constructor.name;
|
|
1487
|
+
}
|
|
1488
|
+
return p.checkPropTypes = i, p.resetWarningCache = i.resetWarningCache, p.PropTypes = p, p;
|
|
1489
|
+
}, _e;
|
|
1490
|
+
}
|
|
1491
|
+
var Me, He;
|
|
1492
|
+
function sn() {
|
|
1493
|
+
if (He) return Me;
|
|
1494
|
+
He = 1;
|
|
1495
|
+
var e = /* @__PURE__ */ We();
|
|
1496
|
+
function n() {
|
|
1497
|
+
}
|
|
1498
|
+
function t() {
|
|
1499
|
+
}
|
|
1500
|
+
return t.resetWarningCache = n, Me = function() {
|
|
1501
|
+
function r(s, u, y, m, h, d) {
|
|
1502
|
+
if (d !== e) {
|
|
1503
|
+
var g = new Error(
|
|
1504
|
+
"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"
|
|
1505
|
+
);
|
|
1506
|
+
throw g.name = "Invariant Violation", g;
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
r.isRequired = r;
|
|
1510
|
+
function i() {
|
|
1511
|
+
return r;
|
|
1512
|
+
}
|
|
1513
|
+
var o = {
|
|
1514
|
+
array: r,
|
|
1515
|
+
bigint: r,
|
|
1516
|
+
bool: r,
|
|
1517
|
+
func: r,
|
|
1518
|
+
number: r,
|
|
1519
|
+
object: r,
|
|
1520
|
+
string: r,
|
|
1521
|
+
symbol: r,
|
|
1522
|
+
any: r,
|
|
1523
|
+
arrayOf: i,
|
|
1524
|
+
element: r,
|
|
1525
|
+
elementType: r,
|
|
1526
|
+
instanceOf: i,
|
|
1527
|
+
node: r,
|
|
1528
|
+
objectOf: i,
|
|
1529
|
+
oneOf: i,
|
|
1530
|
+
oneOfType: i,
|
|
1531
|
+
shape: i,
|
|
1532
|
+
exact: i,
|
|
1533
|
+
checkPropTypes: t,
|
|
1534
|
+
resetWarningCache: n
|
|
1535
|
+
};
|
|
1536
|
+
return o.PropTypes = o, o;
|
|
1537
|
+
}, Me;
|
|
1538
|
+
}
|
|
1539
|
+
var Xe;
|
|
1540
|
+
function yt() {
|
|
1541
|
+
if (Xe) return me.exports;
|
|
1542
|
+
if (Xe = 1, process.env.NODE_ENV !== "production") {
|
|
1543
|
+
var e = mt(), n = !0;
|
|
1544
|
+
me.exports = /* @__PURE__ */ an()(e.isElement, n);
|
|
1545
|
+
} else
|
|
1546
|
+
me.exports = /* @__PURE__ */ sn()();
|
|
1547
|
+
return me.exports;
|
|
1548
|
+
}
|
|
1549
|
+
var ye = { exports: {} }, Ge;
|
|
1550
|
+
function ln() {
|
|
1551
|
+
if (Ge) return ye.exports;
|
|
1552
|
+
Ge = 1;
|
|
1553
|
+
function e(t) {
|
|
1554
|
+
var r, i, o = "";
|
|
1555
|
+
if (typeof t == "string" || typeof t == "number") o += t;
|
|
1556
|
+
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
1557
|
+
var s = t.length;
|
|
1558
|
+
for (r = 0; r < s; r++) t[r] && (i = e(t[r])) && (o && (o += " "), o += i);
|
|
1559
|
+
} else for (i in t) t[i] && (o && (o += " "), o += i);
|
|
1560
|
+
return o;
|
|
1561
|
+
}
|
|
1562
|
+
function n() {
|
|
1563
|
+
for (var t, r, i = 0, o = "", s = arguments.length; i < s; i++) (t = arguments[i]) && (r = e(t)) && (o && (o += " "), o += r);
|
|
1564
|
+
return o;
|
|
1565
|
+
}
|
|
1566
|
+
return ye.exports = n, ye.exports.clsx = n, ye.exports;
|
|
1567
|
+
}
|
|
1568
|
+
var B = {}, oe = {}, Ze;
|
|
1569
|
+
function xe() {
|
|
1570
|
+
if (Ze) return oe;
|
|
1571
|
+
Ze = 1, Object.defineProperty(oe, "__esModule", {
|
|
1572
|
+
value: !0
|
|
1573
|
+
}), oe.dontSetMe = i, oe.findInArray = e, oe.int = r, oe.isFunction = n, oe.isNum = t;
|
|
1574
|
+
function e(o, s) {
|
|
1575
|
+
for (let u = 0, y = o.length; u < y; u++)
|
|
1576
|
+
if (s.apply(s, [o[u], u, o])) return o[u];
|
|
1577
|
+
}
|
|
1578
|
+
function n(o) {
|
|
1579
|
+
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Function]";
|
|
1580
|
+
}
|
|
1581
|
+
function t(o) {
|
|
1582
|
+
return typeof o == "number" && !isNaN(o);
|
|
1583
|
+
}
|
|
1584
|
+
function r(o) {
|
|
1585
|
+
return parseInt(o, 10);
|
|
1586
|
+
}
|
|
1587
|
+
function i(o, s, u) {
|
|
1588
|
+
if (o[s])
|
|
1589
|
+
return new Error(`Invalid prop ${s} passed to ${u} - do not set this, set it on the child.`);
|
|
1590
|
+
}
|
|
1591
|
+
return oe;
|
|
1592
|
+
}
|
|
1593
|
+
var ie = {}, Je;
|
|
1594
|
+
function cn() {
|
|
1595
|
+
if (Je) return ie;
|
|
1596
|
+
Je = 1, Object.defineProperty(ie, "__esModule", {
|
|
1597
|
+
value: !0
|
|
1598
|
+
}), ie.browserPrefixToKey = t, ie.browserPrefixToStyle = r, ie.default = void 0, ie.getPrefix = n;
|
|
1599
|
+
const e = ["Moz", "Webkit", "O", "ms"];
|
|
1600
|
+
function n() {
|
|
1601
|
+
let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
|
|
1602
|
+
if (typeof window > "u") return "";
|
|
1603
|
+
const s = window.document?.documentElement?.style;
|
|
1604
|
+
if (!s || o in s) return "";
|
|
1605
|
+
for (let u = 0; u < e.length; u++)
|
|
1606
|
+
if (t(o, e[u]) in s) return e[u];
|
|
1607
|
+
return "";
|
|
1608
|
+
}
|
|
1609
|
+
function t(o, s) {
|
|
1610
|
+
return s ? `${s}${i(o)}` : o;
|
|
1611
|
+
}
|
|
1612
|
+
function r(o, s) {
|
|
1613
|
+
return s ? `-${s.toLowerCase()}-${o}` : o;
|
|
1614
|
+
}
|
|
1615
|
+
function i(o) {
|
|
1616
|
+
let s = "", u = !0;
|
|
1617
|
+
for (let y = 0; y < o.length; y++)
|
|
1618
|
+
u ? (s += o[y].toUpperCase(), u = !1) : o[y] === "-" ? u = !0 : s += o[y];
|
|
1619
|
+
return s;
|
|
1620
|
+
}
|
|
1621
|
+
return ie.default = n(), ie;
|
|
1622
|
+
}
|
|
1623
|
+
var Qe;
|
|
1624
|
+
function Oe() {
|
|
1625
|
+
if (Qe) return B;
|
|
1626
|
+
Qe = 1, Object.defineProperty(B, "__esModule", {
|
|
1627
|
+
value: !0
|
|
1628
|
+
}), B.addClassName = c, B.addEvent = s, B.addUserSelectStyles = T, B.createCSSTransform = p, B.createSVGTransform = w, B.getTouch = v, B.getTouchIdentifier = S, B.getTranslation = b, B.innerHeight = h, B.innerWidth = d, B.matchesSelector = i, B.matchesSelectorAndParentsTo = o, B.offsetXYFromParent = g, B.outerHeight = y, B.outerWidth = m, B.removeClassName = N, B.removeEvent = u, B.scheduleRemoveUserSelectStyles = C;
|
|
1629
|
+
var e = xe(), n = t(cn());
|
|
1630
|
+
function t(l, f) {
|
|
1631
|
+
if (typeof WeakMap == "function") var P = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakMap();
|
|
1632
|
+
return (t = function(O, E) {
|
|
1633
|
+
if (!E && O && O.__esModule) return O;
|
|
1634
|
+
var z, X, Q = { __proto__: null, default: O };
|
|
1635
|
+
if (O === null || typeof O != "object" && typeof O != "function") return Q;
|
|
1636
|
+
if (z = E ? $ : P) {
|
|
1637
|
+
if (z.has(O)) return z.get(O);
|
|
1638
|
+
z.set(O, Q);
|
|
1639
|
+
}
|
|
1640
|
+
for (const H in O) H !== "default" && {}.hasOwnProperty.call(O, H) && ((X = (z = Object.defineProperty) && Object.getOwnPropertyDescriptor(O, H)) && (X.get || X.set) ? z(Q, H, X) : Q[H] = O[H]);
|
|
1641
|
+
return Q;
|
|
1642
|
+
})(l, f);
|
|
1643
|
+
}
|
|
1644
|
+
let r = "";
|
|
1645
|
+
function i(l, f) {
|
|
1646
|
+
return r || (r = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(P) {
|
|
1647
|
+
return (0, e.isFunction)(l[P]);
|
|
1648
|
+
})), (0, e.isFunction)(l[r]) ? l[r](f) : !1;
|
|
1649
|
+
}
|
|
1650
|
+
function o(l, f, P) {
|
|
1651
|
+
let $ = l;
|
|
1652
|
+
do {
|
|
1653
|
+
if (i($, f)) return !0;
|
|
1654
|
+
if ($ === P) return !1;
|
|
1655
|
+
$ = $.parentNode;
|
|
1656
|
+
} while ($);
|
|
1657
|
+
return !1;
|
|
1658
|
+
}
|
|
1659
|
+
function s(l, f, P, $) {
|
|
1660
|
+
if (!l) return;
|
|
1661
|
+
const O = {
|
|
1662
|
+
capture: !0,
|
|
1663
|
+
...$
|
|
1664
|
+
};
|
|
1665
|
+
l.addEventListener ? l.addEventListener(f, P, O) : l.attachEvent ? l.attachEvent("on" + f, P) : l["on" + f] = P;
|
|
1666
|
+
}
|
|
1667
|
+
function u(l, f, P, $) {
|
|
1668
|
+
if (!l) return;
|
|
1669
|
+
const O = {
|
|
1670
|
+
capture: !0,
|
|
1671
|
+
...$
|
|
1672
|
+
};
|
|
1673
|
+
l.removeEventListener ? l.removeEventListener(f, P, O) : l.detachEvent ? l.detachEvent("on" + f, P) : l["on" + f] = null;
|
|
1674
|
+
}
|
|
1675
|
+
function y(l) {
|
|
1676
|
+
let f = l.clientHeight;
|
|
1677
|
+
const P = l.ownerDocument.defaultView.getComputedStyle(l);
|
|
1678
|
+
return f += (0, e.int)(P.borderTopWidth), f += (0, e.int)(P.borderBottomWidth), f;
|
|
1679
|
+
}
|
|
1680
|
+
function m(l) {
|
|
1681
|
+
let f = l.clientWidth;
|
|
1682
|
+
const P = l.ownerDocument.defaultView.getComputedStyle(l);
|
|
1683
|
+
return f += (0, e.int)(P.borderLeftWidth), f += (0, e.int)(P.borderRightWidth), f;
|
|
1684
|
+
}
|
|
1685
|
+
function h(l) {
|
|
1686
|
+
let f = l.clientHeight;
|
|
1687
|
+
const P = l.ownerDocument.defaultView.getComputedStyle(l);
|
|
1688
|
+
return f -= (0, e.int)(P.paddingTop), f -= (0, e.int)(P.paddingBottom), f;
|
|
1689
|
+
}
|
|
1690
|
+
function d(l) {
|
|
1691
|
+
let f = l.clientWidth;
|
|
1692
|
+
const P = l.ownerDocument.defaultView.getComputedStyle(l);
|
|
1693
|
+
return f -= (0, e.int)(P.paddingLeft), f -= (0, e.int)(P.paddingRight), f;
|
|
1694
|
+
}
|
|
1695
|
+
function g(l, f, P) {
|
|
1696
|
+
const O = f === f.ownerDocument.body ? {
|
|
1697
|
+
left: 0,
|
|
1698
|
+
top: 0
|
|
1699
|
+
} : f.getBoundingClientRect(), E = (l.clientX + f.scrollLeft - O.left) / P, z = (l.clientY + f.scrollTop - O.top) / P;
|
|
1700
|
+
return {
|
|
1701
|
+
x: E,
|
|
1702
|
+
y: z
|
|
1703
|
+
};
|
|
1704
|
+
}
|
|
1705
|
+
function p(l, f) {
|
|
1706
|
+
const P = b(l, f, "px");
|
|
1707
|
+
return {
|
|
1708
|
+
[(0, n.browserPrefixToKey)("transform", n.default)]: P
|
|
1709
|
+
};
|
|
1710
|
+
}
|
|
1711
|
+
function w(l, f) {
|
|
1712
|
+
return b(l, f, "");
|
|
1713
|
+
}
|
|
1714
|
+
function b(l, f, P) {
|
|
1715
|
+
let {
|
|
1716
|
+
x: $,
|
|
1717
|
+
y: O
|
|
1718
|
+
} = l, E = `translate(${$}${P},${O}${P})`;
|
|
1719
|
+
if (f) {
|
|
1720
|
+
const z = `${typeof f.x == "string" ? f.x : f.x + P}`, X = `${typeof f.y == "string" ? f.y : f.y + P}`;
|
|
1721
|
+
E = `translate(${z}, ${X})` + E;
|
|
1722
|
+
}
|
|
1723
|
+
return E;
|
|
1724
|
+
}
|
|
1725
|
+
function v(l, f) {
|
|
1726
|
+
return l.targetTouches && (0, e.findInArray)(l.targetTouches, (P) => f === P.identifier) || l.changedTouches && (0, e.findInArray)(l.changedTouches, (P) => f === P.identifier);
|
|
1727
|
+
}
|
|
1728
|
+
function S(l) {
|
|
1729
|
+
if (l.targetTouches && l.targetTouches[0]) return l.targetTouches[0].identifier;
|
|
1730
|
+
if (l.changedTouches && l.changedTouches[0]) return l.changedTouches[0].identifier;
|
|
1731
|
+
}
|
|
1732
|
+
function T(l) {
|
|
1733
|
+
if (!l) return;
|
|
1734
|
+
let f = l.getElementById("react-draggable-style-el");
|
|
1735
|
+
f || (f = l.createElement("style"), f.type = "text/css", f.id = "react-draggable-style-el", f.innerHTML = `.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
1736
|
+
`, f.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
1737
|
+
`, l.getElementsByTagName("head")[0].appendChild(f)), l.body && c(l.body, "react-draggable-transparent-selection");
|
|
1738
|
+
}
|
|
1739
|
+
function C(l) {
|
|
1740
|
+
window.requestAnimationFrame ? window.requestAnimationFrame(() => {
|
|
1741
|
+
D(l);
|
|
1742
|
+
}) : D(l);
|
|
1743
|
+
}
|
|
1744
|
+
function D(l) {
|
|
1745
|
+
if (l)
|
|
1746
|
+
try {
|
|
1747
|
+
if (l.body && N(l.body, "react-draggable-transparent-selection"), l.selection)
|
|
1748
|
+
l.selection.empty();
|
|
1749
|
+
else {
|
|
1750
|
+
const f = (l.defaultView || window).getSelection();
|
|
1751
|
+
f && f.type !== "Caret" && f.removeAllRanges();
|
|
1752
|
+
}
|
|
1753
|
+
} catch {
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
function c(l, f) {
|
|
1757
|
+
l.classList ? l.classList.add(f) : l.className.match(new RegExp(`(?:^|\\s)${f}(?!\\S)`)) || (l.className += ` ${f}`);
|
|
1758
|
+
}
|
|
1759
|
+
function N(l, f) {
|
|
1760
|
+
l.classList ? l.classList.remove(f) : l.className = l.className.replace(new RegExp(`(?:^|\\s)${f}(?!\\S)`, "g"), "");
|
|
1761
|
+
}
|
|
1762
|
+
return B;
|
|
1763
|
+
}
|
|
1764
|
+
var ne = {}, et;
|
|
1765
|
+
function bt() {
|
|
1766
|
+
if (et) return ne;
|
|
1767
|
+
et = 1, Object.defineProperty(ne, "__esModule", {
|
|
1768
|
+
value: !0
|
|
1769
|
+
}), ne.canDragX = i, ne.canDragY = o, ne.createCoreData = u, ne.createDraggableData = y, ne.getBoundPosition = t, ne.getControlPosition = s, ne.snapToGrid = r;
|
|
1770
|
+
var e = xe(), n = Oe();
|
|
1771
|
+
function t(d, g, p) {
|
|
1772
|
+
if (!d.props.bounds) return [g, p];
|
|
1773
|
+
let {
|
|
1774
|
+
bounds: w
|
|
1775
|
+
} = d.props;
|
|
1776
|
+
w = typeof w == "string" ? w : m(w);
|
|
1777
|
+
const b = h(d);
|
|
1778
|
+
if (typeof w == "string") {
|
|
1779
|
+
const {
|
|
1780
|
+
ownerDocument: v
|
|
1781
|
+
} = b, S = v.defaultView;
|
|
1782
|
+
let T;
|
|
1783
|
+
if (w === "parent" ? T = b.parentNode : T = b.getRootNode().querySelector(w), !(T instanceof S.HTMLElement))
|
|
1784
|
+
throw new Error('Bounds selector "' + w + '" could not find an element.');
|
|
1785
|
+
const C = T, D = S.getComputedStyle(b), c = S.getComputedStyle(C);
|
|
1786
|
+
w = {
|
|
1787
|
+
left: -b.offsetLeft + (0, e.int)(c.paddingLeft) + (0, e.int)(D.marginLeft),
|
|
1788
|
+
top: -b.offsetTop + (0, e.int)(c.paddingTop) + (0, e.int)(D.marginTop),
|
|
1789
|
+
right: (0, n.innerWidth)(C) - (0, n.outerWidth)(b) - b.offsetLeft + (0, e.int)(c.paddingRight) - (0, e.int)(D.marginRight),
|
|
1790
|
+
bottom: (0, n.innerHeight)(C) - (0, n.outerHeight)(b) - b.offsetTop + (0, e.int)(c.paddingBottom) - (0, e.int)(D.marginBottom)
|
|
1791
|
+
};
|
|
1792
|
+
}
|
|
1793
|
+
return (0, e.isNum)(w.right) && (g = Math.min(g, w.right)), (0, e.isNum)(w.bottom) && (p = Math.min(p, w.bottom)), (0, e.isNum)(w.left) && (g = Math.max(g, w.left)), (0, e.isNum)(w.top) && (p = Math.max(p, w.top)), [g, p];
|
|
1794
|
+
}
|
|
1795
|
+
function r(d, g, p) {
|
|
1796
|
+
const w = Math.round(g / d[0]) * d[0], b = Math.round(p / d[1]) * d[1];
|
|
1797
|
+
return [w, b];
|
|
1798
|
+
}
|
|
1799
|
+
function i(d) {
|
|
1800
|
+
return d.props.axis === "both" || d.props.axis === "x";
|
|
1801
|
+
}
|
|
1802
|
+
function o(d) {
|
|
1803
|
+
return d.props.axis === "both" || d.props.axis === "y";
|
|
1804
|
+
}
|
|
1805
|
+
function s(d, g, p) {
|
|
1806
|
+
const w = typeof g == "number" ? (0, n.getTouch)(d, g) : null;
|
|
1807
|
+
if (typeof g == "number" && !w) return null;
|
|
1808
|
+
const b = h(p), v = p.props.offsetParent || b.offsetParent || b.ownerDocument.body;
|
|
1809
|
+
return (0, n.offsetXYFromParent)(w || d, v, p.props.scale);
|
|
1810
|
+
}
|
|
1811
|
+
function u(d, g, p) {
|
|
1812
|
+
const w = !(0, e.isNum)(d.lastX), b = h(d);
|
|
1813
|
+
return w ? {
|
|
1814
|
+
node: b,
|
|
1815
|
+
deltaX: 0,
|
|
1816
|
+
deltaY: 0,
|
|
1817
|
+
lastX: g,
|
|
1818
|
+
lastY: p,
|
|
1819
|
+
x: g,
|
|
1820
|
+
y: p
|
|
1821
|
+
} : {
|
|
1822
|
+
node: b,
|
|
1823
|
+
deltaX: g - d.lastX,
|
|
1824
|
+
deltaY: p - d.lastY,
|
|
1825
|
+
lastX: d.lastX,
|
|
1826
|
+
lastY: d.lastY,
|
|
1827
|
+
x: g,
|
|
1828
|
+
y: p
|
|
1829
|
+
};
|
|
1830
|
+
}
|
|
1831
|
+
function y(d, g) {
|
|
1832
|
+
const p = d.props.scale;
|
|
1833
|
+
return {
|
|
1834
|
+
node: g.node,
|
|
1835
|
+
x: d.state.x + g.deltaX / p,
|
|
1836
|
+
y: d.state.y + g.deltaY / p,
|
|
1837
|
+
deltaX: g.deltaX / p,
|
|
1838
|
+
deltaY: g.deltaY / p,
|
|
1839
|
+
lastX: d.state.x,
|
|
1840
|
+
lastY: d.state.y
|
|
1841
|
+
};
|
|
1842
|
+
}
|
|
1843
|
+
function m(d) {
|
|
1844
|
+
return {
|
|
1845
|
+
left: d.left,
|
|
1846
|
+
top: d.top,
|
|
1847
|
+
right: d.right,
|
|
1848
|
+
bottom: d.bottom
|
|
1849
|
+
};
|
|
1850
|
+
}
|
|
1851
|
+
function h(d) {
|
|
1852
|
+
const g = d.findDOMNode();
|
|
1853
|
+
if (!g)
|
|
1854
|
+
throw new Error("<DraggableCore>: Unmounted during event!");
|
|
1855
|
+
return g;
|
|
1856
|
+
}
|
|
1857
|
+
return ne;
|
|
1858
|
+
}
|
|
1859
|
+
var he = {}, be = {}, tt;
|
|
1860
|
+
function vt() {
|
|
1861
|
+
if (tt) return be;
|
|
1862
|
+
tt = 1, Object.defineProperty(be, "__esModule", {
|
|
1863
|
+
value: !0
|
|
1864
|
+
}), be.default = e;
|
|
1865
|
+
function e() {
|
|
1866
|
+
}
|
|
1867
|
+
return be;
|
|
1868
|
+
}
|
|
1869
|
+
var nt;
|
|
1870
|
+
function dn() {
|
|
1871
|
+
if (nt) return he;
|
|
1872
|
+
nt = 1, Object.defineProperty(he, "__esModule", {
|
|
1873
|
+
value: !0
|
|
1874
|
+
}), he.default = void 0;
|
|
1875
|
+
var e = y(se), n = u(/* @__PURE__ */ yt()), t = u(at), r = Oe(), i = bt(), o = xe(), s = u(vt());
|
|
1876
|
+
function u(b) {
|
|
1877
|
+
return b && b.__esModule ? b : { default: b };
|
|
1878
|
+
}
|
|
1879
|
+
function y(b, v) {
|
|
1880
|
+
if (typeof WeakMap == "function") var S = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap();
|
|
1881
|
+
return (y = function(C, D) {
|
|
1882
|
+
if (!D && C && C.__esModule) return C;
|
|
1883
|
+
var c, N, l = { __proto__: null, default: C };
|
|
1884
|
+
if (C === null || typeof C != "object" && typeof C != "function") return l;
|
|
1885
|
+
if (c = D ? T : S) {
|
|
1886
|
+
if (c.has(C)) return c.get(C);
|
|
1887
|
+
c.set(C, l);
|
|
1888
|
+
}
|
|
1889
|
+
for (const f in C) f !== "default" && {}.hasOwnProperty.call(C, f) && ((N = (c = Object.defineProperty) && Object.getOwnPropertyDescriptor(C, f)) && (N.get || N.set) ? c(l, f, N) : l[f] = C[f]);
|
|
1890
|
+
return l;
|
|
1891
|
+
})(b, v);
|
|
1892
|
+
}
|
|
1893
|
+
function m(b, v, S) {
|
|
1894
|
+
return (v = h(v)) in b ? Object.defineProperty(b, v, { value: S, enumerable: !0, configurable: !0, writable: !0 }) : b[v] = S, b;
|
|
1895
|
+
}
|
|
1896
|
+
function h(b) {
|
|
1897
|
+
var v = d(b, "string");
|
|
1898
|
+
return typeof v == "symbol" ? v : v + "";
|
|
1899
|
+
}
|
|
1900
|
+
function d(b, v) {
|
|
1901
|
+
if (typeof b != "object" || !b) return b;
|
|
1902
|
+
var S = b[Symbol.toPrimitive];
|
|
1903
|
+
if (S !== void 0) {
|
|
1904
|
+
var T = S.call(b, v);
|
|
1905
|
+
if (typeof T != "object") return T;
|
|
1906
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1907
|
+
}
|
|
1908
|
+
return (v === "string" ? String : Number)(b);
|
|
1909
|
+
}
|
|
1910
|
+
const g = {
|
|
1911
|
+
touch: {
|
|
1912
|
+
start: "touchstart",
|
|
1913
|
+
move: "touchmove",
|
|
1914
|
+
stop: "touchend"
|
|
1915
|
+
},
|
|
1916
|
+
mouse: {
|
|
1917
|
+
start: "mousedown",
|
|
1918
|
+
move: "mousemove",
|
|
1919
|
+
stop: "mouseup"
|
|
1920
|
+
}
|
|
1921
|
+
};
|
|
1922
|
+
let p = g.mouse, w = class extends e.Component {
|
|
1923
|
+
constructor() {
|
|
1924
|
+
super(...arguments), m(this, "dragging", !1), m(this, "lastX", NaN), m(this, "lastY", NaN), m(this, "touchIdentifier", null), m(this, "mounted", !1), m(this, "handleDragStart", (v) => {
|
|
1925
|
+
if (this.props.onMouseDown(v), !this.props.allowAnyClick && typeof v.button == "number" && v.button !== 0) return !1;
|
|
1926
|
+
const S = this.findDOMNode();
|
|
1927
|
+
if (!S || !S.ownerDocument || !S.ownerDocument.body)
|
|
1928
|
+
throw new Error("<DraggableCore> not mounted on DragStart!");
|
|
1929
|
+
const {
|
|
1930
|
+
ownerDocument: T
|
|
1931
|
+
} = S;
|
|
1932
|
+
if (this.props.disabled || !(v.target instanceof T.defaultView.Node) || this.props.handle && !(0, r.matchesSelectorAndParentsTo)(v.target, this.props.handle, S) || this.props.cancel && (0, r.matchesSelectorAndParentsTo)(v.target, this.props.cancel, S))
|
|
1933
|
+
return;
|
|
1934
|
+
v.type === "touchstart" && !this.props.allowMobileScroll && v.preventDefault();
|
|
1935
|
+
const C = (0, r.getTouchIdentifier)(v);
|
|
1936
|
+
this.touchIdentifier = C;
|
|
1937
|
+
const D = (0, i.getControlPosition)(v, C, this);
|
|
1938
|
+
if (D == null) return;
|
|
1939
|
+
const {
|
|
1940
|
+
x: c,
|
|
1941
|
+
y: N
|
|
1942
|
+
} = D, l = (0, i.createCoreData)(this, c, N);
|
|
1943
|
+
(0, s.default)("DraggableCore: handleDragStart: %j", l), (0, s.default)("calling", this.props.onStart), !(this.props.onStart(v, l) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, r.addUserSelectStyles)(T), this.dragging = !0, this.lastX = c, this.lastY = N, (0, r.addEvent)(T, p.move, this.handleDrag), (0, r.addEvent)(T, p.stop, this.handleDragStop));
|
|
1944
|
+
}), m(this, "handleDrag", (v) => {
|
|
1945
|
+
const S = (0, i.getControlPosition)(v, this.touchIdentifier, this);
|
|
1946
|
+
if (S == null) return;
|
|
1947
|
+
let {
|
|
1948
|
+
x: T,
|
|
1949
|
+
y: C
|
|
1950
|
+
} = S;
|
|
1951
|
+
if (Array.isArray(this.props.grid)) {
|
|
1952
|
+
let N = T - this.lastX, l = C - this.lastY;
|
|
1953
|
+
if ([N, l] = (0, i.snapToGrid)(this.props.grid, N, l), !N && !l) return;
|
|
1954
|
+
T = this.lastX + N, C = this.lastY + l;
|
|
1955
|
+
}
|
|
1956
|
+
const D = (0, i.createCoreData)(this, T, C);
|
|
1957
|
+
if ((0, s.default)("DraggableCore: handleDrag: %j", D), this.props.onDrag(v, D) === !1 || this.mounted === !1) {
|
|
1958
|
+
try {
|
|
1959
|
+
this.handleDragStop(new MouseEvent("mouseup"));
|
|
1960
|
+
} catch {
|
|
1961
|
+
const l = document.createEvent("MouseEvents");
|
|
1962
|
+
l.initMouseEvent("mouseup", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), this.handleDragStop(l);
|
|
1963
|
+
}
|
|
1964
|
+
return;
|
|
1965
|
+
}
|
|
1966
|
+
this.lastX = T, this.lastY = C;
|
|
1967
|
+
}), m(this, "handleDragStop", (v) => {
|
|
1968
|
+
if (!this.dragging) return;
|
|
1969
|
+
const S = (0, i.getControlPosition)(v, this.touchIdentifier, this);
|
|
1970
|
+
if (S == null) return;
|
|
1971
|
+
let {
|
|
1972
|
+
x: T,
|
|
1973
|
+
y: C
|
|
1974
|
+
} = S;
|
|
1975
|
+
if (Array.isArray(this.props.grid)) {
|
|
1976
|
+
let l = T - this.lastX || 0, f = C - this.lastY || 0;
|
|
1977
|
+
[l, f] = (0, i.snapToGrid)(this.props.grid, l, f), T = this.lastX + l, C = this.lastY + f;
|
|
1978
|
+
}
|
|
1979
|
+
const D = (0, i.createCoreData)(this, T, C);
|
|
1980
|
+
if (this.props.onStop(v, D) === !1 || this.mounted === !1) return !1;
|
|
1981
|
+
const N = this.findDOMNode();
|
|
1982
|
+
N && this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(N.ownerDocument), (0, s.default)("DraggableCore: handleDragStop: %j", D), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, N && ((0, s.default)("DraggableCore: Removing handlers"), (0, r.removeEvent)(N.ownerDocument, p.move, this.handleDrag), (0, r.removeEvent)(N.ownerDocument, p.stop, this.handleDragStop));
|
|
1983
|
+
}), m(this, "onMouseDown", (v) => (p = g.mouse, this.handleDragStart(v))), m(this, "onMouseUp", (v) => (p = g.mouse, this.handleDragStop(v))), m(this, "onTouchStart", (v) => (p = g.touch, this.handleDragStart(v))), m(this, "onTouchEnd", (v) => (p = g.touch, this.handleDragStop(v)));
|
|
1984
|
+
}
|
|
1985
|
+
componentDidMount() {
|
|
1986
|
+
this.mounted = !0;
|
|
1987
|
+
const v = this.findDOMNode();
|
|
1988
|
+
v && (0, r.addEvent)(v, g.touch.start, this.onTouchStart, {
|
|
1989
|
+
passive: !1
|
|
1990
|
+
});
|
|
1991
|
+
}
|
|
1992
|
+
componentWillUnmount() {
|
|
1993
|
+
this.mounted = !1;
|
|
1994
|
+
const v = this.findDOMNode();
|
|
1995
|
+
if (v) {
|
|
1996
|
+
const {
|
|
1997
|
+
ownerDocument: S
|
|
1998
|
+
} = v;
|
|
1999
|
+
(0, r.removeEvent)(S, g.mouse.move, this.handleDrag), (0, r.removeEvent)(S, g.touch.move, this.handleDrag), (0, r.removeEvent)(S, g.mouse.stop, this.handleDragStop), (0, r.removeEvent)(S, g.touch.stop, this.handleDragStop), (0, r.removeEvent)(v, g.touch.start, this.onTouchStart, {
|
|
2000
|
+
passive: !1
|
|
2001
|
+
}), this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(S);
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
2004
|
+
// React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
|
|
2005
|
+
// the underlying DOM node ourselves. See the README for more information.
|
|
2006
|
+
findDOMNode() {
|
|
2007
|
+
return this.props?.nodeRef ? this.props?.nodeRef?.current : t.default.findDOMNode(this);
|
|
2008
|
+
}
|
|
2009
|
+
render() {
|
|
2010
|
+
return /* @__PURE__ */ e.cloneElement(e.Children.only(this.props.children), {
|
|
2011
|
+
// Note: mouseMove handler is attached to document so it will still function
|
|
2012
|
+
// when the user drags quickly and leaves the bounds of the element.
|
|
2013
|
+
onMouseDown: this.onMouseDown,
|
|
2014
|
+
onMouseUp: this.onMouseUp,
|
|
2015
|
+
// onTouchStart is added on `componentDidMount` so they can be added with
|
|
2016
|
+
// {passive: false}, which allows it to cancel. See
|
|
2017
|
+
// https://developers.google.com/web/updates/2017/01/scrolling-intervention
|
|
2018
|
+
onTouchEnd: this.onTouchEnd
|
|
2019
|
+
});
|
|
2020
|
+
}
|
|
2021
|
+
};
|
|
2022
|
+
return he.default = w, m(w, "displayName", "DraggableCore"), m(w, "propTypes", {
|
|
2023
|
+
/**
|
|
2024
|
+
* `allowAnyClick` allows dragging using any mouse button.
|
|
2025
|
+
* By default, we only accept the left button.
|
|
2026
|
+
*
|
|
2027
|
+
* Defaults to `false`.
|
|
2028
|
+
*/
|
|
2029
|
+
allowAnyClick: n.default.bool,
|
|
2030
|
+
/**
|
|
2031
|
+
* `allowMobileScroll` turns off cancellation of the 'touchstart' event
|
|
2032
|
+
* on mobile devices. Only enable this if you are having trouble with click
|
|
2033
|
+
* events. Prefer using 'handle' / 'cancel' instead.
|
|
2034
|
+
*
|
|
2035
|
+
* Defaults to `false`.
|
|
2036
|
+
*/
|
|
2037
|
+
allowMobileScroll: n.default.bool,
|
|
2038
|
+
children: n.default.node.isRequired,
|
|
2039
|
+
/**
|
|
2040
|
+
* `disabled`, if true, stops the <Draggable> from dragging. All handlers,
|
|
2041
|
+
* with the exception of `onMouseDown`, will not fire.
|
|
2042
|
+
*/
|
|
2043
|
+
disabled: n.default.bool,
|
|
2044
|
+
/**
|
|
2045
|
+
* By default, we add 'user-select:none' attributes to the document body
|
|
2046
|
+
* to prevent ugly text selection during drag. If this is causing problems
|
|
2047
|
+
* for your app, set this to `false`.
|
|
2048
|
+
*/
|
|
2049
|
+
enableUserSelectHack: n.default.bool,
|
|
2050
|
+
/**
|
|
2051
|
+
* `offsetParent`, if set, uses the passed DOM node to compute drag offsets
|
|
2052
|
+
* instead of using the parent node.
|
|
2053
|
+
*/
|
|
2054
|
+
offsetParent: function(b, v) {
|
|
2055
|
+
if (b[v] && b[v].nodeType !== 1)
|
|
2056
|
+
throw new Error("Draggable's offsetParent must be a DOM Node.");
|
|
2057
|
+
},
|
|
2058
|
+
/**
|
|
2059
|
+
* `grid` specifies the x and y that dragging should snap to.
|
|
2060
|
+
*/
|
|
2061
|
+
grid: n.default.arrayOf(n.default.number),
|
|
2062
|
+
/**
|
|
2063
|
+
* `handle` specifies a selector to be used as the handle that initiates drag.
|
|
2064
|
+
*
|
|
2065
|
+
* Example:
|
|
2066
|
+
*
|
|
2067
|
+
* ```jsx
|
|
2068
|
+
* let App = React.createClass({
|
|
2069
|
+
* render: function () {
|
|
2070
|
+
* return (
|
|
2071
|
+
* <Draggable handle=".handle">
|
|
2072
|
+
* <div>
|
|
2073
|
+
* <div className="handle">Click me to drag</div>
|
|
2074
|
+
* <div>This is some other content</div>
|
|
2075
|
+
* </div>
|
|
2076
|
+
* </Draggable>
|
|
2077
|
+
* );
|
|
2078
|
+
* }
|
|
2079
|
+
* });
|
|
2080
|
+
* ```
|
|
2081
|
+
*/
|
|
2082
|
+
handle: n.default.string,
|
|
2083
|
+
/**
|
|
2084
|
+
* `cancel` specifies a selector to be used to prevent drag initialization.
|
|
2085
|
+
*
|
|
2086
|
+
* Example:
|
|
2087
|
+
*
|
|
2088
|
+
* ```jsx
|
|
2089
|
+
* let App = React.createClass({
|
|
2090
|
+
* render: function () {
|
|
2091
|
+
* return(
|
|
2092
|
+
* <Draggable cancel=".cancel">
|
|
2093
|
+
* <div>
|
|
2094
|
+
* <div className="cancel">You can't drag from here</div>
|
|
2095
|
+
* <div>Dragging here works fine</div>
|
|
2096
|
+
* </div>
|
|
2097
|
+
* </Draggable>
|
|
2098
|
+
* );
|
|
2099
|
+
* }
|
|
2100
|
+
* });
|
|
2101
|
+
* ```
|
|
2102
|
+
*/
|
|
2103
|
+
cancel: n.default.string,
|
|
2104
|
+
/* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.
|
|
2105
|
+
* Unfortunately, in order for <Draggable> to work properly, we need raw access
|
|
2106
|
+
* to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef`
|
|
2107
|
+
* as in this example:
|
|
2108
|
+
*
|
|
2109
|
+
* function MyComponent() {
|
|
2110
|
+
* const nodeRef = React.useRef(null);
|
|
2111
|
+
* return (
|
|
2112
|
+
* <Draggable nodeRef={nodeRef}>
|
|
2113
|
+
* <div ref={nodeRef}>Example Target</div>
|
|
2114
|
+
* </Draggable>
|
|
2115
|
+
* );
|
|
2116
|
+
* }
|
|
2117
|
+
*
|
|
2118
|
+
* This can be used for arbitrarily nested components, so long as the ref ends up
|
|
2119
|
+
* pointing to the actual child DOM node and not a custom component.
|
|
2120
|
+
*/
|
|
2121
|
+
nodeRef: n.default.object,
|
|
2122
|
+
/**
|
|
2123
|
+
* Called when dragging starts.
|
|
2124
|
+
* If this function returns the boolean false, dragging will be canceled.
|
|
2125
|
+
*/
|
|
2126
|
+
onStart: n.default.func,
|
|
2127
|
+
/**
|
|
2128
|
+
* Called while dragging.
|
|
2129
|
+
* If this function returns the boolean false, dragging will be canceled.
|
|
2130
|
+
*/
|
|
2131
|
+
onDrag: n.default.func,
|
|
2132
|
+
/**
|
|
2133
|
+
* Called when dragging stops.
|
|
2134
|
+
* If this function returns the boolean false, the drag will remain active.
|
|
2135
|
+
*/
|
|
2136
|
+
onStop: n.default.func,
|
|
2137
|
+
/**
|
|
2138
|
+
* A workaround option which can be passed if onMouseDown needs to be accessed,
|
|
2139
|
+
* since it'll always be blocked (as there is internal use of onMouseDown)
|
|
2140
|
+
*/
|
|
2141
|
+
onMouseDown: n.default.func,
|
|
2142
|
+
/**
|
|
2143
|
+
* `scale`, if set, applies scaling while dragging an element
|
|
2144
|
+
*/
|
|
2145
|
+
scale: n.default.number,
|
|
2146
|
+
/**
|
|
2147
|
+
* These properties should be defined on the child, not here.
|
|
2148
|
+
*/
|
|
2149
|
+
className: o.dontSetMe,
|
|
2150
|
+
style: o.dontSetMe,
|
|
2151
|
+
transform: o.dontSetMe
|
|
2152
|
+
}), m(w, "defaultProps", {
|
|
2153
|
+
allowAnyClick: !1,
|
|
2154
|
+
// by default only accept left click
|
|
2155
|
+
allowMobileScroll: !1,
|
|
2156
|
+
disabled: !1,
|
|
2157
|
+
enableUserSelectHack: !0,
|
|
2158
|
+
onStart: function() {
|
|
2159
|
+
},
|
|
2160
|
+
onDrag: function() {
|
|
2161
|
+
},
|
|
2162
|
+
onStop: function() {
|
|
2163
|
+
},
|
|
2164
|
+
onMouseDown: function() {
|
|
2165
|
+
},
|
|
2166
|
+
scale: 1
|
|
2167
|
+
}), he;
|
|
2168
|
+
}
|
|
2169
|
+
var rt;
|
|
2170
|
+
function un() {
|
|
2171
|
+
return rt || (rt = 1, (function(e) {
|
|
2172
|
+
Object.defineProperty(e, "__esModule", {
|
|
2173
|
+
value: !0
|
|
2174
|
+
}), Object.defineProperty(e, "DraggableCore", {
|
|
2175
|
+
enumerable: !0,
|
|
2176
|
+
get: function() {
|
|
2177
|
+
return y.default;
|
|
2178
|
+
}
|
|
2179
|
+
}), e.default = void 0;
|
|
2180
|
+
var n = d(se), t = h(/* @__PURE__ */ yt()), r = h(at), i = ln(), o = Oe(), s = bt(), u = xe(), y = h(dn()), m = h(vt());
|
|
2181
|
+
function h(S) {
|
|
2182
|
+
return S && S.__esModule ? S : { default: S };
|
|
2183
|
+
}
|
|
2184
|
+
function d(S, T) {
|
|
2185
|
+
if (typeof WeakMap == "function") var C = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap();
|
|
2186
|
+
return (d = function(c, N) {
|
|
2187
|
+
if (!N && c && c.__esModule) return c;
|
|
2188
|
+
var l, f, P = { __proto__: null, default: c };
|
|
2189
|
+
if (c === null || typeof c != "object" && typeof c != "function") return P;
|
|
2190
|
+
if (l = N ? D : C) {
|
|
2191
|
+
if (l.has(c)) return l.get(c);
|
|
2192
|
+
l.set(c, P);
|
|
2193
|
+
}
|
|
2194
|
+
for (const $ in c) $ !== "default" && {}.hasOwnProperty.call(c, $) && ((f = (l = Object.defineProperty) && Object.getOwnPropertyDescriptor(c, $)) && (f.get || f.set) ? l(P, $, f) : P[$] = c[$]);
|
|
2195
|
+
return P;
|
|
2196
|
+
})(S, T);
|
|
2197
|
+
}
|
|
2198
|
+
function g() {
|
|
2199
|
+
return g = Object.assign ? Object.assign.bind() : function(S) {
|
|
2200
|
+
for (var T = 1; T < arguments.length; T++) {
|
|
2201
|
+
var C = arguments[T];
|
|
2202
|
+
for (var D in C) ({}).hasOwnProperty.call(C, D) && (S[D] = C[D]);
|
|
2203
|
+
}
|
|
2204
|
+
return S;
|
|
2205
|
+
}, g.apply(null, arguments);
|
|
2206
|
+
}
|
|
2207
|
+
function p(S, T, C) {
|
|
2208
|
+
return (T = w(T)) in S ? Object.defineProperty(S, T, { value: C, enumerable: !0, configurable: !0, writable: !0 }) : S[T] = C, S;
|
|
2209
|
+
}
|
|
2210
|
+
function w(S) {
|
|
2211
|
+
var T = b(S, "string");
|
|
2212
|
+
return typeof T == "symbol" ? T : T + "";
|
|
2213
|
+
}
|
|
2214
|
+
function b(S, T) {
|
|
2215
|
+
if (typeof S != "object" || !S) return S;
|
|
2216
|
+
var C = S[Symbol.toPrimitive];
|
|
2217
|
+
if (C !== void 0) {
|
|
2218
|
+
var D = C.call(S, T);
|
|
2219
|
+
if (typeof D != "object") return D;
|
|
2220
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2221
|
+
}
|
|
2222
|
+
return (T === "string" ? String : Number)(S);
|
|
2223
|
+
}
|
|
2224
|
+
class v extends n.Component {
|
|
2225
|
+
// React 16.3+
|
|
2226
|
+
// Arity (props, state)
|
|
2227
|
+
static getDerivedStateFromProps(T, C) {
|
|
2228
|
+
let {
|
|
2229
|
+
position: D
|
|
2230
|
+
} = T, {
|
|
2231
|
+
prevPropsPosition: c
|
|
2232
|
+
} = C;
|
|
2233
|
+
return D && (!c || D.x !== c.x || D.y !== c.y) ? ((0, m.default)("Draggable: getDerivedStateFromProps %j", {
|
|
2234
|
+
position: D,
|
|
2235
|
+
prevPropsPosition: c
|
|
2236
|
+
}), {
|
|
2237
|
+
x: D.x,
|
|
2238
|
+
y: D.y,
|
|
2239
|
+
prevPropsPosition: {
|
|
2240
|
+
...D
|
|
2241
|
+
}
|
|
2242
|
+
}) : null;
|
|
2243
|
+
}
|
|
2244
|
+
constructor(T) {
|
|
2245
|
+
super(T), p(this, "onDragStart", (C, D) => {
|
|
2246
|
+
if ((0, m.default)("Draggable: onDragStart: %j", D), this.props.onStart(C, (0, s.createDraggableData)(this, D)) === !1) return !1;
|
|
2247
|
+
this.setState({
|
|
2248
|
+
dragging: !0,
|
|
2249
|
+
dragged: !0
|
|
2250
|
+
});
|
|
2251
|
+
}), p(this, "onDrag", (C, D) => {
|
|
2252
|
+
if (!this.state.dragging) return !1;
|
|
2253
|
+
(0, m.default)("Draggable: onDrag: %j", D);
|
|
2254
|
+
const c = (0, s.createDraggableData)(this, D), N = {
|
|
2255
|
+
x: c.x,
|
|
2256
|
+
y: c.y,
|
|
2257
|
+
slackX: 0,
|
|
2258
|
+
slackY: 0
|
|
2259
|
+
};
|
|
2260
|
+
if (this.props.bounds) {
|
|
2261
|
+
const {
|
|
2262
|
+
x: f,
|
|
2263
|
+
y: P
|
|
2264
|
+
} = N;
|
|
2265
|
+
N.x += this.state.slackX, N.y += this.state.slackY;
|
|
2266
|
+
const [$, O] = (0, s.getBoundPosition)(this, N.x, N.y);
|
|
2267
|
+
N.x = $, N.y = O, N.slackX = this.state.slackX + (f - N.x), N.slackY = this.state.slackY + (P - N.y), c.x = N.x, c.y = N.y, c.deltaX = N.x - this.state.x, c.deltaY = N.y - this.state.y;
|
|
2268
|
+
}
|
|
2269
|
+
if (this.props.onDrag(C, c) === !1) return !1;
|
|
2270
|
+
this.setState(N);
|
|
2271
|
+
}), p(this, "onDragStop", (C, D) => {
|
|
2272
|
+
if (!this.state.dragging || this.props.onStop(C, (0, s.createDraggableData)(this, D)) === !1) return !1;
|
|
2273
|
+
(0, m.default)("Draggable: onDragStop: %j", D);
|
|
2274
|
+
const N = {
|
|
2275
|
+
dragging: !1,
|
|
2276
|
+
slackX: 0,
|
|
2277
|
+
slackY: 0
|
|
2278
|
+
};
|
|
2279
|
+
if (!!this.props.position) {
|
|
2280
|
+
const {
|
|
2281
|
+
x: f,
|
|
2282
|
+
y: P
|
|
2283
|
+
} = this.props.position;
|
|
2284
|
+
N.x = f, N.y = P;
|
|
2285
|
+
}
|
|
2286
|
+
this.setState(N);
|
|
2287
|
+
}), this.state = {
|
|
2288
|
+
// Whether or not we are currently dragging.
|
|
2289
|
+
dragging: !1,
|
|
2290
|
+
// Whether or not we have been dragged before.
|
|
2291
|
+
dragged: !1,
|
|
2292
|
+
// Current transform x and y.
|
|
2293
|
+
x: T.position ? T.position.x : T.defaultPosition.x,
|
|
2294
|
+
y: T.position ? T.position.y : T.defaultPosition.y,
|
|
2295
|
+
prevPropsPosition: {
|
|
2296
|
+
...T.position
|
|
2297
|
+
},
|
|
2298
|
+
// Used for compensating for out-of-bounds drags
|
|
2299
|
+
slackX: 0,
|
|
2300
|
+
slackY: 0,
|
|
2301
|
+
// Can only determine if SVG after mounting
|
|
2302
|
+
isElementSVG: !1
|
|
2303
|
+
}, T.position && !(T.onDrag || T.onStop) && console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
|
|
2304
|
+
}
|
|
2305
|
+
componentDidMount() {
|
|
2306
|
+
typeof window.SVGElement < "u" && this.findDOMNode() instanceof window.SVGElement && this.setState({
|
|
2307
|
+
isElementSVG: !0
|
|
2308
|
+
});
|
|
2309
|
+
}
|
|
2310
|
+
componentWillUnmount() {
|
|
2311
|
+
this.state.dragging && this.setState({
|
|
2312
|
+
dragging: !1
|
|
2313
|
+
});
|
|
2314
|
+
}
|
|
2315
|
+
// React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
|
|
2316
|
+
// the underlying DOM node ourselves. See the README for more information.
|
|
2317
|
+
findDOMNode() {
|
|
2318
|
+
return this.props?.nodeRef?.current ?? r.default.findDOMNode(this);
|
|
2319
|
+
}
|
|
2320
|
+
render() {
|
|
2321
|
+
const {
|
|
2322
|
+
axis: T,
|
|
2323
|
+
bounds: C,
|
|
2324
|
+
children: D,
|
|
2325
|
+
defaultPosition: c,
|
|
2326
|
+
defaultClassName: N,
|
|
2327
|
+
defaultClassNameDragging: l,
|
|
2328
|
+
defaultClassNameDragged: f,
|
|
2329
|
+
position: P,
|
|
2330
|
+
positionOffset: $,
|
|
2331
|
+
scale: O,
|
|
2332
|
+
...E
|
|
2333
|
+
} = this.props;
|
|
2334
|
+
let z = {}, X = null;
|
|
2335
|
+
const H = !!!P || this.state.dragging, ee = P || c, ae = {
|
|
2336
|
+
// Set left if horizontal drag is enabled
|
|
2337
|
+
x: (0, s.canDragX)(this) && H ? this.state.x : ee.x,
|
|
2338
|
+
// Set top if vertical drag is enabled
|
|
2339
|
+
y: (0, s.canDragY)(this) && H ? this.state.y : ee.y
|
|
2340
|
+
};
|
|
2341
|
+
this.state.isElementSVG ? X = (0, o.createSVGTransform)(ae, $) : z = (0, o.createCSSTransform)(ae, $);
|
|
2342
|
+
const de = (0, i.clsx)(D.props.className || "", N, {
|
|
2343
|
+
[l]: this.state.dragging,
|
|
2344
|
+
[f]: this.state.dragged
|
|
2345
|
+
});
|
|
2346
|
+
return /* @__PURE__ */ n.createElement(y.default, g({}, E, {
|
|
2347
|
+
onStart: this.onDragStart,
|
|
2348
|
+
onDrag: this.onDrag,
|
|
2349
|
+
onStop: this.onDragStop
|
|
2350
|
+
}), /* @__PURE__ */ n.cloneElement(n.Children.only(D), {
|
|
2351
|
+
className: de,
|
|
2352
|
+
style: {
|
|
2353
|
+
...D.props.style,
|
|
2354
|
+
...z
|
|
2355
|
+
},
|
|
2356
|
+
transform: X
|
|
2357
|
+
}));
|
|
2358
|
+
}
|
|
2359
|
+
}
|
|
2360
|
+
e.default = v, p(v, "displayName", "Draggable"), p(v, "propTypes", {
|
|
2361
|
+
// Accepts all props <DraggableCore> accepts.
|
|
2362
|
+
...y.default.propTypes,
|
|
2363
|
+
/**
|
|
2364
|
+
* `axis` determines which axis the draggable can move.
|
|
2365
|
+
*
|
|
2366
|
+
* Note that all callbacks will still return data as normal. This only
|
|
2367
|
+
* controls flushing to the DOM.
|
|
2368
|
+
*
|
|
2369
|
+
* 'both' allows movement horizontally and vertically.
|
|
2370
|
+
* 'x' limits movement to horizontal axis.
|
|
2371
|
+
* 'y' limits movement to vertical axis.
|
|
2372
|
+
* 'none' limits all movement.
|
|
2373
|
+
*
|
|
2374
|
+
* Defaults to 'both'.
|
|
2375
|
+
*/
|
|
2376
|
+
axis: t.default.oneOf(["both", "x", "y", "none"]),
|
|
2377
|
+
/**
|
|
2378
|
+
* `bounds` determines the range of movement available to the element.
|
|
2379
|
+
* Available values are:
|
|
2380
|
+
*
|
|
2381
|
+
* 'parent' restricts movement within the Draggable's parent node.
|
|
2382
|
+
*
|
|
2383
|
+
* Alternatively, pass an object with the following properties, all of which are optional:
|
|
2384
|
+
*
|
|
2385
|
+
* {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}
|
|
2386
|
+
*
|
|
2387
|
+
* All values are in px.
|
|
2388
|
+
*
|
|
2389
|
+
* Example:
|
|
2390
|
+
*
|
|
2391
|
+
* ```jsx
|
|
2392
|
+
* let App = React.createClass({
|
|
2393
|
+
* render: function () {
|
|
2394
|
+
* return (
|
|
2395
|
+
* <Draggable bounds={{right: 300, bottom: 300}}>
|
|
2396
|
+
* <div>Content</div>
|
|
2397
|
+
* </Draggable>
|
|
2398
|
+
* );
|
|
2399
|
+
* }
|
|
2400
|
+
* });
|
|
2401
|
+
* ```
|
|
2402
|
+
*/
|
|
2403
|
+
bounds: t.default.oneOfType([t.default.shape({
|
|
2404
|
+
left: t.default.number,
|
|
2405
|
+
right: t.default.number,
|
|
2406
|
+
top: t.default.number,
|
|
2407
|
+
bottom: t.default.number
|
|
2408
|
+
}), t.default.string, t.default.oneOf([!1])]),
|
|
2409
|
+
defaultClassName: t.default.string,
|
|
2410
|
+
defaultClassNameDragging: t.default.string,
|
|
2411
|
+
defaultClassNameDragged: t.default.string,
|
|
2412
|
+
/**
|
|
2413
|
+
* `defaultPosition` specifies the x and y that the dragged item should start at
|
|
2414
|
+
*
|
|
2415
|
+
* Example:
|
|
2416
|
+
*
|
|
2417
|
+
* ```jsx
|
|
2418
|
+
* let App = React.createClass({
|
|
2419
|
+
* render: function () {
|
|
2420
|
+
* return (
|
|
2421
|
+
* <Draggable defaultPosition={{x: 25, y: 25}}>
|
|
2422
|
+
* <div>I start with transformX: 25px and transformY: 25px;</div>
|
|
2423
|
+
* </Draggable>
|
|
2424
|
+
* );
|
|
2425
|
+
* }
|
|
2426
|
+
* });
|
|
2427
|
+
* ```
|
|
2428
|
+
*/
|
|
2429
|
+
defaultPosition: t.default.shape({
|
|
2430
|
+
x: t.default.number,
|
|
2431
|
+
y: t.default.number
|
|
2432
|
+
}),
|
|
2433
|
+
positionOffset: t.default.shape({
|
|
2434
|
+
x: t.default.oneOfType([t.default.number, t.default.string]),
|
|
2435
|
+
y: t.default.oneOfType([t.default.number, t.default.string])
|
|
2436
|
+
}),
|
|
2437
|
+
/**
|
|
2438
|
+
* `position`, if present, defines the current position of the element.
|
|
2439
|
+
*
|
|
2440
|
+
* This is similar to how form elements in React work - if no `position` is supplied, the component
|
|
2441
|
+
* is uncontrolled.
|
|
2442
|
+
*
|
|
2443
|
+
* Example:
|
|
2444
|
+
*
|
|
2445
|
+
* ```jsx
|
|
2446
|
+
* let App = React.createClass({
|
|
2447
|
+
* render: function () {
|
|
2448
|
+
* return (
|
|
2449
|
+
* <Draggable position={{x: 25, y: 25}}>
|
|
2450
|
+
* <div>I start with transformX: 25px and transformY: 25px;</div>
|
|
2451
|
+
* </Draggable>
|
|
2452
|
+
* );
|
|
2453
|
+
* }
|
|
2454
|
+
* });
|
|
2455
|
+
* ```
|
|
2456
|
+
*/
|
|
2457
|
+
position: t.default.shape({
|
|
2458
|
+
x: t.default.number,
|
|
2459
|
+
y: t.default.number
|
|
2460
|
+
}),
|
|
2461
|
+
/**
|
|
2462
|
+
* These properties should be defined on the child, not here.
|
|
2463
|
+
*/
|
|
2464
|
+
className: u.dontSetMe,
|
|
2465
|
+
style: u.dontSetMe,
|
|
2466
|
+
transform: u.dontSetMe
|
|
2467
|
+
}), p(v, "defaultProps", {
|
|
2468
|
+
...y.default.defaultProps,
|
|
2469
|
+
axis: "both",
|
|
2470
|
+
bounds: !1,
|
|
2471
|
+
defaultClassName: "react-draggable",
|
|
2472
|
+
defaultClassNameDragging: "react-draggable-dragging",
|
|
2473
|
+
defaultClassNameDragged: "react-draggable-dragged",
|
|
2474
|
+
defaultPosition: {
|
|
2475
|
+
x: 0,
|
|
2476
|
+
y: 0
|
|
2477
|
+
},
|
|
2478
|
+
scale: 1
|
|
2479
|
+
});
|
|
2480
|
+
})(Ce)), Ce;
|
|
2481
|
+
}
|
|
2482
|
+
var ot;
|
|
2483
|
+
function fn() {
|
|
2484
|
+
if (ot) return fe.exports;
|
|
2485
|
+
ot = 1;
|
|
2486
|
+
const {
|
|
2487
|
+
default: e,
|
|
2488
|
+
DraggableCore: n
|
|
2489
|
+
} = un();
|
|
2490
|
+
return fe.exports = e, fe.exports.default = e, fe.exports.DraggableCore = n, fe.exports;
|
|
2491
|
+
}
|
|
2492
|
+
var hn = fn();
|
|
2493
|
+
const gn = /* @__PURE__ */ en(hn), mn = le((e, n) => {
|
|
2494
|
+
const r = {
|
|
2495
|
+
...{
|
|
2496
|
+
// 1. Take it out of the document flow
|
|
2497
|
+
position: "fixed",
|
|
2498
|
+
// 2. Set initial viewport position (e.g., top right)
|
|
2499
|
+
top: "6rem",
|
|
2500
|
+
right: "1rem",
|
|
2501
|
+
// 3. Ensure it stacks above other content
|
|
2502
|
+
zIndex: 1,
|
|
2503
|
+
// Add your layout/appearance styles
|
|
2504
|
+
width: "360px",
|
|
2505
|
+
minHeight: "360px",
|
|
2506
|
+
borderStyle: "solid",
|
|
2507
|
+
borderWidth: "3px",
|
|
2508
|
+
boxShadow: "rgba(0, 0, 0, 0.5) 7px 7px 10px 0px"
|
|
2509
|
+
},
|
|
2510
|
+
...e.style || {}
|
|
2511
|
+
}, i = e.testId || "not-set", o = e.className || "panel", s = xt(null);
|
|
2512
|
+
return (
|
|
2513
|
+
// 3. Pass the internal ref to the Draggable component via 'nodeRef'
|
|
2514
|
+
/* @__PURE__ */ a(
|
|
2515
|
+
gn,
|
|
2516
|
+
{
|
|
2517
|
+
nodeRef: s,
|
|
2518
|
+
"data-testid": i,
|
|
2519
|
+
axis: "both",
|
|
2520
|
+
handle: ".handle",
|
|
2521
|
+
onStart: (m, h) => {
|
|
2522
|
+
e.onDraggingChange?.(!0);
|
|
2523
|
+
},
|
|
2524
|
+
onStop: (m, h) => {
|
|
2525
|
+
setTimeout(() => {
|
|
2526
|
+
e.onDraggingChange?.(!1);
|
|
2527
|
+
}, 100);
|
|
2528
|
+
},
|
|
2529
|
+
children: /* @__PURE__ */ a("div", { ref: s, className: o, style: r, children: e.children })
|
|
2530
|
+
}
|
|
2531
|
+
)
|
|
2532
|
+
);
|
|
2533
|
+
}), Hn = (e) => {
|
|
2534
|
+
console.warn("showToast TODO", e);
|
|
2535
|
+
}, pn = (e) => e < 0.8 ? 1 : e <= 1 ? 0 : e > 1 ? -1 : 0, Xn = le((e, n) => {
|
|
2536
|
+
let t = st(Number(e.zoomScale || 0));
|
|
2537
|
+
const r = e.responsiveGrid || !1, i = e.isEditing || !1, o = {
|
|
2538
|
+
"--bwj-dashboard-transform-scale": t,
|
|
2539
|
+
"--bwj-dashboard-add-cols": pn(t)
|
|
2540
|
+
}, s = Z(
|
|
2541
|
+
"dashboard-main-grid w-full",
|
|
2542
|
+
i ? "editing" : "",
|
|
2543
|
+
r ? "responsive-grid" : "",
|
|
2544
|
+
//`border border-dashed ${isEditing ? 'border-primary border-opacity-50' : 'border-transparent'}`,
|
|
2545
|
+
"border border-solid border-primary"
|
|
2546
|
+
);
|
|
2547
|
+
return /* @__PURE__ */ a("div", { className: s, style: o, children: e.children });
|
|
2548
|
+
}), Pe = "size-5", yn = (e, n) => {
|
|
2549
|
+
const t = e.hideTitle && !e.isEditing, r = e.noBorder;
|
|
2550
|
+
let i = `dashboard-widget ${e.isEditing ? "editing" : ""} border border-solid`;
|
|
2551
|
+
r ? i = `${i} border-transparent border-opacity-0` : (e.borderCssClasses || "").trim().length > 0 ? i = `${i} ${e.borderCssClasses}` : i = `${i} border-card-invert border-opacity-20`, e.noShadow && (i = `${i} no-shadow`), e.noPadding && (i = `${i} no-padding p-0`), (e.backgroundCssClasses || "").trim().length > 0 ? i = `${i} ${e.backgroundCssClasses}` : i = `${i} bg-card content-card`, ["large", "xlarge"].indexOf(e.size || "") > -1 && (i = `${i} ${e.size}-widget`);
|
|
2552
|
+
const o = () => {
|
|
2553
|
+
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey, e.parentWidgetKey);
|
|
2554
|
+
}, s = (y) => {
|
|
2555
|
+
e.onMoveClick && e.widgetKey && e.onMoveClick(y, e.widgetKey, e.parentWidgetKey);
|
|
2556
|
+
}, u = Z(
|
|
2557
|
+
"widget-header",
|
|
2558
|
+
t ? "hidden" : "flex items-center justify-between border-b border-solid border-card-invert",
|
|
2559
|
+
t ? "border-opacity-0" : "border-opacity-20"
|
|
2560
|
+
);
|
|
2561
|
+
return /* @__PURE__ */ I("div", { className: i, children: [
|
|
2562
|
+
/* @__PURE__ */ I("div", { className: u, children: [
|
|
2563
|
+
/* @__PURE__ */ I("div", { className: "widget-title-wrapper w-full flex flex-row gap-2 items-center justify-between", children: [
|
|
2564
|
+
/* @__PURE__ */ I("h2", { className: "widget-title", children: [
|
|
2565
|
+
e.title,
|
|
2566
|
+
" "
|
|
2567
|
+
] }),
|
|
2568
|
+
/* @__PURE__ */ a("div", {})
|
|
2569
|
+
] }),
|
|
2570
|
+
/* @__PURE__ */ a("div", { "data-testid": "collapse-and-other-actions", children: /* @__PURE__ */ I("div", { className: "actions-inner", children: [
|
|
2571
|
+
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("span", { className: "hidden", children: "Widget" }) }),
|
|
2572
|
+
/* @__PURE__ */ I("div", { className: "actions-buttons-container", children: [
|
|
2573
|
+
/* @__PURE__ */ a(
|
|
2574
|
+
J,
|
|
2575
|
+
{
|
|
2576
|
+
"data-testid": `move-widget-left_${e.title}`,
|
|
2577
|
+
isIconButton: !0,
|
|
2578
|
+
disabled: e.index < 1,
|
|
2579
|
+
tooltip: {
|
|
2580
|
+
placement: "top",
|
|
2581
|
+
title: `${e.index < 1 ? "Already at min position" : "Move Widget to the left/up"}`
|
|
2582
|
+
},
|
|
2583
|
+
onClick: () => s(-1),
|
|
2584
|
+
children: /* @__PURE__ */ a(dt, { className: Pe })
|
|
2585
|
+
}
|
|
2586
|
+
),
|
|
2587
|
+
/* @__PURE__ */ a(
|
|
2588
|
+
J,
|
|
2589
|
+
{
|
|
2590
|
+
"data-testid": `move-widget-right_${e.title}`,
|
|
2591
|
+
isIconButton: !0,
|
|
2592
|
+
disabled: e.index >= e.maxIndex,
|
|
2593
|
+
tooltip: {
|
|
2594
|
+
placement: "top",
|
|
2595
|
+
title: `${e.index >= e.maxIndex ? "Already at max position" : "Move Widget to the right/down"}`
|
|
2596
|
+
},
|
|
2597
|
+
onClick: () => s(1),
|
|
2598
|
+
children: /* @__PURE__ */ a(ut, { className: Pe })
|
|
2599
|
+
}
|
|
2600
|
+
),
|
|
2601
|
+
/* @__PURE__ */ a(
|
|
2602
|
+
J,
|
|
2603
|
+
{
|
|
2604
|
+
"data-testid": `remove-container_${e.title}`,
|
|
2605
|
+
isIconButton: !0,
|
|
2606
|
+
tooltip: {
|
|
2607
|
+
placement: "top",
|
|
2608
|
+
title: "Remove Widget"
|
|
2609
|
+
},
|
|
2610
|
+
onClick: () => o(),
|
|
2611
|
+
children: /* @__PURE__ */ a(ft, { className: Pe })
|
|
2612
|
+
}
|
|
2613
|
+
)
|
|
2614
|
+
] })
|
|
2615
|
+
] }) })
|
|
2616
|
+
] }),
|
|
2617
|
+
/* @__PURE__ */ a("div", { className: "widget-inner", children: e.children })
|
|
2618
|
+
] });
|
|
2619
|
+
}, bn = le(yn);
|
|
2620
|
+
function vn(e) {
|
|
2621
|
+
return /* @__PURE__ */ a("div", { className: "dashboard-widget", children: /* @__PURE__ */ I("div", { className: "absolute inset-0 bg-black flex flex-col items-center justify-center text-center", children: [
|
|
2622
|
+
/* @__PURE__ */ a("div", { className: "w-full absolute opacity-100 text-primary", children: e.title }),
|
|
2623
|
+
/* @__PURE__ */ a("div", { className: "animate-ping rounded-full h-32 w-32 border-8 border-white" })
|
|
2624
|
+
] }) });
|
|
2625
|
+
}
|
|
2626
|
+
function xn({
|
|
2627
|
+
index: e,
|
|
2628
|
+
maxIndex: n,
|
|
2629
|
+
widgetKey: t,
|
|
2630
|
+
parentWidgetKey: r,
|
|
2631
|
+
targetContainerKey: i,
|
|
2632
|
+
childWidgetsConfig: o,
|
|
2633
|
+
widgetCatalog: s,
|
|
2634
|
+
isEditing: u,
|
|
2635
|
+
onRemoveClick: y,
|
|
2636
|
+
onMoveClick: m,
|
|
2637
|
+
selectContainer: h
|
|
2638
|
+
}) {
|
|
2639
|
+
const d = `${t}`.split("_"), g = d.length > 1, p = g ? d[0] : t, w = s.get(p);
|
|
2640
|
+
if (!w)
|
|
2641
|
+
return /* @__PURE__ */ a("div", { className: "flex", children: /* @__PURE__ */ I("p", { children: [
|
|
2642
|
+
"Widget not found in catalog: ",
|
|
2643
|
+
p
|
|
2644
|
+
] }) });
|
|
2645
|
+
let b = null, v = !1;
|
|
2646
|
+
if (w.component ? (b = w.component, v = !1) : w.loader && (v = !0, b = it(() => {
|
|
2647
|
+
if (!w) return null;
|
|
2648
|
+
if (w.component)
|
|
2649
|
+
return w.component;
|
|
2650
|
+
if (w.loader) {
|
|
2651
|
+
const l = async () => {
|
|
2652
|
+
try {
|
|
2653
|
+
return await w.loader();
|
|
2654
|
+
} catch (f) {
|
|
2655
|
+
return console.error(`CDN Load Failure for ${t}:`, f), {
|
|
2656
|
+
default: () => /* @__PURE__ */ a(bn, { ...D, children: /* @__PURE__ */ I("div", { className: "p-4 border border-dashed border-danger", children: [
|
|
2657
|
+
/* @__PURE__ */ I("p", { className: "font-bold", children: [
|
|
2658
|
+
'Failed to load "',
|
|
2659
|
+
t,
|
|
2660
|
+
'"'
|
|
2661
|
+
] }),
|
|
2662
|
+
/* @__PURE__ */ a("p", { className: "text-xs italic", children: "The remote plugin is unavailable or incompatible." }),
|
|
2663
|
+
/* @__PURE__ */ a("pre", { className: "text-xs overflow-hidden", children: JSON.stringify(w.meta || {}, null, 2) })
|
|
2664
|
+
] }) })
|
|
2665
|
+
};
|
|
2666
|
+
}
|
|
2667
|
+
};
|
|
2668
|
+
return se.lazy(l);
|
|
2669
|
+
}
|
|
2670
|
+
return null;
|
|
2671
|
+
}, [w, t])), !b)
|
|
2672
|
+
return /* @__PURE__ */ a("div", { className: "flex", children: /* @__PURE__ */ I("p", { children: [
|
|
2673
|
+
"Widget definition incomplete: ",
|
|
2674
|
+
p
|
|
2675
|
+
] }) });
|
|
2676
|
+
const S = !!w.isContainer, T = g ? ht(t) : "", C = S ? (o || []).filter((l) => l.parentWidgetKey === t) : [], D = {
|
|
2677
|
+
index: e,
|
|
2678
|
+
maxIndex: n,
|
|
2679
|
+
widgetKey: t,
|
|
2680
|
+
parentWidgetKey: r,
|
|
2681
|
+
isEditing: u,
|
|
2682
|
+
title: g ? T : w.title,
|
|
2683
|
+
onRemoveClick: y,
|
|
2684
|
+
onMoveClick: m
|
|
2685
|
+
}, c = S ? {
|
|
2686
|
+
highlight: i === t,
|
|
2687
|
+
selectContainer: h,
|
|
2688
|
+
// The children prop is the recursive call back to DynamicWidgetLoader
|
|
2689
|
+
children: C.map((l, f) => /* @__PURE__ */ a(
|
|
2690
|
+
xn,
|
|
2691
|
+
{
|
|
2692
|
+
index: f,
|
|
2693
|
+
maxIndex: C.length - 1,
|
|
2694
|
+
widgetKey: l.widgetKey,
|
|
2695
|
+
parentWidgetKey: l.parentWidgetKey,
|
|
2696
|
+
widgetCatalog: s,
|
|
2697
|
+
isEditing: u,
|
|
2698
|
+
onRemoveClick: y,
|
|
2699
|
+
onMoveClick: m
|
|
2700
|
+
},
|
|
2701
|
+
`${l.widgetKey}_${f}`
|
|
2702
|
+
))
|
|
2703
|
+
} : {}, N = () => /* @__PURE__ */ a(b, { ...D, ...c });
|
|
2704
|
+
return v ? /* @__PURE__ */ a(wt, { fallback: /* @__PURE__ */ a(vn, { title: `Loading ${w.title}` }), children: /* @__PURE__ */ a(N, {}) }) : /* @__PURE__ */ a(N, {});
|
|
2705
|
+
}
|
|
2706
|
+
const ve = "size-5";
|
|
2707
|
+
function Re(e) {
|
|
2708
|
+
const n = e.highlight || !1, t = e.direction || "column", r = e.children.length > 0, i = e.isEditing || !1;
|
|
2709
|
+
let u = n ? "border-transparent" : i && !r ? "border-card-invert" : "border-transparent";
|
|
2710
|
+
const y = ["large", "xlarge"].includes(e.size || "");
|
|
2711
|
+
let m = "";
|
|
2712
|
+
["large", "xlarge"].indexOf(e.size || "") > -1 && (m = `${e.size}-widget`);
|
|
2713
|
+
let h = "";
|
|
2714
|
+
t === "row" && !r ? h = "min-h-48" : t === "column" && !r && (h = "min-h-96");
|
|
2715
|
+
let d = Z(
|
|
2716
|
+
"dashboard-widget-container relative ",
|
|
2717
|
+
r ? "" : "has-no-children",
|
|
2718
|
+
i ? "editing" : "",
|
|
2719
|
+
h,
|
|
2720
|
+
m,
|
|
2721
|
+
y ? "widget-container-grid" : "widget-container-flex",
|
|
2722
|
+
`direction-${t}`,
|
|
2723
|
+
`border ${u}`,
|
|
2724
|
+
`${n ? "highlight-container" : ""} ${u}`
|
|
2725
|
+
), g = `widget-container-header direction-${t} flex items-center border-1 ${u}`;
|
|
2726
|
+
const p = () => {
|
|
2727
|
+
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey);
|
|
2728
|
+
}, w = (v) => {
|
|
2729
|
+
e.onMoveClick && e.widgetKey && e.onMoveClick(v, e.widgetKey, e.parentWidgetKey);
|
|
2730
|
+
}, b = () => {
|
|
2731
|
+
e.selectContainer && e.widgetKey && e.selectContainer(e.widgetKey);
|
|
2732
|
+
};
|
|
2733
|
+
return /* @__PURE__ */ I("div", { "data-testid": `container_${e.widgetKey}`, className: d, children: [
|
|
2734
|
+
/* @__PURE__ */ I("div", { className: g, children: [
|
|
2735
|
+
/* @__PURE__ */ a(
|
|
2736
|
+
"div",
|
|
2737
|
+
{
|
|
2738
|
+
className: "widget-title-wrapper w-full flex whitespace-nowrap",
|
|
2739
|
+
onClick: b,
|
|
2740
|
+
children: /* @__PURE__ */ a("span", { className: "text-sm font-semibold capitalize", children: e.title })
|
|
2741
|
+
}
|
|
2742
|
+
),
|
|
2743
|
+
/* @__PURE__ */ a("div", { "data-testid": "collapse-and-other-actions", children: /* @__PURE__ */ a("div", { className: "actions-inner", children: /* @__PURE__ */ I("div", { className: "actions-buttons-container", children: [
|
|
2744
|
+
/* @__PURE__ */ a(
|
|
2745
|
+
J,
|
|
2746
|
+
{
|
|
2747
|
+
"data-testid": `open-widgets-catalog-from-container_${e.title}`,
|
|
2748
|
+
isIconButton: !0,
|
|
2749
|
+
className: "whitespace-nowrap",
|
|
2750
|
+
tooltip: {
|
|
2751
|
+
placement: "top",
|
|
2752
|
+
title: "Target this Container"
|
|
2753
|
+
},
|
|
2754
|
+
onClick: b,
|
|
2755
|
+
children: /* @__PURE__ */ a(
|
|
2756
|
+
Gt,
|
|
2757
|
+
{
|
|
2758
|
+
className: `${ve} ${n ? "text-success" : "text-disabled"}`
|
|
2759
|
+
}
|
|
2760
|
+
)
|
|
2761
|
+
}
|
|
2762
|
+
),
|
|
2763
|
+
/* @__PURE__ */ a(
|
|
2764
|
+
J,
|
|
2765
|
+
{
|
|
2766
|
+
"data-testid": `move-container-left_${e.title}`,
|
|
2767
|
+
isIconButton: !0,
|
|
2768
|
+
disabled: e.index < 1,
|
|
2769
|
+
tooltip: {
|
|
2770
|
+
placement: "top",
|
|
2771
|
+
title: `${e.index < 1 ? "Already at min position" : "Move Container to the left/up"}`
|
|
2772
|
+
},
|
|
2773
|
+
onClick: () => w(-1),
|
|
2774
|
+
children: /* @__PURE__ */ a(dt, { className: ve })
|
|
2775
|
+
}
|
|
2776
|
+
),
|
|
2777
|
+
/* @__PURE__ */ a(
|
|
2778
|
+
J,
|
|
2779
|
+
{
|
|
2780
|
+
"data-testid": `move-container-right_${e.title}`,
|
|
2781
|
+
isIconButton: !0,
|
|
2782
|
+
disabled: e.index >= e.maxIndex,
|
|
2783
|
+
tooltip: {
|
|
2784
|
+
placement: "top",
|
|
2785
|
+
title: `${e.index >= e.maxIndex ? "Already at max position" : "Move Container to the right/down"}`
|
|
2786
|
+
},
|
|
2787
|
+
onClick: () => w(1),
|
|
2788
|
+
children: /* @__PURE__ */ a(ut, { className: ve })
|
|
2789
|
+
}
|
|
2790
|
+
),
|
|
2791
|
+
/* @__PURE__ */ a(
|
|
2792
|
+
J,
|
|
2793
|
+
{
|
|
2794
|
+
"data-testid": `remove-container_${e.title}`,
|
|
2795
|
+
isIconButton: !0,
|
|
2796
|
+
tooltip: {
|
|
2797
|
+
placement: "top",
|
|
2798
|
+
title: "Remove Container"
|
|
2799
|
+
},
|
|
2800
|
+
onClick: () => p(),
|
|
2801
|
+
children: /* @__PURE__ */ a(ft, { className: ve })
|
|
2802
|
+
}
|
|
2803
|
+
)
|
|
2804
|
+
] }) }) })
|
|
2805
|
+
] }),
|
|
2806
|
+
/* @__PURE__ */ a("div", { "data-testid": `childrenwrapper_${e.widgetKey}`, className: "widget-container-inner", children: e.children })
|
|
2807
|
+
] });
|
|
2808
|
+
}
|
|
2809
|
+
function Gn(e) {
|
|
2810
|
+
const { direction: n, ...t } = e;
|
|
2811
|
+
return /* @__PURE__ */ a(Re, { direction: "column", ...t });
|
|
2812
|
+
}
|
|
2813
|
+
function Zn(e) {
|
|
2814
|
+
const { size: n, ...t } = e;
|
|
2815
|
+
return /* @__PURE__ */ a(Re, { size: "large", ...t });
|
|
2816
|
+
}
|
|
2817
|
+
function Jn(e) {
|
|
2818
|
+
const { direction: n, ...t } = e;
|
|
2819
|
+
return /* @__PURE__ */ a(Re, { direction: "row", ...t });
|
|
2820
|
+
}
|
|
2821
|
+
function $e({
|
|
2822
|
+
// widgetKey,
|
|
2823
|
+
metaData: e,
|
|
2824
|
+
alreadyAdded: n,
|
|
2825
|
+
addWidget: t
|
|
2826
|
+
}) {
|
|
2827
|
+
const r = e.icon || Zt, i = e.displayName || "Unknown", o = e.description || "---", u = (e.noDuplicatedWidgets || !1) && n, y = Z(`
|
|
2828
|
+
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
2829
|
+
${u ? "border-disabled fill-disabled text-disabled" : "cursor-pointer border-primary fill-danger hover:fill-primary content-primary hover:brightness-110"}
|
|
2830
|
+
`);
|
|
2831
|
+
return /* @__PURE__ */ I("div", { className: y, style: { width: "calc(100% - 1rem)" }, onClick: () => {
|
|
2832
|
+
u || t();
|
|
2833
|
+
}, children: [
|
|
2834
|
+
/* @__PURE__ */ a(r, { className: "" }),
|
|
2835
|
+
/* @__PURE__ */ I("div", { className: "w-full", children: [
|
|
2836
|
+
/* @__PURE__ */ I("div", { className: "flex flex-row items-center gap-2 justify-between", children: [
|
|
2837
|
+
/* @__PURE__ */ a("span", { className: "font-bold", children: i }),
|
|
2838
|
+
/* @__PURE__ */ a("div", { className: "text-xs", children: u ? "(Added)" : "" })
|
|
2839
|
+
] }),
|
|
2840
|
+
/* @__PURE__ */ a("div", { className: "flex flex-col gap-2 text-xs", children: /* @__PURE__ */ a("div", { children: o }) })
|
|
2841
|
+
] })
|
|
2842
|
+
] });
|
|
2843
|
+
}
|
|
2844
|
+
function wn({
|
|
2845
|
+
item: e,
|
|
2846
|
+
onSettingItemChanged: n
|
|
2847
|
+
}) {
|
|
2848
|
+
const t = e.displayName || "Unknown", r = e.description || "---", i = Z(`
|
|
2849
|
+
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
2850
|
+
`), o = (u) => {
|
|
2851
|
+
const y = u.key;
|
|
2852
|
+
if (["ArrowUp", "ArrowDown"].includes(y)) {
|
|
2853
|
+
u.preventDefault();
|
|
2854
|
+
const m = Nt.incrementOrDecrementValue(
|
|
2855
|
+
e,
|
|
2856
|
+
y === "ArrowUp" ? 1 : -1
|
|
2857
|
+
);
|
|
2858
|
+
n(m);
|
|
2859
|
+
}
|
|
2860
|
+
}, s = (u) => {
|
|
2861
|
+
n({
|
|
2862
|
+
...e,
|
|
2863
|
+
value: u.target.value || ""
|
|
2864
|
+
});
|
|
2865
|
+
};
|
|
2866
|
+
return /* @__PURE__ */ a("div", { className: i, style: { width: "calc(100% - 1rem)" }, children: /* @__PURE__ */ I("div", { className: "w-full", children: [
|
|
2867
|
+
/* @__PURE__ */ a("div", { className: "flex flex-row items-center gap-2 justify-between", children: /* @__PURE__ */ a("span", { className: "font-bold", children: t }) }),
|
|
2868
|
+
/* @__PURE__ */ a("div", { className: "flex flex-col gap-2 text-xs", children: /* @__PURE__ */ a("div", { children: r }) }),
|
|
2869
|
+
/* @__PURE__ */ I("div", { children: [
|
|
2870
|
+
"Value:",
|
|
2871
|
+
/* @__PURE__ */ a(
|
|
2872
|
+
gt,
|
|
2873
|
+
{
|
|
2874
|
+
label: "Filter...",
|
|
2875
|
+
size: "small",
|
|
2876
|
+
className: "w-full",
|
|
2877
|
+
value: e.value,
|
|
2878
|
+
onChange: s,
|
|
2879
|
+
onKeyDown: o
|
|
2880
|
+
}
|
|
2881
|
+
)
|
|
2882
|
+
] })
|
|
2883
|
+
] }) });
|
|
2884
|
+
}
|
|
2885
|
+
const Ie = (e, n) => [
|
|
2886
|
+
...n.widgets.filter((r) => r.indexOf("Container") === -1),
|
|
2887
|
+
...n.childWidgetsConfig.map((r) => r.widgetKey)
|
|
2888
|
+
].includes(e);
|
|
2889
|
+
function Qn({
|
|
2890
|
+
targetContainerKey: e,
|
|
2891
|
+
widgetsCatalog: n,
|
|
2892
|
+
currentDashboardConfig: t,
|
|
2893
|
+
undoStatus: r,
|
|
2894
|
+
addWidget: i,
|
|
2895
|
+
addContainer: o,
|
|
2896
|
+
onSettingItemsUpdated: s,
|
|
2897
|
+
onResetToDefaultDashboardClick: u,
|
|
2898
|
+
onUndoOrRedo: y,
|
|
2899
|
+
onDoneClick: m
|
|
2900
|
+
}) {
|
|
2901
|
+
const [h, d] = ce("Editing"), [g, p] = ce(0), [w, b] = ce(""), S = Array.from(n.keys()).map((E) => ({
|
|
2902
|
+
widgetKey: E,
|
|
2903
|
+
metaData: _t(E, n)
|
|
2904
|
+
})), T = (E) => {
|
|
2905
|
+
b(E.target.value);
|
|
2906
|
+
}, C = (E) => {
|
|
2907
|
+
const z = w.trim().toLowerCase();
|
|
2908
|
+
return z.length < 1 ? !0 : E.displayName.trim().toLowerCase().includes(z) || E.description.toLowerCase().includes(z);
|
|
2909
|
+
}, D = (E) => {
|
|
2910
|
+
const z = w.trim().toLowerCase();
|
|
2911
|
+
return z.length < 1 ? !0 : E.displayName.trim().toLowerCase().includes(z) || E.description.toLowerCase().includes(z);
|
|
2912
|
+
}, c = (E) => Z(
|
|
2913
|
+
"px-4 py-2 font-medium cursor-pointer border-b-2 border-transparent hover:border-primary focus:outline-none",
|
|
2914
|
+
E === g ? "text-primary border-primary" : ""
|
|
2915
|
+
), N = !!e;
|
|
2916
|
+
St(() => {
|
|
2917
|
+
if (e) {
|
|
2918
|
+
p(0);
|
|
2919
|
+
const E = ht(e);
|
|
2920
|
+
d(`Editing ${E}`);
|
|
2921
|
+
} else
|
|
2922
|
+
d("Editing Dashboard");
|
|
2923
|
+
}, [e]);
|
|
2924
|
+
const l = (E) => {
|
|
2925
|
+
N ? i(E, e) : i(E);
|
|
2926
|
+
}, f = (E) => {
|
|
2927
|
+
const z = (t.cssSettings || []).map((X) => X.key === E.key ? E : X);
|
|
2928
|
+
s(z);
|
|
2929
|
+
}, [P, $] = ce(!1);
|
|
2930
|
+
return /* @__PURE__ */ a(
|
|
2931
|
+
mn,
|
|
2932
|
+
{
|
|
2933
|
+
testId: "dashboard-catalog-flyout",
|
|
2934
|
+
className: "bg-body content-body bg-opacity-70 border-2 border-primary",
|
|
2935
|
+
style: {
|
|
2936
|
+
width: "360px",
|
|
2937
|
+
minWidth: "360px",
|
|
2938
|
+
maxWidth: "360px",
|
|
2939
|
+
minHeight: "360px",
|
|
2940
|
+
backdropFilter: "blur(8px)"
|
|
2941
|
+
},
|
|
2942
|
+
onDraggingChange: (E) => {
|
|
2943
|
+
$(E);
|
|
2944
|
+
},
|
|
2945
|
+
children: /* @__PURE__ */ I("div", { className: "flex flex-col gap-2 p-2", children: [
|
|
2946
|
+
/* @__PURE__ */ I("div", { className: "flex flex-row gap-2 justify-between", children: [
|
|
2947
|
+
/* @__PURE__ */ I("div", { className: "handle flex-1 flex gap-2 w-full hover:text-primary cursor-grab", children: [
|
|
2948
|
+
P ? /* @__PURE__ */ a(Xt, { className: "size-5" }) : /* @__PURE__ */ a(Ht, { className: "size-5" }),
|
|
2949
|
+
/* @__PURE__ */ a(
|
|
2950
|
+
"h2",
|
|
2951
|
+
{
|
|
2952
|
+
className: "flex-1 text-base margin-0 capitalize",
|
|
2953
|
+
title: N ? h : `Editing dashboard: ${t.dashboardName}`,
|
|
2954
|
+
children: h
|
|
2955
|
+
}
|
|
2956
|
+
)
|
|
2957
|
+
] }),
|
|
2958
|
+
/* @__PURE__ */ I("div", { className: "flex flex-row gap-2 items-center", children: [
|
|
2959
|
+
/* @__PURE__ */ a(
|
|
2960
|
+
J,
|
|
2961
|
+
{
|
|
2962
|
+
"data-testid": "undo-dashboard-config-change",
|
|
2963
|
+
isIconButton: !0,
|
|
2964
|
+
tooltip: {
|
|
2965
|
+
placement: "bottom",
|
|
2966
|
+
title: "Undo"
|
|
2967
|
+
},
|
|
2968
|
+
disabled: r.isUndoDisabled,
|
|
2969
|
+
onClick: () => y("Undo"),
|
|
2970
|
+
children: /* @__PURE__ */ a(Bt, { className: "size-5" })
|
|
2971
|
+
}
|
|
2972
|
+
),
|
|
2973
|
+
/* @__PURE__ */ a(
|
|
2974
|
+
J,
|
|
2975
|
+
{
|
|
2976
|
+
"data-testid": "redo-dashboard-config-change",
|
|
2977
|
+
isIconButton: !0,
|
|
2978
|
+
tooltip: {
|
|
2979
|
+
placement: "bottom",
|
|
2980
|
+
title: "Redo"
|
|
2981
|
+
},
|
|
2982
|
+
disabled: r.isRedoDisabled,
|
|
2983
|
+
onClick: () => y("Redo"),
|
|
2984
|
+
children: /* @__PURE__ */ a(Kt, { className: "size-5" })
|
|
2985
|
+
}
|
|
2986
|
+
),
|
|
2987
|
+
/* @__PURE__ */ a(
|
|
2988
|
+
J,
|
|
2989
|
+
{
|
|
2990
|
+
"data-testid": "reset-dashboard-to-default",
|
|
2991
|
+
isIconButton: !0,
|
|
2992
|
+
tooltip: {
|
|
2993
|
+
placement: "bottom",
|
|
2994
|
+
title: "Reset this dashboard to the default configuration"
|
|
2995
|
+
},
|
|
2996
|
+
onClick: u,
|
|
2997
|
+
children: /* @__PURE__ */ a(zt, { className: "size-5" })
|
|
2998
|
+
}
|
|
2999
|
+
)
|
|
3000
|
+
] })
|
|
3001
|
+
] }),
|
|
3002
|
+
/* @__PURE__ */ I("div", { className: "flex border-b border-gray-200", children: [
|
|
3003
|
+
/* @__PURE__ */ a("button", { onClick: () => p(0), className: c(0), children: "Widgets" }),
|
|
3004
|
+
/* @__PURE__ */ a("button", { onClick: () => p(1), className: c(1), children: "Charts" }),
|
|
3005
|
+
!N && /* @__PURE__ */ a("button", { onClick: () => p(2), className: c(2), children: "Containers" }),
|
|
3006
|
+
!N && /* @__PURE__ */ a("button", { onClick: () => p(3), className: c(3), children: /* @__PURE__ */ a(qt, {}) })
|
|
3007
|
+
] }),
|
|
3008
|
+
/* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-1 w-full", children: /* @__PURE__ */ a(
|
|
3009
|
+
gt,
|
|
3010
|
+
{
|
|
3011
|
+
label: "Filter...",
|
|
3012
|
+
size: "small",
|
|
3013
|
+
className: "w-full",
|
|
3014
|
+
value: w,
|
|
3015
|
+
onChange: T
|
|
3016
|
+
}
|
|
3017
|
+
) }),
|
|
3018
|
+
/* @__PURE__ */ I(
|
|
3019
|
+
"div",
|
|
3020
|
+
{
|
|
3021
|
+
className: "flex flex-col gap-2 overflow-x-hidden overflow-y-auto",
|
|
3022
|
+
style: {
|
|
3023
|
+
maxHeight: "360px"
|
|
3024
|
+
},
|
|
3025
|
+
children: [
|
|
3026
|
+
g === 0 && S.filter(
|
|
3027
|
+
(E) => E.metaData.categories.includes("Widget") && C(E.metaData)
|
|
3028
|
+
).map((E) => /* @__PURE__ */ a(
|
|
3029
|
+
$e,
|
|
3030
|
+
{
|
|
3031
|
+
widgetKey: E.widgetKey,
|
|
3032
|
+
metaData: E.metaData,
|
|
3033
|
+
alreadyAdded: Ie(E.widgetKey, t),
|
|
3034
|
+
addWidget: () => l(E.widgetKey)
|
|
3035
|
+
},
|
|
3036
|
+
E.widgetKey
|
|
3037
|
+
)),
|
|
3038
|
+
g === 1 && S.filter(
|
|
3039
|
+
(E) => E.metaData.categories.includes("Chart") && C(E.metaData)
|
|
3040
|
+
).map((E) => /* @__PURE__ */ a(
|
|
3041
|
+
$e,
|
|
3042
|
+
{
|
|
3043
|
+
widgetKey: E.widgetKey,
|
|
3044
|
+
metaData: E.metaData,
|
|
3045
|
+
alreadyAdded: Ie(E.widgetKey, t),
|
|
3046
|
+
addWidget: () => l(E.widgetKey)
|
|
3047
|
+
},
|
|
3048
|
+
E.widgetKey
|
|
3049
|
+
)),
|
|
3050
|
+
!N && g === 2 && S.filter((E) => E.metaData.categories.includes("Container")).map((E) => /* @__PURE__ */ a(
|
|
3051
|
+
$e,
|
|
3052
|
+
{
|
|
3053
|
+
widgetKey: E.widgetKey,
|
|
3054
|
+
metaData: E.metaData,
|
|
3055
|
+
alreadyAdded: Ie(E.widgetKey, t),
|
|
3056
|
+
addWidget: () => o(E.widgetKey)
|
|
3057
|
+
},
|
|
3058
|
+
E.widgetKey
|
|
3059
|
+
)),
|
|
3060
|
+
!N && g === 3 && (t.cssSettings || []).filter(D).map((E) => /* @__PURE__ */ a(
|
|
3061
|
+
wn,
|
|
3062
|
+
{
|
|
3063
|
+
item: E,
|
|
3064
|
+
onSettingItemChanged: f
|
|
3065
|
+
},
|
|
3066
|
+
E.key
|
|
3067
|
+
))
|
|
3068
|
+
]
|
|
3069
|
+
}
|
|
3070
|
+
),
|
|
3071
|
+
/* @__PURE__ */ a("div", { className: "mt-4 w-full flex flex-row justify-end pt-1", children: /* @__PURE__ */ a(
|
|
3072
|
+
J,
|
|
3073
|
+
{
|
|
3074
|
+
className: "bg-opacity-100",
|
|
3075
|
+
tooltip: {
|
|
3076
|
+
placement: "bottom",
|
|
3077
|
+
title: "Click to exit edit mode"
|
|
3078
|
+
},
|
|
3079
|
+
onClick: m,
|
|
3080
|
+
children: "Done"
|
|
3081
|
+
}
|
|
3082
|
+
) })
|
|
3083
|
+
] })
|
|
3084
|
+
}
|
|
3085
|
+
);
|
|
3086
|
+
}
|
|
3087
|
+
export {
|
|
3088
|
+
$n as AddIcon,
|
|
3089
|
+
J as Button,
|
|
3090
|
+
Zt as CircleQuestionMark,
|
|
3091
|
+
Gt as CrosshairIcon,
|
|
3092
|
+
Xn as DashboardGrid,
|
|
3093
|
+
Ae as DashboardMaxZoomScale,
|
|
3094
|
+
je as DashboardMinZoomScale,
|
|
3095
|
+
bn as DashboardWidgetBase,
|
|
3096
|
+
Et as DashboardZoomStep,
|
|
3097
|
+
In as DeleteIcon,
|
|
3098
|
+
mn as DraggablePanel,
|
|
3099
|
+
xn as DynamicWidgetLoader,
|
|
3100
|
+
Wn as EditIcon,
|
|
3101
|
+
On as GridIcon,
|
|
3102
|
+
Xt as HandGrabIcon,
|
|
3103
|
+
Ht as HandIcon,
|
|
3104
|
+
Yn as ListItem,
|
|
3105
|
+
qn as ListItemLeftChild,
|
|
3106
|
+
zn as ListItemMiddleChild,
|
|
3107
|
+
Bn as ListItemRightChild,
|
|
3108
|
+
Rn as MonitorIcon,
|
|
3109
|
+
kn as MonitorSmartphoneIcon,
|
|
3110
|
+
dt as MoveLeftIcon,
|
|
3111
|
+
ut as MoveRightIcon,
|
|
3112
|
+
Kt as RedoIcon,
|
|
3113
|
+
qt as SettingsIcon,
|
|
3114
|
+
Qt as Stack,
|
|
3115
|
+
K as SvgBaseWrapper,
|
|
3116
|
+
jn as TabletSmartphoneIcon,
|
|
3117
|
+
Fn as TargetIcon,
|
|
3118
|
+
gt as TextField,
|
|
3119
|
+
zt as TimerResetIcon,
|
|
3120
|
+
Bt as UndoIcon,
|
|
3121
|
+
Gn as WidgetContainerColumn,
|
|
3122
|
+
Zn as WidgetContainerLarge,
|
|
3123
|
+
Jn as WidgetContainerRow,
|
|
3124
|
+
Qn as WidgetsCatalogFlyout,
|
|
3125
|
+
ft as XCircleIcon,
|
|
3126
|
+
An as ZoomInIcon,
|
|
3127
|
+
Ln as ZoomOutIcon,
|
|
3128
|
+
we as blankDashboardConfig,
|
|
3129
|
+
Ct as cssSettingsCatalog,
|
|
3130
|
+
Vn as cssVarsUtils,
|
|
3131
|
+
Nt as dashboardSettingsUtils,
|
|
3132
|
+
Mt as ensureContainersSequence,
|
|
3133
|
+
st as ensureZoomScaleIsWithinRange,
|
|
3134
|
+
Nn as getDefaultWidgetMetaFromMap,
|
|
3135
|
+
Z as getDistinctCssClasses,
|
|
3136
|
+
Tn as getNewZoomScaleWithinRange,
|
|
3137
|
+
_t as getWidgetMetaFromCatalog,
|
|
3138
|
+
ht as parseContainerTitle,
|
|
3139
|
+
En as removeEmptyContainers,
|
|
3140
|
+
re as resolveColorFromClass,
|
|
3141
|
+
Un as resolvedColors,
|
|
3142
|
+
Hn as showToast,
|
|
3143
|
+
Mn as useDashboardStorageService,
|
|
3144
|
+
_n as useDashboardStore,
|
|
3145
|
+
Pn as useDashboardUndoService
|
|
3146
|
+
};
|