@ninebone/table 0.0.771 → 0.0.773

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,50 +1,50 @@
1
- var fs = Object.defineProperty;
2
- var us = (T) => {
1
+ var bs = Object.defineProperty;
2
+ var ps = (T) => {
3
3
  throw TypeError(T);
4
4
  };
5
- var ys = (T, s, e) => s in T ? fs(T, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[s] = e;
6
- var h = (T, s) => fs(T, "name", { value: s, configurable: !0 });
7
- var q = (T, s, e) => ys(T, typeof s != "symbol" ? s + "" : s, e), xe = (T, s, e) => s.has(T) || us("Cannot " + e);
8
- var t = (T, s, e) => (xe(T, s, "read from private field"), e ? e.call(T) : s.get(T)), d = (T, s, e) => s.has(T) ? us("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(T) : s.set(T, e), p = (T, s, e, n) => (xe(T, s, "write to private field"), n ? n.call(T, e) : s.set(T, e), e), Q = (T, s, e) => (xe(T, s, "access private method"), e);
9
- var gs = (T, s, e, n) => ({
5
+ var ws = (T, n, e) => n in T ? bs(T, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[n] = e;
6
+ var h = (T, n) => bs(T, "name", { value: n, configurable: !0 });
7
+ var q = (T, n, e) => ws(T, typeof n != "symbol" ? n + "" : n, e), Se = (T, n, e) => n.has(T) || ps("Cannot " + e);
8
+ var t = (T, n, e) => (Se(T, n, "read from private field"), e ? e.call(T) : n.get(T)), f = (T, n, e) => n.has(T) ? ps("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(T) : n.set(T, e), p = (T, n, e, s) => (Se(T, n, "write to private field"), s ? s.call(T, e) : n.set(T, e), e), Z = (T, n, e) => (Se(T, n, "access private method"), e);
9
+ var ys = (T, n, e, s) => ({
10
10
  set _(r) {
11
- p(T, s, r, e);
11
+ p(T, n, r, e);
12
12
  },
13
13
  get _() {
14
- return t(T, s, n);
14
+ return t(T, n, s);
15
15
  }
16
16
  });
17
- import { trace as ms } from "@ninebone/util";
18
- const Xe = class Xe extends ms.constructor {
17
+ import { trace as vs } from "@ninebone/util";
18
+ const Ke = class Ke extends vs.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- h(Xe, "Trace");
24
- let we = Xe;
25
- const S = new we();
26
- var B, X, E, tt, et, st, Yt, nt, Vt;
27
- const Ke = class Ke extends HTMLElement {
23
+ h(Ke, "Trace");
24
+ let Ae = Ke;
25
+ const S = new Ae();
26
+ var B, U, E, J, Q, tt, Xt, et, Gt;
27
+ const Ze = class Ze extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- d(this, B);
31
- d(this, X, !1);
32
- d(this, E);
33
- d(this, tt);
34
- d(this, et);
35
- d(this, st);
36
- d(this, Yt, /* @__PURE__ */ h(() => {
30
+ f(this, B);
31
+ f(this, U, !1);
32
+ f(this, E);
33
+ f(this, J);
34
+ f(this, Q);
35
+ f(this, tt);
36
+ f(this, Xt, /* @__PURE__ */ h(() => {
37
37
  if (!t(this, B)) return;
38
38
  const e = t(this, B).querySelector(".ng-container-body .ng-part-body");
39
- e && (p(this, st, new ResizeObserver(() => {
39
+ e && (p(this, tt, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, st).observe(e));
41
+ })), t(this, tt).observe(e));
42
42
  }, "#observeResize"));
43
43
  q(this, "refresh", /* @__PURE__ */ h(() => {
44
- if (!t(this, B) || !t(this, E) || t(this, X)) return;
45
- const e = t(this, E).container, n = e.querySelector("table");
46
- if (!n) return;
47
- const r = t(this, E).track, o = t(this, E).thumb, i = t(this, B).querySelector(".ng-container-bottom"), a = e.clientWidth, c = n.scrollWidth;
44
+ if (!t(this, B) || !t(this, E) || t(this, U)) return;
45
+ const e = t(this, E).container, s = e.querySelector("table");
46
+ if (!s) return;
47
+ const r = t(this, E).track, o = t(this, E).thumb, i = t(this, B).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
48
48
  if (a !== 0 && c > a)
49
49
  i && (i.style.display = "flex");
50
50
  else {
@@ -53,41 +53,41 @@ const Ke = class Ke extends HTMLElement {
53
53
  }
54
54
  const l = r.clientWidth;
55
55
  if (l <= 0) return;
56
- const u = Math.max(Math.min(l * (a / c), l), 20);
57
- o.style.width = `${u}px`;
58
- const f = e.scrollLeft, b = c - a;
56
+ const d = Math.max(Math.min(l * (a / c), l), 20);
57
+ o.style.width = `${d}px`;
58
+ const u = e.scrollLeft, b = c - a;
59
59
  let g = 0;
60
- b > 0 && (g = parseInt(f / b * (l - u), 10)), g < 0 && (g = 0);
61
- const y = l - u;
60
+ b > 0 && (g = parseInt(u / b * (l - d), 10)), g < 0 && (g = 0);
61
+ const y = l - d;
62
62
  g > y && (g = y), o.style.left = `${g}px`, t(this, E).left.disabled = g === 0, t(this, E).right.disabled = g >= y - 1;
63
63
  }, "refresh"));
64
- d(this, nt, /* @__PURE__ */ h((e) => {
64
+ f(this, et, /* @__PURE__ */ h((e) => {
65
65
  if (!t(this, E)) return !1;
66
- const n = t(this, E).container, r = n.querySelector("table");
66
+ const s = t(this, E).container, r = s.querySelector("table");
67
67
  if (!r) return !1;
68
68
  const o = t(this, E).track.getBoundingClientRect(), i = t(this, E).thumb.clientWidth;
69
69
  let a = e;
70
70
  a < 0 && (a = 0);
71
71
  const c = o.width - i;
72
72
  a > c && (a = c), a = parseInt(a, 10), t(this, E).thumb.style.left = `${a}px`, t(this, E).left.disabled = a === 0, t(this, E).right.disabled = a >= c - 1;
73
- const l = n.clientWidth, f = r.scrollWidth - l;
74
- return c > 0 && f > 0 && (n.scrollLeft = a / c * f), a > 0 && a < c - 1;
73
+ const l = s.clientWidth, u = r.scrollWidth - l;
74
+ return c > 0 && u > 0 && (s.scrollLeft = a / c * u), a > 0 && a < c - 1;
75
75
  }, "#thumbMoveTo"));
76
- d(this, Vt, /* @__PURE__ */ h(() => {
76
+ f(this, Gt, /* @__PURE__ */ h(() => {
77
77
  const e = /* @__PURE__ */ h((r) => {
78
- clearInterval(t(this, tt)), clearInterval(t(this, et));
78
+ clearInterval(t(this, J)), clearInterval(t(this, Q));
79
79
  const o = parseInt(t(this, E).thumb.style.left || 0, 10);
80
- t(this, nt).call(this, o + r), p(this, tt, setInterval(() => {
81
- clearInterval(t(this, tt)), p(this, et, setInterval(() => {
80
+ t(this, et).call(this, o + r), p(this, J, setInterval(() => {
81
+ clearInterval(t(this, J)), p(this, Q, setInterval(() => {
82
82
  const i = parseInt(t(this, E).thumb.style.left || 0, 10);
83
- t(this, nt).call(this, i + r) || clearInterval(t(this, et));
83
+ t(this, et).call(this, i + r) || clearInterval(t(this, Q));
84
84
  }, 50));
85
85
  }, 500));
86
- }, "delayScroll"), n = /* @__PURE__ */ h(() => {
87
- clearInterval(t(this, tt)), clearInterval(t(this, et));
86
+ }, "delayScroll"), s = /* @__PURE__ */ h(() => {
87
+ clearInterval(t(this, J)), clearInterval(t(this, Q));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((r) => {
90
- t(this, E).left.addEventListener(r, n), t(this, E).right.addEventListener(r, n), t(this, E).track.addEventListener(r, n);
90
+ t(this, E).left.addEventListener(r, s), t(this, E).right.addEventListener(r, s), t(this, E).track.addEventListener(r, s);
91
91
  }), t(this, E).left.addEventListener("mousedown", (r) => {
92
92
  r.button === 0 && e(-20);
93
93
  }), t(this, E).right.addEventListener("mousedown", (r) => {
@@ -96,16 +96,16 @@ const Ke = class Ke extends HTMLElement {
96
96
  if (r.button !== 0) return;
97
97
  r.preventDefault();
98
98
  const o = t(this, E).track.getBoundingClientRect(), i = t(this, E).thumb.clientWidth;
99
- t(this, nt).call(this, r.clientX - o.left - i / 2);
99
+ t(this, et).call(this, r.clientX - o.left - i / 2);
100
100
  }), t(this, E).thumb.addEventListener("mousedown", (r) => {
101
101
  if (r.button !== 0) return;
102
- r.stopPropagation(), r.preventDefault(), p(this, X, !0), this.shiftX = r.clientX - t(this, E).thumb.getBoundingClientRect().left;
102
+ r.stopPropagation(), r.preventDefault(), p(this, U, !0), this.shiftX = r.clientX - t(this, E).thumb.getBoundingClientRect().left;
103
103
  const o = /* @__PURE__ */ h((a) => {
104
- if (!t(this, X)) return;
104
+ if (!t(this, U)) return;
105
105
  const c = t(this, E).track.getBoundingClientRect();
106
- t(this, nt).call(this, a.clientX - c.left - this.shiftX);
106
+ t(this, et).call(this, a.clientX - c.left - this.shiftX);
107
107
  }, "onMouseMove"), i = /* @__PURE__ */ h(() => {
108
- p(this, X, !1), n(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
108
+ p(this, U, !1), s(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
109
109
  }, "onMouseUp");
110
110
  document.addEventListener("mousemove", o), document.addEventListener("mouseup", i);
111
111
  });
@@ -177,85 +177,85 @@ const Ke = class Ke extends HTMLElement {
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
179
  const e = /* @__PURE__ */ h(() => {
180
- const n = t(this, B).querySelector(".ng-container-body .ng-part-body");
181
- if (!n) {
180
+ const s = t(this, B).querySelector(".ng-container-body .ng-part-body");
181
+ if (!s) {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
185
  p(this, E, {
186
- container: n,
186
+ container: s,
187
187
  track: this.querySelector(".ng-scroll-track"),
188
188
  thumb: this.querySelector(".ng-scroll-thumb"),
189
189
  left: this.querySelector(".ng-scroll-left"),
190
190
  right: this.querySelector(".ng-scroll-right")
191
- }), n.addEventListener("scroll", () => {
192
- t(this, X) || this.refresh();
193
- }), t(this, Vt).call(this), t(this, Yt).call(this), this.refresh();
191
+ }), s.addEventListener("scroll", () => {
192
+ t(this, U) || this.refresh();
193
+ }), t(this, Gt).call(this), t(this, Xt).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
197
197
  disconnectedCallback() {
198
- t(this, st) && t(this, st).disconnect();
198
+ t(this, tt) && t(this, tt).disconnect();
199
199
  }
200
200
  };
201
- B = new WeakMap(), X = new WeakMap(), E = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Yt = new WeakMap(), nt = new WeakMap(), Vt = new WeakMap(), h(Ke, "NineTableHScrollBar");
202
- let ve = Ke;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ve);
204
- var rt, ot, bt, k, Tt, Ct, Ut;
205
- const Ge = class Ge extends HTMLElement {
201
+ B = new WeakMap(), U = new WeakMap(), E = new WeakMap(), J = new WeakMap(), Q = new WeakMap(), tt = new WeakMap(), Xt = new WeakMap(), et = new WeakMap(), Gt = new WeakMap(), h(Ze, "NineTableHScrollBar");
202
+ let Re = Ze;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Re);
204
+ var st, nt, gt, k, qt, Tt, Kt;
205
+ const Je = class Je extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- d(this, rt);
209
- d(this, ot);
210
- d(this, bt, !1);
211
- d(this, k);
212
- d(this, Tt, 0);
213
- d(this, Ct, 0);
208
+ f(this, st);
209
+ f(this, nt);
210
+ f(this, gt, !1);
211
+ f(this, k);
212
+ f(this, qt, 0);
213
+ f(this, Tt, 0);
214
214
  q(this, "refresh", /* @__PURE__ */ h(() => {
215
- if (S.log("vscrollbar.refresh"), !t(this, rt) || !t(this, k)) return;
216
- const e = t(this, k).container, n = t(this, k).track, r = t(this, k).thumb, o = e.clientHeight, i = t(this, rt).data.length, a = t(this, ot).getRowHeight(), c = i * a;
215
+ if (S.log("vscrollbar.refresh"), !t(this, st) || !t(this, k)) return;
216
+ const e = t(this, k).container, s = t(this, k).track, r = t(this, k).thumb, o = e.clientHeight, i = t(this, st).data.length, a = t(this, nt).getRowHeight(), c = i * a;
217
217
  if (c <= o || i === 0) {
218
218
  this.style.display = "none";
219
219
  return;
220
220
  } else
221
221
  this.style.display = "flex";
222
- const l = n.clientHeight;
222
+ const l = s.clientHeight;
223
223
  if (l <= 0) return;
224
- const u = Math.max(Math.min(l * (o / c), l), 20);
225
- r.style.height = `${u}px`;
226
- const f = e.scrollTop, b = Math.max(c - o, 1);
227
- S.log(e, f, b);
224
+ const d = Math.max(Math.min(l * (o / c), l), 20);
225
+ r.style.height = `${d}px`;
226
+ const u = e.scrollTop, b = Math.max(c - o, 1);
227
+ S.log(e, u, b);
228
228
  let g = 0;
229
- b > 0 && (g = f / b * (l - u));
230
- const y = l - u;
231
- g < 0 && (g = 0), g > y && (g = y), r.style.top = `${g}px`, t(this, k).top.disabled = f <= 0, t(this, k).bottom.disabled = f >= b - 1;
229
+ b > 0 && (g = u / b * (l - d));
230
+ const y = l - d;
231
+ g < 0 && (g = 0), g > y && (g = y), r.style.top = `${g}px`, t(this, k).top.disabled = u <= 0, t(this, k).bottom.disabled = u >= b - 1;
232
232
  }, "refresh"));
233
- d(this, Ut, /* @__PURE__ */ h(() => {
233
+ f(this, Kt, /* @__PURE__ */ h(() => {
234
234
  S.log("nine-table-vscrollbar.#init");
235
- const e = t(this, k).container, n = /* @__PURE__ */ h(() => {
236
- const o = (t(this, rt).data.get() || []).length, i = t(this, ot).getRowHeight();
235
+ const e = t(this, k).container, s = /* @__PURE__ */ h(() => {
236
+ const o = (t(this, st).data.get() || []).length, i = t(this, nt).getRowHeight();
237
237
  return o * i;
238
238
  }, "getContentHeight");
239
239
  t(this, k).thumb.addEventListener("mousedown", (r) => {
240
240
  if (r.button !== 0) return;
241
- r.stopPropagation(), r.preventDefault(), p(this, bt, !0), p(this, Tt, r.clientY), p(this, Ct, e.scrollTop);
241
+ r.stopPropagation(), r.preventDefault(), p(this, gt, !0), p(this, qt, r.clientY), p(this, Tt, e.scrollTop);
242
242
  const o = /* @__PURE__ */ h((a) => {
243
- if (!t(this, bt)) return;
244
- const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, f = c.height - l, b = a.clientY - t(this, Tt), g = e.clientHeight, y = n(), w = Math.max(y - g, 1);
245
- if (f > 0 && w > 0) {
246
- const v = b / f * w;
247
- let m = t(this, Ct) + v;
243
+ if (!t(this, gt)) return;
244
+ const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, u = c.height - l, b = a.clientY - t(this, qt), g = e.clientHeight, y = s(), w = Math.max(y - g, 1);
245
+ if (u > 0 && w > 0) {
246
+ const v = b / u * w;
247
+ let m = t(this, Tt) + v;
248
248
  const C = Math.max(0, y - g);
249
249
  m < 0 && (m = 0), m > C && (m = C), e.scrollTop = m;
250
250
  }
251
251
  this.refresh();
252
252
  }, "onMouseMove"), i = /* @__PURE__ */ h(() => {
253
- p(this, bt, !1), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
253
+ p(this, gt, !1), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
254
254
  }, "onMouseUp");
255
255
  document.addEventListener("mousemove", o), document.addEventListener("mouseup", i);
256
256
  }), t(this, k).track.addEventListener("mousedown", (r) => {
257
257
  if (r.button !== 0 || r.target === t(this, k).thumb) return;
258
- const o = t(this, k).track.getBoundingClientRect(), i = t(this, k).thumb.clientHeight, a = r.clientY - o.top - i / 2, l = o.height - i, u = e.clientHeight, f = n(), b = Math.max(f - u, 1);
258
+ const o = t(this, k).track.getBoundingClientRect(), i = t(this, k).thumb.clientHeight, a = r.clientY - o.top - i / 2, l = o.height - i, d = e.clientHeight, u = s(), b = Math.max(u - d, 1);
259
259
  if (l > 0 && b > 0) {
260
260
  const g = Math.max(0, Math.min(1, a / l));
261
261
  e.scrollTop = g * b;
@@ -269,7 +269,7 @@ const Ge = class Ge extends HTMLElement {
269
269
  }, "#init"));
270
270
  }
271
271
  connectedCallback() {
272
- p(this, rt, this.getRootNode().host), p(this, ot, this.closest("nine-table-sheet")), this.innerHTML = `
272
+ p(this, st, this.getRootNode().host), p(this, nt, this.closest("nine-table-sheet")), this.innerHTML = `
273
273
  <style>
274
274
  nine-table-vscrollbar {
275
275
  display: flex;
@@ -334,48 +334,48 @@ const Ge = class Ge extends HTMLElement {
334
334
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
335
335
  `;
336
336
  const e = /* @__PURE__ */ h(() => {
337
- const n = t(this, ot).querySelector(".ng-container-body .ng-part-body");
338
- if (!n) {
337
+ const s = t(this, nt).querySelector(".ng-container-body .ng-part-body");
338
+ if (!s) {
339
339
  setTimeout(e, 10);
340
340
  return;
341
341
  }
342
342
  p(this, k, {
343
- container: n,
343
+ container: s,
344
344
  track: this.querySelector(".ng-scroll-track"),
345
345
  thumb: this.querySelector(".ng-scroll-thumb"),
346
346
  top: this.querySelector(".ng-scroll-top"),
347
347
  bottom: this.querySelector(".ng-scroll-bottom")
348
- }), t(this, Ut).call(this), this.refresh();
348
+ }), t(this, Kt).call(this), this.refresh();
349
349
  }, "initWhenReady");
350
350
  e();
351
351
  }
352
352
  };
353
- rt = new WeakMap(), ot = new WeakMap(), bt = new WeakMap(), k = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), Ut = new WeakMap(), h(Ge, "NineTableVScrollBar");
354
- let Se = Ge;
355
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Se);
356
- var j, R, it, P, D, K, at, kt, Oe, We, Xt, Kt, Lt, It, Ht, Gt, Zt, $t, ze, pt, Mt, Jt;
357
- const Ze = class Ze {
358
- constructor(s) {
359
- d(this, j);
360
- d(this, R);
361
- d(this, it);
362
- d(this, P, /* @__PURE__ */ new Map());
363
- d(this, D, null);
364
- d(this, K, null);
365
- d(this, at, 0);
366
- d(this, kt, 40);
367
- d(this, Oe, !1);
368
- d(this, We, !1);
353
+ st = new WeakMap(), nt = new WeakMap(), gt = new WeakMap(), k = new WeakMap(), qt = new WeakMap(), Tt = new WeakMap(), Kt = new WeakMap(), h(Je, "NineTableVScrollBar");
354
+ let Ee = Je;
355
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Ee);
356
+ var j, R, rt, P, D, X, ot, Ct, Be, Pe, Zt, Jt, kt, Lt, It, Qt, te, Ht, Fe, bt, Mt, ee;
357
+ const Qe = class Qe {
358
+ constructor(n) {
359
+ f(this, j);
360
+ f(this, R);
361
+ f(this, rt);
362
+ f(this, P, /* @__PURE__ */ new Map());
363
+ f(this, D, null);
364
+ f(this, X, null);
365
+ f(this, ot, 0);
366
+ f(this, Ct, 40);
367
+ f(this, Be, !1);
368
+ f(this, Pe, !1);
369
369
  //#ticking = false; // 🎯 고속 스크롤 스로틀링용 플래그
370
- d(this, Xt, 3);
370
+ f(this, Zt, 3);
371
371
  q(this, "refresh", /* @__PURE__ */ h(() => {
372
372
  var e;
373
373
  S.log("rowManager.refresh");
374
- const s = t(this, R).querySelector(".ng-container-body .ng-part-body");
375
- s && (t(this, Lt).call(this), t(this, It).call(this), t(this, pt).call(this, s.scrollTop), (e = t(this, R).querySelector("nine-table-vscrollbar")) == null || e.refresh());
374
+ const n = t(this, R).querySelector(".ng-container-body .ng-part-body");
375
+ n && (t(this, kt).call(this), t(this, Lt).call(this), t(this, bt).call(this, n.scrollTop), (e = t(this, R).querySelector("nine-table-vscrollbar")) == null || e.refresh());
376
376
  }, "refresh"));
377
377
  q(this, "initialize", /* @__PURE__ */ h(() => {
378
- S.log("rowManager.initialize"), p(this, it, {
378
+ S.log("rowManager.initialize"), p(this, rt, {
379
379
  scrollTables: t(this, R).querySelectorAll(".ng-part-body table"),
380
380
  firstTr: t(this, R).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
381
  }), p(this, D, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
@@ -385,89 +385,89 @@ const Ze = class Ze {
385
385
  if (!c) return;
386
386
  const l = c.querySelector("tbody.bindable-tbody");
387
387
  if (!l) return;
388
- const f = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
389
- t(this, P).set(i, f);
388
+ const u = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
389
+ t(this, P).set(i, u);
390
390
  });
391
- const s = t(this, R).querySelector(".ng-container-body .ng-part-body"), e = t(this, R).querySelector(".ng-container-left .ng-part-body"), n = t(this, R).querySelector(".ng-container-right .ng-part-body"), r = t(this, R).querySelector(".ng-container-body .ng-part-header"), o = t(this, R).querySelector(".ng-container-body .ng-part-footer");
392
- if (s) {
393
- t(this, Lt).call(this), t(this, $t).call(this), t(this, It).call(this), t(this, pt).call(this, s.scrollTop);
391
+ const n = t(this, R).querySelector(".ng-container-body .ng-part-body"), e = t(this, R).querySelector(".ng-container-left .ng-part-body"), s = t(this, R).querySelector(".ng-container-right .ng-part-body"), r = t(this, R).querySelector(".ng-container-body .ng-part-header"), o = t(this, R).querySelector(".ng-container-body .ng-part-footer");
392
+ if (n) {
393
+ t(this, kt).call(this), t(this, Ht).call(this), t(this, Lt).call(this), t(this, bt).call(this, n.scrollTop);
394
394
  let i = !1;
395
395
  const a = /* @__PURE__ */ h((c) => {
396
- var f;
396
+ var u;
397
397
  if (i) return;
398
398
  i = !0;
399
- const l = c.scrollTop, u = c.scrollLeft;
400
- s && s.scrollTop !== l && (s.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), n && n.scrollTop !== l && (n.scrollTop = l), r && r.scrollLeft !== u && (r.scrollLeft = u), o && o.scrollLeft !== u && (o.scrollLeft = u), t(this, pt).call(this, l), (f = t(this, R).querySelector("nine-table-vscrollbar")) == null || f.refresh(), i = !1;
399
+ const l = c.scrollTop, d = c.scrollLeft;
400
+ n && n.scrollTop !== l && (n.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== d && (r.scrollLeft = d), o && o.scrollLeft !== d && (o.scrollLeft = d), t(this, bt).call(this, l), (u = t(this, R).querySelector("nine-table-vscrollbar")) == null || u.refresh(), i = !1;
401
401
  }, "handleContainerScroll");
402
- [s, e, n].forEach((c) => {
402
+ [n, e, s].forEach((c) => {
403
403
  c == null || c.addEventListener("scroll", (l) => {
404
404
  S.log(l), S.log("rowManager.scroll event"), a(c);
405
405
  });
406
406
  });
407
407
  }
408
408
  }, "initialize"));
409
- d(this, Kt, /* @__PURE__ */ h((s, e) => {
409
+ f(this, Jt, /* @__PURE__ */ h((n, e) => {
410
410
  S.log("rowManager.#renderRows");
411
- const n = t(this, P).get(e);
412
- if (!n || n.length === 0) return;
413
- const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
411
+ const s = t(this, P).get(e);
412
+ if (!s || s.length === 0) return;
413
+ const r = n.querySelector(".ng-part-body tbody.bindable-tbody");
414
414
  if (!r) return;
415
415
  r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
416
416
  const o = r.querySelector("tr.nodata"), i = document.createDocumentFragment();
417
- for (let a = 0; a < t(this, kt); a++)
418
- n.forEach((c) => {
417
+ for (let a = 0; a < t(this, Ct); a++)
418
+ s.forEach((c) => {
419
419
  i.appendChild(c.cloneNode(!0));
420
420
  });
421
- o ? o.before(i) : r.appendChild(i), e === ".ng-container-body" && (t(this, it).firstTr = r.querySelector("tr:not(.nodata)"));
421
+ o ? o.before(i) : r.appendChild(i), e === ".ng-container-body" && (t(this, rt).firstTr = r.querySelector("tr:not(.nodata)"));
422
422
  }, "#renderRows"));
423
- d(this, Lt, /* @__PURE__ */ h(() => {
423
+ f(this, kt, /* @__PURE__ */ h(() => {
424
424
  if (t(this, D) !== null && t(this, D) > 0)
425
425
  return t(this, D);
426
- const s = t(this, R).querySelector(".ng-container-body .ng-part-body");
426
+ const n = t(this, R).querySelector(".ng-container-body .ng-part-body");
427
427
  S.log("rowManager.#measureAndCacheHeight");
428
428
  const e = t(this, P).get(".ng-container-body");
429
429
  if (!e || e.length === 0) throw new Error("invalid dom");
430
- const n = s.querySelector("tbody.bindable-tbody");
431
- if (S.log(n), !n) throw new Error("invalid dom");
432
- n.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
433
- const r = n.querySelector("tr.nodata"), o = document.createDocumentFragment();
430
+ const s = n.querySelector("tbody.bindable-tbody");
431
+ if (S.log(s), !s) throw new Error("invalid dom");
432
+ s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
433
+ const r = s.querySelector("tr.nodata"), o = document.createDocumentFragment();
434
434
  e.forEach((b) => {
435
435
  o.appendChild(b.cloneNode(!0));
436
- }), r ? r.before(o) : n.appendChild(o);
436
+ }), r ? r.before(o) : s.appendChild(o);
437
437
  const i = t(this, R), a = i.style.display, c = i.style.visibility, l = i.style.position;
438
438
  (a === "none" || window.getComputedStyle(i).display === "none") && (i.style.display = "block", i.style.visibility = "hidden", i.style.position = "absolute");
439
- let u = 0;
440
- const f = n.querySelectorAll("tr");
441
- return f.forEach((b) => {
439
+ let d = 0;
440
+ const u = s.querySelectorAll("tr");
441
+ return u.forEach((b) => {
442
442
  let g = b.offsetHeight || b.getBoundingClientRect().height;
443
443
  if (g === 0) {
444
444
  const y = window.getComputedStyle(b);
445
445
  g = parseFloat(y.height) || parseFloat(y.minHeight) || 0;
446
446
  }
447
- u += g;
448
- }), f.forEach((b) => b.remove()), i.style.display = a, i.style.visibility = c, i.style.position = l, u <= 0 ? -1 : (p(this, D, u), t(this, Ht).call(this), t(this, D));
447
+ d += g;
448
+ }), u.forEach((b) => b.remove()), i.style.display = a, i.style.visibility = c, i.style.position = l, d <= 0 ? -1 : (p(this, D, d), t(this, It).call(this), t(this, D));
449
449
  }, "#measureAndCacheHeight"));
450
- d(this, It, /* @__PURE__ */ h(() => {
450
+ f(this, Lt, /* @__PURE__ */ h(() => {
451
451
  S.log("rowManager.#updateVirtualScrollHeight");
452
- const e = (t(this, j).data.get() || []).length, n = t(this, D), r = e * n;
453
- S.log("🔍 [VirtualHeight]", { totalCount: e, rowHeight: n, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
452
+ const e = (t(this, j).data.get() || []).length, s = t(this, D), r = e * s;
453
+ S.log("🔍 [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
454
454
  const i = t(this, R).querySelector(o);
455
455
  if (!i) return;
456
456
  const a = i.querySelector(".ng-part-body .ng-virtual-spacer");
457
457
  a && (a.style.height = `${r}px`);
458
458
  });
459
459
  }, "#updateVirtualScrollHeight"));
460
- d(this, Ht, /* @__PURE__ */ h(() => {
461
- if (t(this, at) > 0 && t(this, D) > 0) {
462
- const s = Math.ceil(t(this, at) / t(this, D));
463
- p(this, kt, s + t(this, Xt));
460
+ f(this, It, /* @__PURE__ */ h(() => {
461
+ if (t(this, ot) > 0 && t(this, D) > 0) {
462
+ const n = Math.ceil(t(this, ot) / t(this, D));
463
+ p(this, Ct, n + t(this, Zt));
464
464
  }
465
465
  }, "#updateRowCount"));
466
- d(this, Gt, /* @__PURE__ */ h(() => {
467
- var a, c, l, u, f, b;
468
- 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"), n = t(this, R).querySelector(".ng-container-right .ng-part-body table");
466
+ f(this, Qt, /* @__PURE__ */ h(() => {
467
+ var a, c, l, d, u, b;
468
+ const n = t(this, R).querySelector(".ng-container-left .ng-part-body table"), e = t(this, R).querySelector(".ng-container-body .ng-part-body table"), s = t(this, R).querySelector(".ng-container-right .ng-part-body table");
469
469
  if (e) {
470
- const g = s ? Array.from(s.querySelectorAll("tbody tr")) : [], y = Array.from(e.querySelectorAll("tbody tr")), w = n ? Array.from(n.querySelectorAll("tbody tr")) : [], v = Math.max(g.length, y.length, w.length);
470
+ const g = n ? Array.from(n.querySelectorAll("tbody tr")) : [], y = Array.from(e.querySelectorAll("tbody tr")), w = s ? Array.from(s.querySelectorAll("tbody tr")) : [], v = Math.max(g.length, y.length, w.length);
471
471
  for (let m = 0; m < v; m++) {
472
472
  const C = [
473
473
  ((a = g[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
@@ -482,77 +482,77 @@ const Ze = class Ze {
482
482
  const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], y = Array.from(o.querySelectorAll("tfoot tr")), w = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], v = Math.max(g.length, y.length, w.length);
483
483
  for (let m = 0; m < v; m++) {
484
484
  const C = [
485
- ((u = g[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
486
- ((f = y[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
485
+ ((d = g[m]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
486
+ ((u = y[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
487
487
  ((b = w[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
488
488
  ], A = Math.max(...C);
489
489
  A > 0 && (g[m] && (g[m].style.height = `${A}px`), y[m] && (y[m].style.height = `${A}px`), w[m] && (w[m].style.height = `${A}px`));
490
490
  }
491
491
  }
492
492
  }, "#syncRowHeights"));
493
- d(this, Zt, /* @__PURE__ */ h(() => {
494
- !t(this, R) || !(t(this, R) instanceof HTMLElement) || (p(this, K, new ResizeObserver((s) => {
495
- for (const e of s) {
496
- const n = e.target;
497
- if (!n.classList.contains("active")) continue;
493
+ f(this, te, /* @__PURE__ */ h(() => {
494
+ !t(this, R) || !(t(this, R) instanceof HTMLElement) || (p(this, X, new ResizeObserver((n) => {
495
+ for (const e of n) {
496
+ const s = e.target;
497
+ if (!s.classList.contains("active")) continue;
498
498
  const r = e.contentRect.height;
499
499
  if (r > 0) {
500
500
  let o = 0;
501
- const i = n.querySelector(".ng-part-header"), a = n.querySelector(".ng-part-footer");
501
+ const i = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
502
502
  i && (o += i.offsetHeight), a && (o += a.offsetHeight);
503
503
  const c = Math.max(r - o, 100);
504
- t(this, at) !== c && (p(this, at, c), t(this, Ht).call(this), t(this, D) !== null && (t(this, $t).call(this), this.refresh()));
504
+ t(this, ot) !== c && (p(this, ot, c), t(this, It).call(this), t(this, D) !== null && (t(this, Ht).call(this), this.refresh()));
505
505
  }
506
506
  }
507
- })), t(this, K).observe(t(this, R)));
507
+ })), t(this, X).observe(t(this, R)));
508
508
  }, "#initResizeObserver"));
509
- d(this, $t, /* @__PURE__ */ h(() => {
510
- S.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
511
- const e = t(this, R).querySelector(s);
512
- e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Kt).call(this, e, s);
513
- }), t(this, Jt).call(this), t(this, Gt).call(this);
509
+ f(this, Ht, /* @__PURE__ */ h(() => {
510
+ S.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
511
+ const e = t(this, R).querySelector(n);
512
+ e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Jt).call(this, e, n);
513
+ }), t(this, ee).call(this), t(this, Qt).call(this);
514
514
  }, "#renderAllContainers"));
515
- d(this, ze, /* @__PURE__ */ h((s) => {
515
+ f(this, Fe, /* @__PURE__ */ h((n) => {
516
516
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
517
517
  var l;
518
- const n = t(this, R).querySelector(e);
519
- if (!n) return;
520
- const r = n.querySelector(".ng-part-body tbody.bindable-tbody");
518
+ const s = t(this, R).querySelector(e);
519
+ if (!s) return;
520
+ const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
521
521
  if (!r) return;
522
522
  const o = Array.from(r.querySelectorAll("tr:not(.nodata)")), i = ((l = t(this, P).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, j).data.get() || []).length;
523
- o.forEach((u, f) => {
524
- const b = s + Math.floor(f / i);
523
+ o.forEach((d, u) => {
524
+ const b = n + Math.floor(u / i);
525
525
  if (b >= c) {
526
- u.style.visibility = "hidden";
526
+ d.style.visibility = "hidden";
527
527
  return;
528
528
  }
529
529
  const g = t(this, j).data.get(b);
530
- u.style.display = "", t(this, Mt).call(this, u, g, b);
530
+ d.style.display = "", t(this, Mt).call(this, d, g, b);
531
531
  });
532
532
  });
533
533
  }, "#adjustBufferRows"));
534
- d(this, pt, /* @__PURE__ */ h((s) => {
535
- var f, b;
534
+ f(this, bt, /* @__PURE__ */ h((n) => {
535
+ var u, b;
536
536
  const e = t(this, D);
537
537
  if (!e || e <= 0) return;
538
- const n = t(this, j).data.length;
539
- if (n === 0) return;
540
- const r = ((f = t(this, P).get(".ng-container-body")) == null ? void 0 : f.length) || 1, o = t(this, R).querySelector(".ng-container-body .ng-part-body");
538
+ const s = t(this, j).data.length;
539
+ if (s === 0) return;
540
+ const r = ((u = t(this, P).get(".ng-container-body")) == null ? void 0 : u.length) || 1, o = t(this, R).querySelector(".ng-container-body .ng-part-body");
541
541
  S.log("bodyContainer.clientHeight", o.clientHeight);
542
- const i = Math.max(0, n - Math.floor(o.clientHeight / e)), a = Math.min(i, Math.max(0, Math.floor(s / e)));
542
+ const i = Math.max(0, s - Math.floor(o.clientHeight / e)), a = Math.min(i, Math.max(0, Math.floor(n / e)));
543
543
  let c = Math.floor(a * e);
544
- S.log(`📜 [Scroll Calc] maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`), a === i && S.log(`📜 [Scroll Inspect] scrollTop: ${s}, rowHeight: ${e}, maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`);
545
- const l = t(this, it).firstTr, u = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
546
- (b = t(this, it)) == null || b.scrollTables.forEach((g) => {
544
+ S.log(`📜 [Scroll Calc] maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`), a === i && S.log(`📜 [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`);
545
+ const l = t(this, rt).firstTr, d = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
546
+ (b = t(this, rt)) == null || b.scrollTables.forEach((g) => {
547
547
  g.style.transform = `translate3d(0, ${c}px, 0)`;
548
- }), u !== a && (S.log(`🔄 [Row Bind Trigger] currentStartIndex(${u}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
548
+ }), d !== a && (S.log(`🔄 [Row Bind Trigger] currentStartIndex(${d}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
549
549
  const y = t(this, R).querySelector(g);
550
550
  if (!y) return;
551
551
  const w = y.querySelector(".ng-part-body tbody.bindable-tbody");
552
552
  if (!w) return;
553
553
  Array.from(w.querySelectorAll("tr:not(.nodata)")).forEach((m, C) => {
554
554
  const A = a + Math.floor(C / r);
555
- if (A >= n) {
555
+ if (A >= s) {
556
556
  m.style.display = "none";
557
557
  return;
558
558
  }
@@ -575,74 +575,74 @@ const Ze = class Ze {
575
575
  cell.dataset.row = dataIndex;
576
576
  });
577
577
  }; */
578
- d(this, Mt, /* @__PURE__ */ h((s, e, n) => {
579
- s.dataset.row = n, s.data = e, Array.from(s.cells).forEach((r, o) => {
580
- r.dataset.row = n;
578
+ f(this, Mt, /* @__PURE__ */ h((n, e, s) => {
579
+ n.dataset.row = s, n.data = e, Array.from(n.cells).forEach((r, o) => {
580
+ r.dataset.row = s;
581
581
  const i = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
582
582
  i && typeof i.refresh == "function" && i.refresh();
583
583
  });
584
584
  }, "#bindRowData"));
585
- d(this, Jt, /* @__PURE__ */ h(() => {
586
- var c, l, u;
585
+ f(this, ee, /* @__PURE__ */ h(() => {
586
+ var c, l, d;
587
587
  S.log("rowManager.#syncHeaderHeights");
588
- 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"), n = t(this, R).querySelector(".ng-container-right .ng-part-header table");
588
+ const n = t(this, R).querySelector(".ng-container-left .ng-part-header table"), e = t(this, R).querySelector(".ng-container-body .ng-part-header table"), s = t(this, R).querySelector(".ng-container-right .ng-part-header table");
589
589
  if (!e) return;
590
- const r = s ? Array.from(s.querySelectorAll("tr")) : [], o = Array.from(e.querySelectorAll("tr")), i = n ? Array.from(n.querySelectorAll("tr")) : [], a = Math.max(r.length, o.length, i.length);
591
- for (let f = 0; f < a; f++) {
590
+ const r = n ? Array.from(n.querySelectorAll("tr")) : [], o = Array.from(e.querySelectorAll("tr")), i = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, o.length, i.length);
591
+ for (let u = 0; u < a; u++) {
592
592
  const b = [
593
- ((c = r[f]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
594
- ((l = o[f]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
595
- ((u = i[f]) == null ? void 0 : u.getBoundingClientRect().height) || 0
593
+ ((c = r[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
594
+ ((l = o[u]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
595
+ ((d = i[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0
596
596
  ], g = Math.max(...b);
597
- g > 0 && (r[f] && (r[f].style.height = `${g}px`), o[f] && (o[f].style.height = `${g}px`), i[f] && (i[f].style.height = `${g}px`));
597
+ g > 0 && (r[u] && (r[u].style.height = `${g}px`), o[u] && (o[u].style.height = `${g}px`), i[u] && (i[u].style.height = `${g}px`));
598
598
  }
599
599
  }, "#syncHeaderHeights"));
600
600
  q(this, "destroy", /* @__PURE__ */ h(() => {
601
- t(this, K) && (t(this, K).disconnect(), p(this, K, null));
601
+ t(this, X) && (t(this, X).disconnect(), p(this, X, null));
602
602
  }, "destroy"));
603
- p(this, j, s.getRootNode().host), p(this, R, s), t(this, Zt).call(this);
603
+ p(this, j, n.getRootNode().host), p(this, R, n), t(this, te).call(this);
604
604
  }
605
605
  getRowHeight() {
606
606
  return t(this, D);
607
607
  }
608
- templateLength(s = ".ng-container-body") {
608
+ templateLength(n = ".ng-container-body") {
609
609
  var e;
610
- return ((e = t(this, P).get(s)) == null ? void 0 : e.length) || 1;
610
+ return ((e = t(this, P).get(n)) == null ? void 0 : e.length) || 1;
611
611
  }
612
612
  };
613
- j = new WeakMap(), R = new WeakMap(), it = new WeakMap(), P = new WeakMap(), D = new WeakMap(), K = new WeakMap(), at = new WeakMap(), kt = new WeakMap(), Oe = new WeakMap(), We = new WeakMap(), Xt = new WeakMap(), Kt = new WeakMap(), Lt = new WeakMap(), It = new WeakMap(), Ht = new WeakMap(), Gt = new WeakMap(), Zt = new WeakMap(), $t = new WeakMap(), ze = new WeakMap(), pt = new WeakMap(), Mt = new WeakMap(), Jt = new WeakMap(), h(Ze, "RowManager");
614
- let Re = Ze;
615
- const Qt = class Qt {
613
+ j = new WeakMap(), R = new WeakMap(), rt = new WeakMap(), P = new WeakMap(), D = new WeakMap(), X = new WeakMap(), ot = new WeakMap(), Ct = new WeakMap(), Be = new WeakMap(), Pe = new WeakMap(), Zt = new WeakMap(), Jt = new WeakMap(), kt = new WeakMap(), Lt = new WeakMap(), It = new WeakMap(), Qt = new WeakMap(), te = new WeakMap(), Ht = new WeakMap(), Fe = new WeakMap(), bt = new WeakMap(), Mt = new WeakMap(), ee = new WeakMap(), h(Qe, "RowManager");
614
+ let qe = Qe;
615
+ const se = class se {
616
616
  /**
617
617
  * 🎯 레이아웃 내의 여러 rawTables 배열을 일괄로 받아 단일 마스터 템플릿으로 사전 컴파일합니다.
618
618
  */
619
- static compileAll(s) {
620
- return Array.isArray(s) ? s.map((e) => Qt.compile(e)) : [];
619
+ static compileAll(n) {
620
+ return Array.isArray(n) ? n.map((e) => se.compile(e)) : [];
621
621
  }
622
622
  /**
623
623
  * 🎯 단일 원본 테이블을 받아 기본 구조 보정 및 2차원 격자 인덱스 사전 부여 완료된 마스터 테이블 반환
624
624
  */
625
- static compile(s) {
626
- if (!s) return null;
625
+ static compile(n) {
626
+ if (!n) return null;
627
627
  const e = /* @__PURE__ */ h((a) => {
628
628
  a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
629
- const u = l.getAttribute("cell-type") || "renderer";
629
+ const d = l.getAttribute("cell-type") || "renderer";
630
630
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
631
- let f = `cell-${u}`;
631
+ let u = `cell-${d}`;
632
632
  const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), y = l.getAttribute("maxbyte"), w = l.getAttribute("type");
633
633
  let v = [];
634
- b && v.push(`data-bind="${b}"`), g && v.push(`data-expr="${g}"`), y && v.push(`maxbyte="${y}"`), w && v.push(`type="${w}"`), l.innerHTML = `<${f} ${v.join(" ")}></${f}>`;
634
+ b && v.push(`data-bind="${b}"`), g && v.push(`data-expr="${g}"`), y && v.push(`maxbyte="${y}"`), w && v.push(`type="${w}"`), l.innerHTML = `<${u} ${v.join(" ")}></${u}>`;
635
635
  }), a.querySelectorAll("tbody td, tfoot td").forEach((l) => {
636
636
  l.setAttribute("tabindex", "0");
637
637
  });
638
- }, "processCellTypes"), n = /* @__PURE__ */ h((a) => {
638
+ }, "processCellTypes"), s = /* @__PURE__ */ h((a) => {
639
639
  if (!a.querySelector("colgroup")) {
640
- const c = a.querySelector("tbody tr") || a.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, u = document.createElement("colgroup"), f = Math.max(Math.floor(a.clientWidth / l), 100);
640
+ const c = a.querySelector("tbody tr") || a.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, d = document.createElement("colgroup"), u = Math.max(Math.floor(a.clientWidth / l), 100);
641
641
  for (let b = 0; b < l; b++) {
642
642
  const g = document.createElement("col");
643
- g.setAttribute("width", f), u.appendChild(g);
643
+ g.setAttribute("width", u), d.appendChild(g);
644
644
  }
645
- a.prepend(u);
645
+ a.prepend(d);
646
646
  }
647
647
  if (!a.querySelector("thead")) {
648
648
  const c = document.createElement("thead"), l = a.querySelector("colgroup");
@@ -650,13 +650,13 @@ const Qt = class Qt {
650
650
  }
651
651
  a.classList.add("nine-table-element");
652
652
  }, "ensureTableStructure"), r = /* @__PURE__ */ h((a, c) => {
653
- const l = Array.from(a.querySelectorAll(c + " tr")), u = Array.from(a.querySelectorAll(c + " th," + c + " td")), f = l.length;
654
- if (f === 0 || u.length === 0) return;
653
+ const l = Array.from(a.querySelectorAll(c + " tr")), d = Array.from(a.querySelectorAll(c + " th," + c + " td")), u = l.length;
654
+ if (u === 0 || d.length === 0) return;
655
655
  let b = 0;
656
- u.forEach((y) => {
656
+ d.forEach((y) => {
657
657
  b += y.colSpan || 1;
658
658
  });
659
- const g = Array.from(Array(f), () => Array(b).fill(null));
659
+ const g = Array.from(Array(u), () => Array(b).fill(null));
660
660
  l.forEach((y) => {
661
661
  const w = y.sectionRowIndex;
662
662
  let v = 0;
@@ -668,8 +668,8 @@ const Qt = class Qt {
668
668
  }
669
669
  const C = m.rowSpan || 1, A = m.colSpan || 1;
670
670
  for (let H = 0; H < C; H++)
671
- for (let F = 0; F < A; F++)
672
- w + H < f && v + F < b && (g[w + H][v + F] = H === 0 && F === 0 ? "1" : "0");
671
+ for (let ut = 0; ut < A; ut++)
672
+ w + H < u && v + ut < b && (g[w + H][v + ut] = H === 0 && ut === 0 ? "1" : "0");
673
673
  });
674
674
  }), l.forEach((y) => {
675
675
  const w = y.sectionRowIndex;
@@ -681,79 +681,78 @@ const Qt = class Qt {
681
681
  }
682
682
  });
683
683
  });
684
- }, "resetColIndex"), o = s.cloneNode(!0);
685
- return n(o), e(o), r(o, "thead"), r(o, "tbody"), r(o, "tfoot"), Array.from(o.querySelectorAll("colgroup col")).forEach((a, c) => {
684
+ }, "resetColIndex"), o = n.cloneNode(!0);
685
+ return s(o), e(o), r(o, "thead"), r(o, "tbody"), r(o, "tfoot"), Array.from(o.querySelectorAll("colgroup col")).forEach((a, c) => {
686
686
  const l = a.getAttribute("fixed");
687
- l && o.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((u) => {
688
- u.setAttribute("fixed", l);
687
+ l && o.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((d) => {
688
+ d.setAttribute("fixed", l);
689
689
  });
690
690
  }), o;
691
691
  }
692
692
  // 🎯 [추가] td/th에 선언된 cell-type 속성을 읽어 커스텀 태그로 자동 감싸기
693
693
  };
694
- h(Qt, "TableCompiler");
695
- let Ae = Qt;
696
- var _, Y, V, At, bs;
697
- const Je = class Je {
698
- constructor(s) {
699
- d(this, V);
700
- d(this, _);
701
- d(this, Y, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
694
+ h(se, "TableCompiler");
695
+ let Te = se;
696
+ var N, Y, V, At, ms;
697
+ const ts = class ts {
698
+ constructor(n) {
699
+ f(this, V);
700
+ f(this, N);
701
+ f(this, Y, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
702
702
  q(this, "render", /* @__PURE__ */ h(() => {
703
- var a;
704
- const { startRow: s, startCol: e, endRow: n, endCol: r } = t(this, Y);
703
+ const { startRow: n, startCol: e, endRow: s, endCol: r } = t(this, Y);
705
704
  S.log("🎨 [CellSelection.render] Rendering range ->", t(this, Y));
706
- const o = t(this, _).querySelectorAll(
705
+ const o = t(this, N).querySelectorAll(
707
706
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
708
707
  );
709
- if (o.forEach((c) => {
710
- c.querySelectorAll(".selected, .selected-top, .selected-bottom, .selected-left, .selected-right").forEach((l) => {
711
- l.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
708
+ if (o.forEach((a) => {
709
+ a.querySelectorAll(".selected, .selected-top, .selected-bottom, .selected-left, .selected-right").forEach((c) => {
710
+ c.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
712
711
  });
713
- }), (a = o[0]) == null || a.offsetHeight, s < 0 || e < 0) {
712
+ }), n < 0 || e < 0) {
714
713
  S.log("⚠️ [CellSelection.render] Range is invalid (< 0), skipping render.");
715
714
  return;
716
715
  }
717
716
  let i = 0;
718
- o.forEach((c) => {
719
- c.querySelectorAll("tbody tr").forEach((l) => {
720
- const { matrixRow: u } = Q(this, V, At).call(this, l);
721
- u < 0 || l.querySelectorAll("td, th").forEach((f) => {
722
- const b = parseInt(f.dataset.col, 10);
723
- if (isNaN(b)) return;
724
- const g = parseInt(f.rowSpan || 1, 10), y = parseInt(f.colSpan || 1, 10), w = u + g - 1, v = b + y - 1;
725
- w >= s && u <= n && v >= e && b <= r && (i++, f.classList.add("selected"), S.log(f, s, e, n, r), u <= s && f.classList.add("selected-top"), w >= n && f.classList.add("selected-bottom"), b <= e && f.classList.add("selected-left"), v >= r && f.classList.add("selected-right"));
717
+ o.forEach((a) => {
718
+ a.querySelectorAll("tbody tr").forEach((c) => {
719
+ const { matrixRow: l } = Z(this, V, At).call(this, c);
720
+ l < 0 || c.querySelectorAll("td, th").forEach((d) => {
721
+ const u = parseInt(d.dataset.col, 10);
722
+ if (isNaN(u)) return;
723
+ const b = parseInt(d.rowSpan || 1, 10), g = parseInt(d.colSpan || 1, 10), y = l + b - 1, w = u + g - 1;
724
+ y >= n && l <= s && w >= e && u <= r && (i++, d.classList.add("selected"), S.log(d, n, e, s, r), l <= n && d.classList.add("selected-top"), y >= s && d.classList.add("selected-bottom"), u <= e && d.classList.add("selected-left"), w >= r && d.classList.add("selected-right"));
726
725
  });
727
726
  });
728
727
  }), S.log(`✨ [CellSelection.render] Total rendered cells marked: ${i}`);
729
728
  }, "render"));
730
- p(this, _, s), Q(this, V, bs).call(this), t(this, _).querySelectorAll(
729
+ p(this, N, n), Z(this, V, ms).call(this), t(this, N).querySelectorAll(
731
730
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
732
- ).forEach((n) => {
733
- n.addEventListener("scroll", () => {
731
+ ).forEach((s) => {
732
+ s.addEventListener("scroll", () => {
734
733
  t(this, Y).startRow >= 0 && t(this, Y).startCol >= 0 && this.render();
735
734
  });
736
735
  }), S.log("🎯 [CellSelection] Initialized");
737
736
  }
738
- setRange(s, e, n, r) {
739
- S.log(`🔍 [CellSelection.setRange] Input -> startRow: ${s}, startCol: ${e}, endRow: ${n}, endCol: ${r}`);
740
- let o = Math.min(s, n), i = Math.max(s, n), a = Math.min(e, r), c = Math.max(e, r);
741
- const l = t(this, _).querySelectorAll(
737
+ setRange(n, e, s, r) {
738
+ S.log(`🔍 [CellSelection.setRange] Input -> startRow: ${n}, startCol: ${e}, endRow: ${s}, endCol: ${r}`);
739
+ let o = Math.min(n, s), i = Math.max(n, s), a = Math.min(e, r), c = Math.max(e, r);
740
+ const l = t(this, N).querySelectorAll(
742
741
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
743
742
  );
744
- let u = !0, f = 0;
745
- for (; u && f < 5; )
746
- u = !1, f++, l.forEach((b) => {
743
+ let d = !0, u = 0;
744
+ for (; d && u < 5; )
745
+ d = !1, u++, l.forEach((b) => {
747
746
  b.querySelectorAll("tbody tr").forEach((g) => {
748
747
  if (g.classList.contains("nodata")) return;
749
- const { matrixRow: y } = Q(this, V, At).call(this, g);
748
+ const { matrixRow: y } = Z(this, V, At).call(this, g);
750
749
  y < 0 || g.querySelectorAll("td, th").forEach((w) => {
751
750
  const v = parseInt(w.dataset.col, 10);
752
751
  if (isNaN(v)) return;
753
752
  const m = parseInt(w.rowSpan || 1, 10), C = parseInt(w.colSpan || 1, 10), A = y + m - 1, H = v + C - 1;
754
753
  if (A >= o && y <= i && H >= a && v <= c) {
755
- const U = Math.min(o, y), cs = Math.max(i, A), hs = Math.min(a, v), ds = Math.max(c, H);
756
- (U !== o || cs !== i || hs !== a || ds !== c) && (o = U, i = cs, a = hs, c = ds, u = !0);
754
+ const ds = Math.min(o, y), fs = Math.max(i, A), us = Math.min(a, v), gs = Math.max(c, H);
755
+ (ds !== o || fs !== i || us !== a || gs !== c) && (o = ds, i = fs, a = us, c = gs, d = !0);
757
756
  }
758
757
  });
759
758
  });
@@ -761,195 +760,255 @@ const Je = class Je {
761
760
  p(this, Y, { startRow: o, startCol: a, endRow: i, endCol: c }), S.log("📦 [CellSelection.setRange] Final Range ->", t(this, Y)), this.render();
762
761
  }
763
762
  };
764
- _ = new WeakMap(), Y = new WeakMap(), V = new WeakSet(), At = /* @__PURE__ */ h(function(s) {
765
- if (!s || s.classList.contains("nodata")) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
766
- const e = parseInt(s.dataset.row, 10);
763
+ N = new WeakMap(), Y = new WeakMap(), V = new WeakSet(), At = /* @__PURE__ */ h(function(n) {
764
+ if (!n || n.classList.contains("nodata")) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
765
+ const e = parseInt(n.dataset.row, 10);
767
766
  if (isNaN(e)) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
768
- const n = s.closest("tbody"), o = Array.from(n.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), i = o.indexOf(s), a = o.length > 0 ? o.length : 1, c = e * a + (i >= 0 ? i : s.sectionRowIndex % a);
767
+ const s = n.closest("tbody"), o = Array.from(s.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), i = o.indexOf(n), a = o.length > 0 ? o.length : 1, c = e * a + (i >= 0 ? i : n.sectionRowIndex % a);
769
768
  return { dataRow: e, subRowIndex: i, matrixRow: c };
770
- }, "#getMatrixRow"), bs = /* @__PURE__ */ h(function() {
771
- const s = t(this, _).querySelector(".ng-container-top");
772
- if (!s) {
769
+ }, "#getMatrixRow"), ms = /* @__PURE__ */ h(function() {
770
+ const n = t(this, N).querySelector(".ng-container-top");
771
+ if (!n) {
773
772
  S.log("❌ [CellSelection] .ng-container-top not found!");
774
773
  return;
775
774
  }
776
- s.addEventListener("mousedown", (e) => {
775
+ n.addEventListener("mousedown", (e) => {
777
776
  if (e.button !== 0) return;
778
- const n = e.target.closest("td, th");
779
- if (!n || n.dataset.row === void 0 || n.dataset.col === void 0 || n.closest("tr").classList.contains("nodata")) return;
780
- t(this, _).style.userSelect = "none", t(this, _).style.webkitUserSelect = "none";
781
- const r = n.closest("tr"), { matrixRow: o } = Q(this, V, At).call(this, r), i = parseInt(n.dataset.col, 10);
777
+ const s = e.target.closest("td, th");
778
+ if (!s || s.dataset.row === void 0 || s.dataset.col === void 0 || s.closest("tr").classList.contains("nodata")) return;
779
+ t(this, N).style.userSelect = "none", t(this, N).style.webkitUserSelect = "none";
780
+ const r = s.closest("tr"), { matrixRow: o } = Z(this, V, At).call(this, r), i = parseInt(s.dataset.col, 10);
782
781
  if (o < 0) {
783
- t(this, _).style.userSelect = "", t(this, _).style.webkitUserSelect = "";
782
+ t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "";
784
783
  return;
785
784
  }
786
- S.log(`🖱️ [MouseDown Success] startRow: ${o}, startCol: ${i}`), t(this, _).navigation.currentCell = n;
785
+ S.log(`🖱️ [MouseDown Success] startRow: ${o}, startCol: ${i}`), t(this, N).navigation.currentCell = s;
787
786
  let a = o, c = i;
788
- const l = /* @__PURE__ */ h((f) => {
789
- const b = document.elementFromPoint(f.clientX, f.clientY);
787
+ const l = /* @__PURE__ */ h((u) => {
788
+ const b = document.elementFromPoint(u.clientX, u.clientY);
790
789
  let g = b == null ? void 0 : b.closest("td, th");
791
- if (!g || !t(this, _).contains(g)) {
792
- const m = t(this, _).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
790
+ if (!g || !t(this, N).contains(g)) {
791
+ const m = t(this, N).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
793
792
  for (const C of m) {
794
793
  const A = C.getBoundingClientRect();
795
- if (f.clientX >= A.left && f.clientX <= A.right && f.clientY >= A.top && f.clientY <= A.bottom) {
794
+ if (u.clientX >= A.left && u.clientX <= A.right && u.clientY >= A.top && u.clientY <= A.bottom) {
796
795
  g = C;
797
796
  break;
798
797
  }
799
798
  }
800
799
  }
801
800
  if (!g || g.dataset.row === void 0 || g.dataset.col === void 0 || g.closest("tr").classList.contains("nodata")) return;
802
- const y = g.closest("tr"), { matrixRow: w } = Q(this, V, At).call(this, y), v = parseInt(g.dataset.col, 10);
801
+ const y = g.closest("tr"), { matrixRow: w } = Z(this, V, At).call(this, y), v = parseInt(g.dataset.col, 10);
803
802
  w < 0 || a === w && c === v || (a = w, c = v, this.setRange(o, i, w, v));
804
- }, "onMouseMove"), u = /* @__PURE__ */ h(() => {
805
- S.log("🖱️ [MouseUp] Drag ended."), t(this, _).style.userSelect = "", t(this, _).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", u);
803
+ }, "onMouseMove"), d = /* @__PURE__ */ h(() => {
804
+ S.log("🖱️ [MouseUp] Drag ended."), t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", d);
806
805
  }, "onMouseUp");
807
- document.addEventListener("mousemove", l), document.addEventListener("mouseup", u);
806
+ document.addEventListener("mousemove", l), document.addEventListener("mouseup", d);
808
807
  });
809
- }, "#initEvents"), h(Je, "CellSelection");
810
- let Ee = Je;
811
- var G, lt, te, ee, Be, se, ps;
812
- const Qe = class Qe {
813
- // 🎯 키보드 네비게이션 중 스크롤 튐 방지 플래그
814
- constructor(s) {
815
- d(this, se);
816
- d(this, G);
817
- d(this, lt, null);
818
- d(this, te, -1);
819
- d(this, ee, -1);
820
- d(this, Be, !1);
821
- p(this, G, s), Q(this, se, ps).call(this), S.log("🎯 [CellNavigation] Initialized");
808
+ }, "#initEvents"), h(ts, "CellSelection");
809
+ let Ce = ts;
810
+ var F, it, ne, re, $t, Nt, _t, Dt, oe, xs;
811
+ const es = class es {
812
+ constructor(n) {
813
+ f(this, oe);
814
+ f(this, F);
815
+ f(this, it, null);
816
+ f(this, ne, -1);
817
+ f(this, re, -1);
818
+ // 🎯 병합된 셀(colSpan) 범위를 완벽하게 고려한 다음 컬럼 탐색
819
+ f(this, $t, /* @__PURE__ */ h((n, e, s) => {
820
+ const r = t(this, _t).call(this, n, e);
821
+ if (!r) return s + 1;
822
+ let o = s + 1;
823
+ const i = Array.from(r.querySelectorAll("td"));
824
+ for (const a of i) {
825
+ const c = parseInt(a.dataset.col, 10), l = parseInt(a.colSpan || 1, 10);
826
+ if (s >= c && s < c + l) {
827
+ o = c + l;
828
+ break;
829
+ }
830
+ }
831
+ return o;
832
+ }, "#getNextCol"));
833
+ // 🎯 병합된 셀(colSpan) 범위를 고려한 이전 컬럼 탐색
834
+ f(this, Nt, /* @__PURE__ */ h((n, e, s) => {
835
+ const r = t(this, _t).call(this, n, e);
836
+ if (!r) return Math.max(0, s - 1);
837
+ let o = Math.max(0, s - 1);
838
+ const i = Array.from(r.querySelectorAll("td"));
839
+ for (const a of i) {
840
+ const c = parseInt(a.dataset.col, 10);
841
+ if (c < s)
842
+ o = c;
843
+ else
844
+ break;
845
+ }
846
+ return o;
847
+ }, "#getPreviousCol"));
848
+ f(this, _t, /* @__PURE__ */ h((n, e) => {
849
+ const s = t(this, F).querySelectorAll(
850
+ ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
851
+ );
852
+ for (const r of s) {
853
+ const i = Array.from(r.querySelectorAll("tbody tr:not(.nodata)")).filter((a) => parseInt(a.dataset.row, 10) === n);
854
+ if (i[e])
855
+ return i[e];
856
+ }
857
+ return null;
858
+ }, "#findTargetTr"));
859
+ f(this, Dt, /* @__PURE__ */ h((n, e, s) => {
860
+ const r = t(this, F).querySelectorAll(
861
+ ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
862
+ );
863
+ for (const o of r) {
864
+ const c = Array.from(o.querySelectorAll("tbody tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === n)[e];
865
+ if (c) {
866
+ const l = Array.from(c.querySelectorAll("td"));
867
+ for (const d of l) {
868
+ const u = parseInt(d.dataset.col, 10), b = parseInt(d.colSpan || 1, 10);
869
+ if (!isNaN(u) && s >= u && s < u + b && window.getComputedStyle(d).display !== "none")
870
+ return d;
871
+ }
872
+ }
873
+ }
874
+ return null;
875
+ }, "#getNearElement"));
876
+ p(this, F, n), Z(this, oe, xs).call(this), S.log("🎯 [CellNavigation] Initialized");
822
877
  }
823
878
  get currentCell() {
824
- return t(this, lt);
825
- }
826
- set currentCell(s) {
827
- if (!s) return;
828
- p(this, lt, s), s.focus({ preventScroll: !0 });
829
- const e = parseInt(s.dataset.row, 10), n = parseInt(s.dataset.col, 10);
830
- if (!isNaN(e) && !isNaN(n)) {
831
- p(this, te, e), p(this, ee, n);
832
- const r = s.closest("tr"), o = r == null ? void 0 : r.closest("tbody");
879
+ return t(this, it);
880
+ }
881
+ set currentCell(n) {
882
+ if (!n) return;
883
+ p(this, it, n), n.focus({ preventScroll: !0 });
884
+ const e = parseInt(n.dataset.row, 10), s = parseInt(n.dataset.col, 10);
885
+ if (!isNaN(e) && !isNaN(s)) {
886
+ p(this, ne, e), p(this, re, s);
887
+ const r = n.closest("tr"), o = r == null ? void 0 : r.closest("tbody");
833
888
  if (o) {
834
- const a = Array.from(o.querySelectorAll("tr:not(.nodata)")).filter((f) => parseInt(f.dataset.row, 10) === e), c = a.length > 0 ? a.length : 1, l = a.indexOf(r), u = e * c + (l >= 0 ? l : 0);
835
- S.log("====================", u, n, u, n), t(this, G).selection.setRange(u, n, u, n);
889
+ const a = Array.from(o.querySelectorAll("tr:not(.nodata)")).filter((u) => parseInt(u.dataset.row, 10) === e), c = a.length > 0 ? a.length : 1, l = a.indexOf(r), d = e * c + (l >= 0 ? l : 0);
890
+ t(this, F).selection.setRange(d, s, d, s);
836
891
  }
837
892
  }
838
893
  }
839
- moveCell(s) {
840
- var C, A, H, F;
841
- if (!t(this, lt)) return;
842
- const e = t(this, lt), n = e.closest("tr"), r = parseInt(e.dataset.row, 10), o = parseInt(e.dataset.col, 10), i = n == null ? void 0 : n.closest("tbody"), c = Array.from(i.querySelectorAll("tr:not(.nodata)")).filter((U) => parseInt(U.dataset.row, 10) === r), l = c.length > 0 ? c.length : 1, u = c.indexOf(n);
843
- let f = r, b = u, g = o;
844
- switch (s.code) {
894
+ moveCell(n) {
895
+ var w, v, m, C;
896
+ if (!t(this, it)) return;
897
+ const e = t(this, it), s = e.closest("tr"), r = parseInt(e.dataset.row, 10), o = parseInt(e.dataset.col, 10), i = s == null ? void 0 : s.closest("tbody");
898
+ if (!i) return;
899
+ const c = Array.from(i.querySelectorAll("tr:not(.nodata)")).filter((A) => parseInt(A.dataset.row, 10) === r), l = c.length > 0 ? c.length : 1, d = c.indexOf(s);
900
+ let u = r, b = d, g = o;
901
+ switch (n.code) {
845
902
  case "Tab":
846
- s.preventDefault(), g = s.shiftKey ? o - 1 : o + 1;
903
+ n.preventDefault(), g = n.shiftKey ? t(this, Nt).call(this, r, d, o) : t(this, $t).call(this, r, d, o);
847
904
  break;
848
905
  case "ArrowRight":
849
- g = o + 1;
906
+ g = t(this, $t).call(this, r, d, o);
850
907
  break;
851
908
  case "ArrowLeft":
852
- g = o - 1;
909
+ g = t(this, Nt).call(this, r, d, o);
853
910
  break;
854
911
  case "ArrowDown":
855
- s.preventDefault(), u < l - 1 ? b = u + 1 : (f = r + 1, b = 0);
912
+ n.preventDefault(), d < l - 1 ? b = d + 1 : (u = r + 1, b = 0);
856
913
  break;
857
914
  case "ArrowUp":
858
- s.preventDefault(), u > 0 ? b = u - 1 : (f = r - 1, b = l - 1);
915
+ n.preventDefault(), d > 0 ? b = d - 1 : (u = r - 1, b = l - 1);
859
916
  break;
860
917
  }
861
- let y = null;
862
- const m = Array.from(i.querySelectorAll("tr:not(.nodata)")).filter((U) => parseInt(U.dataset.row, 10) === f)[b];
863
- if (m && (y = m.querySelector(`[data-col="${g}"]`)), y)
918
+ let y = t(this, Dt).call(this, u, b, g);
919
+ if (y)
864
920
  this.currentCell = y;
865
- else if (f !== r && f >= 0) {
866
- const U = ((A = (C = t(this, G)).getRowHeight) == null ? void 0 : A.call(C)) || 40;
867
- (F = (H = t(this, G)).scrollToY) == null || F.call(H, f * U);
921
+ else if (u !== r && u >= 0) {
922
+ const A = ((v = (w = t(this, F)).getRowHeight) == null ? void 0 : v.call(w)) || 40;
923
+ (C = (m = t(this, F)).scrollToY) == null || C.call(m, u * A), setTimeout(() => {
924
+ const H = t(this, Dt).call(this, u, b, g);
925
+ H && (this.currentCell = H);
926
+ }, 0);
868
927
  }
869
928
  }
870
929
  };
871
- G = new WeakMap(), lt = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), Be = new WeakMap(), se = new WeakSet(), ps = /* @__PURE__ */ h(function() {
872
- t(this, G).addEventListener("keydown", (s) => {
873
- ["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(s.code) && this.moveCell(s);
930
+ F = new WeakMap(), it = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), $t = new WeakMap(), Nt = new WeakMap(), _t = new WeakMap(), Dt = new WeakMap(), oe = new WeakSet(), xs = /* @__PURE__ */ h(function() {
931
+ t(this, F).addEventListener("keydown", (n) => {
932
+ ["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(n.code) && this.moveCell(n);
874
933
  });
875
- }, "#initEvents"), h(Qe, "CellNavigation");
876
- let qe = Qe;
877
- var ne, ct, ht, _t, Nt, re, oe, yt, ie, ae;
878
- const Et = class Et extends HTMLElement {
934
+ }, "#initEvents"), h(es, "CellNavigation");
935
+ let ke = es;
936
+ var ie, at, lt, Ot, Wt, ae, le, pt, ce, he;
937
+ const Rt = class Rt extends HTMLElement {
879
938
  constructor() {
880
939
  super();
881
- d(this, ne);
882
- d(this, ct, null);
883
- d(this, ht);
884
- d(this, _t);
885
- d(this, Nt);
940
+ f(this, ie);
941
+ f(this, at, null);
942
+ f(this, lt);
943
+ f(this, Ot);
944
+ f(this, Wt);
886
945
  q(this, "invalidate", /* @__PURE__ */ h(() => {
887
- S.log("sheet.invalidate()"), t(this, ht).refresh();
946
+ S.log("sheet.invalidate()"), t(this, lt).refresh();
888
947
  }, "invalidate"));
889
948
  q(this, "generate", /* @__PURE__ */ h((e) => {
890
949
  if (S.log("sheet.generate()"), !e) return;
891
- p(this, ct, Ae.compile(e)), t(this, re).call(this), t(this, oe).call(this);
892
- const n = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), o = this.querySelector(".ng-nodata-overlay");
893
- n && o && (o.style.top = `${n.offsetHeight}px`), r && o && (o.style.bottom = `${r.offsetHeight}px`), t(this, ht).initialize(), setTimeout(() => {
950
+ p(this, at, Te.compile(e)), t(this, ae).call(this), t(this, le).call(this);
951
+ const s = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), o = this.querySelector(".ng-nodata-overlay");
952
+ s && o && (o.style.top = `${s.offsetHeight}px`), r && o && (o.style.bottom = `${r.offsetHeight}px`), t(this, lt).initialize(), setTimeout(() => {
894
953
  var i;
895
954
  (i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
896
955
  }, 0);
897
956
  }, "generate"));
898
- d(this, re, /* @__PURE__ */ h(() => {
957
+ f(this, ae, /* @__PURE__ */ h(() => {
899
958
  [
900
959
  { selector: ".ng-container-body", type: null },
901
960
  { selector: ".ng-container-left", type: "left" },
902
961
  { selector: ".ng-container-right", type: "right" }
903
- ].forEach(({ selector: n, type: r }) => {
962
+ ].forEach(({ selector: s, type: r }) => {
904
963
  var o, i, a;
905
- (o = this.querySelector(`${n} .ng-part-header`)) == null || o.appendChild(t(this, yt).call(this, t(this, ct), r, "header")), (i = this.querySelector(`${n} .ng-virtual-spacer`)) == null || i.before(t(this, yt).call(this, t(this, ct), r, "body")), (a = this.querySelector(`${n} .ng-part-footer`)) == null || a.appendChild(t(this, yt).call(this, t(this, ct), r, "footer"));
964
+ (o = this.querySelector(`${s} .ng-part-header`)) == null || o.appendChild(t(this, pt).call(this, t(this, at), r, "header")), (i = this.querySelector(`${s} .ng-virtual-spacer`)) == null || i.before(t(this, pt).call(this, t(this, at), r, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, pt).call(this, t(this, at), r, "footer"));
906
965
  });
907
966
  }, "#renderSplitContainers"));
908
- d(this, oe, /* @__PURE__ */ h(() => {
967
+ f(this, le, /* @__PURE__ */ h(() => {
909
968
  ["left", "right", "body"].forEach((e) => {
910
- const n = this.querySelector(`.ng-container-${e}`), r = n == null ? void 0 : n.querySelectorAll("table");
911
- if (!n || !r || r.length === 0) return;
969
+ const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
970
+ if (!s || !r || r.length === 0) return;
912
971
  let o = 0;
913
972
  r[0].querySelectorAll("col").forEach((i) => {
914
973
  const a = parseInt(i.getAttribute("width"), 10);
915
974
  isNaN(a) || (o += a);
916
- }), e === "body" ? (n.style.flex = "1", r.forEach((i) => {
975
+ }), e === "body" ? (s.style.flex = "1", r.forEach((i) => {
917
976
  i.style.width = `${o}px`, i.style.minWidth = `${o}px`;
918
- })) : (n.style.flex = `0 0 ${o}px`, n.style.width = `${o}px`, r.forEach((i) => {
977
+ })) : (s.style.flex = `0 0 ${o}px`, s.style.width = `${o}px`, r.forEach((i) => {
919
978
  i.style.width = `${o}px`, i.style.minWidth = `${o}px`;
920
979
  }));
921
980
  });
922
981
  }, "#updateContainerWidths"));
923
- d(this, yt, /* @__PURE__ */ h((e, n, r) => {
982
+ f(this, pt, /* @__PURE__ */ h((e, s, r) => {
924
983
  const o = e.cloneNode(!0), i = o.querySelector("thead"), a = o.querySelector("tbody"), c = o.querySelector("tfoot");
925
984
  if (r === "header") {
926
985
  if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
927
- const u = document.createElement("tbody");
928
- u.className = "fixed-tbody", o.appendChild(u);
986
+ const d = document.createElement("tbody");
987
+ d.className = "fixed-tbody", o.appendChild(d);
929
988
  }
930
989
  } else r === "body" ? (i && i.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (i && i.remove(), a && a.remove());
931
- return n === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
990
+ return s === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
932
991
  l.getAttribute("fixed") !== "left" && l.remove();
933
- }) : n === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
992
+ }) : s === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
934
993
  l.getAttribute("fixed") !== "right" && l.remove();
935
994
  }) : o.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
936
995
  l.remove();
937
996
  }), o;
938
997
  }, "#createSplitTable"));
939
- q(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, ht).getRowHeight(), "getRowHeight"));
998
+ q(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, lt).getRowHeight(), "getRowHeight"));
940
999
  q(this, "scrollToX", /* @__PURE__ */ h((e) => {
941
- const n = this.querySelector(".ng-container-body .ng-part-body");
942
- n && (n.scrollLeft = e);
1000
+ const s = this.querySelector(".ng-container-body .ng-part-body");
1001
+ s && (s.scrollLeft = e);
943
1002
  }, "scrollToX"));
944
1003
  q(this, "scrollToY", /* @__PURE__ */ h((e) => {
945
- const n = this.querySelector(".ng-container-body .ng-part-body");
946
- n && (n.scrollTop = e);
1004
+ const s = this.querySelector(".ng-container-body .ng-part-body");
1005
+ s && (s.scrollTop = e);
947
1006
  }, "scrollToY"));
948
- d(this, ie, /* @__PURE__ */ h(() => {
949
- t(this, ae).call(this), p(this, _t, new Ee(this)), p(this, Nt, new qe(this));
1007
+ f(this, ce, /* @__PURE__ */ h(() => {
1008
+ t(this, he).call(this), p(this, Ot, new Ce(this)), p(this, Wt, new ke(this));
950
1009
  }, "#init"));
951
- d(this, ae, /* @__PURE__ */ h(() => {
952
- const e = Et.SCROLLBAR_SIZE;
1010
+ f(this, he, /* @__PURE__ */ h(() => {
1011
+ const e = Rt.SCROLLBAR_SIZE;
953
1012
  this.innerHTML = `
954
1013
  <style>
955
1014
  nine-table-sheet {
@@ -1150,105 +1209,105 @@ const Et = class Et extends HTMLElement {
1150
1209
  </div>
1151
1210
  `;
1152
1211
  }, "#render"));
1153
- p(this, ht, new Re(this)), p(this, ne, this.getRootNode().host);
1212
+ p(this, lt, new qe(this)), p(this, ie, this.getRootNode().host);
1154
1213
  }
1155
1214
  connectedCallback() {
1156
- t(this, ie).call(this);
1215
+ t(this, ce).call(this);
1157
1216
  }
1158
1217
  get selection() {
1159
- return t(this, _t);
1218
+ return t(this, Ot);
1160
1219
  }
1161
1220
  get navigation() {
1162
- return t(this, Nt);
1221
+ return t(this, Wt);
1163
1222
  }
1164
1223
  disconnectedCallback() {
1165
1224
  this.innerHTML = "", S.log("NineTableSheet destroyed.");
1166
1225
  }
1167
1226
  };
1168
- ne = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), _t = new WeakMap(), Nt = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), yt = new WeakMap(), ie = new WeakMap(), ae = new WeakMap(), h(Et, "NineTableSheet"), q(Et, "SCROLLBAR_SIZE", 16);
1169
- let jt = Et;
1170
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", jt);
1171
- var le, Dt;
1172
- const ts = class ts extends HTMLElement {
1227
+ ie = new WeakMap(), at = new WeakMap(), lt = new WeakMap(), Ot = new WeakMap(), Wt = new WeakMap(), ae = new WeakMap(), le = new WeakMap(), pt = new WeakMap(), ce = new WeakMap(), he = new WeakMap(), h(Rt, "NineTableSheet"), q(Rt, "SCROLLBAR_SIZE", 16);
1228
+ let Ut = Rt;
1229
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Ut);
1230
+ var de, zt;
1231
+ const ss = class ss extends HTMLElement {
1173
1232
  constructor() {
1174
1233
  super();
1175
- d(this, le, /* @__PURE__ */ h(() => {
1234
+ f(this, de, /* @__PURE__ */ h(() => {
1176
1235
  var e;
1177
- (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (n) => {
1236
+ (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
1178
1237
  var i;
1179
- const r = n.ctrlKey || n.metaKey || n.shiftKey, o = parseInt((i = n.target.closest(".nine-tab-item")) == null ? void 0 : i.dataset.index, 10);
1180
- t(this, Dt).call(this, o, r);
1181
- }), t(this, Dt).call(this, 0, !1);
1238
+ const r = s.ctrlKey || s.metaKey || s.shiftKey, o = parseInt((i = s.target.closest(".nine-tab-item")) == null ? void 0 : i.dataset.index, 10);
1239
+ t(this, zt).call(this, o, r);
1240
+ }), t(this, zt).call(this, 0, !1);
1182
1241
  }, "#init"));
1183
- d(this, Dt, /* @__PURE__ */ h((e, n = !1) => {
1242
+ f(this, zt, /* @__PURE__ */ h((e, s = !1) => {
1184
1243
  const r = /* @__PURE__ */ h(() => {
1185
- const u = Array.from(this.querySelectorAll("nine-table-sheet"));
1244
+ const d = Array.from(this.querySelectorAll("nine-table-sheet"));
1186
1245
  Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
1187
- const b = u.filter((g) => g.classList.contains("active"));
1246
+ const b = d.filter((g) => g.classList.contains("active"));
1188
1247
  b.length < 2 || b.forEach((g) => {
1189
- const y = parseInt(g.getAttribute("data-index"), 10), w = this.querySelector(`nine-splitter[data-split-index="${y}"]`), v = u[y + 1];
1248
+ const y = parseInt(g.getAttribute("data-index"), 10), w = this.querySelector(`nine-splitter[data-split-index="${y}"]`), v = d[y + 1];
1190
1249
  w && v && v.classList.contains("active") && w.style.setProperty("display", "flex");
1191
1250
  });
1192
1251
  }, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), i = this.querySelector("nine-table-sheets-body"), a = o.querySelectorAll(".nine-tab-item"), c = i.querySelectorAll("nine-table-sheet");
1193
1252
  if (!a[e]) return;
1194
- if (!n)
1195
- a.forEach((u, f) => {
1196
- u.classList.toggle("active", f === e);
1197
- }), c.forEach((u, f) => {
1198
- const b = f === e;
1199
- u.classList.toggle("active", b), u.style.flex = b ? "1 1 100%" : "";
1253
+ if (!s)
1254
+ a.forEach((d, u) => {
1255
+ d.classList.toggle("active", u === e);
1256
+ }), c.forEach((d, u) => {
1257
+ const b = u === e;
1258
+ d.classList.toggle("active", b), d.style.flex = b ? "1 1 100%" : "";
1200
1259
  });
1201
1260
  else {
1202
- const u = a[e], f = o.querySelectorAll(".nine-tab-item.active");
1203
- if (u.classList.contains("active") && f.length <= 1)
1261
+ const d = a[e], u = o.querySelectorAll(".nine-tab-item.active");
1262
+ if (d.classList.contains("active") && u.length <= 1)
1204
1263
  return;
1205
- u.classList.toggle("active");
1264
+ d.classList.toggle("active");
1206
1265
  const b = i.querySelector(`nine-table-sheet[data-index="${e}"]`);
1207
1266
  b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
1208
1267
  }
1209
1268
  const l = i.querySelectorAll("nine-table-sheet.active");
1210
- l == null || l.forEach((u) => {
1211
- u.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
1269
+ l == null || l.forEach((d) => {
1270
+ d.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
1212
1271
  }), r();
1213
1272
  }, "#switchSheet"));
1214
1273
  }
1215
1274
  connectedCallback() {
1216
- t(this, le).call(this);
1275
+ t(this, de).call(this);
1217
1276
  }
1218
1277
  };
1219
- le = new WeakMap(), Dt = new WeakMap(), h(ts, "NineTableSheets");
1220
- let Te = ts;
1221
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Te);
1222
- var N, ce, Ot, he;
1223
- const es = class es {
1224
- constructor(s) {
1225
- d(this, N);
1226
- d(this, ce, /* @__PURE__ */ h(() => {
1227
- t(this, he).call(this), new ResizeObserver((s) => {
1228
- for (let e of s)
1229
- t(this, N).getAttribute("auto-height") === "true" && t(this, Ot).call(this);
1230
- }).observe(t(this, N));
1278
+ de = new WeakMap(), zt = new WeakMap(), h(ss, "NineTableSheets");
1279
+ let Le = ss;
1280
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Le);
1281
+ var _, fe, Bt, ue;
1282
+ const ns = class ns {
1283
+ constructor(n) {
1284
+ f(this, _);
1285
+ f(this, fe, /* @__PURE__ */ h(() => {
1286
+ t(this, ue).call(this), new ResizeObserver((n) => {
1287
+ for (let e of n)
1288
+ t(this, _).getAttribute("auto-height") === "true" && t(this, Bt).call(this);
1289
+ }).observe(t(this, _));
1231
1290
  }, "#init"));
1232
- d(this, Ot, /* @__PURE__ */ h(() => {
1291
+ f(this, Bt, /* @__PURE__ */ h(() => {
1233
1292
  var c, l;
1234
- const s = Array.from(t(this, N).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1235
- if (s.length === 0) return;
1236
- const e = parseInt(t(this, N).getAttribute("max-display-row"), 10) || 10, n = Math.max(...s.map((u) => u.getRowHeight())), r = (c = t(this, N).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (l = t(this, N).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, i = jt.SCROLLBAR_SIZE, a = e * n + r + o + i;
1237
- t(this, N).style.height = `${a}px`;
1293
+ const n = Array.from(t(this, _).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1294
+ if (n.length === 0) return;
1295
+ const e = parseInt(t(this, _).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((d) => d.getRowHeight())), r = (c = t(this, _).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (l = t(this, _).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, i = Ut.SCROLLBAR_SIZE, a = e * s + r + o + i;
1296
+ t(this, _).style.height = `${a}px`;
1238
1297
  }, "#applyAutoHeight"));
1239
- d(this, he, /* @__PURE__ */ h(() => {
1240
- const e = Array.from(t(this, N).children).filter((c) => c.tagName === "TABLE"), n = t(this, N).getAttribute("auto-height") === "true", r = e.length, o = e.map((c, l) => {
1241
- const f = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < r - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
1242
- return f + b;
1298
+ f(this, ue, /* @__PURE__ */ h(() => {
1299
+ const e = Array.from(t(this, _).children).filter((c) => c.tagName === "TABLE"), s = t(this, _).getAttribute("auto-height") === "true", r = e.length, o = e.map((c, l) => {
1300
+ const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < r - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
1301
+ return u + b;
1243
1302
  }).join(""), i = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1244
- t(this, N).shadowRoot.innerHTML = `
1303
+ t(this, _).shadowRoot.innerHTML = `
1245
1304
  <style>
1246
1305
  :host {
1247
1306
  display: flex;
1248
1307
  flex-direction: column;
1249
1308
  position: relative;
1250
1309
  overflow: hidden;
1251
- height: ${n ? "auto" : "100%"};
1310
+ height: ${s ? "auto" : "100%"};
1252
1311
  background: #fff;
1253
1312
  }
1254
1313
 
@@ -1361,169 +1420,169 @@ const es = class es {
1361
1420
  <nine-table-analysis></nine-table-analysis>
1362
1421
  </nine-table-body>
1363
1422
  <nine-table-footer></nine-table-footer>
1364
- `, t(this, N).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");
1365
- const a = t(this, N).shadowRoot.querySelectorAll("nine-table-sheet");
1423
+ `, t(this, _).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");
1424
+ const a = t(this, _).shadowRoot.querySelectorAll("nine-table-sheet");
1366
1425
  a == null || a.forEach((c, l) => {
1367
1426
  e[l] && setTimeout(() => {
1368
- c.generate(e[l]), n && t(this, Ot).call(this);
1427
+ c.generate(e[l]), s && t(this, Bt).call(this);
1369
1428
  });
1370
1429
  });
1371
1430
  }, "#render"));
1372
- p(this, N, s), t(this, ce).call(this);
1431
+ p(this, _, n), t(this, fe).call(this);
1373
1432
  }
1374
1433
  };
1375
- N = new WeakMap(), ce = new WeakMap(), Ot = new WeakMap(), he = new WeakMap(), h(es, "LayoutManager");
1376
- let Ce = es;
1377
- var Wt, mt;
1378
- const ss = class ss {
1379
- constructor(s) {
1380
- d(this, Wt);
1381
- d(this, mt, -1);
1382
- q(this, "count", /* @__PURE__ */ h(() => t(this, Wt).rawRecords.length, "count"));
1383
- p(this, Wt, s);
1434
+ _ = new WeakMap(), fe = new WeakMap(), Bt = new WeakMap(), ue = new WeakMap(), h(ns, "LayoutManager");
1435
+ let Ie = ns;
1436
+ var Pt, yt;
1437
+ const rs = class rs {
1438
+ constructor(n) {
1439
+ f(this, Pt);
1440
+ f(this, yt, -1);
1441
+ q(this, "count", /* @__PURE__ */ h(() => t(this, Pt).rawRecords.length, "count"));
1442
+ p(this, Pt, n);
1384
1443
  }
1385
1444
  get at() {
1386
- return t(this, mt);
1445
+ return t(this, yt);
1387
1446
  }
1388
- set at(s) {
1389
- p(this, mt, parseInt(s, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, mt)}"]`) && setTimeout(() => {
1447
+ set at(n) {
1448
+ p(this, yt, parseInt(n, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, yt)}"]`) && setTimeout(() => {
1390
1449
  });
1391
1450
  }
1392
1451
  };
1393
- Wt = new WeakMap(), mt = new WeakMap(), h(ss, "ngRow");
1394
- let ke = ss;
1395
- var O, L, W, xt, de, Z, fe, dt, zt, ue, ge, wt;
1452
+ Pt = new WeakMap(), yt = new WeakMap(), h(rs, "ngRow");
1453
+ let He = rs;
1454
+ var O, L, W, mt, ge, G, be, ct, Ft, pe, ye, xt;
1396
1455
  const z = class z {
1397
- constructor(s, e) {
1398
- d(this, O);
1399
- d(this, L);
1400
- d(this, W, []);
1401
- d(this, xt, []);
1402
- d(this, de, 0);
1403
- d(this, Z, []);
1404
- d(this, fe, /* @__PURE__ */ h(() => {
1405
- p(this, Z, []);
1406
- const s = t(this, O).template || [];
1407
- Array.from(s).forEach((e) => {
1408
- var n;
1409
- t(this, Z).push(((n = e.getBoundingClientRect) == null ? void 0 : n.call(e).height) || 24);
1456
+ constructor(n, e) {
1457
+ f(this, O);
1458
+ f(this, L);
1459
+ f(this, W, []);
1460
+ f(this, mt, []);
1461
+ f(this, ge, 0);
1462
+ f(this, G, []);
1463
+ f(this, be, /* @__PURE__ */ h(() => {
1464
+ p(this, G, []);
1465
+ const n = t(this, O).template || [];
1466
+ Array.from(n).forEach((e) => {
1467
+ var s;
1468
+ t(this, G).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1410
1469
  }), (t(this, L).rawRecords || []).forEach((e) => {
1411
- e.__ng || (e.__ng = t(this, zt).call(this)), e.__ng.height = t(this, Z).slice();
1470
+ e.__ng || (e.__ng = t(this, Ft).call(this)), e.__ng.height = t(this, G).slice();
1412
1471
  });
1413
1472
  }, "#initialize"));
1414
- d(this, dt, /* @__PURE__ */ h(() => {
1415
- const s = t(this, O).shadowRoot.querySelector("nine-table-sheets");
1416
- s == null || s.classList.toggle("nodata", this.length === 0), t(this, O).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1473
+ f(this, ct, /* @__PURE__ */ h(() => {
1474
+ const n = t(this, O).shadowRoot.querySelector("nine-table-sheets");
1475
+ n == null || n.classList.toggle("nodata", this.length === 0), t(this, O).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1417
1476
  e.invalidate();
1418
1477
  });
1419
1478
  }, "#invalidate"));
1420
- q(this, "get", /* @__PURE__ */ h((s, e) => {
1479
+ q(this, "get", /* @__PURE__ */ h((n, e) => {
1421
1480
  var o;
1422
- const n = this.getValidData();
1423
- if (!n || n.length <= 0) return;
1424
- if (s == null) return t(this, wt).call(this, n);
1425
- if (s < 0 || s >= n.length) return null;
1481
+ const s = this.getValidData();
1482
+ if (!s || s.length <= 0) return;
1483
+ if (n == null) return t(this, xt).call(this, s);
1484
+ if (n < 0 || n >= s.length) return null;
1426
1485
  const r = typeof ((o = t(this, O).fields) == null ? void 0 : o.get) == "function" ? t(this, O).fields.get() : [];
1427
1486
  if (e != null) {
1428
1487
  const i = r.indexOf(e);
1429
- return i >= 0 ? n[s].v[i] : null;
1488
+ return i >= 0 ? s[n].v[i] : null;
1430
1489
  }
1431
- return t(this, wt).call(this, n[s]);
1490
+ return t(this, xt).call(this, s[n]);
1432
1491
  }, "get"));
1433
- q(this, "set", /* @__PURE__ */ h((s) => {
1434
- this.clear(), this.add(s, !1), t(this, dt).call(this);
1492
+ q(this, "set", /* @__PURE__ */ h((n) => {
1493
+ this.clear(), this.add(n, !1), t(this, ct).call(this);
1435
1494
  }, "set"));
1436
- d(this, zt, /* @__PURE__ */ h(() => ({
1495
+ f(this, Ft, /* @__PURE__ */ h(() => ({
1437
1496
  rowState: z.ROW_STATE.EMPTY,
1438
1497
  deleted: !1,
1439
1498
  filtered: !1,
1440
- height: t(this, Z).slice(),
1499
+ height: t(this, G).slice(),
1441
1500
  o: {},
1442
1501
  c: {},
1443
- _: [0, 0, 0, 0, z.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Z).slice(), -1, {}, {}]
1502
+ _: [0, 0, 0, 0, z.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, G).slice(), -1, {}, {}]
1444
1503
  }), "#getDefaultMeta"));
1445
1504
  q(this, "reset", /* @__PURE__ */ h(() => {
1446
- p(this, W, []), p(this, xt, []), t(this, dt).call(this);
1505
+ p(this, W, []), p(this, mt, []), t(this, ct).call(this);
1447
1506
  }, "reset"));
1448
1507
  q(this, "clear", /* @__PURE__ */ h(() => {
1449
- var s;
1450
- t(this, L).rawRecords = [], p(this, W, []), p(this, xt, []), (s = t(this, L).viewRecords) != null && s.reset && t(this, L).viewRecords.reset();
1508
+ var n;
1509
+ t(this, L).rawRecords = [], p(this, W, []), p(this, mt, []), (n = t(this, L).viewRecords) != null && n.reset && t(this, L).viewRecords.reset();
1451
1510
  }, "clear"));
1452
- d(this, ue, /* @__PURE__ */ h((s) => {
1511
+ f(this, pe, /* @__PURE__ */ h((n) => {
1453
1512
  var r;
1454
- Array.isArray(s) || (s = [s]);
1455
- const e = typeof ((r = t(this, O).fields) == null ? void 0 : r.get) == "function" ? t(this, O).fields.get() : Object.keys(s[0] || {}), n = [];
1456
- return s.forEach((o) => {
1513
+ Array.isArray(n) || (n = [n]);
1514
+ const e = typeof ((r = t(this, O).fields) == null ? void 0 : r.get) == "function" ? t(this, O).fields.get() : Object.keys(n[0] || {}), s = [];
1515
+ return n.forEach((o) => {
1457
1516
  const i = { v: [] };
1458
1517
  e.forEach((a) => {
1459
1518
  i.v.push(o[a] !== void 0 && o[a] !== null ? o[a] : "");
1460
- }), n.push(i);
1461
- }), n;
1519
+ }), s.push(i);
1520
+ }), s;
1462
1521
  }, "#json2Array"));
1463
- d(this, ge, /* @__PURE__ */ h((s) => (Array.isArray(s) || (s = [s]), s.forEach((e) => {
1464
- e.__ng = t(this, zt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = z.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1465
- }), s), "#defaultInsert"));
1466
- q(this, "add", /* @__PURE__ */ h((s, e = !0) => {
1467
- s === void 0 && (s = {});
1468
- const n = t(this, ue).call(this, s);
1469
- t(this, L).rawRecords = t(this, L).rawRecords.concat(t(this, ge).call(this, n)), this.resetRecords();
1522
+ f(this, ye, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
1523
+ e.__ng = t(this, Ft).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = z.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1524
+ }), n), "#defaultInsert"));
1525
+ q(this, "add", /* @__PURE__ */ h((n, e = !0) => {
1526
+ n === void 0 && (n = {});
1527
+ const s = t(this, pe).call(this, n);
1528
+ t(this, L).rawRecords = t(this, L).rawRecords.concat(t(this, ye).call(this, s)), this.resetRecords();
1470
1529
  const r = this.count() - 1;
1471
- return e || n.forEach((o, i) => {
1530
+ return e || s.forEach((o, i) => {
1472
1531
  const a = t(this, L).rawRecords[r - i];
1473
1532
  a && (a.__ng.rowState = z.ROW_STATE.EMPTY);
1474
- }), t(this, dt).call(this), r;
1533
+ }), t(this, ct).call(this), r;
1475
1534
  }, "add"));
1476
- q(this, "delete", /* @__PURE__ */ h((s) => {
1535
+ q(this, "delete", /* @__PURE__ */ h((n) => {
1477
1536
  let e = [];
1478
- Array.isArray(s) ? e = s : typeof s > "u" ? e = [t(this, L).host.row.at] : e = [parseInt(s, 10)], e.sort((n, r) => r - n).forEach((n) => {
1479
- if (t(this, W)[n]) {
1480
- const r = t(this, W)[n].__ng.rowid;
1481
- t(this, W)[n].__ng.rowState === z.ROW_STATE.INSERT ? t(this, L).rawRecords = t(this, L).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, L).rawRecords.forEach((o) => {
1537
+ Array.isArray(n) ? e = n : typeof n > "u" ? e = [t(this, L).host.row.at] : e = [parseInt(n, 10)], e.sort((s, r) => r - s).forEach((s) => {
1538
+ if (t(this, W)[s]) {
1539
+ const r = t(this, W)[s].__ng.rowid;
1540
+ t(this, W)[s].__ng.rowState === z.ROW_STATE.INSERT ? t(this, L).rawRecords = t(this, L).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, L).rawRecords.forEach((o) => {
1482
1541
  o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = z.ROW_STATE.DELETE);
1483
1542
  });
1484
1543
  }
1485
- }), this.resetRecords(), t(this, dt).call(this);
1544
+ }), this.resetRecords(), t(this, ct).call(this);
1486
1545
  }, "delete"));
1487
- q(this, "setValue", /* @__PURE__ */ h((s, e, n) => {
1546
+ q(this, "setValue", /* @__PURE__ */ h((n, e, s) => {
1488
1547
  var c;
1489
- s = parseInt(s, 10);
1548
+ n = parseInt(n, 10);
1490
1549
  const o = (typeof ((c = t(this, O).fields) == null ? void 0 : c.get) == "function" ? t(this, O).fields.get() : []).indexOf(e);
1491
1550
  if (o < 0) return;
1492
- const i = this.getValidData()[s];
1551
+ const i = this.getValidData()[n];
1493
1552
  if (!i) return;
1494
1553
  const a = i.v[o];
1495
- a !== n && i.__ng.rowState !== z.ROW_STATE.INSERT && (i.__ng.o.hasOwnProperty(e) || (i.__ng.o[e] = a), i.__ng.rowState = z.ROW_STATE.UPDATE), i.v[o] = n;
1554
+ a !== s && i.__ng.rowState !== z.ROW_STATE.INSERT && (i.__ng.o.hasOwnProperty(e) || (i.__ng.o[e] = a), i.__ng.rowState = z.ROW_STATE.UPDATE), i.v[o] = s;
1496
1555
  }, "setValue"));
1497
1556
  q(this, "resetRecords", /* @__PURE__ */ h(() => {
1498
- p(this, xt, 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) => {
1499
- s.__ng.rowidx = e;
1500
- }), t(this, W).forEach((s, e) => {
1501
- s.__ng.i = e;
1557
+ p(this, mt, t(this, L).rawRecords.filter((n) => !n.__ng.deleted)), p(this, W, t(this, L).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, L).rawRecords.forEach((n, e) => {
1558
+ n.__ng.rowidx = e;
1559
+ }), t(this, W).forEach((n, e) => {
1560
+ n.__ng.i = e;
1502
1561
  });
1503
1562
  }, "resetRecords"));
1504
1563
  q(this, "getValidData", /* @__PURE__ */ h(() => (t(this, W).length === 0 && t(this, L).rawRecords.length > 0 && this.resetRecords(), t(this, W)), "getValidData"));
1505
- d(this, wt, /* @__PURE__ */ h((s) => {
1564
+ f(this, xt, /* @__PURE__ */ h((n) => {
1506
1565
  var i;
1507
- if (!s) return s;
1508
- const e = !Array.isArray(s), n = e ? [s] : s, r = typeof ((i = t(this, O).fields) == null ? void 0 : i.get) == "function" ? t(this, O).fields.get() : [], o = n.filter((a) => !a.__ng.deleted).map((a) => {
1566
+ if (!n) return n;
1567
+ const e = !Array.isArray(n), s = e ? [n] : n, r = typeof ((i = t(this, O).fields) == null ? void 0 : i.get) == "function" ? t(this, O).fields.get() : [], o = s.filter((a) => !a.__ng.deleted).map((a) => {
1509
1568
  const c = {};
1510
- return r.forEach((l, u) => {
1511
- c[l] = a.v ? a.v[u] : a[l];
1569
+ return r.forEach((l, d) => {
1570
+ c[l] = a.v ? a.v[d] : a[l];
1512
1571
  }), c.__ng = a.__ng, c;
1513
1572
  });
1514
1573
  return e ? o[0] : o;
1515
1574
  }, "#conv"));
1516
1575
  q(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1517
- p(this, O, s), p(this, L, e), t(this, fe).call(this);
1576
+ p(this, O, n), p(this, L, e), t(this, be).call(this);
1518
1577
  }
1519
1578
  get source() {
1520
- return t(this, wt).call(this, t(this, L).rawRecords);
1579
+ return t(this, xt).call(this, t(this, L).rawRecords);
1521
1580
  }
1522
- set source(s) {
1523
- this.clear(), this.add(s, !1);
1581
+ set source(n) {
1582
+ this.clear(), this.add(n, !1);
1524
1583
  }
1525
1584
  get nextId() {
1526
- return ++gs(this, de)._;
1585
+ return ++ys(this, ge)._;
1527
1586
  }
1528
1587
  get count() {
1529
1588
  return t(this, W).length;
@@ -1535,7 +1594,7 @@ const z = class z {
1535
1594
  return this.length;
1536
1595
  }
1537
1596
  };
1538
- O = new WeakMap(), L = new WeakMap(), W = new WeakMap(), xt = new WeakMap(), de = new WeakMap(), Z = new WeakMap(), fe = new WeakMap(), dt = new WeakMap(), zt = new WeakMap(), ue = new WeakMap(), ge = new WeakMap(), wt = new WeakMap(), h(z, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1597
+ O = new WeakMap(), L = new WeakMap(), W = new WeakMap(), mt = new WeakMap(), ge = new WeakMap(), G = new WeakMap(), be = new WeakMap(), ct = new WeakMap(), Ft = new WeakMap(), pe = new WeakMap(), ye = new WeakMap(), xt = new WeakMap(), h(z, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1539
1598
  q(z, "ROW_STATE", {
1540
1599
  EMPTY: "EMPTY",
1541
1600
  NORMAL: "NORMAL",
@@ -1543,58 +1602,58 @@ q(z, "ROW_STATE", {
1543
1602
  UPDATE: "UPDATE",
1544
1603
  DELETE: "DELETE"
1545
1604
  });
1546
- let Le = z;
1547
- var ft;
1548
- const ns = class ns {
1549
- constructor(s) {
1550
- d(this, ft);
1551
- p(this, ft, s), this.row = new ke(this), this.data = new Le(t(this, ft), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1605
+ let Me = z;
1606
+ var ht;
1607
+ const os = class os {
1608
+ constructor(n) {
1609
+ f(this, ht);
1610
+ p(this, ht, n), this.row = new He(this), this.data = new Me(t(this, ht), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1552
1611
  var e;
1553
- (e = t(this, ft).view) != null && e.redraw && t(this, ft).view.redraw();
1612
+ (e = t(this, ht).view) != null && e.redraw && t(this, ht).view.redraw();
1554
1613
  }, this.setDataSource = (e) => {
1555
1614
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1556
1615
  }, this.getRowState = (e) => {
1557
1616
  var r, o;
1558
- const n = parseInt(e, 10);
1559
- if (!(n >= this.data.count()))
1560
- return (o = (r = this.data.getValidData()[n]) == null ? void 0 : r.__ng) == null ? void 0 : o.rowState;
1617
+ const s = parseInt(e, 10);
1618
+ if (!(s >= this.data.count()))
1619
+ return (o = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : o.rowState;
1561
1620
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1562
1621
  this.row.at = e;
1563
- }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, n) => this.data.get(e, n), this.setColumn = (e, n, r) => {
1564
- e = parseInt(e, 10), this.data.setValue(e, n, r);
1622
+ }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, s) => this.data.get(e, s), this.setColumn = (e, s, r) => {
1623
+ e = parseInt(e, 10), this.data.setValue(e, s, r);
1565
1624
  }, this.setDataSource([]);
1566
1625
  }
1567
1626
  };
1568
- ft = new WeakMap(), h(ns, "ngDataManager");
1569
- let Ie = ns;
1570
- var vt, M, Bt, be;
1571
- const rs = class rs {
1627
+ ht = new WeakMap(), h(os, "ngDataManager");
1628
+ let $e = os;
1629
+ var wt, M, jt, me;
1630
+ const is = class is {
1572
1631
  // 🎯 이제 { name: string, type: string } 객체들의 배열로 관리합니다.
1573
- constructor(s) {
1574
- d(this, vt);
1575
- d(this, M, []);
1576
- q(this, "add", /* @__PURE__ */ h((s, e = "string") => {
1577
- s.forEach((n) => {
1578
- t(this, M).some((r) => r.name === n) || t(this, M).push({ name: n, type: e });
1579
- }), t(this, Bt).call(this);
1632
+ constructor(n) {
1633
+ f(this, wt);
1634
+ f(this, M, []);
1635
+ q(this, "add", /* @__PURE__ */ h((n, e = "string") => {
1636
+ n.forEach((s) => {
1637
+ t(this, M).some((r) => r.name === s) || t(this, M).push({ name: s, type: e });
1638
+ }), t(this, jt).call(this);
1580
1639
  }, "add"));
1581
- d(this, Bt, /* @__PURE__ */ h(() => {
1582
- const s = /* @__PURE__ */ new Map();
1640
+ f(this, jt, /* @__PURE__ */ h(() => {
1641
+ const n = /* @__PURE__ */ new Map();
1583
1642
  t(this, M).forEach((e) => {
1584
- s.set(e.name, e.type);
1585
- }), p(this, M, Array.from(s, ([e, n]) => ({ name: e, type: n }))), p(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);
1643
+ n.set(e.name, e.type);
1644
+ }), p(this, M, Array.from(n, ([e, s]) => ({ name: e, type: s }))), p(this, M, t(this, M).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, M).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1586
1645
  }, "#adjust"));
1587
- d(this, be, /* @__PURE__ */ h(() => {
1588
- p(this, M, []), S.log(t(this, vt).querySelectorAll("table"));
1589
- const s = Array.from(t(this, vt).querySelectorAll("table"));
1590
- if (!(!s || s.length === 0)) {
1591
- for (const e of s)
1592
- S.log(e), $("[data-bind]", e).each((n, r) => {
1646
+ f(this, me, /* @__PURE__ */ h(() => {
1647
+ p(this, M, []), S.log(t(this, wt).querySelectorAll("table"));
1648
+ const n = Array.from(t(this, wt).querySelectorAll("table"));
1649
+ if (!(!n || n.length === 0)) {
1650
+ for (const e of n)
1651
+ S.log(e), $("[data-bind]", e).each((s, r) => {
1593
1652
  const o = r.dataset.bind, i = r.getAttribute("data-type") || "string";
1594
1653
  o && t(this, M).push({ name: o, type: i });
1595
- }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((n) => {
1596
- $(`[${n}]`, e).each((r, o) => {
1597
- var i = o.getAttribute(n);
1654
+ }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1655
+ $(`[${s}]`, e).each((r, o) => {
1656
+ var i = o.getAttribute(s);
1598
1657
  if (i.indexOf("data.") < 0) {
1599
1658
  const a = i.search(/[(]/g);
1600
1659
  if (a > 0)
@@ -1613,68 +1672,68 @@ const rs = class rs {
1613
1672
  });
1614
1673
  });
1615
1674
  });
1616
- t(this, Bt).call(this);
1675
+ t(this, jt).call(this);
1617
1676
  }
1618
1677
  }, "#init"));
1619
- p(this, vt, s), t(this, be).call(this);
1678
+ p(this, wt, n), t(this, me).call(this);
1620
1679
  }
1621
1680
  // 🎯 기존에 필드 이름만 쓰던 곳들과의 호환을 위해 이름 배열만 리턴하는 메서드 유지
1622
1681
  get() {
1623
- return t(this, M).map((s) => s.name);
1682
+ return t(this, M).map((n) => n.name);
1624
1683
  }
1625
1684
  // 🎯 내부 객체 통째로 얻기
1626
1685
  getFields() {
1627
1686
  return t(this, M);
1628
1687
  }
1629
1688
  // 🎯 특정 필드의 데이터 타입 조회
1630
- getType(s) {
1631
- const e = t(this, M).find((n) => n.name === s);
1689
+ getType(n) {
1690
+ const e = t(this, M).find((s) => s.name === n);
1632
1691
  return e ? e.type : "string";
1633
1692
  }
1634
- indexOf(s) {
1635
- return t(this, M).findIndex((e) => e.name === s);
1693
+ indexOf(n) {
1694
+ return t(this, M).findIndex((e) => e.name === n);
1636
1695
  }
1637
- includes(s) {
1638
- return t(this, M).some((e) => e.name === s);
1696
+ includes(n) {
1697
+ return t(this, M).some((e) => e.name === n);
1639
1698
  }
1640
1699
  };
1641
- vt = new WeakMap(), M = new WeakMap(), Bt = new WeakMap(), be = new WeakMap(), h(rs, "ngFields");
1642
- let He = rs;
1643
- var ut, pe, ye;
1644
- const os = class os extends HTMLElement {
1700
+ wt = new WeakMap(), M = new WeakMap(), jt = new WeakMap(), me = new WeakMap(), h(is, "ngFields");
1701
+ let Ne = is;
1702
+ var dt, xe, we;
1703
+ const as = class as extends HTMLElement {
1645
1704
  constructor() {
1646
1705
  super();
1647
1706
  //#created = false;
1648
- d(this, ut);
1649
- d(this, pe);
1650
- d(this, ye, /* @__PURE__ */ h(() => {
1651
- this.fields = new He(this), p(this, pe, new Ce(this)), S.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1707
+ f(this, dt);
1708
+ f(this, xe);
1709
+ f(this, we, /* @__PURE__ */ h(() => {
1710
+ this.fields = new Ne(this), p(this, xe, new Ie(this)), S.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1652
1711
  }, "#init"));
1653
- this.attachShadow({ mode: "open" }), p(this, ut, new Ie(this));
1712
+ this.attachShadow({ mode: "open" }), p(this, dt, new $e(this));
1654
1713
  }
1655
1714
  connectedCallback() {
1656
- t(this, ye).call(this);
1715
+ t(this, we).call(this);
1657
1716
  }
1658
1717
  disconnectedCallback() {
1659
1718
  S.log("NineTable disconnected.");
1660
1719
  }
1661
1720
  // 🎯 외부에서 grid.data.set(...) 형태로 접근할 수 있도록 데이터 매니저 오픈
1662
1721
  get data() {
1663
- return t(this, ut).data;
1722
+ return t(this, dt).data;
1664
1723
  }
1665
1724
  // 🎯 행(row) 관련 제어 접근자 오픈
1666
1725
  get row() {
1667
- return t(this, ut).row;
1726
+ return t(this, dt).row;
1668
1727
  }
1669
1728
  // 🎯 전체 데이터 매니저 접근 필요할 경우
1670
1729
  get dataManager() {
1671
- return t(this, ut);
1730
+ return t(this, dt);
1672
1731
  }
1673
1732
  };
1674
- ut = new WeakMap(), pe = new WeakMap(), ye = new WeakMap(), h(os, "NineTable");
1675
- let $e = os;
1676
- customElements.get("nine-table") || customElements.define("nine-table", $e);
1677
- const qt = class qt extends HTMLElement {
1733
+ dt = new WeakMap(), xe = new WeakMap(), we = new WeakMap(), h(as, "NineTable");
1734
+ let _e = as;
1735
+ customElements.get("nine-table") || customElements.define("nine-table", _e);
1736
+ const Et = class Et extends HTMLElement {
1678
1737
  // 👈 커스텀 스타일용 캐시 추가
1679
1738
  constructor() {
1680
1739
  super();
@@ -1685,31 +1744,31 @@ const qt = class qt extends HTMLElement {
1685
1744
  connectedCallback() {
1686
1745
  }
1687
1746
  };
1688
- h(qt, "BasicCellElement"), q(qt, "_styleCache", /* @__PURE__ */ new Map()), q(qt, "_customStyleCache", /* @__PURE__ */ new Map());
1689
- let Me = qt;
1690
- var I, Pt, x, Pe, Fe, je, Ye, Ve;
1691
- const is = class is extends Me {
1747
+ h(Et, "BasicCellElement"), q(Et, "_styleCache", /* @__PURE__ */ new Map()), q(Et, "_customStyleCache", /* @__PURE__ */ new Map());
1748
+ let De = Et;
1749
+ var I, Yt, x, je, Ye, Ve, Ue, Xe;
1750
+ const ls = class ls extends De {
1692
1751
  constructor() {
1693
1752
  super();
1694
- d(this, I);
1695
- d(this, Pt);
1696
- d(this, x);
1697
- d(this, Pe);
1698
- d(this, Fe);
1699
- d(this, je);
1700
- d(this, Ye);
1753
+ f(this, I);
1754
+ f(this, Yt);
1755
+ f(this, x);
1756
+ f(this, je);
1757
+ f(this, Ye);
1758
+ f(this, Ve);
1759
+ f(this, Ue);
1701
1760
  q(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1702
1761
  if (t(this, x))
1703
1762
  if (t(this, x).closest("tbody")) {
1704
- const n = t(this, x).closest("tr").data, r = parseInt(t(this, x).dataset.row);
1705
- if (!n) return "";
1763
+ const s = t(this, x).closest("tr").data, r = parseInt(t(this, x).dataset.row);
1764
+ if (!s) return "";
1706
1765
  if (ninegrid.isNull(t(this, x).dataset.expr)) {
1707
1766
  if (!ninegrid.isNull(t(this, x).dataset.bind))
1708
- return n[t(this, x).dataset.bind] || ninegrid.nvl(e, "");
1767
+ return s[t(this, x).dataset.bind] || ninegrid.nvl(e, "");
1709
1768
  } else try {
1710
- return this.getExprValue(t(this, x).dataset.expr, n, r, t(this, x));
1769
+ return this.getExprValue(t(this, x).dataset.expr, s, r, t(this, x));
1711
1770
  } catch {
1712
- console.error(t(this, x).dataset.expr, n, t(this, x).dataset.row);
1771
+ console.error(t(this, x).dataset.expr, s, t(this, x).dataset.row);
1713
1772
  }
1714
1773
  return ninegrid.nvl(e, "");
1715
1774
  } else
@@ -1718,22 +1777,22 @@ const is = class is extends Me {
1718
1777
  } catch {
1719
1778
  }
1720
1779
  }, "getDisplayText"));
1721
- d(this, Ve, /* @__PURE__ */ h(() => {
1780
+ f(this, Xe, /* @__PURE__ */ h(() => {
1722
1781
  if (!(!t(this, I) || !t(this, I).template || !t(this, x).closest("tbody.bindable"))) {
1723
1782
  var e = ninegrid.j.querySelectorAll(t(this, x)).attr("suppress");
1724
1783
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1725
- var n = t(this, x).closest("tr"), r = [];
1726
- $("th,td", n).each((m, C) => {
1784
+ var s = t(this, x).closest("tr"), r = [];
1785
+ $("th,td", s).each((m, C) => {
1727
1786
  var A = ninegrid.j.querySelectorAll(C).attr("suppress");
1728
1787
  A && C.dataset.row && (A = parseInt(A), !isNaN(A) && A <= e && r.push(A));
1729
1788
  }), r.sort();
1730
1789
  var o = !1;
1731
- if (parseInt(n.sectionRowIndex / t(this, I).template.length) > 0)
1790
+ if (parseInt(s.sectionRowIndex / t(this, I).template.length) > 0)
1732
1791
  for (var i of r) {
1733
1792
  if (i > e) break;
1734
- var a = parseInt(t(this, x).dataset.row), c = a - 1, l = t(this, x).closest("tr").data, u = t(this, I).data.get(c);
1793
+ var a = parseInt(t(this, x).dataset.row), c = a - 1, l = t(this, x).closest("tr").data, d = t(this, I).data.get(c);
1735
1794
  t(this, x).dataset.matrixRow;
1736
- var f = t(this, I).body.querySelector(`tbody.bindable [suppress="${i}"][data-matrix-row="${t(this, x).dataset.matrixRow}"]`), b = f.dataset.expr ? this.getExprValue(f.dataset.expr, l, a) : l[f.dataset.bind], g = f.dataset.expr ? this.getExprValue(f.dataset.expr, u, c) : u[f.dataset.bind];
1795
+ var u = t(this, I).body.querySelector(`tbody.bindable [suppress="${i}"][data-matrix-row="${t(this, x).dataset.matrixRow}"]`), b = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, a) : l[u.dataset.bind], g = u.dataset.expr ? this.getExprValue(u.dataset.expr, d, c) : d[u.dataset.bind];
1737
1796
  if (b != g) {
1738
1797
  o = !0;
1739
1798
  break;
@@ -1747,12 +1806,12 @@ const is = class is extends Me {
1747
1806
  }
1748
1807
  }
1749
1808
  }, "#resetSuppress"));
1750
- q(this, "getExprValue", /* @__PURE__ */ h((e, n, r, o) => {
1809
+ q(this, "getExprValue", /* @__PURE__ */ h((e, s, r, o) => {
1751
1810
  if (typeof e < "u")
1752
1811
  try {
1753
1812
  r = parseInt(r);
1754
1813
  const i = e.replace("()", "");
1755
- return t(this, I)[i] ? t(this, I)[i].call(this, n, r, t(this, x)) : t(this, I).exprFunction(e).call(this, n, r, t(this, I).data);
1814
+ return t(this, I)[i] ? t(this, I)[i].call(this, s, r, t(this, x)) : t(this, I).exprFunction(e).call(this, s, r, t(this, I).data);
1756
1815
  } catch {
1757
1816
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1758
1817
  }
@@ -1761,16 +1820,16 @@ const is = class is extends Me {
1761
1820
  }, "getExprValue"));
1762
1821
  }
1763
1822
  connectedCallback() {
1764
- super.connectedCallback(), p(this, I, this.getRootNode().host), p(this, x, this.closest("th,td")), p(this, Pt, t(this, x).closest("tr"));
1823
+ super.connectedCallback(), p(this, I, this.getRootNode().host), p(this, x, this.closest("th,td")), p(this, Yt, t(this, x).closest("tr"));
1765
1824
  }
1766
1825
  get value() {
1767
1826
  var e = !t(this, I) || !t(this, I).dataManager || !t(this, x) || !t(this, x).dataset || !t(this, x).dataset.row || !t(this, x).dataset.bind ? "" : t(this, x).closest("tr").data[t(this, x).dataset.bind];
1768
1827
  return e ?? "";
1769
1828
  }
1770
1829
  set value(e) {
1771
- var n = parseInt(t(this, x).dataset.row);
1830
+ var s = parseInt(t(this, x).dataset.row);
1772
1831
  const r = this.getAttribute("update-row-state") != "false";
1773
- n < 0 ? t(this, I).data.setValueNF(parseInt(t(this, x).dataset.index), t(this, x).dataset.bind, e, r) : t(this, I).data.setValue(n, t(this, x).dataset.bind, e, r);
1832
+ s < 0 ? t(this, I).data.setValueNF(parseInt(t(this, x).dataset.index), t(this, x).dataset.bind, e, r) : t(this, I).data.setValue(s, t(this, x).dataset.bind, e, r);
1774
1833
  }
1775
1834
  get row() {
1776
1835
  return parseInt(t(this, x).dataset.row);
@@ -1780,12 +1839,12 @@ const is = class is extends Me {
1780
1839
  }
1781
1840
  refresh() {
1782
1841
  const e = t(this, x).dataset.bind;
1783
- return parseInt(t(this, x).dataset.row), t(this, Pt).data[e];
1842
+ return parseInt(t(this, x).dataset.row), t(this, Yt).data[e];
1784
1843
  }
1785
1844
  };
1786
- I = new WeakMap(), Pt = new WeakMap(), x = new WeakMap(), Pe = new WeakMap(), Fe = new WeakMap(), je = new WeakMap(), Ye = new WeakMap(), Ve = new WeakMap(), h(is, "CellElement");
1787
- let _e = is;
1788
- const as = class as extends _e {
1845
+ I = new WeakMap(), Yt = new WeakMap(), x = new WeakMap(), je = new WeakMap(), Ye = new WeakMap(), Ve = new WeakMap(), Ue = new WeakMap(), Xe = new WeakMap(), h(ls, "CellElement");
1846
+ let Oe = ls;
1847
+ const cs = class cs extends Oe {
1789
1848
  constructor() {
1790
1849
  super();
1791
1850
  }
@@ -1796,21 +1855,21 @@ const as = class as extends _e {
1796
1855
  return super.refresh();
1797
1856
  }
1798
1857
  };
1799
- h(as, "EditableCellElement");
1800
- let Ne = as;
1801
- var Ft, gt, St, Rt, me, J, Ue;
1802
- const ls = class ls extends Ne {
1858
+ h(cs, "EditableCellElement");
1859
+ let We = cs;
1860
+ var Vt, ft, vt, St, ve, K, Ge;
1861
+ const hs = class hs extends We {
1803
1862
  constructor() {
1804
1863
  super();
1805
- d(this, Ft);
1806
- d(this, gt);
1807
- d(this, St);
1808
- d(this, Rt);
1809
- d(this, me);
1810
- d(this, J);
1864
+ f(this, Vt);
1865
+ f(this, ft);
1866
+ f(this, vt);
1867
+ f(this, St);
1868
+ f(this, ve);
1869
+ f(this, K);
1811
1870
  q(this, "refresh", /* @__PURE__ */ h(() => {
1812
1871
  const e = super.refresh();
1813
- t(this, Ft).value = e;
1872
+ t(this, Vt).value = e;
1814
1873
  }, "refresh"));
1815
1874
  /**
1816
1875
  dataRefresh = (v) => {
@@ -1842,36 +1901,36 @@ const ls = class ls extends Ne {
1842
1901
  if (!v) this.reset();
1843
1902
  };
1844
1903
  */
1845
- d(this, Ue, /* @__PURE__ */ h((e) => {
1904
+ f(this, Ge, /* @__PURE__ */ h((e) => {
1846
1905
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1847
- if (t(this, gt) == "number") {
1906
+ if (t(this, ft) == "number") {
1848
1907
  let o = [];
1849
- if (t(this, J) && Number(t(this, J)) > 0 && o.push("."), t(this, Rt) && Number(t(this, Rt)) >= 0 && o.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !o.includes(e.key) && e.preventDefault(), t(this, J) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1850
- var n = e.target.value, r = n.indexOf(".");
1908
+ if (t(this, K) && Number(t(this, K)) > 0 && o.push("."), t(this, St) && Number(t(this, St)) >= 0 && o.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !o.includes(e.key) && e.preventDefault(), t(this, K) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1909
+ var s = e.target.value, r = s.indexOf(".");
1851
1910
  if (r >= 0) {
1852
- var n = n.substr(r + 1, n.length);
1853
- n.length >= Number(t(this, J)) && e.preventDefault();
1911
+ var s = s.substr(r + 1, s.length);
1912
+ s.length >= Number(t(this, K)) && e.preventDefault();
1854
1913
  }
1855
1914
  }
1856
1915
  }
1857
- t(this, St) && ninegrid.getByteLength(e.target.value) >= Number(t(this, St)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1916
+ t(this, vt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, vt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1858
1917
  }
1859
1918
  }, "#onKeyDown"));
1860
- if (this.applyBaseStyle(), p(this, gt, this.getAttribute("type") || "text"), p(this, St, this.getAttribute("maxbyte")), p(this, Rt, this.getAttribute("min")), p(this, me, this.getAttribute("max")), p(this, J, this.getAttribute("scale")), !["text", "number"].includes(t(this, gt))) throw `invalid type : ${t(this, gt)}`;
1919
+ if (this.applyBaseStyle(), p(this, ft, this.getAttribute("type") || "text"), p(this, vt, this.getAttribute("maxbyte")), p(this, St, this.getAttribute("min")), p(this, ve, this.getAttribute("max")), p(this, K, this.getAttribute("scale")), !["text", "number"].includes(t(this, ft))) throw `invalid type : ${t(this, ft)}`;
1861
1920
  }
1862
1921
  connectedCallback() {
1863
- for (var e = [], n = 0; n < this.attributes.length; n++)
1864
- ["type", "maxlength", "maxbyte", "min", "max", "step", "scale", "text-align"].includes(this.attributes[n].name) && e.push(`${this.attributes[n].name}="${this.attributes[n].value}"`);
1922
+ for (var e = [], s = 0; s < this.attributes.length; s++)
1923
+ ["type", "maxlength", "maxbyte", "min", "max", "step", "scale", "text-align"].includes(this.attributes[s].name) && e.push(`${this.attributes[s].name}="${this.attributes[s].value}"`);
1865
1924
  this.innerHTML = `
1866
1925
  <input type="text"
1867
1926
  ${e.join(" ")}
1868
1927
  ondragstart="return false;"
1869
1928
  >
1870
- `, super.connectedCallback(), p(this, Ft, this.querySelector("input"));
1929
+ `, super.connectedCallback(), p(this, Vt, this.querySelector("input"));
1871
1930
  }
1872
1931
  };
1873
- Ft = new WeakMap(), gt = new WeakMap(), St = new WeakMap(), Rt = new WeakMap(), me = new WeakMap(), J = new WeakMap(), Ue = new WeakMap(), h(ls, "CellInputText");
1874
- let De = ls;
1932
+ Vt = new WeakMap(), ft = new WeakMap(), vt = new WeakMap(), St = new WeakMap(), ve = new WeakMap(), K = new WeakMap(), Ge = new WeakMap(), h(hs, "CellInputText");
1933
+ let ze = hs;
1875
1934
  customElements.get("cell-input-text");
1876
- customElements.get("cell-input") || customElements.define("cell-input", De);
1935
+ customElements.get("cell-input") || customElements.define("cell-input", ze);
1877
1936
  //# sourceMappingURL=nine-table.js.map