@ninebone/table 0.0.845 β†’ 0.0.846

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.
@@ -5,13 +5,13 @@ var xs = (T) => {
5
5
  var As = (T, s, e) => s in T ? ms(T, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[s] = e;
6
6
  var d = (T, s) => ms(T, "name", { value: s, configurable: !0 });
7
7
  var E = (T, s, e) => As(T, typeof s != "symbol" ? s + "" : s, e), Ee = (T, s, e) => s.has(T) || xs("Cannot " + e);
8
- var t = (T, s, e) => (Ee(T, s, "read from private field"), e ? e.call(T) : s.get(T)), h = (T, s, e) => s.has(T) ? xs("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(T) : s.set(T, e), y = (T, s, e, n) => (Ee(T, s, "write to private field"), n ? n.call(T, e) : s.set(T, e), e), Y = (T, s, e) => (Ee(T, s, "access private method"), e);
9
- var ws = (T, s, e, n) => ({
8
+ var t = (T, s, e) => (Ee(T, s, "read from private field"), e ? e.call(T) : s.get(T)), h = (T, s, e) => s.has(T) ? xs("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(T) : s.set(T, e), y = (T, s, e, r) => (Ee(T, s, "write to private field"), r ? r.call(T, e) : s.set(T, e), e), Y = (T, s, e) => (Ee(T, s, "access private method"), e);
9
+ var ws = (T, s, e, r) => ({
10
10
  set _(o) {
11
11
  y(T, s, o, e);
12
12
  },
13
13
  get _() {
14
- return t(T, s, n);
14
+ return t(T, s, r);
15
15
  }
16
16
  });
17
17
  import { trace as Es } from "@ninebone/util";
@@ -42,13 +42,13 @@ const ts = class ts extends HTMLElement {
42
42
  }, "#observeResize"));
43
43
  E(this, "refresh", /* @__PURE__ */ d(() => {
44
44
  if (!t(this, B) || !t(this, A) || t(this, X)) return;
45
- const e = t(this, A).container, n = e.querySelector("table");
46
- if (!n) return;
47
- const o = t(this, A).track, a = t(this, A).thumb, r = t(this, B).querySelector(".ng-container-bottom"), i = e.clientWidth, c = n.scrollWidth;
45
+ const e = t(this, A).container, r = e.querySelector("table");
46
+ if (!r) return;
47
+ const o = t(this, A).track, a = t(this, A).thumb, n = t(this, B).querySelector(".ng-container-bottom"), i = e.clientWidth, c = r.scrollWidth;
48
48
  if (i !== 0 && c > i)
49
- r && (r.style.display = "flex");
49
+ n && (n.style.display = "flex");
50
50
  else {
51
- r && (r.style.display = "none");
51
+ n && (n.style.display = "none");
52
52
  return;
53
53
  }
54
54
  const l = o.clientWidth;
@@ -63,15 +63,15 @@ const ts = class ts extends HTMLElement {
63
63
  }, "refresh"));
64
64
  h(this, et, /* @__PURE__ */ d((e) => {
65
65
  if (!t(this, A)) return !1;
66
- const n = t(this, A).container, o = n.querySelector("table");
66
+ const r = t(this, A).container, o = r.querySelector("table");
67
67
  if (!o) return !1;
68
- const a = t(this, A).track.getBoundingClientRect(), r = t(this, A).thumb.clientWidth;
68
+ const a = t(this, A).track.getBoundingClientRect(), n = t(this, A).thumb.clientWidth;
69
69
  let i = e;
70
70
  i < 0 && (i = 0);
71
- const c = a.width - r;
71
+ const c = a.width - n;
72
72
  i > c && (i = c), i = parseInt(i, 10), t(this, A).thumb.style.left = `${i}px`, q.log("1111=========="), t(this, A).left.disabled = i === 0, t(this, A).right.disabled = i >= c - 1;
73
- const l = n.clientWidth, u = o.scrollWidth - l;
74
- return c > 0 && u > 0 && (n.scrollLeft = i / c * u), i > 0 && i < c - 1;
73
+ const l = r.clientWidth, u = o.scrollWidth - l;
74
+ return c > 0 && u > 0 && (r.scrollLeft = i / c * u), i > 0 && i < c - 1;
75
75
  }, "#thumbMoveTo"));
76
76
  h(this, Gt, /* @__PURE__ */ d(() => {
77
77
  const e = /* @__PURE__ */ d((o) => {
@@ -79,15 +79,15 @@ const ts = class ts extends HTMLElement {
79
79
  const a = parseInt(t(this, A).thumb.style.left || 0, 10);
80
80
  t(this, et).call(this, a + o), y(this, J, setInterval(() => {
81
81
  clearInterval(t(this, J)), y(this, Q, setInterval(() => {
82
- const r = parseInt(t(this, A).thumb.style.left || 0, 10);
83
- t(this, et).call(this, r + o) || clearInterval(t(this, Q));
82
+ const n = parseInt(t(this, A).thumb.style.left || 0, 10);
83
+ t(this, et).call(this, n + o) || clearInterval(t(this, Q));
84
84
  }, 50));
85
85
  }, 500));
86
- }, "delayScroll"), n = /* @__PURE__ */ d(() => {
86
+ }, "delayScroll"), r = /* @__PURE__ */ d(() => {
87
87
  clearInterval(t(this, J)), clearInterval(t(this, Q));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((o) => {
90
- t(this, A).left.addEventListener(o, n), t(this, A).right.addEventListener(o, n), t(this, A).track.addEventListener(o, n);
90
+ t(this, A).left.addEventListener(o, r), t(this, A).right.addEventListener(o, r), t(this, A).track.addEventListener(o, r);
91
91
  }), t(this, A).left.addEventListener("mousedown", (o) => {
92
92
  o.button === 0 && e(-20);
93
93
  }), t(this, A).right.addEventListener("mousedown", (o) => {
@@ -95,8 +95,8 @@ const ts = class ts extends HTMLElement {
95
95
  }), t(this, A).left.addEventListener("touchstart", () => e(-20)), t(this, A).right.addEventListener("touchstart", () => e(20)), t(this, A).track.addEventListener("mousedown", (o) => {
96
96
  if (o.button !== 0) return;
97
97
  o.preventDefault();
98
- const a = t(this, A).track.getBoundingClientRect(), r = t(this, A).thumb.clientWidth;
99
- t(this, et).call(this, o.clientX - a.left - r / 2);
98
+ const a = t(this, A).track.getBoundingClientRect(), n = t(this, A).thumb.clientWidth;
99
+ t(this, et).call(this, o.clientX - a.left - n / 2);
100
100
  }), t(this, A).thumb.addEventListener("mousedown", (o) => {
101
101
  if (o.button !== 0) return;
102
102
  o.stopPropagation(), o.preventDefault(), y(this, X, !0), this.shiftX = o.clientX - t(this, A).thumb.getBoundingClientRect().left;
@@ -104,10 +104,10 @@ const ts = class ts extends HTMLElement {
104
104
  if (!t(this, X)) return;
105
105
  const c = t(this, A).track.getBoundingClientRect();
106
106
  t(this, et).call(this, i.clientX - c.left - this.shiftX);
107
- }, "onMouseMove"), r = /* @__PURE__ */ d(() => {
108
- y(this, X, !1), n(), document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", r), this.refresh();
107
+ }, "onMouseMove"), n = /* @__PURE__ */ d(() => {
108
+ y(this, X, !1), r(), document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", n), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", a), document.addEventListener("mouseup", r);
110
+ document.addEventListener("mousemove", a), document.addEventListener("mouseup", n);
111
111
  });
112
112
  }, "#init"));
113
113
  }
@@ -177,18 +177,18 @@ const ts = class ts extends HTMLElement {
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
179
  const e = /* @__PURE__ */ d(() => {
180
- const n = t(this, B).querySelector(".ng-container-body .ng-part-body");
181
- if (!n) {
180
+ const r = t(this, B).querySelector(".ng-container-body .ng-part-body");
181
+ if (!r) {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
185
  y(this, A, {
186
- container: n,
186
+ container: r,
187
187
  track: this.querySelector(".ng-scroll-track"),
188
188
  thumb: this.querySelector(".ng-scroll-thumb"),
189
189
  left: this.querySelector(".ng-scroll-left"),
190
190
  right: this.querySelector(".ng-scroll-right")
191
- }), n.addEventListener("scroll", () => {
191
+ }), r.addEventListener("scroll", () => {
192
192
  t(this, X) || this.refresh();
193
193
  }), t(this, Gt).call(this), t(this, Kt).call(this), this.refresh();
194
194
  }, "initWhenReady");
@@ -201,25 +201,25 @@ const ts = class ts extends HTMLElement {
201
201
  B = new WeakMap(), X = new WeakMap(), A = new WeakMap(), J = new WeakMap(), Q = new WeakMap(), tt = new WeakMap(), Kt = new WeakMap(), et = new WeakMap(), Gt = new WeakMap(), d(ts, "NineTableHScrollBar");
202
202
  let Te = ts;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Te);
204
- var st, nt, bt, k, Ct, kt, Zt;
204
+ var st, rt, bt, k, Ct, kt, Zt;
205
205
  const es = class es extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
208
  h(this, st);
209
- h(this, nt);
209
+ h(this, rt);
210
210
  h(this, bt, !1);
211
211
  h(this, k);
212
212
  h(this, Ct, 0);
213
213
  h(this, kt, 0);
214
214
  E(this, "refresh", /* @__PURE__ */ d(() => {
215
215
  if (!t(this, st) || !t(this, k)) return;
216
- const e = t(this, k).container, n = t(this, k).track, o = t(this, k).thumb, a = e.clientHeight, r = t(this, st).data.length, i = t(this, nt).getRowHeight(), c = r * i;
217
- if (c <= a || r === 0) {
216
+ const e = t(this, k).container, r = t(this, k).track, o = t(this, k).thumb, a = e.clientHeight, n = t(this, st).data.length, i = t(this, rt).getRowHeight(), c = n * i;
217
+ if (c <= a || n === 0) {
218
218
  this.style.display = "none";
219
219
  return;
220
220
  } else
221
221
  this.style.display = "flex";
222
- const l = n.clientHeight;
222
+ const l = r.clientHeight;
223
223
  if (l <= 0) return;
224
224
  const f = Math.max(Math.min(l * (a / c), l), 20);
225
225
  o.style.height = `${f}px`;
@@ -231,16 +231,16 @@ const es = class es extends HTMLElement {
231
231
  }, "refresh"));
232
232
  h(this, Zt, /* @__PURE__ */ d(() => {
233
233
  q.log("nine-table-vscrollbar.#init");
234
- const e = t(this, k).container, n = /* @__PURE__ */ d(() => {
235
- const a = (t(this, st).data.get() || []).length, r = t(this, nt).getRowHeight();
236
- return a * r;
234
+ const e = t(this, k).container, r = /* @__PURE__ */ d(() => {
235
+ const a = (t(this, st).data.get() || []).length, n = t(this, rt).getRowHeight();
236
+ return a * n;
237
237
  }, "getContentHeight");
238
238
  t(this, k).thumb.addEventListener("mousedown", (o) => {
239
239
  if (o.button !== 0) return;
240
240
  o.stopPropagation(), o.preventDefault(), y(this, bt, !0), y(this, Ct, o.clientY), y(this, kt, e.scrollTop);
241
241
  const a = /* @__PURE__ */ d((i) => {
242
242
  if (!t(this, bt)) return;
243
- const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, u = c.height - l, b = i.clientY - t(this, Ct), g = e.clientHeight, p = n(), m = Math.max(p - g, 1);
243
+ const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, u = c.height - l, b = i.clientY - t(this, Ct), g = e.clientHeight, p = r(), m = Math.max(p - g, 1);
244
244
  if (u > 0 && m > 0) {
245
245
  const v = b / u * m;
246
246
  let x = t(this, kt) + v;
@@ -248,13 +248,13 @@ const es = class es extends HTMLElement {
248
248
  x < 0 && (x = 0), x > C && (x = C), e.scrollTop = x;
249
249
  }
250
250
  this.refresh();
251
- }, "onMouseMove"), r = /* @__PURE__ */ d(() => {
252
- y(this, bt, !1), document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", r), this.refresh();
251
+ }, "onMouseMove"), n = /* @__PURE__ */ d(() => {
252
+ y(this, bt, !1), document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", n), this.refresh();
253
253
  }, "onMouseUp");
254
- document.addEventListener("mousemove", a), document.addEventListener("mouseup", r);
254
+ document.addEventListener("mousemove", a), document.addEventListener("mouseup", n);
255
255
  }), t(this, k).track.addEventListener("mousedown", (o) => {
256
256
  if (o.button !== 0 || o.target === t(this, k).thumb) return;
257
- const a = t(this, k).track.getBoundingClientRect(), r = t(this, k).thumb.clientHeight, i = o.clientY - a.top - r / 2, l = a.height - r, f = e.clientHeight, u = n(), b = Math.max(u - f, 1);
257
+ const a = t(this, k).track.getBoundingClientRect(), n = t(this, k).thumb.clientHeight, i = o.clientY - a.top - n / 2, l = a.height - n, f = e.clientHeight, u = r(), b = Math.max(u - f, 1);
258
258
  if (l > 0 && b > 0) {
259
259
  const g = Math.max(0, Math.min(1, i / l));
260
260
  e.scrollTop = g * b;
@@ -268,7 +268,7 @@ const es = class es extends HTMLElement {
268
268
  }, "#init"));
269
269
  }
270
270
  connectedCallback() {
271
- y(this, st, this.getRootNode().host), y(this, nt, this.closest("nine-table-sheet")), this.innerHTML = `
271
+ y(this, st, this.getRootNode().host), y(this, rt, this.closest("nine-table-sheet")), this.innerHTML = `
272
272
  <style>
273
273
  nine-table-vscrollbar {
274
274
  display: flex;
@@ -333,13 +333,13 @@ const es = class es extends HTMLElement {
333
333
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
334
334
  `;
335
335
  const e = /* @__PURE__ */ d(() => {
336
- const n = t(this, nt).querySelector(".ng-container-body .ng-part-body");
337
- if (!n) {
336
+ const r = t(this, rt).querySelector(".ng-container-body .ng-part-body");
337
+ if (!r) {
338
338
  setTimeout(e, 10);
339
339
  return;
340
340
  }
341
341
  y(this, k, {
342
- container: n,
342
+ container: r,
343
343
  track: this.querySelector(".ng-scroll-track"),
344
344
  thumb: this.querySelector(".ng-scroll-thumb"),
345
345
  top: this.querySelector(".ng-scroll-top"),
@@ -349,13 +349,13 @@ const es = class es extends HTMLElement {
349
349
  e();
350
350
  }
351
351
  };
352
- st = new WeakMap(), nt = new WeakMap(), bt = new WeakMap(), k = new WeakMap(), Ct = new WeakMap(), kt = new WeakMap(), Zt = new WeakMap(), d(es, "NineTableVScrollBar");
352
+ st = new WeakMap(), rt = new WeakMap(), bt = new WeakMap(), k = new WeakMap(), Ct = new WeakMap(), kt = new WeakMap(), Zt = new WeakMap(), d(es, "NineTableVScrollBar");
353
353
  let Ce = es;
354
354
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Ce);
355
- var rt, S, ot, F, O, K, it, Lt, je, Ve, Jt, Ue, Qt, te, It, Mt, Ht, ee, se, $t, pt, ne, re;
355
+ var nt, S, ot, F, O, K, it, Lt, je, Ve, Jt, Ue, Qt, te, It, Mt, Ht, ee, se, $t, pt, re, ne;
356
356
  const ss = class ss {
357
357
  constructor(s) {
358
- h(this, rt);
358
+ h(this, nt);
359
359
  h(this, S);
360
360
  h(this, ot);
361
361
  h(this, F, /* @__PURE__ */ new Map());
@@ -379,53 +379,53 @@ const ss = class ss {
379
379
  q.log("rowManager.initialize"), y(this, ot, {
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
- }), y(this, O, null), t(this, F).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
383
- const i = t(this, S).querySelector(r);
382
+ }), y(this, O, null), t(this, F).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
383
+ const i = t(this, S).querySelector(n);
384
384
  if (!i) return;
385
385
  const c = i.querySelector(".ng-part-body table");
386
386
  if (!c) return;
387
387
  const l = c.querySelector("tbody.bindable-tbody");
388
388
  if (!l) return;
389
389
  const u = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
390
- t(this, F).set(r, u);
390
+ t(this, F).set(n, u);
391
391
  });
392
- const s = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), n = t(this, S).querySelector(".ng-container-right .ng-part-body"), o = t(this, S).querySelector(".ng-container-body .ng-part-header"), a = t(this, S).querySelector(".ng-container-body .ng-part-footer");
392
+ const s = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), r = t(this, S).querySelector(".ng-container-right .ng-part-body"), o = t(this, S).querySelector(".ng-container-body .ng-part-header"), a = t(this, S).querySelector(".ng-container-body .ng-part-footer");
393
393
  if (s) {
394
394
  t(this, It).call(this), t(this, $t).call(this), t(this, Mt).call(this), t(this, pt).call(this, s.scrollTop);
395
- let r = !1;
395
+ let n = !1;
396
396
  y(this, Qt, s.scrollLeft);
397
397
  const i = /* @__PURE__ */ d((c) => {
398
398
  var u;
399
- if (r) return;
400
- r = !0;
399
+ if (n) return;
400
+ n = !0;
401
401
  const l = c.scrollTop, f = c.scrollLeft;
402
- s && s.scrollTop !== l && (s.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), n && n.scrollTop !== l && (n.scrollTop = l), o && o.scrollLeft !== f && (o.scrollLeft = f), a && a.scrollLeft !== f && (a.scrollLeft = f), t(this, pt).call(this, l), (u = t(this, S).querySelector("nine-table-vscrollbar")) == null || u.refresh(), r = !1;
402
+ s && s.scrollTop !== l && (s.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), r && r.scrollTop !== l && (r.scrollTop = l), o && o.scrollLeft !== f && (o.scrollLeft = f), a && a.scrollLeft !== f && (a.scrollLeft = f), t(this, pt).call(this, l), (u = t(this, S).querySelector("nine-table-vscrollbar")) == null || u.refresh(), n = !1;
403
403
  }, "handleContainerScroll");
404
404
  s == null || s.addEventListener("scroll", (c) => {
405
405
  i(s);
406
- }), [e, n].forEach((c) => {
406
+ }), [e, r].forEach((c) => {
407
407
  c == null || c.addEventListener("scroll", (l) => {
408
- if (r) return;
409
- r = !0;
408
+ if (n) return;
409
+ n = !0;
410
410
  const f = c.scrollTop;
411
- s && s.scrollTop !== f && (s.scrollTop = f), r = !1;
411
+ s && s.scrollTop !== f && (s.scrollTop = f), n = !1;
412
412
  });
413
413
  });
414
414
  }
415
415
  }, "initialize"));
416
416
  h(this, te, /* @__PURE__ */ d((s, e) => {
417
417
  q.log("rowManager.#renderRows");
418
- const n = t(this, F).get(e);
419
- if (!n || n.length === 0) return;
418
+ const r = t(this, F).get(e);
419
+ if (!r || r.length === 0) return;
420
420
  const o = s.querySelector(".ng-part-body tbody.bindable-tbody");
421
421
  if (!o) return;
422
422
  o.querySelectorAll("tr:not(.nodata)").forEach((i) => i.remove());
423
- const a = o.querySelector("tr.nodata"), r = document.createDocumentFragment();
423
+ const a = o.querySelector("tr.nodata"), n = document.createDocumentFragment();
424
424
  for (let i = 0; i < t(this, Lt); i++)
425
- n.forEach((c) => {
426
- r.appendChild(c.cloneNode(!0));
425
+ r.forEach((c) => {
426
+ n.appendChild(c.cloneNode(!0));
427
427
  });
428
- a ? a.before(r) : o.appendChild(r), e === ".ng-container-body" && (t(this, ot).firstTr = o.querySelector("tr:not(.nodata)"));
428
+ a ? a.before(n) : o.appendChild(n), e === ".ng-container-body" && (t(this, ot).firstTr = o.querySelector("tr:not(.nodata)"));
429
429
  }, "#renderRows"));
430
430
  h(this, It, /* @__PURE__ */ d(() => {
431
431
  if (t(this, O) !== null && t(this, O) > 0)
@@ -434,17 +434,17 @@ const ss = class ss {
434
434
  q.log("rowManager.#measureAndCacheHeight");
435
435
  const e = t(this, F).get(".ng-container-body");
436
436
  if (!e || e.length === 0) throw new Error("invalid dom");
437
- const n = s.querySelector("tbody.bindable-tbody");
438
- if (!n) throw new Error("invalid dom");
439
- n.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
440
- const o = n.querySelector("tr.nodata"), a = document.createDocumentFragment();
437
+ const r = s.querySelector("tbody.bindable-tbody");
438
+ if (!r) throw new Error("invalid dom");
439
+ r.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
440
+ const o = r.querySelector("tr.nodata"), a = document.createDocumentFragment();
441
441
  e.forEach((b) => {
442
442
  a.appendChild(b.cloneNode(!0));
443
- }), o ? o.before(a) : n.appendChild(a);
444
- const r = t(this, S), i = r.style.display, c = r.style.visibility, l = r.style.position;
445
- (i === "none" || window.getComputedStyle(r).display === "none") && (r.style.display = "block", r.style.visibility = "hidden", r.style.position = "absolute");
443
+ }), o ? o.before(a) : r.appendChild(a);
444
+ const n = t(this, S), i = n.style.display, c = n.style.visibility, l = n.style.position;
445
+ (i === "none" || window.getComputedStyle(n).display === "none") && (n.style.display = "block", n.style.visibility = "hidden", n.style.position = "absolute");
446
446
  let f = 0;
447
- const u = n.querySelectorAll("tr");
447
+ const u = r.querySelectorAll("tr");
448
448
  return u.forEach((b) => {
449
449
  let g = b.offsetHeight || b.getBoundingClientRect().height;
450
450
  if (g === 0) {
@@ -452,15 +452,15 @@ const ss = class ss {
452
452
  g = parseFloat(p.height) || parseFloat(p.minHeight) || 0;
453
453
  }
454
454
  f += g;
455
- }), u.forEach((b) => b.remove()), r.style.display = i, r.style.visibility = c, r.style.position = l, f <= 0 ? -1 : (y(this, O, f), t(this, Ht).call(this), t(this, O));
455
+ }), u.forEach((b) => b.remove()), n.style.display = i, n.style.visibility = c, n.style.position = l, f <= 0 ? -1 : (y(this, O, f), t(this, Ht).call(this), t(this, O));
456
456
  }, "#measureAndCacheHeight"));
457
457
  h(this, Mt, /* @__PURE__ */ d(() => {
458
458
  q.log("rowManager.#updateVirtualScrollHeight");
459
- const e = (t(this, rt).data.get() || []).length, n = t(this, O), o = e * n;
459
+ const e = (t(this, nt).data.get() || []).length, r = t(this, O), o = e * r;
460
460
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
461
- const r = t(this, S).querySelector(a);
462
- if (!r) return;
463
- const i = r.querySelector(".ng-part-body .ng-virtual-spacer");
461
+ const n = t(this, S).querySelector(a);
462
+ if (!n) return;
463
+ const i = n.querySelector(".ng-part-body .ng-virtual-spacer");
464
464
  i && (i.style.height = `${o}px`);
465
465
  });
466
466
  }, "#updateVirtualScrollHeight"));
@@ -472,9 +472,9 @@ const ss = class ss {
472
472
  }, "#updateRowCount"));
473
473
  h(this, ee, /* @__PURE__ */ d(() => {
474
474
  var i, c, l, f, u, b;
475
- const s = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), n = t(this, S).querySelector(".ng-container-right .ng-part-body table");
475
+ const s = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), r = t(this, S).querySelector(".ng-container-right .ng-part-body table");
476
476
  if (e) {
477
- const g = s ? Array.from(s.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), m = n ? Array.from(n.querySelectorAll("tbody tr")) : [], v = Math.max(g.length, p.length, m.length);
477
+ const g = s ? Array.from(s.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), m = r ? Array.from(r.querySelectorAll("tbody tr")) : [], v = Math.max(g.length, p.length, m.length);
478
478
  for (let x = 0; x < v; x++) {
479
479
  const C = [
480
480
  ((i = g[x]) == null ? void 0 : i.getBoundingClientRect().height) || 0,
@@ -484,9 +484,9 @@ const ss = class ss {
484
484
  R > 0 && (g[x] && (g[x].style.height = `${R}px`), p[x] && (p[x].style.height = `${R}px`), m[x] && (m[x].style.height = `${R}px`));
485
485
  }
486
486
  }
487
- const o = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), a = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), r = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
487
+ const o = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), a = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), n = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
488
488
  if (a) {
489
- const g = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], p = Array.from(a.querySelectorAll("tfoot tr")), m = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], v = Math.max(g.length, p.length, m.length);
489
+ const g = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], p = Array.from(a.querySelectorAll("tfoot tr")), m = n ? Array.from(n.querySelectorAll("tfoot tr")) : [], v = Math.max(g.length, p.length, m.length);
490
490
  for (let x = 0; x < v; x++) {
491
491
  const C = [
492
492
  ((f = g[x]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
@@ -500,13 +500,13 @@ const ss = class ss {
500
500
  h(this, se, /* @__PURE__ */ d(() => {
501
501
  !t(this, S) || !(t(this, S) instanceof HTMLElement) || (y(this, K, new ResizeObserver((s) => {
502
502
  for (const e of s) {
503
- const n = e.target;
504
- if (!n.classList.contains("active")) continue;
503
+ const r = e.target;
504
+ if (!r.classList.contains("active")) continue;
505
505
  const o = e.contentRect.height;
506
506
  if (o > 0) {
507
507
  let a = 0;
508
- const r = n.querySelector(".ng-part-header"), i = n.querySelector(".ng-part-footer");
509
- r && (a += r.offsetHeight), i && (a += i.offsetHeight);
508
+ const n = r.querySelector(".ng-part-header"), i = r.querySelector(".ng-part-footer");
509
+ n && (a += n.offsetHeight), i && (a += i.offsetHeight);
510
510
  const c = Math.max(o - a, 100);
511
511
  t(this, it) !== c && (y(this, it, c), t(this, Ht).call(this), t(this, O) !== null && (t(this, $t).call(this), this.refresh()));
512
512
  }
@@ -517,15 +517,15 @@ const ss = class ss {
517
517
  q.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
518
518
  const e = t(this, S).querySelector(s);
519
519
  e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, te).call(this, e, s);
520
- }), t(this, re).call(this), t(this, ee).call(this);
520
+ }), t(this, ne).call(this), t(this, ee).call(this);
521
521
  }, "#renderAllContainers"));
522
522
  h(this, pt, /* @__PURE__ */ d((s) => {
523
523
  var u, b;
524
524
  const e = t(this, O);
525
525
  if (!e || e <= 0) return;
526
- const n = t(this, rt).data.length;
527
- if (n === 0) return;
528
- const o = ((u = t(this, F).get(".ng-container-body")) == null ? void 0 : u.length) || 1, a = t(this, S).querySelector(".ng-container-body .ng-part-body"), r = Math.max(0, n - Math.floor(a.clientHeight / e)), i = Math.min(r, Math.max(0, Math.floor(s / e)));
526
+ const r = t(this, nt).data.length;
527
+ if (r === 0) return;
528
+ const o = ((u = t(this, F).get(".ng-container-body")) == null ? void 0 : u.length) || 1, a = t(this, S).querySelector(".ng-container-body .ng-part-body"), n = Math.max(0, r - Math.floor(a.clientHeight / e)), i = Math.min(n, Math.max(0, Math.floor(s / e)));
529
529
  let c = Math.floor(i * e);
530
530
  const l = t(this, ot).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
531
531
  (b = t(this, ot)) == null || b.scrollTables.forEach((g) => {
@@ -537,12 +537,12 @@ const ss = class ss {
537
537
  if (!m) return;
538
538
  Array.from(m.querySelectorAll("tr:not(.nodata)")).forEach((x, C) => {
539
539
  const R = i + Math.floor(C / o);
540
- if (R >= n) {
540
+ if (R >= r) {
541
541
  x.style.display = "none";
542
542
  return;
543
543
  }
544
- const _ = t(this, rt).data.get(R);
545
- x.style.display = "", t(this, ne).call(this, x, _, R);
544
+ const _ = t(this, nt).data.get(R);
545
+ x.style.display = "", t(this, re).call(this, x, _, R);
546
546
  });
547
547
  });
548
548
  }, "#handleScroll"));
@@ -560,32 +560,32 @@ const ss = class ss {
560
560
  cell.dataset.row = dataIndex;
561
561
  });
562
562
  }; */
563
- h(this, ne, /* @__PURE__ */ d((s, e, n) => {
564
- s.dataset.row = n, s.data = e, Array.from(s.cells).forEach((o, a) => {
565
- o.dataset.row = n;
566
- const r = Array.from(o.children).find((i) => i.tagName.toLowerCase().startsWith("cell-") || typeof i.refresh == "function");
567
- r && typeof r.refresh == "function" && r.refresh();
563
+ h(this, re, /* @__PURE__ */ d((s, e, r) => {
564
+ s.dataset.row = r, s.data = e, Array.from(s.cells).forEach((o, a) => {
565
+ o.dataset.row = r;
566
+ const n = Array.from(o.children).find((i) => i.tagName.toLowerCase().startsWith("cell-") || typeof i.refresh == "function");
567
+ n && typeof n.refresh == "function" && n.refresh();
568
568
  });
569
569
  }, "#bindRowData"));
570
- h(this, re, /* @__PURE__ */ d(() => {
570
+ h(this, ne, /* @__PURE__ */ d(() => {
571
571
  var c, l, f;
572
572
  q.log("rowManager.#syncHeaderHeights");
573
- const s = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), n = t(this, S).querySelector(".ng-container-right .ng-part-header table");
573
+ const s = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), r = t(this, S).querySelector(".ng-container-right .ng-part-header table");
574
574
  if (!e) return;
575
- const o = s ? Array.from(s.querySelectorAll("tr")) : [], a = Array.from(e.querySelectorAll("tr")), r = n ? Array.from(n.querySelectorAll("tr")) : [], i = Math.max(o.length, a.length, r.length);
575
+ const o = s ? Array.from(s.querySelectorAll("tr")) : [], a = Array.from(e.querySelectorAll("tr")), n = r ? Array.from(r.querySelectorAll("tr")) : [], i = Math.max(o.length, a.length, n.length);
576
576
  for (let u = 0; u < i; u++) {
577
577
  const b = [
578
578
  ((c = o[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
579
579
  ((l = a[u]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
580
- ((f = r[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
580
+ ((f = n[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
581
581
  ], g = Math.max(...b);
582
- g > 0 && (o[u] && (o[u].style.height = `${g}px`), a[u] && (a[u].style.height = `${g}px`), r[u] && (r[u].style.height = `${g}px`));
582
+ g > 0 && (o[u] && (o[u].style.height = `${g}px`), a[u] && (a[u].style.height = `${g}px`), n[u] && (n[u].style.height = `${g}px`));
583
583
  }
584
584
  }, "#syncHeaderHeights"));
585
585
  E(this, "destroy", /* @__PURE__ */ d(() => {
586
586
  t(this, K) && (t(this, K).disconnect(), y(this, K, null));
587
587
  }, "destroy"));
588
- y(this, rt, s.getRootNode().host), y(this, S, s), t(this, se).call(this);
588
+ y(this, nt, s.getRootNode().host), y(this, S, s), t(this, se).call(this);
589
589
  }
590
590
  getRowHeight() {
591
591
  return t(this, O);
@@ -595,7 +595,7 @@ const ss = class ss {
595
595
  return ((e = t(this, F).get(s)) == null ? void 0 : e.length) || 1;
596
596
  }
597
597
  };
598
- rt = new WeakMap(), S = new WeakMap(), ot = new WeakMap(), F = new WeakMap(), O = new WeakMap(), K = new WeakMap(), it = new WeakMap(), Lt = new WeakMap(), je = new WeakMap(), Ve = new WeakMap(), Jt = new WeakMap(), Ue = new WeakMap(), Qt = new WeakMap(), te = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), Ht = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), $t = new WeakMap(), pt = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), d(ss, "RowManager");
598
+ nt = new WeakMap(), S = new WeakMap(), ot = new WeakMap(), F = new WeakMap(), O = new WeakMap(), K = new WeakMap(), it = new WeakMap(), Lt = new WeakMap(), je = new WeakMap(), Ve = new WeakMap(), Jt = new WeakMap(), Ue = new WeakMap(), Qt = new WeakMap(), te = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), Ht = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), $t = new WeakMap(), pt = new WeakMap(), re = new WeakMap(), ne = new WeakMap(), d(ss, "RowManager");
599
599
  let ke = ss;
600
600
  const oe = class oe {
601
601
  /**
@@ -620,7 +620,7 @@ const oe = class oe {
620
620
  }), i.querySelectorAll("tbody td, tfoot td").forEach((l) => {
621
621
  l.setAttribute("tabindex", "0");
622
622
  });
623
- }, "processCellTypes"), n = /* @__PURE__ */ d((i) => {
623
+ }, "processCellTypes"), r = /* @__PURE__ */ d((i) => {
624
624
  if (!i.querySelector("colgroup")) {
625
625
  const c = i.querySelector("tbody tr") || i.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), u = Math.max(Math.floor(i.clientWidth / l), 100);
626
626
  for (let b = 0; b < l; b++) {
@@ -667,7 +667,7 @@ const oe = class oe {
667
667
  });
668
668
  });
669
669
  }, "resetColIndex"), a = s.cloneNode(!0);
670
- return n(a), e(a), o(a, "thead"), o(a, "tbody"), o(a, "tfoot"), Array.from(a.querySelectorAll("colgroup col")).forEach((i, c) => {
670
+ return r(a), e(a), o(a, "thead"), o(a, "tbody"), o(a, "tfoot"), Array.from(a.querySelectorAll("colgroup col")).forEach((i, c) => {
671
671
  const l = i.getAttribute("fixed");
672
672
  l && a.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
673
673
  f.setAttribute("fixed", l);
@@ -679,13 +679,13 @@ const oe = class oe {
679
679
  d(oe, "TableCompiler");
680
680
  let Le = oe;
681
681
  var H, j, U, Et, vs;
682
- const ns = class ns {
682
+ const rs = class rs {
683
683
  constructor(s) {
684
684
  h(this, U);
685
685
  h(this, H);
686
686
  h(this, j, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
687
687
  E(this, "render", /* @__PURE__ */ d(() => {
688
- const { startRow: s, startCol: e, endRow: n, endCol: o } = t(this, j);
688
+ const { startRow: s, startCol: e, endRow: r, endCol: o } = t(this, j);
689
689
  q.log("🎨 [CellSelection.render] Rendering range ->", t(this, j));
690
690
  const a = t(this, H).querySelectorAll(
691
691
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
@@ -698,7 +698,7 @@ const ns = class ns {
698
698
  q.log("⚠️ [CellSelection.render] Range is invalid (< 0), skipping render.");
699
699
  return;
700
700
  }
701
- let r = 0;
701
+ let n = 0;
702
702
  a.forEach((i) => {
703
703
  i.querySelectorAll("tbody tr").forEach((c) => {
704
704
  const { matrixRow: l } = Y(this, U, Et).call(this, c);
@@ -706,22 +706,22 @@ const ns = class ns {
706
706
  const u = parseInt(f.dataset.col, 10);
707
707
  if (isNaN(u)) return;
708
708
  const b = parseInt(f.rowSpan || 1, 10), g = parseInt(f.colSpan || 1, 10), p = l + b - 1, m = u + g - 1;
709
- p >= s && l <= n && m >= e && u <= o && (r++, f.classList.add("selected"), q.log(f, s, e, n, o), l <= s && f.classList.add("selected-top"), p >= n && f.classList.add("selected-bottom"), u <= e && f.classList.add("selected-left"), m >= o && f.classList.add("selected-right"));
709
+ p >= s && l <= r && m >= e && u <= o && (n++, f.classList.add("selected"), q.log(f, s, e, r, o), l <= s && f.classList.add("selected-top"), p >= r && f.classList.add("selected-bottom"), u <= e && f.classList.add("selected-left"), m >= o && f.classList.add("selected-right"));
710
710
  });
711
711
  });
712
- }), q.log(`✨ [CellSelection.render] Total rendered cells marked: ${r}`);
712
+ }), q.log(`✨ [CellSelection.render] Total rendered cells marked: ${n}`);
713
713
  }, "render"));
714
714
  y(this, H, s), Y(this, U, vs).call(this), t(this, H).querySelectorAll(
715
715
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
716
- ).forEach((n) => {
717
- n.addEventListener("scroll", () => {
716
+ ).forEach((r) => {
717
+ r.addEventListener("scroll", () => {
718
718
  t(this, j).startRow >= 0 && t(this, j).startCol >= 0 && this.render();
719
719
  });
720
720
  }), q.log("🎯 [CellSelection] Initialized");
721
721
  }
722
- setRange(s, e, n, o) {
723
- q.log(`πŸ” [CellSelection.setRange] Input -> startRow: ${s}, startCol: ${e}, endRow: ${n}, endCol: ${o}`);
724
- let a = Math.min(s, n), r = Math.max(s, n), i = Math.min(e, o), c = Math.max(e, o);
722
+ setRange(s, e, r, o) {
723
+ q.log(`πŸ” [CellSelection.setRange] Input -> startRow: ${s}, startCol: ${e}, endRow: ${r}, endCol: ${o}`);
724
+ let a = Math.min(s, r), n = Math.max(s, r), i = Math.min(e, o), c = Math.max(e, o);
725
725
  const l = t(this, H).querySelectorAll(
726
726
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
727
727
  );
@@ -735,22 +735,22 @@ const ns = class ns {
735
735
  const v = parseInt(m.dataset.col, 10);
736
736
  if (isNaN(v)) return;
737
737
  const x = parseInt(m.rowSpan || 1, 10), C = parseInt(m.colSpan || 1, 10), R = p + x - 1, _ = v + C - 1;
738
- if (R >= a && p <= r && _ >= i && v <= c) {
739
- const gs = Math.min(a, p), bs = Math.max(r, R), ps = Math.min(i, v), ys = Math.max(c, _);
740
- (gs !== a || bs !== r || ps !== i || ys !== c) && (a = gs, r = bs, i = ps, c = ys, f = !0);
738
+ if (R >= a && p <= n && _ >= i && v <= c) {
739
+ const gs = Math.min(a, p), bs = Math.max(n, R), ps = Math.min(i, v), ys = Math.max(c, _);
740
+ (gs !== a || bs !== n || ps !== i || ys !== c) && (a = gs, n = bs, i = ps, c = ys, f = !0);
741
741
  }
742
742
  });
743
743
  });
744
744
  });
745
- y(this, j, { startRow: a, startCol: i, endRow: r, endCol: c }), q.log("πŸ“¦ [CellSelection.setRange] Final Range ->", t(this, j)), this.render();
745
+ y(this, j, { startRow: a, startCol: i, endRow: n, endCol: c }), q.log("πŸ“¦ [CellSelection.setRange] Final Range ->", t(this, j)), this.render();
746
746
  }
747
747
  };
748
748
  H = new WeakMap(), j = new WeakMap(), U = new WeakSet(), Et = /* @__PURE__ */ d(function(s) {
749
749
  if (!s || s.classList.contains("nodata")) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
750
750
  const e = parseInt(s.dataset.row, 10);
751
751
  if (isNaN(e)) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
752
- const n = s.closest("tbody"), a = Array.from(n.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), r = a.indexOf(s), i = a.length > 0 ? a.length : 1, c = e * i + (r >= 0 ? r : s.sectionRowIndex % i);
753
- return { dataRow: e, subRowIndex: r, matrixRow: c };
752
+ const r = s.closest("tbody"), a = Array.from(r.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), n = a.indexOf(s), i = a.length > 0 ? a.length : 1, c = e * i + (n >= 0 ? n : s.sectionRowIndex % i);
753
+ return { dataRow: e, subRowIndex: n, matrixRow: c };
754
754
  }, "#getMatrixRow"), vs = /* @__PURE__ */ d(function() {
755
755
  const s = t(this, H).querySelector(".ng-container-top");
756
756
  if (!s) {
@@ -759,16 +759,16 @@ H = new WeakMap(), j = new WeakMap(), U = new WeakSet(), Et = /* @__PURE__ */ d(
759
759
  }
760
760
  s.addEventListener("mousedown", (e) => {
761
761
  if (e.button !== 0) return;
762
- const n = e.target.closest("td, th");
763
- if (!n || n.dataset.row === void 0 || n.dataset.col === void 0 || n.closest("tr").classList.contains("nodata")) return;
762
+ const r = e.target.closest("td, th");
763
+ if (!r || r.dataset.row === void 0 || r.dataset.col === void 0 || r.closest("tr").classList.contains("nodata")) return;
764
764
  t(this, H).style.userSelect = "none", t(this, H).style.webkitUserSelect = "none";
765
- const o = n.closest("tr"), { matrixRow: a } = Y(this, U, Et).call(this, o), r = parseInt(n.dataset.col, 10);
765
+ const o = r.closest("tr"), { matrixRow: a } = Y(this, U, Et).call(this, o), n = parseInt(r.dataset.col, 10);
766
766
  if (a < 0) {
767
767
  t(this, H).style.userSelect = "", t(this, H).style.webkitUserSelect = "";
768
768
  return;
769
769
  }
770
- q.log(`πŸ–±οΈ [MouseDown Success] startRow: ${a}, startCol: ${r}`), t(this, H).navigation.currentCell = n;
771
- let i = a, c = r;
770
+ q.log(`πŸ–±οΈ [MouseDown Success] startRow: ${a}, startCol: ${n}`), t(this, H).navigation.currentCell = r;
771
+ let i = a, c = n;
772
772
  const l = /* @__PURE__ */ d((u) => {
773
773
  const b = document.elementFromPoint(u.clientX, u.clientY);
774
774
  let g = b == null ? void 0 : b.closest("td, th");
@@ -784,16 +784,16 @@ H = new WeakMap(), j = new WeakMap(), U = new WeakSet(), Et = /* @__PURE__ */ d(
784
784
  }
785
785
  if (!g || g.dataset.row === void 0 || g.dataset.col === void 0 || g.closest("tr").classList.contains("nodata")) return;
786
786
  const p = g.closest("tr"), { matrixRow: m } = Y(this, U, Et).call(this, p), v = parseInt(g.dataset.col, 10);
787
- m < 0 || i === m && c === v || (i = m, c = v, this.setRange(a, r, m, v));
787
+ m < 0 || i === m && c === v || (i = m, c = v, this.setRange(a, n, m, v));
788
788
  }, "onMouseMove"), f = /* @__PURE__ */ d(() => {
789
789
  q.log("πŸ–±οΈ [MouseUp] Drag ended."), t(this, H).style.userSelect = "", t(this, H).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", f);
790
790
  }, "onMouseUp");
791
791
  document.addEventListener("mousemove", l), document.addEventListener("mouseup", f);
792
792
  });
793
- }, "#initEvents"), d(ns, "CellSelection");
794
- let Ie = ns;
793
+ }, "#initEvents"), d(rs, "CellSelection");
794
+ let Ie = rs;
795
795
  var V, at, Nt, ie, ae, At, Ss, _t, Ot, Dt, lt, le, Rs;
796
- const rs = class rs {
796
+ const ns = class ns {
797
797
  constructor(s) {
798
798
  h(this, At);
799
799
  h(this, V);
@@ -803,16 +803,16 @@ const rs = class rs {
803
803
  h(this, ae, -1);
804
804
  h(this, _t, /* @__PURE__ */ d((s) => {
805
805
  const e = [];
806
- return s.forEach((n) => e.push(...Array.from(n.querySelectorAll("td")))), e.length === 0 ? null : (e.sort((n, o) => parseInt(n.dataset.col, 10) - parseInt(o.dataset.col, 10)), e[e.length - 1]);
806
+ return s.forEach((r) => e.push(...Array.from(r.querySelectorAll("td")))), e.length === 0 ? null : (e.sort((r, o) => parseInt(r.dataset.col, 10) - parseInt(o.dataset.col, 10)), e[e.length - 1]);
807
807
  }, "#getMaxColCell"));
808
808
  h(this, Ot, /* @__PURE__ */ d((s, e) => {
809
- const n = t(this, lt).call(this, s);
810
- if (n.length === 0) return e + 1;
809
+ const r = t(this, lt).call(this, s);
810
+ if (r.length === 0) return e + 1;
811
811
  let o = e + 1;
812
812
  const a = [];
813
- n.forEach((r) => a.push(...Array.from(r.querySelectorAll("td")))), a.sort((r, i) => parseInt(r.dataset.col, 10) - parseInt(i.dataset.col, 10));
814
- for (const r of a) {
815
- const i = parseInt(r.dataset.col, 10), c = parseInt(r.colSpan || 1, 10);
813
+ r.forEach((n) => a.push(...Array.from(n.querySelectorAll("td")))), a.sort((n, i) => parseInt(n.dataset.col, 10) - parseInt(i.dataset.col, 10));
814
+ for (const n of a) {
815
+ const i = parseInt(n.dataset.col, 10), c = parseInt(n.colSpan || 1, 10);
816
816
  if (e >= i && e < i + c) {
817
817
  o = i + c;
818
818
  break;
@@ -821,13 +821,13 @@ const rs = class rs {
821
821
  return o;
822
822
  }, "#getNextCol"));
823
823
  h(this, Dt, /* @__PURE__ */ d((s, e) => {
824
- const n = t(this, lt).call(this, s);
825
- if (n.length === 0) return Math.max(0, e - 1);
824
+ const r = t(this, lt).call(this, s);
825
+ if (r.length === 0) return Math.max(0, e - 1);
826
826
  let o = -1;
827
827
  const a = [];
828
- n.forEach((r) => a.push(...Array.from(r.querySelectorAll("td")))), a.sort((r, i) => parseInt(r.dataset.col, 10) - parseInt(i.dataset.col, 10));
829
- for (const r of a) {
830
- const i = parseInt(r.dataset.col, 10);
828
+ r.forEach((n) => a.push(...Array.from(n.querySelectorAll("td")))), a.sort((n, i) => parseInt(n.dataset.col, 10) - parseInt(i.dataset.col, 10));
829
+ for (const n of a) {
830
+ const i = parseInt(n.dataset.col, 10);
831
831
  if (i < e)
832
832
  o = i;
833
833
  else
@@ -839,40 +839,40 @@ const rs = class rs {
839
839
  h(this, lt, /* @__PURE__ */ d((s) => {
840
840
  const e = t(this, V).querySelectorAll(
841
841
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
842
- ), n = [];
842
+ ), r = [];
843
843
  return e.forEach((o) => {
844
844
  const a = Array.from(o.querySelectorAll("tbody tr:not(.nodata)"));
845
- for (const r of a) {
846
- const i = parseInt(r.dataset.row, 10), c = a.filter((p) => parseInt(p.dataset.row, 10) === i), l = c.length > 0 ? c.length : 1, f = c.indexOf(r), u = i * l + (f >= 0 ? f : 0);
845
+ for (const n of a) {
846
+ const i = parseInt(n.dataset.row, 10), c = a.filter((p) => parseInt(p.dataset.row, 10) === i), l = c.length > 0 ? c.length : 1, f = c.indexOf(n), u = i * l + (f >= 0 ? f : 0);
847
847
  if (u === s) {
848
- n.push(r);
848
+ r.push(n);
849
849
  break;
850
850
  }
851
- const b = Array.from(r.querySelectorAll("td"));
851
+ const b = Array.from(n.querySelectorAll("td"));
852
852
  let g = !1;
853
853
  for (const p of b) {
854
854
  const m = parseInt(p.rowSpan || 1, 10);
855
855
  if (m > 1 && s >= u && s < u + m) {
856
- n.push(r), g = !0;
856
+ r.push(n), g = !0;
857
857
  break;
858
858
  }
859
859
  }
860
860
  if (g) break;
861
861
  }
862
- }), n;
862
+ }), r;
863
863
  }, "#findTargetTrsByMatrix"));
864
864
  // 🎯 rowSpan 및 colSpan 경계λ₯Ό λͺ¨λ‘ μΆ©μ‘±ν•˜λŠ” 셀을 3λΆ„ν•  전체 μ˜μ—­μ—μ„œ 탐색
865
- h(this, le, /* @__PURE__ */ d((s, e, n, o) => {
865
+ h(this, le, /* @__PURE__ */ d((s, e, r, o) => {
866
866
  const a = t(this, V).querySelectorAll(
867
867
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
868
- ), r = o !== void 0 ? o : s * 1 + e;
868
+ ), n = o !== void 0 ? o : s * 1 + e;
869
869
  for (const i of a) {
870
- const c = Array.from(i.querySelectorAll("tbody"));
870
+ const c = Array.from(i.querySelectorAll("tbody tr"));
871
871
  for (const l of c) {
872
872
  const f = parseInt(l.dataset.row, 10), u = c.filter((v) => parseInt(v.dataset.row, 10) === f), b = u.length > 0 ? u.length : 1, g = u.indexOf(l), p = f * b + (g >= 0 ? g : 0), m = Array.from(l.querySelectorAll("td"));
873
873
  for (const v of m) {
874
874
  const x = parseInt(v.dataset.col, 10), C = parseInt(v.colSpan || 1, 10), R = parseInt(v.rowSpan || 1, 10);
875
- if (!isNaN(x) && n >= x && n < x + C && r >= p && r < p + R && window.getComputedStyle(v).display !== "none")
875
+ if (!isNaN(x) && r >= x && r < x + C && n >= p && n < p + R && window.getComputedStyle(v).display !== "none")
876
876
  return v;
877
877
  }
878
878
  }
@@ -887,19 +887,19 @@ const rs = class rs {
887
887
  set currentCell(s) {
888
888
  if (!s) return;
889
889
  y(this, at, s), s.focus({ preventScroll: !0 }), y(this, Nt, s.closest("tr"));
890
- const e = parseInt(s.dataset.row, 10), n = parseInt(s.dataset.col, 10);
891
- if (!isNaN(e) && !isNaN(n)) {
892
- y(this, ie, e), y(this, ae, n);
890
+ const e = parseInt(s.dataset.row, 10), r = parseInt(s.dataset.col, 10);
891
+ if (!isNaN(e) && !isNaN(r)) {
892
+ y(this, ie, e), y(this, ae, r);
893
893
  const o = s.closest("tr"), a = o == null ? void 0 : o.closest("tbody");
894
894
  if (a) {
895
895
  const i = Array.from(a.querySelectorAll("tr:not(.nodata)")).filter((u) => parseInt(u.dataset.row, 10) === e), c = i.length > 0 ? i.length : 1, l = i.indexOf(o), f = e * c + (l >= 0 ? l : 0);
896
- t(this, V).selection.setRange(f, n, f, n);
896
+ t(this, V).selection.setRange(f, r, f, r);
897
897
  }
898
898
  }
899
899
  }
900
900
  moveCell(s) {
901
901
  if (!t(this, at)) return;
902
- const e = t(this, at), n = parseInt(e.dataset.row, 10), o = parseInt(e.dataset.col, 10), a = t(this, V).templateLength, r = parseInt(t(this, Nt).dataset.subrow, 10), i = n * a + (r >= 0 ? r : 0);
902
+ const e = t(this, at), r = parseInt(e.dataset.row, 10), o = parseInt(e.dataset.col, 10), a = t(this, V).templateLength, n = parseInt(t(this, Nt).dataset.subrow, 10), i = r * a + (n >= 0 ? n : 0);
903
903
  let c = i, l = o;
904
904
  switch (s.code) {
905
905
  case "Tab":
@@ -940,8 +940,8 @@ Ss = /* @__PURE__ */ d(function(s) {
940
940
  t(this, V).addEventListener("keydown", (s) => {
941
941
  ["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(s.code) && this.moveCell(s);
942
942
  });
943
- }, "#initEvents"), d(rs, "CellNavigation");
944
- let Me = rs;
943
+ }, "#initEvents"), d(ns, "CellNavigation");
944
+ let Me = ns;
945
945
  var ce, ct, Wt, zt, P, he, de, yt, fe, ue;
946
946
  const qt = class qt extends HTMLElement {
947
947
  constructor() {
@@ -961,10 +961,10 @@ const qt = class qt extends HTMLElement {
961
961
  t(this, P).table = Le.compile(e), t(this, P).tbody = {
962
962
  tr: t(this, P).table.querySelectorAll("tbody tr")
963
963
  }, t(this, he).call(this), t(this, de).call(this);
964
- const n = this.querySelector(".ng-container-body .ng-part-header"), o = this.querySelector(".ng-container-body .ng-part-footer"), a = this.querySelector(".ng-nodata-overlay");
965
- n && a && (a.style.top = `${n.offsetHeight}px`), o && a && (a.style.bottom = `${o.offsetHeight}px`), t(this, ct).initialize(), setTimeout(() => {
966
- var r;
967
- (r = this.querySelector("nine-table-hscrollbar")) == null || r.refresh();
964
+ const r = this.querySelector(".ng-container-body .ng-part-header"), o = this.querySelector(".ng-container-body .ng-part-footer"), a = this.querySelector(".ng-nodata-overlay");
965
+ r && a && (a.style.top = `${r.offsetHeight}px`), o && a && (a.style.bottom = `${o.offsetHeight}px`), t(this, ct).initialize(), setTimeout(() => {
966
+ var n;
967
+ (n = this.querySelector("nine-table-hscrollbar")) == null || n.refresh();
968
968
  }, 0);
969
969
  }, "generate"));
970
970
  h(this, he, /* @__PURE__ */ d(() => {
@@ -972,37 +972,37 @@ const qt = class qt extends HTMLElement {
972
972
  { selector: ".ng-container-body", type: null },
973
973
  { selector: ".ng-container-left", type: "left" },
974
974
  { selector: ".ng-container-right", type: "right" }
975
- ].forEach(({ selector: n, type: o }) => {
976
- var a, r, i;
977
- (a = this.querySelector(`${n} .ng-part-header`)) == null || a.appendChild(t(this, yt).call(this, t(this, P).table, o, "header")), (r = this.querySelector(`${n} .ng-virtual-spacer`)) == null || r.before(t(this, yt).call(this, t(this, P).table, o, "body")), (i = this.querySelector(`${n} .ng-part-footer`)) == null || i.appendChild(t(this, yt).call(this, t(this, P).table, o, "footer"));
975
+ ].forEach(({ selector: r, type: o }) => {
976
+ var a, n, i;
977
+ (a = this.querySelector(`${r} .ng-part-header`)) == null || a.appendChild(t(this, yt).call(this, t(this, P).table, o, "header")), (n = this.querySelector(`${r} .ng-virtual-spacer`)) == null || n.before(t(this, yt).call(this, t(this, P).table, o, "body")), (i = this.querySelector(`${r} .ng-part-footer`)) == null || i.appendChild(t(this, yt).call(this, t(this, P).table, o, "footer"));
978
978
  });
979
979
  }, "#renderSplitContainers"));
980
980
  h(this, de, /* @__PURE__ */ d(() => {
981
981
  ["left", "right", "body"].forEach((e) => {
982
- const n = this.querySelector(`.ng-container-${e}`), o = n == null ? void 0 : n.querySelectorAll("table");
983
- if (!n || !o || o.length === 0) return;
982
+ const r = this.querySelector(`.ng-container-${e}`), o = r == null ? void 0 : r.querySelectorAll("table");
983
+ if (!r || !o || o.length === 0) return;
984
984
  let a = 0;
985
- o[0].querySelectorAll("col").forEach((r) => {
986
- const i = parseInt(r.getAttribute("width"), 10);
985
+ o[0].querySelectorAll("col").forEach((n) => {
986
+ const i = parseInt(n.getAttribute("width"), 10);
987
987
  isNaN(i) || (a += i);
988
- }), e === "body" ? (n.style.flex = "1", o.forEach((r) => {
989
- r.style.width = `${a}px`, r.style.minWidth = `${a}px`;
990
- })) : (n.style.flex = `0 0 ${a}px`, n.style.width = `${a}px`, o.forEach((r) => {
991
- r.style.width = `${a}px`, r.style.minWidth = `${a}px`;
988
+ }), e === "body" ? (r.style.flex = "1", o.forEach((n) => {
989
+ n.style.width = `${a}px`, n.style.minWidth = `${a}px`;
990
+ })) : (r.style.flex = `0 0 ${a}px`, r.style.width = `${a}px`, o.forEach((n) => {
991
+ n.style.width = `${a}px`, n.style.minWidth = `${a}px`;
992
992
  }));
993
993
  });
994
994
  }, "#updateContainerWidths"));
995
- h(this, yt, /* @__PURE__ */ d((e, n, o) => {
996
- const a = e.cloneNode(!0), r = a.querySelector("thead"), i = a.querySelector("tbody"), c = a.querySelector("tfoot");
995
+ h(this, yt, /* @__PURE__ */ d((e, r, o) => {
996
+ const a = e.cloneNode(!0), n = a.querySelector("thead"), i = a.querySelector("tbody"), c = a.querySelector("tfoot");
997
997
  if (o === "header") {
998
998
  if (i && i.remove(), c && c.remove(), e.querySelector("tbody")) {
999
999
  const f = document.createElement("tbody");
1000
1000
  f.className = "fixed-tbody", a.appendChild(f);
1001
1001
  }
1002
- } else o === "body" ? (r && r.remove(), c && c.remove(), i && (i.className = "bindable-tbody")) : o === "footer" && (r && r.remove(), i && i.remove());
1003
- return n === "left" ? a.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
1002
+ } else o === "body" ? (n && n.remove(), c && c.remove(), i && (i.className = "bindable-tbody")) : o === "footer" && (n && n.remove(), i && i.remove());
1003
+ return r === "left" ? a.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
1004
1004
  l.getAttribute("fixed") !== "left" && l.remove();
1005
- }) : n === "right" ? a.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
1005
+ }) : r === "right" ? a.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
1006
1006
  l.getAttribute("fixed") !== "right" && l.remove();
1007
1007
  }) : a.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
1008
1008
  l.remove();
@@ -1010,12 +1010,12 @@ const qt = class qt extends HTMLElement {
1010
1010
  }, "#createSplitTable"));
1011
1011
  E(this, "getRowHeight", /* @__PURE__ */ d(() => t(this, ct).getRowHeight(), "getRowHeight"));
1012
1012
  E(this, "scrollToX", /* @__PURE__ */ d((e) => {
1013
- const n = this.querySelector(".ng-container-body .ng-part-body");
1014
- n && (n.scrollLeft = e);
1013
+ const r = this.querySelector(".ng-container-body .ng-part-body");
1014
+ r && (r.scrollLeft = e);
1015
1015
  }, "scrollToX"));
1016
1016
  E(this, "scrollToY", /* @__PURE__ */ d((e) => {
1017
- const n = this.querySelector(".ng-container-body .ng-part-body");
1018
- n && (n.scrollTop = e);
1017
+ const r = this.querySelector(".ng-container-body .ng-part-body");
1018
+ r && (r.scrollTop = e);
1019
1019
  }, "scrollToY"));
1020
1020
  h(this, fe, /* @__PURE__ */ d(() => {
1021
1021
  t(this, ue).call(this), y(this, Wt, new Ie(this)), y(this, zt, new Me(this));
@@ -1249,13 +1249,13 @@ const os = class os extends HTMLElement {
1249
1249
  super();
1250
1250
  h(this, ge, /* @__PURE__ */ d(() => {
1251
1251
  var e;
1252
- (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (n) => {
1253
- var r;
1254
- const o = n.ctrlKey || n.metaKey || n.shiftKey, a = parseInt((r = n.target.closest(".nine-tab-item")) == null ? void 0 : r.dataset.index, 10);
1252
+ (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (r) => {
1253
+ var n;
1254
+ const o = r.ctrlKey || r.metaKey || r.shiftKey, a = parseInt((n = r.target.closest(".nine-tab-item")) == null ? void 0 : n.dataset.index, 10);
1255
1255
  t(this, Bt).call(this, a, o);
1256
1256
  }), t(this, Bt).call(this, 0, !1);
1257
1257
  }, "#init"));
1258
- h(this, Bt, /* @__PURE__ */ d((e, n = !1) => {
1258
+ h(this, Bt, /* @__PURE__ */ d((e, r = !1) => {
1259
1259
  const o = /* @__PURE__ */ d(() => {
1260
1260
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
1261
1261
  Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
@@ -1264,9 +1264,9 @@ const os = class os extends HTMLElement {
1264
1264
  const p = parseInt(g.getAttribute("data-index"), 10), m = this.querySelector(`nine-splitter[data-split-index="${p}"]`), v = f[p + 1];
1265
1265
  m && v && v.classList.contains("active") && m.style.setProperty("display", "flex");
1266
1266
  });
1267
- }, "updateSplitters"), a = this.querySelector(".nine-tab-bar"), r = this.querySelector("nine-table-sheets-body"), i = a.querySelectorAll(".nine-tab-item"), c = r.querySelectorAll("nine-table-sheet");
1267
+ }, "updateSplitters"), a = this.querySelector(".nine-tab-bar"), n = this.querySelector("nine-table-sheets-body"), i = a.querySelectorAll(".nine-tab-item"), c = n.querySelectorAll("nine-table-sheet");
1268
1268
  if (!i[e]) return;
1269
- if (!n)
1269
+ if (!r)
1270
1270
  i.forEach((f, u) => {
1271
1271
  f.classList.toggle("active", u === e);
1272
1272
  }), c.forEach((f, u) => {
@@ -1278,10 +1278,10 @@ const os = class os extends HTMLElement {
1278
1278
  if (f.classList.contains("active") && u.length <= 1)
1279
1279
  return;
1280
1280
  f.classList.toggle("active");
1281
- const b = r.querySelector(`nine-table-sheet[data-index="${e}"]`);
1281
+ const b = n.querySelector(`nine-table-sheet[data-index="${e}"]`);
1282
1282
  b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
1283
1283
  }
1284
- const l = r.querySelectorAll("nine-table-sheet.active");
1284
+ const l = n.querySelectorAll("nine-table-sheet.active");
1285
1285
  l == null || l.forEach((f) => {
1286
1286
  f.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
1287
1287
  }), o();
@@ -1308,14 +1308,14 @@ const is = class is {
1308
1308
  var c, l;
1309
1309
  const s = Array.from(t(this, N).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1310
1310
  if (s.length === 0) return;
1311
- const e = parseInt(t(this, N).getAttribute("max-display-row"), 10) || 10, n = Math.max(...s.map((f) => f.getRowHeight())), o = (c = t(this, N).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, a = (l = t(this, N).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, r = Xt.SCROLLBAR_SIZE, i = e * n + o + a + r;
1311
+ const e = parseInt(t(this, N).getAttribute("max-display-row"), 10) || 10, r = Math.max(...s.map((f) => f.getRowHeight())), o = (c = t(this, N).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, a = (l = t(this, N).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, n = Xt.SCROLLBAR_SIZE, i = e * r + o + a + n;
1312
1312
  t(this, N).style.height = `${i}px`;
1313
1313
  }, "#applyAutoHeight"));
1314
1314
  h(this, pe, /* @__PURE__ */ d(() => {
1315
- const e = Array.from(t(this, N).children).filter((c) => c.tagName === "TABLE"), n = t(this, N).getAttribute("auto-height") === "true", o = e.length, a = e.map((c, l) => {
1315
+ const e = Array.from(t(this, N).children).filter((c) => c.tagName === "TABLE"), r = t(this, N).getAttribute("auto-height") === "true", o = e.length, a = e.map((c, l) => {
1316
1316
  const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < o - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
1317
1317
  return u + b;
1318
- }).join(""), r = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1318
+ }).join(""), n = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1319
1319
  t(this, N).shadowRoot.innerHTML = `
1320
1320
  <style>
1321
1321
  :host {
@@ -1323,7 +1323,7 @@ const is = class is {
1323
1323
  flex-direction: column;
1324
1324
  position: relative;
1325
1325
  overflow: hidden;
1326
- height: ${n ? "auto" : "100%"};
1326
+ height: ${r ? "auto" : "100%"};
1327
1327
  background: #fff;
1328
1328
  }
1329
1329
 
@@ -1429,7 +1429,7 @@ const is = class is {
1429
1429
  <nine-table-sheets>
1430
1430
  <nine-table-sheets-body>${a}</nine-table-sheets-body>
1431
1431
  <nine-table-sheets-footer>
1432
- <div class="nine-tab-bar">${r}</div>
1432
+ <div class="nine-tab-bar">${n}</div>
1433
1433
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
1434
1434
  </nine-table-sheets-footer>
1435
1435
  </nine-table-sheets>
@@ -1440,7 +1440,7 @@ const is = class is {
1440
1440
  const i = t(this, N).shadowRoot.querySelectorAll("nine-table-sheet");
1441
1441
  i == null || i.forEach((c, l) => {
1442
1442
  e[l] && setTimeout(() => {
1443
- c.generate(e[l]), n && t(this, Pt).call(this);
1443
+ c.generate(e[l]), r && t(this, Pt).call(this);
1444
1444
  });
1445
1445
  });
1446
1446
  }, "#render"));
@@ -1480,8 +1480,8 @@ const z = class z {
1480
1480
  y(this, G, []);
1481
1481
  const s = t(this, D).template || [];
1482
1482
  Array.from(s).forEach((e) => {
1483
- var n;
1484
- t(this, G).push(((n = e.getBoundingClientRect) == null ? void 0 : n.call(e).height) || 24);
1483
+ var r;
1484
+ t(this, G).push(((r = e.getBoundingClientRect) == null ? void 0 : r.call(e).height) || 24);
1485
1485
  }), (t(this, L).rawRecords || []).forEach((e) => {
1486
1486
  e.__ng || (e.__ng = t(this, jt).call(this)), e.__ng.height = t(this, G).slice();
1487
1487
  });
@@ -1494,16 +1494,16 @@ const z = class z {
1494
1494
  }, "#invalidate"));
1495
1495
  E(this, "get", /* @__PURE__ */ d((s, e) => {
1496
1496
  var a;
1497
- const n = this.getValidData();
1498
- if (!n || n.length <= 0) return;
1499
- if (s == null) return t(this, wt).call(this, n);
1500
- if (s < 0 || s >= n.length) return null;
1497
+ const r = this.getValidData();
1498
+ if (!r || r.length <= 0) return;
1499
+ if (s == null) return t(this, wt).call(this, r);
1500
+ if (s < 0 || s >= r.length) return null;
1501
1501
  const o = typeof ((a = t(this, D).fields) == null ? void 0 : a.get) == "function" ? t(this, D).fields.get() : [];
1502
1502
  if (e != null) {
1503
- const r = o.indexOf(e);
1504
- return r >= 0 ? n[s].v[r] : null;
1503
+ const n = o.indexOf(e);
1504
+ return n >= 0 ? r[s].v[n] : null;
1505
1505
  }
1506
- return t(this, wt).call(this, n[s]);
1506
+ return t(this, wt).call(this, r[s]);
1507
1507
  }, "get"));
1508
1508
  E(this, "set", /* @__PURE__ */ d((s) => {
1509
1509
  this.clear(), this.add(s, !1), t(this, ht).call(this);
@@ -1527,47 +1527,47 @@ const z = class z {
1527
1527
  h(this, xe, /* @__PURE__ */ d((s) => {
1528
1528
  var o;
1529
1529
  Array.isArray(s) || (s = [s]);
1530
- const e = typeof ((o = t(this, D).fields) == null ? void 0 : o.get) == "function" ? t(this, D).fields.get() : Object.keys(s[0] || {}), n = [];
1530
+ const e = typeof ((o = t(this, D).fields) == null ? void 0 : o.get) == "function" ? t(this, D).fields.get() : Object.keys(s[0] || {}), r = [];
1531
1531
  return s.forEach((a) => {
1532
- const r = { v: [] };
1532
+ const n = { v: [] };
1533
1533
  e.forEach((i) => {
1534
- r.v.push(a[i] !== void 0 && a[i] !== null ? a[i] : "");
1535
- }), n.push(r);
1536
- }), n;
1534
+ n.v.push(a[i] !== void 0 && a[i] !== null ? a[i] : "");
1535
+ }), r.push(n);
1536
+ }), r;
1537
1537
  }, "#json2Array"));
1538
1538
  h(this, we, /* @__PURE__ */ d((s) => (Array.isArray(s) || (s = [s]), s.forEach((e) => {
1539
1539
  e.__ng = t(this, jt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = z.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1540
1540
  }), s), "#defaultInsert"));
1541
1541
  E(this, "add", /* @__PURE__ */ d((s, e = !0) => {
1542
1542
  s === void 0 && (s = {});
1543
- const n = t(this, xe).call(this, s);
1544
- t(this, L).rawRecords = t(this, L).rawRecords.concat(t(this, we).call(this, n)), this.resetRecords();
1543
+ const r = t(this, xe).call(this, s);
1544
+ t(this, L).rawRecords = t(this, L).rawRecords.concat(t(this, we).call(this, r)), this.resetRecords();
1545
1545
  const o = this.count() - 1;
1546
- return e || n.forEach((a, r) => {
1547
- const i = t(this, L).rawRecords[o - r];
1546
+ return e || r.forEach((a, n) => {
1547
+ const i = t(this, L).rawRecords[o - n];
1548
1548
  i && (i.__ng.rowState = z.ROW_STATE.EMPTY);
1549
1549
  }), t(this, ht).call(this), o;
1550
1550
  }, "add"));
1551
1551
  E(this, "delete", /* @__PURE__ */ d((s) => {
1552
1552
  let e = [];
1553
- Array.isArray(s) ? e = s : typeof s > "u" ? e = [t(this, L).host.row.at] : e = [parseInt(s, 10)], e.sort((n, o) => o - n).forEach((n) => {
1554
- if (t(this, W)[n]) {
1555
- const o = t(this, W)[n].__ng.rowid;
1556
- t(this, W)[n].__ng.rowState === z.ROW_STATE.INSERT ? t(this, L).rawRecords = t(this, L).rawRecords.filter((a) => a.__ng.rowid !== o) : t(this, L).rawRecords.forEach((a) => {
1553
+ Array.isArray(s) ? e = s : typeof s > "u" ? e = [t(this, L).host.row.at] : e = [parseInt(s, 10)], e.sort((r, o) => o - r).forEach((r) => {
1554
+ if (t(this, W)[r]) {
1555
+ const o = t(this, W)[r].__ng.rowid;
1556
+ t(this, W)[r].__ng.rowState === z.ROW_STATE.INSERT ? t(this, L).rawRecords = t(this, L).rawRecords.filter((a) => a.__ng.rowid !== o) : t(this, L).rawRecords.forEach((a) => {
1557
1557
  a.__ng.rowid === o && (a.__ng.deleted = !0, a.__ng.rowState = z.ROW_STATE.DELETE);
1558
1558
  });
1559
1559
  }
1560
1560
  }), this.resetRecords(), t(this, ht).call(this);
1561
1561
  }, "delete"));
1562
- E(this, "setValue", /* @__PURE__ */ d((s, e, n) => {
1562
+ E(this, "setValue", /* @__PURE__ */ d((s, e, r) => {
1563
1563
  var c;
1564
1564
  s = parseInt(s, 10);
1565
1565
  const a = (typeof ((c = t(this, D).fields) == null ? void 0 : c.get) == "function" ? t(this, D).fields.get() : []).indexOf(e);
1566
1566
  if (a < 0) return;
1567
- const r = this.getValidData()[s];
1568
- if (!r) return;
1569
- const i = r.v[a];
1570
- i !== n && r.__ng.rowState !== z.ROW_STATE.INSERT && (r.__ng.o.hasOwnProperty(e) || (r.__ng.o[e] = i), r.__ng.rowState = z.ROW_STATE.UPDATE), r.v[a] = n;
1567
+ const n = this.getValidData()[s];
1568
+ if (!n) return;
1569
+ const i = n.v[a];
1570
+ i !== r && n.__ng.rowState !== z.ROW_STATE.INSERT && (n.__ng.o.hasOwnProperty(e) || (n.__ng.o[e] = i), n.__ng.rowState = z.ROW_STATE.UPDATE), n.v[a] = r;
1571
1571
  }, "setValue"));
1572
1572
  E(this, "resetRecords", /* @__PURE__ */ d(() => {
1573
1573
  y(this, xt, t(this, L).rawRecords.filter((s) => !s.__ng.deleted)), y(this, W, t(this, L).rawRecords.filter((s) => !s.__ng.deleted && !s.__ng.filtered)), t(this, L).rawRecords.forEach((s, e) => {
@@ -1578,9 +1578,9 @@ const z = class z {
1578
1578
  }, "resetRecords"));
1579
1579
  E(this, "getValidData", /* @__PURE__ */ d(() => (t(this, W).length === 0 && t(this, L).rawRecords.length > 0 && this.resetRecords(), t(this, W)), "getValidData"));
1580
1580
  h(this, wt, /* @__PURE__ */ d((s) => {
1581
- var r;
1581
+ var n;
1582
1582
  if (!s) return s;
1583
- const e = !Array.isArray(s), n = e ? [s] : s, o = typeof ((r = t(this, D).fields) == null ? void 0 : r.get) == "function" ? t(this, D).fields.get() : [], a = n.filter((i) => !i.__ng.deleted).map((i) => {
1583
+ const e = !Array.isArray(s), r = e ? [s] : s, o = typeof ((n = t(this, D).fields) == null ? void 0 : n.get) == "function" ? t(this, D).fields.get() : [], a = r.filter((i) => !i.__ng.deleted).map((i) => {
1584
1584
  const c = {};
1585
1585
  return o.forEach((l, f) => {
1586
1586
  c[l] = i.v ? i.v[f] : i[l];
@@ -1630,13 +1630,13 @@ const ls = class ls {
1630
1630
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1631
1631
  }, this.getRowState = (e) => {
1632
1632
  var o, a;
1633
- const n = parseInt(e, 10);
1634
- if (!(n >= this.data.count()))
1635
- return (a = (o = this.data.getValidData()[n]) == null ? void 0 : o.__ng) == null ? void 0 : a.rowState;
1633
+ const r = parseInt(e, 10);
1634
+ if (!(r >= this.data.count()))
1635
+ return (a = (o = this.data.getValidData()[r]) == null ? void 0 : o.__ng) == null ? void 0 : a.rowState;
1636
1636
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1637
1637
  this.row.at = e;
1638
- }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, n) => this.data.get(e, n), this.setColumn = (e, n, o) => {
1639
- e = parseInt(e, 10), this.data.setValue(e, n, o);
1638
+ }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, r) => this.data.get(e, r), this.setColumn = (e, r, o) => {
1639
+ e = parseInt(e, 10), this.data.setValue(e, r, o);
1640
1640
  }, this.setDataSource([]);
1641
1641
  }
1642
1642
  };
@@ -1649,41 +1649,41 @@ const cs = class cs {
1649
1649
  h(this, vt);
1650
1650
  h(this, M, []);
1651
1651
  E(this, "add", /* @__PURE__ */ d((s, e = "string") => {
1652
- s.forEach((n) => {
1653
- t(this, M).some((o) => o.name === n) || t(this, M).push({ name: n, type: e });
1652
+ s.forEach((r) => {
1653
+ t(this, M).some((o) => o.name === r) || t(this, M).push({ name: r, type: e });
1654
1654
  }), t(this, Vt).call(this);
1655
1655
  }, "add"));
1656
1656
  h(this, Vt, /* @__PURE__ */ d(() => {
1657
1657
  const s = /* @__PURE__ */ new Map();
1658
1658
  t(this, M).forEach((e) => {
1659
1659
  s.set(e.name, e.type);
1660
- }), y(this, M, Array.from(s, ([e, n]) => ({ name: e, type: n }))), y(this, M, t(this, M).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, M).sort((e, n) => e.name.length < n.name.length ? 1 : -1);
1660
+ }), y(this, M, Array.from(s, ([e, r]) => ({ name: e, type: r }))), y(this, M, t(this, M).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, M).sort((e, r) => e.name.length < r.name.length ? 1 : -1);
1661
1661
  }, "#adjust"));
1662
1662
  h(this, ve, /* @__PURE__ */ d(() => {
1663
1663
  y(this, M, []), q.log(t(this, vt).querySelectorAll("table"));
1664
1664
  const s = Array.from(t(this, vt).querySelectorAll("table"));
1665
1665
  if (!(!s || s.length === 0)) {
1666
1666
  for (const e of s)
1667
- q.log(e), $("[data-bind]", e).each((n, o) => {
1668
- const a = o.dataset.bind, r = o.getAttribute("data-type") || "string";
1669
- a && t(this, M).push({ name: a, type: r });
1670
- }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((n) => {
1671
- $(`[${n}]`, e).each((o, a) => {
1672
- var r = a.getAttribute(n);
1673
- if (r.indexOf("data.") < 0) {
1674
- const i = r.search(/[(]/g);
1667
+ q.log(e), $("[data-bind]", e).each((r, o) => {
1668
+ const a = o.dataset.bind, n = o.getAttribute("data-type") || "string";
1669
+ a && t(this, M).push({ name: a, type: n });
1670
+ }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((r) => {
1671
+ $(`[${r}]`, e).each((o, a) => {
1672
+ var n = a.getAttribute(r);
1673
+ if (n.indexOf("data.") < 0) {
1674
+ const i = n.search(/[(]/g);
1675
1675
  if (i > 0)
1676
1676
  try {
1677
- r = String(window[r.substring(0, i).trim()]);
1677
+ n = String(window[n.substring(0, i).trim()]);
1678
1678
  } catch {
1679
- r = "";
1679
+ n = "";
1680
1680
  }
1681
1681
  }
1682
- r.split("data.").forEach((i) => {
1682
+ n.split("data.").forEach((i) => {
1683
1683
  if (i.trim() != "") {
1684
1684
  const c = i.search(/[^_A-Za-z0-9]/g);
1685
1685
  let l = "";
1686
- c >= 0 ? l = i.substring(0, c) : r.startsWith("data.") && (l = i.replace("data.", "")), l && t(this, M).push({ name: l, type: "string" });
1686
+ c >= 0 ? l = i.substring(0, c) : n.startsWith("data.") && (l = i.replace("data.", "")), l && t(this, M).push({ name: l, type: "string" });
1687
1687
  }
1688
1688
  });
1689
1689
  });
@@ -1703,7 +1703,7 @@ const cs = class cs {
1703
1703
  }
1704
1704
  // 🎯 νŠΉμ • ν•„λ“œμ˜ 데이터 νƒ€μž… 쑰회
1705
1705
  getType(s) {
1706
- const e = t(this, M).find((n) => n.name === s);
1706
+ const e = t(this, M).find((r) => r.name === s);
1707
1707
  return e ? e.type : "string";
1708
1708
  }
1709
1709
  indexOf(s) {
@@ -1776,15 +1776,15 @@ const ds = class ds extends ze {
1776
1776
  E(this, "getDisplayText", /* @__PURE__ */ d((e) => {
1777
1777
  if (t(this, w))
1778
1778
  if (t(this, w).closest("tbody")) {
1779
- const n = t(this, w).closest("tr").data, o = parseInt(t(this, w).dataset.row);
1780
- if (!n) return "";
1779
+ const r = t(this, w).closest("tr").data, o = parseInt(t(this, w).dataset.row);
1780
+ if (!r) return "";
1781
1781
  if (ninegrid.isNull(t(this, w).dataset.expr)) {
1782
1782
  if (!ninegrid.isNull(t(this, w).dataset.bind))
1783
- return n[t(this, w).dataset.bind] || ninegrid.nvl(e, "");
1783
+ return r[t(this, w).dataset.bind] || ninegrid.nvl(e, "");
1784
1784
  } else try {
1785
- return this.getExprValue(t(this, w).dataset.expr, n, o, t(this, w));
1785
+ return this.getExprValue(t(this, w).dataset.expr, r, o, t(this, w));
1786
1786
  } catch {
1787
- console.error(t(this, w).dataset.expr, n, t(this, w).dataset.row);
1787
+ console.error(t(this, w).dataset.expr, r, t(this, w).dataset.row);
1788
1788
  }
1789
1789
  return ninegrid.nvl(e, "");
1790
1790
  } else
@@ -1797,18 +1797,18 @@ const ds = class ds extends ze {
1797
1797
  if (!(!t(this, I) || !t(this, I).template || !t(this, w).closest("tbody.bindable"))) {
1798
1798
  var e = ninegrid.j.querySelectorAll(t(this, w)).attr("suppress");
1799
1799
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1800
- var n = t(this, w).closest("tr"), o = [];
1801
- $("th,td", n).each((x, C) => {
1800
+ var r = t(this, w).closest("tr"), o = [];
1801
+ $("th,td", r).each((x, C) => {
1802
1802
  var R = ninegrid.j.querySelectorAll(C).attr("suppress");
1803
1803
  R && C.dataset.row && (R = parseInt(R), !isNaN(R) && R <= e && o.push(R));
1804
1804
  }), o.sort();
1805
1805
  var a = !1;
1806
- if (parseInt(n.sectionRowIndex / t(this, I).template.length) > 0)
1807
- for (var r of o) {
1808
- if (r > e) break;
1806
+ if (parseInt(r.sectionRowIndex / t(this, I).template.length) > 0)
1807
+ for (var n of o) {
1808
+ if (n > e) break;
1809
1809
  var i = parseInt(t(this, w).dataset.row), c = i - 1, l = t(this, w).closest("tr").data, f = t(this, I).data.get(c);
1810
1810
  t(this, w).dataset.matrixRow;
1811
- var u = t(this, I).body.querySelector(`tbody.bindable [suppress="${r}"][data-matrix-row="${t(this, w).dataset.matrixRow}"]`), b = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, i) : l[u.dataset.bind], g = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, c) : f[u.dataset.bind];
1811
+ var u = t(this, I).body.querySelector(`tbody.bindable [suppress="${n}"][data-matrix-row="${t(this, w).dataset.matrixRow}"]`), b = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, i) : l[u.dataset.bind], g = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, c) : f[u.dataset.bind];
1812
1812
  if (b != g) {
1813
1813
  a = !0;
1814
1814
  break;
@@ -1822,12 +1822,12 @@ const ds = class ds extends ze {
1822
1822
  }
1823
1823
  }
1824
1824
  }, "#resetSuppress"));
1825
- E(this, "getExprValue", /* @__PURE__ */ d((e, n, o, a) => {
1825
+ E(this, "getExprValue", /* @__PURE__ */ d((e, r, o, a) => {
1826
1826
  if (typeof e < "u")
1827
1827
  try {
1828
1828
  o = parseInt(o);
1829
- const r = e.replace("()", "");
1830
- return t(this, I)[r] ? t(this, I)[r].call(this, n, o, t(this, w)) : t(this, I).exprFunction(e).call(this, n, o, t(this, I).data);
1829
+ const n = e.replace("()", "");
1830
+ return t(this, I)[n] ? t(this, I)[n].call(this, r, o, t(this, w)) : t(this, I).exprFunction(e).call(this, r, o, t(this, I).data);
1831
1831
  } catch {
1832
1832
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1833
1833
  }
@@ -1843,9 +1843,9 @@ const ds = class ds extends ze {
1843
1843
  return e ?? "";
1844
1844
  }
1845
1845
  set value(e) {
1846
- var n = parseInt(t(this, w).dataset.row);
1846
+ var r = parseInt(t(this, w).dataset.row);
1847
1847
  const o = this.getAttribute("update-row-state") != "false";
1848
- n < 0 ? t(this, I).data.setValueNF(parseInt(t(this, w).dataset.index), t(this, w).dataset.bind, e, o) : t(this, I).data.setValue(n, t(this, w).dataset.bind, e, o);
1848
+ r < 0 ? t(this, I).data.setValueNF(parseInt(t(this, w).dataset.index), t(this, w).dataset.bind, e, o) : t(this, I).data.setValue(r, t(this, w).dataset.bind, e, o);
1849
1849
  }
1850
1850
  get row() {
1851
1851
  return parseInt(t(this, w).dataset.row);
@@ -1922,10 +1922,10 @@ const us = class us extends Pe {
1922
1922
  if (t(this, ut) == "number") {
1923
1923
  let a = [];
1924
1924
  if (t(this, Z) && Number(t(this, Z)) > 0 && a.push("."), t(this, Rt) && Number(t(this, Rt)) >= 0 && a.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !a.includes(e.key) && e.preventDefault(), t(this, Z) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1925
- var n = e.target.value, o = n.indexOf(".");
1925
+ var r = e.target.value, o = r.indexOf(".");
1926
1926
  if (o >= 0) {
1927
- var n = n.substr(o + 1, n.length);
1928
- n.length >= Number(t(this, Z)) && e.preventDefault();
1927
+ var r = r.substr(o + 1, r.length);
1928
+ r.length >= Number(t(this, Z)) && e.preventDefault();
1929
1929
  }
1930
1930
  }
1931
1931
  }
@@ -1935,8 +1935,8 @@ const us = class us extends Pe {
1935
1935
  if (this.applyBaseStyle(), y(this, ut, this.getAttribute("type") || "text"), y(this, St, this.getAttribute("maxbyte")), y(this, Rt, this.getAttribute("min")), y(this, Ae, this.getAttribute("max")), y(this, Z, this.getAttribute("scale")), !["text", "number"].includes(t(this, ut))) throw `invalid type : ${t(this, ut)}`;
1936
1936
  }
1937
1937
  connectedCallback() {
1938
- for (var e = [], n = 0; n < this.attributes.length; n++)
1939
- ["type", "maxlength", "maxbyte", "min", "max", "step", "scale", "text-align"].includes(this.attributes[n].name) && e.push(`${this.attributes[n].name}="${this.attributes[n].value}"`);
1938
+ for (var e = [], r = 0; r < this.attributes.length; r++)
1939
+ ["type", "maxlength", "maxbyte", "min", "max", "step", "scale", "text-align"].includes(this.attributes[r].name) && e.push(`${this.attributes[r].name}="${this.attributes[r].value}"`);
1940
1940
  this.innerHTML = `
1941
1941
  <input type="text"
1942
1942
  ${e.join(" ")}