@tenorlab/react-dashboard 1.0.7 → 1.0.8
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import se, { useState as ce, useCallback as ue, useMemo as at, forwardRef as le, useRef as xt, Suspense as
|
|
1
|
+
import se, { useState as ce, useCallback as ue, useMemo as at, forwardRef as le, useRef as xt, Suspense as Ct, useEffect as St } from "react";
|
|
2
2
|
import { jsxs as W, jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import st from "react-dom";
|
|
4
|
-
const
|
|
4
|
+
const Dt = [
|
|
5
5
|
{
|
|
6
6
|
key: "grid-gap",
|
|
7
7
|
displayName: "Gap",
|
|
@@ -79,12 +79,12 @@ const St = [
|
|
|
79
79
|
defaultValue: "1.0rem",
|
|
80
80
|
value: "1.0rem"
|
|
81
81
|
}
|
|
82
|
-
],
|
|
82
|
+
], Tt = ["rem", "pc", "cm", "in", "em", "vh", "vw", "%"], Nt = (e, n) => Tt.includes(e) ? n : 1, Et = {
|
|
83
83
|
incrementOrDecrementValue: (e, n) => {
|
|
84
|
-
const t = e.value.match(/([\d.]+)/), r = t ? parseFloat(t[1]) : 0, i = e.value.match(/([^\d.]+)/), o = i ? i[1] : e.defaultUnit, s =
|
|
84
|
+
const t = e.value.match(/([\d.]+)/), r = t ? parseFloat(t[1]) : 0, i = e.value.match(/([^\d.]+)/), o = i ? i[1] : e.defaultUnit, s = Nt(o, e.step) * n, p = `${Math.max(r + s, e.minValue).toFixed(1)}${o}`;
|
|
85
85
|
return {
|
|
86
86
|
...e,
|
|
87
|
-
value:
|
|
87
|
+
value: p
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
}, Ce = {
|
|
@@ -96,14 +96,14 @@ const St = [
|
|
|
96
96
|
responsiveGrid: !1,
|
|
97
97
|
widgets: [],
|
|
98
98
|
childWidgetsConfig: [],
|
|
99
|
-
cssSettings: [...
|
|
100
|
-
}, Ae = 0.7,
|
|
99
|
+
cssSettings: [...Dt]
|
|
100
|
+
}, Ae = 0.7, Fe = 1, _t = 0.05, lt = (e) => {
|
|
101
101
|
let n = Number(e || 0);
|
|
102
|
-
return n < Ae && (n = Ae), n >
|
|
103
|
-
},
|
|
104
|
-
let t = Number(Number((
|
|
102
|
+
return n < Ae && (n = Ae), n > Fe && (n = Fe), n;
|
|
103
|
+
}, _n = (e, n) => {
|
|
104
|
+
let t = Number(Number((_t * n).toFixed(2)).toFixed(2)), r = Number((Number(e) + t).toFixed(2));
|
|
105
105
|
return lt(r);
|
|
106
|
-
},
|
|
106
|
+
}, Mn = (e) => {
|
|
107
107
|
let n = {
|
|
108
108
|
...e
|
|
109
109
|
};
|
|
@@ -119,7 +119,7 @@ const St = [
|
|
|
119
119
|
}
|
|
120
120
|
return !0;
|
|
121
121
|
}), n;
|
|
122
|
-
},
|
|
122
|
+
}, Mt = (e) => {
|
|
123
123
|
const n = e.widgets.filter(
|
|
124
124
|
(r) => r.includes("WidgetContainer")
|
|
125
125
|
), t = {};
|
|
@@ -134,7 +134,7 @@ const St = [
|
|
|
134
134
|
parentWidgetKey: o || i
|
|
135
135
|
};
|
|
136
136
|
}), e;
|
|
137
|
-
},
|
|
137
|
+
}, ge = (e, n) => {
|
|
138
138
|
const t = `${e}`.includes("Container"), r = t ? ["Container"] : ["Widget"], i = n?.title || e, o = n?.description || (t ? "Container" : "Unknown");
|
|
139
139
|
return {
|
|
140
140
|
title: i,
|
|
@@ -144,14 +144,14 @@ const St = [
|
|
|
144
144
|
noDuplicatedWidgets: !0,
|
|
145
145
|
icon: void 0
|
|
146
146
|
};
|
|
147
|
-
},
|
|
147
|
+
}, Pn = (e, n, t) => {
|
|
148
148
|
const r = n[e];
|
|
149
|
-
return r ||
|
|
150
|
-
},
|
|
149
|
+
return r || ge(e, t);
|
|
150
|
+
}, Pt = (e, n) => {
|
|
151
151
|
const r = n.get(e)?.meta;
|
|
152
|
-
return r ||
|
|
153
|
-
},
|
|
154
|
-
const r = t ||
|
|
152
|
+
return r || ge(e);
|
|
153
|
+
}, $n = (e, n, t) => {
|
|
154
|
+
const r = t || ge(e);
|
|
155
155
|
return [
|
|
156
156
|
e,
|
|
157
157
|
{
|
|
@@ -162,8 +162,8 @@ const St = [
|
|
|
162
162
|
component: n
|
|
163
163
|
}
|
|
164
164
|
];
|
|
165
|
-
},
|
|
166
|
-
const r = t ||
|
|
165
|
+
}, ct = (e, n, t) => {
|
|
166
|
+
const r = t || ge(e);
|
|
167
167
|
return [
|
|
168
168
|
e,
|
|
169
169
|
{
|
|
@@ -174,22 +174,46 @@ const St = [
|
|
|
174
174
|
loader: n
|
|
175
175
|
}
|
|
176
176
|
];
|
|
177
|
-
},
|
|
177
|
+
}, $t = (e) => {
|
|
178
178
|
const n = e.match(/\/widget-([a-zA-Z0-9-]+)\/index\.ts$/);
|
|
179
179
|
if (n && n[1]) {
|
|
180
180
|
const t = n[1], r = `Widget${t.split("-").map((o) => o.charAt(0).toUpperCase() + o.slice(1)).join("")}`, i = t.split("-").map((o) => o.charAt(0).toUpperCase() + o.slice(1)).join(" ");
|
|
181
181
|
return { key: r, title: i, folder: t };
|
|
182
182
|
}
|
|
183
183
|
return null;
|
|
184
|
-
},
|
|
184
|
+
}, Wt = (e, n, t) => {
|
|
185
|
+
const r = `${n}/${t}/${t}.meta.ts`, i = e[r];
|
|
186
|
+
if (i && i[`${key}Meta`])
|
|
187
|
+
return i[`${key}Meta`];
|
|
188
|
+
}, Wn = async (e, n, t) => {
|
|
189
|
+
const r = [];
|
|
190
|
+
for (const i in n) {
|
|
191
|
+
const o = n[i], s = $t(i);
|
|
192
|
+
if (s && o) {
|
|
193
|
+
const { key: d, title: p, folder: g } = s;
|
|
194
|
+
console.log("widgets-catalog: registering dynamic plugins", d, p, g);
|
|
195
|
+
let h = Wt(
|
|
196
|
+
//key,
|
|
197
|
+
t,
|
|
198
|
+
e,
|
|
199
|
+
g
|
|
200
|
+
);
|
|
201
|
+
h || (h = ge(d, {
|
|
202
|
+
title: p,
|
|
203
|
+
description: "Dynamic plugin widget"
|
|
204
|
+
})), r.push(ct(d, o, h));
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return r;
|
|
208
|
+
}, In = async (e) => new Promise(async (n, t) => {
|
|
185
209
|
const r = [];
|
|
186
210
|
try {
|
|
187
211
|
const o = await (await fetch(`${e}?${Math.random()}`)).json();
|
|
188
212
|
for (const s in o) {
|
|
189
|
-
const d = o[s],
|
|
213
|
+
const d = o[s], p = () => import(
|
|
190
214
|
/* @vite-ignore */
|
|
191
215
|
d.url
|
|
192
|
-
),
|
|
216
|
+
), g = {
|
|
193
217
|
displayName: d.meta.displayName,
|
|
194
218
|
description: d.meta.description || "Remote Plugin",
|
|
195
219
|
categories: d.meta.categories || ["Widget"],
|
|
@@ -197,7 +221,7 @@ const St = [
|
|
|
197
221
|
icon: void 0
|
|
198
222
|
// Or a logic to map a string name to a Lucide component
|
|
199
223
|
};
|
|
200
|
-
r.push(
|
|
224
|
+
r.push(ct(s, p, g));
|
|
201
225
|
}
|
|
202
226
|
n({
|
|
203
227
|
entries: r,
|
|
@@ -211,18 +235,18 @@ const St = [
|
|
|
211
235
|
details: typeof i == "object" ? JSON.stringify(i) : i
|
|
212
236
|
});
|
|
213
237
|
}
|
|
214
|
-
}),
|
|
238
|
+
}), Le = (e) => {
|
|
215
239
|
let n;
|
|
216
|
-
const t = /* @__PURE__ */ new Set(), r = (
|
|
217
|
-
const u = typeof
|
|
240
|
+
const t = /* @__PURE__ */ new Set(), r = (g, h) => {
|
|
241
|
+
const u = typeof g == "function" ? g(n) : g;
|
|
218
242
|
if (!Object.is(u, n)) {
|
|
219
|
-
const
|
|
220
|
-
n = h ?? (typeof u != "object" || u === null) ? u : Object.assign({}, n, u), t.forEach((
|
|
243
|
+
const m = n;
|
|
244
|
+
n = h ?? (typeof u != "object" || u === null) ? u : Object.assign({}, n, u), t.forEach((y) => y(n, m));
|
|
221
245
|
}
|
|
222
|
-
}, i = () => n, d = { setState: r, getState: i, getInitialState: () =>
|
|
246
|
+
}, i = () => n, d = { setState: r, getState: i, getInitialState: () => p, subscribe: (g) => (t.add(g), () => t.delete(g)) }, p = n = e(r, i, d);
|
|
223
247
|
return d;
|
|
224
|
-
},
|
|
225
|
-
function
|
|
248
|
+
}, It = ((e) => e ? Le(e) : Le), Ot = (e) => e;
|
|
249
|
+
function Rt(e, n = Ot) {
|
|
226
250
|
const t = se.useSyncExternalStore(
|
|
227
251
|
e.subscribe,
|
|
228
252
|
se.useCallback(() => n(e.getState()), [e, n]),
|
|
@@ -230,16 +254,16 @@ function It(e, n = Wt) {
|
|
|
230
254
|
);
|
|
231
255
|
return se.useDebugValue(t), t;
|
|
232
256
|
}
|
|
233
|
-
const
|
|
234
|
-
const n =
|
|
257
|
+
const kt = (e) => {
|
|
258
|
+
const n = It(e), t = (r) => Rt(n, r);
|
|
235
259
|
return Object.assign(t, n), t;
|
|
236
|
-
},
|
|
260
|
+
}, jt = ((e) => kt), At = (e) => {
|
|
237
261
|
const n = e.widgets.filter((r) => r.includes("WidgetContainer")).map((r) => Number(r.split("_")[1].replace("container", "")));
|
|
238
262
|
return `container${n.length > 0 ? Math.max(...n) + 1 : 1}`;
|
|
239
|
-
},
|
|
240
|
-
const t =
|
|
263
|
+
}, Ft = (e, n) => {
|
|
264
|
+
const t = At(e);
|
|
241
265
|
return `${n}_${t}`;
|
|
242
|
-
},
|
|
266
|
+
}, Lt = (e) => {
|
|
243
267
|
const { dashboardConfig: n, widgetKey: t, parentWidgetKey: r, noDuplicatedWidgets: i } = e;
|
|
244
268
|
if (r) {
|
|
245
269
|
if (i && n.childWidgetsConfig.find(
|
|
@@ -278,18 +302,18 @@ const Ot = (e) => {
|
|
|
278
302
|
}
|
|
279
303
|
};
|
|
280
304
|
}
|
|
281
|
-
},
|
|
305
|
+
}, Ut = (e, n, t) => {
|
|
282
306
|
if ((t || "").trim().length > 0) {
|
|
283
307
|
const r = e.childWidgetsConfig.filter(
|
|
284
|
-
(
|
|
308
|
+
(p) => p.parentWidgetKey !== t
|
|
285
309
|
), i = e.childWidgetsConfig.filter(
|
|
286
|
-
(
|
|
310
|
+
(p) => p.parentWidgetKey === t && p.widgetKey !== n
|
|
287
311
|
), o = [...r, ...i];
|
|
288
312
|
let s = {
|
|
289
313
|
...e,
|
|
290
314
|
childWidgetsConfig: o
|
|
291
315
|
};
|
|
292
|
-
return `${n}`.includes("Container") && (s =
|
|
316
|
+
return `${n}`.includes("Container") && (s = Mt(s)), {
|
|
293
317
|
success: !0,
|
|
294
318
|
updatedDashboardConfig: s
|
|
295
319
|
};
|
|
@@ -306,7 +330,7 @@ const Ot = (e) => {
|
|
|
306
330
|
}
|
|
307
331
|
};
|
|
308
332
|
}
|
|
309
|
-
},
|
|
333
|
+
}, Vt = (e, n, t, r) => {
|
|
310
334
|
if ((r || "").trim().length > 0) {
|
|
311
335
|
const i = e.childWidgetsConfig.filter(
|
|
312
336
|
(h) => h.parentWidgetKey !== r
|
|
@@ -322,12 +346,12 @@ const Ot = (e) => {
|
|
|
322
346
|
message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
|
|
323
347
|
updatedDashboardConfig: e
|
|
324
348
|
};
|
|
325
|
-
const
|
|
326
|
-
return
|
|
349
|
+
const p = [...o], [g] = p.splice(s, 1);
|
|
350
|
+
return p.splice(d, 0, g), {
|
|
327
351
|
success: !0,
|
|
328
352
|
updatedDashboardConfig: {
|
|
329
353
|
...e,
|
|
330
|
-
childWidgetsConfig: [...i, ...
|
|
354
|
+
childWidgetsConfig: [...i, ...p]
|
|
331
355
|
}
|
|
332
356
|
};
|
|
333
357
|
} else {
|
|
@@ -339,8 +363,8 @@ const Ot = (e) => {
|
|
|
339
363
|
message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
|
|
340
364
|
updatedDashboardConfig: e
|
|
341
365
|
};
|
|
342
|
-
const d = [...i], [
|
|
343
|
-
return d.splice(s, 0,
|
|
366
|
+
const d = [...i], [p] = d.splice(o, 1);
|
|
367
|
+
return d.splice(s, 0, p), {
|
|
344
368
|
success: !0,
|
|
345
369
|
updatedDashboardConfig: {
|
|
346
370
|
...e,
|
|
@@ -348,13 +372,13 @@ const Ot = (e) => {
|
|
|
348
372
|
}
|
|
349
373
|
};
|
|
350
374
|
}
|
|
351
|
-
},
|
|
375
|
+
}, Yt = (e, n) => ({
|
|
352
376
|
isLoading: !1,
|
|
353
377
|
isEditing: !1,
|
|
354
378
|
allDashboardConfigs: [Ce],
|
|
355
379
|
currentDashboardConfig: Ce,
|
|
356
380
|
targetContainerKey: void 0,
|
|
357
|
-
getNextContainerKey: (t) =>
|
|
381
|
+
getNextContainerKey: (t) => Ft(n().currentDashboardConfig, t),
|
|
358
382
|
setIsLoading: (t) => (e(() => ({ isLoading: t })), t),
|
|
359
383
|
setIsEditing: (t) => {
|
|
360
384
|
let r = n().targetContainerKey;
|
|
@@ -401,7 +425,7 @@ const Ot = (e) => {
|
|
|
401
425
|
};
|
|
402
426
|
}), n().currentDashboardConfig),
|
|
403
427
|
addWidget: (t) => {
|
|
404
|
-
const r = n(), i =
|
|
428
|
+
const r = n(), i = Lt({
|
|
405
429
|
dashboardConfig: r.currentDashboardConfig,
|
|
406
430
|
...t
|
|
407
431
|
}), o = [
|
|
@@ -419,7 +443,7 @@ const Ot = (e) => {
|
|
|
419
443
|
};
|
|
420
444
|
},
|
|
421
445
|
removeWidget: (t, r) => {
|
|
422
|
-
const i = n(), o =
|
|
446
|
+
const i = n(), o = Ut(i.currentDashboardConfig, t, r), s = [
|
|
423
447
|
...i.allDashboardConfigs.filter(
|
|
424
448
|
(d) => d.dashboardId !== o.updatedDashboardConfig.dashboardId
|
|
425
449
|
),
|
|
@@ -434,9 +458,9 @@ const Ot = (e) => {
|
|
|
434
458
|
};
|
|
435
459
|
},
|
|
436
460
|
moveWidget: (t, r, i) => {
|
|
437
|
-
const o = n(), s =
|
|
461
|
+
const o = n(), s = Vt(o.currentDashboardConfig, t, r, i), d = [
|
|
438
462
|
...o.allDashboardConfigs.filter(
|
|
439
|
-
(
|
|
463
|
+
(p) => p.dashboardId !== s.updatedDashboardConfig.dashboardId
|
|
440
464
|
),
|
|
441
465
|
s.updatedDashboardConfig
|
|
442
466
|
];
|
|
@@ -448,46 +472,46 @@ const Ot = (e) => {
|
|
|
448
472
|
allUpdatedDashboardConfigs: d
|
|
449
473
|
};
|
|
450
474
|
}
|
|
451
|
-
}),
|
|
452
|
-
...
|
|
453
|
-
})),
|
|
454
|
-
const i = localStorage.getItem(
|
|
475
|
+
}), On = jt()((...e) => ({
|
|
476
|
+
...Yt(...e)
|
|
477
|
+
})), dt = (e, n) => `dashboards_${n}_${e}`, qt = async (e, n, t, r) => {
|
|
478
|
+
const i = localStorage.getItem(dt(e, n));
|
|
455
479
|
if (i)
|
|
456
480
|
try {
|
|
457
481
|
const o = JSON.parse(i);
|
|
458
482
|
return o.length < 1 ? [r] : (o.forEach((s) => {
|
|
459
483
|
s.dashboardId || (s.dashboardId = "default"), s.dashboardName || (s.dashboardName = `Dashboard ${s.dashboardId}`), s.responsiveGrid = s.responsiveGrid ?? !1, (s.widgets || []).length < 1 && (s.widgets = r.widgets);
|
|
460
484
|
const d = (s.cssSettings || []).filter(
|
|
461
|
-
(
|
|
485
|
+
(p) => r.cssSettings.some((g) => g.key === p.key)
|
|
462
486
|
);
|
|
463
487
|
if (d.length < 1)
|
|
464
488
|
s.cssSettings = [...r.cssSettings];
|
|
465
489
|
else {
|
|
466
|
-
d.forEach((
|
|
467
|
-
|
|
490
|
+
d.forEach((g) => {
|
|
491
|
+
g.value = (g.value || "").replace(/NaN/g, "");
|
|
468
492
|
const h = r.cssSettings.find(
|
|
469
|
-
(u) => u.key ===
|
|
493
|
+
(u) => u.key === g.key
|
|
470
494
|
);
|
|
471
495
|
h && (Object.keys(h).forEach((u) => {
|
|
472
|
-
u in
|
|
473
|
-
}),
|
|
496
|
+
u in g || (g[u] = h[u]);
|
|
497
|
+
}), g.step = h.step, g.minValue = h.minValue, g.defaultValue = h.defaultValue, g.defaultUnit = h.defaultUnit, /\d+/g.test(g.value) === !1 && (g.value = h ? h.value : "1.0rem"));
|
|
474
498
|
});
|
|
475
|
-
const
|
|
476
|
-
(h) => h.key ===
|
|
499
|
+
const p = r.cssSettings.filter((g) => !d.some(
|
|
500
|
+
(h) => h.key === g.key
|
|
477
501
|
));
|
|
478
|
-
s.cssSettings = [...d, ...
|
|
502
|
+
s.cssSettings = [...d, ...p];
|
|
479
503
|
}
|
|
480
504
|
s.widgets = s.widgets.filter(
|
|
481
|
-
(
|
|
505
|
+
(p) => p.includes("WidgetContainer") || t.has(p)
|
|
482
506
|
), s.childWidgetsConfig = s.childWidgetsConfig.filter(
|
|
483
|
-
(
|
|
507
|
+
(p) => t.has(p.widgetKey)
|
|
484
508
|
), s.zoomScale ? s.zoomScale < 0.7 && (s.zoomScale = 0.7) : s.zoomScale = 1;
|
|
485
509
|
}), o);
|
|
486
510
|
} catch (o) {
|
|
487
511
|
console.warn("Error parsing saved dashboard config:", o);
|
|
488
512
|
}
|
|
489
513
|
return [r];
|
|
490
|
-
},
|
|
514
|
+
}, zt = async (e, n, t, r) => {
|
|
491
515
|
t.forEach((o) => {
|
|
492
516
|
if (o.userID = e, o.clientAppKey = n, o.responsiveGrid = o.responsiveGrid ?? !1, typeof o != "object")
|
|
493
517
|
throw new Error("Invalid dashboard configuration");
|
|
@@ -498,42 +522,42 @@ const Ot = (e) => {
|
|
|
498
522
|
), o.zoomScale ? o.zoomScale < 0.7 && (o.zoomScale = 0.7) : o.zoomScale = 1;
|
|
499
523
|
});
|
|
500
524
|
const i = JSON.stringify(t);
|
|
501
|
-
return localStorage.setItem(
|
|
502
|
-
},
|
|
503
|
-
getSavedDashboards:
|
|
504
|
-
saveDashboards:
|
|
505
|
-
},
|
|
525
|
+
return localStorage.setItem(dt(e, n), i), !0;
|
|
526
|
+
}, Bt = {
|
|
527
|
+
getSavedDashboards: qt,
|
|
528
|
+
saveDashboards: zt
|
|
529
|
+
}, Rn = () => Bt, kn = () => {
|
|
506
530
|
const [e, n] = ce({}), [t, r] = ce({}), i = ue((h) => {
|
|
507
531
|
const u = h.dashboardId;
|
|
508
|
-
n((
|
|
509
|
-
const
|
|
532
|
+
n((m) => {
|
|
533
|
+
const y = {
|
|
510
534
|
undoIndex: 0,
|
|
511
535
|
config: h
|
|
512
536
|
};
|
|
513
|
-
return r((
|
|
514
|
-
...
|
|
537
|
+
return r((x) => ({
|
|
538
|
+
...x,
|
|
515
539
|
[u]: 0
|
|
516
540
|
})), {
|
|
517
|
-
...
|
|
518
|
-
[u]: [
|
|
541
|
+
...m,
|
|
542
|
+
[u]: [y]
|
|
519
543
|
// Forces a reset to just this one entry
|
|
520
544
|
};
|
|
521
545
|
});
|
|
522
546
|
}, []), o = ue(
|
|
523
547
|
(h) => {
|
|
524
548
|
n((u) => {
|
|
525
|
-
const
|
|
549
|
+
const m = h.dashboardId, y = u[m] || [], x = t[m] ?? -1, v = y.slice(0, x + 1), b = {
|
|
526
550
|
undoIndex: v.length,
|
|
527
551
|
// New index based on trimmed length
|
|
528
552
|
config: h
|
|
529
553
|
}, C = [...v, b];
|
|
530
554
|
return r((T) => ({
|
|
531
555
|
...T,
|
|
532
|
-
[
|
|
556
|
+
[m]: C.length - 1
|
|
533
557
|
// Index is now the last element's index
|
|
534
558
|
})), {
|
|
535
559
|
...u,
|
|
536
|
-
[
|
|
560
|
+
[m]: C
|
|
537
561
|
};
|
|
538
562
|
});
|
|
539
563
|
},
|
|
@@ -542,27 +566,27 @@ const Ot = (e) => {
|
|
|
542
566
|
n((u) => {
|
|
543
567
|
if (!u[h])
|
|
544
568
|
return u;
|
|
545
|
-
const { [h]:
|
|
546
|
-
return
|
|
569
|
+
const { [h]: m, ...y } = u;
|
|
570
|
+
return y;
|
|
547
571
|
}), r((u) => {
|
|
548
|
-
const { [h]:
|
|
549
|
-
return
|
|
572
|
+
const { [h]: m, ...y } = u;
|
|
573
|
+
return y;
|
|
550
574
|
});
|
|
551
575
|
}, []), d = ue(
|
|
552
576
|
(h) => {
|
|
553
577
|
r((u) => {
|
|
554
|
-
const
|
|
555
|
-
return
|
|
578
|
+
const m = u[h] ?? -1, y = Math.max(0, m - 1);
|
|
579
|
+
return y !== m ? { ...u, [h]: y } : u;
|
|
556
580
|
});
|
|
557
581
|
},
|
|
558
582
|
[
|
|
559
583
|
//loadConfigFromHistory
|
|
560
584
|
]
|
|
561
|
-
),
|
|
585
|
+
), p = ue(
|
|
562
586
|
(h) => {
|
|
563
587
|
r((u) => {
|
|
564
|
-
const
|
|
565
|
-
return
|
|
588
|
+
const m = e[h]?.length || 0, y = u[h] ?? -1, x = Math.min(m - 1, y + 1);
|
|
589
|
+
return x !== y ? { ...u, [h]: x } : u;
|
|
566
590
|
});
|
|
567
591
|
},
|
|
568
592
|
[
|
|
@@ -576,10 +600,10 @@ const Ot = (e) => {
|
|
|
576
600
|
addUndoEntry: o,
|
|
577
601
|
removeUndoHistoryForDashboard: s,
|
|
578
602
|
undo: d,
|
|
579
|
-
redo:
|
|
603
|
+
redo: p,
|
|
580
604
|
getUndoStatus: (h) => {
|
|
581
|
-
const u = t[h] ?? -1,
|
|
582
|
-
return { isUndoDisabled:
|
|
605
|
+
const u = t[h] ?? -1, m = e[h]?.length || 0, y = u <= 0, x = u >= m - 1;
|
|
606
|
+
return { isUndoDisabled: y, isRedoDisabled: x };
|
|
583
607
|
},
|
|
584
608
|
undoHistory: e,
|
|
585
609
|
historyIndex: t
|
|
@@ -607,14 +631,14 @@ function K({
|
|
|
607
631
|
}
|
|
608
632
|
);
|
|
609
633
|
}
|
|
610
|
-
function
|
|
634
|
+
function jn({ className: e }) {
|
|
611
635
|
return /* @__PURE__ */ W(K, { className: `lucide lucide-circle-plus-icon lucide-circle-plus ${e}`, children: [
|
|
612
636
|
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
613
637
|
/* @__PURE__ */ a("path", { d: "M8 12h8" }),
|
|
614
638
|
/* @__PURE__ */ a("path", { d: "M12 8v8" })
|
|
615
639
|
] });
|
|
616
640
|
}
|
|
617
|
-
function
|
|
641
|
+
function An({ className: e }) {
|
|
618
642
|
return /* @__PURE__ */ W(K, { className: `lucide lucide-trash2-icon lucide-trash-2 ${e}`, children: [
|
|
619
643
|
/* @__PURE__ */ a("path", { d: "M10 11v6" }),
|
|
620
644
|
/* @__PURE__ */ a("path", { d: "M14 11v6" }),
|
|
@@ -623,13 +647,13 @@ function jn({ className: e }) {
|
|
|
623
647
|
/* @__PURE__ */ a("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
624
648
|
] });
|
|
625
649
|
}
|
|
626
|
-
function
|
|
650
|
+
function Fn({ className: e }) {
|
|
627
651
|
return /* @__PURE__ */ W(K, { className: `lucide lucide-square-pen-icon lucide-square-pen ${e}`, children: [
|
|
628
652
|
/* @__PURE__ */ a("path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
629
653
|
/* @__PURE__ */ a("path", { d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" })
|
|
630
654
|
] });
|
|
631
655
|
}
|
|
632
|
-
function
|
|
656
|
+
function Ln({ className: e }) {
|
|
633
657
|
return /* @__PURE__ */ W(K, { className: `lucide lucide-grid3x3-icon lucide-grid-3x3 ${e}`, children: [
|
|
634
658
|
/* @__PURE__ */ a("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
635
659
|
/* @__PURE__ */ a("path", { d: "M3 9h18" }),
|
|
@@ -638,14 +662,14 @@ function An({ className: e }) {
|
|
|
638
662
|
/* @__PURE__ */ a("path", { d: "M15 3v18" })
|
|
639
663
|
] });
|
|
640
664
|
}
|
|
641
|
-
function
|
|
665
|
+
function Un({ className: e }) {
|
|
642
666
|
return /* @__PURE__ */ W(K, { className: `lucide lucide-monitor-icon lucide-monitor ${e}`, children: [
|
|
643
667
|
/* @__PURE__ */ a("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
|
|
644
668
|
/* @__PURE__ */ a("line", { x1: "8", x2: "16", y1: "21", y2: "21" }),
|
|
645
669
|
/* @__PURE__ */ a("line", { x1: "12", x2: "12", y1: "17", y2: "21" })
|
|
646
670
|
] });
|
|
647
671
|
}
|
|
648
|
-
function
|
|
672
|
+
function Vn({ className: e }) {
|
|
649
673
|
return /* @__PURE__ */ W(
|
|
650
674
|
K,
|
|
651
675
|
{
|
|
@@ -659,7 +683,7 @@ function Fn({ className: e }) {
|
|
|
659
683
|
}
|
|
660
684
|
);
|
|
661
685
|
}
|
|
662
|
-
function
|
|
686
|
+
function ut({ className: e }) {
|
|
663
687
|
return /* @__PURE__ */ W(
|
|
664
688
|
K,
|
|
665
689
|
{
|
|
@@ -672,7 +696,7 @@ function dt({ className: e }) {
|
|
|
672
696
|
}
|
|
673
697
|
);
|
|
674
698
|
}
|
|
675
|
-
function
|
|
699
|
+
function ft({ className: e }) {
|
|
676
700
|
return /* @__PURE__ */ W(
|
|
677
701
|
K,
|
|
678
702
|
{
|
|
@@ -685,13 +709,13 @@ function ut({ className: e }) {
|
|
|
685
709
|
}
|
|
686
710
|
);
|
|
687
711
|
}
|
|
688
|
-
function
|
|
712
|
+
function Kt({ className: e }) {
|
|
689
713
|
return /* @__PURE__ */ W(K, { className: `lucide lucide-settings-icon lucide-settings ${e}`, children: [
|
|
690
714
|
/* @__PURE__ */ a("path", { d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }),
|
|
691
715
|
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "3" })
|
|
692
716
|
] });
|
|
693
717
|
}
|
|
694
|
-
function
|
|
718
|
+
function Yn({ className: e }) {
|
|
695
719
|
return /* @__PURE__ */ W(
|
|
696
720
|
K,
|
|
697
721
|
{
|
|
@@ -704,14 +728,14 @@ function Un({ className: e }) {
|
|
|
704
728
|
}
|
|
705
729
|
);
|
|
706
730
|
}
|
|
707
|
-
function
|
|
731
|
+
function ht({ className: e }) {
|
|
708
732
|
return /* @__PURE__ */ W(K, { className: `lucide lucide-circle-x-icon lucide-circle-x ${e}`, children: [
|
|
709
733
|
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
710
734
|
/* @__PURE__ */ a("path", { d: "m15 9-6 6" }),
|
|
711
735
|
/* @__PURE__ */ a("path", { d: "m9 9 6 6" })
|
|
712
736
|
] });
|
|
713
737
|
}
|
|
714
|
-
function
|
|
738
|
+
function qn({ className: e }) {
|
|
715
739
|
return /* @__PURE__ */ W(K, { className: `lucide lucide-zoom-in-icon lucide-zoom-in ${e}`, children: [
|
|
716
740
|
/* @__PURE__ */ a("circle", { cx: "11", cy: "11", r: "8" }),
|
|
717
741
|
/* @__PURE__ */ a("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
|
|
@@ -719,14 +743,14 @@ function Vn({ className: e }) {
|
|
|
719
743
|
/* @__PURE__ */ a("line", { x1: "8", x2: "14", y1: "11", y2: "11" })
|
|
720
744
|
] });
|
|
721
745
|
}
|
|
722
|
-
function
|
|
746
|
+
function zn({ className: e }) {
|
|
723
747
|
return /* @__PURE__ */ W(K, { className: `lucide lucide-zoom-out-icon lucide-zoom-out ${e}`, children: [
|
|
724
748
|
/* @__PURE__ */ a("circle", { cx: "11", cy: "11", r: "8" }),
|
|
725
749
|
/* @__PURE__ */ a("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
|
|
726
750
|
/* @__PURE__ */ a("line", { x1: "8", x2: "14", y1: "11", y2: "11" })
|
|
727
751
|
] });
|
|
728
752
|
}
|
|
729
|
-
function
|
|
753
|
+
function Ht({ className: e }) {
|
|
730
754
|
return /* @__PURE__ */ W(K, { className: `lucide lucide-timer-reset-icon lucide-timer-reset ${e}`, children: [
|
|
731
755
|
/* @__PURE__ */ a("path", { d: "M10 2h4" }),
|
|
732
756
|
/* @__PURE__ */ a("path", { d: "M12 14v-4" }),
|
|
@@ -734,19 +758,19 @@ function Bt({ className: e }) {
|
|
|
734
758
|
/* @__PURE__ */ a("path", { d: "M9 17H4v5" })
|
|
735
759
|
] });
|
|
736
760
|
}
|
|
737
|
-
function
|
|
761
|
+
function Xt({ className: e }) {
|
|
738
762
|
return /* @__PURE__ */ W(K, { className: `lucide lucide-undo-icon lucide-undo ${e}`, children: [
|
|
739
763
|
/* @__PURE__ */ a("path", { d: "M3 7v6h6" }),
|
|
740
764
|
/* @__PURE__ */ a("path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" })
|
|
741
765
|
] });
|
|
742
766
|
}
|
|
743
|
-
function
|
|
767
|
+
function Gt({ className: e }) {
|
|
744
768
|
return /* @__PURE__ */ W(K, { className: `lucide lucide-redo-icon lucide-redo ${e}`, children: [
|
|
745
769
|
/* @__PURE__ */ a("path", { d: "M21 7v6h-6" }),
|
|
746
770
|
/* @__PURE__ */ a("path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7" })
|
|
747
771
|
] });
|
|
748
772
|
}
|
|
749
|
-
function
|
|
773
|
+
function Zt({ className: e }) {
|
|
750
774
|
return /* @__PURE__ */ W(K, { className: `lucide lucide-hand-icon lucide-hand ${e}`, children: [
|
|
751
775
|
/* @__PURE__ */ a("path", { d: "M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2" }),
|
|
752
776
|
/* @__PURE__ */ a("path", { d: "M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" }),
|
|
@@ -754,7 +778,7 @@ function Xt({ className: e }) {
|
|
|
754
778
|
/* @__PURE__ */ a("path", { d: "M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15" })
|
|
755
779
|
] });
|
|
756
780
|
}
|
|
757
|
-
function
|
|
781
|
+
function Jt({ className: e }) {
|
|
758
782
|
return /* @__PURE__ */ W(K, { className: `lucide lucide-hand-grab-icon lucide-hand-grab ${e}`, children: [
|
|
759
783
|
/* @__PURE__ */ a("path", { d: "M18 11.5V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1.4" }),
|
|
760
784
|
/* @__PURE__ */ a("path", { d: "M14 10V8a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" }),
|
|
@@ -763,7 +787,7 @@ function Gt({ className: e }) {
|
|
|
763
787
|
/* @__PURE__ */ a("path", { d: "M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-4a8 8 0 0 1-8-8 2 2 0 1 1 4 0" })
|
|
764
788
|
] });
|
|
765
789
|
}
|
|
766
|
-
function
|
|
790
|
+
function Qt({ className: e }) {
|
|
767
791
|
return /* @__PURE__ */ W(K, { className: `lucide lucide-crosshair-icon lucide-crosshair ${e}`, children: [
|
|
768
792
|
/* @__PURE__ */ a("line", { x1: "22", x2: "18", y1: "12", y2: "12" }),
|
|
769
793
|
/* @__PURE__ */ a("line", { x1: "6", x2: "2", y1: "12", y2: "12" }),
|
|
@@ -771,14 +795,14 @@ function Zt({ className: e }) {
|
|
|
771
795
|
/* @__PURE__ */ a("line", { x1: "12", x2: "12", y1: "22", y2: "18" })
|
|
772
796
|
] });
|
|
773
797
|
}
|
|
774
|
-
function
|
|
798
|
+
function Bn({ className: e }) {
|
|
775
799
|
return /* @__PURE__ */ W(K, { className: `lucide lucide-target-icon lucide-target ${e}`, children: [
|
|
776
800
|
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
777
801
|
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "6" }),
|
|
778
802
|
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "2" })
|
|
779
803
|
] });
|
|
780
804
|
}
|
|
781
|
-
function
|
|
805
|
+
function en({ className: e }) {
|
|
782
806
|
return /* @__PURE__ */ W(
|
|
783
807
|
K,
|
|
784
808
|
{
|
|
@@ -801,7 +825,7 @@ const Z = (e, ...n) => [
|
|
|
801
825
|
Array.isArray(e) ? e.forEach((i) => t.classList.add(i)) : e.split(" ").forEach((i) => t.classList.add(i)), t.style.display = "none", document.body.appendChild(t);
|
|
802
826
|
const r = window.getComputedStyle(t)[n];
|
|
803
827
|
return document.body.removeChild(t), r;
|
|
804
|
-
},
|
|
828
|
+
}, Kn = {
|
|
805
829
|
primary: re("text-primary", "color"),
|
|
806
830
|
secondary: re("text-secondary", "color"),
|
|
807
831
|
success: re("text-success", "color"),
|
|
@@ -811,7 +835,7 @@ const Z = (e, ...n) => [
|
|
|
811
835
|
disabled: re("text-disabled", "color"),
|
|
812
836
|
neutral: re("text-neutral", "color"),
|
|
813
837
|
body: re("text-body", "color")
|
|
814
|
-
},
|
|
838
|
+
}, Hn = {
|
|
815
839
|
getCssVariableValue: (e) => {
|
|
816
840
|
const n = document.documentElement;
|
|
817
841
|
return getComputedStyle(n).getPropertyValue(e).trim() || null;
|
|
@@ -825,10 +849,10 @@ const Z = (e, ...n) => [
|
|
|
825
849
|
n.style.setProperty(t.cssProperty, t.value);
|
|
826
850
|
});
|
|
827
851
|
}
|
|
828
|
-
},
|
|
852
|
+
}, gt = (e) => {
|
|
829
853
|
const n = `${e}`.split("_");
|
|
830
854
|
return n.length > 1 ? n[1].replace(/(\D)(\d+)/, "$1 $2") : "Container";
|
|
831
|
-
},
|
|
855
|
+
}, mt = ({
|
|
832
856
|
label: e,
|
|
833
857
|
className: n,
|
|
834
858
|
size: t = "medium",
|
|
@@ -837,14 +861,14 @@ const Z = (e, ...n) => [
|
|
|
837
861
|
onKeyDown: o,
|
|
838
862
|
placeholder: s = ""
|
|
839
863
|
}) => {
|
|
840
|
-
const d = at(() => t === "small" ? "py-1.5 px-3 text-sm" : "py-2.5 px-4 text-base", [t]),
|
|
864
|
+
const d = at(() => t === "small" ? "py-1.5 px-3 text-sm" : "py-2.5 px-4 text-base", [t]), p = Z("flex flex-col mb-4", n || ""), h = `${Z(`
|
|
841
865
|
block w-full rounded-md px-3 py-1.5 text-base
|
|
842
866
|
bg-formfield content-formfield
|
|
843
867
|
outline-1 -outline-offset-1 outline-primary
|
|
844
868
|
placeholder:text-disabled
|
|
845
869
|
focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-200 sm:text-sm/6
|
|
846
870
|
`)} ${d}`;
|
|
847
|
-
return /* @__PURE__ */ W("div", { className:
|
|
871
|
+
return /* @__PURE__ */ W("div", { className: p, children: [
|
|
848
872
|
/* @__PURE__ */ a("label", { htmlFor: e, className: "block text-sm/6 font-medium mb-1.5", children: e }),
|
|
849
873
|
/* @__PURE__ */ a(
|
|
850
874
|
"input",
|
|
@@ -879,18 +903,18 @@ function J(e) {
|
|
|
879
903
|
buttonType: o,
|
|
880
904
|
category: s,
|
|
881
905
|
px: d,
|
|
882
|
-
py:
|
|
883
|
-
children:
|
|
906
|
+
py: p,
|
|
907
|
+
children: g,
|
|
884
908
|
...h
|
|
885
909
|
} = e, u = () => {
|
|
886
|
-
const
|
|
910
|
+
const y = e.isIconButton || !1, x = e.category || "primary", v = e.buttonType || "normal", b = e.disabled || !1, C = e.className || "", T = e.font || "semibold", S = Number((e.border || 0) > 0 ? e.border : 0);
|
|
887
911
|
let D = (e.borderColor || "").trim();
|
|
888
912
|
D = D.length > 0 ? D : "";
|
|
889
913
|
const c = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), N = e.shadow || "sm", l = e.shadowHover || "md", f = (e.addCss || "").trim(), P = e.justifyCss || "justify-center";
|
|
890
|
-
if (
|
|
914
|
+
if (y)
|
|
891
915
|
return Z(
|
|
892
916
|
"flex flex-row items-center",
|
|
893
|
-
b ? "text-disabled" : `text-${
|
|
917
|
+
b ? "text-disabled" : `text-${x} hover:brightness-110 cursor-pointer`,
|
|
894
918
|
C || ""
|
|
895
919
|
);
|
|
896
920
|
const $ = [
|
|
@@ -906,33 +930,33 @@ function J(e) {
|
|
|
906
930
|
$.push("cursor-pointer");
|
|
907
931
|
let O = "";
|
|
908
932
|
Se.has(v) ? O = `${Se.get(v)}` : O = `${Se.get("normal")}`, S < 1 && (O = O.replace("border-[category]", ""));
|
|
909
|
-
const E = O.replace(/\[category\]/g,
|
|
933
|
+
const E = O.replace(/\[category\]/g, x).trim();
|
|
910
934
|
$.push(E);
|
|
911
935
|
}
|
|
912
936
|
return S > 0 ? ($.push(`border-[${S}px]`), $.push(`border-${D}`)) : ($.push("border-[1px]"), $.push("border-transparent")), c > 0 ? ($.push(`hover:border-[${c}px] group-hover:border-[${c}px]`), $.push(`hover:border-${D} group-hover:border-${D}`)) : $.push("hover:border-[1px] group-hover:border-[1px]"), $.push(`shadow-${N}`), $.push(`hover:shadow-${l} group-hover:shadow-${l}`), f.length > 0 && $.push(f), f.indexOf("hidden") === -1 && $.push("inline-flex"), $.push(P), $.join(" ").trim();
|
|
913
|
-
},
|
|
914
|
-
const
|
|
937
|
+
}, m = () => {
|
|
938
|
+
const y = e.px || 0.7, x = e.py || 0.25;
|
|
915
939
|
return {
|
|
916
|
-
padding: r ? 0 : `${
|
|
940
|
+
padding: r ? 0 : `${x}rem ${y}rem `
|
|
917
941
|
};
|
|
918
942
|
};
|
|
919
|
-
return /* @__PURE__ */ a("button", { type: "button", disabled: t, className: u(), style:
|
|
943
|
+
return /* @__PURE__ */ a("button", { type: "button", disabled: t, className: u(), style: m(), ...h, children: g });
|
|
920
944
|
}
|
|
921
|
-
const
|
|
922
|
-
function
|
|
923
|
-
const { children: n, testId: t, classNames: r, direction: i, ...o } = e, s =
|
|
945
|
+
const tn = (e) => e.direction === "row" ? Z("flex flex-row items-center gap-2", e.classNames || "") : Z("flex flex-col gap-2 w-full", e.classNames || "");
|
|
946
|
+
function nn(e) {
|
|
947
|
+
const { children: n, testId: t, classNames: r, direction: i, ...o } = e, s = tn(e);
|
|
924
948
|
return /* @__PURE__ */ a("div", { "data-testid": t || "not-set", className: s, ...o, children: n });
|
|
925
949
|
}
|
|
926
|
-
const
|
|
950
|
+
const Xn = le(
|
|
927
951
|
(e, n) => {
|
|
928
952
|
const { classNames: t, innerClass: r, ...i } = e, o = Z(t || "", "w-full"), s = Z(
|
|
929
953
|
`w-full flex overflow-hidden justify-between items-center gap-0
|
|
930
954
|
rounded-md border`,
|
|
931
955
|
r || ""
|
|
932
956
|
);
|
|
933
|
-
return /* @__PURE__ */ a(
|
|
957
|
+
return /* @__PURE__ */ a(nn, { direction: "row", classNames: o, ...i, children: /* @__PURE__ */ a("div", { className: s, children: e.children }) });
|
|
934
958
|
}
|
|
935
|
-
),
|
|
959
|
+
), Gn = le((e, n) => /* @__PURE__ */ a(
|
|
936
960
|
"div",
|
|
937
961
|
{
|
|
938
962
|
"data-testid": e.testId || "not-set",
|
|
@@ -943,7 +967,7 @@ const Kn = le(
|
|
|
943
967
|
},
|
|
944
968
|
children: e.children
|
|
945
969
|
}
|
|
946
|
-
)),
|
|
970
|
+
)), Zn = le(
|
|
947
971
|
(e, n) => /* @__PURE__ */ a(
|
|
948
972
|
"div",
|
|
949
973
|
{
|
|
@@ -952,7 +976,7 @@ const Kn = le(
|
|
|
952
976
|
children: e.children
|
|
953
977
|
}
|
|
954
978
|
)
|
|
955
|
-
),
|
|
979
|
+
), Jn = le((e, n) => /* @__PURE__ */ a(
|
|
956
980
|
"div",
|
|
957
981
|
{
|
|
958
982
|
"data-testid": e.testId || "not-set",
|
|
@@ -964,23 +988,23 @@ const Kn = le(
|
|
|
964
988
|
children: e.children
|
|
965
989
|
}
|
|
966
990
|
));
|
|
967
|
-
function
|
|
991
|
+
function rn(e) {
|
|
968
992
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
969
993
|
}
|
|
970
|
-
var fe = { exports: {} }, De = {},
|
|
994
|
+
var fe = { exports: {} }, De = {}, pe = { exports: {} }, ye = { exports: {} }, V = {};
|
|
971
995
|
var Ue;
|
|
972
|
-
function
|
|
996
|
+
function on() {
|
|
973
997
|
if (Ue) return V;
|
|
974
998
|
Ue = 1;
|
|
975
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, s = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110,
|
|
999
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, s = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, p = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, g = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, h = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, m = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, y = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, x = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, v = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, b = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, C = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, T = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
976
1000
|
function S(c) {
|
|
977
1001
|
if (typeof c == "object" && c !== null) {
|
|
978
1002
|
var N = c.$$typeof;
|
|
979
1003
|
switch (N) {
|
|
980
1004
|
case n:
|
|
981
1005
|
switch (c = c.type, c) {
|
|
982
|
-
case
|
|
983
|
-
case
|
|
1006
|
+
case p:
|
|
1007
|
+
case g:
|
|
984
1008
|
case r:
|
|
985
1009
|
case o:
|
|
986
1010
|
case i:
|
|
@@ -990,8 +1014,8 @@ function nn() {
|
|
|
990
1014
|
switch (c = c && c.$$typeof, c) {
|
|
991
1015
|
case d:
|
|
992
1016
|
case h:
|
|
993
|
-
case
|
|
994
|
-
case
|
|
1017
|
+
case x:
|
|
1018
|
+
case y:
|
|
995
1019
|
case s:
|
|
996
1020
|
return c;
|
|
997
1021
|
default:
|
|
@@ -1004,10 +1028,10 @@ function nn() {
|
|
|
1004
1028
|
}
|
|
1005
1029
|
}
|
|
1006
1030
|
function D(c) {
|
|
1007
|
-
return S(c) ===
|
|
1031
|
+
return S(c) === g;
|
|
1008
1032
|
}
|
|
1009
|
-
return V.AsyncMode =
|
|
1010
|
-
return D(c) || S(c) ===
|
|
1033
|
+
return V.AsyncMode = p, V.ConcurrentMode = g, V.ContextConsumer = d, V.ContextProvider = s, V.Element = n, V.ForwardRef = h, V.Fragment = r, V.Lazy = x, V.Memo = y, V.Portal = t, V.Profiler = o, V.StrictMode = i, V.Suspense = u, V.isAsyncMode = function(c) {
|
|
1034
|
+
return D(c) || S(c) === p;
|
|
1011
1035
|
}, V.isConcurrentMode = D, V.isContextConsumer = function(c) {
|
|
1012
1036
|
return S(c) === d;
|
|
1013
1037
|
}, V.isContextProvider = function(c) {
|
|
@@ -1019,9 +1043,9 @@ function nn() {
|
|
|
1019
1043
|
}, V.isFragment = function(c) {
|
|
1020
1044
|
return S(c) === r;
|
|
1021
1045
|
}, V.isLazy = function(c) {
|
|
1022
|
-
return S(c) ===
|
|
1046
|
+
return S(c) === x;
|
|
1023
1047
|
}, V.isMemo = function(c) {
|
|
1024
|
-
return S(c) ===
|
|
1048
|
+
return S(c) === y;
|
|
1025
1049
|
}, V.isPortal = function(c) {
|
|
1026
1050
|
return S(c) === t;
|
|
1027
1051
|
}, V.isProfiler = function(c) {
|
|
@@ -1031,41 +1055,41 @@ function nn() {
|
|
|
1031
1055
|
}, V.isSuspense = function(c) {
|
|
1032
1056
|
return S(c) === u;
|
|
1033
1057
|
}, V.isValidElementType = function(c) {
|
|
1034
|
-
return typeof c == "string" || typeof c == "function" || c === r || c ===
|
|
1058
|
+
return typeof c == "string" || typeof c == "function" || c === r || c === g || c === o || c === i || c === u || c === m || typeof c == "object" && c !== null && (c.$$typeof === x || c.$$typeof === y || c.$$typeof === s || c.$$typeof === d || c.$$typeof === h || c.$$typeof === b || c.$$typeof === C || c.$$typeof === T || c.$$typeof === v);
|
|
1035
1059
|
}, V.typeOf = S, V;
|
|
1036
1060
|
}
|
|
1037
1061
|
var Y = {};
|
|
1038
1062
|
var Ve;
|
|
1039
|
-
function
|
|
1063
|
+
function an() {
|
|
1040
1064
|
return Ve || (Ve = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
1041
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, s = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110,
|
|
1065
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, s = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, p = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, g = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, h = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, m = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, y = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, x = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, v = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, b = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, C = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, T = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
1042
1066
|
function S(_) {
|
|
1043
1067
|
return typeof _ == "string" || typeof _ == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1044
|
-
_ === r || _ ===
|
|
1068
|
+
_ === r || _ === g || _ === o || _ === i || _ === u || _ === m || typeof _ == "object" && _ !== null && (_.$$typeof === x || _.$$typeof === y || _.$$typeof === s || _.$$typeof === d || _.$$typeof === h || _.$$typeof === b || _.$$typeof === C || _.$$typeof === T || _.$$typeof === v);
|
|
1045
1069
|
}
|
|
1046
1070
|
function D(_) {
|
|
1047
1071
|
if (typeof _ == "object" && _ !== null) {
|
|
1048
1072
|
var te = _.$$typeof;
|
|
1049
1073
|
switch (te) {
|
|
1050
1074
|
case n:
|
|
1051
|
-
var
|
|
1052
|
-
switch (
|
|
1053
|
-
case
|
|
1054
|
-
case
|
|
1075
|
+
var me = _.type;
|
|
1076
|
+
switch (me) {
|
|
1077
|
+
case p:
|
|
1078
|
+
case g:
|
|
1055
1079
|
case r:
|
|
1056
1080
|
case o:
|
|
1057
1081
|
case i:
|
|
1058
1082
|
case u:
|
|
1059
|
-
return
|
|
1083
|
+
return me;
|
|
1060
1084
|
default:
|
|
1061
|
-
var
|
|
1062
|
-
switch (
|
|
1085
|
+
var je = me && me.$$typeof;
|
|
1086
|
+
switch (je) {
|
|
1063
1087
|
case d:
|
|
1064
1088
|
case h:
|
|
1065
|
-
case
|
|
1066
|
-
case
|
|
1089
|
+
case x:
|
|
1090
|
+
case y:
|
|
1067
1091
|
case s:
|
|
1068
|
-
return
|
|
1092
|
+
return je;
|
|
1069
1093
|
default:
|
|
1070
1094
|
return te;
|
|
1071
1095
|
}
|
|
@@ -1075,12 +1099,12 @@ function rn() {
|
|
|
1075
1099
|
}
|
|
1076
1100
|
}
|
|
1077
1101
|
}
|
|
1078
|
-
var c =
|
|
1102
|
+
var c = p, N = g, l = d, f = s, P = n, $ = h, O = r, E = x, z = y, X = t, Q = o, H = i, ee = u, ae = !1;
|
|
1079
1103
|
function de(_) {
|
|
1080
|
-
return ae || (ae = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),
|
|
1104
|
+
return ae || (ae = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), w(_) || D(_) === p;
|
|
1081
1105
|
}
|
|
1082
|
-
function
|
|
1083
|
-
return D(_) ===
|
|
1106
|
+
function w(_) {
|
|
1107
|
+
return D(_) === g;
|
|
1084
1108
|
}
|
|
1085
1109
|
function M(_) {
|
|
1086
1110
|
return D(_) === d;
|
|
@@ -1088,22 +1112,22 @@ function rn() {
|
|
|
1088
1112
|
function A(_) {
|
|
1089
1113
|
return D(_) === s;
|
|
1090
1114
|
}
|
|
1091
|
-
function
|
|
1115
|
+
function k(_) {
|
|
1092
1116
|
return typeof _ == "object" && _ !== null && _.$$typeof === n;
|
|
1093
1117
|
}
|
|
1094
1118
|
function I(_) {
|
|
1095
1119
|
return D(_) === h;
|
|
1096
1120
|
}
|
|
1097
|
-
function
|
|
1121
|
+
function F(_) {
|
|
1098
1122
|
return D(_) === r;
|
|
1099
1123
|
}
|
|
1100
1124
|
function R(_) {
|
|
1101
|
-
return D(_) ===
|
|
1125
|
+
return D(_) === x;
|
|
1102
1126
|
}
|
|
1103
|
-
function
|
|
1104
|
-
return D(_) ===
|
|
1127
|
+
function j(_) {
|
|
1128
|
+
return D(_) === y;
|
|
1105
1129
|
}
|
|
1106
|
-
function
|
|
1130
|
+
function L(_) {
|
|
1107
1131
|
return D(_) === t;
|
|
1108
1132
|
}
|
|
1109
1133
|
function q(_) {
|
|
@@ -1115,15 +1139,15 @@ function rn() {
|
|
|
1115
1139
|
function G(_) {
|
|
1116
1140
|
return D(_) === u;
|
|
1117
1141
|
}
|
|
1118
|
-
Y.AsyncMode = c, Y.ConcurrentMode = N, Y.ContextConsumer = l, Y.ContextProvider = f, Y.Element = P, Y.ForwardRef = $, Y.Fragment = O, Y.Lazy = E, Y.Memo = z, Y.Portal = X, Y.Profiler = Q, Y.StrictMode = H, Y.Suspense = ee, Y.isAsyncMode = de, Y.isConcurrentMode =
|
|
1142
|
+
Y.AsyncMode = c, Y.ConcurrentMode = N, Y.ContextConsumer = l, Y.ContextProvider = f, Y.Element = P, Y.ForwardRef = $, Y.Fragment = O, Y.Lazy = E, Y.Memo = z, Y.Portal = X, Y.Profiler = Q, Y.StrictMode = H, Y.Suspense = ee, Y.isAsyncMode = de, Y.isConcurrentMode = w, Y.isContextConsumer = M, Y.isContextProvider = A, Y.isElement = k, Y.isForwardRef = I, Y.isFragment = F, Y.isLazy = R, Y.isMemo = j, Y.isPortal = L, Y.isProfiler = q, Y.isStrictMode = U, Y.isSuspense = G, Y.isValidElementType = S, Y.typeOf = D;
|
|
1119
1143
|
})()), Y;
|
|
1120
1144
|
}
|
|
1121
1145
|
var Ye;
|
|
1122
|
-
function
|
|
1123
|
-
return Ye || (Ye = 1, process.env.NODE_ENV === "production" ?
|
|
1146
|
+
function pt() {
|
|
1147
|
+
return Ye || (Ye = 1, process.env.NODE_ENV === "production" ? ye.exports = on() : ye.exports = an()), ye.exports;
|
|
1124
1148
|
}
|
|
1125
1149
|
var Te, qe;
|
|
1126
|
-
function
|
|
1150
|
+
function sn() {
|
|
1127
1151
|
if (qe) return Te;
|
|
1128
1152
|
qe = 1;
|
|
1129
1153
|
var e = Object.getOwnPropertySymbols, n = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
|
|
@@ -1141,31 +1165,31 @@ function on() {
|
|
|
1141
1165
|
return !1;
|
|
1142
1166
|
for (var s = {}, d = 0; d < 10; d++)
|
|
1143
1167
|
s["_" + String.fromCharCode(d)] = d;
|
|
1144
|
-
var
|
|
1168
|
+
var p = Object.getOwnPropertyNames(s).map(function(h) {
|
|
1145
1169
|
return s[h];
|
|
1146
1170
|
});
|
|
1147
|
-
if (
|
|
1171
|
+
if (p.join("") !== "0123456789")
|
|
1148
1172
|
return !1;
|
|
1149
|
-
var
|
|
1173
|
+
var g = {};
|
|
1150
1174
|
return "abcdefghijklmnopqrst".split("").forEach(function(h) {
|
|
1151
|
-
|
|
1152
|
-
}), Object.keys(Object.assign({},
|
|
1175
|
+
g[h] = h;
|
|
1176
|
+
}), Object.keys(Object.assign({}, g)).join("") === "abcdefghijklmnopqrst";
|
|
1153
1177
|
} catch {
|
|
1154
1178
|
return !1;
|
|
1155
1179
|
}
|
|
1156
1180
|
}
|
|
1157
1181
|
return Te = i() ? Object.assign : function(o, s) {
|
|
1158
|
-
for (var d,
|
|
1182
|
+
for (var d, p = r(o), g, h = 1; h < arguments.length; h++) {
|
|
1159
1183
|
d = Object(arguments[h]);
|
|
1160
1184
|
for (var u in d)
|
|
1161
|
-
n.call(d, u) && (
|
|
1185
|
+
n.call(d, u) && (p[u] = d[u]);
|
|
1162
1186
|
if (e) {
|
|
1163
|
-
|
|
1164
|
-
for (var
|
|
1165
|
-
t.call(d, m
|
|
1187
|
+
g = e(d);
|
|
1188
|
+
for (var m = 0; m < g.length; m++)
|
|
1189
|
+
t.call(d, g[m]) && (p[g[m]] = d[g[m]]);
|
|
1166
1190
|
}
|
|
1167
1191
|
}
|
|
1168
|
-
return
|
|
1192
|
+
return p;
|
|
1169
1193
|
}, Te;
|
|
1170
1194
|
}
|
|
1171
1195
|
var Ne, ze;
|
|
@@ -1176,17 +1200,17 @@ function Oe() {
|
|
|
1176
1200
|
return Ne = e, Ne;
|
|
1177
1201
|
}
|
|
1178
1202
|
var Ee, Be;
|
|
1179
|
-
function
|
|
1203
|
+
function yt() {
|
|
1180
1204
|
return Be || (Be = 1, Ee = Function.call.bind(Object.prototype.hasOwnProperty)), Ee;
|
|
1181
1205
|
}
|
|
1182
1206
|
var _e, Ke;
|
|
1183
|
-
function
|
|
1207
|
+
function ln() {
|
|
1184
1208
|
if (Ke) return _e;
|
|
1185
1209
|
Ke = 1;
|
|
1186
1210
|
var e = function() {
|
|
1187
1211
|
};
|
|
1188
1212
|
if (process.env.NODE_ENV !== "production") {
|
|
1189
|
-
var n = /* @__PURE__ */ Oe(), t = {}, r = /* @__PURE__ */
|
|
1213
|
+
var n = /* @__PURE__ */ Oe(), t = {}, r = /* @__PURE__ */ yt();
|
|
1190
1214
|
e = function(o) {
|
|
1191
1215
|
var s = "Warning: " + o;
|
|
1192
1216
|
typeof console < "u" && console.error(s);
|
|
@@ -1196,29 +1220,29 @@ function an() {
|
|
|
1196
1220
|
}
|
|
1197
1221
|
};
|
|
1198
1222
|
}
|
|
1199
|
-
function i(o, s, d,
|
|
1223
|
+
function i(o, s, d, p, g) {
|
|
1200
1224
|
if (process.env.NODE_ENV !== "production") {
|
|
1201
1225
|
for (var h in o)
|
|
1202
1226
|
if (r(o, h)) {
|
|
1203
1227
|
var u;
|
|
1204
1228
|
try {
|
|
1205
1229
|
if (typeof o[h] != "function") {
|
|
1206
|
-
var
|
|
1207
|
-
(
|
|
1230
|
+
var m = Error(
|
|
1231
|
+
(p || "React class") + ": " + d + " type `" + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[h] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
1208
1232
|
);
|
|
1209
|
-
throw
|
|
1233
|
+
throw m.name = "Invariant Violation", m;
|
|
1210
1234
|
}
|
|
1211
|
-
u = o[h](s, h,
|
|
1212
|
-
} catch (
|
|
1213
|
-
u =
|
|
1235
|
+
u = o[h](s, h, p, d, null, n);
|
|
1236
|
+
} catch (x) {
|
|
1237
|
+
u = x;
|
|
1214
1238
|
}
|
|
1215
1239
|
if (u && !(u instanceof Error) && e(
|
|
1216
|
-
(
|
|
1240
|
+
(p || "React class") + ": type specification of " + d + " `" + h + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof u + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
1217
1241
|
), u instanceof Error && !(u.message in t)) {
|
|
1218
1242
|
t[u.message] = !0;
|
|
1219
|
-
var
|
|
1243
|
+
var y = g ? g() : "";
|
|
1220
1244
|
e(
|
|
1221
|
-
"Failed " + d + " type: " + u.message + (
|
|
1245
|
+
"Failed " + d + " type: " + u.message + (y ?? "")
|
|
1222
1246
|
);
|
|
1223
1247
|
}
|
|
1224
1248
|
}
|
|
@@ -1229,30 +1253,30 @@ function an() {
|
|
|
1229
1253
|
}, _e = i, _e;
|
|
1230
1254
|
}
|
|
1231
1255
|
var Me, He;
|
|
1232
|
-
function
|
|
1256
|
+
function cn() {
|
|
1233
1257
|
if (He) return Me;
|
|
1234
1258
|
He = 1;
|
|
1235
|
-
var e =
|
|
1259
|
+
var e = pt(), n = sn(), t = /* @__PURE__ */ Oe(), r = /* @__PURE__ */ yt(), i = /* @__PURE__ */ ln(), o = function() {
|
|
1236
1260
|
};
|
|
1237
1261
|
process.env.NODE_ENV !== "production" && (o = function(d) {
|
|
1238
|
-
var
|
|
1239
|
-
typeof console < "u" && console.error(
|
|
1262
|
+
var p = "Warning: " + d;
|
|
1263
|
+
typeof console < "u" && console.error(p);
|
|
1240
1264
|
try {
|
|
1241
|
-
throw new Error(
|
|
1265
|
+
throw new Error(p);
|
|
1242
1266
|
} catch {
|
|
1243
1267
|
}
|
|
1244
1268
|
});
|
|
1245
1269
|
function s() {
|
|
1246
1270
|
return null;
|
|
1247
1271
|
}
|
|
1248
|
-
return Me = function(d,
|
|
1249
|
-
var
|
|
1250
|
-
function u(
|
|
1251
|
-
var M =
|
|
1272
|
+
return Me = function(d, p) {
|
|
1273
|
+
var g = typeof Symbol == "function" && Symbol.iterator, h = "@@iterator";
|
|
1274
|
+
function u(w) {
|
|
1275
|
+
var M = w && (g && w[g] || w[h]);
|
|
1252
1276
|
if (typeof M == "function")
|
|
1253
1277
|
return M;
|
|
1254
1278
|
}
|
|
1255
|
-
var
|
|
1279
|
+
var m = "<<anonymous>>", y = {
|
|
1256
1280
|
array: C("array"),
|
|
1257
1281
|
bigint: C("bigint"),
|
|
1258
1282
|
bool: C("boolean"),
|
|
@@ -1273,44 +1297,44 @@ function sn() {
|
|
|
1273
1297
|
shape: E,
|
|
1274
1298
|
exact: z
|
|
1275
1299
|
};
|
|
1276
|
-
function w
|
|
1277
|
-
return
|
|
1300
|
+
function x(w, M) {
|
|
1301
|
+
return w === M ? w !== 0 || 1 / w === 1 / M : w !== w && M !== M;
|
|
1278
1302
|
}
|
|
1279
|
-
function v(
|
|
1280
|
-
this.message =
|
|
1303
|
+
function v(w, M) {
|
|
1304
|
+
this.message = w, this.data = M && typeof M == "object" ? M : {}, this.stack = "";
|
|
1281
1305
|
}
|
|
1282
1306
|
v.prototype = Error.prototype;
|
|
1283
|
-
function b(
|
|
1307
|
+
function b(w) {
|
|
1284
1308
|
if (process.env.NODE_ENV !== "production")
|
|
1285
1309
|
var M = {}, A = 0;
|
|
1286
|
-
function
|
|
1287
|
-
if (
|
|
1288
|
-
if (
|
|
1310
|
+
function k(F, R, j, L, q, U, G) {
|
|
1311
|
+
if (L = L || m, U = U || j, G !== t) {
|
|
1312
|
+
if (p) {
|
|
1289
1313
|
var _ = new Error(
|
|
1290
1314
|
"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"
|
|
1291
1315
|
);
|
|
1292
1316
|
throw _.name = "Invariant Violation", _;
|
|
1293
1317
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
1294
|
-
var te =
|
|
1318
|
+
var te = L + ":" + j;
|
|
1295
1319
|
!M[te] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
1296
1320
|
A < 3 && (o(
|
|
1297
|
-
"You are manually calling a React.PropTypes validation function for the `" + U + "` prop on `" +
|
|
1321
|
+
"You are manually calling a React.PropTypes validation function for the `" + U + "` prop on `" + L + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
1298
1322
|
), M[te] = !0, A++);
|
|
1299
1323
|
}
|
|
1300
1324
|
}
|
|
1301
|
-
return R[
|
|
1325
|
+
return R[j] == null ? F ? R[j] === null ? new v("The " + q + " `" + U + "` is marked as required " + ("in `" + L + "`, but its value is `null`.")) : new v("The " + q + " `" + U + "` is marked as required in " + ("`" + L + "`, but its value is `undefined`.")) : null : w(R, j, L, q, U);
|
|
1302
1326
|
}
|
|
1303
|
-
var I =
|
|
1304
|
-
return I.isRequired =
|
|
1305
|
-
}
|
|
1306
|
-
function C(
|
|
1307
|
-
function M(A,
|
|
1308
|
-
var
|
|
1309
|
-
if (q !==
|
|
1310
|
-
var U = ee(
|
|
1327
|
+
var I = k.bind(null, !1);
|
|
1328
|
+
return I.isRequired = k.bind(null, !0), I;
|
|
1329
|
+
}
|
|
1330
|
+
function C(w) {
|
|
1331
|
+
function M(A, k, I, F, R, j) {
|
|
1332
|
+
var L = A[k], q = H(L);
|
|
1333
|
+
if (q !== w) {
|
|
1334
|
+
var U = ee(L);
|
|
1311
1335
|
return new v(
|
|
1312
|
-
"Invalid " +
|
|
1313
|
-
{ expectedType:
|
|
1336
|
+
"Invalid " + F + " `" + R + "` of type " + ("`" + U + "` supplied to `" + I + "`, expected ") + ("`" + w + "`."),
|
|
1337
|
+
{ expectedType: w }
|
|
1314
1338
|
);
|
|
1315
1339
|
}
|
|
1316
1340
|
return null;
|
|
@@ -1320,17 +1344,17 @@ function sn() {
|
|
|
1320
1344
|
function T() {
|
|
1321
1345
|
return b(s);
|
|
1322
1346
|
}
|
|
1323
|
-
function S(
|
|
1324
|
-
function M(A,
|
|
1325
|
-
if (typeof
|
|
1347
|
+
function S(w) {
|
|
1348
|
+
function M(A, k, I, F, R) {
|
|
1349
|
+
if (typeof w != "function")
|
|
1326
1350
|
return new v("Property `" + R + "` of component `" + I + "` has invalid PropType notation inside arrayOf.");
|
|
1327
|
-
var
|
|
1328
|
-
if (!Array.isArray(
|
|
1329
|
-
var
|
|
1330
|
-
return new v("Invalid " +
|
|
1351
|
+
var j = A[k];
|
|
1352
|
+
if (!Array.isArray(j)) {
|
|
1353
|
+
var L = H(j);
|
|
1354
|
+
return new v("Invalid " + F + " `" + R + "` of type " + ("`" + L + "` supplied to `" + I + "`, expected an array."));
|
|
1331
1355
|
}
|
|
1332
|
-
for (var q = 0; q <
|
|
1333
|
-
var U =
|
|
1356
|
+
for (var q = 0; q < j.length; q++) {
|
|
1357
|
+
var U = w(j, q, I, F, R + "[" + q + "]", t);
|
|
1334
1358
|
if (U instanceof Error)
|
|
1335
1359
|
return U;
|
|
1336
1360
|
}
|
|
@@ -1339,64 +1363,64 @@ function sn() {
|
|
|
1339
1363
|
return b(M);
|
|
1340
1364
|
}
|
|
1341
1365
|
function D() {
|
|
1342
|
-
function
|
|
1366
|
+
function w(M, A, k, I, F) {
|
|
1343
1367
|
var R = M[A];
|
|
1344
1368
|
if (!d(R)) {
|
|
1345
|
-
var
|
|
1346
|
-
return new v("Invalid " + I + " `" +
|
|
1369
|
+
var j = H(R);
|
|
1370
|
+
return new v("Invalid " + I + " `" + F + "` of type " + ("`" + j + "` supplied to `" + k + "`, expected a single ReactElement."));
|
|
1347
1371
|
}
|
|
1348
1372
|
return null;
|
|
1349
1373
|
}
|
|
1350
|
-
return b(
|
|
1374
|
+
return b(w);
|
|
1351
1375
|
}
|
|
1352
1376
|
function c() {
|
|
1353
|
-
function
|
|
1377
|
+
function w(M, A, k, I, F) {
|
|
1354
1378
|
var R = M[A];
|
|
1355
1379
|
if (!e.isValidElementType(R)) {
|
|
1356
|
-
var
|
|
1357
|
-
return new v("Invalid " + I + " `" +
|
|
1380
|
+
var j = H(R);
|
|
1381
|
+
return new v("Invalid " + I + " `" + F + "` of type " + ("`" + j + "` supplied to `" + k + "`, expected a single ReactElement type."));
|
|
1358
1382
|
}
|
|
1359
1383
|
return null;
|
|
1360
1384
|
}
|
|
1361
|
-
return b(
|
|
1385
|
+
return b(w);
|
|
1362
1386
|
}
|
|
1363
|
-
function N(
|
|
1364
|
-
function M(A,
|
|
1365
|
-
if (!(A[
|
|
1366
|
-
var
|
|
1367
|
-
return new v("Invalid " +
|
|
1387
|
+
function N(w) {
|
|
1388
|
+
function M(A, k, I, F, R) {
|
|
1389
|
+
if (!(A[k] instanceof w)) {
|
|
1390
|
+
var j = w.name || m, L = de(A[k]);
|
|
1391
|
+
return new v("Invalid " + F + " `" + R + "` of type " + ("`" + L + "` supplied to `" + I + "`, expected ") + ("instance of `" + j + "`."));
|
|
1368
1392
|
}
|
|
1369
1393
|
return null;
|
|
1370
1394
|
}
|
|
1371
1395
|
return b(M);
|
|
1372
1396
|
}
|
|
1373
|
-
function l(
|
|
1374
|
-
if (!Array.isArray(
|
|
1397
|
+
function l(w) {
|
|
1398
|
+
if (!Array.isArray(w))
|
|
1375
1399
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
|
|
1376
1400
|
"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])."
|
|
1377
1401
|
) : o("Invalid argument supplied to oneOf, expected an array.")), s;
|
|
1378
|
-
function M(A,
|
|
1379
|
-
for (var
|
|
1380
|
-
if (
|
|
1402
|
+
function M(A, k, I, F, R) {
|
|
1403
|
+
for (var j = A[k], L = 0; L < w.length; L++)
|
|
1404
|
+
if (x(j, w[L]))
|
|
1381
1405
|
return null;
|
|
1382
|
-
var q = JSON.stringify(
|
|
1406
|
+
var q = JSON.stringify(w, function(G, _) {
|
|
1383
1407
|
var te = ee(_);
|
|
1384
1408
|
return te === "symbol" ? String(_) : _;
|
|
1385
1409
|
});
|
|
1386
|
-
return new v("Invalid " +
|
|
1410
|
+
return new v("Invalid " + F + " `" + R + "` of value `" + String(j) + "` " + ("supplied to `" + I + "`, expected one of " + q + "."));
|
|
1387
1411
|
}
|
|
1388
1412
|
return b(M);
|
|
1389
1413
|
}
|
|
1390
|
-
function f(
|
|
1391
|
-
function M(A,
|
|
1392
|
-
if (typeof
|
|
1414
|
+
function f(w) {
|
|
1415
|
+
function M(A, k, I, F, R) {
|
|
1416
|
+
if (typeof w != "function")
|
|
1393
1417
|
return new v("Property `" + R + "` of component `" + I + "` has invalid PropType notation inside objectOf.");
|
|
1394
|
-
var
|
|
1395
|
-
if (
|
|
1396
|
-
return new v("Invalid " +
|
|
1397
|
-
for (var q in
|
|
1398
|
-
if (r(
|
|
1399
|
-
var U =
|
|
1418
|
+
var j = A[k], L = H(j);
|
|
1419
|
+
if (L !== "object")
|
|
1420
|
+
return new v("Invalid " + F + " `" + R + "` of type " + ("`" + L + "` supplied to `" + I + "`, expected an object."));
|
|
1421
|
+
for (var q in j)
|
|
1422
|
+
if (r(j, q)) {
|
|
1423
|
+
var U = w(j, q, I, F, R + "." + q, t);
|
|
1400
1424
|
if (U instanceof Error)
|
|
1401
1425
|
return U;
|
|
1402
1426
|
}
|
|
@@ -1404,49 +1428,49 @@ function sn() {
|
|
|
1404
1428
|
}
|
|
1405
1429
|
return b(M);
|
|
1406
1430
|
}
|
|
1407
|
-
function P(
|
|
1408
|
-
if (!Array.isArray(
|
|
1431
|
+
function P(w) {
|
|
1432
|
+
if (!Array.isArray(w))
|
|
1409
1433
|
return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), s;
|
|
1410
|
-
for (var M = 0; M <
|
|
1411
|
-
var A =
|
|
1434
|
+
for (var M = 0; M < w.length; M++) {
|
|
1435
|
+
var A = w[M];
|
|
1412
1436
|
if (typeof A != "function")
|
|
1413
1437
|
return o(
|
|
1414
1438
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ae(A) + " at index " + M + "."
|
|
1415
1439
|
), s;
|
|
1416
1440
|
}
|
|
1417
|
-
function
|
|
1418
|
-
for (var q = [], U = 0; U <
|
|
1419
|
-
var G =
|
|
1441
|
+
function k(I, F, R, j, L) {
|
|
1442
|
+
for (var q = [], U = 0; U < w.length; U++) {
|
|
1443
|
+
var G = w[U], _ = G(I, F, R, j, L, t);
|
|
1420
1444
|
if (_ == null)
|
|
1421
1445
|
return null;
|
|
1422
1446
|
_.data && r(_.data, "expectedType") && q.push(_.data.expectedType);
|
|
1423
1447
|
}
|
|
1424
1448
|
var te = q.length > 0 ? ", expected one of type [" + q.join(", ") + "]" : "";
|
|
1425
|
-
return new v("Invalid " +
|
|
1449
|
+
return new v("Invalid " + j + " `" + L + "` supplied to " + ("`" + R + "`" + te + "."));
|
|
1426
1450
|
}
|
|
1427
|
-
return b(
|
|
1451
|
+
return b(k);
|
|
1428
1452
|
}
|
|
1429
1453
|
function $() {
|
|
1430
|
-
function
|
|
1431
|
-
return X(M[A]) ? null : new v("Invalid " + I + " `" +
|
|
1454
|
+
function w(M, A, k, I, F) {
|
|
1455
|
+
return X(M[A]) ? null : new v("Invalid " + I + " `" + F + "` supplied to " + ("`" + k + "`, expected a ReactNode."));
|
|
1432
1456
|
}
|
|
1433
|
-
return b(
|
|
1457
|
+
return b(w);
|
|
1434
1458
|
}
|
|
1435
|
-
function O(
|
|
1459
|
+
function O(w, M, A, k, I) {
|
|
1436
1460
|
return new v(
|
|
1437
|
-
(
|
|
1461
|
+
(w || "React class") + ": " + M + " type `" + A + "." + k + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + I + "`."
|
|
1438
1462
|
);
|
|
1439
1463
|
}
|
|
1440
|
-
function E(
|
|
1441
|
-
function M(A,
|
|
1442
|
-
var
|
|
1443
|
-
if (
|
|
1444
|
-
return new v("Invalid " +
|
|
1445
|
-
for (var q in
|
|
1446
|
-
var U =
|
|
1464
|
+
function E(w) {
|
|
1465
|
+
function M(A, k, I, F, R) {
|
|
1466
|
+
var j = A[k], L = H(j);
|
|
1467
|
+
if (L !== "object")
|
|
1468
|
+
return new v("Invalid " + F + " `" + R + "` of type `" + L + "` " + ("supplied to `" + I + "`, expected `object`."));
|
|
1469
|
+
for (var q in w) {
|
|
1470
|
+
var U = w[q];
|
|
1447
1471
|
if (typeof U != "function")
|
|
1448
|
-
return O(I,
|
|
1449
|
-
var G = U(
|
|
1472
|
+
return O(I, F, R, q, ee(U));
|
|
1473
|
+
var G = U(j, q, I, F, R + "." + q, t);
|
|
1450
1474
|
if (G)
|
|
1451
1475
|
return G;
|
|
1452
1476
|
}
|
|
@@ -1454,22 +1478,22 @@ function sn() {
|
|
|
1454
1478
|
}
|
|
1455
1479
|
return b(M);
|
|
1456
1480
|
}
|
|
1457
|
-
function z(
|
|
1458
|
-
function M(A,
|
|
1459
|
-
var
|
|
1460
|
-
if (
|
|
1461
|
-
return new v("Invalid " +
|
|
1462
|
-
var q = n({}, A[
|
|
1481
|
+
function z(w) {
|
|
1482
|
+
function M(A, k, I, F, R) {
|
|
1483
|
+
var j = A[k], L = H(j);
|
|
1484
|
+
if (L !== "object")
|
|
1485
|
+
return new v("Invalid " + F + " `" + R + "` of type `" + L + "` " + ("supplied to `" + I + "`, expected `object`."));
|
|
1486
|
+
var q = n({}, A[k], w);
|
|
1463
1487
|
for (var U in q) {
|
|
1464
|
-
var G =
|
|
1465
|
-
if (r(
|
|
1466
|
-
return O(I,
|
|
1488
|
+
var G = w[U];
|
|
1489
|
+
if (r(w, U) && typeof G != "function")
|
|
1490
|
+
return O(I, F, R, U, ee(G));
|
|
1467
1491
|
if (!G)
|
|
1468
1492
|
return new v(
|
|
1469
|
-
"Invalid " +
|
|
1470
|
-
Valid keys: ` + JSON.stringify(Object.keys(
|
|
1493
|
+
"Invalid " + F + " `" + R + "` key `" + U + "` supplied to `" + I + "`.\nBad object: " + JSON.stringify(A[k], null, " ") + `
|
|
1494
|
+
Valid keys: ` + JSON.stringify(Object.keys(w), null, " ")
|
|
1471
1495
|
);
|
|
1472
|
-
var _ = G(
|
|
1496
|
+
var _ = G(j, U, I, F, R + "." + U, t);
|
|
1473
1497
|
if (_)
|
|
1474
1498
|
return _;
|
|
1475
1499
|
}
|
|
@@ -1477,29 +1501,29 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1477
1501
|
}
|
|
1478
1502
|
return b(M);
|
|
1479
1503
|
}
|
|
1480
|
-
function X(
|
|
1481
|
-
switch (typeof
|
|
1504
|
+
function X(w) {
|
|
1505
|
+
switch (typeof w) {
|
|
1482
1506
|
case "number":
|
|
1483
1507
|
case "string":
|
|
1484
1508
|
case "undefined":
|
|
1485
1509
|
return !0;
|
|
1486
1510
|
case "boolean":
|
|
1487
|
-
return !
|
|
1511
|
+
return !w;
|
|
1488
1512
|
case "object":
|
|
1489
|
-
if (Array.isArray(
|
|
1490
|
-
return
|
|
1491
|
-
if (
|
|
1513
|
+
if (Array.isArray(w))
|
|
1514
|
+
return w.every(X);
|
|
1515
|
+
if (w === null || d(w))
|
|
1492
1516
|
return !0;
|
|
1493
|
-
var M = u(
|
|
1517
|
+
var M = u(w);
|
|
1494
1518
|
if (M) {
|
|
1495
|
-
var A = M.call(
|
|
1496
|
-
if (M !==
|
|
1497
|
-
for (; !(
|
|
1498
|
-
if (!X(
|
|
1519
|
+
var A = M.call(w), k;
|
|
1520
|
+
if (M !== w.entries) {
|
|
1521
|
+
for (; !(k = A.next()).done; )
|
|
1522
|
+
if (!X(k.value))
|
|
1499
1523
|
return !1;
|
|
1500
1524
|
} else
|
|
1501
|
-
for (; !(
|
|
1502
|
-
var I =
|
|
1525
|
+
for (; !(k = A.next()).done; ) {
|
|
1526
|
+
var I = k.value;
|
|
1503
1527
|
if (I && !X(I[1]))
|
|
1504
1528
|
return !1;
|
|
1505
1529
|
}
|
|
@@ -1510,27 +1534,27 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1510
1534
|
return !1;
|
|
1511
1535
|
}
|
|
1512
1536
|
}
|
|
1513
|
-
function Q(
|
|
1514
|
-
return
|
|
1537
|
+
function Q(w, M) {
|
|
1538
|
+
return w === "symbol" ? !0 : M ? M["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && M instanceof Symbol : !1;
|
|
1515
1539
|
}
|
|
1516
|
-
function H(
|
|
1517
|
-
var M = typeof
|
|
1518
|
-
return Array.isArray(
|
|
1540
|
+
function H(w) {
|
|
1541
|
+
var M = typeof w;
|
|
1542
|
+
return Array.isArray(w) ? "array" : w instanceof RegExp ? "object" : Q(M, w) ? "symbol" : M;
|
|
1519
1543
|
}
|
|
1520
|
-
function ee(
|
|
1521
|
-
if (typeof
|
|
1522
|
-
return "" +
|
|
1523
|
-
var M = H(
|
|
1544
|
+
function ee(w) {
|
|
1545
|
+
if (typeof w > "u" || w === null)
|
|
1546
|
+
return "" + w;
|
|
1547
|
+
var M = H(w);
|
|
1524
1548
|
if (M === "object") {
|
|
1525
|
-
if (
|
|
1549
|
+
if (w instanceof Date)
|
|
1526
1550
|
return "date";
|
|
1527
|
-
if (
|
|
1551
|
+
if (w instanceof RegExp)
|
|
1528
1552
|
return "regexp";
|
|
1529
1553
|
}
|
|
1530
1554
|
return M;
|
|
1531
1555
|
}
|
|
1532
|
-
function ae(
|
|
1533
|
-
var M = ee(
|
|
1556
|
+
function ae(w) {
|
|
1557
|
+
var M = ee(w);
|
|
1534
1558
|
switch (M) {
|
|
1535
1559
|
case "array":
|
|
1536
1560
|
case "object":
|
|
@@ -1543,14 +1567,14 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1543
1567
|
return M;
|
|
1544
1568
|
}
|
|
1545
1569
|
}
|
|
1546
|
-
function de(
|
|
1547
|
-
return !
|
|
1570
|
+
function de(w) {
|
|
1571
|
+
return !w.constructor || !w.constructor.name ? m : w.constructor.name;
|
|
1548
1572
|
}
|
|
1549
|
-
return
|
|
1573
|
+
return y.checkPropTypes = i, y.resetWarningCache = i.resetWarningCache, y.PropTypes = y, y;
|
|
1550
1574
|
}, Me;
|
|
1551
1575
|
}
|
|
1552
1576
|
var Pe, Xe;
|
|
1553
|
-
function
|
|
1577
|
+
function dn() {
|
|
1554
1578
|
if (Xe) return Pe;
|
|
1555
1579
|
Xe = 1;
|
|
1556
1580
|
var e = /* @__PURE__ */ Oe();
|
|
@@ -1559,12 +1583,12 @@ function ln() {
|
|
|
1559
1583
|
function t() {
|
|
1560
1584
|
}
|
|
1561
1585
|
return t.resetWarningCache = n, Pe = function() {
|
|
1562
|
-
function r(s, d,
|
|
1586
|
+
function r(s, d, p, g, h, u) {
|
|
1563
1587
|
if (u !== e) {
|
|
1564
|
-
var
|
|
1588
|
+
var m = new Error(
|
|
1565
1589
|
"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"
|
|
1566
1590
|
);
|
|
1567
|
-
throw
|
|
1591
|
+
throw m.name = "Invariant Violation", m;
|
|
1568
1592
|
}
|
|
1569
1593
|
}
|
|
1570
1594
|
r.isRequired = r;
|
|
@@ -1598,18 +1622,18 @@ function ln() {
|
|
|
1598
1622
|
}, Pe;
|
|
1599
1623
|
}
|
|
1600
1624
|
var Ge;
|
|
1601
|
-
function
|
|
1602
|
-
if (Ge) return
|
|
1625
|
+
function vt() {
|
|
1626
|
+
if (Ge) return pe.exports;
|
|
1603
1627
|
if (Ge = 1, process.env.NODE_ENV !== "production") {
|
|
1604
|
-
var e =
|
|
1605
|
-
|
|
1628
|
+
var e = pt(), n = !0;
|
|
1629
|
+
pe.exports = /* @__PURE__ */ cn()(e.isElement, n);
|
|
1606
1630
|
} else
|
|
1607
|
-
|
|
1608
|
-
return
|
|
1631
|
+
pe.exports = /* @__PURE__ */ dn()();
|
|
1632
|
+
return pe.exports;
|
|
1609
1633
|
}
|
|
1610
|
-
var
|
|
1611
|
-
function
|
|
1612
|
-
if (Ze) return
|
|
1634
|
+
var ve = { exports: {} }, Ze;
|
|
1635
|
+
function un() {
|
|
1636
|
+
if (Ze) return ve.exports;
|
|
1613
1637
|
Ze = 1;
|
|
1614
1638
|
function e(t) {
|
|
1615
1639
|
var r, i, o = "";
|
|
@@ -1624,16 +1648,16 @@ function cn() {
|
|
|
1624
1648
|
for (var t, r, i = 0, o = "", s = arguments.length; i < s; i++) (t = arguments[i]) && (r = e(t)) && (o && (o += " "), o += r);
|
|
1625
1649
|
return o;
|
|
1626
1650
|
}
|
|
1627
|
-
return
|
|
1651
|
+
return ve.exports = n, ve.exports.clsx = n, ve.exports;
|
|
1628
1652
|
}
|
|
1629
1653
|
var B = {}, oe = {}, Je;
|
|
1630
|
-
function
|
|
1654
|
+
function xe() {
|
|
1631
1655
|
if (Je) return oe;
|
|
1632
1656
|
Je = 1, Object.defineProperty(oe, "__esModule", {
|
|
1633
1657
|
value: !0
|
|
1634
1658
|
}), oe.dontSetMe = i, oe.findInArray = e, oe.int = r, oe.isFunction = n, oe.isNum = t;
|
|
1635
1659
|
function e(o, s) {
|
|
1636
|
-
for (let d = 0,
|
|
1660
|
+
for (let d = 0, p = o.length; d < p; d++)
|
|
1637
1661
|
if (s.apply(s, [o[d], d, o])) return o[d];
|
|
1638
1662
|
}
|
|
1639
1663
|
function n(o) {
|
|
@@ -1652,7 +1676,7 @@ function we() {
|
|
|
1652
1676
|
return oe;
|
|
1653
1677
|
}
|
|
1654
1678
|
var ie = {}, Qe;
|
|
1655
|
-
function
|
|
1679
|
+
function fn() {
|
|
1656
1680
|
if (Qe) return ie;
|
|
1657
1681
|
Qe = 1, Object.defineProperty(ie, "__esModule", {
|
|
1658
1682
|
value: !0
|
|
@@ -1675,8 +1699,8 @@ function dn() {
|
|
|
1675
1699
|
}
|
|
1676
1700
|
function i(o) {
|
|
1677
1701
|
let s = "", d = !0;
|
|
1678
|
-
for (let
|
|
1679
|
-
d ? (s += o[
|
|
1702
|
+
for (let p = 0; p < o.length; p++)
|
|
1703
|
+
d ? (s += o[p].toUpperCase(), d = !1) : o[p] === "-" ? d = !0 : s += o[p];
|
|
1680
1704
|
return s;
|
|
1681
1705
|
}
|
|
1682
1706
|
return ie.default = n(), ie;
|
|
@@ -1686,8 +1710,8 @@ function Re() {
|
|
|
1686
1710
|
if (et) return B;
|
|
1687
1711
|
et = 1, Object.defineProperty(B, "__esModule", {
|
|
1688
1712
|
value: !0
|
|
1689
|
-
}), B.addClassName = c, B.addEvent = s, B.addUserSelectStyles = T, B.createCSSTransform =
|
|
1690
|
-
var e =
|
|
1713
|
+
}), B.addClassName = c, B.addEvent = s, B.addUserSelectStyles = T, B.createCSSTransform = y, B.createSVGTransform = x, B.getTouch = b, B.getTouchIdentifier = C, B.getTranslation = v, B.innerHeight = h, B.innerWidth = u, B.matchesSelector = i, B.matchesSelectorAndParentsTo = o, B.offsetXYFromParent = m, B.outerHeight = p, B.outerWidth = g, B.removeClassName = N, B.removeEvent = d, B.scheduleRemoveUserSelectStyles = S;
|
|
1714
|
+
var e = xe(), n = t(fn());
|
|
1691
1715
|
function t(l, f) {
|
|
1692
1716
|
if (typeof WeakMap == "function") var P = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakMap();
|
|
1693
1717
|
return (t = function(O, E) {
|
|
@@ -1733,12 +1757,12 @@ function Re() {
|
|
|
1733
1757
|
};
|
|
1734
1758
|
l.removeEventListener ? l.removeEventListener(f, P, O) : l.detachEvent ? l.detachEvent("on" + f, P) : l["on" + f] = null;
|
|
1735
1759
|
}
|
|
1736
|
-
function
|
|
1760
|
+
function p(l) {
|
|
1737
1761
|
let f = l.clientHeight;
|
|
1738
1762
|
const P = l.ownerDocument.defaultView.getComputedStyle(l);
|
|
1739
1763
|
return f += (0, e.int)(P.borderTopWidth), f += (0, e.int)(P.borderBottomWidth), f;
|
|
1740
1764
|
}
|
|
1741
|
-
function
|
|
1765
|
+
function g(l) {
|
|
1742
1766
|
let f = l.clientWidth;
|
|
1743
1767
|
const P = l.ownerDocument.defaultView.getComputedStyle(l);
|
|
1744
1768
|
return f += (0, e.int)(P.borderLeftWidth), f += (0, e.int)(P.borderRightWidth), f;
|
|
@@ -1753,7 +1777,7 @@ function Re() {
|
|
|
1753
1777
|
const P = l.ownerDocument.defaultView.getComputedStyle(l);
|
|
1754
1778
|
return f -= (0, e.int)(P.paddingLeft), f -= (0, e.int)(P.paddingRight), f;
|
|
1755
1779
|
}
|
|
1756
|
-
function
|
|
1780
|
+
function m(l, f, P) {
|
|
1757
1781
|
const O = f === f.ownerDocument.body ? {
|
|
1758
1782
|
left: 0,
|
|
1759
1783
|
top: 0
|
|
@@ -1763,13 +1787,13 @@ function Re() {
|
|
|
1763
1787
|
y: z
|
|
1764
1788
|
};
|
|
1765
1789
|
}
|
|
1766
|
-
function
|
|
1790
|
+
function y(l, f) {
|
|
1767
1791
|
const P = v(l, f, "px");
|
|
1768
1792
|
return {
|
|
1769
1793
|
[(0, n.browserPrefixToKey)("transform", n.default)]: P
|
|
1770
1794
|
};
|
|
1771
1795
|
}
|
|
1772
|
-
function
|
|
1796
|
+
function x(l, f) {
|
|
1773
1797
|
return v(l, f, "");
|
|
1774
1798
|
}
|
|
1775
1799
|
function v(l, f, P) {
|
|
@@ -1823,39 +1847,39 @@ function Re() {
|
|
|
1823
1847
|
return B;
|
|
1824
1848
|
}
|
|
1825
1849
|
var ne = {}, tt;
|
|
1826
|
-
function
|
|
1850
|
+
function bt() {
|
|
1827
1851
|
if (tt) return ne;
|
|
1828
1852
|
tt = 1, Object.defineProperty(ne, "__esModule", {
|
|
1829
1853
|
value: !0
|
|
1830
|
-
}), ne.canDragX = i, ne.canDragY = o, ne.createCoreData = d, ne.createDraggableData =
|
|
1831
|
-
var e =
|
|
1832
|
-
function t(u,
|
|
1833
|
-
if (!u.props.bounds) return [
|
|
1854
|
+
}), ne.canDragX = i, ne.canDragY = o, ne.createCoreData = d, ne.createDraggableData = p, ne.getBoundPosition = t, ne.getControlPosition = s, ne.snapToGrid = r;
|
|
1855
|
+
var e = xe(), n = Re();
|
|
1856
|
+
function t(u, m, y) {
|
|
1857
|
+
if (!u.props.bounds) return [m, y];
|
|
1834
1858
|
let {
|
|
1835
|
-
bounds:
|
|
1859
|
+
bounds: x
|
|
1836
1860
|
} = u.props;
|
|
1837
|
-
|
|
1861
|
+
x = typeof x == "string" ? x : g(x);
|
|
1838
1862
|
const v = h(u);
|
|
1839
|
-
if (typeof
|
|
1863
|
+
if (typeof x == "string") {
|
|
1840
1864
|
const {
|
|
1841
1865
|
ownerDocument: b
|
|
1842
1866
|
} = v, C = b.defaultView;
|
|
1843
1867
|
let T;
|
|
1844
|
-
if (
|
|
1845
|
-
throw new Error('Bounds selector "' +
|
|
1868
|
+
if (x === "parent" ? T = v.parentNode : T = v.getRootNode().querySelector(x), !(T instanceof C.HTMLElement))
|
|
1869
|
+
throw new Error('Bounds selector "' + x + '" could not find an element.');
|
|
1846
1870
|
const S = T, D = C.getComputedStyle(v), c = C.getComputedStyle(S);
|
|
1847
|
-
|
|
1871
|
+
x = {
|
|
1848
1872
|
left: -v.offsetLeft + (0, e.int)(c.paddingLeft) + (0, e.int)(D.marginLeft),
|
|
1849
1873
|
top: -v.offsetTop + (0, e.int)(c.paddingTop) + (0, e.int)(D.marginTop),
|
|
1850
1874
|
right: (0, n.innerWidth)(S) - (0, n.outerWidth)(v) - v.offsetLeft + (0, e.int)(c.paddingRight) - (0, e.int)(D.marginRight),
|
|
1851
1875
|
bottom: (0, n.innerHeight)(S) - (0, n.outerHeight)(v) - v.offsetTop + (0, e.int)(c.paddingBottom) - (0, e.int)(D.marginBottom)
|
|
1852
1876
|
};
|
|
1853
1877
|
}
|
|
1854
|
-
return (0, e.isNum)(
|
|
1878
|
+
return (0, e.isNum)(x.right) && (m = Math.min(m, x.right)), (0, e.isNum)(x.bottom) && (y = Math.min(y, x.bottom)), (0, e.isNum)(x.left) && (m = Math.max(m, x.left)), (0, e.isNum)(x.top) && (y = Math.max(y, x.top)), [m, y];
|
|
1855
1879
|
}
|
|
1856
|
-
function r(u,
|
|
1857
|
-
const
|
|
1858
|
-
return [
|
|
1880
|
+
function r(u, m, y) {
|
|
1881
|
+
const x = Math.round(m / u[0]) * u[0], v = Math.round(y / u[1]) * u[1];
|
|
1882
|
+
return [x, v];
|
|
1859
1883
|
}
|
|
1860
1884
|
function i(u) {
|
|
1861
1885
|
return u.props.axis === "both" || u.props.axis === "x";
|
|
@@ -1863,45 +1887,45 @@ function vt() {
|
|
|
1863
1887
|
function o(u) {
|
|
1864
1888
|
return u.props.axis === "both" || u.props.axis === "y";
|
|
1865
1889
|
}
|
|
1866
|
-
function s(u,
|
|
1867
|
-
const
|
|
1868
|
-
if (typeof
|
|
1869
|
-
const v = h(
|
|
1870
|
-
return (0, n.offsetXYFromParent)(
|
|
1890
|
+
function s(u, m, y) {
|
|
1891
|
+
const x = typeof m == "number" ? (0, n.getTouch)(u, m) : null;
|
|
1892
|
+
if (typeof m == "number" && !x) return null;
|
|
1893
|
+
const v = h(y), b = y.props.offsetParent || v.offsetParent || v.ownerDocument.body;
|
|
1894
|
+
return (0, n.offsetXYFromParent)(x || u, b, y.props.scale);
|
|
1871
1895
|
}
|
|
1872
|
-
function d(u,
|
|
1873
|
-
const
|
|
1874
|
-
return
|
|
1896
|
+
function d(u, m, y) {
|
|
1897
|
+
const x = !(0, e.isNum)(u.lastX), v = h(u);
|
|
1898
|
+
return x ? {
|
|
1875
1899
|
node: v,
|
|
1876
1900
|
deltaX: 0,
|
|
1877
1901
|
deltaY: 0,
|
|
1878
|
-
lastX:
|
|
1879
|
-
lastY:
|
|
1880
|
-
x:
|
|
1881
|
-
y
|
|
1902
|
+
lastX: m,
|
|
1903
|
+
lastY: y,
|
|
1904
|
+
x: m,
|
|
1905
|
+
y
|
|
1882
1906
|
} : {
|
|
1883
1907
|
node: v,
|
|
1884
|
-
deltaX:
|
|
1885
|
-
deltaY:
|
|
1908
|
+
deltaX: m - u.lastX,
|
|
1909
|
+
deltaY: y - u.lastY,
|
|
1886
1910
|
lastX: u.lastX,
|
|
1887
1911
|
lastY: u.lastY,
|
|
1888
|
-
x:
|
|
1889
|
-
y
|
|
1912
|
+
x: m,
|
|
1913
|
+
y
|
|
1890
1914
|
};
|
|
1891
1915
|
}
|
|
1892
|
-
function
|
|
1893
|
-
const
|
|
1916
|
+
function p(u, m) {
|
|
1917
|
+
const y = u.props.scale;
|
|
1894
1918
|
return {
|
|
1895
|
-
node:
|
|
1896
|
-
x: u.state.x +
|
|
1897
|
-
y: u.state.y +
|
|
1898
|
-
deltaX:
|
|
1899
|
-
deltaY:
|
|
1919
|
+
node: m.node,
|
|
1920
|
+
x: u.state.x + m.deltaX / y,
|
|
1921
|
+
y: u.state.y + m.deltaY / y,
|
|
1922
|
+
deltaX: m.deltaX / y,
|
|
1923
|
+
deltaY: m.deltaY / y,
|
|
1900
1924
|
lastX: u.state.x,
|
|
1901
1925
|
lastY: u.state.y
|
|
1902
1926
|
};
|
|
1903
1927
|
}
|
|
1904
|
-
function
|
|
1928
|
+
function g(u) {
|
|
1905
1929
|
return {
|
|
1906
1930
|
left: u.left,
|
|
1907
1931
|
top: u.top,
|
|
@@ -1910,36 +1934,36 @@ function vt() {
|
|
|
1910
1934
|
};
|
|
1911
1935
|
}
|
|
1912
1936
|
function h(u) {
|
|
1913
|
-
const
|
|
1914
|
-
if (!
|
|
1937
|
+
const m = u.findDOMNode();
|
|
1938
|
+
if (!m)
|
|
1915
1939
|
throw new Error("<DraggableCore>: Unmounted during event!");
|
|
1916
|
-
return
|
|
1940
|
+
return m;
|
|
1917
1941
|
}
|
|
1918
1942
|
return ne;
|
|
1919
1943
|
}
|
|
1920
|
-
var he = {},
|
|
1921
|
-
function
|
|
1922
|
-
if (nt) return
|
|
1923
|
-
nt = 1, Object.defineProperty(
|
|
1944
|
+
var he = {}, be = {}, nt;
|
|
1945
|
+
function wt() {
|
|
1946
|
+
if (nt) return be;
|
|
1947
|
+
nt = 1, Object.defineProperty(be, "__esModule", {
|
|
1924
1948
|
value: !0
|
|
1925
|
-
}),
|
|
1949
|
+
}), be.default = e;
|
|
1926
1950
|
function e() {
|
|
1927
1951
|
}
|
|
1928
|
-
return
|
|
1952
|
+
return be;
|
|
1929
1953
|
}
|
|
1930
1954
|
var rt;
|
|
1931
|
-
function
|
|
1955
|
+
function hn() {
|
|
1932
1956
|
if (rt) return he;
|
|
1933
1957
|
rt = 1, Object.defineProperty(he, "__esModule", {
|
|
1934
1958
|
value: !0
|
|
1935
1959
|
}), he.default = void 0;
|
|
1936
|
-
var e =
|
|
1960
|
+
var e = p(se), n = d(/* @__PURE__ */ vt()), t = d(st), r = Re(), i = bt(), o = xe(), s = d(wt());
|
|
1937
1961
|
function d(v) {
|
|
1938
1962
|
return v && v.__esModule ? v : { default: v };
|
|
1939
1963
|
}
|
|
1940
|
-
function
|
|
1964
|
+
function p(v, b) {
|
|
1941
1965
|
if (typeof WeakMap == "function") var C = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap();
|
|
1942
|
-
return (
|
|
1966
|
+
return (p = function(S, D) {
|
|
1943
1967
|
if (!D && S && S.__esModule) return S;
|
|
1944
1968
|
var c, N, l = { __proto__: null, default: S };
|
|
1945
1969
|
if (S === null || typeof S != "object" && typeof S != "function") return l;
|
|
@@ -1951,7 +1975,7 @@ function un() {
|
|
|
1951
1975
|
return l;
|
|
1952
1976
|
})(v, b);
|
|
1953
1977
|
}
|
|
1954
|
-
function
|
|
1978
|
+
function g(v, b, C) {
|
|
1955
1979
|
return (b = h(b)) in v ? Object.defineProperty(v, b, { value: C, enumerable: !0, configurable: !0, writable: !0 }) : v[b] = C, v;
|
|
1956
1980
|
}
|
|
1957
1981
|
function h(v) {
|
|
@@ -1968,7 +1992,7 @@ function un() {
|
|
|
1968
1992
|
}
|
|
1969
1993
|
return (b === "string" ? String : Number)(v);
|
|
1970
1994
|
}
|
|
1971
|
-
const
|
|
1995
|
+
const m = {
|
|
1972
1996
|
touch: {
|
|
1973
1997
|
start: "touchstart",
|
|
1974
1998
|
move: "touchmove",
|
|
@@ -1980,9 +2004,9 @@ function un() {
|
|
|
1980
2004
|
stop: "mouseup"
|
|
1981
2005
|
}
|
|
1982
2006
|
};
|
|
1983
|
-
let
|
|
2007
|
+
let y = m.mouse, x = class extends e.Component {
|
|
1984
2008
|
constructor() {
|
|
1985
|
-
super(...arguments),
|
|
2009
|
+
super(...arguments), g(this, "dragging", !1), g(this, "lastX", NaN), g(this, "lastY", NaN), g(this, "touchIdentifier", null), g(this, "mounted", !1), g(this, "handleDragStart", (b) => {
|
|
1986
2010
|
if (this.props.onMouseDown(b), !this.props.allowAnyClick && typeof b.button == "number" && b.button !== 0) return !1;
|
|
1987
2011
|
const C = this.findDOMNode();
|
|
1988
2012
|
if (!C || !C.ownerDocument || !C.ownerDocument.body)
|
|
@@ -2001,8 +2025,8 @@ function un() {
|
|
|
2001
2025
|
x: c,
|
|
2002
2026
|
y: N
|
|
2003
2027
|
} = D, l = (0, i.createCoreData)(this, c, N);
|
|
2004
|
-
(0, s.default)("DraggableCore: handleDragStart: %j", l), (0, s.default)("calling", this.props.onStart), !(this.props.onStart(b, l) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, r.addUserSelectStyles)(T), this.dragging = !0, this.lastX = c, this.lastY = N, (0, r.addEvent)(T,
|
|
2005
|
-
}),
|
|
2028
|
+
(0, s.default)("DraggableCore: handleDragStart: %j", l), (0, s.default)("calling", this.props.onStart), !(this.props.onStart(b, l) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, r.addUserSelectStyles)(T), this.dragging = !0, this.lastX = c, this.lastY = N, (0, r.addEvent)(T, y.move, this.handleDrag), (0, r.addEvent)(T, y.stop, this.handleDragStop));
|
|
2029
|
+
}), g(this, "handleDrag", (b) => {
|
|
2006
2030
|
const C = (0, i.getControlPosition)(b, this.touchIdentifier, this);
|
|
2007
2031
|
if (C == null) return;
|
|
2008
2032
|
let {
|
|
@@ -2025,7 +2049,7 @@ function un() {
|
|
|
2025
2049
|
return;
|
|
2026
2050
|
}
|
|
2027
2051
|
this.lastX = T, this.lastY = S;
|
|
2028
|
-
}),
|
|
2052
|
+
}), g(this, "handleDragStop", (b) => {
|
|
2029
2053
|
if (!this.dragging) return;
|
|
2030
2054
|
const C = (0, i.getControlPosition)(b, this.touchIdentifier, this);
|
|
2031
2055
|
if (C == null) return;
|
|
@@ -2040,13 +2064,13 @@ function un() {
|
|
|
2040
2064
|
const D = (0, i.createCoreData)(this, T, S);
|
|
2041
2065
|
if (this.props.onStop(b, D) === !1 || this.mounted === !1) return !1;
|
|
2042
2066
|
const N = this.findDOMNode();
|
|
2043
|
-
N && this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(N.ownerDocument), (0, s.default)("DraggableCore: handleDragStop: %j", D), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, N && ((0, s.default)("DraggableCore: Removing handlers"), (0, r.removeEvent)(N.ownerDocument,
|
|
2044
|
-
}),
|
|
2067
|
+
N && this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(N.ownerDocument), (0, s.default)("DraggableCore: handleDragStop: %j", D), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, N && ((0, s.default)("DraggableCore: Removing handlers"), (0, r.removeEvent)(N.ownerDocument, y.move, this.handleDrag), (0, r.removeEvent)(N.ownerDocument, y.stop, this.handleDragStop));
|
|
2068
|
+
}), g(this, "onMouseDown", (b) => (y = m.mouse, this.handleDragStart(b))), g(this, "onMouseUp", (b) => (y = m.mouse, this.handleDragStop(b))), g(this, "onTouchStart", (b) => (y = m.touch, this.handleDragStart(b))), g(this, "onTouchEnd", (b) => (y = m.touch, this.handleDragStop(b)));
|
|
2045
2069
|
}
|
|
2046
2070
|
componentDidMount() {
|
|
2047
2071
|
this.mounted = !0;
|
|
2048
2072
|
const b = this.findDOMNode();
|
|
2049
|
-
b && (0, r.addEvent)(b,
|
|
2073
|
+
b && (0, r.addEvent)(b, m.touch.start, this.onTouchStart, {
|
|
2050
2074
|
passive: !1
|
|
2051
2075
|
});
|
|
2052
2076
|
}
|
|
@@ -2057,7 +2081,7 @@ function un() {
|
|
|
2057
2081
|
const {
|
|
2058
2082
|
ownerDocument: C
|
|
2059
2083
|
} = b;
|
|
2060
|
-
(0, r.removeEvent)(C,
|
|
2084
|
+
(0, r.removeEvent)(C, m.mouse.move, this.handleDrag), (0, r.removeEvent)(C, m.touch.move, this.handleDrag), (0, r.removeEvent)(C, m.mouse.stop, this.handleDragStop), (0, r.removeEvent)(C, m.touch.stop, this.handleDragStop), (0, r.removeEvent)(b, m.touch.start, this.onTouchStart, {
|
|
2061
2085
|
passive: !1
|
|
2062
2086
|
}), this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(C);
|
|
2063
2087
|
}
|
|
@@ -2080,7 +2104,7 @@ function un() {
|
|
|
2080
2104
|
});
|
|
2081
2105
|
}
|
|
2082
2106
|
};
|
|
2083
|
-
return he.default =
|
|
2107
|
+
return he.default = x, g(x, "displayName", "DraggableCore"), g(x, "propTypes", {
|
|
2084
2108
|
/**
|
|
2085
2109
|
* `allowAnyClick` allows dragging using any mouse button.
|
|
2086
2110
|
* By default, we only accept the left button.
|
|
@@ -2210,7 +2234,7 @@ function un() {
|
|
|
2210
2234
|
className: o.dontSetMe,
|
|
2211
2235
|
style: o.dontSetMe,
|
|
2212
2236
|
transform: o.dontSetMe
|
|
2213
|
-
}),
|
|
2237
|
+
}), g(x, "defaultProps", {
|
|
2214
2238
|
allowAnyClick: !1,
|
|
2215
2239
|
// by default only accept left click
|
|
2216
2240
|
allowMobileScroll: !1,
|
|
@@ -2228,17 +2252,17 @@ function un() {
|
|
|
2228
2252
|
}), he;
|
|
2229
2253
|
}
|
|
2230
2254
|
var ot;
|
|
2231
|
-
function
|
|
2255
|
+
function gn() {
|
|
2232
2256
|
return ot || (ot = 1, (function(e) {
|
|
2233
2257
|
Object.defineProperty(e, "__esModule", {
|
|
2234
2258
|
value: !0
|
|
2235
2259
|
}), Object.defineProperty(e, "DraggableCore", {
|
|
2236
2260
|
enumerable: !0,
|
|
2237
2261
|
get: function() {
|
|
2238
|
-
return
|
|
2262
|
+
return p.default;
|
|
2239
2263
|
}
|
|
2240
2264
|
}), e.default = void 0;
|
|
2241
|
-
var n = u(se), t = h(/* @__PURE__ */
|
|
2265
|
+
var n = u(se), t = h(/* @__PURE__ */ vt()), r = h(st), i = un(), o = Re(), s = bt(), d = xe(), p = h(hn()), g = h(wt());
|
|
2242
2266
|
function h(C) {
|
|
2243
2267
|
return C && C.__esModule ? C : { default: C };
|
|
2244
2268
|
}
|
|
@@ -2256,19 +2280,19 @@ function fn() {
|
|
|
2256
2280
|
return P;
|
|
2257
2281
|
})(C, T);
|
|
2258
2282
|
}
|
|
2259
|
-
function
|
|
2260
|
-
return
|
|
2283
|
+
function m() {
|
|
2284
|
+
return m = Object.assign ? Object.assign.bind() : function(C) {
|
|
2261
2285
|
for (var T = 1; T < arguments.length; T++) {
|
|
2262
2286
|
var S = arguments[T];
|
|
2263
2287
|
for (var D in S) ({}).hasOwnProperty.call(S, D) && (C[D] = S[D]);
|
|
2264
2288
|
}
|
|
2265
2289
|
return C;
|
|
2266
|
-
},
|
|
2290
|
+
}, m.apply(null, arguments);
|
|
2267
2291
|
}
|
|
2268
|
-
function
|
|
2269
|
-
return (T =
|
|
2292
|
+
function y(C, T, S) {
|
|
2293
|
+
return (T = x(T)) in C ? Object.defineProperty(C, T, { value: S, enumerable: !0, configurable: !0, writable: !0 }) : C[T] = S, C;
|
|
2270
2294
|
}
|
|
2271
|
-
function
|
|
2295
|
+
function x(C) {
|
|
2272
2296
|
var T = v(C, "string");
|
|
2273
2297
|
return typeof T == "symbol" ? T : T + "";
|
|
2274
2298
|
}
|
|
@@ -2291,7 +2315,7 @@ function fn() {
|
|
|
2291
2315
|
} = T, {
|
|
2292
2316
|
prevPropsPosition: c
|
|
2293
2317
|
} = S;
|
|
2294
|
-
return D && (!c || D.x !== c.x || D.y !== c.y) ? ((0,
|
|
2318
|
+
return D && (!c || D.x !== c.x || D.y !== c.y) ? ((0, g.default)("Draggable: getDerivedStateFromProps %j", {
|
|
2295
2319
|
position: D,
|
|
2296
2320
|
prevPropsPosition: c
|
|
2297
2321
|
}), {
|
|
@@ -2303,15 +2327,15 @@ function fn() {
|
|
|
2303
2327
|
}) : null;
|
|
2304
2328
|
}
|
|
2305
2329
|
constructor(T) {
|
|
2306
|
-
super(T),
|
|
2307
|
-
if ((0,
|
|
2330
|
+
super(T), y(this, "onDragStart", (S, D) => {
|
|
2331
|
+
if ((0, g.default)("Draggable: onDragStart: %j", D), this.props.onStart(S, (0, s.createDraggableData)(this, D)) === !1) return !1;
|
|
2308
2332
|
this.setState({
|
|
2309
2333
|
dragging: !0,
|
|
2310
2334
|
dragged: !0
|
|
2311
2335
|
});
|
|
2312
|
-
}),
|
|
2336
|
+
}), y(this, "onDrag", (S, D) => {
|
|
2313
2337
|
if (!this.state.dragging) return !1;
|
|
2314
|
-
(0,
|
|
2338
|
+
(0, g.default)("Draggable: onDrag: %j", D);
|
|
2315
2339
|
const c = (0, s.createDraggableData)(this, D), N = {
|
|
2316
2340
|
x: c.x,
|
|
2317
2341
|
y: c.y,
|
|
@@ -2329,9 +2353,9 @@ function fn() {
|
|
|
2329
2353
|
}
|
|
2330
2354
|
if (this.props.onDrag(S, c) === !1) return !1;
|
|
2331
2355
|
this.setState(N);
|
|
2332
|
-
}),
|
|
2356
|
+
}), y(this, "onDragStop", (S, D) => {
|
|
2333
2357
|
if (!this.state.dragging || this.props.onStop(S, (0, s.createDraggableData)(this, D)) === !1) return !1;
|
|
2334
|
-
(0,
|
|
2358
|
+
(0, g.default)("Draggable: onDragStop: %j", D);
|
|
2335
2359
|
const N = {
|
|
2336
2360
|
dragging: !1,
|
|
2337
2361
|
slackX: 0,
|
|
@@ -2404,7 +2428,7 @@ function fn() {
|
|
|
2404
2428
|
[l]: this.state.dragging,
|
|
2405
2429
|
[f]: this.state.dragged
|
|
2406
2430
|
});
|
|
2407
|
-
return /* @__PURE__ */ n.createElement(
|
|
2431
|
+
return /* @__PURE__ */ n.createElement(p.default, m({}, E, {
|
|
2408
2432
|
onStart: this.onDragStart,
|
|
2409
2433
|
onDrag: this.onDrag,
|
|
2410
2434
|
onStop: this.onDragStop
|
|
@@ -2418,9 +2442,9 @@ function fn() {
|
|
|
2418
2442
|
}));
|
|
2419
2443
|
}
|
|
2420
2444
|
}
|
|
2421
|
-
e.default = b,
|
|
2445
|
+
e.default = b, y(b, "displayName", "Draggable"), y(b, "propTypes", {
|
|
2422
2446
|
// Accepts all props <DraggableCore> accepts.
|
|
2423
|
-
...
|
|
2447
|
+
...p.default.propTypes,
|
|
2424
2448
|
/**
|
|
2425
2449
|
* `axis` determines which axis the draggable can move.
|
|
2426
2450
|
*
|
|
@@ -2525,8 +2549,8 @@ function fn() {
|
|
|
2525
2549
|
className: d.dontSetMe,
|
|
2526
2550
|
style: d.dontSetMe,
|
|
2527
2551
|
transform: d.dontSetMe
|
|
2528
|
-
}),
|
|
2529
|
-
...
|
|
2552
|
+
}), y(b, "defaultProps", {
|
|
2553
|
+
...p.default.defaultProps,
|
|
2530
2554
|
axis: "both",
|
|
2531
2555
|
bounds: !1,
|
|
2532
2556
|
defaultClassName: "react-draggable",
|
|
@@ -2541,17 +2565,17 @@ function fn() {
|
|
|
2541
2565
|
})(De)), De;
|
|
2542
2566
|
}
|
|
2543
2567
|
var it;
|
|
2544
|
-
function
|
|
2568
|
+
function mn() {
|
|
2545
2569
|
if (it) return fe.exports;
|
|
2546
2570
|
it = 1;
|
|
2547
2571
|
const {
|
|
2548
2572
|
default: e,
|
|
2549
2573
|
DraggableCore: n
|
|
2550
|
-
} =
|
|
2574
|
+
} = gn();
|
|
2551
2575
|
return fe.exports = e, fe.exports.default = e, fe.exports.DraggableCore = n, fe.exports;
|
|
2552
2576
|
}
|
|
2553
|
-
var
|
|
2554
|
-
const
|
|
2577
|
+
var pn = mn();
|
|
2578
|
+
const yn = /* @__PURE__ */ rn(pn), vn = le((e, n) => {
|
|
2555
2579
|
const r = {
|
|
2556
2580
|
...{
|
|
2557
2581
|
// 1. Take it out of the document flow
|
|
@@ -2573,16 +2597,16 @@ const mn = /* @__PURE__ */ tn(gn), pn = le((e, n) => {
|
|
|
2573
2597
|
return (
|
|
2574
2598
|
// 3. Pass the internal ref to the Draggable component via 'nodeRef'
|
|
2575
2599
|
/* @__PURE__ */ a(
|
|
2576
|
-
|
|
2600
|
+
yn,
|
|
2577
2601
|
{
|
|
2578
2602
|
nodeRef: s,
|
|
2579
2603
|
"data-testid": i,
|
|
2580
2604
|
axis: "both",
|
|
2581
2605
|
handle: ".handle",
|
|
2582
|
-
onStart: (
|
|
2606
|
+
onStart: (g, h) => {
|
|
2583
2607
|
e.onDraggingChange?.(!0);
|
|
2584
2608
|
},
|
|
2585
|
-
onStop: (
|
|
2609
|
+
onStop: (g, h) => {
|
|
2586
2610
|
setTimeout(() => {
|
|
2587
2611
|
e.onDraggingChange?.(!1);
|
|
2588
2612
|
}, 100);
|
|
@@ -2592,7 +2616,7 @@ const mn = /* @__PURE__ */ tn(gn), pn = le((e, n) => {
|
|
|
2592
2616
|
)
|
|
2593
2617
|
);
|
|
2594
2618
|
});
|
|
2595
|
-
function
|
|
2619
|
+
function er({ children: e }) {
|
|
2596
2620
|
return /* @__PURE__ */ a(
|
|
2597
2621
|
"div",
|
|
2598
2622
|
{
|
|
@@ -2604,16 +2628,16 @@ function Jn({ children: e }) {
|
|
|
2604
2628
|
}
|
|
2605
2629
|
);
|
|
2606
2630
|
}
|
|
2607
|
-
function
|
|
2631
|
+
function tr({ children: e }) {
|
|
2608
2632
|
return /* @__PURE__ */ a("div", { className: "w-full flex flex-col items-end", children: e });
|
|
2609
2633
|
}
|
|
2610
|
-
const
|
|
2634
|
+
const nr = (e) => {
|
|
2611
2635
|
console.warn("showToast TODO", e);
|
|
2612
|
-
},
|
|
2636
|
+
}, bn = (e) => e < 0.8 ? 1 : e <= 1 ? 0 : e > 1 ? -1 : 0, rr = le((e, n) => {
|
|
2613
2637
|
let t = lt(Number(e.zoomScale || 0));
|
|
2614
2638
|
const r = e.responsiveGrid || !1, i = e.isEditing || !1, o = {
|
|
2615
2639
|
"--bwj-dashboard-transform-scale": t,
|
|
2616
|
-
"--bwj-dashboard-add-cols":
|
|
2640
|
+
"--bwj-dashboard-add-cols": bn(t)
|
|
2617
2641
|
}, s = Z(
|
|
2618
2642
|
"dashboard-main-grid w-full",
|
|
2619
2643
|
i ? "editing" : "",
|
|
@@ -2622,14 +2646,14 @@ const er = (e) => {
|
|
|
2622
2646
|
"border border-solid border-primary"
|
|
2623
2647
|
);
|
|
2624
2648
|
return /* @__PURE__ */ a("div", { className: s, style: o, children: e.children });
|
|
2625
|
-
}), $e = "size-5",
|
|
2649
|
+
}), $e = "size-5", wn = (e, n) => {
|
|
2626
2650
|
const t = e.hideTitle && !e.isEditing, r = e.noBorder;
|
|
2627
2651
|
let i = `dashboard-widget ${e.isEditing ? "editing" : ""} border border-solid`;
|
|
2628
2652
|
r ? i = `${i} border-transparent border-opacity-0` : (e.borderCssClasses || "").trim().length > 0 ? i = `${i} ${e.borderCssClasses}` : i = `${i} border-card-invert border-opacity-20`, e.noShadow && (i = `${i} no-shadow`), e.noPadding && (i = `${i} no-padding p-0`), (e.backgroundCssClasses || "").trim().length > 0 ? i = `${i} ${e.backgroundCssClasses}` : i = `${i} bg-card content-card`, ["large", "xlarge"].indexOf(e.size || "") > -1 && (i = `${i} ${e.size}-widget`);
|
|
2629
2653
|
const o = () => {
|
|
2630
2654
|
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey, e.parentWidgetKey);
|
|
2631
|
-
}, s = (
|
|
2632
|
-
e.onMoveClick && e.widgetKey && e.onMoveClick(
|
|
2655
|
+
}, s = (p) => {
|
|
2656
|
+
e.onMoveClick && e.widgetKey && e.onMoveClick(p, e.widgetKey, e.parentWidgetKey);
|
|
2633
2657
|
}, d = Z(
|
|
2634
2658
|
"widget-header",
|
|
2635
2659
|
t ? "hidden" : "flex items-center justify-between border-b border-solid border-card-invert",
|
|
@@ -2658,7 +2682,7 @@ const er = (e) => {
|
|
|
2658
2682
|
title: `${e.index < 1 ? "Already at min position" : "Move Widget to the left/up"}`
|
|
2659
2683
|
},
|
|
2660
2684
|
onClick: () => s(-1),
|
|
2661
|
-
children: /* @__PURE__ */ a(
|
|
2685
|
+
children: /* @__PURE__ */ a(ut, { className: $e })
|
|
2662
2686
|
}
|
|
2663
2687
|
),
|
|
2664
2688
|
/* @__PURE__ */ a(
|
|
@@ -2672,7 +2696,7 @@ const er = (e) => {
|
|
|
2672
2696
|
title: `${e.index >= e.maxIndex ? "Already at max position" : "Move Widget to the right/down"}`
|
|
2673
2697
|
},
|
|
2674
2698
|
onClick: () => s(1),
|
|
2675
|
-
children: /* @__PURE__ */ a(
|
|
2699
|
+
children: /* @__PURE__ */ a(ft, { className: $e })
|
|
2676
2700
|
}
|
|
2677
2701
|
),
|
|
2678
2702
|
/* @__PURE__ */ a(
|
|
@@ -2685,7 +2709,7 @@ const er = (e) => {
|
|
|
2685
2709
|
title: "Remove Widget"
|
|
2686
2710
|
},
|
|
2687
2711
|
onClick: () => o(),
|
|
2688
|
-
children: /* @__PURE__ */ a(
|
|
2712
|
+
children: /* @__PURE__ */ a(ht, { className: $e })
|
|
2689
2713
|
}
|
|
2690
2714
|
)
|
|
2691
2715
|
] })
|
|
@@ -2693,14 +2717,14 @@ const er = (e) => {
|
|
|
2693
2717
|
] }),
|
|
2694
2718
|
/* @__PURE__ */ a("div", { className: "widget-inner", children: e.children })
|
|
2695
2719
|
] });
|
|
2696
|
-
},
|
|
2697
|
-
function
|
|
2720
|
+
}, xn = le(wn);
|
|
2721
|
+
function Cn(e) {
|
|
2698
2722
|
return /* @__PURE__ */ a("div", { className: "dashboard-widget", children: /* @__PURE__ */ W("div", { className: "absolute inset-0 bg-black flex flex-col items-center justify-center text-center", children: [
|
|
2699
2723
|
/* @__PURE__ */ a("div", { className: "w-full absolute opacity-100 text-primary", children: e.title }),
|
|
2700
2724
|
/* @__PURE__ */ a("div", { className: "animate-ping rounded-full h-32 w-32 border-8 border-white" })
|
|
2701
2725
|
] }) });
|
|
2702
2726
|
}
|
|
2703
|
-
function
|
|
2727
|
+
function Sn({
|
|
2704
2728
|
index: e,
|
|
2705
2729
|
maxIndex: n,
|
|
2706
2730
|
widgetKey: t,
|
|
@@ -2709,35 +2733,35 @@ function wn({
|
|
|
2709
2733
|
childWidgetsConfig: o,
|
|
2710
2734
|
widgetCatalog: s,
|
|
2711
2735
|
isEditing: d,
|
|
2712
|
-
onRemoveClick:
|
|
2713
|
-
onMoveClick:
|
|
2736
|
+
onRemoveClick: p,
|
|
2737
|
+
onMoveClick: g,
|
|
2714
2738
|
selectContainer: h
|
|
2715
2739
|
}) {
|
|
2716
|
-
const u = `${t}`.split("_"),
|
|
2717
|
-
if (!
|
|
2740
|
+
const u = `${t}`.split("_"), m = u.length > 1, y = m ? u[0] : t, x = s.get(y);
|
|
2741
|
+
if (!x)
|
|
2718
2742
|
return /* @__PURE__ */ a("div", { className: "flex", children: /* @__PURE__ */ W("p", { children: [
|
|
2719
2743
|
"Widget not found in catalog: ",
|
|
2720
|
-
|
|
2744
|
+
y
|
|
2721
2745
|
] }) });
|
|
2722
2746
|
let v = null, b = !1;
|
|
2723
|
-
if (
|
|
2724
|
-
if (!
|
|
2725
|
-
if (
|
|
2726
|
-
return
|
|
2727
|
-
if (
|
|
2747
|
+
if (x.component ? (v = x.component, b = !1) : x.loader && (b = !0, v = at(() => {
|
|
2748
|
+
if (!x) return null;
|
|
2749
|
+
if (x.component)
|
|
2750
|
+
return x.component;
|
|
2751
|
+
if (x.loader) {
|
|
2728
2752
|
const l = async () => {
|
|
2729
2753
|
try {
|
|
2730
|
-
return await
|
|
2754
|
+
return await x.loader();
|
|
2731
2755
|
} catch (f) {
|
|
2732
2756
|
return console.error(`CDN Load Failure for ${t}:`, f), {
|
|
2733
|
-
default: () => /* @__PURE__ */ a(
|
|
2757
|
+
default: () => /* @__PURE__ */ a(xn, { ...D, children: /* @__PURE__ */ W("div", { className: "p-4 border border-dashed border-danger", children: [
|
|
2734
2758
|
/* @__PURE__ */ W("p", { className: "font-bold", children: [
|
|
2735
2759
|
'Failed to load "',
|
|
2736
2760
|
t,
|
|
2737
2761
|
'"'
|
|
2738
2762
|
] }),
|
|
2739
2763
|
/* @__PURE__ */ a("p", { className: "text-xs italic", children: "The remote plugin is unavailable or incompatible." }),
|
|
2740
|
-
/* @__PURE__ */ a("pre", { className: "text-xs overflow-hidden", children: JSON.stringify(
|
|
2764
|
+
/* @__PURE__ */ a("pre", { className: "text-xs overflow-hidden", children: JSON.stringify(x.meta || {}, null, 2) })
|
|
2741
2765
|
] }) })
|
|
2742
2766
|
};
|
|
2743
2767
|
}
|
|
@@ -2745,26 +2769,26 @@ function wn({
|
|
|
2745
2769
|
return se.lazy(l);
|
|
2746
2770
|
}
|
|
2747
2771
|
return null;
|
|
2748
|
-
}, [
|
|
2772
|
+
}, [x, t])), !v)
|
|
2749
2773
|
return /* @__PURE__ */ a("div", { className: "flex", children: /* @__PURE__ */ W("p", { children: [
|
|
2750
2774
|
"Widget definition incomplete: ",
|
|
2751
|
-
|
|
2775
|
+
y
|
|
2752
2776
|
] }) });
|
|
2753
|
-
const C = !!
|
|
2777
|
+
const C = !!x.isContainer, T = m ? gt(t) : "", S = C ? (o || []).filter((l) => l.parentWidgetKey === t) : [], D = {
|
|
2754
2778
|
index: e,
|
|
2755
2779
|
maxIndex: n,
|
|
2756
2780
|
widgetKey: t,
|
|
2757
2781
|
parentWidgetKey: r,
|
|
2758
2782
|
isEditing: d,
|
|
2759
|
-
title:
|
|
2760
|
-
onRemoveClick:
|
|
2761
|
-
onMoveClick:
|
|
2783
|
+
title: m ? T : x.title,
|
|
2784
|
+
onRemoveClick: p,
|
|
2785
|
+
onMoveClick: g
|
|
2762
2786
|
}, c = C ? {
|
|
2763
2787
|
highlight: i === t,
|
|
2764
2788
|
selectContainer: h,
|
|
2765
2789
|
// The children prop is the recursive call back to DynamicWidgetLoader
|
|
2766
2790
|
children: S.map((l, f) => /* @__PURE__ */ a(
|
|
2767
|
-
|
|
2791
|
+
Sn,
|
|
2768
2792
|
{
|
|
2769
2793
|
index: f,
|
|
2770
2794
|
maxIndex: S.length - 1,
|
|
@@ -2772,21 +2796,21 @@ function wn({
|
|
|
2772
2796
|
parentWidgetKey: l.parentWidgetKey,
|
|
2773
2797
|
widgetCatalog: s,
|
|
2774
2798
|
isEditing: d,
|
|
2775
|
-
onRemoveClick:
|
|
2776
|
-
onMoveClick:
|
|
2799
|
+
onRemoveClick: p,
|
|
2800
|
+
onMoveClick: g
|
|
2777
2801
|
},
|
|
2778
2802
|
`${l.widgetKey}_${f}`
|
|
2779
2803
|
))
|
|
2780
2804
|
} : {}, N = () => /* @__PURE__ */ a(v, { ...D, ...c });
|
|
2781
|
-
return b ? /* @__PURE__ */ a(
|
|
2805
|
+
return b ? /* @__PURE__ */ a(Ct, { fallback: /* @__PURE__ */ a(Cn, { title: `Loading ${x.title}` }), children: /* @__PURE__ */ a(N, {}) }) : /* @__PURE__ */ a(N, {});
|
|
2782
2806
|
}
|
|
2783
|
-
const
|
|
2784
|
-
function
|
|
2807
|
+
const we = "size-5";
|
|
2808
|
+
function ke(e) {
|
|
2785
2809
|
const n = e.highlight || !1, t = e.direction || "column", r = e.children.length > 0, i = e.isEditing || !1;
|
|
2786
2810
|
let d = n ? "border-transparent" : i && !r ? "border-card-invert" : "border-transparent";
|
|
2787
|
-
const
|
|
2788
|
-
let
|
|
2789
|
-
["large", "xlarge"].indexOf(e.size || "") > -1 && (
|
|
2811
|
+
const p = ["large", "xlarge"].includes(e.size || "");
|
|
2812
|
+
let g = "";
|
|
2813
|
+
["large", "xlarge"].indexOf(e.size || "") > -1 && (g = `${e.size}-widget`);
|
|
2790
2814
|
let h = "";
|
|
2791
2815
|
t === "row" && !r ? h = "min-h-48" : t === "column" && !r && (h = "min-h-96");
|
|
2792
2816
|
let u = Z(
|
|
@@ -2794,21 +2818,21 @@ function je(e) {
|
|
|
2794
2818
|
r ? "" : "has-no-children",
|
|
2795
2819
|
i ? "editing" : "",
|
|
2796
2820
|
h,
|
|
2797
|
-
|
|
2798
|
-
|
|
2821
|
+
g,
|
|
2822
|
+
p ? "widget-container-grid" : "widget-container-flex",
|
|
2799
2823
|
`direction-${t}`,
|
|
2800
2824
|
`border ${d}`,
|
|
2801
2825
|
`${n ? "highlight-container" : ""} ${d}`
|
|
2802
|
-
),
|
|
2803
|
-
const
|
|
2826
|
+
), m = `widget-container-header direction-${t} flex items-center border-1 ${d}`;
|
|
2827
|
+
const y = () => {
|
|
2804
2828
|
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey);
|
|
2805
|
-
},
|
|
2829
|
+
}, x = (b) => {
|
|
2806
2830
|
e.onMoveClick && e.widgetKey && e.onMoveClick(b, e.widgetKey, e.parentWidgetKey);
|
|
2807
2831
|
}, v = () => {
|
|
2808
2832
|
e.selectContainer && e.widgetKey && e.selectContainer(e.widgetKey);
|
|
2809
2833
|
};
|
|
2810
2834
|
return /* @__PURE__ */ W("div", { "data-testid": `container_${e.widgetKey}`, className: u, children: [
|
|
2811
|
-
/* @__PURE__ */ W("div", { className:
|
|
2835
|
+
/* @__PURE__ */ W("div", { className: m, children: [
|
|
2812
2836
|
/* @__PURE__ */ a(
|
|
2813
2837
|
"div",
|
|
2814
2838
|
{
|
|
@@ -2830,9 +2854,9 @@ function je(e) {
|
|
|
2830
2854
|
},
|
|
2831
2855
|
onClick: v,
|
|
2832
2856
|
children: /* @__PURE__ */ a(
|
|
2833
|
-
|
|
2857
|
+
Qt,
|
|
2834
2858
|
{
|
|
2835
|
-
className: `${
|
|
2859
|
+
className: `${we} ${n ? "text-success" : "text-disabled"}`
|
|
2836
2860
|
}
|
|
2837
2861
|
)
|
|
2838
2862
|
}
|
|
@@ -2847,8 +2871,8 @@ function je(e) {
|
|
|
2847
2871
|
placement: "top",
|
|
2848
2872
|
title: `${e.index < 1 ? "Already at min position" : "Move Container to the left/up"}`
|
|
2849
2873
|
},
|
|
2850
|
-
onClick: () =>
|
|
2851
|
-
children: /* @__PURE__ */ a(
|
|
2874
|
+
onClick: () => x(-1),
|
|
2875
|
+
children: /* @__PURE__ */ a(ut, { className: we })
|
|
2852
2876
|
}
|
|
2853
2877
|
),
|
|
2854
2878
|
/* @__PURE__ */ a(
|
|
@@ -2861,8 +2885,8 @@ function je(e) {
|
|
|
2861
2885
|
placement: "top",
|
|
2862
2886
|
title: `${e.index >= e.maxIndex ? "Already at max position" : "Move Container to the right/down"}`
|
|
2863
2887
|
},
|
|
2864
|
-
onClick: () =>
|
|
2865
|
-
children: /* @__PURE__ */ a(
|
|
2888
|
+
onClick: () => x(1),
|
|
2889
|
+
children: /* @__PURE__ */ a(ft, { className: we })
|
|
2866
2890
|
}
|
|
2867
2891
|
),
|
|
2868
2892
|
/* @__PURE__ */ a(
|
|
@@ -2874,8 +2898,8 @@ function je(e) {
|
|
|
2874
2898
|
placement: "top",
|
|
2875
2899
|
title: "Remove Container"
|
|
2876
2900
|
},
|
|
2877
|
-
onClick: () =>
|
|
2878
|
-
children: /* @__PURE__ */ a(
|
|
2901
|
+
onClick: () => y(),
|
|
2902
|
+
children: /* @__PURE__ */ a(ht, { className: we })
|
|
2879
2903
|
}
|
|
2880
2904
|
)
|
|
2881
2905
|
] }) }) })
|
|
@@ -2883,17 +2907,17 @@ function je(e) {
|
|
|
2883
2907
|
/* @__PURE__ */ a("div", { "data-testid": `childrenwrapper_${e.widgetKey}`, className: "widget-container-inner", children: e.children })
|
|
2884
2908
|
] });
|
|
2885
2909
|
}
|
|
2886
|
-
function
|
|
2910
|
+
function or(e) {
|
|
2887
2911
|
const { direction: n, ...t } = e;
|
|
2888
|
-
return /* @__PURE__ */ a(
|
|
2912
|
+
return /* @__PURE__ */ a(ke, { direction: "column", ...t });
|
|
2889
2913
|
}
|
|
2890
|
-
function
|
|
2914
|
+
function ir(e) {
|
|
2891
2915
|
const { size: n, ...t } = e;
|
|
2892
|
-
return /* @__PURE__ */ a(
|
|
2916
|
+
return /* @__PURE__ */ a(ke, { size: "large", ...t });
|
|
2893
2917
|
}
|
|
2894
|
-
function
|
|
2918
|
+
function ar(e) {
|
|
2895
2919
|
const { direction: n, ...t } = e;
|
|
2896
|
-
return /* @__PURE__ */ a(
|
|
2920
|
+
return /* @__PURE__ */ a(ke, { direction: "row", ...t });
|
|
2897
2921
|
}
|
|
2898
2922
|
function We({
|
|
2899
2923
|
// widgetKey,
|
|
@@ -2901,11 +2925,11 @@ function We({
|
|
|
2901
2925
|
alreadyAdded: n,
|
|
2902
2926
|
addWidget: t
|
|
2903
2927
|
}) {
|
|
2904
|
-
const r = e.icon ||
|
|
2928
|
+
const r = e.icon || en, i = e.displayName || "Unknown", o = e.description || "---", d = (e.noDuplicatedWidgets || !1) && n, p = Z(`
|
|
2905
2929
|
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
2906
2930
|
${d ? "border-disabled fill-disabled text-disabled" : "cursor-pointer border-primary fill-danger hover:fill-primary content-primary hover:brightness-110"}
|
|
2907
2931
|
`);
|
|
2908
|
-
return /* @__PURE__ */ W("div", { className:
|
|
2932
|
+
return /* @__PURE__ */ W("div", { className: p, style: { width: "calc(100% - 1rem)" }, onClick: () => {
|
|
2909
2933
|
d || t();
|
|
2910
2934
|
}, children: [
|
|
2911
2935
|
/* @__PURE__ */ a(r, { className: "" }),
|
|
@@ -2918,21 +2942,21 @@ function We({
|
|
|
2918
2942
|
] })
|
|
2919
2943
|
] });
|
|
2920
2944
|
}
|
|
2921
|
-
function
|
|
2945
|
+
function Dn({
|
|
2922
2946
|
item: e,
|
|
2923
2947
|
onSettingItemChanged: n
|
|
2924
2948
|
}) {
|
|
2925
2949
|
const t = e.displayName || "Unknown", r = e.description || "---", i = Z(`
|
|
2926
2950
|
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
2927
2951
|
`), o = (d) => {
|
|
2928
|
-
const
|
|
2929
|
-
if (["ArrowUp", "ArrowDown"].includes(
|
|
2952
|
+
const p = d.key;
|
|
2953
|
+
if (["ArrowUp", "ArrowDown"].includes(p)) {
|
|
2930
2954
|
d.preventDefault();
|
|
2931
|
-
const
|
|
2955
|
+
const g = Et.incrementOrDecrementValue(
|
|
2932
2956
|
e,
|
|
2933
|
-
|
|
2957
|
+
p === "ArrowUp" ? 1 : -1
|
|
2934
2958
|
);
|
|
2935
|
-
n(
|
|
2959
|
+
n(g);
|
|
2936
2960
|
}
|
|
2937
2961
|
}, s = (d) => {
|
|
2938
2962
|
n({
|
|
@@ -2946,7 +2970,7 @@ function Cn({
|
|
|
2946
2970
|
/* @__PURE__ */ W("div", { children: [
|
|
2947
2971
|
"Value:",
|
|
2948
2972
|
/* @__PURE__ */ a(
|
|
2949
|
-
|
|
2973
|
+
mt,
|
|
2950
2974
|
{
|
|
2951
2975
|
label: "Filter...",
|
|
2952
2976
|
size: "small",
|
|
@@ -2963,7 +2987,7 @@ const Ie = (e, n) => [
|
|
|
2963
2987
|
...n.widgets.filter((r) => r.indexOf("Container") === -1),
|
|
2964
2988
|
...n.childWidgetsConfig.map((r) => r.widgetKey)
|
|
2965
2989
|
].includes(e);
|
|
2966
|
-
function
|
|
2990
|
+
function sr({
|
|
2967
2991
|
targetContainerKey: e,
|
|
2968
2992
|
widgetsCatalog: n,
|
|
2969
2993
|
currentDashboardConfig: t,
|
|
@@ -2972,28 +2996,28 @@ function ir({
|
|
|
2972
2996
|
addContainer: o,
|
|
2973
2997
|
onSettingItemsUpdated: s,
|
|
2974
2998
|
onResetToDefaultDashboardClick: d,
|
|
2975
|
-
onUndoOrRedo:
|
|
2976
|
-
onDoneClick:
|
|
2999
|
+
onUndoOrRedo: p,
|
|
3000
|
+
onDoneClick: g
|
|
2977
3001
|
}) {
|
|
2978
|
-
const [h, u] = ce("Editing"), [
|
|
3002
|
+
const [h, u] = ce("Editing"), [m, y] = ce(0), [x, v] = ce(""), C = Array.from(n.keys()).map((E) => ({
|
|
2979
3003
|
widgetKey: E,
|
|
2980
|
-
metaData:
|
|
3004
|
+
metaData: Pt(E, n)
|
|
2981
3005
|
})), T = (E) => {
|
|
2982
3006
|
v(E.target.value);
|
|
2983
3007
|
}, S = (E) => {
|
|
2984
|
-
const z =
|
|
3008
|
+
const z = x.trim().toLowerCase();
|
|
2985
3009
|
return z.length < 1 ? !0 : E.displayName.trim().toLowerCase().includes(z) || E.description.toLowerCase().includes(z);
|
|
2986
3010
|
}, D = (E) => {
|
|
2987
|
-
const z =
|
|
3011
|
+
const z = x.trim().toLowerCase();
|
|
2988
3012
|
return z.length < 1 ? !0 : E.displayName.trim().toLowerCase().includes(z) || E.description.toLowerCase().includes(z);
|
|
2989
3013
|
}, c = (E) => Z(
|
|
2990
3014
|
"px-4 py-2 font-medium cursor-pointer border-b-2 border-transparent hover:border-primary focus:outline-none",
|
|
2991
|
-
E ===
|
|
3015
|
+
E === m ? "text-primary border-primary" : ""
|
|
2992
3016
|
), N = !!e;
|
|
2993
|
-
|
|
3017
|
+
St(() => {
|
|
2994
3018
|
if (e) {
|
|
2995
|
-
|
|
2996
|
-
const E =
|
|
3019
|
+
y(0);
|
|
3020
|
+
const E = gt(e);
|
|
2997
3021
|
u(`Editing ${E}`);
|
|
2998
3022
|
} else
|
|
2999
3023
|
u("Editing Dashboard");
|
|
@@ -3005,7 +3029,7 @@ function ir({
|
|
|
3005
3029
|
s(z);
|
|
3006
3030
|
}, [P, $] = ce(!1);
|
|
3007
3031
|
return /* @__PURE__ */ a(
|
|
3008
|
-
|
|
3032
|
+
vn,
|
|
3009
3033
|
{
|
|
3010
3034
|
testId: "dashboard-catalog-flyout",
|
|
3011
3035
|
className: "bg-body content-body bg-opacity-70 border-2 border-primary",
|
|
@@ -3022,7 +3046,7 @@ function ir({
|
|
|
3022
3046
|
children: /* @__PURE__ */ W("div", { className: "flex flex-col gap-2 p-2", children: [
|
|
3023
3047
|
/* @__PURE__ */ W("div", { className: "flex flex-row gap-2 justify-between", children: [
|
|
3024
3048
|
/* @__PURE__ */ W("div", { className: "handle flex-1 flex gap-2 w-full hover:text-primary cursor-grab", children: [
|
|
3025
|
-
P ? /* @__PURE__ */ a(
|
|
3049
|
+
P ? /* @__PURE__ */ a(Jt, { className: "size-5" }) : /* @__PURE__ */ a(Zt, { className: "size-5" }),
|
|
3026
3050
|
/* @__PURE__ */ a(
|
|
3027
3051
|
"h2",
|
|
3028
3052
|
{
|
|
@@ -3043,8 +3067,8 @@ function ir({
|
|
|
3043
3067
|
title: "Undo"
|
|
3044
3068
|
},
|
|
3045
3069
|
disabled: r.isUndoDisabled,
|
|
3046
|
-
onClick: () =>
|
|
3047
|
-
children: /* @__PURE__ */ a(
|
|
3070
|
+
onClick: () => p("Undo"),
|
|
3071
|
+
children: /* @__PURE__ */ a(Xt, { className: "size-5" })
|
|
3048
3072
|
}
|
|
3049
3073
|
),
|
|
3050
3074
|
/* @__PURE__ */ a(
|
|
@@ -3057,8 +3081,8 @@ function ir({
|
|
|
3057
3081
|
title: "Redo"
|
|
3058
3082
|
},
|
|
3059
3083
|
disabled: r.isRedoDisabled,
|
|
3060
|
-
onClick: () =>
|
|
3061
|
-
children: /* @__PURE__ */ a(
|
|
3084
|
+
onClick: () => p("Redo"),
|
|
3085
|
+
children: /* @__PURE__ */ a(Gt, { className: "size-5" })
|
|
3062
3086
|
}
|
|
3063
3087
|
),
|
|
3064
3088
|
/* @__PURE__ */ a(
|
|
@@ -3071,24 +3095,24 @@ function ir({
|
|
|
3071
3095
|
title: "Reset this dashboard to the default configuration"
|
|
3072
3096
|
},
|
|
3073
3097
|
onClick: d,
|
|
3074
|
-
children: /* @__PURE__ */ a(
|
|
3098
|
+
children: /* @__PURE__ */ a(Ht, { className: "size-5" })
|
|
3075
3099
|
}
|
|
3076
3100
|
)
|
|
3077
3101
|
] })
|
|
3078
3102
|
] }),
|
|
3079
3103
|
/* @__PURE__ */ W("div", { className: "flex border-b border-gray-200", children: [
|
|
3080
|
-
/* @__PURE__ */ a("button", { onClick: () =>
|
|
3081
|
-
/* @__PURE__ */ a("button", { onClick: () =>
|
|
3082
|
-
!N && /* @__PURE__ */ a("button", { onClick: () =>
|
|
3083
|
-
!N && /* @__PURE__ */ a("button", { onClick: () =>
|
|
3104
|
+
/* @__PURE__ */ a("button", { onClick: () => y(0), className: c(0), children: "Widgets" }),
|
|
3105
|
+
/* @__PURE__ */ a("button", { onClick: () => y(1), className: c(1), children: "Charts" }),
|
|
3106
|
+
!N && /* @__PURE__ */ a("button", { onClick: () => y(2), className: c(2), children: "Containers" }),
|
|
3107
|
+
!N && /* @__PURE__ */ a("button", { onClick: () => y(3), className: c(3), children: /* @__PURE__ */ a(Kt, {}) })
|
|
3084
3108
|
] }),
|
|
3085
3109
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-1 w-full", children: /* @__PURE__ */ a(
|
|
3086
|
-
|
|
3110
|
+
mt,
|
|
3087
3111
|
{
|
|
3088
3112
|
label: "Filter...",
|
|
3089
3113
|
size: "small",
|
|
3090
3114
|
className: "w-full",
|
|
3091
|
-
value:
|
|
3115
|
+
value: x,
|
|
3092
3116
|
onChange: T
|
|
3093
3117
|
}
|
|
3094
3118
|
) }),
|
|
@@ -3100,7 +3124,7 @@ function ir({
|
|
|
3100
3124
|
maxHeight: "360px"
|
|
3101
3125
|
},
|
|
3102
3126
|
children: [
|
|
3103
|
-
|
|
3127
|
+
m === 0 && C.filter(
|
|
3104
3128
|
(E) => E.metaData.categories.includes("Widget") && S(E.metaData)
|
|
3105
3129
|
).map((E) => /* @__PURE__ */ a(
|
|
3106
3130
|
We,
|
|
@@ -3112,7 +3136,7 @@ function ir({
|
|
|
3112
3136
|
},
|
|
3113
3137
|
E.widgetKey
|
|
3114
3138
|
)),
|
|
3115
|
-
|
|
3139
|
+
m === 1 && C.filter(
|
|
3116
3140
|
(E) => E.metaData.categories.includes("Chart") && S(E.metaData)
|
|
3117
3141
|
).map((E) => /* @__PURE__ */ a(
|
|
3118
3142
|
We,
|
|
@@ -3124,7 +3148,7 @@ function ir({
|
|
|
3124
3148
|
},
|
|
3125
3149
|
E.widgetKey
|
|
3126
3150
|
)),
|
|
3127
|
-
!N &&
|
|
3151
|
+
!N && m === 2 && C.filter((E) => E.metaData.categories.includes("Container")).map((E) => /* @__PURE__ */ a(
|
|
3128
3152
|
We,
|
|
3129
3153
|
{
|
|
3130
3154
|
widgetKey: E.widgetKey,
|
|
@@ -3134,8 +3158,8 @@ function ir({
|
|
|
3134
3158
|
},
|
|
3135
3159
|
E.widgetKey
|
|
3136
3160
|
)),
|
|
3137
|
-
!N &&
|
|
3138
|
-
|
|
3161
|
+
!N && m === 3 && (t.cssSettings || []).filter(D).map((E) => /* @__PURE__ */ a(
|
|
3162
|
+
Dn,
|
|
3139
3163
|
{
|
|
3140
3164
|
item: E,
|
|
3141
3165
|
onSettingItemChanged: f
|
|
@@ -3153,7 +3177,7 @@ function ir({
|
|
|
3153
3177
|
placement: "bottom",
|
|
3154
3178
|
title: "Click to exit edit mode"
|
|
3155
3179
|
},
|
|
3156
|
-
onClick:
|
|
3180
|
+
onClick: g,
|
|
3157
3181
|
children: "Done"
|
|
3158
3182
|
}
|
|
3159
3183
|
) })
|
|
@@ -3162,69 +3186,71 @@ function ir({
|
|
|
3162
3186
|
);
|
|
3163
3187
|
}
|
|
3164
3188
|
export {
|
|
3165
|
-
|
|
3189
|
+
jn as AddIcon,
|
|
3166
3190
|
J as Button,
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3191
|
+
en as CircleQuestionMark,
|
|
3192
|
+
Qt as CrosshairIcon,
|
|
3193
|
+
rr as DashboardGrid,
|
|
3194
|
+
Fe as DashboardMaxZoomScale,
|
|
3171
3195
|
Ae as DashboardMinZoomScale,
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3196
|
+
xn as DashboardWidgetBase,
|
|
3197
|
+
_t as DashboardZoomStep,
|
|
3198
|
+
An as DeleteIcon,
|
|
3199
|
+
vn as DraggablePanel,
|
|
3200
|
+
Sn as DynamicWidgetLoader,
|
|
3201
|
+
Fn as EditIcon,
|
|
3202
|
+
Ln as GridIcon,
|
|
3203
|
+
Jt as HandGrabIcon,
|
|
3204
|
+
Zt as HandIcon,
|
|
3205
|
+
Xn as ListItem,
|
|
3206
|
+
Gn as ListItemLeftChild,
|
|
3207
|
+
Zn as ListItemMiddleChild,
|
|
3208
|
+
Jn as ListItemRightChild,
|
|
3209
|
+
Un as MonitorIcon,
|
|
3210
|
+
Vn as MonitorSmartphoneIcon,
|
|
3211
|
+
ut as MoveLeftIcon,
|
|
3212
|
+
ft as MoveRightIcon,
|
|
3213
|
+
Gt as RedoIcon,
|
|
3214
|
+
Kt as SettingsIcon,
|
|
3215
|
+
nn as Stack,
|
|
3192
3216
|
K as SvgBaseWrapper,
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3217
|
+
Yn as TabletSmartphoneIcon,
|
|
3218
|
+
Bn as TargetIcon,
|
|
3219
|
+
mt as TextField,
|
|
3220
|
+
Ht as TimerResetIcon,
|
|
3221
|
+
Xt as UndoIcon,
|
|
3222
|
+
or as WidgetContainerColumn,
|
|
3223
|
+
ir as WidgetContainerLarge,
|
|
3224
|
+
ar as WidgetContainerRow,
|
|
3225
|
+
sr as WidgetsCatalogFlyout,
|
|
3226
|
+
er as WrapperColumnContent,
|
|
3227
|
+
tr as WrapperColumnContentListItem,
|
|
3228
|
+
ht as XCircleIcon,
|
|
3229
|
+
qn as ZoomInIcon,
|
|
3230
|
+
zn as ZoomOutIcon,
|
|
3207
3231
|
Ce as blankDashboardConfig,
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3232
|
+
ct as createDynamicEntry,
|
|
3233
|
+
$n as createStaticEntry,
|
|
3234
|
+
Dt as cssSettingsCatalog,
|
|
3235
|
+
Hn as cssVarsUtils,
|
|
3236
|
+
Et as dashboardSettingsUtils,
|
|
3237
|
+
Mt as ensureContainersSequence,
|
|
3214
3238
|
lt as ensureZoomScaleIsWithinRange,
|
|
3215
|
-
|
|
3216
|
-
|
|
3239
|
+
ge as getDefaultWidgetMetaFromKey,
|
|
3240
|
+
Pn as getDefaultWidgetMetaFromMap,
|
|
3217
3241
|
Z as getDistinctCssClasses,
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3242
|
+
Wt as getMetaInfoFromFile,
|
|
3243
|
+
_n as getNewZoomScaleWithinRange,
|
|
3244
|
+
Pt as getWidgetMetaFromCatalog,
|
|
3245
|
+
Wn as localWidgetDiscovery,
|
|
3246
|
+
gt as parseContainerTitle,
|
|
3247
|
+
$t as parseKeyAndTitleFromFilePath,
|
|
3248
|
+
In as remoteWidgetDiscovery,
|
|
3249
|
+
Mn as removeEmptyContainers,
|
|
3224
3250
|
re as resolveColorFromClass,
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3251
|
+
Kn as resolvedColors,
|
|
3252
|
+
nr as showToast,
|
|
3253
|
+
Rn as useDashboardStorageService,
|
|
3254
|
+
On as useDashboardStore,
|
|
3255
|
+
kn as useDashboardUndoService
|
|
3230
3256
|
};
|