@ninebone/table 0.0.703 → 0.0.705

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