@stonecrop/atable 0.4.21 → 0.4.23

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,17 +1,17 @@
1
- import { onMounted as Q, ref as P, watch as B, onBeforeUnmount as rt, computed as I, shallowRef as W, toValue as E, watchEffect as it, getCurrentScope as qe, onScopeDispose as Je, unref as b, getCurrentInstance as pe, nextTick as Qe, isRef as ut, toRefs as ct, customRef as Ze, toRef as dt, readonly as ft, defineComponent as Z, useTemplateRef as N, createElementBlock as R, openBlock as S, normalizeClass as j, normalizeStyle as q, createBlock as re, resolveDynamicComponent as fe, mergeProps as Se, toDisplayString as K, Fragment as ie, createElementVNode as L, createCommentVNode as _, renderSlot as z, useCssVars as vt, withDirectives as he, vShow as Ke, renderList as ke, createTextVNode as mt, withModifiers as We, createVNode as He, withCtx as ze } from "vue";
2
- import { defineStore as ht } from "pinia";
1
+ import { onMounted as Z, ref as P, watch as N, onBeforeUnmount as it, computed as k, shallowRef as H, toValue as E, watchEffect as ut, getCurrentScope as Je, onScopeDispose as Qe, unref as x, getCurrentInstance as ge, nextTick as Ze, isRef as ct, toRefs as dt, customRef as Ke, toRef as ft, readonly as vt, defineComponent as K, useTemplateRef as G, createElementBlock as A, openBlock as S, normalizeClass as q, normalizeStyle as J, createBlock as re, resolveDynamicComponent as fe, mergeProps as Se, toDisplayString as _, Fragment as ie, createElementVNode as D, createCommentVNode as ee, renderSlot as B, useCssVars as mt, withDirectives as he, vShow as _e, renderList as ke, createTextVNode as ht, withModifiers as We, mergeModels as He, useModel as pt, createVNode as ze, withCtx as Be } from "vue";
2
+ import { defineStore as gt } from "pinia";
3
3
  import './assets/index.css';function $e(e) {
4
- return qe() ? (Je(e), !0) : !1;
4
+ return Je() ? (Qe(e), !0) : !1;
5
5
  }
