@mjsz-vbr-elements/core 2.24.1 → 2.25.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,50 +1,50 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.24.1 - 13/05/2025, 09:22:12
3
+ * version: v2.25.0 - 01/07/2025, 19:03:26
4
4
  * (c) 2025
5
5
  * description: Data visualization for MJSZ VBR
6
6
  * author: Ákos Stegner <akos.stegner@gmail.com>
7
7
  */
8
8
  import { SORT_STATE_ORIGINAL as F, SORT_STATE_ASCEND as G } from "./constants.js";
9
- import { E as f, L as S, H as v, G as m, _ as p, w as g, x as b, M as R, C as c, N, O as $, D as T, P as U, Q as j, R as k, S as H, T as X, U as q, V as Y, B as D, J as K, F as J, f as h, c as M, b as Q, a as V } from "./datetime-Djnl319m.js";
10
- var Z = /* @__PURE__ */ f(function(e, r) {
9
+ import { E as f, L as _, H as g, G as m, _ as p, w as v, x as O, M as R, C as o, N, O as b, P as U, Q as j, R as k, D as $, S as H, T as X, U as q, V as Y, W as K, f as h, c as M, B as S, J, F as Q, b as V, a as Z } from "./datetime-D600LvsU.js";
10
+ var z = /* @__PURE__ */ f(function(e, r) {
11
11
  if (e === r)
12
12
  return r;
13
- function n(o, l) {
14
- if (o > l != l > o)
15
- return l > o ? l : o;
13
+ function n(c, l) {
14
+ if (c > l != l > c)
15
+ return l > c ? l : c;
16
16
  }
17
17
  var a = n(e, r);
18
18
  if (a !== void 0)
19
19
  return a;
20
- var u = n(typeof e, typeof r);
21
- if (u !== void 0)
22
- return u === typeof e ? e : r;
23
- var s = S(e), i = n(s, S(r));
24
- return i !== void 0 && i === s ? e : r;
25
- }), z = /* @__PURE__ */ f(function(e, r) {
26
- return v(m(e), r);
27
- }), w = /* @__PURE__ */ p(function(e) {
28
- return g(e) ? !0 : !e || typeof e != "object" || b(e) ? !1 : e.length === 0 ? !0 : e.length > 0 ? e.hasOwnProperty(0) && e.hasOwnProperty(e.length - 1) : !1;
29
- }), O = typeof Symbol < "u" ? Symbol.iterator : "@@iterator";
30
- function ee(t, e, r) {
31
- return function(a, u, s) {
32
- if (w(s))
33
- return t(a, u, s);
34
- if (s == null)
35
- return u;
36
- if (typeof s["fantasy-land/reduce"] == "function")
37
- return e(a, u, s, "fantasy-land/reduce");
38
- if (s[O] != null)
39
- return r(a, u, s[O]());
40
- if (typeof s.next == "function")
41
- return r(a, u, s);
42
- if (typeof s.reduce == "function")
43
- return e(a, u, s, "reduce");
20
+ var s = n(typeof e, typeof r);
21
+ if (s !== void 0)
22
+ return s === typeof e ? e : r;
23
+ var u = _(e), i = n(u, _(r));
24
+ return i !== void 0 && i === u ? e : r;
25
+ }), w = /* @__PURE__ */ f(function(e, r) {
26
+ return g(m(e), r);
27
+ }), ee = /* @__PURE__ */ p(function(e) {
28
+ return v(e) ? !0 : !e || typeof e != "object" || O(e) ? !1 : e.length === 0 ? !0 : e.length > 0 ? e.hasOwnProperty(0) && e.hasOwnProperty(e.length - 1) : !1;
29
+ }), D = typeof Symbol < "u" ? Symbol.iterator : "@@iterator";
30
+ function te(t, e, r) {
31
+ return function(a, s, u) {
32
+ if (ee(u))
33
+ return t(a, s, u);
34
+ if (u == null)
35
+ return s;
36
+ if (typeof u["fantasy-land/reduce"] == "function")
37
+ return e(a, s, u, "fantasy-land/reduce");
38
+ if (u[D] != null)
39
+ return r(a, s, u[D]());
40
+ if (typeof u.next == "function")
41
+ return r(a, s, u);
42
+ if (typeof u.reduce == "function")
43
+ return e(a, s, u, "reduce");
44
44
  throw new TypeError("reduce: list must be array or iterable");
45
45
  };
46
46
  }
47
- function te(t, e, r) {
47
+ function re(t, e, r) {
48
48
  for (var n = 0, a = r.length; n < a; ) {
49
49
  if (e = t["@@transducer/step"](e, r[n]), e && e["@@transducer/reduced"]) {
50
50
  e = e["@@transducer/value"];
@@ -54,12 +54,12 @@ function te(t, e, r) {
54
54
  }
55
55
  return t["@@transducer/result"](e);
56
56
  }
57
- var re = /* @__PURE__ */ f(function(e, r) {
57
+ var ne = /* @__PURE__ */ f(function(e, r) {
58
58
  return R(e.length, function() {
59
59
  return e.apply(r, arguments);
60
60
  });
61
61
  });
62
- function ne(t, e, r) {
62
+ function ae(t, e, r) {
63
63
  for (var n = r.next(); !n.done; ) {
64
64
  if (e = t["@@transducer/step"](e, n.value), e && e["@@transducer/reduced"]) {
65
65
  e = e["@@transducer/value"];
@@ -69,10 +69,10 @@ function ne(t, e, r) {
69
69
  }
70
70
  return t["@@transducer/result"](e);
71
71
  }
72
- function ae(t, e, r, n) {
73
- return t["@@transducer/result"](r[n](re(t["@@transducer/step"], t), e));
72
+ function se(t, e, r, n) {
73
+ return t["@@transducer/result"](r[n](ne(t["@@transducer/step"], t), e));
74
74
  }
75
- var C = /* @__PURE__ */ ee(te, ae, ne), se = /* @__PURE__ */ function() {
75
+ var C = /* @__PURE__ */ te(re, se, ae), ue = /* @__PURE__ */ function() {
76
76
  function t(e) {
77
77
  this.f = e;
78
78
  }
@@ -85,16 +85,16 @@ var C = /* @__PURE__ */ ee(te, ae, ne), se = /* @__PURE__ */ function() {
85
85
  }, t;
86
86
  }();
87
87
  function E(t) {
88
- return new se(t);
88
+ return new ue(t);
89
89
  }
90
- var P = /* @__PURE__ */ c(function(t, e, r) {
90
+ var P = /* @__PURE__ */ o(function(t, e, r) {
91
91
  return C(typeof t == "function" ? E(t) : t, e, r);
92
92
  }), I = /* @__PURE__ */ p(function(e) {
93
93
  return function() {
94
94
  return e;
95
95
  };
96
- }), ue = /* @__PURE__ */ p(function(e) {
97
- return N(P(Z, 0, z("length", e)), function() {
96
+ }), ie = /* @__PURE__ */ p(function(e) {
97
+ return N(P(z, 0, w("length", e)), function() {
98
98
  for (var r = 0, n = e.length; r < n; ) {
99
99
  if (e[r].apply(this, arguments))
100
100
  return !0;
@@ -102,52 +102,52 @@ var P = /* @__PURE__ */ c(function(t, e, r) {
102
102
  }
103
103
  return !1;
104
104
  });
105
- }), y = /* @__PURE__ */ c(function(e, r, n) {
106
- var a = e(r), u = e(n);
107
- return a < u ? -1 : a > u ? 1 : 0;
108
- }), ie = /* @__PURE__ */ p(function(e) {
105
+ }), y = /* @__PURE__ */ o(function(e, r, n) {
106
+ var a = e(r), s = e(n);
107
+ return a < s ? -1 : a > s ? 1 : 0;
108
+ }), oe = /* @__PURE__ */ p(function(e) {
109
109
  return N(e.length, e);
110
110
  });
111
111
  function ce(t, e, r) {
112
- if ($(t) && g(r)) {
113
- var n = [].concat(r);
114
- return n[t] = e, n;
112
+ if (b(t) && v(r)) {
113
+ var n = t < 0 ? r.length + t : t, a = [].concat(r);
114
+ return a[n] = e, a;
115
115
  }
116
- var a = {};
116
+ var s = {};
117
117
  for (var u in r)
118
- a[u] = r[u];
119
- return a[t] = e, a;
118
+ s[u] = r[u];
119
+ return s[t] = e, s;
120
120
  }
121
- var oe = /* @__PURE__ */ p(function(e) {
121
+ var le = /* @__PURE__ */ p(function(e) {
122
122
  return e == null;
123
- }), le = /* @__PURE__ */ c(function t(e, r, n) {
123
+ }), fe = /* @__PURE__ */ o(function t(e, r, n) {
124
124
  if (e.length === 0)
125
125
  return r;
126
126
  var a = e[0];
127
127
  if (e.length > 1) {
128
- var u = !oe(n) && T(a, n) && typeof n[a] == "object" ? n[a] : $(e[1]) ? [] : {};
129
- r = t(Array.prototype.slice.call(e, 1), r, u);
128
+ var s = U(a, n);
129
+ (le(s) || typeof s != "object") && (s = b(e[1]) ? [] : {}), r = t(Array.prototype.slice.call(e, 1), r, s);
130
130
  }
131
131
  return ce(a, r, n);
132
- }), fe = /* @__PURE__ */ c(function(e, r, n) {
133
- return le([e], r, n);
132
+ }), pe = /* @__PURE__ */ o(function(e, r, n) {
133
+ return fe([e], r, n);
134
134
  });
135
- function pe(t) {
135
+ function me(t) {
136
136
  return new RegExp(t.source, t.flags ? t.flags : (t.global ? "g" : "") + (t.ignoreCase ? "i" : "") + (t.multiline ? "m" : "") + (t.sticky ? "y" : "") + (t.unicode ? "u" : "") + (t.dotAll ? "s" : ""));
137
137
  }
138
138
  function L(t, e, r) {
139
- if (r || (r = new he()), me(t))
139
+ if (r || (r = new de()), he(t))
140
140
  return t;
141
- var n = function(u) {
142
- var s = r.get(t);
143
- if (s)
144
- return s;
145
- r.set(t, u);
141
+ var n = function(s) {
142
+ var u = r.get(t);
143
+ if (u)
144
+ return u;
145
+ r.set(t, s);
146
146
  for (var i in t)
147
- Object.prototype.hasOwnProperty.call(t, i) && (u[i] = t[i]);
148
- return u;
147
+ Object.prototype.hasOwnProperty.call(t, i) && (s[i] = t[i]);
148
+ return s;
149
149
  };
150
- switch (U(t)) {
150
+ switch (j(t)) {
151
151
  case "Object":
152
152
  return n(Object.create(Object.getPrototypeOf(t)));
153
153
  case "Array":
@@ -155,7 +155,7 @@ function L(t, e, r) {
155
155
  case "Date":
156
156
  return new Date(t.valueOf());
157
157
  case "RegExp":
158
- return pe(t);
158
+ return me(t);
159
159
  case "Int8Array":
160
160
  case "Uint8Array":
161
161
  case "Uint8ClampedArray":
@@ -172,11 +172,11 @@ function L(t, e, r) {
172
172
  return t;
173
173
  }
174
174
  }
175
- function me(t) {
175
+ function he(t) {
176
176
  var e = typeof t;
177
177
  return t == null || e != "object" && e != "function";
178
178
  }
179
- var he = /* @__PURE__ */ function() {
179
+ var de = /* @__PURE__ */ function() {
180
180
  function t() {
181
181
  this.map = {}, this.length = 0;
182
182
  }
@@ -191,60 +191,60 @@ var he = /* @__PURE__ */ function() {
191
191
  }, t.prototype.get = function(e) {
192
192
  if (this.length <= 180) {
193
193
  for (var r in this.map)
194
- for (var s = this.map[r], n = 0; n < s.length; n += 1) {
195
- var a = s[n];
194
+ for (var u = this.map[r], n = 0; n < u.length; n += 1) {
195
+ var a = u[n];
196
196
  if (a[0] === e)
197
197
  return a[1];
198
198
  }
199
199
  return;
200
200
  }
201
- var u = this.hash(e), s = this.map[u];
202
- if (s)
203
- for (var n = 0; n < s.length; n += 1) {
204
- var a = s[n];
201
+ var s = this.hash(e), u = this.map[s];
202
+ if (u)
203
+ for (var n = 0; n < u.length; n += 1) {
204
+ var a = u[n];
205
205
  if (a[0] === e)
206
206
  return a[1];
207
207
  }
208
208
  }, t;
209
209
  }();
210
- function de(t, e) {
210
+ function ye(t, e) {
211
211
  return function() {
212
212
  return e.call(this, t.apply(this, arguments));
213
213
  };
214
214
  }
215
- function _(t, e) {
215
+ function T(t, e) {
216
216
  return function() {
217
217
  var r = arguments.length;
218
218
  if (r === 0)
219
219
  return e();
220
220
  var n = arguments[r - 1];
221
- return g(n) || typeof n[t] != "function" ? e.apply(this, arguments) : n[t].apply(n, Array.prototype.slice.call(arguments, 0, r - 1));
221
+ return v(n) || typeof n[t] != "function" ? e.apply(this, arguments) : n[t].apply(n, Array.prototype.slice.call(arguments, 0, r - 1));
222
222
  };
223
223
  }
224
- var ye = /* @__PURE__ */ c(/* @__PURE__ */ _("slice", function(e, r, n) {
224
+ var ge = /* @__PURE__ */ o(/* @__PURE__ */ T("slice", function(e, r, n) {
225
225
  return Array.prototype.slice.call(n, e, r);
226
- })), ve = /* @__PURE__ */ p(/* @__PURE__ */ _("tail", /* @__PURE__ */ ye(1, 1 / 0)));
226
+ })), ve = /* @__PURE__ */ p(/* @__PURE__ */ T("tail", /* @__PURE__ */ ge(1, 1 / 0)));
227
227
  function d() {
228
228
  if (arguments.length === 0)
229
229
  throw new Error("pipe requires at least one argument");
230
- return R(arguments[0].length, P(de, arguments[0], ve(arguments)));
230
+ return R(arguments[0].length, P(ye, arguments[0], ve(arguments)));
231
231
  }
232
- var ge = /* @__PURE__ */ p(function(e) {
233
- return b(e) ? e.split("").reverse().join("") : Array.prototype.slice.call(e, 0).reverse();
232
+ var Ne = /* @__PURE__ */ p(function(e) {
233
+ return O(e) ? e.split("").reverse().join("") : Array.prototype.slice.call(e, 0).reverse();
234
234
  });
235
- function x() {
235
+ function B() {
236
236
  if (arguments.length === 0)
237
237
  throw new Error("compose requires at least one argument");
238
- return d.apply(this, ge(arguments));
238
+ return d.apply(this, Ne(arguments));
239
239
  }
240
- var Ne = /* @__PURE__ */ function() {
240
+ var Te = /* @__PURE__ */ function() {
241
241
  function t(e, r, n, a) {
242
242
  this.valueFn = e, this.valueAcc = r, this.keyFn = n, this.xf = a, this.inputs = {};
243
243
  }
244
- return t.prototype["@@transducer/init"] = j.init, t.prototype["@@transducer/result"] = function(e) {
244
+ return t.prototype["@@transducer/init"] = k.init, t.prototype["@@transducer/result"] = function(e) {
245
245
  var r;
246
246
  for (r in this.inputs)
247
- if (T(r, this.inputs) && (e = this.xf["@@transducer/step"](e, this.inputs[r]), e["@@transducer/reduced"])) {
247
+ if ($(r, this.inputs) && (e = this.xf["@@transducer/step"](e, this.inputs[r]), e["@@transducer/reduced"])) {
248
248
  e = e["@@transducer/value"];
249
249
  break;
250
250
  }
@@ -254,78 +254,77 @@ var Ne = /* @__PURE__ */ function() {
254
254
  return this.inputs[n] = this.inputs[n] || [n, L(this.valueAcc)], this.inputs[n][1] = this.valueFn(this.inputs[n][1], r), e;
255
255
  }, t;
256
256
  }();
257
- function Te(t, e, r) {
257
+ function _e(t, e, r) {
258
258
  return function(n) {
259
- return new Ne(t, e, r, n);
259
+ return new Te(t, e, r, n);
260
260
  };
261
261
  }
262
- var _e = /* @__PURE__ */ k(4, [], /* @__PURE__ */ H([], Te, function(e, r, n, a) {
263
- var u = E(function(s, i) {
264
- var o = n(i), l = e(T(o, s) ? s[o] : L(r), i);
265
- return l && l["@@transducer/reduced"] ? X(s) : (s[o] = l, s);
262
+ var Se = /* @__PURE__ */ H(4, [], /* @__PURE__ */ X([], _e, function(e, r, n, a) {
263
+ var s = E(function(u, i) {
264
+ var c = n(i), l = e($(c, u) ? u[c] : L(r), i);
265
+ return l && l["@@transducer/reduced"] ? q(u) : (u[c] = l, u);
266
266
  });
267
- return C(u, {}, a);
268
- })), Se = /* @__PURE__ */ c(function(e, r, n) {
269
- var a = e(r), u = e(n);
270
- return a > u ? -1 : a < u ? 1 : 0;
271
- }), De = /* @__PURE__ */ f(/* @__PURE__ */ _("groupBy", /* @__PURE__ */ _e(function(t, e) {
267
+ return C(s, {}, a);
268
+ })), De = /* @__PURE__ */ o(function(e, r, n) {
269
+ var a = e(r), s = e(n);
270
+ return a > s ? -1 : a < s ? 1 : 0;
271
+ }), Ie = /* @__PURE__ */ f(/* @__PURE__ */ T("groupBy", /* @__PURE__ */ Se(function(t, e) {
272
272
  return t.push(e), t;
273
- }, []))), Oe = /* @__PURE__ */ c(function(e, r, n) {
273
+ }, []))), Ae = /* @__PURE__ */ o(function(e, r, n) {
274
274
  return N(Math.max(e.length, r.length, n.length), function() {
275
275
  return e.apply(this, arguments) ? r.apply(this, arguments) : n.apply(this, arguments);
276
276
  });
277
- }), Ie = /* @__PURE__ */ f(q), Ae = /* @__PURE__ */ f(function(e, r) {
277
+ }), Oe = /* @__PURE__ */ f(Y), Re = /* @__PURE__ */ f(function(e, r) {
278
278
  return function(n) {
279
279
  return function(a) {
280
- return v(function(u) {
281
- return r(u, a);
280
+ return g(function(s) {
281
+ return r(s, a);
282
282
  }, n(e(a)));
283
283
  };
284
284
  };
285
285
  }), be = /* @__PURE__ */ p(function(e) {
286
- return Ae(m(e), fe(e));
287
- }), B = function(t) {
286
+ return Re(m(e), pe(e));
287
+ }), W = function(t) {
288
288
  return {
289
289
  value: t,
290
290
  map: function(e) {
291
- return B(e(t));
291
+ return W(e(t));
292
292
  }
293
293
  };
294
- }, Re = /* @__PURE__ */ c(function(e, r, n) {
294
+ }, $e = /* @__PURE__ */ o(function(e, r, n) {
295
295
  return e(function(a) {
296
- return B(r(a));
296
+ return W(r(a));
297
297
  })(n).value;
298
- }), $e = /* @__PURE__ */ c(function(e, r, n) {
298
+ }), Me = /* @__PURE__ */ o(function(e, r, n) {
299
299
  return n.replace(e, r);
300
- }), Me = /* @__PURE__ */ f(function(e, r) {
300
+ }), Ce = /* @__PURE__ */ f(function(e, r) {
301
301
  return Array.prototype.slice.call(r, 0).sort(e);
302
- }), W = /* @__PURE__ */ f(function(e, r) {
302
+ }), x = /* @__PURE__ */ f(function(e, r) {
303
303
  return Array.prototype.slice.call(r, 0).sort(function(n, a) {
304
- for (var u = 0, s = 0; u === 0 && s < e.length; )
305
- u = e[s](n, a), s += 1;
306
- return u;
304
+ for (var s = 0, u = 0; s === 0 && u < e.length; )
305
+ s = e[u](n, a), u += 1;
306
+ return s;
307
307
  });
308
- }), A = /* @__PURE__ */ Y(0, "toLowerCase");
309
- function Ge(t, e = "body") {
308
+ }), A = /* @__PURE__ */ K(0, "toLowerCase");
309
+ function Ue(t, e = "body") {
310
310
  if (!t)
311
311
  return;
312
312
  if (typeof e != "string") {
313
- e == null || e.append(t);
313
+ e?.append(t);
314
314
  return;
315
315
  }
316
- const r = document.querySelector(e);
317
- r == null || r.append(t);
316
+ document.querySelector(e)?.append(t);
318
317
  }
319
- function Ue(t, e = () => ({})) {
318
+ function je(t, e = () => ({})) {
320
319
  return t.slice().sort((r, n) => {
321
- const a = e(r), u = e(n);
322
- if (a === null || u === null)
320
+ const a = e(r), s = e(n);
321
+ if (a === null || s === null)
323
322
  return 0;
324
- const s = a.compareDocumentPosition(u);
325
- return s & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : s & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
323
+ const u = a.compareDocumentPosition(s);
324
+ return u & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : u & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
326
325
  });
327
326
  }
328
- function je(t = []) {
327
+ function ke(t = []) {
329
328
  return {
330
329
  result: [...t],
331
330
  filteredRowsLength: 0,
@@ -340,9 +339,9 @@ function je(t = []) {
340
339
  filter(e, r = [], n = !1) {
341
340
  if (e) {
342
341
  const a = r.map(
343
- (i) => n ? d(K(i), D(e)) : d(m(i), A, Ie(A(e)))
344
- ), u = ie((i) => i.name ? Re(be("name"), $e(",", ""), i) : i), s = J(d(u, ue([...a])), this.result);
345
- this.isFiltered = !0, this.filteredRowsLength = s.length, this.result = s;
342
+ (i) => n ? d(J(i), S(e)) : d(m(i), A, Oe(A(e)))
343
+ ), s = oe((i) => i.name ? $e(be("name"), Me(",", ""), i) : i), u = Q(d(s, ie([...a])), this.result);
344
+ this.isFiltered = !0, this.filteredRowsLength = u.length, this.result = u;
346
345
  }
347
346
  return this;
348
347
  },
@@ -351,13 +350,13 @@ function je(t = []) {
351
350
  return this;
352
351
  if (e.orders[0].direction === F)
353
352
  return this;
354
- const r = Oe(D(G), I(y), I(Se));
355
- return this.result = W(e.orders.map((n) => x(r(n.direction), m)(n.target)))(this.result), this;
353
+ const r = Ae(S(G), I(y), I(De));
354
+ return this.result = x(e.orders.map((n) => B(r(n.direction), m)(n.target)))(this.result), this;
356
355
  },
357
356
  addIndex(e = null) {
358
357
  return this.result.reduce((r, n, a) => {
359
- const u = r[r.length - 1] || [], s = e && u[e] === n[e];
360
- return n.index = s ? u.index : a + 1, n.indexClass = s ? "is-duplicated" : null, r.push(n), r;
358
+ const s = r[r.length - 1] || [], u = e && s[e] === n[e];
359
+ return n.index = u ? s.index : a + 1, n.indexClass = u ? "is-duplicated" : null, r.push(n), r;
361
360
  }, []), this;
362
361
  },
363
362
  addContinuousIndex() {
@@ -379,7 +378,7 @@ function je(t = []) {
379
378
  playerName() {
380
379
  return this.result = this.result.map((e) => ({
381
380
  ...e,
382
- name: Be(e)
381
+ name: xe(e)
383
382
  })), this;
384
383
  },
385
384
  teamName() {
@@ -403,136 +402,126 @@ function je(t = []) {
403
402
  return this.result = this.result.map((r) => (e.map((n) => r[n] ? r[`${n}Sec`] = M(r[n]) : r), r)), this;
404
403
  },
405
404
  groupByDays() {
406
- return this.currentItems = this.result.length, this.result = De((e) => h(e.gameDate, "YYYY-MM-DD"))(this.result), this;
405
+ return this.currentItems = this.result.length, this.result = Ie((e) => h(e.gameDate, "YYYY-MM-DD"))(this.result), this;
407
406
  },
408
407
  slice(e = 3) {
409
408
  return this.result = this.result.slice(0, e), this;
410
409
  }
411
410
  };
412
411
  }
413
- const ke = (t, ...e) => v(x(...e))(t);
414
- function He(t) {
415
- var e, r, n, a;
412
+ const He = (t, ...e) => g(B(...e))(t);
413
+ function Xe(t) {
416
414
  return {
417
415
  ...t,
418
416
  ...t.lastName && t.firstName && { name: `${t.lastName} ${t.firstName}` },
419
- ...((e = t.player) == null ? void 0 : e.playerId) && { name: `${t.player.lastName} ${t.player.firstName}` },
420
- ...((r = t.player) == null ? void 0 : r.id) && { name: `${t.player.lastName} ${t.player.firstName}` },
421
- ...((n = t.player) == null ? void 0 : n.nationality) && {
422
- name: (a = t.player) != null && a.nationality.includes("hu") ? `${t.player.lastName} ${t.player.firstName}` : `${t.player.lastName}, ${t.player.firstName}`
417
+ ...t.player?.playerId && { name: `${t.player.lastName} ${t.player.firstName}` },
418
+ ...t.player?.id && { name: `${t.player.lastName} ${t.player.firstName}` },
419
+ ...t.player?.nationality && {
420
+ name: t.player?.nationality.includes("hu") ? `${t.player.lastName} ${t.player.firstName}` : `${t.player.lastName}, ${t.player.firstName}`
423
421
  },
424
422
  ...t.nationality && {
425
423
  name: t.nationality.includes("hu") ? `${t.lastName} ${t.firstName}` : `${t.lastName}, ${t.firstName}`
426
424
  }
427
425
  };
428
426
  }
429
- function Xe(t) {
430
- var e;
427
+ function qe(t) {
431
428
  return {
432
429
  ...t,
433
- ...((e = t == null ? void 0 : t.team) == null ? void 0 : e.id) && { teamName: t.team.longName }
430
+ ...t?.team?.id && { teamName: t.team.longName }
434
431
  };
435
432
  }
436
- function qe(t = "", e = "hu") {
433
+ function Ye(t = "", e = "hu") {
437
434
  return (r) => ({
438
435
  ...r,
439
436
  gameDateDate: h(r.gameDate, "L dddd", t, e),
440
437
  gameDateTime: h(r.gameDate, "HH:mm", t, e)
441
438
  });
442
439
  }
443
- function Ye(t) {
440
+ function Ke(t) {
444
441
  return (e) => ({
445
442
  ...e,
446
- gameResult: Le(e)
443
+ gameResult: Be(e)
447
444
  });
448
445
  }
449
- function Ke(t) {
446
+ function Je(t) {
450
447
  return {
451
448
  ...t,
452
- opponent: Pe(t)
449
+ opponent: Le(t)
453
450
  };
454
451
  }
455
- function Je(t) {
452
+ function Qe(t) {
456
453
  return {
457
454
  ...t,
458
- resultType: xe(t)
455
+ resultType: We(t)
459
456
  };
460
457
  }
461
- function Qe(t) {
458
+ function Ve(t) {
462
459
  return {
463
460
  ...t,
464
461
  rowClasses: t.optional ? "is-optional" : ""
465
462
  };
466
463
  }
467
- function Ve(t = []) {
468
- return (e) => {
469
- var r;
470
- return {
471
- ...e,
472
- [t]: (r = e[t]) == null ? void 0 : r.toUpperCase()
473
- };
474
- };
475
- }
476
464
  function Ze(t = []) {
477
- return (e) => (t.map((r) => e[r] ? e[`${r}Sec`] = M(e[r]) : e), e);
465
+ return (e) => ({
466
+ ...e,
467
+ [t]: e[t]?.toUpperCase()
468
+ });
478
469
  }
479
470
  function ze(t = []) {
480
- return (e) => (t.map((r) => e[r] ? e[`${r}Min`] = Q(e[r]) : e), e);
471
+ return (e) => (t.map((r) => e[r] ? e[`${r}Sec`] = M(e[r]) : e), e);
481
472
  }
482
473
  function we(t = []) {
483
- return (e) => (t.map((r) => e[`${r}Min`] = V(e[r])), e);
474
+ return (e) => (t.map((r) => e[r] ? e[`${r}Min`] = V(e[r]) : e), e);
484
475
  }
485
- function et(t) {
486
- var e, r;
476
+ function et(t = []) {
477
+ return (e) => (t.map((r) => e[`${r}Min`] = Z(e[r])), e);
478
+ }
479
+ function tt(t) {
487
480
  return {
488
481
  ...t,
489
- periodResults: ((r = (e = t.result) == null ? void 0 : e.match(/\(.*?\)/)) == null ? void 0 : r[0]) ?? ""
482
+ periodResults: t.result?.match(/\(.*?\)/)?.[0] ?? ""
490
483
  };
491
484
  }
492
- const Ce = (t, e) => new Date(t.gameDate).getTime() - new Date(e.gameDate).getTime(), tt = W([Ce, y(m("id")), y(m("gameId"))]), Ee = (t) => (e, r) => e[t].localeCompare(r[t], "hu"), rt = Me(Ee("name"));
493
- function Pe(t) {
494
- var e;
495
- return [t.isHomeGame ? null : "@", (e = t.opponent) == null ? void 0 : e.shortName].join(" ");
496
- }
485
+ const Ee = (t, e) => new Date(t.gameDate).getTime() - new Date(e.gameDate).getTime(), rt = x([Ee, y(m("id")), y(m("gameId"))]), Pe = (t) => (e, r) => e[t].localeCompare(r[t], "hu"), nt = Ce(Pe("name"));
497
486
  function Le(t) {
498
- let e = t == null ? void 0 : t.homeTeamScore, r = t == null ? void 0 : t.awayTeamScore;
499
- return t.isHomeGame || (e = t == null ? void 0 : t.awayTeamScore, r = t == null ? void 0 : t.homeTeamScore), [e, r].join(":");
487
+ return [t.isHomeGame ? null : "@", t.opponent?.shortName].join(" ");
500
488
  }
501
- function xe(t) {
489
+ function Be(t) {
490
+ let e = t?.homeTeamScore, r = t?.awayTeamScore;
491
+ return t.isHomeGame || (e = t?.awayTeamScore, r = t?.homeTeamScore), [e, r].join(":");
492
+ }
493
+ function We(t) {
502
494
  const e = t.gameResult.split(":"), r = e[0] > e[1], n = e[0] < e[1];
503
495
  return r && t.isOvertime ? "OTW" : r && t.isShootout ? "SOW" : r ? "W" : n && t.isOvertime ? "OTL" : n && t.isShootout ? "SOL" : n ? "L" : "D";
504
496
  }
505
- function nt(t) {
506
- return t.map((e) => {
507
- var r, n;
508
- return {
509
- phaseId: e.phaseId,
510
- phaseName: Object.values({
511
- phaseName: e.phaseName,
512
- ...((r = e.phaseType) == null ? void 0 : r.phaseTypeName) && e.phaseType.phaseTypeName !== e.phaseName && {
513
- phaseTypeName: e.phaseType.phaseTypeName
514
- },
515
- ...((n = e.phaseSubType) == null ? void 0 : n.phaseSubTypeName) && { phaseSubTypeName: e.phaseSubType.phaseSubTypeName }
516
- }).join("-")
517
- };
518
- });
497
+ function at(t) {
498
+ return t.map((e) => ({
499
+ phaseId: e.phaseId,
500
+ phaseName: Object.values({
501
+ phaseName: e.phaseName,
502
+ ...e.phaseType?.phaseTypeName && e.phaseType.phaseTypeName !== e.phaseName && {
503
+ phaseTypeName: e.phaseType.phaseTypeName
504
+ },
505
+ ...e.phaseSubType?.phaseSubTypeName && { phaseSubTypeName: e.phaseSubType.phaseSubTypeName }
506
+ }).join("-")
507
+ }));
519
508
  }
520
- function Be(t) {
509
+ function xe(t) {
521
510
  return t.player ? t.player.nationality.includes("hu") ? `${t.player.lastName} ${t.player.firstName}` : `${t.player.lastName}, ${t.player.firstName}` : `${t.lastName} ${t.firstName}`;
522
511
  }
523
- class at extends Error {
512
+ class st extends Error {
524
513
  constructor(e, r = {}) {
525
514
  const { key: n, cause: a } = r;
526
515
  super(e), this.name = "WidgetError", this.key = n, this.cause = a;
527
516
  }
528
517
  }
529
- const st = {
518
+ const ut = {
530
519
  message: "Undefined Column name Message",
531
520
  options: {
532
521
  key: "undefined-column",
533
522
  cause: {}
534
523
  }
535
- }, ut = {
524
+ }, it = {
536
525
  message: "Invalid season name",
537
526
  options: {
538
527
  key: "invalid-season-name",
@@ -540,26 +529,26 @@ const st = {
540
529
  }
541
530
  };
542
531
  export {
543
- ut as I,
544
- st as U,
545
- at as W,
546
- Ye as a,
547
- Ke as b,
548
- je as c,
549
- Je as d,
550
- Ze as e,
551
- ze as f,
552
- qe as g,
553
- we as h,
554
- et as i,
555
- tt as j,
556
- nt as k,
557
- rt as l,
558
- Ge as m,
559
- Ue as n,
560
- He as p,
561
- ke as r,
562
- Qe as s,
563
- Xe as t,
564
- Ve as u
532
+ it as I,
533
+ ut as U,
534
+ st as W,
535
+ Ke as a,
536
+ Je as b,
537
+ ke as c,
538
+ Qe as d,
539
+ ze as e,
540
+ we as f,
541
+ Ye as g,
542
+ et as h,
543
+ tt as i,
544
+ rt as j,
545
+ at as k,
546
+ nt as l,
547
+ Ue as m,
548
+ je as n,
549
+ Xe as p,
550
+ He as r,
551
+ Ve as s,
552
+ qe as t,
553
+ Ze as u
565
554
  };