@stonecrop/atable 0.2.43 → 0.2.45

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