@tenorlab/react-dashboard 1.6.2 → 1.6.4

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