@ninebone/table 0.0.698 → 0.0.699

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.
@@ -44,31 +44,31 @@ const Oe = class Oe extends HTMLElement {
44
44
  if (!t(this, B) || !t(this, S) || t(this, j)) return;
45
45
  const e = t(this, S).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const r = t(this, S).track, i = t(this, S).thumb, o = t(this, B).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
47
+ const r = t(this, S).track, o = t(this, S).thumb, i = t(this, B).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
48
48
  if (a !== 0 && c > a)
49
- o && (o.style.display = "flex");
49
+ i && (i.style.display = "flex");
50
50
  else {
51
- o && (o.style.display = "none");
51
+ i && (i.style.display = "none");
52
52
  return;
53
53
  }
54
54
  const l = r.clientWidth;
55
55
  if (l <= 0) return;
56
56
  const f = Math.max(Math.min(l * (a / c), l), 20);
57
- i.style.width = `${f}px`;
57
+ o.style.width = `${f}px`;
58
58
  const g = e.scrollLeft, b = c - a;
59
59
  let u = 0;
60
60
  b > 0 && (u = parseInt(g / b * (l - f), 10)), u < 0 && (u = 0);
61
- const y = l - f;
62
- u > y && (u = y), i.style.left = `${u}px`, t(this, S).left.disabled = u === 0, t(this, S).right.disabled = u >= y - 1;
61
+ const m = l - f;
62
+ u > m && (u = m), o.style.left = `${u}px`, t(this, S).left.disabled = u === 0, t(this, S).right.disabled = u >= m - 1;
63
63
  }, "refresh"));
