@mjsz-vbr-elements/core 2.12.0 → 2.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,25 +1,234 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.12.0 - 19/01/2025, 23:11:29
3
+ * version: v2.13.0 - 21/01/2025, 19:42:19
4
4
  * (c) 2025
5
5
  * description: Data visualization for MJSZ VBR
6
6
  * author: Ákos Stegner <akos.stegner@gmail.com>
7
7
  */
8
- import { ref as I, readonly as pe, watch as S, nextTick as z, getCurrentScope as je, onScopeDispose as Le, toValue as E, isRef as De, shallowRef as ie, unref as O, reactive as me, defineComponent as ke, h as Ne, computed as _, provide as ye, inject as he, onErrorCaptured as Fe } from "vue";
8
+ import { ref as I, watch as x, unref as O, reactive as pe, defineComponent as je, h as Le, computed as _, provide as me, inject as ye, onErrorCaptured as De, readonly as he, nextTick as z, getCurrentScope as ke, onScopeDispose as Ne, toValue as E, isRef as Fe, shallowRef as ie } from "vue";
9
9
  import { _ as K, w as Be, x as We, z as X, A as Me, B as $e, C as ve, D as B, E as ge, F as Ue, G as ae, H as k, I as N, J as ze, K as Ke, u as Ge } from "./datetime-K_d-hEsO.js";
10
10
  import { SORT_STATE_ORIGINAL as W, SORT_STATE_DESCEND as Q, SORT_STATE_ASCEND as $ } from "./constants.js";
