@sito/dashboard 0.0.56 → 0.0.57

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