@mjsz-vbr-elements/core 2.9.1 → 2.11.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,730 +0,0 @@
1
- /**
2
- * name: @mjsz-vbr-elements/core
3
- * version: v2.9.1 - 09/01/2025, 16:02:42
4
- * (c) 2025
5
- * description: Data visualization for MJSZ VBR
6
- * author: Ákos Stegner <akos.stegner@gmail.com>
7
- */
8
- import { ref as A, readonly as ut, watch as S, nextTick as lt, getCurrentScope as St, onScopeDispose as Ct, unref as I, isRef as Pt, shallowRef as nt, computed as j, reactive as ft, defineComponent as Rt, h as jt, provide as dt, inject as pt, onErrorCaptured as _t } from "vue";
9
- import { _ as U, w as Lt, x as Nt, z as Dt, A as Ft, B as kt, C as Bt, D, E as F, F as Wt, u as zt, G as Mt, H as Ut, I as rt } from "./datetime-BzdN4htO.js";
10
- import { SORT_STATE_ORIGINAL as B, SORT_STATE_DESCEND as H, SORT_STATE_ASCEND as z } from "./constants.js";
11
- const Ae = (t) => "mjsz-vbr-" + t;
12
- function mt(t) {
13
- return St() ? (Ct(t), !0) : !1;
14
- }
15
- function O(t) {
16
- return typeof t == "function" ? t() : I(t);
17
- }
18
- const G = typeof window < "u" && typeof document < "u";
19
- typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
20
- const $t = Object.prototype.toString, Gt = (t) => $t.call(t) === "[object Object]", R = () => {
21
- }, Vt = /* @__PURE__ */ qt();
22
- function qt() {
23
- var t, e;
24
- return G && ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
25
- }
26
- function Ht(t, e) {
27
- function r(...n) {
28
- return new Promise((i, o) => {
29
- Promise.resolve(t(() => e.apply(this, n), { fn: e, thisArg: this, args: n })).then(i).catch(o);
30
- });
31
- }
32
- return r;
33
- }
34
- const yt = (t) => t();
35
- function Kt(t = yt) {
36
- const e = A(!0);
37
- function r() {
38
- e.value = !1;
39
- }
40
- function n() {
41
- e.value = !0;
42
- }
43
- const i = (...o) => {
44
- e.value && t(...o);
45
- };
46
- return { isActive: ut(e), pause: r, resume: n, eventFilter: i };
47
- }
48
- function J(t, e = !1, r = "Timeout") {
49
- return new Promise((n, i) => {
50
- setTimeout(e ? () => i(r) : n, t);
51
- });
52
- }
53
- function Jt(t, e, r = {}) {
54
- const {
55
- eventFilter: n = yt,
56
- ...i
57
- } = r;
58
- return S(
59
- t,
60
- Ht(
61
- n,
62
- e
63
- ),
64
- i
65
- );
66
- }
67
- function Te(t, e, r = {}) {
68
- const {
69
- eventFilter: n,
70
- ...i
71
- } = r, { eventFilter: o, pause: s, resume: c, isActive: u } = Kt(n);
72
- return { stop: Jt(
73
- t,
74
- e,
75
- {
76
- ...i,
77
- eventFilter: o
78
- }
79
- ), pause: s, resume: c, isActive: u };
80
- }
81
- function Q(t, e = !1) {
82
- function r(l, { flush: a = "sync", deep: f = !1, timeout: d, throwOnTimeout: T } = {}) {
83
- let w = null;
84
- const b = [new Promise((E) => {
85
- w = S(
86
- t,
87
- (y) => {
88
- l(y) !== e && (w == null || w(), E(y));
89
- },
90
- {
91
- flush: a,
92
- deep: f,
93
- immediate: !0
94
- }
95
- );
96
- })];
97
- return d != null && b.push(
98
- J(d, T).then(() => O(t)).finally(() => w == null ? void 0 : w())
99
- ), Promise.race(b);
100
- }
101
- function n(l, a) {
102
- if (!Pt(l))
103
- return r((y) => y === l, a);
104
- const { flush: f = "sync", deep: d = !1, timeout: T, throwOnTimeout: w } = a ?? {};
105
- let v = null;
106
- const E = [new Promise((y) => {
107
- v = S(
108
- [t, l],
109
- ([_, k]) => {
110
- e !== (_ === k) && (v == null || v(), y(_));
111
- },
112
- {
113
- flush: f,
114
- deep: d,
115
- immediate: !0
116
- }
117
- );
118
- })];
119
- return T != null && E.push(
120
- J(T, w).then(() => O(t)).finally(() => (v == null || v(), O(t)))
121
- ), Promise.race(E);
122
- }
123
- function i(l) {
124
- return r((a) => !!a, l);
125
- }
126
- function o(l) {
127
- return n(null, l);
128
- }
129
- function s(l) {
130
- return n(void 0, l);
131
- }
132
- function c(l) {
133
- return r(Number.isNaN, l);
134
- }
135
- function u(l, a) {
136
- return r((f) => {
137
- const d = Array.from(f);
138
- return d.includes(l) || d.includes(O(l));
139
- }, a);
140
- }
141
- function p(l) {
142
- return m(1, l);
143
- }
144
- function m(l = 1, a) {
145
- let f = -1;
146
- return r(() => (f += 1, f >= l), a);
147
- }
148
- return Array.isArray(O(t)) ? {
149
- toMatch: r,
150
- toContains: u,
151
- changed: p,
152
- changedTimes: m,
153
- get not() {
154
- return Q(t, !e);
155
- }
156
- } : {
157
- toMatch: r,
158
- toBe: n,
159
- toBeTruthy: i,
160
- toBeNull: o,
161
- toBeNaN: c,
162
- toBeUndefined: s,
163
- changed: p,
164
- changedTimes: m,
165
- get not() {
166
- return Q(t, !e);
167
- }
168
- };
169
- }
170
- function Qt(t) {
171
- return Q(t);
172
- }
173
- function Xt(t, e, r = {}) {
174
- const {
175
- immediate: n = !0
176
- } = r, i = A(!1);
177
- let o = null;
178
- function s() {
179
- o && (clearTimeout(o), o = null);
180
- }
181
- function c() {
182
- i.value = !1, s();
183
- }
184
- function u(...p) {
185
- s(), i.value = !0, o = setTimeout(() => {
186
- i.value = !1, o = null, t(...p);
187
- }, O(e));
188
- }
189
- return n && (i.value = !0, G && u()), mt(c), {
190
- isPending: ut(i),
191
- start: u,
192
- stop: c
193
- };
194
- }
195
- function Yt(t, e, r) {
196
- const n = S(t, (...i) => (lt(() => n()), e(...i)), r);
197
- return n;
198
- }
199
- function Ee(t, e, r) {
200
- const n = S(
201
- t,
202
- (i, o, s) => {
203
- i && (r != null && r.once && lt(() => n()), e(i, o, s));
204
- },
205
- {
206
- ...r,
207
- once: !1
208
- }
209
- );
210
- return n;
211
- }
212
- function N(t) {
213
- var e;
214
- const r = O(t);
215
- return (e = r == null ? void 0 : r.$el) != null ? e : r;
216
- }
217
- const vt = G ? window : void 0, Zt = G ? window.document : void 0;
218
- function M(...t) {
219
- let e, r, n, i;
220
- if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([r, n, i] = t, e = vt) : [e, r, n, i] = t, !e)
221
- return R;
222
- Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);
223
- const o = [], s = () => {
224
- o.forEach((m) => m()), o.length = 0;
225
- }, c = (m, l, a, f) => (m.addEventListener(l, a, f), () => m.removeEventListener(l, a, f)), u = S(
226
- () => [N(e), O(i)],
227
- ([m, l]) => {
228
- if (s(), !m)
229
- return;
230
- const a = Gt(l) ? { ...l } : l;
231
- o.push(
232
- ...r.flatMap((f) => n.map((d) => c(m, f, d, a)))
233
- );
234
- },
235
- { immediate: !0, flush: "post" }
236
- ), p = () => {
237
- u(), s();
238
- };
239
- return mt(p), p;
240
- }
241
- let ot = !1;
242
- function Ie(t, e, r = {}) {
243
- const { window: n = vt, ignore: i = [], capture: o = !0, detectIframe: s = !1 } = r;
244
- if (!n)
245
- return R;
246
- Vt && !ot && (ot = !0, Array.from(n.document.body.children).forEach((a) => a.addEventListener("click", R)), n.document.documentElement.addEventListener("click", R));
247
- let c = !0;
248
- const u = (a) => i.some((f) => {
249
- if (typeof f == "string")
250
- return Array.from(n.document.querySelectorAll(f)).some((d) => d === a.target || a.composedPath().includes(d));
251
- {
252
- const d = N(f);
253
- return d && (a.target === d || a.composedPath().includes(d));
254
- }
255
- }), m = [
256
- M(n, "click", (a) => {
257
- const f = N(t);
258
- if (!(!f || f === a.target || a.composedPath().includes(f))) {
259
- if (a.detail === 0 && (c = !u(a)), !c) {
260
- c = !0;
261
- return;
262
- }
263
- e(a);
264
- }
265
- }, { passive: !0, capture: o }),
266
- M(n, "pointerdown", (a) => {
267
- const f = N(t);
268
- c = !u(a) && !!(f && !a.composedPath().includes(f));
269
- }, { passive: !0 }),
270
- s && M(n, "blur", (a) => {
271
- setTimeout(() => {
272
- var f;
273
- const d = N(t);
274
- ((f = n.document.activeElement) == null ? void 0 : f.tagName) === "IFRAME" && !(d != null && d.contains(n.document.activeElement)) && e(a);
275
- }, 0);
276
- })
277
- ].filter(Boolean);
278
- return () => m.forEach((a) => a());
279
- }
280
- function te(t, e, r) {
281
- const {
282
- immediate: n = !0,
283
- delay: i = 0,
284
- onError: o = R,
285
- onSuccess: s = R,
286
- resetOnExecute: c = !0,
287
- shallow: u = !0,
288
- throwError: p
289
- } = r ?? {}, m = u ? nt(e) : A(e), l = A(!1), a = A(!1), f = nt(void 0);
290
- async function d(v = 0, ...b) {
291
- c && (m.value = e), f.value = void 0, l.value = !1, a.value = !0, v > 0 && await J(v);
292
- const E = typeof t == "function" ? t(...b) : t;
293
- try {
294
- const y = await E;
295
- m.value = y, l.value = !0, s(y);
296
- } catch (y) {
297
- if (f.value = y, o(y), p)
298
- throw y;
299
- } finally {
300
- a.value = !1;
301
- }
302
- return m.value;
303
- }
304
- n && d(i);
305
- const T = {
306
- state: m,
307
- isReady: l,
308
- isLoading: a,
309
- error: f,
310
- execute: d
311
- };
312
- function w() {
313
- return new Promise((v, b) => {
314
- Qt(a).toBe(!1).then(() => v(T)).catch(b);
315
- });
316
- }
317
- return {
318
- ...T,
319
- then(v, b) {
320
- return w().then(v, b);
321
- }
322
- };
323
- }
324
- function Oe(t = {}) {
325
- const { document: e = Zt } = t;
326
- if (!e)
327
- return A("visible");
328
- const r = A(e.visibilityState);
329
- return M(e, "visibilitychange", () => {
330
- r.value = e.visibilityState;
331
- }), r;
332
- }
333
- async function ee(t) {
334
- return new Promise((e, r) => {
335
- const n = new Image(), { src: i, srcset: o, sizes: s, class: c, loading: u, crossorigin: p, referrerPolicy: m } = t;
336
- n.src = i, o && (n.srcset = o), s && (n.sizes = s), c && (n.className = c), u && (n.loading = u), p && (n.crossOrigin = p), m && (n.referrerPolicy = m), n.onload = () => e(n), n.onerror = r;
337
- });
338
- }
339
- function xe(t, e = {}) {
340
- const r = te(
341
- () => ee(O(t)),
342
- void 0,
343
- {
344
- resetOnExecute: !0,
345
- ...e
346
- }
347
- );
348
- return S(
349
- () => O(t),
350
- () => r.execute(e.delay),
351
- { deep: !0 }
352
- ), r;
353
- }
354
- function Se(t = [], e = {}) {
355
- const { delay: r = 0 } = e, n = A(!1), i = j(() => {
356
- const c = I(t);
357
- return Array.isArray(c) ? c.map((u) => I(u)).some(Boolean) : c;
358
- }), { start: o, stop: s } = Xt(() => {
359
- n.value = !0;
360
- }, r);
361
- return S(
362
- i,
363
- (c) => {
364
- if (c) return o();
365
- s(), n.value = !1;
366
- },
367
- { immediate: !0, deep: !0 }
368
- ), n;
369
- }
370
- function ne(t) {
371
- var e = Object.prototype.toString.call(t);
372
- return e === "[object Uint8ClampedArray]" || e === "[object Int8Array]" || e === "[object Uint8Array]" || e === "[object Int16Array]" || e === "[object Uint16Array]" || e === "[object Int32Array]" || e === "[object Uint32Array]" || e === "[object Float32Array]" || e === "[object Float64Array]" || e === "[object BigInt64Array]" || e === "[object BigUint64Array]";
373
- }
374
- var re = /* @__PURE__ */ U(function(e) {
375
- return e != null && typeof e["fantasy-land/empty"] == "function" ? e["fantasy-land/empty"]() : e != null && e.constructor != null && typeof e.constructor["fantasy-land/empty"] == "function" ? e.constructor["fantasy-land/empty"]() : e != null && typeof e.empty == "function" ? e.empty() : e != null && e.constructor != null && typeof e.constructor.empty == "function" ? e.constructor.empty() : Lt(e) ? [] : Nt(e) ? "" : Dt(e) ? {} : Ft(e) ? /* @__PURE__ */ function() {
376
- return arguments;
377
- }() : ne(e) ? e.constructor.from("") : void 0;
378
- }), oe = /* @__PURE__ */ U(function(e) {
379
- return e != null && kt(e, re(e));
380
- }), ie = /* @__PURE__ */ Bt(function(e, r) {
381
- for (var n = {}, i = {}, o = 0, s = e.length; o < s; )
382
- i[e[o]] = 1, o += 1;
383
- for (var c in r)
384
- i.hasOwnProperty(c) || (n[c] = r[c]);
385
- return n;
386
- }), L = `
387
- \v\f\r                 \u2028\u2029\uFEFF`, ae = "​", se = typeof String.prototype.trim == "function", $ = !se || /* @__PURE__ */ L.trim() || !/* @__PURE__ */ ae.trim() ? /* @__PURE__ */ U(function(e) {
388
- var r = new RegExp("^[" + L + "][" + L + "]*"), n = new RegExp("[" + L + "][" + L + "]*$");
389
- return e.replace(r, "").replace(n, "");
390
- }) : /* @__PURE__ */ U(function(e) {
391
- return e.trim();
392
- });
393
- const gt = Symbol("I18nContext"), h = ft({
394
- messages: {},
395
- locale: "",
396
- fallbackLocale: ""
397
- }), Ce = ({ messages: t = {}, locale: e = "", fallbackLocale: r = "" }) => {
398
- h.messages = t, h.locale = e, h.fallbackLocale = r;
399
- const n = (u, p = {}) => {
400
- const m = !oe(p), l = D($, F(".", u));
401
- return j(() => {
402
- const f = ht(l);
403
- return m ? le(f, p) : f;
404
- }).value;
405
- }, i = (u) => {
406
- const p = D($, F(".", u));
407
- return !!X(h.locale, p, h.messages);
408
- }, o = (u) => {
409
- h.locale = u;
410
- }, c = {
411
- locale: j({
412
- get() {
413
- return h.locale;
414
- },
415
- set(u) {
416
- h.locale = u;
417
- }
418
- }),
419
- setLocale: o,
420
- translate: n,
421
- hasTranslation: i
422
- };
423
- return dt(gt, c), {
424
- translate: n
425
- };
426
- }, ce = (t) => {
427
- t && (h.messages = t.messages, h.locale = t.locale, h.fallbackLocale = t.fallbackLocale);
428
- const e = ue();
429
- return {
430
- locale: e.locale,
431
- t: e.translate,
432
- setLocale: e.setLocale,
433
- hasTranslation: e.hasTranslation
434
- };
435
- }, ue = () => {
436
- const t = pt(gt, null);
437
- if (t === null)
438
- throw new Error("Privider is missing a parent component.");
439
- return t;
440
- }, ht = (t = []) => {
441
- let e = X(h.locale, t, h.messages);
442
- return !e && h.fallbackLocale && (e = X(h.fallbackLocale, t, h.messages)), e || t.join(".");
443
- };
444
- function X(t, e, r) {
445
- return Wt([t, ...e], r);
446
- }
447
- const le = function(t, e) {
448
- return t.replace(/\{(\w+)\}/g, function(r, n) {
449
- return e[n];
450
- });
451
- }, Pe = Rt({
452
- props: {
453
- tag: {
454
- type: String,
455
- default: "div"
456
- },
457
- path: {
458
- type: String,
459
- defult: ""
460
- }
461
- },
462
- setup(t, { slots: e }) {
463
- const r = D($, F(".", t.path)), n = ht(r), i = F(/{|}/, n), o = Object.keys(e).map((s) => {
464
- const c = i.indexOf(s);
465
- return c > -1 && (i[c] = e[s]()[0]), i;
466
- });
467
- return () => jt(t.tag, o);
468
- }
469
- }), wt = Symbol("ErrorProviderContext"), Re = () => {
470
- const t = A(""), e = A({}), r = (o) => {
471
- console.error({ error: o }), t.value = o.message || o.error.message, e.value = {
472
- message: o.message,
473
- key: o.key || zt(o.message),
474
- cause: o.cause
475
- };
476
- };
477
- return dt(wt, {
478
- onError: r,
479
- reset: () => {
480
- t.value = "", e.value = {};
481
- }
482
- }), window.onerror = (o) => {
483
- console.error("WINDOW_ONERROR:", o);
484
- }, _t((o, s, c) => {
485
- console.error("onErrorCaptured:", o, s, c);
486
- }), {
487
- hasError: j(() => t.value.length > 0),
488
- message: t,
489
- error: e,
490
- onError: r
491
- };
492
- }, je = () => {
493
- const t = fe();
494
- return {
495
- onError: t.onError,
496
- reset: t.reset
497
- };
498
- }, fe = () => {
499
- const t = pt(wt, null);
500
- if (t === null)
501
- throw new Error("Privider is missing a parent component.");
502
- return t;
503
- }, _e = (t, e = "", r = {}) => {
504
- const n = A(""), { t: i } = ce(), o = j(() => {
505
- if (I(e))
506
- try {
507
- const u = de(I(t), I(e));
508
- return ie(u, I(t));
509
- } catch (u) {
510
- n.value = u;
511
- }
512
- return I(t);
513
- }), s = (u) => ({
514
- ...u,
515
- ...u.label && { label: i(u.label ?? "", I(r)) },
516
- ...u.tooltip && { tooltip: i(u.tooltip ?? "") }
517
- });
518
- return {
519
- columns: j(() => D(s, o.value)),
520
- error: n
521
- };
522
- }, de = (t, e = "") => {
523
- const r = D($, F(",", e)), n = Mt(t);
524
- if (r[0] === "") return resolve([]);
525
- const i = r.findIndex((o) => !n.includes(o));
526
- if (i > -1)
527
- throw r[i];
528
- return r;
529
- };
530
- /*! *****************************************************************************
531
- Copyright (c) Microsoft Corporation.
532
-
533
- Permission to use, copy, modify, and/or distribute this software for any
534
- purpose with or without fee is hereby granted.
535
-
536
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
537
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
538
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
539
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
540
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
541
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
542
- PERFORMANCE OF THIS SOFTWARE.
543
- ***************************************************************************** */
544
- function K(t, e) {
545
- var r = typeof Symbol == "function" && t[Symbol.iterator];
546
- if (!r) return t;
547
- var n, i, o = r.call(t), s = [];
548
- try {
549
- for (; (e === void 0 || e-- > 0) && !(n = o.next()).done; ) s.push(n.value);
550
- } catch (c) {
551
- i = { error: c };
552
- } finally {
553
- try {
554
- n && !n.done && (r = o.return) && r.call(o);
555
- } finally {
556
- if (i) throw i.error;
557
- }
558
- }
559
- return s;
560
- }
561
- var it;
562
- (function(t) {
563
- t[t.NotStarted = 0] = "NotStarted", t[t.Running = 1] = "Running", t[t.Stopped = 2] = "Stopped";
564
- })(it || (it = {}));
565
- var pe = { type: "xstate.init" };
566
- function W(t) {
567
- return t === void 0 ? [] : [].concat(t);
568
- }
569
- function at(t, e) {
570
- return typeof (t = typeof t == "string" && e && e[t] ? e[t] : t) == "string" ? { type: t } : typeof t == "function" ? { type: t.name, exec: t } : t;
571
- }
572
- function Y(t) {
573
- return function(e) {
574
- return t === e;
575
- };
576
- }
577
- function me(t) {
578
- return typeof t == "string" ? { type: t } : t;
579
- }
580
- function st(t, e) {
581
- return { value: t, context: e, actions: [], changed: !1, matches: Y(t) };
582
- }
583
- function ct(t, e, r) {
584
- var n = e, i = !1;
585
- return [t.filter(function(o) {
586
- if (o.type === "xstate.assign") {
587
- i = !0;
588
- var s = Object.assign({}, n);
589
- return typeof o.assignment == "function" ? s = o.assignment(n, r) : Object.keys(o.assignment).forEach(function(c) {
590
- s[c] = typeof o.assignment[c] == "function" ? o.assignment[c](n, r) : o.assignment[c];
591
- }), n = s, !1;
592
- }
593
- return !0;
594
- }), n, i];
595
- }
596
- function ye(t, e) {
597
- e === void 0 && (e = {});
598
- var r = K(ct(W(t.states[t.initial].entry).map(function(s) {
599
- return at(s, e.actions);
600
- }), t.context, pe), 2), n = r[0], i = r[1], o = { config: t, _options: e, initialState: { value: t.initial, actions: n, context: i, matches: Y(t.initial) }, transition: function(s, c) {
601
- var u, p, m = typeof s == "string" ? { value: s, context: t.context } : s, l = m.value, a = m.context, f = me(c), d = t.states[l];
602
- if (d.on) {
603
- var T = W(d.on[f.type]);
604
- "*" in d.on && T.push.apply(T, function(g, x, q) {
605
- if (arguments.length === 2) for (var C, P = 0, xt = x.length; P < xt; P++) !C && P in x || (C || (C = Array.prototype.slice.call(x, 0, P)), C[P] = x[P]);
606
- return g.concat(C || Array.prototype.slice.call(x));
607
- }([], K(W(d.on["*"])), !1));
608
- try {
609
- for (var w = function(g) {
610
- var x = typeof Symbol == "function" && Symbol.iterator, q = x && g[x], C = 0;
611
- if (q) return q.call(g);
612
- if (g && typeof g.length == "number") return { next: function() {
613
- return g && C >= g.length && (g = void 0), { value: g && g[C++], done: !g };
614
- } };
615
- throw new TypeError(x ? "Object is not iterable." : "Symbol.iterator is not defined.");
616
- }(T), v = w.next(); !v.done; v = w.next()) {
617
- var b = v.value;
618
- if (b === void 0) return st(l, a);
619
- var E = typeof b == "string" ? { target: b } : b, y = E.target, _ = E.actions, k = _ === void 0 ? [] : _, Z = E.cond, bt = Z === void 0 ? function() {
620
- return !0;
621
- } : Z, At = y === void 0, Tt = y ?? l, Et = t.states[Tt];
622
- if (bt(a, f)) {
623
- var V = K(ct((At ? W(k) : [].concat(d.exit, k, Et.entry).filter(function(g) {
624
- return g;
625
- })).map(function(g) {
626
- return at(g, o._options.actions);
627
- }), a, f), 3), tt = V[0], It = V[1], Ot = V[2], et = y ?? l;
628
- return { value: et, context: It, actions: tt, changed: y !== l || tt.length > 0 || Ot, matches: Y(et) };
629
- }
630
- }
631
- } catch (g) {
632
- u = { error: g };
633
- } finally {
634
- try {
635
- v && !v.done && (p = w.return) && p.call(w);
636
- } finally {
637
- if (u) throw u.error;
638
- }
639
- }
640
- }
641
- return st(l, a);
642
- } };
643
- return o;
644
- }
645
- const ve = ye({
646
- id: "sort",
647
- initial: B,
648
- states: {
649
- [B]: {
650
- on: {
651
- DIRECTION1: H,
652
- DIRECTION2: z
653
- }
654
- },
655
- [H]: {
656
- on: {
657
- DIRECTION1: z,
658
- DIRECTION2: B
659
- }
660
- },
661
- [z]: {
662
- on: {
663
- DIRECTION1: B,
664
- DIRECTION2: H
665
- }
666
- }
667
- }
668
- }), ge = (t, e) => {
669
- const r = e === z ? "DIRECTION2" : "DIRECTION1";
670
- return ve.transition(t, r).value;
671
- };
672
- function Le(t = {}) {
673
- const { sortTarget: e = null, orders: r = [] } = t, n = ft({ sortTarget: e, orders: r });
674
- return {
675
- sort: n,
676
- change: ({ target: o, orders: s }) => {
677
- if (n.sortTarget !== o) {
678
- n.sortTarget = o, n.orders = s;
679
- return;
680
- }
681
- const c = s.map((u, p) => ({
682
- ...u,
683
- direction: ge(n.orders[p].direction, u.direction)
684
- }));
685
- n.sortTarget = o, n.orders = c;
686
- }
687
- };
688
- }
689
- function Ne(t, e, r, n) {
690
- const i = A(""), o = A(!1), s = (c) => {
691
- const u = Ut(rt(e), c), p = u.length > 0;
692
- if (o.value = p, !p) return i.value = "";
693
- const l = u.map((a) => ({
694
- team: a.team.longName,
695
- points: Math.abs(rt(e, a))
696
- })).map((a) => r(`additionalText.${e}.content`, a)).join(", ");
697
- i.value = [
698
- r(`additionalText.${e}.prependix`),
699
- l,
700
- ...r(`additionalText.${e}.appendix`) && [r(`additionalText.${e}.appendix`)]
701
- ].join(" ");
702
- };
703
- return Yt(t, s), S(n, () => s(I(t))), {
704
- text: i,
705
- isVisible: o
706
- };
707
- }
708
- export {
709
- Re as a,
710
- je as b,
711
- Ce as c,
712
- ce as d,
713
- Se as e,
714
- Ae as f,
715
- Le as g,
716
- Ne as h,
717
- Pe as i,
718
- xe as j,
719
- oe as k,
720
- Yt as l,
721
- te as m,
722
- R as n,
723
- Ie as o,
724
- Oe as p,
725
- Te as q,
726
- N as r,
727
- _e as u,
728
- de as v,
729
- Ee as w
730
- };