e-virt-table 1.2.12 → 1.2.13

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
@@ -1,29 +1,29 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(":root{--evt-header-font: 12px normal Arial;--evt-body-font: 12px normal Arial;--evt-color-white: #fff;--evt-color-black: #000000;--evt-color-primary: rgb(82, 146, 247);--evt-text-color-primary: #333;--evt-text-color-regular: #666;--evt-text-color-secondary: #999;--evt-box-shadow: 0 2px 12px 0 #0000001a;--evt-editor-bg-color: #fff;--evt-editor-text-color: #333;--evt-border-color: #e1e6eb;--evt-stripe-color: #fafafa;--evt-placeholder-color: #cdd0dc;--evt-header-bg-color: #f8faff;--evt-body-bg-color: #fff;--evt-header-text-color: #1d2129;--evt-body-text-color: #4e5969;--evt-footer-text-color: #4e5969;--evt-loading-icon-color: #4e5969;--evt-expand-icon-color: #4e5969;--evt-shrink-icon-color: #4e5969;--evt-error-tip-icon-color: red;--evt-cell-hover-icon-bg-color: #fff;--evt-cell-hover-icon-border-color: #dde0ea;--evt-scroller-color: #dee0e3;--evt-scroller-track-color: #fff;--evt-scroller-focus-color: #bbbec4;--evt-select-border-color: var(--evt-color-primary);--evt-select-area-color: rgba(82, 146, 247, .1);--evt-select-row-col-bg-color: transparent;--evt-autofill-point-border-color: #fff;--evt-edit-bg-color: #fcf6ed;--evt-checkbox-color: var(--evt-color-primary);--evt-readonly-color: #fff;--evt-readonly-text-color: var(--evt-body-text-color);--evt-error-tip-color: #ed3f14;--evt-footer-bg-color: #fafafa;--evt-highlight-hover-row-color: rgba(186, 203, 231, .1);--evt-highlight-selected-row-color: rgba(82, 146, 247, .1);--evt-tooltip-bg-color: #303133;--evt-tooltip-text-color: #fff;--evt-resize-row-line-color: #e1e6eb;--evt-resize-column-line-color: #e1e6eb}.dark{--evt-border-color: #363637;--evt-header-bg-color: #141414;--evt-body-bg-color: #141414;--evt-header-text-color: #a3a6ad;--evt-scroller-color: #414243;--evt-scroller-track-color: #141414;--evt-scroller-focus-color: #a3a6ad;--evt-edit-bg-color: #141414;--evt-readonly-text-color: #cfd3dc;--evt-footer-bg-color: #262727;--evt-autofill-point-border-color: #fff;--evt-editor-bg-color: #434343;--evt-editor-text-color: #cfd3dc}.e-virt-table-container{position:relative;outline:none}.e-virt-table-stage{position:relative;overflow:hidden;outline:none;box-sizing:border-box;z-index:10;border-radius:8px;border:1px solid var(--evt-border-color)}.e-virt-table-canvas{position:absolute;left:0;top:0;box-sizing:border-box;border:none;outline:none;z-index:10}.e-virt-table-editor{position:absolute;top:-10000px;left:-10000px;text-align:left;height:auto;line-height:0;z-index:100;overflow:hidden;background-color:var(--evt-editor-bg-color);border:2px solid var(--evt-color-primary);box-sizing:border-box;box-shadow:var(--evt-box-shadow);display:flex;align-items:center}.e-virt-table-overlayer{position:absolute;left:0;top:0;overflow:hidden;z-index:100;pointer-events:none}.e-virt-table-editor-textarea{width:100%;box-sizing:border-box;outline:none;font-weight:400;padding:8px;font-size:12px;color:inherit;white-space:pre-wrap;word-wrap:break-word;word-break:break-all;line-height:1.5;margin:0;border:none;vertical-align:middle;background:var(--evt-editor-bg-color);color:var(--evt-editor-text-color);overflow-y:auto;resize:none}.e-virt-table-context-menu{position:absolute;font-size:14px;color:var(--evt-text-color-regular);background-color:var(--evt-color-white);border-radius:4px;border:1px solid #e4e7ed;box-shadow:var(--evt-box-shadow);width:fit-content;padding:6px 0;z-index:9999;left:-99999px;top:-99999px}.e-virt-table-context-menu-item{cursor:pointer;padding:8px 24px;color:var(--evt-text-color-regular)}.e-virt-table-context-menu-item:hover{color:var(--evt-color-primary);background-color:#f5f7fa}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
2
  var be = Object.defineProperty;
3
- var ve = (l, t, e) => t in l ? be(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
4
- var a = (l, t, e) => ve(l, typeof t != "symbol" ? t + "" : t, e);
3
+ var ve = (h, t, e) => t in h ? be(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
4
+ var a = (h, t, e) => ve(h, typeof t != "symbol" ? t + "" : t, e);
5
5
  function q() {
6
- return q = Object.assign ? Object.assign.bind() : function(l) {
6
+ return q = Object.assign ? Object.assign.bind() : function(h) {
7
7
  for (var t = 1; t < arguments.length; t++) {
8
8
  var e = arguments[t];
9
9
  for (var i in e)
10
- Object.prototype.hasOwnProperty.call(e, i) && (l[i] = e[i]);
10
+ Object.prototype.hasOwnProperty.call(e, i) && (h[i] = e[i]);
11
11
  }
12
- return l;
12
+ return h;
13
13
  }, q.apply(this, arguments);
14
14
  }
15
- function Re(l, t) {
16
- l.prototype = Object.create(t.prototype), l.prototype.constructor = l, st(l, t);
15
+ function Re(h, t) {
16
+ h.prototype = Object.create(t.prototype), h.prototype.constructor = h, st(h, t);
17
17
  }
18
- function Et(l) {
18
+ function Et(h) {
19
19
  return Et = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
20
20
  return e.__proto__ || Object.getPrototypeOf(e);
21
- }, Et(l);
21
+ }, Et(h);
22
22
  }
23
- function st(l, t) {
23
+ function st(h, t) {
24
24
  return st = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, s) {
25
25
  return i.__proto__ = s, i;
26
- }, st(l, t);
26
+ }, st(h, t);
27
27
  }
28
28
  function _e() {
29
29
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
@@ -35,18 +35,18 @@ function _e() {
35
35
  return !1;
36
36
  }
37
37
  }
38
- function dt(l, t, e) {
38
+ function dt(h, t, e) {
39
39
  return _e() ? dt = Reflect.construct.bind() : dt = function(s, r, o) {
40
40
  var n = [null];
41
41
  n.push.apply(n, r);
42
- var h = Function.bind.apply(s, n), c = new h();
42
+ var l = Function.bind.apply(s, n), c = new l();
43
43
  return o && st(c, o.prototype), c;
44
44
  }, dt.apply(null, arguments);
45
45
  }
46
- function Ie(l) {
47
- return Function.toString.call(l).indexOf("[native code]") !== -1;
46
+ function Ie(h) {
47
+ return Function.toString.call(h).indexOf("[native code]") !== -1;
48
48
  }
49
- function Ct(l) {
49
+ function Ct(h) {
50
50
  var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
51
51
  return Ct = function(i) {
52
52
  if (i === null || !Ie(i)) return i;
@@ -67,7 +67,7 @@ function Ct(l) {
67
67
  configurable: !0
68
68
  }
69
69
  }), st(s, i);
70
- }, Ct(l);
70
+ }, Ct(h);
71
71
  }
72
72
  var Oe = /%[sdj%]/g, Ut = function() {
73
73
  };
@@ -76,22 +76,22 @@ typeof process < "u" && process.env && process.env.NODE_ENV !== "production" &&
76
76
  return typeof i == "string";
77
77
  }) && console.warn(t, e);
78
78
  });
