@sito/dashboard 0.0.62 → 0.0.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dashboard.js CHANGED
@@ -1,90 +1,136 @@
1
1
  import "./main.css";
2
- import { jsx as i, jsxs as k, Fragment as $e } from "react/jsx-runtime";
3
- import { useRef as Q, useEffect as V, forwardRef as Ee, useState as I, useCallback as F, createContext as He, useReducer as Dt, useContext as qe, useMemo as D, Fragment as zt } from "react";
4
- const _t = (e) => {
5
- const { count: t, className: r = "" } = e, n = Q(null);
6
- return V(() => {
7
- var s, a;
8
- (s = n.current) != null && s.parentNode && (((a = n.current) == null ? void 0 : a.parentNode).style.position = "relative");
2
+ import { jsx as i, jsxs as S, Fragment as Se } from "react/jsx-runtime";
3
+ import { useRef as H, useEffect as j, useCallback as T, forwardRef as Ee, useState as D, useReducer as zt, createContext as He, useContext as qe, useMemo as z, Fragment as _t } from "react";
4
+ const Bt = (e) => {
5
+ const { count: t, className: r = "" } = e, n = H(null);
6
+ return j(() => {
7
+ n.current?.parentNode && ((n.current?.parentNode).style.position = "relative");
9
8
  }, [n]), /* @__PURE__ */ i("span", { ref: n, className: `${r} badge-main`, children: t });
9
+ }, Wt = (e) => {
10
+ const {
11
+ children: t,
12
+ type: r = "button",
13
+ variant: n = "text",
14
+ color: a = "default",
15
+ className: s = "",
16
+ ...o
17
+ } = e;
18
+ return /* @__PURE__ */ i(
19
+ "button",
20
+ {
21
+ type: r,
22
+ className: `button ${n} ${a} ${s}`,
23
+ ...o,
24
+ children: t
25
+ }
26
+ );
10
27
  };
11
- function fe(e) {
28
+ function ue(e) {
12
29
  const {
13
30
  text: t,
14
31
  onDelete: r,
15
32
  children: n,
16
- icon: s,
17
- variant: a = "default",
18
- iconClassName: l = "",
33
+ icon: a,
34
+ variant: s = "default",
35
+ iconClassName: o = "",
19
36
  className: c = "",
20
- textClassName: o = ""
37
+ textClassName: l = ""
21
38
  } = e;
22
- return /* @__PURE__ */ k("div", { className: `chip-main ${a} ${c}`, children: [
23
- /* @__PURE__ */ i("span", { className: o, children: t }),
39
+ return /* @__PURE__ */ S("div", { className: `chip-main ${s} ${c}`, children: [
40
+ /* @__PURE__ */ i("span", { className: l, children: t }),
24
41
  n,
25
42
  r ? /* @__PURE__ */ i(
26
- "button",
43
+ de,
27
44
  {
28
- type: "button",
29
- className: `chip-delete-button ${l}`,
30
- onClick: r,
31
- children: s ?? /* @__PURE__ */ i(Qe, {})
45
+ icon: a ?? /* @__PURE__ */ i(Qe, {}),
46
+ className: `chip-delete-button ${o}`,
47
+ onClick: r
32
48
  }
33
49
  ) : null
34
50
  ] });
35
51
  }
36
- var Wt = !1;
37
- function Bt(e) {
52
+ const ur = (e) => {
53
+ const { children: t, open: r, onClose: n } = e, a = H(null), s = T(
54
+ (c) => {
55
+ const l = a.current;
56
+ !r || !l || l.contains(c.target) || n();
57
+ },
58
+ [r, n]
59
+ ), o = T(
60
+ (c) => {
61
+ r && c.key === "Escape" && n();
62
+ },
63
+ [r, n]
64
+ );
65
+ return j(() => {
66
+ if (r)
67
+ return setTimeout(() => a.current?.focus(), 0), document.addEventListener("mousedown", s), document.addEventListener("keydown", o), () => {
68
+ document.removeEventListener("mousedown", s), document.removeEventListener("keydown", o);
69
+ };
70
+ }, [r, s, o]), /* @__PURE__ */ i(
71
+ "div",
72
+ {
73
+ ref: a,
74
+ role: "menu",
75
+ "aria-hidden": !r,
76
+ tabIndex: -1,
77
+ className: `dropdown-main ${r ? "opened" : "closed"}`,
78
+ onClick: (c) => c.stopPropagation(),
79
+ children: t
80
+ }
81
+ );
82
+ };
83
+ function jt(e) {
38
84
  if (e.sheet)
39
85
  return e.sheet;
40
86
  for (var t = 0; t < document.styleSheets.length; t++)
41
87
  if (document.styleSheets[t].ownerNode === e)
42
88
  return document.styleSheets[t];
43
89
  }
44
- function jt(e) {
90
+ function Vt(e) {
45
91
  var t = document.createElement("style");
46
92
  return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
47
93
  }
48
- var Vt = /* @__PURE__ */ function() {
94
+ var Gt = /* @__PURE__ */ (function() {
49
95
  function e(r) {
50
96
  var n = this;
51
- this._insertTag = function(s) {
52
- var a;
53
- n.tags.length === 0 ? n.insertionPoint ? a = n.insertionPoint.nextSibling : n.prepend ? a = n.container.firstChild : a = n.before : a = n.tags[n.tags.length - 1].nextSibling, n.container.insertBefore(s, a), n.tags.push(s);
54
- }, this.isSpeedy = r.speedy === void 0 ? !Wt : r.speedy, this.tags = [], this.ctr = 0, this.nonce = r.nonce, this.key = r.key, this.container = r.container, this.prepend = r.prepend, this.insertionPoint = r.insertionPoint, this.before = null;
97
+ this._insertTag = function(a) {
98
+ var s;
99
+ n.tags.length === 0 ? n.insertionPoint ? s = n.insertionPoint.nextSibling : n.prepend ? s = n.container.firstChild : s = n.before : s = n.tags[n.tags.length - 1].nextSibling, n.container.insertBefore(a, s), n.tags.push(a);
100
+ }, this.isSpeedy = r.speedy === void 0 ? !0 : r.speedy, this.tags = [], this.ctr = 0, this.nonce = r.nonce, this.key = r.key, this.container = r.container, this.prepend = r.prepend, this.insertionPoint = r.insertionPoint, this.before = null;
55
101
  }
56
102
  var t = e.prototype;
57
103
  return t.hydrate = function(n) {
58
104
  n.forEach(this._insertTag);
59
105
  }, t.insert = function(n) {
60
- this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(jt(this));
61
- var s = this.tags[this.tags.length - 1];
106
+ this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Vt(this));
107
+ var a = this.tags[this.tags.length - 1];
62
108
  if (this.isSpeedy) {
63
- var a = Bt(s);
109
+ var s = jt(a);
64
110
  try {
65
- a.insertRule(n, a.cssRules.length);
111
+ s.insertRule(n, s.cssRules.length);
66
112
  } catch {
67
113
  }
68
114
  } else
69
- s.appendChild(document.createTextNode(n));
115
+ a.appendChild(document.createTextNode(n));
70
116
  this.ctr++;
71
117
  }, t.flush = function() {
72
118
  this.tags.forEach(function(n) {
73
- var s;
74
- return (s = n.parentNode) == null ? void 0 : s.removeChild(n);
119
+ var a;
120
+ return (a = n.parentNode) == null ? void 0 : a.removeChild(n);
75
121
  }), this.tags = [], this.ctr = 0;
76
122
  }, e;
77
- }(), j = "-ms-", Le = "-moz-", E = "-webkit-", pt = "comm", Ke = "rule", Ye = "decl", Gt = "@import", mt = "@keyframes", Ut = "@layer", Ht = Math.abs, De = String.fromCharCode, qt = Object.assign;
78
- function Kt(e, t) {
123
+ })(), W = "-ms-", Le = "-moz-", $ = "-webkit-", mt = "comm", Ke = "rule", Ye = "decl", Ut = "@import", bt = "@keyframes", Ht = "@layer", qt = Math.abs, De = String.fromCharCode, Kt = Object.assign;
124
+ function Yt(e, t) {
79
125
  return B(e, 0) ^ 45 ? (((t << 2 ^ B(e, 0)) << 2 ^ B(e, 1)) << 2 ^ B(e, 2)) << 2 ^ B(e, 3) : 0;
80
126
  }
81
- function bt(e) {
127
+ function gt(e) {
82
128
  return e.trim();
83
129
  }
84
- function Yt(e, t) {
130
+ function Zt(e, t) {
85
131
  return (e = t.exec(e)) ? e[0] : e;
86
132
  }
87
- function R(e, t, r) {
133
+ function E(e, t, r) {
88
134
  return e.replace(t, r);
89
135
  }
90
136
  function Ge(e, t) {
@@ -93,54 +139,56 @@ function Ge(e, t) {
93
139
  function B(e, t) {
94
140
  return e.charCodeAt(t) | 0;
95
141
  }
96
- function Se(e, t, r) {
142
+ function Re(e, t, r) {
97
143
  return e.slice(t, r);
98
144
  }
99
- function se(e) {
145
+ function ne(e) {
100
146
  return e.length;
101
147
  }
102
148
  function Ze(e) {
103
149
  return e.length;
104
150
  }
105
- function Pe(e, t) {
151
+ function Te(e, t) {
106
152
  return t.push(e), e;
107
153
  }
108
- function Zt(e, t) {
154
+ function Jt(e, t) {
109
155
  return e.map(t).join("");
110
156
  }
111
- var ze = 1, ge = 1, gt = 0, U = 0, M = 0, ve = "";
112
- function _e(e, t, r, n, s, a, l) {
113
- return { value: e, root: t, parent: r, type: n, props: s, children: a, line: ze, column: ge, length: l, return: "" };
157
+ var ze = 1, ve = 1, vt = 0, G = 0, M = 0, we = "";
158
+ function _e(e, t, r, n, a, s, o) {
159
+ return { value: e, root: t, parent: r, type: n, props: a, children: s, line: ze, column: ve, length: o, return: "" };
114
160
  }
115
- function Ne(e, t) {
116
- return qt(_e("", null, null, "", null, null, 0), e, { length: -e.length }, t);
161
+ function ye(e, t) {
162
+ return Kt(_e("", null, null, "", null, null, 0), e, { length: -e.length }, t);
117
163
  }
118
- function Jt() {
164
+ function Xt() {
119
165
  return M;
120
166
  }
121
- function Xt() {
122
- return M = U > 0 ? B(ve, --U) : 0, ge--, M === 10 && (ge = 1, ze--), M;
167
+ function Qt() {
168
+ return M = G > 0 ? B(we, --G) : 0, ve--, M === 10 && (ve = 1, ze--), M;
123
169
  }
124
- function H() {
125
- return M = U < gt ? B(ve, U++) : 0, ge++, M === 10 && (ge = 1, ze++), M;
170
+ function U() {
171
+ return M = G < vt ? B(we, G++) : 0, ve++, M === 10 && (ve = 1, ze++), M;
126
172
  }
127
- function ie() {
128
- return B(ve, U);
173
+ function re() {
174
+ return B(we, G);
129
175
  }
130
176
  function Oe() {
131
- return U;
177
+ return G;
132
178
  }
133
- function Re(e, t) {
134
- return Se(ve, e, t);
179
+ function ke(e, t) {
180
+ return Re(we, e, t);
135
181
  }
136
- function ke(e) {
182
+ function $e(e) {
137
183
  switch (e) {
184
+ // \0 \t \n \r \s whitespace token
138
185
  case 0:
139
186
  case 9:
140
187
  case 10:
141
188
  case 13:
142
189
  case 32:
143
190
  return 5;
191
+ // ! + , / > @ ~ isolate token
144
192
  case 33:
145
193
  case 43:
146
194
  case 44:
@@ -148,203 +196,227 @@ function ke(e) {
148
196
  case 62:
149
197
  case 64:
150
198
  case 126:
199
+ // ; { } breakpoint token
151
200
  case 59:
152
201
  case 123:
153
202
  case 125:
154
203
  return 4;
204
+ // : accompanied token
155
205
  case 58:
156
206
  return 3;
207
+ // " ' ( [ opening delimit token
157
208
  case 34:
158
209
  case 39:
159
210
  case 40:
160
211
  case 91:
161
212
  return 2;
213
+ // ) ] closing delimit token
162
214
  case 41:
163
215
  case 93:
164
216
  return 1;
165
217
  }
166
218
  return 0;
167
219
  }
168
- function vt(e) {
169
- return ze = ge = 1, gt = se(ve = e), U = 0, [];
220
+ function wt(e) {
221
+ return ze = ve = 1, vt = ne(we = e), G = 0, [];
170
222
  }
171
223
  function Ct(e) {
172
- return ve = "", e;
224
+ return we = "", e;
173
225
  }
174
- function Fe(e) {
175
- return bt(Re(U - 1, Ue(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
226
+ function Pe(e) {
227
+ return gt(ke(G - 1, Ue(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
176
228
  }
177
- function Qt(e) {
178
- for (; (M = ie()) && M < 33; )
179
- H();
180
- return ke(e) > 2 || ke(M) > 3 ? "" : " ";
229
+ function en(e) {
230
+ for (; (M = re()) && M < 33; )
231
+ U();
232
+ return $e(e) > 2 || $e(M) > 3 ? "" : " ";
181
233
  }
182
- function en(e, t) {
183
- for (; --t && H() && !(M < 48 || M > 102 || M > 57 && M < 65 || M > 70 && M < 97); )
234
+ function tn(e, t) {
235
+ for (; --t && U() && !(M < 48 || M > 102 || M > 57 && M < 65 || M > 70 && M < 97); )
184
236
  ;
185
- return Re(e, Oe() + (t < 6 && ie() == 32 && H() == 32));
237
+ return ke(e, Oe() + (t < 6 && re() == 32 && U() == 32));
186
238
  }
187
239
  function Ue(e) {
188
- for (; H(); )
240
+ for (; U(); )
189
241
  switch (M) {
242
+ // ] ) " '
190
243
  case e:
191
- return U;
244
+ return G;
245
+ // " '
192
246
  case 34:
193
247
  case 39:
194
248
  e !== 34 && e !== 39 && Ue(M);
195
249
  break;
250
+ // (
196
251
  case 40:
197
252
  e === 41 && Ue(e);
198
253
  break;
254
+ // \
199
255
  case 92:
200
- H();
256
+ U();
201
257
  break;
202
258
  }
203
- return U;
259
+ return G;
204
260
  }
205
- function tn(e, t) {
206
- for (; H() && e + M !== 47 + 10; )
207
- if (e + M === 42 + 42 && ie() === 47)
261
+ function nn(e, t) {
262
+ for (; U() && e + M !== 57; )
263
+ if (e + M === 84 && re() === 47)
208
264
  break;
209
- return "/*" + Re(t, U - 1) + "*" + De(e === 47 ? e : H());
210
- }
211
- function nn(e) {
212
- for (; !ke(ie()); )
213
- H();
214
- return Re(e, U);
265
+ return "/*" + ke(t, G - 1) + "*" + De(e === 47 ? e : U());
215
266
  }
216
267
  function rn(e) {
217
- return Ct(Me("", null, null, null, [""], e = vt(e), 0, [0], e));
268
+ for (; !$e(re()); )
269
+ U();
270
+ return ke(e, G);
271
+ }
272
+ function an(e) {
273
+ return Ct(Fe("", null, null, null, [""], e = wt(e), 0, [0], e));
218
274
  }
219
- function Me(e, t, r, n, s, a, l, c, o) {
220
- for (var d = 0, u = 0, m = l, b = 0, g = 0, h = 0, f = 1, C = 1, y = 1, v = 0, $ = "", T = s, A = a, P = n, N = $; C; )
221
- switch (h = v, v = H()) {
275
+ function Fe(e, t, r, n, a, s, o, c, l) {
276
+ for (var d = 0, u = 0, h = o, m = 0, p = 0, g = 0, x = 1, k = 1, b = 1, v = 0, R = "", L = a, O = s, P = n, N = R; k; )
277
+ switch (g = v, v = U()) {
278
+ // (
222
279
  case 40:
223
- if (h != 108 && B(N, m - 1) == 58) {
224
- Ge(N += R(Fe(v), "&", "&\f"), "&\f") != -1 && (y = -1);
280
+ if (g != 108 && B(N, h - 1) == 58) {
281
+ Ge(N += E(Pe(v), "&", "&\f"), "&\f") != -1 && (b = -1);
225
282
  break;
226
283
  }
284
+ // " ' [
227
285
  case 34:
228
286
  case 39:
229
287
  case 91:
230
- N += Fe(v);
288
+ N += Pe(v);
231
289
  break;
290
+ // \t \n \r \s
232
291
  case 9:
233
292
  case 10:
234
293
  case 13:
235
294
  case 32:
236
- N += Qt(h);
295
+ N += en(g);
237
296
  break;
297
+ // \
238
298
  case 92:
239
- N += en(Oe() - 1, 7);
299
+ N += tn(Oe() - 1, 7);
240
300
  continue;
301
+ // /
241
302
  case 47:
242
- switch (ie()) {
303
+ switch (re()) {
243
304
  case 42:
244
305
  case 47:
245
- Pe(sn(tn(H(), Oe()), t, r), o);
306
+ Te(sn(nn(U(), Oe()), t, r), l);
246
307
  break;
247
308
  default:
248
309
  N += "/";
249
310
  }
250
311
  break;
251
- case 123 * f:
252
- c[d++] = se(N) * y;
253
- case 125 * f:
312
+ // {
313
+ case 123 * x:
314
+ c[d++] = ne(N) * b;
315
+ // } ; \0
316
+ case 125 * x:
254
317
  case 59:
255
318
  case 0:
256
319
  switch (v) {
320
+ // \0 }
257
321
  case 0:
258
322
  case 125:
259
- C = 0;
323
+ k = 0;
324
+ // ;
260
325
  case 59 + u:
261
- y == -1 && (N = R(N, /\f/g, "")), g > 0 && se(N) - m && Pe(g > 32 ? st(N + ";", n, r, m - 1) : st(R(N, " ", "") + ";", n, r, m - 2), o);
326
+ b == -1 && (N = E(N, /\f/g, "")), p > 0 && ne(N) - h && Te(p > 32 ? st(N + ";", n, r, h - 1) : st(E(N, " ", "") + ";", n, r, h - 2), l);
262
327
  break;
328
+ // @ ;
263
329
  case 59:
264
330
  N += ";";
331
+ // { rule/at-rule
265
332
  default:
266
- if (Pe(P = rt(N, t, r, d, u, s, c, $, T = [], A = [], m), a), v === 123)
333
+ if (Te(P = at(N, t, r, d, u, a, c, R, L = [], O = [], h), s), v === 123)
267
334
  if (u === 0)
268
- Me(N, t, P, P, T, a, m, c, A);
335
+ Fe(N, t, P, P, L, s, h, c, O);
269
336
  else
270
- switch (b === 99 && B(N, 3) === 110 ? 100 : b) {
337
+ switch (m === 99 && B(N, 3) === 110 ? 100 : m) {
338
+ // d l m s
271
339
  case 100:
272
340
  case 108:
273
341
  case 109:
274
342
  case 115:
275
- Me(e, P, P, n && Pe(rt(e, P, P, 0, 0, s, c, $, s, T = [], m), A), s, A, m, c, n ? T : A);
343
+ Fe(e, P, P, n && Te(at(e, P, P, 0, 0, a, c, R, a, L = [], h), O), a, O, h, c, n ? L : O);
276
344
  break;
277
345
  default:
278
- Me(N, P, P, P, [""], A, 0, c, A);
346
+ Fe(N, P, P, P, [""], O, 0, c, O);
279
347
  }
280
348
  }
281
- d = u = g = 0, f = y = 1, $ = N = "", m = l;
349
+ d = u = p = 0, x = b = 1, R = N = "", h = o;
282
350
  break;
351
+ // :
283
352
  case 58:
284
- m = 1 + se(N), g = h;
353
+ h = 1 + ne(N), p = g;
285
354
  default:
286
- if (f < 1) {
355
+ if (x < 1) {
287
356
  if (v == 123)
288
- --f;
289
- else if (v == 125 && f++ == 0 && Xt() == 125)
357
+ --x;
358
+ else if (v == 125 && x++ == 0 && Qt() == 125)
290
359
  continue;
291
360
  }
292
- switch (N += De(v), v * f) {
361
+ switch (N += De(v), v * x) {
362
+ // &
293
363
  case 38:
294
- y = u > 0 ? 1 : (N += "\f", -1);
364
+ b = u > 0 ? 1 : (N += "\f", -1);
295
365
  break;
366
+ // ,
296
367
  case 44:
297
- c[d++] = (se(N) - 1) * y, y = 1;
368
+ c[d++] = (ne(N) - 1) * b, b = 1;
298
369
  break;
370
+ // @
299
371
  case 64:
300
- ie() === 45 && (N += Fe(H())), b = ie(), u = m = se($ = N += nn(Oe())), v++;
372
+ re() === 45 && (N += Pe(U())), m = re(), u = h = ne(R = N += rn(Oe())), v++;
301
373
  break;
374
+ // -
302
375
  case 45:
303
- h === 45 && se(N) == 2 && (f = 0);
376
+ g === 45 && ne(N) == 2 && (x = 0);
304
377
  }
305
378
  }
306
- return a;
379
+ return s;
307
380
  }
308
- function rt(e, t, r, n, s, a, l, c, o, d, u) {
309
- for (var m = s - 1, b = s === 0 ? a : [""], g = Ze(b), h = 0, f = 0, C = 0; h < n; ++h)
310
- for (var y = 0, v = Se(e, m + 1, m = Ht(f = l[h])), $ = e; y < g; ++y)
311
- ($ = bt(f > 0 ? b[y] + " " + v : R(v, /&\f/g, b[y]))) && (o[C++] = $);
312
- return _e(e, t, r, s === 0 ? Ke : c, o, d, u);
381
+ function at(e, t, r, n, a, s, o, c, l, d, u) {
382
+ for (var h = a - 1, m = a === 0 ? s : [""], p = Ze(m), g = 0, x = 0, k = 0; g < n; ++g)
383
+ for (var b = 0, v = Re(e, h + 1, h = qt(x = o[g])), R = e; b < p; ++b)
384
+ (R = gt(x > 0 ? m[b] + " " + v : E(v, /&\f/g, m[b]))) && (l[k++] = R);
385
+ return _e(e, t, r, a === 0 ? Ke : c, l, d, u);
313
386
  }
314
387
  function sn(e, t, r) {
315
- return _e(e, t, r, pt, De(Jt()), Se(e, 2, -2), 0);
388
+ return _e(e, t, r, mt, De(Xt()), Re(e, 2, -2), 0);
316
389
  }
317
390
  function st(e, t, r, n) {
318
- return _e(e, t, r, Ye, Se(e, 0, n), Se(e, n + 1, -1), n);
391
+ return _e(e, t, r, Ye, Re(e, 0, n), Re(e, n + 1, -1), n);
319
392
  }
320
- function be(e, t) {
321
- for (var r = "", n = Ze(e), s = 0; s < n; s++)
322
- r += t(e[s], s, e, t) || "";
393
+ function ge(e, t) {
394
+ for (var r = "", n = Ze(e), a = 0; a < n; a++)
395
+ r += t(e[a], a, e, t) || "";
323
396
  return r;
324
397
  }
325
- function an(e, t, r, n) {
398
+ function cn(e, t, r, n) {
326
399
  switch (e.type) {
400
+ case Ht:
401
+ if (e.children.length) break;
327
402
  case Ut:
328
- if (e.children.length)
329
- break;
330
- case Gt:
331
403
  case Ye:
332
404
  return e.return = e.return || e.value;
333
- case pt:
334
- return "";
335
405
  case mt:
336
- return e.return = e.value + "{" + be(e.children, n) + "}";
406
+ return "";
407
+ case bt:
408
+ return e.return = e.value + "{" + ge(e.children, n) + "}";
337
409
  case Ke:
338
410
  e.value = e.props.join(",");
339
411
  }
340
- return se(r = be(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
412
+ return ne(r = ge(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
341
413
  }
342
- function cn(e) {
414
+ function on(e) {
343
415
  var t = Ze(e);
344
- return function(r, n, s, a) {
345
- for (var l = "", c = 0; c < t; c++)
346
- l += e[c](r, n, s, a) || "";
347
- return l;
416
+ return function(r, n, a, s) {
417
+ for (var o = "", c = 0; c < t; c++)
418
+ o += e[c](r, n, a, s) || "";
419
+ return o;
348
420
  };
349
421
  }
350
422
  function ln(e) {
@@ -352,53 +424,53 @@ function ln(e) {
352
424
  t.root || (t = t.return) && e(t);
353
425
  };
354
426
  }
355
- function on(e) {
427
+ function un(e) {
356
428
  var t = /* @__PURE__ */ Object.create(null);
357
429
  return function(r) {
358
430
  return t[r] === void 0 && (t[r] = e(r)), t[r];
359
431
  };
360
432
  }
361
- var un = function(t, r, n) {
362
- for (var s = 0, a = 0; s = a, a = ie(), s === 38 && a === 12 && (r[n] = 1), !ke(a); )
363
- H();
364
- return Re(t, U);
365
- }, dn = function(t, r) {
366
- var n = -1, s = 44;
433
+ var dn = function(t, r, n) {
434
+ for (var a = 0, s = 0; a = s, s = re(), a === 38 && s === 12 && (r[n] = 1), !$e(s); )
435
+ U();
436
+ return ke(t, G);
437
+ }, fn = function(t, r) {
438
+ var n = -1, a = 44;
367
439
  do
368
- switch (ke(s)) {
440
+ switch ($e(a)) {
369
441
  case 0:
370
- s === 38 && ie() === 12 && (r[n] = 1), t[n] += un(U - 1, r, n);
442
+ a === 38 && re() === 12 && (r[n] = 1), t[n] += dn(G - 1, r, n);
371
443
  break;
372
444
  case 2:
373
- t[n] += Fe(s);
445
+ t[n] += Pe(a);
374
446
  break;
375
447
  case 4:
376
- if (s === 44) {
377
- t[++n] = ie() === 58 ? "&\f" : "", r[n] = t[n].length;
448
+ if (a === 44) {
449
+ t[++n] = re() === 58 ? "&\f" : "", r[n] = t[n].length;
378
450
  break;
379
451
  }
452
+ // fallthrough
380
453
  default:
381
- t[n] += De(s);
454
+ t[n] += De(a);
382
455
  }
383
- while (s = H());
456
+ while (a = U());
384
457
  return t;
385
- }, fn = function(t, r) {
386
- return Ct(dn(vt(t), r));
387
- }, at = /* @__PURE__ */ new WeakMap(), hn = function(t) {
458
+ }, pn = function(t, r) {
459
+ return Ct(fn(wt(t), r));
460
+ }, it = /* @__PURE__ */ new WeakMap(), hn = function(t) {
388
461
  if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
389
462
  // negative .length indicates that this rule has been already prefixed
390
463
  t.length < 1)) {
391
- for (var r = t.value, n = t.parent, s = t.column === n.column && t.line === n.line; n.type !== "rule"; )
392
- if (n = n.parent, !n)
393
- return;
394
- if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !at.get(n)) && !s) {
395
- at.set(t, !0);
396
- for (var a = [], l = fn(r, a), c = n.props, o = 0, d = 0; o < l.length; o++)
464
+ for (var r = t.value, n = t.parent, a = t.column === n.column && t.line === n.line; n.type !== "rule"; )
465
+ if (n = n.parent, !n) return;
466
+ if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !it.get(n)) && !a) {
467
+ it.set(t, !0);
468
+ for (var s = [], o = pn(r, s), c = n.props, l = 0, d = 0; l < o.length; l++)
397
469
  for (var u = 0; u < c.length; u++, d++)
398
- t.props[d] = a[o] ? l[o].replace(/&\f/g, c[u]) : c[u] + " " + l[o];
470
+ t.props[d] = s[l] ? o[l].replace(/&\f/g, c[u]) : c[u] + " " + o[l];
399
471
  }
400
472
  }
401
- }, pn = function(t) {
473
+ }, mn = function(t) {
402
474
  if (t.type === "decl") {
403
475
  var r = t.value;
404
476
  // charcode for l
@@ -406,10 +478,12 @@ var un = function(t, r, n) {
406
478
  r.charCodeAt(2) === 98 && (t.return = "", t.value = "");
407
479
  }
408
480
  };
409
- function wt(e, t) {
410
- switch (Kt(e, t)) {
481
+ function xt(e, t) {
482
+ switch (Yt(e, t)) {
483
+ // color-adjust
411
484
  case 5103:
412
- return E + "print-" + e + e;
485
+ return $ + "print-" + e + e;
486
+ // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
413
487
  case 5737:
414
488
  case 4201:
415
489
  case 3177:
@@ -417,62 +491,80 @@ function wt(e, t) {
417
491
  case 1641:
418
492
  case 4457:
419
493
  case 2921:
494
+ // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
420
495
  case 5572:
421
496
  case 6356:
422
497
  case 5844:
423
498
  case 3191:
424
499
  case 6645:
425
500
  case 3005:
501
+ // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
426
502
  case 6391:
427
503
  case 5879:
428
504
  case 5623:
429
505
  case 6135:
430
506
  case 4599:
431
507
  case 4855:
508
+ // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
432
509
  case 4215:
433
510
  case 6389:
434
511
  case 5109:
435
512
  case 5365:
436
513
  case 5621:
437
514
  case 3829:
438
- return E + e + e;
515
+ return $ + e + e;
516
+ // appearance, user-select, transform, hyphens, text-size-adjust
439
517
  case 5349:
440
518
  case 4246:
441
519
  case 4810:
442
520
  case 6968:
443
521
  case 2756:
444
- return E + e + Le + e + j + e + e;
522
+ return $ + e + Le + e + W + e + e;
523
+ // flex, flex-direction
445
524
  case 6828:
446
525
  case 4268:
447
- return E + e + j + e + e;
526
+ return $ + e + W + e + e;
527
+ // order
448
528
  case 6165:
449
- return E + e + j + "flex-" + e + e;
529
+ return $ + e + W + "flex-" + e + e;
530
+ // align-items
450
531
  case 5187:
451
- return E + e + R(e, /(\w+).+(:[^]+)/, E + "box-$1$2" + j + "flex-$1$2") + e;
532
+ return $ + e + E(e, /(\w+).+(:[^]+)/, $ + "box-$1$2" + W + "flex-$1$2") + e;
533
+ // align-self
452
534
  case 5443:
453
- return E + e + j + "flex-item-" + R(e, /flex-|-self/, "") + e;
535
+ return $ + e + W + "flex-item-" + E(e, /flex-|-self/, "") + e;
536
+ // align-content
454
537
  case 4675:
455
- return E + e + j + "flex-line-pack" + R(e, /align-content|flex-|-self/, "") + e;
538
+ return $ + e + W + "flex-line-pack" + E(e, /align-content|flex-|-self/, "") + e;
539
+ // flex-shrink
456
540
  case 5548:
457
- return E + e + j + R(e, "shrink", "negative") + e;
541
+ return $ + e + W + E(e, "shrink", "negative") + e;
542
+ // flex-basis
458
543
  case 5292:
459
- return E + e + j + R(e, "basis", "preferred-size") + e;
544
+ return $ + e + W + E(e, "basis", "preferred-size") + e;
545
+ // flex-grow
460
546
  case 6060:
461
- return E + "box-" + R(e, "-grow", "") + E + e + j + R(e, "grow", "positive") + e;
547
+ return $ + "box-" + E(e, "-grow", "") + $ + e + W + E(e, "grow", "positive") + e;
548
+ // transition
462
549
  case 4554:
463
- return E + R(e, /([^-])(transform)/g, "$1" + E + "$2") + e;
550
+ return $ + E(e, /([^-])(transform)/g, "$1" + $ + "$2") + e;
551
+ // cursor
464
552
  case 6187:
465
- return R(R(R(e, /(zoom-|grab)/, E + "$1"), /(image-set)/, E + "$1"), e, "") + e;
553
+ return E(E(E(e, /(zoom-|grab)/, $ + "$1"), /(image-set)/, $ + "$1"), e, "") + e;
554
+ // background, background-image
466
555
  case 5495:
467
556
  case 3959:
468
- return R(e, /(image-set\([^]*)/, E + "$1$`$1");
557
+ return E(e, /(image-set\([^]*)/, $ + "$1$`$1");
558
+ // justify-content
469
559
  case 4968:
470
- return R(R(e, /(.+:)(flex-)?(.*)/, E + "box-pack:$3" + j + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + E + e + e;
560
+ return E(E(e, /(.+:)(flex-)?(.*)/, $ + "box-pack:$3" + W + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + $ + e + e;
561
+ // (margin|padding)-inline-(start|end)
471
562
  case 4095:
472
563
  case 3583:
473
564
  case 4068:
474
565
  case 2532:
475
- return R(e, /(.+)-inline(.+)/, E + "$1$2") + e;
566
+ return E(e, /(.+)-inline(.+)/, $ + "$1$2") + e;
567
+ // (min|max)?(width|height|inline-size|block-size)
476
568
  case 8116:
477
569
  case 7059:
478
570
  case 5753:
@@ -485,128 +577,136 @@ function wt(e, t) {
485
577
  case 5789:
486
578
  case 5021:
487
579
  case 4765:
488
- if (se(e) - 1 - t > 6)
489
- switch (B(e, t + 1)) {
490
- case 109:
491
- if (B(e, t + 4) !== 45)
492
- break;
493
- case 102:
494
- return R(e, /(.+:)(.+)-([^]+)/, "$1" + E + "$2-$3$1" + Le + (B(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
495
- case 115:
496
- return ~Ge(e, "stretch") ? wt(R(e, "stretch", "fill-available"), t) + e : e;
497
- }
580
+ if (ne(e) - 1 - t > 6) switch (B(e, t + 1)) {
581
+ // (m)ax-content, (m)in-content
582
+ case 109:
583
+ if (B(e, t + 4) !== 45) break;
584
+ // (f)ill-available, (f)it-content
585
+ case 102:
586
+ return E(e, /(.+:)(.+)-([^]+)/, "$1" + $ + "$2-$3$1" + Le + (B(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
587
+ // (s)tretch
588
+ case 115:
589
+ return ~Ge(e, "stretch") ? xt(E(e, "stretch", "fill-available"), t) + e : e;
590
+ }
498
591
  break;
592
+ // position: sticky
499
593
  case 4949:
500
- if (B(e, t + 1) !== 115)
501
- break;
594
+ if (B(e, t + 1) !== 115) break;
595
+ // display: (flex|inline-flex)
502
596
  case 6444:
503
- switch (B(e, se(e) - 3 - (~Ge(e, "!important") && 10))) {
597
+ switch (B(e, ne(e) - 3 - (~Ge(e, "!important") && 10))) {
598
+ // stic(k)y
504
599
  case 107:
505
- return R(e, ":", ":" + E) + e;
600
+ return E(e, ":", ":" + $) + e;
601
+ // (inline-)?fl(e)x
506
602
  case 101:
507
- return R(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + E + (B(e, 14) === 45 ? "inline-" : "") + "box$3$1" + E + "$2$3$1" + j + "$2box$3") + e;
603
+ return E(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + $ + (B(e, 14) === 45 ? "inline-" : "") + "box$3$1" + $ + "$2$3$1" + W + "$2box$3") + e;
508
604
  }
509
605
  break;
606
+ // writing-mode
510
607
  case 5936:
511
608
  switch (B(e, t + 11)) {
609
+ // vertical-l(r)
512
610
  case 114:
513
- return E + e + j + R(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
611
+ return $ + e + W + E(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
612
+ // vertical-r(l)
514
613
  case 108:
515
- return E + e + j + R(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
614
+ return $ + e + W + E(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
615
+ // horizontal(-)tb
516
616
  case 45:
517
- return E + e + j + R(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
617
+ return $ + e + W + E(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
518
618
  }
519
- return E + e + j + e + e;
619
+ return $ + e + W + e + e;
520
620
  }
521
621
  return e;
522
622
  }
523
- var mn = function(t, r, n, s) {
524
- if (t.length > -1 && !t.return)
525
- switch (t.type) {
526
- case Ye:
527
- t.return = wt(t.value, t.length);
528
- break;
529
- case mt:
530
- return be([Ne(t, {
531
- value: R(t.value, "@", "@" + E)
532
- })], s);
533
- case Ke:
534
- if (t.length)
535
- return Zt(t.props, function(a) {
536
- switch (Yt(a, /(::plac\w+|:read-\w+)/)) {
537
- case ":read-only":
538
- case ":read-write":
539
- return be([Ne(t, {
540
- props: [R(a, /:(read-\w+)/, ":" + Le + "$1")]
541
- })], s);
542
- case "::placeholder":
543
- return be([Ne(t, {
544
- props: [R(a, /:(plac\w+)/, ":" + E + "input-$1")]
545
- }), Ne(t, {
546
- props: [R(a, /:(plac\w+)/, ":" + Le + "$1")]
547
- }), Ne(t, {
548
- props: [R(a, /:(plac\w+)/, j + "input-$1")]
549
- })], s);
550
- }
551
- return "";
552
- });
553
- }
554
- }, bn = [mn], gn = function(t) {
623
+ var bn = function(t, r, n, a) {
624
+ if (t.length > -1 && !t.return) switch (t.type) {
625
+ case Ye:
626
+ t.return = xt(t.value, t.length);
627
+ break;
628
+ case bt:
629
+ return ge([ye(t, {
630
+ value: E(t.value, "@", "@" + $)
631
+ })], a);
632
+ case Ke:
633
+ if (t.length) return Jt(t.props, function(s) {
634
+ switch (Zt(s, /(::plac\w+|:read-\w+)/)) {
635
+ // :read-(only|write)
636
+ case ":read-only":
637
+ case ":read-write":
638
+ return ge([ye(t, {
639
+ props: [E(s, /:(read-\w+)/, ":" + Le + "$1")]
640
+ })], a);
641
+ // :placeholder
642
+ case "::placeholder":
643
+ return ge([ye(t, {
644
+ props: [E(s, /:(plac\w+)/, ":" + $ + "input-$1")]
645
+ }), ye(t, {
646
+ props: [E(s, /:(plac\w+)/, ":" + Le + "$1")]
647
+ }), ye(t, {
648
+ props: [E(s, /:(plac\w+)/, W + "input-$1")]
649
+ })], a);
650
+ }
651
+ return "";
652
+ });
653
+ }
654
+ }, gn = [bn], vn = function(t) {
555
655
  var r = t.key;
556
656
  if (r === "css") {
557
657
  var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
558
- Array.prototype.forEach.call(n, function(f) {
559
- var C = f.getAttribute("data-emotion");
560
- C.indexOf(" ") !== -1 && (document.head.appendChild(f), f.setAttribute("data-s", ""));
658
+ Array.prototype.forEach.call(n, function(x) {
659
+ var k = x.getAttribute("data-emotion");
660
+ k.indexOf(" ") !== -1 && (document.head.appendChild(x), x.setAttribute("data-s", ""));
561
661
  });
562
662
  }
563
- var s = t.stylisPlugins || bn, a = {}, l, c = [];
564
- l = t.container || document.head, Array.prototype.forEach.call(
663
+ var a = t.stylisPlugins || gn, s = {}, o, c = [];
664
+ o = t.container || document.head, Array.prototype.forEach.call(
565
665
  // this means we will ignore elements which don't have a space in them which
566
666
  // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
567
667
  document.querySelectorAll('style[data-emotion^="' + r + ' "]'),
568
- function(f) {
569
- for (var C = f.getAttribute("data-emotion").split(" "), y = 1; y < C.length; y++)
570
- a[C[y]] = !0;
571
- c.push(f);
668
+ function(x) {
669
+ for (var k = x.getAttribute("data-emotion").split(" "), b = 1; b < k.length; b++)
670
+ s[k[b]] = !0;
671
+ c.push(x);
572
672
  }
573
673
  );
574
- var o, d = [hn, pn];
674
+ var l, d = [hn, mn];
575
675
  {
576
- var u, m = [an, ln(function(f) {
577
- u.insert(f);
578
- })], b = cn(d.concat(s, m)), g = function(C) {
579
- return be(rn(C), b);
676
+ var u, h = [cn, ln(function(x) {
677
+ u.insert(x);
678
+ })], m = on(d.concat(a, h)), p = function(k) {
679
+ return ge(an(k), m);
580
680
  };
581
- o = function(C, y, v, $) {
582
- u = v, g(C ? C + "{" + y.styles + "}" : y.styles), $ && (h.inserted[y.name] = !0);
681
+ l = function(k, b, v, R) {
682
+ u = v, p(k ? k + "{" + b.styles + "}" : b.styles), R && (g.inserted[b.name] = !0);
583
683
  };
584
684
  }
585
- var h = {
685
+ var g = {
586
686
  key: r,
587
- sheet: new Vt({
687
+ sheet: new Gt({
588
688
  key: r,
589
- container: l,
689
+ container: o,
590
690
  nonce: t.nonce,
591
691
  speedy: t.speedy,
592
692
  prepend: t.prepend,
593
693
  insertionPoint: t.insertionPoint
594
694
  }),
595
695
  nonce: t.nonce,
596
- inserted: a,
696
+ inserted: s,
597
697
  registered: {},
598
- insert: o
698
+ insert: l
599
699
  };
600
- return h.sheet.hydrate(c), h;
700
+ return g.sheet.hydrate(c), g;
601
701
  };
602
- function vn(e) {
603
- for (var t = 0, r, n = 0, s = e.length; s >= 4; ++n, s -= 4)
702
+ function wn(e) {
703
+ for (var t = 0, r, n = 0, a = e.length; a >= 4; ++n, a -= 4)
604
704
  r = e.charCodeAt(n) & 255 | (e.charCodeAt(++n) & 255) << 8 | (e.charCodeAt(++n) & 255) << 16 | (e.charCodeAt(++n) & 255) << 24, r = /* Math.imul(k, m): */
605
705
  (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), r ^= /* k >>> r: */
606
706
  r >>> 24, t = /* Math.imul(k, m): */
607
707
  (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
608
708
  (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
609
- switch (s) {
709
+ switch (a) {
610
710
  case 3:
611
711
  t ^= (e.charCodeAt(n + 2) & 255) << 16;
612
712
  case 2:
@@ -667,28 +767,28 @@ var Cn = {
667
767
  strokeMiterlimit: 1,
668
768
  strokeOpacity: 1,
669
769
  strokeWidth: 1
670
- }, wn = !1, xn = /[A-Z]|^ms/g, yn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, xt = function(t) {
770
+ }, xn = /[A-Z]|^ms/g, Nn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, Nt = function(t) {
671
771
  return t.charCodeAt(1) === 45;
672
- }, it = function(t) {
772
+ }, ct = function(t) {
673
773
  return t != null && typeof t != "boolean";
674
- }, Be = /* @__PURE__ */ on(function(e) {
675
- return xt(e) ? e : e.replace(xn, "-$&").toLowerCase();
676
- }), ct = function(t, r) {
774
+ }, We = /* @__PURE__ */ un(function(e) {
775
+ return Nt(e) ? e : e.replace(xn, "-$&").toLowerCase();
776
+ }), ot = function(t, r) {
677
777
  switch (t) {
678
778
  case "animation":
679
779
  case "animationName":
680
780
  if (typeof r == "string")
681
- return r.replace(yn, function(n, s, a) {
682
- return ae = {
683
- name: s,
684
- styles: a,
685
- next: ae
686
- }, s;
781
+ return r.replace(Nn, function(n, a, s) {
782
+ return ie = {
783
+ name: a,
784
+ styles: s,
785
+ next: ie
786
+ }, a;
687
787
  });
688
788
  }
689
- return Cn[t] !== 1 && !xt(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
690
- }, Nn = "Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";
691
- function Ae(e, t, r) {
789
+ return Cn[t] !== 1 && !Nt(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
790
+ };
791
+ function Me(e, t, r) {
692
792
  if (r == null)
693
793
  return "";
694
794
  var n = r;
@@ -698,175 +798,159 @@ function Ae(e, t, r) {
698
798
  case "boolean":
699
799
  return "";
700
800
  case "object": {
701
- var s = r;
702
- if (s.anim === 1)
703
- return ae = {
704
- name: s.name,
705
- styles: s.styles,
706
- next: ae
707
- }, s.name;
708
801
  var a = r;
709
- if (a.styles !== void 0) {
710
- var l = a.next;
711
- if (l !== void 0)
712
- for (; l !== void 0; )
713
- ae = {
714
- name: l.name,
715
- styles: l.styles,
716
- next: ae
717
- }, l = l.next;
718
- var c = a.styles + ";";
802
+ if (a.anim === 1)
803
+ return ie = {
804
+ name: a.name,
805
+ styles: a.styles,
806
+ next: ie
807
+ }, a.name;
808
+ var s = r;
809
+ if (s.styles !== void 0) {
810
+ var o = s.next;
811
+ if (o !== void 0)
812
+ for (; o !== void 0; )
813
+ ie = {
814
+ name: o.name,
815
+ styles: o.styles,
816
+ next: ie
817
+ }, o = o.next;
818
+ var c = s.styles + ";";
719
819
  return c;
720
820
  }
721
- return $n(e, t, r);
722
- }
723
- case "function": {
724
- if (e !== void 0) {
725
- var o = ae, d = r(e);
726
- return ae = o, Ae(e, t, d);
727
- }
728
- break;
821
+ return yn(e, t, r);
729
822
  }
730
823
  }
731
- var u = r;
824
+ var l = r;
732
825
  if (t == null)
733
- return u;
734
- var m = t[u];
735
- return m !== void 0 ? m : u;
826
+ return l;
827
+ var d = t[l];
828
+ return d !== void 0 ? d : l;
736
829
  }
737
- function $n(e, t, r) {
830
+ function yn(e, t, r) {
738
831
  var n = "";
739
832
  if (Array.isArray(r))
740
- for (var s = 0; s < r.length; s++)
741
- n += Ae(e, t, r[s]) + ";";
833
+ for (var a = 0; a < r.length; a++)
834
+ n += Me(e, t, r[a]) + ";";
742
835
  else
743
- for (var a in r) {
744
- var l = r[a];
745
- if (typeof l != "object") {
746
- var c = l;
747
- t != null && t[c] !== void 0 ? n += a + "{" + t[c] + "}" : it(c) && (n += Be(a) + ":" + ct(a, c) + ";");
748
- } else {
749
- if (a === "NO_COMPONENT_SELECTOR" && wn)
750
- throw new Error(Nn);
751
- if (Array.isArray(l) && typeof l[0] == "string" && (t == null || t[l[0]] === void 0))
752
- for (var o = 0; o < l.length; o++)
753
- it(l[o]) && (n += Be(a) + ":" + ct(a, l[o]) + ";");
754
- else {
755
- var d = Ae(e, t, l);
756
- switch (a) {
757
- case "animation":
758
- case "animationName": {
759
- n += Be(a) + ":" + d + ";";
760
- break;
761
- }
762
- default:
763
- n += a + "{" + d + "}";
836
+ for (var s in r) {
837
+ var o = r[s];
838
+ if (typeof o != "object") {
839
+ var c = o;
840
+ t != null && t[c] !== void 0 ? n += s + "{" + t[c] + "}" : ct(c) && (n += We(s) + ":" + ot(s, c) + ";");
841
+ } else if (Array.isArray(o) && typeof o[0] == "string" && (t == null || t[o[0]] === void 0))
842
+ for (var l = 0; l < o.length; l++)
843
+ ct(o[l]) && (n += We(s) + ":" + ot(s, o[l]) + ";");
844
+ else {
845
+ var d = Me(e, t, o);
846
+ switch (s) {
847
+ case "animation":
848
+ case "animationName": {
849
+ n += We(s) + ":" + d + ";";
850
+ break;
764
851
  }
852
+ default:
853
+ n += s + "{" + d + "}";
765
854
  }
766
855
  }
767
856
  }
768
857
  return n;
769
858
  }
770
- var lt = /label:\s*([^\s;{]+)\s*(;|$)/g, ae;
859
+ var lt = /label:\s*([^\s;{]+)\s*(;|$)/g, ie;
771
860
  function je(e, t, r) {
772
861
  if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
773
862
  return e[0];
774
- var n = !0, s = "";
775
- ae = void 0;
776
- var a = e[0];
777
- if (a == null || a.raw === void 0)
778
- n = !1, s += Ae(r, t, a);
863
+ var n = !0, a = "";
864
+ ie = void 0;
865
+ var s = e[0];
866
+ if (s == null || s.raw === void 0)
867
+ n = !1, a += Me(r, t, s);
779
868
  else {
780
- var l = a;
781
- s += l[0];
869
+ var o = s;
870
+ a += o[0];
782
871
  }
783
872
  for (var c = 1; c < e.length; c++)
784
- if (s += Ae(r, t, e[c]), n) {
785
- var o = a;
786
- s += o[c];
873
+ if (a += Me(r, t, e[c]), n) {
874
+ var l = s;
875
+ a += l[c];
787
876
  }
788
877
  lt.lastIndex = 0;
789
- for (var d = "", u; (u = lt.exec(s)) !== null; )
878
+ for (var d = "", u; (u = lt.exec(a)) !== null; )
790
879
  d += "-" + u[1];
791
- var m = vn(s) + d;
880
+ var h = wn(a) + d;
792
881
  return {
793
- name: m,
794
- styles: s,
795
- next: ae
882
+ name: h,
883
+ styles: a,
884
+ next: ie
796
885
  };
797
886
  }
798
- var Sn = !0;
799
887
  function yt(e, t, r) {
800
888
  var n = "";
801
- return r.split(" ").forEach(function(s) {
802
- e[s] !== void 0 ? t.push(e[s] + ";") : s && (n += s + " ");
889
+ return r.split(" ").forEach(function(a) {
890
+ e[a] !== void 0 ? t.push(e[a] + ";") : a && (n += a + " ");
803
891
  }), n;
804
892
  }
805
- var kn = function(t, r, n) {
806
- var s = t.key + "-" + r.name;
893
+ var Sn = function(t, r, n) {
894
+ var a = t.key + "-" + r.name;
807
895
  // we only need to add the styles to the registered cache if the
808
896
  // class name could be used further down
809
897
  // the tree but if it's a string tag, we know it won't
810
898
  // so we don't have to add it to registered cache.
811
899
  // this improves memory usage since we can avoid storing the whole style string
812
- (n === !1 || // we need to always store it if we're in compat mode and
813
- // in node since emotion-server relies on whether a style is in
814
- // the registered cache to know whether a style is global or not
815
- // also, note that this check will be dead code eliminated in the browser
816
- Sn === !1) && t.registered[s] === void 0 && (t.registered[s] = r.styles);
817
- }, An = function(t, r, n) {
818
- kn(t, r, n);
819
- var s = t.key + "-" + r.name;
900
+ t.registered[a] === void 0 && (t.registered[a] = r.styles);
901
+ }, Rn = function(t, r, n) {
902
+ Sn(t, r);
903
+ var a = t.key + "-" + r.name;
820
904
  if (t.inserted[r.name] === void 0) {
821
- var a = r;
905
+ var s = r;
822
906
  do
823
- t.insert(r === a ? "." + s : "", a, t.sheet, !0), a = a.next;
824
- while (a !== void 0);
907
+ t.insert(r === s ? "." + a : "", s, t.sheet, !0), s = s.next;
908
+ while (s !== void 0);
825
909
  }
826
910
  };
827
- function ot(e, t) {
911
+ function ut(e, t) {
828
912
  if (e.inserted[t.name] === void 0)
829
913
  return e.insert("", t, e.sheet, !0);
830
914
  }
831
- function ut(e, t, r) {
832
- var n = [], s = yt(e, n, r);
833
- return n.length < 2 ? r : s + t(n);
915
+ function dt(e, t, r) {
916
+ var n = [], a = yt(e, n, r);
917
+ return n.length < 2 ? r : a + t(n);
834
918
  }
835
- var En = function(t) {
836
- var r = gn(t);
919
+ var $n = function(t) {
920
+ var r = vn(t);
837
921
  r.sheet.speedy = function(c) {
838
922
  this.isSpeedy = c;
839
923
  }, r.compat = !0;
840
924
  var n = function() {
841
- for (var o = arguments.length, d = new Array(o), u = 0; u < o; u++)
925
+ for (var l = arguments.length, d = new Array(l), u = 0; u < l; u++)
842
926
  d[u] = arguments[u];
843
- var m = je(d, r.registered, void 0);
844
- return An(r, m, !1), r.key + "-" + m.name;
845
- }, s = function() {
846
- for (var o = arguments.length, d = new Array(o), u = 0; u < o; u++)
847
- d[u] = arguments[u];
848
- var m = je(d, r.registered), b = "animation-" + m.name;
849
- return ot(r, {
850
- name: m.name,
851
- styles: "@keyframes " + b + "{" + m.styles + "}"
852
- }), b;
927
+ var h = je(d, r.registered, void 0);
928
+ return Rn(r, h), r.key + "-" + h.name;
853
929
  }, a = function() {
854
- for (var o = arguments.length, d = new Array(o), u = 0; u < o; u++)
930
+ for (var l = arguments.length, d = new Array(l), u = 0; u < l; u++)
931
+ d[u] = arguments[u];
932
+ var h = je(d, r.registered), m = "animation-" + h.name;
933
+ return ut(r, {
934
+ name: h.name,
935
+ styles: "@keyframes " + m + "{" + h.styles + "}"
936
+ }), m;
937
+ }, s = function() {
938
+ for (var l = arguments.length, d = new Array(l), u = 0; u < l; u++)
855
939
  d[u] = arguments[u];
856
- var m = je(d, r.registered);
857
- ot(r, m);
858
- }, l = function() {
859
- for (var o = arguments.length, d = new Array(o), u = 0; u < o; u++)
940
+ var h = je(d, r.registered);
941
+ ut(r, h);
942
+ }, o = function() {
943
+ for (var l = arguments.length, d = new Array(l), u = 0; u < l; u++)
860
944
  d[u] = arguments[u];
861
- return ut(r.registered, n, Rn(d));
945
+ return dt(r.registered, n, En(d));
862
946
  };
863
947
  return {
864
948
  css: n,
865
- cx: l,
866
- injectGlobal: a,
867
- keyframes: s,
868
- hydrate: function(o) {
869
- o.forEach(function(d) {
949
+ cx: o,
950
+ injectGlobal: s,
951
+ keyframes: a,
952
+ hydrate: function(l) {
953
+ l.forEach(function(d) {
870
954
  r.inserted[d] = !0;
871
955
  });
872
956
  },
@@ -876,256 +960,249 @@ var En = function(t) {
876
960
  sheet: r.sheet,
877
961
  cache: r,
878
962
  getRegisteredStyles: yt.bind(null, r.registered),
879
- merge: ut.bind(null, r.registered, n)
963
+ merge: dt.bind(null, r.registered, n)
880
964
  };
881
- }, Rn = function e(t) {
965
+ }, En = function e(t) {
882
966
  for (var r = "", n = 0; n < t.length; n++) {
883
- var s = t[n];
884
- if (s != null) {
885
- var a = void 0;
886
- switch (typeof s) {
967
+ var a = t[n];
968
+ if (a != null) {
969
+ var s = void 0;
970
+ switch (typeof a) {
887
971
  case "boolean":
888
972
  break;
889
973
  case "object": {
890
- if (Array.isArray(s))
891
- a = e(s);
974
+ if (Array.isArray(a))
975
+ s = e(a);
892
976
  else {
893
- a = "";
894
- for (var l in s)
895
- s[l] && l && (a && (a += " "), a += l);
977
+ s = "";
978
+ for (var o in a)
979
+ a[o] && o && (s && (s += " "), s += o);
896
980
  }
897
981
  break;
898
982
  }
899
983
  default:
900
- a = s;
984
+ s = a;
901
985
  }
902
- a && (r && (r += " "), r += a);
986
+ s && (r && (r += " "), r += s);
903
987
  }
904
988
  }
905
989
  return r;
906
- }, Tn = En({
990
+ }, kn = $n({
907
991
  key: "css"
908
- }), Pn = Tn.css;
909
- const On = Ee(function(e, t) {
910
- var xe, le, ye;
992
+ }), An = kn.css;
993
+ const Tn = Ee(function(e, t) {
911
994
  const {
912
995
  state: r,
913
996
  value: n,
914
- onChange: s,
915
- options: a = [],
916
- name: l = "",
997
+ onChange: a,
998
+ options: s = [],
999
+ name: o = "",
917
1000
  id: c = "",
918
- label: o = "",
1001
+ label: l = "",
919
1002
  containerClassName: d = "",
920
1003
  inputContainerClassName: u = "",
921
- helperText: m = "",
922
- placeholder: b = "",
923
- multiple: g = !1,
924
- ...h
925
- } = e, [f, C] = I("");
926
- V(() => {
927
- if (!g && n && !Array.isArray(n)) {
928
- C(String(n.value ?? n.name ?? ""));
1004
+ helperText: h = "",
1005
+ placeholder: m = "",
1006
+ multiple: p = !1,
1007
+ ...g
1008
+ } = e, [x, k] = D("");
1009
+ j(() => {
1010
+ if (!p && n && !Array.isArray(n)) {
1011
+ k(String(n.value ?? n.name ?? ""));
929
1012
  return;
930
1013
  }
931
- C("");
932
- }, [g, n]);
933
- const [y, v] = I(!1), $ = a.filter((w) => {
934
- const z = String(w.value ?? w.name).toLowerCase().includes(f == null ? void 0 : f.toLowerCase());
935
- return Array.isArray(n) && n.length ? !n.some((_) => _.id === w.id) : n && !Array.isArray(n) ? n.id !== w.id : z;
936
- }), T = Q(null), A = Q(null), [P, N] = I(!1), q = Q(null);
937
- V(() => {
938
- const w = (_) => {
939
- T.current && !T.current.contains(_.target) && v(!1);
940
- }, z = (_) => {
941
- _.key === "Escape" && v(!1);
1014
+ k("");
1015
+ }, [p, n]);
1016
+ const [b, v] = D(!1), R = s.filter((C) => {
1017
+ const F = String(C.value ?? C.name).toLowerCase().includes(x?.toLowerCase());
1018
+ return Array.isArray(n) && n.length ? !n.some((K) => K.id === C.id) : n && !Array.isArray(n) ? n.id !== C.id : F;
1019
+ }), L = H(null), O = H(null), [P, N] = D(!1), Q = H(null);
1020
+ j(() => {
1021
+ const C = (K) => {
1022
+ L.current && !L.current.contains(K.target) && v(!1);
1023
+ }, F = (K) => {
1024
+ K.key === "Escape" && v(!1);
942
1025
  };
943
- return document.addEventListener("mousedown", w), document.addEventListener("keydown", z), () => {
944
- document.removeEventListener("mousedown", w), document.removeEventListener("keydown", z);
1026
+ return document.addEventListener("mousedown", C), document.addEventListener("keydown", F), () => {
1027
+ document.removeEventListener("mousedown", C), document.removeEventListener("keydown", F);
945
1028
  };
946
1029
  }, []);
947
- const we = (w) => {
948
- C(w.target.value);
949
- }, ue = F(
950
- (w) => {
951
- w ? g ? (C(""), Array.isArray(n) && n.length ? s([...n, w]) : s([w])) : (C(String(w.name ?? w.value ?? "")), s(w)) : s(null), v(!1);
1030
+ const xe = (C) => {
1031
+ k(C.target.value);
1032
+ }, ce = T(
1033
+ (C) => {
1034
+ C ? p ? (k(""), Array.isArray(n) && n.length ? a([...n, C]) : a([C])) : (k(String(C.name ?? C.value ?? "")), a(C)) : a(null), v(!1);
952
1035
  },
953
- [g, s, n]
954
- ), ce = F(
955
- (w) => {
1036
+ [p, a, n]
1037
+ ), ae = T(
1038
+ (C) => {
956
1039
  if (!Array.isArray(n)) {
957
- s(null);
1040
+ a(null);
958
1041
  return;
959
1042
  }
960
- if (w != null)
961
- if (w !== -1) {
962
- const z = n.filter((_, Y) => Y !== w);
963
- z.length ? s(z) : s(null);
1043
+ if (C != null)
1044
+ if (C !== -1) {
1045
+ const F = n.filter((K, Ne) => Ne !== C);
1046
+ F.length ? a(F) : a(null);
964
1047
  } else {
965
- const [z] = n;
966
- s([z]);
1048
+ const [F] = n;
1049
+ a([F]);
967
1050
  }
968
- else
969
- s(null);
1051
+ else a(null);
970
1052
  },
971
- [s, n]
1053
+ [a, n]
972
1054
  );
973
- return V(() => {
974
- var _, Y, te;
975
- const w = ((_ = q.current) == null ? void 0 : _.offsetWidth) ?? 0, z = ((te = (Y = t ?? A) == null ? void 0 : Y.current) == null ? void 0 : te.offsetWidth) ?? 0;
976
- w > z * 0.4 ? N(!0) : N(!1);
977
- }, [n]), /* @__PURE__ */ k(
1055
+ return j(() => {
1056
+ const C = Q.current?.offsetWidth ?? 0, F = (t ?? O)?.current?.offsetWidth ?? 0;
1057
+ C > F * 0.4 ? N(!0) : N(!1);
1058
+ }, [n]), /* @__PURE__ */ S(
978
1059
  "div",
979
1060
  {
980
1061
  className: `autocomplete-input-container ${d}`,
981
- ref: T,
1062
+ ref: L,
982
1063
  children: [
983
- /* @__PURE__ */ k("div", { className: "autocomplete-value-input-container", children: [
1064
+ /* @__PURE__ */ S("div", { className: "autocomplete-value-input-container", children: [
984
1065
  /* @__PURE__ */ i(
985
1066
  Ie,
986
1067
  {
987
1068
  state: r,
988
- name: l,
1069
+ name: o,
989
1070
  id: c,
990
- value: f,
991
- onChange: we,
992
- placeholder: b,
993
- helperText: m,
1071
+ value: x,
1072
+ onChange: xe,
1073
+ placeholder: m,
1074
+ helperText: h,
994
1075
  onFocus: () => v(!0),
995
- label: o,
1076
+ label: l,
996
1077
  containerClassName: `autocomplete-text-input ${u}`,
997
- ref: t ?? A,
998
- ...h,
999
- children: !g && n && !Array.isArray(n) && (n.value || n.name) && /* @__PURE__ */ i(
1000
- "button",
1078
+ ref: t ?? O,
1079
+ ...g,
1080
+ children: !p && n && !Array.isArray(n) && (n.value || n.name) && /* @__PURE__ */ i(
1081
+ de,
1001
1082
  {
1002
- type: "button",
1083
+ icon: /* @__PURE__ */ i(Qe, {}),
1003
1084
  className: "autocomplete-delete-button",
1004
- onClick: (w) => {
1005
- ue(), w.stopPropagation();
1006
- },
1007
- children: /* @__PURE__ */ i(Qe, {})
1085
+ onClick: (C) => {
1086
+ ce(), C.stopPropagation();
1087
+ }
1008
1088
  }
1009
1089
  )
1010
1090
  }
1011
1091
  ),
1012
- g && Array.isArray(n) && n.length ? /* @__PURE__ */ i("ul", { ref: q, className: "autocomplete-value-container", children: P ? /* @__PURE__ */ k($e, { children: [
1092
+ p && Array.isArray(n) && n.length ? /* @__PURE__ */ i("ul", { ref: Q, className: "autocomplete-value-container", children: P ? /* @__PURE__ */ S(Se, { children: [
1013
1093
  /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
1014
- fe,
1094
+ ue,
1015
1095
  {
1016
- text: ((xe = n[0]) == null ? void 0 : xe.value) ?? ((le = n[0]) == null ? void 0 : le.name),
1017
- onDelete: (w) => {
1018
- ce(0), w.stopPropagation();
1096
+ text: n[0]?.value ?? n[0]?.name,
1097
+ onDelete: (C) => {
1098
+ ae(0), C.stopPropagation();
1019
1099
  }
1020
1100
  }
1021
1101
  ) }),
1022
1102
  n.length > 1 && /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
1023
- fe,
1103
+ ue,
1024
1104
  {
1025
1105
  text: `+${n.length - 1}`,
1026
- onDelete: (w) => {
1027
- ce(-1), w.stopPropagation();
1106
+ onDelete: (C) => {
1107
+ ae(-1), C.stopPropagation();
1028
1108
  }
1029
1109
  }
1030
1110
  ) })
1031
- ] }) : n.map((w, z) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
1032
- fe,
1111
+ ] }) : n.map((C, F) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
1112
+ ue,
1033
1113
  {
1034
- text: String(w.value ?? w.name),
1035
- onDelete: (_) => {
1036
- ce(z), _.stopPropagation();
1114
+ text: String(C.value ?? C.name),
1115
+ onDelete: (K) => {
1116
+ ae(F), K.stopPropagation();
1037
1117
  }
1038
1118
  }
1039
- ) }, w.id ?? w.value ?? w.name)) }) : null
1119
+ ) }, C.id ?? C.value ?? C.name)) }) : null
1040
1120
  ] }),
1041
- y && /* @__PURE__ */ i(
1121
+ b && /* @__PURE__ */ i(
1042
1122
  "ul",
1043
1123
  {
1044
- className: `autocomplete-suggestions-container ${Pn({ width: (ye = T.current) == null ? void 0 : ye.offsetWidth })}`,
1045
- children: $.map((w) => /* @__PURE__ */ i(
1124
+ className: `autocomplete-suggestions-container ${An({ width: L.current?.offsetWidth })}`,
1125
+ children: R.map((C) => /* @__PURE__ */ i(
1046
1126
  "li",
1047
1127
  {
1048
1128
  className: "autocomplete-suggestion-item",
1049
- onClick: (z) => {
1050
- ue(w), z.stopPropagation();
1129
+ onClick: (F) => {
1130
+ ce(C), F.stopPropagation();
1051
1131
  },
1052
- children: w.value ?? w.name
1132
+ children: C.value ?? C.name
1053
1133
  },
1054
- w.id ?? w.value ?? w.name
1134
+ C.id ?? C.value ?? C.name
1055
1135
  ))
1056
1136
  }
1057
1137
  )
1058
1138
  ]
1059
1139
  }
1060
1140
  );
1061
- });
1062
- const Fn = Ee(function(e, t) {
1141
+ }), On = Ee(function(e, t) {
1063
1142
  const {
1064
1143
  checked: r,
1065
1144
  onChange: n,
1066
- name: s = "",
1067
- id: a = "",
1068
- label: l = "",
1145
+ name: a = "",
1146
+ id: s = "",
1147
+ label: o = "",
1069
1148
  containerClassName: c = "",
1070
- inputClassName: o = "",
1149
+ inputClassName: l = "",
1071
1150
  labelClassName: d = "",
1072
1151
  ...u
1073
1152
  } = e;
1074
- return /* @__PURE__ */ k("label", { className: `input-check-container ${c}`, children: [
1153
+ return /* @__PURE__ */ S("label", { className: `input-check-container ${c}`, children: [
1075
1154
  /* @__PURE__ */ i(
1076
1155
  "input",
1077
1156
  {
1078
- id: a,
1157
+ id: s,
1079
1158
  ref: t,
1080
- name: s,
1159
+ name: a,
1081
1160
  type: "checkbox",
1082
1161
  checked: r,
1083
1162
  onChange: n,
1084
- className: `input-check ${o}`,
1163
+ className: `input-check ${l}`,
1085
1164
  ...u
1086
1165
  }
1087
1166
  ),
1088
- /* @__PURE__ */ i("span", { className: `input-check-label ${d}`, children: l })
1167
+ /* @__PURE__ */ i("span", { className: `input-check-label ${d}`, children: o })
1089
1168
  ] });
1090
1169
  });
1091
- function dt(e, t = 25) {
1092
- if (e.length <= t)
1093
- return e;
1170
+ function ft(e, t = 25) {
1171
+ if (e.length <= t) return e;
1094
1172
  const r = e.lastIndexOf(".");
1095
1173
  if (r === -1)
1096
1174
  return e.slice(0, t - 3) + "...";
1097
- const n = e.slice(0, r), s = e.slice(r), a = t - s.length - 3;
1098
- return n.slice(0, a) + "..." + s;
1175
+ const n = e.slice(0, r), a = e.slice(r), s = t - a.length - 3;
1176
+ return n.slice(0, s) + "..." + a;
1099
1177
  }
1100
- const fr = Ee(function(e, t) {
1101
- var v, $;
1178
+ const dr = Ee(function(e, t) {
1102
1179
  const {
1103
1180
  children: r,
1104
1181
  label: n,
1105
- containerClassName: s = "",
1106
- inputClassName: a = "",
1107
- labelClassName: l = "",
1182
+ containerClassName: a = "",
1183
+ inputClassName: s = "",
1184
+ labelClassName: o = "",
1108
1185
  helperText: c = "",
1109
- helperTextClassName: o = "",
1186
+ helperTextClassName: l = "",
1110
1187
  iconClassName: d = "",
1111
1188
  multiple: u = !1,
1112
- onChange: m,
1113
- onClear: b,
1114
- ...g
1115
- } = e, [h, f] = I([]), C = (T) => {
1116
- if (T.target.files) {
1117
- const A = Array.from(T.target.files);
1118
- f((P) => [...P, ...A]);
1189
+ onChange: h,
1190
+ onClear: m,
1191
+ ...p
1192
+ } = e, [g, x] = D([]), k = (v) => {
1193
+ if (v.target.files) {
1194
+ const R = Array.from(v.target.files);
1195
+ x((L) => [...L, ...R]);
1119
1196
  }
1120
- m && m(T);
1121
- }, y = (T) => {
1122
- f((A) => {
1123
- const P = A.filter((N, q) => q !== T);
1124
- return P.length === 0 && (b == null || b()), P;
1197
+ h && h(v);
1198
+ }, b = (v) => {
1199
+ x((R) => {
1200
+ const L = R.filter((O, P) => P !== v);
1201
+ return L.length === 0 && m?.(), L;
1125
1202
  });
1126
1203
  };
1127
- return /* @__PURE__ */ k("div", { className: `file-input-container ${s}`, children: [
1128
- h.length === 0 && /* @__PURE__ */ k("label", { htmlFor: g.name, className: `${l}`, children: [
1204
+ return /* @__PURE__ */ S("div", { className: `file-input-container ${a}`, children: [
1205
+ g.length === 0 && /* @__PURE__ */ S("label", { htmlFor: p.name, className: `${o}`, children: [
1129
1206
  n,
1130
1207
  /* @__PURE__ */ i(
1131
1208
  "input",
@@ -1133,39 +1210,39 @@ const fr = Ee(function(e, t) {
1133
1210
  type: "file",
1134
1211
  ref: t,
1135
1212
  multiple: u,
1136
- onClick: (T) => {
1137
- T.currentTarget.value = "";
1213
+ onClick: (v) => {
1214
+ v.currentTarget.value = "";
1138
1215
  },
1139
- onChange: C,
1140
- className: `file-input ${a}`,
1141
- ...g
1216
+ onChange: k,
1217
+ className: `file-input ${s}`,
1218
+ ...p
1142
1219
  }
1143
1220
  ),
1144
- g.required ? " *" : ""
1221
+ p.required ? " *" : ""
1145
1222
  ] }),
1146
- h.length > 1 && /* @__PURE__ */ i("ul", { className: "file-preview-list", children: h.map((T, A) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i("span", { "data-tooltip-id": "tooltip", "data-tooltip-content": T.name, children: /* @__PURE__ */ i(
1147
- fe,
1223
+ g.length > 1 && /* @__PURE__ */ i("ul", { className: "file-preview-list", children: g.map((v, R) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i("span", { "data-tooltip-id": "tooltip", "data-tooltip-content": v.name, children: /* @__PURE__ */ i(
1224
+ ue,
1148
1225
  {
1149
- text: dt(T.name, 25),
1150
- onDelete: () => y(A)
1226
+ text: ft(v.name, 25),
1227
+ onDelete: () => b(R)
1151
1228
  }
1152
- ) }) }, A)) }),
1153
- h.length === 1 && /* @__PURE__ */ k("div", { className: "file-preview", children: [
1154
- /* @__PURE__ */ i(_n, { className: `file-icon ${d}` }),
1229
+ ) }) }, R)) }),
1230
+ g.length === 1 && /* @__PURE__ */ S("div", { className: "file-preview", children: [
1231
+ /* @__PURE__ */ i(Dn, { className: `file-icon ${d}` }),
1155
1232
  /* @__PURE__ */ i(
1156
1233
  "span",
1157
1234
  {
1158
1235
  className: "!cursor-default",
1159
1236
  "data-tooltip-id": "tooltip",
1160
- "data-tooltip-content": ((v = h[0]) == null ? void 0 : v.name) ?? "",
1161
- children: dt((($ = h[0]) == null ? void 0 : $.name) ?? "", 25)
1237
+ "data-tooltip-content": g[0]?.name ?? "",
1238
+ children: ft(g[0]?.name ?? "", 25)
1162
1239
  }
1163
1240
  ),
1164
1241
  /* @__PURE__ */ i(
1165
1242
  "button",
1166
1243
  {
1167
1244
  onClick: () => {
1168
- f([]), b == null || b();
1245
+ x([]), m?.();
1169
1246
  },
1170
1247
  className: "chip-delete-button",
1171
1248
  type: "button",
@@ -1174,11 +1251,11 @@ const fr = Ee(function(e, t) {
1174
1251
  )
1175
1252
  ] }),
1176
1253
  r,
1177
- !!c && /* @__PURE__ */ i("p", { className: `file-input-helper-text ${o}`, children: c })
1254
+ !!c && /* @__PURE__ */ i("p", { className: `file-input-helper-text ${l}`, children: c })
1178
1255
  ] });
1179
1256
  });
1180
1257
  var Je = /* @__PURE__ */ ((e) => (e.error = "error", e.good = "good", e.default = "default", e))(Je || {});
1181
- const Nt = (e) => {
1258
+ const St = (e) => {
1182
1259
  switch (e) {
1183
1260
  case "error":
1184
1261
  return "input-error";
@@ -1187,7 +1264,7 @@ const Nt = (e) => {
1187
1264
  default:
1188
1265
  return "input-normal";
1189
1266
  }
1190
- }, $t = (e) => {
1267
+ }, Rt = (e) => {
1191
1268
  switch (e) {
1192
1269
  case "error":
1193
1270
  return "input-label-error";
@@ -1196,7 +1273,7 @@ const Nt = (e) => {
1196
1273
  default:
1197
1274
  return "input-label-normal";
1198
1275
  }
1199
- }, St = (e) => {
1276
+ }, $t = (e) => {
1200
1277
  switch (e) {
1201
1278
  case "error":
1202
1279
  return "input-helper-text-error";
@@ -1209,105 +1286,127 @@ const Nt = (e) => {
1209
1286
  const {
1210
1287
  value: r,
1211
1288
  onChange: n,
1212
- options: s,
1213
- containerClassName: a = "",
1214
- inputClassName: l = "",
1289
+ options: a,
1290
+ containerClassName: s = "",
1291
+ inputClassName: o = "",
1215
1292
  labelClassName: c = "",
1216
- helperText: o = "",
1293
+ helperText: l = "",
1217
1294
  helperTextClassName: d = "",
1218
1295
  placeholder: u = "",
1219
- label: m = "",
1220
- name: b = "",
1221
- id: g = "",
1222
- state: h = Je.default,
1223
- children: f,
1224
- ...C
1296
+ label: h = "",
1297
+ name: m = "",
1298
+ id: p = "",
1299
+ state: g = Je.default,
1300
+ children: x,
1301
+ ...k
1225
1302
  } = e;
1226
- return /* @__PURE__ */ k("div", { className: `select-input-container ${a}`, children: [
1303
+ return /* @__PURE__ */ S("div", { className: `select-input-container ${s}`, children: [
1227
1304
  /* @__PURE__ */ i(
1228
1305
  "select",
1229
1306
  {
1230
- ...C,
1231
- id: g,
1307
+ ...k,
1308
+ id: p,
1232
1309
  ref: t,
1233
- name: b,
1310
+ name: m,
1234
1311
  value: r,
1235
1312
  onChange: n,
1236
- className: `select-input ${Nt(h)} peer ${l}`,
1237
- children: s == null ? void 0 : s.map((y) => /* @__PURE__ */ i("option", { value: y.id, children: y.value ?? y.name ?? y.id }, y.id))
1313
+ className: `select-input ${St(g)} peer ${o}`,
1314
+ children: a?.map((b) => /* @__PURE__ */ i("option", { value: b.id, children: b.value ?? b.name ?? b.id }, b.id))
1238
1315
  }
1239
1316
  ),
1240
1317
  /* @__PURE__ */ i(
1241
1318
  "label",
1242
1319
  {
1243
- htmlFor: b,
1244
- className: `select-input-label ${$t(h)} ${c}`,
1245
- children: m
1320
+ htmlFor: m,
1321
+ className: `select-input-label ${Rt(g)} ${c}`,
1322
+ children: h
1246
1323
  }
1247
1324
  ),
1248
- f,
1249
- (u || o) && /* @__PURE__ */ i(
1325
+ x,
1326
+ (u || l) && /* @__PURE__ */ i(
1250
1327
  "p",
1251
1328
  {
1252
- className: `select-input-helper-text ${St(h)} ${d}`,
1253
- children: h !== "error" && h !== "good" ? u : o
1329
+ className: `select-input-helper-text ${$t(g)} ${d}`,
1330
+ children: g !== "error" && g !== "good" ? u : l
1254
1331
  }
1255
1332
  )
1256
1333
  ] });
1257
- });
1258
- const Ie = Ee(function(e, t) {
1334
+ }), Ie = Ee(function(e, t) {
1259
1335
  const {
1260
1336
  children: r,
1261
1337
  state: n = Je.default,
1262
- label: s = "",
1263
- containerClassName: a = "",
1264
- inputClassName: l = "",
1338
+ label: a = "",
1339
+ containerClassName: s = "",
1340
+ inputClassName: o = "",
1265
1341
  labelClassName: c = "",
1266
- helperText: o = "",
1342
+ helperText: l = "",
1267
1343
  helperTextClassName: d = "",
1268
1344
  value: u = "",
1269
- ...m
1345
+ ...h
1270
1346
  } = e;
1271
- return /* @__PURE__ */ k("div", { className: `text-input-container ${a}`, children: [
1347
+ return /* @__PURE__ */ S("div", { className: `text-input-container ${s}`, children: [
1272
1348
  /* @__PURE__ */ i(
1273
1349
  "input",
1274
1350
  {
1275
1351
  ref: t,
1276
1352
  value: u,
1277
- className: `text-input ${Nt(n)} peer ${l} ${u ? "has-value" : ""} ${m.placeholder ? "has-placeholder" : ""}`,
1278
- ...m
1353
+ className: `text-input ${St(n)} peer ${o} ${u ? "has-value" : ""} ${h.placeholder ? "has-placeholder" : ""}`,
1354
+ ...h
1279
1355
  }
1280
1356
  ),
1281
- !!s && /* @__PURE__ */ k(
1357
+ !!a && /* @__PURE__ */ S(
1282
1358
  "label",
1283
1359
  {
1284
- htmlFor: m.name,
1285
- className: `text-input-label ${$t(n)} ${c}`,
1360
+ htmlFor: h.name,
1361
+ className: `text-input-label ${Rt(n)} ${c}`,
1286
1362
  children: [
1287
- s,
1288
- m.required ? " *" : ""
1363
+ a,
1364
+ h.required ? " *" : ""
1289
1365
  ]
1290
1366
  }
1291
1367
  ),
1292
1368
  r,
1293
- !!o && /* @__PURE__ */ i(
1369
+ !!l && /* @__PURE__ */ i(
1294
1370
  "p",
1295
1371
  {
1296
- className: `text-input-helper-text ${St(n)} ${d}`,
1297
- children: o
1372
+ className: `text-input-helper-text ${$t(n)} ${d}`,
1373
+ children: l
1298
1374
  }
1299
1375
  )
1300
1376
  ] });
1301
- });
1302
- function Mn(e) {
1377
+ }), de = (e) => {
1378
+ const {
1379
+ children: t,
1380
+ icon: r,
1381
+ type: n = "button",
1382
+ className: a = "",
1383
+ variant: s = "text",
1384
+ color: o = "default",
1385
+ iconClassName: c = "",
1386
+ ...l
1387
+ } = e;
1388
+ return /* @__PURE__ */ S(
1389
+ "button",
1390
+ {
1391
+ type: n,
1392
+ className: `icon-button ${a} ${s} ${o}`,
1393
+ ...l,
1394
+ children: [
1395
+ /* @__PURE__ */ i("span", { className: c, children: r }),
1396
+ t
1397
+ ]
1398
+ }
1399
+ );
1400
+ };
1401
+ function Pn(e) {
1303
1402
  const {
1304
1403
  color: t = "stroke-blue-800",
1305
1404
  className: r = "",
1306
1405
  loaderClass: n = "",
1307
- strokeWidth: s = "4",
1308
- ...a
1406
+ strokeWidth: a = "4",
1407
+ ...s
1309
1408
  } = e;
1310
- return /* @__PURE__ */ i("div", { ...a, className: `loading ${r}`, children: /* @__PURE__ */ i("div", { className: "loader-container", children: /* @__PURE__ */ i("div", { className: `loader ${n}`, children: /* @__PURE__ */ i("svg", { className: "circular", viewBox: "25 25 50 50", children: /* @__PURE__ */ i(
1409
+ return /* @__PURE__ */ i("div", { ...s, className: `loading ${r}`, children: /* @__PURE__ */ i("div", { className: "loader-container", children: /* @__PURE__ */ i("div", { className: `loader ${n}`, children: /* @__PURE__ */ i("svg", { className: "circular", viewBox: "25 25 50 50", children: /* @__PURE__ */ i(
1311
1410
  "circle",
1312
1411
  {
1313
1412
  className: `path ${t}`,
@@ -1315,12 +1414,12 @@ function Mn(e) {
1315
1414
  cy: "50",
1316
1415
  r: "20",
1317
1416
  fill: "none",
1318
- strokeWidth: s,
1417
+ strokeWidth: a,
1319
1418
  strokeMiterlimit: "10"
1320
1419
  }
1321
1420
  ) }) }) }) });
1322
1421
  }
1323
- function Ln(e) {
1422
+ function Fn(e) {
1324
1423
  const { className: t = "" } = e;
1325
1424
  return /* @__PURE__ */ i(
1326
1425
  "svg",
@@ -1333,7 +1432,7 @@ function Ln(e) {
1333
1432
  }
1334
1433
  );
1335
1434
  }
1336
- function In(e) {
1435
+ function Ln(e) {
1337
1436
  const { className: t = "" } = e;
1338
1437
  return /* @__PURE__ */ i(
1339
1438
  "svg",
@@ -1346,7 +1445,7 @@ function In(e) {
1346
1445
  }
1347
1446
  );
1348
1447
  }
1349
- function Dn(e) {
1448
+ function Mn(e) {
1350
1449
  const { className: t = "" } = e;
1351
1450
  return /* @__PURE__ */ i(
1352
1451
  "svg",
@@ -1359,7 +1458,7 @@ function Dn(e) {
1359
1458
  }
1360
1459
  );
1361
1460
  }
1362
- function zn(e) {
1461
+ function In(e) {
1363
1462
  const { className: t = "" } = e;
1364
1463
  return /* @__PURE__ */ i(
1365
1464
  "svg",
@@ -1385,7 +1484,7 @@ function Qe(e) {
1385
1484
  }
1386
1485
  );
1387
1486
  }
1388
- function _n(e) {
1487
+ function Dn(e) {
1389
1488
  const { className: t = "" } = e;
1390
1489
  return /* @__PURE__ */ i(
1391
1490
  "svg",
@@ -1398,26 +1497,26 @@ function _n(e) {
1398
1497
  }
1399
1498
  );
1400
1499
  }
1401
- const Wn = (e) => {
1500
+ const zn = (e) => {
1402
1501
  const { className: t = "" } = e;
1403
1502
  return /* @__PURE__ */ i("svg", { className: t, viewBox: "0 0 16 16", children: /* @__PURE__ */ i("path", { d: "M9 15H7a1 1 0 010-2h2a1 1 0 010 2zM11 11H5a1 1 0 010-2h6a1 1 0 010 2zM13 7H3a1 1 0 010-2h10a1 1 0 010 2zM15 3H1a1 1 0 010-2h14a1 1 0 010 2z" }) });
1404
1503
  };
1405
- var de = /* @__PURE__ */ ((e) => (e[e.text = 0] = "text", e[e.number = 1] = "number", e[e.select = 2] = "select", e[e.autocomplete = 3] = "autocomplete", e[e.date = 4] = "date", e[e.check = 5] = "check", e))(de || {}), me = /* @__PURE__ */ ((e) => (e.ASC = "ASC", e.DESC = "DESC", e))(me || {}), K = /* @__PURE__ */ ((e) => (e[e.update = 0] = "update", e[e.reset = 1] = "reset", e))(K || {});
1406
- const ft = (e) => {
1504
+ var le = /* @__PURE__ */ ((e) => (e[e.text = 0] = "text", e[e.number = 1] = "number", e[e.select = 2] = "select", e[e.autocomplete = 3] = "autocomplete", e[e.date = 4] = "date", e[e.check = 5] = "check", e))(le || {}), be = /* @__PURE__ */ ((e) => (e.ASC = "ASC", e.DESC = "DESC", e))(be || {}), q = /* @__PURE__ */ ((e) => (e[e.update = 0] = "update", e[e.reset = 1] = "reset", e))(q || {});
1505
+ const pt = (e) => {
1407
1506
  if (e) {
1408
- const t = {}, r = Object.keys(e);
1409
- return r == null || r.forEach((n) => {
1507
+ const t = {};
1508
+ return Object.keys(e)?.forEach((n) => {
1410
1509
  t[n] = { value: e[n] };
1411
1510
  }), t;
1412
1511
  }
1413
1512
  return {};
1414
1513
  };
1415
- function Bn(e, t) {
1514
+ function _n(e, t) {
1416
1515
  const { type: r } = t;
1417
1516
  switch (r) {
1418
- case K.reset:
1517
+ case q.reset:
1419
1518
  return {};
1420
- case K.update: {
1519
+ case q.update: {
1421
1520
  const { toUpdate: n } = t;
1422
1521
  return { ...e, ...n };
1423
1522
  }
@@ -1425,223 +1524,205 @@ function Bn(e, t) {
1425
1524
  return e;
1426
1525
  }
1427
1526
  }
1428
- const kt = He({}), jn = (e) => {
1429
- const { children: t } = e, { filters: r } = oe(), [n, s] = Dt(
1430
- Bn,
1431
- ft(r)
1527
+ const Et = He({}), Bn = (e) => {
1528
+ const { children: t } = e, { filters: r } = se(), [n, a] = zt(
1529
+ _n,
1530
+ pt(r)
1432
1531
  );
1433
- V(() => {
1434
- s({ type: K.reset });
1435
- const l = ft(r);
1436
- Object.keys(l).length && s({
1437
- type: K.update,
1438
- toUpdate: l
1532
+ j(() => {
1533
+ a({ type: q.reset });
1534
+ const o = pt(r);
1535
+ Object.keys(o).length && a({
1536
+ type: q.update,
1537
+ toUpdate: o
1439
1538
  });
1440
1539
  }, [r]);
1441
- const a = {
1540
+ const s = {
1442
1541
  currentFilters: n,
1443
- setCurrentFilters: s
1542
+ setCurrentFilters: a
1444
1543
  };
1445
- return /* @__PURE__ */ i(kt.Provider, { value: a, children: t });
1544
+ return /* @__PURE__ */ i(Et.Provider, { value: s, children: t });
1446
1545
  }, Ce = () => {
1447
- const e = qe(kt);
1546
+ const e = qe(Et);
1448
1547
  if (e === void 0)
1449
1548
  throw new Error("tableOptionsContext must be used within a Provider");
1450
1549
  return e;
1451
- }, Vn = [20, 50, 100], At = He({}), hr = (e) => {
1452
- const { children: t } = e, [r, n] = I(0), [s, a] = I(20), [l, c] = I(0), [o, d] = I("id"), [u, m] = I(me.DESC), [b, g] = I({}), h = F(
1453
- ($, T) => {
1454
- let A = u;
1455
- if (o === $)
1456
- switch (u) {
1457
- case me.ASC:
1458
- A = me.DESC;
1459
- break;
1460
- default:
1461
- A = me.ASC;
1462
- break;
1463
- }
1464
- d($), m(A), T && T($, A);
1550
+ }, Wn = [20, 50, 100], kt = He({}), fr = (e) => {
1551
+ const { children: t } = e, [r, n] = D(0), [a, s] = D(20), [o, c] = D(0), [l, d] = D("id"), [u, h] = D(be.DESC), [m, p] = D({}), g = T(
1552
+ (R, L) => {
1553
+ let O = u;
1554
+ l === R && (u === be.ASC ? O = be.DESC : O = be.ASC), d(R), h(O), L && L(R, O);
1465
1555
  },
1466
- [o, u]
1467
- ), f = F(($) => {
1468
- const T = Object.entries($).reduce(
1469
- (A, [P, N]) => (N && typeof N.value < "u" && N.value !== null && (A[P] = N.value), A),
1556
+ [l, u]
1557
+ ), x = T((R) => {
1558
+ const L = Object.entries(R).reduce(
1559
+ (O, [P, N]) => (N && typeof N.value < "u" && N.value !== null && (O[P] = N.value), O),
1470
1560
  {}
1471
1561
  );
1472
- g(T);
1473
- }, []), C = F(
1474
- ($) => {
1475
- $ ? (delete b[$.toLowerCase()], g({ ...b })) : g({});
1562
+ p(L);
1563
+ }, []), k = T(
1564
+ (R) => {
1565
+ R ? (delete m[R.toLowerCase()], p({ ...m })) : p({});
1476
1566
  },
1477
- [b]
1478
- ), y = D(() => Object.keys(b).length, [b]), v = {
1479
- onSort: h,
1567
+ [m]
1568
+ ), b = z(() => Object.keys(m).length, [m]), v = {
1569
+ onSort: g,
1480
1570
  total: r,
1481
1571
  setTotal: n,
1482
- sortingBy: o,
1572
+ sortingBy: l,
1483
1573
  setSortingBy: d,
1484
1574
  sortingOrder: u,
1485
- setSortingOrder: m,
1486
- pageSize: s,
1487
- pageSizes: Vn,
1488
- setPageSize: a,
1489
- currentPage: l,
1575
+ setSortingOrder: h,
1576
+ pageSize: a,
1577
+ pageSizes: Wn,
1578
+ setPageSize: s,
1579
+ currentPage: o,
1490
1580
  setCurrentPage: c,
1491
- filters: b,
1492
- onFilterApply: f,
1493
- clearFilters: C,
1494
- countOfFilters: y
1581
+ filters: m,
1582
+ onFilterApply: x,
1583
+ clearFilters: k,
1584
+ countOfFilters: b
1495
1585
  };
1496
- return /* @__PURE__ */ i(At.Provider, { value: v, children: t });
1497
- }, oe = () => {
1498
- const e = qe(At);
1586
+ return /* @__PURE__ */ i(kt.Provider, { value: v, children: t });
1587
+ }, se = () => {
1588
+ const e = qe(kt);
1499
1589
  if (e === void 0)
1500
1590
  throw new Error("tableOptionsContext must be used within a Provider");
1501
1591
  return e;
1502
- }, Et = He(
1592
+ }, At = He(
1503
1593
  {}
1504
1594
  );
1505
1595
  function pr(e) {
1506
1596
  const { children: t, t: r, language: n } = e;
1507
- return /* @__PURE__ */ i(Et.Provider, { value: { t: r, language: n }, children: t });
1597
+ return /* @__PURE__ */ i(At.Provider, { value: { t: r, language: n }, children: t });
1508
1598
  }
1509
- const ee = () => {
1510
- const e = qe(Et);
1599
+ const X = () => {
1600
+ const e = qe(At);
1511
1601
  if (e === void 0)
1512
1602
  throw new Error("translationContext must be used within a Provider");
1513
1603
  return e;
1514
1604
  };
1515
- function Gn(e) {
1516
- const { t } = ee(), {
1605
+ function jn(e) {
1606
+ const { t } = X(), {
1517
1607
  entity: r = "",
1518
1608
  columns: n = [],
1519
- hasAction: s = !0,
1520
- onSortCallback: a,
1521
- selectionState: l,
1609
+ hasAction: a = !0,
1610
+ onSortCallback: s,
1611
+ selectionState: o,
1522
1612
  onToggleAllRows: c
1523
- } = e, o = Q(null);
1524
- V(() => {
1525
- o.current && (o.current.indeterminate = !!(l != null && l.hasSomeSelected && !(l != null && l.allSelected)));
1526
- }, [l]);
1527
- const { onSort: d, sortingOrder: u, sortingBy: m } = oe(), b = D(() => {
1528
- var g;
1529
- return (g = n.sort((h, f) => (f.pos ?? 0) - (h.pos ?? 0)).filter((h) => h.display !== "none")) == null ? void 0 : g.map((h) => ({
1530
- id: h.key,
1531
- label: h.label,
1532
- className: h.className ?? "",
1533
- sortable: h.sortable ?? !0,
1534
- sortOptions: h.sortOptions
1535
- }));
1536
- }, [n, r, t]);
1537
- return /* @__PURE__ */ i("thead", { className: "table-headers-row", children: /* @__PURE__ */ k("tr", { children: [
1613
+ } = e, l = H(null);
1614
+ j(() => {
1615
+ l.current && (l.current.indeterminate = !!(o?.hasSomeSelected && !o?.allSelected));
1616
+ }, [o]);
1617
+ const { onSort: d, sortingOrder: u, sortingBy: h } = se(), m = z(() => n.sort((p, g) => (g.pos ?? 0) - (p.pos ?? 0)).filter((p) => p.display !== "none")?.map((p) => ({
1618
+ id: p.key,
1619
+ label: p.label,
1620
+ className: p.className ?? "",
1621
+ sortable: p.sortable ?? !0,
1622
+ sortOptions: p.sortOptions
1623
+ })), [n, r, t]);
1624
+ return /* @__PURE__ */ i("thead", { className: "table-headers-row", children: /* @__PURE__ */ S("tr", { children: [
1538
1625
  /* @__PURE__ */ i("th", { scope: "col", className: "table-headers-column table-headers-checkbox", children: c ? /* @__PURE__ */ i(
1539
1626
  "input",
1540
1627
  {
1541
1628
  type: "checkbox",
1542
- ref: o,
1543
- checked: (l == null ? void 0 : l.allSelected) ?? !1,
1629
+ ref: l,
1630
+ checked: o?.allSelected ?? !1,
1544
1631
  onChange: c,
1545
1632
  "aria-label": t("_accessibility:components.table.selectAllRows")
1546
1633
  }
1547
1634
  ) : null }),
1548
- b.map((g) => {
1549
- var h, f, C, y, v, $, T, A;
1550
- return /* @__PURE__ */ i(
1551
- "th",
1552
- {
1553
- scope: "col",
1554
- className: `table-headers-column ${g.className}`,
1555
- children: /* @__PURE__ */ k(
1556
- "button",
1557
- {
1558
- disabled: !g.sortable,
1559
- onClick: () => d(g.id, a),
1560
- className: "table-headers-cell",
1561
- children: [
1562
- /* @__PURE__ */ i("span", { className: "table-headers-label", children: g.label }),
1563
- g.sortable && m === g.id && /* @__PURE__ */ i("span", { children: u === me.ASC ? ((f = (h = g.sortOptions) == null ? void 0 : h.icons) == null ? void 0 : f.asc) ?? /* @__PURE__ */ i(
1564
- zn,
1565
- {
1566
- className: ((y = (C = g.sortOptions) == null ? void 0 : C.icons) == null ? void 0 : y.className) ?? "table-headers-sort-indicator"
1567
- }
1568
- ) : (($ = (v = g.sortOptions) == null ? void 0 : v.icons) == null ? void 0 : $.desc) ?? /* @__PURE__ */ i(
1569
- Ln,
1570
- {
1571
- className: ((A = (T = g.sortOptions) == null ? void 0 : T.icons) == null ? void 0 : A.className) ?? "table-headers-sort-indicator"
1572
- }
1573
- ) })
1574
- ]
1575
- }
1576
- )
1577
- },
1578
- g.id
1579
- );
1580
- }),
1581
- s && /* @__PURE__ */ i("th", { scope: "col", className: "table-headers-action", children: t("_accessibility:labels.actions") })
1635
+ m.map((p) => /* @__PURE__ */ i(
1636
+ "th",
1637
+ {
1638
+ scope: "col",
1639
+ className: `table-headers-column ${p.className}`,
1640
+ children: /* @__PURE__ */ S(
1641
+ Wt,
1642
+ {
1643
+ disabled: !p.sortable,
1644
+ onClick: () => d(p.id, s),
1645
+ className: "table-headers-cell",
1646
+ children: [
1647
+ /* @__PURE__ */ i("span", { className: "table-headers-label", children: p.label }),
1648
+ p.sortable && h === p.id && /* @__PURE__ */ i("span", { children: u === be.ASC ? p.sortOptions?.icons?.asc ?? /* @__PURE__ */ i(
1649
+ In,
1650
+ {
1651
+ className: p.sortOptions?.icons?.className ?? "table-headers-sort-indicator"
1652
+ }
1653
+ ) : p.sortOptions?.icons?.desc ?? /* @__PURE__ */ i(
1654
+ Fn,
1655
+ {
1656
+ className: p.sortOptions?.icons?.className ?? "table-headers-sort-indicator"
1657
+ }
1658
+ ) })
1659
+ ]
1660
+ }
1661
+ )
1662
+ },
1663
+ p.id
1664
+ )),
1665
+ a && /* @__PURE__ */ i("th", { scope: "col", className: "table-headers-action", children: /* @__PURE__ */ i("span", { className: "button text default disabled", children: t("_accessibility:labels.actions") }) })
1582
1666
  ] }) });
1583
1667
  }
1584
- const Un = (e) => {
1585
- const { items: t, text: r, id: n, onClearFilter: s } = e;
1668
+ const Vn = (e) => {
1669
+ const { items: t, text: r, id: n, onClearFilter: a } = e;
1586
1670
  return /* @__PURE__ */ i(
1587
- fe,
1671
+ ue,
1588
1672
  {
1589
- text: `${r}: ${t.map((a) => a.value ?? a.name).join(", ")}`,
1590
- onDelete: () => s(n)
1673
+ text: `${r}: ${t.map((s) => s.value ?? s.name).join(", ")}`,
1674
+ onDelete: () => a(n)
1591
1675
  }
1592
1676
  );
1593
- }, Hn = (e) => {
1594
- const { end: t, start: r, text: n, id: s, onClearFilter: a } = e;
1677
+ }, Gn = (e) => {
1678
+ const { end: t, start: r, text: n, id: a, onClearFilter: s } = e;
1595
1679
  return /* @__PURE__ */ i(
1596
- fe,
1680
+ ue,
1597
1681
  {
1598
1682
  text: `${n}: ${r || "♾️"} - ${t || "♾️"}`,
1599
- onDelete: () => a(s)
1683
+ onDelete: () => s(a)
1600
1684
  }
1601
1685
  );
1602
- }, qn = (e) => {
1603
- const { filtersDefinition: t } = e, r = D(() => {
1686
+ }, Un = (e) => {
1687
+ const { filtersDefinition: t } = e, r = z(() => {
1604
1688
  const c = {};
1605
- return t.forEach((o) => {
1606
- c[o.propertyName] = o.label ?? o.propertyName;
1689
+ return t.forEach((l) => {
1690
+ c[l.propertyName] = l.label ?? l.propertyName;
1607
1691
  }), c;
1608
- }, [t]), { filters: n, clearFilters: s } = oe(), a = D(() => Object.keys(n), [n]), l = F(
1609
- (c) => {
1610
- var o, d, u, m;
1611
- return (o = n[c]) != null && o.end || (d = n[c]) != null && d.start ? /* @__PURE__ */ i(
1612
- Hn,
1613
- {
1614
- id: c,
1615
- text: r[c],
1616
- start: n[c].start,
1617
- end: n[c].end,
1618
- onClearFilter: s
1619
- }
1620
- ) : Array.isArray(n[c]) ? /* @__PURE__ */ i(
1621
- Un,
1622
- {
1623
- id: c,
1624
- text: r[c],
1625
- items: n[c],
1626
- onClearFilter: s
1627
- }
1628
- ) : /* @__PURE__ */ i(
1629
- fe,
1630
- {
1631
- text: `${r[c]}: ${((u = n[c]) == null ? void 0 : u.value) ?? ((m = n[c]) == null ? void 0 : m.name) ?? n[c]}`,
1632
- onDelete: () => s(c)
1633
- }
1634
- );
1635
- },
1692
+ }, [t]), { filters: n, clearFilters: a } = se(), s = z(() => Object.keys(n), [n]), o = T(
1693
+ (c) => n[c]?.end || n[c]?.start ? /* @__PURE__ */ i(
1694
+ Gn,
1695
+ {
1696
+ id: c,
1697
+ text: r[c],
1698
+ start: n[c].start,
1699
+ end: n[c].end,
1700
+ onClearFilter: a
1701
+ }
1702
+ ) : Array.isArray(n[c]) ? /* @__PURE__ */ i(
1703
+ Vn,
1704
+ {
1705
+ id: c,
1706
+ text: r[c],
1707
+ items: n[c],
1708
+ onClearFilter: a
1709
+ }
1710
+ ) : /* @__PURE__ */ i(
1711
+ ue,
1712
+ {
1713
+ text: `${r[c]}: ${n[c]?.value ?? n[c]?.name ?? n[c]}`,
1714
+ onDelete: () => a(c)
1715
+ }
1716
+ ),
1636
1717
  [n, r]
1637
1718
  );
1638
- return /* @__PURE__ */ i("ul", { className: "active-filters-main", children: a == null ? void 0 : a.map((c) => /* @__PURE__ */ i("li", { children: l(c) }, c)) });
1719
+ return /* @__PURE__ */ i("ul", { className: "active-filters-main", children: s?.map((c) => /* @__PURE__ */ i("li", { children: o(c) }, c)) });
1639
1720
  };
1640
- function Kn(e) {
1641
- const { propertyName: t, label: r, placeholder: n, options: s, multiple: a = !0 } = e, { currentFilters: l, setCurrentFilters: c } = Ce(), o = D(() => l[t] ?? s[0], [l]), d = F(
1721
+ function Hn(e) {
1722
+ const { propertyName: t, label: r, placeholder: n, options: a, multiple: s = !0 } = e, { currentFilters: o, setCurrentFilters: c } = Ce(), l = z(() => o[t] ?? a[0], [o]), d = T(
1642
1723
  (u) => {
1643
1724
  c({
1644
- type: K.update,
1725
+ type: q.update,
1645
1726
  toUpdate: {
1646
1727
  [t]: {
1647
1728
  value: u
@@ -1649,15 +1730,15 @@ function Kn(e) {
1649
1730
  }
1650
1731
  });
1651
1732
  },
1652
- [a]
1733
+ [s]
1653
1734
  );
1654
1735
  return /* @__PURE__ */ i(
1655
- On,
1736
+ Tn,
1656
1737
  {
1657
- value: o == null ? void 0 : o.value,
1738
+ value: l?.value,
1658
1739
  label: r,
1659
- options: s,
1660
- multiple: a,
1740
+ options: a,
1741
+ multiple: s,
1661
1742
  helperTextClassName: "hidden",
1662
1743
  containerClassName: "options-widget-container",
1663
1744
  onChange: d,
@@ -1665,25 +1746,19 @@ function Kn(e) {
1665
1746
  }
1666
1747
  );
1667
1748
  }
1668
- const Yn = (e) => {
1669
- const { propertyName: t, label: r } = e, { currentFilters: n, setCurrentFilters: s } = Ce(), a = D(() => {
1670
- var c;
1671
- return ((c = n[t]) == null ? void 0 : c.value) ?? "";
1672
- }, [n]), l = F((c) => {
1673
- s({
1674
- type: K.update,
1749
+ const qn = (e) => {
1750
+ const { propertyName: t, label: r } = e, { currentFilters: n, setCurrentFilters: a } = Ce(), s = z(() => n[t]?.value ?? "", [n]), o = T((c) => {
1751
+ a({
1752
+ type: q.update,
1675
1753
  toUpdate: { [t]: { value: c.target.checked } }
1676
1754
  });
1677
1755
  }, []);
1678
- return /* @__PURE__ */ i(Fn, { label: r, checked: a ?? !1, onChange: l });
1756
+ return /* @__PURE__ */ i(On, { label: r, checked: s ?? !1, onChange: o });
1679
1757
  };
1680
- function Zn(e) {
1681
- const { propertyName: t, options: r, label: n, placeholder: s } = e, { currentFilters: a, setCurrentFilters: l } = Ce(), c = D(() => {
1682
- var d;
1683
- return ((d = a[t]) == null ? void 0 : d.value) ?? r[0];
1684
- }, [a]), o = F((d) => {
1685
- l({
1686
- type: K.update,
1758
+ function Kn(e) {
1759
+ const { propertyName: t, options: r, label: n, placeholder: a } = e, { currentFilters: s, setCurrentFilters: o } = Ce(), c = z(() => s[t]?.value ?? r[0], [s]), l = T((d) => {
1760
+ o({
1761
+ type: q.update,
1687
1762
  toUpdate: { [t]: { value: d.target.value } }
1688
1763
  });
1689
1764
  }, []);
@@ -1695,25 +1770,22 @@ function Zn(e) {
1695
1770
  options: r,
1696
1771
  helperTextClassName: "hidden",
1697
1772
  containerClassName: "options-widget-container",
1698
- onChange: o,
1699
- placeholder: s
1773
+ onChange: l,
1774
+ placeholder: a
1700
1775
  }
1701
1776
  );
1702
1777
  }
1703
- const Jn = (e) => {
1704
- const { propertyName: t, label: r, placeholder: n } = e, { currentFilters: s, setCurrentFilters: a } = Ce(), l = D(() => {
1705
- var o;
1706
- return ((o = s[t]) == null ? void 0 : o.value) ?? "";
1707
- }, [s]), c = F((o) => {
1708
- a({
1709
- type: K.update,
1710
- toUpdate: { [t]: { value: o.target.value } }
1778
+ const Yn = (e) => {
1779
+ const { propertyName: t, label: r, placeholder: n } = e, { currentFilters: a, setCurrentFilters: s } = Ce(), o = z(() => a[t]?.value ?? "", [a]), c = T((l) => {
1780
+ s({
1781
+ type: q.update,
1782
+ toUpdate: { [t]: { value: l.target.value } }
1711
1783
  });
1712
1784
  }, []);
1713
1785
  return /* @__PURE__ */ i(
1714
1786
  Ie,
1715
1787
  {
1716
- value: l ?? "",
1788
+ value: o ?? "",
1717
1789
  label: r,
1718
1790
  onChange: c,
1719
1791
  containerClassName: "input-widget-container",
@@ -1722,39 +1794,36 @@ const Jn = (e) => {
1722
1794
  }
1723
1795
  );
1724
1796
  }, ht = (e) => {
1725
- var m, b, g, h;
1726
- const { propertyName: t, label: r, inputType: n } = e, { t: s } = ee(), { currentFilters: a, setCurrentFilters: l } = Ce(), c = Q(null), o = Q(null), d = F((f) => {
1727
- var C;
1728
- l({
1729
- type: K.update,
1797
+ const { propertyName: t, label: r, inputType: n } = e, { t: a } = X(), { currentFilters: s, setCurrentFilters: o } = Ce(), c = H(null), l = H(null), d = T((h) => {
1798
+ o({
1799
+ type: q.update,
1730
1800
  toUpdate: {
1731
1801
  [t]: {
1732
- value: { end: ((C = o == null ? void 0 : o.current) == null ? void 0 : C.value) ?? null, start: f.target.value }
1802
+ value: { end: l?.current?.value ?? null, start: h.target.value }
1733
1803
  }
1734
1804
  }
1735
1805
  });
1736
- }, []), u = F((f) => {
1737
- var C;
1738
- l({
1739
- type: K.update,
1806
+ }, []), u = T((h) => {
1807
+ o({
1808
+ type: q.update,
1740
1809
  toUpdate: {
1741
1810
  [t]: {
1742
1811
  value: {
1743
- start: ((C = c == null ? void 0 : c.current) == null ? void 0 : C.value) ?? null,
1744
- end: f.target.value
1812
+ start: c?.current?.value ?? null,
1813
+ end: h.target.value
1745
1814
  }
1746
1815
  }
1747
1816
  }
1748
1817
  });
1749
1818
  }, []);
1750
- return /* @__PURE__ */ k("div", { className: "range-widget-container", children: [
1819
+ return /* @__PURE__ */ S("div", { className: "range-widget-container", children: [
1751
1820
  /* @__PURE__ */ i("p", { className: "text-input-label input-widget-label input-label-normal", children: r }),
1752
- /* @__PURE__ */ k("div", { className: "range-widget-row", children: [
1821
+ /* @__PURE__ */ S("div", { className: "range-widget-row", children: [
1753
1822
  /* @__PURE__ */ i(
1754
1823
  Ie,
1755
1824
  {
1756
- value: ((b = (m = a[t]) == null ? void 0 : m.value) == null ? void 0 : b.start) ?? "",
1757
- placeholder: s("_accessibility:components.table.filters.range.start"),
1825
+ value: s[t]?.value?.start ?? "",
1826
+ placeholder: a("_accessibility:components.table.filters.range.start"),
1758
1827
  type: n,
1759
1828
  ref: c,
1760
1829
  onChange: d,
@@ -1765,10 +1834,10 @@ const Jn = (e) => {
1765
1834
  /* @__PURE__ */ i(
1766
1835
  Ie,
1767
1836
  {
1768
- value: ((h = (g = a[t]) == null ? void 0 : g.value) == null ? void 0 : h.end) ?? "",
1769
- placeholder: s("_accessibility:components.table.filters.range.end"),
1837
+ value: s[t]?.value?.end ?? "",
1838
+ placeholder: a("_accessibility:components.table.filters.range.end"),
1770
1839
  type: n,
1771
- ref: o,
1840
+ ref: l,
1772
1841
  onChange: u,
1773
1842
  containerClassName: "input-widget-container",
1774
1843
  helperTextClassName: ""
@@ -1776,11 +1845,11 @@ const Jn = (e) => {
1776
1845
  )
1777
1846
  ] })
1778
1847
  ] });
1779
- }, Xn = (e) => {
1848
+ }, Zn = (e) => {
1780
1849
  switch (e.type) {
1781
- case de.text:
1782
- return /* @__PURE__ */ i(Jn, { ...e });
1783
- case de.number:
1850
+ case le.text:
1851
+ return /* @__PURE__ */ i(Yn, { ...e });
1852
+ case le.number:
1784
1853
  return /* @__PURE__ */ i(
1785
1854
  ht,
1786
1855
  {
@@ -1788,7 +1857,7 @@ const Jn = (e) => {
1788
1857
  inputType: "number"
1789
1858
  }
1790
1859
  );
1791
- case de.date:
1860
+ case le.date:
1792
1861
  return /* @__PURE__ */ i(
1793
1862
  ht,
1794
1863
  {
@@ -1796,36 +1865,35 @@ const Jn = (e) => {
1796
1865
  inputType: "date"
1797
1866
  }
1798
1867
  );
1799
- case de.select:
1800
- return /* @__PURE__ */ i(Zn, { ...e });
1801
- case de.autocomplete:
1868
+ case le.select:
1802
1869
  return /* @__PURE__ */ i(Kn, { ...e });
1803
- case de.check:
1804
- return /* @__PURE__ */ i(Yn, { ...e });
1870
+ case le.autocomplete:
1871
+ return /* @__PURE__ */ i(Hn, { ...e });
1872
+ case le.check:
1873
+ return /* @__PURE__ */ i(qn, { ...e });
1805
1874
  }
1806
- return /* @__PURE__ */ i($e, {});
1807
- }, Qn = (e) => {
1808
- const { filters: t = [], show: r, handleShow: n } = e, { onFilterApply: s } = oe(), { currentFilters: a, setCurrentFilters: l } = Ce(), { t: c } = ee(), o = Q(null);
1809
- return V(() => {
1875
+ return /* @__PURE__ */ i(Se, {});
1876
+ }, Jn = (e) => {
1877
+ const { filters: t = [], show: r, handleShow: n } = e, { onFilterApply: a } = se(), { currentFilters: s, setCurrentFilters: o } = Ce(), { t: c } = X(), l = H(null);
1878
+ return j(() => {
1810
1879
  const d = ({ target: u }) => {
1811
- var m;
1812
- o.current && (!r || (m = o.current) != null && m.contains(u) || n(!1));
1880
+ l.current && (u?.closest(".filter-dropdown-trigger") || !r || l.current?.contains(u) || n(!1));
1813
1881
  };
1814
1882
  return document.addEventListener("click", d), () => document.removeEventListener("click", d);
1815
- }), V(() => {
1883
+ }, [n, r]), j(() => {
1816
1884
  const d = (u) => {
1817
1885
  !r || u.code !== "Escape" || n(!1);
1818
1886
  };
1819
1887
  return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
1820
- }), /* @__PURE__ */ i("div", { className: `filter-dropdown-backdrop ${r ? "opened" : "closed"}`, children: /* @__PURE__ */ k("div", { className: "filter-popup", ref: o, children: [
1888
+ }, [n, r]), /* @__PURE__ */ i("div", { className: `filter-dropdown-backdrop ${r ? "opened" : "closed"}`, children: /* @__PURE__ */ S("div", { className: "filter-popup", ref: l, children: [
1821
1889
  /* @__PURE__ */ i("div", { className: "filter-title", children: c("_accessibility:buttons.filters") }),
1822
- /* @__PURE__ */ i("ul", { className: "filter-container", children: t.map((d) => /* @__PURE__ */ i("li", { className: "filter-container-item", children: Xn(d) }, d.propertyName)) }),
1823
- /* @__PURE__ */ i("div", { className: "filter-footer", children: /* @__PURE__ */ k("ul", { className: "filter-buttons-row", children: [
1890
+ /* @__PURE__ */ i("ul", { className: "filter-container", children: t.map((d) => /* @__PURE__ */ i("li", { className: "filter-container-item", children: Zn(d) }, d.propertyName)) }),
1891
+ /* @__PURE__ */ i("div", { className: "filter-footer", children: /* @__PURE__ */ S("ul", { className: "filter-buttons-row", children: [
1824
1892
  /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
1825
1893
  "button",
1826
1894
  {
1827
- onClick: () => l({
1828
- type: K.reset,
1895
+ onClick: () => o({
1896
+ type: q.reset,
1829
1897
  filters: t
1830
1898
  }),
1831
1899
  className: "filter-dropdown-button small filter-dropdown-cancel",
@@ -1837,7 +1905,7 @@ const Jn = (e) => {
1837
1905
  {
1838
1906
  className: "filter-dropdown-button small filter-dropdown-submit",
1839
1907
  onClick: () => {
1840
- n(!1), s(a);
1908
+ n(!1), a(s);
1841
1909
  },
1842
1910
  onBlur: () => n(!1),
1843
1911
  children: c("_accessibility:buttons.applyFilters")
@@ -1845,615 +1913,599 @@ const Jn = (e) => {
1845
1913
  ) })
1846
1914
  ] }) })
1847
1915
  ] }) });
1848
- }, er = () => {
1849
- const { t: e } = ee(), { total: t, pageSize: r, pageSizes: n, currentPage: s } = oe(), a = (s + 1) * r > t ? t : (s + 1) * r;
1850
- return /* @__PURE__ */ k("div", { className: "table-navigation-sizes", children: [
1851
- n[0] < t && /* @__PURE__ */ i($e, { children: /* @__PURE__ */ k("p", { children: [
1852
- s * r + 1,
1916
+ }, Xn = () => {
1917
+ const { t: e } = X(), { total: t, pageSize: r, pageSizes: n, currentPage: a } = se(), s = (a + 1) * r > t ? t : (a + 1) * r;
1918
+ return /* @__PURE__ */ S("div", { className: "table-navigation-sizes", children: [
1919
+ n[0] < t && /* @__PURE__ */ i(Se, { children: /* @__PURE__ */ S("p", { children: [
1920
+ a * r + 1,
1853
1921
  " - ",
1854
- a,
1922
+ s,
1855
1923
  " ",
1856
1924
  e("_accessibility:components.table.of")
1857
1925
  ] }) }),
1858
1926
  /* @__PURE__ */ i("p", { children: t })
1859
1927
  ] });
1860
1928
  };
1861
- function tr() {
1862
- const { t: e } = ee(), { total: t, pageSize: r, currentPage: n, setCurrentPage: s } = oe(), a = D(() => {
1863
- const l = Math.ceil(t / r);
1864
- return Array.from({ length: l }, (c, o) => ({
1865
- id: o,
1866
- value: o + 1
1929
+ function Qn() {
1930
+ const { t: e } = X(), { total: t, pageSize: r, currentPage: n, setCurrentPage: a } = se(), s = z(() => {
1931
+ const o = Math.ceil(t / r);
1932
+ return Array.from({ length: o }, (c, l) => ({
1933
+ id: l,
1934
+ value: l + 1
1867
1935
  }));
1868
1936
  }, [t, r]);
1869
- return /* @__PURE__ */ k("div", { className: "jump-to-page", children: [
1937
+ return /* @__PURE__ */ S("div", { className: "jump-to-page", children: [
1870
1938
  /* @__PURE__ */ i("p", { children: e("_accessibility:components.table.jumpToPage") }),
1871
1939
  /* @__PURE__ */ i(
1872
1940
  Xe,
1873
1941
  {
1874
1942
  value: n,
1875
- options: a,
1943
+ options: s,
1876
1944
  inputClassName: "jump-to-page-input",
1877
1945
  containerClassName: "jump-to-page-input-container",
1878
1946
  helperTextClassName: "hidden",
1879
- onChange: (l) => s(Number(l.target.value))
1947
+ onChange: (o) => a(Number(o.target.value))
1880
1948
  }
1881
1949
  )
1882
1950
  ] });
1883
1951
  }
1884
- const nr = () => {
1885
- const { t: e } = ee(), { total: t, pageSize: r, currentPage: n, setCurrentPage: s } = oe();
1886
- return /* @__PURE__ */ k("div", { className: "table-navigation-pages", children: [
1952
+ const er = () => {
1953
+ const { t: e } = X(), { total: t, pageSize: r, currentPage: n, setCurrentPage: a } = se();
1954
+ return /* @__PURE__ */ S("div", { className: "table-navigation-pages", children: [
1887
1955
  /* @__PURE__ */ i(
1888
- "button",
1956
+ de,
1889
1957
  {
1958
+ icon: /* @__PURE__ */ i(Ln, { className: "w-2.5" }),
1890
1959
  className: "table-navigation-buttons",
1891
1960
  disabled: n === 0,
1892
1961
  "aria-label": e("_accessibility:buttons.previous"),
1893
1962
  name: e("_accessibility:buttons.previous"),
1894
- onClick: () => s(n - 1),
1895
- children: /* @__PURE__ */ i(In, { className: "w-2.5" })
1963
+ onClick: () => a(n - 1)
1896
1964
  }
1897
1965
  ),
1898
1966
  /* @__PURE__ */ i(
1899
- "button",
1967
+ de,
1900
1968
  {
1969
+ icon: /* @__PURE__ */ i(Mn, { className: "w-2.5" }),
1901
1970
  disabled: Math.floor(t / ((n + 1) * r)) === 0,
1902
1971
  className: "table-navigation-buttons",
1903
1972
  name: e("_accessibility:buttons.next"),
1904
1973
  "aria-label": e("_accessibility:buttons.next"),
1905
- onClick: () => s(n + 1),
1906
- children: /* @__PURE__ */ i(Dn, { className: "w-2.5" })
1974
+ onClick: () => a(n + 1)
1907
1975
  }
1908
1976
  )
1909
1977
  ] });
1910
1978
  };
1911
- function rr() {
1912
- const { t: e } = ee(), { pageSizes: t, pageSize: r, setPageSize: n } = oe(), s = D(
1913
- () => t == null ? void 0 : t.map((a) => ({ id: a, value: a })),
1979
+ function tr() {
1980
+ const { t: e } = X(), { pageSizes: t, pageSize: r, setPageSize: n } = se(), a = z(
1981
+ () => t?.map((s) => ({ id: s, value: s })),
1914
1982
  [t]
1915
1983
  );
1916
- return /* @__PURE__ */ k("div", { className: "page-size", children: [
1984
+ return /* @__PURE__ */ S("div", { className: "page-size", children: [
1917
1985
  /* @__PURE__ */ i("p", { children: e("_accessibility:components.table.pageSizes") }),
1918
1986
  /* @__PURE__ */ i(
1919
1987
  Xe,
1920
1988
  {
1921
1989
  value: r,
1922
- options: s,
1990
+ options: a,
1923
1991
  inputClassName: "page-size-input",
1924
1992
  containerClassName: "page-size-input-container",
1925
1993
  helperTextClassName: "hidden",
1926
- onChange: (a) => n(Number(a.target.value))
1994
+ onChange: (s) => n(Number(s.target.value))
1927
1995
  }
1928
1996
  )
1929
1997
  ] });
1930
1998
  }
1931
- function sr() {
1932
- return /* @__PURE__ */ k("div", { className: "table-footer", children: [
1999
+ function nr() {
2000
+ return /* @__PURE__ */ S("div", { className: "table-footer", children: [
2001
+ /* @__PURE__ */ i(Qn, {}),
1933
2002
  /* @__PURE__ */ i(tr, {}),
1934
- /* @__PURE__ */ i(rr, {}),
1935
- /* @__PURE__ */ i(er, {}),
1936
- /* @__PURE__ */ i(nr, {})
2003
+ /* @__PURE__ */ i(Xn, {}),
2004
+ /* @__PURE__ */ i(er, {})
1937
2005
  ] });
1938
2006
  }
1939
- const ar = (e) => e, ir = (e) => {
1940
- const { t } = ee(), {
2007
+ const rr = (e) => e, ar = (e) => {
2008
+ const { t } = X(), {
1941
2009
  columns: r,
1942
2010
  softDeleteProperty: n = "deletedAt",
1943
- data: s,
1944
- actions: a,
1945
- selectedRows: l,
2011
+ data: a,
2012
+ actions: s,
2013
+ selectedRows: o,
1946
2014
  expandedRows: c = [],
1947
- onRowSelectionChange: o,
2015
+ onRowSelectionChange: l,
1948
2016
  onRowExpand: d
1949
- } = e, u = D(
1950
- () => r.sort((b, g) => (g.pos ?? 0) - (b.pos ?? 0)).filter((b) => b.display !== "none"),
2017
+ } = e, u = z(
2018
+ () => r.sort((m, p) => (p.pos ?? 0) - (m.pos ?? 0)).filter((m) => m.display !== "none"),
1951
2019
  [r]
1952
- ), m = D(
2020
+ ), h = z(
1953
2021
  () => new Map(
1954
- c.map((b) => [b.rowId, b])
2022
+ c.map((m) => [m.rowId, m])
1955
2023
  ),
1956
2024
  [c]
1957
2025
  );
1958
- return s == null ? void 0 : s.map((b) => {
1959
- var y;
1960
- const g = l.has(b.id), h = m.get(b.id), f = !!h, C = u.length + 1 + (a ? 1 : 0);
1961
- return /* @__PURE__ */ k(zt, { children: [
1962
- /* @__PURE__ */ k(
2026
+ return a?.map((m) => {
2027
+ const p = o.has(m.id), g = h.get(m.id), x = !!g, k = u.length + 1 + (s ? 1 : 0);
2028
+ return /* @__PURE__ */ S(_t, { children: [
2029
+ /* @__PURE__ */ S(
1963
2030
  "tr",
1964
2031
  {
1965
- className: `table-row ${d ? "expandable" : ""} ${b[n] ? "deleted-class" : ""} ${g ? "selected" : ""} ${f ? "expanded" : ""}`,
1966
- onClick: () => d == null ? void 0 : d(b),
2032
+ className: `table-row ${d ? "expandable" : ""} ${m[n] ? "deleted-class" : ""} ${p ? "selected" : ""} ${x ? "expanded" : ""}`,
2033
+ onClick: () => d?.(m),
1967
2034
  children: [
1968
2035
  /* @__PURE__ */ i("td", { className: "table-row-cell table-row-checkbox", children: /* @__PURE__ */ i(
1969
2036
  "input",
1970
2037
  {
1971
2038
  type: "checkbox",
1972
- checked: g,
1973
- onClick: (v) => v.stopPropagation(),
1974
- onChange: () => o(b),
2039
+ checked: p,
2040
+ onClick: (b) => b.stopPropagation(),
2041
+ onChange: () => l(m),
1975
2042
  "aria-label": t("_accessibility:components.table.selectRow")
1976
2043
  }
1977
2044
  ) }),
1978
- u == null ? void 0 : u.map((v, $) => /* @__PURE__ */ i(
2045
+ u?.map((b, v) => /* @__PURE__ */ i(
1979
2046
  "td",
1980
2047
  {
1981
- className: `table-row-cell ${$ === 0 ? "basic" : ""} ${v.className ?? ""}`,
1982
- children: v.renderBody ? v.renderBody(b[v.key], b) : ar(b[v.key])
2048
+ className: `table-row-cell ${v === 0 ? "basic" : ""} ${b.className ?? ""}`,
2049
+ children: b.renderBody ? b.renderBody(m[b.key], m) : rr(m[b.key])
1983
2050
  },
1984
- v.key
2051
+ b.key
1985
2052
  )),
1986
- a ? /* @__PURE__ */ i("td", { children: /* @__PURE__ */ i("div", { className: "table-row-cell-action", children: (y = a(b).filter((v) => !v.hidden)) == null ? void 0 : y.map((v) => /* @__PURE__ */ i(Rt, { content: v.tooltip, children: /* @__PURE__ */ i(
1987
- "button",
2053
+ s ? /* @__PURE__ */ i("td", { children: /* @__PURE__ */ i("div", { className: "table-row-cell-action", children: s(m).filter((b) => !b.hidden)?.map((b) => /* @__PURE__ */ i(Tt, { content: b.tooltip, children: /* @__PURE__ */ i(
2054
+ de,
1988
2055
  {
1989
- onClick: ($) => {
1990
- $.stopPropagation(), v.onClick(b);
1991
- },
1992
- children: v.icon
2056
+ icon: b.icon,
2057
+ className: "row-table-action",
2058
+ onClick: (v) => {
2059
+ v.stopPropagation(), b.onClick(m);
2060
+ }
1993
2061
  }
1994
- ) }, v.id)) }) }) : null
2062
+ ) }, b.id)) }) }) : null
1995
2063
  ]
1996
2064
  }
1997
2065
  ),
1998
- f && (h == null ? void 0 : h.content) !== null && typeof (h == null ? void 0 : h.content) < "u" && /* @__PURE__ */ i("tr", { className: "table-row-expanded", children: /* @__PURE__ */ i("td", { className: "table-row-expanded-cell", colSpan: C, children: /* @__PURE__ */ i(
2066
+ x && g?.content !== null && typeof g?.content < "u" && /* @__PURE__ */ i("tr", { className: "table-row-expanded", children: /* @__PURE__ */ i("td", { className: "table-row-expanded-cell", colSpan: k, children: /* @__PURE__ */ i(
1999
2067
  "div",
2000
2068
  {
2001
- className: `table-row-expanded-content ${h.isVisible ? "open" : "closed"}`,
2002
- children: /* @__PURE__ */ i("div", { className: "table-row-expanded-inner", children: h.content })
2069
+ className: `table-row-expanded-content ${g.isVisible ? "open" : "closed"}`,
2070
+ children: /* @__PURE__ */ i("div", { className: "table-row-expanded-inner", children: g.content })
2003
2071
  }
2004
2072
  ) }) })
2005
- ] }, b.id);
2073
+ ] }, m.id);
2006
2074
  });
2007
2075
  };
2008
- function cr() {
2009
- const { t: e } = ee();
2076
+ function sr() {
2077
+ const { t: e } = X();
2010
2078
  return /* @__PURE__ */ i("div", { className: "table-empty", children: /* @__PURE__ */ i("p", { children: e("_accessibility:components.table.empty") }) });
2011
2079
  }
2012
- const lr = (e) => {
2013
- var g, h;
2014
- const { columns: t, title: r, isLoading: n, toolbar: s, filterOptions: a } = e, { countOfFilters: l } = oe(), { t: c } = ee(), o = D(() => t ? t.sort((f, C) => (C.pos ?? 0) - (f.pos ?? 0)).filter((f) => !!f.filterOptions).map((f) => {
2015
- var C;
2016
- return {
2017
- ...f.filterOptions,
2018
- label: ((C = f.filterOptions) == null ? void 0 : C.label) ?? f.label,
2019
- propertyName: f.key
2020
- };
2021
- }) : [], [t]), [d, u] = I(!1), m = F(
2022
- (f) => {
2023
- var C, y;
2024
- ((y = (C = a == null ? void 0 : a.dropdown) == null ? void 0 : C.setOpened) == null ? void 0 : y.call(C, f ?? !1)) ?? u(f ?? !1);
2025
- },
2026
- [a, d]
2027
- ), b = D(
2028
- () => {
2029
- var f;
2030
- return ((f = a == null ? void 0 : a.dropdown) == null ? void 0 : f.opened) ?? d;
2080
+ const ir = (e) => {
2081
+ const { columns: t, title: r, isLoading: n, toolbar: a, filterOptions: s } = e, { countOfFilters: o } = se(), { t: c } = X(), l = z(() => t ? t.sort((p, g) => (g.pos ?? 0) - (p.pos ?? 0)).filter((p) => !!p.filterOptions).map((p) => ({
2082
+ ...p.filterOptions,
2083
+ label: p.filterOptions?.label ?? p.label,
2084
+ propertyName: p.key
2085
+ })) : [], [t]), [d, u] = D(!1), h = T(
2086
+ (p) => {
2087
+ s?.dropdown?.setOpened ? s.dropdown.setOpened(p ?? !1) : u(p ?? !1);
2031
2088
  },
2032
- [a, d]
2089
+ [s]
2090
+ ), m = z(
2091
+ () => s?.dropdown?.opened ?? d,
2092
+ [s, d]
2033
2093
  );
2034
- return /* @__PURE__ */ k("div", { className: `table-header ${b ? "showing-filters" : ""}`, children: [
2035
- /* @__PURE__ */ k("div", { children: [
2094
+ return /* @__PURE__ */ S("div", { className: `table-header ${m ? "showing-filters" : ""}`, children: [
2095
+ /* @__PURE__ */ S("div", { children: [
2036
2096
  r && /* @__PURE__ */ i("h1", { className: "table-header-title", children: r }),
2037
- n ? null : /* @__PURE__ */ k("div", { className: "table-header-content", children: [
2038
- s,
2039
- ((g = a == null ? void 0 : a.button) == null ? void 0 : g.hide) !== !0 && /* @__PURE__ */ k(
2040
- "button",
2097
+ n ? null : /* @__PURE__ */ S("div", { className: "table-header-content", children: [
2098
+ a,
2099
+ s?.button?.hide !== !0 && /* @__PURE__ */ S(
2100
+ de,
2041
2101
  {
2102
+ icon: s?.button?.icon ?? /* @__PURE__ */ i(zn, { className: "filter-dropdown-trigger-icon" }),
2042
2103
  className: "filter-dropdown-button normal filter-dropdown-trigger",
2043
2104
  "aria-haspopup": "true",
2044
- onClick: () => {
2045
- var f;
2046
- return m(
2047
- ((f = a == null ? void 0 : a.dropdown) == null ? void 0 : f.opened) ?? !d
2048
- );
2049
- },
2050
- "aria-expanded": b,
2105
+ onClick: () => h(!m),
2106
+ "aria-expanded": m,
2051
2107
  children: [
2052
2108
  /* @__PURE__ */ i(
2053
- _t,
2109
+ Bt,
2054
2110
  {
2055
- count: l,
2056
- className: `${l > 0 ? "show" : "hide"} `
2111
+ count: o,
2112
+ className: `${o > 0 ? "show" : "hide"} `
2057
2113
  }
2058
2114
  ),
2059
2115
  /* @__PURE__ */ i("span", { className: "sr-only", children: c("_accessibility:buttons.filters") }),
2060
- /* @__PURE__ */ i("wbr", {}),
2061
- ((h = a == null ? void 0 : a.button) == null ? void 0 : h.icon) ?? /* @__PURE__ */ i(Wn, { className: "filter-dropdown-trigger-icon" })
2116
+ /* @__PURE__ */ i("wbr", {})
2062
2117
  ]
2063
2118
  }
2064
2119
  )
2065
2120
  ] })
2066
2121
  ] }),
2067
- !!o && !!o.length && /* @__PURE__ */ i(
2068
- Qn,
2122
+ !!l && !!l.length && /* @__PURE__ */ i(
2123
+ Jn,
2069
2124
  {
2070
- filters: o,
2071
- show: b,
2072
- handleShow: m,
2073
- options: a
2125
+ filters: l,
2126
+ show: m,
2127
+ handleShow: h,
2128
+ options: s
2074
2129
  }
2075
2130
  ),
2076
- /* @__PURE__ */ i(qn, { filtersDefinition: o })
2131
+ /* @__PURE__ */ i(Un, { filtersDefinition: l })
2077
2132
  ] });
2078
- };
2079
- const Ve = 220;
2080
- function mr(e) {
2133
+ }, Ve = 220;
2134
+ function hr(e) {
2081
2135
  const {
2082
2136
  data: t,
2083
2137
  onSort: r,
2084
2138
  entity: n = "",
2085
- isLoading: s = !1,
2086
- actions: a,
2087
- columns: l = [],
2139
+ isLoading: a = !1,
2140
+ actions: s,
2141
+ columns: o = [],
2088
2142
  contentClassName: c = "",
2089
- className: o = "",
2143
+ className: l = "",
2090
2144
  softDeleteProperty: d = "deletedAt",
2091
2145
  onRowSelect: u,
2092
- onSelectedRowsChange: m,
2093
- allowMultipleExpandedRows: b = !1,
2094
- expandedRowId: g,
2095
- onExpandedRowChange: h,
2096
- onRowExpand: f,
2097
- ...C
2098
- } = e, { t: y } = ee(), [v, $] = I(/* @__PURE__ */ new Set()), [T, A] = I(null), [P, N] = I(null), [q, we] = I(null), [ue, ce] = I(null), [xe, le] = I(!1), [ye, w] = I(/* @__PURE__ */ new Set()), [z, _] = I([]), Y = Q(null), te = Q(null), he = Q(/* @__PURE__ */ new Map()), ne = typeof g < "u", re = b && !ne, G = ne ? g ?? null : T, Tt = D(() => !(t != null && t.length), [t]), Z = D(
2099
- () => (t == null ? void 0 : t.filter((p) => v.has(p.id))) ?? [],
2146
+ onSelectedRowsChange: h,
2147
+ allowMultipleExpandedRows: m = !1,
2148
+ expandedRowId: p,
2149
+ onExpandedRowChange: g,
2150
+ onRowExpand: x,
2151
+ ...k
2152
+ } = e, { t: b } = X(), [v, R] = D(/* @__PURE__ */ new Set()), [L, O] = D(null), [P, N] = D(null), [Q, xe] = D(null), [ce, ae] = D(null), [C, F] = D(!1), [K, Ne] = D(/* @__PURE__ */ new Set()), [et, fe] = D([]), pe = H(null), oe = H(null), he = H(/* @__PURE__ */ new Map()), ee = typeof p < "u", te = m && !ee, V = ee ? p ?? null : L, Ot = z(() => !t?.length, [t]), Y = z(
2153
+ () => t?.filter((f) => v.has(f.id)) ?? [],
2100
2154
  [t, v]
2101
- ), pe = F(
2102
- (p) => p === null ? null : t.find((x) => x.id === p) ?? null,
2155
+ ), me = T(
2156
+ (f) => f === null ? null : t.find((w) => w.id === f) ?? null,
2103
2157
  [t]
2104
- ), Te = F(() => {
2105
- te.current && (clearTimeout(te.current), te.current = null);
2106
- }, []), J = F(
2107
- (p) => {
2108
- if (typeof p < "u") {
2109
- const x = he.current.get(p);
2110
- if (!x)
2111
- return;
2112
- clearTimeout(x), he.current.delete(p);
2158
+ ), Ae = T(() => {
2159
+ oe.current && (clearTimeout(oe.current), oe.current = null);
2160
+ }, []), Z = T(
2161
+ (f) => {
2162
+ if (typeof f < "u") {
2163
+ const w = he.current.get(f);
2164
+ if (!w) return;
2165
+ clearTimeout(w), he.current.delete(f);
2113
2166
  return;
2114
2167
  }
2115
2168
  he.current.forEach(
2116
- (x) => clearTimeout(x)
2169
+ (w) => clearTimeout(w)
2117
2170
  ), he.current.clear();
2118
2171
  },
2119
2172
  []
2120
- ), et = F(
2121
- (p) => {
2122
- J(p), _((x) => x.some(
2123
- (O) => O.rowId === p
2124
- ) ? x.map(
2125
- (O) => O.rowId === p ? { ...O, isVisible: !1 } : O
2126
- ) : x), he.current.set(
2127
- p,
2173
+ ), tt = T(
2174
+ (f) => {
2175
+ Z(f), fe((w) => w.some(
2176
+ (A) => A.rowId === f
2177
+ ) ? w.map(
2178
+ (A) => A.rowId === f ? { ...A, isVisible: !1 } : A
2179
+ ) : w), he.current.set(
2180
+ f,
2128
2181
  setTimeout(() => {
2129
- _(
2130
- (x) => x.filter((S) => S.rowId !== p)
2131
- ), he.current.delete(p);
2182
+ fe(
2183
+ (w) => w.filter((y) => y.rowId !== f)
2184
+ ), he.current.delete(f);
2132
2185
  }, Ve)
2133
2186
  );
2134
2187
  },
2135
- [J]
2136
- ), tt = F(
2137
- (p, x) => {
2138
- J(p), _((S) => S.some(
2139
- (L) => L.rowId === p
2140
- ) ? S.map(
2141
- (L) => L.rowId === p ? { ...L, content: x, isVisible: !1 } : L
2142
- ) : [...S, { rowId: p, content: x, isVisible: !1 }]), requestAnimationFrame(() => {
2143
- _(
2144
- (S) => S.map(
2145
- (O) => O.rowId === p ? { ...O, isVisible: !0 } : O
2188
+ [Z]
2189
+ ), nt = T(
2190
+ (f, w) => {
2191
+ Z(f), fe((y) => y.some(
2192
+ (I) => I.rowId === f
2193
+ ) ? y.map(
2194
+ (I) => I.rowId === f ? { ...I, content: w, isVisible: !1 } : I
2195
+ ) : [...y, { rowId: f, content: w, isVisible: !1 }]), requestAnimationFrame(() => {
2196
+ fe(
2197
+ (y) => y.map(
2198
+ (A) => A.rowId === f ? { ...A, isVisible: !0 } : A
2146
2199
  )
2147
2200
  );
2148
2201
  });
2149
2202
  },
2150
- [J]
2203
+ [Z]
2151
2204
  );
2152
- V(() => {
2153
- if (!(t != null && t.length)) {
2154
- $(/* @__PURE__ */ new Set());
2205
+ j(() => {
2206
+ if (!t?.length) {
2207
+ R(/* @__PURE__ */ new Set());
2155
2208
  return;
2156
2209
  }
2157
- $((p) => {
2158
- const x = /* @__PURE__ */ new Set(), S = new Set(t.map((O) => O.id));
2159
- return p.forEach((O) => {
2160
- S.has(O) && x.add(O);
2161
- }), x;
2210
+ R((f) => {
2211
+ const w = /* @__PURE__ */ new Set(), y = new Set(t.map((A) => A.id));
2212
+ return f.forEach((A) => {
2213
+ y.has(A) && w.add(A);
2214
+ }), w;
2162
2215
  });
2163
- }, [t]), V(() => {
2164
- if (!re)
2165
- return;
2166
- const p = new Set(t.map((x) => x.id));
2167
- w((x) => {
2168
- const S = /* @__PURE__ */ new Set();
2169
- return x.forEach((O) => {
2170
- if (p.has(O)) {
2171
- S.add(O);
2216
+ }, [t]), j(() => {
2217
+ if (!te) return;
2218
+ const f = new Set(t.map((w) => w.id));
2219
+ Ne((w) => {
2220
+ const y = /* @__PURE__ */ new Set();
2221
+ return w.forEach((A) => {
2222
+ if (f.has(A)) {
2223
+ y.add(A);
2172
2224
  return;
2173
2225
  }
2174
- J(O);
2175
- }), S;
2176
- }), _((x) => (x.forEach((S) => {
2177
- p.has(S.rowId) || J(S.rowId);
2178
- }), x.filter(
2179
- (S) => p.has(S.rowId)
2226
+ Z(A);
2227
+ }), y;
2228
+ }), fe((w) => (w.forEach((y) => {
2229
+ f.has(y.rowId) || Z(y.rowId);
2230
+ }), w.filter(
2231
+ (y) => f.has(y.rowId)
2180
2232
  )));
2181
- }, [t, re, J]), V(() => {
2182
- if (re)
2183
- return;
2184
- if (G === null) {
2185
- N(null), ne && (Y.current = null);
2233
+ }, [t, te, Z]), j(() => {
2234
+ if (te) return;
2235
+ if (V === null) {
2236
+ N(null), ee && (pe.current = null);
2186
2237
  return;
2187
2238
  }
2188
- pe(G) || (ne || A(null), N(null), ne && (Y.current = null));
2239
+ me(V) || (ee || O(null), N(null), ee && (pe.current = null));
2189
2240
  }, [
2190
2241
  t,
2191
- G,
2192
- pe,
2193
- ne,
2194
- re
2195
- ]), V(() => {
2196
- if (!re) {
2197
- if (Te(), G === null || P === null) {
2198
- if (q === null) {
2199
- le(!1), ce(null);
2242
+ V,
2243
+ me,
2244
+ ee,
2245
+ te
2246
+ ]), j(() => {
2247
+ if (!te) {
2248
+ if (Ae(), V === null || P === null) {
2249
+ if (Q === null) {
2250
+ F(!1), ae(null);
2200
2251
  return;
2201
2252
  }
2202
- le(!1), te.current = setTimeout(() => {
2203
- we(null), ce(null), te.current = null;
2253
+ F(!1), oe.current = setTimeout(() => {
2254
+ xe(null), ae(null), oe.current = null;
2204
2255
  }, Ve);
2205
2256
  return;
2206
2257
  }
2207
- if (q === null) {
2208
- we(G), ce(P), requestAnimationFrame(() => le(!0));
2258
+ if (Q === null) {
2259
+ xe(V), ae(P), requestAnimationFrame(() => F(!0));
2209
2260
  return;
2210
2261
  }
2211
- if (q === G) {
2212
- ce(P), requestAnimationFrame(() => le(!0));
2262
+ if (Q === V) {
2263
+ ae(P), requestAnimationFrame(() => F(!0));
2213
2264
  return;
2214
2265
  }
2215
- le(!1), te.current = setTimeout(() => {
2216
- we(G), ce(P), requestAnimationFrame(() => le(!0)), te.current = null;
2266
+ F(!1), oe.current = setTimeout(() => {
2267
+ xe(V), ae(P), requestAnimationFrame(() => F(!0)), oe.current = null;
2217
2268
  }, Ve);
2218
2269
  }
2219
2270
  }, [
2220
- Te,
2271
+ Ae,
2221
2272
  P,
2222
- G,
2223
- re,
2224
- q
2225
- ]), V(
2273
+ V,
2274
+ te,
2275
+ Q
2276
+ ]), j(
2226
2277
  () => () => {
2227
- Te(), J();
2278
+ Ae(), Z();
2228
2279
  },
2229
- [Te, J]
2230
- ), V(() => {
2231
- if (!ne)
2232
- return;
2233
- if (G === null) {
2234
- N(null), Y.current = null;
2280
+ [Ae, Z]
2281
+ ), j(() => {
2282
+ if (!ee) return;
2283
+ if (V === null) {
2284
+ N(null), pe.current = null;
2235
2285
  return;
2236
2286
  }
2237
- const p = pe(G);
2238
- if (!p) {
2239
- N(null), Y.current = null;
2287
+ const f = me(V);
2288
+ if (!f) {
2289
+ N(null), pe.current = null;
2240
2290
  return;
2241
2291
  }
2242
- const x = Y.current;
2243
- N((f == null ? void 0 : f(p, x)) ?? null), Y.current = p;
2244
- }, [G, pe, ne, f]);
2245
- const Pt = F(
2246
- (p) => {
2247
- $((x) => {
2248
- const S = new Set(x);
2249
- return S.has(p.id) ? (S.delete(p.id), u == null || u(p, !1)) : (S.add(p.id), u == null || u(p, !0)), S;
2292
+ const w = pe.current;
2293
+ N(x?.(f, w) ?? null), pe.current = f;
2294
+ }, [V, me, ee, x]);
2295
+ const Pt = T(
2296
+ (f) => {
2297
+ R((w) => {
2298
+ const y = new Set(w);
2299
+ return y.has(f.id) ? (y.delete(f.id), u?.(f, !1)) : (y.add(f.id), u?.(f, !0)), y;
2250
2300
  });
2251
2301
  },
2252
2302
  [u]
2253
- ), Ot = F(
2254
- (p) => {
2255
- if (re) {
2256
- if (ye.has(p.id)) {
2257
- w((W) => {
2258
- const X = new Set(W);
2259
- return X.delete(p.id), X;
2260
- }), et(p.id), h == null || h(null, p);
2303
+ ), Ft = T(
2304
+ (f) => {
2305
+ if (te) {
2306
+ if (K.has(f.id)) {
2307
+ Ne((_) => {
2308
+ const J = new Set(_);
2309
+ return J.delete(f.id), J;
2310
+ }), tt(f.id), g?.(null, f);
2261
2311
  return;
2262
2312
  }
2263
- w((W) => {
2264
- const X = new Set(W);
2265
- return X.add(p.id), X;
2313
+ Ne((_) => {
2314
+ const J = new Set(_);
2315
+ return J.add(f.id), J;
2266
2316
  });
2267
- const L = (f == null ? void 0 : f(p, null)) ?? null;
2268
- L !== null && typeof L < "u" ? tt(p.id, L) : (J(p.id), _(
2269
- (W) => W.filter((X) => X.rowId !== p.id)
2270
- )), h == null || h(p, null);
2317
+ const I = x?.(f, null) ?? null;
2318
+ I !== null && typeof I < "u" ? nt(f.id, I) : (Z(f.id), fe(
2319
+ (_) => _.filter((J) => J.rowId !== f.id)
2320
+ )), g?.(f, null);
2271
2321
  return;
2272
2322
  }
2273
- const x = G === p.id, S = x ? p : pe(G);
2274
- if (ne) {
2275
- h == null || h(x ? null : p, S);
2323
+ const w = V === f.id, y = w ? f : me(V);
2324
+ if (ee) {
2325
+ g?.(w ? null : f, y);
2276
2326
  return;
2277
2327
  }
2278
- if (x) {
2279
- A(null), N(null), h == null || h(null, p);
2328
+ if (w) {
2329
+ O(null), N(null), g?.(null, f);
2280
2330
  return;
2281
2331
  }
2282
- A(p.id), N((f == null ? void 0 : f(p, S)) ?? null), h == null || h(p, S);
2332
+ O(f.id), N(x?.(f, y) ?? null), g?.(f, y);
2283
2333
  },
2284
2334
  [
2285
- G,
2286
- et,
2287
- J,
2335
+ V,
2288
2336
  tt,
2289
- pe,
2290
- ye,
2291
- ne,
2292
- re,
2293
- h,
2294
- f
2337
+ Z,
2338
+ nt,
2339
+ me,
2340
+ K,
2341
+ ee,
2342
+ te,
2343
+ g,
2344
+ x
2295
2345
  ]
2296
- ), Ft = F(() => {
2297
- $((p) => {
2298
- const x = new Set(p), S = t ?? [], O = S.every(
2299
- (L) => x.has(L.id)
2346
+ ), Lt = T(() => {
2347
+ R((f) => {
2348
+ const w = new Set(f), y = t ?? [], A = y.every(
2349
+ (I) => w.has(I.id)
2300
2350
  );
2301
- return S.forEach((L) => {
2302
- const W = x.has(L.id);
2303
- O ? W && (x.delete(L.id), u == null || u(L, !1)) : W || (x.add(L.id), u == null || u(L, !0));
2304
- }), x;
2351
+ return y.forEach((I) => {
2352
+ const _ = w.has(I.id);
2353
+ A ? _ && (w.delete(I.id), u?.(I, !1)) : _ || (w.add(I.id), u?.(I, !0));
2354
+ }), w;
2305
2355
  });
2306
- }, [t, u]), Mt = D(() => {
2307
- if (!(t != null && t.length))
2356
+ }, [t, u]), Mt = z(() => {
2357
+ if (!t?.length)
2308
2358
  return { allSelected: !1, hasSomeSelected: !1 };
2309
- const p = t.every((S) => v.has(S.id)), x = t.some((S) => v.has(S.id));
2310
- return { allSelected: p, hasSomeSelected: x };
2359
+ const f = t.every((y) => v.has(y.id)), w = t.some((y) => v.has(y.id));
2360
+ return { allSelected: f, hasSomeSelected: w };
2311
2361
  }, [t, v]);
2312
- V(() => {
2313
- m && m(Z);
2314
- }, [Z, m]);
2315
- const nt = D(() => !a || !Z.length ? [] : Z.reduce(
2316
- (p, x, S) => {
2317
- const O = a(x).filter(
2318
- (W) => W.multiple && !W.hidden
2362
+ j(() => {
2363
+ h && h(Y);
2364
+ }, [Y, h]);
2365
+ const rt = z(() => !s || !Y.length ? [] : Y.reduce(
2366
+ (f, w, y) => {
2367
+ const A = s(w).filter(
2368
+ (_) => _.multiple && !_.hidden
2319
2369
  );
2320
- if (S === 0)
2321
- return O;
2322
- const L = new Map(
2323
- p.map((W) => [W.id, W])
2370
+ if (y === 0) return A;
2371
+ const I = new Map(
2372
+ f.map((_) => [_.id, _])
2324
2373
  );
2325
- return O.reduce((W, X) => {
2326
- const We = L.get(X.id);
2327
- return We && W.push({
2328
- ...We,
2329
- ...X,
2330
- disabled: X.disabled || We.disabled
2331
- }), W;
2374
+ return A.reduce((_, J) => {
2375
+ const Be = I.get(J.id);
2376
+ return Be && _.push({
2377
+ ...Be,
2378
+ ...J,
2379
+ disabled: J.disabled || Be.disabled
2380
+ }), _;
2332
2381
  }, []);
2333
2382
  },
2334
2383
  []
2335
- ), [a, Z]), Lt = F(
2336
- (p) => {
2337
- if (Z.length) {
2338
- if (p.onMultipleClick) {
2339
- p.onMultipleClick(Z);
2384
+ ), [s, Y]), It = T(
2385
+ (f) => {
2386
+ if (Y.length) {
2387
+ if (f.onMultipleClick) {
2388
+ f.onMultipleClick(Y);
2340
2389
  return;
2341
2390
  }
2342
- Z.forEach((x) => p.onClick(x));
2391
+ Y.forEach((w) => f.onClick(w));
2343
2392
  }
2344
2393
  },
2345
- [Z]
2346
- ), It = D(() => re ? z : q === null || ue === null || typeof ue > "u" ? [] : [
2394
+ [Y]
2395
+ ), Dt = z(() => te ? et : Q === null || ce === null || typeof ce > "u" ? [] : [
2347
2396
  {
2348
- rowId: q,
2349
- content: ue,
2350
- isVisible: xe
2397
+ rowId: Q,
2398
+ content: ce,
2399
+ isVisible: C
2351
2400
  }
2352
2401
  ], [
2353
- xe,
2354
- re,
2355
- ue,
2356
- q,
2357
- z
2402
+ C,
2403
+ te,
2404
+ ce,
2405
+ Q,
2406
+ et
2358
2407
  ]);
2359
- return /* @__PURE__ */ i(jn, { children: /* @__PURE__ */ k("div", { className: `${o} table-main`, children: [
2360
- /* @__PURE__ */ i(lr, { columns: l, isLoading: s, ...C }),
2361
- s ? /* @__PURE__ */ i(Mn, { className: "table-loading" }) : /* @__PURE__ */ i($e, { children: Tt ? /* @__PURE__ */ i(cr, {}) : /* @__PURE__ */ k($e, { children: [
2362
- !!Z.length && /* @__PURE__ */ k("div", { className: "table-selection-bar", children: [
2363
- /* @__PURE__ */ i("p", { className: "table-selection-bar-count", children: y("_accessibility:components.table.selectedCount", {
2364
- count: Z.length
2408
+ return /* @__PURE__ */ i(Bn, { children: /* @__PURE__ */ S("div", { className: `${l} table-main`, children: [
2409
+ /* @__PURE__ */ i(ir, { columns: o, isLoading: a, ...k }),
2410
+ a ? /* @__PURE__ */ i(Pn, { className: "table-loading" }) : /* @__PURE__ */ i(Se, { children: Ot ? /* @__PURE__ */ i(sr, {}) : /* @__PURE__ */ S(Se, { children: [
2411
+ !!Y.length && /* @__PURE__ */ S("div", { className: "table-selection-bar", children: [
2412
+ /* @__PURE__ */ i("p", { className: "table-selection-bar-count", children: b("_accessibility:components.table.selectedCount", {
2413
+ count: Y.length
2365
2414
  }) }),
2366
- nt.length > 0 && /* @__PURE__ */ i("div", { className: "table-selection-bar-actions", children: nt.map((p) => /* @__PURE__ */ i(Rt, { content: p.tooltip, children: /* @__PURE__ */ i(
2367
- "button",
2415
+ rt.length > 0 && /* @__PURE__ */ i("div", { className: "table-selection-bar-actions", children: rt.map((f) => /* @__PURE__ */ i(Tt, { content: f.tooltip, children: /* @__PURE__ */ i(
2416
+ de,
2368
2417
  {
2369
- type: "button",
2370
- onClick: () => Lt(p),
2371
- disabled: p.disabled,
2372
- children: p.icon
2418
+ icon: f.icon,
2419
+ className: "multi-table-action",
2420
+ onClick: () => It(f),
2421
+ disabled: f.disabled
2373
2422
  }
2374
- ) }, p.id)) })
2423
+ ) }, f.id)) })
2375
2424
  ] }),
2376
- /* @__PURE__ */ i("div", { className: `${c} table-body`, children: /* @__PURE__ */ k("table", { className: "table-content", children: [
2425
+ /* @__PURE__ */ i("div", { className: `${c} table-body`, children: /* @__PURE__ */ S("table", { className: "table-content", children: [
2377
2426
  /* @__PURE__ */ i(
2378
- Gn,
2427
+ jn,
2379
2428
  {
2380
2429
  entity: n,
2381
- columns: l,
2430
+ columns: o,
2382
2431
  onSortCallback: r,
2383
- hasAction: !!a,
2432
+ hasAction: !!s,
2384
2433
  selectionState: Mt,
2385
- onToggleAllRows: Ft
2434
+ onToggleAllRows: Lt
2386
2435
  }
2387
2436
  ),
2388
2437
  /* @__PURE__ */ i("tbody", { children: /* @__PURE__ */ i(
2389
- ir,
2438
+ ar,
2390
2439
  {
2391
2440
  data: t,
2392
- actions: a,
2393
- columns: l,
2441
+ actions: s,
2442
+ columns: o,
2394
2443
  softDeleteProperty: d,
2395
2444
  selectedRows: v,
2396
- expandedRows: It,
2445
+ expandedRows: Dt,
2397
2446
  onRowSelectionChange: Pt,
2398
- onRowExpand: f ? Ot : void 0
2447
+ onRowExpand: x ? Ft : void 0
2399
2448
  }
2400
2449
  ) })
2401
2450
  ] }) }),
2402
- /* @__PURE__ */ i(sr, {})
2451
+ /* @__PURE__ */ i(nr, {})
2403
2452
  ] }) })
2404
2453
  ] }) });
2405
2454
  }
2406
- function Rt(e) {
2455
+ function Tt(e) {
2407
2456
  const { content: t, children: r, className: n = "" } = e;
2408
- return /* @__PURE__ */ k("div", { className: `tooltip-container ${n}`, children: [
2457
+ return /* @__PURE__ */ S("div", { className: `tooltip-container ${n}`, children: [
2409
2458
  r,
2410
2459
  /* @__PURE__ */ i("div", { className: "tooltip-text", children: t })
2411
2460
  ] });
2412
2461
  }
2413
2462
  export {
2414
- qn as ActiveFilters,
2415
- Un as ArrayChip,
2416
- On as AutocompleteInput,
2417
- _t as Badge,
2418
- Fn as CheckInput,
2419
- Ln as ChevronDown,
2420
- In as ChevronLeft,
2421
- Dn as ChevronRight,
2422
- zn as ChevronUp,
2423
- fe as Chip,
2463
+ Un as ActiveFilters,
2464
+ Vn as ArrayChip,
2465
+ Tn as AutocompleteInput,
2466
+ Bt as Badge,
2467
+ Wt as Button,
2468
+ On as CheckInput,
2469
+ Fn as ChevronDown,
2470
+ Ln as ChevronLeft,
2471
+ Mn as ChevronRight,
2472
+ In as ChevronUp,
2473
+ ue as Chip,
2424
2474
  Qe as Close,
2425
- Gn as Columns,
2426
- er as CountOfTotal,
2427
- _n as File,
2428
- fr as FileInput,
2429
- Qn as FilterDropdown,
2430
- de as FilterTypes,
2431
- Wn as Filters,
2432
- K as FiltersActions,
2433
- jn as FiltersProvider,
2434
- sr as Footer,
2435
- Mn as Loading,
2436
- nr as Navigation,
2437
- rr as PageSize,
2438
- Hn as RangeChip,
2439
- ir as Rows,
2475
+ jn as Columns,
2476
+ Xn as CountOfTotal,
2477
+ ur as Dropdown,
2478
+ Dn as File,
2479
+ dr as FileInput,
2480
+ Jn as FilterDropdown,
2481
+ le as FilterTypes,
2482
+ zn as Filters,
2483
+ q as FiltersActions,
2484
+ Bn as FiltersProvider,
2485
+ nr as Footer,
2486
+ de as IconButton,
2487
+ Pn as Loading,
2488
+ er as Navigation,
2489
+ tr as PageSize,
2490
+ Gn as RangeChip,
2491
+ ar as Rows,
2440
2492
  Xe as SelectInput,
2441
- me as SortOrder,
2493
+ be as SortOrder,
2442
2494
  Je as State,
2443
- mr as Table,
2444
- cr as TableEmpty,
2445
- lr as TableHeader,
2446
- hr as TableOptionsProvider,
2495
+ hr as Table,
2496
+ sr as TableEmpty,
2497
+ ir as TableHeader,
2498
+ fr as TableOptionsProvider,
2447
2499
  Ie as TextInput,
2448
- Rt as Tooltip,
2500
+ Tt as Tooltip,
2449
2501
  pr as TranslationProvider,
2450
- Bn as filtersReducer,
2451
- St as helperTextStateClassName,
2452
- ft as initializer,
2453
- Nt as inputStateClassName,
2454
- $t as labelStateClassName,
2455
- Xn as renderFilterComponent,
2502
+ _n as filtersReducer,
2503
+ $t as helperTextStateClassName,
2504
+ pt as initializer,
2505
+ St as inputStateClassName,
2506
+ Rt as labelStateClassName,
2507
+ Zn as renderFilterComponent,
2456
2508
  Ce as useFilters,
2457
- oe as useTableOptions,
2458
- ee as useTranslation
2509
+ se as useTableOptions,
2510
+ X as useTranslation
2459
2511
  };