11
- function we(e) {
12
- return je() ? (Le(e), !0) : !1;
11
+ function qe(e) {
12
+ var t = Object.prototype.toString.call(e);
13
+ return t === "[object Uint8ClampedArray]" || t === "[object Int8Array]" || t === "[object Uint8Array]" || t === "[object Int16Array]" || t === "[object Uint16Array]" || t === "[object Int32Array]" || t === "[object Uint32Array]" || t === "[object Float32Array]" || t === "[object Float64Array]" || t === "[object BigInt64Array]" || t === "[object BigUint64Array]";
14
+ }
15
+ var He = /* @__PURE__ */ K(function(t) {
16
+ return t != null && typeof t["fantasy-land/empty"] == "function" ? t["fantasy-land/empty"]() : t != null && t.constructor != null && typeof t.constructor["fantasy-land/empty"] == "function" ? t.constructor["fantasy-land/empty"]() : t != null && typeof t.empty == "function" ? t.empty() : t != null && t.constructor != null && typeof t.constructor.empty == "function" ? t.constructor.empty() : Be(t) ? [] : We(t) ? "" : X(t) ? {} : Me(t) ? /* @__PURE__ */ function() {
17
+ return arguments;
18
+ }() : qe(t) ? t.constructor.from("") : void 0;
19
+ }), Je = /* @__PURE__ */ K(function(t) {
20
+ return t != null && $e(t, He(t));
21
+ }), Qe = /* @__PURE__ */ ve(function(t, r, n) {
22
+ var i = {}, o;
23
+ r = r || {}, n = n || {};
24
+ for (o in r)
25
+ B(o, r) && (i[o] = B(o, n) ? t(o, r[o], n[o]) : r[o]);
26
+ for (o in n)
27
+ B(o, n) && !B(o, i) && (i[o] = n[o]);
28
+ return i;
29
+ }), Ve = /* @__PURE__ */ ve(function e(t, r, n) {
30
+ return Qe(function(i, o, a) {
31
+ return X(o) && X(a) ? e(t, o, a) : t(i, o, a);
32
+ }, r, n);
33
+ }), Xe = /* @__PURE__ */ ge(function(t, r) {
34
+ return Ve(function(n, i, o) {
35
+ return o;
36
+ }, t, r);
37
+ }), Ye = /* @__PURE__ */ ge(function(t, r) {
38
+ for (var n = {}, i = {}, o = 0, a = t.length; o < a; )
39
+ i[t[o]] = 1, o += 1;
40
+ for (var s in r)
41
+ i.hasOwnProperty(s) || (n[s] = r[s]);
42
+ return n;
43
+ }), L = `
44
+ \v\f\r                 \u2028\u2029\uFEFF`, Ze = "​", et = typeof String.prototype.trim == "function", G = !et || /* @__PURE__ */ L.trim() || !/* @__PURE__ */ Ze.trim() ? /* @__PURE__ */ K(function(t) {
45
+ var r = new RegExp("^[" + L + "][" + L + "]*"), n = new RegExp("[" + L + "][" + L + "]*$");
46
+ return t.replace(r, "").replace(n, "");
47
+ }) : /* @__PURE__ */ K(function(t) {
48
+ return t.trim();
49
+ });
50
+ function xt(e, t, r, n) {
51
+ const i = I(""), o = I(!1), a = (s) => {
52
+ const c = Ue(ae(t), s), y = c.length > 0;
53
+ if (o.value = y, !y)
54
+ return i.value = "";
55
+ const u = c.map((d) => ({
56
+ team: d.team.longName,
57
+ points: Math.abs(ae(t, d))
58
+ })).map((d) => r(`additionalText.${t}.content`, d)).join(", ");
59
+ i.value = [
60
+ r(`additionalText.${t}.prependix`),
61
+ u,
62
+ ...r(`additionalText.${t}.appendix`) && [r(`additionalText.${t}.appendix`)]
63
+ ].join(" ");
64
+ };
65
+ return x(e, a, { immediate: !0 }), x(
66
+ () => O(n),
67
+ () => a(O(e))
68
+ ), {
69
+ text: i,
70
+ isVisible: o
71
+ };
72
+ }
73
+ const we = Symbol("I18nContext"), T = pe({
74
+ messages: {},
75
+ locale: "",
76
+ fallbackLocale: ""
77
+ });
78
+ function St({ messages: e = {}, locale: t = "", fallbackLocale: r = "" }) {
79
+ T.messages = Xe(T.messages, e), T.locale = t, T.fallbackLocale = r;
80
+ const n = (c, y = {}) => {
81
+ const h = !Je(y), u = k(G, N(".", c));
82
+ return _(() => {
83
+ const m = be(u);
84
+ return h ? rt(m, y) : m;
85
+ }).value;
86
+ }, i = (c) => {
87
+ const y = k(G, N(".", c));
88
+ return !!Y(T.locale, y, T.messages);
89
+ }, o = (c) => {
90
+ T.locale = c;
91
+ }, s = {
92
+ locale: _({
93
+ get() {
94
+ return T.locale;
95
+ },
96
+ set(c) {
97
+ T.locale = c;
98
+ }
99
+ }),
100
+ setLocale: o,
101
+ translate: n,
102
+ hasTranslation: i
103
+ };
104
+ return me(we, s), {
105
+ translate: n
106
+ };
107
+ }
108
+ function tt(e) {
109
+ e && (T.messages = e.messages, T.locale = e.locale, T.fallbackLocale = e.fallbackLocale);
110
+ const t = nt();
111
+ return {
112
+ locale: t.locale,
113
+ t: t.translate,
114
+ setLocale: t.setLocale,
115
+ hasTranslation: t.hasTranslation
116
+ };
117
+ }
118
+ function nt() {
119
+ const e = ye(we, null);
120
+ if (e === null)
121
+ throw new Error("Provider is missing a parent component.");
122
+ return e;
123
+ }
124
+ function be(e = []) {
125
+ let t = Y(T.locale, e, T.messages);
126
+ return !t && T.fallbackLocale && (t = Y(T.fallbackLocale, e, T.messages)), t || e.join(".");
127
+ }
128
+ function Y(e, t, r) {
129
+ return ze([e, ...t], r);
130
+ }
131
+ function rt(e, t) {
132
+ return e.replace(/\{(\w+)\}/g, (r, n) => t[n]);
133
+ }
134
+ const Pt = je({
135
+ props: {
136
+ tag: {
137
+ type: String,
138
+ default: "div"
139
+ },
140
+ path: {
141
+ type: String,
142
+ defult: ""
143
+ }
144
+ },
145
+ setup(e, { slots: t }) {
146
+ const r = k(G, N(".", e.path)), n = be(r), i = N(/\{|\}/, n), o = Object.keys(t).map((a) => {
147
+ const s = i.indexOf(a);
148
+ return s > -1 && (i[s] = t[a]()[0]), i;
149
+ });
150
+ return () => Le(e.tag, o);
151
+ }
152
+ });
153
+ function Ct(e, t = "", r = {}) {
154
+ const n = I(""), { t: i } = tt(), o = _(() => {
155
+ if (O(t))
156
+ try {
157
+ const c = ot(O(e), O(t));
158
+ return Ye(c, O(e));
159
+ } catch (c) {
160
+ n.value = c;
161
+ }
162
+ return O(e);
163
+ }), a = (c) => ({
164
+ ...c,
165
+ ...c.label && { label: i(c.label ?? "", O(r)) },
166
+ ...c.tooltip && { tooltip: i(c.tooltip ?? "") }
167
+ });
168
+ return {
169
+ columns: _(() => k(a, o.value)),
170
+ error: n
171
+ };
172
+ }
173
+ function ot(e, t = "") {
174
+ const r = k(G, N(",", t)), n = Ke(e);
175
+ if (r[0] === "")
176
+ return [];
177
+ const i = r.findIndex((o) => !n.includes(o));
178
+ if (i > -1)
179
+ throw r[i];
180
+ return r;
181
+ }
182
+ const Te = Symbol("ErrorProviderContext");
183
+ function Rt() {
184
+ const e = I(""), t = I({}), r = (o) => {
185
+ console.error({ error: o }), e.value = o.message || o.error.message, t.value = {
186
+ message: o.message,
187
+ key: o.key || Ge(o.message),
188
+ cause: o.cause
189
+ };
190
+ };
191
+ return me(Te, {
192
+ onError: r,
193
+ reset: () => {
194
+ e.value = "", t.value = {};
195
+ }
196
+ }), window.onerror = (o) => {
197
+ console.error("WINDOW_ONERROR:", o);
198
+ }, De((o, a, s) => {
199
+ console.error("onErrorCaptured:", o, a, s);
200
+ }), {
201
+ hasError: _(() => e.value.length > 0),
202
+ message: e,
203
+ error: t,
204
+ onError: r
205
+ };
206
+ }
207
+ function _t() {
208
+ const e = it();
209
+ return {
210
+ onError: e.onError,
211
+ reset: e.reset
212
+ };
213
+ }
214
+ function it() {
215
+ const e = ye(Te, null);
216
+ if (e === null)
217
+ throw new Error("Provider is missing a parent component.");
218
+ return e;
219
+ }
220
+ function Ae(e) {
221
+ return ke() ? (Ne(e), !0) : !1;
13
222
  }
14
223
  const q = typeof window < "u" && typeof document < "u";
15
224
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
16
- const qe = Object.prototype.toString, He = (e) => qe.call(e) === "[object Object]", R = () => {
17
- }, Je = /* @__PURE__ */ Qe();
18
- function Qe() {
225
+ const at = Object.prototype.toString, st = (e) => at.call(e) === "[object Object]", R = () => {
226
+ }, ut = /* @__PURE__ */ ct();
227
+ function ct() {
19
228
  var e, t;
20
229
  return q && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
21
230
  }
22
- function Ve(e, t) {
231
+ function lt(e, t) {
23
232
  function r(...n) {
24
233
  return new Promise((i, o) => {
25
234
  Promise.resolve(e(() => t.apply(this, n), { fn: t, thisArg: this, args: n })).then(i).catch(o);
@@ -27,8 +236,8 @@ function Ve(e, t) {
27
236
  }
28
237
  return r;
29
238
  }
30
- const be = (e) => e();
31
- function Xe(e = be) {
239
+ const Ee = (e) => e();
240
+ function ft(e = Ee) {
32
241
  const t = I(!0);
33
242
  function r() {
34
243
  t.value = !1;
@@ -39,9 +248,9 @@ function Xe(e = be) {
39
248
  const i = (...o) => {
40
249
  t.value && e(...o);
41
250
  };
42
- return { isActive: pe(t), pause: r, resume: n, eventFilter: i };
251
+ return { isActive: he(t), pause: r, resume: n, eventFilter: i };
43
252
  }
44
- function Y(e, t = !1, r = "Timeout") {
253
+ function Z(e, t = !1, r = "Timeout") {
45
254
  return new Promise((n, i) => {
46
255
  setTimeout(t ? () => i(r) : n, e);
47
256
  });
@@ -49,26 +258,26 @@ function Y(e, t = !1, r = "Timeout") {
49
258
  function se(e) {
50
259
  return Array.isArray(e) ? e : [e];
51
260
  }
52
- function Ye(e, t, r = {}) {
261
+ function dt(e, t, r = {}) {
53
262
  const {
54
- eventFilter: n = be,
263
+ eventFilter: n = Ee,
55
264
  ...i
56
265
  } = r;
57
- return S(
266
+ return x(
58
267
  e,
59
- Ve(
268
+ lt(
60
269
  n,
61
270
  t
62
271
  ),
63
272
  i
64
273
  );
65
274
  }
66
- function St(e, t, r = {}) {
275
+ function jt(e, t, r = {}) {
67
276
  const {
68
277
  eventFilter: n,
69
278
  ...i
70
- } = r, { eventFilter: o, pause: a, resume: s, isActive: c } = Xe(n);
71
- return { stop: Ye(
279
+ } = r, { eventFilter: o, pause: a, resume: s, isActive: c } = ft(n);
280
+ return { stop: dt(
72
281
  e,
73
282
  t,
74
283
  {
@@ -77,11 +286,11 @@ function St(e, t, r = {}) {
77
286
  }
78
287
  ), pause: a, resume: s, isActive: c };
79
288
  }
80
- function Z(e, t = !1) {
289
+ function ee(e, t = !1) {
81
290
  function r(u, { flush: d = "sync", deep: m = !1, timeout: v, throwOnTimeout: l } = {}) {
82
291
  let f = null;
83
292
  const w = [new Promise((A) => {
84
- f = S(
293
+ f = x(
85
294
  e,
86
295
  (g) => {
87
296
  u(g) !== t && (f ? f() : z(() => f == null ? void 0 : f()), A(g));
@@ -94,16 +303,16 @@ function Z(e, t = !1) {
94
303
  );
95
304
  })];
96
305
  return v != null && w.push(
97
- Y(v, l).then(() => E(e)).finally(() => f == null ? void 0 : f())
306
+ Z(v, l).then(() => E(e)).finally(() => f == null ? void 0 : f())
98
307
  ), Promise.race(w);
99
308
  }
100
309
  function n(u, d) {
101
- if (!De(u))
310
+ if (!Fe(u))
102
311
  return r((g) => g === u, d);
103
312
  const { flush: m = "sync", deep: v = !1, timeout: l, throwOnTimeout: f } = d ?? {};
104
313
  let p = null;
105
314
  const A = [new Promise((g) => {
106
- p = S(
315
+ p = x(
107
316
  [e, u],
108
317
  ([j, F]) => {
109
318
  t !== (j === F) && (p ? p() : z(() => p == null ? void 0 : p()), g(j));
@@ -116,7 +325,7 @@ function Z(e, t = !1) {
116
325
  );
117
326
  })];
118
327
  return l != null && A.push(
119
- Y(l, f).then(() => E(e)).finally(() => (p == null || p(), E(e)))
328
+ Z(l, f).then(() => E(e)).finally(() => (p == null || p(), E(e)))
120
329
  ), Promise.race(A);
121
330
  }
122
331
  function i(u) {
@@ -150,7 +359,7 @@ function Z(e, t = !1) {
150
359
  changed: y,
151
360
  changedTimes: h,
152
361
  get not() {
153
- return Z(e, !t);
362
+ return ee(e, !t);
154
363
  }
155
364
  } : {
156
365
  toMatch: r,
@@ -162,14 +371,14 @@ function Z(e, t = !1) {
162
371
  changed: y,
163
372
  changedTimes: h,
164
373
  get not() {
165
- return Z(e, !t);
374
+ return ee(e, !t);
166
375
  }
167
376
  };
168
377
  }
169
- function Ze(e) {
170
- return Z(e);
378
+ function pt(e) {
379
+ return ee(e);
171
380
  }
172
- function et(e, t, r = {}) {
381
+ function mt(e, t, r = {}) {
173
382
  const {
174
383
  immediate: n = !0
175
384
  } = r, i = I(!1);
@@ -185,18 +394,18 @@ function et(e, t, r = {}) {
185
394
  i.value = !1, o = null, e(...y);
186
395
  }, E(t));
187
396
  }
188
- return n && (i.value = !0, q && c()), we(s), {
189
- isPending: pe(i),
397
+ return n && (i.value = !0, q && c()), Ae(s), {
398
+ isPending: he(i),
190
399
  start: c,
191
400
  stop: s
192
401
  };
193
402
  }
194
- function tt(e, t, r) {
195
- const n = S(e, (...i) => (z(() => n()), t(...i)), r);
403
+ function Lt(e, t, r) {
404
+ const n = x(e, (...i) => (z(() => n()), t(...i)), r);
196
405
  return n;
197
406
  }
198
- function Pt(e, t, r) {
199
- const n = S(
407
+ function Dt(e, t, r) {
408
+ const n = x(
200
409
  e,
201
410
  (i, o, a) => {
202
411
  i && (r != null && r.once && z(() => n()), t(i, o, a));
@@ -208,7 +417,7 @@ function Pt(e, t, r) {
208
417
  );
209
418
  return n;
210
419
  }
211
- const Te = q ? window : void 0, nt = q ? window.document : void 0;
420
+ const Ie = q ? window : void 0, yt = q ? window.document : void 0;
212
421
  function D(e) {
213
422
  var t;
214
423
  const r = E(e);
@@ -216,17 +425,17 @@ function D(e) {
216
425
  }
217
426
  function U(...e) {
218
427
  let t, r, n, i;
219
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, i] = e, t = Te) : [t, r, n, i] = e, !t)
428
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, i] = e, t = Ie) : [t, r, n, i] = e, !t)
220
429
  return R;
221
430
  r = se(r), n = se(n);
222
431
  const o = [], a = () => {
223
432
  o.forEach((h) => h()), o.length = 0;
224
- }, s = (h, u, d, m) => (h.addEventListener(u, d, m), () => h.removeEventListener(u, d, m)), c = S(
433
+ }, s = (h, u, d, m) => (h.addEventListener(u, d, m), () => h.removeEventListener(u, d, m)), c = x(
225
434
  () => [D(t), E(i)],
226
435
  ([h, u]) => {
227
436
  if (a(), !h)
228
437
  return;
229
- const d = He(u) ? { ...u } : u;
438
+ const d = st(u) ? { ...u } : u;
230
439
  o.push(
231
440
  ...r.flatMap((m) => n.map((v) => s(h, m, v, d)))
232
441
  );
@@ -235,14 +444,14 @@ function U(...e) {
235
444
  ), y = () => {
236
445
  c(), a();
237
446
  };
238
- return we(y), y;
447
+ return Ae(y), y;
239
448
  }
240
449
  let ue = !1;
241
- function Ct(e, t, r = {}) {
242
- const { window: n = Te, ignore: i = [], capture: o = !0, detectIframe: a = !1 } = r;
450
+ function kt(e, t, r = {}) {
451
+ const { window: n = Ie, ignore: i = [], capture: o = !0, detectIframe: a = !1 } = r;
243
452
  if (!n)
244
453
  return R;
245
- Je && !ue && (ue = !0, Array.from(n.document.body.children).forEach((l) => l.addEventListener("click", R)), n.document.documentElement.addEventListener("click", R));
454
+ ut && !ue && (ue = !0, Array.from(n.document.body.children).forEach((l) => l.addEventListener("click", R)), n.document.documentElement.addEventListener("click", R));
246
455
  let s = !0;
247
456
  const c = (l) => E(i).some((f) => {
248
457
  if (typeof f == "string")
@@ -291,7 +500,7 @@ function Ct(e, t, r = {}) {
291
500
  ].filter(Boolean);
292
501
  return () => m.forEach((l) => l());
293
502
  }
294
- function rt(e, t, r) {
503
+ function ht(e, t, r) {
295
504
  const {
296
505
  immediate: n = !0,
297
506
  delay: i = 0,
@@ -302,7 +511,7 @@ function rt(e, t, r) {
302
511
  throwError: y
303
512
  } = r ?? {}, h = c ? ie(t) : I(t), u = I(!1), d = I(!1), m = ie(void 0);
304
513
  async function v(p = 0, ...w) {
305
- s && (h.value = t), m.value = void 0, u.value = !1, d.value = !0, p > 0 && await Y(p);
514
+ s && (h.value = t), m.value = void 0, u.value = !1, d.value = !0, p > 0 && await Z(p);
306
515
  const A = typeof e == "function" ? e(...w) : e;
307
516
  try {
308
517
  const g = await A;
@@ -325,7 +534,7 @@ function rt(e, t, r) {
325
534
  };
326
535
  function f() {
327
536
  return new Promise((p, w) => {
328
- Ze(d).toBe(!1).then(() => p(l)).catch(w);
537
+ pt(d).toBe(!1).then(() => p(l)).catch(w);
329
538
  });
330
539
  }
331
540
  return {
@@ -335,8 +544,8 @@ function rt(e, t, r) {
335
544
  }
336
545
  };
337
546
  }
338
- function Rt(e = {}) {
339
- const { document: t = nt } = e;
547
+ function Nt(e = {}) {
548
+ const { document: t = yt } = e;
340
549
  if (!t)
341
550
  return I("visible");
342
551
  const r = I(t.visibilityState);
@@ -344,244 +553,35 @@ function Rt(e = {}) {
344
553
  r.value = t.visibilityState;
345
554
  }, { passive: !0 }), r;
346
555
  }
347
- async function ot(e) {
556
+ async function vt(e) {
348
557
  return new Promise((t, r) => {
349
558
  const n = new Image(), { src: i, srcset: o, sizes: a, class: s, loading: c, crossorigin: y, referrerPolicy: h, width: u, height: d, decoding: m, fetchPriority: v, ismap: l, usemap: f } = e;
350
559
  n.src = i, o != null && (n.srcset = o), a != null && (n.sizes = a), s != null && (n.className = s), c != null && (n.loading = c), y != null && (n.crossOrigin = y), h != null && (n.referrerPolicy = h), u != null && (n.width = u), d != null && (n.height = d), m != null && (n.decoding = m), v != null && (n.fetchPriority = v), l != null && (n.isMap = l), f != null && (n.useMap = f), n.onload = () => t(n), n.onerror = r;
351
560
  });
352
561
  }
353
- function _t(e, t = {}) {
354
- const r = rt(
355
- () => ot(E(e)),
562
+ function Ft(e, t = {}) {
563
+ const r = ht(
564
+ () => vt(E(e)),
356
565
  void 0,
357
566
  {
358
567
  resetOnExecute: !0,
359
568
  ...t
360
569
  }
361
570
  );
362
- return S(
571
+ return x(
363
572
  () => E(e),
364
573
  () => r.execute(t.delay),
365
574
  { deep: !0 }
366
575
  ), r;
367
576
  }
368
- function it(e) {
369
- var t = Object.prototype.toString.call(e);
370
- return t === "[object Uint8ClampedArray]" || t === "[object Int8Array]" || t === "[object Uint8Array]" || t === "[object Int16Array]" || t === "[object Uint16Array]" || t === "[object Int32Array]" || t === "[object Uint32Array]" || t === "[object Float32Array]" || t === "[object Float64Array]" || t === "[object BigInt64Array]" || t === "[object BigUint64Array]";
371
- }
372
- var at = /* @__PURE__ */ K(function(t) {
373
- return t != null && typeof t["fantasy-land/empty"] == "function" ? t["fantasy-land/empty"]() : t != null && t.constructor != null && typeof t.constructor["fantasy-land/empty"] == "function" ? t.constructor["fantasy-land/empty"]() : t != null && typeof t.empty == "function" ? t.empty() : t != null && t.constructor != null && typeof t.constructor.empty == "function" ? t.constructor.empty() : Be(t) ? [] : We(t) ? "" : X(t) ? {} : Me(t) ? /* @__PURE__ */ function() {
374
- return arguments;
375
- }() : it(t) ? t.constructor.from("") : void 0;
376
- }), st = /* @__PURE__ */ K(function(t) {
377
- return t != null && $e(t, at(t));
378
- }), ut = /* @__PURE__ */ ve(function(t, r, n) {
379
- var i = {}, o;
380
- r = r || {}, n = n || {};
381
- for (o in r)
382
- B(o, r) && (i[o] = B(o, n) ? t(o, r[o], n[o]) : r[o]);
383
- for (o in n)
384
- B(o, n) && !B(o, i) && (i[o] = n[o]);
385
- return i;
386
- }), ct = /* @__PURE__ */ ve(function e(t, r, n) {
387
- return ut(function(i, o, a) {
388
- return X(o) && X(a) ? e(t, o, a) : t(i, o, a);
389
- }, r, n);
390
- }), lt = /* @__PURE__ */ ge(function(t, r) {
391
- return ct(function(n, i, o) {
392
- return o;
393
- }, t, r);
394
- }), ft = /* @__PURE__ */ ge(function(t, r) {
395
- for (var n = {}, i = {}, o = 0, a = t.length; o < a; )
396
- i[t[o]] = 1, o += 1;
397
- for (var s in r)
398
- i.hasOwnProperty(s) || (n[s] = r[s]);
399
- return n;
400
- }), L = `
401
- \v\f\r                 \u2028\u2029\uFEFF`, dt = "​", pt = typeof String.prototype.trim == "function", G = !pt || /* @__PURE__ */ L.trim() || !/* @__PURE__ */ dt.trim() ? /* @__PURE__ */ K(function(t) {
402
- var r = new RegExp("^[" + L + "][" + L + "]*"), n = new RegExp("[" + L + "][" + L + "]*$");
403
- return t.replace(r, "").replace(n, "");
404
- }) : /* @__PURE__ */ K(function(t) {
405
- return t.trim();
406
- });
407
- function jt(e, t, r, n) {
408
- const i = I(""), o = I(!1), a = (s) => {
409
- const c = Ue(ae(t), s), y = c.length > 0;
410
- if (o.value = y, !y)
411
- return i.value = "";
412
- const u = c.map((d) => ({
413
- team: d.team.longName,
414
- points: Math.abs(ae(t, d))
415
- })).map((d) => r(`additionalText.${t}.content`, d)).join(", ");
416
- i.value = [
417
- r(`additionalText.${t}.prependix`),
418
- u,
419
- ...r(`additionalText.${t}.appendix`) && [r(`additionalText.${t}.appendix`)]
420
- ].join(" ");
421
- };
422
- return tt(e, a), S(
423
- () => O(n),
424
- () => a(O(e))
425
- ), {
426
- text: i,
427
- isVisible: o
428
- };
429
- }
430
- const Ae = Symbol("I18nContext"), T = me({
431
- messages: {},
432
- locale: "",
433
- fallbackLocale: ""
434
- });
435
- function Lt({ messages: e = {}, locale: t = "", fallbackLocale: r = "" }) {
436
- T.messages = lt(T.messages, e), T.locale = t, T.fallbackLocale = r;
437
- const n = (c, y = {}) => {
438
- const h = !st(y), u = k(G, N(".", c));
439
- return _(() => {
440
- const m = Ee(u);
441
- return h ? ht(m, y) : m;
442
- }).value;
443
- }, i = (c) => {
444
- const y = k(G, N(".", c));
445
- return !!ee(T.locale, y, T.messages);
446
- }, o = (c) => {
447
- T.locale = c;
448
- }, s = {
449
- locale: _({
450
- get() {
451
- return T.locale;
452
- },
453
- set(c) {
454
- T.locale = c;
455
- }
456
- }),
457
- setLocale: o,
458
- translate: n,
459
- hasTranslation: i
460
- };
461
- return ye(Ae, s), {
462
- translate: n
463
- };
464
- }
465
- function mt(e) {
466
- e && (T.messages = e.messages, T.locale = e.locale, T.fallbackLocale = e.fallbackLocale);
467
- const t = yt();
468
- return {
469
- locale: t.locale,
470
- t: t.translate,
471
- setLocale: t.setLocale,
472
- hasTranslation: t.hasTranslation
473
- };
474
- }
475
- function yt() {
476
- const e = he(Ae, null);
477
- if (e === null)
478
- throw new Error("Privider is missing a parent component.");
479
- return e;
480
- }
481
- function Ee(e = []) {
482
- let t = ee(T.locale, e, T.messages);
483
- return !t && T.fallbackLocale && (t = ee(T.fallbackLocale, e, T.messages)), t || e.join(".");
484
- }
485
- function ee(e, t, r) {
486
- return ze([e, ...t], r);
487
- }
488
- function ht(e, t) {
489
- return e.replace(/\{(\w+)\}/g, (r, n) => t[n]);
490
- }
491
- const Dt = ke({
492
- props: {
493
- tag: {
494
- type: String,
495
- default: "div"
496
- },
497
- path: {
498
- type: String,
499
- defult: ""
500
- }
501
- },
502
- setup(e, { slots: t }) {
503
- const r = k(G, N(".", e.path)), n = Ee(r), i = N(/\{|\}/, n), o = Object.keys(t).map((a) => {
504
- const s = i.indexOf(a);
505
- return s > -1 && (i[s] = t[a]()[0]), i;
506
- });
507
- return () => Ne(e.tag, o);
508
- }
509
- });
510
- function kt(e, t = "", r = {}) {
511
- const n = I(""), { t: i } = mt(), o = _(() => {
512
- if (O(t))
513
- try {
514
- const c = vt(O(e), O(t));
515
- return ft(c, O(e));
516
- } catch (c) {
517
- n.value = c;
518
- }
519
- return O(e);
520
- }), a = (c) => ({
521
- ...c,
522
- ...c.label && { label: i(c.label ?? "", O(r)) },
523
- ...c.tooltip && { tooltip: i(c.tooltip ?? "") }
524
- });
525
- return {
526
- columns: _(() => k(a, o.value)),
527
- error: n
528
- };
529
- }
530
- function vt(e, t = "") {
531
- const r = k(G, N(",", t)), n = Ke(e);
532
- if (r[0] === "")
533
- return [];
534
- const i = r.findIndex((o) => !n.includes(o));
535
- if (i > -1)
536
- throw r[i];
537
- return r;
538
- }
539
- const Ie = Symbol("ErrorProviderContext");
540
- function Nt() {
541
- const e = I(""), t = I({}), r = (o) => {
542
- console.error({ error: o }), e.value = o.message || o.error.message, t.value = {
543
- message: o.message,
544
- key: o.key || Ge(o.message),
545
- cause: o.cause
546
- };
547
- };
548
- return ye(Ie, {
549
- onError: r,
550
- reset: () => {
551
- e.value = "", t.value = {};
552
- }
553
- }), window.onerror = (o) => {
554
- console.error("WINDOW_ONERROR:", o);
555
- }, Fe((o, a, s) => {
556
- console.error("onErrorCaptured:", o, a, s);
557
- }), {
558
- hasError: _(() => e.value.length > 0),
559
- message: e,
560
- error: t,
561
- onError: r
562
- };
563
- }
564
- function Ft() {
565
- const e = gt();
566
- return {
567
- onError: e.onError,
568
- reset: e.reset
569
- };
570
- }
571
- function gt() {
572
- const e = he(Ie, null);
573
- if (e === null)
574
- throw new Error("Privider is missing a parent component.");
575
- return e;
576
- }
577
577
  function Bt(e = [], t = {}) {
578
578
  const { delay: r = 0 } = t, n = I(!1), i = _(() => {
579
579
  const s = O(e);
580
580
  return Array.isArray(s) ? s.map((c) => O(c)).some(Boolean) : s;
581
- }), { start: o, stop: a } = et(() => {
581
+ }), { start: o, stop: a } = mt(() => {
582
582
  n.value = !0;
583
583
  }, r);
584
- return S(
584
+ return x(
585
585
  i,
586
586
  (s) => {
587
587
  if (s)
@@ -626,7 +626,7 @@ var ce;
626
626
  (function(e) {
627
627
  e[e.NotStarted = 0] = "NotStarted", e[e.Running = 1] = "Running", e[e.Stopped = 2] = "Stopped";
628
628
  })(ce || (ce = {}));
629
- var wt = { type: "xstate.init" };
629
+ var gt = { type: "xstate.init" };
630
630
  function M(e) {
631
631
  return e === void 0 ? [] : [].concat(e);
632
632
  }
@@ -638,7 +638,7 @@ function te(e) {
638
638
  return e === t;
639
639
  };
640
640
  }
641
- function bt(e) {
641
+ function wt(e) {
642
642
  return typeof e == "string" ? { type: e } : e;
643
643
  }
644
644
  function fe(e, t) {
@@ -657,26 +657,26 @@ function de(e, t, r) {
657
657
  return !0;
658
658
  }), n, i];
659
659
  }
660
- function Tt(e, t) {
660
+ function bt(e, t) {
661
661
  t === void 0 && (t = {});
662
662
  var r = V(de(M(e.states[e.initial].entry).map(function(a) {
663
663
  return le(a, t.actions);
664
- }), e.context, wt), 2), n = r[0], i = r[1], o = { config: e, _options: t, initialState: { value: e.initial, actions: n, context: i, matches: te(e.initial) }, transition: function(a, s) {
665
- var c, y, h = typeof a == "string" ? { value: a, context: e.context } : a, u = h.value, d = h.context, m = bt(s), v = e.states[u];
664
+ }), e.context, gt), 2), n = r[0], i = r[1], o = { config: e, _options: t, initialState: { value: e.initial, actions: n, context: i, matches: te(e.initial) }, transition: function(a, s) {
665
+ var c, y, h = typeof a == "string" ? { value: a, context: e.context } : a, u = h.value, d = h.context, m = wt(s), v = e.states[u];
666
666
  if (v.on) {
667
667
  var l = M(v.on[m.type]);
668
- "*" in v.on && l.push.apply(l, function(b, x, J) {
669
- if (arguments.length === 2) for (var P, C = 0, _e = x.length; C < _e; C++) !P && C in x || (P || (P = Array.prototype.slice.call(x, 0, C)), P[C] = x[C]);
670
- return b.concat(P || Array.prototype.slice.call(x));
668
+ "*" in v.on && l.push.apply(l, function(b, S, J) {
669
+ if (arguments.length === 2) for (var P, C = 0, _e = S.length; C < _e; C++) !P && C in S || (P || (P = Array.prototype.slice.call(S, 0, C)), P[C] = S[C]);
670
+ return b.concat(P || Array.prototype.slice.call(S));
671
671
  }([], V(M(v.on["*"])), !1));
672
672
  try {
673
673
  for (var f = function(b) {
674
- var x = typeof Symbol == "function" && Symbol.iterator, J = x && b[x], P = 0;
674
+ var S = typeof Symbol == "function" && Symbol.iterator, J = S && b[S], P = 0;
675
675
  if (J) return J.call(b);
676
676
  if (b && typeof b.length == "number") return { next: function() {
677
677
  return b && P >= b.length && (b = void 0), { value: b && b[P++], done: !b };
678
678
  } };
679
- throw new TypeError(x ? "Object is not iterable." : "Symbol.iterator is not defined.");
679
+ throw new TypeError(S ? "Object is not iterable." : "Symbol.iterator is not defined.");
680
680
  }(l), p = f.next(); !p.done; p = f.next()) {
681
681
  var w = p.value;
682
682
  if (w === void 0) return fe(u, d);
@@ -706,7 +706,7 @@ function Tt(e, t) {
706
706
  } };
707
707
  return o;
708
708
  }
709
- const At = Tt({
709
+ const Tt = bt({
710
710
  id: "sort",
711
711
  initial: W,
712
712
  states: {
@@ -730,12 +730,12 @@ const At = Tt({
730
730
  }
731
731
  }
732
732
  });
733
- function Et(e, t) {
733
+ function At(e, t) {
734
734
  const r = t === $ ? "DIRECTION2" : "DIRECTION1";
735
- return At.transition(e, r).value;
735
+ return Tt.transition(e, r).value;
736
736
  }
737
737
  function Wt(e = {}) {
738
- const { sortTarget: t = null, orders: r = [] } = e, n = me({ sortTarget: t, orders: r });
738
+ const { sortTarget: t = null, orders: r = [] } = e, n = pe({ sortTarget: t, orders: r });
739
739
  return {
740
740
  sort: n,
741
741
  change: ({ target: o, orders: a }) => {
@@ -745,32 +745,32 @@ function Wt(e = {}) {
745
745
  }
746
746
  const s = a.map((c, y) => ({
747
747
  ...c,
748
- direction: Et(n.orders[y].direction, c.direction)
748
+ direction: At(n.orders[y].direction, c.direction)
749
749
  }));
750
750
  n.sortTarget = o, n.orders = s;
751
751
  }
752
752
  };
753
753
  }
754
754
  export {
755
- kt as a,
756
- Nt as b,
757
- Ft as c,
758
- Lt as d,
759
- mt as e,
755
+ Ct as a,
756
+ Rt as b,
757
+ _t as c,
758
+ St as d,
759
+ tt as e,
760
760
  Bt as f,
761
761
  Wt as g,
762
- _t as h,
763
- Dt as i,
764
- st as j,
765
- tt as k,
766
- St as l,
767
- lt as m,
762
+ Ft as h,
763
+ Pt as i,
764
+ Je as j,
765
+ Lt as k,
766
+ jt as l,
767
+ Xe as m,
768
768
  R as n,
769
- Ct as o,
769
+ kt as o,
770
770
  D as p,
771
- rt as q,
772
- Rt as r,
773
- jt as u,
774
- vt as v,
775
- Pt as w
771
+ ht as q,
772
+ Nt as r,
773
+ xt as u,
774
+ ot as v,
775
+ Dt as w
776
776
  };