@stonecrop/atable 0.2.64 → 0.2.65
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/atable.d.ts +509 -20
- package/dist/atable.js +671 -1630
- package/dist/atable.js.map +1 -1
- package/dist/atable.tsbuildinfo +1 -1
- package/dist/atable.umd.cjs +2 -12
- package/dist/atable.umd.cjs.map +1 -1
- package/dist/index.js +7 -10
- package/dist/src/index.d.ts +8 -8
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/stores/table.d.ts +6 -0
- package/dist/src/stores/table.d.ts.map +1 -1
- package/dist/{atable/src → src}/tsdoc-metadata.json +1 -1
- package/dist/src/types/index.d.ts +24 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/stores/table.js +6 -0
- package/package.json +8 -8
- package/src/index.ts +8 -12
- package/src/stores/table.ts +6 -0
- package/src/types/index.ts +24 -0
package/dist/atable.js
CHANGED
|
@@ -1,1641 +1,683 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
function
|
|
4
|
-
return
|
|
1
|
+
import { onMounted as q, ref as y, watch as $, onBeforeUnmount as Ye, computed as S, unref as w, getCurrentScope as le, onScopeDispose as re, getCurrentInstance as se, toRef as Xe, readonly as Je, customRef as Qe, nextTick as Re, defineComponent as D, useTemplateRef as K, withDirectives as ae, openBlock as x, createElementBlock as k, normalizeStyle as H, normalizeClass as B, createBlock as J, resolveDynamicComponent as Le, mergeProps as ie, toDisplayString as z, Fragment as Z, createElementVNode as N, renderSlot as T, createCommentVNode as F, vShow as De, renderList as ne, createTextVNode as Ze, createVNode as be, withCtx as xe } from "vue";
|
|
2
|
+
import { defineStore as Ke } from "pinia";
|
|
3
|
+
import './assets/index.css';function Pe(e) {
|
|
4
|
+
return le() ? (re(e), !0) : !1;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
e.splice(t, 1);
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
delete e[t];
|
|
12
|
-
}
|
|
13
|
-
function un() {
|
|
14
|
-
return Nt().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
15
|
-
}
|
|
16
|
-
function Nt() {
|
|
17
|
-
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
18
|
-
}
|
|
19
|
-
const dn = typeof Proxy == "function", fn = "devtools-plugin:setup", pn = "plugin:settings:set";
|
|
20
|
-
let q, Fe;
|
|
21
|
-
function mn() {
|
|
22
|
-
var e;
|
|
23
|
-
return q !== void 0 || (typeof window < "u" && window.performance ? (q = !0, Fe = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (q = !0, Fe = globalThis.perf_hooks.performance) : q = !1), q;
|
|
24
|
-
}
|
|
25
|
-
function hn() {
|
|
26
|
-
return mn() ? Fe.now() : Date.now();
|
|
27
|
-
}
|
|
28
|
-
class vn {
|
|
29
|
-
constructor(t, o) {
|
|
30
|
-
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = o;
|
|
31
|
-
const n = {};
|
|
32
|
-
if (t.settings)
|
|
33
|
-
for (const s in t.settings) {
|
|
34
|
-
const i = t.settings[s];
|
|
35
|
-
n[s] = i.defaultValue;
|
|
36
|
-
}
|
|
37
|
-
const r = `__vue-devtools-plugin-settings__${t.id}`;
|
|
38
|
-
let l = Object.assign({}, n);
|
|
39
|
-
try {
|
|
40
|
-
const s = localStorage.getItem(r), i = JSON.parse(s);
|
|
41
|
-
Object.assign(l, i);
|
|
42
|
-
} catch {
|
|
43
|
-
}
|
|
44
|
-
this.fallbacks = {
|
|
45
|
-
getSettings() {
|
|
46
|
-
return l;
|
|
47
|
-
},
|
|
48
|
-
setSettings(s) {
|
|
49
|
-
try {
|
|
50
|
-
localStorage.setItem(r, JSON.stringify(s));
|
|
51
|
-
} catch {
|
|
52
|
-
}
|
|
53
|
-
l = s;
|
|
54
|
-
},
|
|
55
|
-
now() {
|
|
56
|
-
return hn();
|
|
57
|
-
}
|
|
58
|
-
}, o && o.on(pn, (s, i) => {
|
|
59
|
-
s === this.plugin.id && this.fallbacks.setSettings(i);
|
|
60
|
-
}), this.proxiedOn = new Proxy({}, {
|
|
61
|
-
get: (s, i) => this.target ? this.target.on[i] : (...a) => {
|
|
62
|
-
this.onQueue.push({
|
|
63
|
-
method: i,
|
|
64
|
-
args: a
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
}), this.proxiedTarget = new Proxy({}, {
|
|
68
|
-
get: (s, i) => this.target ? this.target[i] : i === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(i) ? (...a) => (this.targetQueue.push({
|
|
69
|
-
method: i,
|
|
70
|
-
args: a,
|
|
71
|
-
resolve: () => {
|
|
72
|
-
}
|
|
73
|
-
}), this.fallbacks[i](...a)) : (...a) => new Promise((c) => {
|
|
74
|
-
this.targetQueue.push({
|
|
75
|
-
method: i,
|
|
76
|
-
args: a,
|
|
77
|
-
resolve: c
|
|
78
|
-
});
|
|
79
|
-
})
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
async setRealTarget(t) {
|
|
83
|
-
this.target = t;
|
|
84
|
-
for (const o of this.onQueue)
|
|
85
|
-
this.target.on[o.method](...o.args);
|
|
86
|
-
for (const o of this.targetQueue)
|
|
87
|
-
o.resolve(await this.target[o.method](...o.args));
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
function $t(e, t) {
|
|
91
|
-
const o = e, n = Nt(), r = un(), l = dn && o.enableEarlyProxy;
|
|
92
|
-
if (r && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !l))
|
|
93
|
-
r.emit(fn, e, t);
|
|
94
|
-
else {
|
|
95
|
-
const s = l ? new vn(o, r) : null;
|
|
96
|
-
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
97
|
-
pluginDescriptor: o,
|
|
98
|
-
setupFn: t,
|
|
99
|
-
proxy: s
|
|
100
|
-
}), s && t(s.proxiedTarget);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
/*!
|
|
104
|
-
* pinia v2.3.0
|
|
105
|
-
* (c) 2024 Eduardo San Martin Morote
|
|
106
|
-
* @license MIT
|
|
107
|
-
*/
|
|
108
|
-
let ne;
|
|
109
|
-
const pe = (e) => ne = e, Tt = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
110
|
-
/* istanbul ignore next */
|
|
111
|
-
Symbol()
|
|
112
|
-
);
|
|
113
|
-
function J(e) {
|
|
114
|
-
return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function";
|
|
115
|
-
}
|
|
116
|
-
var j;
|
|
117
|
-
(function(e) {
|
|
118
|
-
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
119
|
-
})(j || (j = {}));
|
|
120
|
-
const W = typeof window < "u", ut = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
|
|
121
|
-
function gn(e, { autoBom: t = !1 } = {}) {
|
|
122
|
-
return t && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
|
|
123
|
-
}
|
|
124
|
-
function Qe(e, t, o) {
|
|
125
|
-
const n = new XMLHttpRequest();
|
|
126
|
-
n.open("GET", e), n.responseType = "blob", n.onload = function() {
|
|
127
|
-
Vt(n.response, t, o);
|
|
128
|
-
}, n.onerror = function() {
|
|
129
|
-
console.error("could not download file");
|
|
130
|
-
}, n.send();
|
|
131
|
-
}
|
|
132
|
-
function Pt(e) {
|
|
133
|
-
const t = new XMLHttpRequest();
|
|
134
|
-
t.open("HEAD", e, !1);
|
|
135
|
-
try {
|
|
136
|
-
t.send();
|
|
137
|
-
} catch {
|
|
138
|
-
}
|
|
139
|
-
return t.status >= 200 && t.status <= 299;
|
|
140
|
-
}
|
|
141
|
-
function Oe(e) {
|
|
142
|
-
try {
|
|
143
|
-
e.dispatchEvent(new MouseEvent("click"));
|
|
144
|
-
} catch {
|
|
145
|
-
const o = document.createEvent("MouseEvents");
|
|
146
|
-
o.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(o);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
const _e = typeof navigator == "object" ? navigator : { userAgent: "" }, Dt = /Macintosh/.test(_e.userAgent) && /AppleWebKit/.test(_e.userAgent) && !/Safari/.test(_e.userAgent), Vt = W ? (
|
|
150
|
-
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
|
|
151
|
-
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !Dt ? yn : (
|
|
152
|
-
// Use msSaveOrOpenBlob as a second approach
|
|
153
|
-
"msSaveOrOpenBlob" in _e ? wn : (
|
|
154
|
-
// Fallback to using FileReader and a popup
|
|
155
|
-
bn
|
|
156
|
-
)
|
|
157
|
-
)
|
|
158
|
-
) : () => {
|
|
159
|
-
};
|
|
160
|
-
function yn(e, t = "download", o) {
|
|
161
|
-
const n = document.createElement("a");
|
|
162
|
-
n.download = t, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? Pt(n.href) ? Qe(e, t, o) : (n.target = "_blank", Oe(n)) : Oe(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
|
|
163
|
-
URL.revokeObjectURL(n.href);
|
|
164
|
-
}, 4e4), setTimeout(function() {
|
|
165
|
-
Oe(n);
|
|
166
|
-
}, 0));
|
|
167
|
-
}
|
|
168
|
-
function wn(e, t = "download", o) {
|
|
169
|
-
if (typeof e == "string")
|
|
170
|
-
if (Pt(e))
|
|
171
|
-
Qe(e, t, o);
|
|
172
|
-
else {
|
|
173
|
-
const n = document.createElement("a");
|
|
174
|
-
n.href = e, n.target = "_blank", setTimeout(function() {
|
|
175
|
-
Oe(n);
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
else
|
|
179
|
-
navigator.msSaveOrOpenBlob(gn(e, o), t);
|
|
180
|
-
}
|
|
181
|
-
function bn(e, t, o, n) {
|
|
182
|
-
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
|
|
183
|
-
return Qe(e, t, o);
|
|
184
|
-
const r = e.type === "application/octet-stream", l = /constructor/i.test(String(ut.HTMLElement)) || "safari" in ut, s = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
185
|
-
if ((s || r && l || Dt) && typeof FileReader < "u") {
|
|
186
|
-
const i = new FileReader();
|
|
187
|
-
i.onloadend = function() {
|
|
188
|
-
let a = i.result;
|
|
189
|
-
if (typeof a != "string")
|
|
190
|
-
throw n = null, new Error("Wrong reader.result type");
|
|
191
|
-
a = s ? a : a.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = a : location.assign(a), n = null;
|
|
192
|
-
}, i.readAsDataURL(e);
|
|
193
|
-
} else {
|
|
194
|
-
const i = URL.createObjectURL(e);
|
|
195
|
-
n ? n.location.assign(i) : location.href = i, n = null, setTimeout(function() {
|
|
196
|
-
URL.revokeObjectURL(i);
|
|
197
|
-
}, 4e4);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
function A(e, t) {
|
|
201
|
-
const o = "🍍 " + e;
|
|
202
|
-
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(o, t) : t === "error" ? console.error(o) : t === "warn" ? console.warn(o) : console.log(o);
|
|
203
|
-
}
|
|
204
|
-
function Xe(e) {
|
|
205
|
-
return "_a" in e && "install" in e;
|
|
206
|
-
}
|
|
207
|
-
function Lt() {
|
|
208
|
-
if (!("clipboard" in navigator))
|
|
209
|
-
return A("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
210
|
-
}
|
|
211
|
-
function Rt(e) {
|
|
212
|
-
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (A('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
|
|
213
|
-
}
|
|
214
|
-
async function En(e) {
|
|
215
|
-
if (!Lt())
|
|
216
|
-
try {
|
|
217
|
-
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), A("Global state copied to clipboard.");
|
|
218
|
-
} catch (t) {
|
|
219
|
-
if (Rt(t))
|
|
220
|
-
return;
|
|
221
|
-
A("Failed to serialize the state. Check the console for more details.", "error"), console.error(t);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
async function Sn(e) {
|
|
225
|
-
if (!Lt())
|
|
226
|
-
try {
|
|
227
|
-
jt(e, JSON.parse(await navigator.clipboard.readText())), A("Global state pasted from clipboard.");
|
|
228
|
-
} catch (t) {
|
|
229
|
-
if (Rt(t))
|
|
230
|
-
return;
|
|
231
|
-
A("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(t);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
async function On(e) {
|
|
235
|
-
try {
|
|
236
|
-
Vt(new Blob([JSON.stringify(e.state.value)], {
|
|
237
|
-
type: "text/plain;charset=utf-8"
|
|
238
|
-
}), "pinia-state.json");
|
|
239
|
-
} catch (t) {
|
|
240
|
-
A("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(t);
|
|
241
|
-
}
|
|
6
|
+
function ce(e) {
|
|
7
|
+
return typeof e == "function" ? e() : w(e);
|
|
242
8
|
}
|
|
243
|
-
|
|
244
|
-
function _n() {
|
|
245
|
-
M || (M = document.createElement("input"), M.type = "file", M.accept = ".json");
|
|
246
|
-
function e() {
|
|
247
|
-
return new Promise((t, o) => {
|
|
248
|
-
M.onchange = async () => {
|
|
249
|
-
const n = M.files;
|
|
250
|
-
if (!n)
|
|
251
|
-
return t(null);
|
|
252
|
-
const r = n.item(0);
|
|
253
|
-
return t(r ? { text: await r.text(), file: r } : null);
|
|
254
|
-
}, M.oncancel = () => t(null), M.onerror = o, M.click();
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
return e;
|
|
258
|
-
}
|
|
259
|
-
async function xn(e) {
|
|
260
|
-
try {
|
|
261
|
-
const o = await _n()();
|
|
262
|
-
if (!o)
|
|
263
|
-
return;
|
|
264
|
-
const { text: n, file: r } = o;
|
|
265
|
-
jt(e, JSON.parse(n)), A(`Global state imported from "${r.name}".`);
|
|
266
|
-
} catch (t) {
|
|
267
|
-
A("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(t);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
function jt(e, t) {
|
|
271
|
-
for (const o in t) {
|
|
272
|
-
const n = e.state.value[o];
|
|
273
|
-
n ? Object.assign(n, t[o]) : e.state.value[o] = t[o];
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
function L(e) {
|
|
277
|
-
return {
|
|
278
|
-
_custom: {
|
|
279
|
-
display: e
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
const Mt = "🍍 Pinia (root)", xe = "_root";
|
|
284
|
-
function In(e) {
|
|
285
|
-
return Xe(e) ? {
|
|
286
|
-
id: xe,
|
|
287
|
-
label: Mt
|
|
288
|
-
} : {
|
|
289
|
-
id: e.$id,
|
|
290
|
-
label: e.$id
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
function kn(e) {
|
|
294
|
-
if (Xe(e)) {
|
|
295
|
-
const o = Array.from(e._s.keys()), n = e._s;
|
|
296
|
-
return {
|
|
297
|
-
state: o.map((l) => ({
|
|
298
|
-
editable: !0,
|
|
299
|
-
key: l,
|
|
300
|
-
value: e.state.value[l]
|
|
301
|
-
})),
|
|
302
|
-
getters: o.filter((l) => n.get(l)._getters).map((l) => {
|
|
303
|
-
const s = n.get(l);
|
|
304
|
-
return {
|
|
305
|
-
editable: !1,
|
|
306
|
-
key: l,
|
|
307
|
-
value: s._getters.reduce((i, a) => (i[a] = s[a], i), {})
|
|
308
|
-
};
|
|
309
|
-
})
|
|
310
|
-
};
|
|
311
|
-
}
|
|
312
|
-
const t = {
|
|
313
|
-
state: Object.keys(e.$state).map((o) => ({
|
|
314
|
-
editable: !0,
|
|
315
|
-
key: o,
|
|
316
|
-
value: e.$state[o]
|
|
317
|
-
}))
|
|
318
|
-
};
|
|
319
|
-
return e._getters && e._getters.length && (t.getters = e._getters.map((o) => ({
|
|
320
|
-
editable: !1,
|
|
321
|
-
key: o,
|
|
322
|
-
value: e[o]
|
|
323
|
-
}))), e._customProperties.size && (t.customProperties = Array.from(e._customProperties).map((o) => ({
|
|
324
|
-
editable: !0,
|
|
325
|
-
key: o,
|
|
326
|
-
value: e[o]
|
|
327
|
-
}))), t;
|
|
328
|
-
}
|
|
329
|
-
function An(e) {
|
|
330
|
-
return e ? Array.isArray(e) ? e.reduce((t, o) => (t.keys.push(o.key), t.operations.push(o.type), t.oldValue[o.key] = o.oldValue, t.newValue[o.key] = o.newValue, t), {
|
|
331
|
-
oldValue: {},
|
|
332
|
-
keys: [],
|
|
333
|
-
operations: [],
|
|
334
|
-
newValue: {}
|
|
335
|
-
}) : {
|
|
336
|
-
operation: L(e.type),
|
|
337
|
-
key: L(e.key),
|
|
338
|
-
oldValue: e.oldValue,
|
|
339
|
-
newValue: e.newValue
|
|
340
|
-
} : {};
|
|
341
|
-
}
|
|
342
|
-
function Cn(e) {
|
|
343
|
-
switch (e) {
|
|
344
|
-
case j.direct:
|
|
345
|
-
return "mutation";
|
|
346
|
-
case j.patchFunction:
|
|
347
|
-
return "$patch";
|
|
348
|
-
case j.patchObject:
|
|
349
|
-
return "$patch";
|
|
350
|
-
default:
|
|
351
|
-
return "unknown";
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
let X = !0;
|
|
355
|
-
const Ie = [], G = "pinia:mutations", C = "pinia", { assign: Nn } = Object, Ne = (e) => "🍍 " + e;
|
|
356
|
-
function $n(e, t) {
|
|
357
|
-
$t({
|
|
358
|
-
id: "dev.esm.pinia",
|
|
359
|
-
label: "Pinia 🍍",
|
|
360
|
-
logo: "https://pinia.vuejs.org/logo.svg",
|
|
361
|
-
packageName: "pinia",
|
|
362
|
-
homepage: "https://pinia.vuejs.org",
|
|
363
|
-
componentStateTypes: Ie,
|
|
364
|
-
app: e
|
|
365
|
-
}, (o) => {
|
|
366
|
-
typeof o.now != "function" && A("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), o.addTimelineLayer({
|
|
367
|
-
id: G,
|
|
368
|
-
label: "Pinia 🍍",
|
|
369
|
-
color: 15064968
|
|
370
|
-
}), o.addInspector({
|
|
371
|
-
id: C,
|
|
372
|
-
label: "Pinia 🍍",
|
|
373
|
-
icon: "storage",
|
|
374
|
-
treeFilterPlaceholder: "Search stores",
|
|
375
|
-
actions: [
|
|
376
|
-
{
|
|
377
|
-
icon: "content_copy",
|
|
378
|
-
action: () => {
|
|
379
|
-
En(t);
|
|
380
|
-
},
|
|
381
|
-
tooltip: "Serialize and copy the state"
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
icon: "content_paste",
|
|
385
|
-
action: async () => {
|
|
386
|
-
await Sn(t), o.sendInspectorTree(C), o.sendInspectorState(C);
|
|
387
|
-
},
|
|
388
|
-
tooltip: "Replace the state with the content of your clipboard"
|
|
389
|
-
},
|
|
390
|
-
{
|
|
391
|
-
icon: "save",
|
|
392
|
-
action: () => {
|
|
393
|
-
On(t);
|
|
394
|
-
},
|
|
395
|
-
tooltip: "Save the state as a JSON file"
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
icon: "folder_open",
|
|
399
|
-
action: async () => {
|
|
400
|
-
await xn(t), o.sendInspectorTree(C), o.sendInspectorState(C);
|
|
401
|
-
},
|
|
402
|
-
tooltip: "Import the state from a JSON file"
|
|
403
|
-
}
|
|
404
|
-
],
|
|
405
|
-
nodeActions: [
|
|
406
|
-
{
|
|
407
|
-
icon: "restore",
|
|
408
|
-
tooltip: 'Reset the state (with "$reset")',
|
|
409
|
-
action: (n) => {
|
|
410
|
-
const r = t._s.get(n);
|
|
411
|
-
r ? typeof r.$reset != "function" ? A(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`, "warn") : (r.$reset(), A(`Store "${n}" reset.`)) : A(`Cannot reset "${n}" store because it wasn't found.`, "warn");
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
]
|
|
415
|
-
}), o.on.inspectComponent((n, r) => {
|
|
416
|
-
const l = n.componentInstance && n.componentInstance.proxy;
|
|
417
|
-
if (l && l._pStores) {
|
|
418
|
-
const s = n.componentInstance.proxy._pStores;
|
|
419
|
-
Object.values(s).forEach((i) => {
|
|
420
|
-
n.instanceData.state.push({
|
|
421
|
-
type: Ne(i.$id),
|
|
422
|
-
key: "state",
|
|
423
|
-
editable: !0,
|
|
424
|
-
value: i._isOptionsAPI ? {
|
|
425
|
-
_custom: {
|
|
426
|
-
value: ae(i.$state),
|
|
427
|
-
actions: [
|
|
428
|
-
{
|
|
429
|
-
icon: "restore",
|
|
430
|
-
tooltip: "Reset the state of this store",
|
|
431
|
-
action: () => i.$reset()
|
|
432
|
-
}
|
|
433
|
-
]
|
|
434
|
-
}
|
|
435
|
-
} : (
|
|
436
|
-
// NOTE: workaround to unwrap transferred refs
|
|
437
|
-
Object.keys(i.$state).reduce((a, c) => (a[c] = i.$state[c], a), {})
|
|
438
|
-
)
|
|
439
|
-
}), i._getters && i._getters.length && n.instanceData.state.push({
|
|
440
|
-
type: Ne(i.$id),
|
|
441
|
-
key: "getters",
|
|
442
|
-
editable: !1,
|
|
443
|
-
value: i._getters.reduce((a, c) => {
|
|
444
|
-
try {
|
|
445
|
-
a[c] = i[c];
|
|
446
|
-
} catch (d) {
|
|
447
|
-
a[c] = d;
|
|
448
|
-
}
|
|
449
|
-
return a;
|
|
450
|
-
}, {})
|
|
451
|
-
});
|
|
452
|
-
});
|
|
453
|
-
}
|
|
454
|
-
}), o.on.getInspectorTree((n) => {
|
|
455
|
-
if (n.app === e && n.inspectorId === C) {
|
|
456
|
-
let r = [t];
|
|
457
|
-
r = r.concat(Array.from(t._s.values())), n.rootNodes = (n.filter ? r.filter((l) => "$id" in l ? l.$id.toLowerCase().includes(n.filter.toLowerCase()) : Mt.toLowerCase().includes(n.filter.toLowerCase())) : r).map(In);
|
|
458
|
-
}
|
|
459
|
-
}), globalThis.$pinia = t, o.on.getInspectorState((n) => {
|
|
460
|
-
if (n.app === e && n.inspectorId === C) {
|
|
461
|
-
const r = n.nodeId === xe ? t : t._s.get(n.nodeId);
|
|
462
|
-
if (!r)
|
|
463
|
-
return;
|
|
464
|
-
r && (n.nodeId !== xe && (globalThis.$store = ae(r)), n.state = kn(r));
|
|
465
|
-
}
|
|
466
|
-
}), o.on.editInspectorState((n, r) => {
|
|
467
|
-
if (n.app === e && n.inspectorId === C) {
|
|
468
|
-
const l = n.nodeId === xe ? t : t._s.get(n.nodeId);
|
|
469
|
-
if (!l)
|
|
470
|
-
return A(`store "${n.nodeId}" not found`, "error");
|
|
471
|
-
const { path: s } = n;
|
|
472
|
-
Xe(l) ? s.unshift("state") : (s.length !== 1 || !l._customProperties.has(s[0]) || s[0] in l.$state) && s.unshift("$state"), X = !1, n.set(l, s, n.state.value), X = !0;
|
|
473
|
-
}
|
|
474
|
-
}), o.on.editComponentState((n) => {
|
|
475
|
-
if (n.type.startsWith("🍍")) {
|
|
476
|
-
const r = n.type.replace(/^🍍\s*/, ""), l = t._s.get(r);
|
|
477
|
-
if (!l)
|
|
478
|
-
return A(`store "${r}" not found`, "error");
|
|
479
|
-
const { path: s } = n;
|
|
480
|
-
if (s[0] !== "state")
|
|
481
|
-
return A(`Invalid path for store "${r}":
|
|
482
|
-
${s}
|
|
483
|
-
Only state can be modified.`);
|
|
484
|
-
s[0] = "$state", X = !1, n.set(l, s, n.state.value), X = !0;
|
|
485
|
-
}
|
|
486
|
-
});
|
|
487
|
-
});
|
|
488
|
-
}
|
|
489
|
-
function Tn(e, t) {
|
|
490
|
-
Ie.includes(Ne(t.$id)) || Ie.push(Ne(t.$id)), $t({
|
|
491
|
-
id: "dev.esm.pinia",
|
|
492
|
-
label: "Pinia 🍍",
|
|
493
|
-
logo: "https://pinia.vuejs.org/logo.svg",
|
|
494
|
-
packageName: "pinia",
|
|
495
|
-
homepage: "https://pinia.vuejs.org",
|
|
496
|
-
componentStateTypes: Ie,
|
|
497
|
-
app: e,
|
|
498
|
-
settings: {
|
|
499
|
-
logStoreChanges: {
|
|
500
|
-
label: "Notify about new/deleted stores",
|
|
501
|
-
type: "boolean",
|
|
502
|
-
defaultValue: !0
|
|
503
|
-
}
|
|
504
|
-
// useEmojis: {
|
|
505
|
-
// label: 'Use emojis in messages ⚡️',
|
|
506
|
-
// type: 'boolean',
|
|
507
|
-
// defaultValue: true,
|
|
508
|
-
// },
|
|
509
|
-
}
|
|
510
|
-
}, (o) => {
|
|
511
|
-
const n = typeof o.now == "function" ? o.now.bind(o) : Date.now;
|
|
512
|
-
t.$onAction(({ after: s, onError: i, name: a, args: c }) => {
|
|
513
|
-
const d = Ht++;
|
|
514
|
-
o.addTimelineEvent({
|
|
515
|
-
layerId: G,
|
|
516
|
-
event: {
|
|
517
|
-
time: n(),
|
|
518
|
-
title: "🛫 " + a,
|
|
519
|
-
subtitle: "start",
|
|
520
|
-
data: {
|
|
521
|
-
store: L(t.$id),
|
|
522
|
-
action: L(a),
|
|
523
|
-
args: c
|
|
524
|
-
},
|
|
525
|
-
groupId: d
|
|
526
|
-
}
|
|
527
|
-
}), s((f) => {
|
|
528
|
-
F = void 0, o.addTimelineEvent({
|
|
529
|
-
layerId: G,
|
|
530
|
-
event: {
|
|
531
|
-
time: n(),
|
|
532
|
-
title: "🛬 " + a,
|
|
533
|
-
subtitle: "end",
|
|
534
|
-
data: {
|
|
535
|
-
store: L(t.$id),
|
|
536
|
-
action: L(a),
|
|
537
|
-
args: c,
|
|
538
|
-
result: f
|
|
539
|
-
},
|
|
540
|
-
groupId: d
|
|
541
|
-
}
|
|
542
|
-
});
|
|
543
|
-
}), i((f) => {
|
|
544
|
-
F = void 0, o.addTimelineEvent({
|
|
545
|
-
layerId: G,
|
|
546
|
-
event: {
|
|
547
|
-
time: n(),
|
|
548
|
-
logType: "error",
|
|
549
|
-
title: "💥 " + a,
|
|
550
|
-
subtitle: "end",
|
|
551
|
-
data: {
|
|
552
|
-
store: L(t.$id),
|
|
553
|
-
action: L(a),
|
|
554
|
-
args: c,
|
|
555
|
-
error: f
|
|
556
|
-
},
|
|
557
|
-
groupId: d
|
|
558
|
-
}
|
|
559
|
-
});
|
|
560
|
-
});
|
|
561
|
-
}, !0), t._customProperties.forEach((s) => {
|
|
562
|
-
T(() => y(t[s]), (i, a) => {
|
|
563
|
-
o.notifyComponentUpdate(), o.sendInspectorState(C), X && o.addTimelineEvent({
|
|
564
|
-
layerId: G,
|
|
565
|
-
event: {
|
|
566
|
-
time: n(),
|
|
567
|
-
title: "Change",
|
|
568
|
-
subtitle: s,
|
|
569
|
-
data: {
|
|
570
|
-
newValue: i,
|
|
571
|
-
oldValue: a
|
|
572
|
-
},
|
|
573
|
-
groupId: F
|
|
574
|
-
}
|
|
575
|
-
});
|
|
576
|
-
}, { deep: !0 });
|
|
577
|
-
}), t.$subscribe(({ events: s, type: i }, a) => {
|
|
578
|
-
if (o.notifyComponentUpdate(), o.sendInspectorState(C), !X)
|
|
579
|
-
return;
|
|
580
|
-
const c = {
|
|
581
|
-
time: n(),
|
|
582
|
-
title: Cn(i),
|
|
583
|
-
data: Nn({ store: L(t.$id) }, An(s)),
|
|
584
|
-
groupId: F
|
|
585
|
-
};
|
|
586
|
-
i === j.patchFunction ? c.subtitle = "⤵️" : i === j.patchObject ? c.subtitle = "🧩" : s && !Array.isArray(s) && (c.subtitle = s.type), s && (c.data["rawEvent(s)"] = {
|
|
587
|
-
_custom: {
|
|
588
|
-
display: "DebuggerEvent",
|
|
589
|
-
type: "object",
|
|
590
|
-
tooltip: "raw DebuggerEvent[]",
|
|
591
|
-
value: s
|
|
592
|
-
}
|
|
593
|
-
}), o.addTimelineEvent({
|
|
594
|
-
layerId: G,
|
|
595
|
-
event: c
|
|
596
|
-
});
|
|
597
|
-
}, { detached: !0, flush: "sync" });
|
|
598
|
-
const r = t._hotUpdate;
|
|
599
|
-
t._hotUpdate = z((s) => {
|
|
600
|
-
r(s), o.addTimelineEvent({
|
|
601
|
-
layerId: G,
|
|
602
|
-
event: {
|
|
603
|
-
time: n(),
|
|
604
|
-
title: "🔥 " + t.$id,
|
|
605
|
-
subtitle: "HMR update",
|
|
606
|
-
data: {
|
|
607
|
-
store: L(t.$id),
|
|
608
|
-
info: L("HMR update")
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
}), o.notifyComponentUpdate(), o.sendInspectorTree(C), o.sendInspectorState(C);
|
|
612
|
-
});
|
|
613
|
-
const { $dispose: l } = t;
|
|
614
|
-
t.$dispose = () => {
|
|
615
|
-
l(), o.notifyComponentUpdate(), o.sendInspectorTree(C), o.sendInspectorState(C), o.getSettings().logStoreChanges && A(`Disposed "${t.$id}" store 🗑`);
|
|
616
|
-
}, o.notifyComponentUpdate(), o.sendInspectorTree(C), o.sendInspectorState(C), o.getSettings().logStoreChanges && A(`"${t.$id}" store installed 🆕`);
|
|
617
|
-
});
|
|
618
|
-
}
|
|
619
|
-
let Ht = 0, F;
|
|
620
|
-
function dt(e, t, o) {
|
|
621
|
-
const n = t.reduce((r, l) => (r[l] = ae(e)[l], r), {});
|
|
622
|
-
for (const r in n)
|
|
623
|
-
e[r] = function() {
|
|
624
|
-
const l = Ht, s = o ? new Proxy(e, {
|
|
625
|
-
get(...a) {
|
|
626
|
-
return F = l, Reflect.get(...a);
|
|
627
|
-
},
|
|
628
|
-
set(...a) {
|
|
629
|
-
return F = l, Reflect.set(...a);
|
|
630
|
-
}
|
|
631
|
-
}) : e;
|
|
632
|
-
F = l;
|
|
633
|
-
const i = n[r].apply(s, arguments);
|
|
634
|
-
return F = void 0, i;
|
|
635
|
-
};
|
|
636
|
-
}
|
|
637
|
-
function Pn({ app: e, store: t, options: o }) {
|
|
638
|
-
if (!t.$id.startsWith("__hot:")) {
|
|
639
|
-
if (t._isOptionsAPI = !!o.state, !t._p._testing) {
|
|
640
|
-
dt(t, Object.keys(o.actions), t._isOptionsAPI);
|
|
641
|
-
const n = t._hotUpdate;
|
|
642
|
-
ae(t)._hotUpdate = function(r) {
|
|
643
|
-
n.apply(this, arguments), dt(t, Object.keys(r._hmrPayload.actions), !!t._isOptionsAPI);
|
|
644
|
-
};
|
|
645
|
-
}
|
|
646
|
-
Tn(
|
|
647
|
-
e,
|
|
648
|
-
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
|
|
649
|
-
t
|
|
650
|
-
);
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
function Dn() {
|
|
654
|
-
const e = It(!0), t = e.run(() => O({}));
|
|
655
|
-
let o = [], n = [];
|
|
656
|
-
const r = z({
|
|
657
|
-
install(l) {
|
|
658
|
-
pe(r), r._a = l, l.provide(Tt, r), l.config.globalProperties.$pinia = r, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && W && $n(l, r), n.forEach((s) => o.push(s)), n = [];
|
|
659
|
-
},
|
|
660
|
-
use(l) {
|
|
661
|
-
return !this._a && !Ct ? n.push(l) : o.push(l), this;
|
|
662
|
-
},
|
|
663
|
-
_p: o,
|
|
664
|
-
// it's actually undefined here
|
|
665
|
-
// @ts-expect-error
|
|
666
|
-
_a: null,
|
|
667
|
-
_e: e,
|
|
668
|
-
_s: /* @__PURE__ */ new Map(),
|
|
669
|
-
state: t
|
|
670
|
-
});
|
|
671
|
-
return process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && W && typeof Proxy < "u" && r.use(Pn), r;
|
|
672
|
-
}
|
|
673
|
-
function Ut(e, t) {
|
|
674
|
-
for (const o in t) {
|
|
675
|
-
const n = t[o];
|
|
676
|
-
if (!(o in e))
|
|
677
|
-
continue;
|
|
678
|
-
const r = e[o];
|
|
679
|
-
J(r) && J(n) && !ce(n) && !Je(n) ? e[o] = Ut(r, n) : e[o] = n;
|
|
680
|
-
}
|
|
681
|
-
return e;
|
|
682
|
-
}
|
|
683
|
-
const Wt = () => {
|
|
684
|
-
};
|
|
685
|
-
function ft(e, t, o, n = Wt) {
|
|
686
|
-
e.push(t);
|
|
687
|
-
const r = () => {
|
|
688
|
-
const l = e.indexOf(t);
|
|
689
|
-
l > -1 && (e.splice(l, 1), n());
|
|
690
|
-
};
|
|
691
|
-
return !o && Te() && Pe(r), r;
|
|
692
|
-
}
|
|
693
|
-
function Q(e, ...t) {
|
|
694
|
-
e.slice().forEach((o) => {
|
|
695
|
-
o(...t);
|
|
696
|
-
});
|
|
697
|
-
}
|
|
698
|
-
const Vn = (e) => e(), pt = Symbol(), Me = Symbol();
|
|
699
|
-
function Be(e, t) {
|
|
700
|
-
e instanceof Map && t instanceof Map ? t.forEach((o, n) => e.set(n, o)) : e instanceof Set && t instanceof Set && t.forEach(e.add, e);
|
|
701
|
-
for (const o in t) {
|
|
702
|
-
if (!t.hasOwnProperty(o))
|
|
703
|
-
continue;
|
|
704
|
-
const n = t[o], r = e[o];
|
|
705
|
-
J(r) && J(n) && e.hasOwnProperty(o) && !ce(n) && !Je(n) ? e[o] = Be(r, n) : e[o] = n;
|
|
706
|
-
}
|
|
707
|
-
return e;
|
|
708
|
-
}
|
|
709
|
-
const Ln = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
710
|
-
/* istanbul ignore next */
|
|
711
|
-
Symbol()
|
|
712
|
-
);
|
|
713
|
-
function Rn(e) {
|
|
714
|
-
return !J(e) || !e.hasOwnProperty(Ln);
|
|
715
|
-
}
|
|
716
|
-
const { assign: V } = Object;
|
|
717
|
-
function mt(e) {
|
|
718
|
-
return !!(ce(e) && e.effect);
|
|
719
|
-
}
|
|
720
|
-
function ht(e, t, o, n) {
|
|
721
|
-
const { state: r, actions: l, getters: s } = t, i = o.state.value[e];
|
|
722
|
-
let a;
|
|
723
|
-
function c() {
|
|
724
|
-
!i && (process.env.NODE_ENV === "production" || !n) && (o.state.value[e] = r ? r() : {});
|
|
725
|
-
const d = process.env.NODE_ENV !== "production" && n ? (
|
|
726
|
-
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
727
|
-
lt(O(r ? r() : {}).value)
|
|
728
|
-
) : lt(o.state.value[e]);
|
|
729
|
-
return V(d, l, Object.keys(s || {}).reduce((f, u) => (process.env.NODE_ENV !== "production" && u in d && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${u}" in store "${e}".`), f[u] = z($(() => {
|
|
730
|
-
pe(o);
|
|
731
|
-
const m = o._s.get(e);
|
|
732
|
-
return s[u].call(m, m);
|
|
733
|
-
})), f), {}));
|
|
734
|
-
}
|
|
735
|
-
return a = Ge(e, c, t, o, n, !0), a;
|
|
736
|
-
}
|
|
737
|
-
function Ge(e, t, o = {}, n, r, l) {
|
|
738
|
-
let s;
|
|
739
|
-
const i = V({ actions: {} }, o);
|
|
740
|
-
if (process.env.NODE_ENV !== "production" && !n._e.active)
|
|
741
|
-
throw new Error("Pinia destroyed");
|
|
742
|
-
const a = { deep: !0 };
|
|
743
|
-
process.env.NODE_ENV !== "production" && !Ct && (a.onTrigger = (h) => {
|
|
744
|
-
c ? m = h : c == !1 && !w._hotUpdating && (Array.isArray(m) ? m.push(h) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
745
|
-
});
|
|
746
|
-
let c, d, f = [], u = [], m;
|
|
747
|
-
const v = n.state.value[e];
|
|
748
|
-
!l && !v && (process.env.NODE_ENV === "production" || !r) && (n.state.value[e] = {});
|
|
749
|
-
const x = O({});
|
|
750
|
-
let _;
|
|
751
|
-
function S(h) {
|
|
752
|
-
let p;
|
|
753
|
-
c = d = !1, process.env.NODE_ENV !== "production" && (m = []), typeof h == "function" ? (h(n.state.value[e]), p = {
|
|
754
|
-
type: j.patchFunction,
|
|
755
|
-
storeId: e,
|
|
756
|
-
events: m
|
|
757
|
-
}) : (Be(n.state.value[e], h), p = {
|
|
758
|
-
type: j.patchObject,
|
|
759
|
-
payload: h,
|
|
760
|
-
storeId: e,
|
|
761
|
-
events: m
|
|
762
|
-
});
|
|
763
|
-
const b = _ = Symbol();
|
|
764
|
-
Ae().then(() => {
|
|
765
|
-
_ === b && (c = !0);
|
|
766
|
-
}), d = !0, Q(f, p, n.state.value[e]);
|
|
767
|
-
}
|
|
768
|
-
const P = l ? function() {
|
|
769
|
-
const { state: p } = o, b = p ? p() : {};
|
|
770
|
-
this.$patch((k) => {
|
|
771
|
-
V(k, b);
|
|
772
|
-
});
|
|
773
|
-
} : (
|
|
774
|
-
/* istanbul ignore next */
|
|
775
|
-
process.env.NODE_ENV !== "production" ? () => {
|
|
776
|
-
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
|
777
|
-
} : Wt
|
|
778
|
-
);
|
|
779
|
-
function ye() {
|
|
780
|
-
s.stop(), f = [], u = [], n._s.delete(e);
|
|
781
|
-
}
|
|
782
|
-
const ee = (h, p = "") => {
|
|
783
|
-
if (pt in h)
|
|
784
|
-
return h[Me] = p, h;
|
|
785
|
-
const b = function() {
|
|
786
|
-
pe(n);
|
|
787
|
-
const k = Array.from(arguments), Y = [], Re = [];
|
|
788
|
-
function en(D) {
|
|
789
|
-
Y.push(D);
|
|
790
|
-
}
|
|
791
|
-
function tn(D) {
|
|
792
|
-
Re.push(D);
|
|
793
|
-
}
|
|
794
|
-
Q(u, {
|
|
795
|
-
args: k,
|
|
796
|
-
name: b[Me],
|
|
797
|
-
store: w,
|
|
798
|
-
after: en,
|
|
799
|
-
onError: tn
|
|
800
|
-
});
|
|
801
|
-
let te;
|
|
802
|
-
try {
|
|
803
|
-
te = h.apply(this && this.$id === e ? this : w, k);
|
|
804
|
-
} catch (D) {
|
|
805
|
-
throw Q(Re, D), D;
|
|
806
|
-
}
|
|
807
|
-
return te instanceof Promise ? te.then((D) => (Q(Y, D), D)).catch((D) => (Q(Re, D), Promise.reject(D))) : (Q(Y, te), te);
|
|
808
|
-
};
|
|
809
|
-
return b[pt] = !0, b[Me] = p, b;
|
|
810
|
-
}, B = /* @__PURE__ */ z({
|
|
811
|
-
actions: {},
|
|
812
|
-
getters: {},
|
|
813
|
-
state: [],
|
|
814
|
-
hotState: x
|
|
815
|
-
}), Le = {
|
|
816
|
-
_p: n,
|
|
817
|
-
// _s: scope,
|
|
818
|
-
$id: e,
|
|
819
|
-
$onAction: ft.bind(null, u),
|
|
820
|
-
$patch: S,
|
|
821
|
-
$reset: P,
|
|
822
|
-
$subscribe(h, p = {}) {
|
|
823
|
-
const b = ft(f, h, p.detached, () => k()), k = s.run(() => T(() => n.state.value[e], (Y) => {
|
|
824
|
-
(p.flush === "sync" ? d : c) && h({
|
|
825
|
-
storeId: e,
|
|
826
|
-
type: j.direct,
|
|
827
|
-
events: m
|
|
828
|
-
}, Y);
|
|
829
|
-
}, V({}, a, p)));
|
|
830
|
-
return b;
|
|
831
|
-
},
|
|
832
|
-
$dispose: ye
|
|
833
|
-
}, w = sn(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && W ? V(
|
|
834
|
-
{
|
|
835
|
-
_hmrPayload: B,
|
|
836
|
-
_customProperties: z(/* @__PURE__ */ new Set())
|
|
837
|
-
// devtools custom properties
|
|
838
|
-
},
|
|
839
|
-
Le
|
|
840
|
-
// must be added later
|
|
841
|
-
// setupStore
|
|
842
|
-
) : Le);
|
|
843
|
-
n._s.set(e, w);
|
|
844
|
-
const E = (n._a && n._a.runWithContext || Vn)(() => n._e.run(() => (s = It()).run(() => t({ action: ee }))));
|
|
845
|
-
for (const h in E) {
|
|
846
|
-
const p = E[h];
|
|
847
|
-
if (ce(p) && !mt(p) || Je(p))
|
|
848
|
-
process.env.NODE_ENV !== "production" && r ? we(x.value, h, Ee(E, h)) : l || (v && Rn(p) && (ce(p) ? p.value = v[h] : Be(p, v[h])), n.state.value[e][h] = p), process.env.NODE_ENV !== "production" && B.state.push(h);
|
|
849
|
-
else if (typeof p == "function") {
|
|
850
|
-
const b = process.env.NODE_ENV !== "production" && r ? p : ee(p, h);
|
|
851
|
-
E[h] = b, process.env.NODE_ENV !== "production" && (B.actions[h] = p), i.actions[h] = p;
|
|
852
|
-
} else process.env.NODE_ENV !== "production" && mt(p) && (B.getters[h] = l ? (
|
|
853
|
-
// @ts-expect-error
|
|
854
|
-
o.getters[h]
|
|
855
|
-
) : p, W && (E._getters || // @ts-expect-error: same
|
|
856
|
-
(E._getters = z([]))).push(h));
|
|
857
|
-
}
|
|
858
|
-
if (V(w, E), V(ae(w), E), Object.defineProperty(w, "$state", {
|
|
859
|
-
get: () => process.env.NODE_ENV !== "production" && r ? x.value : n.state.value[e],
|
|
860
|
-
set: (h) => {
|
|
861
|
-
if (process.env.NODE_ENV !== "production" && r)
|
|
862
|
-
throw new Error("cannot set hotState");
|
|
863
|
-
S((p) => {
|
|
864
|
-
V(p, h);
|
|
865
|
-
});
|
|
866
|
-
}
|
|
867
|
-
}), process.env.NODE_ENV !== "production" && (w._hotUpdate = z((h) => {
|
|
868
|
-
w._hotUpdating = !0, h._hmrPayload.state.forEach((p) => {
|
|
869
|
-
if (p in w.$state) {
|
|
870
|
-
const b = h.$state[p], k = w.$state[p];
|
|
871
|
-
typeof b == "object" && J(b) && J(k) ? Ut(b, k) : h.$state[p] = k;
|
|
872
|
-
}
|
|
873
|
-
we(w, p, Ee(h.$state, p));
|
|
874
|
-
}), Object.keys(w.$state).forEach((p) => {
|
|
875
|
-
p in h.$state || je(w, p);
|
|
876
|
-
}), c = !1, d = !1, n.state.value[e] = Ee(h._hmrPayload, "hotState"), d = !0, Ae().then(() => {
|
|
877
|
-
c = !0;
|
|
878
|
-
});
|
|
879
|
-
for (const p in h._hmrPayload.actions) {
|
|
880
|
-
const b = h[p];
|
|
881
|
-
we(w, p, ee(b, p));
|
|
882
|
-
}
|
|
883
|
-
for (const p in h._hmrPayload.getters) {
|
|
884
|
-
const b = h._hmrPayload.getters[p], k = l ? (
|
|
885
|
-
// special handling of options api
|
|
886
|
-
$(() => (pe(n), b.call(w, w)))
|
|
887
|
-
) : b;
|
|
888
|
-
we(w, p, k);
|
|
889
|
-
}
|
|
890
|
-
Object.keys(w._hmrPayload.getters).forEach((p) => {
|
|
891
|
-
p in h._hmrPayload.getters || je(w, p);
|
|
892
|
-
}), Object.keys(w._hmrPayload.actions).forEach((p) => {
|
|
893
|
-
p in h._hmrPayload.actions || je(w, p);
|
|
894
|
-
}), w._hmrPayload = h._hmrPayload, w._getters = h._getters, w._hotUpdating = !1;
|
|
895
|
-
})), process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && W) {
|
|
896
|
-
const h = {
|
|
897
|
-
writable: !0,
|
|
898
|
-
configurable: !0,
|
|
899
|
-
// avoid warning on devtools trying to display this property
|
|
900
|
-
enumerable: !1
|
|
901
|
-
};
|
|
902
|
-
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p) => {
|
|
903
|
-
Object.defineProperty(w, p, V({ value: w[p] }, h));
|
|
904
|
-
});
|
|
905
|
-
}
|
|
906
|
-
return n._p.forEach((h) => {
|
|
907
|
-
if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && W) {
|
|
908
|
-
const p = s.run(() => h({
|
|
909
|
-
store: w,
|
|
910
|
-
app: n._a,
|
|
911
|
-
pinia: n,
|
|
912
|
-
options: i
|
|
913
|
-
}));
|
|
914
|
-
Object.keys(p || {}).forEach((b) => w._customProperties.add(b)), V(w, p);
|
|
915
|
-
} else
|
|
916
|
-
V(w, s.run(() => h({
|
|
917
|
-
store: w,
|
|
918
|
-
app: n._a,
|
|
919
|
-
pinia: n,
|
|
920
|
-
options: i
|
|
921
|
-
})));
|
|
922
|
-
}), process.env.NODE_ENV !== "production" && w.$state && typeof w.$state == "object" && typeof w.$state.constructor == "function" && !w.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
923
|
-
state: () => new MyClass()
|
|
924
|
-
Found in store "${w.$id}".`), v && l && o.hydrate && o.hydrate(w.$state, v), c = !0, d = !0, w;
|
|
925
|
-
}
|
|
926
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
927
|
-
// @__NO_SIDE_EFFECTS__
|
|
928
|
-
function jn(e, t, o) {
|
|
929
|
-
let n, r;
|
|
930
|
-
const l = typeof t == "function";
|
|
931
|
-
if (typeof e == "string")
|
|
932
|
-
n = e, r = l ? o : t;
|
|
933
|
-
else if (r = e, n = e.id, process.env.NODE_ENV !== "production" && typeof n != "string")
|
|
934
|
-
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
|
935
|
-
function s(i, a) {
|
|
936
|
-
const c = nn();
|
|
937
|
-
if (i = // in test mode, ignore the argument provided as we can always retrieve a
|
|
938
|
-
// pinia instance with getActivePinia()
|
|
939
|
-
(process.env.NODE_ENV === "test" && ne && ne._testing ? null : i) || (c ? on(Tt, null) : null), i && pe(i), process.env.NODE_ENV !== "production" && !ne)
|
|
940
|
-
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
941
|
-
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
942
|
-
This will fail in production.`);
|
|
943
|
-
i = ne, i._s.has(n) || (l ? Ge(n, t, r, i) : ht(n, r, i), process.env.NODE_ENV !== "production" && (s._pinia = i));
|
|
944
|
-
const d = i._s.get(n);
|
|
945
|
-
if (process.env.NODE_ENV !== "production" && a) {
|
|
946
|
-
const f = "__hot:" + n, u = l ? Ge(f, t, r, i, !0) : ht(f, V({}, r), i, !0);
|
|
947
|
-
a._hotUpdate(u), delete i.state.value[f], i._s.delete(f);
|
|
948
|
-
}
|
|
949
|
-
if (process.env.NODE_ENV !== "production" && W) {
|
|
950
|
-
const f = $e();
|
|
951
|
-
if (f && f.proxy && // avoid adding stores that are just built for hot module replacement
|
|
952
|
-
!a) {
|
|
953
|
-
const u = f.proxy, m = "_pStores" in u ? u._pStores : u._pStores = {};
|
|
954
|
-
m[n] = d;
|
|
955
|
-
}
|
|
956
|
-
}
|
|
957
|
-
return d;
|
|
958
|
-
}
|
|
959
|
-
return s.$id = n, s;
|
|
960
|
-
}
|
|
961
|
-
function Ft(e) {
|
|
962
|
-
return Te() ? (Pe(e), !0) : !1;
|
|
963
|
-
}
|
|
964
|
-
function Ze(e) {
|
|
965
|
-
return typeof e == "function" ? e() : y(e);
|
|
966
|
-
}
|
|
967
|
-
const Mn = typeof window < "u" && typeof document < "u";
|
|
9
|
+
const _e = typeof window < "u" && typeof document < "u";
|
|
968
10
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
969
|
-
const
|
|
970
|
-
},
|
|
971
|
-
function
|
|
11
|
+
const et = (e) => e != null, tt = Object.prototype.toString, nt = (e) => tt.call(e) === "[object Object]", ot = () => {
|
|
12
|
+
}, Y = _e ? window : void 0;
|
|
13
|
+
function U(e) {
|
|
972
14
|
var t;
|
|
973
|
-
const
|
|
974
|
-
return (t =
|
|
975
|
-
}
|
|
976
|
-
function
|
|
977
|
-
let t,
|
|
978
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([
|
|
979
|
-
return
|
|
980
|
-
Array.isArray(
|
|
981
|
-
const
|
|
982
|
-
|
|
983
|
-
},
|
|
984
|
-
() => [
|
|
985
|
-
([d,
|
|
986
|
-
if (
|
|
15
|
+
const n = ce(e);
|
|
16
|
+
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
17
|
+
}
|
|
18
|
+
function G(...e) {
|
|
19
|
+
let t, n, o, r;
|
|
20
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, r] = e, t = Y) : [t, n, o, r] = e, !t)
|
|
21
|
+
return ot;
|
|
22
|
+
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
23
|
+
const i = [], l = () => {
|
|
24
|
+
i.forEach((d) => d()), i.length = 0;
|
|
25
|
+
}, c = (d, m, a, f) => (d.addEventListener(m, a, f), () => d.removeEventListener(m, a, f)), s = $(
|
|
26
|
+
() => [U(t), ce(r)],
|
|
27
|
+
([d, m]) => {
|
|
28
|
+
if (l(), !d)
|
|
987
29
|
return;
|
|
988
|
-
const
|
|
989
|
-
|
|
990
|
-
...
|
|
30
|
+
const a = nt(m) ? { ...m } : m;
|
|
31
|
+
i.push(
|
|
32
|
+
...n.flatMap((f) => o.map((v) => c(d, f, v, a)))
|
|
991
33
|
);
|
|
992
34
|
},
|
|
993
35
|
{ immediate: !0, flush: "post" }
|
|
994
|
-
),
|
|
995
|
-
|
|
36
|
+
), u = () => {
|
|
37
|
+
s(), l();
|
|
996
38
|
};
|
|
997
|
-
return
|
|
39
|
+
return Pe(u), u;
|
|
998
40
|
}
|
|
999
|
-
function
|
|
1000
|
-
const e =
|
|
1001
|
-
return t &&
|
|
41
|
+
function lt() {
|
|
42
|
+
const e = y(!1), t = se();
|
|
43
|
+
return t && q(() => {
|
|
1002
44
|
e.value = !0;
|
|
1003
45
|
}, t), e;
|
|
1004
46
|
}
|
|
1005
|
-
function
|
|
1006
|
-
const t =
|
|
1007
|
-
return
|
|
1008
|
-
}
|
|
1009
|
-
function
|
|
1010
|
-
const { window:
|
|
1011
|
-
let
|
|
1012
|
-
const
|
|
1013
|
-
|
|
1014
|
-
},
|
|
1015
|
-
const
|
|
1016
|
-
return new Set(
|
|
1017
|
-
}),
|
|
1018
|
-
() =>
|
|
1019
|
-
(
|
|
1020
|
-
|
|
47
|
+
function rt(e) {
|
|
48
|
+
const t = lt();
|
|
49
|
+
return S(() => (t.value, !!e()));
|
|
50
|
+
}
|
|
51
|
+
function st(e, t, n = {}) {
|
|
52
|
+
const { window: o = Y, ...r } = n;
|
|
53
|
+
let i;
|
|
54
|
+
const l = rt(() => o && "MutationObserver" in o), c = () => {
|
|
55
|
+
i && (i.disconnect(), i = void 0);
|
|
56
|
+
}, s = S(() => {
|
|
57
|
+
const a = ce(e), f = (Array.isArray(a) ? a : [a]).map(U).filter(et);
|
|
58
|
+
return new Set(f);
|
|
59
|
+
}), u = $(
|
|
60
|
+
() => s.value,
|
|
61
|
+
(a) => {
|
|
62
|
+
c(), l.value && a.size && (i = new MutationObserver(t), a.forEach((f) => i.observe(f, r)));
|
|
1021
63
|
},
|
|
1022
64
|
{ immediate: !0, flush: "post" }
|
|
1023
|
-
), d = () =>
|
|
1024
|
-
|
|
65
|
+
), d = () => i == null ? void 0 : i.takeRecords(), m = () => {
|
|
66
|
+
u(), c();
|
|
1025
67
|
};
|
|
1026
|
-
return
|
|
1027
|
-
isSupported:
|
|
1028
|
-
stop:
|
|
68
|
+
return Pe(m), {
|
|
69
|
+
isSupported: l,
|
|
70
|
+
stop: m,
|
|
1029
71
|
takeRecords: d
|
|
1030
72
|
};
|
|
1031
73
|
}
|
|
1032
|
-
function
|
|
74
|
+
function at(e = {}) {
|
|
1033
75
|
var t;
|
|
1034
76
|
const {
|
|
1035
|
-
window:
|
|
1036
|
-
deep:
|
|
77
|
+
window: n = Y,
|
|
78
|
+
deep: o = !0,
|
|
1037
79
|
triggerOnRemoval: r = !1
|
|
1038
|
-
} = e,
|
|
1039
|
-
var
|
|
1040
|
-
let d =
|
|
1041
|
-
if (
|
|
80
|
+
} = e, i = (t = e.document) != null ? t : n == null ? void 0 : n.document, l = () => {
|
|
81
|
+
var u;
|
|
82
|
+
let d = i == null ? void 0 : i.activeElement;
|
|
83
|
+
if (o)
|
|
1042
84
|
for (; d != null && d.shadowRoot; )
|
|
1043
|
-
d = (
|
|
85
|
+
d = (u = d == null ? void 0 : d.shadowRoot) == null ? void 0 : u.activeElement;
|
|
1044
86
|
return d;
|
|
1045
|
-
},
|
|
1046
|
-
|
|
87
|
+
}, c = y(), s = () => {
|
|
88
|
+
c.value = l();
|
|
1047
89
|
};
|
|
1048
|
-
return
|
|
1049
|
-
|
|
1050
|
-
}, !0),
|
|
1051
|
-
|
|
1052
|
-
d ===
|
|
90
|
+
return n && (G(n, "blur", (u) => {
|
|
91
|
+
u.relatedTarget === null && s();
|
|
92
|
+
}, !0), G(n, "focus", s, !0)), r && st(i, (u) => {
|
|
93
|
+
u.filter((d) => d.removedNodes.length).map((d) => Array.from(d.removedNodes)).flat().forEach((d) => {
|
|
94
|
+
d === c.value && s();
|
|
1053
95
|
});
|
|
1054
96
|
}, {
|
|
1055
97
|
childList: !0,
|
|
1056
98
|
subtree: !0
|
|
1057
|
-
}),
|
|
99
|
+
}), s(), c;
|
|
1058
100
|
}
|
|
1059
|
-
const
|
|
1060
|
-
function
|
|
1061
|
-
const { window:
|
|
1062
|
-
return !
|
|
101
|
+
const it = "focusin", ct = "focusout";
|
|
102
|
+
function ut(e, t = {}) {
|
|
103
|
+
const { window: n = Y } = t, o = S(() => U(e)), r = y(!1), i = S(() => r.value), l = at(t);
|
|
104
|
+
return !n || !l.value ? { focused: i } : (G(o, it, () => r.value = !0), G(o, ct, () => r.value = !1), { focused: i });
|
|
1063
105
|
}
|
|
1064
|
-
function
|
|
1065
|
-
const
|
|
106
|
+
function dt(e, { window: t = Y, scrollTarget: n } = {}) {
|
|
107
|
+
const o = y(!1), r = () => {
|
|
1066
108
|
if (!t) return;
|
|
1067
|
-
const
|
|
1068
|
-
if (!
|
|
1069
|
-
|
|
109
|
+
const i = t.document, l = U(e);
|
|
110
|
+
if (!l)
|
|
111
|
+
o.value = !1;
|
|
1070
112
|
else {
|
|
1071
|
-
const
|
|
1072
|
-
|
|
113
|
+
const c = l.getBoundingClientRect();
|
|
114
|
+
o.value = c.top <= (t.innerHeight || i.documentElement.clientHeight) && c.left <= (t.innerWidth || i.documentElement.clientWidth) && c.bottom >= 0 && c.right >= 0;
|
|
1073
115
|
}
|
|
1074
116
|
};
|
|
1075
|
-
return
|
|
1076
|
-
() =>
|
|
117
|
+
return $(
|
|
118
|
+
() => U(e),
|
|
1077
119
|
() => r(),
|
|
1078
120
|
{ immediate: !0, flush: "post" }
|
|
1079
|
-
), t &&
|
|
121
|
+
), t && G(n || t, "scroll", r, {
|
|
1080
122
|
capture: !1,
|
|
1081
123
|
passive: !0
|
|
1082
|
-
}),
|
|
124
|
+
}), o;
|
|
1083
125
|
}
|
|
1084
|
-
const
|
|
1085
|
-
let t =
|
|
126
|
+
const M = (e) => {
|
|
127
|
+
let t = dt(e).value;
|
|
1086
128
|
return t = t && e.offsetHeight > 0, t;
|
|
1087
|
-
},
|
|
129
|
+
}, R = (e) => e.tabIndex >= 0, Ee = (e) => {
|
|
1088
130
|
const t = e.target;
|
|
1089
|
-
return
|
|
1090
|
-
},
|
|
131
|
+
return ue(t);
|
|
132
|
+
}, ue = (e) => {
|
|
1091
133
|
var t;
|
|
1092
|
-
let
|
|
134
|
+
let n;
|
|
1093
135
|
if (e instanceof HTMLTableCellElement) {
|
|
1094
|
-
const
|
|
1095
|
-
if (
|
|
1096
|
-
const r = Array.from(
|
|
1097
|
-
r && (
|
|
136
|
+
const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
|
|
137
|
+
if (o) {
|
|
138
|
+
const r = Array.from(o.children)[e.cellIndex];
|
|
139
|
+
r && (n = r);
|
|
1098
140
|
}
|
|
1099
141
|
} else if (e instanceof HTMLTableRowElement) {
|
|
1100
|
-
const
|
|
1101
|
-
|
|
142
|
+
const o = e.previousElementSibling;
|
|
143
|
+
o && (n = o);
|
|
1102
144
|
}
|
|
1103
|
-
return
|
|
1104
|
-
},
|
|
145
|
+
return n && (!R(n) || !M(n)) ? ue(n) : n;
|
|
146
|
+
}, ft = (e) => {
|
|
1105
147
|
var t;
|
|
1106
|
-
const
|
|
1107
|
-
let
|
|
1108
|
-
if (
|
|
1109
|
-
const r = (t =
|
|
148
|
+
const n = e.target;
|
|
149
|
+
let o;
|
|
150
|
+
if (n instanceof HTMLTableCellElement) {
|
|
151
|
+
const r = (t = n.parentElement) == null ? void 0 : t.parentElement;
|
|
1110
152
|
if (r) {
|
|
1111
|
-
const
|
|
1112
|
-
|
|
153
|
+
const i = r.firstElementChild.children[n.cellIndex];
|
|
154
|
+
i && (o = i);
|
|
1113
155
|
}
|
|
1114
|
-
} else if (
|
|
1115
|
-
const r =
|
|
156
|
+
} else if (n instanceof HTMLTableRowElement) {
|
|
157
|
+
const r = n.parentElement;
|
|
1116
158
|
if (r) {
|
|
1117
|
-
const
|
|
1118
|
-
|
|
159
|
+
const i = r.firstElementChild;
|
|
160
|
+
i && (o = i);
|
|
1119
161
|
}
|
|
1120
162
|
}
|
|
1121
|
-
return
|
|
1122
|
-
},
|
|
163
|
+
return o && (!R(o) || !M(o)) ? de(o) : o;
|
|
164
|
+
}, ke = (e) => {
|
|
1123
165
|
const t = e.target;
|
|
1124
|
-
return
|
|
1125
|
-
},
|
|
166
|
+
return de(t);
|
|
167
|
+
}, de = (e) => {
|
|
1126
168
|
var t;
|
|
1127
|
-
let
|
|
169
|
+
let n;
|
|
1128
170
|
if (e instanceof HTMLTableCellElement) {
|
|
1129
|
-
const
|
|
1130
|
-
if (
|
|
1131
|
-
const r = Array.from(
|
|
1132
|
-
r && (
|
|
171
|
+
const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
|
|
172
|
+
if (o) {
|
|
173
|
+
const r = Array.from(o.children)[e.cellIndex];
|
|
174
|
+
r && (n = r);
|
|
1133
175
|
}
|
|
1134
176
|
} else if (e instanceof HTMLTableRowElement) {
|
|
1135
|
-
const
|
|
1136
|
-
|
|
177
|
+
const o = e.nextElementSibling;
|
|
178
|
+
o && (n = o);
|
|
1137
179
|
}
|
|
1138
|
-
return
|
|
1139
|
-
},
|
|
180
|
+
return n && (!R(n) || !M(n)) ? de(n) : n;
|
|
181
|
+
}, mt = (e) => {
|
|
1140
182
|
var t;
|
|
1141
|
-
const
|
|
1142
|
-
let
|
|
1143
|
-
if (
|
|
1144
|
-
const r = (t =
|
|
183
|
+
const n = e.target;
|
|
184
|
+
let o;
|
|
185
|
+
if (n instanceof HTMLTableCellElement) {
|
|
186
|
+
const r = (t = n.parentElement) == null ? void 0 : t.parentElement;
|
|
1145
187
|
if (r) {
|
|
1146
|
-
const
|
|
1147
|
-
|
|
188
|
+
const i = r.lastElementChild.children[n.cellIndex];
|
|
189
|
+
i && (o = i);
|
|
1148
190
|
}
|
|
1149
|
-
} else if (
|
|
1150
|
-
const r =
|
|
191
|
+
} else if (n instanceof HTMLTableRowElement) {
|
|
192
|
+
const r = n.parentElement;
|
|
1151
193
|
if (r) {
|
|
1152
|
-
const
|
|
1153
|
-
|
|
194
|
+
const i = r.lastElementChild;
|
|
195
|
+
i && (o = i);
|
|
1154
196
|
}
|
|
1155
197
|
}
|
|
1156
|
-
return
|
|
1157
|
-
},
|
|
198
|
+
return o && (!R(o) || !M(o)) ? ue(o) : o;
|
|
199
|
+
}, Ce = (e) => {
|
|
1158
200
|
const t = e.target;
|
|
1159
|
-
return
|
|
1160
|
-
},
|
|
201
|
+
return fe(t);
|
|
202
|
+
}, fe = (e) => {
|
|
1161
203
|
var t;
|
|
1162
|
-
let
|
|
204
|
+
let n;
|
|
1163
205
|
if (e.previousElementSibling)
|
|
1164
|
-
|
|
206
|
+
n = e.previousElementSibling;
|
|
1165
207
|
else {
|
|
1166
|
-
const
|
|
1167
|
-
|
|
208
|
+
const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
|
|
209
|
+
n = o == null ? void 0 : o.lastElementChild;
|
|
1168
210
|
}
|
|
1169
|
-
return
|
|
1170
|
-
},
|
|
211
|
+
return n && (!R(n) || !M(n)) ? fe(n) : n;
|
|
212
|
+
}, Ae = (e) => {
|
|
1171
213
|
const t = e.target;
|
|
1172
|
-
return
|
|
1173
|
-
},
|
|
214
|
+
return me(t);
|
|
215
|
+
}, me = (e) => {
|
|
1174
216
|
var t;
|
|
1175
|
-
let
|
|
217
|
+
let n;
|
|
1176
218
|
if (e.nextElementSibling)
|
|
1177
|
-
|
|
219
|
+
n = e.nextElementSibling;
|
|
1178
220
|
else {
|
|
1179
|
-
const
|
|
1180
|
-
|
|
221
|
+
const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
|
|
222
|
+
n = o == null ? void 0 : o.firstElementChild;
|
|
1181
223
|
}
|
|
1182
|
-
return
|
|
1183
|
-
},
|
|
224
|
+
return n && (!R(n) || !M(n)) ? me(n) : n;
|
|
225
|
+
}, Ie = (e) => {
|
|
1184
226
|
const t = e.target.parentElement.firstElementChild;
|
|
1185
|
-
return t && (!
|
|
1186
|
-
},
|
|
227
|
+
return t && (!R(t) || !M(t)) ? me(t) : t;
|
|
228
|
+
}, Se = (e) => {
|
|
1187
229
|
const t = e.target.parentElement.lastElementChild;
|
|
1188
|
-
return t && (!
|
|
1189
|
-
},
|
|
230
|
+
return t && (!R(t) || !M(t)) ? fe(t) : t;
|
|
231
|
+
}, X = ["alt", "control", "shift", "meta"], vt = {
|
|
1190
232
|
ArrowUp: "up",
|
|
1191
233
|
ArrowDown: "down",
|
|
1192
234
|
ArrowLeft: "left",
|
|
1193
235
|
ArrowRight: "right"
|
|
1194
|
-
},
|
|
236
|
+
}, ve = {
|
|
1195
237
|
"keydown.up": (e) => {
|
|
1196
|
-
const t =
|
|
238
|
+
const t = Ee(e);
|
|
1197
239
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
1198
240
|
},
|
|
1199
241
|
"keydown.down": (e) => {
|
|
1200
|
-
const t =
|
|
242
|
+
const t = ke(e);
|
|
1201
243
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
1202
244
|
},
|
|
1203
245
|
"keydown.left": (e) => {
|
|
1204
|
-
const t =
|
|
246
|
+
const t = Ce(e);
|
|
1205
247
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
1206
248
|
},
|
|
1207
249
|
"keydown.right": (e) => {
|
|
1208
|
-
const t =
|
|
250
|
+
const t = Ae(e);
|
|
1209
251
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
1210
252
|
},
|
|
1211
253
|
"keydown.control.up": (e) => {
|
|
1212
|
-
const t =
|
|
254
|
+
const t = ft(e);
|
|
1213
255
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
1214
256
|
},
|
|
1215
257
|
"keydown.control.down": (e) => {
|
|
1216
|
-
const t =
|
|
258
|
+
const t = mt(e);
|
|
1217
259
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
1218
260
|
},
|
|
1219
261
|
"keydown.control.left": (e) => {
|
|
1220
|
-
const t =
|
|
262
|
+
const t = Ie(e);
|
|
1221
263
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
1222
264
|
},
|
|
1223
265
|
"keydown.control.right": (e) => {
|
|
1224
|
-
const t =
|
|
266
|
+
const t = Se(e);
|
|
1225
267
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
1226
268
|
},
|
|
1227
269
|
"keydown.end": (e) => {
|
|
1228
|
-
const t =
|
|
270
|
+
const t = Se(e);
|
|
1229
271
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
1230
272
|
},
|
|
1231
273
|
"keydown.enter": (e) => {
|
|
1232
274
|
if (e.target instanceof HTMLTableCellElement) {
|
|
1233
275
|
e.preventDefault(), e.stopPropagation();
|
|
1234
|
-
const t =
|
|
276
|
+
const t = ke(e);
|
|
1235
277
|
t && t.focus();
|
|
1236
278
|
}
|
|
1237
279
|
},
|
|
1238
280
|
"keydown.shift.enter": (e) => {
|
|
1239
281
|
if (e.target instanceof HTMLTableCellElement) {
|
|
1240
282
|
e.preventDefault(), e.stopPropagation();
|
|
1241
|
-
const t =
|
|
283
|
+
const t = Ee(e);
|
|
1242
284
|
t && t.focus();
|
|
1243
285
|
}
|
|
1244
286
|
},
|
|
1245
287
|
"keydown.home": (e) => {
|
|
1246
|
-
const t =
|
|
288
|
+
const t = Ie(e);
|
|
1247
289
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
1248
290
|
},
|
|
1249
291
|
"keydown.tab": (e) => {
|
|
1250
|
-
const t =
|
|
292
|
+
const t = Ae(e);
|
|
1251
293
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
1252
294
|
},
|
|
1253
295
|
"keydown.shift.tab": (e) => {
|
|
1254
|
-
const t =
|
|
296
|
+
const t = Ce(e);
|
|
1255
297
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
1256
298
|
}
|
|
1257
299
|
};
|
|
1258
|
-
function
|
|
1259
|
-
const t = (
|
|
1260
|
-
let
|
|
1261
|
-
return
|
|
1262
|
-
},
|
|
1263
|
-
const
|
|
1264
|
-
let
|
|
1265
|
-
if (typeof
|
|
1266
|
-
|
|
1267
|
-
else if (Array.isArray(
|
|
1268
|
-
for (const
|
|
1269
|
-
|
|
1270
|
-
else if (
|
|
1271
|
-
|
|
1272
|
-
else if (Array.isArray(
|
|
1273
|
-
for (const
|
|
1274
|
-
|
|
300
|
+
function pe(e) {
|
|
301
|
+
const t = (l) => {
|
|
302
|
+
let c = null;
|
|
303
|
+
return l.parent && (typeof l.parent == "string" ? c = document.querySelector(l.parent) : l.parent instanceof HTMLElement ? c = l.parent : c = l.parent.value), c;
|
|
304
|
+
}, n = (l) => {
|
|
305
|
+
const c = t(l);
|
|
306
|
+
let s = [];
|
|
307
|
+
if (typeof l.selectors == "string")
|
|
308
|
+
s = c ? Array.from(c.querySelectorAll(l.selectors)) : Array.from(document.querySelectorAll(l.selectors));
|
|
309
|
+
else if (Array.isArray(l.selectors))
|
|
310
|
+
for (const u of l.selectors)
|
|
311
|
+
u instanceof HTMLElement ? s.push(u) : s.push(u.$el);
|
|
312
|
+
else if (l.selectors instanceof HTMLElement)
|
|
313
|
+
s.push(l.selectors);
|
|
314
|
+
else if (Array.isArray(l.selectors.value))
|
|
315
|
+
for (const u of l.selectors.value)
|
|
316
|
+
u instanceof HTMLElement ? s.push(u) : s.push(u.$el);
|
|
1275
317
|
else
|
|
1276
|
-
|
|
1277
|
-
return
|
|
1278
|
-
},
|
|
1279
|
-
const
|
|
1280
|
-
let
|
|
1281
|
-
return
|
|
1282
|
-
}, r = (
|
|
1283
|
-
const
|
|
1284
|
-
if (
|
|
1285
|
-
const
|
|
1286
|
-
for (const d of Object.keys(
|
|
1287
|
-
const [
|
|
1288
|
-
if (
|
|
1289
|
-
const
|
|
1290
|
-
const
|
|
1291
|
-
return
|
|
318
|
+
s.push(l.selectors.value);
|
|
319
|
+
return s;
|
|
320
|
+
}, o = (l) => {
|
|
321
|
+
const c = t(l);
|
|
322
|
+
let s = [];
|
|
323
|
+
return l.selectors ? s = n(l) : c && (s = Array.from(c.children).filter((u) => R(u) && M(u))), s;
|
|
324
|
+
}, r = (l) => (c) => {
|
|
325
|
+
const s = vt[c.key] || c.key.toLowerCase();
|
|
326
|
+
if (X.includes(s)) return;
|
|
327
|
+
const u = l.handlers || ve;
|
|
328
|
+
for (const d of Object.keys(u)) {
|
|
329
|
+
const [m, ...a] = d.split(".");
|
|
330
|
+
if (m === "keydown" && a.includes(s)) {
|
|
331
|
+
const f = u[d], v = a.filter((b) => X.includes(b)), E = X.some((b) => {
|
|
332
|
+
const h = b.charAt(0).toUpperCase() + b.slice(1);
|
|
333
|
+
return c.getModifierState(h);
|
|
1292
334
|
});
|
|
1293
335
|
if (v.length > 0) {
|
|
1294
|
-
if (
|
|
1295
|
-
for (const
|
|
1296
|
-
if (
|
|
1297
|
-
const
|
|
1298
|
-
|
|
336
|
+
if (E) {
|
|
337
|
+
for (const b of X)
|
|
338
|
+
if (a.includes(b)) {
|
|
339
|
+
const h = b.charAt(0).toUpperCase() + b.slice(1);
|
|
340
|
+
c.getModifierState(h) && f(c);
|
|
1299
341
|
}
|
|
1300
342
|
}
|
|
1301
343
|
} else
|
|
1302
|
-
|
|
344
|
+
E || f(c);
|
|
1303
345
|
}
|
|
1304
346
|
}
|
|
1305
|
-
},
|
|
1306
|
-
|
|
1307
|
-
for (const
|
|
1308
|
-
const
|
|
1309
|
-
for (const
|
|
1310
|
-
const { focused:
|
|
1311
|
-
v ?
|
|
347
|
+
}, i = [];
|
|
348
|
+
q(() => {
|
|
349
|
+
for (const l of e) {
|
|
350
|
+
const c = t(l), s = o(l), u = r(l), d = c ? [c] : s;
|
|
351
|
+
for (const m of d) {
|
|
352
|
+
const { focused: a } = ut(y(m)), f = $(a, (v) => {
|
|
353
|
+
v ? m.addEventListener("keydown", u) : m.removeEventListener("keydown", u);
|
|
1312
354
|
});
|
|
1313
|
-
|
|
355
|
+
i.push(f);
|
|
1314
356
|
}
|
|
1315
357
|
}
|
|
1316
|
-
}),
|
|
1317
|
-
for (const
|
|
1318
|
-
|
|
358
|
+
}), Ye(() => {
|
|
359
|
+
for (const l of i)
|
|
360
|
+
l();
|
|
1319
361
|
});
|
|
1320
362
|
}
|
|
1321
|
-
function
|
|
1322
|
-
return
|
|
363
|
+
function We(e) {
|
|
364
|
+
return le() ? (re(e), !0) : !1;
|
|
1323
365
|
}
|
|
1324
|
-
function
|
|
1325
|
-
return typeof e == "function" ? e() :
|
|
366
|
+
function j(e) {
|
|
367
|
+
return typeof e == "function" ? e() : w(e);
|
|
1326
368
|
}
|
|
1327
|
-
const
|
|
369
|
+
const He = typeof window < "u" && typeof document < "u";
|
|
1328
370
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
1329
|
-
const
|
|
1330
|
-
},
|
|
1331
|
-
function
|
|
371
|
+
const pt = Object.prototype.toString, wt = (e) => pt.call(e) === "[object Object]", V = () => {
|
|
372
|
+
}, oe = /* @__PURE__ */ ht();
|
|
373
|
+
function ht() {
|
|
1332
374
|
var e, t;
|
|
1333
|
-
return
|
|
375
|
+
return He && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
1334
376
|
}
|
|
1335
|
-
const
|
|
377
|
+
const $e = {
|
|
1336
378
|
mounted: "mounted",
|
|
1337
379
|
updated: "updated",
|
|
1338
380
|
unmounted: "unmounted"
|
|
1339
381
|
};
|
|
1340
|
-
function
|
|
382
|
+
function gt(...e) {
|
|
1341
383
|
if (e.length !== 1)
|
|
1342
|
-
return
|
|
384
|
+
return Xe(...e);
|
|
1343
385
|
const t = e[0];
|
|
1344
|
-
return typeof t == "function" ?
|
|
386
|
+
return typeof t == "function" ? Je(Qe(() => ({ get: t, set: V }))) : y(t);
|
|
1345
387
|
}
|
|
1346
|
-
function
|
|
388
|
+
function W(e) {
|
|
1347
389
|
var t;
|
|
1348
|
-
const
|
|
1349
|
-
return (t =
|
|
1350
|
-
}
|
|
1351
|
-
const
|
|
1352
|
-
function
|
|
1353
|
-
let t,
|
|
1354
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([
|
|
1355
|
-
return
|
|
1356
|
-
Array.isArray(
|
|
1357
|
-
const
|
|
1358
|
-
|
|
1359
|
-
},
|
|
1360
|
-
() => [
|
|
1361
|
-
([d,
|
|
1362
|
-
if (
|
|
390
|
+
const n = j(e);
|
|
391
|
+
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
392
|
+
}
|
|
393
|
+
const Ne = He ? window : void 0;
|
|
394
|
+
function Q(...e) {
|
|
395
|
+
let t, n, o, r;
|
|
396
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, r] = e, t = Ne) : [t, n, o, r] = e, !t)
|
|
397
|
+
return V;
|
|
398
|
+
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
399
|
+
const i = [], l = () => {
|
|
400
|
+
i.forEach((d) => d()), i.length = 0;
|
|
401
|
+
}, c = (d, m, a, f) => (d.addEventListener(m, a, f), () => d.removeEventListener(m, a, f)), s = $(
|
|
402
|
+
() => [W(t), j(r)],
|
|
403
|
+
([d, m]) => {
|
|
404
|
+
if (l(), !d)
|
|
1363
405
|
return;
|
|
1364
|
-
const
|
|
1365
|
-
|
|
1366
|
-
...
|
|
406
|
+
const a = wt(m) ? { ...m } : m;
|
|
407
|
+
i.push(
|
|
408
|
+
...n.flatMap((f) => o.map((v) => c(d, f, v, a)))
|
|
1367
409
|
);
|
|
1368
410
|
},
|
|
1369
411
|
{ immediate: !0, flush: "post" }
|
|
1370
|
-
),
|
|
1371
|
-
|
|
412
|
+
), u = () => {
|
|
413
|
+
s(), l();
|
|
1372
414
|
};
|
|
1373
|
-
return
|
|
1374
|
-
}
|
|
1375
|
-
let
|
|
1376
|
-
function
|
|
1377
|
-
const { window:
|
|
1378
|
-
if (!
|
|
1379
|
-
return
|
|
1380
|
-
|
|
1381
|
-
let
|
|
1382
|
-
const
|
|
1383
|
-
if (typeof
|
|
1384
|
-
return Array.from(
|
|
415
|
+
return We(u), u;
|
|
416
|
+
}
|
|
417
|
+
let Oe = !1;
|
|
418
|
+
function Te(e, t, n = {}) {
|
|
419
|
+
const { window: o = Ne, ignore: r = [], capture: i = !0, detectIframe: l = !1 } = n;
|
|
420
|
+
if (!o)
|
|
421
|
+
return V;
|
|
422
|
+
oe && !Oe && (Oe = !0, Array.from(o.document.body.children).forEach((a) => a.addEventListener("click", V)), o.document.documentElement.addEventListener("click", V));
|
|
423
|
+
let c = !0;
|
|
424
|
+
const s = (a) => r.some((f) => {
|
|
425
|
+
if (typeof f == "string")
|
|
426
|
+
return Array.from(o.document.querySelectorAll(f)).some((v) => v === a.target || a.composedPath().includes(v));
|
|
1385
427
|
{
|
|
1386
|
-
const v =
|
|
1387
|
-
return v && (
|
|
428
|
+
const v = W(f);
|
|
429
|
+
return v && (a.target === v || a.composedPath().includes(v));
|
|
1388
430
|
}
|
|
1389
431
|
}), d = [
|
|
1390
|
-
|
|
1391
|
-
const
|
|
1392
|
-
if (!(!
|
|
1393
|
-
if (
|
|
1394
|
-
|
|
432
|
+
Q(o, "click", (a) => {
|
|
433
|
+
const f = W(e);
|
|
434
|
+
if (!(!f || f === a.target || a.composedPath().includes(f))) {
|
|
435
|
+
if (a.detail === 0 && (c = !s(a)), !c) {
|
|
436
|
+
c = !0;
|
|
1395
437
|
return;
|
|
1396
438
|
}
|
|
1397
|
-
t(
|
|
439
|
+
t(a);
|
|
1398
440
|
}
|
|
1399
|
-
}, { passive: !0, capture:
|
|
1400
|
-
|
|
1401
|
-
const
|
|
1402
|
-
|
|
441
|
+
}, { passive: !0, capture: i }),
|
|
442
|
+
Q(o, "pointerdown", (a) => {
|
|
443
|
+
const f = W(e);
|
|
444
|
+
c = !s(a) && !!(f && !a.composedPath().includes(f));
|
|
1403
445
|
}, { passive: !0 }),
|
|
1404
|
-
|
|
446
|
+
l && Q(o, "blur", (a) => {
|
|
1405
447
|
setTimeout(() => {
|
|
1406
|
-
var
|
|
1407
|
-
const v =
|
|
1408
|
-
((
|
|
448
|
+
var f;
|
|
449
|
+
const v = W(e);
|
|
450
|
+
((f = o.document.activeElement) == null ? void 0 : f.tagName) === "IFRAME" && !(v != null && v.contains(o.document.activeElement)) && t(a);
|
|
1409
451
|
}, 0);
|
|
1410
452
|
})
|
|
1411
453
|
].filter(Boolean);
|
|
1412
|
-
return () => d.forEach((
|
|
454
|
+
return () => d.forEach((a) => a());
|
|
1413
455
|
}
|
|
1414
|
-
const
|
|
1415
|
-
[
|
|
1416
|
-
const
|
|
456
|
+
const yt = {
|
|
457
|
+
[$e.mounted](e, t) {
|
|
458
|
+
const n = !t.modifiers.bubble;
|
|
1417
459
|
if (typeof t.value == "function")
|
|
1418
|
-
e.__onClickOutside_stop =
|
|
460
|
+
e.__onClickOutside_stop = Te(e, t.value, { capture: n });
|
|
1419
461
|
else {
|
|
1420
|
-
const [
|
|
1421
|
-
e.__onClickOutside_stop =
|
|
462
|
+
const [o, r] = t.value;
|
|
463
|
+
e.__onClickOutside_stop = Te(e, o, Object.assign({ capture: n }, r));
|
|
1422
464
|
}
|
|
1423
465
|
},
|
|
1424
|
-
[
|
|
466
|
+
[$e.unmounted](e) {
|
|
1425
467
|
e.__onClickOutside_stop();
|
|
1426
468
|
}
|
|
1427
469
|
};
|
|
1428
|
-
function
|
|
470
|
+
function ee(e) {
|
|
1429
471
|
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
1430
472
|
}
|
|
1431
|
-
function
|
|
473
|
+
function je(e) {
|
|
1432
474
|
const t = window.getComputedStyle(e);
|
|
1433
475
|
if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight)
|
|
1434
476
|
return !0;
|
|
1435
477
|
{
|
|
1436
|
-
const
|
|
1437
|
-
return !
|
|
478
|
+
const n = e.parentNode;
|
|
479
|
+
return !n || n.tagName === "BODY" ? !1 : je(n);
|
|
1438
480
|
}
|
|
1439
481
|
}
|
|
1440
|
-
function
|
|
1441
|
-
const t = e || window.event,
|
|
1442
|
-
return
|
|
1443
|
-
}
|
|
1444
|
-
const
|
|
1445
|
-
function
|
|
1446
|
-
const
|
|
1447
|
-
let
|
|
1448
|
-
|
|
1449
|
-
const
|
|
1450
|
-
if (
|
|
1451
|
-
const
|
|
1452
|
-
if (
|
|
1453
|
-
return
|
|
1454
|
-
if (
|
|
1455
|
-
return
|
|
482
|
+
function bt(e) {
|
|
483
|
+
const t = e || window.event, n = t.target;
|
|
484
|
+
return je(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
|
|
485
|
+
}
|
|
486
|
+
const te = /* @__PURE__ */ new WeakMap();
|
|
487
|
+
function xt(e, t = !1) {
|
|
488
|
+
const n = y(t);
|
|
489
|
+
let o = null, r = "";
|
|
490
|
+
$(gt(e), (c) => {
|
|
491
|
+
const s = ee(j(c));
|
|
492
|
+
if (s) {
|
|
493
|
+
const u = s;
|
|
494
|
+
if (te.get(u) || te.set(u, u.style.overflow), u.style.overflow !== "hidden" && (r = u.style.overflow), u.style.overflow === "hidden")
|
|
495
|
+
return n.value = !0;
|
|
496
|
+
if (n.value)
|
|
497
|
+
return u.style.overflow = "hidden";
|
|
1456
498
|
}
|
|
1457
499
|
}, {
|
|
1458
500
|
immediate: !0
|
|
1459
501
|
});
|
|
1460
|
-
const
|
|
1461
|
-
const
|
|
1462
|
-
!
|
|
1463
|
-
|
|
502
|
+
const i = () => {
|
|
503
|
+
const c = ee(j(e));
|
|
504
|
+
!c || n.value || (oe && (o = Q(
|
|
505
|
+
c,
|
|
1464
506
|
"touchmove",
|
|
1465
|
-
(
|
|
1466
|
-
|
|
507
|
+
(s) => {
|
|
508
|
+
bt(s);
|
|
1467
509
|
},
|
|
1468
510
|
{ passive: !1 }
|
|
1469
|
-
)),
|
|
1470
|
-
},
|
|
1471
|
-
const
|
|
1472
|
-
!
|
|
511
|
+
)), c.style.overflow = "hidden", n.value = !0);
|
|
512
|
+
}, l = () => {
|
|
513
|
+
const c = ee(j(e));
|
|
514
|
+
!c || !n.value || (oe && (o == null || o()), c.style.overflow = r, te.delete(c), n.value = !1);
|
|
1473
515
|
};
|
|
1474
|
-
return
|
|
516
|
+
return We(l), S({
|
|
1475
517
|
get() {
|
|
1476
|
-
return
|
|
518
|
+
return n.value;
|
|
1477
519
|
},
|
|
1478
|
-
set(
|
|
1479
|
-
|
|
520
|
+
set(c) {
|
|
521
|
+
c ? i() : l();
|
|
1480
522
|
}
|
|
1481
523
|
});
|
|
1482
524
|
}
|
|
1483
|
-
function
|
|
525
|
+
function Et() {
|
|
1484
526
|
let e = !1;
|
|
1485
|
-
const t =
|
|
1486
|
-
return (
|
|
1487
|
-
if (t.value =
|
|
527
|
+
const t = y(!1);
|
|
528
|
+
return (n, o) => {
|
|
529
|
+
if (t.value = o.value, e)
|
|
1488
530
|
return;
|
|
1489
531
|
e = !0;
|
|
1490
|
-
const r =
|
|
1491
|
-
|
|
532
|
+
const r = xt(n, o.value);
|
|
533
|
+
$(t, (i) => r.value = i);
|
|
1492
534
|
};
|
|
1493
535
|
}
|
|
1494
|
-
|
|
1495
|
-
function
|
|
1496
|
-
return
|
|
536
|
+
Et();
|
|
537
|
+
function we(e) {
|
|
538
|
+
return le() ? (re(e), !0) : !1;
|
|
1497
539
|
}
|
|
1498
|
-
function
|
|
1499
|
-
return typeof e == "function" ? e() :
|
|
540
|
+
function _(e) {
|
|
541
|
+
return typeof e == "function" ? e() : w(e);
|
|
1500
542
|
}
|
|
1501
|
-
const
|
|
543
|
+
const kt = typeof window < "u" && typeof document < "u";
|
|
1502
544
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
1503
|
-
const
|
|
545
|
+
const Ct = (e) => e != null, At = Object.prototype.toString, It = (e) => At.call(e) === "[object Object]", St = () => {
|
|
1504
546
|
};
|
|
1505
|
-
function
|
|
1506
|
-
return
|
|
547
|
+
function $t(e) {
|
|
548
|
+
return se();
|
|
1507
549
|
}
|
|
1508
|
-
function
|
|
1509
|
-
|
|
550
|
+
function Ot(e, t = !0, n) {
|
|
551
|
+
$t() ? q(e, n) : t ? e() : Re(e);
|
|
1510
552
|
}
|
|
1511
|
-
const
|
|
1512
|
-
function
|
|
553
|
+
const he = kt ? window : void 0;
|
|
554
|
+
function L(e) {
|
|
1513
555
|
var t;
|
|
1514
|
-
const
|
|
1515
|
-
return (t =
|
|
1516
|
-
}
|
|
1517
|
-
function
|
|
1518
|
-
let t,
|
|
1519
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([
|
|
1520
|
-
return
|
|
1521
|
-
Array.isArray(
|
|
1522
|
-
const
|
|
1523
|
-
|
|
1524
|
-
},
|
|
1525
|
-
() => [
|
|
1526
|
-
([d,
|
|
1527
|
-
if (
|
|
556
|
+
const n = _(e);
|
|
557
|
+
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
558
|
+
}
|
|
559
|
+
function Me(...e) {
|
|
560
|
+
let t, n, o, r;
|
|
561
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, r] = e, t = he) : [t, n, o, r] = e, !t)
|
|
562
|
+
return St;
|
|
563
|
+
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
564
|
+
const i = [], l = () => {
|
|
565
|
+
i.forEach((d) => d()), i.length = 0;
|
|
566
|
+
}, c = (d, m, a, f) => (d.addEventListener(m, a, f), () => d.removeEventListener(m, a, f)), s = $(
|
|
567
|
+
() => [L(t), _(r)],
|
|
568
|
+
([d, m]) => {
|
|
569
|
+
if (l(), !d)
|
|
1528
570
|
return;
|
|
1529
|
-
const
|
|
1530
|
-
|
|
1531
|
-
...
|
|
571
|
+
const a = It(m) ? { ...m } : m;
|
|
572
|
+
i.push(
|
|
573
|
+
...n.flatMap((f) => o.map((v) => c(d, f, v, a)))
|
|
1532
574
|
);
|
|
1533
575
|
},
|
|
1534
576
|
{ immediate: !0, flush: "post" }
|
|
1535
|
-
),
|
|
1536
|
-
|
|
577
|
+
), u = () => {
|
|
578
|
+
s(), l();
|
|
1537
579
|
};
|
|
1538
|
-
return
|
|
580
|
+
return we(u), u;
|
|
1539
581
|
}
|
|
1540
|
-
function
|
|
1541
|
-
const e =
|
|
1542
|
-
return t &&
|
|
582
|
+
function Tt() {
|
|
583
|
+
const e = y(!1), t = se();
|
|
584
|
+
return t && q(() => {
|
|
1543
585
|
e.value = !0;
|
|
1544
586
|
}, t), e;
|
|
1545
587
|
}
|
|
1546
|
-
function
|
|
1547
|
-
const t =
|
|
1548
|
-
return
|
|
1549
|
-
}
|
|
1550
|
-
function
|
|
1551
|
-
const { window:
|
|
1552
|
-
let
|
|
1553
|
-
const
|
|
1554
|
-
|
|
1555
|
-
},
|
|
1556
|
-
const
|
|
1557
|
-
return new Set(
|
|
1558
|
-
}),
|
|
1559
|
-
() =>
|
|
1560
|
-
(
|
|
1561
|
-
|
|
588
|
+
function Ve(e) {
|
|
589
|
+
const t = Tt();
|
|
590
|
+
return S(() => (t.value, !!e()));
|
|
591
|
+
}
|
|
592
|
+
function Be(e, t, n = {}) {
|
|
593
|
+
const { window: o = he, ...r } = n;
|
|
594
|
+
let i;
|
|
595
|
+
const l = Ve(() => o && "MutationObserver" in o), c = () => {
|
|
596
|
+
i && (i.disconnect(), i = void 0);
|
|
597
|
+
}, s = S(() => {
|
|
598
|
+
const a = _(e), f = (Array.isArray(a) ? a : [a]).map(L).filter(Ct);
|
|
599
|
+
return new Set(f);
|
|
600
|
+
}), u = $(
|
|
601
|
+
() => s.value,
|
|
602
|
+
(a) => {
|
|
603
|
+
c(), l.value && a.size && (i = new MutationObserver(t), a.forEach((f) => i.observe(f, r)));
|
|
1562
604
|
},
|
|
1563
605
|
{ immediate: !0, flush: "post" }
|
|
1564
|
-
), d = () =>
|
|
1565
|
-
|
|
606
|
+
), d = () => i == null ? void 0 : i.takeRecords(), m = () => {
|
|
607
|
+
u(), c();
|
|
1566
608
|
};
|
|
1567
|
-
return
|
|
1568
|
-
isSupported:
|
|
1569
|
-
stop:
|
|
609
|
+
return we(m), {
|
|
610
|
+
isSupported: l,
|
|
611
|
+
stop: m,
|
|
1570
612
|
takeRecords: d
|
|
1571
613
|
};
|
|
1572
614
|
}
|
|
1573
|
-
function
|
|
1574
|
-
const { window:
|
|
1575
|
-
let
|
|
1576
|
-
const
|
|
1577
|
-
|
|
1578
|
-
},
|
|
1579
|
-
const
|
|
1580
|
-
return Array.isArray(
|
|
1581
|
-
}),
|
|
1582
|
-
|
|
1583
|
-
(
|
|
1584
|
-
if (
|
|
1585
|
-
|
|
1586
|
-
for (const
|
|
1587
|
-
|
|
615
|
+
function Mt(e, t, n = {}) {
|
|
616
|
+
const { window: o = he, ...r } = n;
|
|
617
|
+
let i;
|
|
618
|
+
const l = Ve(() => o && "ResizeObserver" in o), c = () => {
|
|
619
|
+
i && (i.disconnect(), i = void 0);
|
|
620
|
+
}, s = S(() => {
|
|
621
|
+
const m = _(e);
|
|
622
|
+
return Array.isArray(m) ? m.map((a) => L(a)) : [L(m)];
|
|
623
|
+
}), u = $(
|
|
624
|
+
s,
|
|
625
|
+
(m) => {
|
|
626
|
+
if (c(), l.value && o) {
|
|
627
|
+
i = new ResizeObserver(t);
|
|
628
|
+
for (const a of m)
|
|
629
|
+
a && i.observe(a, r);
|
|
1588
630
|
}
|
|
1589
631
|
},
|
|
1590
632
|
{ immediate: !0, flush: "post" }
|
|
1591
633
|
), d = () => {
|
|
1592
|
-
|
|
634
|
+
c(), u();
|
|
1593
635
|
};
|
|
1594
|
-
return
|
|
1595
|
-
isSupported:
|
|
636
|
+
return we(d), {
|
|
637
|
+
isSupported: l,
|
|
1596
638
|
stop: d
|
|
1597
639
|
};
|
|
1598
640
|
}
|
|
1599
|
-
function
|
|
641
|
+
function Rt(e, t = {}) {
|
|
1600
642
|
const {
|
|
1601
|
-
reset:
|
|
1602
|
-
windowResize:
|
|
643
|
+
reset: n = !0,
|
|
644
|
+
windowResize: o = !0,
|
|
1603
645
|
windowScroll: r = !0,
|
|
1604
|
-
immediate:
|
|
1605
|
-
updateTiming:
|
|
1606
|
-
} = t,
|
|
1607
|
-
function
|
|
1608
|
-
const
|
|
1609
|
-
if (!
|
|
1610
|
-
|
|
646
|
+
immediate: i = !0,
|
|
647
|
+
updateTiming: l = "sync"
|
|
648
|
+
} = t, c = y(0), s = y(0), u = y(0), d = y(0), m = y(0), a = y(0), f = y(0), v = y(0);
|
|
649
|
+
function E() {
|
|
650
|
+
const h = L(e);
|
|
651
|
+
if (!h) {
|
|
652
|
+
n && (c.value = 0, s.value = 0, u.value = 0, d.value = 0, m.value = 0, a.value = 0, f.value = 0, v.value = 0);
|
|
1611
653
|
return;
|
|
1612
654
|
}
|
|
1613
|
-
const
|
|
1614
|
-
|
|
655
|
+
const O = h.getBoundingClientRect();
|
|
656
|
+
c.value = O.height, s.value = O.bottom, u.value = O.left, d.value = O.right, m.value = O.top, a.value = O.width, f.value = O.x, v.value = O.y;
|
|
1615
657
|
}
|
|
1616
|
-
function
|
|
1617
|
-
|
|
658
|
+
function b() {
|
|
659
|
+
l === "sync" ? E() : l === "next-frame" && requestAnimationFrame(() => E());
|
|
1618
660
|
}
|
|
1619
|
-
return
|
|
661
|
+
return Mt(e, b), $(() => L(e), (h) => !h && b()), Be(e, b, {
|
|
1620
662
|
attributeFilter: ["style", "class"]
|
|
1621
|
-
}), r &&
|
|
1622
|
-
|
|
663
|
+
}), r && Me("scroll", b, { capture: !0, passive: !0 }), o && Me("resize", b, { passive: !0 }), Ot(() => {
|
|
664
|
+
i && b();
|
|
1623
665
|
}), {
|
|
1624
|
-
height:
|
|
1625
|
-
bottom:
|
|
1626
|
-
left:
|
|
666
|
+
height: c,
|
|
667
|
+
bottom: s,
|
|
668
|
+
left: u,
|
|
1627
669
|
right: d,
|
|
1628
|
-
top:
|
|
1629
|
-
width:
|
|
1630
|
-
x:
|
|
670
|
+
top: m,
|
|
671
|
+
width: a,
|
|
672
|
+
x: f,
|
|
1631
673
|
y: v,
|
|
1632
|
-
update:
|
|
674
|
+
update: b
|
|
1633
675
|
};
|
|
1634
676
|
}
|
|
1635
|
-
const
|
|
677
|
+
const Lt = (e) => {
|
|
1636
678
|
const t = new DOMParser().parseFromString(e, "text/html");
|
|
1637
|
-
return Array.from(t.body.childNodes).some((
|
|
1638
|
-
},
|
|
679
|
+
return Array.from(t.body.childNodes).some((n) => n.nodeType === 1);
|
|
680
|
+
}, Dt = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], Pt = ["innerHTML"], Wt = { key: 2 }, ze = /* @__PURE__ */ D({
|
|
1639
681
|
__name: "ACell",
|
|
1640
682
|
props: {
|
|
1641
683
|
colIndex: {},
|
|
@@ -1646,72 +688,72 @@ const bo = (e) => {
|
|
|
1646
688
|
pinned: { type: Boolean }
|
|
1647
689
|
},
|
|
1648
690
|
setup(e) {
|
|
1649
|
-
const t =
|
|
1650
|
-
var
|
|
691
|
+
const t = K("cell"), { bottom: n, left: o } = Rt(t), r = e.store.getCellData(e.colIndex, e.rowIndex), i = e.store.getCellDisplayValue(e.colIndex, e.rowIndex), l = y(""), c = y(!1), s = e.store.columns[e.colIndex], u = e.store.rows[e.rowIndex], d = s.align || "center", m = s.width || "40ch", a = S(() => typeof i == "string" ? Lt(i) : !1), f = S(() => {
|
|
692
|
+
var h;
|
|
1651
693
|
return {
|
|
1652
694
|
textAlign: d,
|
|
1653
|
-
width:
|
|
1654
|
-
backgroundColor:
|
|
1655
|
-
fontWeight:
|
|
1656
|
-
paddingLeft: e.store.getIndent(e.colIndex, (
|
|
695
|
+
width: m,
|
|
696
|
+
backgroundColor: c.value ? "var(--sc-cell-modified)" : "inherit",
|
|
697
|
+
fontWeight: c.value ? "bold" : "inherit",
|
|
698
|
+
paddingLeft: e.store.getIndent(e.colIndex, (h = e.store.display[e.rowIndex]) == null ? void 0 : h.indent)
|
|
1657
699
|
};
|
|
1658
700
|
}), v = () => {
|
|
1659
|
-
|
|
1660
|
-
|
|
701
|
+
s.mask, s.modalComponent && e.store.$patch((h) => {
|
|
702
|
+
h.modal.visible = !0, h.modal.colIndex = e.colIndex, h.modal.rowIndex = e.rowIndex, h.modal.parent = t.value, h.modal.top = n.value, h.modal.left = o.value, h.modal.width = m, typeof s.modalComponent == "function" ? h.modal.component = s.modalComponent({ table: h.table, row: u, column: s }) : h.modal.component = s.modalComponent, h.modal.componentProps = s.modalComponentExtraProps;
|
|
1661
703
|
});
|
|
1662
704
|
};
|
|
1663
705
|
if (e.addNavigation) {
|
|
1664
|
-
let
|
|
1665
|
-
...
|
|
706
|
+
let h = {
|
|
707
|
+
...ve,
|
|
1666
708
|
"keydown.f2": v,
|
|
1667
709
|
"keydown.alt.up": v,
|
|
1668
710
|
"keydown.alt.down": v,
|
|
1669
711
|
"keydown.alt.left": v,
|
|
1670
712
|
"keydown.alt.right": v
|
|
1671
713
|
};
|
|
1672
|
-
typeof e.addNavigation == "object" && (
|
|
1673
|
-
...
|
|
714
|
+
typeof e.addNavigation == "object" && (h = {
|
|
715
|
+
...h,
|
|
1674
716
|
...e.addNavigation
|
|
1675
|
-
}),
|
|
717
|
+
}), pe([
|
|
1676
718
|
{
|
|
1677
719
|
selectors: t,
|
|
1678
|
-
handlers:
|
|
720
|
+
handlers: h
|
|
1679
721
|
}
|
|
1680
722
|
]);
|
|
1681
723
|
}
|
|
1682
|
-
const
|
|
1683
|
-
t.value && (
|
|
1684
|
-
},
|
|
1685
|
-
t.value && (
|
|
724
|
+
const E = () => {
|
|
725
|
+
t.value && (l.value = t.value.textContent);
|
|
726
|
+
}, b = () => {
|
|
727
|
+
t.value && (s.format ? c.value = t.value.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, r) : c.value = t.value.textContent !== r, t.value.textContent !== l.value && (l.value = t.value.textContent, t.value.dispatchEvent(new Event("change")), s.format || e.store.setCellData(e.colIndex, e.rowIndex, l.value)));
|
|
1686
728
|
};
|
|
1687
|
-
return (
|
|
729
|
+
return (h, O) => ae((x(), k("td", {
|
|
1688
730
|
ref: "cell",
|
|
1689
|
-
"data-colindex":
|
|
1690
|
-
"data-rowindex":
|
|
1691
|
-
"data-editable":
|
|
1692
|
-
contenteditable:
|
|
1693
|
-
tabindex:
|
|
731
|
+
"data-colindex": h.colIndex,
|
|
732
|
+
"data-rowindex": h.rowIndex,
|
|
733
|
+
"data-editable": w(s).edit,
|
|
734
|
+
contenteditable: w(s).edit,
|
|
735
|
+
tabindex: h.tabIndex,
|
|
1694
736
|
spellcheck: !1,
|
|
1695
|
-
style:
|
|
1696
|
-
onFocus:
|
|
1697
|
-
onPaste:
|
|
1698
|
-
onBlur:
|
|
1699
|
-
onInput:
|
|
737
|
+
style: H(f.value),
|
|
738
|
+
onFocus: E,
|
|
739
|
+
onPaste: b,
|
|
740
|
+
onBlur: b,
|
|
741
|
+
onInput: b,
|
|
1700
742
|
onClick: v,
|
|
1701
|
-
class:
|
|
743
|
+
class: B(["atable-cell", h.pinned ? "sticky-column" : ""])
|
|
1702
744
|
}, [
|
|
1703
|
-
|
|
745
|
+
w(s).cellComponent ? (x(), J(Le(w(s).cellComponent), ie({
|
|
1704
746
|
key: 0,
|
|
1705
|
-
value:
|
|
1706
|
-
},
|
|
747
|
+
value: w(i)
|
|
748
|
+
}, w(s).cellComponentProps), null, 16, ["value"])) : a.value ? (x(), k("span", {
|
|
1707
749
|
key: 1,
|
|
1708
|
-
innerHTML:
|
|
1709
|
-
}, null, 8,
|
|
1710
|
-
], 46,
|
|
1711
|
-
[
|
|
750
|
+
innerHTML: w(i)
|
|
751
|
+
}, null, 8, Pt)) : (x(), k("span", Wt, z(w(i)), 1))
|
|
752
|
+
], 46, Dt)), [
|
|
753
|
+
[w(yt), h.store.closeModal]
|
|
1712
754
|
]);
|
|
1713
755
|
}
|
|
1714
|
-
}),
|
|
756
|
+
}), Ht = ["tabindex"], Nt = ["tabindex"], jt = ["colspan"], Vt = /* @__PURE__ */ D({
|
|
1715
757
|
__name: "AExpansionRow",
|
|
1716
758
|
props: {
|
|
1717
759
|
rowIndex: {},
|
|
@@ -1720,50 +762,50 @@ const bo = (e) => {
|
|
|
1720
762
|
addNavigation: { type: [Boolean, Object] }
|
|
1721
763
|
},
|
|
1722
764
|
setup(e) {
|
|
1723
|
-
const t =
|
|
765
|
+
const t = K("rowEl"), n = S(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
|
|
1724
766
|
if (e.addNavigation) {
|
|
1725
|
-
const
|
|
767
|
+
const o = {
|
|
1726
768
|
"keydown.control.g": (r) => {
|
|
1727
769
|
r.stopPropagation(), r.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
|
|
1728
770
|
}
|
|
1729
771
|
};
|
|
1730
|
-
typeof e.addNavigation == "object" && Object.assign(
|
|
772
|
+
typeof e.addNavigation == "object" && Object.assign(o, e.addNavigation), pe([
|
|
1731
773
|
{
|
|
1732
774
|
selectors: t,
|
|
1733
|
-
handlers:
|
|
775
|
+
handlers: o
|
|
1734
776
|
}
|
|
1735
777
|
]);
|
|
1736
778
|
}
|
|
1737
|
-
return (
|
|
1738
|
-
|
|
779
|
+
return (o, r) => (x(), k(Z, null, [
|
|
780
|
+
N("tr", ie(o.$attrs, {
|
|
1739
781
|
ref: "rowEl",
|
|
1740
|
-
tabindex:
|
|
782
|
+
tabindex: o.tabIndex,
|
|
1741
783
|
class: "expandable-row"
|
|
1742
784
|
}), [
|
|
1743
|
-
|
|
785
|
+
N("td", {
|
|
1744
786
|
tabIndex: -1,
|
|
1745
|
-
onClick: r[0] || (r[0] = (
|
|
787
|
+
onClick: r[0] || (r[0] = (i) => o.store.toggleRowExpand(o.rowIndex)),
|
|
1746
788
|
class: "row-index"
|
|
1747
|
-
},
|
|
1748
|
-
|
|
1749
|
-
], 16,
|
|
1750
|
-
|
|
789
|
+
}, z(n.value), 1),
|
|
790
|
+
T(o.$slots, "row")
|
|
791
|
+
], 16, Ht),
|
|
792
|
+
o.store.display[o.rowIndex].expanded ? (x(), k("tr", {
|
|
1751
793
|
key: 0,
|
|
1752
794
|
ref: "rowExpanded",
|
|
1753
|
-
tabindex:
|
|
795
|
+
tabindex: o.tabIndex,
|
|
1754
796
|
class: "expanded-row"
|
|
1755
797
|
}, [
|
|
1756
|
-
|
|
798
|
+
N("td", {
|
|
1757
799
|
tabIndex: -1,
|
|
1758
|
-
colspan:
|
|
800
|
+
colspan: o.store.columns.length + 1,
|
|
1759
801
|
class: "expanded-row-content"
|
|
1760
802
|
}, [
|
|
1761
|
-
|
|
1762
|
-
], 8,
|
|
1763
|
-
], 8,
|
|
803
|
+
T(o.$slots, "content")
|
|
804
|
+
], 8, jt)
|
|
805
|
+
], 8, Nt)) : F("", !0)
|
|
1764
806
|
], 64));
|
|
1765
807
|
}
|
|
1766
|
-
}),
|
|
808
|
+
}), Bt = ["tabindex"], Fe = /* @__PURE__ */ D({
|
|
1767
809
|
__name: "ARow",
|
|
1768
810
|
props: {
|
|
1769
811
|
rowIndex: {},
|
|
@@ -1772,79 +814,79 @@ const bo = (e) => {
|
|
|
1772
814
|
addNavigation: { type: [Boolean, Object], default: !1 }
|
|
1773
815
|
},
|
|
1774
816
|
setup(e) {
|
|
1775
|
-
const t =
|
|
817
|
+
const t = K("rowEl"), n = e.store.isRowVisible(e.rowIndex), o = e.store.getRowExpandSymbol(e.rowIndex);
|
|
1776
818
|
if (e.addNavigation) {
|
|
1777
|
-
let r =
|
|
819
|
+
let r = ve;
|
|
1778
820
|
typeof e.addNavigation == "object" && (r = {
|
|
1779
821
|
...r,
|
|
1780
822
|
...e.addNavigation
|
|
1781
|
-
}),
|
|
823
|
+
}), pe([
|
|
1782
824
|
{
|
|
1783
825
|
selectors: t,
|
|
1784
826
|
handlers: r
|
|
1785
827
|
}
|
|
1786
828
|
]);
|
|
1787
829
|
}
|
|
1788
|
-
return (r,
|
|
830
|
+
return (r, i) => ae((x(), k("tr", {
|
|
1789
831
|
ref: "rowEl",
|
|
1790
832
|
tabindex: r.tabIndex,
|
|
1791
833
|
class: "table-row"
|
|
1792
834
|
}, [
|
|
1793
|
-
r.store.config.view !== "uncounted" ?
|
|
1794
|
-
r.store.config.view === "list" ? (
|
|
835
|
+
r.store.config.view !== "uncounted" ? T(r.$slots, "index", { key: 0 }, () => [
|
|
836
|
+
r.store.config.view === "list" ? (x(), k("td", {
|
|
1795
837
|
key: 0,
|
|
1796
838
|
tabIndex: -1,
|
|
1797
|
-
class:
|
|
1798
|
-
},
|
|
839
|
+
class: B(["list-index", r.store.hasPinnedColumns ? "sticky-index" : ""])
|
|
840
|
+
}, z(r.rowIndex + 1), 3)) : r.store.config.view === "tree" ? (x(), k("td", {
|
|
1799
841
|
key: 1,
|
|
1800
842
|
tabIndex: -1,
|
|
1801
|
-
class:
|
|
1802
|
-
onClick:
|
|
1803
|
-
},
|
|
1804
|
-
]) :
|
|
1805
|
-
|
|
1806
|
-
], 8,
|
|
1807
|
-
[
|
|
843
|
+
class: B(["tree-index", r.store.hasPinnedColumns ? "sticky-index" : ""]),
|
|
844
|
+
onClick: i[0] || (i[0] = (l) => r.store.toggleRowExpand(r.rowIndex))
|
|
845
|
+
}, z(w(o)), 3)) : F("", !0)
|
|
846
|
+
]) : F("", !0),
|
|
847
|
+
T(r.$slots, "default")
|
|
848
|
+
], 8, Bt)), [
|
|
849
|
+
[De, w(n)]
|
|
1808
850
|
]);
|
|
1809
851
|
}
|
|
1810
|
-
}),
|
|
852
|
+
}), zt = {
|
|
1811
853
|
key: 0,
|
|
1812
854
|
id: "resizable"
|
|
1813
|
-
},
|
|
855
|
+
}, Ft = {
|
|
1814
856
|
class: "atable-header-row",
|
|
1815
857
|
tabindex: "-1"
|
|
1816
|
-
},
|
|
858
|
+
}, Ue = /* @__PURE__ */ D({
|
|
1817
859
|
__name: "ATableHeader",
|
|
1818
860
|
props: {
|
|
1819
861
|
columns: {},
|
|
1820
862
|
store: {}
|
|
1821
863
|
},
|
|
1822
864
|
setup(e) {
|
|
1823
|
-
return (t,
|
|
1824
|
-
|
|
1825
|
-
t.store.zeroColumn ? (
|
|
865
|
+
return (t, n) => t.columns.length ? (x(), k("thead", zt, [
|
|
866
|
+
N("tr", Ft, [
|
|
867
|
+
t.store.zeroColumn ? (x(), k("th", {
|
|
1826
868
|
key: 0,
|
|
1827
869
|
id: "header-index",
|
|
1828
|
-
class:
|
|
870
|
+
class: B([[
|
|
1829
871
|
t.store.hasPinnedColumns ? "sticky-index" : "",
|
|
1830
872
|
t.store.config.view === "tree" ? "tree-index" : "",
|
|
1831
873
|
t.store.config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
1832
874
|
], "list-index"])
|
|
1833
|
-
}, null, 2)) :
|
|
1834
|
-
(
|
|
1835
|
-
key:
|
|
875
|
+
}, null, 2)) : F("", !0),
|
|
876
|
+
(x(!0), k(Z, null, ne(t.columns, (o, r) => (x(), k("th", {
|
|
877
|
+
key: o.name,
|
|
1836
878
|
tabindex: "-1",
|
|
1837
|
-
style:
|
|
1838
|
-
class:
|
|
879
|
+
style: H(t.store.getHeaderCellStyle(o)),
|
|
880
|
+
class: B(o.pinned ? "sticky-column" : "")
|
|
1839
881
|
}, [
|
|
1840
|
-
|
|
1841
|
-
|
|
882
|
+
T(t.$slots, "default", {}, () => [
|
|
883
|
+
Ze(z(o.label || String.fromCharCode(r + 97).toUpperCase()), 1)
|
|
1842
884
|
])
|
|
1843
885
|
], 6))), 128))
|
|
1844
886
|
])
|
|
1845
|
-
])) :
|
|
887
|
+
])) : F("", !0);
|
|
1846
888
|
}
|
|
1847
|
-
}),
|
|
889
|
+
}), Ge = /* @__PURE__ */ D({
|
|
1848
890
|
__name: "ATableModal",
|
|
1849
891
|
props: {
|
|
1850
892
|
colIndex: {},
|
|
@@ -1852,95 +894,95 @@ const bo = (e) => {
|
|
|
1852
894
|
store: {}
|
|
1853
895
|
},
|
|
1854
896
|
setup(e) {
|
|
1855
|
-
const t = (
|
|
1856
|
-
|
|
897
|
+
const t = (n) => {
|
|
898
|
+
n.stopPropagation();
|
|
1857
899
|
};
|
|
1858
|
-
return (
|
|
900
|
+
return (n, o) => (x(), k("div", {
|
|
1859
901
|
class: "amodal",
|
|
1860
902
|
tabindex: "-1",
|
|
1861
903
|
onClick: t,
|
|
1862
904
|
onInput: t
|
|
1863
905
|
}, [
|
|
1864
|
-
|
|
906
|
+
T(n.$slots, "default")
|
|
1865
907
|
], 32));
|
|
1866
908
|
}
|
|
1867
|
-
}),
|
|
909
|
+
}), Ut = (e) => {
|
|
1868
910
|
const t = e.id || crypto.randomUUID();
|
|
1869
|
-
return (
|
|
1870
|
-
const
|
|
1871
|
-
const
|
|
1872
|
-
for (const [
|
|
1873
|
-
for (const [
|
|
1874
|
-
|
|
1875
|
-
return
|
|
1876
|
-
}, r = (
|
|
1877
|
-
const
|
|
1878
|
-
if (
|
|
1879
|
-
return
|
|
1880
|
-
const
|
|
1881
|
-
for (let
|
|
1882
|
-
const
|
|
1883
|
-
|
|
911
|
+
return Ke(`table-${t}`, () => {
|
|
912
|
+
const o = () => {
|
|
913
|
+
const p = {};
|
|
914
|
+
for (const [g, C] of i.value.entries())
|
|
915
|
+
for (const [I, A] of l.value.entries())
|
|
916
|
+
p[`${g}:${I}`] = A[C.name];
|
|
917
|
+
return p;
|
|
918
|
+
}, r = (p) => {
|
|
919
|
+
const g = [Object.assign({}, { rowModified: !1 })];
|
|
920
|
+
if (p && "0:0" in p)
|
|
921
|
+
return p;
|
|
922
|
+
const C = /* @__PURE__ */ new Set();
|
|
923
|
+
for (let I = l.value.length - 1; I >= 0; I--) {
|
|
924
|
+
const A = l.value[I];
|
|
925
|
+
A.parent && C.add(A.parent), g[I] = {
|
|
1884
926
|
childrenOpen: !1,
|
|
1885
927
|
expanded: !1,
|
|
1886
|
-
indent:
|
|
1887
|
-
isParent:
|
|
1888
|
-
isRoot:
|
|
928
|
+
indent: A.indent || null,
|
|
929
|
+
isParent: C.has(I),
|
|
930
|
+
isRoot: A.parent === null || A.parent === void 0,
|
|
1889
931
|
rowModified: !1,
|
|
1890
|
-
open:
|
|
1891
|
-
parent:
|
|
932
|
+
open: A.parent === null || A.parent === void 0,
|
|
933
|
+
parent: A.parent
|
|
1892
934
|
};
|
|
1893
935
|
}
|
|
1894
|
-
return
|
|
1895
|
-
},
|
|
1896
|
-
const
|
|
1897
|
-
|
|
1898
|
-
},
|
|
1899
|
-
minWidth:
|
|
1900
|
-
textAlign:
|
|
1901
|
-
width:
|
|
1902
|
-
}),
|
|
1903
|
-
if (
|
|
1904
|
-
|
|
1905
|
-
for (let
|
|
1906
|
-
|
|
1907
|
-
} else
|
|
1908
|
-
},
|
|
1909
|
-
const
|
|
1910
|
-
return
|
|
1911
|
-
},
|
|
1912
|
-
const
|
|
1913
|
-
return
|
|
936
|
+
return g;
|
|
937
|
+
}, i = y(e.columns), l = y(e.rows), c = y(e.config || {}), s = y(e.table || o()), u = y(r(e.display)), d = y(e.modal || { visible: !1 }), m = S(() => i.value.some((p) => p.pinned)), a = S(() => `${Math.ceil(l.value.length / 100 + 1)}ch`), f = S(() => ["list", "tree", "list-expansion"].includes(c.value.view)), v = (p, g) => s.value[`${p}:${g}`], E = (p, g, C) => {
|
|
938
|
+
const I = `${p}:${g}`, A = i.value[p];
|
|
939
|
+
s.value[I] !== C && (u.value[g].rowModified = !0), s.value[I] = C, l.value[g][A.name] = C;
|
|
940
|
+
}, b = (p) => ({
|
|
941
|
+
minWidth: p.width || "40ch",
|
|
942
|
+
textAlign: p.align || "center",
|
|
943
|
+
width: c.value.fullWidth ? "auto" : null
|
|
944
|
+
}), h = (p) => c.value.view !== "tree" || u.value[p].isRoot || u.value[p].open, O = (p) => c.value.view !== "tree" ? "" : u.value[p].isRoot || u.value[p].isParent ? u.value[p].childrenOpen ? "-" : "+" : "", ge = (p) => {
|
|
945
|
+
if (c.value.view === "tree") {
|
|
946
|
+
u.value[p].childrenOpen = !u.value[p].childrenOpen;
|
|
947
|
+
for (let g = l.value.length - 1; g >= 0; g--)
|
|
948
|
+
u.value[g].parent === p && (u.value[g].open = !u.value[g].open, u.value[g].childrenOpen && ge(g));
|
|
949
|
+
} else c.value.view === "list-expansion" && (u.value[p].expanded = !u.value[p].expanded);
|
|
950
|
+
}, qe = (p, g) => {
|
|
951
|
+
const C = v(p, g);
|
|
952
|
+
return ye(p, g, C);
|
|
953
|
+
}, ye = (p, g, C) => {
|
|
954
|
+
const I = i.value[p], A = l.value[g], P = I.format;
|
|
955
|
+
return P ? typeof P == "function" ? P(C, { table: s.value, row: A, column: I }) : typeof P == "string" ? Function(`"use strict";return (${P})`)()(C, { table: s.value, row: A, column: I }) : C : C;
|
|
1914
956
|
};
|
|
1915
957
|
return {
|
|
1916
958
|
// state
|
|
1917
|
-
columns:
|
|
1918
|
-
rows:
|
|
1919
|
-
config:
|
|
1920
|
-
table:
|
|
1921
|
-
display:
|
|
959
|
+
columns: i,
|
|
960
|
+
rows: l,
|
|
961
|
+
config: c,
|
|
962
|
+
table: s,
|
|
963
|
+
display: u,
|
|
1922
964
|
modal: d,
|
|
1923
965
|
// getters
|
|
1924
|
-
hasPinnedColumns:
|
|
1925
|
-
numberedRowWidth:
|
|
1926
|
-
zeroColumn:
|
|
966
|
+
hasPinnedColumns: m,
|
|
967
|
+
numberedRowWidth: a,
|
|
968
|
+
zeroColumn: f,
|
|
1927
969
|
// actions
|
|
1928
|
-
closeModal: (
|
|
1929
|
-
var
|
|
1930
|
-
|
|
970
|
+
closeModal: (p) => {
|
|
971
|
+
var g;
|
|
972
|
+
p.target instanceof Node && (g = d.value.parent) != null && g.contains(p.target) || d.value.visible && (d.value.visible = !1);
|
|
1931
973
|
},
|
|
1932
974
|
getCellData: v,
|
|
1933
|
-
getCellDisplayValue:
|
|
1934
|
-
getFormattedValue:
|
|
1935
|
-
getHeaderCellStyle:
|
|
1936
|
-
getIndent: (
|
|
1937
|
-
getRowExpandSymbol:
|
|
1938
|
-
isRowVisible:
|
|
1939
|
-
setCellData:
|
|
1940
|
-
toggleRowExpand:
|
|
975
|
+
getCellDisplayValue: qe,
|
|
976
|
+
getFormattedValue: ye,
|
|
977
|
+
getHeaderCellStyle: b,
|
|
978
|
+
getIndent: (p, g) => g && p === 0 && g > 0 ? `${g}ch` : "inherit",
|
|
979
|
+
getRowExpandSymbol: O,
|
|
980
|
+
isRowVisible: h,
|
|
981
|
+
setCellData: E,
|
|
982
|
+
toggleRowExpand: ge
|
|
1941
983
|
};
|
|
1942
|
-
})
|
|
1943
|
-
},
|
|
984
|
+
})();
|
|
985
|
+
}, Gt = /* @__PURE__ */ D({
|
|
1944
986
|
__name: "ATable",
|
|
1945
987
|
props: {
|
|
1946
988
|
id: {},
|
|
@@ -1950,77 +992,77 @@ const bo = (e) => {
|
|
|
1950
992
|
config: { default: () => new Object() }
|
|
1951
993
|
},
|
|
1952
994
|
emits: ["update:modelValue", "cellUpdate"],
|
|
1953
|
-
setup(e, { expose: t, emit:
|
|
1954
|
-
const
|
|
1955
|
-
|
|
1956
|
-
if (
|
|
1957
|
-
const [
|
|
1958
|
-
|
|
995
|
+
setup(e, { expose: t, emit: n }) {
|
|
996
|
+
const o = n, r = K("table"), i = e.modelValue ? e.modelValue : e.rows, l = Ut({ columns: e.columns, rows: i, id: e.id, config: e.config });
|
|
997
|
+
l.$onAction(({ name: s, store: u, args: d }) => {
|
|
998
|
+
if (s === "setCellData") {
|
|
999
|
+
const [m, a, f] = d, v = u.getCellData(m, a);
|
|
1000
|
+
o("cellUpdate", [m, a, f, v]);
|
|
1959
1001
|
}
|
|
1960
|
-
}),
|
|
1961
|
-
() =>
|
|
1962
|
-
(
|
|
1963
|
-
|
|
1002
|
+
}), $(
|
|
1003
|
+
() => l.rows,
|
|
1004
|
+
(s) => {
|
|
1005
|
+
o("update:modelValue", s);
|
|
1964
1006
|
},
|
|
1965
1007
|
{ deep: !0 }
|
|
1966
|
-
),
|
|
1967
|
-
e.columns.some((
|
|
1008
|
+
), q(() => {
|
|
1009
|
+
e.columns.some((s) => s.pinned) && (c(), l.config.view === "tree" && Be(r, c, { childList: !0, subtree: !0 }));
|
|
1968
1010
|
});
|
|
1969
|
-
const
|
|
1970
|
-
const
|
|
1971
|
-
for (const [
|
|
1972
|
-
const v = d.cells[
|
|
1973
|
-
v && (
|
|
1011
|
+
const c = () => {
|
|
1012
|
+
const s = r.value, u = s.rows[0], d = s.rows[1], m = u ? Array.from(u.cells) : [];
|
|
1013
|
+
for (const [a, f] of m.entries()) {
|
|
1014
|
+
const v = d.cells[a];
|
|
1015
|
+
v && (f.style.width = `${v.offsetWidth}px`);
|
|
1974
1016
|
}
|
|
1975
|
-
for (const
|
|
1976
|
-
let
|
|
1017
|
+
for (const a of s.rows) {
|
|
1018
|
+
let f = 0;
|
|
1977
1019
|
const v = [];
|
|
1978
|
-
for (const
|
|
1979
|
-
(
|
|
1020
|
+
for (const E of a.cells)
|
|
1021
|
+
(E.classList.contains("sticky-column") || E.classList.contains("sticky-index")) && (E.style.left = `${f}px`, f += E.offsetWidth, v.push(E));
|
|
1980
1022
|
v.length > 0 && v[v.length - 1].classList.add("sticky-column-edge");
|
|
1981
1023
|
}
|
|
1982
1024
|
};
|
|
1983
|
-
return window.addEventListener("keydown", (
|
|
1984
|
-
if (
|
|
1985
|
-
|
|
1986
|
-
const
|
|
1987
|
-
|
|
1988
|
-
|
|
1025
|
+
return window.addEventListener("keydown", (s) => {
|
|
1026
|
+
if (s.key === "Escape" && l.modal.visible) {
|
|
1027
|
+
l.modal.visible = !1;
|
|
1028
|
+
const u = l.modal.parent;
|
|
1029
|
+
u && Re().then(() => {
|
|
1030
|
+
u.focus();
|
|
1989
1031
|
});
|
|
1990
1032
|
}
|
|
1991
|
-
}), t({ store:
|
|
1033
|
+
}), t({ store: l }), (s, u) => (x(), k("table", {
|
|
1992
1034
|
ref: "table",
|
|
1993
1035
|
class: "atable",
|
|
1994
|
-
style:
|
|
1036
|
+
style: H({ width: w(l).config.fullWidth ? "100%" : "auto" })
|
|
1995
1037
|
}, [
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
columns:
|
|
1999
|
-
store:
|
|
1038
|
+
T(s.$slots, "header", { data: w(l) }, () => [
|
|
1039
|
+
be(Ue, {
|
|
1040
|
+
columns: w(l).columns,
|
|
1041
|
+
store: w(l)
|
|
2000
1042
|
}, null, 8, ["columns", "store"])
|
|
2001
1043
|
], !0),
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
(
|
|
1044
|
+
N("tbody", null, [
|
|
1045
|
+
T(s.$slots, "body", { data: w(l) }, () => [
|
|
1046
|
+
(x(!0), k(Z, null, ne(w(l).rows, (d, m) => (x(), J(Fe, {
|
|
2005
1047
|
key: d.id,
|
|
2006
1048
|
row: d,
|
|
2007
|
-
rowIndex:
|
|
2008
|
-
store:
|
|
1049
|
+
rowIndex: m,
|
|
1050
|
+
store: w(l)
|
|
2009
1051
|
}, {
|
|
2010
|
-
default:
|
|
2011
|
-
(
|
|
2012
|
-
key:
|
|
2013
|
-
store:
|
|
2014
|
-
col:
|
|
1052
|
+
default: xe(() => [
|
|
1053
|
+
(x(!0), k(Z, null, ne(w(l).columns, (a, f) => (x(), J(ze, {
|
|
1054
|
+
key: a.name,
|
|
1055
|
+
store: w(l),
|
|
1056
|
+
col: a,
|
|
2015
1057
|
spellcheck: "false",
|
|
2016
|
-
pinned:
|
|
2017
|
-
rowIndex:
|
|
2018
|
-
colIndex:
|
|
2019
|
-
component:
|
|
2020
|
-
style:
|
|
2021
|
-
textAlign: (
|
|
2022
|
-
minWidth: (
|
|
2023
|
-
width:
|
|
1058
|
+
pinned: a.pinned,
|
|
1059
|
+
rowIndex: m,
|
|
1060
|
+
colIndex: f,
|
|
1061
|
+
component: a.cellComponent,
|
|
1062
|
+
style: H({
|
|
1063
|
+
textAlign: (a == null ? void 0 : a.align) || "center",
|
|
1064
|
+
minWidth: (a == null ? void 0 : a.width) || "40ch",
|
|
1065
|
+
width: w(l).config.fullWidth ? "auto" : null
|
|
2024
1066
|
})
|
|
2025
1067
|
}, null, 8, ["store", "col", "pinned", "rowIndex", "colIndex", "component", "style"]))), 128))
|
|
2026
1068
|
]),
|
|
@@ -2028,51 +1070,50 @@ const bo = (e) => {
|
|
|
2028
1070
|
}, 1032, ["row", "rowIndex", "store"]))), 128))
|
|
2029
1071
|
], !0)
|
|
2030
1072
|
]),
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
colIndex:
|
|
2035
|
-
rowIndex:
|
|
2036
|
-
store:
|
|
2037
|
-
style:
|
|
2038
|
-
left:
|
|
2039
|
-
top:
|
|
2040
|
-
maxWidth:
|
|
1073
|
+
T(s.$slots, "footer", { data: w(l) }, void 0, !0),
|
|
1074
|
+
T(s.$slots, "modal", { data: w(l) }, () => [
|
|
1075
|
+
ae(be(Ge, {
|
|
1076
|
+
colIndex: w(l).modal.colIndex,
|
|
1077
|
+
rowIndex: w(l).modal.rowIndex,
|
|
1078
|
+
store: w(l),
|
|
1079
|
+
style: H({
|
|
1080
|
+
left: w(l).modal.left + "px",
|
|
1081
|
+
top: w(l).modal.top + "px",
|
|
1082
|
+
maxWidth: w(l).modal.width + "px"
|
|
2041
1083
|
})
|
|
2042
1084
|
}, {
|
|
2043
|
-
default:
|
|
2044
|
-
(
|
|
2045
|
-
key: `${
|
|
2046
|
-
colIndex:
|
|
2047
|
-
rowIndex:
|
|
2048
|
-
store:
|
|
2049
|
-
},
|
|
1085
|
+
default: xe(() => [
|
|
1086
|
+
(x(), J(Le(w(l).modal.component), ie({
|
|
1087
|
+
key: `${w(l).modal.rowIndex}:${w(l).modal.colIndex}`,
|
|
1088
|
+
colIndex: w(l).modal.colIndex,
|
|
1089
|
+
rowIndex: w(l).modal.rowIndex,
|
|
1090
|
+
store: w(l)
|
|
1091
|
+
}, w(l).modal.componentProps), null, 16, ["colIndex", "rowIndex", "store"]))
|
|
2050
1092
|
]),
|
|
2051
1093
|
_: 1
|
|
2052
1094
|
}, 8, ["colIndex", "rowIndex", "store", "style"]), [
|
|
2053
|
-
[
|
|
1095
|
+
[De, w(l).modal.visible]
|
|
2054
1096
|
])
|
|
2055
1097
|
], !0)
|
|
2056
1098
|
], 4));
|
|
2057
1099
|
}
|
|
2058
|
-
}),
|
|
2059
|
-
const
|
|
2060
|
-
for (const [
|
|
2061
|
-
o
|
|
2062
|
-
return
|
|
2063
|
-
},
|
|
2064
|
-
function
|
|
2065
|
-
|
|
2066
|
-
e.use(t), e.component("ACell", Qt), e.component("AExpansionRow", ko), e.component("ARow", Xt), e.component("ATable", Do), e.component("ATableHeader", Zt), e.component("ATableModal", Kt);
|
|
1100
|
+
}), qt = (e, t) => {
|
|
1101
|
+
const n = e.__vccOpts || e;
|
|
1102
|
+
for (const [o, r] of t)
|
|
1103
|
+
n[o] = r;
|
|
1104
|
+
return n;
|
|
1105
|
+
}, Yt = /* @__PURE__ */ qt(Gt, [["__scopeId", "data-v-20244978"]]);
|
|
1106
|
+
function _t(e) {
|
|
1107
|
+
e.component("ACell", ze), e.component("AExpansionRow", Vt), e.component("ARow", Fe), e.component("ATable", Yt), e.component("ATableHeader", Ue), e.component("ATableModal", Ge);
|
|
2067
1108
|
}
|
|
2068
1109
|
export {
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
1110
|
+
ze as ACell,
|
|
1111
|
+
Vt as AExpansionRow,
|
|
1112
|
+
Fe as ARow,
|
|
1113
|
+
Yt as ATable,
|
|
1114
|
+
Ue as ATableHeader,
|
|
1115
|
+
Ge as ATableModal,
|
|
1116
|
+
Ut as createTableStore,
|
|
1117
|
+
_t as install
|
|
2077
1118
|
};
|
|
2078
1119
|
//# sourceMappingURL=atable.js.map
|