@ninebone/table 0.0.779 β†’ 0.0.781

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,8 +44,8 @@ const es = class es extends HTMLElement {
44
44
  if (!t(this, j) || !t(this, E) || t(this, G)) return;
45
45
  const e = t(this, E).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const r = t(this, E).track, i = t(this, E).thumb, o = t(this, j).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
48
- if (a !== 0 && c > a)
47
+ const r = t(this, E).track, a = t(this, E).thumb, o = t(this, j).querySelector(".ng-container-bottom"), i = e.clientWidth, c = s.scrollWidth;
48
+ if (i !== 0 && c > i)
49
49
  o && (o.style.display = "flex");
50
50
  else {
51
51
  o && (o.style.display = "none");
@@ -53,31 +53,31 @@ const es = class es extends HTMLElement {
53
53
  }
54
54
  const l = r.clientWidth;
55
55
  if (l <= 0) return;
56
- const u = Math.max(Math.min(l * (a / c), l), 20);
57
- i.style.width = `${u}px`;
58
- const f = e.scrollLeft, b = c - a;
59
- let g = 0;
60
- b > 0 && (g = parseInt(f / b * (l - u), 10)), g < 0 && (g = 0);
61
- const p = l - u;
62
- g > p && (g = p), i.style.left = `${g}px`, t(this, E).left.disabled = g === 0, t(this, E).right.disabled = g >= p - 1;
56
+ const g = Math.max(Math.min(l * (i / c), l), 20);
57
+ a.style.width = `${g}px`;
58
+ const f = e.scrollLeft, b = c - i;
59
+ let u = 0;
60
+ b > 0 && (u = parseInt(f / b * (l - g), 10)), u < 0 && (u = 0);
61
+ const p = l - g;
62
+ u > p && (u = p), a.style.left = `${u}px`, t(this, E).left.disabled = u === 0, t(this, E).right.disabled = u >= p - 1;
63
63
  }, "refresh"));
64
64
  d(this, nt, /* @__PURE__ */ h((e) => {
65
65
  if (!t(this, E)) return !1;
66
66
  const s = t(this, E).container, r = s.querySelector("table");
67
67
  if (!r) return !1;
68
- const i = t(this, E).track.getBoundingClientRect(), o = t(this, E).thumb.clientWidth;
69
- let a = e;
70
- a < 0 && (a = 0);
71
- const c = i.width - o;
72
- a > c && (a = c), a = parseInt(a, 10), t(this, E).thumb.style.left = `${a}px`, t(this, E).left.disabled = a === 0, t(this, E).right.disabled = a >= c - 1;
68
+ const a = t(this, E).track.getBoundingClientRect(), o = t(this, E).thumb.clientWidth;
69
+ let i = e;
70
+ i < 0 && (i = 0);
71
+ const c = a.width - o;
72
+ i > c && (i = c), i = parseInt(i, 10), t(this, E).thumb.style.left = `${i}px`, t(this, E).left.disabled = i === 0, t(this, E).right.disabled = i >= c - 1;
73
73
  const l = s.clientWidth, f = r.scrollWidth - l;
74
- return c > 0 && f > 0 && (s.scrollLeft = a / c * f), a > 0 && a < c - 1;
74
+ return c > 0 && f > 0 && (s.scrollLeft = i / c * f), i > 0 && i < c - 1;
75
75
  }, "#thumbMoveTo"));
