@object-ui/plugin-dashboard 3.1.5 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/.turbo/turbo-build.log +16 -9
  2. package/CHANGELOG.md +18 -0
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.js +809 -668
  5. package/dist/index.umd.cjs +3 -3
  6. package/dist/packages/plugin-dashboard/src/DashboardConfigPanel.d.ts.map +1 -0
  7. package/dist/packages/plugin-dashboard/src/DashboardConfigPanel.stories.d.ts.map +1 -0
  8. package/dist/packages/plugin-dashboard/src/DashboardGridLayout.d.ts.map +1 -0
  9. package/dist/packages/plugin-dashboard/src/DashboardRenderer.d.ts.map +1 -0
  10. package/dist/packages/plugin-dashboard/src/DashboardRenderer.stories.d.ts.map +1 -0
  11. package/dist/packages/plugin-dashboard/src/DashboardWithConfig.d.ts.map +1 -0
  12. package/dist/{src → packages/plugin-dashboard/src}/MetricCard.d.ts +4 -0
  13. package/dist/packages/plugin-dashboard/src/MetricCard.d.ts.map +1 -0
  14. package/dist/{src → packages/plugin-dashboard/src}/MetricWidget.d.ts +5 -1
  15. package/dist/packages/plugin-dashboard/src/MetricWidget.d.ts.map +1 -0
  16. package/dist/packages/plugin-dashboard/src/ObjectDataTable.d.ts.map +1 -0
  17. package/dist/packages/plugin-dashboard/src/ObjectMetricWidget.d.ts +57 -0
  18. package/dist/packages/plugin-dashboard/src/ObjectMetricWidget.d.ts.map +1 -0
  19. package/dist/packages/plugin-dashboard/src/ObjectPivotTable.d.ts.map +1 -0
  20. package/dist/packages/plugin-dashboard/src/PivotTable.d.ts.map +1 -0
  21. package/dist/packages/plugin-dashboard/src/WidgetConfigPanel.d.ts.map +1 -0
  22. package/dist/{src → packages/plugin-dashboard/src}/index.d.ts +4 -2
  23. package/dist/packages/plugin-dashboard/src/index.d.ts.map +1 -0
  24. package/dist/packages/plugin-dashboard/src/utils.d.ts.map +1 -0
  25. package/package.json +11 -11
  26. package/src/DashboardRenderer.tsx +34 -0
  27. package/src/MetricCard.tsx +38 -18
  28. package/src/MetricWidget.tsx +38 -18
  29. package/src/ObjectMetricWidget.tsx +159 -0
  30. package/src/__tests__/DashboardRenderer.widgetData.test.tsx +130 -2
  31. package/src/__tests__/MetricCard.test.tsx +25 -0
  32. package/src/__tests__/ObjectMetricWidget.test.tsx +196 -0
  33. package/src/index.tsx +23 -1
  34. package/vite.config.ts +1 -0
  35. package/dist/src/DashboardConfigPanel.d.ts.map +0 -1
  36. package/dist/src/DashboardConfigPanel.stories.d.ts.map +0 -1
  37. package/dist/src/DashboardGridLayout.d.ts.map +0 -1
  38. package/dist/src/DashboardRenderer.d.ts.map +0 -1
  39. package/dist/src/DashboardRenderer.stories.d.ts.map +0 -1
  40. package/dist/src/DashboardWithConfig.d.ts.map +0 -1
  41. package/dist/src/MetricCard.d.ts.map +0 -1
  42. package/dist/src/MetricWidget.d.ts.map +0 -1
  43. package/dist/src/ObjectDataTable.d.ts.map +0 -1
  44. package/dist/src/ObjectPivotTable.d.ts.map +0 -1
  45. package/dist/src/PivotTable.d.ts.map +0 -1
  46. package/dist/src/WidgetConfigPanel.d.ts.map +0 -1
  47. package/dist/src/index.d.ts.map +0 -1
  48. package/dist/src/utils.d.ts.map +0 -1
  49. /package/dist/{src → packages/plugin-dashboard/src}/DashboardConfigPanel.d.ts +0 -0
  50. /package/dist/{src → packages/plugin-dashboard/src}/DashboardConfigPanel.stories.d.ts +0 -0
  51. /package/dist/{src → packages/plugin-dashboard/src}/DashboardGridLayout.d.ts +0 -0
  52. /package/dist/{src → packages/plugin-dashboard/src}/DashboardRenderer.d.ts +0 -0
  53. /package/dist/{src → packages/plugin-dashboard/src}/DashboardRenderer.stories.d.ts +0 -0
  54. /package/dist/{src → packages/plugin-dashboard/src}/DashboardWithConfig.d.ts +0 -0
  55. /package/dist/{src → packages/plugin-dashboard/src}/ObjectDataTable.d.ts +0 -0
  56. /package/dist/{src → packages/plugin-dashboard/src}/ObjectPivotTable.d.ts +0 -0
  57. /package/dist/{src → packages/plugin-dashboard/src}/PivotTable.d.ts +0 -0
  58. /package/dist/{src → packages/plugin-dashboard/src}/WidgetConfigPanel.d.ts +0 -0
  59. /package/dist/{src → packages/plugin-dashboard/src}/utils.d.ts +0 -0
package/dist/index.js CHANGED
@@ -4,21 +4,21 @@ import { Button as s, Card as c, CardContent as l, CardHeader as u, CardTitle as
4
4
  import * as v from "react";
5
5
  import y, { forwardRef as b, useCallback as x, useContext as S, useEffect as C, useMemo as w, useRef as T, useState as E } from "react";
6
6
  import * as D from "lucide-react";
7
- import { ArrowDownIcon as O, ArrowUpIcon as k, Edit as A, GripVertical as j, MinusIcon as M, RefreshCw as N, Save as P, Settings as F, X as I } from "lucide-react";
7
+ import { AlertCircle as O, ArrowDownIcon as k, ArrowUpIcon as A, Edit as j, GripVertical as M, Loader2 as N, MinusIcon as P, RefreshCw as F, Save as I, Settings as L, X as R } from "lucide-react";
8
8
  import ee from "clsx";
9
9
  //#region \0rolldown/runtime.js
10
- var L = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), R = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
10
+ var z = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), B = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
11
11
  if (typeof require < "u") return require.apply(this, arguments);
12
12
  throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
13
13
  });
14
14
  //#endregion
15
15
  //#region src/utils.ts
