@tenorlab/react-dashboard 1.5.22 → 1.5.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react-dashboard.d.ts +5 -1
- package/dist/react-dashboard.es.js +497 -480
- package/package.json +1 -1
|
@@ -5,18 +5,18 @@ import { jsxs as $, jsx as n } from "react/jsx-runtime";
|
|
|
5
5
|
import ot from "react-dom";
|
|
6
6
|
const wt = (e) => (i, t, r) => {
|
|
7
7
|
const a = r.subscribe;
|
|
8
|
-
return r.subscribe = ((
|
|
9
|
-
let v =
|
|
10
|
-
if (
|
|
8
|
+
return r.subscribe = ((d, f, C) => {
|
|
9
|
+
let v = d;
|
|
10
|
+
if (f) {
|
|
11
11
|
const m = C?.equalityFn || Object.is;
|
|
12
|
-
let
|
|
12
|
+
let c = d(r.getState());
|
|
13
13
|
v = (y) => {
|
|
14
|
-
const p =
|
|
15
|
-
if (!m(
|
|
16
|
-
const T =
|
|
17
|
-
|
|
14
|
+
const p = d(y);
|
|
15
|
+
if (!m(c, p)) {
|
|
16
|
+
const T = c;
|
|
17
|
+
f(c = p, T);
|
|
18
18
|
}
|
|
19
|
-
}, C?.fireImmediately &&
|
|
19
|
+
}, C?.fireImmediately && f(c, c);
|
|
20
20
|
}
|
|
21
21
|
return a(v);
|
|
22
22
|
}), e(i, t, r);
|
|
@@ -30,7 +30,7 @@ const wt = (e) => (i, t, r) => {
|
|
|
30
30
|
const { dashboardConfig: i, widgetKey: t, parentWidgetKey: r, noDuplicatedWidgets: a } = e;
|
|
31
31
|
if (r) {
|
|
32
32
|
if (a && i.childWidgetsConfig.find(
|
|
33
|
-
(
|
|
33
|
+
(d) => d.parentWidgetKey === r && d.widgetKey === t
|
|
34
34
|
))
|
|
35
35
|
return {
|
|
36
36
|
success: !1,
|
|
@@ -70,70 +70,70 @@ const wt = (e) => (i, t, r) => {
|
|
|
70
70
|
if (a.length > 0) {
|
|
71
71
|
const o = e.childWidgetsConfig.filter(
|
|
72
72
|
(m) => `${m.parentWidgetKey}`.trim().toLowerCase() !== a
|
|
73
|
-
),
|
|
73
|
+
), d = e.childWidgetsConfig.filter(
|
|
74
74
|
(m) => `${m.parentWidgetKey}`.trim().toLowerCase() === a && `${m.widgetKey}`.trim().toLowerCase() !== r
|
|
75
|
-
),
|
|
75
|
+
), f = [...o, ...d];
|
|
76
76
|
let C = {
|
|
77
77
|
...e,
|
|
78
|
-
childWidgetsConfig:
|
|
78
|
+
childWidgetsConfig: f
|
|
79
79
|
};
|
|
80
80
|
return r.includes("container") && (C = mt(C)), {
|
|
81
81
|
success: !0,
|
|
82
82
|
updatedDashboardConfig: C
|
|
83
83
|
};
|
|
84
84
|
} else {
|
|
85
|
-
const
|
|
85
|
+
const d = (e.widgets || []).filter(
|
|
86
86
|
(C) => `${C}`.trim().toLowerCase() !== r
|
|
87
|
-
),
|
|
87
|
+
), f = e.childWidgetsConfig.filter(
|
|
88
88
|
(C) => `${C.parentWidgetKey}`.trim().toLowerCase() !== r
|
|
89
89
|
);
|
|
90
90
|
return {
|
|
91
91
|
success: !0,
|
|
92
92
|
updatedDashboardConfig: {
|
|
93
93
|
...e,
|
|
94
|
-
widgets:
|
|
95
|
-
childWidgetsConfig:
|
|
94
|
+
widgets: d,
|
|
95
|
+
childWidgetsConfig: f
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
}, _t = (e, i, t, r) => {
|
|
100
100
|
const a = `${t || ""}`.trim().toLowerCase(), o = `${r || ""}`.trim().toLowerCase();
|
|
101
101
|
if (o.length > 0) {
|
|
102
|
-
const
|
|
102
|
+
const d = e.childWidgetsConfig.filter(
|
|
103
103
|
(p) => `${p.parentWidgetKey}`.trim().toLowerCase() !== o
|
|
104
104
|
);
|
|
105
|
-
let
|
|
105
|
+
let f = e.childWidgetsConfig.filter(
|
|
106
106
|
(p) => `${p.parentWidgetKey}`.trim().toLowerCase() === o
|
|
107
107
|
);
|
|
108
|
-
const C =
|
|
108
|
+
const C = f.find(
|
|
109
109
|
(p) => `${p.widgetKey}`.trim().toLowerCase() === a
|
|
110
|
-
), v =
|
|
110
|
+
), v = f.indexOf(C);
|
|
111
111
|
let m = v + i;
|
|
112
|
-
if (m = Math.max(0, m), m = Math.min(
|
|
112
|
+
if (m = Math.max(0, m), m = Math.min(f.length - 1, m), m === v)
|
|
113
113
|
return {
|
|
114
114
|
success: !1,
|
|
115
115
|
message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
|
|
116
116
|
updatedDashboardConfig: e
|
|
117
117
|
};
|
|
118
|
-
const
|
|
119
|
-
return
|
|
118
|
+
const c = [...f], [y] = c.splice(v, 1);
|
|
119
|
+
return c.splice(m, 0, y), {
|
|
120
120
|
success: !0,
|
|
121
121
|
updatedDashboardConfig: {
|
|
122
122
|
...e,
|
|
123
|
-
childWidgetsConfig: [...
|
|
123
|
+
childWidgetsConfig: [...d, ...c]
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
} else {
|
|
127
|
-
const
|
|
127
|
+
const d = e.widgets || [], C = d.map((y) => `${y}`.trim().toLowerCase()).indexOf(a);
|
|
128
128
|
let v = C + i;
|
|
129
|
-
if (v = Math.max(0, v), v = Math.min(
|
|
129
|
+
if (v = Math.max(0, v), v = Math.min(d.length - 1, v), v === C)
|
|
130
130
|
return {
|
|
131
131
|
success: !1,
|
|
132
132
|
message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
|
|
133
133
|
updatedDashboardConfig: e
|
|
134
134
|
};
|
|
135
|
-
const m = [...
|
|
136
|
-
return m.splice(v, 0,
|
|
135
|
+
const m = [...d], [c] = m.splice(C, 1);
|
|
136
|
+
return m.splice(v, 0, c), {
|
|
137
137
|
success: !0,
|
|
138
138
|
updatedDashboardConfig: {
|
|
139
139
|
...e,
|
|
@@ -199,7 +199,7 @@ const wt = (e) => (i, t, r) => {
|
|
|
199
199
|
...t
|
|
200
200
|
}), o = [
|
|
201
201
|
...r.allDashboardConfigs.filter(
|
|
202
|
-
(
|
|
202
|
+
(d) => d.dashboardId !== a.updatedDashboardConfig.dashboardId
|
|
203
203
|
),
|
|
204
204
|
a.updatedDashboardConfig
|
|
205
205
|
];
|
|
@@ -212,33 +212,33 @@ const wt = (e) => (i, t, r) => {
|
|
|
212
212
|
};
|
|
213
213
|
},
|
|
214
214
|
removeWidget: (t, r) => {
|
|
215
|
-
const a = i(), o = Et(a.currentDashboardConfig, t, r),
|
|
215
|
+
const a = i(), o = Et(a.currentDashboardConfig, t, r), d = [
|
|
216
216
|
...a.allDashboardConfigs.filter(
|
|
217
|
-
(
|
|
217
|
+
(f) => f.dashboardId !== o.updatedDashboardConfig.dashboardId
|
|
218
218
|
),
|
|
219
219
|
o.updatedDashboardConfig
|
|
220
220
|
];
|
|
221
221
|
return o.success && e(() => ({
|
|
222
|
-
allDashboardConfigs:
|
|
222
|
+
allDashboardConfigs: d,
|
|
223
223
|
currentDashboardConfig: o.updatedDashboardConfig
|
|
224
224
|
})), {
|
|
225
225
|
...o,
|
|
226
|
-
allUpdatedDashboardConfigs:
|
|
226
|
+
allUpdatedDashboardConfigs: d
|
|
227
227
|
};
|
|
228
228
|
},
|
|
229
229
|
moveWidget: (t, r, a) => {
|
|
230
|
-
const o = i(),
|
|
230
|
+
const o = i(), d = _t(o.currentDashboardConfig, t, r, a), f = [
|
|
231
231
|
...o.allDashboardConfigs.filter(
|
|
232
|
-
(C) => C.dashboardId !==
|
|
232
|
+
(C) => C.dashboardId !== d.updatedDashboardConfig.dashboardId
|
|
233
233
|
),
|
|
234
|
-
|
|
234
|
+
d.updatedDashboardConfig
|
|
235
235
|
];
|
|
236
|
-
return
|
|
237
|
-
allDashboardConfigs:
|
|
238
|
-
currentDashboardConfig:
|
|
236
|
+
return d.success && e(() => ({
|
|
237
|
+
allDashboardConfigs: f,
|
|
238
|
+
currentDashboardConfig: d.updatedDashboardConfig
|
|
239
239
|
})), {
|
|
240
|
-
...
|
|
241
|
-
allUpdatedDashboardConfigs:
|
|
240
|
+
...d,
|
|
241
|
+
allUpdatedDashboardConfigs: f
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
244
|
}), hn = gt()(
|
|
@@ -247,7 +247,7 @@ const wt = (e) => (i, t, r) => {
|
|
|
247
247
|
}))
|
|
248
248
|
), gn = () => {
|
|
249
249
|
const [e, i] = ae({}), [t, r] = ae({}), a = ce((m) => {
|
|
250
|
-
const
|
|
250
|
+
const c = m.dashboardId;
|
|
251
251
|
i((y) => {
|
|
252
252
|
const p = {
|
|
253
253
|
undoIndex: 0,
|
|
@@ -255,17 +255,17 @@ const wt = (e) => (i, t, r) => {
|
|
|
255
255
|
};
|
|
256
256
|
return r((T) => ({
|
|
257
257
|
...T,
|
|
258
|
-
[
|
|
258
|
+
[c]: 0
|
|
259
259
|
})), {
|
|
260
260
|
...y,
|
|
261
|
-
[
|
|
261
|
+
[c]: [p]
|
|
262
262
|
// Forces a reset to just this one entry
|
|
263
263
|
};
|
|
264
264
|
});
|
|
265
265
|
}, []), o = ce(
|
|
266
266
|
(m) => {
|
|
267
|
-
i((
|
|
268
|
-
const y = m.dashboardId, p =
|
|
267
|
+
i((c) => {
|
|
268
|
+
const y = m.dashboardId, p = c[y] || [], T = t[y] ?? -1, g = p.slice(0, T + 1), b = {
|
|
269
269
|
undoIndex: g.length,
|
|
270
270
|
// New index based on trimmed length
|
|
271
271
|
config: m
|
|
@@ -275,27 +275,27 @@ const wt = (e) => (i, t, r) => {
|
|
|
275
275
|
[y]: w.length - 1
|
|
276
276
|
// Index is now the last element's index
|
|
277
277
|
})), {
|
|
278
|
-
...
|
|
278
|
+
...c,
|
|
279
279
|
[y]: w
|
|
280
280
|
};
|
|
281
281
|
});
|
|
282
282
|
},
|
|
283
283
|
[t]
|
|
284
|
-
),
|
|
285
|
-
i((
|
|
286
|
-
if (!
|
|
287
|
-
return
|
|
288
|
-
const { [m]: y, ...p } =
|
|
284
|
+
), d = ce((m) => {
|
|
285
|
+
i((c) => {
|
|
286
|
+
if (!c[m])
|
|
287
|
+
return c;
|
|
288
|
+
const { [m]: y, ...p } = c;
|
|
289
289
|
return p;
|
|
290
|
-
}), r((
|
|
291
|
-
const { [m]: y, ...p } =
|
|
290
|
+
}), r((c) => {
|
|
291
|
+
const { [m]: y, ...p } = c;
|
|
292
292
|
return p;
|
|
293
293
|
});
|
|
294
|
-
}, []),
|
|
294
|
+
}, []), f = ce(
|
|
295
295
|
(m) => {
|
|
296
|
-
r((
|
|
297
|
-
const y =
|
|
298
|
-
return p !== y ? { ...
|
|
296
|
+
r((c) => {
|
|
297
|
+
const y = c[m] ?? -1, p = Math.max(0, y - 1);
|
|
298
|
+
return p !== y ? { ...c, [m]: p } : c;
|
|
299
299
|
});
|
|
300
300
|
},
|
|
301
301
|
[
|
|
@@ -303,9 +303,9 @@ const wt = (e) => (i, t, r) => {
|
|
|
303
303
|
]
|
|
304
304
|
), C = ce(
|
|
305
305
|
(m) => {
|
|
306
|
-
r((
|
|
307
|
-
const y = e[m]?.length || 0, p =
|
|
308
|
-
return T !== p ? { ...
|
|
306
|
+
r((c) => {
|
|
307
|
+
const y = e[m]?.length || 0, p = c[m] ?? -1, T = Math.min(y - 1, p + 1);
|
|
308
|
+
return T !== p ? { ...c, [m]: T } : c;
|
|
309
309
|
});
|
|
310
310
|
},
|
|
311
311
|
[
|
|
@@ -317,11 +317,11 @@ const wt = (e) => (i, t, r) => {
|
|
|
317
317
|
initializeHistoryForDashboard: a,
|
|
318
318
|
resetAllHistory: () => i({}),
|
|
319
319
|
addUndoEntry: o,
|
|
320
|
-
removeUndoHistoryForDashboard:
|
|
321
|
-
undo:
|
|
320
|
+
removeUndoHistoryForDashboard: d,
|
|
321
|
+
undo: f,
|
|
322
322
|
redo: C,
|
|
323
323
|
getUndoStatus: (m) => {
|
|
324
|
-
const
|
|
324
|
+
const c = t[m] ?? -1, y = e[m]?.length || 0, p = c <= 0, T = c >= y - 1;
|
|
325
325
|
return { isUndoDisabled: p, isRedoDisabled: T };
|
|
326
326
|
},
|
|
327
327
|
undoHistory: e,
|
|
@@ -329,7 +329,7 @@ const wt = (e) => (i, t, r) => {
|
|
|
329
329
|
// (Optional: You might expose undoHistory and historyIndex if needed for debugging)
|
|
330
330
|
};
|
|
331
331
|
};
|
|
332
|
-
function
|
|
332
|
+
function U({
|
|
333
333
|
children: e,
|
|
334
334
|
className: i
|
|
335
335
|
}) {
|
|
@@ -351,14 +351,14 @@ function B({
|
|
|
351
351
|
);
|
|
352
352
|
}
|
|
353
353
|
function mn({ className: e }) {
|
|
354
|
-
return /* @__PURE__ */ $(
|
|
354
|
+
return /* @__PURE__ */ $(U, { className: `lucide lucide-circle-plus-icon lucide-circle-plus ${e}`, children: [
|
|
355
355
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
|
|
356
356
|
/* @__PURE__ */ n("path", { d: "M8 12h8" }),
|
|
357
357
|
/* @__PURE__ */ n("path", { d: "M12 8v8" })
|
|
358
358
|
] });
|
|
359
359
|
}
|
|
360
360
|
function pn({ className: e }) {
|
|
361
|
-
return /* @__PURE__ */ $(
|
|
361
|
+
return /* @__PURE__ */ $(U, { className: `lucide lucide-trash2-icon lucide-trash-2 ${e}`, children: [
|
|
362
362
|
/* @__PURE__ */ n("path", { d: "M10 11v6" }),
|
|
363
363
|
/* @__PURE__ */ n("path", { d: "M14 11v6" }),
|
|
364
364
|
/* @__PURE__ */ n("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
|
|
@@ -367,13 +367,28 @@ function pn({ className: e }) {
|
|
|
367
367
|
] });
|
|
368
368
|
}
|
|
369
369
|
function yn({ className: e }) {
|
|
370
|
-
return /* @__PURE__ */ $(
|
|
370
|
+
return /* @__PURE__ */ $(U, { className: `lucide lucide-square-pen-icon lucide-square-pen ${e}`, children: [
|
|
371
371
|
/* @__PURE__ */ n("path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
372
372
|
/* @__PURE__ */ n("path", { d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" })
|
|
373
373
|
] });
|
|
374
374
|
}
|
|
375
375
|
function bn({ className: e }) {
|
|
376
|
-
return /* @__PURE__ */ $(
|
|
376
|
+
return /* @__PURE__ */ $(
|
|
377
|
+
U,
|
|
378
|
+
{
|
|
379
|
+
className: `lucide lucide-text-cursor-input-icon lucide-text-cursor-input ${e}`,
|
|
380
|
+
children: [
|
|
381
|
+
/* @__PURE__ */ n("path", { d: "M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6" }),
|
|
382
|
+
/* @__PURE__ */ n("path", { d: "M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7" }),
|
|
383
|
+
/* @__PURE__ */ n("path", { d: "M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1" }),
|
|
384
|
+
/* @__PURE__ */ n("path", { d: "M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1" }),
|
|
385
|
+
/* @__PURE__ */ n("path", { d: "M9 6v12" })
|
|
386
|
+
]
|
|
387
|
+
}
|
|
388
|
+
);
|
|
389
|
+
}
|
|
390
|
+
function vn({ className: e }) {
|
|
391
|
+
return /* @__PURE__ */ $(U, { className: `lucide lucide-grid3x3-icon lucide-grid-3x3 ${e}`, children: [
|
|
377
392
|
/* @__PURE__ */ n("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
378
393
|
/* @__PURE__ */ n("path", { d: "M3 9h18" }),
|
|
379
394
|
/* @__PURE__ */ n("path", { d: "M3 15h18" }),
|
|
@@ -381,16 +396,16 @@ function bn({ className: e }) {
|
|
|
381
396
|
/* @__PURE__ */ n("path", { d: "M15 3v18" })
|
|
382
397
|
] });
|
|
383
398
|
}
|
|
384
|
-
function
|
|
385
|
-
return /* @__PURE__ */ $(
|
|
399
|
+
function xn({ className: e }) {
|
|
400
|
+
return /* @__PURE__ */ $(U, { className: `lucide lucide-monitor-icon lucide-monitor ${e}`, children: [
|
|
386
401
|
/* @__PURE__ */ n("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
|
|
387
402
|
/* @__PURE__ */ n("line", { x1: "8", x2: "16", y1: "21", y2: "21" }),
|
|
388
403
|
/* @__PURE__ */ n("line", { x1: "12", x2: "12", y1: "17", y2: "21" })
|
|
389
404
|
] });
|
|
390
405
|
}
|
|
391
|
-
function
|
|
406
|
+
function Cn({ className: e }) {
|
|
392
407
|
return /* @__PURE__ */ $(
|
|
393
|
-
|
|
408
|
+
U,
|
|
394
409
|
{
|
|
395
410
|
className: `lucide lucide-monitor-smartphone-icon lucide-monitor-smartphone ${e}`,
|
|
396
411
|
children: [
|
|
@@ -404,7 +419,7 @@ function xn({ className: e }) {
|
|
|
404
419
|
}
|
|
405
420
|
function it({ className: e }) {
|
|
406
421
|
return /* @__PURE__ */ $(
|
|
407
|
-
|
|
422
|
+
U,
|
|
408
423
|
{
|
|
409
424
|
className: `lucide lucide-circle-arrow-left-icon lucide-circle-arrow-left ${e}`,
|
|
410
425
|
children: [
|
|
@@ -417,7 +432,7 @@ function it({ className: e }) {
|
|
|
417
432
|
}
|
|
418
433
|
function at({ className: e }) {
|
|
419
434
|
return /* @__PURE__ */ $(
|
|
420
|
-
|
|
435
|
+
U,
|
|
421
436
|
{
|
|
422
437
|
className: `lucide lucide-circle-arrow-right-icon lucide-circle-arrow-right ${e}`,
|
|
423
438
|
children: [
|
|
@@ -429,14 +444,14 @@ function at({ className: e }) {
|
|
|
429
444
|
);
|
|
430
445
|
}
|
|
431
446
|
function Pt({ className: e }) {
|
|
432
|
-
return /* @__PURE__ */ $(
|
|
447
|
+
return /* @__PURE__ */ $(U, { className: `lucide lucide-settings-icon lucide-settings ${e}`, children: [
|
|
433
448
|
/* @__PURE__ */ n("path", { d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }),
|
|
434
449
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "3" })
|
|
435
450
|
] });
|
|
436
451
|
}
|
|
437
|
-
function
|
|
452
|
+
function wn({ className: e }) {
|
|
438
453
|
return /* @__PURE__ */ $(
|
|
439
|
-
|
|
454
|
+
U,
|
|
440
455
|
{
|
|
441
456
|
className: `lucide lucide-tablet-smartphone-icon lucide-tablet-smartphone ${e}`,
|
|
442
457
|
children: [
|
|
@@ -448,49 +463,49 @@ function Cn({ className: e }) {
|
|
|
448
463
|
);
|
|
449
464
|
}
|
|
450
465
|
function st({ className: e }) {
|
|
451
|
-
return /* @__PURE__ */ $(
|
|
466
|
+
return /* @__PURE__ */ $(U, { className: `lucide lucide-circle-x-icon lucide-circle-x ${e}`, children: [
|
|
452
467
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
|
|
453
468
|
/* @__PURE__ */ n("path", { d: "m15 9-6 6" }),
|
|
454
469
|
/* @__PURE__ */ n("path", { d: "m9 9 6 6" })
|
|
455
470
|
] });
|
|
456
471
|
}
|
|
457
|
-
function
|
|
458
|
-
return /* @__PURE__ */ $(
|
|
472
|
+
function Sn({ className: e }) {
|
|
473
|
+
return /* @__PURE__ */ $(U, { className: `lucide lucide-zoom-in-icon lucide-zoom-in ${e}`, children: [
|
|
459
474
|
/* @__PURE__ */ n("circle", { cx: "11", cy: "11", r: "8" }),
|
|
460
475
|
/* @__PURE__ */ n("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
|
|
461
476
|
/* @__PURE__ */ n("line", { x1: "11", x2: "11", y1: "8", y2: "14" }),
|
|
462
477
|
/* @__PURE__ */ n("line", { x1: "8", x2: "14", y1: "11", y2: "11" })
|
|
463
478
|
] });
|
|
464
479
|
}
|
|
465
|
-
function
|
|
466
|
-
return /* @__PURE__ */ $(
|
|
480
|
+
function Dn({ className: e }) {
|
|
481
|
+
return /* @__PURE__ */ $(U, { className: `lucide lucide-zoom-out-icon lucide-zoom-out ${e}`, children: [
|
|
467
482
|
/* @__PURE__ */ n("circle", { cx: "11", cy: "11", r: "8" }),
|
|
468
483
|
/* @__PURE__ */ n("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
|
|
469
484
|
/* @__PURE__ */ n("line", { x1: "8", x2: "14", y1: "11", y2: "11" })
|
|
470
485
|
] });
|
|
471
486
|
}
|
|
472
487
|
function $t({ className: e }) {
|
|
473
|
-
return /* @__PURE__ */ $(
|
|
488
|
+
return /* @__PURE__ */ $(U, { className: `lucide lucide-timer-reset-icon lucide-timer-reset ${e}`, children: [
|
|
474
489
|
/* @__PURE__ */ n("path", { d: "M10 2h4" }),
|
|
475
490
|
/* @__PURE__ */ n("path", { d: "M12 14v-4" }),
|
|
476
491
|
/* @__PURE__ */ n("path", { d: "M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6" }),
|
|
477
492
|
/* @__PURE__ */ n("path", { d: "M9 17H4v5" })
|
|
478
493
|
] });
|
|
479
494
|
}
|
|
480
|
-
function
|
|
481
|
-
return /* @__PURE__ */ $(
|
|
495
|
+
function It({ className: e }) {
|
|
496
|
+
return /* @__PURE__ */ $(U, { className: `lucide lucide-undo-icon lucide-undo ${e}`, children: [
|
|
482
497
|
/* @__PURE__ */ n("path", { d: "M3 7v6h6" }),
|
|
483
498
|
/* @__PURE__ */ n("path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" })
|
|
484
499
|
] });
|
|
485
500
|
}
|
|
486
501
|
function Rt({ className: e }) {
|
|
487
|
-
return /* @__PURE__ */ $(
|
|
502
|
+
return /* @__PURE__ */ $(U, { className: `lucide lucide-redo-icon lucide-redo ${e}`, children: [
|
|
488
503
|
/* @__PURE__ */ n("path", { d: "M21 7v6h-6" }),
|
|
489
504
|
/* @__PURE__ */ n("path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7" })
|
|
490
505
|
] });
|
|
491
506
|
}
|
|
492
|
-
function
|
|
493
|
-
return /* @__PURE__ */ $(
|
|
507
|
+
function Wt({ className: e }) {
|
|
508
|
+
return /* @__PURE__ */ $(U, { className: `lucide lucide-hand-icon lucide-hand ${e}`, children: [
|
|
494
509
|
/* @__PURE__ */ n("path", { d: "M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2" }),
|
|
495
510
|
/* @__PURE__ */ n("path", { d: "M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" }),
|
|
496
511
|
/* @__PURE__ */ n("path", { d: "M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8" }),
|
|
@@ -498,7 +513,7 @@ function It({ className: e }) {
|
|
|
498
513
|
] });
|
|
499
514
|
}
|
|
500
515
|
function Ot({ className: e }) {
|
|
501
|
-
return /* @__PURE__ */ $(
|
|
516
|
+
return /* @__PURE__ */ $(U, { className: `lucide lucide-hand-grab-icon lucide-hand-grab ${e}`, children: [
|
|
502
517
|
/* @__PURE__ */ n("path", { d: "M18 11.5V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1.4" }),
|
|
503
518
|
/* @__PURE__ */ n("path", { d: "M14 10V8a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" }),
|
|
504
519
|
/* @__PURE__ */ n("path", { d: "M10 9.9V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v5" }),
|
|
@@ -507,15 +522,15 @@ function Ot({ className: e }) {
|
|
|
507
522
|
] });
|
|
508
523
|
}
|
|
509
524
|
function kt({ className: e }) {
|
|
510
|
-
return /* @__PURE__ */ $(
|
|
525
|
+
return /* @__PURE__ */ $(U, { className: `lucide lucide-crosshair-icon lucide-crosshair ${e}`, children: [
|
|
511
526
|
/* @__PURE__ */ n("line", { x1: "22", x2: "18", y1: "12", y2: "12" }),
|
|
512
527
|
/* @__PURE__ */ n("line", { x1: "6", x2: "2", y1: "12", y2: "12" }),
|
|
513
528
|
/* @__PURE__ */ n("line", { x1: "12", x2: "12", y1: "6", y2: "2" }),
|
|
514
529
|
/* @__PURE__ */ n("line", { x1: "12", x2: "12", y1: "22", y2: "18" })
|
|
515
530
|
] });
|
|
516
531
|
}
|
|
517
|
-
function
|
|
518
|
-
return /* @__PURE__ */ $(
|
|
532
|
+
function Tn({ className: e }) {
|
|
533
|
+
return /* @__PURE__ */ $(U, { className: `lucide lucide-target-icon lucide-target ${e}`, children: [
|
|
519
534
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
|
|
520
535
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "6" }),
|
|
521
536
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "2" })
|
|
@@ -523,7 +538,7 @@ function Dn({ className: e }) {
|
|
|
523
538
|
}
|
|
524
539
|
function jt({ className: e }) {
|
|
525
540
|
return /* @__PURE__ */ $(
|
|
526
|
-
|
|
541
|
+
U,
|
|
527
542
|
{
|
|
528
543
|
className: `lucide lucide-file-question-mark-icon lucide-file-question-mark ${e}`,
|
|
529
544
|
children: [
|
|
@@ -541,15 +556,15 @@ const lt = ({
|
|
|
541
556
|
value: r,
|
|
542
557
|
onChange: a,
|
|
543
558
|
onKeyDown: o,
|
|
544
|
-
placeholder:
|
|
559
|
+
placeholder: d = ""
|
|
545
560
|
}) => {
|
|
546
|
-
const
|
|
561
|
+
const f = rt(() => t === "small" ? "py-1.5 px-3 text-sm" : "py-2.5 px-4 text-base", [t]), C = G("flex flex-col mb-4", i || ""), m = `${G(`
|
|
547
562
|
block w-full rounded-md px-3 py-1.5 text-base
|
|
548
563
|
bg-formfield content-formfield
|
|
549
564
|
outline-1 -outline-offset-1 outline-primary
|
|
550
565
|
placeholder:text-disabled
|
|
551
566
|
focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-200 sm:text-sm/6
|
|
552
|
-
`)} ${
|
|
567
|
+
`)} ${f}`;
|
|
553
568
|
return /* @__PURE__ */ $("div", { className: C, children: [
|
|
554
569
|
/* @__PURE__ */ n("label", { htmlFor: e, className: "block text-sm/6 font-medium mb-1.5", children: e }),
|
|
555
570
|
/* @__PURE__ */ n(
|
|
@@ -559,8 +574,8 @@ const lt = ({
|
|
|
559
574
|
type: "text",
|
|
560
575
|
value: r,
|
|
561
576
|
onChange: a,
|
|
562
|
-
onKeyDown: (
|
|
563
|
-
placeholder:
|
|
577
|
+
onKeyDown: (c) => o && o(c),
|
|
578
|
+
placeholder: d,
|
|
564
579
|
className: m,
|
|
565
580
|
"aria-label": e
|
|
566
581
|
}
|
|
@@ -583,16 +598,16 @@ function J(e) {
|
|
|
583
598
|
isIconButton: r,
|
|
584
599
|
className: a,
|
|
585
600
|
buttonType: o,
|
|
586
|
-
category:
|
|
587
|
-
px:
|
|
601
|
+
category: d,
|
|
602
|
+
px: f,
|
|
588
603
|
py: C,
|
|
589
604
|
children: v,
|
|
590
605
|
...m
|
|
591
|
-
} = e,
|
|
606
|
+
} = e, c = () => {
|
|
592
607
|
const p = e.isIconButton || !1, T = e.category || "primary", g = e.buttonType || "normal", b = e.disabled || !1, w = e.className || "", N = e.font || "semibold", S = Number((e.border || 0) > 0 ? e.border : 0);
|
|
593
608
|
let D = (e.borderColor || "").trim();
|
|
594
609
|
D = D.length > 0 ? D : "";
|
|
595
|
-
const l = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), M = e.shadow || "sm", s = e.shadowHover || "md",
|
|
610
|
+
const l = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), M = e.shadow || "sm", s = e.shadowHover || "md", h = (e.addCss || "").trim(), u = e.justifyCss || "justify-center";
|
|
596
611
|
if (p)
|
|
597
612
|
return G(
|
|
598
613
|
"flex flex-row items-center",
|
|
@@ -610,35 +625,35 @@ function J(e) {
|
|
|
610
625
|
g === "ghost" ? _.push("text-disabled border-disabled cursor-not-allowed") : _.push("bg-disabled content-disabled border-disabled cursor-not-allowed");
|
|
611
626
|
else {
|
|
612
627
|
_.push("cursor-pointer");
|
|
613
|
-
let
|
|
614
|
-
Ce.has(g) ?
|
|
615
|
-
const
|
|
616
|
-
_.push(
|
|
628
|
+
let I = "";
|
|
629
|
+
Ce.has(g) ? I = `${Ce.get(g)}` : I = `${Ce.get("normal")}`, S < 1 && (I = I.replace("border-[category]", ""));
|
|
630
|
+
const H = I.replace(/\[category\]/g, T).trim();
|
|
631
|
+
_.push(H);
|
|
617
632
|
}
|
|
618
|
-
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-${M}`), _.push(`hover:shadow-${s} group-hover:shadow-${s}`),
|
|
633
|
+
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-${M}`), _.push(`hover:shadow-${s} group-hover:shadow-${s}`), h.length > 0 && _.push(h), h.indexOf("hidden") === -1 && _.push("inline-flex"), _.push(u), _.join(" ").trim();
|
|
619
634
|
}, y = () => {
|
|
620
635
|
const p = e.px || 0.7, T = e.py || 0.25;
|
|
621
636
|
return {
|
|
622
637
|
padding: r ? 0 : `${T}rem ${p}rem `
|
|
623
638
|
};
|
|
624
639
|
};
|
|
625
|
-
return /* @__PURE__ */ n("button", { type: "button", disabled: t, className:
|
|
640
|
+
return /* @__PURE__ */ n("button", { type: "button", disabled: t, className: c(), style: y(), ...m, children: v });
|
|
626
641
|
}
|
|
627
642
|
const At = (e) => e.direction === "row" ? G("flex flex-row items-center gap-2", e.classNames || "") : G("flex flex-col gap-2 w-full", e.classNames || "");
|
|
628
643
|
function Lt(e) {
|
|
629
|
-
const { children: i, testId: t, classNames: r, direction: a, ...o } = e,
|
|
630
|
-
return /* @__PURE__ */ n("div", { "data-testid": t || "not-set", className:
|
|
644
|
+
const { children: i, testId: t, classNames: r, direction: a, ...o } = e, d = At(e);
|
|
645
|
+
return /* @__PURE__ */ n("div", { "data-testid": t || "not-set", className: d, ...o, children: i });
|
|
631
646
|
}
|
|
632
|
-
const
|
|
647
|
+
const Nn = se(
|
|
633
648
|
(e, i) => {
|
|
634
|
-
const { classNames: t, innerClass: r, ...a } = e, o = G(t || "", "w-full"),
|
|
649
|
+
const { classNames: t, innerClass: r, ...a } = e, o = G(t || "", "w-full"), d = G(
|
|
635
650
|
`w-full flex overflow-hidden justify-between items-center gap-0
|
|
636
651
|
rounded-md border`,
|
|
637
652
|
r || ""
|
|
638
653
|
);
|
|
639
|
-
return /* @__PURE__ */ n(Lt, { direction: "row", classNames: o, ...a, children: /* @__PURE__ */ n("div", { className:
|
|
654
|
+
return /* @__PURE__ */ n(Lt, { direction: "row", classNames: o, ...a, children: /* @__PURE__ */ n("div", { className: d, children: e.children }) });
|
|
640
655
|
}
|
|
641
|
-
),
|
|
656
|
+
), En = se((e, i) => /* @__PURE__ */ n(
|
|
642
657
|
"div",
|
|
643
658
|
{
|
|
644
659
|
"data-testid": e.testId || "not-set",
|
|
@@ -649,7 +664,7 @@ const Tn = se(
|
|
|
649
664
|
},
|
|
650
665
|
children: e.children
|
|
651
666
|
}
|
|
652
|
-
)),
|
|
667
|
+
)), _n = se(
|
|
653
668
|
(e, i) => /* @__PURE__ */ n(
|
|
654
669
|
"div",
|
|
655
670
|
{
|
|
@@ -658,7 +673,7 @@ const Tn = se(
|
|
|
658
673
|
children: e.children
|
|
659
674
|
}
|
|
660
675
|
)
|
|
661
|
-
),
|
|
676
|
+
), Mn = se((e, i) => /* @__PURE__ */ n(
|
|
662
677
|
"div",
|
|
663
678
|
{
|
|
664
679
|
"data-testid": e.testId || "not-set",
|
|
@@ -678,7 +693,7 @@ var ke;
|
|
|
678
693
|
function Kt() {
|
|
679
694
|
if (ke) return K;
|
|
680
695
|
ke = 1;
|
|
681
|
-
var e = typeof Symbol == "function" && Symbol.for, i = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, a = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114,
|
|
696
|
+
var e = typeof Symbol == "function" && Symbol.for, i = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, a = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, d = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, f = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, C = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, v = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, m = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, c = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, y = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, p = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, T = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, g = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, b = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, w = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, N = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
682
697
|
function S(l) {
|
|
683
698
|
if (typeof l == "object" && l !== null) {
|
|
684
699
|
var M = l.$$typeof;
|
|
@@ -690,15 +705,15 @@ function Kt() {
|
|
|
690
705
|
case r:
|
|
691
706
|
case o:
|
|
692
707
|
case a:
|
|
693
|
-
case
|
|
708
|
+
case c:
|
|
694
709
|
return l;
|
|
695
710
|
default:
|
|
696
711
|
switch (l = l && l.$$typeof, l) {
|
|
697
|
-
case
|
|
712
|
+
case f:
|
|
698
713
|
case m:
|
|
699
714
|
case T:
|
|
700
715
|
case p:
|
|
701
|
-
case
|
|
716
|
+
case d:
|
|
702
717
|
return l;
|
|
703
718
|
default:
|
|
704
719
|
return M;
|
|
@@ -712,12 +727,12 @@ function Kt() {
|
|
|
712
727
|
function D(l) {
|
|
713
728
|
return S(l) === v;
|
|
714
729
|
}
|
|
715
|
-
return K.AsyncMode = C, K.ConcurrentMode = v, K.ContextConsumer =
|
|
730
|
+
return K.AsyncMode = C, K.ConcurrentMode = v, K.ContextConsumer = f, K.ContextProvider = d, K.Element = i, K.ForwardRef = m, K.Fragment = r, K.Lazy = T, K.Memo = p, K.Portal = t, K.Profiler = o, K.StrictMode = a, K.Suspense = c, K.isAsyncMode = function(l) {
|
|
716
731
|
return D(l) || S(l) === C;
|
|
717
732
|
}, K.isConcurrentMode = D, K.isContextConsumer = function(l) {
|
|
718
|
-
return S(l) ===
|
|
733
|
+
return S(l) === f;
|
|
719
734
|
}, K.isContextProvider = function(l) {
|
|
720
|
-
return S(l) ===
|
|
735
|
+
return S(l) === d;
|
|
721
736
|
}, K.isElement = function(l) {
|
|
722
737
|
return typeof l == "object" && l !== null && l.$$typeof === i;
|
|
723
738
|
}, K.isForwardRef = function(l) {
|
|
@@ -735,19 +750,19 @@ function Kt() {
|
|
|
735
750
|
}, K.isStrictMode = function(l) {
|
|
736
751
|
return S(l) === a;
|
|
737
752
|
}, K.isSuspense = function(l) {
|
|
738
|
-
return S(l) ===
|
|
753
|
+
return S(l) === c;
|
|
739
754
|
}, K.isValidElementType = function(l) {
|
|
740
|
-
return typeof l == "string" || typeof l == "function" || l === r || l === v || l === o || l === a || l ===
|
|
755
|
+
return typeof l == "string" || typeof l == "function" || l === r || l === v || l === o || l === a || l === c || l === y || typeof l == "object" && l !== null && (l.$$typeof === T || l.$$typeof === p || l.$$typeof === d || l.$$typeof === f || l.$$typeof === m || l.$$typeof === b || l.$$typeof === w || l.$$typeof === N || l.$$typeof === g);
|
|
741
756
|
}, K.typeOf = S, K;
|
|
742
757
|
}
|
|
743
758
|
var Y = {};
|
|
744
759
|
var je;
|
|
745
760
|
function Yt() {
|
|
746
761
|
return je || (je = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
747
|
-
var e = typeof Symbol == "function" && Symbol.for, i = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, a = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114,
|
|
762
|
+
var e = typeof Symbol == "function" && Symbol.for, i = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, a = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, d = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, f = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, C = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, v = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, m = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, c = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, y = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, p = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, T = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, g = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, b = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, w = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, N = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
748
763
|
function S(E) {
|
|
749
764
|
return typeof E == "string" || typeof E == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
750
|
-
E === r || E === v || E === o || E === a || E ===
|
|
765
|
+
E === r || E === v || E === o || E === a || E === c || E === y || typeof E == "object" && E !== null && (E.$$typeof === T || E.$$typeof === p || E.$$typeof === d || E.$$typeof === f || E.$$typeof === m || E.$$typeof === b || E.$$typeof === w || E.$$typeof === N || E.$$typeof === g);
|
|
751
766
|
}
|
|
752
767
|
function D(E) {
|
|
753
768
|
if (typeof E == "object" && E !== null) {
|
|
@@ -761,16 +776,16 @@ function Yt() {
|
|
|
761
776
|
case r:
|
|
762
777
|
case o:
|
|
763
778
|
case a:
|
|
764
|
-
case
|
|
779
|
+
case c:
|
|
765
780
|
return fe;
|
|
766
781
|
default:
|
|
767
782
|
var Oe = fe && fe.$$typeof;
|
|
768
783
|
switch (Oe) {
|
|
769
|
-
case
|
|
784
|
+
case f:
|
|
770
785
|
case m:
|
|
771
786
|
case T:
|
|
772
787
|
case p:
|
|
773
|
-
case
|
|
788
|
+
case d:
|
|
774
789
|
return Oe;
|
|
775
790
|
default:
|
|
776
791
|
return te;
|
|
@@ -781,7 +796,7 @@ function Yt() {
|
|
|
781
796
|
}
|
|
782
797
|
}
|
|
783
798
|
}
|
|
784
|
-
var l = C, M = v, s =
|
|
799
|
+
var l = C, M = v, s = f, h = d, u = i, _ = m, I = r, H = T, X = p, V = t, Q = o, B = a, ee = c, ie = !1;
|
|
785
800
|
function le(E) {
|
|
786
801
|
return ie || (ie = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), x(E) || D(E) === C;
|
|
787
802
|
}
|
|
@@ -789,10 +804,10 @@ function Yt() {
|
|
|
789
804
|
return D(E) === v;
|
|
790
805
|
}
|
|
791
806
|
function P(E) {
|
|
792
|
-
return D(E) ===
|
|
807
|
+
return D(E) === f;
|
|
793
808
|
}
|
|
794
809
|
function j(E) {
|
|
795
|
-
return D(E) ===
|
|
810
|
+
return D(E) === d;
|
|
796
811
|
}
|
|
797
812
|
function O(E) {
|
|
798
813
|
return typeof E == "object" && E !== null && E.$$typeof === i;
|
|
@@ -803,7 +818,7 @@ function Yt() {
|
|
|
803
818
|
function A(E) {
|
|
804
819
|
return D(E) === r;
|
|
805
820
|
}
|
|
806
|
-
function
|
|
821
|
+
function W(E) {
|
|
807
822
|
return D(E) === T;
|
|
808
823
|
}
|
|
809
824
|
function k(E) {
|
|
@@ -819,9 +834,9 @@ function Yt() {
|
|
|
819
834
|
return D(E) === a;
|
|
820
835
|
}
|
|
821
836
|
function Z(E) {
|
|
822
|
-
return D(E) ===
|
|
837
|
+
return D(E) === c;
|
|
823
838
|
}
|
|
824
|
-
Y.AsyncMode = l, Y.ConcurrentMode = M, Y.ContextConsumer = s, Y.ContextProvider =
|
|
839
|
+
Y.AsyncMode = l, Y.ConcurrentMode = M, Y.ContextConsumer = s, Y.ContextProvider = h, Y.Element = u, Y.ForwardRef = _, Y.Fragment = I, Y.Lazy = H, Y.Memo = X, Y.Portal = V, Y.Profiler = Q, Y.StrictMode = B, Y.Suspense = ee, Y.isAsyncMode = le, Y.isConcurrentMode = x, Y.isContextConsumer = P, Y.isContextProvider = j, Y.isElement = O, Y.isForwardRef = R, Y.isFragment = A, Y.isLazy = W, Y.isMemo = k, Y.isPortal = L, Y.isProfiler = F, Y.isStrictMode = q, Y.isSuspense = Z, Y.isValidElementType = S, Y.typeOf = D;
|
|
825
840
|
})()), Y;
|
|
826
841
|
}
|
|
827
842
|
var Ae;
|
|
@@ -845,10 +860,10 @@ function Ft() {
|
|
|
845
860
|
var o = new String("abc");
|
|
846
861
|
if (o[5] = "de", Object.getOwnPropertyNames(o)[0] === "5")
|
|
847
862
|
return !1;
|
|
848
|
-
for (var
|
|
849
|
-
|
|
850
|
-
var C = Object.getOwnPropertyNames(
|
|
851
|
-
return
|
|
863
|
+
for (var d = {}, f = 0; f < 10; f++)
|
|
864
|
+
d["_" + String.fromCharCode(f)] = f;
|
|
865
|
+
var C = Object.getOwnPropertyNames(d).map(function(m) {
|
|
866
|
+
return d[m];
|
|
852
867
|
});
|
|
853
868
|
if (C.join("") !== "0123456789")
|
|
854
869
|
return !1;
|
|
@@ -860,22 +875,22 @@ function Ft() {
|
|
|
860
875
|
return !1;
|
|
861
876
|
}
|
|
862
877
|
}
|
|
863
|
-
return Se = a() ? Object.assign : function(o,
|
|
864
|
-
for (var
|
|
865
|
-
|
|
866
|
-
for (var
|
|
867
|
-
i.call(
|
|
878
|
+
return Se = a() ? Object.assign : function(o, d) {
|
|
879
|
+
for (var f, C = r(o), v, m = 1; m < arguments.length; m++) {
|
|
880
|
+
f = Object(arguments[m]);
|
|
881
|
+
for (var c in f)
|
|
882
|
+
i.call(f, c) && (C[c] = f[c]);
|
|
868
883
|
if (e) {
|
|
869
|
-
v = e(
|
|
884
|
+
v = e(f);
|
|
870
885
|
for (var y = 0; y < v.length; y++)
|
|
871
|
-
t.call(
|
|
886
|
+
t.call(f, v[y]) && (C[v[y]] = f[v[y]]);
|
|
872
887
|
}
|
|
873
888
|
}
|
|
874
889
|
return C;
|
|
875
890
|
}, Se;
|
|
876
891
|
}
|
|
877
892
|
var De, qe;
|
|
878
|
-
function
|
|
893
|
+
function Ie() {
|
|
879
894
|
if (qe) return De;
|
|
880
895
|
qe = 1;
|
|
881
896
|
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
@@ -892,39 +907,39 @@ function Ut() {
|
|
|
892
907
|
var e = function() {
|
|
893
908
|
};
|
|
894
909
|
if (process.env.NODE_ENV !== "production") {
|
|
895
|
-
var i = /* @__PURE__ */
|
|
910
|
+
var i = /* @__PURE__ */ Ie(), t = {}, r = /* @__PURE__ */ dt();
|
|
896
911
|
e = function(o) {
|
|
897
|
-
var
|
|
898
|
-
typeof console < "u" && console.error(
|
|
912
|
+
var d = "Warning: " + o;
|
|
913
|
+
typeof console < "u" && console.error(d);
|
|
899
914
|
try {
|
|
900
|
-
throw new Error(
|
|
915
|
+
throw new Error(d);
|
|
901
916
|
} catch {
|
|
902
917
|
}
|
|
903
918
|
};
|
|
904
919
|
}
|
|
905
|
-
function a(o,
|
|
920
|
+
function a(o, d, f, C, v) {
|
|
906
921
|
if (process.env.NODE_ENV !== "production") {
|
|
907
922
|
for (var m in o)
|
|
908
923
|
if (r(o, m)) {
|
|
909
|
-
var
|
|
924
|
+
var c;
|
|
910
925
|
try {
|
|
911
926
|
if (typeof o[m] != "function") {
|
|
912
927
|
var y = Error(
|
|
913
|
-
(C || "React class") + ": " +
|
|
928
|
+
(C || "React class") + ": " + f + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
914
929
|
);
|
|
915
930
|
throw y.name = "Invariant Violation", y;
|
|
916
931
|
}
|
|
917
|
-
|
|
932
|
+
c = o[m](d, m, C, f, null, i);
|
|
918
933
|
} catch (T) {
|
|
919
|
-
|
|
934
|
+
c = T;
|
|
920
935
|
}
|
|
921
|
-
if (
|
|
922
|
-
(C || "React class") + ": type specification of " +
|
|
923
|
-
),
|
|
924
|
-
t[
|
|
936
|
+
if (c && !(c instanceof Error) && e(
|
|
937
|
+
(C || "React class") + ": type specification of " + f + " `" + m + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof c + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
938
|
+
), c instanceof Error && !(c.message in t)) {
|
|
939
|
+
t[c.message] = !0;
|
|
925
940
|
var p = v ? v() : "";
|
|
926
941
|
e(
|
|
927
|
-
"Failed " +
|
|
942
|
+
"Failed " + f + " type: " + c.message + (p ?? "")
|
|
928
943
|
);
|
|
929
944
|
}
|
|
930
945
|
}
|
|
@@ -935,25 +950,25 @@ function Ut() {
|
|
|
935
950
|
}, Ne = a, Ne;
|
|
936
951
|
}
|
|
937
952
|
var Ee, Fe;
|
|
938
|
-
function
|
|
953
|
+
function zt() {
|
|
939
954
|
if (Fe) return Ee;
|
|
940
955
|
Fe = 1;
|
|
941
|
-
var e = ct(), i = Ft(), t = /* @__PURE__ */
|
|
956
|
+
var e = ct(), i = Ft(), t = /* @__PURE__ */ Ie(), r = /* @__PURE__ */ dt(), a = /* @__PURE__ */ Ut(), o = function() {
|
|
942
957
|
};
|
|
943
|
-
process.env.NODE_ENV !== "production" && (o = function(
|
|
944
|
-
var C = "Warning: " +
|
|
958
|
+
process.env.NODE_ENV !== "production" && (o = function(f) {
|
|
959
|
+
var C = "Warning: " + f;
|
|
945
960
|
typeof console < "u" && console.error(C);
|
|
946
961
|
try {
|
|
947
962
|
throw new Error(C);
|
|
948
963
|
} catch {
|
|
949
964
|
}
|
|
950
965
|
});
|
|
951
|
-
function
|
|
966
|
+
function d() {
|
|
952
967
|
return null;
|
|
953
968
|
}
|
|
954
|
-
return Ee = function(
|
|
969
|
+
return Ee = function(f, C) {
|
|
955
970
|
var v = typeof Symbol == "function" && Symbol.iterator, m = "@@iterator";
|
|
956
|
-
function
|
|
971
|
+
function c(x) {
|
|
957
972
|
var P = x && (v && x[v] || x[m]);
|
|
958
973
|
if (typeof P == "function")
|
|
959
974
|
return P;
|
|
@@ -973,10 +988,10 @@ function Bt() {
|
|
|
973
988
|
elementType: l(),
|
|
974
989
|
instanceOf: M,
|
|
975
990
|
node: _(),
|
|
976
|
-
objectOf:
|
|
991
|
+
objectOf: h,
|
|
977
992
|
oneOf: s,
|
|
978
993
|
oneOfType: u,
|
|
979
|
-
shape:
|
|
994
|
+
shape: H,
|
|
980
995
|
exact: X
|
|
981
996
|
};
|
|
982
997
|
function T(x, P) {
|
|
@@ -989,7 +1004,7 @@ function Bt() {
|
|
|
989
1004
|
function b(x) {
|
|
990
1005
|
if (process.env.NODE_ENV !== "production")
|
|
991
1006
|
var P = {}, j = 0;
|
|
992
|
-
function O(A,
|
|
1007
|
+
function O(A, W, k, L, F, q, Z) {
|
|
993
1008
|
if (L = L || y, q = q || k, Z !== t) {
|
|
994
1009
|
if (C) {
|
|
995
1010
|
var E = new Error(
|
|
@@ -1004,18 +1019,18 @@ function Bt() {
|
|
|
1004
1019
|
), P[te] = !0, j++);
|
|
1005
1020
|
}
|
|
1006
1021
|
}
|
|
1007
|
-
return
|
|
1022
|
+
return W[k] == null ? A ? W[k] === null ? new g("The " + F + " `" + q + "` is marked as required " + ("in `" + L + "`, but its value is `null`.")) : new g("The " + F + " `" + q + "` is marked as required in " + ("`" + L + "`, but its value is `undefined`.")) : null : x(W, k, L, F, q);
|
|
1008
1023
|
}
|
|
1009
1024
|
var R = O.bind(null, !1);
|
|
1010
1025
|
return R.isRequired = O.bind(null, !0), R;
|
|
1011
1026
|
}
|
|
1012
1027
|
function w(x) {
|
|
1013
|
-
function P(j, O, R, A,
|
|
1014
|
-
var L = j[O], F =
|
|
1028
|
+
function P(j, O, R, A, W, k) {
|
|
1029
|
+
var L = j[O], F = B(L);
|
|
1015
1030
|
if (F !== x) {
|
|
1016
1031
|
var q = ee(L);
|
|
1017
1032
|
return new g(
|
|
1018
|
-
"Invalid " + A + " `" +
|
|
1033
|
+
"Invalid " + A + " `" + W + "` of type " + ("`" + q + "` supplied to `" + R + "`, expected ") + ("`" + x + "`."),
|
|
1019
1034
|
{ expectedType: x }
|
|
1020
1035
|
);
|
|
1021
1036
|
}
|
|
@@ -1024,19 +1039,19 @@ function Bt() {
|
|
|
1024
1039
|
return b(P);
|
|
1025
1040
|
}
|
|
1026
1041
|
function N() {
|
|
1027
|
-
return b(
|
|
1042
|
+
return b(d);
|
|
1028
1043
|
}
|
|
1029
1044
|
function S(x) {
|
|
1030
|
-
function P(j, O, R, A,
|
|
1045
|
+
function P(j, O, R, A, W) {
|
|
1031
1046
|
if (typeof x != "function")
|
|
1032
|
-
return new g("Property `" +
|
|
1047
|
+
return new g("Property `" + W + "` of component `" + R + "` has invalid PropType notation inside arrayOf.");
|
|
1033
1048
|
var k = j[O];
|
|
1034
1049
|
if (!Array.isArray(k)) {
|
|
1035
|
-
var L =
|
|
1036
|
-
return new g("Invalid " + A + " `" +
|
|
1050
|
+
var L = B(k);
|
|
1051
|
+
return new g("Invalid " + A + " `" + W + "` of type " + ("`" + L + "` supplied to `" + R + "`, expected an array."));
|
|
1037
1052
|
}
|
|
1038
1053
|
for (var F = 0; F < k.length; F++) {
|
|
1039
|
-
var q = x(k, F, R, A,
|
|
1054
|
+
var q = x(k, F, R, A, W + "[" + F + "]", t);
|
|
1040
1055
|
if (q instanceof Error)
|
|
1041
1056
|
return q;
|
|
1042
1057
|
}
|
|
@@ -1046,9 +1061,9 @@ function Bt() {
|
|
|
1046
1061
|
}
|
|
1047
1062
|
function D() {
|
|
1048
1063
|
function x(P, j, O, R, A) {
|
|
1049
|
-
var
|
|
1050
|
-
if (!
|
|
1051
|
-
var k =
|
|
1064
|
+
var W = P[j];
|
|
1065
|
+
if (!f(W)) {
|
|
1066
|
+
var k = B(W);
|
|
1052
1067
|
return new g("Invalid " + R + " `" + A + "` of type " + ("`" + k + "` supplied to `" + O + "`, expected a single ReactElement."));
|
|
1053
1068
|
}
|
|
1054
1069
|
return null;
|
|
@@ -1057,9 +1072,9 @@ function Bt() {
|
|
|
1057
1072
|
}
|
|
1058
1073
|
function l() {
|
|
1059
1074
|
function x(P, j, O, R, A) {
|
|
1060
|
-
var
|
|
1061
|
-
if (!e.isValidElementType(
|
|
1062
|
-
var k =
|
|
1075
|
+
var W = P[j];
|
|
1076
|
+
if (!e.isValidElementType(W)) {
|
|
1077
|
+
var k = B(W);
|
|
1063
1078
|
return new g("Invalid " + R + " `" + A + "` of type " + ("`" + k + "` supplied to `" + O + "`, expected a single ReactElement type."));
|
|
1064
1079
|
}
|
|
1065
1080
|
return null;
|
|
@@ -1067,10 +1082,10 @@ function Bt() {
|
|
|
1067
1082
|
return b(x);
|
|
1068
1083
|
}
|
|
1069
1084
|
function M(x) {
|
|
1070
|
-
function P(j, O, R, A,
|
|
1085
|
+
function P(j, O, R, A, W) {
|
|
1071
1086
|
if (!(j[O] instanceof x)) {
|
|
1072
1087
|
var k = x.name || y, L = le(j[O]);
|
|
1073
|
-
return new g("Invalid " + A + " `" +
|
|
1088
|
+
return new g("Invalid " + A + " `" + W + "` of type " + ("`" + L + "` supplied to `" + R + "`, expected ") + ("instance of `" + k + "`."));
|
|
1074
1089
|
}
|
|
1075
1090
|
return null;
|
|
1076
1091
|
}
|
|
@@ -1080,8 +1095,8 @@ function Bt() {
|
|
|
1080
1095
|
if (!Array.isArray(x))
|
|
1081
1096
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
|
|
1082
1097
|
"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])."
|
|
1083
|
-
) : o("Invalid argument supplied to oneOf, expected an array.")),
|
|
1084
|
-
function P(j, O, R, A,
|
|
1098
|
+
) : o("Invalid argument supplied to oneOf, expected an array.")), d;
|
|
1099
|
+
function P(j, O, R, A, W) {
|
|
1085
1100
|
for (var k = j[O], L = 0; L < x.length; L++)
|
|
1086
1101
|
if (T(k, x[L]))
|
|
1087
1102
|
return null;
|
|
@@ -1089,20 +1104,20 @@ function Bt() {
|
|
|
1089
1104
|
var te = ee(E);
|
|
1090
1105
|
return te === "symbol" ? String(E) : E;
|
|
1091
1106
|
});
|
|
1092
|
-
return new g("Invalid " + A + " `" +
|
|
1107
|
+
return new g("Invalid " + A + " `" + W + "` of value `" + String(k) + "` " + ("supplied to `" + R + "`, expected one of " + F + "."));
|
|
1093
1108
|
}
|
|
1094
1109
|
return b(P);
|
|
1095
1110
|
}
|
|
1096
|
-
function
|
|
1097
|
-
function P(j, O, R, A,
|
|
1111
|
+
function h(x) {
|
|
1112
|
+
function P(j, O, R, A, W) {
|
|
1098
1113
|
if (typeof x != "function")
|
|
1099
|
-
return new g("Property `" +
|
|
1100
|
-
var k = j[O], L =
|
|
1114
|
+
return new g("Property `" + W + "` of component `" + R + "` has invalid PropType notation inside objectOf.");
|
|
1115
|
+
var k = j[O], L = B(k);
|
|
1101
1116
|
if (L !== "object")
|
|
1102
|
-
return new g("Invalid " + A + " `" +
|
|
1117
|
+
return new g("Invalid " + A + " `" + W + "` of type " + ("`" + L + "` supplied to `" + R + "`, expected an object."));
|
|
1103
1118
|
for (var F in k)
|
|
1104
1119
|
if (r(k, F)) {
|
|
1105
|
-
var q = x(k, F, R, A,
|
|
1120
|
+
var q = x(k, F, R, A, W + "." + F, t);
|
|
1106
1121
|
if (q instanceof Error)
|
|
1107
1122
|
return q;
|
|
1108
1123
|
}
|
|
@@ -1112,23 +1127,23 @@ function Bt() {
|
|
|
1112
1127
|
}
|
|
1113
1128
|
function u(x) {
|
|
1114
1129
|
if (!Array.isArray(x))
|
|
1115
|
-
return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."),
|
|
1130
|
+
return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), d;
|
|
1116
1131
|
for (var P = 0; P < x.length; P++) {
|
|
1117
1132
|
var j = x[P];
|
|
1118
1133
|
if (typeof j != "function")
|
|
1119
1134
|
return o(
|
|
1120
1135
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ie(j) + " at index " + P + "."
|
|
1121
|
-
),
|
|
1136
|
+
), d;
|
|
1122
1137
|
}
|
|
1123
|
-
function O(R, A,
|
|
1138
|
+
function O(R, A, W, k, L) {
|
|
1124
1139
|
for (var F = [], q = 0; q < x.length; q++) {
|
|
1125
|
-
var Z = x[q], E = Z(R, A,
|
|
1140
|
+
var Z = x[q], E = Z(R, A, W, k, L, t);
|
|
1126
1141
|
if (E == null)
|
|
1127
1142
|
return null;
|
|
1128
1143
|
E.data && r(E.data, "expectedType") && F.push(E.data.expectedType);
|
|
1129
1144
|
}
|
|
1130
1145
|
var te = F.length > 0 ? ", expected one of type [" + F.join(", ") + "]" : "";
|
|
1131
|
-
return new g("Invalid " + k + " `" + L + "` supplied to " + ("`" +
|
|
1146
|
+
return new g("Invalid " + k + " `" + L + "` supplied to " + ("`" + W + "`" + te + "."));
|
|
1132
1147
|
}
|
|
1133
1148
|
return b(O);
|
|
1134
1149
|
}
|
|
@@ -1138,21 +1153,21 @@ function Bt() {
|
|
|
1138
1153
|
}
|
|
1139
1154
|
return b(x);
|
|
1140
1155
|
}
|
|
1141
|
-
function
|
|
1156
|
+
function I(x, P, j, O, R) {
|
|
1142
1157
|
return new g(
|
|
1143
1158
|
(x || "React class") + ": " + P + " type `" + j + "." + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + R + "`."
|
|
1144
1159
|
);
|
|
1145
1160
|
}
|
|
1146
|
-
function
|
|
1147
|
-
function P(j, O, R, A,
|
|
1148
|
-
var k = j[O], L =
|
|
1161
|
+
function H(x) {
|
|
1162
|
+
function P(j, O, R, A, W) {
|
|
1163
|
+
var k = j[O], L = B(k);
|
|
1149
1164
|
if (L !== "object")
|
|
1150
|
-
return new g("Invalid " + A + " `" +
|
|
1165
|
+
return new g("Invalid " + A + " `" + W + "` of type `" + L + "` " + ("supplied to `" + R + "`, expected `object`."));
|
|
1151
1166
|
for (var F in x) {
|
|
1152
1167
|
var q = x[F];
|
|
1153
1168
|
if (typeof q != "function")
|
|
1154
|
-
return
|
|
1155
|
-
var Z = q(k, F, R, A,
|
|
1169
|
+
return I(R, A, W, F, ee(q));
|
|
1170
|
+
var Z = q(k, F, R, A, W + "." + F, t);
|
|
1156
1171
|
if (Z)
|
|
1157
1172
|
return Z;
|
|
1158
1173
|
}
|
|
@@ -1161,21 +1176,21 @@ function Bt() {
|
|
|
1161
1176
|
return b(P);
|
|
1162
1177
|
}
|
|
1163
1178
|
function X(x) {
|
|
1164
|
-
function P(j, O, R, A,
|
|
1165
|
-
var k = j[O], L =
|
|
1179
|
+
function P(j, O, R, A, W) {
|
|
1180
|
+
var k = j[O], L = B(k);
|
|
1166
1181
|
if (L !== "object")
|
|
1167
|
-
return new g("Invalid " + A + " `" +
|
|
1182
|
+
return new g("Invalid " + A + " `" + W + "` of type `" + L + "` " + ("supplied to `" + R + "`, expected `object`."));
|
|
1168
1183
|
var F = i({}, j[O], x);
|
|
1169
1184
|
for (var q in F) {
|
|
1170
1185
|
var Z = x[q];
|
|
1171
1186
|
if (r(x, q) && typeof Z != "function")
|
|
1172
|
-
return
|
|
1187
|
+
return I(R, A, W, q, ee(Z));
|
|
1173
1188
|
if (!Z)
|
|
1174
1189
|
return new g(
|
|
1175
|
-
"Invalid " + A + " `" +
|
|
1190
|
+
"Invalid " + A + " `" + W + "` key `" + q + "` supplied to `" + R + "`.\nBad object: " + JSON.stringify(j[O], null, " ") + `
|
|
1176
1191
|
Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
1177
1192
|
);
|
|
1178
|
-
var E = Z(k, q, R, A,
|
|
1193
|
+
var E = Z(k, q, R, A, W + "." + q, t);
|
|
1179
1194
|
if (E)
|
|
1180
1195
|
return E;
|
|
1181
1196
|
}
|
|
@@ -1194,9 +1209,9 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1194
1209
|
case "object":
|
|
1195
1210
|
if (Array.isArray(x))
|
|
1196
1211
|
return x.every(V);
|
|
1197
|
-
if (x === null ||
|
|
1212
|
+
if (x === null || f(x))
|
|
1198
1213
|
return !0;
|
|
1199
|
-
var P =
|
|
1214
|
+
var P = c(x);
|
|
1200
1215
|
if (P) {
|
|
1201
1216
|
var j = P.call(x), O;
|
|
1202
1217
|
if (P !== x.entries) {
|
|
@@ -1219,14 +1234,14 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1219
1234
|
function Q(x, P) {
|
|
1220
1235
|
return x === "symbol" ? !0 : P ? P["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && P instanceof Symbol : !1;
|
|
1221
1236
|
}
|
|
1222
|
-
function
|
|
1237
|
+
function B(x) {
|
|
1223
1238
|
var P = typeof x;
|
|
1224
1239
|
return Array.isArray(x) ? "array" : x instanceof RegExp ? "object" : Q(P, x) ? "symbol" : P;
|
|
1225
1240
|
}
|
|
1226
1241
|
function ee(x) {
|
|
1227
1242
|
if (typeof x > "u" || x === null)
|
|
1228
1243
|
return "" + x;
|
|
1229
|
-
var P =
|
|
1244
|
+
var P = B(x);
|
|
1230
1245
|
if (P === "object") {
|
|
1231
1246
|
if (x instanceof Date)
|
|
1232
1247
|
return "date";
|
|
@@ -1256,17 +1271,17 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1256
1271
|
}, Ee;
|
|
1257
1272
|
}
|
|
1258
1273
|
var _e, Ue;
|
|
1259
|
-
function
|
|
1274
|
+
function Bt() {
|
|
1260
1275
|
if (Ue) return _e;
|
|
1261
1276
|
Ue = 1;
|
|
1262
|
-
var e = /* @__PURE__ */
|
|
1277
|
+
var e = /* @__PURE__ */ Ie();
|
|
1263
1278
|
function i() {
|
|
1264
1279
|
}
|
|
1265
1280
|
function t() {
|
|
1266
1281
|
}
|
|
1267
1282
|
return t.resetWarningCache = i, _e = function() {
|
|
1268
|
-
function r(
|
|
1269
|
-
if (
|
|
1283
|
+
function r(d, f, C, v, m, c) {
|
|
1284
|
+
if (c !== e) {
|
|
1270
1285
|
var y = new Error(
|
|
1271
1286
|
"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"
|
|
1272
1287
|
);
|
|
@@ -1303,44 +1318,44 @@ function Ht() {
|
|
|
1303
1318
|
return o.PropTypes = o, o;
|
|
1304
1319
|
}, _e;
|
|
1305
1320
|
}
|
|
1306
|
-
var
|
|
1321
|
+
var ze;
|
|
1307
1322
|
function ut() {
|
|
1308
|
-
if (
|
|
1309
|
-
if (
|
|
1323
|
+
if (ze) return he.exports;
|
|
1324
|
+
if (ze = 1, process.env.NODE_ENV !== "production") {
|
|
1310
1325
|
var e = ct(), i = !0;
|
|
1311
|
-
he.exports = /* @__PURE__ */
|
|
1326
|
+
he.exports = /* @__PURE__ */ zt()(e.isElement, i);
|
|
1312
1327
|
} else
|
|
1313
|
-
he.exports = /* @__PURE__ */
|
|
1328
|
+
he.exports = /* @__PURE__ */ Bt()();
|
|
1314
1329
|
return he.exports;
|
|
1315
1330
|
}
|
|
1316
|
-
var me = { exports: {} },
|
|
1317
|
-
function
|
|
1318
|
-
if (
|
|
1319
|
-
|
|
1331
|
+
var me = { exports: {} }, Be;
|
|
1332
|
+
function Ht() {
|
|
1333
|
+
if (Be) return me.exports;
|
|
1334
|
+
Be = 1;
|
|
1320
1335
|
function e(t) {
|
|
1321
1336
|
var r, a, o = "";
|
|
1322
1337
|
if (typeof t == "string" || typeof t == "number") o += t;
|
|
1323
1338
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
1324
|
-
var
|
|
1325
|
-
for (r = 0; r <
|
|
1339
|
+
var d = t.length;
|
|
1340
|
+
for (r = 0; r < d; r++) t[r] && (a = e(t[r])) && (o && (o += " "), o += a);
|
|
1326
1341
|
} else for (a in t) t[a] && (o && (o += " "), o += a);
|
|
1327
1342
|
return o;
|
|
1328
1343
|
}
|
|
1329
1344
|
function i() {
|
|
1330
|
-
for (var t, r, a = 0, o = "",
|
|
1345
|
+
for (var t, r, a = 0, o = "", d = arguments.length; a < d; a++) (t = arguments[a]) && (r = e(t)) && (o && (o += " "), o += r);
|
|
1331
1346
|
return o;
|
|
1332
1347
|
}
|
|
1333
1348
|
return me.exports = i, me.exports.clsx = i, me.exports;
|
|
1334
1349
|
}
|
|
1335
|
-
var
|
|
1350
|
+
var z = {}, re = {}, He;
|
|
1336
1351
|
function ve() {
|
|
1337
|
-
if (
|
|
1338
|
-
|
|
1352
|
+
if (He) return re;
|
|
1353
|
+
He = 1, Object.defineProperty(re, "__esModule", {
|
|
1339
1354
|
value: !0
|
|
1340
1355
|
}), re.dontSetMe = a, re.findInArray = e, re.int = r, re.isFunction = i, re.isNum = t;
|
|
1341
|
-
function e(o,
|
|
1342
|
-
for (let
|
|
1343
|
-
if (
|
|
1356
|
+
function e(o, d) {
|
|
1357
|
+
for (let f = 0, C = o.length; f < C; f++)
|
|
1358
|
+
if (d.apply(d, [o[f], f, o])) return o[f];
|
|
1344
1359
|
}
|
|
1345
1360
|
function i(o) {
|
|
1346
1361
|
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Function]";
|
|
@@ -1351,9 +1366,9 @@ function ve() {
|
|
|
1351
1366
|
function r(o) {
|
|
1352
1367
|
return parseInt(o, 10);
|
|
1353
1368
|
}
|
|
1354
|
-
function a(o,
|
|
1355
|
-
if (o[
|
|
1356
|
-
return new Error(`Invalid prop ${
|
|
1369
|
+
function a(o, d, f) {
|
|
1370
|
+
if (o[d])
|
|
1371
|
+
return new Error(`Invalid prop ${d} passed to ${f} - do not set this, set it on the child.`);
|
|
1357
1372
|
}
|
|
1358
1373
|
return re;
|
|
1359
1374
|
}
|
|
@@ -1367,130 +1382,130 @@ function Xt() {
|
|
|
1367
1382
|
function i() {
|
|
1368
1383
|
let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
|
|
1369
1384
|
if (typeof window > "u") return "";
|
|
1370
|
-
const
|
|
1371
|
-
if (!
|
|
1372
|
-
for (let
|
|
1373
|
-
if (t(o, e[
|
|
1385
|
+
const d = window.document?.documentElement?.style;
|
|
1386
|
+
if (!d || o in d) return "";
|
|
1387
|
+
for (let f = 0; f < e.length; f++)
|
|
1388
|
+
if (t(o, e[f]) in d) return e[f];
|
|
1374
1389
|
return "";
|
|
1375
1390
|
}
|
|
1376
|
-
function t(o,
|
|
1377
|
-
return
|
|
1391
|
+
function t(o, d) {
|
|
1392
|
+
return d ? `${d}${a(o)}` : o;
|
|
1378
1393
|
}
|
|
1379
|
-
function r(o,
|
|
1380
|
-
return
|
|
1394
|
+
function r(o, d) {
|
|
1395
|
+
return d ? `-${d.toLowerCase()}-${o}` : o;
|
|
1381
1396
|
}
|
|
1382
1397
|
function a(o) {
|
|
1383
|
-
let
|
|
1398
|
+
let d = "", f = !0;
|
|
1384
1399
|
for (let C = 0; C < o.length; C++)
|
|
1385
|
-
|
|
1386
|
-
return
|
|
1400
|
+
f ? (d += o[C].toUpperCase(), f = !1) : o[C] === "-" ? f = !0 : d += o[C];
|
|
1401
|
+
return d;
|
|
1387
1402
|
}
|
|
1388
1403
|
return oe.default = i(), oe;
|
|
1389
1404
|
}
|
|
1390
1405
|
var Ve;
|
|
1391
1406
|
function Re() {
|
|
1392
|
-
if (Ve) return
|
|
1393
|
-
Ve = 1, Object.defineProperty(
|
|
1407
|
+
if (Ve) return z;
|
|
1408
|
+
Ve = 1, Object.defineProperty(z, "__esModule", {
|
|
1394
1409
|
value: !0
|
|
1395
|
-
}),
|
|
1410
|
+
}), z.addClassName = l, z.addEvent = d, z.addUserSelectStyles = N, z.createCSSTransform = p, z.createSVGTransform = T, z.getTouch = b, z.getTouchIdentifier = w, z.getTranslation = g, z.innerHeight = m, z.innerWidth = c, z.matchesSelector = a, z.matchesSelectorAndParentsTo = o, z.offsetXYFromParent = y, z.outerHeight = C, z.outerWidth = v, z.removeClassName = M, z.removeEvent = f, z.scheduleRemoveUserSelectStyles = S;
|
|
1396
1411
|
var e = ve(), i = t(Xt());
|
|
1397
|
-
function t(s,
|
|
1412
|
+
function t(s, h) {
|
|
1398
1413
|
if (typeof WeakMap == "function") var u = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakMap();
|
|
1399
|
-
return (t = function(
|
|
1400
|
-
if (!
|
|
1401
|
-
var X, V, Q = { __proto__: null, default:
|
|
1402
|
-
if (
|
|
1403
|
-
if (X =
|
|
1404
|
-
if (X.has(
|
|
1405
|
-
X.set(
|
|
1414
|
+
return (t = function(I, H) {
|
|
1415
|
+
if (!H && I && I.__esModule) return I;
|
|
1416
|
+
var X, V, Q = { __proto__: null, default: I };
|
|
1417
|
+
if (I === null || typeof I != "object" && typeof I != "function") return Q;
|
|
1418
|
+
if (X = H ? _ : u) {
|
|
1419
|
+
if (X.has(I)) return X.get(I);
|
|
1420
|
+
X.set(I, Q);
|
|
1406
1421
|
}
|
|
1407
|
-
for (const
|
|
1422
|
+
for (const B in I) B !== "default" && {}.hasOwnProperty.call(I, B) && ((V = (X = Object.defineProperty) && Object.getOwnPropertyDescriptor(I, B)) && (V.get || V.set) ? X(Q, B, V) : Q[B] = I[B]);
|
|
1408
1423
|
return Q;
|
|
1409
|
-
})(s,
|
|
1424
|
+
})(s, h);
|
|
1410
1425
|
}
|
|
1411
1426
|
let r = "";
|
|
1412
|
-
function a(s,
|
|
1427
|
+
function a(s, h) {
|
|
1413
1428
|
return r || (r = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(u) {
|
|
1414
1429
|
return (0, e.isFunction)(s[u]);
|
|
1415
|
-
})), (0, e.isFunction)(s[r]) ? s[r](
|
|
1430
|
+
})), (0, e.isFunction)(s[r]) ? s[r](h) : !1;
|
|
1416
1431
|
}
|
|
1417
|
-
function o(s,
|
|
1432
|
+
function o(s, h, u) {
|
|
1418
1433
|
let _ = s;
|
|
1419
1434
|
do {
|
|
1420
|
-
if (a(_,
|
|
1435
|
+
if (a(_, h)) return !0;
|
|
1421
1436
|
if (_ === u) return !1;
|
|
1422
1437
|
_ = _.parentNode;
|
|
1423
1438
|
} while (_);
|
|
1424
1439
|
return !1;
|
|
1425
1440
|
}
|
|
1426
|
-
function
|
|
1441
|
+
function d(s, h, u, _) {
|
|
1427
1442
|
if (!s) return;
|
|
1428
|
-
const
|
|
1443
|
+
const I = {
|
|
1429
1444
|
capture: !0,
|
|
1430
1445
|
..._
|
|
1431
1446
|
};
|
|
1432
|
-
s.addEventListener ? s.addEventListener(
|
|
1447
|
+
s.addEventListener ? s.addEventListener(h, u, I) : s.attachEvent ? s.attachEvent("on" + h, u) : s["on" + h] = u;
|
|
1433
1448
|
}
|
|
1434
|
-
function
|
|
1449
|
+
function f(s, h, u, _) {
|
|
1435
1450
|
if (!s) return;
|
|
1436
|
-
const
|
|
1451
|
+
const I = {
|
|
1437
1452
|
capture: !0,
|
|
1438
1453
|
..._
|
|
1439
1454
|
};
|
|
1440
|
-
s.removeEventListener ? s.removeEventListener(
|
|
1455
|
+
s.removeEventListener ? s.removeEventListener(h, u, I) : s.detachEvent ? s.detachEvent("on" + h, u) : s["on" + h] = null;
|
|
1441
1456
|
}
|
|
1442
1457
|
function C(s) {
|
|
1443
|
-
let
|
|
1458
|
+
let h = s.clientHeight;
|
|
1444
1459
|
const u = s.ownerDocument.defaultView.getComputedStyle(s);
|
|
1445
|
-
return
|
|
1460
|
+
return h += (0, e.int)(u.borderTopWidth), h += (0, e.int)(u.borderBottomWidth), h;
|
|
1446
1461
|
}
|
|
1447
1462
|
function v(s) {
|
|
1448
|
-
let
|
|
1463
|
+
let h = s.clientWidth;
|
|
1449
1464
|
const u = s.ownerDocument.defaultView.getComputedStyle(s);
|
|
1450
|
-
return
|
|
1465
|
+
return h += (0, e.int)(u.borderLeftWidth), h += (0, e.int)(u.borderRightWidth), h;
|
|
1451
1466
|
}
|
|
1452
1467
|
function m(s) {
|
|
1453
|
-
let
|
|
1468
|
+
let h = s.clientHeight;
|
|
1454
1469
|
const u = s.ownerDocument.defaultView.getComputedStyle(s);
|
|
1455
|
-
return
|
|
1470
|
+
return h -= (0, e.int)(u.paddingTop), h -= (0, e.int)(u.paddingBottom), h;
|
|
1456
1471
|
}
|
|
1457
|
-
function
|
|
1458
|
-
let
|
|
1472
|
+
function c(s) {
|
|
1473
|
+
let h = s.clientWidth;
|
|
1459
1474
|
const u = s.ownerDocument.defaultView.getComputedStyle(s);
|
|
1460
|
-
return
|
|
1475
|
+
return h -= (0, e.int)(u.paddingLeft), h -= (0, e.int)(u.paddingRight), h;
|
|
1461
1476
|
}
|
|
1462
|
-
function y(s,
|
|
1463
|
-
const
|
|
1477
|
+
function y(s, h, u) {
|
|
1478
|
+
const I = h === h.ownerDocument.body ? {
|
|
1464
1479
|
left: 0,
|
|
1465
1480
|
top: 0
|
|
1466
|
-
} :
|
|
1481
|
+
} : h.getBoundingClientRect(), H = (s.clientX + h.scrollLeft - I.left) / u, X = (s.clientY + h.scrollTop - I.top) / u;
|
|
1467
1482
|
return {
|
|
1468
|
-
x:
|
|
1483
|
+
x: H,
|
|
1469
1484
|
y: X
|
|
1470
1485
|
};
|
|
1471
1486
|
}
|
|
1472
|
-
function p(s,
|
|
1473
|
-
const u = g(s,
|
|
1487
|
+
function p(s, h) {
|
|
1488
|
+
const u = g(s, h, "px");
|
|
1474
1489
|
return {
|
|
1475
1490
|
[(0, i.browserPrefixToKey)("transform", i.default)]: u
|
|
1476
1491
|
};
|
|
1477
1492
|
}
|
|
1478
|
-
function T(s,
|
|
1479
|
-
return g(s,
|
|
1493
|
+
function T(s, h) {
|
|
1494
|
+
return g(s, h, "");
|
|
1480
1495
|
}
|
|
1481
|
-
function g(s,
|
|
1496
|
+
function g(s, h, u) {
|
|
1482
1497
|
let {
|
|
1483
1498
|
x: _,
|
|
1484
|
-
y:
|
|
1485
|
-
} = s,
|
|
1486
|
-
if (
|
|
1487
|
-
const X = `${typeof
|
|
1488
|
-
|
|
1499
|
+
y: I
|
|
1500
|
+
} = s, H = `translate(${_}${u},${I}${u})`;
|
|
1501
|
+
if (h) {
|
|
1502
|
+
const X = `${typeof h.x == "string" ? h.x : h.x + u}`, V = `${typeof h.y == "string" ? h.y : h.y + u}`;
|
|
1503
|
+
H = `translate(${X}, ${V})` + H;
|
|
1489
1504
|
}
|
|
1490
|
-
return
|
|
1505
|
+
return H;
|
|
1491
1506
|
}
|
|
1492
|
-
function b(s,
|
|
1493
|
-
return s.targetTouches && (0, e.findInArray)(s.targetTouches, (u) =>
|
|
1507
|
+
function b(s, h) {
|
|
1508
|
+
return s.targetTouches && (0, e.findInArray)(s.targetTouches, (u) => h === u.identifier) || s.changedTouches && (0, e.findInArray)(s.changedTouches, (u) => h === u.identifier);
|
|
1494
1509
|
}
|
|
1495
1510
|
function w(s) {
|
|
1496
1511
|
if (s.targetTouches && s.targetTouches[0]) return s.targetTouches[0].identifier;
|
|
@@ -1498,10 +1513,10 @@ function Re() {
|
|
|
1498
1513
|
}
|
|
1499
1514
|
function N(s) {
|
|
1500
1515
|
if (!s) return;
|
|
1501
|
-
let
|
|
1502
|
-
|
|
1503
|
-
`,
|
|
1504
|
-
`, s.getElementsByTagName("head")[0].appendChild(
|
|
1516
|
+
let h = s.getElementById("react-draggable-style-el");
|
|
1517
|
+
h || (h = s.createElement("style"), h.type = "text/css", h.id = "react-draggable-style-el", h.innerHTML = `.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
1518
|
+
`, h.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
1519
|
+
`, s.getElementsByTagName("head")[0].appendChild(h)), s.body && l(s.body, "react-draggable-transparent-selection");
|
|
1505
1520
|
}
|
|
1506
1521
|
function S(s) {
|
|
1507
1522
|
window.requestAnimationFrame ? window.requestAnimationFrame(() => {
|
|
@@ -1514,34 +1529,34 @@ function Re() {
|
|
|
1514
1529
|
if (s.body && M(s.body, "react-draggable-transparent-selection"), s.selection)
|
|
1515
1530
|
s.selection.empty();
|
|
1516
1531
|
else {
|
|
1517
|
-
const
|
|
1518
|
-
|
|
1532
|
+
const h = (s.defaultView || window).getSelection();
|
|
1533
|
+
h && h.type !== "Caret" && h.removeAllRanges();
|
|
1519
1534
|
}
|
|
1520
1535
|
} catch {
|
|
1521
1536
|
}
|
|
1522
1537
|
}
|
|
1523
|
-
function l(s,
|
|
1524
|
-
s.classList ? s.classList.add(
|
|
1538
|
+
function l(s, h) {
|
|
1539
|
+
s.classList ? s.classList.add(h) : s.className.match(new RegExp(`(?:^|\\s)${h}(?!\\S)`)) || (s.className += ` ${h}`);
|
|
1525
1540
|
}
|
|
1526
|
-
function M(s,
|
|
1527
|
-
s.classList ? s.classList.remove(
|
|
1541
|
+
function M(s, h) {
|
|
1542
|
+
s.classList ? s.classList.remove(h) : s.className = s.className.replace(new RegExp(`(?:^|\\s)${h}(?!\\S)`, "g"), "");
|
|
1528
1543
|
}
|
|
1529
|
-
return
|
|
1544
|
+
return z;
|
|
1530
1545
|
}
|
|
1531
1546
|
var ne = {}, Ge;
|
|
1532
1547
|
function ft() {
|
|
1533
1548
|
if (Ge) return ne;
|
|
1534
1549
|
Ge = 1, Object.defineProperty(ne, "__esModule", {
|
|
1535
1550
|
value: !0
|
|
1536
|
-
}), ne.canDragX = a, ne.canDragY = o, ne.createCoreData =
|
|
1551
|
+
}), ne.canDragX = a, ne.canDragY = o, ne.createCoreData = f, ne.createDraggableData = C, ne.getBoundPosition = t, ne.getControlPosition = d, ne.snapToGrid = r;
|
|
1537
1552
|
var e = ve(), i = Re();
|
|
1538
|
-
function t(
|
|
1539
|
-
if (!
|
|
1553
|
+
function t(c, y, p) {
|
|
1554
|
+
if (!c.props.bounds) return [y, p];
|
|
1540
1555
|
let {
|
|
1541
1556
|
bounds: T
|
|
1542
|
-
} =
|
|
1557
|
+
} = c.props;
|
|
1543
1558
|
T = typeof T == "string" ? T : v(T);
|
|
1544
|
-
const g = m(
|
|
1559
|
+
const g = m(c);
|
|
1545
1560
|
if (typeof T == "string") {
|
|
1546
1561
|
const {
|
|
1547
1562
|
ownerDocument: b
|
|
@@ -1559,24 +1574,24 @@ function ft() {
|
|
|
1559
1574
|
}
|
|
1560
1575
|
return (0, e.isNum)(T.right) && (y = Math.min(y, T.right)), (0, e.isNum)(T.bottom) && (p = Math.min(p, T.bottom)), (0, e.isNum)(T.left) && (y = Math.max(y, T.left)), (0, e.isNum)(T.top) && (p = Math.max(p, T.top)), [y, p];
|
|
1561
1576
|
}
|
|
1562
|
-
function r(
|
|
1563
|
-
const T = Math.round(y /
|
|
1577
|
+
function r(c, y, p) {
|
|
1578
|
+
const T = Math.round(y / c[0]) * c[0], g = Math.round(p / c[1]) * c[1];
|
|
1564
1579
|
return [T, g];
|
|
1565
1580
|
}
|
|
1566
|
-
function a(
|
|
1567
|
-
return
|
|
1581
|
+
function a(c) {
|
|
1582
|
+
return c.props.axis === "both" || c.props.axis === "x";
|
|
1568
1583
|
}
|
|
1569
|
-
function o(
|
|
1570
|
-
return
|
|
1584
|
+
function o(c) {
|
|
1585
|
+
return c.props.axis === "both" || c.props.axis === "y";
|
|
1571
1586
|
}
|
|
1572
|
-
function c
|
|
1573
|
-
const T = typeof y == "number" ? (0, i.getTouch)(
|
|
1587
|
+
function d(c, y, p) {
|
|
1588
|
+
const T = typeof y == "number" ? (0, i.getTouch)(c, y) : null;
|
|
1574
1589
|
if (typeof y == "number" && !T) return null;
|
|
1575
1590
|
const g = m(p), b = p.props.offsetParent || g.offsetParent || g.ownerDocument.body;
|
|
1576
|
-
return (0, i.offsetXYFromParent)(T ||
|
|
1591
|
+
return (0, i.offsetXYFromParent)(T || c, b, p.props.scale);
|
|
1577
1592
|
}
|
|
1578
|
-
function
|
|
1579
|
-
const T = !(0, e.isNum)(
|
|
1593
|
+
function f(c, y, p) {
|
|
1594
|
+
const T = !(0, e.isNum)(c.lastX), g = m(c);
|
|
1580
1595
|
return T ? {
|
|
1581
1596
|
node: g,
|
|
1582
1597
|
deltaX: 0,
|
|
@@ -1587,36 +1602,36 @@ function ft() {
|
|
|
1587
1602
|
y: p
|
|
1588
1603
|
} : {
|
|
1589
1604
|
node: g,
|
|
1590
|
-
deltaX: y -
|
|
1591
|
-
deltaY: p -
|
|
1592
|
-
lastX:
|
|
1593
|
-
lastY:
|
|
1605
|
+
deltaX: y - c.lastX,
|
|
1606
|
+
deltaY: p - c.lastY,
|
|
1607
|
+
lastX: c.lastX,
|
|
1608
|
+
lastY: c.lastY,
|
|
1594
1609
|
x: y,
|
|
1595
1610
|
y: p
|
|
1596
1611
|
};
|
|
1597
1612
|
}
|
|
1598
|
-
function C(
|
|
1599
|
-
const p =
|
|
1613
|
+
function C(c, y) {
|
|
1614
|
+
const p = c.props.scale;
|
|
1600
1615
|
return {
|
|
1601
1616
|
node: y.node,
|
|
1602
|
-
x:
|
|
1603
|
-
y:
|
|
1617
|
+
x: c.state.x + y.deltaX / p,
|
|
1618
|
+
y: c.state.y + y.deltaY / p,
|
|
1604
1619
|
deltaX: y.deltaX / p,
|
|
1605
1620
|
deltaY: y.deltaY / p,
|
|
1606
|
-
lastX:
|
|
1607
|
-
lastY:
|
|
1621
|
+
lastX: c.state.x,
|
|
1622
|
+
lastY: c.state.y
|
|
1608
1623
|
};
|
|
1609
1624
|
}
|
|
1610
|
-
function v(
|
|
1625
|
+
function v(c) {
|
|
1611
1626
|
return {
|
|
1612
|
-
left:
|
|
1613
|
-
top:
|
|
1614
|
-
right:
|
|
1615
|
-
bottom:
|
|
1627
|
+
left: c.left,
|
|
1628
|
+
top: c.top,
|
|
1629
|
+
right: c.right,
|
|
1630
|
+
bottom: c.bottom
|
|
1616
1631
|
};
|
|
1617
1632
|
}
|
|
1618
|
-
function m(
|
|
1619
|
-
const y =
|
|
1633
|
+
function m(c) {
|
|
1634
|
+
const y = c.findDOMNode();
|
|
1620
1635
|
if (!y)
|
|
1621
1636
|
throw new Error("<DraggableCore>: Unmounted during event!");
|
|
1622
1637
|
return y;
|
|
@@ -1639,8 +1654,8 @@ function Vt() {
|
|
|
1639
1654
|
Je = 1, Object.defineProperty(ue, "__esModule", {
|
|
1640
1655
|
value: !0
|
|
1641
1656
|
}), ue.default = void 0;
|
|
1642
|
-
var e = C(be), i =
|
|
1643
|
-
function
|
|
1657
|
+
var e = C(be), i = f(/* @__PURE__ */ ut()), t = f(ot), r = Re(), a = ft(), o = ve(), d = f(ht());
|
|
1658
|
+
function f(g) {
|
|
1644
1659
|
return g && g.__esModule ? g : { default: g };
|
|
1645
1660
|
}
|
|
1646
1661
|
function C(g, b) {
|
|
@@ -1653,7 +1668,7 @@ function Vt() {
|
|
|
1653
1668
|
if (l.has(S)) return l.get(S);
|
|
1654
1669
|
l.set(S, s);
|
|
1655
1670
|
}
|
|
1656
|
-
for (const
|
|
1671
|
+
for (const h in S) h !== "default" && {}.hasOwnProperty.call(S, h) && ((M = (l = Object.defineProperty) && Object.getOwnPropertyDescriptor(S, h)) && (M.get || M.set) ? l(s, h, M) : s[h] = S[h]);
|
|
1657
1672
|
return s;
|
|
1658
1673
|
})(g, b);
|
|
1659
1674
|
}
|
|
@@ -1661,10 +1676,10 @@ function Vt() {
|
|
|
1661
1676
|
return (b = m(b)) in g ? Object.defineProperty(g, b, { value: w, enumerable: !0, configurable: !0, writable: !0 }) : g[b] = w, g;
|
|
1662
1677
|
}
|
|
1663
1678
|
function m(g) {
|
|
1664
|
-
var b =
|
|
1679
|
+
var b = c(g, "string");
|
|
1665
1680
|
return typeof b == "symbol" ? b : b + "";
|
|
1666
1681
|
}
|
|
1667
|
-
function
|
|
1682
|
+
function c(g, b) {
|
|
1668
1683
|
if (typeof g != "object" || !g) return g;
|
|
1669
1684
|
var w = g[Symbol.toPrimitive];
|
|
1670
1685
|
if (w !== void 0) {
|
|
@@ -1707,7 +1722,7 @@ function Vt() {
|
|
|
1707
1722
|
x: l,
|
|
1708
1723
|
y: M
|
|
1709
1724
|
} = D, s = (0, a.createCoreData)(this, l, M);
|
|
1710
|
-
(0,
|
|
1725
|
+
(0, d.default)("DraggableCore: handleDragStart: %j", s), (0, d.default)("calling", this.props.onStart), !(this.props.onStart(b, s) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, r.addUserSelectStyles)(N), this.dragging = !0, this.lastX = l, this.lastY = M, (0, r.addEvent)(N, p.move, this.handleDrag), (0, r.addEvent)(N, p.stop, this.handleDragStop));
|
|
1711
1726
|
}), v(this, "handleDrag", (b) => {
|
|
1712
1727
|
const w = (0, a.getControlPosition)(b, this.touchIdentifier, this);
|
|
1713
1728
|
if (w == null) return;
|
|
@@ -1721,7 +1736,7 @@ function Vt() {
|
|
|
1721
1736
|
N = this.lastX + M, S = this.lastY + s;
|
|
1722
1737
|
}
|
|
1723
1738
|
const D = (0, a.createCoreData)(this, N, S);
|
|
1724
|
-
if ((0,
|
|
1739
|
+
if ((0, d.default)("DraggableCore: handleDrag: %j", D), this.props.onDrag(b, D) === !1 || this.mounted === !1) {
|
|
1725
1740
|
try {
|
|
1726
1741
|
this.handleDragStop(new MouseEvent("mouseup"));
|
|
1727
1742
|
} catch {
|
|
@@ -1740,13 +1755,13 @@ function Vt() {
|
|
|
1740
1755
|
y: S
|
|
1741
1756
|
} = w;
|
|
1742
1757
|
if (Array.isArray(this.props.grid)) {
|
|
1743
|
-
let s = N - this.lastX || 0,
|
|
1744
|
-
[s,
|
|
1758
|
+
let s = N - this.lastX || 0, h = S - this.lastY || 0;
|
|
1759
|
+
[s, h] = (0, a.snapToGrid)(this.props.grid, s, h), N = this.lastX + s, S = this.lastY + h;
|
|
1745
1760
|
}
|
|
1746
1761
|
const D = (0, a.createCoreData)(this, N, S);
|
|
1747
1762
|
if (this.props.onStop(b, D) === !1 || this.mounted === !1) return !1;
|
|
1748
1763
|
const M = this.findDOMNode();
|
|
1749
|
-
M && this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(M.ownerDocument), (0,
|
|
1764
|
+
M && this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(M.ownerDocument), (0, d.default)("DraggableCore: handleDragStop: %j", D), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, M && ((0, d.default)("DraggableCore: Removing handlers"), (0, r.removeEvent)(M.ownerDocument, p.move, this.handleDrag), (0, r.removeEvent)(M.ownerDocument, p.stop, this.handleDragStop));
|
|
1750
1765
|
}), v(this, "onMouseDown", (b) => (p = y.mouse, this.handleDragStart(b))), v(this, "onMouseUp", (b) => (p = y.mouse, this.handleDragStop(b))), v(this, "onTouchStart", (b) => (p = y.touch, this.handleDragStart(b))), v(this, "onTouchEnd", (b) => (p = y.touch, this.handleDragStop(b)));
|
|
1751
1766
|
}
|
|
1752
1767
|
componentDidMount() {
|
|
@@ -1944,21 +1959,21 @@ function Gt() {
|
|
|
1944
1959
|
return C.default;
|
|
1945
1960
|
}
|
|
1946
1961
|
}), e.default = void 0;
|
|
1947
|
-
var i =
|
|
1962
|
+
var i = c(be), t = m(/* @__PURE__ */ ut()), r = m(ot), a = Ht(), o = Re(), d = ft(), f = ve(), C = m(Vt()), v = m(ht());
|
|
1948
1963
|
function m(w) {
|
|
1949
1964
|
return w && w.__esModule ? w : { default: w };
|
|
1950
1965
|
}
|
|
1951
|
-
function
|
|
1966
|
+
function c(w, N) {
|
|
1952
1967
|
if (typeof WeakMap == "function") var S = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap();
|
|
1953
|
-
return (
|
|
1968
|
+
return (c = function(l, M) {
|
|
1954
1969
|
if (!M && l && l.__esModule) return l;
|
|
1955
|
-
var s,
|
|
1970
|
+
var s, h, u = { __proto__: null, default: l };
|
|
1956
1971
|
if (l === null || typeof l != "object" && typeof l != "function") return u;
|
|
1957
1972
|
if (s = M ? D : S) {
|
|
1958
1973
|
if (s.has(l)) return s.get(l);
|
|
1959
1974
|
s.set(l, u);
|
|
1960
1975
|
}
|
|
1961
|
-
for (const _ in l) _ !== "default" && {}.hasOwnProperty.call(l, _) && ((
|
|
1976
|
+
for (const _ in l) _ !== "default" && {}.hasOwnProperty.call(l, _) && ((h = (s = Object.defineProperty) && Object.getOwnPropertyDescriptor(l, _)) && (h.get || h.set) ? s(u, _, h) : u[_] = l[_]);
|
|
1962
1977
|
return u;
|
|
1963
1978
|
})(w, N);
|
|
1964
1979
|
}
|
|
@@ -2010,7 +2025,7 @@ function Gt() {
|
|
|
2010
2025
|
}
|
|
2011
2026
|
constructor(N) {
|
|
2012
2027
|
super(N), p(this, "onDragStart", (S, D) => {
|
|
2013
|
-
if ((0, v.default)("Draggable: onDragStart: %j", D), this.props.onStart(S, (0,
|
|
2028
|
+
if ((0, v.default)("Draggable: onDragStart: %j", D), this.props.onStart(S, (0, d.createDraggableData)(this, D)) === !1) return !1;
|
|
2014
2029
|
this.setState({
|
|
2015
2030
|
dragging: !0,
|
|
2016
2031
|
dragged: !0
|
|
@@ -2018,7 +2033,7 @@ function Gt() {
|
|
|
2018
2033
|
}), p(this, "onDrag", (S, D) => {
|
|
2019
2034
|
if (!this.state.dragging) return !1;
|
|
2020
2035
|
(0, v.default)("Draggable: onDrag: %j", D);
|
|
2021
|
-
const l = (0,
|
|
2036
|
+
const l = (0, d.createDraggableData)(this, D), M = {
|
|
2022
2037
|
x: l.x,
|
|
2023
2038
|
y: l.y,
|
|
2024
2039
|
slackX: 0,
|
|
@@ -2026,17 +2041,17 @@ function Gt() {
|
|
|
2026
2041
|
};
|
|
2027
2042
|
if (this.props.bounds) {
|
|
2028
2043
|
const {
|
|
2029
|
-
x:
|
|
2044
|
+
x: h,
|
|
2030
2045
|
y: u
|
|
2031
2046
|
} = M;
|
|
2032
2047
|
M.x += this.state.slackX, M.y += this.state.slackY;
|
|
2033
|
-
const [_,
|
|
2034
|
-
M.x = _, M.y =
|
|
2048
|
+
const [_, I] = (0, d.getBoundPosition)(this, M.x, M.y);
|
|
2049
|
+
M.x = _, M.y = I, M.slackX = this.state.slackX + (h - M.x), M.slackY = this.state.slackY + (u - M.y), l.x = M.x, l.y = M.y, l.deltaX = M.x - this.state.x, l.deltaY = M.y - this.state.y;
|
|
2035
2050
|
}
|
|
2036
2051
|
if (this.props.onDrag(S, l) === !1) return !1;
|
|
2037
2052
|
this.setState(M);
|
|
2038
2053
|
}), p(this, "onDragStop", (S, D) => {
|
|
2039
|
-
if (!this.state.dragging || this.props.onStop(S, (0,
|
|
2054
|
+
if (!this.state.dragging || this.props.onStop(S, (0, d.createDraggableData)(this, D)) === !1) return !1;
|
|
2040
2055
|
(0, v.default)("Draggable: onDragStop: %j", D);
|
|
2041
2056
|
const M = {
|
|
2042
2057
|
dragging: !1,
|
|
@@ -2045,10 +2060,10 @@ function Gt() {
|
|
|
2045
2060
|
};
|
|
2046
2061
|
if (!!this.props.position) {
|
|
2047
2062
|
const {
|
|
2048
|
-
x:
|
|
2063
|
+
x: h,
|
|
2049
2064
|
y: u
|
|
2050
2065
|
} = this.props.position;
|
|
2051
|
-
M.x =
|
|
2066
|
+
M.x = h, M.y = u;
|
|
2052
2067
|
}
|
|
2053
2068
|
this.setState(M);
|
|
2054
2069
|
}), this.state = {
|
|
@@ -2092,25 +2107,25 @@ function Gt() {
|
|
|
2092
2107
|
defaultPosition: l,
|
|
2093
2108
|
defaultClassName: M,
|
|
2094
2109
|
defaultClassNameDragging: s,
|
|
2095
|
-
defaultClassNameDragged:
|
|
2110
|
+
defaultClassNameDragged: h,
|
|
2096
2111
|
position: u,
|
|
2097
2112
|
positionOffset: _,
|
|
2098
|
-
scale:
|
|
2099
|
-
...
|
|
2113
|
+
scale: I,
|
|
2114
|
+
...H
|
|
2100
2115
|
} = this.props;
|
|
2101
2116
|
let X = {}, V = null;
|
|
2102
|
-
const
|
|
2117
|
+
const B = !!!u || this.state.dragging, ee = u || l, ie = {
|
|
2103
2118
|
// Set left if horizontal drag is enabled
|
|
2104
|
-
x: (0,
|
|
2119
|
+
x: (0, d.canDragX)(this) && B ? this.state.x : ee.x,
|
|
2105
2120
|
// Set top if vertical drag is enabled
|
|
2106
|
-
y: (0,
|
|
2121
|
+
y: (0, d.canDragY)(this) && B ? this.state.y : ee.y
|
|
2107
2122
|
};
|
|
2108
2123
|
this.state.isElementSVG ? V = (0, o.createSVGTransform)(ie, _) : X = (0, o.createCSSTransform)(ie, _);
|
|
2109
2124
|
const le = (0, a.clsx)(D.props.className || "", M, {
|
|
2110
2125
|
[s]: this.state.dragging,
|
|
2111
|
-
[
|
|
2126
|
+
[h]: this.state.dragged
|
|
2112
2127
|
});
|
|
2113
|
-
return /* @__PURE__ */ i.createElement(C.default, y({},
|
|
2128
|
+
return /* @__PURE__ */ i.createElement(C.default, y({}, H, {
|
|
2114
2129
|
onStart: this.onDragStart,
|
|
2115
2130
|
onDrag: this.onDrag,
|
|
2116
2131
|
onStop: this.onDragStop
|
|
@@ -2228,9 +2243,9 @@ function Gt() {
|
|
|
2228
2243
|
/**
|
|
2229
2244
|
* These properties should be defined on the child, not here.
|
|
2230
2245
|
*/
|
|
2231
|
-
className:
|
|
2232
|
-
style:
|
|
2233
|
-
transform:
|
|
2246
|
+
className: f.dontSetMe,
|
|
2247
|
+
style: f.dontSetMe,
|
|
2248
|
+
transform: f.dontSetMe
|
|
2234
2249
|
}), p(b, "defaultProps", {
|
|
2235
2250
|
...C.default.defaultProps,
|
|
2236
2251
|
axis: "both",
|
|
@@ -2258,7 +2273,7 @@ function Zt() {
|
|
|
2258
2273
|
}
|
|
2259
2274
|
var Jt = Zt();
|
|
2260
2275
|
const Qt = /* @__PURE__ */ qt(Jt), en = se((e, i) => {
|
|
2261
|
-
const
|
|
2276
|
+
const a = {
|
|
2262
2277
|
...{
|
|
2263
2278
|
// 1. Take it out of the document flow
|
|
2264
2279
|
position: "fixed",
|
|
@@ -2266,7 +2281,7 @@ const Qt = /* @__PURE__ */ qt(Jt), en = se((e, i) => {
|
|
|
2266
2281
|
top: "6rem",
|
|
2267
2282
|
right: "1rem",
|
|
2268
2283
|
// 3. Ensure it stacks above other content
|
|
2269
|
-
zIndex:
|
|
2284
|
+
zIndex: typeof e.zIndex < "u" ? Number(e.zIndex) : 99999,
|
|
2270
2285
|
// Add your layout/appearance styles
|
|
2271
2286
|
width: "360px",
|
|
2272
2287
|
minHeight: "360px",
|
|
@@ -2275,30 +2290,30 @@ const Qt = /* @__PURE__ */ qt(Jt), en = se((e, i) => {
|
|
|
2275
2290
|
boxShadow: "rgba(0, 0, 0, 0.5) 7px 7px 10px 0px"
|
|
2276
2291
|
},
|
|
2277
2292
|
...e.style || {}
|
|
2278
|
-
},
|
|
2293
|
+
}, o = e.testId || "not-set", d = e.className || "panel", f = vt(null);
|
|
2279
2294
|
return (
|
|
2280
2295
|
// 3. Pass the internal ref to the Draggable component via 'nodeRef'
|
|
2281
2296
|
/* @__PURE__ */ n(
|
|
2282
2297
|
Qt,
|
|
2283
2298
|
{
|
|
2284
|
-
nodeRef:
|
|
2285
|
-
"data-testid":
|
|
2299
|
+
nodeRef: f,
|
|
2300
|
+
"data-testid": o,
|
|
2286
2301
|
axis: "both",
|
|
2287
2302
|
handle: ".handle",
|
|
2288
|
-
onStart: (
|
|
2303
|
+
onStart: (m, c) => {
|
|
2289
2304
|
e.onDraggingChange?.(!0);
|
|
2290
2305
|
},
|
|
2291
|
-
onStop: (
|
|
2306
|
+
onStop: (m, c) => {
|
|
2292
2307
|
setTimeout(() => {
|
|
2293
2308
|
e.onDraggingChange?.(!1);
|
|
2294
2309
|
}, 100);
|
|
2295
2310
|
},
|
|
2296
|
-
children: /* @__PURE__ */ n("div", { ref:
|
|
2311
|
+
children: /* @__PURE__ */ n("div", { ref: f, className: d, style: a, children: e.children })
|
|
2297
2312
|
}
|
|
2298
2313
|
)
|
|
2299
2314
|
);
|
|
2300
2315
|
});
|
|
2301
|
-
function
|
|
2316
|
+
function $n({ children: e, addCssClasses: i }) {
|
|
2302
2317
|
const t = G(
|
|
2303
2318
|
"w-full h-full flex-1 flex flex-col",
|
|
2304
2319
|
(i || "gap-2 items-end justify-end content-end").trim()
|
|
@@ -2314,42 +2329,42 @@ function Pn({ children: e, addCssClasses: i }) {
|
|
|
2314
2329
|
}
|
|
2315
2330
|
);
|
|
2316
2331
|
}
|
|
2317
|
-
function
|
|
2332
|
+
function In({ children: e, addCssClasses: i }) {
|
|
2318
2333
|
const t = G(
|
|
2319
2334
|
"w-full flex flex-col",
|
|
2320
2335
|
(i || "items-end").trim()
|
|
2321
2336
|
);
|
|
2322
2337
|
return /* @__PURE__ */ n("div", { className: t, children: e });
|
|
2323
2338
|
}
|
|
2324
|
-
const
|
|
2339
|
+
const Rn = (e) => {
|
|
2325
2340
|
console.warn("showToast TODO", e);
|
|
2326
|
-
}, tn = (e) => e < 0.8 ? 1 : e <= 1 ? 0 : e > 1 ? -1 : 0,
|
|
2341
|
+
}, tn = (e) => e < 0.8 ? 1 : e <= 1 ? 0 : e > 1 ? -1 : 0, Wn = se((e, i) => {
|
|
2327
2342
|
let t = pt(Number(e.zoomScale || 0));
|
|
2328
2343
|
const r = e.responsiveGrid || !1, a = e.isEditing || !1, o = {
|
|
2329
2344
|
"--bwj-dashboard-transform-scale": t,
|
|
2330
2345
|
"--bwj-dashboard-add-cols": tn(t)
|
|
2331
|
-
},
|
|
2346
|
+
}, d = G(
|
|
2332
2347
|
"dashboard-main-grid w-full",
|
|
2333
2348
|
a ? "editing" : "",
|
|
2334
2349
|
r ? "responsive-grid" : "",
|
|
2335
2350
|
`border border-dashed ${a ? "border-primary border-opacity-50" : "border-transparent"}`
|
|
2336
2351
|
);
|
|
2337
|
-
return /* @__PURE__ */ n("div", { className:
|
|
2352
|
+
return /* @__PURE__ */ n("div", { className: d, style: o, children: e.children });
|
|
2338
2353
|
}), Me = "size-5", nn = (e, i) => {
|
|
2339
2354
|
const t = e.hideTitle && !e.isEditing, r = e.noBorder;
|
|
2340
2355
|
let a = `dashboard-widget ${e.isEditing ? "editing" : ""} border border-solid`;
|
|
2341
2356
|
r ? a = `${a} border-transparent border-opacity-0` : (e.borderCssClasses || "").trim().length > 0 ? a = `${a} ${e.borderCssClasses}` : a = `${a} border-card-invert border-opacity-20`, e.noShadow && (a = `${a} no-shadow`), e.noPadding && (a = `${a} no-padding p-0`), (e.backgroundCssClasses || "").trim().length > 0 ? a = `${a} ${e.backgroundCssClasses}` : a = `${a} bg-card content-card`, ["large", "xlarge"].indexOf(e.size || "") > -1 && (a = `${a} ${e.size}-widget`);
|
|
2342
2357
|
const o = () => {
|
|
2343
2358
|
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey, e.parentWidgetKey);
|
|
2344
|
-
},
|
|
2359
|
+
}, d = (C) => {
|
|
2345
2360
|
e.onMoveClick && e.widgetKey && e.onMoveClick(C, e.widgetKey, e.parentWidgetKey);
|
|
2346
|
-
},
|
|
2361
|
+
}, f = G(
|
|
2347
2362
|
"widget-header",
|
|
2348
2363
|
t ? "hidden" : "flex items-center justify-between border-b border-solid border-card-invert",
|
|
2349
2364
|
t ? "border-opacity-0" : "border-opacity-20"
|
|
2350
2365
|
);
|
|
2351
2366
|
return /* @__PURE__ */ $("div", { className: a, children: [
|
|
2352
|
-
/* @__PURE__ */ $("div", { className:
|
|
2367
|
+
/* @__PURE__ */ $("div", { className: f, children: [
|
|
2353
2368
|
/* @__PURE__ */ $("div", { className: "widget-title-wrapper w-full flex flex-row gap-2 items-center justify-between", children: [
|
|
2354
2369
|
/* @__PURE__ */ $("h2", { className: "widget-title", children: [
|
|
2355
2370
|
e.title,
|
|
@@ -2370,7 +2385,7 @@ const Wn = (e) => {
|
|
|
2370
2385
|
placement: "top",
|
|
2371
2386
|
title: `${e.index < 1 ? "Already at min position" : "Move Widget to the left/up"}`
|
|
2372
2387
|
},
|
|
2373
|
-
onClick: () =>
|
|
2388
|
+
onClick: () => d(-1),
|
|
2374
2389
|
children: /* @__PURE__ */ n(it, { className: Me })
|
|
2375
2390
|
}
|
|
2376
2391
|
),
|
|
@@ -2384,7 +2399,7 @@ const Wn = (e) => {
|
|
|
2384
2399
|
placement: "top",
|
|
2385
2400
|
title: `${e.index >= e.maxIndex ? "Already at max position" : "Move Widget to the right/down"}`
|
|
2386
2401
|
},
|
|
2387
|
-
onClick: () =>
|
|
2402
|
+
onClick: () => d(1),
|
|
2388
2403
|
children: /* @__PURE__ */ n(at, { className: Me })
|
|
2389
2404
|
}
|
|
2390
2405
|
),
|
|
@@ -2423,15 +2438,15 @@ function an({
|
|
|
2423
2438
|
parentWidgetKey: r,
|
|
2424
2439
|
targetContainerKey: a,
|
|
2425
2440
|
childWidgetsConfig: o,
|
|
2426
|
-
widgetCatalog:
|
|
2427
|
-
isEditing:
|
|
2441
|
+
widgetCatalog: d,
|
|
2442
|
+
isEditing: f,
|
|
2428
2443
|
// for additional props passed to all widget from the dashboard through the DynamicWidgetLoader:
|
|
2429
2444
|
extraProps: C,
|
|
2430
2445
|
onRemoveClick: v,
|
|
2431
2446
|
onMoveClick: m,
|
|
2432
|
-
selectContainer:
|
|
2447
|
+
selectContainer: c
|
|
2433
2448
|
}) {
|
|
2434
|
-
const y = `${t}`.split("_"), p = y.length > 1, T = p ? y[0] : t, g =
|
|
2449
|
+
const y = `${t}`.split("_"), p = y.length > 1, T = p ? y[0] : t, g = d.get(T);
|
|
2435
2450
|
if (!g)
|
|
2436
2451
|
return /* @__PURE__ */ n("div", { className: "flex", children: /* @__PURE__ */ $("p", { children: [
|
|
2437
2452
|
"Widget not found in catalog: ",
|
|
@@ -2443,7 +2458,7 @@ function an({
|
|
|
2443
2458
|
maxIndex: i,
|
|
2444
2459
|
widgetKey: t,
|
|
2445
2460
|
parentWidgetKey: r,
|
|
2446
|
-
isEditing:
|
|
2461
|
+
isEditing: f,
|
|
2447
2462
|
extraProps: C,
|
|
2448
2463
|
title: p ? S : g.title,
|
|
2449
2464
|
onRemoveClick: v,
|
|
@@ -2451,7 +2466,7 @@ function an({
|
|
|
2451
2466
|
};
|
|
2452
2467
|
if (g.component ? (b = g.component, w = !1) : g.loader && (w = !0, b = rt(() => {
|
|
2453
2468
|
if (!g) return null;
|
|
2454
|
-
const s = typeof __HOST_REACT_VERSION__ < "u" ? __HOST_REACT_VERSION__ : "19.2.3",
|
|
2469
|
+
const s = typeof __HOST_REACT_VERSION__ < "u" ? __HOST_REACT_VERSION__ : "19.2.3", h = g.meta?.externalDependencies || [], u = h.find((_) => _.startsWith("react@"));
|
|
2455
2470
|
if (u) {
|
|
2456
2471
|
const _ = u.split("@")[1];
|
|
2457
2472
|
if (!rn(s, _))
|
|
@@ -2482,10 +2497,10 @@ function an({
|
|
|
2482
2497
|
] }),
|
|
2483
2498
|
/* @__PURE__ */ $("div", { className: "flex flex-col mt-3", children: [
|
|
2484
2499
|
/* @__PURE__ */ n("h5", { children: "Externals:" }),
|
|
2485
|
-
/* @__PURE__ */ n("dl", { className: "ml-2 flex flex-col text-xs", children:
|
|
2500
|
+
/* @__PURE__ */ n("dl", { className: "ml-2 flex flex-col text-xs", children: h.map((I, H) => /* @__PURE__ */ $("dd", { children: [
|
|
2486
2501
|
"- ",
|
|
2487
|
-
|
|
2488
|
-
] },
|
|
2502
|
+
I
|
|
2503
|
+
] }, H)) })
|
|
2489
2504
|
] })
|
|
2490
2505
|
] }) })
|
|
2491
2506
|
}));
|
|
@@ -2496,8 +2511,8 @@ function an({
|
|
|
2496
2511
|
const _ = async () => {
|
|
2497
2512
|
try {
|
|
2498
2513
|
return await g.loader();
|
|
2499
|
-
} catch (
|
|
2500
|
-
return console.error(`CDN Load Failure for ${t}:`,
|
|
2514
|
+
} catch (I) {
|
|
2515
|
+
return console.error(`CDN Load Failure for ${t}:`, I), {
|
|
2501
2516
|
default: () => /* @__PURE__ */ n(tt, { ...l, children: /* @__PURE__ */ $("div", { className: "p-4 border border-dashed border-danger", children: [
|
|
2502
2517
|
/* @__PURE__ */ $("p", { className: "font-bold", children: [
|
|
2503
2518
|
'Failed to load "',
|
|
@@ -2520,36 +2535,36 @@ function an({
|
|
|
2520
2535
|
] }) });
|
|
2521
2536
|
const M = N ? {
|
|
2522
2537
|
highlight: a === t,
|
|
2523
|
-
selectContainer:
|
|
2538
|
+
selectContainer: c,
|
|
2524
2539
|
// The children prop is the recursive call back to DynamicWidgetLoader
|
|
2525
|
-
children: D.map((s,
|
|
2540
|
+
children: D.map((s, h) => /* @__PURE__ */ n(
|
|
2526
2541
|
an,
|
|
2527
2542
|
{
|
|
2528
|
-
index:
|
|
2543
|
+
index: h,
|
|
2529
2544
|
maxIndex: D.length - 1,
|
|
2530
2545
|
widgetKey: s.widgetKey,
|
|
2531
2546
|
parentWidgetKey: s.parentWidgetKey,
|
|
2532
|
-
widgetCatalog:
|
|
2533
|
-
isEditing:
|
|
2547
|
+
widgetCatalog: d,
|
|
2548
|
+
isEditing: f,
|
|
2534
2549
|
extraProps: C,
|
|
2535
2550
|
onRemoveClick: v,
|
|
2536
2551
|
onMoveClick: m
|
|
2537
2552
|
},
|
|
2538
|
-
`${s.widgetKey}_${
|
|
2553
|
+
`${s.widgetKey}_${h}`
|
|
2539
2554
|
))
|
|
2540
2555
|
} : {};
|
|
2541
2556
|
return w ? /* @__PURE__ */ n(xt, { fallback: /* @__PURE__ */ n(on, { title: `Loading ${g.title}` }), children: /* @__PURE__ */ n(b, { ...l, ...M }) }) : /* @__PURE__ */ n(b, { ...l, ...M });
|
|
2542
2557
|
}
|
|
2543
2558
|
const ye = "size-5";
|
|
2544
|
-
function
|
|
2559
|
+
function We(e) {
|
|
2545
2560
|
const i = e.highlight || !1, t = e.direction || "column", r = e.children.length > 0, a = e.isEditing || !1;
|
|
2546
|
-
let
|
|
2561
|
+
let f = i ? "border-transparent" : a && !r ? "border-card-invert" : "border-transparent";
|
|
2547
2562
|
const C = ["large", "xlarge"].includes(e.size || "");
|
|
2548
2563
|
let v = "";
|
|
2549
2564
|
["large", "xlarge"].indexOf(e.size || "") > -1 && (v = `${e.size}-widget`);
|
|
2550
2565
|
let m = "";
|
|
2551
2566
|
t === "row" && !r ? m = "min-h-48" : t === "column" && !r && (m = "min-h-96");
|
|
2552
|
-
let
|
|
2567
|
+
let c = G(
|
|
2553
2568
|
"dashboard-widget-container relative ",
|
|
2554
2569
|
r ? "" : "has-no-children",
|
|
2555
2570
|
a ? "editing" : "",
|
|
@@ -2557,9 +2572,9 @@ function Ie(e) {
|
|
|
2557
2572
|
v,
|
|
2558
2573
|
C ? "widget-container-grid" : "widget-container-flex",
|
|
2559
2574
|
`direction-${t}`,
|
|
2560
|
-
`border ${
|
|
2561
|
-
`${i ? "highlight-container" : ""} ${
|
|
2562
|
-
), y = `widget-container-header direction-${t} flex items-center border-1 ${
|
|
2575
|
+
`border ${f}`,
|
|
2576
|
+
`${i ? "highlight-container" : ""} ${f}`
|
|
2577
|
+
), y = `widget-container-header direction-${t} flex items-center border-1 ${f}`;
|
|
2563
2578
|
const p = () => {
|
|
2564
2579
|
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey);
|
|
2565
2580
|
}, T = (b) => {
|
|
@@ -2567,7 +2582,7 @@ function Ie(e) {
|
|
|
2567
2582
|
}, g = () => {
|
|
2568
2583
|
e.selectContainer && e.widgetKey && e.selectContainer(e.widgetKey);
|
|
2569
2584
|
};
|
|
2570
|
-
return /* @__PURE__ */ $("div", { "data-testid": `container_${e.widgetKey}`, className:
|
|
2585
|
+
return /* @__PURE__ */ $("div", { "data-testid": `container_${e.widgetKey}`, className: c, children: [
|
|
2571
2586
|
/* @__PURE__ */ $("div", { className: y, children: [
|
|
2572
2587
|
/* @__PURE__ */ n(
|
|
2573
2588
|
"div",
|
|
@@ -2643,17 +2658,17 @@ function Ie(e) {
|
|
|
2643
2658
|
/* @__PURE__ */ n("div", { "data-testid": `childrenwrapper_${e.widgetKey}`, className: "widget-container-inner", children: e.children })
|
|
2644
2659
|
] });
|
|
2645
2660
|
}
|
|
2646
|
-
function
|
|
2661
|
+
function On(e) {
|
|
2647
2662
|
const { direction: i, ...t } = e;
|
|
2648
|
-
return /* @__PURE__ */ n(
|
|
2663
|
+
return /* @__PURE__ */ n(We, { direction: "column", ...t });
|
|
2649
2664
|
}
|
|
2650
|
-
function
|
|
2665
|
+
function kn(e) {
|
|
2651
2666
|
const { size: i, ...t } = e;
|
|
2652
|
-
return /* @__PURE__ */ n(
|
|
2667
|
+
return /* @__PURE__ */ n(We, { size: "large", ...t });
|
|
2653
2668
|
}
|
|
2654
|
-
function
|
|
2669
|
+
function jn(e) {
|
|
2655
2670
|
const { direction: i, ...t } = e;
|
|
2656
|
-
return /* @__PURE__ */ n(
|
|
2671
|
+
return /* @__PURE__ */ n(We, { direction: "row", ...t });
|
|
2657
2672
|
}
|
|
2658
2673
|
function Pe({
|
|
2659
2674
|
// widgetKey,
|
|
@@ -2661,7 +2676,7 @@ function Pe({
|
|
|
2661
2676
|
alreadyAdded: i,
|
|
2662
2677
|
addWidget: t
|
|
2663
2678
|
}) {
|
|
2664
|
-
const [r, a] = ae(!1), o = e.icon || jt,
|
|
2679
|
+
const [r, a] = ae(!1), o = e.icon || jt, d = e.name || "Unknown", f = e.description || "---", v = (e.noDuplicatedWidgets || !1) && i, m = G(`
|
|
2665
2680
|
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
2666
2681
|
${v ? "border-disabled fill-disabled text-disabled" : "cursor-pointer border-primary fill-danger hover:fill-primary content-primary hover:brightness-110"}
|
|
2667
2682
|
`);
|
|
@@ -2671,11 +2686,11 @@ function Pe({
|
|
|
2671
2686
|
/* @__PURE__ */ n(o, { className: "" }),
|
|
2672
2687
|
/* @__PURE__ */ $("div", { className: "w-full", children: [
|
|
2673
2688
|
/* @__PURE__ */ $("div", { className: "flex flex-row items-center gap-2 justify-between", children: [
|
|
2674
|
-
/* @__PURE__ */ n("span", { className: "font-bold", children:
|
|
2689
|
+
/* @__PURE__ */ n("span", { className: "font-bold", children: d }),
|
|
2675
2690
|
/* @__PURE__ */ n("div", { className: "text-xs", children: v ? "(Added)" : "" })
|
|
2676
2691
|
] }),
|
|
2677
2692
|
/* @__PURE__ */ $("div", { className: "flex flex-col text-xs", children: [
|
|
2678
|
-
/* @__PURE__ */ n("div", { children:
|
|
2693
|
+
/* @__PURE__ */ n("div", { children: f }),
|
|
2679
2694
|
/* @__PURE__ */ n("div", { className: "mt-3 cursor-pointer", onClick: (p) => {
|
|
2680
2695
|
p.stopPropagation(), p.preventDefault(), a(!r);
|
|
2681
2696
|
}, children: "Externals:" }),
|
|
@@ -2690,20 +2705,20 @@ function Pe({
|
|
|
2690
2705
|
function sn({ item: e, onSettingItemChanged: i }) {
|
|
2691
2706
|
const t = e.name || "Unknown", r = e.description || "---", a = G(`
|
|
2692
2707
|
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
2693
|
-
`), o = (
|
|
2694
|
-
const C =
|
|
2708
|
+
`), o = (f) => {
|
|
2709
|
+
const C = f.key;
|
|
2695
2710
|
if (["ArrowUp", "ArrowDown"].includes(C)) {
|
|
2696
|
-
|
|
2711
|
+
f.preventDefault();
|
|
2697
2712
|
const v = bt.incrementOrDecrementValue(
|
|
2698
2713
|
e,
|
|
2699
2714
|
C === "ArrowUp" ? 1 : -1
|
|
2700
2715
|
);
|
|
2701
2716
|
i(v);
|
|
2702
2717
|
}
|
|
2703
|
-
},
|
|
2718
|
+
}, d = (f) => {
|
|
2704
2719
|
i({
|
|
2705
2720
|
...e,
|
|
2706
|
-
value:
|
|
2721
|
+
value: f.target.value || ""
|
|
2707
2722
|
});
|
|
2708
2723
|
};
|
|
2709
2724
|
return /* @__PURE__ */ n("div", { className: a, style: { width: "calc(100% - 1rem)" }, children: /* @__PURE__ */ $("div", { className: "w-full", children: [
|
|
@@ -2718,7 +2733,7 @@ function sn({ item: e, onSettingItemChanged: i }) {
|
|
|
2718
2733
|
size: "small",
|
|
2719
2734
|
className: "w-full",
|
|
2720
2735
|
value: e.value,
|
|
2721
|
-
onChange:
|
|
2736
|
+
onChange: d,
|
|
2722
2737
|
onKeyDown: o
|
|
2723
2738
|
}
|
|
2724
2739
|
)
|
|
@@ -2729,24 +2744,24 @@ const $e = (e, i) => [
|
|
|
2729
2744
|
...i.widgets.filter((r) => r.indexOf("Container") === -1),
|
|
2730
2745
|
...i.childWidgetsConfig.map((r) => r.widgetKey)
|
|
2731
2746
|
].includes(e);
|
|
2732
|
-
function
|
|
2747
|
+
function An(e) {
|
|
2733
2748
|
const {
|
|
2734
2749
|
currentDashboardConfig: i,
|
|
2735
2750
|
undoStatus: t,
|
|
2736
2751
|
addContainer: r,
|
|
2737
2752
|
onResetToDefaultDashboardClick: a,
|
|
2738
2753
|
onUndoOrRedo: o,
|
|
2739
|
-
onDoneClick:
|
|
2740
|
-
} = e, [
|
|
2754
|
+
onDoneClick: d
|
|
2755
|
+
} = e, [f, C] = ae("Editing"), [v, m] = ae(0), [c, y] = ae(""), T = Array.from(e.widgetsCatalog.keys()).map((u) => ({
|
|
2741
2756
|
widgetKey: u,
|
|
2742
2757
|
metaData: yt(u, e.widgetsCatalog)
|
|
2743
2758
|
})), g = !!e.targetContainerKey, b = (u) => {
|
|
2744
2759
|
y(u.target.value);
|
|
2745
2760
|
}, w = (u) => {
|
|
2746
|
-
const _ =
|
|
2761
|
+
const _ = c.trim().toLowerCase();
|
|
2747
2762
|
return _.length < 1 ? !0 : u.name.trim().toLowerCase().includes(_) || u.description.toLowerCase().includes(_);
|
|
2748
2763
|
}, N = (u) => {
|
|
2749
|
-
const _ =
|
|
2764
|
+
const _ = c.trim().toLowerCase();
|
|
2750
2765
|
return _.length < 1 ? !0 : u.name.trim().toLowerCase().includes(_) || u.description.toLowerCase().includes(_);
|
|
2751
2766
|
}, S = (u) => G(
|
|
2752
2767
|
"px-4 py-2 font-medium cursor-pointer border-b-2 border-transparent hover:border-primary focus:outline-none",
|
|
@@ -2754,9 +2769,9 @@ function jn(e) {
|
|
|
2754
2769
|
), D = (u) => {
|
|
2755
2770
|
g ? e.addWidget(u, e.targetContainerKey) : e.addWidget(u);
|
|
2756
2771
|
}, l = (u) => {
|
|
2757
|
-
const _ = (e.currentDashboardConfig.cssSettings || []).map((
|
|
2772
|
+
const _ = (e.currentDashboardConfig.cssSettings || []).map((I) => I.key === u.key ? u : I);
|
|
2758
2773
|
e.onSettingItemsUpdated(_);
|
|
2759
|
-
}, [M, s] = ae(!1),
|
|
2774
|
+
}, [M, s] = ae(!1), h = (u) => {
|
|
2760
2775
|
s(u);
|
|
2761
2776
|
};
|
|
2762
2777
|
return Ct(() => {
|
|
@@ -2771,6 +2786,7 @@ function jn(e) {
|
|
|
2771
2786
|
{
|
|
2772
2787
|
testId: "dashboard-catalog-flyout",
|
|
2773
2788
|
className: "bg-body content-body bg-opacity-70 border-2 border-primary",
|
|
2789
|
+
zIndex: e.zIndex,
|
|
2774
2790
|
style: {
|
|
2775
2791
|
width: "360px",
|
|
2776
2792
|
minWidth: "360px",
|
|
@@ -2778,17 +2794,17 @@ function jn(e) {
|
|
|
2778
2794
|
minHeight: "360px",
|
|
2779
2795
|
backdropFilter: "blur(8px)"
|
|
2780
2796
|
},
|
|
2781
|
-
onDraggingChange:
|
|
2797
|
+
onDraggingChange: h,
|
|
2782
2798
|
children: /* @__PURE__ */ $("div", { className: "flex flex-col gap-2 p-2", children: [
|
|
2783
2799
|
/* @__PURE__ */ $("div", { className: "flex flex-row gap-2 justify-between", children: [
|
|
2784
2800
|
/* @__PURE__ */ $("div", { className: "handle flex-1 flex gap-2 w-full hover:text-primary cursor-grab", children: [
|
|
2785
|
-
M ? /* @__PURE__ */ n(Ot, { className: "size-5" }) : /* @__PURE__ */ n(
|
|
2801
|
+
M ? /* @__PURE__ */ n(Ot, { className: "size-5" }) : /* @__PURE__ */ n(Wt, { className: "size-5" }),
|
|
2786
2802
|
/* @__PURE__ */ n(
|
|
2787
2803
|
"h2",
|
|
2788
2804
|
{
|
|
2789
2805
|
className: "flex-1 text-base margin-0 capitalize",
|
|
2790
|
-
title: g ?
|
|
2791
|
-
children:
|
|
2806
|
+
title: g ? f : `Editing dashboard: ${i.dashboardName}`,
|
|
2807
|
+
children: f
|
|
2792
2808
|
}
|
|
2793
2809
|
)
|
|
2794
2810
|
] }),
|
|
@@ -2804,7 +2820,7 @@ function jn(e) {
|
|
|
2804
2820
|
},
|
|
2805
2821
|
disabled: t.isUndoDisabled,
|
|
2806
2822
|
onClick: () => o("Undo"),
|
|
2807
|
-
children: /* @__PURE__ */ n(
|
|
2823
|
+
children: /* @__PURE__ */ n(It, { className: "size-5" })
|
|
2808
2824
|
}
|
|
2809
2825
|
),
|
|
2810
2826
|
/* @__PURE__ */ n(
|
|
@@ -2848,7 +2864,7 @@ function jn(e) {
|
|
|
2848
2864
|
label: "Filter...",
|
|
2849
2865
|
size: "small",
|
|
2850
2866
|
className: "w-full",
|
|
2851
|
-
value:
|
|
2867
|
+
value: c,
|
|
2852
2868
|
onChange: b
|
|
2853
2869
|
}
|
|
2854
2870
|
) }),
|
|
@@ -2913,7 +2929,7 @@ function jn(e) {
|
|
|
2913
2929
|
placement: "bottom",
|
|
2914
2930
|
title: "Click to exit edit mode"
|
|
2915
2931
|
},
|
|
2916
|
-
onClick:
|
|
2932
|
+
onClick: d,
|
|
2917
2933
|
children: "Done"
|
|
2918
2934
|
}
|
|
2919
2935
|
) })
|
|
@@ -2926,43 +2942,44 @@ export {
|
|
|
2926
2942
|
J as Button,
|
|
2927
2943
|
jt as CircleQuestionMark,
|
|
2928
2944
|
kt as CrosshairIcon,
|
|
2929
|
-
|
|
2945
|
+
Wn as DashboardGrid,
|
|
2930
2946
|
tt as DashboardWidgetBase,
|
|
2931
2947
|
pn as DeleteIcon,
|
|
2932
2948
|
en as DraggablePanel,
|
|
2933
2949
|
an as DynamicWidgetLoader,
|
|
2934
2950
|
yn as EditIcon,
|
|
2935
|
-
|
|
2951
|
+
vn as GridIcon,
|
|
2936
2952
|
Ot as HandGrabIcon,
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2953
|
+
Wt as HandIcon,
|
|
2954
|
+
Nn as ListItem,
|
|
2955
|
+
En as ListItemLeftChild,
|
|
2956
|
+
_n as ListItemMiddleChild,
|
|
2957
|
+
Mn as ListItemRightChild,
|
|
2958
|
+
xn as MonitorIcon,
|
|
2959
|
+
Cn as MonitorSmartphoneIcon,
|
|
2944
2960
|
it as MoveLeftIcon,
|
|
2945
2961
|
at as MoveRightIcon,
|
|
2946
2962
|
Rt as RedoIcon,
|
|
2963
|
+
bn as RenameIcon,
|
|
2947
2964
|
Pt as SettingsIcon,
|
|
2948
2965
|
Lt as Stack,
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2966
|
+
U as SvgBaseWrapper,
|
|
2967
|
+
wn as TabletSmartphoneIcon,
|
|
2968
|
+
Tn as TargetIcon,
|
|
2952
2969
|
lt as TextField,
|
|
2953
2970
|
$t as TimerResetIcon,
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2971
|
+
It as UndoIcon,
|
|
2972
|
+
On as WidgetContainerColumn,
|
|
2973
|
+
kn as WidgetContainerLarge,
|
|
2974
|
+
jn as WidgetContainerRow,
|
|
2975
|
+
An as WidgetsCatalogFlyout,
|
|
2976
|
+
$n as WrapperColumnContent,
|
|
2977
|
+
In as WrapperColumnContentListItem,
|
|
2961
2978
|
st as XCircleIcon,
|
|
2962
|
-
|
|
2963
|
-
|
|
2979
|
+
Sn as ZoomInIcon,
|
|
2980
|
+
Dn as ZoomOutIcon,
|
|
2964
2981
|
rn as _isVersionCompatible,
|
|
2965
|
-
|
|
2982
|
+
Rn as showToast,
|
|
2966
2983
|
hn as useDashboardStore,
|
|
2967
2984
|
gn as useDashboardUndoService
|
|
2968
2985
|
};
|