79
- function bt(l) {
80
- if (!l || !l.length) return null;
79
+ function bt(h) {
80
+ if (!h || !h.length) return null;
81
81
  var t = {};
82
- return l.forEach(function(e) {
82
+ return h.forEach(function(e) {
83
83
  var i = e.field;
84
84
  t[i] = t[i] || [], t[i].push(e);
85
85
  }), t;
86
86
  }
87
- function D(l) {
87
+ function D(h) {
88
88
  for (var t = arguments.length, e = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
89
89
  e[i - 1] = arguments[i];
90
90
  var s = 0, r = e.length;
91
- if (typeof l == "function")
92
- return l.apply(null, e);
93
- if (typeof l == "string") {
94
- var o = l.replace(Oe, function(n) {
91
+ if (typeof h == "function")
92
+ return h.apply(null, e);
93
+ if (typeof h == "string") {
94
+ var o = h.replace(Oe, function(n) {
95
95
  if (n === "%%")
96
96
  return "%";
97
97
  if (s >= r)
@@ -114,68 +114,68 @@ function D(l) {
114
114
  });
115
115
  return o;
116
116
  }
117
- return l;
117
+ return h;
118
118
  }
119
- function Le(l) {
120
- return l === "string" || l === "url" || l === "hex" || l === "email" || l === "date" || l === "pattern";
119
+ function Le(h) {
120
+ return h === "string" || h === "url" || h === "hex" || h === "email" || h === "date" || h === "pattern";
121
121
  }
122
- function H(l, t) {
123
- return !!(l == null || t === "array" && Array.isArray(l) && !l.length || Le(t) && typeof l == "string" && !l);
122
+ function H(h, t) {
123
+ return !!(h == null || t === "array" && Array.isArray(h) && !h.length || Le(t) && typeof h == "string" && !h);
124
124
  }
125
- function Se(l, t, e) {
126
- var i = [], s = 0, r = l.length;
125
+ function Se(h, t, e) {
126
+ var i = [], s = 0, r = h.length;
127
127
  function o(n) {
128
128
  i.push.apply(i, n || []), s++, s === r && e(i);
129
129
  }
130
- l.forEach(function(n) {
130
+ h.forEach(function(n) {
131
131
  t(n, o);
132
132
  });
133
133
  }
134
- function Bt(l, t, e) {
135
- var i = 0, s = l.length;
134
+ function Bt(h, t, e) {
135
+ var i = 0, s = h.length;
136
136
  function r(o) {
137
137
  if (o && o.length) {
138
138
  e(o);
139
139
  return;
140
140
  }
141
141
  var n = i;
142
- i = i + 1, n < s ? t(l[n], r) : e([]);
142
+ i = i + 1, n < s ? t(h[n], r) : e([]);
143
143
  }
144
144
  r([]);
145
145
  }
146
- function Te(l) {
146
+ function Te(h) {
147
147
  var t = [];
148
- return Object.keys(l).forEach(function(e) {
149
- t.push.apply(t, l[e] || []);
148
+ return Object.keys(h).forEach(function(e) {
149
+ t.push.apply(t, h[e] || []);
150
150
  }), t;
151
151
  }
152
- var Ft = /* @__PURE__ */ function(l) {
153
- Re(t, l);
152
+ var Ft = /* @__PURE__ */ function(h) {
153
+ Re(t, h);
154
154
  function t(e, i) {
155
155
  var s;
156
- return s = l.call(this, "Async Validation Error") || this, s.errors = e, s.fields = i, s;
156
+ return s = h.call(this, "Async Validation Error") || this, s.errors = e, s.fields = i, s;
157
157
  }
158
158
  return t;
159
159
  }(/* @__PURE__ */ Ct(Error));
160
- function Ae(l, t, e, i, s) {
160
+ function Ae(h, t, e, i, s) {
161
161
  if (t.first) {
162
162
  var r = new Promise(function(x, g) {
163
163
  var p = function(m) {
164
164
  return i(m), m.length ? g(new Ft(m, bt(m))) : x(s);
165
- }, u = Te(l);
165
+ }, u = Te(h);
166
166
  Bt(u, e, p);
167
167
  });
168
168
  return r.catch(function(x) {
169
169
  return x;
170
170
  }), r;
171
171
  }
172
- var o = t.firstFields === !0 ? Object.keys(l) : t.firstFields || [], n = Object.keys(l), h = n.length, c = 0, d = [], f = new Promise(function(x, g) {
172
+ var o = t.firstFields === !0 ? Object.keys(h) : t.firstFields || [], n = Object.keys(h), l = n.length, c = 0, d = [], f = new Promise(function(x, g) {
173
173
  var p = function(w) {
174
- if (d.push.apply(d, w), c++, c === h)
174
+ if (d.push.apply(d, w), c++, c === l)
175
175
  return i(d), d.length ? g(new Ft(d, bt(d))) : x(s);
176
176
  };
177
177
  n.length || (i(d), x(s)), n.forEach(function(u) {
178
- var w = l[u];
178
+ var w = h[u];
179
179
  o.indexOf(u) !== -1 ? Bt(w, e, p) : Se(w, e, p);
180
180
  });
181
181
  });
@@ -183,36 +183,36 @@ function Ae(l, t, e, i, s) {
183
183
  return x;
184
184
  }), f;
185
185
  }
186
- function Me(l) {
187
- return !!(l && l.message !== void 0);
186
+ function Me(h) {
187
+ return !!(h && h.message !== void 0);
188
188
  }
189
- function He(l, t) {
190
- for (var e = l, i = 0; i < t.length; i++) {
189
+ function He(h, t) {
190
+ for (var e = h, i = 0; i < t.length; i++) {
191
191
  if (e == null)
192
192
  return e;
193
193
  e = e[t[i]];
194
194
  }
195
195
  return e;
196
196
  }
197
- function Nt(l, t) {
197
+ function Nt(h, t) {
198
198
  return function(e) {
199
199
  var i;
200
- return l.fullFields ? i = He(t, l.fullFields) : i = t[e.field || l.fullField], Me(e) ? (e.field = e.field || l.fullField, e.fieldValue = i, e) : {
200
+ return h.fullFields ? i = He(t, h.fullFields) : i = t[e.field || h.fullField], Me(e) ? (e.field = e.field || h.fullField, e.fieldValue = i, e) : {
201
201
  message: typeof e == "function" ? e() : e,
202
202
  fieldValue: i,
203
- field: e.field || l.fullField
203
+ field: e.field || h.fullField
204
204
  };
205
205
  };
206
206
  }
207
- function kt(l, t) {
207
+ function kt(h, t) {
208
208
  if (t) {
209
209
  for (var e in t)
210
210
  if (t.hasOwnProperty(e)) {
211
211
  var i = t[e];
212
- typeof i == "object" && typeof l[e] == "object" ? l[e] = q({}, l[e], i) : l[e] = i;
212
+ typeof i == "object" && typeof h[e] == "object" ? h[e] = q({}, h[e], i) : h[e] = i;
213
213
  }
214
214
  }
215
- return l;
215
+ return h;
216
216
  }
217
217
  var Zt = function(t, e, i, s, r, o) {
218
218
  t.required && (!i.hasOwnProperty(t.field) || H(e, o || t.type)) && s.push(D(r.messages.required, t.fullField));
@@ -221,8 +221,8 @@ var Zt = function(t, e, i, s, r, o) {
221
221
  }, ct, Xe = function() {
222
222
  if (ct)
223
223
  return ct;
224
- var l = "[a-fA-F\\d:]", t = function(b) {
225
- return b && b.includeBoundaries ? "(?:(?<=\\s|^)(?=" + l + ")|(?<=" + l + ")(?=\\s|$))" : "";
224
+ var h = "[a-fA-F\\d:]", t = function(b) {
225
+ return b && b.includeBoundaries ? "(?:(?<=\\s|^)(?=" + h + ")|(?<=" + h + ")(?=\\s|$))" : "";
226
226
  }, e = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", i = "[a-fA-F\\d]{1,4}", s = (`
227
227
  (?:
228
228
  (?:` + i + ":){7}(?:" + i + `|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
@@ -234,15 +234,15 @@ var Zt = function(t, e, i, s, r, o) {
234
234
  (?:` + i + ":){1}(?:(?::" + i + "){0,4}:" + e + "|(?::" + i + `){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
235
235
  (?::(?:(?::` + i + "){0,5}:" + e + "|(?::" + i + `){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
236
236
  )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
237
- `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), r = new RegExp("(?:^" + e + "$)|(?:^" + s + "$)"), o = new RegExp("^" + e + "$"), n = new RegExp("^" + s + "$"), h = function(b) {
237
+ `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), r = new RegExp("(?:^" + e + "$)|(?:^" + s + "$)"), o = new RegExp("^" + e + "$"), n = new RegExp("^" + s + "$"), l = function(b) {
238
238
  return b && b.exact ? r : new RegExp("(?:" + t(b) + e + t(b) + ")|(?:" + t(b) + s + t(b) + ")", "g");
239
239
  };
240
- h.v4 = function(y) {
240
+ l.v4 = function(y) {
241
241
  return y && y.exact ? o : new RegExp("" + t(y) + e + t(y), "g");
242
- }, h.v6 = function(y) {
242
+ }, l.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, 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;
245
+ var c = "(?:(?:[a-z]+:)?//)", d = "(?:\\S+(?::\\S*)?@)?", f = l.v4().source, x = l.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/
@@ -300,10 +300,10 @@ var Zt = function(t, e, i, s, r, o) {
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
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);
303
+ var o = typeof t.len == "number", n = typeof t.min == "number", l = 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
304
  if (x ? f = "number" : g ? f = "string" : p && (f = "array"), !f)
305
305
  return !1;
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));
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 && !l && d < t.min ? s.push(D(r.messages[f].min, t.fullField, t.min)) : l && !n && d > t.max ? s.push(D(r.messages[f].max, t.fullField, t.max)) : n && l && (d < t.min || d > t.max) && s.push(D(r.messages[f].range, t.fullField, t.min, t.max));
307
307
  }, j = "enum", Ne = function(t, e, i, s, r) {
308
308
  t[j] = Array.isArray(t[j]) ? t[j] : [], t[j].indexOf(e) === -1 && s.push(D(r.messages[j], t.fullField, t[j].join(", ")));
309
309
  }, ke = function(t, e, i, s, r) {
@@ -416,8 +416,8 @@ var Zt = function(t, e, i, s, r, o) {
416
416
  if (H(e, "date") && !t.required)
417
417
  return i();
418
418
  if (L.required(t, e, s, o, r), !H(e, "date")) {
419
- var h;
420
- e instanceof Date ? h = e : h = new Date(e), L.type(t, h, s, o, r), h && L.range(t, h.getTime(), s, o, r);
419
+ var l;
420
+ e instanceof Date ? l = e : l = new Date(e), L.type(t, l, s, o, r), l && L.range(t, l.getTime(), s, o, r);
421
421
  }
422
422
  }
423
423
  i(o);
@@ -425,8 +425,8 @@ var Zt = function(t, e, i, s, r, o) {
425
425
  var o = [], n = Array.isArray(e) ? "array" : typeof e;
426
426
  L.required(t, e, s, o, r, n), i(o);
427
427
  }, mt = function(t, e, i, s, r) {
428
- var o = t.type, n = [], h = t.required || !t.required && s.hasOwnProperty(t.field);
429
- if (h) {
428
+ var o = t.type, n = [], l = t.required || !t.required && s.hasOwnProperty(t.field);
429
+ if (l) {
430
430
  if (H(e, o) && !t.required)
431
431
  return i();
432
432
  L.required(t, e, s, n, r, o), H(e, o) || L.type(t, e, s, n, r);
@@ -513,10 +513,10 @@ function vt() {
513
513
  };
514
514
  }
515
515
  var Rt = vt(), nt = /* @__PURE__ */ function() {
516
- function l(e) {
516
+ function h(e) {
517
517
  this.rules = null, this._messages = Rt, this.define(e);
518
518
  }
519
- var t = l.prototype;
519
+ var t = h.prototype;
520
520
  return t.define = function(i) {
521
521
  var s = this;
522
522
  if (!i)
@@ -533,8 +533,8 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
533
533
  var o = this;
534
534
  s === void 0 && (s = {}), r === void 0 && (r = function() {
535
535
  });
536
- var n = i, h = s, c = r;
537
- if (typeof h == "function" && (c = h, h = {}), !this.rules || Object.keys(this.rules).length === 0)
536
+ var n = i, l = s, c = r;
537
+ if (typeof l == "function" && (c = l, l = {}), !this.rules || Object.keys(this.rules).length === 0)
538
538
  return c && c(null, n), Promise.resolve(n);
539
539
  function d(u) {
540
540
  var w = [], m = {};
@@ -549,12 +549,12 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
549
549
  C(u[y]);
550
550
  w.length ? (m = bt(w), c(w, m)) : c(null, n);
551
551
  }
552
- if (h.messages) {
552
+ if (l.messages) {
553
553
  var f = this.messages();
554
- f === Rt && (f = vt()), kt(f, h.messages), h.messages = f;
554
+ f === Rt && (f = vt()), kt(f, l.messages), l.messages = f;
555
555
  } else
556
- h.messages = this.messages();
557
- var x = {}, g = h.keys || Object.keys(this.rules);
556
+ l.messages = this.messages();
557
+ var x = {}, g = l.keys || Object.keys(this.rules);
558
558
  g.forEach(function(u) {
559
559
  var w = o.rules[u], m = n[u];
560
560
  w.forEach(function(C) {
@@ -570,7 +570,7 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
570
570
  });
571
571
  });
572
572
  var p = {};
573
- return Ae(x, h, function(u, w) {
573
+ return Ae(x, l, function(u, w) {
574
574
  var m = u.rule, C = (m.type === "object" || m.type === "array") && (typeof m.fields == "object" || typeof m.defaultField == "object");
575
575
  C = C && (m.required || !m.required && u.value), m.field = u.field;
576
576
  function y(R, O) {
@@ -582,15 +582,15 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
582
582
  function b(R) {
583
583
  R === void 0 && (R = []);
584
584
  var O = Array.isArray(R) ? R : [R];
585
- !h.suppressWarning && O.length && l.warning("async-validator:", O), O.length && m.message !== void 0 && (O = [].concat(m.message));
585
+ !l.suppressWarning && O.length && h.warning("async-validator:", O), O.length && m.message !== void 0 && (O = [].concat(m.message));
586
586
  var I = O.map(Nt(m, n));
587
- if (h.first && I.length)
587
+ if (l.first && I.length)
588
588
  return p[m.field] = 1, w(I);
589
589
  if (!C)
590
590
  w(I);
591
591
  else {
592
592
  if (m.required && !u.value)
593
- return m.message !== void 0 ? I = [].concat(m.message).map(Nt(m, n)) : h.error && (I = [h.error(m, D(h.messages.required, m.field))]), w(I);
593
+ return m.message !== void 0 ? I = [].concat(m.message).map(Nt(m, n)) : l.error && (I = [l.error(m, D(l.messages.required, m.field))]), w(I);
594
594
  var _ = {};
595
595
  m.defaultField && Object.keys(u.value).map(function(T) {
596
596
  _[T] = m.defaultField;
@@ -600,8 +600,8 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
600
600
  var M = _[T], A = Array.isArray(M) ? M : [M];
601
601
  v[T] = A.map(y.bind(null, T));
602
602
  });
603
- var S = new l(v);
604
- S.messages(h.messages), u.rule.options && (u.rule.options.messages = h.messages, u.rule.options.error = h.error), S.validate(u.value, u.rule.options || h, function(T) {
603
+ var S = new h(v);
604
+ S.messages(l.messages), u.rule.options && (u.rule.options.messages = l.messages, u.rule.options.error = l.error), S.validate(u.value, u.rule.options || l, function(T) {
605
605
  var M = [];
606
606
  I && I.length && M.push.apply(M, I), T && T.length && M.push.apply(M, T), w(M.length ? M : null);
607
607
  });
@@ -609,12 +609,12 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
609
609
  }
610
610
  var E;
611
611
  if (m.asyncValidator)
612
- E = m.asyncValidator(m, u.value, b, u.source, h);
612
+ E = m.asyncValidator(m, u.value, b, u.source, l);
613
613
  else if (m.validator) {
614
614
  try {
615
- E = m.validator(m, u.value, b, u.source, h);
615
+ E = m.validator(m, u.value, b, u.source, l);
616
616
  } catch (R) {
617
- console.error == null || console.error(R), h.suppressValidatorError || setTimeout(function() {
617
+ console.error == null || console.error(R), l.suppressValidatorError || setTimeout(function() {
618
618
  throw R;
619
619
  }, 0), b(R.message);
620
620
  }
@@ -637,7 +637,7 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
637
637
  return i.validator;
638
638
  var s = Object.keys(i), r = s.indexOf("message");
639
639
  return r !== -1 && s.splice(r, 1), s.length === 1 && s[0] === "required" ? it.required : it[this.getType(i)] || void 0;
640
- }, l;
640
+ }, h;
641
641
  }();
642
642
  nt.register = function(t, e) {
643
643
  if (typeof e != "function")
@@ -648,26 +648,26 @@ nt.warning = Ut;
648
648
  nt.messages = Rt;
649
649
  nt.validators = it;
650
650
  function Jt() {
651
- return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(l) {
651
+ return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(h) {
652
652
  const t = Math.random() * 16 | 0;
653
- return (l === "x" ? t : t & 3 | 8).toString(16);
653
+ return (h === "x" ? t : t & 3 | 8).toString(16);
654
654
  });
655
655
  }
656
- function Qt(l, t) {
656
+ function Qt(h, t) {
657
657
  let e = 0, i;
658
658
  return function(...s) {
659
659
  const r = (/* @__PURE__ */ new Date()).getTime(), o = r - e;
660
- !e || o >= t ? (l.apply(this, s), e = r) : i || (i = setTimeout(() => {
661
- l.apply(this, s), e = (/* @__PURE__ */ new Date()).getTime(), i = void 0;
660
+ !e || o >= t ? (h.apply(this, s), e = r) : i || (i = setTimeout(() => {
661
+ h.apply(this, s), e = (/* @__PURE__ */ new Date()).getTime(), i = void 0;
662
662
  }, t - o));
663
663
  };
664
664
  }
665
- function te(l = []) {
666
- return l.length ? l.map((t) => te(t.children) + 1).sort((t, e) => e - t)[0] : 0;
665
+ function te(h = []) {
666
+ return h.length ? h.map((t) => te(t.children) + 1).sort((t, e) => e - t)[0] : 0;
667
667
  }
668
- function ei(l = []) {
668
+ function ei(h = []) {
669
669
  let t = [], e = [], i = [];
670
- return l.forEach((s) => {
670
+ return h.forEach((s) => {
671
671
  s.fixed === "left" ? t.push(s) : s.fixed === "right" ? i.push(s) : e.push(s);
672
672
  }), [
673
673
  ...t.sort((s, r) => (s.sort ?? 0) - (r.sort ?? 0)),
@@ -675,8 +675,8 @@ function ei(l = []) {
675
675
  ...i.sort((s, r) => (s.sort ?? 0) - (r.sort ?? 0))
676
676
  ];
677
677
  }
678
- function ee(l = [], t = 1, e = 0) {
679
- return l.map((i) => {
678
+ function ee(h = [], t = 1, e = 0) {
679
+ return h.map((i) => {
680
680
  if (i.children) {
681
681
  let s = 0, r = i.fixed;
682
682
  i.children.forEach((n) => {
@@ -702,72 +702,72 @@ function ee(l = [], t = 1, e = 0) {
702
702
  };
703
703
  });
704
704
  }
705
- function _t(l = []) {
705
+ function _t(h = []) {
706
706
  let t = [];
707
- return l.forEach((e) => {
707
+ return h.forEach((e) => {
708
708
  e.children ? t = t.concat(_t(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/;
712
- function si(l) {
712
+ function si(h) {
713
713
  let t = [[""]];
714
- if (l.length === 0)
714
+ if (h.length === 0)
715
715
  return t;
716
716
  let e = 0, i = 0, s;
717
- for (; l.length > 0 && s !== l.length; )
718
- if (s = l.length, l.match(Vt))
719
- l = l.replace(Vt, ""), e += 1, t[i][e] = "";
720
- else if (l.match(Yt))
721
- l = l.replace(Yt, ""), e = 0, i += 1, t[i] = [""];
717
+ for (; h.length > 0 && s !== h.length; )
718
+ if (s = h.length, h.match(Vt))
719
+ h = h.replace(Vt, ""), e += 1, t[i][e] = "";
720
+ else if (h.match(Yt))
721
+ h = h.replace(Yt, ""), e = 0, i += 1, t[i] = [""];
722
722
  else {
723
723
  let r = "";
724
- if (l.startsWith('"')) {
724
+ if (h.startsWith('"')) {
725
725
  let o = 0, n = !0;
726
726
  for (; n; ) {
727
- const h = l.slice(0, 1);
728
- h === '"' && (o += 1), r += h, l = l.slice(1), (l.length === 0 || l.match(/^[\t\r\n]/) && o % 2 === 0) && (n = !1);
727
+ const l = h.slice(0, 1);
728
+ l === '"' && (o += 1), r += l, h = h.slice(1), (h.length === 0 || h.match(/^[\t\r\n]/) && o % 2 === 0) && (n = !1);
729
729
  }
730
- r = r.replace(/^"/, "").replace(/"$/, "").replace(/["]*/g, (h) => new Array(Math.floor(h.length / 2)).fill('"').join(""));
730
+ r = r.replace(/^"/, "").replace(/"$/, "").replace(/["]*/g, (l) => new Array(Math.floor(l.length / 2)).fill('"').join(""));
731
731
  } else {
732
- const o = l.match(ii);
733
- r = o ? o[0] : "", l = l.slice(r.length);
732
+ const o = h.match(ii);
733
+ r = o ? o[0] : "", h = h.slice(r.length);
734
734
  }
735
735
  t[i][e] = r;
736
736
  }
737
737
  return Array.isArray(t) && t.length > 1 && t[t.length - 1].length === 1 && t[t.length - 1][0] === "" && (t = t.slice(0, t.length - 1)), t;
738
738
  }
739
- function ri(l) {
739
+ function ri(h) {
740
740
  let t, e, i, s, r = "", o;
741
- for (t = 0, e = l.length; t < e; t += 1) {
742
- for (s = l[t].length, i = 0; i < s; i += 1)
743
- i > 0 && (r += " "), o = l[t][i], typeof o == "string" ? o.indexOf(`
741
+ for (t = 0, e = h.length; t < e; t += 1) {
742
+ for (s = h[t].length, i = 0; i < s; i += 1)
743
+ i > 0 && (r += " "), o = h[t][i], typeof o == "string" ? o.indexOf(`
744
744
  `) > -1 ? r += `"${o.replace(/"/g, '""')}"` : r += o : o == null ? r += "" : r += o;
745
745
  t !== e - 1 && (r += `
746
746
  `);
747
747
  }
748
748
  return r;
749
749
  }
750
- function ie(l, t, e = []) {
750
+ function ie(h, t, e = []) {
751
751
  let i = 0;
752
752
  const s = [];
753
- return l.forEach((r, o) => {
753
+ return h.forEach((r, o) => {
754
754
  if (o === 0)
755
755
  s.push(1);
756
756
  else {
757
- const n = e.reduce((c, d) => `${c}${r[d] ?? ""}`, "") || r[t], h = e.reduce((c, d) => `${c}${l[o - 1][d] ?? ""}`, "") || l[o - 1][t];
758
- n === h ? (s[i] += 1, s.push(0)) : (s.push(1), i = o);
757
+ const n = e.reduce((c, d) => `${c}${r[d] ?? ""}`, "") || r[t], l = e.reduce((c, d) => `${c}${h[o - 1][d] ?? ""}`, "") || h[o - 1][t];
758
+ n === l ? (s[i] += 1, s.push(0)) : (s.push(1), i = o);
759
759
  }
760
760
  }), s;
761
761
  }
762
- function se(l, t) {
762
+ function se(h, t) {
763
763
  let e = "", i = "";
764
764
  const s = {};
765
765
  return t.forEach((r, o) => {
766
- o === 0 ? (e = r.key, i = r.key, s[r.key] = 1) : l[r.key] === l[e] ? (s[r.key] = 0, s[i] += 1) : (s[r.key] = 1, e = r.key, i = r.key);
766
+ o === 0 ? (e = r.key, i = r.key, s[r.key] = 1) : h[r.key] === h[e] ? (s[r.key] = 0, s[i] += 1) : (s[r.key] = 1, e = r.key, i = r.key);
767
767
  }), s;
768
768
  }
769
- function oi(l, t, e = []) {
770
- const { visibleRows: i, rowIndex: s, headIndex: r } = l, o = ie(i, t, e);
769
+ function oi(h, t, e = []) {
770
+ const { visibleRows: i, rowIndex: s, headIndex: r } = h, o = ie(i, t, e);
771
771
  return o[s - r] === 0 ? {
772
772
  rowspan: 0,
773
773
  colspan: 0,
@@ -780,8 +780,8 @@ function oi(l, t, e = []) {
780
780
  mergeRow: !0
781
781
  };
782
782
  }
783
- function ni(l, t = []) {
784
- const { column: e, row: i, visibleLeafColumns: s } = l, r = s.filter((o) => t.includes(o.key));
783
+ function ni(h, t = []) {
784
+ const { column: e, row: i, visibleLeafColumns: s } = h, r = s.filter((o) => t.includes(o.key));
785
785
  if (t.includes(e.key)) {
786
786
  const o = se(i, r);
787
787
  return o[e.key] === 0 ? {
@@ -797,8 +797,8 @@ function ni(l, t = []) {
797
797
  };
798
798
  }
799
799
  }
800
- function ai(l, t = document.documentElement) {
801
- const e = l.startsWith("--") ? l : `--${l}`;
800
+ function ai(h, t = document.documentElement) {
801
+ const e = h.startsWith("--") ? h : `--${h}`;
802
802
  return getComputedStyle(t).getPropertyValue(e).trim();
803
803
  }
804
804
  class re {
@@ -848,8 +848,8 @@ class re {
848
848
  }
849
849
  }
850
850
  class At extends re {
851
- constructor(e, i, s, r, o, n, h, c, d, f = "body") {
852
- super(e, r, o, n, h, f, c.fixed);
851
+ constructor(e, i, s, r, o, n, l, c, d, f = "body") {
852
+ super(e, r, o, n, l, f, c.fixed);
853
853
  a(this, "formatter");
854
854
  a(this, "formatterFooter");
855
855
  a(this, "hoverIconName", "");
@@ -932,7 +932,7 @@ class At extends re {
932
932
  rowspan: r = 1,
933
933
  relationRowKeys: o,
934
934
  relationColKeys: n,
935
- mergeRow: h = !1,
935
+ mergeRow: l = !1,
936
936
  mergeCol: c = !1
937
937
  } = i({
938
938
  row: this.row,
@@ -946,7 +946,7 @@ class At extends re {
946
946
  visibleLeafColumns: this.ctx.header.visibleLeafColumns,
947
947
  rows: this.ctx.body.data
948
948
  }) || {};
949
- Array.isArray(o) && o.length > 0 ? this.relationRowKeys = o : this.relationRowKeys = [this.key], Array.isArray(n) && n.length > 0 ? this.relationColKeys = n : this.relationColKeys = [this.key], this.mergeCol = c, this.mergeRow = h, this.colspan = s, this.rowspan = r, this.visibleWidth = this.getWidthByColIndexColSpan(this.colIndex, this.colspan), this.visibleHeight = this.ctx.database.getHeightByRowIndexRowSpan(this.rowIndex, this.rowspan);
949
+ Array.isArray(o) && o.length > 0 ? this.relationRowKeys = o : this.relationRowKeys = [this.key], Array.isArray(n) && n.length > 0 ? this.relationColKeys = n : this.relationColKeys = [this.key], this.mergeCol = c, this.mergeRow = l, this.colspan = s, this.rowspan = r, this.visibleWidth = this.getWidthByColIndexColSpan(this.colIndex, this.colspan), this.visibleHeight = this.ctx.database.getHeightByRowIndexRowSpan(this.rowIndex, this.rowspan);
950
950
  }
951
951
  }
952
952
  updateSpanInfo() {
@@ -1019,7 +1019,7 @@ class At 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: x = 0 } = h || {};
1022
+ const l = this.ctx.database.getRowForRowKey(i), { expand: c = !1, hasChildren: d = !1, expandLoading: f = !1, level: x = 0 } = l || {};
1023
1023
  if (this.rowExpand = c, this.rowHasChildren = d, f) {
1024
1024
  const u = this.ctx.icons.get("loading");
1025
1025
  n = "loading", r = u, o = x * 8;
@@ -1044,7 +1044,7 @@ class At extends re {
1044
1044
  FOOTER_CELL_STYLE_METHOD: r,
1045
1045
  READONLY_TEXT_COLOR: o,
1046
1046
  BODY_TEXT_COLOR: n,
1047
- FOOTER_TEXT_COLOR: h,
1047
+ FOOTER_TEXT_COLOR: l,
1048
1048
  FOOTER_BG_COLOR: c,
1049
1049
  HIGHLIGHT_SELECTED_ROW: d,
1050
1050
  HIGHLIGHT_SELECTED_ROW_COLOR: f,
@@ -1054,7 +1054,7 @@ class At extends re {
1054
1054
  STRIPE_COLOR: u
1055
1055
  } = this.ctx.config;
1056
1056
  if (this.cellType === "footer") {
1057
- let O = c, I = h;
1057
+ let O = c, I = l;
1058
1058
  if (typeof r == "function") {
1059
1059
  const _ = r, { backgroundColor: v, color: S } = _({
1060
1060
  row: this.row,
@@ -1091,11 +1091,11 @@ class At extends re {
1091
1091
  this.drawCellBgColor = E, this.drawTextColor = R;
1092
1092
  }
1093
1093
  updateSelection() {
1094
- const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: r, cellType: o, type: n, rowIndex: h, rowKey: c } = this;
1094
+ const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: r, cellType: o, type: n, rowIndex: l, rowKey: c } = this;
1095
1095
  if (!(s === 0 || r === 0) && o !== "footer" && ["index-selection", "selection"].includes(n)) {
1096
1096
  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;
1097
1097
  let u = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck";
1098
- 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);
1098
+ 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 === l || ["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);
1099
1099
  }
1100
1100
  }
1101
1101
  updateHoverIcon() {
@@ -1114,16 +1114,16 @@ class At extends re {
1114
1114
  }
1115
1115
  const { hoverCell: n } = this.ctx;
1116
1116
  if (this.hoverIconName && !this.ctx.editing && n) {
1117
- let h = 0, c = 0;
1118
- if (n.rowKey === this.rowKey && (h = this.drawX + this.width - s - r, c = this.drawY + (this.height - s) / 2), this.rowspan !== 1 && o) {
1117
+ let l = 0, c = 0;
1118
+ if (n.rowKey === this.rowKey && (l = this.drawX + this.width - s - r, c = this.drawY + (this.height - s) / 2), this.rowspan !== 1 && o) {
1119
1119
  const f = this.getSpanInfo(), { yArr: x } = f, g = x[0], p = x[1];
1120
1120
  if (n.rowIndex >= g && n.rowIndex <= p) {
1121
1121
  const { width: u, height: w, offsetTop: m, offsetLeft: C } = f;
1122
- h = this.drawX - C + u - s - r, c = this.drawY - m + (w - s) / 2;
1122
+ l = this.drawX - C + u - s - r, c = this.drawY - m + (w - s) / 2;
1123
1123
  }
1124
1124
  }
1125
1125
  const d = this.ctx.icons.get(this.hoverIconName);
1126
- this.drawImageX = h, this.drawImageY = c, this.drawImageWidth = s, this.drawImageHeight = s, this.drawImageName = this.hoverIconName, this.drawImageSource = d;
1126
+ this.drawImageX = l, this.drawImageY = c, this.drawImageWidth = s, this.drawImageHeight = s, this.drawImageName = this.hoverIconName, this.drawImageSource = d;
1127
1127
  }
1128
1128
  }
1129
1129
  // 过去跨度配置
@@ -1218,8 +1218,8 @@ class At extends re {
1218
1218
  const { SELECT_BORDER_COLOR: e, ENABLE_AUTOFILL: i, ENABLE_SELECTOR: s, AUTOFILL_POINT_BORDER_COLOR: r } = this.ctx.config;
1219
1219
  if (!s || !i || this.ctx.editing)
1220
1220
  return;
1221
- const { xArr: o, yArr: n } = this.ctx.selector, h = o[1], c = n[1], { colIndex: d, rowIndex: f, drawX: x, drawY: g } = this;
1222
- if (d === h && f === c) {
1221
+ const { xArr: o, yArr: n } = this.ctx.selector, l = o[1], c = n[1], { colIndex: d, rowIndex: f, drawX: x, drawY: g } = this;
1222
+ if (d === l && f === c) {
1223
1223
  const u = d === this.ctx.maxColIndex || f === this.ctx.maxRowIndex || d === this.ctx.lastCenterColIndex ? 6 : 4;
1224
1224
  this.ctx.paint.drawRect(x + this.width - u, g + this.height - u, 6, 6, {
1225
1225
  borderColor: r,
@@ -1254,8 +1254,8 @@ class At extends re {
1254
1254
  const { ellipsis: o } = this.ctx.paint.handleEllipsis(this.displayText, r, e, i);
1255
1255
  this.ellipsis = o;
1256
1256
  const { placeholder: n } = this.column;
1257
- let h = this.displayText, c = this.drawTextColor;
1258
- 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, {
1257
+ let l = this.displayText, c = this.drawTextColor;
1258
+ 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) && (l = n, c = s), this.ctx.paint.drawText(l, this.drawTextX, this.drawTextY, r, this.visibleHeight, {
1259
1259
  font: i,
1260
1260
  padding: e,
1261
1261
  align: this.align,
@@ -1317,8 +1317,8 @@ class At extends re {
1317
1317
  fillColor: "transparent",
1318
1318
  borderWidth: 1
1319
1319
  });
1320
- const [n, h] = i, [c, d] = s;
1321
- !(n === h && c === d) && this.colIndex >= n && this.colIndex <= h && this.rowIndex >= c && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.width, this.height, {
1320
+ const [n, l] = i, [c, d] = s;
1321
+ !(n === l && c === d) && this.colIndex >= n && this.colIndex <= l && this.rowIndex >= c && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.width, this.height, {
1322
1322
  borderColor: "transparent",
1323
1323
  fillColor: this.ctx.config.SELECT_AREA_COLOR || "rgba(82,146,247,0.1)"
1324
1324
  }), this.operation && this.rowIndex >= c && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.visibleWidth, this.visibleHeight, {
@@ -1346,12 +1346,12 @@ class At extends re {
1346
1346
  });
1347
1347
  }
1348
1348
  drawBorder(e) {
1349
- const { drawX: i, drawY: s, rowIndex: r, colIndex: o, height: n, width: h } = this;
1349
+ const { drawX: i, drawY: s, rowIndex: r, colIndex: o, height: n, width: l } = this;
1350
1350
  let c = i, d = s;
1351
1351
  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];
1352
1352
  if (o >= m && o <= C && r === y) {
1353
1353
  const E = o === C ? 1 : 0, R = o === m ? 1 : 0;
1354
- this.ctx.paint.drawLine([c + R, d + 1, c + h - E, d + 1], {
1354
+ this.ctx.paint.drawLine([c + R, d + 1, c + l - E, d + 1], {
1355
1355
  borderColor: u,
1356
1356
  fillColor: w,
1357
1357
  borderWidth: p,
@@ -1362,7 +1362,7 @@ class At extends re {
1362
1362
  }
1363
1363
  if (o === C && r >= y && r <= b) {
1364
1364
  const E = r === y ? 1 : 0, R = r === b ? 1 : 0;
1365
- this.ctx.paint.drawLine([c + h - 1, d + E, c + h - 1, d + n - R], {
1365
+ this.ctx.paint.drawLine([c + l - 1, d + E, c + l - 1, d + n - R], {
1366
1366
  borderColor: u,
1367
1367
  fillColor: w,
1368
1368
  borderWidth: p,
@@ -1373,7 +1373,7 @@ class At extends re {
1373
1373
  }
1374
1374
  if (o >= m && o <= C && r === b) {
1375
1375
  const E = o === C ? 1 : 0, R = o === m ? 1 : 0;
1376
- this.ctx.paint.drawLine([c + R, d + n - 1, c + h - E, d + n - 1], {
1376
+ this.ctx.paint.drawLine([c + R, d + n - 1, c + l - E, d + n - 1], {
1377
1377
  borderColor: u,
1378
1378
  fillColor: w,
1379
1379
  borderWidth: p,
@@ -1395,7 +1395,7 @@ class At extends re {
1395
1395
  }
1396
1396
  }
1397
1397
  }
1398
- class li {
1398
+ class hi {
1399
1399
  //虚拟滚动位置
1400
1400
  constructor(t, e) {
1401
1401
  a(this, "loading", !1);
@@ -1448,9 +1448,9 @@ class li {
1448
1448
  var m;
1449
1449
  let r = !1;
1450
1450
  Array.isArray(i.children) && (r = i._hasChildren, i.children.length && (r = !0, this.initData(i.children, e + 1)));
1451
- 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
+ const { ROW_KEY: o = "", DEFAULT_EXPAND_ALL: n, CELL_HEIGHT: l, SELECTABLE_METHOD: c, CHECKBOX_KEY: d } = this.ctx.config, f = i[o], x = f != null ? `${f}` : Jt();
1452
1452
  this.itemRowKeyMap.set(i, x);
1453
- const g = i._height || h, p = i._readonly;
1453
+ const g = i._height || l, p = i._readonly;
1454
1454
  let u = !0;
1455
1455
  if (typeof c == "function" && (u = c), d) {
1456
1456
  const C = i[d];
@@ -1541,12 +1541,12 @@ class li {
1541
1541
  const i = (r) => {
1542
1542
  r.forEach((o) => {
1543
1543
  t.push(o);
1544
- const n = this.itemRowKeyMap.get(o), { expand: h, hasChildren: c, height: d } = this.rowKeyMap.get(n), f = this.sumHeight;
1544
+ const n = this.itemRowKeyMap.get(o), { expand: l, hasChildren: c, height: d } = this.rowKeyMap.get(n), f = this.sumHeight;
1545
1545
  this.sumHeight += d, this.rowIndexRowKeyMap.set(e, n), this.rowKeyRowIndexMap.set(n, e), this.positions.push({
1546
1546
  top: f,
1547
1547
  height: d,
1548
1548
  bottom: this.sumHeight
1549
- }), e += 1, h && c && i(o.children);
1549
+ }), e += 1, l && c && i(o.children);
1550
1550
  });
1551
1551
  };
1552
1552
  this.rowIndexRowKeyMap.clear(), this.rowKeyRowIndexMap.clear();
@@ -1720,14 +1720,14 @@ class li {
1720
1720
  newValue: f
1721
1721
  });
1722
1722
  });
1723
- let h = [];
1723
+ let l = [];
1724
1724
  s.forEach((d) => {
1725
- h.push(this.ctx.database.getRowDataItemForRowKey(d));
1725
+ l.push(this.ctx.database.getRowDataItemForRowKey(d));
1726
1726
  });
1727
1727
  const c = o.map(({ rowKey: d, key: f }) => this.getValidator(d, f));
1728
1728
  Promise.all(c).then(() => {
1729
1729
  this.validationErrorMap.size === 0 && this.changedDataMap.size > 0 && this.ctx.emit("validateChangedData", this.getChangedData());
1730
- }), this.ctx.emit("change", o, h), e && this.ctx.history.pushState({
1730
+ }), this.ctx.emit("change", o, l), e && this.ctx.history.pushState({
1731
1731
  changeList: i,
1732
1732
  scrollX: this.ctx.scrollX,
1733
1733
  scrollY: this.ctx.scrollY,
@@ -1748,15 +1748,15 @@ class li {
1748
1748
  if (!this.rowKeyMap.has(t))
1749
1749
  return {};
1750
1750
  const { item: n } = this.rowKeyMap.get(t);
1751
- let h = n[e], c = i;
1751
+ let l = n[e], c = i;
1752
1752
  if (this.ctx.database.getReadonly(t, e))
1753
1753
  return {
1754
- oldValue: h,
1755
- newValue: h
1754
+ oldValue: l,
1755
+ newValue: l
1756
1756
  };
1757
- n[e] !== null && typeof n[e] == "object" && (h = JSON.parse(JSON.stringify(n[e])));
1757
+ n[e] !== null && typeof n[e] == "object" && (l = JSON.parse(JSON.stringify(n[e])));
1758
1758
  const d = `${t}​_${e}`;
1759
- this.originalDataMap.has(d) || this.originalDataMap.set(d, h);
1759
+ this.originalDataMap.has(d) || this.originalDataMap.set(d, l);
1760
1760
  const f = this.originalDataMap.get(d), x = this.getRowDataItemForRowKey(t);
1761
1761
  if (o) {
1762
1762
  const g = this.getVirtualBodyCellByKey(t, e);
@@ -1766,7 +1766,7 @@ class li {
1766
1766
  else if (/^-?\d+(\.\d+)?$/.test(`${i}`))
1767
1767
  c = Number(i);
1768
1768
  else {
1769
- c = h;
1769
+ c = l;
1770
1770
  const w = {
1771
1771
  code: "ERR_SET_NUMBER_VALUE",
1772
1772
  message: "Assignment failed, not a numeric type",
@@ -1775,17 +1775,17 @@ class li {
1775
1775
  rowKey: t,
1776
1776
  key: e,
1777
1777
  value: c,
1778
- oldValue: h,
1778
+ oldValue: l,
1779
1779
  row: x
1780
1780
  }
1781
1781
  ]
1782
1782
  };
1783
1783
  this.ctx.emit("error", w);
1784
1784
  }
1785
- if (c === h)
1785
+ if (c === l)
1786
1786
  return {
1787
- oldValue: h,
1788
- newValue: h
1787
+ oldValue: l,
1788
+ newValue: l
1789
1789
  };
1790
1790
  const { BEFORE_VALUE_CHANGE_METHOD: p } = this.ctx.config;
1791
1791
  if (typeof p == "function") {
@@ -1804,7 +1804,7 @@ class li {
1804
1804
  const u = {
1805
1805
  rowKey: t,
1806
1806
  key: e,
1807
- oldValue: h,
1807
+ oldValue: l,
1808
1808
  value: c,
1809
1809
  row: x
1810
1810
  };
@@ -1813,7 +1813,7 @@ class li {
1813
1813
  }), this.ctx.emit("change", [u], [x]), this.ctx.emit("editChange", {
1814
1814
  rowKey: t,
1815
1815
  key: e,
1816
- oldValue: h,
1816
+ oldValue: l,
1817
1817
  value: c,
1818
1818
  originalValue: f,
1819
1819
  row: x
@@ -1823,7 +1823,7 @@ class li {
1823
1823
  return this.ctx.hasEvent("iterationChange") && this.ctx.emit("iterationChange", {
1824
1824
  rowKey: t,
1825
1825
  key: e,
1826
- oldValue: h,
1826
+ oldValue: l,
1827
1827
  value: c,
1828
1828
  originalValue: this.originalDataMap.get(d),
1829
1829
  row: x
@@ -1835,12 +1835,12 @@ class li {
1835
1835
  {
1836
1836
  rowKey: t,
1837
1837
  key: e,
1838
- oldValue: h,
1838
+ oldValue: l,
1839
1839
  newValue: c
1840
1840
  }
1841
1841
  ]
1842
1842
  }), r && this.ctx.emit("draw"), {
1843
- oldValue: h,
1843
+ oldValue: l,
1844
1844
  newValue: c
1845
1845
  };
1846
1846
  }
@@ -1867,8 +1867,8 @@ class li {
1867
1867
  return !1;
1868
1868
  const { item: s } = this.rowKeyMap.get(t), r = s[i];
1869
1869
  this.checkboxKeyMap.has(r) && (this.checkboxKeyMap.get(r) || []).forEach((n) => {
1870
- const h = this.selectionMap.get(n);
1871
- h && (h.check = e);
1870
+ const l = this.selectionMap.get(n);
1871
+ l && (l.check = e);
1872
1872
  });
1873
1873
  }
1874
1874
  }
@@ -1969,7 +1969,7 @@ class li {
1969
1969
  rowIndex: x.rowIndex
1970
1970
  })), p && (r += 1);
1971
1971
  });
1972
- const h = o > i && s === 0 && n, c = r && r > s && s > 0 || h, d = r !== 0, f = !!r && r === s;
1972
+ const l = o > i && s === 0 && n, c = r && r > s && s > 0 || l, d = r !== 0, f = !!r && r === s;
1973
1973
  return this.bufferCheckState = {
1974
1974
  buffer: !0,
1975
1975
  check: f,
@@ -2068,9 +2068,9 @@ class li {
2068
2068
  const s = this.rowKeyMap.get(t), r = this.headerMap.get(e);
2069
2069
  if (!s || !r)
2070
2070
  return !0;
2071
- const o = s.readonly, n = r.readonly, { BODY_CELL_READONLY_METHOD: h } = this.ctx.config;
2072
- if (typeof h == "function" && r) {
2073
- const d = h({
2071
+ const o = s.readonly, n = r.readonly, { BODY_CELL_READONLY_METHOD: l } = this.ctx.config;
2072
+ if (typeof l == "function" && r) {
2073
+ const d = l({
2074
2074
  row: s.item,
2075
2075
  rowIndex: s.rowIndex,
2076
2076
  colIndex: r.colIndex,
@@ -2094,7 +2094,7 @@ class li {
2094
2094
  if (r === void 0)
2095
2095
  return i([]);
2096
2096
  const n = r.column;
2097
- let h = n.rules;
2097
+ let l = n.rules;
2098
2098
  if (typeof o == "function") {
2099
2099
  const d = o({
2100
2100
  row: s.item,
@@ -2103,12 +2103,12 @@ class li {
2103
2103
  column: n,
2104
2104
  value: this.getItemValue(t, e)
2105
2105
  });
2106
- d && (h = d);
2106
+ d && (l = d);
2107
2107
  }
2108
- if (h) {
2108
+ if (l) {
2109
2109
  let c = {}, d = {};
2110
- if (d[e] = this.getItemValue(t, e), Array.isArray(h)) {
2111
- const x = h.map((g) => ({
2110
+ if (d[e] = this.getItemValue(t, e), Array.isArray(l)) {
2111
+ const x = l.map((g) => ({
2112
2112
  ...g,
2113
2113
  row: s.item,
2114
2114
  column: n,
@@ -2118,7 +2118,7 @@ class li {
2118
2118
  c[e] = x;
2119
2119
  } else
2120
2120
  c[e] = {
2121
- ...h,
2121
+ ...l,
2122
2122
  row: s.item,
2123
2123
  column: n,
2124
2124
  rowIndex: s.rowIndex,
@@ -2156,7 +2156,7 @@ class li {
2156
2156
  row: r,
2157
2157
  value: o,
2158
2158
  colIndex: n,
2159
- relationRowKeys: h,
2159
+ relationRowKeys: l,
2160
2160
  relationColKeys: c,
2161
2161
  rowspan: d,
2162
2162
  height: f,
@@ -2187,12 +2187,12 @@ class li {
2187
2187
  let w = e, m = e, C = n, y = n, b = [], E = 0, R = 0, O = 0, I = 0;
2188
2188
  if (d !== 1 && p) {
2189
2189
  I = x;
2190
- const _ = h.reduce((v, S) => {
2190
+ const _ = l.reduce((v, S) => {
2191
2191
  const T = this.getItemValue(s, S) ?? "";
2192
2192
  return `${v}${T}`;
2193
2193
  }, "");
2194
2194
  for (let v = e - 1; v >= 0; v--) {
2195
- const S = this.rowIndexRowKeyMap.get(v) || "", T = h.reduce((M, A) => {
2195
+ const S = this.rowIndexRowKeyMap.get(v) || "", T = l.reduce((M, A) => {
2196
2196
  const N = this.getItemValue(S, A) ?? "";
2197
2197
  return `${M}${N}`;
2198
2198
  }, "");
@@ -2202,7 +2202,7 @@ class li {
2202
2202
  break;
2203
2203
  }
2204
2204
  for (let v = e; v <= this.ctx.maxRowIndex; v++) {
2205
- const S = this.rowIndexRowKeyMap.get(v) || "", T = h.reduce((M, A) => {
2205
+ const S = this.rowIndexRowKeyMap.get(v) || "", T = l.reduce((M, A) => {
2206
2206
  const N = this.getItemValue(S, A) ?? "";
2207
2207
  return `${M}${N}`;
2208
2208
  }, "");
@@ -2328,7 +2328,7 @@ class li {
2328
2328
  return i;
2329
2329
  }
2330
2330
  }
2331
- class hi {
2331
+ class li {
2332
2332
  constructor(t) {
2333
2333
  a(this, "ctx");
2334
2334
  a(this, "history", []);
@@ -2524,21 +2524,21 @@ class fi {
2524
2524
  * @param {string} color - 阴影的颜色
2525
2525
  */
2526
2526
  drawShadow(t, e, i, s, r) {
2527
- const { fillColor: o, side: n, shadowWidth: h, colorStart: c, colorEnd: d } = r;
2527
+ const { fillColor: o, side: n, shadowWidth: l, colorStart: c, colorEnd: d } = r;
2528
2528
  this.ctx.save(), o && (this.ctx.fillStyle = o, this.ctx.fillRect(t, e, i, s));
2529
2529
  let f;
2530
2530
  switch (n) {
2531
2531
  case "left":
2532
- f = this.ctx.createLinearGradient(t - h, e, t, e), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t - h, e, h, s);
2532
+ f = this.ctx.createLinearGradient(t - l, e, t, e), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t - l, e, l, s);
2533
2533
  break;
2534
2534
  case "right":
2535
- f = this.ctx.createLinearGradient(t + i, e, t + i + h, e), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t + i, e, h, s);
2535
+ f = this.ctx.createLinearGradient(t + i, e, t + i + l, e), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t + i, e, l, s);
2536
2536
  break;
2537
2537
  case "top":
2538
- f = this.ctx.createLinearGradient(t, e - h, t, e), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t, e - h, i, h);
2538
+ f = this.ctx.createLinearGradient(t, e - l, t, e), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t, e - l, i, l);
2539
2539
  break;
2540
2540
  case "bottom":
2541
- f = this.ctx.createLinearGradient(t, e + s, t, e + s + h), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t, e + s, i, h);
2541
+ f = this.ctx.createLinearGradient(t, e + s, t, e + s + l), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t, e + s, i, l);
2542
2542
  break;
2543
2543
  default:
2544
2544
  console.error("Invalid side specified for shadow");
@@ -2559,11 +2559,11 @@ class fi {
2559
2559
  drawImage(t, e, i, s, r) {
2560
2560
  this.ctx.save(), this.ctx.drawImage(t, e, i, s, r), this.ctx.restore();
2561
2561
  }
2562
- drawRect(t, e, i, s, { borderWidth: r = 1, borderColor: o, fillColor: n, radius: h = 0 } = {}) {
2563
- 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)
2562
+ drawRect(t, e, i, s, { borderWidth: r = 1, borderColor: o, fillColor: n, radius: l = 0 } = {}) {
2563
+ 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), l === 0)
2564
2564
  this.ctx.rect(t - 0.5, e - 0.5, i, s);
2565
2565
  else {
2566
- const [c, d, f, x] = typeof h == "number" ? [h, h, h, h] : h;
2566
+ const [c, d, f, x] = typeof l == "number" ? [l, l, l, l] : l;
2567
2567
  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);
2568
2568
  }
2569
2569
  n !== void 0 && this.ctx.fill(), o !== void 0 && this.ctx.stroke(), this.ctx.restore();
@@ -2582,16 +2582,16 @@ class fi {
2582
2582
  this.ctx.save();
2583
2583
  const {
2584
2584
  font: n = "12px Arial",
2585
- align: h = "center",
2585
+ align: l = "center",
2586
2586
  color: c = "#495060",
2587
2587
  padding: d = 0,
2588
2588
  verticalAlign: f = "middle"
2589
2589
  } = o;
2590
- this.ctx.font = n, this.ctx.fillStyle = c, this.ctx.textBaseline = f, this.ctx.textAlign = h;
2590
+ this.ctx.font = n, this.ctx.fillStyle = c, this.ctx.textBaseline = f, this.ctx.textAlign = l;
2591
2591
  let x = 0;
2592
2592
  f === "top" ? x = i + d : f === "bottom" ? x = i + r - d : x = i + (r + 1) / 2;
2593
2593
  let g = 0;
2594
- h === "left" ? g = e + d : h === "right" ? g = e + s - d : g = e + s / 2;
2594
+ l === "left" ? g = e + d : l === "right" ? g = e + s - d : g = e + s / 2;
2595
2595
  const { _text: p, ellipsis: u } = this.handleEllipsis(t, s, d, n);
2596
2596
  return this.ctx.fillText(p, g, x), this.ctx.restore(), u;
2597
2597
  }
@@ -2602,8 +2602,8 @@ class fi {
2602
2602
  _text: "",
2603
2603
  ellipsis: r
2604
2604
  };
2605
- const n = this.ctx.measureText("...").width, h = this.ctx.measureText(t).width;
2606
- if (h && h + n >= e - i * 2) {
2605
+ const n = this.ctx.measureText("...").width, l = this.ctx.measureText(t).width;
2606
+ if (l && l + n >= e - i * 2) {
2607
2607
  r = !0;
2608
2608
  let c = 0;
2609
2609
  for (let d = 0; d < t.length; d++)
@@ -2897,15 +2897,15 @@ class xi {
2897
2897
  c.setAttribute("fill", e);
2898
2898
  });
2899
2899
  const n = new Image();
2900
- let h = "";
2900
+ let l = "";
2901
2901
  if (i) {
2902
2902
  const c = new Blob([new XMLSerializer().serializeToString(o)], {
2903
2903
  type: "image/svg+xml"
2904
2904
  });
2905
- h = URL.createObjectURL(c);
2905
+ l = URL.createObjectURL(c);
2906
2906
  } else
2907
- h = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(o));
2908
- return n.src = h, new Promise((c, d) => {
2907
+ l = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(o));
2908
+ return n.src = l, new Promise((c, d) => {
2909
2909
  n.onerror = () => d(new Error("Failed to load image")), n.onload = () => {
2910
2910
  c(n);
2911
2911
  };
@@ -2916,8 +2916,8 @@ class xi {
2916
2916
  }
2917
2917
  }
2918
2918
  class oe extends re {
2919
- constructor(e, i, s, r, o, n, h) {
2920
- super(e, s, r, o, n, "header", h.fixed);
2919
+ constructor(e, i, s, r, o, n, l) {
2920
+ super(e, s, r, o, n, "header", l.fixed);
2921
2921
  a(this, "align");
2922
2922
  a(this, "verticalAlign", "middle");
2923
2923
  a(this, "fixed");
@@ -2954,7 +2954,7 @@ class oe extends re {
2954
2954
  a(this, "drawImageHeight", 0);
2955
2955
  a(this, "drawImageName", "");
2956
2956
  a(this, "drawImageSource");
2957
- this.ctx = e, this.x = s, this.y = r, this.width = o, this.height = n, this.colIndex = i, this.key = h.key, this.minWidth = h.minWidth, this.maxWidth = h.maxWidth, this.type = h.type || "", this.editorType = h.editorType || "text", this.align = h.align || "center", this.verticalAlign = h.verticalAlign || "middle", this.fixed = h.fixed, this.level = h.level || 0, this.operation = h.operation || !1, this.text = h.title, this.column = h, this.colspan = h.colspan || 1, this.widthFillDisable = h.widthFillDisable || !1, this.rowspan = h.rowspan || 1, this.rules = h.rules, this.readonly = h.readonly || !1, this.required = h.required || !1, this.rowKey = Jt(), this.hasChildren = h.children && h.children.length > 0 || !1, this.render = h.renderHeader;
2957
+ this.ctx = e, this.x = s, this.y = r, this.width = o, this.height = n, this.colIndex = i, this.key = l.key, this.minWidth = l.minWidth, this.maxWidth = l.maxWidth, this.type = l.type || "", this.editorType = l.editorType || "text", this.align = l.align || "center", this.verticalAlign = l.verticalAlign || "middle", this.fixed = l.fixed, this.level = l.level || 0, this.operation = l.operation || !1, this.text = l.title, this.column = l, this.colspan = l.colspan || 1, this.widthFillDisable = l.widthFillDisable || !1, this.rowspan = l.rowspan || 1, this.rules = l.rules, this.readonly = l.readonly || !1, this.required = l.required || !1, this.rowKey = Jt(), this.hasChildren = l.children && l.children.length > 0 || !1, this.render = l.renderHeader;
2958
2958
  }
2959
2959
  /**
2960
2960
  * 是否可见,覆盖基类方法,表头是跟y滚动条没有关系的所以不需要加滚动参数
@@ -2974,11 +2974,11 @@ class oe extends re {
2974
2974
  const { HEADER_CELL_STYLE_METHOD: e, HEADER_BG_COLOR: i, HEADER_TEXT_COLOR: s } = this.ctx.config;
2975
2975
  let r = i, o = s;
2976
2976
  if (typeof e == "function") {
2977
- const n = e, { backgroundColor: h, color: c } = n({
2977
+ const n = e, { backgroundColor: l, color: c } = n({
2978
2978
  colIndex: this.colIndex,
2979
2979
  column: this.column
2980
2980
  }) || {};
2981
- h && (r = h), c && (o = c);
2981
+ l && (r = l), c && (o = c);
2982
2982
  }
2983
2983
  this.drawCellBgColor = r, this.drawTextColor = o;
2984
2984
  }
@@ -2989,11 +2989,11 @@ class oe extends re {
2989
2989
  const {
2990
2990
  paint: e,
2991
2991
  config: { BORDER_COLOR: i, CELL_PADDING: s, HEADER_FONT: r, BORDER: o }
2992
- } = this.ctx, { drawX: n, drawY: h, displayText: c } = this;
2993
- e.drawRect(n, h, this.width, this.height, {
2992
+ } = this.ctx, { drawX: n, drawY: l, displayText: c } = this;
2993
+ e.drawRect(n, l, this.width, this.height, {
2994
2994
  borderColor: o ? i : "transparent",
2995
2995
  fillColor: this.drawCellBgColor
2996
- }), e.drawText(c, n, h, this.width, this.height, {
2996
+ }), e.drawText(c, n, l, this.width, this.height, {
2997
2997
  font: r,
2998
2998
  padding: s,
2999
2999
  color: this.drawTextColor,
@@ -3014,9 +3014,9 @@ class oe extends re {
3014
3014
  drawSelection() {
3015
3015
  const { width: e, height: i, type: s } = this;
3016
3016
  if (["index-selection", "selection"].includes(s)) {
3017
- 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;
3017
+ const { indeterminate: r, check: o, selectable: n } = this.ctx.database.getCheckedState(), { CHECKBOX_SIZE: l = 0 } = this.ctx.config, c = this.drawX + (e - l) / 2, d = this.drawY + (i - l) / 2;
3018
3018
  let f = this.ctx.icons.get("checkbox-uncheck"), x = "checkbox-uncheck";
3019
- 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(
3019
+ 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 = l, this.drawImageHeight = l, this.drawImageName = x, this.drawImageSource = f, this.ctx.paint.drawImage(
3020
3020
  this.drawImageSource,
3021
3021
  this.drawImageX,
3022
3022
  this.drawImageY,
@@ -3153,10 +3153,10 @@ class ui {
3153
3153
  colIndex: t.colIndex,
3154
3154
  column: t.column,
3155
3155
  value: t.getValue()
3156
- }).then((h) => {
3157
- this.ctx.database.setExpandChildren(t.rowKey, h), this.ctx.database.expandLoading(t.rowKey, !1), this.ctx.emit("expandChange", this.ctx.database.getExpandRowKeys());
3158
- }).catch((h) => {
3159
- this.ctx.database.expandLoading(t.rowKey, !1), console.error(h);
3156
+ }).then((l) => {
3157
+ this.ctx.database.setExpandChildren(t.rowKey, l), this.ctx.database.expandLoading(t.rowKey, !1), this.ctx.emit("expandChange", this.ctx.database.getExpandRowKeys());
3158
+ }).catch((l) => {
3159
+ this.ctx.database.expandLoading(t.rowKey, !1), console.error(l);
3160
3160
  }));
3161
3161
  else {
3162
3162
  const n = this.ctx.database.getIsExpand(t.rowKey);
@@ -3188,15 +3188,15 @@ class ui {
3188
3188
  if (this.isInsideBody(e))
3189
3189
  for (const o of i) {
3190
3190
  const n = o.fixedCells.concat(o.noFixedCells);
3191
- for (const h of n) {
3192
- const c = h.getDrawX(), d = h.getDrawY();
3191
+ for (const l of n) {
3192
+ const c = l.getDrawX(), d = l.getDrawY();
3193
3193
  if (r) {
3194
- if (t > c && t < c + h.visibleWidth && e > d && e < d + h.visibleHeight) {
3195
- s(h);
3194
+ if (t > c && t < c + l.visibleWidth && e > d && e < d + l.visibleHeight) {
3195
+ s(l);
3196
3196
  return;
3197
3197
  }
3198
- } else if (t > c && t < c + h.width && e > d && e < d + h.height) {
3199
- s(h);
3198
+ } else if (t > c && t < c + l.width && e > d && e < d + l.height) {
3199
+ s(l);
3200
3200
  return;
3201
3201
  }
3202
3202
  }
@@ -3330,10 +3330,10 @@ class gi {
3330
3330
  canvasElement: r,
3331
3331
  overlayerElement: o,
3332
3332
  editorElement: n,
3333
- emptyElement: h,
3333
+ emptyElement: l,
3334
3334
  contextMenuElement: c
3335
3335
  } = t;
3336
- 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);
3336
+ this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = r, this.overlayerElement = o, this.editorElement = n, this.emptyElement = l, 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 hi(this, e), this.history = new li(this), this.icons = new xi(this);
3337
3337
  }
3338
3338
  setConfig(t) {
3339
3339
  this.config = new Wt(t);
@@ -3342,8 +3342,8 @@ class gi {
3342
3342
  if (this.config.ENABLE_MERGE_CELL_LINK) {
3343
3343
  const o = this.database.getVirtualBodyCellByKey(t, e);
3344
3344
  if (o && (o.mergeRow || o.mergeCol)) {
3345
- const { dataList: n } = o.getSpanInfo(), h = n.map((c) => ({ ...c, value: i }));
3346
- this.database.batchSetItemValue(h, s);
3345
+ const { dataList: n } = o.getSpanInfo(), l = n.map((c) => ({ ...c, value: i }));
3346
+ this.database.batchSetItemValue(l, s);
3347
3347
  return;
3348
3348
  }
3349
3349
  }
@@ -3357,7 +3357,7 @@ class gi {
3357
3357
  if (r === void 0 || o === void 0) return;
3358
3358
  const n = this.database.getVirtualBodyCell(r, o);
3359
3359
  if (n) {
3360
- const { dataList: h } = n.getSpanInfo(), c = h.map((d) => ({ ...d, value: s.value }));
3360
+ const { dataList: l } = n.getSpanInfo(), c = l.map((d) => ({ ...d, value: s.value }));
3361
3361
  i.push(...c);
3362
3362
  }
3363
3363
  }), this.database.batchSetItemValue(i, e);
@@ -3402,7 +3402,7 @@ class gi {
3402
3402
  for (let r = 0; r <= e[1] - e[0]; r++) {
3403
3403
  const o = [];
3404
3404
  for (let n = 0; n <= i[1] - i[0]; n++) {
3405
- const h = r + e[0], c = n + i[0], d = this.database.getItemValueForRowIndexAndColIndex(h, c);
3405
+ const l = r + e[0], c = n + i[0], d = this.database.getItemValueForRowIndexAndColIndex(l, c);
3406
3406
  d && o.push(d.value);
3407
3407
  }
3408
3408
  s += `${o.join(" ")}\r`, t.push(o);
@@ -3523,8 +3523,8 @@ class zt {
3523
3523
  if (this.isOnScrollbar(e, i) && t.target === this.ctx.canvasElement ? this.isFocus = !0 : this.isFocus = !1, o === 0 || s == this.clientX && r == this.clientY) return;
3524
3524
  let n = 0;
3525
3525
  if (this.type === "horizontal" ? n = s - this.clientX : n = r - this.clientY, this.isDragging && n !== 0) {
3526
- let h = 0;
3527
- this.type === "vertical" ? h = this.dragStart + n / (this.visibleDistance - this.barHeight) * this.distance : h = this.dragStart + n / (this.visibleDistance - this.barWidth) * this.distance, this.scroll = Math.max(0, Math.min(h, this.distance));
3526
+ let l = 0;
3527
+ this.type === "vertical" ? l = this.dragStart + n / (this.visibleDistance - this.barHeight) * this.distance : l = this.dragStart + n / (this.visibleDistance - this.barWidth) * this.distance, this.scroll = Math.max(0, Math.min(l, this.distance));
3528
3528
  }
3529
3529
  }
3530
3530
  isPointInElement(t, e, i, s, r, o) {
@@ -3550,21 +3550,21 @@ class zt {
3550
3550
  stageHeight: i,
3551
3551
  stageWidth: s,
3552
3552
  config: { SCROLLER_TRACK_SIZE: r = 0, SCROLLER_SIZE: o = 0, BORDER: n }
3553
- } = this.ctx, h = s, c = i, d = e.height, f = e.width, x = t.height, g = this.ctx.footer.height;
3553
+ } = this.ctx, l = s, c = i, d = e.height, f = e.width, x = t.height, g = this.ctx.footer.height;
3554
3554
  if (this.type === "vertical") {
3555
- 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;
3555
+ this.visibleDistance = c - r - d, this.distance = x - this.visibleDistance + g, this.trackX = l - 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;
3556
3556
  const p = this.distance ? this.visibleDistance / (x + g) : 0;
3557
3557
  let u = Math.floor(p * this.visibleDistance);
3558
3558
  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));
3559
3559
  } else {
3560
- this.visibleDistance = h - r, this.distance = f - this.visibleDistance, this.splitPoints = [
3561
- h - r,
3560
+ this.visibleDistance = l - r, this.distance = f - this.visibleDistance, this.splitPoints = [
3561
+ l - r,
3562
3562
  c - r,
3563
- h - r,
3563
+ l - r,
3564
3564
  c
3565
3565
  ];
3566
3566
  const p = n ? 0 : 0.5;
3567
- this.trackX = 0, this.trackY = c - r + p, this.trackWidth = h, this.trackHeight = r;
3567
+ this.trackX = 0, this.trackY = c - r + p, this.trackWidth = l, this.trackHeight = r;
3568
3568
  const u = this.distance ? this.visibleDistance / f : 0;
3569
3569
  let w = Math.floor(u * this.visibleDistance);
3570
3570
  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));
@@ -3713,9 +3713,9 @@ class pi {
3713
3713
  this.columnIndex = 0, this.resizeNum = 0, this.render(o, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
3714
3714
  const n = this.ctx.containerElement.getBoundingClientRect();
3715
3715
  this.resizeNum > 0 ? this.ctx.stageWidth = Math.floor(n.width) : this.ctx.stageWidth = Math.floor(this.width + e), this.ctx.stageElement.style.width = this.ctx.stageWidth + "px", this.visibleWidth = this.ctx.stageWidth - e;
3716
- const h = this.visibleWidth - this.width;
3717
- if (this.resizeNum && h > 0) {
3718
- const f = Math.floor(h / this.resizeNum * 100) / 100;
3716
+ const l = this.visibleWidth - this.width;
3717
+ if (this.resizeNum && l > 0) {
3718
+ const f = Math.floor(l / this.resizeNum * 100) / 100;
3719
3719
  this.resizeAllColumn(f);
3720
3720
  }
3721
3721
  const c = this.fixedLeftCellHeaders.filter((f) => !f.hasChildren);
@@ -3740,8 +3740,8 @@ class pi {
3740
3740
  } = this.ctx;
3741
3741
  if (this.isResizing && this.resizeTarget) {
3742
3742
  const r = this.resizeTarget.width, o = this.resizeTarget.minWidth, n = this.resizeTarget.maxWidth;
3743
- let h = e.clientX - this.clientX;
3744
- h + r < s && (h = -(r - s)), o && h + r < o && (h = -(r - o)), n && h + r > n && (h = n - r), this.resizeDiff = h, this.ctx.emit("draw");
3743
+ let l = e.clientX - this.clientX;
3744
+ l + r < s && (l = -(r - s)), o && l + r < o && (l = -(r - o)), n && l + r > n && (l = n - r), this.resizeDiff = l, this.ctx.emit("draw");
3745
3745
  } else {
3746
3746
  if (this.resizeTarget = null, this.isMouseDown)
3747
3747
  return;
@@ -3752,9 +3752,9 @@ class pi {
3752
3752
  this.ctx.stageElement.style.cursor === "col-resize" && (this.ctx.stageElement.style.cursor = "default");
3753
3753
  const r = [...this.renderFixedCellHeaders, ...this.renderCenterCellHeaders];
3754
3754
  for (const o of r) {
3755
- const { offsetX: n, offsetY: h } = this.ctx.getOffset(e), c = n, d = o.getDrawX();
3755
+ const { offsetX: n, offsetY: l } = this.ctx.getOffset(e), c = n, d = o.getDrawX();
3756
3756
  c > d + o.width - 5 && c < d + o.width + 4 && c < i - 4 && // 视窗中最后一列不允许调整宽
3757
- o.colspan <= 1 && this.ctx.isTarget(e) && h <= this.height && (this.ctx.stageElement.style.cursor = "col-resize", this.resizeTarget = o);
3757
+ o.colspan <= 1 && this.ctx.isTarget(e) && l <= this.height && (this.ctx.stageElement.style.cursor = "col-resize", this.resizeTarget = o);
3758
3758
  }
3759
3759
  }
3760
3760
  }));
@@ -3808,10 +3808,10 @@ class pi {
3808
3808
  let s = e;
3809
3809
  const { HEADER_HEIGHT: r = 0 } = this.ctx.config;
3810
3810
  for (let o = 0; o < i; o++) {
3811
- const n = t[o], h = r * (n.rowspan || 0), c = r * (n.level || 0);
3811
+ const n = t[o], l = r * (n.rowspan || 0), c = r * (n.level || 0);
3812
3812
  let { minWidth: d, maxWidth: f } = n, x = n.width || 100;
3813
3813
  d && x < d && (x = d), f && x > f && (x = f), n.children && (x = _t(n.children).reduce((u, w) => u + ((w == null ? void 0 : w.width) || 100), 0));
3814
- const g = new oe(this.ctx, this.columnIndex, s, c, x, h, n);
3814
+ const g = new oe(this.ctx, this.columnIndex, s, c, x, l, n);
3815
3815
  this.ctx.database.setHeader(n.key, g), this.allCellHeaders.push(g), n.children || (this.leafCellHeaders.push(g), g.column.widthFillDisable || this.resizeNum++), n.fixed === "left" ? this.fixedLeftCellHeaders.push(g) : n.fixed === "right" ? this.fixedRightCellHeaders.push(g) : this.centerCellHeaders.push(g), !n.children && this.columnIndex++, n.children && this.render(n.children, s), s += x;
3816
3816
  }
3817
3817
  }
@@ -3843,8 +3843,8 @@ class pi {
3843
3843
  colorStart: "rgba(0,0,0,0.1)",
3844
3844
  colorEnd: "rgba(0,0,0,0)"
3845
3845
  }), i < Math.floor(s.width - r - 1) && e !== n) {
3846
- const h = s.width - (this.x + this.width) + r - e;
3847
- this.ctx.paint.drawShadow(h, this.y, e, this.height, {
3846
+ const l = s.width - (this.x + this.width) + r - e;
3847
+ this.ctx.paint.drawShadow(l, this.y, e, this.height, {
3848
3848
  fillColor: o,
3849
3849
  side: "left",
3850
3850
  shadowWidth: 4,
@@ -3886,7 +3886,7 @@ class pi {
3886
3886
  }
3887
3887
  }
3888
3888
  class ne {
3889
- constructor(t, e, i = 0, s = 0, r = 0, o = 0, n, h = "body") {
3889
+ constructor(t, e, i = 0, s = 0, r = 0, o = 0, n, l = "body") {
3890
3890
  a(this, "ctx");
3891
3891
  a(this, "x", 0);
3892
3892
  a(this, "y", 0);
@@ -3899,7 +3899,7 @@ class ne {
3899
3899
  a(this, "rowKey", "");
3900
3900
  a(this, "rowType", "body");
3901
3901
  a(this, "data");
3902
- this.ctx = t, this.x = i, this.y = s, this.width = r, this.height = o, this.rowIndex = e, this.rowKey = t.database.getRowKeyForRowIndex(e) || "", this.rowType = h, this.data = n, this.update();
3902
+ this.ctx = t, this.x = i, this.y = s, this.width = r, this.height = o, this.rowIndex = e, this.rowKey = t.database.getRowKeyForRowIndex(e) || "", this.rowType = l, this.data = n, this.update();
3903
3903
  }
3904
3904
  update() {
3905
3905
  const { header: t } = this.ctx, e = [], i = [], s = [];
@@ -3977,7 +3977,7 @@ class mi {
3977
3977
  FOOTER_FIXED: r,
3978
3978
  SCROLLER_TRACK_SIZE: o = 0,
3979
3979
  HEIGHT: n,
3980
- EMPTY_BODY_HEIGHT: h = 0,
3980
+ EMPTY_BODY_HEIGHT: l = 0,
3981
3981
  MAX_HEIGHT: c = 0,
3982
3982
  ENABLE_OFFSET_HEIGHT: d = 0,
3983
3983
  OFFSET_HEIGHT: f = 0,
@@ -3990,7 +3990,7 @@ class mi {
3990
3990
  const { data: g, sumHeight: p } = s.getData();
3991
3991
  this.height = p, this.data = g, this.width = e.width, this.visibleWidth = this.ctx.stageWidth - o;
3992
3992
  const u = this.ctx.footer.height;
3993
- !this.data.length && !n ? this.height = h : !this.data.length && n && (this.height = n - e.height - u - o);
3993
+ !this.data.length && !n ? this.height = l : !this.data.length && n && (this.height = n - e.height - u - o);
3994
3994
  let w = this.height + e.height + o;
3995
3995
  w += u;
3996
3996
  let m = w;
@@ -4012,7 +4012,7 @@ class mi {
4012
4012
  bodyHeight: this.height,
4013
4013
  footerHeight: u,
4014
4014
  width: this.width,
4015
- height: this.data.length ? 0 : h + u
4015
+ height: this.data.length ? 0 : l + u
4016
4016
  });
4017
4017
  const _ = Math.round(t.width / E * 1e4) / 1e4, v = Math.round(t.height / E * 1e4) / 1e4;
4018
4018
  this.ctx.canvasElement.setAttribute("style", `height:${v}px;width:${_}px;`), this.ctx.paint.scale(E);
@@ -4035,7 +4035,7 @@ class mi {
4035
4035
  }), this.ctx.on("mousemove", (e) => {
4036
4036
  if (this.ctx.editing) return;
4037
4037
  const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), r = i, o = s, n = e.clientY, {
4038
- stageHeight: h,
4038
+ stageHeight: l,
4039
4039
  scrollY: c,
4040
4040
  config: { RESIZE_ROW_MIN_HEIGHT: d = 0 }
4041
4041
  } = this.ctx;
@@ -4055,7 +4055,7 @@ class mi {
4055
4055
  this.ctx.stageElement.style.cursor === "row-resize" && (this.ctx.stageElement.style.cursor = "default");
4056
4056
  for (let f = 0; f < this.renderRows.length; f++) {
4057
4057
  const x = this.renderRows[f];
4058
- if (r > x.y - c + x.height - 1.5 && r < x.y - c + x.height + 1.5 && r < h - 4)
4058
+ if (r > x.y - c + x.height - 1.5 && r < x.y - c + x.height + 1.5 && r < l - 4)
4059
4059
  for (let p = 0; p < x.cells.length; p++) {
4060
4060
  const u = x.cells[p];
4061
4061
  o > u.drawX + 10 && o < u.drawX + u.width - 10 && u.rowspan === 1 && (this.ctx.stageElement.style.cursor = "row-resize", this.resizeTarget = x);
@@ -4104,8 +4104,8 @@ class mi {
4104
4104
  colorStart: "rgba(0,0,0,0.1)",
4105
4105
  colorEnd: "rgba(0,0,0,0)"
4106
4106
  }), i < Math.floor(s.width - r - 1) && e !== n) {
4107
- const h = s.width - (this.x + this.width) + r - e;
4108
- this.ctx.paint.drawShadow(h, this.y, e, this.height, {
4107
+ const l = s.width - (this.x + this.width) + r - e;
4108
+ this.ctx.paint.drawShadow(l, this.y, e, this.height, {
4109
4109
  fillColor: o,
4110
4110
  side: "left",
4111
4111
  shadowWidth: 4,
@@ -4133,12 +4133,12 @@ class mi {
4133
4133
  config: { CELL_HEIGHT: s }
4134
4134
  } = this.ctx, r = i, { data: o, positions: n } = e.getData();
4135
4135
  this.ctx.maxRowIndex = o.length - 1;
4136
- let h = this.binarySearch(n, r), c = this.binarySearch(n, r + this.visibleHeight);
4137
- if (c === -1 && (c = this.ctx.maxRowIndex), h === -1 && c === this.ctx.maxRowIndex) {
4136
+ let l = this.binarySearch(n, r), c = this.binarySearch(n, r + this.visibleHeight);
4137
+ if (c === -1 && (c = this.ctx.maxRowIndex), l === -1 && c === this.ctx.maxRowIndex) {
4138
4138
  const f = Math.floor(this.visibleHeight / s);
4139
- h = this.ctx.maxRowIndex - f;
4139
+ l = this.ctx.maxRowIndex - f;
4140
4140
  }
4141
- 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;
4141
+ this.headIndex = Math.max(0, l), 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;
4142
4142
  const d = [];
4143
4143
  for (let f = 0; f < this.visibleRows.length; f++) {
4144
4144
  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);
@@ -4189,8 +4189,8 @@ class yi {
4189
4189
  stageWidth: r,
4190
4190
  config: { HEADER_BG_COLOR: o, SCROLLER_TRACK_SIZE: n }
4191
4191
  } = this.ctx;
4192
- let h = this.y;
4193
- if (this.ctx.config.FOOTER_FIXED || (h = this.y - this.ctx.scrollY), i > 0 && t !== 0 && this.ctx.paint.drawShadow(this.x, h, t, this.height, {
4192
+ let l = this.y;
4193
+ if (this.ctx.config.FOOTER_FIXED || (l = this.y - this.ctx.scrollY), i > 0 && t !== 0 && this.ctx.paint.drawShadow(this.x, l, t, this.height, {
4194
4194
  fillColor: o,
4195
4195
  side: "right",
4196
4196
  shadowWidth: 4,
@@ -4198,7 +4198,7 @@ class yi {
4198
4198
  colorEnd: "rgba(0,0,0,0)"
4199
4199
  }), i < Math.floor(s.width - r - 1) && e !== n) {
4200
4200
  const c = s.width - (this.x + this.width) + r - e;
4201
- this.ctx.paint.drawShadow(c, h, e, this.height, {
4201
+ this.ctx.paint.drawShadow(c, l, e, this.height, {
4202
4202
  fillColor: o,
4203
4203
  side: "left",
4204
4204
  shadowWidth: 4,
@@ -4354,12 +4354,12 @@ class Ei {
4354
4354
  this.ctx.mousedown && (this.ctx.selectorMove = !0), this.ctx.selector.enable = !0;
4355
4355
  const {
4356
4356
  SELECTOR_AREA_MIN_X: n,
4357
- SELECTOR_AREA_MAX_X: h,
4357
+ SELECTOR_AREA_MAX_X: l,
4358
4358
  SELECTOR_AREA_MIN_Y: c,
4359
4359
  SELECTOR_AREA_MAX_Y: d,
4360
4360
  SELECTOR_AREA_MAX_X_OFFSET: f,
4361
4361
  SELECTOR_AREA_MAX_Y_OFFSET: x
4362
- } = this.ctx.config, g = n, p = h || this.ctx.maxColIndex - f, u = c, w = d || this.ctx.maxRowIndex - x;
4362
+ } = this.ctx.config, g = n, p = l || this.ctx.maxColIndex - f, u = c, w = d || this.ctx.maxRowIndex - x;
4363
4363
  let [m, C] = r, [y, b] = o;
4364
4364
  if (m < g || C > p || y < u || b > w)
4365
4365
  return;
@@ -4385,11 +4385,11 @@ class Ei {
4385
4385
  adjustMergeCells(t, e) {
4386
4386
  var p;
4387
4387
  const [i, s] = e, [r, o] = t;
4388
- let n = [], h = [];
4388
+ let n = [], l = [];
4389
4389
  for (let u = 0; u <= e[1] - e[0]; u++)
4390
4390
  for (let w = 0; w <= t[1] - t[0]; w++) {
4391
4391
  const m = u + e[0], C = w + t[0], y = this.ctx.database.getVirtualBodyCell(m, C);
4392
- y && ((m === i || m === s) && n.push(y), (C === r || C === o) && h.push(y));
4392
+ y && ((m === i || m === s) && n.push(y), (C === r || C === o) && l.push(y));
4393
4393
  }
4394
4394
  const c = n.reduce(
4395
4395
  (u, w) => {
@@ -4400,7 +4400,7 @@ class Ei {
4400
4400
  minY: i,
4401
4401
  maxY: s
4402
4402
  }
4403
- ), d = h.reduce(
4403
+ ), d = l.reduce(
4404
4404
  (u, w) => {
4405
4405
  const { xArr: m } = w.getSpanInfo(), [C, y] = m;
4406
4406
  return u.minX = Math.min(u.minX, C), u.maxX = Math.max(u.maxX, y), u;
@@ -4432,15 +4432,15 @@ class Ei {
4432
4432
  if (this.ctx.mousedown && this.ctx.focusCellHeader) {
4433
4433
  const { colIndex: n } = this.ctx.focusCellHeader;
4434
4434
  if (this.ctx.clearSelector(), t.colIndex >= n) {
4435
- const h = [n, t.colIndex + t.colspan - 1], c = [r, o];
4436
- this.setSelector(h, c);
4435
+ const l = [n, t.colIndex + t.colspan - 1], c = [r, o];
4436
+ this.setSelector(l, c);
4437
4437
  } else {
4438
- const h = [t.colIndex, n], c = [r, o];
4439
- this.setSelector(h, c);
4438
+ const l = [t.colIndex, n], c = [r, o];
4439
+ this.setSelector(l, c);
4440
4440
  }
4441
4441
  } else {
4442
- const n = [t.colIndex, t.colIndex + t.colspan - 1], h = [r, o];
4443
- this.setSelector(n, h);
4442
+ const n = [t.colIndex, t.colIndex + t.colspan - 1], l = [r, o];
4443
+ this.setSelector(n, l);
4444
4444
  }
4445
4445
  }
4446
4446
  selectAll() {
@@ -4454,8 +4454,8 @@ class Ei {
4454
4454
  SELECTOR_AREA_MIN_Y: r,
4455
4455
  SELECTOR_AREA_MAX_Y: o,
4456
4456
  SELECTOR_AREA_MAX_X_OFFSET: n,
4457
- SELECTOR_AREA_MAX_Y_OFFSET: h
4458
- } = 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];
4457
+ SELECTOR_AREA_MAX_Y_OFFSET: l
4458
+ } = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - n, f = r, x = o || this.ctx.maxRowIndex - l, g = [c, d], p = [f, x];
4459
4459
  this.setSelector(g, p);
4460
4460
  }
4461
4461
  }
@@ -4465,16 +4465,16 @@ class Ei {
4465
4465
  const { SELECTOR_AREA_MIN_X: i, SELECTOR_AREA_MAX_X: s, SELECTOR_AREA_MAX_X_OFFSET: r } = this.ctx.config, o = s || this.ctx.maxColIndex - r, n = i;
4466
4466
  if (e) {
4467
4467
  this.ctx.setFocusCell(t);
4468
- const h = [n, o], c = [t.rowIndex, t.rowIndex];
4469
- this.setSelector(h, c);
4468
+ const l = [n, o], c = [t.rowIndex, t.rowIndex];
4469
+ this.setSelector(l, c);
4470
4470
  }
4471
4471
  if (this.ctx.focusCell && this.ctx.mousedown) {
4472
- const { rowIndex: h } = this.ctx.focusCell;
4473
- if (t.rowIndex >= h) {
4474
- const c = [n, o], d = [h, t.rowIndex];
4472
+ const { rowIndex: l } = this.ctx.focusCell;
4473
+ if (t.rowIndex >= l) {
4474
+ const c = [n, o], d = [l, t.rowIndex];
4475
4475
  this.setSelector(c, d);
4476
4476
  } else {
4477
- const c = [n, o], d = [t.rowIndex, h];
4477
+ const c = [n, o], d = [t.rowIndex, l];
4478
4478
  this.setSelector(c, d);
4479
4479
  }
4480
4480
  }
@@ -4484,7 +4484,7 @@ class Ei {
4484
4484
  return;
4485
4485
  const { mousedown: t, focusCell: e, hoverCell: i } = this.ctx;
4486
4486
  if (t && e && i) {
4487
- const { rowIndex: s, colIndex: r } = e, o = Math.min(i.colIndex, r), n = Math.max(i.colIndex, r), h = Math.min(i.rowIndex, s), c = Math.max(i.rowIndex, s), d = [o, n], f = [h, c];
4487
+ const { rowIndex: s, colIndex: r } = e, o = Math.min(i.colIndex, r), n = Math.max(i.colIndex, r), l = Math.min(i.rowIndex, s), c = Math.max(i.rowIndex, s), d = [o, n], f = [l, c];
4488
4488
  this.setSelector(d, f);
4489
4489
  }
4490
4490
  }
@@ -4494,7 +4494,7 @@ class Ei {
4494
4494
  if (this.ctx.selector.enable = !0, i && t) {
4495
4495
  if (this.ctx.config.ENABLE_SELECTOR_SINGLE)
4496
4496
  return;
4497
- 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];
4497
+ const { colIndex: s, rowIndex: r } = i, { colIndex: o, rowIndex: n } = e, l = Math.min(o, s), c = Math.max(o, s), d = Math.min(n, r), f = Math.max(n, r), x = [l, c], g = [d, f];
4498
4498
  this.setSelector(x, g);
4499
4499
  } else {
4500
4500
  this.ctx.emit("cellSelectedClick", e);
@@ -4560,8 +4560,8 @@ class Ei {
4560
4560
  let s = [];
4561
4561
  const r = /* @__PURE__ */ new Set();
4562
4562
  for (let n = 0; n <= e[1] - e[0]; n++)
4563
- for (let h = 0; h <= t[1] - t[0]; h++) {
4564
- const c = n + e[0], d = h + t[0], f = this.ctx.database.getItemValueForRowIndexAndColIndex(c, d);
4563
+ for (let l = 0; l <= t[1] - t[0]; l++) {
4564
+ const c = n + e[0], d = l + t[0], f = this.ctx.database.getItemValueForRowIndexAndColIndex(c, d);
4565
4565
  if (f) {
4566
4566
  const { rowKey: x, key: g } = f;
4567
4567
  this.ctx.database.getReadonly(x, g) || (r.add(x), s.push({
@@ -4593,7 +4593,7 @@ class Ei {
4593
4593
  const e = this.ctx.selector.yArr[0], i = this.ctx.selector.xArr[0], s = /* @__PURE__ */ new Set();
4594
4594
  navigator.clipboard.readText().then(async (r) => {
4595
4595
  let o = si(r);
4596
- 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;
4596
+ const n = [i, i + o[0].length - 1], l = [e, e + o.length - 1], [c, d] = l, [f, x] = n, g = d - this.ctx.maxRowIndex, p = x - this.ctx.maxColIndex;
4597
4597
  (g > 0 || p > 0) && this.ctx.emit("onPastedDataOverflow", {
4598
4598
  maxY: d,
4599
4599
  maxX: x,
@@ -4604,7 +4604,7 @@ class Ei {
4604
4604
  textArr: o
4605
4605
  });
4606
4606
  const u = o.length === 1 && o[0].length === 1;
4607
- if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(n, h) && !u) {
4607
+ if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(n, l) && !u) {
4608
4608
  const y = {
4609
4609
  code: "ERR_MERGED_CELLS_PASTE",
4610
4610
  message: "Merged cells cannot span paste data"
@@ -4654,7 +4654,7 @@ class Ei {
4654
4654
  oldValue: this.ctx.database.getItemValue(E.rowKey, E.key),
4655
4655
  row: this.ctx.database.getRowDataItemForRowKey(E.rowKey)
4656
4656
  }));
4657
- if (w = await y(b, n, h, o), w && !w.length)
4657
+ if (w = await y(b, n, l, o), w && !w.length)
4658
4658
  return;
4659
4659
  }
4660
4660
  this.clearCopyLine(), this.ctx.batchSetItemValueByEditor(w, !0);
@@ -4677,7 +4677,7 @@ class Ei {
4677
4677
  if (!e)
4678
4678
  return;
4679
4679
  let { colIndex: i = 0, rowIndex: s = 0 } = e;
4680
- const r = 0, o = 0, n = this.ctx.maxColIndex, h = this.ctx.maxRowIndex;
4680
+ const r = 0, o = 0, n = this.ctx.maxColIndex, l = this.ctx.maxRowIndex;
4681
4681
  switch (t) {
4682
4682
  case "LEFT":
4683
4683
  i > r && i--;
@@ -4689,7 +4689,7 @@ class Ei {
4689
4689
  i < n && i++;
4690
4690
  break;
4691
4691
  case "BOTTOM":
4692
- s < h && s++;
4692
+ s < l && s++;
4693
4693
  break;
4694
4694
  }
4695
4695
  const c = [i, i], d = [s, s], f = this.getCell(s, i);
@@ -4706,8 +4706,8 @@ class Ei {
4706
4706
  SELECTOR_AREA_MIN_Y: r,
4707
4707
  SELECTOR_AREA_MAX_Y: o,
4708
4708
  SELECTOR_AREA_MAX_X_OFFSET: n,
4709
- SELECTOR_AREA_MAX_Y_OFFSET: h
4710
- } = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - n, f = r, x = o || this.ctx.maxRowIndex - h;
4709
+ SELECTOR_AREA_MAX_Y_OFFSET: l
4710
+ } = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - n, f = r, x = o || this.ctx.maxRowIndex - l;
4711
4711
  return !(e < c || e > d || t < f || t > x);
4712
4712
  }
4713
4713
  /**
@@ -4721,7 +4721,7 @@ class Ei {
4721
4721
  let n = 10 * (s === "left" ? -1 : 1);
4722
4722
  this.timerX && (clearInterval(this.timerX), this.timerX = 0), this.timerX = setInterval(() => {
4723
4723
  n *= 1.5;
4724
- const { scrollX: h } = this.ctx, c = h + n;
4724
+ const { scrollX: l } = this.ctx, c = l + n;
4725
4725
  (c < 0 || c > this.ctx.body.width) && (clearInterval(this.timerX), this.timerX = 0), this.ctx.setScrollX(c);
4726
4726
  }, 100);
4727
4727
  }
@@ -4730,7 +4730,7 @@ class Ei {
4730
4730
  let n = 10 * (r === "top" ? -1 : 1);
4731
4731
  this.timerY && (clearInterval(this.timerY), this.timerY = 0), this.timerY = setInterval(() => {
4732
4732
  n *= 1.5;
4733
- const { scrollY: h } = this.ctx, c = h + n;
4733
+ const { scrollY: l } = this.ctx, c = l + n;
4734
4734
  (c < 0 || c > this.ctx.body.height) && (clearInterval(this.timerY), this.timerY = 0), this.ctx.setScrollY(c);
4735
4735
  }, 100);
4736
4736
  }
@@ -4747,7 +4747,7 @@ class Ei {
4747
4747
  fixedLeftWidth: r,
4748
4748
  header: o,
4749
4749
  footer: n,
4750
- body: h,
4750
+ body: l,
4751
4751
  scrollX: c,
4752
4752
  scrollY: d,
4753
4753
  config: { SCROLLER_TRACK_SIZE: f, FOOTER_FIXED: x, FOOTER_POSITION: g, ENABLE_MERGE_CELL_LINK: p }
@@ -4757,7 +4757,7 @@ class Ei {
4757
4757
  p && this.ctx.onlyMergeCell && i.updateSpanInfo();
4758
4758
  const { drawX: u, drawY: w, width: m, height: C, fixed: y } = i, b = r - u + 1, E = i.drawX + m - (e - s) + 1;
4759
4759
  let R = o.height - w, O = C;
4760
- O > h.visibleHeight && (O = h.visibleHeight);
4760
+ O > l.visibleHeight && (O = l.visibleHeight);
4761
4761
  let I = 0;
4762
4762
  x && (g === "top" ? R = o.height + n.height - w : I = n.visibleHeight);
4763
4763
  const _ = w + O - (t - I - f);
@@ -4778,7 +4778,7 @@ class Ci {
4778
4778
  this.ctx.on("mousemove", (t) => {
4779
4779
  if (this.ctx.stageElement.style.cursor === "crosshair" && (this.ctx.stageElement.style.cursor = "default"), this.ctx.editing || !this.ctx.focusCell || !this.maxColRowCell)
4780
4780
  return;
4781
- 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;
4781
+ const { offsetX: e, offsetY: i } = this.ctx.getOffset(t), { colIndex: s, rowIndex: r, drawX: o, drawY: n, width: l, height: c } = this.maxColRowCell, d = 6, f = s === this.ctx.maxColIndex || r === this.ctx.maxRowIndex ? 0 : 2, x = o + l - d + f, g = n + c - d + f;
4782
4782
  e > x && i > g && e < x + d && i < g + d && (this.ctx.stageElement.style.cursor = "crosshair");
4783
4783
  }), this.ctx.on("cellMouseenter", (t) => {
4784
4784
  const { xArr: e, yArr: i } = this.ctx.selector, s = e[1], r = i[1], { colIndex: o, rowIndex: n } = t;
@@ -4811,22 +4811,22 @@ class Ci {
4811
4811
  return;
4812
4812
  let o = t, n = e;
4813
4813
  if (!r) {
4814
- const [h] = n;
4815
- n = [h, h];
4814
+ const [l] = n;
4815
+ n = [l, l];
4816
4816
  }
4817
4817
  if (!s) {
4818
- const [h] = o;
4819
- o = [h, h];
4818
+ const [l] = o;
4819
+ o = [l, l];
4820
4820
  }
4821
4821
  if (JSON.stringify(this.ctx.autofill.xArr) !== JSON.stringify(o) || JSON.stringify(this.ctx.autofill.yArr) !== JSON.stringify(n)) {
4822
4822
  const {
4823
- SELECTOR_AREA_MIN_X: h,
4823
+ SELECTOR_AREA_MIN_X: l,
4824
4824
  SELECTOR_AREA_MAX_X: c,
4825
4825
  SELECTOR_AREA_MIN_Y: d,
4826
4826
  SELECTOR_AREA_MAX_Y: f,
4827
4827
  SELECTOR_AREA_MAX_X_OFFSET: x,
4828
4828
  SELECTOR_AREA_MAX_Y_OFFSET: g
4829
- } = this.ctx.config, p = h, u = c || this.ctx.maxColIndex - x, w = d, m = f || this.ctx.maxRowIndex - g;
4829
+ } = this.ctx.config, p = l, u = c || this.ctx.maxColIndex - x, w = d, m = f || this.ctx.maxRowIndex - g;
4830
4830
  let [C, y] = o, [b, E] = n;
4831
4831
  if (C < p || b < w)
4832
4832
  return;
@@ -4855,8 +4855,8 @@ class Ci {
4855
4855
  const u = g + e.yArr[0], w = p + e.xArr[0];
4856
4856
  i.set(`${u}-${w}`, !0);
4857
4857
  }
4858
- 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;
4859
- if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(n, h) && !c) {
4858
+ const { value: s } = e, r = s[0].length, o = s.length, n = this.ctx.autofill.xArr, l = this.ctx.autofill.yArr, c = r === 1 && o === 1;
4859
+ if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(n, l) && !c) {
4860
4860
  const g = {
4861
4861
  code: "ERR_MERGED_CELLS_AUTOFILL",
4862
4862
  message: "Merged cells cannot span autofill data"
@@ -4865,9 +4865,9 @@ class Ci {
4865
4865
  return;
4866
4866
  }
4867
4867
  let d = [];
4868
- for (let g = 0; g <= h[1] - h[0]; g++)
4868
+ for (let g = 0; g <= l[1] - l[0]; g++)
4869
4869
  for (let p = 0; p <= n[1] - n[0]; p++) {
4870
- 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}`;
4870
+ const u = p + n[0], w = g + l[0], m = s[g % o][p % r], C = this.ctx.database.getItemValueForRowIndexAndColIndex(w, u), y = `${w}-${u}`;
4871
4871
  if (C && !i.has(y)) {
4872
4872
  const { rowKey: b, key: E } = C;
4873
4873
  this.ctx.database.getReadonly(b, E) || (t.add(b), d.push({
@@ -4890,7 +4890,7 @@ class Ci {
4890
4890
  oldValue: this.ctx.database.getItemValue(u.rowKey, u.key),
4891
4891
  row: this.ctx.database.getRowDataItemForRowKey(u.rowKey)
4892
4892
  }));
4893
- if (d = await g(p, n, h), d && !d.length)
4893
+ if (d = await g(p, n, l), d && !d.length)
4894
4894
  return;
4895
4895
  }
4896
4896
  this.ctx.batchSetItemValueByEditor(d, !0);
@@ -4911,9 +4911,9 @@ class Ci {
4911
4911
  destroy() {
4912
4912
  }
4913
4913
  }
4914
- const rt = Math.min, U = Math.max, ft = Math.round, z = (l) => ({
4915
- x: l,
4916
- y: l
4914
+ const rt = Math.min, U = Math.max, ft = Math.round, z = (h) => ({
4915
+ x: h,
4916
+ y: h
4917
4917
  }), bi = {
4918
4918
  left: "right",
4919
4919
  right: "left",
@@ -4923,46 +4923,46 @@ const rt = Math.min, U = Math.max, ft = Math.round, z = (l) => ({
4923
4923
  start: "end",
4924
4924
  end: "start"
4925
4925
  };
4926
- function It(l, t, e) {
4927
- return U(l, rt(t, e));
4926
+ function It(h, t, e) {
4927
+ return U(h, rt(t, e));
4928
4928
  }
4929
- function at(l, t) {
4930
- return typeof l == "function" ? l(t) : l;
4929
+ function at(h, t) {
4930
+ return typeof h == "function" ? h(t) : h;
4931
4931
  }
4932
- function G(l) {
4933
- return l.split("-")[0];
4932
+ function G(h) {
4933
+ return h.split("-")[0];
4934
4934
  }
4935
- function lt(l) {
4936
- return l.split("-")[1];
4935
+ function ht(h) {
4936
+ return h.split("-")[1];
4937
4937
  }
4938
- function ae(l) {
4939
- return l === "x" ? "y" : "x";
4938
+ function ae(h) {
4939
+ return h === "x" ? "y" : "x";
4940
4940
  }
4941
- function Mt(l) {
4942
- return l === "y" ? "height" : "width";
4941
+ function Mt(h) {
4942
+ return h === "y" ? "height" : "width";
4943
4943
  }
4944
- function J(l) {
4945
- return ["top", "bottom"].includes(G(l)) ? "y" : "x";
4944
+ function J(h) {
4945
+ return ["top", "bottom"].includes(G(h)) ? "y" : "x";
4946
4946
  }
4947
- function Ht(l) {
4948
- return ae(J(l));
4947
+ function Ht(h) {
4948
+ return ae(J(h));
4949
4949
  }
4950
- function Ri(l, t, e) {
4950
+ function Ri(h, t, e) {
4951
4951
  e === void 0 && (e = !1);
4952
- const i = lt(l), s = Ht(l), r = Mt(s);
4952
+ const i = ht(h), s = Ht(h), r = Mt(s);
4953
4953
  let o = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
4954
4954
  return t.reference[r] > t.floating[r] && (o = xt(o)), [o, xt(o)];
4955
4955
  }
4956
- function _i(l) {
4957
- const t = xt(l);
4958
- return [Ot(l), t, Ot(t)];
4956
+ function _i(h) {
4957
+ const t = xt(h);
4958
+ return [Ot(h), t, Ot(t)];
4959
4959
  }
4960
- function Ot(l) {
4961
- return l.replace(/start|end/g, (t) => vi[t]);
4960
+ function Ot(h) {
4961
+ return h.replace(/start|end/g, (t) => vi[t]);
4962
4962
  }
4963
- function Ii(l, t, e) {
4963
+ function Ii(h, t, e) {
4964
4964
  const i = ["left", "right"], s = ["right", "left"], r = ["top", "bottom"], o = ["bottom", "top"];
4965
- switch (l) {
4965
+ switch (h) {
4966
4966
  case "top":
4967
4967
  case "bottom":
4968
4968
  return e ? t ? s : i : t ? i : s;
@@ -4973,38 +4973,38 @@ function Ii(l, t, e) {
4973
4973
  return [];
4974
4974
  }
4975
4975
  }
4976
- function Oi(l, t, e, i) {
4977
- const s = lt(l);
4978
- let r = Ii(G(l), e === "start", i);
4976
+ function Oi(h, t, e, i) {
4977
+ const s = ht(h);
4978
+ let r = Ii(G(h), e === "start", i);
4979
4979
  return s && (r = r.map((o) => o + "-" + s), t && (r = r.concat(r.map(Ot)))), r;
4980
4980
  }
4981
- function xt(l) {
4982
- return l.replace(/left|right|bottom|top/g, (t) => bi[t]);
4981
+ function xt(h) {
4982
+ return h.replace(/left|right|bottom|top/g, (t) => bi[t]);
4983
4983
  }
4984
- function Li(l) {
4984
+ function Li(h) {
4985
4985
  return {
4986
4986
  top: 0,
4987
4987
  right: 0,
4988
4988
  bottom: 0,
4989
4989
  left: 0,
4990
- ...l
4990
+ ...h
4991
4991
  };
4992
4992
  }
4993
- function le(l) {
4994
- return typeof l != "number" ? Li(l) : {
4995
- top: l,
4996
- right: l,
4997
- bottom: l,
4998
- left: l
4993
+ function he(h) {
4994
+ return typeof h != "number" ? Li(h) : {
4995
+ top: h,
4996
+ right: h,
4997
+ bottom: h,
4998
+ left: h
4999
4999
  };
5000
5000
  }
5001
- function ut(l) {
5001
+ function ut(h) {
5002
5002
  const {
5003
5003
  x: t,
5004
5004
  y: e,
5005
5005
  width: i,
5006
5006
  height: s
5007
- } = l;
5007
+ } = h;
5008
5008
  return {
5009
5009
  width: i,
5010
5010
  height: s,
@@ -5016,14 +5016,14 @@ function ut(l) {
5016
5016
  y: e
5017
5017
  };
5018
5018
  }
5019
- function $t(l, t, e) {
5019
+ function $t(h, t, e) {
5020
5020
  let {
5021
5021
  reference: i,
5022
5022
  floating: s
5023
- } = l;
5024
- 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;
5023
+ } = h;
5024
+ const r = J(t), o = Ht(t), n = Mt(o), l = 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;
5025
5025
  let g;
5026
- switch (h) {
5026
+ switch (l) {
5027
5027
  case "top":
5028
5028
  g = {
5029
5029
  x: d,
@@ -5054,7 +5054,7 @@ function $t(l, t, e) {
5054
5054
  y: i.y
5055
5055
  };
5056
5056
  }
5057
- switch (lt(t)) {
5057
+ switch (ht(t)) {
5058
5058
  case "start":
5059
5059
  g[o] -= x * (e && c ? -1 : 1);
5060
5060
  break;
@@ -5064,21 +5064,21 @@ function $t(l, t, e) {
5064
5064
  }
5065
5065
  return g;
5066
5066
  }
5067
- const Si = async (l, t, e) => {
5067
+ const Si = async (h, t, e) => {
5068
5068
  const {
5069
5069
  placement: i = "bottom",
5070
5070
  strategy: s = "absolute",
5071
5071
  middleware: r = [],
5072
5072
  platform: o
5073
- } = e, n = r.filter(Boolean), h = await (o.isRTL == null ? void 0 : o.isRTL(t));
5073
+ } = e, n = r.filter(Boolean), l = await (o.isRTL == null ? void 0 : o.isRTL(t));
5074
5074
  let c = await o.getElementRects({
5075
- reference: l,
5075
+ reference: h,
5076
5076
  floating: t,
5077
5077
  strategy: s
5078
5078
  }), {
5079
5079
  x: d,
5080
5080
  y: f
5081
- } = $t(c, i, h), x = i, g = {}, p = 0;
5081
+ } = $t(c, i, l), x = i, g = {}, p = 0;
5082
5082
  for (let u = 0; u < n.length; u++) {
5083
5083
  const {
5084
5084
  name: w,
@@ -5098,7 +5098,7 @@ const Si = async (l, t, e) => {
5098
5098
  rects: c,
5099
5099
  platform: o,
5100
5100
  elements: {
5101
- reference: l,
5101
+ reference: h,
5102
5102
  floating: t
5103
5103
  }
5104
5104
  });
@@ -5109,13 +5109,13 @@ const Si = async (l, t, e) => {
5109
5109
  ...b
5110
5110
  }
5111
5111
  }, E && p <= 50 && (p++, typeof E == "object" && (E.placement && (x = E.placement), E.rects && (c = E.rects === !0 ? await o.getElementRects({
5112
- reference: l,
5112
+ reference: h,
5113
5113
  floating: t,
5114
5114
  strategy: s
5115
5115
  }) : E.rects), {
5116
5116
  x: d,
5117
5117
  y: f
5118
- } = $t(c, x, h)), u = -1);
5118
+ } = $t(c, x, l)), u = -1);
5119
5119
  }
5120
5120
  return {
5121
5121
  x: d,
@@ -5125,7 +5125,7 @@ const Si = async (l, t, e) => {
5125
5125
  middlewareData: g
5126
5126
  };
5127
5127
  };
5128
- async function he(l, t) {
5128
+ async function le(h, t) {
5129
5129
  var e;
5130
5130
  t === void 0 && (t = {});
5131
5131
  const {
@@ -5134,18 +5134,18 @@ async function he(l, t) {
5134
5134
  platform: r,
5135
5135
  rects: o,
5136
5136
  elements: n,
5137
- strategy: h
5138
- } = l, {
5137
+ strategy: l
5138
+ } = h, {
5139
5139
  boundary: c = "clippingAncestors",
5140
5140
  rootBoundary: d = "viewport",
5141
5141
  elementContext: f = "floating",
5142
5142
  altBoundary: x = !1,
5143
5143
  padding: g = 0
5144
- } = at(t, l), p = le(g), w = n[x ? f === "floating" ? "reference" : "floating" : f], m = ut(await r.getClippingRect({
5144
+ } = at(t, h), p = he(g), w = n[x ? f === "floating" ? "reference" : "floating" : f], m = ut(await r.getClippingRect({
5145
5145
  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)),
5146
5146
  boundary: c,
5147
5147
  rootBoundary: d,
5148
- strategy: h
5148
+ strategy: l
5149
5149
  })), C = f === "floating" ? {
5150
5150
  x: i,
5151
5151
  y: s,
@@ -5161,7 +5161,7 @@ async function he(l, t) {
5161
5161
  elements: n,
5162
5162
  rect: C,
5163
5163
  offsetParent: y,
5164
- strategy: h
5164
+ strategy: l
5165
5165
  }) : C);
5166
5166
  return {
5167
5167
  top: (m.top - E.top + p.top) / b.y,
@@ -5170,9 +5170,9 @@ async function he(l, t) {
5170
5170
  right: (E.right - m.right + p.right) / b.x
5171
5171
  };
5172
5172
  }
5173
- const Ti = (l) => ({
5173
+ const Ti = (h) => ({
5174
5174
  name: "arrow",
5175
- options: l,
5175
+ options: h,
5176
5176
  async fn(t) {
5177
5177
  const {
5178
5178
  x: e,
@@ -5181,20 +5181,20 @@ const Ti = (l) => ({
5181
5181
  rects: r,
5182
5182
  platform: o,
5183
5183
  elements: n,
5184
- middlewareData: h
5184
+ middlewareData: l
5185
5185
  } = t, {
5186
5186
  element: c,
5187
5187
  padding: d = 0
5188
- } = at(l, t) || {};
5188
+ } = at(h, t) || {};
5189
5189
  if (c == null)
5190
5190
  return {};
5191
- const f = le(d), x = {
5191
+ const f = he(d), x = {
5192
5192
  x: e,
5193
5193
  y: i
5194
5194
  }, 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], R = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
5195
5195
  let O = R ? R[y] : 0;
5196
5196
  (!O || !await (o.isElement == null ? void 0 : o.isElement(R))) && (O = n.floating[y] || r.floating[p]);
5197
- const I = b / 2 - E / 2, _ = O / 2 - u[p] / 2 - 1, v = rt(f[m], _), S = rt(f[C], _), T = v, M = O - u[p] - S, A = O / 2 - u[p] / 2 + I, N = It(T, A, M), Y = !h.arrow && lt(s) != null && A !== N && r.reference[p] / 2 - (A < T ? v : S) - u[p] / 2 < 0, k = Y ? A < T ? A - T : A - M : 0;
5197
+ const I = b / 2 - E / 2, _ = O / 2 - u[p] / 2 - 1, v = rt(f[m], _), S = rt(f[C], _), T = v, M = O - u[p] - S, A = O / 2 - u[p] / 2 + I, N = It(T, A, M), Y = !l.arrow && ht(s) != null && A !== N && r.reference[p] / 2 - (A < T ? v : S) - u[p] / 2 < 0, k = Y ? A < T ? A - T : A - M : 0;
5198
5198
  return {
5199
5199
  [g]: x[g] + k,
5200
5200
  data: {
@@ -5207,10 +5207,10 @@ const Ti = (l) => ({
5207
5207
  reset: Y
5208
5208
  };
5209
5209
  }
5210
- }), Ai = function(l) {
5211
- return l === void 0 && (l = {}), {
5210
+ }), Ai = function(h) {
5211
+ return h === void 0 && (h = {}), {
5212
5212
  name: "flip",
5213
- options: l,
5213
+ options: h,
5214
5214
  async fn(t) {
5215
5215
  var e, i;
5216
5216
  const {
@@ -5218,7 +5218,7 @@ const Ti = (l) => ({
5218
5218
  middlewareData: r,
5219
5219
  rects: o,
5220
5220
  initialPlacement: n,
5221
- platform: h,
5221
+ platform: l,
5222
5222
  elements: c
5223
5223
  } = t, {
5224
5224
  mainAxis: d = !0,
@@ -5228,12 +5228,12 @@ const Ti = (l) => ({
5228
5228
  fallbackAxisSideDirection: p = "none",
5229
5229
  flipAlignment: u = !0,
5230
5230
  ...w
5231
- } = at(l, t);
5231
+ } = at(h, t);
5232
5232
  if ((e = r.arrow) != null && e.alignmentOffset)
5233
5233
  return {};
5234
- 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)] : _i(n)), R = p !== "none";
5234
+ const m = G(s), C = J(n), y = G(n) === n, b = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), E = x || (y || !u ? [xt(n)] : _i(n)), R = p !== "none";
5235
5235
  !x && R && E.push(...Oi(n, u, p, b));
5236
- const O = [n, ...E], I = await he(t, w), _ = [];
5236
+ const O = [n, ...E], I = await le(t, w), _ = [];
5237
5237
  let v = ((i = r.flip) == null ? void 0 : i.overflows) || [];
5238
5238
  if (d && _.push(I[m]), f) {
5239
5239
  const A = Ri(s, o, b);
@@ -5287,12 +5287,12 @@ const Ti = (l) => ({
5287
5287
  }
5288
5288
  };
5289
5289
  };
5290
- async function Mi(l, t) {
5290
+ async function Mi(h, t) {
5291
5291
  const {
5292
5292
  placement: e,
5293
5293
  platform: i,
5294
5294
  elements: s
5295
- } = l, 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, l);
5295
+ } = h, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), o = G(e), n = ht(e), l = J(e) === "y", c = ["left", "top"].includes(o) ? -1 : 1, d = r && l ? -1 : 1, f = at(t, h);
5296
5296
  let {
5297
5297
  mainAxis: x,
5298
5298
  crossAxis: g,
@@ -5306,7 +5306,7 @@ async function Mi(l, t) {
5306
5306
  crossAxis: f.crossAxis || 0,
5307
5307
  alignmentAxis: f.alignmentAxis
5308
5308
  };
5309
- return n && typeof p == "number" && (g = n === "end" ? p * -1 : p), h ? {
5309
+ return n && typeof p == "number" && (g = n === "end" ? p * -1 : p), l ? {
5310
5310
  x: g * d,
5311
5311
  y: x * c
5312
5312
  } : {
@@ -5314,10 +5314,10 @@ async function Mi(l, t) {
5314
5314
  y: g * d
5315
5315
  };
5316
5316
  }
5317
- const Hi = function(l) {
5318
- return l === void 0 && (l = 0), {
5317
+ const Hi = function(h) {
5318
+ return h === void 0 && (h = 0), {
5319
5319
  name: "offset",
5320
- options: l,
5320
+ options: h,
5321
5321
  async fn(t) {
5322
5322
  var e, i;
5323
5323
  const {
@@ -5325,21 +5325,21 @@ const Hi = function(l) {
5325
5325
  y: r,
5326
5326
  placement: o,
5327
5327
  middlewareData: n
5328
- } = t, h = await Mi(t, l);
5328
+ } = t, l = await Mi(t, h);
5329
5329
  return o === ((e = n.offset) == null ? void 0 : e.placement) && (i = n.arrow) != null && i.alignmentOffset ? {} : {
5330
- x: s + h.x,
5331
- y: r + h.y,
5330
+ x: s + l.x,
5331
+ y: r + l.y,
5332
5332
  data: {
5333
- ...h,
5333
+ ...l,
5334
5334
  placement: o
5335
5335
  }
5336
5336
  };
5337
5337
  }
5338
5338
  };
5339
- }, Di = function(l) {
5340
- return l === void 0 && (l = {}), {
5339
+ }, Di = function(h) {
5340
+ return h === void 0 && (h = {}), {
5341
5341
  name: "shift",
5342
- options: l,
5342
+ options: h,
5343
5343
  async fn(t) {
5344
5344
  const {
5345
5345
  x: e,
@@ -5360,11 +5360,11 @@ const Hi = function(l) {
5360
5360
  };
5361
5361
  }
5362
5362
  },
5363
- ...h
5364
- } = at(l, t), c = {
5363
+ ...l
5364
+ } = at(h, t), c = {
5365
5365
  x: e,
5366
5366
  y: i
5367
- }, d = await he(t, h), f = J(G(s)), x = ae(f);
5367
+ }, d = await le(t, l), f = J(G(s)), x = ae(f);
5368
5368
  let g = c[x], p = c[f];
5369
5369
  if (r) {
5370
5370
  const w = x === "y" ? "top" : "left", m = x === "y" ? "bottom" : "right", C = g + d[w], y = g - d[m];
@@ -5396,56 +5396,56 @@ const Hi = function(l) {
5396
5396
  function gt() {
5397
5397
  return typeof window < "u";
5398
5398
  }
5399
- function tt(l) {
5400
- return ce(l) ? (l.nodeName || "").toLowerCase() : "#document";
5399
+ function tt(h) {
5400
+ return ce(h) ? (h.nodeName || "").toLowerCase() : "#document";
5401
5401
  }
5402
- function X(l) {
5402
+ function X(h) {
5403
5403
  var t;
5404
- return (l == null || (t = l.ownerDocument) == null ? void 0 : t.defaultView) || window;
5404
+ return (h == null || (t = h.ownerDocument) == null ? void 0 : t.defaultView) || window;
5405
5405
  }
5406
- function V(l) {
5406
+ function V(h) {
5407
5407
  var t;
5408
- return (t = (ce(l) ? l.ownerDocument : l.document) || window.document) == null ? void 0 : t.documentElement;
5408
+ return (t = (ce(h) ? h.ownerDocument : h.document) || window.document) == null ? void 0 : t.documentElement;
5409
5409
  }
5410
- function ce(l) {
5411
- return gt() ? l instanceof Node || l instanceof X(l).Node : !1;
5410
+ function ce(h) {
5411
+ return gt() ? h instanceof Node || h instanceof X(h).Node : !1;
5412
5412
  }
5413
- function B(l) {
5414
- return gt() ? l instanceof Element || l instanceof X(l).Element : !1;
5413
+ function B(h) {
5414
+ return gt() ? h instanceof Element || h instanceof X(h).Element : !1;
5415
5415
  }
5416
- function K(l) {
5417
- return gt() ? l instanceof HTMLElement || l instanceof X(l).HTMLElement : !1;
5416
+ function K(h) {
5417
+ return gt() ? h instanceof HTMLElement || h instanceof X(h).HTMLElement : !1;
5418
5418
  }
5419
- function qt(l) {
5420
- return !gt() || typeof ShadowRoot > "u" ? !1 : l instanceof ShadowRoot || l instanceof X(l).ShadowRoot;
5419
+ function qt(h) {
5420
+ return !gt() || typeof ShadowRoot > "u" ? !1 : h instanceof ShadowRoot || h instanceof X(h).ShadowRoot;
5421
5421
  }
5422
- function ht(l) {
5422
+ function lt(h) {
5423
5423
  const {
5424
5424
  overflow: t,
5425
5425
  overflowX: e,
5426
5426
  overflowY: i,
5427
5427
  display: s
5428
- } = F(l);
5428
+ } = F(h);
5429
5429
  return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
5430
5430
  }
5431
- function Xi(l) {
5432
- return ["table", "td", "th"].includes(tt(l));
5431
+ function Xi(h) {
5432
+ return ["table", "td", "th"].includes(tt(h));
5433
5433
  }
5434
- function wt(l) {
5434
+ function wt(h) {
5435
5435
  return [":popover-open", ":modal"].some((t) => {
5436
5436
  try {
5437
- return l.matches(t);
5437
+ return h.matches(t);
5438
5438
  } catch {
5439
5439
  return !1;
5440
5440
  }
5441
5441
  });
5442
5442
  }
5443
- function Dt(l) {
5444
- const t = Xt(), e = B(l) ? F(l) : l;
5443
+ function Dt(h) {
5444
+ const t = Xt(), e = B(h) ? F(h) : h;
5445
5445
  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));
5446
5446
  }
5447
- function Bi(l) {
5448
- let t = $(l);
5447
+ function Bi(h) {
5448
+ let t = $(h);
5449
5449
  for (; K(t) && !Q(t); ) {
5450
5450
  if (Dt(t))
5451
5451
  return t;
@@ -5458,65 +5458,65 @@ function Bi(l) {
5458
5458
  function Xt() {
5459
5459
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
5460
5460
  }
5461
- function Q(l) {
5462
- return ["html", "body", "#document"].includes(tt(l));
5461
+ function Q(h) {
5462
+ return ["html", "body", "#document"].includes(tt(h));
5463
5463
  }
5464
- function F(l) {
5465
- return X(l).getComputedStyle(l);
5464
+ function F(h) {
5465
+ return X(h).getComputedStyle(h);
5466
5466
  }
5467
- function pt(l) {
5468
- return B(l) ? {
5469
- scrollLeft: l.scrollLeft,
5470
- scrollTop: l.scrollTop
5467
+ function pt(h) {
5468
+ return B(h) ? {
5469
+ scrollLeft: h.scrollLeft,
5470
+ scrollTop: h.scrollTop
5471
5471
  } : {
5472
- scrollLeft: l.scrollX,
5473
- scrollTop: l.scrollY
5472
+ scrollLeft: h.scrollX,
5473
+ scrollTop: h.scrollY
5474
5474
  };
5475
5475
  }
5476
- function $(l) {
5477
- if (tt(l) === "html")
5478
- return l;
5476
+ function $(h) {
5477
+ if (tt(h) === "html")
5478
+ return h;
5479
5479
  const t = (
5480
5480
  // Step into the shadow DOM of the parent of a slotted node.
5481
- l.assignedSlot || // DOM Element detected.
5482
- l.parentNode || // ShadowRoot detected.
5483
- qt(l) && l.host || // Fallback.
5484
- V(l)
5481
+ h.assignedSlot || // DOM Element detected.
5482
+ h.parentNode || // ShadowRoot detected.
5483
+ qt(h) && h.host || // Fallback.
5484
+ V(h)
5485
5485
  );
5486
5486
  return qt(t) ? t.host : t;
5487
5487
  }
5488
- function de(l) {
5489
- const t = $(l);
5490
- return Q(t) ? l.ownerDocument ? l.ownerDocument.body : l.body : K(t) && ht(t) ? t : de(t);
5488
+ function de(h) {
5489
+ const t = $(h);
5490
+ return Q(t) ? h.ownerDocument ? h.ownerDocument.body : h.body : K(t) && lt(t) ? t : de(t);
5491
5491
  }
5492
- function Lt(l, t, e) {
5492
+ function Lt(h, t, e) {
5493
5493
  var i;
5494
5494
  t === void 0 && (t = []), e === void 0 && (e = !0);
5495
- const s = de(l), r = s === ((i = l.ownerDocument) == null ? void 0 : i.body), o = X(s);
5495
+ const s = de(h), r = s === ((i = h.ownerDocument) == null ? void 0 : i.body), o = X(s);
5496
5496
  if (r) {
5497
5497
  const n = St(o);
5498
- return t.concat(o, o.visualViewport || [], ht(s) ? s : [], n && e ? Lt(n) : []);
5498
+ return t.concat(o, o.visualViewport || [], lt(s) ? s : [], n && e ? Lt(n) : []);
5499
5499
  }
5500
5500
  return t.concat(s, Lt(s, [], e));
5501
5501
  }
5502
- function St(l) {
5503
- return l.parent && Object.getPrototypeOf(l.parent) ? l.frameElement : null;
5502
+ function St(h) {
5503
+ return h.parent && Object.getPrototypeOf(h.parent) ? h.frameElement : null;
5504
5504
  }
5505
- function fe(l) {
5506
- const t = F(l);
5505
+ function fe(h) {
5506
+ const t = F(h);
5507
5507
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
5508
- const s = K(l), r = s ? l.offsetWidth : e, o = s ? l.offsetHeight : i, n = ft(e) !== r || ft(i) !== o;
5508
+ const s = K(h), r = s ? h.offsetWidth : e, o = s ? h.offsetHeight : i, n = ft(e) !== r || ft(i) !== o;
5509
5509
  return n && (e = r, i = o), {
5510
5510
  width: e,
5511
5511
  height: i,
5512
5512
  $: n
5513
5513
  };
5514
5514
  }
5515
- function xe(l) {
5516
- return B(l) ? l : l.contextElement;
5515
+ function xe(h) {
5516
+ return B(h) ? h : h.contextElement;
5517
5517
  }
5518
- function Z(l) {
5519
- const t = xe(l);
5518
+ function Z(h) {
5519
+ const t = xe(h);
5520
5520
  if (!K(t))
5521
5521
  return z(1);
5522
5522
  const e = t.getBoundingClientRect(), {
@@ -5531,74 +5531,74 @@ function Z(l) {
5531
5531
  };
5532
5532
  }
5533
5533
  const Fi = /* @__PURE__ */ z(0);
5534
- function ue(l) {
5535
- const t = X(l);
5534
+ function ue(h) {
5535
+ const t = X(h);
5536
5536
  return !Xt() || !t.visualViewport ? Fi : {
5537
5537
  x: t.visualViewport.offsetLeft,
5538
5538
  y: t.visualViewport.offsetTop
5539
5539
  };
5540
5540
  }
5541
- function Ni(l, t, e) {
5542
- return t === void 0 && (t = !1), !e || t && e !== X(l) ? !1 : t;
5541
+ function Ni(h, t, e) {
5542
+ return t === void 0 && (t = !1), !e || t && e !== X(h) ? !1 : t;
5543
5543
  }
5544
- function ot(l, t, e, i) {
5544
+ function ot(h, t, e, i) {
5545
5545
  t === void 0 && (t = !1), e === void 0 && (e = !1);
5546
- const s = l.getBoundingClientRect(), r = xe(l);
5546
+ const s = h.getBoundingClientRect(), r = xe(h);
5547
5547
  let o = z(1);
5548
- t && (i ? B(i) && (o = Z(i)) : o = Z(l));
5548
+ t && (i ? B(i) && (o = Z(i)) : o = Z(h));
5549
5549
  const n = Ni(r, e, i) ? ue(r) : z(0);
5550
- 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;
5550
+ let l = (s.left + n.x) / o.x, c = (s.top + n.y) / o.y, d = s.width / o.x, f = s.height / o.y;
5551
5551
  if (r) {
5552
5552
  const x = X(r), g = i && B(i) ? X(i) : i;
5553
5553
  let p = x, u = St(p);
5554
5554
  for (; u && i && g !== p; ) {
5555
5555
  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;
5556
- h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += y, c += b, p = X(u), u = St(p);
5556
+ l *= w.x, c *= w.y, d *= w.x, f *= w.y, l += y, c += b, p = X(u), u = St(p);
5557
5557
  }
5558
5558
  }
5559
5559
  return ut({
5560
5560
  width: d,
5561
5561
  height: f,
5562
- x: h,
5562
+ x: l,
5563
5563
  y: c
5564
5564
  });
5565
5565
  }
5566
- function ki(l) {
5566
+ function ki(h) {
5567
5567
  let {
5568
5568
  elements: t,
5569
5569
  rect: e,
5570
5570
  offsetParent: i,
5571
5571
  strategy: s
5572
- } = l;
5572
+ } = h;
5573
5573
  const r = s === "fixed", o = V(i), n = t ? wt(t.floating) : !1;
5574
5574
  if (i === o || n && r)
5575
5575
  return e;
5576
- let h = {
5576
+ let l = {
5577
5577
  scrollLeft: 0,
5578
5578
  scrollTop: 0
5579
5579
  }, c = z(1);
5580
5580
  const d = z(0), f = K(i);
5581
- if ((f || !f && !r) && ((tt(i) !== "body" || ht(o)) && (h = pt(i)), K(i))) {
5581
+ if ((f || !f && !r) && ((tt(i) !== "body" || lt(o)) && (l = pt(i)), K(i))) {
5582
5582
  const x = ot(i);
5583
5583
  c = Z(i), d.x = x.x + i.clientLeft, d.y = x.y + i.clientTop;
5584
5584
  }
5585
5585
  return {
5586
5586
  width: e.width * c.x,
5587
5587
  height: e.height * c.y,
5588
- x: e.x * c.x - h.scrollLeft * c.x + d.x,
5589
- y: e.y * c.y - h.scrollTop * c.y + d.y
5588
+ x: e.x * c.x - l.scrollLeft * c.x + d.x,
5589
+ y: e.y * c.y - l.scrollTop * c.y + d.y
5590
5590
  };
5591
5591
  }
5592
- function Ki(l) {
5593
- return Array.from(l.getClientRects());
5592
+ function Ki(h) {
5593
+ return Array.from(h.getClientRects());
5594
5594
  }
5595
- function Tt(l, t) {
5596
- const e = pt(l).scrollLeft;
5597
- return t ? t.left + e : ot(V(l)).left + e;
5595
+ function Tt(h, t) {
5596
+ const e = pt(h).scrollLeft;
5597
+ return t ? t.left + e : ot(V(h)).left + e;
5598
5598
  }
5599
- function Yi(l) {
5600
- const t = V(l), e = pt(l), i = l.ownerDocument.body, s = U(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = U(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5601
- let o = -e.scrollLeft + Tt(l);
5599
+ function Yi(h) {
5600
+ const t = V(h), e = pt(h), i = h.ownerDocument.body, s = U(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = U(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5601
+ let o = -e.scrollLeft + Tt(h);
5602
5602
  const n = -e.scrollTop;
5603
5603
  return F(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
5604
5604
  width: s,
@@ -5607,40 +5607,40 @@ function Yi(l) {
5607
5607
  y: n
5608
5608
  };
5609
5609
  }
5610
- function Vi(l, t) {
5611
- const e = X(l), i = V(l), s = e.visualViewport;
5612
- let r = i.clientWidth, o = i.clientHeight, n = 0, h = 0;
5610
+ function Vi(h, t) {
5611
+ const e = X(h), i = V(h), s = e.visualViewport;
5612
+ let r = i.clientWidth, o = i.clientHeight, n = 0, l = 0;
5613
5613
  if (s) {
5614
5614
  r = s.width, o = s.height;
5615
5615
  const c = Xt();
5616
- (!c || c && t === "fixed") && (n = s.offsetLeft, h = s.offsetTop);
5616
+ (!c || c && t === "fixed") && (n = s.offsetLeft, l = s.offsetTop);
5617
5617
  }
5618
5618
  return {
5619
5619
  width: r,
5620
5620
  height: o,
5621
5621
  x: n,
5622
- y: h
5622
+ y: l
5623
5623
  };
5624
5624
  }
5625
- function Wi(l, t) {
5626
- const e = ot(l, !0, t === "fixed"), i = e.top + l.clientTop, s = e.left + l.clientLeft, r = K(l) ? Z(l) : z(1), o = l.clientWidth * r.x, n = l.clientHeight * r.y, h = s * r.x, c = i * r.y;
5625
+ function Wi(h, t) {
5626
+ const e = ot(h, !0, t === "fixed"), i = e.top + h.clientTop, s = e.left + h.clientLeft, r = K(h) ? Z(h) : z(1), o = h.clientWidth * r.x, n = h.clientHeight * r.y, l = s * r.x, c = i * r.y;
5627
5627
  return {
5628
5628
  width: o,
5629
5629
  height: n,
5630
- x: h,
5630
+ x: l,
5631
5631
  y: c
5632
5632
  };
5633
5633
  }
5634
- function Gt(l, t, e) {
5634
+ function Gt(h, t, e) {
5635
5635
  let i;
5636
5636
  if (t === "viewport")
5637
- i = Vi(l, e);
5637
+ i = Vi(h, e);
5638
5638
  else if (t === "document")
5639
- i = Yi(V(l));
5639
+ i = Yi(V(h));
5640
5640
  else if (B(t))
5641
5641
  i = Wi(t, e);
5642
5642
  else {
5643
- const s = ue(l);
5643
+ const s = ue(h);
5644
5644
  i = {
5645
5645
  ...t,
5646
5646
  x: t.x - s.x,
@@ -5649,70 +5649,70 @@ function Gt(l, t, e) {
5649
5649
  }
5650
5650
  return ut(i);
5651
5651
  }
5652
- function ge(l, t) {
5653
- const e = $(l);
5652
+ function ge(h, t) {
5653
+ const e = $(h);
5654
5654
  return e === t || !B(e) || Q(e) ? !1 : F(e).position === "fixed" || ge(e, t);
5655
5655
  }
5656
- function Pi(l, t) {
5657
- const e = t.get(l);
5656
+ function Pi(h, t) {
5657
+ const e = t.get(h);
5658
5658
  if (e)
5659
5659
  return e;
5660
- let i = Lt(l, [], !1).filter((n) => B(n) && tt(n) !== "body"), s = null;
5661
- const r = F(l).position === "fixed";
5662
- let o = r ? $(l) : l;
5660
+ let i = Lt(h, [], !1).filter((n) => B(n) && tt(n) !== "body"), s = null;
5661
+ const r = F(h).position === "fixed";
5662
+ let o = r ? $(h) : h;
5663
5663
  for (; B(o) && !Q(o); ) {
5664
- const n = F(o), h = Dt(o);
5665
- !h && n.position === "fixed" && (s = null), (r ? !h && !s : !h && n.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ht(o) && !h && ge(l, o)) ? i = i.filter((d) => d !== o) : s = n, o = $(o);
5664
+ const n = F(o), l = Dt(o);
5665
+ !l && n.position === "fixed" && (s = null), (r ? !l && !s : !l && n.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || lt(o) && !l && ge(h, o)) ? i = i.filter((d) => d !== o) : s = n, o = $(o);
5666
5666
  }
5667
- return t.set(l, i), i;
5667
+ return t.set(h, i), i;
5668
5668
  }
5669
- function zi(l) {
5669
+ function zi(h) {
5670
5670
  let {
5671
5671
  element: t,
5672
5672
  boundary: e,
5673
5673
  rootBoundary: i,
5674
5674
  strategy: s
5675
- } = l;
5676
- const o = [...e === "clippingAncestors" ? wt(t) ? [] : Pi(t, this._c) : [].concat(e), i], n = o[0], h = o.reduce((c, d) => {
5675
+ } = h;
5676
+ const o = [...e === "clippingAncestors" ? wt(t) ? [] : Pi(t, this._c) : [].concat(e), i], n = o[0], l = o.reduce((c, d) => {
5677
5677
  const f = Gt(t, d, s);
5678
5678
  return c.top = U(f.top, c.top), c.right = rt(f.right, c.right), c.bottom = rt(f.bottom, c.bottom), c.left = U(f.left, c.left), c;
5679
5679
  }, Gt(t, n, s));
5680
5680
  return {
5681
- width: h.right - h.left,
5682
- height: h.bottom - h.top,
5683
- x: h.left,
5684
- y: h.top
5681
+ width: l.right - l.left,
5682
+ height: l.bottom - l.top,
5683
+ x: l.left,
5684
+ y: l.top
5685
5685
  };
5686
5686
  }
5687
- function $i(l) {
5687
+ function $i(h) {
5688
5688
  const {
5689
5689
  width: t,
5690
5690
  height: e
5691
- } = fe(l);
5691
+ } = fe(h);
5692
5692
  return {
5693
5693
  width: t,
5694
5694
  height: e
5695
5695
  };
5696
5696
  }
5697
- function qi(l, t, e) {
5698
- const i = K(t), s = V(t), r = e === "fixed", o = ot(l, !0, r, t);
5697
+ function qi(h, t, e) {
5698
+ const i = K(t), s = V(t), r = e === "fixed", o = ot(h, !0, r, t);
5699
5699
  let n = {
5700
5700
  scrollLeft: 0,
5701
5701
  scrollTop: 0
5702
5702
  };
5703
- const h = z(0);
5703
+ const l = z(0);
5704
5704
  if (i || !i && !r)
5705
- if ((tt(t) !== "body" || ht(s)) && (n = pt(t)), i) {
5705
+ if ((tt(t) !== "body" || lt(s)) && (n = pt(t)), i) {
5706
5706
  const g = ot(t, !0, r, t);
5707
- h.x = g.x + t.clientLeft, h.y = g.y + t.clientTop;
5708
- } else s && (h.x = Tt(s));
5707
+ l.x = g.x + t.clientLeft, l.y = g.y + t.clientTop;
5708
+ } else s && (l.x = Tt(s));
5709
5709
  let c = 0, d = 0;
5710
5710
  if (s && !i && !r) {
5711
5711
  const g = s.getBoundingClientRect();
5712
5712
  d = g.top + n.scrollTop, c = g.left + n.scrollLeft - // RTL <body> scrollbar.
5713
5713
  Tt(s, g);
5714
5714
  }
5715
- const f = o.left + n.scrollLeft - h.x - c, x = o.top + n.scrollTop - h.y - d;
5715
+ const f = o.left + n.scrollLeft - l.x - c, x = o.top + n.scrollTop - l.y - d;
5716
5716
  return {
5717
5717
  x: f,
5718
5718
  y: x,
@@ -5720,23 +5720,23 @@ function qi(l, t, e) {
5720
5720
  height: o.height
5721
5721
  };
5722
5722
  }
5723
- function yt(l) {
5724
- return F(l).position === "static";
5723
+ function yt(h) {
5724
+ return F(h).position === "static";
5725
5725
  }
5726
- function jt(l, t) {
5727
- if (!K(l) || F(l).position === "fixed")
5726
+ function jt(h, t) {
5727
+ if (!K(h) || F(h).position === "fixed")
5728
5728
  return null;
5729
5729
  if (t)
5730
- return t(l);
5731
- let e = l.offsetParent;
5732
- return V(l) === e && (e = e.ownerDocument.body), e;
5730
+ return t(h);
5731
+ let e = h.offsetParent;
5732
+ return V(h) === e && (e = e.ownerDocument.body), e;
5733
5733
  }
5734
- function we(l, t) {
5735
- const e = X(l);
5736
- if (wt(l))
5734
+ function we(h, t) {
5735
+ const e = X(h);
5736
+ if (wt(h))
5737
5737
  return e;
5738
- if (!K(l)) {
5739
- let s = $(l);
5738
+ if (!K(h)) {
5739
+ let s = $(h);
5740
5740
  for (; s && !Q(s); ) {
5741
5741
  if (B(s) && !yt(s))
5742
5742
  return s;
@@ -5744,15 +5744,15 @@ function we(l, t) {
5744
5744
  }
5745
5745
  return e;
5746
5746
  }
5747
- let i = jt(l, t);
5747
+ let i = jt(h, t);
5748
5748
  for (; i && Xi(i) && yt(i); )
5749
5749
  i = jt(i, t);
5750
- return i && Q(i) && yt(i) && !Dt(i) ? e : i || Bi(l) || e;
5750
+ return i && Q(i) && yt(i) && !Dt(i) ? e : i || Bi(h) || e;
5751
5751
  }
5752
- const Gi = async function(l) {
5753
- const t = this.getOffsetParent || we, e = this.getDimensions, i = await e(l.floating);
5752
+ const Gi = async function(h) {
5753
+ const t = this.getOffsetParent || we, e = this.getDimensions, i = await e(h.floating);
5754
5754
  return {
5755
- reference: qi(l.reference, await t(l.floating), l.strategy),
5755
+ reference: qi(h.reference, await t(h.floating), h.strategy),
5756
5756
  floating: {
5757
5757
  x: 0,
5758
5758
  y: 0,
@@ -5761,8 +5761,8 @@ const Gi = async function(l) {
5761
5761
  }
5762
5762
  };
5763
5763
  };
5764
- function ji(l) {
5765
- return F(l).direction === "rtl";
5764
+ function ji(h) {
5765
+ return F(h).direction === "rtl";
5766
5766
  }
5767
5767
  const Ui = {
5768
5768
  convertOffsetParentRelativeRectToViewportRelativeRect: ki,
@@ -5775,7 +5775,7 @@ const Ui = {
5775
5775
  getScale: Z,
5776
5776
  isElement: B,
5777
5777
  isRTL: ji
5778
- }, pe = Hi, me = Di, ye = Ai, Zi = Ti, Ee = (l, t, e) => {
5778
+ }, pe = Hi, me = Di, ye = Ai, Zi = Ti, Ee = (h, t, e) => {
5779
5779
  const i = /* @__PURE__ */ new Map(), s = {
5780
5780
  platform: Ui,
5781
5781
  ...e
@@ -5783,7 +5783,7 @@ const Ui = {
5783
5783
  ...s.platform,
5784
5784
  _c: i
5785
5785
  };
5786
- return Si(l, t, {
5786
+ return Si(h, t, {
5787
5787
  ...s,
5788
5788
  platform: r
5789
5789
  });
@@ -5809,7 +5809,7 @@ let Ji = class {
5809
5809
  borderRadius: "4px",
5810
5810
  fontSize: "12px",
5811
5811
  ...r
5812
- }, h = {
5812
+ }, l = {
5813
5813
  position: "absolute",
5814
5814
  width: "10px",
5815
5815
  height: "10px",
@@ -5818,7 +5818,7 @@ let Ji = class {
5818
5818
  transform: "rotate(45deg)",
5819
5819
  zIndex: n.zIndex
5820
5820
  };
5821
- Object.assign(this.arrowEl.style, h), Object.assign(this.floatingEl.style, n), this.floatingEl.appendChild(this.contentEl), this.floatingEl.appendChild(this.arrowEl), this.ctx.containerElement.appendChild(this.floatingEl), this.init();
5821
+ Object.assign(this.arrowEl.style, l), Object.assign(this.floatingEl.style, n), this.floatingEl.appendChild(this.contentEl), this.floatingEl.appendChild(this.arrowEl), this.ctx.containerElement.appendChild(this.floatingEl), this.init();
5822
5822
  }
5823
5823
  init() {
5824
5824
  this.ctx.on("mousemove", (t) => {
@@ -5862,10 +5862,10 @@ let Ji = class {
5862
5862
  placement: t.overflowTooltipPlacement,
5863
5863
  middleware: [me(), ye(), pe(6), Zi({ element: this.arrowEl })]
5864
5864
  }).then((n) => {
5865
- const { x: h, y: c, placement: d, middlewareData: f } = n;
5865
+ const { x: l, y: c, placement: d, middlewareData: f } = n;
5866
5866
  if (Object.assign(this.floatingEl.style, {
5867
5867
  top: `${c}px`,
5868
- left: `${h}px`
5868
+ left: `${l}px`
5869
5869
  }), f.arrow) {
5870
5870
  const x = f.arrow;
5871
5871
  ["left", "left-start", "left-end"].includes(d) ? Object.assign(this.arrowEl.style, {
@@ -5930,15 +5930,15 @@ class Qi {
5930
5930
  return;
5931
5931
  if (t.code === "Escape" && this.ctx.editing) {
5932
5932
  this.cancel = !0;
5933
- const { focusCell: h } = this.ctx;
5934
- h && (this.ctx.emit("setSelectorCell", h), this.cellTarget = h), this.doneEdit();
5933
+ const { focusCell: l } = this.ctx;
5934
+ l && (this.ctx.emit("setSelectorCell", l), this.cellTarget = l), this.doneEdit();
5935
5935
  return;
5936
5936
  }
5937
5937
  if ((t.altKey || t.metaKey) && t.code === "Enter" && this.ctx.editing && this.inputEl) {
5938
5938
  t.preventDefault();
5939
- const h = this.inputEl.selectionStart, c = this.inputEl.value.substring(0, h), d = this.inputEl.value.substring(h);
5939
+ const l = this.inputEl.selectionStart, c = this.inputEl.value.substring(0, l), d = this.inputEl.value.substring(l);
5940
5940
  this.inputEl.value = c + `
5941
- ` + d, this.inputEl.selectionStart = this.inputEl.selectionEnd = h + 1, this.autoSize();
5941
+ ` + d, this.inputEl.selectionStart = this.inputEl.selectionEnd = l + 1, this.autoSize();
5942
5942
  return;
5943
5943
  }
5944
5944
  if (t.code === "Tab" && this.ctx.editing) {
@@ -6018,8 +6018,8 @@ class Qi {
6018
6018
  });
6019
6019
  }
6020
6020
  isInSelectorRange(t, e) {
6021
- const { xArr: i, yArr: s } = this.ctx.selector, [r, o] = i, [n, h] = s;
6022
- return !(e < r || e > o || t < n || t > h);
6021
+ const { xArr: i, yArr: s } = this.ctx.selector, [r, o] = i, [n, l] = s;
6022
+ return !(e < r || e > o || t < n || t > l);
6023
6023
  }
6024
6024
  initTextEditor() {
6025
6025
  this.inputEl = document.createElement("textarea"), this.inputEl.setAttribute("rows", "1"), this.inputEl.addEventListener("input", this.autoSize.bind(this)), this.inputEl.addEventListener("blur", () => {
@@ -6041,8 +6041,8 @@ class Qi {
6041
6041
  startEditByInput(t, e = !1) {
6042
6042
  const i = e ? null : t.getValue(), { editorType: s } = t;
6043
6043
  t.update(), this.ctx.config.ENABLE_MERGE_CELL_LINK && t.updateSpanInfo();
6044
- let { height: r, width: o, drawY: n, drawX: h } = t;
6045
- this.drawX = h, this.drawY = n;
6044
+ let { height: r, width: o, drawY: n, drawX: l } = t;
6045
+ this.drawX = l, this.drawY = n;
6046
6046
  const {
6047
6047
  config: { CELL_PADDING: c },
6048
6048
  header: d
@@ -6073,8 +6073,8 @@ class Qi {
6073
6073
  const { rowKey: r, key: o, editorType: n } = i;
6074
6074
  if (n === "none")
6075
6075
  return;
6076
- const h = this.ctx.database.getReadonly(r, o);
6077
- i && !h && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = i, this.startEditByInput(this.cellTarget, t), this.ctx.emit("startEdit", this.cellTarget));
6076
+ const l = this.ctx.database.getReadonly(r, o);
6077
+ i && !l && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = i, this.startEditByInput(this.cellTarget, t), this.ctx.emit("startEdit", this.cellTarget));
6078
6078
  }
6079
6079
  editCell(t, e) {
6080
6080
  const i = this.ctx.body.renderRows.find((c) => c.rowIndex === t);
@@ -6087,8 +6087,8 @@ class Qi {
6087
6087
  const r = this.ctx.focusCell;
6088
6088
  if (!r || ["index", "index-selection", "selection"].includes(r.type) || this.enable)
6089
6089
  return;
6090
- const { rowKey: o, key: n } = r, h = this.ctx.database.getReadonly(o, n);
6091
- r && !h && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = r, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget));
6090
+ const { rowKey: o, key: n } = r, l = this.ctx.database.getReadonly(o, n);
6091
+ r && !l && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = r, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget));
6092
6092
  }
6093
6093
  doneEdit() {
6094
6094
  this.enable && (this.doneEditByInput(), this.ctx.emit("doneEdit", this.cellTarget), this.enable = !1, this.ctx.editing = !1, this.ctx.containerElement.focus({ preventScroll: !0 }), this.editorEl.style.display = "none", this.ctx.emit("drawView"));
@@ -6108,13 +6108,13 @@ class ts {
6108
6108
  this.ctx = t;
6109
6109
  const { EMPTY_TEXT: e, EMPTY_CUSTOM_STYLE: i } = this.ctx.config;
6110
6110
  this.ctx.emptyElement ? this.emptyEl = this.ctx.emptyElement : (this.emptyEl = document.createElement("div"), this.emptyEl.innerText = e), this.emptyEl.className = "e-virt-table-empty", this.emptyEl.style.display = "none", this.ctx.containerElement.appendChild(this.emptyEl), this.ctx.on("emptyChange", ({ type: s, headerHeight: r, bodyHeight: o, footerHeight: n }) => {
6111
- const h = r + (o + n) / 2, c = {
6111
+ const l = r + (o + n) / 2, c = {
6112
6112
  display: s === "empty" ? "block" : "none",
6113
6113
  position: "absolute",
6114
6114
  fontSize: "14px",
6115
6115
  color: "#666",
6116
6116
  left: "50%",
6117
- top: `${h}px`,
6117
+ top: `${l}px`,
6118
6118
  transform: "translate(-50%, -50%)",
6119
6119
  ...i
6120
6120
  };
@@ -6154,9 +6154,9 @@ class es {
6154
6154
  fixedRightWidth: e,
6155
6155
  config: { SCROLLER_TRACK_SIZE: i, CSS_PREFIX: s }
6156
6156
  } = this.ctx, { visibleWidth: r, visibleHeight: o, renderCellHeaders: n } = this.ctx.header;
6157
- let h = [], c = [], d = [];
6157
+ let l = [], c = [], d = [];
6158
6158
  n.forEach((w) => {
6159
- w.render && (w.fixed === "left" ? c.push(w) : w.fixed === "right" ? d.push(w) : h.push(w));
6159
+ w.render && (w.fixed === "left" ? c.push(w) : w.fixed === "right" ? d.push(w) : l.push(w));
6160
6160
  });
6161
6161
  const f = e - i, x = {
6162
6162
  key: "left",
@@ -6179,7 +6179,7 @@ class es {
6179
6179
  width: `${r - t - f + 1}px`,
6180
6180
  height: `${o}px`
6181
6181
  },
6182
- cells: h
6182
+ cells: l
6183
6183
  }, p = {
6184
6184
  key: "right",
6185
6185
  style: {
@@ -6215,7 +6215,7 @@ class es {
6215
6215
  const {
6216
6216
  fixedLeftWidth: r,
6217
6217
  fixedRightWidth: o,
6218
- config: { SCROLLER_TRACK_SIZE: n, CSS_PREFIX: h }
6218
+ config: { SCROLLER_TRACK_SIZE: n, CSS_PREFIX: l }
6219
6219
  } = this.ctx, { visibleWidth: c, visibleHeight: d } = this.ctx.body, f = o - n, x = {
6220
6220
  key: "left",
6221
6221
  style: {
@@ -6252,7 +6252,7 @@ class es {
6252
6252
  };
6253
6253
  return {
6254
6254
  type: "body",
6255
- class: `${h}-overlayer-body`,
6255
+ class: `${l}-overlayer-body`,
6256
6256
  style: {
6257
6257
  position: "relative",
6258
6258
  overflow: "hidden",
@@ -6273,7 +6273,7 @@ class es {
6273
6273
  fixedLeftWidth: s,
6274
6274
  fixedRightWidth: r,
6275
6275
  config: { SCROLLER_TRACK_SIZE: o, CSS_PREFIX: n }
6276
- } = this.ctx, { visibleWidth: h, visibleHeight: c } = this.ctx.footer, d = r - o, f = {
6276
+ } = this.ctx, { visibleWidth: l, visibleHeight: c } = this.ctx.footer, d = r - o, f = {
6277
6277
  key: "left",
6278
6278
  style: {
6279
6279
  position: "absolute",
@@ -6291,7 +6291,7 @@ class es {
6291
6291
  top: `${0.5}px`,
6292
6292
  left: `${s - 0.5}px`,
6293
6293
  overflow: "hidden",
6294
- width: `${h - s - d}px`,
6294
+ width: `${l - s - d}px`,
6295
6295
  height: `${c}px`
6296
6296
  },
6297
6297
  cells: t
@@ -6313,7 +6313,7 @@ class es {
6313
6313
  style: {
6314
6314
  position: "relative",
6315
6315
  overflow: "hidden",
6316
- width: `${h}px`,
6316
+ width: `${l}px`,
6317
6317
  height: `${c}px`
6318
6318
  },
6319
6319
  views: [f, x, g]
@@ -6331,8 +6331,8 @@ class is {
6331
6331
  this.ctx.on("cellContextMenuClick", (t, e) => {
6332
6332
  if (!this.ctx.config.ENABLE_CONTEXT_MENU) return;
6333
6333
  e.preventDefault();
6334
- const { xArr: i, yArr: s } = this.ctx.selector, [r, o] = i, [n, h] = s, { rowIndex: c, colIndex: d } = t;
6335
- c >= n && c <= h && d >= r && d <= o || this.ctx.emit("setSelectorCell", t, e);
6334
+ const { xArr: i, yArr: s } = this.ctx.selector, [r, o] = i, [n, l] = s, { rowIndex: c, colIndex: d } = t;
6335
+ c >= n && c <= l && d >= r && d <= o || this.ctx.emit("setSelectorCell", t, e);
6336
6336
  const x = {
6337
6337
  getBoundingClientRect: () => ({
6338
6338
  width: 0,
@@ -6437,16 +6437,16 @@ class os {
6437
6437
  }
6438
6438
  createContainer(t, e, i, s, r) {
6439
6439
  t.className = "e-virt-table-container";
6440
- const o = document.createElement("div"), n = document.createElement("canvas"), h = e || document.createElement("div");
6441
- o.className = "e-virt-table-stage", t.tabIndex = 0, n.className = "e-virt-table-canvas", h.className = "e-virt-table-overlayer";
6440
+ const o = document.createElement("div"), n = document.createElement("canvas"), l = e || document.createElement("div");
6441
+ o.className = "e-virt-table-stage", t.tabIndex = 0, n.className = "e-virt-table-canvas", l.className = "e-virt-table-overlayer";
6442
6442
  const c = i || document.createElement("div");
6443
6443
  c.className = "e-virt-table-editor";
6444
6444
  const d = s, f = r;
6445
- return o.appendChild(n), o.appendChild(h), t.appendChild(o), {
6445
+ return o.appendChild(n), o.appendChild(l), t.appendChild(o), {
6446
6446
  containerElement: t,
6447
6447
  stageElement: o,
6448
6448
  canvasElement: n,
6449
- overlayerElement: h,
6449
+ overlayerElement: l,
6450
6450
  editorElement: c,
6451
6451
  emptyElement: d,
6452
6452
  contextMenuElement: f
@@ -6464,7 +6464,7 @@ class os {
6464
6464
  this.editor.doneEdit(), this.ctx.database.setColumns(t), this.header.init(), this.ctx.emit("draw");
6465
6465
  }
6466
6466
  loadData(t) {
6467
- this.editor.doneEdit(), this.ctx.database.setData(t), this.header.init(), this.ctx.emit("draw");
6467
+ this.editor.doneEdit(), this.ctx.database.setData(t), this.header.init(), this.tooltip.hide(), this.ctx.emit("draw");
6468
6468
  }
6469
6469
  loadFooterData(t) {
6470
6470
  this.ctx.database.setFooterData(t), this.ctx.emit("draw");
@@ -6530,15 +6530,15 @@ class os {
6530
6530
  return new Promise(async (i, s) => {
6531
6531
  let r = [];
6532
6532
  for (let o = 0; o < t.length; o++) {
6533
- const { rowKey: n, key: h } = t[o], c = await this.ctx.database.getValidator(n, h);
6533
+ const { rowKey: n, key: l } = t[o], c = await this.ctx.database.getValidator(n, l);
6534
6534
  Array.isArray(c) && c.length && r.push(c);
6535
6535
  }
6536
6536
  if (r.length) {
6537
6537
  if (s(r), e) {
6538
6538
  const [o] = r;
6539
6539
  if (Array.isArray(o) && o.length) {
6540
- const [n] = o, { rowKey: h, key: c } = n;
6541
- this.scrollToRowkey(h), this.scrollToColkey(c);
6540
+ const [n] = o, { rowKey: l, key: c } = n;
6541
+ this.scrollToRowkey(l), this.scrollToColkey(c);
6542
6542
  }
6543
6543
  }
6544
6544
  this.ctx.emit("draw");
@@ -6555,8 +6555,8 @@ class os {
6555
6555
  if (t && Array.isArray(s) && s.length) {
6556
6556
  const [r] = s;
6557
6557
  if (Array.isArray(r) && r.length) {
6558
- const [o] = r, { rowKey: n, key: h } = o;
6559
- this.scrollToRowkey(n), this.scrollToColkey(h);
6558
+ const [o] = r, { rowKey: n, key: l } = o;
6559
+ this.scrollToRowkey(n), this.scrollToColkey(l);
6560
6560
  }
6561
6561
  }
6562
6562
  i(s);
@@ -6581,7 +6581,7 @@ class os {
6581
6581
  let r = [];
6582
6582
  for (let o = 0; o < i.length; o++)
6583
6583
  for (let n = 0; n < s.length; n++) {
6584
- const h = this.ctx.database.getRowKeyByItem(i[o]), d = s[n].key, f = await this.ctx.database.getValidator(h, d);
6584
+ const l = this.ctx.database.getRowKeyByItem(i[o]), d = s[n].key, f = await this.ctx.database.getValidator(l, d);
6585
6585
  Array.isArray(f) && f.length && r.push(f);
6586
6586
  }
6587
6587
  r.length ? (e(r), this.ctx.emit("draw")) : (t([]), this.ctx.emit("draw"));