@stonecrop/atable 0.11.10 → 0.12.1

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,9 +1,9 @@
1
- import { onMounted as He, ref as z, watch as ce, onBeforeUnmount as Bt, computed as T, shallowRef as ie, toValue as D, watchEffect as Pt, getCurrentScope as It, onScopeDispose as Et, getCurrentInstance as lt, unref as Z, nextTick as at, isRef as Zt, toRefs as Nt, customRef as St, toRef as Wt, readonly as Ft, defineComponent as we, useTemplateRef as re, openBlock as y, createElementBlock as C, normalizeClass as oe, normalizeStyle as me, createBlock as ve, resolveDynamicComponent as We, mergeProps as st, toDisplayString as xe, Fragment as he, createElementVNode as W, renderSlot as fe, createCommentVNode as K, useCssVars as zt, onUnmounted as Xt, withModifiers as Se, withDirectives as de, renderList as ye, vShow as it, reactive as Gt, vModelText as Ne, vModelCheckbox as Yt, vModelSelect as Ut, createTextVNode as jt, useModel as wt, createVNode as pt, withCtx as xt, mergeModels as yt } from "vue";
2
- import { defineStore as qt } from "pinia";
1
+ import { onMounted as He, ref as z, watch as ce, onBeforeUnmount as Bt, computed as A, shallowRef as ie, toValue as D, watchEffect as Pt, getCurrentScope as It, onScopeDispose as Et, getCurrentInstance as lt, unref as P, nextTick as at, isRef as Zt, toRefs as Nt, customRef as St, toRef as Wt, readonly as Ft, defineComponent as we, useTemplateRef as re, openBlock as x, createElementBlock as C, normalizeClass as oe, normalizeStyle as me, createBlock as ve, resolveDynamicComponent as We, mergeProps as st, toDisplayString as xe, Fragment as he, createElementVNode as W, renderSlot as fe, createCommentVNode as K, useCssVars as zt, onUnmounted as Xt, withModifiers as Se, withDirectives as de, renderList as ye, vShow as it, reactive as Gt, vModelText as Ne, vModelCheckbox as Yt, vModelSelect as Ut, createTextVNode as jt, useModel as wt, createVNode as pt, withCtx as xt, mergeModels as yt } from "vue";
2
+ import { defineStore as Jt } from "pinia";
3
3
  import './assets/index.css';function At(e, t) {
4
4
  return It() ? (Et(e, t), !0) : !1;
5
5
  }
6
- const Jt = typeof window < "u" && typeof document < "u";
6
+ const qt = typeof window < "u" && typeof document < "u";
7
7
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
8
8
  const Qt = (e) => e != null, Kt = Object.prototype.toString, _t = (e) => Kt.call(e) === "[object Object]", en = () => {
9
9
  };
@@ -16,30 +16,30 @@ function tn(e, t, s) {
16
16
  immediate: !0
17
17
  });
18
18
  }
19
- const Le = Jt ? window : void 0;
19
+ const Le = qt ? window : void 0;
20
20
  function De(e) {
21
21
  var t;
22
22
  const s = D(e);
23
23
  return (t = s?.$el) !== null && t !== void 0 ? t : s;
24
24
  }