6
- const gt = typeof window < "u" && typeof document < "u";
6
+ const wt = typeof window < "u" && typeof document < "u";
7
7
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
8
- const pt = (e) => e != null, wt = Object.prototype.toString, yt = (e) => wt.call(e) === "[object Object]", bt = () => {
8
+ const yt = (e) => e != null, bt = Object.prototype.toString, xt = (e) => bt.call(e) === "[object Object]", Ct = () => {
9
9
  };
10
10
  function ve(e) {
11
11
  return Array.isArray(e) ? e : [e];
12
12
  }
13
- function xt(e, t, n) {
14
- return B(
13
+ function Et(e, t, n) {
14
+ return N(
15
15
  e,
16
16
  t,
17
17
  {
@@ -20,267 +20,267 @@ function xt(e, t, n) {
20
20
  }
21
21
  );
22
22
  }
23
- const ne = gt ? window : void 0;
24
- function ee(e) {
23
+ const oe = wt ? window : void 0;
24
+ function te(e) {
25
25
  var t;
26
26
  const n = E(e);
27
27
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
28
28
  }
29
29
  function ce(...e) {
30
30
  const t = [], n = () => {
31
- t.forEach((a) => a()), t.length = 0;
32
- }, o = (a, u, r, s) => (a.addEventListener(u, r, s), () => a.removeEventListener(u, r, s)), i = I(() => {
33
- const a = ve(E(e[0])).filter((u) => u != null);
34
- return a.every((u) => typeof u != "string") ? a : void 0;
35
- }), c = xt(
31
+ t.forEach((o) => o()), t.length = 0;
32
+ }, l = (o, s, a, c) => (o.addEventListener(s, a, c), () => o.removeEventListener(s, a, c)), r = k(() => {
33
+ const o = ve(E(e[0])).filter((s) => s != null);
34
+ return o.every((s) => typeof s != "string") ? o : void 0;
35
+ }), u = Et(
36
36
  () => {
37
- var a, u;
37
+ var o, s;
38
38
  return [
39
- (u = (a = i.value) == null ? void 0 : a.map((r) => ee(r))) != null ? u : [ne].filter((r) => r != null),
40
- ve(E(i.value ? e[1] : e[0])),
41
- ve(b(i.value ? e[2] : e[1])),
39
+ (s = (o = r.value) == null ? void 0 : o.map((a) => te(a))) != null ? s : [oe].filter((a) => a != null),
40
+ ve(E(r.value ? e[1] : e[0])),
41
+ ve(x(r.value ? e[2] : e[1])),
42
42
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
43
- E(i.value ? e[3] : e[2])
43
+ E(r.value ? e[3] : e[2])
44
44
  ];
45
45
  },
46
- ([a, u, r, s]) => {
47
- if (n(), !(a != null && a.length) || !(u != null && u.length) || !(r != null && r.length))
46
+ ([o, s, a, c]) => {
47
+ if (n(), !(o != null && o.length) || !(s != null && s.length) || !(a != null && a.length))
48
48
  return;
49
- const v = yt(s) ? { ...s } : s;
49
+ const d = xt(c) ? { ...c } : c;
50
50
  t.push(
51
- ...a.flatMap(
52
- (m) => u.flatMap(
53
- (y) => r.map((h) => o(m, y, h, v))
51
+ ...o.flatMap(
52
+ (m) => s.flatMap(
53
+ (g) => a.map((b) => l(m, g, b, d))
54
54
  )
55
55
  )
56
56
  );
57
57
  },
58
58
  { flush: "post" }
59
- ), l = () => {
60
- c(), n();
59
+ ), i = () => {
60
+ u(), n();
61
61
  };
62
- return $e(n), l;
62
+ return $e(n), i;
63
63
  }
64
- function Ct() {
65
- const e = W(!1), t = pe();
66
- return t && Q(() => {
64
+ function It() {
65
+ const e = H(!1), t = ge();
66
+ return t && Z(() => {
67
67
  e.value = !0;
68
68
  }, t), e;
69
69
  }
70
- function Et(e) {
71
- const t = Ct();
72
- return I(() => (t.value, !!e()));
70
+ function kt(e) {
71
+ const t = It();
72
+ return k(() => (t.value, !!e()));
73
73
  }
74
- function It(e, t, n = {}) {
75
- const { window: o = ne, ...i } = n;
76
- let c;
77
- const l = Et(() => o && "MutationObserver" in o), a = () => {
78
- c && (c.disconnect(), c = void 0);
79
- }, u = I(() => {
80
- const m = E(e), y = ve(m).map(ee).filter(pt);
81
- return new Set(y);
82
- }), r = B(
83
- () => u.value,
74
+ function Mt(e, t, n = {}) {
75
+ const { window: l = oe, ...r } = n;
76
+ let u;
77
+ const i = kt(() => l && "MutationObserver" in l), o = () => {
78
+ u && (u.disconnect(), u = void 0);
79
+ }, s = k(() => {
80
+ const m = E(e), g = ve(m).map(te).filter(yt);
81
+ return new Set(g);
82
+ }), a = N(
83
+ () => s.value,
84
84
  (m) => {
85
- a(), l.value && m.size && (c = new MutationObserver(t), m.forEach((y) => c.observe(y, i)));
85
+ o(), i.value && m.size && (u = new MutationObserver(t), m.forEach((g) => u.observe(g, r)));
86
86
  },
87
87
  { immediate: !0, flush: "post" }
88
- ), s = () => c == null ? void 0 : c.takeRecords(), v = () => {
89
- r(), a();
88
+ ), c = () => u == null ? void 0 : u.takeRecords(), d = () => {
89
+ a(), o();
90
90
  };
91
- return $e(v), {
92
- isSupported: l,
93
- stop: v,
94
- takeRecords: s
91
+ return $e(d), {
92
+ isSupported: i,
93
+ stop: d,
94
+ takeRecords: c
95
95
  };
96
96
  }
97
- function kt(e, t, n = {}) {
97
+ function St(e, t, n = {}) {
98
98
  const {
99
- window: o = ne,
100
- document: i = o == null ? void 0 : o.document,
101
- flush: c = "sync"
99
+ window: l = oe,
100
+ document: r = l == null ? void 0 : l.document,
101
+ flush: u = "sync"
102
102
  } = n;
103
- if (!o || !i)
104
- return bt;
105
- let l;
106
- const a = (s) => {
107
- l == null || l(), l = s;
108
- }, u = it(() => {
109
- const s = ee(e);
110
- if (s) {
111
- const { stop: v } = It(
112
- i,
103
+ if (!l || !r)
104
+ return Ct;
105
+ let i;
106
+ const o = (c) => {
107
+ i == null || i(), i = c;
108
+ }, s = ut(() => {
109
+ const c = te(e);
110
+ if (c) {
111
+ const { stop: d } = Mt(
112
+ r,
113
113
  (m) => {
114
- m.map((y) => [...y.removedNodes]).flat().some((y) => y === s || y.contains(s)) && t(m);
114
+ m.map((g) => [...g.removedNodes]).flat().some((g) => g === c || g.contains(c)) && t(m);
115
115
  },
116
116
  {
117
- window: o,
117
+ window: l,
118
118
  childList: !0,
119
119
  subtree: !0
120
120
  }
121
121
  );
122
- a(v);
122
+ o(d);
123
123
  }
124
- }, { flush: c }), r = () => {
125
- u(), a();
124
+ }, { flush: u }), a = () => {
125
+ s(), o();
126
126
  };
127
- return $e(r), r;
127
+ return $e(a), a;
128
128
  }
129
- function Mt(e = {}) {
129
+ function $t(e = {}) {
130
130
  var t;
131
131
  const {
132
- window: n = ne,
133
- deep: o = !0,
134
- triggerOnRemoval: i = !1
135
- } = e, c = (t = e.document) != null ? t : n == null ? void 0 : n.document, l = () => {
136
- var r;
137
- let s = c == null ? void 0 : c.activeElement;
138
- if (o)
139
- for (; s != null && s.shadowRoot; )
140
- s = (r = s == null ? void 0 : s.shadowRoot) == null ? void 0 : r.activeElement;
141
- return s;
142
- }, a = W(), u = () => {
143
- a.value = l();
132
+ window: n = oe,
133
+ deep: l = !0,
134
+ triggerOnRemoval: r = !1
135
+ } = e, u = (t = e.document) != null ? t : n == null ? void 0 : n.document, i = () => {
136
+ var a;
137
+ let c = u == null ? void 0 : u.activeElement;
138
+ if (l)
139
+ for (; c != null && c.shadowRoot; )
140
+ c = (a = c == null ? void 0 : c.shadowRoot) == null ? void 0 : a.activeElement;
141
+ return c;
142
+ }, o = H(), s = () => {
143
+ o.value = i();
144
144
  };
145
145
  if (n) {
146
- const r = {
146
+ const a = {
147
147
  capture: !0,
148
148
  passive: !0
149
149
  };
150
150
  ce(
151
151
  n,
152
152
  "blur",
153
- (s) => {
154
- s.relatedTarget === null && u();
153
+ (c) => {
154
+ c.relatedTarget === null && s();
155
155
  },
156
- r
156
+ a
157
157
  ), ce(
158
158
  n,
159
159
  "focus",
160
- u,
161
- r
160
+ s,
161
+ a
162
162
  );
163
163
  }
164
- return i && kt(a, u, { document: c }), u(), a;
164
+ return r && St(o, s, { document: u }), s(), o;
165
165
  }
166
- const St = "focusin", $t = "focusout", At = ":focus-within";
167
- function Rt(e, t = {}) {
168
- const { window: n = ne } = t, o = I(() => ee(e)), i = W(!1), c = I(() => i.value), l = Mt(t);
169
- if (!n || !l.value)
170
- return { focused: c };
171
- const a = { passive: !0 };
172
- return ce(o, St, () => i.value = !0, a), ce(o, $t, () => {
173
- var u, r, s;
174
- return i.value = (s = (r = (u = o.value) == null ? void 0 : u.matches) == null ? void 0 : r.call(u, At)) != null ? s : !1;
175
- }, a), { focused: c };
166
+ const At = "focusin", Tt = "focusout", Rt = ":focus-within";
167
+ function Ot(e, t = {}) {
168
+ const { window: n = oe } = t, l = k(() => te(e)), r = H(!1), u = k(() => r.value), i = $t(t);
169
+ if (!n || !i.value)
170
+ return { focused: u };
171
+ const o = { passive: !0 };
172
+ return ce(l, At, () => r.value = !0, o), ce(l, Tt, () => {
173
+ var s, a, c;
174
+ return r.value = (c = (a = (s = l.value) == null ? void 0 : s.matches) == null ? void 0 : a.call(s, Rt)) != null ? c : !1;
175
+ }, o), { focused: u };
176
176
  }
177
- function Tt(e, { window: t = ne, scrollTarget: n } = {}) {
178
- const o = P(!1), i = () => {
177
+ function Pt(e, { window: t = oe, scrollTarget: n } = {}) {
178
+ const l = P(!1), r = () => {
179
179
  if (!t) return;
180
- const c = t.document, l = ee(e);
181
- if (!l)
182
- o.value = !1;
180
+ const u = t.document, i = te(e);
181
+ if (!i)
182
+ l.value = !1;
183
183
  else {
184
- const a = l.getBoundingClientRect();
185
- o.value = a.top <= (t.innerHeight || c.documentElement.clientHeight) && a.left <= (t.innerWidth || c.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0;
184
+ const o = i.getBoundingClientRect();
185
+ l.value = o.top <= (t.innerHeight || u.documentElement.clientHeight) && o.left <= (t.innerWidth || u.documentElement.clientWidth) && o.bottom >= 0 && o.right >= 0;
186
186
  }
187
187
  };
188
- return B(
189
- () => ee(e),
190
- () => i(),
188
+ return N(
189
+ () => te(e),
190
+ () => r(),
191
191
  { immediate: !0, flush: "post" }
192
- ), t && ce(n || t, "scroll", i, {
192
+ ), t && ce(n || t, "scroll", r, {
193
193
  capture: !1,
194
194
  passive: !0
195
- }), o;
195
+ }), l;
196
196
  }
197
- const V = (e) => {
198
- let t = Tt(e).value;
197
+ const F = (e) => {
198
+ let t = Pt(e).value;
199
199
  return t = t && e.offsetHeight > 0, t;
200
- }, G = (e) => e.tabIndex >= 0, Be = (e) => {
200
+ }, j = (e) => e.tabIndex >= 0, Ne = (e) => {
201
201
  const t = e.target;
202
202
  return Ae(t);
203
203
  }, Ae = (e) => {
204
204
  var t;
205
205
  let n;
206
206
  if (e instanceof HTMLTableCellElement) {
207
- const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
208
- if (o) {
209
- const i = Array.from(o.children)[e.cellIndex];
210
- i && (n = i);
207
+ const l = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
208
+ if (l) {
209
+ const r = Array.from(l.children)[e.cellIndex];
210
+ r && (n = r);
211
211
  }
212
212
  } else if (e instanceof HTMLTableRowElement) {
213
- const o = e.previousElementSibling;
214
- o && (n = o);
213
+ const l = e.previousElementSibling;
214
+ l && (n = l);
215
215
  }
216
- return n && (!G(n) || !V(n)) ? Ae(n) : n;
217
- }, Ot = (e) => {
216
+ return n && (!j(n) || !F(n)) ? Ae(n) : n;
217
+ }, Lt = (e) => {
218
218
  var t;
219
219
  const n = e.target;
220
- let o;
220
+ let l;
221
221
  if (n instanceof HTMLTableCellElement) {
222
- const i = (t = n.parentElement) == null ? void 0 : t.parentElement;
223
- if (i) {
224
- const c = i.firstElementChild, l = c == null ? void 0 : c.children[n.cellIndex];
225
- l && (o = l);
222
+ const r = (t = n.parentElement) == null ? void 0 : t.parentElement;
223
+ if (r) {
224
+ const u = r.firstElementChild, i = u == null ? void 0 : u.children[n.cellIndex];
225
+ i && (l = i);
226
226
  }
227
227
  } else if (n instanceof HTMLTableRowElement) {
228
- const i = n.parentElement;
229
- if (i) {
230
- const c = i.firstElementChild;
231
- c && (o = c);
228
+ const r = n.parentElement;
229
+ if (r) {
230
+ const u = r.firstElementChild;
231
+ u && (l = u);
232
232
  }
233
233
  }
234
- return o && (!G(o) || !V(o)) ? Re(o) : o;
234
+ return l && (!j(l) || !F(l)) ? Te(l) : l;
235
235
  }, Xe = (e) => {
236
236
  const t = e.target;
237
- return Re(t);
238
- }, Re = (e) => {
237
+ return Te(t);
238
+ }, Te = (e) => {
239
239
  var t;
240
240
  let n;
241
241
  if (e instanceof HTMLTableCellElement) {
242
- const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
243
- if (o) {
244
- const i = Array.from(o.children)[e.cellIndex];
245
- i && (n = i);
242
+ const l = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
243
+ if (l) {
244
+ const r = Array.from(l.children)[e.cellIndex];
245
+ r && (n = r);
246
246
  }
247
247
  } else if (e instanceof HTMLTableRowElement) {
248
- const o = e.nextElementSibling;
249
- o && (n = o);
248
+ const l = e.nextElementSibling;
249
+ l && (n = l);
250
250
  }
251
- return n && (!G(n) || !V(n)) ? Re(n) : n;
252
- }, Pt = (e) => {
251
+ return n && (!j(n) || !F(n)) ? Te(n) : n;
252
+ }, Dt = (e) => {
253
253
  var t;
254
254
  const n = e.target;
255
- let o;
255
+ let l;
256
256
  if (n instanceof HTMLTableCellElement) {
257
- const i = (t = n.parentElement) == null ? void 0 : t.parentElement;
258
- if (i) {
259
- const c = i.lastElementChild, l = c == null ? void 0 : c.children[n.cellIndex];
260
- l && (o = l);
257
+ const r = (t = n.parentElement) == null ? void 0 : t.parentElement;
258
+ if (r) {
259
+ const u = r.lastElementChild, i = u == null ? void 0 : u.children[n.cellIndex];
260
+ i && (l = i);
261
261
  }
262
262
  } else if (n instanceof HTMLTableRowElement) {
263
- const i = n.parentElement;
264
- if (i) {
265
- const c = i.lastElementChild;
266
- c && (o = c);
263
+ const r = n.parentElement;
264
+ if (r) {
265
+ const u = r.lastElementChild;
266
+ u && (l = u);
267
267
  }
268
268
  }
269
- return o && (!G(o) || !V(o)) ? Ae(o) : o;
270
- }, Ne = (e) => {
269
+ return l && (!j(l) || !F(l)) ? Ae(l) : l;
270
+ }, Ve = (e) => {
271
271
  const t = e.target;
272
- return Te(t);
273
- }, Te = (e) => {
272
+ return Re(t);
273
+ }, Re = (e) => {
274
274
  var t;
275
275
  let n;
276
276
  if (e.previousElementSibling)
277
277
  n = e.previousElementSibling;
278
278
  else {
279
- const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
280
- n = o == null ? void 0 : o.lastElementChild;
279
+ const l = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
280
+ n = l == null ? void 0 : l.lastElementChild;
281
281
  }
282
- return n && (!G(n) || !V(n)) ? Te(n) : n;
283
- }, Ve = (e) => {
282
+ return n && (!j(n) || !F(n)) ? Re(n) : n;
283
+ }, Ge = (e) => {
284
284
  const t = e.target;
285
285
  return Oe(t);
286
286
  }, Oe = (e) => {
@@ -289,24 +289,24 @@ const V = (e) => {
289
289
  if (e.nextElementSibling)
290
290
  n = e.nextElementSibling;
291
291
  else {
292
- const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
293
- n = o == null ? void 0 : o.firstElementChild;
292
+ const l = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
293
+ n = l == null ? void 0 : l.firstElementChild;
294
294
  }
295
- return n && (!G(n) || !V(n)) ? Oe(n) : n;
296
- }, Ge = (e) => {
297
- const t = e.target.parentElement, n = t == null ? void 0 : t.firstElementChild;
298
- return n && (!G(n) || !V(n)) ? Oe(n) : n;
295
+ return n && (!j(n) || !F(n)) ? Oe(n) : n;
299
296
  }, Fe = (e) => {
297
+ const t = e.target.parentElement, n = t == null ? void 0 : t.firstElementChild;
298
+ return n && (!j(n) || !F(n)) ? Oe(n) : n;
299
+ }, je = (e) => {
300
300
  const t = e.target.parentElement, n = t == null ? void 0 : t.lastElementChild;
301
- return n && (!G(n) || !V(n)) ? Te(n) : n;
302
- }, de = ["alt", "control", "shift", "meta"], Lt = {
301
+ return n && (!j(n) || !F(n)) ? Re(n) : n;
302
+ }, de = ["alt", "control", "shift", "meta"], Wt = {
303
303
  ArrowUp: "up",
304
304
  ArrowDown: "down",
305
305
  ArrowLeft: "left",
306
306
  ArrowRight: "right"
307
307
  }, Pe = {
308
308
  "keydown.up": (e) => {
309
- const t = Be(e);
309
+ const t = Ne(e);
310
310
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
311
311
  },
312
312
  "keydown.down": (e) => {
@@ -314,31 +314,31 @@ const V = (e) => {
314
314
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
315
315
  },
316
316
  "keydown.left": (e) => {
317
- const t = Ne(e);
317
+ const t = Ve(e);
318
318
  e.preventDefault(), e.stopPropagation(), t && t.focus();
319
319
  },
320
320
  "keydown.right": (e) => {
321
- const t = Ve(e);
321
+ const t = Ge(e);
322
322
  e.preventDefault(), e.stopPropagation(), t && t.focus();
323
323
  },
324
324
  "keydown.control.up": (e) => {
325
- const t = Ot(e);
325
+ const t = Lt(e);
326
326
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
327
327
  },
328
328
  "keydown.control.down": (e) => {
329
- const t = Pt(e);
329
+ const t = Dt(e);
330
330
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
331
331
  },
332
332
  "keydown.control.left": (e) => {
333
- const t = Ge(e);
333
+ const t = Fe(e);
334
334
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
335
335
  },
336
336
  "keydown.control.right": (e) => {
337
- const t = Fe(e);
337
+ const t = je(e);
338
338
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
339
339
  },
340
340
  "keydown.end": (e) => {
341
- const t = Fe(e);
341
+ const t = je(e);
342
342
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
343
343
  },
344
344
  "keydown.enter": (e) => {
@@ -351,141 +351,172 @@ const V = (e) => {
351
351
  "keydown.shift.enter": (e) => {
352
352
  if (e.target instanceof HTMLTableCellElement) {
353
353
  e.preventDefault(), e.stopPropagation();
354
- const t = Be(e);
354
+ const t = Ne(e);
355
355
  t && t.focus();
356
356
  }
357
357
  },
358
358
  "keydown.home": (e) => {
359
- const t = Ge(e);
359
+ const t = Fe(e);
360
360
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
361
361
  },
362
362
  "keydown.tab": (e) => {
363
- const t = Ve(e);
363
+ const t = Ge(e);
364
364
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
365
365
  },
366
366
  "keydown.shift.tab": (e) => {
367
- const t = Ne(e);
367
+ const t = Ve(e);
368
368
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
369
369
  }
370
370
  };
371
371
  function Le(e) {
372
- const t = (l) => {
373
- let a = null;
374
- return l.parent && (typeof l.parent == "string" ? a = document.querySelector(l.parent) : l.parent instanceof HTMLElement ? a = l.parent : a = l.parent.value), a;
375
- }, n = (l) => {
376
- var a;
377
- const u = t(l);
378
- let r = [];
379
- if (typeof l.selectors == "string")
380
- r = u ? Array.from(u.querySelectorAll(l.selectors)) : Array.from(document.querySelectorAll(l.selectors));
381
- else if (Array.isArray(l.selectors))
382
- for (const s of l.selectors)
383
- s instanceof HTMLElement ? r.push(s) : r.push(s.$el);
384
- else if (l.selectors instanceof HTMLElement)
385
- r.push(l.selectors);
386
- else if ((a = l.selectors) != null && a.value)
387
- if (Array.isArray(l.selectors.value))
388
- for (const s of l.selectors.value)
389
- s instanceof HTMLElement ? r.push(s) : r.push(s.$el);
372
+ const t = (i) => {
373
+ let o = null;
374
+ return i.parent && (typeof i.parent == "string" ? o = document.querySelector(i.parent) : i.parent instanceof HTMLElement ? o = i.parent : o = i.parent.value), o;
375
+ }, n = (i) => {
376
+ var o;
377
+ const s = t(i);
378
+ let a = [];
379
+ if (typeof i.selectors == "string")
380
+ a = s ? Array.from(s.querySelectorAll(i.selectors)) : Array.from(document.querySelectorAll(i.selectors));
381
+ else if (Array.isArray(i.selectors))
382
+ for (const c of i.selectors)
383
+ c instanceof HTMLElement ? a.push(c) : a.push(c.$el);
384
+ else if (i.selectors instanceof HTMLElement)
385
+ a.push(i.selectors);
386
+ else if ((o = i.selectors) != null && o.value)
387
+ if (Array.isArray(i.selectors.value))
388
+ for (const c of i.selectors.value)
389
+ c instanceof HTMLElement ? a.push(c) : a.push(c.$el);
390
390
  else
391
- r.push(l.selectors.value);
392
- return r;
393
- }, o = (l) => {
394
- const a = t(l);
395
- let u = [];
396
- return l.selectors ? u = n(l) : a && (u = Array.from(a.children).filter((r) => G(r) && V(r))), u;
397
- }, i = (l) => (a) => {
398
- const u = Lt[a.key] || a.key.toLowerCase();
399
- if (de.includes(u)) return;
400
- const r = l.handlers || Pe;
401
- for (const s of Object.keys(r)) {
402
- const [v, ...m] = s.split(".");
403
- if (v === "keydown" && m.includes(u)) {
404
- const y = r[s], h = m.filter((f) => de.includes(f)), x = de.some((f) => {
405
- const d = f.charAt(0).toUpperCase() + f.slice(1);
406
- return a.getModifierState(d);
391
+ a.push(i.selectors.value);
392
+ return a;
393
+ }, l = (i) => {
394
+ const o = t(i);
395
+ let s = [];
396
+ return i.selectors ? s = n(i) : o && (s = Array.from(o.children).filter((a) => j(a) && F(a))), s;
397
+ }, r = (i) => (o) => {
398
+ const s = Wt[o.key] || o.key.toLowerCase();
399
+ if (de.includes(s)) return;
400
+ const a = i.handlers || Pe;
401
+ for (const c of Object.keys(a)) {
402
+ const [d, ...m] = c.split(".");
403
+ if (d === "keydown" && m.includes(s)) {
404
+ const g = a[c], b = m.filter((f) => de.includes(f)), w = de.some((f) => {
405
+ const v = f.charAt(0).toUpperCase() + f.slice(1);
406
+ return o.getModifierState(v);
407
407
  });
408
- if (h.length > 0) {
409
- if (x) {
408
+ if (b.length > 0) {
409
+ if (w) {
410
410
  for (const f of de)
411
411
  if (m.includes(f)) {
412
- const d = f.charAt(0).toUpperCase() + f.slice(1);
413
- a.getModifierState(d) && y(a);
412
+ const v = f.charAt(0).toUpperCase() + f.slice(1);
413
+ o.getModifierState(v) && g(o);
414
414
  }
415
415
  }
416
416
  } else
417
- x || y(a);
417
+ w || g(o);
418
418
  }
419
419
  }
420
- }, c = [];
421
- Q(() => {
422
- for (const l of e) {
423
- const a = t(l), u = o(l), r = i(l), s = a ? [a] : u;
424
- for (const v of s) {
425
- const { focused: m } = Rt(P(v)), y = B(m, (h) => {
426
- h ? v.addEventListener("keydown", r) : v.removeEventListener("keydown", r);
420
+ }, u = [];
421
+ Z(() => {
422
+ for (const i of e) {
423
+ const o = t(i), s = l(i), a = r(i), c = o ? [o] : s;
424
+ for (const d of c) {
425
+ const { focused: m } = Ot(P(d)), g = N(m, (b) => {
426
+ b ? d.addEventListener("keydown", a) : d.removeEventListener("keydown", a);
427
427
  });
428
- c.push(y);
428
+ u.push(g);
429
429
  }
430
430
  }
431
- }), rt(() => {
432
- for (const l of c)
433
- l();
431
+ }), it(() => {
432
+ for (const i of u)
433
+ i();
434
434
  });
435
435
  }
436
- function oe(e) {
437
- return qe() ? (Je(e), !0) : !1;
436
+ function le(e) {
437
+ return Je() ? (Qe(e), !0) : !1;
438
438
  }
439
439
  const we = typeof window < "u" && typeof document < "u";
440
440
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
441
- const Dt = (e) => e != null, Wt = Object.prototype.toString, _e = (e) => Wt.call(e) === "[object Object]", U = () => {
442
- }, Me = /* @__PURE__ */ Ht();
443
- function Ht() {
441
+ const Ht = (e) => e != null, zt = Object.prototype.toString, et = (e) => zt.call(e) === "[object Object]", V = () => {
442
+ }, Me = /* @__PURE__ */ Bt();
443
+ function Bt() {
444
444
  var e, t;
445
445
  return we && ((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));
446
446
  }
447
- function zt(...e) {
447
+ function Nt(...e) {
448
448
  if (e.length !== 1)
449
- return dt(...e);
449
+ return ft(...e);
450
450
  const t = e[0];
451
- return typeof t == "function" ? ft(Ze(() => ({ get: t, set: U }))) : P(t);
451
+ return typeof t == "function" ? vt(Ke(() => ({ get: t, set: V }))) : P(t);
452
452
  }
453
- function J(e) {
453
+ function Xt(e, t) {
454
+ function n(...l) {
455
+ return new Promise((r, u) => {
456
+ Promise.resolve(e(() => t.apply(this, l), { fn: t, thisArg: this, args: l })).then(r).catch(u);
457
+ });
458
+ }
459
+ return n;
460
+ }
461
+ function Vt(e, t = {}) {
462
+ let n, l, r = V;
463
+ const u = (s) => {
464
+ clearTimeout(s), r(), r = V;
465
+ };
466
+ let i;
467
+ return (s) => {
468
+ const a = E(e), c = E(t.maxWait);
469
+ return n && u(n), a <= 0 || c !== void 0 && c <= 0 ? (l && (u(l), l = void 0), Promise.resolve(s())) : new Promise((d, m) => {
470
+ r = t.rejectOnCancel ? m : d, i = s, c && !l && (l = setTimeout(() => {
471
+ n && u(n), l = void 0, d(i());
472
+ }, c)), n = setTimeout(() => {
473
+ l && u(l), l = void 0, d(s());
474
+ }, a);
475
+ });
476
+ };
477
+ }
478
+ function Q(e) {
454
479
  return Array.isArray(e) ? e : [e];
455
480
  }
456
- function Bt(e) {
457
- return pe();
481
+ function Gt(e) {
482
+ return ge();
483
+ }
484
+ function Ft(e, t = 200, n = {}) {
485
+ return Xt(
486
+ Vt(t, n),
487
+ e
488
+ );
458
489
  }
459
- function Xt(e, t = {}) {
460
- if (!ut(e))
461
- return ct(e);
490
+ function jt(e, t = {}) {
491
+ if (!ct(e))
492
+ return dt(e);
462
493
  const n = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
463
- for (const o in e.value)
464
- n[o] = Ze(() => ({
494
+ for (const l in e.value)
495
+ n[l] = Ke(() => ({
465
496
  get() {
466
- return e.value[o];
497
+ return e.value[l];
467
498
  },
468
- set(i) {
469
- var c;
470
- if ((c = E(t.replaceRef)) != null ? c : !0)
499
+ set(r) {
500
+ var u;
501
+ if ((u = E(t.replaceRef)) != null ? u : !0)
471
502
  if (Array.isArray(e.value)) {
472
- const a = [...e.value];
473
- a[o] = i, e.value = a;
503
+ const o = [...e.value];
504
+ o[l] = r, e.value = o;
474
505
  } else {
475
- const a = { ...e.value, [o]: i };
476
- Object.setPrototypeOf(a, Object.getPrototypeOf(e.value)), e.value = a;
506
+ const o = { ...e.value, [l]: r };
507
+ Object.setPrototypeOf(o, Object.getPrototypeOf(e.value)), e.value = o;
477
508
  }
478
509
  else
479
- e.value[o] = i;
510
+ e.value[l] = r;
480
511
  }
481
512
  }));
482
513
  return n;
483
514
  }
484
- function Nt(e, t = !0, n) {
485
- Bt() ? Q(e, n) : t ? e() : Qe(e);
515
+ function Ut(e, t = !0, n) {
516
+ Gt() ? Z(e, n) : t ? e() : Ze(e);
486
517
  }
487
- function et(e, t, n) {
488
- return B(
518
+ function tt(e, t, n) {
519
+ return N(
489
520
  e,
490
521
  t,
491
522
  {
@@ -495,205 +526,205 @@ function et(e, t, n) {
495
526
  );
496
527
  }
497
528
  const ye = we ? window : void 0;
498
- function te(e) {
529
+ function ne(e) {
499
530
  var t;
500
531
  const n = E(e);
501
532
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
502
533
  }
503
534
  function ue(...e) {
504
535
  const t = [], n = () => {
505
- t.forEach((a) => a()), t.length = 0;
506
- }, o = (a, u, r, s) => (a.addEventListener(u, r, s), () => a.removeEventListener(u, r, s)), i = I(() => {
507
- const a = J(E(e[0])).filter((u) => u != null);
508
- return a.every((u) => typeof u != "string") ? a : void 0;
509
- }), c = et(
536
+ t.forEach((o) => o()), t.length = 0;
537
+ }, l = (o, s, a, c) => (o.addEventListener(s, a, c), () => o.removeEventListener(s, a, c)), r = k(() => {
538
+ const o = Q(E(e[0])).filter((s) => s != null);
539
+ return o.every((s) => typeof s != "string") ? o : void 0;
540
+ }), u = tt(
510
541
  () => {
511
- var a, u;
542
+ var o, s;
512
543
  return [
513
- (u = (a = i.value) == null ? void 0 : a.map((r) => te(r))) != null ? u : [ye].filter((r) => r != null),
514
- J(E(i.value ? e[1] : e[0])),
515
- J(b(i.value ? e[2] : e[1])),
544
+ (s = (o = r.value) == null ? void 0 : o.map((a) => ne(a))) != null ? s : [ye].filter((a) => a != null),
545
+ Q(E(r.value ? e[1] : e[0])),
546
+ Q(x(r.value ? e[2] : e[1])),
516
547
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
517
- E(i.value ? e[3] : e[2])
548
+ E(r.value ? e[3] : e[2])
518
549
  ];
519
550
  },
520
- ([a, u, r, s]) => {
521
- if (n(), !(a != null && a.length) || !(u != null && u.length) || !(r != null && r.length))
551
+ ([o, s, a, c]) => {
552
+ if (n(), !(o != null && o.length) || !(s != null && s.length) || !(a != null && a.length))
522
553
  return;
523
- const v = _e(s) ? { ...s } : s;
554
+ const d = et(c) ? { ...c } : c;
524
555
  t.push(
525
- ...a.flatMap(
526
- (m) => u.flatMap(
527
- (y) => r.map((h) => o(m, y, h, v))
556
+ ...o.flatMap(
557
+ (m) => s.flatMap(
558
+ (g) => a.map((b) => l(m, g, b, d))
528
559
  )
529
560
  )
530
561
  );
531
562
  },
532
563
  { flush: "post" }
533
- ), l = () => {
534
- c(), n();
564
+ ), i = () => {
565
+ u(), n();
535
566
  };
536
- return oe(n), l;
567
+ return le(n), i;
537
568
  }
538
- function Vt() {
539
- const e = W(!1), t = pe();
540
- return t && Q(() => {
569
+ function qt() {
570
+ const e = H(!1), t = ge();
571
+ return t && Z(() => {
541
572
  e.value = !0;
542
573
  }, t), e;
543
574
  }
544
- function tt(e) {
545
- const t = Vt();
546
- return I(() => (t.value, !!e()));
575
+ function nt(e) {
576
+ const t = qt();
577
+ return k(() => (t.value, !!e()));
547
578
  }
548
- function nt(e, t, n = {}) {
549
- const { window: o = ye, ...i } = n;
550
- let c;
551
- const l = tt(() => o && "MutationObserver" in o), a = () => {
552
- c && (c.disconnect(), c = void 0);
553
- }, u = I(() => {
554
- const m = E(e), y = J(m).map(te).filter(Dt);
555
- return new Set(y);
556
- }), r = B(
557
- () => u.value,
579
+ function ot(e, t, n = {}) {
580
+ const { window: l = ye, ...r } = n;
581
+ let u;
582
+ const i = nt(() => l && "MutationObserver" in l), o = () => {
583
+ u && (u.disconnect(), u = void 0);
584
+ }, s = k(() => {
585
+ const m = E(e), g = Q(m).map(ne).filter(Ht);
586
+ return new Set(g);
587
+ }), a = N(
588
+ () => s.value,
558
589
  (m) => {
559
- a(), l.value && m.size && (c = new MutationObserver(t), m.forEach((y) => c.observe(y, i)));
590
+ o(), i.value && m.size && (u = new MutationObserver(t), m.forEach((g) => u.observe(g, r)));
560
591
  },
561
592
  { immediate: !0, flush: "post" }
562
- ), s = () => c == null ? void 0 : c.takeRecords(), v = () => {
563
- r(), a();
593
+ ), c = () => u == null ? void 0 : u.takeRecords(), d = () => {
594
+ a(), o();
564
595
  };
565
- return oe(v), {
566
- isSupported: l,
567
- stop: v,
568
- takeRecords: s
596
+ return le(d), {
597
+ isSupported: i,
598
+ stop: d,
599
+ takeRecords: c
569
600
  };
570
601
  }
571
602
  function xe(e, t = {}) {
572
603
  var n;
573
604
  const {
574
- pointerTypes: o,
575
- preventDefault: i,
576
- stopPropagation: c,
577
- exact: l,
578
- onMove: a,
579
- onEnd: u,
580
- onStart: r,
581
- initialValue: s,
582
- axis: v = "both",
605
+ pointerTypes: l,
606
+ preventDefault: r,
607
+ stopPropagation: u,
608
+ exact: i,
609
+ onMove: o,
610
+ onEnd: s,
611
+ onStart: a,
612
+ initialValue: c,
613
+ axis: d = "both",
583
614
  draggingElement: m = ye,
584
- containerElement: y,
585
- handle: h = e,
586
- buttons: x = [0]
615
+ containerElement: g,
616
+ handle: b = e,
617
+ buttons: w = [0]
587
618
  } = t, f = P(
588
- (n = E(s)) != null ? n : { x: 0, y: 0 }
589
- ), d = P(), p = (C) => o ? o.includes(C.pointerType) : !0, M = (C) => {
590
- E(i) && C.preventDefault(), E(c) && C.stopPropagation();
591
- }, $ = (C) => {
619
+ (n = E(c)) != null ? n : { x: 0, y: 0 }
620
+ ), v = P(), h = (I) => l ? l.includes(I.pointerType) : !0, C = (I) => {
621
+ E(r) && I.preventDefault(), E(u) && I.stopPropagation();
622
+ }, M = (I) => {
592
623
  var T;
593
- if (!E(x).includes(C.button) || E(t.disabled) || !p(C) || E(l) && C.target !== E(e))
624
+ if (!E(w).includes(I.button) || E(t.disabled) || !h(I) || E(i) && I.target !== E(e))
594
625
  return;
595
- const H = E(y), F = (T = H == null ? void 0 : H.getBoundingClientRect) == null ? void 0 : T.call(H), X = E(e).getBoundingClientRect(), be = {
596
- x: C.clientX - (H ? X.left - F.left + H.scrollLeft : X.left),
597
- y: C.clientY - (H ? X.top - F.top + H.scrollTop : X.top)
626
+ const z = E(g), U = (T = z == null ? void 0 : z.getBoundingClientRect) == null ? void 0 : T.call(z), X = E(e).getBoundingClientRect(), be = {
627
+ x: I.clientX - (z ? X.left - U.left + z.scrollLeft : X.left),
628
+ y: I.clientY - (z ? X.top - U.top + z.scrollTop : X.top)
598
629
  };
599
- (r == null ? void 0 : r(be, C)) !== !1 && (d.value = be, M(C));
600
- }, k = (C) => {
601
- if (E(t.disabled) || !p(C) || !d.value)
630
+ (a == null ? void 0 : a(be, I)) !== !1 && (v.value = be, C(I));
631
+ }, L = (I) => {
632
+ if (E(t.disabled) || !h(I) || !v.value)
602
633
  return;
603
- const T = E(y), H = E(e).getBoundingClientRect();
604
- let { x: F, y: X } = f.value;
605
- (v === "x" || v === "both") && (F = C.clientX - d.value.x, T && (F = Math.min(Math.max(0, F), T.scrollWidth - H.width))), (v === "y" || v === "both") && (X = C.clientY - d.value.y, T && (X = Math.min(Math.max(0, X), T.scrollHeight - H.height))), f.value = {
606
- x: F,
634
+ const T = E(g), z = E(e).getBoundingClientRect();
635
+ let { x: U, y: X } = f.value;
636
+ (d === "x" || d === "both") && (U = I.clientX - v.value.x, T && (U = Math.min(Math.max(0, U), T.scrollWidth - z.width))), (d === "y" || d === "both") && (X = I.clientY - v.value.y, T && (X = Math.min(Math.max(0, X), T.scrollHeight - z.height))), f.value = {
637
+ x: U,
607
638
  y: X
608
- }, a == null || a(f.value, C), M(C);
609
- }, ae = (C) => {
610
- E(t.disabled) || !p(C) || d.value && (d.value = void 0, u == null || u(f.value, C), M(C));
639
+ }, o == null || o(f.value, I), C(I);
640
+ }, O = (I) => {
641
+ E(t.disabled) || !h(I) || v.value && (v.value = void 0, s == null || s(f.value, I), C(I));
611
642
  };
612
643
  if (we) {
613
- const C = () => {
644
+ const I = () => {
614
645
  var T;
615
646
  return {
616
647
  capture: (T = t.capture) != null ? T : !0,
617
- passive: !E(i)
648
+ passive: !E(r)
618
649
  };
619
650
  };
620
- ue(h, "pointerdown", $, C), ue(m, "pointermove", k, C), ue(m, "pointerup", ae, C);
651
+ ue(b, "pointerdown", M, I), ue(m, "pointermove", L, I), ue(m, "pointerup", O, I);
621
652
  }
622
653
  return {
623
- ...Xt(f),
654
+ ...jt(f),
624
655
  position: f,
625
- isDragging: I(() => !!d.value),
626
- style: I(
656
+ isDragging: k(() => !!v.value),
657
+ style: k(
627
658
  () => `left:${f.value.x}px;top:${f.value.y}px;`
628
659
  )
629
660
  };
630
661
  }
631
- function Gt(e, t, n = {}) {
632
- const { window: o = ye, ...i } = n;
633
- let c;
634
- const l = tt(() => o && "ResizeObserver" in o), a = () => {
635
- c && (c.disconnect(), c = void 0);
636
- }, u = I(() => {
637
- const v = E(e);
638
- return Array.isArray(v) ? v.map((m) => te(m)) : [te(v)];
639
- }), r = B(
640
- u,
641
- (v) => {
642
- if (a(), l.value && o) {
643
- c = new ResizeObserver(t);
644
- for (const m of v)
645
- m && c.observe(m, i);
662
+ function Yt(e, t, n = {}) {
663
+ const { window: l = ye, ...r } = n;
664
+ let u;
665
+ const i = nt(() => l && "ResizeObserver" in l), o = () => {
666
+ u && (u.disconnect(), u = void 0);
667
+ }, s = k(() => {
668
+ const d = E(e);
669
+ return Array.isArray(d) ? d.map((m) => ne(m)) : [ne(d)];
670
+ }), a = N(
671
+ s,
672
+ (d) => {
673
+ if (o(), i.value && l) {
674
+ u = new ResizeObserver(t);
675
+ for (const m of d)
676
+ m && u.observe(m, r);
646
677
  }
647
678
  },
648
679
  { immediate: !0, flush: "post" }
649
- ), s = () => {
650
- a(), r();
680
+ ), c = () => {
681
+ o(), a();
651
682
  };
652
- return oe(s), {
653
- isSupported: l,
654
- stop: s
683
+ return le(c), {
684
+ isSupported: i,
685
+ stop: c
655
686
  };
656
687
  }
657
- function ge(e, t = {}) {
688
+ function pe(e, t = {}) {
658
689
  const {
659
690
  reset: n = !0,
660
- windowResize: o = !0,
661
- windowScroll: i = !0,
662
- immediate: c = !0,
663
- updateTiming: l = "sync"
664
- } = t, a = W(0), u = W(0), r = W(0), s = W(0), v = W(0), m = W(0), y = W(0), h = W(0);
665
- function x() {
666
- const d = te(e);
667
- if (!d) {
668
- n && (a.value = 0, u.value = 0, r.value = 0, s.value = 0, v.value = 0, m.value = 0, y.value = 0, h.value = 0);
691
+ windowResize: l = !0,
692
+ windowScroll: r = !0,
693
+ immediate: u = !0,
694
+ updateTiming: i = "sync"
695
+ } = t, o = H(0), s = H(0), a = H(0), c = H(0), d = H(0), m = H(0), g = H(0), b = H(0);
696
+ function w() {
697
+ const v = ne(e);
698
+ if (!v) {
699
+ n && (o.value = 0, s.value = 0, a.value = 0, c.value = 0, d.value = 0, m.value = 0, g.value = 0, b.value = 0);
669
700
  return;
670
701
  }
671
- const p = d.getBoundingClientRect();
672
- a.value = p.height, u.value = p.bottom, r.value = p.left, s.value = p.right, v.value = p.top, m.value = p.width, y.value = p.x, h.value = p.y;
702
+ const h = v.getBoundingClientRect();
703
+ o.value = h.height, s.value = h.bottom, a.value = h.left, c.value = h.right, d.value = h.top, m.value = h.width, g.value = h.x, b.value = h.y;
673
704
  }
674
705
  function f() {
675
- l === "sync" ? x() : l === "next-frame" && requestAnimationFrame(() => x());
706
+ i === "sync" ? w() : i === "next-frame" && requestAnimationFrame(() => w());
676
707
  }
677
- return Gt(e, f), B(() => te(e), (d) => !d && f()), nt(e, f, {
708
+ return Yt(e, f), N(() => ne(e), (v) => !v && f()), ot(e, f, {
678
709
  attributeFilter: ["style", "class"]
679
- }), i && ue("scroll", f, { capture: !0, passive: !0 }), o && ue("resize", f, { passive: !0 }), Nt(() => {
680
- c && f();
710
+ }), r && ue("scroll", f, { capture: !0, passive: !0 }), l && ue("resize", f, { passive: !0 }), Ut(() => {
711
+ u && f();
681
712
  }), {
682
- height: a,
683
- bottom: u,
684
- left: r,
685
- right: s,
686
- top: v,
713
+ height: o,
714
+ bottom: s,
715
+ left: a,
716
+ right: c,
717
+ top: d,
687
718
  width: m,
688
- x: y,
689
- y: h,
719
+ x: g,
720
+ y: b,
690
721
  update: f
691
722
  };
692
723
  }
693
- const Ft = (e) => {
724
+ const Jt = (e) => {
694
725
  const t = new DOMParser().parseFromString(e, "text/html");
695
726
  return Array.from(t.body.childNodes).some((n) => n.nodeType === 1);
696
- }, jt = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), Ut = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], Yt = ["innerHTML"], qt = { key: 2 }, Jt = /* @__PURE__ */ Z({
727
+ }, Qt = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), Zt = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], Kt = ["innerHTML"], _t = { key: 2 }, en = /* @__PURE__ */ K({
697
728
  __name: "ACell",
698
729
  props: {
699
730
  colIndex: {},
@@ -701,78 +732,80 @@ const Ft = (e) => {
701
732
  store: {},
702
733
  addNavigation: { type: [Boolean, Object], default: !0 },
703
734
  tabIndex: { default: 0 },
704
- pinned: { type: Boolean, default: !1 }
735
+ pinned: { type: Boolean, default: !1 },
736
+ debounce: { default: 300 }
705
737
  },
706
738
  setup(e, { expose: t }) {
707
- const n = N("cell"), o = e.store.getCellData(e.colIndex, e.rowIndex), i = P(""), c = P(!1), l = e.store.columns[e.colIndex], a = e.store.rows[e.rowIndex], u = l.align || "center", r = l.width || "40ch", s = I(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), v = I(() => typeof s.value == "string" ? Ft(s.value) : !1), m = I(() => {
708
- var d;
739
+ const n = G("cell"), l = e.store.getCellData(e.colIndex, e.rowIndex), r = P(""), u = P(!1), i = e.store.columns[e.colIndex], o = e.store.rows[e.rowIndex], s = i.align || "center", a = i.width || "40ch", c = k(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), d = k(() => typeof c.value == "string" ? Jt(c.value) : !1), m = k(() => {
740
+ var h;
709
741
  return {
710
- textAlign: u,
711
- width: r,
712
- fontWeight: c.value ? "bold" : "inherit",
713
- paddingLeft: e.store.getIndent(e.colIndex, (d = e.store.display[e.rowIndex]) == null ? void 0 : d.indent)
742
+ textAlign: s,
743
+ width: a,
744
+ fontWeight: u.value ? "bold" : "inherit",
745
+ paddingLeft: e.store.getIndent(e.colIndex, (h = e.store.display[e.rowIndex]) == null ? void 0 : h.indent)
714
746
  };
715
- }), y = I(() => ({
747
+ }), g = k(() => ({
716
748
  "sticky-column": e.pinned,
717
- "cell-modified": c.value
718
- })), h = () => {
719
- const { left: d, bottom: p, width: M, height: $ } = ge(n);
720
- l.mask, l.modalComponent && e.store.$patch((k) => {
721
- k.modal.visible = !0, k.modal.colIndex = e.colIndex, k.modal.rowIndex = e.rowIndex, k.modal.left = d, k.modal.bottom = p, k.modal.width = M, k.modal.height = $, k.modal.cell = n.value, typeof l.modalComponent == "function" ? k.modal.component = l.modalComponent({ table: k.table, row: a, column: l }) : k.modal.component = l.modalComponent, k.modal.componentProps = l.modalComponentExtraProps;
749
+ "cell-modified": u.value
750
+ })), b = () => {
751
+ const { left: h, bottom: C, width: M, height: L } = pe(n);
752
+ i.mask, i.modalComponent && e.store.$patch((O) => {
753
+ O.modal.visible = !0, O.modal.colIndex = e.colIndex, O.modal.rowIndex = e.rowIndex, O.modal.left = h, O.modal.bottom = C, O.modal.width = M, O.modal.height = L, O.modal.cell = n.value, typeof i.modalComponent == "function" ? O.modal.component = i.modalComponent({ table: O.table, row: o, column: i }) : O.modal.component = i.modalComponent, O.modal.componentProps = i.modalComponentExtraProps;
722
754
  });
723
755
  };
724
756
  if (e.addNavigation) {
725
- let d = {
757
+ let h = {
726
758
  ...Pe,
727
- "keydown.f2": h,
728
- "keydown.alt.up": h,
729
- "keydown.alt.down": h,
730
- "keydown.alt.left": h,
731
- "keydown.alt.right": h
759
+ "keydown.f2": b,
760
+ "keydown.alt.up": b,
761
+ "keydown.alt.down": b,
762
+ "keydown.alt.left": b,
763
+ "keydown.alt.right": b
732
764
  };
733
- typeof e.addNavigation == "object" && (d = {
734
- ...d,
765
+ typeof e.addNavigation == "object" && (h = {
766
+ ...h,
735
767
  ...e.addNavigation
736
768
  }), Le([
737
769
  {
738
770
  selectors: n,
739
- handlers: d
771
+ handlers: h
740
772
  }
741
773
  ]);
742
774
  }
743
- const x = () => {
744
- n.value && (i.value = n.value.textContent);
745
- }, f = (d) => {
746
- const p = d.target;
747
- p.textContent !== i.value && (i.value = p.textContent, l.format ? (c.value = p.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, o), e.store.setCellText(e.colIndex, e.rowIndex, p.textContent)) : (c.value = p.textContent !== o, e.store.setCellData(e.colIndex, e.rowIndex, p.textContent)));
748
- };
775
+ const w = () => {
776
+ n.value && (r.value = n.value.textContent);
777
+ }, f = (h) => {
778
+ const C = h.target;
779
+ C.textContent !== r.value && (r.value = C.textContent, i.format ? (u.value = C.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, l), e.store.setCellText(e.colIndex, e.rowIndex, C.textContent)) : (u.value = C.textContent !== l, e.store.setCellData(e.colIndex, e.rowIndex, C.textContent)));
780
+ }, v = Ft(f, e.debounce);
749
781
  return t({
750
- currentData: i
751
- }), (d, p) => (S(), R("td", {
782
+ currentData: r
783
+ }), (h, C) => (S(), A("td", {
752
784
  ref: "cell",
753
- "data-colindex": d.colIndex,
754
- "data-rowindex": d.rowIndex,
755
- "data-editable": b(l).edit,
756
- contenteditable: b(l).edit,
757
- tabindex: d.tabIndex,
785
+ "data-colindex": h.colIndex,
786
+ "data-rowindex": h.rowIndex,
787
+ "data-editable": x(i).edit,
788
+ contenteditable: x(i).edit,
789
+ tabindex: h.tabIndex,
758
790
  spellcheck: !1,
759
- style: q(m.value),
760
- onFocus: x,
791
+ style: J(m.value),
792
+ onFocus: w,
761
793
  onPaste: f,
762
- onInput: f,
763
- onClick: h,
764
- class: j(["atable-cell", y.value])
794
+ onInput: C[0] || (C[0] = //@ts-ignore
795
+ (...M) => x(v) && x(v)(...M)),
796
+ onClick: b,
797
+ class: q(["atable-cell", g.value])
765
798
  }, [
766
- b(l).cellComponent ? (S(), re(fe(b(l).cellComponent), Se({
799
+ x(i).cellComponent ? (S(), re(fe(x(i).cellComponent), Se({
767
800
  key: 0,
768
- value: s.value
769
- }, b(l).cellComponentProps), null, 16, ["value"])) : v.value ? (S(), R("span", {
801
+ value: c.value
802
+ }, x(i).cellComponentProps), null, 16, ["value"])) : d.value ? (S(), A("span", {
770
803
  key: 1,
771
- innerHTML: s.value
772
- }, null, 8, Yt)) : (S(), R("span", qt, K(s.value), 1))
773
- ], 46, Ut));
804
+ innerHTML: c.value
805
+ }, null, 8, Kt)) : (S(), A("span", _t, _(c.value), 1))
806
+ ], 46, Zt));
774
807
  }
775
- }), Qt = ["tabindex"], Zt = ["tabindex"], Kt = ["colspan"], _t = /* @__PURE__ */ Z({
808
+ }), tn = ["tabindex"], nn = ["tabindex"], on = ["colspan"], ln = /* @__PURE__ */ K({
776
809
  __name: "AExpansionRow",
777
810
  props: {
778
811
  rowIndex: {},
@@ -781,61 +814,61 @@ const Ft = (e) => {
781
814
  addNavigation: { type: [Boolean, Object] }
782
815
  },
783
816
  setup(e) {
784
- const t = N("rowEl"), n = I(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
817
+ const t = G("rowEl"), n = k(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
785
818
  if (e.addNavigation) {
786
- const o = {
787
- "keydown.control.g": (i) => {
788
- i.stopPropagation(), i.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
819
+ const l = {
820
+ "keydown.control.g": (r) => {
821
+ r.stopPropagation(), r.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
789
822
  }
790
823
  };
791
- typeof e.addNavigation == "object" && Object.assign(o, e.addNavigation), Le([
824
+ typeof e.addNavigation == "object" && Object.assign(l, e.addNavigation), Le([
792
825
  {
793
826
  selectors: t,
794
- handlers: o
827
+ handlers: l
795
828
  }
796
829
  ]);
797
830
  }
798
- return (o, i) => (S(), R(ie, null, [
799
- L("tr", Se(o.$attrs, {
831
+ return (l, r) => (S(), A(ie, null, [
832
+ D("tr", Se(l.$attrs, {
800
833
  ref: "rowEl",
801
- tabindex: o.tabIndex,
834
+ tabindex: l.tabIndex,
802
835
  class: "expandable-row"
803
836
  }), [
804
- L("td", {
837
+ D("td", {
805
838
  tabIndex: -1,
806
- onClick: i[0] || (i[0] = (c) => o.store.toggleRowExpand(o.rowIndex)),
839
+ onClick: r[0] || (r[0] = (u) => l.store.toggleRowExpand(l.rowIndex)),
807
840
  class: "row-index"
808
- }, K(n.value), 1),
809
- z(o.$slots, "row", {}, void 0, !0)
810
- ], 16, Qt),
811
- o.store.display[o.rowIndex].expanded ? (S(), R("tr", {
841
+ }, _(n.value), 1),
842
+ B(l.$slots, "row", {}, void 0, !0)
843
+ ], 16, tn),
844
+ l.store.display[l.rowIndex].expanded ? (S(), A("tr", {
812
845
  key: 0,
813
846
  ref: "rowExpanded",
814
- tabindex: o.tabIndex,
847
+ tabindex: l.tabIndex,
815
848
  class: "expanded-row"
816
849
  }, [
817
- L("td", {
850
+ D("td", {
818
851
  tabIndex: -1,
819
- colspan: o.store.columns.length + 1,
852
+ colspan: l.store.columns.length + 1,
820
853
  class: "expanded-row-content"
821
854
  }, [
822
- z(o.$slots, "content", {}, void 0, !0)
823
- ], 8, Kt)
824
- ], 8, Zt)) : _("", !0)
855
+ B(l.$slots, "content", {}, void 0, !0)
856
+ ], 8, on)
857
+ ], 8, nn)) : ee("", !0)
825
858
  ], 64));
826
859
  }
827
- }), le = (e, t) => {
860
+ }), ae = (e, t) => {
828
861
  const n = e.__vccOpts || e;
829
- for (const [o, i] of t)
830
- n[o] = i;
862
+ for (const [l, r] of t)
863
+ n[l] = r;
831
864
  return n;
832
- }, en = /* @__PURE__ */ le(_t, [["__scopeId", "data-v-5ad4bb41"]]), tn = ["colspan"], nn = {
865
+ }, an = /* @__PURE__ */ ae(ln, [["__scopeId", "data-v-5ad4bb41"]]), sn = ["colspan"], rn = {
833
866
  ref: "container",
834
867
  class: "gantt-handler"
835
- }, on = {
868
+ }, un = {
836
869
  key: 0,
837
870
  class: "gantt-label"
838
- }, ln = /* @__PURE__ */ Z({
871
+ }, cn = /* @__PURE__ */ K({
839
872
  __name: "AGanttCell",
840
873
  props: {
841
874
  store: {},
@@ -849,153 +882,153 @@ const Ft = (e) => {
849
882
  color: {}
850
883
  },
851
884
  setup(e) {
852
- vt((d) => ({
885
+ mt((v) => ({
853
886
  "78862e08": t.value,
854
- "18ad7d98": d.colspan
887
+ "18ad7d98": v.colspan
855
888
  }));
856
889
  const t = P();
857
- Q(() => {
890
+ Z(() => {
858
891
  !e.color || e.color == "" || e.color.length < 6 ? t.value = "#cccccc" : t.value = e.color;
859
892
  });
860
- const n = N("container"), o = N("bar"), i = N("leftHandle"), c = N("rightHandle"), { width: l } = ge(n), { left: a, right: u } = ge(o), r = P(e.start || 0), s = P(e.end || r.value + e.colspan), v = P({ startX: 0, startPos: 0 }), m = I(() => e.colspan > 0 ? l.value / e.colspan : 0), y = I(() => {
861
- const d = r.value / e.colspan * 100, p = s.value / e.colspan * 100;
893
+ const n = G("container"), l = G("bar"), r = G("leftHandle"), u = G("rightHandle"), { width: i } = pe(n), { left: o, right: s } = pe(l), a = P(e.start || 0), c = P(e.end || a.value + e.colspan), d = P({ startX: 0, startPos: 0 }), m = k(() => e.colspan > 0 ? i.value / e.colspan : 0), g = k(() => {
894
+ const v = a.value / e.colspan * 100, h = c.value / e.colspan * 100;
862
895
  return {
863
- left: `${d}%`,
864
- width: `${p - d}%`,
896
+ left: `${v}%`,
897
+ width: `${h - v}%`,
865
898
  backgroundColor: t.value
866
899
  };
867
- }), { isDragging: h } = xe(i, {
900
+ }), { isDragging: b } = xe(r, {
868
901
  axis: "x",
869
902
  onStart: () => {
870
- o.value && (o.value.style.transition = "none"), v.value = {
871
- startX: a.value,
872
- startPos: r.value
903
+ l.value && (l.value.style.transition = "none"), d.value = {
904
+ startX: o.value,
905
+ startPos: a.value
873
906
  };
874
907
  },
875
- onMove: ({ x: d }) => {
876
- if (h.value && o.value) {
877
- const M = (d - v.value.startX) / m.value, $ = Math.max(0, Math.min(s.value - 1, v.value.startPos + M));
878
- o.value.style.left = `${$ / e.colspan * 100}%`, o.value.style.width = `${(s.value - $) / e.colspan * 100}%`;
908
+ onMove: ({ x: v }) => {
909
+ if (b.value && l.value) {
910
+ const C = (v - d.value.startX) / m.value, M = Math.max(0, Math.min(c.value - 1, d.value.startPos + C));
911
+ l.value.style.left = `${M / e.colspan * 100}%`, l.value.style.width = `${(c.value - M) / e.colspan * 100}%`;
879
912
  }
880
913
  },
881
- onEnd: ({ x: d }) => {
882
- if (o.value) {
883
- const p = d - v.value.startX, M = Math.round(p / m.value), $ = r.value, k = Math.max(0, Math.min(s.value - 1, v.value.startPos + M));
884
- r.value = k, e.store.updateGanttBar({
914
+ onEnd: ({ x: v }) => {
915
+ if (l.value) {
916
+ const h = v - d.value.startX, C = Math.round(h / m.value), M = a.value, L = Math.max(0, Math.min(c.value - 1, d.value.startPos + C));
917
+ a.value = L, e.store.updateGanttBar({
885
918
  rowIndex: e.rowIndex,
886
919
  colIndex: e.colIndex,
887
920
  type: "resize",
888
921
  edge: "start",
889
- oldStart: $,
890
- newStart: k,
891
- end: s.value,
892
- delta: M,
893
- oldColspan: s.value - $,
894
- newColspan: s.value - k
922
+ oldStart: M,
923
+ newStart: L,
924
+ end: c.value,
925
+ delta: C,
926
+ oldColspan: c.value - M,
927
+ newColspan: c.value - L
895
928
  });
896
929
  }
897
930
  }
898
- }), { isDragging: x } = xe(c, {
931
+ }), { isDragging: w } = xe(u, {
899
932
  axis: "x",
900
933
  onStart: () => {
901
- o.value && (o.value.style.transition = "none"), v.value = {
902
- startX: u.value,
903
- startPos: s.value
934
+ l.value && (l.value.style.transition = "none"), d.value = {
935
+ startX: s.value,
936
+ startPos: c.value
904
937
  };
905
938
  },
906
- onMove: ({ x: d }) => {
907
- if (x.value && o.value) {
908
- const M = (d - v.value.startX) / m.value, $ = Math.max(
909
- r.value + 1,
910
- Math.min(e.columnsCount, v.value.startPos + M)
939
+ onMove: ({ x: v }) => {
940
+ if (w.value && l.value) {
941
+ const C = (v - d.value.startX) / m.value, M = Math.max(
942
+ a.value + 1,
943
+ Math.min(e.columnsCount, d.value.startPos + C)
911
944
  );
912
- o.value.style.width = `${($ - r.value) / e.colspan * 100}%`;
945
+ l.value.style.width = `${(M - a.value) / e.colspan * 100}%`;
913
946
  }
914
947
  },
915
- onEnd: ({ x: d }) => {
916
- if (o.value) {
917
- const p = d - v.value.startX, M = Math.round(p / m.value), $ = s.value, k = Math.max(
918
- r.value + 1,
919
- Math.min(e.columnsCount, v.value.startPos + M)
948
+ onEnd: ({ x: v }) => {
949
+ if (l.value) {
950
+ const h = v - d.value.startX, C = Math.round(h / m.value), M = c.value, L = Math.max(
951
+ a.value + 1,
952
+ Math.min(e.columnsCount, d.value.startPos + C)
920
953
  );
921
- s.value = k, e.store.updateGanttBar({
954
+ c.value = L, e.store.updateGanttBar({
922
955
  rowIndex: e.rowIndex,
923
956
  colIndex: e.colIndex,
924
957
  type: "resize",
925
958
  edge: "end",
926
- oldEnd: $,
927
- newEnd: k,
928
- start: r.value,
929
- delta: M,
930
- oldColspan: $ - r.value,
931
- newColspan: k - r.value
959
+ oldEnd: M,
960
+ newEnd: L,
961
+ start: a.value,
962
+ delta: C,
963
+ oldColspan: M - a.value,
964
+ newColspan: L - a.value
932
965
  });
933
966
  }
934
967
  }
935
- }), { isDragging: f } = xe(o, {
968
+ }), { isDragging: f } = xe(l, {
936
969
  exact: !0,
937
970
  // to avoid triggering when the left and right handles are being used
938
971
  axis: "x",
939
972
  onStart: () => {
940
- o.value && (o.value.style.transition = "none"), v.value = {
941
- startX: a.value,
942
- startPos: r.value
973
+ l.value && (l.value.style.transition = "none"), d.value = {
974
+ startX: o.value,
975
+ startPos: a.value
943
976
  };
944
977
  },
945
- onMove: ({ x: d }) => {
946
- if (f.value && o.value) {
947
- const M = (d - v.value.startX) / m.value, $ = s.value - r.value, k = Math.max(0, Math.min(v.value.startPos + M, e.columnsCount - $));
948
- o.value.style.left = `${k / e.colspan * 100}%`;
978
+ onMove: ({ x: v }) => {
979
+ if (f.value && l.value) {
980
+ const C = (v - d.value.startX) / m.value, M = c.value - a.value, L = Math.max(0, Math.min(d.value.startPos + C, e.columnsCount - M));
981
+ l.value.style.left = `${L / e.colspan * 100}%`;
949
982
  }
950
983
  },
951
- onEnd: ({ x: d }) => {
952
- if (o.value) {
953
- const p = d - v.value.startX, M = Math.round(p / m.value), $ = s.value - r.value, k = r.value, ae = s.value;
954
- let C = v.value.startPos + M, T = C + $;
955
- C < 0 ? (C = 0, T = $) : T > e.columnsCount && (T = e.columnsCount, C = T - $), r.value = C, s.value = T, e.store.updateGanttBar({
984
+ onEnd: ({ x: v }) => {
985
+ if (l.value) {
986
+ const h = v - d.value.startX, C = Math.round(h / m.value), M = c.value - a.value, L = a.value, O = c.value;
987
+ let I = d.value.startPos + C, T = I + M;
988
+ I < 0 ? (I = 0, T = M) : T > e.columnsCount && (T = e.columnsCount, I = T - M), a.value = I, c.value = T, e.store.updateGanttBar({
956
989
  rowIndex: e.rowIndex,
957
990
  colIndex: e.colIndex,
958
991
  type: "bar",
959
- oldStart: k,
960
- oldEnd: ae,
961
- newStart: C,
992
+ oldStart: L,
993
+ oldEnd: O,
994
+ newStart: I,
962
995
  newEnd: T,
963
- delta: M,
964
- colspan: T - C
996
+ delta: C,
997
+ colspan: T - I
965
998
  });
966
999
  }
967
1000
  }
968
1001
  });
969
- return (d, p) => (S(), R("td", {
1002
+ return (v, h) => (S(), A("td", {
970
1003
  class: "aganttcell",
971
- colspan: d.colspan
1004
+ colspan: v.colspan
972
1005
  }, [
973
- L("div", nn, [
974
- L("div", {
1006
+ D("div", rn, [
1007
+ D("div", {
975
1008
  ref: "bar",
976
- class: j(["gantt-bar", { "is-dragging": b(f) || b(h) || b(x) }]),
977
- style: q(y.value)
1009
+ class: q(["gantt-bar", { "is-dragging": x(f) || x(b) || x(w) }]),
1010
+ style: J(g.value)
978
1011
  }, [
979
- L("div", {
1012
+ D("div", {
980
1013
  ref: "leftHandle",
981
- class: j(["gantt-handle left-handle", { "is-dragging": b(h) }])
982
- }, p[0] || (p[0] = [
983
- L("div", { class: "handle-grip" }, null, -1),
984
- L("div", { class: "vertical-indicator left-indicator" }, null, -1)
1014
+ class: q(["gantt-handle left-handle", { "is-dragging": x(b) }])
1015
+ }, h[0] || (h[0] = [
1016
+ D("div", { class: "handle-grip" }, null, -1),
1017
+ D("div", { class: "vertical-indicator left-indicator" }, null, -1)
985
1018
  ]), 2),
986
- d.label ? (S(), R("label", on, K(d.label), 1)) : _("", !0),
987
- L("div", {
1019
+ v.label ? (S(), A("label", un, _(v.label), 1)) : ee("", !0),
1020
+ D("div", {
988
1021
  ref: "rightHandle",
989
- class: j(["gantt-handle right-handle", { "is-dragging": b(x) }])
990
- }, p[1] || (p[1] = [
991
- L("div", { class: "handle-grip" }, null, -1),
992
- L("div", { class: "vertical-indicator right-indicator" }, null, -1)
1022
+ class: q(["gantt-handle right-handle", { "is-dragging": x(w) }])
1023
+ }, h[1] || (h[1] = [
1024
+ D("div", { class: "handle-grip" }, null, -1),
1025
+ D("div", { class: "vertical-indicator right-indicator" }, null, -1)
993
1026
  ]), 2)
994
1027
  ], 6)
995
1028
  ], 512)
996
- ], 8, tn));
1029
+ ], 8, sn));
997
1030
  }
998
- }), an = /* @__PURE__ */ le(ln, [["__scopeId", "data-v-a929e8e3"]]), sn = ["tabindex"], rn = /* @__PURE__ */ Z({
1031
+ }), dn = /* @__PURE__ */ ae(cn, [["__scopeId", "data-v-a929e8e3"]]), fn = ["tabindex"], vn = /* @__PURE__ */ K({
999
1032
  __name: "ARow",
1000
1033
  props: {
1001
1034
  rowIndex: {},
@@ -1004,42 +1037,42 @@ const Ft = (e) => {
1004
1037
  addNavigation: { type: [Boolean, Object], default: !1 }
1005
1038
  },
1006
1039
  setup(e) {
1007
- const t = N("rowEl"), n = I(() => e.store.isRowVisible(e.rowIndex)), o = I(() => e.store.getRowExpandSymbol(e.rowIndex));
1040
+ const t = G("rowEl"), n = k(() => e.store.isRowVisible(e.rowIndex)), l = k(() => e.store.getRowExpandSymbol(e.rowIndex));
1008
1041
  if (e.addNavigation) {
1009
- let i = Pe;
1010
- typeof e.addNavigation == "object" && (i = {
1011
- ...i,
1042
+ let r = Pe;
1043
+ typeof e.addNavigation == "object" && (r = {
1044
+ ...r,
1012
1045
  ...e.addNavigation
1013
1046
  }), Le([
1014
1047
  {
1015
1048
  selectors: t,
1016
- handlers: i
1049
+ handlers: r
1017
1050
  }
1018
1051
  ]);
1019
1052
  }
1020
- return (i, c) => he((S(), R("tr", {
1053
+ return (r, u) => he((S(), A("tr", {
1021
1054
  ref: "rowEl",
1022
- tabindex: i.tabIndex,
1055
+ tabindex: r.tabIndex,
1023
1056
  class: "atable-row"
1024
1057
  }, [
1025
- i.store.config.view !== "uncounted" ? z(i.$slots, "index", { key: 0 }, () => [
1026
- i.store.config.view === "list" ? (S(), R("td", {
1058
+ r.store.config.view !== "uncounted" ? B(r.$slots, "index", { key: 0 }, () => [
1059
+ r.store.config.view === "list" ? (S(), A("td", {
1027
1060
  key: 0,
1028
1061
  tabIndex: -1,
1029
- class: j(["list-index", i.store.hasPinnedColumns ? "sticky-index" : ""])
1030
- }, K(i.rowIndex + 1), 3)) : i.store.config.view === "tree" ? (S(), R("td", {
1062
+ class: q(["list-index", r.store.hasPinnedColumns ? "sticky-index" : ""])
1063
+ }, _(r.rowIndex + 1), 3)) : r.store.config.view === "tree" ? (S(), A("td", {
1031
1064
  key: 1,
1032
1065
  tabIndex: -1,
1033
- class: j(["tree-index", i.store.hasPinnedColumns ? "sticky-index" : ""]),
1034
- onClick: c[0] || (c[0] = (l) => i.store.toggleRowExpand(i.rowIndex))
1035
- }, K(o.value), 3)) : _("", !0)
1036
- ], !0) : _("", !0),
1037
- z(i.$slots, "default", {}, void 0, !0)
1038
- ], 8, sn)), [
1039
- [Ke, n.value]
1066
+ class: q(["tree-index", r.store.hasPinnedColumns ? "sticky-index" : ""]),
1067
+ onClick: u[0] || (u[0] = (i) => r.store.toggleRowExpand(r.rowIndex))
1068
+ }, _(l.value), 3)) : ee("", !0)
1069
+ ], !0) : ee("", !0),
1070
+ B(r.$slots, "default", {}, void 0, !0)
1071
+ ], 8, fn)), [
1072
+ [_e, n.value]
1040
1073
  ]);
1041
1074
  }
1042
- }), ot = /* @__PURE__ */ le(rn, [["__scopeId", "data-v-4cb4f254"]]), De = we ? window : void 0;
1075
+ }), lt = /* @__PURE__ */ ae(vn, [["__scopeId", "data-v-4cb4f254"]]), De = we ? window : void 0;
1043
1076
  function Y(e) {
1044
1077
  var t;
1045
1078
  const n = E(e);
@@ -1047,234 +1080,234 @@ function Y(e) {
1047
1080
  }
1048
1081
  function me(...e) {
1049
1082
  const t = [], n = () => {
1050
- t.forEach((a) => a()), t.length = 0;
1051
- }, o = (a, u, r, s) => (a.addEventListener(u, r, s), () => a.removeEventListener(u, r, s)), i = I(() => {
1052
- const a = J(E(e[0])).filter((u) => u != null);
1053
- return a.every((u) => typeof u != "string") ? a : void 0;
1054
- }), c = et(
1083
+ t.forEach((o) => o()), t.length = 0;
1084
+ }, l = (o, s, a, c) => (o.addEventListener(s, a, c), () => o.removeEventListener(s, a, c)), r = k(() => {
1085
+ const o = Q(E(e[0])).filter((s) => s != null);
1086
+ return o.every((s) => typeof s != "string") ? o : void 0;
1087
+ }), u = tt(
1055
1088
  () => {
1056
- var a, u;
1089
+ var o, s;
1057
1090
  return [
1058
- (u = (a = i.value) == null ? void 0 : a.map((r) => Y(r))) != null ? u : [De].filter((r) => r != null),
1059
- J(E(i.value ? e[1] : e[0])),
1060
- J(b(i.value ? e[2] : e[1])),
1091
+ (s = (o = r.value) == null ? void 0 : o.map((a) => Y(a))) != null ? s : [De].filter((a) => a != null),
1092
+ Q(E(r.value ? e[1] : e[0])),
1093
+ Q(x(r.value ? e[2] : e[1])),
1061
1094
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
1062
- E(i.value ? e[3] : e[2])
1095
+ E(r.value ? e[3] : e[2])
1063
1096
  ];
1064
1097
  },
1065
- ([a, u, r, s]) => {
1066
- if (n(), !(a != null && a.length) || !(u != null && u.length) || !(r != null && r.length))
1098
+ ([o, s, a, c]) => {
1099
+ if (n(), !(o != null && o.length) || !(s != null && s.length) || !(a != null && a.length))
1067
1100
  return;
1068
- const v = _e(s) ? { ...s } : s;
1101
+ const d = et(c) ? { ...c } : c;
1069
1102
  t.push(
1070
- ...a.flatMap(
1071
- (m) => u.flatMap(
1072
- (y) => r.map((h) => o(m, y, h, v))
1103
+ ...o.flatMap(
1104
+ (m) => s.flatMap(
1105
+ (g) => a.map((b) => l(m, g, b, d))
1073
1106
  )
1074
1107
  )
1075
1108
  );
1076
1109
  },
1077
1110
  { flush: "post" }
1078
- ), l = () => {
1079
- c(), n();
1111
+ ), i = () => {
1112
+ u(), n();
1080
1113
  };
1081
- return oe(n), l;
1114
+ return le(n), i;
1082
1115
  }
1083
- let je = !1;
1084
- function Ue(e, t, n = {}) {
1085
- const { window: o = De, ignore: i = [], capture: c = !0, detectIframe: l = !1, controls: a = !1 } = n;
1086
- if (!o)
1087
- return a ? { stop: U, cancel: U, trigger: U } : U;
1088
- if (Me && !je) {
1089
- je = !0;
1116
+ let Ue = !1;
1117
+ function qe(e, t, n = {}) {
1118
+ const { window: l = De, ignore: r = [], capture: u = !0, detectIframe: i = !1, controls: o = !1 } = n;
1119
+ if (!l)
1120
+ return o ? { stop: V, cancel: V, trigger: V } : V;
1121
+ if (Me && !Ue) {
1122
+ Ue = !0;
1090
1123
  const f = { passive: !0 };
1091
- Array.from(o.document.body.children).forEach((d) => d.addEventListener("click", U, f)), o.document.documentElement.addEventListener("click", U, f);
1124
+ Array.from(l.document.body.children).forEach((v) => v.addEventListener("click", V, f)), l.document.documentElement.addEventListener("click", V, f);
1092
1125
  }
1093
- let u = !0;
1094
- const r = (f) => E(i).some((d) => {
1095
- if (typeof d == "string")
1096
- return Array.from(o.document.querySelectorAll(d)).some((p) => p === f.target || f.composedPath().includes(p));
1126
+ let s = !0;
1127
+ const a = (f) => E(r).some((v) => {
1128
+ if (typeof v == "string")
1129
+ return Array.from(l.document.querySelectorAll(v)).some((h) => h === f.target || f.composedPath().includes(h));
1097
1130
  {
1098
- const p = Y(d);
1099
- return p && (f.target === p || f.composedPath().includes(p));
1131
+ const h = Y(v);
1132
+ return h && (f.target === h || f.composedPath().includes(h));
1100
1133
  }
1101
1134
  });
1102
- function s(f) {
1103
- const d = E(f);
1104
- return d && d.$.subTree.shapeFlag === 16;
1135
+ function c(f) {
1136
+ const v = E(f);
1137
+ return v && v.$.subTree.shapeFlag === 16;
1105
1138
  }
1106
- function v(f, d) {
1107
- const p = E(f), M = p.$.subTree && p.$.subTree.children;
1108
- return M == null || !Array.isArray(M) ? !1 : M.some(($) => $.el === d.target || d.composedPath().includes($.el));
1139
+ function d(f, v) {
1140
+ const h = E(f), C = h.$.subTree && h.$.subTree.children;
1141
+ return C == null || !Array.isArray(C) ? !1 : C.some((M) => M.el === v.target || v.composedPath().includes(M.el));
1109
1142
  }
1110
1143
  const m = (f) => {
1111
- const d = Y(e);
1112
- if (f.target != null && !(!(d instanceof Element) && s(e) && v(e, f)) && !(!d || d === f.target || f.composedPath().includes(d))) {
1113
- if ("detail" in f && f.detail === 0 && (u = !r(f)), !u) {
1114
- u = !0;
1144
+ const v = Y(e);
1145
+ if (f.target != null && !(!(v instanceof Element) && c(e) && d(e, f)) && !(!v || v === f.target || f.composedPath().includes(v))) {
1146
+ if ("detail" in f && f.detail === 0 && (s = !a(f)), !s) {
1147
+ s = !0;
1115
1148
  return;
1116
1149
  }
1117
1150
  t(f);
1118
1151
  }
1119
1152
  };
1120
- let y = !1;
1121
- const h = [
1122
- me(o, "click", (f) => {
1123
- y || (y = !0, setTimeout(() => {
1124
- y = !1;
1153
+ let g = !1;
1154
+ const b = [
1155
+ me(l, "click", (f) => {
1156
+ g || (g = !0, setTimeout(() => {
1157
+ g = !1;
1125
1158
  }, 0), m(f));
1126
- }, { passive: !0, capture: c }),
1127
- me(o, "pointerdown", (f) => {
1128
- const d = Y(e);
1129
- u = !r(f) && !!(d && !f.composedPath().includes(d));
1159
+ }, { passive: !0, capture: u }),
1160
+ me(l, "pointerdown", (f) => {
1161
+ const v = Y(e);
1162
+ s = !a(f) && !!(v && !f.composedPath().includes(v));
1130
1163
  }, { passive: !0 }),
1131
- l && me(o, "blur", (f) => {
1164
+ i && me(l, "blur", (f) => {
1132
1165
  setTimeout(() => {
1133
- var d;
1134
- const p = Y(e);
1135
- ((d = o.document.activeElement) == null ? void 0 : d.tagName) === "IFRAME" && !(p != null && p.contains(o.document.activeElement)) && t(f);
1166
+ var v;
1167
+ const h = Y(e);
1168
+ ((v = l.document.activeElement) == null ? void 0 : v.tagName) === "IFRAME" && !(h != null && h.contains(l.document.activeElement)) && t(f);
1136
1169
  }, 0);
1137
1170
  }, { passive: !0 })
1138
- ].filter(Boolean), x = () => h.forEach((f) => f());
1139
- return a ? {
1140
- stop: x,
1171
+ ].filter(Boolean), w = () => b.forEach((f) => f());
1172
+ return o ? {
1173
+ stop: w,
1141
1174
  cancel: () => {
1142
- u = !1;
1175
+ s = !1;
1143
1176
  },
1144
1177
  trigger: (f) => {
1145
- u = !0, m(f), u = !1;
1178
+ s = !0, m(f), s = !1;
1146
1179
  }
1147
- } : x;
1180
+ } : w;
1148
1181
  }
1149
- const Ce = /* @__PURE__ */ new WeakMap(), un = {
1182
+ const Ce = /* @__PURE__ */ new WeakMap(), mn = {
1150
1183
  mounted(e, t) {
1151
1184
  const n = !t.modifiers.bubble;
1152
- let o;
1185
+ let l;
1153
1186
  if (typeof t.value == "function")
1154
- o = Ue(e, t.value, { capture: n });
1187
+ l = qe(e, t.value, { capture: n });
1155
1188
  else {
1156
- const [i, c] = t.value;
1157
- o = Ue(e, i, Object.assign({ capture: n }, c));
1189
+ const [r, u] = t.value;
1190
+ l = qe(e, r, Object.assign({ capture: n }, u));
1158
1191
  }
1159
- Ce.set(e, o);
1192
+ Ce.set(e, l);
1160
1193
  },
1161
1194
  unmounted(e) {
1162
1195
  const t = Ce.get(e);
1163
1196
  t && typeof t == "function" ? t() : t == null || t.stop(), Ce.delete(e);
1164
1197
  }
1165
1198
  };
1166
- function cn() {
1167
- const e = W(!1), t = pe();
1168
- return t && Q(() => {
1199
+ function hn() {
1200
+ const e = H(!1), t = ge();
1201
+ return t && Z(() => {
1169
1202
  e.value = !0;
1170
1203
  }, t), e;
1171
1204
  }
1172
- function dn(e) {
1173
- const t = cn();
1174
- return I(() => (t.value, !!e()));
1205
+ function pn(e) {
1206
+ const t = hn();
1207
+ return k(() => (t.value, !!e()));
1175
1208
  }
1176
1209
  function Ye(e, t, n = {}) {
1177
- const { window: o = De, ...i } = n;
1178
- let c;
1179
- const l = dn(() => o && "ResizeObserver" in o), a = () => {
1180
- c && (c.disconnect(), c = void 0);
1181
- }, u = I(() => {
1182
- const v = E(e);
1183
- return Array.isArray(v) ? v.map((m) => Y(m)) : [Y(v)];
1184
- }), r = B(
1185
- u,
1186
- (v) => {
1187
- if (a(), l.value && o) {
1188
- c = new ResizeObserver(t);
1189
- for (const m of v)
1190
- m && c.observe(m, i);
1210
+ const { window: l = De, ...r } = n;
1211
+ let u;
1212
+ const i = pn(() => l && "ResizeObserver" in l), o = () => {
1213
+ u && (u.disconnect(), u = void 0);
1214
+ }, s = k(() => {
1215
+ const d = E(e);
1216
+ return Array.isArray(d) ? d.map((m) => Y(m)) : [Y(d)];
1217
+ }), a = N(
1218
+ s,
1219
+ (d) => {
1220
+ if (o(), i.value && l) {
1221
+ u = new ResizeObserver(t);
1222
+ for (const m of d)
1223
+ m && u.observe(m, r);
1191
1224
  }
1192
1225
  },
1193
1226
  { immediate: !0, flush: "post" }
1194
- ), s = () => {
1195
- a(), r();
1227
+ ), c = () => {
1228
+ o(), a();
1196
1229
  };
1197
- return oe(s), {
1198
- isSupported: l,
1199
- stop: s
1230
+ return le(c), {
1231
+ isSupported: i,
1232
+ stop: c
1200
1233
  };
1201
1234
  }
1202
1235
  function Ee(e) {
1203
1236
  return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
1204
1237
  }
1205
- const fn = {
1238
+ const gn = {
1206
1239
  mounted(e, t) {
1207
1240
  typeof t.value == "function" ? Ye(e, t.value) : Ye(e, ...t.value);
1208
1241
  }
1209
1242
  };
1210
- function lt(e) {
1243
+ function at(e) {
1211
1244
  const t = window.getComputedStyle(e);
1212
1245
  if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight)
1213
1246
  return !0;
1214
1247
  {
1215
1248
  const n = e.parentNode;
1216
- return !n || n.tagName === "BODY" ? !1 : lt(n);
1249
+ return !n || n.tagName === "BODY" ? !1 : at(n);
1217
1250
  }
1218
1251
  }
1219
- function vn(e) {
1252
+ function wn(e) {
1220
1253
  const t = e || window.event, n = t.target;
1221
- return lt(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
1254
+ return at(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
1222
1255
  }
1223
1256
  const Ie = /* @__PURE__ */ new WeakMap();
1224
- function mn(e, t = !1) {
1225
- const n = W(t);
1226
- let o = null, i = "";
1227
- B(zt(e), (a) => {
1228
- const u = Ee(E(a));
1229
- if (u) {
1230
- const r = u;
1231
- if (Ie.get(r) || Ie.set(r, r.style.overflow), r.style.overflow !== "hidden" && (i = r.style.overflow), r.style.overflow === "hidden")
1257
+ function yn(e, t = !1) {
1258
+ const n = H(t);
1259
+ let l = null, r = "";
1260
+ N(Nt(e), (o) => {
1261
+ const s = Ee(E(o));
1262
+ if (s) {
1263
+ const a = s;
1264
+ if (Ie.get(a) || Ie.set(a, a.style.overflow), a.style.overflow !== "hidden" && (r = a.style.overflow), a.style.overflow === "hidden")
1232
1265
  return n.value = !0;
1233
1266
  if (n.value)
1234
- return r.style.overflow = "hidden";
1267
+ return a.style.overflow = "hidden";
1235
1268
  }
1236
1269
  }, {
1237
1270
  immediate: !0
1238
1271
  });
1239
- const c = () => {
1240
- const a = Ee(E(e));
1241
- !a || n.value || (Me && (o = me(
1242
- a,
1272
+ const u = () => {
1273
+ const o = Ee(E(e));
1274
+ !o || n.value || (Me && (l = me(
1275
+ o,
1243
1276
  "touchmove",
1244
- (u) => {
1245
- vn(u);
1277
+ (s) => {
1278
+ wn(s);
1246
1279
  },
1247
1280
  { passive: !1 }
1248
- )), a.style.overflow = "hidden", n.value = !0);
1249
- }, l = () => {
1250
- const a = Ee(E(e));
1251
- !a || !n.value || (Me && (o == null || o()), a.style.overflow = i, Ie.delete(a), n.value = !1);
1281
+ )), o.style.overflow = "hidden", n.value = !0);
1282
+ }, i = () => {
1283
+ const o = Ee(E(e));
1284
+ !o || !n.value || (Me && (l == null || l()), o.style.overflow = r, Ie.delete(o), n.value = !1);
1252
1285
  };
1253
- return oe(l), I({
1286
+ return le(i), k({
1254
1287
  get() {
1255
1288
  return n.value;
1256
1289
  },
1257
- set(a) {
1258
- a ? c() : l();
1290
+ set(o) {
1291
+ o ? u() : i();
1259
1292
  }
1260
1293
  });
1261
1294
  }
1262
- function hn() {
1295
+ function bn() {
1263
1296
  let e = !1;
1264
- const t = W(!1);
1265
- return (n, o) => {
1266
- if (t.value = o.value, e)
1297
+ const t = H(!1);
1298
+ return (n, l) => {
1299
+ if (t.value = l.value, e)
1267
1300
  return;
1268
1301
  e = !0;
1269
- const i = mn(n, o.value);
1270
- B(t, (c) => i.value = c);
1302
+ const r = yn(n, l.value);
1303
+ N(t, (u) => r.value = u);
1271
1304
  };
1272
1305
  }
1273
- hn();
1274
- const gn = { key: 0 }, pn = {
1306
+ bn();
1307
+ const xn = { key: 0 }, Cn = {
1275
1308
  class: "atable-header-row",
1276
1309
  tabindex: "-1"
1277
- }, wn = ["data-colindex"], at = /* @__PURE__ */ Z({
1310
+ }, En = ["data-colindex"], st = /* @__PURE__ */ K({
1278
1311
  __name: "ATableHeader",
1279
1312
  props: {
1280
1313
  columns: {},
@@ -1282,306 +1315,311 @@ const gn = { key: 0 }, pn = {
1282
1315
  },
1283
1316
  setup(e) {
1284
1317
  const t = (n) => {
1285
- var o;
1286
- for (const i of n) {
1287
- if (i.borderBoxSize.length === 0) continue;
1288
- const l = i.borderBoxSize[0].inlineSize, a = Number(i.target.dataset.colindex), u = (o = e.store.columns[a]) == null ? void 0 : o.width;
1289
- typeof u == "number" && u !== l && e.store.resizeColumn(a, l);
1318
+ var l;
1319
+ for (const r of n) {
1320
+ if (r.borderBoxSize.length === 0) continue;
1321
+ const i = r.borderBoxSize[0].inlineSize, o = Number(r.target.dataset.colindex), s = (l = e.store.columns[o]) == null ? void 0 : l.width;
1322
+ typeof s == "number" && s !== i && e.store.resizeColumn(o, i);
1290
1323
  }
1291
1324
  };
1292
- return (n, o) => n.columns.length ? (S(), R("thead", gn, [
1293
- L("tr", pn, [
1294
- n.store.zeroColumn ? (S(), R("th", {
1325
+ return (n, l) => n.columns.length ? (S(), A("thead", xn, [
1326
+ D("tr", Cn, [
1327
+ n.store.zeroColumn ? (S(), A("th", {
1295
1328
  key: 0,
1296
1329
  id: "header-index",
1297
- class: j([[
1330
+ class: q([[
1298
1331
  n.store.hasPinnedColumns ? "sticky-index" : "",
1299
1332
  n.store.config.view === "tree" ? "tree-index" : "",
1300
1333
  n.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1301
1334
  ], "list-index"])
1302
- }, null, 2)) : _("", !0),
1303
- (S(!0), R(ie, null, ke(n.columns, (i, c) => he((S(), R("th", {
1304
- key: i.name,
1305
- "data-colindex": c,
1335
+ }, null, 2)) : ee("", !0),
1336
+ (S(!0), A(ie, null, ke(n.columns, (r, u) => he((S(), A("th", {
1337
+ key: r.name,
1338
+ "data-colindex": u,
1306
1339
  tabindex: "-1",
1307
- style: q(n.store.getHeaderCellStyle(i)),
1308
- class: j(i.pinned ? "sticky-column" : "")
1340
+ style: J(n.store.getHeaderCellStyle(r)),
1341
+ class: q(r.pinned ? "sticky-column" : "")
1309
1342
  }, [
1310
- z(n.$slots, "default", {}, () => [
1311
- mt(K(i.label || String.fromCharCode(c + 97).toUpperCase()), 1)
1343
+ B(n.$slots, "default", {}, () => [
1344
+ ht(_(r.label || String.fromCharCode(u + 97).toUpperCase()), 1)
1312
1345
  ])
1313
- ], 14, wn)), [
1314
- [b(fn), t]
1346
+ ], 14, En)), [
1347
+ [x(gn), t]
1315
1348
  ])), 128))
1316
1349
  ])
1317
- ])) : _("", !0);
1350
+ ])) : ee("", !0);
1318
1351
  }
1319
- }), st = /* @__PURE__ */ Z({
1352
+ }), rt = /* @__PURE__ */ K({
1320
1353
  __name: "ATableModal",
1321
1354
  props: {
1322
1355
  store: {}
1323
1356
  },
1324
1357
  setup(e) {
1325
- const t = N("amodal"), { width: n, height: o } = ge(t), i = I(() => {
1326
- var v, m, y, h;
1358
+ const t = G("amodal"), { width: n, height: l } = pe(t), r = k(() => {
1359
+ var d, m, g, b;
1327
1360
  if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return;
1328
- const c = (v = e.store.modal.cell) == null ? void 0 : v.closest("table"), l = c.offsetHeight || 0, a = c.offsetWidth || 0;
1329
- let u = ((m = e.store.modal.cell) == null ? void 0 : m.offsetTop) || 0;
1330
- const r = ((y = c.querySelector("thead")) == null ? void 0 : y.offsetHeight) || 0;
1331
- u += r, u = u + o.value < l ? u : u - (o.value + e.store.modal.height);
1332
- let s = ((h = e.store.modal.cell) == null ? void 0 : h.offsetLeft) || 0;
1333
- return s = s + n.value <= a ? s : s - (n.value - e.store.modal.width), {
1334
- left: `${s}px`,
1335
- top: `${u}px`
1361
+ const u = (d = e.store.modal.cell) == null ? void 0 : d.closest("table"), i = u.offsetHeight || 0, o = u.offsetWidth || 0;
1362
+ let s = ((m = e.store.modal.cell) == null ? void 0 : m.offsetTop) || 0;
1363
+ const a = ((g = u.querySelector("thead")) == null ? void 0 : g.offsetHeight) || 0;
1364
+ s += a, s = s + l.value < i ? s : s - (l.value + e.store.modal.height);
1365
+ let c = ((b = e.store.modal.cell) == null ? void 0 : b.offsetLeft) || 0;
1366
+ return c = c + n.value <= o ? c : c - (n.value - e.store.modal.width), {
1367
+ left: `${c}px`,
1368
+ top: `${s}px`
1336
1369
  };
1337
1370
  });
1338
- return (c, l) => (S(), R("div", {
1371
+ return (u, i) => (S(), A("div", {
1339
1372
  class: "amodal",
1340
1373
  ref: "amodal",
1341
1374
  tabindex: "-1",
1342
- onClick: l[0] || (l[0] = We(() => {
1375
+ onClick: i[0] || (i[0] = We(() => {
1343
1376
  }, ["stop"])),
1344
- onInput: l[1] || (l[1] = We(() => {
1377
+ onInput: i[1] || (i[1] = We(() => {
1345
1378
  }, ["stop"])),
1346
- style: q(i.value)
1379
+ style: J(r.value)
1347
1380
  }, [
1348
- z(c.$slots, "default")
1381
+ B(u.$slots, "default")
1349
1382
  ], 36));
1350
1383
  }
1351
- }), yn = (e) => {
1352
- const t = e.id || jt();
1353
- return ht(`table-${t}`, () => {
1354
- const o = () => {
1355
- const g = {};
1356
- for (const [w, A] of c.value.entries())
1357
- for (const [O, D] of l.value.entries())
1358
- g[`${w}:${O}`] = D[A.name];
1359
- return g;
1360
- }, i = (g) => {
1361
- const w = [Object.assign({}, { rowModified: !1 })];
1362
- if (g && "0:0" in g)
1363
- return g;
1364
- const A = /* @__PURE__ */ new Set();
1365
- for (let O = l.value.length - 1; O >= 0; O--) {
1366
- const D = l.value[O];
1367
- D.parent && A.add(D.parent), w[O] = {
1384
+ }), In = (e) => {
1385
+ const t = e.id || Qt();
1386
+ return gt(`table-${t}`, () => {
1387
+ const l = () => {
1388
+ const p = {};
1389
+ for (const [y, $] of u.value.entries())
1390
+ for (const [R, W] of i.value.entries())
1391
+ p[`${y}:${R}`] = W[$.name];
1392
+ return p;
1393
+ }, r = (p) => {
1394
+ const y = [Object.assign({}, { rowModified: !1 })];
1395
+ if (p && "0:0" in p)
1396
+ return p;
1397
+ const $ = /* @__PURE__ */ new Set();
1398
+ for (let R = i.value.length - 1; R >= 0; R--) {
1399
+ const W = i.value[R];
1400
+ W.parent && $.add(W.parent), y[R] = {
1368
1401
  childrenOpen: !1,
1369
1402
  expanded: !1,
1370
- indent: D.indent || 0,
1371
- isParent: A.has(O),
1372
- isRoot: D.parent === null || D.parent === void 0,
1403
+ indent: W.indent || 0,
1404
+ isParent: $.has(R),
1405
+ isRoot: W.parent === null || W.parent === void 0,
1373
1406
  rowModified: !1,
1374
- open: D.parent === null || D.parent === void 0,
1375
- parent: D.parent
1407
+ open: W.parent === null || W.parent === void 0,
1408
+ parent: W.parent
1376
1409
  };
1377
1410
  }
1378
- return w;
1379
- }, c = P(e.columns), l = P(e.rows), a = P(e.config || {}), u = P(e.table || o()), r = P(i(e.display)), s = P(e.modal || { visible: !1 }), v = P({}), m = I(() => c.value.some((g) => g.pinned)), y = I(() => `${Math.ceil(l.value.length / 100 + 1)}ch`), h = I(
1380
- () => a.value.view ? ["list", "tree", "list-expansion"].includes(a.value.view) : !1
1381
- ), x = (g, w) => u.value[`${g}:${w}`], f = (g, w, A) => {
1382
- const O = `${g}:${w}`, D = c.value[g];
1383
- u.value[O] !== A && (r.value[w].rowModified = !0), u.value[O] = A, l.value[w][D.name] = A;
1384
- }, d = (g, w, A) => {
1385
- const O = `${g}:${w}`;
1386
- u.value[O] !== A && (r.value[w].rowModified = !0, v.value[O] = A);
1387
- }, p = (g) => {
1388
- const w = c.value.indexOf(g) === c.value.length - 1, A = a.value.fullWidth ? g.resizable && !w : g.resizable;
1411
+ return y;
1412
+ }, u = P(e.columns), i = P(e.rows), o = P(e.config || {}), s = P(e.table || l()), a = P(r(e.display)), c = P(e.modal || { visible: !1 }), d = P({}), m = k(() => u.value.some((p) => p.pinned)), g = k(() => `${Math.ceil(i.value.length / 100 + 1)}ch`), b = k(
1413
+ () => o.value.view ? ["list", "tree", "list-expansion"].includes(o.value.view) : !1
1414
+ ), w = (p, y) => s.value[`${p}:${y}`], f = (p, y, $) => {
1415
+ const R = `${p}:${y}`, W = u.value[p];
1416
+ s.value[R] !== $ && (a.value[y].rowModified = !0), s.value[R] = $, i.value[y] = {
1417
+ ...i.value[y],
1418
+ [W.name]: $
1419
+ };
1420
+ }, v = (p, y, $) => {
1421
+ const R = `${p}:${y}`;
1422
+ s.value[R] !== $ && (a.value[y].rowModified = !0, d.value[R] = $);
1423
+ }, h = (p) => {
1424
+ const y = u.value.indexOf(p) === u.value.length - 1, $ = o.value.fullWidth ? p.resizable && !y : p.resizable;
1389
1425
  return {
1390
- width: g.width || "40ch",
1391
- textAlign: g.align || "center",
1392
- ...A && {
1426
+ width: p.width || "40ch",
1427
+ textAlign: p.align || "center",
1428
+ ...$ && {
1393
1429
  resize: "horizontal",
1394
1430
  overflow: "hidden",
1395
1431
  whiteSpace: "nowrap"
1396
1432
  }
1397
1433
  };
1398
- }, M = (g, w) => {
1399
- if (g < 0 || g >= c.value.length) return;
1400
- const O = Math.max(w, 40);
1401
- c.value[g] = {
1402
- ...c.value[g],
1403
- width: `${O}px`
1434
+ }, C = (p, y) => {
1435
+ if (p < 0 || p >= u.value.length) return;
1436
+ const R = Math.max(y, 40);
1437
+ u.value[p] = {
1438
+ ...u.value[p],
1439
+ width: `${R}px`
1404
1440
  };
1405
- }, $ = (g) => {
1406
- const w = l.value[g];
1407
- return a.value.view === "gantt" && w.indent === 0;
1408
- }, k = (g) => a.value.view !== "tree" || r.value[g].isRoot || r.value[g].open, ae = (g) => a.value.view !== "tree" ? "" : r.value[g].isRoot || r.value[g].isParent ? r.value[g].childrenOpen ? "-" : "+" : "", C = (g) => {
1409
- if (a.value.view === "tree") {
1410
- r.value[g].childrenOpen = !r.value[g].childrenOpen;
1411
- for (let w = l.value.length - 1; w >= 0; w--)
1412
- r.value[w].parent === g && (r.value[w].open = !r.value[w].open, r.value[w].childrenOpen && C(w));
1413
- } else a.value.view === "list-expansion" && (r.value[g].expanded = !r.value[g].expanded);
1414
- }, T = (g, w) => {
1415
- const A = x(g, w);
1416
- return H(g, w, A);
1417
- }, H = (g, w, A) => {
1418
- const O = c.value[g], D = l.value[w], se = O.format;
1419
- return se ? typeof se == "function" ? se(A, { table: u.value, row: D, column: O }) : typeof se == "string" ? Function(`"use strict";return (${se})`)()(A, { table: u.value, row: D, column: O }) : A : A;
1441
+ }, M = (p) => {
1442
+ const y = i.value[p];
1443
+ return o.value.view === "gantt" && y.indent === 0;
1444
+ }, L = (p) => o.value.view !== "tree" || a.value[p].isRoot || a.value[p].open, O = (p) => o.value.view !== "tree" ? "" : a.value[p].isRoot || a.value[p].isParent ? a.value[p].childrenOpen ? "-" : "+" : "", I = (p) => {
1445
+ if (o.value.view === "tree") {
1446
+ a.value[p].childrenOpen = !a.value[p].childrenOpen;
1447
+ for (let y = i.value.length - 1; y >= 0; y--)
1448
+ a.value[y].parent === p && (a.value[y].open = !a.value[y].open, a.value[y].childrenOpen && I(y));
1449
+ } else o.value.view === "list-expansion" && (a.value[p].expanded = !a.value[p].expanded);
1450
+ }, T = (p, y) => {
1451
+ const $ = w(p, y);
1452
+ return z(p, y, $);
1453
+ }, z = (p, y, $) => {
1454
+ const R = u.value[p], W = i.value[y], se = R.format;
1455
+ return se ? typeof se == "function" ? se($, { table: s.value, row: W, column: R }) : typeof se == "string" ? Function(`"use strict";return (${se})`)()($, { table: s.value, row: W, column: R }) : $ : $;
1420
1456
  };
1421
1457
  return {
1422
1458
  // state
1423
- columns: c,
1424
- config: a,
1425
- display: r,
1426
- modal: s,
1427
- rows: l,
1428
- table: u,
1429
- updates: v,
1459
+ columns: u,
1460
+ config: o,
1461
+ display: a,
1462
+ modal: c,
1463
+ rows: i,
1464
+ table: s,
1465
+ updates: d,
1430
1466
  // getters
1431
1467
  hasPinnedColumns: m,
1432
- numberedRowWidth: y,
1433
- zeroColumn: h,
1468
+ numberedRowWidth: g,
1469
+ zeroColumn: b,
1434
1470
  // actions
1435
- closeModal: (g) => {
1436
- var w;
1437
- g.target instanceof Node && (w = s.value.parent) != null && w.contains(g.target) || s.value.visible && (s.value.visible = !1);
1471
+ closeModal: (p) => {
1472
+ var y;
1473
+ p.target instanceof Node && (y = c.value.parent) != null && y.contains(p.target) || c.value.visible && (c.value.visible = !1);
1438
1474
  },
1439
- getCellData: x,
1475
+ getCellData: w,
1440
1476
  getCellDisplayValue: T,
1441
- getFormattedValue: H,
1442
- getHeaderCellStyle: p,
1443
- resizeColumn: M,
1444
- getIndent: (g, w) => w && g === 0 && w > 0 ? `${w}ch` : "inherit",
1445
- getRowExpandSymbol: ae,
1446
- isRowGantt: $,
1447
- isRowVisible: k,
1477
+ getFormattedValue: z,
1478
+ getHeaderCellStyle: h,
1479
+ resizeColumn: C,
1480
+ getIndent: (p, y) => y && p === 0 && y > 0 ? `${y}ch` : "inherit",
1481
+ getRowExpandSymbol: O,
1482
+ isRowGantt: M,
1483
+ isRowVisible: L,
1448
1484
  setCellData: f,
1449
- setCellText: d,
1450
- toggleRowExpand: C,
1451
- updateGanttBar: (g) => {
1452
- var A;
1453
- const w = (A = l.value[g.rowIndex]) == null ? void 0 : A.gantt;
1454
- w && (g.type === "resize" ? g.edge === "start" ? (w.startIndex = g.newStart, w.endIndex = g.end, w.colspan = w.endIndex - w.startIndex) : g.edge === "end" && (w.startIndex = g.start, w.endIndex = g.newEnd, w.colspan = w.endIndex - w.startIndex) : g.type === "bar" && (w.startIndex = g.newStart, w.endIndex = g.newEnd, w.colspan = w.endIndex - w.startIndex));
1485
+ setCellText: v,
1486
+ toggleRowExpand: I,
1487
+ updateGanttBar: (p) => {
1488
+ var $;
1489
+ const y = ($ = i.value[p.rowIndex]) == null ? void 0 : $.gantt;
1490
+ y && (p.type === "resize" ? p.edge === "start" ? (y.startIndex = p.newStart, y.endIndex = p.end, y.colspan = y.endIndex - y.startIndex) : p.edge === "end" && (y.startIndex = p.start, y.endIndex = p.newEnd, y.colspan = y.endIndex - y.startIndex) : p.type === "bar" && (y.startIndex = p.newStart, y.endIndex = p.newEnd, y.colspan = y.endIndex - y.startIndex));
1455
1491
  }
1456
1492
  };
1457
1493
  })();
1458
- }, bn = /* @__PURE__ */ Z({
1494
+ }, kn = /* @__PURE__ */ K({
1459
1495
  __name: "ATable",
1460
- props: {
1496
+ props: /* @__PURE__ */ He({
1461
1497
  id: {},
1462
- modelValue: {},
1463
1498
  columns: {},
1464
1499
  rows: { default: () => [] },
1465
1500
  config: { default: () => new Object() }
1466
- },
1467
- emits: ["update:modelValue", "cellUpdate", "gantt:drag"],
1501
+ }, {
1502
+ modelValue: { required: !0 },
1503
+ modelModifiers: {}
1504
+ }),
1505
+ emits: /* @__PURE__ */ He(["cellUpdate", "gantt:drag"], ["update:modelValue"]),
1468
1506
  setup(e, { expose: t, emit: n }) {
1469
- const o = n, i = N("table"), c = e.modelValue ? e.modelValue : e.rows, l = yn({ columns: e.columns, rows: c, id: e.id, config: e.config });
1470
- l.$onAction(({ name: s, store: v, args: m, after: y }) => {
1471
- if (s === "setCellData" || s === "setCellText") {
1472
- const [h, x, f] = m, d = v.getCellData(h, x);
1473
- y(() => {
1474
- o("cellUpdate", { colIndex: h, rowIndex: x, newValue: f, oldValue: d });
1507
+ const l = pt(e, "modelValue"), r = n, u = G("table"), i = l.value.length > 0 ? l.value : e.rows, o = In({ columns: e.columns, rows: i, id: e.id, config: e.config });
1508
+ o.$onAction(({ name: d, store: m, args: g, after: b }) => {
1509
+ if (d === "setCellData" || d === "setCellText") {
1510
+ const [w, f, v] = g, h = m.getCellData(w, f);
1511
+ b(() => {
1512
+ l.value = [...m.rows], r("cellUpdate", { colIndex: w, rowIndex: f, newValue: v, oldValue: h });
1475
1513
  });
1476
- } else if (s === "updateGanttBar") {
1477
- const [h] = m;
1478
- let x = !1;
1479
- h.type === "resize" ? x = h.oldColspan !== h.newColspan : h.type === "bar" && (x = h.oldStart !== h.newStart || h.oldEnd !== h.newEnd), x && y(() => {
1480
- o("gantt:drag", h);
1514
+ } else if (d === "updateGanttBar") {
1515
+ const [w] = g;
1516
+ let f = !1;
1517
+ w.type === "resize" ? f = w.oldColspan !== w.newColspan : w.type === "bar" && (f = w.oldStart !== w.newStart || w.oldEnd !== w.newEnd), f && b(() => {
1518
+ r("gantt:drag", w);
1481
1519
  });
1482
1520
  }
1483
- }), B(
1484
- () => l.rows,
1485
- (s) => {
1486
- o("update:modelValue", s);
1521
+ }), N(
1522
+ () => l.value,
1523
+ (d) => {
1524
+ JSON.stringify(d) !== JSON.stringify(o.rows) && (o.rows = [...d]);
1487
1525
  },
1488
1526
  { deep: !0 }
1489
- ), Q(() => {
1490
- e.columns.some((s) => s.pinned) && (u(), l.config.view === "tree" && nt(i, u, { childList: !0, subtree: !0 }));
1527
+ ), Z(() => {
1528
+ e.columns.some((d) => d.pinned) && (a(), o.config.view === "tree" && ot(u, a, { childList: !0, subtree: !0 }));
1491
1529
  });
1492
- const a = I(() => l.columns.filter((s) => s.pinned).length), u = () => {
1493
- const s = i.value, v = s == null ? void 0 : s.rows[0], m = s == null ? void 0 : s.rows[1], y = v ? Array.from(v.cells) : [];
1494
- for (const [h, x] of y.entries()) {
1495
- const f = m == null ? void 0 : m.cells[h];
1496
- f && (x.style.width = `${f.offsetWidth}px`);
1530
+ const s = k(() => o.columns.filter((d) => d.pinned).length), a = () => {
1531
+ const d = u.value, m = d == null ? void 0 : d.rows[0], g = d == null ? void 0 : d.rows[1], b = m ? Array.from(m.cells) : [];
1532
+ for (const [w, f] of b.entries()) {
1533
+ const v = g == null ? void 0 : g.cells[w];
1534
+ v && (f.style.width = `${v.offsetWidth}px`);
1497
1535
  }
1498
- for (const h of (s == null ? void 0 : s.rows) || []) {
1499
- let x = 0;
1500
- const f = [];
1501
- for (const d of h.cells)
1502
- (d.classList.contains("sticky-column") || d.classList.contains("sticky-index")) && (d.style.left = `${x}px`, x += d.offsetWidth, f.push(d));
1503
- f.length > 0 && f[f.length - 1].classList.add("sticky-column-edge");
1536
+ for (const w of (d == null ? void 0 : d.rows) || []) {
1537
+ let f = 0;
1538
+ const v = [];
1539
+ for (const h of w.cells)
1540
+ (h.classList.contains("sticky-column") || h.classList.contains("sticky-index")) && (h.style.left = `${f}px`, f += h.offsetWidth, v.push(h));
1541
+ v.length > 0 && v[v.length - 1].classList.add("sticky-column-edge");
1504
1542
  }
1505
1543
  };
1506
- window.addEventListener("keydown", (s) => {
1507
- if (s.key === "Escape" && l.modal.visible) {
1508
- l.modal.visible = !1;
1509
- const v = l.modal.parent;
1510
- v && Qe().then(() => {
1511
- v.focus();
1544
+ window.addEventListener("keydown", (d) => {
1545
+ if (d.key === "Escape" && o.modal.visible) {
1546
+ o.modal.visible = !1;
1547
+ const m = o.modal.parent;
1548
+ m && Ze().then(() => {
1549
+ m.focus();
1512
1550
  });
1513
1551
  }
1514
1552
  });
1515
- const r = (s) => {
1516
- var y;
1517
- if (!(s.indent === 0) || a.value === 0)
1518
- return l.columns;
1519
- const m = [];
1520
- for (let h = 0; h < a.value; h++) {
1521
- const x = { ...l.columns[h] };
1522
- x.originalIndex = h, m.push(x);
1553
+ const c = (d) => {
1554
+ var b;
1555
+ if (!(d.indent === 0) || s.value === 0)
1556
+ return o.columns;
1557
+ const g = [];
1558
+ for (let w = 0; w < s.value; w++) {
1559
+ const f = { ...o.columns[w] };
1560
+ f.originalIndex = w, g.push(f);
1523
1561
  }
1524
- return m.push({
1525
- ...l.columns[a.value],
1562
+ return g.push({
1563
+ ...o.columns[s.value],
1526
1564
  isGantt: !0,
1527
- colspan: ((y = s.gantt) == null ? void 0 : y.colspan) || l.columns.length - a.value,
1528
- originalIndex: a.value,
1565
+ colspan: ((b = d.gantt) == null ? void 0 : b.colspan) || o.columns.length - s.value,
1566
+ originalIndex: s.value,
1529
1567
  width: "auto"
1530
1568
  // TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
1531
- }), m;
1569
+ }), g;
1532
1570
  };
1533
- return t({ store: l }), (s, v) => he((S(), R("table", {
1571
+ return t({ store: o }), (d, m) => he((S(), A("table", {
1534
1572
  ref: "table",
1535
1573
  class: "atable",
1536
- style: q({
1537
- width: b(l).config.fullWidth ? "100%" : "auto"
1574
+ style: J({
1575
+ width: x(o).config.fullWidth ? "100%" : "auto"
1538
1576
  })
1539
1577
  }, [
1540
- z(s.$slots, "header", { data: b(l) }, () => [
1541
- He(at, {
1542
- columns: b(l).columns,
1543
- store: b(l)
1578
+ B(d.$slots, "header", { data: x(o) }, () => [
1579
+ ze(st, {
1580
+ columns: x(o).columns,
1581
+ store: x(o)
1544
1582
  }, null, 8, ["columns", "store"])
1545
1583
  ], !0),
1546
- L("tbody", null, [
1547
- z(s.$slots, "body", { data: b(l) }, () => [
1548
- (S(!0), R(ie, null, ke(b(l).rows, (m, y) => (S(), re(ot, {
1549
- key: m.id,
1550
- row: m,
1551
- rowIndex: y,
1552
- store: b(l)
1584
+ D("tbody", null, [
1585
+ B(d.$slots, "body", { data: x(o) }, () => [
1586
+ (S(!0), A(ie, null, ke(x(o).rows, (g, b) => (S(), re(lt, {
1587
+ key: g.id,
1588
+ row: g,
1589
+ rowIndex: b,
1590
+ store: x(o)
1553
1591
  }, {
1554
- default: ze(() => [
1555
- (S(!0), R(ie, null, ke(r(m), (h, x) => {
1556
- var f, d, p;
1557
- return S(), R(ie, {
1558
- key: h.name
1592
+ default: Be(() => [
1593
+ (S(!0), A(ie, null, ke(c(g), (w, f) => {
1594
+ var v, h, C;
1595
+ return S(), A(ie, {
1596
+ key: w.name
1559
1597
  }, [
1560
- h.isGantt ? (S(), re(fe(h.ganttComponent || "AGanttCell"), {
1598
+ w.isGantt ? (S(), re(fe(w.ganttComponent || "AGanttCell"), {
1561
1599
  key: 0,
1562
- store: b(l),
1563
- columnsCount: b(l).columns.length - a.value,
1564
- color: (f = m.gantt) == null ? void 0 : f.color,
1565
- start: (d = m.gantt) == null ? void 0 : d.startIndex,
1566
- end: (p = m.gantt) == null ? void 0 : p.endIndex,
1567
- colspan: h.colspan,
1568
- pinned: h.pinned,
1569
- rowIndex: y,
1570
- colIndex: h.originalIndex ?? x,
1571
- style: q({
1572
- textAlign: (h == null ? void 0 : h.align) || "center",
1573
- minWidth: (h == null ? void 0 : h.width) || "40ch",
1574
- width: b(l).config.fullWidth ? "auto" : null
1600
+ store: x(o),
1601
+ columnsCount: x(o).columns.length - s.value,
1602
+ color: (v = g.gantt) == null ? void 0 : v.color,
1603
+ start: (h = g.gantt) == null ? void 0 : h.startIndex,
1604
+ end: (C = g.gantt) == null ? void 0 : C.endIndex,
1605
+ colspan: w.colspan,
1606
+ pinned: w.pinned,
1607
+ rowIndex: b,
1608
+ colIndex: w.originalIndex ?? f,
1609
+ style: J({
1610
+ textAlign: (w == null ? void 0 : w.align) || "center",
1611
+ minWidth: (w == null ? void 0 : w.width) || "40ch",
1612
+ width: x(o).config.fullWidth ? "auto" : null
1575
1613
  })
1576
- }, null, 8, ["store", "columnsCount", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (S(), re(fe(h.cellComponent || "ACell"), {
1614
+ }, null, 8, ["store", "columnsCount", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (S(), re(fe(w.cellComponent || "ACell"), {
1577
1615
  key: 1,
1578
- store: b(l),
1579
- pinned: h.pinned,
1580
- rowIndex: y,
1581
- colIndex: x,
1582
- style: q({
1583
- textAlign: (h == null ? void 0 : h.align) || "center",
1584
- width: b(l).config.fullWidth ? "auto" : null
1616
+ store: x(o),
1617
+ pinned: w.pinned,
1618
+ rowIndex: b,
1619
+ colIndex: f,
1620
+ style: J({
1621
+ textAlign: (w == null ? void 0 : w.align) || "center",
1622
+ width: x(o).config.fullWidth ? "auto" : null
1585
1623
  }),
1586
1624
  spellcheck: "false"
1587
1625
  }, null, 8, ["store", "pinned", "rowIndex", "colIndex", "style"]))
@@ -1592,59 +1630,59 @@ const gn = { key: 0 }, pn = {
1592
1630
  }, 1032, ["row", "rowIndex", "store"]))), 128))
1593
1631
  ], !0)
1594
1632
  ]),
1595
- z(s.$slots, "footer", { data: b(l) }, void 0, !0),
1596
- z(s.$slots, "modal", { data: b(l) }, () => [
1597
- he(He(st, { store: b(l) }, {
1598
- default: ze(() => [
1599
- (S(), re(fe(b(l).modal.component), Se({
1600
- key: `${b(l).modal.rowIndex}:${b(l).modal.colIndex}`,
1601
- colIndex: b(l).modal.colIndex,
1602
- rowIndex: b(l).modal.rowIndex,
1603
- store: b(l)
1604
- }, b(l).modal.componentProps), null, 16, ["colIndex", "rowIndex", "store"]))
1633
+ B(d.$slots, "footer", { data: x(o) }, void 0, !0),
1634
+ B(d.$slots, "modal", { data: x(o) }, () => [
1635
+ he(ze(rt, { store: x(o) }, {
1636
+ default: Be(() => [
1637
+ (S(), re(fe(x(o).modal.component), Se({
1638
+ key: `${x(o).modal.rowIndex}:${x(o).modal.colIndex}`,
1639
+ colIndex: x(o).modal.colIndex,
1640
+ rowIndex: x(o).modal.rowIndex,
1641
+ store: x(o)
1642
+ }, x(o).modal.componentProps), null, 16, ["colIndex", "rowIndex", "store"]))
1605
1643
  ]),
1606
1644
  _: 1
1607
1645
  }, 8, ["store"]), [
1608
- [Ke, b(l).modal.visible]
1646
+ [_e, x(o).modal.visible]
1609
1647
  ])
1610
1648
  ], !0)
1611
1649
  ], 4)), [
1612
- [b(un), b(l).closeModal]
1650
+ [x(mn), x(o).closeModal]
1613
1651
  ]);
1614
1652
  }
1615
- }), xn = /* @__PURE__ */ le(bn, [["__scopeId", "data-v-785e5fa3"]]), Cn = {}, En = { class: "aloading" }, In = { class: "aloading-header" };
1616
- function kn(e, t) {
1617
- return S(), R("div", En, [
1618
- L("h2", In, [
1619
- z(e.$slots, "default", {}, void 0, !0)
1653
+ }), Mn = /* @__PURE__ */ ae(kn, [["__scopeId", "data-v-85571dc2"]]), Sn = {}, $n = { class: "aloading" }, An = { class: "aloading-header" };
1654
+ function Tn(e, t) {
1655
+ return S(), A("div", $n, [
1656
+ D("h2", An, [
1657
+ B(e.$slots, "default", {}, void 0, !0)
1620
1658
  ]),
1621
- t[0] || (t[0] = L("div", { class: "aloading-bar" }, null, -1))
1659
+ t[0] || (t[0] = D("div", { class: "aloading-bar" }, null, -1))
1622
1660
  ]);
1623
1661
  }
1624
- const Mn = /* @__PURE__ */ le(Cn, [["render", kn], ["__scopeId", "data-v-a930a25b"]]), Sn = {}, $n = { class: "aloading" }, An = { class: "aloading-header" };
1625
- function Rn(e, t) {
1626
- return S(), R("div", $n, [
1627
- L("h2", An, [
1628
- z(e.$slots, "default", {}, void 0, !0)
1662
+ const Rn = /* @__PURE__ */ ae(Sn, [["render", Tn], ["__scopeId", "data-v-a930a25b"]]), On = {}, Pn = { class: "aloading" }, Ln = { class: "aloading-header" };
1663
+ function Dn(e, t) {
1664
+ return S(), A("div", Pn, [
1665
+ D("h2", Ln, [
1666
+ B(e.$slots, "default", {}, void 0, !0)
1629
1667
  ]),
1630
- t[0] || (t[0] = L("div", { class: "aloading-bar" }, null, -1))
1668
+ t[0] || (t[0] = D("div", { class: "aloading-bar" }, null, -1))
1631
1669
  ]);
1632
1670
  }
1633
- const Tn = /* @__PURE__ */ le(Sn, [["render", Rn], ["__scopeId", "data-v-e1165876"]]);
1634
- function Dn(e) {
1635
- e.component("ACell", Jt), e.component("AExpansionRow", en), e.component("AGanttCell", an), e.component("ARow", ot), e.component("ATable", xn), e.component("ATableHeader", at), e.component("ATableLoading", Mn), e.component("ATableLoadingBar", Tn), e.component("ATableModal", st);
1671
+ const Wn = /* @__PURE__ */ ae(On, [["render", Dn], ["__scopeId", "data-v-e1165876"]]);
1672
+ function Nn(e) {
1673
+ e.component("ACell", en), e.component("AExpansionRow", an), e.component("AGanttCell", dn), e.component("ARow", lt), e.component("ATable", Mn), e.component("ATableHeader", st), e.component("ATableLoading", Rn), e.component("ATableLoadingBar", Wn), e.component("ATableModal", rt);
1636
1674
  }
1637
1675
  export {
1638
- Jt as ACell,
1639
- en as AExpansionRow,
1640
- an as AGanttCell,
1641
- ot as ARow,
1642
- xn as ATable,
1643
- at as ATableHeader,
1644
- Mn as ATableLoading,
1645
- Tn as ATableLoadingBar,
1646
- st as ATableModal,
1647
- yn as createTableStore,
1648
- Dn as install
1676
+ en as ACell,
1677
+ an as AExpansionRow,
1678
+ dn as AGanttCell,
1679
+ lt as ARow,
1680
+ Mn as ATable,
1681
+ st as ATableHeader,
1682
+ Rn as ATableLoading,
1683
+ Wn as ATableLoadingBar,
1684
+ rt as ATableModal,
1685
+ In as createTableStore,
1686
+ Nn as install
1649
1687
  };
1650
1688
  //# sourceMappingURL=atable.js.map