e-virt-table 1.1.8 → 1.2.0

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,18 +1,18 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(":root{--e-virt-table-color-white: #fff;--e-virt-table-color-black: #000000;--e-virt-table-color-primary: rgb(82, 146, 247);--e-virt-table-text-color-primary: #333;--e-virt-table-text-color-regular: #666;--e-virt-table-text-color-secondary: #999;--e-virt-table-box-shadow: 0 2px 12px 0 #0000001a;--e-virt-table-editor-bg-color: #fff;--e-virt-table-border-color: #e1e6eb}.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(--e-virt-table-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(--e-virt-table-editor-bg-color);border:2px solid var(--e-virt-table-color-primary);box-sizing:border-box;box-shadow:var(--e-virt-table-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(--e-virt-table-color-white);overflow-y:auto;resize:none}.e-virt-table-context-menu{position:absolute;font-size:14px;color:var(--e-virt-table-text-color-regular);background-color:var(--e-virt-table-color-white);border-radius:4px;border:1px solid #e4e7ed;box-shadow:var(--e-virt-table-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(--e-virt-table-text-color-regular)}.e-virt-table-context-menu-item:hover{color:var(--e-virt-table-color-primary);background-color:#f5f7fa}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- var Ce = Object.defineProperty;
3
- var be = (a, t, e) => t in a ? Ce(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
4
- var l = (a, t, e) => be(a, typeof t != "symbol" ? t + "" : t, e);
5
- function G() {
6
- return G = Object.assign ? Object.assign.bind() : function(a) {
2
+ var be = Object.defineProperty;
3
+ var ve = (a, t, e) => t in a ? be(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
4
+ var l = (a, t, e) => ve(a, typeof t != "symbol" ? t + "" : t, e);
5
+ function q() {
6
+ return q = Object.assign ? Object.assign.bind() : function(a) {
7
7
  for (var t = 1; t < arguments.length; t++) {
8
8
  var e = arguments[t];
9
9
  for (var i in e)
10
10
  Object.prototype.hasOwnProperty.call(e, i) && (a[i] = e[i]);
11
11
  }
12
12
  return a;
13
- }, G.apply(this, arguments);
13
+ }, q.apply(this, arguments);
14
14
  }
15
- function ve(a, t) {
15
+ function Re(a, t) {
16
16
  a.prototype = Object.create(t.prototype), a.prototype.constructor = a, st(a, t);
17
17
  }
18
18
  function Et(a) {
@@ -25,7 +25,7 @@ function st(a, t) {
25
25
  return i.__proto__ = s, i;
26
26
  }, st(a, t);
27
27
  }
28
- function Re() {
28
+ function Ie() {
29
29
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
30
30
  if (typeof Proxy == "function") return !0;
31
31
  try {
@@ -36,20 +36,20 @@ function Re() {
36
36
  }
37
37
  }
38
38
  function dt(a, t, e) {
39
- return Re() ? dt = Reflect.construct.bind() : dt = function(s, r, o) {
39
+ return Ie() ? dt = Reflect.construct.bind() : dt = function(s, r, o) {
40
40
  var n = [null];
41
41
  n.push.apply(n, r);
42
42
  var h = Function.bind.apply(s, n), c = new h();
43
43
  return o && st(c, o.prototype), c;
44
44
  }, dt.apply(null, arguments);
45
45
  }
46
- function Ie(a) {
46
+ function _e(a) {
47
47
  return Function.toString.call(a).indexOf("[native code]") !== -1;
48
48
  }
49
49
  function Ct(a) {
50
50
  var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
51
51
  return Ct = function(i) {
52
- if (i === null || !Ie(i)) return i;
52
+ if (i === null || !_e(i)) return i;
53
53
  if (typeof i != "function")
54
54
  throw new TypeError("Super expression must either be null or a function");
55
55
  if (typeof t < "u") {
@@ -69,9 +69,9 @@ function Ct(a) {
69
69
  }), st(s, i);
70
70
  }, Ct(a);
71
71
  }
72
- var _e = /%[sdj%]/g, jt = function() {
72
+ var Oe = /%[sdj%]/g, Ut = function() {
73
73
  };
74
- typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (jt = function(t, e) {
74
+ typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (Ut = function(t, e) {
75
75
  typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && e.every(function(i) {
76
76
  return typeof i == "string";
77
77
  }) && console.warn(t, e);
@@ -91,7 +91,7 @@ function D(a) {
91
91
  if (typeof a == "function")
92
92
  return a.apply(null, e);
93
93
  if (typeof a == "string") {
94
- var o = a.replace(_e, function(n) {
94
+ var o = a.replace(Oe, function(n) {
95
95
  if (n === "%%")
96
96
  return "%";
97
97
  if (s >= r)
@@ -116,13 +116,13 @@ function D(a) {
116
116
  }
117
117
  return a;
118
118
  }
119
- function Oe(a) {
119
+ function Se(a) {
120
120
  return a === "string" || a === "url" || a === "hex" || a === "email" || a === "date" || a === "pattern";
121
121
  }
122
122
  function H(a, t) {
123
- return !!(a == null || t === "array" && Array.isArray(a) && !a.length || Oe(t) && typeof a == "string" && !a);
123
+ return !!(a == null || t === "array" && Array.isArray(a) && !a.length || Se(t) && typeof a == "string" && !a);
124
124
  }
125
- function Se(a, t, e) {
125
+ function Le(a, t, e) {
126
126
  var i = [], s = 0, r = a.length;
127
127
  function o(n) {
128
128
  i.push.apply(i, n || []), s++, s === r && e(i);
@@ -143,26 +143,26 @@ function Xt(a, t, e) {
143
143
  }
144
144
  r([]);
145
145
  }
146
- function Le(a) {
146
+ function Ae(a) {
147
147
  var t = [];
148
148
  return Object.keys(a).forEach(function(e) {
149
149
  t.push.apply(t, a[e] || []);
150
150
  }), t;
151
151
  }
152
- var kt = /* @__PURE__ */ function(a) {
153
- ve(t, a);
152
+ var Ft = /* @__PURE__ */ function(a) {
153
+ Re(t, a);
154
154
  function t(e, i) {
155
155
  var s;
156
156
  return s = a.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(a, t, e, i, s) {
160
+ function Te(a, t, e, i, s) {
161
161
  if (t.first) {
162
162
  var r = new Promise(function(x, g) {
163
163
  var p = function(y) {
164
- return i(y), y.length ? g(new kt(y, bt(y))) : x(s);
165
- }, u = Le(a);
164
+ return i(y), y.length ? g(new Ft(y, bt(y))) : x(s);
165
+ }, u = Ae(a);
166
166
  Xt(u, e, p);
167
167
  });
168
168
  return r.catch(function(x) {
@@ -172,21 +172,21 @@ function Ae(a, t, e, i, s) {
172
172
  var o = t.firstFields === !0 ? Object.keys(a) : t.firstFields || [], n = Object.keys(a), h = n.length, c = 0, d = [], f = new Promise(function(x, g) {
173
173
  var p = function(w) {
174
174
  if (d.push.apply(d, w), c++, c === h)
175
- return i(d), d.length ? g(new kt(d, bt(d))) : x(s);
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
178
  var w = a[u];
179
- o.indexOf(u) !== -1 ? Xt(w, e, p) : Se(w, e, p);
179
+ o.indexOf(u) !== -1 ? Xt(w, e, p) : Le(w, e, p);
180
180
  });
181
181
  });
182
182
  return f.catch(function(x) {
183
183
  return x;
184
184
  }), f;
185
185
  }
186
- function Te(a) {
186
+ function Me(a) {
187
187
  return !!(a && a.message !== void 0);
188
188
  }
189
- function Me(a, t) {
189
+ function He(a, t) {
190
190
  for (var e = a, i = 0; i < t.length; i++) {
191
191
  if (e == null)
192
192
  return e;
@@ -194,31 +194,31 @@ function Me(a, t) {
194
194
  }
195
195
  return e;
196
196
  }
197
- function Nt(a, t) {
197
+ function Bt(a, t) {
198
198
  return function(e) {
199
199
  var i;
200
- return a.fullFields ? i = Me(t, a.fullFields) : i = t[e.field || a.fullField], Te(e) ? (e.field = e.field || a.fullField, e.fieldValue = i, e) : {
200
+ return a.fullFields ? i = He(t, a.fullFields) : i = t[e.field || a.fullField], Me(e) ? (e.field = e.field || a.fullField, e.fieldValue = i, e) : {
201
201
  message: typeof e == "function" ? e() : e,
202
202
  fieldValue: i,
203
203
  field: e.field || a.fullField
204
204
  };
205
205
  };
206
206
  }
207
- function Bt(a, t) {
207
+ function kt(a, 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 a[e] == "object" ? a[e] = G({}, a[e], i) : a[e] = i;
212
+ typeof i == "object" && typeof a[e] == "object" ? a[e] = q({}, a[e], i) : a[e] = i;
213
213
  }
214
214
  }
215
215
  return a;
216
216
  }
217
- var Ut = function(t, e, i, s, r, o) {
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));
219
- }, He = function(t, e, i, s, r) {
219
+ }, De = function(t, e, i, s, r) {
220
220
  (/^\s+$/.test(e) || e === "") && s.push(D(r.messages.whitespace, t.fullField));
221
- }, ct, De = function() {
221
+ }, ct, Ne = function() {
222
222
  if (ct)
223
223
  return ct;
224
224
  var a = "[a-fA-F\\d:]", t = function(C) {
@@ -287,26 +287,26 @@ var Ut = function(t, e, i, s, r, o) {
287
287
  return typeof t == "string" && t.length <= 320 && !!t.match(Kt.email);
288
288
  },
289
289
  url: function(t) {
290
- return typeof t == "string" && t.length <= 2048 && !!t.match(De());
290
+ return typeof t == "string" && t.length <= 2048 && !!t.match(Ne());
291
291
  },
292
292
  hex: function(t) {
293
293
  return typeof t == "string" && !!t.match(Kt.hex);
294
294
  }
295
- }, Fe = function(t, e, i, s, r) {
295
+ }, Xe = function(t, e, i, s, r) {
296
296
  if (t.required && e === void 0) {
297
- Ut(t, e, i, s, r);
297
+ Zt(t, e, i, s, r);
298
298
  return;
299
299
  }
300
300
  var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], n = t.type;
301
301
  o.indexOf(n) > -1 ? et[n](e) || s.push(D(r.messages.types[n], t.fullField, t.type)) : n && typeof e !== t.type && s.push(D(r.messages.types[n], t.fullField, t.type));
302
- }, Xe = function(t, e, i, s, r) {
302
+ }, Fe = function(t, e, i, s, r) {
303
303
  var o = typeof t.len == "number", n = typeof t.min == "number", h = typeof t.max == "number", c = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, d = e, f = null, x = typeof e == "number", g = typeof e == "string", p = Array.isArray(e);
304
304
  if (x ? f = "number" : g ? f = "string" : p && (f = "array"), !f)
305
305
  return !1;
306
306
  p && (d = e.length), g && (d = e.replace(c, "_").length), o ? d !== t.len && s.push(D(r.messages[f].len, t.fullField, t.len)) : n && !h && d < t.min ? s.push(D(r.messages[f].min, t.fullField, t.min)) : h && !n && d > t.max ? s.push(D(r.messages[f].max, t.fullField, t.max)) : n && h && (d < t.min || d > t.max) && s.push(D(r.messages[f].range, t.fullField, t.min, t.max));
307
- }, j = "enum", ke = function(t, e, i, s, r) {
307
+ }, j = "enum", Be = 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
- }, Ne = function(t, e, i, s, r) {
309
+ }, ke = function(t, e, i, s, r) {
310
310
  if (t.pattern) {
311
311
  if (t.pattern instanceof RegExp)
312
312
  t.pattern.lastIndex = 0, t.pattern.test(e) || s.push(D(r.messages.pattern.mismatch, t.fullField, e, t.pattern));
@@ -316,13 +316,13 @@ var Ut = function(t, e, i, s, r, o) {
316
316
  }
317
317
  }
318
318
  }, _ = {
319
- required: Ut,
320
- whitespace: He,
321
- type: Fe,
322
- range: Xe,
323
- enum: ke,
324
- pattern: Ne
325
- }, Be = function(t, e, i, s, r) {
319
+ required: Zt,
320
+ whitespace: De,
321
+ type: Xe,
322
+ range: Fe,
323
+ enum: Be,
324
+ pattern: ke
325
+ }, Ke = function(t, e, i, s, r) {
326
326
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
327
327
  if (n) {
328
328
  if (H(e, "string") && !t.required)
@@ -330,7 +330,7 @@ var Ut = function(t, e, i, s, r, o) {
330
330
  _.required(t, e, s, o, r, "string"), H(e, "string") || (_.type(t, e, s, o, r), _.range(t, e, s, o, r), _.pattern(t, e, s, o, r), t.whitespace === !0 && _.whitespace(t, e, s, o, r));
331
331
  }
332
332
  i(o);
333
- }, Ke = function(t, e, i, s, r) {
333
+ }, Ye = function(t, e, i, s, r) {
334
334
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
335
335
  if (n) {
336
336
  if (H(e) && !t.required)
@@ -338,7 +338,7 @@ var Ut = function(t, e, i, s, r, o) {
338
338
  _.required(t, e, s, o, r), e !== void 0 && _.type(t, e, s, o, r);
339
339
  }
340
340
  i(o);
341
- }, Ye = function(t, e, i, s, r) {
341
+ }, Ve = function(t, e, i, s, r) {
342
342
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
343
343
  if (n) {
344
344
  if (e === "" && (e = void 0), H(e) && !t.required)
@@ -346,7 +346,7 @@ var Ut = function(t, e, i, s, r, o) {
346
346
  _.required(t, e, s, o, r), e !== void 0 && (_.type(t, e, s, o, r), _.range(t, e, s, o, r));
347
347
  }
348
348
  i(o);
349
- }, Ve = function(t, e, i, s, r) {
349
+ }, We = function(t, e, i, s, r) {
350
350
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
351
351
  if (n) {
352
352
  if (H(e) && !t.required)
@@ -354,7 +354,7 @@ var Ut = function(t, e, i, s, r, o) {
354
354
  _.required(t, e, s, o, r), e !== void 0 && _.type(t, e, s, o, r);
355
355
  }
356
356
  i(o);
357
- }, We = function(t, e, i, s, r) {
357
+ }, Pe = function(t, e, i, s, r) {
358
358
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
359
359
  if (n) {
360
360
  if (H(e) && !t.required)
@@ -362,7 +362,7 @@ var Ut = function(t, e, i, s, r, o) {
362
362
  _.required(t, e, s, o, r), H(e) || _.type(t, e, s, o, r);
363
363
  }
364
364
  i(o);
365
- }, Pe = function(t, e, i, s, r) {
365
+ }, ze = function(t, e, i, s, r) {
366
366
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
367
367
  if (n) {
368
368
  if (H(e) && !t.required)
@@ -370,7 +370,7 @@ var Ut = function(t, e, i, s, r, o) {
370
370
  _.required(t, e, s, o, r), e !== void 0 && (_.type(t, e, s, o, r), _.range(t, e, s, o, r));
371
371
  }
372
372
  i(o);
373
- }, ze = function(t, e, i, s, r) {
373
+ }, $e = function(t, e, i, s, r) {
374
374
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
375
375
  if (n) {
376
376
  if (H(e) && !t.required)
@@ -378,7 +378,7 @@ var Ut = function(t, e, i, s, r, o) {
378
378
  _.required(t, e, s, o, r), e !== void 0 && (_.type(t, e, s, o, r), _.range(t, e, s, o, r));
379
379
  }
380
380
  i(o);
381
- }, $e = function(t, e, i, s, r) {
381
+ }, qe = function(t, e, i, s, r) {
382
382
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
383
383
  if (n) {
384
384
  if (e == null && !t.required)
@@ -394,15 +394,15 @@ var Ut = function(t, e, i, s, r, o) {
394
394
  _.required(t, e, s, o, r), e !== void 0 && _.type(t, e, s, o, r);
395
395
  }
396
396
  i(o);
397
- }, qe = "enum", je = function(t, e, i, s, r) {
397
+ }, je = "enum", Ue = function(t, e, i, s, r) {
398
398
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
399
399
  if (n) {
400
400
  if (H(e) && !t.required)
401
401
  return i();
402
- _.required(t, e, s, o, r), e !== void 0 && _[qe](t, e, s, o, r);
402
+ _.required(t, e, s, o, r), e !== void 0 && _[je](t, e, s, o, r);
403
403
  }
404
404
  i(o);
405
- }, Ue = function(t, e, i, s, r) {
405
+ }, Ze = function(t, e, i, s, r) {
406
406
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
407
407
  if (n) {
408
408
  if (H(e, "string") && !t.required)
@@ -410,7 +410,7 @@ var Ut = function(t, e, i, s, r, o) {
410
410
  _.required(t, e, s, o, r), H(e, "string") || _.pattern(t, e, s, o, r);
411
411
  }
412
412
  i(o);
413
- }, Ze = function(t, e, i, s, r) {
413
+ }, Je = function(t, e, i, s, r) {
414
414
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
415
415
  if (n) {
416
416
  if (H(e, "date") && !t.required)
@@ -421,7 +421,7 @@ var Ut = function(t, e, i, s, r, o) {
421
421
  }
422
422
  }
423
423
  i(o);
424
- }, Je = function(t, e, i, s, r) {
424
+ }, Qe = function(t, e, i, s, r) {
425
425
  var o = [], n = Array.isArray(e) ? "array" : typeof e;
426
426
  _.required(t, e, s, o, r, n), i(o);
427
427
  }, yt = function(t, e, i, s, r) {
@@ -432,7 +432,7 @@ var Ut = function(t, e, i, s, r, o) {
432
432
  _.required(t, e, s, n, r, o), H(e, o) || _.type(t, e, s, n, r);
433
433
  }
434
434
  i(n);
435
- }, Qe = function(t, e, i, s, r) {
435
+ }, ti = function(t, e, i, s, r) {
436
436
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
437
437
  if (n) {
438
438
  if (H(e) && !t.required)
@@ -441,23 +441,23 @@ var Ut = function(t, e, i, s, r, o) {
441
441
  }
442
442
  i(o);
443
443
  }, it = {
444
- string: Be,
445
- method: Ke,
446
- number: Ye,
447
- boolean: Ve,
448
- regexp: We,
449
- integer: Pe,
450
- float: ze,
451
- array: $e,
444
+ string: Ke,
445
+ method: Ye,
446
+ number: Ve,
447
+ boolean: We,
448
+ regexp: Pe,
449
+ integer: ze,
450
+ float: $e,
451
+ array: qe,
452
452
  object: Ge,
453
- enum: je,
454
- pattern: Ue,
455
- date: Ze,
453
+ enum: Ue,
454
+ pattern: Ze,
455
+ date: Je,
456
456
  url: yt,
457
457
  hex: yt,
458
458
  email: yt,
459
- required: Je,
460
- any: Qe
459
+ required: Qe,
460
+ any: ti
461
461
  };
462
462
  function vt() {
463
463
  return {
@@ -528,7 +528,7 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
528
528
  s.rules[r] = Array.isArray(o) ? o : [o];
529
529
  });
530
530
  }, t.messages = function(i) {
531
- return i && (this._messages = Bt(vt(), i)), this._messages;
531
+ return i && (this._messages = kt(vt(), i)), this._messages;
532
532
  }, t.validate = function(i, s, r) {
533
533
  var o = this;
534
534
  s === void 0 && (s = {}), r === void 0 && (r = function() {
@@ -551,7 +551,7 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
551
551
  }
552
552
  if (h.messages) {
553
553
  var f = this.messages();
554
- f === Rt && (f = vt()), Bt(f, h.messages), h.messages = f;
554
+ f === Rt && (f = vt()), kt(f, h.messages), h.messages = f;
555
555
  } else
556
556
  h.messages = this.messages();
557
557
  var x = {}, g = h.keys || Object.keys(this.rules);
@@ -559,9 +559,9 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
559
559
  var w = o.rules[u], y = n[u];
560
560
  w.forEach(function(E) {
561
561
  var m = E;
562
- typeof m.transform == "function" && (n === i && (n = G({}, n)), y = n[u] = m.transform(y)), typeof m == "function" ? m = {
562
+ typeof m.transform == "function" && (n === i && (n = q({}, n)), y = n[u] = m.transform(y)), typeof m == "function" ? m = {
563
563
  validator: m
564
- } : m = G({}, m), m.validator = o.getValidationMethod(m), m.validator && (m.field = u, m.fullField = m.fullField || u, m.type = o.getType(m), x[u] = x[u] || [], x[u].push({
564
+ } : m = q({}, m), m.validator = o.getValidationMethod(m), m.validator && (m.field = u, m.fullField = m.fullField || u, m.type = o.getType(m), x[u] = x[u] || [], x[u].push({
565
565
  rule: m,
566
566
  value: y,
567
567
  source: n,
@@ -570,11 +570,11 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
570
570
  });
571
571
  });
572
572
  var p = {};
573
- return Ae(x, h, function(u, w) {
573
+ return Te(x, h, function(u, w) {
574
574
  var y = u.rule, E = (y.type === "object" || y.type === "array") && (typeof y.fields == "object" || typeof y.defaultField == "object");
575
575
  E = E && (y.required || !y.required && u.value), y.field = u.field;
576
576
  function m(v, O) {
577
- return G({}, O, {
577
+ return q({}, O, {
578
578
  fullField: y.fullField + "." + v,
579
579
  fullFields: y.fullFields ? [].concat(y.fullFields, [v]) : [v]
580
580
  });
@@ -583,18 +583,18 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
583
583
  v === void 0 && (v = []);
584
584
  var O = Array.isArray(v) ? v : [v];
585
585
  !h.suppressWarning && O.length && a.warning("async-validator:", O), O.length && y.message !== void 0 && (O = [].concat(y.message));
586
- var S = O.map(Nt(y, n));
586
+ var S = O.map(Bt(y, n));
587
587
  if (h.first && S.length)
588
588
  return p[y.field] = 1, w(S);
589
589
  if (!E)
590
590
  w(S);
591
591
  else {
592
592
  if (y.required && !u.value)
593
- return y.message !== void 0 ? S = [].concat(y.message).map(Nt(y, n)) : h.error && (S = [h.error(y, D(h.messages.required, y.field))]), w(S);
593
+ return y.message !== void 0 ? S = [].concat(y.message).map(Bt(y, n)) : h.error && (S = [h.error(y, D(h.messages.required, y.field))]), w(S);
594
594
  var I = {};
595
595
  y.defaultField && Object.keys(u.value).map(function(L) {
596
596
  I[L] = y.defaultField;
597
- }), I = G({}, I, u.rule.fields);
597
+ }), I = q({}, I, u.rule.fields);
598
598
  var R = {};
599
599
  Object.keys(I).forEach(function(L) {
600
600
  var M = I[L], T = Array.isArray(M) ? M : [M];
@@ -644,16 +644,16 @@ nt.register = function(t, e) {
644
644
  throw new Error("Cannot register a validator by type, validator is not a function");
645
645
  it[t] = e;
646
646
  };
647
- nt.warning = jt;
647
+ nt.warning = Ut;
648
648
  nt.messages = Rt;
649
649
  nt.validators = it;
650
- function Zt() {
650
+ function Jt() {
651
651
  return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(a) {
652
652
  const t = Math.random() * 16 | 0;
653
653
  return (a === "x" ? t : t & 3 | 8).toString(16);
654
654
  });
655
655
  }
656
- function Jt(a, t) {
656
+ function Qt(a, t) {
657
657
  let e = 0, i;
658
658
  return function(...s) {
659
659
  const r = (/* @__PURE__ */ new Date()).getTime(), o = r - e;
@@ -662,10 +662,10 @@ function Jt(a, t) {
662
662
  }, t - o));
663
663
  };
664
664
  }
665
- function Qt(a = []) {
666
- return a.length ? a.map((t) => Qt(t.children) + 1).sort((t, e) => e - t)[0] : 0;
665
+ function te(a = []) {
666
+ return a.length ? a.map((t) => te(t.children) + 1).sort((t, e) => e - t)[0] : 0;
667
667
  }
668
- function ti(a = []) {
668
+ function ei(a = []) {
669
669
  let t = [], e = [], i = [];
670
670
  return a.forEach((s) => {
671
671
  s.fixed === "left" ? t.push(s) : s.fixed === "right" ? i.push(s) : e.push(s);
@@ -675,14 +675,14 @@ function ti(a = []) {
675
675
  ...i.sort((s, r) => (s.sort ?? 0) - (r.sort ?? 0))
676
676
  ];
677
677
  }
678
- function te(a = [], t = 1, e = 0) {
678
+ function ee(a = [], t = 1, e = 0) {
679
679
  return a.map((i) => {
680
680
  if (i.children) {
681
681
  let s = 0, r = i.fixed;
682
682
  i.children.forEach((n) => {
683
683
  n.fixed = r;
684
684
  });
685
- const o = te(i.children, t - 1, e + 1);
685
+ const o = ee(i.children, t - 1, e + 1);
686
686
  return o && o.forEach((n) => {
687
687
  s += n.colspan ?? 0;
688
688
  }), {
@@ -708,8 +708,8 @@ function It(a = []) {
708
708
  e.children ? t = t.concat(It(e.children)) : t.push(e);
709
709
  }), t;
710
710
  }
711
- const Yt = /^(\r\n|\n\r|\r|\n)/, ei = /^[^\t\r\n]+/, Vt = /^\t/;
712
- function ii(a) {
711
+ const Yt = /^(\r\n|\n\r|\r|\n)/, ii = /^[^\t\r\n]+/, Vt = /^\t/;
712
+ function si(a) {
713
713
  let t = [[""]];
714
714
  if (a.length === 0)
715
715
  return t;
@@ -729,14 +729,14 @@ function ii(a) {
729
729
  }
730
730
  r = r.replace(/^"/, "").replace(/"$/, "").replace(/["]*/g, (h) => new Array(Math.floor(h.length / 2)).fill('"').join(""));
731
731
  } else {
732
- const o = a.match(ei);
732
+ const o = a.match(ii);
733
733
  r = o ? o[0] : "", a = a.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 si(a) {
739
+ function ri(a) {
740
740
  let t, e, i, s, r = "", o;
741
741
  for (t = 0, e = a.length; t < e; t += 1) {
742
742
  for (s = a[t].length, i = 0; i < s; i += 1)
@@ -747,7 +747,7 @@ function si(a) {
747
747
  }
748
748
  return r;
749
749
  }
750
- function ee(a, t, e = []) {
750
+ function ie(a, t, e = []) {
751
751
  let i = 0;
752
752
  const s = [];
753
753
  return a.forEach((r, o) => {
@@ -759,15 +759,15 @@ function ee(a, t, e = []) {
759
759
  }
760
760
  }), s;
761
761
  }
762
- function ie(a, t) {
762
+ function se(a, t) {
763
763
  let e = "", i = "";
764
764
  const s = {};
765
765
  return t.forEach((r, o) => {
766
766
  o === 0 ? (e = r.key, i = r.key, s[r.key] = 1) : a[r.key] === a[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 ri(a, t, e = []) {
770
- const { visibleRows: i, rowIndex: s, headIndex: r } = a, o = ee(i, t, e);
769
+ function oi(a, t, e = []) {
770
+ const { visibleRows: i, rowIndex: s, headIndex: r } = a, o = ie(i, t, e);
771
771
  return o[s - r] === 0 ? {
772
772
  rowspan: 0,
773
773
  colspan: 0,
@@ -780,10 +780,10 @@ function ri(a, t, e = []) {
780
780
  mergeRow: !0
781
781
  };
782
782
  }
783
- function oi(a, t = []) {
783
+ function ni(a, t = []) {
784
784
  const { column: e, row: i, visibleLeafColumns: s } = a, r = s.filter((o) => t.includes(o.key));
785
785
  if (t.includes(e.key)) {
786
- const o = ie(i, r);
786
+ const o = se(i, r);
787
787
  return o[e.key] === 0 ? {
788
788
  rowspan: 0,
789
789
  colspan: 0,
@@ -797,7 +797,7 @@ function oi(a, t = []) {
797
797
  };
798
798
  }
799
799
  }
800
- class se {
800
+ class re {
801
801
  constructor(t, e, i, s, r, o, n) {
802
802
  l(this, "ctx");
803
803
  l(this, "x", 0);
@@ -843,7 +843,7 @@ class se {
843
843
  getRightFixedX() {
844
844
  }
845
845
  }
846
- class Tt extends se {
846
+ class Tt extends re {
847
847
  constructor(e, i, s, r, o, n, h, c, d, f = "body") {
848
848
  super(e, r, o, n, h, f, c.fixed);
849
849
  l(this, "formatter");
@@ -1071,10 +1071,6 @@ class Tt extends se {
1071
1071
  }
1072
1072
  d && w && (w.rowKey === this.rowKey && (p = f), w.rowIndex >= y && w.rowIndex <= E && (p = f)), h && u && (u.rowKey === this.rowKey && (p = c), u.rowIndex >= y && u.rowIndex <= E && (p = c)), this.drawCellSkyBgColor = p;
1073
1073
  let m = e, C = o;
1074
- if (["index", "index-selection", "selection"].includes(this.type)) {
1075
- this.drawCellBgColor = e, this.drawTextColor = o;
1076
- return;
1077
- }
1078
1074
  if (this.ctx.database.getReadonly(this.rowKey, this.key) || (m = i, C = o), x && (this.rowIndex % 2 ? m = g : m = e), typeof s == "function") {
1079
1075
  const b = s, { backgroundColor: v, color: O } = b({
1080
1076
  row: this.row,
@@ -1256,13 +1252,30 @@ class Tt extends se {
1256
1252
  });
1257
1253
  }
1258
1254
  drawImage() {
1259
- this.drawImageSource && this.ctx.paint.drawImage(
1260
- this.drawImageSource,
1261
- this.drawImageX,
1262
- this.drawImageY,
1263
- this.drawImageWidth,
1264
- this.drawImageHeight
1265
- );
1255
+ if (this.drawImageSource) {
1256
+ if (this.hoverIconName) {
1257
+ const { CELL_HOVER_ICON_BG_COLOR: e, CELL_HOVER_ICON_BORDER_COLOR: i } = this.ctx.config;
1258
+ this.ctx.paint.drawRect(
1259
+ this.drawImageX - 2,
1260
+ this.drawImageY - 2,
1261
+ this.drawImageWidth + 4,
1262
+ this.drawImageHeight + 4,
1263
+ {
1264
+ borderColor: i,
1265
+ radius: 4,
1266
+ borderWidth: 1,
1267
+ fillColor: e
1268
+ }
1269
+ );
1270
+ }
1271
+ this.ctx.paint.drawImage(
1272
+ this.drawImageSource,
1273
+ this.drawImageX,
1274
+ this.drawImageY,
1275
+ this.drawImageWidth,
1276
+ this.drawImageHeight
1277
+ );
1278
+ }
1266
1279
  }
1267
1280
  drawSelector() {
1268
1281
  if (this.cellType === "footer")
@@ -1370,7 +1383,7 @@ class Tt extends se {
1370
1383
  }
1371
1384
  }
1372
1385
  }
1373
- class ni {
1386
+ class ai {
1374
1387
  //虚拟滚动位置
1375
1388
  constructor(t, e) {
1376
1389
  l(this, "loading", !1);
@@ -1423,7 +1436,7 @@ class ni {
1423
1436
  var w;
1424
1437
  let r = i._hasChildren || !1;
1425
1438
  Array.isArray(i.children) && i.children.length && (r = !0, this.initData(i.children, e + 1));
1426
- 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}` : Zt();
1439
+ 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();
1427
1440
  this.itemRowKeyMap.set(i, x);
1428
1441
  const g = i._height || h, p = i._readonly;
1429
1442
  let u = !0;
@@ -2162,8 +2175,8 @@ class ni {
2162
2175
  }, "");
2163
2176
  for (let R = e - 1; R >= 0; R--) {
2164
2177
  const A = this.rowIndexRowKeyMap.get(R) || "", L = h.reduce((M, T) => {
2165
- const N = this.getItemValue(A, T) ?? "";
2166
- return `${M}${N}`;
2178
+ const B = this.getItemValue(A, T) ?? "";
2179
+ return `${M}${B}`;
2167
2180
  }, "");
2168
2181
  if (I === L)
2169
2182
  w = R;
@@ -2172,8 +2185,8 @@ class ni {
2172
2185
  }
2173
2186
  for (let R = e; R <= this.ctx.maxRowIndex; R++) {
2174
2187
  const A = this.rowIndexRowKeyMap.get(R) || "", L = h.reduce((M, T) => {
2175
- const N = this.getItemValue(A, T) ?? "";
2176
- return `${M}${N}`;
2188
+ const B = this.getItemValue(A, T) ?? "";
2189
+ return `${M}${B}`;
2177
2190
  }, "");
2178
2191
  if (I === L)
2179
2192
  y = R;
@@ -2297,7 +2310,7 @@ class ni {
2297
2310
  return i;
2298
2311
  }
2299
2312
  }
2300
- class ai {
2313
+ class li {
2301
2314
  constructor(t) {
2302
2315
  l(this, "ctx");
2303
2316
  l(this, "history", []);
@@ -2352,7 +2365,7 @@ class ai {
2352
2365
  this.history = [], this.historyIndex = -1;
2353
2366
  }
2354
2367
  }
2355
- class li {
2368
+ class hi {
2356
2369
  constructor(t) {
2357
2370
  l(this, "eventTasks", /* @__PURE__ */ new Map());
2358
2371
  l(this, "ctx");
@@ -2370,7 +2383,7 @@ class li {
2370
2383
  this.ctx.emit("resetHeader", t), this.ctx.emit("resize", t);
2371
2384
  }
2372
2385
  handleMouseDown(t) {
2373
- t.button === 0 && (this.ctx.mousedown = !0), this.ctx.containerElement.focus(), this.ctx.emit("mousedown", t);
2386
+ t.button === 0 && (this.ctx.mousedown = !0), this.ctx.containerElement.focus({ preventScroll: !0 }), this.ctx.emit("mousedown", t);
2374
2387
  }
2375
2388
  handleMousemove(t) {
2376
2389
  this.ctx.emit("mousemove", t);
@@ -2419,7 +2432,7 @@ class li {
2419
2432
  t.removeEventListener(e, i), this.eventTasks.delete(e);
2420
2433
  }
2421
2434
  }
2422
- class hi {
2435
+ class ci {
2423
2436
  constructor() {
2424
2437
  l(this, "events", /* @__PURE__ */ new Map());
2425
2438
  }
@@ -2457,7 +2470,7 @@ class hi {
2457
2470
  this.events.clear();
2458
2471
  }
2459
2472
  }
2460
- class ci {
2473
+ class di {
2461
2474
  constructor(t) {
2462
2475
  l(this, "ctx");
2463
2476
  const e = t.getContext("2d");
@@ -2634,7 +2647,9 @@ class Wt {
2634
2647
  l(this, "CELL_WIDTH", 100);
2635
2648
  l(this, "CELL_HEIGHT", 36);
2636
2649
  l(this, "CELL_PADDING", 8);
2637
- l(this, "CELL_HOVER_ICON_SIZE", 20);
2650
+ l(this, "CELL_HOVER_ICON_SIZE", 14);
2651
+ l(this, "CELL_HOVER_ICON_BG_COLOR", "#fff");
2652
+ l(this, "CELL_HOVER_ICON_BORDER_COLOR", "#DDE0EA");
2638
2653
  l(this, "SCROLLER_TRACK_SIZE", 14);
2639
2654
  l(this, "SCROLLER_SIZE", 8);
2640
2655
  l(this, "SCROLLER_COLOR", "#dee0e3");
@@ -2736,7 +2751,8 @@ class Wt {
2736
2751
  Object.assign(this, t);
2737
2752
  }
2738
2753
  }
2739
- class di {
2754
+ const Pt = '<svg t="1724122044148" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M707.648 401.28L489.28 560.704l22.656 30.976 22.656-30.976L316.16 401.216q-3.072-2.24-6.464-3.84-3.456-1.536-7.104-2.432-3.712-0.896-7.488-1.088-3.776-0.128-7.488 0.448-3.776 0.64-7.296 1.92-3.584 1.28-6.784 3.2-3.2 1.984-6.016 4.544-2.816 2.56-5.056 5.632-2.176 3.072-3.84 6.464-1.536 3.456-2.432 7.104-0.896 3.712-1.088 7.488-0.128 3.776 0.448 7.488 0.64 3.776 1.92 7.296 1.28 3.584 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992l218.368 159.552q4.928 3.584 10.752 5.504 5.76 1.92 11.904 1.92 6.08 0 11.904-1.92 5.76-1.92 10.752-5.504l218.368-159.552q3.008-2.24 5.568-4.992 2.56-2.816 4.544-6.016 1.92-3.2 3.264-6.784 1.28-3.52 1.92-7.296 0.576-3.712 0.384-7.488-0.128-3.84-1.024-7.488-0.896-3.648-2.496-7.04-1.6-3.456-3.84-6.528-2.24-3.072-4.992-5.632-2.816-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.584-1.28-7.296-1.856-3.712-0.64-7.488-0.448-3.84 0.192-7.488 1.088-3.648 0.896-7.04 2.496-3.456 1.536-6.528 3.84z m61.056 30.976q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.472-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.72-3.584-3.456-1.408-7.168-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.656 3.584-3.136 2.112-5.76 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.584 6.656-1.408 3.52-2.176 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.176 7.168 1.472 3.52 3.584 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.168-2.176 3.52-1.408 6.656-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.048-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z m-436.736 0q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.408-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.592 3.584-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.24 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.24 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z" p-id="4552"></path></svg>';
2755
+ class fi {
2740
2756
  constructor(t) {
2741
2757
  l(this, "ctx");
2742
2758
  l(this, "list", [
@@ -2758,7 +2774,7 @@ class di {
2758
2774
  name: "shrink",
2759
2775
  configName: "CHECKBOX_UNCHECK_SVG",
2760
2776
  configColorName: "SHRINK_ICON_COLOR",
2761
- svg: '<svg t="1724122044148" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M707.648 401.28L489.28 560.704l22.656 30.976 22.656-30.976L316.16 401.216q-3.072-2.24-6.464-3.84-3.456-1.536-7.104-2.432-3.712-0.896-7.488-1.088-3.776-0.128-7.488 0.448-3.776 0.64-7.296 1.92-3.584 1.28-6.784 3.2-3.2 1.984-6.016 4.544-2.816 2.56-5.056 5.632-2.176 3.072-3.84 6.464-1.536 3.456-2.432 7.104-0.896 3.712-1.088 7.488-0.128 3.776 0.448 7.488 0.64 3.776 1.92 7.296 1.28 3.584 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992l218.368 159.552q4.928 3.584 10.752 5.504 5.76 1.92 11.904 1.92 6.08 0 11.904-1.92 5.76-1.92 10.752-5.504l218.368-159.552q3.008-2.24 5.568-4.992 2.56-2.816 4.544-6.016 1.92-3.2 3.264-6.784 1.28-3.52 1.92-7.296 0.576-3.712 0.384-7.488-0.128-3.84-1.024-7.488-0.896-3.648-2.496-7.04-1.6-3.456-3.84-6.528-2.24-3.072-4.992-5.632-2.816-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.584-1.28-7.296-1.856-3.712-0.64-7.488-0.448-3.84 0.192-7.488 1.088-3.648 0.896-7.04 2.496-3.456 1.536-6.528 3.84z m61.056 30.976q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.472-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.72-3.584-3.456-1.408-7.168-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.656 3.584-3.136 2.112-5.76 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.584 6.656-1.408 3.52-2.176 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.176 7.168 1.472 3.52 3.584 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.168-2.176 3.52-1.408 6.656-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.048-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z m-436.736 0q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.408-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.592 3.584-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.24 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.24 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z" p-id="4552"></path></svg>',
2777
+ svg: Pt,
2762
2778
  color: "#4E5969"
2763
2779
  },
2764
2780
  {
@@ -2799,6 +2815,19 @@ class di {
2799
2815
  configName: "CHECKBOX_DISABLED_SVG",
2800
2816
  svg: '<svg t="1722595946663" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4865" width="32" height="32"><path d="M128 640V384a256 256 0 0 1 256-256h256a256 256 0 0 1 256 256v256a256 256 0 0 1-256 256H384a256 256 0 0 1-256-256z" fill="#F1F2F4" p-id="4866"></path><path d="M128 640V384a256 256 0 0 1 256-256h256a256 256 0 0 1 256 256v256a256 256 0 0 1-256 256H384a256 256 0 0 1-256-256z m64 0q0 79.552 56.256 135.744Q304.448 832 384 832h256q79.552 0 135.744-56.256Q832 719.552 832 640V384q0-79.552-56.256-135.744Q719.552 192 640 192H384q-79.552 0-135.744 56.256Q192 304.448 192 384v256z" fill="#DDE0EA" p-id="4867"></path></svg>',
2801
2817
  color: ""
2818
+ },
2819
+ {
2820
+ name: "icon-edit",
2821
+ configName: "CHECKBOX_DISABLED_SVG",
2822
+ svg: '<svg t="1744798692576" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6606" width="200" height="200"><path d="M855.296 894.528H168.768v-76.8h686.528v76.8z m38.4-38.4q0 3.84-0.768 7.488-0.704 3.712-2.176 7.232-1.472 3.52-3.52 6.656-2.112 3.136-4.8 5.76-2.688 2.688-5.824 4.8-3.2 2.112-6.656 3.584-3.456 1.408-7.168 2.176-3.712 0.704-7.488 0.704-3.84 0-7.488-0.704-3.712-0.768-7.232-2.176-3.52-1.472-6.656-3.584-3.136-2.112-5.76-4.736-2.688-2.688-4.8-5.824-2.112-3.2-3.584-6.656-1.408-3.52-2.176-7.232-0.704-3.648-0.704-7.488 0-3.776 0.704-7.488 0.768-3.712 2.176-7.168 1.472-3.52 3.584-6.656 2.112-3.136 4.736-5.76 2.688-2.752 5.824-4.8 3.2-2.112 6.656-3.584 3.52-1.472 7.232-2.176 3.712-0.768 7.488-0.768 3.776 0 7.488 0.768 3.712 0.704 7.168 2.176 3.52 1.472 6.656 3.584 3.2 2.048 5.76 4.736 2.752 2.688 4.864 5.824 2.048 3.2 3.52 6.656 1.472 3.456 2.176 7.168 0.768 3.712 0.768 7.488z m-686.528 0q0 3.84-0.768 7.488-0.704 3.712-2.176 7.232-1.472 3.52-3.52 6.656-2.112 3.136-4.8 5.76-2.688 2.688-5.76 4.8-3.2 2.112-6.72 3.584-3.456 1.408-7.168 2.176-3.712 0.704-7.488 0.704-3.84 0-7.488-0.704-3.712-0.768-7.232-2.176-3.456-1.472-6.656-3.584-3.136-2.112-5.76-4.736-2.688-2.688-4.8-5.824-2.112-3.2-3.584-6.656-1.408-3.52-2.176-7.232-0.704-3.648-0.704-7.488 0-3.776 0.704-7.488 0.768-3.712 2.176-7.168 1.472-3.52 3.584-6.656 2.112-3.136 4.736-5.76 2.688-2.752 5.824-4.8 3.2-2.112 6.656-3.584 3.52-1.472 7.232-2.176 3.712-0.768 7.488-0.768 3.776 0 7.488 0.768 3.712 0.704 7.168 2.176 3.52 1.472 6.656 3.584 3.2 2.048 5.824 4.736 2.688 2.688 4.8 5.824 2.048 3.2 3.52 6.656 1.472 3.456 2.176 7.168 0.768 3.712 0.768 7.488zM652.032 211.2l-369.92 370.368v89.344h90.048l369.664-369.856L652.032 211.2z m-54.4-54.272q22.528-22.528 54.4-22.528 31.808 0 54.336 22.528l89.792 89.856q22.464 22.464 22.464 54.272t-22.464 54.272l-369.664 369.856q-22.464 22.528-54.336 22.528H282.24q-31.808 0-54.336-22.528-22.464-22.464-22.464-54.272V581.568q0-31.808 22.4-54.272l369.92-370.368z" p-id="6607"></path></svg>',
2823
+ color: "#4E5969"
2824
+ },
2825
+ {
2826
+ name: "icon-select",
2827
+ configName: "CHECKBOX_UNCHECK_SVG",
2828
+ configColorName: "SHRINK_ICON_COLOR",
2829
+ svg: Pt,
2830
+ color: "#4E5969"
2802
2831
  }
2803
2832
  ]);
2804
2833
  l(this, "icons", /* @__PURE__ */ new Map());
@@ -2850,7 +2879,7 @@ class di {
2850
2879
  return this.icons.get(t);
2851
2880
  }
2852
2881
  }
2853
- class re extends se {
2882
+ class oe extends re {
2854
2883
  constructor(e, i, s, r, o, n, h) {
2855
2884
  super(e, s, r, o, n, "header", h.fixed);
2856
2885
  l(this, "align");
@@ -2887,7 +2916,7 @@ class re extends se {
2887
2916
  l(this, "drawImageHeight", 0);
2888
2917
  l(this, "drawImageName", "");
2889
2918
  l(this, "drawImageSource");
2890
- this.ctx = e, this.x = s, this.y = r, this.width = o, this.height = n, this.colIndex = i, this.key = h.key, 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 = Zt(), this.hasChildren = h.children && h.children.length > 0 || !1, this.render = h.renderHeader;
2919
+ this.ctx = e, this.x = s, this.y = r, this.width = o, this.height = n, this.colIndex = i, this.key = h.key, 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;
2891
2920
  }
2892
2921
  /**
2893
2922
  * 是否可见,覆盖基类方法,表头是跟y滚动条没有关系的所以不需要加滚动参数
@@ -2978,7 +3007,7 @@ class re extends se {
2978
3007
  };
2979
3008
  }
2980
3009
  }
2981
- class fi {
3010
+ class xi {
2982
3011
  constructor(t) {
2983
3012
  l(this, "ctx");
2984
3013
  l(this, "visibleHoverCell");
@@ -3056,7 +3085,7 @@ class fi {
3056
3085
  */
3057
3086
  selectionClick(t) {
3058
3087
  if (["selection", "index-selection"].includes(t.type) && this.ctx.isPointer)
3059
- if (t instanceof re)
3088
+ if (t instanceof oe)
3060
3089
  t.drawImageName === "checkbox-uncheck" || t.drawImageName === "checkbox-indeterminate" ? this.ctx.database.toggleAllSelection() : t.drawImageName === "checkbox-check" && this.ctx.database.clearSelection(!0);
3061
3090
  else {
3062
3091
  if (!this.ctx.database.getRowSelectable(t.rowKey))
@@ -3143,7 +3172,7 @@ class fi {
3143
3172
  this.resizeObserver.unobserve(this.ctx.stageElement);
3144
3173
  }
3145
3174
  }
3146
- class xi {
3175
+ class ui {
3147
3176
  constructor(t, e) {
3148
3177
  l(this, "eventBus");
3149
3178
  l(this, "eventBrowser");
@@ -3257,7 +3286,7 @@ class xi {
3257
3286
  emptyElement: h,
3258
3287
  contextMenuElement: c
3259
3288
  } = t;
3260
- 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 hi(), this.eventBrowser = new li(this), this.eventTable = new fi(this), this.paint = new ci(this.canvasElement), this.database = new ni(this, e), this.history = new ai(this), this.icons = new di(this);
3289
+ 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 ci(), this.eventBrowser = new hi(this), this.eventTable = new xi(this), this.paint = new di(this.canvasElement), this.database = new ai(this, e), this.history = new li(this), this.icons = new fi(this);
3261
3290
  }
3262
3291
  setConfig(t) {
3263
3292
  this.config = new Wt(t);
@@ -3374,7 +3403,7 @@ class xi {
3374
3403
  this.eventTable.destroy(), this.eventBrowser.destroy(), this.eventBus.destroy();
3375
3404
  }
3376
3405
  }
3377
- class Pt {
3406
+ class zt {
3378
3407
  constructor(t, e) {
3379
3408
  l(this, "ctx");
3380
3409
  l(this, "type");
@@ -3501,12 +3530,12 @@ class Pt {
3501
3530
  }), this.ctx.scrollerFocus = this.isFocus;
3502
3531
  }
3503
3532
  }
3504
- class ui {
3533
+ class gi {
3505
3534
  constructor(t) {
3506
3535
  l(this, "ctx");
3507
3536
  l(this, "verticalScrollbar");
3508
3537
  l(this, "horizontalScrollbar");
3509
- this.ctx = t, this.verticalScrollbar = new Pt(t, "vertical"), this.horizontalScrollbar = new Pt(t, "horizontal"), this.ctx.on("wheel", (e) => this.onWheel(e)), this.ctx.on("mousedown", (e) => this.onMouseDown(e)), this.ctx.on("mousemove", (e) => this.onMouseMove(e)), this.ctx.on("mouseup", () => this.onMouseUp()), this.ctx.on("touchmove", (e) => this.onTouchmove(e)), this.ctx.on("touchstart", (e) => {
3538
+ this.ctx = t, this.verticalScrollbar = new zt(t, "vertical"), this.horizontalScrollbar = new zt(t, "horizontal"), this.ctx.on("wheel", (e) => this.onWheel(e)), this.ctx.on("mousedown", (e) => this.onMouseDown(e)), this.ctx.on("mousemove", (e) => this.onMouseMove(e)), this.ctx.on("mouseup", () => this.onMouseUp()), this.ctx.on("touchmove", (e) => this.onTouchmove(e)), this.ctx.on("touchstart", (e) => {
3510
3539
  this.onTouchstart(e);
3511
3540
  }), this.ctx.on("setScroll", (e, i) => {
3512
3541
  this.setScroll(e, i);
@@ -3565,7 +3594,7 @@ class ui {
3565
3594
  this.setScrollY(r - e.visibleHeight / 2);
3566
3595
  }
3567
3596
  }
3568
- class gi {
3597
+ class wi {
3569
3598
  constructor(t) {
3570
3599
  l(this, "ctx");
3571
3600
  // 上下文
@@ -3604,7 +3633,7 @@ class gi {
3604
3633
  l(this, "renderFixedCellHeaders", []);
3605
3634
  this.ctx = t, this.ctx.on(
3606
3635
  "resetHeader",
3607
- Jt(() => {
3636
+ Qt(() => {
3608
3637
  this.init(), this.ctx.emit("draw");
3609
3638
  }, 100)
3610
3639
  ), this.init(), this.initResizeColumn();
@@ -3614,9 +3643,9 @@ class gi {
3614
3643
  config: { HEADER_HEIGHT: t, SCROLLER_TRACK_SIZE: e }
3615
3644
  } = this.ctx, i = this.ctx.database.getColumns();
3616
3645
  this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [];
3617
- const s = Qt(i), r = It(i);
3646
+ const s = te(i), r = It(i);
3618
3647
  this.height = t * s, this.width = r.reduce((f, x) => f + ((x == null ? void 0 : x.width) || 100), 0), this.visibleHeight = this.height;
3619
- const o = ti(te(i, s));
3648
+ const o = ei(ee(i, s));
3620
3649
  this.columnIndex = 0, this.resizeNum = 0, this.render(o, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
3621
3650
  const n = this.ctx.containerElement.getBoundingClientRect();
3622
3651
  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 - 0.5 + "px", this.visibleWidth = this.ctx.stageWidth - e;
@@ -3718,7 +3747,7 @@ class gi {
3718
3747
  const n = t[o], h = r * (n.rowspan || 0), c = r * (n.level || 0);
3719
3748
  let d = n.width || 100;
3720
3749
  n.children && (d = It(n.children).reduce((g, p) => g + ((p == null ? void 0 : p.width) || 100), 0));
3721
- const f = new re(this.ctx, this.columnIndex, s, c, d, h, n);
3750
+ const f = new oe(this.ctx, this.columnIndex, s, c, d, h, n);
3722
3751
  this.ctx.database.setHeader(n.key, f), this.allCellHeaders.push(f), n.children || (this.leafCellHeaders.push(f), f.column.widthFillDisable || this.resizeNum++), n.fixed === "left" ? this.fixedLeftCellHeaders.push(f) : n.fixed === "right" ? this.fixedRightCellHeaders.push(f) : this.centerCellHeaders.push(f), !n.children && this.columnIndex++, n.children && this.render(n.children, s), s += d;
3723
3752
  }
3724
3753
  }
@@ -3792,7 +3821,7 @@ class gi {
3792
3821
  }), this.drawTipLine(), this.drawBottomLine();
3793
3822
  }
3794
3823
  }
3795
- class oe {
3824
+ class ne {
3796
3825
  constructor(t, e, i = 0, s = 0, r = 0, o = 0, n, h = "body") {
3797
3826
  l(this, "ctx");
3798
3827
  l(this, "x", 0);
@@ -3847,7 +3876,7 @@ class oe {
3847
3876
  });
3848
3877
  }
3849
3878
  }
3850
- class wi {
3879
+ class pi {
3851
3880
  constructor(t) {
3852
3881
  l(this, "resizeTarget", null);
3853
3882
  //调整行大小的目标
@@ -4049,7 +4078,7 @@ class wi {
4049
4078
  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;
4050
4079
  const d = [];
4051
4080
  for (let f = 0; f < this.visibleRows.length; f++) {
4052
- const x = this.headIndex + f, g = this.visibleRows[f], { height: p, top: u } = this.ctx.database.getPositionForRowIndex(x), w = new oe(this.ctx, x, 0, u + this.y, t.width, p, g);
4081
+ 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);
4053
4082
  d.push(w);
4054
4083
  }
4055
4084
  this.renderRows = d, this.ctx.body.renderRows = d;
@@ -4066,7 +4095,7 @@ class wi {
4066
4095
  }), this.drawTipLine();
4067
4096
  }
4068
4097
  }
4069
- class pi {
4098
+ class yi {
4070
4099
  constructor(t) {
4071
4100
  l(this, "ctx");
4072
4101
  l(this, "renderRows", []);
@@ -4121,7 +4150,7 @@ class pi {
4121
4150
  let e = this.y;
4122
4151
  const i = [];
4123
4152
  this.data.forEach((s, r) => {
4124
- const o = new oe(this.ctx, r, 0, e, this.width, t, s, "footer");
4153
+ const o = new ne(this.ctx, r, 0, e, this.width, t, s, "footer");
4125
4154
  e += t, i.push(o);
4126
4155
  }), this.renderRows = i, this.ctx.footer.renderRows = this.renderRows;
4127
4156
  }
@@ -4147,7 +4176,7 @@ class pi {
4147
4176
  }), this.drawTopLine();
4148
4177
  }
4149
4178
  }
4150
- class yi {
4179
+ class mi {
4151
4180
  // 垂直滚动定时器
4152
4181
  constructor(t) {
4153
4182
  l(this, "isCut", !1);
@@ -4166,7 +4195,7 @@ class yi {
4166
4195
  this.moveFocus(t);
4167
4196
  }), this.ctx.on(
4168
4197
  "mousemove",
4169
- Jt((t) => {
4198
+ Qt((t) => {
4170
4199
  const { offsetY: e, offsetX: i } = this.ctx.getOffset(t), s = this.ctx.isTarget(t) && i > 0 && i < this.ctx.body.visibleWidth && e > this.ctx.header.visibleHeight && e < this.ctx.header.visibleHeight + this.ctx.body.visibleHeight;
4171
4200
  (this.ctx.selectorMove || this.ctx.autofillMove) && (!s && !this.mousedownHeader ? this.startAdjustPosition(t) : this.stopAdjustPosition());
4172
4201
  }, 100)
@@ -4271,7 +4300,7 @@ class yi {
4271
4300
  let [y, E] = r, [m, C] = o;
4272
4301
  if (y < g || E > p || m < u || C > w)
4273
4302
  return;
4274
- if (this.ctx.stageElement.focus(), this.ctx.config.ENABLE_MERGE_CELL_LINK) {
4303
+ if (this.ctx.stageElement.focus({ preventScroll: !0 }), this.ctx.config.ENABLE_MERGE_CELL_LINK) {
4275
4304
  const v = this.adjustMergeCells(r, o);
4276
4305
  m = v.yArr[0], C = v.yArr[1], y = v.xArr[0], E = v.xArr[1], this.ctx.onlyMergeCell = v.onlyMergeCell;
4277
4306
  }
@@ -4455,7 +4484,7 @@ class yi {
4455
4484
  return;
4456
4485
  t = n.data;
4457
4486
  }
4458
- const r = si(t);
4487
+ const r = ri(t);
4459
4488
  navigator.clipboard ? navigator.clipboard.writeText(r).then(() => {
4460
4489
  this.ctx.selector.xArrCopy = this.ctx.selector.xArr.slice(), this.ctx.selector.yArrCopy = this.ctx.selector.yArr.slice(), this.ctx.emit("copyChange", {
4461
4490
  xArr: this.ctx.selector.xArrCopy,
@@ -4500,7 +4529,7 @@ class yi {
4500
4529
  if (this.ctx.selector.enable && t) {
4501
4530
  const e = this.ctx.selector.yArr[0], i = this.ctx.selector.xArr[0], s = /* @__PURE__ */ new Set();
4502
4531
  navigator.clipboard.readText().then(async (r) => {
4503
- let o = ii(r);
4532
+ let o = si(r);
4504
4533
  const n = [i, i + o[0].length - 1], h = [e, e + o.length - 1], c = o.length === 1 && o[0].length === 1;
4505
4534
  if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(n, h) && !c) {
4506
4535
  const g = {
@@ -4666,7 +4695,7 @@ class yi {
4666
4695
  this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
4667
4696
  }
4668
4697
  }
4669
- class mi {
4698
+ class Ei {
4670
4699
  constructor(t) {
4671
4700
  l(this, "ctx");
4672
4701
  l(this, "maxColRowCell");
@@ -4812,12 +4841,12 @@ class mi {
4812
4841
  const rt = Math.min, U = Math.max, ft = Math.round, z = (a) => ({
4813
4842
  x: a,
4814
4843
  y: a
4815
- }), Ei = {
4844
+ }), Ci = {
4816
4845
  left: "right",
4817
4846
  right: "left",
4818
4847
  bottom: "top",
4819
4848
  top: "bottom"
4820
- }, Ci = {
4849
+ }, bi = {
4821
4850
  start: "end",
4822
4851
  end: "start"
4823
4852
  };
@@ -4827,38 +4856,38 @@ function _t(a, t, e) {
4827
4856
  function at(a, t) {
4828
4857
  return typeof a == "function" ? a(t) : a;
4829
4858
  }
4830
- function q(a) {
4859
+ function G(a) {
4831
4860
  return a.split("-")[0];
4832
4861
  }
4833
4862
  function lt(a) {
4834
4863
  return a.split("-")[1];
4835
4864
  }
4836
- function ne(a) {
4865
+ function ae(a) {
4837
4866
  return a === "x" ? "y" : "x";
4838
4867
  }
4839
4868
  function Mt(a) {
4840
4869
  return a === "y" ? "height" : "width";
4841
4870
  }
4842
4871
  function J(a) {
4843
- return ["top", "bottom"].includes(q(a)) ? "y" : "x";
4872
+ return ["top", "bottom"].includes(G(a)) ? "y" : "x";
4844
4873
  }
4845
4874
  function Ht(a) {
4846
- return ne(J(a));
4875
+ return ae(J(a));
4847
4876
  }
4848
- function bi(a, t, e) {
4877
+ function vi(a, t, e) {
4849
4878
  e === void 0 && (e = !1);
4850
4879
  const i = lt(a), s = Ht(a), r = Mt(s);
4851
4880
  let o = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
4852
4881
  return t.reference[r] > t.floating[r] && (o = xt(o)), [o, xt(o)];
4853
4882
  }
4854
- function vi(a) {
4883
+ function Ri(a) {
4855
4884
  const t = xt(a);
4856
4885
  return [Ot(a), t, Ot(t)];
4857
4886
  }
4858
4887
  function Ot(a) {
4859
- return a.replace(/start|end/g, (t) => Ci[t]);
4888
+ return a.replace(/start|end/g, (t) => bi[t]);
4860
4889
  }
4861
- function Ri(a, t, e) {
4890
+ function Ii(a, t, e) {
4862
4891
  const i = ["left", "right"], s = ["right", "left"], r = ["top", "bottom"], o = ["bottom", "top"];
4863
4892
  switch (a) {
4864
4893
  case "top":
@@ -4871,15 +4900,15 @@ function Ri(a, t, e) {
4871
4900
  return [];
4872
4901
  }
4873
4902
  }
4874
- function Ii(a, t, e, i) {
4903
+ function _i(a, t, e, i) {
4875
4904
  const s = lt(a);
4876
- let r = Ri(q(a), e === "start", i);
4905
+ let r = Ii(G(a), e === "start", i);
4877
4906
  return s && (r = r.map((o) => o + "-" + s), t && (r = r.concat(r.map(Ot)))), r;
4878
4907
  }
4879
4908
  function xt(a) {
4880
- return a.replace(/left|right|bottom|top/g, (t) => Ei[t]);
4909
+ return a.replace(/left|right|bottom|top/g, (t) => Ci[t]);
4881
4910
  }
4882
- function _i(a) {
4911
+ function Oi(a) {
4883
4912
  return {
4884
4913
  top: 0,
4885
4914
  right: 0,
@@ -4888,8 +4917,8 @@ function _i(a) {
4888
4917
  ...a
4889
4918
  };
4890
4919
  }
4891
- function ae(a) {
4892
- return typeof a != "number" ? _i(a) : {
4920
+ function le(a) {
4921
+ return typeof a != "number" ? Oi(a) : {
4893
4922
  top: a,
4894
4923
  right: a,
4895
4924
  bottom: a,
@@ -4914,12 +4943,12 @@ function ut(a) {
4914
4943
  y: e
4915
4944
  };
4916
4945
  }
4917
- function zt(a, t, e) {
4946
+ function $t(a, t, e) {
4918
4947
  let {
4919
4948
  reference: i,
4920
4949
  floating: s
4921
4950
  } = a;
4922
- const r = J(t), o = Ht(t), n = Mt(o), h = q(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;
4951
+ 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;
4923
4952
  let g;
4924
4953
  switch (h) {
4925
4954
  case "top":
@@ -4962,7 +4991,7 @@ function zt(a, t, e) {
4962
4991
  }
4963
4992
  return g;
4964
4993
  }
4965
- const Oi = async (a, t, e) => {
4994
+ const Si = async (a, t, e) => {
4966
4995
  const {
4967
4996
  placement: i = "bottom",
4968
4997
  strategy: s = "absolute",
@@ -4976,7 +5005,7 @@ const Oi = async (a, t, e) => {
4976
5005
  }), {
4977
5006
  x: d,
4978
5007
  y: f
4979
- } = zt(c, i, h), x = i, g = {}, p = 0;
5008
+ } = $t(c, i, h), x = i, g = {}, p = 0;
4980
5009
  for (let u = 0; u < n.length; u++) {
4981
5010
  const {
4982
5011
  name: w,
@@ -5013,7 +5042,7 @@ const Oi = async (a, t, e) => {
5013
5042
  }) : b.rects), {
5014
5043
  x: d,
5015
5044
  y: f
5016
- } = zt(c, x, h)), u = -1);
5045
+ } = $t(c, x, h)), u = -1);
5017
5046
  }
5018
5047
  return {
5019
5048
  x: d,
@@ -5023,7 +5052,7 @@ const Oi = async (a, t, e) => {
5023
5052
  middlewareData: g
5024
5053
  };
5025
5054
  };
5026
- async function le(a, t) {
5055
+ async function he(a, t) {
5027
5056
  var e;
5028
5057
  t === void 0 && (t = {});
5029
5058
  const {
@@ -5039,7 +5068,7 @@ async function le(a, t) {
5039
5068
  elementContext: f = "floating",
5040
5069
  altBoundary: x = !1,
5041
5070
  padding: g = 0
5042
- } = at(t, a), p = ae(g), w = n[x ? f === "floating" ? "reference" : "floating" : f], y = ut(await r.getClippingRect({
5071
+ } = at(t, a), p = le(g), w = n[x ? f === "floating" ? "reference" : "floating" : f], y = ut(await r.getClippingRect({
5043
5072
  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)),
5044
5073
  boundary: c,
5045
5074
  rootBoundary: d,
@@ -5068,7 +5097,7 @@ async function le(a, t) {
5068
5097
  right: (b.right - y.right + p.right) / C.x
5069
5098
  };
5070
5099
  }
5071
- const Si = (a) => ({
5100
+ const Li = (a) => ({
5072
5101
  name: "arrow",
5073
5102
  options: a,
5074
5103
  async fn(t) {
@@ -5086,26 +5115,26 @@ const Si = (a) => ({
5086
5115
  } = at(a, t) || {};
5087
5116
  if (c == null)
5088
5117
  return {};
5089
- const f = ae(d), x = {
5118
+ const f = le(d), x = {
5090
5119
  x: e,
5091
5120
  y: i
5092
5121
  }, g = Ht(s), p = Mt(g), u = await o.getDimensions(c), w = g === "y", y = w ? "top" : "left", E = w ? "bottom" : "right", m = w ? "clientHeight" : "clientWidth", C = r.reference[p] + r.reference[g] - x[g] - r.floating[p], b = x[g] - r.reference[g], v = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
5093
5122
  let O = v ? v[m] : 0;
5094
5123
  (!O || !await (o.isElement == null ? void 0 : o.isElement(v))) && (O = n.floating[m] || r.floating[p]);
5095
- const S = C / 2 - b / 2, I = O / 2 - u[p] / 2 - 1, R = rt(f[y], I), A = rt(f[E], I), L = R, M = O - u[p] - A, T = O / 2 - u[p] / 2 + S, N = _t(L, T, M), Y = !h.arrow && lt(s) != null && T !== N && r.reference[p] / 2 - (T < L ? R : A) - u[p] / 2 < 0, B = Y ? T < L ? T - L : T - M : 0;
5124
+ const S = C / 2 - b / 2, I = O / 2 - u[p] / 2 - 1, R = rt(f[y], I), A = rt(f[E], I), L = R, M = O - u[p] - A, T = O / 2 - u[p] / 2 + S, B = _t(L, T, M), Y = !h.arrow && lt(s) != null && T !== B && r.reference[p] / 2 - (T < L ? R : A) - u[p] / 2 < 0, k = Y ? T < L ? T - L : T - M : 0;
5096
5125
  return {
5097
- [g]: x[g] + B,
5126
+ [g]: x[g] + k,
5098
5127
  data: {
5099
- [g]: N,
5100
- centerOffset: T - N - B,
5128
+ [g]: B,
5129
+ centerOffset: T - B - k,
5101
5130
  ...Y && {
5102
- alignmentOffset: B
5131
+ alignmentOffset: k
5103
5132
  }
5104
5133
  },
5105
5134
  reset: Y
5106
5135
  };
5107
5136
  }
5108
- }), Li = function(a) {
5137
+ }), Ai = function(a) {
5109
5138
  return a === void 0 && (a = {}), {
5110
5139
  name: "flip",
5111
5140
  options: a,
@@ -5129,12 +5158,12 @@ const Si = (a) => ({
5129
5158
  } = at(a, t);
5130
5159
  if ((e = r.arrow) != null && e.alignmentOffset)
5131
5160
  return {};
5132
- const y = q(s), E = J(n), m = q(n) === n, C = await (h.isRTL == null ? void 0 : h.isRTL(c.floating)), b = x || (m || !u ? [xt(n)] : vi(n)), v = p !== "none";
5133
- !x && v && b.push(...Ii(n, u, p, C));
5134
- const O = [n, ...b], S = await le(t, w), I = [];
5161
+ const y = G(s), E = J(n), m = G(n) === n, C = await (h.isRTL == null ? void 0 : h.isRTL(c.floating)), b = x || (m || !u ? [xt(n)] : Ri(n)), v = p !== "none";
5162
+ !x && v && b.push(..._i(n, u, p, C));
5163
+ const O = [n, ...b], S = await he(t, w), I = [];
5135
5164
  let R = ((i = r.flip) == null ? void 0 : i.overflows) || [];
5136
5165
  if (d && I.push(S[y]), f) {
5137
- const T = bi(s, o, C);
5166
+ const T = vi(s, o, C);
5138
5167
  I.push(S[T[0]], S[T[1]]);
5139
5168
  }
5140
5169
  if (R = [...R, {
@@ -5142,23 +5171,23 @@ const Si = (a) => ({
5142
5171
  overflows: I
5143
5172
  }], !I.every((T) => T <= 0)) {
5144
5173
  var A, L;
5145
- const T = (((A = r.flip) == null ? void 0 : A.index) || 0) + 1, N = O[T];
5146
- if (N)
5174
+ const T = (((A = r.flip) == null ? void 0 : A.index) || 0) + 1, B = O[T];
5175
+ if (B)
5147
5176
  return {
5148
5177
  data: {
5149
5178
  index: T,
5150
5179
  overflows: R
5151
5180
  },
5152
5181
  reset: {
5153
- placement: N
5182
+ placement: B
5154
5183
  }
5155
5184
  };
5156
- let Y = (L = R.filter((B) => B.overflows[0] <= 0).sort((B, W) => B.overflows[1] - W.overflows[1])[0]) == null ? void 0 : L.placement;
5185
+ let Y = (L = R.filter((k) => k.overflows[0] <= 0).sort((k, W) => k.overflows[1] - W.overflows[1])[0]) == null ? void 0 : L.placement;
5157
5186
  if (!Y)
5158
5187
  switch (g) {
5159
5188
  case "bestFit": {
5160
5189
  var M;
5161
- const B = (M = R.filter((W) => {
5190
+ const k = (M = R.filter((W) => {
5162
5191
  if (v) {
5163
5192
  const P = J(W.placement);
5164
5193
  return P === E || // Create a bias to the `y` side axis due to horizontal
@@ -5166,8 +5195,8 @@ const Si = (a) => ({
5166
5195
  P === "y";
5167
5196
  }
5168
5197
  return !0;
5169
- }).map((W) => [W.placement, W.overflows.filter((P) => P > 0).reduce((P, Ee) => P + Ee, 0)]).sort((W, P) => W[1] - P[1])[0]) == null ? void 0 : M[0];
5170
- B && (Y = B);
5198
+ }).map((W) => [W.placement, W.overflows.filter((P) => P > 0).reduce((P, Ce) => P + Ce, 0)]).sort((W, P) => W[1] - P[1])[0]) == null ? void 0 : M[0];
5199
+ k && (Y = k);
5171
5200
  break;
5172
5201
  }
5173
5202
  case "initialPlacement":
@@ -5185,12 +5214,12 @@ const Si = (a) => ({
5185
5214
  }
5186
5215
  };
5187
5216
  };
5188
- async function Ai(a, t) {
5217
+ async function Ti(a, t) {
5189
5218
  const {
5190
5219
  placement: e,
5191
5220
  platform: i,
5192
5221
  elements: s
5193
- } = a, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), o = q(e), n = lt(e), h = J(e) === "y", c = ["left", "top"].includes(o) ? -1 : 1, d = r && h ? -1 : 1, f = at(t, a);
5222
+ } = a, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), o = G(e), n = lt(e), h = J(e) === "y", c = ["left", "top"].includes(o) ? -1 : 1, d = r && h ? -1 : 1, f = at(t, a);
5194
5223
  let {
5195
5224
  mainAxis: x,
5196
5225
  crossAxis: g,
@@ -5212,7 +5241,7 @@ async function Ai(a, t) {
5212
5241
  y: g * d
5213
5242
  };
5214
5243
  }
5215
- const Ti = function(a) {
5244
+ const Mi = function(a) {
5216
5245
  return a === void 0 && (a = 0), {
5217
5246
  name: "offset",
5218
5247
  options: a,
@@ -5223,7 +5252,7 @@ const Ti = function(a) {
5223
5252
  y: r,
5224
5253
  placement: o,
5225
5254
  middlewareData: n
5226
- } = t, h = await Ai(t, a);
5255
+ } = t, h = await Ti(t, a);
5227
5256
  return o === ((e = n.offset) == null ? void 0 : e.placement) && (i = n.arrow) != null && i.alignmentOffset ? {} : {
5228
5257
  x: s + h.x,
5229
5258
  y: r + h.y,
@@ -5234,7 +5263,7 @@ const Ti = function(a) {
5234
5263
  };
5235
5264
  }
5236
5265
  };
5237
- }, Mi = function(a) {
5266
+ }, Hi = function(a) {
5238
5267
  return a === void 0 && (a = {}), {
5239
5268
  name: "shift",
5240
5269
  options: a,
@@ -5262,7 +5291,7 @@ const Ti = function(a) {
5262
5291
  } = at(a, t), c = {
5263
5292
  x: e,
5264
5293
  y: i
5265
- }, d = await le(t, h), f = J(q(s)), x = ne(f);
5294
+ }, d = await he(t, h), f = J(G(s)), x = ae(f);
5266
5295
  let g = c[x], p = c[f];
5267
5296
  if (r) {
5268
5297
  const w = x === "y" ? "top" : "left", y = x === "y" ? "bottom" : "right", E = g + d[w], m = g - d[y];
@@ -5295,27 +5324,27 @@ function gt() {
5295
5324
  return typeof window < "u";
5296
5325
  }
5297
5326
  function tt(a) {
5298
- return he(a) ? (a.nodeName || "").toLowerCase() : "#document";
5327
+ return ce(a) ? (a.nodeName || "").toLowerCase() : "#document";
5299
5328
  }
5300
- function F(a) {
5329
+ function N(a) {
5301
5330
  var t;
5302
5331
  return (a == null || (t = a.ownerDocument) == null ? void 0 : t.defaultView) || window;
5303
5332
  }
5304
5333
  function V(a) {
5305
5334
  var t;
5306
- return (t = (he(a) ? a.ownerDocument : a.document) || window.document) == null ? void 0 : t.documentElement;
5335
+ return (t = (ce(a) ? a.ownerDocument : a.document) || window.document) == null ? void 0 : t.documentElement;
5307
5336
  }
5308
- function he(a) {
5309
- return gt() ? a instanceof Node || a instanceof F(a).Node : !1;
5337
+ function ce(a) {
5338
+ return gt() ? a instanceof Node || a instanceof N(a).Node : !1;
5310
5339
  }
5311
5340
  function X(a) {
5312
- return gt() ? a instanceof Element || a instanceof F(a).Element : !1;
5341
+ return gt() ? a instanceof Element || a instanceof N(a).Element : !1;
5313
5342
  }
5314
5343
  function K(a) {
5315
- return gt() ? a instanceof HTMLElement || a instanceof F(a).HTMLElement : !1;
5344
+ return gt() ? a instanceof HTMLElement || a instanceof N(a).HTMLElement : !1;
5316
5345
  }
5317
- function $t(a) {
5318
- return !gt() || typeof ShadowRoot > "u" ? !1 : a instanceof ShadowRoot || a instanceof F(a).ShadowRoot;
5346
+ function qt(a) {
5347
+ return !gt() || typeof ShadowRoot > "u" ? !1 : a instanceof ShadowRoot || a instanceof N(a).ShadowRoot;
5319
5348
  }
5320
5349
  function ht(a) {
5321
5350
  const {
@@ -5323,10 +5352,10 @@ function ht(a) {
5323
5352
  overflowX: e,
5324
5353
  overflowY: i,
5325
5354
  display: s
5326
- } = k(a);
5355
+ } = F(a);
5327
5356
  return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
5328
5357
  }
5329
- function Hi(a) {
5358
+ function Di(a) {
5330
5359
  return ["table", "td", "th"].includes(tt(a));
5331
5360
  }
5332
5361
  function wt(a) {
@@ -5339,10 +5368,10 @@ function wt(a) {
5339
5368
  });
5340
5369
  }
5341
5370
  function Dt(a) {
5342
- const t = Ft(), e = X(a) ? k(a) : a;
5371
+ const t = Nt(), e = X(a) ? F(a) : a;
5343
5372
  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));
5344
5373
  }
5345
- function Di(a) {
5374
+ function Ni(a) {
5346
5375
  let t = $(a);
5347
5376
  for (; K(t) && !Q(t); ) {
5348
5377
  if (Dt(t))
@@ -5353,14 +5382,14 @@ function Di(a) {
5353
5382
  }
5354
5383
  return null;
5355
5384
  }
5356
- function Ft() {
5385
+ function Nt() {
5357
5386
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
5358
5387
  }
5359
5388
  function Q(a) {
5360
5389
  return ["html", "body", "#document"].includes(tt(a));
5361
5390
  }
5362
- function k(a) {
5363
- return F(a).getComputedStyle(a);
5391
+ function F(a) {
5392
+ return N(a).getComputedStyle(a);
5364
5393
  }
5365
5394
  function pt(a) {
5366
5395
  return X(a) ? {
@@ -5378,19 +5407,19 @@ function $(a) {
5378
5407
  // Step into the shadow DOM of the parent of a slotted node.
5379
5408
  a.assignedSlot || // DOM Element detected.
5380
5409
  a.parentNode || // ShadowRoot detected.
5381
- $t(a) && a.host || // Fallback.
5410
+ qt(a) && a.host || // Fallback.
5382
5411
  V(a)
5383
5412
  );
5384
- return $t(t) ? t.host : t;
5413
+ return qt(t) ? t.host : t;
5385
5414
  }
5386
- function ce(a) {
5415
+ function de(a) {
5387
5416
  const t = $(a);
5388
- return Q(t) ? a.ownerDocument ? a.ownerDocument.body : a.body : K(t) && ht(t) ? t : ce(t);
5417
+ return Q(t) ? a.ownerDocument ? a.ownerDocument.body : a.body : K(t) && ht(t) ? t : de(t);
5389
5418
  }
5390
5419
  function St(a, t, e) {
5391
5420
  var i;
5392
5421
  t === void 0 && (t = []), e === void 0 && (e = !0);
5393
- const s = ce(a), r = s === ((i = a.ownerDocument) == null ? void 0 : i.body), o = F(s);
5422
+ const s = de(a), r = s === ((i = a.ownerDocument) == null ? void 0 : i.body), o = N(s);
5394
5423
  if (r) {
5395
5424
  const n = Lt(o);
5396
5425
  return t.concat(o, o.visualViewport || [], ht(s) ? s : [], n && e ? St(n) : []);
@@ -5400,8 +5429,8 @@ function St(a, t, e) {
5400
5429
  function Lt(a) {
5401
5430
  return a.parent && Object.getPrototypeOf(a.parent) ? a.frameElement : null;
5402
5431
  }
5403
- function de(a) {
5404
- const t = k(a);
5432
+ function fe(a) {
5433
+ const t = F(a);
5405
5434
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
5406
5435
  const s = K(a), r = s ? a.offsetWidth : e, o = s ? a.offsetHeight : i, n = ft(e) !== r || ft(i) !== o;
5407
5436
  return n && (e = r, i = o), {
@@ -5410,48 +5439,48 @@ function de(a) {
5410
5439
  $: n
5411
5440
  };
5412
5441
  }
5413
- function fe(a) {
5442
+ function xe(a) {
5414
5443
  return X(a) ? a : a.contextElement;
5415
5444
  }
5416
5445
  function Z(a) {
5417
- const t = fe(a);
5446
+ const t = xe(a);
5418
5447
  if (!K(t))
5419
5448
  return z(1);
5420
5449
  const e = t.getBoundingClientRect(), {
5421
5450
  width: i,
5422
5451
  height: s,
5423
5452
  $: r
5424
- } = de(t);
5453
+ } = fe(t);
5425
5454
  let o = (r ? ft(e.width) : e.width) / i, n = (r ? ft(e.height) : e.height) / s;
5426
5455
  return (!o || !Number.isFinite(o)) && (o = 1), (!n || !Number.isFinite(n)) && (n = 1), {
5427
5456
  x: o,
5428
5457
  y: n
5429
5458
  };
5430
5459
  }
5431
- const Fi = /* @__PURE__ */ z(0);
5432
- function xe(a) {
5433
- const t = F(a);
5434
- return !Ft() || !t.visualViewport ? Fi : {
5460
+ const Xi = /* @__PURE__ */ z(0);
5461
+ function ue(a) {
5462
+ const t = N(a);
5463
+ return !Nt() || !t.visualViewport ? Xi : {
5435
5464
  x: t.visualViewport.offsetLeft,
5436
5465
  y: t.visualViewport.offsetTop
5437
5466
  };
5438
5467
  }
5439
- function Xi(a, t, e) {
5440
- return t === void 0 && (t = !1), !e || t && e !== F(a) ? !1 : t;
5468
+ function Fi(a, t, e) {
5469
+ return t === void 0 && (t = !1), !e || t && e !== N(a) ? !1 : t;
5441
5470
  }
5442
5471
  function ot(a, t, e, i) {
5443
5472
  t === void 0 && (t = !1), e === void 0 && (e = !1);
5444
- const s = a.getBoundingClientRect(), r = fe(a);
5473
+ const s = a.getBoundingClientRect(), r = xe(a);
5445
5474
  let o = z(1);
5446
5475
  t && (i ? X(i) && (o = Z(i)) : o = Z(a));
5447
- const n = Xi(r, e, i) ? xe(r) : z(0);
5476
+ const n = Fi(r, e, i) ? ue(r) : z(0);
5448
5477
  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;
5449
5478
  if (r) {
5450
- const x = F(r), g = i && X(i) ? F(i) : i;
5479
+ const x = N(r), g = i && X(i) ? N(i) : i;
5451
5480
  let p = x, u = Lt(p);
5452
5481
  for (; u && i && g !== p; ) {
5453
- const w = Z(u), y = u.getBoundingClientRect(), E = k(u), m = y.left + (u.clientLeft + parseFloat(E.paddingLeft)) * w.x, C = y.top + (u.clientTop + parseFloat(E.paddingTop)) * w.y;
5454
- h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += m, c += C, p = F(u), u = Lt(p);
5482
+ const w = Z(u), y = u.getBoundingClientRect(), E = F(u), m = y.left + (u.clientLeft + parseFloat(E.paddingLeft)) * w.x, C = y.top + (u.clientTop + parseFloat(E.paddingTop)) * w.y;
5483
+ h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += m, c += C, p = N(u), u = Lt(p);
5455
5484
  }
5456
5485
  }
5457
5486
  return ut({
@@ -5461,7 +5490,7 @@ function ot(a, t, e, i) {
5461
5490
  y: c
5462
5491
  });
5463
5492
  }
5464
- function ki(a) {
5493
+ function Bi(a) {
5465
5494
  let {
5466
5495
  elements: t,
5467
5496
  rect: e,
@@ -5487,30 +5516,30 @@ function ki(a) {
5487
5516
  y: e.y * c.y - h.scrollTop * c.y + d.y
5488
5517
  };
5489
5518
  }
5490
- function Ni(a) {
5519
+ function ki(a) {
5491
5520
  return Array.from(a.getClientRects());
5492
5521
  }
5493
5522
  function At(a, t) {
5494
5523
  const e = pt(a).scrollLeft;
5495
5524
  return t ? t.left + e : ot(V(a)).left + e;
5496
5525
  }
5497
- function Bi(a) {
5526
+ function Ki(a) {
5498
5527
  const t = V(a), e = pt(a), i = a.ownerDocument.body, s = U(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = U(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5499
5528
  let o = -e.scrollLeft + At(a);
5500
5529
  const n = -e.scrollTop;
5501
- return k(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
5530
+ return F(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
5502
5531
  width: s,
5503
5532
  height: r,
5504
5533
  x: o,
5505
5534
  y: n
5506
5535
  };
5507
5536
  }
5508
- function Ki(a, t) {
5509
- const e = F(a), i = V(a), s = e.visualViewport;
5537
+ function Yi(a, t) {
5538
+ const e = N(a), i = V(a), s = e.visualViewport;
5510
5539
  let r = i.clientWidth, o = i.clientHeight, n = 0, h = 0;
5511
5540
  if (s) {
5512
5541
  r = s.width, o = s.height;
5513
- const c = Ft();
5542
+ const c = Nt();
5514
5543
  (!c || c && t === "fixed") && (n = s.offsetLeft, h = s.offsetTop);
5515
5544
  }
5516
5545
  return {
@@ -5520,7 +5549,7 @@ function Ki(a, t) {
5520
5549
  y: h
5521
5550
  };
5522
5551
  }
5523
- function Yi(a, t) {
5552
+ function Vi(a, t) {
5524
5553
  const e = ot(a, !0, t === "fixed"), i = e.top + a.clientTop, s = e.left + a.clientLeft, r = K(a) ? Z(a) : z(1), o = a.clientWidth * r.x, n = a.clientHeight * r.y, h = s * r.x, c = i * r.y;
5525
5554
  return {
5526
5555
  width: o,
@@ -5532,13 +5561,13 @@ function Yi(a, t) {
5532
5561
  function Gt(a, t, e) {
5533
5562
  let i;
5534
5563
  if (t === "viewport")
5535
- i = Ki(a, e);
5564
+ i = Yi(a, e);
5536
5565
  else if (t === "document")
5537
- i = Bi(V(a));
5566
+ i = Ki(V(a));
5538
5567
  else if (X(t))
5539
- i = Yi(t, e);
5568
+ i = Vi(t, e);
5540
5569
  else {
5541
- const s = xe(a);
5570
+ const s = ue(a);
5542
5571
  i = {
5543
5572
  ...t,
5544
5573
  x: t.x - s.x,
@@ -5547,31 +5576,31 @@ function Gt(a, t, e) {
5547
5576
  }
5548
5577
  return ut(i);
5549
5578
  }
5550
- function ue(a, t) {
5579
+ function ge(a, t) {
5551
5580
  const e = $(a);
5552
- return e === t || !X(e) || Q(e) ? !1 : k(e).position === "fixed" || ue(e, t);
5581
+ return e === t || !X(e) || Q(e) ? !1 : F(e).position === "fixed" || ge(e, t);
5553
5582
  }
5554
- function Vi(a, t) {
5583
+ function Wi(a, t) {
5555
5584
  const e = t.get(a);
5556
5585
  if (e)
5557
5586
  return e;
5558
5587
  let i = St(a, [], !1).filter((n) => X(n) && tt(n) !== "body"), s = null;
5559
- const r = k(a).position === "fixed";
5588
+ const r = F(a).position === "fixed";
5560
5589
  let o = r ? $(a) : a;
5561
5590
  for (; X(o) && !Q(o); ) {
5562
- const n = k(o), h = Dt(o);
5563
- !h && n.position === "fixed" && (s = null), (r ? !h && !s : !h && n.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ht(o) && !h && ue(a, o)) ? i = i.filter((d) => d !== o) : s = n, o = $(o);
5591
+ const n = F(o), h = Dt(o);
5592
+ !h && n.position === "fixed" && (s = null), (r ? !h && !s : !h && n.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ht(o) && !h && ge(a, o)) ? i = i.filter((d) => d !== o) : s = n, o = $(o);
5564
5593
  }
5565
5594
  return t.set(a, i), i;
5566
5595
  }
5567
- function Wi(a) {
5596
+ function Pi(a) {
5568
5597
  let {
5569
5598
  element: t,
5570
5599
  boundary: e,
5571
5600
  rootBoundary: i,
5572
5601
  strategy: s
5573
5602
  } = a;
5574
- const o = [...e === "clippingAncestors" ? wt(t) ? [] : Vi(t, this._c) : [].concat(e), i], n = o[0], h = o.reduce((c, d) => {
5603
+ const o = [...e === "clippingAncestors" ? wt(t) ? [] : Wi(t, this._c) : [].concat(e), i], n = o[0], h = o.reduce((c, d) => {
5575
5604
  const f = Gt(t, d, s);
5576
5605
  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;
5577
5606
  }, Gt(t, n, s));
@@ -5582,17 +5611,17 @@ function Wi(a) {
5582
5611
  y: h.top
5583
5612
  };
5584
5613
  }
5585
- function Pi(a) {
5614
+ function zi(a) {
5586
5615
  const {
5587
5616
  width: t,
5588
5617
  height: e
5589
- } = de(a);
5618
+ } = fe(a);
5590
5619
  return {
5591
5620
  width: t,
5592
5621
  height: e
5593
5622
  };
5594
5623
  }
5595
- function zi(a, t, e) {
5624
+ function $i(a, t, e) {
5596
5625
  const i = K(t), s = V(t), r = e === "fixed", o = ot(a, !0, r, t);
5597
5626
  let n = {
5598
5627
  scrollLeft: 0,
@@ -5619,18 +5648,18 @@ function zi(a, t, e) {
5619
5648
  };
5620
5649
  }
5621
5650
  function mt(a) {
5622
- return k(a).position === "static";
5651
+ return F(a).position === "static";
5623
5652
  }
5624
- function qt(a, t) {
5625
- if (!K(a) || k(a).position === "fixed")
5653
+ function jt(a, t) {
5654
+ if (!K(a) || F(a).position === "fixed")
5626
5655
  return null;
5627
5656
  if (t)
5628
5657
  return t(a);
5629
5658
  let e = a.offsetParent;
5630
5659
  return V(a) === e && (e = e.ownerDocument.body), e;
5631
5660
  }
5632
- function ge(a, t) {
5633
- const e = F(a);
5661
+ function we(a, t) {
5662
+ const e = N(a);
5634
5663
  if (wt(a))
5635
5664
  return e;
5636
5665
  if (!K(a)) {
@@ -5642,15 +5671,15 @@ function ge(a, t) {
5642
5671
  }
5643
5672
  return e;
5644
5673
  }
5645
- let i = qt(a, t);
5646
- for (; i && Hi(i) && mt(i); )
5647
- i = qt(i, t);
5648
- return i && Q(i) && mt(i) && !Dt(i) ? e : i || Di(a) || e;
5674
+ let i = jt(a, t);
5675
+ for (; i && Di(i) && mt(i); )
5676
+ i = jt(i, t);
5677
+ return i && Q(i) && mt(i) && !Dt(i) ? e : i || Ni(a) || e;
5649
5678
  }
5650
- const $i = async function(a) {
5651
- const t = this.getOffsetParent || ge, e = this.getDimensions, i = await e(a.floating);
5679
+ const qi = async function(a) {
5680
+ const t = this.getOffsetParent || we, e = this.getDimensions, i = await e(a.floating);
5652
5681
  return {
5653
- reference: zi(a.reference, await t(a.floating), a.strategy),
5682
+ reference: $i(a.reference, await t(a.floating), a.strategy),
5654
5683
  floating: {
5655
5684
  x: 0,
5656
5685
  y: 0,
@@ -5660,33 +5689,33 @@ const $i = async function(a) {
5660
5689
  };
5661
5690
  };
5662
5691
  function Gi(a) {
5663
- return k(a).direction === "rtl";
5692
+ return F(a).direction === "rtl";
5664
5693
  }
5665
- const qi = {
5666
- convertOffsetParentRelativeRectToViewportRelativeRect: ki,
5694
+ const ji = {
5695
+ convertOffsetParentRelativeRectToViewportRelativeRect: Bi,
5667
5696
  getDocumentElement: V,
5668
- getClippingRect: Wi,
5669
- getOffsetParent: ge,
5670
- getElementRects: $i,
5671
- getClientRects: Ni,
5672
- getDimensions: Pi,
5697
+ getClippingRect: Pi,
5698
+ getOffsetParent: we,
5699
+ getElementRects: qi,
5700
+ getClientRects: ki,
5701
+ getDimensions: zi,
5673
5702
  getScale: Z,
5674
5703
  isElement: X,
5675
5704
  isRTL: Gi
5676
- }, we = Ti, pe = Mi, ye = Li, ji = Si, me = (a, t, e) => {
5705
+ }, pe = Mi, ye = Hi, me = Ai, Ui = Li, Ee = (a, t, e) => {
5677
5706
  const i = /* @__PURE__ */ new Map(), s = {
5678
- platform: qi,
5707
+ platform: ji,
5679
5708
  ...e
5680
5709
  }, r = {
5681
5710
  ...s.platform,
5682
5711
  _c: i
5683
5712
  };
5684
- return Oi(a, t, {
5713
+ return Si(a, t, {
5685
5714
  ...s,
5686
5715
  platform: r
5687
5716
  });
5688
5717
  };
5689
- let Ui = class {
5718
+ let Zi = class {
5690
5719
  constructor(t) {
5691
5720
  l(this, "ctx");
5692
5721
  l(this, "enable", !1);
@@ -5743,7 +5772,7 @@ let Ui = class {
5743
5772
  return;
5744
5773
  this.enable = !0, this.contentEl.style.maxWidth = `${t.overflowTooltipMaxWidth || 500}px`, this.contentEl.style.minWidth = "100px", this.contentEl.style.width = "100%", this.contentEl.style.display = "inline-block", this.contentEl.style.wordBreak = "break-all", this.contentEl.style.lineHeight = "1.5", this.contentEl.innerText = e;
5745
5774
  const s = t.drawX + i.x, r = t.drawY + i.y;
5746
- me({
5775
+ Ee({
5747
5776
  getBoundingClientRect() {
5748
5777
  return {
5749
5778
  width: t.visibleWidth,
@@ -5758,7 +5787,7 @@ let Ui = class {
5758
5787
  }
5759
5788
  }, this.floatingEl, {
5760
5789
  placement: t.overflowTooltipPlacement,
5761
- middleware: [pe(), ye(), we(6), ji({ element: this.arrowEl })]
5790
+ middleware: [ye(), me(), pe(6), Ui({ element: this.arrowEl })]
5762
5791
  }).then((n) => {
5763
5792
  const { x: h, y: c, placement: d, middlewareData: f } = n;
5764
5793
  if (Object.assign(this.floatingEl.style, {
@@ -5797,7 +5826,7 @@ let Ui = class {
5797
5826
  this.contentEl.remove(), this.arrowEl.remove(), this.floatingEl.remove();
5798
5827
  }
5799
5828
  };
5800
- class Zi {
5829
+ class Ji {
5801
5830
  constructor(t) {
5802
5831
  l(this, "editorEl");
5803
5832
  l(this, "inputEl");
@@ -5939,7 +5968,7 @@ class Zi {
5939
5968
  } = this.ctx;
5940
5969
  let f = this.ctx.body.visibleHeight;
5941
5970
  if (r > f && (r = f), this.editorEl.style.display = "inline-block", this.editorEl.style.left = `${this.drawX - 1}px`, this.editorEl.style.top = `${this.drawY - 1}px`, this.editorEl.style.bottom = "auto", this.editorEl.style.maxHeight = `${f}px`, s === "text") {
5942
- this.inputEl.style.display = "block", this.inputEl.style.minWidth = `${o - 1}px`, this.inputEl.style.minHeight = `${r - 1}px`, this.inputEl.style.maxHeight = `${f}px`, this.inputEl.style.width = `${o - 1}px`, this.inputEl.style.height = "auto", this.inputEl.style.padding = `${c}px`, i !== null && (this.inputEl.value = i), this.inputEl.focus();
5971
+ this.inputEl.style.display = "block", this.inputEl.style.minWidth = `${o - 1}px`, this.inputEl.style.minHeight = `${r - 1}px`, this.inputEl.style.maxHeight = `${f}px`, this.inputEl.style.width = `${o - 1}px`, this.inputEl.style.height = "auto", this.inputEl.style.padding = `${c}px`, i !== null && (this.inputEl.value = i), this.inputEl.focus({ preventScroll: !0 });
5943
5972
  const x = this.inputEl.value.length;
5944
5973
  this.inputEl.setSelectionRange(x, x);
5945
5974
  } else
@@ -5981,7 +6010,7 @@ class Zi {
5981
6010
  r && !h && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = r, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget));
5982
6011
  }
5983
6012
  doneEdit() {
5984
- this.enable && (this.doneEditByInput(), this.ctx.emit("doneEdit", this.cellTarget), this.enable = !1, this.ctx.editing = !1, this.ctx.containerElement.focus(), this.editorEl.style.display = "none", this.ctx.emit("drawView"));
6013
+ 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"));
5985
6014
  }
5986
6015
  clearEditor() {
5987
6016
  this.doneEdit(), this.cellTarget = null, this.selectorArrStr = "", this.ctx.clearSelector(), this.ctx.focusCell = void 0, this.ctx.emit("drawView");
@@ -5991,7 +6020,7 @@ class Zi {
5991
6020
  (t = this.editorEl) == null || t.remove();
5992
6021
  }
5993
6022
  }
5994
- class Ji {
6023
+ class Qi {
5995
6024
  constructor(t) {
5996
6025
  l(this, "ctx");
5997
6026
  l(this, "emptyEl");
@@ -6015,7 +6044,7 @@ class Ji {
6015
6044
  this.emptyEl.remove();
6016
6045
  }
6017
6046
  }
6018
- class Qi {
6047
+ class ts {
6019
6048
  constructor(t) {
6020
6049
  l(this, "ctx");
6021
6050
  this.ctx = t;
@@ -6210,7 +6239,7 @@ class Qi {
6210
6239
  };
6211
6240
  }
6212
6241
  }
6213
- class ts {
6242
+ class es {
6214
6243
  constructor(t) {
6215
6244
  l(this, "ctx");
6216
6245
  l(this, "contextMenuEl");
@@ -6236,9 +6265,9 @@ class ts {
6236
6265
  }),
6237
6266
  contextElement: document.body
6238
6267
  };
6239
- me(x, this.contextMenuEl, {
6268
+ Ee(x, this.contextMenuEl, {
6240
6269
  placement: "right-start",
6241
- middleware: [we(), pe(), ye()]
6270
+ middleware: [pe(), ye(), me()]
6242
6271
  }).then(({ x: g, y: p }) => {
6243
6272
  this.show(g, p);
6244
6273
  });
@@ -6294,7 +6323,7 @@ class ts {
6294
6323
  this.contextMenuEl.remove();
6295
6324
  }
6296
6325
  }
6297
- class ss {
6326
+ class rs {
6298
6327
  constructor(t, e) {
6299
6328
  l(this, "options");
6300
6329
  l(this, "scroller");
@@ -6317,7 +6346,7 @@ class ss {
6317
6346
  r,
6318
6347
  o
6319
6348
  );
6320
- this.ctx = new xi(n, this.options), this.header = new gi(this.ctx), this.footer = new pi(this.ctx), this.body = new wi(this.ctx), this.scroller = new ui(this.ctx), this.selector = new yi(this.ctx), this.autofill = new mi(this.ctx), this.tooltip = new Ui(this.ctx), this.empty = new Ji(this.ctx), this.editor = new Zi(this.ctx), this.overlayer = new Qi(this.ctx), this.contextMenu = new ts(this.ctx), this.ctx.on("draw", () => {
6349
+ this.ctx = new ui(n, this.options), this.header = new wi(this.ctx), this.footer = new yi(this.ctx), this.body = new pi(this.ctx), this.scroller = new gi(this.ctx), this.selector = new mi(this.ctx), this.autofill = new Ei(this.ctx), this.tooltip = new Zi(this.ctx), this.empty = new Qi(this.ctx), this.editor = new Ji(this.ctx), this.overlayer = new ts(this.ctx), this.contextMenu = new es(this.ctx), this.ctx.on("draw", () => {
6321
6350
  this.draw();
6322
6351
  }), this.ctx.on("drawView", () => {
6323
6352
  this.draw(!0);
@@ -6531,10 +6560,10 @@ class ss {
6531
6560
  }
6532
6561
  getUtils() {
6533
6562
  return {
6534
- mergeColCell: oi,
6535
- mergeRowCell: ri,
6536
- getSpanArrByRow: ee,
6537
- getSpanObjByColumn: ie
6563
+ mergeColCell: ni,
6564
+ mergeRowCell: oi,
6565
+ getSpanArrByRow: ie,
6566
+ getSpanObjByColumn: se
6538
6567
  };
6539
6568
  }
6540
6569
  getColumnByKey(t) {
@@ -6549,6 +6578,6 @@ class ss {
6549
6578
  }
6550
6579
  }
6551
6580
  export {
6552
- ss as default
6581
+ rs as default
6553
6582
  };
6554
6583
  //# sourceMappingURL=index.es.js.map