@stonecrop/atable 0.2.54 → 0.2.56

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.js CHANGED
@@ -1,98 +1,98 @@
1
- import './assets/index.css';var Ge = Object.defineProperty;
2
- var Ue = (e, t, n) => t in e ? Ge(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var T = (e, t, n) => Ue(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { onMounted as F, ref as y, watch as C, onBeforeUnmount as qe, computed as x, unref as m, getCurrentScope as le, onScopeDispose as se, getCurrentInstance as ie, nextTick as $e, defineComponent as M, inject as Q, useTemplateRef as Z, openBlock as h, createElementBlock as E, normalizeStyle as P, normalizeClass as N, createBlock as q, resolveDynamicComponent as Te, mergeProps as re, toDisplayString as B, Fragment as X, createElementVNode as W, renderSlot as S, createCommentVNode as J, withDirectives as te, vShow as De, toRef as Ye, readonly as Xe, customRef as Je, reactive as R, renderList as ne, createTextVNode as Qe, provide as Ze, createVNode as he, withCtx as ye } from "vue";
5
- function Me(e) {
6
- return le() ? (se(e), !0) : !1;
1
+ import './assets/index.css';var Ue = Object.defineProperty;
2
+ var qe = (e, t, n) => t in e ? Ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var T = (e, t, n) => qe(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { onMounted as F, ref as b, watch as C, onBeforeUnmount as Ye, computed as x, unref as m, getCurrentScope as se, onScopeDispose as ie, getCurrentInstance as re, nextTick as Te, defineComponent as M, inject as Q, useTemplateRef as Z, openBlock as h, createElementBlock as k, normalizeStyle as P, normalizeClass as N, createBlock as q, resolveDynamicComponent as De, mergeProps as ae, toDisplayString as B, Fragment as X, createElementVNode as W, renderSlot as S, createCommentVNode as J, withDirectives as ne, vShow as Me, toRef as Xe, readonly as Je, customRef as Qe, reactive as R, renderList as oe, createTextVNode as Ze, provide as Ke, createVNode as ye, withCtx as be } from "vue";
5
+ function Re(e) {
6
+ return se() ? (ie(e), !0) : !1;
7
7
  }
8
- function ae(e) {
8
+ function ce(e) {
9
9
  return typeof e == "function" ? e() : m(e);
10
10
  }
11
- const Ke = typeof window < "u" && typeof document < "u";
11
+ const _e = typeof window < "u" && typeof document < "u";
12
12
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
13
- const _e = (e) => e != null, et = Object.prototype.toString, tt = (e) => et.call(e) === "[object Object]", nt = () => {
14
- }, G = Ke ? window : void 0;
13
+ const et = (e) => e != null, tt = Object.prototype.toString, nt = (e) => tt.call(e) === "[object Object]", ot = () => {
14
+ }, G = _e ? window : void 0;
15
15
  function V(e) {
16
16
  var t;
17
- const n = ae(e);
17
+ const n = ce(e);
18
18
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
19
19
  }
20
20
  function z(...e) {
21
21
  let t, n, l, s;
22
22
  if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, l, s] = e, t = G) : [t, n, l, s] = e, !t)
23
- return nt;
23
+ return ot;
24
24
  Array.isArray(n) || (n = [n]), Array.isArray(l) || (l = [l]);
25
- const o = [], r = () => {
25
+ const o = [], a = () => {
26
26
  o.forEach((u) => u()), o.length = 0;
27
27
  }, i = (u, p, c, f) => (u.addEventListener(p, c, f), () => u.removeEventListener(p, c, f)), d = C(
28
- () => [V(t), ae(s)],
28
+ () => [V(t), ce(s)],
29
29
  ([u, p]) => {
30
- if (r(), !u)
30
+ if (a(), !u)
31
31
  return;
32
- const c = tt(p) ? { ...p } : p;
32
+ const c = nt(p) ? { ...p } : p;
33
33
  o.push(
34
34
  ...n.flatMap((f) => l.map((v) => i(u, f, v, c)))
35
35
  );
36
36
  },
37
37
  { immediate: !0, flush: "post" }
38
- ), a = () => {
39
- d(), r();
38
+ ), r = () => {
39
+ d(), a();
40
40
  };
41
- return Me(a), a;
41
+ return Re(r), r;
42
42
  }
43
- function ot() {
44
- const e = y(!1), t = ie();
43
+ function lt() {
44
+ const e = b(!1), t = re();
45
45
  return t && F(() => {
46
46
  e.value = !0;
47
47
  }, t), e;
48
48
  }
49
- function lt(e) {
50
- const t = ot();
49
+ function st(e) {
50
+ const t = lt();
51
51
  return x(() => (t.value, !!e()));
52
52
  }
53
- function st(e, t, n = {}) {
53
+ function it(e, t, n = {}) {
54
54
  const { window: l = G, ...s } = n;
55
55
  let o;
56
- const r = lt(() => l && "MutationObserver" in l), i = () => {
56
+ const a = st(() => l && "MutationObserver" in l), i = () => {
57
57
  o && (o.disconnect(), o = void 0);
58
58
  }, d = x(() => {
59
- const c = ae(e), f = (Array.isArray(c) ? c : [c]).map(V).filter(_e);
59
+ const c = ce(e), f = (Array.isArray(c) ? c : [c]).map(V).filter(et);
60
60
  return new Set(f);
61
- }), a = C(
61
+ }), r = C(
62
62
  () => d.value,
63
63
  (c) => {
64
- i(), r.value && c.size && (o = new MutationObserver(t), c.forEach((f) => o.observe(f, s)));
64
+ i(), a.value && c.size && (o = new MutationObserver(t), c.forEach((f) => o.observe(f, s)));
65
65
  },
66
66
  { immediate: !0, flush: "post" }
67
67
  ), u = () => o == null ? void 0 : o.takeRecords(), p = () => {
68
- a(), i();
68
+ r(), i();
69
69
  };
70
- return Me(p), {
71
- isSupported: r,
70
+ return Re(p), {
71
+ isSupported: a,
72
72
  stop: p,
73
73
  takeRecords: u
74
74
  };
75
75
  }
76
- function it(e = {}) {
76
+ function rt(e = {}) {
77
77
  var t;
78
78
  const {
79
79
  window: n = G,
80
80
  deep: l = !0,
81
81
  triggerOnRemoval: s = !1
82
- } = e, o = (t = e.document) != null ? t : n == null ? void 0 : n.document, r = () => {
83
- var a;
82
+ } = e, o = (t = e.document) != null ? t : n == null ? void 0 : n.document, a = () => {
83
+ var r;
84
84
  let u = o == null ? void 0 : o.activeElement;
85
85
  if (l)
86
86
  for (; u != null && u.shadowRoot; )
87
- u = (a = u == null ? void 0 : u.shadowRoot) == null ? void 0 : a.activeElement;
87
+ u = (r = u == null ? void 0 : u.shadowRoot) == null ? void 0 : r.activeElement;
88
88
  return u;
89
- }, i = y(), d = () => {
90
- i.value = r();
89
+ }, i = b(), d = () => {
90
+ i.value = a();
91
91
  };
92
- return n && (z(n, "blur", (a) => {
93
- a.relatedTarget === null && d();
94
- }, !0), z(n, "focus", d, !0)), s && st(o, (a) => {
95
- a.filter((u) => u.removedNodes.length).map((u) => Array.from(u.removedNodes)).flat().forEach((u) => {
92
+ return n && (z(n, "blur", (r) => {
93
+ r.relatedTarget === null && d();
94
+ }, !0), z(n, "focus", d, !0)), s && it(o, (r) => {
95
+ r.filter((u) => u.removedNodes.length).map((u) => Array.from(u.removedNodes)).flat().forEach((u) => {
96
96
  u === i.value && d();
97
97
  });
98
98
  }, {
@@ -100,19 +100,19 @@ function it(e = {}) {
100
100
  subtree: !0
101
101
  }), d(), i;
102
102
  }
103
- const rt = "focusin", at = "focusout";
104
- function ct(e, t = {}) {
105
- const { window: n = G } = t, l = x(() => V(e)), s = y(!1), o = x(() => s.value), r = it(t);
106
- return !n || !r.value ? { focused: o } : (z(l, rt, () => s.value = !0), z(l, at, () => s.value = !1), { focused: o });
103
+ const at = "focusin", ct = "focusout";
104
+ function dt(e, t = {}) {
105
+ const { window: n = G } = t, l = x(() => V(e)), s = b(!1), o = x(() => s.value), a = rt(t);
106
+ return !n || !a.value ? { focused: o } : (z(l, at, () => s.value = !0), z(l, ct, () => s.value = !1), { focused: o });
107
107
  }
108
- function dt(e, { window: t = G, scrollTarget: n } = {}) {
109
- const l = y(!1), s = () => {
108
+ function ut(e, { window: t = G, scrollTarget: n } = {}) {
109
+ const l = b(!1), s = () => {
110
110
  if (!t) return;
111
- const o = t.document, r = V(e);
112
- if (!r)
111
+ const o = t.document, a = V(e);
112
+ if (!a)
113
113
  l.value = !1;
114
114
  else {
115
- const i = r.getBoundingClientRect();
115
+ const i = a.getBoundingClientRect();
116
116
  l.value = i.top <= (t.innerHeight || o.documentElement.clientHeight) && i.left <= (t.innerWidth || o.documentElement.clientWidth) && i.bottom >= 0 && i.right >= 0;
117
117
  }
118
118
  };
@@ -126,12 +126,12 @@ function dt(e, { window: t = G, scrollTarget: n } = {}) {
126
126
  }), l;
127
127
  }
128
128
  const O = (e) => {
129
- let t = dt(e).value;
129
+ let t = ut(e).value;
130
130
  return t = t && e.offsetHeight > 0, t;
131
- }, $ = (e) => e.tabIndex >= 0, be = (e) => {
131
+ }, $ = (e) => e.tabIndex >= 0, ge = (e) => {
132
132
  const t = e.target;
133
- return ce(t);
134
- }, ce = (e) => {
133
+ return de(t);
134
+ }, de = (e) => {
135
135
  var t;
136
136
  let n;
137
137
  if (e instanceof HTMLTableCellElement) {
@@ -144,8 +144,8 @@ const O = (e) => {
144
144
  const l = e.previousElementSibling;
145
145
  l && (n = l);
146
146
  }
147
- return n && (!$(n) || !O(n)) ? ce(n) : n;
148
- }, ut = (e) => {
147
+ return n && (!$(n) || !O(n)) ? de(n) : n;
148
+ }, ft = (e) => {
149
149
  var t;
150
150
  const n = e.target;
151
151
  let l;
@@ -162,11 +162,11 @@ const O = (e) => {
162
162
  o && (l = o);
163
163
  }
164
164
  }
165
- return l && (!$(l) || !O(l)) ? de(l) : l;
166
- }, ge = (e) => {
165
+ return l && (!$(l) || !O(l)) ? ue(l) : l;
166
+ }, xe = (e) => {
167
167
  const t = e.target;
168
- return de(t);
169
- }, de = (e) => {
168
+ return ue(t);
169
+ }, ue = (e) => {
170
170
  var t;
171
171
  let n;
172
172
  if (e instanceof HTMLTableCellElement) {
@@ -179,8 +179,8 @@ const O = (e) => {
179
179
  const l = e.nextElementSibling;
180
180
  l && (n = l);
181
181
  }
182
- return n && (!$(n) || !O(n)) ? de(n) : n;
183
- }, ft = (e) => {
182
+ return n && (!$(n) || !O(n)) ? ue(n) : n;
183
+ }, pt = (e) => {
184
184
  var t;
185
185
  const n = e.target;
186
186
  let l;
@@ -197,11 +197,11 @@ const O = (e) => {
197
197
  o && (l = o);
198
198
  }
199
199
  }
200
- return l && (!$(l) || !O(l)) ? ce(l) : l;
201
- }, xe = (e) => {
200
+ return l && (!$(l) || !O(l)) ? de(l) : l;
201
+ }, Ee = (e) => {
202
202
  const t = e.target;
203
- return ue(t);
204
- }, ue = (e) => {
203
+ return fe(t);
204
+ }, fe = (e) => {
205
205
  var t;
206
206
  let n;
207
207
  if (e.previousElementSibling)
@@ -210,11 +210,11 @@ const O = (e) => {
210
210
  const l = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
211
211
  n = l == null ? void 0 : l.lastElementChild;
212
212
  }
213
- return n && (!$(n) || !O(n)) ? ue(n) : n;
214
- }, Ee = (e) => {
213
+ return n && (!$(n) || !O(n)) ? fe(n) : n;
214
+ }, ke = (e) => {
215
215
  const t = e.target;
216
- return fe(t);
217
- }, fe = (e) => {
216
+ return pe(t);
217
+ }, pe = (e) => {
218
218
  var t;
219
219
  let n;
220
220
  if (e.nextElementSibling)
@@ -223,235 +223,235 @@ const O = (e) => {
223
223
  const l = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
224
224
  n = l == null ? void 0 : l.firstElementChild;
225
225
  }
226
- return n && (!$(n) || !O(n)) ? fe(n) : n;
227
- }, ke = (e) => {
228
- const t = e.target.parentElement.firstElementChild;
229
- return t && (!$(t) || !O(t)) ? fe(t) : t;
226
+ return n && (!$(n) || !O(n)) ? pe(n) : n;
230
227
  }, Ce = (e) => {
228
+ const t = e.target.parentElement.firstElementChild;
229
+ return t && (!$(t) || !O(t)) ? pe(t) : t;
230
+ }, Ie = (e) => {
231
231
  const t = e.target.parentElement.lastElementChild;
232
- return t && (!$(t) || !O(t)) ? ue(t) : t;
233
- }, U = ["alt", "control", "shift", "meta"], pt = {
232
+ return t && (!$(t) || !O(t)) ? fe(t) : t;
233
+ }, U = ["alt", "control", "shift", "meta"], mt = {
234
234
  ArrowUp: "up",
235
235
  ArrowDown: "down",
236
236
  ArrowLeft: "left",
237
237
  ArrowRight: "right"
238
- }, pe = {
238
+ }, me = {
239
239
  "keydown.up": (e) => {
240
- const t = be(e);
240
+ const t = ge(e);
241
241
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
242
242
  },
243
243
  "keydown.down": (e) => {
244
- const t = ge(e);
244
+ const t = xe(e);
245
245
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
246
246
  },
247
247
  "keydown.left": (e) => {
248
- const t = xe(e);
248
+ const t = Ee(e);
249
249
  e.preventDefault(), e.stopPropagation(), t && t.focus();
250
250
  },
251
251
  "keydown.right": (e) => {
252
- const t = Ee(e);
252
+ const t = ke(e);
253
253
  e.preventDefault(), e.stopPropagation(), t && t.focus();
254
254
  },
255
255
  "keydown.control.up": (e) => {
256
- const t = ut(e);
256
+ const t = ft(e);
257
257
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
258
258
  },
259
259
  "keydown.control.down": (e) => {
260
- const t = ft(e);
260
+ const t = pt(e);
261
261
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
262
262
  },
263
263
  "keydown.control.left": (e) => {
264
- const t = ke(e);
264
+ const t = Ce(e);
265
265
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
266
266
  },
267
267
  "keydown.control.right": (e) => {
268
- const t = Ce(e);
268
+ const t = Ie(e);
269
269
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
270
270
  },
271
271
  "keydown.end": (e) => {
272
- const t = Ce(e);
272
+ const t = Ie(e);
273
273
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
274
274
  },
275
275
  "keydown.enter": (e) => {
276
276
  if (e.target instanceof HTMLTableCellElement) {
277
277
  e.preventDefault(), e.stopPropagation();
278
- const t = ge(e);
278
+ const t = xe(e);
279
279
  t && t.focus();
280
280
  }
281
281
  },
282
282
  "keydown.shift.enter": (e) => {
283
283
  if (e.target instanceof HTMLTableCellElement) {
284
284
  e.preventDefault(), e.stopPropagation();
285
- const t = be(e);
285
+ const t = ge(e);
286
286
  t && t.focus();
287
287
  }
288
288
  },
289
289
  "keydown.home": (e) => {
290
- const t = ke(e);
290
+ const t = Ce(e);
291
291
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
292
292
  },
293
293
  "keydown.tab": (e) => {
294
- const t = Ee(e);
294
+ const t = ke(e);
295
295
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
296
296
  },
297
297
  "keydown.shift.tab": (e) => {
298
- const t = xe(e);
298
+ const t = Ee(e);
299
299
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
300
300
  }
301
301
  };
302
- function me(e) {
303
- const t = (r) => {
302
+ function ve(e) {
303
+ const t = (a) => {
304
304
  let i = null;
305
- return r.parent && (typeof r.parent == "string" ? i = document.querySelector(r.parent) : r.parent instanceof HTMLElement ? i = r.parent : i = r.parent.value), i;
306
- }, n = (r) => {
307
- const i = t(r);
305
+ return a.parent && (typeof a.parent == "string" ? i = document.querySelector(a.parent) : a.parent instanceof HTMLElement ? i = a.parent : i = a.parent.value), i;
306
+ }, n = (a) => {
307
+ const i = t(a);
308
308
  let d = [];
309
- if (typeof r.selectors == "string")
310
- d = i ? Array.from(i.querySelectorAll(r.selectors)) : Array.from(document.querySelectorAll(r.selectors));
311
- else if (Array.isArray(r.selectors))
312
- for (const a of r.selectors)
313
- a instanceof HTMLElement ? d.push(a) : d.push(a.$el);
314
- else if (r.selectors instanceof HTMLElement)
315
- d.push(r.selectors);
316
- else if (Array.isArray(r.selectors.value))
317
- for (const a of r.selectors.value)
318
- a instanceof HTMLElement ? d.push(a) : d.push(a.$el);
309
+ if (typeof a.selectors == "string")
310
+ d = i ? Array.from(i.querySelectorAll(a.selectors)) : Array.from(document.querySelectorAll(a.selectors));
311
+ else if (Array.isArray(a.selectors))
312
+ for (const r of a.selectors)
313
+ r instanceof HTMLElement ? d.push(r) : d.push(r.$el);
314
+ else if (a.selectors instanceof HTMLElement)
315
+ d.push(a.selectors);
316
+ else if (Array.isArray(a.selectors.value))
317
+ for (const r of a.selectors.value)
318
+ r instanceof HTMLElement ? d.push(r) : d.push(r.$el);
319
319
  else
320
- d.push(r.selectors.value);
320
+ d.push(a.selectors.value);
321
321
  return d;
322
- }, l = (r) => {
323
- const i = t(r);
322
+ }, l = (a) => {
323
+ const i = t(a);
324
324
  let d = [];
325
- return r.selectors ? d = n(r) : i && (d = Array.from(i.children).filter((a) => $(a) && O(a))), d;
326
- }, s = (r) => (i) => {
327
- const d = pt[i.key] || i.key.toLowerCase();
325
+ return a.selectors ? d = n(a) : i && (d = Array.from(i.children).filter((r) => $(r) && O(r))), d;
326
+ }, s = (a) => (i) => {
327
+ const d = mt[i.key] || i.key.toLowerCase();
328
328
  if (U.includes(d)) return;
329
- const a = r.handlers || pe;
330
- for (const u of Object.keys(a)) {
329
+ const r = a.handlers || me;
330
+ for (const u of Object.keys(r)) {
331
331
  const [p, ...c] = u.split(".");
332
332
  if (p === "keydown" && c.includes(d)) {
333
- const f = a[u], v = c.filter((w) => U.includes(w)), b = U.some((w) => {
334
- const I = w.charAt(0).toUpperCase() + w.slice(1);
335
- return i.getModifierState(I);
333
+ const f = r[u], v = c.filter((y) => U.includes(y)), g = U.some((y) => {
334
+ const E = y.charAt(0).toUpperCase() + y.slice(1);
335
+ return i.getModifierState(E);
336
336
  });
337
337
  if (v.length > 0) {
338
- if (b) {
339
- for (const w of U)
340
- if (c.includes(w)) {
341
- const I = w.charAt(0).toUpperCase() + w.slice(1);
342
- i.getModifierState(I) && f(i);
338
+ if (g) {
339
+ for (const y of U)
340
+ if (c.includes(y)) {
341
+ const E = y.charAt(0).toUpperCase() + y.slice(1);
342
+ i.getModifierState(E) && f(i);
343
343
  }
344
344
  }
345
345
  } else
346
- b || f(i);
346
+ g || f(i);
347
347
  }
348
348
  }
349
349
  }, o = [];
350
350
  F(() => {
351
- for (const r of e) {
352
- const i = t(r), d = l(r), a = s(r), u = i ? [i] : d;
351
+ for (const a of e) {
352
+ const i = t(a), d = l(a), r = s(a), u = i ? [i] : d;
353
353
  for (const p of u) {
354
- const { focused: c } = ct(y(p)), f = C(c, (v) => {
355
- v ? p.addEventListener("keydown", a) : p.removeEventListener("keydown", a);
354
+ const { focused: c } = dt(b(p)), f = C(c, (v) => {
355
+ v ? p.addEventListener("keydown", r) : p.removeEventListener("keydown", r);
356
356
  });
357
357
  o.push(f);
358
358
  }
359
359
  }
360
- }), qe(() => {
361
- for (const r of o)
362
- r();
360
+ }), Ye(() => {
361
+ for (const a of o)
362
+ a();
363
363
  });
364
364
  }
365
- function ve(e) {
366
- return le() ? (se(e), !0) : !1;
365
+ function we(e) {
366
+ return se() ? (ie(e), !0) : !1;
367
367
  }
368
368
  function K(e) {
369
369
  return typeof e == "function" ? e() : m(e);
370
370
  }
371
- const mt = typeof window < "u" && typeof document < "u";
371
+ const vt = typeof window < "u" && typeof document < "u";
372
372
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
373
- const vt = (e) => e != null, wt = Object.prototype.toString, ht = (e) => wt.call(e) === "[object Object]", yt = () => {
373
+ const wt = (e) => e != null, ht = Object.prototype.toString, yt = (e) => ht.call(e) === "[object Object]", bt = () => {
374
374
  };
375
- function bt(e) {
376
- return ie();
375
+ function gt(e) {
376
+ return re();
377
377
  }
378
- function gt(e, t = !0, n) {
379
- bt() ? F(e, n) : t ? e() : $e(e);
378
+ function xt(e, t = !0, n) {
379
+ gt() ? F(e, n) : t ? e() : Te(e);
380
380
  }
381
- const we = mt ? window : void 0;
381
+ const he = vt ? window : void 0;
382
382
  function D(e) {
383
383
  var t;
384
384
  const n = K(e);
385
385
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
386
386
  }
387
- function Ie(...e) {
387
+ function Ae(...e) {
388
388
  let t, n, l, s;
389
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, l, s] = e, t = we) : [t, n, l, s] = e, !t)
390
- return yt;
389
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, l, s] = e, t = he) : [t, n, l, s] = e, !t)
390
+ return bt;
391
391
  Array.isArray(n) || (n = [n]), Array.isArray(l) || (l = [l]);
392
- const o = [], r = () => {
392
+ const o = [], a = () => {
393
393
  o.forEach((u) => u()), o.length = 0;
394
394
  }, i = (u, p, c, f) => (u.addEventListener(p, c, f), () => u.removeEventListener(p, c, f)), d = C(
395
395
  () => [D(t), K(s)],
396
396
  ([u, p]) => {
397
- if (r(), !u)
397
+ if (a(), !u)
398
398
  return;
399
- const c = ht(p) ? { ...p } : p;
399
+ const c = yt(p) ? { ...p } : p;
400
400
  o.push(
401
401
  ...n.flatMap((f) => l.map((v) => i(u, f, v, c)))
402
402
  );
403
403
  },
404
404
  { immediate: !0, flush: "post" }
405
- ), a = () => {
406
- d(), r();
405
+ ), r = () => {
406
+ d(), a();
407
407
  };
408
- return ve(a), a;
408
+ return we(r), r;
409
409
  }
410
- function xt() {
411
- const e = y(!1), t = ie();
410
+ function Et() {
411
+ const e = b(!1), t = re();
412
412
  return t && F(() => {
413
413
  e.value = !0;
414
414
  }, t), e;
415
415
  }
416
- function Re(e) {
417
- const t = xt();
416
+ function Le(e) {
417
+ const t = Et();
418
418
  return x(() => (t.value, !!e()));
419
419
  }
420
- function Le(e, t, n = {}) {
421
- const { window: l = we, ...s } = n;
420
+ function Pe(e, t, n = {}) {
421
+ const { window: l = he, ...s } = n;
422
422
  let o;
423
- const r = Re(() => l && "MutationObserver" in l), i = () => {
423
+ const a = Le(() => l && "MutationObserver" in l), i = () => {
424
424
  o && (o.disconnect(), o = void 0);
425
425
  }, d = x(() => {
426
- const c = K(e), f = (Array.isArray(c) ? c : [c]).map(D).filter(vt);
426
+ const c = K(e), f = (Array.isArray(c) ? c : [c]).map(D).filter(wt);
427
427
  return new Set(f);
428
- }), a = C(
428
+ }), r = C(
429
429
  () => d.value,
430
430
  (c) => {
431
- i(), r.value && c.size && (o = new MutationObserver(t), c.forEach((f) => o.observe(f, s)));
431
+ i(), a.value && c.size && (o = new MutationObserver(t), c.forEach((f) => o.observe(f, s)));
432
432
  },
433
433
  { immediate: !0, flush: "post" }
434
434
  ), u = () => o == null ? void 0 : o.takeRecords(), p = () => {
435
- a(), i();
435
+ r(), i();
436
436
  };
437
- return ve(p), {
438
- isSupported: r,
437
+ return we(p), {
438
+ isSupported: a,
439
439
  stop: p,
440
440
  takeRecords: u
441
441
  };
442
442
  }
443
- function Et(e, t, n = {}) {
444
- const { window: l = we, ...s } = n;
443
+ function kt(e, t, n = {}) {
444
+ const { window: l = he, ...s } = n;
445
445
  let o;
446
- const r = Re(() => l && "ResizeObserver" in l), i = () => {
446
+ const a = Le(() => l && "ResizeObserver" in l), i = () => {
447
447
  o && (o.disconnect(), o = void 0);
448
448
  }, d = x(() => {
449
449
  const p = K(e);
450
450
  return Array.isArray(p) ? p.map((c) => D(c)) : [D(p)];
451
- }), a = C(
451
+ }), r = C(
452
452
  d,
453
453
  (p) => {
454
- if (i(), r.value && l) {
454
+ if (i(), a.value && l) {
455
455
  o = new ResizeObserver(t);
456
456
  for (const c of p)
457
457
  c && o.observe(c, s);
@@ -459,53 +459,53 @@ function Et(e, t, n = {}) {
459
459
  },
460
460
  { immediate: !0, flush: "post" }
461
461
  ), u = () => {
462
- i(), a();
462
+ i(), r();
463
463
  };
464
- return ve(u), {
465
- isSupported: r,
464
+ return we(u), {
465
+ isSupported: a,
466
466
  stop: u
467
467
  };
468
468
  }
469
- function kt(e, t = {}) {
469
+ function Ct(e, t = {}) {
470
470
  const {
471
471
  reset: n = !0,
472
472
  windowResize: l = !0,
473
473
  windowScroll: s = !0,
474
474
  immediate: o = !0,
475
- updateTiming: r = "sync"
476
- } = t, i = y(0), d = y(0), a = y(0), u = y(0), p = y(0), c = y(0), f = y(0), v = y(0);
477
- function b() {
478
- const I = D(e);
479
- if (!I) {
480
- n && (i.value = 0, d.value = 0, a.value = 0, u.value = 0, p.value = 0, c.value = 0, f.value = 0, v.value = 0);
475
+ updateTiming: a = "sync"
476
+ } = t, i = b(0), d = b(0), r = b(0), u = b(0), p = b(0), c = b(0), f = b(0), v = b(0);
477
+ function g() {
478
+ const E = D(e);
479
+ if (!E) {
480
+ n && (i.value = 0, d.value = 0, r.value = 0, u.value = 0, p.value = 0, c.value = 0, f.value = 0, v.value = 0);
481
481
  return;
482
482
  }
483
- const k = I.getBoundingClientRect();
484
- i.value = k.height, d.value = k.bottom, a.value = k.left, u.value = k.right, p.value = k.top, c.value = k.width, f.value = k.x, v.value = k.y;
483
+ const I = E.getBoundingClientRect();
484
+ i.value = I.height, d.value = I.bottom, r.value = I.left, u.value = I.right, p.value = I.top, c.value = I.width, f.value = I.x, v.value = I.y;
485
485
  }
486
- function w() {
487
- r === "sync" ? b() : r === "next-frame" && requestAnimationFrame(() => b());
486
+ function y() {
487
+ a === "sync" ? g() : a === "next-frame" && requestAnimationFrame(() => g());
488
488
  }
489
- return Et(e, w), C(() => D(e), (I) => !I && w()), Le(e, w, {
489
+ return kt(e, y), C(() => D(e), (E) => !E && y()), Pe(e, y, {
490
490
  attributeFilter: ["style", "class"]
491
- }), s && Ie("scroll", w, { capture: !0, passive: !0 }), l && Ie("resize", w, { passive: !0 }), gt(() => {
492
- o && w();
491
+ }), s && Ae("scroll", y, { capture: !0, passive: !0 }), l && Ae("resize", y, { passive: !0 }), xt(() => {
492
+ o && y();
493
493
  }), {
494
494
  height: i,
495
495
  bottom: d,
496
- left: a,
496
+ left: r,
497
497
  right: u,
498
498
  top: p,
499
499
  width: c,
500
500
  x: f,
501
501
  y: v,
502
- update: w
502
+ update: y
503
503
  };
504
504
  }
505
- const Ct = (e) => {
505
+ const It = (e) => {
506
506
  const t = new DOMParser().parseFromString(e, "text/html");
507
507
  return Array.from(t.body.childNodes).some((n) => n.nodeType === 1);
508
- }, It = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], At = ["innerHTML"], St = { key: 2 }, Pe = /* @__PURE__ */ M({
508
+ }, At = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], St = ["innerHTML"], Ot = { key: 2 }, We = /* @__PURE__ */ M({
509
509
  __name: "ACell",
510
510
  props: {
511
511
  colIndex: {},
@@ -516,72 +516,75 @@ const Ct = (e) => {
516
516
  pinned: { type: Boolean }
517
517
  },
518
518
  setup(e) {
519
- const t = Q(e.tableid), n = Z("cell"), { bottom: l, left: s } = kt(n), o = t.cellData(e.colIndex, e.rowIndex), r = y(""), i = y(!1), d = t.table, a = t.columns[e.colIndex], u = t.rows[e.rowIndex], p = a.align || "center", c = a.width || "40ch", f = x(() => typeof b.value == "string" ? Ct(b.value) : !1), v = x(() => {
520
- var g;
519
+ const t = Q(e.tableid), n = Z("cell"), { bottom: l, left: s } = Ct(n), o = t.cellData(e.colIndex, e.rowIndex), a = b(""), i = b(!1), d = t.table, r = t.columns[e.colIndex], u = t.rows[e.rowIndex], p = r.align || "center", c = r.width || "40ch", f = x(() => typeof g.value == "string" ? It(g.value) : !1), v = x(() => {
520
+ var w;
521
521
  return {
522
522
  textAlign: p,
523
523
  width: c,
524
- backgroundColor: i.value ? "var(--cell-modified-color)" : "inherit",
524
+ backgroundColor: i.value ? "var(--sc-cell-modified)" : "inherit",
525
525
  fontWeight: i.value ? "bold" : "inherit",
526
- paddingLeft: Fe(e.colIndex, (g = t.display[e.rowIndex]) == null ? void 0 : g.indent)
526
+ paddingLeft: Ge(e.colIndex, (w = t.display[e.rowIndex]) == null ? void 0 : w.indent)
527
527
  };
528
- }), b = x(() => {
529
- const g = t.cellData(e.colIndex, e.rowIndex), A = a.format;
530
- return A ? typeof A == "function" ? A(g, { table: d, row: u, column: a }) : typeof A == "string" ? Function(`"use strict";return (${A})`)()(g, { table: d, row: u, column: a }) : g : g;
531
- }), w = () => {
532
- a.mask, a.modalComponent && (t.modal.visible = !0, t.modal.colIndex = e.colIndex, t.modal.rowIndex = e.rowIndex, t.modal.parent = n.value, t.modal.top = l.value, t.modal.left = s.value, t.modal.width = c, typeof a.modalComponent == "function" ? t.modal.component = a.modalComponent({ table: d, row: u, column: a }) : t.modal.component = a.modalComponent, t.modal.componentProps = a.modalComponentExtraProps);
528
+ }), g = x(() => {
529
+ const w = t.cellData(e.colIndex, e.rowIndex);
530
+ return y(w);
531
+ }), y = (w) => {
532
+ const A = r.format;
533
+ return A ? typeof A == "function" ? A(w, { table: d, row: u, column: r }) : typeof A == "string" ? Function(`"use strict";return (${A})`)()(w, { table: d, row: u, column: r }) : w : w;
534
+ }, E = () => {
535
+ r.mask, r.modalComponent && (t.modal.visible = !0, t.modal.colIndex = e.colIndex, t.modal.rowIndex = e.rowIndex, t.modal.parent = n.value, t.modal.top = l.value, t.modal.left = s.value, t.modal.width = c, typeof r.modalComponent == "function" ? t.modal.component = r.modalComponent({ table: d, row: u, column: r }) : t.modal.component = r.modalComponent, t.modal.componentProps = r.modalComponentExtraProps);
533
536
  };
534
537
  if (e.addNavigation) {
535
- let g = {
536
- ...pe,
537
- "keydown.f2": w,
538
- "keydown.alt.up": w,
539
- "keydown.alt.down": w,
540
- "keydown.alt.left": w,
541
- "keydown.alt.right": w
538
+ let w = {
539
+ ...me,
540
+ "keydown.f2": E,
541
+ "keydown.alt.up": E,
542
+ "keydown.alt.down": E,
543
+ "keydown.alt.left": E,
544
+ "keydown.alt.right": E
542
545
  };
543
- typeof e.addNavigation == "object" && (g = {
544
- ...g,
546
+ typeof e.addNavigation == "object" && (w = {
547
+ ...w,
545
548
  ...e.addNavigation
546
- }), me([
549
+ }), ve([
547
550
  {
548
551
  selectors: n,
549
- handlers: g
552
+ handlers: w
550
553
  }
551
554
  ]);
552
555
  }
553
556
  const I = () => {
554
- n.value && (r.value = n.value.textContent);
555
- }, k = () => {
556
- n.value && (i.value = n.value.textContent !== o, n.value.textContent !== r.value && (r.value = n.value.textContent, n.value.dispatchEvent(new Event("change")), a.format || t.setCellData(e.rowIndex, e.colIndex, r.value)));
557
- }, Fe = (g, A) => A && g === 0 && A > 0 ? `${A}ch` : "inherit";
558
- return (g, A) => (h(), E("td", {
557
+ n.value && (a.value = n.value.textContent);
558
+ }, _ = () => {
559
+ n.value && (r.format ? i.value = n.value.textContent !== y(o) : i.value = n.value.textContent !== o, n.value.textContent !== a.value && (a.value = n.value.textContent, n.value.dispatchEvent(new Event("change")), r.format || t.setCellData(e.rowIndex, e.colIndex, a.value)));
560
+ }, Ge = (w, A) => A && w === 0 && A > 0 ? `${A}ch` : "inherit";
561
+ return (w, A) => (h(), k("td", {
559
562
  ref: "cell",
560
- "data-colindex": g.colIndex,
561
- "data-rowindex": g.rowIndex,
562
- "data-editable": m(a).edit,
563
- contenteditable: m(a).edit,
564
- tabindex: g.tabIndex,
563
+ "data-colindex": w.colIndex,
564
+ "data-rowindex": w.rowIndex,
565
+ "data-editable": m(r).edit,
566
+ contenteditable: m(r).edit,
567
+ tabindex: w.tabIndex,
565
568
  spellcheck: !1,
566
569
  style: P(v.value),
567
570
  onFocus: I,
568
- onPaste: k,
569
- onBlur: k,
570
- onInput: k,
571
- onClick: w,
572
- onMousedown: w,
573
- class: N(["atable__cell", g.pinned ? "sticky-column" : ""])
571
+ onPaste: _,
572
+ onBlur: _,
573
+ onInput: _,
574
+ onClick: E,
575
+ onMousedown: E,
576
+ class: N(["atable__cell", w.pinned ? "sticky-column" : ""])
574
577
  }, [
575
- m(a).cellComponent ? (h(), q(Te(m(a).cellComponent), re({
578
+ m(r).cellComponent ? (h(), q(De(m(r).cellComponent), ae({
576
579
  key: 0,
577
- value: b.value
578
- }, m(a).cellComponentProps), null, 16, ["value"])) : f.value ? (h(), E("span", {
580
+ value: g.value
581
+ }, m(r).cellComponentProps), null, 16, ["value"])) : f.value ? (h(), k("span", {
579
582
  key: 1,
580
- innerHTML: b.value
581
- }, null, 8, At)) : (h(), E("span", St, B(b.value), 1))
582
- ], 46, It));
583
+ innerHTML: g.value
584
+ }, null, 8, St)) : (h(), k("span", Ot, B(g.value), 1))
585
+ ], 46, At));
583
586
  }
584
- }), Ot = ["tabindex"], $t = ["tabindex"], Tt = ["colspan"], Dt = /* @__PURE__ */ M({
587
+ }), $t = ["tabindex"], Tt = ["tabindex"], Dt = ["colspan"], Mt = /* @__PURE__ */ M({
585
588
  __name: "AExpansionRow",
586
589
  props: {
587
590
  rowIndex: {},
@@ -597,27 +600,27 @@ const Ct = (e) => {
597
600
  o.stopPropagation(), o.preventDefault(), t.toggleRowExpand(e.rowIndex);
598
601
  }
599
602
  };
600
- typeof e.addNavigation == "object" && Object.assign(s, e.addNavigation), me([
603
+ typeof e.addNavigation == "object" && Object.assign(s, e.addNavigation), ve([
601
604
  {
602
605
  selectors: n,
603
606
  handlers: s
604
607
  }
605
608
  ]);
606
609
  }
607
- return (s, o) => (h(), E(X, null, [
608
- W("tr", re(s.$attrs, {
610
+ return (s, o) => (h(), k(X, null, [
611
+ W("tr", ae(s.$attrs, {
609
612
  ref: "rowEl",
610
613
  tabindex: s.tabIndex,
611
614
  class: "expandable-row"
612
615
  }), [
613
616
  W("td", {
614
617
  tabIndex: -1,
615
- onClick: o[0] || (o[0] = (r) => m(t).toggleRowExpand(s.rowIndex)),
618
+ onClick: o[0] || (o[0] = (a) => m(t).toggleRowExpand(s.rowIndex)),
616
619
  class: "row-index"
617
620
  }, B(l.value), 1),
618
621
  S(s.$slots, "row")
619
- ], 16, Ot),
620
- m(t).display[s.rowIndex].expanded ? (h(), E("tr", {
622
+ ], 16, $t),
623
+ m(t).display[s.rowIndex].expanded ? (h(), k("tr", {
621
624
  key: 0,
622
625
  ref: "rowExpanded",
623
626
  tabindex: s.tabIndex,
@@ -629,11 +632,11 @@ const Ct = (e) => {
629
632
  class: "expanded-row-content"
630
633
  }, [
631
634
  S(s.$slots, "content")
632
- ], 8, Tt)
633
- ], 8, $t)) : J("", !0)
635
+ ], 8, Dt)
636
+ ], 8, Tt)) : J("", !0)
634
637
  ], 64));
635
638
  }
636
- }), Mt = ["tabindex"], We = /* @__PURE__ */ M({
639
+ }), Rt = ["tabindex"], He = /* @__PURE__ */ M({
637
640
  __name: "ARow",
638
641
  props: {
639
642
  rowIndex: {},
@@ -642,104 +645,104 @@ const Ct = (e) => {
642
645
  addNavigation: { type: [Boolean, Object], default: !1 }
643
646
  },
644
647
  setup(e) {
645
- const t = Q(e.tableid), n = Z("rowEl"), l = x(() => t.columns.some((i) => i.pinned)), s = x(() => t.config.view !== "tree" || t.display[e.rowIndex].isRoot || t.display[e.rowIndex].open), o = x(() => t.config.view !== "tree" ? "" : t.display[e.rowIndex].isRoot || t.display[e.rowIndex].isParent ? t.display[e.rowIndex].childrenOpen ? "-" : "+" : ""), r = (i) => {
648
+ const t = Q(e.tableid), n = Z("rowEl"), l = x(() => t.columns.some((i) => i.pinned)), s = x(() => t.config.view !== "tree" || t.display[e.rowIndex].isRoot || t.display[e.rowIndex].open), o = x(() => t.config.view !== "tree" ? "" : t.display[e.rowIndex].isRoot || t.display[e.rowIndex].isParent ? t.display[e.rowIndex].childrenOpen ? "-" : "+" : ""), a = (i) => {
646
649
  t.toggleRowExpand(i);
647
650
  };
648
651
  if (e.addNavigation) {
649
- let i = pe;
652
+ let i = me;
650
653
  typeof e.addNavigation == "object" && (i = {
651
654
  ...i,
652
655
  ...e.addNavigation
653
- }), me([
656
+ }), ve([
654
657
  {
655
658
  selectors: n,
656
659
  handlers: i
657
660
  }
658
661
  ]);
659
662
  }
660
- return (i, d) => te((h(), E("tr", {
663
+ return (i, d) => ne((h(), k("tr", {
661
664
  ref: "rowEl",
662
665
  tabindex: i.tabIndex,
663
666
  class: "table-row"
664
667
  }, [
665
668
  S(i.$slots, "index", {}, () => [
666
- m(t).config.view === "list" ? (h(), E("td", {
669
+ m(t).config.view === "list" ? (h(), k("td", {
667
670
  key: 0,
668
671
  tabIndex: -1,
669
672
  class: N(["list-index", l.value ? "sticky-index" : ""])
670
- }, B(i.rowIndex + 1), 3)) : m(t).config.view === "tree" ? (h(), E("td", {
673
+ }, B(i.rowIndex + 1), 3)) : m(t).config.view === "tree" ? (h(), k("td", {
671
674
  key: 1,
672
675
  tabIndex: -1,
673
676
  class: N(["tree-index", l.value ? "sticky-index" : ""]),
674
- onClick: d[0] || (d[0] = (a) => r(i.rowIndex))
677
+ onClick: d[0] || (d[0] = (r) => a(i.rowIndex))
675
678
  }, B(o.value), 3)) : J("", !0)
676
679
  ]),
677
680
  S(i.$slots, "default")
678
- ], 8, Mt)), [
679
- [De, s.value]
681
+ ], 8, Rt)), [
682
+ [Me, s.value]
680
683
  ]);
681
684
  }
682
685
  });
683
- function He(e) {
684
- return le() ? (se(e), !0) : !1;
686
+ function je(e) {
687
+ return se() ? (ie(e), !0) : !1;
685
688
  }
686
689
  function H(e) {
687
690
  return typeof e == "function" ? e() : m(e);
688
691
  }
689
- const je = typeof window < "u" && typeof document < "u";
692
+ const Ne = typeof window < "u" && typeof document < "u";
690
693
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
691
- const Rt = Object.prototype.toString, Lt = (e) => Rt.call(e) === "[object Object]", j = () => {
692
- }, oe = /* @__PURE__ */ Pt();
693
- function Pt() {
694
+ const Lt = Object.prototype.toString, Pt = (e) => Lt.call(e) === "[object Object]", j = () => {
695
+ }, le = /* @__PURE__ */ Wt();
696
+ function Wt() {
694
697
  var e, t;
695
- return je && ((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));
698
+ return Ne && ((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));
696
699
  }
697
- const Ae = {
700
+ const Se = {
698
701
  mounted: "mounted",
699
702
  updated: "updated",
700
703
  unmounted: "unmounted"
701
704
  };
702
- function Wt(...e) {
705
+ function Ht(...e) {
703
706
  if (e.length !== 1)
704
- return Ye(...e);
707
+ return Xe(...e);
705
708
  const t = e[0];
706
- return typeof t == "function" ? Xe(Je(() => ({ get: t, set: j }))) : y(t);
709
+ return typeof t == "function" ? Je(Qe(() => ({ get: t, set: j }))) : b(t);
707
710
  }
708
711
  function L(e) {
709
712
  var t;
710
713
  const n = H(e);
711
714
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
712
715
  }
713
- const Ne = je ? window : void 0;
716
+ const Be = Ne ? window : void 0;
714
717
  function Y(...e) {
715
718
  let t, n, l, s;
716
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, l, s] = e, t = Ne) : [t, n, l, s] = e, !t)
719
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, l, s] = e, t = Be) : [t, n, l, s] = e, !t)
717
720
  return j;
718
721
  Array.isArray(n) || (n = [n]), Array.isArray(l) || (l = [l]);
719
- const o = [], r = () => {
722
+ const o = [], a = () => {
720
723
  o.forEach((u) => u()), o.length = 0;
721
724
  }, i = (u, p, c, f) => (u.addEventListener(p, c, f), () => u.removeEventListener(p, c, f)), d = C(
722
725
  () => [L(t), H(s)],
723
726
  ([u, p]) => {
724
- if (r(), !u)
727
+ if (a(), !u)
725
728
  return;
726
- const c = Lt(p) ? { ...p } : p;
729
+ const c = Pt(p) ? { ...p } : p;
727
730
  o.push(
728
731
  ...n.flatMap((f) => l.map((v) => i(u, f, v, c)))
729
732
  );
730
733
  },
731
734
  { immediate: !0, flush: "post" }
732
- ), a = () => {
733
- d(), r();
735
+ ), r = () => {
736
+ d(), a();
734
737
  };
735
- return He(a), a;
738
+ return je(r), r;
736
739
  }
737
- let Se = !1;
738
- function Oe(e, t, n = {}) {
739
- const { window: l = Ne, ignore: s = [], capture: o = !0, detectIframe: r = !1 } = n;
740
+ let Oe = !1;
741
+ function $e(e, t, n = {}) {
742
+ const { window: l = Be, ignore: s = [], capture: o = !0, detectIframe: a = !1 } = n;
740
743
  if (!l)
741
744
  return j;
742
- oe && !Se && (Se = !0, Array.from(l.document.body.children).forEach((c) => c.addEventListener("click", j)), l.document.documentElement.addEventListener("click", j));
745
+ le && !Oe && (Oe = !0, Array.from(l.document.body.children).forEach((c) => c.addEventListener("click", j)), l.document.documentElement.addEventListener("click", j));
743
746
  let i = !0;
744
747
  const d = (c) => s.some((f) => {
745
748
  if (typeof f == "string")
@@ -763,7 +766,7 @@ function Oe(e, t, n = {}) {
763
766
  const f = L(e);
764
767
  i = !d(c) && !!(f && !c.composedPath().includes(f));
765
768
  }, { passive: !0 }),
766
- r && Y(l, "blur", (c) => {
769
+ a && Y(l, "blur", (c) => {
767
770
  setTimeout(() => {
768
771
  var f;
769
772
  const v = L(e);
@@ -773,89 +776,89 @@ function Oe(e, t, n = {}) {
773
776
  ].filter(Boolean);
774
777
  return () => u.forEach((c) => c());
775
778
  }
776
- const Ht = {
777
- [Ae.mounted](e, t) {
779
+ const jt = {
780
+ [Se.mounted](e, t) {
778
781
  const n = !t.modifiers.bubble;
779
782
  if (typeof t.value == "function")
780
- e.__onClickOutside_stop = Oe(e, t.value, { capture: n });
783
+ e.__onClickOutside_stop = $e(e, t.value, { capture: n });
781
784
  else {
782
785
  const [l, s] = t.value;
783
- e.__onClickOutside_stop = Oe(e, l, Object.assign({ capture: n }, s));
786
+ e.__onClickOutside_stop = $e(e, l, Object.assign({ capture: n }, s));
784
787
  }
785
788
  },
786
- [Ae.unmounted](e) {
789
+ [Se.unmounted](e) {
787
790
  e.__onClickOutside_stop();
788
791
  }
789
792
  };
790
- function _(e) {
793
+ function ee(e) {
791
794
  return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
792
795
  }
793
- function Be(e) {
796
+ function Ve(e) {
794
797
  const t = window.getComputedStyle(e);
795
798
  if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight)
796
799
  return !0;
797
800
  {
798
801
  const n = e.parentNode;
799
- return !n || n.tagName === "BODY" ? !1 : Be(n);
802
+ return !n || n.tagName === "BODY" ? !1 : Ve(n);
800
803
  }
801
804
  }
802
- function jt(e) {
805
+ function Nt(e) {
803
806
  const t = e || window.event, n = t.target;
804
- return Be(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
807
+ return Ve(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
805
808
  }
806
- const ee = /* @__PURE__ */ new WeakMap();
807
- function Nt(e, t = !1) {
808
- const n = y(t);
809
+ const te = /* @__PURE__ */ new WeakMap();
810
+ function Bt(e, t = !1) {
811
+ const n = b(t);
809
812
  let l = null, s = "";
810
- C(Wt(e), (i) => {
811
- const d = _(H(i));
813
+ C(Ht(e), (i) => {
814
+ const d = ee(H(i));
812
815
  if (d) {
813
- const a = d;
814
- if (ee.get(a) || ee.set(a, a.style.overflow), a.style.overflow !== "hidden" && (s = a.style.overflow), a.style.overflow === "hidden")
816
+ const r = d;
817
+ if (te.get(r) || te.set(r, r.style.overflow), r.style.overflow !== "hidden" && (s = r.style.overflow), r.style.overflow === "hidden")
815
818
  return n.value = !0;
816
819
  if (n.value)
817
- return a.style.overflow = "hidden";
820
+ return r.style.overflow = "hidden";
818
821
  }
819
822
  }, {
820
823
  immediate: !0
821
824
  });
822
825
  const o = () => {
823
- const i = _(H(e));
824
- !i || n.value || (oe && (l = Y(
826
+ const i = ee(H(e));
827
+ !i || n.value || (le && (l = Y(
825
828
  i,
826
829
  "touchmove",
827
830
  (d) => {
828
- jt(d);
831
+ Nt(d);
829
832
  },
830
833
  { passive: !1 }
831
834
  )), i.style.overflow = "hidden", n.value = !0);
832
- }, r = () => {
833
- const i = _(H(e));
834
- !i || !n.value || (oe && (l == null || l()), i.style.overflow = s, ee.delete(i), n.value = !1);
835
+ }, a = () => {
836
+ const i = ee(H(e));
837
+ !i || !n.value || (le && (l == null || l()), i.style.overflow = s, te.delete(i), n.value = !1);
835
838
  };
836
- return He(r), x({
839
+ return je(a), x({
837
840
  get() {
838
841
  return n.value;
839
842
  },
840
843
  set(i) {
841
- i ? o() : r();
844
+ i ? o() : a();
842
845
  }
843
846
  });
844
847
  }
845
- function Bt() {
848
+ function Vt() {
846
849
  let e = !1;
847
- const t = y(!1);
850
+ const t = b(!1);
848
851
  return (n, l) => {
849
852
  if (t.value = l.value, e)
850
853
  return;
851
854
  e = !0;
852
- const s = Nt(n, l.value);
855
+ const s = Bt(n, l.value);
853
856
  C(t, (o) => s.value = o);
854
857
  };
855
858
  }
856
- Bt();
857
- class Vt {
858
- constructor(t, n, l, s, o, r) {
859
+ Vt();
860
+ class zt {
861
+ constructor(t, n, l, s, o, a) {
859
862
  T(this, "id");
860
863
  T(this, "rows");
861
864
  T(this, "columns");
@@ -863,7 +866,7 @@ class Vt {
863
866
  T(this, "table");
864
867
  T(this, "display");
865
868
  T(this, "modal");
866
- this.id = t || crypto.randomUUID(), this.rows = l, this.columns = R(n), this.config = R(s), this.table = o || R(this.createTableObject()), this.display = this.createDisplayObject(r), this.modal = R({ visible: !1 });
869
+ this.id = t || crypto.randomUUID(), this.rows = l, this.columns = R(n), this.config = R(s), this.table = o || R(this.createTableObject()), this.display = this.createDisplayObject(a), this.modal = R({ visible: !1 });
867
870
  }
868
871
  createTableObject() {
869
872
  const t = {};
@@ -913,13 +916,13 @@ class Vt {
913
916
  } else this.config.view === "list-expansion" && (this.display[t].expanded = !this.display[t].expanded);
914
917
  }
915
918
  }
916
- const zt = {
919
+ const Ft = {
917
920
  key: 0,
918
921
  id: "resizable"
919
- }, Ft = {
922
+ }, Gt = {
920
923
  class: "atable-header-row",
921
924
  tabindex: "-1"
922
- }, Ve = /* @__PURE__ */ M({
925
+ }, ze = /* @__PURE__ */ M({
923
926
  __name: "ATableHeader",
924
927
  props: {
925
928
  columns: {},
@@ -931,27 +934,27 @@ const zt = {
931
934
  textAlign: s.align || "center",
932
935
  width: t.config.fullWidth ? "auto" : null
933
936
  });
934
- return (s, o) => s.columns.length ? (h(), E("thead", zt, [
935
- W("tr", Ft, [
936
- m(t).zeroColumn ? (h(), E("th", {
937
+ return (s, o) => s.columns.length ? (h(), k("thead", Ft, [
938
+ W("tr", Gt, [
939
+ m(t).zeroColumn ? (h(), k("th", {
937
940
  key: 0,
938
941
  id: "header-index",
939
942
  class: N(n.value ? "sticky-index" : "")
940
943
  }, null, 2)) : J("", !0),
941
- (h(!0), E(X, null, ne(s.columns, (r, i) => (h(), E("th", {
942
- key: r.name,
944
+ (h(!0), k(X, null, oe(s.columns, (a, i) => (h(), k("th", {
945
+ key: a.name,
943
946
  tabindex: "-1",
944
- style: P(l(r)),
945
- class: N(r.pinned ? "sticky-column" : "")
947
+ style: P(l(a)),
948
+ class: N(a.pinned ? "sticky-column" : "")
946
949
  }, [
947
950
  S(s.$slots, "default", {}, () => [
948
- Qe(B(r.label || String.fromCharCode(i + 97).toUpperCase()), 1)
951
+ Ze(B(a.label || String.fromCharCode(i + 97).toUpperCase()), 1)
949
952
  ])
950
953
  ], 6))), 128))
951
954
  ])
952
955
  ])) : J("", !0);
953
956
  }
954
- }), ze = /* @__PURE__ */ M({
957
+ }), Fe = /* @__PURE__ */ M({
955
958
  __name: "ATableModal",
956
959
  props: {
957
960
  colIndex: {},
@@ -962,7 +965,7 @@ const zt = {
962
965
  const t = (n) => {
963
966
  n.stopPropagation();
964
967
  };
965
- return (n, l) => (h(), E("div", {
968
+ return (n, l) => (h(), k("div", {
966
969
  class: "amodal",
967
970
  tabindex: "-1",
968
971
  onClick: t,
@@ -971,7 +974,7 @@ const zt = {
971
974
  S(n.$slots, "default")
972
975
  ], 32));
973
976
  }
974
- }), Gt = /* @__PURE__ */ M({
977
+ }), Ut = /* @__PURE__ */ M({
975
978
  __name: "ATable",
976
979
  props: {
977
980
  id: {},
@@ -982,18 +985,18 @@ const zt = {
982
985
  },
983
986
  emits: ["update:modelValue"],
984
987
  setup(e, { emit: t }) {
985
- const n = t, l = Z("table"), s = e.modelValue ? e.modelValue : e.rows, o = new Vt(e.id, e.columns, s, e.config);
986
- Ze(o.id, o), C(
988
+ const n = t, l = Z("table"), s = e.modelValue ? e.modelValue : e.rows, o = new zt(e.id, e.columns, s, e.config);
989
+ Ke(o.id, o), C(
987
990
  () => o.rows,
988
991
  (d) => {
989
992
  n("update:modelValue", d);
990
993
  },
991
994
  { deep: !0 }
992
995
  ), F(() => {
993
- e.columns.some((d) => d.pinned) && (r(), o.config.view === "tree" && Le(l, r, { childList: !0, subtree: !0 }));
996
+ e.columns.some((d) => d.pinned) && (a(), o.config.view === "tree" && Pe(l, a, { childList: !0, subtree: !0 }));
994
997
  });
995
- const r = () => {
996
- const d = l.value, a = d.rows[0], u = d.rows[1], p = a ? Array.from(a.cells) : [];
998
+ const a = () => {
999
+ const d = l.value, r = d.rows[0], u = d.rows[1], p = r ? Array.from(r.cells) : [];
997
1000
  for (const [c, f] of p.entries()) {
998
1001
  const v = u.cells[c];
999
1002
  v && (f.style.width = `${v.offsetWidth}px`);
@@ -1001,43 +1004,43 @@ const zt = {
1001
1004
  for (const c of d.rows) {
1002
1005
  let f = 0;
1003
1006
  const v = [];
1004
- for (const b of c.cells)
1005
- (b.classList.contains("sticky-column") || b.classList.contains("sticky-index")) && (b.style.left = `${f}px`, f += b.offsetWidth, v.push(b));
1007
+ for (const g of c.cells)
1008
+ (g.classList.contains("sticky-column") || g.classList.contains("sticky-index")) && (g.style.left = `${f}px`, f += g.offsetWidth, v.push(g));
1006
1009
  v.length > 0 && v[v.length - 1].classList.add("sticky-column-edge");
1007
1010
  }
1008
1011
  }, i = (d) => {
1009
- var a;
1010
- d.target instanceof Node && (a = o.modal.parent) != null && a.contains(d.target) || o.modal.visible && (o.modal.visible = !1);
1012
+ var r;
1013
+ d.target instanceof Node && (r = o.modal.parent) != null && r.contains(d.target) || o.modal.visible && (o.modal.visible = !1);
1011
1014
  };
1012
1015
  return window.addEventListener("keydown", (d) => {
1013
1016
  if (d.key === "Escape" && o.modal.visible) {
1014
1017
  o.modal.visible = !1;
1015
- const a = o.modal.parent;
1016
- a && $e().then(() => {
1017
- a.focus();
1018
+ const r = o.modal.parent;
1019
+ r && Te().then(() => {
1020
+ r.focus();
1018
1021
  });
1019
1022
  }
1020
- }), (d, a) => te((h(), E("table", {
1023
+ }), (d, r) => ne((h(), k("table", {
1021
1024
  ref: "table",
1022
1025
  class: "atable",
1023
1026
  style: P({ width: m(o).config.fullWidth ? "100%" : "auto" })
1024
1027
  }, [
1025
1028
  S(d.$slots, "header", { data: m(o) }, () => [
1026
- he(Ve, {
1029
+ ye(ze, {
1027
1030
  columns: m(o).columns,
1028
1031
  tableid: m(o).id
1029
1032
  }, null, 8, ["columns", "tableid"])
1030
1033
  ], !0),
1031
1034
  W("tbody", null, [
1032
1035
  S(d.$slots, "body", { data: m(o) }, () => [
1033
- (h(!0), E(X, null, ne(m(o).rows, (u, p) => (h(), q(We, {
1036
+ (h(!0), k(X, null, oe(m(o).rows, (u, p) => (h(), q(He, {
1034
1037
  key: u.id,
1035
1038
  row: u,
1036
1039
  rowIndex: p,
1037
1040
  tableid: m(o).id
1038
1041
  }, {
1039
- default: ye(() => [
1040
- (h(!0), E(X, null, ne(m(o).columns, (c, f) => (h(), q(Pe, {
1042
+ default: be(() => [
1043
+ (h(!0), k(X, null, oe(m(o).columns, (c, f) => (h(), q(We, {
1041
1044
  key: c.name,
1042
1045
  tableid: m(o).id,
1043
1046
  col: c,
@@ -1059,7 +1062,7 @@ const zt = {
1059
1062
  ]),
1060
1063
  S(d.$slots, "footer", { data: m(o) }, void 0, !0),
1061
1064
  S(d.$slots, "modal", { data: m(o) }, () => [
1062
- te(he(ze, {
1065
+ ne(ye(Fe, {
1063
1066
  colIndex: m(o).modal.colIndex,
1064
1067
  rowIndex: m(o).modal.rowIndex,
1065
1068
  tableid: m(o).id,
@@ -1069,8 +1072,8 @@ const zt = {
1069
1072
  maxWidth: m(o).modal.width + "px"
1070
1073
  })
1071
1074
  }, {
1072
- default: ye(() => [
1073
- (h(), q(Te(m(o).modal.component), re({
1075
+ default: be(() => [
1076
+ (h(), q(De(m(o).modal.component), ae({
1074
1077
  key: `${m(o).modal.rowIndex}:${m(o).modal.colIndex}`,
1075
1078
  colIndex: m(o).modal.colIndex,
1076
1079
  rowIndex: m(o).modal.rowIndex,
@@ -1079,30 +1082,30 @@ const zt = {
1079
1082
  ]),
1080
1083
  _: 1
1081
1084
  }, 8, ["colIndex", "rowIndex", "tableid", "style"]), [
1082
- [De, m(o).modal.visible]
1085
+ [Me, m(o).modal.visible]
1083
1086
  ])
1084
1087
  ], !0)
1085
1088
  ], 4)), [
1086
- [m(Ht), i]
1089
+ [m(jt), i]
1087
1090
  ]);
1088
1091
  }
1089
- }), Ut = (e, t) => {
1092
+ }), qt = (e, t) => {
1090
1093
  const n = e.__vccOpts || e;
1091
1094
  for (const [l, s] of t)
1092
1095
  n[l] = s;
1093
1096
  return n;
1094
- }, qt = /* @__PURE__ */ Ut(Gt, [["__scopeId", "data-v-2896bed9"]]);
1095
- function Qt(e) {
1096
- e.component("ACell", Pe), e.component("AExpansionRow", Dt), e.component("ARow", We), e.component("ATable", qt), e.component("ATableHeader", Ve), e.component("ATableModal", ze);
1097
+ }, Yt = /* @__PURE__ */ qt(Ut, [["__scopeId", "data-v-2896bed9"]]);
1098
+ function Zt(e) {
1099
+ e.component("ACell", We), e.component("AExpansionRow", Mt), e.component("ARow", He), e.component("ATable", Yt), e.component("ATableHeader", ze), e.component("ATableModal", Fe);
1097
1100
  }
1098
1101
  export {
1099
- Pe as ACell,
1100
- Dt as AExpansionRow,
1101
- We as ARow,
1102
- qt as ATable,
1103
- Ve as ATableHeader,
1104
- ze as ATableModal,
1105
- Vt as TableDataStore,
1106
- Qt as install
1102
+ We as ACell,
1103
+ Mt as AExpansionRow,
1104
+ He as ARow,
1105
+ Yt as ATable,
1106
+ ze as ATableHeader,
1107
+ Fe as ATableModal,
1108
+ zt as TableDataStore,
1109
+ Zt as install
1107
1110
  };
1108
1111
  //# sourceMappingURL=atable.js.map