64
64
  d(this, J, /* @__PURE__ */ h((e) => {
65
65
  if (!t(this, S)) return !1;
66
66
  const s = t(this, S).container, r = s.querySelector("table");
67
67
  if (!r) return !1;
68
- const i = t(this, S).track.getBoundingClientRect(), o = t(this, S).thumb.clientWidth;
68
+ const o = t(this, S).track.getBoundingClientRect(), i = t(this, S).thumb.clientWidth;
69
69
  let a = e;
70
70
  a < 0 && (a = 0);
71
- const c = i.width - o;
71
+ const c = o.width - i;
72
72
  a > c && (a = c), a = parseInt(a, 10), t(this, S).thumb.style.left = `${a}px`, t(this, S).left.disabled = a === 0, t(this, S).right.disabled = a >= c - 1;
73
73
  const l = s.clientWidth, g = r.scrollWidth - l;
74
74
  return c > 0 && g > 0 && (s.scrollLeft = a / c * g), a > 0 && a < c - 1;
@@ -76,11 +76,11 @@ const Oe = class Oe extends HTMLElement {
76
76
  d(this, Bt, /* @__PURE__ */ h(() => {
77
77
  const e = /* @__PURE__ */ h((r) => {
78
78
  clearInterval(t(this, K)), clearInterval(t(this, Z));
79
- const i = parseInt(t(this, S).thumb.style.left || 0, 10);
80
- t(this, J).call(this, i + r), p(this, K, setInterval(() => {
79
+ const o = parseInt(t(this, S).thumb.style.left || 0, 10);
80
+ t(this, J).call(this, o + r), p(this, K, setInterval(() => {
81
81
  clearInterval(t(this, K)), p(this, Z, setInterval(() => {
82
- const o = parseInt(t(this, S).thumb.style.left || 0, 10);
83
- t(this, J).call(this, o + r) || clearInterval(t(this, Z));
82
+ const i = parseInt(t(this, S).thumb.style.left || 0, 10);
83
+ t(this, J).call(this, i + r) || clearInterval(t(this, Z));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ h(() => {
@@ -95,19 +95,19 @@ const Oe = class Oe extends HTMLElement {
95
95
  }), t(this, S).left.addEventListener("touchstart", () => e(-20)), t(this, S).right.addEventListener("touchstart", () => e(20)), t(this, S).track.addEventListener("mousedown", (r) => {
96
96
  if (r.button !== 0) return;
97
97
  r.preventDefault();
98
- const i = t(this, S).track.getBoundingClientRect(), o = t(this, S).thumb.clientWidth;
99
- t(this, J).call(this, r.clientX - i.left - o / 2);
98
+ const o = t(this, S).track.getBoundingClientRect(), i = t(this, S).thumb.clientWidth;
99
+ t(this, J).call(this, r.clientX - o.left - i / 2);
100
100
  }), t(this, S).thumb.addEventListener("mousedown", (r) => {
101
101
  if (r.button !== 0) return;
102
102
  r.stopPropagation(), r.preventDefault(), p(this, j, !0), this.shiftX = r.clientX - t(this, S).thumb.getBoundingClientRect().left;
103
- const i = /* @__PURE__ */ h((a) => {
103
+ const o = /* @__PURE__ */ h((a) => {
104
104
  if (!t(this, j)) return;
105
105
  const c = t(this, S).track.getBoundingClientRect();
106
106
  t(this, J).call(this, a.clientX - c.left - this.shiftX);
107
- }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
108
- p(this, j, !1), s(), document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", o), this.refresh();
107
+ }, "onMouseMove"), i = /* @__PURE__ */ h(() => {
108
+ p(this, j, !1), s(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", i), document.addEventListener("mouseup", o);
110
+ document.addEventListener("mousemove", o), document.addEventListener("mouseup", i);
111
111
  });
112
112
  }, "#init"));
113
113
  }
@@ -213,49 +213,49 @@ const Be = class Be extends HTMLElement {
213
213
  d(this, St, 0);
214
214
  E(this, "refresh", /* @__PURE__ */ h(() => {
215
215
  if (T.log("vscrollbar.refresh"), !t(this, Q) || !t(this, k)) return;
216
- const e = t(this, k).container, s = t(this, k).track, r = t(this, k).thumb, i = e.clientHeight, o = t(this, Q).data.length, a = t(this, tt).getRowHeight(), c = o * a;
217
- if (c <= i || o === 0) {
216
+ const e = t(this, k).container, s = t(this, k).track, r = t(this, k).thumb, o = e.clientHeight, i = t(this, Q).data.length, a = t(this, tt).getRowHeight(), c = i * a;
217
+ if (c <= o || i === 0) {
218
218
  this.style.display = "none";
219
219
  return;
220
220
  } else
221
221
  this.style.display = "flex";
222
222
  const l = s.clientHeight;
223
223
  if (l <= 0) return;
224
- const f = Math.max(Math.min(l * (i / c), l), 20);
224
+ const f = Math.max(Math.min(l * (o / c), l), 20);
225
225
  r.style.height = `${f}px`;
226
- const g = e.scrollTop, b = Math.max(c - i, 1);
226
+ const g = e.scrollTop, b = Math.max(c - o, 1);
227
227
  T.log(e, g, b);
228
228
  let u = 0;
229
229
  b > 0 && (u = g / b * (l - f));
230
- const y = l - f;
231
- u < 0 && (u = 0), u > y && (u = y), r.style.top = `${u}px`, t(this, k).top.disabled = g <= 0, t(this, k).bottom.disabled = g >= b - 1;
230
+ const m = l - f;
231
+ u < 0 && (u = 0), u > m && (u = m), r.style.top = `${u}px`, t(this, k).top.disabled = g <= 0, t(this, k).bottom.disabled = g >= b - 1;
232
232
  }, "refresh"));
233
233
  d(this, Pt, /* @__PURE__ */ h(() => {
234
234
  T.log("nine-table-vscrollbar.#init");
235
235
  const e = t(this, k).container, s = /* @__PURE__ */ h(() => {
236
- const i = (t(this, Q).data.get() || []).length, o = t(this, tt).getRowHeight();
237
- return i * o;
236
+ const o = (t(this, Q).data.get() || []).length, i = t(this, tt).getRowHeight();
237
+ return o * i;
238
238
  }, "getContentHeight");
239
239
  t(this, k).thumb.addEventListener("mousedown", (r) => {
240
240
  if (r.button !== 0) return;
241
241
  r.stopPropagation(), r.preventDefault(), p(this, ct, !0), p(this, wt, r.clientY), p(this, St, e.scrollTop);
242
- const i = /* @__PURE__ */ h((a) => {
242
+ const o = /* @__PURE__ */ h((a) => {
243
243
  if (!t(this, ct)) return;
244
- const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, g = c.height - l, b = a.clientY - t(this, wt), u = e.clientHeight, y = s(), v = Math.max(y - u, 1);
244
+ const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, g = c.height - l, b = a.clientY - t(this, wt), u = e.clientHeight, m = s(), v = Math.max(m - u, 1);
245
245
  if (g > 0 && v > 0) {
246
246
  const A = b / g * v;
247
247
  let x = t(this, St) + A;
248
- const M = Math.max(0, y - u);
248
+ const M = Math.max(0, m - u);
249
249
  x < 0 && (x = 0), x > M && (x = M), e.scrollTop = x;
250
250
  }
251
251
  this.refresh();
252
- }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
253
- p(this, ct, !1), document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", o), this.refresh();
252
+ }, "onMouseMove"), i = /* @__PURE__ */ h(() => {
253
+ p(this, ct, !1), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
254
254
  }, "onMouseUp");
255
- document.addEventListener("mousemove", i), document.addEventListener("mouseup", o);
255
+ document.addEventListener("mousemove", o), document.addEventListener("mouseup", i);
256
256
  }), t(this, k).track.addEventListener("mousedown", (r) => {
257
257
  if (r.button !== 0 || r.target === t(this, k).thumb) return;
258
- const i = t(this, k).track.getBoundingClientRect(), o = t(this, k).thumb.clientHeight, a = r.clientY - i.top - o / 2, l = i.height - o, f = e.clientHeight, g = s(), b = Math.max(g - f, 1);
258
+ const o = t(this, k).track.getBoundingClientRect(), i = t(this, k).thumb.clientHeight, a = r.clientY - o.top - i / 2, l = o.height - i, f = e.clientHeight, g = s(), b = Math.max(g - f, 1);
259
259
  if (l > 0 && b > 0) {
260
260
  const u = Math.max(0, Math.min(1, a / l));
261
261
  e.scrollTop = u * b;
@@ -378,26 +378,26 @@ const Pe = class Pe {
378
378
  T.log("rowManager.initialize"), p(this, et, {
379
379
  scrollTables: t(this, w).querySelectorAll(".ng-part-body table"),
380
380
  firstTr: t(this, w).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
- }), p(this, _, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
382
- const a = t(this, w).querySelector(o);
381
+ }), p(this, _, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
382
+ const a = t(this, w).querySelector(i);
383
383
  if (!a) return;
384
384
  const c = a.querySelector(".ng-part-body table");
385
385
  if (!c) return;
386
386
  const l = c.querySelector("tbody.bindable-tbody");
387
387
  if (!l) return;
388
388
  const g = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
389
- t(this, P).set(o, g);
389
+ t(this, P).set(i, g);
390
390
  });
391
- const n = t(this, w).querySelector(".ng-container-body .ng-part-body"), e = t(this, w).querySelector(".ng-container-left .ng-part-body"), s = t(this, w).querySelector(".ng-container-right .ng-part-body"), r = t(this, w).querySelector(".ng-container-body .ng-part-header"), i = t(this, w).querySelector(".ng-container-body .ng-part-footer");
391
+ const n = t(this, w).querySelector(".ng-container-body .ng-part-body"), e = t(this, w).querySelector(".ng-container-left .ng-part-body"), s = t(this, w).querySelector(".ng-container-right .ng-part-body"), r = t(this, w).querySelector(".ng-container-body .ng-part-header"), o = t(this, w).querySelector(".ng-container-body .ng-part-footer");
392
392
  if (n) {
393
393
  t(this, At).call(this), t(this, Tt).call(this), t(this, Rt).call(this), t(this, ht).call(this, n.scrollTop);
394
- let o = !1;
394
+ let i = !1;
395
395
  const a = /* @__PURE__ */ h((c) => {
396
396
  var g;
397
- if (o) return;
398
- o = !0;
397
+ if (i) return;
398
+ i = !0;
399
399
  const l = c.scrollTop, f = c.scrollLeft;
400
- n && n.scrollTop !== l && (n.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), i && i.scrollLeft !== f && (i.scrollLeft = f), t(this, ht).call(this, l), (g = t(this, w).querySelector("nine-table-vscrollbar")) == null || g.refresh(), o = !1;
400
+ n && n.scrollTop !== l && (n.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), o && o.scrollLeft !== f && (o.scrollLeft = f), t(this, ht).call(this, l), (g = t(this, w).querySelector("nine-table-vscrollbar")) == null || g.refresh(), i = !1;
401
401
  }, "handleContainerScroll");
402
402
  [n, e, s].forEach((c) => {
403
403
  c == null || c.addEventListener("scroll", () => {
@@ -413,12 +413,12 @@ const Pe = class Pe {
413
413
  const r = n.querySelector(".ng-part-body tbody.bindable-tbody");
414
414
  if (!r) return;
415
415
  r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
416
- const i = r.querySelector("tr.nodata"), o = document.createDocumentFragment();
416
+ const o = r.querySelector("tr.nodata"), i = document.createDocumentFragment();
417
417
  for (let a = 0; a < t(this, Et); a++)
418
418
  s.forEach((c) => {
419
- o.appendChild(c.cloneNode(!0));
419
+ i.appendChild(c.cloneNode(!0));
420
420
  });
421
- i ? i.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this, et).firstTr = r.querySelector("tr:not(.nodata)"));
421
+ o ? o.before(i) : r.appendChild(i), e === ".ng-container-body" && (t(this, et).firstTr = r.querySelector("tr:not(.nodata)"));
422
422
  }, "#renderRows"));
423
423
  d(this, At, /* @__PURE__ */ h(() => {
424
424
  if (t(this, _) !== null && t(this, _) > 0)
@@ -430,30 +430,30 @@ const Pe = class Pe {
430
430
  const s = n.querySelector("tbody.bindable-tbody");
431
431
  if (T.log(s), !s) throw new Error("invalid dom");
432
432
  s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
433
- const r = s.querySelector("tr.nodata"), i = document.createDocumentFragment();
433
+ const r = s.querySelector("tr.nodata"), o = document.createDocumentFragment();
434
434
  e.forEach((b) => {
435
- i.appendChild(b.cloneNode(!0));
436
- }), r ? r.before(i) : s.appendChild(i);
437
- const o = t(this, w), a = o.style.display, c = o.style.visibility, l = o.style.position;
438
- (a === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
435
+ o.appendChild(b.cloneNode(!0));
436
+ }), r ? r.before(o) : s.appendChild(o);
437
+ const i = t(this, w), a = i.style.display, c = i.style.visibility, l = i.style.position;
438
+ (a === "none" || window.getComputedStyle(i).display === "none") && (i.style.display = "block", i.style.visibility = "hidden", i.style.position = "absolute");
439
439
  let f = 0;
440
440
  const g = s.querySelectorAll("tr");
441
441
  return g.forEach((b) => {
442
442
  let u = b.offsetHeight || b.getBoundingClientRect().height;
443
443
  if (u === 0) {
444
- const y = window.getComputedStyle(b);
445
- u = parseFloat(y.height) || parseFloat(y.minHeight) || 0;
444
+ const m = window.getComputedStyle(b);
445
+ u = parseFloat(m.height) || parseFloat(m.minHeight) || 0;
446
446
  }
447
447
  f += u;
448
- }), g.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, f <= 0 ? -1 : (p(this, _, f), t(this, qt).call(this), t(this, _));
448
+ }), g.forEach((b) => b.remove()), i.style.display = a, i.style.visibility = c, i.style.position = l, f <= 0 ? -1 : (p(this, _, f), t(this, qt).call(this), t(this, _));
449
449
  }, "#measureAndCacheHeight"));
450
450
  d(this, Rt, /* @__PURE__ */ h(() => {
451
451
  T.log("rowManager.#updateVirtualScrollHeight");
452
452
  const e = (t(this, D).data.get() || []).length, s = t(this, _), r = e * s;
453
- T.log("🔍 [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
454
- const o = t(this, w).querySelector(i);
455
- if (!o) return;
456
- const a = o.querySelector(".ng-part-body .ng-virtual-spacer");
453
+ T.log("🔍 [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
454
+ const i = t(this, w).querySelector(o);
455
+ if (!i) return;
456
+ const a = i.querySelector(".ng-part-body .ng-virtual-spacer");
457
457
  a && (a.style.height = `${r}px`);
458
458
  });
459
459
  }, "#updateVirtualScrollHeight"));
@@ -467,26 +467,26 @@ const Pe = class Pe {
467
467
  var a, c, l, f, g, b;
468
468
  const n = t(this, w).querySelector(".ng-container-left .ng-part-body table"), e = t(this, w).querySelector(".ng-container-body .ng-part-body table"), s = t(this, w).querySelector(".ng-container-right .ng-part-body table");
469
469
  if (e) {
470
- const u = n ? Array.from(n.querySelectorAll("tbody tr")) : [], y = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], A = Math.max(u.length, y.length, v.length);
470
+ const u = n ? Array.from(n.querySelectorAll("tbody tr")) : [], m = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], A = Math.max(u.length, m.length, v.length);
471
471
  for (let x = 0; x < A; x++) {
472
472
  const M = [
473
473
  ((a = u[x]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
474
- ((c = y[x]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
474
+ ((c = m[x]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
475
475
  ((l = v[x]) == null ? void 0 : l.getBoundingClientRect().height) || 0
476
476
  ], q = Math.max(...M);
477
- q > 0 && (u[x] && (u[x].style.height = `${q}px`), y[x] && (y[x].style.height = `${q}px`), v[x] && (v[x].style.height = `${q}px`));
477
+ q > 0 && (u[x] && (u[x].style.height = `${q}px`), m[x] && (m[x].style.height = `${q}px`), v[x] && (v[x].style.height = `${q}px`));
478
478
  }
479
479
  }
480
- const r = t(this, w).querySelector(".ng-container-left .ng-part-footer table"), i = t(this, w).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, w).querySelector(".ng-container-right .ng-part-footer table");
481
- if (i) {
482
- const u = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], y = Array.from(i.querySelectorAll("tfoot tr")), v = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], A = Math.max(u.length, y.length, v.length);
480
+ const r = t(this, w).querySelector(".ng-container-left .ng-part-footer table"), o = t(this, w).querySelector(".ng-container-body .ng-part-footer table"), i = t(this, w).querySelector(".ng-container-right .ng-part-footer table");
481
+ if (o) {
482
+ const u = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], m = Array.from(o.querySelectorAll("tfoot tr")), v = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], A = Math.max(u.length, m.length, v.length);
483
483
  for (let x = 0; x < A; x++) {
484
484
  const M = [
485
485
  ((f = u[x]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
486
- ((g = y[x]) == null ? void 0 : g.getBoundingClientRect().height) || 0,
486
+ ((g = m[x]) == null ? void 0 : g.getBoundingClientRect().height) || 0,
487
487
  ((b = v[x]) == null ? void 0 : b.getBoundingClientRect().height) || 0
488
488
  ], q = Math.max(...M);
489
- q > 0 && (u[x] && (u[x].style.height = `${q}px`), y[x] && (y[x].style.height = `${q}px`), v[x] && (v[x].style.height = `${q}px`));
489
+ q > 0 && (u[x] && (u[x].style.height = `${q}px`), m[x] && (m[x].style.height = `${q}px`), v[x] && (v[x].style.height = `${q}px`));
490
490
  }
491
491
  }
492
492
  }, "#syncRowHeights"));
@@ -497,10 +497,10 @@ const Pe = class Pe {
497
497
  if (!s.classList.contains("active")) continue;
498
498
  const r = e.contentRect.height;
499
499
  if (r > 0) {
500
- let i = 0;
501
- const o = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
502
- o && (i += o.offsetHeight), a && (i += a.offsetHeight);
503
- const c = Math.max(r - i, 100);
500
+ let o = 0;
501
+ const i = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
502
+ i && (o += i.offsetHeight), a && (o += a.offsetHeight);
503
+ const c = Math.max(r - o, 100);
504
504
  t(this, st) !== c && (p(this, st, c), t(this, qt).call(this), t(this, _) !== null && (t(this, Tt).call(this), this.refresh()));
505
505
  }
506
506
  }
@@ -519,9 +519,9 @@ const Pe = class Pe {
519
519
  if (!s) return;
520
520
  const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
521
521
  if (!r) return;
522
- const i = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, P).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, D).data.get() || []).length;
523
- i.forEach((f, g) => {
524
- const b = n + Math.floor(g / o);
522
+ const o = Array.from(r.querySelectorAll("tr:not(.nodata)")), i = ((l = t(this, P).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, D).data.get() || []).length;
523
+ o.forEach((f, g) => {
524
+ const b = n + Math.floor(g / i);
525
525
  if (b >= c) {
526
526
  f.style.visibility = "hidden";
527
527
  return;
@@ -537,18 +537,18 @@ const Pe = class Pe {
537
537
  if (!e || e <= 0) return;
538
538
  const s = t(this, D).data.length;
539
539
  if (s === 0) return;
540
- const r = ((g = t(this, P).get(".ng-container-body")) == null ? void 0 : g.length) || 1, i = t(this, w).querySelector(".ng-container-body .ng-part-body");
541
- T.log("bodyContainer.clientHeight", i.clientHeight);
542
- const o = Math.max(0, s - Math.floor(i.clientHeight / e)), a = Math.min(o, Math.max(0, Math.floor(n / e)));
540
+ const r = ((g = t(this, P).get(".ng-container-body")) == null ? void 0 : g.length) || 1, o = t(this, w).querySelector(".ng-container-body .ng-part-body");
541
+ T.log("bodyContainer.clientHeight", o.clientHeight);
542
+ const i = Math.max(0, s - Math.floor(o.clientHeight / e)), a = Math.min(i, Math.max(0, Math.floor(n / e)));
543
543
  let c = Math.floor(a * e);
544
- T.log(`📜 [Scroll Calc] maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`), a === o && T.log(`📜 [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`);
544
+ T.log(`📜 [Scroll Calc] maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`), a === i && T.log(`📜 [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`);
545
545
  const l = t(this, et).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
546
546
  (b = t(this, et)) == null || b.scrollTables.forEach((u) => {
547
547
  u.style.transform = `translate3d(0, ${c}px, 0)`;
548
548
  }), f !== a && (T.log(`🔄 [Row Bind Trigger] currentStartIndex(${f}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
549
- const y = t(this, w).querySelector(u);
550
- if (!y) return;
551
- const v = y.querySelector(".ng-part-body tbody.bindable-tbody");
549
+ const m = t(this, w).querySelector(u);
550
+ if (!m) return;
551
+ const v = m.querySelector(".ng-part-body tbody.bindable-tbody");
552
552
  if (!v) return;
553
553
  Array.from(v.querySelectorAll("tr:not(.nodata)")).forEach((x, M) => {
554
554
  const q = a + Math.floor(M / r);
@@ -576,10 +576,10 @@ const Pe = class Pe {
576
576
  });
577
577
  }; */
578
578
  d(this, kt, /* @__PURE__ */ h((n, e, s) => {
579
- n.dataset.row = s, n.data = e, Array.from(n.cells).forEach((r, i) => {
579
+ n.dataset.row = s, n.data = e, Array.from(n.cells).forEach((r, o) => {
580
580
  r.dataset.row = s;
581
- const o = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
582
- o && typeof o.refresh == "function" && o.refresh();
581
+ const i = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
582
+ i && typeof i.refresh == "function" && i.refresh();
583
583
  });
584
584
  }, "#bindRowData"));
585
585
  d(this, Yt, /* @__PURE__ */ h(() => {
@@ -587,14 +587,14 @@ const Pe = class Pe {
587
587
  T.log("rowManager.#syncHeaderHeights");
588
588
  const n = t(this, w).querySelector(".ng-container-left .ng-part-header table"), e = t(this, w).querySelector(".ng-container-body .ng-part-header table"), s = t(this, w).querySelector(".ng-container-right .ng-part-header table");
589
589
  if (!e) return;
590
- const r = n ? Array.from(n.querySelectorAll("tr")) : [], i = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, i.length, o.length);
590
+ const r = n ? Array.from(n.querySelectorAll("tr")) : [], o = Array.from(e.querySelectorAll("tr")), i = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, o.length, i.length);
591
591
  for (let g = 0; g < a; g++) {
592
592
  const b = [
593
593
  ((c = r[g]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
594
- ((l = i[g]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
595
- ((f = o[g]) == null ? void 0 : f.getBoundingClientRect().height) || 0
594
+ ((l = o[g]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
595
+ ((f = i[g]) == null ? void 0 : f.getBoundingClientRect().height) || 0
596
596
  ], u = Math.max(...b);
597
- u > 0 && (r[g] && (r[g].style.height = `${u}px`), i[g] && (i[g].style.height = `${u}px`), o[g] && (o[g].style.height = `${u}px`));
597
+ u > 0 && (r[g] && (r[g].style.height = `${u}px`), o[g] && (o[g].style.height = `${u}px`), i[g] && (i[g].style.height = `${u}px`));
598
598
  }
599
599
  }, "#syncHeaderHeights"));
600
600
  E(this, "destroy", /* @__PURE__ */ h(() => {
@@ -629,9 +629,9 @@ const Ut = class Ut {
629
629
  const f = l.getAttribute("cell-type") || "renderer";
630
630
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
631
631
  let g = `cell-${f}`;
632
- const b = l.getAttribute("data-bind"), u = l.getAttribute("data-expr"), y = l.getAttribute("maxbyte"), v = l.getAttribute("type");
632
+ const b = l.getAttribute("data-bind"), u = l.getAttribute("data-expr"), m = l.getAttribute("maxbyte"), v = l.getAttribute("type");
633
633
  let A = [];
634
- b && A.push(`data-bind="${b}"`), u && A.push(`data-expr="${u}"`), y && A.push(`maxbyte="${y}"`), v && A.push(`type="${v}"`), l.innerHTML = `<${g} ${A.join(" ")}></${g}>`;
634
+ b && A.push(`data-bind="${b}"`), u && A.push(`data-expr="${u}"`), m && A.push(`maxbyte="${m}"`), v && A.push(`type="${v}"`), l.innerHTML = `<${g} ${A.join(" ")}></${g}>`;
635
635
  });
636
636
  }, "processCellTypes"), s = /* @__PURE__ */ h((a) => {
637
637
  if (!a.querySelector("colgroup")) {
@@ -651,14 +651,14 @@ const Ut = class Ut {
651
651
  const l = Array.from(a.querySelectorAll(c + " tr")), f = Array.from(a.querySelectorAll(c + " th," + c + " td")), g = l.length;
652
652
  if (g === 0 || f.length === 0) return;
653
653
  let b = 0;
654
- f.forEach((y) => {
655
- b += y.colSpan || 1;
654
+ f.forEach((m) => {
655
+ b += m.colSpan || 1;
656
656
  });
657
657
  const u = Array.from(Array(g), () => Array(b).fill(null));
658
- l.forEach((y) => {
659
- const v = y.sectionRowIndex;
658
+ l.forEach((m) => {
659
+ const v = m.sectionRowIndex;
660
660
  let A = 0;
661
- Array.from(y.querySelectorAll("th,td")).forEach((x) => {
661
+ Array.from(m.querySelectorAll("th,td")).forEach((x) => {
662
662
  for (let W = 0; W < u[v].length; W++)
663
663
  if (u[v][W] === null) {
664
664
  A = W;
@@ -669,9 +669,9 @@ const Ut = class Ut {
669
669
  for (let F = 0; F < q; F++)
670
670
  v + W < g && A + F < b && (u[v + W][A + F] = W === 0 && F === 0 ? "1" : "0");
671
671
  });
672
- }), l.forEach((y) => {
673
- const v = y.sectionRowIndex;
674
- Array.from(y.querySelectorAll("th,td")).forEach((A) => {
672
+ }), l.forEach((m) => {
673
+ const v = m.sectionRowIndex;
674
+ Array.from(m.querySelectorAll("th,td")).forEach((A) => {
675
675
  for (let x = 0; x < u[v].length; x++)
676
676
  if (u[v][x] === "1") {
677
677
  A.dataset.col = x, u[v][x] = "0";
@@ -679,13 +679,13 @@ const Ut = class Ut {
679
679
  }
680
680
  });
681
681
  });
682
- }, "resetColIndex"), i = n.cloneNode(!0);
683
- return s(i), e(i), r(i, "thead"), r(i, "tbody"), r(i, "tfoot"), Array.from(i.querySelectorAll("colgroup col")).forEach((a, c) => {
682
+ }, "resetColIndex"), o = n.cloneNode(!0);
683
+ return s(o), e(o), r(o, "thead"), r(o, "tbody"), r(o, "tfoot"), Array.from(o.querySelectorAll("colgroup col")).forEach((a, c) => {
684
684
  const l = a.getAttribute("fixed");
685
- l && i.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
685
+ l && o.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
686
686
  f.setAttribute("fixed", l);
687
687
  });
688
- }), i;
688
+ }), o;
689
689
  }
690
690
  // 🎯 [추가] td/th에 선언된 cell-type 속성을 읽어 커스텀 태그로 자동 감싸기
691
691
  };
@@ -699,34 +699,29 @@ const De = class De {
699
699
  d(this, Ct, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
700
700
  // 3. 뷰 렌더링 (9분할 전체를 순회하며 경계선 클래스 부여)
701
701
  E(this, "render", /* @__PURE__ */ h(() => {
702
- const { startRow: n, startCol: e, endRow: s, endCol: r } = t(this, Ct);
703
- t(this, Y).querySelectorAll(
704
- ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
705
- ).forEach((o) => {
706
- o.querySelectorAll(".selected, .selected-top, .selected-bottom, .selected-left, .selected-right").forEach((a) => {
707
- a.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
708
- }), !(n < 0) && o.querySelectorAll("tbody tr").forEach((a) => {
709
- const c = parseInt(a.dataset.row, 10);
710
- isNaN(c) || a.querySelectorAll("td, th").forEach((l) => {
711
- const f = parseInt(l.dataset.col, 10);
712
- if (isNaN(f)) return;
713
- const g = parseInt(l.rowSpan || 1, 10), b = parseInt(l.colSpan || 1, 10), u = c + g - 1, y = f + b - 1;
714
- c <= s && u >= n && f <= r && y >= e && (l.classList.add("selected"), c === n && l.classList.add("selected-top"), u === s && l.classList.add("selected-bottom"), f === e && l.classList.add("selected-left"), y === r && l.classList.add("selected-right"));
715
- });
716
- });
702
+ const { startRow: n, startCol: e, endRow: s, endCol: r } = t(this, Ct), o = t(this, Y).querySelectorAll(".ng-container-top td, .ng-container-top th");
703
+ o.forEach((i) => {
704
+ i.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
705
+ }), !(n < 0 || e < 0) && o.forEach((i) => {
706
+ const a = i.closest("tr");
707
+ if (!a || a.classList.contains("nodata")) return;
708
+ const c = parseInt(a.dataset.row, 10), l = parseInt(i.dataset.col, 10);
709
+ if (isNaN(c) || isNaN(l)) return;
710
+ const f = parseInt(i.rowSpan || 1, 10), g = parseInt(i.colSpan || 1, 10), b = c + f - 1, u = l + g - 1;
711
+ c <= s && b >= n && l <= r && u >= e && (i.classList.add("selected"), c === n && i.classList.add("selected-top"), b === s && i.classList.add("selected-bottom"), l === e && i.classList.add("selected-left"), u === r && i.classList.add("selected-right"));
717
712
  });
718
713
  }, "render"));
719
714
  p(this, Y, n), de(this, mt, is).call(this);
720
715
  }
721
716
  setRange(n, e, s, r) {
722
- let i = Math.min(n, s), o = Math.max(n, s), a = Math.min(e, r), c = Math.max(e, r);
723
- const l = de(this, mt, rs).call(this, i, a, o, c);
717
+ let o = Math.min(n, s), i = Math.max(n, s), a = Math.min(e, r), c = Math.max(e, r);
718
+ const l = de(this, mt, rs).call(this, o, a, i, c);
724
719
  p(this, Ct, l), this.render();
725
720
  }
726
721
  };
727
722
  Y = new WeakMap(), Ct = new WeakMap(), mt = new WeakSet(), // 머지된 셀이 선택 영역에 걸쳐있으면 범위를 자동으로 넓혀주는 보정기
728
723
  rs = /* @__PURE__ */ h(function(n, e, s, r) {
729
- let i = n, o = e, a = s, c = r, l = !0;
724
+ let o = n, i = e, a = s, c = r, l = !0;
730
725
  const f = t(this, Y).querySelectorAll(
731
726
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
732
727
  );
@@ -734,34 +729,35 @@ rs = /* @__PURE__ */ h(function(n, e, s, r) {
734
729
  l = !1, f.forEach((g) => {
735
730
  g.querySelectorAll("tbody tr").forEach((b) => {
736
731
  const u = parseInt(b.dataset.row, 10);
737
- isNaN(u) || b.querySelectorAll("td, th").forEach((y) => {
738
- const v = parseInt(y.dataset.col, 10);
732
+ isNaN(u) || b.querySelectorAll("td, th").forEach((m) => {
733
+ const v = parseInt(m.dataset.col, 10);
739
734
  if (isNaN(v)) return;
740
- const A = parseInt(y.rowSpan || 1, 10), x = parseInt(y.colSpan || 1, 10), M = u + A - 1, q = v + x - 1;
741
- if (u <= a && M >= i && v <= c && q >= o) {
742
- const F = Math.min(i, u), Je = Math.max(a, M), Qe = Math.min(o, v), ts = Math.max(c, q);
743
- (F !== i || Je !== a || Qe !== o || ts !== c) && (i = F, a = Je, o = Qe, c = ts, l = !0);
735
+ const A = parseInt(m.rowSpan || 1, 10), x = parseInt(m.colSpan || 1, 10), M = u + A - 1, q = v + x - 1;
736
+ if (u <= a && M >= o && v <= c && q >= i) {
737
+ const F = Math.min(o, u), Je = Math.max(a, M), Qe = Math.min(i, v), ts = Math.max(c, q);
738
+ (F !== o || Je !== a || Qe !== i || ts !== c) && (o = F, a = Je, i = Qe, c = ts, l = !0);
744
739
  }
745
740
  });
746
741
  });
747
742
  });
748
- return { startRow: i, startCol: o, endRow: a, endCol: c };
743
+ return { startRow: o, startCol: i, endRow: a, endCol: c };
749
744
  }, "#expandRangeByMerge"), is = /* @__PURE__ */ h(function() {
750
745
  const n = t(this, Y).querySelector(".ng-container-top");
751
746
  n && n.addEventListener("mousedown", (e) => {
747
+ if (e.button !== 0) return;
752
748
  const s = e.target.closest("td, th");
753
749
  if (!s || s.dataset.row === void 0 || s.dataset.col === void 0 || s.closest("tr").classList.contains("nodata")) return;
754
- const r = parseInt(s.dataset.row, 10), i = parseInt(s.dataset.col, 10);
755
- this.setRange(r, i, r, i);
756
- const o = /* @__PURE__ */ h((c) => {
750
+ const r = parseInt(s.dataset.row, 10), o = parseInt(s.dataset.col, 10);
751
+ this.setRange(r, o, r, o);
752
+ const i = /* @__PURE__ */ h((c) => {
757
753
  const l = document.elementFromPoint(c.clientX, c.clientY), f = l == null ? void 0 : l.closest("td, th");
758
754
  if (!f || !t(this, Y).contains(f) || f.dataset.row === void 0 || f.dataset.col === void 0 || f.closest("tr").classList.contains("nodata")) return;
759
755
  const g = parseInt(f.dataset.row, 10), b = parseInt(f.dataset.col, 10);
760
- this.setRange(r, i, g, b);
756
+ this.setRange(r, o, g, b);
761
757
  }, "onMouseMove"), a = /* @__PURE__ */ h(() => {
762
- document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", a);
758
+ document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", a);
763
759
  }, "onMouseUp");
764
- document.addEventListener("mousemove", o), document.addEventListener("mouseup", a);
760
+ document.addEventListener("mousemove", i), document.addEventListener("mouseup", a);
765
761
  });
766
762
  }, "#initEvents"), h(De, "CellSelection");
767
763
  let ye = De;
@@ -779,10 +775,10 @@ const xt = class xt extends HTMLElement {
779
775
  E(this, "generate", /* @__PURE__ */ h((e) => {
780
776
  if (T.log("sheet.generate()"), !e) return;
781
777
  p(this, nt, pe.compile(e)), t(this, Kt).call(this), t(this, Zt).call(this);
782
- const s = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), i = this.querySelector(".ng-nodata-overlay");
783
- s && i && (i.style.top = `${s.offsetHeight}px`), r && i && (i.style.bottom = `${r.offsetHeight}px`), t(this, rt).initialize(), setTimeout(() => {
784
- var o;
785
- (o = this.querySelector("nine-table-hscrollbar")) == null || o.refresh();
778
+ const s = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), o = this.querySelector(".ng-nodata-overlay");
779
+ s && o && (o.style.top = `${s.offsetHeight}px`), r && o && (o.style.bottom = `${r.offsetHeight}px`), t(this, rt).initialize(), setTimeout(() => {
780
+ var i;
781
+ (i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
786
782
  }, 0);
787
783
  }, "generate"));
788
784
  d(this, Kt, /* @__PURE__ */ h(() => {
@@ -791,36 +787,36 @@ const xt = class xt extends HTMLElement {
791
787
  { selector: ".ng-container-left", type: "left" },
792
788
  { selector: ".ng-container-right", type: "right" }
793
789
  ].forEach(({ selector: s, type: r }) => {
794
- var i, o, a;
795
- (i = this.querySelector(`${s} .ng-part-header`)) == null || i.appendChild(t(this, dt).call(this, t(this, nt), r, "header")), (o = this.querySelector(`${s} .ng-virtual-spacer`)) == null || o.before(t(this, dt).call(this, t(this, nt), r, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, dt).call(this, t(this, nt), r, "footer"));
790
+ var o, i, a;
791
+ (o = this.querySelector(`${s} .ng-part-header`)) == null || o.appendChild(t(this, dt).call(this, t(this, nt), r, "header")), (i = this.querySelector(`${s} .ng-virtual-spacer`)) == null || i.before(t(this, dt).call(this, t(this, nt), r, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, dt).call(this, t(this, nt), r, "footer"));
796
792
  });
797
793
  }, "#renderSplitContainers"));
798
794
  d(this, Zt, /* @__PURE__ */ h(() => {
799
795
  ["left", "right", "body"].forEach((e) => {
800
796
  const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
801
797
  if (!s || !r || r.length === 0) return;
802
- let i = 0;
803
- r[0].querySelectorAll("col").forEach((o) => {
804
- const a = parseInt(o.getAttribute("width"), 10);
805
- isNaN(i) || (i += a);
806
- }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${i}px`, s.style.width = `${i}px`);
798
+ let o = 0;
799
+ r[0].querySelectorAll("col").forEach((i) => {
800
+ const a = parseInt(i.getAttribute("width"), 10);
801
+ isNaN(o) || (o += a);
802
+ }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${o}px`, s.style.width = `${o}px`);
807
803
  });
808
804
  }, "#updateContainerWidths"));
809
805
  d(this, dt, /* @__PURE__ */ h((e, s, r) => {
810
- const i = e.cloneNode(!0), o = i.querySelector("thead"), a = i.querySelector("tbody"), c = i.querySelector("tfoot");
806
+ const o = e.cloneNode(!0), i = o.querySelector("thead"), a = o.querySelector("tbody"), c = o.querySelector("tfoot");
811
807
  if (r === "header") {
812
808
  if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
813
809
  const f = document.createElement("tbody");
814
- f.className = "fixed-tbody", i.appendChild(f);
810
+ f.className = "fixed-tbody", o.appendChild(f);
815
811
  }
816
- } else r === "body" ? (o && o.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), a && a.remove());
817
- return s === "left" ? i.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
812
+ } else r === "body" ? (i && i.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (i && i.remove(), a && a.remove());
813
+ return s === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
818
814
  l.getAttribute("fixed") !== "left" && l.remove();
819
- }) : s === "right" ? i.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
815
+ }) : s === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
820
816
  l.getAttribute("fixed") !== "right" && l.remove();
821
- }) : i.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
817
+ }) : o.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
822
818
  l.remove();
823
- }), i;
819
+ }), o;
824
820
  }, "#createSplitTable"));
825
821
  E(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, rt).getRowHeight(), "getRowHeight"));
826
822
  E(this, "scrollToX", /* @__PURE__ */ h((e) => {
@@ -1057,9 +1053,9 @@ const Fe = class Fe extends HTMLElement {
1057
1053
  d(this, Qt, /* @__PURE__ */ h(() => {
1058
1054
  var e;
1059
1055
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
1060
- var o;
1061
- const r = s.ctrlKey || s.metaKey || s.shiftKey, i = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
1062
- t(this, Ht).call(this, i, r);
1056
+ var i;
1057
+ const r = s.ctrlKey || s.metaKey || s.shiftKey, o = parseInt((i = s.target.closest(".nine-tab-item")) == null ? void 0 : i.dataset.index, 10);
1058
+ t(this, Ht).call(this, o, r);
1063
1059
  }), t(this, Ht).call(this, 0, !1);
1064
1060
  }, "#init"));
1065
1061
  d(this, Ht, /* @__PURE__ */ h((e, s = !1) => {
@@ -1068,10 +1064,10 @@ const Fe = class Fe extends HTMLElement {
1068
1064
  Array.from(this.querySelectorAll("nine-splitter")).forEach((u) => u.style.setProperty("display", "none"));
1069
1065
  const b = f.filter((u) => u.classList.contains("active"));
1070
1066
  b.length < 2 || b.forEach((u) => {
1071
- const y = parseInt(u.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${y}"]`), A = f[y + 1];
1067
+ const m = parseInt(u.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${m}"]`), A = f[m + 1];
1072
1068
  v && A && A.classList.contains("active") && v.style.setProperty("display", "flex");
1073
1069
  });
1074
- }, "updateSplitters"), i = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), a = i.querySelectorAll(".nine-tab-item"), c = o.querySelectorAll("nine-table-sheet");
1070
+ }, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), i = this.querySelector("nine-table-sheets-body"), a = o.querySelectorAll(".nine-tab-item"), c = i.querySelectorAll("nine-table-sheet");
1075
1071
  if (!a[e]) return;
1076
1072
  if (!s)
1077
1073
  a.forEach((f, g) => {
@@ -1081,14 +1077,14 @@ const Fe = class Fe extends HTMLElement {
1081
1077
  f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
1082
1078
  });
1083
1079
  else {
1084
- const f = a[e], g = i.querySelectorAll(".nine-tab-item.active");
1080
+ const f = a[e], g = o.querySelectorAll(".nine-tab-item.active");
1085
1081
  if (f.classList.contains("active") && g.length <= 1)
1086
1082
  return;
1087
1083
  f.classList.toggle("active");
1088
- const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
1084
+ const b = i.querySelector(`nine-table-sheet[data-index="${e}"]`);
1089
1085
  b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
1090
1086
  }
1091
- const l = o.querySelectorAll("nine-table-sheet.active");
1087
+ const l = i.querySelectorAll("nine-table-sheet.active");
1092
1088
  l == null || l.forEach((f) => {
1093
1089
  f.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
1094
1090
  }), r();
@@ -1115,14 +1111,14 @@ const je = class je {
1115
1111
  var c, l;
1116
1112
  const n = Array.from(t(this, I).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1117
1113
  if (n.length === 0) return;
1118
- const e = parseInt(t(this, I).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((f) => f.getRowHeight())), r = (c = t(this, I).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, i = (l = t(this, I).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = Wt.SCROLLBAR_SIZE, a = e * s + r + i + o;
1114
+ const e = parseInt(t(this, I).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((f) => f.getRowHeight())), r = (c = t(this, I).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (l = t(this, I).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, i = Wt.SCROLLBAR_SIZE, a = e * s + r + o + i;
1119
1115
  t(this, I).style.height = `${a}px`;
1120
1116
  }, "#applyAutoHeight"));
1121
1117
  d(this, ee, /* @__PURE__ */ h(() => {
1122
- const e = Array.from(t(this, I).children).filter((c) => c.tagName === "TABLE"), s = t(this, I).getAttribute("auto-height") === "true", r = e.length, i = e.map((c, l) => {
1118
+ const e = Array.from(t(this, I).children).filter((c) => c.tagName === "TABLE"), s = t(this, I).getAttribute("auto-height") === "true", r = e.length, o = e.map((c, l) => {
1123
1119
  const g = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < r - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
1124
1120
  return g + b;
1125
- }).join(""), o = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1121
+ }).join(""), i = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1126
1122
  t(this, I).shadowRoot.innerHTML = `
1127
1123
  <style>
1128
1124
  :host {
@@ -1234,9 +1230,9 @@ const je = class je {
1234
1230
  <nine-table-body>
1235
1231
  <nine-table-summary></nine-table-summary>
1236
1232
  <nine-table-sheets>
1237
- <nine-table-sheets-body>${i}</nine-table-sheets-body>
1233
+ <nine-table-sheets-body>${o}</nine-table-sheets-body>
1238
1234
  <nine-table-sheets-footer>
1239
- <div class="nine-tab-bar">${o}</div>
1235
+ <div class="nine-tab-bar">${i}</div>
1240
1236
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
1241
1237
  </nine-table-sheets-footer>
1242
1238
  </nine-table-sheets>
@@ -1300,15 +1296,15 @@ const O = class O {
1300
1296
  });
1301
1297
  }, "#invalidate"));
1302
1298
  E(this, "get", /* @__PURE__ */ h((n, e) => {
1303
- var i;
1299
+ var o;
1304
1300
  const s = this.getValidData();
1305
1301
  if (!s || s.length <= 0) return;
1306
1302
  if (n == null) return t(this, gt).call(this, s);
1307
1303
  if (n < 0 || n >= s.length) return null;
1308
- const r = typeof ((i = t(this, N).fields) == null ? void 0 : i.get) == "function" ? t(this, N).fields.get() : [];
1304
+ const r = typeof ((o = t(this, N).fields) == null ? void 0 : o.get) == "function" ? t(this, N).fields.get() : [];
1309
1305
  if (e != null) {
1310
- const o = r.indexOf(e);
1311
- return o >= 0 ? s[n].v[o] : null;
1306
+ const i = r.indexOf(e);
1307
+ return i >= 0 ? s[n].v[i] : null;
1312
1308
  }
1313
1309
  return t(this, gt).call(this, s[n]);
1314
1310
  }, "get"));
@@ -1335,11 +1331,11 @@ const O = class O {
1335
1331
  var r;
1336
1332
  Array.isArray(n) || (n = [n]);
1337
1333
  const e = typeof ((r = t(this, N).fields) == null ? void 0 : r.get) == "function" ? t(this, N).fields.get() : Object.keys(n[0] || {}), s = [];
1338
- return n.forEach((i) => {
1339
- const o = { v: [] };
1334
+ return n.forEach((o) => {
1335
+ const i = { v: [] };
1340
1336
  e.forEach((a) => {
1341
- o.v.push(i[a] !== void 0 && i[a] !== null ? i[a] : "");
1342
- }), s.push(o);
1337
+ i.v.push(o[a] !== void 0 && o[a] !== null ? o[a] : "");
1338
+ }), s.push(i);
1343
1339
  }), s;
1344
1340
  }, "#json2Array"));
1345
1341
  d(this, ie, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
@@ -1350,8 +1346,8 @@ const O = class O {
1350
1346
  const s = t(this, re).call(this, n);
1351
1347
  t(this, C).rawRecords = t(this, C).rawRecords.concat(t(this, ie).call(this, s)), this.resetRecords();
1352
1348
  const r = this.count() - 1;
1353
- return e || s.forEach((i, o) => {
1354
- const a = t(this, C).rawRecords[r - o];
1349
+ return e || s.forEach((o, i) => {
1350
+ const a = t(this, C).rawRecords[r - i];
1355
1351
  a && (a.__ng.rowState = O.ROW_STATE.EMPTY);
1356
1352
  }), t(this, it).call(this), r;
1357
1353
  }, "add"));
@@ -1360,8 +1356,8 @@ const O = class O {
1360
1356
  Array.isArray(n) ? e = n : typeof n > "u" ? e = [t(this, C).host.row.at] : e = [parseInt(n, 10)], e.sort((s, r) => r - s).forEach((s) => {
1361
1357
  if (t(this, z)[s]) {
1362
1358
  const r = t(this, z)[s].__ng.rowid;
1363
- t(this, z)[s].__ng.rowState === O.ROW_STATE.INSERT ? t(this, C).rawRecords = t(this, C).rawRecords.filter((i) => i.__ng.rowid !== r) : t(this, C).rawRecords.forEach((i) => {
1364
- i.__ng.rowid === r && (i.__ng.deleted = !0, i.__ng.rowState = O.ROW_STATE.DELETE);
1359
+ t(this, z)[s].__ng.rowState === O.ROW_STATE.INSERT ? t(this, C).rawRecords = t(this, C).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, C).rawRecords.forEach((o) => {
1360
+ o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = O.ROW_STATE.DELETE);
1365
1361
  });
1366
1362
  }
1367
1363
  }), this.resetRecords(), t(this, it).call(this);
@@ -1369,12 +1365,12 @@ const O = class O {
1369
1365
  E(this, "setValue", /* @__PURE__ */ h((n, e, s) => {
1370
1366
  var c;
1371
1367
  n = parseInt(n, 10);
1372
- const i = (typeof ((c = t(this, N).fields) == null ? void 0 : c.get) == "function" ? t(this, N).fields.get() : []).indexOf(e);
1373
- if (i < 0) return;
1374
- const o = this.getValidData()[n];
1375
- if (!o) return;
1376
- const a = o.v[i];
1377
- a !== s && o.__ng.rowState !== O.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = a), o.__ng.rowState = O.ROW_STATE.UPDATE), o.v[i] = s;
1368
+ const o = (typeof ((c = t(this, N).fields) == null ? void 0 : c.get) == "function" ? t(this, N).fields.get() : []).indexOf(e);
1369
+ if (o < 0) return;
1370
+ const i = this.getValidData()[n];
1371
+ if (!i) return;
1372
+ const a = i.v[o];
1373
+ a !== s && i.__ng.rowState !== O.ROW_STATE.INSERT && (i.__ng.o.hasOwnProperty(e) || (i.__ng.o[e] = a), i.__ng.rowState = O.ROW_STATE.UPDATE), i.v[o] = s;
1378
1374
  }, "setValue"));
1379
1375
  E(this, "resetRecords", /* @__PURE__ */ h(() => {
1380
1376
  p(this, ut, t(this, C).rawRecords.filter((n) => !n.__ng.deleted)), p(this, z, t(this, C).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, C).rawRecords.forEach((n, e) => {
@@ -1385,15 +1381,15 @@ const O = class O {
1385
1381
  }, "resetRecords"));
1386
1382
  E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, z).length === 0 && t(this, C).rawRecords.length > 0 && this.resetRecords(), t(this, z)), "getValidData"));
1387
1383
  d(this, gt, /* @__PURE__ */ h((n) => {
1388
- var o;
1384
+ var i;
1389
1385
  if (!n) return n;
1390
- const e = !Array.isArray(n), s = e ? [n] : n, r = typeof ((o = t(this, N).fields) == null ? void 0 : o.get) == "function" ? t(this, N).fields.get() : [], i = s.filter((a) => !a.__ng.deleted).map((a) => {
1386
+ const e = !Array.isArray(n), s = e ? [n] : n, r = typeof ((i = t(this, N).fields) == null ? void 0 : i.get) == "function" ? t(this, N).fields.get() : [], o = s.filter((a) => !a.__ng.deleted).map((a) => {
1391
1387
  const c = {};
1392
1388
  return r.forEach((l, f) => {
1393
1389
  c[l] = a.v ? a.v[f] : a[l];
1394
1390
  }), c.__ng = a.__ng, c;
1395
1391
  });
1396
- return e ? i[0] : i;
1392
+ return e ? o[0] : o;
1397
1393
  }, "#conv"));
1398
1394
  E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1399
1395
  p(this, N, n), p(this, C, e), t(this, ne).call(this);
@@ -1436,10 +1432,10 @@ const Ye = class Ye {
1436
1432
  }, this.setDataSource = (e) => {
1437
1433
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1438
1434
  }, this.getRowState = (e) => {
1439
- var r, i;
1435
+ var r, o;
1440
1436
  const s = parseInt(e, 10);
1441
1437
  if (!(s >= this.data.count()))
1442
- return (i = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : i.rowState;
1438
+ return (o = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : o.rowState;
1443
1439
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1444
1440
  this.row.at = e;
1445
1441
  }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, s) => this.data.get(e, s), this.setColumn = (e, s, r) => {
@@ -1472,25 +1468,25 @@ const Ue = class Ue {
1472
1468
  if (!(!n || n.length === 0)) {
1473
1469
  for (const e of n)
1474
1470
  T.log(e), $("[data-bind]", e).each((s, r) => {
1475
- const i = r.dataset.bind, o = r.getAttribute("data-type") || "string";
1476
- i && t(this, H).push({ name: i, type: o });
1471
+ const o = r.dataset.bind, i = r.getAttribute("data-type") || "string";
1472
+ o && t(this, H).push({ name: o, type: i });
1477
1473
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1478
- $(`[${s}]`, e).each((r, i) => {
1479
- var o = i.getAttribute(s);
1480
- if (o.indexOf("data.") < 0) {
1481
- const a = o.search(/[(]/g);
1474
+ $(`[${s}]`, e).each((r, o) => {
1475
+ var i = o.getAttribute(s);
1476
+ if (i.indexOf("data.") < 0) {
1477
+ const a = i.search(/[(]/g);
1482
1478
  if (a > 0)
1483
1479
  try {
1484
- o = String(window[o.substring(0, a).trim()]);
1480
+ i = String(window[i.substring(0, a).trim()]);
1485
1481
  } catch {
1486
- o = "";
1482
+ i = "";
1487
1483
  }
1488
1484
  }
1489
- o.split("data.").forEach((a) => {
1485
+ i.split("data.").forEach((a) => {
1490
1486
  if (a.trim() != "") {
1491
1487
  const c = a.search(/[^_A-Za-z0-9]/g);
1492
1488
  let l = "";
1493
- c >= 0 ? l = a.substring(0, c) : o.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, H).push({ name: l, type: "string" });
1489
+ c >= 0 ? l = a.substring(0, c) : i.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, H).push({ name: l, type: "string" });
1494
1490
  }
1495
1491
  });
1496
1492
  });
@@ -1569,72 +1565,72 @@ const vt = class vt extends HTMLElement {
1569
1565
  };
1570
1566
  h(vt, "BasicCellElement"), E(vt, "_styleCache", /* @__PURE__ */ new Map()), E(vt, "_customStyleCache", /* @__PURE__ */ new Map());
1571
1567
  let Re = vt;
1572
- var L, Nt, m, Me, Ie, $e, _e, Ne;
1568
+ var L, Nt, y, Me, Ie, $e, _e, Ne;
1573
1569
  const Ke = class Ke extends Re {
1574
1570
  constructor() {
1575
1571
  super();
1576
1572
  d(this, L);
1577
1573
  d(this, Nt);
1578
- d(this, m);
1574
+ d(this, y);
1579
1575
  d(this, Me);
1580
1576
  d(this, Ie);
1581
1577
  d(this, $e);
1582
1578
  d(this, _e);
1583
1579
  E(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1584
- if (t(this, m))
1585
- if (t(this, m).closest("tbody")) {
1586
- const s = t(this, m).closest("tr").data, r = parseInt(t(this, m).dataset.row);
1580
+ if (t(this, y))
1581
+ if (t(this, y).closest("tbody")) {
1582
+ const s = t(this, y).closest("tr").data, r = parseInt(t(this, y).dataset.row);
1587
1583
  if (!s) return "";
1588
- if (ninegrid.isNull(t(this, m).dataset.expr)) {
1589
- if (!ninegrid.isNull(t(this, m).dataset.bind))
1590
- return s[t(this, m).dataset.bind] || ninegrid.nvl(e, "");
1584
+ if (ninegrid.isNull(t(this, y).dataset.expr)) {
1585
+ if (!ninegrid.isNull(t(this, y).dataset.bind))
1586
+ return s[t(this, y).dataset.bind] || ninegrid.nvl(e, "");
1591
1587
  } else try {
1592
- return this.getExprValue(t(this, m).dataset.expr, s, r, t(this, m));
1588
+ return this.getExprValue(t(this, y).dataset.expr, s, r, t(this, y));
1593
1589
  } catch {
1594
- console.error(t(this, m).dataset.expr, s, t(this, m).dataset.row);
1590
+ console.error(t(this, y).dataset.expr, s, t(this, y).dataset.row);
1595
1591
  }
1596
1592
  return ninegrid.nvl(e, "");
1597
1593
  } else
1598
1594
  try {
1599
- return t(this, L).exprFunction(t(this, m).dataset.expr).call(this, null, -1, t(this, L).data);
1595
+ return t(this, L).exprFunction(t(this, y).dataset.expr).call(this, null, -1, t(this, L).data);
1600
1596
  } catch {
1601
1597
  }
1602
1598
  }, "getDisplayText"));
1603
1599
  d(this, Ne, /* @__PURE__ */ h(() => {
1604
- if (!(!t(this, L) || !t(this, L).template || !t(this, m).closest("tbody.bindable"))) {
1605
- var e = ninegrid.j.querySelectorAll(t(this, m)).attr("suppress");
1600
+ if (!(!t(this, L) || !t(this, L).template || !t(this, y).closest("tbody.bindable"))) {
1601
+ var e = ninegrid.j.querySelectorAll(t(this, y)).attr("suppress");
1606
1602
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1607
- var s = t(this, m).closest("tr"), r = [];
1603
+ var s = t(this, y).closest("tr"), r = [];
1608
1604
  $("th,td", s).each((x, M) => {
1609
1605
  var q = ninegrid.j.querySelectorAll(M).attr("suppress");
1610
1606
  q && M.dataset.row && (q = parseInt(q), !isNaN(q) && q <= e && r.push(q));
1611
1607
  }), r.sort();
1612
- var i = !1;
1608
+ var o = !1;
1613
1609
  if (parseInt(s.sectionRowIndex / t(this, L).template.length) > 0)
1614
- for (var o of r) {
1615
- if (o > e) break;
1616
- var a = parseInt(t(this, m).dataset.row), c = a - 1, l = t(this, m).closest("tr").data, f = t(this, L).data.get(c);
1617
- t(this, m).dataset.matrixRow;
1618
- var g = t(this, L).body.querySelector(`tbody.bindable [suppress="${o}"][data-matrix-row="${t(this, m).dataset.matrixRow}"]`), b = g.dataset.expr ? this.getExprValue(g.dataset.expr, l, a) : l[g.dataset.bind], u = g.dataset.expr ? this.getExprValue(g.dataset.expr, f, c) : f[g.dataset.bind];
1610
+ for (var i of r) {
1611
+ if (i > e) break;
1612
+ var a = parseInt(t(this, y).dataset.row), c = a - 1, l = t(this, y).closest("tr").data, f = t(this, L).data.get(c);
1613
+ t(this, y).dataset.matrixRow;
1614
+ var g = t(this, L).body.querySelector(`tbody.bindable [suppress="${i}"][data-matrix-row="${t(this, y).dataset.matrixRow}"]`), b = g.dataset.expr ? this.getExprValue(g.dataset.expr, l, a) : l[g.dataset.bind], u = g.dataset.expr ? this.getExprValue(g.dataset.expr, f, c) : f[g.dataset.bind];
1619
1615
  if (b != u) {
1620
- i = !0;
1616
+ o = !0;
1621
1617
  break;
1622
1618
  }
1623
1619
  }
1624
1620
  else
1625
- i = !0;
1626
- i ? ninegrid.j.querySelectorAll(t(this, m)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, m)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, m)).hasClass("hidden") || (i ? ninegrid.j.querySelectorAll(t(this, m)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, m)).addClass("hidden"));
1627
- var y = parseInt(t(this, m).dataset.matrixRow), v = y - 1, A = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, m).dataset.col}"][data-matrix-row="${v}"]`);
1628
- $(A).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, m)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").addClass("last-suppress") : !$(A).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, m)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").removeClass("last-suppress");
1621
+ o = !0;
1622
+ o ? ninegrid.j.querySelectorAll(t(this, y)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, y)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, y)).hasClass("hidden") || (o ? ninegrid.j.querySelectorAll(t(this, y)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, y)).addClass("hidden"));
1623
+ var m = parseInt(t(this, y).dataset.matrixRow), v = m - 1, A = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, y).dataset.col}"][data-matrix-row="${v}"]`);
1624
+ $(A).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, y)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").addClass("last-suppress") : !$(A).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, y)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").removeClass("last-suppress");
1629
1625
  }
1630
1626
  }
1631
1627
  }, "#resetSuppress"));
1632
- E(this, "getExprValue", /* @__PURE__ */ h((e, s, r, i) => {
1628
+ E(this, "getExprValue", /* @__PURE__ */ h((e, s, r, o) => {
1633
1629
  if (typeof e < "u")
1634
1630
  try {
1635
1631
  r = parseInt(r);
1636
- const o = e.replace("()", "");
1637
- return t(this, L)[o] ? t(this, L)[o].call(this, s, r, t(this, m)) : t(this, L).exprFunction(e).call(this, s, r, t(this, L).data);
1632
+ const i = e.replace("()", "");
1633
+ return t(this, L)[i] ? t(this, L)[i].call(this, s, r, t(this, y)) : t(this, L).exprFunction(e).call(this, s, r, t(this, L).data);
1638
1634
  } catch {
1639
1635
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1640
1636
  }
@@ -1643,29 +1639,29 @@ const Ke = class Ke extends Re {
1643
1639
  }, "getExprValue"));
1644
1640
  }
1645
1641
  connectedCallback() {
1646
- super.connectedCallback(), p(this, L, this.getRootNode().host), p(this, m, this.closest("th,td")), p(this, Nt, t(this, m).closest("tr"));
1642
+ super.connectedCallback(), p(this, L, this.getRootNode().host), p(this, y, this.closest("th,td")), p(this, Nt, t(this, y).closest("tr"));
1647
1643
  }
1648
1644
  get value() {
1649
- var e = !t(this, L) || !t(this, L).dataManager || !t(this, m) || !t(this, m).dataset || !t(this, m).dataset.row || !t(this, m).dataset.bind ? "" : t(this, m).closest("tr").data[t(this, m).dataset.bind];
1645
+ var e = !t(this, L) || !t(this, L).dataManager || !t(this, y) || !t(this, y).dataset || !t(this, y).dataset.row || !t(this, y).dataset.bind ? "" : t(this, y).closest("tr").data[t(this, y).dataset.bind];
1650
1646
  return e ?? "";
1651
1647
  }
1652
1648
  set value(e) {
1653
- var s = parseInt(t(this, m).dataset.row);
1649
+ var s = parseInt(t(this, y).dataset.row);
1654
1650
  const r = this.getAttribute("update-row-state") != "false";
1655
- s < 0 ? t(this, L).data.setValueNF(parseInt(t(this, m).dataset.index), t(this, m).dataset.bind, e, r) : t(this, L).data.setValue(s, t(this, m).dataset.bind, e, r);
1651
+ s < 0 ? t(this, L).data.setValueNF(parseInt(t(this, y).dataset.index), t(this, y).dataset.bind, e, r) : t(this, L).data.setValue(s, t(this, y).dataset.bind, e, r);
1656
1652
  }
1657
1653
  get row() {
1658
- return parseInt(t(this, m).dataset.row);
1654
+ return parseInt(t(this, y).dataset.row);
1659
1655
  }
1660
1656
  get data() {
1661
- return t(this, m).closest("tr").data;
1657
+ return t(this, y).closest("tr").data;
1662
1658
  }
1663
1659
  refresh() {
1664
- const e = t(this, m).dataset.bind;
1665
- return parseInt(t(this, m).dataset.row), t(this, Nt).data[e];
1660
+ const e = t(this, y).dataset.bind;
1661
+ return parseInt(t(this, y).dataset.row), t(this, Nt).data[e];
1666
1662
  }
1667
1663
  };
1668
- L = new WeakMap(), Nt = new WeakMap(), m = new WeakMap(), Me = new WeakMap(), Ie = new WeakMap(), $e = new WeakMap(), _e = new WeakMap(), Ne = new WeakMap(), h(Ke, "CellElement");
1664
+ L = new WeakMap(), Nt = new WeakMap(), y = new WeakMap(), Me = new WeakMap(), Ie = new WeakMap(), $e = new WeakMap(), _e = new WeakMap(), Ne = new WeakMap(), h(Ke, "CellElement");
1669
1665
  let qe = Ke;
1670
1666
  const Ze = class Ze extends qe {
1671
1667
  constructor() {
@@ -1727,8 +1723,8 @@ const Ge = class Ge extends Te {
1727
1723
  d(this, ze, /* @__PURE__ */ h((e) => {
1728
1724
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1729
1725
  if (t(this, lt) == "number") {
1730
- let i = [];
1731
- if (t(this, X) && Number(t(this, X)) > 0 && i.push("."), t(this, yt) && Number(t(this, yt)) >= 0 && i.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !i.includes(e.key) && e.preventDefault(), t(this, X) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1726
+ let o = [];
1727
+ if (t(this, X) && Number(t(this, X)) > 0 && o.push("."), t(this, yt) && Number(t(this, yt)) >= 0 && o.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !o.includes(e.key) && e.preventDefault(), t(this, X) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1732
1728
  var s = e.target.value, r = s.indexOf(".");
1733
1729
  if (r >= 0) {
1734
1730
  var s = s.substr(r + 1, s.length);