e-virt-table 1.2.6 → 1.2.8

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
@@ -25,7 +25,7 @@ function st(a, t) {
25
25
  return i.__proto__ = s, i;
26
26
  }, st(a, t);
27
27
  }
28
- function _e() {
28
+ function Ie() {
29
29
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
30
30
  if (typeof Proxy == "function") return !0;
31
31
  try {
@@ -36,20 +36,20 @@ function _e() {
36
36
  }
37
37
  }
38
38
  function dt(a, t, e) {
39
- return _e() ? dt = Reflect.construct.bind() : dt = function(s, r, o) {
39
+ return Ie() ? dt = Reflect.construct.bind() : dt = function(s, r, o) {
40
40
  var n = [null];
41
41
  n.push.apply(n, r);
42
42
  var h = Function.bind.apply(s, n), c = new h();
43
43
  return o && st(c, o.prototype), c;
44
44
  }, dt.apply(null, arguments);
45
45
  }
46
- function Ie(a) {
46
+ function _e(a) {
47
47
  return Function.toString.call(a).indexOf("[native code]") !== -1;
48
48
  }
49
49
  function Ct(a) {
50
50
  var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
51
51
  return Ct = function(i) {
52
- if (i === null || !Ie(i)) return i;
52
+ if (i === null || !_e(i)) return i;
53
53
  if (typeof i != "function")
54
54
  throw new TypeError("Super expression must either be null or a function");
55
55
  if (typeof t < "u") {
@@ -131,7 +131,7 @@ function Se(a, t, e) {
131
131
  t(n, o);
132
132
  });
133
133
  }
134
- function Ft(a, t, e) {
134
+ function Xt(a, t, e) {
135
135
  var i = 0, s = a.length;
136
136
  function r(o) {
137
137
  if (o && o.length) {
@@ -149,7 +149,7 @@ function Ae(a) {
149
149
  t.push.apply(t, a[e] || []);
150
150
  }), t;
151
151
  }
152
- var Xt = /* @__PURE__ */ function(a) {
152
+ var Ft = /* @__PURE__ */ function(a) {
153
153
  Re(t, a);
154
154
  function t(e, i) {
155
155
  var s;
@@ -159,28 +159,28 @@ var Xt = /* @__PURE__ */ function(a) {
159
159
  }(/* @__PURE__ */ Ct(Error));
160
160
  function Te(a, t, e, i, s) {
161
161
  if (t.first) {
162
- var r = new Promise(function(u, g) {
162
+ var r = new Promise(function(x, g) {
163
163
  var p = function(m) {
164
- return i(m), m.length ? g(new Xt(m, bt(m))) : u(s);
165
- }, x = Ae(a);
166
- Ft(x, e, p);
164
+ return i(m), m.length ? g(new Ft(m, bt(m))) : x(s);
165
+ }, u = Ae(a);
166
+ Xt(u, e, p);
167
167
  });
168
- return r.catch(function(u) {
169
- return u;
168
+ return r.catch(function(x) {
169
+ return x;
170
170
  }), r;
171
171
  }
172
- var o = t.firstFields === !0 ? Object.keys(a) : t.firstFields || [], n = Object.keys(a), h = n.length, c = 0, d = [], f = new Promise(function(u, g) {
172
+ var o = t.firstFields === !0 ? Object.keys(a) : t.firstFields || [], n = Object.keys(a), h = n.length, c = 0, d = [], f = new Promise(function(x, g) {
173
173
  var p = function(w) {
174
174
  if (d.push.apply(d, w), c++, c === h)
175
- return i(d), d.length ? g(new Xt(d, bt(d))) : u(s);
175
+ return i(d), d.length ? g(new Ft(d, bt(d))) : x(s);
176
176
  };
177
- n.length || (i(d), u(s)), n.forEach(function(x) {
178
- var w = a[x];
179
- o.indexOf(x) !== -1 ? Ft(w, e, p) : Se(w, e, p);
177
+ n.length || (i(d), x(s)), n.forEach(function(u) {
178
+ var w = a[u];
179
+ o.indexOf(u) !== -1 ? Xt(w, e, p) : Se(w, e, p);
180
180
  });
181
181
  });
182
- return f.catch(function(u) {
183
- return u;
182
+ return f.catch(function(x) {
183
+ return x;
184
184
  }), f;
185
185
  }
186
186
  function Me(a) {
@@ -242,7 +242,7 @@ var Zt = function(t, e, i, s, r, o) {
242
242
  }, h.v6 = function(y) {
243
243
  return y && y.exact ? n : new RegExp("" + t(y) + s + t(y), "g");
244
244
  };
245
- var c = "(?:(?:[a-z]+:)?//)", d = "(?:\\S+(?::\\S*)?@)?", f = h.v4().source, u = h.v6().source, g = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", p = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", x = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", w = "(?::\\d{2,5})?", m = '(?:[/?#][^\\s"]*)?', C = "(?:" + c + "|www\\.)" + d + "(?:localhost|" + f + "|" + u + "|" + g + p + x + ")" + w + m;
245
+ var c = "(?:(?:[a-z]+:)?//)", d = "(?:\\S+(?::\\S*)?@)?", f = h.v4().source, x = h.v6().source, g = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", p = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", u = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", w = "(?::\\d{2,5})?", m = '(?:[/?#][^\\s"]*)?', C = "(?:" + c + "|www\\.)" + d + "(?:localhost|" + f + "|" + x + "|" + g + p + u + ")" + w + m;
246
246
  return ct = new RegExp("(?:^" + C + "$)", "i"), ct;
247
247
  }, Kt = {
248
248
  // http://emailregex.com/
@@ -292,16 +292,16 @@ var Zt = function(t, e, i, s, r, o) {
292
292
  hex: function(t) {
293
293
  return typeof t == "string" && !!t.match(Kt.hex);
294
294
  }
295
- }, Fe = function(t, e, i, s, r) {
295
+ }, Xe = function(t, e, i, s, r) {
296
296
  if (t.required && e === void 0) {
297
297
  Zt(t, e, i, s, r);
298
298
  return;
299
299
  }
300
300
  var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], n = t.type;
301
301
  o.indexOf(n) > -1 ? et[n](e) || s.push(D(r.messages.types[n], t.fullField, t.type)) : n && typeof e !== t.type && s.push(D(r.messages.types[n], t.fullField, t.type));
302
- }, Xe = function(t, e, i, s, r) {
303
- var o = typeof t.len == "number", n = typeof t.min == "number", h = typeof t.max == "number", c = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, d = e, f = null, u = typeof e == "number", g = typeof e == "string", p = Array.isArray(e);
304
- if (u ? f = "number" : g ? f = "string" : p && (f = "array"), !f)
302
+ }, Fe = function(t, e, i, s, r) {
303
+ var o = typeof t.len == "number", n = typeof t.min == "number", h = typeof t.max == "number", c = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, d = e, f = null, x = typeof e == "number", g = typeof e == "string", p = Array.isArray(e);
304
+ if (x ? f = "number" : g ? f = "string" : p && (f = "array"), !f)
305
305
  return !1;
306
306
  p && (d = e.length), g && (d = e.replace(c, "_").length), o ? d !== t.len && s.push(D(r.messages[f].len, t.fullField, t.len)) : n && !h && d < t.min ? s.push(D(r.messages[f].min, t.fullField, t.min)) : h && !n && d > t.max ? s.push(D(r.messages[f].max, t.fullField, t.max)) : n && h && (d < t.min || d > t.max) && s.push(D(r.messages[f].range, t.fullField, t.min, t.max));
307
307
  }, j = "enum", Be = function(t, e, i, s, r) {
@@ -318,8 +318,8 @@ var Zt = function(t, e, i, s, r, o) {
318
318
  }, O = {
319
319
  required: Zt,
320
320
  whitespace: De,
321
- type: Fe,
322
- range: Xe,
321
+ type: Xe,
322
+ range: Fe,
323
323
  enum: Be,
324
324
  pattern: ke
325
325
  }, Ke = function(t, e, i, s, r) {
@@ -536,7 +536,7 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
536
536
  var n = i, h = s, c = r;
537
537
  if (typeof h == "function" && (c = h, h = {}), !this.rules || Object.keys(this.rules).length === 0)
538
538
  return c && c(null, n), Promise.resolve(n);
539
- function d(x) {
539
+ function d(u) {
540
540
  var w = [], m = {};
541
541
  function C(b) {
542
542
  if (Array.isArray(b)) {
@@ -545,8 +545,8 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
545
545
  } else
546
546
  w.push(b);
547
547
  }
548
- for (var y = 0; y < x.length; y++)
549
- C(x[y]);
548
+ for (var y = 0; y < u.length; y++)
549
+ C(u[y]);
550
550
  w.length ? (m = bt(w), c(w, m)) : c(null, n);
551
551
  }
552
552
  if (h.messages) {
@@ -554,54 +554,54 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
554
554
  f === Rt && (f = vt()), kt(f, h.messages), h.messages = f;
555
555
  } else
556
556
  h.messages = this.messages();
557
- var u = {}, g = h.keys || Object.keys(this.rules);
558
- g.forEach(function(x) {
559
- var w = o.rules[x], m = n[x];
557
+ var x = {}, g = h.keys || Object.keys(this.rules);
558
+ g.forEach(function(u) {
559
+ var w = o.rules[u], m = n[u];
560
560
  w.forEach(function(C) {
561
561
  var y = C;
562
- typeof y.transform == "function" && (n === i && (n = q({}, n)), m = n[x] = y.transform(m)), typeof y == "function" ? y = {
562
+ typeof y.transform == "function" && (n === i && (n = q({}, n)), m = n[u] = y.transform(m)), typeof y == "function" ? y = {
563
563
  validator: y
564
- } : y = q({}, y), y.validator = o.getValidationMethod(y), y.validator && (y.field = x, y.fullField = y.fullField || x, y.type = o.getType(y), u[x] = u[x] || [], u[x].push({
564
+ } : y = q({}, y), y.validator = o.getValidationMethod(y), y.validator && (y.field = u, y.fullField = y.fullField || u, y.type = o.getType(y), x[u] = x[u] || [], x[u].push({
565
565
  rule: y,
566
566
  value: m,
567
567
  source: n,
568
- field: x
568
+ field: u
569
569
  }));
570
570
  });
571
571
  });
572
572
  var p = {};
573
- return Te(u, h, function(x, w) {
574
- var m = x.rule, C = (m.type === "object" || m.type === "array") && (typeof m.fields == "object" || typeof m.defaultField == "object");
575
- C = C && (m.required || !m.required && x.value), m.field = x.field;
576
- function y(v, I) {
577
- return q({}, I, {
573
+ return Te(x, h, function(u, w) {
574
+ var m = u.rule, C = (m.type === "object" || m.type === "array") && (typeof m.fields == "object" || typeof m.defaultField == "object");
575
+ C = C && (m.required || !m.required && u.value), m.field = u.field;
576
+ function y(v, _) {
577
+ return q({}, _, {
578
578
  fullField: m.fullField + "." + v,
579
579
  fullFields: m.fullFields ? [].concat(m.fullFields, [v]) : [v]
580
580
  });
581
581
  }
582
582
  function b(v) {
583
583
  v === void 0 && (v = []);
584
- var I = Array.isArray(v) ? v : [v];
585
- !h.suppressWarning && I.length && a.warning("async-validator:", I), I.length && m.message !== void 0 && (I = [].concat(m.message));
586
- var L = I.map(Bt(m, n));
584
+ var _ = Array.isArray(v) ? v : [v];
585
+ !h.suppressWarning && _.length && a.warning("async-validator:", _), _.length && m.message !== void 0 && (_ = [].concat(m.message));
586
+ var L = _.map(Bt(m, n));
587
587
  if (h.first && L.length)
588
588
  return p[m.field] = 1, w(L);
589
589
  if (!C)
590
590
  w(L);
591
591
  else {
592
- if (m.required && !x.value)
592
+ if (m.required && !u.value)
593
593
  return m.message !== void 0 ? L = [].concat(m.message).map(Bt(m, n)) : h.error && (L = [h.error(m, D(h.messages.required, m.field))]), w(L);
594
- var _ = {};
595
- m.defaultField && Object.keys(x.value).map(function(S) {
596
- _[S] = m.defaultField;
597
- }), _ = q({}, _, x.rule.fields);
594
+ var I = {};
595
+ m.defaultField && Object.keys(u.value).map(function(S) {
596
+ I[S] = m.defaultField;
597
+ }), I = q({}, I, u.rule.fields);
598
598
  var R = {};
599
- Object.keys(_).forEach(function(S) {
600
- var M = _[S], T = Array.isArray(M) ? M : [M];
599
+ Object.keys(I).forEach(function(S) {
600
+ var M = I[S], T = Array.isArray(M) ? M : [M];
601
601
  R[S] = T.map(y.bind(null, S));
602
602
  });
603
603
  var A = new a(R);
604
- A.messages(h.messages), x.rule.options && (x.rule.options.messages = h.messages, x.rule.options.error = h.error), A.validate(x.value, x.rule.options || h, function(S) {
604
+ A.messages(h.messages), u.rule.options && (u.rule.options.messages = h.messages, u.rule.options.error = h.error), A.validate(u.value, u.rule.options || h, function(S) {
605
605
  var M = [];
606
606
  L && L.length && M.push.apply(M, L), S && S.length && M.push.apply(M, S), w(M.length ? M : null);
607
607
  });
@@ -609,10 +609,10 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
609
609
  }
610
610
  var E;
611
611
  if (m.asyncValidator)
612
- E = m.asyncValidator(m, x.value, b, x.source, h);
612
+ E = m.asyncValidator(m, u.value, b, u.source, h);
613
613
  else if (m.validator) {
614
614
  try {
615
- E = m.validator(m, x.value, b, x.source, h);
615
+ E = m.validator(m, u.value, b, u.source, h);
616
616
  } catch (v) {
617
617
  console.error == null || console.error(v), h.suppressValidatorError || setTimeout(function() {
618
618
  throw v;
@@ -625,8 +625,8 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
625
625
  }, function(v) {
626
626
  return b(v);
627
627
  });
628
- }, function(x) {
629
- d(x);
628
+ }, function(u) {
629
+ d(u);
630
630
  }, n);
631
631
  }, t.getType = function(i) {
632
632
  if (i.type === void 0 && i.pattern instanceof RegExp && (i.type = "pattern"), typeof i.validator != "function" && i.type && !it.hasOwnProperty(i.type))
@@ -702,10 +702,10 @@ function ee(a = [], t = 1, e = 0) {
702
702
  };
703
703
  });
704
704
  }
705
- function _t(a = []) {
705
+ function It(a = []) {
706
706
  let t = [];
707
707
  return a.forEach((e) => {
708
- e.children ? t = t.concat(_t(e.children)) : t.push(e);
708
+ e.children ? t = t.concat(It(e.children)) : t.push(e);
709
709
  }), t;
710
710
  }
711
711
  const Yt = /^(\r\n|\n\r|\r|\n)/, ii = /^[^\t\r\n]+/, Vt = /^\t/;
@@ -1019,19 +1019,19 @@ class Tt extends re {
1019
1019
  const { CELL_PADDING: e = 0 } = this.ctx.config, { rowKey: i, cellType: s } = this;
1020
1020
  let r, o = 0, n = "";
1021
1021
  if (this.type === "tree" && s === "body") {
1022
- const h = this.ctx.database.getRowForRowKey(i), { expand: c = !1, hasChildren: d = !1, expandLoading: f = !1, level: u = 0 } = h || {};
1022
+ const h = this.ctx.database.getRowForRowKey(i), { expand: c = !1, hasChildren: d = !1, expandLoading: f = !1, level: x = 0 } = h || {};
1023
1023
  if (this.rowExpand = c, this.rowHasChildren = d, f) {
1024
- const x = this.ctx.icons.get("loading");
1025
- n = "loading", r = x, o = u * 8;
1024
+ const u = this.ctx.icons.get("loading");
1025
+ n = "loading", r = u, o = x * 8;
1026
1026
  } else if (d) {
1027
- const x = this.ctx.icons.get("expand"), w = this.ctx.icons.get("shrink");
1028
- r = c ? w : x, n = c ? "shrink" : "expand", o = u * 8;
1027
+ const u = this.ctx.icons.get("expand"), w = this.ctx.icons.get("shrink");
1028
+ r = c ? w : u, n = c ? "shrink" : "expand", o = x * 8;
1029
1029
  } else
1030
- o = u * 8;
1030
+ o = x * 8;
1031
1031
  let g = 20, p = 20;
1032
1032
  if (r) {
1033
- let x = this.drawX + o + e, w = this.drawY + (this.visibleHeight - p) / 2;
1034
- this.ctx.paint.drawImage(r, x, w, g, p), this.drawImageX = x, this.drawImageY = w, this.drawImageWidth = g, this.drawImageHeight = p, this.drawImageName = n, this.drawImageSource = r;
1033
+ let u = this.drawX + o + e, w = this.drawY + (this.visibleHeight - p) / 2;
1034
+ this.ctx.paint.drawImage(r, u, w, g, p), this.drawImageX = u, this.drawImageY = w, this.drawImageWidth = g, this.drawImageHeight = p, this.drawImageName = n, this.drawImageSource = r;
1035
1035
  }
1036
1036
  this.align = "left", this.drawTextX = o + this.drawX + g - 0.5;
1037
1037
  }
@@ -1048,35 +1048,35 @@ class Tt extends re {
1048
1048
  HIGHLIGHT_SELECTED_ROW_COLOR: c,
1049
1049
  HIGHLIGHT_HOVER_ROW: d,
1050
1050
  HIGHLIGHT_HOVER_ROW_COLOR: f,
1051
- STRIPE: u,
1051
+ STRIPE: x,
1052
1052
  STRIPE_COLOR: g
1053
1053
  } = this.ctx.config;
1054
1054
  if (this.cellType === "footer") {
1055
1055
  let E = n, v = o;
1056
1056
  if (typeof r == "function") {
1057
- const I = r, { backgroundColor: L, color: _ } = I({
1057
+ const _ = r, { backgroundColor: L, color: I } = _({
1058
1058
  row: this.row,
1059
1059
  rowIndex: this.rowIndex,
1060
1060
  colIndex: this.colIndex,
1061
1061
  column: this.column,
1062
1062
  value: this.getValue()
1063
1063
  }) || {};
1064
- L && (E = L), _ && (v = _);
1064
+ L && (E = L), I && (v = I);
1065
1065
  }
1066
1066
  this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = E, this.drawTextColor = v;
1067
1067
  return;
1068
1068
  }
1069
1069
  let p = "transparent";
1070
- const x = this.ctx.focusCell, w = this.ctx.hoverCell;
1070
+ const u = this.ctx.focusCell, w = this.ctx.hoverCell;
1071
1071
  let m = this.rowIndex, C = this.rowIndex;
1072
1072
  if (this.rowspan !== 1 && (d || h)) {
1073
1073
  const E = this.getSpanInfo(), { yArr: v } = E;
1074
1074
  m = v[0], C = v[1];
1075
1075
  }
1076
- d && w && (w.rowKey === this.rowKey && (p = f), w.rowIndex >= m && w.rowIndex <= C && (p = f)), h && x && (x.rowKey === this.rowKey && (p = c), x.rowIndex >= m && x.rowIndex <= C && (p = c)), this.drawCellSkyBgColor = p;
1076
+ d && w && (w.rowKey === this.rowKey && (p = f), w.rowIndex >= m && w.rowIndex <= C && (p = f)), h && u && (u.rowKey === this.rowKey && (p = c), u.rowIndex >= m && u.rowIndex <= C && (p = c)), this.drawCellSkyBgColor = p;
1077
1077
  let y = e, b = o;
1078
- if (this.ctx.database.getReadonly(this.rowKey, this.key) || (y = i, b = o), u && (this.rowIndex % 2 ? y = g : y = e), typeof s == "function") {
1079
- const E = s, { backgroundColor: v, color: I } = E({
1078
+ if (this.ctx.database.getReadonly(this.rowKey, this.key) || (y = i, b = o), x && (this.rowIndex % 2 ? y = g : y = e), typeof s == "function") {
1079
+ const E = s, { backgroundColor: v, color: _ } = E({
1080
1080
  row: this.row,
1081
1081
  rowIndex: this.rowIndex,
1082
1082
  colIndex: this.colIndex,
@@ -1084,16 +1084,16 @@ class Tt extends re {
1084
1084
  isHasChanged: this.isHasChanged,
1085
1085
  value: this.getValue()
1086
1086
  }) || {};
1087
- v && (y = v), I && (b = I);
1087
+ v && (y = v), _ && (b = _);
1088
1088
  }
1089
1089
  this.drawCellBgColor = y, this.drawTextColor = b;
1090
1090
  }
1091
1091
  updateSelection() {
1092
1092
  const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: r, cellType: o, type: n, rowIndex: h, rowKey: c } = this;
1093
1093
  if (!(s === 0 || r === 0) && o !== "footer" && ["index-selection", "selection"].includes(n)) {
1094
- const d = this.ctx.database.getRowSelection(c), f = this.ctx.database.getRowSelectable(c), { CHECKBOX_SIZE: u = 0 } = this.ctx.config, g = this.drawX + (e - u) / 2, p = this.drawY + (i - u) / 2;
1095
- let x = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck";
1096
- d && f ? (x = this.ctx.icons.get("checkbox-check"), w = "checkbox-check") : d && f ? (x = this.ctx.icons.get("checkbox-check-disabled"), w = "checkbox-check-disabled") : !d && f ? (x = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck") : (x = this.ctx.icons.get("checkbox-disabled"), w = "checkbox-disabled"), x && n == "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === h || ["checkbox-disabled", "checkbox-check"].includes(w)) && (this.drawImageX = g, this.drawImageY = p, this.drawImageWidth = u, this.drawImageHeight = u, this.drawImageName = w, this.drawImageSource = x) : x && n === "selection" && (this.drawImageX = g, this.drawImageY = p, this.drawImageWidth = u, this.drawImageHeight = u, this.drawImageName = w, this.drawImageSource = x);
1094
+ const d = this.ctx.database.getRowSelection(c), f = this.ctx.database.getRowSelectable(c), { CHECKBOX_SIZE: x = 0 } = this.ctx.config, g = this.drawX + (e - x) / 2, p = this.drawY + (i - x) / 2;
1095
+ let u = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck";
1096
+ d && f ? (u = this.ctx.icons.get("checkbox-check"), w = "checkbox-check") : d && f ? (u = this.ctx.icons.get("checkbox-check-disabled"), w = "checkbox-check-disabled") : !d && f ? (u = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck") : (u = this.ctx.icons.get("checkbox-disabled"), w = "checkbox-disabled"), u && n == "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === h || ["checkbox-disabled", "checkbox-check"].includes(w)) && (this.drawImageX = g, this.drawImageY = p, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = u) : u && n === "selection" && (this.drawImageX = g, this.drawImageY = p, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = u);
1097
1097
  }
1098
1098
  }
1099
1099
  updateHoverIcon() {
@@ -1114,10 +1114,10 @@ class Tt extends re {
1114
1114
  if (this.hoverIconName && !this.ctx.editing && n) {
1115
1115
  let h = 0, c = 0;
1116
1116
  if (n.rowKey === this.rowKey && (h = this.drawX + this.width - s - r, c = this.drawY + (this.height - s) / 2), this.rowspan !== 1 && o) {
1117
- const f = this.getSpanInfo(), { yArr: u } = f, g = u[0], p = u[1];
1117
+ const f = this.getSpanInfo(), { yArr: x } = f, g = x[0], p = x[1];
1118
1118
  if (n.rowIndex >= g && n.rowIndex <= p) {
1119
- const { width: x, height: w, offsetTop: m, offsetLeft: C } = f;
1120
- h = this.drawX - C + x - s - r, c = this.drawY - m + (w - s) / 2;
1119
+ const { width: u, height: w, offsetTop: m, offsetLeft: C } = f;
1120
+ h = this.drawX - C + u - s - r, c = this.drawY - m + (w - s) / 2;
1121
1121
  }
1122
1122
  }
1123
1123
  const d = this.ctx.icons.get(this.hoverIconName);
@@ -1216,10 +1216,10 @@ class Tt extends re {
1216
1216
  const { SELECT_BORDER_COLOR: e, ENABLE_AUTOFILL: i, ENABLE_SELECTOR: s, AUTOFILL_POINT_BORDER_COLOR: r } = this.ctx.config;
1217
1217
  if (!s || !i || this.ctx.editing)
1218
1218
  return;
1219
- const { xArr: o, yArr: n } = this.ctx.selector, h = o[1], c = n[1], { colIndex: d, rowIndex: f, drawX: u, drawY: g } = this;
1219
+ const { xArr: o, yArr: n } = this.ctx.selector, h = o[1], c = n[1], { colIndex: d, rowIndex: f, drawX: x, drawY: g } = this;
1220
1220
  if (d === h && f === c) {
1221
- const x = d === this.ctx.maxColIndex || f === this.ctx.maxRowIndex || d === this.ctx.lastCenterColIndex ? 6 : 4;
1222
- this.ctx.paint.drawRect(u + this.width - x, g + this.height - x, 6, 6, {
1221
+ const u = d === this.ctx.maxColIndex || f === this.ctx.maxRowIndex || d === this.ctx.lastCenterColIndex ? 6 : 4;
1222
+ this.ctx.paint.drawRect(x + this.width - u, g + this.height - u, 6, 6, {
1223
1223
  borderColor: r,
1224
1224
  fillColor: e
1225
1225
  });
@@ -1243,16 +1243,22 @@ class Tt extends re {
1243
1243
  return s;
1244
1244
  }
1245
1245
  drawText() {
1246
- const { CELL_PADDING: e, BODY_FONT: i, PLACEHOLDER_COLOR: s } = this.ctx.config, { ellipsis: r } = this.ctx.paint.handleEllipsis(this.text, this.width, e, i);
1247
- this.ellipsis = r;
1248
- const { placeholder: o } = this.column;
1249
- let n = this.displayText, h = this.drawTextColor;
1250
- return !this.ctx.database.getReadonly(this.rowKey, this.key) && o && ["", null, void 0].includes(this.text) && this.cellType === "body" && !(this.rowspan === 0 || this.colspan === 0) && (n = o, h = s), this.ctx.paint.drawText(n, this.drawTextX, this.drawTextY, this.visibleWidth, this.visibleHeight, {
1246
+ const { CELL_PADDING: e, BODY_FONT: i, PLACEHOLDER_COLOR: s } = this.ctx.config;
1247
+ let r = this.visibleWidth;
1248
+ if (this.type === "tree") {
1249
+ const f = this.drawTextX - this.drawX;
1250
+ r = this.visibleWidth - f;
1251
+ }
1252
+ const { ellipsis: o } = this.ctx.paint.handleEllipsis(this.displayText, r, e, i);
1253
+ this.ellipsis = o;
1254
+ const { placeholder: n } = this.column;
1255
+ let h = this.displayText, c = this.drawTextColor;
1256
+ return !this.ctx.database.getReadonly(this.rowKey, this.key) && n && ["", null, void 0].includes(this.text) && this.cellType === "body" && !(this.rowspan === 0 || this.colspan === 0) && (h = n, c = s), this.ctx.paint.drawText(h, this.drawTextX, this.drawTextY, r, this.visibleHeight, {
1251
1257
  font: i,
1252
1258
  padding: e,
1253
1259
  align: this.align,
1254
1260
  verticalAlign: this.verticalAlign,
1255
- color: h
1261
+ color: c
1256
1262
  });
1257
1263
  }
1258
1264
  drawImage() {
@@ -1340,11 +1346,11 @@ class Tt extends re {
1340
1346
  drawBorder(e) {
1341
1347
  const { drawX: i, drawY: s, rowIndex: r, colIndex: o, height: n, width: h } = this;
1342
1348
  let c = i, d = s;
1343
- const { xArr: f, yArr: u, lineDash: g = [], borderWidth: p = 1, borderColor: x, fillColor: w } = e, m = f[0], C = f[1], y = u[0], b = u[1];
1349
+ const { xArr: f, yArr: x, lineDash: g = [], borderWidth: p = 1, borderColor: u, fillColor: w } = e, m = f[0], C = f[1], y = x[0], b = x[1];
1344
1350
  if (o >= m && o <= C && r === y) {
1345
1351
  const E = o === C ? 1 : 0, v = o === m ? 1 : 0;
1346
1352
  this.ctx.paint.drawLine([c + v, d + 1, c + h - E, d + 1], {
1347
- borderColor: x,
1353
+ borderColor: u,
1348
1354
  fillColor: w,
1349
1355
  borderWidth: p,
1350
1356
  lineCap: "round",
@@ -1355,7 +1361,7 @@ class Tt extends re {
1355
1361
  if (o === C && r >= y && r <= b) {
1356
1362
  const E = r === y ? 1 : 0, v = r === b ? 1 : 0;
1357
1363
  this.ctx.paint.drawLine([c + h - 1, d + E, c + h - 1, d + n - v], {
1358
- borderColor: x,
1364
+ borderColor: u,
1359
1365
  fillColor: w,
1360
1366
  borderWidth: p,
1361
1367
  lineCap: "round",
@@ -1366,7 +1372,7 @@ class Tt extends re {
1366
1372
  if (o >= m && o <= C && r === b) {
1367
1373
  const E = o === C ? 1 : 0, v = o === m ? 1 : 0;
1368
1374
  this.ctx.paint.drawLine([c + v, d + n - 1, c + h - E, d + n - 1], {
1369
- borderColor: x,
1375
+ borderColor: u,
1370
1376
  fillColor: w,
1371
1377
  borderWidth: p,
1372
1378
  lineCap: "round",
@@ -1377,7 +1383,7 @@ class Tt extends re {
1377
1383
  if (o === m && r >= y && r <= b) {
1378
1384
  const E = r === b ? 1 : 0, v = r === y ? 1 : 0;
1379
1385
  this.ctx.paint.drawLine([c + 1, d + v, c + 1, d + n - E], {
1380
- borderColor: x,
1386
+ borderColor: u,
1381
1387
  fillColor: w,
1382
1388
  borderWidth: p,
1383
1389
  lineCap: "round",
@@ -1399,6 +1405,7 @@ class li {
1399
1405
  l(this, "colIndexKeyMap", /* @__PURE__ */ new Map());
1400
1406
  l(this, "headerMap", /* @__PURE__ */ new Map());
1401
1407
  l(this, "rowIndexRowKeyMap", /* @__PURE__ */ new Map());
1408
+ l(this, "rowKeyRowIndexMap", /* @__PURE__ */ new Map());
1402
1409
  l(this, "checkboxKeyMap", /* @__PURE__ */ new Map());
1403
1410
  l(this, "selectionMap", /* @__PURE__ */ new Map());
1404
1411
  l(this, "originalDataMap", /* @__PURE__ */ new Map());
@@ -1420,7 +1427,7 @@ class li {
1420
1427
  this.data = i, this.footerData = r, this.columns = s, this.setLoading(!0), this.init();
1421
1428
  }
1422
1429
  init() {
1423
- this.clearBufferData(), this.rowKeyMap.clear(), this.checkboxKeyMap.clear(), this.colIndexKeyMap.clear(), this.rowIndexRowKeyMap.clear(), this.originalDataMap.clear(), this.changedDataMap.clear(), this.validationErrorMap.clear(), this.itemRowKeyMap = /* @__PURE__ */ new WeakMap();
1430
+ this.clearBufferData(), this.rowKeyMap.clear(), this.checkboxKeyMap.clear(), this.colIndexKeyMap.clear(), this.rowIndexRowKeyMap.clear(), this.rowKeyRowIndexMap.clear(), this.originalDataMap.clear(), this.changedDataMap.clear(), this.validationErrorMap.clear(), this.itemRowKeyMap = /* @__PURE__ */ new WeakMap();
1424
1431
  const { ROW_KEY: t, ENABLE_RESERVE_SELECTION: e } = this.ctx.config;
1425
1432
  e && t || this.selectionMap.clear(), this.initData(this.data), this.getData(), this.bufferCheckState.buffer = !1;
1426
1433
  }
@@ -1440,30 +1447,30 @@ class li {
1440
1447
  var w;
1441
1448
  let r = i._hasChildren || !1;
1442
1449
  Array.isArray(i.children) && i.children.length && (r = !0, this.initData(i.children, e + 1));
1443
- const { ROW_KEY: o = "", DEFAULT_EXPAND_ALL: n, CELL_HEIGHT: h, SELECTABLE_METHOD: c, CHECKBOX_KEY: d } = this.ctx.config, f = i[o], u = f != null ? `${f}` : Jt();
1444
- this.itemRowKeyMap.set(i, u);
1450
+ const { ROW_KEY: o = "", DEFAULT_EXPAND_ALL: n, CELL_HEIGHT: h, SELECTABLE_METHOD: c, CHECKBOX_KEY: d } = this.ctx.config, f = i[o], x = f != null ? `${f}` : Jt();
1451
+ this.itemRowKeyMap.set(i, x);
1445
1452
  const g = i._height || h, p = i._readonly;
1446
- let x = !0;
1447
- if (typeof c == "function" && (x = c), d) {
1453
+ let u = !0;
1454
+ if (typeof c == "function" && (u = c), d) {
1448
1455
  const m = i[d];
1449
1456
  if (this.checkboxKeyMap.has(m)) {
1450
1457
  const C = this.checkboxKeyMap.get(m) || [];
1451
- C.push(u), this.checkboxKeyMap.set(m, C);
1458
+ C.push(x), this.checkboxKeyMap.set(m, C);
1452
1459
  } else
1453
- this.checkboxKeyMap.set(m, [u]);
1460
+ this.checkboxKeyMap.set(m, [x]);
1454
1461
  }
1455
- this.selectionMap.set(u, {
1456
- key: d ? i[d] : u,
1462
+ this.selectionMap.set(x, {
1463
+ key: d ? i[d] : x,
1457
1464
  row: i,
1458
- check: ((w = this.selectionMap.get(u)) == null ? void 0 : w.check) || !1
1459
- }), this.rowKeyMap.set(u, {
1465
+ check: ((w = this.selectionMap.get(x)) == null ? void 0 : w.check) || !1
1466
+ }), this.rowKeyMap.set(x, {
1460
1467
  readonly: p,
1461
1468
  index: s,
1462
1469
  rowIndex: s,
1463
1470
  level: e,
1464
1471
  height: g,
1465
1472
  check: !1,
1466
- selectable: x,
1473
+ selectable: u,
1467
1474
  expand: n,
1468
1475
  expandLazy: !1,
1469
1476
  hasChildren: r,
@@ -1532,14 +1539,14 @@ class li {
1532
1539
  r.forEach((o) => {
1533
1540
  t.push(o);
1534
1541
  const n = this.itemRowKeyMap.get(o), { expand: h, hasChildren: c, height: d } = this.rowKeyMap.get(n), f = this.sumHeight;
1535
- this.sumHeight += d, this.rowIndexRowKeyMap.set(e, n), this.positions.push({
1542
+ this.sumHeight += d, this.rowIndexRowKeyMap.set(e, n), this.rowKeyRowIndexMap.set(n, e), this.positions.push({
1536
1543
  top: f,
1537
1544
  height: d,
1538
1545
  bottom: this.sumHeight
1539
1546
  }), e += 1, h && c && i(o.children);
1540
1547
  });
1541
1548
  };
1542
- this.rowIndexRowKeyMap.clear();
1549
+ this.rowIndexRowKeyMap.clear(), this.rowKeyRowIndexMap.clear();
1543
1550
  let s = this.data;
1544
1551
  return typeof this.filterMethod == "function" && (s = this.filterMethod(s)), i(s), this.bufferData = t, {
1545
1552
  data: t,
@@ -1637,7 +1644,7 @@ class li {
1637
1644
  return this.itemRowKeyMap.get(t);
1638
1645
  }
1639
1646
  getRowIndexForRowKey(t) {
1640
- return this.rowKeyMap.get(t).index;
1647
+ return this.rowKeyRowIndexMap.get(t);
1641
1648
  }
1642
1649
  /**
1643
1650
  * 根据rowIndex和colIndex获取单元格数据
@@ -1675,19 +1682,19 @@ class li {
1675
1682
  let i = [];
1676
1683
  const s = /* @__PURE__ */ new Set();
1677
1684
  let r = [], o = t.map((d) => {
1678
- const { rowKey: f, key: u } = d;
1685
+ const { rowKey: f, key: x } = d;
1679
1686
  let g = d.value, p = g;
1680
- const x = this.getRowDataItemForRowKey(f), w = this.getItemValue(f, u), m = this.getVirtualBodyCellByKey(f, u);
1687
+ const u = this.getRowDataItemForRowKey(f), w = this.getItemValue(f, x), m = this.getVirtualBodyCellByKey(f, x);
1681
1688
  return (m == null ? void 0 : m.type) === "number" && (["", void 0, null].includes(g) ? p = null : /^-?\d+(\.\d+)?$/.test(`${g}`) ? p = Number(g) : (p = w, r.push({
1682
1689
  ...d,
1683
1690
  value: p,
1684
1691
  oldValue: w,
1685
- row: x
1692
+ row: u
1686
1693
  }))), {
1687
1694
  ...d,
1688
1695
  value: p,
1689
1696
  oldValue: w,
1690
- row: x
1697
+ row: u
1691
1698
  };
1692
1699
  });
1693
1700
  if (o = o.filter((d) => !r.some((f) => d.rowKey === f.rowKey && d.key === f.key)), r.length) {
@@ -1702,9 +1709,9 @@ class li {
1702
1709
  return;
1703
1710
  const { BEFORE_VALUE_CHANGE_METHOD: n } = this.ctx.config;
1704
1711
  typeof n == "function" && (o = await n(o)), o.forEach((d) => {
1705
- const { value: f, rowKey: u, key: g, oldValue: p } = d;
1706
- s.add(u), this.setItemValue(u, g, f), i.push({
1707
- rowKey: u,
1712
+ const { value: f, rowKey: x, key: g, oldValue: p } = d;
1713
+ s.add(x), this.setItemValue(x, g, f), i.push({
1714
+ rowKey: x,
1708
1715
  key: g,
1709
1716
  oldValue: p,
1710
1717
  newValue: f
@@ -1747,7 +1754,7 @@ class li {
1747
1754
  n[e] !== null && typeof n[e] == "object" && (h = JSON.parse(JSON.stringify(n[e])));
1748
1755
  const d = `${t}​_${e}`;
1749
1756
  this.originalDataMap.has(d) || this.originalDataMap.set(d, h);
1750
- const f = this.originalDataMap.get(d), u = this.getRowDataItemForRowKey(t);
1757
+ const f = this.originalDataMap.get(d), x = this.getRowDataItemForRowKey(t);
1751
1758
  if (o) {
1752
1759
  const g = this.getVirtualBodyCellByKey(t, e);
1753
1760
  if ((g == null ? void 0 : g.type) === "number")
@@ -1766,7 +1773,7 @@ class li {
1766
1773
  key: e,
1767
1774
  value: c,
1768
1775
  oldValue: h,
1769
- row: u
1776
+ row: x
1770
1777
  }
1771
1778
  ]
1772
1779
  };
@@ -1785,28 +1792,28 @@ class li {
1785
1792
  key: e,
1786
1793
  value: c,
1787
1794
  oldValue: n[e],
1788
- row: u
1795
+ row: x
1789
1796
  }
1790
1797
  ]);
1791
1798
  m && m.length && (c = m[0].value);
1792
1799
  }
1793
1800
  this.changedDataMap.set(d, c), n[e] = c;
1794
- const x = {
1801
+ const u = {
1795
1802
  rowKey: t,
1796
1803
  key: e,
1797
1804
  oldValue: h,
1798
1805
  value: c,
1799
- row: u
1806
+ row: x
1800
1807
  };
1801
1808
  this.getValidator(t, e).then(() => {
1802
1809
  this.validationErrorMap.size === 0 && this.changedDataMap.size > 0 && this.ctx.emit("validateChangedData", this.getChangedData());
1803
- }), this.ctx.emit("change", [x], [u]), this.ctx.emit("editChange", {
1810
+ }), this.ctx.emit("change", [u], [x]), this.ctx.emit("editChange", {
1804
1811
  rowKey: t,
1805
1812
  key: e,
1806
1813
  oldValue: h,
1807
1814
  value: c,
1808
1815
  originalValue: f,
1809
- row: u
1816
+ row: x
1810
1817
  });
1811
1818
  } else
1812
1819
  this.changedDataMap.set(d, c), n[e] = c;
@@ -1816,7 +1823,7 @@ class li {
1816
1823
  oldValue: h,
1817
1824
  value: c,
1818
1825
  originalValue: this.originalDataMap.get(d),
1819
- row: u
1826
+ row: x
1820
1827
  }), s && this.ctx.history.pushState({
1821
1828
  type: "single",
1822
1829
  scrollX: this.ctx.scrollX,
@@ -1945,14 +1952,14 @@ class li {
1945
1952
  return e;
1946
1953
  const i = this.rowKeyMap.size;
1947
1954
  let s = 0, r = 0;
1948
- const o = this.selectionMap.size, n = Array.from(this.selectionMap.values()).some((u) => u.check);
1949
- this.rowKeyMap.forEach((u, g) => {
1950
- var x;
1951
- (x = this.selectionMap.get(g)) != null && x.check && (s += 1);
1952
- let p = u.selectable;
1955
+ const o = this.selectionMap.size, n = Array.from(this.selectionMap.values()).some((x) => x.check);
1956
+ this.rowKeyMap.forEach((x, g) => {
1957
+ var u;
1958
+ (u = this.selectionMap.get(g)) != null && u.check && (s += 1);
1959
+ let p = x.selectable;
1953
1960
  typeof p == "function" && (p = p({
1954
- row: u.item,
1955
- rowIndex: u.rowIndex
1961
+ row: x.item,
1962
+ rowIndex: x.rowIndex
1956
1963
  })), p && (r += 1);
1957
1964
  });
1958
1965
  const h = o > i && s === 0 && n, c = r && r > s && s > 0 || h, d = r !== 0, f = !!r && r === s;
@@ -2094,14 +2101,14 @@ class li {
2094
2101
  if (h) {
2095
2102
  let c = {}, d = {};
2096
2103
  if (d[e] = this.getItemValue(t, e), Array.isArray(h)) {
2097
- const u = h.map((g) => ({
2104
+ const x = h.map((g) => ({
2098
2105
  ...g,
2099
2106
  row: s.item,
2100
2107
  column: n,
2101
2108
  rowIndex: s.rowIndex,
2102
2109
  colIndex: r.colIndex
2103
2110
  }));
2104
- c[e] = u;
2111
+ c[e] = x;
2105
2112
  } else
2106
2113
  c[e] = {
2107
2114
  ...h,
@@ -2112,8 +2119,8 @@ class li {
2112
2119
  };
2113
2120
  new nt(c).validate(d).then(() => {
2114
2121
  this.clearValidationError(t, e), i([]);
2115
- }).catch(({ errors: u }) => {
2116
- const g = u.map((p) => ({
2122
+ }).catch(({ errors: x }) => {
2123
+ const g = x.map((p) => ({
2117
2124
  ...p,
2118
2125
  column: n,
2119
2126
  key: e,
@@ -2146,10 +2153,10 @@ class li {
2146
2153
  relationColKeys: c,
2147
2154
  rowspan: d,
2148
2155
  height: f,
2149
- width: u,
2156
+ width: x,
2150
2157
  colspan: g,
2151
2158
  mergeRow: p,
2152
- mergeCol: x
2159
+ mergeCol: u
2153
2160
  } = t;
2154
2161
  if (d === 1 && g === 1)
2155
2162
  return {
@@ -2158,7 +2165,7 @@ class li {
2158
2165
  rowspan: d,
2159
2166
  colspan: g,
2160
2167
  height: f,
2161
- width: u,
2168
+ width: x,
2162
2169
  offsetTop: 0,
2163
2170
  offsetLeft: 0,
2164
2171
  dataList: [
@@ -2170,10 +2177,10 @@ class li {
2170
2177
  }
2171
2178
  ]
2172
2179
  };
2173
- let w = e, m = e, C = n, y = n, b = [], E = 0, v = 0, I = 0, L = 0;
2180
+ let w = e, m = e, C = n, y = n, b = [], E = 0, v = 0, _ = 0, L = 0;
2174
2181
  if (d !== 1 && p) {
2175
- L = u;
2176
- const _ = h.reduce((R, A) => {
2182
+ L = x;
2183
+ const I = h.reduce((R, A) => {
2177
2184
  const S = this.getItemValue(s, A) ?? "";
2178
2185
  return `${R}${S}`;
2179
2186
  }, "");
@@ -2182,7 +2189,7 @@ class li {
2182
2189
  const B = this.getItemValue(A, T) ?? "";
2183
2190
  return `${M}${B}`;
2184
2191
  }, "");
2185
- if (_ === S)
2192
+ if (I === S)
2186
2193
  w = R;
2187
2194
  else
2188
2195
  break;
@@ -2192,7 +2199,7 @@ class li {
2192
2199
  const B = this.getItemValue(A, T) ?? "";
2193
2200
  return `${M}${B}`;
2194
2201
  }, "");
2195
- if (_ === S)
2202
+ if (I === S)
2196
2203
  m = R;
2197
2204
  else
2198
2205
  break;
@@ -2203,7 +2210,7 @@ class li {
2203
2210
  }
2204
2211
  for (let R = w; R <= m; R++) {
2205
2212
  const { height: A } = this.positions[R];
2206
- I += A;
2213
+ _ += A;
2207
2214
  const S = this.rowIndexRowKeyMap.get(R) || "", { item: M } = this.rowKeyMap.get(S), T = this.getItemValue(S, i);
2208
2215
  b.push({
2209
2216
  rowKey: S,
@@ -2213,36 +2220,36 @@ class li {
2213
2220
  });
2214
2221
  }
2215
2222
  }
2216
- if (g !== 1 && x) {
2217
- I = f;
2218
- for (let _ = n - 1; _ >= 0; _--) {
2219
- const R = this.getColumnByColIndex(_);
2223
+ if (g !== 1 && u) {
2224
+ _ = f;
2225
+ for (let I = n - 1; I >= 0; I--) {
2226
+ const R = this.getColumnByColIndex(I);
2220
2227
  if (!R)
2221
2228
  break;
2222
2229
  const A = this.getItemValue(s, i), S = this.getItemValue(s, R.key);
2223
2230
  if (A === S && c.includes(R.key))
2224
- C = _;
2231
+ C = I;
2225
2232
  else
2226
2233
  break;
2227
2234
  }
2228
- for (let _ = n; _ <= this.ctx.maxColIndex; _++) {
2229
- const R = this.getColumnByColIndex(_);
2235
+ for (let I = n; I <= this.ctx.maxColIndex; I++) {
2236
+ const R = this.getColumnByColIndex(I);
2230
2237
  if (!R)
2231
2238
  break;
2232
2239
  const A = this.getItemValue(s, i), S = this.getItemValue(s, R.key);
2233
2240
  if (A === S && c.includes(R.key))
2234
- y = _;
2241
+ y = I;
2235
2242
  else
2236
2243
  break;
2237
2244
  }
2238
- for (let _ = C; _ < n; _++) {
2239
- const R = this.getColumnByColIndex(_);
2245
+ for (let I = C; I < n; I++) {
2246
+ const R = this.getColumnByColIndex(I);
2240
2247
  if (!R)
2241
2248
  break;
2242
2249
  v += R.width || 100;
2243
2250
  }
2244
- for (let _ = C; _ <= y; _++) {
2245
- const R = this.getColumnByColIndex(_);
2251
+ for (let I = C; I <= y; I++) {
2252
+ const R = this.getColumnByColIndex(I);
2246
2253
  if (!R)
2247
2254
  break;
2248
2255
  L += R.width || 100, b.push({
@@ -2258,7 +2265,7 @@ class li {
2258
2265
  yArr: [w, m],
2259
2266
  rowspan: d,
2260
2267
  colspan: g,
2261
- height: I,
2268
+ height: _,
2262
2269
  width: L,
2263
2270
  offsetTop: E,
2264
2271
  offsetLeft: v,
@@ -2549,8 +2556,8 @@ class fi {
2549
2556
  if (this.ctx.save(), this.ctx.beginPath(), n !== void 0 && (this.ctx.fillStyle = n), o !== void 0 && (this.ctx.lineWidth = r, this.ctx.strokeStyle = o), h === 0)
2550
2557
  this.ctx.rect(t - 0.5, e - 0.5, i, s);
2551
2558
  else {
2552
- const [c, d, f, u] = typeof h == "number" ? [h, h, h, h] : h;
2553
- this.ctx.moveTo(t + c, e), this.ctx.arcTo(t + i, e, t + i, e + d, d), this.ctx.arcTo(t + i, e + s, t + i - f, e + s, f), this.ctx.arcTo(t, e + s, t, e + s - u, u), this.ctx.arcTo(t, e, t + c, e, c);
2559
+ const [c, d, f, x] = typeof h == "number" ? [h, h, h, h] : h;
2560
+ this.ctx.moveTo(t + c, e), this.ctx.arcTo(t + i, e, t + i, e + d, d), this.ctx.arcTo(t + i, e + s, t + i - f, e + s, f), this.ctx.arcTo(t, e + s, t, e + s - x, x), this.ctx.arcTo(t, e, t + c, e, c);
2554
2561
  }
2555
2562
  n !== void 0 && this.ctx.fill(), o !== void 0 && this.ctx.stroke(), this.ctx.restore();
2556
2563
  }
@@ -2574,12 +2581,12 @@ class fi {
2574
2581
  verticalAlign: f = "middle"
2575
2582
  } = o;
2576
2583
  this.ctx.font = n, this.ctx.fillStyle = c, this.ctx.textBaseline = f, this.ctx.textAlign = h;
2577
- let u = 0;
2578
- f === "top" ? u = i + d : f === "bottom" ? u = i + r - d : u = i + (r + 1) / 2;
2584
+ let x = 0;
2585
+ f === "top" ? x = i + d : f === "bottom" ? x = i + r - d : x = i + (r + 1) / 2;
2579
2586
  let g = 0;
2580
2587
  h === "left" ? g = e + d : h === "right" ? g = e + s - d : g = e + s / 2;
2581
- const { _text: p, ellipsis: x } = this.handleEllipsis(t, s, d, n);
2582
- return this.ctx.fillText(p, g, u), this.ctx.restore(), x;
2588
+ const { _text: p, ellipsis: u } = this.handleEllipsis(t, s, d, n);
2589
+ return this.ctx.fillText(p, g, x), this.ctx.restore(), u;
2583
2590
  }
2584
2591
  handleEllipsis(t, e, i = 0, s = "12px Arial") {
2585
2592
  let r = !1, o = t;
@@ -2767,7 +2774,7 @@ class Wt {
2767
2774
  }
2768
2775
  }
2769
2776
  const Pt = '<svg t="1724122044148" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M707.648 401.28L489.28 560.704l22.656 30.976 22.656-30.976L316.16 401.216q-3.072-2.24-6.464-3.84-3.456-1.536-7.104-2.432-3.712-0.896-7.488-1.088-3.776-0.128-7.488 0.448-3.776 0.64-7.296 1.92-3.584 1.28-6.784 3.2-3.2 1.984-6.016 4.544-2.816 2.56-5.056 5.632-2.176 3.072-3.84 6.464-1.536 3.456-2.432 7.104-0.896 3.712-1.088 7.488-0.128 3.776 0.448 7.488 0.64 3.776 1.92 7.296 1.28 3.584 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992l218.368 159.552q4.928 3.584 10.752 5.504 5.76 1.92 11.904 1.92 6.08 0 11.904-1.92 5.76-1.92 10.752-5.504l218.368-159.552q3.008-2.24 5.568-4.992 2.56-2.816 4.544-6.016 1.92-3.2 3.264-6.784 1.28-3.52 1.92-7.296 0.576-3.712 0.384-7.488-0.128-3.84-1.024-7.488-0.896-3.648-2.496-7.04-1.6-3.456-3.84-6.528-2.24-3.072-4.992-5.632-2.816-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.584-1.28-7.296-1.856-3.712-0.64-7.488-0.448-3.84 0.192-7.488 1.088-3.648 0.896-7.04 2.496-3.456 1.536-6.528 3.84z m61.056 30.976q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.472-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.72-3.584-3.456-1.408-7.168-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.656 3.584-3.136 2.112-5.76 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.584 6.656-1.408 3.52-2.176 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.176 7.168 1.472 3.52 3.584 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.168-2.176 3.52-1.408 6.656-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.048-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z m-436.736 0q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.408-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.592 3.584-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.24 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.24 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z" p-id="4552"></path></svg>';
2770
- class ui {
2777
+ class xi {
2771
2778
  constructor(t) {
2772
2779
  l(this, "ctx");
2773
2780
  l(this, "list", [
@@ -2998,8 +3005,8 @@ class oe extends re {
2998
3005
  const { width: e, height: i, type: s } = this;
2999
3006
  if (["index-selection", "selection"].includes(s)) {
3000
3007
  const { indeterminate: r, check: o, selectable: n } = this.ctx.database.getCheckedState(), { CHECKBOX_SIZE: h = 0 } = this.ctx.config, c = this.drawX + (e - h) / 2, d = this.drawY + (i - h) / 2;
3001
- let f = this.ctx.icons.get("checkbox-uncheck"), u = "checkbox-uncheck";
3002
- r ? (f = this.ctx.icons.get("checkbox-indeterminate"), u = "checkbox-indeterminate") : o && n ? (f = this.ctx.icons.get("checkbox-check"), u = "checkbox-check") : o && n ? (f = this.ctx.icons.get("checkbox-check-disabled"), u = "checkbox-check-disabled") : !o && n ? (f = this.ctx.icons.get("checkbox-uncheck"), u = "checkbox-uncheck") : (f = this.ctx.icons.get("checkbox-disabled"), u = "checkbox-disabled"), f && (this.drawImageX = c, this.drawImageY = d, this.drawImageWidth = h, this.drawImageHeight = h, this.drawImageName = u, this.drawImageSource = f, this.ctx.paint.drawImage(
3008
+ let f = this.ctx.icons.get("checkbox-uncheck"), x = "checkbox-uncheck";
3009
+ r ? (f = this.ctx.icons.get("checkbox-indeterminate"), x = "checkbox-indeterminate") : o && n ? (f = this.ctx.icons.get("checkbox-check"), x = "checkbox-check") : o && n ? (f = this.ctx.icons.get("checkbox-check-disabled"), x = "checkbox-check-disabled") : !o && n ? (f = this.ctx.icons.get("checkbox-uncheck"), x = "checkbox-uncheck") : (f = this.ctx.icons.get("checkbox-disabled"), x = "checkbox-disabled"), f && (this.drawImageX = c, this.drawImageY = d, this.drawImageWidth = h, this.drawImageHeight = h, this.drawImageName = x, this.drawImageSource = f, this.ctx.paint.drawImage(
3003
3010
  this.drawImageSource,
3004
3011
  this.drawImageX,
3005
3012
  this.drawImageY,
@@ -3028,7 +3035,7 @@ class oe extends re {
3028
3035
  };
3029
3036
  }
3030
3037
  }
3031
- class xi {
3038
+ class ui {
3032
3039
  constructor(t) {
3033
3040
  l(this, "ctx");
3034
3041
  l(this, "visibleHoverCell");
@@ -3315,7 +3322,7 @@ class gi {
3315
3322
  emptyElement: h,
3316
3323
  contextMenuElement: c
3317
3324
  } = t;
3318
- this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = r, this.overlayerElement = o, this.editorElement = n, this.emptyElement = h, this.contextMenuElement = c, this.config = new Wt(e.config || {}), this.eventBus = new di(), this.eventBrowser = new ci(this), this.eventTable = new xi(this), this.paint = new fi(this.canvasElement), this.database = new li(this, e), this.history = new hi(this), this.icons = new ui(this);
3325
+ this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = r, this.overlayerElement = o, this.editorElement = n, this.emptyElement = h, this.contextMenuElement = c, this.config = new Wt(e.config || {}), this.eventBus = new di(), this.eventBrowser = new ci(this), this.eventTable = new ui(this), this.paint = new fi(this.canvasElement), this.database = new li(this, e), this.history = new hi(this), this.icons = new xi(this);
3319
3326
  }
3320
3327
  setConfig(t) {
3321
3328
  this.config = new Wt(t);
@@ -3521,12 +3528,12 @@ class zt {
3521
3528
  stageHeight: i,
3522
3529
  stageWidth: s,
3523
3530
  config: { SCROLLER_TRACK_SIZE: r = 0, SCROLLER_SIZE: o = 0, BORDER: n }
3524
- } = this.ctx, h = s, c = i, d = e.height, f = e.width, u = t.height, g = this.ctx.footer.height;
3531
+ } = this.ctx, h = s, c = i, d = e.height, f = e.width, x = t.height, g = this.ctx.footer.height;
3525
3532
  if (this.type === "vertical") {
3526
- this.visibleDistance = c - r - d, this.distance = u - this.visibleDistance + g, this.trackX = h - r, this.trackY = 0, this.splitPoints = [this.trackX, d, this.trackX + r, d], this.trackWidth = r, this.trackHeight = c, this.barX = this.trackX - 1 + (r - o) / 2, this.barWidth = o;
3527
- const p = this.distance ? this.visibleDistance / (u + g) : 0;
3528
- let x = Math.floor(p * this.visibleDistance);
3529
- x < 30 ? x = 30 : x > this.visibleDistance && (x = 0), this.barHeight = x, this.barY = d + this.scroll / this.distance * (this.visibleDistance - this.barHeight), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
3533
+ this.visibleDistance = c - r - d, this.distance = x - this.visibleDistance + g, this.trackX = h - r, this.trackY = 0, this.splitPoints = [this.trackX, d, this.trackX + r, d], this.trackWidth = r, this.trackHeight = c, this.barX = this.trackX - 1 + (r - o) / 2, this.barWidth = o;
3534
+ const p = this.distance ? this.visibleDistance / (x + g) : 0;
3535
+ let u = Math.floor(p * this.visibleDistance);
3536
+ u < 30 ? u = 30 : u > this.visibleDistance && (u = 0), this.barHeight = u, this.barY = d + this.scroll / this.distance * (this.visibleDistance - this.barHeight), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
3530
3537
  } else {
3531
3538
  this.visibleDistance = h - r, this.distance = f - this.visibleDistance, this.splitPoints = [
3532
3539
  h - r,
@@ -3536,8 +3543,8 @@ class zt {
3536
3543
  ];
3537
3544
  const p = n ? 0 : 0.5;
3538
3545
  this.trackX = 0, this.trackY = c - r + p, this.trackWidth = h, this.trackHeight = r;
3539
- const x = this.distance ? this.visibleDistance / f : 0;
3540
- let w = Math.floor(x * this.visibleDistance);
3546
+ const u = this.distance ? this.visibleDistance / f : 0;
3547
+ let w = Math.floor(u * this.visibleDistance);
3541
3548
  this.barY = this.trackY - 1 + (r - o) / 2, w < 30 ? w = 30 : w >= this.visibleDistance && (w = 0), this.barWidth = w, this.barHeight = o, this.barX = this.scroll / this.distance * (this.visibleDistance - this.barWidth), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
3542
3549
  }
3543
3550
  }
@@ -3619,7 +3626,10 @@ class wi {
3619
3626
  s > e.visibleHeight && this.setScrollY(s - e.visibleHeight / 2);
3620
3627
  }
3621
3628
  scrollToRowKey(t) {
3622
- const { body: e, database: i } = this.ctx, s = i.getRowIndexForRowKey(t), { top: r } = i.getPositionForRowIndex(s);
3629
+ const { body: e, database: i } = this.ctx, s = i.getRowIndexForRowKey(t);
3630
+ if (s === void 0)
3631
+ return;
3632
+ const { top: r } = i.getPositionForRowIndex(s);
3623
3633
  this.setScrollY(r - e.visibleHeight / 2);
3624
3634
  }
3625
3635
  }
@@ -3672,8 +3682,8 @@ class pi {
3672
3682
  config: { HEADER_HEIGHT: t, SCROLLER_TRACK_SIZE: e }
3673
3683
  } = this.ctx, i = this.ctx.database.getColumns();
3674
3684
  this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [];
3675
- const s = te(i), r = _t(i);
3676
- this.height = t * s, this.width = r.reduce((f, u) => f + ((u == null ? void 0 : u.width) || 100), 0), this.visibleHeight = this.height;
3685
+ const s = te(i), r = It(i);
3686
+ this.height = t * s, this.width = r.reduce((f, x) => f + ((x == null ? void 0 : x.width) || 100), 0), this.visibleHeight = this.height;
3677
3687
  const o = ei(ee(i, s));
3678
3688
  this.columnIndex = 0, this.resizeNum = 0, this.render(o, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
3679
3689
  const n = this.ctx.containerElement.getBoundingClientRect();
@@ -3684,9 +3694,9 @@ class pi {
3684
3694
  this.resizeAllColumn(f);
3685
3695
  }
3686
3696
  const c = this.fixedLeftCellHeaders.filter((f) => !f.hasChildren);
3687
- this.ctx.fixedLeftWidth = c.reduce((f, u) => f + u.width, 0);
3697
+ this.ctx.fixedLeftWidth = c.reduce((f, x) => f + x.width, 0);
3688
3698
  const d = this.fixedRightCellHeaders.filter((f) => !f.hasChildren);
3689
- this.ctx.fixedRightWidth = d.reduce((f, u) => f + u.width, e), this.ctx.maxColIndex = this.leafCellHeaders.length - 1, this.ctx.header.x = this.x, this.ctx.header.y = this.y, this.ctx.header.width = this.width, this.ctx.header.height = this.height, this.ctx.header.visibleWidth = this.visibleWidth, this.ctx.header.visibleHeight = this.visibleHeight;
3699
+ this.ctx.fixedRightWidth = d.reduce((f, x) => f + x.width, e), this.ctx.maxColIndex = this.leafCellHeaders.length - 1, this.ctx.header.x = this.x, this.ctx.header.y = this.y, this.ctx.header.width = this.width, this.ctx.header.height = this.height, this.ctx.header.visibleWidth = this.visibleWidth, this.ctx.header.visibleHeight = this.visibleHeight;
3690
3700
  }
3691
3701
  // 调整表头的宽度
3692
3702
  initResizeColumn() {
@@ -3775,7 +3785,7 @@ class pi {
3775
3785
  for (let o = 0; o < i; o++) {
3776
3786
  const n = t[o], h = r * (n.rowspan || 0), c = r * (n.level || 0);
3777
3787
  let d = n.width || 100;
3778
- n.children && (d = _t(n.children).reduce((g, p) => g + ((p == null ? void 0 : p.width) || 100), 0));
3788
+ n.children && (d = It(n.children).reduce((g, p) => g + ((p == null ? void 0 : p.width) || 100), 0));
3779
3789
  const f = new oe(this.ctx, this.columnIndex, s, c, d, h, n);
3780
3790
  this.ctx.database.setHeader(n.key, f), this.allCellHeaders.push(f), n.children || (this.leafCellHeaders.push(f), f.column.widthFillDisable || this.resizeNum++), n.fixed === "left" ? this.fixedLeftCellHeaders.push(f) : n.fixed === "right" ? this.fixedRightCellHeaders.push(f) : this.centerCellHeaders.push(f), !n.children && this.columnIndex++, n.children && this.render(n.children, s), s += d;
3781
3791
  }
@@ -3946,18 +3956,18 @@ class mi {
3946
3956
  MAX_HEIGHT: c = 0,
3947
3957
  ENABLE_OFFSET_HEIGHT: d = 0,
3948
3958
  OFFSET_HEIGHT: f = 0,
3949
- FOOTER_POSITION: u
3959
+ FOOTER_POSITION: x
3950
3960
  }
3951
3961
  } = this.ctx;
3952
3962
  if (!e.width)
3953
3963
  return;
3954
- this.x = 0, u === "top" && r ? this.y = e.height + i.height : this.y = e.height;
3964
+ this.x = 0, x === "top" && r ? this.y = e.height + i.height : this.y = e.height;
3955
3965
  const { data: g, sumHeight: p } = s.getData();
3956
3966
  this.height = p, this.data = g, this.width = e.width, this.visibleWidth = this.ctx.stageWidth - o;
3957
- const x = this.ctx.footer.height;
3958
- !this.data.length && !n ? this.height = h : !this.data.length && n && (this.height = n - e.height - x - o);
3967
+ const u = this.ctx.footer.height;
3968
+ !this.data.length && !n ? this.height = h : !this.data.length && n && (this.height = n - e.height - u - o);
3959
3969
  let w = this.height + e.height + o;
3960
- w += x;
3970
+ w += u;
3961
3971
  let m = w;
3962
3972
  const C = window.innerHeight, { top: y } = this.containerRect || this.ctx.containerElement.getBoundingClientRect();
3963
3973
  if (C > y && d && !n) {
@@ -3966,18 +3976,18 @@ class mi {
3966
3976
  } else this.data.length && n ? m = n : this.data.length && c && w > c && (m = c);
3967
3977
  m > 0 && (this.ctx.stageHeight = Math.floor(m), this.ctx.stageElement.style.height = `${this.ctx.stageHeight - 0.5}px`);
3968
3978
  let b = this.ctx.stageHeight - e.height - o;
3969
- r ? this.visibleHeight = b - x : 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 = g;
3970
- const E = window.devicePixelRatio || 1, v = this.ctx.stageWidth * E, I = this.ctx.stageHeight * E;
3971
- t.width = Math.floor(v), t.height = Math.floor(I);
3979
+ r ? this.visibleHeight = b - u : 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 = g;
3980
+ const E = window.devicePixelRatio || 1, v = this.ctx.stageWidth * E, _ = this.ctx.stageHeight * E;
3981
+ t.width = Math.floor(v), t.height = Math.floor(_);
3972
3982
  const L = this.data.length ? "not-empty" : "empty";
3973
3983
  this.ctx.emit("emptyChange", {
3974
3984
  isEmpty: L,
3975
3985
  type: L,
3976
3986
  headerHeight: e.height,
3977
3987
  bodyHeight: this.height,
3978
- footerHeight: x,
3988
+ footerHeight: u,
3979
3989
  width: this.width,
3980
- height: this.data.length ? 0 : h + x
3990
+ height: this.data.length ? 0 : h + u
3981
3991
  }), this.ctx.canvasElement.setAttribute(
3982
3992
  "style",
3983
3993
  ` height:${this.ctx.stageHeight}px;width:${this.ctx.stageWidth}px;`
@@ -4007,8 +4017,8 @@ class mi {
4007
4017
  } = this.ctx;
4008
4018
  if (this.isResizing && this.resizeTarget) {
4009
4019
  const f = this.resizeTarget.height;
4010
- let u = n - this.clientY;
4011
- u + f < d && (u = -(f - d)), this.resizeDiff = u, this.ctx.emit("draw");
4020
+ let x = n - this.clientY;
4021
+ x + f < d && (x = -(f - d)), this.resizeDiff = x, this.ctx.emit("draw");
4012
4022
  } else {
4013
4023
  if (this.resizeTarget = null, this.isMouseDown)
4014
4024
  return;
@@ -4020,11 +4030,11 @@ class mi {
4020
4030
  return;
4021
4031
  this.ctx.stageElement.style.cursor === "row-resize" && (this.ctx.stageElement.style.cursor = "default");
4022
4032
  for (let f = 0; f < this.renderRows.length; f++) {
4023
- const u = this.renderRows[f];
4024
- if (r > u.y - c + u.height - 1.5 && r < u.y - c + u.height + 1.5 && r < h - 4)
4025
- for (let p = 0; p < u.cells.length; p++) {
4026
- const x = u.cells[p];
4027
- o > x.drawX + 10 && o < x.drawX + x.width - 10 && x.rowspan === 1 && (this.ctx.stageElement.style.cursor = "row-resize", this.resizeTarget = u);
4033
+ const x = this.renderRows[f];
4034
+ if (r > x.y - c + x.height - 1.5 && r < x.y - c + x.height + 1.5 && r < h - 4)
4035
+ for (let p = 0; p < x.cells.length; p++) {
4036
+ const u = x.cells[p];
4037
+ o > u.drawX + 10 && o < u.drawX + u.width - 10 && u.rowspan === 1 && (this.ctx.stageElement.style.cursor = "row-resize", this.resizeTarget = x);
4028
4038
  }
4029
4039
  }
4030
4040
  }
@@ -4107,7 +4117,7 @@ class mi {
4107
4117
  this.headIndex = Math.max(0, h), this.tailIndex = Math.min(this.ctx.maxRowIndex, c + 1), this.visibleRows = o.slice(this.headIndex, this.tailIndex + 1), this.ctx.body.headIndex = this.headIndex, this.ctx.body.tailIndex = this.tailIndex, this.ctx.body.visibleRows = this.visibleRows;
4108
4118
  const d = [];
4109
4119
  for (let f = 0; f < this.visibleRows.length; f++) {
4110
- const u = this.headIndex + f, g = this.visibleRows[f], { height: p, top: x } = this.ctx.database.getPositionForRowIndex(u), w = new ne(this.ctx, u, 0, x + this.y, t.width, p, g);
4120
+ const x = this.headIndex + f, g = this.visibleRows[f], { height: p, top: u } = this.ctx.database.getPositionForRowIndex(x), w = new ne(this.ctx, x, 0, u + this.y, t.width, p, g);
4111
4121
  d.push(w);
4112
4122
  }
4113
4123
  this.renderRows = d, this.ctx.body.renderRows = d;
@@ -4324,26 +4334,26 @@ class Ei {
4324
4334
  SELECTOR_AREA_MIN_Y: c,
4325
4335
  SELECTOR_AREA_MAX_Y: d,
4326
4336
  SELECTOR_AREA_MAX_X_OFFSET: f,
4327
- SELECTOR_AREA_MAX_Y_OFFSET: u
4328
- } = this.ctx.config, g = n, p = h || this.ctx.maxColIndex - f, x = c, w = d || this.ctx.maxRowIndex - u;
4337
+ SELECTOR_AREA_MAX_Y_OFFSET: x
4338
+ } = this.ctx.config, g = n, p = h || this.ctx.maxColIndex - f, u = c, w = d || this.ctx.maxRowIndex - x;
4329
4339
  let [m, C] = r, [y, b] = o;
4330
- if (m < g || C > p || y < x || b > w)
4340
+ if (m < g || C > p || y < u || b > w)
4331
4341
  return;
4332
4342
  if (this.ctx.stageElement.focus({ preventScroll: !0 }), this.ctx.config.ENABLE_MERGE_CELL_LINK) {
4333
4343
  const v = this.adjustMergeCells(r, o);
4334
4344
  y = v.yArr[0], b = v.yArr[1], m = v.xArr[0], C = v.xArr[1], this.ctx.onlyMergeCell = v.onlyMergeCell;
4335
4345
  }
4336
- m === C && y === b ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, r = [Math.max(g, m), Math.min(p, C)], o = [Math.max(x, y), Math.min(w, b)];
4346
+ m === C && y === b ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, r = [Math.max(g, m), Math.min(p, C)], o = [Math.max(u, y), Math.min(w, b)];
4337
4347
  const { BEFORE_SET_SELECTOR_METHOD: E } = this.ctx.config;
4338
4348
  if (typeof E == "function") {
4339
- const I = E({
4349
+ const _ = E({
4340
4350
  focusCell: this.ctx.focusCell,
4341
4351
  xArr: r,
4342
4352
  yArr: o
4343
4353
  });
4344
- if (!I)
4354
+ if (!_)
4345
4355
  return;
4346
- r = I.xArr, o = I.yArr;
4356
+ r = _.xArr, o = _.yArr;
4347
4357
  }
4348
4358
  this.ctx.selector.xArr = r, this.ctx.selector.yArr = o, this.ctx.emit("setSelector", this.ctx.selector), this.ctx.emit("drawView");
4349
4359
  }
@@ -4352,38 +4362,38 @@ class Ei {
4352
4362
  var p;
4353
4363
  const [i, s] = e, [r, o] = t;
4354
4364
  let n = [], h = [];
4355
- for (let x = 0; x <= e[1] - e[0]; x++)
4365
+ for (let u = 0; u <= e[1] - e[0]; u++)
4356
4366
  for (let w = 0; w <= t[1] - t[0]; w++) {
4357
- const m = x + e[0], C = w + t[0], y = this.ctx.database.getVirtualBodyCell(m, C);
4367
+ const m = u + e[0], C = w + t[0], y = this.ctx.database.getVirtualBodyCell(m, C);
4358
4368
  y && ((m === i || m === s) && n.push(y), (C === r || C === o) && h.push(y));
4359
4369
  }
4360
4370
  const c = n.reduce(
4361
- (x, w) => {
4371
+ (u, w) => {
4362
4372
  const { yArr: m } = w.getSpanInfo(), [C, y] = m;
4363
- return x.minY = Math.min(x.minY, C), x.maxY = Math.max(x.maxY, y), x;
4373
+ return u.minY = Math.min(u.minY, C), u.maxY = Math.max(u.maxY, y), u;
4364
4374
  },
4365
4375
  {
4366
4376
  minY: i,
4367
4377
  maxY: s
4368
4378
  }
4369
4379
  ), d = h.reduce(
4370
- (x, w) => {
4380
+ (u, w) => {
4371
4381
  const { xArr: m } = w.getSpanInfo(), [C, y] = m;
4372
- return x.minX = Math.min(x.minX, C), x.maxX = Math.max(x.maxX, y), x;
4382
+ return u.minX = Math.min(u.minX, C), u.maxX = Math.max(u.maxX, y), u;
4373
4383
  },
4374
4384
  {
4375
4385
  minX: r,
4376
4386
  maxX: o
4377
4387
  }
4378
- ), f = [d.minX, d.maxX], u = [c.minY, c.maxY];
4388
+ ), f = [d.minX, d.maxX], x = [c.minY, c.maxY];
4379
4389
  let g = !1;
4380
4390
  if (d.minX !== d.maxX || c.minY !== c.maxY) {
4381
- const x = JSON.stringify(f) + JSON.stringify(u), w = (p = this.ctx.focusCell) == null ? void 0 : p.getSpanInfo();
4382
- g = (w && JSON.stringify(w.xArr) + JSON.stringify(w.yArr)) === x;
4391
+ const u = JSON.stringify(f) + JSON.stringify(x), w = (p = this.ctx.focusCell) == null ? void 0 : p.getSpanInfo();
4392
+ g = (w && JSON.stringify(w.xArr) + JSON.stringify(w.yArr)) === u;
4383
4393
  }
4384
4394
  return {
4385
4395
  xArr: f,
4386
- yArr: u,
4396
+ yArr: x,
4387
4397
  onlyMergeCell: g
4388
4398
  };
4389
4399
  }
@@ -4421,7 +4431,7 @@ class Ei {
4421
4431
  SELECTOR_AREA_MAX_Y: o,
4422
4432
  SELECTOR_AREA_MAX_X_OFFSET: n,
4423
4433
  SELECTOR_AREA_MAX_Y_OFFSET: h
4424
- } = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - n, f = r, u = o || this.ctx.maxRowIndex - h, g = [c, d], p = [f, u];
4434
+ } = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - n, f = r, x = o || this.ctx.maxRowIndex - h, g = [c, d], p = [f, x];
4425
4435
  this.setSelector(g, p);
4426
4436
  }
4427
4437
  }
@@ -4460,8 +4470,8 @@ class Ei {
4460
4470
  if (this.ctx.selector.enable = !0, i && t) {
4461
4471
  if (this.ctx.config.ENABLE_SELECTOR_SINGLE)
4462
4472
  return;
4463
- const { colIndex: s, rowIndex: r } = i, { colIndex: o, rowIndex: n } = e, h = Math.min(o, s), c = Math.max(o, s), d = Math.min(n, r), f = Math.max(n, r), u = [h, c], g = [d, f];
4464
- this.setSelector(u, g);
4473
+ const { colIndex: s, rowIndex: r } = i, { colIndex: o, rowIndex: n } = e, h = Math.min(o, s), c = Math.max(o, s), d = Math.min(n, r), f = Math.max(n, r), x = [h, c], g = [d, f];
4474
+ this.setSelector(x, g);
4465
4475
  } else {
4466
4476
  this.ctx.emit("cellSelectedClick", e);
4467
4477
  const s = [e.colIndex, e.colIndex], r = [e.rowIndex, e.rowIndex];
@@ -4529,9 +4539,9 @@ class Ei {
4529
4539
  for (let h = 0; h <= t[1] - t[0]; h++) {
4530
4540
  const c = n + e[0], d = h + t[0], f = this.ctx.database.getItemValueForRowIndexAndColIndex(c, d);
4531
4541
  if (f) {
4532
- const { rowKey: u, key: g } = f;
4533
- this.ctx.database.getReadonly(u, g) || (r.add(u), s.push({
4534
- rowKey: u,
4542
+ const { rowKey: x, key: g } = f;
4543
+ this.ctx.database.getReadonly(x, g) || (r.add(x), s.push({
4544
+ rowKey: x,
4535
4545
  key: g,
4536
4546
  value: null,
4537
4547
  row: {}
@@ -4559,18 +4569,18 @@ class Ei {
4559
4569
  const e = this.ctx.selector.yArr[0], i = this.ctx.selector.xArr[0], s = /* @__PURE__ */ new Set();
4560
4570
  navigator.clipboard.readText().then(async (r) => {
4561
4571
  let o = si(r);
4562
- const n = [i, i + o[0].length - 1], h = [e, e + o.length - 1], [c, d] = h, [f, u] = n, g = d - this.ctx.maxRowIndex, p = u - this.ctx.maxColIndex;
4572
+ const n = [i, i + o[0].length - 1], h = [e, e + o.length - 1], [c, d] = h, [f, x] = n, g = d - this.ctx.maxRowIndex, p = x - this.ctx.maxColIndex;
4563
4573
  (g > 0 || p > 0) && this.ctx.emit("onPastedDataOverflow", {
4564
4574
  maxY: d,
4565
- maxX: u,
4575
+ maxX: x,
4566
4576
  minY: c,
4567
4577
  minX: f,
4568
4578
  overflowRowCount: g,
4569
4579
  overflowColCount: p,
4570
4580
  textArr: o
4571
4581
  });
4572
- const x = o.length === 1 && o[0].length === 1;
4573
- if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(n, h) && !x) {
4582
+ const u = o.length === 1 && o[0].length === 1;
4583
+ if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(n, h) && !u) {
4574
4584
  const y = {
4575
4585
  code: "ERR_MERGED_CELLS_PASTE",
4576
4586
  message: "Merged cells cannot span paste data"
@@ -4582,12 +4592,12 @@ class Ei {
4582
4592
  for (let y = 0; y <= o.length - 1; y++) {
4583
4593
  const b = o[y].length;
4584
4594
  for (let E = 0; E <= b - 1; E++) {
4585
- const v = y + e, I = E + i, L = o[y][E], _ = this.ctx.database.getItemValueForRowIndexAndColIndex(
4595
+ const v = y + e, _ = E + i, L = o[y][E], I = this.ctx.database.getItemValueForRowIndexAndColIndex(
4586
4596
  v,
4587
- I
4597
+ _
4588
4598
  );
4589
- if (_) {
4590
- const { rowKey: R, key: A } = _;
4599
+ if (I) {
4600
+ const { rowKey: R, key: A } = I;
4591
4601
  this.ctx.database.getReadonly(R, A) || (s.add(R), w.push({
4592
4602
  rowKey: R,
4593
4603
  key: A,
@@ -4673,8 +4683,8 @@ class Ei {
4673
4683
  SELECTOR_AREA_MAX_Y: o,
4674
4684
  SELECTOR_AREA_MAX_X_OFFSET: n,
4675
4685
  SELECTOR_AREA_MAX_Y_OFFSET: h
4676
- } = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - n, f = r, u = o || this.ctx.maxRowIndex - h;
4677
- return !(e < c || e > d || t < f || t > u);
4686
+ } = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - n, f = r, x = o || this.ctx.maxRowIndex - h;
4687
+ return !(e < c || e > d || t < f || t > x);
4678
4688
  }
4679
4689
  /**
4680
4690
  * 调整滚动条位置,让到达边界时自动滚动
@@ -4716,19 +4726,19 @@ class Ei {
4716
4726
  body: h,
4717
4727
  scrollX: c,
4718
4728
  scrollY: d,
4719
- config: { SCROLLER_TRACK_SIZE: f, FOOTER_FIXED: u, FOOTER_POSITION: g, ENABLE_MERGE_CELL_LINK: p }
4729
+ config: { SCROLLER_TRACK_SIZE: f, FOOTER_FIXED: x, FOOTER_POSITION: g, ENABLE_MERGE_CELL_LINK: p }
4720
4730
  } = this.ctx;
4721
4731
  if (!i)
4722
4732
  return;
4723
4733
  p && this.ctx.onlyMergeCell && i.updateSpanInfo();
4724
- const { drawX: x, drawY: w, width: m, height: C, fixed: y } = i, b = r - x + 1, E = i.drawX + m - (e - s) + 1;
4725
- let v = o.height - w, I = C;
4726
- I > h.visibleHeight && (I = h.visibleHeight);
4734
+ const { drawX: u, drawY: w, width: m, height: C, fixed: y } = i, b = r - u + 1, E = i.drawX + m - (e - s) + 1;
4735
+ let v = o.height - w, _ = C;
4736
+ _ > h.visibleHeight && (_ = h.visibleHeight);
4727
4737
  let L = 0;
4728
- u && (g === "top" ? v = o.height + n.height - w : L = n.visibleHeight);
4729
- const _ = w + I - (t - L - f);
4738
+ x && (g === "top" ? v = o.height + n.height - w : L = n.visibleHeight);
4739
+ const I = w + _ - (t - L - f);
4730
4740
  let R = c, A = d;
4731
- E > 0 && !y ? R = Math.floor(c + E) : b > 0 && !y && (R = Math.floor(c - b)), v > 0 ? A = Math.floor(d - v) : _ > 0 && (A = Math.floor(d + _)), (Math.abs(c - R) > 2 || Math.abs(d - A) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(R, A), this.ctx.emit("adjustBoundaryPosition", i));
4741
+ E > 0 && !y ? R = Math.floor(c + E) : b > 0 && !y && (R = Math.floor(c - b)), v > 0 ? A = Math.floor(d - v) : I > 0 && (A = Math.floor(d + I)), (Math.abs(c - R) > 2 || Math.abs(d - A) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(R, A), this.ctx.emit("adjustBoundaryPosition", i));
4732
4742
  }
4733
4743
  destroy() {
4734
4744
  this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
@@ -4744,8 +4754,8 @@ class Ci {
4744
4754
  this.ctx.on("mousemove", (t) => {
4745
4755
  if (this.ctx.stageElement.style.cursor === "crosshair" && (this.ctx.stageElement.style.cursor = "default"), this.ctx.editing || !this.ctx.focusCell || !this.maxColRowCell)
4746
4756
  return;
4747
- const { offsetX: e, offsetY: i } = this.ctx.getOffset(t), { colIndex: s, rowIndex: r, drawX: o, drawY: n, width: h, height: c } = this.maxColRowCell, d = 6, f = s === this.ctx.maxColIndex || r === this.ctx.maxRowIndex ? 0 : 2, u = o + h - d + f, g = n + c - d + f;
4748
- e > u && i > g && e < u + d && i < g + d && (this.ctx.stageElement.style.cursor = "crosshair");
4757
+ const { offsetX: e, offsetY: i } = this.ctx.getOffset(t), { colIndex: s, rowIndex: r, drawX: o, drawY: n, width: h, height: c } = this.maxColRowCell, d = 6, f = s === this.ctx.maxColIndex || r === this.ctx.maxRowIndex ? 0 : 2, x = o + h - d + f, g = n + c - d + f;
4758
+ e > x && i > g && e < x + d && i < g + d && (this.ctx.stageElement.style.cursor = "crosshair");
4749
4759
  }), this.ctx.on("cellMouseenter", (t) => {
4750
4760
  const { xArr: e, yArr: i } = this.ctx.selector, s = e[1], r = i[1], { colIndex: o, rowIndex: n } = t;
4751
4761
  this.ctx.config.ENABLE_AUTOFILL && o === s && n === r && (this.maxColRowCell = t), this.mouseenter(t);
@@ -4790,13 +4800,13 @@ class Ci {
4790
4800
  SELECTOR_AREA_MAX_X: c,
4791
4801
  SELECTOR_AREA_MIN_Y: d,
4792
4802
  SELECTOR_AREA_MAX_Y: f,
4793
- SELECTOR_AREA_MAX_X_OFFSET: u,
4803
+ SELECTOR_AREA_MAX_X_OFFSET: x,
4794
4804
  SELECTOR_AREA_MAX_Y_OFFSET: g
4795
- } = this.ctx.config, p = h, x = c || this.ctx.maxColIndex - u, w = d, m = f || this.ctx.maxRowIndex - g;
4805
+ } = this.ctx.config, p = h, u = c || this.ctx.maxColIndex - x, w = d, m = f || this.ctx.maxRowIndex - g;
4796
4806
  let [C, y] = o, [b, E] = n;
4797
4807
  if (C < p || b < w)
4798
4808
  return;
4799
- o = [Math.max(p, C), Math.min(x, y)], n = [Math.max(w, b), Math.min(m, E)];
4809
+ o = [Math.max(p, C), Math.min(u, y)], n = [Math.max(w, b), Math.min(m, E)];
4800
4810
  const { BEFORE_SET_AUTOFILL_METHOD: v } = this.ctx.config;
4801
4811
  if (typeof v == "function") {
4802
4812
  const L = v({
@@ -4818,8 +4828,8 @@ class Ci {
4818
4828
  const t = /* @__PURE__ */ new Set(), e = this.ctx.getSelectedData(), i = /* @__PURE__ */ new Map();
4819
4829
  for (let g = 0; g <= e.yArr[1] - e.yArr[0]; g++)
4820
4830
  for (let p = 0; p <= e.xArr[1] - e.xArr[0]; p++) {
4821
- const x = g + e.yArr[0], w = p + e.xArr[0];
4822
- i.set(`${x}-${w}`, !0);
4831
+ const u = g + e.yArr[0], w = p + e.xArr[0];
4832
+ i.set(`${u}-${w}`, !0);
4823
4833
  }
4824
4834
  const { value: s } = e, r = s[0].length, o = s.length, n = this.ctx.autofill.xArr, h = this.ctx.autofill.yArr, c = r === 1 && o === 1;
4825
4835
  if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(n, h) && !c) {
@@ -4833,7 +4843,7 @@ class Ci {
4833
4843
  let d = [];
4834
4844
  for (let g = 0; g <= h[1] - h[0]; g++)
4835
4845
  for (let p = 0; p <= n[1] - n[0]; p++) {
4836
- const x = p + n[0], w = g + h[0], m = s[g % o][p % r], C = this.ctx.database.getItemValueForRowIndexAndColIndex(w, x), y = `${w}-${x}`;
4846
+ const u = p + n[0], w = g + h[0], m = s[g % o][p % r], C = this.ctx.database.getItemValueForRowIndexAndColIndex(w, u), y = `${w}-${u}`;
4837
4847
  if (C && !i.has(y)) {
4838
4848
  const { rowKey: b, key: E } = C;
4839
4849
  this.ctx.database.getReadonly(b, E) || (t.add(b), d.push({
@@ -4849,21 +4859,21 @@ class Ci {
4849
4859
  this.ctx.selector.xArr = this.ctx.autofill.xArr, this.ctx.selector.yArr = this.ctx.autofill.yArr;
4850
4860
  const { BEFORE_AUTOFILL_DATA_METHOD: f } = this.ctx.config;
4851
4861
  if (typeof f == "function") {
4852
- const g = f, p = d.map((x) => ({
4853
- rowKey: x.rowKey,
4854
- key: x.key,
4855
- value: x.value,
4856
- oldValue: this.ctx.database.getItemValue(x.rowKey, x.key),
4857
- row: this.ctx.database.getRowDataItemForRowKey(x.rowKey)
4862
+ const g = f, p = d.map((u) => ({
4863
+ rowKey: u.rowKey,
4864
+ key: u.key,
4865
+ value: u.value,
4866
+ oldValue: this.ctx.database.getItemValue(u.rowKey, u.key),
4867
+ row: this.ctx.database.getRowDataItemForRowKey(u.rowKey)
4858
4868
  }));
4859
4869
  if (d = await g(p, n, h), d && !d.length)
4860
4870
  return;
4861
4871
  }
4862
4872
  this.ctx.batchSetItemValueByEditor(d, !0);
4863
- let u = [];
4873
+ let x = [];
4864
4874
  t.forEach((g) => {
4865
- u.push(this.ctx.database.getRowDataItemForRowKey(g));
4866
- }), this.ctx.emit("autofillChange", d, u);
4875
+ x.push(this.ctx.database.getRowDataItemForRowKey(g));
4876
+ }), this.ctx.emit("autofillChange", d, x);
4867
4877
  }
4868
4878
  mouseenter(t) {
4869
4879
  if (["index", "selection", "index-selection"].includes(t.type))
@@ -4889,7 +4899,7 @@ const rt = Math.min, U = Math.max, ft = Math.round, z = (a) => ({
4889
4899
  start: "end",
4890
4900
  end: "start"
4891
4901
  };
4892
- function It(a, t, e) {
4902
+ function _t(a, t, e) {
4893
4903
  return U(a, rt(t, e));
4894
4904
  }
4895
4905
  function at(a, t) {
@@ -4917,16 +4927,16 @@ function Ri(a, t, e) {
4917
4927
  e === void 0 && (e = !1);
4918
4928
  const i = lt(a), s = Ht(a), r = Mt(s);
4919
4929
  let o = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
4920
- return t.reference[r] > t.floating[r] && (o = ut(o)), [o, ut(o)];
4930
+ return t.reference[r] > t.floating[r] && (o = xt(o)), [o, xt(o)];
4921
4931
  }
4922
- function _i(a) {
4923
- const t = ut(a);
4932
+ function Ii(a) {
4933
+ const t = xt(a);
4924
4934
  return [Ot(a), t, Ot(t)];
4925
4935
  }
4926
4936
  function Ot(a) {
4927
4937
  return a.replace(/start|end/g, (t) => vi[t]);
4928
4938
  }
4929
- function Ii(a, t, e) {
4939
+ function _i(a, t, e) {
4930
4940
  const i = ["left", "right"], s = ["right", "left"], r = ["top", "bottom"], o = ["bottom", "top"];
4931
4941
  switch (a) {
4932
4942
  case "top":
@@ -4941,10 +4951,10 @@ function Ii(a, t, e) {
4941
4951
  }
4942
4952
  function Oi(a, t, e, i) {
4943
4953
  const s = lt(a);
4944
- let r = Ii(G(a), e === "start", i);
4954
+ let r = _i(G(a), e === "start", i);
4945
4955
  return s && (r = r.map((o) => o + "-" + s), t && (r = r.concat(r.map(Ot)))), r;
4946
4956
  }
4947
- function ut(a) {
4957
+ function xt(a) {
4948
4958
  return a.replace(/left|right|bottom|top/g, (t) => bi[t]);
4949
4959
  }
4950
4960
  function Li(a) {
@@ -4964,7 +4974,7 @@ function le(a) {
4964
4974
  left: a
4965
4975
  };
4966
4976
  }
4967
- function xt(a) {
4977
+ function ut(a) {
4968
4978
  const {
4969
4979
  x: t,
4970
4980
  y: e,
@@ -4987,7 +4997,7 @@ function $t(a, t, e) {
4987
4997
  reference: i,
4988
4998
  floating: s
4989
4999
  } = a;
4990
- const r = J(t), o = Ht(t), n = Mt(o), h = G(t), c = r === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, u = i[n] / 2 - s[n] / 2;
5000
+ const r = J(t), o = Ht(t), n = Mt(o), h = G(t), c = r === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, x = i[n] / 2 - s[n] / 2;
4991
5001
  let g;
4992
5002
  switch (h) {
4993
5003
  case "top":
@@ -5022,10 +5032,10 @@ function $t(a, t, e) {
5022
5032
  }
5023
5033
  switch (lt(t)) {
5024
5034
  case "start":
5025
- g[o] -= u * (e && c ? -1 : 1);
5035
+ g[o] -= x * (e && c ? -1 : 1);
5026
5036
  break;
5027
5037
  case "end":
5028
- g[o] += u * (e && c ? -1 : 1);
5038
+ g[o] += x * (e && c ? -1 : 1);
5029
5039
  break;
5030
5040
  }
5031
5041
  return g;
@@ -5044,12 +5054,12 @@ const Si = async (a, t, e) => {
5044
5054
  }), {
5045
5055
  x: d,
5046
5056
  y: f
5047
- } = $t(c, i, h), u = i, g = {}, p = 0;
5048
- for (let x = 0; x < n.length; x++) {
5057
+ } = $t(c, i, h), x = i, g = {}, p = 0;
5058
+ for (let u = 0; u < n.length; u++) {
5049
5059
  const {
5050
5060
  name: w,
5051
5061
  fn: m
5052
- } = n[x], {
5062
+ } = n[u], {
5053
5063
  x: C,
5054
5064
  y,
5055
5065
  data: b,
@@ -5058,7 +5068,7 @@ const Si = async (a, t, e) => {
5058
5068
  x: d,
5059
5069
  y: f,
5060
5070
  initialPlacement: i,
5061
- placement: u,
5071
+ placement: x,
5062
5072
  strategy: s,
5063
5073
  middlewareData: g,
5064
5074
  rects: c,
@@ -5074,19 +5084,19 @@ const Si = async (a, t, e) => {
5074
5084
  ...g[w],
5075
5085
  ...b
5076
5086
  }
5077
- }, E && p <= 50 && (p++, typeof E == "object" && (E.placement && (u = E.placement), E.rects && (c = E.rects === !0 ? await o.getElementRects({
5087
+ }, E && p <= 50 && (p++, typeof E == "object" && (E.placement && (x = E.placement), E.rects && (c = E.rects === !0 ? await o.getElementRects({
5078
5088
  reference: a,
5079
5089
  floating: t,
5080
5090
  strategy: s
5081
5091
  }) : E.rects), {
5082
5092
  x: d,
5083
5093
  y: f
5084
- } = $t(c, u, h)), x = -1);
5094
+ } = $t(c, x, h)), u = -1);
5085
5095
  }
5086
5096
  return {
5087
5097
  x: d,
5088
5098
  y: f,
5089
- placement: u,
5099
+ placement: x,
5090
5100
  strategy: s,
5091
5101
  middlewareData: g
5092
5102
  };
@@ -5105,9 +5115,9 @@ async function he(a, t) {
5105
5115
  boundary: c = "clippingAncestors",
5106
5116
  rootBoundary: d = "viewport",
5107
5117
  elementContext: f = "floating",
5108
- altBoundary: u = !1,
5118
+ altBoundary: x = !1,
5109
5119
  padding: g = 0
5110
- } = at(t, a), p = le(g), w = n[u ? f === "floating" ? "reference" : "floating" : f], m = xt(await r.getClippingRect({
5120
+ } = at(t, a), p = le(g), w = n[x ? f === "floating" ? "reference" : "floating" : f], m = ut(await r.getClippingRect({
5111
5121
  element: (e = await (r.isElement == null ? void 0 : r.isElement(w))) == null || e ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(n.floating)),
5112
5122
  boundary: c,
5113
5123
  rootBoundary: d,
@@ -5123,7 +5133,7 @@ async function he(a, t) {
5123
5133
  } : {
5124
5134
  x: 1,
5125
5135
  y: 1
5126
- }, E = xt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
5136
+ }, E = ut(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
5127
5137
  elements: n,
5128
5138
  rect: C,
5129
5139
  offsetParent: y,
@@ -5154,15 +5164,15 @@ const Ai = (a) => ({
5154
5164
  } = at(a, t) || {};
5155
5165
  if (c == null)
5156
5166
  return {};
5157
- const f = le(d), u = {
5167
+ const f = le(d), x = {
5158
5168
  x: e,
5159
5169
  y: i
5160
- }, g = Ht(s), p = Mt(g), x = await o.getDimensions(c), w = g === "y", m = w ? "top" : "left", C = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", b = r.reference[p] + r.reference[g] - u[g] - r.floating[p], E = u[g] - r.reference[g], v = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
5161
- let I = v ? v[y] : 0;
5162
- (!I || !await (o.isElement == null ? void 0 : o.isElement(v))) && (I = n.floating[y] || r.floating[p]);
5163
- const L = b / 2 - E / 2, _ = I / 2 - x[p] / 2 - 1, R = rt(f[m], _), A = rt(f[C], _), S = R, M = I - x[p] - A, T = I / 2 - x[p] / 2 + L, B = It(S, T, M), Y = !h.arrow && lt(s) != null && T !== B && r.reference[p] / 2 - (T < S ? R : A) - x[p] / 2 < 0, k = Y ? T < S ? T - S : T - M : 0;
5170
+ }, g = Ht(s), p = Mt(g), u = await o.getDimensions(c), w = g === "y", m = w ? "top" : "left", C = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", b = r.reference[p] + r.reference[g] - x[g] - r.floating[p], E = x[g] - r.reference[g], v = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
5171
+ let _ = v ? v[y] : 0;
5172
+ (!_ || !await (o.isElement == null ? void 0 : o.isElement(v))) && (_ = n.floating[y] || r.floating[p]);
5173
+ const L = b / 2 - E / 2, I = _ / 2 - u[p] / 2 - 1, R = rt(f[m], I), A = rt(f[C], I), S = R, M = _ - u[p] - A, T = _ / 2 - u[p] / 2 + L, B = _t(S, T, M), Y = !h.arrow && lt(s) != null && T !== B && r.reference[p] / 2 - (T < S ? R : A) - u[p] / 2 < 0, k = Y ? T < S ? T - S : T - M : 0;
5164
5174
  return {
5165
- [g]: u[g] + k,
5175
+ [g]: x[g] + k,
5166
5176
  data: {
5167
5177
  [g]: B,
5168
5178
  centerOffset: T - B - k,
@@ -5189,28 +5199,28 @@ const Ai = (a) => ({
5189
5199
  } = t, {
5190
5200
  mainAxis: d = !0,
5191
5201
  crossAxis: f = !0,
5192
- fallbackPlacements: u,
5202
+ fallbackPlacements: x,
5193
5203
  fallbackStrategy: g = "bestFit",
5194
5204
  fallbackAxisSideDirection: p = "none",
5195
- flipAlignment: x = !0,
5205
+ flipAlignment: u = !0,
5196
5206
  ...w
5197
5207
  } = at(a, t);
5198
5208
  if ((e = r.arrow) != null && e.alignmentOffset)
5199
5209
  return {};
5200
- const m = G(s), C = J(n), y = G(n) === n, b = await (h.isRTL == null ? void 0 : h.isRTL(c.floating)), E = u || (y || !x ? [ut(n)] : _i(n)), v = p !== "none";
5201
- !u && v && E.push(...Oi(n, x, p, b));
5202
- const I = [n, ...E], L = await he(t, w), _ = [];
5210
+ const m = G(s), C = J(n), y = G(n) === n, b = await (h.isRTL == null ? void 0 : h.isRTL(c.floating)), E = x || (y || !u ? [xt(n)] : Ii(n)), v = p !== "none";
5211
+ !x && v && E.push(...Oi(n, u, p, b));
5212
+ const _ = [n, ...E], L = await he(t, w), I = [];
5203
5213
  let R = ((i = r.flip) == null ? void 0 : i.overflows) || [];
5204
- if (d && _.push(L[m]), f) {
5214
+ if (d && I.push(L[m]), f) {
5205
5215
  const T = Ri(s, o, b);
5206
- _.push(L[T[0]], L[T[1]]);
5216
+ I.push(L[T[0]], L[T[1]]);
5207
5217
  }
5208
5218
  if (R = [...R, {
5209
5219
  placement: s,
5210
- overflows: _
5211
- }], !_.every((T) => T <= 0)) {
5220
+ overflows: I
5221
+ }], !I.every((T) => T <= 0)) {
5212
5222
  var A, S;
5213
- const T = (((A = r.flip) == null ? void 0 : A.index) || 0) + 1, B = I[T];
5223
+ const T = (((A = r.flip) == null ? void 0 : A.index) || 0) + 1, B = _[T];
5214
5224
  if (B)
5215
5225
  return {
5216
5226
  data: {
@@ -5260,7 +5270,7 @@ async function Mi(a, t) {
5260
5270
  elements: s
5261
5271
  } = a, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), o = G(e), n = lt(e), h = J(e) === "y", c = ["left", "top"].includes(o) ? -1 : 1, d = r && h ? -1 : 1, f = at(t, a);
5262
5272
  let {
5263
- mainAxis: u,
5273
+ mainAxis: x,
5264
5274
  crossAxis: g,
5265
5275
  alignmentAxis: p
5266
5276
  } = typeof f == "number" ? {
@@ -5274,9 +5284,9 @@ async function Mi(a, t) {
5274
5284
  };
5275
5285
  return n && typeof p == "number" && (g = n === "end" ? p * -1 : p), h ? {
5276
5286
  x: g * d,
5277
- y: u * c
5287
+ y: x * c
5278
5288
  } : {
5279
- x: u * c,
5289
+ x: x * c,
5280
5290
  y: g * d
5281
5291
  };
5282
5292
  }
@@ -5330,28 +5340,28 @@ const Hi = function(a) {
5330
5340
  } = at(a, t), c = {
5331
5341
  x: e,
5332
5342
  y: i
5333
- }, d = await he(t, h), f = J(G(s)), u = ae(f);
5334
- let g = c[u], p = c[f];
5343
+ }, d = await he(t, h), f = J(G(s)), x = ae(f);
5344
+ let g = c[x], p = c[f];
5335
5345
  if (r) {
5336
- const w = u === "y" ? "top" : "left", m = u === "y" ? "bottom" : "right", C = g + d[w], y = g - d[m];
5337
- g = It(C, g, y);
5346
+ const w = x === "y" ? "top" : "left", m = x === "y" ? "bottom" : "right", C = g + d[w], y = g - d[m];
5347
+ g = _t(C, g, y);
5338
5348
  }
5339
5349
  if (o) {
5340
5350
  const w = f === "y" ? "top" : "left", m = f === "y" ? "bottom" : "right", C = p + d[w], y = p - d[m];
5341
- p = It(C, p, y);
5351
+ p = _t(C, p, y);
5342
5352
  }
5343
- const x = n.fn({
5353
+ const u = n.fn({
5344
5354
  ...t,
5345
- [u]: g,
5355
+ [x]: g,
5346
5356
  [f]: p
5347
5357
  });
5348
5358
  return {
5349
- ...x,
5359
+ ...u,
5350
5360
  data: {
5351
- x: x.x - e,
5352
- y: x.y - i,
5361
+ x: u.x - e,
5362
+ y: u.y - i,
5353
5363
  enabled: {
5354
- [u]: r,
5364
+ [x]: r,
5355
5365
  [f]: o
5356
5366
  }
5357
5367
  }
@@ -5376,7 +5386,7 @@ function V(a) {
5376
5386
  function ce(a) {
5377
5387
  return gt() ? a instanceof Node || a instanceof N(a).Node : !1;
5378
5388
  }
5379
- function F(a) {
5389
+ function X(a) {
5380
5390
  return gt() ? a instanceof Element || a instanceof N(a).Element : !1;
5381
5391
  }
5382
5392
  function K(a) {
@@ -5391,7 +5401,7 @@ function ht(a) {
5391
5401
  overflowX: e,
5392
5402
  overflowY: i,
5393
5403
  display: s
5394
- } = X(a);
5404
+ } = F(a);
5395
5405
  return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
5396
5406
  }
5397
5407
  function Ni(a) {
@@ -5407,10 +5417,10 @@ function wt(a) {
5407
5417
  });
5408
5418
  }
5409
5419
  function Dt(a) {
5410
- const t = Nt(), e = F(a) ? X(a) : a;
5420
+ const t = Nt(), e = X(a) ? F(a) : a;
5411
5421
  return e.transform !== "none" || e.perspective !== "none" || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((i) => (e.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (e.contain || "").includes(i));
5412
5422
  }
5413
- function Fi(a) {
5423
+ function Xi(a) {
5414
5424
  let t = $(a);
5415
5425
  for (; K(t) && !Q(t); ) {
5416
5426
  if (Dt(t))
@@ -5427,11 +5437,11 @@ function Nt() {
5427
5437
  function Q(a) {
5428
5438
  return ["html", "body", "#document"].includes(tt(a));
5429
5439
  }
5430
- function X(a) {
5440
+ function F(a) {
5431
5441
  return N(a).getComputedStyle(a);
5432
5442
  }
5433
5443
  function pt(a) {
5434
- return F(a) ? {
5444
+ return X(a) ? {
5435
5445
  scrollLeft: a.scrollLeft,
5436
5446
  scrollTop: a.scrollTop
5437
5447
  } : {
@@ -5469,7 +5479,7 @@ function St(a) {
5469
5479
  return a.parent && Object.getPrototypeOf(a.parent) ? a.frameElement : null;
5470
5480
  }
5471
5481
  function fe(a) {
5472
- const t = X(a);
5482
+ const t = F(a);
5473
5483
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
5474
5484
  const s = K(a), r = s ? a.offsetWidth : e, o = s ? a.offsetHeight : i, n = ft(e) !== r || ft(i) !== o;
5475
5485
  return n && (e = r, i = o), {
@@ -5478,11 +5488,11 @@ function fe(a) {
5478
5488
  $: n
5479
5489
  };
5480
5490
  }
5481
- function ue(a) {
5482
- return F(a) ? a : a.contextElement;
5491
+ function xe(a) {
5492
+ return X(a) ? a : a.contextElement;
5483
5493
  }
5484
5494
  function Z(a) {
5485
- const t = ue(a);
5495
+ const t = xe(a);
5486
5496
  if (!K(t))
5487
5497
  return z(1);
5488
5498
  const e = t.getBoundingClientRect(), {
@@ -5496,10 +5506,10 @@ function Z(a) {
5496
5506
  y: n
5497
5507
  };
5498
5508
  }
5499
- const Xi = /* @__PURE__ */ z(0);
5500
- function xe(a) {
5509
+ const Fi = /* @__PURE__ */ z(0);
5510
+ function ue(a) {
5501
5511
  const t = N(a);
5502
- return !Nt() || !t.visualViewport ? Xi : {
5512
+ return !Nt() || !t.visualViewport ? Fi : {
5503
5513
  x: t.visualViewport.offsetLeft,
5504
5514
  y: t.visualViewport.offsetTop
5505
5515
  };
@@ -5509,20 +5519,20 @@ function Bi(a, t, e) {
5509
5519
  }
5510
5520
  function ot(a, t, e, i) {
5511
5521
  t === void 0 && (t = !1), e === void 0 && (e = !1);
5512
- const s = a.getBoundingClientRect(), r = ue(a);
5522
+ const s = a.getBoundingClientRect(), r = xe(a);
5513
5523
  let o = z(1);
5514
- t && (i ? F(i) && (o = Z(i)) : o = Z(a));
5515
- const n = Bi(r, e, i) ? xe(r) : z(0);
5524
+ t && (i ? X(i) && (o = Z(i)) : o = Z(a));
5525
+ const n = Bi(r, e, i) ? ue(r) : z(0);
5516
5526
  let h = (s.left + n.x) / o.x, c = (s.top + n.y) / o.y, d = s.width / o.x, f = s.height / o.y;
5517
5527
  if (r) {
5518
- const u = N(r), g = i && F(i) ? N(i) : i;
5519
- let p = u, x = St(p);
5520
- for (; x && i && g !== p; ) {
5521
- const w = Z(x), m = x.getBoundingClientRect(), C = X(x), y = m.left + (x.clientLeft + parseFloat(C.paddingLeft)) * w.x, b = m.top + (x.clientTop + parseFloat(C.paddingTop)) * w.y;
5522
- h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += y, c += b, p = N(x), x = St(p);
5528
+ const x = N(r), g = i && X(i) ? N(i) : i;
5529
+ let p = x, u = St(p);
5530
+ for (; u && i && g !== p; ) {
5531
+ const w = Z(u), m = u.getBoundingClientRect(), C = F(u), y = m.left + (u.clientLeft + parseFloat(C.paddingLeft)) * w.x, b = m.top + (u.clientTop + parseFloat(C.paddingTop)) * w.y;
5532
+ h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += y, c += b, p = N(u), u = St(p);
5523
5533
  }
5524
5534
  }
5525
- return xt({
5535
+ return ut({
5526
5536
  width: d,
5527
5537
  height: f,
5528
5538
  x: h,
@@ -5545,8 +5555,8 @@ function ki(a) {
5545
5555
  }, c = z(1);
5546
5556
  const d = z(0), f = K(i);
5547
5557
  if ((f || !f && !r) && ((tt(i) !== "body" || ht(o)) && (h = pt(i)), K(i))) {
5548
- const u = ot(i);
5549
- c = Z(i), d.x = u.x + i.clientLeft, d.y = u.y + i.clientTop;
5558
+ const x = ot(i);
5559
+ c = Z(i), d.x = x.x + i.clientLeft, d.y = x.y + i.clientTop;
5550
5560
  }
5551
5561
  return {
5552
5562
  width: e.width * c.x,
@@ -5566,7 +5576,7 @@ function Yi(a) {
5566
5576
  const t = V(a), e = pt(a), i = a.ownerDocument.body, s = U(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = U(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5567
5577
  let o = -e.scrollLeft + At(a);
5568
5578
  const n = -e.scrollTop;
5569
- return X(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
5579
+ return F(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
5570
5580
  width: s,
5571
5581
  height: r,
5572
5582
  x: o,
@@ -5603,31 +5613,31 @@ function Gt(a, t, e) {
5603
5613
  i = Vi(a, e);
5604
5614
  else if (t === "document")
5605
5615
  i = Yi(V(a));
5606
- else if (F(t))
5616
+ else if (X(t))
5607
5617
  i = Wi(t, e);
5608
5618
  else {
5609
- const s = xe(a);
5619
+ const s = ue(a);
5610
5620
  i = {
5611
5621
  ...t,
5612
5622
  x: t.x - s.x,
5613
5623
  y: t.y - s.y
5614
5624
  };
5615
5625
  }
5616
- return xt(i);
5626
+ return ut(i);
5617
5627
  }
5618
5628
  function ge(a, t) {
5619
5629
  const e = $(a);
5620
- return e === t || !F(e) || Q(e) ? !1 : X(e).position === "fixed" || ge(e, t);
5630
+ return e === t || !X(e) || Q(e) ? !1 : F(e).position === "fixed" || ge(e, t);
5621
5631
  }
5622
5632
  function Pi(a, t) {
5623
5633
  const e = t.get(a);
5624
5634
  if (e)
5625
5635
  return e;
5626
- let i = Lt(a, [], !1).filter((n) => F(n) && tt(n) !== "body"), s = null;
5627
- const r = X(a).position === "fixed";
5636
+ let i = Lt(a, [], !1).filter((n) => X(n) && tt(n) !== "body"), s = null;
5637
+ const r = F(a).position === "fixed";
5628
5638
  let o = r ? $(a) : a;
5629
- for (; F(o) && !Q(o); ) {
5630
- const n = X(o), h = Dt(o);
5639
+ for (; X(o) && !Q(o); ) {
5640
+ const n = F(o), h = Dt(o);
5631
5641
  !h && n.position === "fixed" && (s = null), (r ? !h && !s : !h && n.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ht(o) && !h && ge(a, o)) ? i = i.filter((d) => d !== o) : s = n, o = $(o);
5632
5642
  }
5633
5643
  return t.set(a, i), i;
@@ -5678,19 +5688,19 @@ function qi(a, t, e) {
5678
5688
  d = g.top + n.scrollTop, c = g.left + n.scrollLeft - // RTL <body> scrollbar.
5679
5689
  At(s, g);
5680
5690
  }
5681
- const f = o.left + n.scrollLeft - h.x - c, u = o.top + n.scrollTop - h.y - d;
5691
+ const f = o.left + n.scrollLeft - h.x - c, x = o.top + n.scrollTop - h.y - d;
5682
5692
  return {
5683
5693
  x: f,
5684
- y: u,
5694
+ y: x,
5685
5695
  width: o.width,
5686
5696
  height: o.height
5687
5697
  };
5688
5698
  }
5689
5699
  function yt(a) {
5690
- return X(a).position === "static";
5700
+ return F(a).position === "static";
5691
5701
  }
5692
5702
  function jt(a, t) {
5693
- if (!K(a) || X(a).position === "fixed")
5703
+ if (!K(a) || F(a).position === "fixed")
5694
5704
  return null;
5695
5705
  if (t)
5696
5706
  return t(a);
@@ -5704,7 +5714,7 @@ function we(a, t) {
5704
5714
  if (!K(a)) {
5705
5715
  let s = $(a);
5706
5716
  for (; s && !Q(s); ) {
5707
- if (F(s) && !yt(s))
5717
+ if (X(s) && !yt(s))
5708
5718
  return s;
5709
5719
  s = $(s);
5710
5720
  }
@@ -5713,7 +5723,7 @@ function we(a, t) {
5713
5723
  let i = jt(a, t);
5714
5724
  for (; i && Ni(i) && yt(i); )
5715
5725
  i = jt(i, t);
5716
- return i && Q(i) && yt(i) && !Dt(i) ? e : i || Fi(a) || e;
5726
+ return i && Q(i) && yt(i) && !Dt(i) ? e : i || Xi(a) || e;
5717
5727
  }
5718
5728
  const Gi = async function(a) {
5719
5729
  const t = this.getOffsetParent || we, e = this.getDimensions, i = await e(a.floating);
@@ -5728,7 +5738,7 @@ const Gi = async function(a) {
5728
5738
  };
5729
5739
  };
5730
5740
  function ji(a) {
5731
- return X(a).direction === "rtl";
5741
+ return F(a).direction === "rtl";
5732
5742
  }
5733
5743
  const Ui = {
5734
5744
  convertOffsetParentRelativeRectToViewportRelativeRect: ki,
@@ -5739,7 +5749,7 @@ const Ui = {
5739
5749
  getClientRects: Ki,
5740
5750
  getDimensions: $i,
5741
5751
  getScale: Z,
5742
- isElement: F,
5752
+ isElement: X,
5743
5753
  isRTL: ji
5744
5754
  }, pe = Hi, me = Di, ye = Ti, Zi = Ai, Ee = (a, t, e) => {
5745
5755
  const i = /* @__PURE__ */ new Map(), s = {
@@ -5833,26 +5843,26 @@ let Ji = class {
5833
5843
  top: `${c}px`,
5834
5844
  left: `${h}px`
5835
5845
  }), f.arrow) {
5836
- const u = f.arrow;
5846
+ const x = f.arrow;
5837
5847
  ["left", "left-start", "left-end"].includes(d) ? Object.assign(this.arrowEl.style, {
5838
- top: `${u.y}px`,
5848
+ top: `${x.y}px`,
5839
5849
  bottom: "",
5840
5850
  left: "",
5841
5851
  right: "-5px"
5842
5852
  }) : ["right", "right-start", "right-end"].includes(d) ? Object.assign(this.arrowEl.style, {
5843
- top: `${u.y}px`,
5853
+ top: `${x.y}px`,
5844
5854
  bottom: "",
5845
5855
  left: "-5px",
5846
5856
  right: ""
5847
5857
  }) : ["bottom", "bottom-start", "bottom-end"].includes(d) ? Object.assign(this.arrowEl.style, {
5848
5858
  top: "-5px",
5849
5859
  bottom: "",
5850
- left: `${u.x}px`,
5860
+ left: `${x.x}px`,
5851
5861
  right: ""
5852
5862
  }) : ["top", "top-start", "top-end"].includes(d) && Object.assign(this.arrowEl.style, {
5853
5863
  top: "",
5854
5864
  bottom: "-5px",
5855
- left: `${u.x}px`,
5865
+ left: `${x.x}px`,
5856
5866
  right: ""
5857
5867
  });
5858
5868
  }
@@ -6016,8 +6026,8 @@ class Qi {
6016
6026
  let f = this.ctx.body.visibleHeight;
6017
6027
  if (r > f && (r = f), this.editorEl.style.display = "inline-block", this.editorEl.style.left = `${this.drawX - 1}px`, this.editorEl.style.top = `${this.drawY - 1}px`, this.editorEl.style.bottom = "auto", this.editorEl.style.maxHeight = `${f}px`, s === "text") {
6018
6028
  this.inputEl.style.display = "block", this.inputEl.style.minWidth = `${o - 1}px`, this.inputEl.style.minHeight = `${r - 1}px`, this.inputEl.style.maxHeight = `${f}px`, this.inputEl.style.width = `${o - 1}px`, this.inputEl.style.height = "auto", this.inputEl.style.padding = `${c}px`, i !== null && (this.inputEl.value = i), this.inputEl.focus({ preventScroll: !0 });
6019
- const u = this.inputEl.value.length;
6020
- this.inputEl.setSelectionRange(u, u);
6029
+ const x = this.inputEl.value.length;
6030
+ this.inputEl.setSelectionRange(x, x);
6021
6031
  } else
6022
6032
  this.inputEl.style.display = "none";
6023
6033
  (this.inputEl.scrollHeight > r || this.drawY < d.height) && this.autoSize();
@@ -6124,7 +6134,7 @@ class es {
6124
6134
  n.forEach((w) => {
6125
6135
  w.render && (w.fixed === "left" ? c.push(w) : w.fixed === "right" ? d.push(w) : h.push(w));
6126
6136
  });
6127
- const f = e - i, u = {
6137
+ const f = e - i, x = {
6128
6138
  key: "left",
6129
6139
  style: {
6130
6140
  position: "absolute",
@@ -6167,7 +6177,7 @@ class es {
6167
6177
  width: `${r}px`,
6168
6178
  height: `${o}px`
6169
6179
  },
6170
- views: [u, g, p]
6180
+ views: [x, g, p]
6171
6181
  };
6172
6182
  }
6173
6183
  getBody() {
@@ -6182,7 +6192,7 @@ class es {
6182
6192
  fixedLeftWidth: r,
6183
6193
  fixedRightWidth: o,
6184
6194
  config: { SCROLLER_TRACK_SIZE: n, CSS_PREFIX: h }
6185
- } = this.ctx, { visibleWidth: c, visibleHeight: d } = this.ctx.body, f = o - n, u = {
6195
+ } = this.ctx, { visibleWidth: c, visibleHeight: d } = this.ctx.body, f = o - n, x = {
6186
6196
  key: "left",
6187
6197
  style: {
6188
6198
  position: "absolute",
@@ -6225,13 +6235,13 @@ class es {
6225
6235
  width: `${c}px`,
6226
6236
  height: `${d}px`
6227
6237
  },
6228
- views: [u, g, p]
6238
+ views: [x, g, p]
6229
6239
  };
6230
6240
  }
6231
6241
  getFooter() {
6232
6242
  const t = [], e = [], i = [];
6233
- this.ctx.footer.renderRows.forEach((x) => {
6234
- x.cells.forEach((w) => {
6243
+ this.ctx.footer.renderRows.forEach((u) => {
6244
+ u.cells.forEach((w) => {
6235
6245
  w.cellType === "footer" && w.renderFooter && (w.render = w.renderFooter, w.fixed === "left" ? e.push(w) : w.fixed === "right" ? i.push(w) : t.push(w));
6236
6246
  });
6237
6247
  });
@@ -6250,7 +6260,7 @@ class es {
6250
6260
  height: `${c}px`
6251
6261
  },
6252
6262
  cells: e
6253
- }, u = {
6263
+ }, x = {
6254
6264
  key: "center",
6255
6265
  style: {
6256
6266
  position: "absolute",
@@ -6282,7 +6292,7 @@ class es {
6282
6292
  width: `${h}px`,
6283
6293
  height: `${c}px`
6284
6294
  },
6285
- views: [f, u, g]
6295
+ views: [f, x, g]
6286
6296
  };
6287
6297
  }
6288
6298
  }
@@ -6299,7 +6309,7 @@ class is {
6299
6309
  e.preventDefault();
6300
6310
  const { xArr: i, yArr: s } = this.ctx.selector, [r, o] = i, [n, h] = s, { rowIndex: c, colIndex: d } = t;
6301
6311
  c >= n && c <= h && d >= r && d <= o || this.ctx.emit("setSelectorCell", t, e);
6302
- const u = {
6312
+ const x = {
6303
6313
  getBoundingClientRect: () => ({
6304
6314
  width: 0,
6305
6315
  height: 0,
@@ -6312,7 +6322,7 @@ class is {
6312
6322
  }),
6313
6323
  contextElement: document.body
6314
6324
  };
6315
- Ee(u, this.contextMenuEl, {
6325
+ Ee(x, this.contextMenuEl, {
6316
6326
  placement: "right-start",
6317
6327
  middleware: [pe(), me(), ye()]
6318
6328
  }).then(({ x: g, y: p }) => {
@@ -6446,7 +6456,7 @@ class os {
6446
6456
  this.ctx.off(t, e);
6447
6457
  }
6448
6458
  filterMethod(t) {
6449
- this.scrollTo(0, 0), this.ctx.database.setFilterMethod(t), this.ctx.database.init(), this.ctx.emit("draw");
6459
+ this.scrollTo(0, 0), this.ctx.database.setFilterMethod(t), this.ctx.database.init(), this.header.init(), this.ctx.emit("draw");
6450
6460
  }
6451
6461
  editCell(t, e) {
6452
6462
  this.editor.editCell(t, e);