@ninebone/table 0.0.839 → 0.0.841

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