25
25
  function Fe(...e) {
26
- const t = (i, d, l, o) => (i.addEventListener(d, l, o), () => i.removeEventListener(d, l, o)), s = T(() => {
27
- const i = Ue(D(e[0])).filter((d) => d != null);
28
- return i.every((d) => typeof d != "string") ? i : void 0;
26
+ const t = (a, u, i, o) => (a.addEventListener(u, i, o), () => a.removeEventListener(u, i, o)), s = A(() => {
27
+ const a = Ue(D(e[0])).filter((u) => u != null);
28
+ return a.every((u) => typeof u != "string") ? a : void 0;
29
29
  });
30
30
  return tn(() => {
31
- var i, d;
31
+ var a, u;
32
32
  return [
33
- (i = (d = s.value) === null || d === void 0 ? void 0 : d.map((l) => De(l))) !== null && i !== void 0 ? i : [Le].filter((l) => l != null),
33
+ (a = (u = s.value) === null || u === void 0 ? void 0 : u.map((i) => De(i))) !== null && a !== void 0 ? a : [Le].filter((i) => i != null),
34
34
  Ue(D(s.value ? e[1] : e[0])),
35
- Ue(Z(s.value ? e[2] : e[1])),
35
+ Ue(P(s.value ? e[2] : e[1])),
36
36
  D(s.value ? e[3] : e[2])
37
37
  ];
38
- }, ([i, d, l, o], n, r) => {
39
- if (!i?.length || !d?.length || !l?.length) return;
40
- const c = _t(o) ? { ...o } : o, f = i.flatMap((w) => d.flatMap((E) => l.map((V) => t(w, E, V, c))));
41
- r(() => {
42
- f.forEach((w) => w());
38
+ }, ([a, u, i, o], d, n) => {
39
+ if (!a?.length || !u?.length || !i?.length) return;
40
+ const f = _t(o) ? { ...o } : o, r = a.flatMap((h) => u.flatMap((E) => i.map((O) => t(h, E, O, f))));
41
+ n(() => {
42
+ r.forEach((h) => h());
43
43
  });
44
44
  }, { flush: "post" });
45
45
  }
@@ -53,104 +53,104 @@ function nn() {
53
53
  // @__NO_SIDE_EFFECTS__
54
54
  function on(e) {
55
55
  const t = /* @__PURE__ */ nn();
56
- return T(() => (t.value, !!e()));
56
+ return A(() => (t.value, !!e()));
57
57
  }
58
58
  function ln(e, t, s = {}) {
59
- const { window: i = Le, ...d } = s;
60
- let l;
61
- const o = /* @__PURE__ */ on(() => i && "MutationObserver" in i), n = () => {
62
- l && (l.disconnect(), l = void 0);
63
- }, r = ce(T(() => {
64
- const w = Ue(D(e)).map(De).filter(Qt);
65
- return new Set(w);
66
- }), (w) => {
67
- n(), o.value && w.size && (l = new MutationObserver(t), w.forEach((E) => l.observe(E, d)));
59
+ const { window: a = Le, ...u } = s;
60
+ let i;
61
+ const o = /* @__PURE__ */ on(() => a && "MutationObserver" in a), d = () => {
62
+ i && (i.disconnect(), i = void 0);
63
+ }, n = ce(A(() => {
64
+ const h = Ue(D(e)).map(De).filter(Qt);
65
+ return new Set(h);
66
+ }), (h) => {
67
+ d(), o.value && h.size && (i = new MutationObserver(t), h.forEach((E) => i.observe(E, u)));
68
68
  }, {
69
69
  immediate: !0,
70
70
  flush: "post"
71
- }), c = () => l?.takeRecords(), f = () => {
72
- r(), n();
71
+ }), f = () => i?.takeRecords(), r = () => {
72
+ n(), d();
73
73
  };
74
- return At(f), {
74
+ return At(r), {
75
75
  isSupported: o,
76
- stop: f,
77
- takeRecords: c
76
+ stop: r,
77
+ takeRecords: f
78
78
  };
79
79
  }
80
80
  function an(e, t, s = {}) {
81
- const { window: i = Le, document: d = i?.document, flush: l = "sync" } = s;
82
- if (!i || !d) return en;
81
+ const { window: a = Le, document: u = a?.document, flush: i = "sync" } = s;
82
+ if (!a || !u) return en;
83
83
  let o;
84
- const n = (f) => {
85
- o?.(), o = f;
86
- }, r = Pt(() => {
87
- const f = De(e);
88
- if (f) {
89
- const { stop: w } = ln(d, (E) => {
90
- E.map((V) => [...V.removedNodes]).flat().some((V) => V === f || V.contains(f)) && t(E);
84
+ const d = (r) => {
85
+ o?.(), o = r;
86
+ }, n = Pt(() => {
87
+ const r = De(e);
88
+ if (r) {
89
+ const { stop: h } = ln(u, (E) => {
90
+ E.map((O) => [...O.removedNodes]).flat().some((O) => O === r || O.contains(r)) && t(E);
91
91
  }, {
92
- window: i,
92
+ window: a,
93
93
  childList: !0,
94
94
  subtree: !0
95
95
  });
96
- n(w);
96
+ d(h);
97
97
  }
98
- }, { flush: l }), c = () => {
99
- r(), n();
98
+ }, { flush: i }), f = () => {
99
+ n(), d();
100
100
  };
101
- return At(c), c;
101
+ return At(f), f;
102
102
  }
103
103
  // @__NO_SIDE_EFFECTS__
104
104
  function sn(e = {}) {
105
105
  var t;
106
- const { window: s = Le, deep: i = !0, triggerOnRemoval: d = !1 } = e, l = (t = e.document) !== null && t !== void 0 ? t : s?.document, o = () => {
107
- let c = l?.activeElement;
108
- if (i)
109
- for (var f; c?.shadowRoot; ) c = c == null || (f = c.shadowRoot) === null || f === void 0 ? void 0 : f.activeElement;
110
- return c;
111
- }, n = ie(), r = () => {
112
- n.value = o();
106
+ const { window: s = Le, deep: a = !0, triggerOnRemoval: u = !1 } = e, i = (t = e.document) !== null && t !== void 0 ? t : s?.document, o = () => {
107
+ let f = i?.activeElement;
108
+ if (a)
109
+ for (var r; f?.shadowRoot; ) f = f == null || (r = f.shadowRoot) === null || r === void 0 ? void 0 : r.activeElement;
110
+ return f;
111
+ }, d = ie(), n = () => {
112
+ d.value = o();
113
113
  };
114
114
  if (s) {
115
- const c = {
115
+ const f = {
116
116
  capture: !0,
117
117
  passive: !0
118
118
  };
119
- Fe(s, "blur", (f) => {
120
- f.relatedTarget === null && r();
121
- }, c), Fe(s, "focus", r, c);
119
+ Fe(s, "blur", (r) => {
120
+ r.relatedTarget === null && n();
121
+ }, f), Fe(s, "focus", n, f);
122
122
  }
123
- return d && an(n, r, { document: l }), r(), n;
123
+ return u && an(d, n, { document: i }), n(), d;
124
124
  }
125
125
  const rn = "focusin", cn = "focusout", un = ":focus-within";
126
126
  function dn(e, t = {}) {
127
- const { window: s = Le } = t, i = T(() => De(e)), d = ie(!1), l = T(() => d.value);
128
- if (!s || !(/* @__PURE__ */ sn(t)).value) return { focused: l };
127
+ const { window: s = Le } = t, a = A(() => De(e)), u = ie(!1), i = A(() => u.value);
128
+ if (!s || !(/* @__PURE__ */ sn(t)).value) return { focused: i };
129
129
  const o = { passive: !0 };
130
- return Fe(i, rn, () => d.value = !0, o), Fe(i, cn, () => {
131
- var n, r, c;
132
- return d.value = (n = (r = i.value) === null || r === void 0 || (c = r.matches) === null || c === void 0 ? void 0 : c.call(r, un)) !== null && n !== void 0 ? n : !1;
133
- }, o), { focused: l };
130
+ return Fe(a, rn, () => u.value = !0, o), Fe(a, cn, () => {
131
+ var d, n, f;
132
+ return u.value = (d = (n = a.value) === null || n === void 0 || (f = n.matches) === null || f === void 0 ? void 0 : f.call(n, un)) !== null && d !== void 0 ? d : !1;
133
+ }, o), { focused: i };
134
134
  }
135
135
  function fn(e, { window: t = Le, scrollTarget: s } = {}) {
136
- const i = z(!1), d = () => {
136
+ const a = z(!1), u = () => {
137
137
  if (!t) return;
138
- const l = t.document, o = De(e);
138
+ const i = t.document, o = De(e);
139
139
  if (!o)
140
- i.value = !1;
140
+ a.value = !1;
141
141
  else {
142
- const n = o.getBoundingClientRect();
143
- i.value = n.top <= (t.innerHeight || l.documentElement.clientHeight) && n.left <= (t.innerWidth || l.documentElement.clientWidth) && n.bottom >= 0 && n.right >= 0;
142
+ const d = o.getBoundingClientRect();
143
+ a.value = d.top <= (t.innerHeight || i.documentElement.clientHeight) && d.left <= (t.innerWidth || i.documentElement.clientWidth) && d.bottom >= 0 && d.right >= 0;
144
144
  }
145
145
  };
146
146
  return ce(
147
147
  () => De(e),
148
- () => d(),
148
+ () => u(),
149
149
  { immediate: !0, flush: "post" }
150
- ), t && Fe(s || t, "scroll", d, {
150
+ ), t && Fe(s || t, "scroll", u, {
151
151
  capture: !1,
152
152
  passive: !0
153
- }), i;
153
+ }), a;
154
154
  }
155
155
  const be = (e) => {
156
156
  let t = fn(e).value;
@@ -163,8 +163,8 @@ const be = (e) => {
163
163
  if (e instanceof HTMLTableCellElement) {
164
164
  const s = e.parentElement?.previousElementSibling;
165
165
  if (s) {
166
- const i = Array.from(s.children)[e.cellIndex];
167
- i && (t = i);
166
+ const a = Array.from(s.children)[e.cellIndex];
167
+ a && (t = a);
168
168
  }
169
169
  } else if (e instanceof HTMLTableRowElement) {
170
170
  const s = e.previousElementSibling;
@@ -175,16 +175,16 @@ const be = (e) => {
175
175
  const t = e.target;
176
176
  let s;
177
177
  if (t instanceof HTMLTableCellElement) {
178
- const i = t.parentElement?.parentElement;
179
- if (i) {
180
- const d = i.firstElementChild?.children[t.cellIndex];
181
- d && (s = d);
178
+ const a = t.parentElement?.parentElement;
179
+ if (a) {
180
+ const u = a.firstElementChild?.children[t.cellIndex];
181
+ u && (s = u);
182
182
  }
183
183
  } else if (t instanceof HTMLTableRowElement) {
184
- const i = t.parentElement;
185
- if (i) {
186
- const d = i.firstElementChild;
187
- d && (s = d);
184
+ const a = t.parentElement;
185
+ if (a) {
186
+ const u = a.firstElementChild;
187
+ u && (s = u);
188
188
  }
189
189
  }
190
190
  return s && (!Ce(s) || !be(s)) ? ct(s) : s;
@@ -196,8 +196,8 @@ const be = (e) => {
196
196
  if (e instanceof HTMLTableCellElement) {
197
197
  const s = e.parentElement?.nextElementSibling;
198
198
  if (s) {
199
- const i = Array.from(s.children)[e.cellIndex];
200
- i && (t = i);
199
+ const a = Array.from(s.children)[e.cellIndex];
200
+ a && (t = a);
201
201
  }
202
202
  } else if (e instanceof HTMLTableRowElement) {
203
203
  const s = e.nextElementSibling;
@@ -208,16 +208,16 @@ const be = (e) => {
208
208
  const t = e.target;
209
209
  let s;
210
210
  if (t instanceof HTMLTableCellElement) {
211
- const i = t.parentElement?.parentElement;
212
- if (i) {
213
- const d = i.lastElementChild?.children[t.cellIndex];
214
- d && (s = d);
211
+ const a = t.parentElement?.parentElement;
212
+ if (a) {
213
+ const u = a.lastElementChild?.children[t.cellIndex];
214
+ u && (s = u);
215
215
  }
216
216
  } else if (t instanceof HTMLTableRowElement) {
217
- const i = t.parentElement;
218
- if (i) {
219
- const d = i.lastElementChild;
220
- d && (s = d);
217
+ const a = t.parentElement;
218
+ if (a) {
219
+ const u = a.lastElementChild;
220
+ u && (s = u);
221
221
  }
222
222
  }
223
223
  return s && (!Ce(s) || !be(s)) ? rt(s) : s;
@@ -310,65 +310,65 @@ const be = (e) => {
310
310
  };
311
311
  function ft(e) {
312
312
  const t = (o) => {
313
- let n = null;
314
- return o.parent && (typeof o.parent == "string" ? n = document.querySelector(o.parent) : o.parent instanceof HTMLElement ? n = o.parent : n = o.parent.value), n;
313
+ let d = null;
314
+ return o.parent && (typeof o.parent == "string" ? d = document.querySelector(o.parent) : o.parent instanceof HTMLElement ? d = o.parent : d = o.parent.value), d;
315
315
  }, s = (o) => {
316
- const n = t(o);
317
- let r = [];
316
+ const d = t(o);
317
+ let n = [];
318
318
  if (typeof o.selectors == "string")
319
- r = Array.from(n ? n.querySelectorAll(o.selectors) : document.querySelectorAll(o.selectors));
319
+ n = Array.from(d ? d.querySelectorAll(o.selectors) : document.querySelectorAll(o.selectors));
320
320
  else if (Array.isArray(o.selectors))
321
- for (const c of o.selectors)
322
- c instanceof HTMLElement ? r.push(c) : r.push(c.$el);
321
+ for (const f of o.selectors)
322
+ f instanceof HTMLElement ? n.push(f) : n.push(f.$el);
323
323
  else if (o.selectors instanceof HTMLElement)
324
- r.push(o.selectors);
324
+ n.push(o.selectors);
325
325
  else if (o.selectors?.value)
326
326
  if (Array.isArray(o.selectors.value))
327
- for (const c of o.selectors.value)
328
- c instanceof HTMLElement ? r.push(c) : r.push(c.$el);
327
+ for (const f of o.selectors.value)
328
+ f instanceof HTMLElement ? n.push(f) : n.push(f.$el);
329
329
  else
330
- r.push(o.selectors.value);
331
- return r;
332
- }, i = (o) => {
333
- const n = t(o);
334
- let r = [];
335
- return o.selectors ? r = s(o) : n && (r = Array.from(n.children).filter((c) => Ce(c) && be(c))), r;
336
- }, d = (o) => (n) => {
337
- const r = gn[n.key] || n.key.toLowerCase();
338
- if (Xe.includes(r)) return;
339
- const c = o.handlers || Qe;
340
- for (const f of Object.keys(c)) {
341
- const [w, ...E] = f.split(".");
342
- if (w === "keydown" && E.includes(r)) {
343
- const V = c[f], x = E.filter((v) => Xe.includes(v)), p = Xe.some((v) => {
344
- const h = v.charAt(0).toUpperCase() + v.slice(1);
345
- return n.getModifierState(h);
330
+ n.push(o.selectors.value);
331
+ return n;
332
+ }, a = (o) => {
333
+ const d = t(o);
334
+ let n = [];
335
+ return o.selectors ? n = s(o) : d && (n = Array.from(d.children).filter((f) => Ce(f) && be(f))), n;
336
+ }, u = (o) => (d) => {
337
+ const n = gn[d.key] || d.key.toLowerCase();
338
+ if (Xe.includes(n)) return;
339
+ const f = o.handlers || Qe;
340
+ for (const r of Object.keys(f)) {
341
+ const [h, ...E] = r.split(".");
342
+ if (h === "keydown" && E.includes(n)) {
343
+ const O = f[r], Z = E.filter((v) => Xe.includes(v)), w = Xe.some((v) => {
344
+ const g = v.charAt(0).toUpperCase() + v.slice(1);
345
+ return d.getModifierState(g);
346
346
  });
347
- if (x.length > 0) {
348
- if (p) {
347
+ if (Z.length > 0) {
348
+ if (w) {
349
349
  for (const v of Xe)
350
350
  if (E.includes(v)) {
351
- const h = v.charAt(0).toUpperCase() + v.slice(1);
352
- n.getModifierState(h) && V(n);
351
+ const g = v.charAt(0).toUpperCase() + v.slice(1);
352
+ d.getModifierState(g) && O(d);
353
353
  }
354
354
  }
355
355
  } else
356
- p || V(n);
356
+ w || O(d);
357
357
  }
358
358
  }
359
- }, l = [];
359
+ }, i = [];
360
360
  He(() => {
361
361
  for (const o of e) {
362
- const n = t(o), r = i(o), c = d(o), f = n ? [n] : r;
363
- for (const w of f) {
364
- const { focused: E } = dn(z(w)), V = ce(E, (x) => {
365
- x ? w.addEventListener("keydown", c) : w.removeEventListener("keydown", c);
362
+ const d = t(o), n = a(o), f = u(o), r = d ? [d] : n;
363
+ for (const h of r) {
364
+ const { focused: E } = dn(z(h)), O = ce(E, (Z) => {
365
+ Z ? h.addEventListener("keydown", f) : h.removeEventListener("keydown", f);
366
366
  });
367
- l.push(V);
367
+ i.push(O);
368
368
  }
369
369
  }
370
370
  }), Bt(() => {
371
- for (const o of l)
371
+ for (const o of i)
372
372
  o();
373
373
  });
374
374
  }
@@ -388,31 +388,31 @@ function xn(...e) {
388
388
  }))) : z(t);
389
389
  }
390
390
  function yn(e, t) {
391
- function s(...i) {
392
- return new Promise((d, l) => {
393
- Promise.resolve(e(() => t.apply(this, i), {
391
+ function s(...a) {
392
+ return new Promise((u, i) => {
393
+ Promise.resolve(e(() => t.apply(this, a), {
394
394
  fn: t,
395
395
  thisArg: this,
396
- args: i
397
- })).then(d).catch(l);
396
+ args: a
397
+ })).then(u).catch(i);
398
398
  });
399
399
  }
400
400
  return s;
401
401
  }
402
402
  function bn(e, t = {}) {
403
- let s, i, d = Ee;
404
- const l = (r) => {
405
- clearTimeout(r), d(), d = Ee;
403
+ let s, a, u = Ee;
404
+ const i = (n) => {
405
+ clearTimeout(n), u(), u = Ee;
406
406
  };
407
407
  let o;
408
- return (r) => {
409
- const c = D(e), f = D(t.maxWait);
410
- return s && l(s), c <= 0 || f !== void 0 && f <= 0 ? (i && (l(i), i = void 0), Promise.resolve(r())) : new Promise((w, E) => {
411
- d = t.rejectOnCancel ? E : w, o = r, f && !i && (i = setTimeout(() => {
412
- s && l(s), i = void 0, w(o());
413
- }, f)), s = setTimeout(() => {
414
- i && l(i), i = void 0, w(r());
415
- }, c);
408
+ return (n) => {
409
+ const f = D(e), r = D(t.maxWait);
410
+ return s && i(s), f <= 0 || r !== void 0 && r <= 0 ? (a && (i(a), a = void 0), Promise.resolve(n())) : new Promise((h, E) => {
411
+ u = t.rejectOnCancel ? E : h, o = n, r && !a && (a = setTimeout(() => {
412
+ s && i(s), a = void 0, h(o());
413
+ }, r)), s = setTimeout(() => {
414
+ a && i(a), a = void 0, h(n());
415
+ }, f);
416
416
  });
417
417
  };
418
418
  }
@@ -429,23 +429,23 @@ function kn(e, t = 200, s = {}) {
429
429
  function Mn(e, t = {}) {
430
430
  if (!Zt(e)) return Nt(e);
431
431
  const s = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
432
- for (const i in e.value) s[i] = St(() => ({
432
+ for (const a in e.value) s[a] = St(() => ({
433
433
  get() {
434
- return e.value[i];
434
+ return e.value[a];
435
435
  },
436
- set(d) {
437
- var l;
438
- if (!((l = D(t.replaceRef)) !== null && l !== void 0) || l) if (Array.isArray(e.value)) {
436
+ set(u) {
437
+ var i;
438
+ if (!((i = D(t.replaceRef)) !== null && i !== void 0) || i) if (Array.isArray(e.value)) {
439
439
  const o = [...e.value];
440
- o[i] = d, e.value = o;
440
+ o[a] = u, e.value = o;
441
441
  } else {
442
442
  const o = {
443
443
  ...e.value,
444
- [i]: d
444
+ [a]: u
445
445
  };
446
446
  Object.setPrototypeOf(o, Object.getPrototypeOf(e.value)), e.value = o;
447
447
  }
448
- else e.value[i] = d;
448
+ else e.value[a] = u;
449
449
  }
450
450
  }));
451
451
  return s;
@@ -466,90 +466,90 @@ function ge(e) {
466
466
  return (t = s?.$el) !== null && t !== void 0 ? t : s;
467
467
  }
468
468
  function Re(...e) {
469
- const t = (i, d, l, o) => (i.addEventListener(d, l, o), () => i.removeEventListener(d, l, o)), s = T(() => {
470
- const i = je(D(e[0])).filter((d) => d != null);
471
- return i.every((d) => typeof d != "string") ? i : void 0;
469
+ const t = (a, u, i, o) => (a.addEventListener(u, i, o), () => a.removeEventListener(u, i, o)), s = A(() => {
470
+ const a = je(D(e[0])).filter((u) => u != null);
471
+ return a.every((u) => typeof u != "string") ? a : void 0;
472
472
  });
473
473
  return $n(() => {
474
- var i, d;
474
+ var a, u;
475
475
  return [
476
- (i = (d = s.value) === null || d === void 0 ? void 0 : d.map((l) => ge(l))) !== null && i !== void 0 ? i : [ze].filter((l) => l != null),
476
+ (a = (u = s.value) === null || u === void 0 ? void 0 : u.map((i) => ge(i))) !== null && a !== void 0 ? a : [ze].filter((i) => i != null),
477
477
  je(D(s.value ? e[1] : e[0])),
478
- je(Z(s.value ? e[2] : e[1])),
478
+ je(P(s.value ? e[2] : e[1])),
479
479
  D(s.value ? e[3] : e[2])
480
480
  ];
481
- }, ([i, d, l, o], n, r) => {
482
- if (!i?.length || !d?.length || !l?.length) return;
483
- const c = pn(o) ? { ...o } : o, f = i.flatMap((w) => d.flatMap((E) => l.map((V) => t(w, E, V, c))));
484
- r(() => {
485
- f.forEach((w) => w());
481
+ }, ([a, u, i, o], d, n) => {
482
+ if (!a?.length || !u?.length || !i?.length) return;
483
+ const f = pn(o) ? { ...o } : o, r = a.flatMap((h) => u.flatMap((E) => i.map((O) => t(h, E, O, f))));
484
+ n(() => {
485
+ r.forEach((h) => h());
486
486
  });
487
487
  }, { flush: "post" });
488
488
  }
489
489
  function ot(e, t, s = {}) {
490
- const { window: i = ze, ignore: d = [], capture: l = !0, detectIframe: o = !1, controls: n = !1 } = s;
491
- if (!i) return n ? {
490
+ const { window: a = ze, ignore: u = [], capture: i = !0, detectIframe: o = !1, controls: d = !1 } = s;
491
+ if (!a) return d ? {
492
492
  stop: Ee,
493
493
  cancel: Ee,
494
494
  trigger: Ee
495
495
  } : Ee;
496
- let r = !0;
497
- const c = (v) => D(d).some((h) => {
498
- if (typeof h == "string") return Array.from(i.document.querySelectorAll(h)).some((g) => g === v.target || v.composedPath().includes(g));
496
+ let n = !0;
497
+ const f = (v) => D(u).some((g) => {
498
+ if (typeof g == "string") return Array.from(a.document.querySelectorAll(g)).some((p) => p === v.target || v.composedPath().includes(p));
499
499
  {
500
- const g = ge(h);
501
- return g && (v.target === g || v.composedPath().includes(g));
500
+ const p = ge(g);
501
+ return p && (v.target === p || v.composedPath().includes(p));
502
502
  }
503
503
  });
504
- function f(v) {
505
- const h = D(v);
506
- return h && h.$.subTree.shapeFlag === 16;
504
+ function r(v) {
505
+ const g = D(v);
506
+ return g && g.$.subTree.shapeFlag === 16;
507
507
  }
508
- function w(v, h) {
509
- const g = D(v), $ = g.$.subTree && g.$.subTree.children;
510
- return $ == null || !Array.isArray($) ? !1 : $.some((I) => I.el === h.target || h.composedPath().includes(I.el));
508
+ function h(v, g) {
509
+ const p = D(v), y = p.$.subTree && p.$.subTree.children;
510
+ return y == null || !Array.isArray(y) ? !1 : y.some((M) => M.el === g.target || g.composedPath().includes(M.el));
511
511
  }
512
512
  const E = (v) => {
513
- const h = ge(e);
514
- if (v.target != null && !(!(h instanceof Element) && f(e) && w(e, v)) && !(!h || h === v.target || v.composedPath().includes(h))) {
515
- if ("detail" in v && v.detail === 0 && (r = !c(v)), !r) {
516
- r = !0;
513
+ const g = ge(e);
514
+ if (v.target != null && !(!(g instanceof Element) && r(e) && h(e, v)) && !(!g || g === v.target || v.composedPath().includes(g))) {
515
+ if ("detail" in v && v.detail === 0 && (n = !f(v)), !n) {
516
+ n = !0;
517
517
  return;
518
518
  }
519
519
  t(v);
520
520
  }
521
521
  };
522
- let V = !1;
523
- const x = [
524
- Re(i, "click", (v) => {
525
- V || (V = !0, setTimeout(() => {
526
- V = !1;
522
+ let O = !1;
523
+ const Z = [
524
+ Re(a, "click", (v) => {
525
+ O || (O = !0, setTimeout(() => {
526
+ O = !1;
527
527
  }, 0), E(v));
528
528
  }, {
529
529
  passive: !0,
530
- capture: l
530
+ capture: i
531
531
  }),
532
- Re(i, "pointerdown", (v) => {
533
- const h = ge(e);
534
- r = !c(v) && !!(h && !v.composedPath().includes(h));
532
+ Re(a, "pointerdown", (v) => {
533
+ const g = ge(e);
534
+ n = !f(v) && !!(g && !v.composedPath().includes(g));
535
535
  }, { passive: !0 }),
536
- o && Re(i, "blur", (v) => {
536
+ o && Re(a, "blur", (v) => {
537
537
  setTimeout(() => {
538
- var h;
539
- const g = ge(e);
540
- ((h = i.document.activeElement) === null || h === void 0 ? void 0 : h.tagName) === "IFRAME" && !g?.contains(i.document.activeElement) && t(v);
538
+ var g;
539
+ const p = ge(e);
540
+ ((g = a.document.activeElement) === null || g === void 0 ? void 0 : g.tagName) === "IFRAME" && !p?.contains(a.document.activeElement) && t(v);
541
541
  }, 0);
542
542
  }, { passive: !0 })
543
- ].filter(Boolean), p = () => x.forEach((v) => v());
544
- return n ? {
545
- stop: p,
543
+ ].filter(Boolean), w = () => Z.forEach((v) => v());
544
+ return d ? {
545
+ stop: w,
546
546
  cancel: () => {
547
- r = !1;
547
+ n = !1;
548
548
  },
549
549
  trigger: (v) => {
550
- r = !0, E(v), r = !1;
550
+ n = !0, E(v), n = !1;
551
551
  }
552
- } : p;
552
+ } : w;
553
553
  }
554
554
  // @__NO_SIDE_EFFECTS__
555
555
  function In() {
@@ -561,28 +561,28 @@ function In() {
561
561
  // @__NO_SIDE_EFFECTS__
562
562
  function Dt(e) {
563
563
  const t = /* @__PURE__ */ In();
564
- return T(() => (t.value, !!e()));
564
+ return A(() => (t.value, !!e()));
565
565
  }
566
566
  function Ht(e, t, s = {}) {
567
- const { window: i = ze, ...d } = s;
568
- let l;
569
- const o = /* @__PURE__ */ Dt(() => i && "MutationObserver" in i), n = () => {
570
- l && (l.disconnect(), l = void 0);
571
- }, r = ce(T(() => {
572
- const w = je(D(e)).map(ge).filter(mn);
573
- return new Set(w);
574
- }), (w) => {
575
- n(), o.value && w.size && (l = new MutationObserver(t), w.forEach((E) => l.observe(E, d)));
567
+ const { window: a = ze, ...u } = s;
568
+ let i;
569
+ const o = /* @__PURE__ */ Dt(() => a && "MutationObserver" in a), d = () => {
570
+ i && (i.disconnect(), i = void 0);
571
+ }, n = ce(A(() => {
572
+ const h = je(D(e)).map(ge).filter(mn);
573
+ return new Set(h);
574
+ }), (h) => {
575
+ d(), o.value && h.size && (i = new MutationObserver(t), h.forEach((E) => i.observe(E, u)));
576
576
  }, {
577
577
  immediate: !0,
578
578
  flush: "post"
579
- }), c = () => l?.takeRecords(), f = () => {
580
- r(), n();
579
+ }), f = () => i?.takeRecords(), r = () => {
580
+ n(), d();
581
581
  };
582
- return vt(f), {
582
+ return vt(r), {
583
583
  isSupported: o,
584
- stop: f,
585
- takeRecords: c
584
+ stop: r,
585
+ takeRecords: f
586
586
  };
587
587
  }
588
588
  const Ge = {
@@ -594,20 +594,20 @@ function En(e) {
594
594
  e.scrollLeft > e.scrollWidth - e.clientWidth && (e.scrollLeft = Math.max(0, e.scrollWidth - e.clientWidth)), e.scrollTop > e.scrollHeight - e.clientHeight && (e.scrollTop = Math.max(0, e.scrollHeight - e.clientHeight));
595
595
  }
596
596
  function _e(e, t = {}) {
597
- var s, i, d, l;
598
- const { pointerTypes: o, preventDefault: n, stopPropagation: r, exact: c, onMove: f, onEnd: w, onStart: E, initialValue: V, axis: x = "both", draggingElement: p = ze, containerElement: v, handle: h = e, buttons: g = [0], restrictInView: $, autoScroll: I = !1 } = t, H = z((s = D(V)) !== null && s !== void 0 ? s : {
597
+ var s, a, u, i;
598
+ const { pointerTypes: o, preventDefault: d, stopPropagation: n, exact: f, onMove: r, onEnd: h, onStart: E, initialValue: O, axis: Z = "both", draggingElement: w = ze, containerElement: v, handle: g = e, buttons: p = [0], restrictInView: y, autoScroll: M = !1 } = t, T = z((s = D(O)) !== null && s !== void 0 ? s : {
599
599
  x: 0,
600
600
  y: 0
601
- }), A = z(), L = (k) => o ? o.includes(k.pointerType) : !0, X = (k) => {
602
- D(n) && k.preventDefault(), D(r) && k.stopPropagation();
603
- }, le = D(I), j = typeof le == "object" ? {
604
- speed: (i = D(le.speed)) !== null && i !== void 0 ? i : Ge.speed,
605
- margin: (d = D(le.margin)) !== null && d !== void 0 ? d : Ge.margin,
606
- direction: (l = le.direction) !== null && l !== void 0 ? l : Ge.direction
607
- } : Ge, q = (k) => typeof k == "number" ? [k, k] : [k.x, k.y], ue = (k, O, F) => {
608
- const { clientWidth: J, clientHeight: G, scrollLeft: te, scrollTop: pe, scrollWidth: Me, scrollHeight: S } = k, [B, U] = q(j.margin), [Y, Q] = q(j.speed);
601
+ }), R = z(), H = (k) => o ? o.includes(k.pointerType) : !0, X = (k) => {
602
+ D(d) && k.preventDefault(), D(n) && k.stopPropagation();
603
+ }, le = D(M), j = typeof le == "object" ? {
604
+ speed: (a = D(le.speed)) !== null && a !== void 0 ? a : Ge.speed,
605
+ margin: (u = D(le.margin)) !== null && u !== void 0 ? u : Ge.margin,
606
+ direction: (i = le.direction) !== null && i !== void 0 ? i : Ge.direction
607
+ } : Ge, J = (k) => typeof k == "number" ? [k, k] : [k.x, k.y], ue = (k, L, F) => {
608
+ const { clientWidth: q, clientHeight: G, scrollLeft: te, scrollTop: pe, scrollWidth: Me, scrollHeight: S } = k, [V, U] = J(j.margin), [Y, Q] = J(j.speed);
609
609
  let _ = 0, ne = 0;
610
- (j.direction === "x" || j.direction === "both") && (F.x < B && te > 0 ? _ = -Y : F.x + O.width > J - B && te < Me - J && (_ = Y)), (j.direction === "y" || j.direction === "both") && (F.y < U && pe > 0 ? ne = -Q : F.y + O.height > G - U && pe < S - G && (ne = Q)), (_ || ne) && k.scrollBy({
610
+ (j.direction === "x" || j.direction === "both") && (F.x < V && te > 0 ? _ = -Y : F.x + L.width > q - V && te < Me - q && (_ = Y)), (j.direction === "y" || j.direction === "both") && (F.y < U && pe > 0 ? ne = -Q : F.y + L.height > G - U && pe < S - G && (ne = Q)), (_ || ne) && k.scrollBy({
611
611
  left: _,
612
612
  top: ne,
613
613
  behavior: "auto"
@@ -617,135 +617,135 @@ function _e(e, t = {}) {
617
617
  const Ae = () => {
618
618
  const k = D(v);
619
619
  k && !ae && (ae = setInterval(() => {
620
- const O = D(e).getBoundingClientRect(), { x: F, y: J } = H.value, G = {
620
+ const L = D(e).getBoundingClientRect(), { x: F, y: q } = T.value, G = {
621
621
  x: F - k.scrollLeft,
622
- y: J - k.scrollTop
622
+ y: q - k.scrollTop
623
623
  };
624
- G.x >= 0 && G.y >= 0 && (ue(k, O, G), G.x += k.scrollLeft, G.y += k.scrollTop, H.value = G);
624
+ G.x >= 0 && G.y >= 0 && (ue(k, L, G), G.x += k.scrollLeft, G.y += k.scrollTop, T.value = G);
625
625
  }, 1e3 / 60));
626
626
  }, ke = () => {
627
627
  ae && (clearInterval(ae), ae = null);
628
- }, Oe = (k, O, F, J) => {
629
- const [G, te] = typeof F == "number" ? [F, F] : [F.x, F.y], { clientWidth: pe, clientHeight: Me } = O;
630
- return k.x < G || k.x + J.width > pe - G || k.y < te || k.y + J.height > Me - te;
628
+ }, Oe = (k, L, F, q) => {
629
+ const [G, te] = typeof F == "number" ? [F, F] : [F.x, F.y], { clientWidth: pe, clientHeight: Me } = L;
630
+ return k.x < G || k.x + q.width > pe - G || k.y < te || k.y + q.height > Me - te;
631
631
  }, Ve = () => {
632
- if (D(t.disabled) || !A.value) return;
632
+ if (D(t.disabled) || !R.value) return;
633
633
  const k = D(v);
634
634
  if (!k) return;
635
- const O = D(e).getBoundingClientRect(), { x: F, y: J } = H.value;
635
+ const L = D(e).getBoundingClientRect(), { x: F, y: q } = T.value;
636
636
  Oe({
637
637
  x: F - k.scrollLeft,
638
- y: J - k.scrollTop
639
- }, k, j.margin, O) ? Ae() : ke();
638
+ y: q - k.scrollTop
639
+ }, k, j.margin, L) ? Ae() : ke();
640
640
  };
641
- D(I) && ce(H, Ve);
641
+ D(M) && ce(T, Ve);
642
642
  const Be = (k) => {
643
- var O;
644
- if (!D(g).includes(k.button) || D(t.disabled) || !L(k) || D(c) && k.target !== D(e)) return;
645
- const F = D(v), J = F == null || (O = F.getBoundingClientRect) === null || O === void 0 ? void 0 : O.call(F), G = D(e).getBoundingClientRect(), te = {
646
- x: k.clientX - (F ? G.left - J.left + (I ? 0 : F.scrollLeft) : G.left),
647
- y: k.clientY - (F ? G.top - J.top + (I ? 0 : F.scrollTop) : G.top)
643
+ var L;
644
+ if (!D(p).includes(k.button) || D(t.disabled) || !H(k) || D(f) && k.target !== D(e)) return;
645
+ const F = D(v), q = F == null || (L = F.getBoundingClientRect) === null || L === void 0 ? void 0 : L.call(F), G = D(e).getBoundingClientRect(), te = {
646
+ x: k.clientX - (F ? G.left - q.left + (M ? 0 : F.scrollLeft) : G.left),
647
+ y: k.clientY - (F ? G.top - q.top + (M ? 0 : F.scrollTop) : G.top)
648
648
  };
649
- E?.(te, k) !== !1 && (A.value = te, X(k));
649
+ E?.(te, k) !== !1 && (R.value = te, X(k));
650
650
  }, Te = (k) => {
651
- if (D(t.disabled) || !L(k) || !A.value) return;
652
- const O = D(v);
653
- O instanceof HTMLElement && En(O);
651
+ if (D(t.disabled) || !H(k) || !R.value) return;
652
+ const L = D(v);
653
+ L instanceof HTMLElement && En(L);
654
654
  const F = D(e).getBoundingClientRect();
655
- let { x: J, y: G } = H.value;
656
- if ((x === "x" || x === "both") && (J = k.clientX - A.value.x, O && (J = Math.min(Math.max(0, J), O.scrollWidth - F.width))), (x === "y" || x === "both") && (G = k.clientY - A.value.y, O && (G = Math.min(Math.max(0, G), O.scrollHeight - F.height))), D(I) && O && (ae === null && ue(O, F, {
657
- x: J,
655
+ let { x: q, y: G } = T.value;
656
+ if ((Z === "x" || Z === "both") && (q = k.clientX - R.value.x, L && (q = Math.min(Math.max(0, q), L.scrollWidth - F.width))), (Z === "y" || Z === "both") && (G = k.clientY - R.value.y, L && (G = Math.min(Math.max(0, G), L.scrollHeight - F.height))), D(M) && L && (ae === null && ue(L, F, {
657
+ x: q,
658
658
  y: G
659
- }), J += O.scrollLeft, G += O.scrollTop), O && ($ || I)) {
660
- if (x !== "y") {
661
- const te = J - O.scrollLeft;
662
- te < 0 ? J = O.scrollLeft : te > O.clientWidth - F.width && (J = O.clientWidth - F.width + O.scrollLeft);
659
+ }), q += L.scrollLeft, G += L.scrollTop), L && (y || M)) {
660
+ if (Z !== "y") {
661
+ const te = q - L.scrollLeft;
662
+ te < 0 ? q = L.scrollLeft : te > L.clientWidth - F.width && (q = L.clientWidth - F.width + L.scrollLeft);
663
663
  }
664
- if (x !== "x") {
665
- const te = G - O.scrollTop;
666
- te < 0 ? G = O.scrollTop : te > O.clientHeight - F.height && (G = O.clientHeight - F.height + O.scrollTop);
664
+ if (Z !== "x") {
665
+ const te = G - L.scrollTop;
666
+ te < 0 ? G = L.scrollTop : te > L.clientHeight - F.height && (G = L.clientHeight - F.height + L.scrollTop);
667
667
  }
668
668
  }
669
- H.value = {
670
- x: J,
669
+ T.value = {
670
+ x: q,
671
671
  y: G
672
- }, f?.(H.value, k), X(k);
672
+ }, r?.(T.value, k), X(k);
673
673
  }, Pe = (k) => {
674
- D(t.disabled) || !L(k) || A.value && (A.value = void 0, I && ke(), w?.(H.value, k), X(k));
674
+ D(t.disabled) || !H(k) || R.value && (R.value = void 0, M && ke(), h?.(T.value, k), X(k));
675
675
  };
676
676
  if (Tt) {
677
677
  const k = () => {
678
- var O;
678
+ var L;
679
679
  return {
680
- capture: (O = t.capture) !== null && O !== void 0 ? O : !0,
681
- passive: !D(n)
680
+ capture: (L = t.capture) !== null && L !== void 0 ? L : !0,
681
+ passive: !D(d)
682
682
  };
683
683
  };
684
- Re(h, "pointerdown", Be, k), Re(p, "pointermove", Te, k), Re(p, "pointerup", Pe, k);
684
+ Re(g, "pointerdown", Be, k), Re(w, "pointermove", Te, k), Re(w, "pointerup", Pe, k);
685
685
  }
686
686
  return {
687
- ...Mn(H),
688
- position: H,
689
- isDragging: T(() => !!A.value),
690
- style: T(() => `
691
- left: ${H.value.x}px;
692
- top: ${H.value.y}px;
693
- ${I ? "text-wrap: nowrap;" : ""}
687
+ ...Mn(T),
688
+ position: T,
689
+ isDragging: A(() => !!R.value),
690
+ style: A(() => `
691
+ left: ${T.value.x}px;
692
+ top: ${T.value.y}px;
693
+ ${M ? "text-wrap: nowrap;" : ""}
694
694
  `)
695
695
  };
696
696
  }
697
- function Je(e, t, s = {}) {
698
- const { window: i = ze, ...d } = s;
699
- let l;
700
- const o = /* @__PURE__ */ Dt(() => i && "ResizeObserver" in i), n = () => {
701
- l && (l.disconnect(), l = void 0);
702
- }, r = ce(T(() => {
703
- const f = D(e);
704
- return Array.isArray(f) ? f.map((w) => ge(w)) : [ge(f)];
705
- }), (f) => {
706
- if (n(), o.value && i) {
707
- l = new ResizeObserver(t);
708
- for (const w of f) w && l.observe(w, d);
697
+ function qe(e, t, s = {}) {
698
+ const { window: a = ze, ...u } = s;
699
+ let i;
700
+ const o = /* @__PURE__ */ Dt(() => a && "ResizeObserver" in a), d = () => {
701
+ i && (i.disconnect(), i = void 0);
702
+ }, n = ce(A(() => {
703
+ const r = D(e);
704
+ return Array.isArray(r) ? r.map((h) => ge(h)) : [ge(r)];
705
+ }), (r) => {
706
+ if (d(), o.value && a) {
707
+ i = new ResizeObserver(t);
708
+ for (const h of r) h && i.observe(h, u);
709
709
  }
710
710
  }, {
711
711
  immediate: !0,
712
712
  flush: "post"
713
- }), c = () => {
714
- n(), r();
713
+ }), f = () => {
714
+ d(), n();
715
715
  };
716
- return vt(c), {
716
+ return vt(f), {
717
717
  isSupported: o,
718
- stop: c
718
+ stop: f
719
719
  };
720
720
  }
721
721
  function Ie(e, t = {}) {
722
- const { reset: s = !0, windowResize: i = !0, windowScroll: d = !0, immediate: l = !0, updateTiming: o = "sync" } = t, n = ie(0), r = ie(0), c = ie(0), f = ie(0), w = ie(0), E = ie(0), V = ie(0), x = ie(0);
723
- function p() {
724
- const h = ge(e);
725
- if (!h) {
726
- s && (n.value = 0, r.value = 0, c.value = 0, f.value = 0, w.value = 0, E.value = 0, V.value = 0, x.value = 0);
722
+ const { reset: s = !0, windowResize: a = !0, windowScroll: u = !0, immediate: i = !0, updateTiming: o = "sync" } = t, d = ie(0), n = ie(0), f = ie(0), r = ie(0), h = ie(0), E = ie(0), O = ie(0), Z = ie(0);
723
+ function w() {
724
+ const g = ge(e);
725
+ if (!g) {
726
+ s && (d.value = 0, n.value = 0, f.value = 0, r.value = 0, h.value = 0, E.value = 0, O.value = 0, Z.value = 0);
727
727
  return;
728
728
  }
729
- const g = h.getBoundingClientRect();
730
- n.value = g.height, r.value = g.bottom, c.value = g.left, f.value = g.right, w.value = g.top, E.value = g.width, V.value = g.x, x.value = g.y;
729
+ const p = g.getBoundingClientRect();
730
+ d.value = p.height, n.value = p.bottom, f.value = p.left, r.value = p.right, h.value = p.top, E.value = p.width, O.value = p.x, Z.value = p.y;
731
731
  }
732
732
  function v() {
733
- o === "sync" ? p() : o === "next-frame" && requestAnimationFrame(() => p());
733
+ o === "sync" ? w() : o === "next-frame" && requestAnimationFrame(() => w());
734
734
  }
735
- return Je(e, v), ce(() => ge(e), (h) => !h && v()), Ht(e, v, { attributeFilter: ["style", "class"] }), d && Re("scroll", v, {
735
+ return qe(e, v), ce(() => ge(e), (g) => !g && v()), Ht(e, v, { attributeFilter: ["style", "class"] }), u && Re("scroll", v, {
736
736
  capture: !0,
737
737
  passive: !0
738
- }), i && Re("resize", v, { passive: !0 }), Rn(() => {
739
- l && v();
738
+ }), a && Re("resize", v, { passive: !0 }), Rn(() => {
739
+ i && v();
740
740
  }), {
741
- height: n,
742
- bottom: r,
743
- left: c,
744
- right: f,
745
- top: w,
741
+ height: d,
742
+ bottom: n,
743
+ left: f,
744
+ right: r,
745
+ top: h,
746
746
  width: E,
747
- x: V,
748
- y: x,
747
+ x: O,
748
+ y: Z,
749
749
  update: v
750
750
  };
751
751
  }
@@ -755,28 +755,28 @@ function et(e) {
755
755
  const tt = /* @__PURE__ */ new WeakMap();
756
756
  function Sn(e, t = !1) {
757
757
  const s = ie(t);
758
- let i = "";
758
+ let a = "";
759
759
  ce(xn(e), (o) => {
760
- const n = et(D(o));
761
- if (n) {
762
- const r = n;
763
- if (tt.get(r) || tt.set(r, r.style.overflow), r.style.overflow !== "hidden" && (i = r.style.overflow), r.style.overflow === "hidden") return s.value = !0;
764
- if (s.value) return r.style.overflow = "hidden";
760
+ const d = et(D(o));
761
+ if (d) {
762
+ const n = d;
763
+ if (tt.get(n) || tt.set(n, n.style.overflow), n.style.overflow !== "hidden" && (a = n.style.overflow), n.style.overflow === "hidden") return s.value = !0;
764
+ if (s.value) return n.style.overflow = "hidden";
765
765
  }
766
766
  }, { immediate: !0 });
767
- const d = () => {
767
+ const u = () => {
768
768
  const o = et(D(e));
769
769
  !o || s.value || (o.style.overflow = "hidden", s.value = !0);
770
- }, l = () => {
770
+ }, i = () => {
771
771
  const o = et(D(e));
772
- !o || !s.value || (o.style.overflow = i, tt.delete(o), s.value = !1);
772
+ !o || !s.value || (o.style.overflow = a, tt.delete(o), s.value = !1);
773
773
  };
774
- return vt(l), T({
774
+ return vt(i), A({
775
775
  get() {
776
776
  return s.value;
777
777
  },
778
778
  set(o) {
779
- o ? d() : l();
779
+ o ? u() : i();
780
780
  }
781
781
  });
782
782
  }
@@ -795,119 +795,119 @@ const An = (e) => {
795
795
  debounce: { default: 300 }
796
796
  },
797
797
  setup(e, { expose: t }) {
798
- const s = re("cell"), i = e.store.getCellData(e.colIndex, e.rowIndex), d = z(""), l = z(!1), o = e.store.columns[e.colIndex], n = e.store.rows[e.rowIndex], r = o.align || "center", c = o.width || "40ch", f = T(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), w = T(() => typeof f.value == "string" ? An(f.value) : !1), E = T(() => ({
799
- textAlign: r,
800
- width: c,
801
- fontWeight: l.value ? "bold" : "inherit",
798
+ const s = re("cell"), a = e.store.getCellData(e.colIndex, e.rowIndex), u = z(""), i = z(!1), o = e.store.columns[e.colIndex], d = e.store.rows[e.rowIndex], n = o.align || "center", f = o.width || "40ch", r = A(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), h = A(() => typeof r.value == "string" ? An(r.value) : !1), E = A(() => ({
799
+ textAlign: n,
800
+ width: f,
801
+ fontWeight: i.value ? "bold" : "inherit",
802
802
  paddingLeft: e.store.getIndent(e.colIndex, e.store.display[e.rowIndex]?.indent)
803
- })), V = T(() => ({
803
+ })), O = A(() => ({
804
804
  "sticky-column": e.pinned,
805
- "cell-modified": l.value
806
- })), x = () => {
807
- v(), p();
808
- }, p = () => {
809
- const { left: A, bottom: L, width: X, height: le } = Ie(s);
805
+ "cell-modified": i.value
806
+ })), Z = () => {
807
+ v(), w();
808
+ }, w = () => {
809
+ const { left: R, bottom: H, width: X, height: le } = Ie(s);
810
810
  o.mask, o.modalComponent && e.store.$patch((j) => {
811
- j.modal.visible = !0, j.modal.colIndex = e.colIndex, j.modal.rowIndex = e.rowIndex, j.modal.left = A, j.modal.bottom = L, j.modal.width = X, j.modal.height = le, j.modal.cell = s.value, typeof o.modalComponent == "function" ? j.modal.component = o.modalComponent({ table: j.table, row: n, column: o }) : j.modal.component = o.modalComponent, j.modal.componentProps = o.modalComponentExtraProps;
811
+ j.modal.visible = !0, j.modal.colIndex = e.colIndex, j.modal.rowIndex = e.rowIndex, j.modal.left = R, j.modal.bottom = H, j.modal.width = X, j.modal.height = le, j.modal.cell = s.value, typeof o.modalComponent == "function" ? j.modal.component = o.modalComponent({ table: j.table, row: d, column: o }) : j.modal.component = o.modalComponent, j.modal.componentProps = o.modalComponentExtraProps;
812
812
  });
813
813
  };
814
814
  if (e.addNavigation) {
815
- let A = {
815
+ let R = {
816
816
  ...Qe,
817
- "keydown.f2": p,
818
- "keydown.alt.up": p,
819
- "keydown.alt.down": p,
820
- "keydown.alt.left": p,
821
- "keydown.alt.right": p
817
+ "keydown.f2": w,
818
+ "keydown.alt.up": w,
819
+ "keydown.alt.down": w,
820
+ "keydown.alt.left": w,
821
+ "keydown.alt.right": w
822
822
  };
823
- typeof e.addNavigation == "object" && (A = {
824
- ...A,
823
+ typeof e.addNavigation == "object" && (R = {
824
+ ...R,
825
825
  ...e.addNavigation
826
826
  }), ft([
827
827
  {
828
828
  selectors: s,
829
- handlers: A
829
+ handlers: R
830
830
  }
831
831
  ]);
832
832
  }
833
833
  const v = () => {
834
834
  if (s.value && o.edit) {
835
- const A = window.getSelection();
836
- if (A)
835
+ const R = window.getSelection();
836
+ if (R)
837
837
  try {
838
- const L = document.createRange();
839
- L.selectNodeContents && (L.selectNodeContents(s.value), A.removeAllRanges(), A.addRange(L));
838
+ const H = document.createRange();
839
+ H.selectNodeContents && (H.selectNodeContents(s.value), R.removeAllRanges(), R.addRange(H));
840
840
  } catch {
841
841
  }
842
842
  }
843
- }, h = () => {
844
- s.value && (d.value = s.value.textContent, v());
845
843
  }, g = () => {
844
+ s.value && (u.value = s.value.textContent, v());
845
+ }, p = () => {
846
846
  try {
847
- const A = window.getSelection();
848
- if (A && A.rangeCount > 0 && s.value) {
849
- const L = A.getRangeAt(0), X = L.cloneRange();
847
+ const R = window.getSelection();
848
+ if (R && R.rangeCount > 0 && s.value) {
849
+ const H = R.getRangeAt(0), X = H.cloneRange();
850
850
  if (X.selectNodeContents && X.setEnd)
851
- return X.selectNodeContents(s.value), X.setEnd(L.endContainer, L.endOffset), X.toString().length;
851
+ return X.selectNodeContents(s.value), X.setEnd(H.endContainer, H.endOffset), X.toString().length;
852
852
  }
853
853
  } catch {
854
854
  }
855
855
  return 0;
856
- }, $ = (A) => {
856
+ }, y = (R) => {
857
857
  if (s.value)
858
858
  try {
859
- const L = window.getSelection();
860
- if (!L) return;
859
+ const H = window.getSelection();
860
+ if (!H) return;
861
861
  let X = 0;
862
862
  const le = document.createTreeWalker ? document.createTreeWalker(s.value, NodeFilter.SHOW_TEXT, null) : null;
863
863
  if (!le) return;
864
- let j, q = null;
864
+ let j, J = null;
865
865
  for (; j = le.nextNode(); ) {
866
866
  const ue = j, ae = X + ue.textContent.length;
867
- if (A <= ae && (q = document.createRange(), q.setStart && q.setEnd)) {
868
- q.setStart(ue, A - X), q.setEnd(ue, A - X);
867
+ if (R <= ae && (J = document.createRange(), J.setStart && J.setEnd)) {
868
+ J.setStart(ue, R - X), J.setEnd(ue, R - X);
869
869
  break;
870
870
  }
871
871
  X = ae;
872
872
  }
873
- q && L.removeAllRanges && L.addRange && (L.removeAllRanges(), L.addRange(q));
873
+ J && H.removeAllRanges && H.addRange && (H.removeAllRanges(), H.addRange(J));
874
874
  } catch {
875
875
  }
876
- }, I = (A) => {
876
+ }, M = (R) => {
877
877
  if (!o.edit) return;
878
- const L = A.target;
879
- if (L.textContent === d.value)
878
+ const H = R.target;
879
+ if (H.textContent === u.value)
880
880
  return;
881
- const X = g();
882
- d.value = L.textContent, o.format ? (l.value = L.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, i), e.store.setCellText(e.colIndex, e.rowIndex, L.textContent)) : (l.value = L.textContent !== i, e.store.setCellData(e.colIndex, e.rowIndex, L.textContent)), at().then(() => {
883
- $(X);
881
+ const X = p();
882
+ u.value = H.textContent, o.format ? (i.value = H.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, a), e.store.setCellText(e.colIndex, e.rowIndex, H.textContent)) : (i.value = H.textContent !== a, e.store.setCellData(e.colIndex, e.rowIndex, H.textContent)), at().then(() => {
883
+ y(X);
884
884
  });
885
- }, H = /* @__PURE__ */ kn(I, e.debounce);
885
+ }, T = /* @__PURE__ */ kn(M, e.debounce);
886
886
  return t({
887
- currentData: d
888
- }), (A, L) => (y(), C("td", {
887
+ currentData: u
888
+ }), (R, H) => (x(), C("td", {
889
889
  ref: "cell",
890
890
  "data-colindex": e.colIndex,
891
891
  "data-rowindex": e.rowIndex,
892
- "data-editable": Z(o).edit,
893
- contenteditable: Z(o).edit,
892
+ "data-editable": P(o).edit,
893
+ contenteditable: P(o).edit,
894
894
  tabindex: e.tabIndex,
895
895
  spellcheck: !1,
896
896
  style: me(E.value),
897
- class: oe(["atable-cell", V.value]),
898
- onFocus: h,
899
- onPaste: I,
900
- onInput: L[0] || (L[0] = //@ts-ignore
901
- (...X) => Z(H) && Z(H)(...X)),
902
- onClick: x
897
+ class: oe(["atable-cell", O.value]),
898
+ onFocus: g,
899
+ onPaste: M,
900
+ onInput: H[0] || (H[0] = //@ts-ignore
901
+ (...X) => P(T) && P(T)(...X)),
902
+ onClick: Z
903
903
  }, [
904
- Z(o).cellComponent ? (y(), ve(We(Z(o).cellComponent), st({
904
+ P(o).cellComponent ? (x(), ve(We(P(o).cellComponent), st({
905
905
  key: 0,
906
- value: f.value
907
- }, Z(o).cellComponentProps), null, 16, ["value"])) : w.value ? (y(), C("span", {
906
+ value: r.value
907
+ }, P(o).cellComponentProps), null, 16, ["value"])) : h.value ? (x(), C("span", {
908
908
  key: 1,
909
- innerHTML: f.value
910
- }, null, 8, Hn)) : (y(), C("span", Ln, xe(f.value), 1))
909
+ innerHTML: r.value
910
+ }, null, 8, Hn)) : (x(), C("span", Ln, xe(r.value), 1))
911
911
  ], 46, Dn));
912
912
  }
913
913
  }), Vn = ["tabindex"], Bn = ["tabindex"], Pn = ["colspan"], Zn = /* @__PURE__ */ we({
@@ -919,22 +919,22 @@ const An = (e) => {
919
919
  addNavigation: { type: [Boolean, Object], default: () => Qe }
920
920
  },
921
921
  setup(e) {
922
- const t = re("rowEl"), s = T(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
922
+ const t = re("rowEl"), s = A(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
923
923
  if (e.addNavigation) {
924
- const i = {
925
- "keydown.control.g": (d) => {
926
- d.stopPropagation(), d.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
924
+ const a = {
925
+ "keydown.control.g": (u) => {
926
+ u.stopPropagation(), u.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
927
927
  }
928
928
  };
929
- typeof e.addNavigation == "object" && Object.assign(i, e.addNavigation), ft([
929
+ typeof e.addNavigation == "object" && Object.assign(a, e.addNavigation), ft([
930
930
  {
931
931
  selectors: t,
932
- handlers: i
932
+ handlers: a
933
933
  }
934
934
  ]);
935
935
  }
936
- return (i, d) => (y(), C(he, null, [
937
- W("tr", st(i.$attrs, {
936
+ return (a, u) => (x(), C(he, null, [
937
+ W("tr", st(a.$attrs, {
938
938
  ref: "rowEl",
939
939
  tabindex: e.tabIndex,
940
940
  class: "expandable-row"
@@ -942,11 +942,11 @@ const An = (e) => {
942
942
  W("td", {
943
943
  tabIndex: -1,
944
944
  class: "row-index",
945
- onClick: d[0] || (d[0] = (l) => e.store.toggleRowExpand(e.rowIndex))
945
+ onClick: u[0] || (u[0] = (i) => e.store.toggleRowExpand(e.rowIndex))
946
946
  }, xe(s.value), 1),
947
- fe(i.$slots, "row", {}, void 0, !0)
947
+ fe(a.$slots, "row", {}, void 0, !0)
948
948
  ], 16, Vn),
949
- e.store.display[e.rowIndex].expanded ? (y(), C("tr", {
949
+ e.store.display[e.rowIndex].expanded ? (x(), C("tr", {
950
950
  key: 0,
951
951
  ref: "rowExpanded",
952
952
  tabindex: e.tabIndex,
@@ -957,15 +957,15 @@ const An = (e) => {
957
957
  colspan: e.store.columns.length + 1,
958
958
  class: "expanded-row-content"
959
959
  }, [
960
- fe(i.$slots, "content", {}, void 0, !0)
960
+ fe(a.$slots, "content", {}, void 0, !0)
961
961
  ], 8, Pn)
962
962
  ], 8, Bn)) : K("", !0)
963
963
  ], 64));
964
964
  }
965
965
  }), $e = (e, t) => {
966
966
  const s = e.__vccOpts || e;
967
- for (const [i, d] of t)
968
- s[i] = d;
967
+ for (const [a, u] of t)
968
+ s[a] = u;
969
969
  return s;
970
970
  }, Nn = /* @__PURE__ */ $e(Zn, [["__scopeId", "data-v-a42297c7"]]), Wn = ["colspan"], Fn = {
971
971
  ref: "container",
@@ -989,17 +989,17 @@ const An = (e) => {
989
989
  emits: ["connection:create"],
990
990
  setup(e, { expose: t, emit: s }) {
991
991
  zt((S) => ({
992
- v737862e7: d.value,
993
- v05f25613: S.colspan
992
+ v67f2230e: u.value,
993
+ v8309df7e: S.colspan
994
994
  }));
995
- const i = s, d = z(e.color.length >= 6 ? e.color : "#cccccc"), l = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, o = re("container"), n = re("bar"), r = re("leftResizeHandle"), c = re("rightResizeHandle"), f = re("leftConnectionHandle"), w = re("rightConnectionHandle"), { width: E } = Ie(o), { left: V, right: x } = Ie(n), p = z(e.start), v = z(e.end || p.value + e.colspan), h = z(!1), g = z(!1), $ = z(!1), I = z(!1), H = z(!1), A = z({ startX: 0, startY: 0, endX: 0, endY: 0 }), L = T(() => Ae.value || ue.value || ae.value), X = T(() => e.colspan > 0 ? E.value / e.colspan : 0), le = T(() => {
996
- const S = p.value / e.colspan * 100, B = v.value / e.colspan * 100;
995
+ const a = s, u = z(e.color.length >= 6 ? e.color : "#cccccc"), i = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, o = re("container"), d = re("bar"), n = re("leftResizeHandle"), f = re("rightResizeHandle"), r = re("leftConnectionHandle"), h = re("rightConnectionHandle"), { width: E } = Ie(o), { left: O, right: Z } = Ie(d), w = z(e.start), v = z(e.end || w.value + e.colspan), g = z(!1), p = z(!1), y = z(!1), M = z(!1), T = z(!1), R = z({ startX: 0, startY: 0, endX: 0, endY: 0 }), H = A(() => Ae.value || ue.value || ae.value), X = A(() => e.colspan > 0 ? E.value / e.colspan : 0), le = A(() => {
996
+ const S = w.value / e.colspan * 100, V = v.value / e.colspan * 100;
997
997
  return {
998
998
  left: `${S}%`,
999
- width: `${B - S}%`,
1000
- backgroundColor: d.value
999
+ width: `${V - S}%`,
1000
+ backgroundColor: u.value
1001
1001
  };
1002
- }), j = T(
1002
+ }), j = A(
1003
1003
  () => ({
1004
1004
  position: "fixed",
1005
1005
  top: 0,
@@ -1009,40 +1009,40 @@ const An = (e) => {
1009
1009
  pointerEvents: "none",
1010
1010
  zIndex: 1e3
1011
1011
  })
1012
- ), q = z({ startX: 0, startPos: 0 }), { isDragging: ue } = _e(r, {
1012
+ ), J = z({ startX: 0, startPos: 0 }), { isDragging: ue } = _e(n, {
1013
1013
  axis: "x",
1014
- onStart: () => ke(V.value, p.value),
1014
+ onStart: () => ke(O.value, w.value),
1015
1015
  onMove: ({ x: S }) => Oe(S),
1016
1016
  onEnd: ({ x: S }) => Ve(S)
1017
- }), { isDragging: ae } = _e(c, {
1017
+ }), { isDragging: ae } = _e(f, {
1018
1018
  axis: "x",
1019
- onStart: () => ke(x.value, v.value),
1019
+ onStart: () => ke(Z.value, v.value),
1020
1020
  onMove: ({ x: S }) => Be(S),
1021
1021
  onEnd: ({ x: S }) => Te(S)
1022
- }), { isDragging: Ae } = _e(n, {
1022
+ }), { isDragging: Ae } = _e(d, {
1023
1023
  exact: !0,
1024
1024
  axis: "x",
1025
- onStart: () => ke(V.value, p.value),
1025
+ onStart: () => ke(O.value, w.value),
1026
1026
  onMove: ({ x: S }) => Pe(S),
1027
1027
  onEnd: ({ x: S }) => k(S)
1028
1028
  });
1029
1029
  He(() => {
1030
- O();
1030
+ L();
1031
1031
  }), Xt(() => {
1032
1032
  F();
1033
1033
  });
1034
- function ke(S, B) {
1035
- n.value && (n.value.style.transition = "none"), q.value = { startX: S, startPos: B };
1034
+ function ke(S, V) {
1035
+ d.value && (d.value.style.transition = "none"), J.value = { startX: S, startPos: V };
1036
1036
  }
1037
1037
  function Oe(S) {
1038
- if (!ue.value || !n.value) return;
1039
- const U = (S - q.value.startX) / X.value, Y = Math.max(0, Math.min(v.value - 1, q.value.startPos + U));
1040
- n.value.style.left = `${Y / e.colspan * 100}%`, n.value.style.width = `${(v.value - Y) / e.colspan * 100}%`;
1038
+ if (!ue.value || !d.value) return;
1039
+ const U = (S - J.value.startX) / X.value, Y = Math.max(0, Math.min(v.value - 1, J.value.startPos + U));
1040
+ d.value.style.left = `${Y / e.colspan * 100}%`, d.value.style.width = `${(v.value - Y) / e.colspan * 100}%`;
1041
1041
  }
1042
1042
  function Ve(S) {
1043
- if (!n.value) return;
1044
- const B = S - q.value.startX, U = Math.round(B / X.value), Y = p.value, Q = Math.max(0, Math.min(v.value - 1, q.value.startPos + U));
1045
- p.value = Q, e.store.updateGanttBar({
1043
+ if (!d.value) return;
1044
+ const V = S - J.value.startX, U = Math.round(V / X.value), Y = w.value, Q = Math.max(0, Math.min(v.value - 1, J.value.startPos + U));
1045
+ w.value = Q, e.store.updateGanttBar({
1046
1046
  rowIndex: e.rowIndex,
1047
1047
  colIndex: e.colIndex,
1048
1048
  type: "resize",
@@ -1056,13 +1056,13 @@ const An = (e) => {
1056
1056
  });
1057
1057
  }
1058
1058
  function Be(S) {
1059
- if (!ae.value || !n.value) return;
1060
- const U = (S - q.value.startX) / X.value, Y = Math.max(p.value + 1, Math.min(e.columnsCount, q.value.startPos + U));
1061
- n.value.style.width = `${(Y - p.value) / e.colspan * 100}%`;
1059
+ if (!ae.value || !d.value) return;
1060
+ const U = (S - J.value.startX) / X.value, Y = Math.max(w.value + 1, Math.min(e.columnsCount, J.value.startPos + U));
1061
+ d.value.style.width = `${(Y - w.value) / e.colspan * 100}%`;
1062
1062
  }
1063
1063
  function Te(S) {
1064
- if (!n.value) return;
1065
- const B = S - q.value.startX, U = Math.round(B / X.value), Y = v.value, Q = Math.max(p.value + 1, Math.min(e.columnsCount, q.value.startPos + U));
1064
+ if (!d.value) return;
1065
+ const V = S - J.value.startX, U = Math.round(V / X.value), Y = v.value, Q = Math.max(w.value + 1, Math.min(e.columnsCount, J.value.startPos + U));
1066
1066
  v.value = Q, e.store.updateGanttBar({
1067
1067
  rowIndex: e.rowIndex,
1068
1068
  colIndex: e.colIndex,
@@ -1070,22 +1070,22 @@ const An = (e) => {
1070
1070
  edge: "end",
1071
1071
  oldEnd: Y,
1072
1072
  newEnd: Q,
1073
- start: p.value,
1073
+ start: w.value,
1074
1074
  delta: U,
1075
- oldColspan: Y - p.value,
1076
- newColspan: Q - p.value
1075
+ oldColspan: Y - w.value,
1076
+ newColspan: Q - w.value
1077
1077
  });
1078
1078
  }
1079
1079
  function Pe(S) {
1080
- if (!Ae.value || !n.value) return;
1081
- const U = (S - q.value.startX) / X.value, Y = v.value - p.value, Q = Math.max(0, Math.min(q.value.startPos + U, e.columnsCount - Y));
1082
- n.value.style.left = `${Q / e.colspan * 100}%`;
1080
+ if (!Ae.value || !d.value) return;
1081
+ const U = (S - J.value.startX) / X.value, Y = v.value - w.value, Q = Math.max(0, Math.min(J.value.startPos + U, e.columnsCount - Y));
1082
+ d.value.style.left = `${Q / e.colspan * 100}%`;
1083
1083
  }
1084
1084
  function k(S) {
1085
- if (!n.value) return;
1086
- const B = S - q.value.startX, U = Math.round(B / X.value), Y = v.value - p.value, Q = p.value, _ = v.value;
1087
- let ne = q.value.startPos + U, se = ne + Y;
1088
- ne < 0 ? (ne = 0, se = Y) : se > e.columnsCount && (se = e.columnsCount, ne = se - Y), p.value = ne, v.value = se, e.store.updateGanttBar({
1085
+ if (!d.value) return;
1086
+ const V = S - J.value.startX, U = Math.round(V / X.value), Y = v.value - w.value, Q = w.value, _ = v.value;
1087
+ let ne = J.value.startPos + U, se = ne + Y;
1088
+ ne < 0 ? (ne = 0, se = Y) : se > e.columnsCount && (se = e.columnsCount, ne = se - Y), w.value = ne, v.value = se, e.store.updateGanttBar({
1089
1089
  rowIndex: e.rowIndex,
1090
1090
  colIndex: e.colIndex,
1091
1091
  type: "bar",
@@ -1097,85 +1097,85 @@ const An = (e) => {
1097
1097
  colspan: se - ne
1098
1098
  });
1099
1099
  }
1100
- function O() {
1101
- const { x: S, y: B } = Ie(n), { x: U, y: Y } = Ie(f), { x: Q, y: _ } = Ie(w);
1100
+ function L() {
1101
+ const { x: S, y: V } = Ie(d), { x: U, y: Y } = Ie(r), { x: Q, y: _ } = Ie(h);
1102
1102
  e.store.registerGanttBar({
1103
- id: l,
1103
+ id: i,
1104
1104
  rowIndex: e.rowIndex,
1105
1105
  colIndex: e.colIndex,
1106
- startIndex: p,
1106
+ startIndex: w,
1107
1107
  endIndex: v,
1108
- color: d,
1108
+ color: u,
1109
1109
  label: e.label,
1110
- position: { x: S, y: B }
1110
+ position: { x: S, y: V }
1111
1111
  }), e.store.isDependencyGraphEnabled && (e.store.registerConnectionHandle({
1112
- id: `${l}-connection-left`,
1112
+ id: `${i}-connection-left`,
1113
1113
  rowIndex: e.rowIndex,
1114
1114
  colIndex: e.colIndex,
1115
1115
  side: "left",
1116
1116
  position: { x: U, y: Y },
1117
- visible: h,
1118
- barId: l
1117
+ visible: g,
1118
+ barId: i
1119
1119
  }), e.store.registerConnectionHandle({
1120
- id: `${l}-connection-right`,
1120
+ id: `${i}-connection-right`,
1121
1121
  rowIndex: e.rowIndex,
1122
1122
  colIndex: e.colIndex,
1123
1123
  side: "right",
1124
1124
  position: { x: Q, y: _ },
1125
- visible: g,
1126
- barId: l
1125
+ visible: p,
1126
+ barId: i
1127
1127
  }));
1128
1128
  }
1129
1129
  function F() {
1130
- e.store.unregisterGanttBar(l), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${l}-connection-left`), e.store.unregisterConnectionHandle(`${l}-connection-right`));
1130
+ e.store.unregisterGanttBar(i), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${i}-connection-left`), e.store.unregisterConnectionHandle(`${i}-connection-right`));
1131
1131
  }
1132
- function J() {
1133
- e.store.isDependencyGraphEnabled && (h.value = !0, g.value = !0);
1132
+ function q() {
1133
+ e.store.isDependencyGraphEnabled && (g.value = !0, p.value = !0);
1134
1134
  }
1135
1135
  function G() {
1136
- !$.value && !I.value && (h.value = !1, g.value = !1);
1136
+ !y.value && !M.value && (g.value = !1, p.value = !1);
1137
1137
  }
1138
- function te(S, B) {
1139
- B.preventDefault(), B.stopPropagation(), H.value = !0, S === "left" ? $.value = !0 : I.value = !0;
1140
- const U = S === "left" ? f.value : w.value;
1138
+ function te(S, V) {
1139
+ V.preventDefault(), V.stopPropagation(), T.value = !0, S === "left" ? y.value = !0 : M.value = !0;
1140
+ const U = S === "left" ? r.value : h.value;
1141
1141
  if (U) {
1142
1142
  const _ = U.getBoundingClientRect(), ne = _.left + _.width / 2, se = _.top + _.height / 2;
1143
- A.value = { startX: ne, startY: se, endX: ne, endY: se };
1143
+ R.value = { startX: ne, startY: se, endX: ne, endY: se };
1144
1144
  }
1145
1145
  const Y = (_) => {
1146
- A.value.endX = _.clientX, A.value.endY = _.clientY;
1146
+ R.value.endX = _.clientX, R.value.endY = _.clientY;
1147
1147
  }, Q = (_) => {
1148
1148
  pe(_, S), Me(Y, Q);
1149
1149
  };
1150
1150
  document.addEventListener("mousemove", Y), document.addEventListener("mouseup", Q);
1151
1151
  }
1152
- function pe(S, B) {
1152
+ function pe(S, V) {
1153
1153
  const Y = document.elementFromPoint(S.clientX, S.clientY)?.closest(".connection-handle");
1154
- if (Y && Y !== (B === "left" ? f.value : w.value)) {
1154
+ if (Y && Y !== (V === "left" ? r.value : h.value)) {
1155
1155
  const Q = Y.closest(".gantt-bar");
1156
1156
  if (Q) {
1157
1157
  const _ = parseInt(Q.getAttribute("data-rowindex") || "0"), ne = parseInt(Q.getAttribute("data-colindex") || "0"), se = Y.classList.contains("left-connection-handle") ? "left" : "right", Ze = `gantt-bar-row-${_}-col-${ne}`, Ke = e.store.createConnection(
1158
- `${l}-connection-${B}`,
1158
+ `${i}-connection-${V}`,
1159
1159
  `${Ze}-connection-${se}`
1160
1160
  );
1161
- Ke && i("connection:create", Ke);
1161
+ Ke && a("connection:create", Ke);
1162
1162
  }
1163
1163
  }
1164
1164
  }
1165
- function Me(S, B) {
1166
- H.value = !1, $.value = !1, I.value = !1, document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", B), n.value?.matches(":hover") || G();
1165
+ function Me(S, V) {
1166
+ T.value = !1, y.value = !1, M.value = !1, document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", V), d.value?.matches(":hover") || G();
1167
1167
  }
1168
1168
  return t({
1169
1169
  barStyle: le,
1170
1170
  cleanupConnectionDrag: Me,
1171
1171
  currentEnd: v,
1172
1172
  handleConnectionDrop: pe,
1173
- isLeftConnectionDragging: $,
1174
- isLeftConnectionVisible: h,
1175
- isRightConnectionDragging: I,
1176
- isRightConnectionVisible: g,
1177
- showDragPreview: H
1178
- }), (S, B) => (y(), C("td", {
1173
+ isLeftConnectionDragging: y,
1174
+ isLeftConnectionVisible: g,
1175
+ isRightConnectionDragging: M,
1176
+ isRightConnectionVisible: p,
1177
+ showDragPreview: T
1178
+ }), (S, V) => (x(), C("td", {
1179
1179
  class: "aganttcell",
1180
1180
  colspan: e.colspan
1181
1181
  }, [
@@ -1184,53 +1184,53 @@ const An = (e) => {
1184
1184
  ref: "bar",
1185
1185
  "data-rowindex": e.rowIndex,
1186
1186
  "data-colindex": e.colIndex,
1187
- class: oe(["gantt-bar", { "is-dragging": L.value }]),
1187
+ class: oe(["gantt-bar", { "is-dragging": H.value }]),
1188
1188
  style: me(le.value),
1189
- onMouseenter: J,
1189
+ onMouseenter: q,
1190
1190
  onMouseleave: G
1191
1191
  }, [
1192
- e.store.isDependencyGraphEnabled ? (y(), C("div", {
1192
+ e.store.isDependencyGraphEnabled ? (x(), C("div", {
1193
1193
  key: 0,
1194
1194
  ref: "leftConnectionHandle",
1195
- class: oe(["connection-handle left-connection-handle", { visible: h.value, "is-dragging": $.value }]),
1196
- onMousedown: B[0] || (B[0] = Se((U) => te("left", U), ["stop"]))
1197
- }, [...B[2] || (B[2] = [
1195
+ class: oe(["connection-handle left-connection-handle", { visible: g.value, "is-dragging": y.value }]),
1196
+ onMousedown: V[0] || (V[0] = Se((U) => te("left", U), ["stop"]))
1197
+ }, [...V[2] || (V[2] = [
1198
1198
  W("div", { class: "connection-dot" }, null, -1)
1199
1199
  ])], 34)) : K("", !0),
1200
- e.store.isDependencyGraphEnabled ? (y(), C("div", {
1200
+ e.store.isDependencyGraphEnabled ? (x(), C("div", {
1201
1201
  key: 1,
1202
1202
  ref: "rightConnectionHandle",
1203
- class: oe(["connection-handle right-connection-handle", { visible: g.value, "is-dragging": I.value }]),
1204
- onMousedown: B[1] || (B[1] = Se((U) => te("right", U), ["stop"]))
1205
- }, [...B[3] || (B[3] = [
1203
+ class: oe(["connection-handle right-connection-handle", { visible: p.value, "is-dragging": M.value }]),
1204
+ onMousedown: V[1] || (V[1] = Se((U) => te("right", U), ["stop"]))
1205
+ }, [...V[3] || (V[3] = [
1206
1206
  W("div", { class: "connection-dot" }, null, -1)
1207
1207
  ])], 34)) : K("", !0),
1208
1208
  W("div", {
1209
1209
  ref: "leftResizeHandle",
1210
- class: oe(["resize-handle left-resize-handle", { "is-dragging": Z(ue) }])
1211
- }, [...B[4] || (B[4] = [
1210
+ class: oe(["resize-handle left-resize-handle", { "is-dragging": P(ue) }])
1211
+ }, [...V[4] || (V[4] = [
1212
1212
  W("div", { class: "handle-grip" }, null, -1),
1213
1213
  W("div", { class: "vertical-indicator left-indicator" }, null, -1)
1214
1214
  ])], 2),
1215
- e.label ? (y(), C("label", Xn, xe(e.label), 1)) : K("", !0),
1215
+ e.label ? (x(), C("label", Xn, xe(e.label), 1)) : K("", !0),
1216
1216
  W("div", {
1217
1217
  ref: "rightResizeHandle",
1218
- class: oe(["resize-handle right-resize-handle", { "is-dragging": Z(ae) }])
1219
- }, [...B[5] || (B[5] = [
1218
+ class: oe(["resize-handle right-resize-handle", { "is-dragging": P(ae) }])
1219
+ }, [...V[5] || (V[5] = [
1220
1220
  W("div", { class: "handle-grip" }, null, -1),
1221
1221
  W("div", { class: "vertical-indicator right-indicator" }, null, -1)
1222
1222
  ])], 2)
1223
1223
  ], 46, zn)
1224
1224
  ], 512),
1225
- e.store.isDependencyGraphEnabled && H.value ? (y(), C("svg", {
1225
+ e.store.isDependencyGraphEnabled && T.value ? (x(), C("svg", {
1226
1226
  key: 0,
1227
1227
  style: me(j.value)
1228
1228
  }, [
1229
1229
  W("line", {
1230
- x1: A.value.startX,
1231
- y1: A.value.startY,
1232
- x2: A.value.endX,
1233
- y2: A.value.endY,
1230
+ x1: R.value.startX,
1231
+ y1: R.value.startY,
1232
+ x2: R.value.endX,
1233
+ y2: R.value.endY,
1234
1234
  stroke: "#2196f3",
1235
1235
  "stroke-width": "2",
1236
1236
  "stroke-dasharray": "5,5"
@@ -1238,16 +1238,16 @@ const An = (e) => {
1238
1238
  ], 4)) : K("", !0)
1239
1239
  ], 8, Wn));
1240
1240
  }
1241
- }), Un = /* @__PURE__ */ $e(Yn, [["__scopeId", "data-v-c2df3f52"]]), jn = `<?xml version="1.0" encoding="UTF-8"?>
1241
+ }), Un = /* @__PURE__ */ $e(Yn, [["__scopeId", "data-v-e2e9fdb6"]]), jn = `<?xml version="1.0" encoding="UTF-8"?>
1242
1242
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
1243
1243
  <path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
1244
1244
  <polygon points="34 18 30 18 30 30 18 30 18 34 30 34 30 46 34 46 34 34 46 34 46 30 34 30 34 18" style="fill: #000; stroke-width: 0px;"/>
1245
1245
  </svg>
1246
- `, qn = `<?xml version="1.0" encoding="UTF-8"?>
1246
+ `, Jn = `<?xml version="1.0" encoding="UTF-8"?>
1247
1247
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
1248
1248
  <path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
1249
1249
  <polygon points="46.84 19.99 44.01 17.16 32 29.17 19.99 17.16 17.16 19.99 29.17 32 17.16 44.01 19.99 46.84 32 34.83 44.01 46.84 46.84 44.01 34.83 32 46.84 19.99" style="fill: #000; stroke-width: 0px;"/>
1250
- </svg>`, Jn = `<?xml version="1.0" encoding="UTF-8"?>
1250
+ </svg>`, qn = `<?xml version="1.0" encoding="UTF-8"?>
1251
1251
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70.67 70.67">
1252
1252
  <path d="M68.67,16.67h-14.67V2c0-1.1-.9-2-2-2H2C.9,0,0,.9,0,2v50c0,1.1.9,2,2,2h14.67v14.67c0,1.1.9,2,2,2h50c1.1,0,2-.9,2-2V18.67c0-1.1-.9-2-2-2ZM4,4h46v46H4V4ZM66.67,66.67H20.67v-12.67h31.33c1.1,0,2-.9,2-2v-31.33h12.67v46Z" style="fill: #000; stroke-width: 0px;"/>
1253
1253
  <polygon points="41 25 29 25 29 13 25 13 25 25 13 25 13 29 25 29 25 41 29 41 29 29 41 29 41 25" style="fill: #000; stroke-width: 0px;"/>
@@ -1284,8 +1284,8 @@ const An = (e) => {
1284
1284
  <path d="M70.08,33.9l-9.75-9.75-2.83,2.83,6.33,6.33h-26.51V6.81l6.33,6.33,2.83-2.83L36.75.56c-.75-.75-2.08-.75-2.83,0l-9.75,9.75,2.83,2.83,6.33-6.33v26.5H6.83l6.33-6.33-2.83-2.83L.59,33.9c-.38.38-.59.88-.59,1.41s.21,1.04.59,1.41l9.75,9.75,2.83-2.83-6.33-6.33h26.5v26.51l-6.33-6.33-2.83,2.83,9.75,9.75c.38.38.88.59,1.41.59s1.04-.21,1.41-.59l9.75-9.75-2.83-2.83-6.33,6.33v-26.51h26.51l-6.33,6.33,2.83,2.83,9.75-9.75c.38-.38.59-.88.59-1.41s-.21-1.04-.59-1.41Z" style="fill: #000; stroke-width: 0px;"/>
1285
1285
  </svg>`, eo = {
1286
1286
  add: jn,
1287
- delete: qn,
1288
- duplicate: Jn,
1287
+ delete: Jn,
1288
+ duplicate: qn,
1289
1289
  insertAbove: Qn,
1290
1290
  insertBelow: Kn,
1291
1291
  move: _n
@@ -1295,7 +1295,7 @@ const An = (e) => {
1295
1295
  }, no = ["aria-expanded"], oo = ["onClick"], lo = ["innerHTML"], ao = { class: "action-label" }, so = {
1296
1296
  key: 1,
1297
1297
  class: "row-actions-icons"
1298
- }, io = ["title", "aria-label", "onClick"], ro = ["innerHTML"], qe = /* @__PURE__ */ we({
1298
+ }, io = ["title", "aria-label", "onClick"], ro = ["innerHTML"], Je = /* @__PURE__ */ we({
1299
1299
  __name: "ARowActions",
1300
1300
  props: {
1301
1301
  rowIndex: {},
@@ -1305,109 +1305,109 @@ const An = (e) => {
1305
1305
  },
1306
1306
  emits: ["action"],
1307
1307
  setup(e, { emit: t }) {
1308
- const s = e, i = t, d = re("actionsCell"), l = re("toggleButton"), o = z(0), n = z(!1), r = z(!1), c = z({ top: 0, left: 0 }), f = {
1308
+ const s = e, a = t, u = re("actionsCell"), i = re("toggleButton"), o = z(0), d = z(!1), n = z(!1), f = z({ top: 0, left: 0 }), r = {
1309
1309
  add: "Add Row",
1310
1310
  delete: "Delete Row",
1311
1311
  duplicate: "Duplicate Row",
1312
1312
  insertAbove: "Insert Above",
1313
1313
  insertBelow: "Insert Below",
1314
1314
  move: "Move Row"
1315
- }, w = T(() => {
1316
- const h = [], g = s.config.actions || {}, $ = ["add", "delete", "duplicate", "insertAbove", "insertBelow", "move"];
1317
- for (const I of $) {
1318
- const H = g[I];
1319
- if (H === !1 || H === void 0) continue;
1320
- let A = !0, L = f[I], X = eo[I];
1321
- typeof H == "object" && (A = H.enabled !== !1, L = H.label || L, X = H.icon || X), A && h.push({ type: I, label: L, icon: X });
1315
+ }, h = A(() => {
1316
+ const g = [], p = s.config.actions || {}, y = ["add", "delete", "duplicate", "insertAbove", "insertBelow", "move"];
1317
+ for (const M of y) {
1318
+ const T = p[M];
1319
+ if (T === !1 || T === void 0) continue;
1320
+ let R = !0, H = r[M], X = eo[M];
1321
+ typeof T == "object" && (R = T.enabled !== !1, H = T.label || H, X = T.icon || X), R && g.push({ type: M, label: H, icon: X });
1322
1322
  }
1323
- return h;
1324
- }), E = T(() => {
1323
+ return g;
1324
+ }), E = A(() => {
1325
1325
  if (s.config.forceDropdown) return !0;
1326
- const h = s.config.dropdownThreshold ?? 150;
1327
- return h === 0 ? !1 : o.value > 0 && o.value < h;
1328
- }), V = T(() => n.value ? r.value ? {
1326
+ const g = s.config.dropdownThreshold ?? 150;
1327
+ return g === 0 ? !1 : o.value > 0 && o.value < g;
1328
+ }), O = A(() => d.value ? n.value ? {
1329
1329
  position: "fixed",
1330
- bottom: `${window.innerHeight - c.value.top}px`,
1331
- left: `${c.value.left}px`,
1330
+ bottom: `${window.innerHeight - f.value.top}px`,
1331
+ left: `${f.value.left}px`,
1332
1332
  top: "auto"
1333
1333
  } : {
1334
1334
  position: "fixed",
1335
- top: `${c.value.top}px`,
1336
- left: `${c.value.left}px`
1335
+ top: `${f.value.top}px`,
1336
+ left: `${f.value.left}px`
1337
1337
  } : {});
1338
- Je(d, (h) => {
1339
- const g = h[0];
1340
- g && (o.value = g.contentRect.width);
1338
+ qe(u, (g) => {
1339
+ const p = g[0];
1340
+ p && (o.value = p.contentRect.width);
1341
1341
  });
1342
- const x = () => {
1343
- n.value || p(), n.value = !n.value;
1344
- }, p = () => {
1345
- if (!l.value) return;
1346
- const h = l.value.getBoundingClientRect(), g = window.innerHeight, $ = w.value.length * 40 + 16, I = g - h.bottom, H = h.top;
1347
- r.value = I < $ && H > $, r.value ? c.value = {
1348
- top: h.top,
1349
- left: h.left
1350
- } : c.value = {
1351
- top: h.bottom,
1352
- left: h.left
1342
+ const Z = () => {
1343
+ d.value || w(), d.value = !d.value;
1344
+ }, w = () => {
1345
+ if (!i.value) return;
1346
+ const g = i.value.getBoundingClientRect(), p = window.innerHeight, y = h.value.length * 40 + 16, M = p - g.bottom, T = g.top;
1347
+ n.value = M < y && T > y, n.value ? f.value = {
1348
+ top: g.top,
1349
+ left: g.left
1350
+ } : f.value = {
1351
+ top: g.bottom,
1352
+ left: g.left
1353
1353
  };
1354
1354
  };
1355
- ot(d, () => {
1356
- n.value = !1;
1355
+ ot(u, () => {
1356
+ d.value = !1;
1357
1357
  });
1358
- const v = (h) => {
1359
- n.value = !1;
1360
- const g = s.config.actions?.[h];
1361
- typeof g == "object" && g.handler && g.handler(s.rowIndex, s.store) === !1 || i("action", h, s.rowIndex);
1358
+ const v = (g) => {
1359
+ d.value = !1;
1360
+ const p = s.config.actions?.[g];
1361
+ typeof p == "object" && p.handler && p.handler(s.rowIndex, s.store) === !1 || a("action", g, s.rowIndex);
1362
1362
  };
1363
- return (h, g) => (y(), C("td", {
1363
+ return (g, p) => (x(), C("td", {
1364
1364
  ref: "actionsCell",
1365
- class: oe(["atable-row-actions", { "sticky-column": e.position === "before-index", "dropdown-active": n.value }])
1365
+ class: oe(["atable-row-actions", { "sticky-column": e.position === "before-index", "dropdown-active": d.value }])
1366
1366
  }, [
1367
- E.value ? (y(), C("div", to, [
1367
+ E.value ? (x(), C("div", to, [
1368
1368
  W("button", {
1369
1369
  ref: "toggleButton",
1370
1370
  type: "button",
1371
1371
  class: "row-actions-toggle",
1372
- "aria-expanded": n.value,
1372
+ "aria-expanded": d.value,
1373
1373
  "aria-haspopup": "true",
1374
- onClick: Se(x, ["stop"])
1375
- }, [...g[0] || (g[0] = [
1374
+ onClick: Se(Z, ["stop"])
1375
+ }, [...p[0] || (p[0] = [
1376
1376
  W("span", { class: "dropdown-icon" }, "⋮", -1)
1377
1377
  ])], 8, no),
1378
1378
  de(W("div", {
1379
- class: oe(["row-actions-menu", { "menu-flipped": r.value }]),
1380
- style: me(V.value),
1379
+ class: oe(["row-actions-menu", { "menu-flipped": n.value }]),
1380
+ style: me(O.value),
1381
1381
  role: "menu"
1382
1382
  }, [
1383
- (y(!0), C(he, null, ye(w.value, ($) => (y(), C("button", {
1384
- key: $.type,
1383
+ (x(!0), C(he, null, ye(h.value, (y) => (x(), C("button", {
1384
+ key: y.type,
1385
1385
  type: "button",
1386
1386
  class: "row-action-menu-item",
1387
1387
  role: "menuitem",
1388
- onClick: Se((I) => v($.type), ["stop"])
1388
+ onClick: Se((M) => v(y.type), ["stop"])
1389
1389
  }, [
1390
1390
  W("span", {
1391
1391
  class: "action-icon",
1392
- innerHTML: $.icon
1392
+ innerHTML: y.icon
1393
1393
  }, null, 8, lo),
1394
- W("span", ao, xe($.label), 1)
1394
+ W("span", ao, xe(y.label), 1)
1395
1395
  ], 8, oo))), 128))
1396
1396
  ], 6), [
1397
- [it, n.value]
1397
+ [it, d.value]
1398
1398
  ])
1399
- ])) : (y(), C("div", so, [
1400
- (y(!0), C(he, null, ye(w.value, ($) => (y(), C("button", {
1401
- key: $.type,
1399
+ ])) : (x(), C("div", so, [
1400
+ (x(!0), C(he, null, ye(h.value, (y) => (x(), C("button", {
1401
+ key: y.type,
1402
1402
  type: "button",
1403
1403
  class: "row-action-btn",
1404
- title: $.label,
1405
- "aria-label": $.label,
1406
- onClick: Se((I) => v($.type), ["stop"])
1404
+ title: y.label,
1405
+ "aria-label": y.label,
1406
+ onClick: Se((M) => v(y.type), ["stop"])
1407
1407
  }, [
1408
1408
  W("span", {
1409
1409
  class: "action-icon",
1410
- innerHTML: $.icon
1410
+ innerHTML: y.icon
1411
1411
  }, null, 8, ro)
1412
1412
  ], 8, io))), 128))
1413
1413
  ]))
@@ -1423,93 +1423,93 @@ const An = (e) => {
1423
1423
  },
1424
1424
  emits: ["row:action"],
1425
1425
  setup(e, { emit: t }) {
1426
- const s = t, i = re("rowEl"), d = T(() => e.store.isRowVisible(e.rowIndex)), l = T(() => e.store.getRowExpandSymbol(e.rowIndex)), o = T(() => e.store.config.rowActions || { enabled: !1 }), n = T(() => o.value.enabled), r = T(() => o.value.position || "before-index"), c = (f, w) => {
1427
- s("row:action", f, w);
1426
+ const s = t, a = re("rowEl"), u = A(() => e.store.isRowVisible(e.rowIndex)), i = A(() => e.store.getRowExpandSymbol(e.rowIndex)), o = A(() => e.store.config.rowActions || { enabled: !1 }), d = A(() => o.value.enabled), n = A(() => o.value.position || "before-index"), f = (r, h) => {
1427
+ s("row:action", r, h);
1428
1428
  };
1429
1429
  if (e.addNavigation) {
1430
- let f = Qe;
1431
- typeof e.addNavigation == "object" && (f = {
1432
- ...f,
1430
+ let r = Qe;
1431
+ typeof e.addNavigation == "object" && (r = {
1432
+ ...r,
1433
1433
  ...e.addNavigation
1434
1434
  }), ft([
1435
1435
  {
1436
- selectors: i,
1437
- handlers: f
1436
+ selectors: a,
1437
+ handlers: r
1438
1438
  }
1439
1439
  ]);
1440
1440
  }
1441
- return (f, w) => de((y(), C("tr", {
1441
+ return (r, h) => de((x(), C("tr", {
1442
1442
  ref: "rowEl",
1443
1443
  tabindex: e.tabIndex,
1444
1444
  class: "atable-row"
1445
1445
  }, [
1446
- n.value && r.value === "before-index" ? (y(), ve(qe, {
1446
+ d.value && n.value === "before-index" ? (x(), ve(Je, {
1447
1447
  key: 0,
1448
1448
  "row-index": e.rowIndex,
1449
1449
  store: e.store,
1450
1450
  config: o.value,
1451
- position: r.value,
1452
- onAction: c
1451
+ position: n.value,
1452
+ onAction: f
1453
1453
  }, null, 8, ["row-index", "store", "config", "position"])) : K("", !0),
1454
- e.store.config.view !== "uncounted" ? fe(f.$slots, "index", { key: 1 }, () => [
1455
- e.store.config.view === "list" ? (y(), C("td", {
1454
+ e.store.config.view !== "uncounted" ? fe(r.$slots, "index", { key: 1 }, () => [
1455
+ e.store.config.view === "list" ? (x(), C("td", {
1456
1456
  key: 0,
1457
1457
  tabIndex: -1,
1458
1458
  class: oe(["list-index", e.store.hasPinnedColumns ? "sticky-index" : ""])
1459
- }, xe(e.rowIndex + 1), 3)) : e.store.isTreeView ? (y(), C("td", {
1459
+ }, xe(e.rowIndex + 1), 3)) : e.store.isTreeView ? (x(), C("td", {
1460
1460
  key: 1,
1461
1461
  tabIndex: -1,
1462
1462
  class: oe(["tree-index", e.store.hasPinnedColumns ? "sticky-index" : ""]),
1463
- onClick: w[0] || (w[0] = (E) => e.store.toggleRowExpand(e.rowIndex))
1464
- }, xe(l.value), 3)) : K("", !0)
1463
+ onClick: h[0] || (h[0] = (E) => e.store.toggleRowExpand(e.rowIndex))
1464
+ }, xe(i.value), 3)) : K("", !0)
1465
1465
  ], !0) : K("", !0),
1466
- n.value && r.value === "after-index" ? (y(), ve(qe, {
1466
+ d.value && n.value === "after-index" ? (x(), ve(Je, {
1467
1467
  key: 2,
1468
1468
  "row-index": e.rowIndex,
1469
1469
  store: e.store,
1470
1470
  config: o.value,
1471
- position: r.value,
1472
- onAction: c
1471
+ position: n.value,
1472
+ onAction: f
1473
1473
  }, null, 8, ["row-index", "store", "config", "position"])) : K("", !0),
1474
- fe(f.$slots, "default", {}, void 0, !0),
1475
- n.value && r.value === "end" ? (y(), ve(qe, {
1474
+ fe(r.$slots, "default", {}, void 0, !0),
1475
+ d.value && n.value === "end" ? (x(), ve(Je, {
1476
1476
  key: 3,
1477
1477
  "row-index": e.rowIndex,
1478
1478
  store: e.store,
1479
1479
  config: o.value,
1480
- position: r.value,
1481
- onAction: c
1480
+ position: n.value,
1481
+ onAction: f
1482
1482
  }, null, 8, ["row-index", "store", "config", "position"])) : K("", !0)
1483
1483
  ], 8, co)), [
1484
- [it, d.value]
1484
+ [it, u.value]
1485
1485
  ]);
1486
1486
  }
1487
1487
  }), Lt = /* @__PURE__ */ $e(uo, [["__scopeId", "data-v-e7ca13d1"]]), nt = /* @__PURE__ */ new WeakMap(), fo = {
1488
1488
  mounted(e, t) {
1489
1489
  const s = !t.modifiers.bubble;
1490
- let i;
1491
- if (typeof t.value == "function") i = ot(e, t.value, { capture: s });
1490
+ let a;
1491
+ if (typeof t.value == "function") a = ot(e, t.value, { capture: s });
1492
1492
  else {
1493
- const [d, l] = t.value;
1494
- i = ot(e, d, Object.assign({ capture: s }, l));
1493
+ const [u, i] = t.value;
1494
+ a = ot(e, u, Object.assign({ capture: s }, i));
1495
1495
  }
1496
- nt.set(e, i);
1496
+ nt.set(e, a);
1497
1497
  },
1498
1498
  unmounted(e) {
1499
1499
  const t = nt.get(e);
1500
1500
  t && typeof t == "function" ? t() : t?.stop(), nt.delete(e);
1501
1501
  }
1502
1502
  }, vo = { mounted(e, t) {
1503
- typeof t.value == "function" ? Je(e, t.value) : Je(e, ...t.value);
1503
+ typeof t.value == "function" ? qe(e, t.value) : qe(e, ...t.value);
1504
1504
  } };
1505
1505
  function ho() {
1506
1506
  let e = !1;
1507
1507
  const t = ie(!1);
1508
- return (s, i) => {
1509
- if (t.value = i.value, e) return;
1508
+ return (s, a) => {
1509
+ if (t.value = a.value, e) return;
1510
1510
  e = !0;
1511
- const d = Sn(s, i.value);
1512
- ce(t, (l) => d.value = l);
1511
+ const u = Sn(s, a.value);
1512
+ ce(t, (i) => u.value = i);
1513
1513
  };
1514
1514
  }
1515
1515
  ho();
@@ -1531,24 +1531,24 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1531
1531
  },
1532
1532
  emits: ["connection:delete"],
1533
1533
  setup(e, { emit: t }) {
1534
- const s = t, i = T(() => e.store.connectionPaths.filter((o) => {
1535
- const n = e.store.ganttBars.find((c) => c.id === o.from.barId), r = e.store.ganttBars.find((c) => c.id === o.to.barId);
1536
- return n && r;
1537
- })), d = (o) => {
1538
- const n = e.store.connectionHandles.find(
1539
- (L) => L.barId === o.from.barId && L.side === o.from.side
1540
- ), r = e.store.connectionHandles.find(
1541
- (L) => L.barId === o.to.barId && L.side === o.to.side
1534
+ const s = t, a = A(() => e.store.connectionPaths.filter((o) => {
1535
+ const d = e.store.ganttBars.find((f) => f.id === o.from.barId), n = e.store.ganttBars.find((f) => f.id === o.to.barId);
1536
+ return d && n;
1537
+ })), u = (o) => {
1538
+ const d = e.store.connectionHandles.find(
1539
+ (H) => H.barId === o.from.barId && H.side === o.from.side
1540
+ ), n = e.store.connectionHandles.find(
1541
+ (H) => H.barId === o.to.barId && H.side === o.to.side
1542
1542
  );
1543
- if (!n || !r) return "";
1544
- const c = n.position.x + Ye / 2, f = n.position.y + Ye / 2, w = r.position.x + Ye / 2, E = r.position.y + Ye / 2, V = Math.abs(w - c), x = Math.max(V * xo, 50), p = c + (o.from.side === "left" ? -x : x), v = w + (o.to.side === "left" ? -x : x), h = { x: 0.5 * c + 0.5 * p, y: 0.5 * f + 0.5 * f }, g = { x: 0.5 * p + 0.5 * v, y: 0.5 * f + 0.5 * E }, $ = { x: 0.5 * v + 0.5 * w, y: 0.5 * E + 0.5 * E }, I = { x: 0.5 * h.x + 0.5 * g.x, y: 0.5 * h.y + 0.5 * g.y }, H = { x: 0.5 * g.x + 0.5 * $.x, y: 0.5 * g.y + 0.5 * $.y }, A = { x: 0.5 * I.x + 0.5 * H.x, y: 0.5 * I.y + 0.5 * H.y };
1545
- return `M ${c} ${f} Q ${p} ${f}, ${A.x} ${A.y} Q ${v} ${E}, ${w} ${E}`;
1546
- }, l = (o) => {
1543
+ if (!d || !n) return "";
1544
+ const f = d.position.x + Ye / 2, r = d.position.y + Ye / 2, h = n.position.x + Ye / 2, E = n.position.y + Ye / 2, O = Math.abs(h - f), Z = Math.max(O * xo, 50), w = f + (o.from.side === "left" ? -Z : Z), v = h + (o.to.side === "left" ? -Z : Z), g = { x: 0.5 * f + 0.5 * w, y: 0.5 * r + 0.5 * r }, p = { x: 0.5 * w + 0.5 * v, y: 0.5 * r + 0.5 * E }, y = { x: 0.5 * v + 0.5 * h, y: 0.5 * E + 0.5 * E }, M = { x: 0.5 * g.x + 0.5 * p.x, y: 0.5 * g.y + 0.5 * p.y }, T = { x: 0.5 * p.x + 0.5 * y.x, y: 0.5 * p.y + 0.5 * y.y }, R = { x: 0.5 * M.x + 0.5 * T.x, y: 0.5 * M.y + 0.5 * T.y };
1545
+ return `M ${f} ${r} Q ${w} ${r}, ${R.x} ${R.y} Q ${v} ${E}, ${h} ${E}`;
1546
+ }, i = (o) => {
1547
1547
  e.store.deleteConnection(o.id) && s("connection:delete", o);
1548
1548
  };
1549
- return (o, n) => (y(), C("div", go, [
1550
- (y(), C("svg", mo, [
1551
- n[0] || (n[0] = W("defs", null, [
1549
+ return (o, d) => (x(), C("div", go, [
1550
+ (x(), C("svg", mo, [
1551
+ d[0] || (d[0] = W("defs", null, [
1552
1552
  W("path", {
1553
1553
  id: "arrowhead",
1554
1554
  d: "M 0 -7 L 20 0 L 0 7Z",
@@ -1571,25 +1571,25 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1571
1571
  })
1572
1572
  ])
1573
1573
  ], -1)),
1574
- (y(!0), C(he, null, ye(i.value, (r) => (y(), C("path", {
1575
- key: `${r.id}-hitbox`,
1576
- d: d(r),
1574
+ (x(!0), C(he, null, ye(a.value, (n) => (x(), C("path", {
1575
+ key: `${n.id}-hitbox`,
1576
+ d: u(n),
1577
1577
  stroke: "transparent",
1578
- "stroke-width": (r.style?.width || 2) + 10,
1578
+ "stroke-width": (n.style?.width || 2) + 10,
1579
1579
  fill: "none",
1580
1580
  class: "connection-hitbox",
1581
- onDblclick: (c) => l(r)
1581
+ onDblclick: (f) => i(n)
1582
1582
  }, null, 40, wo))), 128)),
1583
- (y(!0), C(he, null, ye(i.value, (r) => (y(), C("path", {
1584
- id: r.id,
1585
- key: r.id,
1586
- d: d(r),
1587
- stroke: r.style?.color || "#666",
1588
- "stroke-width": r.style?.width || 2,
1583
+ (x(!0), C(he, null, ye(a.value, (n) => (x(), C("path", {
1584
+ id: n.id,
1585
+ key: n.id,
1586
+ d: u(n),
1587
+ stroke: n.style?.color || "#666",
1588
+ "stroke-width": n.style?.width || 2,
1589
1589
  fill: "none",
1590
1590
  "marker-mid": "url(#arrowhead-marker)",
1591
1591
  class: "connection-path animated-path",
1592
- onDblclick: (c) => l(r)
1592
+ onDblclick: (f) => i(n)
1593
1593
  }, null, 40, po))), 128))
1594
1594
  ]))
1595
1595
  ]));
@@ -1611,20 +1611,40 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1611
1611
  const t = z(""), s = Gt({
1612
1612
  startValue: "",
1613
1613
  endValue: ""
1614
- }), i = (r) => {
1615
- if (r.filterOptions) return r.filterOptions;
1616
- const c = /* @__PURE__ */ new Set();
1617
- return e.store.rows.forEach((f) => {
1618
- const w = f[r.name];
1619
- w != null && w !== "" && c.add(w);
1620
- }), Array.from(c).map((f) => ({
1621
- value: f,
1622
- label: String(f)
1614
+ }), a = A(() => {
1615
+ if (e.column.filterType) return e.column.filterType;
1616
+ switch (e.column.fieldtype) {
1617
+ case "Check":
1618
+ return "checkbox";
1619
+ case "Date":
1620
+ return "date";
1621
+ case "Datetime":
1622
+ return "dateRange";
1623
+ case "Select":
1624
+ return "select";
1625
+ case "Int":
1626
+ case "Float":
1627
+ case "Currency":
1628
+ case "Decimal":
1629
+ case "Quantity":
1630
+ return "number";
1631
+ default:
1632
+ return "text";
1633
+ }
1634
+ }), u = (f) => {
1635
+ if (f.filterOptions) return f.filterOptions;
1636
+ const r = /* @__PURE__ */ new Set();
1637
+ return e.store.rows.forEach((h) => {
1638
+ const E = h[f.name];
1639
+ E != null && E !== "" && r.add(E);
1640
+ }), Array.from(r).map((h) => ({
1641
+ value: h,
1642
+ label: String(h)
1623
1643
  }));
1624
- }, d = T(() => !!(t.value || s.startValue || s.endValue)), l = (r) => {
1625
- !r && e.column.filterType !== "checkbox" ? (e.store.clearFilter(e.colIndex), t.value = "") : (t.value = r, e.store.setFilter(e.colIndex, { value: r }));
1626
- }, o = (r, c) => {
1627
- r === "start" ? s.startValue = c : s.endValue = c, !s.startValue && !s.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
1644
+ }, i = A(() => !!(t.value || s.startValue || s.endValue)), o = (f) => {
1645
+ !f && a.value !== "checkbox" ? (e.store.clearFilter(e.colIndex), t.value = "") : (t.value = f, e.store.setFilter(e.colIndex, { value: f }));
1646
+ }, d = (f, r) => {
1647
+ f === "start" ? s.startValue = r : s.endValue = r, !s.startValue && !s.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
1628
1648
  value: null,
1629
1649
  startValue: s.startValue,
1630
1650
  endValue: s.endValue
@@ -1632,81 +1652,81 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1632
1652
  }, n = () => {
1633
1653
  t.value = "", s.startValue = "", s.endValue = "", e.store.clearFilter(e.colIndex);
1634
1654
  };
1635
- return (r, c) => (y(), C("div", Co, [
1636
- (e.column.filterType || "text") === "text" ? de((y(), C("input", {
1655
+ return (f, r) => (x(), C("div", Co, [
1656
+ a.value === "text" ? de((x(), C("input", {
1637
1657
  key: 0,
1638
- "onUpdate:modelValue": c[0] || (c[0] = (f) => t.value = f),
1658
+ "onUpdate:modelValue": r[0] || (r[0] = (h) => t.value = h),
1639
1659
  type: "text",
1640
1660
  class: "filter-input",
1641
- onInput: c[1] || (c[1] = (f) => l(t.value))
1661
+ onInput: r[1] || (r[1] = (h) => o(t.value))
1642
1662
  }, null, 544)), [
1643
1663
  [Ne, t.value]
1644
- ]) : e.column.filterType === "number" ? de((y(), C("input", {
1664
+ ]) : a.value === "number" ? de((x(), C("input", {
1645
1665
  key: 1,
1646
- "onUpdate:modelValue": c[2] || (c[2] = (f) => t.value = f),
1666
+ "onUpdate:modelValue": r[2] || (r[2] = (h) => t.value = h),
1647
1667
  type: "number",
1648
1668
  class: "filter-input",
1649
- onInput: c[3] || (c[3] = (f) => l(t.value))
1669
+ onInput: r[3] || (r[3] = (h) => o(t.value))
1650
1670
  }, null, 544)), [
1651
1671
  [Ne, t.value]
1652
- ]) : e.column.filterType === "checkbox" ? (y(), C("label", ko, [
1672
+ ]) : a.value === "checkbox" ? (x(), C("label", ko, [
1653
1673
  de(W("input", {
1654
- "onUpdate:modelValue": c[4] || (c[4] = (f) => t.value = f),
1674
+ "onUpdate:modelValue": r[4] || (r[4] = (h) => t.value = h),
1655
1675
  type: "checkbox",
1656
1676
  class: "filter-checkbox",
1657
- onChange: c[5] || (c[5] = (f) => l(t.value))
1677
+ onChange: r[5] || (r[5] = (h) => o(t.value))
1658
1678
  }, null, 544), [
1659
1679
  [Yt, t.value]
1660
1680
  ]),
1661
1681
  W("span", null, xe(e.column.label), 1)
1662
- ])) : e.column.filterType === "select" ? de((y(), C("select", {
1682
+ ])) : a.value === "select" ? de((x(), C("select", {
1663
1683
  key: 3,
1664
- "onUpdate:modelValue": c[6] || (c[6] = (f) => t.value = f),
1684
+ "onUpdate:modelValue": r[6] || (r[6] = (h) => t.value = h),
1665
1685
  class: "filter-select",
1666
- onChange: c[7] || (c[7] = (f) => l(t.value))
1686
+ onChange: r[7] || (r[7] = (h) => o(t.value))
1667
1687
  }, [
1668
- c[15] || (c[15] = W("option", { value: "" }, "All", -1)),
1669
- (y(!0), C(he, null, ye(i(e.column), (f) => (y(), C("option", {
1670
- key: f.value || f,
1671
- value: f.value || f
1672
- }, xe(f.label || f), 9, Mo))), 128))
1688
+ r[15] || (r[15] = W("option", { value: "" }, "All", -1)),
1689
+ (x(!0), C(he, null, ye(u(e.column), (h) => (x(), C("option", {
1690
+ key: h.value || h,
1691
+ value: h.value || h
1692
+ }, xe(h.label || h), 9, Mo))), 128))
1673
1693
  ], 544)), [
1674
1694
  [Ut, t.value]
1675
- ]) : e.column.filterType === "date" ? de((y(), C("input", {
1695
+ ]) : a.value === "date" ? de((x(), C("input", {
1676
1696
  key: 4,
1677
- "onUpdate:modelValue": c[8] || (c[8] = (f) => t.value = f),
1697
+ "onUpdate:modelValue": r[8] || (r[8] = (h) => t.value = h),
1678
1698
  type: "date",
1679
1699
  class: "filter-input",
1680
- onChange: c[9] || (c[9] = (f) => l(t.value))
1700
+ onChange: r[9] || (r[9] = (h) => o(t.value))
1681
1701
  }, null, 544)), [
1682
1702
  [Ne, t.value]
1683
- ]) : e.column.filterType === "dateRange" ? (y(), C("div", Ro, [
1703
+ ]) : a.value === "dateRange" ? (x(), C("div", Ro, [
1684
1704
  de(W("input", {
1685
- "onUpdate:modelValue": c[10] || (c[10] = (f) => s.startValue = f),
1705
+ "onUpdate:modelValue": r[10] || (r[10] = (h) => s.startValue = h),
1686
1706
  type: "date",
1687
1707
  class: "filter-input",
1688
- onChange: c[11] || (c[11] = (f) => o("start", s.startValue))
1708
+ onChange: r[11] || (r[11] = (h) => d("start", s.startValue))
1689
1709
  }, null, 544), [
1690
1710
  [Ne, s.startValue]
1691
1711
  ]),
1692
- c[16] || (c[16] = W("span", { class: "date-separator" }, "-", -1)),
1712
+ r[16] || (r[16] = W("span", { class: "date-separator" }, "-", -1)),
1693
1713
  de(W("input", {
1694
- "onUpdate:modelValue": c[12] || (c[12] = (f) => s.endValue = f),
1714
+ "onUpdate:modelValue": r[12] || (r[12] = (h) => s.endValue = h),
1695
1715
  type: "date",
1696
1716
  class: "filter-input",
1697
- onChange: c[13] || (c[13] = (f) => o("end", s.endValue))
1717
+ onChange: r[13] || (r[13] = (h) => d("end", s.endValue))
1698
1718
  }, null, 544), [
1699
1719
  [Ne, s.endValue]
1700
1720
  ])
1701
- ])) : e.column.filterType === "component" && e.column.filterComponent ? (y(), ve(We(e.column.filterComponent), {
1721
+ ])) : a.value === "component" && e.column.filterComponent ? (x(), ve(We(e.column.filterComponent), {
1702
1722
  key: 6,
1703
1723
  value: t.value,
1704
1724
  column: e.column,
1705
1725
  "col-index": e.colIndex,
1706
1726
  store: e.store,
1707
- "onUpdate:value": c[14] || (c[14] = (f) => l(f))
1727
+ "onUpdate:value": r[14] || (r[14] = (h) => o(h))
1708
1728
  }, null, 40, ["value", "column", "col-index", "store"])) : K("", !0),
1709
- d.value ? (y(), C("button", {
1729
+ i.value ? (x(), C("button", {
1710
1730
  key: 7,
1711
1731
  class: "clear-btn",
1712
1732
  title: "Clear",
@@ -1714,7 +1734,7 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1714
1734
  }, "×")) : K("", !0)
1715
1735
  ]));
1716
1736
  }
1717
- }), Io = /* @__PURE__ */ $e($o, [["__scopeId", "data-v-a809a3bf"]]), Eo = { key: 0 }, So = {
1737
+ }), Io = /* @__PURE__ */ $e($o, [["__scopeId", "data-v-f56c7674"]]), Eo = { key: 0 }, So = {
1718
1738
  class: "atable-header-row",
1719
1739
  tabindex: "-1"
1720
1740
  }, Ao = {
@@ -1739,20 +1759,20 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1739
1759
  store: {}
1740
1760
  },
1741
1761
  setup(e) {
1742
- const t = T(() => e.columns.filter((o) => o.filterable)), s = T(() => e.store.config.rowActions?.enabled ?? !1), i = T(() => e.store.config.rowActions?.position ?? "before-index"), d = (o) => e.store.sortByColumn(o), l = (o) => {
1743
- for (const n of o) {
1744
- if (n.borderBoxSize.length === 0) continue;
1745
- const c = n.borderBoxSize[0].inlineSize, f = Number(n.target.dataset.colindex), w = e.store.columns[f]?.width;
1746
- typeof w == "number" && w !== c && e.store.resizeColumn(f, c);
1762
+ const t = A(() => e.columns.filter((o) => o.filterable)), s = A(() => e.store.config.rowActions?.enabled ?? !1), a = A(() => e.store.config.rowActions?.position ?? "before-index"), u = (o) => e.store.sortByColumn(o), i = (o) => {
1763
+ for (const d of o) {
1764
+ if (d.borderBoxSize.length === 0) continue;
1765
+ const f = d.borderBoxSize[0].inlineSize, r = Number(d.target.dataset.colindex), h = e.store.columns[r]?.width;
1766
+ typeof h == "number" && h !== f && e.store.resizeColumn(r, f);
1747
1767
  }
1748
1768
  };
1749
- return (o, n) => e.columns.length ? (y(), C("thead", Eo, [
1769
+ return (o, d) => e.columns.length ? (x(), C("thead", Eo, [
1750
1770
  W("tr", So, [
1751
- s.value && i.value === "before-index" ? (y(), C("th", {
1771
+ s.value && a.value === "before-index" ? (x(), C("th", {
1752
1772
  key: 0,
1753
- class: oe(["row-actions-header", { "sticky-column": i.value === "before-index" }])
1773
+ class: oe(["row-actions-header", { "sticky-column": a.value === "before-index" }])
1754
1774
  }, null, 2)) : K("", !0),
1755
- e.store.zeroColumn ? (y(), C("th", {
1775
+ e.store.zeroColumn ? (x(), C("th", {
1756
1776
  key: 1,
1757
1777
  id: "header-index",
1758
1778
  class: oe([[
@@ -1761,29 +1781,29 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1761
1781
  e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1762
1782
  ], "list-index"])
1763
1783
  }, null, 2)) : K("", !0),
1764
- s.value && i.value === "after-index" ? (y(), C("th", Ao)) : K("", !0),
1765
- (y(!0), C(he, null, ye(e.columns, (r, c) => de((y(), C("th", {
1766
- key: r.name,
1767
- "data-colindex": c,
1784
+ s.value && a.value === "after-index" ? (x(), C("th", Ao)) : K("", !0),
1785
+ (x(!0), C(he, null, ye(e.columns, (n, f) => de((x(), C("th", {
1786
+ key: n.name,
1787
+ "data-colindex": f,
1768
1788
  tabindex: "-1",
1769
- style: me(e.store.getHeaderCellStyle(r)),
1770
- class: oe(`${r.pinned ? "sticky-column" : ""} ${r.sortable === !1 ? "" : "cursor-pointer"}`),
1771
- onClick: (f) => r.sortable !== !1 ? d(c) : void 0
1789
+ style: me(e.store.getHeaderCellStyle(n)),
1790
+ class: oe(`${n.pinned ? "sticky-column" : ""} ${n.sortable === !1 ? "" : "cursor-pointer"}`),
1791
+ onClick: (r) => n.sortable !== !1 ? u(f) : void 0
1772
1792
  }, [
1773
1793
  fe(o.$slots, "default", {}, () => [
1774
- jt(xe(r.label || String.fromCharCode(c + 97).toUpperCase()), 1)
1794
+ jt(xe(n.label || String.fromCharCode(f + 97).toUpperCase()), 1)
1775
1795
  ])
1776
1796
  ], 14, To)), [
1777
- [Z(vo), l]
1797
+ [P(vo), i]
1778
1798
  ])), 128)),
1779
- s.value && i.value === "end" ? (y(), C("th", Do)) : K("", !0)
1799
+ s.value && a.value === "end" ? (x(), C("th", Do)) : K("", !0)
1780
1800
  ]),
1781
- t.value.length > 0 ? (y(), C("tr", Ho, [
1782
- s.value && i.value === "before-index" ? (y(), C("th", {
1801
+ t.value.length > 0 ? (x(), C("tr", Ho, [
1802
+ s.value && a.value === "before-index" ? (x(), C("th", {
1783
1803
  key: 0,
1784
- class: oe(["row-actions-header", { "sticky-column": i.value === "before-index" }])
1804
+ class: oe(["row-actions-header", { "sticky-column": a.value === "before-index" }])
1785
1805
  }, null, 2)) : K("", !0),
1786
- e.store.zeroColumn ? (y(), C("th", {
1806
+ e.store.zeroColumn ? (x(), C("th", {
1787
1807
  key: 1,
1788
1808
  class: oe([[
1789
1809
  e.store.hasPinnedColumns ? "sticky-index" : "",
@@ -1791,20 +1811,20 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1791
1811
  e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1792
1812
  ], "list-index"])
1793
1813
  }, null, 2)) : K("", !0),
1794
- s.value && i.value === "after-index" ? (y(), C("th", Lo)) : K("", !0),
1795
- (y(!0), C(he, null, ye(e.columns, (r, c) => (y(), C("th", {
1796
- key: `filter-${r.name}`,
1797
- class: oe(`${r.pinned ? "sticky-column" : ""}`),
1798
- style: me(e.store.getHeaderCellStyle(r))
1814
+ s.value && a.value === "after-index" ? (x(), C("th", Lo)) : K("", !0),
1815
+ (x(!0), C(he, null, ye(e.columns, (n, f) => (x(), C("th", {
1816
+ key: `filter-${n.name}`,
1817
+ class: oe(`${n.pinned ? "sticky-column" : ""}`),
1818
+ style: me(e.store.getHeaderCellStyle(n))
1799
1819
  }, [
1800
- r.filterable ? (y(), ve(Io, {
1820
+ n.filterable ? (x(), ve(Io, {
1801
1821
  key: 0,
1802
- column: r,
1803
- "col-index": c,
1822
+ column: n,
1823
+ "col-index": f,
1804
1824
  store: e.store
1805
1825
  }, null, 8, ["column", "col-index", "store"])) : K("", !0)
1806
1826
  ], 6))), 128)),
1807
- s.value && i.value === "end" ? (y(), C("th", Oo)) : K("", !0)
1827
+ s.value && a.value === "end" ? (x(), C("th", Oo)) : K("", !0)
1808
1828
  ])) : K("", !0)
1809
1829
  ])) : K("", !0);
1810
1830
  }
@@ -1814,56 +1834,56 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1814
1834
  store: {}
1815
1835
  },
1816
1836
  setup(e) {
1817
- const t = re("amodal"), { width: s, height: i } = Ie(t), d = T(() => {
1837
+ const t = re("amodal"), { width: s, height: a } = Ie(t), u = A(() => {
1818
1838
  if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return;
1819
- const l = e.store.modal.cell?.closest("table");
1820
- if (!l) return {};
1821
- const o = l.offsetHeight || 0, n = l.offsetWidth || 0;
1822
- let r = e.store.modal.cell?.offsetTop || 0;
1823
- const c = l.querySelector("thead")?.offsetHeight || 0;
1824
- r += c, r = r + i.value < o ? r : r - (i.value + e.store.modal.height);
1825
- let f = e.store.modal.cell?.offsetLeft || 0;
1826
- return f = f + s.value <= n ? f : f - (s.value - e.store.modal.width), {
1827
- left: `${f}px`,
1828
- top: `${r}px`
1839
+ const i = e.store.modal.cell?.closest("table");
1840
+ if (!i) return {};
1841
+ const o = i.offsetHeight || 0, d = i.offsetWidth || 0;
1842
+ let n = e.store.modal.cell?.offsetTop || 0;
1843
+ const f = i.querySelector("thead")?.offsetHeight || 0;
1844
+ n += f, n = n + a.value < o ? n : n - (a.value + e.store.modal.height);
1845
+ let r = e.store.modal.cell?.offsetLeft || 0;
1846
+ return r = r + s.value <= d ? r : r - (s.value - e.store.modal.width), {
1847
+ left: `${r}px`,
1848
+ top: `${n}px`
1829
1849
  };
1830
1850
  });
1831
- return (l, o) => (y(), C("div", {
1851
+ return (i, o) => (x(), C("div", {
1832
1852
  ref: "amodal",
1833
1853
  class: "amodal",
1834
1854
  tabindex: "-1",
1835
- style: me(d.value),
1855
+ style: me(u.value),
1836
1856
  onClick: o[0] || (o[0] = Se(() => {
1837
1857
  }, ["stop"])),
1838
1858
  onInput: o[1] || (o[1] = Se(() => {
1839
1859
  }, ["stop"]))
1840
1860
  }, [
1841
- fe(l.$slots, "default")
1861
+ fe(i.$slots, "default")
1842
1862
  ], 36));
1843
1863
  }
1844
1864
  }), Vo = (e) => {
1845
1865
  const t = e.id || Tn();
1846
- return qt(`table-${t}`, () => {
1847
- const i = () => {
1848
- const a = [Object.assign({}, { rowModified: !1 })], u = /* @__PURE__ */ new Set();
1849
- for (let b = 0; b < l.value.length; b++) {
1850
- const M = l.value[b];
1851
- M.parent !== null && M.parent !== void 0 && u.add(M.parent);
1866
+ return Jt(`table-${t}`, () => {
1867
+ const a = () => {
1868
+ const l = [Object.assign({}, { rowModified: !1 })], c = /* @__PURE__ */ new Set();
1869
+ for (let b = 0; b < i.value.length; b++) {
1870
+ const I = i.value[b];
1871
+ I.parent !== null && I.parent !== void 0 && c.add(I.parent);
1852
1872
  }
1853
- const m = (b) => l.value[b]?.gantt !== void 0, R = (b) => {
1854
- for (let M = 0; M < l.value.length; M++)
1855
- if (l.value[M].parent === b && (m(M) || R(M)))
1873
+ const m = (b) => i.value[b]?.gantt !== void 0, $ = (b) => {
1874
+ for (let I = 0; I < i.value.length; I++)
1875
+ if (i.value[I].parent === b && (m(I) || $(I)))
1856
1876
  return !0;
1857
1877
  return !1;
1858
- }, P = (b) => {
1859
- const M = o.value, N = M.view === "tree" || M.view === "tree-gantt" ? M.defaultTreeExpansion : void 0;
1878
+ }, B = (b) => {
1879
+ const I = o.value, N = I.view === "tree" || I.view === "tree-gantt" ? I.defaultTreeExpansion : void 0;
1860
1880
  if (!N) return !0;
1861
1881
  switch (N) {
1862
1882
  case "root":
1863
1883
  return !1;
1864
1884
  // Only root nodes are visible, all children start collapsed
1865
1885
  case "branch":
1866
- return R(b);
1886
+ return $(b);
1867
1887
  case "leaf":
1868
1888
  return !0;
1869
1889
  // All nodes should be expanded
@@ -1871,284 +1891,295 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1871
1891
  return !0;
1872
1892
  }
1873
1893
  };
1874
- for (let b = 0; b < l.value.length; b++) {
1875
- const M = l.value[b], N = M.parent === null || M.parent === void 0, ee = u.has(b);
1876
- a[b] = {
1877
- childrenOpen: P(b),
1894
+ for (let b = 0; b < i.value.length; b++) {
1895
+ const I = i.value[b], N = I.parent === null || I.parent === void 0, ee = c.has(b);
1896
+ l[b] = {
1897
+ childrenOpen: B(b),
1878
1898
  expanded: !1,
1879
- indent: M.indent || 0,
1899
+ indent: I.indent || 0,
1880
1900
  isParent: ee,
1881
1901
  isRoot: N,
1882
1902
  rowModified: !1,
1883
1903
  open: N,
1884
1904
  // This will be recalculated later for non-root nodes
1885
- parent: M.parent
1905
+ parent: I.parent
1886
1906
  };
1887
1907
  }
1888
- return a;
1889
- }, d = z(e.columns), l = z(e.rows), o = z(e.config || {}), n = z({}), r = z({}), c = T(() => {
1890
- const a = {};
1891
- for (const [u, m] of d.value.entries())
1892
- for (const [R, P] of l.value.entries())
1893
- a[`${u}:${R}`] = P[m.name];
1894
- return a;
1895
- }), f = T({
1908
+ return l;
1909
+ }, u = z(e.columns), i = z(e.rows), o = z(e.config || {}), d = z({}), n = z({}), f = A(() => {
1910
+ const l = {};
1911
+ for (const [c, m] of u.value.entries())
1912
+ for (const [$, B] of i.value.entries())
1913
+ l[`${c}:${$}`] = B[m.name];
1914
+ return l;
1915
+ }), r = A({
1896
1916
  get: () => {
1897
- const a = i();
1898
- for (let u = 0; u < a.length; u++)
1899
- n.value[u] && (a[u].rowModified = n.value[u]), r.value[u] && (r.value[u].childrenOpen !== void 0 && (a[u].childrenOpen = r.value[u].childrenOpen), r.value[u].expanded !== void 0 && (a[u].expanded = r.value[u].expanded));
1900
- if (I.value) {
1901
- const u = (m, R) => {
1902
- const P = R[m];
1903
- if (P.isRoot || P.parent === null || P.parent === void 0)
1917
+ const l = a();
1918
+ for (let c = 0; c < l.length; c++)
1919
+ d.value[c] && (l[c].rowModified = d.value[c]), n.value[c] && (n.value[c].childrenOpen !== void 0 && (l[c].childrenOpen = n.value[c].childrenOpen), n.value[c].expanded !== void 0 && (l[c].expanded = n.value[c].expanded));
1920
+ if (M.value) {
1921
+ const c = (m, $) => {
1922
+ const B = $[m];
1923
+ if (B.isRoot || B.parent === null || B.parent === void 0)
1904
1924
  return !0;
1905
- const b = P.parent;
1906
- return b < 0 || b >= R.length ? !1 : (R[b].childrenOpen || !1) && u(b, R);
1925
+ const b = B.parent;
1926
+ return b < 0 || b >= $.length ? !1 : ($[b].childrenOpen || !1) && c(b, $);
1907
1927
  };
1908
- for (let m = 0; m < a.length; m++)
1909
- a[m].isRoot || (a[m].open = u(m, a));
1928
+ for (let m = 0; m < l.length; m++)
1929
+ l[m].isRoot || (l[m].open = c(m, l));
1910
1930
  }
1911
- return a;
1931
+ return l;
1912
1932
  },
1913
- set: (a) => {
1914
- JSON.stringify(a) !== JSON.stringify(f.value) && (f.value = a);
1933
+ set: (l) => {
1934
+ JSON.stringify(l) !== JSON.stringify(r.value) && (r.value = l);
1915
1935
  }
1916
- }), w = z(e.modal || { visible: !1 }), E = z({}), V = z([]), x = z([]), p = z([]), v = z({
1936
+ }), h = z(e.modal || { visible: !1 }), E = z({}), O = z([]), Z = z([]), w = z([]), v = z({
1917
1937
  column: null,
1918
1938
  direction: null
1919
- }), h = z({}), g = T(() => d.value.some((a) => a.pinned)), $ = T(() => o.value.view === "gantt" || o.value.view === "tree-gantt"), I = T(() => o.value.view === "tree" || o.value.view === "tree-gantt"), H = T(() => {
1920
- const a = o.value;
1921
- return a.view === "gantt" || a.view === "tree-gantt" ? a.dependencyGraph !== !1 : !0;
1922
- }), A = T(() => `${Math.ceil(l.value.length / 100 + 1)}ch`), L = T(
1939
+ }), g = z({}), p = A(() => u.value.some((l) => l.pinned)), y = A(() => o.value.view === "gantt" || o.value.view === "tree-gantt"), M = A(() => o.value.view === "tree" || o.value.view === "tree-gantt"), T = A(() => {
1940
+ const l = o.value;
1941
+ return l.view === "gantt" || l.view === "tree-gantt" ? l.dependencyGraph !== !1 : !0;
1942
+ }), R = A(() => `${Math.ceil(i.value.length / 100 + 1)}ch`), H = A(
1923
1943
  () => o.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(o.value.view) : !1
1924
- ), X = T(() => {
1925
- let a = l.value.map((u, m) => ({
1926
- ...u,
1944
+ ), X = A(() => {
1945
+ let l = i.value.map((c, m) => ({
1946
+ ...c,
1927
1947
  originalIndex: m
1928
1948
  }));
1929
- if (Object.entries(h.value).forEach(([u, m]) => {
1930
- const R = parseInt(u), P = d.value[R];
1931
- !P || !(m.value || m.startValue || m.endValue || P.filterType === "checkbox" && m.value !== void 0) || (a = a.filter((M) => {
1932
- const N = M[P.name];
1933
- return _(N, m, P);
1949
+ if (Object.entries(g.value).forEach(([c, m]) => {
1950
+ const $ = parseInt(c), B = u.value[$];
1951
+ !B || !(m.value || m.startValue || m.endValue || B.filterType === "checkbox" && m.value !== void 0) || (l = l.filter((I) => {
1952
+ const N = I[B.name];
1953
+ return _(N, m, B);
1934
1954
  }));
1935
1955
  }), v.value.column !== null && v.value.direction) {
1936
- const u = d.value[v.value.column], m = v.value.direction;
1937
- a.sort((R, P) => {
1938
- let b = R[u.name], M = P[u.name];
1939
- b == null && (b = ""), M == null && (M = "");
1940
- const N = Number(b), ee = Number(M);
1941
- if (!isNaN(N) && !isNaN(ee) && b !== "" && M !== "")
1956
+ const c = u.value[v.value.column], m = v.value.direction;
1957
+ l.sort(($, B) => {
1958
+ let b = $[c.name], I = B[c.name];
1959
+ b == null && (b = ""), I == null && (I = "");
1960
+ const N = Number(b), ee = Number(I);
1961
+ if (!isNaN(N) && !isNaN(ee) && b !== "" && I !== "")
1942
1962
  return m === "asc" ? N - ee : ee - N;
1943
1963
  {
1944
- const gt = String(b).toLowerCase(), mt = String(M).toLowerCase();
1964
+ const gt = String(b).toLowerCase(), mt = String(I).toLowerCase();
1945
1965
  return m === "asc" ? gt.localeCompare(mt) : mt.localeCompare(gt);
1946
1966
  }
1947
1967
  });
1948
1968
  }
1949
- return a;
1950
- }), le = (a, u) => c.value[`${a}:${u}`], j = (a, u, m) => {
1951
- const R = `${a}:${u}`, P = d.value[a];
1952
- c.value[R] !== m && (n.value[u] = !0), c.value[R] = m, l.value[u] = {
1953
- ...l.value[u],
1954
- [P.name]: m
1969
+ return l;
1970
+ }), le = (l, c) => f.value[`${l}:${c}`], j = (l, c, m) => {
1971
+ const $ = `${l}:${c}`, B = u.value[l];
1972
+ f.value[$] !== m && (d.value[c] = !0), f.value[$] = m, i.value[c] = {
1973
+ ...i.value[c],
1974
+ [B.name]: m
1955
1975
  };
1956
- }, q = (a) => {
1957
- l.value = a;
1958
- }, ue = (a, u, m) => {
1959
- const R = `${a}:${u}`;
1960
- c.value[R] !== m && (n.value[u] = !0, E.value[R] = m);
1961
- }, ae = (a) => {
1962
- const u = d.value.indexOf(a) === d.value.length - 1, m = o.value.fullWidth ? a.resizable && !u : a.resizable;
1976
+ }, J = (l) => {
1977
+ i.value = l;
1978
+ }, ue = (l, c, m) => {
1979
+ const $ = `${l}:${c}`;
1980
+ f.value[$] !== m && (d.value[c] = !0, E.value[$] = m);
1981
+ }, ae = (l) => {
1982
+ const c = u.value.indexOf(l) === u.value.length - 1, m = o.value.fullWidth ? l.resizable && !c : l.resizable;
1963
1983
  return {
1964
- width: a.width || "40ch",
1965
- textAlign: a.align || "center",
1984
+ width: l.width || "40ch",
1985
+ textAlign: l.align || "center",
1966
1986
  ...m && {
1967
1987
  resize: "horizontal",
1968
1988
  overflow: "hidden",
1969
1989
  whiteSpace: "nowrap"
1970
1990
  }
1971
1991
  };
1972
- }, Ae = (a, u) => {
1973
- if (a < 0 || a >= d.value.length) return;
1974
- const R = Math.max(u, 40);
1975
- d.value[a] = {
1976
- ...d.value[a],
1977
- width: `${R}px`
1992
+ }, Ae = (l, c) => {
1993
+ if (l < 0 || l >= u.value.length) return;
1994
+ const $ = Math.max(c, 40);
1995
+ u.value[l] = {
1996
+ ...u.value[l],
1997
+ width: `${$}px`
1978
1998
  };
1979
- }, ke = (a) => {
1980
- const u = l.value[a];
1981
- return $.value && u.gantt !== void 0;
1982
- }, Oe = (a) => !I.value || f.value[a].isRoot || f.value[a].open, Ve = (a) => !I.value && o.value.view !== "list-expansion" ? "" : I.value && (f.value[a].isRoot || f.value[a].isParent) ? f.value[a].childrenOpen ? "▼" : "►" : o.value.view === "list-expansion" ? f.value[a].expanded ? "▼" : "►" : "", Be = (a) => {
1983
- if (I.value) {
1984
- const u = r.value[a] || {}, R = !(u.childrenOpen ?? f.value[a].childrenOpen);
1985
- r.value[a] = {
1986
- ...u,
1987
- childrenOpen: R
1988
- }, R || Te(a);
1999
+ }, ke = (l) => {
2000
+ const c = i.value[l];
2001
+ return y.value && c.gantt !== void 0;
2002
+ }, Oe = (l) => !M.value || r.value[l].isRoot || r.value[l].open, Ve = (l) => !M.value && o.value.view !== "list-expansion" ? "" : M.value && (r.value[l].isRoot || r.value[l].isParent) ? r.value[l].childrenOpen ? "▼" : "►" : o.value.view === "list-expansion" ? r.value[l].expanded ? "▼" : "►" : "", Be = (l) => {
2003
+ if (M.value) {
2004
+ const c = n.value[l] || {}, $ = !(c.childrenOpen ?? r.value[l].childrenOpen);
2005
+ n.value[l] = {
2006
+ ...c,
2007
+ childrenOpen: $
2008
+ }, $ || Te(l);
1989
2009
  } else if (o.value.view === "list-expansion") {
1990
- const u = r.value[a] || {}, m = u.expanded ?? f.value[a].expanded;
1991
- r.value[a] = {
1992
- ...u,
2010
+ const c = n.value[l] || {}, m = c.expanded ?? r.value[l].expanded;
2011
+ n.value[l] = {
2012
+ ...c,
1993
2013
  expanded: !m
1994
2014
  };
1995
2015
  }
1996
- }, Te = (a) => {
1997
- for (let u = 0; u < l.value.length; u++)
1998
- if (f.value[u].parent === a) {
1999
- const m = r.value[u] || {};
2000
- r.value[u] = {
2016
+ }, Te = (l) => {
2017
+ for (let c = 0; c < i.value.length; c++)
2018
+ if (r.value[c].parent === l) {
2019
+ const m = n.value[c] || {};
2020
+ n.value[c] = {
2001
2021
  ...m,
2002
2022
  childrenOpen: !1
2003
- }, Te(u);
2023
+ }, Te(c);
2024
+ }
2025
+ }, Pe = (l, c) => {
2026
+ const m = le(l, c);
2027
+ return k(l, c, m);
2028
+ }, k = (l, c, m) => {
2029
+ const $ = u.value[l], B = i.value[c], b = $.format;
2030
+ if (!b)
2031
+ switch ($.fieldtype) {
2032
+ case "Check":
2033
+ return m ? "✓" : "✗";
2034
+ case "Date":
2035
+ return m != null ? new Date(m).toLocaleDateString() : m;
2036
+ case "Datetime":
2037
+ return m != null ? new Date(m).toLocaleString() : m;
2038
+ default:
2039
+ return m;
2004
2040
  }
2005
- }, Pe = (a, u) => {
2006
- const m = le(a, u);
2007
- return k(a, u, m);
2008
- }, k = (a, u, m) => {
2009
- const R = d.value[a], P = l.value[u], b = R.format;
2010
- return b ? typeof b == "function" ? b(m, { table: c.value, row: P, column: R }) : typeof b == "string" ? Function(`"use strict";return (${b})`)()(m, { table: c.value, row: P, column: R }) : m : m;
2011
- }, O = (a) => {
2012
- a.target instanceof Node && w.value.parent?.contains(a.target) || w.value.visible && (w.value.visible = !1);
2013
- }, F = (a, u) => u && a === 0 && u > 0 ? `${u}ch` : "inherit", J = (a) => {
2014
- const u = l.value[a.rowIndex]?.gantt;
2015
- 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));
2016
- }, G = (a) => {
2017
- const u = V.value.findIndex((m) => m.id === a.id);
2018
- u >= 0 ? V.value[u] = a : V.value.push(a);
2019
- }, te = (a) => {
2020
- const u = V.value.findIndex((m) => m.id === a);
2021
- u >= 0 && V.value.splice(u, 1);
2022
- }, pe = (a) => {
2023
- const u = x.value.findIndex((m) => m.id === a.id);
2024
- u >= 0 ? x.value[u] = a : x.value.push(a);
2025
- }, Me = (a) => {
2026
- const u = x.value.findIndex((m) => m.id === a);
2027
- u >= 0 && x.value.splice(u, 1);
2028
- }, S = (a, u, m) => {
2029
- const R = x.value.find((M) => M.id === a), P = x.value.find((M) => M.id === u);
2030
- if (!R || !P)
2041
+ return typeof b == "function" ? b(m, { table: f.value, row: B, column: $ }) : typeof b == "string" ? Function(`"use strict";return (${b})`)()(m, { table: f.value, row: B, column: $ }) : m;
2042
+ }, L = (l) => {
2043
+ l.target instanceof Node && h.value.parent?.contains(l.target) || h.value.visible && (h.value.visible = !1);
2044
+ }, F = (l, c) => c && l === 0 && c > 0 ? `${c}ch` : "inherit", q = (l) => {
2045
+ const c = i.value[l.rowIndex]?.gantt;
2046
+ c && (l.type === "resize" ? l.edge === "start" ? (c.startIndex = l.newStart, c.endIndex = l.end, c.colspan = c.endIndex - c.startIndex) : l.edge === "end" && (c.startIndex = l.start, c.endIndex = l.newEnd, c.colspan = c.endIndex - c.startIndex) : l.type === "bar" && (c.startIndex = l.newStart, c.endIndex = l.newEnd, c.colspan = c.endIndex - c.startIndex));
2047
+ }, G = (l) => {
2048
+ const c = O.value.findIndex((m) => m.id === l.id);
2049
+ c >= 0 ? O.value[c] = l : O.value.push(l);
2050
+ }, te = (l) => {
2051
+ const c = O.value.findIndex((m) => m.id === l);
2052
+ c >= 0 && O.value.splice(c, 1);
2053
+ }, pe = (l) => {
2054
+ const c = Z.value.findIndex((m) => m.id === l.id);
2055
+ c >= 0 ? Z.value[c] = l : Z.value.push(l);
2056
+ }, Me = (l) => {
2057
+ const c = Z.value.findIndex((m) => m.id === l);
2058
+ c >= 0 && Z.value.splice(c, 1);
2059
+ }, S = (l, c, m) => {
2060
+ const $ = Z.value.find((I) => I.id === l), B = Z.value.find((I) => I.id === c);
2061
+ if (!$ || !B)
2031
2062
  return console.warn("Cannot create connection: handle not found"), null;
2032
2063
  const b = {
2033
- id: `connection-${a}-${u}`,
2064
+ id: `connection-${l}-${c}`,
2034
2065
  from: {
2035
- barId: R.barId,
2036
- side: R.side
2066
+ barId: $.barId,
2067
+ side: $.side
2037
2068
  },
2038
2069
  to: {
2039
- barId: P.barId,
2040
- side: P.side
2070
+ barId: B.barId,
2071
+ side: B.side
2041
2072
  },
2042
2073
  style: m?.style,
2043
2074
  label: m?.label
2044
2075
  };
2045
- return p.value.push(b), b;
2046
- }, B = (a) => {
2047
- const u = p.value.findIndex((m) => m.id === a);
2048
- return u >= 0 ? (p.value.splice(u, 1), !0) : !1;
2049
- }, U = (a) => p.value.filter((u) => u.from.barId === a || u.to.barId === a), Y = (a) => x.value.filter((u) => u.barId === a), Q = (a) => {
2050
- if (d.value[a].sortable === !1) return;
2076
+ return w.value.push(b), b;
2077
+ }, V = (l) => {
2078
+ const c = w.value.findIndex((m) => m.id === l);
2079
+ return c >= 0 ? (w.value.splice(c, 1), !0) : !1;
2080
+ }, U = (l) => w.value.filter((c) => c.from.barId === l || c.to.barId === l), Y = (l) => Z.value.filter((c) => c.barId === l), Q = (l) => {
2081
+ if (u.value[l].sortable === !1) return;
2051
2082
  let m;
2052
- v.value.column === a && v.value.direction === "asc" ? m = "desc" : m = "asc", v.value.column = a, v.value.direction = m;
2053
- }, _ = (a, u, m) => {
2054
- const R = m.filterType || "text", P = u.value;
2055
- if (!P && R !== "dateRange" && R !== "checkbox") return !0;
2056
- switch (R) {
2083
+ v.value.column === l && v.value.direction === "asc" ? m = "desc" : m = "asc", v.value.column = l, v.value.direction = m;
2084
+ }, _ = (l, c, m) => {
2085
+ const $ = m.filterType || "text", B = c.value;
2086
+ if (!B && $ !== "dateRange" && $ !== "checkbox") return !0;
2087
+ switch ($) {
2057
2088
  case "text":
2058
- return (typeof a == "object" && a !== null ? Object.values(a).join(" ") : String(a || "")).toLowerCase().includes(String(P).toLowerCase());
2089
+ return (typeof l == "object" && l !== null ? Object.values(l).join(" ") : String(l || "")).toLowerCase().includes(String(B).toLowerCase());
2059
2090
  case "number": {
2060
- const b = Number(a), M = Number(P);
2061
- return !isNaN(b) && !isNaN(M) && b === M;
2091
+ const b = Number(l), I = Number(B);
2092
+ return !isNaN(b) && !isNaN(I) && b === I;
2062
2093
  }
2063
2094
  case "select":
2064
- return a === P;
2095
+ return l === B;
2065
2096
  case "checkbox":
2066
- return P === !0 ? !!a : !0;
2097
+ return B === !0 ? !!l : !0;
2067
2098
  case "date": {
2068
2099
  let b;
2069
- if (typeof a == "number") {
2070
- const N = new Date(a), ee = (/* @__PURE__ */ new Date()).getFullYear();
2100
+ if (typeof l == "number") {
2101
+ const N = new Date(l), ee = (/* @__PURE__ */ new Date()).getFullYear();
2071
2102
  b = new Date(ee, N.getMonth(), N.getDate());
2072
2103
  } else
2073
- b = new Date(String(a));
2074
- const M = new Date(String(P));
2075
- return b.toDateString() === M.toDateString();
2104
+ b = new Date(String(l));
2105
+ const I = new Date(String(B));
2106
+ return b.toDateString() === I.toDateString();
2076
2107
  }
2077
2108
  case "dateRange": {
2078
- const b = u.startValue, M = u.endValue;
2079
- if (!b && !M) return !0;
2109
+ const b = c.startValue, I = c.endValue;
2110
+ if (!b && !I) return !0;
2080
2111
  let N;
2081
- if (typeof a == "number") {
2082
- const ee = new Date(a), ht = (/* @__PURE__ */ new Date()).getFullYear();
2112
+ if (typeof l == "number") {
2113
+ const ee = new Date(l), ht = (/* @__PURE__ */ new Date()).getFullYear();
2083
2114
  N = new Date(ht, ee.getMonth(), ee.getDate());
2084
2115
  } else
2085
- N = new Date(String(a));
2086
- return !(b && N < new Date(String(b)) || M && N > new Date(String(M)));
2116
+ N = new Date(String(l));
2117
+ return !(b && N < new Date(String(b)) || I && N > new Date(String(I)));
2087
2118
  }
2088
2119
  default:
2089
2120
  return !0;
2090
2121
  }
2091
- }, ne = (a, u) => {
2092
- !u.value && !u.startValue && !u.endValue ? delete h.value[a] : h.value[a] = u;
2093
- }, se = (a) => {
2094
- delete h.value[a];
2095
- }, Ze = (a, u = "end") => {
2122
+ }, ne = (l, c) => {
2123
+ !c.value && !c.startValue && !c.endValue ? delete g.value[l] : g.value[l] = c;
2124
+ }, se = (l) => {
2125
+ delete g.value[l];
2126
+ }, Ze = (l, c = "end") => {
2096
2127
  const m = {};
2097
- for (const P of d.value)
2098
- m[P.name] = "";
2099
- a && Object.assign(m, a);
2100
- let R;
2101
- return u === "start" ? (R = 0, l.value.unshift(m)) : u === "end" ? (R = l.value.length, l.value.push(m)) : (R = Math.max(0, Math.min(u, l.value.length)), l.value.splice(R, 0, m)), R;
2128
+ for (const B of u.value)
2129
+ m[B.name] = "";
2130
+ l && Object.assign(m, l);
2131
+ let $;
2132
+ return c === "start" ? ($ = 0, i.value.unshift(m)) : c === "end" ? ($ = i.value.length, i.value.push(m)) : ($ = Math.max(0, Math.min(c, i.value.length)), i.value.splice($, 0, m)), $;
2102
2133
  };
2103
2134
  return {
2104
2135
  // state
2105
- columns: d,
2136
+ columns: u,
2106
2137
  config: o,
2107
- connectionHandles: x,
2108
- connectionPaths: p,
2109
- display: f,
2110
- filterState: h,
2111
- ganttBars: V,
2112
- modal: w,
2113
- rows: l,
2138
+ connectionHandles: Z,
2139
+ connectionPaths: w,
2140
+ display: r,
2141
+ filterState: g,
2142
+ ganttBars: O,
2143
+ modal: h,
2144
+ rows: i,
2114
2145
  sortState: v,
2115
- table: c,
2146
+ table: f,
2116
2147
  updates: E,
2117
2148
  // getters
2118
2149
  filteredRows: X,
2119
- hasPinnedColumns: g,
2120
- isGanttView: $,
2121
- isTreeView: I,
2122
- isDependencyGraphEnabled: H,
2123
- numberedRowWidth: A,
2124
- zeroColumn: L,
2150
+ hasPinnedColumns: p,
2151
+ isGanttView: y,
2152
+ isTreeView: M,
2153
+ isDependencyGraphEnabled: T,
2154
+ numberedRowWidth: R,
2155
+ zeroColumn: H,
2125
2156
  // actions
2126
2157
  addRow: Ze,
2127
2158
  clearFilter: se,
2128
- closeModal: O,
2159
+ closeModal: L,
2129
2160
  createConnection: S,
2130
- deleteConnection: B,
2131
- deleteRow: (a) => {
2132
- if (a < 0 || a >= l.value.length)
2161
+ deleteConnection: V,
2162
+ deleteRow: (l) => {
2163
+ if (l < 0 || l >= i.value.length)
2133
2164
  return null;
2134
- const [u] = l.value.splice(a, 1);
2135
- delete n.value[a], delete r.value[a];
2136
- const m = {}, R = {};
2137
- for (const [P, b] of Object.entries(n.value)) {
2138
- const M = parseInt(P);
2139
- M > a ? m[M - 1] = b : m[M] = b;
2165
+ const [c] = i.value.splice(l, 1);
2166
+ delete d.value[l], delete n.value[l];
2167
+ const m = {}, $ = {};
2168
+ for (const [B, b] of Object.entries(d.value)) {
2169
+ const I = parseInt(B);
2170
+ I > l ? m[I - 1] = b : m[I] = b;
2140
2171
  }
2141
- for (const [P, b] of Object.entries(r.value)) {
2142
- const M = parseInt(P);
2143
- M > a ? R[M - 1] = b : R[M] = b;
2172
+ for (const [B, b] of Object.entries(n.value)) {
2173
+ const I = parseInt(B);
2174
+ I > l ? $[I - 1] = b : $[I] = b;
2144
2175
  }
2145
- return n.value = m, r.value = R, u;
2176
+ return d.value = m, n.value = $, c;
2146
2177
  },
2147
- duplicateRow: (a) => {
2148
- if (a < 0 || a >= l.value.length)
2178
+ duplicateRow: (l) => {
2179
+ if (l < 0 || l >= i.value.length)
2149
2180
  return -1;
2150
- const u = l.value[a], m = JSON.parse(JSON.stringify(u)), R = a + 1;
2151
- return l.value.splice(R, 0, m), R;
2181
+ const c = i.value[l], m = JSON.parse(JSON.stringify(c)), $ = l + 1;
2182
+ return i.value.splice($, 0, m), $;
2152
2183
  },
2153
2184
  getCellData: le,
2154
2185
  getCellDisplayValue: Pe,
@@ -2158,33 +2189,33 @@ const go = { class: "gantt-connection-overlay" }, mo = {
2158
2189
  getHeaderCellStyle: ae,
2159
2190
  getIndent: F,
2160
2191
  getRowExpandSymbol: Ve,
2161
- insertRowAbove: (a, u) => {
2162
- const m = Math.max(0, a);
2163
- return Ze(u, m);
2192
+ insertRowAbove: (l, c) => {
2193
+ const m = Math.max(0, l);
2194
+ return Ze(c, m);
2164
2195
  },
2165
- insertRowBelow: (a, u) => {
2166
- const m = Math.min(a + 1, l.value.length);
2167
- return Ze(u, m);
2196
+ insertRowBelow: (l, c) => {
2197
+ const m = Math.min(l + 1, i.value.length);
2198
+ return Ze(c, m);
2168
2199
  },
2169
2200
  isRowGantt: ke,
2170
2201
  isRowVisible: Oe,
2171
- moveRow: (a, u) => {
2172
- if (a < 0 || a >= l.value.length || u < 0 || u >= l.value.length || a === u)
2202
+ moveRow: (l, c) => {
2203
+ if (l < 0 || l >= i.value.length || c < 0 || c >= i.value.length || l === c)
2173
2204
  return !1;
2174
- const [m] = l.value.splice(a, 1);
2175
- l.value.splice(u, 0, m);
2176
- const R = {}, P = {};
2177
- for (const [b, M] of Object.entries(n.value)) {
2205
+ const [m] = i.value.splice(l, 1);
2206
+ i.value.splice(c, 0, m);
2207
+ const $ = {}, B = {};
2208
+ for (const [b, I] of Object.entries(d.value)) {
2178
2209
  const N = parseInt(b);
2179
2210
  let ee = N;
2180
- N === a ? ee = u : a < u ? N > a && N <= u && (ee = N - 1) : N >= u && N < a && (ee = N + 1), R[ee] = M;
2211
+ N === l ? ee = c : l < c ? N > l && N <= c && (ee = N - 1) : N >= c && N < l && (ee = N + 1), $[ee] = I;
2181
2212
  }
2182
- for (const [b, M] of Object.entries(r.value)) {
2213
+ for (const [b, I] of Object.entries(n.value)) {
2183
2214
  const N = parseInt(b);
2184
2215
  let ee = N;
2185
- N === a ? ee = u : a < u ? N > a && N <= u && (ee = N - 1) : N >= u && N < a && (ee = N + 1), P[ee] = M;
2216
+ N === l ? ee = c : l < c ? N > l && N <= c && (ee = N - 1) : N >= c && N < l && (ee = N + 1), B[ee] = I;
2186
2217
  }
2187
- return n.value = R, r.value = P, !0;
2218
+ return d.value = $, n.value = B, !0;
2188
2219
  },
2189
2220
  registerConnectionHandle: pe,
2190
2221
  registerGanttBar: G,
@@ -2196,132 +2227,140 @@ const go = { class: "gantt-connection-overlay" }, mo = {
2196
2227
  toggleRowExpand: Be,
2197
2228
  unregisterConnectionHandle: Me,
2198
2229
  unregisterGanttBar: te,
2199
- updateGanttBar: J,
2200
- updateRows: q
2230
+ updateGanttBar: q,
2231
+ updateRows: J
2201
2232
  };
2202
2233
  })();
2203
- }, Bo = {
2234
+ };
2235
+ function Bo(e) {
2236
+ return e.filter((t) => !t.hidden && t.fieldtype).map(({ fieldname: t, hidden: s, ...a }) => ({
2237
+ name: t,
2238
+ ...a
2239
+ }));
2240
+ }
2241
+ const Po = {
2204
2242
  class: "atable-container",
2205
2243
  style: { position: "relative" }
2206
- }, Po = /* @__PURE__ */ we({
2244
+ }, Zo = /* @__PURE__ */ we({
2207
2245
  __name: "ATable",
2208
2246
  props: /* @__PURE__ */ yt({
2209
2247
  id: { default: "" },
2210
- config: { default: () => new Object() }
2248
+ config: { default: () => new Object() },
2249
+ schema: { default: () => [] }
2211
2250
  }, {
2212
2251
  rows: { required: !0 },
2213
2252
  rowsModifiers: {},
2214
- columns: { required: !0 },
2253
+ columns: {},
2215
2254
  columnsModifiers: {}
2216
2255
  }),
2217
2256
  emits: /* @__PURE__ */ yt(["cellUpdate", "gantt:drag", "connection:event", "columns:update", "row:add", "row:delete", "row:duplicate", "row:insert-above", "row:insert-below", "row:move"], ["update:rows", "update:columns"]),
2218
2257
  setup(e, { expose: t, emit: s }) {
2219
- const i = wt(e, "rows"), d = wt(e, "columns"), l = s, o = re("table"), n = Vo({ columns: d.value, rows: i.value, id: e.id, config: e.config });
2220
- n.$onAction(({ name: x, store: p, args: v, after: h }) => {
2221
- if (x === "setCellData" || x === "setCellText") {
2222
- const [g, $, I] = v, H = p.getCellData(g, $);
2223
- h(() => {
2224
- i.value = [...p.rows], l("cellUpdate", { colIndex: g, rowIndex: $, newValue: I, oldValue: H });
2258
+ const a = wt(e, "rows"), u = wt(e, "columns"), i = s, o = re("table"), d = u.value?.length ? u.value : Bo(e.schema ?? []), n = Vo({ columns: d, rows: a.value, id: e.id, config: e.config });
2259
+ n.$onAction(({ name: w, store: v, args: g, after: p }) => {
2260
+ if (w === "setCellData" || w === "setCellText") {
2261
+ const [y, M, T] = g, R = v.getCellData(y, M);
2262
+ p(() => {
2263
+ a.value = [...v.rows], i("cellUpdate", { colIndex: y, rowIndex: M, newValue: T, oldValue: R });
2225
2264
  });
2226
- } else if (x === "updateGanttBar") {
2227
- const [g] = v;
2228
- let $ = !1;
2229
- g.type === "resize" ? $ = g.oldColspan !== g.newColspan : g.type === "bar" && ($ = g.oldStart !== g.newStart || g.oldEnd !== g.newEnd), $ && h(() => {
2230
- l("gantt:drag", g);
2265
+ } else if (w === "updateGanttBar") {
2266
+ const [y] = g;
2267
+ let M = !1;
2268
+ y.type === "resize" ? M = y.oldColspan !== y.newColspan : y.type === "bar" && (M = y.oldStart !== y.newStart || y.oldEnd !== y.newEnd), M && p(() => {
2269
+ i("gantt:drag", y);
2231
2270
  });
2232
- } else x === "resizeColumn" && h(() => {
2233
- d.value = [...p.columns], l("columns:update", [...p.columns]);
2271
+ } else w === "resizeColumn" && p(() => {
2272
+ u.value = [...v.columns], i("columns:update", [...v.columns]);
2234
2273
  });
2235
2274
  }), ce(
2236
- () => i.value,
2237
- (x) => {
2238
- JSON.stringify(x) !== JSON.stringify(n.rows) && (n.rows = [...x]);
2275
+ () => a.value,
2276
+ (w) => {
2277
+ JSON.stringify(w) !== JSON.stringify(n.rows) && (n.rows = [...w]);
2239
2278
  },
2240
2279
  { deep: !0 }
2241
2280
  ), ce(
2242
- d,
2243
- (x) => {
2244
- JSON.stringify(x) !== JSON.stringify(n.columns) && (n.columns = [...x], l("columns:update", [...x]));
2281
+ u,
2282
+ (w) => {
2283
+ JSON.stringify(w) !== JSON.stringify(n.columns) && (n.columns = [...w], i("columns:update", [...w]));
2245
2284
  },
2246
2285
  { deep: !0 }
2247
2286
  ), He(() => {
2248
- d.value.some((x) => x.pinned) && (c(), n.isTreeView && Ht(o, c, { childList: !0, subtree: !0 }));
2287
+ u.value?.some((w) => w.pinned) && (r(), n.isTreeView && Ht(o, r, { childList: !0, subtree: !0 }));
2249
2288
  });
2250
- const r = T(() => n.columns.filter((x) => x.pinned).length), c = () => {
2251
- const x = o.value, p = x?.rows[0], v = x?.rows[1], h = p ? Array.from(p.cells) : [];
2252
- for (const [g, $] of h.entries()) {
2253
- const I = v?.cells[g];
2254
- I && ($.style.width = `${I.offsetWidth}px`);
2289
+ const f = A(() => n.columns.filter((w) => w.pinned).length), r = () => {
2290
+ const w = o.value, v = w?.rows[0], g = w?.rows[1], p = v ? Array.from(v.cells) : [];
2291
+ for (const [y, M] of p.entries()) {
2292
+ const T = g?.cells[y];
2293
+ T && (M.style.width = `${T.offsetWidth}px`);
2255
2294
  }
2256
- for (const g of x?.rows || []) {
2257
- let $ = 0;
2258
- const I = [];
2259
- for (const H of g.cells)
2260
- (H.classList.contains("sticky-column") || H.classList.contains("sticky-index")) && (H.style.left = `${$}px`, $ += H.offsetWidth, I.push(H));
2261
- I.length > 0 && I[I.length - 1].classList.add("sticky-column-edge");
2295
+ for (const y of w?.rows || []) {
2296
+ let M = 0;
2297
+ const T = [];
2298
+ for (const R of y.cells)
2299
+ (R.classList.contains("sticky-column") || R.classList.contains("sticky-index")) && (R.style.left = `${M}px`, M += R.offsetWidth, T.push(R));
2300
+ T.length > 0 && T[T.length - 1].classList.add("sticky-column-edge");
2262
2301
  }
2263
2302
  };
2264
- window.addEventListener("keydown", (x) => {
2265
- if (x.key === "Escape" && n.modal.visible) {
2303
+ window.addEventListener("keydown", (w) => {
2304
+ if (w.key === "Escape" && n.modal.visible) {
2266
2305
  n.modal.visible = !1;
2267
- const p = n.modal.parent;
2268
- p && at().then(() => {
2269
- p.focus();
2306
+ const v = n.modal.parent;
2307
+ v && at().then(() => {
2308
+ v.focus();
2270
2309
  });
2271
2310
  }
2272
2311
  });
2273
- const f = (x) => {
2274
- if (!x.gantt || r.value === 0)
2312
+ const h = (w) => {
2313
+ if (!w.gantt || f.value === 0)
2275
2314
  return n.columns;
2276
- const p = [];
2277
- for (let v = 0; v < r.value; v++) {
2278
- const h = { ...n.columns[v] };
2279
- h.originalIndex = v, p.push(h);
2315
+ const v = [];
2316
+ for (let g = 0; g < f.value; g++) {
2317
+ const p = { ...n.columns[g] };
2318
+ p.originalIndex = g, v.push(p);
2280
2319
  }
2281
- return p.push({
2282
- ...n.columns[r.value],
2320
+ return v.push({
2321
+ ...n.columns[f.value],
2283
2322
  isGantt: !0,
2284
- colspan: x.gantt?.colspan || n.columns.length - r.value,
2285
- originalIndex: r.value,
2323
+ colspan: w.gantt?.colspan || n.columns.length - f.value,
2324
+ originalIndex: f.value,
2286
2325
  width: "auto"
2287
2326
  // TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
2288
- }), p;
2289
- }, w = (x) => {
2290
- l("connection:event", { type: "create", connection: x });
2291
- }, E = (x) => {
2292
- l("connection:event", { type: "delete", connection: x });
2293
- }, V = (x, p) => {
2294
- switch (x) {
2327
+ }), v;
2328
+ }, E = (w) => {
2329
+ i("connection:event", { type: "create", connection: w });
2330
+ }, O = (w) => {
2331
+ i("connection:event", { type: "delete", connection: w });
2332
+ }, Z = (w, v) => {
2333
+ switch (w) {
2295
2334
  case "add": {
2296
- const v = n.addRow({}, p + 1), h = n.rows[v];
2297
- i.value = [...n.rows], l("row:add", { rowIndex: v, row: h });
2335
+ const g = n.addRow({}, v + 1), p = n.rows[g];
2336
+ a.value = [...n.rows], i("row:add", { rowIndex: g, row: p });
2298
2337
  break;
2299
2338
  }
2300
2339
  case "delete": {
2301
- const v = n.deleteRow(p);
2302
- v && (i.value = [...n.rows], l("row:delete", { rowIndex: p, row: v }));
2340
+ const g = n.deleteRow(v);
2341
+ g && (a.value = [...n.rows], i("row:delete", { rowIndex: v, row: g }));
2303
2342
  break;
2304
2343
  }
2305
2344
  case "duplicate": {
2306
- const v = n.duplicateRow(p);
2307
- if (v >= 0) {
2308
- const h = n.rows[v];
2309
- i.value = [...n.rows], l("row:duplicate", { sourceIndex: p, newIndex: v, row: h });
2345
+ const g = n.duplicateRow(v);
2346
+ if (g >= 0) {
2347
+ const p = n.rows[g];
2348
+ a.value = [...n.rows], i("row:duplicate", { sourceIndex: v, newIndex: g, row: p });
2310
2349
  }
2311
2350
  break;
2312
2351
  }
2313
2352
  case "insertAbove": {
2314
- const v = n.insertRowAbove(p), h = n.rows[v];
2315
- i.value = [...n.rows], l("row:insert-above", { targetIndex: p, newIndex: v, row: h });
2353
+ const g = n.insertRowAbove(v), p = n.rows[g];
2354
+ a.value = [...n.rows], i("row:insert-above", { targetIndex: v, newIndex: g, row: p });
2316
2355
  break;
2317
2356
  }
2318
2357
  case "insertBelow": {
2319
- const v = n.insertRowBelow(p), h = n.rows[v];
2320
- i.value = [...n.rows], l("row:insert-below", { targetIndex: p, newIndex: v, row: h });
2358
+ const g = n.insertRowBelow(v), p = n.rows[g];
2359
+ a.value = [...n.rows], i("row:insert-below", { targetIndex: v, newIndex: g, row: p });
2321
2360
  break;
2322
2361
  }
2323
2362
  case "move": {
2324
- l("row:move", { fromIndex: p, toIndex: -1 });
2363
+ i("row:move", { fromIndex: v, toIndex: -1 });
2325
2364
  break;
2326
2365
  }
2327
2366
  }
@@ -2339,59 +2378,59 @@ const go = { class: "gantt-connection-overlay" }, mo = {
2339
2378
  insertRowAbove: n.insertRowAbove,
2340
2379
  insertRowBelow: n.insertRowBelow,
2341
2380
  moveRow: n.moveRow
2342
- }), (x, p) => (y(), C("div", Bo, [
2343
- de((y(), C("table", {
2381
+ }), (w, v) => (x(), C("div", Po, [
2382
+ de((x(), C("table", {
2344
2383
  ref: "table",
2345
2384
  class: "atable",
2346
2385
  style: me({
2347
- width: Z(n).config.fullWidth ? "100%" : "auto"
2386
+ width: P(n).config.fullWidth ? "100%" : "auto"
2348
2387
  })
2349
2388
  }, [
2350
- fe(x.$slots, "header", { data: Z(n) }, () => [
2389
+ fe(w.$slots, "header", { data: P(n) }, () => [
2351
2390
  pt(Ot, {
2352
- columns: Z(n).columns,
2353
- store: Z(n)
2391
+ columns: P(n).columns,
2392
+ store: P(n)
2354
2393
  }, null, 8, ["columns", "store"])
2355
2394
  ], !0),
2356
2395
  W("tbody", null, [
2357
- fe(x.$slots, "body", { data: Z(n) }, () => [
2358
- (y(!0), C(he, null, ye(Z(n).filteredRows, (v, h) => (y(), ve(Lt, {
2359
- key: `${v.originalIndex}-${h}`,
2360
- row: v,
2361
- "row-index": v.originalIndex,
2362
- store: Z(n),
2363
- "onRow:action": V
2396
+ fe(w.$slots, "body", { data: P(n) }, () => [
2397
+ (x(!0), C(he, null, ye(P(n).filteredRows, (g, p) => (x(), ve(Lt, {
2398
+ key: `${g.originalIndex}-${p}`,
2399
+ row: g,
2400
+ "row-index": g.originalIndex,
2401
+ store: P(n),
2402
+ "onRow:action": Z
2364
2403
  }, {
2365
2404
  default: xt(() => [
2366
- (y(!0), C(he, null, ye(f(v), (g, $) => (y(), C(he, {
2367
- key: g.name
2405
+ (x(!0), C(he, null, ye(h(g), (y, M) => (x(), C(he, {
2406
+ key: y.name
2368
2407
  }, [
2369
- g.isGantt ? (y(), ve(We(g.ganttComponent || "AGanttCell"), {
2408
+ y.isGantt ? (x(), ve(We(y.ganttComponent || "AGanttCell"), {
2370
2409
  key: 0,
2371
- store: Z(n),
2372
- "columns-count": Z(n).columns.length - r.value,
2373
- color: v.gantt?.color,
2374
- start: v.gantt?.startIndex,
2375
- end: v.gantt?.endIndex,
2376
- colspan: g.colspan,
2377
- pinned: g.pinned,
2378
- "row-index": v.originalIndex,
2379
- "col-index": g.originalIndex ?? $,
2410
+ store: P(n),
2411
+ "columns-count": P(n).columns.length - f.value,
2412
+ color: g.gantt?.color,
2413
+ start: g.gantt?.startIndex,
2414
+ end: g.gantt?.endIndex,
2415
+ colspan: y.colspan,
2416
+ pinned: y.pinned,
2417
+ "row-index": g.originalIndex,
2418
+ "col-index": y.originalIndex ?? M,
2380
2419
  style: me({
2381
- textAlign: g?.align || "center",
2382
- minWidth: g?.width || "40ch",
2383
- width: Z(n).config.fullWidth ? "auto" : null
2420
+ textAlign: y?.align || "center",
2421
+ minWidth: y?.width || "40ch",
2422
+ width: P(n).config.fullWidth ? "auto" : null
2384
2423
  }),
2385
- "onConnection:create": w
2386
- }, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "row-index", "col-index", "style"])) : (y(), ve(We(g.cellComponent || "ACell"), {
2424
+ "onConnection:create": E
2425
+ }, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "row-index", "col-index", "style"])) : (x(), ve(We(y.cellComponent || "ACell"), {
2387
2426
  key: 1,
2388
- store: Z(n),
2389
- pinned: g.pinned,
2390
- "row-index": v.originalIndex,
2391
- "col-index": $,
2427
+ store: P(n),
2428
+ pinned: y.pinned,
2429
+ "row-index": g.originalIndex,
2430
+ "col-index": M,
2392
2431
  style: me({
2393
- textAlign: g?.align || "center",
2394
- width: Z(n).config.fullWidth ? "auto" : null
2432
+ textAlign: y?.align || "center",
2433
+ width: P(n).config.fullWidth ? "auto" : null
2395
2434
  }),
2396
2435
  spellcheck: "false"
2397
2436
  }, null, 8, ["store", "pinned", "row-index", "col-index", "style"]))
@@ -2401,73 +2440,74 @@ const go = { class: "gantt-connection-overlay" }, mo = {
2401
2440
  }, 1032, ["row", "row-index", "store"]))), 128))
2402
2441
  ], !0)
2403
2442
  ]),
2404
- fe(x.$slots, "footer", { data: Z(n) }, void 0, !0),
2405
- fe(x.$slots, "modal", { data: Z(n) }, () => [
2406
- de(pt(Vt, { store: Z(n) }, {
2443
+ fe(w.$slots, "footer", { data: P(n) }, void 0, !0),
2444
+ fe(w.$slots, "modal", { data: P(n) }, () => [
2445
+ de(pt(Vt, { store: P(n) }, {
2407
2446
  default: xt(() => [
2408
- (y(), ve(We(Z(n).modal.component), st({
2409
- key: `${Z(n).modal.rowIndex}:${Z(n).modal.colIndex}`,
2410
- "col-index": Z(n).modal.colIndex,
2411
- "row-index": Z(n).modal.rowIndex,
2412
- store: Z(n)
2413
- }, Z(n).modal.componentProps), null, 16, ["col-index", "row-index", "store"]))
2447
+ (x(), ve(We(P(n).modal.component), st({
2448
+ key: `${P(n).modal.rowIndex}:${P(n).modal.colIndex}`,
2449
+ "col-index": P(n).modal.colIndex,
2450
+ "row-index": P(n).modal.rowIndex,
2451
+ store: P(n)
2452
+ }, P(n).modal.componentProps), null, 16, ["col-index", "row-index", "store"]))
2414
2453
  ]),
2415
2454
  _: 1
2416
2455
  }, 8, ["store"]), [
2417
- [it, Z(n).modal.visible]
2456
+ [it, P(n).modal.visible]
2418
2457
  ])
2419
2458
  ], !0)
2420
2459
  ], 4)), [
2421
- [Z(fo), Z(n).closeModal]
2460
+ [P(fo), P(n).closeModal]
2422
2461
  ]),
2423
- Z(n).isGanttView && Z(n).isDependencyGraphEnabled ? (y(), ve(bo, {
2462
+ P(n).isGanttView && P(n).isDependencyGraphEnabled ? (x(), ve(bo, {
2424
2463
  key: 0,
2425
- store: Z(n),
2426
- "onConnection:delete": E
2464
+ store: P(n),
2465
+ "onConnection:delete": O
2427
2466
  }, null, 8, ["store"])) : K("", !0)
2428
2467
  ]));
2429
2468
  }
2430
- }), Zo = /* @__PURE__ */ $e(Po, [["__scopeId", "data-v-7b50ad21"]]), No = {}, Wo = { class: "aloading" }, Fo = { class: "aloading-header" };
2431
- function zo(e, t) {
2432
- return y(), C("div", Wo, [
2433
- W("h2", Fo, [
2469
+ }), No = /* @__PURE__ */ $e(Zo, [["__scopeId", "data-v-423f43d7"]]), Wo = {}, Fo = { class: "aloading" }, zo = { class: "aloading-header" };
2470
+ function Xo(e, t) {
2471
+ return x(), C("div", Fo, [
2472
+ W("h2", zo, [
2434
2473
  fe(e.$slots, "default", {}, void 0, !0)
2435
2474
  ]),
2436
2475
  t[0] || (t[0] = W("div", { class: "aloading-bar" }, null, -1))
2437
2476
  ]);
2438
2477
  }
2439
- const Xo = /* @__PURE__ */ $e(No, [["render", zo], ["__scopeId", "data-v-a930a25b"]]), Go = {}, Yo = { class: "aloading" }, Uo = { class: "aloading-header" };
2440
- function jo(e, t) {
2441
- return y(), C("div", Yo, [
2442
- W("h2", Uo, [
2478
+ const Go = /* @__PURE__ */ $e(Wo, [["render", Xo], ["__scopeId", "data-v-a930a25b"]]), Yo = {}, Uo = { class: "aloading" }, jo = { class: "aloading-header" };
2479
+ function Jo(e, t) {
2480
+ return x(), C("div", Uo, [
2481
+ W("h2", jo, [
2443
2482
  fe(e.$slots, "default", {}, void 0, !0)
2444
2483
  ]),
2445
2484
  t[0] || (t[0] = W("div", { class: "aloading-bar" }, null, -1))
2446
2485
  ]);
2447
2486
  }
2448
- const qo = /* @__PURE__ */ $e(Go, [["render", jo], ["__scopeId", "data-v-e1165876"]]);
2449
- function nl(e) {
2450
- e.component("ACell", On), e.component("AExpansionRow", Nn), e.component("AGanttCell", Un), e.component("ARow", Lt), e.component("ARowActions", qe), e.component("ATable", Zo), e.component("ATableHeader", Ot), e.component("ATableLoading", Xo), e.component("ATableLoadingBar", qo), e.component("ATableModal", Vt);
2487
+ const qo = /* @__PURE__ */ $e(Yo, [["render", Jo], ["__scopeId", "data-v-e1165876"]]);
2488
+ function ol(e) {
2489
+ e.component("ACell", On), e.component("AExpansionRow", Nn), e.component("AGanttCell", Un), e.component("ARow", Lt), e.component("ARowActions", Je), e.component("ATable", No), e.component("ATableHeader", Ot), e.component("ATableLoading", Go), e.component("ATableLoadingBar", qo), e.component("ATableModal", Vt);
2451
2490
  }
2452
2491
  export {
2453
2492
  On as ACell,
2454
2493
  Nn as AExpansionRow,
2455
2494
  Un as AGanttCell,
2456
2495
  Lt as ARow,
2457
- qe as ARowActions,
2458
- Zo as ATable,
2496
+ Je as ARowActions,
2497
+ No as ATable,
2459
2498
  Ot as ATableHeader,
2460
- Xo as ATableLoading,
2499
+ Go as ATableLoading,
2461
2500
  qo as ATableLoadingBar,
2462
2501
  Vt as ATableModal,
2463
2502
  jn as AddIcon,
2464
- qn as DeleteIcon,
2465
- Jn as DuplicateIcon,
2503
+ Jn as DeleteIcon,
2504
+ qn as DuplicateIcon,
2466
2505
  Qn as InsertAboveIcon,
2467
2506
  Kn as InsertBelowIcon,
2468
2507
  _n as MoveIcon,
2469
2508
  eo as actionIcons,
2470
2509
  Vo as createTableStore,
2471
- nl as install
2510
+ ol as install,
2511
+ Bo as schemaToColumns
2472
2512
  };
2473
2513
  //# sourceMappingURL=atable.js.map