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