@ninebone/table 0.0.530 → 0.0.532

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,30 +1,30 @@
1
- var je = Object.defineProperty;
2
- var Fe = (R) => {
1
+ var Fe = Object.defineProperty;
2
+ var Ve = (R) => {
3
3
  throw TypeError(R);
4
4
  };
5
- var Ue = (R, i, e) => i in R ? je(R, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : R[i] = e;
6
- var h = (R, i) => je(R, "name", { value: i, configurable: !0 });
7
- var E = (R, i, e) => Ue(R, typeof i != "symbol" ? i + "" : i, e), Ve = (R, i, e) => i.has(R) || Fe("Cannot " + e);
8
- var t = (R, i, e) => (Ve(R, i, "read from private field"), e ? e.call(R) : i.get(R)), d = (R, i, e) => i.has(R) ? Fe("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(R) : i.set(R, e), y = (R, i, e, s) => (Ve(R, i, "write to private field"), s ? s.call(R, e) : i.set(R, e), e);
9
- var Ye = (R, i, e, s) => ({
10
- set _(r) {
11
- y(R, i, r, e);
5
+ var Xe = (R, r, e) => r in R ? Fe(R, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : R[r] = e;
6
+ var h = (R, r) => Fe(R, "name", { value: r, configurable: !0 });
7
+ var A = (R, r, e) => Xe(R, typeof r != "symbol" ? r + "" : r, e), Ye = (R, r, e) => r.has(R) || Ve("Cannot " + e);
8
+ var t = (R, r, e) => (Ye(R, r, "read from private field"), e ? e.call(R) : r.get(R)), d = (R, r, e) => r.has(R) ? Ve("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(R) : r.set(R, e), y = (R, r, e, s) => (Ye(R, r, "write to private field"), s ? s.call(R, e) : r.set(R, e), e);
9
+ var Ue = (R, r, e, s) => ({
10
+ set _(i) {
11
+ y(R, r, i, e);
12
12
  },
13
13
  get _() {
14
- return t(R, i, s);
14
+ return t(R, r, s);
15
15
  }
16
16
  });
17
- import { trace as Xe } from "@ninebone/util";
18
- const Le = class Le extends Xe.constructor {
17
+ import { trace as Ke } from "@ninebone/util";
18
+ const He = class He extends Ke.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- h(Le, "Trace");
24
- let oe = Le;
25
- const C = new oe();
26
- var z, j, w, X, K, Z, It, G, _t;
27
- const He = class He extends HTMLElement {
23
+ h(He, "Trace");
24
+ let ae = He;
25
+ const H = new ae();
26
+ var z, j, w, X, K, Z, _t, G, Nt;
27
+ const Me = class Me extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  d(this, z);
@@ -33,73 +33,73 @@ const He = class He extends HTMLElement {
33
33
  d(this, X);
34
34
  d(this, K);
35
35
  d(this, Z);
36
- d(this, It, /* @__PURE__ */ h(() => {
36
+ d(this, _t, /* @__PURE__ */ h(() => {
37
37
  if (!t(this, z)) return;
38
38
  const e = t(this, z).querySelector(".ng-container-body .ng-part-body");
39
39
  e && (y(this, Z, new ResizeObserver(() => {
40
40
  this.refresh();
41
41
  })), t(this, Z).observe(e));
42
42
  }, "#observeResize"));
43
- E(this, "refresh", /* @__PURE__ */ h(() => {
43
+ A(this, "refresh", /* @__PURE__ */ h(() => {
44
44
  if (!t(this, z) || !t(this, w) || t(this, j)) return;
45
45
  const e = t(this, w).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const r = t(this, w).track, n = t(this, w).thumb, a = t(this, z).querySelector(".ng-container-bottom"), o = e.clientWidth, c = s.scrollWidth;
47
+ const i = t(this, w).track, n = t(this, w).thumb, a = t(this, z).querySelector(".ng-container-bottom"), o = e.clientWidth, c = s.scrollWidth;
48
48
  if (o !== 0 && c > o)
49
49
  a && (a.style.display = "flex");
50
50
  else {
51
51
  a && (a.style.display = "none");
52
52
  return;
53
53
  }
54
- const l = r.clientWidth;
54
+ const l = i.clientWidth;
55
55
  if (l <= 0) return;
56
56
  const f = Math.max(Math.min(l * (o / c), l), 20);
57
57
  n.style.width = `${f}px`;
58
- const u = e.scrollLeft, g = c - o;
59
- let b = 0;
60
- g > 0 && (b = parseInt(u / g * (l - f), 10)), b < 0 && (b = 0);
61
- const x = l - f;
62
- b > x && (b = x), n.style.left = `${b}px`, t(this, w).left.disabled = b === 0, t(this, w).right.disabled = b >= x - 1;
58
+ const u = e.scrollLeft, b = c - o;
59
+ let g = 0;
60
+ b > 0 && (g = parseInt(u / b * (l - f), 10)), g < 0 && (g = 0);
61
+ const m = l - f;
62
+ g > m && (g = m), n.style.left = `${g}px`, t(this, w).left.disabled = g === 0, t(this, w).right.disabled = g >= m - 1;
63
63
  }, "refresh"));
64
64
  d(this, G, /* @__PURE__ */ h((e) => {
65
65
  if (!t(this, w)) return !1;
66
- const s = t(this, w).container, r = s.querySelector("table");
67
- if (!r) return !1;
66
+ const s = t(this, w).container, i = s.querySelector("table");
67
+ if (!i) return !1;
68
68
  const n = t(this, w).track.getBoundingClientRect(), a = t(this, w).thumb.clientWidth;
69
69
  let o = e;
70
70
  o < 0 && (o = 0);
71
71
  const c = n.width - a;
72
72
  o > c && (o = c), o = parseInt(o, 10), t(this, w).thumb.style.left = `${o}px`, t(this, w).left.disabled = o === 0, t(this, w).right.disabled = o >= c - 1;
73
- const l = s.clientWidth, u = r.scrollWidth - l;
73
+ const l = s.clientWidth, u = i.scrollWidth - l;
74
74
  return c > 0 && u > 0 && (s.scrollLeft = o / c * u), o > 0 && o < c - 1;
75
75
  }, "#thumbMoveTo"));
76
- d(this, _t, /* @__PURE__ */ h(() => {
77
- const e = /* @__PURE__ */ h((r) => {
76
+ d(this, Nt, /* @__PURE__ */ h(() => {
77
+ const e = /* @__PURE__ */ h((i) => {
78
78
  clearInterval(t(this, X)), clearInterval(t(this, K));
79
79
  const n = parseInt(t(this, w).thumb.style.left || 0, 10);
80
- t(this, G).call(this, n + r), y(this, X, setInterval(() => {
80
+ t(this, G).call(this, n + i), y(this, X, setInterval(() => {
81
81
  clearInterval(t(this, X)), y(this, K, setInterval(() => {
82
82
  const a = parseInt(t(this, w).thumb.style.left || 0, 10);
83
- t(this, G).call(this, a + r) || clearInterval(t(this, K));
83
+ t(this, G).call(this, a + i) || clearInterval(t(this, K));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ h(() => {
87
87
  clearInterval(t(this, X)), clearInterval(t(this, K));
88
88
  }, "clearTimer");
89
- ["mouseup", "mouseleave", "touchend"].forEach((r) => {
90
- t(this, w).left.addEventListener(r, s), t(this, w).right.addEventListener(r, s), t(this, w).track.addEventListener(r, s);
91
- }), t(this, w).left.addEventListener("mousedown", (r) => {
92
- r.button === 0 && e(-20);
93
- }), t(this, w).right.addEventListener("mousedown", (r) => {
94
- r.button === 0 && e(20);
95
- }), t(this, w).left.addEventListener("touchstart", () => e(-20)), t(this, w).right.addEventListener("touchstart", () => e(20)), t(this, w).track.addEventListener("mousedown", (r) => {
96
- if (r.button !== 0) return;
97
- r.preventDefault();
89
+ ["mouseup", "mouseleave", "touchend"].forEach((i) => {
90
+ t(this, w).left.addEventListener(i, s), t(this, w).right.addEventListener(i, s), t(this, w).track.addEventListener(i, s);
91
+ }), t(this, w).left.addEventListener("mousedown", (i) => {
92
+ i.button === 0 && e(-20);
93
+ }), t(this, w).right.addEventListener("mousedown", (i) => {
94
+ i.button === 0 && e(20);
95
+ }), t(this, w).left.addEventListener("touchstart", () => e(-20)), t(this, w).right.addEventListener("touchstart", () => e(20)), t(this, w).track.addEventListener("mousedown", (i) => {
96
+ if (i.button !== 0) return;
97
+ i.preventDefault();
98
98
  const n = t(this, w).track.getBoundingClientRect(), a = t(this, w).thumb.clientWidth;
99
- t(this, G).call(this, r.clientX - n.left - a / 2);
100
- }), t(this, w).thumb.addEventListener("mousedown", (r) => {
101
- if (r.button !== 0) return;
102
- r.stopPropagation(), r.preventDefault(), y(this, j, !0), this.shiftX = r.clientX - t(this, w).thumb.getBoundingClientRect().left;
99
+ t(this, G).call(this, i.clientX - n.left - a / 2);
100
+ }), t(this, w).thumb.addEventListener("mousedown", (i) => {
101
+ if (i.button !== 0) return;
102
+ i.stopPropagation(), i.preventDefault(), y(this, j, !0), this.shiftX = i.clientX - t(this, w).thumb.getBoundingClientRect().left;
103
103
  const n = /* @__PURE__ */ h((o) => {
104
104
  if (!t(this, j)) return;
105
105
  const c = t(this, w).track.getBoundingClientRect();
@@ -190,7 +190,7 @@ const He = class He extends HTMLElement {
190
190
  right: this.querySelector(".ng-scroll-right")
191
191
  }), s.addEventListener("scroll", () => {
192
192
  t(this, j) || this.refresh();
193
- }), t(this, _t).call(this), t(this, It).call(this), this.refresh();
193
+ }), t(this, Nt).call(this), t(this, _t).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
@@ -198,11 +198,11 @@ const He = class He extends HTMLElement {
198
198
  t(this, Z) && t(this, Z).disconnect();
199
199
  }
200
200
  };
201
- z = new WeakMap(), j = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), It = new WeakMap(), G = new WeakMap(), _t = new WeakMap(), h(He, "NineTableHScrollBar");
202
- let ae = He;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ae);
204
- var F, ot, J, q, xt, vt, Nt;
205
- const Me = class Me extends HTMLElement {
201
+ z = new WeakMap(), j = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), _t = new WeakMap(), G = new WeakMap(), Nt = new WeakMap(), h(Me, "NineTableHScrollBar");
202
+ let le = Me;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", le);
204
+ var F, ot, J, q, xt, vt, Wt;
205
+ const $e = class $e extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
208
  d(this, F);
@@ -211,56 +211,56 @@ const Me = class Me extends HTMLElement {
211
211
  d(this, q);
212
212
  d(this, xt, 0);
213
213
  d(this, vt, 0);
214
- E(this, "refresh", /* @__PURE__ */ h(() => {
214
+ A(this, "refresh", /* @__PURE__ */ h(() => {
215
215
  if (!t(this, F) || !t(this, q)) return;
216
- C.log("nine-table-vscrollbar.refresh");
217
- const e = t(this, q).container, s = t(this, q).track, r = t(this, q).thumb, n = e.clientHeight, o = (t(this, F).data.get() || []).length, c = t(this, ot).getRowHeight(), l = o * c;
216
+ H.log("nine-table-vscrollbar.refresh");
217
+ const e = t(this, q).container, s = t(this, q).track, i = t(this, q).thumb, n = e.clientHeight, o = (t(this, F).data.get() || []).length, c = t(this, ot).getRowHeight(), l = o * c;
218
218
  if (l <= n) {
219
- r.style.display = "none", t(this, q).top.disabled = !0, t(this, q).bottom.disabled = !0;
219
+ i.style.display = "none", t(this, q).top.disabled = !0, t(this, q).bottom.disabled = !0;
220
220
  return;
221
221
  } else
222
- r.style.display = "block";
222
+ i.style.display = "block";
223
223
  const f = s.clientHeight;
224
224
  if (f <= 0) return;
225
225
  const u = Math.max(Math.min(f * (n / l), f), 20);
226
- r.style.height = `${u}px`;
227
- const g = e.scrollTop, b = Math.max(l - n, 1);
228
- let x = 0;
229
- b > 0 && (x = g / b * (f - u));
226
+ i.style.height = `${u}px`;
227
+ const b = e.scrollTop, g = Math.max(l - n, 1);
228
+ let m = 0;
229
+ g > 0 && (m = b / g * (f - u));
230
230
  const v = f - u;
231
- x < 0 && (x = 0), x > v && (x = v), r.style.top = `${x}px`, t(this, q).top.disabled = g <= 0, t(this, q).bottom.disabled = g >= b - 1;
231
+ m < 0 && (m = 0), m > v && (m = v), i.style.top = `${m}px`, t(this, q).top.disabled = b <= 0, t(this, q).bottom.disabled = b >= g - 1;
232
232
  }, "refresh"));
233
- d(this, Nt, /* @__PURE__ */ h(() => {
234
- C.log("nine-table-vscrollbar.#init");
233
+ d(this, Wt, /* @__PURE__ */ h(() => {
234
+ H.log("nine-table-vscrollbar.#init");
235
235
  const e = t(this, q).container, s = /* @__PURE__ */ h(() => {
236
236
  const n = (t(this, F).data.get() || []).length, a = t(this, ot).getRowHeight();
237
237
  return n * a;
238
238
  }, "getContentHeight");
239
239
  e.addEventListener("scroll", () => {
240
240
  t(this, J) || this.refresh();
241
- }), t(this, q).thumb.addEventListener("mousedown", (r) => {
242
- if (r.button !== 0) return;
243
- r.stopPropagation(), r.preventDefault(), y(this, J, !0), y(this, xt, r.clientY), y(this, vt, e.scrollTop);
241
+ }), t(this, q).thumb.addEventListener("mousedown", (i) => {
242
+ if (i.button !== 0) return;
243
+ i.stopPropagation(), i.preventDefault(), y(this, J, !0), y(this, xt, i.clientY), y(this, vt, e.scrollTop);
244
244
  const n = /* @__PURE__ */ h((o) => {
245
245
  if (!t(this, J)) return;
246
- const c = t(this, q).track.getBoundingClientRect(), l = t(this, q).thumb.clientHeight, u = c.height - l, g = o.clientY - t(this, xt), b = e.clientHeight, x = s(), v = Math.max(x - b, 1);
246
+ const c = t(this, q).track.getBoundingClientRect(), l = t(this, q).thumb.clientHeight, u = c.height - l, b = o.clientY - t(this, xt), g = e.clientHeight, m = s(), v = Math.max(m - g, 1);
247
247
  if (u > 0 && v > 0) {
248
- const A = g / u * v;
249
- let m = t(this, vt) + A;
250
- const W = Math.max(0, x - b);
251
- m < 0 && (m = 0), m > W && (m = W), e.scrollTop = m;
248
+ const E = b / u * v;
249
+ let x = t(this, vt) + E;
250
+ const M = Math.max(0, m - g);
251
+ x < 0 && (x = 0), x > M && (x = M), e.scrollTop = x;
252
252
  }
253
253
  this.refresh();
254
254
  }, "onMouseMove"), a = /* @__PURE__ */ h(() => {
255
255
  y(this, J, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", a), this.refresh();
256
256
  }, "onMouseUp");
257
257
  document.addEventListener("mousemove", n), document.addEventListener("mouseup", a);
258
- }), t(this, q).track.addEventListener("mousedown", (r) => {
259
- if (r.button !== 0 || r.target === t(this, q).thumb) return;
260
- const n = t(this, q).track.getBoundingClientRect(), a = t(this, q).thumb.clientHeight, o = r.clientY - n.top - a / 2, l = n.height - a, f = e.clientHeight, u = s(), g = Math.max(u - f, 1);
261
- if (l > 0 && g > 0) {
262
- const b = Math.max(0, Math.min(1, o / l));
263
- e.scrollTop = b * g;
258
+ }), t(this, q).track.addEventListener("mousedown", (i) => {
259
+ if (i.button !== 0 || i.target === t(this, q).thumb) return;
260
+ const n = t(this, q).track.getBoundingClientRect(), a = t(this, q).thumb.clientHeight, o = i.clientY - n.top - a / 2, l = n.height - a, f = e.clientHeight, u = s(), b = Math.max(u - f, 1);
261
+ if (l > 0 && b > 0) {
262
+ const g = Math.max(0, Math.min(1, o / l));
263
+ e.scrollTop = g * b;
264
264
  }
265
265
  this.refresh();
266
266
  }), t(this, q).top.addEventListener("click", () => {
@@ -347,201 +347,204 @@ const Me = class Me extends HTMLElement {
347
347
  thumb: this.querySelector(".ng-scroll-thumb"),
348
348
  top: this.querySelector(".ng-scroll-top"),
349
349
  bottom: this.querySelector(".ng-scroll-bottom")
350
- }), t(this, Nt).call(this), this.refresh();
350
+ }), t(this, Wt).call(this), this.refresh();
351
351
  }, "initWhenReady");
352
352
  e();
353
353
  }
354
354
  };
355
- F = new WeakMap(), ot = new WeakMap(), J = new WeakMap(), q = new WeakMap(), xt = new WeakMap(), vt = new WeakMap(), Nt = new WeakMap(), h(Me, "NineTableVScrollBar");
356
- let le = Me;
357
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", le);
358
- var P, S, D, M, V, Q, wt, Se, at, Wt, Ot, Bt, St, Et, zt, Dt, At, Ee, lt, Rt, Pt;
359
- const $e = class $e {
360
- constructor(i) {
355
+ F = new WeakMap(), ot = new WeakMap(), J = new WeakMap(), q = new WeakMap(), xt = new WeakMap(), vt = new WeakMap(), Wt = new WeakMap(), h($e, "NineTableVScrollBar");
356
+ let ce = $e;
357
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", ce);
358
+ var P, S, wt, D, I, V, Q, St, Ee, at, Ot, Bt, zt, Et, At, Dt, Pt, Rt, Ae, lt, qt, jt;
359
+ const Ie = class Ie {
360
+ constructor(r) {
361
361
  d(this, P);
362
362
  d(this, S);
363
+ d(this, wt);
363
364
  d(this, D, /* @__PURE__ */ new Map());
364
- d(this, M, null);
365
+ d(this, I, null);
365
366
  d(this, V, null);
366
367
  d(this, Q, 0);
367
- d(this, wt, 40);
368
- d(this, Se, !1);
368
+ d(this, St, 40);
369
+ d(this, Ee, !1);
369
370
  d(this, at, !1);
370
- d(this, Wt, 3);
371
- E(this, "refresh", /* @__PURE__ */ h(() => {
372
- C.log("rowManager.refresh");
373
- const i = t(this, S).querySelector(".ng-container-body .ng-part-body");
374
- i && (t(this, St).call(this), t(this, lt).call(this, i.scrollTop));
371
+ d(this, Ot, 3);
372
+ A(this, "refresh", /* @__PURE__ */ h(() => {
373
+ H.log("rowManager.refresh");
374
+ const r = t(this, S).querySelector(".ng-container-body .ng-part-body");
375
+ r && (t(this, Et).call(this), t(this, lt).call(this, r.scrollTop));
375
376
  }, "refresh"));
376
- E(this, "initialize", /* @__PURE__ */ h(() => {
377
- C.log("rowManager.initialize"), y(this, M, null), t(this, D).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
378
- const o = t(this, S).querySelector(a);
379
- if (!o) return;
380
- const c = o.querySelector(".ng-part-body table");
381
- if (!c) return;
382
- const l = c.querySelector("tbody.bindable-tbody");
377
+ A(this, "initialize", /* @__PURE__ */ h(() => {
378
+ H.log("rowManager.initialize");
379
+ const r = t(this, S).querySelector(".ng-container-body"), e = r == null ? void 0 : r.querySelector(".ng-part-body tbody.bindable-tbody tr:not(.nodata)");
380
+ H.log(e), y(this, wt, {
381
+ scrollTables: t(this, S).querySelectorAll(".ng-part-body table")
382
+ }), y(this, I, null), t(this, D).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((c) => {
383
+ const l = t(this, S).querySelector(c);
383
384
  if (!l) return;
384
- const u = Array.from(l.querySelectorAll("tr")).map((g) => g.cloneNode(!0));
385
- t(this, D).set(a, u);
385
+ const f = l.querySelector(".ng-part-body table");
386
+ if (!f) return;
387
+ const u = f.querySelector("tbody.bindable-tbody");
388
+ if (!u) return;
389
+ const g = Array.from(u.querySelectorAll("tr")).map((m) => m.cloneNode(!0));
390
+ t(this, D).set(c, g);
386
391
  });
387
- const i = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), s = t(this, S).querySelector(".ng-container-right .ng-part-body"), r = t(this, S).querySelector(".ng-container-body .ng-part-header"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer");
388
- if (i) {
389
- t(this, Bt).call(this, i), t(this, At).call(this), t(this, St).call(this), t(this, lt).call(this, i.scrollTop);
390
- let a = !1;
391
- const o = /* @__PURE__ */ h((c, l, f) => {
392
- var u;
393
- a || (a = !0, i && i.scrollTop !== c && (i.scrollTop = c), e && e.scrollTop !== c && (e.scrollTop = c), s && s.scrollTop !== c && (s.scrollTop = c), r && r.scrollLeft !== l && (r.scrollLeft = l), n && n.scrollLeft !== l && (n.scrollLeft = l), t(this, lt).call(this, c), (u = t(this, S).querySelector("nine-table-vscrollbar")) == null || u.refresh(), a = !1);
392
+ const s = t(this, S).querySelector(".ng-container-body .ng-part-body"), i = t(this, S).querySelector(".ng-container-left .ng-part-body"), n = t(this, S).querySelector(".ng-container-right .ng-part-body"), a = t(this, S).querySelector(".ng-container-body .ng-part-header"), o = t(this, S).querySelector(".ng-container-body .ng-part-footer");
393
+ if (s) {
394
+ t(this, zt).call(this, s), t(this, Rt).call(this), t(this, Et).call(this), t(this, lt).call(this, s.scrollTop);
395
+ let c = !1;
396
+ const l = /* @__PURE__ */ h((f, u, b) => {
397
+ var g;
398
+ c || (c = !0, s && s.scrollTop !== f && (s.scrollTop = f), i && i.scrollTop !== f && (i.scrollTop = f), n && n.scrollTop !== f && (n.scrollTop = f), a && a.scrollLeft !== u && (a.scrollLeft = u), o && o.scrollLeft !== u && (o.scrollLeft = u), t(this, lt).call(this, f), (g = t(this, S).querySelector("nine-table-vscrollbar")) == null || g.refresh(), c = !1);
394
399
  }, "syncScroll");
395
- [i, e, s].forEach((c) => {
396
- c && c.addEventListener("scroll", () => {
400
+ [s, i, n].forEach((f) => {
401
+ f && f.addEventListener("scroll", () => {
397
402
  t(this, at) || (y(this, at, !0), requestAnimationFrame(() => {
398
- o(c.scrollTop, c.scrollLeft), y(this, at, !1);
403
+ l(f.scrollTop, f.scrollLeft), y(this, at, !1);
399
404
  }));
400
405
  });
401
406
  });
402
407
  }
403
408
  }, "initialize"));
404
- d(this, Ot, /* @__PURE__ */ h((i, e) => {
405
- C.log("rowManager.#renderRows");
409
+ d(this, Bt, /* @__PURE__ */ h((r, e) => {
410
+ H.log("rowManager.#renderRows");
406
411
  const s = t(this, D).get(e);
407
412
  if (!s || s.length === 0) return;
408
- const r = i.querySelector(".ng-part-body tbody.bindable-tbody");
409
- if (!r) return;
410
- r.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
411
- const n = r.querySelector("tr.nodata"), a = document.createDocumentFragment();
412
- for (let o = 0; o < t(this, wt); o++)
413
+ const i = r.querySelector(".ng-part-body tbody.bindable-tbody");
414
+ if (!i) return;
415
+ i.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
416
+ const n = i.querySelector("tr.nodata"), a = document.createDocumentFragment();
417
+ for (let o = 0; o < t(this, St); o++)
413
418
  s.forEach((c) => {
414
419
  a.appendChild(c.cloneNode(!0));
415
420
  });
416
- n ? n.before(a) : r.appendChild(a);
421
+ n ? n.before(a) : i.appendChild(a);
417
422
  }, "#renderRows"));
418
- d(this, Bt, /* @__PURE__ */ h((i) => {
419
- if (C.log("rowManager.#measureAndCacheHeight"), t(this, M) !== null && t(this, M) > 0)
420
- return t(this, M);
421
- C.log("#measureAndCacheHeight");
423
+ d(this, zt, /* @__PURE__ */ h((r) => {
424
+ if (H.log("rowManager.#measureAndCacheHeight"), t(this, I) !== null && t(this, I) > 0)
425
+ return t(this, I);
426
+ H.log("#measureAndCacheHeight");
422
427
  const e = t(this, D).get(".ng-container-body");
423
428
  if (!e || e.length === 0) return 24;
424
- const s = i.querySelector("tbody.bindable-tbody");
429
+ const s = r.querySelector("tbody.bindable-tbody");
425
430
  if (!s) return 24;
426
- s.querySelectorAll("tr:not(.nodata)").forEach((g) => g.remove());
427
- const r = s.querySelector("tr.nodata"), n = document.createDocumentFragment();
428
- e.forEach((g) => {
429
- n.appendChild(g.cloneNode(!0));
430
- }), r ? r.before(n) : s.appendChild(n);
431
+ s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
432
+ const i = s.querySelector("tr.nodata"), n = document.createDocumentFragment();
433
+ e.forEach((b) => {
434
+ n.appendChild(b.cloneNode(!0));
435
+ }), i ? i.before(n) : s.appendChild(n);
431
436
  const a = t(this, S), o = a.style.display, c = a.style.visibility, l = a.style.position;
432
437
  (o === "none" || window.getComputedStyle(a).display === "none") && (a.style.display = "block", a.style.visibility = "hidden", a.style.position = "absolute");
433
438
  let f = 0;
434
439
  const u = s.querySelectorAll("tr:not(.nodata)");
435
- return u.forEach((g) => {
436
- f += g.offsetHeight || g.getBoundingClientRect().height;
437
- }), u.forEach((g) => g.remove()), a.style.display = o, a.style.visibility = c, a.style.position = l, y(this, M, f > 0 ? f : 24), t(this, Et).call(this), t(this, M);
440
+ return u.forEach((b) => {
441
+ f += b.offsetHeight || b.getBoundingClientRect().height;
442
+ }), u.forEach((b) => b.remove()), a.style.display = o, a.style.visibility = c, a.style.position = l, y(this, I, f > 0 ? f : 24), t(this, At).call(this), t(this, I);
438
443
  }, "#measureAndCacheHeight"));
439
- d(this, St, /* @__PURE__ */ h(() => {
440
- C.log("rowManager.#updateVirtualScrollHeight");
441
- const e = (t(this, P).data.get() || []).length, s = t(this, M), r = e * s;
444
+ d(this, Et, /* @__PURE__ */ h(() => {
445
+ H.log("rowManager.#updateVirtualScrollHeight");
446
+ const e = (t(this, P).data.get() || []).length, s = t(this, I), i = e * s;
442
447
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
443
448
  const a = t(this, S).querySelector(n);
444
449
  if (!a) return;
445
450
  const o = a.querySelector(".ng-part-body .ng-virtual-spacer");
446
- o && (o.style.height = `${r}px`);
451
+ o && (o.style.height = `${i}px`);
447
452
  });
448
453
  }, "#updateVirtualScrollHeight"));
449
- d(this, Et, /* @__PURE__ */ h(() => {
450
- if (t(this, Q) > 0 && t(this, M) > 0) {
451
- const i = Math.ceil(t(this, Q) / t(this, M));
452
- y(this, wt, i + t(this, Wt));
454
+ d(this, At, /* @__PURE__ */ h(() => {
455
+ if (t(this, Q) > 0 && t(this, I) > 0) {
456
+ const r = Math.ceil(t(this, Q) / t(this, I));
457
+ y(this, St, r + t(this, Ot));
453
458
  }
454
459
  }, "#updateRowCount"));
455
- d(this, zt, /* @__PURE__ */ h(() => {
456
- var o, c, l, f, u, g;
457
- const i = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), s = t(this, S).querySelector(".ng-container-right .ng-part-body table");
460
+ d(this, Dt, /* @__PURE__ */ h(() => {
461
+ var o, c, l, f, u, b;
462
+ const r = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), s = t(this, S).querySelector(".ng-container-right .ng-part-body table");
458
463
  if (e) {
459
- const b = i ? Array.from(i.querySelectorAll("tbody tr")) : [], x = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], A = Math.max(b.length, x.length, v.length);
460
- for (let m = 0; m < A; m++) {
461
- const W = [
462
- ((o = b[m]) == null ? void 0 : o.getBoundingClientRect().height) || 0,
463
- ((c = x[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
464
- ((l = v[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
465
- ], L = Math.max(...W);
466
- L > 0 && (b[m] && (b[m].style.height = `${L}px`), x[m] && (x[m].style.height = `${L}px`), v[m] && (v[m].style.height = `${L}px`));
464
+ const g = r ? Array.from(r.querySelectorAll("tbody tr")) : [], m = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], E = Math.max(g.length, m.length, v.length);
465
+ for (let x = 0; x < E; x++) {
466
+ const M = [
467
+ ((o = g[x]) == null ? void 0 : o.getBoundingClientRect().height) || 0,
468
+ ((c = m[x]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
469
+ ((l = v[x]) == null ? void 0 : l.getBoundingClientRect().height) || 0
470
+ ], k = Math.max(...M);
471
+ k > 0 && (g[x] && (g[x].style.height = `${k}px`), m[x] && (m[x].style.height = `${k}px`), v[x] && (v[x].style.height = `${k}px`));
467
472
  }
468
473
  }
469
- const r = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), a = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
474
+ const i = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), a = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
470
475
  if (n) {
471
- const b = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], x = Array.from(n.querySelectorAll("tfoot tr")), v = a ? Array.from(a.querySelectorAll("tfoot tr")) : [], A = Math.max(b.length, x.length, v.length);
472
- for (let m = 0; m < A; m++) {
473
- const W = [
474
- ((f = b[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
475
- ((u = x[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
476
- ((g = v[m]) == null ? void 0 : g.getBoundingClientRect().height) || 0
477
- ], L = Math.max(...W);
478
- L > 0 && (b[m] && (b[m].style.height = `${L}px`), x[m] && (x[m].style.height = `${L}px`), v[m] && (v[m].style.height = `${L}px`));
476
+ const g = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], m = Array.from(n.querySelectorAll("tfoot tr")), v = a ? Array.from(a.querySelectorAll("tfoot tr")) : [], E = Math.max(g.length, m.length, v.length);
477
+ for (let x = 0; x < E; x++) {
478
+ const M = [
479
+ ((f = g[x]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
480
+ ((u = m[x]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
481
+ ((b = v[x]) == null ? void 0 : b.getBoundingClientRect().height) || 0
482
+ ], k = Math.max(...M);
483
+ k > 0 && (g[x] && (g[x].style.height = `${k}px`), m[x] && (m[x].style.height = `${k}px`), v[x] && (v[x].style.height = `${k}px`));
479
484
  }
480
485
  }
481
486
  }, "#syncRowHeights"));
482
- d(this, Dt, /* @__PURE__ */ h(() => {
483
- !t(this, S) || !(t(this, S) instanceof HTMLElement) || (y(this, V, new ResizeObserver((i) => {
484
- for (const e of i) {
487
+ d(this, Pt, /* @__PURE__ */ h(() => {
488
+ !t(this, S) || !(t(this, S) instanceof HTMLElement) || (y(this, V, new ResizeObserver((r) => {
489
+ for (const e of r) {
485
490
  const s = e.target;
486
491
  if (!s.classList.contains("active")) continue;
487
- const r = e.contentRect.height;
488
- if (r > 0) {
492
+ const i = e.contentRect.height;
493
+ if (i > 0) {
489
494
  let n = 0;
490
495
  const a = s.querySelector(".ng-part-header"), o = s.querySelector(".ng-part-footer");
491
496
  a && (n += a.offsetHeight), o && (n += o.offsetHeight);
492
- const c = Math.max(r - n, 100);
493
- t(this, Q) !== c && (y(this, Q, c), t(this, Et).call(this), t(this, M) !== null && (t(this, At).call(this), this.refresh()));
497
+ const c = Math.max(i - n, 100);
498
+ t(this, Q) !== c && (y(this, Q, c), t(this, At).call(this), t(this, I) !== null && (t(this, Rt).call(this), this.refresh()));
494
499
  }
495
500
  }
496
501
  })), t(this, V).observe(t(this, S)));
497
502
  }, "#initResizeObserver"));
498
- d(this, At, /* @__PURE__ */ h(() => {
499
- C.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
500
- const e = t(this, S).querySelector(i);
501
- e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Ot).call(this, e, i);
502
- }), t(this, Pt).call(this), t(this, zt).call(this);
503
+ d(this, Rt, /* @__PURE__ */ h(() => {
504
+ H.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
505
+ const e = t(this, S).querySelector(r);
506
+ e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Bt).call(this, e, r);
507
+ }), t(this, jt).call(this), t(this, Dt).call(this);
503
508
  }, "#renderAllContainers"));
504
- d(this, Ee, /* @__PURE__ */ h((i) => {
509
+ d(this, Ae, /* @__PURE__ */ h((r) => {
505
510
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
506
511
  var l;
507
512
  const s = t(this, S).querySelector(e);
508
513
  if (!s) return;
509
- const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
510
- if (!r) return;
511
- const n = Array.from(r.querySelectorAll("tr:not(.nodata)")), a = ((l = t(this, D).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, P).data.get() || []).length;
514
+ const i = s.querySelector(".ng-part-body tbody.bindable-tbody");
515
+ if (!i) return;
516
+ const n = Array.from(i.querySelectorAll("tr:not(.nodata)")), a = ((l = t(this, D).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, P).data.get() || []).length;
512
517
  n.forEach((f, u) => {
513
- const g = i + Math.floor(u / a);
514
- if (g >= c) {
518
+ const b = r + Math.floor(u / a);
519
+ if (b >= c) {
515
520
  f.style.display = "none";
516
521
  return;
517
522
  }
518
- const b = t(this, P).data.get(g);
519
- f.style.display = "", t(this, Rt).call(this, f, b, g);
523
+ const g = t(this, P).data.get(b);
524
+ f.style.display = "", t(this, qt).call(this, f, g, b);
520
525
  });
521
526
  });
522
527
  }, "#adjustBufferRows"));
523
- d(this, lt, /* @__PURE__ */ h((i) => {
524
- var f;
525
- const e = t(this, M);
528
+ d(this, lt, /* @__PURE__ */ h((r) => {
529
+ var f, u;
530
+ const e = t(this, I);
526
531
  if (!e || e <= 0) return;
527
- const s = t(this, P).data.length;
528
- C.log(s);
529
- const r = Math.max(0, Math.floor(i / e)), n = r * e, a = ((f = t(this, D).get(".ng-container-body")) == null ? void 0 : f.length) || 1, o = t(this, S).querySelector(".ng-container-body"), c = o == null ? void 0 : o.querySelector(".ng-part-body tbody.bindable-tbody tr:not(.nodata)"), l = c && c.dataset.row !== void 0 ? parseInt(c.dataset.row, 10) : -1;
530
- t(this, S).querySelectorAll(".ng-part-body table").forEach((u) => {
531
- u.style.transform = `translateY(${n}px)`;
532
- }), C.log("#handleScroll", l, r), l !== r && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
533
- const g = t(this, S).querySelector(u);
532
+ const s = t(this, P).data.length, i = Math.max(0, Math.floor(r / e)), n = i * e, a = ((f = t(this, D).get(".ng-container-body")) == null ? void 0 : f.length) || 1, o = t(this, S).querySelector(".ng-container-body"), c = o == null ? void 0 : o.querySelector(".ng-part-body tbody.bindable-tbody tr:not(.nodata)"), l = c && c.dataset.row !== void 0 ? parseInt(c.dataset.row, 10) : -1;
533
+ (u = t(this, wt)) == null || u.scrollTables.forEach((b) => {
534
+ b.style.transform = `translateY(${n}px)`;
535
+ }), l !== i && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((b) => {
536
+ const g = t(this, S).querySelector(b);
534
537
  if (!g) return;
535
- const b = g.querySelector(".ng-part-body tbody.bindable-tbody");
536
- if (!b) return;
537
- Array.from(b.querySelectorAll("tr:not(.nodata)")).forEach((v, A) => {
538
- const m = r + Math.floor(A / a);
539
- if (m >= s) {
540
- v.style.display = "none";
538
+ const m = g.querySelector(".ng-part-body tbody.bindable-tbody");
539
+ if (!m) return;
540
+ Array.from(m.querySelectorAll("tr:not(.nodata)")).forEach((E, x) => {
541
+ const M = i + Math.floor(x / a);
542
+ if (M >= s) {
543
+ E.style.display = "none";
541
544
  return;
542
545
  }
543
- const W = t(this, P).data.get(m);
544
- v.style.display = "", t(this, Rt).call(this, v, W, m);
546
+ const k = t(this, P).data.get(M);
547
+ E.style.display = "", t(this, qt).call(this, E, k, M);
545
548
  });
546
549
  });
547
550
  }, "#handleScroll"));
@@ -559,70 +562,70 @@ const $e = class $e {
559
562
  cell.dataset.row = dataIndex;
560
563
  });
561
564
  }; */
562
- d(this, Rt, /* @__PURE__ */ h((i, e, s) => {
563
- i.dataset.row = s, i.data = e, C.log(e, s), Array.from(i.cells).forEach((r, n) => {
564
- r.dataset.row = s;
565
- const a = Array.from(r.children).find((o) => o.tagName.toLowerCase().startsWith("cell-") || typeof o.refresh == "function");
565
+ d(this, qt, /* @__PURE__ */ h((r, e, s) => {
566
+ r.dataset.row = s, r.data = e, Array.from(r.cells).forEach((i, n) => {
567
+ i.dataset.row = s;
568
+ const a = Array.from(i.children).find((o) => o.tagName.toLowerCase().startsWith("cell-") || typeof o.refresh == "function");
566
569
  a && typeof a.refresh == "function" && a.refresh();
567
570
  });
568
571
  }, "#bindRowData"));
569
- d(this, Pt, /* @__PURE__ */ h(() => {
572
+ d(this, jt, /* @__PURE__ */ h(() => {
570
573
  var c, l, f;
571
- C.log("rowManager.#syncHeaderHeights");
572
- const i = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), s = t(this, S).querySelector(".ng-container-right .ng-part-header table");
574
+ H.log("rowManager.#syncHeaderHeights");
575
+ const r = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), s = t(this, S).querySelector(".ng-container-right .ng-part-header table");
573
576
  if (!e) return;
574
- const r = i ? Array.from(i.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), a = s ? Array.from(s.querySelectorAll("tr")) : [], o = Math.max(r.length, n.length, a.length);
577
+ const i = r ? Array.from(r.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), a = s ? Array.from(s.querySelectorAll("tr")) : [], o = Math.max(i.length, n.length, a.length);
575
578
  for (let u = 0; u < o; u++) {
576
- const g = [
577
- ((c = r[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
579
+ const b = [
580
+ ((c = i[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
578
581
  ((l = n[u]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
579
582
  ((f = a[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
580
- ], b = Math.max(...g);
581
- b > 0 && (r[u] && (r[u].style.height = `${b}px`), n[u] && (n[u].style.height = `${b}px`), a[u] && (a[u].style.height = `${b}px`));
583
+ ], g = Math.max(...b);
584
+ g > 0 && (i[u] && (i[u].style.height = `${g}px`), n[u] && (n[u].style.height = `${g}px`), a[u] && (a[u].style.height = `${g}px`));
582
585
  }
583
586
  }, "#syncHeaderHeights"));
584
- E(this, "destroy", /* @__PURE__ */ h(() => {
587
+ A(this, "destroy", /* @__PURE__ */ h(() => {
585
588
  t(this, V) && (t(this, V).disconnect(), y(this, V, null));
586
589
  }, "destroy"));
587
- y(this, P, i.getRootNode().host), y(this, S, i), t(this, Dt).call(this);
590
+ y(this, P, r.getRootNode().host), y(this, S, r), t(this, Pt).call(this);
588
591
  }
589
592
  getRowHeight() {
590
- return t(this, M);
593
+ return t(this, I);
591
594
  }
592
- templateLength(i = ".ng-container-body") {
595
+ templateLength(r = ".ng-container-body") {
593
596
  var e;
594
- return ((e = t(this, D).get(i)) == null ? void 0 : e.length) || 1;
597
+ return ((e = t(this, D).get(r)) == null ? void 0 : e.length) || 1;
595
598
  }
596
599
  };
597
- P = new WeakMap(), S = new WeakMap(), D = new WeakMap(), M = new WeakMap(), V = new WeakMap(), Q = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), at = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), zt = new WeakMap(), Dt = new WeakMap(), At = new WeakMap(), Ee = new WeakMap(), lt = new WeakMap(), Rt = new WeakMap(), Pt = new WeakMap(), h($e, "RowManager");
598
- let ce = $e;
599
- const jt = class jt {
600
+ P = new WeakMap(), S = new WeakMap(), wt = new WeakMap(), D = new WeakMap(), I = new WeakMap(), V = new WeakMap(), Q = new WeakMap(), St = new WeakMap(), Ee = new WeakMap(), at = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), zt = new WeakMap(), Et = new WeakMap(), At = new WeakMap(), Dt = new WeakMap(), Pt = new WeakMap(), Rt = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), qt = new WeakMap(), jt = new WeakMap(), h(Ie, "RowManager");
601
+ let he = Ie;
602
+ const Ft = class Ft {
600
603
  /**
601
604
  * 🎯 레이아웃 내의 여러 rawTables 배열을 일괄로 받아 단일 마스터 템플릿으로 사전 컴파일합니다.
602
605
  */
603
- static compileAll(i) {
604
- return Array.isArray(i) ? i.map((e) => jt.compile(e)) : [];
606
+ static compileAll(r) {
607
+ return Array.isArray(r) ? r.map((e) => Ft.compile(e)) : [];
605
608
  }
606
609
  /**
607
610
  * 🎯 단일 원본 테이블을 받아 기본 구조 보정 및 2차원 격자 인덱스 사전 부여 완료된 마스터 테이블 반환
608
611
  */
609
- static compile(i) {
610
- if (!i) return null;
612
+ static compile(r) {
613
+ if (!r) return null;
611
614
  const e = /* @__PURE__ */ h((o) => {
612
615
  o.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
613
616
  const f = l.getAttribute("cell-type") || "renderer";
614
617
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
615
618
  let u = `cell-${f}`;
616
- const g = l.getAttribute("data-bind"), b = l.getAttribute("data-expr"), x = l.getAttribute("maxbyte"), v = l.getAttribute("type");
617
- let A = [];
618
- g && A.push(`data-bind="${g}"`), b && A.push(`data-expr="${b}"`), x && A.push(`maxbyte="${x}"`), v && A.push(`type="${v}"`), l.innerHTML = `<${u} ${A.join(" ")}></${u}>`;
619
+ const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), m = l.getAttribute("maxbyte"), v = l.getAttribute("type");
620
+ let E = [];
621
+ b && E.push(`data-bind="${b}"`), g && E.push(`data-expr="${g}"`), m && E.push(`maxbyte="${m}"`), v && E.push(`type="${v}"`), l.innerHTML = `<${u} ${E.join(" ")}></${u}>`;
619
622
  });
620
623
  }, "processCellTypes"), s = /* @__PURE__ */ h((o) => {
621
624
  if (!o.querySelector("colgroup")) {
622
625
  const c = o.querySelector("tbody tr") || o.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), u = Math.max(Math.floor(o.clientWidth / l), 100);
623
- for (let g = 0; g < l; g++) {
624
- const b = document.createElement("col");
625
- b.setAttribute("width", u), f.appendChild(b);
626
+ for (let b = 0; b < l; b++) {
627
+ const g = document.createElement("col");
628
+ g.setAttribute("width", u), f.appendChild(g);
626
629
  }
627
630
  o.prepend(f);
628
631
  }
@@ -631,40 +634,40 @@ const jt = class jt {
631
634
  l ? l.after(c) : o.prepend(c);
632
635
  }
633
636
  o.classList.add("nine-table-element"), o.style.display = "table";
634
- }, "ensureTableStructure"), r = /* @__PURE__ */ h((o, c) => {
637
+ }, "ensureTableStructure"), i = /* @__PURE__ */ h((o, c) => {
635
638
  const l = Array.from(o.querySelectorAll(c + " tr")), f = Array.from(o.querySelectorAll(c + " th," + c + " td")), u = l.length;
636
639
  if (u === 0 || f.length === 0) return;
637
- let g = 0;
638
- f.forEach((x) => {
639
- g += x.colSpan || 1;
640
+ let b = 0;
641
+ f.forEach((m) => {
642
+ b += m.colSpan || 1;
640
643
  });
641
- const b = Array.from(Array(u), () => Array(g).fill(null));
642
- l.forEach((x) => {
643
- const v = x.sectionRowIndex;
644
- let A = 0;
645
- Array.from(x.querySelectorAll("th,td")).forEach((m) => {
646
- for (let B = 0; B < b[v].length; B++)
647
- if (b[v][B] === null) {
648
- A = B;
644
+ const g = Array.from(Array(u), () => Array(b).fill(null));
645
+ l.forEach((m) => {
646
+ const v = m.sectionRowIndex;
647
+ let E = 0;
648
+ Array.from(m.querySelectorAll("th,td")).forEach((x) => {
649
+ for (let B = 0; B < g[v].length; B++)
650
+ if (g[v][B] === null) {
651
+ E = B;
649
652
  break;
650
653
  }
651
- const W = m.rowSpan || 1, L = m.colSpan || 1;
652
- for (let B = 0; B < W; B++)
653
- for (let yt = 0; yt < L; yt++)
654
- v + B < u && A + yt < g && (b[v + B][A + yt] = B === 0 && yt === 0 ? "1" : "0");
654
+ const M = x.rowSpan || 1, k = x.colSpan || 1;
655
+ for (let B = 0; B < M; B++)
656
+ for (let yt = 0; yt < k; yt++)
657
+ v + B < u && E + yt < b && (g[v + B][E + yt] = B === 0 && yt === 0 ? "1" : "0");
655
658
  });
656
- }), l.forEach((x) => {
657
- const v = x.sectionRowIndex;
658
- Array.from(x.querySelectorAll("th,td")).forEach((A) => {
659
- for (let m = 0; m < b[v].length; m++)
660
- if (b[v][m] === "1") {
661
- A.dataset.col = m, b[v][m] = "0";
659
+ }), l.forEach((m) => {
660
+ const v = m.sectionRowIndex;
661
+ Array.from(m.querySelectorAll("th,td")).forEach((E) => {
662
+ for (let x = 0; x < g[v].length; x++)
663
+ if (g[v][x] === "1") {
664
+ E.dataset.col = x, g[v][x] = "0";
662
665
  break;
663
666
  }
664
667
  });
665
668
  });
666
- }, "resetColIndex"), n = i.cloneNode(!0);
667
- return s(n), e(n), r(n, "thead"), r(n, "tbody"), r(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((o, c) => {
669
+ }, "resetColIndex"), n = r.cloneNode(!0);
670
+ return s(n), e(n), i(n, "thead"), i(n, "tbody"), i(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((o, c) => {
668
671
  const l = o.getAttribute("fixed");
669
672
  l && n.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
670
673
  f.setAttribute("fixed", l);
@@ -673,64 +676,64 @@ const jt = class jt {
673
676
  }
674
677
  // 🎯 [추가] td/th에 선언된 cell-type 속성을 읽어 커스텀 태그로 자동 감싸기
675
678
  };
676
- h(jt, "TableCompiler");
677
- let he = jt;
678
- var Ft, tt, et, Vt, Yt, ct, Ut, Xt;
679
+ h(Ft, "TableCompiler");
680
+ let de = Ft;
681
+ var Vt, tt, et, Yt, Ut, ct, Xt, Kt;
679
682
  const pt = class pt extends HTMLElement {
680
683
  constructor() {
681
684
  super();
682
- d(this, Ft);
685
+ d(this, Vt);
683
686
  d(this, tt, null);
684
687
  d(this, et);
685
- E(this, "invalidate", /* @__PURE__ */ h(() => {
688
+ A(this, "invalidate", /* @__PURE__ */ h(() => {
686
689
  t(this, et).refresh();
687
690
  }, "invalidate"));
688
- d(this, Vt, /* @__PURE__ */ h(() => {
691
+ d(this, Yt, /* @__PURE__ */ h(() => {
689
692
  [
690
693
  { selector: ".ng-container-body", type: null },
691
694
  { selector: ".ng-container-left", type: "left" },
692
695
  { selector: ".ng-container-right", type: "right" }
693
- ].forEach(({ selector: s, type: r }) => {
696
+ ].forEach(({ selector: s, type: i }) => {
694
697
  const n = this.querySelector(s);
695
698
  if (!n) return;
696
699
  n.innerHTML = "";
697
700
  const a = document.createElement("div");
698
- a.className = "ng-part-header", a.appendChild(t(this, ct).call(this, t(this, tt), r, "header"));
701
+ a.className = "ng-part-header", a.appendChild(t(this, ct).call(this, t(this, tt), i, "header"));
699
702
  const o = document.createElement("div");
700
703
  o.className = "ng-part-body";
701
704
  const c = document.createElement("div");
702
- c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, ct).call(this, t(this, tt), r, "body"));
705
+ c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, ct).call(this, t(this, tt), i, "body"));
703
706
  const l = document.createElement("div");
704
707
  l.className = "ng-virtual-spacer", l.style.width = "100%", l.style.pointerEvents = "none", c.appendChild(l), o.appendChild(c);
705
708
  const f = document.createElement("div");
706
- f.className = "ng-part-footer", f.appendChild(t(this, ct).call(this, t(this, tt), r, "footer")), n.appendChild(a), n.appendChild(o), n.appendChild(f);
709
+ f.className = "ng-part-footer", f.appendChild(t(this, ct).call(this, t(this, tt), i, "footer")), n.appendChild(a), n.appendChild(o), n.appendChild(f);
707
710
  });
708
711
  }, "#renderSplitContainers"));
709
- d(this, Yt, /* @__PURE__ */ h(() => {
712
+ d(this, Ut, /* @__PURE__ */ h(() => {
710
713
  ["left", "right", "body"].forEach((e) => {
711
- const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
712
- if (!s || !r || r.length === 0) return;
714
+ const s = this.querySelector(`.ng-container-${e}`), i = s == null ? void 0 : s.querySelectorAll("table");
715
+ if (!s || !i || i.length === 0) return;
713
716
  let n = 0;
714
- r[0].querySelectorAll("col").forEach((a) => {
717
+ i[0].querySelectorAll("col").forEach((a) => {
715
718
  const o = parseInt(a.getAttribute("width"), 10);
716
719
  isNaN(n) || (n += o);
717
720
  }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${n}px`, s.style.width = `${n}px`);
718
721
  });
719
722
  }, "#updateContainerWidths"));
720
- E(this, "generate", /* @__PURE__ */ h((e) => {
721
- e && (y(this, tt, he.compile(e)), t(this, Vt).call(this), t(this, Yt).call(this), t(this, et).initialize(), setTimeout(() => {
723
+ A(this, "generate", /* @__PURE__ */ h((e) => {
724
+ e && (y(this, tt, de.compile(e)), t(this, Yt).call(this), t(this, Ut).call(this), t(this, et).initialize(), setTimeout(() => {
722
725
  var s;
723
726
  (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
724
727
  }, 0));
725
728
  }, "generate"));
726
- d(this, ct, /* @__PURE__ */ h((e, s, r) => {
729
+ d(this, ct, /* @__PURE__ */ h((e, s, i) => {
727
730
  const n = e.cloneNode(!0), a = n.querySelector("thead"), o = n.querySelector("tbody"), c = n.querySelector("tfoot");
728
- if (r === "header") {
731
+ if (i === "header") {
729
732
  if (o && o.remove(), c && c.remove(), e.querySelector("tbody")) {
730
733
  const f = document.createElement("tbody");
731
734
  f.className = "fixed-tbody", n.appendChild(f);
732
735
  }
733
- } else r === "body" ? (a && a.remove(), c && c.remove(), o && (o.className = "bindable-tbody")) : r === "footer" && (a && a.remove(), o && o.remove());
736
+ } else i === "body" ? (a && a.remove(), c && c.remove(), o && (o.className = "bindable-tbody")) : i === "footer" && (a && a.remove(), o && o.remove());
734
737
  return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
735
738
  l.getAttribute("fixed") !== "left" && l.remove();
736
739
  }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
@@ -739,19 +742,19 @@ const pt = class pt extends HTMLElement {
739
742
  l.remove();
740
743
  }), n;
741
744
  }, "#createSplitTable"));
742
- E(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, et).getRowHeight(), "getRowHeight"));
743
- E(this, "scrollToX", /* @__PURE__ */ h((e) => {
745
+ A(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, et).getRowHeight(), "getRowHeight"));
746
+ A(this, "scrollToX", /* @__PURE__ */ h((e) => {
744
747
  const s = this.querySelector(".ng-container-body .ng-part-body");
745
748
  s && (s.scrollLeft = e);
746
749
  }, "scrollToX"));
747
- E(this, "scrollToY", /* @__PURE__ */ h((e) => {
750
+ A(this, "scrollToY", /* @__PURE__ */ h((e) => {
748
751
  const s = this.querySelector(".ng-container-body .ng-part-body");
749
752
  s && (s.scrollTop = e);
750
753
  }, "scrollToY"));
751
- d(this, Ut, /* @__PURE__ */ h(() => {
752
- t(this, Xt).call(this);
753
- }, "#init"));
754
754
  d(this, Xt, /* @__PURE__ */ h(() => {
755
+ t(this, Kt).call(this);
756
+ }, "#init"));
757
+ d(this, Kt, /* @__PURE__ */ h(() => {
755
758
  const e = pt.SCROLLBAR_SIZE;
756
759
  this.innerHTML = `
757
760
  <style>
@@ -894,38 +897,38 @@ const pt = class pt extends HTMLElement {
894
897
  </div>
895
898
  `;
896
899
  }, "#render"));
897
- y(this, et, new ce(this)), y(this, Ft, this.getRootNode().host);
900
+ y(this, et, new he(this)), y(this, Vt, this.getRootNode().host);
898
901
  }
899
902
  connectedCallback() {
900
- t(this, Ut).call(this);
903
+ t(this, Xt).call(this);
901
904
  }
902
905
  disconnectedCallback() {
903
- this.innerHTML = "", C.log("NineTableSheet destroyed.");
906
+ this.innerHTML = "", H.log("NineTableSheet destroyed.");
904
907
  }
905
908
  };
906
- Ft = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ct = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), h(pt, "NineTableSheet"), E(pt, "SCROLLBAR_SIZE", 16);
907
- let $t = pt;
908
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", $t);
909
- var Kt, qt;
910
- const Ie = class Ie extends HTMLElement {
909
+ Vt = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), Yt = new WeakMap(), Ut = new WeakMap(), ct = new WeakMap(), Xt = new WeakMap(), Kt = new WeakMap(), h(pt, "NineTableSheet"), A(pt, "SCROLLBAR_SIZE", 16);
910
+ let It = pt;
911
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", It);
912
+ var Zt, kt;
913
+ const _e = class _e extends HTMLElement {
911
914
  constructor() {
912
915
  super();
913
- d(this, Kt, /* @__PURE__ */ h(() => {
916
+ d(this, Zt, /* @__PURE__ */ h(() => {
914
917
  var e;
915
918
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
916
919
  var a;
917
- const r = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((a = s.target.closest(".nine-tab-item")) == null ? void 0 : a.dataset.index, 10);
918
- t(this, qt).call(this, n, r);
919
- }), t(this, qt).call(this, 0, !1);
920
+ const i = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((a = s.target.closest(".nine-tab-item")) == null ? void 0 : a.dataset.index, 10);
921
+ t(this, kt).call(this, n, i);
922
+ }), t(this, kt).call(this, 0, !1);
920
923
  }, "#init"));
921
- d(this, qt, /* @__PURE__ */ h((e, s = !1) => {
922
- const r = /* @__PURE__ */ h(() => {
924
+ d(this, kt, /* @__PURE__ */ h((e, s = !1) => {
925
+ const i = /* @__PURE__ */ h(() => {
923
926
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
924
- Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
925
- const g = f.filter((b) => b.classList.contains("active"));
926
- g.length < 2 || g.forEach((b) => {
927
- const x = parseInt(b.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${x}"]`), A = f[x + 1];
928
- v && A && A.classList.contains("active") && v.style.setProperty("display", "flex");
927
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
928
+ const b = f.filter((g) => g.classList.contains("active"));
929
+ b.length < 2 || b.forEach((g) => {
930
+ const m = parseInt(g.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${m}"]`), E = f[m + 1];
931
+ v && E && E.classList.contains("active") && v.style.setProperty("display", "flex");
929
932
  });
930
933
  }, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), a = this.querySelector("nine-table-sheets-body"), o = n.querySelectorAll(".nine-tab-item"), c = a.querySelectorAll("nine-table-sheet");
931
934
  if (!o[e]) return;
@@ -933,53 +936,53 @@ const Ie = class Ie extends HTMLElement {
933
936
  o.forEach((f, u) => {
934
937
  f.classList.toggle("active", u === e);
935
938
  }), c.forEach((f, u) => {
936
- const g = u === e;
937
- f.classList.toggle("active", g), f.style.flex = g ? "1 1 100%" : "";
939
+ const b = u === e;
940
+ f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
938
941
  });
939
942
  else {
940
943
  const f = o[e], u = n.querySelectorAll(".nine-tab-item.active");
941
944
  if (f.classList.contains("active") && u.length <= 1)
942
945
  return;
943
946
  f.classList.toggle("active");
944
- const g = a.querySelector(`nine-table-sheet[data-index="${e}"]`);
945
- g && (g.classList.toggle("active"), g.classList.contains("active") || (g.style.flex = ""));
947
+ const b = a.querySelector(`nine-table-sheet[data-index="${e}"]`);
948
+ b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
946
949
  }
947
950
  const l = a.querySelectorAll("nine-table-sheet.active");
948
951
  l == null || l.forEach((f) => {
949
952
  f.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
950
- }), r();
953
+ }), i();
951
954
  }, "#switchSheet"));
952
955
  }
953
956
  connectedCallback() {
954
- t(this, Kt).call(this);
957
+ t(this, Zt).call(this);
955
958
  }
956
959
  };
957
- Kt = new WeakMap(), qt = new WeakMap(), h(Ie, "NineTableSheets");
958
- let de = Ie;
959
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", de);
960
- var I, Zt, kt, Gt;
961
- const _e = class _e {
962
- constructor(i) {
963
- d(this, I);
964
- d(this, Zt, /* @__PURE__ */ h(() => {
965
- t(this, Gt).call(this), new ResizeObserver((i) => {
966
- for (let e of i)
967
- t(this, I).getAttribute("auto-height") === "true" && t(this, kt).call(this);
968
- }).observe(t(this, I));
960
+ Zt = new WeakMap(), kt = new WeakMap(), h(_e, "NineTableSheets");
961
+ let fe = _e;
962
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", fe);
963
+ var _, Gt, Tt, Jt;
964
+ const Ne = class Ne {
965
+ constructor(r) {
966
+ d(this, _);
967
+ d(this, Gt, /* @__PURE__ */ h(() => {
968
+ t(this, Jt).call(this), new ResizeObserver((r) => {
969
+ for (let e of r)
970
+ t(this, _).getAttribute("auto-height") === "true" && t(this, Tt).call(this);
971
+ }).observe(t(this, _));
969
972
  }, "#init"));
970
- d(this, kt, /* @__PURE__ */ h(() => {
973
+ d(this, Tt, /* @__PURE__ */ h(() => {
971
974
  var c, l;
972
- const i = Array.from(t(this, I).shadowRoot.querySelectorAll("nine-table-sheet.active"));
973
- if (i.length === 0) return;
974
- const e = parseInt(t(this, I).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), r = (c = t(this, I).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, n = (l = t(this, I).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, a = $t.SCROLLBAR_SIZE, o = e * s + r + n + a;
975
- t(this, I).style.height = `${o}px`;
975
+ const r = Array.from(t(this, _).shadowRoot.querySelectorAll("nine-table-sheet.active"));
976
+ if (r.length === 0) return;
977
+ const e = parseInt(t(this, _).getAttribute("max-display-row"), 10) || 10, s = Math.max(...r.map((f) => f.getRowHeight())), i = (c = t(this, _).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, n = (l = t(this, _).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, a = It.SCROLLBAR_SIZE, o = e * s + i + n + a;
978
+ t(this, _).style.height = `${o}px`;
976
979
  }, "#applyAutoHeight"));
977
- d(this, Gt, /* @__PURE__ */ h(() => {
978
- const e = Array.from(t(this, I).children).filter((c) => c.tagName === "TABLE"), s = t(this, I).getAttribute("auto-height") === "true", r = e.length, n = e.map((c, l) => {
979
- const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, g = l < r - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
980
- return u + g;
980
+ d(this, Jt, /* @__PURE__ */ h(() => {
981
+ const e = Array.from(t(this, _).children).filter((c) => c.tagName === "TABLE"), s = t(this, _).getAttribute("auto-height") === "true", i = e.length, n = e.map((c, l) => {
982
+ const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < i - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
983
+ return u + b;
981
984
  }).join(""), a = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
982
- t(this, I).shadowRoot.innerHTML = `
985
+ t(this, _).shadowRoot.innerHTML = `
983
986
  <style>
984
987
  :host {
985
988
  display: flex;
@@ -1070,77 +1073,77 @@ const _e = class _e {
1070
1073
  </nine-table-body>
1071
1074
  <nine-table-footer></nine-table-footer>
1072
1075
  `;
1073
- const o = t(this, I).shadowRoot.querySelectorAll("nine-table-sheet");
1076
+ const o = t(this, _).shadowRoot.querySelectorAll("nine-table-sheet");
1074
1077
  o == null || o.forEach((c, l) => {
1075
1078
  e[l] && setTimeout(() => {
1076
- c.generate(e[l]), s && t(this, kt).call(this);
1079
+ c.generate(e[l]), s && t(this, Tt).call(this);
1077
1080
  });
1078
1081
  });
1079
1082
  }, "#render"));
1080
- y(this, I, i), t(this, Zt).call(this);
1083
+ y(this, _, r), t(this, Gt).call(this);
1081
1084
  }
1082
1085
  };
1083
- I = new WeakMap(), Zt = new WeakMap(), kt = new WeakMap(), Gt = new WeakMap(), h(_e, "LayoutManager");
1084
- let fe = _e;
1085
- var Tt, ht;
1086
- const Ne = class Ne {
1087
- constructor(i) {
1088
- d(this, Tt);
1086
+ _ = new WeakMap(), Gt = new WeakMap(), Tt = new WeakMap(), Jt = new WeakMap(), h(Ne, "LayoutManager");
1087
+ let ue = Ne;
1088
+ var Ct, ht;
1089
+ const We = class We {
1090
+ constructor(r) {
1091
+ d(this, Ct);
1089
1092
  d(this, ht, -1);
1090
- E(this, "count", /* @__PURE__ */ h(() => t(this, Tt).rawRecords.length, "count"));
1091
- y(this, Tt, i);
1093
+ A(this, "count", /* @__PURE__ */ h(() => t(this, Ct).rawRecords.length, "count"));
1094
+ y(this, Ct, r);
1092
1095
  }
1093
1096
  get at() {
1094
1097
  return t(this, ht);
1095
1098
  }
1096
- set at(i) {
1097
- y(this, ht, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ht)}"]`) && setTimeout(() => {
1099
+ set at(r) {
1100
+ y(this, ht, parseInt(r, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ht)}"]`) && setTimeout(() => {
1098
1101
  });
1099
1102
  }
1100
1103
  };
1101
- Tt = new WeakMap(), ht = new WeakMap(), h(Ne, "ngRow");
1102
- let ue = Ne;
1103
- var _, k, N, dt, Jt, Y, Qt, st, Ct, te, ee, ft;
1104
+ Ct = new WeakMap(), ht = new WeakMap(), h(We, "ngRow");
1105
+ let ge = We;
1106
+ var N, T, W, dt, Qt, Y, te, st, Lt, ee, se, ft;
1104
1107
  const O = class O {
1105
- constructor(i, e) {
1106
- d(this, _);
1107
- d(this, k);
1108
- d(this, N, []);
1108
+ constructor(r, e) {
1109
+ d(this, N);
1110
+ d(this, T);
1111
+ d(this, W, []);
1109
1112
  d(this, dt, []);
1110
- d(this, Jt, 0);
1113
+ d(this, Qt, 0);
1111
1114
  d(this, Y, []);
1112
- d(this, Qt, /* @__PURE__ */ h(() => {
1115
+ d(this, te, /* @__PURE__ */ h(() => {
1113
1116
  y(this, Y, []);
1114
- const i = t(this, _).template || [];
1115
- Array.from(i).forEach((e) => {
1117
+ const r = t(this, N).template || [];
1118
+ Array.from(r).forEach((e) => {
1116
1119
  var s;
1117
1120
  t(this, Y).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1118
- }), (t(this, k).rawRecords || []).forEach((e) => {
1119
- e.__ng || (e.__ng = t(this, Ct).call(this)), e.__ng.height = t(this, Y).slice();
1121
+ }), (t(this, T).rawRecords || []).forEach((e) => {
1122
+ e.__ng || (e.__ng = t(this, Lt).call(this)), e.__ng.height = t(this, Y).slice();
1120
1123
  });
1121
1124
  }, "#initialize"));
1122
1125
  d(this, st, /* @__PURE__ */ h(() => {
1123
- t(this, _).shadowRoot.querySelectorAll("nine-table-sheet").forEach((i) => {
1124
- i.invalidate();
1126
+ t(this, N).shadowRoot.querySelectorAll("nine-table-sheet").forEach((r) => {
1127
+ r.invalidate();
1125
1128
  });
1126
1129
  }, "#invalidate"));
1127
- E(this, "get", /* @__PURE__ */ h((i, e) => {
1130
+ A(this, "get", /* @__PURE__ */ h((r, e) => {
1128
1131
  var n;
1129
1132
  const s = this.getValidData();
1130
1133
  if (!s || s.length <= 0) return;
1131
- if (i == null) return t(this, ft).call(this, s);
1132
- if (i < 0 || i >= s.length) return null;
1133
- const r = typeof ((n = t(this, _).fields) == null ? void 0 : n.get) == "function" ? t(this, _).fields.get() : [];
1134
+ if (r == null) return t(this, ft).call(this, s);
1135
+ if (r < 0 || r >= s.length) return null;
1136
+ const i = typeof ((n = t(this, N).fields) == null ? void 0 : n.get) == "function" ? t(this, N).fields.get() : [];
1134
1137
  if (e != null) {
1135
- const a = r.indexOf(e);
1136
- return a >= 0 ? s[i].v[a] : null;
1138
+ const a = i.indexOf(e);
1139
+ return a >= 0 ? s[r].v[a] : null;
1137
1140
  }
1138
- return t(this, ft).call(this, s[i]);
1141
+ return t(this, ft).call(this, s[r]);
1139
1142
  }, "get"));
1140
- E(this, "set", /* @__PURE__ */ h((i) => {
1141
- this.clear(), this.add(i, !1), t(this, st).call(this);
1143
+ A(this, "set", /* @__PURE__ */ h((r) => {
1144
+ this.clear(), this.add(r, !1), t(this, st).call(this);
1142
1145
  }, "set"));
1143
- d(this, Ct, /* @__PURE__ */ h(() => ({
1146
+ d(this, Lt, /* @__PURE__ */ h(() => ({
1144
1147
  rowState: O.ROW_STATE.EMPTY,
1145
1148
  deleted: !1,
1146
1149
  filtered: !1,
@@ -1149,158 +1152,158 @@ const O = class O {
1149
1152
  c: {},
1150
1153
  _: [0, 0, 0, 0, O.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
1151
1154
  }), "#getDefaultMeta"));
1152
- E(this, "reset", /* @__PURE__ */ h(() => {
1153
- y(this, N, []), y(this, dt, []), t(this, st).call(this);
1155
+ A(this, "reset", /* @__PURE__ */ h(() => {
1156
+ y(this, W, []), y(this, dt, []), t(this, st).call(this);
1154
1157
  }, "reset"));
1155
- E(this, "clear", /* @__PURE__ */ h(() => {
1156
- var i;
1157
- t(this, k).rawRecords = [], y(this, N, []), y(this, dt, []), (i = t(this, k).viewRecords) != null && i.reset && t(this, k).viewRecords.reset();
1158
- }, "clear"));
1159
- d(this, te, /* @__PURE__ */ h((i) => {
1158
+ A(this, "clear", /* @__PURE__ */ h(() => {
1160
1159
  var r;
1161
- Array.isArray(i) || (i = [i]);
1162
- const e = typeof ((r = t(this, _).fields) == null ? void 0 : r.get) == "function" ? t(this, _).fields.get() : Object.keys(i[0] || {}), s = [];
1163
- return i.forEach((n) => {
1160
+ t(this, T).rawRecords = [], y(this, W, []), y(this, dt, []), (r = t(this, T).viewRecords) != null && r.reset && t(this, T).viewRecords.reset();
1161
+ }, "clear"));
1162
+ d(this, ee, /* @__PURE__ */ h((r) => {
1163
+ var i;
1164
+ Array.isArray(r) || (r = [r]);
1165
+ const e = typeof ((i = t(this, N).fields) == null ? void 0 : i.get) == "function" ? t(this, N).fields.get() : Object.keys(r[0] || {}), s = [];
1166
+ return r.forEach((n) => {
1164
1167
  const a = { v: [] };
1165
1168
  e.forEach((o) => {
1166
1169
  a.v.push(n[o] !== void 0 && n[o] !== null ? n[o] : "");
1167
1170
  }), s.push(a);
1168
1171
  }), s;
1169
1172
  }, "#json2Array"));
1170
- d(this, ee, /* @__PURE__ */ h((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1171
- e.__ng = t(this, Ct).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = O.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1172
- }), i), "#defaultInsert"));
1173
- E(this, "add", /* @__PURE__ */ h((i, e = !0) => {
1174
- i === void 0 && (i = {});
1175
- const s = t(this, te).call(this, i);
1176
- t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this, ee).call(this, s)), this.resetRecords();
1177
- const r = this.count() - 1;
1173
+ d(this, se, /* @__PURE__ */ h((r) => (Array.isArray(r) || (r = [r]), r.forEach((e) => {
1174
+ e.__ng = t(this, Lt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = O.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1175
+ }), r), "#defaultInsert"));
1176
+ A(this, "add", /* @__PURE__ */ h((r, e = !0) => {
1177
+ r === void 0 && (r = {});
1178
+ const s = t(this, ee).call(this, r);
1179
+ t(this, T).rawRecords = t(this, T).rawRecords.concat(t(this, se).call(this, s)), this.resetRecords();
1180
+ const i = this.count() - 1;
1178
1181
  return e || s.forEach((n, a) => {
1179
- const o = t(this, k).rawRecords[r - a];
1182
+ const o = t(this, T).rawRecords[i - a];
1180
1183
  o && (o.__ng.rowState = O.ROW_STATE.EMPTY);
1181
- }), t(this, st).call(this), r;
1184
+ }), t(this, st).call(this), i;
1182
1185
  }, "add"));
1183
- E(this, "delete", /* @__PURE__ */ h((i) => {
1186
+ A(this, "delete", /* @__PURE__ */ h((r) => {
1184
1187
  let e = [];
1185
- Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, k).host.row.at] : e = [parseInt(i, 10)], e.sort((s, r) => r - s).forEach((s) => {
1186
- if (t(this, N)[s]) {
1187
- const r = t(this, N)[s].__ng.rowid;
1188
- t(this, N)[s].__ng.rowState === O.ROW_STATE.INSERT ? t(this, k).rawRecords = t(this, k).rawRecords.filter((n) => n.__ng.rowid !== r) : t(this, k).rawRecords.forEach((n) => {
1189
- n.__ng.rowid === r && (n.__ng.deleted = !0, n.__ng.rowState = O.ROW_STATE.DELETE);
1188
+ Array.isArray(r) ? e = r : typeof r > "u" ? e = [t(this, T).host.row.at] : e = [parseInt(r, 10)], e.sort((s, i) => i - s).forEach((s) => {
1189
+ if (t(this, W)[s]) {
1190
+ const i = t(this, W)[s].__ng.rowid;
1191
+ t(this, W)[s].__ng.rowState === O.ROW_STATE.INSERT ? t(this, T).rawRecords = t(this, T).rawRecords.filter((n) => n.__ng.rowid !== i) : t(this, T).rawRecords.forEach((n) => {
1192
+ n.__ng.rowid === i && (n.__ng.deleted = !0, n.__ng.rowState = O.ROW_STATE.DELETE);
1190
1193
  });
1191
1194
  }
1192
1195
  }), this.resetRecords(), t(this, st).call(this);
1193
1196
  }, "delete"));
1194
- E(this, "setValue", /* @__PURE__ */ h((i, e, s) => {
1197
+ A(this, "setValue", /* @__PURE__ */ h((r, e, s) => {
1195
1198
  var c;
1196
- i = parseInt(i, 10);
1197
- const n = (typeof ((c = t(this, _).fields) == null ? void 0 : c.get) == "function" ? t(this, _).fields.get() : []).indexOf(e);
1199
+ r = parseInt(r, 10);
1200
+ const n = (typeof ((c = t(this, N).fields) == null ? void 0 : c.get) == "function" ? t(this, N).fields.get() : []).indexOf(e);
1198
1201
  if (n < 0) return;
1199
- const a = this.getValidData()[i];
1202
+ const a = this.getValidData()[r];
1200
1203
  if (!a) return;
1201
1204
  const o = a.v[n];
1202
1205
  o !== s && a.__ng.rowState !== O.ROW_STATE.INSERT && (a.__ng.o.hasOwnProperty(e) || (a.__ng.o[e] = o), a.__ng.rowState = O.ROW_STATE.UPDATE), a.v[n] = s;
1203
1206
  }, "setValue"));
1204
- E(this, "resetRecords", /* @__PURE__ */ h(() => {
1205
- y(this, dt, t(this, k).rawRecords.filter((i) => !i.__ng.deleted)), y(this, N, t(this, k).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, k).rawRecords.forEach((i, e) => {
1206
- i.__ng.rowidx = e;
1207
- }), t(this, N).forEach((i, e) => {
1208
- i.__ng.i = e;
1207
+ A(this, "resetRecords", /* @__PURE__ */ h(() => {
1208
+ y(this, dt, t(this, T).rawRecords.filter((r) => !r.__ng.deleted)), y(this, W, t(this, T).rawRecords.filter((r) => !r.__ng.deleted && !r.__ng.filtered)), t(this, T).rawRecords.forEach((r, e) => {
1209
+ r.__ng.rowidx = e;
1210
+ }), t(this, W).forEach((r, e) => {
1211
+ r.__ng.i = e;
1209
1212
  });
1210
1213
  }, "resetRecords"));
1211
- E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, N).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, N)), "getValidData"));
1212
- d(this, ft, /* @__PURE__ */ h((i) => {
1214
+ A(this, "getValidData", /* @__PURE__ */ h(() => (t(this, W).length === 0 && t(this, T).rawRecords.length > 0 && this.resetRecords(), t(this, W)), "getValidData"));
1215
+ d(this, ft, /* @__PURE__ */ h((r) => {
1213
1216
  var a;
1214
- if (!i) return i;
1215
- const e = !Array.isArray(i), s = e ? [i] : i, r = typeof ((a = t(this, _).fields) == null ? void 0 : a.get) == "function" ? t(this, _).fields.get() : [], n = s.filter((o) => !o.__ng.deleted).map((o) => {
1217
+ if (!r) return r;
1218
+ const e = !Array.isArray(r), s = e ? [r] : r, i = typeof ((a = t(this, N).fields) == null ? void 0 : a.get) == "function" ? t(this, N).fields.get() : [], n = s.filter((o) => !o.__ng.deleted).map((o) => {
1216
1219
  const c = {};
1217
- return r.forEach((l, f) => {
1220
+ return i.forEach((l, f) => {
1218
1221
  c[l] = o.v ? o.v[f] : o[l];
1219
1222
  }), c.__ng = o.__ng, c;
1220
1223
  });
1221
1224
  return e ? n[0] : n;
1222
1225
  }, "#conv"));
1223
- E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1224
- y(this, _, i), y(this, k, e), t(this, Qt).call(this);
1226
+ A(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1227
+ y(this, N, r), y(this, T, e), t(this, te).call(this);
1225
1228
  }
1226
1229
  get source() {
1227
- return t(this, ft).call(this, t(this, k).rawRecords);
1230
+ return t(this, ft).call(this, t(this, T).rawRecords);
1228
1231
  }
1229
- set source(i) {
1230
- this.clear(), this.add(i, !1);
1232
+ set source(r) {
1233
+ this.clear(), this.add(r, !1);
1231
1234
  }
1232
1235
  get nextId() {
1233
- return ++Ye(this, Jt)._;
1236
+ return ++Ue(this, Qt)._;
1234
1237
  }
1235
1238
  get count() {
1236
- return t(this, N).length;
1239
+ return t(this, W).length;
1237
1240
  }
1238
1241
  get length() {
1239
- return t(this, N).length;
1242
+ return t(this, W).length;
1240
1243
  }
1241
1244
  getRowCount() {
1242
1245
  return this.length;
1243
1246
  }
1244
1247
  };
1245
- _ = new WeakMap(), k = new WeakMap(), N = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), st = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), h(O, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1246
- E(O, "ROW_STATE", {
1248
+ N = new WeakMap(), T = new WeakMap(), W = new WeakMap(), dt = new WeakMap(), Qt = new WeakMap(), Y = new WeakMap(), te = new WeakMap(), st = new WeakMap(), Lt = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), ft = new WeakMap(), h(O, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1249
+ A(O, "ROW_STATE", {
1247
1250
  EMPTY: "EMPTY",
1248
1251
  NORMAL: "NORMAL",
1249
1252
  INSERT: "INSERT",
1250
1253
  UPDATE: "UPDATE",
1251
1254
  DELETE: "DELETE"
1252
1255
  });
1253
- let ge = O;
1254
- var it;
1255
- const We = class We {
1256
- constructor(i) {
1257
- d(this, it);
1258
- y(this, it, i), this.row = new ue(this), this.data = new ge(t(this, it), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1256
+ let be = O;
1257
+ var rt;
1258
+ const Oe = class Oe {
1259
+ constructor(r) {
1260
+ d(this, rt);
1261
+ y(this, rt, r), this.row = new ge(this), this.data = new be(t(this, rt), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1259
1262
  var e;
1260
- (e = t(this, it).view) != null && e.redraw && t(this, it).view.redraw();
1263
+ (e = t(this, rt).view) != null && e.redraw && t(this, rt).view.redraw();
1261
1264
  }, this.setDataSource = (e) => {
1262
1265
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1263
1266
  }, this.getRowState = (e) => {
1264
- var r, n;
1267
+ var i, n;
1265
1268
  const s = parseInt(e, 10);
1266
1269
  if (!(s >= this.data.count()))
1267
- return (n = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : n.rowState;
1270
+ return (n = (i = this.data.getValidData()[s]) == null ? void 0 : i.__ng) == null ? void 0 : n.rowState;
1268
1271
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1269
1272
  this.row.at = e;
1270
- }, 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) => {
1271
- e = parseInt(e, 10), this.data.setValue(e, s, r);
1273
+ }, 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, i) => {
1274
+ e = parseInt(e, 10), this.data.setValue(e, s, i);
1272
1275
  }, this.setDataSource([]);
1273
1276
  }
1274
1277
  };
1275
- it = new WeakMap(), h(We, "ngDataManager");
1276
- let be = We;
1277
- var ut, H, Lt, se;
1278
- const Oe = class Oe {
1278
+ rt = new WeakMap(), h(Oe, "ngDataManager");
1279
+ let ye = Oe;
1280
+ var ut, L, Ht, re;
1281
+ const Be = class Be {
1279
1282
  // 🎯 이제 { name: string, type: string } 객체들의 배열로 관리합니다.
1280
- constructor(i) {
1283
+ constructor(r) {
1281
1284
  d(this, ut);
1282
- d(this, H, []);
1283
- E(this, "add", /* @__PURE__ */ h((i, e = "string") => {
1284
- i.forEach((s) => {
1285
- t(this, H).some((r) => r.name === s) || t(this, H).push({ name: s, type: e });
1286
- }), t(this, Lt).call(this);
1285
+ d(this, L, []);
1286
+ A(this, "add", /* @__PURE__ */ h((r, e = "string") => {
1287
+ r.forEach((s) => {
1288
+ t(this, L).some((i) => i.name === s) || t(this, L).push({ name: s, type: e });
1289
+ }), t(this, Ht).call(this);
1287
1290
  }, "add"));
1288
- d(this, Lt, /* @__PURE__ */ h(() => {
1289
- const i = /* @__PURE__ */ new Map();
1290
- t(this, H).forEach((e) => {
1291
- i.set(e.name, e.type);
1292
- }), y(this, H, Array.from(i, ([e, s]) => ({ name: e, type: s }))), y(this, H, t(this, H).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, H).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1291
+ d(this, Ht, /* @__PURE__ */ h(() => {
1292
+ const r = /* @__PURE__ */ new Map();
1293
+ t(this, L).forEach((e) => {
1294
+ r.set(e.name, e.type);
1295
+ }), y(this, L, Array.from(r, ([e, s]) => ({ name: e, type: s }))), y(this, L, t(this, L).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, L).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1293
1296
  }, "#adjust"));
1294
- d(this, se, /* @__PURE__ */ h(() => {
1295
- y(this, H, []), C.log(t(this, ut).querySelectorAll("table"));
1296
- const i = Array.from(t(this, ut).querySelectorAll("table"));
1297
- if (!(!i || i.length === 0)) {
1298
- for (const e of i)
1299
- C.log(e), $("[data-bind]", e).each((s, r) => {
1300
- const n = r.dataset.bind, a = r.getAttribute("data-type") || "string";
1301
- n && t(this, H).push({ name: n, type: a });
1297
+ d(this, re, /* @__PURE__ */ h(() => {
1298
+ y(this, L, []), H.log(t(this, ut).querySelectorAll("table"));
1299
+ const r = Array.from(t(this, ut).querySelectorAll("table"));
1300
+ if (!(!r || r.length === 0)) {
1301
+ for (const e of r)
1302
+ H.log(e), $("[data-bind]", e).each((s, i) => {
1303
+ const n = i.dataset.bind, a = i.getAttribute("data-type") || "string";
1304
+ n && t(this, L).push({ name: n, type: a });
1302
1305
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1303
- $(`[${s}]`, e).each((r, n) => {
1306
+ $(`[${s}]`, e).each((i, n) => {
1304
1307
  var a = n.getAttribute(s);
1305
1308
  if (a.indexOf("data.") < 0) {
1306
1309
  const o = a.search(/[(]/g);
@@ -1315,72 +1318,72 @@ const Oe = class Oe {
1315
1318
  if (o.trim() != "") {
1316
1319
  const c = o.search(/[^_A-Za-z0-9]/g);
1317
1320
  let l = "";
1318
- c >= 0 ? l = o.substring(0, c) : a.startsWith("data.") && (l = o.replace("data.", "")), l && t(this, H).push({ name: l, type: "string" });
1321
+ c >= 0 ? l = o.substring(0, c) : a.startsWith("data.") && (l = o.replace("data.", "")), l && t(this, L).push({ name: l, type: "string" });
1319
1322
  }
1320
1323
  });
1321
1324
  });
1322
1325
  });
1323
- t(this, Lt).call(this);
1326
+ t(this, Ht).call(this);
1324
1327
  }
1325
1328
  }, "#init"));
1326
- y(this, ut, i), t(this, se).call(this);
1329
+ y(this, ut, r), t(this, re).call(this);
1327
1330
  }
1328
1331
  // 🎯 기존에 필드 이름만 쓰던 곳들과의 호환을 위해 이름 배열만 리턴하는 메서드 유지
1329
1332
  get() {
1330
- return t(this, H).map((i) => i.name);
1333
+ return t(this, L).map((r) => r.name);
1331
1334
  }
1332
1335
  // 🎯 내부 객체 통째로 얻기
1333
1336
  getFields() {
1334
- return t(this, H);
1337
+ return t(this, L);
1335
1338
  }
1336
1339
  // 🎯 특정 필드의 데이터 타입 조회
1337
- getType(i) {
1338
- const e = t(this, H).find((s) => s.name === i);
1340
+ getType(r) {
1341
+ const e = t(this, L).find((s) => s.name === r);
1339
1342
  return e ? e.type : "string";
1340
1343
  }
1341
- indexOf(i) {
1342
- return t(this, H).findIndex((e) => e.name === i);
1344
+ indexOf(r) {
1345
+ return t(this, L).findIndex((e) => e.name === r);
1343
1346
  }
1344
- includes(i) {
1345
- return t(this, H).some((e) => e.name === i);
1347
+ includes(r) {
1348
+ return t(this, L).some((e) => e.name === r);
1346
1349
  }
1347
1350
  };
1348
- ut = new WeakMap(), H = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(), h(Oe, "ngFields");
1349
- let ye = Oe;
1350
- var rt, ie, re;
1351
- const Be = class Be extends HTMLElement {
1351
+ ut = new WeakMap(), L = new WeakMap(), Ht = new WeakMap(), re = new WeakMap(), h(Be, "ngFields");
1352
+ let pe = Be;
1353
+ var it, ie, ne;
1354
+ const ze = class ze extends HTMLElement {
1352
1355
  constructor() {
1353
1356
  super();
1354
1357
  //#created = false;
1355
- d(this, rt);
1358
+ d(this, it);
1356
1359
  d(this, ie);
1357
- d(this, re, /* @__PURE__ */ h(() => {
1358
- this.fields = new ye(this), y(this, ie, new fe(this)), C.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1360
+ d(this, ne, /* @__PURE__ */ h(() => {
1361
+ this.fields = new pe(this), y(this, ie, new ue(this)), H.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1359
1362
  }, "#init"));
1360
- this.attachShadow({ mode: "open" }), y(this, rt, new be(this));
1363
+ this.attachShadow({ mode: "open" }), y(this, it, new ye(this));
1361
1364
  }
1362
1365
  connectedCallback() {
1363
- t(this, re).call(this);
1366
+ t(this, ne).call(this);
1364
1367
  }
1365
1368
  disconnectedCallback() {
1366
- C.log("NineTable disconnected.");
1369
+ H.log("NineTable disconnected.");
1367
1370
  }
1368
1371
  // 🎯 외부에서 grid.data.set(...) 형태로 접근할 수 있도록 데이터 매니저 오픈
1369
1372
  get data() {
1370
- return t(this, rt).data;
1373
+ return t(this, it).data;
1371
1374
  }
1372
1375
  // 🎯 행(row) 관련 제어 접근자 오픈
1373
1376
  get row() {
1374
- return t(this, rt).row;
1377
+ return t(this, it).row;
1375
1378
  }
1376
1379
  // 🎯 전체 데이터 매니저 접근 필요할 경우
1377
1380
  get dataManager() {
1378
- return t(this, rt);
1381
+ return t(this, it);
1379
1382
  }
1380
1383
  };
1381
- rt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), h(Be, "NineTable");
1382
- let pe = Be;
1383
- customElements.get("nine-table") || customElements.define("nine-table", pe);
1384
+ it = new WeakMap(), ie = new WeakMap(), ne = new WeakMap(), h(ze, "NineTable");
1385
+ let me = ze;
1386
+ customElements.get("nine-table") || customElements.define("nine-table", me);
1384
1387
  const mt = class mt extends HTMLElement {
1385
1388
  // 👈 커스텀 스타일용 캐시 추가
1386
1389
  constructor() {
@@ -1392,56 +1395,56 @@ const mt = class mt extends HTMLElement {
1392
1395
  connectedCallback() {
1393
1396
  }
1394
1397
  };
1395
- h(mt, "BasicCellElement"), E(mt, "_styleCache", /* @__PURE__ */ new Map()), E(mt, "_customStyleCache", /* @__PURE__ */ new Map());
1396
- let me = mt;
1397
- var T, Ht, p, Ae, Re, qe, ke, Te;
1398
- const ze = class ze extends me {
1398
+ h(mt, "BasicCellElement"), A(mt, "_styleCache", /* @__PURE__ */ new Map()), A(mt, "_customStyleCache", /* @__PURE__ */ new Map());
1399
+ let xe = mt;
1400
+ var C, Mt, p, Re, qe, ke, Te, Ce;
1401
+ const De = class De extends xe {
1399
1402
  constructor() {
1400
1403
  super();
1401
- d(this, T);
1402
- d(this, Ht);
1404
+ d(this, C);
1405
+ d(this, Mt);
1403
1406
  d(this, p);
1404
- d(this, Ae);
1405
1407
  d(this, Re);
1406
1408
  d(this, qe);
1407
1409
  d(this, ke);
1408
- E(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1410
+ d(this, Te);
1411
+ A(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1409
1412
  if (t(this, p))
1410
1413
  if (t(this, p).closest("tbody")) {
1411
- const s = t(this, p).closest("tr").data, r = parseInt(t(this, p).dataset.row);
1414
+ const s = t(this, p).closest("tr").data, i = parseInt(t(this, p).dataset.row);
1412
1415
  if (!s) return "";
1413
1416
  if (ninegrid.isNull(t(this, p).dataset.expr)) {
1414
1417
  if (!ninegrid.isNull(t(this, p).dataset.bind))
1415
1418
  return s[t(this, p).dataset.bind] || ninegrid.nvl(e, "");
1416
1419
  } else try {
1417
- return this.getExprValue(t(this, p).dataset.expr, s, r, t(this, p));
1420
+ return this.getExprValue(t(this, p).dataset.expr, s, i, t(this, p));
1418
1421
  } catch {
1419
1422
  console.error(t(this, p).dataset.expr, s, t(this, p).dataset.row);
1420
1423
  }
1421
1424
  return ninegrid.nvl(e, "");
1422
1425
  } else
1423
1426
  try {
1424
- return t(this, T).exprFunction(t(this, p).dataset.expr).call(this, null, -1, t(this, T).data);
1427
+ return t(this, C).exprFunction(t(this, p).dataset.expr).call(this, null, -1, t(this, C).data);
1425
1428
  } catch {
1426
1429
  }
1427
1430
  }, "getDisplayText"));
1428
- d(this, Te, /* @__PURE__ */ h(() => {
1429
- if (!(!t(this, T) || !t(this, T).template || !t(this, p).closest("tbody.bindable"))) {
1431
+ d(this, Ce, /* @__PURE__ */ h(() => {
1432
+ if (!(!t(this, C) || !t(this, C).template || !t(this, p).closest("tbody.bindable"))) {
1430
1433
  var e = ninegrid.j.querySelectorAll(t(this, p)).attr("suppress");
1431
1434
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1432
- var s = t(this, p).closest("tr"), r = [];
1433
- $("th,td", s).each((m, W) => {
1434
- var L = ninegrid.j.querySelectorAll(W).attr("suppress");
1435
- L && W.dataset.row && (L = parseInt(L), !isNaN(L) && L <= e && r.push(L));
1436
- }), r.sort();
1435
+ var s = t(this, p).closest("tr"), i = [];
1436
+ $("th,td", s).each((x, M) => {
1437
+ var k = ninegrid.j.querySelectorAll(M).attr("suppress");
1438
+ k && M.dataset.row && (k = parseInt(k), !isNaN(k) && k <= e && i.push(k));
1439
+ }), i.sort();
1437
1440
  var n = !1;
1438
- if (parseInt(s.sectionRowIndex / t(this, T).template.length) > 0)
1439
- for (var a of r) {
1441
+ if (parseInt(s.sectionRowIndex / t(this, C).template.length) > 0)
1442
+ for (var a of i) {
1440
1443
  if (a > e) break;
1441
- var o = parseInt(t(this, p).dataset.row), c = o - 1, l = t(this, p).closest("tr").data, f = t(this, T).data.get(c);
1444
+ var o = parseInt(t(this, p).dataset.row), c = o - 1, l = t(this, p).closest("tr").data, f = t(this, C).data.get(c);
1442
1445
  t(this, p).dataset.matrixRow;
1443
- var u = t(this, T).body.querySelector(`tbody.bindable [suppress="${a}"][data-matrix-row="${t(this, p).dataset.matrixRow}"]`), g = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, o) : l[u.dataset.bind], b = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, c) : f[u.dataset.bind];
1444
- if (g != b) {
1446
+ var u = t(this, C).body.querySelector(`tbody.bindable [suppress="${a}"][data-matrix-row="${t(this, p).dataset.matrixRow}"]`), b = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, o) : l[u.dataset.bind], g = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, c) : f[u.dataset.bind];
1447
+ if (b != g) {
1445
1448
  n = !0;
1446
1449
  break;
1447
1450
  }
@@ -1449,17 +1452,17 @@ const ze = class ze extends me {
1449
1452
  else
1450
1453
  n = !0;
1451
1454
  n ? ninegrid.j.querySelectorAll(t(this, p)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, p)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, p)).hasClass("hidden") || (n ? ninegrid.j.querySelectorAll(t(this, p)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, p)).addClass("hidden"));
1452
- var x = parseInt(t(this, p).dataset.matrixRow), v = x - 1, A = t(this, T).body.querySelector(`tbody.bindable [data-col="${t(this, p).dataset.col}"][data-matrix-row="${v}"]`);
1453
- $(A).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").addClass("last-suppress") : !$(A).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").removeClass("last-suppress");
1455
+ var m = parseInt(t(this, p).dataset.matrixRow), v = m - 1, E = t(this, C).body.querySelector(`tbody.bindable [data-col="${t(this, p).dataset.col}"][data-matrix-row="${v}"]`);
1456
+ $(E).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(E).removeClass("last-none-suppress").addClass("last-suppress") : !$(E).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(E).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(E).removeClass("last-none-suppress").removeClass("last-suppress");
1454
1457
  }
1455
1458
  }
1456
1459
  }, "#resetSuppress"));
1457
- E(this, "getExprValue", /* @__PURE__ */ h((e, s, r, n) => {
1460
+ A(this, "getExprValue", /* @__PURE__ */ h((e, s, i, n) => {
1458
1461
  if (typeof e < "u")
1459
1462
  try {
1460
- r = parseInt(r);
1463
+ i = parseInt(i);
1461
1464
  const a = e.replace("()", "");
1462
- return t(this, T)[a] ? t(this, T)[a].call(this, s, r, t(this, p)) : t(this, T).exprFunction(e).call(this, s, r, t(this, T).data);
1465
+ return t(this, C)[a] ? t(this, C)[a].call(this, s, i, t(this, p)) : t(this, C).exprFunction(e).call(this, s, i, t(this, C).data);
1463
1466
  } catch {
1464
1467
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1465
1468
  }
@@ -1468,16 +1471,16 @@ const ze = class ze extends me {
1468
1471
  }, "getExprValue"));
1469
1472
  }
1470
1473
  connectedCallback() {
1471
- super.connectedCallback(), y(this, T, this.getRootNode().host), y(this, p, this.closest("th,td")), y(this, Ht, t(this, p).closest("tr"));
1474
+ super.connectedCallback(), y(this, C, this.getRootNode().host), y(this, p, this.closest("th,td")), y(this, Mt, t(this, p).closest("tr"));
1472
1475
  }
1473
1476
  get value() {
1474
- var e = !t(this, T) || !t(this, T).dataManager || !t(this, p) || !t(this, p).dataset || !t(this, p).dataset.row || !t(this, p).dataset.bind ? "" : t(this, p).closest("tr").data[t(this, p).dataset.bind];
1477
+ var e = !t(this, C) || !t(this, C).dataManager || !t(this, p) || !t(this, p).dataset || !t(this, p).dataset.row || !t(this, p).dataset.bind ? "" : t(this, p).closest("tr").data[t(this, p).dataset.bind];
1475
1478
  return e ?? "";
1476
1479
  }
1477
1480
  set value(e) {
1478
1481
  var s = parseInt(t(this, p).dataset.row);
1479
- const r = this.getAttribute("update-row-state") != "false";
1480
- s < 0 ? t(this, T).data.setValueNF(parseInt(t(this, p).dataset.index), t(this, p).dataset.bind, e, r) : t(this, T).data.setValue(s, t(this, p).dataset.bind, e, r);
1482
+ const i = this.getAttribute("update-row-state") != "false";
1483
+ s < 0 ? t(this, C).data.setValueNF(parseInt(t(this, p).dataset.index), t(this, p).dataset.bind, e, i) : t(this, C).data.setValue(s, t(this, p).dataset.bind, e, i);
1481
1484
  }
1482
1485
  get row() {
1483
1486
  return parseInt(t(this, p).dataset.row);
@@ -1487,12 +1490,12 @@ const ze = class ze extends me {
1487
1490
  }
1488
1491
  refresh() {
1489
1492
  const e = t(this, p).dataset.bind;
1490
- return parseInt(t(this, p).dataset.row), t(this, Ht).data[e];
1493
+ return parseInt(t(this, p).dataset.row), t(this, Mt).data[e];
1491
1494
  }
1492
1495
  };
1493
- T = new WeakMap(), Ht = new WeakMap(), p = new WeakMap(), Ae = new WeakMap(), Re = new WeakMap(), qe = new WeakMap(), ke = new WeakMap(), Te = new WeakMap(), h(ze, "CellElement");
1494
- let xe = ze;
1495
- const De = class De extends xe {
1496
+ C = new WeakMap(), Mt = new WeakMap(), p = new WeakMap(), Re = new WeakMap(), qe = new WeakMap(), ke = new WeakMap(), Te = new WeakMap(), Ce = new WeakMap(), h(De, "CellElement");
1497
+ let ve = De;
1498
+ const Pe = class Pe extends ve {
1496
1499
  constructor() {
1497
1500
  super();
1498
1501
  }
@@ -1503,21 +1506,21 @@ const De = class De extends xe {
1503
1506
  return super.refresh();
1504
1507
  }
1505
1508
  };
1506
- h(De, "EditableCellElement");
1507
- let ve = De;
1508
- var Mt, nt, gt, bt, ne, U, Ce;
1509
- const Pe = class Pe extends ve {
1509
+ h(Pe, "EditableCellElement");
1510
+ let we = Pe;
1511
+ var $t, nt, gt, bt, oe, U, Le;
1512
+ const je = class je extends we {
1510
1513
  constructor() {
1511
1514
  super();
1512
- d(this, Mt);
1515
+ d(this, $t);
1513
1516
  d(this, nt);
1514
1517
  d(this, gt);
1515
1518
  d(this, bt);
1516
- d(this, ne);
1519
+ d(this, oe);
1517
1520
  d(this, U);
1518
- E(this, "refresh", /* @__PURE__ */ h(() => {
1521
+ A(this, "refresh", /* @__PURE__ */ h(() => {
1519
1522
  const e = super.refresh();
1520
- C.log("::", e), t(this, Mt).value = e;
1523
+ H.log("::", e), t(this, $t).value = e;
1521
1524
  }, "refresh"));
1522
1525
  /**
1523
1526
  dataRefresh = (v) => {
@@ -1549,14 +1552,14 @@ const Pe = class Pe extends ve {
1549
1552
  if (!v) this.reset();
1550
1553
  };
1551
1554
  */
1552
- d(this, Ce, /* @__PURE__ */ h((e) => {
1555
+ d(this, Le, /* @__PURE__ */ h((e) => {
1553
1556
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1554
1557
  if (t(this, nt) == "number") {
1555
1558
  let n = [];
1556
1559
  if (t(this, U) && Number(t(this, U)) > 0 && n.push("."), t(this, bt) && Number(t(this, bt)) >= 0 && n.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !n.includes(e.key) && e.preventDefault(), t(this, U) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1557
- var s = e.target.value, r = s.indexOf(".");
1558
- if (r >= 0) {
1559
- var s = s.substr(r + 1, s.length);
1560
+ var s = e.target.value, i = s.indexOf(".");
1561
+ if (i >= 0) {
1562
+ var s = s.substr(i + 1, s.length);
1560
1563
  s.length >= Number(t(this, U)) && e.preventDefault();
1561
1564
  }
1562
1565
  }
@@ -1564,7 +1567,7 @@ const Pe = class Pe extends ve {
1564
1567
  t(this, gt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, gt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1565
1568
  }
1566
1569
  }, "#onKeyDown"));
1567
- if (this.applyBaseStyle(), y(this, nt, this.getAttribute("type") || "text"), y(this, gt, this.getAttribute("maxbyte")), y(this, bt, this.getAttribute("min")), y(this, ne, this.getAttribute("max")), y(this, U, this.getAttribute("scale")), !["text", "number"].includes(t(this, nt))) throw `invalid type : ${t(this, nt)}`;
1570
+ if (this.applyBaseStyle(), y(this, nt, this.getAttribute("type") || "text"), y(this, gt, this.getAttribute("maxbyte")), y(this, bt, this.getAttribute("min")), y(this, oe, this.getAttribute("max")), y(this, U, this.getAttribute("scale")), !["text", "number"].includes(t(this, nt))) throw `invalid type : ${t(this, nt)}`;
1568
1571
  }
1569
1572
  connectedCallback() {
1570
1573
  for (var e = [], s = 0; s < this.attributes.length; s++)
@@ -1574,11 +1577,11 @@ const Pe = class Pe extends ve {
1574
1577
  ${e.join(" ")}
1575
1578
  ondragstart="return false;"
1576
1579
  >
1577
- `, super.connectedCallback(), y(this, Mt, this.querySelector("input"));
1580
+ `, super.connectedCallback(), y(this, $t, this.querySelector("input"));
1578
1581
  }
1579
1582
  };
1580
- Mt = new WeakMap(), nt = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), ne = new WeakMap(), U = new WeakMap(), Ce = new WeakMap(), h(Pe, "CellInputText");
1581
- let we = Pe;
1583
+ $t = new WeakMap(), nt = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), oe = new WeakMap(), U = new WeakMap(), Le = new WeakMap(), h(je, "CellInputText");
1584
+ let Se = je;
1582
1585
  customElements.get("cell-input-text");
1583
- customElements.get("cell-input") || customElements.define("cell-input", we);
1586
+ customElements.get("cell-input") || customElements.define("cell-input", Se);
1584
1587
  //# sourceMappingURL=nine-table.js.map