@tenorlab/react-dashboard 1.0.4 → 1.0.6

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