16
- function z(e) {
16
+ function V(e) {
17
17
  return typeof e == "object" && !!e && !Array.isArray(e) && e.provider === "object";
18
18
  }
19
19
  //#endregion
20
- //#region ../../node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react-jsx-runtime.production.js
21
- var B = /* @__PURE__ */ L(((e) => {
20
+ //#region ../../node_modules/.pnpm/react@19.2.5/node_modules/react/cjs/react-jsx-runtime.production.js
21
+ var H = /* @__PURE__ */ z(((e) => {
22
22
  var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
23
23
  function r(e, n, r) {
24
24
  var i = null;
@@ -33,7 +33,7 @@ var B = /* @__PURE__ */ L(((e) => {
33
33
  };
34
34
  }
35
35
  e.Fragment = n, e.jsx = r, e.jsxs = r;
36
- })), te = /* @__PURE__ */ L(((e) => {
36
+ })), te = /* @__PURE__ */ z(((e) => {
37
37
  process.env.NODE_ENV !== "production" && (function() {
38
38
  function t(e) {
39
39
  if (e == null) return null;
@@ -164,7 +164,7 @@ var B = /* @__PURE__ */ L(((e) => {
164
164
  var m = Object.keys(n).filter(function(e) {
165
165
  return e !== "key";
166
166
  });
167
- o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", ee[p + o] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", o, p, m, p), ee[p + o] = !0);
167
+ o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", L[p + o] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", o, p, m, p), L[p + o] = !0);
168
168
  }
169
169
  if (p = null, i !== void 0 && (r(i), p = "" + i), s(n) && (r(n.key), p = "" + n.key), "key" in n) for (var h in i = {}, n) h !== "key" && (i[h] = n[h]);
170
170
  else i = n;
@@ -176,13 +176,13 @@ var B = /* @__PURE__ */ L(((e) => {
176
176
  function p(e) {
177
177
  return typeof e == "object" && !!e && e.$$typeof === h;
178
178
  }
179
- var m = R("react"), h = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), x = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), D = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"), k = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, A = Object.prototype.hasOwnProperty, j = Array.isArray, M = console.createTask ? console.createTask : function() {
179
+ var m = B("react"), h = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), x = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), D = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"), k = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, A = Object.prototype.hasOwnProperty, j = Array.isArray, M = console.createTask ? console.createTask : function() {
180
180
  return null;
181
181
  };
182
182
  m = { react_stack_bottom_frame: function(e) {
183
183
  return e();
184
184
  } };
185
- var N, P = {}, F = m.react_stack_bottom_frame.bind(m, o)(), I = M(i(o)), ee = {};
185
+ var N, P = {}, F = m.react_stack_bottom_frame.bind(m, o)(), I = M(i(o)), L = {};
186
186
  e.Fragment = _, e.jsx = function(e, t, n) {
187
187
  var r = 1e4 > k.recentlyCreatedOwnerStacks++;
188
188
  return d(e, t, n, !1, r ? Error("react-stack-top-frame") : F, r ? M(i(e)) : I);
@@ -191,10 +191,10 @@ var B = /* @__PURE__ */ L(((e) => {
191
191
  return d(e, t, n, !0, r ? Error("react-stack-top-frame") : F, r ? M(i(e)) : I);
192
192
  };
193
193
  })();
194
- })), V = (/* @__PURE__ */ L(((e, t) => {
195
- process.env.NODE_ENV === "production" ? t.exports = B() : t.exports = te();
194
+ })), U = (/* @__PURE__ */ z(((e, t) => {
195
+ process.env.NODE_ENV === "production" ? t.exports = H() : t.exports = te();
196
196
  })))();
197
- function H(e) {
197
+ function W(e) {
198
198
  if (e != null) return typeof e == "string" ? e : e.defaultValue || e.key;
199
199
  }
200
200
  var ne = [
@@ -242,16 +242,38 @@ var ne = [
242
242
  e.widgets
243
243
  ]), M = x((e) => {
244
244
  !f || !m || e.target === e.currentTarget && m(null);
245
- }, [f, m]), P = (e, t, r) => {
245
+ }, [f, m]), N = (e, t, r) => {
246
246
  let i = e.layout ? {
247
247
  ...e.layout,
248
248
  w: Math.min(e.layout.w, v)
249
249
  } : void 0, a = (() => {
250
250
  if (e.component) return e.component;
251
251
  let t = e.type, n = e.options || {};
252
+ if (t === "metric" && e.object) {
253
+ let t = n.data, r = V(t) && t.aggregate ? {
254
+ field: e.valueField || t.aggregate.field,
255
+ function: e.aggregate || t.aggregate.function,
256
+ groupBy: e.categoryField ?? t.aggregate.groupBy ?? "_all"
257
+ } : e.aggregate ? {
258
+ field: e.valueField || "value",
259
+ function: e.aggregate,
260
+ groupBy: e.categoryField || "_all"
261
+ } : void 0;
262
+ return {
263
+ type: "object-metric",
264
+ objectName: e.object || (V(t) ? t.object : void 0),
265
+ aggregate: r,
266
+ filter: (V(t) ? t.filter : void 0) || e.filter,
267
+ label: n.label || W(e.title) || "",
268
+ fallbackValue: n.value,
269
+ trend: n.trend,
270
+ icon: n.icon,
271
+ description: n.description
272
+ };
273
+ }
252
274
  if (t === "bar" || t === "line" || t === "area" || t === "pie" || t === "donut" || t === "scatter") {
253
275
  let r = e.data || n.data, i = e.categoryField || n.xField || "name", a = e.valueField || n.yField || "value";
254
- if (z(r)) {
276
+ if (V(r)) {
255
277
  let n = r.aggregate, o = n ? {
256
278
  field: e.valueField || n.field,
257
279
  function: e.aggregate || n.function,
@@ -297,7 +319,7 @@ var ne = [
297
319
  }
298
320
  if (t === "table") {
299
321
  let t = e.data || n.data;
300
- if (z(t)) {
322
+ if (V(t)) {
301
323
  let { data: r, ...i } = n;
302
324
  return {
303
325
  type: "object-data-table",
@@ -329,7 +351,7 @@ var ne = [
329
351
  }
330
352
  if (t === "pivot") {
331
353
  let t = e.data || n.data;
332
- if (z(t)) {
354
+ if (V(t)) {
333
355
  let { data: r, ...i } = n;
334
356
  return {
335
357
  type: "object-pivot",
@@ -354,7 +376,7 @@ var ne = [
354
376
  ...e,
355
377
  ...n
356
378
  };
357
- })(), o = e.type === "metric", s = H(e.title), m = H(e.description), h = e.id || s || `widget-${t}`, _ = f && p === e.id, y = f ? {
379
+ })(), o = e.type === "metric", s = W(e.title), m = W(e.description), h = e.id || s || `widget-${t}`, _ = f && p === e.id, y = f ? {
358
380
  "data-testid": `dashboard-preview-widget-${e.id}`,
359
381
  "data-widget-id": e.id,
360
382
  role: "button",
@@ -364,22 +386,22 @@ var ne = [
364
386
  onClick: (t) => A(t, e.id),
365
387
  onKeyDown: (n) => j(n, e.id, t)
366
388
  } : {}, b = f ? g("cursor-pointer rounded-lg transition-all outline-none", "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", _ ? "ring-2 ring-primary shadow-md bg-primary/5 dark:bg-primary/10" : "hover:ring-2 hover:ring-primary/40 hover:shadow-sm") : void 0;
367
- return o ? /* @__PURE__ */ (0, V.jsxs)("div", {
389
+ return o ? /* @__PURE__ */ (0, U.jsxs)("div", {
368
390
  className: g("h-full w-full", f && "relative", b),
369
391
  style: !w && i ? {
370
392
  gridColumn: `span ${i.w}`,
371
393
  gridRow: `span ${i.h}`
372
394
  } : void 0,
373
395
  ...y,
374
- children: [/* @__PURE__ */ (0, V.jsx)(n, {
396
+ children: [/* @__PURE__ */ (0, U.jsx)(n, {
375
397
  schema: a,
376
398
  className: g("h-full w-full", f && "pointer-events-none")
377
- }), f && /* @__PURE__ */ (0, V.jsx)("div", {
399
+ }), f && /* @__PURE__ */ (0, U.jsx)("div", {
378
400
  className: "absolute inset-0 z-10",
379
401
  "aria-hidden": "true",
380
402
  "data-testid": "widget-click-overlay"
381
403
  })]
382
- }, h) : /* @__PURE__ */ (0, V.jsxs)(c, {
404
+ }, h) : /* @__PURE__ */ (0, U.jsxs)(c, {
383
405
  className: g("overflow-hidden border-border/50 shadow-sm transition-all hover:shadow-md", "bg-card/50 backdrop-blur-sm", r && "w-full", f && "relative", b),
384
406
  style: !w && i ? {
385
407
  gridColumn: `span ${i.w}`,
@@ -387,108 +409,108 @@ var ne = [
387
409
  } : void 0,
388
410
  ...y,
389
411
  children: [
390
- s && /* @__PURE__ */ (0, V.jsxs)(u, {
412
+ s && /* @__PURE__ */ (0, U.jsxs)(u, {
391
413
  className: "pb-2 border-b border-border/40 bg-muted/20 px-3 sm:px-6",
392
- children: [/* @__PURE__ */ (0, V.jsx)(d, {
414
+ children: [/* @__PURE__ */ (0, U.jsx)(d, {
393
415
  className: "text-sm sm:text-base font-medium tracking-tight truncate",
394
416
  title: s,
395
417
  children: s
396
- }), m && /* @__PURE__ */ (0, V.jsx)("p", {
418
+ }), m && /* @__PURE__ */ (0, U.jsx)("p", {
397
419
  className: "text-xs text-muted-foreground mt-0.5 line-clamp-2",
398
420
  children: m
399
421
  })]
400
422
  }),
401
- /* @__PURE__ */ (0, V.jsx)(l, {
423
+ /* @__PURE__ */ (0, U.jsx)(l, {
402
424
  className: "p-0",
403
- children: /* @__PURE__ */ (0, V.jsx)("div", {
425
+ children: /* @__PURE__ */ (0, U.jsx)("div", {
404
426
  className: g("h-full w-full", "p-3 sm:p-4 md:p-6", f && "pointer-events-none"),
405
- children: /* @__PURE__ */ (0, V.jsx)(n, { schema: a })
427
+ children: /* @__PURE__ */ (0, U.jsx)(n, { schema: a })
406
428
  })
407
429
  }),
408
- f && /* @__PURE__ */ (0, V.jsx)("div", {
430
+ f && /* @__PURE__ */ (0, U.jsx)("div", {
409
431
  className: "absolute inset-0 z-10",
410
432
  "aria-hidden": "true",
411
433
  "data-testid": "widget-click-overlay"
412
434
  })
413
435
  ]
414
436
  }, h);
415
- }, F = e.header && /* @__PURE__ */ (0, V.jsxs)("div", {
437
+ }, P = e.header && /* @__PURE__ */ (0, U.jsxs)("div", {
416
438
  className: "col-span-full mb-4",
417
439
  children: [
418
- e.header.showTitle !== !1 && e.title && /* @__PURE__ */ (0, V.jsx)("h2", {
440
+ e.header.showTitle !== !1 && e.title && /* @__PURE__ */ (0, U.jsx)("h2", {
419
441
  className: "text-lg font-semibold tracking-tight",
420
- children: H(e.title)
442
+ children: W(e.title)
421
443
  }),
422
- e.header.showDescription !== !1 && e.description && /* @__PURE__ */ (0, V.jsx)("p", {
444
+ e.header.showDescription !== !1 && e.description && /* @__PURE__ */ (0, U.jsx)("p", {
423
445
  className: "text-sm text-muted-foreground mt-1",
424
- children: H(e.description)
446
+ children: W(e.description)
425
447
  }),
426
- e.header.actions && e.header.actions.length > 0 && /* @__PURE__ */ (0, V.jsx)("div", {
448
+ e.header.actions && e.header.actions.length > 0 && /* @__PURE__ */ (0, U.jsx)("div", {
427
449
  className: "flex gap-2 mt-3",
428
- children: e.header.actions.map((e, t) => /* @__PURE__ */ (0, V.jsx)(s, {
450
+ children: e.header.actions.map((e, t) => /* @__PURE__ */ (0, U.jsx)(s, {
429
451
  variant: "outline",
430
452
  size: "sm",
431
453
  children: e.label
432
454
  }, t))
433
455
  })
434
456
  ]
435
- }), I = a !== void 0 && /* @__PURE__ */ (0, V.jsxs)("span", {
457
+ }), I = a !== void 0 && /* @__PURE__ */ (0, U.jsxs)("span", {
436
458
  className: "text-xs text-muted-foreground",
437
459
  children: [a.toLocaleString(), " records"]
438
- }), ee = o ? JSON.stringify(o) : void 0, L = i && /* @__PURE__ */ (0, V.jsxs)("div", {
460
+ }), L = o ? JSON.stringify(o) : void 0, R = i && /* @__PURE__ */ (0, U.jsxs)("div", {
439
461
  className: g("flex items-center justify-end gap-3 mb-2", !w && "col-span-full"),
440
- children: [I, /* @__PURE__ */ (0, V.jsxs)(s, {
462
+ children: [I, /* @__PURE__ */ (0, U.jsxs)(s, {
441
463
  variant: "outline",
442
464
  size: "sm",
443
465
  onClick: k,
444
466
  disabled: b,
445
467
  "aria-label": "Refresh dashboard",
446
- children: [/* @__PURE__ */ (0, V.jsx)(N, { className: g("h-4 w-4 mr-2", b && "animate-spin") }), b ? "Refreshing…" : "Refresh All"]
468
+ children: [/* @__PURE__ */ (0, U.jsx)(F, { className: g("h-4 w-4 mr-2", b && "animate-spin") }), b ? "Refreshing…" : "Refresh All"]
447
469
  })]
448
470
  });
449
471
  if (w) {
450
472
  let n = e.widgets?.filter((e) => e.type === "metric") || [], r = e.widgets?.filter((e) => e.type !== "metric") || [];
451
- return /* @__PURE__ */ (0, V.jsxs)("div", {
473
+ return /* @__PURE__ */ (0, U.jsxs)("div", {
452
474
  ref: _,
453
475
  className: g("flex flex-col gap-4 px-4", t),
454
- "data-user-actions": ee,
476
+ "data-user-actions": L,
455
477
  onClick: M,
456
478
  ...h,
457
479
  children: [
458
- F,
459
- L,
460
- n.length > 0 && /* @__PURE__ */ (0, V.jsx)("div", {
480
+ P,
481
+ R,
482
+ n.length > 0 && /* @__PURE__ */ (0, U.jsx)("div", {
461
483
  className: "grid grid-cols-2 gap-3",
462
484
  onClick: M,
463
- children: n.map((e, t) => P(e, t))
485
+ children: n.map((e, t) => N(e, t))
464
486
  }),
465
- r.length > 0 && /* @__PURE__ */ (0, V.jsx)("div", {
487
+ r.length > 0 && /* @__PURE__ */ (0, U.jsx)("div", {
466
488
  className: "flex flex-col gap-4",
467
489
  onClick: M,
468
- children: r.map((e, t) => P(e, t, !0))
490
+ children: r.map((e, t) => N(e, t, !0))
469
491
  })
470
492
  ]
471
493
  });
472
494
  }
473
- return /* @__PURE__ */ (0, V.jsxs)("div", {
495
+ return /* @__PURE__ */ (0, U.jsxs)("div", {
474
496
  ref: _,
475
497
  className: g("grid auto-rows-min", "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4", t),
476
498
  style: {
477
499
  ...v > 4 && { gridTemplateColumns: `repeat(${v}, minmax(0, 1fr))` },
478
500
  gap: `${y * .25}rem`
479
501
  },
480
- "data-user-actions": ee,
502
+ "data-user-actions": L,
481
503
  onClick: M,
482
504
  ...h,
483
505
  children: [
484
- F,
485
- L,
486
- e.widgets?.map((e, t) => P(e, t))
506
+ P,
507
+ R,
508
+ e.widgets?.map((e, t) => N(e, t))
487
509
  ]
488
510
  });
489
511
  });
490
512
  //#endregion
491
- //#region ../../node_modules/.pnpm/react-grid-layout@2.2.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-grid-layout/dist/chunk-AWM66AWF.mjs
513
+ //#region ../../node_modules/.pnpm/react-grid-layout@2.2.3_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/react-grid-layout/dist/chunk-76RTO6EO.mjs
492
514
  function ie(e) {
493
515
  let { margin: t, containerPadding: n, containerWidth: r, cols: i } = e;
494
516
  return (r - t[0] * (i - 1) - n[0] * 2) / i;
@@ -539,28 +561,28 @@ function le(e, t, n) {
539
561
  function ue(e, t, n) {
540
562
  return Math.max(Math.min(e, n), t);
541
563
  }
542
- function de(e, t) {
564
+ function G(e, t) {
543
565
  return !(e.i === t.i || e.x + e.w <= t.x || e.x >= t.x + t.w || e.y + e.h <= t.y || e.y >= t.y + t.h);
544
566
  }
545
- function fe(e, t) {
567
+ function K(e, t) {
546
568
  for (let n = 0; n < e.length; n++) {
547
569
  let r = e[n];
548
- if (r !== void 0 && de(r, t)) return r;
570
+ if (r !== void 0 && G(r, t)) return r;
549
571
  }
550
572
  }
551
- function pe(e, t) {
552
- return e.filter((e) => de(e, t));
573
+ function de(e, t) {
574
+ return e.filter((e) => G(e, t));
553
575
  }
554
- function U(e, t) {
555
- return t === "horizontal" ? me(e) : t === "vertical" || t === "wrap" ? W(e) : [...e];
576
+ function fe(e, t) {
577
+ return t === "horizontal" ? q(e) : t === "vertical" || t === "wrap" ? pe(e) : [...e];
556
578
  }
557
- function W(e) {
579
+ function pe(e) {
558
580
  return [...e].sort((e, t) => e.y === t.y ? e.x - t.x : e.y - t.y);
559
581
  }
560
- function me(e) {
582
+ function q(e) {
561
583
  return [...e].sort((e, t) => e.x === t.x ? e.y - t.y : e.x - t.x);
562
584
  }
563
- function he(e) {
585
+ function me(e) {
564
586
  let t = 0;
565
587
  for (let n = 0; n < e.length; n++) {
566
588
  let r = e[n];
@@ -571,16 +593,16 @@ function he(e) {
571
593
  }
572
594
  return t;
573
595
  }
574
- function G(e, t) {
596
+ function he(e, t) {
575
597
  for (let n = 0; n < e.length; n++) {
576
598
  let r = e[n];
577
599
  if (r !== void 0 && r.i === t) return r;
578
600
  }
579
601
  }
580
- function K(e) {
602
+ function ge(e) {
581
603
  return e.filter((e) => e.static === !0);
582
604
  }
583
- function ge(e) {
605
+ function _e(e) {
584
606
  return {
585
607
  i: e.i,
586
608
  x: e.x,
@@ -600,15 +622,15 @@ function ge(e) {
600
622
  isBounded: e.isBounded
601
623
  };
602
624
  }
603
- function q(e) {
625
+ function J(e) {
604
626
  let t = Array(e.length);
605
627
  for (let n = 0; n < e.length; n++) {
606
628
  let r = e[n];
607
- r !== void 0 && (t[n] = ge(r));
629
+ r !== void 0 && (t[n] = _e(r));
608
630
  }
609
631
  return t;
610
632
  }
611
- function _e(e, t) {
633
+ function Y(e, t) {
612
634
  let n = Array(e.length);
613
635
  for (let r = 0; r < e.length; r++) {
614
636
  let i = e[r];
@@ -617,35 +639,35 @@ function _e(e, t) {
617
639
  return n;
618
640
  }
619
641
  function ve(e, t, n) {
620
- let r = G(e, t);
621
- return r ? (r = n(ge(r)), [_e(e, r), r]) : [[...e], null];
642
+ let r = he(e, t);
643
+ return r ? (r = n(_e(r)), [Y(e, r), r]) : [[...e], null];
622
644
  }
623
- function J(e, t) {
624
- let n = K(e);
645
+ function ye(e, t) {
646
+ let n = ge(e);
625
647
  for (let r = 0; r < e.length; r++) {
626
648
  let i = e[r];
627
649
  if (i !== void 0) if (i.x + i.w > t.cols && (i.x = t.cols - i.w), i.x < 0 && (i.x = 0, i.w = t.cols), !i.static) n.push(i);
628
- else for (; fe(n, i);) i.y++;
650
+ else for (; K(n, i);) i.y++;
629
651
  }
630
652
  return e;
631
653
  }
632
- function ye(e, t, n, r, i, a, o, s, c) {
654
+ function X(e, t, n, r, i, a, o, s, c) {
633
655
  if (t.static && t.isDraggable !== !0 || t.y === r && t.x === n) return [...e];
634
656
  let l = t.x, u = t.y;
635
657
  typeof n == "number" && (t.x = n), typeof r == "number" && (t.y = r), t.moved = !0;
636
- let d = U(e, o);
658
+ let d = fe(e, o);
637
659
  (o === "vertical" && typeof r == "number" ? u >= r : o === "horizontal" && typeof n == "number" && l >= n) && (d = d.reverse());
638
- let f = pe(d, t), p = f.length > 0;
639
- if (p && c) return q(e);
660
+ let f = de(d, t), p = f.length > 0;
661
+ if (p && c) return J(e);
640
662
  if (p && a) return t.x = l, t.y = u, t.moved = !1, e;
641
663
  let m = [...e];
642
664
  for (let e = 0; e < f.length; e++) {
643
665
  let n = f[e];
644
- n !== void 0 && (n.moved || (m = n.static ? Y(m, n, t, i, o) : Y(m, t, n, i, o)));
666
+ n !== void 0 && (n.moved || (m = n.static ? be(m, n, t, i, o) : be(m, t, n, i, o)));
645
667
  }
646
668
  return m;
647
669
  }
648
- function Y(e, t, n, r, i, a) {
670
+ function be(e, t, n, r, i, a) {
649
671
  let o = i === "horizontal", s = i === "vertical", c = t.static;
650
672
  if (r) {
651
673
  r = !1;
@@ -655,45 +677,45 @@ function Y(e, t, n, r, i, a) {
655
677
  w: n.w,
656
678
  h: n.h,
657
679
  i: "-1"
658
- }, l = fe(e, a), u = l !== void 0 && l.y + l.h > t.y, d = l !== void 0 && t.x + t.w > l.x;
659
- if (!l) return ye(e, n, o ? a.x : void 0, s ? a.y : void 0, r, c, i);
660
- if (u && s) return ye(e, n, void 0, n.y + 1, r, c, i);
680
+ }, l = K(e, a), u = l !== void 0 && l.y + l.h > t.y, d = l !== void 0 && t.x + t.w > l.x;
681
+ if (!l) return X(e, n, o ? a.x : void 0, s ? a.y : void 0, r, c, i);
682
+ if (u && s) return X(e, n, void 0, n.y + 1, r, c, i);
661
683
  if (u && i === null) return t.y = n.y, n.y += n.h, [...e];
662
- if (d && o) return ye(e, t, n.x, void 0, r, c, i);
684
+ if (d && o) return X(e, t, n.x, void 0, r, c, i);
663
685
  }
664
686
  let l = o ? n.x + 1 : void 0, u = s ? n.y + 1 : void 0;
665
- return l === void 0 && u === void 0 ? [...e] : ye(e, n, l, u, r, c, i);
687
+ return l === void 0 && u === void 0 ? [...e] : X(e, n, l, u, r, c, i);
666
688
  }
667
689
  //#endregion
668
- //#region ../../node_modules/.pnpm/react-grid-layout@2.2.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-grid-layout/dist/chunk-XYPIYYYQ.mjs
669
- function X(e, t, n) {
690
+ //#region ../../node_modules/.pnpm/react-grid-layout@2.2.3_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/react-grid-layout/dist/chunk-KDANGDDL.mjs
691
+ function Z(e, t, n) {
670
692
  return Math.max(t, Math.min(n, e));
671
693
  }
672
- var be = [{
694
+ var xe = [{
673
695
  name: "gridBounds",
674
696
  constrainPosition(e, t, n, { cols: r, maxRows: i }) {
675
697
  return {
676
- x: X(t, 0, Math.max(0, r - e.w)),
677
- y: X(n, 0, Math.max(0, i - e.h))
698
+ x: Z(t, 0, Math.max(0, r - e.w)),
699
+ y: Z(n, 0, Math.max(0, i - e.h))
678
700
  };
679
701
  },
680
702
  constrainSize(e, t, n, r, { cols: i, maxRows: a }) {
681
703
  let o = r === "w" || r === "nw" || r === "sw" ? e.x + e.w : i - e.x, s = r === "n" || r === "nw" || r === "ne" ? e.y + e.h : a - e.y;
682
704
  return {
683
- w: X(t, 1, Math.max(1, o)),
684
- h: X(n, 1, Math.max(1, s))
705
+ w: Z(t, 1, Math.max(1, o)),
706
+ h: Z(n, 1, Math.max(1, s))
685
707
  };
686
708
  }
687
709
  }, {
688
710
  name: "minMaxSize",
689
711
  constrainSize(e, t, n) {
690
712
  return {
691
- w: X(t, e.minW ?? 1, e.maxW ?? Infinity),
692
- h: X(n, e.minH ?? 1, e.maxH ?? Infinity)
713
+ w: Z(t, e.minW ?? 1, e.maxW ?? Infinity),
714
+ h: Z(n, e.minH ?? 1, e.maxH ?? Infinity)
693
715
  };
694
716
  }
695
717
  }];
696
- function xe(e, t, n, r, i) {
718
+ function Se(e, t, n, r, i) {
697
719
  let a = {
698
720
  x: n,
699
721
  y: r
@@ -702,7 +724,7 @@ function xe(e, t, n, r, i) {
702
724
  if (t.constraints) for (let e of t.constraints) e.constrainPosition && (a = e.constrainPosition(t, a.x, a.y, i));
703
725
  return a;
704
726
  }
705
- function Z(e, t, n, r, i, a) {
727
+ function Q(e, t, n, r, i, a) {
706
728
  let o = {
707
729
  w: n,
708
730
  h: r
@@ -711,7 +733,7 @@ function Z(e, t, n, r, i, a) {
711
733
  if (t.constraints) for (let e of t.constraints) e.constrainSize && (o = e.constrainSize(t, o.w, o.h, i, a));
712
734
  return o;
713
735
  }
714
- function Se({ top: e, left: t, width: n, height: r }) {
736
+ function Ce({ top: e, left: t, width: n, height: r }) {
715
737
  let i = `translate(${t}px,${e}px)`;
716
738
  return {
717
739
  transform: i,
@@ -724,7 +746,7 @@ function Se({ top: e, left: t, width: n, height: r }) {
724
746
  position: "absolute"
725
747
  };
726
748
  }
727
- function Q({ top: e, left: t, width: n, height: r }) {
749
+ function we({ top: e, left: t, width: n, height: r }) {
728
750
  return {
729
751
  top: `${e}px`,
730
752
  left: `${t}px`,
@@ -733,190 +755,190 @@ function Q({ top: e, left: t, width: n, height: r }) {
733
755
  position: "absolute"
734
756
  };
735
757
  }
736
- function Ce(e) {
758
+ function Te(e) {
737
759
  return e * 100 + "%";
738
760
  }
739
- function we(e, t, n, r) {
761
+ function $(e, t, n, r) {
740
762
  return e + n > r ? t : n;
741
763
  }
742
- function Te(e, t, n) {
764
+ function Ee(e, t, n) {
743
765
  return e < 0 ? t : n;
744
766
  }
745
- function $(e) {
767
+ function De(e) {
746
768
  return Math.max(0, e);
747
769
  }
748
- function Ee(e) {
770
+ function Oe(e) {
749
771
  return Math.max(0, e);
750
772
  }
751
- var De = (e, t, n) => {
773
+ var ke = (e, t, n) => {
752
774
  let { left: r, height: i, width: a } = t, o = e.top - (i - e.height);
753
775
  return {
754
776
  left: r,
755
777
  width: a,
756
- height: Te(o, e.height, i),
757
- top: Ee(o)
778
+ height: Ee(o, e.height, i),
779
+ top: Oe(o)
758
780
  };
759
- }, Oe = (e, t, n) => {
781
+ }, Ae = (e, t, n) => {
760
782
  let { top: r, left: i, height: a, width: o } = t;
761
783
  return {
762
784
  top: r,
763
785
  height: a,
764
- width: we(e.left, e.width, o, n),
765
- left: $(i)
786
+ width: $(e.left, e.width, o, n),
787
+ left: De(i)
766
788
  };
767
- }, ke = (e, t, n) => {
789
+ }, je = (e, t, n) => {
768
790
  let { top: r, height: i, width: a } = t, o = e.left + e.width - a;
769
791
  return o < 0 ? {
770
792
  height: i,
771
793
  width: e.left + e.width,
772
- top: Ee(r),
794
+ top: Oe(r),
773
795
  left: 0
774
796
  } : {
775
797
  height: i,
776
798
  width: a,
777
- top: Ee(r),
799
+ top: Oe(r),
778
800
  left: o
779
801
  };
780
- }, Ae = (e, t, n) => {
802
+ }, Me = (e, t, n) => {
781
803
  let { top: r, left: i, height: a, width: o } = t;
782
804
  return {
783
805
  width: o,
784
806
  left: i,
785
- height: Te(r, e.height, a),
786
- top: Ee(r)
807
+ height: Ee(r, e.height, a),
808
+ top: Oe(r)
787
809
  };
788
- }, je = {
789
- n: De,
790
- ne: (e, t, n) => De(e, Oe(e, t, n)),
791
- e: Oe,
792
- se: (e, t, n) => Ae(e, Oe(e, t, n)),
793
- s: Ae,
794
- sw: (e, t, n) => Ae(e, ke(e, t)),
795
- w: ke,
796
- nw: (e, t, n) => De(e, ke(e, t))
810
+ }, Ne = {
811
+ n: ke,
812
+ ne: (e, t, n) => ke(e, Ae(e, t, n)),
813
+ e: Ae,
814
+ se: (e, t, n) => Me(e, Ae(e, t, n)),
815
+ s: Me,
816
+ sw: (e, t, n) => Me(e, je(e, t)),
817
+ w: je,
818
+ nw: (e, t, n) => ke(e, je(e, t))
797
819
  };
798
- function Me(e, t, n, r) {
799
- let i = je[e];
820
+ function Pe(e, t, n, r) {
821
+ let i = Ne[e];
800
822
  return i ? i(t, {
801
823
  ...t,
802
824
  ...n
803
825
  }, r) : n;
804
826
  }
805
- var Ne = {
827
+ var Fe = {
806
828
  type: "transform",
807
829
  scale: 1,
808
830
  calcStyle(e) {
809
- return Se(e);
831
+ return Ce(e);
810
832
  }
811
- }, Pe = {
833
+ }, Ie = {
812
834
  cols: 12,
813
835
  rowHeight: 150,
814
836
  margin: [10, 10],
815
837
  containerPadding: null,
816
838
  maxRows: Infinity
817
- }, Fe = {
839
+ }, Le = {
818
840
  enabled: !0,
819
841
  bounded: !1,
820
842
  threshold: 3
821
- }, Ie = {
843
+ }, Re = {
822
844
  enabled: !0,
823
845
  handles: ["se"]
824
- }, Le = {
846
+ }, ze = {
825
847
  enabled: !1,
826
848
  defaultItem: {
827
849
  w: 1,
828
850
  h: 1
829
851
  }
830
852
  };
831
- function Re(e, t, n, r, i) {
853
+ function Be(e, t, n, r, i) {
832
854
  let a = r === "x" ? "w" : "h";
833
855
  t[r] += 1;
834
- let o = e.findIndex((e) => e.i === t.i), s = i ?? K(e).length > 0;
856
+ let o = e.findIndex((e) => e.i === t.i), s = i ?? ge(e).length > 0;
835
857
  for (let i = o + 1; i < e.length; i++) {
836
858
  let o = e[i];
837
859
  if (o !== void 0 && !o.static) {
838
860
  if (!s && o.y > t.y + t.h) break;
839
- de(t, o) && Re(e, o, n + t[a], r, s);
861
+ G(t, o) && Be(e, o, n + t[a], r, s);
840
862
  }
841
863
  }
842
864
  t[r] = n;
843
865
  }
844
- function ze(e, t, n, r) {
845
- for (t.x = Math.max(t.x, 0), t.y = Math.max(t.y, 0), t.y = Math.min(r, t.y); t.y > 0 && !fe(e, t);) t.y--;
866
+ function Ve(e, t, n, r) {
867
+ for (t.x = Math.max(t.x, 0), t.y = Math.max(t.y, 0), t.y = Math.min(r, t.y); t.y > 0 && !K(e, t);) t.y--;
846
868
  let i;
847
- for (; (i = fe(e, t)) !== void 0;) Re(n, t, i.y + i.h, "y");
869
+ for (; (i = K(e, t)) !== void 0;) Be(n, t, i.y + i.h, "y");
848
870
  return t.y = Math.max(t.y, 0), t;
849
871
  }
850
- function Be(e, t, n, r) {
851
- for (t.x = Math.max(t.x, 0), t.y = Math.max(t.y, 0); t.x > 0 && !fe(e, t);) t.x--;
872
+ function He(e, t, n, r) {
873
+ for (t.x = Math.max(t.x, 0), t.y = Math.max(t.y, 0); t.x > 0 && !K(e, t);) t.x--;
852
874
  let i;
853
- for (; (i = fe(e, t)) !== void 0;) if (Re(r, t, i.x + i.w, "x"), t.x + t.w > n) for (t.x = n - t.w, t.y++; t.x > 0 && !fe(e, t);) t.x--;
875
+ for (; (i = K(e, t)) !== void 0;) if (Be(r, t, i.x + i.w, "x"), t.x + t.w > n) for (t.x = n - t.w, t.y++; t.x > 0 && !K(e, t);) t.x--;
854
876
  return t.x = Math.max(t.x, 0), t;
855
877
  }
856
- var Ve = {
878
+ var Ue = {
857
879
  type: "vertical",
858
880
  allowOverlap: !1,
859
881
  compact(e, t) {
860
- let n = K(e), r = he(n), i = W(e), a = Array(e.length);
882
+ let n = ge(e), r = me(n), i = pe(e), a = Array(e.length);
861
883
  for (let t = 0; t < i.length; t++) {
862
884
  let o = i[t];
863
885
  if (o === void 0) continue;
864
- let s = ge(o);
865
- s.static || (s = ze(n, s, i, r), r = Math.max(r, s.y + s.h), n.push(s));
886
+ let s = _e(o);
887
+ s.static || (s = Ve(n, s, i, r), r = Math.max(r, s.y + s.h), n.push(s));
866
888
  let c = e.indexOf(o);
867
889
  a[c] = s, s.moved = !1;
868
890
  }
869
891
  return a;
870
892
  }
871
- }, He = {
893
+ }, We = {
872
894
  type: "horizontal",
873
895
  allowOverlap: !1,
874
896
  compact(e, t) {
875
- let n = K(e), r = me(e), i = Array(e.length);
897
+ let n = ge(e), r = q(e), i = Array(e.length);
876
898
  for (let a = 0; a < r.length; a++) {
877
899
  let o = r[a];
878
900
  if (o === void 0) continue;
879
- let s = ge(o);
880
- s.static || (s = Be(n, s, t, r), n.push(s));
901
+ let s = _e(o);
902
+ s.static || (s = He(n, s, t, r), n.push(s));
881
903
  let c = e.indexOf(o);
882
904
  i[c] = s, s.moved = !1;
883
905
  }
884
906
  return i;
885
907
  }
886
- }, Ue = {
908
+ }, Ge = {
887
909
  type: null,
888
910
  allowOverlap: !1,
889
911
  compact(e, t) {
890
- return q(e);
912
+ return J(e);
891
913
  }
892
- }, We = {
893
- ...Ve,
914
+ }, Ke = {
915
+ ...Ue,
894
916
  allowOverlap: !0,
895
917
  compact(e, t) {
896
- return q(e);
918
+ return J(e);
897
919
  }
898
- }, Ge = {
899
- ...He,
920
+ }, qe = {
921
+ ...We,
900
922
  allowOverlap: !0,
901
923
  compact(e, t) {
902
- return q(e);
924
+ return J(e);
903
925
  }
904
- }, Ke = {
905
- ...Ue,
926
+ }, Je = {
927
+ ...Ge,
906
928
  allowOverlap: !0
907
929
  };
908
- function qe(e, t = !1, n = !1) {
930
+ function Ye(e, t = !1, n = !1) {
909
931
  let r;
910
- return r = t ? e === "vertical" ? We : e === "horizontal" ? Ge : Ke : e === "vertical" ? Ve : e === "horizontal" ? He : Ue, n ? {
932
+ return r = t ? e === "vertical" ? Ke : e === "horizontal" ? qe : Je : e === "vertical" ? Ue : e === "horizontal" ? We : Ge, n ? {
911
933
  ...r,
912
934
  preventCollision: n
913
935
  } : r;
914
936
  }
915
- function Je(e) {
937
+ function Xe(e) {
916
938
  return Object.keys(e).sort((t, n) => e[t] - e[n]);
917
939
  }
918
- function Ye(e, t) {
919
- let n = Je(e), r = n[0];
940
+ function Ze(e, t) {
941
+ let n = Xe(e), r = n[0];
920
942
  if (r === void 0) throw Error("No breakpoints defined");
921
943
  for (let i = 1; i < n.length; i++) {
922
944
  let a = n[i];
@@ -924,15 +946,15 @@ function Ye(e, t) {
924
946
  }
925
947
  return r;
926
948
  }
927
- function Xe(e, t) {
949
+ function Qe(e, t) {
928
950
  let n = t[e];
929
951
  if (n === void 0) throw Error(`ResponsiveReactGridLayout: \`cols\` entry for breakpoint ${String(e)} is missing!`);
930
952
  return n;
931
953
  }
932
- function Ze(e, t, n, r, i, a) {
954
+ function $e(e, t, n, r, i, a) {
933
955
  let o = e[n];
934
- if (o) return q(o);
935
- let s = e[r], c = Je(t), l = c.slice(c.indexOf(n));
956
+ if (o) return J(o);
957
+ let s = e[r], c = Xe(t), l = c.slice(c.indexOf(n));
936
958
  for (let t = 0; t < l.length; t++) {
937
959
  let n = l[t];
938
960
  if (n === void 0) continue;
@@ -942,10 +964,10 @@ function Ze(e, t, n, r, i, a) {
942
964
  break;
943
965
  }
944
966
  }
945
- let u = J(q(s || []), { cols: i });
946
- return (typeof a == "object" && a ? a : qe(a)).compact(u, i);
967
+ let u = ye(J(s || []), { cols: i });
968
+ return (typeof a == "object" && a ? a : Ye(a)).compact(u, i);
947
969
  }
948
- function Qe(e, t) {
970
+ function et(e, t) {
949
971
  if (Array.isArray(e)) return e;
950
972
  let n = e, r = n[t];
951
973
  if (r !== void 0) return r;
@@ -958,7 +980,7 @@ function Qe(e, t) {
958
980
  }
959
981
  //#endregion
960
982
  //#region ../../node_modules/.pnpm/fast-equals@4.0.3/node_modules/fast-equals/dist/fast-equals.js
961
- var $e = /* @__PURE__ */ L(((e, t) => {
983
+ var tt = /* @__PURE__ */ z(((e, t) => {
962
984
  (function(n, r) {
963
985
  typeof e == "object" && t !== void 0 ? r(e) : typeof define == "function" && define.amd ? define(["exports"], r) : (n = typeof globalThis < "u" ? globalThis : n || self, r(n["fast-equals"] = {}));
964
986
  })(e, (function(e) {
@@ -1088,14 +1110,14 @@ var $e = /* @__PURE__ */ L(((e, t) => {
1088
1110
  return P(e, t, void 0);
1089
1111
  }
1090
1112
  var I = _(j);
1091
- function ee(e, t) {
1113
+ function L(e, t) {
1092
1114
  return I(e, t, /* @__PURE__ */ new WeakMap());
1093
1115
  }
1094
- var L = _(r(j, { createIsNestedEqual: function() {
1116
+ var R = _(r(j, { createIsNestedEqual: function() {
1095
1117
  return o;
1096
1118
  } }));
1097
- function R(e, t) {
1098
- return L(e, t, /* @__PURE__ */ new WeakMap());
1119
+ function ee(e, t) {
1120
+ return R(e, t, /* @__PURE__ */ new WeakMap());
1099
1121
  }
1100
1122
  function z(e) {
1101
1123
  return _(r(A, e(A)));
@@ -1106,12 +1128,12 @@ var $e = /* @__PURE__ */ L(((e, t) => {
1106
1128
  return r === void 0 && (r = /* @__PURE__ */ new WeakMap()), t(e, n, r);
1107
1129
  });
1108
1130
  }
1109
- e.circularDeepEqual = ee, e.circularShallowEqual = R, e.createCustomCircularEqual = B, e.createCustomEqual = z, e.deepEqual = N, e.sameValueZeroEqual = o, e.shallowEqual = F, Object.defineProperty(e, "__esModule", { value: !0 });
1131
+ e.circularDeepEqual = L, e.circularShallowEqual = ee, e.createCustomCircularEqual = B, e.createCustomEqual = z, e.deepEqual = N, e.sameValueZeroEqual = o, e.shallowEqual = F, Object.defineProperty(e, "__esModule", { value: !0 });
1110
1132
  }));
1111
1133
  }));
1112
1134
  //#endregion
1113
- //#region ../../node_modules/.pnpm/react-grid-layout@2.2.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-grid-layout/dist/chunk-YFVX5RDK.mjs
1114
- function et(e = {}) {
1135
+ //#region ../../node_modules/.pnpm/react-grid-layout@2.2.3_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/react-grid-layout/dist/chunk-PZLKKWSX.mjs
1136
+ function nt(e = {}) {
1115
1137
  let { measureBeforeMount: t = !1, initialWidth: n = 1280 } = e, [r, i] = E(n), [a, o] = E(!t), s = T(null), c = T(null), l = x(() => {
1116
1138
  let e = s.current;
1117
1139
  if (e) {
@@ -1121,15 +1143,25 @@ function et(e = {}) {
1121
1143
  }, [a]);
1122
1144
  return C(() => {
1123
1145
  let e = s.current;
1124
- if (e) return l(), typeof ResizeObserver < "u" && (c.current = new ResizeObserver((e) => {
1125
- let t = e[0];
1126
- if (t) {
1127
- let e = t.contentRect.width;
1128
- i(e);
1146
+ if (e) {
1147
+ if (l(), typeof ResizeObserver < "u") {
1148
+ let t = null;
1149
+ return c.current = new ResizeObserver((e) => {
1150
+ let n = e[0];
1151
+ if (n) {
1152
+ let e = n.contentRect.width;
1153
+ t !== null && cancelAnimationFrame(t), t = requestAnimationFrame(() => {
1154
+ i(e), t = null;
1155
+ });
1156
+ }
1157
+ }), c.current.observe(e), () => {
1158
+ t !== null && cancelAnimationFrame(t), c.current &&= (c.current.disconnect(), null);
1159
+ };
1129
1160
  }
1130
- }), c.current.observe(e)), () => {
1131
- c.current &&= (c.current.disconnect(), null);
1132
- };
1161
+ return () => {
1162
+ c.current &&= (c.current.disconnect(), null);
1163
+ };
1164
+ }
1133
1165
  }, [l]), {
1134
1166
  width: r,
1135
1167
  mounted: a,
@@ -1139,7 +1171,7 @@ function et(e = {}) {
1139
1171
  }
1140
1172
  //#endregion
1141
1173
  //#region ../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js
1142
- var tt = /* @__PURE__ */ L(((e) => {
1174
+ var rt = /* @__PURE__ */ z(((e) => {
1143
1175
  var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
1144
1176
  function b(e) {
1145
1177
  if (typeof e == "object" && e) {
@@ -1195,7 +1227,7 @@ var tt = /* @__PURE__ */ L(((e) => {
1195
1227
  }, e.isValidElementType = function(e) {
1196
1228
  return typeof e == "string" || typeof e == "function" || e === i || e === u || e === o || e === a || e === f || e === p || typeof e == "object" && !!e && (e.$$typeof === h || e.$$typeof === m || e.$$typeof === s || e.$$typeof === c || e.$$typeof === d || e.$$typeof === _ || e.$$typeof === v || e.$$typeof === y || e.$$typeof === g);
1197
1229
  }, e.typeOf = b;
1198
- })), nt = /* @__PURE__ */ L(((e) => {
1230
+ })), it = /* @__PURE__ */ z(((e) => {
1199
1231
  process.env.NODE_ENV !== "production" && (function() {
1200
1232
  var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
1201
1233
  function b(e) {
@@ -1231,15 +1263,15 @@ var tt = /* @__PURE__ */ L(((e) => {
1231
1263
  }
1232
1264
  var S = l, C = u, w = c, T = s, E = n, D = d, O = i, k = h, A = m, j = r, M = o, N = a, P = f, F = !1;
1233
1265
  function I(e) {
1234
- return F || (F = !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.")), ee(e) || x(e) === l;
1266
+ return F || (F = !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.")), L(e) || x(e) === l;
1235
1267
  }
1236
- function ee(e) {
1268
+ function L(e) {
1237
1269
  return x(e) === u;
1238
1270
  }
1239
- function L(e) {
1271
+ function R(e) {
1240
1272
  return x(e) === c;
1241
1273
  }
1242
- function R(e) {
1274
+ function ee(e) {
1243
1275
  return x(e) === s;
1244
1276
  }
1245
1277
  function z(e) {
@@ -1248,32 +1280,32 @@ var tt = /* @__PURE__ */ L(((e) => {
1248
1280
  function B(e) {
1249
1281
  return x(e) === d;
1250
1282
  }
1251
- function te(e) {
1283
+ function V(e) {
1252
1284
  return x(e) === i;
1253
1285
  }
1254
- function V(e) {
1286
+ function H(e) {
1255
1287
  return x(e) === h;
1256
1288
  }
1257
- function H(e) {
1289
+ function te(e) {
1258
1290
  return x(e) === m;
1259
1291
  }
1260
- function ne(e) {
1292
+ function U(e) {
1261
1293
  return x(e) === r;
1262
1294
  }
1263
- function re(e) {
1295
+ function W(e) {
1264
1296
  return x(e) === o;
1265
1297
  }
1266
- function ie(e) {
1298
+ function ne(e) {
1267
1299
  return x(e) === a;
1268
1300
  }
1269
- function ae(e) {
1301
+ function re(e) {
1270
1302
  return x(e) === f;
1271
1303
  }
1272
- e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = I, e.isConcurrentMode = ee, e.isContextConsumer = L, e.isContextProvider = R, e.isElement = z, e.isForwardRef = B, e.isFragment = te, e.isLazy = V, e.isMemo = H, e.isPortal = ne, e.isProfiler = re, e.isStrictMode = ie, e.isSuspense = ae, e.isValidElementType = b, e.typeOf = x;
1304
+ e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = I, e.isConcurrentMode = L, e.isContextConsumer = R, e.isContextProvider = ee, e.isElement = z, e.isForwardRef = B, e.isFragment = V, e.isLazy = H, e.isMemo = te, e.isPortal = U, e.isProfiler = W, e.isStrictMode = ne, e.isSuspense = re, e.isValidElementType = b, e.typeOf = x;
1273
1305
  })();
1274
- })), rt = /* @__PURE__ */ L(((e, t) => {
1275
- process.env.NODE_ENV === "production" ? t.exports = tt() : t.exports = nt();
1276
- })), it = /* @__PURE__ */ L(((e, t) => {
1306
+ })), at = /* @__PURE__ */ z(((e, t) => {
1307
+ process.env.NODE_ENV === "production" ? t.exports = rt() : t.exports = it();
1308
+ })), ot = /* @__PURE__ */ z(((e, t) => {
1277
1309
  var n = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
1278
1310
  function a(e) {
1279
1311
  if (e == null) throw TypeError("Object.assign cannot be called with null or undefined");
@@ -1306,14 +1338,14 @@ var tt = /* @__PURE__ */ L(((e) => {
1306
1338
  }
1307
1339
  return s;
1308
1340
  };
1309
- })), at = /* @__PURE__ */ L(((e, t) => {
1341
+ })), st = /* @__PURE__ */ z(((e, t) => {
1310
1342
  t.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
1311
- })), ot = /* @__PURE__ */ L(((e, t) => {
1343
+ })), ct = /* @__PURE__ */ z(((e, t) => {
1312
1344
  t.exports = Function.call.bind(Object.prototype.hasOwnProperty);
1313
- })), st = /* @__PURE__ */ L(((e, t) => {
1345
+ })), lt = /* @__PURE__ */ z(((e, t) => {
1314
1346
  var n = function() {};
1315
1347
  if (process.env.NODE_ENV !== "production") {
1316
- var r = at(), i = {}, a = ot();
1348
+ var r = st(), i = {}, a = ct();
1317
1349
  n = function(e) {
1318
1350
  var t = "Warning: " + e;
1319
1351
  typeof console < "u" && console.error(t);
@@ -1346,8 +1378,8 @@ var tt = /* @__PURE__ */ L(((e) => {
1346
1378
  o.resetWarningCache = function() {
1347
1379
  process.env.NODE_ENV !== "production" && (i = {});
1348
1380
  }, t.exports = o;
1349
- })), ct = /* @__PURE__ */ L(((e, t) => {
1350
- var n = rt(), r = it(), i = at(), a = ot(), o = st(), s = function() {};
1381
+ })), ut = /* @__PURE__ */ z(((e, t) => {
1382
+ var n = at(), r = ot(), i = st(), a = ct(), o = lt(), s = function() {};
1351
1383
  process.env.NODE_ENV !== "production" && (s = function(e) {
1352
1384
  var t = "Warning: " + e;
1353
1385
  typeof console < "u" && console.error(t);
@@ -1605,8 +1637,8 @@ var tt = /* @__PURE__ */ L(((e) => {
1605
1637
  }
1606
1638
  return p.checkPropTypes = o, p.resetWarningCache = o.resetWarningCache, p.PropTypes = p, p;
1607
1639
  };
1608
- })), lt = /* @__PURE__ */ L(((e, t) => {
1609
- var n = at();
1640
+ })), dt = /* @__PURE__ */ z(((e, t) => {
1641
+ var n = st();
1610
1642
  function r() {}
1611
1643
  function i() {}
1612
1644
  i.resetWarningCache = r, t.exports = function() {
@@ -1645,12 +1677,12 @@ var tt = /* @__PURE__ */ L(((e) => {
1645
1677
  };
1646
1678
  return a.PropTypes = a, a;
1647
1679
  };
1648
- })), ut = /* @__PURE__ */ L(((e, t) => {
1680
+ })), ft = /* @__PURE__ */ z(((e, t) => {
1649
1681
  if (process.env.NODE_ENV !== "production") {
1650
- var n = rt();
1651
- t.exports = ct()(n.isElement, !0);
1652
- } else t.exports = lt()();
1653
- })), dt = /* @__PURE__ */ L(((e) => {
1682
+ var n = at();
1683
+ t.exports = ut()(n.isElement, !0);
1684
+ } else t.exports = dt()();
1685
+ })), pt = /* @__PURE__ */ z(((e) => {
1654
1686
  Object.defineProperty(e, "__esModule", { value: !0 }), e.dontSetMe = a, e.findInArray = t, e.int = i, e.isFunction = n, e.isNum = r;
1655
1687
  function t(e, t) {
1656
1688
  for (let n = 0, r = e.length; n < r; n++) if (t.apply(t, [
@@ -1671,7 +1703,7 @@ var tt = /* @__PURE__ */ L(((e) => {
1671
1703
  function a(e, t, n) {
1672
1704
  if (e[t]) return /* @__PURE__ */ Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`);
1673
1705
  }
1674
- })), ft = /* @__PURE__ */ L(((e) => {
1706
+ })), mt = /* @__PURE__ */ z(((e) => {
1675
1707
  Object.defineProperty(e, "__esModule", { value: !0 }), e.browserPrefixToKey = r, e.browserPrefixToStyle = i, e.default = void 0, e.getPrefix = n;
1676
1708
  var t = [
1677
1709
  "Moz",
@@ -1699,9 +1731,9 @@ var tt = /* @__PURE__ */ L(((e) => {
1699
1731
  return t;
1700
1732
  }
1701
1733
  e.default = n();
1702
- })), pt = /* @__PURE__ */ L(((e) => {
1734
+ })), ht = /* @__PURE__ */ z(((e) => {
1703
1735
  Object.defineProperty(e, "__esModule", { value: !0 }), e.addClassName = S, e.addEvent = s, e.addUserSelectStyles = y, e.createCSSTransform = m, e.createSVGTransform = h, e.getTouch = _, e.getTouchIdentifier = v, e.getTranslation = g, e.innerHeight = d, e.innerWidth = f, e.matchesSelector = a, e.matchesSelectorAndParentsTo = o, e.offsetXYFromParent = p, e.outerHeight = l, e.outerWidth = u, e.removeClassName = C, e.removeEvent = c, e.scheduleRemoveUserSelectStyles = b;
1704
- var t = dt(), n = r(ft());
1736
+ var t = pt(), n = r(mt());
1705
1737
  function r(e, t) {
1706
1738
  if (typeof WeakMap == "function") var n = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap();
1707
1739
  return (r = function(e, t) {
@@ -1825,9 +1857,9 @@ var tt = /* @__PURE__ */ L(((e) => {
1825
1857
  function C(e, t) {
1826
1858
  e.classList ? e.classList.remove(t) : e.className = e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`, "g"), "");
1827
1859
  }
1828
- })), mt = /* @__PURE__ */ L(((e) => {
1860
+ })), gt = /* @__PURE__ */ z(((e) => {
1829
1861
  Object.defineProperty(e, "__esModule", { value: !0 }), e.canDragX = a, e.canDragY = o, e.createCoreData = c, e.createDraggableData = l, e.getBoundPosition = r, e.getControlPosition = s, e.snapToGrid = i;
1830
- var t = dt(), n = pt();
1862
+ var t = pt(), n = ht();
1831
1863
  function r(e, r, i) {
1832
1864
  if (!e.props.bounds) return [r, i];
1833
1865
  let { bounds: a } = e.props;
@@ -1906,12 +1938,12 @@ var tt = /* @__PURE__ */ L(((e) => {
1906
1938
  if (!t) throw Error("<DraggableCore>: Unmounted during event!");
1907
1939
  return t;
1908
1940
  }
1909
- })), ht = /* @__PURE__ */ L(((e) => {
1941
+ })), _t = /* @__PURE__ */ z(((e) => {
1910
1942
  Object.defineProperty(e, "__esModule", { value: !0 }), e.default = t;
1911
1943
  function t() {}
1912
- })), gt = /* @__PURE__ */ L(((e) => {
1944
+ })), vt = /* @__PURE__ */ z(((e) => {
1913
1945
  Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
1914
- var t = l(R("react")), n = c(ut()), r = c(R("react-dom")), i = pt(), a = mt(), o = dt(), s = c(ht());
1946
+ var t = l(B("react")), n = c(ft()), r = c(B("react-dom")), i = ht(), a = gt(), o = pt(), s = c(_t());
1915
1947
  function c(e) {
1916
1948
  return e && e.__esModule ? e : { default: e };
1917
1949
  }
@@ -2071,14 +2103,14 @@ var tt = /* @__PURE__ */ L(((e) => {
2071
2103
  onMouseDown: function() {},
2072
2104
  scale: 1
2073
2105
  });
2074
- })), _t = /* @__PURE__ */ L(((e) => {
2106
+ })), yt = /* @__PURE__ */ z(((e) => {
2075
2107
  Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "DraggableCore", {
2076
2108
  enumerable: !0,
2077
2109
  get: function() {
2078
2110
  return c.default;
2079
2111
  }
2080
2112
  }), e.default = void 0;
2081
- var t = d(R("react")), n = u(ut()), r = u(R("react-dom")), i = R("clsx"), a = pt(), o = mt(), s = dt(), c = u(gt()), l = u(ht());
2113
+ var t = d(B("react")), n = u(ft()), r = u(B("react-dom")), i = B("clsx"), a = ht(), o = gt(), s = pt(), c = u(vt()), l = u(_t());
2082
2114
  function u(e) {
2083
2115
  return e && e.__esModule ? e : { default: e };
2084
2116
  }
@@ -2272,12 +2304,12 @@ var tt = /* @__PURE__ */ L(((e) => {
2272
2304
  },
2273
2305
  scale: 1
2274
2306
  });
2275
- })), vt = /* @__PURE__ */ L(((e, t) => {
2276
- var { default: n, DraggableCore: r } = _t();
2307
+ })), bt = /* @__PURE__ */ z(((e, t) => {
2308
+ var { default: n, DraggableCore: r } = yt();
2277
2309
  t.exports = n, t.exports.default = n, t.exports.DraggableCore = r;
2278
- })), yt = /* @__PURE__ */ L(((e) => {
2310
+ })), xt = /* @__PURE__ */ z(((e) => {
2279
2311
  e.__esModule = !0, e.cloneElement = c;
2280
- var t = n(R("react"));
2312
+ var t = n(B("react"));
2281
2313
  function n(e) {
2282
2314
  return e && e.__esModule ? e : { default: e };
2283
2315
  }
@@ -2327,10 +2359,10 @@ var tt = /* @__PURE__ */ L(((e) => {
2327
2359
  function c(e, n) {
2328
2360
  return n.style && e.props.style && (n.style = i(i({}, e.props.style), n.style)), n.className && e.props.className && (n.className = `${e.props.className} ${n.className}`), /* @__PURE__ */ t.default.cloneElement(e, n);
2329
2361
  }
2330
- })), bt = /* @__PURE__ */ L(((e) => {
2362
+ })), St = /* @__PURE__ */ z(((e) => {
2331
2363
  e.__esModule = !0, e.resizableProps = void 0;
2332
- var t = n(ut());
2333
- vt();
2364
+ var t = n(ft());
2365
+ bt();
2334
2366
  function n(e) {
2335
2367
  return e && e.__esModule ? e : { default: e };
2336
2368
  }
@@ -2389,9 +2421,9 @@ var tt = /* @__PURE__ */ L(((e) => {
2389
2421
  return n.axis === "both" || n.axis === "x" ? t.default.number.isRequired(...e) : t.default.number(...e);
2390
2422
  }
2391
2423
  };
2392
- })), xt = /* @__PURE__ */ L(((e) => {
2424
+ })), Ct = /* @__PURE__ */ z(((e) => {
2393
2425
  e.__esModule = !0, e.default = void 0;
2394
- var t = o(R("react")), n = vt(), r = yt(), i = bt(), a = [
2426
+ var t = o(B("react")), n = bt(), r = xt(), i = St(), a = [
2395
2427
  "children",
2396
2428
  "className",
2397
2429
  "draggableOpts",
@@ -2588,9 +2620,9 @@ var tt = /* @__PURE__ */ L(((e) => {
2588
2620
  resizeHandles: ["se"],
2589
2621
  transformScale: 1
2590
2622
  };
2591
- })), St = /* @__PURE__ */ L(((e) => {
2623
+ })), wt = /* @__PURE__ */ z(((e) => {
2592
2624
  e.__esModule = !0, e.default = void 0;
2593
- var t = s(R("react")), n = o(ut()), r = o(xt()), i = bt(), a = [
2625
+ var t = s(B("react")), n = o(ft()), r = o(Ct()), i = St(), a = [
2594
2626
  "handle",
2595
2627
  "handleSize",
2596
2628
  "onResize",
@@ -2741,26 +2773,26 @@ var tt = /* @__PURE__ */ L(((e) => {
2741
2773
  }
2742
2774
  };
2743
2775
  e.default = g, g.propTypes = u(u({}, i.resizableProps), {}, { children: n.default.element });
2744
- })), Ct = /* @__PURE__ */ L(((e, t) => {
2776
+ })), Tt = /* @__PURE__ */ z(((e, t) => {
2745
2777
  t.exports = function() {
2746
2778
  throw Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable");
2747
- }, t.exports.Resizable = xt().default, t.exports.ResizableBox = St().default;
2748
- })), wt = vt(), Tt = Ct(), Et = $e();
2749
- function Dt(e) {
2750
- let { children: t, cols: n, containerWidth: r, margin: i, containerPadding: a, rowHeight: o, maxRows: s, isDraggable: c, isResizable: l, isBounded: u, static: d, useCSSTransforms: f = !0, usePercentages: p = !1, transformScale: m = 1, positionStrategy: h, dragThreshold: g = 0, droppingPosition: _, className: v = "", style: b, handle: S = "", cancel: D = "", x: O, y: k, w: A, h: j, minW: M = 1, maxW: N = Infinity, minH: P = 1, maxH: F = Infinity, i: I, resizeHandles: L, resizeHandle: R, constraints: z = be, layoutItem: B, layout: te = [], onDragStart: H, onDrag: ne, onDragStop: re, onResizeStart: se, onResize: de, onResizeStop: fe } = e, [pe, U] = E(!1), [W, me] = E(!1), he = T(null), G = T({
2779
+ }, t.exports.Resizable = Ct().default, t.exports.ResizableBox = wt().default;
2780
+ })), Et = bt(), Dt = Tt(), Ot = tt();
2781
+ function kt(e) {
2782
+ let { children: t, cols: n, containerWidth: r, margin: i, containerPadding: a, rowHeight: o, maxRows: s, isDraggable: c, isResizable: l, isBounded: u, static: d, useCSSTransforms: f = !0, usePercentages: p = !1, transformScale: m = 1, positionStrategy: h, dragThreshold: g = 0, droppingPosition: _, className: v = "", style: b, handle: S = "", cancel: D = "", x: O, y: k, w: A, h: j, minW: M = 1, maxW: N = Infinity, minH: P = 1, maxH: F = Infinity, i: I, resizeHandles: L, resizeHandle: R, constraints: z = xe, layoutItem: B, layout: V = [], onDragStart: H, onDrag: te, onDragStop: W, onResizeStart: ne, onResize: re, onResizeStop: se } = e, [G, K] = E(!1), [de, fe] = E(!1), pe = T(null), q = T({
2751
2783
  left: 0,
2752
2784
  top: 0
2753
- }), K = T({
2785
+ }), me = T({
2754
2786
  top: 0,
2755
2787
  left: 0,
2756
2788
  width: 0,
2757
2789
  height: 0
2758
- }), ge = T(void 0), q = T(te);
2759
- q.current = te;
2760
- let _e = T(null), ve = T(null), J = T(!1), ye = T({
2790
+ }), he = T(void 0), ge = T(V);
2791
+ ge.current = V;
2792
+ let _e = T(null), J = T(null), Y = T(!1), ve = T({
2761
2793
  x: 0,
2762
2794
  y: 0
2763
- }), Y = T(!1), X = w(() => ({
2795
+ }), ye = T(!1), X = w(() => ({
2764
2796
  cols: n,
2765
2797
  containerPadding: a,
2766
2798
  containerWidth: r,
@@ -2774,7 +2806,7 @@ function Dt(e) {
2774
2806
  i,
2775
2807
  s,
2776
2808
  o
2777
- ]), we = w(() => ({
2809
+ ]), be = w(() => ({
2778
2810
  cols: n,
2779
2811
  maxRows: s,
2780
2812
  containerWidth: r,
@@ -2788,10 +2820,10 @@ function Dt(e) {
2788
2820
  r,
2789
2821
  o,
2790
2822
  i
2791
- ]), Te = x(() => ({
2792
- ...we,
2793
- layout: q.current
2794
- }), [we]), $ = w(() => B ?? {
2823
+ ]), Z = x(() => ({
2824
+ ...be,
2825
+ layout: ge.current
2826
+ }), [be]), $ = w(() => B ?? {
2795
2827
  i: I,
2796
2828
  x: O,
2797
2829
  y: k,
@@ -2814,12 +2846,12 @@ function Dt(e) {
2814
2846
  F
2815
2847
  ]), Ee = x((e) => {
2816
2848
  if (h?.calcStyle) return h.calcStyle(e);
2817
- if (f) return Se(e);
2818
- let t = Q(e);
2849
+ if (f) return Ce(e);
2850
+ let t = we(e);
2819
2851
  return p ? {
2820
2852
  ...t,
2821
- left: Ce(e.left / r),
2822
- width: Ce(e.width / r)
2853
+ left: Te(e.left / r),
2854
+ width: Te(e.width / r)
2823
2855
  } : t;
2824
2856
  }, [
2825
2857
  h,
@@ -2838,16 +2870,16 @@ function Dt(e) {
2838
2870
  left: a - o + n.scrollLeft,
2839
2871
  top: s - c + n.scrollTop
2840
2872
  };
2841
- if (G.current = l, g > 0) {
2873
+ if (q.current = l, g > 0) {
2842
2874
  let t = e;
2843
- ye.current = {
2875
+ ve.current = {
2844
2876
  x: t.clientX,
2845
2877
  y: t.clientY
2846
- }, J.current = !0, Y.current = !1, U(!0);
2878
+ }, Y.current = !0, ye.current = !1, K(!0);
2847
2879
  return;
2848
2880
  }
2849
- U(!0);
2850
- let u = ce(X, l.top, l.left), { x: d, y: f } = xe(z, $, u.x, u.y, Te());
2881
+ K(!0);
2882
+ let u = ce(X, l.top, l.left), { x: d, y: f } = Se(z, $, u.x, u.y, Z());
2851
2883
  H(I, d, f, {
2852
2884
  e,
2853
2885
  node: t,
@@ -2861,24 +2893,24 @@ function Dt(e) {
2861
2893
  g,
2862
2894
  z,
2863
2895
  $,
2864
- Te,
2896
+ Z,
2865
2897
  I
2866
2898
  ]), Oe = x((e, { node: t, deltaX: n, deltaY: a }) => {
2867
- if (!ne || !pe) return;
2899
+ if (!te || !G) return;
2868
2900
  let s = e;
2869
- if (J.current && !Y.current) {
2870
- let n = s.clientX - ye.current.x, r = s.clientY - ye.current.y;
2901
+ if (Y.current && !ye.current) {
2902
+ let n = s.clientX - ve.current.x, r = s.clientY - ve.current.y;
2871
2903
  if (Math.hypot(n, r) < g) return;
2872
- if (Y.current = !0, J.current = !1, H) {
2873
- let n = ce(X, G.current.top, G.current.left), { x: r, y: i } = xe(z, $, n.x, n.y, Te());
2904
+ if (ye.current = !0, Y.current = !1, H) {
2905
+ let n = ce(X, q.current.top, q.current.left), { x: r, y: i } = Se(z, $, n.x, n.y, Z());
2874
2906
  H(I, r, i, {
2875
2907
  e,
2876
2908
  node: t,
2877
- newPosition: G.current
2909
+ newPosition: q.current
2878
2910
  });
2879
2911
  }
2880
2912
  }
2881
- let c = G.current.top + a, l = G.current.left + n;
2913
+ let c = q.current.top + a, l = q.current.left + n;
2882
2914
  if (u) {
2883
2915
  let { offsetParent: e } = t;
2884
2916
  if (e) {
@@ -2892,17 +2924,17 @@ function Dt(e) {
2892
2924
  top: c,
2893
2925
  left: l
2894
2926
  };
2895
- G.current = d;
2896
- let f = ce(X, c, l), { x: p, y: m } = xe(z, $, f.x, f.y, Te());
2897
- ne(I, p, m, {
2927
+ q.current = d;
2928
+ let f = ce(X, c, l), { x: p, y: m } = Se(z, $, f.x, f.y, Z());
2929
+ te(I, p, m, {
2898
2930
  e,
2899
2931
  node: t,
2900
2932
  newPosition: d
2901
2933
  });
2902
2934
  }, [
2903
- ne,
2935
+ te,
2904
2936
  H,
2905
- pe,
2937
+ G,
2906
2938
  g,
2907
2939
  u,
2908
2940
  j,
@@ -2914,54 +2946,54 @@ function Dt(e) {
2914
2946
  I,
2915
2947
  z,
2916
2948
  $,
2917
- Te
2949
+ Z
2918
2950
  ]), ke = x((e, { node: t }) => {
2919
- if (!re || !pe) return;
2920
- let n = J.current;
2921
- if (J.current = !1, Y.current = !1, ye.current = {
2951
+ if (!W || !G) return;
2952
+ let n = Y.current;
2953
+ if (Y.current = !1, ye.current = !1, ve.current = {
2922
2954
  x: 0,
2923
2955
  y: 0
2924
2956
  }, n) {
2925
- U(!1), G.current = {
2957
+ K(!1), q.current = {
2926
2958
  left: 0,
2927
2959
  top: 0
2928
2960
  };
2929
2961
  return;
2930
2962
  }
2931
- let { left: r, top: i } = G.current, a = {
2963
+ let { left: r, top: i } = q.current, a = {
2932
2964
  top: i,
2933
2965
  left: r
2934
2966
  };
2935
- U(!1), G.current = {
2967
+ K(!1), q.current = {
2936
2968
  left: 0,
2937
2969
  top: 0
2938
2970
  };
2939
- let o = ce(X, i, r), { x: s, y: c } = xe(z, $, o.x, o.y, Te());
2940
- re(I, s, c, {
2971
+ let o = ce(X, i, r), { x: s, y: c } = Se(z, $, o.x, o.y, Z());
2972
+ W(I, s, c, {
2941
2973
  e,
2942
2974
  node: t,
2943
2975
  newPosition: a
2944
2976
  });
2945
2977
  }, [
2946
- re,
2947
- pe,
2978
+ W,
2979
+ G,
2948
2980
  X,
2949
2981
  z,
2950
2982
  $,
2951
- Te,
2983
+ Z,
2952
2984
  I
2953
2985
  ]);
2954
- _e.current = De, ve.current = Oe;
2986
+ _e.current = De, J.current = Oe;
2955
2987
  let Ae = x((e, { node: t, size: n, handle: i }, a, o) => {
2956
- let s = o === "onResizeStart" ? se : o === "onResize" ? de : fe;
2988
+ let s = o === "onResizeStart" ? ne : o === "onResize" ? re : se;
2957
2989
  if (!s) return;
2958
2990
  let c;
2959
- c = t ? Me(i, a, n, r) : {
2991
+ c = t ? Pe(i, a, n, r) : {
2960
2992
  ...n,
2961
2993
  top: a.top,
2962
2994
  left: a.left
2963
- }, K.current = c;
2964
- let l = le(X, c.width, c.height), { w: u, h: d } = Z(z, $, l.w, l.h, i, Te());
2995
+ }, me.current = c;
2996
+ let l = le(X, c.width, c.height), { w: u, h: d } = Q(z, $, l.w, l.h, i, Z());
2965
2997
  s(I, u, d, {
2966
2998
  e: e.nativeEvent,
2967
2999
  node: t,
@@ -2969,17 +3001,17 @@ function Dt(e) {
2969
3001
  handle: i
2970
3002
  });
2971
3003
  }, [
3004
+ ne,
3005
+ re,
2972
3006
  se,
2973
- de,
2974
- fe,
2975
3007
  r,
2976
3008
  X,
2977
3009
  I,
2978
3010
  z,
2979
3011
  $,
2980
- Te
3012
+ Z
2981
3013
  ]), je = x((e, t) => {
2982
- me(!0);
3014
+ fe(!0);
2983
3015
  let n = oe(X, O, k, A, j);
2984
3016
  Ae(e, {
2985
3017
  ...t,
@@ -2992,7 +3024,7 @@ function Dt(e) {
2992
3024
  k,
2993
3025
  A,
2994
3026
  j
2995
- ]), Ne = x((e, t) => {
3027
+ ]), Me = x((e, t) => {
2996
3028
  let n = oe(X, O, k, A, j);
2997
3029
  Ae(e, {
2998
3030
  ...t,
@@ -3005,8 +3037,8 @@ function Dt(e) {
3005
3037
  k,
3006
3038
  A,
3007
3039
  j
3008
- ]), Pe = x((e, t) => {
3009
- me(!1), K.current = {
3040
+ ]), Ne = x((e, t) => {
3041
+ fe(!1), me.current = {
3010
3042
  top: 0,
3011
3043
  left: 0,
3012
3044
  width: 0,
@@ -3027,13 +3059,13 @@ function Dt(e) {
3027
3059
  ]);
3028
3060
  C(() => {
3029
3061
  if (!_) return;
3030
- let e = he.current;
3062
+ let e = pe.current;
3031
3063
  if (!e) return;
3032
- let t = ge.current || {
3064
+ let t = he.current || {
3033
3065
  left: 0,
3034
3066
  top: 0
3035
- }, n = pe && (_.left !== t.left || _.top !== t.top);
3036
- if (!pe) {
3067
+ }, n = G && (_.left !== t.left || _.top !== t.top);
3068
+ if (!G) {
3037
3069
  let t = {
3038
3070
  node: e,
3039
3071
  deltaX: _.left,
@@ -3047,28 +3079,28 @@ function Dt(e) {
3047
3079
  } else if (n) {
3048
3080
  let t = {
3049
3081
  node: e,
3050
- deltaX: _.left - G.current.left,
3051
- deltaY: _.top - G.current.top,
3052
- lastX: G.current.left,
3053
- lastY: G.current.top,
3082
+ deltaX: _.left - q.current.left,
3083
+ deltaY: _.top - q.current.top,
3084
+ lastX: q.current.left,
3085
+ lastY: q.current.top,
3054
3086
  x: _.left,
3055
3087
  y: _.top
3056
3088
  };
3057
- ve.current?.(_.e, t);
3089
+ J.current?.(_.e, t);
3058
3090
  }
3059
- ge.current = _;
3091
+ he.current = _;
3060
3092
  }, [
3061
3093
  _,
3062
- pe,
3094
+ G,
3063
3095
  I
3064
3096
  ]);
3065
- let Fe = oe(X, O, k, A, j, pe ? G.current : null, W ? K.current : null), Ie = y.Children.only(t), Le = oe(X, 0, 0, 1, 1), Re = [Le.width, Le.height], ze = [Infinity, Infinity], Be = Ie.props, Ve = Be.className, He = Be.style, Ue = y.cloneElement(Ie, {
3066
- ref: he,
3097
+ let Fe = oe(X, O, k, A, j, G ? q.current : null, de ? me.current : null), Ie = y.Children.only(t), Le = ie(X), Re = [ae(M, Le, i[0]), ae(P, o, i[1])], ze = [ae(N, Le, i[0]), ae(F, o, i[1])], Be = Ie.props, Ve = Be.className, He = Be.style, Ue = y.cloneElement(Ie, {
3098
+ ref: pe,
3067
3099
  className: ee("react-grid-item", Ve, v, {
3068
3100
  static: d,
3069
- resizing: W,
3101
+ resizing: de,
3070
3102
  "react-draggable": c,
3071
- "react-draggable-dragging": pe,
3103
+ "react-draggable-dragging": G,
3072
3104
  dropping: !!_,
3073
3105
  cssTransforms: f
3074
3106
  }),
@@ -3078,7 +3110,7 @@ function Dt(e) {
3078
3110
  ...Ee(Fe)
3079
3111
  }
3080
3112
  }), We = R;
3081
- return Ue = /* @__PURE__ */ (0, V.jsx)(Tt.Resizable, {
3113
+ return Ue = /* @__PURE__ */ (0, U.jsx)(Dt.Resizable, {
3082
3114
  draggableOpts: { disabled: !l },
3083
3115
  className: l ? void 0 : "react-resizable-hide",
3084
3116
  width: Fe.width,
@@ -3086,13 +3118,13 @@ function Dt(e) {
3086
3118
  minConstraints: Re,
3087
3119
  maxConstraints: ze,
3088
3120
  onResizeStart: je,
3089
- onResize: Ne,
3090
- onResizeStop: Pe,
3121
+ onResize: Me,
3122
+ onResizeStop: Ne,
3091
3123
  transformScale: m,
3092
3124
  resizeHandles: L,
3093
3125
  handle: We,
3094
3126
  children: Ue
3095
- }), Ue = /* @__PURE__ */ (0, V.jsx)(wt.DraggableCore, {
3127
+ }), Ue = /* @__PURE__ */ (0, U.jsx)(Et.DraggableCore, {
3096
3128
  disabled: !c,
3097
3129
  onStart: De,
3098
3130
  onDrag: Oe,
@@ -3100,15 +3132,15 @@ function Dt(e) {
3100
3132
  handle: S,
3101
3133
  cancel: ".react-resizable-handle" + (D ? "," + D : ""),
3102
3134
  scale: m,
3103
- nodeRef: he,
3135
+ nodeRef: pe,
3104
3136
  children: Ue
3105
3137
  }), Ue;
3106
3138
  }
3107
- var Ot = () => {}, kt = "react-grid-layout", At = !1;
3139
+ var At = () => {}, jt = "react-grid-layout", Mt = !1;
3108
3140
  try {
3109
- At = /firefox/i.test(navigator.userAgent);
3141
+ Mt = /firefox/i.test(navigator.userAgent);
3110
3142
  } catch {}
3111
- function jt(e, t) {
3143
+ function Nt(e, t) {
3112
3144
  let n = y.Children.toArray(e), r = y.Children.toArray(t);
3113
3145
  if (n.length !== r.length) return !1;
3114
3146
  for (let e = 0; e < n.length; e++) {
@@ -3117,14 +3149,14 @@ function jt(e, t) {
3117
3149
  }
3118
3150
  return !0;
3119
3151
  }
3120
- function Mt(e, t, n, r) {
3152
+ function Pt(e, t, n, r) {
3121
3153
  let i = [], a = /* @__PURE__ */ new Set();
3122
3154
  y.Children.forEach(t, (t) => {
3123
3155
  if (!y.isValidElement(t) || t.key === null) return;
3124
3156
  let n = String(t.key);
3125
3157
  a.add(n);
3126
3158
  let r = e.find((e) => e.i === n);
3127
- if (r) i.push(ge(r));
3159
+ if (r) i.push(_e(r));
3128
3160
  else {
3129
3161
  let e = t.props["data-grid"];
3130
3162
  e ? i.push({
@@ -3145,53 +3177,53 @@ function Mt(e, t, n, r) {
3145
3177
  }) : i.push({
3146
3178
  i: n,
3147
3179
  x: 0,
3148
- y: he(i),
3180
+ y: me(i),
3149
3181
  w: 1,
3150
3182
  h: 1
3151
3183
  });
3152
3184
  }
3153
3185
  });
3154
- let o = J(i, { cols: n });
3186
+ let o = ye(i, { cols: n });
3155
3187
  return r.compact(o, n);
3156
3188
  }
3157
- function Nt(e) {
3158
- let { children: t, width: n, gridConfig: r, dragConfig: i, resizeConfig: a, dropConfig: o, positionStrategy: s = Ne, compactor: c, constraints: l = be, layout: u = [], droppingItem: d, autoSize: f = !0, className: p = "", style: m = {}, innerRef: h, onLayoutChange: g = Ot, onDragStart: _ = Ot, onDrag: v = Ot, onDragStop: b = Ot, onResizeStart: S = Ot, onResize: D = Ot, onResizeStop: O = Ot, onDrop: k = Ot, onDropDragOver: A = Ot } = e, j = w(() => ({
3159
- ...Pe,
3189
+ function Ft(e) {
3190
+ let { children: t, width: n, gridConfig: r, dragConfig: i, resizeConfig: a, dropConfig: o, positionStrategy: s = Fe, compactor: c, constraints: l = xe, layout: u = [], droppingItem: d, autoSize: f = !0, className: p = "", style: m = {}, innerRef: h, onLayoutChange: g = At, onDragStart: _ = At, onDrag: v = At, onDragStop: b = At, onResizeStart: S = At, onResize: D = At, onResizeStop: O = At, onDrop: k = At, onDropDragOver: A = At } = e, j = w(() => ({
3191
+ ...Ie,
3160
3192
  ...r
3161
3193
  }), [r]), M = w(() => ({
3162
- ...Fe,
3194
+ ...Le,
3163
3195
  ...i
3164
3196
  }), [i]), N = w(() => ({
3165
- ...Ie,
3197
+ ...Re,
3166
3198
  ...a
3167
3199
  }), [a]), P = w(() => ({
3168
- ...Le,
3200
+ ...ze,
3169
3201
  ...o
3170
- }), [o]), { cols: F, rowHeight: I, maxRows: L, margin: R, containerPadding: z } = j, { enabled: B, bounded: te, handle: H, cancel: ne, threshold: re } = M, { enabled: oe, handles: ce, handleComponent: le } = N, { enabled: ue, defaultItem: de, onDragOver: fe } = P, U = c ?? qe("vertical"), W = U.type, me = U.allowOverlap, K = U.preventCollision ?? !1, q = w(() => d ?? {
3202
+ }), [o]), { cols: F, rowHeight: I, maxRows: L, margin: R, containerPadding: z } = j, { enabled: B, bounded: V, handle: H, cancel: te, threshold: W } = M, { enabled: ne, handles: re, handleComponent: oe } = N, { enabled: ce, defaultItem: le, onDragOver: ue } = P, G = c ?? Ye("vertical"), K = G.type, fe = G.allowOverlap, pe = G.preventCollision ?? !1, q = w(() => d ?? {
3171
3203
  i: "__dropping-elem__",
3172
- ...de
3173
- }, [d, de]), _e = s.type === "transform", J = s.scale, Y = z ?? R, [X, xe] = E(!1), [Z, Se] = E(() => Mt(u, t, F, U)), [Q, Ce] = E(null), [we, Te] = E(!1), [$, Ee] = E(null), [De, Oe] = E(), ke = T(null), Ae = T(null), je = T(null), Me = T(0), Re = T(Z), ze = T(u), Be = T(t), Ve = T(W), He = T(Z);
3204
+ ...le
3205
+ }, [d, le]), ge = s.type === "transform", J = s.scale, Y = z ?? R, [ye, be] = E(!1), [Z, Se] = E(() => Pt(u, t, F, G)), [Q, Ce] = E(null), [we, Te] = E(!1), [$, Ee] = E(null), [De, Oe] = E(), ke = T(null), Ae = T(null), je = T(null), Me = T(0), Ne = T(Z), Pe = T(u), Be = T(t), Ve = T(K), He = T(Z);
3174
3206
  He.current = Z, C(() => {
3175
- xe(!0), (0, Et.deepEqual)(Z, u) || g(Z);
3207
+ be(!0), (0, Ot.deepEqual)(Z, u) || g(Z);
3176
3208
  }, []), C(() => {
3177
3209
  if (Q || $) return;
3178
- let e = !(0, Et.deepEqual)(u, ze.current), n = !jt(t, Be.current), r = W !== Ve.current;
3210
+ let e = !(0, Ot.deepEqual)(u, Pe.current), n = !Nt(t, Be.current), r = K !== Ve.current;
3179
3211
  if (e || n || r) {
3180
- let n = Mt(e ? u : Z, t, F, U);
3181
- (0, Et.deepEqual)(n, Z) || Se(n);
3212
+ let n = Pt(e ? u : Z, t, F, G);
3213
+ (0, Ot.deepEqual)(n, Z) || Se(n);
3182
3214
  }
3183
- ze.current = u, Be.current = t, Ve.current = W;
3215
+ Pe.current = u, Be.current = t, Ve.current = K;
3184
3216
  }, [
3185
3217
  u,
3186
3218
  t,
3187
3219
  F,
3188
- W,
3189
- U,
3220
+ K,
3221
+ G,
3190
3222
  Q,
3191
3223
  $,
3192
3224
  Z
3193
3225
  ]), C(() => {
3194
- !Q && !(0, Et.deepEqual)(Z, Re.current) && (Re.current = Z, g(Z.filter((e) => e.i !== q.i)));
3226
+ !Q && !(0, Ot.deepEqual)(Z, Ne.current) && (Ne.current = Z, g(Z.filter((e) => e.i !== q.i)));
3195
3227
  }, [
3196
3228
  Z,
3197
3229
  Q,
@@ -3200,7 +3232,7 @@ function Nt(e) {
3200
3232
  ]);
3201
3233
  let Ue = w(() => {
3202
3234
  if (!f) return;
3203
- let e = he(Z), t = Y[1];
3235
+ let e = me(Z), t = Y[1];
3204
3236
  return e * I + (e - 1) * R[1] + t * 2 + "px";
3205
3237
  }, [
3206
3238
  f,
@@ -3209,7 +3241,7 @@ function Nt(e) {
3209
3241
  R,
3210
3242
  Y
3211
3243
  ]), We = x((e, t, n, r) => {
3212
- let i = He.current, a = G(i, e);
3244
+ let i = He.current, a = he(i, e);
3213
3245
  if (!a) return;
3214
3246
  let o = {
3215
3247
  w: a.w,
@@ -3218,9 +3250,9 @@ function Nt(e) {
3218
3250
  y: a.y,
3219
3251
  i: e
3220
3252
  };
3221
- ke.current = ge(a), je.current = i, Ce(o), _(i, a, a, null, r.e, r.node);
3253
+ ke.current = _e(a), je.current = i, Ce(o), _(i, a, a, null, r.e, r.node);
3222
3254
  }, [_]), Ge = x((e, t, n, r) => {
3223
- let i = He.current, a = ke.current, o = G(i, e);
3255
+ let i = He.current, a = ke.current, o = he(i, e);
3224
3256
  if (!o) return;
3225
3257
  let s = {
3226
3258
  w: o.w,
@@ -3228,36 +3260,36 @@ function Nt(e) {
3228
3260
  x: o.x,
3229
3261
  y: o.y,
3230
3262
  i: e
3231
- }, c = ye(i, o, t, n, !0, K, W, F, me);
3232
- v(c, a, o, s, r.e, r.node), Se(U.compact(c, F)), Ce(s);
3263
+ }, c = X(i, o, t, n, !0, pe, K, F, fe);
3264
+ v(c, a, o, s, r.e, r.node), Se(G.compact(c, F)), Ce(s);
3233
3265
  }, [
3266
+ pe,
3234
3267
  K,
3235
- W,
3236
3268
  F,
3237
- me,
3238
- U,
3269
+ fe,
3270
+ G,
3239
3271
  v
3240
3272
  ]), Ke = x((e, t, n, r) => {
3241
3273
  if (!Q) return;
3242
- let i = He.current, a = ke.current, o = G(i, e);
3274
+ let i = He.current, a = ke.current, o = he(i, e);
3243
3275
  if (!o) return;
3244
- let s = ye(i, o, t, n, !0, K, W, F, me), c = U.compact(s, F);
3276
+ let s = X(i, o, t, n, !0, pe, K, F, fe), c = G.compact(s, F);
3245
3277
  b(c, a, o, null, r.e, r.node);
3246
3278
  let l = je.current;
3247
- ke.current = null, je.current = null, Ce(null), Se(c), l && !(0, Et.deepEqual)(l, c) && g(c);
3279
+ ke.current = null, je.current = null, Ce(null), Se(c), l && !(0, Ot.deepEqual)(l, c) && g(c);
3248
3280
  }, [
3249
3281
  Q,
3282
+ pe,
3250
3283
  K,
3251
- W,
3252
3284
  F,
3253
- me,
3254
- U,
3285
+ fe,
3286
+ G,
3255
3287
  b,
3256
3288
  g
3257
- ]), Je = x((e, t, n, r) => {
3258
- let i = He.current, a = G(i, e);
3259
- a && (Ae.current = ge(a), je.current = i, Te(!0), S(i, a, a, null, r.e, r.node));
3260
- }, [S]), Ye = x((e, t, n, r) => {
3289
+ ]), qe = x((e, t, n, r) => {
3290
+ let i = He.current, a = he(i, e);
3291
+ a && (Ae.current = _e(a), je.current = i, Te(!0), S(i, a, a, null, r.e, r.node));
3292
+ }, [S]), Je = x((e, t, n, r) => {
3261
3293
  let i = He.current, a = Ae.current, { handle: o } = r, s = !1, c, l, [u, d] = ve(i, e, (e) => (c = e.x, l = e.y, [
3262
3294
  "sw",
3263
3295
  "w",
@@ -3272,7 +3304,7 @@ function Nt(e) {
3272
3304
  "ne",
3273
3305
  "n",
3274
3306
  "nw"
3275
- ].includes(o) && (l = e.y + (e.h - n), n = e.y !== l && l < 0 ? e.h : n, l = l < 0 ? 0 : l), s = !0), K && !me && pe(i, {
3307
+ ].includes(o) && (l = e.y + (e.h - n), n = e.y !== l && l < 0 ? e.h : n, l = l < 0 ? 0 : l), s = !0), pe && !fe && de(i, {
3276
3308
  ...e,
3277
3309
  w: t,
3278
3310
  h: n,
@@ -3281,7 +3313,7 @@ function Nt(e) {
3281
3313
  }).filter((t) => t.i !== e.i).length > 0 && (l = e.y, n = e.h, c = e.x, t = e.w, s = !1), e.w = t, e.h = n, e));
3282
3314
  if (!d) return;
3283
3315
  let f = u;
3284
- s && c !== void 0 && l !== void 0 && (f = ye(u, d, c, l, !0, K, W, F, me));
3316
+ s && c !== void 0 && l !== void 0 && (f = X(u, d, c, l, !0, pe, K, F, fe));
3285
3317
  let p = {
3286
3318
  w: d.w,
3287
3319
  h: d.h,
@@ -3290,22 +3322,22 @@ function Nt(e) {
3290
3322
  i: e,
3291
3323
  static: !0
3292
3324
  };
3293
- D(f, a, d, p, r.e, r.node), Se(U.compact(f, F)), Ce(p);
3325
+ D(f, a, d, p, r.e, r.node), Se(G.compact(f, F)), Ce(p);
3294
3326
  }, [
3327
+ pe,
3295
3328
  K,
3296
- W,
3297
3329
  F,
3298
- me,
3299
- U,
3330
+ fe,
3331
+ G,
3300
3332
  D
3301
3333
  ]), Xe = x((e, t, n, r) => {
3302
- let i = He.current, a = Ae.current, o = G(i, e), s = U.compact(i, F);
3334
+ let i = He.current, a = Ae.current, o = he(i, e), s = G.compact(i, F);
3303
3335
  O(s, a, o ?? null, null, r.e, r.node);
3304
3336
  let c = je.current;
3305
- Ae.current = null, je.current = null, Ce(null), Te(!1), Se(s), c && !(0, Et.deepEqual)(c, s) && g(s);
3337
+ Ae.current = null, je.current = null, Ce(null), Te(!1), Se(s), c && !(0, Ot.deepEqual)(c, s) && g(s);
3306
3338
  }, [
3307
3339
  F,
3308
- U,
3340
+ G,
3309
3341
  O,
3310
3342
  g
3311
3343
  ]), Ze = x(() => {
@@ -3314,14 +3346,14 @@ function Nt(e) {
3314
3346
  Ee(null), Ce(null), Oe(void 0);
3315
3347
  return;
3316
3348
  }
3317
- Se(U.compact(e.filter((e) => e.i !== q.i), F)), Ee(null), Ce(null), Oe(void 0);
3349
+ Se(G.compact(e.filter((e) => e.i !== q.i), F)), Ee(null), Ce(null), Oe(void 0);
3318
3350
  }, [
3319
3351
  q.i,
3320
3352
  F,
3321
- U
3353
+ G
3322
3354
  ]), Qe = x((e) => {
3323
- if (e.preventDefault(), e.stopPropagation(), At && !e.nativeEvent.target?.classList.contains(kt)) return !1;
3324
- let t = fe ? fe(e.nativeEvent) : A(e);
3355
+ if (e.preventDefault(), e.stopPropagation(), Mt && !e.nativeEvent.target?.classList.contains(jt)) return !1;
3356
+ let t = ue ? ue(e.nativeEvent) : A(e);
3325
3357
  if (t === !1) return $ && Ze(), !1;
3326
3358
  let { dragOffsetX: r = 0, dragOffsetY: i = 0, ...a } = t ?? {}, o = {
3327
3359
  ...q,
@@ -3341,7 +3373,7 @@ function Nt(e) {
3341
3373
  if ($) De && (De.left !== v.left || De.top !== v.top) && Oe(v);
3342
3374
  else {
3343
3375
  let e = se(c, _, g, o.w, o.h);
3344
- Ee(/* @__PURE__ */ (0, V.jsx)("div", {}, o.i)), Oe(v), Se([...He.current, {
3376
+ Ee(/* @__PURE__ */ (0, U.jsx)("div", {}, o.i)), Oe(v), Se([...He.current.filter((e) => e.i !== o.i), {
3345
3377
  ...o,
3346
3378
  x: e.x,
3347
3379
  y: e.y,
@@ -3353,7 +3385,7 @@ function Nt(e) {
3353
3385
  $,
3354
3386
  De,
3355
3387
  q,
3356
- fe,
3388
+ ue,
3357
3389
  A,
3358
3390
  Ze,
3359
3391
  J,
@@ -3377,32 +3409,32 @@ function Nt(e) {
3377
3409
  k
3378
3410
  ]), nt = x((e, t) => {
3379
3411
  if (!e || !e.key) return null;
3380
- let r = G(Z, String(e.key));
3412
+ let r = he(Z, String(e.key));
3381
3413
  if (!r) return null;
3382
- let i = typeof r.isDraggable == "boolean" ? r.isDraggable : !r.static && B, a = typeof r.isResizable == "boolean" ? r.isResizable : !r.static && oe, o = r.resizeHandles || [...ce], c = i && te && r.isBounded !== !1, u = le;
3383
- return /* @__PURE__ */ (0, V.jsx)(Dt, {
3414
+ let i = typeof r.isDraggable == "boolean" ? r.isDraggable : !r.static && B, a = typeof r.isResizable == "boolean" ? r.isResizable : !r.static && ne, o = r.resizeHandles || [...re], c = i && V && r.isBounded !== !1, u = oe;
3415
+ return /* @__PURE__ */ (0, U.jsx)(kt, {
3384
3416
  containerWidth: n,
3385
3417
  cols: F,
3386
3418
  margin: R,
3387
3419
  containerPadding: Y,
3388
3420
  maxRows: L,
3389
3421
  rowHeight: I,
3390
- cancel: ne,
3422
+ cancel: te,
3391
3423
  handle: H,
3392
3424
  onDragStart: We,
3393
3425
  onDrag: Ge,
3394
3426
  onDragStop: Ke,
3395
- onResizeStart: Je,
3396
- onResize: Ye,
3427
+ onResizeStart: qe,
3428
+ onResize: Je,
3397
3429
  onResizeStop: Xe,
3398
3430
  isDraggable: i,
3399
3431
  isResizable: a,
3400
3432
  isBounded: c,
3401
- useCSSTransforms: _e && X,
3402
- usePercentages: !X,
3433
+ useCSSTransforms: ge && ye,
3434
+ usePercentages: !ye,
3403
3435
  transformScale: J,
3404
3436
  positionStrategy: s,
3405
- dragThreshold: re,
3437
+ dragThreshold: W,
3406
3438
  w: r.w,
3407
3439
  h: r.h,
3408
3440
  x: r.x,
@@ -3429,27 +3461,27 @@ function Nt(e) {
3429
3461
  Y,
3430
3462
  L,
3431
3463
  I,
3432
- ne,
3464
+ te,
3433
3465
  H,
3434
3466
  We,
3435
3467
  Ge,
3436
3468
  Ke,
3469
+ qe,
3437
3470
  Je,
3438
- Ye,
3439
3471
  Xe,
3440
3472
  B,
3441
- oe,
3442
- te,
3443
- _e,
3444
- X,
3473
+ ne,
3474
+ V,
3475
+ ge,
3476
+ ye,
3445
3477
  J,
3446
3478
  s,
3447
- re,
3479
+ W,
3448
3480
  De,
3449
- ce,
3450
- le,
3481
+ re,
3482
+ oe,
3451
3483
  l
3452
- ]), rt = () => Q ? /* @__PURE__ */ (0, V.jsx)(Dt, {
3484
+ ]), rt = () => Q ? /* @__PURE__ */ (0, U.jsx)(kt, {
3453
3485
  w: Q.w,
3454
3486
  h: Q.h,
3455
3487
  x: Q.x,
@@ -3465,44 +3497,44 @@ function Nt(e) {
3465
3497
  isDraggable: !1,
3466
3498
  isResizable: !1,
3467
3499
  isBounded: !1,
3468
- useCSSTransforms: _e,
3500
+ useCSSTransforms: ge,
3469
3501
  transformScale: J,
3470
3502
  constraints: l,
3471
3503
  layout: Z,
3472
- children: /* @__PURE__ */ (0, V.jsx)("div", {})
3504
+ children: /* @__PURE__ */ (0, U.jsx)("div", {})
3473
3505
  }) : null;
3474
- return /* @__PURE__ */ (0, V.jsxs)("div", {
3506
+ return /* @__PURE__ */ (0, U.jsxs)("div", {
3475
3507
  ref: h,
3476
- className: ee(kt, p),
3508
+ className: ee(jt, p),
3477
3509
  style: {
3478
3510
  height: Ue,
3479
3511
  ...m
3480
3512
  },
3481
- onDrop: ue ? tt : void 0,
3482
- onDragLeave: ue ? $e : void 0,
3483
- onDragEnter: ue ? et : void 0,
3484
- onDragOver: ue ? Qe : void 0,
3513
+ onDrop: ce ? tt : void 0,
3514
+ onDragLeave: ce ? $e : void 0,
3515
+ onDragEnter: ce ? et : void 0,
3516
+ onDragOver: ce ? Qe : void 0,
3485
3517
  children: [
3486
3518
  y.Children.map(t, (e) => y.isValidElement(e) ? nt(e) : null),
3487
- ue && $ && nt($, !0),
3519
+ ce && $ && nt($, !0),
3488
3520
  rt()
3489
3521
  ]
3490
3522
  });
3491
3523
  }
3492
- var Pt = {
3524
+ var It = {
3493
3525
  lg: 1200,
3494
3526
  md: 996,
3495
3527
  sm: 768,
3496
3528
  xs: 480,
3497
3529
  xxs: 0
3498
- }, Ft = {
3530
+ }, Lt = {
3499
3531
  lg: 12,
3500
3532
  md: 10,
3501
3533
  sm: 6,
3502
3534
  xs: 4,
3503
3535
  xxs: 2
3504
- }, It = () => {};
3505
- function Lt(e, t, n, r) {
3536
+ }, Rt = () => {};
3537
+ function zt(e, t, n, r) {
3506
3538
  let i = [];
3507
3539
  y.Children.forEach(t, (t) => {
3508
3540
  if (!y.isValidElement(t) || t.key === null) return;
@@ -3531,32 +3563,32 @@ function Lt(e, t, n, r) {
3531
3563
  }) : i.push({
3532
3564
  i: n,
3533
3565
  x: 0,
3534
- y: he(i),
3566
+ y: me(i),
3535
3567
  w: 1,
3536
3568
  h: 1
3537
3569
  });
3538
3570
  }
3539
3571
  });
3540
- let a = J(i, { cols: n });
3572
+ let a = ye(i, { cols: n });
3541
3573
  return r.compact(a, n);
3542
3574
  }
3543
- function Rt(e) {
3544
- let { children: t, width: n, breakpoint: r, breakpoints: i = Pt, cols: a = Ft, layouts: o = {}, rowHeight: s = 150, maxRows: c = Infinity, margin: l = [10, 10], containerPadding: u = null, compactor: d, onBreakpointChange: f = It, onLayoutChange: p = It, onWidthChange: m = It, ...h } = e, g = d ?? qe("vertical"), _ = g.type, v = g.allowOverlap, y = w(() => r ?? Ye(i, n), []), b = w(() => Xe(y, a), [y, a]), S = w(() => Ze(o, i, y, y, b, _), []), [D, O] = E(y), [k, A] = E(b), [j, M] = E(S), [N, P] = E(o), F = T(n), I = T(r), ee = T(i), L = T(a), R = T(o), z = T(_), B = T(N);
3575
+ function Bt(e) {
3576
+ let { children: t, width: n, breakpoint: r, breakpoints: i = It, cols: a = Lt, layouts: o = {}, rowHeight: s = 150, maxRows: c = Infinity, margin: l = [10, 10], containerPadding: u = null, compactor: d, onBreakpointChange: f = Rt, onLayoutChange: p = Rt, onWidthChange: m = Rt, ...h } = e, g = d ?? Ye("vertical"), _ = g.type, v = g.allowOverlap, y = w(() => r ?? Ze(i, n), []), b = w(() => Qe(y, a), [y, a]), S = w(() => $e(o, i, y, y, b, _), []), [D, O] = E(y), [k, A] = E(b), [j, M] = E(S), [N, P] = E(o), F = T(n), I = T(r), L = T(i), R = T(a), ee = T(o), z = T(_), B = T(N);
3545
3577
  C(() => {
3546
3578
  B.current = N;
3547
3579
  }, [N]);
3548
- let te = w(() => (0, Et.deepEqual)(o, R.current) ? null : Ze(o, i, D, D, k, g), [
3580
+ let V = w(() => (0, Ot.deepEqual)(o, ee.current) ? null : $e(o, i, D, D, k, g), [
3549
3581
  o,
3550
3582
  i,
3551
3583
  D,
3552
3584
  k,
3553
3585
  g
3554
- ]), H = te ?? j;
3586
+ ]), H = V ?? j;
3555
3587
  C(() => {
3556
- te !== null && (M(te), P(o), B.current = o, R.current = o);
3557
- }, [te, o]), C(() => {
3588
+ V !== null && (M(V), P(o), B.current = o, ee.current = o);
3589
+ }, [V, o]), C(() => {
3558
3590
  if (_ !== z.current) {
3559
- let e = g.compact(q(H), k), t = {
3591
+ let e = g.compact(J(H), k), t = {
3560
3592
  ...B.current,
3561
3593
  [D]: e
3562
3594
  };
@@ -3571,16 +3603,16 @@ function Rt(e) {
3571
3603
  D,
3572
3604
  p
3573
3605
  ]), C(() => {
3574
- let e = n !== F.current, o = r !== I.current, s = !(0, Et.deepEqual)(i, ee.current), c = !(0, Et.deepEqual)(a, L.current);
3606
+ let e = n !== F.current, o = r !== I.current, s = !(0, Ot.deepEqual)(i, L.current), c = !(0, Ot.deepEqual)(a, R.current);
3575
3607
  if (e || o || s || c) {
3576
- let e = r ?? Ye(i, n), o = Xe(e, a), d = D;
3608
+ let e = r ?? Ze(i, n), o = Qe(e, a), d = D;
3577
3609
  if (d !== e || s || c) {
3578
3610
  let n = { ...B.current };
3579
- n[d] || (n[d] = q(j));
3580
- let r = Ze(n, i, e, d, o, g);
3581
- r = Lt(r, t, o, g), n[e] = r, O(e), A(o), M(r), P(n), B.current = n, f(e, o), p(r, n);
3611
+ n[d] || (n[d] = J(j));
3612
+ let r = $e(n, i, e, d, o, g);
3613
+ r = zt(r, t, o, g), n[e] = r, O(e), A(o), M(r), P(n), B.current = n, f(e, o), p(r, n);
3582
3614
  }
3583
- m(n, Qe(l, e), o, u ? Qe(u, e) : null), F.current = n, I.current = r, ee.current = i, L.current = a;
3615
+ m(n, et(l, e), o, u ? et(u, e) : null), F.current = n, I.current = r, L.current = i, R.current = a;
3584
3616
  }
3585
3617
  }, [
3586
3618
  n,
@@ -3600,38 +3632,38 @@ function Rt(e) {
3600
3632
  p,
3601
3633
  m
3602
3634
  ]);
3603
- let ne = x((e) => {
3635
+ let te = x((e) => {
3604
3636
  let t = {
3605
3637
  ...B.current,
3606
3638
  [D]: e
3607
3639
  };
3608
3640
  M(e), P(t), B.current = t, p(e, t);
3609
- }, [D, p]), re = w(() => Qe(l, D), [l, D]), ie = w(() => u === null ? null : Qe(u, D), [u, D]), ae = w(() => ({
3641
+ }, [D, p]), W = w(() => et(l, D), [l, D]), ne = w(() => u === null ? null : et(u, D), [u, D]), re = w(() => ({
3610
3642
  cols: k,
3611
3643
  rowHeight: s,
3612
3644
  maxRows: c,
3613
- margin: re,
3614
- containerPadding: ie
3645
+ margin: W,
3646
+ containerPadding: ne
3615
3647
  }), [
3616
3648
  k,
3617
3649
  s,
3618
3650
  c,
3619
- re,
3620
- ie
3651
+ W,
3652
+ ne
3621
3653
  ]);
3622
- return /* @__PURE__ */ (0, V.jsx)(Nt, {
3654
+ return /* @__PURE__ */ (0, U.jsx)(Ft, {
3623
3655
  ...h,
3624
3656
  width: n,
3625
- gridConfig: ae,
3657
+ gridConfig: re,
3626
3658
  compactor: g,
3627
- onLayoutChange: ne,
3659
+ onLayoutChange: te,
3628
3660
  layout: H,
3629
3661
  children: t
3630
3662
  });
3631
3663
  }
3632
3664
  //#endregion
3633
3665
  //#region src/DashboardGridLayout.tsx
3634
- function zt({ editMode: e }) {
3666
+ function Vt({ editMode: e }) {
3635
3667
  let t = a();
3636
3668
  return v.useEffect(() => {
3637
3669
  if (e) return t.startDrag({
@@ -3644,14 +3676,14 @@ function zt({ editMode: e }) {
3644
3676
  t.endDrag("dashboard");
3645
3677
  }, [e, t]), null;
3646
3678
  }
3647
- var Bt = [
3679
+ var Ht = [
3648
3680
  "hsl(var(--chart-1))",
3649
3681
  "hsl(var(--chart-2))",
3650
3682
  "hsl(var(--chart-3))",
3651
3683
  "hsl(var(--chart-4))",
3652
3684
  "hsl(var(--chart-5))"
3653
- ], Vt = ({ schema: e, className: t, onLayoutChange: r, persistLayoutKey: i = "dashboard-layout", onRefresh: a }) => {
3654
- let { width: f, containerRef: p, mounted: m } = et(), [h, _] = v.useState(!1), [y, b] = v.useState(!1), x = o(), S = v.useRef(null), C = v.useCallback(() => {
3685
+ ], Ut = ({ schema: e, className: t, onLayoutChange: r, persistLayoutKey: i = "dashboard-layout", onRefresh: a }) => {
3686
+ let { width: f, containerRef: p, mounted: m } = nt(), [h, _] = v.useState(!1), [y, b] = v.useState(!1), x = o(), S = v.useRef(null), C = v.useCallback(() => {
3655
3687
  a && (b(!0), a(), setTimeout(() => b(!1), 600));
3656
3688
  }, [a]);
3657
3689
  v.useEffect(() => {
@@ -3696,7 +3728,7 @@ var Bt = [
3696
3728
  let t = e.type, n = e.options || {};
3697
3729
  if (t === "bar" || t === "line" || t === "area" || t === "pie" || t === "donut" || t === "scatter") {
3698
3730
  let r = e.data || n.data, i = e.categoryField || n.xField || "name", a = e.valueField || n.yField || "value";
3699
- if (z(r)) {
3731
+ if (V(r)) {
3700
3732
  let n = r.aggregate, o = n ? {
3701
3733
  field: e.valueField || n.field,
3702
3734
  function: e.aggregate || n.function,
@@ -3709,7 +3741,7 @@ var Bt = [
3709
3741
  aggregate: o,
3710
3742
  xAxisKey: i,
3711
3743
  series: [{ dataKey: s }],
3712
- colors: Bt,
3744
+ colors: Ht,
3713
3745
  className: "h-full"
3714
3746
  };
3715
3747
  }
@@ -3726,7 +3758,7 @@ var Bt = [
3726
3758
  aggregate: n,
3727
3759
  xAxisKey: i,
3728
3760
  series: [{ dataKey: e.valueField || "value" }],
3729
- colors: Bt,
3761
+ colors: Ht,
3730
3762
  className: "h-full"
3731
3763
  };
3732
3764
  }
@@ -3736,13 +3768,13 @@ var Bt = [
3736
3768
  data: Array.isArray(r) ? r : r?.items || [],
3737
3769
  xAxisKey: i,
3738
3770
  series: [{ dataKey: a }],
3739
- colors: Bt,
3771
+ colors: Ht,
3740
3772
  className: "h-full"
3741
3773
  };
3742
3774
  }
3743
3775
  if (t === "table") {
3744
3776
  let t = e.data || n.data;
3745
- if (z(t)) {
3777
+ if (V(t)) {
3746
3778
  let { data: r, ...i } = n;
3747
3779
  return {
3748
3780
  type: "data-table",
@@ -3774,7 +3806,7 @@ var Bt = [
3774
3806
  }
3775
3807
  if (t === "pivot") {
3776
3808
  let t = e.data || n.data;
3777
- if (z(t)) {
3809
+ if (V(t)) {
3778
3810
  let { data: r, ...i } = n;
3779
3811
  return {
3780
3812
  type: "pivot",
@@ -3795,54 +3827,54 @@ var Bt = [
3795
3827
  ...n
3796
3828
  };
3797
3829
  }, []);
3798
- return /* @__PURE__ */ (0, V.jsxs)("div", {
3830
+ return /* @__PURE__ */ (0, U.jsxs)("div", {
3799
3831
  ref: p,
3800
3832
  className: g("w-full", t),
3801
3833
  "data-testid": "grid-layout",
3802
3834
  children: [
3803
- x && /* @__PURE__ */ (0, V.jsx)(zt, { editMode: h }),
3804
- /* @__PURE__ */ (0, V.jsxs)("div", {
3835
+ x && /* @__PURE__ */ (0, U.jsx)(Vt, { editMode: h }),
3836
+ /* @__PURE__ */ (0, U.jsxs)("div", {
3805
3837
  className: "mb-4 flex items-center justify-between",
3806
- children: [/* @__PURE__ */ (0, V.jsx)("h2", {
3838
+ children: [/* @__PURE__ */ (0, U.jsx)("h2", {
3807
3839
  className: "text-2xl font-bold",
3808
3840
  children: e.title || "Dashboard"
3809
- }), /* @__PURE__ */ (0, V.jsx)("div", {
3841
+ }), /* @__PURE__ */ (0, U.jsx)("div", {
3810
3842
  className: "flex gap-2",
3811
- children: h ? /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
3812
- /* @__PURE__ */ (0, V.jsxs)(s, {
3843
+ children: h ? /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [
3844
+ /* @__PURE__ */ (0, U.jsxs)(s, {
3813
3845
  onClick: D,
3814
3846
  size: "sm",
3815
3847
  variant: "default",
3816
- children: [/* @__PURE__ */ (0, V.jsx)(P, { className: "h-4 w-4 mr-2" }), "Save Layout"]
3848
+ children: [/* @__PURE__ */ (0, U.jsx)(I, { className: "h-4 w-4 mr-2" }), "Save Layout"]
3817
3849
  }),
3818
- /* @__PURE__ */ (0, V.jsxs)(s, {
3850
+ /* @__PURE__ */ (0, U.jsxs)(s, {
3819
3851
  onClick: O,
3820
3852
  size: "sm",
3821
3853
  variant: "outline",
3822
- children: [/* @__PURE__ */ (0, V.jsx)(I, { className: "h-4 w-4 mr-2" }), "Reset"]
3854
+ children: [/* @__PURE__ */ (0, U.jsx)(R, { className: "h-4 w-4 mr-2" }), "Reset"]
3823
3855
  }),
3824
- /* @__PURE__ */ (0, V.jsx)(s, {
3856
+ /* @__PURE__ */ (0, U.jsx)(s, {
3825
3857
  onClick: () => _(!1),
3826
3858
  size: "sm",
3827
3859
  variant: "ghost",
3828
3860
  children: "Cancel"
3829
3861
  })
3830
- ] }) : /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [a && /* @__PURE__ */ (0, V.jsxs)(s, {
3862
+ ] }) : /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [a && /* @__PURE__ */ (0, U.jsxs)(s, {
3831
3863
  onClick: C,
3832
3864
  size: "sm",
3833
3865
  variant: "outline",
3834
3866
  disabled: y,
3835
3867
  "aria-label": "Refresh dashboard",
3836
- children: [/* @__PURE__ */ (0, V.jsx)(N, { className: g("h-4 w-4 mr-2", y && "animate-spin") }), y ? "Refreshing…" : "Refresh All"]
3837
- }), /* @__PURE__ */ (0, V.jsxs)(s, {
3868
+ children: [/* @__PURE__ */ (0, U.jsx)(F, { className: g("h-4 w-4 mr-2", y && "animate-spin") }), y ? "Refreshing…" : "Refresh All"]
3869
+ }), /* @__PURE__ */ (0, U.jsxs)(s, {
3838
3870
  onClick: () => _(!0),
3839
3871
  size: "sm",
3840
3872
  variant: "outline",
3841
- children: [/* @__PURE__ */ (0, V.jsx)(A, { className: "h-4 w-4 mr-2" }), "Edit Layout"]
3873
+ children: [/* @__PURE__ */ (0, U.jsx)(j, { className: "h-4 w-4 mr-2" }), "Edit Layout"]
3842
3874
  })] })
3843
3875
  })]
3844
3876
  }),
3845
- m && /* @__PURE__ */ (0, V.jsx)(Rt, {
3877
+ m && /* @__PURE__ */ (0, U.jsx)(Bt, {
3846
3878
  className: "layout",
3847
3879
  width: f,
3848
3880
  layouts: w,
@@ -3869,34 +3901,34 @@ var Bt = [
3869
3901
  onLayoutChange: E,
3870
3902
  children: e.widgets?.map((e, t) => {
3871
3903
  let r = e.id || `widget-${t}`, i = k(e);
3872
- return /* @__PURE__ */ (0, V.jsx)("div", {
3904
+ return /* @__PURE__ */ (0, U.jsx)("div", {
3873
3905
  className: "h-full",
3874
- children: e.type === "metric" ? /* @__PURE__ */ (0, V.jsxs)("div", {
3906
+ children: e.type === "metric" ? /* @__PURE__ */ (0, U.jsxs)("div", {
3875
3907
  className: "h-full w-full relative",
3876
- children: [h && /* @__PURE__ */ (0, V.jsx)("div", {
3908
+ children: [h && /* @__PURE__ */ (0, U.jsx)("div", {
3877
3909
  className: "drag-handle absolute top-2 right-2 z-10 cursor-move p-1 bg-background/80 rounded border border-border",
3878
- children: /* @__PURE__ */ (0, V.jsx)(j, { className: "h-4 w-4" })
3879
- }), /* @__PURE__ */ (0, V.jsx)(n, {
3910
+ children: /* @__PURE__ */ (0, U.jsx)(M, { className: "h-4 w-4" })
3911
+ }), /* @__PURE__ */ (0, U.jsx)(n, {
3880
3912
  schema: i,
3881
3913
  className: "h-full w-full"
3882
3914
  })]
3883
- }) : /* @__PURE__ */ (0, V.jsxs)(c, {
3915
+ }) : /* @__PURE__ */ (0, U.jsxs)(c, {
3884
3916
  className: g("h-full overflow-hidden border-border/50 shadow-sm transition-all", "bg-card/50 backdrop-blur-sm", h && "ring-2 ring-primary/20"),
3885
- children: [e.title && /* @__PURE__ */ (0, V.jsxs)(u, {
3917
+ children: [e.title && /* @__PURE__ */ (0, U.jsxs)(u, {
3886
3918
  className: "pb-2 border-b border-border/40 bg-muted/20 flex flex-row items-center justify-between",
3887
- children: [/* @__PURE__ */ (0, V.jsx)(d, {
3919
+ children: [/* @__PURE__ */ (0, U.jsx)(d, {
3888
3920
  className: "text-base font-medium tracking-tight truncate",
3889
3921
  title: e.title,
3890
3922
  children: e.title
3891
- }), h && /* @__PURE__ */ (0, V.jsx)("div", {
3923
+ }), h && /* @__PURE__ */ (0, U.jsx)("div", {
3892
3924
  className: "drag-handle cursor-move p-1 hover:bg-muted/40 rounded",
3893
- children: /* @__PURE__ */ (0, V.jsx)(j, { className: "h-4 w-4" })
3925
+ children: /* @__PURE__ */ (0, U.jsx)(M, { className: "h-4 w-4" })
3894
3926
  })]
3895
- }), /* @__PURE__ */ (0, V.jsx)(l, {
3927
+ }), /* @__PURE__ */ (0, U.jsx)(l, {
3896
3928
  className: "p-0 h-full",
3897
- children: /* @__PURE__ */ (0, V.jsx)("div", {
3929
+ children: /* @__PURE__ */ (0, U.jsx)("div", {
3898
3930
  className: g("h-full w-full overflow-auto p-4"),
3899
- children: /* @__PURE__ */ (0, V.jsx)(n, { schema: i })
3931
+ children: /* @__PURE__ */ (0, U.jsx)(n, { schema: i })
3900
3932
  })
3901
3933
  })]
3902
3934
  })
@@ -3908,86 +3940,165 @@ var Bt = [
3908
3940
  };
3909
3941
  //#endregion
3910
3942
  //#region src/MetricWidget.tsx
3911
- function Ht(e) {
3943
+ function Wt(e) {
3912
3944
  if (e != null) return typeof e == "string" ? e : e.defaultValue || e.key;
3913
3945
  }
3914
- var Ut = ({ label: e, value: t, trend: n, icon: r, className: i, description: a, ...o }) => {
3915
- let s = w(() => {
3946
+ var Gt = ({ label: e, value: t, trend: n, icon: r, className: i, description: a, loading: o, error: s, ...f }) => {
3947
+ let p = w(() => {
3916
3948
  if (typeof r == "string") {
3917
3949
  let e = D[r];
3918
- return e ? /* @__PURE__ */ (0, V.jsx)(e, { className: "h-4 w-4 text-muted-foreground" }) : null;
3950
+ return e ? /* @__PURE__ */ (0, U.jsx)(e, { className: "h-4 w-4 text-muted-foreground" }) : null;
3919
3951
  }
3920
3952
  return r;
3921
3953
  }, [r]);
3922
- return /* @__PURE__ */ (0, V.jsxs)(c, {
3954
+ return /* @__PURE__ */ (0, U.jsxs)(c, {
3923
3955
  className: g("h-full overflow-hidden", i),
3924
- ...o,
3925
- children: [/* @__PURE__ */ (0, V.jsxs)(u, {
3956
+ ...f,
3957
+ children: [/* @__PURE__ */ (0, U.jsxs)(u, {
3926
3958
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
3927
- children: [/* @__PURE__ */ (0, V.jsx)(d, {
3959
+ children: [/* @__PURE__ */ (0, U.jsx)(d, {
3928
3960
  className: "text-sm font-medium truncate",
3929
- children: Ht(e)
3930
- }), s && /* @__PURE__ */ (0, V.jsx)("div", {
3961
+ children: Wt(e)
3962
+ }), p && /* @__PURE__ */ (0, U.jsx)("div", {
3931
3963
  className: "h-4 w-4 text-muted-foreground shrink-0",
3964
+ children: p
3965
+ })]
3966
+ }), /* @__PURE__ */ (0, U.jsx)(l, { children: o ? /* @__PURE__ */ (0, U.jsxs)("div", {
3967
+ className: "flex items-center gap-2 text-muted-foreground",
3968
+ "data-testid": "metric-loading",
3969
+ children: [/* @__PURE__ */ (0, U.jsx)(N, { className: "h-4 w-4 animate-spin" }), /* @__PURE__ */ (0, U.jsx)("span", {
3970
+ className: "text-sm",
3971
+ children: "Loading…"
3972
+ })]
3973
+ }) : s ? /* @__PURE__ */ (0, U.jsxs)("div", {
3974
+ className: "flex items-center gap-2",
3975
+ "data-testid": "metric-error",
3976
+ role: "alert",
3977
+ children: [/* @__PURE__ */ (0, U.jsx)(O, { className: "h-4 w-4 text-destructive shrink-0" }), /* @__PURE__ */ (0, U.jsx)("span", {
3978
+ className: "text-xs text-destructive truncate",
3932
3979
  children: s
3933
3980
  })]
3934
- }), /* @__PURE__ */ (0, V.jsxs)(l, { children: [/* @__PURE__ */ (0, V.jsx)("div", {
3981
+ }) : /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)("div", {
3935
3982
  className: "text-2xl font-bold truncate",
3936
3983
  children: t
3937
- }), (n || a) && /* @__PURE__ */ (0, V.jsxs)("p", {
3984
+ }), (n || a) && /* @__PURE__ */ (0, U.jsxs)("p", {
3938
3985
  className: "text-xs text-muted-foreground flex items-center mt-1 truncate",
3939
- children: [n && /* @__PURE__ */ (0, V.jsxs)("span", {
3986
+ children: [n && /* @__PURE__ */ (0, U.jsxs)("span", {
3940
3987
  className: g("flex items-center mr-2 shrink-0", n.direction === "up" && "text-green-500", n.direction === "down" && "text-red-500", n.direction === "neutral" && "text-yellow-500"),
3941
3988
  children: [
3942
- n.direction === "up" && /* @__PURE__ */ (0, V.jsx)(k, { className: "h-3 w-3 mr-1" }),
3943
- n.direction === "down" && /* @__PURE__ */ (0, V.jsx)(O, { className: "h-3 w-3 mr-1" }),
3944
- n.direction === "neutral" && /* @__PURE__ */ (0, V.jsx)(M, { className: "h-3 w-3 mr-1" }),
3989
+ n.direction === "up" && /* @__PURE__ */ (0, U.jsx)(A, { className: "h-3 w-3 mr-1" }),
3990
+ n.direction === "down" && /* @__PURE__ */ (0, U.jsx)(k, { className: "h-3 w-3 mr-1" }),
3991
+ n.direction === "neutral" && /* @__PURE__ */ (0, U.jsx)(P, { className: "h-3 w-3 mr-1" }),
3945
3992
  n.value,
3946
3993
  "%"
3947
3994
  ]
3948
- }), /* @__PURE__ */ (0, V.jsx)("span", {
3995
+ }), /* @__PURE__ */ (0, U.jsx)("span", {
3949
3996
  className: "truncate",
3950
- children: Ht(a) || Ht(n?.label)
3997
+ children: Wt(a) || Wt(n?.label)
3951
3998
  })]
3952
- })] })]
3999
+ })] }) })]
3953
4000
  });
3954
4001
  };
3955
4002
  //#endregion
3956
4003
  //#region src/MetricCard.tsx
3957
- function Wt(e) {
4004
+ function Kt(e) {
3958
4005
  if (e != null) return typeof e == "string" ? e : e.defaultValue || e.key;
3959
4006
  }
3960
- var Gt = ({ title: e, value: t, icon: n, trend: r, trendValue: i, description: a, className: o, ...s }) => {
3961
- let f = n && D[n];
3962
- return /* @__PURE__ */ (0, V.jsxs)(c, {
4007
+ var qt = ({ title: e, value: t, icon: n, trend: r, trendValue: i, description: a, className: o, loading: s, error: f, ...p }) => {
4008
+ let m = n && D[n];
4009
+ return /* @__PURE__ */ (0, U.jsxs)(c, {
3963
4010
  className: g("h-full", o),
3964
- ...s,
3965
- children: [/* @__PURE__ */ (0, V.jsxs)(u, {
4011
+ ...p,
4012
+ children: [/* @__PURE__ */ (0, U.jsxs)(u, {
3966
4013
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
3967
- children: [/* @__PURE__ */ (0, V.jsx)(d, {
4014
+ children: [/* @__PURE__ */ (0, U.jsx)(d, {
3968
4015
  className: "text-sm font-medium",
3969
- children: Wt(e)
3970
- }), f && /* @__PURE__ */ (0, V.jsx)(f, { className: "h-4 w-4 text-muted-foreground" })]
3971
- }), /* @__PURE__ */ (0, V.jsxs)(l, { children: [/* @__PURE__ */ (0, V.jsx)("div", {
4016
+ children: Kt(e)
4017
+ }), m && /* @__PURE__ */ (0, U.jsx)(m, { className: "h-4 w-4 text-muted-foreground" })]
4018
+ }), /* @__PURE__ */ (0, U.jsx)(l, { children: s ? /* @__PURE__ */ (0, U.jsxs)("div", {
4019
+ className: "flex items-center gap-2 text-muted-foreground",
4020
+ "data-testid": "metric-card-loading",
4021
+ children: [/* @__PURE__ */ (0, U.jsx)(N, { className: "h-4 w-4 animate-spin" }), /* @__PURE__ */ (0, U.jsx)("span", {
4022
+ className: "text-sm",
4023
+ children: "Loading…"
4024
+ })]
4025
+ }) : f ? /* @__PURE__ */ (0, U.jsxs)("div", {
4026
+ className: "flex items-center gap-2",
4027
+ "data-testid": "metric-card-error",
4028
+ role: "alert",
4029
+ children: [/* @__PURE__ */ (0, U.jsx)(O, { className: "h-4 w-4 text-destructive shrink-0" }), /* @__PURE__ */ (0, U.jsx)("span", {
4030
+ className: "text-xs text-destructive truncate",
4031
+ children: f
4032
+ })]
4033
+ }) : /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)("div", {
3972
4034
  className: "text-2xl font-bold",
3973
4035
  children: t
3974
- }), (r || i || a) && /* @__PURE__ */ (0, V.jsxs)("p", {
4036
+ }), (r || i || a) && /* @__PURE__ */ (0, U.jsxs)("p", {
3975
4037
  className: "text-xs text-muted-foreground flex items-center mt-1",
3976
- children: [r && i && /* @__PURE__ */ (0, V.jsxs)("span", {
4038
+ children: [r && i && /* @__PURE__ */ (0, U.jsxs)("span", {
3977
4039
  className: g("flex items-center mr-2", r === "up" && "text-green-500", r === "down" && "text-red-500", r === "neutral" && "text-yellow-500"),
3978
4040
  children: [
3979
- r === "up" && /* @__PURE__ */ (0, V.jsx)(k, { className: "h-3 w-3 mr-1" }),
3980
- r === "down" && /* @__PURE__ */ (0, V.jsx)(O, { className: "h-3 w-3 mr-1" }),
3981
- r === "neutral" && /* @__PURE__ */ (0, V.jsx)(M, { className: "h-3 w-3 mr-1" }),
4041
+ r === "up" && /* @__PURE__ */ (0, U.jsx)(A, { className: "h-3 w-3 mr-1" }),
4042
+ r === "down" && /* @__PURE__ */ (0, U.jsx)(k, { className: "h-3 w-3 mr-1" }),
4043
+ r === "neutral" && /* @__PURE__ */ (0, U.jsx)(P, { className: "h-3 w-3 mr-1" }),
3982
4044
  i
3983
4045
  ]
3984
- }), Wt(a)]
3985
- })] })]
4046
+ }), Kt(a)]
4047
+ })] }) })]
4048
+ });
4049
+ }, Jt = ({ objectName: e, aggregate: t, filter: n, label: i, fallbackValue: a, trend: o, icon: s, className: c, description: l, dataSource: u }) => {
4050
+ let d = S(r), f = u || d?.dataSource, [p, m] = E(null), [h, g] = E(!1), [_, v] = E(null), y = x(async (r, i) => {
4051
+ if (!(!r || !e)) {
4052
+ i.current && (g(!0), v(null));
4053
+ try {
4054
+ let a;
4055
+ if (t && typeof r.aggregate == "function") {
4056
+ let i = await r.aggregate(e, {
4057
+ field: t.field,
4058
+ function: t.function,
4059
+ groupBy: t.groupBy || "_all",
4060
+ filter: n
4061
+ }), o = Array.isArray(i) ? i : [];
4062
+ a = o.length === 0 ? 0 : t.function === "count" ? o.reduce((e, n) => e + (Number(n[t.field]) || Number(n.count) || 0), 0) : o[0][t.field] ?? 0;
4063
+ } else if (typeof r.find == "function") {
4064
+ let t = await r.find(e, { $filter: n });
4065
+ a = (Array.isArray(t) ? t : t?.data || t?.records || []).length;
4066
+ } else return;
4067
+ i.current && m(a);
4068
+ } catch (e) {
4069
+ console.error("[ObjectMetricWidget] Fetch error:", e), i.current && v(e instanceof Error ? e.message : "Failed to load metric");
4070
+ } finally {
4071
+ i.current && g(!1);
4072
+ }
4073
+ }
4074
+ }, [
4075
+ e,
4076
+ t,
4077
+ n
4078
+ ]);
4079
+ return C(() => {
4080
+ let t = { current: !0 };
4081
+ return f && e ? y(f, t) : (m(null), v(null)), () => {
4082
+ t.current = !1;
4083
+ };
4084
+ }, [
4085
+ f,
4086
+ e,
4087
+ y
4088
+ ]), /* @__PURE__ */ (0, U.jsx)(Gt, {
4089
+ label: i,
4090
+ value: p === null ? f ? "—" : a ?? "—" : p,
4091
+ trend: o,
4092
+ icon: s,
4093
+ className: c,
4094
+ description: l,
4095
+ loading: h,
4096
+ error: _
3986
4097
  });
3987
4098
  };
3988
4099
  //#endregion
3989
4100
  //#region src/PivotTable.tsx
3990
- function Kt(e, t) {
4101
+ function Yt(e, t) {
3991
4102
  if (!t) return String(e);
3992
4103
  let n = "", r = "", i = !1, a, o = t, s = o.match(/^([^0-9.,#]*)/);
3993
4104
  if (s && s[1]) {
@@ -4004,7 +4115,7 @@ function Kt(e, t) {
4004
4115
  }
4005
4116
  return n + l + r;
4006
4117
  }
4007
- function qt(e, t) {
4118
+ function Xt(e, t) {
4008
4119
  if (e.length === 0) return 0;
4009
4120
  switch (t) {
4010
4121
  case "sum": return e.reduce((e, t) => e + t, 0);
@@ -4015,7 +4126,7 @@ function qt(e, t) {
4015
4126
  default: return e.reduce((e, t) => e + t, 0);
4016
4127
  }
4017
4128
  }
4018
- var Jt = ({ schema: e, className: t }) => {
4129
+ var Zt = ({ schema: e, className: t }) => {
4019
4130
  let { title: n, rowField: r, columnField: i, valueField: a, aggregation: o = "sum", data: s = [], showRowTotals: c = !1, showColumnTotals: l = !1, format: u, columnColors: d } = e, f = Array.isArray(s) ? s : [], { rowKeys: p, colKeys: m, matrix: h, rowTotals: _, colTotals: v, grandTotal: y } = w(() => {
4020
4131
  let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = {};
4021
4132
  for (let o of f) {
@@ -4027,10 +4138,10 @@ var Jt = ({ schema: e, className: t }) => {
4027
4138
  l[e] = {};
4028
4139
  let t = [];
4029
4140
  for (let r of c) {
4030
- let i = n[e]?.[r] ?? [], a = qt(i, o);
4141
+ let i = n[e]?.[r] ?? [], a = Xt(i, o);
4031
4142
  l[e][r] = a, t.push(...i), !d[r] && d[r];
4032
4143
  }
4033
- u[e] = qt(t, o);
4144
+ u[e] = Xt(t, o);
4034
4145
  }
4035
4146
  for (let e of c) {
4036
4147
  let t = [];
@@ -4038,7 +4149,7 @@ var Jt = ({ schema: e, className: t }) => {
4038
4149
  let i = n[r]?.[e] ?? [];
4039
4150
  t.push(...i);
4040
4151
  }
4041
- d[e] = qt(t, o);
4152
+ d[e] = Xt(t, o);
4042
4153
  }
4043
4154
  let p = [];
4044
4155
  for (let e of f) p.push(Number(e[a]) || 0);
@@ -4048,7 +4159,7 @@ var Jt = ({ schema: e, className: t }) => {
4048
4159
  matrix: l,
4049
4160
  rowTotals: u,
4050
4161
  colTotals: d,
4051
- grandTotal: qt(p, o)
4162
+ grandTotal: Xt(p, o)
4052
4163
  };
4053
4164
  }, [
4054
4165
  f,
@@ -4056,16 +4167,16 @@ var Jt = ({ schema: e, className: t }) => {
4056
4167
  i,
4057
4168
  a,
4058
4169
  o
4059
- ]), b = (e) => Kt(e, u);
4060
- return f.length === 0 ? /* @__PURE__ */ (0, V.jsxs)("div", {
4170
+ ]), b = (e) => Yt(e, u);
4171
+ return f.length === 0 ? /* @__PURE__ */ (0, U.jsxs)("div", {
4061
4172
  className: g("overflow-auto", t),
4062
- children: [n && /* @__PURE__ */ (0, V.jsx)("h3", {
4173
+ children: [n && /* @__PURE__ */ (0, U.jsx)("h3", {
4063
4174
  className: "text-sm font-semibold mb-2",
4064
4175
  children: n
4065
- }), /* @__PURE__ */ (0, V.jsxs)("div", {
4176
+ }), /* @__PURE__ */ (0, U.jsxs)("div", {
4066
4177
  className: "flex flex-col items-center justify-center py-8 text-muted-foreground",
4067
4178
  "data-testid": "pivot-empty-state",
4068
- children: [/* @__PURE__ */ (0, V.jsxs)("svg", {
4179
+ children: [/* @__PURE__ */ (0, U.jsxs)("svg", {
4069
4180
  xmlns: "http://www.w3.org/2000/svg",
4070
4181
  className: "h-8 w-8 mb-2 opacity-40",
4071
4182
  viewBox: "0 0 24 24",
@@ -4075,91 +4186,91 @@ var Jt = ({ schema: e, className: t }) => {
4075
4186
  strokeLinecap: "round",
4076
4187
  strokeLinejoin: "round",
4077
4188
  children: [
4078
- /* @__PURE__ */ (0, V.jsx)("rect", {
4189
+ /* @__PURE__ */ (0, U.jsx)("rect", {
4079
4190
  x: "3",
4080
4191
  y: "3",
4081
4192
  width: "7",
4082
4193
  height: "7"
4083
4194
  }),
4084
- /* @__PURE__ */ (0, V.jsx)("rect", {
4195
+ /* @__PURE__ */ (0, U.jsx)("rect", {
4085
4196
  x: "14",
4086
4197
  y: "3",
4087
4198
  width: "7",
4088
4199
  height: "7"
4089
4200
  }),
4090
- /* @__PURE__ */ (0, V.jsx)("rect", {
4201
+ /* @__PURE__ */ (0, U.jsx)("rect", {
4091
4202
  x: "3",
4092
4203
  y: "14",
4093
4204
  width: "7",
4094
4205
  height: "7"
4095
4206
  }),
4096
- /* @__PURE__ */ (0, V.jsx)("rect", {
4207
+ /* @__PURE__ */ (0, U.jsx)("rect", {
4097
4208
  x: "14",
4098
4209
  y: "14",
4099
4210
  width: "7",
4100
4211
  height: "7"
4101
4212
  })
4102
4213
  ]
4103
- }), /* @__PURE__ */ (0, V.jsx)("p", {
4214
+ }), /* @__PURE__ */ (0, U.jsx)("p", {
4104
4215
  className: "text-xs",
4105
4216
  children: "No data available"
4106
4217
  })]
4107
4218
  })]
4108
- }) : /* @__PURE__ */ (0, V.jsxs)("div", {
4219
+ }) : /* @__PURE__ */ (0, U.jsxs)("div", {
4109
4220
  className: g("overflow-auto", t),
4110
- children: [n && /* @__PURE__ */ (0, V.jsx)("h3", {
4221
+ children: [n && /* @__PURE__ */ (0, U.jsx)("h3", {
4111
4222
  className: "text-sm font-semibold mb-2",
4112
4223
  children: n
4113
- }), /* @__PURE__ */ (0, V.jsxs)("table", {
4224
+ }), /* @__PURE__ */ (0, U.jsxs)("table", {
4114
4225
  className: "w-full text-sm border-collapse",
4115
4226
  role: "table",
4116
4227
  children: [
4117
- /* @__PURE__ */ (0, V.jsx)("thead", { children: /* @__PURE__ */ (0, V.jsxs)("tr", {
4228
+ /* @__PURE__ */ (0, U.jsx)("thead", { children: /* @__PURE__ */ (0, U.jsxs)("tr", {
4118
4229
  className: "border-b border-border",
4119
4230
  children: [
4120
- /* @__PURE__ */ (0, V.jsx)("th", {
4231
+ /* @__PURE__ */ (0, U.jsx)("th", {
4121
4232
  className: "text-left p-2 font-medium text-muted-foreground",
4122
4233
  children: r
4123
4234
  }),
4124
- m.map((e) => /* @__PURE__ */ (0, V.jsx)("th", {
4235
+ m.map((e) => /* @__PURE__ */ (0, U.jsx)("th", {
4125
4236
  className: g("text-right p-2 font-medium", d?.[e] ?? "text-muted-foreground"),
4126
4237
  children: e
4127
4238
  }, e)),
4128
- c && /* @__PURE__ */ (0, V.jsx)("th", {
4239
+ c && /* @__PURE__ */ (0, U.jsx)("th", {
4129
4240
  className: "text-right p-2 font-semibold text-muted-foreground bg-muted/20",
4130
4241
  children: "Total"
4131
4242
  })
4132
4243
  ]
4133
4244
  }) }),
4134
- /* @__PURE__ */ (0, V.jsx)("tbody", { children: p.map((e) => /* @__PURE__ */ (0, V.jsxs)("tr", {
4245
+ /* @__PURE__ */ (0, U.jsx)("tbody", { children: p.map((e) => /* @__PURE__ */ (0, U.jsxs)("tr", {
4135
4246
  className: "border-b border-border/50 hover:bg-muted/30",
4136
4247
  children: [
4137
- /* @__PURE__ */ (0, V.jsx)("td", {
4248
+ /* @__PURE__ */ (0, U.jsx)("td", {
4138
4249
  className: "p-2 font-medium",
4139
4250
  children: e
4140
4251
  }),
4141
- m.map((t) => /* @__PURE__ */ (0, V.jsx)("td", {
4252
+ m.map((t) => /* @__PURE__ */ (0, U.jsx)("td", {
4142
4253
  className: g("text-right p-2 tabular-nums", d?.[t]),
4143
4254
  children: b(h[e]?.[t] ?? 0)
4144
4255
  }, t)),
4145
- c && /* @__PURE__ */ (0, V.jsx)("td", {
4256
+ c && /* @__PURE__ */ (0, U.jsx)("td", {
4146
4257
  className: "text-right p-2 font-semibold tabular-nums bg-muted/20",
4147
4258
  children: b(_[e] ?? 0)
4148
4259
  })
4149
4260
  ]
4150
4261
  }, e)) }),
4151
- l && /* @__PURE__ */ (0, V.jsx)("tfoot", { children: /* @__PURE__ */ (0, V.jsxs)("tr", {
4262
+ l && /* @__PURE__ */ (0, U.jsx)("tfoot", { children: /* @__PURE__ */ (0, U.jsxs)("tr", {
4152
4263
  className: "border-t-2 border-border font-semibold bg-muted/40",
4153
4264
  children: [
4154
- /* @__PURE__ */ (0, V.jsx)("td", {
4265
+ /* @__PURE__ */ (0, U.jsx)("td", {
4155
4266
  className: "p-2",
4156
4267
  children: "Total"
4157
4268
  }),
4158
- m.map((e) => /* @__PURE__ */ (0, V.jsx)("td", {
4269
+ m.map((e) => /* @__PURE__ */ (0, U.jsx)("td", {
4159
4270
  className: "text-right p-2 tabular-nums",
4160
4271
  children: b(v[e] ?? 0)
4161
4272
  }, e)),
4162
- c && /* @__PURE__ */ (0, V.jsx)("td", {
4273
+ c && /* @__PURE__ */ (0, U.jsx)("td", {
4163
4274
  className: "text-right p-2 tabular-nums font-bold",
4164
4275
  children: b(y)
4165
4276
  })
@@ -4168,7 +4279,7 @@ var Jt = ({ schema: e, className: t }) => {
4168
4279
  ]
4169
4280
  })]
4170
4281
  });
4171
- }, Yt = ({ schema: e, dataSource: n, className: a }) => {
4282
+ }, Qt = ({ schema: e, dataSource: n, className: a }) => {
4172
4283
  let o = S(r), s = n || o?.dataSource, c = i(e.bind), [l, u] = E([]), [d, f] = E(!1), [p, m] = E(null);
4173
4284
  C(() => {
4174
4285
  let n = !0;
@@ -4197,46 +4308,46 @@ var Jt = ({ schema: e, className: t }) => {
4197
4308
  e.filter
4198
4309
  ]);
4199
4310
  let _ = c || e.data || l, v = Array.isArray(_) ? _ : [];
4200
- return d && v.length === 0 ? /* @__PURE__ */ (0, V.jsxs)("div", {
4311
+ return d && v.length === 0 ? /* @__PURE__ */ (0, U.jsxs)("div", {
4201
4312
  className: g("overflow-auto", a),
4202
4313
  "data-testid": "pivot-loading",
4203
- children: [e.title && /* @__PURE__ */ (0, V.jsx)("h3", {
4314
+ children: [e.title && /* @__PURE__ */ (0, U.jsx)("h3", {
4204
4315
  className: "text-sm font-semibold mb-2",
4205
4316
  children: e.title
4206
- }), /* @__PURE__ */ (0, V.jsxs)("div", {
4317
+ }), /* @__PURE__ */ (0, U.jsxs)("div", {
4207
4318
  className: "space-y-2 p-2",
4208
- children: [/* @__PURE__ */ (0, V.jsxs)("div", {
4319
+ children: [/* @__PURE__ */ (0, U.jsxs)("div", {
4209
4320
  className: "flex gap-2",
4210
4321
  children: [
4211
- /* @__PURE__ */ (0, V.jsx)(h, { className: "h-6 w-24" }),
4212
- /* @__PURE__ */ (0, V.jsx)(h, { className: "h-6 w-20" }),
4213
- /* @__PURE__ */ (0, V.jsx)(h, { className: "h-6 w-20" }),
4214
- /* @__PURE__ */ (0, V.jsx)(h, { className: "h-6 w-20" })
4322
+ /* @__PURE__ */ (0, U.jsx)(h, { className: "h-6 w-24" }),
4323
+ /* @__PURE__ */ (0, U.jsx)(h, { className: "h-6 w-20" }),
4324
+ /* @__PURE__ */ (0, U.jsx)(h, { className: "h-6 w-20" }),
4325
+ /* @__PURE__ */ (0, U.jsx)(h, { className: "h-6 w-20" })
4215
4326
  ]
4216
4327
  }), [
4217
4328
  1,
4218
4329
  2,
4219
4330
  3
4220
- ].map((e) => /* @__PURE__ */ (0, V.jsxs)("div", {
4331
+ ].map((e) => /* @__PURE__ */ (0, U.jsxs)("div", {
4221
4332
  className: "flex gap-2",
4222
4333
  children: [
4223
- /* @__PURE__ */ (0, V.jsx)(h, { className: "h-5 w-24" }),
4224
- /* @__PURE__ */ (0, V.jsx)(h, { className: "h-5 w-20" }),
4225
- /* @__PURE__ */ (0, V.jsx)(h, { className: "h-5 w-20" }),
4226
- /* @__PURE__ */ (0, V.jsx)(h, { className: "h-5 w-20" })
4334
+ /* @__PURE__ */ (0, U.jsx)(h, { className: "h-5 w-24" }),
4335
+ /* @__PURE__ */ (0, U.jsx)(h, { className: "h-5 w-20" }),
4336
+ /* @__PURE__ */ (0, U.jsx)(h, { className: "h-5 w-20" }),
4337
+ /* @__PURE__ */ (0, U.jsx)(h, { className: "h-5 w-20" })
4227
4338
  ]
4228
4339
  }, e))]
4229
4340
  })]
4230
- }) : p ? /* @__PURE__ */ (0, V.jsxs)("div", {
4341
+ }) : p ? /* @__PURE__ */ (0, U.jsxs)("div", {
4231
4342
  className: g("overflow-auto", a),
4232
4343
  "data-testid": "pivot-error",
4233
- children: [e.title && /* @__PURE__ */ (0, V.jsx)("h3", {
4344
+ children: [e.title && /* @__PURE__ */ (0, U.jsx)("h3", {
4234
4345
  className: "text-sm font-semibold mb-2",
4235
4346
  children: e.title
4236
- }), /* @__PURE__ */ (0, V.jsxs)("div", {
4347
+ }), /* @__PURE__ */ (0, U.jsxs)("div", {
4237
4348
  className: "flex flex-col items-center justify-center py-8 text-destructive",
4238
4349
  "data-testid": "pivot-error-message",
4239
- children: [/* @__PURE__ */ (0, V.jsxs)("svg", {
4350
+ children: [/* @__PURE__ */ (0, U.jsxs)("svg", {
4240
4351
  xmlns: "http://www.w3.org/2000/svg",
4241
4352
  className: "h-8 w-8 mb-2 opacity-60",
4242
4353
  viewBox: "0 0 24 24",
@@ -4246,37 +4357,37 @@ var Jt = ({ schema: e, className: t }) => {
4246
4357
  strokeLinecap: "round",
4247
4358
  strokeLinejoin: "round",
4248
4359
  children: [
4249
- /* @__PURE__ */ (0, V.jsx)("circle", {
4360
+ /* @__PURE__ */ (0, U.jsx)("circle", {
4250
4361
  cx: "12",
4251
4362
  cy: "12",
4252
4363
  r: "10"
4253
4364
  }),
4254
- /* @__PURE__ */ (0, V.jsx)("line", {
4365
+ /* @__PURE__ */ (0, U.jsx)("line", {
4255
4366
  x1: "12",
4256
4367
  y1: "8",
4257
4368
  x2: "12",
4258
4369
  y2: "12"
4259
4370
  }),
4260
- /* @__PURE__ */ (0, V.jsx)("line", {
4371
+ /* @__PURE__ */ (0, U.jsx)("line", {
4261
4372
  x1: "12",
4262
4373
  y1: "16",
4263
4374
  x2: "12.01",
4264
4375
  y2: "16"
4265
4376
  })
4266
4377
  ]
4267
- }), /* @__PURE__ */ (0, V.jsx)("p", {
4378
+ }), /* @__PURE__ */ (0, U.jsx)("p", {
4268
4379
  className: "text-xs",
4269
4380
  children: p
4270
4381
  })]
4271
4382
  })]
4272
- }) : !s && e.objectName && v.length === 0 ? /* @__PURE__ */ (0, V.jsxs)("div", {
4383
+ }) : !s && e.objectName && v.length === 0 ? /* @__PURE__ */ (0, U.jsxs)("div", {
4273
4384
  className: g("overflow-auto", a),
4274
- children: [e.title && /* @__PURE__ */ (0, V.jsx)("h3", {
4385
+ children: [e.title && /* @__PURE__ */ (0, U.jsx)("h3", {
4275
4386
  className: "text-sm font-semibold mb-2",
4276
4387
  children: e.title
4277
- }), /* @__PURE__ */ (0, V.jsx)("div", {
4388
+ }), /* @__PURE__ */ (0, U.jsx)("div", {
4278
4389
  className: "flex flex-col items-center justify-center py-8 text-muted-foreground",
4279
- children: /* @__PURE__ */ (0, V.jsxs)("p", {
4390
+ children: /* @__PURE__ */ (0, U.jsxs)("p", {
4280
4391
  className: "text-xs",
4281
4392
  children: [
4282
4393
  "No data source available for “",
@@ -4285,7 +4396,7 @@ var Jt = ({ schema: e, className: t }) => {
4285
4396
  ]
4286
4397
  })
4287
4398
  })]
4288
- }) : /* @__PURE__ */ (0, V.jsx)(Jt, {
4399
+ }) : /* @__PURE__ */ (0, U.jsx)(Zt, {
4289
4400
  schema: {
4290
4401
  ...e,
4291
4402
  data: v
@@ -4295,13 +4406,13 @@ var Jt = ({ schema: e, className: t }) => {
4295
4406
  };
4296
4407
  //#endregion
4297
4408
  //#region src/ObjectDataTable.tsx
4298
- function Xt(e) {
4409
+ function $t(e) {
4299
4410
  return e.map((e) => typeof e == "string" ? {
4300
4411
  header: e.replace(/_/g, " ").replace(/([A-Z])/g, " $1").trim().replace(/\b\w/g, (e) => e.toUpperCase()),
4301
4412
  accessorKey: e
4302
4413
  } : e);
4303
4414
  }
4304
- var Zt = ({ schema: e, dataSource: a, className: o }) => {
4415
+ var en = ({ schema: e, dataSource: a, className: o }) => {
4305
4416
  let s = S(r), c = a || s?.dataSource, l = i(e.bind), [u, d] = E([]), [f, p] = E(!1), [m, _] = E(null);
4306
4417
  C(() => {
4307
4418
  let n = !0;
@@ -4329,45 +4440,45 @@ var Zt = ({ schema: e, dataSource: a, className: o }) => {
4329
4440
  e.data,
4330
4441
  e.filter
4331
4442
  ]);
4332
- let v = l || e.data || u, y = Array.isArray(v) ? v : [], b = w(() => e.columns && e.columns.length > 0 ? Xt(e.columns) : y.length === 0 ? [] : Object.keys(y[0]).filter((e) => !e.startsWith("_")).map((e) => ({
4443
+ let v = l || e.data || u, y = Array.isArray(v) ? v : [], b = w(() => e.columns && e.columns.length > 0 ? $t(e.columns) : y.length === 0 ? [] : Object.keys(y[0]).filter((e) => !e.startsWith("_")).map((e) => ({
4333
4444
  header: e.charAt(0).toUpperCase() + e.slice(1).replace(/([A-Z])/g, " $1"),
4334
4445
  accessorKey: e
4335
4446
  })), [e.columns, y]);
4336
- return f && y.length === 0 ? /* @__PURE__ */ (0, V.jsx)("div", {
4447
+ return f && y.length === 0 ? /* @__PURE__ */ (0, U.jsx)("div", {
4337
4448
  className: g("overflow-auto", o),
4338
4449
  "data-testid": "table-loading",
4339
- children: /* @__PURE__ */ (0, V.jsxs)("div", {
4450
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
4340
4451
  className: "space-y-2 p-2",
4341
- children: [/* @__PURE__ */ (0, V.jsxs)("div", {
4452
+ children: [/* @__PURE__ */ (0, U.jsxs)("div", {
4342
4453
  className: "flex gap-2",
4343
4454
  children: [
4344
- /* @__PURE__ */ (0, V.jsx)(h, { className: "h-6 w-1/4" }),
4345
- /* @__PURE__ */ (0, V.jsx)(h, { className: "h-6 w-1/4" }),
4346
- /* @__PURE__ */ (0, V.jsx)(h, { className: "h-6 w-1/4" }),
4347
- /* @__PURE__ */ (0, V.jsx)(h, { className: "h-6 w-1/4" })
4455
+ /* @__PURE__ */ (0, U.jsx)(h, { className: "h-6 w-1/4" }),
4456
+ /* @__PURE__ */ (0, U.jsx)(h, { className: "h-6 w-1/4" }),
4457
+ /* @__PURE__ */ (0, U.jsx)(h, { className: "h-6 w-1/4" }),
4458
+ /* @__PURE__ */ (0, U.jsx)(h, { className: "h-6 w-1/4" })
4348
4459
  ]
4349
4460
  }), [
4350
4461
  1,
4351
4462
  2,
4352
4463
  3,
4353
4464
  4
4354
- ].map((e) => /* @__PURE__ */ (0, V.jsxs)("div", {
4465
+ ].map((e) => /* @__PURE__ */ (0, U.jsxs)("div", {
4355
4466
  className: "flex gap-2",
4356
4467
  children: [
4357
- /* @__PURE__ */ (0, V.jsx)(h, { className: "h-5 w-1/4" }),
4358
- /* @__PURE__ */ (0, V.jsx)(h, { className: "h-5 w-1/4" }),
4359
- /* @__PURE__ */ (0, V.jsx)(h, { className: "h-5 w-1/4" }),
4360
- /* @__PURE__ */ (0, V.jsx)(h, { className: "h-5 w-1/4" })
4468
+ /* @__PURE__ */ (0, U.jsx)(h, { className: "h-5 w-1/4" }),
4469
+ /* @__PURE__ */ (0, U.jsx)(h, { className: "h-5 w-1/4" }),
4470
+ /* @__PURE__ */ (0, U.jsx)(h, { className: "h-5 w-1/4" }),
4471
+ /* @__PURE__ */ (0, U.jsx)(h, { className: "h-5 w-1/4" })
4361
4472
  ]
4362
4473
  }, e))]
4363
4474
  })
4364
- }) : m ? /* @__PURE__ */ (0, V.jsx)("div", {
4475
+ }) : m ? /* @__PURE__ */ (0, U.jsx)("div", {
4365
4476
  className: g("overflow-auto", o),
4366
4477
  "data-testid": "table-error",
4367
- children: /* @__PURE__ */ (0, V.jsxs)("div", {
4478
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
4368
4479
  className: "flex flex-col items-center justify-center py-8 text-destructive",
4369
4480
  "data-testid": "table-error-message",
4370
- children: [/* @__PURE__ */ (0, V.jsxs)("svg", {
4481
+ children: [/* @__PURE__ */ (0, U.jsxs)("svg", {
4371
4482
  xmlns: "http://www.w3.org/2000/svg",
4372
4483
  className: "h-8 w-8 mb-2 opacity-60",
4373
4484
  viewBox: "0 0 24 24",
@@ -4377,34 +4488,34 @@ var Zt = ({ schema: e, dataSource: a, className: o }) => {
4377
4488
  strokeLinecap: "round",
4378
4489
  strokeLinejoin: "round",
4379
4490
  children: [
4380
- /* @__PURE__ */ (0, V.jsx)("circle", {
4491
+ /* @__PURE__ */ (0, U.jsx)("circle", {
4381
4492
  cx: "12",
4382
4493
  cy: "12",
4383
4494
  r: "10"
4384
4495
  }),
4385
- /* @__PURE__ */ (0, V.jsx)("line", {
4496
+ /* @__PURE__ */ (0, U.jsx)("line", {
4386
4497
  x1: "12",
4387
4498
  y1: "8",
4388
4499
  x2: "12",
4389
4500
  y2: "12"
4390
4501
  }),
4391
- /* @__PURE__ */ (0, V.jsx)("line", {
4502
+ /* @__PURE__ */ (0, U.jsx)("line", {
4392
4503
  x1: "12",
4393
4504
  y1: "16",
4394
4505
  x2: "12.01",
4395
4506
  y2: "16"
4396
4507
  })
4397
4508
  ]
4398
- }), /* @__PURE__ */ (0, V.jsx)("p", {
4509
+ }), /* @__PURE__ */ (0, U.jsx)("p", {
4399
4510
  className: "text-xs",
4400
4511
  children: m
4401
4512
  })]
4402
4513
  })
4403
- }) : !c && e.objectName && y.length === 0 ? /* @__PURE__ */ (0, V.jsx)("div", {
4514
+ }) : !c && e.objectName && y.length === 0 ? /* @__PURE__ */ (0, U.jsx)("div", {
4404
4515
  className: g("overflow-auto", o),
4405
- children: /* @__PURE__ */ (0, V.jsx)("div", {
4516
+ children: /* @__PURE__ */ (0, U.jsx)("div", {
4406
4517
  className: "flex flex-col items-center justify-center py-8 text-muted-foreground",
4407
- children: /* @__PURE__ */ (0, V.jsxs)("p", {
4518
+ children: /* @__PURE__ */ (0, U.jsxs)("p", {
4408
4519
  className: "text-xs",
4409
4520
  children: [
4410
4521
  "No data source available for “",
@@ -4413,12 +4524,12 @@ var Zt = ({ schema: e, dataSource: a, className: o }) => {
4413
4524
  ]
4414
4525
  })
4415
4526
  })
4416
- }) : y.length === 0 ? /* @__PURE__ */ (0, V.jsx)("div", {
4527
+ }) : y.length === 0 ? /* @__PURE__ */ (0, U.jsx)("div", {
4417
4528
  className: g("overflow-auto", o),
4418
4529
  "data-testid": "table-empty-state",
4419
- children: /* @__PURE__ */ (0, V.jsxs)("div", {
4530
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
4420
4531
  className: "flex flex-col items-center justify-center py-8 text-muted-foreground",
4421
- children: [/* @__PURE__ */ (0, V.jsxs)("svg", {
4532
+ children: [/* @__PURE__ */ (0, U.jsxs)("svg", {
4422
4533
  xmlns: "http://www.w3.org/2000/svg",
4423
4534
  className: "h-8 w-8 mb-2 opacity-40",
4424
4535
  viewBox: "0 0 24 24",
@@ -4428,7 +4539,7 @@ var Zt = ({ schema: e, dataSource: a, className: o }) => {
4428
4539
  strokeLinecap: "round",
4429
4540
  strokeLinejoin: "round",
4430
4541
  children: [
4431
- /* @__PURE__ */ (0, V.jsx)("rect", {
4542
+ /* @__PURE__ */ (0, U.jsx)("rect", {
4432
4543
  x: "3",
4433
4544
  y: "3",
4434
4545
  width: "18",
@@ -4436,25 +4547,25 @@ var Zt = ({ schema: e, dataSource: a, className: o }) => {
4436
4547
  rx: "2",
4437
4548
  ry: "2"
4438
4549
  }),
4439
- /* @__PURE__ */ (0, V.jsx)("line", {
4550
+ /* @__PURE__ */ (0, U.jsx)("line", {
4440
4551
  x1: "3",
4441
4552
  y1: "9",
4442
4553
  x2: "21",
4443
4554
  y2: "9"
4444
4555
  }),
4445
- /* @__PURE__ */ (0, V.jsx)("line", {
4556
+ /* @__PURE__ */ (0, U.jsx)("line", {
4446
4557
  x1: "9",
4447
4558
  y1: "21",
4448
4559
  x2: "9",
4449
4560
  y2: "9"
4450
4561
  })
4451
4562
  ]
4452
- }), /* @__PURE__ */ (0, V.jsx)("p", {
4563
+ }), /* @__PURE__ */ (0, U.jsx)("p", {
4453
4564
  className: "text-xs",
4454
4565
  children: "No data available"
4455
4566
  })]
4456
4567
  })
4457
- }) : /* @__PURE__ */ (0, V.jsx)(n, {
4568
+ }) : /* @__PURE__ */ (0, U.jsx)(n, {
4458
4569
  schema: {
4459
4570
  ...e,
4460
4571
  type: "data-table",
@@ -4463,7 +4574,7 @@ var Zt = ({ schema: e, dataSource: a, className: o }) => {
4463
4574
  },
4464
4575
  className: o
4465
4576
  });
4466
- }, Qt = {
4577
+ }, tn = {
4467
4578
  breadcrumb: ["Dashboard", "Configuration"],
4468
4579
  sections: [
4469
4580
  {
@@ -4568,12 +4679,12 @@ var Zt = ({ schema: e, dataSource: a, className: o }) => {
4568
4679
  }
4569
4680
  ]
4570
4681
  };
4571
- function $t({ open: e, onClose: t, config: n, onSave: r, onFieldChange: i }) {
4682
+ function nn({ open: e, onClose: t, config: n, onSave: r, onFieldChange: i }) {
4572
4683
  let { draft: a, isDirty: o, updateField: s, discard: c } = _(n, { onUpdate: i });
4573
- return /* @__PURE__ */ (0, V.jsx)(p, {
4684
+ return /* @__PURE__ */ (0, U.jsx)(p, {
4574
4685
  open: e,
4575
4686
  onClose: t,
4576
- schema: Qt,
4687
+ schema: tn,
4577
4688
  draft: a,
4578
4689
  isDirty: o,
4579
4690
  onFieldChange: s,
@@ -4583,7 +4694,7 @@ function $t({ open: e, onClose: t, config: n, onSave: r, onFieldChange: i }) {
4583
4694
  }
4584
4695
  //#endregion
4585
4696
  //#region src/WidgetConfigPanel.tsx
4586
- var en = [
4697
+ var rn = [
4587
4698
  {
4588
4699
  value: "metric",
4589
4700
  label: "Metric"
@@ -4628,7 +4739,7 @@ var en = [
4628
4739
  value: "custom",
4629
4740
  label: "Custom"
4630
4741
  }
4631
- ], tn = [
4742
+ ], an = [
4632
4743
  {
4633
4744
  value: "default",
4634
4745
  label: "Default"
@@ -4661,7 +4772,7 @@ var en = [
4661
4772
  value: "danger",
4662
4773
  label: "Danger"
4663
4774
  }
4664
- ], nn = [
4775
+ ], on = [
4665
4776
  {
4666
4777
  value: "count",
4667
4778
  label: "Count"
@@ -4682,7 +4793,7 @@ var en = [
4682
4793
  value: "max",
4683
4794
  label: "Max"
4684
4795
  }
4685
- ], rn = [
4796
+ ], sn = [
4686
4797
  "bar",
4687
4798
  "line",
4688
4799
  "area",
@@ -4690,32 +4801,32 @@ var en = [
4690
4801
  "donut",
4691
4802
  "scatter"
4692
4803
  ];
4693
- function an(e) {
4694
- return !!e && rn.includes(e);
4804
+ function cn(e) {
4805
+ return !!e && sn.includes(e);
4695
4806
  }
4696
- var on = [{
4807
+ var ln = [{
4697
4808
  value: "group",
4698
4809
  label: "Group"
4699
4810
  }, {
4700
4811
  value: "value",
4701
4812
  label: "Value"
4702
- }], sn = [{
4813
+ }], un = [{
4703
4814
  value: "asc",
4704
4815
  label: "↑"
4705
4816
  }, {
4706
4817
  value: "desc",
4707
4818
  label: "↓"
4708
4819
  }];
4709
- function cn(e, t, n, r) {
4820
+ function dn(e, t, n, r) {
4710
4821
  return {
4711
4822
  key: e,
4712
4823
  label: t,
4713
4824
  type: "custom",
4714
- render: (i, a, o) => /* @__PURE__ */ (0, V.jsx)(m, {
4825
+ render: (i, a, o) => /* @__PURE__ */ (0, U.jsx)(m, {
4715
4826
  label: t,
4716
- children: /* @__PURE__ */ (0, V.jsx)("div", {
4827
+ children: /* @__PURE__ */ (0, U.jsx)("div", {
4717
4828
  "data-testid": `config-field-${e}`,
4718
- children: /* @__PURE__ */ (0, V.jsx)(f, {
4829
+ children: /* @__PURE__ */ (0, U.jsx)(f, {
4719
4830
  options: r ?? [],
4720
4831
  value: i ?? "",
4721
4832
  onValueChange: a,
@@ -4729,16 +4840,16 @@ function cn(e, t, n, r) {
4729
4840
  })
4730
4841
  };
4731
4842
  }
4732
- function ln(e, t, n) {
4843
+ function fn(e, t, n) {
4733
4844
  let r = e && e.length > 0, i = r ? {
4734
4845
  key: "object",
4735
4846
  label: "Data source",
4736
4847
  type: "custom",
4737
- render: (t, n) => /* @__PURE__ */ (0, V.jsx)(m, {
4848
+ render: (t, n) => /* @__PURE__ */ (0, U.jsx)(m, {
4738
4849
  label: "Data source",
4739
- children: /* @__PURE__ */ (0, V.jsx)("div", {
4850
+ children: /* @__PURE__ */ (0, U.jsx)("div", {
4740
4851
  "data-testid": "config-field-object",
4741
- children: /* @__PURE__ */ (0, V.jsx)(f, {
4852
+ children: /* @__PURE__ */ (0, U.jsx)(f, {
4742
4853
  options: e,
4743
4854
  value: t ?? "",
4744
4855
  onValueChange: n,
@@ -4754,27 +4865,27 @@ function ln(e, t, n) {
4754
4865
  label: "Data source",
4755
4866
  type: "input",
4756
4867
  placeholder: "Object name"
4757
- }, a = r ? cn("categoryField", "Category field", "Select field…", t) : {
4868
+ }, a = r ? dn("categoryField", "Category field", "Select field…", t) : {
4758
4869
  key: "categoryField",
4759
4870
  label: "Category field",
4760
4871
  type: "input",
4761
4872
  placeholder: "e.g. status"
4762
- }, o = r ? cn("valueField", "Value field", "Select field…", t) : {
4873
+ }, o = r ? dn("valueField", "Value field", "Select field…", t) : {
4763
4874
  key: "valueField",
4764
4875
  label: "Value field",
4765
4876
  type: "input",
4766
4877
  placeholder: "e.g. amount"
4767
- }, s = r ? cn("rowField", "Field", "Select row field…", t) : {
4878
+ }, s = r ? dn("rowField", "Field", "Select row field…", t) : {
4768
4879
  key: "rowField",
4769
4880
  label: "Field",
4770
4881
  type: "input",
4771
4882
  placeholder: "e.g. owner"
4772
- }, c = r ? cn("columnField", "Field", "Select column field…", t) : {
4883
+ }, c = r ? dn("columnField", "Field", "Select column field…", t) : {
4773
4884
  key: "columnField",
4774
4885
  label: "Field",
4775
4886
  type: "input",
4776
4887
  placeholder: "e.g. stage"
4777
- }, l = r ? cn("pivotValueField", "Field", "Select value field…", t) : {
4888
+ }, l = r ? dn("pivotValueField", "Field", "Select value field…", t) : {
4778
4889
  key: "pivotValueField",
4779
4890
  label: "Field",
4780
4891
  type: "input",
@@ -4784,7 +4895,7 @@ function ln(e, t, n) {
4784
4895
  breadcrumb: ["Dashboard", {
4785
4896
  pivot: "Pivot table",
4786
4897
  table: "Table"
4787
- }[n ?? ""] ?? (an(n) ? "Chart" : "Widget")],
4898
+ }[n ?? ""] ?? (cn(n) ? "Chart" : "Widget")],
4788
4899
  sections: [
4789
4900
  {
4790
4901
  key: "general",
@@ -4806,7 +4917,7 @@ function ln(e, t, n) {
4806
4917
  key: "type",
4807
4918
  label: "Widget type",
4808
4919
  type: "select",
4809
- options: en,
4920
+ options: rn,
4810
4921
  defaultValue: "metric"
4811
4922
  }
4812
4923
  ]
@@ -4824,7 +4935,7 @@ function ln(e, t, n) {
4824
4935
  key: "aggregate",
4825
4936
  label: "Aggregation",
4826
4937
  type: "select",
4827
- options: nn,
4938
+ options: on,
4828
4939
  defaultValue: "count"
4829
4940
  }
4830
4941
  ]
@@ -4847,14 +4958,14 @@ function ln(e, t, n) {
4847
4958
  key: "rowSortBy",
4848
4959
  label: "Sort by",
4849
4960
  type: "icon-group",
4850
- options: on,
4961
+ options: ln,
4851
4962
  defaultValue: "group"
4852
4963
  },
4853
4964
  {
4854
4965
  key: "rowSortOrder",
4855
4966
  label: "Sort order",
4856
4967
  type: "icon-group",
4857
- options: sn,
4968
+ options: un,
4858
4969
  defaultValue: "asc"
4859
4970
  },
4860
4971
  {
@@ -4882,14 +4993,14 @@ function ln(e, t, n) {
4882
4993
  key: "columnSortBy",
4883
4994
  label: "Sort by",
4884
4995
  type: "icon-group",
4885
- options: on,
4996
+ options: ln,
4886
4997
  defaultValue: "group"
4887
4998
  },
4888
4999
  {
4889
5000
  key: "columnSortOrder",
4890
5001
  label: "Sort order",
4891
5002
  type: "icon-group",
4892
- options: sn,
5003
+ options: un,
4893
5004
  defaultValue: "asc"
4894
5005
  },
4895
5006
  {
@@ -4917,7 +5028,7 @@ function ln(e, t, n) {
4917
5028
  key: "aggregation",
4918
5029
  label: "Aggregation",
4919
5030
  type: "select",
4920
- options: nn,
5031
+ options: on,
4921
5032
  defaultValue: "sum"
4922
5033
  },
4923
5034
  {
@@ -4932,7 +5043,7 @@ function ln(e, t, n) {
4932
5043
  key: "chart-axis",
4933
5044
  title: "Axis & Series",
4934
5045
  collapsible: !0,
4935
- visibleWhen: (e) => an(e.type),
5046
+ visibleWhen: (e) => cn(e.type),
4936
5047
  fields: [
4937
5048
  {
4938
5049
  key: "xAxisLabel",
@@ -5002,7 +5113,7 @@ function ln(e, t, n) {
5002
5113
  key: "colorVariant",
5003
5114
  label: "Color variant",
5004
5115
  type: "select",
5005
- options: tn,
5116
+ options: an,
5006
5117
  defaultValue: "default"
5007
5118
  }, {
5008
5119
  key: "actionUrl",
@@ -5014,7 +5125,7 @@ function ln(e, t, n) {
5014
5125
  ]
5015
5126
  };
5016
5127
  }
5017
- function un(e) {
5128
+ function pn(e) {
5018
5129
  if (e == null) return "";
5019
5130
  if (typeof e == "string") return e;
5020
5131
  if (typeof e == "object") {
@@ -5023,16 +5134,16 @@ function un(e) {
5023
5134
  }
5024
5135
  return String(e);
5025
5136
  }
5026
- function dn({ open: e, onClose: t, config: n, onSave: r, onFieldChange: i, headerExtra: a, availableObjects: o, availableFields: s }) {
5137
+ function mn({ open: e, onClose: t, config: n, onSave: r, onFieldChange: i, headerExtra: a, availableObjects: o, availableFields: s }) {
5027
5138
  let { draft: c, isDirty: l, updateField: u, discard: d } = _(v.useMemo(() => ({
5028
5139
  ...n,
5029
- title: typeof n.title == "object" ? un(n.title) : n.title,
5030
- description: typeof n.description == "object" ? un(n.description) : n.description
5140
+ title: typeof n.title == "object" ? pn(n.title) : n.title,
5141
+ description: typeof n.description == "object" ? pn(n.description) : n.description
5031
5142
  }), [n]), { onUpdate: i });
5032
- return /* @__PURE__ */ (0, V.jsx)(p, {
5143
+ return /* @__PURE__ */ (0, U.jsx)(p, {
5033
5144
  open: e,
5034
5145
  onClose: t,
5035
- schema: v.useMemo(() => ln(o, s, c.type), [
5146
+ schema: v.useMemo(() => fn(o, s, c.type), [
5036
5147
  o,
5037
5148
  s,
5038
5149
  c.type
@@ -5047,7 +5158,7 @@ function dn({ open: e, onClose: t, config: n, onSave: r, onFieldChange: i, heade
5047
5158
  }
5048
5159
  //#endregion
5049
5160
  //#region src/DashboardWithConfig.tsx
5050
- function fn({ schema: e, config: t, onConfigSave: n, onWidgetSave: r, onRefresh: i, recordCount: a, defaultConfigOpen: o = !1, className: c }) {
5161
+ function hn({ schema: e, config: t, onConfigSave: n, onWidgetSave: r, onRefresh: i, recordCount: a, defaultConfigOpen: o = !1, className: c }) {
5051
5162
  let [l, u] = E(o), [d, f] = E(null), [p, m] = E(e), [h, _] = E(0);
5052
5163
  C(() => {
5053
5164
  m(e), _((e) => e + 1);
@@ -5098,21 +5209,21 @@ function fn({ schema: e, config: t, onConfigSave: n, onWidgetSave: r, onRefresh:
5098
5209
  }, [d, r]), D = x(() => {
5099
5210
  u((e) => !e), f(null);
5100
5211
  }, []);
5101
- return /* @__PURE__ */ (0, V.jsxs)("div", {
5212
+ return /* @__PURE__ */ (0, U.jsxs)("div", {
5102
5213
  className: g("flex h-full w-full", c),
5103
5214
  "data-testid": "dashboard-with-config",
5104
- children: [/* @__PURE__ */ (0, V.jsxs)("div", {
5215
+ children: [/* @__PURE__ */ (0, U.jsxs)("div", {
5105
5216
  className: "flex-1 min-w-0 overflow-auto relative",
5106
- children: [/* @__PURE__ */ (0, V.jsx)("div", {
5217
+ children: [/* @__PURE__ */ (0, U.jsx)("div", {
5107
5218
  className: "absolute top-2 right-2 z-10",
5108
- children: /* @__PURE__ */ (0, V.jsxs)(s, {
5219
+ children: /* @__PURE__ */ (0, U.jsxs)(s, {
5109
5220
  size: "sm",
5110
5221
  variant: l ? "default" : "outline",
5111
5222
  onClick: D,
5112
5223
  "data-testid": "dashboard-config-toggle",
5113
- children: [/* @__PURE__ */ (0, V.jsx)(F, { className: "h-3.5 w-3.5 mr-1" }), "Settings"]
5224
+ children: [/* @__PURE__ */ (0, U.jsx)(L, { className: "h-3.5 w-3.5 mr-1" }), "Settings"]
5114
5225
  })
5115
- }), /* @__PURE__ */ (0, V.jsx)(re, {
5226
+ }), /* @__PURE__ */ (0, U.jsx)(re, {
5116
5227
  schema: p,
5117
5228
  onRefresh: i,
5118
5229
  recordCount: a,
@@ -5120,15 +5231,15 @@ function fn({ schema: e, config: t, onConfigSave: n, onWidgetSave: r, onRefresh:
5120
5231
  selectedWidgetId: d,
5121
5232
  onWidgetClick: b
5122
5233
  })]
5123
- }), l && /* @__PURE__ */ (0, V.jsx)("div", {
5234
+ }), l && /* @__PURE__ */ (0, U.jsx)("div", {
5124
5235
  className: "relative shrink-0",
5125
- children: d && y ? /* @__PURE__ */ (0, V.jsx)(dn, {
5236
+ children: d && y ? /* @__PURE__ */ (0, U.jsx)(mn, {
5126
5237
  open: !0,
5127
5238
  onClose: S,
5128
5239
  config: y,
5129
5240
  onSave: T,
5130
5241
  onFieldChange: w
5131
- }) : /* @__PURE__ */ (0, V.jsx)($t, {
5242
+ }) : /* @__PURE__ */ (0, U.jsx)(nn, {
5132
5243
  open: !0,
5133
5244
  onClose: () => u(!1),
5134
5245
  config: t,
@@ -5165,7 +5276,7 @@ e.register("dashboard", re, {
5165
5276
  columns: 3,
5166
5277
  widgets: []
5167
5278
  }
5168
- }), e.register("metric", Ut, {
5279
+ }), e.register("metric", Gt, {
5169
5280
  namespace: "plugin-dashboard",
5170
5281
  label: "Metric Widget",
5171
5282
  category: "Dashboard",
@@ -5178,7 +5289,7 @@ e.register("dashboard", re, {
5178
5289
  type: "string",
5179
5290
  label: "Value"
5180
5291
  }]
5181
- }), e.register("metric-card", Gt, {
5292
+ }), e.register("metric-card", qt, {
5182
5293
  namespace: "plugin-dashboard",
5183
5294
  label: "Metric Card",
5184
5295
  category: "Dashboard",
@@ -5233,7 +5344,36 @@ e.register("dashboard", re, {
5233
5344
  title: "Metric",
5234
5345
  value: "0"
5235
5346
  }
5236
- }), e.register("pivot", Jt, {
5347
+ }), e.register("object-metric", Jt, {
5348
+ namespace: "plugin-dashboard",
5349
+ label: "Object Metric",
5350
+ category: "Dashboard",
5351
+ inputs: [
5352
+ {
5353
+ name: "objectName",
5354
+ type: "string",
5355
+ label: "Object Name",
5356
+ required: !0
5357
+ },
5358
+ {
5359
+ name: "label",
5360
+ type: "string",
5361
+ label: "Label"
5362
+ },
5363
+ {
5364
+ name: "aggregate",
5365
+ type: "object",
5366
+ label: "Aggregate",
5367
+ description: "Aggregation config: { field, function, groupBy }"
5368
+ },
5369
+ {
5370
+ name: "icon",
5371
+ type: "string",
5372
+ label: "Icon (Lucide name)"
5373
+ }
5374
+ ],
5375
+ defaultProps: { label: "Metric" }
5376
+ }), e.register("pivot", Zt, {
5237
5377
  namespace: "plugin-dashboard",
5238
5378
  label: "Pivot Table",
5239
5379
  category: "Dashboard",
@@ -5312,7 +5452,7 @@ e.register("dashboard", re, {
5312
5452
  aggregation: "sum",
5313
5453
  data: []
5314
5454
  }
5315
- }), e.register("object-pivot", Yt, {
5455
+ }), e.register("object-pivot", Qt, {
5316
5456
  namespace: "plugin-dashboard",
5317
5457
  label: "Object Pivot Table",
5318
5458
  category: "Dashboard",
@@ -5401,7 +5541,7 @@ e.register("dashboard", re, {
5401
5541
  valueField: "",
5402
5542
  aggregation: "sum"
5403
5543
  }
5404
- }), e.register("dashboard-grid", Vt, {
5544
+ }), e.register("dashboard-grid", Ut, {
5405
5545
  namespace: "plugin-dashboard",
5406
5546
  label: "Dashboard Grid (Editable)",
5407
5547
  category: "Complex",
@@ -5429,7 +5569,7 @@ e.register("dashboard", re, {
5429
5569
  widgets: [],
5430
5570
  persistLayoutKey: "dashboard-layout"
5431
5571
  }
5432
- }), e.register("object-data-table", Zt, {
5572
+ }), e.register("object-data-table", en, {
5433
5573
  namespace: "plugin-dashboard",
5434
5574
  label: "Object Data Table",
5435
5575
  category: "Dashboard",
@@ -5467,17 +5607,18 @@ e.register("dashboard", re, {
5467
5607
  pagination: !1
5468
5608
  }
5469
5609
  });
5470
- var pn = {
5610
+ var gn = {
5471
5611
  DashboardRenderer: re,
5472
- DashboardGridLayout: Vt,
5473
- MetricWidget: Ut,
5474
- MetricCard: Gt,
5475
- PivotTable: Jt,
5476
- ObjectPivotTable: Yt,
5477
- ObjectDataTable: Zt,
5478
- DashboardConfigPanel: $t,
5479
- WidgetConfigPanel: dn,
5480
- DashboardWithConfig: fn
5612
+ DashboardGridLayout: Ut,
5613
+ MetricWidget: Gt,
5614
+ MetricCard: qt,
5615
+ ObjectMetricWidget: Jt,
5616
+ PivotTable: Zt,
5617
+ ObjectPivotTable: Qt,
5618
+ ObjectDataTable: en,
5619
+ DashboardConfigPanel: nn,
5620
+ WidgetConfigPanel: mn,
5621
+ DashboardWithConfig: hn
5481
5622
  };
5482
5623
  //#endregion
5483
- export { $t as DashboardConfigPanel, Vt as DashboardGridLayout, re as DashboardRenderer, fn as DashboardWithConfig, Gt as MetricCard, Ut as MetricWidget, Zt as ObjectDataTable, Yt as ObjectPivotTable, Jt as PivotTable, dn as WidgetConfigPanel, pn as dashboardComponents };
5624
+ export { nn as DashboardConfigPanel, Ut as DashboardGridLayout, re as DashboardRenderer, hn as DashboardWithConfig, qt as MetricCard, Gt as MetricWidget, en as ObjectDataTable, Jt as ObjectMetricWidget, Qt as ObjectPivotTable, Zt as PivotTable, mn as WidgetConfigPanel, gn as dashboardComponents };