@ninebone/table 0.0.555 β†’ 0.0.556

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.
@@ -3,8 +3,8 @@ var Ve = (R) => {
3
3
  throw TypeError(R);
4
4
  };
5
5
  var Xe = (R, i, e) => i in R ? Fe(R, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : R[i] = e;
6
- var c = (R, i) => Fe(R, "name", { value: i, configurable: !0 });
7
- var A = (R, i, e) => Xe(R, typeof i != "symbol" ? i + "" : i, e), Ye = (R, i, e) => i.has(R) || Ve("Cannot " + e);
6
+ var h = (R, i) => Fe(R, "name", { value: i, configurable: !0 });
7
+ var E = (R, i, e) => Xe(R, typeof i != "symbol" ? i + "" : i, e), Ye = (R, i, e) => i.has(R) || Ve("Cannot " + e);
8
8
  var t = (R, i, e) => (Ye(R, i, "read from private field"), e ? e.call(R) : i.get(R)), d = (R, i, e) => i.has(R) ? Ve("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(R) : i.set(R, e), p = (R, i, e, s) => (Ye(R, i, "write to private field"), s ? s.call(R, e) : i.set(R, e), e);
9
9
  var Ue = (R, i, e, s) => ({
10
10
  set _(r) {
@@ -20,70 +20,70 @@ const He = class He extends Ke.constructor {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- c(He, "Trace");
23
+ h(He, "Trace");
24
24
  let oe = He;
25
25
  const N = new oe();
26
- var z, j, w, X, K, Z, It, G, _t;
26
+ var P, j, w, X, K, Z, It, G, _t;
27
27
  const Me = class Me extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- d(this, z);
30
+ d(this, P);
31
31
  d(this, j, !1);
32
32
  d(this, w);
33
33
  d(this, X);
34
34
  d(this, K);
35
35
  d(this, Z);
36
- d(this, It, /* @__PURE__ */ c(() => {
37
- if (!t(this, z)) return;
38
- const e = t(this, z).querySelector(".ng-container-body .ng-part-body");
36
+ d(this, It, /* @__PURE__ */ h(() => {
37
+ if (!t(this, P)) return;
38
+ const e = t(this, P).querySelector(".ng-container-body .ng-part-body");
39
39
  e && (p(this, Z, new ResizeObserver(() => {
40
40
  this.refresh();
41
41
  })), t(this, Z).observe(e));
42
42
  }, "#observeResize"));
43
- A(this, "refresh", /* @__PURE__ */ c(() => {
44
- if (!t(this, z) || !t(this, w) || t(this, j)) return;
43
+ E(this, "refresh", /* @__PURE__ */ h(() => {
44
+ if (!t(this, P) || !t(this, w) || t(this, j)) return;
45
45
  const e = t(this, w).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const r = t(this, w).track, n = t(this, w).thumb, o = t(this, z).querySelector(".ng-container-bottom"), a = e.clientWidth, h = s.scrollWidth;
48
- if (a !== 0 && h > a)
49
- o && (o.style.display = "flex");
47
+ const r = t(this, w).track, n = t(this, w).thumb, a = t(this, P).querySelector(".ng-container-bottom"), o = e.clientWidth, c = s.scrollWidth;
48
+ if (o !== 0 && c > o)
49
+ a && (a.style.display = "flex");
50
50
  else {
51
- o && (o.style.display = "none");
51
+ a && (a.style.display = "none");
52
52
  return;
53
53
  }
54
54
  const l = r.clientWidth;
55
55
  if (l <= 0) return;
56
- const f = Math.max(Math.min(l * (a / h), l), 20);
56
+ const f = Math.max(Math.min(l * (o / c), l), 20);
57
57
  n.style.width = `${f}px`;
58
- const u = e.scrollLeft, g = h - a;
58
+ const u = e.scrollLeft, g = c - o;
59
59
  let b = 0;
60
60
  g > 0 && (b = parseInt(u / g * (l - f), 10)), b < 0 && (b = 0);
61
- const m = l - f;
62
- b > m && (b = m), n.style.left = `${b}px`, t(this, w).left.disabled = b === 0, t(this, w).right.disabled = b >= m - 1;
61
+ const x = l - f;
62
+ b > x && (b = x), n.style.left = `${b}px`, t(this, w).left.disabled = b === 0, t(this, w).right.disabled = b >= x - 1;
63
63
  }, "refresh"));
64
- d(this, G, /* @__PURE__ */ c((e) => {
64
+ d(this, G, /* @__PURE__ */ h((e) => {
65
65
  if (!t(this, w)) return !1;
66
66
  const s = t(this, w).container, r = s.querySelector("table");
67
67
  if (!r) return !1;
68
- const n = t(this, w).track.getBoundingClientRect(), o = t(this, w).thumb.clientWidth;
69
- let a = e;
70
- a < 0 && (a = 0);
71
- const h = n.width - o;
72
- a > h && (a = h), a = parseInt(a, 10), t(this, w).thumb.style.left = `${a}px`, t(this, w).left.disabled = a === 0, t(this, w).right.disabled = a >= h - 1;
68
+ const n = t(this, w).track.getBoundingClientRect(), a = t(this, w).thumb.clientWidth;
69
+ let o = e;
70
+ o < 0 && (o = 0);
71
+ const c = n.width - a;
72
+ o > c && (o = c), o = parseInt(o, 10), t(this, w).thumb.style.left = `${o}px`, t(this, w).left.disabled = o === 0, t(this, w).right.disabled = o >= c - 1;
73
73
  const l = s.clientWidth, u = r.scrollWidth - l;
74
- return h > 0 && u > 0 && (s.scrollLeft = a / h * u), a > 0 && a < h - 1;
74
+ return c > 0 && u > 0 && (s.scrollLeft = o / c * u), o > 0 && o < c - 1;
75
75
  }, "#thumbMoveTo"));
76
- d(this, _t, /* @__PURE__ */ c(() => {
77
- const e = /* @__PURE__ */ c((r) => {
76
+ d(this, _t, /* @__PURE__ */ h(() => {
77
+ const e = /* @__PURE__ */ h((r) => {
78
78
  clearInterval(t(this, X)), clearInterval(t(this, K));
79
79
  const n = parseInt(t(this, w).thumb.style.left || 0, 10);
80
80
  t(this, G).call(this, n + r), p(this, X, setInterval(() => {
81
81
  clearInterval(t(this, X)), p(this, K, setInterval(() => {
82
- const o = parseInt(t(this, w).thumb.style.left || 0, 10);
83
- t(this, G).call(this, o + r) || clearInterval(t(this, K));
82
+ const a = parseInt(t(this, w).thumb.style.left || 0, 10);
83
+ t(this, G).call(this, a + r) || clearInterval(t(this, K));
84
84
  }, 50));
85
85
  }, 500));
86
- }, "delayScroll"), s = /* @__PURE__ */ c(() => {
86
+ }, "delayScroll"), s = /* @__PURE__ */ h(() => {
87
87
  clearInterval(t(this, X)), clearInterval(t(this, K));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((r) => {
@@ -95,24 +95,24 @@ const Me = class Me extends HTMLElement {
95
95
  }), t(this, w).left.addEventListener("touchstart", () => e(-20)), t(this, w).right.addEventListener("touchstart", () => e(20)), t(this, w).track.addEventListener("mousedown", (r) => {
96
96
  if (r.button !== 0) return;
97
97
  r.preventDefault();
98
- const n = t(this, w).track.getBoundingClientRect(), o = t(this, w).thumb.clientWidth;
99
- t(this, G).call(this, r.clientX - n.left - o / 2);
98
+ const n = t(this, w).track.getBoundingClientRect(), a = t(this, w).thumb.clientWidth;
99
+ t(this, G).call(this, r.clientX - n.left - a / 2);
100
100
  }), t(this, w).thumb.addEventListener("mousedown", (r) => {
101
101
  if (r.button !== 0) return;
102
102
  r.stopPropagation(), r.preventDefault(), p(this, j, !0), this.shiftX = r.clientX - t(this, w).thumb.getBoundingClientRect().left;
103
- const n = /* @__PURE__ */ c((a) => {
103
+ const n = /* @__PURE__ */ h((o) => {
104
104
  if (!t(this, j)) return;
105
- const h = t(this, w).track.getBoundingClientRect();
106
- t(this, G).call(this, a.clientX - h.left - this.shiftX);
107
- }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
108
- p(this, j, !1), s(), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
105
+ const c = t(this, w).track.getBoundingClientRect();
106
+ t(this, G).call(this, o.clientX - c.left - this.shiftX);
107
+ }, "onMouseMove"), a = /* @__PURE__ */ h(() => {
108
+ p(this, j, !1), s(), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", a), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
110
+ document.addEventListener("mousemove", n), document.addEventListener("mouseup", a);
111
111
  });
112
112
  }, "#init"));
113
113
  }
114
114
  connectedCallback() {
115
- if (p(this, z, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, z)) return;
115
+ if (p(this, P, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, P)) return;
116
116
  this.innerHTML = `
117
117
  <style>
118
118
  nine-table-hscrollbar {
@@ -176,8 +176,8 @@ const Me = class Me extends HTMLElement {
176
176
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
- const e = /* @__PURE__ */ c(() => {
180
- const s = t(this, z).querySelector(".ng-container-body .ng-part-body");
179
+ const e = /* @__PURE__ */ h(() => {
180
+ const s = t(this, P).querySelector(".ng-container-body .ng-part-body");
181
181
  if (!s) {
182
182
  setTimeout(e, 10);
183
183
  return;
@@ -198,7 +198,7 @@ const Me = class Me extends HTMLElement {
198
198
  t(this, Z) && t(this, Z).disconnect();
199
199
  }
200
200
  };
201
- z = new WeakMap(), j = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), It = new WeakMap(), G = new WeakMap(), _t = new WeakMap(), c(Me, "NineTableHScrollBar");
201
+ P = new WeakMap(), j = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), It = new WeakMap(), G = new WeakMap(), _t = new WeakMap(), h(Me, "NineTableHScrollBar");
202
202
  let ae = Me;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ae);
204
204
  var F, at, J, q, xt, vt, Nt;
@@ -211,9 +211,9 @@ const $e = class $e extends HTMLElement {
211
211
  d(this, q);
212
212
  d(this, xt, 0);
213
213
  d(this, vt, 0);
214
- A(this, "refresh", /* @__PURE__ */ c(() => {
214
+ E(this, "refresh", /* @__PURE__ */ h(() => {
215
215
  if (!t(this, F) || !t(this, q)) return;
216
- const e = t(this, q).container, s = t(this, q).track, r = t(this, q).thumb, n = e.clientHeight, a = (t(this, F).data.get() || []).length, h = t(this, at).getRowHeight(), l = a * h;
216
+ const e = t(this, q).container, s = t(this, q).track, r = t(this, q).thumb, n = e.clientHeight, o = (t(this, F).data.get() || []).length, c = t(this, at).getRowHeight(), l = o * c;
217
217
  if (l <= n) {
218
218
  r.style.display = "none", t(this, q).top.disabled = !0, t(this, q).bottom.disabled = !0;
219
219
  return;
@@ -224,41 +224,41 @@ const $e = class $e extends HTMLElement {
224
224
  const u = Math.max(Math.min(f * (n / l), f), 20);
225
225
  r.style.height = `${u}px`;
226
226
  const g = e.scrollTop, b = Math.max(l - n, 1);
227
- let m = 0;
228
- b > 0 && (m = g / b * (f - u));
227
+ let x = 0;
228
+ b > 0 && (x = g / b * (f - u));
229
229
  const v = f - u;
230
- m < 0 && (m = 0), m > v && (m = v), r.style.top = `${m}px`, t(this, q).top.disabled = g <= 0, t(this, q).bottom.disabled = g >= b - 1;
230
+ x < 0 && (x = 0), x > v && (x = v), r.style.top = `${x}px`, t(this, q).top.disabled = g <= 0, t(this, q).bottom.disabled = g >= b - 1;
231
231
  }, "refresh"));
232
- d(this, Nt, /* @__PURE__ */ c(() => {
232
+ d(this, Nt, /* @__PURE__ */ h(() => {
233
233
  N.log("nine-table-vscrollbar.#init");
234
- const e = t(this, q).container, s = /* @__PURE__ */ c(() => {
235
- const n = (t(this, F).data.get() || []).length, o = t(this, at).getRowHeight();
236
- return n * o;
234
+ const e = t(this, q).container, s = /* @__PURE__ */ h(() => {
235
+ const n = (t(this, F).data.get() || []).length, a = t(this, at).getRowHeight();
236
+ return n * a;
237
237
  }, "getContentHeight");
238
238
  e.addEventListener("scroll", () => {
239
239
  t(this, J) || this.refresh();
240
240
  }), t(this, q).thumb.addEventListener("mousedown", (r) => {
241
241
  if (r.button !== 0) return;
242
242
  r.stopPropagation(), r.preventDefault(), p(this, J, !0), p(this, xt, r.clientY), p(this, vt, e.scrollTop);
243
- const n = /* @__PURE__ */ c((a) => {
243
+ const n = /* @__PURE__ */ h((o) => {
244
244
  if (!t(this, J)) return;
245
- const h = t(this, q).track.getBoundingClientRect(), l = t(this, q).thumb.clientHeight, u = h.height - l, g = a.clientY - t(this, xt), b = e.clientHeight, m = s(), v = Math.max(m - b, 1);
245
+ const c = t(this, q).track.getBoundingClientRect(), l = t(this, q).thumb.clientHeight, u = c.height - l, g = o.clientY - t(this, xt), b = e.clientHeight, x = s(), v = Math.max(x - b, 1);
246
246
  if (u > 0 && v > 0) {
247
- const E = g / u * v;
248
- let x = t(this, vt) + E;
249
- const O = Math.max(0, m - b);
250
- x < 0 && (x = 0), x > O && (x = O), e.scrollTop = x;
247
+ const A = g / u * v;
248
+ let m = t(this, vt) + A;
249
+ const W = Math.max(0, x - b);
250
+ m < 0 && (m = 0), m > W && (m = W), e.scrollTop = m;
251
251
  }
252
252
  this.refresh();
253
- }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
254
- p(this, J, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
253
+ }, "onMouseMove"), a = /* @__PURE__ */ h(() => {
254
+ p(this, J, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", a), this.refresh();
255
255
  }, "onMouseUp");
256
- document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
256
+ document.addEventListener("mousemove", n), document.addEventListener("mouseup", a);
257
257
  }), t(this, q).track.addEventListener("mousedown", (r) => {
258
258
  if (r.button !== 0 || r.target === t(this, q).thumb) return;
259
- const n = t(this, q).track.getBoundingClientRect(), o = t(this, q).thumb.clientHeight, a = r.clientY - n.top - o / 2, l = n.height - o, f = e.clientHeight, u = s(), g = Math.max(u - f, 1);
259
+ const n = t(this, q).track.getBoundingClientRect(), a = t(this, q).thumb.clientHeight, o = r.clientY - n.top - a / 2, l = n.height - a, f = e.clientHeight, u = s(), g = Math.max(u - f, 1);
260
260
  if (l > 0 && g > 0) {
261
- const b = Math.max(0, Math.min(1, a / l));
261
+ const b = Math.max(0, Math.min(1, o / l));
262
262
  e.scrollTop = b * g;
263
263
  }
264
264
  this.refresh();
@@ -334,7 +334,7 @@ const $e = class $e extends HTMLElement {
334
334
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
335
335
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
336
336
  `;
337
- const e = /* @__PURE__ */ c(() => {
337
+ const e = /* @__PURE__ */ h(() => {
338
338
  const s = t(this, F).shadowRoot.querySelector(".ng-container-body .ng-part-body");
339
339
  if (!s) {
340
340
  setTimeout(e, 10);
@@ -351,16 +351,16 @@ const $e = class $e extends HTMLElement {
351
351
  e();
352
352
  }
353
353
  };
354
- F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), q = new WeakMap(), xt = new WeakMap(), vt = new WeakMap(), Nt = new WeakMap(), c($e, "NineTableVScrollBar");
354
+ F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), q = new WeakMap(), xt = new WeakMap(), vt = new WeakMap(), Nt = new WeakMap(), h($e, "NineTableVScrollBar");
355
355
  let le = $e;
356
356
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", le);
357
- var D, S, Q, P, H, V, tt, wt, Se, Ee, Wt, Ot, Bt, St, Et, zt, Pt, At, Ae, lt, Rt, Dt;
357
+ var D, S, Q, z, H, V, tt, wt, Se, Ee, Wt, Ot, Bt, St, Et, Pt, zt, At, Ae, lt, Rt, Dt;
358
358
  const Ie = class Ie {
359
359
  constructor(i) {
360
360
  d(this, D);
361
361
  d(this, S);
362
362
  d(this, Q);
363
- d(this, P, /* @__PURE__ */ new Map());
363
+ d(this, z, /* @__PURE__ */ new Map());
364
364
  d(this, H, null);
365
365
  d(this, V, null);
366
366
  d(this, tt, 0);
@@ -368,51 +368,52 @@ const Ie = class Ie {
368
368
  d(this, Se, !1);
369
369
  d(this, Ee, !1);
370
370
  d(this, Wt, 3);
371
- A(this, "refresh", /* @__PURE__ */ c(() => {
371
+ E(this, "refresh", /* @__PURE__ */ h(() => {
372
372
  var e;
373
373
  N.log("rowManager.refresh");
374
374
  const i = t(this, S).querySelector(".ng-container-body .ng-part-body");
375
375
  i && (t(this, St).call(this), t(this, lt).call(this, i.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
376
376
  }, "refresh"));
377
- A(this, "initialize", /* @__PURE__ */ c(() => {
377
+ E(this, "initialize", /* @__PURE__ */ h(() => {
378
378
  N.log("rowManager.initialize"), p(this, Q, {
379
379
  scrollTables: t(this, S).querySelectorAll(".ng-part-body table"),
380
380
  firstTr: t(this, S).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
- }), p(this, H, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
382
- const a = t(this, S).querySelector(o);
383
- if (!a) return;
384
- const h = a.querySelector(".ng-part-body table");
385
- if (!h) return;
386
- const l = h.querySelector("tbody.bindable-tbody");
381
+ }), p(this, H, null), t(this, z).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
382
+ const o = t(this, S).querySelector(a);
383
+ if (!o) return;
384
+ const c = o.querySelector(".ng-part-body table");
385
+ if (!c) return;
386
+ const l = c.querySelector("tbody.bindable-tbody");
387
387
  if (!l) return;
388
388
  const u = Array.from(l.querySelectorAll("tr")).map((g) => g.cloneNode(!0));
389
- t(this, P).set(o, u);
389
+ t(this, z).set(a, u);
390
390
  });
391
391
  const i = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), s = t(this, S).querySelector(".ng-container-right .ng-part-body"), r = t(this, S).querySelector(".ng-container-body .ng-part-header"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer");
392
- i && (t(this, Bt).call(this, i), t(this, At).call(this), t(this, St).call(this), t(this, lt).call(this, i.scrollTop), i.addEventListener("scroll", () => {
393
- const o = i.scrollTop, a = i.scrollLeft;
394
- e && (e.scrollTop = o), s && (s.scrollTop = o), r && (r.scrollLeft = a), n && (n.scrollLeft = a), t(this, lt).call(this, o);
392
+ i && (t(this, Bt).call(this, i), t(this, At).call(this), t(this, St).call(this), t(this, lt).call(this, i.scrollTop), i.addEventListener("scroll", (a) => {
393
+ a.stopPropagation();
394
+ const o = i.scrollTop, c = i.scrollLeft;
395
+ e && (e.scrollTop = o), s && (s.scrollTop = o), r && (r.scrollLeft = c), n && (n.scrollLeft = c), t(this, lt).call(this, o);
395
396
  }));
396
397
  }, "initialize"));
397
- d(this, Ot, /* @__PURE__ */ c((i, e) => {
398
+ d(this, Ot, /* @__PURE__ */ h((i, e) => {
398
399
  N.log("rowManager.#renderRows");
399
- const s = t(this, P).get(e);
400
+ const s = t(this, z).get(e);
400
401
  if (!s || s.length === 0) return;
401
402
  const r = i.querySelector(".ng-part-body tbody.bindable-tbody");
402
403
  if (!r) return;
403
- r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
404
- const n = r.querySelector("tr.nodata"), o = document.createDocumentFragment();
405
- for (let a = 0; a < t(this, wt); a++)
406
- s.forEach((h) => {
407
- o.appendChild(h.cloneNode(!0));
404
+ r.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
405
+ const n = r.querySelector("tr.nodata"), a = document.createDocumentFragment();
406
+ for (let o = 0; o < t(this, wt); o++)
407
+ s.forEach((c) => {
408
+ a.appendChild(c.cloneNode(!0));
408
409
  });
409
- n ? n.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this, Q).firstTr = r.querySelector("tr:not(.nodata)"));
410
+ n ? n.before(a) : r.appendChild(a), e === ".ng-container-body" && (t(this, Q).firstTr = r.querySelector("tr:not(.nodata)"));
410
411
  }, "#renderRows"));
411
- d(this, Bt, /* @__PURE__ */ c((i) => {
412
+ d(this, Bt, /* @__PURE__ */ h((i) => {
412
413
  if (N.log("rowManager.#measureAndCacheHeight"), t(this, H) !== null && t(this, H) > 0)
413
414
  return t(this, H);
414
415
  N.log("#measureAndCacheHeight");
415
- const e = t(this, P).get(".ng-container-body");
416
+ const e = t(this, z).get(".ng-container-body");
416
417
  if (!e || e.length === 0) return 24;
417
418
  const s = i.querySelector("tbody.bindable-tbody");
418
419
  if (!s) return 24;
@@ -421,58 +422,58 @@ const Ie = class Ie {
421
422
  e.forEach((g) => {
422
423
  n.appendChild(g.cloneNode(!0));
423
424
  }), r ? r.before(n) : s.appendChild(n);
424
- const o = t(this, S), a = o.style.display, h = o.style.visibility, l = o.style.position;
425
- (a === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
425
+ const a = t(this, S), o = a.style.display, c = a.style.visibility, l = a.style.position;
426
+ (o === "none" || window.getComputedStyle(a).display === "none") && (a.style.display = "block", a.style.visibility = "hidden", a.style.position = "absolute");
426
427
  let f = 0;
427
428
  const u = s.querySelectorAll("tr:not(.nodata)");
428
429
  return u.forEach((g) => {
429
430
  f += g.offsetHeight || g.getBoundingClientRect().height;
430
- }), u.forEach((g) => g.remove()), o.style.display = a, o.style.visibility = h, o.style.position = l, p(this, H, f > 0 ? f : 24), t(this, Et).call(this), t(this, H);
431
+ }), u.forEach((g) => g.remove()), a.style.display = o, a.style.visibility = c, a.style.position = l, p(this, H, f > 0 ? f : 24), t(this, Et).call(this), t(this, H);
431
432
  }, "#measureAndCacheHeight"));
432
- d(this, St, /* @__PURE__ */ c(() => {
433
+ d(this, St, /* @__PURE__ */ h(() => {
433
434
  N.log("rowManager.#updateVirtualScrollHeight");
434
435
  const e = (t(this, D).data.get() || []).length, s = t(this, H), r = e * s;
435
436
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
436
- const o = t(this, S).querySelector(n);
437
- if (!o) return;
438
- const a = o.querySelector(".ng-part-body .ng-virtual-spacer");
439
- a && (a.style.height = `${r}px`);
437
+ const a = t(this, S).querySelector(n);
438
+ if (!a) return;
439
+ const o = a.querySelector(".ng-part-body .ng-virtual-spacer");
440
+ o && (o.style.height = `${r}px`);
440
441
  });
441
442
  }, "#updateVirtualScrollHeight"));
442
- d(this, Et, /* @__PURE__ */ c(() => {
443
+ d(this, Et, /* @__PURE__ */ h(() => {
443
444
  if (t(this, tt) > 0 && t(this, H) > 0) {
444
445
  const i = Math.ceil(t(this, tt) / t(this, H));
445
446
  p(this, wt, i + t(this, Wt));
446
447
  }
447
448
  }, "#updateRowCount"));
448
- d(this, zt, /* @__PURE__ */ c(() => {
449
- var a, h, l, f, u, g;
449
+ d(this, Pt, /* @__PURE__ */ h(() => {
450
+ var o, c, l, f, u, g;
450
451
  const i = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), s = t(this, S).querySelector(".ng-container-right .ng-part-body table");
451
452
  if (e) {
452
- const b = i ? Array.from(i.querySelectorAll("tbody tr")) : [], m = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], E = Math.max(b.length, m.length, v.length);
453
- for (let x = 0; x < E; x++) {
454
- const O = [
455
- ((a = b[x]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
456
- ((h = m[x]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
457
- ((l = v[x]) == null ? void 0 : l.getBoundingClientRect().height) || 0
458
- ], C = Math.max(...O);
459
- C > 0 && (b[x] && (b[x].style.height = `${C}px`), m[x] && (m[x].style.height = `${C}px`), v[x] && (v[x].style.height = `${C}px`));
453
+ const b = i ? Array.from(i.querySelectorAll("tbody tr")) : [], x = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], A = Math.max(b.length, x.length, v.length);
454
+ for (let m = 0; m < A; m++) {
455
+ const W = [
456
+ ((o = b[m]) == null ? void 0 : o.getBoundingClientRect().height) || 0,
457
+ ((c = x[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
458
+ ((l = v[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
459
+ ], C = Math.max(...W);
460
+ C > 0 && (b[m] && (b[m].style.height = `${C}px`), x[m] && (x[m].style.height = `${C}px`), v[m] && (v[m].style.height = `${C}px`));
460
461
  }
461
462
  }
462
- const r = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
463
+ const r = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), a = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
463
464
  if (n) {
464
- const b = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], m = Array.from(n.querySelectorAll("tfoot tr")), v = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], E = Math.max(b.length, m.length, v.length);
465
- for (let x = 0; x < E; x++) {
466
- const O = [
467
- ((f = b[x]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
468
- ((u = m[x]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
469
- ((g = v[x]) == null ? void 0 : g.getBoundingClientRect().height) || 0
470
- ], C = Math.max(...O);
471
- C > 0 && (b[x] && (b[x].style.height = `${C}px`), m[x] && (m[x].style.height = `${C}px`), v[x] && (v[x].style.height = `${C}px`));
465
+ const b = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], x = Array.from(n.querySelectorAll("tfoot tr")), v = a ? Array.from(a.querySelectorAll("tfoot tr")) : [], A = Math.max(b.length, x.length, v.length);
466
+ for (let m = 0; m < A; m++) {
467
+ const W = [
468
+ ((f = b[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
469
+ ((u = x[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
470
+ ((g = v[m]) == null ? void 0 : g.getBoundingClientRect().height) || 0
471
+ ], C = Math.max(...W);
472
+ C > 0 && (b[m] && (b[m].style.height = `${C}px`), x[m] && (x[m].style.height = `${C}px`), v[m] && (v[m].style.height = `${C}px`));
472
473
  }
473
474
  }
474
475
  }, "#syncRowHeights"));
475
- d(this, Pt, /* @__PURE__ */ c(() => {
476
+ d(this, zt, /* @__PURE__ */ h(() => {
476
477
  !t(this, S) || !(t(this, S) instanceof HTMLElement) || (p(this, V, new ResizeObserver((i) => {
477
478
  for (const e of i) {
478
479
  const s = e.target;
@@ -480,31 +481,31 @@ const Ie = class Ie {
480
481
  const r = e.contentRect.height;
481
482
  if (r > 0) {
482
483
  let n = 0;
483
- const o = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
484
- o && (n += o.offsetHeight), a && (n += a.offsetHeight);
485
- const h = Math.max(r - n, 100);
486
- t(this, tt) !== h && (p(this, tt, h), t(this, Et).call(this), t(this, H) !== null && (t(this, At).call(this), this.refresh()));
484
+ const a = s.querySelector(".ng-part-header"), o = s.querySelector(".ng-part-footer");
485
+ a && (n += a.offsetHeight), o && (n += o.offsetHeight);
486
+ const c = Math.max(r - n, 100);
487
+ t(this, tt) !== c && (p(this, tt, c), t(this, Et).call(this), t(this, H) !== null && (t(this, At).call(this), this.refresh()));
487
488
  }
488
489
  }
489
490
  })), t(this, V).observe(t(this, S)));
490
491
  }, "#initResizeObserver"));
491
- d(this, At, /* @__PURE__ */ c(() => {
492
+ d(this, At, /* @__PURE__ */ h(() => {
492
493
  N.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
493
494
  const e = t(this, S).querySelector(i);
494
495
  e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Ot).call(this, e, i);
495
- }), t(this, Dt).call(this), t(this, zt).call(this);
496
+ }), t(this, Dt).call(this), t(this, Pt).call(this);
496
497
  }, "#renderAllContainers"));
497
- d(this, Ae, /* @__PURE__ */ c((i) => {
498
+ d(this, Ae, /* @__PURE__ */ h((i) => {
498
499
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
499
500
  var l;
500
501
  const s = t(this, S).querySelector(e);
501
502
  if (!s) return;
502
503
  const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
503
504
  if (!r) return;
504
- const n = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, P).get(e)) == null ? void 0 : l.length) || 1, h = (t(this, D).data.get() || []).length;
505
+ const n = Array.from(r.querySelectorAll("tr:not(.nodata)")), a = ((l = t(this, z).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, D).data.get() || []).length;
505
506
  n.forEach((f, u) => {
506
- const g = i + Math.floor(u / o);
507
- if (g >= h) {
507
+ const g = i + Math.floor(u / a);
508
+ if (g >= c) {
508
509
  f.style.display = "none";
509
510
  return;
510
511
  }
@@ -513,25 +514,26 @@ const Ie = class Ie {
513
514
  });
514
515
  });
515
516
  }, "#adjustBufferRows"));
516
- d(this, lt, /* @__PURE__ */ c((i) => {
517
- var h, l;
517
+ d(this, lt, /* @__PURE__ */ h((i) => {
518
+ var l, f;
518
519
  const e = t(this, H);
519
520
  if (!e || e <= 0) return;
520
- const s = t(this, D).data.length, r = Math.max(0, Math.floor(i / e)), n = ((h = t(this, P).get(".ng-container-body")) == null ? void 0 : h.length) || 1, o = t(this, Q).firstTr, a = o && o.dataset.row !== void 0 ? parseInt(o.dataset.row, 10) : -1;
521
- (l = t(this, Q)) == null || l.scrollTables.forEach((f) => {
522
- }), a !== r && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((f) => {
523
- const u = t(this, S).querySelector(f);
524
- if (!u) return;
525
- const g = u.querySelector(".ng-part-body tbody.bindable-tbody");
521
+ const s = t(this, D).data.length, r = Math.max(0, Math.floor(i / e)), n = r * e, a = ((l = t(this, z).get(".ng-container-body")) == null ? void 0 : l.length) || 1, o = t(this, Q).firstTr, c = o && o.dataset.row !== void 0 ? parseInt(o.dataset.row, 10) : -1;
522
+ (f = t(this, Q)) == null || f.scrollTables.forEach((u) => {
523
+ u.style.transform = `translate3d(0, ${n}px, 0)`;
524
+ }), c !== r && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
525
+ const g = t(this, S).querySelector(u);
526
526
  if (!g) return;
527
- Array.from(g.querySelectorAll("tr:not(.nodata)")).forEach((m, v) => {
528
- const E = r + Math.floor(v / n);
529
- if (E >= s) {
530
- m.style.display = "none";
527
+ const b = g.querySelector(".ng-part-body tbody.bindable-tbody");
528
+ if (!b) return;
529
+ Array.from(b.querySelectorAll("tr:not(.nodata)")).forEach((v, A) => {
530
+ const m = r + Math.floor(A / a);
531
+ if (m >= s) {
532
+ v.style.display = "none";
531
533
  return;
532
534
  }
533
- const x = t(this, D).data.get(E);
534
- m.style.display = "", t(this, Rt).call(this, m, x, E);
535
+ const W = t(this, D).data.get(m);
536
+ v.style.display = "", t(this, Rt).call(this, v, W, m);
535
537
  });
536
538
  });
537
539
  }, "#handleScroll"));
@@ -549,42 +551,42 @@ const Ie = class Ie {
549
551
  cell.dataset.row = dataIndex;
550
552
  });
551
553
  }; */
552
- d(this, Rt, /* @__PURE__ */ c((i, e, s) => {
554
+ d(this, Rt, /* @__PURE__ */ h((i, e, s) => {
553
555
  i.dataset.row = s, i.data = e, Array.from(i.cells).forEach((r, n) => {
554
556
  r.dataset.row = s;
555
- const o = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
556
- o && typeof o.refresh == "function" && o.refresh();
557
+ const a = Array.from(r.children).find((o) => o.tagName.toLowerCase().startsWith("cell-") || typeof o.refresh == "function");
558
+ a && typeof a.refresh == "function" && a.refresh();
557
559
  });
558
560
  }, "#bindRowData"));
559
- d(this, Dt, /* @__PURE__ */ c(() => {
560
- var h, l, f;
561
+ d(this, Dt, /* @__PURE__ */ h(() => {
562
+ var c, l, f;
561
563
  N.log("rowManager.#syncHeaderHeights");
562
564
  const i = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), s = t(this, S).querySelector(".ng-container-right .ng-part-header table");
563
565
  if (!e) return;
564
- const r = i ? Array.from(i.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, n.length, o.length);
565
- for (let u = 0; u < a; u++) {
566
+ const r = i ? Array.from(i.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), a = s ? Array.from(s.querySelectorAll("tr")) : [], o = Math.max(r.length, n.length, a.length);
567
+ for (let u = 0; u < o; u++) {
566
568
  const g = [
567
- ((h = r[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
569
+ ((c = r[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
568
570
  ((l = n[u]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
569
- ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
571
+ ((f = a[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
570
572
  ], b = Math.max(...g);
571
- b > 0 && (r[u] && (r[u].style.height = `${b}px`), n[u] && (n[u].style.height = `${b}px`), o[u] && (o[u].style.height = `${b}px`));
573
+ b > 0 && (r[u] && (r[u].style.height = `${b}px`), n[u] && (n[u].style.height = `${b}px`), a[u] && (a[u].style.height = `${b}px`));
572
574
  }
573
575
  }, "#syncHeaderHeights"));
574
- A(this, "destroy", /* @__PURE__ */ c(() => {
576
+ E(this, "destroy", /* @__PURE__ */ h(() => {
575
577
  t(this, V) && (t(this, V).disconnect(), p(this, V, null));
576
578
  }, "destroy"));
577
- p(this, D, i.getRootNode().host), p(this, S, i), t(this, Pt).call(this);
579
+ p(this, D, i.getRootNode().host), p(this, S, i), t(this, zt).call(this);
578
580
  }
579
581
  getRowHeight() {
580
582
  return t(this, H);
581
583
  }
582
584
  templateLength(i = ".ng-container-body") {
583
585
  var e;
584
- return ((e = t(this, P).get(i)) == null ? void 0 : e.length) || 1;
586
+ return ((e = t(this, z).get(i)) == null ? void 0 : e.length) || 1;
585
587
  }
586
588
  };
587
- D = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), P = new WeakMap(), H = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ee = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), zt = new WeakMap(), Pt = new WeakMap(), At = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), Rt = new WeakMap(), Dt = new WeakMap(), c(Ie, "RowManager");
589
+ D = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), z = new WeakMap(), H = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ee = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), Pt = new WeakMap(), zt = new WeakMap(), At = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), Rt = new WeakMap(), Dt = new WeakMap(), h(Ie, "RowManager");
588
590
  let ce = Ie;
589
591
  const jt = class jt {
590
592
  /**
@@ -598,72 +600,72 @@ const jt = class jt {
598
600
  */
599
601
  static compile(i) {
600
602
  if (!i) return null;
601
- const e = /* @__PURE__ */ c((a) => {
602
- a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
603
+ const e = /* @__PURE__ */ h((o) => {
604
+ o.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
603
605
  const f = l.getAttribute("cell-type") || "renderer";
604
606
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
605
607
  let u = `cell-${f}`;
606
- const g = l.getAttribute("data-bind"), b = l.getAttribute("data-expr"), m = l.getAttribute("maxbyte"), v = l.getAttribute("type");
607
- let E = [];
608
- g && E.push(`data-bind="${g}"`), b && E.push(`data-expr="${b}"`), m && E.push(`maxbyte="${m}"`), v && E.push(`type="${v}"`), l.innerHTML = `<${u} ${E.join(" ")}></${u}>`;
608
+ const g = l.getAttribute("data-bind"), b = l.getAttribute("data-expr"), x = l.getAttribute("maxbyte"), v = l.getAttribute("type");
609
+ let A = [];
610
+ g && A.push(`data-bind="${g}"`), b && A.push(`data-expr="${b}"`), x && A.push(`maxbyte="${x}"`), v && A.push(`type="${v}"`), l.innerHTML = `<${u} ${A.join(" ")}></${u}>`;
609
611
  });
610
- }, "processCellTypes"), s = /* @__PURE__ */ c((a) => {
611
- if (!a.querySelector("colgroup")) {
612
- const h = a.querySelector("tbody tr") || a.querySelector("tr"), l = h ? h.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), u = Math.max(Math.floor(a.clientWidth / l), 100);
612
+ }, "processCellTypes"), s = /* @__PURE__ */ h((o) => {
613
+ if (!o.querySelector("colgroup")) {
614
+ const c = o.querySelector("tbody tr") || o.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), u = Math.max(Math.floor(o.clientWidth / l), 100);
613
615
  for (let g = 0; g < l; g++) {
614
616
  const b = document.createElement("col");
615
617
  b.setAttribute("width", u), f.appendChild(b);
616
618
  }
617
- a.prepend(f);
619
+ o.prepend(f);
618
620
  }
619
- if (!a.querySelector("thead")) {
620
- const h = document.createElement("thead"), l = a.querySelector("colgroup");
621
- l ? l.after(h) : a.prepend(h);
621
+ if (!o.querySelector("thead")) {
622
+ const c = document.createElement("thead"), l = o.querySelector("colgroup");
623
+ l ? l.after(c) : o.prepend(c);
622
624
  }
623
- a.classList.add("nine-table-element"), a.style.display = "table";
624
- }, "ensureTableStructure"), r = /* @__PURE__ */ c((a, h) => {
625
- const l = Array.from(a.querySelectorAll(h + " tr")), f = Array.from(a.querySelectorAll(h + " th," + h + " td")), u = l.length;
625
+ o.classList.add("nine-table-element"), o.style.display = "table";
626
+ }, "ensureTableStructure"), r = /* @__PURE__ */ h((o, c) => {
627
+ const l = Array.from(o.querySelectorAll(c + " tr")), f = Array.from(o.querySelectorAll(c + " th," + c + " td")), u = l.length;
626
628
  if (u === 0 || f.length === 0) return;
627
629
  let g = 0;
628
- f.forEach((m) => {
629
- g += m.colSpan || 1;
630
+ f.forEach((x) => {
631
+ g += x.colSpan || 1;
630
632
  });
631
633
  const b = Array.from(Array(u), () => Array(g).fill(null));
632
- l.forEach((m) => {
633
- const v = m.sectionRowIndex;
634
- let E = 0;
635
- Array.from(m.querySelectorAll("th,td")).forEach((x) => {
634
+ l.forEach((x) => {
635
+ const v = x.sectionRowIndex;
636
+ let A = 0;
637
+ Array.from(x.querySelectorAll("th,td")).forEach((m) => {
636
638
  for (let B = 0; B < b[v].length; B++)
637
639
  if (b[v][B] === null) {
638
- E = B;
640
+ A = B;
639
641
  break;
640
642
  }
641
- const O = x.rowSpan || 1, C = x.colSpan || 1;
642
- for (let B = 0; B < O; B++)
643
+ const W = m.rowSpan || 1, C = m.colSpan || 1;
644
+ for (let B = 0; B < W; B++)
643
645
  for (let pt = 0; pt < C; pt++)
644
- v + B < u && E + pt < g && (b[v + B][E + pt] = B === 0 && pt === 0 ? "1" : "0");
646
+ v + B < u && A + pt < g && (b[v + B][A + pt] = B === 0 && pt === 0 ? "1" : "0");
645
647
  });
646
- }), l.forEach((m) => {
647
- const v = m.sectionRowIndex;
648
- Array.from(m.querySelectorAll("th,td")).forEach((E) => {
649
- for (let x = 0; x < b[v].length; x++)
650
- if (b[v][x] === "1") {
651
- E.dataset.col = x, b[v][x] = "0";
648
+ }), l.forEach((x) => {
649
+ const v = x.sectionRowIndex;
650
+ Array.from(x.querySelectorAll("th,td")).forEach((A) => {
651
+ for (let m = 0; m < b[v].length; m++)
652
+ if (b[v][m] === "1") {
653
+ A.dataset.col = m, b[v][m] = "0";
652
654
  break;
653
655
  }
654
656
  });
655
657
  });
656
658
  }, "resetColIndex"), n = i.cloneNode(!0);
657
- return s(n), e(n), r(n, "thead"), r(n, "tbody"), r(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((a, h) => {
658
- const l = a.getAttribute("fixed");
659
- l && n.querySelectorAll(`thead [data-col="${h}"], tbody [data-col="${h}"], tfoot [data-col="${h}"]`).forEach((f) => {
659
+ return s(n), e(n), r(n, "thead"), r(n, "tbody"), r(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((o, c) => {
660
+ const l = o.getAttribute("fixed");
661
+ l && n.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
660
662
  f.setAttribute("fixed", l);
661
663
  });
662
664
  }), n;
663
665
  }
664
666
  // 🎯 [μΆ”κ°€] td/th에 μ„ μ–Έλœ cell-type 속성을 읽어 μ»€μŠ€ν…€ νƒœκ·Έλ‘œ μžλ™ 감싸기
665
667
  };
666
- c(jt, "TableCompiler");
668
+ h(jt, "TableCompiler");
667
669
  let he = jt;
668
670
  var Ft, et, st, Vt, Yt, ct, Ut, Xt;
669
671
  const yt = class yt extends HTMLElement {
@@ -672,10 +674,10 @@ const yt = class yt extends HTMLElement {
672
674
  d(this, Ft);
673
675
  d(this, et, null);
674
676
  d(this, st);
675
- A(this, "invalidate", /* @__PURE__ */ c(() => {
677
+ E(this, "invalidate", /* @__PURE__ */ h(() => {
676
678
  t(this, st).refresh();
677
679
  }, "invalidate"));
678
- d(this, Vt, /* @__PURE__ */ c(() => {
680
+ d(this, Vt, /* @__PURE__ */ h(() => {
679
681
  [
680
682
  { selector: ".ng-container-body", type: null },
681
683
  { selector: ".ng-container-left", type: "left" },
@@ -684,43 +686,43 @@ const yt = class yt extends HTMLElement {
684
686
  const n = this.querySelector(s);
685
687
  if (!n) return;
686
688
  n.innerHTML = "";
687
- const o = document.createElement("div");
688
- o.className = "ng-part-header", o.appendChild(t(this, ct).call(this, t(this, et), r, "header"));
689
689
  const a = document.createElement("div");
690
- a.className = "ng-part-body";
691
- const h = document.createElement("div");
692
- h.className = "ng-scroll-content", h.style.position = "relative", h.style.width = "100%", h.appendChild(t(this, ct).call(this, t(this, et), r, "body"));
690
+ a.className = "ng-part-header", a.appendChild(t(this, ct).call(this, t(this, et), r, "header"));
691
+ const o = document.createElement("div");
692
+ o.className = "ng-part-body";
693
+ const c = document.createElement("div");
694
+ c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, ct).call(this, t(this, et), r, "body"));
693
695
  const l = document.createElement("div");
694
- l.className = "ng-virtual-spacer", l.style.width = "100%", l.style.pointerEvents = "none", h.appendChild(l), a.appendChild(h);
696
+ l.className = "ng-virtual-spacer", l.style.width = "100%", l.style.pointerEvents = "none", c.appendChild(l), o.appendChild(c);
695
697
  const f = document.createElement("div");
696
- f.className = "ng-part-footer", f.appendChild(t(this, ct).call(this, t(this, et), r, "footer")), n.appendChild(o), n.appendChild(a), n.appendChild(f);
698
+ f.className = "ng-part-footer", f.appendChild(t(this, ct).call(this, t(this, et), r, "footer")), n.appendChild(a), n.appendChild(o), n.appendChild(f);
697
699
  });
698
700
  }, "#renderSplitContainers"));
699
- d(this, Yt, /* @__PURE__ */ c(() => {
701
+ d(this, Yt, /* @__PURE__ */ h(() => {
700
702
  ["left", "right", "body"].forEach((e) => {
701
703
  const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
702
704
  if (!s || !r || r.length === 0) return;
703
705
  let n = 0;
704
- r[0].querySelectorAll("col").forEach((o) => {
705
- const a = parseInt(o.getAttribute("width"), 10);
706
- isNaN(n) || (n += a);
706
+ r[0].querySelectorAll("col").forEach((a) => {
707
+ const o = parseInt(a.getAttribute("width"), 10);
708
+ isNaN(n) || (n += o);
707
709
  }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${n}px`, s.style.width = `${n}px`);
708
710
  });
709
711
  }, "#updateContainerWidths"));
710
- A(this, "generate", /* @__PURE__ */ c((e) => {
712
+ E(this, "generate", /* @__PURE__ */ h((e) => {
711
713
  e && (p(this, et, he.compile(e)), t(this, Vt).call(this), t(this, Yt).call(this), t(this, st).initialize(), setTimeout(() => {
712
714
  var s;
713
715
  (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
714
716
  }, 0));
715
717
  }, "generate"));
716
- d(this, ct, /* @__PURE__ */ c((e, s, r) => {
717
- const n = e.cloneNode(!0), o = n.querySelector("thead"), a = n.querySelector("tbody"), h = n.querySelector("tfoot");
718
+ d(this, ct, /* @__PURE__ */ h((e, s, r) => {
719
+ const n = e.cloneNode(!0), a = n.querySelector("thead"), o = n.querySelector("tbody"), c = n.querySelector("tfoot");
718
720
  if (r === "header") {
719
- if (a && a.remove(), h && h.remove(), e.querySelector("tbody")) {
721
+ if (o && o.remove(), c && c.remove(), e.querySelector("tbody")) {
720
722
  const f = document.createElement("tbody");
721
723
  f.className = "fixed-tbody", n.appendChild(f);
722
724
  }
723
- } else r === "body" ? (o && o.remove(), h && h.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), a && a.remove());
725
+ } else r === "body" ? (a && a.remove(), c && c.remove(), o && (o.className = "bindable-tbody")) : r === "footer" && (a && a.remove(), o && o.remove());
724
726
  return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
725
727
  l.getAttribute("fixed") !== "left" && l.remove();
726
728
  }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
@@ -729,19 +731,19 @@ const yt = class yt extends HTMLElement {
729
731
  l.remove();
730
732
  }), n;
731
733
  }, "#createSplitTable"));
732
- A(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, st).getRowHeight(), "getRowHeight"));
733
- A(this, "scrollToX", /* @__PURE__ */ c((e) => {
734
+ E(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, st).getRowHeight(), "getRowHeight"));
735
+ E(this, "scrollToX", /* @__PURE__ */ h((e) => {
734
736
  const s = this.querySelector(".ng-container-body .ng-part-body");
735
737
  s && (s.scrollLeft = e);
736
738
  }, "scrollToX"));
737
- A(this, "scrollToY", /* @__PURE__ */ c((e) => {
739
+ E(this, "scrollToY", /* @__PURE__ */ h((e) => {
738
740
  const s = this.querySelector(".ng-container-body .ng-part-body");
739
741
  s && (s.scrollTop = e);
740
742
  }, "scrollToY"));
741
- d(this, Ut, /* @__PURE__ */ c(() => {
743
+ d(this, Ut, /* @__PURE__ */ h(() => {
742
744
  t(this, Xt).call(this);
743
745
  }, "#init"));
744
- d(this, Xt, /* @__PURE__ */ c(() => {
746
+ d(this, Xt, /* @__PURE__ */ h(() => {
745
747
  const e = yt.SCROLLBAR_SIZE;
746
748
  this.innerHTML = `
747
749
  <style>
@@ -905,48 +907,48 @@ const yt = class yt extends HTMLElement {
905
907
  this.innerHTML = "", N.log("NineTableSheet destroyed.");
906
908
  }
907
909
  };
908
- Ft = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ct = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), c(yt, "NineTableSheet"), A(yt, "SCROLLBAR_SIZE", 16);
910
+ Ft = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ct = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), h(yt, "NineTableSheet"), E(yt, "SCROLLBAR_SIZE", 16);
909
911
  let $t = yt;
910
912
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", $t);
911
913
  var Kt, qt;
912
914
  const _e = class _e extends HTMLElement {
913
915
  constructor() {
914
916
  super();
915
- d(this, Kt, /* @__PURE__ */ c(() => {
917
+ d(this, Kt, /* @__PURE__ */ h(() => {
916
918
  var e;
917
919
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
918
- var o;
919
- const r = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
920
+ var a;
921
+ const r = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((a = s.target.closest(".nine-tab-item")) == null ? void 0 : a.dataset.index, 10);
920
922
  t(this, qt).call(this, n, r);
921
923
  }), t(this, qt).call(this, 0, !1);
922
924
  }, "#init"));
923
- d(this, qt, /* @__PURE__ */ c((e, s = !1) => {
924
- const r = /* @__PURE__ */ c(() => {
925
+ d(this, qt, /* @__PURE__ */ h((e, s = !1) => {
926
+ const r = /* @__PURE__ */ h(() => {
925
927
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
926
928
  Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
927
929
  const g = f.filter((b) => b.classList.contains("active"));
928
930
  g.length < 2 || g.forEach((b) => {
929
- const m = parseInt(b.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${m}"]`), E = f[m + 1];
930
- v && E && E.classList.contains("active") && v.style.setProperty("display", "flex");
931
+ const x = parseInt(b.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${x}"]`), A = f[x + 1];
932
+ v && A && A.classList.contains("active") && v.style.setProperty("display", "flex");
931
933
  });
932
- }, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), a = n.querySelectorAll(".nine-tab-item"), h = o.querySelectorAll("nine-table-sheet");
933
- if (!a[e]) return;
934
+ }, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), a = this.querySelector("nine-table-sheets-body"), o = n.querySelectorAll(".nine-tab-item"), c = a.querySelectorAll("nine-table-sheet");
935
+ if (!o[e]) return;
934
936
  if (!s)
935
- a.forEach((f, u) => {
937
+ o.forEach((f, u) => {
936
938
  f.classList.toggle("active", u === e);
937
- }), h.forEach((f, u) => {
939
+ }), c.forEach((f, u) => {
938
940
  const g = u === e;
939
941
  f.classList.toggle("active", g), f.style.flex = g ? "1 1 100%" : "";
940
942
  });
941
943
  else {
942
- const f = a[e], u = n.querySelectorAll(".nine-tab-item.active");
944
+ const f = o[e], u = n.querySelectorAll(".nine-tab-item.active");
943
945
  if (f.classList.contains("active") && u.length <= 1)
944
946
  return;
945
947
  f.classList.toggle("active");
946
- const g = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
948
+ const g = a.querySelector(`nine-table-sheet[data-index="${e}"]`);
947
949
  g && (g.classList.toggle("active"), g.classList.contains("active") || (g.style.flex = ""));
948
950
  }
949
- const l = o.querySelectorAll("nine-table-sheet.active");
951
+ const l = a.querySelectorAll("nine-table-sheet.active");
950
952
  l == null || l.forEach((f) => {
951
953
  f.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
952
954
  }), r();
@@ -956,31 +958,31 @@ const _e = class _e extends HTMLElement {
956
958
  t(this, Kt).call(this);
957
959
  }
958
960
  };
959
- Kt = new WeakMap(), qt = new WeakMap(), c(_e, "NineTableSheets");
961
+ Kt = new WeakMap(), qt = new WeakMap(), h(_e, "NineTableSheets");
960
962
  let de = _e;
961
963
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", de);
962
964
  var M, Zt, Tt, Gt;
963
965
  const Ne = class Ne {
964
966
  constructor(i) {
965
967
  d(this, M);
966
- d(this, Zt, /* @__PURE__ */ c(() => {
968
+ d(this, Zt, /* @__PURE__ */ h(() => {
967
969
  t(this, Gt).call(this), new ResizeObserver((i) => {
968
970
  for (let e of i)
969
971
  t(this, M).getAttribute("auto-height") === "true" && t(this, Tt).call(this);
970
972
  }).observe(t(this, M));
971
973
  }, "#init"));
972
- d(this, Tt, /* @__PURE__ */ c(() => {
973
- var h, l;
974
+ d(this, Tt, /* @__PURE__ */ h(() => {
975
+ var c, l;
974
976
  const i = Array.from(t(this, M).shadowRoot.querySelectorAll("nine-table-sheet.active"));
975
977
  if (i.length === 0) return;
976
- const e = parseInt(t(this, M).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), r = (h = t(this, M).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, n = (l = t(this, M).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = $t.SCROLLBAR_SIZE, a = e * s + r + n + o;
977
- t(this, M).style.height = `${a}px`;
978
+ const e = parseInt(t(this, M).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), r = (c = t(this, M).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, n = (l = t(this, M).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, a = $t.SCROLLBAR_SIZE, o = e * s + r + n + a;
979
+ t(this, M).style.height = `${o}px`;
978
980
  }, "#applyAutoHeight"));
979
- d(this, Gt, /* @__PURE__ */ c(() => {
980
- const e = Array.from(t(this, M).children).filter((h) => h.tagName === "TABLE"), s = t(this, M).getAttribute("auto-height") === "true", r = e.length, n = e.map((h, l) => {
981
+ d(this, Gt, /* @__PURE__ */ h(() => {
982
+ const e = Array.from(t(this, M).children).filter((c) => c.tagName === "TABLE"), s = t(this, M).getAttribute("auto-height") === "true", r = e.length, n = e.map((c, l) => {
981
983
  const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, g = l < r - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
982
984
  return u + g;
983
- }).join(""), o = e.map((h, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
985
+ }).join(""), a = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
984
986
  t(this, M).shadowRoot.innerHTML = `
985
987
  <style>
986
988
  :host {
@@ -1064,7 +1066,7 @@ const Ne = class Ne {
1064
1066
  <nine-table-sheets>
1065
1067
  <nine-table-sheets-body>${n}</nine-table-sheets-body>
1066
1068
  <nine-table-sheets-footer>
1067
- <div class="nine-tab-bar">${o}</div>
1069
+ <div class="nine-tab-bar">${a}</div>
1068
1070
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
1069
1071
  </nine-table-sheets-footer>
1070
1072
  </nine-table-sheets>
@@ -1072,24 +1074,24 @@ const Ne = class Ne {
1072
1074
  </nine-table-body>
1073
1075
  <nine-table-footer></nine-table-footer>
1074
1076
  `;
1075
- const a = t(this, M).shadowRoot.querySelectorAll("nine-table-sheet");
1076
- a == null || a.forEach((h, l) => {
1077
+ const o = t(this, M).shadowRoot.querySelectorAll("nine-table-sheet");
1078
+ o == null || o.forEach((c, l) => {
1077
1079
  e[l] && setTimeout(() => {
1078
- h.generate(e[l]), s && t(this, Tt).call(this);
1080
+ c.generate(e[l]), s && t(this, Tt).call(this);
1079
1081
  });
1080
1082
  });
1081
1083
  }, "#render"));
1082
1084
  p(this, M, i), t(this, Zt).call(this);
1083
1085
  }
1084
1086
  };
1085
- M = new WeakMap(), Zt = new WeakMap(), Tt = new WeakMap(), Gt = new WeakMap(), c(Ne, "LayoutManager");
1087
+ M = new WeakMap(), Zt = new WeakMap(), Tt = new WeakMap(), Gt = new WeakMap(), h(Ne, "LayoutManager");
1086
1088
  let fe = Ne;
1087
1089
  var kt, ht;
1088
1090
  const We = class We {
1089
1091
  constructor(i) {
1090
1092
  d(this, kt);
1091
1093
  d(this, ht, -1);
1092
- A(this, "count", /* @__PURE__ */ c(() => t(this, kt).rawRecords.length, "count"));
1094
+ E(this, "count", /* @__PURE__ */ h(() => t(this, kt).rawRecords.length, "count"));
1093
1095
  p(this, kt, i);
1094
1096
  }
1095
1097
  get at() {
@@ -1100,10 +1102,10 @@ const We = class We {
1100
1102
  });
1101
1103
  }
1102
1104
  };
1103
- kt = new WeakMap(), ht = new WeakMap(), c(We, "ngRow");
1105
+ kt = new WeakMap(), ht = new WeakMap(), h(We, "ngRow");
1104
1106
  let ue = We;
1105
1107
  var I, T, _, dt, Jt, Y, Qt, it, Ct, te, ee, ft;
1106
- const W = class W {
1108
+ const O = class O {
1107
1109
  constructor(i, e) {
1108
1110
  d(this, I);
1109
1111
  d(this, T);
@@ -1111,7 +1113,7 @@ const W = class W {
1111
1113
  d(this, dt, []);
1112
1114
  d(this, Jt, 0);
1113
1115
  d(this, Y, []);
1114
- d(this, Qt, /* @__PURE__ */ c(() => {
1116
+ d(this, Qt, /* @__PURE__ */ h(() => {
1115
1117
  p(this, Y, []);
1116
1118
  const i = t(this, I).template || [];
1117
1119
  Array.from(i).forEach((e) => {
@@ -1121,12 +1123,12 @@ const W = class W {
1121
1123
  e.__ng || (e.__ng = t(this, Ct).call(this)), e.__ng.height = t(this, Y).slice();
1122
1124
  });
1123
1125
  }, "#initialize"));
1124
- d(this, it, /* @__PURE__ */ c(() => {
1126
+ d(this, it, /* @__PURE__ */ h(() => {
1125
1127
  t(this, I).shadowRoot.querySelectorAll("nine-table-sheet").forEach((i) => {
1126
1128
  i.invalidate();
1127
1129
  });
1128
1130
  }, "#invalidate"));
1129
- A(this, "get", /* @__PURE__ */ c((i, e) => {
1131
+ E(this, "get", /* @__PURE__ */ h((i, e) => {
1130
1132
  var n;
1131
1133
  const s = this.getValidData();
1132
1134
  if (!s || s.length <= 0) return;
@@ -1134,95 +1136,95 @@ const W = class W {
1134
1136
  if (i < 0 || i >= s.length) return null;
1135
1137
  const r = typeof ((n = t(this, I).fields) == null ? void 0 : n.get) == "function" ? t(this, I).fields.get() : [];
1136
1138
  if (e != null) {
1137
- const o = r.indexOf(e);
1138
- return o >= 0 ? s[i].v[o] : null;
1139
+ const a = r.indexOf(e);
1140
+ return a >= 0 ? s[i].v[a] : null;
1139
1141
  }
1140
1142
  return t(this, ft).call(this, s[i]);
1141
1143
  }, "get"));
1142
- A(this, "set", /* @__PURE__ */ c((i) => {
1144
+ E(this, "set", /* @__PURE__ */ h((i) => {
1143
1145
  this.clear(), this.add(i, !1), t(this, it).call(this);
1144
1146
  }, "set"));
1145
- d(this, Ct, /* @__PURE__ */ c(() => ({
1146
- rowState: W.ROW_STATE.EMPTY,
1147
+ d(this, Ct, /* @__PURE__ */ h(() => ({
1148
+ rowState: O.ROW_STATE.EMPTY,
1147
1149
  deleted: !1,
1148
1150
  filtered: !1,
1149
1151
  height: t(this, Y).slice(),
1150
1152
  o: {},
1151
1153
  c: {},
1152
- _: [0, 0, 0, 0, W.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
1154
+ _: [0, 0, 0, 0, O.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
1153
1155
  }), "#getDefaultMeta"));
1154
- A(this, "reset", /* @__PURE__ */ c(() => {
1156
+ E(this, "reset", /* @__PURE__ */ h(() => {
1155
1157
  p(this, _, []), p(this, dt, []), t(this, it).call(this);
1156
1158
  }, "reset"));
1157
- A(this, "clear", /* @__PURE__ */ c(() => {
1159
+ E(this, "clear", /* @__PURE__ */ h(() => {
1158
1160
  var i;
1159
1161
  t(this, T).rawRecords = [], p(this, _, []), p(this, dt, []), (i = t(this, T).viewRecords) != null && i.reset && t(this, T).viewRecords.reset();
1160
1162
  }, "clear"));
1161
- d(this, te, /* @__PURE__ */ c((i) => {
1163
+ d(this, te, /* @__PURE__ */ h((i) => {
1162
1164
  var r;
1163
1165
  Array.isArray(i) || (i = [i]);
1164
1166
  const e = typeof ((r = t(this, I).fields) == null ? void 0 : r.get) == "function" ? t(this, I).fields.get() : Object.keys(i[0] || {}), s = [];
1165
1167
  return i.forEach((n) => {
1166
- const o = { v: [] };
1167
- e.forEach((a) => {
1168
- o.v.push(n[a] !== void 0 && n[a] !== null ? n[a] : "");
1169
- }), s.push(o);
1168
+ const a = { v: [] };
1169
+ e.forEach((o) => {
1170
+ a.v.push(n[o] !== void 0 && n[o] !== null ? n[o] : "");
1171
+ }), s.push(a);
1170
1172
  }), s;
1171
1173
  }, "#json2Array"));
1172
- d(this, ee, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1173
- e.__ng = t(this, Ct).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = W.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1174
+ d(this, ee, /* @__PURE__ */ h((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1175
+ e.__ng = t(this, Ct).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = O.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1174
1176
  }), i), "#defaultInsert"));
1175
- A(this, "add", /* @__PURE__ */ c((i, e = !0) => {
1177
+ E(this, "add", /* @__PURE__ */ h((i, e = !0) => {
1176
1178
  i === void 0 && (i = {});
1177
1179
  const s = t(this, te).call(this, i);
1178
1180
  t(this, T).rawRecords = t(this, T).rawRecords.concat(t(this, ee).call(this, s)), this.resetRecords();
1179
1181
  const r = this.count() - 1;
1180
- return e || s.forEach((n, o) => {
1181
- const a = t(this, T).rawRecords[r - o];
1182
- a && (a.__ng.rowState = W.ROW_STATE.EMPTY);
1182
+ return e || s.forEach((n, a) => {
1183
+ const o = t(this, T).rawRecords[r - a];
1184
+ o && (o.__ng.rowState = O.ROW_STATE.EMPTY);
1183
1185
  }), t(this, it).call(this), r;
1184
1186
  }, "add"));
1185
- A(this, "delete", /* @__PURE__ */ c((i) => {
1187
+ E(this, "delete", /* @__PURE__ */ h((i) => {
1186
1188
  let e = [];
1187
1189
  Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, T).host.row.at] : e = [parseInt(i, 10)], e.sort((s, r) => r - s).forEach((s) => {
1188
1190
  if (t(this, _)[s]) {
1189
1191
  const r = t(this, _)[s].__ng.rowid;
1190
- t(this, _)[s].__ng.rowState === W.ROW_STATE.INSERT ? t(this, T).rawRecords = t(this, T).rawRecords.filter((n) => n.__ng.rowid !== r) : t(this, T).rawRecords.forEach((n) => {
1191
- n.__ng.rowid === r && (n.__ng.deleted = !0, n.__ng.rowState = W.ROW_STATE.DELETE);
1192
+ t(this, _)[s].__ng.rowState === O.ROW_STATE.INSERT ? t(this, T).rawRecords = t(this, T).rawRecords.filter((n) => n.__ng.rowid !== r) : t(this, T).rawRecords.forEach((n) => {
1193
+ n.__ng.rowid === r && (n.__ng.deleted = !0, n.__ng.rowState = O.ROW_STATE.DELETE);
1192
1194
  });
1193
1195
  }
1194
1196
  }), this.resetRecords(), t(this, it).call(this);
1195
1197
  }, "delete"));
1196
- A(this, "setValue", /* @__PURE__ */ c((i, e, s) => {
1197
- var h;
1198
+ E(this, "setValue", /* @__PURE__ */ h((i, e, s) => {
1199
+ var c;
1198
1200
  i = parseInt(i, 10);
1199
- const n = (typeof ((h = t(this, I).fields) == null ? void 0 : h.get) == "function" ? t(this, I).fields.get() : []).indexOf(e);
1201
+ const n = (typeof ((c = t(this, I).fields) == null ? void 0 : c.get) == "function" ? t(this, I).fields.get() : []).indexOf(e);
1200
1202
  if (n < 0) return;
1201
- const o = this.getValidData()[i];
1202
- if (!o) return;
1203
- const a = o.v[n];
1204
- a !== s && o.__ng.rowState !== W.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = a), o.__ng.rowState = W.ROW_STATE.UPDATE), o.v[n] = s;
1203
+ const a = this.getValidData()[i];
1204
+ if (!a) return;
1205
+ const o = a.v[n];
1206
+ o !== s && a.__ng.rowState !== O.ROW_STATE.INSERT && (a.__ng.o.hasOwnProperty(e) || (a.__ng.o[e] = o), a.__ng.rowState = O.ROW_STATE.UPDATE), a.v[n] = s;
1205
1207
  }, "setValue"));
1206
- A(this, "resetRecords", /* @__PURE__ */ c(() => {
1208
+ E(this, "resetRecords", /* @__PURE__ */ h(() => {
1207
1209
  p(this, dt, t(this, T).rawRecords.filter((i) => !i.__ng.deleted)), p(this, _, t(this, T).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, T).rawRecords.forEach((i, e) => {
1208
1210
  i.__ng.rowidx = e;
1209
1211
  }), t(this, _).forEach((i, e) => {
1210
1212
  i.__ng.i = e;
1211
1213
  });
1212
1214
  }, "resetRecords"));
1213
- A(this, "getValidData", /* @__PURE__ */ c(() => (t(this, _).length === 0 && t(this, T).rawRecords.length > 0 && this.resetRecords(), t(this, _)), "getValidData"));
1214
- d(this, ft, /* @__PURE__ */ c((i) => {
1215
- var o;
1215
+ E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, _).length === 0 && t(this, T).rawRecords.length > 0 && this.resetRecords(), t(this, _)), "getValidData"));
1216
+ d(this, ft, /* @__PURE__ */ h((i) => {
1217
+ var a;
1216
1218
  if (!i) return i;
1217
- const e = !Array.isArray(i), s = e ? [i] : i, r = typeof ((o = t(this, I).fields) == null ? void 0 : o.get) == "function" ? t(this, I).fields.get() : [], n = s.filter((a) => !a.__ng.deleted).map((a) => {
1218
- const h = {};
1219
+ const e = !Array.isArray(i), s = e ? [i] : i, r = typeof ((a = t(this, I).fields) == null ? void 0 : a.get) == "function" ? t(this, I).fields.get() : [], n = s.filter((o) => !o.__ng.deleted).map((o) => {
1220
+ const c = {};
1219
1221
  return r.forEach((l, f) => {
1220
- h[l] = a.v ? a.v[f] : a[l];
1221
- }), h.__ng = a.__ng, h;
1222
+ c[l] = o.v ? o.v[f] : o[l];
1223
+ }), c.__ng = o.__ng, c;
1222
1224
  });
1223
1225
  return e ? n[0] : n;
1224
1226
  }, "#conv"));
1225
- A(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1227
+ E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1226
1228
  p(this, I, i), p(this, T, e), t(this, Qt).call(this);
1227
1229
  }
1228
1230
  get source() {
@@ -1244,15 +1246,15 @@ const W = class W {
1244
1246
  return this.length;
1245
1247
  }
1246
1248
  };
1247
- I = new WeakMap(), T = new WeakMap(), _ = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), it = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), c(W, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1248
- A(W, "ROW_STATE", {
1249
+ I = new WeakMap(), T = new WeakMap(), _ = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), it = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), h(O, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1250
+ E(O, "ROW_STATE", {
1249
1251
  EMPTY: "EMPTY",
1250
1252
  NORMAL: "NORMAL",
1251
1253
  INSERT: "INSERT",
1252
1254
  UPDATE: "UPDATE",
1253
1255
  DELETE: "DELETE"
1254
1256
  });
1255
- let ge = W;
1257
+ let ge = O;
1256
1258
  var rt;
1257
1259
  const Oe = class Oe {
1258
1260
  constructor(i) {
@@ -1274,7 +1276,7 @@ const Oe = class Oe {
1274
1276
  }, this.setDataSource([]);
1275
1277
  }
1276
1278
  };
1277
- rt = new WeakMap(), c(Oe, "ngDataManager");
1279
+ rt = new WeakMap(), h(Oe, "ngDataManager");
1278
1280
  let be = Oe;
1279
1281
  var ut, L, Lt, se;
1280
1282
  const Be = class Be {
@@ -1282,42 +1284,42 @@ const Be = class Be {
1282
1284
  constructor(i) {
1283
1285
  d(this, ut);
1284
1286
  d(this, L, []);
1285
- A(this, "add", /* @__PURE__ */ c((i, e = "string") => {
1287
+ E(this, "add", /* @__PURE__ */ h((i, e = "string") => {
1286
1288
  i.forEach((s) => {
1287
1289
  t(this, L).some((r) => r.name === s) || t(this, L).push({ name: s, type: e });
1288
1290
  }), t(this, Lt).call(this);
1289
1291
  }, "add"));
1290
- d(this, Lt, /* @__PURE__ */ c(() => {
1292
+ d(this, Lt, /* @__PURE__ */ h(() => {
1291
1293
  const i = /* @__PURE__ */ new Map();
1292
1294
  t(this, L).forEach((e) => {
1293
1295
  i.set(e.name, e.type);
1294
1296
  }), p(this, L, Array.from(i, ([e, s]) => ({ name: e, type: s }))), p(this, L, t(this, L).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, L).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1295
1297
  }, "#adjust"));
1296
- d(this, se, /* @__PURE__ */ c(() => {
1298
+ d(this, se, /* @__PURE__ */ h(() => {
1297
1299
  p(this, L, []), N.log(t(this, ut).querySelectorAll("table"));
1298
1300
  const i = Array.from(t(this, ut).querySelectorAll("table"));
1299
1301
  if (!(!i || i.length === 0)) {
1300
1302
  for (const e of i)
1301
1303
  N.log(e), $("[data-bind]", e).each((s, r) => {
1302
- const n = r.dataset.bind, o = r.getAttribute("data-type") || "string";
1303
- n && t(this, L).push({ name: n, type: o });
1304
+ const n = r.dataset.bind, a = r.getAttribute("data-type") || "string";
1305
+ n && t(this, L).push({ name: n, type: a });
1304
1306
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1305
1307
  $(`[${s}]`, e).each((r, n) => {
1306
- var o = n.getAttribute(s);
1307
- if (o.indexOf("data.") < 0) {
1308
- const a = o.search(/[(]/g);
1309
- if (a > 0)
1308
+ var a = n.getAttribute(s);
1309
+ if (a.indexOf("data.") < 0) {
1310
+ const o = a.search(/[(]/g);
1311
+ if (o > 0)
1310
1312
  try {
1311
- o = String(window[o.substring(0, a).trim()]);
1313
+ a = String(window[a.substring(0, o).trim()]);
1312
1314
  } catch {
1313
- o = "";
1315
+ a = "";
1314
1316
  }
1315
1317
  }
1316
- o.split("data.").forEach((a) => {
1317
- if (a.trim() != "") {
1318
- const h = a.search(/[^_A-Za-z0-9]/g);
1318
+ a.split("data.").forEach((o) => {
1319
+ if (o.trim() != "") {
1320
+ const c = o.search(/[^_A-Za-z0-9]/g);
1319
1321
  let l = "";
1320
- h >= 0 ? l = a.substring(0, h) : o.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, L).push({ name: l, type: "string" });
1322
+ c >= 0 ? l = o.substring(0, c) : a.startsWith("data.") && (l = o.replace("data.", "")), l && t(this, L).push({ name: l, type: "string" });
1321
1323
  }
1322
1324
  });
1323
1325
  });
@@ -1347,16 +1349,16 @@ const Be = class Be {
1347
1349
  return t(this, L).some((e) => e.name === i);
1348
1350
  }
1349
1351
  };
1350
- ut = new WeakMap(), L = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(), c(Be, "ngFields");
1352
+ ut = new WeakMap(), L = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(), h(Be, "ngFields");
1351
1353
  let pe = Be;
1352
1354
  var nt, ie, re;
1353
- const ze = class ze extends HTMLElement {
1355
+ const Pe = class Pe extends HTMLElement {
1354
1356
  constructor() {
1355
1357
  super();
1356
1358
  //#created = false;
1357
1359
  d(this, nt);
1358
1360
  d(this, ie);
1359
- d(this, re, /* @__PURE__ */ c(() => {
1361
+ d(this, re, /* @__PURE__ */ h(() => {
1360
1362
  this.fields = new pe(this), p(this, ie, new fe(this)), N.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1361
1363
  }, "#init"));
1362
1364
  this.attachShadow({ mode: "open" }), p(this, nt, new be(this));
@@ -1380,8 +1382,8 @@ const ze = class ze extends HTMLElement {
1380
1382
  return t(this, nt);
1381
1383
  }
1382
1384
  };
1383
- nt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), c(ze, "NineTable");
1384
- let ye = ze;
1385
+ nt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), h(Pe, "NineTable");
1386
+ let ye = Pe;
1385
1387
  customElements.get("nine-table") || customElements.define("nine-table", ye);
1386
1388
  const mt = class mt extends HTMLElement {
1387
1389
  // πŸ‘ˆ μ»€μŠ€ν…€ μŠ€νƒ€μΌμš© μΊμ‹œ μΆ”κ°€
@@ -1394,10 +1396,10 @@ const mt = class mt extends HTMLElement {
1394
1396
  connectedCallback() {
1395
1397
  }
1396
1398
  };
1397
- c(mt, "BasicCellElement"), A(mt, "_styleCache", /* @__PURE__ */ new Map()), A(mt, "_customStyleCache", /* @__PURE__ */ new Map());
1399
+ h(mt, "BasicCellElement"), E(mt, "_styleCache", /* @__PURE__ */ new Map()), E(mt, "_customStyleCache", /* @__PURE__ */ new Map());
1398
1400
  let me = mt;
1399
1401
  var k, Ht, y, Re, qe, Te, ke, Ce;
1400
- const Pe = class Pe extends me {
1402
+ const ze = class ze extends me {
1401
1403
  constructor() {
1402
1404
  super();
1403
1405
  d(this, k);
@@ -1407,7 +1409,7 @@ const Pe = class Pe extends me {
1407
1409
  d(this, qe);
1408
1410
  d(this, Te);
1409
1411
  d(this, ke);
1410
- A(this, "getDisplayText", /* @__PURE__ */ c((e) => {
1412
+ E(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1411
1413
  if (t(this, y))
1412
1414
  if (t(this, y).closest("tbody")) {
1413
1415
  const s = t(this, y).closest("tr").data, r = parseInt(t(this, y).dataset.row);
@@ -1427,22 +1429,22 @@ const Pe = class Pe extends me {
1427
1429
  } catch {
1428
1430
  }
1429
1431
  }, "getDisplayText"));
1430
- d(this, Ce, /* @__PURE__ */ c(() => {
1432
+ d(this, Ce, /* @__PURE__ */ h(() => {
1431
1433
  if (!(!t(this, k) || !t(this, k).template || !t(this, y).closest("tbody.bindable"))) {
1432
1434
  var e = ninegrid.j.querySelectorAll(t(this, y)).attr("suppress");
1433
1435
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1434
1436
  var s = t(this, y).closest("tr"), r = [];
1435
- $("th,td", s).each((x, O) => {
1436
- var C = ninegrid.j.querySelectorAll(O).attr("suppress");
1437
- C && O.dataset.row && (C = parseInt(C), !isNaN(C) && C <= e && r.push(C));
1437
+ $("th,td", s).each((m, W) => {
1438
+ var C = ninegrid.j.querySelectorAll(W).attr("suppress");
1439
+ C && W.dataset.row && (C = parseInt(C), !isNaN(C) && C <= e && r.push(C));
1438
1440
  }), r.sort();
1439
1441
  var n = !1;
1440
1442
  if (parseInt(s.sectionRowIndex / t(this, k).template.length) > 0)
1441
- for (var o of r) {
1442
- if (o > e) break;
1443
- var a = parseInt(t(this, y).dataset.row), h = a - 1, l = t(this, y).closest("tr").data, f = t(this, k).data.get(h);
1443
+ for (var a of r) {
1444
+ if (a > e) break;
1445
+ var o = parseInt(t(this, y).dataset.row), c = o - 1, l = t(this, y).closest("tr").data, f = t(this, k).data.get(c);
1444
1446
  t(this, y).dataset.matrixRow;
1445
- var u = t(this, k).body.querySelector(`tbody.bindable [suppress="${o}"][data-matrix-row="${t(this, y).dataset.matrixRow}"]`), g = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, a) : l[u.dataset.bind], b = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, h) : f[u.dataset.bind];
1447
+ var u = t(this, k).body.querySelector(`tbody.bindable [suppress="${a}"][data-matrix-row="${t(this, y).dataset.matrixRow}"]`), g = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, o) : l[u.dataset.bind], b = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, c) : f[u.dataset.bind];
1446
1448
  if (g != b) {
1447
1449
  n = !0;
1448
1450
  break;
@@ -1451,17 +1453,17 @@ const Pe = class Pe extends me {
1451
1453
  else
1452
1454
  n = !0;
1453
1455
  n ? ninegrid.j.querySelectorAll(t(this, y)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, y)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, y)).hasClass("hidden") || (n ? ninegrid.j.querySelectorAll(t(this, y)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, y)).addClass("hidden"));
1454
- var m = parseInt(t(this, y).dataset.matrixRow), v = m - 1, E = t(this, k).body.querySelector(`tbody.bindable [data-col="${t(this, y).dataset.col}"][data-matrix-row="${v}"]`);
1455
- $(E).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, y)).hasClass("suppress") ? ninegrid.j.querySelectorAll(E).removeClass("last-none-suppress").addClass("last-suppress") : !$(E).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, y)).hasClass("suppress") ? ninegrid.j.querySelectorAll(E).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(E).removeClass("last-none-suppress").removeClass("last-suppress");
1456
+ var x = parseInt(t(this, y).dataset.matrixRow), v = x - 1, A = t(this, k).body.querySelector(`tbody.bindable [data-col="${t(this, y).dataset.col}"][data-matrix-row="${v}"]`);
1457
+ $(A).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, y)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").addClass("last-suppress") : !$(A).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, y)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").removeClass("last-suppress");
1456
1458
  }
1457
1459
  }
1458
1460
  }, "#resetSuppress"));
1459
- A(this, "getExprValue", /* @__PURE__ */ c((e, s, r, n) => {
1461
+ E(this, "getExprValue", /* @__PURE__ */ h((e, s, r, n) => {
1460
1462
  if (typeof e < "u")
1461
1463
  try {
1462
1464
  r = parseInt(r);
1463
- const o = e.replace("()", "");
1464
- return t(this, k)[o] ? t(this, k)[o].call(this, s, r, t(this, y)) : t(this, k).exprFunction(e).call(this, s, r, t(this, k).data);
1465
+ const a = e.replace("()", "");
1466
+ return t(this, k)[a] ? t(this, k)[a].call(this, s, r, t(this, y)) : t(this, k).exprFunction(e).call(this, s, r, t(this, k).data);
1465
1467
  } catch {
1466
1468
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1467
1469
  }
@@ -1492,8 +1494,8 @@ const Pe = class Pe extends me {
1492
1494
  return parseInt(t(this, y).dataset.row), t(this, Ht).data[e];
1493
1495
  }
1494
1496
  };
1495
- k = new WeakMap(), Ht = new WeakMap(), y = new WeakMap(), Re = new WeakMap(), qe = new WeakMap(), Te = new WeakMap(), ke = new WeakMap(), Ce = new WeakMap(), c(Pe, "CellElement");
1496
- let xe = Pe;
1497
+ k = new WeakMap(), Ht = new WeakMap(), y = new WeakMap(), Re = new WeakMap(), qe = new WeakMap(), Te = new WeakMap(), ke = new WeakMap(), Ce = new WeakMap(), h(ze, "CellElement");
1498
+ let xe = ze;
1497
1499
  const De = class De extends xe {
1498
1500
  constructor() {
1499
1501
  super();
@@ -1505,7 +1507,7 @@ const De = class De extends xe {
1505
1507
  return super.refresh();
1506
1508
  }
1507
1509
  };
1508
- c(De, "EditableCellElement");
1510
+ h(De, "EditableCellElement");
1509
1511
  let ve = De;
1510
1512
  var Mt, ot, gt, bt, ne, U, Le;
1511
1513
  const je = class je extends ve {
@@ -1517,7 +1519,7 @@ const je = class je extends ve {
1517
1519
  d(this, bt);
1518
1520
  d(this, ne);
1519
1521
  d(this, U);
1520
- A(this, "refresh", /* @__PURE__ */ c(() => {
1522
+ E(this, "refresh", /* @__PURE__ */ h(() => {
1521
1523
  const e = super.refresh();
1522
1524
  t(this, Mt).value = e;
1523
1525
  }, "refresh"));
@@ -1551,7 +1553,7 @@ const je = class je extends ve {
1551
1553
  if (!v) this.reset();
1552
1554
  };
1553
1555
  */
1554
- d(this, Le, /* @__PURE__ */ c((e) => {
1556
+ d(this, Le, /* @__PURE__ */ h((e) => {
1555
1557
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1556
1558
  if (t(this, ot) == "number") {
1557
1559
  let n = [];
@@ -1579,7 +1581,7 @@ const je = class je extends ve {
1579
1581
  `, super.connectedCallback(), p(this, Mt, this.querySelector("input"));
1580
1582
  }
1581
1583
  };
1582
- Mt = new WeakMap(), ot = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), ne = new WeakMap(), U = new WeakMap(), Le = new WeakMap(), c(je, "CellInputText");
1584
+ Mt = new WeakMap(), ot = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), ne = new WeakMap(), U = new WeakMap(), Le = new WeakMap(), h(je, "CellInputText");
1583
1585
  let we = je;
1584
1586
  customElements.get("cell-input-text");
1585
1587
  customElements.get("cell-input") || customElements.define("cell-input", we);