@ninebone/table 0.0.709 → 0.0.710

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