@stonecrop/atable 0.4.32 → 0.4.34

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,13 +1,13 @@
1
- import { onMounted as ae, ref as H, watch as V, onBeforeUnmount as At, computed as S, shallowRef as G, toValue as $, watchEffect as Dt, getCurrentScope as gt, onScopeDispose as pt, unref as k, getCurrentInstance as Se, nextTick as wt, isRef as Tt, toRefs as Ot, customRef as yt, toRef as Ht, readonly as Pt, defineComponent as ee, useTemplateRef as j, createElementBlock as D, openBlock as M, normalizeClass as U, normalizeStyle as _, createBlock as re, resolveDynamicComponent as Ie, mergeProps as Ge, toDisplayString as ie, Fragment as oe, createElementVNode as z, createCommentVNode as q, renderSlot as F, useCssVars as Lt, onUnmounted as Bt, withModifiers as $e, withDirectives as Me, vShow as bt, renderList as ge, createTextVNode as zt, mergeModels as ot, useModel as lt, createVNode as at, withCtx as st } from "vue";
2
- import { defineStore as Wt } from "pinia";
3
- import './assets/index.css';function Ne(e) {
4
- return gt() ? (pt(e), !0) : !1;
1
+ import { onMounted as re, ref as z, watch as V, onBeforeUnmount as At, computed as D, shallowRef as G, toValue as M, watchEffect as Tt, getCurrentScope as wt, onScopeDispose as yt, unref as R, getCurrentInstance as Ae, nextTick as Fe, isRef as Dt, toRefs as Ot, customRef as xt, toRef as Ht, readonly as Pt, defineComponent as te, useTemplateRef as U, createElementBlock as L, openBlock as T, normalizeClass as q, normalizeStyle as ee, createBlock as ce, resolveDynamicComponent as ke, mergeProps as Ve, toDisplayString as ue, Fragment as ae, createElementVNode as N, createCommentVNode as J, renderSlot as j, useCssVars as Lt, onUnmounted as Bt, withModifiers as Se, withDirectives as Me, vShow as bt, renderList as pe, createTextVNode as Wt, mergeModels as at, useModel as st, createVNode as rt, withCtx as it } from "vue";
2
+ import { defineStore as zt } from "pinia";
3
+ import './assets/index.css';function Ye(e) {
4
+ return wt() ? (yt(e), !0) : !1;
5
5
  }
6
- const Xt = typeof window < "u" && typeof document < "u";
6
+ const Nt = typeof window < "u" && typeof document < "u";
7
7
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
8
- const Gt = (e) => e != null, Nt = Object.prototype.toString, Vt = (e) => Nt.call(e) === "[object Object]", Ft = () => {
8
+ const Xt = (e) => e != null, Gt = Object.prototype.toString, Ft = (e) => Gt.call(e) === "[object Object]", Vt = () => {
9
9
  };
10
- function Ee(e) {
10
+ function $e(e) {
11
11
  return Array.isArray(e) ? e : [e];
12
12
  }
13
13
  function Yt(e, t, o) {
@@ -20,37 +20,37 @@ function Yt(e, t, o) {
20
20
  }
21
21
  );
22
22
  }
23
- const de = Xt ? window : void 0;
24
- function ce(e) {
23
+ const ve = Nt ? window : void 0;
24
+ function de(e) {
25
25
  var t;
26
- const o = $(e);
26
+ const o = M(e);
27
27
  return (t = o?.$el) != null ? t : o;
28
28
  }
29
- function pe(...e) {
29
+ function we(...e) {
30
30
  const t = [], o = () => {
31
31
  t.forEach((n) => n()), t.length = 0;
32
- }, s = (n, l, d, f) => (n.addEventListener(l, d, f), () => n.removeEventListener(l, d, f)), i = S(() => {
33
- const n = Ee($(e[0])).filter((l) => l != null);
32
+ }, s = (n, l, d, f) => (n.addEventListener(l, d, f), () => n.removeEventListener(l, d, f)), i = D(() => {
33
+ const n = $e(M(e[0])).filter((l) => l != null);
34
34
  return n.every((l) => typeof l != "string") ? n : void 0;
35
35
  }), c = Yt(
36
36
  () => {
37
37
  var n, l;
38
38
  return [
39
- (l = (n = i.value) == null ? void 0 : n.map((d) => ce(d))) != null ? l : [de].filter((d) => d != null),
40
- Ee($(i.value ? e[1] : e[0])),
41
- Ee(k(i.value ? e[2] : e[1])),
39
+ (l = (n = i.value) == null ? void 0 : n.map((d) => de(d))) != null ? l : [ve].filter((d) => d != null),
40
+ $e(M(i.value ? e[1] : e[0])),
41
+ $e(R(i.value ? e[2] : e[1])),
42
42
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
43
- $(i.value ? e[3] : e[2])
43
+ M(i.value ? e[3] : e[2])
44
44
  ];
45
45
  },
46
46
  ([n, l, d, f]) => {
47
47
  if (o(), !n?.length || !l?.length || !d?.length)
48
48
  return;
49
- const w = Vt(f) ? { ...f } : f;
49
+ const p = Ft(f) ? { ...f } : f;
50
50
  t.push(
51
51
  ...n.flatMap(
52
- (y) => l.flatMap(
53
- (m) => d.map((C) => s(y, m, C, w))
52
+ (x) => l.flatMap(
53
+ (m) => d.map((I) => s(x, m, I, p))
54
54
  )
55
55
  )
56
56
  );
@@ -59,61 +59,61 @@ function pe(...e) {
59
59
  ), r = () => {
60
60
  c(), o();
61
61
  };
62
- return Ne(o), r;
62
+ return Ye(o), r;
63
63
  }
64
64
  // @__NO_SIDE_EFFECTS__
65
65
  function jt() {
66
- const e = G(!1), t = Se();
67
- return t && ae(() => {
66
+ const e = G(!1), t = Ae();
67
+ return t && re(() => {
68
68
  e.value = !0;
69
69
  }, t), e;
70
70
  }
71
71
  // @__NO_SIDE_EFFECTS__
72
72
  function Ut(e) {
73
73
  const t = /* @__PURE__ */ jt();
74
- return S(() => (t.value, !!e()));
74
+ return D(() => (t.value, !!e()));
75
75
  }
76
76
  function qt(e, t, o = {}) {
77
- const { window: s = de, ...i } = o;
77
+ const { window: s = ve, ...i } = o;
78
78
  let c;
79
79
  const r = /* @__PURE__ */ Ut(() => s && "MutationObserver" in s), n = () => {
80
80
  c && (c.disconnect(), c = void 0);
81
- }, l = S(() => {
82
- const y = $(e), m = Ee(y).map(ce).filter(Gt);
81
+ }, l = D(() => {
82
+ const x = M(e), m = $e(x).map(de).filter(Xt);
83
83
  return new Set(m);
84
84
  }), d = V(
85
85
  () => l.value,
86
- (y) => {
87
- n(), r.value && y.size && (c = new MutationObserver(t), y.forEach((m) => c.observe(m, i)));
86
+ (x) => {
87
+ n(), r.value && x.size && (c = new MutationObserver(t), x.forEach((m) => c.observe(m, i)));
88
88
  },
89
89
  { immediate: !0, flush: "post" }
90
- ), f = () => c?.takeRecords(), w = () => {
90
+ ), f = () => c?.takeRecords(), p = () => {
91
91
  d(), n();
92
92
  };
93
- return Ne(w), {
93
+ return Ye(p), {
94
94
  isSupported: r,
95
- stop: w,
95
+ stop: p,
96
96
  takeRecords: f
97
97
  };
98
98
  }
99
99
  function Jt(e, t, o = {}) {
100
100
  const {
101
- window: s = de,
101
+ window: s = ve,
102
102
  document: i = s?.document,
103
103
  flush: c = "sync"
104
104
  } = o;
105
105
  if (!s || !i)
106
- return Ft;
106
+ return Vt;
107
107
  let r;
108
108
  const n = (f) => {
109
109
  r?.(), r = f;
110
- }, l = Dt(() => {
111
- const f = ce(e);
110
+ }, l = Tt(() => {
111
+ const f = de(e);
112
112
  if (f) {
113
- const { stop: w } = qt(
113
+ const { stop: p } = qt(
114
114
  i,
115
- (y) => {
116
- y.map((m) => [...m.removedNodes]).flat().some((m) => m === f || m.contains(f)) && t(y);
115
+ (x) => {
116
+ x.map((m) => [...m.removedNodes]).flat().some((m) => m === f || m.contains(f)) && t(x);
117
117
  },
118
118
  {
119
119
  window: s,
@@ -121,18 +121,18 @@ function Jt(e, t, o = {}) {
121
121
  subtree: !0
122
122
  }
123
123
  );
124
- n(w);
124
+ n(p);
125
125
  }
126
126
  }, { flush: c }), d = () => {
127
127
  l(), n();
128
128
  };
129
- return Ne(d), d;
129
+ return Ye(d), d;
130
130
  }
131
131
  // @__NO_SIDE_EFFECTS__
132
132
  function Zt(e = {}) {
133
133
  var t;
134
134
  const {
135
- window: o = de,
135
+ window: o = ve,
136
136
  deep: s = !0,
137
137
  triggerOnRemoval: i = !1
138
138
  } = e, c = (t = e.document) != null ? t : o?.document, r = () => {
@@ -150,14 +150,14 @@ function Zt(e = {}) {
150
150
  capture: !0,
151
151
  passive: !0
152
152
  };
153
- pe(
153
+ we(
154
154
  o,
155
155
  "blur",
156
156
  (f) => {
157
157
  f.relatedTarget === null && l();
158
158
  },
159
159
  d
160
- ), pe(
160
+ ), we(
161
161
  o,
162
162
  "focus",
163
163
  l,
@@ -168,19 +168,19 @@ function Zt(e = {}) {
168
168
  }
169
169
  const Qt = "focusin", Kt = "focusout", _t = ":focus-within";
170
170
  function en(e, t = {}) {
171
- const { window: o = de } = t, s = S(() => ce(e)), i = G(!1), c = S(() => i.value);
171
+ const { window: o = ve } = t, s = D(() => de(e)), i = G(!1), c = D(() => i.value);
172
172
  if (!o || !(/* @__PURE__ */ Zt(t)).value)
173
173
  return { focused: c };
174
174
  const r = { passive: !0 };
175
- return pe(s, Qt, () => i.value = !0, r), pe(s, Kt, () => {
175
+ return we(s, Qt, () => i.value = !0, r), we(s, Kt, () => {
176
176
  var n, l, d;
177
177
  return i.value = (d = (l = (n = s.value) == null ? void 0 : n.matches) == null ? void 0 : l.call(n, _t)) != null ? d : !1;
178
178
  }, r), { focused: c };
179
179
  }
180
- function tn(e, { window: t = de, scrollTarget: o } = {}) {
181
- const s = H(!1), i = () => {
180
+ function tn(e, { window: t = ve, scrollTarget: o } = {}) {
181
+ const s = z(!1), i = () => {
182
182
  if (!t) return;
183
- const c = t.document, r = ce(e);
183
+ const c = t.document, r = de(e);
184
184
  if (!r)
185
185
  s.value = !1;
186
186
  else {
@@ -189,21 +189,21 @@ function tn(e, { window: t = de, scrollTarget: o } = {}) {
189
189
  }
190
190
  };
191
191
  return V(
192
- () => ce(e),
192
+ () => de(e),
193
193
  () => i(),
194
194
  { immediate: !0, flush: "post" }
195
- ), t && pe(o || t, "scroll", i, {
195
+ ), t && we(o || t, "scroll", i, {
196
196
  capture: !1,
197
197
  passive: !0
198
198
  }), s;
199
199
  }
200
- const Z = (e) => {
200
+ const Q = (e) => {
201
201
  let t = tn(e).value;
202
202
  return t = t && e.offsetHeight > 0, t;
203
- }, Q = (e) => e.tabIndex >= 0, rt = (e) => {
203
+ }, K = (e) => e.tabIndex >= 0, ct = (e) => {
204
204
  const t = e.target;
205
- return Ve(t);
206
- }, Ve = (e) => {
205
+ return je(t);
206
+ }, je = (e) => {
207
207
  let t;
208
208
  if (e instanceof HTMLTableCellElement) {
209
209
  const o = e.parentElement?.previousElementSibling;
@@ -215,7 +215,7 @@ const Z = (e) => {
215
215
  const o = e.previousElementSibling;
216
216
  o && (t = o);
217
217
  }
218
- return t && (!Q(t) || !Z(t)) ? Ve(t) : t;
218
+ return t && (!K(t) || !Q(t)) ? je(t) : t;
219
219
  }, nn = (e) => {
220
220
  const t = e.target;
221
221
  let o;
@@ -232,11 +232,11 @@ const Z = (e) => {
232
232
  i && (o = i);
233
233
  }
234
234
  }
235
- return o && (!Q(o) || !Z(o)) ? Fe(o) : o;
236
- }, it = (e) => {
235
+ return o && (!K(o) || !Q(o)) ? Ue(o) : o;
236
+ }, ut = (e) => {
237
237
  const t = e.target;
238
- return Fe(t);
239
- }, Fe = (e) => {
238
+ return Ue(t);
239
+ }, Ue = (e) => {
240
240
  let t;
241
241
  if (e instanceof HTMLTableCellElement) {
242
242
  const o = e.parentElement?.nextElementSibling;
@@ -248,7 +248,7 @@ const Z = (e) => {
248
248
  const o = e.nextElementSibling;
249
249
  o && (t = o);
250
250
  }
251
- return t && (!Q(t) || !Z(t)) ? Fe(t) : t;
251
+ return t && (!K(t) || !Q(t)) ? Ue(t) : t;
252
252
  }, on = (e) => {
253
253
  const t = e.target;
254
254
  let o;
@@ -265,45 +265,45 @@ const Z = (e) => {
265
265
  i && (o = i);
266
266
  }
267
267
  }
268
- return o && (!Q(o) || !Z(o)) ? Ve(o) : o;
269
- }, ct = (e) => {
268
+ return o && (!K(o) || !Q(o)) ? je(o) : o;
269
+ }, dt = (e) => {
270
270
  const t = e.target;
271
- return Ye(t);
272
- }, Ye = (e) => {
271
+ return qe(t);
272
+ }, qe = (e) => {
273
273
  let t;
274
- return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (!Q(t) || !Z(t)) ? Ye(t) : t;
275
- }, ut = (e) => {
274
+ return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (!K(t) || !Q(t)) ? qe(t) : t;
275
+ }, ft = (e) => {
276
276
  const t = e.target;
277
- return je(t);
278
- }, je = (e) => {
277
+ return Je(t);
278
+ }, Je = (e) => {
279
279
  let t;
280
- return e.nextElementSibling ? t = e.nextElementSibling : t = e.parentElement?.nextElementSibling?.firstElementChild, t && (!Q(t) || !Z(t)) ? je(t) : t;
281
- }, dt = (e) => {
280
+ return e.nextElementSibling ? t = e.nextElementSibling : t = e.parentElement?.nextElementSibling?.firstElementChild, t && (!K(t) || !Q(t)) ? Je(t) : t;
281
+ }, vt = (e) => {
282
282
  const t = e.target.parentElement?.firstElementChild;
283
- return t && (!Q(t) || !Z(t)) ? je(t) : t;
284
- }, ft = (e) => {
283
+ return t && (!K(t) || !Q(t)) ? Je(t) : t;
284
+ }, mt = (e) => {
285
285
  const t = e.target.parentElement?.lastElementChild;
286
- return t && (!Q(t) || !Z(t)) ? Ye(t) : t;
287
- }, xe = ["alt", "control", "shift", "meta"], ln = {
286
+ return t && (!K(t) || !Q(t)) ? qe(t) : t;
287
+ }, Ee = ["alt", "control", "shift", "meta"], ln = {
288
288
  ArrowUp: "up",
289
289
  ArrowDown: "down",
290
290
  ArrowLeft: "left",
291
291
  ArrowRight: "right"
292
- }, Ue = {
292
+ }, Ze = {
293
293
  "keydown.up": (e) => {
294
- const t = rt(e);
294
+ const t = ct(e);
295
295
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
296
296
  },
297
297
  "keydown.down": (e) => {
298
- const t = it(e);
298
+ const t = ut(e);
299
299
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
300
300
  },
301
301
  "keydown.left": (e) => {
302
- const t = ct(e);
302
+ const t = dt(e);
303
303
  e.preventDefault(), e.stopPropagation(), t && t.focus();
304
304
  },
305
305
  "keydown.right": (e) => {
306
- const t = ut(e);
306
+ const t = ft(e);
307
307
  e.preventDefault(), e.stopPropagation(), t && t.focus();
308
308
  },
309
309
  "keydown.control.up": (e) => {
@@ -315,45 +315,45 @@ const Z = (e) => {
315
315
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
316
316
  },
317
317
  "keydown.control.left": (e) => {
318
- const t = dt(e);
318
+ const t = vt(e);
319
319
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
320
320
  },
321
321
  "keydown.control.right": (e) => {
322
- const t = ft(e);
322
+ const t = mt(e);
323
323
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
324
324
  },
325
325
  "keydown.end": (e) => {
326
- const t = ft(e);
326
+ const t = mt(e);
327
327
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
328
328
  },
329
329
  "keydown.enter": (e) => {
330
330
  if (e.target instanceof HTMLTableCellElement) {
331
331
  e.preventDefault(), e.stopPropagation();
332
- const t = it(e);
332
+ const t = ut(e);
333
333
  t && t.focus();
334
334
  }
335
335
  },
336
336
  "keydown.shift.enter": (e) => {
337
337
  if (e.target instanceof HTMLTableCellElement) {
338
338
  e.preventDefault(), e.stopPropagation();
339
- const t = rt(e);
339
+ const t = ct(e);
340
340
  t && t.focus();
341
341
  }
342
342
  },
343
343
  "keydown.home": (e) => {
344
- const t = dt(e);
344
+ const t = vt(e);
345
345
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
346
346
  },
347
347
  "keydown.tab": (e) => {
348
- const t = ut(e);
348
+ const t = ft(e);
349
349
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
350
350
  },
351
351
  "keydown.shift.tab": (e) => {
352
- const t = ct(e);
352
+ const t = dt(e);
353
353
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
354
354
  }
355
355
  };
356
- function qe(e) {
356
+ function Qe(e) {
357
357
  const t = (r) => {
358
358
  let n = null;
359
359
  return r.parent && (typeof r.parent == "string" ? n = document.querySelector(r.parent) : r.parent instanceof HTMLElement ? n = r.parent : n = r.parent.value), n;
@@ -377,37 +377,37 @@ function qe(e) {
377
377
  }, s = (r) => {
378
378
  const n = t(r);
379
379
  let l = [];
380
- return r.selectors ? l = o(r) : n && (l = Array.from(n.children).filter((d) => Q(d) && Z(d))), l;
380
+ return r.selectors ? l = o(r) : n && (l = Array.from(n.children).filter((d) => K(d) && Q(d))), l;
381
381
  }, i = (r) => (n) => {
382
382
  const l = ln[n.key] || n.key.toLowerCase();
383
- if (xe.includes(l)) return;
384
- const d = r.handlers || Ue;
383
+ if (Ee.includes(l)) return;
384
+ const d = r.handlers || Ze;
385
385
  for (const f of Object.keys(d)) {
386
- const [w, ...y] = f.split(".");
387
- if (w === "keydown" && y.includes(l)) {
388
- const m = d[f], C = y.filter((v) => xe.includes(v)), b = xe.some((v) => {
389
- const h = v.charAt(0).toUpperCase() + v.slice(1);
390
- return n.getModifierState(h);
386
+ const [p, ...x] = f.split(".");
387
+ if (p === "keydown" && x.includes(l)) {
388
+ const m = d[f], I = x.filter((v) => Ee.includes(v)), w = Ee.some((v) => {
389
+ const g = v.charAt(0).toUpperCase() + v.slice(1);
390
+ return n.getModifierState(g);
391
391
  });
392
- if (C.length > 0) {
393
- if (b) {
394
- for (const v of xe)
395
- if (y.includes(v)) {
396
- const h = v.charAt(0).toUpperCase() + v.slice(1);
397
- n.getModifierState(h) && m(n);
392
+ if (I.length > 0) {
393
+ if (w) {
394
+ for (const v of Ee)
395
+ if (x.includes(v)) {
396
+ const g = v.charAt(0).toUpperCase() + v.slice(1);
397
+ n.getModifierState(g) && m(n);
398
398
  }
399
399
  }
400
400
  } else
401
- b || m(n);
401
+ w || m(n);
402
402
  }
403
403
  }
404
404
  }, c = [];
405
- ae(() => {
405
+ re(() => {
406
406
  for (const r of e) {
407
407
  const n = t(r), l = s(r), d = i(r), f = n ? [n] : l;
408
- for (const w of f) {
409
- const { focused: y } = en(H(w)), m = V(y, (C) => {
410
- C ? w.addEventListener("keydown", d) : w.removeEventListener("keydown", d);
408
+ for (const p of f) {
409
+ const { focused: x } = en(z(p)), m = V(x, (I) => {
410
+ I ? p.addEventListener("keydown", d) : p.removeEventListener("keydown", d);
411
411
  });
412
412
  c.push(m);
413
413
  }
@@ -417,22 +417,22 @@ function qe(e) {
417
417
  r();
418
418
  });
419
419
  }
420
- function fe(e) {
421
- return gt() ? (pt(e), !0) : !1;
420
+ function me(e) {
421
+ return wt() ? (yt(e), !0) : !1;
422
422
  }
423
- const Re = typeof window < "u" && typeof document < "u";
423
+ const Te = typeof window < "u" && typeof document < "u";
424
424
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
425
- const an = (e) => e != null, sn = Object.prototype.toString, xt = (e) => sn.call(e) === "[object Object]", J = () => {
426
- }, Xe = /* @__PURE__ */ rn();
425
+ const an = (e) => e != null, sn = Object.prototype.toString, Ct = (e) => sn.call(e) === "[object Object]", Z = () => {
426
+ }, Ge = /* @__PURE__ */ rn();
427
427
  function rn() {
428
428
  var e, t;
429
- return Re && ((e = window?.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window?.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
429
+ return Te && ((e = window?.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window?.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
430
430
  }
431
431
  function cn(...e) {
432
432
  if (e.length !== 1)
433
433
  return Ht(...e);
434
434
  const t = e[0];
435
- return typeof t == "function" ? Pt(yt(() => ({ get: t, set: J }))) : H(t);
435
+ return typeof t == "function" ? Pt(xt(() => ({ get: t, set: Z }))) : z(t);
436
436
  }
437
437
  function un(e, t) {
438
438
  function o(...s) {
@@ -443,27 +443,27 @@ function un(e, t) {
443
443
  return o;
444
444
  }
445
445
  function dn(e, t = {}) {
446
- let o, s, i = J;
446
+ let o, s, i = Z;
447
447
  const c = (l) => {
448
- clearTimeout(l), i(), i = J;
448
+ clearTimeout(l), i(), i = Z;
449
449
  };
450
450
  let r;
451
451
  return (l) => {
452
- const d = $(e), f = $(t.maxWait);
453
- return o && c(o), d <= 0 || f !== void 0 && f <= 0 ? (s && (c(s), s = void 0), Promise.resolve(l())) : new Promise((w, y) => {
454
- i = t.rejectOnCancel ? y : w, r = l, f && !s && (s = setTimeout(() => {
455
- o && c(o), s = void 0, w(r());
452
+ const d = M(e), f = M(t.maxWait);
453
+ return o && c(o), d <= 0 || f !== void 0 && f <= 0 ? (s && (c(s), s = void 0), Promise.resolve(l())) : new Promise((p, x) => {
454
+ i = t.rejectOnCancel ? x : p, r = l, f && !s && (s = setTimeout(() => {
455
+ o && c(o), s = void 0, p(r());
456
456
  }, f)), o = setTimeout(() => {
457
- s && c(s), s = void 0, w(l());
457
+ s && c(s), s = void 0, p(l());
458
458
  }, d);
459
459
  });
460
460
  };
461
461
  }
462
- function le(e) {
462
+ function se(e) {
463
463
  return Array.isArray(e) ? e : [e];
464
464
  }
465
465
  function fn(e) {
466
- return Se();
466
+ return Ae();
467
467
  }
468
468
  // @__NO_SIDE_EFFECTS__
469
469
  function vn(e, t = 200, o = {}) {
@@ -473,17 +473,17 @@ function vn(e, t = 200, o = {}) {
473
473
  );
474
474
  }
475
475
  function mn(e, t = {}) {
476
- if (!Tt(e))
476
+ if (!Dt(e))
477
477
  return Ot(e);
478
478
  const o = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
479
479
  for (const s in e.value)
480
- o[s] = yt(() => ({
480
+ o[s] = xt(() => ({
481
481
  get() {
482
482
  return e.value[s];
483
483
  },
484
484
  set(i) {
485
485
  var c;
486
- if ((c = $(t.replaceRef)) != null ? c : !0)
486
+ if ((c = M(t.replaceRef)) != null ? c : !0)
487
487
  if (Array.isArray(e.value)) {
488
488
  const n = [...e.value];
489
489
  n[s] = i, e.value = n;
@@ -497,10 +497,10 @@ function mn(e, t = {}) {
497
497
  }));
498
498
  return o;
499
499
  }
500
- function hn(e, t = !0, o) {
501
- fn() ? ae(e, o) : t ? e() : wt(e);
500
+ function gn(e, t = !0, o) {
501
+ fn() ? re(e, o) : t ? e() : Fe(e);
502
502
  }
503
- function Ct(e, t, o) {
503
+ function Et(e, t, o) {
504
504
  return V(
505
505
  e,
506
506
  t,
@@ -510,37 +510,37 @@ function Ct(e, t, o) {
510
510
  }
511
511
  );
512
512
  }
513
- const Ae = Re ? window : void 0;
514
- function ue(e) {
513
+ const De = Te ? window : void 0;
514
+ function fe(e) {
515
515
  var t;
516
- const o = $(e);
516
+ const o = M(e);
517
517
  return (t = o?.$el) != null ? t : o;
518
518
  }
519
519
  function he(...e) {
520
520
  const t = [], o = () => {
521
521
  t.forEach((n) => n()), t.length = 0;
522
- }, s = (n, l, d, f) => (n.addEventListener(l, d, f), () => n.removeEventListener(l, d, f)), i = S(() => {
523
- const n = le($(e[0])).filter((l) => l != null);
522
+ }, s = (n, l, d, f) => (n.addEventListener(l, d, f), () => n.removeEventListener(l, d, f)), i = D(() => {
523
+ const n = se(M(e[0])).filter((l) => l != null);
524
524
  return n.every((l) => typeof l != "string") ? n : void 0;
525
- }), c = Ct(
525
+ }), c = Et(
526
526
  () => {
527
527
  var n, l;
528
528
  return [
529
- (l = (n = i.value) == null ? void 0 : n.map((d) => ue(d))) != null ? l : [Ae].filter((d) => d != null),
530
- le($(i.value ? e[1] : e[0])),
531
- le(k(i.value ? e[2] : e[1])),
529
+ (l = (n = i.value) == null ? void 0 : n.map((d) => fe(d))) != null ? l : [De].filter((d) => d != null),
530
+ se(M(i.value ? e[1] : e[0])),
531
+ se(R(i.value ? e[2] : e[1])),
532
532
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
533
- $(i.value ? e[3] : e[2])
533
+ M(i.value ? e[3] : e[2])
534
534
  ];
535
535
  },
536
536
  ([n, l, d, f]) => {
537
537
  if (o(), !n?.length || !l?.length || !d?.length)
538
538
  return;
539
- const w = xt(f) ? { ...f } : f;
539
+ const p = Ct(f) ? { ...f } : f;
540
540
  t.push(
541
541
  ...n.flatMap(
542
- (y) => l.flatMap(
543
- (m) => d.map((C) => s(y, m, C, w))
542
+ (x) => l.flatMap(
543
+ (m) => d.map((I) => s(x, m, I, p))
544
544
  )
545
545
  )
546
546
  );
@@ -549,44 +549,44 @@ function he(...e) {
549
549
  ), r = () => {
550
550
  c(), o();
551
551
  };
552
- return fe(o), r;
552
+ return me(o), r;
553
553
  }
554
554
  // @__NO_SIDE_EFFECTS__
555
- function gn() {
556
- const e = G(!1), t = Se();
557
- return t && ae(() => {
555
+ function hn() {
556
+ const e = G(!1), t = Ae();
557
+ return t && re(() => {
558
558
  e.value = !0;
559
559
  }, t), e;
560
560
  }
561
561
  // @__NO_SIDE_EFFECTS__
562
562
  function It(e) {
563
- const t = /* @__PURE__ */ gn();
564
- return S(() => (t.value, !!e()));
563
+ const t = /* @__PURE__ */ hn();
564
+ return D(() => (t.value, !!e()));
565
565
  }
566
- function Et(e, t, o = {}) {
567
- const { window: s = Ae, ...i } = o;
566
+ function kt(e, t, o = {}) {
567
+ const { window: s = De, ...i } = o;
568
568
  let c;
569
569
  const r = /* @__PURE__ */ It(() => s && "MutationObserver" in s), n = () => {
570
570
  c && (c.disconnect(), c = void 0);
571
- }, l = S(() => {
572
- const y = $(e), m = le(y).map(ue).filter(an);
571
+ }, l = D(() => {
572
+ const x = M(e), m = se(x).map(fe).filter(an);
573
573
  return new Set(m);
574
574
  }), d = V(
575
575
  () => l.value,
576
- (y) => {
577
- n(), r.value && y.size && (c = new MutationObserver(t), y.forEach((m) => c.observe(m, i)));
576
+ (x) => {
577
+ n(), r.value && x.size && (c = new MutationObserver(t), x.forEach((m) => c.observe(m, i)));
578
578
  },
579
579
  { immediate: !0, flush: "post" }
580
- ), f = () => c?.takeRecords(), w = () => {
580
+ ), f = () => c?.takeRecords(), p = () => {
581
581
  d(), n();
582
582
  };
583
- return fe(w), {
583
+ return me(p), {
584
584
  isSupported: r,
585
- stop: w,
585
+ stop: p,
586
586
  takeRecords: f
587
587
  };
588
588
  }
589
- function Le(e, t = {}) {
589
+ function We(e, t = {}) {
590
590
  var o;
591
591
  const {
592
592
  pointerTypes: s,
@@ -597,121 +597,121 @@ function Le(e, t = {}) {
597
597
  onEnd: l,
598
598
  onStart: d,
599
599
  initialValue: f,
600
- axis: w = "both",
601
- draggingElement: y = Ae,
600
+ axis: p = "both",
601
+ draggingElement: x = De,
602
602
  containerElement: m,
603
- handle: C = e,
604
- buttons: b = [0]
605
- } = t, v = H(
606
- (o = $(f)) != null ? o : { x: 0, y: 0 }
607
- ), h = H(), p = (R) => s ? s.includes(R.pointerType) : !0, E = (R) => {
608
- $(i) && R.preventDefault(), $(c) && R.stopPropagation();
609
- }, T = (R) => {
610
- var L;
611
- if (!$(b).includes(R.button) || $(t.disabled) || !p(R) || $(r) && R.target !== $(e))
603
+ handle: I = e,
604
+ buttons: w = [0]
605
+ } = t, v = z(
606
+ (o = M(f)) != null ? o : { x: 0, y: 0 }
607
+ ), g = z(), b = (y) => s ? s.includes(y.pointerType) : !0, P = (y) => {
608
+ M(i) && y.preventDefault(), M(c) && y.stopPropagation();
609
+ }, B = (y) => {
610
+ var $;
611
+ if (!M(w).includes(y.button) || M(t.disabled) || !b(y) || M(r) && y.target !== M(e))
612
612
  return;
613
- const X = $(m), Y = (L = X?.getBoundingClientRect) == null ? void 0 : L.call(X), B = $(e).getBoundingClientRect(), K = {
614
- x: R.clientX - (X ? B.left - Y.left + X.scrollLeft : B.left),
615
- y: R.clientY - (X ? B.top - Y.top + X.scrollTop : B.top)
613
+ const X = M(m), W = ($ = X?.getBoundingClientRect) == null ? void 0 : $.call(X), O = M(e).getBoundingClientRect(), Y = {
614
+ x: y.clientX - (X ? O.left - W.left + X.scrollLeft : O.left),
615
+ y: y.clientY - (X ? O.top - W.top + X.scrollTop : O.top)
616
616
  };
617
- d?.(K, R) !== !1 && (h.value = K, E(R));
618
- }, N = (R) => {
619
- if ($(t.disabled) || !p(R) || !h.value)
617
+ d?.(Y, y) !== !1 && (g.value = Y, P(y));
618
+ }, F = (y) => {
619
+ if (M(t.disabled) || !b(y) || !g.value)
620
620
  return;
621
- const L = $(m), X = $(e).getBoundingClientRect();
622
- let { x: Y, y: B } = v.value;
623
- (w === "x" || w === "both") && (Y = R.clientX - h.value.x, L && (Y = Math.min(Math.max(0, Y), L.scrollWidth - X.width))), (w === "y" || w === "both") && (B = R.clientY - h.value.y, L && (B = Math.min(Math.max(0, B), L.scrollHeight - X.height))), v.value = {
624
- x: Y,
625
- y: B
626
- }, n?.(v.value, R), E(R);
627
- }, O = (R) => {
628
- $(t.disabled) || !p(R) || h.value && (h.value = void 0, l?.(v.value, R), E(R));
621
+ const $ = M(m), X = M(e).getBoundingClientRect();
622
+ let { x: W, y: O } = v.value;
623
+ (p === "x" || p === "both") && (W = y.clientX - g.value.x, $ && (W = Math.min(Math.max(0, W), $.scrollWidth - X.width))), (p === "y" || p === "both") && (O = y.clientY - g.value.y, $ && (O = Math.min(Math.max(0, O), $.scrollHeight - X.height))), v.value = {
624
+ x: W,
625
+ y: O
626
+ }, n?.(v.value, y), P(y);
627
+ }, S = (y) => {
628
+ M(t.disabled) || !b(y) || g.value && (g.value = void 0, l?.(v.value, y), P(y));
629
629
  };
630
- if (Re) {
631
- const R = () => {
632
- var L;
630
+ if (Te) {
631
+ const y = () => {
632
+ var $;
633
633
  return {
634
- capture: (L = t.capture) != null ? L : !0,
635
- passive: !$(i)
634
+ capture: ($ = t.capture) != null ? $ : !0,
635
+ passive: !M(i)
636
636
  };
637
637
  };
638
- he(C, "pointerdown", T, R), he(y, "pointermove", N, R), he(y, "pointerup", O, R);
638
+ he(I, "pointerdown", B, y), he(x, "pointermove", F, y), he(x, "pointerup", S, y);
639
639
  }
640
640
  return {
641
641
  ...mn(v),
642
642
  position: v,
643
- isDragging: S(() => !!h.value),
644
- style: S(
643
+ isDragging: D(() => !!g.value),
644
+ style: D(
645
645
  () => `left:${v.value.x}px;top:${v.value.y}px;`
646
646
  )
647
647
  };
648
648
  }
649
649
  function pn(e, t, o = {}) {
650
- const { window: s = Ae, ...i } = o;
650
+ const { window: s = De, ...i } = o;
651
651
  let c;
652
652
  const r = /* @__PURE__ */ It(() => s && "ResizeObserver" in s), n = () => {
653
653
  c && (c.disconnect(), c = void 0);
654
- }, l = S(() => {
655
- const w = $(e);
656
- return Array.isArray(w) ? w.map((y) => ue(y)) : [ue(w)];
654
+ }, l = D(() => {
655
+ const p = M(e);
656
+ return Array.isArray(p) ? p.map((x) => fe(x)) : [fe(p)];
657
657
  }), d = V(
658
658
  l,
659
- (w) => {
659
+ (p) => {
660
660
  if (n(), r.value && s) {
661
661
  c = new ResizeObserver(t);
662
- for (const y of w)
663
- y && c.observe(y, i);
662
+ for (const x of p)
663
+ x && c.observe(x, i);
664
664
  }
665
665
  },
666
666
  { immediate: !0, flush: "post" }
667
667
  ), f = () => {
668
668
  n(), d();
669
669
  };
670
- return fe(f), {
670
+ return me(f), {
671
671
  isSupported: r,
672
672
  stop: f
673
673
  };
674
674
  }
675
- function te(e, t = {}) {
675
+ function oe(e, t = {}) {
676
676
  const {
677
677
  reset: o = !0,
678
678
  windowResize: s = !0,
679
679
  windowScroll: i = !0,
680
680
  immediate: c = !0,
681
681
  updateTiming: r = "sync"
682
- } = t, n = G(0), l = G(0), d = G(0), f = G(0), w = G(0), y = G(0), m = G(0), C = G(0);
683
- function b() {
684
- const h = ue(e);
685
- if (!h) {
686
- o && (n.value = 0, l.value = 0, d.value = 0, f.value = 0, w.value = 0, y.value = 0, m.value = 0, C.value = 0);
682
+ } = t, n = G(0), l = G(0), d = G(0), f = G(0), p = G(0), x = G(0), m = G(0), I = G(0);
683
+ function w() {
684
+ const g = fe(e);
685
+ if (!g) {
686
+ o && (n.value = 0, l.value = 0, d.value = 0, f.value = 0, p.value = 0, x.value = 0, m.value = 0, I.value = 0);
687
687
  return;
688
688
  }
689
- const p = h.getBoundingClientRect();
690
- n.value = p.height, l.value = p.bottom, d.value = p.left, f.value = p.right, w.value = p.top, y.value = p.width, m.value = p.x, C.value = p.y;
689
+ const b = g.getBoundingClientRect();
690
+ n.value = b.height, l.value = b.bottom, d.value = b.left, f.value = b.right, p.value = b.top, x.value = b.width, m.value = b.x, I.value = b.y;
691
691
  }
692
692
  function v() {
693
- r === "sync" ? b() : r === "next-frame" && requestAnimationFrame(() => b());
693
+ r === "sync" ? w() : r === "next-frame" && requestAnimationFrame(() => w());
694
694
  }
695
- return pn(e, v), V(() => ue(e), (h) => !h && v()), Et(e, v, {
695
+ return pn(e, v), V(() => fe(e), (g) => !g && v()), kt(e, v, {
696
696
  attributeFilter: ["style", "class"]
697
- }), i && he("scroll", v, { capture: !0, passive: !0 }), s && he("resize", v, { passive: !0 }), hn(() => {
697
+ }), i && he("scroll", v, { capture: !0, passive: !0 }), s && he("resize", v, { passive: !0 }), gn(() => {
698
698
  c && v();
699
699
  }), {
700
700
  height: n,
701
701
  bottom: l,
702
702
  left: d,
703
703
  right: f,
704
- top: w,
705
- width: y,
704
+ top: p,
705
+ width: x,
706
706
  x: m,
707
- y: C,
707
+ y: I,
708
708
  update: v
709
709
  };
710
710
  }
711
711
  const wn = (e) => {
712
712
  const t = new DOMParser().parseFromString(e, "text/html");
713
713
  return Array.from(t.body.childNodes).some((o) => o.nodeType === 1);
714
- }, yn = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), bn = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], xn = ["innerHTML"], Cn = { key: 2 }, In = /* @__PURE__ */ ee({
714
+ }, yn = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), xn = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], bn = ["innerHTML"], Cn = { key: 2 }, En = /* @__PURE__ */ te({
715
715
  __name: "ACell",
716
716
  props: {
717
717
  colIndex: {},
@@ -723,73 +723,121 @@ const wn = (e) => {
723
723
  debounce: { default: 300 }
724
724
  },
725
725
  setup(e, { expose: t }) {
726
- const o = j("cell"), s = e.store.getCellData(e.colIndex, e.rowIndex), i = H(""), c = H(!1), r = e.store.columns[e.colIndex], n = e.store.rows[e.rowIndex], l = r.align || "center", d = r.width || "40ch", f = S(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), w = S(() => typeof f.value == "string" ? wn(f.value) : !1), y = S(() => ({
726
+ const o = U("cell"), s = e.store.getCellData(e.colIndex, e.rowIndex), i = z(""), c = z(!1), r = e.store.columns[e.colIndex], n = e.store.rows[e.rowIndex], l = r.align || "center", d = r.width || "40ch", f = D(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), p = D(() => typeof f.value == "string" ? wn(f.value) : !1), x = D(() => ({
727
727
  textAlign: l,
728
728
  width: d,
729
729
  fontWeight: c.value ? "bold" : "inherit",
730
730
  paddingLeft: e.store.getIndent(e.colIndex, e.store.display[e.rowIndex]?.indent)
731
- })), m = S(() => ({
731
+ })), m = D(() => ({
732
732
  "sticky-column": e.pinned,
733
733
  "cell-modified": c.value
734
- })), C = () => {
735
- const { left: p, bottom: E, width: T, height: N } = te(o);
736
- r.mask, r.modalComponent && e.store.$patch((O) => {
737
- O.modal.visible = !0, O.modal.colIndex = e.colIndex, O.modal.rowIndex = e.rowIndex, O.modal.left = p, O.modal.bottom = E, O.modal.width = T, O.modal.height = N, O.modal.cell = o.value, typeof r.modalComponent == "function" ? O.modal.component = r.modalComponent({ table: O.table, row: n, column: r }) : O.modal.component = r.modalComponent, O.modal.componentProps = r.modalComponentExtraProps;
734
+ })), I = () => {
735
+ v(), w();
736
+ }, w = () => {
737
+ const { left: S, bottom: y, width: $, height: X } = oe(o);
738
+ r.mask, r.modalComponent && e.store.$patch((W) => {
739
+ W.modal.visible = !0, W.modal.colIndex = e.colIndex, W.modal.rowIndex = e.rowIndex, W.modal.left = S, W.modal.bottom = y, W.modal.width = $, W.modal.height = X, W.modal.cell = o.value, typeof r.modalComponent == "function" ? W.modal.component = r.modalComponent({ table: W.table, row: n, column: r }) : W.modal.component = r.modalComponent, W.modal.componentProps = r.modalComponentExtraProps;
738
740
  });
739
741
  };
740
742
  if (e.addNavigation) {
741
- let p = {
742
- ...Ue,
743
- "keydown.f2": C,
744
- "keydown.alt.up": C,
745
- "keydown.alt.down": C,
746
- "keydown.alt.left": C,
747
- "keydown.alt.right": C
743
+ let S = {
744
+ ...Ze,
745
+ "keydown.f2": w,
746
+ "keydown.alt.up": w,
747
+ "keydown.alt.down": w,
748
+ "keydown.alt.left": w,
749
+ "keydown.alt.right": w
748
750
  };
749
- typeof e.addNavigation == "object" && (p = {
750
- ...p,
751
+ typeof e.addNavigation == "object" && (S = {
752
+ ...S,
751
753
  ...e.addNavigation
752
- }), qe([
754
+ }), Qe([
753
755
  {
754
756
  selectors: o,
755
- handlers: p
757
+ handlers: S
756
758
  }
757
759
  ]);
758
760
  }
759
- const b = () => {
760
- o.value && (i.value = o.value.textContent);
761
- }, v = (p) => {
762
- const E = p.target;
763
- E.textContent !== i.value && (i.value = E.textContent, r.format ? (c.value = E.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, s), e.store.setCellText(e.colIndex, e.rowIndex, E.textContent)) : (c.value = E.textContent !== s, e.store.setCellData(e.colIndex, e.rowIndex, E.textContent)));
764
- }, h = /* @__PURE__ */ vn(v, e.debounce);
761
+ const v = () => {
762
+ if (o.value && r.edit) {
763
+ const S = window.getSelection();
764
+ if (S)
765
+ try {
766
+ const y = document.createRange();
767
+ y.selectNodeContents && (y.selectNodeContents(o.value), S.removeAllRanges(), S.addRange(y));
768
+ } catch {
769
+ }
770
+ }
771
+ }, g = () => {
772
+ o.value && (i.value = o.value.textContent, v());
773
+ }, b = () => {
774
+ try {
775
+ const S = window.getSelection();
776
+ if (S && S.rangeCount > 0 && o.value) {
777
+ const y = S.getRangeAt(0), $ = y.cloneRange();
778
+ if ($.selectNodeContents && $.setEnd)
779
+ return $.selectNodeContents(o.value), $.setEnd(y.endContainer, y.endOffset), $.toString().length;
780
+ }
781
+ } catch {
782
+ }
783
+ return 0;
784
+ }, P = (S) => {
785
+ if (o.value)
786
+ try {
787
+ const y = window.getSelection();
788
+ if (!y) return;
789
+ let $ = 0;
790
+ const X = document.createTreeWalker ? document.createTreeWalker(o.value, NodeFilter.SHOW_TEXT, null) : null;
791
+ if (!X) return;
792
+ let W, O = null;
793
+ for (; W = X.nextNode(); ) {
794
+ const Y = W, _ = $ + Y.textContent.length;
795
+ if (S <= _ && (O = document.createRange(), O.setStart && O.setEnd)) {
796
+ O.setStart(Y, S - $), O.setEnd(Y, S - $);
797
+ break;
798
+ }
799
+ $ = _;
800
+ }
801
+ O && y.removeAllRanges && y.addRange && (y.removeAllRanges(), y.addRange(O));
802
+ } catch {
803
+ }
804
+ }, B = (S) => {
805
+ const y = S.target;
806
+ if (y.textContent === i.value)
807
+ return;
808
+ const $ = b();
809
+ i.value = y.textContent, r.format ? (c.value = y.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, s), e.store.setCellText(e.colIndex, e.rowIndex, y.textContent)) : (c.value = y.textContent !== s, e.store.setCellData(e.colIndex, e.rowIndex, y.textContent)), Fe().then(() => {
810
+ P($);
811
+ });
812
+ }, F = /* @__PURE__ */ vn(B, e.debounce);
765
813
  return t({
766
814
  currentData: i
767
- }), (p, E) => (M(), D("td", {
815
+ }), (S, y) => (T(), L("td", {
768
816
  ref: "cell",
769
- "data-colindex": p.colIndex,
770
- "data-rowindex": p.rowIndex,
771
- "data-editable": k(r).edit,
772
- contenteditable: k(r).edit,
773
- tabindex: p.tabIndex,
817
+ "data-colindex": S.colIndex,
818
+ "data-rowindex": S.rowIndex,
819
+ "data-editable": R(r).edit,
820
+ contenteditable: R(r).edit,
821
+ tabindex: S.tabIndex,
774
822
  spellcheck: !1,
775
- style: _(y.value),
776
- onFocus: b,
777
- onPaste: v,
778
- onInput: E[0] || (E[0] = //@ts-ignore
779
- (...T) => k(h) && k(h)(...T)),
780
- onClick: C,
781
- class: U(["atable-cell", m.value])
823
+ style: ee(x.value),
824
+ onFocus: g,
825
+ onPaste: B,
826
+ onInput: y[0] || (y[0] = //@ts-ignore
827
+ (...$) => R(F) && R(F)(...$)),
828
+ onClick: I,
829
+ class: q(["atable-cell", m.value])
782
830
  }, [
783
- k(r).cellComponent ? (M(), re(Ie(k(r).cellComponent), Ge({
831
+ R(r).cellComponent ? (T(), ce(ke(R(r).cellComponent), Ve({
784
832
  key: 0,
785
833
  value: f.value
786
- }, k(r).cellComponentProps), null, 16, ["value"])) : w.value ? (M(), D("span", {
834
+ }, R(r).cellComponentProps), null, 16, ["value"])) : p.value ? (T(), L("span", {
787
835
  key: 1,
788
836
  innerHTML: f.value
789
- }, null, 8, xn)) : (M(), D("span", Cn, ie(f.value), 1))
790
- ], 46, bn));
837
+ }, null, 8, bn)) : (T(), L("span", Cn, ue(f.value), 1))
838
+ ], 46, xn));
791
839
  }
792
- }), En = ["tabindex"], kn = ["tabindex"], $n = ["colspan"], Mn = /* @__PURE__ */ ee({
840
+ }), In = ["tabindex"], kn = ["tabindex"], $n = ["colspan"], Rn = /* @__PURE__ */ te({
793
841
  __name: "AExpansionRow",
794
842
  props: {
795
843
  rowIndex: {},
@@ -798,61 +846,61 @@ const wn = (e) => {
798
846
  addNavigation: { type: [Boolean, Object] }
799
847
  },
800
848
  setup(e) {
801
- const t = j("rowEl"), o = S(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
849
+ const t = U("rowEl"), o = D(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
802
850
  if (e.addNavigation) {
803
851
  const s = {
804
852
  "keydown.control.g": (i) => {
805
853
  i.stopPropagation(), i.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
806
854
  }
807
855
  };
808
- typeof e.addNavigation == "object" && Object.assign(s, e.addNavigation), qe([
856
+ typeof e.addNavigation == "object" && Object.assign(s, e.addNavigation), Qe([
809
857
  {
810
858
  selectors: t,
811
859
  handlers: s
812
860
  }
813
861
  ]);
814
862
  }
815
- return (s, i) => (M(), D(oe, null, [
816
- z("tr", Ge(s.$attrs, {
863
+ return (s, i) => (T(), L(ae, null, [
864
+ N("tr", Ve(s.$attrs, {
817
865
  ref: "rowEl",
818
866
  tabindex: s.tabIndex,
819
867
  class: "expandable-row"
820
868
  }), [
821
- z("td", {
869
+ N("td", {
822
870
  tabIndex: -1,
823
871
  onClick: i[0] || (i[0] = (c) => s.store.toggleRowExpand(s.rowIndex)),
824
872
  class: "row-index"
825
- }, ie(o.value), 1),
826
- F(s.$slots, "row", {}, void 0, !0)
827
- ], 16, En),
828
- s.store.display[s.rowIndex].expanded ? (M(), D("tr", {
873
+ }, ue(o.value), 1),
874
+ j(s.$slots, "row", {}, void 0, !0)
875
+ ], 16, In),
876
+ s.store.display[s.rowIndex].expanded ? (T(), L("tr", {
829
877
  key: 0,
830
878
  ref: "rowExpanded",
831
879
  tabindex: s.tabIndex,
832
880
  class: "expanded-row"
833
881
  }, [
834
- z("td", {
882
+ N("td", {
835
883
  tabIndex: -1,
836
884
  colspan: s.store.columns.length + 1,
837
885
  class: "expanded-row-content"
838
886
  }, [
839
- F(s.$slots, "content", {}, void 0, !0)
887
+ j(s.$slots, "content", {}, void 0, !0)
840
888
  ], 8, $n)
841
- ], 8, kn)) : q("", !0)
889
+ ], 8, kn)) : J("", !0)
842
890
  ], 64));
843
891
  }
844
- }), se = (e, t) => {
892
+ }), ie = (e, t) => {
845
893
  const o = e.__vccOpts || e;
846
894
  for (const [s, i] of t)
847
895
  o[s] = i;
848
896
  return o;
849
- }, Sn = /* @__PURE__ */ se(Mn, [["__scopeId", "data-v-5ad4bb41"]]), Rn = ["colspan"], An = {
897
+ }, Sn = /* @__PURE__ */ ie(Rn, [["__scopeId", "data-v-5ad4bb41"]]), Mn = ["colspan"], An = {
850
898
  ref: "container",
851
899
  class: "gantt-container"
852
- }, Dn = ["data-rowindex", "data-colindex"], Tn = {
900
+ }, Tn = ["data-rowindex", "data-colindex"], Dn = {
853
901
  key: 2,
854
902
  class: "gantt-label"
855
- }, On = ["x1", "y1", "x2", "y2"], Hn = /* @__PURE__ */ ee({
903
+ }, On = ["x1", "y1", "x2", "y2"], Hn = /* @__PURE__ */ te({
856
904
  __name: "AGanttCell",
857
905
  props: {
858
906
  store: {},
@@ -867,18 +915,18 @@ const wn = (e) => {
867
915
  },
868
916
  emits: ["connection:create"],
869
917
  setup(e, { expose: t, emit: o }) {
870
- Lt((I) => ({
918
+ Lt((C) => ({
871
919
  "17bc2643": i.value,
872
- "0a8a9192": I.colspan
920
+ "0a8a9192": C.colspan
873
921
  }));
874
- const s = o, i = H(e.color.length >= 6 ? e.color : "#cccccc"), c = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, r = j("container"), n = j("bar"), l = j("leftResizeHandle"), d = j("rightResizeHandle"), f = j("leftConnectionHandle"), w = j("rightConnectionHandle"), { width: y } = te(r), { left: m, right: C } = te(n), b = H(e.start), v = H(e.end || b.value + e.colspan), h = H(!1), p = H(!1), E = H(!1), T = H(!1), N = H(!1), O = H({ startX: 0, startY: 0, endX: 0, endY: 0 }), R = S(() => we.value || K.value || ve.value), L = S(() => e.colspan > 0 ? y.value / e.colspan : 0), X = S(() => {
875
- const I = b.value / e.colspan * 100, a = v.value / e.colspan * 100;
922
+ const s = o, i = z(e.color.length >= 6 ? e.color : "#cccccc"), c = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, r = U("container"), n = U("bar"), l = U("leftResizeHandle"), d = U("rightResizeHandle"), f = U("leftConnectionHandle"), p = U("rightConnectionHandle"), { width: x } = oe(r), { left: m, right: I } = oe(n), w = z(e.start), v = z(e.end || w.value + e.colspan), g = z(!1), b = z(!1), P = z(!1), B = z(!1), F = z(!1), S = z({ startX: 0, startY: 0, endX: 0, endY: 0 }), y = D(() => ye.value || Y.value || _.value), $ = D(() => e.colspan > 0 ? x.value / e.colspan : 0), X = D(() => {
923
+ const C = w.value / e.colspan * 100, a = v.value / e.colspan * 100;
876
924
  return {
877
- left: `${I}%`,
878
- width: `${a - I}%`,
925
+ left: `${C}%`,
926
+ width: `${a - C}%`,
879
927
  backgroundColor: i.value
880
928
  };
881
- }), Y = S(
929
+ }), W = D(
882
930
  () => ({
883
931
  position: "fixed",
884
932
  top: 0,
@@ -888,236 +936,236 @@ const wn = (e) => {
888
936
  pointerEvents: "none",
889
937
  zIndex: 1e3
890
938
  })
891
- ), B = H({ startX: 0, startPos: 0 }), { isDragging: K } = Le(l, {
939
+ ), O = z({ startX: 0, startPos: 0 }), { isDragging: Y } = We(l, {
892
940
  axis: "x",
893
- onStart: () => me(m.value, b.value),
894
- onMove: ({ x: I }) => ye(I),
895
- onEnd: ({ x: I }) => De(I)
896
- }), { isDragging: ve } = Le(d, {
941
+ onStart: () => ge(m.value, w.value),
942
+ onMove: ({ x: C }) => xe(C),
943
+ onEnd: ({ x: C }) => Oe(C)
944
+ }), { isDragging: _ } = We(d, {
897
945
  axis: "x",
898
- onStart: () => me(C.value, v.value),
899
- onMove: ({ x: I }) => be(I),
900
- onEnd: ({ x: I }) => Ze(I)
901
- }), { isDragging: we } = Le(n, {
946
+ onStart: () => ge(I.value, v.value),
947
+ onMove: ({ x: C }) => be(C),
948
+ onEnd: ({ x: C }) => _e(C)
949
+ }), { isDragging: ye } = We(n, {
902
950
  exact: !0,
903
951
  axis: "x",
904
- onStart: () => me(m.value, b.value),
905
- onMove: ({ x: I }) => Qe(I),
906
- onEnd: ({ x: I }) => Ke(I)
952
+ onStart: () => ge(m.value, w.value),
953
+ onMove: ({ x: C }) => et(C),
954
+ onEnd: ({ x: C }) => tt(C)
907
955
  });
908
- ae(() => {
909
- _e();
956
+ re(() => {
957
+ nt();
910
958
  }), Bt(() => {
911
- et();
959
+ ot();
912
960
  });
913
- function me(I, a) {
914
- n.value && (n.value.style.transition = "none"), B.value = { startX: I, startPos: a };
961
+ function ge(C, a) {
962
+ n.value && (n.value.style.transition = "none"), O.value = { startX: C, startPos: a };
915
963
  }
916
- function ye(I) {
917
- if (!K.value || !n.value) return;
918
- const u = (I - B.value.startX) / L.value, g = Math.max(0, Math.min(v.value - 1, B.value.startPos + u));
919
- n.value.style.left = `${g / e.colspan * 100}%`, n.value.style.width = `${(v.value - g) / e.colspan * 100}%`;
964
+ function xe(C) {
965
+ if (!Y.value || !n.value) return;
966
+ const u = (C - O.value.startX) / $.value, h = Math.max(0, Math.min(v.value - 1, O.value.startPos + u));
967
+ n.value.style.left = `${h / e.colspan * 100}%`, n.value.style.width = `${(v.value - h) / e.colspan * 100}%`;
920
968
  }
921
- function De(I) {
969
+ function Oe(C) {
922
970
  if (!n.value) return;
923
- const a = I - B.value.startX, u = Math.round(a / L.value), g = b.value, x = Math.max(0, Math.min(v.value - 1, B.value.startPos + u));
924
- b.value = x, e.store.updateGanttBar({
971
+ const a = C - O.value.startX, u = Math.round(a / $.value), h = w.value, E = Math.max(0, Math.min(v.value - 1, O.value.startPos + u));
972
+ w.value = E, e.store.updateGanttBar({
925
973
  rowIndex: e.rowIndex,
926
974
  colIndex: e.colIndex,
927
975
  type: "resize",
928
976
  edge: "start",
929
- oldStart: g,
930
- newStart: x,
977
+ oldStart: h,
978
+ newStart: E,
931
979
  end: v.value,
932
980
  delta: u,
933
- oldColspan: v.value - g,
934
- newColspan: v.value - x
981
+ oldColspan: v.value - h,
982
+ newColspan: v.value - E
935
983
  });
936
984
  }
937
- function be(I) {
938
- if (!ve.value || !n.value) return;
939
- const u = (I - B.value.startX) / L.value, g = Math.max(b.value + 1, Math.min(e.columnsCount, B.value.startPos + u));
940
- n.value.style.width = `${(g - b.value) / e.colspan * 100}%`;
985
+ function be(C) {
986
+ if (!_.value || !n.value) return;
987
+ const u = (C - O.value.startX) / $.value, h = Math.max(w.value + 1, Math.min(e.columnsCount, O.value.startPos + u));
988
+ n.value.style.width = `${(h - w.value) / e.colspan * 100}%`;
941
989
  }
942
- function Ze(I) {
990
+ function _e(C) {
943
991
  if (!n.value) return;
944
- const a = I - B.value.startX, u = Math.round(a / L.value), g = v.value, x = Math.max(b.value + 1, Math.min(e.columnsCount, B.value.startPos + u));
945
- v.value = x, e.store.updateGanttBar({
992
+ const a = C - O.value.startX, u = Math.round(a / $.value), h = v.value, E = Math.max(w.value + 1, Math.min(e.columnsCount, O.value.startPos + u));
993
+ v.value = E, e.store.updateGanttBar({
946
994
  rowIndex: e.rowIndex,
947
995
  colIndex: e.colIndex,
948
996
  type: "resize",
949
997
  edge: "end",
950
- oldEnd: g,
951
- newEnd: x,
952
- start: b.value,
998
+ oldEnd: h,
999
+ newEnd: E,
1000
+ start: w.value,
953
1001
  delta: u,
954
- oldColspan: g - b.value,
955
- newColspan: x - b.value
1002
+ oldColspan: h - w.value,
1003
+ newColspan: E - w.value
956
1004
  });
957
1005
  }
958
- function Qe(I) {
959
- if (!we.value || !n.value) return;
960
- const u = (I - B.value.startX) / L.value, g = v.value - b.value, x = Math.max(0, Math.min(B.value.startPos + u, e.columnsCount - g));
961
- n.value.style.left = `${x / e.colspan * 100}%`;
1006
+ function et(C) {
1007
+ if (!ye.value || !n.value) return;
1008
+ const u = (C - O.value.startX) / $.value, h = v.value - w.value, E = Math.max(0, Math.min(O.value.startPos + u, e.columnsCount - h));
1009
+ n.value.style.left = `${E / e.colspan * 100}%`;
962
1010
  }
963
- function Ke(I) {
1011
+ function tt(C) {
964
1012
  if (!n.value) return;
965
- const a = I - B.value.startX, u = Math.round(a / L.value), g = v.value - b.value, x = b.value, A = v.value;
966
- let P = B.value.startPos + u, W = P + g;
967
- P < 0 ? (P = 0, W = g) : W > e.columnsCount && (W = e.columnsCount, P = W - g), b.value = P, v.value = W, e.store.updateGanttBar({
1013
+ const a = C - O.value.startX, u = Math.round(a / $.value), h = v.value - w.value, E = w.value, H = v.value;
1014
+ let k = O.value.startPos + u, A = k + h;
1015
+ k < 0 ? (k = 0, A = h) : A > e.columnsCount && (A = e.columnsCount, k = A - h), w.value = k, v.value = A, e.store.updateGanttBar({
968
1016
  rowIndex: e.rowIndex,
969
1017
  colIndex: e.colIndex,
970
1018
  type: "bar",
971
- oldStart: x,
972
- oldEnd: A,
973
- newStart: P,
974
- newEnd: W,
1019
+ oldStart: E,
1020
+ oldEnd: H,
1021
+ newStart: k,
1022
+ newEnd: A,
975
1023
  delta: u,
976
- colspan: W - P
1024
+ colspan: A - k
977
1025
  });
978
1026
  }
979
- function _e() {
980
- const { x: I, y: a } = te(n), { x: u, y: g } = te(f), { x, y: A } = te(w);
1027
+ function nt() {
1028
+ const { x: C, y: a } = oe(n), { x: u, y: h } = oe(f), { x: E, y: H } = oe(p);
981
1029
  e.store.registerGanttBar({
982
1030
  id: c,
983
1031
  rowIndex: e.rowIndex,
984
1032
  colIndex: e.colIndex,
985
- startIndex: b,
1033
+ startIndex: w,
986
1034
  endIndex: v,
987
1035
  color: i,
988
1036
  label: e.label,
989
- position: { x: I, y: a }
1037
+ position: { x: C, y: a }
990
1038
  }), e.store.isDependencyGraphEnabled && (e.store.registerConnectionHandle({
991
1039
  id: `${c}-connection-left`,
992
1040
  rowIndex: e.rowIndex,
993
1041
  colIndex: e.colIndex,
994
1042
  side: "left",
995
- position: { x: u, y: g },
996
- visible: h,
1043
+ position: { x: u, y: h },
1044
+ visible: g,
997
1045
  barId: c
998
1046
  }), e.store.registerConnectionHandle({
999
1047
  id: `${c}-connection-right`,
1000
1048
  rowIndex: e.rowIndex,
1001
1049
  colIndex: e.colIndex,
1002
1050
  side: "right",
1003
- position: { x, y: A },
1004
- visible: p,
1051
+ position: { x: E, y: H },
1052
+ visible: b,
1005
1053
  barId: c
1006
1054
  }));
1007
1055
  }
1008
- function et() {
1056
+ function ot() {
1009
1057
  e.store.unregisterGanttBar(c), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${c}-connection-left`), e.store.unregisterConnectionHandle(`${c}-connection-right`));
1010
1058
  }
1011
- function tt() {
1012
- e.store.isDependencyGraphEnabled && (h.value = !0, p.value = !0);
1059
+ function lt() {
1060
+ e.store.isDependencyGraphEnabled && (g.value = !0, b.value = !0);
1013
1061
  }
1014
- function Te() {
1015
- !E.value && !T.value && (h.value = !1, p.value = !1);
1062
+ function He() {
1063
+ !P.value && !B.value && (g.value = !1, b.value = !1);
1016
1064
  }
1017
- function Oe(I, a) {
1018
- a.preventDefault(), a.stopPropagation(), N.value = !0, I === "left" ? E.value = !0 : T.value = !0;
1019
- const u = I === "left" ? f.value : w.value;
1065
+ function Pe(C, a) {
1066
+ a.preventDefault(), a.stopPropagation(), F.value = !0, C === "left" ? P.value = !0 : B.value = !0;
1067
+ const u = C === "left" ? f.value : p.value;
1020
1068
  if (u) {
1021
- const A = u.getBoundingClientRect(), P = A.left + A.width / 2, W = A.top + A.height / 2;
1022
- O.value = { startX: P, startY: W, endX: P, endY: W };
1069
+ const H = u.getBoundingClientRect(), k = H.left + H.width / 2, A = H.top + H.height / 2;
1070
+ S.value = { startX: k, startY: A, endX: k, endY: A };
1023
1071
  }
1024
- const g = (A) => {
1025
- O.value.endX = A.clientX, O.value.endY = A.clientY;
1026
- }, x = (A) => {
1027
- He(A, I), Pe(g, x);
1072
+ const h = (H) => {
1073
+ S.value.endX = H.clientX, S.value.endY = H.clientY;
1074
+ }, E = (H) => {
1075
+ Le(H, C), Be(h, E);
1028
1076
  };
1029
- document.addEventListener("mousemove", g), document.addEventListener("mouseup", x);
1077
+ document.addEventListener("mousemove", h), document.addEventListener("mouseup", E);
1030
1078
  }
1031
- function He(I, a) {
1032
- const g = document.elementFromPoint(I.clientX, I.clientY)?.closest(".connection-handle");
1033
- if (g && g !== (a === "left" ? f.value : w.value)) {
1034
- const x = g.closest(".gantt-bar");
1035
- if (x) {
1036
- const A = parseInt(x.getAttribute("data-rowindex") || "0"), P = parseInt(x.getAttribute("data-colindex") || "0"), W = g.classList.contains("left-connection-handle") ? "left" : "right", Rt = `gantt-bar-row-${A}-col-${P}`, nt = e.store.createConnection(
1079
+ function Le(C, a) {
1080
+ const h = document.elementFromPoint(C.clientX, C.clientY)?.closest(".connection-handle");
1081
+ if (h && h !== (a === "left" ? f.value : p.value)) {
1082
+ const E = h.closest(".gantt-bar");
1083
+ if (E) {
1084
+ const H = parseInt(E.getAttribute("data-rowindex") || "0"), k = parseInt(E.getAttribute("data-colindex") || "0"), A = h.classList.contains("left-connection-handle") ? "left" : "right", ne = `gantt-bar-row-${H}-col-${k}`, Ce = e.store.createConnection(
1037
1085
  `${c}-connection-${a}`,
1038
- `${Rt}-connection-${W}`
1086
+ `${ne}-connection-${A}`
1039
1087
  );
1040
- nt && s("connection:create", nt);
1088
+ Ce && s("connection:create", Ce);
1041
1089
  }
1042
1090
  }
1043
1091
  }
1044
- function Pe(I, a) {
1045
- N.value = !1, E.value = !1, T.value = !1, document.removeEventListener("mousemove", I), document.removeEventListener("mouseup", a), n.value?.matches(":hover") || Te();
1092
+ function Be(C, a) {
1093
+ F.value = !1, P.value = !1, B.value = !1, document.removeEventListener("mousemove", C), document.removeEventListener("mouseup", a), n.value?.matches(":hover") || He();
1046
1094
  }
1047
1095
  return t({
1048
1096
  barStyle: X,
1049
- cleanupConnectionDrag: Pe,
1097
+ cleanupConnectionDrag: Be,
1050
1098
  currentEnd: v,
1051
- handleConnectionDrop: He,
1052
- isLeftConnectionDragging: E,
1053
- isLeftConnectionVisible: h,
1054
- isRightConnectionDragging: T,
1055
- isRightConnectionVisible: p,
1056
- showDragPreview: N
1057
- }), (I, a) => (M(), D("td", {
1099
+ handleConnectionDrop: Le,
1100
+ isLeftConnectionDragging: P,
1101
+ isLeftConnectionVisible: g,
1102
+ isRightConnectionDragging: B,
1103
+ isRightConnectionVisible: b,
1104
+ showDragPreview: F
1105
+ }), (C, a) => (T(), L("td", {
1058
1106
  class: "aganttcell",
1059
- colspan: I.colspan
1107
+ colspan: C.colspan
1060
1108
  }, [
1061
- z("div", An, [
1062
- z("div", {
1109
+ N("div", An, [
1110
+ N("div", {
1063
1111
  ref: "bar",
1064
- "data-rowindex": I.rowIndex,
1065
- "data-colindex": I.colIndex,
1066
- class: U(["gantt-bar", { "is-dragging": R.value }]),
1067
- style: _(X.value),
1068
- onMouseenter: tt,
1069
- onMouseleave: Te
1112
+ "data-rowindex": C.rowIndex,
1113
+ "data-colindex": C.colIndex,
1114
+ class: q(["gantt-bar", { "is-dragging": y.value }]),
1115
+ style: ee(X.value),
1116
+ onMouseenter: lt,
1117
+ onMouseleave: He
1070
1118
  }, [
1071
- I.store.isDependencyGraphEnabled ? (M(), D("div", {
1119
+ C.store.isDependencyGraphEnabled ? (T(), L("div", {
1072
1120
  key: 0,
1073
1121
  ref: "leftConnectionHandle",
1074
- class: U(["connection-handle left-connection-handle", { visible: h.value, "is-dragging": E.value }]),
1075
- onMousedown: a[0] || (a[0] = $e((u) => Oe("left", u), ["stop"]))
1122
+ class: q(["connection-handle left-connection-handle", { visible: g.value, "is-dragging": P.value }]),
1123
+ onMousedown: a[0] || (a[0] = Se((u) => Pe("left", u), ["stop"]))
1076
1124
  }, a[2] || (a[2] = [
1077
- z("div", { class: "connection-dot" }, null, -1)
1078
- ]), 34)) : q("", !0),
1079
- I.store.isDependencyGraphEnabled ? (M(), D("div", {
1125
+ N("div", { class: "connection-dot" }, null, -1)
1126
+ ]), 34)) : J("", !0),
1127
+ C.store.isDependencyGraphEnabled ? (T(), L("div", {
1080
1128
  key: 1,
1081
1129
  ref: "rightConnectionHandle",
1082
- class: U(["connection-handle right-connection-handle", { visible: p.value, "is-dragging": T.value }]),
1083
- onMousedown: a[1] || (a[1] = $e((u) => Oe("right", u), ["stop"]))
1130
+ class: q(["connection-handle right-connection-handle", { visible: b.value, "is-dragging": B.value }]),
1131
+ onMousedown: a[1] || (a[1] = Se((u) => Pe("right", u), ["stop"]))
1084
1132
  }, a[3] || (a[3] = [
1085
- z("div", { class: "connection-dot" }, null, -1)
1086
- ]), 34)) : q("", !0),
1087
- z("div", {
1133
+ N("div", { class: "connection-dot" }, null, -1)
1134
+ ]), 34)) : J("", !0),
1135
+ N("div", {
1088
1136
  ref: "leftResizeHandle",
1089
- class: U(["resize-handle left-resize-handle", { "is-dragging": k(K) }])
1137
+ class: q(["resize-handle left-resize-handle", { "is-dragging": R(Y) }])
1090
1138
  }, a[4] || (a[4] = [
1091
- z("div", { class: "handle-grip" }, null, -1),
1092
- z("div", { class: "vertical-indicator left-indicator" }, null, -1)
1139
+ N("div", { class: "handle-grip" }, null, -1),
1140
+ N("div", { class: "vertical-indicator left-indicator" }, null, -1)
1093
1141
  ]), 2),
1094
- I.label ? (M(), D("label", Tn, ie(I.label), 1)) : q("", !0),
1095
- z("div", {
1142
+ C.label ? (T(), L("label", Dn, ue(C.label), 1)) : J("", !0),
1143
+ N("div", {
1096
1144
  ref: "rightResizeHandle",
1097
- class: U(["resize-handle right-resize-handle", { "is-dragging": k(ve) }])
1145
+ class: q(["resize-handle right-resize-handle", { "is-dragging": R(_) }])
1098
1146
  }, a[5] || (a[5] = [
1099
- z("div", { class: "handle-grip" }, null, -1),
1100
- z("div", { class: "vertical-indicator right-indicator" }, null, -1)
1147
+ N("div", { class: "handle-grip" }, null, -1),
1148
+ N("div", { class: "vertical-indicator right-indicator" }, null, -1)
1101
1149
  ]), 2)
1102
- ], 46, Dn)
1150
+ ], 46, Tn)
1103
1151
  ], 512),
1104
- I.store.isDependencyGraphEnabled && N.value ? (M(), D("svg", {
1152
+ C.store.isDependencyGraphEnabled && F.value ? (T(), L("svg", {
1105
1153
  key: 0,
1106
- style: _(Y.value)
1154
+ style: ee(W.value)
1107
1155
  }, [
1108
- z("line", {
1109
- x1: O.value.startX,
1110
- y1: O.value.startY,
1111
- x2: O.value.endX,
1112
- y2: O.value.endY,
1156
+ N("line", {
1157
+ x1: S.value.startX,
1158
+ y1: S.value.startY,
1159
+ x2: S.value.endX,
1160
+ y2: S.value.endY,
1113
1161
  stroke: "#2196f3",
1114
1162
  "stroke-width": "2",
1115
1163
  "stroke-dasharray": "5,5"
1116
1164
  }, null, 8, On)
1117
- ], 4)) : q("", !0)
1118
- ], 8, Rn));
1165
+ ], 4)) : J("", !0)
1166
+ ], 8, Mn));
1119
1167
  }
1120
- }), Pn = /* @__PURE__ */ se(Hn, [["__scopeId", "data-v-52febd32"]]), Ln = ["tabindex"], Bn = /* @__PURE__ */ ee({
1168
+ }), Pn = /* @__PURE__ */ ie(Hn, [["__scopeId", "data-v-52febd32"]]), Ln = ["tabindex"], Bn = /* @__PURE__ */ te({
1121
1169
  __name: "ARow",
1122
1170
  props: {
1123
1171
  rowIndex: {},
@@ -1126,72 +1174,72 @@ const wn = (e) => {
1126
1174
  addNavigation: { type: [Boolean, Object], default: !1 }
1127
1175
  },
1128
1176
  setup(e) {
1129
- const t = j("rowEl"), o = S(() => e.store.isRowVisible(e.rowIndex)), s = S(() => e.store.getRowExpandSymbol(e.rowIndex));
1177
+ const t = U("rowEl"), o = D(() => e.store.isRowVisible(e.rowIndex)), s = D(() => e.store.getRowExpandSymbol(e.rowIndex));
1130
1178
  if (e.addNavigation) {
1131
- let i = Ue;
1179
+ let i = Ze;
1132
1180
  typeof e.addNavigation == "object" && (i = {
1133
1181
  ...i,
1134
1182
  ...e.addNavigation
1135
- }), qe([
1183
+ }), Qe([
1136
1184
  {
1137
1185
  selectors: t,
1138
1186
  handlers: i
1139
1187
  }
1140
1188
  ]);
1141
1189
  }
1142
- return (i, c) => Me((M(), D("tr", {
1190
+ return (i, c) => Me((T(), L("tr", {
1143
1191
  ref: "rowEl",
1144
1192
  tabindex: i.tabIndex,
1145
1193
  class: "atable-row"
1146
1194
  }, [
1147
- i.store.config.view !== "uncounted" ? F(i.$slots, "index", { key: 0 }, () => [
1148
- i.store.config.view === "list" ? (M(), D("td", {
1195
+ i.store.config.view !== "uncounted" ? j(i.$slots, "index", { key: 0 }, () => [
1196
+ i.store.config.view === "list" ? (T(), L("td", {
1149
1197
  key: 0,
1150
1198
  tabIndex: -1,
1151
- class: U(["list-index", i.store.hasPinnedColumns ? "sticky-index" : ""])
1152
- }, ie(i.rowIndex + 1), 3)) : i.store.isTreeView ? (M(), D("td", {
1199
+ class: q(["list-index", i.store.hasPinnedColumns ? "sticky-index" : ""])
1200
+ }, ue(i.rowIndex + 1), 3)) : i.store.isTreeView ? (T(), L("td", {
1153
1201
  key: 1,
1154
1202
  tabIndex: -1,
1155
- class: U(["tree-index", i.store.hasPinnedColumns ? "sticky-index" : ""]),
1203
+ class: q(["tree-index", i.store.hasPinnedColumns ? "sticky-index" : ""]),
1156
1204
  onClick: c[0] || (c[0] = (r) => i.store.toggleRowExpand(i.rowIndex))
1157
- }, ie(s.value), 3)) : q("", !0)
1158
- ], !0) : q("", !0),
1159
- F(i.$slots, "default", {}, void 0, !0)
1205
+ }, ue(s.value), 3)) : J("", !0)
1206
+ ], !0) : J("", !0),
1207
+ j(i.$slots, "default", {}, void 0, !0)
1160
1208
  ], 8, Ln)), [
1161
1209
  [bt, o.value]
1162
1210
  ]);
1163
1211
  }
1164
- }), kt = /* @__PURE__ */ se(Bn, [["__scopeId", "data-v-c554ee0f"]]), Je = Re ? window : void 0;
1165
- function ne(e) {
1212
+ }), $t = /* @__PURE__ */ ie(Bn, [["__scopeId", "data-v-c554ee0f"]]), Ke = Te ? window : void 0;
1213
+ function le(e) {
1166
1214
  var t;
1167
- const o = $(e);
1215
+ const o = M(e);
1168
1216
  return (t = o?.$el) != null ? t : o;
1169
1217
  }
1170
- function ke(...e) {
1218
+ function Re(...e) {
1171
1219
  const t = [], o = () => {
1172
1220
  t.forEach((n) => n()), t.length = 0;
1173
- }, s = (n, l, d, f) => (n.addEventListener(l, d, f), () => n.removeEventListener(l, d, f)), i = S(() => {
1174
- const n = le($(e[0])).filter((l) => l != null);
1221
+ }, s = (n, l, d, f) => (n.addEventListener(l, d, f), () => n.removeEventListener(l, d, f)), i = D(() => {
1222
+ const n = se(M(e[0])).filter((l) => l != null);
1175
1223
  return n.every((l) => typeof l != "string") ? n : void 0;
1176
- }), c = Ct(
1224
+ }), c = Et(
1177
1225
  () => {
1178
1226
  var n, l;
1179
1227
  return [
1180
- (l = (n = i.value) == null ? void 0 : n.map((d) => ne(d))) != null ? l : [Je].filter((d) => d != null),
1181
- le($(i.value ? e[1] : e[0])),
1182
- le(k(i.value ? e[2] : e[1])),
1228
+ (l = (n = i.value) == null ? void 0 : n.map((d) => le(d))) != null ? l : [Ke].filter((d) => d != null),
1229
+ se(M(i.value ? e[1] : e[0])),
1230
+ se(R(i.value ? e[2] : e[1])),
1183
1231
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
1184
- $(i.value ? e[3] : e[2])
1232
+ M(i.value ? e[3] : e[2])
1185
1233
  ];
1186
1234
  },
1187
1235
  ([n, l, d, f]) => {
1188
1236
  if (o(), !n?.length || !l?.length || !d?.length)
1189
1237
  return;
1190
- const w = xt(f) ? { ...f } : f;
1238
+ const p = Ct(f) ? { ...f } : f;
1191
1239
  t.push(
1192
1240
  ...n.flatMap(
1193
- (y) => l.flatMap(
1194
- (m) => d.map((C) => s(y, m, C, w))
1241
+ (x) => l.flatMap(
1242
+ (m) => d.map((I) => s(x, m, I, p))
1195
1243
  )
1196
1244
  )
1197
1245
  );
@@ -1200,38 +1248,38 @@ function ke(...e) {
1200
1248
  ), r = () => {
1201
1249
  c(), o();
1202
1250
  };
1203
- return fe(o), r;
1251
+ return me(o), r;
1204
1252
  }
1205
- let vt = !1;
1206
- function mt(e, t, o = {}) {
1207
- const { window: s = Je, ignore: i = [], capture: c = !0, detectIframe: r = !1, controls: n = !1 } = o;
1253
+ let gt = !1;
1254
+ function ht(e, t, o = {}) {
1255
+ const { window: s = Ke, ignore: i = [], capture: c = !0, detectIframe: r = !1, controls: n = !1 } = o;
1208
1256
  if (!s)
1209
- return n ? { stop: J, cancel: J, trigger: J } : J;
1210
- if (Xe && !vt) {
1211
- vt = !0;
1257
+ return n ? { stop: Z, cancel: Z, trigger: Z } : Z;
1258
+ if (Ge && !gt) {
1259
+ gt = !0;
1212
1260
  const v = { passive: !0 };
1213
- Array.from(s.document.body.children).forEach((h) => h.addEventListener("click", J, v)), s.document.documentElement.addEventListener("click", J, v);
1261
+ Array.from(s.document.body.children).forEach((g) => g.addEventListener("click", Z, v)), s.document.documentElement.addEventListener("click", Z, v);
1214
1262
  }
1215
1263
  let l = !0;
1216
- const d = (v) => $(i).some((h) => {
1217
- if (typeof h == "string")
1218
- return Array.from(s.document.querySelectorAll(h)).some((p) => p === v.target || v.composedPath().includes(p));
1264
+ const d = (v) => M(i).some((g) => {
1265
+ if (typeof g == "string")
1266
+ return Array.from(s.document.querySelectorAll(g)).some((b) => b === v.target || v.composedPath().includes(b));
1219
1267
  {
1220
- const p = ne(h);
1221
- return p && (v.target === p || v.composedPath().includes(p));
1268
+ const b = le(g);
1269
+ return b && (v.target === b || v.composedPath().includes(b));
1222
1270
  }
1223
1271
  });
1224
1272
  function f(v) {
1225
- const h = $(v);
1226
- return h && h.$.subTree.shapeFlag === 16;
1273
+ const g = M(v);
1274
+ return g && g.$.subTree.shapeFlag === 16;
1227
1275
  }
1228
- function w(v, h) {
1229
- const p = $(v), E = p.$.subTree && p.$.subTree.children;
1230
- return E == null || !Array.isArray(E) ? !1 : E.some((T) => T.el === h.target || h.composedPath().includes(T.el));
1276
+ function p(v, g) {
1277
+ const b = M(v), P = b.$.subTree && b.$.subTree.children;
1278
+ return P == null || !Array.isArray(P) ? !1 : P.some((B) => B.el === g.target || g.composedPath().includes(B.el));
1231
1279
  }
1232
- const y = (v) => {
1233
- const h = ne(e);
1234
- if (v.target != null && !(!(h instanceof Element) && f(e) && w(e, v)) && !(!h || h === v.target || v.composedPath().includes(h))) {
1280
+ const x = (v) => {
1281
+ const g = le(e);
1282
+ if (v.target != null && !(!(g instanceof Element) && f(e) && p(e, v)) && !(!g || g === v.target || v.composedPath().includes(g))) {
1235
1283
  if ("detail" in v && v.detail === 0 && (l = !d(v)), !l) {
1236
1284
  l = !0;
1237
1285
  return;
@@ -1240,119 +1288,119 @@ function mt(e, t, o = {}) {
1240
1288
  }
1241
1289
  };
1242
1290
  let m = !1;
1243
- const C = [
1244
- ke(s, "click", (v) => {
1291
+ const I = [
1292
+ Re(s, "click", (v) => {
1245
1293
  m || (m = !0, setTimeout(() => {
1246
1294
  m = !1;
1247
- }, 0), y(v));
1295
+ }, 0), x(v));
1248
1296
  }, { passive: !0, capture: c }),
1249
- ke(s, "pointerdown", (v) => {
1250
- const h = ne(e);
1251
- l = !d(v) && !!(h && !v.composedPath().includes(h));
1297
+ Re(s, "pointerdown", (v) => {
1298
+ const g = le(e);
1299
+ l = !d(v) && !!(g && !v.composedPath().includes(g));
1252
1300
  }, { passive: !0 }),
1253
- r && ke(s, "blur", (v) => {
1301
+ r && Re(s, "blur", (v) => {
1254
1302
  setTimeout(() => {
1255
- var h;
1256
- const p = ne(e);
1257
- ((h = s.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !p?.contains(s.document.activeElement) && t(v);
1303
+ var g;
1304
+ const b = le(e);
1305
+ ((g = s.document.activeElement) == null ? void 0 : g.tagName) === "IFRAME" && !b?.contains(s.document.activeElement) && t(v);
1258
1306
  }, 0);
1259
1307
  }, { passive: !0 })
1260
- ].filter(Boolean), b = () => C.forEach((v) => v());
1308
+ ].filter(Boolean), w = () => I.forEach((v) => v());
1261
1309
  return n ? {
1262
- stop: b,
1310
+ stop: w,
1263
1311
  cancel: () => {
1264
1312
  l = !1;
1265
1313
  },
1266
1314
  trigger: (v) => {
1267
- l = !0, y(v), l = !1;
1315
+ l = !0, x(v), l = !1;
1268
1316
  }
1269
- } : b;
1317
+ } : w;
1270
1318
  }
1271
- const Be = /* @__PURE__ */ new WeakMap(), zn = {
1319
+ const ze = /* @__PURE__ */ new WeakMap(), Wn = {
1272
1320
  mounted(e, t) {
1273
1321
  const o = !t.modifiers.bubble;
1274
1322
  let s;
1275
1323
  if (typeof t.value == "function")
1276
- s = mt(e, t.value, { capture: o });
1324
+ s = ht(e, t.value, { capture: o });
1277
1325
  else {
1278
1326
  const [i, c] = t.value;
1279
- s = mt(e, i, Object.assign({ capture: o }, c));
1327
+ s = ht(e, i, Object.assign({ capture: o }, c));
1280
1328
  }
1281
- Be.set(e, s);
1329
+ ze.set(e, s);
1282
1330
  },
1283
1331
  unmounted(e) {
1284
- const t = Be.get(e);
1285
- t && typeof t == "function" ? t() : t?.stop(), Be.delete(e);
1332
+ const t = ze.get(e);
1333
+ t && typeof t == "function" ? t() : t?.stop(), ze.delete(e);
1286
1334
  }
1287
1335
  };
1288
1336
  // @__NO_SIDE_EFFECTS__
1289
- function Wn() {
1290
- const e = G(!1), t = Se();
1291
- return t && ae(() => {
1337
+ function zn() {
1338
+ const e = G(!1), t = Ae();
1339
+ return t && re(() => {
1292
1340
  e.value = !0;
1293
1341
  }, t), e;
1294
1342
  }
1295
1343
  // @__NO_SIDE_EFFECTS__
1296
- function Xn(e) {
1297
- const t = /* @__PURE__ */ Wn();
1298
- return S(() => (t.value, !!e()));
1344
+ function Nn(e) {
1345
+ const t = /* @__PURE__ */ zn();
1346
+ return D(() => (t.value, !!e()));
1299
1347
  }
1300
- function ht(e, t, o = {}) {
1301
- const { window: s = Je, ...i } = o;
1348
+ function pt(e, t, o = {}) {
1349
+ const { window: s = Ke, ...i } = o;
1302
1350
  let c;
1303
- const r = /* @__PURE__ */ Xn(() => s && "ResizeObserver" in s), n = () => {
1351
+ const r = /* @__PURE__ */ Nn(() => s && "ResizeObserver" in s), n = () => {
1304
1352
  c && (c.disconnect(), c = void 0);
1305
- }, l = S(() => {
1306
- const w = $(e);
1307
- return Array.isArray(w) ? w.map((y) => ne(y)) : [ne(w)];
1353
+ }, l = D(() => {
1354
+ const p = M(e);
1355
+ return Array.isArray(p) ? p.map((x) => le(x)) : [le(p)];
1308
1356
  }), d = V(
1309
1357
  l,
1310
- (w) => {
1358
+ (p) => {
1311
1359
  if (n(), r.value && s) {
1312
1360
  c = new ResizeObserver(t);
1313
- for (const y of w)
1314
- y && c.observe(y, i);
1361
+ for (const x of p)
1362
+ x && c.observe(x, i);
1315
1363
  }
1316
1364
  },
1317
1365
  { immediate: !0, flush: "post" }
1318
1366
  ), f = () => {
1319
1367
  n(), d();
1320
1368
  };
1321
- return fe(f), {
1369
+ return me(f), {
1322
1370
  isSupported: r,
1323
1371
  stop: f
1324
1372
  };
1325
1373
  }
1326
- function ze(e) {
1374
+ function Ne(e) {
1327
1375
  return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
1328
1376
  }
1329
- const Gn = {
1377
+ const Xn = {
1330
1378
  mounted(e, t) {
1331
- typeof t.value == "function" ? ht(e, t.value) : ht(e, ...t.value);
1379
+ typeof t.value == "function" ? pt(e, t.value) : pt(e, ...t.value);
1332
1380
  }
1333
1381
  };
1334
- function $t(e) {
1382
+ function Rt(e) {
1335
1383
  const t = window.getComputedStyle(e);
1336
1384
  if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight)
1337
1385
  return !0;
1338
1386
  {
1339
1387
  const o = e.parentNode;
1340
- return !o || o.tagName === "BODY" ? !1 : $t(o);
1388
+ return !o || o.tagName === "BODY" ? !1 : Rt(o);
1341
1389
  }
1342
1390
  }
1343
- function Nn(e) {
1391
+ function Gn(e) {
1344
1392
  const t = e || window.event, o = t.target;
1345
- return $t(o) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
1393
+ return Rt(o) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
1346
1394
  }
1347
- const We = /* @__PURE__ */ new WeakMap();
1348
- function Vn(e, t = !1) {
1395
+ const Xe = /* @__PURE__ */ new WeakMap();
1396
+ function Fn(e, t = !1) {
1349
1397
  const o = G(t);
1350
1398
  let s = null, i = "";
1351
1399
  V(cn(e), (n) => {
1352
- const l = ze($(n));
1400
+ const l = Ne(M(n));
1353
1401
  if (l) {
1354
1402
  const d = l;
1355
- if (We.get(d) || We.set(d, d.style.overflow), d.style.overflow !== "hidden" && (i = d.style.overflow), d.style.overflow === "hidden")
1403
+ if (Xe.get(d) || Xe.set(d, d.style.overflow), d.style.overflow !== "hidden" && (i = d.style.overflow), d.style.overflow === "hidden")
1356
1404
  return o.value = !0;
1357
1405
  if (o.value)
1358
1406
  return d.style.overflow = "hidden";
@@ -1361,20 +1409,20 @@ function Vn(e, t = !1) {
1361
1409
  immediate: !0
1362
1410
  });
1363
1411
  const c = () => {
1364
- const n = ze($(e));
1365
- !n || o.value || (Xe && (s = ke(
1412
+ const n = Ne(M(e));
1413
+ !n || o.value || (Ge && (s = Re(
1366
1414
  n,
1367
1415
  "touchmove",
1368
1416
  (l) => {
1369
- Nn(l);
1417
+ Gn(l);
1370
1418
  },
1371
1419
  { passive: !1 }
1372
1420
  )), n.style.overflow = "hidden", o.value = !0);
1373
1421
  }, r = () => {
1374
- const n = ze($(e));
1375
- !n || !o.value || (Xe && s?.(), n.style.overflow = i, We.delete(n), o.value = !1);
1422
+ const n = Ne(M(e));
1423
+ !n || !o.value || (Ge && s?.(), n.style.overflow = i, Xe.delete(n), o.value = !1);
1376
1424
  };
1377
- return fe(r), S({
1425
+ return me(r), D({
1378
1426
  get() {
1379
1427
  return o.value;
1380
1428
  },
@@ -1383,18 +1431,18 @@ function Vn(e, t = !1) {
1383
1431
  }
1384
1432
  });
1385
1433
  }
1386
- function Fn() {
1434
+ function Vn() {
1387
1435
  let e = !1;
1388
1436
  const t = G(!1);
1389
1437
  return (o, s) => {
1390
1438
  if (t.value = s.value, e)
1391
1439
  return;
1392
1440
  e = !0;
1393
- const i = Vn(o, s.value);
1441
+ const i = Fn(o, s.value);
1394
1442
  V(t, (c) => i.value = c);
1395
1443
  };
1396
1444
  }
1397
- Fn();
1445
+ Vn();
1398
1446
  const Yn = { class: "gantt-connection-overlay" }, jn = {
1399
1447
  class: "connection-svg",
1400
1448
  style: {
@@ -1406,39 +1454,39 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1406
1454
  pointerEvents: "none",
1407
1455
  zIndex: 1
1408
1456
  }
1409
- }, Un = ["d", "stroke-width", "onDblclick"], qn = ["d", "stroke", "stroke-width", "id", "onDblclick"], Jn = 0.25, Ce = 16, Zn = /* @__PURE__ */ ee({
1457
+ }, Un = ["d", "stroke-width", "onDblclick"], qn = ["d", "stroke", "stroke-width", "id", "onDblclick"], Jn = 0.25, Ie = 16, Zn = /* @__PURE__ */ te({
1410
1458
  __name: "AGanttConnection",
1411
1459
  props: {
1412
1460
  store: {}
1413
1461
  },
1414
1462
  emits: ["connection:delete"],
1415
1463
  setup(e, { emit: t }) {
1416
- const o = t, s = S(() => e.store.connectionPaths.filter((r) => {
1464
+ const o = t, s = D(() => e.store.connectionPaths.filter((r) => {
1417
1465
  const n = e.store.ganttBars.find((d) => d.id === r.from.barId), l = e.store.ganttBars.find((d) => d.id === r.to.barId);
1418
1466
  return n && l;
1419
1467
  })), i = (r, n = !1) => {
1420
1468
  const l = e.store.connectionHandles.find(
1421
- (L) => L.barId === r.from.barId && L.side === r.from.side
1469
+ ($) => $.barId === r.from.barId && $.side === r.from.side
1422
1470
  ), d = e.store.connectionHandles.find(
1423
- (L) => L.barId === r.to.barId && L.side === r.to.side
1471
+ ($) => $.barId === r.to.barId && $.side === r.to.side
1424
1472
  );
1425
1473
  if (!l || !d) return "";
1426
- const f = l.position.x + Ce / 2, w = l.position.y + Ce / 2, y = d.position.x + Ce / 2, m = d.position.y + Ce / 2, C = Math.abs(y - f), b = Math.max(C * Jn, 50), v = f + (r.from.side === "left" ? -b : b), h = y + (r.to.side === "left" ? -b : b), p = { x: 0.5 * f + 0.5 * v, y: 0.5 * w + 0.5 * w }, E = { x: 0.5 * v + 0.5 * h, y: 0.5 * w + 0.5 * m }, T = { x: 0.5 * h + 0.5 * y, y: 0.5 * m + 0.5 * m }, N = { x: 0.5 * p.x + 0.5 * E.x, y: 0.5 * p.y + 0.5 * E.y }, O = { x: 0.5 * E.x + 0.5 * T.x, y: 0.5 * E.y + 0.5 * T.y }, R = { x: 0.5 * N.x + 0.5 * O.x, y: 0.5 * N.y + 0.5 * O.y };
1427
- return `M ${f} ${w} Q ${v} ${w}, ${R.x} ${R.y} Q ${h} ${m}, ${y} ${m}`;
1474
+ const f = l.position.x + Ie / 2, p = l.position.y + Ie / 2, x = d.position.x + Ie / 2, m = d.position.y + Ie / 2, I = Math.abs(x - f), w = Math.max(I * Jn, 50), v = f + (r.from.side === "left" ? -w : w), g = x + (r.to.side === "left" ? -w : w), b = { x: 0.5 * f + 0.5 * v, y: 0.5 * p + 0.5 * p }, P = { x: 0.5 * v + 0.5 * g, y: 0.5 * p + 0.5 * m }, B = { x: 0.5 * g + 0.5 * x, y: 0.5 * m + 0.5 * m }, F = { x: 0.5 * b.x + 0.5 * P.x, y: 0.5 * b.y + 0.5 * P.y }, S = { x: 0.5 * P.x + 0.5 * B.x, y: 0.5 * P.y + 0.5 * B.y }, y = { x: 0.5 * F.x + 0.5 * S.x, y: 0.5 * F.y + 0.5 * S.y };
1475
+ return `M ${f} ${p} Q ${v} ${p}, ${y.x} ${y.y} Q ${g} ${m}, ${x} ${m}`;
1428
1476
  }, c = (r) => {
1429
1477
  e.store.deleteConnection(r.id) && o("connection:delete", r);
1430
1478
  };
1431
- return (r, n) => (M(), D("div", Yn, [
1432
- (M(), D("svg", jn, [
1433
- n[0] || (n[0] = z("defs", null, [
1434
- z("path", {
1479
+ return (r, n) => (T(), L("div", Yn, [
1480
+ (T(), L("svg", jn, [
1481
+ n[0] || (n[0] = N("defs", null, [
1482
+ N("path", {
1435
1483
  id: "arrowhead",
1436
1484
  d: "M 0 -7 L 20 0 L 0 7Z",
1437
1485
  stroke: "black",
1438
1486
  "stroke-width": "1",
1439
1487
  fill: "currentColor"
1440
1488
  }),
1441
- z("marker", {
1489
+ N("marker", {
1442
1490
  id: "arrowhead-marker",
1443
1491
  markerWidth: "10",
1444
1492
  markerHeight: "7",
@@ -1447,13 +1495,13 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1447
1495
  orient: "auto",
1448
1496
  markerUnits: "strokeWidth"
1449
1497
  }, [
1450
- z("polygon", {
1498
+ N("polygon", {
1451
1499
  points: "0 0, 10 3.5, 0 7",
1452
1500
  fill: "currentColor"
1453
1501
  })
1454
1502
  ])
1455
1503
  ], -1)),
1456
- (M(!0), D(oe, null, ge(s.value, (l) => (M(), D("path", {
1504
+ (T(!0), L(ae, null, pe(s.value, (l) => (T(), L("path", {
1457
1505
  key: `${l.id}-hitbox`,
1458
1506
  d: i(l),
1459
1507
  stroke: "transparent",
@@ -1462,7 +1510,7 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1462
1510
  class: "connection-hitbox",
1463
1511
  onDblclick: (d) => c(l)
1464
1512
  }, null, 40, Un))), 128)),
1465
- (M(!0), D(oe, null, ge(s.value, (l) => (M(), D("path", {
1513
+ (T(!0), L(ae, null, pe(s.value, (l) => (T(), L("path", {
1466
1514
  key: l.id,
1467
1515
  d: i(l),
1468
1516
  stroke: l.style?.color || "#666",
@@ -1476,10 +1524,10 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1476
1524
  ]))
1477
1525
  ]));
1478
1526
  }
1479
- }), Qn = /* @__PURE__ */ se(Zn, [["__scopeId", "data-v-955111b6"]]), Kn = { key: 0 }, _n = {
1527
+ }), Qn = /* @__PURE__ */ ie(Zn, [["__scopeId", "data-v-955111b6"]]), Kn = { key: 0 }, _n = {
1480
1528
  class: "atable-header-row",
1481
1529
  tabindex: "-1"
1482
- }, eo = ["data-colindex"], Mt = /* @__PURE__ */ ee({
1530
+ }, eo = ["data-colindex"], St = /* @__PURE__ */ te({
1483
1531
  __name: "ATableHeader",
1484
1532
  props: {
1485
1533
  columns: {},
@@ -1493,40 +1541,40 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1493
1541
  typeof n == "number" && n !== c && e.store.resizeColumn(r, c);
1494
1542
  }
1495
1543
  };
1496
- return (o, s) => o.columns.length ? (M(), D("thead", Kn, [
1497
- z("tr", _n, [
1498
- o.store.zeroColumn ? (M(), D("th", {
1544
+ return (o, s) => o.columns.length ? (T(), L("thead", Kn, [
1545
+ N("tr", _n, [
1546
+ o.store.zeroColumn ? (T(), L("th", {
1499
1547
  key: 0,
1500
1548
  id: "header-index",
1501
- class: U([[
1549
+ class: q([[
1502
1550
  o.store.hasPinnedColumns ? "sticky-index" : "",
1503
1551
  o.store.isTreeView ? "tree-index" : "",
1504
1552
  o.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1505
1553
  ], "list-index"])
1506
- }, null, 2)) : q("", !0),
1507
- (M(!0), D(oe, null, ge(o.columns, (i, c) => Me((M(), D("th", {
1554
+ }, null, 2)) : J("", !0),
1555
+ (T(!0), L(ae, null, pe(o.columns, (i, c) => Me((T(), L("th", {
1508
1556
  key: i.name,
1509
1557
  "data-colindex": c,
1510
1558
  tabindex: "-1",
1511
- style: _(o.store.getHeaderCellStyle(i)),
1512
- class: U(i.pinned ? "sticky-column" : "")
1559
+ style: ee(o.store.getHeaderCellStyle(i)),
1560
+ class: q(i.pinned ? "sticky-column" : "")
1513
1561
  }, [
1514
- F(o.$slots, "default", {}, () => [
1515
- zt(ie(i.label || String.fromCharCode(c + 97).toUpperCase()), 1)
1562
+ j(o.$slots, "default", {}, () => [
1563
+ Wt(ue(i.label || String.fromCharCode(c + 97).toUpperCase()), 1)
1516
1564
  ])
1517
1565
  ], 14, eo)), [
1518
- [k(Gn), t]
1566
+ [R(Xn), t]
1519
1567
  ])), 128))
1520
1568
  ])
1521
- ])) : q("", !0);
1569
+ ])) : J("", !0);
1522
1570
  }
1523
- }), St = /* @__PURE__ */ ee({
1571
+ }), Mt = /* @__PURE__ */ te({
1524
1572
  __name: "ATableModal",
1525
1573
  props: {
1526
1574
  store: {}
1527
1575
  },
1528
1576
  setup(e) {
1529
- const t = j("amodal"), { width: o, height: s } = te(t), i = S(() => {
1577
+ const t = U("amodal"), { width: o, height: s } = oe(t), i = D(() => {
1530
1578
  if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return;
1531
1579
  const c = e.store.modal.cell?.closest("table"), r = c.offsetHeight || 0, n = c.offsetWidth || 0;
1532
1580
  let l = e.store.modal.cell?.offsetTop || 0;
@@ -1538,222 +1586,247 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1538
1586
  top: `${l}px`
1539
1587
  };
1540
1588
  });
1541
- return (c, r) => (M(), D("div", {
1589
+ return (c, r) => (T(), L("div", {
1542
1590
  class: "amodal",
1543
1591
  ref: "amodal",
1544
1592
  tabindex: "-1",
1545
- onClick: r[0] || (r[0] = $e(() => {
1593
+ onClick: r[0] || (r[0] = Se(() => {
1546
1594
  }, ["stop"])),
1547
- onInput: r[1] || (r[1] = $e(() => {
1595
+ onInput: r[1] || (r[1] = Se(() => {
1548
1596
  }, ["stop"])),
1549
- style: _(i.value)
1597
+ style: ee(i.value)
1550
1598
  }, [
1551
- F(c.$slots, "default")
1599
+ j(c.$slots, "default")
1552
1600
  ], 36));
1553
1601
  }
1554
1602
  }), to = (e) => {
1555
1603
  const t = e.id || yn();
1556
- return Wt(`table-${t}`, () => {
1604
+ return zt(`table-${t}`, () => {
1557
1605
  const s = () => {
1558
1606
  const a = [Object.assign({}, { rowModified: !1 })], u = /* @__PURE__ */ new Set();
1559
- for (let g = 0; g < c.value.length; g++) {
1560
- const x = c.value[g];
1561
- x.parent !== null && x.parent !== void 0 && u.add(x.parent);
1607
+ for (let k = 0; k < c.value.length; k++) {
1608
+ const A = c.value[k];
1609
+ A.parent !== null && A.parent !== void 0 && u.add(A.parent);
1562
1610
  }
1563
- for (let g = 0; g < c.value.length; g++) {
1564
- const x = c.value[g];
1565
- a[g] = {
1566
- childrenOpen: !1,
1611
+ const h = (k) => c.value[k]?.gantt !== void 0, E = (k) => {
1612
+ for (let A = 0; A < c.value.length; A++)
1613
+ if (c.value[A].parent === k && (h(A) || E(A)))
1614
+ return !0;
1615
+ return !1;
1616
+ }, H = (k) => {
1617
+ const A = r.value, ne = A.view === "tree" || A.view === "tree-gantt" ? A.defaultTreeExpansion : void 0;
1618
+ if (!ne) return !0;
1619
+ switch (ne) {
1620
+ case "root":
1621
+ return !1;
1622
+ // Only root nodes are visible, all children start collapsed
1623
+ case "branch":
1624
+ return E(k);
1625
+ case "leaf":
1626
+ return !0;
1627
+ // All nodes should be expanded
1628
+ default:
1629
+ return !0;
1630
+ }
1631
+ };
1632
+ for (let k = 0; k < c.value.length; k++) {
1633
+ const A = c.value[k], ne = A.parent === null || A.parent === void 0, Ce = u.has(k);
1634
+ a[k] = {
1635
+ childrenOpen: H(k),
1567
1636
  expanded: !1,
1568
- indent: x.indent || 0,
1569
- isParent: u.has(g),
1570
- isRoot: x.parent === null || x.parent === void 0,
1637
+ indent: A.indent || 0,
1638
+ isParent: Ce,
1639
+ isRoot: ne,
1571
1640
  rowModified: !1,
1572
- open: x.parent === null || x.parent === void 0,
1573
- parent: x.parent
1641
+ open: ne,
1642
+ // This will be recalculated later for non-root nodes
1643
+ parent: A.parent
1574
1644
  };
1575
1645
  }
1576
1646
  return a;
1577
- }, i = H(e.columns), c = H(e.rows), r = H(e.config || {}), n = H({}), l = H({}), d = S(() => {
1647
+ }, i = z(e.columns), c = z(e.rows), r = z(e.config || {}), n = z({}), l = z({}), d = D(() => {
1578
1648
  const a = {};
1579
- for (const [u, g] of i.value.entries())
1580
- for (const [x, A] of c.value.entries())
1581
- a[`${u}:${x}`] = A[g.name];
1649
+ for (const [u, h] of i.value.entries())
1650
+ for (const [E, H] of c.value.entries())
1651
+ a[`${u}:${E}`] = H[h.name];
1582
1652
  return a;
1583
- }), f = S({
1653
+ }), f = D({
1584
1654
  get: () => {
1585
1655
  const a = s();
1586
1656
  for (let u = 0; u < a.length; u++)
1587
1657
  n.value[u] && (a[u].rowModified = n.value[u]), l.value[u] && (l.value[u].childrenOpen !== void 0 && (a[u].childrenOpen = l.value[u].childrenOpen), l.value[u].expanded !== void 0 && (a[u].expanded = l.value[u].expanded));
1588
- if (p.value) {
1589
- const u = (g, x) => {
1590
- const A = x[g];
1591
- if (A.isRoot || A.parent === null || A.parent === void 0)
1658
+ if (b.value) {
1659
+ const u = (h, E) => {
1660
+ const H = E[h];
1661
+ if (H.isRoot || H.parent === null || H.parent === void 0)
1592
1662
  return !0;
1593
- const P = A.parent;
1594
- return P < 0 || P >= x.length ? !1 : (x[P].childrenOpen || !1) && u(P, x);
1663
+ const k = H.parent;
1664
+ return k < 0 || k >= E.length ? !1 : (E[k].childrenOpen || !1) && u(k, E);
1595
1665
  };
1596
- for (let g = 0; g < a.length; g++)
1597
- a[g].isRoot || (a[g].open = u(g, a));
1666
+ for (let h = 0; h < a.length; h++)
1667
+ a[h].isRoot || (a[h].open = u(h, a));
1598
1668
  }
1599
1669
  return a;
1600
1670
  },
1601
1671
  set: (a) => {
1602
1672
  JSON.stringify(a) !== JSON.stringify(f.value) && (f.value = a);
1603
1673
  }
1604
- }), w = H(e.modal || { visible: !1 }), y = H({}), m = H([]), C = H([]), b = H([]), v = S(() => i.value.some((a) => a.pinned)), h = S(() => r.value.view === "gantt" || r.value.view === "tree-gantt"), p = S(() => r.value.view === "tree" || r.value.view === "tree-gantt"), E = S(() => r.value.dependencyGraph !== !1), T = S(() => `${Math.ceil(c.value.length / 100 + 1)}ch`), N = S(
1674
+ }), p = z(e.modal || { visible: !1 }), x = z({}), m = z([]), I = z([]), w = z([]), v = D(() => i.value.some((a) => a.pinned)), g = D(() => r.value.view === "gantt" || r.value.view === "tree-gantt"), b = D(() => r.value.view === "tree" || r.value.view === "tree-gantt"), P = D(() => {
1675
+ const a = r.value;
1676
+ return a.view === "gantt" || a.view === "tree-gantt" ? a.dependencyGraph !== !1 : !0;
1677
+ }), B = D(() => `${Math.ceil(c.value.length / 100 + 1)}ch`), F = D(
1605
1678
  () => r.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(r.value.view) : !1
1606
- ), O = (a, u) => d.value[`${a}:${u}`], R = (a, u, g) => {
1607
- const x = `${a}:${u}`, A = i.value[a];
1608
- d.value[x] !== g && (n.value[u] = !0), d.value[x] = g, c.value[u] = {
1679
+ ), S = (a, u) => d.value[`${a}:${u}`], y = (a, u, h) => {
1680
+ const E = `${a}:${u}`, H = i.value[a];
1681
+ d.value[E] !== h && (n.value[u] = !0), d.value[E] = h, c.value[u] = {
1609
1682
  ...c.value[u],
1610
- [A.name]: g
1683
+ [H.name]: h
1611
1684
  };
1612
- }, L = (a) => {
1685
+ }, $ = (a) => {
1613
1686
  c.value = a;
1614
- }, X = (a, u, g) => {
1615
- const x = `${a}:${u}`;
1616
- d.value[x] !== g && (n.value[u] = !0, y.value[x] = g);
1617
- }, Y = (a) => {
1618
- const u = i.value.indexOf(a) === i.value.length - 1, g = r.value.fullWidth ? a.resizable && !u : a.resizable;
1687
+ }, X = (a, u, h) => {
1688
+ const E = `${a}:${u}`;
1689
+ d.value[E] !== h && (n.value[u] = !0, x.value[E] = h);
1690
+ }, W = (a) => {
1691
+ const u = i.value.indexOf(a) === i.value.length - 1, h = r.value.fullWidth ? a.resizable && !u : a.resizable;
1619
1692
  return {
1620
1693
  width: a.width || "40ch",
1621
1694
  textAlign: a.align || "center",
1622
- ...g && {
1695
+ ...h && {
1623
1696
  resize: "horizontal",
1624
1697
  overflow: "hidden",
1625
1698
  whiteSpace: "nowrap"
1626
1699
  }
1627
1700
  };
1628
- }, B = (a, u) => {
1701
+ }, O = (a, u) => {
1629
1702
  if (a < 0 || a >= i.value.length) return;
1630
- const x = Math.max(u, 40);
1703
+ const E = Math.max(u, 40);
1631
1704
  i.value[a] = {
1632
1705
  ...i.value[a],
1633
- width: `${x}px`
1706
+ width: `${E}px`
1634
1707
  };
1635
- }, K = (a) => {
1708
+ }, Y = (a) => {
1636
1709
  const u = c.value[a];
1637
- return h.value && u.gantt !== void 0;
1638
- }, ve = (a) => !p.value || f.value[a].isRoot || f.value[a].open, we = (a) => !p.value && r.value.view !== "list-expansion" ? "" : p.value && (f.value[a].isRoot || f.value[a].isParent) ? f.value[a].childrenOpen ? "▼" : "►" : r.value.view === "list-expansion" ? f.value[a].expanded ? "▼" : "►" : "", me = (a) => {
1639
- if (p.value) {
1640
- const u = l.value[a] || {}, x = !(u.childrenOpen ?? f.value[a].childrenOpen);
1710
+ return g.value && u.gantt !== void 0;
1711
+ }, _ = (a) => !b.value || f.value[a].isRoot || f.value[a].open, ye = (a) => !b.value && r.value.view !== "list-expansion" ? "" : b.value && (f.value[a].isRoot || f.value[a].isParent) ? f.value[a].childrenOpen ? "▼" : "►" : r.value.view === "list-expansion" ? f.value[a].expanded ? "▼" : "►" : "", ge = (a) => {
1712
+ if (b.value) {
1713
+ const u = l.value[a] || {}, E = !(u.childrenOpen ?? f.value[a].childrenOpen);
1641
1714
  l.value[a] = {
1642
1715
  ...u,
1643
- childrenOpen: x
1644
- }, x || ye(a);
1716
+ childrenOpen: E
1717
+ }, E || xe(a);
1645
1718
  } else if (r.value.view === "list-expansion") {
1646
- const u = l.value[a] || {}, g = u.expanded ?? f.value[a].expanded;
1719
+ const u = l.value[a] || {}, h = u.expanded ?? f.value[a].expanded;
1647
1720
  l.value[a] = {
1648
1721
  ...u,
1649
- expanded: !g
1722
+ expanded: !h
1650
1723
  };
1651
1724
  }
1652
- }, ye = (a) => {
1725
+ }, xe = (a) => {
1653
1726
  for (let u = 0; u < c.value.length; u++)
1654
1727
  if (f.value[u].parent === a) {
1655
- const g = l.value[u] || {};
1728
+ const h = l.value[u] || {};
1656
1729
  l.value[u] = {
1657
- ...g,
1730
+ ...h,
1658
1731
  childrenOpen: !1
1659
- }, ye(u);
1732
+ }, xe(u);
1660
1733
  }
1661
- }, De = (a, u) => {
1662
- const g = O(a, u);
1663
- return be(a, u, g);
1664
- }, be = (a, u, g) => {
1665
- const x = i.value[a], A = c.value[u], P = x.format;
1666
- return P ? typeof P == "function" ? P(g, { table: d.value, row: A, column: x }) : typeof P == "string" ? Function(`"use strict";return (${P})`)()(g, { table: d.value, row: A, column: x }) : g : g;
1734
+ }, Oe = (a, u) => {
1735
+ const h = S(a, u);
1736
+ return be(a, u, h);
1737
+ }, be = (a, u, h) => {
1738
+ const E = i.value[a], H = c.value[u], k = E.format;
1739
+ return k ? typeof k == "function" ? k(h, { table: d.value, row: H, column: E }) : typeof k == "string" ? Function(`"use strict";return (${k})`)()(h, { table: d.value, row: H, column: E }) : h : h;
1667
1740
  };
1668
1741
  return {
1669
1742
  // state
1670
1743
  columns: i,
1671
1744
  config: r,
1672
- connectionHandles: C,
1673
- connectionPaths: b,
1745
+ connectionHandles: I,
1746
+ connectionPaths: w,
1674
1747
  display: f,
1675
1748
  ganttBars: m,
1676
- modal: w,
1749
+ modal: p,
1677
1750
  rows: c,
1678
1751
  table: d,
1679
- updates: y,
1752
+ updates: x,
1680
1753
  // getters
1681
1754
  hasPinnedColumns: v,
1682
- isGanttView: h,
1683
- isTreeView: p,
1684
- isDependencyGraphEnabled: E,
1685
- numberedRowWidth: T,
1686
- zeroColumn: N,
1755
+ isGanttView: g,
1756
+ isTreeView: b,
1757
+ isDependencyGraphEnabled: P,
1758
+ numberedRowWidth: B,
1759
+ zeroColumn: F,
1687
1760
  // actions
1688
1761
  closeModal: (a) => {
1689
- a.target instanceof Node && w.value.parent?.contains(a.target) || w.value.visible && (w.value.visible = !1);
1762
+ a.target instanceof Node && p.value.parent?.contains(a.target) || p.value.visible && (p.value.visible = !1);
1690
1763
  },
1691
- createConnection: (a, u, g) => {
1692
- const x = C.value.find((W) => W.id === a), A = C.value.find((W) => W.id === u);
1693
- if (!x || !A)
1764
+ createConnection: (a, u, h) => {
1765
+ const E = I.value.find((A) => A.id === a), H = I.value.find((A) => A.id === u);
1766
+ if (!E || !H)
1694
1767
  return console.warn("Cannot create connection: handle not found"), null;
1695
- const P = {
1768
+ const k = {
1696
1769
  id: `connection-${a}-${u}`,
1697
1770
  from: {
1698
- barId: x.barId,
1699
- side: x.side
1771
+ barId: E.barId,
1772
+ side: E.side
1700
1773
  },
1701
1774
  to: {
1702
- barId: A.barId,
1703
- side: A.side
1775
+ barId: H.barId,
1776
+ side: H.side
1704
1777
  },
1705
- style: g?.style,
1706
- label: g?.label
1778
+ style: h?.style,
1779
+ label: h?.label
1707
1780
  };
1708
- return b.value.push(P), P;
1781
+ return w.value.push(k), k;
1709
1782
  },
1710
1783
  deleteConnection: (a) => {
1711
- const u = b.value.findIndex((g) => g.id === a);
1712
- return u >= 0 ? (b.value.splice(u, 1), !0) : !1;
1784
+ const u = w.value.findIndex((h) => h.id === a);
1785
+ return u >= 0 ? (w.value.splice(u, 1), !0) : !1;
1713
1786
  },
1714
- getCellData: O,
1715
- getCellDisplayValue: De,
1716
- getConnectionsForBar: (a) => b.value.filter((u) => u.from.barId === a || u.to.barId === a),
1787
+ getCellData: S,
1788
+ getCellDisplayValue: Oe,
1789
+ getConnectionsForBar: (a) => w.value.filter((u) => u.from.barId === a || u.to.barId === a),
1717
1790
  getFormattedValue: be,
1718
- getHandlesForBar: (a) => C.value.filter((u) => u.barId === a),
1719
- getHeaderCellStyle: Y,
1791
+ getHandlesForBar: (a) => I.value.filter((u) => u.barId === a),
1792
+ getHeaderCellStyle: W,
1720
1793
  getIndent: (a, u) => u && a === 0 && u > 0 ? `${u}ch` : "inherit",
1721
- getRowExpandSymbol: we,
1722
- isRowGantt: K,
1723
- isRowVisible: ve,
1794
+ getRowExpandSymbol: ye,
1795
+ isRowGantt: Y,
1796
+ isRowVisible: _,
1724
1797
  registerConnectionHandle: (a) => {
1725
- const u = C.value.findIndex((g) => g.id === a.id);
1726
- u >= 0 ? C.value[u] = a : C.value.push(a);
1798
+ const u = I.value.findIndex((h) => h.id === a.id);
1799
+ u >= 0 ? I.value[u] = a : I.value.push(a);
1727
1800
  },
1728
1801
  registerGanttBar: (a) => {
1729
- const u = m.value.findIndex((g) => g.id === a.id);
1802
+ const u = m.value.findIndex((h) => h.id === a.id);
1730
1803
  u >= 0 ? m.value[u] = a : m.value.push(a);
1731
1804
  },
1732
- resizeColumn: B,
1733
- setCellData: R,
1805
+ resizeColumn: O,
1806
+ setCellData: y,
1734
1807
  setCellText: X,
1735
- toggleRowExpand: me,
1808
+ toggleRowExpand: ge,
1736
1809
  unregisterConnectionHandle: (a) => {
1737
- const u = C.value.findIndex((g) => g.id === a);
1738
- u >= 0 && C.value.splice(u, 1);
1810
+ const u = I.value.findIndex((h) => h.id === a);
1811
+ u >= 0 && I.value.splice(u, 1);
1739
1812
  },
1740
1813
  unregisterGanttBar: (a) => {
1741
- const u = m.value.findIndex((g) => g.id === a);
1814
+ const u = m.value.findIndex((h) => h.id === a);
1742
1815
  u >= 0 && m.value.splice(u, 1);
1743
1816
  },
1744
1817
  updateGanttBar: (a) => {
1745
1818
  const u = c.value[a.rowIndex]?.gantt;
1746
1819
  u && (a.type === "resize" ? a.edge === "start" ? (u.startIndex = a.newStart, u.endIndex = a.end, u.colspan = u.endIndex - u.startIndex) : a.edge === "end" && (u.startIndex = a.start, u.endIndex = a.newEnd, u.colspan = u.endIndex - u.startIndex) : a.type === "bar" && (u.startIndex = a.newStart, u.endIndex = a.newEnd, u.colspan = u.endIndex - u.startIndex));
1747
1820
  },
1748
- updateRows: L
1821
+ updateRows: $
1749
1822
  };
1750
1823
  })();
1751
1824
  }, no = {
1752
1825
  class: "atable-container",
1753
1826
  style: { position: "relative" }
1754
- }, oo = /* @__PURE__ */ ee({
1827
+ }, oo = /* @__PURE__ */ te({
1755
1828
  __name: "ATable",
1756
- props: /* @__PURE__ */ ot({
1829
+ props: /* @__PURE__ */ at({
1757
1830
  id: {},
1758
1831
  config: { default: () => new Object() }
1759
1832
  }, {
@@ -1762,23 +1835,23 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1762
1835
  columns: { required: !0 },
1763
1836
  columnsModifiers: {}
1764
1837
  }),
1765
- emits: /* @__PURE__ */ ot(["cellUpdate", "gantt:drag", "connection:event", "columns:update"], ["update:rows", "update:columns"]),
1838
+ emits: /* @__PURE__ */ at(["cellUpdate", "gantt:drag", "connection:event", "columns:update"], ["update:rows", "update:columns"]),
1766
1839
  setup(e, { expose: t, emit: o }) {
1767
- const s = lt(e, "rows"), i = lt(e, "columns"), c = o, r = j("table"), n = to({ columns: i.value, rows: s.value, id: e.id, config: e.config });
1768
- n.$onAction(({ name: m, store: C, args: b, after: v }) => {
1840
+ const s = st(e, "rows"), i = st(e, "columns"), c = o, r = U("table"), n = to({ columns: i.value, rows: s.value, id: e.id, config: e.config });
1841
+ n.$onAction(({ name: m, store: I, args: w, after: v }) => {
1769
1842
  if (m === "setCellData" || m === "setCellText") {
1770
- const [h, p, E] = b, T = C.getCellData(h, p);
1843
+ const [g, b, P] = w, B = I.getCellData(g, b);
1771
1844
  v(() => {
1772
- s.value = [...C.rows], c("cellUpdate", { colIndex: h, rowIndex: p, newValue: E, oldValue: T });
1845
+ s.value = [...I.rows], c("cellUpdate", { colIndex: g, rowIndex: b, newValue: P, oldValue: B });
1773
1846
  });
1774
1847
  } else if (m === "updateGanttBar") {
1775
- const [h] = b;
1776
- let p = !1;
1777
- h.type === "resize" ? p = h.oldColspan !== h.newColspan : h.type === "bar" && (p = h.oldStart !== h.newStart || h.oldEnd !== h.newEnd), p && v(() => {
1778
- c("gantt:drag", h);
1848
+ const [g] = w;
1849
+ let b = !1;
1850
+ g.type === "resize" ? b = g.oldColspan !== g.newColspan : g.type === "bar" && (b = g.oldStart !== g.newStart || g.oldEnd !== g.newEnd), b && v(() => {
1851
+ c("gantt:drag", g);
1779
1852
  });
1780
1853
  } else m === "resizeColumn" && v(() => {
1781
- i.value = [...C.columns], c("columns:update", [...C.columns]);
1854
+ i.value = [...I.columns], c("columns:update", [...I.columns]);
1782
1855
  });
1783
1856
  }), V(
1784
1857
  () => s.value,
@@ -1792,51 +1865,51 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1792
1865
  JSON.stringify(m) !== JSON.stringify(n.columns) && (n.columns = [...m], c("columns:update", [...m]));
1793
1866
  },
1794
1867
  { deep: !0 }
1795
- ), ae(() => {
1796
- i.value.some((m) => m.pinned) && (d(), n.isTreeView && Et(r, d, { childList: !0, subtree: !0 }));
1868
+ ), re(() => {
1869
+ i.value.some((m) => m.pinned) && (d(), n.isTreeView && kt(r, d, { childList: !0, subtree: !0 }));
1797
1870
  });
1798
- const l = S(() => n.columns.filter((m) => m.pinned).length), d = () => {
1799
- const m = r.value, C = m?.rows[0], b = m?.rows[1], v = C ? Array.from(C.cells) : [];
1800
- for (const [h, p] of v.entries()) {
1801
- const E = b?.cells[h];
1802
- E && (p.style.width = `${E.offsetWidth}px`);
1871
+ const l = D(() => n.columns.filter((m) => m.pinned).length), d = () => {
1872
+ const m = r.value, I = m?.rows[0], w = m?.rows[1], v = I ? Array.from(I.cells) : [];
1873
+ for (const [g, b] of v.entries()) {
1874
+ const P = w?.cells[g];
1875
+ P && (b.style.width = `${P.offsetWidth}px`);
1803
1876
  }
1804
- for (const h of m?.rows || []) {
1805
- let p = 0;
1806
- const E = [];
1807
- for (const T of h.cells)
1808
- (T.classList.contains("sticky-column") || T.classList.contains("sticky-index")) && (T.style.left = `${p}px`, p += T.offsetWidth, E.push(T));
1809
- E.length > 0 && E[E.length - 1].classList.add("sticky-column-edge");
1877
+ for (const g of m?.rows || []) {
1878
+ let b = 0;
1879
+ const P = [];
1880
+ for (const B of g.cells)
1881
+ (B.classList.contains("sticky-column") || B.classList.contains("sticky-index")) && (B.style.left = `${b}px`, b += B.offsetWidth, P.push(B));
1882
+ P.length > 0 && P[P.length - 1].classList.add("sticky-column-edge");
1810
1883
  }
1811
1884
  };
1812
1885
  window.addEventListener("keydown", (m) => {
1813
1886
  if (m.key === "Escape" && n.modal.visible) {
1814
1887
  n.modal.visible = !1;
1815
- const C = n.modal.parent;
1816
- C && wt().then(() => {
1817
- C.focus();
1888
+ const I = n.modal.parent;
1889
+ I && Fe().then(() => {
1890
+ I.focus();
1818
1891
  });
1819
1892
  }
1820
1893
  });
1821
1894
  const f = (m) => {
1822
1895
  if (!m.gantt || l.value === 0)
1823
1896
  return n.columns;
1824
- const C = [];
1825
- for (let b = 0; b < l.value; b++) {
1826
- const v = { ...n.columns[b] };
1827
- v.originalIndex = b, C.push(v);
1897
+ const I = [];
1898
+ for (let w = 0; w < l.value; w++) {
1899
+ const v = { ...n.columns[w] };
1900
+ v.originalIndex = w, I.push(v);
1828
1901
  }
1829
- return C.push({
1902
+ return I.push({
1830
1903
  ...n.columns[l.value],
1831
1904
  isGantt: !0,
1832
1905
  colspan: m.gantt?.colspan || n.columns.length - l.value,
1833
1906
  originalIndex: l.value,
1834
1907
  width: "auto"
1835
1908
  // TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
1836
- }), C;
1837
- }, w = (m) => {
1909
+ }), I;
1910
+ }, p = (m) => {
1838
1911
  c("connection:event", { type: "create", connection: m });
1839
- }, y = (m) => {
1912
+ }, x = (m) => {
1840
1913
  c("connection:event", { type: "delete", connection: m });
1841
1914
  };
1842
1915
  return t({
@@ -1845,58 +1918,58 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1845
1918
  deleteConnection: n.deleteConnection,
1846
1919
  getConnectionsForBar: n.getConnectionsForBar,
1847
1920
  getHandlesForBar: n.getHandlesForBar
1848
- }), (m, C) => (M(), D("div", no, [
1849
- Me((M(), D("table", {
1921
+ }), (m, I) => (T(), L("div", no, [
1922
+ Me((T(), L("table", {
1850
1923
  ref: "table",
1851
1924
  class: "atable",
1852
- style: _({
1853
- width: k(n).config.fullWidth ? "100%" : "auto"
1925
+ style: ee({
1926
+ width: R(n).config.fullWidth ? "100%" : "auto"
1854
1927
  })
1855
1928
  }, [
1856
- F(m.$slots, "header", { data: k(n) }, () => [
1857
- at(Mt, {
1858
- columns: k(n).columns,
1859
- store: k(n)
1929
+ j(m.$slots, "header", { data: R(n) }, () => [
1930
+ rt(St, {
1931
+ columns: R(n).columns,
1932
+ store: R(n)
1860
1933
  }, null, 8, ["columns", "store"])
1861
1934
  ], !0),
1862
- z("tbody", null, [
1863
- F(m.$slots, "body", { data: k(n) }, () => [
1864
- (M(!0), D(oe, null, ge(k(n).rows, (b, v) => (M(), re(kt, {
1865
- key: b.id,
1866
- row: b,
1935
+ N("tbody", null, [
1936
+ j(m.$slots, "body", { data: R(n) }, () => [
1937
+ (T(!0), L(ae, null, pe(R(n).rows, (w, v) => (T(), ce($t, {
1938
+ key: w.id,
1939
+ row: w,
1867
1940
  rowIndex: v,
1868
- store: k(n)
1941
+ store: R(n)
1869
1942
  }, {
1870
- default: st(() => [
1871
- (M(!0), D(oe, null, ge(f(b), (h, p) => (M(), D(oe, {
1872
- key: h.name
1943
+ default: it(() => [
1944
+ (T(!0), L(ae, null, pe(f(w), (g, b) => (T(), L(ae, {
1945
+ key: g.name
1873
1946
  }, [
1874
- h.isGantt ? (M(), re(Ie(h.ganttComponent || "AGanttCell"), {
1947
+ g.isGantt ? (T(), ce(ke(g.ganttComponent || "AGanttCell"), {
1875
1948
  key: 0,
1876
- store: k(n),
1877
- columnsCount: k(n).columns.length - l.value,
1878
- color: b.gantt?.color,
1879
- start: b.gantt?.startIndex,
1880
- end: b.gantt?.endIndex,
1881
- colspan: h.colspan,
1882
- pinned: h.pinned,
1949
+ store: R(n),
1950
+ columnsCount: R(n).columns.length - l.value,
1951
+ color: w.gantt?.color,
1952
+ start: w.gantt?.startIndex,
1953
+ end: w.gantt?.endIndex,
1954
+ colspan: g.colspan,
1955
+ pinned: g.pinned,
1883
1956
  rowIndex: v,
1884
- colIndex: h.originalIndex ?? p,
1885
- style: _({
1886
- textAlign: h?.align || "center",
1887
- minWidth: h?.width || "40ch",
1888
- width: k(n).config.fullWidth ? "auto" : null
1957
+ colIndex: g.originalIndex ?? b,
1958
+ style: ee({
1959
+ textAlign: g?.align || "center",
1960
+ minWidth: g?.width || "40ch",
1961
+ width: R(n).config.fullWidth ? "auto" : null
1889
1962
  }),
1890
- "onConnection:create": w
1891
- }, null, 40, ["store", "columnsCount", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (M(), re(Ie(h.cellComponent || "ACell"), {
1963
+ "onConnection:create": p
1964
+ }, null, 40, ["store", "columnsCount", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (T(), ce(ke(g.cellComponent || "ACell"), {
1892
1965
  key: 1,
1893
- store: k(n),
1894
- pinned: h.pinned,
1966
+ store: R(n),
1967
+ pinned: g.pinned,
1895
1968
  rowIndex: v,
1896
- colIndex: p,
1897
- style: _({
1898
- textAlign: h?.align || "center",
1899
- width: k(n).config.fullWidth ? "auto" : null
1969
+ colIndex: b,
1970
+ style: ee({
1971
+ textAlign: g?.align || "center",
1972
+ width: R(n).config.fullWidth ? "auto" : null
1900
1973
  }),
1901
1974
  spellcheck: "false"
1902
1975
  }, null, 8, ["store", "pinned", "rowIndex", "colIndex", "style"]))
@@ -1906,64 +1979,64 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1906
1979
  }, 1032, ["row", "rowIndex", "store"]))), 128))
1907
1980
  ], !0)
1908
1981
  ]),
1909
- F(m.$slots, "footer", { data: k(n) }, void 0, !0),
1910
- F(m.$slots, "modal", { data: k(n) }, () => [
1911
- Me(at(St, { store: k(n) }, {
1912
- default: st(() => [
1913
- (M(), re(Ie(k(n).modal.component), Ge({
1914
- key: `${k(n).modal.rowIndex}:${k(n).modal.colIndex}`,
1915
- colIndex: k(n).modal.colIndex,
1916
- rowIndex: k(n).modal.rowIndex,
1917
- store: k(n)
1918
- }, k(n).modal.componentProps), null, 16, ["colIndex", "rowIndex", "store"]))
1982
+ j(m.$slots, "footer", { data: R(n) }, void 0, !0),
1983
+ j(m.$slots, "modal", { data: R(n) }, () => [
1984
+ Me(rt(Mt, { store: R(n) }, {
1985
+ default: it(() => [
1986
+ (T(), ce(ke(R(n).modal.component), Ve({
1987
+ key: `${R(n).modal.rowIndex}:${R(n).modal.colIndex}`,
1988
+ colIndex: R(n).modal.colIndex,
1989
+ rowIndex: R(n).modal.rowIndex,
1990
+ store: R(n)
1991
+ }, R(n).modal.componentProps), null, 16, ["colIndex", "rowIndex", "store"]))
1919
1992
  ]),
1920
1993
  _: 1
1921
1994
  }, 8, ["store"]), [
1922
- [bt, k(n).modal.visible]
1995
+ [bt, R(n).modal.visible]
1923
1996
  ])
1924
1997
  ], !0)
1925
1998
  ], 4)), [
1926
- [k(zn), k(n).closeModal]
1999
+ [R(Wn), R(n).closeModal]
1927
2000
  ]),
1928
- k(n).isGanttView && k(n).isDependencyGraphEnabled ? (M(), re(Qn, {
2001
+ R(n).isGanttView && R(n).isDependencyGraphEnabled ? (T(), ce(Qn, {
1929
2002
  key: 0,
1930
- store: k(n),
1931
- "onConnection:delete": y
1932
- }, null, 8, ["store"])) : q("", !0)
2003
+ store: R(n),
2004
+ "onConnection:delete": x
2005
+ }, null, 8, ["store"])) : J("", !0)
1933
2006
  ]));
1934
2007
  }
1935
- }), lo = /* @__PURE__ */ se(oo, [["__scopeId", "data-v-51a03d16"]]), ao = {}, so = { class: "aloading" }, ro = { class: "aloading-header" };
2008
+ }), lo = /* @__PURE__ */ ie(oo, [["__scopeId", "data-v-51a03d16"]]), ao = {}, so = { class: "aloading" }, ro = { class: "aloading-header" };
1936
2009
  function io(e, t) {
1937
- return M(), D("div", so, [
1938
- z("h2", ro, [
1939
- F(e.$slots, "default", {}, void 0, !0)
2010
+ return T(), L("div", so, [
2011
+ N("h2", ro, [
2012
+ j(e.$slots, "default", {}, void 0, !0)
1940
2013
  ]),
1941
- t[0] || (t[0] = z("div", { class: "aloading-bar" }, null, -1))
2014
+ t[0] || (t[0] = N("div", { class: "aloading-bar" }, null, -1))
1942
2015
  ]);
1943
2016
  }
1944
- const co = /* @__PURE__ */ se(ao, [["render", io], ["__scopeId", "data-v-a930a25b"]]), uo = {}, fo = { class: "aloading" }, vo = { class: "aloading-header" };
2017
+ const co = /* @__PURE__ */ ie(ao, [["render", io], ["__scopeId", "data-v-a930a25b"]]), uo = {}, fo = { class: "aloading" }, vo = { class: "aloading-header" };
1945
2018
  function mo(e, t) {
1946
- return M(), D("div", fo, [
1947
- z("h2", vo, [
1948
- F(e.$slots, "default", {}, void 0, !0)
2019
+ return T(), L("div", fo, [
2020
+ N("h2", vo, [
2021
+ j(e.$slots, "default", {}, void 0, !0)
1949
2022
  ]),
1950
- t[0] || (t[0] = z("div", { class: "aloading-bar" }, null, -1))
2023
+ t[0] || (t[0] = N("div", { class: "aloading-bar" }, null, -1))
1951
2024
  ]);
1952
2025
  }
1953
- const ho = /* @__PURE__ */ se(uo, [["render", mo], ["__scopeId", "data-v-e1165876"]]);
2026
+ const go = /* @__PURE__ */ ie(uo, [["render", mo], ["__scopeId", "data-v-e1165876"]]);
1954
2027
  function wo(e) {
1955
- e.component("ACell", In), e.component("AExpansionRow", Sn), e.component("AGanttCell", Pn), e.component("ARow", kt), e.component("ATable", lo), e.component("ATableHeader", Mt), e.component("ATableLoading", co), e.component("ATableLoadingBar", ho), e.component("ATableModal", St);
2028
+ e.component("ACell", En), e.component("AExpansionRow", Sn), e.component("AGanttCell", Pn), e.component("ARow", $t), e.component("ATable", lo), e.component("ATableHeader", St), e.component("ATableLoading", co), e.component("ATableLoadingBar", go), e.component("ATableModal", Mt);
1956
2029
  }
1957
2030
  export {
1958
- In as ACell,
2031
+ En as ACell,
1959
2032
  Sn as AExpansionRow,
1960
2033
  Pn as AGanttCell,
1961
- kt as ARow,
2034
+ $t as ARow,
1962
2035
  lo as ATable,
1963
- Mt as ATableHeader,
2036
+ St as ATableHeader,
1964
2037
  co as ATableLoading,
1965
- ho as ATableLoadingBar,
1966
- St as ATableModal,
2038
+ go as ATableLoadingBar,
2039
+ Mt as ATableModal,
1967
2040
  to as createTableStore,
1968
2041
  wo as install
1969
2042
  };