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