@ninebone/table 0.0.846 → 0.0.848

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,118 +1,118 @@
1
- var ms = Object.defineProperty;
2
- var xs = (T) => {
3
- throw TypeError(T);
1
+ var xs = Object.defineProperty;
2
+ var ws = (C) => {
3
+ throw TypeError(C);
4
4
  };
5
- var As = (T, s, e) => s in T ? ms(T, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[s] = e;
6
- var d = (T, s) => ms(T, "name", { value: s, configurable: !0 });
7
- var E = (T, s, e) => As(T, typeof s != "symbol" ? s + "" : s, e), Ee = (T, s, e) => s.has(T) || xs("Cannot " + e);
8
- var t = (T, s, e) => (Ee(T, s, "read from private field"), e ? e.call(T) : s.get(T)), h = (T, s, e) => s.has(T) ? xs("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(T) : s.set(T, e), y = (T, s, e, r) => (Ee(T, s, "write to private field"), r ? r.call(T, e) : s.set(T, e), e), Y = (T, s, e) => (Ee(T, s, "access private method"), e);
9
- var ws = (T, s, e, r) => ({
10
- set _(o) {
11
- y(T, s, o, e);
5
+ var Es = (C, s, e) => s in C ? xs(C, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : C[s] = e;
6
+ var d = (C, s) => xs(C, "name", { value: s, configurable: !0 });
7
+ var A = (C, s, e) => Es(C, typeof s != "symbol" ? s + "" : s, e), Ee = (C, s, e) => s.has(C) || ws("Cannot " + e);
8
+ var t = (C, s, e) => (Ee(C, s, "read from private field"), e ? e.call(C) : s.get(C)), h = (C, s, e) => s.has(C) ? ws("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(C) : s.set(C, e), y = (C, s, e, n) => (Ee(C, s, "write to private field"), n ? n.call(C, e) : s.set(C, e), e), Y = (C, s, e) => (Ee(C, s, "access private method"), e);
9
+ var vs = (C, s, e, n) => ({
10
+ set _(r) {
11
+ y(C, s, r, e);
12
12
  },
13
13
  get _() {
14
- return t(T, s, r);
14
+ return t(C, s, n);
15
15
  }
16
16
  });
17
- import { trace as Es } from "@ninebone/util";
18
- const Qe = class Qe extends Es.constructor {
17
+ import { trace as qs } from "@ninebone/util";
18
+ const ts = class ts extends qs.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- d(Qe, "Trace");
24
- let qe = Qe;
23
+ d(ts, "Trace");
24
+ let qe = ts;
25
25
  const q = new qe();
26
- var B, X, A, J, Q, tt, Kt, et, Gt;
27
- const ts = class ts extends HTMLElement {
26
+ var P, X, R, J, Q, tt, Kt, et, Zt;
27
+ const es = class es extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- h(this, B);
30
+ h(this, P);
31
31
  h(this, X, !1);
32
- h(this, A);
32
+ h(this, R);
33
33
  h(this, J);
34
34
  h(this, Q);
35
35
  h(this, tt);
36
36
  h(this, Kt, /* @__PURE__ */ d(() => {
37
- if (!t(this, B)) return;
38
- const e = t(this, B).querySelector(".ng-container-body .ng-part-body");
37
+ if (!t(this, P)) return;
38
+ const e = t(this, P).querySelector(".ng-container-body .ng-part-body");
39
39
  e && (y(this, tt, new ResizeObserver(() => {
40
40
  this.refresh();
41
41
  })), t(this, tt).observe(e));
42
42
  }, "#observeResize"));
43
- E(this, "refresh", /* @__PURE__ */ d(() => {
44
- if (!t(this, B) || !t(this, A) || t(this, X)) return;
45
- const e = t(this, A).container, r = e.querySelector("table");
46
- if (!r) return;
47
- const o = t(this, A).track, a = t(this, A).thumb, n = t(this, B).querySelector(".ng-container-bottom"), i = e.clientWidth, c = r.scrollWidth;
43
+ A(this, "refresh", /* @__PURE__ */ d(() => {
44
+ if (!t(this, P) || !t(this, R) || t(this, X)) return;
45
+ const e = t(this, R).container, n = e.querySelector("table");
46
+ if (!n) return;
47
+ const r = t(this, R).track, a = t(this, R).thumb, o = t(this, P).querySelector(".ng-container-bottom"), i = e.clientWidth, c = n.scrollWidth;
48
48
  if (i !== 0 && c > i)
49
- n && (n.style.display = "flex");
49
+ o && (o.style.display = "flex");
50
50
  else {
51
- n && (n.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 * (i / c), l), 20);
57
57
  a.style.width = `${f}px`;
58
- const u = e.scrollLeft, b = c - i;
59
- let g = 0;
60
- b > 0 && (g = parseInt(u / b * (l - f), 10)), g < 0 && (g = 0);
58
+ const g = e.scrollLeft, b = c - i;
59
+ let u = 0;
60
+ b > 0 && (u = parseInt(g / b * (l - f), 10)), u < 0 && (u = 0);
61
61
  const p = l - f;
62
- g > p && (g = p), a.style.left = `${g}px`, t(this, A).left.disabled = g === 0, t(this, A).right.disabled = g >= p - 1;
62
+ u > p && (u = p), a.style.left = `${u}px`, t(this, R).left.disabled = u === 0, t(this, R).right.disabled = u >= p - 1;
63
63
  }, "refresh"));
64
64
  h(this, et, /* @__PURE__ */ d((e) => {
65
- if (!t(this, A)) return !1;
66
- const r = t(this, A).container, o = r.querySelector("table");
67
- if (!o) return !1;
68
- const a = t(this, A).track.getBoundingClientRect(), n = t(this, A).thumb.clientWidth;
65
+ if (!t(this, R)) return !1;
66
+ const n = t(this, R).container, r = n.querySelector("table");
67
+ if (!r) return !1;
68
+ const a = t(this, R).track.getBoundingClientRect(), o = t(this, R).thumb.clientWidth;
69
69
  let i = e;
70
70
  i < 0 && (i = 0);
71
- const c = a.width - n;
72
- i > c && (i = c), i = parseInt(i, 10), t(this, A).thumb.style.left = `${i}px`, q.log("1111=========="), t(this, A).left.disabled = i === 0, t(this, A).right.disabled = i >= c - 1;
73
- const l = r.clientWidth, u = o.scrollWidth - l;
74
- return c > 0 && u > 0 && (r.scrollLeft = i / c * u), i > 0 && i < c - 1;
71
+ const c = a.width - o;
72
+ i > c && (i = c), i = parseInt(i, 10), t(this, R).thumb.style.left = `${i}px`, q.log("1111=========="), t(this, R).left.disabled = i === 0, t(this, R).right.disabled = i >= c - 1;
73
+ const l = n.clientWidth, g = r.scrollWidth - l;
74
+ return c > 0 && g > 0 && (n.scrollLeft = i / c * g), i > 0 && i < c - 1;
75
75
  }, "#thumbMoveTo"));
76
- h(this, Gt, /* @__PURE__ */ d(() => {
77
- const e = /* @__PURE__ */ d((o) => {
76
+ h(this, Zt, /* @__PURE__ */ d(() => {
77
+ const e = /* @__PURE__ */ d((r) => {
78
78
  clearInterval(t(this, J)), clearInterval(t(this, Q));
79
- const a = parseInt(t(this, A).thumb.style.left || 0, 10);
80
- t(this, et).call(this, a + o), y(this, J, setInterval(() => {
79
+ const a = parseInt(t(this, R).thumb.style.left || 0, 10);
80
+ t(this, et).call(this, a + r), y(this, J, setInterval(() => {
81
81
  clearInterval(t(this, J)), y(this, Q, setInterval(() => {
82
- const n = parseInt(t(this, A).thumb.style.left || 0, 10);
83
- t(this, et).call(this, n + o) || clearInterval(t(this, Q));
82
+ const o = parseInt(t(this, R).thumb.style.left || 0, 10);
83
+ t(this, et).call(this, o + r) || clearInterval(t(this, Q));
84
84
  }, 50));
85
85
  }, 500));
86
- }, "delayScroll"), r = /* @__PURE__ */ d(() => {
86
+ }, "delayScroll"), n = /* @__PURE__ */ d(() => {
87
87
  clearInterval(t(this, J)), clearInterval(t(this, Q));
88
88
  }, "clearTimer");
89
- ["mouseup", "mouseleave", "touchend"].forEach((o) => {
90
- t(this, A).left.addEventListener(o, r), t(this, A).right.addEventListener(o, r), t(this, A).track.addEventListener(o, r);
91
- }), t(this, A).left.addEventListener("mousedown", (o) => {
92
- o.button === 0 && e(-20);
93
- }), t(this, A).right.addEventListener("mousedown", (o) => {
94
- o.button === 0 && e(20);
95
- }), t(this, A).left.addEventListener("touchstart", () => e(-20)), t(this, A).right.addEventListener("touchstart", () => e(20)), t(this, A).track.addEventListener("mousedown", (o) => {
96
- if (o.button !== 0) return;
97
- o.preventDefault();
98
- const a = t(this, A).track.getBoundingClientRect(), n = t(this, A).thumb.clientWidth;
99
- t(this, et).call(this, o.clientX - a.left - n / 2);
100
- }), t(this, A).thumb.addEventListener("mousedown", (o) => {
101
- if (o.button !== 0) return;
102
- o.stopPropagation(), o.preventDefault(), y(this, X, !0), this.shiftX = o.clientX - t(this, A).thumb.getBoundingClientRect().left;
89
+ ["mouseup", "mouseleave", "touchend"].forEach((r) => {
90
+ t(this, R).left.addEventListener(r, n), t(this, R).right.addEventListener(r, n), t(this, R).track.addEventListener(r, n);
91
+ }), t(this, R).left.addEventListener("mousedown", (r) => {
92
+ r.button === 0 && e(-20);
93
+ }), t(this, R).right.addEventListener("mousedown", (r) => {
94
+ r.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", (r) => {
96
+ if (r.button !== 0) return;
97
+ r.preventDefault();
98
+ const a = t(this, R).track.getBoundingClientRect(), o = t(this, R).thumb.clientWidth;
99
+ t(this, et).call(this, r.clientX - a.left - o / 2);
100
+ }), t(this, R).thumb.addEventListener("mousedown", (r) => {
101
+ if (r.button !== 0) return;
102
+ r.stopPropagation(), r.preventDefault(), y(this, X, !0), this.shiftX = r.clientX - t(this, R).thumb.getBoundingClientRect().left;
103
103
  const a = /* @__PURE__ */ d((i) => {
104
104
  if (!t(this, X)) return;
105
- const c = t(this, A).track.getBoundingClientRect();
105
+ const c = t(this, R).track.getBoundingClientRect();
106
106
  t(this, et).call(this, i.clientX - c.left - this.shiftX);
107
- }, "onMouseMove"), n = /* @__PURE__ */ d(() => {
108
- y(this, X, !1), r(), document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", n), this.refresh();
107
+ }, "onMouseMove"), o = /* @__PURE__ */ d(() => {
108
+ y(this, X, !1), n(), document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", o), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", a), document.addEventListener("mouseup", n);
110
+ document.addEventListener("mousemove", a), document.addEventListener("mouseup", o);
111
111
  });
112
112
  }, "#init"));
113
113
  }
114
114
  connectedCallback() {
115
- if (y(this, B, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, B)) return;
115
+ if (y(this, P, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, P)) return;
116
116
  this.innerHTML = `
117
117
  <style>
118
118
  nine-table-hscrollbar {
@@ -177,20 +177,20 @@ const ts = class ts extends HTMLElement {
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
179
  const e = /* @__PURE__ */ d(() => {
180
- const r = t(this, B).querySelector(".ng-container-body .ng-part-body");
181
- if (!r) {
180
+ const n = t(this, P).querySelector(".ng-container-body .ng-part-body");
181
+ if (!n) {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
- y(this, A, {
186
- container: r,
185
+ y(this, R, {
186
+ container: n,
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
- }), r.addEventListener("scroll", () => {
191
+ }), n.addEventListener("scroll", () => {
192
192
  t(this, X) || this.refresh();
193
- }), t(this, Gt).call(this), t(this, Kt).call(this), this.refresh();
193
+ }), t(this, Zt).call(this), t(this, Kt).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
@@ -198,66 +198,66 @@ const ts = class ts extends HTMLElement {
198
198
  t(this, tt) && t(this, tt).disconnect();
199
199
  }
200
200
  };
201
- B = new WeakMap(), X = new WeakMap(), A = new WeakMap(), J = new WeakMap(), Q = new WeakMap(), tt = new WeakMap(), Kt = new WeakMap(), et = new WeakMap(), Gt = new WeakMap(), d(ts, "NineTableHScrollBar");
202
- let Te = ts;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Te);
204
- var st, rt, bt, k, Ct, kt, Zt;
205
- const es = class es extends HTMLElement {
201
+ P = new WeakMap(), X = new WeakMap(), R = new WeakMap(), J = new WeakMap(), Q = new WeakMap(), tt = new WeakMap(), Kt = new WeakMap(), et = new WeakMap(), Zt = new WeakMap(), d(es, "NineTableHScrollBar");
202
+ let Ce = es;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Ce);
204
+ var st, nt, bt, k, Tt, kt, Gt;
205
+ const ss = class ss extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
208
  h(this, st);
209
- h(this, rt);
209
+ h(this, nt);
210
210
  h(this, bt, !1);
211
211
  h(this, k);
212
- h(this, Ct, 0);
212
+ h(this, Tt, 0);
213
213
  h(this, kt, 0);
214
- E(this, "refresh", /* @__PURE__ */ d(() => {
214
+ A(this, "refresh", /* @__PURE__ */ d(() => {
215
215
  if (!t(this, st) || !t(this, k)) return;
216
- const e = t(this, k).container, r = t(this, k).track, o = t(this, k).thumb, a = e.clientHeight, n = t(this, st).data.length, i = t(this, rt).getRowHeight(), c = n * i;
217
- if (c <= a || n === 0) {
216
+ const e = t(this, k).container, n = t(this, k).track, r = t(this, k).thumb, a = e.clientHeight, o = t(this, st).data.length, i = t(this, nt).getRowHeight(), c = o * i;
217
+ if (c <= a || o === 0) {
218
218
  this.style.display = "none";
219
219
  return;
220
220
  } else
221
221
  this.style.display = "flex";
222
- const l = r.clientHeight;
222
+ const l = n.clientHeight;
223
223
  if (l <= 0) return;
224
224
  const f = Math.max(Math.min(l * (a / c), l), 20);
225
- o.style.height = `${f}px`;
226
- const u = e.scrollTop, b = Math.max(c - a, 1);
227
- let g = 0;
228
- b > 0 && (g = u / b * (l - f));
225
+ r.style.height = `${f}px`;
226
+ const g = e.scrollTop, b = Math.max(c - a, 1);
227
+ let u = 0;
228
+ b > 0 && (u = g / b * (l - f));
229
229
  const p = l - f;
230
- g < 0 && (g = 0), g > p && (g = p), o.style.top = `${g}px`, t(this, k).top.disabled = u <= 0, t(this, k).bottom.disabled = u >= b - 1;
230
+ u < 0 && (u = 0), u > p && (u = p), r.style.top = `${u}px`, t(this, k).top.disabled = g <= 0, t(this, k).bottom.disabled = g >= b - 1;
231
231
  }, "refresh"));
232
- h(this, Zt, /* @__PURE__ */ d(() => {
232
+ h(this, Gt, /* @__PURE__ */ d(() => {
233
233
  q.log("nine-table-vscrollbar.#init");
234
- const e = t(this, k).container, r = /* @__PURE__ */ d(() => {
235
- const a = (t(this, st).data.get() || []).length, n = t(this, rt).getRowHeight();
236
- return a * n;
234
+ const e = t(this, k).container, n = /* @__PURE__ */ d(() => {
235
+ const a = (t(this, st).data.get() || []).length, o = t(this, nt).getRowHeight();
236
+ return a * o;
237
237
  }, "getContentHeight");
238
- t(this, k).thumb.addEventListener("mousedown", (o) => {
239
- if (o.button !== 0) return;
240
- o.stopPropagation(), o.preventDefault(), y(this, bt, !0), y(this, Ct, o.clientY), y(this, kt, e.scrollTop);
238
+ t(this, k).thumb.addEventListener("mousedown", (r) => {
239
+ if (r.button !== 0) return;
240
+ r.stopPropagation(), r.preventDefault(), y(this, bt, !0), y(this, Tt, r.clientY), y(this, kt, e.scrollTop);
241
241
  const a = /* @__PURE__ */ d((i) => {
242
242
  if (!t(this, bt)) return;
243
- const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, u = c.height - l, b = i.clientY - t(this, Ct), g = e.clientHeight, p = r(), m = Math.max(p - g, 1);
244
- if (u > 0 && m > 0) {
245
- const v = b / u * m;
243
+ const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, g = c.height - l, b = i.clientY - t(this, Tt), u = e.clientHeight, p = n(), m = Math.max(p - u, 1);
244
+ if (g > 0 && m > 0) {
245
+ const v = b / g * m;
246
246
  let x = t(this, kt) + v;
247
- const C = Math.max(0, p - g);
248
- x < 0 && (x = 0), x > C && (x = C), e.scrollTop = x;
247
+ const T = Math.max(0, p - u);
248
+ x < 0 && (x = 0), x > T && (x = T), e.scrollTop = x;
249
249
  }
250
250
  this.refresh();
251
- }, "onMouseMove"), n = /* @__PURE__ */ d(() => {
252
- y(this, bt, !1), document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", n), this.refresh();
251
+ }, "onMouseMove"), o = /* @__PURE__ */ d(() => {
252
+ y(this, bt, !1), document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", o), this.refresh();
253
253
  }, "onMouseUp");
254
- document.addEventListener("mousemove", a), document.addEventListener("mouseup", n);
255
- }), t(this, k).track.addEventListener("mousedown", (o) => {
256
- if (o.button !== 0 || o.target === t(this, k).thumb) return;
257
- const a = t(this, k).track.getBoundingClientRect(), n = t(this, k).thumb.clientHeight, i = o.clientY - a.top - n / 2, l = a.height - n, f = e.clientHeight, u = r(), b = Math.max(u - f, 1);
254
+ document.addEventListener("mousemove", a), document.addEventListener("mouseup", o);
255
+ }), t(this, k).track.addEventListener("mousedown", (r) => {
256
+ if (r.button !== 0 || r.target === t(this, k).thumb) return;
257
+ const a = t(this, k).track.getBoundingClientRect(), o = t(this, k).thumb.clientHeight, i = r.clientY - a.top - o / 2, l = a.height - o, f = e.clientHeight, g = n(), b = Math.max(g - f, 1);
258
258
  if (l > 0 && b > 0) {
259
- const g = Math.max(0, Math.min(1, i / l));
260
- e.scrollTop = g * b;
259
+ const u = Math.max(0, Math.min(1, i / l));
260
+ e.scrollTop = u * b;
261
261
  }
262
262
  this.refresh();
263
263
  }), t(this, k).top.addEventListener("click", () => {
@@ -268,7 +268,7 @@ const es = class es extends HTMLElement {
268
268
  }, "#init"));
269
269
  }
270
270
  connectedCallback() {
271
- y(this, st, this.getRootNode().host), y(this, rt, this.closest("nine-table-sheet")), this.innerHTML = `
271
+ y(this, st, this.getRootNode().host), y(this, nt, this.closest("nine-table-sheet")), this.innerHTML = `
272
272
  <style>
273
273
  nine-table-vscrollbar {
274
274
  display: flex;
@@ -333,33 +333,33 @@ const es = class es extends HTMLElement {
333
333
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
334
334
  `;
335
335
  const e = /* @__PURE__ */ d(() => {
336
- const r = t(this, rt).querySelector(".ng-container-body .ng-part-body");
337
- if (!r) {
336
+ const n = t(this, nt).querySelector(".ng-container-body .ng-part-body");
337
+ if (!n) {
338
338
  setTimeout(e, 10);
339
339
  return;
340
340
  }
341
341
  y(this, k, {
342
- container: r,
342
+ container: n,
343
343
  track: this.querySelector(".ng-scroll-track"),
344
344
  thumb: this.querySelector(".ng-scroll-thumb"),
345
345
  top: this.querySelector(".ng-scroll-top"),
346
346
  bottom: this.querySelector(".ng-scroll-bottom")
347
- }), t(this, Zt).call(this), this.refresh();
347
+ }), t(this, Gt).call(this), this.refresh();
348
348
  }, "initWhenReady");
349
349
  e();
350
350
  }
351
351
  };
352
- st = new WeakMap(), rt = new WeakMap(), bt = new WeakMap(), k = new WeakMap(), Ct = new WeakMap(), kt = new WeakMap(), Zt = new WeakMap(), d(es, "NineTableVScrollBar");
353
- let Ce = es;
354
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Ce);
355
- var nt, S, ot, F, O, K, it, Lt, je, Ve, Jt, Ue, Qt, te, It, Mt, Ht, ee, se, $t, pt, re, ne;
356
- const ss = class ss {
352
+ st = new WeakMap(), nt = new WeakMap(), bt = new WeakMap(), k = new WeakMap(), Tt = new WeakMap(), kt = new WeakMap(), Gt = new WeakMap(), d(ss, "NineTableVScrollBar");
353
+ let Te = ss;
354
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Te);
355
+ var rt, S, ot, j, D, K, it, Lt, je, Ve, Jt, Ue, Qt, te, It, Mt, Ht, ee, se, $t, pt, ne, re;
356
+ const ns = class ns {
357
357
  constructor(s) {
358
- h(this, nt);
358
+ h(this, rt);
359
359
  h(this, S);
360
360
  h(this, ot);
361
- h(this, F, /* @__PURE__ */ new Map());
362
- h(this, O, null);
361
+ h(this, j, /* @__PURE__ */ new Map());
362
+ h(this, D, null);
363
363
  h(this, K, null);
364
364
  h(this, it, 0);
365
365
  h(this, Lt, 40);
@@ -369,146 +369,146 @@ const ss = class ss {
369
369
  h(this, Jt, 3);
370
370
  h(this, Ue, 3);
371
371
  h(this, Qt, 0);
372
- E(this, "refresh", /* @__PURE__ */ d(() => {
372
+ A(this, "refresh", /* @__PURE__ */ d(() => {
373
373
  var e;
374
374
  q.log("rowManager.refresh");
375
375
  const s = t(this, S).querySelector(".ng-container-body .ng-part-body");
376
376
  s && (t(this, It).call(this), t(this, Mt).call(this), t(this, pt).call(this, s.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
377
377
  }, "refresh"));
378
- E(this, "initialize", /* @__PURE__ */ d(() => {
378
+ A(this, "initialize", /* @__PURE__ */ d(() => {
379
379
  q.log("rowManager.initialize"), y(this, ot, {
380
380
  scrollTables: t(this, S).querySelectorAll(".ng-part-body table"),
381
381
  firstTr: t(this, S).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
382
- }), y(this, O, null), t(this, F).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
383
- const i = t(this, S).querySelector(n);
382
+ }), y(this, D, null), t(this, j).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
383
+ const i = t(this, S).querySelector(o);
384
384
  if (!i) return;
385
385
  const c = i.querySelector(".ng-part-body table");
386
386
  if (!c) return;
387
387
  const l = c.querySelector("tbody.bindable-tbody");
388
388
  if (!l) return;
389
- const u = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
390
- t(this, F).set(n, u);
389
+ const g = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
390
+ t(this, j).set(o, g);
391
391
  });
392
- const s = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), r = t(this, S).querySelector(".ng-container-right .ng-part-body"), o = t(this, S).querySelector(".ng-container-body .ng-part-header"), a = t(this, S).querySelector(".ng-container-body .ng-part-footer");
392
+ const s = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), n = t(this, S).querySelector(".ng-container-right .ng-part-body"), r = t(this, S).querySelector(".ng-container-body .ng-part-header"), a = t(this, S).querySelector(".ng-container-body .ng-part-footer");
393
393
  if (s) {
394
394
  t(this, It).call(this), t(this, $t).call(this), t(this, Mt).call(this), t(this, pt).call(this, s.scrollTop);
395
- let n = !1;
395
+ let o = !1;
396
396
  y(this, Qt, s.scrollLeft);
397
397
  const i = /* @__PURE__ */ d((c) => {
398
- var u;
399
- if (n) return;
400
- n = !0;
398
+ var g;
399
+ if (o) return;
400
+ o = !0;
401
401
  const l = c.scrollTop, f = c.scrollLeft;
402
- s && s.scrollTop !== l && (s.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), r && r.scrollTop !== l && (r.scrollTop = l), o && o.scrollLeft !== f && (o.scrollLeft = f), a && a.scrollLeft !== f && (a.scrollLeft = f), t(this, pt).call(this, l), (u = t(this, S).querySelector("nine-table-vscrollbar")) == null || u.refresh(), n = !1;
402
+ s && s.scrollTop !== l && (s.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), n && n.scrollTop !== l && (n.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), a && a.scrollLeft !== f && (a.scrollLeft = f), t(this, pt).call(this, l), (g = t(this, S).querySelector("nine-table-vscrollbar")) == null || g.refresh(), o = !1;
403
403
  }, "handleContainerScroll");
404
404
  s == null || s.addEventListener("scroll", (c) => {
405
405
  i(s);
406
- }), [e, r].forEach((c) => {
406
+ }), [e, n].forEach((c) => {
407
407
  c == null || c.addEventListener("scroll", (l) => {
408
- if (n) return;
409
- n = !0;
408
+ if (o) return;
409
+ o = !0;
410
410
  const f = c.scrollTop;
411
- s && s.scrollTop !== f && (s.scrollTop = f), n = !1;
411
+ s && s.scrollTop !== f && (s.scrollTop = f), o = !1;
412
412
  });
413
413
  });
414
414
  }
415
415
  }, "initialize"));
416
416
  h(this, te, /* @__PURE__ */ d((s, e) => {
417
417
  q.log("rowManager.#renderRows");
418
- const r = t(this, F).get(e);
419
- if (!r || r.length === 0) return;
420
- const o = s.querySelector(".ng-part-body tbody.bindable-tbody");
421
- if (!o) return;
422
- o.querySelectorAll("tr:not(.nodata)").forEach((i) => i.remove());
423
- const a = o.querySelector("tr.nodata"), n = document.createDocumentFragment();
418
+ const n = t(this, j).get(e);
419
+ if (!n || n.length === 0) return;
420
+ const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
421
+ if (!r) return;
422
+ r.querySelectorAll("tr:not(.nodata)").forEach((i) => i.remove());
423
+ const a = r.querySelector("tr.nodata"), o = document.createDocumentFragment();
424
424
  for (let i = 0; i < t(this, Lt); i++)
425
- r.forEach((c) => {
426
- n.appendChild(c.cloneNode(!0));
425
+ n.forEach((c) => {
426
+ o.appendChild(c.cloneNode(!0));
427
427
  });
428
- a ? a.before(n) : o.appendChild(n), e === ".ng-container-body" && (t(this, ot).firstTr = o.querySelector("tr:not(.nodata)"));
428
+ a ? a.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this, ot).firstTr = r.querySelector("tr:not(.nodata)"));
429
429
  }, "#renderRows"));
430
430
  h(this, It, /* @__PURE__ */ d(() => {
431
- if (t(this, O) !== null && t(this, O) > 0)
432
- return t(this, O);
431
+ if (t(this, D) !== null && t(this, D) > 0)
432
+ return t(this, D);
433
433
  const s = t(this, S).querySelector(".ng-container-body .ng-part-body");
434
434
  q.log("rowManager.#measureAndCacheHeight");
435
- const e = t(this, F).get(".ng-container-body");
435
+ const e = t(this, j).get(".ng-container-body");
436
436
  if (!e || e.length === 0) throw new Error("invalid dom");
437
- const r = s.querySelector("tbody.bindable-tbody");
438
- if (!r) throw new Error("invalid dom");
439
- r.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
440
- const o = r.querySelector("tr.nodata"), a = document.createDocumentFragment();
437
+ const n = s.querySelector("tbody.bindable-tbody");
438
+ if (!n) throw new Error("invalid dom");
439
+ n.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
440
+ const r = n.querySelector("tr.nodata"), a = document.createDocumentFragment();
441
441
  e.forEach((b) => {
442
442
  a.appendChild(b.cloneNode(!0));
443
- }), o ? o.before(a) : r.appendChild(a);
444
- const n = t(this, S), i = n.style.display, c = n.style.visibility, l = n.style.position;
445
- (i === "none" || window.getComputedStyle(n).display === "none") && (n.style.display = "block", n.style.visibility = "hidden", n.style.position = "absolute");
443
+ }), r ? r.before(a) : n.appendChild(a);
444
+ const o = t(this, S), i = o.style.display, c = o.style.visibility, l = o.style.position;
445
+ (i === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
446
446
  let f = 0;
447
- const u = r.querySelectorAll("tr");
448
- return u.forEach((b) => {
449
- let g = b.offsetHeight || b.getBoundingClientRect().height;
450
- if (g === 0) {
447
+ const g = n.querySelectorAll("tr");
448
+ return g.forEach((b) => {
449
+ let u = b.offsetHeight || b.getBoundingClientRect().height;
450
+ if (u === 0) {
451
451
  const p = window.getComputedStyle(b);
452
- g = parseFloat(p.height) || parseFloat(p.minHeight) || 0;
452
+ u = parseFloat(p.height) || parseFloat(p.minHeight) || 0;
453
453
  }
454
- f += g;
455
- }), u.forEach((b) => b.remove()), n.style.display = i, n.style.visibility = c, n.style.position = l, f <= 0 ? -1 : (y(this, O, f), t(this, Ht).call(this), t(this, O));
454
+ f += u;
455
+ }), g.forEach((b) => b.remove()), o.style.display = i, o.style.visibility = c, o.style.position = l, f <= 0 ? -1 : (y(this, D, f), t(this, Ht).call(this), t(this, D));
456
456
  }, "#measureAndCacheHeight"));
457
457
  h(this, Mt, /* @__PURE__ */ d(() => {
458
458
  q.log("rowManager.#updateVirtualScrollHeight");
459
- const e = (t(this, nt).data.get() || []).length, r = t(this, O), o = e * r;
459
+ const e = (t(this, rt).data.get() || []).length, n = t(this, D), r = e * n;
460
460
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
461
- const n = t(this, S).querySelector(a);
462
- if (!n) return;
463
- const i = n.querySelector(".ng-part-body .ng-virtual-spacer");
464
- i && (i.style.height = `${o}px`);
461
+ const o = t(this, S).querySelector(a);
462
+ if (!o) return;
463
+ const i = o.querySelector(".ng-part-body .ng-virtual-spacer");
464
+ i && (i.style.height = `${r}px`);
465
465
  });
466
466
  }, "#updateVirtualScrollHeight"));
467
467
  h(this, Ht, /* @__PURE__ */ d(() => {
468
- if (t(this, it) > 0 && t(this, O) > 0) {
469
- const s = Math.ceil(t(this, it) / t(this, O));
468
+ if (t(this, it) > 0 && t(this, D) > 0) {
469
+ const s = Math.ceil(t(this, it) / t(this, D));
470
470
  y(this, Lt, s + t(this, Jt));
471
471
  }
472
472
  }, "#updateRowCount"));
473
473
  h(this, ee, /* @__PURE__ */ d(() => {
474
- var i, c, l, f, u, b;
475
- const s = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), r = t(this, S).querySelector(".ng-container-right .ng-part-body table");
474
+ var i, c, l, f, g, b;
475
+ const s = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), n = t(this, S).querySelector(".ng-container-right .ng-part-body table");
476
476
  if (e) {
477
- const g = s ? Array.from(s.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), m = r ? Array.from(r.querySelectorAll("tbody tr")) : [], v = Math.max(g.length, p.length, m.length);
477
+ const u = s ? Array.from(s.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), m = n ? Array.from(n.querySelectorAll("tbody tr")) : [], v = Math.max(u.length, p.length, m.length);
478
478
  for (let x = 0; x < v; x++) {
479
- const C = [
480
- ((i = g[x]) == null ? void 0 : i.getBoundingClientRect().height) || 0,
479
+ const T = [
480
+ ((i = u[x]) == null ? void 0 : i.getBoundingClientRect().height) || 0,
481
481
  ((c = p[x]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
482
482
  ((l = m[x]) == null ? void 0 : l.getBoundingClientRect().height) || 0
483
- ], R = Math.max(...C);
484
- R > 0 && (g[x] && (g[x].style.height = `${R}px`), p[x] && (p[x].style.height = `${R}px`), m[x] && (m[x].style.height = `${R}px`));
483
+ ], E = Math.max(...T);
484
+ E > 0 && (u[x] && (u[x].style.height = `${E}px`), p[x] && (p[x].style.height = `${E}px`), m[x] && (m[x].style.height = `${E}px`));
485
485
  }
486
486
  }
487
- const o = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), a = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), n = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
487
+ const r = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), a = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
488
488
  if (a) {
489
- const g = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], p = Array.from(a.querySelectorAll("tfoot tr")), m = n ? Array.from(n.querySelectorAll("tfoot tr")) : [], v = Math.max(g.length, p.length, m.length);
489
+ const u = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], p = Array.from(a.querySelectorAll("tfoot tr")), m = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], v = Math.max(u.length, p.length, m.length);
490
490
  for (let x = 0; x < v; x++) {
491
- const C = [
492
- ((f = g[x]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
493
- ((u = p[x]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
491
+ const T = [
492
+ ((f = u[x]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
493
+ ((g = p[x]) == null ? void 0 : g.getBoundingClientRect().height) || 0,
494
494
  ((b = m[x]) == null ? void 0 : b.getBoundingClientRect().height) || 0
495
- ], R = Math.max(...C);
496
- R > 0 && (g[x] && (g[x].style.height = `${R}px`), p[x] && (p[x].style.height = `${R}px`), m[x] && (m[x].style.height = `${R}px`));
495
+ ], E = Math.max(...T);
496
+ E > 0 && (u[x] && (u[x].style.height = `${E}px`), p[x] && (p[x].style.height = `${E}px`), m[x] && (m[x].style.height = `${E}px`));
497
497
  }
498
498
  }
499
499
  }, "#syncRowHeights"));
500
500
  h(this, se, /* @__PURE__ */ d(() => {
501
501
  !t(this, S) || !(t(this, S) instanceof HTMLElement) || (y(this, K, new ResizeObserver((s) => {
502
502
  for (const e of s) {
503
- const r = e.target;
504
- if (!r.classList.contains("active")) continue;
505
- const o = e.contentRect.height;
506
- if (o > 0) {
503
+ const n = e.target;
504
+ if (!n.classList.contains("active")) continue;
505
+ const r = e.contentRect.height;
506
+ if (r > 0) {
507
507
  let a = 0;
508
- const n = r.querySelector(".ng-part-header"), i = r.querySelector(".ng-part-footer");
509
- n && (a += n.offsetHeight), i && (a += i.offsetHeight);
510
- const c = Math.max(o - a, 100);
511
- t(this, it) !== c && (y(this, it, c), t(this, Ht).call(this), t(this, O) !== null && (t(this, $t).call(this), this.refresh()));
508
+ const o = n.querySelector(".ng-part-header"), i = n.querySelector(".ng-part-footer");
509
+ o && (a += o.offsetHeight), i && (a += i.offsetHeight);
510
+ const c = Math.max(r - a, 100);
511
+ t(this, it) !== c && (y(this, it, c), t(this, Ht).call(this), t(this, D) !== null && (t(this, $t).call(this), this.refresh()));
512
512
  }
513
513
  }
514
514
  })), t(this, K).observe(t(this, S)));
@@ -517,32 +517,32 @@ const ss = class ss {
517
517
  q.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
518
518
  const e = t(this, S).querySelector(s);
519
519
  e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, te).call(this, e, s);
520
- }), t(this, ne).call(this), t(this, ee).call(this);
520
+ }), t(this, re).call(this), t(this, ee).call(this);
521
521
  }, "#renderAllContainers"));
522
522
  h(this, pt, /* @__PURE__ */ d((s) => {
523
- var u, b;
524
- const e = t(this, O);
523
+ var g, b;
524
+ const e = t(this, D);
525
525
  if (!e || e <= 0) return;
526
- const r = t(this, nt).data.length;
527
- if (r === 0) return;
528
- const o = ((u = t(this, F).get(".ng-container-body")) == null ? void 0 : u.length) || 1, a = t(this, S).querySelector(".ng-container-body .ng-part-body"), n = Math.max(0, r - Math.floor(a.clientHeight / e)), i = Math.min(n, Math.max(0, Math.floor(s / e)));
526
+ const n = t(this, rt).data.length;
527
+ if (n === 0) return;
528
+ const r = ((g = t(this, j).get(".ng-container-body")) == null ? void 0 : g.length) || 1, a = t(this, S).querySelector(".ng-container-body .ng-part-body"), o = Math.max(0, n - Math.floor(a.clientHeight / e)), i = Math.min(o, Math.max(0, Math.floor(s / e)));
529
529
  let c = Math.floor(i * e);
530
530
  const l = t(this, ot).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
531
- (b = t(this, ot)) == null || b.scrollTables.forEach((g) => {
532
- g.style.transform = `translate3d(0, ${c}px, 0)`;
533
- }), f !== i && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
534
- const p = t(this, S).querySelector(g);
531
+ (b = t(this, ot)) == null || b.scrollTables.forEach((u) => {
532
+ u.style.transform = `translate3d(0, ${c}px, 0)`;
533
+ }), f !== i && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
534
+ const p = t(this, S).querySelector(u);
535
535
  if (!p) return;
536
536
  const m = p.querySelector(".ng-part-body tbody.bindable-tbody");
537
537
  if (!m) return;
538
- Array.from(m.querySelectorAll("tr:not(.nodata)")).forEach((x, C) => {
539
- const R = i + Math.floor(C / o);
540
- if (R >= r) {
538
+ Array.from(m.querySelectorAll("tr:not(.nodata)")).forEach((x, T) => {
539
+ const E = i + Math.floor(T / r);
540
+ if (E >= n) {
541
541
  x.style.display = "none";
542
542
  return;
543
543
  }
544
- const _ = t(this, nt).data.get(R);
545
- x.style.display = "", t(this, re).call(this, x, _, R);
544
+ const _ = t(this, rt).data.get(E);
545
+ x.style.display = "", t(this, ne).call(this, x, _, E);
546
546
  });
547
547
  });
548
548
  }, "#handleScroll"));
@@ -560,43 +560,43 @@ const ss = class ss {
560
560
  cell.dataset.row = dataIndex;
561
561
  });
562
562
  }; */
563
- h(this, re, /* @__PURE__ */ d((s, e, r) => {
564
- s.dataset.row = r, s.data = e, Array.from(s.cells).forEach((o, a) => {
565
- o.dataset.row = r;
566
- const n = Array.from(o.children).find((i) => i.tagName.toLowerCase().startsWith("cell-") || typeof i.refresh == "function");
567
- n && typeof n.refresh == "function" && n.refresh();
563
+ h(this, ne, /* @__PURE__ */ d((s, e, n) => {
564
+ s.dataset.row = n, s.data = e, Array.from(s.cells).forEach((r, a) => {
565
+ r.dataset.row = n;
566
+ const o = Array.from(r.children).find((i) => i.tagName.toLowerCase().startsWith("cell-") || typeof i.refresh == "function");
567
+ o && typeof o.refresh == "function" && o.refresh();
568
568
  });
569
569
  }, "#bindRowData"));
570
- h(this, ne, /* @__PURE__ */ d(() => {
570
+ h(this, re, /* @__PURE__ */ d(() => {
571
571
  var c, l, f;
572
572
  q.log("rowManager.#syncHeaderHeights");
573
- const s = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), r = t(this, S).querySelector(".ng-container-right .ng-part-header table");
573
+ const s = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), n = t(this, S).querySelector(".ng-container-right .ng-part-header table");
574
574
  if (!e) return;
575
- const o = s ? Array.from(s.querySelectorAll("tr")) : [], a = Array.from(e.querySelectorAll("tr")), n = r ? Array.from(r.querySelectorAll("tr")) : [], i = Math.max(o.length, a.length, n.length);
576
- for (let u = 0; u < i; u++) {
575
+ const r = s ? Array.from(s.querySelectorAll("tr")) : [], a = Array.from(e.querySelectorAll("tr")), o = n ? Array.from(n.querySelectorAll("tr")) : [], i = Math.max(r.length, a.length, o.length);
576
+ for (let g = 0; g < i; g++) {
577
577
  const b = [
578
- ((c = o[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
579
- ((l = a[u]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
580
- ((f = n[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
581
- ], g = Math.max(...b);
582
- g > 0 && (o[u] && (o[u].style.height = `${g}px`), a[u] && (a[u].style.height = `${g}px`), n[u] && (n[u].style.height = `${g}px`));
578
+ ((c = r[g]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
579
+ ((l = a[g]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
580
+ ((f = o[g]) == null ? void 0 : f.getBoundingClientRect().height) || 0
581
+ ], u = Math.max(...b);
582
+ u > 0 && (r[g] && (r[g].style.height = `${u}px`), a[g] && (a[g].style.height = `${u}px`), o[g] && (o[g].style.height = `${u}px`));
583
583
  }
584
584
  }, "#syncHeaderHeights"));
585
- E(this, "destroy", /* @__PURE__ */ d(() => {
585
+ A(this, "destroy", /* @__PURE__ */ d(() => {
586
586
  t(this, K) && (t(this, K).disconnect(), y(this, K, null));
587
587
  }, "destroy"));
588
- y(this, nt, s.getRootNode().host), y(this, S, s), t(this, se).call(this);
588
+ y(this, rt, s.getRootNode().host), y(this, S, s), t(this, se).call(this);
589
589
  }
590
590
  getRowHeight() {
591
- return t(this, O);
591
+ return t(this, D);
592
592
  }
593
593
  templateLength(s = ".ng-container-body") {
594
594
  var e;
595
- return ((e = t(this, F).get(s)) == null ? void 0 : e.length) || 1;
595
+ return ((e = t(this, j).get(s)) == null ? void 0 : e.length) || 1;
596
596
  }
597
597
  };
598
- nt = new WeakMap(), S = new WeakMap(), ot = new WeakMap(), F = new WeakMap(), O = new WeakMap(), K = new WeakMap(), it = new WeakMap(), Lt = new WeakMap(), je = new WeakMap(), Ve = new WeakMap(), Jt = new WeakMap(), Ue = new WeakMap(), Qt = new WeakMap(), te = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), Ht = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), $t = new WeakMap(), pt = new WeakMap(), re = new WeakMap(), ne = new WeakMap(), d(ss, "RowManager");
599
- let ke = ss;
598
+ rt = new WeakMap(), S = new WeakMap(), ot = new WeakMap(), j = new WeakMap(), D = new WeakMap(), K = new WeakMap(), it = new WeakMap(), Lt = new WeakMap(), je = new WeakMap(), Ve = new WeakMap(), Jt = new WeakMap(), Ue = new WeakMap(), Qt = new WeakMap(), te = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), Ht = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), $t = new WeakMap(), pt = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), d(ns, "RowManager");
599
+ let ke = ns;
600
600
  const oe = class oe {
601
601
  /**
602
602
  * 🎯 레이아웃 내의 여러 rawTables 배열을 일괄로 받아 단일 마스터 템플릿으로 사전 컴파일합니다.
@@ -613,19 +613,19 @@ const oe = class oe {
613
613
  i.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
614
614
  const f = l.getAttribute("cell-type") || "renderer";
615
615
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
616
- let u = `cell-${f}`;
617
- const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), p = l.getAttribute("maxbyte"), m = l.getAttribute("type");
616
+ let g = `cell-${f}`;
617
+ const b = l.getAttribute("data-bind"), u = l.getAttribute("data-expr"), p = l.getAttribute("maxbyte"), m = l.getAttribute("type");
618
618
  let v = [];
619
- b && v.push(`data-bind="${b}"`), g && v.push(`data-expr="${g}"`), p && v.push(`maxbyte="${p}"`), m && v.push(`type="${m}"`), l.innerHTML = `<${u} ${v.join(" ")}></${u}>`;
619
+ b && v.push(`data-bind="${b}"`), u && v.push(`data-expr="${u}"`), p && v.push(`maxbyte="${p}"`), m && v.push(`type="${m}"`), l.innerHTML = `<${g} ${v.join(" ")}></${g}>`;
620
620
  }), i.querySelectorAll("tbody td, tfoot td").forEach((l) => {
621
621
  l.setAttribute("tabindex", "0");
622
622
  });
623
- }, "processCellTypes"), r = /* @__PURE__ */ d((i) => {
623
+ }, "processCellTypes"), n = /* @__PURE__ */ d((i) => {
624
624
  if (!i.querySelector("colgroup")) {
625
- const c = i.querySelector("tbody tr") || i.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), u = Math.max(Math.floor(i.clientWidth / l), 100);
625
+ const c = i.querySelector("tbody tr") || i.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), g = Math.max(Math.floor(i.clientWidth / l), 100);
626
626
  for (let b = 0; b < l; b++) {
627
- const g = document.createElement("col");
628
- g.setAttribute("width", u), f.appendChild(g);
627
+ const u = document.createElement("col");
628
+ u.setAttribute("width", g), f.appendChild(u);
629
629
  }
630
630
  i.prepend(f);
631
631
  }
@@ -634,40 +634,40 @@ const oe = class oe {
634
634
  l ? l.after(c) : i.prepend(c);
635
635
  }
636
636
  i.classList.add("nine-table-element");
637
- }, "ensureTableStructure"), o = /* @__PURE__ */ d((i, c) => {
638
- const l = Array.from(i.querySelectorAll(c + " tr")), f = Array.from(i.querySelectorAll(c + " th," + c + " td")), u = l.length;
639
- if (u === 0 || f.length === 0) return;
637
+ }, "ensureTableStructure"), r = /* @__PURE__ */ d((i, c) => {
638
+ const l = Array.from(i.querySelectorAll(c + " tr")), f = Array.from(i.querySelectorAll(c + " th," + c + " td")), g = l.length;
639
+ if (g === 0 || f.length === 0) return;
640
640
  let b = 0;
641
641
  f.forEach((p) => {
642
642
  b += p.colSpan || 1;
643
643
  });
644
- const g = Array.from(Array(u), () => Array(b).fill(null));
644
+ const u = Array.from(Array(g), () => Array(b).fill(null));
645
645
  l.forEach((p) => {
646
646
  const m = p.sectionRowIndex;
647
647
  let v = 0;
648
648
  p.dataset.subrow = m, Array.from(p.querySelectorAll("th,td")).forEach((x) => {
649
- for (let _ = 0; _ < g[m].length; _++)
650
- if (g[m][_] === null) {
649
+ for (let _ = 0; _ < u[m].length; _++)
650
+ if (u[m][_] === null) {
651
651
  v = _;
652
652
  break;
653
653
  }
654
- const C = x.rowSpan || 1, R = x.colSpan || 1;
655
- for (let _ = 0; _ < C; _++)
656
- for (let gt = 0; gt < R; gt++)
657
- m + _ < u && v + gt < b && (g[m + _][v + gt] = _ === 0 && gt === 0 ? "1" : "0");
654
+ const T = x.rowSpan || 1, E = x.colSpan || 1;
655
+ for (let _ = 0; _ < T; _++)
656
+ for (let gt = 0; gt < E; gt++)
657
+ m + _ < g && v + gt < b && (u[m + _][v + gt] = _ === 0 && gt === 0 ? "1" : "0");
658
658
  });
659
659
  }), l.forEach((p) => {
660
660
  const m = p.sectionRowIndex;
661
661
  Array.from(p.querySelectorAll("th,td")).forEach((v) => {
662
- for (let x = 0; x < g[m].length; x++)
663
- if (g[m][x] === "1") {
664
- v.dataset.col = x, g[m][x] = "0";
662
+ for (let x = 0; x < u[m].length; x++)
663
+ if (u[m][x] === "1") {
664
+ v.dataset.col = x, u[m][x] = "0";
665
665
  break;
666
666
  }
667
667
  });
668
668
  });
669
669
  }, "resetColIndex"), a = s.cloneNode(!0);
670
- return r(a), e(a), o(a, "thead"), o(a, "tbody"), o(a, "tfoot"), Array.from(a.querySelectorAll("colgroup col")).forEach((i, c) => {
670
+ return n(a), e(a), r(a, "thead"), r(a, "tbody"), r(a, "tfoot"), Array.from(a.querySelectorAll("colgroup col")).forEach((i, c) => {
671
671
  const l = i.getAttribute("fixed");
672
672
  l && a.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
673
673
  f.setAttribute("fixed", l);
@@ -678,15 +678,15 @@ const oe = class oe {
678
678
  };
679
679
  d(oe, "TableCompiler");
680
680
  let Le = oe;
681
- var H, j, U, Et, vs;
681
+ var H, V, U, Et, Ss;
682
682
  const rs = class rs {
683
683
  constructor(s) {
684
684
  h(this, U);
685
685
  h(this, H);
686
- h(this, j, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
687
- E(this, "render", /* @__PURE__ */ d(() => {
688
- const { startRow: s, startCol: e, endRow: r, endCol: o } = t(this, j);
689
- q.log("🎨 [CellSelection.render] Rendering range ->", t(this, j));
686
+ h(this, V, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
687
+ A(this, "render", /* @__PURE__ */ d(() => {
688
+ const { startRow: s, startCol: e, endRow: n, endCol: r } = t(this, V);
689
+ q.log("🎨 [CellSelection.render] Rendering range ->", t(this, V));
690
690
  const a = t(this, H).querySelectorAll(
691
691
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
692
692
  );
@@ -698,60 +698,60 @@ const rs = class rs {
698
698
  q.log("⚠️ [CellSelection.render] Range is invalid (< 0), skipping render.");
699
699
  return;
700
700
  }
701
- let n = 0;
701
+ let o = 0;
702
702
  a.forEach((i) => {
703
703
  i.querySelectorAll("tbody tr").forEach((c) => {
704
704
  const { matrixRow: l } = Y(this, U, Et).call(this, c);
705
705
  l < 0 || c.querySelectorAll("td, th").forEach((f) => {
706
- const u = parseInt(f.dataset.col, 10);
707
- if (isNaN(u)) return;
708
- const b = parseInt(f.rowSpan || 1, 10), g = parseInt(f.colSpan || 1, 10), p = l + b - 1, m = u + g - 1;
709
- p >= s && l <= r && m >= e && u <= o && (n++, f.classList.add("selected"), q.log(f, s, e, r, o), l <= s && f.classList.add("selected-top"), p >= r && f.classList.add("selected-bottom"), u <= e && f.classList.add("selected-left"), m >= o && f.classList.add("selected-right"));
706
+ const g = parseInt(f.dataset.col, 10);
707
+ if (isNaN(g)) return;
708
+ const b = parseInt(f.rowSpan || 1, 10), u = parseInt(f.colSpan || 1, 10), p = l + b - 1, m = g + u - 1;
709
+ p >= s && l <= n && m >= e && g <= r && (o++, f.classList.add("selected"), q.log(f, s, e, n, r), l <= s && f.classList.add("selected-top"), p >= n && f.classList.add("selected-bottom"), g <= e && f.classList.add("selected-left"), m >= r && f.classList.add("selected-right"));
710
710
  });
711
711
  });
712
- }), q.log(`✨ [CellSelection.render] Total rendered cells marked: ${n}`);
712
+ }), q.log(`✨ [CellSelection.render] Total rendered cells marked: ${o}`);
713
713
  }, "render"));
714
- y(this, H, s), Y(this, U, vs).call(this), t(this, H).querySelectorAll(
714
+ y(this, H, s), Y(this, U, Ss).call(this), t(this, H).querySelectorAll(
715
715
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
716
- ).forEach((r) => {
717
- r.addEventListener("scroll", () => {
718
- t(this, j).startRow >= 0 && t(this, j).startCol >= 0 && this.render();
716
+ ).forEach((n) => {
717
+ n.addEventListener("scroll", () => {
718
+ t(this, V).startRow >= 0 && t(this, V).startCol >= 0 && this.render();
719
719
  });
720
720
  }), q.log("🎯 [CellSelection] Initialized");
721
721
  }
722
- setRange(s, e, r, o) {
723
- q.log(`🔍 [CellSelection.setRange] Input -> startRow: ${s}, startCol: ${e}, endRow: ${r}, endCol: ${o}`);
724
- let a = Math.min(s, r), n = Math.max(s, r), i = Math.min(e, o), c = Math.max(e, o);
722
+ setRange(s, e, n, r) {
723
+ q.log(`🔍 [CellSelection.setRange] Input -> startRow: ${s}, startCol: ${e}, endRow: ${n}, endCol: ${r}`);
724
+ let a = Math.min(s, n), o = Math.max(s, n), i = Math.min(e, r), c = Math.max(e, r);
725
725
  const l = t(this, H).querySelectorAll(
726
726
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
727
727
  );
728
- let f = !0, u = 0;
729
- for (; f && u < 5; )
730
- f = !1, u++, l.forEach((b) => {
731
- b.querySelectorAll("tbody tr").forEach((g) => {
732
- if (g.classList.contains("nodata")) return;
733
- const { matrixRow: p } = Y(this, U, Et).call(this, g);
734
- p < 0 || g.querySelectorAll("td, th").forEach((m) => {
728
+ let f = !0, g = 0;
729
+ for (; f && g < 5; )
730
+ f = !1, g++, l.forEach((b) => {
731
+ b.querySelectorAll("tbody tr").forEach((u) => {
732
+ if (u.classList.contains("nodata")) return;
733
+ const { matrixRow: p } = Y(this, U, Et).call(this, u);
734
+ p < 0 || u.querySelectorAll("td, th").forEach((m) => {
735
735
  const v = parseInt(m.dataset.col, 10);
736
736
  if (isNaN(v)) return;
737
- const x = parseInt(m.rowSpan || 1, 10), C = parseInt(m.colSpan || 1, 10), R = p + x - 1, _ = v + C - 1;
738
- if (R >= a && p <= n && _ >= i && v <= c) {
739
- const gs = Math.min(a, p), bs = Math.max(n, R), ps = Math.min(i, v), ys = Math.max(c, _);
740
- (gs !== a || bs !== n || ps !== i || ys !== c) && (a = gs, n = bs, i = ps, c = ys, f = !0);
737
+ const x = parseInt(m.rowSpan || 1, 10), T = parseInt(m.colSpan || 1, 10), E = p + x - 1, _ = v + T - 1;
738
+ if (E >= a && p <= o && _ >= i && v <= c) {
739
+ const bs = Math.min(a, p), ps = Math.max(o, E), ys = Math.min(i, v), ms = Math.max(c, _);
740
+ (bs !== a || ps !== o || ys !== i || ms !== c) && (a = bs, o = ps, i = ys, c = ms, f = !0);
741
741
  }
742
742
  });
743
743
  });
744
744
  });
745
- y(this, j, { startRow: a, startCol: i, endRow: n, endCol: c }), q.log("📦 [CellSelection.setRange] Final Range ->", t(this, j)), this.render();
745
+ y(this, V, { startRow: a, startCol: i, endRow: o, endCol: c }), q.log("📦 [CellSelection.setRange] Final Range ->", t(this, V)), this.render();
746
746
  }
747
747
  };
748
- H = new WeakMap(), j = new WeakMap(), U = new WeakSet(), Et = /* @__PURE__ */ d(function(s) {
748
+ H = new WeakMap(), V = new WeakMap(), U = new WeakSet(), Et = /* @__PURE__ */ d(function(s) {
749
749
  if (!s || s.classList.contains("nodata")) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
750
750
  const e = parseInt(s.dataset.row, 10);
751
751
  if (isNaN(e)) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
752
- const r = s.closest("tbody"), a = Array.from(r.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), n = a.indexOf(s), i = a.length > 0 ? a.length : 1, c = e * i + (n >= 0 ? n : s.sectionRowIndex % i);
753
- return { dataRow: e, subRowIndex: n, matrixRow: c };
754
- }, "#getMatrixRow"), vs = /* @__PURE__ */ d(function() {
752
+ const n = s.closest("tbody"), a = Array.from(n.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), o = a.indexOf(s), i = a.length > 0 ? a.length : 1, c = e * i + (o >= 0 ? o : s.sectionRowIndex % i);
753
+ return { dataRow: e, subRowIndex: o, matrixRow: c };
754
+ }, "#getMatrixRow"), Ss = /* @__PURE__ */ d(function() {
755
755
  const s = t(this, H).querySelector(".ng-container-top");
756
756
  if (!s) {
757
757
  q.log("❌ [CellSelection] .ng-container-top not found!");
@@ -759,32 +759,32 @@ H = new WeakMap(), j = new WeakMap(), U = new WeakSet(), Et = /* @__PURE__ */ d(
759
759
  }
760
760
  s.addEventListener("mousedown", (e) => {
761
761
  if (e.button !== 0) return;
762
- const r = e.target.closest("td, th");
763
- if (!r || r.dataset.row === void 0 || r.dataset.col === void 0 || r.closest("tr").classList.contains("nodata")) return;
762
+ const n = e.target.closest("td, th");
763
+ if (!n || n.dataset.row === void 0 || n.dataset.col === void 0 || n.closest("tr").classList.contains("nodata")) return;
764
764
  t(this, H).style.userSelect = "none", t(this, H).style.webkitUserSelect = "none";
765
- const o = r.closest("tr"), { matrixRow: a } = Y(this, U, Et).call(this, o), n = parseInt(r.dataset.col, 10);
765
+ const r = n.closest("tr"), { matrixRow: a } = Y(this, U, Et).call(this, r), o = parseInt(n.dataset.col, 10);
766
766
  if (a < 0) {
767
767
  t(this, H).style.userSelect = "", t(this, H).style.webkitUserSelect = "";
768
768
  return;
769
769
  }
770
- q.log(`🖱️ [MouseDown Success] startRow: ${a}, startCol: ${n}`), t(this, H).navigation.currentCell = r;
771
- let i = a, c = n;
772
- const l = /* @__PURE__ */ d((u) => {
773
- const b = document.elementFromPoint(u.clientX, u.clientY);
774
- let g = b == null ? void 0 : b.closest("td, th");
775
- if (!g || !t(this, H).contains(g)) {
770
+ q.log(`🖱️ [MouseDown Success] startRow: ${a}, startCol: ${o}`), t(this, H).navigation.currentCell = n;
771
+ let i = a, c = o;
772
+ const l = /* @__PURE__ */ d((g) => {
773
+ const b = document.elementFromPoint(g.clientX, g.clientY);
774
+ let u = b == null ? void 0 : b.closest("td, th");
775
+ if (!u || !t(this, H).contains(u)) {
776
776
  const x = t(this, H).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
777
- for (const C of x) {
778
- const R = C.getBoundingClientRect();
779
- if (u.clientX >= R.left && u.clientX <= R.right && u.clientY >= R.top && u.clientY <= R.bottom) {
780
- g = C;
777
+ for (const T of x) {
778
+ const E = T.getBoundingClientRect();
779
+ if (g.clientX >= E.left && g.clientX <= E.right && g.clientY >= E.top && g.clientY <= E.bottom) {
780
+ u = T;
781
781
  break;
782
782
  }
783
783
  }
784
784
  }
785
- if (!g || g.dataset.row === void 0 || g.dataset.col === void 0 || g.closest("tr").classList.contains("nodata")) return;
786
- const p = g.closest("tr"), { matrixRow: m } = Y(this, U, Et).call(this, p), v = parseInt(g.dataset.col, 10);
787
- m < 0 || i === m && c === v || (i = m, c = v, this.setRange(a, n, m, v));
785
+ if (!u || u.dataset.row === void 0 || u.dataset.col === void 0 || u.closest("tr").classList.contains("nodata")) return;
786
+ const p = u.closest("tr"), { matrixRow: m } = Y(this, U, Et).call(this, p), v = parseInt(u.dataset.col, 10);
787
+ m < 0 || i === m && c === v || (i = m, c = v, this.setRange(a, o, m, v));
788
788
  }, "onMouseMove"), f = /* @__PURE__ */ d(() => {
789
789
  q.log("🖱️ [MouseUp] Drag ended."), t(this, H).style.userSelect = "", t(this, H).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", f);
790
790
  }, "onMouseUp");
@@ -792,94 +792,108 @@ H = new WeakMap(), j = new WeakMap(), U = new WeakSet(), Et = /* @__PURE__ */ d(
792
792
  });
793
793
  }, "#initEvents"), d(rs, "CellSelection");
794
794
  let Ie = rs;
795
- var V, at, Nt, ie, ae, At, Ss, _t, Ot, Dt, lt, le, Rs;
796
- const ns = class ns {
795
+ var B, at, Nt, ie, ae, At, Rs, _t, Dt, Ot, lt, Ye, le, As;
796
+ const os = class os {
797
797
  constructor(s) {
798
798
  h(this, At);
799
- h(this, V);
799
+ h(this, B);
800
800
  h(this, at, null);
801
801
  h(this, Nt, null);
802
802
  h(this, ie, -1);
803
803
  h(this, ae, -1);
804
804
  h(this, _t, /* @__PURE__ */ d((s) => {
805
805
  const e = [];
806
- return s.forEach((r) => e.push(...Array.from(r.querySelectorAll("td")))), e.length === 0 ? null : (e.sort((r, o) => parseInt(r.dataset.col, 10) - parseInt(o.dataset.col, 10)), e[e.length - 1]);
806
+ return s.forEach((n) => e.push(...Array.from(n.querySelectorAll("td")))), e.length === 0 ? null : (e.sort((n, r) => parseInt(n.dataset.col, 10) - parseInt(r.dataset.col, 10)), e[e.length - 1]);
807
807
  }, "#getMaxColCell"));
808
- h(this, Ot, /* @__PURE__ */ d((s, e) => {
809
- const r = t(this, lt).call(this, s);
810
- if (r.length === 0) return e + 1;
811
- let o = e + 1;
808
+ h(this, Dt, /* @__PURE__ */ d((s, e) => {
809
+ const n = t(this, lt).call(this, s);
810
+ if (n.length === 0) return e + 1;
811
+ let r = e + 1;
812
812
  const a = [];
813
- r.forEach((n) => a.push(...Array.from(n.querySelectorAll("td")))), a.sort((n, i) => parseInt(n.dataset.col, 10) - parseInt(i.dataset.col, 10));
814
- for (const n of a) {
815
- const i = parseInt(n.dataset.col, 10), c = parseInt(n.colSpan || 1, 10);
813
+ n.forEach((o) => a.push(...Array.from(o.querySelectorAll("td")))), a.sort((o, i) => parseInt(o.dataset.col, 10) - parseInt(i.dataset.col, 10));
814
+ for (const o of a) {
815
+ const i = parseInt(o.dataset.col, 10), c = parseInt(o.colSpan || 1, 10);
816
816
  if (e >= i && e < i + c) {
817
- o = i + c;
817
+ r = i + c;
818
818
  break;
819
819
  }
820
820
  }
821
- return o;
821
+ return r;
822
822
  }, "#getNextCol"));
823
- h(this, Dt, /* @__PURE__ */ d((s, e) => {
824
- const r = t(this, lt).call(this, s);
825
- if (r.length === 0) return Math.max(0, e - 1);
826
- let o = -1;
823
+ h(this, Ot, /* @__PURE__ */ d((s, e) => {
824
+ const n = t(this, lt).call(this, s);
825
+ if (n.length === 0) return Math.max(0, e - 1);
826
+ let r = -1;
827
827
  const a = [];
828
- r.forEach((n) => a.push(...Array.from(n.querySelectorAll("td")))), a.sort((n, i) => parseInt(n.dataset.col, 10) - parseInt(i.dataset.col, 10));
829
- for (const n of a) {
830
- const i = parseInt(n.dataset.col, 10);
828
+ n.forEach((o) => a.push(...Array.from(o.querySelectorAll("td")))), a.sort((o, i) => parseInt(o.dataset.col, 10) - parseInt(i.dataset.col, 10));
829
+ for (const o of a) {
830
+ const i = parseInt(o.dataset.col, 10);
831
831
  if (i < e)
832
- o = i;
832
+ r = i;
833
833
  else
834
834
  break;
835
835
  }
836
- return o;
836
+ return r;
837
837
  }, "#getPreviousCol"));
838
838
  // 🎯 레거시의 병합 셀(rowSpan) 블록 포용 탐색 로직 이식
839
839
  h(this, lt, /* @__PURE__ */ d((s) => {
840
- const e = t(this, V).querySelectorAll(
840
+ const e = t(this, B).querySelectorAll(
841
841
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
842
- ), r = [];
843
- return e.forEach((o) => {
844
- const a = Array.from(o.querySelectorAll("tbody tr:not(.nodata)"));
845
- for (const n of a) {
846
- const i = parseInt(n.dataset.row, 10), c = a.filter((p) => parseInt(p.dataset.row, 10) === i), l = c.length > 0 ? c.length : 1, f = c.indexOf(n), u = i * l + (f >= 0 ? f : 0);
847
- if (u === s) {
848
- r.push(n);
842
+ ), n = [];
843
+ return e.forEach((r) => {
844
+ const a = Array.from(r.querySelectorAll("tbody tr:not(.nodata)"));
845
+ for (const o of a) {
846
+ const i = parseInt(o.dataset.row, 10), c = a.filter((p) => parseInt(p.dataset.row, 10) === i), l = c.length > 0 ? c.length : 1, f = c.indexOf(o), g = i * l + (f >= 0 ? f : 0);
847
+ if (g === s) {
848
+ n.push(o);
849
849
  break;
850
850
  }
851
- const b = Array.from(n.querySelectorAll("td"));
852
- let g = !1;
851
+ const b = Array.from(o.querySelectorAll("td"));
852
+ let u = !1;
853
853
  for (const p of b) {
854
854
  const m = parseInt(p.rowSpan || 1, 10);
855
- if (m > 1 && s >= u && s < u + m) {
856
- r.push(n), g = !0;
855
+ if (m > 1 && s >= g && s < g + m) {
856
+ n.push(o), u = !0;
857
857
  break;
858
858
  }
859
859
  }
860
- if (g) break;
860
+ if (u) break;
861
861
  }
862
- }), r;
862
+ }), n;
863
863
  }, "#findTargetTrsByMatrix"));
864
864
  // 🎯 rowSpan 및 colSpan 경계를 모두 충족하는 셀을 3분할 전체 영역에서 탐색
865
- h(this, le, /* @__PURE__ */ d((s, e, r, o) => {
866
- const a = t(this, V).querySelectorAll(
865
+ h(this, Ye, /* @__PURE__ */ d((s, e, n, r) => {
866
+ const a = t(this, B).querySelectorAll(
867
867
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
868
- ), n = o !== void 0 ? o : s * 1 + e;
868
+ ), o = r !== void 0 ? r : s * 1 + e;
869
869
  for (const i of a) {
870
870
  const c = Array.from(i.querySelectorAll("tbody tr"));
871
871
  for (const l of c) {
872
- const f = parseInt(l.dataset.row, 10), u = c.filter((v) => parseInt(v.dataset.row, 10) === f), b = u.length > 0 ? u.length : 1, g = u.indexOf(l), p = f * b + (g >= 0 ? g : 0), m = Array.from(l.querySelectorAll("td"));
873
- for (const v of m) {
874
- const x = parseInt(v.dataset.col, 10), C = parseInt(v.colSpan || 1, 10), R = parseInt(v.rowSpan || 1, 10);
875
- if (!isNaN(x) && r >= x && r < x + C && n >= p && n < p + R && window.getComputedStyle(v).display !== "none")
876
- return v;
872
+ const f = parseInt(l.dataset.row, 10), g = t(this, B).templateLength, b = parseInt(l.dataset.subrow, 10), u = f * g + (b >= 0 ? b : 0), p = Array.from(l.querySelectorAll("td"));
873
+ for (const m of p) {
874
+ const v = parseInt(m.dataset.col, 10), x = parseInt(m.colSpan || 1, 10), T = parseInt(m.rowSpan || 1, 10);
875
+ if (!isNaN(v) && n >= v && n < v + x && o >= u && o < u + T && window.getComputedStyle(m).display !== "none")
876
+ return m;
877
877
  }
878
878
  }
879
879
  }
880
880
  return null;
881
+ }, "#getNearElement_BAK"));
882
+ h(this, le, /* @__PURE__ */ d((s, e, n, r) => {
883
+ const a = r !== void 0 ? r : s * 1 + e, o = Array.from(t(this, B).querySelectorAll(
884
+ ".ng-container-left .ng-part-body tbody tr, .ng-container-body .ng-part-body tbody tr, .ng-container-right .ng-part-body tbody tr"
885
+ ));
886
+ for (const i of o) {
887
+ const c = parseInt(i.dataset.row, 10) || 0, l = t(this, B).templateLength || 1, f = parseInt(i.dataset.subrowIndex, 10) || 0, g = c * l + f, b = Array.from(i.querySelectorAll("td"));
888
+ for (const u of b) {
889
+ const p = parseInt(u.dataset.col, 10), m = parseInt(u.colSpan || 1, 10), v = parseInt(u.rowSpan || 1, 10);
890
+ if (!isNaN(p) && n >= p && n < p + m && a >= g && a < g + v && window.getComputedStyle(u).display !== "none")
891
+ return u;
892
+ }
893
+ }
894
+ return null;
881
895
  }, "#getNearElement"));
882
- y(this, V, s), Y(this, At, Rs).call(this), q.log("🎯 [CellNavigation] Initialized");
896
+ y(this, B, s), Y(this, At, As).call(this), q.log("🎯 [CellNavigation] Initialized");
883
897
  }
884
898
  get currentCell() {
885
899
  return t(this, at);
@@ -887,39 +901,39 @@ const ns = class ns {
887
901
  set currentCell(s) {
888
902
  if (!s) return;
889
903
  y(this, at, s), s.focus({ preventScroll: !0 }), y(this, Nt, s.closest("tr"));
890
- const e = parseInt(s.dataset.row, 10), r = parseInt(s.dataset.col, 10);
891
- if (!isNaN(e) && !isNaN(r)) {
892
- y(this, ie, e), y(this, ae, r);
893
- const o = s.closest("tr"), a = o == null ? void 0 : o.closest("tbody");
904
+ const e = parseInt(s.dataset.row, 10), n = parseInt(s.dataset.col, 10);
905
+ if (!isNaN(e) && !isNaN(n)) {
906
+ y(this, ie, e), y(this, ae, n);
907
+ const r = s.closest("tr"), a = r == null ? void 0 : r.closest("tbody");
894
908
  if (a) {
895
- const i = Array.from(a.querySelectorAll("tr:not(.nodata)")).filter((u) => parseInt(u.dataset.row, 10) === e), c = i.length > 0 ? i.length : 1, l = i.indexOf(o), f = e * c + (l >= 0 ? l : 0);
896
- t(this, V).selection.setRange(f, r, f, r);
909
+ const i = Array.from(a.querySelectorAll("tr:not(.nodata)")).filter((g) => parseInt(g.dataset.row, 10) === e), c = i.length > 0 ? i.length : 1, l = i.indexOf(r), f = e * c + (l >= 0 ? l : 0);
910
+ t(this, B).selection.setRange(f, n, f, n);
897
911
  }
898
912
  }
899
913
  }
900
914
  moveCell(s) {
901
915
  if (!t(this, at)) return;
902
- const e = t(this, at), r = parseInt(e.dataset.row, 10), o = parseInt(e.dataset.col, 10), a = t(this, V).templateLength, n = parseInt(t(this, Nt).dataset.subrow, 10), i = r * a + (n >= 0 ? n : 0);
903
- let c = i, l = o;
916
+ const e = t(this, at), n = parseInt(e.dataset.row, 10), r = parseInt(e.dataset.col, 10), a = t(this, B).templateLength, o = parseInt(t(this, Nt).dataset.subrow, 10), i = n * a + (o >= 0 ? o : 0);
917
+ let c = i, l = r;
904
918
  switch (s.code) {
905
919
  case "Tab":
906
920
  if (s.preventDefault(), s.shiftKey) {
907
- if (l = t(this, Dt).call(this, i, o), l < 0 && i > 0) {
921
+ if (l = t(this, Ot).call(this, i, r), l < 0 && i > 0) {
908
922
  c = i - 1;
909
- const g = t(this, lt).call(this, c), p = t(this, _t).call(this, g);
923
+ const u = t(this, lt).call(this, c), p = t(this, _t).call(this, u);
910
924
  l = p ? parseInt(p.dataset.col, 10) : 0;
911
925
  }
912
926
  } else {
913
- l = t(this, Ot).call(this, i, o);
914
- const g = t(this, lt).call(this, i), p = t(this, _t).call(this, g), m = p ? parseInt(p.dataset.col, 10) + parseInt(p.colSpan || 1, 10) : 0;
927
+ l = t(this, Dt).call(this, i, r);
928
+ const u = t(this, lt).call(this, i), p = t(this, _t).call(this, u), m = p ? parseInt(p.dataset.col, 10) + parseInt(p.colSpan || 1, 10) : 0;
915
929
  l >= m && (c = i + 1, l = 0);
916
930
  }
917
931
  break;
918
932
  case "ArrowRight":
919
- l = t(this, Ot).call(this, i, o);
933
+ l = t(this, Dt).call(this, i, r);
920
934
  break;
921
935
  case "ArrowLeft":
922
- l = t(this, Dt).call(this, i, o);
936
+ l = t(this, Ot).call(this, i, r);
923
937
  break;
924
938
  case "ArrowDown":
925
939
  s.preventDefault(), c = i + (e.rowSpan || 1);
@@ -928,21 +942,21 @@ const ns = class ns {
928
942
  s.preventDefault(), c = Math.max(0, i - (e.rowSpan || 1));
929
943
  break;
930
944
  }
931
- const f = Math.floor(c / a), u = c % a;
945
+ const f = Math.floor(c / a), g = c % a;
932
946
  q.log("templateLength", a, "matrixRow:", i, "nextMatrixRow", c);
933
- let b = t(this, le).call(this, f, u, l, c);
934
- q.log(b, f, u, l, c), b && (this.currentCell = b, Y(this, At, Ss).call(this, b));
947
+ let b = t(this, le).call(this, f, g, l, c);
948
+ q.log(b, f, g, l, c), b && (this.currentCell = b, Y(this, At, Rs).call(this, b));
935
949
  }
936
950
  };
937
- V = new WeakMap(), at = new WeakMap(), Nt = new WeakMap(), ie = new WeakMap(), ae = new WeakMap(), At = new WeakSet(), // 🎯 셀이 보이지 않는 영역에 있을 때 컨테이너 스크롤을 동기화하는 함수
938
- Ss = /* @__PURE__ */ d(function(s) {
939
- }, "#ensureCellVisible"), _t = new WeakMap(), Ot = new WeakMap(), Dt = new WeakMap(), lt = new WeakMap(), le = new WeakMap(), Rs = /* @__PURE__ */ d(function() {
940
- t(this, V).addEventListener("keydown", (s) => {
951
+ B = new WeakMap(), at = new WeakMap(), Nt = new WeakMap(), ie = new WeakMap(), ae = new WeakMap(), At = new WeakSet(), // 🎯 셀이 보이지 않는 영역에 있을 때 컨테이너 스크롤을 동기화하는 함수
952
+ Rs = /* @__PURE__ */ d(function(s) {
953
+ }, "#ensureCellVisible"), _t = new WeakMap(), Dt = new WeakMap(), Ot = new WeakMap(), lt = new WeakMap(), Ye = new WeakMap(), le = new WeakMap(), As = /* @__PURE__ */ d(function() {
954
+ t(this, B).addEventListener("keydown", (s) => {
941
955
  ["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(s.code) && this.moveCell(s);
942
956
  });
943
- }, "#initEvents"), d(ns, "CellNavigation");
944
- let Me = ns;
945
- var ce, ct, Wt, zt, P, he, de, yt, fe, ue;
957
+ }, "#initEvents"), d(os, "CellNavigation");
958
+ let Me = os;
959
+ var ce, ct, Wt, zt, F, he, de, yt, fe, ue;
946
960
  const qt = class qt extends HTMLElement {
947
961
  constructor() {
948
962
  super();
@@ -950,21 +964,21 @@ const qt = class qt extends HTMLElement {
950
964
  h(this, ct);
951
965
  h(this, Wt);
952
966
  h(this, zt);
953
- h(this, P, {
967
+ h(this, F, {
954
968
  table: null
955
969
  });
956
- E(this, "invalidate", /* @__PURE__ */ d(() => {
970
+ A(this, "invalidate", /* @__PURE__ */ d(() => {
957
971
  q.log("sheet.invalidate()"), t(this, ct).refresh();
958
972
  }, "invalidate"));
959
- E(this, "generate", /* @__PURE__ */ d((e) => {
973
+ A(this, "generate", /* @__PURE__ */ d((e) => {
960
974
  if (q.log("sheet.generate()"), !e) return;
961
- t(this, P).table = Le.compile(e), t(this, P).tbody = {
962
- tr: t(this, P).table.querySelectorAll("tbody tr")
975
+ t(this, F).table = Le.compile(e), t(this, F).tbody = {
976
+ tr: t(this, F).table.querySelectorAll("tbody tr")
963
977
  }, t(this, he).call(this), t(this, de).call(this);
964
- const r = this.querySelector(".ng-container-body .ng-part-header"), o = this.querySelector(".ng-container-body .ng-part-footer"), a = this.querySelector(".ng-nodata-overlay");
965
- r && a && (a.style.top = `${r.offsetHeight}px`), o && a && (a.style.bottom = `${o.offsetHeight}px`), t(this, ct).initialize(), setTimeout(() => {
966
- var n;
967
- (n = this.querySelector("nine-table-hscrollbar")) == null || n.refresh();
978
+ const n = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), a = this.querySelector(".ng-nodata-overlay");
979
+ n && a && (a.style.top = `${n.offsetHeight}px`), r && a && (a.style.bottom = `${r.offsetHeight}px`), t(this, ct).initialize(), setTimeout(() => {
980
+ var o;
981
+ (o = this.querySelector("nine-table-hscrollbar")) == null || o.refresh();
968
982
  }, 0);
969
983
  }, "generate"));
970
984
  h(this, he, /* @__PURE__ */ d(() => {
@@ -972,50 +986,50 @@ const qt = class qt extends HTMLElement {
972
986
  { selector: ".ng-container-body", type: null },
973
987
  { selector: ".ng-container-left", type: "left" },
974
988
  { selector: ".ng-container-right", type: "right" }
975
- ].forEach(({ selector: r, type: o }) => {
976
- var a, n, i;
977
- (a = this.querySelector(`${r} .ng-part-header`)) == null || a.appendChild(t(this, yt).call(this, t(this, P).table, o, "header")), (n = this.querySelector(`${r} .ng-virtual-spacer`)) == null || n.before(t(this, yt).call(this, t(this, P).table, o, "body")), (i = this.querySelector(`${r} .ng-part-footer`)) == null || i.appendChild(t(this, yt).call(this, t(this, P).table, o, "footer"));
989
+ ].forEach(({ selector: n, type: r }) => {
990
+ var a, o, i;
991
+ (a = this.querySelector(`${n} .ng-part-header`)) == null || a.appendChild(t(this, yt).call(this, t(this, F).table, r, "header")), (o = this.querySelector(`${n} .ng-virtual-spacer`)) == null || o.before(t(this, yt).call(this, t(this, F).table, r, "body")), (i = this.querySelector(`${n} .ng-part-footer`)) == null || i.appendChild(t(this, yt).call(this, t(this, F).table, r, "footer"));
978
992
  });
979
993
  }, "#renderSplitContainers"));
980
994
  h(this, de, /* @__PURE__ */ d(() => {
981
995
  ["left", "right", "body"].forEach((e) => {
982
- const r = this.querySelector(`.ng-container-${e}`), o = r == null ? void 0 : r.querySelectorAll("table");
983
- if (!r || !o || o.length === 0) return;
996
+ const n = this.querySelector(`.ng-container-${e}`), r = n == null ? void 0 : n.querySelectorAll("table");
997
+ if (!n || !r || r.length === 0) return;
984
998
  let a = 0;
985
- o[0].querySelectorAll("col").forEach((n) => {
986
- const i = parseInt(n.getAttribute("width"), 10);
999
+ r[0].querySelectorAll("col").forEach((o) => {
1000
+ const i = parseInt(o.getAttribute("width"), 10);
987
1001
  isNaN(i) || (a += i);
988
- }), e === "body" ? (r.style.flex = "1", o.forEach((n) => {
989
- n.style.width = `${a}px`, n.style.minWidth = `${a}px`;
990
- })) : (r.style.flex = `0 0 ${a}px`, r.style.width = `${a}px`, o.forEach((n) => {
991
- n.style.width = `${a}px`, n.style.minWidth = `${a}px`;
1002
+ }), e === "body" ? (n.style.flex = "1", r.forEach((o) => {
1003
+ o.style.width = `${a}px`, o.style.minWidth = `${a}px`;
1004
+ })) : (n.style.flex = `0 0 ${a}px`, n.style.width = `${a}px`, r.forEach((o) => {
1005
+ o.style.width = `${a}px`, o.style.minWidth = `${a}px`;
992
1006
  }));
993
1007
  });
994
1008
  }, "#updateContainerWidths"));
995
- h(this, yt, /* @__PURE__ */ d((e, r, o) => {
996
- const a = e.cloneNode(!0), n = a.querySelector("thead"), i = a.querySelector("tbody"), c = a.querySelector("tfoot");
997
- if (o === "header") {
1009
+ h(this, yt, /* @__PURE__ */ d((e, n, r) => {
1010
+ const a = e.cloneNode(!0), o = a.querySelector("thead"), i = a.querySelector("tbody"), c = a.querySelector("tfoot");
1011
+ if (r === "header") {
998
1012
  if (i && i.remove(), c && c.remove(), e.querySelector("tbody")) {
999
1013
  const f = document.createElement("tbody");
1000
1014
  f.className = "fixed-tbody", a.appendChild(f);
1001
1015
  }
1002
- } else o === "body" ? (n && n.remove(), c && c.remove(), i && (i.className = "bindable-tbody")) : o === "footer" && (n && n.remove(), i && i.remove());
1003
- return r === "left" ? a.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
1016
+ } else r === "body" ? (o && o.remove(), c && c.remove(), i && (i.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), i && i.remove());
1017
+ return n === "left" ? a.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
1004
1018
  l.getAttribute("fixed") !== "left" && l.remove();
1005
- }) : r === "right" ? a.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
1019
+ }) : n === "right" ? a.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
1006
1020
  l.getAttribute("fixed") !== "right" && l.remove();
1007
1021
  }) : a.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
1008
1022
  l.remove();
1009
1023
  }), a;
1010
1024
  }, "#createSplitTable"));
1011
- E(this, "getRowHeight", /* @__PURE__ */ d(() => t(this, ct).getRowHeight(), "getRowHeight"));
1012
- E(this, "scrollToX", /* @__PURE__ */ d((e) => {
1013
- const r = this.querySelector(".ng-container-body .ng-part-body");
1014
- r && (r.scrollLeft = e);
1025
+ A(this, "getRowHeight", /* @__PURE__ */ d(() => t(this, ct).getRowHeight(), "getRowHeight"));
1026
+ A(this, "scrollToX", /* @__PURE__ */ d((e) => {
1027
+ const n = this.querySelector(".ng-container-body .ng-part-body");
1028
+ n && (n.scrollLeft = e);
1015
1029
  }, "scrollToX"));
1016
- E(this, "scrollToY", /* @__PURE__ */ d((e) => {
1017
- const r = this.querySelector(".ng-container-body .ng-part-body");
1018
- r && (r.scrollTop = e);
1030
+ A(this, "scrollToY", /* @__PURE__ */ d((e) => {
1031
+ const n = this.querySelector(".ng-container-body .ng-part-body");
1032
+ n && (n.scrollTop = e);
1019
1033
  }, "scrollToY"));
1020
1034
  h(this, fe, /* @__PURE__ */ d(() => {
1021
1035
  t(this, ue).call(this), y(this, Wt, new Ie(this)), y(this, zt, new Me(this));
@@ -1231,7 +1245,7 @@ const qt = class qt extends HTMLElement {
1231
1245
  return t(this, Wt);
1232
1246
  }
1233
1247
  get templateLength() {
1234
- return t(this, P).tbody.tr.length;
1248
+ return t(this, F).tbody.tr.length;
1235
1249
  }
1236
1250
  get navigation() {
1237
1251
  return t(this, zt);
@@ -1240,62 +1254,62 @@ const qt = class qt extends HTMLElement {
1240
1254
  this.innerHTML = "", q.log("NineTableSheet destroyed.");
1241
1255
  }
1242
1256
  };
1243
- ce = new WeakMap(), ct = new WeakMap(), Wt = new WeakMap(), zt = new WeakMap(), P = new WeakMap(), he = new WeakMap(), de = new WeakMap(), yt = new WeakMap(), fe = new WeakMap(), ue = new WeakMap(), d(qt, "NineTableSheet"), E(qt, "SCROLLBAR_SIZE", 16);
1257
+ ce = new WeakMap(), ct = new WeakMap(), Wt = new WeakMap(), zt = new WeakMap(), F = new WeakMap(), he = new WeakMap(), de = new WeakMap(), yt = new WeakMap(), fe = new WeakMap(), ue = new WeakMap(), d(qt, "NineTableSheet"), A(qt, "SCROLLBAR_SIZE", 16);
1244
1258
  let Xt = qt;
1245
1259
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Xt);
1246
1260
  var ge, Bt;
1247
- const os = class os extends HTMLElement {
1261
+ const is = class is extends HTMLElement {
1248
1262
  constructor() {
1249
1263
  super();
1250
1264
  h(this, ge, /* @__PURE__ */ d(() => {
1251
1265
  var e;
1252
- (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (r) => {
1253
- var n;
1254
- const o = r.ctrlKey || r.metaKey || r.shiftKey, a = parseInt((n = r.target.closest(".nine-tab-item")) == null ? void 0 : n.dataset.index, 10);
1255
- t(this, Bt).call(this, a, o);
1266
+ (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (n) => {
1267
+ var o;
1268
+ const r = n.ctrlKey || n.metaKey || n.shiftKey, a = parseInt((o = n.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
1269
+ t(this, Bt).call(this, a, r);
1256
1270
  }), t(this, Bt).call(this, 0, !1);
1257
1271
  }, "#init"));
1258
- h(this, Bt, /* @__PURE__ */ d((e, r = !1) => {
1259
- const o = /* @__PURE__ */ d(() => {
1272
+ h(this, Bt, /* @__PURE__ */ d((e, n = !1) => {
1273
+ const r = /* @__PURE__ */ d(() => {
1260
1274
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
1261
- Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
1262
- const b = f.filter((g) => g.classList.contains("active"));
1263
- b.length < 2 || b.forEach((g) => {
1264
- const p = parseInt(g.getAttribute("data-index"), 10), m = this.querySelector(`nine-splitter[data-split-index="${p}"]`), v = f[p + 1];
1275
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((u) => u.style.setProperty("display", "none"));
1276
+ const b = f.filter((u) => u.classList.contains("active"));
1277
+ b.length < 2 || b.forEach((u) => {
1278
+ const p = parseInt(u.getAttribute("data-index"), 10), m = this.querySelector(`nine-splitter[data-split-index="${p}"]`), v = f[p + 1];
1265
1279
  m && v && v.classList.contains("active") && m.style.setProperty("display", "flex");
1266
1280
  });
1267
- }, "updateSplitters"), a = this.querySelector(".nine-tab-bar"), n = this.querySelector("nine-table-sheets-body"), i = a.querySelectorAll(".nine-tab-item"), c = n.querySelectorAll("nine-table-sheet");
1281
+ }, "updateSplitters"), a = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), i = a.querySelectorAll(".nine-tab-item"), c = o.querySelectorAll("nine-table-sheet");
1268
1282
  if (!i[e]) return;
1269
- if (!r)
1270
- i.forEach((f, u) => {
1271
- f.classList.toggle("active", u === e);
1272
- }), c.forEach((f, u) => {
1273
- const b = u === e;
1283
+ if (!n)
1284
+ i.forEach((f, g) => {
1285
+ f.classList.toggle("active", g === e);
1286
+ }), c.forEach((f, g) => {
1287
+ const b = g === e;
1274
1288
  f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
1275
1289
  });
1276
1290
  else {
1277
- const f = i[e], u = a.querySelectorAll(".nine-tab-item.active");
1278
- if (f.classList.contains("active") && u.length <= 1)
1291
+ const f = i[e], g = a.querySelectorAll(".nine-tab-item.active");
1292
+ if (f.classList.contains("active") && g.length <= 1)
1279
1293
  return;
1280
1294
  f.classList.toggle("active");
1281
- const b = n.querySelector(`nine-table-sheet[data-index="${e}"]`);
1295
+ const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
1282
1296
  b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
1283
1297
  }
1284
- const l = n.querySelectorAll("nine-table-sheet.active");
1298
+ const l = o.querySelectorAll("nine-table-sheet.active");
1285
1299
  l == null || l.forEach((f) => {
1286
1300
  f.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
1287
- }), o();
1301
+ }), r();
1288
1302
  }, "#switchSheet"));
1289
1303
  }
1290
1304
  connectedCallback() {
1291
1305
  t(this, ge).call(this);
1292
1306
  }
1293
1307
  };
1294
- ge = new WeakMap(), Bt = new WeakMap(), d(os, "NineTableSheets");
1295
- let He = os;
1308
+ ge = new WeakMap(), Bt = new WeakMap(), d(is, "NineTableSheets");
1309
+ let He = is;
1296
1310
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", He);
1297
1311
  var N, be, Pt, pe;
1298
- const is = class is {
1312
+ const as = class as {
1299
1313
  constructor(s) {
1300
1314
  h(this, N);
1301
1315
  h(this, be, /* @__PURE__ */ d(() => {
@@ -1308,14 +1322,14 @@ const is = class is {
1308
1322
  var c, l;
1309
1323
  const s = Array.from(t(this, N).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1310
1324
  if (s.length === 0) return;
1311
- const e = parseInt(t(this, N).getAttribute("max-display-row"), 10) || 10, r = Math.max(...s.map((f) => f.getRowHeight())), o = (c = t(this, N).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, a = (l = t(this, N).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, n = Xt.SCROLLBAR_SIZE, i = e * r + o + a + n;
1325
+ const e = parseInt(t(this, N).getAttribute("max-display-row"), 10) || 10, n = Math.max(...s.map((f) => f.getRowHeight())), r = (c = t(this, N).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, a = (l = t(this, N).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = Xt.SCROLLBAR_SIZE, i = e * n + r + a + o;
1312
1326
  t(this, N).style.height = `${i}px`;
1313
1327
  }, "#applyAutoHeight"));
1314
1328
  h(this, pe, /* @__PURE__ */ d(() => {
1315
- const e = Array.from(t(this, N).children).filter((c) => c.tagName === "TABLE"), r = t(this, N).getAttribute("auto-height") === "true", o = e.length, a = e.map((c, l) => {
1316
- const u = `<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>` : "";
1317
- return u + b;
1318
- }).join(""), n = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1329
+ const e = Array.from(t(this, N).children).filter((c) => c.tagName === "TABLE"), n = t(this, N).getAttribute("auto-height") === "true", r = e.length, a = e.map((c, l) => {
1330
+ 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>` : "";
1331
+ return g + b;
1332
+ }).join(""), o = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1319
1333
  t(this, N).shadowRoot.innerHTML = `
1320
1334
  <style>
1321
1335
  :host {
@@ -1323,7 +1337,7 @@ const is = class is {
1323
1337
  flex-direction: column;
1324
1338
  position: relative;
1325
1339
  overflow: hidden;
1326
- height: ${r ? "auto" : "100%"};
1340
+ height: ${n ? "auto" : "100%"};
1327
1341
  background: #fff;
1328
1342
  }
1329
1343
 
@@ -1429,7 +1443,7 @@ const is = class is {
1429
1443
  <nine-table-sheets>
1430
1444
  <nine-table-sheets-body>${a}</nine-table-sheets-body>
1431
1445
  <nine-table-sheets-footer>
1432
- <div class="nine-tab-bar">${n}</div>
1446
+ <div class="nine-tab-bar">${o}</div>
1433
1447
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
1434
1448
  </nine-table-sheets-footer>
1435
1449
  </nine-table-sheets>
@@ -1440,21 +1454,21 @@ const is = class is {
1440
1454
  const i = t(this, N).shadowRoot.querySelectorAll("nine-table-sheet");
1441
1455
  i == null || i.forEach((c, l) => {
1442
1456
  e[l] && setTimeout(() => {
1443
- c.generate(e[l]), r && t(this, Pt).call(this);
1457
+ c.generate(e[l]), n && t(this, Pt).call(this);
1444
1458
  });
1445
1459
  });
1446
1460
  }, "#render"));
1447
1461
  y(this, N, s), t(this, be).call(this);
1448
1462
  }
1449
1463
  };
1450
- N = new WeakMap(), be = new WeakMap(), Pt = new WeakMap(), pe = new WeakMap(), d(is, "LayoutManager");
1451
- let $e = is;
1464
+ N = new WeakMap(), be = new WeakMap(), Pt = new WeakMap(), pe = new WeakMap(), d(as, "LayoutManager");
1465
+ let $e = as;
1452
1466
  var Ft, mt;
1453
- const as = class as {
1467
+ const ls = class ls {
1454
1468
  constructor(s) {
1455
1469
  h(this, Ft);
1456
1470
  h(this, mt, -1);
1457
- E(this, "count", /* @__PURE__ */ d(() => t(this, Ft).rawRecords.length, "count"));
1471
+ A(this, "count", /* @__PURE__ */ d(() => t(this, Ft).rawRecords.length, "count"));
1458
1472
  y(this, Ft, s);
1459
1473
  }
1460
1474
  get at() {
@@ -1465,131 +1479,131 @@ const as = class as {
1465
1479
  });
1466
1480
  }
1467
1481
  };
1468
- Ft = new WeakMap(), mt = new WeakMap(), d(as, "ngRow");
1469
- let Ne = as;
1470
- var D, L, W, xt, ye, G, me, ht, jt, xe, we, wt;
1482
+ Ft = new WeakMap(), mt = new WeakMap(), d(ls, "ngRow");
1483
+ let Ne = ls;
1484
+ var O, L, W, xt, ye, Z, me, ht, jt, xe, we, wt;
1471
1485
  const z = class z {
1472
1486
  constructor(s, e) {
1473
- h(this, D);
1487
+ h(this, O);
1474
1488
  h(this, L);
1475
1489
  h(this, W, []);
1476
1490
  h(this, xt, []);
1477
1491
  h(this, ye, 0);
1478
- h(this, G, []);
1492
+ h(this, Z, []);
1479
1493
  h(this, me, /* @__PURE__ */ d(() => {
1480
- y(this, G, []);
1481
- const s = t(this, D).template || [];
1494
+ y(this, Z, []);
1495
+ const s = t(this, O).template || [];
1482
1496
  Array.from(s).forEach((e) => {
1483
- var r;
1484
- t(this, G).push(((r = e.getBoundingClientRect) == null ? void 0 : r.call(e).height) || 24);
1497
+ var n;
1498
+ t(this, Z).push(((n = e.getBoundingClientRect) == null ? void 0 : n.call(e).height) || 24);
1485
1499
  }), (t(this, L).rawRecords || []).forEach((e) => {
1486
- e.__ng || (e.__ng = t(this, jt).call(this)), e.__ng.height = t(this, G).slice();
1500
+ e.__ng || (e.__ng = t(this, jt).call(this)), e.__ng.height = t(this, Z).slice();
1487
1501
  });
1488
1502
  }, "#initialize"));
1489
1503
  h(this, ht, /* @__PURE__ */ d(() => {
1490
- const s = t(this, D).shadowRoot.querySelector("nine-table-sheets");
1491
- s == null || s.classList.toggle("nodata", this.length === 0), t(this, D).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1504
+ const s = t(this, O).shadowRoot.querySelector("nine-table-sheets");
1505
+ s == null || s.classList.toggle("nodata", this.length === 0), t(this, O).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1492
1506
  e.invalidate();
1493
1507
  });
1494
1508
  }, "#invalidate"));
1495
- E(this, "get", /* @__PURE__ */ d((s, e) => {
1509
+ A(this, "get", /* @__PURE__ */ d((s, e) => {
1496
1510
  var a;
1497
- const r = this.getValidData();
1498
- if (!r || r.length <= 0) return;
1499
- if (s == null) return t(this, wt).call(this, r);
1500
- if (s < 0 || s >= r.length) return null;
1501
- const o = typeof ((a = t(this, D).fields) == null ? void 0 : a.get) == "function" ? t(this, D).fields.get() : [];
1511
+ const n = this.getValidData();
1512
+ if (!n || n.length <= 0) return;
1513
+ if (s == null) return t(this, wt).call(this, n);
1514
+ if (s < 0 || s >= n.length) return null;
1515
+ const r = typeof ((a = t(this, O).fields) == null ? void 0 : a.get) == "function" ? t(this, O).fields.get() : [];
1502
1516
  if (e != null) {
1503
- const n = o.indexOf(e);
1504
- return n >= 0 ? r[s].v[n] : null;
1517
+ const o = r.indexOf(e);
1518
+ return o >= 0 ? n[s].v[o] : null;
1505
1519
  }
1506
- return t(this, wt).call(this, r[s]);
1520
+ return t(this, wt).call(this, n[s]);
1507
1521
  }, "get"));
1508
- E(this, "set", /* @__PURE__ */ d((s) => {
1522
+ A(this, "set", /* @__PURE__ */ d((s) => {
1509
1523
  this.clear(), this.add(s, !1), t(this, ht).call(this);
1510
1524
  }, "set"));
1511
1525
  h(this, jt, /* @__PURE__ */ d(() => ({
1512
1526
  rowState: z.ROW_STATE.EMPTY,
1513
1527
  deleted: !1,
1514
1528
  filtered: !1,
1515
- height: t(this, G).slice(),
1529
+ height: t(this, Z).slice(),
1516
1530
  o: {},
1517
1531
  c: {},
1518
- _: [0, 0, 0, 0, z.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, G).slice(), -1, {}, {}]
1532
+ _: [0, 0, 0, 0, z.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Z).slice(), -1, {}, {}]
1519
1533
  }), "#getDefaultMeta"));
1520
- E(this, "reset", /* @__PURE__ */ d(() => {
1534
+ A(this, "reset", /* @__PURE__ */ d(() => {
1521
1535
  y(this, W, []), y(this, xt, []), t(this, ht).call(this);
1522
1536
  }, "reset"));
1523
- E(this, "clear", /* @__PURE__ */ d(() => {
1537
+ A(this, "clear", /* @__PURE__ */ d(() => {
1524
1538
  var s;
1525
1539
  t(this, L).rawRecords = [], y(this, W, []), y(this, xt, []), (s = t(this, L).viewRecords) != null && s.reset && t(this, L).viewRecords.reset();
1526
1540
  }, "clear"));
1527
1541
  h(this, xe, /* @__PURE__ */ d((s) => {
1528
- var o;
1542
+ var r;
1529
1543
  Array.isArray(s) || (s = [s]);
1530
- const e = typeof ((o = t(this, D).fields) == null ? void 0 : o.get) == "function" ? t(this, D).fields.get() : Object.keys(s[0] || {}), r = [];
1544
+ const e = typeof ((r = t(this, O).fields) == null ? void 0 : r.get) == "function" ? t(this, O).fields.get() : Object.keys(s[0] || {}), n = [];
1531
1545
  return s.forEach((a) => {
1532
- const n = { v: [] };
1546
+ const o = { v: [] };
1533
1547
  e.forEach((i) => {
1534
- n.v.push(a[i] !== void 0 && a[i] !== null ? a[i] : "");
1535
- }), r.push(n);
1536
- }), r;
1548
+ o.v.push(a[i] !== void 0 && a[i] !== null ? a[i] : "");
1549
+ }), n.push(o);
1550
+ }), n;
1537
1551
  }, "#json2Array"));
1538
1552
  h(this, we, /* @__PURE__ */ d((s) => (Array.isArray(s) || (s = [s]), s.forEach((e) => {
1539
1553
  e.__ng = t(this, jt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = z.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1540
1554
  }), s), "#defaultInsert"));
1541
- E(this, "add", /* @__PURE__ */ d((s, e = !0) => {
1555
+ A(this, "add", /* @__PURE__ */ d((s, e = !0) => {
1542
1556
  s === void 0 && (s = {});
1543
- const r = t(this, xe).call(this, s);
1544
- t(this, L).rawRecords = t(this, L).rawRecords.concat(t(this, we).call(this, r)), this.resetRecords();
1545
- const o = this.count() - 1;
1546
- return e || r.forEach((a, n) => {
1547
- const i = t(this, L).rawRecords[o - n];
1557
+ const n = t(this, xe).call(this, s);
1558
+ t(this, L).rawRecords = t(this, L).rawRecords.concat(t(this, we).call(this, n)), this.resetRecords();
1559
+ const r = this.count() - 1;
1560
+ return e || n.forEach((a, o) => {
1561
+ const i = t(this, L).rawRecords[r - o];
1548
1562
  i && (i.__ng.rowState = z.ROW_STATE.EMPTY);
1549
- }), t(this, ht).call(this), o;
1563
+ }), t(this, ht).call(this), r;
1550
1564
  }, "add"));
1551
- E(this, "delete", /* @__PURE__ */ d((s) => {
1565
+ A(this, "delete", /* @__PURE__ */ d((s) => {
1552
1566
  let e = [];
1553
- Array.isArray(s) ? e = s : typeof s > "u" ? e = [t(this, L).host.row.at] : e = [parseInt(s, 10)], e.sort((r, o) => o - r).forEach((r) => {
1554
- if (t(this, W)[r]) {
1555
- const o = t(this, W)[r].__ng.rowid;
1556
- t(this, W)[r].__ng.rowState === z.ROW_STATE.INSERT ? t(this, L).rawRecords = t(this, L).rawRecords.filter((a) => a.__ng.rowid !== o) : t(this, L).rawRecords.forEach((a) => {
1557
- a.__ng.rowid === o && (a.__ng.deleted = !0, a.__ng.rowState = z.ROW_STATE.DELETE);
1567
+ Array.isArray(s) ? e = s : typeof s > "u" ? e = [t(this, L).host.row.at] : e = [parseInt(s, 10)], e.sort((n, r) => r - n).forEach((n) => {
1568
+ if (t(this, W)[n]) {
1569
+ const r = t(this, W)[n].__ng.rowid;
1570
+ t(this, W)[n].__ng.rowState === z.ROW_STATE.INSERT ? t(this, L).rawRecords = t(this, L).rawRecords.filter((a) => a.__ng.rowid !== r) : t(this, L).rawRecords.forEach((a) => {
1571
+ a.__ng.rowid === r && (a.__ng.deleted = !0, a.__ng.rowState = z.ROW_STATE.DELETE);
1558
1572
  });
1559
1573
  }
1560
1574
  }), this.resetRecords(), t(this, ht).call(this);
1561
1575
  }, "delete"));
1562
- E(this, "setValue", /* @__PURE__ */ d((s, e, r) => {
1576
+ A(this, "setValue", /* @__PURE__ */ d((s, e, n) => {
1563
1577
  var c;
1564
1578
  s = parseInt(s, 10);
1565
- const a = (typeof ((c = t(this, D).fields) == null ? void 0 : c.get) == "function" ? t(this, D).fields.get() : []).indexOf(e);
1579
+ const a = (typeof ((c = t(this, O).fields) == null ? void 0 : c.get) == "function" ? t(this, O).fields.get() : []).indexOf(e);
1566
1580
  if (a < 0) return;
1567
- const n = this.getValidData()[s];
1568
- if (!n) return;
1569
- const i = n.v[a];
1570
- i !== r && n.__ng.rowState !== z.ROW_STATE.INSERT && (n.__ng.o.hasOwnProperty(e) || (n.__ng.o[e] = i), n.__ng.rowState = z.ROW_STATE.UPDATE), n.v[a] = r;
1581
+ const o = this.getValidData()[s];
1582
+ if (!o) return;
1583
+ const i = o.v[a];
1584
+ i !== n && o.__ng.rowState !== z.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = i), o.__ng.rowState = z.ROW_STATE.UPDATE), o.v[a] = n;
1571
1585
  }, "setValue"));
1572
- E(this, "resetRecords", /* @__PURE__ */ d(() => {
1586
+ A(this, "resetRecords", /* @__PURE__ */ d(() => {
1573
1587
  y(this, xt, t(this, L).rawRecords.filter((s) => !s.__ng.deleted)), y(this, W, t(this, L).rawRecords.filter((s) => !s.__ng.deleted && !s.__ng.filtered)), t(this, L).rawRecords.forEach((s, e) => {
1574
1588
  s.__ng.rowidx = e;
1575
1589
  }), t(this, W).forEach((s, e) => {
1576
1590
  s.__ng.i = e;
1577
1591
  });
1578
1592
  }, "resetRecords"));
1579
- E(this, "getValidData", /* @__PURE__ */ d(() => (t(this, W).length === 0 && t(this, L).rawRecords.length > 0 && this.resetRecords(), t(this, W)), "getValidData"));
1593
+ A(this, "getValidData", /* @__PURE__ */ d(() => (t(this, W).length === 0 && t(this, L).rawRecords.length > 0 && this.resetRecords(), t(this, W)), "getValidData"));
1580
1594
  h(this, wt, /* @__PURE__ */ d((s) => {
1581
- var n;
1595
+ var o;
1582
1596
  if (!s) return s;
1583
- const e = !Array.isArray(s), r = e ? [s] : s, o = typeof ((n = t(this, D).fields) == null ? void 0 : n.get) == "function" ? t(this, D).fields.get() : [], a = r.filter((i) => !i.__ng.deleted).map((i) => {
1597
+ const e = !Array.isArray(s), n = e ? [s] : s, r = typeof ((o = t(this, O).fields) == null ? void 0 : o.get) == "function" ? t(this, O).fields.get() : [], a = n.filter((i) => !i.__ng.deleted).map((i) => {
1584
1598
  const c = {};
1585
- return o.forEach((l, f) => {
1599
+ return r.forEach((l, f) => {
1586
1600
  c[l] = i.v ? i.v[f] : i[l];
1587
1601
  }), c.__ng = i.__ng, c;
1588
1602
  });
1589
1603
  return e ? a[0] : a;
1590
1604
  }, "#conv"));
1591
- E(this, "count", /* @__PURE__ */ d(() => this.getValidData().length, "count"));
1592
- y(this, D, s), y(this, L, e), t(this, me).call(this);
1605
+ A(this, "count", /* @__PURE__ */ d(() => this.getValidData().length, "count"));
1606
+ y(this, O, s), y(this, L, e), t(this, me).call(this);
1593
1607
  }
1594
1608
  get source() {
1595
1609
  return t(this, wt).call(this, t(this, L).rawRecords);
@@ -1598,7 +1612,7 @@ const z = class z {
1598
1612
  this.clear(), this.add(s, !1);
1599
1613
  }
1600
1614
  get nextId() {
1601
- return ++ws(this, ye)._;
1615
+ return ++vs(this, ye)._;
1602
1616
  }
1603
1617
  get count() {
1604
1618
  return t(this, W).length;
@@ -1610,8 +1624,8 @@ const z = class z {
1610
1624
  return this.length;
1611
1625
  }
1612
1626
  };
1613
- D = new WeakMap(), L = new WeakMap(), W = new WeakMap(), xt = new WeakMap(), ye = new WeakMap(), G = new WeakMap(), me = new WeakMap(), ht = new WeakMap(), jt = new WeakMap(), xe = new WeakMap(), we = new WeakMap(), wt = new WeakMap(), d(z, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1614
- E(z, "ROW_STATE", {
1627
+ O = new WeakMap(), L = new WeakMap(), W = new WeakMap(), xt = new WeakMap(), ye = new WeakMap(), Z = new WeakMap(), me = new WeakMap(), ht = new WeakMap(), jt = new WeakMap(), xe = new WeakMap(), we = new WeakMap(), wt = new WeakMap(), d(z, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1628
+ A(z, "ROW_STATE", {
1615
1629
  EMPTY: "EMPTY",
1616
1630
  NORMAL: "NORMAL",
1617
1631
  INSERT: "INSERT",
@@ -1620,7 +1634,7 @@ E(z, "ROW_STATE", {
1620
1634
  });
1621
1635
  let _e = z;
1622
1636
  var dt;
1623
- const ls = class ls {
1637
+ const cs = class cs {
1624
1638
  constructor(s) {
1625
1639
  h(this, dt);
1626
1640
  y(this, dt, s), this.row = new Ne(this), this.data = new _e(t(this, dt), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
@@ -1629,61 +1643,61 @@ const ls = class ls {
1629
1643
  }, this.setDataSource = (e) => {
1630
1644
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1631
1645
  }, this.getRowState = (e) => {
1632
- var o, a;
1633
- const r = parseInt(e, 10);
1634
- if (!(r >= this.data.count()))
1635
- return (a = (o = this.data.getValidData()[r]) == null ? void 0 : o.__ng) == null ? void 0 : a.rowState;
1646
+ var r, a;
1647
+ const n = parseInt(e, 10);
1648
+ if (!(n >= this.data.count()))
1649
+ return (a = (r = this.data.getValidData()[n]) == null ? void 0 : r.__ng) == null ? void 0 : a.rowState;
1636
1650
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1637
1651
  this.row.at = e;
1638
- }, 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, r) => this.data.get(e, r), this.setColumn = (e, r, o) => {
1639
- e = parseInt(e, 10), this.data.setValue(e, r, o);
1652
+ }, 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, n) => this.data.get(e, n), this.setColumn = (e, n, r) => {
1653
+ e = parseInt(e, 10), this.data.setValue(e, n, r);
1640
1654
  }, this.setDataSource([]);
1641
1655
  }
1642
1656
  };
1643
- dt = new WeakMap(), d(ls, "ngDataManager");
1644
- let Oe = ls;
1657
+ dt = new WeakMap(), d(cs, "ngDataManager");
1658
+ let De = cs;
1645
1659
  var vt, M, Vt, ve;
1646
- const cs = class cs {
1660
+ const hs = class hs {
1647
1661
  // 🎯 이제 { name: string, type: string } 객체들의 배열로 관리합니다.
1648
1662
  constructor(s) {
1649
1663
  h(this, vt);
1650
1664
  h(this, M, []);
1651
- E(this, "add", /* @__PURE__ */ d((s, e = "string") => {
1652
- s.forEach((r) => {
1653
- t(this, M).some((o) => o.name === r) || t(this, M).push({ name: r, type: e });
1665
+ A(this, "add", /* @__PURE__ */ d((s, e = "string") => {
1666
+ s.forEach((n) => {
1667
+ t(this, M).some((r) => r.name === n) || t(this, M).push({ name: n, type: e });
1654
1668
  }), t(this, Vt).call(this);
1655
1669
  }, "add"));
1656
1670
  h(this, Vt, /* @__PURE__ */ d(() => {
1657
1671
  const s = /* @__PURE__ */ new Map();
1658
1672
  t(this, M).forEach((e) => {
1659
1673
  s.set(e.name, e.type);
1660
- }), y(this, M, Array.from(s, ([e, r]) => ({ name: e, type: r }))), y(this, M, t(this, M).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, M).sort((e, r) => e.name.length < r.name.length ? 1 : -1);
1674
+ }), y(this, M, Array.from(s, ([e, n]) => ({ name: e, type: n }))), y(this, M, t(this, M).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, M).sort((e, n) => e.name.length < n.name.length ? 1 : -1);
1661
1675
  }, "#adjust"));
1662
1676
  h(this, ve, /* @__PURE__ */ d(() => {
1663
1677
  y(this, M, []), q.log(t(this, vt).querySelectorAll("table"));
1664
1678
  const s = Array.from(t(this, vt).querySelectorAll("table"));
1665
1679
  if (!(!s || s.length === 0)) {
1666
1680
  for (const e of s)
1667
- q.log(e), $("[data-bind]", e).each((r, o) => {
1668
- const a = o.dataset.bind, n = o.getAttribute("data-type") || "string";
1669
- a && t(this, M).push({ name: a, type: n });
1670
- }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((r) => {
1671
- $(`[${r}]`, e).each((o, a) => {
1672
- var n = a.getAttribute(r);
1673
- if (n.indexOf("data.") < 0) {
1674
- const i = n.search(/[(]/g);
1681
+ q.log(e), $("[data-bind]", e).each((n, r) => {
1682
+ const a = r.dataset.bind, o = r.getAttribute("data-type") || "string";
1683
+ a && t(this, M).push({ name: a, type: o });
1684
+ }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((n) => {
1685
+ $(`[${n}]`, e).each((r, a) => {
1686
+ var o = a.getAttribute(n);
1687
+ if (o.indexOf("data.") < 0) {
1688
+ const i = o.search(/[(]/g);
1675
1689
  if (i > 0)
1676
1690
  try {
1677
- n = String(window[n.substring(0, i).trim()]);
1691
+ o = String(window[o.substring(0, i).trim()]);
1678
1692
  } catch {
1679
- n = "";
1693
+ o = "";
1680
1694
  }
1681
1695
  }
1682
- n.split("data.").forEach((i) => {
1696
+ o.split("data.").forEach((i) => {
1683
1697
  if (i.trim() != "") {
1684
1698
  const c = i.search(/[^_A-Za-z0-9]/g);
1685
1699
  let l = "";
1686
- c >= 0 ? l = i.substring(0, c) : n.startsWith("data.") && (l = i.replace("data.", "")), l && t(this, M).push({ name: l, type: "string" });
1700
+ c >= 0 ? l = i.substring(0, c) : o.startsWith("data.") && (l = i.replace("data.", "")), l && t(this, M).push({ name: l, type: "string" });
1687
1701
  }
1688
1702
  });
1689
1703
  });
@@ -1703,7 +1717,7 @@ const cs = class cs {
1703
1717
  }
1704
1718
  // 🎯 특정 필드의 데이터 타입 조회
1705
1719
  getType(s) {
1706
- const e = t(this, M).find((r) => r.name === s);
1720
+ const e = t(this, M).find((n) => n.name === s);
1707
1721
  return e ? e.type : "string";
1708
1722
  }
1709
1723
  indexOf(s) {
@@ -1713,19 +1727,19 @@ const cs = class cs {
1713
1727
  return t(this, M).some((e) => e.name === s);
1714
1728
  }
1715
1729
  };
1716
- vt = new WeakMap(), M = new WeakMap(), Vt = new WeakMap(), ve = new WeakMap(), d(cs, "ngFields");
1717
- let De = cs;
1730
+ vt = new WeakMap(), M = new WeakMap(), Vt = new WeakMap(), ve = new WeakMap(), d(hs, "ngFields");
1731
+ let Oe = hs;
1718
1732
  var ft, Se, Re;
1719
- const hs = class hs extends HTMLElement {
1733
+ const ds = class ds extends HTMLElement {
1720
1734
  constructor() {
1721
1735
  super();
1722
1736
  //#created = false;
1723
1737
  h(this, ft);
1724
1738
  h(this, Se);
1725
1739
  h(this, Re, /* @__PURE__ */ d(() => {
1726
- this.fields = new De(this), y(this, Se, new $e(this)), q.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1740
+ this.fields = new Oe(this), y(this, Se, new $e(this)), q.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1727
1741
  }, "#init"));
1728
- this.attachShadow({ mode: "open" }), y(this, ft, new Oe(this));
1742
+ this.attachShadow({ mode: "open" }), y(this, ft, new De(this));
1729
1743
  }
1730
1744
  connectedCallback() {
1731
1745
  t(this, Re).call(this);
@@ -1746,10 +1760,10 @@ const hs = class hs extends HTMLElement {
1746
1760
  return t(this, ft);
1747
1761
  }
1748
1762
  };
1749
- ft = new WeakMap(), Se = new WeakMap(), Re = new WeakMap(), d(hs, "NineTable");
1750
- let We = hs;
1763
+ ft = new WeakMap(), Se = new WeakMap(), Re = new WeakMap(), d(ds, "NineTable");
1764
+ let We = ds;
1751
1765
  customElements.get("nine-table") || customElements.define("nine-table", We);
1752
- const Tt = class Tt extends HTMLElement {
1766
+ const Ct = class Ct extends HTMLElement {
1753
1767
  // 👈 커스텀 스타일용 캐시 추가
1754
1768
  constructor() {
1755
1769
  super();
@@ -1760,31 +1774,31 @@ const Tt = class Tt extends HTMLElement {
1760
1774
  connectedCallback() {
1761
1775
  }
1762
1776
  };
1763
- d(Tt, "BasicCellElement"), E(Tt, "_styleCache", /* @__PURE__ */ new Map()), E(Tt, "_customStyleCache", /* @__PURE__ */ new Map());
1764
- let ze = Tt;
1765
- var I, Ut, w, Ye, Xe, Ke, Ge, Ze;
1766
- const ds = class ds extends ze {
1777
+ d(Ct, "BasicCellElement"), A(Ct, "_styleCache", /* @__PURE__ */ new Map()), A(Ct, "_customStyleCache", /* @__PURE__ */ new Map());
1778
+ let ze = Ct;
1779
+ var I, Ut, w, Xe, Ke, Ze, Ge, Je;
1780
+ const fs = class fs extends ze {
1767
1781
  constructor() {
1768
1782
  super();
1769
1783
  h(this, I);
1770
1784
  h(this, Ut);
1771
1785
  h(this, w);
1772
- h(this, Ye);
1773
1786
  h(this, Xe);
1774
1787
  h(this, Ke);
1788
+ h(this, Ze);
1775
1789
  h(this, Ge);
1776
- E(this, "getDisplayText", /* @__PURE__ */ d((e) => {
1790
+ A(this, "getDisplayText", /* @__PURE__ */ d((e) => {
1777
1791
  if (t(this, w))
1778
1792
  if (t(this, w).closest("tbody")) {
1779
- const r = t(this, w).closest("tr").data, o = parseInt(t(this, w).dataset.row);
1780
- if (!r) return "";
1793
+ const n = t(this, w).closest("tr").data, r = parseInt(t(this, w).dataset.row);
1794
+ if (!n) return "";
1781
1795
  if (ninegrid.isNull(t(this, w).dataset.expr)) {
1782
1796
  if (!ninegrid.isNull(t(this, w).dataset.bind))
1783
- return r[t(this, w).dataset.bind] || ninegrid.nvl(e, "");
1797
+ return n[t(this, w).dataset.bind] || ninegrid.nvl(e, "");
1784
1798
  } else try {
1785
- return this.getExprValue(t(this, w).dataset.expr, r, o, t(this, w));
1799
+ return this.getExprValue(t(this, w).dataset.expr, n, r, t(this, w));
1786
1800
  } catch {
1787
- console.error(t(this, w).dataset.expr, r, t(this, w).dataset.row);
1801
+ console.error(t(this, w).dataset.expr, n, t(this, w).dataset.row);
1788
1802
  }
1789
1803
  return ninegrid.nvl(e, "");
1790
1804
  } else
@@ -1793,23 +1807,23 @@ const ds = class ds extends ze {
1793
1807
  } catch {
1794
1808
  }
1795
1809
  }, "getDisplayText"));
1796
- h(this, Ze, /* @__PURE__ */ d(() => {
1810
+ h(this, Je, /* @__PURE__ */ d(() => {
1797
1811
  if (!(!t(this, I) || !t(this, I).template || !t(this, w).closest("tbody.bindable"))) {
1798
1812
  var e = ninegrid.j.querySelectorAll(t(this, w)).attr("suppress");
1799
1813
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1800
- var r = t(this, w).closest("tr"), o = [];
1801
- $("th,td", r).each((x, C) => {
1802
- var R = ninegrid.j.querySelectorAll(C).attr("suppress");
1803
- R && C.dataset.row && (R = parseInt(R), !isNaN(R) && R <= e && o.push(R));
1804
- }), o.sort();
1814
+ var n = t(this, w).closest("tr"), r = [];
1815
+ $("th,td", n).each((x, T) => {
1816
+ var E = ninegrid.j.querySelectorAll(T).attr("suppress");
1817
+ E && T.dataset.row && (E = parseInt(E), !isNaN(E) && E <= e && r.push(E));
1818
+ }), r.sort();
1805
1819
  var a = !1;
1806
- if (parseInt(r.sectionRowIndex / t(this, I).template.length) > 0)
1807
- for (var n of o) {
1808
- if (n > e) break;
1820
+ if (parseInt(n.sectionRowIndex / t(this, I).template.length) > 0)
1821
+ for (var o of r) {
1822
+ if (o > e) break;
1809
1823
  var i = parseInt(t(this, w).dataset.row), c = i - 1, l = t(this, w).closest("tr").data, f = t(this, I).data.get(c);
1810
1824
  t(this, w).dataset.matrixRow;
1811
- var u = t(this, I).body.querySelector(`tbody.bindable [suppress="${n}"][data-matrix-row="${t(this, w).dataset.matrixRow}"]`), b = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, i) : l[u.dataset.bind], g = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, c) : f[u.dataset.bind];
1812
- if (b != g) {
1825
+ var g = t(this, I).body.querySelector(`tbody.bindable [suppress="${o}"][data-matrix-row="${t(this, w).dataset.matrixRow}"]`), b = g.dataset.expr ? this.getExprValue(g.dataset.expr, l, i) : l[g.dataset.bind], u = g.dataset.expr ? this.getExprValue(g.dataset.expr, f, c) : f[g.dataset.bind];
1826
+ if (b != u) {
1813
1827
  a = !0;
1814
1828
  break;
1815
1829
  }
@@ -1822,12 +1836,12 @@ const ds = class ds extends ze {
1822
1836
  }
1823
1837
  }
1824
1838
  }, "#resetSuppress"));
1825
- E(this, "getExprValue", /* @__PURE__ */ d((e, r, o, a) => {
1839
+ A(this, "getExprValue", /* @__PURE__ */ d((e, n, r, a) => {
1826
1840
  if (typeof e < "u")
1827
1841
  try {
1828
- o = parseInt(o);
1829
- const n = e.replace("()", "");
1830
- return t(this, I)[n] ? t(this, I)[n].call(this, r, o, t(this, w)) : t(this, I).exprFunction(e).call(this, r, o, t(this, I).data);
1842
+ r = parseInt(r);
1843
+ const o = e.replace("()", "");
1844
+ return t(this, I)[o] ? t(this, I)[o].call(this, n, r, t(this, w)) : t(this, I).exprFunction(e).call(this, n, r, t(this, I).data);
1831
1845
  } catch {
1832
1846
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1833
1847
  }
@@ -1843,9 +1857,9 @@ const ds = class ds extends ze {
1843
1857
  return e ?? "";
1844
1858
  }
1845
1859
  set value(e) {
1846
- var r = parseInt(t(this, w).dataset.row);
1847
- const o = this.getAttribute("update-row-state") != "false";
1848
- r < 0 ? t(this, I).data.setValueNF(parseInt(t(this, w).dataset.index), t(this, w).dataset.bind, e, o) : t(this, I).data.setValue(r, t(this, w).dataset.bind, e, o);
1860
+ var n = parseInt(t(this, w).dataset.row);
1861
+ const r = this.getAttribute("update-row-state") != "false";
1862
+ n < 0 ? t(this, I).data.setValueNF(parseInt(t(this, w).dataset.index), t(this, w).dataset.bind, e, r) : t(this, I).data.setValue(n, t(this, w).dataset.bind, e, r);
1849
1863
  }
1850
1864
  get row() {
1851
1865
  return parseInt(t(this, w).dataset.row);
@@ -1858,9 +1872,9 @@ const ds = class ds extends ze {
1858
1872
  return parseInt(t(this, w).dataset.row), t(this, Ut).data[e];
1859
1873
  }
1860
1874
  };
1861
- I = new WeakMap(), Ut = new WeakMap(), w = new WeakMap(), Ye = new WeakMap(), Xe = new WeakMap(), Ke = new WeakMap(), Ge = new WeakMap(), Ze = new WeakMap(), d(ds, "CellElement");
1862
- let Be = ds;
1863
- const fs = class fs extends Be {
1875
+ I = new WeakMap(), Ut = new WeakMap(), w = new WeakMap(), Xe = new WeakMap(), Ke = new WeakMap(), Ze = new WeakMap(), Ge = new WeakMap(), Je = new WeakMap(), d(fs, "CellElement");
1876
+ let Be = fs;
1877
+ const us = class us extends Be {
1864
1878
  constructor() {
1865
1879
  super();
1866
1880
  }
@@ -1871,10 +1885,10 @@ const fs = class fs extends Be {
1871
1885
  return super.refresh();
1872
1886
  }
1873
1887
  };
1874
- d(fs, "EditableCellElement");
1875
- let Pe = fs;
1876
- var Yt, ut, St, Rt, Ae, Z, Je;
1877
- const us = class us extends Pe {
1888
+ d(us, "EditableCellElement");
1889
+ let Pe = us;
1890
+ var Yt, ut, St, Rt, Ae, G, Qe;
1891
+ const gs = class gs extends Pe {
1878
1892
  constructor() {
1879
1893
  super();
1880
1894
  h(this, Yt);
@@ -1882,8 +1896,8 @@ const us = class us extends Pe {
1882
1896
  h(this, St);
1883
1897
  h(this, Rt);
1884
1898
  h(this, Ae);
1885
- h(this, Z);
1886
- E(this, "refresh", /* @__PURE__ */ d(() => {
1899
+ h(this, G);
1900
+ A(this, "refresh", /* @__PURE__ */ d(() => {
1887
1901
  const e = super.refresh();
1888
1902
  t(this, Yt).value = e;
1889
1903
  }, "refresh"));
@@ -1917,26 +1931,26 @@ const us = class us extends Pe {
1917
1931
  if (!v) this.reset();
1918
1932
  };
1919
1933
  */
1920
- h(this, Je, /* @__PURE__ */ d((e) => {
1934
+ h(this, Qe, /* @__PURE__ */ d((e) => {
1921
1935
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1922
1936
  if (t(this, ut) == "number") {
1923
1937
  let a = [];
1924
- if (t(this, Z) && Number(t(this, Z)) > 0 && a.push("."), t(this, Rt) && Number(t(this, Rt)) >= 0 && a.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !a.includes(e.key) && e.preventDefault(), t(this, Z) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1925
- var r = e.target.value, o = r.indexOf(".");
1926
- if (o >= 0) {
1927
- var r = r.substr(o + 1, r.length);
1928
- r.length >= Number(t(this, Z)) && e.preventDefault();
1938
+ if (t(this, G) && Number(t(this, G)) > 0 && a.push("."), t(this, Rt) && Number(t(this, Rt)) >= 0 && a.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !a.includes(e.key) && e.preventDefault(), t(this, G) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1939
+ var n = e.target.value, r = n.indexOf(".");
1940
+ if (r >= 0) {
1941
+ var n = n.substr(r + 1, n.length);
1942
+ n.length >= Number(t(this, G)) && e.preventDefault();
1929
1943
  }
1930
1944
  }
1931
1945
  }
1932
1946
  t(this, St) && ninegrid.getByteLength(e.target.value) >= Number(t(this, St)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1933
1947
  }
1934
1948
  }, "#onKeyDown"));
1935
- if (this.applyBaseStyle(), y(this, ut, this.getAttribute("type") || "text"), y(this, St, this.getAttribute("maxbyte")), y(this, Rt, this.getAttribute("min")), y(this, Ae, this.getAttribute("max")), y(this, Z, this.getAttribute("scale")), !["text", "number"].includes(t(this, ut))) throw `invalid type : ${t(this, ut)}`;
1949
+ if (this.applyBaseStyle(), y(this, ut, this.getAttribute("type") || "text"), y(this, St, this.getAttribute("maxbyte")), y(this, Rt, this.getAttribute("min")), y(this, Ae, this.getAttribute("max")), y(this, G, this.getAttribute("scale")), !["text", "number"].includes(t(this, ut))) throw `invalid type : ${t(this, ut)}`;
1936
1950
  }
1937
1951
  connectedCallback() {
1938
- for (var e = [], r = 0; r < this.attributes.length; r++)
1939
- ["type", "maxlength", "maxbyte", "min", "max", "step", "scale", "text-align"].includes(this.attributes[r].name) && e.push(`${this.attributes[r].name}="${this.attributes[r].value}"`);
1952
+ for (var e = [], n = 0; n < this.attributes.length; n++)
1953
+ ["type", "maxlength", "maxbyte", "min", "max", "step", "scale", "text-align"].includes(this.attributes[n].name) && e.push(`${this.attributes[n].name}="${this.attributes[n].value}"`);
1940
1954
  this.innerHTML = `
1941
1955
  <input type="text"
1942
1956
  ${e.join(" ")}
@@ -1945,8 +1959,8 @@ const us = class us extends Pe {
1945
1959
  `, super.connectedCallback(), y(this, Yt, this.querySelector("input"));
1946
1960
  }
1947
1961
  };
1948
- Yt = new WeakMap(), ut = new WeakMap(), St = new WeakMap(), Rt = new WeakMap(), Ae = new WeakMap(), Z = new WeakMap(), Je = new WeakMap(), d(us, "CellInputText");
1949
- let Fe = us;
1962
+ Yt = new WeakMap(), ut = new WeakMap(), St = new WeakMap(), Rt = new WeakMap(), Ae = new WeakMap(), G = new WeakMap(), Qe = new WeakMap(), d(gs, "CellInputText");
1963
+ let Fe = gs;
1950
1964
  customElements.get("cell-input-text");
1951
1965
  customElements.get("cell-input") || customElements.define("cell-input", Fe);
1952
1966
  //# sourceMappingURL=nine-table.js.map