e-virt-table 0.1.20 → 0.1.22
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.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +111 -107
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/Cell.d.ts +2 -1
- package/dist/lib/Cell.js +17 -8
- package/dist/lib/Cell.js.map +1 -1
- package/dist/lib/Config.d.ts +2 -2
- package/dist/lib/Config.js +1 -1
- package/dist/lib/Config.js.map +1 -1
- package/dist/lib/History.d.ts +2 -2
- package/dist/lib/History.js +8 -6
- package/dist/lib/History.js.map +1 -1
- package/dist/lib/Selector.js +4 -0
- package/dist/lib/Selector.js.map +1 -1
- package/dist/lib/types.d.ts +6 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -157,7 +157,7 @@ var Xt = /* @__PURE__ */ function(n) {
|
|
|
157
157
|
}
|
|
158
158
|
return t;
|
|
159
159
|
}(/* @__PURE__ */ bt(Error));
|
|
160
|
-
function
|
|
160
|
+
function Se(n, t, e, i, s) {
|
|
161
161
|
if (t.first) {
|
|
162
162
|
var r = new Promise(function(x, u) {
|
|
163
163
|
var g = function(y) {
|
|
@@ -183,10 +183,10 @@ function Te(n, t, e, i, s) {
|
|
|
183
183
|
return x;
|
|
184
184
|
}), d;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function Ae(n) {
|
|
187
187
|
return !!(n && n.message !== void 0);
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function Te(n, t) {
|
|
190
190
|
for (var e = n, i = 0; i < t.length; i++) {
|
|
191
191
|
if (e == null)
|
|
192
192
|
return e;
|
|
@@ -197,7 +197,7 @@ function Ae(n, t) {
|
|
|
197
197
|
function kt(n, t) {
|
|
198
198
|
return function(e) {
|
|
199
199
|
var i;
|
|
200
|
-
return n.fullFields ? i =
|
|
200
|
+
return n.fullFields ? i = Te(t, n.fullFields) : i = t[e.field || n.fullField], Ae(e) ? (e.field = e.field || n.fullField, e.fieldValue = i, e) : {
|
|
201
201
|
message: typeof e == "function" ? e() : e,
|
|
202
202
|
fieldValue: i,
|
|
203
203
|
field: e.field || n.fullField
|
|
@@ -570,40 +570,40 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
|
|
|
570
570
|
});
|
|
571
571
|
});
|
|
572
572
|
var g = {};
|
|
573
|
-
return
|
|
573
|
+
return Se(x, h, function(w, p) {
|
|
574
574
|
var y = w.rule, b = (y.type === "object" || y.type === "array") && (typeof y.fields == "object" || typeof y.defaultField == "object");
|
|
575
575
|
b = b && (y.required || !y.required && w.value), y.field = w.field;
|
|
576
|
-
function m(R,
|
|
577
|
-
return $({},
|
|
576
|
+
function m(R, S) {
|
|
577
|
+
return $({}, S, {
|
|
578
578
|
fullField: y.fullField + "." + R,
|
|
579
579
|
fullFields: y.fullFields ? [].concat(y.fullFields, [R]) : [R]
|
|
580
580
|
});
|
|
581
581
|
}
|
|
582
582
|
function E(R) {
|
|
583
583
|
R === void 0 && (R = []);
|
|
584
|
-
var
|
|
585
|
-
!h.suppressWarning &&
|
|
586
|
-
var
|
|
587
|
-
if (h.first &&
|
|
588
|
-
return g[y.field] = 1, p(
|
|
584
|
+
var S = Array.isArray(R) ? R : [R];
|
|
585
|
+
!h.suppressWarning && S.length && n.warning("async-validator:", S), S.length && y.message !== void 0 && (S = [].concat(y.message));
|
|
586
|
+
var T = S.map(kt(y, a));
|
|
587
|
+
if (h.first && T.length)
|
|
588
|
+
return g[y.field] = 1, p(T);
|
|
589
589
|
if (!b)
|
|
590
|
-
p(
|
|
590
|
+
p(T);
|
|
591
591
|
else {
|
|
592
592
|
if (y.required && !w.value)
|
|
593
|
-
return y.message !== void 0 ?
|
|
593
|
+
return y.message !== void 0 ? T = [].concat(y.message).map(kt(y, a)) : h.error && (T = [h.error(y, M(h.messages.required, y.field))]), p(T);
|
|
594
594
|
var L = {};
|
|
595
595
|
y.defaultField && Object.keys(w.value).map(function(I) {
|
|
596
596
|
L[I] = y.defaultField;
|
|
597
597
|
}), L = $({}, L, w.rule.fields);
|
|
598
598
|
var D = {};
|
|
599
599
|
Object.keys(L).forEach(function(I) {
|
|
600
|
-
var
|
|
600
|
+
var A = L[I], O = Array.isArray(A) ? A : [A];
|
|
601
601
|
D[I] = O.map(m.bind(null, I));
|
|
602
602
|
});
|
|
603
603
|
var B = new n(D);
|
|
604
604
|
B.messages(h.messages), w.rule.options && (w.rule.options.messages = h.messages, w.rule.options.error = h.error), B.validate(w.value, w.rule.options || h, function(I) {
|
|
605
|
-
var
|
|
606
|
-
|
|
605
|
+
var A = [];
|
|
606
|
+
T && T.length && A.push.apply(A, T), I && I.length && A.push.apply(A, I), p(A.length ? A : null);
|
|
607
607
|
});
|
|
608
608
|
}
|
|
609
609
|
}
|
|
@@ -1436,13 +1436,15 @@ class si {
|
|
|
1436
1436
|
}
|
|
1437
1437
|
init() {
|
|
1438
1438
|
this.ctx.on("keydown", (t) => {
|
|
1439
|
-
if (
|
|
1440
|
-
t.
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
t.
|
|
1445
|
-
|
|
1439
|
+
if (!this.ctx.editing) {
|
|
1440
|
+
if (t.ctrlKey && !t.shiftKey && t.code === "KeyZ" || t.metaKey && !t.shiftKey && t.code === "KeyZ") {
|
|
1441
|
+
t.preventDefault(), this.ctx.clearSelector(), this.ctx.clearAutofill(), this.backState();
|
|
1442
|
+
return;
|
|
1443
|
+
}
|
|
1444
|
+
if (t.ctrlKey && t.code === "KeyY" || t.ctrlKey && t.shiftKey && t.code === "KeyZ" || t.metaKey && t.shiftKey && t.code === "KeyZ") {
|
|
1445
|
+
t.preventDefault(), this.ctx.clearSelector(), this.ctx.clearAutofill(), this.forwardState();
|
|
1446
|
+
return;
|
|
1447
|
+
}
|
|
1446
1448
|
}
|
|
1447
1449
|
});
|
|
1448
1450
|
}
|
|
@@ -1453,14 +1455,12 @@ class si {
|
|
|
1453
1455
|
// 回退
|
|
1454
1456
|
backState() {
|
|
1455
1457
|
if (this.historyIndex >= 0) {
|
|
1456
|
-
const { changeList: t, scrollX: e, scrollY: i } = this.history[this.historyIndex], s = t.map(
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
})
|
|
1463
|
-
);
|
|
1458
|
+
const { changeList: t, scrollX: e, scrollY: i } = this.history[this.historyIndex], s = t.map((r) => ({
|
|
1459
|
+
rowKey: r.rowKey,
|
|
1460
|
+
key: r.key,
|
|
1461
|
+
value: r.oldValue,
|
|
1462
|
+
row: {}
|
|
1463
|
+
}));
|
|
1464
1464
|
this.ctx.setScroll(e, i), this.ctx.database.batchSetItemValue(s, !1), this.historyIndex -= 1;
|
|
1465
1465
|
}
|
|
1466
1466
|
}
|
|
@@ -1468,14 +1468,12 @@ class si {
|
|
|
1468
1468
|
forwardState() {
|
|
1469
1469
|
if (this.historyIndex < this.history.length - 1) {
|
|
1470
1470
|
this.historyIndex += 1;
|
|
1471
|
-
const { changeList: t } = this.history[this.historyIndex], e = t.map(
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
})
|
|
1478
|
-
);
|
|
1471
|
+
const { changeList: t } = this.history[this.historyIndex], e = t.map((i) => ({
|
|
1472
|
+
rowKey: i.rowKey,
|
|
1473
|
+
key: i.key,
|
|
1474
|
+
value: i.newValue,
|
|
1475
|
+
row: {}
|
|
1476
|
+
}));
|
|
1479
1477
|
this.ctx.database.batchSetItemValue(e, !1);
|
|
1480
1478
|
}
|
|
1481
1479
|
}
|
|
@@ -1825,7 +1823,7 @@ class Wt {
|
|
|
1825
1823
|
l(this, "BODY_CELL_FORMATTER_METHOD");
|
|
1826
1824
|
l(this, "BODY_CELL_RULES_METHOD");
|
|
1827
1825
|
l(this, "BODY_CELL_TYPE_METHOD");
|
|
1828
|
-
l(this, "
|
|
1826
|
+
l(this, "BODY_CELL_EDITOR_METHOD");
|
|
1829
1827
|
l(this, "BODY_CELL_RENDER_METHOD");
|
|
1830
1828
|
l(this, "BODY_CELL_HOVER_ICON_METHOD");
|
|
1831
1829
|
l(this, "SPAN_METHOD");
|
|
@@ -2008,6 +2006,7 @@ class ee extends te {
|
|
|
2008
2006
|
l(this, "fixed");
|
|
2009
2007
|
l(this, "type");
|
|
2010
2008
|
l(this, "editorType");
|
|
2009
|
+
l(this, "editorProps");
|
|
2011
2010
|
l(this, "cellType");
|
|
2012
2011
|
l(this, "level");
|
|
2013
2012
|
l(this, "colspan", 1);
|
|
@@ -2048,7 +2047,7 @@ class ee extends te {
|
|
|
2048
2047
|
l(this, "overflowTooltipShow", !0);
|
|
2049
2048
|
l(this, "overflowTooltipMaxWidth", 500);
|
|
2050
2049
|
l(this, "overflowTooltipPlacement", "top");
|
|
2051
|
-
this.visibleWidth = this.width, this.visibleHeight = this.height, this.colIndex = s, this.rowIndex = i, this.key = c.key, this.type = c.type || "", this.editorType = c.editorType || "text", this.cellType = d, this.align = c.align || "center", this.verticalAlign = c.verticalAlign || "middle", this.fixed = c.fixed, this.level = c.level || 0, this.operation = c.operation || !1, this.column = c, this.rules = c.rules || {}, this.row = f, this.rowKey = this.cellType === "body" ? this.ctx.database.getRowKeyForRowIndex(i) : `${this.cellType}_${this.rowIndex}`, this.value = this.getValue(), this.render = c.render, this.overflowTooltipShow = c.overflowTooltipShow !== !1, this.overflowTooltipMaxWidth = c.overflowTooltipMaxWidth || 500, this.overflowTooltipPlacement = c.overflowTooltipPlacement || "top", this.renderFooter = c.renderFooter, this.hoverIconName = c.hoverIconName, this.formatter = c.formatter, this.formatterFooter = c.formatterFooter, this.update();
|
|
2050
|
+
this.visibleWidth = this.width, this.visibleHeight = this.height, this.colIndex = s, this.rowIndex = i, this.key = c.key, this.type = c.type || "", this.editorType = c.editorType || "text", this.editorProps = c.editorProps || {}, this.cellType = d, this.align = c.align || "center", this.verticalAlign = c.verticalAlign || "middle", this.fixed = c.fixed, this.level = c.level || 0, this.operation = c.operation || !1, this.column = c, this.rules = c.rules || {}, this.row = f, this.rowKey = this.cellType === "body" ? this.ctx.database.getRowKeyForRowIndex(i) : `${this.cellType}_${this.rowIndex}`, this.value = this.getValue(), this.render = c.render, this.overflowTooltipShow = c.overflowTooltipShow !== !1, this.overflowTooltipMaxWidth = c.overflowTooltipMaxWidth || 500, this.overflowTooltipPlacement = c.overflowTooltipPlacement || "top", this.renderFooter = c.renderFooter, this.hoverIconName = c.hoverIconName, this.formatter = c.formatter, this.formatterFooter = c.formatterFooter, this.update();
|
|
2052
2051
|
}
|
|
2053
2052
|
getValidationMessage() {
|
|
2054
2053
|
const e = this.ctx.database.getValidationError(this.rowKey, this.key);
|
|
@@ -2059,7 +2058,7 @@ class ee extends te {
|
|
|
2059
2058
|
return this.message;
|
|
2060
2059
|
}
|
|
2061
2060
|
update() {
|
|
2062
|
-
this.drawX = this.getDrawX(), this.drawY = this.getDrawY(), this.drawTextX = this.drawX, this.drawTextY = this.drawY, this.isHasChanged = this.ctx.database.isHasChangedData(this.rowKey, this.key), this.updateSpan(), this.updateStyle(), this.updateType(), this.updateHoverIcon(), this.updateSelection(), this.updateTree(), this.
|
|
2061
|
+
this.drawX = this.getDrawX(), this.drawY = this.getDrawY(), this.drawTextX = this.drawX, this.drawTextY = this.drawY, this.isHasChanged = this.ctx.database.isHasChangedData(this.rowKey, this.key), this.updateSpan(), this.updateStyle(), this.updateType(), this.updateHoverIcon(), this.updateSelection(), this.updateTree(), this.updateEditor(), this.updateRender(), this.getValidationMessage(), this.updateContainer(), this.text = this.getText(), this.displayText = this.getDisplayText();
|
|
2063
2062
|
}
|
|
2064
2063
|
updateSpan() {
|
|
2065
2064
|
if (this.cellType === "footer")
|
|
@@ -2094,8 +2093,8 @@ class ee extends te {
|
|
|
2094
2093
|
s !== void 0 && (this.type = s);
|
|
2095
2094
|
}
|
|
2096
2095
|
}
|
|
2097
|
-
|
|
2098
|
-
const {
|
|
2096
|
+
updateEditor() {
|
|
2097
|
+
const { BODY_CELL_EDITOR_METHOD: e } = this.ctx.config;
|
|
2099
2098
|
if (typeof e == "function") {
|
|
2100
2099
|
const s = e({
|
|
2101
2100
|
row: this.row,
|
|
@@ -2104,7 +2103,10 @@ class ee extends te {
|
|
|
2104
2103
|
column: this.column,
|
|
2105
2104
|
value: this.getValue()
|
|
2106
2105
|
});
|
|
2107
|
-
s !== void 0
|
|
2106
|
+
if (s !== void 0) {
|
|
2107
|
+
const { type: r, props: o = {} } = s;
|
|
2108
|
+
this.editorType = r, this.editorProps = o;
|
|
2109
|
+
}
|
|
2108
2110
|
}
|
|
2109
2111
|
}
|
|
2110
2112
|
updateRender() {
|
|
@@ -3658,39 +3660,41 @@ class ui {
|
|
|
3658
3660
|
}), this.ctx.on("cellHeaderMousedown", (t, e) => {
|
|
3659
3661
|
this.ctx.stageElement.style.cursor !== "pointer" && (this.ctx.isPointer || (e.preventDefault(), this.mousedownHeader = !0, this.selectCols(t)));
|
|
3660
3662
|
}), this.ctx.on("keydown", (t) => {
|
|
3661
|
-
if (
|
|
3662
|
-
t.
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
t.
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
t.
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
t.preventDefault(), this.
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
t.
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
t.
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
t.
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
t.
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3663
|
+
if (!this.ctx.editing) {
|
|
3664
|
+
if (t.ctrlKey && t.code === "KeyV" || t.metaKey && t.code === "KeyV") {
|
|
3665
|
+
t.preventDefault(), this.paste();
|
|
3666
|
+
return;
|
|
3667
|
+
}
|
|
3668
|
+
if (t.ctrlKey && t.code === "KeyC" || t.metaKey && t.code === "KeyC") {
|
|
3669
|
+
t.preventDefault(), this.copy(), this.isCut = !1;
|
|
3670
|
+
return;
|
|
3671
|
+
}
|
|
3672
|
+
if (t.ctrlKey && t.code === "KeyX" || t.metaKey && t.code === "KeyX") {
|
|
3673
|
+
t.preventDefault(), this.isCut = !0, this.copy();
|
|
3674
|
+
return;
|
|
3675
|
+
}
|
|
3676
|
+
if ((t.ctrlKey && t.code === "KeyA" || t.metaKey && t.code === "KeyA") && (t.preventDefault(), this.selectAll()), t.code === "ArrowLeft") {
|
|
3677
|
+
t.preventDefault(), this.moveFocus("LEFT");
|
|
3678
|
+
return;
|
|
3679
|
+
}
|
|
3680
|
+
if (t.code === "ArrowUp") {
|
|
3681
|
+
t.preventDefault(), this.moveFocus("TOP");
|
|
3682
|
+
return;
|
|
3683
|
+
}
|
|
3684
|
+
if (t.code === "ArrowRight" || t.code === "Tab") {
|
|
3685
|
+
t.preventDefault(), this.moveFocus("RIGHT");
|
|
3686
|
+
return;
|
|
3687
|
+
}
|
|
3688
|
+
if (t.code === "ArrowDown") {
|
|
3689
|
+
t.preventDefault(), this.moveFocus("BOTTOM");
|
|
3690
|
+
return;
|
|
3691
|
+
}
|
|
3692
|
+
if (t.code === "Delete" || t.code === "Backspace") {
|
|
3693
|
+
t.preventDefault(), console.log("删除");
|
|
3694
|
+
const { xArr: e, yArr: i } = this.ctx.selector;
|
|
3695
|
+
this.clearSelectedData(e, i);
|
|
3696
|
+
return;
|
|
3697
|
+
}
|
|
3694
3698
|
}
|
|
3695
3699
|
}), this.ctx.on("contextMenuClearSelected", () => {
|
|
3696
3700
|
const { xArr: t, yArr: e } = this.ctx.selector;
|
|
@@ -4433,9 +4437,9 @@ const Ri = (n) => ({
|
|
|
4433
4437
|
x: e,
|
|
4434
4438
|
y: i
|
|
4435
4439
|
}, u = Mt(s), g = Lt(u), w = await o.getDimensions(c), p = u === "y", y = p ? "top" : "left", b = p ? "bottom" : "right", m = p ? "clientHeight" : "clientWidth", E = r.reference[g] + r.reference[u] - x[u] - r.floating[g], C = x[u] - r.reference[u], R = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
|
|
4436
|
-
let
|
|
4437
|
-
(!
|
|
4438
|
-
const
|
|
4440
|
+
let S = R ? R[m] : 0;
|
|
4441
|
+
(!S || !await (o.isElement == null ? void 0 : o.isElement(R))) && (S = a.floating[m] || r.floating[g]);
|
|
4442
|
+
const T = E / 2 - C / 2, L = S / 2 - w[g] / 2 - 1, D = rt(d[y], L), B = rt(d[b], L), I = D, A = S - w[g] - B, O = S / 2 - w[g] / 2 + T, G = It(I, O, A), K = !h.arrow && lt(s) != null && O !== G && r.reference[g] / 2 - (O < I ? D : B) - w[g] / 2 < 0, k = K ? O < I ? O - I : O - A : 0;
|
|
4439
4443
|
return {
|
|
4440
4444
|
[u]: x[u] + k,
|
|
4441
4445
|
data: {
|
|
@@ -4474,18 +4478,18 @@ const Ri = (n) => ({
|
|
|
4474
4478
|
return {};
|
|
4475
4479
|
const y = q(s), b = J(a), m = q(a) === a, E = await (h.isRTL == null ? void 0 : h.isRTL(c.floating)), C = x || (m || !w ? [xt(a)] : mi(a)), R = g !== "none";
|
|
4476
4480
|
!x && R && C.push(...bi(a, w, g, E));
|
|
4477
|
-
const
|
|
4481
|
+
const S = [a, ...C], T = await ne(t, p), L = [];
|
|
4478
4482
|
let D = ((i = r.flip) == null ? void 0 : i.overflows) || [];
|
|
4479
|
-
if (f && L.push(
|
|
4483
|
+
if (f && L.push(T[y]), d) {
|
|
4480
4484
|
const O = yi(s, o, E);
|
|
4481
|
-
L.push(
|
|
4485
|
+
L.push(T[O[0]], T[O[1]]);
|
|
4482
4486
|
}
|
|
4483
4487
|
if (D = [...D, {
|
|
4484
4488
|
placement: s,
|
|
4485
4489
|
overflows: L
|
|
4486
4490
|
}], !L.every((O) => O <= 0)) {
|
|
4487
4491
|
var B, I;
|
|
4488
|
-
const O = (((B = r.flip) == null ? void 0 : B.index) || 0) + 1, G =
|
|
4492
|
+
const O = (((B = r.flip) == null ? void 0 : B.index) || 0) + 1, G = S[O];
|
|
4489
4493
|
if (G)
|
|
4490
4494
|
return {
|
|
4491
4495
|
data: {
|
|
@@ -4500,8 +4504,8 @@ const Ri = (n) => ({
|
|
|
4500
4504
|
if (!K)
|
|
4501
4505
|
switch (u) {
|
|
4502
4506
|
case "bestFit": {
|
|
4503
|
-
var
|
|
4504
|
-
const k = (
|
|
4507
|
+
var A;
|
|
4508
|
+
const k = (A = D.filter((W) => {
|
|
4505
4509
|
if (R) {
|
|
4506
4510
|
const P = J(W.placement);
|
|
4507
4511
|
return P === b || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -4509,7 +4513,7 @@ const Ri = (n) => ({
|
|
|
4509
4513
|
P === "y";
|
|
4510
4514
|
}
|
|
4511
4515
|
return !0;
|
|
4512
|
-
}).map((W) => [W.placement, W.overflows.filter((P) => P > 0).reduce((P, ye) => P + ye, 0)]).sort((W, P) => W[1] - P[1])[0]) == null ? void 0 :
|
|
4516
|
+
}).map((W) => [W.placement, W.overflows.filter((P) => P > 0).reduce((P, ye) => P + ye, 0)]).sort((W, P) => W[1] - P[1])[0]) == null ? void 0 : A[0];
|
|
4513
4517
|
k && (K = k);
|
|
4514
4518
|
break;
|
|
4515
4519
|
}
|
|
@@ -4577,7 +4581,7 @@ const Oi = function(n) {
|
|
|
4577
4581
|
};
|
|
4578
4582
|
}
|
|
4579
4583
|
};
|
|
4580
|
-
},
|
|
4584
|
+
}, Si = function(n) {
|
|
4581
4585
|
return n === void 0 && (n = {}), {
|
|
4582
4586
|
name: "shift",
|
|
4583
4587
|
options: n,
|
|
@@ -4669,7 +4673,7 @@ function ht(n) {
|
|
|
4669
4673
|
} = X(n);
|
|
4670
4674
|
return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
|
|
4671
4675
|
}
|
|
4672
|
-
function
|
|
4676
|
+
function Ai(n) {
|
|
4673
4677
|
return ["table", "td", "th"].includes(tt(n));
|
|
4674
4678
|
}
|
|
4675
4679
|
function wt(n) {
|
|
@@ -4685,7 +4689,7 @@ function Ht(n) {
|
|
|
4685
4689
|
const t = Dt(), e = F(n) ? X(n) : n;
|
|
4686
4690
|
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));
|
|
4687
4691
|
}
|
|
4688
|
-
function
|
|
4692
|
+
function Ti(n) {
|
|
4689
4693
|
let t = z(n);
|
|
4690
4694
|
for (; N(t) && !Q(t); ) {
|
|
4691
4695
|
if (Ht(t))
|
|
@@ -4730,17 +4734,17 @@ function le(n) {
|
|
|
4730
4734
|
const t = z(n);
|
|
4731
4735
|
return Q(t) ? n.ownerDocument ? n.ownerDocument.body : n.body : N(t) && ht(t) ? t : le(t);
|
|
4732
4736
|
}
|
|
4733
|
-
function
|
|
4737
|
+
function St(n, t, e) {
|
|
4734
4738
|
var i;
|
|
4735
4739
|
t === void 0 && (t = []), e === void 0 && (e = !0);
|
|
4736
4740
|
const s = le(n), r = s === ((i = n.ownerDocument) == null ? void 0 : i.body), o = H(s);
|
|
4737
4741
|
if (r) {
|
|
4738
|
-
const a =
|
|
4739
|
-
return t.concat(o, o.visualViewport || [], ht(s) ? s : [], a && e ?
|
|
4742
|
+
const a = At(o);
|
|
4743
|
+
return t.concat(o, o.visualViewport || [], ht(s) ? s : [], a && e ? St(a) : []);
|
|
4740
4744
|
}
|
|
4741
|
-
return t.concat(s,
|
|
4745
|
+
return t.concat(s, St(s, [], e));
|
|
4742
4746
|
}
|
|
4743
|
-
function
|
|
4747
|
+
function At(n) {
|
|
4744
4748
|
return n.parent && Object.getPrototypeOf(n.parent) ? n.frameElement : null;
|
|
4745
4749
|
}
|
|
4746
4750
|
function he(n) {
|
|
@@ -4791,10 +4795,10 @@ function ot(n, t, e, i) {
|
|
|
4791
4795
|
let h = (s.left + a.x) / o.x, c = (s.top + a.y) / o.y, f = s.width / o.x, d = s.height / o.y;
|
|
4792
4796
|
if (r) {
|
|
4793
4797
|
const x = H(r), u = i && F(i) ? H(i) : i;
|
|
4794
|
-
let g = x, w =
|
|
4798
|
+
let g = x, w = At(g);
|
|
4795
4799
|
for (; w && i && u !== g; ) {
|
|
4796
4800
|
const p = Z(w), y = w.getBoundingClientRect(), b = X(w), m = y.left + (w.clientLeft + parseFloat(b.paddingLeft)) * p.x, E = y.top + (w.clientTop + parseFloat(b.paddingTop)) * p.y;
|
|
4797
|
-
h *= p.x, c *= p.y, f *= p.x, d *= p.y, h += m, c += E, g = H(w), w =
|
|
4801
|
+
h *= p.x, c *= p.y, f *= p.x, d *= p.y, h += m, c += E, g = H(w), w = At(g);
|
|
4798
4802
|
}
|
|
4799
4803
|
}
|
|
4800
4804
|
return ut({
|
|
@@ -4833,13 +4837,13 @@ function Hi(n) {
|
|
|
4833
4837
|
function Di(n) {
|
|
4834
4838
|
return Array.from(n.getClientRects());
|
|
4835
4839
|
}
|
|
4836
|
-
function
|
|
4840
|
+
function Tt(n, t) {
|
|
4837
4841
|
const e = pt(n).scrollLeft;
|
|
4838
4842
|
return t ? t.left + e : ot(Y(n)).left + e;
|
|
4839
4843
|
}
|
|
4840
4844
|
function Fi(n) {
|
|
4841
4845
|
const t = Y(n), e = pt(n), i = n.ownerDocument.body, s = U(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = U(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
|
|
4842
|
-
let o = -e.scrollLeft +
|
|
4846
|
+
let o = -e.scrollLeft + Tt(n);
|
|
4843
4847
|
const a = -e.scrollTop;
|
|
4844
4848
|
return X(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
|
|
4845
4849
|
width: s,
|
|
@@ -4898,7 +4902,7 @@ function Ni(n, t) {
|
|
|
4898
4902
|
const e = t.get(n);
|
|
4899
4903
|
if (e)
|
|
4900
4904
|
return e;
|
|
4901
|
-
let i =
|
|
4905
|
+
let i = St(n, [], !1).filter((a) => F(a) && tt(a) !== "body"), s = null;
|
|
4902
4906
|
const r = X(n).position === "fixed";
|
|
4903
4907
|
let o = r ? z(n) : n;
|
|
4904
4908
|
for (; F(o) && !Q(o); ) {
|
|
@@ -4946,12 +4950,12 @@ function Bi(n, t, e) {
|
|
|
4946
4950
|
if ((tt(t) !== "body" || ht(s)) && (a = pt(t)), i) {
|
|
4947
4951
|
const u = ot(t, !0, r, t);
|
|
4948
4952
|
h.x = u.x + t.clientLeft, h.y = u.y + t.clientTop;
|
|
4949
|
-
} else s && (h.x =
|
|
4953
|
+
} else s && (h.x = Tt(s));
|
|
4950
4954
|
let c = 0, f = 0;
|
|
4951
4955
|
if (s && !i && !r) {
|
|
4952
4956
|
const u = s.getBoundingClientRect();
|
|
4953
4957
|
f = u.top + a.scrollTop, c = u.left + a.scrollLeft - // RTL <body> scrollbar.
|
|
4954
|
-
|
|
4958
|
+
Tt(s, u);
|
|
4955
4959
|
}
|
|
4956
4960
|
const d = o.left + a.scrollLeft - h.x - c, x = o.top + a.scrollTop - h.y - f;
|
|
4957
4961
|
return {
|
|
@@ -4986,9 +4990,9 @@ function xe(n, t) {
|
|
|
4986
4990
|
return e;
|
|
4987
4991
|
}
|
|
4988
4992
|
let i = qt(n, t);
|
|
4989
|
-
for (; i &&
|
|
4993
|
+
for (; i && Ai(i) && mt(i); )
|
|
4990
4994
|
i = qt(i, t);
|
|
4991
|
-
return i && Q(i) && mt(i) && !Ht(i) ? e : i ||
|
|
4995
|
+
return i && Q(i) && mt(i) && !Ht(i) ? e : i || Ti(n) || e;
|
|
4992
4996
|
}
|
|
4993
4997
|
const Wi = async function(n) {
|
|
4994
4998
|
const t = this.getOffsetParent || xe, e = this.getDimensions, i = await e(n.floating);
|
|
@@ -5016,7 +5020,7 @@ const Vi = {
|
|
|
5016
5020
|
getScale: Z,
|
|
5017
5021
|
isElement: F,
|
|
5018
5022
|
isRTL: Pi
|
|
5019
|
-
}, ue = Oi, ge =
|
|
5023
|
+
}, ue = Oi, ge = Si, we = _i, zi = Ri, pe = (n, t, e) => {
|
|
5020
5024
|
const i = /* @__PURE__ */ new Map(), s = {
|
|
5021
5025
|
platform: Vi,
|
|
5022
5026
|
...e
|