e-virt-table 1.2.29 → 1.2.31

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
@@ -66,13 +66,13 @@ function Ht() {
66
66
  return (c === "x" ? t : t & 3 | 8).toString(16);
67
67
  });
68
68
  }
69
- function xt(c, t) {
69
+ function Z(c, t) {
70
70
  let e = 0, i;
71
71
  return function(...s) {
72
- const o = (/* @__PURE__ */ new Date()).getTime(), r = o - e;
73
- !e || r >= t ? (c.apply(this, s), e = o) : i || (i = setTimeout(() => {
72
+ const o = (/* @__PURE__ */ new Date()).getTime(), r = o - e, a = typeof t == "function" ? t() : t;
73
+ !e || r >= a ? (c.apply(this, s), e = o) : i || (i = setTimeout(() => {
74
74
  c.apply(this, s), e = (/* @__PURE__ */ new Date()).getTime(), i = void 0;
75
- }, t - r));
75
+ }, a - r));
76
76
  };
77
77
  }
78
78
  function Dt(c = []) {
@@ -115,10 +115,10 @@ function Nt(c = [], t = 1, e = 0) {
115
115
  };
116
116
  });
117
117
  }
118
- function et(c = []) {
118
+ function it(c = []) {
119
119
  let t = [];
120
120
  return c.forEach((e) => {
121
- e.children ? t = t.concat(et(e.children)) : t.push(e);
121
+ e.children ? t = t.concat(it(e.children)) : t.push(e);
122
122
  }), t;
123
123
  }
124
124
  const Ct = /^(\r\n|\n\r|\r|\n)/, ae = /^[^\t\r\n]+/, bt = /^\t/;
@@ -401,7 +401,7 @@ class ut extends Yt {
401
401
  n(this, "overflowTooltipMaxWidth", 500);
402
402
  n(this, "overflowTooltipPlacement", "top");
403
403
  n(this, "maxLineClamp", "auto");
404
- this.visibleWidth = this.width, this.visibleHeight = this.height, this.colIndex = s, this.rowIndex = i, this.key = l.key, this.type = l.type || "", this.editorType = l.editorType || "text", this.selectorCellValueType = l.selectorCellValueType || this.ctx.config.SELECTOR_CELL_VALUE_TYPE || "value", this.editorProps = l.editorProps || {}, this.cellType = f, this.align = l.align || this.ctx.config.COLUMNS_ALIGN, this.verticalAlign = l.verticalAlign || this.ctx.config.COLUMNS_VERTICAL_ALIGN, this.fixed = l.fixed, this.level = l.level || 0, this.operation = l.operation || !1, this.column = l, this.rules = l.rules || [], this.row = d, this.rowKey = this.cellType === "body" ? this.ctx.database.getRowKeyForRowIndex(i) : `${this.cellType}_${this.rowIndex}`, this.value = this.getValue(), this.render = l.render, this.overflowTooltipShow = l.overflowTooltipShow !== !1, this.autoRowHeight = l.autoRowHeight || this.ctx.config.AUTO_ROW_HEIGHT, this.overflowTooltipMaxWidth = l.overflowTooltipMaxWidth || 500, this.overflowTooltipPlacement = l.overflowTooltipPlacement || "top", this.renderFooter = l.renderFooter, this.hoverIconName = l.hoverIconName, this.formatter = l.formatter, this.formatterFooter = l.formatterFooter, this.maxLineClamp = l.maxLineClamp || "auto", this.update();
404
+ this.visibleWidth = this.width, this.visibleHeight = this.height, this.colIndex = s, this.rowIndex = i, this.key = l.key, this.type = l.type || "", this.editorType = l.editorType || "text", this.selectorCellValueType = l.selectorCellValueType || this.ctx.config.SELECTOR_CELL_VALUE_TYPE || "value", this.editorProps = l.editorProps || {}, this.cellType = f, this.align = l.align || this.ctx.config.COLUMNS_ALIGN, this.verticalAlign = l.verticalAlign || this.ctx.config.COLUMNS_VERTICAL_ALIGN, this.fixed = l.fixed, this.level = l.level || 0, this.operation = l.operation || !1, this.column = l, this.rules = l.rules || [], this.row = d, this.rowKey = this.cellType === "body" ? this.ctx.database.getRowKeyForRowIndex(i) : `${this.cellType}_${this.rowIndex}`, this.value = this.getValue(), this.render = l.render, this.overflowTooltipShow = l.overflowTooltipShow !== !1, this.autoRowHeight = l.autoRowHeight !== void 0 ? l.autoRowHeight : this.ctx.config.AUTO_ROW_HEIGHT, this.overflowTooltipMaxWidth = l.overflowTooltipMaxWidth || 500, this.overflowTooltipPlacement = l.overflowTooltipPlacement || "top", this.renderFooter = l.renderFooter, this.hoverIconName = l.hoverIconName, this.formatter = l.formatter, this.formatterFooter = l.formatterFooter, this.maxLineClamp = l.maxLineClamp || "auto", this.update();
405
405
  }
406
406
  setWidthHeight(e, i) {
407
407
  this.width = e, this.height = i;
@@ -691,12 +691,12 @@ class ut extends Yt {
691
691
  if (this.cellType !== "body" || !this.autoRowHeight || this.rowspan === 0)
692
692
  return 0;
693
693
  if (this.render) {
694
- const r = this.ctx.database.getOverlayerAutoHeight(this.rowIndex, this.colIndex);
695
- return this.rowspan > 1 ? r < this.visibleHeight ? 0 : Math.round(r - (this.visibleHeight - this.height)) : Math.round(r);
694
+ const a = this.ctx.database.getOverlayerAutoHeight(this.rowIndex, this.colIndex);
695
+ return this.rowspan > 1 ? a < this.visibleHeight ? 0 : Math.round(a - (this.visibleHeight - this.height)) : Math.round(a);
696
696
  }
697
697
  if (!(this.displayText && typeof this.displayText == "string"))
698
698
  return 0;
699
- const { BODY_FONT: e, CELL_PADDING: i, CELL_LINE_HEIGHT: s } = this.ctx.config, o = this.ctx.paint.calculateTextHeight(this.displayText, this.drawTextWidth, {
699
+ const { BODY_FONT: e, CELL_PADDING: i, CELL_LINE_HEIGHT: s } = this.ctx.config, o = `${this.displayText}_${this.drawTextWidth}`, r = this.ctx.paint.calculateTextHeight(this.displayText, this.drawTextWidth, {
700
700
  font: e,
701
701
  padding: i,
702
702
  align: this.align,
@@ -704,9 +704,10 @@ class ut extends Yt {
704
704
  color: this.drawTextColor,
705
705
  autoRowHeight: this.autoRowHeight,
706
706
  lineHeight: s,
707
- maxLineClamp: this.maxLineClamp
707
+ maxLineClamp: this.maxLineClamp,
708
+ cacheTextKey: o
708
709
  });
709
- return this.rowspan > 1 ? o < this.visibleHeight ? 0 : Math.round(o - (this.visibleHeight - this.height)) : Math.round(o);
710
+ return this.rowspan > 1 ? r < this.visibleHeight ? 0 : Math.round(r - (this.visibleHeight - this.height)) : Math.round(r);
710
711
  }
711
712
  // 过去跨度配置
712
713
  getSpanInfo() {
@@ -831,7 +832,11 @@ class ut extends Yt {
831
832
  drawText() {
832
833
  const { CELL_PADDING: e, BODY_FONT: i, PLACEHOLDER_COLOR: s, CELL_LINE_HEIGHT: o } = this.ctx.config, { placeholder: r } = this.column;
833
834
  let a = this.displayText, h = this.drawTextColor;
834
- return !this.ctx.database.getReadonly(this.rowKey, this.key) && r && ["", null, void 0].includes(this.text) && this.cellType === "body" && !(this.rowspan === 0 || this.colspan === 0) && (a = r, h = s), a ? (this.ellipsis = this.ctx.paint.drawText(
835
+ if (!this.ctx.database.getReadonly(this.rowKey, this.key) && r && ["", null, void 0].includes(this.text) && this.cellType === "body" && !(this.rowspan === 0 || this.colspan === 0) && (a = r, h = s), !a)
836
+ return !1;
837
+ typeof a != "string" && (a = `${a}`);
838
+ const d = `${a}_${this.drawTextWidth}`;
839
+ return this.ellipsis = this.ctx.paint.drawText(
835
840
  a,
836
841
  this.drawTextX,
837
842
  this.drawTextY,
@@ -845,9 +850,10 @@ class ut extends Yt {
845
850
  color: h,
846
851
  autoRowHeight: this.autoRowHeight,
847
852
  lineHeight: o,
848
- maxLineClamp: this.maxLineClamp
853
+ maxLineClamp: this.maxLineClamp,
854
+ cacheTextKey: d
849
855
  }
850
- ), this.ellipsis) : !1;
856
+ ), this.ellipsis;
851
857
  }
852
858
  drawImage() {
853
859
  if (this.drawSelectionImageSource && this.ctx.paint.drawImage(
@@ -1028,8 +1034,8 @@ class ue {
1028
1034
  }
1029
1035
  // 初始化默认不忽略清空改变值和校验map
1030
1036
  init(t = !0) {
1031
- this.clearBufferData(), this.rowKeyMap.clear(), this.checkboxKeyMap.clear(), this.colIndexKeyMap.clear(), this.rowIndexRowKeyMap.clear(), this.rowKeyRowIndexMap.clear();
1032
- const e = this.getColumns(), i = et(e);
1037
+ this.ctx.paint.clearTextCache(), this.clearBufferData(), this.rowKeyMap.clear(), this.checkboxKeyMap.clear(), this.colIndexKeyMap.clear(), this.rowIndexRowKeyMap.clear(), this.rowKeyRowIndexMap.clear();
1038
+ const e = this.getColumns(), i = it(e);
1033
1039
  if (this.ctx.hasSelection = i.some((s) => s.type === "selection"), this.ctx.hasTree = i.some((s) => s.type === "tree"), t) {
1034
1040
  this.originalDataMap.clear(), this.changedDataMap.clear(), this.validationErrorMap.clear();
1035
1041
  const { ROW_KEY: s } = this.ctx.config;
@@ -2295,10 +2301,14 @@ class me {
2295
2301
  class pe {
2296
2302
  constructor(t) {
2297
2303
  n(this, "ctx");
2304
+ n(this, "textCacheMap", /* @__PURE__ */ new Map());
2298
2305
  const e = t.getContext("2d");
2299
2306
  if (!e) throw new Error("canvas context not found");
2300
2307
  this.ctx = e;
2301
2308
  }
2309
+ clearTextCache() {
2310
+ this.textCacheMap.clear();
2311
+ }
2302
2312
  scale(t) {
2303
2313
  this.ctx.setTransform(1, 0, 0, 1, 0, 0), this.ctx.scale(t, t);
2304
2314
  }
@@ -2403,7 +2413,7 @@ class pe {
2403
2413
  if (s <= E + d * 2 + w + m)
2404
2414
  return this.ctx.restore(), R = !0, R;
2405
2415
  const C = Math.round((o - 2 * d) / p);
2406
- let I = this.wrapText(t, y), S = Math.min(I.length, Math.max(C, 1));
2416
+ let I = this.wrapText(t, y, r.cacheTextKey), S = Math.min(I.length, Math.max(C, 1));
2407
2417
  u === "auto" && x ? S = I.length : typeof u == "number" && u < C ? S = u : (u === 1 && !x && (I = [t], S = 1), u === "auto" && C === 1 && (I = [t], S = 1));
2408
2418
  let _ = i + d;
2409
2419
  const v = Math.round(S * p);
@@ -2443,31 +2453,34 @@ class pe {
2443
2453
  * @param maxWidth
2444
2454
  * @returns
2445
2455
  */
2446
- wrapText(t, e) {
2456
+ wrapText(t, e, i = "") {
2447
2457
  if (!t) return [""];
2448
- const i = [], s = t.split(`
2458
+ if (i && this.textCacheMap.has(i))
2459
+ return this.textCacheMap.get(i) || [""];
2460
+ const s = [], o = t.split(`
2449
2461
  `);
2450
- for (const o of s) {
2451
- if (o === "") {
2452
- i.push("");
2462
+ for (const a of o) {
2463
+ if (a === "") {
2464
+ s.push("");
2453
2465
  continue;
2454
2466
  }
2455
- const r = o.split("");
2456
- let a = "";
2457
- for (const h of r) {
2458
- const l = a + h;
2459
- this.ctx.measureText(l).width <= e ? a = l : a ? (i.push(a), a = h) : (i.push(h), a = "");
2467
+ const h = a.split("");
2468
+ let l = "";
2469
+ for (const d of h) {
2470
+ const f = l + d;
2471
+ this.ctx.measureText(f).width <= e ? l = f : l ? (s.push(l), l = d) : (s.push(d), l = "");
2460
2472
  }
2461
- a && i.push(a);
2473
+ l && s.push(l);
2462
2474
  }
2463
- if (i.length >= 1) {
2464
- const o = i[i.length - 1], { ellipsis: r } = this.handleEllipsis(o, e, 0, this.ctx.font);
2465
- if (r) {
2466
- const a = o.slice(0, -1);
2467
- i[i.length - 1] = a, i.push(o.slice(-1));
2475
+ if (s.length >= 1) {
2476
+ const a = s[s.length - 1], { ellipsis: h } = this.handleEllipsis(a, e, 0, this.ctx.font);
2477
+ if (h) {
2478
+ const l = a.slice(0, -1);
2479
+ s[s.length - 1] = l, s.push(a.slice(-1));
2468
2480
  }
2469
2481
  }
2470
- return i.length > 0 ? i : [""];
2482
+ const r = s.length > 0 ? s : [""];
2483
+ return i && this.textCacheMap.set(i, r), r;
2471
2484
  }
2472
2485
  /**
2473
2486
  * 计算文本自适应高度
@@ -2477,12 +2490,19 @@ class pe {
2477
2490
  * @returns 计算出的高度
2478
2491
  */
2479
2492
  calculateTextHeight(t = "", e, i = {}) {
2480
- var w;
2481
- const { font: s = "12px Arial", padding: o = 0, align: r = "center", color: a = "#495060", maxLineClamp: h = 1 } = i;
2493
+ var m;
2494
+ const {
2495
+ font: s = "12px Arial",
2496
+ padding: o = 0,
2497
+ align: r = "center",
2498
+ color: a = "#495060",
2499
+ maxLineClamp: h = 1,
2500
+ cacheTextKey: l = ""
2501
+ } = i;
2482
2502
  this.ctx.save(), this.ctx.font = s, this.ctx.fillStyle = a, this.ctx.textAlign = r;
2483
- const l = parseInt(((w = s.match(/\d+/)) == null ? void 0 : w[0]) || "12"), d = l * (i.lineHeight || 1.2), f = e - o * 2, u = this.wrapText(t, f);
2484
- let x = 1;
2485
- return h === "auto" ? x = u.length : u.length > h ? x = h : x = u.length, this.ctx.restore(), Math.max(Math.floor(x * d + o * 2), Math.floor(l + o * 2));
2503
+ const d = parseInt(((m = s.match(/\d+/)) == null ? void 0 : m[0]) || "12"), f = d * (i.lineHeight || 1.2), u = e - o * 2, x = this.wrapText(t, u, l);
2504
+ let w = 1;
2505
+ return h === "auto" ? w = x.length : x.length > h ? w = h : w = x.length, this.ctx.restore(), Math.max(Math.floor(w * f + o * 2), Math.floor(d + o * 2));
2486
2506
  }
2487
2507
  handleEllipsis(t, e, i = 0, s = "12px Arial") {
2488
2508
  this.ctx.save();
@@ -2519,6 +2539,8 @@ class It {
2519
2539
  n(this, "_config", {});
2520
2540
  /** CSS 类名前缀 */
2521
2541
  n(this, "CSS_PREFIX", "e-virt-table");
2542
+ /** 绘制时间 */
2543
+ n(this, "DRAW_TIME_MULTIPLIER", 2);
2522
2544
  /** 图标集合 */
2523
2545
  n(this, "ICONS", []);
2524
2546
  /** 行的唯一标识键 */
@@ -2975,7 +2997,7 @@ class Ce {
2975
2997
  return this.icons.get(t);
2976
2998
  }
2977
2999
  }
2978
- class lt extends Yt {
3000
+ class ct extends Yt {
2979
3001
  constructor(e, i, s, o, r, a, h) {
2980
3002
  super(e, s, o, r, a, "header", h.fixed);
2981
3003
  n(this, "align");
@@ -3083,7 +3105,7 @@ class lt extends Yt {
3083
3105
  const {
3084
3106
  paint: e,
3085
3107
  config: { HEADER_FONT: i, CELL_PADDING: s }
3086
- } = this.ctx;
3108
+ } = this.ctx, o = `${this.displayText}_${this.drawTextWidth}`;
3087
3109
  this.ellipsis = e.drawText(
3088
3110
  this.displayText,
3089
3111
  this.drawTextX,
@@ -3101,11 +3123,12 @@ class lt extends Yt {
3101
3123
  // 排序图标占位
3102
3124
  offsetLeft: this.required ? 12 : 0,
3103
3125
  // 必填星号占位
3104
- textCallback: (o) => {
3105
- this.column.sortBy && (this.drawSortImageX = o.right + 4, this.drawSortImageY = o.top + (o.height - 16) / 2), this.required && e.drawText(
3126
+ cacheTextKey: o,
3127
+ textCallback: (r) => {
3128
+ this.column.sortBy && (this.drawSortImageX = r.right + 4, this.drawSortImageY = r.top + (r.height - 16) / 2), this.required && e.drawText(
3106
3129
  "*",
3107
- o.left - 18,
3108
- o.top + (o.height - 12) / 2,
3130
+ r.left - 18,
3131
+ r.top + (r.height - 12) / 2,
3109
3132
  24,
3110
3133
  24,
3111
3134
  {
@@ -3162,7 +3185,7 @@ class lt extends Yt {
3162
3185
  ));
3163
3186
  }
3164
3187
  getText() {
3165
- return this.render ? "" : this.text;
3188
+ return this.render ? "" : `${this.text}`;
3166
3189
  }
3167
3190
  /**
3168
3191
  * 获取样式
@@ -3300,7 +3323,7 @@ class be {
3300
3323
  t.drawSelectionImageWidth,
3301
3324
  t.drawSelectionImageHeight
3302
3325
  ))
3303
- if (t instanceof lt)
3326
+ if (t instanceof ct)
3304
3327
  t.drawSelectionImageName === "checkbox-uncheck" || t.drawSelectionImageName === "checkbox-indeterminate" ? this.ctx.database.toggleAllSelection() : t.drawSelectionImageName === "checkbox-check" && this.ctx.database.clearSelection(!0);
3305
3328
  else {
3306
3329
  if (!this.ctx.database.getRowSelectable(t.rowKey))
@@ -3365,7 +3388,7 @@ class be {
3365
3388
  */
3366
3389
  imageEnterAndLeave(t, e) {
3367
3390
  const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), o = i, r = s;
3368
- if (t instanceof lt) {
3391
+ if (t instanceof ct) {
3369
3392
  if (t.drawSelectionImageSource && this.isInsideElement(
3370
3393
  r,
3371
3394
  o,
@@ -3580,6 +3603,7 @@ class Re {
3580
3603
  n(this, "database");
3581
3604
  n(this, "history");
3582
3605
  n(this, "config");
3606
+ n(this, "drawTime", 0);
3583
3607
  const {
3584
3608
  containerElement: i,
3585
3609
  stageElement: s,
@@ -3950,7 +3974,7 @@ class ve {
3950
3974
  n(this, "renderFixedCellHeaders", []);
3951
3975
  this.ctx = t, this.ctx.on(
3952
3976
  "resetHeader",
3953
- xt(() => {
3977
+ Z(() => {
3954
3978
  this.init(), this.ctx.emit("draw");
3955
3979
  }, 100)
3956
3980
  ), this.init(), this.initResizeColumn();
@@ -3960,7 +3984,7 @@ class ve {
3960
3984
  config: { HEADER_HEIGHT: t, SCROLLER_TRACK_SIZE: e }
3961
3985
  } = this.ctx, i = this.ctx.database.getColumns();
3962
3986
  this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [];
3963
- const s = Dt(i), o = et(i);
3987
+ const s = Dt(i), o = it(i);
3964
3988
  this.height = t * s, this.width = o.reduce((f, u) => {
3965
3989
  const x = u.width || 100, { maxWidth: w, minWidth: m } = u;
3966
3990
  return w && x > w ? f + w : m && x < m ? f + m : f + x;
@@ -4066,8 +4090,8 @@ class ve {
4066
4090
  for (let r = 0; r < i; r++) {
4067
4091
  const a = t[r], h = o * (a.rowspan || 0), l = o * (a.level || 0);
4068
4092
  let { minWidth: d, maxWidth: f } = a, u = a.width || 100;
4069
- d && u < d && (u = d), f && u > f && (u = f), a.children && (u = et(a.children).reduce((m, g) => m + ((g == null ? void 0 : g.width) || 100), 0));
4070
- const x = new lt(this.ctx, this.columnIndex, s, l, u, h, a);
4093
+ d && u < d && (u = d), f && u > f && (u = f), a.children && (u = it(a.children).reduce((m, g) => m + ((g == null ? void 0 : g.width) || 100), 0));
4094
+ const x = new ct(this.ctx, this.columnIndex, s, l, u, h, a);
4071
4095
  this.ctx.database.setHeader(a.key, x), this.allCellHeaders.push(x), a.children || (this.leafCellHeaders.push(x), x.column.widthFillDisable || this.resizeNum++), a.fixed === "left" ? this.fixedLeftCellHeaders.push(x) : a.fixed === "right" ? this.fixedRightCellHeaders.push(x) : this.centerCellHeaders.push(x), !a.children && this.columnIndex++, a.children && this.render(a.children, s), s += u;
4072
4096
  }
4073
4097
  }
@@ -4534,7 +4558,7 @@ class Te {
4534
4558
  this.moveFocus(t);
4535
4559
  }), this.ctx.on(
4536
4560
  "mousemove",
4537
- xt((t) => {
4561
+ Z((t) => {
4538
4562
  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;
4539
4563
  (this.ctx.selectorMove || this.ctx.autofillMove) && (!s && !this.mousedownHeader ? this.startAdjustPosition(t) : this.stopAdjustPosition());
4540
4564
  }, 100)
@@ -5189,7 +5213,7 @@ class Oe {
5189
5213
  destroy() {
5190
5214
  }
5191
5215
  }
5192
- const j = Math.min, $ = Math.max, it = Math.round, B = (c) => ({
5216
+ const j = Math.min, $ = Math.max, st = Math.round, B = (c) => ({
5193
5217
  x: c,
5194
5218
  y: c
5195
5219
  }), Le = {
@@ -5201,16 +5225,16 @@ const j = Math.min, $ = Math.max, it = Math.round, B = (c) => ({
5201
5225
  start: "end",
5202
5226
  end: "start"
5203
5227
  };
5204
- function ct(c, t, e) {
5228
+ function dt(c, t, e) {
5205
5229
  return $(c, j(t, e));
5206
5230
  }
5207
- function J(c, t) {
5231
+ function Q(c, t) {
5208
5232
  return typeof c == "function" ? c(t) : c;
5209
5233
  }
5210
5234
  function z(c) {
5211
5235
  return c.split("-")[0];
5212
5236
  }
5213
- function Q(c) {
5237
+ function tt(c) {
5214
5238
  return c.split("-")[1];
5215
5239
  }
5216
5240
  function Kt(c) {
@@ -5228,15 +5252,15 @@ function mt(c) {
5228
5252
  }
5229
5253
  function He(c, t, e) {
5230
5254
  e === void 0 && (e = !1);
5231
- const i = Q(c), s = mt(c), o = wt(s);
5255
+ const i = tt(c), s = mt(c), o = wt(s);
5232
5256
  let r = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
5233
- return t.reference[o] > t.floating[o] && (r = st(r)), [r, st(r)];
5257
+ return t.reference[o] > t.floating[o] && (r = ot(r)), [r, ot(r)];
5234
5258
  }
5235
5259
  function De(c) {
5236
- const t = st(c);
5237
- return [dt(c), t, dt(t)];
5260
+ const t = ot(c);
5261
+ return [ft(c), t, ft(t)];
5238
5262
  }
5239
- function dt(c) {
5263
+ function ft(c) {
5240
5264
  return c.replace(/start|end/g, (t) => Me[t]);
5241
5265
  }
5242
5266
  const _t = ["left", "right"], Tt = ["right", "left"], Ne = ["top", "bottom"], ke = ["bottom", "top"];
@@ -5253,11 +5277,11 @@ function Xe(c, t, e) {
5253
5277
  }
5254
5278
  }
5255
5279
  function Ye(c, t, e, i) {
5256
- const s = Q(c);
5280
+ const s = tt(c);
5257
5281
  let o = Xe(z(c), e === "start", i);
5258
- return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(dt)))), o;
5282
+ return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(ft)))), o;
5259
5283
  }
5260
- function st(c) {
5284
+ function ot(c) {
5261
5285
  return c.replace(/left|right|bottom|top/g, (t) => Le[t]);
5262
5286
  }
5263
5287
  function Be(c) {
@@ -5277,7 +5301,7 @@ function Wt(c) {
5277
5301
  left: c
5278
5302
  };
5279
5303
  }
5280
- function ot(c) {
5304
+ function rt(c) {
5281
5305
  const {
5282
5306
  x: t,
5283
5307
  y: e,
@@ -5333,7 +5357,7 @@ function Ot(c, t, e) {
5333
5357
  y: i.y
5334
5358
  };
5335
5359
  }
5336
- switch (Q(t)) {
5360
+ switch (tt(t)) {
5337
5361
  case "start":
5338
5362
  x[r] -= u * (e && l ? -1 : 1);
5339
5363
  break;
@@ -5420,7 +5444,7 @@ async function Ft(c, t) {
5420
5444
  elementContext: f = "floating",
5421
5445
  altBoundary: u = !1,
5422
5446
  padding: x = 0
5423
- } = J(t, c), w = Wt(x), g = a[u ? f === "floating" ? "reference" : "floating" : f], p = ot(await o.getClippingRect({
5447
+ } = Q(t, c), w = Wt(x), g = a[u ? f === "floating" ? "reference" : "floating" : f], p = rt(await o.getClippingRect({
5424
5448
  element: (e = await (o.isElement == null ? void 0 : o.isElement(g))) == null || e ? g : g.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(a.floating)),
5425
5449
  boundary: l,
5426
5450
  rootBoundary: d,
@@ -5436,7 +5460,7 @@ async function Ft(c, t) {
5436
5460
  } : {
5437
5461
  x: 1,
5438
5462
  y: 1
5439
- }, C = ot(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
5463
+ }, C = rt(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
5440
5464
  elements: a,
5441
5465
  rect: y,
5442
5466
  offsetParent: E,
@@ -5464,7 +5488,7 @@ const We = (c) => ({
5464
5488
  } = t, {
5465
5489
  element: l,
5466
5490
  padding: d = 0
5467
- } = J(c, t) || {};
5491
+ } = Q(c, t) || {};
5468
5492
  if (l == null)
5469
5493
  return {};
5470
5494
  const f = Wt(d), u = {
@@ -5473,7 +5497,7 @@ const We = (c) => ({
5473
5497
  }, x = mt(s), w = wt(x), m = await r.getDimensions(l), g = x === "y", p = g ? "top" : "left", y = g ? "bottom" : "right", E = g ? "clientHeight" : "clientWidth", R = o.reference[w] + o.reference[x] - u[x] - o.floating[w], C = u[x] - o.reference[x], I = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l));
5474
5498
  let S = I ? I[E] : 0;
5475
5499
  (!S || !await (r.isElement == null ? void 0 : r.isElement(I))) && (S = a.floating[E] || o.floating[w]);
5476
- const _ = R / 2 - C / 2, v = S / 2 - m[w] / 2 - 1, b = j(f[p], v), O = j(f[y], v), T = b, M = S - m[w] - O, L = S / 2 - m[w] / 2 + _, A = ct(T, L, M), D = !h.arrow && Q(s) != null && L !== A && o.reference[w] / 2 - (L < T ? b : O) - m[w] / 2 < 0, N = D ? L < T ? L - T : L - M : 0;
5500
+ const _ = R / 2 - C / 2, v = S / 2 - m[w] / 2 - 1, b = j(f[p], v), O = j(f[y], v), T = b, M = S - m[w] - O, L = S / 2 - m[w] / 2 + _, A = dt(T, L, M), D = !h.arrow && tt(s) != null && L !== A && o.reference[w] / 2 - (L < T ? b : O) - m[w] / 2 < 0, N = D ? L < T ? L - T : L - M : 0;
5477
5501
  return {
5478
5502
  [x]: u[x] + N,
5479
5503
  data: {
@@ -5507,10 +5531,10 @@ const We = (c) => ({
5507
5531
  fallbackAxisSideDirection: w = "none",
5508
5532
  flipAlignment: m = !0,
5509
5533
  ...g
5510
- } = J(c, t);
5534
+ } = Q(c, t);
5511
5535
  if ((e = o.arrow) != null && e.alignmentOffset)
5512
5536
  return {};
5513
- const p = z(s), y = V(a), E = z(a) === a, R = await (h.isRTL == null ? void 0 : h.isRTL(l.floating)), C = u || (E || !m ? [st(a)] : De(a)), I = w !== "none";
5537
+ const p = z(s), y = V(a), E = z(a) === a, R = await (h.isRTL == null ? void 0 : h.isRTL(l.floating)), C = u || (E || !m ? [ot(a)] : De(a)), I = w !== "none";
5514
5538
  !u && I && C.push(...Ye(a, m, w, R));
5515
5539
  const S = [a, ...C], _ = await Ft(t, g), v = [];
5516
5540
  let b = ((i = o.flip) == null ? void 0 : i.overflows) || [];
@@ -5573,7 +5597,7 @@ async function Pe(c, t) {
5573
5597
  placement: e,
5574
5598
  platform: i,
5575
5599
  elements: s
5576
- } = c, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = z(e), a = Q(e), h = V(e) === "y", l = Ve.has(r) ? -1 : 1, d = o && h ? -1 : 1, f = J(t, c);
5600
+ } = c, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = z(e), a = tt(e), h = V(e) === "y", l = Ve.has(r) ? -1 : 1, d = o && h ? -1 : 1, f = Q(t, c);
5577
5601
  let {
5578
5602
  mainAxis: u,
5579
5603
  crossAxis: x,
@@ -5642,18 +5666,18 @@ const ze = function(c) {
5642
5666
  }
5643
5667
  },
5644
5668
  ...h
5645
- } = J(c, t), l = {
5669
+ } = Q(c, t), l = {
5646
5670
  x: e,
5647
5671
  y: i
5648
5672
  }, d = await Ft(t, h), f = V(z(s)), u = Kt(f);
5649
5673
  let x = l[u], w = l[f];
5650
5674
  if (o) {
5651
5675
  const g = u === "y" ? "top" : "left", p = u === "y" ? "bottom" : "right", y = x + d[g], E = x - d[p];
5652
- x = ct(y, x, E);
5676
+ x = dt(y, x, E);
5653
5677
  }
5654
5678
  if (r) {
5655
5679
  const g = f === "y" ? "top" : "left", p = f === "y" ? "bottom" : "right", y = w + d[g], E = w - d[p];
5656
- w = ct(y, w, E);
5680
+ w = dt(y, w, E);
5657
5681
  }
5658
5682
  const m = a.fn({
5659
5683
  ...t,
@@ -5674,10 +5698,10 @@ const ze = function(c) {
5674
5698
  }
5675
5699
  };
5676
5700
  };
5677
- function rt() {
5701
+ function nt() {
5678
5702
  return typeof window < "u";
5679
5703
  }
5680
- function Z(c) {
5704
+ function q(c) {
5681
5705
  return Vt(c) ? (c.nodeName || "").toLowerCase() : "#document";
5682
5706
  }
5683
5707
  function H(c) {
@@ -5689,19 +5713,19 @@ function W(c) {
5689
5713
  return (t = (Vt(c) ? c.ownerDocument : c.document) || window.document) == null ? void 0 : t.documentElement;
5690
5714
  }
5691
5715
  function Vt(c) {
5692
- return rt() ? c instanceof Node || c instanceof H(c).Node : !1;
5716
+ return nt() ? c instanceof Node || c instanceof H(c).Node : !1;
5693
5717
  }
5694
5718
  function X(c) {
5695
- return rt() ? c instanceof Element || c instanceof H(c).Element : !1;
5719
+ return nt() ? c instanceof Element || c instanceof H(c).Element : !1;
5696
5720
  }
5697
5721
  function K(c) {
5698
- return rt() ? c instanceof HTMLElement || c instanceof H(c).HTMLElement : !1;
5722
+ return nt() ? c instanceof HTMLElement || c instanceof H(c).HTMLElement : !1;
5699
5723
  }
5700
5724
  function Lt(c) {
5701
- return !rt() || typeof ShadowRoot > "u" ? !1 : c instanceof ShadowRoot || c instanceof H(c).ShadowRoot;
5725
+ return !nt() || typeof ShadowRoot > "u" ? !1 : c instanceof ShadowRoot || c instanceof H(c).ShadowRoot;
5702
5726
  }
5703
5727
  const Ge = /* @__PURE__ */ new Set(["inline", "contents"]);
5704
- function tt(c) {
5728
+ function et(c) {
5705
5729
  const {
5706
5730
  overflow: t,
5707
5731
  overflowX: e,
@@ -5711,12 +5735,12 @@ function tt(c) {
5711
5735
  return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !Ge.has(s);
5712
5736
  }
5713
5737
  const Ue = /* @__PURE__ */ new Set(["table", "td", "th"]);
5714
- function Ze(c) {
5715
- return Ue.has(Z(c));
5738
+ function qe(c) {
5739
+ return Ue.has(q(c));
5716
5740
  }
5717
- const je = [":popover-open", ":modal"];
5718
- function nt(c) {
5719
- return je.some((t) => {
5741
+ const Ze = [":popover-open", ":modal"];
5742
+ function at(c) {
5743
+ return Ze.some((t) => {
5720
5744
  try {
5721
5745
  return c.matches(t);
5722
5746
  } catch {
@@ -5724,17 +5748,17 @@ function nt(c) {
5724
5748
  }
5725
5749
  });
5726
5750
  }
5727
- const qe = ["transform", "translate", "scale", "rotate", "perspective"], Je = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Qe = ["paint", "layout", "strict", "content"];
5751
+ const je = ["transform", "translate", "scale", "rotate", "perspective"], Je = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Qe = ["paint", "layout", "strict", "content"];
5728
5752
  function pt(c) {
5729
5753
  const t = Et(), e = X(c) ? Y(c) : c;
5730
- return qe.some((i) => e[i] ? e[i] !== "none" : !1) || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || Je.some((i) => (e.willChange || "").includes(i)) || Qe.some((i) => (e.contain || "").includes(i));
5754
+ return je.some((i) => e[i] ? e[i] !== "none" : !1) || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || Je.some((i) => (e.willChange || "").includes(i)) || Qe.some((i) => (e.contain || "").includes(i));
5731
5755
  }
5732
5756
  function ti(c) {
5733
5757
  let t = P(c);
5734
5758
  for (; K(t) && !U(t); ) {
5735
5759
  if (pt(t))
5736
5760
  return t;
5737
- if (nt(t))
5761
+ if (at(t))
5738
5762
  return null;
5739
5763
  t = P(t);
5740
5764
  }
@@ -5745,12 +5769,12 @@ function Et() {
5745
5769
  }
5746
5770
  const ei = /* @__PURE__ */ new Set(["html", "body", "#document"]);
5747
5771
  function U(c) {
5748
- return ei.has(Z(c));
5772
+ return ei.has(q(c));
5749
5773
  }
5750
5774
  function Y(c) {
5751
5775
  return H(c).getComputedStyle(c);
5752
5776
  }
5753
- function at(c) {
5777
+ function ht(c) {
5754
5778
  return X(c) ? {
5755
5779
  scrollLeft: c.scrollLeft,
5756
5780
  scrollTop: c.scrollTop
@@ -5760,7 +5784,7 @@ function at(c) {
5760
5784
  };
5761
5785
  }
5762
5786
  function P(c) {
5763
- if (Z(c) === "html")
5787
+ if (q(c) === "html")
5764
5788
  return c;
5765
5789
  const t = (
5766
5790
  // Step into the shadow DOM of the parent of a slotted node.
@@ -5773,21 +5797,21 @@ function P(c) {
5773
5797
  }
5774
5798
  function Pt(c) {
5775
5799
  const t = P(c);
5776
- return U(t) ? c.ownerDocument ? c.ownerDocument.body : c.body : K(t) && tt(t) ? t : Pt(t);
5800
+ return U(t) ? c.ownerDocument ? c.ownerDocument.body : c.body : K(t) && et(t) ? t : Pt(t);
5777
5801
  }
5778
5802
  function zt(c, t, e) {
5779
5803
  var i;
5780
5804
  t === void 0 && (t = []);
5781
5805
  const s = Pt(c), o = s === ((i = c.ownerDocument) == null ? void 0 : i.body), r = H(s);
5782
- return o ? (ft(r), t.concat(r, r.visualViewport || [], tt(s) ? s : [], [])) : t.concat(s, zt(s, []));
5806
+ return o ? (xt(r), t.concat(r, r.visualViewport || [], et(s) ? s : [], [])) : t.concat(s, zt(s, []));
5783
5807
  }
5784
- function ft(c) {
5808
+ function xt(c) {
5785
5809
  return c.parent && Object.getPrototypeOf(c.parent) ? c.frameElement : null;
5786
5810
  }
5787
5811
  function $t(c) {
5788
5812
  const t = Y(c);
5789
5813
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
5790
- const s = K(c), o = s ? c.offsetWidth : e, r = s ? c.offsetHeight : i, a = it(e) !== o || it(i) !== r;
5814
+ const s = K(c), o = s ? c.offsetWidth : e, r = s ? c.offsetHeight : i, a = st(e) !== o || st(i) !== r;
5791
5815
  return a && (e = o, i = r), {
5792
5816
  width: e,
5793
5817
  height: i,
@@ -5806,7 +5830,7 @@ function G(c) {
5806
5830
  height: s,
5807
5831
  $: o
5808
5832
  } = $t(t);
5809
- let r = (o ? it(e.width) : e.width) / i, a = (o ? it(e.height) : e.height) / s;
5833
+ let r = (o ? st(e.width) : e.width) / i, a = (o ? st(e.height) : e.height) / s;
5810
5834
  return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
5811
5835
  x: r,
5812
5836
  y: a
@@ -5823,7 +5847,7 @@ function Ut(c) {
5823
5847
  function si(c, t, e) {
5824
5848
  return t === void 0 && (t = !1), !e || t && e !== H(c) ? !1 : t;
5825
5849
  }
5826
- function q(c, t, e, i) {
5850
+ function J(c, t, e, i) {
5827
5851
  t === void 0 && (t = !1), e === void 0 && (e = !1);
5828
5852
  const s = c.getBoundingClientRect(), o = Gt(c);
5829
5853
  let r = B(1);
@@ -5832,13 +5856,13 @@ function q(c, t, e, i) {
5832
5856
  let h = (s.left + a.x) / r.x, l = (s.top + a.y) / r.y, d = s.width / r.x, f = s.height / r.y;
5833
5857
  if (o) {
5834
5858
  const u = H(o), x = i && X(i) ? H(i) : i;
5835
- let w = u, m = ft(w);
5859
+ let w = u, m = xt(w);
5836
5860
  for (; m && i && x !== w; ) {
5837
5861
  const g = G(m), p = m.getBoundingClientRect(), y = Y(m), E = p.left + (m.clientLeft + parseFloat(y.paddingLeft)) * g.x, R = p.top + (m.clientTop + parseFloat(y.paddingTop)) * g.y;
5838
- h *= g.x, l *= g.y, d *= g.x, f *= g.y, h += E, l += R, w = H(m), m = ft(w);
5862
+ h *= g.x, l *= g.y, d *= g.x, f *= g.y, h += E, l += R, w = H(m), m = xt(w);
5839
5863
  }
5840
5864
  }
5841
- return ot({
5865
+ return rt({
5842
5866
  width: d,
5843
5867
  height: f,
5844
5868
  x: h,
@@ -5846,10 +5870,10 @@ function q(c, t, e, i) {
5846
5870
  });
5847
5871
  }
5848
5872
  function yt(c, t) {
5849
- const e = at(c).scrollLeft;
5850
- return t ? t.left + e : q(W(c)).left + e;
5873
+ const e = ht(c).scrollLeft;
5874
+ return t ? t.left + e : J(W(c)).left + e;
5851
5875
  }
5852
- function Zt(c, t, e) {
5876
+ function qt(c, t, e) {
5853
5877
  e === void 0 && (e = !1);
5854
5878
  const i = c.getBoundingClientRect(), s = i.left + t.scrollLeft - (e ? 0 : (
5855
5879
  // RTL <body> scrollbar.
@@ -5867,7 +5891,7 @@ function oi(c) {
5867
5891
  offsetParent: i,
5868
5892
  strategy: s
5869
5893
  } = c;
5870
- const o = s === "fixed", r = W(i), a = t ? nt(t.floating) : !1;
5894
+ const o = s === "fixed", r = W(i), a = t ? at(t.floating) : !1;
5871
5895
  if (i === r || a && o)
5872
5896
  return e;
5873
5897
  let h = {
@@ -5875,11 +5899,11 @@ function oi(c) {
5875
5899
  scrollTop: 0
5876
5900
  }, l = B(1);
5877
5901
  const d = B(0), f = K(i);
5878
- if ((f || !f && !o) && ((Z(i) !== "body" || tt(r)) && (h = at(i)), K(i))) {
5879
- const x = q(i);
5902
+ if ((f || !f && !o) && ((q(i) !== "body" || et(r)) && (h = ht(i)), K(i))) {
5903
+ const x = J(i);
5880
5904
  l = G(i), d.x = x.x + i.clientLeft, d.y = x.y + i.clientTop;
5881
5905
  }
5882
- const u = r && !f && !o ? Zt(r, h, !0) : B(0);
5906
+ const u = r && !f && !o ? qt(r, h, !0) : B(0);
5883
5907
  return {
5884
5908
  width: e.width * l.x,
5885
5909
  height: e.height * l.y,
@@ -5891,7 +5915,7 @@ function ri(c) {
5891
5915
  return Array.from(c.getClientRects());
5892
5916
  }
5893
5917
  function ni(c) {
5894
- const t = W(c), e = at(c), i = c.ownerDocument.body, s = $(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = $(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5918
+ const t = W(c), e = ht(c), i = c.ownerDocument.body, s = $(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = $(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5895
5919
  let r = -e.scrollLeft + yt(c);
5896
5920
  const a = -e.scrollTop;
5897
5921
  return Y(i).direction === "rtl" && (r += $(t.clientWidth, i.clientWidth) - s), {
@@ -5918,7 +5942,7 @@ function ai(c, t) {
5918
5942
  }
5919
5943
  const hi = /* @__PURE__ */ new Set(["absolute", "fixed"]);
5920
5944
  function li(c, t) {
5921
- const e = q(c, !0, t === "fixed"), i = e.top + c.clientTop, s = e.left + c.clientLeft, o = K(c) ? G(c) : B(1), r = c.clientWidth * o.x, a = c.clientHeight * o.y, h = s * o.x, l = i * o.y;
5945
+ const e = J(c, !0, t === "fixed"), i = e.top + c.clientTop, s = e.left + c.clientLeft, o = K(c) ? G(c) : B(1), r = c.clientWidth * o.x, a = c.clientHeight * o.y, h = s * o.x, l = i * o.y;
5922
5946
  return {
5923
5947
  width: r,
5924
5948
  height: a,
@@ -5943,22 +5967,22 @@ function Mt(c, t, e) {
5943
5967
  height: t.height
5944
5968
  };
5945
5969
  }
5946
- return ot(i);
5970
+ return rt(i);
5947
5971
  }
5948
- function jt(c, t) {
5972
+ function Zt(c, t) {
5949
5973
  const e = P(c);
5950
- return e === t || !X(e) || U(e) ? !1 : Y(e).position === "fixed" || jt(e, t);
5974
+ return e === t || !X(e) || U(e) ? !1 : Y(e).position === "fixed" || Zt(e, t);
5951
5975
  }
5952
5976
  function ci(c, t) {
5953
5977
  const e = t.get(c);
5954
5978
  if (e)
5955
5979
  return e;
5956
- let i = zt(c, []).filter((a) => X(a) && Z(a) !== "body"), s = null;
5980
+ let i = zt(c, []).filter((a) => X(a) && q(a) !== "body"), s = null;
5957
5981
  const o = Y(c).position === "fixed";
5958
5982
  let r = o ? P(c) : c;
5959
5983
  for (; X(r) && !U(r); ) {
5960
5984
  const a = Y(r), h = pt(r);
5961
- !h && a.position === "fixed" && (s = null), (o ? !h && !s : !h && a.position === "static" && !!s && hi.has(s.position) || tt(r) && !h && jt(c, r)) ? i = i.filter((d) => d !== r) : s = a, r = P(r);
5985
+ !h && a.position === "fixed" && (s = null), (o ? !h && !s : !h && a.position === "static" && !!s && hi.has(s.position) || et(r) && !h && Zt(c, r)) ? i = i.filter((d) => d !== r) : s = a, r = P(r);
5962
5986
  }
5963
5987
  return t.set(c, i), i;
5964
5988
  }
@@ -5969,7 +5993,7 @@ function di(c) {
5969
5993
  rootBoundary: i,
5970
5994
  strategy: s
5971
5995
  } = c;
5972
- const r = [...e === "clippingAncestors" ? nt(t) ? [] : ci(t, this._c) : [].concat(e), i], a = r[0], h = r.reduce((l, d) => {
5996
+ const r = [...e === "clippingAncestors" ? at(t) ? [] : ci(t, this._c) : [].concat(e), i], a = r[0], h = r.reduce((l, d) => {
5973
5997
  const f = Mt(t, d, s);
5974
5998
  return l.top = $(f.top, l.top), l.right = j(f.right, l.right), l.bottom = j(f.bottom, l.bottom), l.left = $(f.left, l.left), l;
5975
5999
  }, Mt(t, a, s));
@@ -5991,7 +6015,7 @@ function fi(c) {
5991
6015
  };
5992
6016
  }
5993
6017
  function xi(c, t, e) {
5994
- const i = K(t), s = W(t), o = e === "fixed", r = q(c, !0, o, t);
6018
+ const i = K(t), s = W(t), o = e === "fixed", r = J(c, !0, o, t);
5995
6019
  let a = {
5996
6020
  scrollLeft: 0,
5997
6021
  scrollTop: 0
@@ -6001,12 +6025,12 @@ function xi(c, t, e) {
6001
6025
  h.x = yt(s);
6002
6026
  }
6003
6027
  if (i || !i && !o)
6004
- if ((Z(t) !== "body" || tt(s)) && (a = at(t)), i) {
6005
- const x = q(t, !0, o, t);
6028
+ if ((q(t) !== "body" || et(s)) && (a = ht(t)), i) {
6029
+ const x = J(t, !0, o, t);
6006
6030
  h.x = x.x + t.clientLeft, h.y = x.y + t.clientTop;
6007
6031
  } else s && l();
6008
6032
  o && !i && s && l();
6009
- const d = s && !i && !o ? Zt(s, a) : B(0), f = r.left + a.scrollLeft - h.x - d.x, u = r.top + a.scrollTop - h.y - d.y;
6033
+ const d = s && !i && !o ? qt(s, a) : B(0), f = r.left + a.scrollLeft - h.x - d.x, u = r.top + a.scrollTop - h.y - d.y;
6010
6034
  return {
6011
6035
  x: f,
6012
6036
  y: u,
@@ -6014,7 +6038,7 @@ function xi(c, t, e) {
6014
6038
  height: r.height
6015
6039
  };
6016
6040
  }
6017
- function ht(c) {
6041
+ function lt(c) {
6018
6042
  return Y(c).position === "static";
6019
6043
  }
6020
6044
  function At(c, t) {
@@ -6025,26 +6049,26 @@ function At(c, t) {
6025
6049
  let e = c.offsetParent;
6026
6050
  return W(c) === e && (e = e.ownerDocument.body), e;
6027
6051
  }
6028
- function qt(c, t) {
6052
+ function jt(c, t) {
6029
6053
  const e = H(c);
6030
- if (nt(c))
6054
+ if (at(c))
6031
6055
  return e;
6032
6056
  if (!K(c)) {
6033
6057
  let s = P(c);
6034
6058
  for (; s && !U(s); ) {
6035
- if (X(s) && !ht(s))
6059
+ if (X(s) && !lt(s))
6036
6060
  return s;
6037
6061
  s = P(s);
6038
6062
  }
6039
6063
  return e;
6040
6064
  }
6041
6065
  let i = At(c, t);
6042
- for (; i && Ze(i) && ht(i); )
6066
+ for (; i && qe(i) && lt(i); )
6043
6067
  i = At(i, t);
6044
- return i && U(i) && ht(i) && !pt(i) ? e : i || ti(c) || e;
6068
+ return i && U(i) && lt(i) && !pt(i) ? e : i || ti(c) || e;
6045
6069
  }
6046
6070
  const ui = async function(c) {
6047
- const t = this.getOffsetParent || qt, e = this.getDimensions, i = await e(c.floating);
6071
+ const t = this.getOffsetParent || jt, e = this.getDimensions, i = await e(c.floating);
6048
6072
  return {
6049
6073
  reference: xi(c.reference, await t(c.floating), c.strategy),
6050
6074
  floating: {
@@ -6062,7 +6086,7 @@ const wi = {
6062
6086
  convertOffsetParentRelativeRectToViewportRelativeRect: oi,
6063
6087
  getDocumentElement: W,
6064
6088
  getClippingRect: di,
6065
- getOffsetParent: qt,
6089
+ getOffsetParent: jt,
6066
6090
  getElementRects: ui,
6067
6091
  getClientRects: ri,
6068
6092
  getDimensions: fi,
@@ -6425,7 +6449,7 @@ class Ci {
6425
6449
  n(this, "ctx");
6426
6450
  n(this, "observer");
6427
6451
  this.ctx = t, this.observer = new MutationObserver(
6428
- xt(() => {
6452
+ Z(() => {
6429
6453
  const e = this.ctx.overlayerElement.querySelectorAll('[data-auto-height="true"]'), i = /* @__PURE__ */ new Map();
6430
6454
  e.forEach((r) => {
6431
6455
  const a = Number(r.getAttribute("data-row-index")), h = Number(r.getAttribute("data-col-index"));
@@ -6748,11 +6772,23 @@ class vi {
6748
6772
  o,
6749
6773
  r
6750
6774
  );
6751
- this.ctx = new Re(a, this.options), this.header = new ve(this.ctx), this.footer = new _e(this.ctx), this.body = new Se(this.ctx), this.scroller = new Ie(this.ctx), this.selector = new Te(this.ctx), this.autofill = new Oe(this.ctx), this.tooltip = new pi(this.ctx), this.empty = new yi(this.ctx), this.editor = new Ei(this.ctx), this.overlayer = new Ci(this.ctx), this.contextMenu = new bi(this.ctx), this.ctx.on("draw", () => {
6752
- this.draw();
6753
- }), this.ctx.on("drawView", () => {
6754
- this.draw(!0);
6755
- }), this.draw();
6775
+ this.ctx = new Re(a, this.options), this.header = new ve(this.ctx), this.footer = new _e(this.ctx), this.body = new Se(this.ctx), this.scroller = new Ie(this.ctx), this.selector = new Te(this.ctx), this.autofill = new Oe(this.ctx), this.tooltip = new pi(this.ctx), this.empty = new yi(this.ctx), this.editor = new Ei(this.ctx), this.overlayer = new Ci(this.ctx), this.contextMenu = new bi(this.ctx), this.ctx.on(
6776
+ "draw",
6777
+ Z(
6778
+ () => {
6779
+ this.draw();
6780
+ },
6781
+ () => this.ctx.drawTime
6782
+ )
6783
+ ), this.ctx.on(
6784
+ "drawView",
6785
+ Z(
6786
+ () => {
6787
+ this.draw(!0);
6788
+ },
6789
+ () => this.ctx.drawTime
6790
+ )
6791
+ ), this.draw();
6756
6792
  }
6757
6793
  createContainer(t, e, i, s, o) {
6758
6794
  t.className = "e-virt-table-container";
@@ -6773,7 +6809,12 @@ class vi {
6773
6809
  }
6774
6810
  draw(t = !1) {
6775
6811
  requestAnimationFrame(() => {
6776
- this.header.update(), this.footer.update(), this.body.update(), this.ctx.paint.clear(), this.body.draw(), this.footer.draw(), this.header.draw(), this.scroller.draw(), t || this.overlayer.draw(), this.body.updateAutoHeight();
6812
+ const e = performance.now();
6813
+ this.header.update(), this.footer.update(), this.body.update(), this.ctx.paint.clear(), this.body.draw(), this.footer.draw(), this.header.draw(), this.scroller.draw(), t || this.overlayer.draw(), requestAnimationFrame(() => {
6814
+ this.body.updateAutoHeight();
6815
+ });
6816
+ const i = performance.now(), s = Math.round(i - e);
6817
+ this.ctx.drawTime = s * this.ctx.config.DRAW_TIME_MULTIPLIER;
6777
6818
  });
6778
6819
  }
6779
6820
  loadConfig(t) {