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