76
76
  d(this, Qt, /* @__PURE__ */ h(() => {
77
77
  const e = /* @__PURE__ */ h((r) => {
78
78
  clearInterval(t(this, tt)), clearInterval(t(this, et));
79
- const i = parseInt(t(this, E).thumb.style.left || 0, 10);
80
- t(this, nt).call(this, i + r), y(this, tt, setInterval(() => {
79
+ const a = parseInt(t(this, E).thumb.style.left || 0, 10);
80
+ t(this, nt).call(this, a + r), y(this, tt, setInterval(() => {
81
81
  clearInterval(t(this, tt)), y(this, et, setInterval(() => {
82
82
  const o = parseInt(t(this, E).thumb.style.left || 0, 10);
83
83
  t(this, nt).call(this, o + r) || clearInterval(t(this, et));
@@ -95,19 +95,19 @@ const es = class es extends HTMLElement {
95
95
  }), t(this, E).left.addEventListener("touchstart", () => e(-20)), t(this, E).right.addEventListener("touchstart", () => e(20)), t(this, E).track.addEventListener("mousedown", (r) => {
96
96
  if (r.button !== 0) return;
97
97
  r.preventDefault();
98
- const i = t(this, E).track.getBoundingClientRect(), o = t(this, E).thumb.clientWidth;
99
- t(this, nt).call(this, r.clientX - i.left - o / 2);
98
+ const a = t(this, E).track.getBoundingClientRect(), o = t(this, E).thumb.clientWidth;
99
+ t(this, nt).call(this, r.clientX - a.left - o / 2);
100
100
  }), t(this, E).thumb.addEventListener("mousedown", (r) => {
101
101
  if (r.button !== 0) return;
102
102
  r.stopPropagation(), r.preventDefault(), y(this, G, !0), this.shiftX = r.clientX - t(this, E).thumb.getBoundingClientRect().left;
103
- const i = /* @__PURE__ */ h((a) => {
103
+ const a = /* @__PURE__ */ h((i) => {
104
104
  if (!t(this, G)) return;
105
105
  const c = t(this, E).track.getBoundingClientRect();
106
- t(this, nt).call(this, a.clientX - c.left - this.shiftX);
106
+ t(this, nt).call(this, i.clientX - c.left - this.shiftX);
107
107
  }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
108
- y(this, G, !1), s(), document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", o), this.refresh();
108
+ y(this, G, !1), s(), document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", o), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", i), document.addEventListener("mouseup", o);
110
+ document.addEventListener("mousemove", a), document.addEventListener("mouseup", o);
111
111
  });
112
112
  }, "#init"));
113
113
  }
@@ -213,52 +213,52 @@ const ss = class ss extends HTMLElement {
213
213
  d(this, It, 0);
214
214
  q(this, "refresh", /* @__PURE__ */ h(() => {
215
215
  if (S.log("vscrollbar.refresh"), !t(this, rt) || !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, rt).data.length, a = t(this, ot).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, a = e.clientHeight, o = t(this, rt).data.length, i = t(this, ot).getRowHeight(), c = o * i;
217
+ if (c <= a || o === 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 u = Math.max(Math.min(l * (i / c), l), 20);
225
- r.style.height = `${u}px`;
226
- const f = e.scrollTop, b = Math.max(c - i, 1);
224
+ const g = Math.max(Math.min(l * (a / c), l), 20);
225
+ r.style.height = `${g}px`;
226
+ const f = e.scrollTop, b = Math.max(c - a, 1);
227
227
  S.log(e, f, b);
228
- let g = 0;
229
- b > 0 && (g = f / b * (l - u));
230
- const p = l - u;
231
- g < 0 && (g = 0), g > p && (g = p), r.style.top = `${g}px`, t(this, k).top.disabled = f <= 0, t(this, k).bottom.disabled = f >= b - 1;
228
+ let u = 0;
229
+ b > 0 && (u = f / b * (l - g));
230
+ const p = l - g;
231
+ u < 0 && (u = 0), u > p && (u = p), r.style.top = `${u}px`, t(this, k).top.disabled = f <= 0, t(this, k).bottom.disabled = f >= b - 1;
232
232
  }, "refresh"));
233
233
  d(this, te, /* @__PURE__ */ h(() => {
234
234
  S.log("nine-table-vscrollbar.#init");
235
235
  const e = t(this, k).container, s = /* @__PURE__ */ h(() => {
236
- const i = (t(this, rt).data.get() || []).length, o = t(this, ot).getRowHeight();
237
- return i * o;
236
+ const a = (t(this, rt).data.get() || []).length, o = t(this, ot).getRowHeight();
237
+ return a * o;
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(), y(this, yt, !0), y(this, kt, r.clientY), y(this, It, e.scrollTop);
242
- const i = /* @__PURE__ */ h((a) => {
242
+ const a = /* @__PURE__ */ h((i) => {
243
243
  if (!t(this, yt)) return;
244
- const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, f = c.height - l, b = a.clientY - t(this, kt), g = e.clientHeight, p = s(), x = Math.max(p - g, 1);
244
+ const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, f = c.height - l, b = i.clientY - t(this, kt), u = e.clientHeight, p = s(), x = Math.max(p - u, 1);
245
245
  if (f > 0 && x > 0) {
246
246
  const w = b / f * x;
247
247
  let m = t(this, It) + w;
248
- const T = Math.max(0, p - g);
248
+ const T = Math.max(0, p - u);
249
249
  m < 0 && (m = 0), m > T && (m = T), e.scrollTop = m;
250
250
  }
251
251
  this.refresh();
252
252
  }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
253
- y(this, yt, !1), document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", o), this.refresh();
253
+ y(this, yt, !1), document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", o), this.refresh();
254
254
  }, "onMouseUp");
255
- document.addEventListener("mousemove", i), document.addEventListener("mouseup", o);
255
+ document.addEventListener("mousemove", a), document.addEventListener("mouseup", o);
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, u = e.clientHeight, f = s(), b = Math.max(f - u, 1);
258
+ const a = t(this, k).track.getBoundingClientRect(), o = t(this, k).thumb.clientHeight, i = r.clientY - a.top - o / 2, l = a.height - o, g = e.clientHeight, f = s(), b = Math.max(f - g, 1);
259
259
  if (l > 0 && b > 0) {
260
- const g = Math.max(0, Math.min(1, a / l));
261
- e.scrollTop = g * b;
260
+ const u = Math.max(0, Math.min(1, i / l));
261
+ e.scrollTop = u * b;
262
262
  }
263
263
  this.refresh();
264
264
  }), t(this, k).top.addEventListener("click", () => {
@@ -353,7 +353,7 @@ const ss = class ss extends HTMLElement {
353
353
  rt = new WeakMap(), ot = new WeakMap(), yt = new WeakMap(), k = new WeakMap(), kt = new WeakMap(), It = new WeakMap(), te = new WeakMap(), h(ss, "NineTableVScrollBar");
354
354
  let Te = ss;
355
355
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Te);
356
- var U, R, it, Y, O, Z, at, Lt, Ye, Ve, ee, se, Mt, $t, Ht, ne, re, Nt, Ue, mt, _t, oe;
356
+ var U, R, it, Y, O, Z, at, Lt, Ye, Ve, ee, se, Mt, Ht, $t, ne, re, Nt, Ue, mt, _t, oe;
357
357
  const ns = class ns {
358
358
  constructor(n) {
359
359
  d(this, U);
@@ -372,38 +372,36 @@ const ns = class ns {
372
372
  var e;
373
373
  S.log("rowManager.refresh");
374
374
  const n = t(this, R).querySelector(".ng-container-body .ng-part-body");
375
- n && (t(this, Mt).call(this), t(this, $t).call(this), t(this, mt).call(this, n.scrollTop), (e = t(this, R).querySelector("nine-table-vscrollbar")) == null || e.refresh());
375
+ n && (t(this, Mt).call(this), t(this, Ht).call(this), t(this, mt).call(this, n.scrollTop), (e = t(this, R).querySelector("nine-table-vscrollbar")) == null || e.refresh());
376
376
  }, "refresh"));
377
377
  q(this, "initialize", /* @__PURE__ */ h(() => {
378
378
  S.log("rowManager.initialize"), y(this, it, {
379
379
  scrollTables: t(this, R).querySelectorAll(".ng-part-body table"),
380
380
  firstTr: t(this, R).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
381
  }), y(this, O, null), t(this, Y).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
382
- const i = t(this, R).querySelector(r);
383
- if (!i) return;
384
- const o = i.querySelector(".ng-part-body table");
385
- if (!o) return;
386
- const a = o.querySelector("tbody.bindable-tbody");
382
+ const a = t(this, R).querySelector(r);
387
383
  if (!a) return;
388
- const l = Array.from(a.querySelectorAll("tr")).map((u) => u.cloneNode(!0));
384
+ const o = a.querySelector(".ng-part-body table");
385
+ if (!o) return;
386
+ const i = o.querySelector("tbody.bindable-tbody");
387
+ if (!i) return;
388
+ const l = Array.from(i.querySelectorAll("tr")).map((g) => g.cloneNode(!0));
389
389
  t(this, Y).set(r, l);
390
390
  });
391
391
  const n = t(this, R).querySelector(".ng-container-body .ng-part-body"), e = t(this, R).querySelector(".ng-container-left .ng-part-body"), s = t(this, R).querySelector(".ng-container-right .ng-part-body");
392
392
  if (t(this, R).querySelector(".ng-container-body .ng-part-header"), t(this, R).querySelector(".ng-container-body .ng-part-footer"), n) {
393
- t(this, Mt).call(this), t(this, Nt).call(this), t(this, $t).call(this), t(this, mt).call(this, n.scrollTop);
393
+ t(this, Mt).call(this), t(this, Nt).call(this), t(this, Ht).call(this), t(this, mt).call(this, n.scrollTop);
394
394
  let r = !1;
395
- const i = /* @__PURE__ */ h((o) => {
395
+ const a = /* @__PURE__ */ h((o) => {
396
396
  var f;
397
397
  if (r) return;
398
398
  r = !0;
399
- const a = o.scrollTop, c = o.scrollLeft;
400
- S.log(`πŸ–±οΈ [Scroll Event] source: ${o.className}, scrollTop: ${a}, scrollLeft: ${c}`);
401
- const l = t(this, R).querySelector(".ng-container-body .ng-part-header"), u = t(this, R).querySelector(".ng-container-left .ng-part-header");
402
- t(this, R).querySelector(".ng-container-right .ng-part-header"), S.log(`헀더 μƒνƒœ 확인 -> bodyHeader.scrollLeft: ${l == null ? void 0 : l.scrollLeft}, leftHeader: ${u == null ? void 0 : u.scrollLeft}`), n && n.scrollTop !== a && (n.scrollTop = a), e && e.scrollTop !== a && (e.scrollTop = a), s && s.scrollTop !== a && (s.scrollTop = a), t(this, mt).call(this, a), (f = t(this, R).querySelector("nine-table-vscrollbar")) == null || f.refresh(), r = !1;
399
+ const i = o.scrollTop, c = o.scrollLeft, l = t(this, R).querySelector(".ng-container-body .ng-part-header"), g = t(this, R).querySelector(".ng-container-left .ng-part-body");
400
+ S.log(`πŸ” [Scroll] source: ${o.className.trim()} | scrollLeft: ${c} | bodyHeader.scrollLeft: ${l == null ? void 0 : l.scrollLeft} | leftContainer.scrollLeft: ${g == null ? void 0 : g.scrollLeft}`), n && n.scrollTop !== i && (n.scrollTop = i), g && g.scrollTop !== i && (g.scrollTop = i), s && s.scrollTop !== i && (s.scrollTop = i), t(this, mt).call(this, i), (f = t(this, R).querySelector("nine-table-vscrollbar")) == null || f.refresh(), r = !1;
403
401
  }, "handleContainerScroll");
404
402
  [n, e, s].forEach((o) => {
405
- o == null || o.addEventListener("scroll", (a) => {
406
- S.log(a), S.log("rowManager.scroll event"), i(o);
403
+ o == null || o.addEventListener("scroll", (i) => {
404
+ S.log(i), S.log("rowManager.scroll event"), a(o);
407
405
  });
408
406
  });
409
407
  }
@@ -414,13 +412,13 @@ const ns = class ns {
414
412
  if (!s || s.length === 0) return;
415
413
  const r = n.querySelector(".ng-part-body tbody.bindable-tbody");
416
414
  if (!r) return;
417
- r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
418
- const i = r.querySelector("tr.nodata"), o = document.createDocumentFragment();
419
- for (let a = 0; a < t(this, Lt); a++)
415
+ r.querySelectorAll("tr:not(.nodata)").forEach((i) => i.remove());
416
+ const a = r.querySelector("tr.nodata"), o = document.createDocumentFragment();
417
+ for (let i = 0; i < t(this, Lt); i++)
420
418
  s.forEach((c) => {
421
419
  o.appendChild(c.cloneNode(!0));
422
420
  });
423
- i ? i.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this, it).firstTr = r.querySelector("tr:not(.nodata)"));
421
+ a ? a.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this, it).firstTr = r.querySelector("tr:not(.nodata)"));
424
422
  }, "#renderRows"));
425
423
  d(this, Mt, /* @__PURE__ */ h(() => {
426
424
  if (t(this, O) !== null && t(this, O) > 0)
@@ -432,63 +430,63 @@ const ns = class ns {
432
430
  const s = n.querySelector("tbody.bindable-tbody");
433
431
  if (S.log(s), !s) throw new Error("invalid dom");
434
432
  s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
435
- const r = s.querySelector("tr.nodata"), i = document.createDocumentFragment();
433
+ const r = s.querySelector("tr.nodata"), a = document.createDocumentFragment();
436
434
  e.forEach((b) => {
437
- i.appendChild(b.cloneNode(!0));
438
- }), r ? r.before(i) : s.appendChild(i);
439
- const o = t(this, R), a = o.style.display, c = o.style.visibility, l = o.style.position;
440
- (a === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
441
- let u = 0;
435
+ a.appendChild(b.cloneNode(!0));
436
+ }), r ? r.before(a) : s.appendChild(a);
437
+ const o = t(this, R), i = o.style.display, c = o.style.visibility, l = o.style.position;
438
+ (i === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
439
+ let g = 0;
442
440
  const f = s.querySelectorAll("tr");
443
441
  return f.forEach((b) => {
444
- let g = b.offsetHeight || b.getBoundingClientRect().height;
445
- if (g === 0) {
442
+ let u = b.offsetHeight || b.getBoundingClientRect().height;
443
+ if (u === 0) {
446
444
  const p = window.getComputedStyle(b);
447
- g = parseFloat(p.height) || parseFloat(p.minHeight) || 0;
445
+ u = parseFloat(p.height) || parseFloat(p.minHeight) || 0;
448
446
  }
449
- u += g;
450
- }), f.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, u <= 0 ? -1 : (y(this, O, u), t(this, Ht).call(this), t(this, O));
447
+ g += u;
448
+ }), f.forEach((b) => b.remove()), o.style.display = i, o.style.visibility = c, o.style.position = l, g <= 0 ? -1 : (y(this, O, g), t(this, $t).call(this), t(this, O));
451
449
  }, "#measureAndCacheHeight"));
452
- d(this, $t, /* @__PURE__ */ h(() => {
450
+ d(this, Ht, /* @__PURE__ */ h(() => {
453
451
  S.log("rowManager.#updateVirtualScrollHeight");
454
452
  const e = (t(this, U).data.get() || []).length, s = t(this, O), r = e * s;
455
- S.log("πŸ” [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
456
- const o = t(this, R).querySelector(i);
453
+ S.log("πŸ” [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
454
+ const o = t(this, R).querySelector(a);
457
455
  if (!o) return;
458
- const a = o.querySelector(".ng-part-body .ng-virtual-spacer");
459
- a && (a.style.height = `${r}px`);
456
+ const i = o.querySelector(".ng-part-body .ng-virtual-spacer");
457
+ i && (i.style.height = `${r}px`);
460
458
  });
461
459
  }, "#updateVirtualScrollHeight"));
462
- d(this, Ht, /* @__PURE__ */ h(() => {
460
+ d(this, $t, /* @__PURE__ */ h(() => {
463
461
  if (t(this, at) > 0 && t(this, O) > 0) {
464
462
  const n = Math.ceil(t(this, at) / t(this, O));
465
463
  y(this, Lt, n + t(this, ee));
466
464
  }
467
465
  }, "#updateRowCount"));
468
466
  d(this, ne, /* @__PURE__ */ h(() => {
469
- var a, c, l, u, f, b;
467
+ var i, c, l, g, f, b;
470
468
  const n = t(this, R).querySelector(".ng-container-left .ng-part-body table"), e = t(this, R).querySelector(".ng-container-body .ng-part-body table"), s = t(this, R).querySelector(".ng-container-right .ng-part-body table");
471
469
  if (e) {
472
- const g = n ? Array.from(n.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), x = s ? Array.from(s.querySelectorAll("tbody tr")) : [], w = Math.max(g.length, p.length, x.length);
470
+ const u = n ? Array.from(n.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), x = s ? Array.from(s.querySelectorAll("tbody tr")) : [], w = Math.max(u.length, p.length, x.length);
473
471
  for (let m = 0; m < w; m++) {
474
472
  const T = [
475
- ((a = g[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
473
+ ((i = u[m]) == null ? void 0 : i.getBoundingClientRect().height) || 0,
476
474
  ((c = p[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
477
475
  ((l = x[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
478
476
  ], A = Math.max(...T);
479
- A > 0 && (g[m] && (g[m].style.height = `${A}px`), p[m] && (p[m].style.height = `${A}px`), x[m] && (x[m].style.height = `${A}px`));
477
+ A > 0 && (u[m] && (u[m].style.height = `${A}px`), p[m] && (p[m].style.height = `${A}px`), x[m] && (x[m].style.height = `${A}px`));
480
478
  }
481
479
  }
482
- const r = t(this, R).querySelector(".ng-container-left .ng-part-footer table"), i = t(this, R).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, R).querySelector(".ng-container-right .ng-part-footer table");
483
- if (i) {
484
- const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], p = Array.from(i.querySelectorAll("tfoot tr")), x = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], w = Math.max(g.length, p.length, x.length);
480
+ const r = t(this, R).querySelector(".ng-container-left .ng-part-footer table"), a = t(this, R).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, R).querySelector(".ng-container-right .ng-part-footer table");
481
+ if (a) {
482
+ const u = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], p = Array.from(a.querySelectorAll("tfoot tr")), x = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], w = Math.max(u.length, p.length, x.length);
485
483
  for (let m = 0; m < w; m++) {
486
484
  const T = [
487
- ((u = g[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
485
+ ((g = u[m]) == null ? void 0 : g.getBoundingClientRect().height) || 0,
488
486
  ((f = p[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
489
487
  ((b = x[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
490
488
  ], A = Math.max(...T);
491
- A > 0 && (g[m] && (g[m].style.height = `${A}px`), p[m] && (p[m].style.height = `${A}px`), x[m] && (x[m].style.height = `${A}px`));
489
+ A > 0 && (u[m] && (u[m].style.height = `${A}px`), p[m] && (p[m].style.height = `${A}px`), x[m] && (x[m].style.height = `${A}px`));
492
490
  }
493
491
  }
494
492
  }, "#syncRowHeights"));
@@ -499,11 +497,11 @@ const ns = class ns {
499
497
  if (!s.classList.contains("active")) continue;
500
498
  const r = e.contentRect.height;
501
499
  if (r > 0) {
502
- let i = 0;
503
- const o = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
504
- o && (i += o.offsetHeight), a && (i += a.offsetHeight);
505
- const c = Math.max(r - i, 100);
506
- t(this, at) !== c && (y(this, at, c), t(this, Ht).call(this), t(this, O) !== null && (t(this, Nt).call(this), this.refresh()));
500
+ let a = 0;
501
+ const o = s.querySelector(".ng-part-header"), i = s.querySelector(".ng-part-footer");
502
+ o && (a += o.offsetHeight), i && (a += i.offsetHeight);
503
+ const c = Math.max(r - a, 100);
504
+ t(this, at) !== c && (y(this, at, c), t(this, $t).call(this), t(this, O) !== null && (t(this, Nt).call(this), this.refresh()));
507
505
  }
508
506
  }
509
507
  })), t(this, Z).observe(t(this, R)));
@@ -521,15 +519,15 @@ const ns = class ns {
521
519
  if (!s) return;
522
520
  const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
523
521
  if (!r) return;
524
- const i = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, Y).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, U).data.get() || []).length;
525
- i.forEach((u, f) => {
522
+ const a = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, Y).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, U).data.get() || []).length;
523
+ a.forEach((g, f) => {
526
524
  const b = n + Math.floor(f / o);
527
525
  if (b >= c) {
528
- u.style.visibility = "hidden";
526
+ g.style.visibility = "hidden";
529
527
  return;
530
528
  }
531
- const g = t(this, U).data.get(b);
532
- u.style.display = "", t(this, _t).call(this, u, g, b);
529
+ const u = t(this, U).data.get(b);
530
+ g.style.display = "", t(this, _t).call(this, g, u, b);
533
531
  });
534
532
  });
535
533
  }, "#adjustBufferRows"));
@@ -539,21 +537,21 @@ const ns = class ns {
539
537
  if (!e || e <= 0) return;
540
538
  const s = t(this, U).data.length;
541
539
  if (s === 0) return;
542
- const r = ((f = t(this, Y).get(".ng-container-body")) == null ? void 0 : f.length) || 1, i = t(this, R).querySelector(".ng-container-body .ng-part-body");
543
- S.log("bodyContainer.clientHeight", i.clientHeight);
544
- const o = Math.max(0, s - Math.floor(i.clientHeight / e)), a = Math.min(o, Math.max(0, Math.floor(n / e)));
545
- let c = Math.floor(a * e);
546
- S.log(`πŸ“œ [Scroll Calc] maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`), a === o && S.log(`πŸ“œ [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`);
547
- const l = t(this, it).firstTr, u = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
548
- (b = t(this, it)) == null || b.scrollTables.forEach((g) => {
549
- g.style.transform = `translate3d(0, ${c}px, 0)`;
550
- }), u !== a && (S.log(`πŸ”„ [Row Bind Trigger] currentStartIndex(${u}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
551
- const p = t(this, R).querySelector(g);
540
+ const r = ((f = t(this, Y).get(".ng-container-body")) == null ? void 0 : f.length) || 1, a = t(this, R).querySelector(".ng-container-body .ng-part-body");
541
+ S.log("bodyContainer.clientHeight", a.clientHeight);
542
+ const o = Math.max(0, s - Math.floor(a.clientHeight / e)), i = Math.min(o, Math.max(0, Math.floor(n / e)));
543
+ let c = Math.floor(i * e);
544
+ S.log(`πŸ“œ [Scroll Calc] maxStartIndex: ${o}, startIndex: ${i}, offsetY: ${c}`), i === o && S.log(`πŸ“œ [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${o}, startIndex: ${i}, offsetY: ${c}`);
545
+ const l = t(this, it).firstTr, g = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
546
+ (b = t(this, it)) == null || b.scrollTables.forEach((u) => {
547
+ u.style.transform = `translate3d(0, ${c}px, 0)`;
548
+ }), g !== i && (S.log(`πŸ”„ [Row Bind Trigger] currentStartIndex(${g}) !== startIndex(${i})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
549
+ const p = t(this, R).querySelector(u);
552
550
  if (!p) return;
553
551
  const x = p.querySelector(".ng-part-body tbody.bindable-tbody");
554
552
  if (!x) return;
555
553
  Array.from(x.querySelectorAll("tr:not(.nodata)")).forEach((m, T) => {
556
- const A = a + Math.floor(T / r);
554
+ const A = i + Math.floor(T / r);
557
555
  if (A >= s) {
558
556
  m.style.display = "none";
559
557
  return;
@@ -578,25 +576,25 @@ const ns = class ns {
578
576
  });
579
577
  }; */
580
578
  d(this, _t, /* @__PURE__ */ h((n, e, s) => {
581
- 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, a) => {
582
580
  r.dataset.row = s;
583
- const o = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
581
+ const o = Array.from(r.children).find((i) => i.tagName.toLowerCase().startsWith("cell-") || typeof i.refresh == "function");
584
582
  o && typeof o.refresh == "function" && o.refresh();
585
583
  });
586
584
  }, "#bindRowData"));
587
585
  d(this, oe, /* @__PURE__ */ h(() => {
588
- var c, l, u;
586
+ var c, l, g;
589
587
  S.log("rowManager.#syncHeaderHeights");
590
588
  const n = t(this, R).querySelector(".ng-container-left .ng-part-header table"), e = t(this, R).querySelector(".ng-container-body .ng-part-header table"), s = t(this, R).querySelector(".ng-container-right .ng-part-header table");
591
589
  if (!e) return;
592
- 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);
593
- for (let f = 0; f < a; f++) {
590
+ const r = n ? Array.from(n.querySelectorAll("tr")) : [], a = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], i = Math.max(r.length, a.length, o.length);
591
+ for (let f = 0; f < i; f++) {
594
592
  const b = [
595
593
  ((c = r[f]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
596
- ((l = i[f]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
597
- ((u = o[f]) == null ? void 0 : u.getBoundingClientRect().height) || 0
598
- ], g = Math.max(...b);
599
- g > 0 && (r[f] && (r[f].style.height = `${g}px`), i[f] && (i[f].style.height = `${g}px`), o[f] && (o[f].style.height = `${g}px`));
594
+ ((l = a[f]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
595
+ ((g = o[f]) == null ? void 0 : g.getBoundingClientRect().height) || 0
596
+ ], u = Math.max(...b);
597
+ u > 0 && (r[f] && (r[f].style.height = `${u}px`), a[f] && (a[f].style.height = `${u}px`), o[f] && (o[f].style.height = `${u}px`));
600
598
  }
601
599
  }, "#syncHeaderHeights"));
602
600
  q(this, "destroy", /* @__PURE__ */ h(() => {
@@ -612,7 +610,7 @@ const ns = class ns {
612
610
  return ((e = t(this, Y).get(n)) == null ? void 0 : e.length) || 1;
613
611
  }
614
612
  };
615
- U = new WeakMap(), R = new WeakMap(), it = new WeakMap(), Y = new WeakMap(), O = new WeakMap(), Z = new WeakMap(), at = new WeakMap(), Lt = new WeakMap(), Ye = new WeakMap(), Ve = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), Mt = new WeakMap(), $t = new WeakMap(), Ht = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), Nt = new WeakMap(), Ue = new WeakMap(), mt = new WeakMap(), _t = new WeakMap(), oe = new WeakMap(), h(ns, "RowManager");
613
+ U = new WeakMap(), R = new WeakMap(), it = new WeakMap(), Y = new WeakMap(), O = new WeakMap(), Z = new WeakMap(), at = new WeakMap(), Lt = new WeakMap(), Ye = new WeakMap(), Ve = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), Mt = new WeakMap(), Ht = new WeakMap(), $t = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), Nt = new WeakMap(), Ue = new WeakMap(), mt = new WeakMap(), _t = new WeakMap(), oe = new WeakMap(), h(ns, "RowManager");
616
614
  let ke = ns;
617
615
  const ie = class ie {
618
616
  /**
@@ -626,70 +624,70 @@ const ie = class ie {
626
624
  */
627
625
  static compile(n) {
628
626
  if (!n) return null;
629
- const e = /* @__PURE__ */ h((a) => {
630
- a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
631
- const u = l.getAttribute("cell-type") || "renderer";
627
+ const e = /* @__PURE__ */ h((i) => {
628
+ i.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
629
+ const g = l.getAttribute("cell-type") || "renderer";
632
630
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
633
- let f = `cell-${u}`;
634
- const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), p = l.getAttribute("maxbyte"), x = l.getAttribute("type");
631
+ let f = `cell-${g}`;
632
+ const b = l.getAttribute("data-bind"), u = l.getAttribute("data-expr"), p = l.getAttribute("maxbyte"), x = l.getAttribute("type");
635
633
  let w = [];
636
- b && w.push(`data-bind="${b}"`), g && w.push(`data-expr="${g}"`), p && w.push(`maxbyte="${p}"`), x && w.push(`type="${x}"`), l.innerHTML = `<${f} ${w.join(" ")}></${f}>`;
637
- }), a.querySelectorAll("tbody td, tfoot td").forEach((l) => {
634
+ b && w.push(`data-bind="${b}"`), u && w.push(`data-expr="${u}"`), p && w.push(`maxbyte="${p}"`), x && w.push(`type="${x}"`), l.innerHTML = `<${f} ${w.join(" ")}></${f}>`;
635
+ }), i.querySelectorAll("tbody td, tfoot td").forEach((l) => {
638
636
  l.setAttribute("tabindex", "0");
639
637
  });
640
- }, "processCellTypes"), s = /* @__PURE__ */ h((a) => {
641
- if (!a.querySelector("colgroup")) {
642
- const c = a.querySelector("tbody tr") || a.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, u = document.createElement("colgroup"), f = Math.max(Math.floor(a.clientWidth / l), 100);
638
+ }, "processCellTypes"), s = /* @__PURE__ */ h((i) => {
639
+ if (!i.querySelector("colgroup")) {
640
+ const c = i.querySelector("tbody tr") || i.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, g = document.createElement("colgroup"), f = Math.max(Math.floor(i.clientWidth / l), 100);
643
641
  for (let b = 0; b < l; b++) {
644
- const g = document.createElement("col");
645
- g.setAttribute("width", f), u.appendChild(g);
642
+ const u = document.createElement("col");
643
+ u.setAttribute("width", f), g.appendChild(u);
646
644
  }
647
- a.prepend(u);
645
+ i.prepend(g);
648
646
  }
649
- if (!a.querySelector("thead")) {
650
- const c = document.createElement("thead"), l = a.querySelector("colgroup");
651
- l ? l.after(c) : a.prepend(c);
647
+ if (!i.querySelector("thead")) {
648
+ const c = document.createElement("thead"), l = i.querySelector("colgroup");
649
+ l ? l.after(c) : i.prepend(c);
652
650
  }
653
- a.classList.add("nine-table-element");
654
- }, "ensureTableStructure"), r = /* @__PURE__ */ h((a, c) => {
655
- const l = Array.from(a.querySelectorAll(c + " tr")), u = Array.from(a.querySelectorAll(c + " th," + c + " td")), f = l.length;
656
- if (f === 0 || u.length === 0) return;
651
+ i.classList.add("nine-table-element");
652
+ }, "ensureTableStructure"), r = /* @__PURE__ */ h((i, c) => {
653
+ const l = Array.from(i.querySelectorAll(c + " tr")), g = Array.from(i.querySelectorAll(c + " th," + c + " td")), f = l.length;
654
+ if (f === 0 || g.length === 0) return;
657
655
  let b = 0;
658
- u.forEach((p) => {
656
+ g.forEach((p) => {
659
657
  b += p.colSpan || 1;
660
658
  });
661
- const g = Array.from(Array(f), () => Array(b).fill(null));
659
+ const u = Array.from(Array(f), () => Array(b).fill(null));
662
660
  l.forEach((p) => {
663
661
  const x = p.sectionRowIndex;
664
662
  let w = 0;
665
663
  Array.from(p.querySelectorAll("th,td")).forEach((m) => {
666
- for (let M = 0; M < g[x].length; M++)
667
- if (g[x][M] === null) {
664
+ for (let M = 0; M < u[x].length; M++)
665
+ if (u[x][M] === null) {
668
666
  w = M;
669
667
  break;
670
668
  }
671
669
  const T = m.rowSpan || 1, A = m.colSpan || 1;
672
670
  for (let M = 0; M < T; M++)
673
671
  for (let B = 0; B < A; B++)
674
- x + M < f && w + B < b && (g[x + M][w + B] = M === 0 && B === 0 ? "1" : "0");
672
+ x + M < f && w + B < b && (u[x + M][w + B] = M === 0 && B === 0 ? "1" : "0");
675
673
  });
676
674
  }), l.forEach((p) => {
677
675
  const x = p.sectionRowIndex;
678
676
  Array.from(p.querySelectorAll("th,td")).forEach((w) => {
679
- for (let m = 0; m < g[x].length; m++)
680
- if (g[x][m] === "1") {
681
- w.dataset.col = m, g[x][m] = "0";
677
+ for (let m = 0; m < u[x].length; m++)
678
+ if (u[x][m] === "1") {
679
+ w.dataset.col = m, u[x][m] = "0";
682
680
  break;
683
681
  }
684
682
  });
685
683
  });
686
- }, "resetColIndex"), i = n.cloneNode(!0);
687
- return s(i), e(i), r(i, "thead"), r(i, "tbody"), r(i, "tfoot"), Array.from(i.querySelectorAll("colgroup col")).forEach((a, c) => {
688
- const l = a.getAttribute("fixed");
689
- l && i.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((u) => {
690
- u.setAttribute("fixed", l);
684
+ }, "resetColIndex"), a = n.cloneNode(!0);
685
+ return s(a), e(a), r(a, "thead"), r(a, "tbody"), r(a, "tfoot"), Array.from(a.querySelectorAll("colgroup col")).forEach((i, c) => {
686
+ const l = i.getAttribute("fixed");
687
+ l && a.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((g) => {
688
+ g.setAttribute("fixed", l);
691
689
  });
692
- }), i;
690
+ }), a;
693
691
  }
694
692
  // 🎯 [μΆ”κ°€] td/th에 μ„ μ–Έλœ cell-type 속성을 읽어 μ»€μŠ€ν…€ νƒœκ·Έλ‘œ μžλ™ 감싸기
695
693
  };
@@ -704,11 +702,11 @@ const rs = class rs {
704
702
  q(this, "render", /* @__PURE__ */ h(() => {
705
703
  const { startRow: n, startCol: e, endRow: s, endCol: r } = t(this, X);
706
704
  S.log("🎨 [CellSelection.render] Rendering range ->", t(this, X));
707
- const i = t(this, N).querySelectorAll(
705
+ const a = t(this, N).querySelectorAll(
708
706
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
709
707
  );
710
- if (i.forEach((a) => {
711
- a.querySelectorAll(".selected, .selected-top, .selected-bottom, .selected-left, .selected-right").forEach((c) => {
708
+ if (a.forEach((i) => {
709
+ i.querySelectorAll(".selected, .selected-top, .selected-bottom, .selected-left, .selected-right").forEach((c) => {
712
710
  c.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
713
711
  });
714
712
  }), n < 0 || e < 0) {
@@ -716,14 +714,14 @@ const rs = class rs {
716
714
  return;
717
715
  }
718
716
  let o = 0;
719
- i.forEach((a) => {
720
- a.querySelectorAll("tbody tr").forEach((c) => {
717
+ a.forEach((i) => {
718
+ i.querySelectorAll("tbody tr").forEach((c) => {
721
719
  const { matrixRow: l } = V(this, K, qt).call(this, c);
722
- l < 0 || c.querySelectorAll("td, th").forEach((u) => {
723
- const f = parseInt(u.dataset.col, 10);
720
+ l < 0 || c.querySelectorAll("td, th").forEach((g) => {
721
+ const f = parseInt(g.dataset.col, 10);
724
722
  if (isNaN(f)) return;
725
- const b = parseInt(u.rowSpan || 1, 10), g = parseInt(u.colSpan || 1, 10), p = l + b - 1, x = f + g - 1;
726
- p >= n && l <= s && x >= e && f <= r && (o++, u.classList.add("selected"), S.log(u, n, e, s, r), l <= n && u.classList.add("selected-top"), p >= s && u.classList.add("selected-bottom"), f <= e && u.classList.add("selected-left"), x >= r && u.classList.add("selected-right"));
723
+ const b = parseInt(g.rowSpan || 1, 10), u = parseInt(g.colSpan || 1, 10), p = l + b - 1, x = f + u - 1;
724
+ p >= n && l <= s && x >= e && f <= r && (o++, g.classList.add("selected"), S.log(g, n, e, s, r), l <= n && g.classList.add("selected-top"), p >= s && g.classList.add("selected-bottom"), f <= e && g.classList.add("selected-left"), x >= r && g.classList.add("selected-right"));
727
725
  });
728
726
  });
729
727
  }), S.log(`✨ [CellSelection.render] Total rendered cells marked: ${o}`);
@@ -738,35 +736,35 @@ const rs = class rs {
738
736
  }
739
737
  setRange(n, e, s, r) {
740
738
  S.log(`πŸ” [CellSelection.setRange] Input -> startRow: ${n}, startCol: ${e}, endRow: ${s}, endCol: ${r}`);
741
- let i = Math.min(n, s), o = Math.max(n, s), a = Math.min(e, r), c = Math.max(e, r);
739
+ let a = Math.min(n, s), o = Math.max(n, s), i = Math.min(e, r), c = Math.max(e, r);
742
740
  const l = t(this, N).querySelectorAll(
743
741
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
744
742
  );
745
- let u = !0, f = 0;
746
- for (; u && f < 5; )
747
- u = !1, f++, l.forEach((b) => {
748
- b.querySelectorAll("tbody tr").forEach((g) => {
749
- if (g.classList.contains("nodata")) return;
750
- const { matrixRow: p } = V(this, K, qt).call(this, g);
751
- p < 0 || g.querySelectorAll("td, th").forEach((x) => {
743
+ let g = !0, f = 0;
744
+ for (; g && f < 5; )
745
+ g = !1, f++, l.forEach((b) => {
746
+ b.querySelectorAll("tbody tr").forEach((u) => {
747
+ if (u.classList.contains("nodata")) return;
748
+ const { matrixRow: p } = V(this, K, qt).call(this, u);
749
+ p < 0 || u.querySelectorAll("td, th").forEach((x) => {
752
750
  const w = parseInt(x.dataset.col, 10);
753
751
  if (isNaN(w)) return;
754
752
  const m = parseInt(x.rowSpan || 1, 10), T = parseInt(x.colSpan || 1, 10), A = p + m - 1, M = w + T - 1;
755
- if (A >= i && p <= o && M >= a && w <= c) {
756
- const z = Math.min(i, p), Gt = Math.max(o, A), bs = Math.min(a, w), ps = Math.max(c, M);
757
- (z !== i || Gt !== o || bs !== a || ps !== c) && (i = z, o = Gt, a = bs, c = ps, u = !0);
753
+ if (A >= a && p <= o && M >= i && w <= c) {
754
+ const W = Math.min(a, p), Gt = Math.max(o, A), bs = Math.min(i, w), ps = Math.max(c, M);
755
+ (W !== a || Gt !== o || bs !== i || ps !== c) && (a = W, o = Gt, i = bs, c = ps, g = !0);
758
756
  }
759
757
  });
760
758
  });
761
759
  });
762
- y(this, X, { startRow: i, startCol: a, endRow: o, endCol: c }), S.log("πŸ“¦ [CellSelection.setRange] Final Range ->", t(this, X)), this.render();
760
+ y(this, X, { startRow: a, startCol: i, endRow: o, endCol: c }), S.log("πŸ“¦ [CellSelection.setRange] Final Range ->", t(this, X)), this.render();
763
761
  }
764
762
  };
765
763
  N = new WeakMap(), X = new WeakMap(), K = new WeakSet(), qt = /* @__PURE__ */ h(function(n) {
766
764
  if (!n || n.classList.contains("nodata")) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
767
765
  const e = parseInt(n.dataset.row, 10);
768
766
  if (isNaN(e)) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
769
- const s = n.closest("tbody"), i = Array.from(s.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), o = i.indexOf(n), a = i.length > 0 ? i.length : 1, c = e * a + (o >= 0 ? o : n.sectionRowIndex % a);
767
+ const s = n.closest("tbody"), a = Array.from(s.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), o = a.indexOf(n), i = a.length > 0 ? a.length : 1, c = e * i + (o >= 0 ? o : n.sectionRowIndex % i);
770
768
  return { dataRow: e, subRowIndex: o, matrixRow: c };
771
769
  }, "#getMatrixRow"), ws = /* @__PURE__ */ h(function() {
772
770
  const n = t(this, N).querySelector(".ng-container-top");
@@ -779,37 +777,37 @@ N = new WeakMap(), X = new WeakMap(), K = new WeakSet(), qt = /* @__PURE__ */ h(
779
777
  const s = e.target.closest("td, th");
780
778
  if (!s || s.dataset.row === void 0 || s.dataset.col === void 0 || s.closest("tr").classList.contains("nodata")) return;
781
779
  t(this, N).style.userSelect = "none", t(this, N).style.webkitUserSelect = "none";
782
- const r = s.closest("tr"), { matrixRow: i } = V(this, K, qt).call(this, r), o = parseInt(s.dataset.col, 10);
783
- if (i < 0) {
780
+ const r = s.closest("tr"), { matrixRow: a } = V(this, K, qt).call(this, r), o = parseInt(s.dataset.col, 10);
781
+ if (a < 0) {
784
782
  t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "";
785
783
  return;
786
784
  }
787
- S.log(`πŸ–±οΈ [MouseDown Success] startRow: ${i}, startCol: ${o}`), t(this, N).navigation.currentCell = s;
788
- let a = i, c = o;
785
+ S.log(`πŸ–±οΈ [MouseDown Success] startRow: ${a}, startCol: ${o}`), t(this, N).navigation.currentCell = s;
786
+ let i = a, c = o;
789
787
  const l = /* @__PURE__ */ h((f) => {
790
788
  const b = document.elementFromPoint(f.clientX, f.clientY);
791
- let g = b == null ? void 0 : b.closest("td, th");
792
- if (!g || !t(this, N).contains(g)) {
789
+ let u = b == null ? void 0 : b.closest("td, th");
790
+ if (!u || !t(this, N).contains(u)) {
793
791
  const m = t(this, N).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
794
792
  for (const T of m) {
795
793
  const A = T.getBoundingClientRect();
796
794
  if (f.clientX >= A.left && f.clientX <= A.right && f.clientY >= A.top && f.clientY <= A.bottom) {
797
- g = T;
795
+ u = T;
798
796
  break;
799
797
  }
800
798
  }
801
799
  }
802
- if (!g || g.dataset.row === void 0 || g.dataset.col === void 0 || g.closest("tr").classList.contains("nodata")) return;
803
- const p = g.closest("tr"), { matrixRow: x } = V(this, K, qt).call(this, p), w = parseInt(g.dataset.col, 10);
804
- x < 0 || a === x && c === w || (a = x, c = w, this.setRange(i, o, x, w));
805
- }, "onMouseMove"), u = /* @__PURE__ */ h(() => {
806
- S.log("πŸ–±οΈ [MouseUp] Drag ended."), t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", u);
800
+ if (!u || u.dataset.row === void 0 || u.dataset.col === void 0 || u.closest("tr").classList.contains("nodata")) return;
801
+ const p = u.closest("tr"), { matrixRow: x } = V(this, K, qt).call(this, p), w = parseInt(u.dataset.col, 10);
802
+ x < 0 || i === x && c === w || (i = x, c = w, this.setRange(a, o, x, w));
803
+ }, "onMouseMove"), g = /* @__PURE__ */ h(() => {
804
+ S.log("πŸ–±οΈ [MouseUp] Drag ended."), t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", g);
807
805
  }, "onMouseUp");
808
- document.addEventListener("mousemove", l), document.addEventListener("mouseup", u);
806
+ document.addEventListener("mousemove", l), document.addEventListener("mouseup", g);
809
807
  });
810
808
  }, "#initEvents"), h(rs, "CellSelection");
811
809
  let Le = rs;
812
- var F, lt, ae, le, pt, $e, Ot, Dt, Bt, ct, Wt, vs;
810
+ var F, lt, ae, le, pt, He, Ot, Dt, Bt, ct, zt, vs;
813
811
  const os = class os {
814
812
  constructor(n) {
815
813
  d(this, pt);
@@ -825,12 +823,12 @@ const os = class os {
825
823
  const s = t(this, ct).call(this, n);
826
824
  if (s.length === 0) return e + 1;
827
825
  let r = e + 1;
828
- const i = [];
829
- s.forEach((o) => i.push(...Array.from(o.querySelectorAll("td")))), i.sort((o, a) => parseInt(o.dataset.col, 10) - parseInt(a.dataset.col, 10));
830
- for (const o of i) {
831
- const a = parseInt(o.dataset.col, 10), c = parseInt(o.colSpan || 1, 10);
832
- if (e >= a && e < a + c) {
833
- r = a + c;
826
+ const a = [];
827
+ s.forEach((o) => a.push(...Array.from(o.querySelectorAll("td")))), a.sort((o, i) => parseInt(o.dataset.col, 10) - parseInt(i.dataset.col, 10));
828
+ for (const o of a) {
829
+ const i = parseInt(o.dataset.col, 10), c = parseInt(o.colSpan || 1, 10);
830
+ if (e >= i && e < i + c) {
831
+ r = i + c;
834
832
  break;
835
833
  }
836
834
  }
@@ -840,12 +838,12 @@ const os = class os {
840
838
  const s = t(this, ct).call(this, n);
841
839
  if (s.length === 0) return Math.max(0, e - 1);
842
840
  let r = -1;
843
- const i = [];
844
- s.forEach((o) => i.push(...Array.from(o.querySelectorAll("td")))), i.sort((o, a) => parseInt(o.dataset.col, 10) - parseInt(a.dataset.col, 10));
845
- for (const o of i) {
846
- const a = parseInt(o.dataset.col, 10);
847
- if (a < e)
848
- r = a;
841
+ const a = [];
842
+ s.forEach((o) => a.push(...Array.from(o.querySelectorAll("td")))), a.sort((o, i) => parseInt(o.dataset.col, 10) - parseInt(i.dataset.col, 10));
843
+ for (const o of a) {
844
+ const i = parseInt(o.dataset.col, 10);
845
+ if (i < e)
846
+ r = i;
849
847
  else
850
848
  break;
851
849
  }
@@ -857,35 +855,35 @@ const os = class os {
857
855
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
858
856
  ), s = [];
859
857
  return e.forEach((r) => {
860
- const i = Array.from(r.querySelectorAll("tbody tr:not(.nodata)"));
861
- for (const o of i) {
862
- const a = parseInt(o.dataset.row, 10), c = i.filter((p) => parseInt(p.dataset.row, 10) === a), l = c.length > 0 ? c.length : 1, u = c.indexOf(o), f = a * l + (u >= 0 ? u : 0);
858
+ const a = Array.from(r.querySelectorAll("tbody tr:not(.nodata)"));
859
+ for (const o of a) {
860
+ const i = parseInt(o.dataset.row, 10), c = a.filter((p) => parseInt(p.dataset.row, 10) === i), l = c.length > 0 ? c.length : 1, g = c.indexOf(o), f = i * l + (g >= 0 ? g : 0);
863
861
  if (f === n) {
864
862
  s.push(o);
865
863
  break;
866
864
  }
867
865
  const b = Array.from(o.querySelectorAll("td"));
868
- let g = !1;
866
+ let u = !1;
869
867
  for (const p of b) {
870
868
  const x = parseInt(p.rowSpan || 1, 10);
871
869
  if (x > 1 && n >= f && n < f + x) {
872
- s.push(o), g = !0;
870
+ s.push(o), u = !0;
873
871
  break;
874
872
  }
875
873
  }
876
- if (g) break;
874
+ if (u) break;
877
875
  }
878
876
  }), s;
879
877
  }, "#findTargetTrsByMatrix"));
880
878
  // 🎯 rowSpan 및 colSpan 경계λ₯Ό λͺ¨λ‘ μΆ©μ‘±ν•˜λŠ” 셀을 3λΆ„ν•  전체 μ˜μ—­μ—μ„œ 탐색
881
- d(this, Wt, /* @__PURE__ */ h((n, e, s, r) => {
882
- const i = t(this, F).querySelectorAll(
879
+ d(this, zt, /* @__PURE__ */ h((n, e, s, r) => {
880
+ const a = t(this, F).querySelectorAll(
883
881
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
884
882
  ), o = r !== void 0 ? r : n * 1 + e;
885
- for (const a of i) {
886
- const c = Array.from(a.querySelectorAll("tbody tr:not(.nodata)"));
883
+ for (const i of a) {
884
+ const c = Array.from(i.querySelectorAll("tbody tr:not(.nodata)"));
887
885
  for (const l of c) {
888
- const u = parseInt(l.dataset.row, 10), f = c.filter((w) => parseInt(w.dataset.row, 10) === u), b = f.length > 0 ? f.length : 1, g = f.indexOf(l), p = u * b + (g >= 0 ? g : 0), x = Array.from(l.querySelectorAll("td"));
886
+ const g = parseInt(l.dataset.row, 10), f = c.filter((w) => parseInt(w.dataset.row, 10) === g), b = f.length > 0 ? f.length : 1, u = f.indexOf(l), p = g * b + (u >= 0 ? u : 0), x = Array.from(l.querySelectorAll("td"));
889
887
  for (const w of x) {
890
888
  const m = parseInt(w.dataset.col, 10), T = parseInt(w.colSpan || 1, 10), A = parseInt(w.rowSpan || 1, 10);
891
889
  if (!isNaN(m) && s >= m && s < m + T && o >= p && o < p + A && window.getComputedStyle(w).display !== "none")
@@ -906,39 +904,39 @@ const os = class os {
906
904
  const e = parseInt(n.dataset.row, 10), s = parseInt(n.dataset.col, 10);
907
905
  if (!isNaN(e) && !isNaN(s)) {
908
906
  y(this, ae, e), y(this, le, s);
909
- const r = n.closest("tr"), i = r == null ? void 0 : r.closest("tbody");
910
- if (i) {
911
- const a = Array.from(i.querySelectorAll("tr:not(.nodata)")).filter((f) => parseInt(f.dataset.row, 10) === e), c = a.length > 0 ? a.length : 1, l = a.indexOf(r), u = e * c + (l >= 0 ? l : 0);
912
- t(this, F).selection.setRange(u, s, u, s);
907
+ const r = n.closest("tr"), a = r == null ? void 0 : r.closest("tbody");
908
+ if (a) {
909
+ const i = Array.from(a.querySelectorAll("tr:not(.nodata)")).filter((f) => parseInt(f.dataset.row, 10) === e), c = i.length > 0 ? i.length : 1, l = i.indexOf(r), g = e * c + (l >= 0 ? l : 0);
910
+ t(this, F).selection.setRange(g, s, g, s);
913
911
  }
914
912
  }
915
913
  }
916
914
  moveCell(n) {
917
915
  var m, T, A, M;
918
916
  if (!t(this, lt)) return;
919
- const e = t(this, lt), s = e.closest("tr"), r = parseInt(e.dataset.row, 10), i = parseInt(e.dataset.col, 10), o = s == null ? void 0 : s.closest("tbody");
917
+ const e = t(this, lt), s = e.closest("tr"), r = parseInt(e.dataset.row, 10), a = parseInt(e.dataset.col, 10), o = s == null ? void 0 : s.closest("tbody");
920
918
  if (!o) return;
921
- const c = Array.from(o.querySelectorAll("tr:not(.nodata)")).filter((B) => parseInt(B.dataset.row, 10) === r), l = c.length > 0 ? c.length : 1, u = c.indexOf(s), f = r * l + (u >= 0 ? u : 0);
922
- let b = f, g = i;
919
+ const c = Array.from(o.querySelectorAll("tr:not(.nodata)")).filter((B) => parseInt(B.dataset.row, 10) === r), l = c.length > 0 ? c.length : 1, g = c.indexOf(s), f = r * l + (g >= 0 ? g : 0);
920
+ let b = f, u = a;
923
921
  switch (n.code) {
924
922
  case "Tab":
925
923
  if (n.preventDefault(), n.shiftKey) {
926
- if (g = t(this, Bt).call(this, f, i), g < 0 && f > 0) {
924
+ if (u = t(this, Bt).call(this, f, a), u < 0 && f > 0) {
927
925
  b = f - 1;
928
- const B = t(this, ct).call(this, b), z = t(this, Ot).call(this, B);
929
- g = z ? parseInt(z.dataset.col, 10) : 0;
926
+ const B = t(this, ct).call(this, b), W = t(this, Ot).call(this, B);
927
+ u = W ? parseInt(W.dataset.col, 10) : 0;
930
928
  }
931
929
  } else {
932
- g = t(this, Dt).call(this, f, i);
933
- const B = t(this, ct).call(this, f), z = t(this, Ot).call(this, B), Gt = z ? parseInt(z.dataset.col, 10) + parseInt(z.colSpan || 1, 10) : 0;
934
- g >= Gt && (b = f + 1, g = 0);
930
+ u = t(this, Dt).call(this, f, a);
931
+ const B = t(this, ct).call(this, f), W = t(this, Ot).call(this, B), Gt = W ? parseInt(W.dataset.col, 10) + parseInt(W.colSpan || 1, 10) : 0;
932
+ u >= Gt && (b = f + 1, u = 0);
935
933
  }
936
934
  break;
937
935
  case "ArrowRight":
938
- g = t(this, Dt).call(this, f, i);
936
+ u = t(this, Dt).call(this, f, a);
939
937
  break;
940
938
  case "ArrowLeft":
941
- g = t(this, Bt).call(this, f, i);
939
+ u = t(this, Bt).call(this, f, a);
942
940
  break;
943
941
  case "ArrowDown":
944
942
  n.preventDefault(), b = f + (e.rowSpan || 1);
@@ -948,38 +946,38 @@ const os = class os {
948
946
  break;
949
947
  }
950
948
  const p = Math.floor(b / l), x = b % l;
951
- let w = t(this, Wt).call(this, p, x, g, b);
949
+ let w = t(this, zt).call(this, p, x, u, b);
952
950
  if (w)
953
- this.currentCell = w, V(this, pt, $e).call(this, w);
951
+ this.currentCell = w, V(this, pt, He).call(this, w);
954
952
  else if (p !== r && p >= 0) {
955
953
  const B = ((T = (m = t(this, F)).getRowHeight) == null ? void 0 : T.call(m)) || 40;
956
954
  (M = (A = t(this, F)).scrollToY) == null || M.call(A, p * B), setTimeout(() => {
957
- const z = t(this, Wt).call(this, p, x, g, b);
958
- z && (this.currentCell = z, V(this, pt, $e).call(this, z));
955
+ const W = t(this, zt).call(this, p, x, u, b);
956
+ W && (this.currentCell = W, V(this, pt, He).call(this, W));
959
957
  }, 0);
960
958
  }
961
959
  }
962
960
  };
963
961
  F = new WeakMap(), lt = new WeakMap(), ae = new WeakMap(), le = new WeakMap(), pt = new WeakSet(), // 🎯 셀이 보이지 μ•ŠλŠ” μ˜μ—­μ— μžˆμ„ λ•Œ μ»¨ν…Œμ΄λ„ˆ μŠ€ν¬λ‘€μ„ λ™κΈ°ν™”ν•˜λŠ” ν•¨μˆ˜
964
- $e = /* @__PURE__ */ h(function(n) {
962
+ He = /* @__PURE__ */ h(function(n) {
965
963
  const e = t(this, F).querySelector(".ng-container-body .ng-part-body");
966
964
  if (!e) return;
967
965
  const s = n.getBoundingClientRect(), r = e.getBoundingClientRect();
968
966
  s.top < r.top ? e.scrollTop -= r.top - s.top : s.bottom > r.bottom && (e.scrollTop += s.bottom - r.bottom), s.left < r.left ? e.scrollLeft -= r.left - s.left : s.right > r.right && (e.scrollLeft += s.right - r.right);
969
- }, "#ensureCellVisible"), Ot = new WeakMap(), Dt = new WeakMap(), Bt = new WeakMap(), ct = new WeakMap(), Wt = new WeakMap(), vs = /* @__PURE__ */ h(function() {
967
+ }, "#ensureCellVisible"), Ot = new WeakMap(), Dt = new WeakMap(), Bt = new WeakMap(), ct = new WeakMap(), zt = new WeakMap(), vs = /* @__PURE__ */ h(function() {
970
968
  t(this, F).addEventListener("keydown", (n) => {
971
969
  ["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(n.code) && this.moveCell(n);
972
970
  });
973
971
  }, "#initEvents"), h(os, "CellNavigation");
974
972
  let Me = os;
975
- var ce, ht, dt, zt, Pt, he, de, xt, fe, ge;
973
+ var ce, ht, dt, Wt, Pt, he, de, xt, fe, ge;
976
974
  const Ct = class Ct extends HTMLElement {
977
975
  constructor() {
978
976
  super();
979
977
  d(this, ce);
980
978
  d(this, ht, null);
981
979
  d(this, dt);
982
- d(this, zt);
980
+ d(this, Wt);
983
981
  d(this, Pt);
984
982
  q(this, "invalidate", /* @__PURE__ */ h(() => {
985
983
  S.log("sheet.invalidate()"), t(this, dt).refresh();
@@ -987,8 +985,8 @@ const Ct = class Ct extends HTMLElement {
987
985
  q(this, "generate", /* @__PURE__ */ h((e) => {
988
986
  if (S.log("sheet.generate()"), !e) return;
989
987
  y(this, ht, Ie.compile(e)), t(this, he).call(this), t(this, de).call(this);
990
- 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");
991
- s && i && (i.style.top = `${s.offsetHeight}px`), r && i && (i.style.bottom = `${r.offsetHeight}px`), t(this, dt).initialize(), setTimeout(() => {
988
+ const s = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), a = this.querySelector(".ng-nodata-overlay");
989
+ s && a && (a.style.top = `${s.offsetHeight}px`), r && a && (a.style.bottom = `${r.offsetHeight}px`), t(this, dt).initialize(), setTimeout(() => {
992
990
  var o;
993
991
  (o = this.querySelector("nine-table-hscrollbar")) == null || o.refresh();
994
992
  }, 0);
@@ -999,40 +997,36 @@ const Ct = class Ct extends HTMLElement {
999
997
  { selector: ".ng-container-left", type: "left" },
1000
998
  { selector: ".ng-container-right", type: "right" }
1001
999
  ].forEach(({ selector: s, type: r }) => {
1002
- var i, o, a;
1003
- (i = this.querySelector(`${s} .ng-part-header`)) == null || i.appendChild(t(this, xt).call(this, t(this, ht), r, "header")), (o = this.querySelector(`${s} .ng-virtual-spacer`)) == null || o.before(t(this, xt).call(this, t(this, ht), r, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, xt).call(this, t(this, ht), r, "footer"));
1000
+ var a, o, i;
1001
+ (a = this.querySelector(`${s} .ng-part-header`)) == null || a.appendChild(t(this, xt).call(this, t(this, ht), r, "header")), (o = this.querySelector(`${s} .ng-virtual-spacer`)) == null || o.before(t(this, xt).call(this, t(this, ht), r, "body")), (i = this.querySelector(`${s} .ng-part-footer`)) == null || i.appendChild(t(this, xt).call(this, t(this, ht), r, "footer"));
1004
1002
  });
1005
1003
  }, "#renderSplitContainers"));
1006
1004
  d(this, de, /* @__PURE__ */ h(() => {
1007
1005
  ["left", "right", "body"].forEach((e) => {
1008
1006
  const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
1009
1007
  if (!s || !r || r.length === 0) return;
1010
- let i = 0;
1008
+ let a = 0;
1011
1009
  r[0].querySelectorAll("col").forEach((o) => {
1012
- const a = parseInt(o.getAttribute("width"), 10);
1013
- isNaN(a) || (i += a);
1014
- }), e === "body" ? (s.style.flex = "1", r.forEach((o) => {
1015
- o.style.width = `${i}px`, o.style.minWidth = `${i}px`;
1016
- })) : (s.style.flex = `0 0 ${i}px`, s.style.width = `${i}px`, r.forEach((o) => {
1017
- o.style.width = `${i}px`, o.style.minWidth = `${i}px`;
1018
- }));
1010
+ const i = parseInt(o.getAttribute("width"), 10);
1011
+ isNaN(i) || (a += i);
1012
+ }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${a}px`, s.style.width = `${a}px`);
1019
1013
  });
1020
1014
  }, "#updateContainerWidths"));
1021
1015
  d(this, xt, /* @__PURE__ */ h((e, s, r) => {
1022
- const i = e.cloneNode(!0), o = i.querySelector("thead"), a = i.querySelector("tbody"), c = i.querySelector("tfoot");
1016
+ const a = e.cloneNode(!0), o = a.querySelector("thead"), i = a.querySelector("tbody"), c = a.querySelector("tfoot");
1023
1017
  if (r === "header") {
1024
- if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
1025
- const u = document.createElement("tbody");
1026
- u.className = "fixed-tbody", i.appendChild(u);
1018
+ if (i && i.remove(), c && c.remove(), e.querySelector("tbody")) {
1019
+ const g = document.createElement("tbody");
1020
+ g.className = "fixed-tbody", a.appendChild(g);
1027
1021
  }
1028
- } else r === "body" ? (o && o.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), a && a.remove());
1029
- return s === "left" ? i.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
1022
+ } else r === "body" ? (o && o.remove(), c && c.remove(), i && (i.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), i && i.remove());
1023
+ return s === "left" ? a.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
1030
1024
  l.getAttribute("fixed") !== "left" && l.remove();
1031
- }) : s === "right" ? i.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
1025
+ }) : s === "right" ? a.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
1032
1026
  l.getAttribute("fixed") !== "right" && l.remove();
1033
- }) : i.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
1027
+ }) : a.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
1034
1028
  l.remove();
1035
- }), i;
1029
+ }), a;
1036
1030
  }, "#createSplitTable"));
1037
1031
  q(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, dt).getRowHeight(), "getRowHeight"));
1038
1032
  q(this, "scrollToX", /* @__PURE__ */ h((e) => {
@@ -1044,7 +1038,7 @@ const Ct = class Ct extends HTMLElement {
1044
1038
  s && (s.scrollTop = e);
1045
1039
  }, "scrollToY"));
1046
1040
  d(this, fe, /* @__PURE__ */ h(() => {
1047
- t(this, ge).call(this), y(this, zt, new Le(this)), y(this, Pt, new Me(this));
1041
+ t(this, ge).call(this), y(this, Wt, new Le(this)), y(this, Pt, new Me(this));
1048
1042
  }, "#init"));
1049
1043
  d(this, ge, /* @__PURE__ */ h(() => {
1050
1044
  const e = Ct.SCROLLBAR_SIZE;
@@ -1254,7 +1248,7 @@ const Ct = class Ct extends HTMLElement {
1254
1248
  t(this, fe).call(this);
1255
1249
  }
1256
1250
  get selection() {
1257
- return t(this, zt);
1251
+ return t(this, Wt);
1258
1252
  }
1259
1253
  get navigation() {
1260
1254
  return t(this, Pt);
@@ -1263,7 +1257,7 @@ const Ct = class Ct extends HTMLElement {
1263
1257
  this.innerHTML = "", S.log("NineTableSheet destroyed.");
1264
1258
  }
1265
1259
  };
1266
- ce = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), zt = new WeakMap(), Pt = new WeakMap(), he = new WeakMap(), de = new WeakMap(), xt = new WeakMap(), fe = new WeakMap(), ge = new WeakMap(), h(Ct, "NineTableSheet"), q(Ct, "SCROLLBAR_SIZE", 16);
1260
+ ce = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), Wt = new WeakMap(), Pt = new WeakMap(), he = new WeakMap(), de = new WeakMap(), xt = new WeakMap(), fe = new WeakMap(), ge = new WeakMap(), h(Ct, "NineTableSheet"), q(Ct, "SCROLLBAR_SIZE", 16);
1267
1261
  let Zt = Ct;
1268
1262
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Zt);
1269
1263
  var ue, Ft;
@@ -1274,39 +1268,39 @@ const is = class is extends HTMLElement {
1274
1268
  var e;
1275
1269
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
1276
1270
  var o;
1277
- const r = s.ctrlKey || s.metaKey || s.shiftKey, i = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
1278
- t(this, Ft).call(this, i, r);
1271
+ const r = s.ctrlKey || s.metaKey || s.shiftKey, a = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
1272
+ t(this, Ft).call(this, a, r);
1279
1273
  }), t(this, Ft).call(this, 0, !1);
1280
1274
  }, "#init"));
1281
1275
  d(this, Ft, /* @__PURE__ */ h((e, s = !1) => {
1282
1276
  const r = /* @__PURE__ */ h(() => {
1283
- const u = Array.from(this.querySelectorAll("nine-table-sheet"));
1284
- Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
1285
- const b = u.filter((g) => g.classList.contains("active"));
1286
- b.length < 2 || b.forEach((g) => {
1287
- const p = parseInt(g.getAttribute("data-index"), 10), x = this.querySelector(`nine-splitter[data-split-index="${p}"]`), w = u[p + 1];
1277
+ const g = Array.from(this.querySelectorAll("nine-table-sheet"));
1278
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((u) => u.style.setProperty("display", "none"));
1279
+ const b = g.filter((u) => u.classList.contains("active"));
1280
+ b.length < 2 || b.forEach((u) => {
1281
+ const p = parseInt(u.getAttribute("data-index"), 10), x = this.querySelector(`nine-splitter[data-split-index="${p}"]`), w = g[p + 1];
1288
1282
  x && w && w.classList.contains("active") && x.style.setProperty("display", "flex");
1289
1283
  });
1290
- }, "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");
1291
- if (!a[e]) return;
1284
+ }, "updateSplitters"), a = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), i = a.querySelectorAll(".nine-tab-item"), c = o.querySelectorAll("nine-table-sheet");
1285
+ if (!i[e]) return;
1292
1286
  if (!s)
1293
- a.forEach((u, f) => {
1294
- u.classList.toggle("active", f === e);
1295
- }), c.forEach((u, f) => {
1287
+ i.forEach((g, f) => {
1288
+ g.classList.toggle("active", f === e);
1289
+ }), c.forEach((g, f) => {
1296
1290
  const b = f === e;
1297
- u.classList.toggle("active", b), u.style.flex = b ? "1 1 100%" : "";
1291
+ g.classList.toggle("active", b), g.style.flex = b ? "1 1 100%" : "";
1298
1292
  });
1299
1293
  else {
1300
- const u = a[e], f = i.querySelectorAll(".nine-tab-item.active");
1301
- if (u.classList.contains("active") && f.length <= 1)
1294
+ const g = i[e], f = a.querySelectorAll(".nine-tab-item.active");
1295
+ if (g.classList.contains("active") && f.length <= 1)
1302
1296
  return;
1303
- u.classList.toggle("active");
1297
+ g.classList.toggle("active");
1304
1298
  const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
1305
1299
  b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
1306
1300
  }
1307
1301
  const l = o.querySelectorAll("nine-table-sheet.active");
1308
- l == null || l.forEach((u) => {
1309
- u.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
1302
+ l == null || l.forEach((g) => {
1303
+ g.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
1310
1304
  }), r();
1311
1305
  }, "#switchSheet"));
1312
1306
  }
@@ -1315,8 +1309,8 @@ const is = class is extends HTMLElement {
1315
1309
  }
1316
1310
  };
1317
1311
  ue = new WeakMap(), Ft = new WeakMap(), h(is, "NineTableSheets");
1318
- let He = is;
1319
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", He);
1312
+ let $e = is;
1313
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", $e);
1320
1314
  var _, be, jt, pe;
1321
1315
  const as = class as {
1322
1316
  constructor(n) {
@@ -1331,11 +1325,11 @@ const as = class as {
1331
1325
  var c, l;
1332
1326
  const n = Array.from(t(this, _).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1333
1327
  if (n.length === 0) return;
1334
- const e = parseInt(t(this, _).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((u) => u.getRowHeight())), r = (c = t(this, _).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, i = (l = t(this, _).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = Zt.SCROLLBAR_SIZE, a = e * s + r + i + o;
1335
- t(this, _).style.height = `${a}px`;
1328
+ const e = parseInt(t(this, _).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((g) => g.getRowHeight())), r = (c = t(this, _).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, a = (l = t(this, _).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = Zt.SCROLLBAR_SIZE, i = e * s + r + a + o;
1329
+ t(this, _).style.height = `${i}px`;
1336
1330
  }, "#applyAutoHeight"));
1337
1331
  d(this, pe, /* @__PURE__ */ h(() => {
1338
- const e = Array.from(t(this, _).children).filter((c) => c.tagName === "TABLE"), s = t(this, _).getAttribute("auto-height") === "true", r = e.length, i = e.map((c, l) => {
1332
+ const e = Array.from(t(this, _).children).filter((c) => c.tagName === "TABLE"), s = t(this, _).getAttribute("auto-height") === "true", r = e.length, a = e.map((c, l) => {
1339
1333
  const f = `<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>` : "";
1340
1334
  return f + b;
1341
1335
  }).join(""), o = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
@@ -1450,7 +1444,7 @@ const as = class as {
1450
1444
  <nine-table-body>
1451
1445
  <nine-table-summary></nine-table-summary>
1452
1446
  <nine-table-sheets>
1453
- <nine-table-sheets-body>${i}</nine-table-sheets-body>
1447
+ <nine-table-sheets-body>${a}</nine-table-sheets-body>
1454
1448
  <nine-table-sheets-footer>
1455
1449
  <div class="nine-tab-bar">${o}</div>
1456
1450
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
@@ -1460,8 +1454,8 @@ const as = class as {
1460
1454
  </nine-table-body>
1461
1455
  <nine-table-footer></nine-table-footer>
1462
1456
  `, t(this, _).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");
1463
- const a = t(this, _).shadowRoot.querySelectorAll("nine-table-sheet");
1464
- a == null || a.forEach((c, l) => {
1457
+ const i = t(this, _).shadowRoot.querySelectorAll("nine-table-sheet");
1458
+ i == null || i.forEach((c, l) => {
1465
1459
  e[l] && setTimeout(() => {
1466
1460
  c.generate(e[l]), s && t(this, jt).call(this);
1467
1461
  });
@@ -1490,12 +1484,12 @@ const ls = class ls {
1490
1484
  };
1491
1485
  Yt = new WeakMap(), wt = new WeakMap(), h(ls, "ngRow");
1492
1486
  let _e = ls;
1493
- var D, I, W, vt, ye, J, me, ft, Vt, xe, we, St;
1487
+ var D, I, z, vt, ye, J, me, ft, Vt, xe, we, St;
1494
1488
  const P = class P {
1495
1489
  constructor(n, e) {
1496
1490
  d(this, D);
1497
1491
  d(this, I);
1498
- d(this, W, []);
1492
+ d(this, z, []);
1499
1493
  d(this, vt, []);
1500
1494
  d(this, ye, 0);
1501
1495
  d(this, J, []);
@@ -1516,12 +1510,12 @@ const P = class P {
1516
1510
  });
1517
1511
  }, "#invalidate"));
1518
1512
  q(this, "get", /* @__PURE__ */ h((n, e) => {
1519
- var i;
1513
+ var a;
1520
1514
  const s = this.getValidData();
1521
1515
  if (!s || s.length <= 0) return;
1522
1516
  if (n == null) return t(this, St).call(this, s);
1523
1517
  if (n < 0 || n >= s.length) return null;
1524
- const r = typeof ((i = t(this, D).fields) == null ? void 0 : i.get) == "function" ? t(this, D).fields.get() : [];
1518
+ const r = typeof ((a = t(this, D).fields) == null ? void 0 : a.get) == "function" ? t(this, D).fields.get() : [];
1525
1519
  if (e != null) {
1526
1520
  const o = r.indexOf(e);
1527
1521
  return o >= 0 ? s[n].v[o] : null;
@@ -1541,20 +1535,20 @@ const P = class P {
1541
1535
  _: [0, 0, 0, 0, P.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, J).slice(), -1, {}, {}]
1542
1536
  }), "#getDefaultMeta"));
1543
1537
  q(this, "reset", /* @__PURE__ */ h(() => {
1544
- y(this, W, []), y(this, vt, []), t(this, ft).call(this);
1538
+ y(this, z, []), y(this, vt, []), t(this, ft).call(this);
1545
1539
  }, "reset"));
1546
1540
  q(this, "clear", /* @__PURE__ */ h(() => {
1547
1541
  var n;
1548
- t(this, I).rawRecords = [], y(this, W, []), y(this, vt, []), (n = t(this, I).viewRecords) != null && n.reset && t(this, I).viewRecords.reset();
1542
+ t(this, I).rawRecords = [], y(this, z, []), y(this, vt, []), (n = t(this, I).viewRecords) != null && n.reset && t(this, I).viewRecords.reset();
1549
1543
  }, "clear"));
1550
1544
  d(this, xe, /* @__PURE__ */ h((n) => {
1551
1545
  var r;
1552
1546
  Array.isArray(n) || (n = [n]);
1553
1547
  const e = typeof ((r = t(this, D).fields) == null ? void 0 : r.get) == "function" ? t(this, D).fields.get() : Object.keys(n[0] || {}), s = [];
1554
- return n.forEach((i) => {
1548
+ return n.forEach((a) => {
1555
1549
  const o = { v: [] };
1556
- e.forEach((a) => {
1557
- o.v.push(i[a] !== void 0 && i[a] !== null ? i[a] : "");
1550
+ e.forEach((i) => {
1551
+ o.v.push(a[i] !== void 0 && a[i] !== null ? a[i] : "");
1558
1552
  }), s.push(o);
1559
1553
  }), s;
1560
1554
  }, "#json2Array"));
@@ -1566,18 +1560,18 @@ const P = class P {
1566
1560
  const s = t(this, xe).call(this, n);
1567
1561
  t(this, I).rawRecords = t(this, I).rawRecords.concat(t(this, we).call(this, s)), this.resetRecords();
1568
1562
  const r = this.count() - 1;
1569
- return e || s.forEach((i, o) => {
1570
- const a = t(this, I).rawRecords[r - o];
1571
- a && (a.__ng.rowState = P.ROW_STATE.EMPTY);
1563
+ return e || s.forEach((a, o) => {
1564
+ const i = t(this, I).rawRecords[r - o];
1565
+ i && (i.__ng.rowState = P.ROW_STATE.EMPTY);
1572
1566
  }), t(this, ft).call(this), r;
1573
1567
  }, "add"));
1574
1568
  q(this, "delete", /* @__PURE__ */ h((n) => {
1575
1569
  let e = [];
1576
1570
  Array.isArray(n) ? e = n : typeof n > "u" ? e = [t(this, I).host.row.at] : e = [parseInt(n, 10)], e.sort((s, r) => r - s).forEach((s) => {
1577
- if (t(this, W)[s]) {
1578
- const r = t(this, W)[s].__ng.rowid;
1579
- t(this, W)[s].__ng.rowState === P.ROW_STATE.INSERT ? t(this, I).rawRecords = t(this, I).rawRecords.filter((i) => i.__ng.rowid !== r) : t(this, I).rawRecords.forEach((i) => {
1580
- i.__ng.rowid === r && (i.__ng.deleted = !0, i.__ng.rowState = P.ROW_STATE.DELETE);
1571
+ if (t(this, z)[s]) {
1572
+ const r = t(this, z)[s].__ng.rowid;
1573
+ t(this, z)[s].__ng.rowState === P.ROW_STATE.INSERT ? t(this, I).rawRecords = t(this, I).rawRecords.filter((a) => a.__ng.rowid !== r) : t(this, I).rawRecords.forEach((a) => {
1574
+ a.__ng.rowid === r && (a.__ng.deleted = !0, a.__ng.rowState = P.ROW_STATE.DELETE);
1581
1575
  });
1582
1576
  }
1583
1577
  }), this.resetRecords(), t(this, ft).call(this);
@@ -1585,31 +1579,31 @@ const P = class P {
1585
1579
  q(this, "setValue", /* @__PURE__ */ h((n, e, s) => {
1586
1580
  var c;
1587
1581
  n = parseInt(n, 10);
1588
- const i = (typeof ((c = t(this, D).fields) == null ? void 0 : c.get) == "function" ? t(this, D).fields.get() : []).indexOf(e);
1589
- if (i < 0) return;
1582
+ const a = (typeof ((c = t(this, D).fields) == null ? void 0 : c.get) == "function" ? t(this, D).fields.get() : []).indexOf(e);
1583
+ if (a < 0) return;
1590
1584
  const o = this.getValidData()[n];
1591
1585
  if (!o) return;
1592
- const a = o.v[i];
1593
- a !== s && o.__ng.rowState !== P.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = a), o.__ng.rowState = P.ROW_STATE.UPDATE), o.v[i] = s;
1586
+ const i = o.v[a];
1587
+ i !== s && o.__ng.rowState !== P.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = i), o.__ng.rowState = P.ROW_STATE.UPDATE), o.v[a] = s;
1594
1588
  }, "setValue"));
1595
1589
  q(this, "resetRecords", /* @__PURE__ */ h(() => {
1596
- y(this, vt, t(this, I).rawRecords.filter((n) => !n.__ng.deleted)), y(this, W, t(this, I).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, I).rawRecords.forEach((n, e) => {
1590
+ y(this, vt, t(this, I).rawRecords.filter((n) => !n.__ng.deleted)), y(this, z, t(this, I).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, I).rawRecords.forEach((n, e) => {
1597
1591
  n.__ng.rowidx = e;
1598
- }), t(this, W).forEach((n, e) => {
1592
+ }), t(this, z).forEach((n, e) => {
1599
1593
  n.__ng.i = e;
1600
1594
  });
1601
1595
  }, "resetRecords"));
1602
- q(this, "getValidData", /* @__PURE__ */ h(() => (t(this, W).length === 0 && t(this, I).rawRecords.length > 0 && this.resetRecords(), t(this, W)), "getValidData"));
1596
+ q(this, "getValidData", /* @__PURE__ */ h(() => (t(this, z).length === 0 && t(this, I).rawRecords.length > 0 && this.resetRecords(), t(this, z)), "getValidData"));
1603
1597
  d(this, St, /* @__PURE__ */ h((n) => {
1604
1598
  var o;
1605
1599
  if (!n) return n;
1606
- const e = !Array.isArray(n), s = e ? [n] : n, r = typeof ((o = t(this, D).fields) == null ? void 0 : o.get) == "function" ? t(this, D).fields.get() : [], i = s.filter((a) => !a.__ng.deleted).map((a) => {
1600
+ const e = !Array.isArray(n), s = e ? [n] : n, r = typeof ((o = t(this, D).fields) == null ? void 0 : o.get) == "function" ? t(this, D).fields.get() : [], a = s.filter((i) => !i.__ng.deleted).map((i) => {
1607
1601
  const c = {};
1608
- return r.forEach((l, u) => {
1609
- c[l] = a.v ? a.v[u] : a[l];
1610
- }), c.__ng = a.__ng, c;
1602
+ return r.forEach((l, g) => {
1603
+ c[l] = i.v ? i.v[g] : i[l];
1604
+ }), c.__ng = i.__ng, c;
1611
1605
  });
1612
- return e ? i[0] : i;
1606
+ return e ? a[0] : a;
1613
1607
  }, "#conv"));
1614
1608
  q(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1615
1609
  y(this, D, n), y(this, I, e), t(this, me).call(this);
@@ -1624,16 +1618,16 @@ const P = class P {
1624
1618
  return ++xs(this, ye)._;
1625
1619
  }
1626
1620
  get count() {
1627
- return t(this, W).length;
1621
+ return t(this, z).length;
1628
1622
  }
1629
1623
  get length() {
1630
- return t(this, W).length;
1624
+ return t(this, z).length;
1631
1625
  }
1632
1626
  getRowCount() {
1633
1627
  return this.length;
1634
1628
  }
1635
1629
  };
1636
- D = new WeakMap(), I = new WeakMap(), W = new WeakMap(), vt = new WeakMap(), ye = new WeakMap(), J = new WeakMap(), me = new WeakMap(), ft = new WeakMap(), Vt = new WeakMap(), xe = new WeakMap(), we = new WeakMap(), St = new WeakMap(), h(P, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1630
+ D = new WeakMap(), I = new WeakMap(), z = new WeakMap(), vt = new WeakMap(), ye = new WeakMap(), J = new WeakMap(), me = new WeakMap(), ft = new WeakMap(), Vt = new WeakMap(), xe = new WeakMap(), we = new WeakMap(), St = new WeakMap(), h(P, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1637
1631
  q(P, "ROW_STATE", {
1638
1632
  EMPTY: "EMPTY",
1639
1633
  NORMAL: "NORMAL",
@@ -1652,10 +1646,10 @@ const cs = class cs {
1652
1646
  }, this.setDataSource = (e) => {
1653
1647
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1654
1648
  }, this.getRowState = (e) => {
1655
- var r, i;
1649
+ var r, a;
1656
1650
  const s = parseInt(e, 10);
1657
1651
  if (!(s >= this.data.count()))
1658
- return (i = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : i.rowState;
1652
+ return (a = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : a.rowState;
1659
1653
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1660
1654
  this.row.at = e;
1661
1655
  }, 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) => {
@@ -1688,25 +1682,25 @@ const hs = class hs {
1688
1682
  if (!(!n || n.length === 0)) {
1689
1683
  for (const e of n)
1690
1684
  S.log(e), $("[data-bind]", e).each((s, r) => {
1691
- const i = r.dataset.bind, o = r.getAttribute("data-type") || "string";
1692
- i && t(this, H).push({ name: i, type: o });
1685
+ const a = r.dataset.bind, o = r.getAttribute("data-type") || "string";
1686
+ a && t(this, H).push({ name: a, type: o });
1693
1687
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1694
- $(`[${s}]`, e).each((r, i) => {
1695
- var o = i.getAttribute(s);
1688
+ $(`[${s}]`, e).each((r, a) => {
1689
+ var o = a.getAttribute(s);
1696
1690
  if (o.indexOf("data.") < 0) {
1697
- const a = o.search(/[(]/g);
1698
- if (a > 0)
1691
+ const i = o.search(/[(]/g);
1692
+ if (i > 0)
1699
1693
  try {
1700
- o = String(window[o.substring(0, a).trim()]);
1694
+ o = String(window[o.substring(0, i).trim()]);
1701
1695
  } catch {
1702
1696
  o = "";
1703
1697
  }
1704
1698
  }
1705
- o.split("data.").forEach((a) => {
1706
- if (a.trim() != "") {
1707
- const c = a.search(/[^_A-Za-z0-9]/g);
1699
+ o.split("data.").forEach((i) => {
1700
+ if (i.trim() != "") {
1701
+ const c = i.search(/[^_A-Za-z0-9]/g);
1708
1702
  let l = "";
1709
- c >= 0 ? l = a.substring(0, c) : o.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, H).push({ name: l, type: "string" });
1703
+ c >= 0 ? l = i.substring(0, c) : o.startsWith("data.") && (l = i.replace("data.", "")), l && t(this, H).push({ name: l, type: "string" });
1710
1704
  }
1711
1705
  });
1712
1706
  });
@@ -1770,8 +1764,8 @@ const ds = class ds extends HTMLElement {
1770
1764
  }
1771
1765
  };
1772
1766
  ut = new WeakMap(), Se = new WeakMap(), Re = new WeakMap(), h(ds, "NineTable");
1773
- let We = ds;
1774
- customElements.get("nine-table") || customElements.define("nine-table", We);
1767
+ let ze = ds;
1768
+ customElements.get("nine-table") || customElements.define("nine-table", ze);
1775
1769
  const Tt = class Tt extends HTMLElement {
1776
1770
  // πŸ‘ˆ μ»€μŠ€ν…€ μŠ€νƒ€μΌμš© μΊμ‹œ μΆ”κ°€
1777
1771
  constructor() {
@@ -1784,9 +1778,9 @@ const Tt = class Tt extends HTMLElement {
1784
1778
  }
1785
1779
  };
1786
1780
  h(Tt, "BasicCellElement"), q(Tt, "_styleCache", /* @__PURE__ */ new Map()), q(Tt, "_customStyleCache", /* @__PURE__ */ new Map());
1787
- let ze = Tt;
1781
+ let We = Tt;
1788
1782
  var L, Xt, v, Xe, Ke, Ge, Ze, Je;
1789
- const fs = class fs extends ze {
1783
+ const fs = class fs extends We {
1790
1784
  constructor() {
1791
1785
  super();
1792
1786
  d(this, L);
@@ -1825,27 +1819,27 @@ const fs = class fs extends ze {
1825
1819
  var A = ninegrid.j.querySelectorAll(T).attr("suppress");
1826
1820
  A && T.dataset.row && (A = parseInt(A), !isNaN(A) && A <= e && r.push(A));
1827
1821
  }), r.sort();
1828
- var i = !1;
1822
+ var a = !1;
1829
1823
  if (parseInt(s.sectionRowIndex / t(this, L).template.length) > 0)
1830
1824
  for (var o of r) {
1831
1825
  if (o > e) break;
1832
- var a = parseInt(t(this, v).dataset.row), c = a - 1, l = t(this, v).closest("tr").data, u = t(this, L).data.get(c);
1826
+ var i = parseInt(t(this, v).dataset.row), c = i - 1, l = t(this, v).closest("tr").data, g = t(this, L).data.get(c);
1833
1827
  t(this, v).dataset.matrixRow;
1834
- var f = t(this, L).body.querySelector(`tbody.bindable [suppress="${o}"][data-matrix-row="${t(this, v).dataset.matrixRow}"]`), b = f.dataset.expr ? this.getExprValue(f.dataset.expr, l, a) : l[f.dataset.bind], g = f.dataset.expr ? this.getExprValue(f.dataset.expr, u, c) : u[f.dataset.bind];
1835
- if (b != g) {
1836
- i = !0;
1828
+ var f = t(this, L).body.querySelector(`tbody.bindable [suppress="${o}"][data-matrix-row="${t(this, v).dataset.matrixRow}"]`), b = f.dataset.expr ? this.getExprValue(f.dataset.expr, l, i) : l[f.dataset.bind], u = f.dataset.expr ? this.getExprValue(f.dataset.expr, g, c) : g[f.dataset.bind];
1829
+ if (b != u) {
1830
+ a = !0;
1837
1831
  break;
1838
1832
  }
1839
1833
  }
1840
1834
  else
1841
- i = !0;
1842
- i ? ninegrid.j.querySelectorAll(t(this, v)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, v)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, v)).hasClass("hidden") || (i ? ninegrid.j.querySelectorAll(t(this, v)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, v)).addClass("hidden"));
1835
+ a = !0;
1836
+ a ? ninegrid.j.querySelectorAll(t(this, v)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, v)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, v)).hasClass("hidden") || (a ? ninegrid.j.querySelectorAll(t(this, v)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, v)).addClass("hidden"));
1843
1837
  var p = parseInt(t(this, v).dataset.matrixRow), x = p - 1, w = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, v).dataset.col}"][data-matrix-row="${x}"]`);
1844
1838
  $(w).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, v)).hasClass("suppress") ? ninegrid.j.querySelectorAll(w).removeClass("last-none-suppress").addClass("last-suppress") : !$(w).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, v)).hasClass("suppress") ? ninegrid.j.querySelectorAll(w).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(w).removeClass("last-none-suppress").removeClass("last-suppress");
1845
1839
  }
1846
1840
  }
1847
1841
  }, "#resetSuppress"));
1848
- q(this, "getExprValue", /* @__PURE__ */ h((e, s, r, i) => {
1842
+ q(this, "getExprValue", /* @__PURE__ */ h((e, s, r, a) => {
1849
1843
  if (typeof e < "u")
1850
1844
  try {
1851
1845
  r = parseInt(r);
@@ -1943,8 +1937,8 @@ const us = class us extends Fe {
1943
1937
  d(this, Qe, /* @__PURE__ */ h((e) => {
1944
1938
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1945
1939
  if (t(this, bt) == "number") {
1946
- let i = [];
1947
- if (t(this, Q) && Number(t(this, Q)) > 0 && i.push("."), t(this, Et) && Number(t(this, Et)) >= 0 && i.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !i.includes(e.key) && e.preventDefault(), t(this, Q) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1940
+ let a = [];
1941
+ if (t(this, Q) && Number(t(this, Q)) > 0 && a.push("."), t(this, Et) && Number(t(this, Et)) >= 0 && a.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !a.includes(e.key) && e.preventDefault(), t(this, Q) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1948
1942
  var s = e.target.value, r = s.indexOf(".");
1949
1943
  if (r >= 0) {
1950
1944
  var s = s.substr(r + 1, s.length);