@ninebone/table 0.0.704 → 0.0.706

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.
@@ -1,90 +1,90 @@
1
- var Ge = Object.defineProperty;
2
- var Je = (A) => {
3
- throw TypeError(A);
1
+ var Qe = Object.defineProperty;
2
+ var ts = (q) => {
3
+ throw TypeError(q);
4
4
  };
5
- var ss = (A, n, e) => n in A ? Ge(A, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : A[n] = e;
6
- var h = (A, n) => Ge(A, "name", { value: n, configurable: !0 });
7
- var E = (A, n, e) => ss(A, typeof n != "symbol" ? n + "" : n, e), he = (A, n, e) => n.has(A) || Je("Cannot " + e);
8
- var t = (A, n, e) => (he(A, n, "read from private field"), e ? e.call(A) : n.get(A)), d = (A, n, e) => n.has(A) ? Je("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(A) : n.set(A, e), p = (A, n, e, s) => (he(A, n, "write to private field"), s ? s.call(A, e) : n.set(A, e), e), Qe = (A, n, e) => (he(A, n, "access private method"), e);
9
- var ts = (A, n, e, s) => ({
5
+ var ns = (q, n, e) => n in q ? Qe(q, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[n] = e;
6
+ var h = (q, n) => Qe(q, "name", { value: n, configurable: !0 });
7
+ var A = (q, n, e) => ns(q, typeof n != "symbol" ? n + "" : n, e), fe = (q, n, e) => n.has(q) || ts("Cannot " + e);
8
+ var t = (q, n, e) => (fe(q, n, "read from private field"), e ? e.call(q) : n.get(q)), d = (q, n, e) => n.has(q) ? ts("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(q) : n.set(q, e), p = (q, n, e, s) => (fe(q, n, "write to private field"), s ? s.call(q, e) : n.set(q, e), e), vt = (q, n, e) => (fe(q, n, "access private method"), e);
9
+ var es = (q, n, e, s) => ({
10
10
  set _(r) {
11
- p(A, n, r, e);
11
+ p(q, n, r, e);
12
12
  },
13
13
  get _() {
14
- return t(A, n, s);
14
+ return t(q, n, s);
15
15
  }
16
16
  });
17
- import { trace as ns } from "@ninebone/util";
18
- const ze = class ze extends ns.constructor {
17
+ import { trace as rs } from "@ninebone/util";
18
+ const We = class We extends rs.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- h(ze, "Trace");
24
- let de = ze;
25
- const q = new de();
26
- var B, F, S, X, K, Z, Wt, G, Ot;
27
- const We = class We extends HTMLElement {
23
+ h(We, "Trace");
24
+ let ue = We;
25
+ const R = new ue();
26
+ var B, F, S, K, Z, G, Dt, J, Pt;
27
+ const Be = class Be extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  d(this, B);
31
31
  d(this, F, !1);
32
32
  d(this, S);
33
- d(this, X);
34
33
  d(this, K);
35
34
  d(this, Z);
36
- d(this, Wt, /* @__PURE__ */ h(() => {
35
+ d(this, G);
36
+ d(this, Dt, /* @__PURE__ */ h(() => {
37
37
  if (!t(this, B)) return;
38
38
  const e = t(this, B).querySelector(".ng-container-body .ng-part-body");
39
- e && (p(this, Z, new ResizeObserver(() => {
39
+ e && (p(this, G, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, Z).observe(e));
41
+ })), t(this, G).observe(e));
42
42
  }, "#observeResize"));
43
- E(this, "refresh", /* @__PURE__ */ h(() => {
43
+ A(this, "refresh", /* @__PURE__ */ h(() => {
44
44
  if (!t(this, B) || !t(this, S) || t(this, F)) 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`;
58
- const g = e.scrollLeft, b = c - a;
59
- let u = 0;
60
- b > 0 && (u = parseInt(g / b * (l - f), 10)), u < 0 && (u = 0);
61
- const m = l - f;
62
- u > m && (u = m), i.style.left = `${u}px`, t(this, S).left.disabled = u === 0, t(this, S).right.disabled = u >= m - 1;
57
+ o.style.width = `${f}px`;
58
+ const u = e.scrollLeft, b = c - a;
59
+ let g = 0;
60
+ b > 0 && (g = parseInt(u / b * (l - f), 10)), g < 0 && (g = 0);
61
+ const x = l - f;
62
+ g > x && (g = x), o.style.left = `${g}px`, t(this, S).left.disabled = g === 0, t(this, S).right.disabled = g >= x - 1;
63
63
  }, "refresh"));
64
- d(this, G, /* @__PURE__ */ h((e) => {
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
- const l = s.clientWidth, g = r.scrollWidth - l;
74
- return c > 0 && g > 0 && (s.scrollLeft = a / c * g), a > 0 && a < c - 1;
73
+ const l = s.clientWidth, u = r.scrollWidth - l;
74
+ return c > 0 && u > 0 && (s.scrollLeft = a / c * u), a > 0 && a < c - 1;
75
75
  }, "#thumbMoveTo"));
76
- d(this, Ot, /* @__PURE__ */ h(() => {
76
+ d(this, Pt, /* @__PURE__ */ h(() => {
77
77
  const e = /* @__PURE__ */ h((r) => {
78
- clearInterval(t(this, X)), clearInterval(t(this, K));
79
- const i = parseInt(t(this, S).thumb.style.left || 0, 10);
80
- t(this, G).call(this, i + r), p(this, X, setInterval(() => {
81
- clearInterval(t(this, X)), p(this, K, setInterval(() => {
82
- const o = parseInt(t(this, S).thumb.style.left || 0, 10);
83
- t(this, G).call(this, o + r) || clearInterval(t(this, K));
78
+ clearInterval(t(this, K)), clearInterval(t(this, Z));
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
+ clearInterval(t(this, K)), p(this, Z, setInterval(() => {
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(() => {
87
- clearInterval(t(this, X)), clearInterval(t(this, K));
87
+ clearInterval(t(this, K)), clearInterval(t(this, Z));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((r) => {
90
90
  t(this, S).left.addEventListener(r, s), t(this, S).right.addEventListener(r, s), t(this, S).track.addEventListener(r, s);
@@ -95,19 +95,19 @@ const We = class We 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, G).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, F, !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, F)) return;
105
105
  const c = t(this, S).track.getBoundingClientRect();
106
- t(this, G).call(this, a.clientX - c.left - this.shiftX);
107
- }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
108
- p(this, F, !1), s(), document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", o), this.refresh();
106
+ t(this, J).call(this, a.clientX - c.left - this.shiftX);
107
+ }, "onMouseMove"), i = /* @__PURE__ */ h(() => {
108
+ p(this, F, !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
  }
@@ -190,75 +190,75 @@ const We = class We extends HTMLElement {
190
190
  right: this.querySelector(".ng-scroll-right")
191
191
  }), s.addEventListener("scroll", () => {
192
192
  t(this, F) || this.refresh();
193
- }), t(this, Ot).call(this), t(this, Wt).call(this), this.refresh();
193
+ }), t(this, Pt).call(this), t(this, Dt).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
197
197
  disconnectedCallback() {
198
- t(this, Z) && t(this, Z).disconnect();
198
+ t(this, G) && t(this, G).disconnect();
199
199
  }
200
200
  };
201
- B = new WeakMap(), F = new WeakMap(), S = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), Wt = new WeakMap(), G = new WeakMap(), Ot = new WeakMap(), h(We, "NineTableHScrollBar");
202
- let fe = We;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", fe);
204
- var J, Q, ct, k, wt, St, Bt;
205
- const Oe = class Oe extends HTMLElement {
201
+ B = new WeakMap(), F = new WeakMap(), S = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), G = new WeakMap(), Dt = new WeakMap(), J = new WeakMap(), Pt = new WeakMap(), h(Be, "NineTableHScrollBar");
202
+ let ge = Be;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ge);
204
+ var Q, tt, ht, k, Rt, Et, Ft;
205
+ const De = class De extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- d(this, J);
209
208
  d(this, Q);
210
- d(this, ct, !1);
209
+ d(this, tt);
210
+ d(this, ht, !1);
211
211
  d(this, k);
212
- d(this, wt, 0);
213
- d(this, St, 0);
214
- E(this, "refresh", /* @__PURE__ */ h(() => {
215
- if (q.log("vscrollbar.refresh"), !t(this, J) || !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, J).data.length, a = t(this, Q).getRowHeight(), c = o * a;
217
- if (c <= i || o === 0) {
212
+ d(this, Rt, 0);
213
+ d(this, Et, 0);
214
+ A(this, "refresh", /* @__PURE__ */ h(() => {
215
+ if (R.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, 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);
227
- q.log(e, g, b);
228
- let u = 0;
229
- b > 0 && (u = g / b * (l - f));
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;
226
+ const u = e.scrollTop, b = Math.max(c - o, 1);
227
+ R.log(e, u, b);
228
+ let g = 0;
229
+ b > 0 && (g = u / b * (l - f));
230
+ const x = l - f;
231
+ g < 0 && (g = 0), g > x && (g = x), r.style.top = `${g}px`, t(this, k).top.disabled = u <= 0, t(this, k).bottom.disabled = u >= b - 1;
232
232
  }, "refresh"));
233
- d(this, Bt, /* @__PURE__ */ h(() => {
234
- q.log("nine-table-vscrollbar.#init");
233
+ d(this, Ft, /* @__PURE__ */ h(() => {
234
+ R.log("nine-table-vscrollbar.#init");
235
235
  const e = t(this, k).container, s = /* @__PURE__ */ h(() => {
236
- const i = (t(this, J).data.get() || []).length, o = t(this, Q).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
- r.stopPropagation(), r.preventDefault(), p(this, ct, !0), p(this, wt, r.clientY), p(this, St, e.scrollTop);
242
- const i = /* @__PURE__ */ h((a) => {
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, m = s(), v = Math.max(m - u, 1);
245
- if (g > 0 && v > 0) {
246
- const R = b / g * v;
247
- let x = t(this, St) + R;
248
- const z = Math.max(0, m - u);
249
- x < 0 && (x = 0), x > z && (x = z), e.scrollTop = x;
241
+ r.stopPropagation(), r.preventDefault(), p(this, ht, !0), p(this, Rt, r.clientY), p(this, Et, e.scrollTop);
242
+ const o = /* @__PURE__ */ h((a) => {
243
+ if (!t(this, ht)) return;
244
+ const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, u = c.height - l, b = a.clientY - t(this, Rt), g = e.clientHeight, x = s(), v = Math.max(x - g, 1);
245
+ if (u > 0 && v > 0) {
246
+ const E = b / u * v;
247
+ let y = t(this, Et) + E;
248
+ const z = Math.max(0, x - g);
249
+ y < 0 && (y = 0), y > z && (y = z), e.scrollTop = y;
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, ht, !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, u = s(), b = Math.max(u - f, 1);
259
259
  if (l > 0 && b > 0) {
260
- const u = Math.max(0, Math.min(1, a / l));
261
- e.scrollTop = u * b;
260
+ const g = Math.max(0, Math.min(1, a / l));
261
+ e.scrollTop = g * b;
262
262
  }
263
263
  this.refresh();
264
264
  }), t(this, k).top.addEventListener("click", () => {
@@ -269,7 +269,7 @@ const Oe = class Oe extends HTMLElement {
269
269
  }, "#init"));
270
270
  }
271
271
  connectedCallback() {
272
- p(this, J, this.getRootNode().host), p(this, Q, this.closest("nine-table-sheet")), this.innerHTML = `
272
+ p(this, Q, this.getRootNode().host), p(this, tt, this.closest("nine-table-sheet")), this.innerHTML = `
273
273
  <style>
274
274
  nine-table-vscrollbar {
275
275
  display: flex;
@@ -334,7 +334,7 @@ const Oe = class Oe extends HTMLElement {
334
334
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
335
335
  `;
336
336
  const e = /* @__PURE__ */ h(() => {
337
- const s = t(this, Q).querySelector(".ng-container-body .ng-part-body");
337
+ const s = t(this, tt).querySelector(".ng-container-body .ng-part-body");
338
338
  if (!s) {
339
339
  setTimeout(e, 10);
340
340
  return;
@@ -345,59 +345,59 @@ const Oe = class Oe extends HTMLElement {
345
345
  thumb: this.querySelector(".ng-scroll-thumb"),
346
346
  top: this.querySelector(".ng-scroll-top"),
347
347
  bottom: this.querySelector(".ng-scroll-bottom")
348
- }), t(this, Bt).call(this), this.refresh();
348
+ }), t(this, Ft).call(this), this.refresh();
349
349
  }, "initWhenReady");
350
350
  e();
351
351
  }
352
352
  };
353
- J = new WeakMap(), Q = new WeakMap(), ct = new WeakMap(), k = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), Bt = new WeakMap(), h(Oe, "NineTableVScrollBar");
354
- let ge = Oe;
355
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", ge);
356
- var P, w, tt, D, I, j, et, Et, ke, Ce, Dt, Pt, At, Rt, qt, Ft, jt, Tt, Le, ht, kt, Yt;
357
- const Be = class Be {
353
+ Q = new WeakMap(), tt = new WeakMap(), ht = new WeakMap(), k = new WeakMap(), Rt = new WeakMap(), Et = new WeakMap(), Ft = new WeakMap(), h(De, "NineTableVScrollBar");
354
+ let be = De;
355
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", be);
356
+ var P, w, et, D, I, j, st, At, Le, He, jt, Yt, qt, Tt, kt, Vt, Ut, Ct, $e, dt, Lt, Xt;
357
+ const Pe = class Pe {
358
358
  constructor(n) {
359
359
  d(this, P);
360
360
  d(this, w);
361
- d(this, tt);
361
+ d(this, et);
362
362
  d(this, D, /* @__PURE__ */ new Map());
363
363
  d(this, I, null);
364
364
  d(this, j, null);
365
- d(this, et, 0);
366
- d(this, Et, 40);
367
- d(this, ke, !1);
368
- d(this, Ce, !1);
365
+ d(this, st, 0);
366
+ d(this, At, 40);
367
+ d(this, Le, !1);
368
+ d(this, He, !1);
369
369
  //#ticking = false; // 🎯 고속 스크롤 스로틀링용 플래그
370
- d(this, Dt, 3);
371
- E(this, "refresh", /* @__PURE__ */ h(() => {
370
+ d(this, jt, 3);
371
+ A(this, "refresh", /* @__PURE__ */ h(() => {
372
372
  var e;
373
- q.log("rowManager.refresh");
373
+ R.log("rowManager.refresh");
374
374
  const n = t(this, w).querySelector(".ng-container-body .ng-part-body");
375
- n && (t(this, At).call(this), t(this, Rt).call(this), t(this, ht).call(this, n.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
375
+ n && (t(this, qt).call(this), t(this, Tt).call(this), t(this, dt).call(this, n.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
376
376
  }, "refresh"));
377
- E(this, "initialize", /* @__PURE__ */ h(() => {
378
- q.log("rowManager.initialize"), p(this, tt, {
377
+ A(this, "initialize", /* @__PURE__ */ h(() => {
378
+ R.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, I, null), t(this, D).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
382
- const a = t(this, w).querySelector(o);
381
+ }), p(this, I, null), t(this, D).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
- const g = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
389
- t(this, D).set(o, g);
388
+ const u = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
389
+ t(this, D).set(i, u);
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
- 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;
393
+ t(this, qt).call(this), t(this, Ct).call(this), t(this, Tt).call(this), t(this, dt).call(this, n.scrollTop);
394
+ let i = !1;
395
395
  const a = /* @__PURE__ */ h((c) => {
396
- var g;
397
- if (o) return;
398
- o = !0;
396
+ var u;
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, dt).call(this, l), (u = t(this, w).querySelector("nine-table-vscrollbar")) == null || u.refresh(), i = !1;
401
401
  }, "handleContainerScroll");
402
402
  [n, e, s].forEach((c) => {
403
403
  c == null || c.addEventListener("scroll", () => {
@@ -406,158 +406,158 @@ const Be = class Be {
406
406
  });
407
407
  }
408
408
  }, "initialize"));
409
- d(this, Pt, /* @__PURE__ */ h((n, e) => {
410
- q.log("rowManager.#renderRows");
409
+ d(this, Yt, /* @__PURE__ */ h((n, e) => {
410
+ R.log("rowManager.#renderRows");
411
411
  const s = t(this, D).get(e);
412
412
  if (!s || s.length === 0) return;
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();
417
- for (let a = 0; a < t(this, Et); a++)
416
+ const o = r.querySelector("tr.nodata"), i = document.createDocumentFragment();
417
+ for (let a = 0; a < t(this, At); 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, tt).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
- d(this, At, /* @__PURE__ */ h(() => {
423
+ d(this, qt, /* @__PURE__ */ h(() => {
424
424
  if (t(this, I) !== null && t(this, I) > 0)
425
425
  return t(this, I);
426
426
  const n = t(this, w).querySelector(".ng-container-body .ng-part-body");
427
- q.log("rowManager.#measureAndCacheHeight");
427
+ R.log("rowManager.#measureAndCacheHeight");
428
428
  const e = t(this, D).get(".ng-container-body");
429
429
  if (!e || e.length === 0) throw new Error("invalid dom");
430
430
  const s = n.querySelector("tbody.bindable-tbody");
431
- if (q.log(s), !s) throw new Error("invalid dom");
431
+ if (R.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
- const g = s.querySelectorAll("tr");
441
- return g.forEach((b) => {
442
- let u = b.offsetHeight || b.getBoundingClientRect().height;
443
- if (u === 0) {
444
- const m = window.getComputedStyle(b);
445
- u = parseFloat(m.height) || parseFloat(m.minHeight) || 0;
440
+ const u = s.querySelectorAll("tr");
441
+ return u.forEach((b) => {
442
+ let g = b.offsetHeight || b.getBoundingClientRect().height;
443
+ if (g === 0) {
444
+ const x = window.getComputedStyle(b);
445
+ g = parseFloat(x.height) || parseFloat(x.minHeight) || 0;
446
446
  }
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, I, f), t(this, qt).call(this), t(this, I));
447
+ f += g;
448
+ }), u.forEach((b) => b.remove()), i.style.display = a, i.style.visibility = c, i.style.position = l, f <= 0 ? -1 : (p(this, I, f), t(this, kt).call(this), t(this, I));
449
449
  }, "#measureAndCacheHeight"));
450
- d(this, Rt, /* @__PURE__ */ h(() => {
451
- q.log("rowManager.#updateVirtualScrollHeight");
450
+ d(this, Tt, /* @__PURE__ */ h(() => {
451
+ R.log("rowManager.#updateVirtualScrollHeight");
452
452
  const e = (t(this, P).data.get() || []).length, s = t(this, I), r = e * s;
453
- q.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
+ R.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"));
460
- d(this, qt, /* @__PURE__ */ h(() => {
461
- if (t(this, et) > 0 && t(this, I) > 0) {
462
- const n = Math.ceil(t(this, et) / t(this, I));
463
- p(this, Et, n + t(this, Dt));
460
+ d(this, kt, /* @__PURE__ */ h(() => {
461
+ if (t(this, st) > 0 && t(this, I) > 0) {
462
+ const n = Math.ceil(t(this, st) / t(this, I));
463
+ p(this, At, n + t(this, jt));
464
464
  }
465
465
  }, "#updateRowCount"));
466
- d(this, Ft, /* @__PURE__ */ h(() => {
467
- var a, c, l, f, g, b;
466
+ d(this, Vt, /* @__PURE__ */ h(() => {
467
+ var a, c, l, f, u, 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")) : [], m = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], R = Math.max(u.length, m.length, v.length);
471
- for (let x = 0; x < R; x++) {
470
+ const g = n ? Array.from(n.querySelectorAll("tbody tr")) : [], x = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], E = Math.max(g.length, x.length, v.length);
471
+ for (let y = 0; y < E; y++) {
472
472
  const z = [
473
- ((a = u[x]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
474
- ((c = m[x]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
475
- ((l = v[x]) == null ? void 0 : l.getBoundingClientRect().height) || 0
473
+ ((a = g[y]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
474
+ ((c = x[y]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
475
+ ((l = v[y]) == null ? void 0 : l.getBoundingClientRect().height) || 0
476
476
  ], T = Math.max(...z);
477
- T > 0 && (u[x] && (u[x].style.height = `${T}px`), m[x] && (m[x].style.height = `${T}px`), v[x] && (v[x].style.height = `${T}px`));
477
+ T > 0 && (g[y] && (g[y].style.height = `${T}px`), x[y] && (x[y].style.height = `${T}px`), v[y] && (v[y].style.height = `${T}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")) : [], m = Array.from(i.querySelectorAll("tfoot tr")), v = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], R = Math.max(u.length, m.length, v.length);
483
- for (let x = 0; x < R; x++) {
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 g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], x = Array.from(o.querySelectorAll("tfoot tr")), v = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], E = Math.max(g.length, x.length, v.length);
483
+ for (let y = 0; y < E; y++) {
484
484
  const z = [
485
- ((f = u[x]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
486
- ((g = m[x]) == null ? void 0 : g.getBoundingClientRect().height) || 0,
487
- ((b = v[x]) == null ? void 0 : b.getBoundingClientRect().height) || 0
485
+ ((f = g[y]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
486
+ ((u = x[y]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
487
+ ((b = v[y]) == null ? void 0 : b.getBoundingClientRect().height) || 0
488
488
  ], T = Math.max(...z);
489
- T > 0 && (u[x] && (u[x].style.height = `${T}px`), m[x] && (m[x].style.height = `${T}px`), v[x] && (v[x].style.height = `${T}px`));
489
+ T > 0 && (g[y] && (g[y].style.height = `${T}px`), x[y] && (x[y].style.height = `${T}px`), v[y] && (v[y].style.height = `${T}px`));
490
490
  }
491
491
  }
492
492
  }, "#syncRowHeights"));
493
- d(this, jt, /* @__PURE__ */ h(() => {
493
+ d(this, Ut, /* @__PURE__ */ h(() => {
494
494
  !t(this, w) || !(t(this, w) instanceof HTMLElement) || (p(this, j, new ResizeObserver((n) => {
495
495
  for (const e of n) {
496
496
  const s = e.target;
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);
504
- t(this, et) !== c && (p(this, et, c), t(this, qt).call(this), t(this, I) !== null && (t(this, Tt).call(this), this.refresh()));
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
+ t(this, st) !== c && (p(this, st, c), t(this, kt).call(this), t(this, I) !== null && (t(this, Ct).call(this), this.refresh()));
505
505
  }
506
506
  }
507
507
  })), t(this, j).observe(t(this, w)));
508
508
  }, "#initResizeObserver"));
509
- d(this, Tt, /* @__PURE__ */ h(() => {
510
- q.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
509
+ d(this, Ct, /* @__PURE__ */ h(() => {
510
+ R.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
511
511
  const e = t(this, w).querySelector(n);
512
- e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Pt).call(this, e, n);
513
- }), t(this, Yt).call(this), t(this, Ft).call(this);
512
+ e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Yt).call(this, e, n);
513
+ }), t(this, Xt).call(this), t(this, Vt).call(this);
514
514
  }, "#renderAllContainers"));
515
- d(this, Le, /* @__PURE__ */ h((n) => {
515
+ d(this, $e, /* @__PURE__ */ h((n) => {
516
516
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
517
517
  var l;
518
518
  const s = t(this, w).querySelector(e);
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, D).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, P).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, D).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, P).data.get() || []).length;
523
+ o.forEach((f, u) => {
524
+ const b = n + Math.floor(u / i);
525
525
  if (b >= c) {
526
526
  f.style.visibility = "hidden";
527
527
  return;
528
528
  }
529
- const u = t(this, P).data.get(b);
530
- f.style.display = "", t(this, kt).call(this, f, u, b);
529
+ const g = t(this, P).data.get(b);
530
+ f.style.display = "", t(this, Lt).call(this, f, g, b);
531
531
  });
532
532
  });
533
533
  }, "#adjustBufferRows"));
534
- d(this, ht, /* @__PURE__ */ h((n) => {
535
- var g, b;
534
+ d(this, dt, /* @__PURE__ */ h((n) => {
535
+ var u, b;
536
536
  const e = t(this, I);
537
537
  if (!e || e <= 0) return;
538
538
  const s = t(this, P).data.length;
539
539
  if (s === 0) return;
540
- const r = ((g = t(this, D).get(".ng-container-body")) == null ? void 0 : g.length) || 1, i = t(this, w).querySelector(".ng-container-body .ng-part-body");
541
- q.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 = ((u = t(this, D).get(".ng-container-body")) == null ? void 0 : u.length) || 1, o = t(this, w).querySelector(".ng-container-body .ng-part-body");
541
+ R.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
- q.log(`📜 [Scroll Calc] maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`), a === o && q.log(`📜 [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`);
545
- const l = t(this, tt).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
546
- (b = t(this, tt)) == null || b.scrollTables.forEach((u) => {
547
- u.style.transform = `translate3d(0, ${c}px, 0)`;
548
- }), f !== a && (q.log(`🔄 [Row Bind Trigger] currentStartIndex(${f}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
549
- const m = t(this, w).querySelector(u);
550
- if (!m) return;
551
- const v = m.querySelector(".ng-part-body tbody.bindable-tbody");
544
+ R.log(`📜 [Scroll Calc] maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`), a === i && R.log(`📜 [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`);
545
+ const l = t(this, et).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
546
+ (b = t(this, et)) == null || b.scrollTables.forEach((g) => {
547
+ g.style.transform = `translate3d(0, ${c}px, 0)`;
548
+ }), f !== a && (R.log(`🔄 [Row Bind Trigger] currentStartIndex(${f}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
549
+ const x = t(this, w).querySelector(g);
550
+ if (!x) return;
551
+ const v = x.querySelector(".ng-part-body tbody.bindable-tbody");
552
552
  if (!v) return;
553
- Array.from(v.querySelectorAll("tr:not(.nodata)")).forEach((x, z) => {
553
+ Array.from(v.querySelectorAll("tr:not(.nodata)")).forEach((y, z) => {
554
554
  const T = a + Math.floor(z / r);
555
555
  if (T >= s) {
556
- x.style.display = "none";
556
+ y.style.display = "none";
557
557
  return;
558
558
  }
559
- const W = t(this, P).data.get(T);
560
- x.style.display = "", t(this, kt).call(this, x, W, T);
559
+ const O = t(this, P).data.get(T);
560
+ y.style.display = "", t(this, Lt).call(this, y, O, T);
561
561
  });
562
562
  }));
563
563
  }, "#handleScroll"));
@@ -575,32 +575,32 @@ const Be = class Be {
575
575
  cell.dataset.row = dataIndex;
576
576
  });
577
577
  }; */
578
- d(this, kt, /* @__PURE__ */ h((n, e, s) => {
579
- n.dataset.row = s, n.data = e, Array.from(n.cells).forEach((r, i) => {
578
+ d(this, Lt, /* @__PURE__ */ h((n, e, s) => {
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
- d(this, Yt, /* @__PURE__ */ h(() => {
585
+ d(this, Xt, /* @__PURE__ */ h(() => {
586
586
  var c, l, f;
587
- q.log("rowManager.#syncHeaderHeights");
587
+ R.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);
591
- for (let g = 0; g < a; g++) {
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
+ for (let u = 0; u < a; u++) {
592
592
  const b = [
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
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`));
593
+ ((c = r[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
594
+ ((l = o[u]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
595
+ ((f = i[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
596
+ ], g = Math.max(...b);
597
+ g > 0 && (r[u] && (r[u].style.height = `${g}px`), o[u] && (o[u].style.height = `${g}px`), i[u] && (i[u].style.height = `${g}px`));
598
598
  }
599
599
  }, "#syncHeaderHeights"));
600
- E(this, "destroy", /* @__PURE__ */ h(() => {
600
+ A(this, "destroy", /* @__PURE__ */ h(() => {
601
601
  t(this, j) && (t(this, j).disconnect(), p(this, j, null));
602
602
  }, "destroy"));
603
- p(this, P, n.getRootNode().host), p(this, w, n), t(this, jt).call(this);
603
+ p(this, P, n.getRootNode().host), p(this, w, n), t(this, Ut).call(this);
604
604
  }
605
605
  getRowHeight() {
606
606
  return t(this, I);
@@ -610,14 +610,14 @@ const Be = class Be {
610
610
  return ((e = t(this, D).get(n)) == null ? void 0 : e.length) || 1;
611
611
  }
612
612
  };
613
- P = new WeakMap(), w = new WeakMap(), tt = new WeakMap(), D = new WeakMap(), I = new WeakMap(), j = new WeakMap(), et = new WeakMap(), Et = new WeakMap(), ke = new WeakMap(), Ce = new WeakMap(), Dt = new WeakMap(), Pt = new WeakMap(), At = new WeakMap(), Rt = new WeakMap(), qt = new WeakMap(), Ft = new WeakMap(), jt = new WeakMap(), Tt = new WeakMap(), Le = new WeakMap(), ht = new WeakMap(), kt = new WeakMap(), Yt = new WeakMap(), h(Be, "RowManager");
614
- let ue = Be;
615
- const Vt = class Vt {
613
+ P = new WeakMap(), w = new WeakMap(), et = new WeakMap(), D = new WeakMap(), I = new WeakMap(), j = new WeakMap(), st = new WeakMap(), At = new WeakMap(), Le = new WeakMap(), He = new WeakMap(), jt = new WeakMap(), Yt = new WeakMap(), qt = new WeakMap(), Tt = new WeakMap(), kt = new WeakMap(), Vt = new WeakMap(), Ut = new WeakMap(), Ct = new WeakMap(), $e = new WeakMap(), dt = new WeakMap(), Lt = new WeakMap(), Xt = new WeakMap(), h(Pe, "RowManager");
614
+ let pe = Pe;
615
+ const Kt = class Kt {
616
616
  /**
617
617
  * 🎯 레이아웃 내의 여러 rawTables 배열을 일괄로 받아 단일 마스터 템플릿으로 사전 컴파일합니다.
618
618
  */
619
619
  static compileAll(n) {
620
- return Array.isArray(n) ? n.map((e) => Vt.compile(e)) : [];
620
+ return Array.isArray(n) ? n.map((e) => Kt.compile(e)) : [];
621
621
  }
622
622
  /**
623
623
  * 🎯 단일 원본 테이블을 받아 기본 구조 보정 및 2차원 격자 인덱스 사전 부여 완료된 마스터 테이블 반환
@@ -628,17 +628,17 @@ const Vt = class Vt {
628
628
  a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
629
629
  const f = l.getAttribute("cell-type") || "renderer";
630
630
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
631
- let g = `cell-${f}`;
632
- const b = l.getAttribute("data-bind"), u = l.getAttribute("data-expr"), m = l.getAttribute("maxbyte"), v = l.getAttribute("type");
633
- let R = [];
634
- b && R.push(`data-bind="${b}"`), u && R.push(`data-expr="${u}"`), m && R.push(`maxbyte="${m}"`), v && R.push(`type="${v}"`), l.innerHTML = `<${g} ${R.join(" ")}></${g}>`;
631
+ let u = `cell-${f}`;
632
+ const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), x = l.getAttribute("maxbyte"), v = l.getAttribute("type");
633
+ let E = [];
634
+ b && E.push(`data-bind="${b}"`), g && E.push(`data-expr="${g}"`), x && E.push(`maxbyte="${x}"`), v && E.push(`type="${v}"`), l.innerHTML = `<${u} ${E.join(" ")}></${u}>`;
635
635
  });
636
636
  }, "processCellTypes"), s = /* @__PURE__ */ h((a) => {
637
637
  if (!a.querySelector("colgroup")) {
638
- const c = a.querySelector("tbody tr") || a.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), g = Math.max(Math.floor(a.clientWidth / l), 100);
638
+ const c = a.querySelector("tbody tr") || a.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), u = Math.max(Math.floor(a.clientWidth / l), 100);
639
639
  for (let b = 0; b < l; b++) {
640
- const u = document.createElement("col");
641
- u.setAttribute("width", g), f.appendChild(u);
640
+ const g = document.createElement("col");
641
+ g.setAttribute("width", u), f.appendChild(g);
642
642
  }
643
643
  a.prepend(f);
644
644
  }
@@ -648,197 +648,204 @@ const Vt = class Vt {
648
648
  }
649
649
  a.classList.add("nine-table-element");
650
650
  }, "ensureTableStructure"), r = /* @__PURE__ */ h((a, c) => {
651
- const l = Array.from(a.querySelectorAll(c + " tr")), f = Array.from(a.querySelectorAll(c + " th," + c + " td")), g = l.length;
652
- if (g === 0 || f.length === 0) return;
651
+ const l = Array.from(a.querySelectorAll(c + " tr")), f = Array.from(a.querySelectorAll(c + " th," + c + " td")), u = l.length;
652
+ if (u === 0 || f.length === 0) return;
653
653
  let b = 0;
654
- f.forEach((m) => {
655
- b += m.colSpan || 1;
654
+ f.forEach((x) => {
655
+ b += x.colSpan || 1;
656
656
  });
657
- const u = Array.from(Array(g), () => Array(b).fill(null));
658
- l.forEach((m) => {
659
- const v = m.sectionRowIndex;
660
- let R = 0;
661
- Array.from(m.querySelectorAll("th,td")).forEach((x) => {
662
- for (let W = 0; W < u[v].length; W++)
663
- if (u[v][W] === null) {
664
- R = W;
657
+ const g = Array.from(Array(u), () => Array(b).fill(null));
658
+ l.forEach((x) => {
659
+ const v = x.sectionRowIndex;
660
+ let E = 0;
661
+ Array.from(x.querySelectorAll("th,td")).forEach((y) => {
662
+ for (let O = 0; O < g[v].length; O++)
663
+ if (g[v][O] === null) {
664
+ E = O;
665
665
  break;
666
666
  }
667
- const z = x.rowSpan || 1, T = x.colSpan || 1;
668
- for (let W = 0; W < z; W++)
669
- for (let mt = 0; mt < T; mt++)
670
- v + W < g && R + mt < b && (u[v + W][R + mt] = W === 0 && mt === 0 ? "1" : "0");
667
+ const z = y.rowSpan || 1, T = y.colSpan || 1;
668
+ for (let O = 0; O < z; O++)
669
+ for (let xt = 0; xt < T; xt++)
670
+ v + O < u && E + xt < b && (g[v + O][E + xt] = O === 0 && xt === 0 ? "1" : "0");
671
671
  });
672
- }), l.forEach((m) => {
673
- const v = m.sectionRowIndex;
674
- Array.from(m.querySelectorAll("th,td")).forEach((R) => {
675
- for (let x = 0; x < u[v].length; x++)
676
- if (u[v][x] === "1") {
677
- R.dataset.col = x, u[v][x] = "0";
672
+ }), l.forEach((x) => {
673
+ const v = x.sectionRowIndex;
674
+ Array.from(x.querySelectorAll("th,td")).forEach((E) => {
675
+ for (let y = 0; y < g[v].length; y++)
676
+ if (g[v][y] === "1") {
677
+ E.dataset.col = y, g[v][y] = "0";
678
678
  break;
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
  };
692
- h(Vt, "TableCompiler");
693
- let be = Vt;
694
- var Y, st, Ut, es;
695
- const De = class De {
692
+ h(Kt, "TableCompiler");
693
+ let ye = Kt;
694
+ var Y, nt, X, Wt, ss;
695
+ const Fe = class Fe {
696
696
  constructor(n) {
697
- d(this, Ut);
697
+ d(this, X);
698
698
  d(this, Y);
699
- d(this, st, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
700
- E(this, "render", /* @__PURE__ */ h(() => {
701
- const { startRow: n, startCol: e, endRow: s, endCol: r } = t(this, st);
702
- trace.log("🎨 [CellSelection.render] Rendering range ->", t(this, st));
703
- const i = t(this, Y).querySelectorAll(
699
+ d(this, nt, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
700
+ A(this, "render", /* @__PURE__ */ h(() => {
701
+ const { startRow: n, startCol: e, endRow: s, endCol: r } = t(this, nt);
702
+ R.log("🎨 [CellSelection.render] Rendering range ->", t(this, nt));
703
+ const o = t(this, Y).querySelectorAll(
704
704
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
705
705
  );
706
- if (i.forEach((a) => {
706
+ if (o.forEach((a) => {
707
707
  a.querySelectorAll(".selected, .selected-top, .selected-bottom, .selected-left, .selected-right").forEach((c) => {
708
708
  c.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
709
709
  });
710
710
  }), n < 0 || e < 0) {
711
- trace.log("⚠️ [CellSelection.render] Range is invalid (< 0), skipping render.");
711
+ R.log("⚠️ [CellSelection.render] Range is invalid (< 0), skipping render.");
712
712
  return;
713
713
  }
714
- let o = 0;
715
- i.forEach((a) => {
714
+ let i = 0;
715
+ o.forEach((a) => {
716
716
  a.querySelectorAll("tbody tr").forEach((c) => {
717
717
  if (c.classList.contains("nodata")) return;
718
- const l = parseInt(c.dataset.row, 10);
719
- isNaN(l) || c.querySelectorAll("td, th").forEach((f) => {
720
- const g = parseInt(f.dataset.col, 10);
721
- if (isNaN(g)) return;
722
- const b = parseInt(f.rowSpan || 1, 10), u = parseInt(f.colSpan || 1, 10), m = l + b - 1, v = g + u - 1;
723
- m >= n && l <= s && v >= e && g <= r && (o++, f.classList.add("selected"), l === n && f.classList.add("selected-top"), m === s && f.classList.add("selected-bottom"), g === e && f.classList.add("selected-left"), v === r && f.classList.add("selected-right"));
718
+ const { matrixRow: l } = vt(this, X, Wt).call(this, c);
719
+ l < 0 || c.querySelectorAll("td, th").forEach((f) => {
720
+ const u = parseInt(f.dataset.col, 10);
721
+ if (isNaN(u)) return;
722
+ const b = parseInt(f.rowSpan || 1, 10), g = parseInt(f.colSpan || 1, 10), x = l + b - 1, v = u + g - 1;
723
+ x >= n && l <= s && v >= e && u <= r && (i++, f.classList.add("selected"), l === n && f.classList.add("selected-top"), x === s && f.classList.add("selected-bottom"), u === e && f.classList.add("selected-left"), v === r && f.classList.add("selected-right"));
724
724
  });
725
725
  });
726
- }), trace.log(`✨ [CellSelection.render] Total rendered cells marked: ${o}`);
726
+ }), R.log(`✨ [CellSelection.render] Total rendered cells marked: ${i}`);
727
727
  }, "render"));
728
- p(this, Y, n), Qe(this, Ut, es).call(this), trace.log("🎯 [CellSelection] Initialized");
728
+ p(this, Y, n), vt(this, X, ss).call(this), R.log("🎯 [CellSelection] Initialized");
729
729
  }
730
730
  setRange(n, e, s, r) {
731
- trace.log(`🔍 [CellSelection.setRange] Input -> startRow: ${n}, startCol: ${e}, endRow: ${s}, endCol: ${r}`);
732
- let i = Math.min(n, s), o = Math.max(n, s), a = Math.min(e, r), c = Math.max(e, r);
733
- p(this, st, { startRow: i, startCol: a, endRow: o, endCol: c }), trace.log("📦 [CellSelection.setRange] Final Range ->", t(this, st)), this.render();
731
+ R.log(`🔍 [CellSelection.setRange] Input -> startRow: ${n}, startCol: ${e}, endRow: ${s}, endCol: ${r}`);
732
+ let o = Math.min(n, s), i = Math.max(n, s), a = Math.min(e, r), c = Math.max(e, r);
733
+ p(this, nt, { startRow: o, startCol: a, endRow: i, endCol: c }), R.log("📦 [CellSelection.setRange] Final Range ->", t(this, nt)), this.render();
734
734
  }
735
735
  };
736
- Y = new WeakMap(), st = new WeakMap(), Ut = new WeakSet(), es = /* @__PURE__ */ h(function() {
736
+ Y = new WeakMap(), nt = new WeakMap(), X = new WeakSet(), Wt = /* @__PURE__ */ h(function(n) {
737
+ if (!n || n.classList.contains("nodata")) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
738
+ const e = parseInt(n.dataset.row, 10);
739
+ if (isNaN(e)) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
740
+ const s = n.closest("tbody"), o = Array.from(s.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), i = o.indexOf(n), a = o.length > 0 ? o.length : 1, c = e * a + i;
741
+ return { dataRow: e, subRowIndex: i, matrixRow: c };
742
+ }, "#getMatrixRow"), ss = /* @__PURE__ */ h(function() {
737
743
  const n = t(this, Y).querySelector(".ng-container-top");
738
744
  if (!n) {
739
- trace.log("❌ [CellSelection] .ng-container-top not found!");
745
+ R.log("❌ [CellSelection] .ng-container-top not found!");
740
746
  return;
741
747
  }
742
748
  n.addEventListener("mousedown", (e) => {
743
749
  if (e.button !== 0) return;
744
750
  const s = e.target.closest("td, th");
745
751
  if (!s || s.dataset.row === void 0 || s.dataset.col === void 0 || s.closest("tr").classList.contains("nodata")) return;
746
- const r = parseInt(s.dataset.row, 10), i = parseInt(s.dataset.col, 10);
747
- trace.log(`🖱️ [MouseDown Success] startRow: ${r}, startCol: ${i}`), this.setRange(r, i, r, i);
748
- const o = /* @__PURE__ */ h((c) => {
749
- const l = document.elementFromPoint(c.clientX, c.clientY);
750
- let f = l == null ? void 0 : l.closest("td, th");
751
- if (!f || !t(this, Y).contains(f)) {
752
- const u = t(this, Y).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
753
- for (const m of u) {
754
- const v = m.getBoundingClientRect();
755
- if (c.clientX >= v.left && c.clientX <= v.right && c.clientY >= v.top && c.clientY <= v.bottom) {
756
- f = m;
752
+ const r = s.closest("tr"), { matrixRow: o } = vt(this, X, Wt).call(this, r), i = parseInt(s.dataset.col, 10);
753
+ if (o < 0) return;
754
+ R.log(`🖱️ [MouseDown Success] startRow: ${o}, startCol: ${i}`), this.setRange(o, i, o, i);
755
+ const a = /* @__PURE__ */ h((l) => {
756
+ const f = document.elementFromPoint(l.clientX, l.clientY);
757
+ let u = f == null ? void 0 : f.closest("td, th");
758
+ if (!u || !t(this, Y).contains(u)) {
759
+ const v = t(this, Y).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
760
+ for (const E of v) {
761
+ const y = E.getBoundingClientRect();
762
+ if (l.clientX >= y.left && l.clientX <= y.right && l.clientY >= y.top && l.clientY <= y.bottom) {
763
+ u = E;
757
764
  break;
758
765
  }
759
766
  }
760
767
  }
761
- if (!f || f.dataset.row === void 0 || f.dataset.col === void 0 || f.closest("tr").classList.contains("nodata")) return;
762
- const g = parseInt(f.dataset.row, 10), b = parseInt(f.dataset.col, 10);
763
- this.setRange(r, i, g, b);
764
- }, "onMouseMove"), a = /* @__PURE__ */ h(() => {
765
- trace.log("🖱️ [MouseUp] Drag ended."), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", a);
768
+ if (!u || u.dataset.row === void 0 || u.dataset.col === void 0 || u.closest("tr").classList.contains("nodata")) return;
769
+ const b = u.closest("tr"), { matrixRow: g } = vt(this, X, Wt).call(this, b), x = parseInt(u.dataset.col, 10);
770
+ g < 0 || this.setRange(o, i, g, x);
771
+ }, "onMouseMove"), c = /* @__PURE__ */ h(() => {
772
+ R.log("🖱️ [MouseUp] Drag ended."), document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", c);
766
773
  }, "onMouseUp");
767
- document.addEventListener("mousemove", o), document.addEventListener("mouseup", a);
774
+ document.addEventListener("mousemove", a), document.addEventListener("mouseup", c);
768
775
  });
769
- }, "#initEvents"), h(De, "CellSelection");
770
- let pe = De;
771
- var Xt, nt, rt, Ct, Kt, Zt, dt, Gt, Jt;
772
- const xt = class xt extends HTMLElement {
776
+ }, "#initEvents"), h(Fe, "CellSelection");
777
+ let me = Fe;
778
+ var Zt, rt, ot, Ht, Gt, Jt, ft, Qt, te;
779
+ const wt = class wt extends HTMLElement {
773
780
  constructor() {
774
781
  super();
775
- d(this, Xt);
776
- d(this, nt, null);
777
- d(this, rt);
778
- d(this, Ct);
779
- E(this, "invalidate", /* @__PURE__ */ h(() => {
780
- q.log("sheet.invalidate()"), t(this, rt).refresh();
782
+ d(this, Zt);
783
+ d(this, rt, null);
784
+ d(this, ot);
785
+ d(this, Ht);
786
+ A(this, "invalidate", /* @__PURE__ */ h(() => {
787
+ R.log("sheet.invalidate()"), t(this, ot).refresh();
781
788
  }, "invalidate"));
782
- E(this, "generate", /* @__PURE__ */ h((e) => {
783
- if (q.log("sheet.generate()"), !e) return;
784
- p(this, nt, be.compile(e)), t(this, Kt).call(this), t(this, Zt).call(this);
785
- 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");
786
- s && i && (i.style.top = `${s.offsetHeight}px`), r && i && (i.style.bottom = `${r.offsetHeight}px`), t(this, rt).initialize(), setTimeout(() => {
787
- var o;
788
- (o = this.querySelector("nine-table-hscrollbar")) == null || o.refresh();
789
+ A(this, "generate", /* @__PURE__ */ h((e) => {
790
+ if (R.log("sheet.generate()"), !e) return;
791
+ p(this, rt, ye.compile(e)), t(this, Gt).call(this), t(this, Jt).call(this);
792
+ 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");
793
+ s && o && (o.style.top = `${s.offsetHeight}px`), r && o && (o.style.bottom = `${r.offsetHeight}px`), t(this, ot).initialize(), setTimeout(() => {
794
+ var i;
795
+ (i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
789
796
  }, 0);
790
797
  }, "generate"));
791
- d(this, Kt, /* @__PURE__ */ h(() => {
798
+ d(this, Gt, /* @__PURE__ */ h(() => {
792
799
  [
793
800
  { selector: ".ng-container-body", type: null },
794
801
  { selector: ".ng-container-left", type: "left" },
795
802
  { selector: ".ng-container-right", type: "right" }
796
803
  ].forEach(({ selector: s, type: r }) => {
797
- var i, o, a;
798
- (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"));
804
+ var o, i, a;
805
+ (o = this.querySelector(`${s} .ng-part-header`)) == null || o.appendChild(t(this, ft).call(this, t(this, rt), r, "header")), (i = this.querySelector(`${s} .ng-virtual-spacer`)) == null || i.before(t(this, ft).call(this, t(this, rt), r, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, ft).call(this, t(this, rt), r, "footer"));
799
806
  });
800
807
  }, "#renderSplitContainers"));
801
- d(this, Zt, /* @__PURE__ */ h(() => {
808
+ d(this, Jt, /* @__PURE__ */ h(() => {
802
809
  ["left", "right", "body"].forEach((e) => {
803
810
  const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
804
811
  if (!s || !r || r.length === 0) return;
805
- let i = 0;
806
- r[0].querySelectorAll("col").forEach((o) => {
807
- const a = parseInt(o.getAttribute("width"), 10);
808
- isNaN(i) || (i += a);
809
- }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${i}px`, s.style.width = `${i}px`);
812
+ let o = 0;
813
+ r[0].querySelectorAll("col").forEach((i) => {
814
+ const a = parseInt(i.getAttribute("width"), 10);
815
+ isNaN(o) || (o += a);
816
+ }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${o}px`, s.style.width = `${o}px`);
810
817
  });
811
818
  }, "#updateContainerWidths"));
812
- d(this, dt, /* @__PURE__ */ h((e, s, r) => {
813
- const i = e.cloneNode(!0), o = i.querySelector("thead"), a = i.querySelector("tbody"), c = i.querySelector("tfoot");
819
+ d(this, ft, /* @__PURE__ */ h((e, s, r) => {
820
+ const o = e.cloneNode(!0), i = o.querySelector("thead"), a = o.querySelector("tbody"), c = o.querySelector("tfoot");
814
821
  if (r === "header") {
815
822
  if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
816
823
  const f = document.createElement("tbody");
817
- f.className = "fixed-tbody", i.appendChild(f);
824
+ f.className = "fixed-tbody", o.appendChild(f);
818
825
  }
819
- } else r === "body" ? (o && o.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), a && a.remove());
820
- return s === "left" ? i.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
826
+ } else r === "body" ? (i && i.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (i && i.remove(), a && a.remove());
827
+ return s === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
821
828
  l.getAttribute("fixed") !== "left" && l.remove();
822
- }) : s === "right" ? i.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
829
+ }) : s === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
823
830
  l.getAttribute("fixed") !== "right" && l.remove();
824
- }) : i.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
831
+ }) : o.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
825
832
  l.remove();
826
- }), i;
833
+ }), o;
827
834
  }, "#createSplitTable"));
828
- E(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, rt).getRowHeight(), "getRowHeight"));
829
- E(this, "scrollToX", /* @__PURE__ */ h((e) => {
835
+ A(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, ot).getRowHeight(), "getRowHeight"));
836
+ A(this, "scrollToX", /* @__PURE__ */ h((e) => {
830
837
  const s = this.querySelector(".ng-container-body .ng-part-body");
831
838
  s && (s.scrollLeft = e);
832
839
  }, "scrollToX"));
833
- E(this, "scrollToY", /* @__PURE__ */ h((e) => {
840
+ A(this, "scrollToY", /* @__PURE__ */ h((e) => {
834
841
  const s = this.querySelector(".ng-container-body .ng-part-body");
835
842
  s && (s.scrollTop = e);
836
843
  }, "scrollToY"));
837
- d(this, Gt, /* @__PURE__ */ h(() => {
838
- t(this, Jt).call(this), p(this, Ct, new pe(this));
844
+ d(this, Qt, /* @__PURE__ */ h(() => {
845
+ t(this, te).call(this), p(this, Ht, new me(this));
839
846
  }, "#init"));
840
- d(this, Jt, /* @__PURE__ */ h(() => {
841
- const e = xt.SCROLLBAR_SIZE;
847
+ d(this, te, /* @__PURE__ */ h(() => {
848
+ const e = wt.SCROLLBAR_SIZE;
842
849
  this.innerHTML = `
843
850
  <style>
844
851
  nine-table-sheet {
@@ -1038,94 +1045,94 @@ const xt = class xt extends HTMLElement {
1038
1045
  </div>
1039
1046
  `;
1040
1047
  }, "#render"));
1041
- p(this, rt, new ue(this)), p(this, Xt, this.getRootNode().host);
1048
+ p(this, ot, new pe(this)), p(this, Zt, this.getRootNode().host);
1042
1049
  }
1043
1050
  connectedCallback() {
1044
- t(this, Gt).call(this);
1051
+ t(this, Qt).call(this);
1045
1052
  }
1046
1053
  get selection() {
1047
- return t(this, Ct);
1054
+ return t(this, Ht);
1048
1055
  }
1049
1056
  disconnectedCallback() {
1050
- this.innerHTML = "", q.log("NineTableSheet destroyed.");
1057
+ this.innerHTML = "", R.log("NineTableSheet destroyed.");
1051
1058
  }
1052
1059
  };
1053
- Xt = new WeakMap(), nt = new WeakMap(), rt = new WeakMap(), Ct = new WeakMap(), Kt = new WeakMap(), Zt = new WeakMap(), dt = new WeakMap(), Gt = new WeakMap(), Jt = new WeakMap(), h(xt, "NineTableSheet"), E(xt, "SCROLLBAR_SIZE", 16);
1054
- let zt = xt;
1055
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", zt);
1056
- var Qt, Lt;
1057
- const Pe = class Pe extends HTMLElement {
1060
+ Zt = new WeakMap(), rt = new WeakMap(), ot = new WeakMap(), Ht = new WeakMap(), Gt = new WeakMap(), Jt = new WeakMap(), ft = new WeakMap(), Qt = new WeakMap(), te = new WeakMap(), h(wt, "NineTableSheet"), A(wt, "SCROLLBAR_SIZE", 16);
1061
+ let Bt = wt;
1062
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Bt);
1063
+ var ee, $t;
1064
+ const je = class je extends HTMLElement {
1058
1065
  constructor() {
1059
1066
  super();
1060
- d(this, Qt, /* @__PURE__ */ h(() => {
1067
+ d(this, ee, /* @__PURE__ */ h(() => {
1061
1068
  var e;
1062
1069
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
1063
- var o;
1064
- const r = s.ctrlKey || s.metaKey || s.shiftKey, i = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
1065
- t(this, Lt).call(this, i, r);
1066
- }), t(this, Lt).call(this, 0, !1);
1070
+ var i;
1071
+ const r = s.ctrlKey || s.metaKey || s.shiftKey, o = parseInt((i = s.target.closest(".nine-tab-item")) == null ? void 0 : i.dataset.index, 10);
1072
+ t(this, $t).call(this, o, r);
1073
+ }), t(this, $t).call(this, 0, !1);
1067
1074
  }, "#init"));
1068
- d(this, Lt, /* @__PURE__ */ h((e, s = !1) => {
1075
+ d(this, $t, /* @__PURE__ */ h((e, s = !1) => {
1069
1076
  const r = /* @__PURE__ */ h(() => {
1070
1077
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
1071
- Array.from(this.querySelectorAll("nine-splitter")).forEach((u) => u.style.setProperty("display", "none"));
1072
- const b = f.filter((u) => u.classList.contains("active"));
1073
- b.length < 2 || b.forEach((u) => {
1074
- const m = parseInt(u.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${m}"]`), R = f[m + 1];
1075
- v && R && R.classList.contains("active") && v.style.setProperty("display", "flex");
1078
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
1079
+ const b = f.filter((g) => g.classList.contains("active"));
1080
+ b.length < 2 || b.forEach((g) => {
1081
+ const x = parseInt(g.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${x}"]`), E = f[x + 1];
1082
+ v && E && E.classList.contains("active") && v.style.setProperty("display", "flex");
1076
1083
  });
1077
- }, "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");
1084
+ }, "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");
1078
1085
  if (!a[e]) return;
1079
1086
  if (!s)
1080
- a.forEach((f, g) => {
1081
- f.classList.toggle("active", g === e);
1082
- }), c.forEach((f, g) => {
1083
- const b = g === e;
1087
+ a.forEach((f, u) => {
1088
+ f.classList.toggle("active", u === e);
1089
+ }), c.forEach((f, u) => {
1090
+ const b = u === e;
1084
1091
  f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
1085
1092
  });
1086
1093
  else {
1087
- const f = a[e], g = i.querySelectorAll(".nine-tab-item.active");
1088
- if (f.classList.contains("active") && g.length <= 1)
1094
+ const f = a[e], u = o.querySelectorAll(".nine-tab-item.active");
1095
+ if (f.classList.contains("active") && u.length <= 1)
1089
1096
  return;
1090
1097
  f.classList.toggle("active");
1091
- const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
1098
+ const b = i.querySelector(`nine-table-sheet[data-index="${e}"]`);
1092
1099
  b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
1093
1100
  }
1094
- const l = o.querySelectorAll("nine-table-sheet.active");
1101
+ const l = i.querySelectorAll("nine-table-sheet.active");
1095
1102
  l == null || l.forEach((f) => {
1096
1103
  f.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
1097
1104
  }), r();
1098
1105
  }, "#switchSheet"));
1099
1106
  }
1100
1107
  connectedCallback() {
1101
- t(this, Qt).call(this);
1108
+ t(this, ee).call(this);
1102
1109
  }
1103
1110
  };
1104
- Qt = new WeakMap(), Lt = new WeakMap(), h(Pe, "NineTableSheets");
1105
- let ye = Pe;
1106
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", ye);
1107
- var M, te, Ht, ee;
1108
- const Fe = class Fe {
1111
+ ee = new WeakMap(), $t = new WeakMap(), h(je, "NineTableSheets");
1112
+ let xe = je;
1113
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", xe);
1114
+ var M, se, Mt, ne;
1115
+ const Ye = class Ye {
1109
1116
  constructor(n) {
1110
1117
  d(this, M);
1111
- d(this, te, /* @__PURE__ */ h(() => {
1112
- t(this, ee).call(this), new ResizeObserver((n) => {
1118
+ d(this, se, /* @__PURE__ */ h(() => {
1119
+ t(this, ne).call(this), new ResizeObserver((n) => {
1113
1120
  for (let e of n)
1114
- t(this, M).getAttribute("auto-height") === "true" && t(this, Ht).call(this);
1121
+ t(this, M).getAttribute("auto-height") === "true" && t(this, Mt).call(this);
1115
1122
  }).observe(t(this, M));
1116
1123
  }, "#init"));
1117
- d(this, Ht, /* @__PURE__ */ h(() => {
1124
+ d(this, Mt, /* @__PURE__ */ h(() => {
1118
1125
  var c, l;
1119
1126
  const n = Array.from(t(this, M).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1120
1127
  if (n.length === 0) return;
1121
- const e = parseInt(t(this, M).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((f) => f.getRowHeight())), r = (c = t(this, M).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, i = (l = t(this, M).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = zt.SCROLLBAR_SIZE, a = e * s + r + i + o;
1128
+ const e = parseInt(t(this, M).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((f) => f.getRowHeight())), r = (c = t(this, M).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (l = t(this, M).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, i = Bt.SCROLLBAR_SIZE, a = e * s + r + o + i;
1122
1129
  t(this, M).style.height = `${a}px`;
1123
1130
  }, "#applyAutoHeight"));
1124
- d(this, ee, /* @__PURE__ */ h(() => {
1125
- const e = Array.from(t(this, M).children).filter((c) => c.tagName === "TABLE"), s = t(this, M).getAttribute("auto-height") === "true", r = e.length, i = e.map((c, l) => {
1126
- 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>` : "";
1127
- return g + b;
1128
- }).join(""), o = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1131
+ d(this, ne, /* @__PURE__ */ h(() => {
1132
+ const e = Array.from(t(this, M).children).filter((c) => c.tagName === "TABLE"), s = t(this, M).getAttribute("auto-height") === "true", r = e.length, o = e.map((c, l) => {
1133
+ const u = `<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>` : "";
1134
+ return u + b;
1135
+ }).join(""), i = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1129
1136
  t(this, M).shadowRoot.innerHTML = `
1130
1137
  <style>
1131
1138
  :host {
@@ -1237,9 +1244,9 @@ const Fe = class Fe {
1237
1244
  <nine-table-body>
1238
1245
  <nine-table-summary></nine-table-summary>
1239
1246
  <nine-table-sheets>
1240
- <nine-table-sheets-body>${i}</nine-table-sheets-body>
1247
+ <nine-table-sheets-body>${o}</nine-table-sheets-body>
1241
1248
  <nine-table-sheets-footer>
1242
- <div class="nine-tab-bar">${o}</div>
1249
+ <div class="nine-tab-bar">${i}</div>
1243
1250
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
1244
1251
  </nine-table-sheets-footer>
1245
1252
  </nine-table-sheets>
@@ -1250,50 +1257,50 @@ const Fe = class Fe {
1250
1257
  const a = t(this, M).shadowRoot.querySelectorAll("nine-table-sheet");
1251
1258
  a == null || a.forEach((c, l) => {
1252
1259
  e[l] && setTimeout(() => {
1253
- c.generate(e[l]), s && t(this, Ht).call(this);
1260
+ c.generate(e[l]), s && t(this, Mt).call(this);
1254
1261
  });
1255
1262
  });
1256
1263
  }, "#render"));
1257
- p(this, M, n), t(this, te).call(this);
1264
+ p(this, M, n), t(this, se).call(this);
1258
1265
  }
1259
1266
  };
1260
- M = new WeakMap(), te = new WeakMap(), Ht = new WeakMap(), ee = new WeakMap(), h(Fe, "LayoutManager");
1261
- let me = Fe;
1262
- var $t, ft;
1263
- const je = class je {
1267
+ M = new WeakMap(), se = new WeakMap(), Mt = new WeakMap(), ne = new WeakMap(), h(Ye, "LayoutManager");
1268
+ let ve = Ye;
1269
+ var It, ut;
1270
+ const Ve = class Ve {
1264
1271
  constructor(n) {
1265
- d(this, $t);
1266
- d(this, ft, -1);
1267
- E(this, "count", /* @__PURE__ */ h(() => t(this, $t).rawRecords.length, "count"));
1268
- p(this, $t, n);
1272
+ d(this, It);
1273
+ d(this, ut, -1);
1274
+ A(this, "count", /* @__PURE__ */ h(() => t(this, It).rawRecords.length, "count"));
1275
+ p(this, It, n);
1269
1276
  }
1270
1277
  get at() {
1271
- return t(this, ft);
1278
+ return t(this, ut);
1272
1279
  }
1273
1280
  set at(n) {
1274
- p(this, ft, parseInt(n, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ft)}"]`) && setTimeout(() => {
1281
+ p(this, ut, parseInt(n, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ut)}"]`) && setTimeout(() => {
1275
1282
  });
1276
1283
  }
1277
1284
  };
1278
- $t = new WeakMap(), ft = new WeakMap(), h(je, "ngRow");
1279
- let xe = je;
1280
- var _, C, N, gt, se, V, ne, it, Mt, re, ie, ut;
1281
- const O = class O {
1285
+ It = new WeakMap(), ut = new WeakMap(), h(Ve, "ngRow");
1286
+ let we = Ve;
1287
+ var _, C, N, gt, re, V, oe, it, _t, ie, ae, bt;
1288
+ const W = class W {
1282
1289
  constructor(n, e) {
1283
1290
  d(this, _);
1284
1291
  d(this, C);
1285
1292
  d(this, N, []);
1286
1293
  d(this, gt, []);
1287
- d(this, se, 0);
1294
+ d(this, re, 0);
1288
1295
  d(this, V, []);
1289
- d(this, ne, /* @__PURE__ */ h(() => {
1296
+ d(this, oe, /* @__PURE__ */ h(() => {
1290
1297
  p(this, V, []);
1291
1298
  const n = t(this, _).template || [];
1292
1299
  Array.from(n).forEach((e) => {
1293
1300
  var s;
1294
1301
  t(this, V).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1295
1302
  }), (t(this, C).rawRecords || []).forEach((e) => {
1296
- e.__ng || (e.__ng = t(this, Mt).call(this)), e.__ng.height = t(this, V).slice();
1303
+ e.__ng || (e.__ng = t(this, _t).call(this)), e.__ng.height = t(this, V).slice();
1297
1304
  });
1298
1305
  }, "#initialize"));
1299
1306
  d(this, it, /* @__PURE__ */ h(() => {
@@ -1302,113 +1309,113 @@ const O = class O {
1302
1309
  e.invalidate();
1303
1310
  });
1304
1311
  }, "#invalidate"));
1305
- E(this, "get", /* @__PURE__ */ h((n, e) => {
1306
- var i;
1312
+ A(this, "get", /* @__PURE__ */ h((n, e) => {
1313
+ var o;
1307
1314
  const s = this.getValidData();
1308
1315
  if (!s || s.length <= 0) return;
1309
- if (n == null) return t(this, ut).call(this, s);
1316
+ if (n == null) return t(this, bt).call(this, s);
1310
1317
  if (n < 0 || n >= s.length) return null;
1311
- const r = typeof ((i = t(this, _).fields) == null ? void 0 : i.get) == "function" ? t(this, _).fields.get() : [];
1318
+ const r = typeof ((o = t(this, _).fields) == null ? void 0 : o.get) == "function" ? t(this, _).fields.get() : [];
1312
1319
  if (e != null) {
1313
- const o = r.indexOf(e);
1314
- return o >= 0 ? s[n].v[o] : null;
1320
+ const i = r.indexOf(e);
1321
+ return i >= 0 ? s[n].v[i] : null;
1315
1322
  }
1316
- return t(this, ut).call(this, s[n]);
1323
+ return t(this, bt).call(this, s[n]);
1317
1324
  }, "get"));
1318
- E(this, "set", /* @__PURE__ */ h((n) => {
1325
+ A(this, "set", /* @__PURE__ */ h((n) => {
1319
1326
  this.clear(), this.add(n, !1), t(this, it).call(this);
1320
1327
  }, "set"));
1321
- d(this, Mt, /* @__PURE__ */ h(() => ({
1322
- rowState: O.ROW_STATE.EMPTY,
1328
+ d(this, _t, /* @__PURE__ */ h(() => ({
1329
+ rowState: W.ROW_STATE.EMPTY,
1323
1330
  deleted: !1,
1324
1331
  filtered: !1,
1325
1332
  height: t(this, V).slice(),
1326
1333
  o: {},
1327
1334
  c: {},
1328
- _: [0, 0, 0, 0, O.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, V).slice(), -1, {}, {}]
1335
+ _: [0, 0, 0, 0, W.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, V).slice(), -1, {}, {}]
1329
1336
  }), "#getDefaultMeta"));
1330
- E(this, "reset", /* @__PURE__ */ h(() => {
1337
+ A(this, "reset", /* @__PURE__ */ h(() => {
1331
1338
  p(this, N, []), p(this, gt, []), t(this, it).call(this);
1332
1339
  }, "reset"));
1333
- E(this, "clear", /* @__PURE__ */ h(() => {
1340
+ A(this, "clear", /* @__PURE__ */ h(() => {
1334
1341
  var n;
1335
1342
  t(this, C).rawRecords = [], p(this, N, []), p(this, gt, []), (n = t(this, C).viewRecords) != null && n.reset && t(this, C).viewRecords.reset();
1336
1343
  }, "clear"));
1337
- d(this, re, /* @__PURE__ */ h((n) => {
1344
+ d(this, ie, /* @__PURE__ */ h((n) => {
1338
1345
  var r;
1339
1346
  Array.isArray(n) || (n = [n]);
1340
1347
  const e = typeof ((r = t(this, _).fields) == null ? void 0 : r.get) == "function" ? t(this, _).fields.get() : Object.keys(n[0] || {}), s = [];
1341
- return n.forEach((i) => {
1342
- const o = { v: [] };
1348
+ return n.forEach((o) => {
1349
+ const i = { v: [] };
1343
1350
  e.forEach((a) => {
1344
- o.v.push(i[a] !== void 0 && i[a] !== null ? i[a] : "");
1345
- }), s.push(o);
1351
+ i.v.push(o[a] !== void 0 && o[a] !== null ? o[a] : "");
1352
+ }), s.push(i);
1346
1353
  }), s;
1347
1354
  }, "#json2Array"));
1348
- d(this, ie, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
1349
- e.__ng = t(this, Mt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = O.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1355
+ d(this, ae, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
1356
+ e.__ng = t(this, _t).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = W.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1350
1357
  }), n), "#defaultInsert"));
1351
- E(this, "add", /* @__PURE__ */ h((n, e = !0) => {
1358
+ A(this, "add", /* @__PURE__ */ h((n, e = !0) => {
1352
1359
  n === void 0 && (n = {});
1353
- const s = t(this, re).call(this, n);
1354
- t(this, C).rawRecords = t(this, C).rawRecords.concat(t(this, ie).call(this, s)), this.resetRecords();
1360
+ const s = t(this, ie).call(this, n);
1361
+ t(this, C).rawRecords = t(this, C).rawRecords.concat(t(this, ae).call(this, s)), this.resetRecords();
1355
1362
  const r = this.count() - 1;
1356
- return e || s.forEach((i, o) => {
1357
- const a = t(this, C).rawRecords[r - o];
1358
- a && (a.__ng.rowState = O.ROW_STATE.EMPTY);
1363
+ return e || s.forEach((o, i) => {
1364
+ const a = t(this, C).rawRecords[r - i];
1365
+ a && (a.__ng.rowState = W.ROW_STATE.EMPTY);
1359
1366
  }), t(this, it).call(this), r;
1360
1367
  }, "add"));
1361
- E(this, "delete", /* @__PURE__ */ h((n) => {
1368
+ A(this, "delete", /* @__PURE__ */ h((n) => {
1362
1369
  let e = [];
1363
1370
  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) => {
1364
1371
  if (t(this, N)[s]) {
1365
1372
  const r = t(this, N)[s].__ng.rowid;
1366
- t(this, N)[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) => {
1367
- i.__ng.rowid === r && (i.__ng.deleted = !0, i.__ng.rowState = O.ROW_STATE.DELETE);
1373
+ t(this, N)[s].__ng.rowState === W.ROW_STATE.INSERT ? t(this, C).rawRecords = t(this, C).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, C).rawRecords.forEach((o) => {
1374
+ o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = W.ROW_STATE.DELETE);
1368
1375
  });
1369
1376
  }
1370
1377
  }), this.resetRecords(), t(this, it).call(this);
1371
1378
  }, "delete"));
1372
- E(this, "setValue", /* @__PURE__ */ h((n, e, s) => {
1379
+ A(this, "setValue", /* @__PURE__ */ h((n, e, s) => {
1373
1380
  var c;
1374
1381
  n = parseInt(n, 10);
1375
- const i = (typeof ((c = t(this, _).fields) == null ? void 0 : c.get) == "function" ? t(this, _).fields.get() : []).indexOf(e);
1376
- if (i < 0) return;
1377
- const o = this.getValidData()[n];
1378
- if (!o) return;
1379
- const a = o.v[i];
1380
- 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;
1382
+ const o = (typeof ((c = t(this, _).fields) == null ? void 0 : c.get) == "function" ? t(this, _).fields.get() : []).indexOf(e);
1383
+ if (o < 0) return;
1384
+ const i = this.getValidData()[n];
1385
+ if (!i) return;
1386
+ const a = i.v[o];
1387
+ a !== s && i.__ng.rowState !== W.ROW_STATE.INSERT && (i.__ng.o.hasOwnProperty(e) || (i.__ng.o[e] = a), i.__ng.rowState = W.ROW_STATE.UPDATE), i.v[o] = s;
1381
1388
  }, "setValue"));
1382
- E(this, "resetRecords", /* @__PURE__ */ h(() => {
1389
+ A(this, "resetRecords", /* @__PURE__ */ h(() => {
1383
1390
  p(this, gt, t(this, C).rawRecords.filter((n) => !n.__ng.deleted)), p(this, N, t(this, C).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, C).rawRecords.forEach((n, e) => {
1384
1391
  n.__ng.rowidx = e;
1385
1392
  }), t(this, N).forEach((n, e) => {
1386
1393
  n.__ng.i = e;
1387
1394
  });
1388
1395
  }, "resetRecords"));
1389
- E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, N).length === 0 && t(this, C).rawRecords.length > 0 && this.resetRecords(), t(this, N)), "getValidData"));
1390
- d(this, ut, /* @__PURE__ */ h((n) => {
1391
- var o;
1396
+ A(this, "getValidData", /* @__PURE__ */ h(() => (t(this, N).length === 0 && t(this, C).rawRecords.length > 0 && this.resetRecords(), t(this, N)), "getValidData"));
1397
+ d(this, bt, /* @__PURE__ */ h((n) => {
1398
+ var i;
1392
1399
  if (!n) return n;
1393
- const e = !Array.isArray(n), s = e ? [n] : n, r = typeof ((o = t(this, _).fields) == null ? void 0 : o.get) == "function" ? t(this, _).fields.get() : [], i = s.filter((a) => !a.__ng.deleted).map((a) => {
1400
+ const e = !Array.isArray(n), s = e ? [n] : n, r = typeof ((i = t(this, _).fields) == null ? void 0 : i.get) == "function" ? t(this, _).fields.get() : [], o = s.filter((a) => !a.__ng.deleted).map((a) => {
1394
1401
  const c = {};
1395
1402
  return r.forEach((l, f) => {
1396
1403
  c[l] = a.v ? a.v[f] : a[l];
1397
1404
  }), c.__ng = a.__ng, c;
1398
1405
  });
1399
- return e ? i[0] : i;
1406
+ return e ? o[0] : o;
1400
1407
  }, "#conv"));
1401
- E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1402
- p(this, _, n), p(this, C, e), t(this, ne).call(this);
1408
+ A(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1409
+ p(this, _, n), p(this, C, e), t(this, oe).call(this);
1403
1410
  }
1404
1411
  get source() {
1405
- return t(this, ut).call(this, t(this, C).rawRecords);
1412
+ return t(this, bt).call(this, t(this, C).rawRecords);
1406
1413
  }
1407
1414
  set source(n) {
1408
1415
  this.clear(), this.add(n, !1);
1409
1416
  }
1410
1417
  get nextId() {
1411
- return ++ts(this, se)._;
1418
+ return ++es(this, re)._;
1412
1419
  }
1413
1420
  get count() {
1414
1421
  return t(this, N).length;
@@ -1420,29 +1427,29 @@ const O = class O {
1420
1427
  return this.length;
1421
1428
  }
1422
1429
  };
1423
- _ = new WeakMap(), C = new WeakMap(), N = new WeakMap(), gt = new WeakMap(), se = new WeakMap(), V = new WeakMap(), ne = new WeakMap(), it = new WeakMap(), Mt = new WeakMap(), re = new WeakMap(), ie = new WeakMap(), ut = new WeakMap(), h(O, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1424
- E(O, "ROW_STATE", {
1430
+ _ = new WeakMap(), C = new WeakMap(), N = new WeakMap(), gt = new WeakMap(), re = new WeakMap(), V = new WeakMap(), oe = new WeakMap(), it = new WeakMap(), _t = new WeakMap(), ie = new WeakMap(), ae = new WeakMap(), bt = new WeakMap(), h(W, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1431
+ A(W, "ROW_STATE", {
1425
1432
  EMPTY: "EMPTY",
1426
1433
  NORMAL: "NORMAL",
1427
1434
  INSERT: "INSERT",
1428
1435
  UPDATE: "UPDATE",
1429
1436
  DELETE: "DELETE"
1430
1437
  });
1431
- let ve = O;
1432
- var ot;
1433
- const Ye = class Ye {
1438
+ let Se = W;
1439
+ var at;
1440
+ const Ue = class Ue {
1434
1441
  constructor(n) {
1435
- d(this, ot);
1436
- p(this, ot, n), this.row = new xe(this), this.data = new ve(t(this, ot), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1442
+ d(this, at);
1443
+ p(this, at, n), this.row = new we(this), this.data = new Se(t(this, at), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1437
1444
  var e;
1438
- (e = t(this, ot).view) != null && e.redraw && t(this, ot).view.redraw();
1445
+ (e = t(this, at).view) != null && e.redraw && t(this, at).view.redraw();
1439
1446
  }, this.setDataSource = (e) => {
1440
1447
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1441
1448
  }, this.getRowState = (e) => {
1442
- var r, i;
1449
+ var r, o;
1443
1450
  const s = parseInt(e, 10);
1444
1451
  if (!(s >= this.data.count()))
1445
- return (i = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : i.rowState;
1452
+ return (o = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : o.rowState;
1446
1453
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1447
1454
  this.row.at = e;
1448
1455
  }, 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) => {
@@ -1450,58 +1457,58 @@ const Ye = class Ye {
1450
1457
  }, this.setDataSource([]);
1451
1458
  }
1452
1459
  };
1453
- ot = new WeakMap(), h(Ye, "ngDataManager");
1454
- let we = Ye;
1455
- var bt, H, It, oe;
1456
- const Ve = class Ve {
1460
+ at = new WeakMap(), h(Ue, "ngDataManager");
1461
+ let Re = Ue;
1462
+ var pt, H, Nt, le;
1463
+ const Xe = class Xe {
1457
1464
  // 🎯 이제 { name: string, type: string } 객체들의 배열로 관리합니다.
1458
1465
  constructor(n) {
1459
- d(this, bt);
1466
+ d(this, pt);
1460
1467
  d(this, H, []);
1461
- E(this, "add", /* @__PURE__ */ h((n, e = "string") => {
1468
+ A(this, "add", /* @__PURE__ */ h((n, e = "string") => {
1462
1469
  n.forEach((s) => {
1463
1470
  t(this, H).some((r) => r.name === s) || t(this, H).push({ name: s, type: e });
1464
- }), t(this, It).call(this);
1471
+ }), t(this, Nt).call(this);
1465
1472
  }, "add"));
1466
- d(this, It, /* @__PURE__ */ h(() => {
1473
+ d(this, Nt, /* @__PURE__ */ h(() => {
1467
1474
  const n = /* @__PURE__ */ new Map();
1468
1475
  t(this, H).forEach((e) => {
1469
1476
  n.set(e.name, e.type);
1470
1477
  }), p(this, H, Array.from(n, ([e, s]) => ({ name: e, type: s }))), p(this, H, t(this, H).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, H).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1471
1478
  }, "#adjust"));
1472
- d(this, oe, /* @__PURE__ */ h(() => {
1473
- p(this, H, []), q.log(t(this, bt).querySelectorAll("table"));
1474
- const n = Array.from(t(this, bt).querySelectorAll("table"));
1479
+ d(this, le, /* @__PURE__ */ h(() => {
1480
+ p(this, H, []), R.log(t(this, pt).querySelectorAll("table"));
1481
+ const n = Array.from(t(this, pt).querySelectorAll("table"));
1475
1482
  if (!(!n || n.length === 0)) {
1476
1483
  for (const e of n)
1477
- q.log(e), $("[data-bind]", e).each((s, r) => {
1478
- const i = r.dataset.bind, o = r.getAttribute("data-type") || "string";
1479
- i && t(this, H).push({ name: i, type: o });
1484
+ R.log(e), $("[data-bind]", e).each((s, r) => {
1485
+ const o = r.dataset.bind, i = r.getAttribute("data-type") || "string";
1486
+ o && t(this, H).push({ name: o, type: i });
1480
1487
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1481
- $(`[${s}]`, e).each((r, i) => {
1482
- var o = i.getAttribute(s);
1483
- if (o.indexOf("data.") < 0) {
1484
- const a = o.search(/[(]/g);
1488
+ $(`[${s}]`, e).each((r, o) => {
1489
+ var i = o.getAttribute(s);
1490
+ if (i.indexOf("data.") < 0) {
1491
+ const a = i.search(/[(]/g);
1485
1492
  if (a > 0)
1486
1493
  try {
1487
- o = String(window[o.substring(0, a).trim()]);
1494
+ i = String(window[i.substring(0, a).trim()]);
1488
1495
  } catch {
1489
- o = "";
1496
+ i = "";
1490
1497
  }
1491
1498
  }
1492
- o.split("data.").forEach((a) => {
1499
+ i.split("data.").forEach((a) => {
1493
1500
  if (a.trim() != "") {
1494
1501
  const c = a.search(/[^_A-Za-z0-9]/g);
1495
1502
  let l = "";
1496
- c >= 0 ? l = a.substring(0, c) : o.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, H).push({ name: l, type: "string" });
1503
+ c >= 0 ? l = a.substring(0, c) : i.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, H).push({ name: l, type: "string" });
1497
1504
  }
1498
1505
  });
1499
1506
  });
1500
1507
  });
1501
- t(this, It).call(this);
1508
+ t(this, Nt).call(this);
1502
1509
  }
1503
1510
  }, "#init"));
1504
- p(this, bt, n), t(this, oe).call(this);
1511
+ p(this, pt, n), t(this, le).call(this);
1505
1512
  }
1506
1513
  // 🎯 기존에 필드 이름만 쓰던 곳들과의 호환을 위해 이름 배열만 리턴하는 메서드 유지
1507
1514
  get() {
@@ -1523,43 +1530,43 @@ const Ve = class Ve {
1523
1530
  return t(this, H).some((e) => e.name === n);
1524
1531
  }
1525
1532
  };
1526
- bt = new WeakMap(), H = new WeakMap(), It = new WeakMap(), oe = new WeakMap(), h(Ve, "ngFields");
1527
- let Se = Ve;
1528
- var at, ae, le;
1529
- const Ue = class Ue extends HTMLElement {
1533
+ pt = new WeakMap(), H = new WeakMap(), Nt = new WeakMap(), le = new WeakMap(), h(Xe, "ngFields");
1534
+ let Ee = Xe;
1535
+ var lt, ce, he;
1536
+ const Ke = class Ke extends HTMLElement {
1530
1537
  constructor() {
1531
1538
  super();
1532
1539
  //#created = false;
1533
- d(this, at);
1534
- d(this, ae);
1535
- d(this, le, /* @__PURE__ */ h(() => {
1536
- this.fields = new Se(this), p(this, ae, new me(this)), q.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1540
+ d(this, lt);
1541
+ d(this, ce);
1542
+ d(this, he, /* @__PURE__ */ h(() => {
1543
+ this.fields = new Ee(this), p(this, ce, new ve(this)), R.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1537
1544
  }, "#init"));
1538
- this.attachShadow({ mode: "open" }), p(this, at, new we(this));
1545
+ this.attachShadow({ mode: "open" }), p(this, lt, new Re(this));
1539
1546
  }
1540
1547
  connectedCallback() {
1541
- t(this, le).call(this);
1548
+ t(this, he).call(this);
1542
1549
  }
1543
1550
  disconnectedCallback() {
1544
- q.log("NineTable disconnected.");
1551
+ R.log("NineTable disconnected.");
1545
1552
  }
1546
1553
  // 🎯 외부에서 grid.data.set(...) 형태로 접근할 수 있도록 데이터 매니저 오픈
1547
1554
  get data() {
1548
- return t(this, at).data;
1555
+ return t(this, lt).data;
1549
1556
  }
1550
1557
  // 🎯 행(row) 관련 제어 접근자 오픈
1551
1558
  get row() {
1552
- return t(this, at).row;
1559
+ return t(this, lt).row;
1553
1560
  }
1554
1561
  // 🎯 전체 데이터 매니저 접근 필요할 경우
1555
1562
  get dataManager() {
1556
- return t(this, at);
1563
+ return t(this, lt);
1557
1564
  }
1558
1565
  };
1559
- at = new WeakMap(), ae = new WeakMap(), le = new WeakMap(), h(Ue, "NineTable");
1560
- let Ee = Ue;
1561
- customElements.get("nine-table") || customElements.define("nine-table", Ee);
1562
- const vt = class vt extends HTMLElement {
1566
+ lt = new WeakMap(), ce = new WeakMap(), he = new WeakMap(), h(Ke, "NineTable");
1567
+ let Ae = Ke;
1568
+ customElements.get("nine-table") || customElements.define("nine-table", Ae);
1569
+ const St = class St extends HTMLElement {
1563
1570
  // 👈 커스텀 스타일용 캐시 추가
1564
1571
  constructor() {
1565
1572
  super();
@@ -1570,74 +1577,74 @@ const vt = class vt extends HTMLElement {
1570
1577
  connectedCallback() {
1571
1578
  }
1572
1579
  };
1573
- h(vt, "BasicCellElement"), E(vt, "_styleCache", /* @__PURE__ */ new Map()), E(vt, "_customStyleCache", /* @__PURE__ */ new Map());
1574
- let Ae = vt;
1575
- var L, _t, y, He, $e, Me, Ie, _e;
1576
- const Xe = class Xe extends Ae {
1580
+ h(St, "BasicCellElement"), A(St, "_styleCache", /* @__PURE__ */ new Map()), A(St, "_customStyleCache", /* @__PURE__ */ new Map());
1581
+ let qe = St;
1582
+ var L, zt, m, Me, Ie, _e, Ne, ze;
1583
+ const Ze = class Ze extends qe {
1577
1584
  constructor() {
1578
1585
  super();
1579
1586
  d(this, L);
1580
- d(this, _t);
1581
- d(this, y);
1582
- d(this, He);
1583
- d(this, $e);
1587
+ d(this, zt);
1588
+ d(this, m);
1584
1589
  d(this, Me);
1585
1590
  d(this, Ie);
1586
- E(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1587
- if (t(this, y))
1588
- if (t(this, y).closest("tbody")) {
1589
- const s = t(this, y).closest("tr").data, r = parseInt(t(this, y).dataset.row);
1591
+ d(this, _e);
1592
+ d(this, Ne);
1593
+ A(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1594
+ if (t(this, m))
1595
+ if (t(this, m).closest("tbody")) {
1596
+ const s = t(this, m).closest("tr").data, r = parseInt(t(this, m).dataset.row);
1590
1597
  if (!s) return "";
1591
- if (ninegrid.isNull(t(this, y).dataset.expr)) {
1592
- if (!ninegrid.isNull(t(this, y).dataset.bind))
1593
- return s[t(this, y).dataset.bind] || ninegrid.nvl(e, "");
1598
+ if (ninegrid.isNull(t(this, m).dataset.expr)) {
1599
+ if (!ninegrid.isNull(t(this, m).dataset.bind))
1600
+ return s[t(this, m).dataset.bind] || ninegrid.nvl(e, "");
1594
1601
  } else try {
1595
- return this.getExprValue(t(this, y).dataset.expr, s, r, t(this, y));
1602
+ return this.getExprValue(t(this, m).dataset.expr, s, r, t(this, m));
1596
1603
  } catch {
1597
- console.error(t(this, y).dataset.expr, s, t(this, y).dataset.row);
1604
+ console.error(t(this, m).dataset.expr, s, t(this, m).dataset.row);
1598
1605
  }
1599
1606
  return ninegrid.nvl(e, "");
1600
1607
  } else
1601
1608
  try {
1602
- return t(this, L).exprFunction(t(this, y).dataset.expr).call(this, null, -1, t(this, L).data);
1609
+ return t(this, L).exprFunction(t(this, m).dataset.expr).call(this, null, -1, t(this, L).data);
1603
1610
  } catch {
1604
1611
  }
1605
1612
  }, "getDisplayText"));
1606
- d(this, _e, /* @__PURE__ */ h(() => {
1607
- if (!(!t(this, L) || !t(this, L).template || !t(this, y).closest("tbody.bindable"))) {
1608
- var e = ninegrid.j.querySelectorAll(t(this, y)).attr("suppress");
1613
+ d(this, ze, /* @__PURE__ */ h(() => {
1614
+ if (!(!t(this, L) || !t(this, L).template || !t(this, m).closest("tbody.bindable"))) {
1615
+ var e = ninegrid.j.querySelectorAll(t(this, m)).attr("suppress");
1609
1616
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1610
- var s = t(this, y).closest("tr"), r = [];
1611
- $("th,td", s).each((x, z) => {
1617
+ var s = t(this, m).closest("tr"), r = [];
1618
+ $("th,td", s).each((y, z) => {
1612
1619
  var T = ninegrid.j.querySelectorAll(z).attr("suppress");
1613
1620
  T && z.dataset.row && (T = parseInt(T), !isNaN(T) && T <= e && r.push(T));
1614
1621
  }), r.sort();
1615
- var i = !1;
1622
+ var o = !1;
1616
1623
  if (parseInt(s.sectionRowIndex / t(this, L).template.length) > 0)
1617
- for (var o of r) {
1618
- if (o > e) break;
1619
- 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);
1620
- t(this, y).dataset.matrixRow;
1621
- var g = t(this, L).body.querySelector(`tbody.bindable [suppress="${o}"][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];
1622
- if (b != u) {
1623
- i = !0;
1624
+ for (var i of r) {
1625
+ if (i > e) break;
1626
+ 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);
1627
+ t(this, m).dataset.matrixRow;
1628
+ var u = t(this, L).body.querySelector(`tbody.bindable [suppress="${i}"][data-matrix-row="${t(this, m).dataset.matrixRow}"]`), b = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, a) : l[u.dataset.bind], g = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, c) : f[u.dataset.bind];
1629
+ if (b != g) {
1630
+ o = !0;
1624
1631
  break;
1625
1632
  }
1626
1633
  }
1627
1634
  else
1628
- i = !0;
1629
- i ? ninegrid.j.querySelectorAll(t(this, y)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, y)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, y)).hasClass("hidden") || (i ? ninegrid.j.querySelectorAll(t(this, y)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, y)).addClass("hidden"));
1630
- var m = parseInt(t(this, y).dataset.matrixRow), v = m - 1, R = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, y).dataset.col}"][data-matrix-row="${v}"]`);
1631
- $(R).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, y)).hasClass("suppress") ? ninegrid.j.querySelectorAll(R).removeClass("last-none-suppress").addClass("last-suppress") : !$(R).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, y)).hasClass("suppress") ? ninegrid.j.querySelectorAll(R).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(R).removeClass("last-none-suppress").removeClass("last-suppress");
1635
+ o = !0;
1636
+ o ? ninegrid.j.querySelectorAll(t(this, m)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, m)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, m)).hasClass("hidden") || (o ? ninegrid.j.querySelectorAll(t(this, m)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, m)).addClass("hidden"));
1637
+ var x = parseInt(t(this, m).dataset.matrixRow), v = x - 1, E = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, m).dataset.col}"][data-matrix-row="${v}"]`);
1638
+ $(E).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, m)).hasClass("suppress") ? ninegrid.j.querySelectorAll(E).removeClass("last-none-suppress").addClass("last-suppress") : !$(E).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, m)).hasClass("suppress") ? ninegrid.j.querySelectorAll(E).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(E).removeClass("last-none-suppress").removeClass("last-suppress");
1632
1639
  }
1633
1640
  }
1634
1641
  }, "#resetSuppress"));
1635
- E(this, "getExprValue", /* @__PURE__ */ h((e, s, r, i) => {
1642
+ A(this, "getExprValue", /* @__PURE__ */ h((e, s, r, o) => {
1636
1643
  if (typeof e < "u")
1637
1644
  try {
1638
1645
  r = parseInt(r);
1639
- const o = e.replace("()", "");
1640
- return t(this, L)[o] ? t(this, L)[o].call(this, s, r, t(this, y)) : t(this, L).exprFunction(e).call(this, s, r, t(this, L).data);
1646
+ const i = e.replace("()", "");
1647
+ return t(this, L)[i] ? t(this, L)[i].call(this, s, r, t(this, m)) : t(this, L).exprFunction(e).call(this, s, r, t(this, L).data);
1641
1648
  } catch {
1642
1649
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1643
1650
  }
@@ -1646,31 +1653,31 @@ const Xe = class Xe extends Ae {
1646
1653
  }, "getExprValue"));
1647
1654
  }
1648
1655
  connectedCallback() {
1649
- super.connectedCallback(), p(this, L, this.getRootNode().host), p(this, y, this.closest("th,td")), p(this, _t, t(this, y).closest("tr"));
1656
+ super.connectedCallback(), p(this, L, this.getRootNode().host), p(this, m, this.closest("th,td")), p(this, zt, t(this, m).closest("tr"));
1650
1657
  }
1651
1658
  get value() {
1652
- 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];
1659
+ 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];
1653
1660
  return e ?? "";
1654
1661
  }
1655
1662
  set value(e) {
1656
- var s = parseInt(t(this, y).dataset.row);
1663
+ var s = parseInt(t(this, m).dataset.row);
1657
1664
  const r = this.getAttribute("update-row-state") != "false";
1658
- 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);
1665
+ 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);
1659
1666
  }
1660
1667
  get row() {
1661
- return parseInt(t(this, y).dataset.row);
1668
+ return parseInt(t(this, m).dataset.row);
1662
1669
  }
1663
1670
  get data() {
1664
- return t(this, y).closest("tr").data;
1671
+ return t(this, m).closest("tr").data;
1665
1672
  }
1666
1673
  refresh() {
1667
- const e = t(this, y).dataset.bind;
1668
- return parseInt(t(this, y).dataset.row), t(this, _t).data[e];
1674
+ const e = t(this, m).dataset.bind;
1675
+ return parseInt(t(this, m).dataset.row), t(this, zt).data[e];
1669
1676
  }
1670
1677
  };
1671
- L = new WeakMap(), _t = new WeakMap(), y = new WeakMap(), He = new WeakMap(), $e = new WeakMap(), Me = new WeakMap(), Ie = new WeakMap(), _e = new WeakMap(), h(Xe, "CellElement");
1672
- let Re = Xe;
1673
- const Ke = class Ke extends Re {
1678
+ L = new WeakMap(), zt = new WeakMap(), m = new WeakMap(), Me = new WeakMap(), Ie = new WeakMap(), _e = new WeakMap(), Ne = new WeakMap(), ze = new WeakMap(), h(Ze, "CellElement");
1679
+ let Te = Ze;
1680
+ const Ge = class Ge extends Te {
1674
1681
  constructor() {
1675
1682
  super();
1676
1683
  }
@@ -1681,21 +1688,21 @@ const Ke = class Ke extends Re {
1681
1688
  return super.refresh();
1682
1689
  }
1683
1690
  };
1684
- h(Ke, "EditableCellElement");
1685
- let qe = Ke;
1686
- var Nt, lt, pt, yt, ce, U, Ne;
1687
- const Ze = class Ze extends qe {
1691
+ h(Ge, "EditableCellElement");
1692
+ let ke = Ge;
1693
+ var Ot, ct, yt, mt, de, U, Oe;
1694
+ const Je = class Je extends ke {
1688
1695
  constructor() {
1689
1696
  super();
1690
- d(this, Nt);
1691
- d(this, lt);
1692
- d(this, pt);
1697
+ d(this, Ot);
1698
+ d(this, ct);
1693
1699
  d(this, yt);
1694
- d(this, ce);
1700
+ d(this, mt);
1701
+ d(this, de);
1695
1702
  d(this, U);
1696
- E(this, "refresh", /* @__PURE__ */ h(() => {
1703
+ A(this, "refresh", /* @__PURE__ */ h(() => {
1697
1704
  const e = super.refresh();
1698
- t(this, Nt).value = e;
1705
+ t(this, Ot).value = e;
1699
1706
  }, "refresh"));
1700
1707
  /**
1701
1708
  dataRefresh = (v) => {
@@ -1727,11 +1734,11 @@ const Ze = class Ze extends qe {
1727
1734
  if (!v) this.reset();
1728
1735
  };
1729
1736
  */
1730
- d(this, Ne, /* @__PURE__ */ h((e) => {
1737
+ d(this, Oe, /* @__PURE__ */ h((e) => {
1731
1738
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1732
- if (t(this, lt) == "number") {
1733
- let i = [];
1734
- if (t(this, U) && Number(t(this, U)) > 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, U) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1739
+ if (t(this, ct) == "number") {
1740
+ let o = [];
1741
+ if (t(this, U) && Number(t(this, U)) > 0 && o.push("."), t(this, mt) && Number(t(this, mt)) >= 0 && o.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !o.includes(e.key) && e.preventDefault(), t(this, U) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1735
1742
  var s = e.target.value, r = s.indexOf(".");
1736
1743
  if (r >= 0) {
1737
1744
  var s = s.substr(r + 1, s.length);
@@ -1739,10 +1746,10 @@ const Ze = class Ze extends qe {
1739
1746
  }
1740
1747
  }
1741
1748
  }
1742
- t(this, pt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, pt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1749
+ t(this, yt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, yt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1743
1750
  }
1744
1751
  }, "#onKeyDown"));
1745
- if (this.applyBaseStyle(), p(this, lt, this.getAttribute("type") || "text"), p(this, pt, this.getAttribute("maxbyte")), p(this, yt, this.getAttribute("min")), p(this, ce, this.getAttribute("max")), p(this, U, this.getAttribute("scale")), !["text", "number"].includes(t(this, lt))) throw `invalid type : ${t(this, lt)}`;
1752
+ if (this.applyBaseStyle(), p(this, ct, this.getAttribute("type") || "text"), p(this, yt, this.getAttribute("maxbyte")), p(this, mt, this.getAttribute("min")), p(this, de, this.getAttribute("max")), p(this, U, this.getAttribute("scale")), !["text", "number"].includes(t(this, ct))) throw `invalid type : ${t(this, ct)}`;
1746
1753
  }
1747
1754
  connectedCallback() {
1748
1755
  for (var e = [], s = 0; s < this.attributes.length; s++)
@@ -1752,11 +1759,11 @@ const Ze = class Ze extends qe {
1752
1759
  ${e.join(" ")}
1753
1760
  ondragstart="return false;"
1754
1761
  >
1755
- `, super.connectedCallback(), p(this, Nt, this.querySelector("input"));
1762
+ `, super.connectedCallback(), p(this, Ot, this.querySelector("input"));
1756
1763
  }
1757
1764
  };
1758
- Nt = new WeakMap(), lt = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), ce = new WeakMap(), U = new WeakMap(), Ne = new WeakMap(), h(Ze, "CellInputText");
1759
- let Te = Ze;
1765
+ Ot = new WeakMap(), ct = new WeakMap(), yt = new WeakMap(), mt = new WeakMap(), de = new WeakMap(), U = new WeakMap(), Oe = new WeakMap(), h(Je, "CellInputText");
1766
+ let Ce = Je;
1760
1767
  customElements.get("cell-input-text");
1761
- customElements.get("cell-input") || customElements.define("cell-input", Te);
1768
+ customElements.get("cell-input") || customElements.define("cell-input", Ce);
1762
1769
  //# sourceMappingURL=nine-table.js.map