e-virt-table 1.2.33 → 1.2.34

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.
package/dist/index.es.js CHANGED
@@ -214,7 +214,7 @@ function xe(c, t = document.documentElement) {
214
214
  const e = c.startsWith("--") ? c : `--${c}`;
215
215
  return getComputedStyle(t).getPropertyValue(e).trim();
216
216
  }
217
- function It(c) {
217
+ function Rt(c) {
218
218
  if (!c) return /* @__PURE__ */ new Date(0);
219
219
  if (typeof c == "number")
220
220
  return new Date(c);
@@ -269,7 +269,7 @@ function It(c) {
269
269
  return /* @__PURE__ */ new Date(NaN);
270
270
  }
271
271
  function ue(c, t) {
272
- const e = It(c), i = It(t);
272
+ const e = Rt(c), i = Rt(t);
273
273
  return isNaN(e.getTime()) && isNaN(i.getTime()) ? 0 : isNaN(e.getTime()) ? -1 : isNaN(i.getTime()) ? 1 : e.getTime() - i.getTime();
274
274
  }
275
275
  class Bt {
@@ -364,6 +364,7 @@ class ut extends Bt {
364
364
  n(this, "drawCellBgColor", "");
365
365
  n(this, "drawCellSkyBgColor", "");
366
366
  n(this, "drawTextColor", "");
367
+ n(this, "drawTextFont", "");
367
368
  n(this, "drawTextX", 0);
368
369
  n(this, "drawTextY", 0);
369
370
  n(this, "drawTextWidth", 0);
@@ -521,18 +522,18 @@ class ut extends Bt {
521
522
  return;
522
523
  const l = this.ctx.database.getRowForRowKey(i), { expand: h = !1, hasChildren: d = !1, expandLoading: f = !1, level: u = 0 } = l || {};
523
524
  this.rowExpand = h, this.rowHasChildren = d;
524
- const { TREE_INDENT: x = 16, CHECKBOX_SIZE: w, TREE_ICON_SIZE: E } = this.ctx.config;
525
+ const { TREE_INDENT: x = 16, CHECKBOX_SIZE: w, TREE_ICON_SIZE: m } = this.ctx.config;
525
526
  if (r = u * x, f) {
526
- const R = this.ctx.icons.get("loading");
527
- a = "loading", o = R;
527
+ const I = this.ctx.icons.get("loading");
528
+ a = "loading", o = I;
528
529
  } else if (d) {
529
- const R = this.ctx.icons.get("expand"), _ = this.ctx.icons.get("shrink");
530
- o = h ? _ : R, a = h ? "shrink" : "expand";
530
+ const I = this.ctx.icons.get("expand"), _ = this.ctx.icons.get("shrink");
531
+ o = h ? _ : I, a = h ? "shrink" : "expand";
531
532
  }
532
- let g = E, m = E, y = this.drawX;
533
+ let g = m, E = m, y = this.drawX;
533
534
  (this.align === "center" || this.align === "right") && (y = this.drawX + (this.visibleWidth - g - 2 * e) / 2, this.align = "left");
534
- let p = y + r + e, b = this.drawY + (this.visibleHeight - m) / 2, C = r + this.drawX + g - 0.5;
535
- this.type === "selection-tree" ? (p = r + this.drawSelectionImageX + this.drawSelectionImageWidth, C = p + g - e / 2) : this.type === "tree-selection" ? C = p + w + g - e / 2 : C = p + g - e / 2, this.drawTextX = C, this.drawTextWidth = this.drawX + this.visibleWidth - C, !(p + g + e > this.drawX + this.visibleWidth) && (b + m + e > this.drawY + this.visibleHeight || (this.drawTreeImageX = p, this.drawTreeImageY = b, this.drawTreeImageWidth = g, this.drawTreeImageHeight = m, o ? (this.drawTreeImageName = a, this.drawTreeImageSource = o) : (this.drawTreeImageName = "", this.drawTreeImageSource = void 0)));
535
+ let p = y + r + e, b = this.drawY + (this.visibleHeight - E) / 2, C = r + this.drawX + g - 0.5;
536
+ this.type === "selection-tree" ? (p = r + this.drawSelectionImageX + this.drawSelectionImageWidth, C = p + g - e / 2) : this.type === "tree-selection" ? C = p + w + g - e / 2 : C = p + g - e / 2, this.drawTextX = C, this.drawTextWidth = this.drawX + this.visibleWidth - C, !(p + g + e > this.drawX + this.visibleWidth) && (b + E + e > this.drawY + this.visibleHeight || (this.drawTreeImageX = p, this.drawTreeImageY = b, this.drawTreeImageWidth = g, this.drawTreeImageHeight = E, o ? (this.drawTreeImageName = a, this.drawTreeImageSource = o) : (this.drawTreeImageName = "", this.drawTreeImageSource = void 0)));
536
537
  }
537
538
  drawTreeLine() {
538
539
  const { TREE_LINE: e, TREE_INDENT: i = 16, TREE_ICON_SIZE: s = 16, TREE_LINE_COLOR: o = "#e1e6eb" } = this.ctx.config;
@@ -542,8 +543,8 @@ class ut extends Bt {
542
543
  const f = Array.isArray(r.parentRowKeys) ? r.parentRowKeys : [];
543
544
  if (a > 0) {
544
545
  for (let g = 0; g < a - 1; g += 1) {
545
- const m = f[g + 1];
546
- if (!!(m ? this.ctx.database.getRowForRowKey(m) || {} : {}).isLastChild) continue;
546
+ const E = f[g + 1];
547
+ if (!!(E ? this.ctx.database.getRowForRowKey(E) || {} : {}).isLastChild) continue;
547
548
  const b = Math.round(this.drawTreeImageX - (a - g) * i + s / 2);
548
549
  this.ctx.paint.drawLine([b, this.drawY, b, this.drawY + this.visibleHeight], {
549
550
  borderColor: o,
@@ -559,8 +560,8 @@ class ut extends Bt {
559
560
  lineDash: [4, 4],
560
561
  lineDashOffset: 0
561
562
  });
562
- const E = Math.round(d + (a - 1) * i + s / 2);
563
- this.ctx.paint.drawLine([E, h, l, h], {
563
+ const m = Math.round(d + (a - 1) * i + s / 2);
564
+ this.ctx.paint.drawLine([m, h, l, h], {
564
565
  borderColor: o,
565
566
  borderWidth: 1,
566
567
  lineDash: [4, 4],
@@ -592,34 +593,34 @@ class ut extends Bt {
592
593
  HIGHLIGHT_HOVER_ROW: u,
593
594
  HIGHLIGHT_HOVER_ROW_COLOR: x,
594
595
  STRIPE: w,
595
- STRIPE_COLOR: E
596
+ STRIPE_COLOR: m
596
597
  } = this.ctx.config;
597
598
  if (this.cellType === "footer") {
598
599
  let _ = h, T = l;
599
600
  if (typeof o == "function") {
600
- const S = o, { backgroundColor: I, color: v } = S({
601
+ const S = o, { backgroundColor: R, color: v, font: O } = S({
601
602
  row: this.row,
602
603
  rowIndex: this.rowIndex,
603
604
  colIndex: this.colIndex,
604
605
  column: this.column,
605
606
  value: this.getValue()
606
607
  }) || {};
607
- I && (_ = I), v && (T = v);
608
+ R && (_ = R), v && (T = v), O && (this.drawTextFont = O);
608
609
  }
609
610
  this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = _, this.drawTextColor = T;
610
611
  return;
611
612
  }
612
613
  let g = "transparent";
613
- const m = this.ctx.hoverCell, y = this.ctx.currentCell;
614
+ const E = this.ctx.hoverCell, y = this.ctx.currentCell;
614
615
  let p = this.rowIndex, b = this.rowIndex;
615
616
  if (this.rowspan !== 1 && (u || d)) {
616
617
  const _ = this.getSpanInfo(), { yArr: T } = _;
617
618
  p = T[0], b = T[1];
618
619
  }
619
- u && m && (m.rowKey === this.rowKey && (g = x), m.rowIndex >= p && m.rowIndex <= b && (g = x)), d && y && (y.rowKey === this.rowKey && (g = f), y.rowIndex >= p && y.rowIndex <= b && (g = f)), this.drawCellSkyBgColor = g;
620
- let C = e, R = a;
621
- if (this.ctx.database.getReadonly(this.rowKey, this.key) || (C = i, R = r), w && (this.rowIndex % 2 ? C = E : C = e), typeof s == "function") {
622
- const _ = s, { backgroundColor: T, color: S } = _({
620
+ u && E && (E.rowKey === this.rowKey && (g = x), E.rowIndex >= p && E.rowIndex <= b && (g = x)), d && y && (y.rowKey === this.rowKey && (g = f), y.rowIndex >= p && y.rowIndex <= b && (g = f)), this.drawCellSkyBgColor = g;
621
+ let C = e, I = a;
622
+ if (this.ctx.database.getReadonly(this.rowKey, this.key) || (C = i, I = r), w && (this.rowIndex % 2 ? C = m : C = e), typeof s == "function") {
623
+ const _ = s, { backgroundColor: T, color: S, font: R } = _({
623
624
  row: this.row,
624
625
  rowIndex: this.rowIndex,
625
626
  colIndex: this.colIndex,
@@ -627,9 +628,9 @@ class ut extends Bt {
627
628
  isHasChanged: this.isHasChanged,
628
629
  value: this.getValue()
629
630
  }) || {};
630
- T && (C = T), S && (R = S);
631
+ T && (C = T), S && (I = S), R && (this.drawTextFont = R);
631
632
  }
632
- this.drawCellBgColor = C, this.drawTextColor = R;
633
+ this.drawCellBgColor = C, this.drawTextColor = I;
633
634
  }
634
635
  updateSelection() {
635
636
  const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: o, cellType: r, type: a, rowIndex: l, rowKey: h } = this;
@@ -638,22 +639,22 @@ class ut extends Bt {
638
639
  const d = this.ctx.database.getRowSelectable(h), { CHECKBOX_SIZE: f = 0, CELL_PADDING: u } = this.ctx.config;
639
640
  let x = this.drawX + u;
640
641
  (this.align === "center" || this.align === "right") && (x = this.drawX + (e - f) / 2);
641
- let w = x, E = this.drawY + (i - f) / 2;
642
+ let w = x, m = this.drawY + (i - f) / 2;
642
643
  if (a !== "selection-tree") {
643
644
  if (a === "tree-selection") {
644
- const { TREE_INDENT: y = 16, TREE_ICON_SIZE: p } = this.ctx.config, b = this.ctx.database.getRowForRowKey(h), { level: C = 0 } = b || {}, R = C * y;
645
- w = x + p + R;
645
+ const { TREE_INDENT: y = 16, TREE_ICON_SIZE: p } = this.ctx.config, b = this.ctx.database.getRowForRowKey(h), { level: C = 0 } = b || {}, I = C * y;
646
+ w = x + p + I;
646
647
  }
647
648
  }
648
- let g = this.ctx.icons.get("checkbox-uncheck"), m = "checkbox-uncheck";
649
+ let g = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck";
649
650
  if (a === "selection-tree" || a === "tree-selection") {
650
651
  const y = this.ctx.database.getTreeSelectionState(h);
651
- y.indeterminate && d ? (g = this.ctx.icons.get("checkbox-indeterminate"), m = "checkbox-indeterminate") : y.checked && d ? (g = this.ctx.icons.get("checkbox-check"), m = "checkbox-check") : !y.checked && d ? (g = this.ctx.icons.get("checkbox-uncheck"), m = "checkbox-uncheck") : (g = this.ctx.icons.get("checkbox-disabled"), m = "checkbox-disabled");
652
+ y.indeterminate && d ? (g = this.ctx.icons.get("checkbox-indeterminate"), E = "checkbox-indeterminate") : y.checked && d ? (g = this.ctx.icons.get("checkbox-check"), E = "checkbox-check") : !y.checked && d ? (g = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck") : (g = this.ctx.icons.get("checkbox-disabled"), E = "checkbox-disabled");
652
653
  } else {
653
654
  const y = this.ctx.database.getRowSelection(h);
654
- y && d ? (g = this.ctx.icons.get("checkbox-check"), m = "checkbox-check") : y && !d ? (g = this.ctx.icons.get("checkbox-check-disabled"), m = "checkbox-check-disabled") : !y && d ? (g = this.ctx.icons.get("checkbox-uncheck"), m = "checkbox-uncheck") : (g = this.ctx.icons.get("checkbox-disabled"), m = "checkbox-disabled");
655
+ y && d ? (g = this.ctx.icons.get("checkbox-check"), E = "checkbox-check") : y && !d ? (g = this.ctx.icons.get("checkbox-check-disabled"), E = "checkbox-check-disabled") : !y && d ? (g = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck") : (g = this.ctx.icons.get("checkbox-disabled"), E = "checkbox-disabled");
655
656
  }
656
- w + f + u > this.drawX + this.visibleWidth || E + f + u > this.drawY + this.visibleHeight || (a === "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === l || ["checkbox-disabled", "checkbox-check"].includes(m)) && (this.drawSelectionImageX = w, this.drawSelectionImageY = E, this.drawSelectionImageWidth = f, this.drawSelectionImageHeight = f, this.drawSelectionImageName = m, this.drawSelectionImageSource = g) : (this.drawSelectionImageX = w, this.drawSelectionImageY = E, this.drawSelectionImageWidth = f, this.drawSelectionImageHeight = f, this.drawSelectionImageName = m, this.drawSelectionImageSource = g));
657
+ w + f + u > this.drawX + this.visibleWidth || m + f + u > this.drawY + this.visibleHeight || (a === "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === l || ["checkbox-disabled", "checkbox-check"].includes(E)) && (this.drawSelectionImageX = w, this.drawSelectionImageY = m, this.drawSelectionImageWidth = f, this.drawSelectionImageHeight = f, this.drawSelectionImageName = E, this.drawSelectionImageSource = g) : (this.drawSelectionImageX = w, this.drawSelectionImageY = m, this.drawSelectionImageWidth = f, this.drawSelectionImageHeight = f, this.drawSelectionImageName = E, this.drawSelectionImageSource = g));
657
658
  }
658
659
  updateHoverIcon() {
659
660
  if (this.ctx.database.getReadonly(this.rowKey, this.key))
@@ -675,8 +676,8 @@ class ut extends Bt {
675
676
  if (a.rowKey === this.rowKey && (l = this.drawX + this.width - s - o, h = this.drawY + (this.height - s) / 2), this.rowspan !== 1 && r) {
676
677
  const f = this.getSpanInfo(), { yArr: u } = f, x = u[0], w = u[1];
677
678
  if (a.rowIndex >= x && a.rowIndex <= w) {
678
- const { width: E, height: g, offsetTop: m, offsetLeft: y } = f;
679
- l = this.drawX - y + E - s - o, h = this.drawY - m + (g - s) / 2;
679
+ const { width: m, height: g, offsetTop: E, offsetLeft: y } = f;
680
+ l = this.drawX - y + m - s - o, h = this.drawY - E + (g - s) / 2;
680
681
  }
681
682
  }
682
683
  const d = this.ctx.icons.get(this.hoverIconName);
@@ -696,8 +697,8 @@ class ut extends Bt {
696
697
  }
697
698
  if (!(this.displayText && typeof this.displayText == "string"))
698
699
  return 0;
699
- const { BODY_FONT: e, CELL_PADDING: i, CELL_LINE_HEIGHT: s } = this.ctx.config, o = `${this.displayText}_${this.drawTextWidth}`, r = this.ctx.paint.calculateTextHeight(this.displayText, this.drawTextWidth, {
700
- font: e,
700
+ const { BODY_FONT: e, CELL_PADDING: i, CELL_LINE_HEIGHT: s } = this.ctx.config, o = `${this.displayText}_${this.drawTextWidth}_${this.drawTextFont}`, r = this.ctx.paint.calculateTextHeight(this.displayText, this.drawTextWidth, {
701
+ font: this.drawTextFont || e,
701
702
  padding: i,
702
703
  align: this.align,
703
704
  verticalAlign: this.verticalAlign,
@@ -805,8 +806,8 @@ class ut extends Bt {
805
806
  return;
806
807
  const { xArr: r, yArr: a } = this.ctx.selector, l = r[1], h = a[1], { colIndex: d, rowIndex: f, drawX: u, drawY: x } = this;
807
808
  if (d === l && f === h) {
808
- const E = d === this.ctx.maxColIndex || f === this.ctx.maxRowIndex || d === this.ctx.lastCenterColIndex ? 6 : 4;
809
- this.ctx.paint.drawRect(u + this.width - E, x + this.height - E, 6, 6, {
809
+ const m = d === this.ctx.maxColIndex || f === this.ctx.maxRowIndex || d === this.ctx.lastCenterColIndex ? 6 : 4;
810
+ this.ctx.paint.drawRect(u + this.width - m, x + this.height - m, 6, 6, {
810
811
  borderColor: o,
811
812
  fillColor: e
812
813
  });
@@ -835,7 +836,7 @@ class ut extends Bt {
835
836
  if (!this.ctx.database.getReadonly(this.rowKey, this.key) && r && ["", null, void 0].includes(this.text) && this.cellType === "body" && !(this.rowspan === 0 || this.colspan === 0) && (a = r, l = s), ["", null, void 0].includes(a))
836
837
  return !1;
837
838
  typeof a != "string" && (a = `${a}`);
838
- const d = `${a}_${this.drawTextWidth}`;
839
+ const d = `${a}_${this.drawTextWidth}_${this.drawTextFont}`;
839
840
  return this.ellipsis = this.ctx.paint.drawText(
840
841
  a,
841
842
  this.drawTextX,
@@ -843,7 +844,7 @@ class ut extends Bt {
843
844
  this.drawTextWidth,
844
845
  this.drawTextHeight,
845
846
  {
846
- font: i,
847
+ font: this.drawTextFont || i,
847
848
  padding: e,
848
849
  align: this.align,
849
850
  verticalAlign: this.verticalAlign,
@@ -949,11 +950,11 @@ class ut extends Bt {
949
950
  drawBorder(e) {
950
951
  const { drawX: i, drawY: s, rowIndex: o, colIndex: r, height: a, width: l } = this;
951
952
  let h = i, d = s;
952
- const { xArr: f, yArr: u, lineDash: x = [], borderWidth: w = 1, borderColor: E, fillColor: g } = e, m = f[0], y = f[1], p = u[0], b = u[1];
953
- if (r >= m && r <= y && o === p) {
954
- const C = r === y ? 1 : 0, R = r === m ? 1 : 0;
955
- this.ctx.paint.drawLine([h + R, d + 1, h + l - C, d + 1], {
956
- borderColor: E,
953
+ const { xArr: f, yArr: u, lineDash: x = [], borderWidth: w = 1, borderColor: m, fillColor: g } = e, E = f[0], y = f[1], p = u[0], b = u[1];
954
+ if (r >= E && r <= y && o === p) {
955
+ const C = r === y ? 1 : 0, I = r === E ? 1 : 0;
956
+ this.ctx.paint.drawLine([h + I, d + 1, h + l - C, d + 1], {
957
+ borderColor: m,
957
958
  fillColor: g,
958
959
  borderWidth: w,
959
960
  lineCap: "round",
@@ -962,9 +963,9 @@ class ut extends Bt {
962
963
  });
963
964
  }
964
965
  if (r === y && o >= p && o <= b) {
965
- const C = o === p ? 1 : 0, R = o === b ? 1 : 0;
966
- this.ctx.paint.drawLine([h + l - 1, d + C, h + l - 1, d + a - R], {
967
- borderColor: E,
966
+ const C = o === p ? 1 : 0, I = o === b ? 1 : 0;
967
+ this.ctx.paint.drawLine([h + l - 1, d + C, h + l - 1, d + a - I], {
968
+ borderColor: m,
968
969
  fillColor: g,
969
970
  borderWidth: w,
970
971
  lineCap: "round",
@@ -972,10 +973,10 @@ class ut extends Bt {
972
973
  lineDash: x
973
974
  });
974
975
  }
975
- if (r >= m && r <= y && o === b) {
976
- const C = r === y ? 1 : 0, R = r === m ? 1 : 0;
977
- this.ctx.paint.drawLine([h + R, d + a - 1, h + l - C, d + a - 1], {
978
- borderColor: E,
976
+ if (r >= E && r <= y && o === b) {
977
+ const C = r === y ? 1 : 0, I = r === E ? 1 : 0;
978
+ this.ctx.paint.drawLine([h + I, d + a - 1, h + l - C, d + a - 1], {
979
+ borderColor: m,
979
980
  fillColor: g,
980
981
  borderWidth: w,
981
982
  lineCap: "round",
@@ -983,10 +984,10 @@ class ut extends Bt {
983
984
  lineDash: x
984
985
  });
985
986
  }
986
- if (r === m && o >= p && o <= b) {
987
- const C = o === b ? 1 : 0, R = o === p ? 1 : 0;
988
- this.ctx.paint.drawLine([h + 1, d + R, h + 1, d + a - C], {
989
- borderColor: E,
987
+ if (r === E && o >= p && o <= b) {
988
+ const C = o === b ? 1 : 0, I = o === p ? 1 : 0;
989
+ this.ctx.paint.drawLine([h + 1, d + I, h + 1, d + a - C], {
990
+ borderColor: m,
990
991
  fillColor: g,
991
992
  borderWidth: w,
992
993
  lineCap: "round",
@@ -1059,7 +1060,7 @@ class ge {
1059
1060
  var y;
1060
1061
  const { ROW_KEY: a = "", DEFAULT_EXPAND_ALL: l, CELL_HEIGHT: h, SELECTABLE_METHOD: d, CHECKBOX_KEY: f } = this.ctx.config, u = o[a], x = u != null ? `${u}` : Dt();
1061
1062
  this.itemRowKeyMap.set(o, x);
1062
- const w = o._height || h, E = o._readonly;
1063
+ const w = o._height || h, m = o._readonly;
1063
1064
  let g = !0;
1064
1065
  if (typeof d == "function" && (g = d), f) {
1065
1066
  const p = o[f];
@@ -1074,9 +1075,9 @@ class ge {
1074
1075
  row: o,
1075
1076
  check: ((y = this.selectionMap.get(x)) == null ? void 0 : y.check) || !1
1076
1077
  });
1077
- const m = l || this.expandMap.get(x) || o._expand || !1;
1078
- this.expandMap.set(x, m), this.rowKeyMap.set(x, {
1079
- readonly: E,
1078
+ const E = l || this.expandMap.get(x) || o._expand || !1;
1079
+ this.expandMap.set(x, E), this.rowKeyMap.set(x, {
1080
+ readonly: m,
1080
1081
  index: r,
1081
1082
  rowIndex: r,
1082
1083
  level: e,
@@ -1084,7 +1085,7 @@ class ge {
1084
1085
  calculatedHeight: -1,
1085
1086
  check: !1,
1086
1087
  selectable: g,
1087
- expand: m,
1088
+ expand: E,
1088
1089
  expandLazy: !1,
1089
1090
  hasChildren: o._hasChildren || (Array.isArray(o.children) ? o.children.length > 0 : !1),
1090
1091
  expandLoading: !1,
@@ -1381,17 +1382,17 @@ class ge {
1381
1382
  let o = [], r = i;
1382
1383
  const a = /* @__PURE__ */ new Set();
1383
1384
  let l = [], h = t.map((x) => {
1384
- const { rowKey: w, key: E } = x;
1385
- let g = x.value, m = g;
1386
- const y = this.getRowDataItemForRowKey(w), p = this.getItemValue(w, E), b = this.getVirtualBodyCellByKey(w, E);
1387
- return (b == null ? void 0 : b.type) === "number" && (["", void 0, null].includes(g) ? m = null : /^-?\d+(\.\d+)?$/.test(`${g}`) ? m = Number(g) : (m = p, l.push({
1385
+ const { rowKey: w, key: m } = x;
1386
+ let g = x.value, E = g;
1387
+ const y = this.getRowDataItemForRowKey(w), p = this.getItemValue(w, m), b = this.getVirtualBodyCellByKey(w, m);
1388
+ return (b == null ? void 0 : b.type) === "number" && (["", void 0, null].includes(g) ? E = null : /^-?\d+(\.\d+)?$/.test(`${g}`) ? E = Number(g) : (E = p, l.push({
1388
1389
  ...x,
1389
- value: m,
1390
+ value: E,
1390
1391
  oldValue: p,
1391
1392
  row: y
1392
1393
  }))), {
1393
1394
  ...x,
1394
- value: m,
1395
+ value: E,
1395
1396
  oldValue: p,
1396
1397
  row: y
1397
1398
  };
@@ -1408,11 +1409,11 @@ class ge {
1408
1409
  return;
1409
1410
  const { BEFORE_VALUE_CHANGE_METHOD: d } = this.ctx.config;
1410
1411
  s === "none" && typeof d == "function" && (h = await d(h), r = !1), h.forEach((x) => {
1411
- const { value: w, rowKey: E, key: g } = x, m = this.getItemValue(E, g);
1412
- a.add(E), this.setItemValue(E, g, w, !1, !1, !1, r), o.push({
1413
- rowKey: E,
1412
+ const { value: w, rowKey: m, key: g } = x, E = this.getItemValue(m, g);
1413
+ a.add(m), this.setItemValue(m, g, w, !1, !1, !1, r), o.push({
1414
+ rowKey: m,
1414
1415
  key: g,
1415
- oldValue: m,
1416
+ oldValue: E,
1416
1417
  newValue: w
1417
1418
  });
1418
1419
  });
@@ -1484,7 +1485,7 @@ class ge {
1484
1485
  oldValue: h,
1485
1486
  newValue: h
1486
1487
  };
1487
- let E = [
1488
+ let m = [
1488
1489
  {
1489
1490
  rowKey: t,
1490
1491
  key: e,
@@ -1493,7 +1494,7 @@ class ge {
1493
1494
  row: x
1494
1495
  }
1495
1496
  ];
1496
- this.batchSetItemValue(E, s, !1), this.ctx.emit("editChange", {
1497
+ this.batchSetItemValue(m, s, !1), this.ctx.emit("editChange", {
1497
1498
  rowKey: t,
1498
1499
  key: e,
1499
1500
  oldValue: h,
@@ -1571,13 +1572,13 @@ class ge {
1571
1572
  // 递归选中树形选择
1572
1573
  selectTreeSelectionRecursive(t) {
1573
1574
  this.getTreeChildren(t).forEach((i) => {
1574
- this.setRowSelection(i, !0, !1), this.selectTreeSelectionRecursive(i);
1575
+ this.setRowSelectionByParent(i, !0), this.selectTreeSelectionRecursive(i);
1575
1576
  });
1576
1577
  }
1577
1578
  // 递归取消树形选择
1578
1579
  clearTreeSelectionRecursive(t) {
1579
1580
  this.getTreeChildren(t).forEach((i) => {
1580
- this.setRowSelection(i, !1, !1), this.clearTreeSelectionRecursive(i);
1581
+ this.setRowSelectionByParent(i, !1), this.clearTreeSelectionRecursive(i);
1581
1582
  });
1582
1583
  }
1583
1584
  // 向上递归更新父项状态
@@ -1599,6 +1600,10 @@ class ge {
1599
1600
  const s = this.selectionMap.get(t);
1600
1601
  s && (s.check = e, this.setRowSelectionByCheckboxKey(t, s.check), this.ctx.emit("setRowSelection", e, s.row), (this.ctx.config.TREE_SELECT_MODE === "auto" || this.ctx.config.TREE_SELECT_MODE === "cautious") && this.updateParentTreeSelection(t), i && (this.bufferCheckState.buffer = !1, this.ctx.emit("draw")));
1601
1602
  }
1603
+ setRowSelectionByParent(t, e) {
1604
+ const i = this.selectionMap.get(t);
1605
+ i && (i.check = e, this.setRowSelectionByCheckboxKey(t, i.check));
1606
+ }
1602
1607
  getSelectionRows() {
1603
1608
  let t = [];
1604
1609
  return this.selectionMap.forEach((e) => {
@@ -1623,22 +1628,22 @@ class ge {
1623
1628
  let r = !1, a = s;
1624
1629
  if (this.ctx.config.TREE_SELECT_MODE === "auto") {
1625
1630
  const h = (g) => {
1626
- const m = this.getTreeChildren(g);
1631
+ const E = this.getTreeChildren(g);
1627
1632
  let y = [];
1628
- for (const p of m)
1633
+ for (const p of E)
1629
1634
  y.push(p), y.push(...h(p));
1630
1635
  return y;
1631
1636
  }, f = h(t).map((g) => this.selectionMap.get(g)), u = f.filter((g) => g == null ? void 0 : g.check).length, x = f.length, w = u > 0;
1632
1637
  r = w && !(u === x), a = s || w, s && x > 0 && u === 0 && (a = !1, r = !1);
1633
1638
  } else if (this.ctx.config.TREE_SELECT_MODE === "cautious") {
1634
1639
  const h = (g) => {
1635
- const m = this.getTreeChildren(g);
1640
+ const E = this.getTreeChildren(g);
1636
1641
  let y = [];
1637
- for (const p of m)
1642
+ for (const p of E)
1638
1643
  y.push(p), y.push(...h(p));
1639
1644
  return y;
1640
- }, f = h(t).map((g) => this.selectionMap.get(g)), u = f.filter((g) => g == null ? void 0 : g.check).length, x = f.length, w = u > 0, E = u === x;
1641
- r = w && !E, a = s || E, s && x > 0 && u === 0 && (a = !1, r = !1);
1645
+ }, f = h(t).map((g) => this.selectionMap.get(g)), u = f.filter((g) => g == null ? void 0 : g.check).length, x = f.length, w = u > 0, m = u === x;
1646
+ r = w && !m, a = s || m, s && x > 0 && u === 0 && (a = !1, r = !1);
1642
1647
  } else this.ctx.config.TREE_SELECT_MODE === "strictly" && (r = !1, a = s);
1643
1648
  return { checked: a, indeterminate: r };
1644
1649
  }
@@ -1741,8 +1746,8 @@ class ge {
1741
1746
  let s = 0, o = 0;
1742
1747
  const r = this.selectionMap.size, a = Array.from(this.selectionMap.values()).some((u) => u.check);
1743
1748
  this.rowKeyMap.forEach((u, x) => {
1744
- var E;
1745
- (E = this.selectionMap.get(x)) != null && E.check && (s += 1);
1749
+ var m;
1750
+ (m = this.selectionMap.get(x)) != null && m.check && (s += 1);
1746
1751
  let w = u.selectable;
1747
1752
  typeof w == "function" && (w = w({
1748
1753
  row: u.item,
@@ -1926,7 +1931,7 @@ class ge {
1926
1931
  width: u,
1927
1932
  colspan: x,
1928
1933
  mergeRow: w,
1929
- mergeCol: E
1934
+ mergeCol: m
1930
1935
  } = t;
1931
1936
  if (d === 1 && x === 1)
1932
1937
  return {
@@ -1947,41 +1952,41 @@ class ge {
1947
1952
  }
1948
1953
  ]
1949
1954
  };
1950
- let g = e, m = e, y = a, p = a, b = [], C = 0, R = 0, _ = 0, T = 0;
1955
+ let g = e, E = e, y = a, p = a, b = [], C = 0, I = 0, _ = 0, T = 0;
1951
1956
  if (d !== 1 && w) {
1952
1957
  T = u;
1953
- const S = l.reduce((I, v) => {
1958
+ const S = l.reduce((R, v) => {
1954
1959
  const O = this.getItemValue(s, v) ?? "";
1955
- return `${I}${O}`;
1960
+ return `${R}${O}`;
1956
1961
  }, "");
1957
- for (let I = e - 1; I >= 0; I--) {
1958
- const v = this.rowIndexRowKeyMap.get(I) || "", O = l.reduce((A, L) => {
1962
+ for (let R = e - 1; R >= 0; R--) {
1963
+ const v = this.rowIndexRowKeyMap.get(R) || "", O = l.reduce((A, L) => {
1959
1964
  const M = this.getItemValue(v, L) ?? "";
1960
1965
  return `${A}${M}`;
1961
1966
  }, "");
1962
1967
  if (S === O)
1963
- g = I;
1968
+ g = R;
1964
1969
  else
1965
1970
  break;
1966
1971
  }
1967
- for (let I = e; I <= this.ctx.maxRowIndex; I++) {
1968
- const v = this.rowIndexRowKeyMap.get(I) || "", O = l.reduce((A, L) => {
1972
+ for (let R = e; R <= this.ctx.maxRowIndex; R++) {
1973
+ const v = this.rowIndexRowKeyMap.get(R) || "", O = l.reduce((A, L) => {
1969
1974
  const M = this.getItemValue(v, L) ?? "";
1970
1975
  return `${A}${M}`;
1971
1976
  }, "");
1972
1977
  if (S === O)
1973
- m = I;
1978
+ E = R;
1974
1979
  else
1975
1980
  break;
1976
1981
  }
1977
- for (let I = g; I < e; I++) {
1978
- const { height: v } = this.positions[I];
1982
+ for (let R = g; R < e; R++) {
1983
+ const { height: v } = this.positions[R];
1979
1984
  C += v;
1980
1985
  }
1981
- for (let I = g; I <= m; I++) {
1982
- const { height: v } = this.positions[I];
1986
+ for (let R = g; R <= E; R++) {
1987
+ const { height: v } = this.positions[R];
1983
1988
  _ += v;
1984
- const O = this.rowIndexRowKeyMap.get(I) || "", { item: A } = this.rowKeyMap.get(O), L = this.getItemValue(O, i);
1989
+ const O = this.rowIndexRowKeyMap.get(R) || "", { item: A } = this.rowKeyMap.get(O), L = this.getItemValue(O, i);
1985
1990
  b.push({
1986
1991
  rowKey: O,
1987
1992
  key: i,
@@ -1990,55 +1995,55 @@ class ge {
1990
1995
  });
1991
1996
  }
1992
1997
  }
1993
- if (x !== 1 && E) {
1998
+ if (x !== 1 && m) {
1994
1999
  _ = f;
1995
2000
  for (let S = a - 1; S >= 0; S--) {
1996
- const I = this.getColumnByColIndex(S);
1997
- if (!I)
2001
+ const R = this.getColumnByColIndex(S);
2002
+ if (!R)
1998
2003
  break;
1999
- const v = this.getItemValue(s, i), O = this.getItemValue(s, I.key);
2000
- if (v === O && h.includes(I.key))
2004
+ const v = this.getItemValue(s, i), O = this.getItemValue(s, R.key);
2005
+ if (v === O && h.includes(R.key))
2001
2006
  y = S;
2002
2007
  else
2003
2008
  break;
2004
2009
  }
2005
2010
  for (let S = a; S <= this.ctx.maxColIndex; S++) {
2006
- const I = this.getColumnByColIndex(S);
2007
- if (!I)
2011
+ const R = this.getColumnByColIndex(S);
2012
+ if (!R)
2008
2013
  break;
2009
- const v = this.getItemValue(s, i), O = this.getItemValue(s, I.key);
2010
- if (v === O && h.includes(I.key))
2014
+ const v = this.getItemValue(s, i), O = this.getItemValue(s, R.key);
2015
+ if (v === O && h.includes(R.key))
2011
2016
  p = S;
2012
2017
  else
2013
2018
  break;
2014
2019
  }
2015
2020
  for (let S = y; S < a; S++) {
2016
- const I = this.getColumnByColIndex(S);
2017
- if (!I)
2021
+ const R = this.getColumnByColIndex(S);
2022
+ if (!R)
2018
2023
  break;
2019
- R += I.width || 100;
2024
+ I += R.width || 100;
2020
2025
  }
2021
2026
  for (let S = y; S <= p; S++) {
2022
- const I = this.getColumnByColIndex(S);
2023
- if (!I)
2027
+ const R = this.getColumnByColIndex(S);
2028
+ if (!R)
2024
2029
  break;
2025
- T += I.width || 100, b.push({
2030
+ T += R.width || 100, b.push({
2026
2031
  rowKey: s,
2027
- key: I.key,
2028
- value: this.getItemValue(s, I.key),
2032
+ key: R.key,
2033
+ value: this.getItemValue(s, R.key),
2029
2034
  row: o
2030
2035
  });
2031
2036
  }
2032
2037
  }
2033
2038
  return {
2034
2039
  xArr: [y, p],
2035
- yArr: [g, m],
2040
+ yArr: [g, E],
2036
2041
  rowspan: d,
2037
2042
  colspan: x,
2038
2043
  height: _,
2039
2044
  width: T,
2040
2045
  offsetTop: C,
2041
- offsetLeft: R,
2046
+ offsetLeft: I,
2042
2047
  dataList: b
2043
2048
  };
2044
2049
  }
@@ -2177,14 +2182,14 @@ class we {
2177
2182
  this.history = [], this.historyIndex = -1;
2178
2183
  }
2179
2184
  }
2180
- class Ee {
2185
+ class me {
2181
2186
  constructor(t) {
2182
- n(this, "eventTasks", /* @__PURE__ */ new Map());
2187
+ n(this, "eventTasks", /* @__PURE__ */ new Set());
2183
2188
  n(this, "ctx");
2184
2189
  this.ctx = t, this.init();
2185
2190
  }
2186
2191
  init() {
2187
- this.bind(window, "resize", this.handleResize.bind(this)), this.bind(window, "mouseup", this.handleMouseUp.bind(this)), this.bind(window, "mousemove", this.handleMousemove.bind(this)), this.bind(window, "blur", this.handleOutsideMousedown.bind(this)), this.bind(window, "mousedown", this.handleOutsideMousedown.bind(this)), this.bind(this.ctx.stageElement, "click", this.handleClick.bind(this)), this.bind(window, "keydown", this.handleKeydown.bind(this)), this.bind(this.ctx.stageElement, "wheel", this.handleWheel.bind(this), { passive: !1 }), this.bind(this.ctx.stageElement, "touchstart", this.handleTouchstart.bind(this), { passive: !1 }), this.bind(this.ctx.stageElement, "touchend", this.handleTouchend.bind(this)), this.bind(this.ctx.stageElement, "touchmove", this.handleTouchmove.bind(this), { passive: !1 }), this.bind(this.ctx.stageElement, "contextmenu", this.handleContextMenu.bind(this)), this.bind(this.ctx.stageElement, "mousedown", this.handleMouseDown.bind(this)), this.bind(this.ctx.stageElement, "dblclick", this.handleDblclick.bind(this)), this.bind(this.ctx.stageElement, "mouseover", this.handleMouseover.bind(this)), this.bind(this.ctx.stageElement, "mouseout", this.handleMouseout.bind(this)), document.addEventListener("selectionchange", this.selectionchange.bind(this));
2192
+ this.bind(window, "resize", this.handleResize.bind(this)), this.bind(window, "mouseup", this.handleMouseUp.bind(this)), this.bind(window, "mousemove", this.handleMousemove.bind(this)), this.bind(window, "blur", this.handleOutsideMousedown.bind(this)), this.bind(window, "mousedown", this.handleOutsideMousedown.bind(this)), this.bind(this.ctx.stageElement, "click", this.handleClick.bind(this)), this.bind(window, "keydown", this.handleKeydown.bind(this)), this.bind(this.ctx.stageElement, "wheel", this.handleWheel.bind(this), { passive: !1 }), this.bind(this.ctx.stageElement, "touchstart", this.handleTouchstart.bind(this), { passive: !1 }), this.bind(this.ctx.stageElement, "touchend", this.handleTouchend.bind(this)), this.bind(this.ctx.stageElement, "touchmove", this.handleTouchmove.bind(this), { passive: !1 }), this.bind(this.ctx.stageElement, "contextmenu", this.handleContextMenu.bind(this)), this.bind(this.ctx.stageElement, "mousedown", this.handleMouseDown.bind(this)), this.bind(this.ctx.stageElement, "dblclick", this.handleDblclick.bind(this)), this.bind(this.ctx.stageElement, "mouseover", this.handleMouseover.bind(this)), this.bind(this.ctx.stageElement, "mouseout", this.handleMouseout.bind(this)), this.bind(document, "selectionchange", this.selectionchange.bind(this));
2188
2193
  }
2189
2194
  selectionchange() {
2190
2195
  this.ctx.domSelectionStr = "";
@@ -2196,9 +2201,9 @@ class Ee {
2196
2201
  t && !t.isCollapsed && t.removeAllRanges();
2197
2202
  }
2198
2203
  destroy() {
2199
- this.eventTasks.forEach((t, e) => {
2200
- this.unbind(window, e, t);
2201
- }), document.removeEventListener("selectionchange", this.selectionchange.bind(this)), this.eventTasks.clear();
2204
+ Array.from(this.eventTasks).forEach(({ target: e, name: i, fn: s, options: o }) => {
2205
+ this.unbind(e, i, s, o);
2206
+ }), this.eventTasks.clear();
2202
2207
  }
2203
2208
  handleResize(t) {
2204
2209
  this.ctx.emit("resetHeader", t), this.ctx.emit("resize", t);
@@ -2247,13 +2252,18 @@ class Ee {
2247
2252
  this.ctx.selector.enable && (t.target instanceof Window || t.target instanceof Node && !this.ctx.containerElement.contains(t.target)) && this.ctx.emit("outsideMousedown", t);
2248
2253
  }
2249
2254
  bind(t, e, i, s) {
2250
- t.addEventListener(e, i, s), this.eventTasks.set(e, i);
2255
+ t.addEventListener(e, i, s), this.eventTasks.add({ target: t, name: e, fn: i, options: s });
2251
2256
  }
2252
- unbind(t, e, i) {
2253
- t.removeEventListener(e, i), this.eventTasks.delete(e);
2257
+ unbind(t, e, i, s) {
2258
+ t.removeEventListener(e, i, s);
2259
+ for (const o of this.eventTasks)
2260
+ if (o.target === t && o.name === e && o.fn === i) {
2261
+ this.eventTasks.delete(o);
2262
+ break;
2263
+ }
2254
2264
  }
2255
2265
  }
2256
- class me {
2266
+ class Ee {
2257
2267
  constructor() {
2258
2268
  n(this, "events", /* @__PURE__ */ new Map());
2259
2269
  }
@@ -2387,7 +2397,7 @@ class pe {
2387
2397
  * @returns 是否溢出
2388
2398
  */
2389
2399
  drawText(t = "", e, i, s, o, r = {}) {
2390
- var I;
2400
+ var R;
2391
2401
  this.ctx.save();
2392
2402
  const {
2393
2403
  font: a = "12px Arial",
@@ -2398,23 +2408,23 @@ class pe {
2398
2408
  maxLineClamp: u = 1,
2399
2409
  autoRowHeight: x = !1,
2400
2410
  offsetLeft: w = 0,
2401
- offsetRight: E = 0
2411
+ offsetRight: m = 0
2402
2412
  } = r;
2403
2413
  if (this.ctx.font = a, this.ctx.fillStyle = h, this.ctx.textAlign = l, ["", null, void 0].includes(t))
2404
2414
  return this.ctx.restore(), !1;
2405
- const m = parseInt(((I = a.match(/\d+/)) == null ? void 0 : I[0]) || "12") * (r.lineHeight || 1.2), y = s - d * 2 - w - E;
2415
+ const E = parseInt(((R = a.match(/\d+/)) == null ? void 0 : R[0]) || "12") * (r.lineHeight || 1.2), y = s - d * 2 - w - m;
2406
2416
  let p = !1;
2407
- const b = Math.round((o - 2 * d) / m);
2408
- let C = this.wrapText(t, y, r.cacheTextKey), R = Math.min(C.length, Math.max(b, 1));
2409
- u === "auto" && x ? R = C.length : typeof u == "number" && u < R && u !== 1 ? R = u : (u === 1 && (C = [t], R = 1), u === "auto" && b === 1 && (C = [t], R = 1));
2417
+ const b = Math.round((o - 2 * d) / E);
2418
+ let C = this.wrapText(t, y, r.cacheTextKey), I = Math.min(C.length, Math.max(b, 1));
2419
+ u === "auto" && x ? I = C.length : typeof u == "number" && u < I && u !== 1 ? I = u : (u === 1 && (C = [t], I = 1), u === "auto" && b === 1 && (C = [t], I = 1));
2410
2420
  let _ = i + d;
2411
- const T = Math.round(R * m);
2421
+ const T = Math.round(I * E);
2412
2422
  f === "middle" ? _ = i + (o - T) / 2 : f === "bottom" && (_ = i + o - T - d);
2413
2423
  let S = e + d + w;
2414
- l === "center" ? S = e + s / 2 : l === "right" && (S = e + s - d - E);
2424
+ l === "center" ? S = e + s / 2 : l === "right" && (S = e + s - d - m);
2415
2425
  for (let v = 0; v < C.length; v++) {
2416
- const O = C[v], A = _ + v * m;
2417
- if (this.ctx.textBaseline = "top", v === R - 1) {
2426
+ const O = C[v], A = _ + v * E;
2427
+ if (this.ctx.textBaseline = "top", v === I - 1) {
2418
2428
  const M = C.slice(v).join(""), { _text: D, ellipsis: H } = this.handleEllipsis(M, s, d, a);
2419
2429
  this.ctx.fillText(D, S, A), p = H;
2420
2430
  break;
@@ -2475,7 +2485,7 @@ class pe {
2475
2485
  * @returns 计算出的高度
2476
2486
  */
2477
2487
  calculateTextHeight(t = "", e, i = {}) {
2478
- var E;
2488
+ var m;
2479
2489
  const {
2480
2490
  font: s = "12px Arial",
2481
2491
  padding: o = 0,
@@ -2485,7 +2495,7 @@ class pe {
2485
2495
  cacheTextKey: h = ""
2486
2496
  } = i;
2487
2497
  this.ctx.save(), this.ctx.font = s, this.ctx.fillStyle = a, this.ctx.textAlign = r;
2488
- const d = parseInt(((E = s.match(/\d+/)) == null ? void 0 : E[0]) || "12"), f = d * (i.lineHeight || 1.2), u = e - o * 2, x = this.wrapText(t, u, h);
2498
+ const d = parseInt(((m = s.match(/\d+/)) == null ? void 0 : m[0]) || "12"), f = d * (i.lineHeight || 1.2), u = e - o * 2, x = this.wrapText(t, u, h);
2489
2499
  let w = 1;
2490
2500
  return l === "auto" ? w = x.length : x.length > l ? w = l : w = x.length, this.ctx.restore(), Math.max(Math.floor(w * f + o * 2), Math.floor(d + o * 2));
2491
2501
  }
@@ -2519,7 +2529,7 @@ class pe {
2519
2529
  };
2520
2530
  }
2521
2531
  }
2522
- class Rt {
2532
+ class It {
2523
2533
  constructor(t) {
2524
2534
  n(this, "_config", {});
2525
2535
  /** CSS 类名前缀 */
@@ -3047,6 +3057,7 @@ class ct extends Bt {
3047
3057
  n(this, "drawTextHeight", 0);
3048
3058
  n(this, "drawCellBgColor", "");
3049
3059
  n(this, "drawTextColor", "");
3060
+ n(this, "drawTextFont", "");
3050
3061
  n(this, "drawSelectionImageX", 0);
3051
3062
  n(this, "drawSelectionImageY", 0);
3052
3063
  n(this, "drawSelectionImageWidth", 0);
@@ -3080,11 +3091,11 @@ class ct extends Bt {
3080
3091
  const { HEADER_CELL_STYLE_METHOD: e, HEADER_BG_COLOR: i, HEADER_TEXT_COLOR: s } = this.ctx.config;
3081
3092
  let o = i, r = s;
3082
3093
  if (typeof e == "function") {
3083
- const a = e, { backgroundColor: l, color: h } = a({
3094
+ const a = e, { backgroundColor: l, color: h, font: d } = a({
3084
3095
  colIndex: this.colIndex,
3085
3096
  column: this.column
3086
3097
  }) || {};
3087
- l && (o = l), h && (r = h);
3098
+ l && (o = l), h && (r = h), d && (this.drawTextFont = d);
3088
3099
  }
3089
3100
  this.drawCellBgColor = o, this.drawTextColor = r;
3090
3101
  }
@@ -3108,7 +3119,7 @@ class ct extends Bt {
3108
3119
  const {
3109
3120
  paint: e,
3110
3121
  config: { HEADER_FONT: i, CELL_PADDING: s, REQUIRED_COLOR: o }
3111
- } = this.ctx, r = `${this.displayText}_${this.drawTextWidth}`;
3122
+ } = this.ctx, r = `${this.displayText}_${this.drawTextWidth}_${this.drawTextFont}`;
3112
3123
  this.ellipsis = e.drawText(
3113
3124
  this.displayText,
3114
3125
  this.drawTextX,
@@ -3116,7 +3127,7 @@ class ct extends Bt {
3116
3127
  this.drawTextWidth,
3117
3128
  this.drawTextHeight,
3118
3129
  {
3119
- font: i,
3130
+ font: this.drawTextFont || i,
3120
3131
  padding: s,
3121
3132
  color: this.drawTextColor,
3122
3133
  align: this.align,
@@ -3200,7 +3211,7 @@ class ct extends Bt {
3200
3211
  };
3201
3212
  }
3202
3213
  }
3203
- class Ie {
3214
+ class Re {
3204
3215
  constructor(t) {
3205
3216
  n(this, "ctx");
3206
3217
  n(this, "visibleHoverCell");
@@ -3488,7 +3499,7 @@ class Ie {
3488
3499
  this.resizeObserver.unobserve(this.ctx.stageElement), this.mutationObserver.disconnect();
3489
3500
  }
3490
3501
  }
3491
- class Re {
3502
+ class Ie {
3492
3503
  constructor(t, e) {
3493
3504
  n(this, "eventBus");
3494
3505
  n(this, "eventBrowser");
@@ -3617,10 +3628,10 @@ class Re {
3617
3628
  loadingElement: h,
3618
3629
  contextMenuElement: d
3619
3630
  } = t;
3620
- this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = o, this.overlayerElement = r, this.editorElement = a, this.emptyElement = l, this.loadingElement = h, this.contextMenuElement = d, this.config = new Rt(e.config || {}), this.eventBus = new me(), this.eventBrowser = new Ee(this), this.eventTable = new Ie(this), this.paint = new pe(this.canvasElement), this.database = new ge(this, e), this.history = new we(this), this.icons = new be(this);
3631
+ this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = o, this.overlayerElement = r, this.editorElement = a, this.emptyElement = l, this.loadingElement = h, this.contextMenuElement = d, this.config = new It(e.config || {}), this.eventBus = new Ee(), this.eventBrowser = new me(this), this.eventTable = new Re(this), this.paint = new pe(this.canvasElement), this.database = new ge(this, e), this.history = new we(this), this.icons = new be(this);
3621
3632
  }
3622
3633
  setConfig(t) {
3623
- this.config = new Rt(t);
3634
+ this.config = new It(t);
3624
3635
  }
3625
3636
  setItemValueByEditor(t, e, i, s = !0, o = !0, r = !0) {
3626
3637
  if (this.config.ENABLE_MERGE_CELL_LINK) {
@@ -3844,8 +3855,8 @@ class vt {
3844
3855
  if (this.type === "vertical") {
3845
3856
  this.visibleDistance = h - o - d, this.distance = u - this.visibleDistance + x, this.trackX = l - o, this.trackY = 0, this.splitPoints = [this.trackX, d, this.trackX + o, d], this.trackWidth = o, this.trackHeight = h, this.barX = this.trackX - 1 + (o - r) / 2, this.barWidth = r;
3846
3857
  const w = this.distance ? this.visibleDistance / (u + x) : 0;
3847
- let E = Math.floor(w * this.visibleDistance);
3848
- E < 30 ? E = 30 : E > this.visibleDistance && (E = 0), this.barHeight = E, this.barY = d + this.scroll / this.distance * (this.visibleDistance - this.barHeight), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
3858
+ let m = Math.floor(w * this.visibleDistance);
3859
+ m < 30 ? m = 30 : m > this.visibleDistance && (m = 0), this.barHeight = m, this.barY = d + this.scroll / this.distance * (this.visibleDistance - this.barHeight), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
3849
3860
  } else {
3850
3861
  this.visibleDistance = l - o, this.distance = f - this.visibleDistance, this.splitPoints = [
3851
3862
  l - o,
@@ -3855,8 +3866,8 @@ class vt {
3855
3866
  ];
3856
3867
  const w = a ? 0 : 0.5;
3857
3868
  this.trackX = 0, this.trackY = h - o + w, this.trackWidth = l, this.trackHeight = o;
3858
- const E = this.distance ? this.visibleDistance / f : 0;
3859
- let g = Math.floor(E * this.visibleDistance);
3869
+ const m = this.distance ? this.visibleDistance / f : 0;
3870
+ let g = Math.floor(m * this.visibleDistance);
3860
3871
  this.barY = this.trackY - 1 + (o - r) / 2, g < 30 ? g = 30 : g >= this.visibleDistance && (g = 0), this.barWidth = g, this.barHeight = r, this.barX = this.scroll / this.distance * (this.visibleDistance - this.barWidth), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
3861
3872
  }
3862
3873
  }
@@ -4039,8 +4050,8 @@ class _e {
4039
4050
  this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [];
4040
4051
  const s = Nt(i), o = it(i);
4041
4052
  this.height = t * s, this.width = o.reduce((f, u) => {
4042
- const x = u.width || 100, { maxWidth: w, minWidth: E } = u;
4043
- return w && x > w ? f + w : E && x < E ? f + E : f + x;
4053
+ const x = u.width || 100, { maxWidth: w, minWidth: m } = u;
4054
+ return w && x > w ? f + w : m && x < m ? f + m : f + x;
4044
4055
  }, 0), this.visibleHeight = this.height;
4045
4056
  const r = ae(kt(i, s));
4046
4057
  this.columnIndex = 0, this.resizeNum = 0, this.render(r, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
@@ -4140,7 +4151,7 @@ class _e {
4140
4151
  for (let r = 0; r < i; r++) {
4141
4152
  const a = t[r], l = o * (a.rowspan || 0), h = o * (a.level || 0);
4142
4153
  let { minWidth: d, maxWidth: f } = a, u = a.width || 100;
4143
- d && u < d && (u = d), f && u > f && (u = f), a.children && (u = it(a.children).reduce((E, g) => E + ((g == null ? void 0 : g.width) || 100), 0));
4154
+ d && u < d && (u = d), f && u > f && (u = f), a.children && (u = it(a.children).reduce((m, g) => m + ((g == null ? void 0 : g.width) || 100), 0));
4144
4155
  const x = new ct(this.ctx, this.columnIndex, s, h, u, l, a);
4145
4156
  this.ctx.database.setHeader(a.key, x), this.allCellHeaders.push(x), a.children || (this.leafCellHeaders.push(x), x.column.widthFillDisable || this.resizeNum++), a.fixed === "left" ? this.fixedLeftCellHeaders.push(x) : a.fixed === "right" ? this.fixedRightCellHeaders.push(x) : this.centerCellHeaders.push(x), !a.children && this.columnIndex++, a.children && this.render(a.children, s), s += u;
4146
4157
  }
@@ -4325,33 +4336,33 @@ class ve {
4325
4336
  this.x = 0, u === "top" && o ? this.y = e.height + i.height : this.y = e.height;
4326
4337
  const { data: x, sumHeight: w } = s.getData();
4327
4338
  this.height = w, this.data = x, this.width = e.width, this.visibleWidth = this.ctx.stageWidth - r;
4328
- const E = this.ctx.footer.height;
4329
- !this.data.length && !a ? this.height = l : !this.data.length && a && (this.height = a - e.height - E - r);
4339
+ const m = this.ctx.footer.height;
4340
+ !this.data.length && !a ? this.height = l : !this.data.length && a && (this.height = a - e.height - m - r);
4330
4341
  let g = this.height + e.height + r;
4331
- g += E;
4332
- let m = g;
4342
+ g += m;
4343
+ let E = g;
4333
4344
  const y = window.innerHeight, { top: p } = this.containerRect || this.ctx.containerElement.getBoundingClientRect();
4334
4345
  if (y > p && d && !a) {
4335
4346
  const O = y - p - f;
4336
- O > e.height + r ? m = O : g > h && (m = h);
4337
- } else this.data.length && a ? m = a : this.data.length && h && g > h && (m = h);
4338
- m > 0 && (this.ctx.stageHeight = Math.floor(m), this.ctx.stageElement.style.height = `${this.ctx.stageHeight}px`);
4347
+ O > e.height + r ? E = O : g > h && (E = h);
4348
+ } else this.data.length && a ? E = a : this.data.length && h && g > h && (E = h);
4349
+ E > 0 && (this.ctx.stageHeight = Math.floor(E), this.ctx.stageElement.style.height = `${this.ctx.stageHeight}px`);
4339
4350
  let b = this.ctx.stageHeight - e.height - r;
4340
- o ? this.visibleHeight = b - E : this.visibleHeight = b, this.data.length || (this.height = this.visibleHeight), this.ctx.body.x = this.x, this.ctx.body.y = this.y, this.ctx.body.width = this.width, this.ctx.body.height = this.height, this.ctx.body.visibleWidth = this.visibleWidth, this.ctx.body.visibleHeight = this.visibleHeight, this.ctx.body.data = x;
4341
- const C = window.devicePixelRatio || 1, R = this.ctx.stageWidth * C, _ = this.ctx.stageHeight * C;
4342
- t.width = Math.round(R), t.height = Math.round(_);
4351
+ o ? this.visibleHeight = b - m : this.visibleHeight = b, this.data.length || (this.height = this.visibleHeight), this.ctx.body.x = this.x, this.ctx.body.y = this.y, this.ctx.body.width = this.width, this.ctx.body.height = this.height, this.ctx.body.visibleWidth = this.visibleWidth, this.ctx.body.visibleHeight = this.visibleHeight, this.ctx.body.data = x;
4352
+ const C = window.devicePixelRatio || 1, I = this.ctx.stageWidth * C, _ = this.ctx.stageHeight * C;
4353
+ t.width = Math.round(I), t.height = Math.round(_);
4343
4354
  const T = this.data.length ? "not-empty" : "empty";
4344
4355
  this.ctx.emit("emptyChange", {
4345
4356
  isEmpty: T,
4346
4357
  type: T,
4347
4358
  headerHeight: e.height,
4348
4359
  bodyHeight: this.height,
4349
- footerHeight: E,
4360
+ footerHeight: m,
4350
4361
  width: this.width,
4351
- height: this.data.length ? 0 : l + E
4362
+ height: this.data.length ? 0 : l + m
4352
4363
  });
4353
- const S = Math.round(t.width / C * 1e4) / 1e4, I = Math.round(t.height / C * 1e4) / 1e4;
4354
- this.ctx.canvasElement.setAttribute("style", `height:${I}px;width:${S}px;`), this.ctx.paint.scale(C);
4364
+ const S = Math.round(t.width / C * 1e4) / 1e4, R = Math.round(t.height / C * 1e4) / 1e4;
4365
+ this.ctx.canvasElement.setAttribute("style", `height:${R}px;width:${S}px;`), this.ctx.paint.scale(C);
4355
4366
  }
4356
4367
  // 调整行的高度
4357
4368
  initResizeRow() {
@@ -4475,7 +4486,7 @@ class ve {
4475
4486
  this.headIndex = Math.max(0, l), this.tailIndex = Math.min(this.ctx.maxRowIndex, h + 1), this.visibleRows = r.slice(this.headIndex, this.tailIndex + 1), this.ctx.body.headIndex = this.headIndex, this.ctx.body.tailIndex = this.tailIndex, this.ctx.body.visibleRows = this.visibleRows;
4476
4487
  const d = [];
4477
4488
  for (let f = 0; f < this.visibleRows.length; f++) {
4478
- const u = this.headIndex + f, x = this.visibleRows[f], { height: w, top: E } = this.ctx.database.getPositionForRowIndex(u), g = new Kt(this.ctx, u, 0, E + this.y, t.width, w, x);
4489
+ const u = this.headIndex + f, x = this.visibleRows[f], { height: w, top: m } = this.ctx.database.getPositionForRowIndex(u), g = new Kt(this.ctx, u, 0, m + this.y, t.width, w, x);
4479
4490
  d.push(g);
4480
4491
  }
4481
4492
  this.renderRows = d, this.ctx.body.renderRows = d;
@@ -4698,15 +4709,15 @@ class Oe {
4698
4709
  SELECTOR_AREA_MAX_Y: d,
4699
4710
  SELECTOR_AREA_MAX_X_OFFSET: f,
4700
4711
  SELECTOR_AREA_MAX_Y_OFFSET: u
4701
- } = this.ctx.config, x = a, w = l || this.ctx.maxColIndex - f, E = h, g = d || this.ctx.maxRowIndex - u;
4702
- let [m, y] = o, [p, b] = r;
4703
- if (m < x || y > w || p < E || b > g)
4712
+ } = this.ctx.config, x = a, w = l || this.ctx.maxColIndex - f, m = h, g = d || this.ctx.maxRowIndex - u;
4713
+ let [E, y] = o, [p, b] = r;
4714
+ if (E < x || y > w || p < m || b > g)
4704
4715
  return;
4705
4716
  if (this.ctx.stageElement.focus({ preventScroll: !0 }), this.ctx.config.ENABLE_MERGE_CELL_LINK) {
4706
- const R = this.adjustMergeCells(o, r);
4707
- p = R.yArr[0], b = R.yArr[1], m = R.xArr[0], y = R.xArr[1], this.ctx.onlyMergeCell = R.onlyMergeCell;
4717
+ const I = this.adjustMergeCells(o, r);
4718
+ p = I.yArr[0], b = I.yArr[1], E = I.xArr[0], y = I.xArr[1], this.ctx.onlyMergeCell = I.onlyMergeCell;
4708
4719
  }
4709
- m === y && p === b ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, o = [Math.max(x, m), Math.min(w, y)], r = [Math.max(E, p), Math.min(g, b)];
4720
+ E === y && p === b ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, o = [Math.max(x, E), Math.min(w, y)], r = [Math.max(m, p), Math.min(g, b)];
4710
4721
  const { BEFORE_SET_SELECTOR_METHOD: C } = this.ctx.config;
4711
4722
  if (typeof C == "function") {
4712
4723
  const _ = C({
@@ -4718,7 +4729,7 @@ class Oe {
4718
4729
  return;
4719
4730
  o = _.xArr, r = _.yArr;
4720
4731
  }
4721
- this.ctx.selector.xArr = o, this.ctx.selector.yArr = r, b === this.ctx.maxRowIndex && p === 0 ? this.ctx.selectColsIng = !0 : this.ctx.selectColsIng = !1, y === this.ctx.maxColIndex && m === 0 ? this.ctx.selectRowsIng = !0 : this.ctx.selectRowsIng = !1, this.ctx.emit("setSelector", this.ctx.selector), this.ctx.emit("drawView");
4732
+ this.ctx.selector.xArr = o, this.ctx.selector.yArr = r, b === this.ctx.maxRowIndex && p === 0 ? this.ctx.selectColsIng = !0 : this.ctx.selectColsIng = !1, y === this.ctx.maxColIndex && E === 0 ? this.ctx.selectRowsIng = !0 : this.ctx.selectRowsIng = !1, this.ctx.emit("setSelector", this.ctx.selector), this.ctx.emit("drawView");
4722
4733
  }
4723
4734
  }
4724
4735
  adjustMergeCells(t, e) {
@@ -4731,24 +4742,24 @@ class Oe {
4731
4742
  onlyMergeCell: !1
4732
4743
  };
4733
4744
  let a = [], l = [];
4734
- for (let E = 0; E <= e[1] - e[0]; E++)
4745
+ for (let m = 0; m <= e[1] - e[0]; m++)
4735
4746
  for (let g = 0; g <= t[1] - t[0]; g++) {
4736
- const m = E + e[0], y = g + t[0], p = this.ctx.database.getVirtualBodyCell(m, y);
4737
- p && ((m === i || m === s) && a.push(p), (y === o || y === r) && l.push(p));
4747
+ const E = m + e[0], y = g + t[0], p = this.ctx.database.getVirtualBodyCell(E, y);
4748
+ p && ((E === i || E === s) && a.push(p), (y === o || y === r) && l.push(p));
4738
4749
  }
4739
4750
  const h = a.reduce(
4740
- (E, g) => {
4741
- const { yArr: m } = g.getSpanInfo(), [y, p] = m;
4742
- return E.minY = Math.min(E.minY, y), E.maxY = Math.max(E.maxY, p), E;
4751
+ (m, g) => {
4752
+ const { yArr: E } = g.getSpanInfo(), [y, p] = E;
4753
+ return m.minY = Math.min(m.minY, y), m.maxY = Math.max(m.maxY, p), m;
4743
4754
  },
4744
4755
  {
4745
4756
  minY: i,
4746
4757
  maxY: s
4747
4758
  }
4748
4759
  ), d = l.reduce(
4749
- (E, g) => {
4750
- const { xArr: m } = g.getSpanInfo(), [y, p] = m;
4751
- return E.minX = Math.min(E.minX, y), E.maxX = Math.max(E.maxX, p), E;
4760
+ (m, g) => {
4761
+ const { xArr: E } = g.getSpanInfo(), [y, p] = E;
4762
+ return m.minX = Math.min(m.minX, y), m.maxX = Math.max(m.maxX, p), m;
4752
4763
  },
4753
4764
  {
4754
4765
  minX: o,
@@ -4757,8 +4768,8 @@ class Oe {
4757
4768
  ), f = [d.minX, d.maxX], u = [h.minY, h.maxY];
4758
4769
  let x = !1;
4759
4770
  if (d.minX !== d.maxX || h.minY !== h.maxY) {
4760
- const E = JSON.stringify(f) + JSON.stringify(u), g = (w = this.ctx.focusCell) == null ? void 0 : w.getSpanInfo();
4761
- x = (g && JSON.stringify(g.xArr) + JSON.stringify(g.yArr)) === E;
4771
+ const m = JSON.stringify(f) + JSON.stringify(u), g = (w = this.ctx.focusCell) == null ? void 0 : w.getSpanInfo();
4772
+ x = (g && JSON.stringify(g.xArr) + JSON.stringify(g.yArr)) === m;
4762
4773
  }
4763
4774
  return {
4764
4775
  xArr: f,
@@ -4948,8 +4959,8 @@ class Oe {
4948
4959
  overflowColCount: w,
4949
4960
  textArr: r
4950
4961
  });
4951
- const E = r.length === 1 && r[0].length === 1;
4952
- if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(a, l) && !E) {
4962
+ const m = r.length === 1 && r[0].length === 1;
4963
+ if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(a, l) && !m) {
4953
4964
  const p = {
4954
4965
  code: "ERR_MERGED_CELLS_PASTE",
4955
4966
  message: "Merged cells cannot span paste data"
@@ -4961,14 +4972,14 @@ class Oe {
4961
4972
  for (let p = 0; p <= r.length - 1; p++) {
4962
4973
  const b = r[p].length;
4963
4974
  for (let C = 0; C <= b - 1; C++) {
4964
- const R = p + e, _ = C + i, T = r[p][C], S = this.ctx.database.getItemValueForRowIndexAndColIndex(
4965
- R,
4975
+ const I = p + e, _ = C + i, T = r[p][C], S = this.ctx.database.getItemValueForRowIndexAndColIndex(
4976
+ I,
4966
4977
  _
4967
4978
  );
4968
4979
  if (S) {
4969
- const { rowKey: I, key: v } = S;
4970
- this.ctx.database.getReadonly(I, v) || (s.add(I), g.push({
4971
- rowKey: I,
4980
+ const { rowKey: R, key: v } = S;
4981
+ this.ctx.database.getReadonly(R, v) || (s.add(R), g.push({
4982
+ rowKey: R,
4972
4983
  key: v,
4973
4984
  value: T,
4974
4985
  row: {}
@@ -4990,9 +5001,9 @@ class Oe {
4990
5001
  }
4991
5002
  if (!g.length)
4992
5003
  return;
4993
- const { BEFORE_PASTE_DATA_METHOD: m } = this.ctx.config;
4994
- if (typeof m == "function") {
4995
- const p = m, b = g.map((C) => ({
5004
+ const { BEFORE_PASTE_DATA_METHOD: E } = this.ctx.config;
5005
+ if (typeof E == "function") {
5006
+ const p = E, b = g.map((C) => ({
4996
5007
  rowKey: C.rowKey,
4997
5008
  key: C.key,
4998
5009
  value: C.value,
@@ -5072,14 +5083,14 @@ class Oe {
5072
5083
  if (!i)
5073
5084
  return;
5074
5085
  w && this.ctx.onlyMergeCell && i.updateSpanInfo();
5075
- const { drawX: E, drawY: g, width: m, height: y, fixed: p } = i, b = o - E + 1, C = i.drawX + m - (e - s) + 1;
5076
- let R = r.height - g, _ = y;
5086
+ const { drawX: m, drawY: g, width: E, height: y, fixed: p } = i, b = o - m + 1, C = i.drawX + E - (e - s) + 1;
5087
+ let I = r.height - g, _ = y;
5077
5088
  _ > l.visibleHeight && (_ = l.visibleHeight);
5078
5089
  let T = 0;
5079
- u && (x === "top" ? R = r.height + a.height - g : T = a.visibleHeight);
5090
+ u && (x === "top" ? I = r.height + a.height - g : T = a.visibleHeight);
5080
5091
  const S = g + _ - (t - T - f);
5081
- let I = h, v = d;
5082
- C > 0 && !p ? I = Math.floor(h + C) : b > 0 && !p && (I = Math.floor(h - b)), R > 0 ? v = Math.floor(d - R) : S > 0 && (v = Math.floor(d + S)), (Math.abs(h - I) > 2 || Math.abs(d - v) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(I, v), this.ctx.emit("adjustBoundaryPosition", i));
5092
+ let R = h, v = d;
5093
+ C > 0 && !p ? R = Math.floor(h + C) : b > 0 && !p && (R = Math.floor(h - b)), I > 0 ? v = Math.floor(d - I) : S > 0 && (v = Math.floor(d + S)), (Math.abs(h - R) > 2 || Math.abs(d - v) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(R, v), this.ctx.emit("adjustBoundaryPosition", i));
5083
5094
  }
5084
5095
  destroy() {
5085
5096
  }
@@ -5142,14 +5153,14 @@ class Le {
5142
5153
  SELECTOR_AREA_MAX_Y: f,
5143
5154
  SELECTOR_AREA_MAX_X_OFFSET: u,
5144
5155
  SELECTOR_AREA_MAX_Y_OFFSET: x
5145
- } = this.ctx.config, w = l, E = h || this.ctx.maxColIndex - u, g = d, m = f || this.ctx.maxRowIndex - x;
5156
+ } = this.ctx.config, w = l, m = h || this.ctx.maxColIndex - u, g = d, E = f || this.ctx.maxRowIndex - x;
5146
5157
  let [y, p] = r, [b, C] = a;
5147
5158
  if (y < w || b < g)
5148
5159
  return;
5149
- r = [Math.max(w, y), Math.min(E, p)], a = [Math.max(g, b), Math.min(m, C)];
5150
- const { BEFORE_SET_AUTOFILL_METHOD: R } = this.ctx.config;
5151
- if (typeof R == "function") {
5152
- const T = R({
5160
+ r = [Math.max(w, y), Math.min(m, p)], a = [Math.max(g, b), Math.min(E, C)];
5161
+ const { BEFORE_SET_AUTOFILL_METHOD: I } = this.ctx.config;
5162
+ if (typeof I == "function") {
5163
+ const T = I({
5153
5164
  focusCell: this.ctx.focusCell,
5154
5165
  xArr: r,
5155
5166
  yArr: a
@@ -5168,8 +5179,8 @@ class Le {
5168
5179
  const t = /* @__PURE__ */ new Set(), e = this.ctx.getSelectedData(), i = /* @__PURE__ */ new Map();
5169
5180
  for (let x = 0; x <= e.yArr[1] - e.yArr[0]; x++)
5170
5181
  for (let w = 0; w <= e.xArr[1] - e.xArr[0]; w++) {
5171
- const E = x + e.yArr[0], g = w + e.xArr[0];
5172
- i.set(`${E}-${g}`, !0);
5182
+ const m = x + e.yArr[0], g = w + e.xArr[0];
5183
+ i.set(`${m}-${g}`, !0);
5173
5184
  }
5174
5185
  const { value: s } = e, o = s[0].length, r = s.length, a = this.ctx.autofill.xArr, l = this.ctx.autofill.yArr, h = o === 1 && r === 1;
5175
5186
  if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(a, l) && !h) {
@@ -5183,13 +5194,13 @@ class Le {
5183
5194
  let d = [];
5184
5195
  for (let x = 0; x <= l[1] - l[0]; x++)
5185
5196
  for (let w = 0; w <= a[1] - a[0]; w++) {
5186
- const E = w + a[0], g = x + l[0], m = s[x % r][w % o], y = this.ctx.database.getItemValueForRowIndexAndColIndex(g, E), p = `${g}-${E}`;
5197
+ const m = w + a[0], g = x + l[0], E = s[x % r][w % o], y = this.ctx.database.getItemValueForRowIndexAndColIndex(g, m), p = `${g}-${m}`;
5187
5198
  if (y && !i.has(p)) {
5188
5199
  const { rowKey: b, key: C } = y;
5189
5200
  this.ctx.database.getReadonly(b, C) || (t.add(b), d.push({
5190
5201
  rowKey: b,
5191
5202
  key: C,
5192
- value: m,
5203
+ value: E,
5193
5204
  row: {}
5194
5205
  }));
5195
5206
  }
@@ -5199,12 +5210,12 @@ class Le {
5199
5210
  this.ctx.selector.xArr = this.ctx.autofill.xArr, this.ctx.selector.yArr = this.ctx.autofill.yArr;
5200
5211
  const { BEFORE_AUTOFILL_DATA_METHOD: f } = this.ctx.config;
5201
5212
  if (typeof f == "function") {
5202
- const x = f, w = d.map((E) => ({
5203
- rowKey: E.rowKey,
5204
- key: E.key,
5205
- value: E.value,
5206
- oldValue: this.ctx.database.getItemValue(E.rowKey, E.key),
5207
- row: this.ctx.database.getRowDataItemForRowKey(E.rowKey)
5213
+ const x = f, w = d.map((m) => ({
5214
+ rowKey: m.rowKey,
5215
+ key: m.key,
5216
+ value: m.value,
5217
+ oldValue: this.ctx.database.getItemValue(m.rowKey, m.key),
5218
+ row: this.ctx.database.getRowDataItemForRowKey(m.rowKey)
5208
5219
  }));
5209
5220
  if (d = await x(w, a, l), d && !d.length)
5210
5221
  return;
@@ -5251,7 +5262,7 @@ function z(c) {
5251
5262
  function tt(c) {
5252
5263
  return c.split("-")[1];
5253
5264
  }
5254
- function Wt(c) {
5265
+ function Ft(c) {
5255
5266
  return c === "x" ? "y" : "x";
5256
5267
  }
5257
5268
  function wt(c) {
@@ -5261,12 +5272,12 @@ const He = /* @__PURE__ */ new Set(["top", "bottom"]);
5261
5272
  function V(c) {
5262
5273
  return He.has(z(c)) ? "y" : "x";
5263
5274
  }
5264
- function Et(c) {
5265
- return Wt(V(c));
5275
+ function mt(c) {
5276
+ return Ft(V(c));
5266
5277
  }
5267
5278
  function De(c, t, e) {
5268
5279
  e === void 0 && (e = !1);
5269
- const i = tt(c), s = Et(c), o = wt(s);
5280
+ const i = tt(c), s = mt(c), o = wt(s);
5270
5281
  let r = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
5271
5282
  return t.reference[o] > t.floating[o] && (r = ot(r)), [r, ot(r)];
5272
5283
  }
@@ -5307,7 +5318,7 @@ function Ke(c) {
5307
5318
  ...c
5308
5319
  };
5309
5320
  }
5310
- function Ft(c) {
5321
+ function Wt(c) {
5311
5322
  return typeof c != "number" ? Ke(c) : {
5312
5323
  top: c,
5313
5324
  right: c,
@@ -5338,7 +5349,7 @@ function Lt(c, t, e) {
5338
5349
  reference: i,
5339
5350
  floating: s
5340
5351
  } = c;
5341
- const o = V(t), r = Et(t), a = wt(r), l = z(t), h = o === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, u = i[a] / 2 - s[a] / 2;
5352
+ const o = V(t), r = mt(t), a = wt(r), l = z(t), h = o === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, u = i[a] / 2 - s[a] / 2;
5342
5353
  let x;
5343
5354
  switch (l) {
5344
5355
  case "top":
@@ -5381,7 +5392,7 @@ function Lt(c, t, e) {
5381
5392
  }
5382
5393
  return x;
5383
5394
  }
5384
- const We = async (c, t, e) => {
5395
+ const Fe = async (c, t, e) => {
5385
5396
  const {
5386
5397
  placement: i = "bottom",
5387
5398
  strategy: s = "absolute",
@@ -5396,16 +5407,16 @@ const We = async (c, t, e) => {
5396
5407
  x: d,
5397
5408
  y: f
5398
5409
  } = Lt(h, i, l), u = i, x = {}, w = 0;
5399
- for (let E = 0; E < a.length; E++) {
5410
+ for (let m = 0; m < a.length; m++) {
5400
5411
  const {
5401
5412
  name: g,
5402
- fn: m
5403
- } = a[E], {
5413
+ fn: E
5414
+ } = a[m], {
5404
5415
  x: y,
5405
5416
  y: p,
5406
5417
  data: b,
5407
5418
  reset: C
5408
- } = await m({
5419
+ } = await E({
5409
5420
  x: d,
5410
5421
  y: f,
5411
5422
  initialPlacement: i,
@@ -5432,7 +5443,7 @@ const We = async (c, t, e) => {
5432
5443
  }) : C.rects), {
5433
5444
  x: d,
5434
5445
  y: f
5435
- } = Lt(h, u, l)), E = -1);
5446
+ } = Lt(h, u, l)), m = -1);
5436
5447
  }
5437
5448
  return {
5438
5449
  x: d,
@@ -5458,7 +5469,7 @@ async function Vt(c, t) {
5458
5469
  elementContext: f = "floating",
5459
5470
  altBoundary: u = !1,
5460
5471
  padding: x = 0
5461
- } = Q(t, c), w = Ft(x), g = a[u ? f === "floating" ? "reference" : "floating" : f], m = rt(await o.getClippingRect({
5472
+ } = Q(t, c), w = Wt(x), g = a[u ? f === "floating" ? "reference" : "floating" : f], E = rt(await o.getClippingRect({
5462
5473
  element: (e = await (o.isElement == null ? void 0 : o.isElement(g))) == null || e ? g : g.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(a.floating)),
5463
5474
  boundary: h,
5464
5475
  rootBoundary: d,
@@ -5481,13 +5492,13 @@ async function Vt(c, t) {
5481
5492
  strategy: l
5482
5493
  }) : y);
5483
5494
  return {
5484
- top: (m.top - C.top + w.top) / b.y,
5485
- bottom: (C.bottom - m.bottom + w.bottom) / b.y,
5486
- left: (m.left - C.left + w.left) / b.x,
5487
- right: (C.right - m.right + w.right) / b.x
5495
+ top: (E.top - C.top + w.top) / b.y,
5496
+ bottom: (C.bottom - E.bottom + w.bottom) / b.y,
5497
+ left: (E.left - C.left + w.left) / b.x,
5498
+ right: (C.right - E.right + w.right) / b.x
5488
5499
  };
5489
5500
  }
5490
- const Fe = (c) => ({
5501
+ const We = (c) => ({
5491
5502
  name: "arrow",
5492
5503
  options: c,
5493
5504
  async fn(t) {
@@ -5505,13 +5516,13 @@ const Fe = (c) => ({
5505
5516
  } = Q(c, t) || {};
5506
5517
  if (h == null)
5507
5518
  return {};
5508
- const f = Ft(d), u = {
5519
+ const f = Wt(d), u = {
5509
5520
  x: e,
5510
5521
  y: i
5511
- }, x = Et(s), w = wt(x), E = await r.getDimensions(h), g = x === "y", m = g ? "top" : "left", y = g ? "bottom" : "right", p = g ? "clientHeight" : "clientWidth", b = o.reference[w] + o.reference[x] - u[x] - o.floating[w], C = u[x] - o.reference[x], R = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(h));
5512
- let _ = R ? R[p] : 0;
5513
- (!_ || !await (r.isElement == null ? void 0 : r.isElement(R))) && (_ = a.floating[p] || o.floating[w]);
5514
- const T = b / 2 - C / 2, S = _ / 2 - E[w] / 2 - 1, I = q(f[m], S), v = q(f[y], S), O = I, A = _ - E[w] - v, L = _ / 2 - E[w] / 2 + T, M = dt(O, L, A), D = !l.arrow && tt(s) != null && L !== M && o.reference[w] / 2 - (L < O ? I : v) - E[w] / 2 < 0, H = D ? L < O ? L - O : L - A : 0;
5522
+ }, x = mt(s), w = wt(x), m = await r.getDimensions(h), g = x === "y", E = g ? "top" : "left", y = g ? "bottom" : "right", p = g ? "clientHeight" : "clientWidth", b = o.reference[w] + o.reference[x] - u[x] - o.floating[w], C = u[x] - o.reference[x], I = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(h));
5523
+ let _ = I ? I[p] : 0;
5524
+ (!_ || !await (r.isElement == null ? void 0 : r.isElement(I))) && (_ = a.floating[p] || o.floating[w]);
5525
+ const T = b / 2 - C / 2, S = _ / 2 - m[w] / 2 - 1, R = q(f[E], S), v = q(f[y], S), O = R, A = _ - m[w] - v, L = _ / 2 - m[w] / 2 + T, M = dt(O, L, A), D = !l.arrow && tt(s) != null && L !== M && o.reference[w] / 2 - (L < O ? R : v) - m[w] / 2 < 0, H = D ? L < O ? L - O : L - A : 0;
5515
5526
  return {
5516
5527
  [x]: u[x] + H,
5517
5528
  data: {
@@ -5543,20 +5554,20 @@ const Fe = (c) => ({
5543
5554
  fallbackPlacements: u,
5544
5555
  fallbackStrategy: x = "bestFit",
5545
5556
  fallbackAxisSideDirection: w = "none",
5546
- flipAlignment: E = !0,
5557
+ flipAlignment: m = !0,
5547
5558
  ...g
5548
5559
  } = Q(c, t);
5549
5560
  if ((e = o.arrow) != null && e.alignmentOffset)
5550
5561
  return {};
5551
- const m = z(s), y = V(a), p = z(a) === a, b = await (l.isRTL == null ? void 0 : l.isRTL(h.floating)), C = u || (p || !E ? [ot(a)] : Ne(a)), R = w !== "none";
5552
- !u && R && C.push(...Be(a, E, w, b));
5562
+ const E = z(s), y = V(a), p = z(a) === a, b = await (l.isRTL == null ? void 0 : l.isRTL(h.floating)), C = u || (p || !m ? [ot(a)] : Ne(a)), I = w !== "none";
5563
+ !u && I && C.push(...Be(a, m, w, b));
5553
5564
  const _ = [a, ...C], T = await Vt(t, g), S = [];
5554
- let I = ((i = o.flip) == null ? void 0 : i.overflows) || [];
5555
- if (d && S.push(T[m]), f) {
5565
+ let R = ((i = o.flip) == null ? void 0 : i.overflows) || [];
5566
+ if (d && S.push(T[E]), f) {
5556
5567
  const L = De(s, r, b);
5557
5568
  S.push(T[L[0]], T[L[1]]);
5558
5569
  }
5559
- if (I = [...I, {
5570
+ if (R = [...R, {
5560
5571
  placement: s,
5561
5572
  overflows: S
5562
5573
  }], !S.every((L) => L <= 0)) {
@@ -5564,30 +5575,30 @@ const Fe = (c) => ({
5564
5575
  const L = (((v = o.flip) == null ? void 0 : v.index) || 0) + 1, M = _[L];
5565
5576
  if (M && (!(f === "alignment" ? y !== V(M) : !1) || // We leave the current main axis only if every placement on that axis
5566
5577
  // overflows the main axis.
5567
- I.every((k) => V(k.placement) === y ? k.overflows[0] > 0 : !0)))
5578
+ R.every((k) => V(k.placement) === y ? k.overflows[0] > 0 : !0)))
5568
5579
  return {
5569
5580
  data: {
5570
5581
  index: L,
5571
- overflows: I
5582
+ overflows: R
5572
5583
  },
5573
5584
  reset: {
5574
5585
  placement: M
5575
5586
  }
5576
5587
  };
5577
- let D = (O = I.filter((H) => H.overflows[0] <= 0).sort((H, k) => H.overflows[1] - k.overflows[1])[0]) == null ? void 0 : O.placement;
5588
+ let D = (O = R.filter((H) => H.overflows[0] <= 0).sort((H, k) => H.overflows[1] - k.overflows[1])[0]) == null ? void 0 : O.placement;
5578
5589
  if (!D)
5579
5590
  switch (x) {
5580
5591
  case "bestFit": {
5581
5592
  var A;
5582
- const H = (A = I.filter((k) => {
5583
- if (R) {
5584
- const F = V(k.placement);
5585
- return F === y || // Create a bias to the `y` side axis due to horizontal
5593
+ const H = (A = R.filter((k) => {
5594
+ if (I) {
5595
+ const W = V(k.placement);
5596
+ return W === y || // Create a bias to the `y` side axis due to horizontal
5586
5597
  // reading directions favoring greater width.
5587
- F === "y";
5598
+ W === "y";
5588
5599
  }
5589
5600
  return !0;
5590
- }).map((k) => [k.placement, k.overflows.filter((F) => F > 0).reduce((F, se) => F + se, 0)]).sort((k, F) => k[1] - F[1])[0]) == null ? void 0 : A[0];
5601
+ }).map((k) => [k.placement, k.overflows.filter((W) => W > 0).reduce((W, se) => W + se, 0)]).sort((k, W) => k[1] - W[1])[0]) == null ? void 0 : A[0];
5591
5602
  H && (D = H);
5592
5603
  break;
5593
5604
  }
@@ -5670,11 +5681,11 @@ const $e = function(c) {
5670
5681
  limiter: a = {
5671
5682
  fn: (g) => {
5672
5683
  let {
5673
- x: m,
5684
+ x: E,
5674
5685
  y
5675
5686
  } = g;
5676
5687
  return {
5677
- x: m,
5688
+ x: E,
5678
5689
  y
5679
5690
  };
5680
5691
  }
@@ -5683,26 +5694,26 @@ const $e = function(c) {
5683
5694
  } = Q(c, t), h = {
5684
5695
  x: e,
5685
5696
  y: i
5686
- }, d = await Vt(t, l), f = V(z(s)), u = Wt(f);
5697
+ }, d = await Vt(t, l), f = V(z(s)), u = Ft(f);
5687
5698
  let x = h[u], w = h[f];
5688
5699
  if (o) {
5689
- const g = u === "y" ? "top" : "left", m = u === "y" ? "bottom" : "right", y = x + d[g], p = x - d[m];
5700
+ const g = u === "y" ? "top" : "left", E = u === "y" ? "bottom" : "right", y = x + d[g], p = x - d[E];
5690
5701
  x = dt(y, x, p);
5691
5702
  }
5692
5703
  if (r) {
5693
- const g = f === "y" ? "top" : "left", m = f === "y" ? "bottom" : "right", y = w + d[g], p = w - d[m];
5704
+ const g = f === "y" ? "top" : "left", E = f === "y" ? "bottom" : "right", y = w + d[g], p = w - d[E];
5694
5705
  w = dt(y, w, p);
5695
5706
  }
5696
- const E = a.fn({
5707
+ const m = a.fn({
5697
5708
  ...t,
5698
5709
  [u]: x,
5699
5710
  [f]: w
5700
5711
  });
5701
5712
  return {
5702
- ...E,
5713
+ ...m,
5703
5714
  data: {
5704
- x: E.x - e,
5705
- y: E.y - i,
5715
+ x: m.x - e,
5716
+ y: m.y - i,
5706
5717
  enabled: {
5707
5718
  [u]: o,
5708
5719
  [f]: r
@@ -5722,7 +5733,7 @@ function N(c) {
5722
5733
  var t;
5723
5734
  return (c == null || (t = c.ownerDocument) == null ? void 0 : t.defaultView) || window;
5724
5735
  }
5725
- function W(c) {
5736
+ function F(c) {
5726
5737
  var t;
5727
5738
  return (t = (Pt(c) ? c.ownerDocument : c.document) || window.document) == null ? void 0 : t.documentElement;
5728
5739
  }
@@ -5763,14 +5774,14 @@ function at(c) {
5763
5774
  });
5764
5775
  }
5765
5776
  const Je = ["transform", "translate", "scale", "rotate", "perspective"], Qe = ["transform", "translate", "scale", "rotate", "perspective", "filter"], ti = ["paint", "layout", "strict", "content"];
5766
- function mt(c) {
5777
+ function Et(c) {
5767
5778
  const t = pt(), e = X(c) ? Y(c) : c;
5768
5779
  return Je.some((i) => e[i] ? e[i] !== "none" : !1) || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || Qe.some((i) => (e.willChange || "").includes(i)) || ti.some((i) => (e.contain || "").includes(i));
5769
5780
  }
5770
5781
  function ei(c) {
5771
5782
  let t = P(c);
5772
5783
  for (; K(t) && !U(t); ) {
5773
- if (mt(t))
5784
+ if (Et(t))
5774
5785
  return t;
5775
5786
  if (at(t))
5776
5787
  return null;
@@ -5805,7 +5816,7 @@ function P(c) {
5805
5816
  c.assignedSlot || // DOM Element detected.
5806
5817
  c.parentNode || // ShadowRoot detected.
5807
5818
  At(c) && c.host || // Fallback.
5808
- W(c)
5819
+ F(c)
5809
5820
  );
5810
5821
  return At(t) ? t.host : t;
5811
5822
  }
@@ -5870,10 +5881,10 @@ function J(c, t, e, i) {
5870
5881
  let l = (s.left + a.x) / r.x, h = (s.top + a.y) / r.y, d = s.width / r.x, f = s.height / r.y;
5871
5882
  if (o) {
5872
5883
  const u = N(o), x = i && X(i) ? N(i) : i;
5873
- let w = u, E = xt(w);
5874
- for (; E && i && x !== w; ) {
5875
- const g = G(E), m = E.getBoundingClientRect(), y = Y(E), p = m.left + (E.clientLeft + parseFloat(y.paddingLeft)) * g.x, b = m.top + (E.clientTop + parseFloat(y.paddingTop)) * g.y;
5876
- l *= g.x, h *= g.y, d *= g.x, f *= g.y, l += p, h += b, w = N(E), E = xt(w);
5884
+ let w = u, m = xt(w);
5885
+ for (; m && i && x !== w; ) {
5886
+ const g = G(m), E = m.getBoundingClientRect(), y = Y(m), p = E.left + (m.clientLeft + parseFloat(y.paddingLeft)) * g.x, b = E.top + (m.clientTop + parseFloat(y.paddingTop)) * g.y;
5887
+ l *= g.x, h *= g.y, d *= g.x, f *= g.y, l += p, h += b, w = N(m), m = xt(w);
5877
5888
  }
5878
5889
  }
5879
5890
  return rt({
@@ -5885,7 +5896,7 @@ function J(c, t, e, i) {
5885
5896
  }
5886
5897
  function yt(c, t) {
5887
5898
  const e = lt(c).scrollLeft;
5888
- return t ? t.left + e : J(W(c)).left + e;
5899
+ return t ? t.left + e : J(F(c)).left + e;
5889
5900
  }
5890
5901
  function Zt(c, t, e) {
5891
5902
  e === void 0 && (e = !1);
@@ -5905,7 +5916,7 @@ function ri(c) {
5905
5916
  offsetParent: i,
5906
5917
  strategy: s
5907
5918
  } = c;
5908
- const o = s === "fixed", r = W(i), a = t ? at(t.floating) : !1;
5919
+ const o = s === "fixed", r = F(i), a = t ? at(t.floating) : !1;
5909
5920
  if (i === r || a && o)
5910
5921
  return e;
5911
5922
  let l = {
@@ -5929,7 +5940,7 @@ function ni(c) {
5929
5940
  return Array.from(c.getClientRects());
5930
5941
  }
5931
5942
  function ai(c) {
5932
- const t = W(c), e = lt(c), i = c.ownerDocument.body, s = $(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = $(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5943
+ const t = F(c), e = lt(c), i = c.ownerDocument.body, s = $(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = $(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5933
5944
  let r = -e.scrollLeft + yt(c);
5934
5945
  const a = -e.scrollTop;
5935
5946
  return Y(i).direction === "rtl" && (r += $(t.clientWidth, i.clientWidth) - s), {
@@ -5940,7 +5951,7 @@ function ai(c) {
5940
5951
  };
5941
5952
  }
5942
5953
  function li(c, t) {
5943
- const e = N(c), i = W(c), s = e.visualViewport;
5954
+ const e = N(c), i = F(c), s = e.visualViewport;
5944
5955
  let o = i.clientWidth, r = i.clientHeight, a = 0, l = 0;
5945
5956
  if (s) {
5946
5957
  o = s.width, r = s.height;
@@ -5969,7 +5980,7 @@ function Mt(c, t, e) {
5969
5980
  if (t === "viewport")
5970
5981
  i = li(c, e);
5971
5982
  else if (t === "document")
5972
- i = ai(W(c));
5983
+ i = ai(F(c));
5973
5984
  else if (X(t))
5974
5985
  i = ci(t, e);
5975
5986
  else {
@@ -5995,7 +6006,7 @@ function di(c, t) {
5995
6006
  const o = Y(c).position === "fixed";
5996
6007
  let r = o ? P(c) : c;
5997
6008
  for (; X(r) && !U(r); ) {
5998
- const a = Y(r), l = mt(r);
6009
+ const a = Y(r), l = Et(r);
5999
6010
  !l && a.position === "fixed" && (s = null), (o ? !l && !s : !l && a.position === "static" && !!s && hi.has(s.position) || et(r) && !l && qt(c, r)) ? i = i.filter((d) => d !== r) : s = a, r = P(r);
6000
6011
  }
6001
6012
  return t.set(c, i), i;
@@ -6029,7 +6040,7 @@ function xi(c) {
6029
6040
  };
6030
6041
  }
6031
6042
  function ui(c, t, e) {
6032
- const i = K(t), s = W(t), o = e === "fixed", r = J(c, !0, o, t);
6043
+ const i = K(t), s = F(t), o = e === "fixed", r = J(c, !0, o, t);
6033
6044
  let a = {
6034
6045
  scrollLeft: 0,
6035
6046
  scrollTop: 0
@@ -6061,7 +6072,7 @@ function Ht(c, t) {
6061
6072
  if (t)
6062
6073
  return t(c);
6063
6074
  let e = c.offsetParent;
6064
- return W(c) === e && (e = e.ownerDocument.body), e;
6075
+ return F(c) === e && (e = e.ownerDocument.body), e;
6065
6076
  }
6066
6077
  function Jt(c, t) {
6067
6078
  const e = N(c);
@@ -6079,7 +6090,7 @@ function Jt(c, t) {
6079
6090
  let i = Ht(c, t);
6080
6091
  for (; i && Ze(i) && ht(i); )
6081
6092
  i = Ht(i, t);
6082
- return i && U(i) && ht(i) && !mt(i) ? e : i || ei(c) || e;
6093
+ return i && U(i) && ht(i) && !Et(i) ? e : i || ei(c) || e;
6083
6094
  }
6084
6095
  const gi = async function(c) {
6085
6096
  const t = this.getOffsetParent || Jt, e = this.getDimensions, i = await e(c.floating);
@@ -6096,9 +6107,9 @@ const gi = async function(c) {
6096
6107
  function wi(c) {
6097
6108
  return Y(c).direction === "rtl";
6098
6109
  }
6099
- const Ei = {
6110
+ const mi = {
6100
6111
  convertOffsetParentRelativeRectToViewportRelativeRect: ri,
6101
- getDocumentElement: W,
6112
+ getDocumentElement: F,
6102
6113
  getClippingRect: fi,
6103
6114
  getOffsetParent: Jt,
6104
6115
  getElementRects: gi,
@@ -6107,15 +6118,15 @@ const Ei = {
6107
6118
  getScale: G,
6108
6119
  isElement: X,
6109
6120
  isRTL: wi
6110
- }, Qt = $e, te = Ge, ee = Ve, mi = Fe, ie = (c, t, e) => {
6121
+ }, Qt = $e, te = Ge, ee = Ve, Ei = We, ie = (c, t, e) => {
6111
6122
  const i = /* @__PURE__ */ new Map(), s = {
6112
- platform: Ei,
6123
+ platform: mi,
6113
6124
  ...e
6114
6125
  }, o = {
6115
6126
  ...s.platform,
6116
6127
  _c: i
6117
6128
  };
6118
- return We(c, t, {
6129
+ return Fe(c, t, {
6119
6130
  ...s,
6120
6131
  platform: o
6121
6132
  });
@@ -6197,7 +6208,7 @@ let pi = class {
6197
6208
  }
6198
6209
  }, this.floatingEl, {
6199
6210
  placement: t.overflowTooltipPlacement,
6200
- middleware: [te(), ee(), Qt(6), mi({ element: this.arrowEl })]
6211
+ middleware: [te(), ee(), Qt(6), Ei({ element: this.arrowEl })]
6201
6212
  }).then((a) => {
6202
6213
  const { x: l, y: h, placement: d, middlewareData: f } = a;
6203
6214
  if (Object.assign(this.floatingEl.style, {
@@ -6565,8 +6576,8 @@ class bi {
6565
6576
  const t = [], e = [], i = [];
6566
6577
  let s = this.ctx.body.renderRows;
6567
6578
  this.ctx.config.FOOTER_FIXED || (s = s.concat(this.ctx.footer.renderRows)), s.forEach((g) => {
6568
- g.cells.forEach((m) => {
6569
- m.cellType === "footer" && (m.render = m.renderFooter), m.render && (m.fixed === "left" ? e.push(m) : m.fixed === "right" ? i.push(m) : t.push(m));
6579
+ g.cells.forEach((E) => {
6580
+ E.cellType === "footer" && (E.render = E.renderFooter), E.render && (E.fixed === "left" ? e.push(E) : E.fixed === "right" ? i.push(E) : t.push(E));
6570
6581
  });
6571
6582
  });
6572
6583
  const {
@@ -6621,8 +6632,8 @@ class bi {
6621
6632
  }
6622
6633
  getFooter() {
6623
6634
  const t = [], e = [], i = [];
6624
- this.ctx.footer.renderRows.forEach((E) => {
6625
- E.cells.forEach((g) => {
6635
+ this.ctx.footer.renderRows.forEach((m) => {
6636
+ m.cells.forEach((g) => {
6626
6637
  g.cellType === "footer" && g.renderFooter && (g.render = g.renderFooter, g.fixed === "left" ? e.push(g) : g.fixed === "right" ? i.push(g) : t.push(g));
6627
6638
  });
6628
6639
  });
@@ -6677,7 +6688,7 @@ class bi {
6677
6688
  };
6678
6689
  }
6679
6690
  }
6680
- class Ii {
6691
+ class Ri {
6681
6692
  constructor(t) {
6682
6693
  n(this, "ctx");
6683
6694
  n(this, "contextMenuEl");
@@ -6737,12 +6748,14 @@ class Ii {
6737
6748
  }
6738
6749
  //创建右键菜单子项元素
6739
6750
  createContextMenuItems(t, e) {
6740
- this.contextMenuEl.replaceChildren(), t.forEach((i) => {
6741
- const s = document.createElement("div");
6742
- s.className = "e-virt-table-context-menu-item", s.innerText = i.label, i.event ? s.onclick = () => {
6743
- i.event && i.event(), e(i);
6744
- } : s.onclick = () => e(i), this.contextMenuEl.appendChild(s);
6745
- });
6751
+ this.contextMenuEl.replaceChildren();
6752
+ const i = document.createDocumentFragment();
6753
+ t.forEach((s) => {
6754
+ const o = document.createElement("div");
6755
+ o.className = "e-virt-table-context-menu-item", o.innerText = s.label, s.event ? o.onclick = () => {
6756
+ s.event && s.event(), e(s);
6757
+ } : o.onclick = () => e(s), i.appendChild(o);
6758
+ }), this.contextMenuEl.appendChild(i);
6746
6759
  }
6747
6760
  show(t, e) {
6748
6761
  Object.assign(this.contextMenuEl.style, {
@@ -6763,7 +6776,7 @@ class Ii {
6763
6776
  this.contextMenuEl.remove();
6764
6777
  }
6765
6778
  }
6766
- class Ri {
6779
+ class Ii {
6767
6780
  constructor(t) {
6768
6781
  n(this, "ctx");
6769
6782
  n(this, "loadingEl");
@@ -6817,7 +6830,7 @@ class Ti {
6817
6830
  o,
6818
6831
  r
6819
6832
  );
6820
- this.ctx = new Re(a, this.options), this.header = new _e(this.ctx), this.footer = new Te(this.ctx), this.body = new ve(this.ctx), this.scroller = new Se(this.ctx), this.selector = new Oe(this.ctx), this.autofill = new Le(this.ctx), this.tooltip = new pi(this.ctx), this.empty = new Ci(this.ctx), this.editor = new yi(this.ctx), this.overlayer = new bi(this.ctx), this.contextMenu = new Ii(this.ctx), this.loading = new Ri(this.ctx), this.ctx.on(
6833
+ this.ctx = new Ie(a, this.options), this.header = new _e(this.ctx), this.footer = new Te(this.ctx), this.body = new ve(this.ctx), this.scroller = new Se(this.ctx), this.selector = new Oe(this.ctx), this.autofill = new Le(this.ctx), this.tooltip = new pi(this.ctx), this.empty = new Ci(this.ctx), this.editor = new yi(this.ctx), this.overlayer = new bi(this.ctx), this.contextMenu = new Ri(this.ctx), this.loading = new Ii(this.ctx), this.ctx.on(
6821
6834
  "draw",
6822
6835
  Z(
6823
6836
  () => {