@ninebone/table 0.0.624 β†’ 0.0.626

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.
@@ -4,11 +4,11 @@ var Ve = (q) => {
4
4
  };
5
5
  var Xe = (q, i, e) => i in q ? Fe(q, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[i] = e;
6
6
  var c = (q, i) => Fe(q, "name", { value: i, configurable: !0 });
7
- var E = (q, i, e) => Xe(q, typeof i != "symbol" ? i + "" : i, e), Ye = (q, i, e) => i.has(q) || Ve("Cannot " + e);
8
- var t = (q, i, e) => (Ye(q, i, "read from private field"), e ? e.call(q) : i.get(q)), d = (q, i, e) => i.has(q) ? Ve("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(q) : i.set(q, e), b = (q, i, e, s) => (Ye(q, i, "write to private field"), s ? s.call(q, e) : i.set(q, e), e);
7
+ var A = (q, i, e) => Xe(q, typeof i != "symbol" ? i + "" : i, e), Ye = (q, i, e) => i.has(q) || Ve("Cannot " + e);
8
+ var t = (q, i, e) => (Ye(q, i, "read from private field"), e ? e.call(q) : i.get(q)), d = (q, i, e) => i.has(q) ? Ve("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(q) : i.set(q, e), y = (q, i, e, s) => (Ye(q, i, "write to private field"), s ? s.call(q, e) : i.set(q, e), e);
9
9
  var Ue = (q, i, e, s) => ({
10
10
  set _(r) {
11
- b(q, i, r, e);
11
+ y(q, i, r, e);
12
12
  },
13
13
  get _() {
14
14
  return t(q, i, s);
@@ -36,51 +36,51 @@ const Me = class Me extends HTMLElement {
36
36
  d(this, It, /* @__PURE__ */ c(() => {
37
37
  if (!t(this, B)) return;
38
38
  const e = t(this, B).querySelector(".ng-container-body .ng-part-body");
39
- e && (b(this, Z, new ResizeObserver(() => {
39
+ e && (y(this, Z, new ResizeObserver(() => {
40
40
  this.refresh();
41
41
  })), t(this, Z).observe(e));
42
42
  }, "#observeResize"));
43
- E(this, "refresh", /* @__PURE__ */ c(() => {
43
+ A(this, "refresh", /* @__PURE__ */ c(() => {
44
44
  if (!t(this, B) || !t(this, w) || t(this, j)) return;
45
45
  const e = t(this, w).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const r = t(this, w).track, n = t(this, w).thumb, a = t(this, B).querySelector(".ng-container-bottom"), o = e.clientWidth, h = s.scrollWidth;
48
- if (o !== 0 && h > o)
49
- a && (a.style.display = "flex");
47
+ const r = t(this, w).track, n = t(this, w).thumb, o = t(this, B).querySelector(".ng-container-bottom"), a = e.clientWidth, h = s.scrollWidth;
48
+ if (a !== 0 && h > a)
49
+ o && (o.style.display = "flex");
50
50
  else {
51
- a && (a.style.display = "none");
51
+ o && (o.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 * (o / h), l), 20);
56
+ const f = Math.max(Math.min(l * (a / h), l), 20);
57
57
  n.style.width = `${f}px`;
58
- const u = e.scrollLeft, y = h - o;
59
- let g = 0;
60
- y > 0 && (g = parseInt(u / y * (l - f), 10)), g < 0 && (g = 0);
58
+ const u = e.scrollLeft, g = h - a;
59
+ let b = 0;
60
+ g > 0 && (b = parseInt(u / g * (l - f), 10)), b < 0 && (b = 0);
61
61
  const m = l - f;
62
- g > m && (g = m), n.style.left = `${g}px`, t(this, w).left.disabled = g === 0, t(this, w).right.disabled = g >= m - 1;
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;
63
63
  }, "refresh"));
64
64
  d(this, G, /* @__PURE__ */ c((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(), a = t(this, w).thumb.clientWidth;
69
- let o = e;
70
- o < 0 && (o = 0);
71
- const h = n.width - a;
72
- o > h && (o = h), 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 >= h - 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;
73
73
  const l = s.clientWidth, u = r.scrollWidth - l;
74
- return h > 0 && u > 0 && (s.scrollLeft = o / h * u), o > 0 && o < h - 1;
74
+ return h > 0 && u > 0 && (s.scrollLeft = a / h * u), a > 0 && a < h - 1;
75
75
  }, "#thumbMoveTo"));
76
76
  d(this, _t, /* @__PURE__ */ c(() => {
77
77
  const e = /* @__PURE__ */ c((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
- t(this, G).call(this, n + r), b(this, X, setInterval(() => {
81
- clearInterval(t(this, X)), b(this, K, setInterval(() => {
82
- const a = parseInt(t(this, w).thumb.style.left || 0, 10);
83
- t(this, G).call(this, a + r) || clearInterval(t(this, K));
80
+ t(this, G).call(this, n + r), y(this, X, setInterval(() => {
81
+ clearInterval(t(this, X)), y(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));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ c(() => {
@@ -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(), a = t(this, w).thumb.clientWidth;
99
- t(this, G).call(this, r.clientX - n.left - a / 2);
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);
100
100
  }), t(this, w).thumb.addEventListener("mousedown", (r) => {
101
101
  if (r.button !== 0) return;
102
- r.stopPropagation(), r.preventDefault(), b(this, j, !0), this.shiftX = r.clientX - t(this, w).thumb.getBoundingClientRect().left;
103
- const n = /* @__PURE__ */ c((o) => {
102
+ r.stopPropagation(), r.preventDefault(), y(this, j, !0), this.shiftX = r.clientX - t(this, w).thumb.getBoundingClientRect().left;
103
+ const n = /* @__PURE__ */ c((a) => {
104
104
  if (!t(this, j)) return;
105
105
  const h = t(this, w).track.getBoundingClientRect();
106
- t(this, G).call(this, o.clientX - h.left - this.shiftX);
107
- }, "onMouseMove"), a = /* @__PURE__ */ c(() => {
108
- b(this, j, !1), s(), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", a), this.refresh();
106
+ t(this, G).call(this, a.clientX - h.left - this.shiftX);
107
+ }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
108
+ y(this, j, !1), s(), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", n), document.addEventListener("mouseup", a);
110
+ document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
111
111
  });
112
112
  }, "#init"));
113
113
  }
114
114
  connectedCallback() {
115
- if (b(this, B, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, B)) return;
115
+ if (y(this, B, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, B)) return;
116
116
  this.innerHTML = `
117
117
  <style>
118
118
  nine-table-hscrollbar {
@@ -182,7 +182,7 @@ const Me = class Me extends HTMLElement {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
- b(this, w, {
185
+ y(this, w, {
186
186
  container: s,
187
187
  track: this.querySelector(".ng-scroll-track"),
188
188
  thumb: this.querySelector(".ng-scroll-thumb"),
@@ -211,10 +211,10 @@ const $e = class $e extends HTMLElement {
211
211
  d(this, T);
212
212
  d(this, vt, 0);
213
213
  d(this, xt, 0);
214
- E(this, "refresh", /* @__PURE__ */ c(() => {
214
+ A(this, "refresh", /* @__PURE__ */ c(() => {
215
215
  if (!t(this, F) || !t(this, T)) return;
216
- const e = t(this, T).container, s = t(this, T).track, r = t(this, T).thumb, n = e.clientHeight, o = (t(this, F).data.get() || []).length, h = t(this, at).getRowHeight(), l = o * h;
217
- if (l <= n || o === 0) {
216
+ const e = t(this, T).container, s = t(this, T).track, r = t(this, T).thumb, n = e.clientHeight, a = (t(this, F).data.get() || []).length, h = t(this, at).getRowHeight(), l = a * h;
217
+ if (l <= n || a === 0) {
218
218
  this.style.display = "none";
219
219
  return;
220
220
  } else
@@ -223,43 +223,43 @@ const $e = class $e extends HTMLElement {
223
223
  if (f <= 0) return;
224
224
  const u = Math.max(Math.min(f * (n / l), f), 20);
225
225
  r.style.height = `${u}px`;
226
- const y = e.scrollTop, g = Math.max(l - n, 1);
226
+ const g = e.scrollTop, b = Math.max(l - n, 1);
227
227
  let m = 0;
228
- g > 0 && (m = y / g * (f - u));
228
+ b > 0 && (m = g / b * (f - u));
229
229
  const x = f - u;
230
- m < 0 && (m = 0), m > x && (m = x), r.style.top = `${m}px`, t(this, T).top.disabled = y <= 0, t(this, T).bottom.disabled = y >= g - 1;
230
+ m < 0 && (m = 0), m > x && (m = x), r.style.top = `${m}px`, t(this, T).top.disabled = g <= 0, t(this, T).bottom.disabled = g >= b - 1;
231
231
  }, "refresh"));
232
232
  d(this, Nt, /* @__PURE__ */ c(() => {
233
233
  M.log("nine-table-vscrollbar.#init");
234
234
  const e = t(this, T).container, s = /* @__PURE__ */ c(() => {
235
- const n = (t(this, F).data.get() || []).length, a = t(this, at).getRowHeight();
236
- return n * a;
235
+ const n = (t(this, F).data.get() || []).length, o = t(this, at).getRowHeight();
236
+ return n * o;
237
237
  }, "getContentHeight");
238
238
  e.addEventListener("scroll", () => {
239
239
  t(this, J) || this.refresh();
240
240
  }), t(this, T).thumb.addEventListener("mousedown", (r) => {
241
241
  if (r.button !== 0) return;
242
- r.stopPropagation(), r.preventDefault(), b(this, J, !0), b(this, vt, r.clientY), b(this, xt, e.scrollTop);
243
- const n = /* @__PURE__ */ c((o) => {
242
+ r.stopPropagation(), r.preventDefault(), y(this, J, !0), y(this, vt, r.clientY), y(this, xt, e.scrollTop);
243
+ const n = /* @__PURE__ */ c((a) => {
244
244
  if (!t(this, J)) return;
245
- const h = t(this, T).track.getBoundingClientRect(), l = t(this, T).thumb.clientHeight, u = h.height - l, y = o.clientY - t(this, vt), g = e.clientHeight, m = s(), x = Math.max(m - g, 1);
245
+ const h = t(this, T).track.getBoundingClientRect(), l = t(this, T).thumb.clientHeight, u = h.height - l, g = a.clientY - t(this, vt), b = e.clientHeight, m = s(), x = Math.max(m - b, 1);
246
246
  if (u > 0 && x > 0) {
247
- const A = y / u * x;
248
- let v = t(this, xt) + A;
249
- const I = Math.max(0, m - g);
247
+ const E = g / u * x;
248
+ let v = t(this, xt) + E;
249
+ const I = Math.max(0, m - b);
250
250
  v < 0 && (v = 0), v > I && (v = I), e.scrollTop = v;
251
251
  }
252
252
  this.refresh();
253
- }, "onMouseMove"), a = /* @__PURE__ */ c(() => {
254
- b(this, J, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", a), this.refresh();
253
+ }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
254
+ y(this, J, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
255
255
  }, "onMouseUp");
256
- document.addEventListener("mousemove", n), document.addEventListener("mouseup", a);
256
+ document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
257
257
  }), t(this, T).track.addEventListener("mousedown", (r) => {
258
258
  if (r.button !== 0 || r.target === t(this, T).thumb) return;
259
- const n = t(this, T).track.getBoundingClientRect(), a = t(this, T).thumb.clientHeight, o = r.clientY - n.top - a / 2, l = n.height - a, f = e.clientHeight, u = s(), y = Math.max(u - f, 1);
260
- if (l > 0 && y > 0) {
261
- const g = Math.max(0, Math.min(1, o / l));
262
- e.scrollTop = g * y;
259
+ const n = t(this, T).track.getBoundingClientRect(), o = t(this, T).thumb.clientHeight, a = r.clientY - n.top - o / 2, l = n.height - o, f = e.clientHeight, u = s(), g = Math.max(u - f, 1);
260
+ if (l > 0 && g > 0) {
261
+ const b = Math.max(0, Math.min(1, a / l));
262
+ e.scrollTop = b * g;
263
263
  }
264
264
  this.refresh();
265
265
  }), t(this, T).top.addEventListener("click", () => {
@@ -270,7 +270,7 @@ const $e = class $e extends HTMLElement {
270
270
  }, "#init"));
271
271
  }
272
272
  connectedCallback() {
273
- b(this, F, this.getRootNode().host), b(this, at, this.closest("nine-table-sheet")), this.innerHTML = `
273
+ y(this, F, this.getRootNode().host), y(this, at, this.closest("nine-table-sheet")), this.innerHTML = `
274
274
  <style>
275
275
  nine-table-vscrollbar {
276
276
  display: flex;
@@ -340,7 +340,7 @@ const $e = class $e extends HTMLElement {
340
340
  setTimeout(e, 10);
341
341
  return;
342
342
  }
343
- b(this, T, {
343
+ y(this, T, {
344
344
  container: s,
345
345
  track: this.querySelector(".ng-scroll-track"),
346
346
  thumb: this.querySelector(".ng-scroll-thumb"),
@@ -354,172 +354,174 @@ const $e = class $e extends HTMLElement {
354
354
  F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), T = new WeakMap(), vt = new WeakMap(), xt = new WeakMap(), Nt = new WeakMap(), c($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, _, V, tt, wt, Se, Ae, Wt, Ot, zt, St, At, Bt, Dt, Et, Ee, lt, qt, Pt;
357
+ var P, S, Q, D, _, V, tt, wt, Se, Ee, Wt, Ot, zt, St, Et, Bt, Dt, At, Ae, lt, qt, Pt;
358
358
  const Ie = class Ie {
359
359
  constructor(i) {
360
- d(this, D);
360
+ d(this, P);
361
361
  d(this, S);
362
362
  d(this, Q);
363
- d(this, P, /* @__PURE__ */ new Map());
363
+ d(this, D, /* @__PURE__ */ new Map());
364
364
  d(this, _, null);
365
365
  d(this, V, null);
366
366
  d(this, tt, 0);
367
367
  d(this, wt, 40);
368
368
  d(this, Se, !1);
369
- d(this, Ae, !1);
369
+ d(this, Ee, !1);
370
370
  //#ticking = false; // 🎯 고속 슀크둀 μŠ€λ‘œν‹€λ§μš© ν”Œλž˜κ·Έ
371
371
  d(this, Wt, 3);
372
- E(this, "refresh", /* @__PURE__ */ c(() => {
372
+ A(this, "refresh", /* @__PURE__ */ c(() => {
373
373
  var e;
374
374
  M.log("rowManager.refresh");
375
375
  const i = t(this, S).querySelector(".ng-container-body .ng-part-body");
376
376
  i && (t(this, St).call(this), t(this, lt).call(this, i.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
377
377
  }, "refresh"));
378
- E(this, "initialize", /* @__PURE__ */ c(() => {
379
- M.log("rowManager.initialize"), b(this, Q, {
378
+ A(this, "initialize", /* @__PURE__ */ c(() => {
379
+ M.log("rowManager.initialize"), y(this, Q, {
380
380
  scrollTables: t(this, S).querySelectorAll(".ng-part-body table"),
381
381
  firstTr: t(this, S).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
382
- }), b(this, _, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
383
- const o = t(this, S).querySelector(a);
384
- if (!o) return;
385
- const h = o.querySelector(".ng-part-body table");
382
+ }), y(this, _, null), t(this, D).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
383
+ const a = t(this, S).querySelector(o);
384
+ if (!a) return;
385
+ const h = a.querySelector(".ng-part-body table");
386
386
  if (!h) return;
387
387
  const l = h.querySelector("tbody.bindable-tbody");
388
388
  if (!l) return;
389
- const u = Array.from(l.querySelectorAll("tr")).map((y) => y.cloneNode(!0));
390
- t(this, P).set(a, u);
389
+ const u = Array.from(l.querySelectorAll("tr")).map((g) => g.cloneNode(!0));
390
+ t(this, D).set(o, u);
391
391
  });
392
392
  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");
393
393
  if (i) {
394
- t(this, zt).call(this, i), t(this, Et).call(this), t(this, St).call(this), t(this, lt).call(this, i.scrollTop);
395
- let a = !1;
396
- const o = /* @__PURE__ */ c((h) => {
397
- if (a) return;
398
- a = !0;
394
+ t(this, zt).call(this, i), t(this, At).call(this), t(this, St).call(this), t(this, lt).call(this, i.scrollTop);
395
+ let o = !1;
396
+ const a = /* @__PURE__ */ c((h) => {
397
+ if (o) return;
398
+ o = !0;
399
399
  const l = h.scrollTop, f = h.scrollLeft;
400
- i && i.scrollTop !== l && (i.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), n && n.scrollLeft !== f && (n.scrollLeft = f), t(this, lt).call(this, l), a = !1;
400
+ i && i.scrollTop !== l && (i.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), n && n.scrollLeft !== f && (n.scrollLeft = f), t(this, lt).call(this, l), o = !1;
401
401
  }, "handleContainerScroll");
402
402
  [i, e, s].forEach((h) => {
403
403
  h && h.addEventListener("scroll", () => {
404
- o(h);
404
+ a(h);
405
405
  }, { passive: !0 });
406
406
  });
407
407
  }
408
408
  }, "initialize"));
409
409
  d(this, Ot, /* @__PURE__ */ c((i, e) => {
410
410
  M.log("rowManager.#renderRows");
411
- const s = t(this, P).get(e);
411
+ const s = t(this, D).get(e);
412
412
  if (!s || s.length === 0) return;
413
413
  const r = i.querySelector(".ng-part-body tbody.bindable-tbody");
414
414
  if (!r) return;
415
- r.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
416
- const n = r.querySelector("tr.nodata"), a = document.createDocumentFragment();
417
- for (let o = 0; o < t(this, wt); o++)
415
+ r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
416
+ const n = r.querySelector("tr.nodata"), o = document.createDocumentFragment();
417
+ for (let a = 0; a < t(this, wt); a++)
418
418
  s.forEach((h) => {
419
- a.appendChild(h.cloneNode(!0));
419
+ o.appendChild(h.cloneNode(!0));
420
420
  });
421
- n ? n.before(a) : r.appendChild(a), e === ".ng-container-body" && (t(this, Q).firstTr = r.querySelector("tr:not(.nodata)"));
421
+ n ? n.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this, Q).firstTr = r.querySelector("tr:not(.nodata)"));
422
422
  }, "#renderRows"));
423
423
  d(this, zt, /* @__PURE__ */ c((i) => {
424
424
  if (M.log("rowManager.#measureAndCacheHeight"), t(this, _) !== null && t(this, _) > 0)
425
425
  return t(this, _);
426
426
  M.log("#measureAndCacheHeight");
427
- const e = i.querySelector("tbody.bindable-tbody");
428
- if (M.log(e), !e) throw new Error("invalid dom");
429
- e.querySelectorAll("tr:not(.nodata)").forEach((u) => u.remove());
430
- const s = e.querySelector("tr.nodata"), r = document.createDocumentFragment();
431
- bodyTemplates.forEach((u) => {
432
- r.appendChild(u.cloneNode(!0));
433
- }), s ? s.before(r) : e.appendChild(r);
434
- const n = t(this, S), a = n.style.display, o = n.style.visibility, h = n.style.position;
435
- (a === "none" || window.getComputedStyle(n).display === "none") && (n.style.display = "block", n.style.visibility = "hidden", n.style.position = "absolute");
436
- let l = 0;
437
- const f = e.querySelectorAll("tr:not(.nodata)");
438
- return f.forEach((u) => {
439
- l += u.offsetHeight || u.getBoundingClientRect().height;
440
- }), f.forEach((u) => u.remove()), n.style.display = a, n.style.visibility = o, n.style.position = h, b(this, _, l > 0 ? l : 24), t(this, At).call(this), t(this, _);
427
+ const e = t(this, D).get(".ng-container-body");
428
+ if (!e || e.length === 0) throw new Error("invalid dom");
429
+ const s = i.querySelector("tbody.bindable-tbody");
430
+ if (M.log(s), !s) throw new Error("invalid dom");
431
+ s.querySelectorAll("tr:not(.nodata)").forEach((g) => g.remove());
432
+ const r = s.querySelector("tr.nodata"), n = document.createDocumentFragment();
433
+ e.forEach((g) => {
434
+ n.appendChild(g.cloneNode(!0));
435
+ }), r ? r.before(n) : s.appendChild(n);
436
+ const o = t(this, S), a = o.style.display, h = o.style.visibility, l = o.style.position;
437
+ (a === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
438
+ let f = 0;
439
+ const u = s.querySelectorAll("tr:not(.nodata)");
440
+ return u.forEach((g) => {
441
+ f += g.offsetHeight || g.getBoundingClientRect().height;
442
+ }), u.forEach((g) => g.remove()), o.style.display = a, o.style.visibility = h, o.style.position = l, y(this, _, f > 0 ? f : 24), t(this, Et).call(this), t(this, _);
441
443
  }, "#measureAndCacheHeight"));
442
444
  d(this, St, /* @__PURE__ */ c(() => {
443
445
  M.log("rowManager.#updateVirtualScrollHeight");
444
- const e = (t(this, D).data.get() || []).length, s = t(this, _), r = e * s;
446
+ const e = (t(this, P).data.get() || []).length, s = t(this, _), r = e * s;
445
447
  M.log("πŸ” [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
446
- const a = t(this, S).querySelector(n);
447
- if (!a) return;
448
- const o = a.querySelector(".ng-part-body .ng-virtual-spacer");
449
- o && (o.style.height = `${r}px`);
448
+ const o = t(this, S).querySelector(n);
449
+ if (!o) return;
450
+ const a = o.querySelector(".ng-part-body .ng-virtual-spacer");
451
+ a && (a.style.height = `${r}px`);
450
452
  });
451
453
  }, "#updateVirtualScrollHeight"));
452
- d(this, At, /* @__PURE__ */ c(() => {
454
+ d(this, Et, /* @__PURE__ */ c(() => {
453
455
  if (t(this, tt) > 0 && t(this, _) > 0) {
454
456
  const i = Math.ceil(t(this, tt) / t(this, _));
455
- b(this, wt, i + t(this, Wt));
457
+ y(this, wt, i + t(this, Wt));
456
458
  }
457
459
  }, "#updateRowCount"));
458
460
  d(this, Bt, /* @__PURE__ */ c(() => {
459
- var o, h, l, f, u, y;
461
+ var a, h, l, f, u, g;
460
462
  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");
461
463
  if (e) {
462
- const g = i ? Array.from(i.querySelectorAll("tbody tr")) : [], m = Array.from(e.querySelectorAll("tbody tr")), x = s ? Array.from(s.querySelectorAll("tbody tr")) : [], A = Math.max(g.length, m.length, x.length);
463
- for (let v = 0; v < A; v++) {
464
+ const b = i ? Array.from(i.querySelectorAll("tbody tr")) : [], m = Array.from(e.querySelectorAll("tbody tr")), x = s ? Array.from(s.querySelectorAll("tbody tr")) : [], E = Math.max(b.length, m.length, x.length);
465
+ for (let v = 0; v < E; v++) {
464
466
  const I = [
465
- ((o = g[v]) == null ? void 0 : o.getBoundingClientRect().height) || 0,
467
+ ((a = b[v]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
466
468
  ((h = m[v]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
467
469
  ((l = x[v]) == null ? void 0 : l.getBoundingClientRect().height) || 0
468
470
  ], R = Math.max(...I);
469
- R > 0 && (g[v] && (g[v].style.height = `${R}px`), m[v] && (m[v].style.height = `${R}px`), x[v] && (x[v].style.height = `${R}px`));
471
+ R > 0 && (b[v] && (b[v].style.height = `${R}px`), m[v] && (m[v].style.height = `${R}px`), x[v] && (x[v].style.height = `${R}px`));
470
472
  }
471
473
  }
472
- const r = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), a = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
474
+ const 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");
473
475
  if (n) {
474
- const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], m = Array.from(n.querySelectorAll("tfoot tr")), x = a ? Array.from(a.querySelectorAll("tfoot tr")) : [], A = Math.max(g.length, m.length, x.length);
475
- for (let v = 0; v < A; v++) {
476
+ const b = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], m = Array.from(n.querySelectorAll("tfoot tr")), x = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], E = Math.max(b.length, m.length, x.length);
477
+ for (let v = 0; v < E; v++) {
476
478
  const I = [
477
- ((f = g[v]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
479
+ ((f = b[v]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
478
480
  ((u = m[v]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
479
- ((y = x[v]) == null ? void 0 : y.getBoundingClientRect().height) || 0
481
+ ((g = x[v]) == null ? void 0 : g.getBoundingClientRect().height) || 0
480
482
  ], R = Math.max(...I);
481
- R > 0 && (g[v] && (g[v].style.height = `${R}px`), m[v] && (m[v].style.height = `${R}px`), x[v] && (x[v].style.height = `${R}px`));
483
+ R > 0 && (b[v] && (b[v].style.height = `${R}px`), m[v] && (m[v].style.height = `${R}px`), x[v] && (x[v].style.height = `${R}px`));
482
484
  }
483
485
  }
484
486
  }, "#syncRowHeights"));
485
487
  d(this, Dt, /* @__PURE__ */ c(() => {
486
- !t(this, S) || !(t(this, S) instanceof HTMLElement) || (b(this, V, new ResizeObserver((i) => {
488
+ !t(this, S) || !(t(this, S) instanceof HTMLElement) || (y(this, V, new ResizeObserver((i) => {
487
489
  for (const e of i) {
488
490
  const s = e.target;
489
491
  if (!s.classList.contains("active")) continue;
490
492
  const r = e.contentRect.height;
491
493
  if (r > 0) {
492
494
  let n = 0;
493
- const a = s.querySelector(".ng-part-header"), o = s.querySelector(".ng-part-footer");
494
- a && (n += a.offsetHeight), o && (n += o.offsetHeight);
495
+ const o = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
496
+ o && (n += o.offsetHeight), a && (n += a.offsetHeight);
495
497
  const h = Math.max(r - n, 100);
496
- t(this, tt) !== h && (b(this, tt, h), t(this, At).call(this), t(this, _) !== null && (t(this, Et).call(this), this.refresh()));
498
+ t(this, tt) !== h && (y(this, tt, h), t(this, Et).call(this), t(this, _) !== null && (t(this, At).call(this), this.refresh()));
497
499
  }
498
500
  }
499
501
  })), t(this, V).observe(t(this, S)));
500
502
  }, "#initResizeObserver"));
501
- d(this, Et, /* @__PURE__ */ c(() => {
503
+ d(this, At, /* @__PURE__ */ c(() => {
502
504
  M.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
503
505
  const e = t(this, S).querySelector(i);
504
506
  e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Ot).call(this, e, i);
505
507
  }), t(this, Pt).call(this), t(this, Bt).call(this);
506
508
  }, "#renderAllContainers"));
507
- d(this, Ee, /* @__PURE__ */ c((i) => {
509
+ d(this, Ae, /* @__PURE__ */ c((i) => {
508
510
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
509
511
  var l;
510
512
  const s = t(this, S).querySelector(e);
511
513
  if (!s) return;
512
514
  const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
513
515
  if (!r) return;
514
- const n = Array.from(r.querySelectorAll("tr:not(.nodata)")), a = ((l = t(this, P).get(e)) == null ? void 0 : l.length) || 1, h = (t(this, D).data.get() || []).length;
516
+ const n = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, D).get(e)) == null ? void 0 : l.length) || 1, h = (t(this, P).data.get() || []).length;
515
517
  n.forEach((f, u) => {
516
- const y = i + Math.floor(u / a);
517
- if (y >= h) {
518
+ const g = i + Math.floor(u / o);
519
+ if (g >= h) {
518
520
  f.style.visibility = "hidden";
519
521
  return;
520
522
  }
521
- const g = t(this, D).data.get(y);
522
- f.style.display = "", t(this, qt).call(this, f, g, y);
523
+ const b = t(this, P).data.get(g);
524
+ f.style.display = "", t(this, qt).call(this, f, b, g);
523
525
  });
524
526
  });
525
527
  }, "#adjustBufferRows"));
@@ -527,24 +529,24 @@ const Ie = class Ie {
527
529
  var f, u;
528
530
  const e = t(this, _);
529
531
  if (!e || e <= 0) return;
530
- const s = t(this, D).data.length;
532
+ const s = t(this, P).data.length;
531
533
  if (s === 0) return;
532
- const r = ((f = t(this, P).get(".ng-container-body")) == null ? void 0 : f.length) || 1, n = Math.max(0, s - 1), a = Math.min(n, Math.max(0, Math.floor(i / e))), o = Math.floor(a * e), h = t(this, Q).firstTr, l = h && h.dataset.row !== void 0 ? parseInt(h.dataset.row, 10) : -1;
533
- (u = t(this, Q)) == null || u.scrollTables.forEach((y) => {
534
- y.style.transform = `translate3d(0, ${o}px, 0)`;
535
- }), l !== a && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((y) => {
536
- const g = t(this, S).querySelector(y);
537
- if (!g) return;
538
- const m = g.querySelector(".ng-part-body tbody.bindable-tbody");
534
+ const r = ((f = t(this, D).get(".ng-container-body")) == null ? void 0 : f.length) || 1, n = Math.max(0, s - 1), o = Math.min(n, Math.max(0, Math.floor(i / e))), a = Math.floor(o * e), h = t(this, Q).firstTr, l = h && h.dataset.row !== void 0 ? parseInt(h.dataset.row, 10) : -1;
535
+ (u = t(this, Q)) == null || u.scrollTables.forEach((g) => {
536
+ g.style.transform = `translate3d(0, ${a}px, 0)`;
537
+ }), l !== o && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
538
+ const b = t(this, S).querySelector(g);
539
+ if (!b) return;
540
+ const m = b.querySelector(".ng-part-body tbody.bindable-tbody");
539
541
  if (!m) return;
540
- Array.from(m.querySelectorAll("tr:not(.nodata)")).forEach((A, v) => {
541
- const I = a + Math.floor(v / r);
542
+ Array.from(m.querySelectorAll("tr:not(.nodata)")).forEach((E, v) => {
543
+ const I = o + Math.floor(v / r);
542
544
  if (I >= s) {
543
- A.style.display = "none";
545
+ E.style.display = "none";
544
546
  return;
545
547
  }
546
- const R = t(this, D).data.get(I);
547
- A.style.display = "", t(this, qt).call(this, A, R, I);
548
+ const R = t(this, P).data.get(I);
549
+ E.style.display = "", t(this, qt).call(this, E, R, I);
548
550
  });
549
551
  });
550
552
  }, "#handleScroll"));
@@ -565,8 +567,8 @@ const Ie = class Ie {
565
567
  d(this, qt, /* @__PURE__ */ c((i, e, s) => {
566
568
  i.dataset.row = s, i.data = e, Array.from(i.cells).forEach((r, n) => {
567
569
  r.dataset.row = s;
568
- const a = Array.from(r.children).find((o) => o.tagName.toLowerCase().startsWith("cell-") || typeof o.refresh == "function");
569
- a && typeof a.refresh == "function" && a.refresh();
570
+ const o = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
571
+ o && typeof o.refresh == "function" && o.refresh();
570
572
  });
571
573
  }, "#bindRowData"));
572
574
  d(this, Pt, /* @__PURE__ */ c(() => {
@@ -574,30 +576,30 @@ const Ie = class Ie {
574
576
  M.log("rowManager.#syncHeaderHeights");
575
577
  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");
576
578
  if (!e) return;
577
- 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);
578
- for (let u = 0; u < o; u++) {
579
- const y = [
579
+ 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);
580
+ for (let u = 0; u < a; u++) {
581
+ const g = [
580
582
  ((h = r[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
581
583
  ((l = n[u]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
582
- ((f = a[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
583
- ], g = Math.max(...y);
584
- g > 0 && (r[u] && (r[u].style.height = `${g}px`), n[u] && (n[u].style.height = `${g}px`), a[u] && (a[u].style.height = `${g}px`));
584
+ ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
585
+ ], b = Math.max(...g);
586
+ 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`));
585
587
  }
586
588
  }, "#syncHeaderHeights"));
587
- E(this, "destroy", /* @__PURE__ */ c(() => {
588
- t(this, V) && (t(this, V).disconnect(), b(this, V, null));
589
+ A(this, "destroy", /* @__PURE__ */ c(() => {
590
+ t(this, V) && (t(this, V).disconnect(), y(this, V, null));
589
591
  }, "destroy"));
590
- b(this, D, i.getRootNode().host), b(this, S, i), t(this, Dt).call(this);
592
+ y(this, P, i.getRootNode().host), y(this, S, i), t(this, Dt).call(this);
591
593
  }
592
594
  getRowHeight() {
593
595
  return t(this, _);
594
596
  }
595
597
  templateLength(i = ".ng-container-body") {
596
598
  var e;
597
- return ((e = t(this, P).get(i)) == null ? void 0 : e.length) || 1;
599
+ return ((e = t(this, D).get(i)) == null ? void 0 : e.length) || 1;
598
600
  }
599
601
  };
600
- D = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), P = new WeakMap(), _ = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ae = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), zt = new WeakMap(), St = new WeakMap(), At = new WeakMap(), Bt = new WeakMap(), Dt = new WeakMap(), Et = new WeakMap(), Ee = new WeakMap(), lt = new WeakMap(), qt = new WeakMap(), Pt = new WeakMap(), c(Ie, "RowManager");
602
+ P = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), D = new WeakMap(), _ = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ee = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), zt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), Bt = new WeakMap(), Dt = new WeakMap(), At = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), qt = new WeakMap(), Pt = new WeakMap(), c(Ie, "RowManager");
601
603
  let ce = Ie;
602
604
  const jt = class jt {
603
605
  /**
@@ -611,64 +613,64 @@ const jt = class jt {
611
613
  */
612
614
  static compile(i) {
613
615
  if (!i) return null;
614
- const e = /* @__PURE__ */ c((o) => {
615
- o.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
616
+ const e = /* @__PURE__ */ c((a) => {
617
+ a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
616
618
  const f = l.getAttribute("cell-type") || "renderer";
617
619
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
618
620
  let u = `cell-${f}`;
619
- const y = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), m = l.getAttribute("maxbyte"), x = l.getAttribute("type");
620
- let A = [];
621
- y && A.push(`data-bind="${y}"`), g && A.push(`data-expr="${g}"`), m && A.push(`maxbyte="${m}"`), x && A.push(`type="${x}"`), l.innerHTML = `<${u} ${A.join(" ")}></${u}>`;
621
+ const g = l.getAttribute("data-bind"), b = l.getAttribute("data-expr"), m = l.getAttribute("maxbyte"), x = l.getAttribute("type");
622
+ let E = [];
623
+ g && E.push(`data-bind="${g}"`), b && E.push(`data-expr="${b}"`), m && E.push(`maxbyte="${m}"`), x && E.push(`type="${x}"`), l.innerHTML = `<${u} ${E.join(" ")}></${u}>`;
622
624
  });
623
- }, "processCellTypes"), s = /* @__PURE__ */ c((o) => {
624
- if (!o.querySelector("colgroup")) {
625
- const h = o.querySelector("tbody tr") || o.querySelector("tr"), l = h ? h.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), u = Math.max(Math.floor(o.clientWidth / l), 100);
626
- for (let y = 0; y < l; y++) {
627
- const g = document.createElement("col");
628
- g.setAttribute("width", u), f.appendChild(g);
625
+ }, "processCellTypes"), s = /* @__PURE__ */ c((a) => {
626
+ if (!a.querySelector("colgroup")) {
627
+ 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);
628
+ for (let g = 0; g < l; g++) {
629
+ const b = document.createElement("col");
630
+ b.setAttribute("width", u), f.appendChild(b);
629
631
  }
630
- o.prepend(f);
632
+ a.prepend(f);
631
633
  }
632
- if (!o.querySelector("thead")) {
633
- const h = document.createElement("thead"), l = o.querySelector("colgroup");
634
- l ? l.after(h) : o.prepend(h);
634
+ if (!a.querySelector("thead")) {
635
+ const h = document.createElement("thead"), l = a.querySelector("colgroup");
636
+ l ? l.after(h) : a.prepend(h);
635
637
  }
636
- o.classList.add("nine-table-element");
637
- }, "ensureTableStructure"), r = /* @__PURE__ */ c((o, h) => {
638
- const l = Array.from(o.querySelectorAll(h + " tr")), f = Array.from(o.querySelectorAll(h + " th," + h + " td")), u = l.length;
638
+ a.classList.add("nine-table-element");
639
+ }, "ensureTableStructure"), r = /* @__PURE__ */ c((a, h) => {
640
+ const l = Array.from(a.querySelectorAll(h + " tr")), f = Array.from(a.querySelectorAll(h + " th," + h + " td")), u = l.length;
639
641
  if (u === 0 || f.length === 0) return;
640
- let y = 0;
642
+ let g = 0;
641
643
  f.forEach((m) => {
642
- y += m.colSpan || 1;
644
+ g += m.colSpan || 1;
643
645
  });
644
- const g = Array.from(Array(u), () => Array(y).fill(null));
646
+ const b = Array.from(Array(u), () => Array(g).fill(null));
645
647
  l.forEach((m) => {
646
648
  const x = m.sectionRowIndex;
647
- let A = 0;
649
+ let E = 0;
648
650
  Array.from(m.querySelectorAll("th,td")).forEach((v) => {
649
- for (let z = 0; z < g[x].length; z++)
650
- if (g[x][z] === null) {
651
- A = z;
651
+ for (let z = 0; z < b[x].length; z++)
652
+ if (b[x][z] === null) {
653
+ E = z;
652
654
  break;
653
655
  }
654
656
  const I = v.rowSpan || 1, R = v.colSpan || 1;
655
657
  for (let z = 0; z < I; z++)
656
658
  for (let yt = 0; yt < R; yt++)
657
- x + z < u && A + yt < y && (g[x + z][A + yt] = z === 0 && yt === 0 ? "1" : "0");
659
+ x + z < u && E + yt < g && (b[x + z][E + yt] = z === 0 && yt === 0 ? "1" : "0");
658
660
  });
659
661
  }), l.forEach((m) => {
660
662
  const x = m.sectionRowIndex;
661
- Array.from(m.querySelectorAll("th,td")).forEach((A) => {
662
- for (let v = 0; v < g[x].length; v++)
663
- if (g[x][v] === "1") {
664
- A.dataset.col = v, g[x][v] = "0";
663
+ Array.from(m.querySelectorAll("th,td")).forEach((E) => {
664
+ for (let v = 0; v < b[x].length; v++)
665
+ if (b[x][v] === "1") {
666
+ E.dataset.col = v, b[x][v] = "0";
665
667
  break;
666
668
  }
667
669
  });
668
670
  });
669
671
  }, "resetColIndex"), n = i.cloneNode(!0);
670
- return s(n), e(n), r(n, "thead"), r(n, "tbody"), r(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((o, h) => {
671
- const l = o.getAttribute("fixed");
672
+ return s(n), e(n), r(n, "thead"), r(n, "tbody"), r(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((a, h) => {
673
+ const l = a.getAttribute("fixed");
672
674
  l && n.querySelectorAll(`thead [data-col="${h}"], tbody [data-col="${h}"], tfoot [data-col="${h}"]`).forEach((f) => {
673
675
  f.setAttribute("fixed", l);
674
676
  });
@@ -685,7 +687,7 @@ const pt = class pt extends HTMLElement {
685
687
  d(this, Ft);
686
688
  d(this, et, null);
687
689
  d(this, st);
688
- E(this, "invalidate", /* @__PURE__ */ c(() => {
690
+ A(this, "invalidate", /* @__PURE__ */ c(() => {
689
691
  t(this, st).refresh();
690
692
  }, "invalidate"));
691
693
  d(this, Vt, /* @__PURE__ */ c(() => {
@@ -694,8 +696,8 @@ const pt = class pt extends HTMLElement {
694
696
  { selector: ".ng-container-left", type: "left" },
695
697
  { selector: ".ng-container-right", type: "right" }
696
698
  ].forEach(({ selector: s, type: r }) => {
697
- var n, a, o;
698
- (n = this.querySelector(`${s} .ng-part-header`)) == null || n.appendChild(t(this, ct).call(this, t(this, et), r, "header")), (a = this.querySelector(`${s} .ng-virtual-spacer`)) == null || a.before(t(this, ct).call(this, t(this, et), r, "body")), (o = this.querySelector(`${s} .ng-part-footer`)) == null || o.appendChild(t(this, ct).call(this, t(this, et), r, "footer"));
699
+ var n, o, a;
700
+ (n = this.querySelector(`${s} .ng-part-header`)) == null || n.appendChild(t(this, ct).call(this, t(this, et), r, "header")), (o = this.querySelector(`${s} .ng-virtual-spacer`)) == null || o.before(t(this, ct).call(this, t(this, et), r, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, ct).call(this, t(this, et), r, "footer"));
699
701
  });
700
702
  }, "#renderSplitContainers"));
701
703
  d(this, Yt, /* @__PURE__ */ c(() => {
@@ -703,29 +705,29 @@ const pt = class pt extends HTMLElement {
703
705
  const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
704
706
  if (!s || !r || r.length === 0) return;
705
707
  let n = 0;
706
- r[0].querySelectorAll("col").forEach((a) => {
707
- const o = parseInt(a.getAttribute("width"), 10);
708
- isNaN(n) || (n += o);
708
+ r[0].querySelectorAll("col").forEach((o) => {
709
+ const a = parseInt(o.getAttribute("width"), 10);
710
+ isNaN(n) || (n += a);
709
711
  }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${n}px`, s.style.width = `${n}px`);
710
712
  });
711
713
  }, "#updateContainerWidths"));
712
- E(this, "generate", /* @__PURE__ */ c((e) => {
714
+ A(this, "generate", /* @__PURE__ */ c((e) => {
713
715
  if (!e) return;
714
- b(this, et, he.compile(e)), t(this, Vt).call(this), t(this, Yt).call(this);
716
+ y(this, et, he.compile(e)), t(this, Vt).call(this), t(this, Yt).call(this);
715
717
  const s = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), n = this.querySelector(".ng-nodata-overlay");
716
718
  s && n && (n.style.top = `${s.offsetHeight}px`), r && n && (n.style.bottom = `${r.offsetHeight}px`), t(this, st).initialize(), setTimeout(() => {
717
- var a;
718
- (a = this.querySelector("nine-table-hscrollbar")) == null || a.refresh();
719
+ var o;
720
+ (o = this.querySelector("nine-table-hscrollbar")) == null || o.refresh();
719
721
  }, 0);
720
722
  }, "generate"));
721
723
  d(this, ct, /* @__PURE__ */ c((e, s, r) => {
722
- const n = e.cloneNode(!0), a = n.querySelector("thead"), o = n.querySelector("tbody"), h = n.querySelector("tfoot");
724
+ const n = e.cloneNode(!0), o = n.querySelector("thead"), a = n.querySelector("tbody"), h = n.querySelector("tfoot");
723
725
  if (r === "header") {
724
- if (o && o.remove(), h && h.remove(), e.querySelector("tbody")) {
726
+ if (a && a.remove(), h && h.remove(), e.querySelector("tbody")) {
725
727
  const f = document.createElement("tbody");
726
728
  f.className = "fixed-tbody", n.appendChild(f);
727
729
  }
728
- } else r === "body" ? (a && a.remove(), h && h.remove(), o && (o.className = "bindable-tbody")) : r === "footer" && (a && a.remove(), o && o.remove());
730
+ } else r === "body" ? (o && o.remove(), h && h.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), a && a.remove());
729
731
  return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
730
732
  l.getAttribute("fixed") !== "left" && l.remove();
731
733
  }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
@@ -734,12 +736,12 @@ const pt = class pt extends HTMLElement {
734
736
  l.remove();
735
737
  }), n;
736
738
  }, "#createSplitTable"));
737
- E(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, st).getRowHeight(), "getRowHeight"));
738
- E(this, "scrollToX", /* @__PURE__ */ c((e) => {
739
+ A(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, st).getRowHeight(), "getRowHeight"));
740
+ A(this, "scrollToX", /* @__PURE__ */ c((e) => {
739
741
  const s = this.querySelector(".ng-container-body .ng-part-body");
740
742
  s && (s.scrollLeft = e);
741
743
  }, "scrollToX"));
742
- E(this, "scrollToY", /* @__PURE__ */ c((e) => {
744
+ A(this, "scrollToY", /* @__PURE__ */ c((e) => {
743
745
  const s = this.querySelector(".ng-container-body .ng-part-body");
744
746
  s && (s.scrollTop = e);
745
747
  }, "scrollToY"));
@@ -935,7 +937,7 @@ const pt = class pt extends HTMLElement {
935
937
  </div>
936
938
  `;
937
939
  }, "#render"));
938
- b(this, st, new ce(this)), b(this, Ft, this.getRootNode().host);
940
+ y(this, st, new ce(this)), y(this, Ft, this.getRootNode().host);
939
941
  }
940
942
  connectedCallback() {
941
943
  t(this, Ut).call(this);
@@ -944,7 +946,7 @@ const pt = class pt extends HTMLElement {
944
946
  this.innerHTML = "", M.log("NineTableSheet destroyed.");
945
947
  }
946
948
  };
947
- 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(pt, "NineTableSheet"), E(pt, "SCROLLBAR_SIZE", 16);
949
+ 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(pt, "NineTableSheet"), A(pt, "SCROLLBAR_SIZE", 16);
948
950
  let $t = pt;
949
951
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", $t);
950
952
  var Kt, Rt;
@@ -954,38 +956,38 @@ const _e = class _e extends HTMLElement {
954
956
  d(this, Kt, /* @__PURE__ */ c(() => {
955
957
  var e;
956
958
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
957
- var a;
958
- const r = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((a = s.target.closest(".nine-tab-item")) == null ? void 0 : a.dataset.index, 10);
959
+ var o;
960
+ const r = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
959
961
  t(this, Rt).call(this, n, r);
960
962
  }), t(this, Rt).call(this, 0, !1);
961
963
  }, "#init"));
962
964
  d(this, Rt, /* @__PURE__ */ c((e, s = !1) => {
963
965
  const r = /* @__PURE__ */ c(() => {
964
966
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
965
- Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
966
- const y = f.filter((g) => g.classList.contains("active"));
967
- y.length < 2 || y.forEach((g) => {
968
- const m = parseInt(g.getAttribute("data-index"), 10), x = this.querySelector(`nine-splitter[data-split-index="${m}"]`), A = f[m + 1];
969
- x && A && A.classList.contains("active") && x.style.setProperty("display", "flex");
967
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
968
+ const g = f.filter((b) => b.classList.contains("active"));
969
+ g.length < 2 || g.forEach((b) => {
970
+ const m = parseInt(b.getAttribute("data-index"), 10), x = this.querySelector(`nine-splitter[data-split-index="${m}"]`), E = f[m + 1];
971
+ x && E && E.classList.contains("active") && x.style.setProperty("display", "flex");
970
972
  });
971
- }, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), a = this.querySelector("nine-table-sheets-body"), o = n.querySelectorAll(".nine-tab-item"), h = a.querySelectorAll("nine-table-sheet");
972
- if (!o[e]) return;
973
+ }, "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");
974
+ if (!a[e]) return;
973
975
  if (!s)
974
- o.forEach((f, u) => {
976
+ a.forEach((f, u) => {
975
977
  f.classList.toggle("active", u === e);
976
978
  }), h.forEach((f, u) => {
977
- const y = u === e;
978
- f.classList.toggle("active", y), f.style.flex = y ? "1 1 100%" : "";
979
+ const g = u === e;
980
+ f.classList.toggle("active", g), f.style.flex = g ? "1 1 100%" : "";
979
981
  });
980
982
  else {
981
- const f = o[e], u = n.querySelectorAll(".nine-tab-item.active");
983
+ const f = a[e], u = n.querySelectorAll(".nine-tab-item.active");
982
984
  if (f.classList.contains("active") && u.length <= 1)
983
985
  return;
984
986
  f.classList.toggle("active");
985
- const y = a.querySelector(`nine-table-sheet[data-index="${e}"]`);
986
- y && (y.classList.toggle("active"), y.classList.contains("active") || (y.style.flex = ""));
987
+ const g = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
988
+ g && (g.classList.toggle("active"), g.classList.contains("active") || (g.style.flex = ""));
987
989
  }
988
- const l = a.querySelectorAll("nine-table-sheet.active");
990
+ const l = o.querySelectorAll("nine-table-sheet.active");
989
991
  l == null || l.forEach((f) => {
990
992
  f.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
991
993
  }), r();
@@ -1012,14 +1014,14 @@ const Ne = class Ne {
1012
1014
  var h, l;
1013
1015
  const i = Array.from(t(this, H).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1014
1016
  if (i.length === 0) return;
1015
- const e = parseInt(t(this, H).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), r = (h = t(this, H).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, n = (l = t(this, H).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, a = $t.SCROLLBAR_SIZE, o = e * s + r + n + a;
1016
- t(this, H).style.height = `${o}px`;
1017
+ const e = parseInt(t(this, H).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), r = (h = t(this, H).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, n = (l = t(this, H).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = $t.SCROLLBAR_SIZE, a = e * s + r + n + o;
1018
+ t(this, H).style.height = `${a}px`;
1017
1019
  }, "#applyAutoHeight"));
1018
1020
  d(this, Gt, /* @__PURE__ */ c(() => {
1019
1021
  const e = Array.from(t(this, H).children).filter((h) => h.tagName === "TABLE"), s = t(this, H).getAttribute("auto-height") === "true", r = e.length, n = e.map((h, l) => {
1020
- const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, y = l < r - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
1021
- return u + y;
1022
- }).join(""), a = e.map((h, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1022
+ 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>` : "";
1023
+ return u + g;
1024
+ }).join(""), o = e.map((h, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1023
1025
  t(this, H).shadowRoot.innerHTML = `
1024
1026
  <style>
1025
1027
  :host {
@@ -1133,7 +1135,7 @@ const Ne = class Ne {
1133
1135
  <nine-table-sheets>
1134
1136
  <nine-table-sheets-body>${n}</nine-table-sheets-body>
1135
1137
  <nine-table-sheets-footer>
1136
- <div class="nine-tab-bar">${a}</div>
1138
+ <div class="nine-tab-bar">${o}</div>
1137
1139
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
1138
1140
  </nine-table-sheets-footer>
1139
1141
  </nine-table-sheets>
@@ -1141,14 +1143,14 @@ const Ne = class Ne {
1141
1143
  </nine-table-body>
1142
1144
  <nine-table-footer></nine-table-footer>
1143
1145
  `, t(this, H).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");
1144
- const o = t(this, H).shadowRoot.querySelectorAll("nine-table-sheet");
1145
- o == null || o.forEach((h, l) => {
1146
+ const a = t(this, H).shadowRoot.querySelectorAll("nine-table-sheet");
1147
+ a == null || a.forEach((h, l) => {
1146
1148
  e[l] && setTimeout(() => {
1147
1149
  h.generate(e[l]), s && t(this, Tt).call(this);
1148
1150
  });
1149
1151
  });
1150
1152
  }, "#render"));
1151
- b(this, H, i), t(this, Zt).call(this);
1153
+ y(this, H, i), t(this, Zt).call(this);
1152
1154
  }
1153
1155
  };
1154
1156
  H = new WeakMap(), Zt = new WeakMap(), Tt = new WeakMap(), Gt = new WeakMap(), c(Ne, "LayoutManager");
@@ -1158,14 +1160,14 @@ const We = class We {
1158
1160
  constructor(i) {
1159
1161
  d(this, kt);
1160
1162
  d(this, ht, -1);
1161
- E(this, "count", /* @__PURE__ */ c(() => t(this, kt).rawRecords.length, "count"));
1162
- b(this, kt, i);
1163
+ A(this, "count", /* @__PURE__ */ c(() => t(this, kt).rawRecords.length, "count"));
1164
+ y(this, kt, i);
1163
1165
  }
1164
1166
  get at() {
1165
1167
  return t(this, ht);
1166
1168
  }
1167
1169
  set at(i) {
1168
- b(this, ht, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ht)}"]`) && setTimeout(() => {
1170
+ y(this, ht, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ht)}"]`) && setTimeout(() => {
1169
1171
  });
1170
1172
  }
1171
1173
  };
@@ -1181,7 +1183,7 @@ const O = class O {
1181
1183
  d(this, Jt, 0);
1182
1184
  d(this, Y, []);
1183
1185
  d(this, Qt, /* @__PURE__ */ c(() => {
1184
- b(this, Y, []);
1186
+ y(this, Y, []);
1185
1187
  const i = t(this, N).template || [];
1186
1188
  Array.from(i).forEach((e) => {
1187
1189
  var s;
@@ -1196,7 +1198,7 @@ const O = class O {
1196
1198
  e.invalidate();
1197
1199
  });
1198
1200
  }, "#invalidate"));
1199
- E(this, "get", /* @__PURE__ */ c((i, e) => {
1201
+ A(this, "get", /* @__PURE__ */ c((i, e) => {
1200
1202
  var n;
1201
1203
  const s = this.getValidData();
1202
1204
  if (!s || s.length <= 0) return;
@@ -1204,12 +1206,12 @@ const O = class O {
1204
1206
  if (i < 0 || i >= s.length) return null;
1205
1207
  const r = typeof ((n = t(this, N).fields) == null ? void 0 : n.get) == "function" ? t(this, N).fields.get() : [];
1206
1208
  if (e != null) {
1207
- const a = r.indexOf(e);
1208
- return a >= 0 ? s[i].v[a] : null;
1209
+ const o = r.indexOf(e);
1210
+ return o >= 0 ? s[i].v[o] : null;
1209
1211
  }
1210
1212
  return t(this, ft).call(this, s[i]);
1211
1213
  }, "get"));
1212
- E(this, "set", /* @__PURE__ */ c((i) => {
1214
+ A(this, "set", /* @__PURE__ */ c((i) => {
1213
1215
  this.clear(), this.add(i, !1), t(this, it).call(this);
1214
1216
  }, "set"));
1215
1217
  d(this, Ct, /* @__PURE__ */ c(() => ({
@@ -1221,38 +1223,38 @@ const O = class O {
1221
1223
  c: {},
1222
1224
  _: [0, 0, 0, 0, O.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
1223
1225
  }), "#getDefaultMeta"));
1224
- E(this, "reset", /* @__PURE__ */ c(() => {
1225
- b(this, W, []), b(this, dt, []), t(this, it).call(this);
1226
+ A(this, "reset", /* @__PURE__ */ c(() => {
1227
+ y(this, W, []), y(this, dt, []), t(this, it).call(this);
1226
1228
  }, "reset"));
1227
- E(this, "clear", /* @__PURE__ */ c(() => {
1229
+ A(this, "clear", /* @__PURE__ */ c(() => {
1228
1230
  var i;
1229
- t(this, k).rawRecords = [], b(this, W, []), b(this, dt, []), (i = t(this, k).viewRecords) != null && i.reset && t(this, k).viewRecords.reset();
1231
+ t(this, k).rawRecords = [], y(this, W, []), y(this, dt, []), (i = t(this, k).viewRecords) != null && i.reset && t(this, k).viewRecords.reset();
1230
1232
  }, "clear"));
1231
1233
  d(this, te, /* @__PURE__ */ c((i) => {
1232
1234
  var r;
1233
1235
  Array.isArray(i) || (i = [i]);
1234
1236
  const e = typeof ((r = t(this, N).fields) == null ? void 0 : r.get) == "function" ? t(this, N).fields.get() : Object.keys(i[0] || {}), s = [];
1235
1237
  return i.forEach((n) => {
1236
- const a = { v: [] };
1237
- e.forEach((o) => {
1238
- a.v.push(n[o] !== void 0 && n[o] !== null ? n[o] : "");
1239
- }), s.push(a);
1238
+ const o = { v: [] };
1239
+ e.forEach((a) => {
1240
+ o.v.push(n[a] !== void 0 && n[a] !== null ? n[a] : "");
1241
+ }), s.push(o);
1240
1242
  }), s;
1241
1243
  }, "#json2Array"));
1242
1244
  d(this, ee, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1243
1245
  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;
1244
1246
  }), i), "#defaultInsert"));
1245
- E(this, "add", /* @__PURE__ */ c((i, e = !0) => {
1247
+ A(this, "add", /* @__PURE__ */ c((i, e = !0) => {
1246
1248
  i === void 0 && (i = {});
1247
1249
  const s = t(this, te).call(this, i);
1248
1250
  t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this, ee).call(this, s)), this.resetRecords();
1249
1251
  const r = this.count() - 1;
1250
- return e || s.forEach((n, a) => {
1251
- const o = t(this, k).rawRecords[r - a];
1252
- o && (o.__ng.rowState = O.ROW_STATE.EMPTY);
1252
+ return e || s.forEach((n, o) => {
1253
+ const a = t(this, k).rawRecords[r - o];
1254
+ a && (a.__ng.rowState = O.ROW_STATE.EMPTY);
1253
1255
  }), t(this, it).call(this), r;
1254
1256
  }, "add"));
1255
- E(this, "delete", /* @__PURE__ */ c((i) => {
1257
+ A(this, "delete", /* @__PURE__ */ c((i) => {
1256
1258
  let e = [];
1257
1259
  Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, k).host.row.at] : e = [parseInt(i, 10)], e.sort((s, r) => r - s).forEach((s) => {
1258
1260
  if (t(this, W)[s]) {
@@ -1263,37 +1265,37 @@ const O = class O {
1263
1265
  }
1264
1266
  }), this.resetRecords(), t(this, it).call(this);
1265
1267
  }, "delete"));
1266
- E(this, "setValue", /* @__PURE__ */ c((i, e, s) => {
1268
+ A(this, "setValue", /* @__PURE__ */ c((i, e, s) => {
1267
1269
  var h;
1268
1270
  i = parseInt(i, 10);
1269
1271
  const n = (typeof ((h = t(this, N).fields) == null ? void 0 : h.get) == "function" ? t(this, N).fields.get() : []).indexOf(e);
1270
1272
  if (n < 0) return;
1271
- const a = this.getValidData()[i];
1272
- if (!a) return;
1273
- const o = a.v[n];
1274
- 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;
1273
+ const o = this.getValidData()[i];
1274
+ if (!o) return;
1275
+ const a = o.v[n];
1276
+ a !== s && o.__ng.rowState !== O.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = a), o.__ng.rowState = O.ROW_STATE.UPDATE), o.v[n] = s;
1275
1277
  }, "setValue"));
1276
- E(this, "resetRecords", /* @__PURE__ */ c(() => {
1277
- b(this, dt, t(this, k).rawRecords.filter((i) => !i.__ng.deleted)), b(this, W, t(this, k).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, k).rawRecords.forEach((i, e) => {
1278
+ A(this, "resetRecords", /* @__PURE__ */ c(() => {
1279
+ y(this, dt, t(this, k).rawRecords.filter((i) => !i.__ng.deleted)), y(this, W, t(this, k).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, k).rawRecords.forEach((i, e) => {
1278
1280
  i.__ng.rowidx = e;
1279
1281
  }), t(this, W).forEach((i, e) => {
1280
1282
  i.__ng.i = e;
1281
1283
  });
1282
1284
  }, "resetRecords"));
1283
- E(this, "getValidData", /* @__PURE__ */ c(() => (t(this, W).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, W)), "getValidData"));
1285
+ A(this, "getValidData", /* @__PURE__ */ c(() => (t(this, W).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, W)), "getValidData"));
1284
1286
  d(this, ft, /* @__PURE__ */ c((i) => {
1285
- var a;
1287
+ var o;
1286
1288
  if (!i) return i;
1287
- const e = !Array.isArray(i), s = e ? [i] : i, r = typeof ((a = t(this, N).fields) == null ? void 0 : a.get) == "function" ? t(this, N).fields.get() : [], n = s.filter((o) => !o.__ng.deleted).map((o) => {
1289
+ const e = !Array.isArray(i), s = e ? [i] : i, r = typeof ((o = t(this, N).fields) == null ? void 0 : o.get) == "function" ? t(this, N).fields.get() : [], n = s.filter((a) => !a.__ng.deleted).map((a) => {
1288
1290
  const h = {};
1289
1291
  return r.forEach((l, f) => {
1290
- h[l] = o.v ? o.v[f] : o[l];
1291
- }), h.__ng = o.__ng, h;
1292
+ h[l] = a.v ? a.v[f] : a[l];
1293
+ }), h.__ng = a.__ng, h;
1292
1294
  });
1293
1295
  return e ? n[0] : n;
1294
1296
  }, "#conv"));
1295
- E(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1296
- b(this, N, i), b(this, k, e), t(this, Qt).call(this);
1297
+ A(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1298
+ y(this, N, i), y(this, k, e), t(this, Qt).call(this);
1297
1299
  }
1298
1300
  get source() {
1299
1301
  return t(this, ft).call(this, t(this, k).rawRecords);
@@ -1315,7 +1317,7 @@ const O = class O {
1315
1317
  }
1316
1318
  };
1317
1319
  N = new WeakMap(), k = new WeakMap(), W = 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(O, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1318
- E(O, "ROW_STATE", {
1320
+ A(O, "ROW_STATE", {
1319
1321
  EMPTY: "EMPTY",
1320
1322
  NORMAL: "NORMAL",
1321
1323
  INSERT: "INSERT",
@@ -1327,7 +1329,7 @@ var rt;
1327
1329
  const Oe = class Oe {
1328
1330
  constructor(i) {
1329
1331
  d(this, rt);
1330
- b(this, rt, i), this.row = new ue(this), this.data = new ge(t(this, rt), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1332
+ y(this, rt, i), this.row = new ue(this), this.data = new ge(t(this, rt), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1331
1333
  var e;
1332
1334
  (e = t(this, rt).view) != null && e.redraw && t(this, rt).view.redraw();
1333
1335
  }, this.setDataSource = (e) => {
@@ -1352,7 +1354,7 @@ const ze = class ze {
1352
1354
  constructor(i) {
1353
1355
  d(this, ut);
1354
1356
  d(this, L, []);
1355
- E(this, "add", /* @__PURE__ */ c((i, e = "string") => {
1357
+ A(this, "add", /* @__PURE__ */ c((i, e = "string") => {
1356
1358
  i.forEach((s) => {
1357
1359
  t(this, L).some((r) => r.name === s) || t(this, L).push({ name: s, type: e });
1358
1360
  }), t(this, Lt).call(this);
@@ -1361,33 +1363,33 @@ const ze = class ze {
1361
1363
  const i = /* @__PURE__ */ new Map();
1362
1364
  t(this, L).forEach((e) => {
1363
1365
  i.set(e.name, e.type);
1364
- }), b(this, L, Array.from(i, ([e, s]) => ({ name: e, type: s }))), b(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);
1366
+ }), y(this, L, Array.from(i, ([e, s]) => ({ name: e, type: s }))), y(this, L, t(this, L).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, L).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1365
1367
  }, "#adjust"));
1366
1368
  d(this, se, /* @__PURE__ */ c(() => {
1367
- b(this, L, []), M.log(t(this, ut).querySelectorAll("table"));
1369
+ y(this, L, []), M.log(t(this, ut).querySelectorAll("table"));
1368
1370
  const i = Array.from(t(this, ut).querySelectorAll("table"));
1369
1371
  if (!(!i || i.length === 0)) {
1370
1372
  for (const e of i)
1371
1373
  M.log(e), $("[data-bind]", e).each((s, r) => {
1372
- const n = r.dataset.bind, a = r.getAttribute("data-type") || "string";
1373
- n && t(this, L).push({ name: n, type: a });
1374
+ const n = r.dataset.bind, o = r.getAttribute("data-type") || "string";
1375
+ n && t(this, L).push({ name: n, type: o });
1374
1376
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1375
1377
  $(`[${s}]`, e).each((r, n) => {
1376
- var a = n.getAttribute(s);
1377
- if (a.indexOf("data.") < 0) {
1378
- const o = a.search(/[(]/g);
1379
- if (o > 0)
1378
+ var o = n.getAttribute(s);
1379
+ if (o.indexOf("data.") < 0) {
1380
+ const a = o.search(/[(]/g);
1381
+ if (a > 0)
1380
1382
  try {
1381
- a = String(window[a.substring(0, o).trim()]);
1383
+ o = String(window[o.substring(0, a).trim()]);
1382
1384
  } catch {
1383
- a = "";
1385
+ o = "";
1384
1386
  }
1385
1387
  }
1386
- a.split("data.").forEach((o) => {
1387
- if (o.trim() != "") {
1388
- const h = o.search(/[^_A-Za-z0-9]/g);
1388
+ o.split("data.").forEach((a) => {
1389
+ if (a.trim() != "") {
1390
+ const h = a.search(/[^_A-Za-z0-9]/g);
1389
1391
  let l = "";
1390
- h >= 0 ? l = o.substring(0, h) : a.startsWith("data.") && (l = o.replace("data.", "")), l && t(this, L).push({ name: l, type: "string" });
1392
+ h >= 0 ? l = a.substring(0, h) : o.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, L).push({ name: l, type: "string" });
1391
1393
  }
1392
1394
  });
1393
1395
  });
@@ -1395,7 +1397,7 @@ const ze = class ze {
1395
1397
  t(this, Lt).call(this);
1396
1398
  }
1397
1399
  }, "#init"));
1398
- b(this, ut, i), t(this, se).call(this);
1400
+ y(this, ut, i), t(this, se).call(this);
1399
1401
  }
1400
1402
  // 🎯 기쑴에 ν•„λ“œ μ΄λ¦„λ§Œ μ“°λ˜ κ³³λ“€κ³Όμ˜ ν˜Έν™˜μ„ μœ„ν•΄ 이름 λ°°μ—΄λ§Œ λ¦¬ν„΄ν•˜λŠ” λ©”μ„œλ“œ μœ μ§€
1401
1403
  get() {
@@ -1427,9 +1429,9 @@ const Be = class Be extends HTMLElement {
1427
1429
  d(this, nt);
1428
1430
  d(this, ie);
1429
1431
  d(this, re, /* @__PURE__ */ c(() => {
1430
- this.fields = new ye(this), b(this, ie, new fe(this)), M.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1432
+ this.fields = new ye(this), y(this, ie, new fe(this)), M.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1431
1433
  }, "#init"));
1432
- this.attachShadow({ mode: "open" }), b(this, nt, new be(this));
1434
+ this.attachShadow({ mode: "open" }), y(this, nt, new be(this));
1433
1435
  }
1434
1436
  connectedCallback() {
1435
1437
  t(this, re).call(this);
@@ -1464,7 +1466,7 @@ const mt = class mt extends HTMLElement {
1464
1466
  connectedCallback() {
1465
1467
  }
1466
1468
  };
1467
- c(mt, "BasicCellElement"), E(mt, "_styleCache", /* @__PURE__ */ new Map()), E(mt, "_customStyleCache", /* @__PURE__ */ new Map());
1469
+ c(mt, "BasicCellElement"), A(mt, "_styleCache", /* @__PURE__ */ new Map()), A(mt, "_customStyleCache", /* @__PURE__ */ new Map());
1468
1470
  let me = mt;
1469
1471
  var C, Ht, p, qe, Re, Te, ke, Ce;
1470
1472
  const De = class De extends me {
@@ -1477,7 +1479,7 @@ const De = class De extends me {
1477
1479
  d(this, Re);
1478
1480
  d(this, Te);
1479
1481
  d(this, ke);
1480
- E(this, "getDisplayText", /* @__PURE__ */ c((e) => {
1482
+ A(this, "getDisplayText", /* @__PURE__ */ c((e) => {
1481
1483
  if (t(this, p))
1482
1484
  if (t(this, p).closest("tbody")) {
1483
1485
  const s = t(this, p).closest("tr").data, r = parseInt(t(this, p).dataset.row);
@@ -1508,12 +1510,12 @@ const De = class De extends me {
1508
1510
  }), r.sort();
1509
1511
  var n = !1;
1510
1512
  if (parseInt(s.sectionRowIndex / t(this, C).template.length) > 0)
1511
- for (var a of r) {
1512
- if (a > e) break;
1513
- var o = parseInt(t(this, p).dataset.row), h = o - 1, l = t(this, p).closest("tr").data, f = t(this, C).data.get(h);
1513
+ for (var o of r) {
1514
+ if (o > e) break;
1515
+ var a = parseInt(t(this, p).dataset.row), h = a - 1, l = t(this, p).closest("tr").data, f = t(this, C).data.get(h);
1514
1516
  t(this, p).dataset.matrixRow;
1515
- var u = t(this, C).body.querySelector(`tbody.bindable [suppress="${a}"][data-matrix-row="${t(this, p).dataset.matrixRow}"]`), y = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, o) : l[u.dataset.bind], g = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, h) : f[u.dataset.bind];
1516
- if (y != g) {
1517
+ var u = t(this, C).body.querySelector(`tbody.bindable [suppress="${o}"][data-matrix-row="${t(this, p).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];
1518
+ if (g != b) {
1517
1519
  n = !0;
1518
1520
  break;
1519
1521
  }
@@ -1521,17 +1523,17 @@ const De = class De extends me {
1521
1523
  else
1522
1524
  n = !0;
1523
1525
  n ? ninegrid.j.querySelectorAll(t(this, p)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, p)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, p)).hasClass("hidden") || (n ? ninegrid.j.querySelectorAll(t(this, p)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, p)).addClass("hidden"));
1524
- var m = parseInt(t(this, p).dataset.matrixRow), x = m - 1, A = t(this, C).body.querySelector(`tbody.bindable [data-col="${t(this, p).dataset.col}"][data-matrix-row="${x}"]`);
1525
- $(A).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").addClass("last-suppress") : !$(A).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").removeClass("last-suppress");
1526
+ var m = parseInt(t(this, p).dataset.matrixRow), x = m - 1, E = t(this, C).body.querySelector(`tbody.bindable [data-col="${t(this, p).dataset.col}"][data-matrix-row="${x}"]`);
1527
+ $(E).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(E).removeClass("last-none-suppress").addClass("last-suppress") : !$(E).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(E).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(E).removeClass("last-none-suppress").removeClass("last-suppress");
1526
1528
  }
1527
1529
  }
1528
1530
  }, "#resetSuppress"));
1529
- E(this, "getExprValue", /* @__PURE__ */ c((e, s, r, n) => {
1531
+ A(this, "getExprValue", /* @__PURE__ */ c((e, s, r, n) => {
1530
1532
  if (typeof e < "u")
1531
1533
  try {
1532
1534
  r = parseInt(r);
1533
- const a = e.replace("()", "");
1534
- return t(this, C)[a] ? t(this, C)[a].call(this, s, r, t(this, p)) : t(this, C).exprFunction(e).call(this, s, r, t(this, C).data);
1535
+ const o = e.replace("()", "");
1536
+ return t(this, C)[o] ? t(this, C)[o].call(this, s, r, t(this, p)) : t(this, C).exprFunction(e).call(this, s, r, t(this, C).data);
1535
1537
  } catch {
1536
1538
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1537
1539
  }
@@ -1540,7 +1542,7 @@ const De = class De extends me {
1540
1542
  }, "getExprValue"));
1541
1543
  }
1542
1544
  connectedCallback() {
1543
- super.connectedCallback(), b(this, C, this.getRootNode().host), b(this, p, this.closest("th,td")), b(this, Ht, t(this, p).closest("tr"));
1545
+ super.connectedCallback(), y(this, C, this.getRootNode().host), y(this, p, this.closest("th,td")), y(this, Ht, t(this, p).closest("tr"));
1544
1546
  }
1545
1547
  get value() {
1546
1548
  var e = !t(this, C) || !t(this, C).dataManager || !t(this, p) || !t(this, p).dataset || !t(this, p).dataset.row || !t(this, p).dataset.bind ? "" : t(this, p).closest("tr").data[t(this, p).dataset.bind];
@@ -1587,7 +1589,7 @@ const je = class je extends xe {
1587
1589
  d(this, bt);
1588
1590
  d(this, ne);
1589
1591
  d(this, U);
1590
- E(this, "refresh", /* @__PURE__ */ c(() => {
1592
+ A(this, "refresh", /* @__PURE__ */ c(() => {
1591
1593
  const e = super.refresh();
1592
1594
  t(this, Mt).value = e;
1593
1595
  }, "refresh"));
@@ -1636,7 +1638,7 @@ const je = class je extends xe {
1636
1638
  t(this, gt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, gt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1637
1639
  }
1638
1640
  }, "#onKeyDown"));
1639
- if (this.applyBaseStyle(), b(this, ot, this.getAttribute("type") || "text"), b(this, gt, this.getAttribute("maxbyte")), b(this, bt, this.getAttribute("min")), b(this, ne, this.getAttribute("max")), b(this, U, this.getAttribute("scale")), !["text", "number"].includes(t(this, ot))) throw `invalid type : ${t(this, ot)}`;
1641
+ if (this.applyBaseStyle(), y(this, ot, this.getAttribute("type") || "text"), y(this, gt, this.getAttribute("maxbyte")), y(this, bt, this.getAttribute("min")), y(this, ne, this.getAttribute("max")), y(this, U, this.getAttribute("scale")), !["text", "number"].includes(t(this, ot))) throw `invalid type : ${t(this, ot)}`;
1640
1642
  }
1641
1643
  connectedCallback() {
1642
1644
  for (var e = [], s = 0; s < this.attributes.length; s++)
@@ -1646,7 +1648,7 @@ const je = class je extends xe {
1646
1648
  ${e.join(" ")}
1647
1649
  ondragstart="return false;"
1648
1650
  >
1649
- `, super.connectedCallback(), b(this, Mt, this.querySelector("input"));
1651
+ `, super.connectedCallback(), y(this, Mt, this.querySelector("input"));
1650
1652
  }
1651
1653
  };
1652
1654
  Mt = new WeakMap(), ot = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), ne = new WeakMap(), U = new WeakMap(), Le = new WeakMap(), c(je, "CellInputText");