@viasat/beam-web-components 2.10.0 → 2.10.2
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/Tooltip/Tooltip.js +873 -822
- package/custom-elements.json +2635 -2635
- package/local/Tooltip/Tooltip.js +868 -817
- package/package.json +6 -6
- package/vscode.html-custom-data.json +280 -280
package/Tooltip/Tooltip.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { unsafeCSS as xt, css as he, html as
|
|
2
|
-
import { property as
|
|
3
|
-
import { createRef as zt, ref as
|
|
1
|
+
import { unsafeCSS as xt, css as he, html as Xt, LitElement as qt } from "lit";
|
|
2
|
+
import { property as b, state as ge } from "lit/decorators.js";
|
|
3
|
+
import { createRef as zt, ref as Dt } from "lit/directives/ref.js";
|
|
4
4
|
import bt from "clsx";
|
|
5
|
-
import { h as ve, j as
|
|
5
|
+
import { h as ve, j as Tt, k as be, g as Gt } from "../chunks/classNames.Cq_tbDRp.js";
|
|
6
6
|
import { p as ye, t as we } from "../chunks/constants.jOWREYQE.js";
|
|
7
7
|
import { e as xe, f as Ce } from "../chunks/tokens.CTW8Tt94.js";
|
|
8
8
|
import { c as Zt } from "../chunks/register-custom-element.DHGKOhmA.js";
|
|
9
|
-
import { c as Oe, d as
|
|
10
|
-
const Qt = `:root,:host,.bm-light,.bm-dark .bm-inverse,[data-bm-theme~=bm-light]{--bm-comp-tooltip-color-bg: var(--bm-sem-color-surface-inverse, #202e39);--bm-comp-tooltip-color-text: var( --bm-sem-color-text-primary-inverse, #ffffff );--bm-comp-tooltip-color-icon-trigger: var( --bm-sem-color-icon-secondary, #576775 );--bm-comp-tooltip-radius: var(--bm-sem-radius-sm, .25rem);--bm-comp-tooltip-space-x: var(--bm-sem-space-75, .75rem);--bm-comp-tooltip-space-y: var(--bm-sem-space-50, .5rem);--bm-comp-tooltip-space-arrow: var(--bm-sem-space-75, .75rem);--bm-comp-tooltip-space-offset: var(--bm-sem-space-25, .25rem);--bm-comp-tooltip-size-arrow-width: .625rem;--bm-comp-tooltip-size-arrow-height: var( --bm-primitive-dimension-25, .25rem );--bm-comp-tooltip-size-width: var(--bm-primitive-dimension-1500, 15rem);--bm-comp-tooltip-size-icon-trigger-xs: var(--bm-sem-size-icon-xs, .75rem);--bm-comp-tooltip-size-icon-trigger-sm: var(--bm-sem-size-icon-sm, 1rem);--bm-comp-tooltip-size-icon-trigger-md: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-tooltip-size-icon-trigger-lg: var(--bm-sem-size-icon-lg, 1.5rem);--bm-comp-tooltip-size-icon-trigger-xl: var(--bm-sem-size-icon-xl, 1.75rem);--bm-comp-tooltip-typo-body: var( --bm-sem-typo-compact-body-sm, 400 .875rem/1rem "Source Sans Pro" )}:host,.bm-dark,.bm-light .bm-inverse,[data-bm-theme~=bm-dark]{--bm-comp-tooltip-color-bg: var(--bm-sem-color-surface-inverse, #ffffff);--bm-comp-tooltip-color-text: var( --bm-sem-color-text-primary-inverse, #141d24 );--bm-comp-tooltip-color-icon-trigger: var( --bm-sem-color-icon-secondary, #c3cdd5 );--bm-comp-tooltip-radius: var(--bm-sem-radius-sm, .25rem);--bm-comp-tooltip-space-x: var(--bm-sem-space-75, .75rem);--bm-comp-tooltip-space-y: var(--bm-sem-space-50, .5rem);--bm-comp-tooltip-space-arrow: var(--bm-sem-space-75, .75rem);--bm-comp-tooltip-space-offset: var(--bm-sem-space-25, .25rem);--bm-comp-tooltip-size-arrow-width: .625rem;--bm-comp-tooltip-size-arrow-height: var( --bm-primitive-dimension-25, .25rem );--bm-comp-tooltip-size-width: var(--bm-primitive-dimension-1500, 15rem);--bm-comp-tooltip-size-icon-trigger-xs: var(--bm-sem-size-icon-xs, .75rem);--bm-comp-tooltip-size-icon-trigger-sm: var(--bm-sem-size-icon-sm, 1rem);--bm-comp-tooltip-size-icon-trigger-md: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-tooltip-size-icon-trigger-lg: var(--bm-sem-size-icon-lg, 1.5rem);--bm-comp-tooltip-size-icon-trigger-xl: var(--bm-sem-size-icon-xl, 1.75rem);--bm-comp-tooltip-typo-body: var( --bm-sem-typo-compact-body-sm, 400 .875rem/1rem "Source Sans Pro" )}.bm-tooltip__icon-trigger{border:none;background:none;padding:0;margin:0;display:flex;cursor:pointer;color:var(--bm-comp-tooltip-color-icon-trigger)}.bm-tooltip{z-index:999;background-color:var(--bm-comp-tooltip-color-bg);border-radius:var(--bm-comp-tooltip-radius);max-width:var(--bm-comp-tooltip-size-width);padding:var(--bm-comp-tooltip-space-y) var(--bm-comp-tooltip-space-x);color:var(--bm-comp-tooltip-color-text);font:var(--bm-comp-tooltip-typo-body);offset:var(--bm-comp-tooltip-space-offset);transition-property:opacity}.bm-tooltip[data-status=open]{transition-duration:0s}.bm-tooltip[data-status=close]{transition-duration:.2s}.bm-tooltip[data-status=initial],.bm-tooltip[data-status=close]{opacity:0}.bm-tooltip__arrow{offset:var(--bm-comp-tooltip-space-arrow);-webkit-mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="4" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.75 3.515c.69.647 1.81.647 2.5 0L10 0H0l3.75 3.515Z" fill="%23202E39"/></svg>');-webkit-mask-size:cover;-webkit-mask-position:center;-webkit-mask-repeat:no-repeat;mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="4" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.75 3.515c.69.647 1.81.647 2.5 0L10 0H0l3.75 3.515Z" fill="%23202E39"/></svg>');mask-size:cover;mask-position:center;mask-repeat:no-repeat;scale:1.05;width:var(--bm-comp-tooltip-size-arrow-width);height:var(--bm-comp-tooltip-size-arrow-height);background-color:var(--bm-comp-tooltip-color-bg)}.bm-tooltip__icon-trigger svg{background:none;border:none}.bm-tooltip__icon-trigger:focus-visible{border-radius:var(--bm-sem-radius-round);outline-offset:0px;outline:var(--bm-sem-border-width-focus) solid var(--bm-sem-color-border-focus)}.bm-tooltip__icon-trigger--disabled{opacity:var(--bm-sem-opacity-disabled);cursor:inherit}.bm-tooltip__icon-trigger--xs{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-xs);width:var(--bm-comp-tooltip-size-icon-trigger-xs)}.bm-tooltip__icon-trigger--xs svg{height:var(--bm-comp-tooltip-size-icon-trigger-xs);width:var(--bm-comp-tooltip-size-icon-trigger-xs)}.bm-tooltip__icon-trigger--sm{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-sm);width:var(--bm-comp-tooltip-size-icon-trigger-sm)}.bm-tooltip__icon-trigger--sm svg{height:var(--bm-comp-tooltip-size-icon-trigger-sm);width:var(--bm-comp-tooltip-size-icon-trigger-sm)}.bm-tooltip__icon-trigger--md{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-md);width:var(--bm-comp-tooltip-size-icon-trigger-md)}.bm-tooltip__icon-trigger--md svg{height:var(--bm-comp-tooltip-size-icon-trigger-md);width:var(--bm-comp-tooltip-size-icon-trigger-md)}.bm-tooltip__icon-trigger--lg{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-lg);width:var(--bm-comp-tooltip-size-icon-trigger-lg)}.bm-tooltip__icon-trigger--lg svg{height:var(--bm-comp-tooltip-size-icon-trigger-lg);width:var(--bm-comp-tooltip-size-icon-trigger-lg)}.bm-tooltip__icon-trigger--xl{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-xl);width:var(--bm-comp-tooltip-size-icon-trigger-xl)}.bm-tooltip__icon-trigger--xl svg{height:var(--bm-comp-tooltip-size-icon-trigger-xl);width:var(--bm-comp-tooltip-size-icon-trigger-xl)}`, te = ["top", "right", "bottom", "left"], Ht = ["start", "end"], Ft = /* @__PURE__ */ te.reduce((
|
|
11
|
-
x:
|
|
12
|
-
y:
|
|
9
|
+
import { c as Oe, d as kt, m as $t, r as Ae, h as Ee, e as Jt, f as Bt } from "../chunks/helpers.AwJwaZvv.js";
|
|
10
|
+
const Qt = `:root,:host,.bm-light,.bm-dark .bm-inverse,[data-bm-theme~=bm-light]{--bm-comp-tooltip-color-bg: var(--bm-sem-color-surface-inverse, #202e39);--bm-comp-tooltip-color-text: var( --bm-sem-color-text-primary-inverse, #ffffff );--bm-comp-tooltip-color-icon-trigger: var( --bm-sem-color-icon-secondary, #576775 );--bm-comp-tooltip-radius: var(--bm-sem-radius-sm, .25rem);--bm-comp-tooltip-space-x: var(--bm-sem-space-75, .75rem);--bm-comp-tooltip-space-y: var(--bm-sem-space-50, .5rem);--bm-comp-tooltip-space-arrow: var(--bm-sem-space-75, .75rem);--bm-comp-tooltip-space-offset: var(--bm-sem-space-25, .25rem);--bm-comp-tooltip-size-arrow-width: .625rem;--bm-comp-tooltip-size-arrow-height: var( --bm-primitive-dimension-25, .25rem );--bm-comp-tooltip-size-width: var(--bm-primitive-dimension-1500, 15rem);--bm-comp-tooltip-size-icon-trigger-xs: var(--bm-sem-size-icon-xs, .75rem);--bm-comp-tooltip-size-icon-trigger-sm: var(--bm-sem-size-icon-sm, 1rem);--bm-comp-tooltip-size-icon-trigger-md: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-tooltip-size-icon-trigger-lg: var(--bm-sem-size-icon-lg, 1.5rem);--bm-comp-tooltip-size-icon-trigger-xl: var(--bm-sem-size-icon-xl, 1.75rem);--bm-comp-tooltip-typo-body: var( --bm-sem-typo-compact-body-sm, 400 .875rem/1rem "Source Sans Pro" )}:host,.bm-dark,.bm-light .bm-inverse,[data-bm-theme~=bm-dark]{--bm-comp-tooltip-color-bg: var(--bm-sem-color-surface-inverse, #ffffff);--bm-comp-tooltip-color-text: var( --bm-sem-color-text-primary-inverse, #141d24 );--bm-comp-tooltip-color-icon-trigger: var( --bm-sem-color-icon-secondary, #c3cdd5 );--bm-comp-tooltip-radius: var(--bm-sem-radius-sm, .25rem);--bm-comp-tooltip-space-x: var(--bm-sem-space-75, .75rem);--bm-comp-tooltip-space-y: var(--bm-sem-space-50, .5rem);--bm-comp-tooltip-space-arrow: var(--bm-sem-space-75, .75rem);--bm-comp-tooltip-space-offset: var(--bm-sem-space-25, .25rem);--bm-comp-tooltip-size-arrow-width: .625rem;--bm-comp-tooltip-size-arrow-height: var( --bm-primitive-dimension-25, .25rem );--bm-comp-tooltip-size-width: var(--bm-primitive-dimension-1500, 15rem);--bm-comp-tooltip-size-icon-trigger-xs: var(--bm-sem-size-icon-xs, .75rem);--bm-comp-tooltip-size-icon-trigger-sm: var(--bm-sem-size-icon-sm, 1rem);--bm-comp-tooltip-size-icon-trigger-md: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-tooltip-size-icon-trigger-lg: var(--bm-sem-size-icon-lg, 1.5rem);--bm-comp-tooltip-size-icon-trigger-xl: var(--bm-sem-size-icon-xl, 1.75rem);--bm-comp-tooltip-typo-body: var( --bm-sem-typo-compact-body-sm, 400 .875rem/1rem "Source Sans Pro" )}.bm-tooltip__icon-trigger{border:none;background:none;padding:0;margin:0;display:flex;cursor:pointer;color:var(--bm-comp-tooltip-color-icon-trigger)}.bm-tooltip{z-index:999;background-color:var(--bm-comp-tooltip-color-bg);border-radius:var(--bm-comp-tooltip-radius);max-width:var(--bm-comp-tooltip-size-width);padding:var(--bm-comp-tooltip-space-y) var(--bm-comp-tooltip-space-x);color:var(--bm-comp-tooltip-color-text);font:var(--bm-comp-tooltip-typo-body);offset:var(--bm-comp-tooltip-space-offset);transition-property:opacity}.bm-tooltip[data-status=open]{transition-duration:0s}.bm-tooltip[data-status=close]{transition-duration:.2s}.bm-tooltip[data-status=initial],.bm-tooltip[data-status=close]{opacity:0}.bm-tooltip__arrow{offset:var(--bm-comp-tooltip-space-arrow);-webkit-mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="4" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.75 3.515c.69.647 1.81.647 2.5 0L10 0H0l3.75 3.515Z" fill="%23202E39"/></svg>');-webkit-mask-size:cover;-webkit-mask-position:center;-webkit-mask-repeat:no-repeat;mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="4" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.75 3.515c.69.647 1.81.647 2.5 0L10 0H0l3.75 3.515Z" fill="%23202E39"/></svg>');mask-size:cover;mask-position:center;mask-repeat:no-repeat;scale:1.05;width:var(--bm-comp-tooltip-size-arrow-width);height:var(--bm-comp-tooltip-size-arrow-height);background-color:var(--bm-comp-tooltip-color-bg)}.bm-tooltip__icon-trigger svg{background:none;border:none}.bm-tooltip__icon-trigger:focus-visible{border-radius:var(--bm-sem-radius-round);outline-offset:0px;outline:var(--bm-sem-border-width-focus) solid var(--bm-sem-color-border-focus)}.bm-tooltip__icon-trigger--disabled{opacity:var(--bm-sem-opacity-disabled);cursor:inherit}.bm-tooltip__icon-trigger--xs{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-xs);width:var(--bm-comp-tooltip-size-icon-trigger-xs)}.bm-tooltip__icon-trigger--xs svg{height:var(--bm-comp-tooltip-size-icon-trigger-xs);width:var(--bm-comp-tooltip-size-icon-trigger-xs)}.bm-tooltip__icon-trigger--sm{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-sm);width:var(--bm-comp-tooltip-size-icon-trigger-sm)}.bm-tooltip__icon-trigger--sm svg{height:var(--bm-comp-tooltip-size-icon-trigger-sm);width:var(--bm-comp-tooltip-size-icon-trigger-sm)}.bm-tooltip__icon-trigger--md{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-md);width:var(--bm-comp-tooltip-size-icon-trigger-md)}.bm-tooltip__icon-trigger--md svg{height:var(--bm-comp-tooltip-size-icon-trigger-md);width:var(--bm-comp-tooltip-size-icon-trigger-md)}.bm-tooltip__icon-trigger--lg{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-lg);width:var(--bm-comp-tooltip-size-icon-trigger-lg)}.bm-tooltip__icon-trigger--lg svg{height:var(--bm-comp-tooltip-size-icon-trigger-lg);width:var(--bm-comp-tooltip-size-icon-trigger-lg)}.bm-tooltip__icon-trigger--xl{border-radius:100%;height:var(--bm-comp-tooltip-size-icon-trigger-xl);width:var(--bm-comp-tooltip-size-icon-trigger-xl)}.bm-tooltip__icon-trigger--xl svg{height:var(--bm-comp-tooltip-size-icon-trigger-xl);width:var(--bm-comp-tooltip-size-icon-trigger-xl)}`, te = ["top", "right", "bottom", "left"], Ht = ["start", "end"], Ft = /* @__PURE__ */ te.reduce((e, t) => e.concat(t, t + "-" + Ht[0], t + "-" + Ht[1]), []), q = Math.min, _ = Math.max, ft = Math.round, ct = Math.floor, W = (e) => ({
|
|
11
|
+
x: e,
|
|
12
|
+
y: e
|
|
13
13
|
}), Pe = {
|
|
14
14
|
left: "right",
|
|
15
15
|
right: "left",
|
|
@@ -19,162 +19,162 @@ const Qt = `:root,:host,.bm-light,.bm-dark .bm-inverse,[data-bm-theme~=bm-light]
|
|
|
19
19
|
start: "end",
|
|
20
20
|
end: "start"
|
|
21
21
|
};
|
|
22
|
-
function yt(
|
|
23
|
-
return
|
|
22
|
+
function yt(e, t, i) {
|
|
23
|
+
return _(e, q(t, i));
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return typeof
|
|
25
|
+
function Z(e, t) {
|
|
26
|
+
return typeof e == "function" ? e(t) : e;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return
|
|
28
|
+
function $(e) {
|
|
29
|
+
return e.split("-")[0];
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
return
|
|
31
|
+
function H(e) {
|
|
32
|
+
return e.split("-")[1];
|
|
33
33
|
}
|
|
34
|
-
function Ct(
|
|
35
|
-
return
|
|
34
|
+
function Ct(e) {
|
|
35
|
+
return e === "x" ? "y" : "x";
|
|
36
36
|
}
|
|
37
|
-
function Ot(
|
|
38
|
-
return
|
|
37
|
+
function Ot(e) {
|
|
38
|
+
return e === "y" ? "height" : "width";
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
return ["top", "bottom"].includes(
|
|
40
|
+
function Q(e) {
|
|
41
|
+
return ["top", "bottom"].includes($(e)) ? "y" : "x";
|
|
42
42
|
}
|
|
43
|
-
function At(
|
|
44
|
-
return Ct(
|
|
43
|
+
function At(e) {
|
|
44
|
+
return Ct(Q(e));
|
|
45
45
|
}
|
|
46
|
-
function ee(
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
let s = o === "x" ?
|
|
50
|
-
return
|
|
46
|
+
function ee(e, t, i) {
|
|
47
|
+
i === void 0 && (i = !1);
|
|
48
|
+
const n = H(e), o = At(e), r = Ot(o);
|
|
49
|
+
let s = o === "x" ? n === (i ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
50
|
+
return t.reference[r] > t.floating[r] && (s = st(s)), [s, st(s)];
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
const
|
|
54
|
-
return [pt(
|
|
52
|
+
function Se(e) {
|
|
53
|
+
const t = st(e);
|
|
54
|
+
return [pt(e), t, pt(t)];
|
|
55
55
|
}
|
|
56
|
-
function pt(
|
|
57
|
-
return
|
|
56
|
+
function pt(e) {
|
|
57
|
+
return e.replace(/start|end/g, (t) => Re[t]);
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
const
|
|
61
|
-
switch (
|
|
59
|
+
function Le(e, t, i) {
|
|
60
|
+
const n = ["left", "right"], o = ["right", "left"], r = ["top", "bottom"], s = ["bottom", "top"];
|
|
61
|
+
switch (e) {
|
|
62
62
|
case "top":
|
|
63
63
|
case "bottom":
|
|
64
|
-
return
|
|
64
|
+
return i ? t ? o : n : t ? n : o;
|
|
65
65
|
case "left":
|
|
66
66
|
case "right":
|
|
67
|
-
return
|
|
67
|
+
return t ? r : s;
|
|
68
68
|
default:
|
|
69
69
|
return [];
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
function _e(t,
|
|
73
|
-
const o =
|
|
74
|
-
let r =
|
|
75
|
-
return o && (r = r.map((s) => s + "-" + o),
|
|
72
|
+
function _e(e, t, i, n) {
|
|
73
|
+
const o = H(e);
|
|
74
|
+
let r = Le($(e), i === "start", n);
|
|
75
|
+
return o && (r = r.map((s) => s + "-" + o), t && (r = r.concat(r.map(pt)))), r;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
return
|
|
77
|
+
function st(e) {
|
|
78
|
+
return e.replace(/left|right|bottom|top/g, (t) => Pe[t]);
|
|
79
79
|
}
|
|
80
|
-
function ze(
|
|
80
|
+
function ze(e) {
|
|
81
81
|
return {
|
|
82
82
|
top: 0,
|
|
83
83
|
right: 0,
|
|
84
84
|
bottom: 0,
|
|
85
85
|
left: 0,
|
|
86
|
-
...
|
|
86
|
+
...e
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
function oe(
|
|
90
|
-
return typeof
|
|
91
|
-
top:
|
|
92
|
-
right:
|
|
93
|
-
bottom:
|
|
94
|
-
left:
|
|
89
|
+
function oe(e) {
|
|
90
|
+
return typeof e != "number" ? ze(e) : {
|
|
91
|
+
top: e,
|
|
92
|
+
right: e,
|
|
93
|
+
bottom: e,
|
|
94
|
+
left: e
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
-
function mt(
|
|
97
|
+
function mt(e) {
|
|
98
98
|
const {
|
|
99
|
-
x:
|
|
100
|
-
y:
|
|
101
|
-
width:
|
|
99
|
+
x: t,
|
|
100
|
+
y: i,
|
|
101
|
+
width: n,
|
|
102
102
|
height: o
|
|
103
|
-
} =
|
|
103
|
+
} = e;
|
|
104
104
|
return {
|
|
105
|
-
width:
|
|
105
|
+
width: n,
|
|
106
106
|
height: o,
|
|
107
|
-
top:
|
|
108
|
-
left:
|
|
109
|
-
right:
|
|
110
|
-
bottom:
|
|
111
|
-
x:
|
|
112
|
-
y:
|
|
107
|
+
top: i,
|
|
108
|
+
left: t,
|
|
109
|
+
right: t + n,
|
|
110
|
+
bottom: i + o,
|
|
111
|
+
x: t,
|
|
112
|
+
y: i
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
function Mt(
|
|
115
|
+
function Mt(e, t, i) {
|
|
116
116
|
let {
|
|
117
|
-
reference:
|
|
117
|
+
reference: n,
|
|
118
118
|
floating: o
|
|
119
|
-
} =
|
|
120
|
-
const r =
|
|
121
|
-
let
|
|
119
|
+
} = e;
|
|
120
|
+
const r = Q(t), s = At(t), l = Ot(s), c = $(t), a = r === "y", f = n.x + n.width / 2 - o.width / 2, p = n.y + n.height / 2 - o.height / 2, d = n[l] / 2 - o[l] / 2;
|
|
121
|
+
let m;
|
|
122
122
|
switch (c) {
|
|
123
123
|
case "top":
|
|
124
|
-
|
|
125
|
-
x:
|
|
126
|
-
y:
|
|
124
|
+
m = {
|
|
125
|
+
x: f,
|
|
126
|
+
y: n.y - o.height
|
|
127
127
|
};
|
|
128
128
|
break;
|
|
129
129
|
case "bottom":
|
|
130
|
-
|
|
131
|
-
x:
|
|
132
|
-
y:
|
|
130
|
+
m = {
|
|
131
|
+
x: f,
|
|
132
|
+
y: n.y + n.height
|
|
133
133
|
};
|
|
134
134
|
break;
|
|
135
135
|
case "right":
|
|
136
|
-
|
|
137
|
-
x:
|
|
138
|
-
y:
|
|
136
|
+
m = {
|
|
137
|
+
x: n.x + n.width,
|
|
138
|
+
y: p
|
|
139
139
|
};
|
|
140
140
|
break;
|
|
141
141
|
case "left":
|
|
142
|
-
|
|
143
|
-
x:
|
|
144
|
-
y:
|
|
142
|
+
m = {
|
|
143
|
+
x: n.x - o.width,
|
|
144
|
+
y: p
|
|
145
145
|
};
|
|
146
146
|
break;
|
|
147
147
|
default:
|
|
148
|
-
|
|
149
|
-
x:
|
|
150
|
-
y:
|
|
148
|
+
m = {
|
|
149
|
+
x: n.x,
|
|
150
|
+
y: n.y
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
switch (
|
|
153
|
+
switch (H(t)) {
|
|
154
154
|
case "start":
|
|
155
|
-
|
|
155
|
+
m[s] -= d * (i && a ? -1 : 1);
|
|
156
156
|
break;
|
|
157
157
|
case "end":
|
|
158
|
-
|
|
158
|
+
m[s] += d * (i && a ? -1 : 1);
|
|
159
159
|
break;
|
|
160
160
|
}
|
|
161
|
-
return
|
|
161
|
+
return m;
|
|
162
162
|
}
|
|
163
|
-
const
|
|
163
|
+
const De = async (e, t, i) => {
|
|
164
164
|
const {
|
|
165
|
-
placement:
|
|
165
|
+
placement: n = "bottom",
|
|
166
166
|
strategy: o = "absolute",
|
|
167
167
|
middleware: r = [],
|
|
168
168
|
platform: s
|
|
169
|
-
} =
|
|
169
|
+
} = i, l = r.filter(Boolean), c = await (s.isRTL == null ? void 0 : s.isRTL(t));
|
|
170
170
|
let a = await s.getElementRects({
|
|
171
|
-
reference:
|
|
172
|
-
floating:
|
|
171
|
+
reference: e,
|
|
172
|
+
floating: t,
|
|
173
173
|
strategy: o
|
|
174
174
|
}), {
|
|
175
|
-
x:
|
|
176
|
-
y:
|
|
177
|
-
} = Mt(a,
|
|
175
|
+
x: f,
|
|
176
|
+
y: p
|
|
177
|
+
} = Mt(a, n, c), d = n, m = {}, v = 0;
|
|
178
178
|
for (let g = 0; g < l.length; g++) {
|
|
179
179
|
const {
|
|
180
180
|
name: h,
|
|
@@ -182,72 +182,72 @@ const Te = async (t, e, n) => {
|
|
|
182
182
|
} = l[g], {
|
|
183
183
|
x: y,
|
|
184
184
|
y: w,
|
|
185
|
-
data:
|
|
185
|
+
data: O,
|
|
186
186
|
reset: x
|
|
187
187
|
} = await u({
|
|
188
|
-
x:
|
|
189
|
-
y:
|
|
190
|
-
initialPlacement:
|
|
188
|
+
x: f,
|
|
189
|
+
y: p,
|
|
190
|
+
initialPlacement: n,
|
|
191
191
|
placement: d,
|
|
192
192
|
strategy: o,
|
|
193
|
-
middlewareData:
|
|
193
|
+
middlewareData: m,
|
|
194
194
|
rects: a,
|
|
195
195
|
platform: s,
|
|
196
196
|
elements: {
|
|
197
|
-
reference:
|
|
198
|
-
floating:
|
|
197
|
+
reference: e,
|
|
198
|
+
floating: t
|
|
199
199
|
}
|
|
200
200
|
});
|
|
201
|
-
|
|
202
|
-
...
|
|
201
|
+
f = y ?? f, p = w ?? p, m = {
|
|
202
|
+
...m,
|
|
203
203
|
[h]: {
|
|
204
|
-
...
|
|
205
|
-
...
|
|
204
|
+
...m[h],
|
|
205
|
+
...O
|
|
206
206
|
}
|
|
207
|
-
}, x &&
|
|
208
|
-
reference:
|
|
209
|
-
floating:
|
|
207
|
+
}, x && v <= 50 && (v++, typeof x == "object" && (x.placement && (d = x.placement), x.rects && (a = x.rects === !0 ? await s.getElementRects({
|
|
208
|
+
reference: e,
|
|
209
|
+
floating: t,
|
|
210
210
|
strategy: o
|
|
211
211
|
}) : x.rects), {
|
|
212
|
-
x:
|
|
213
|
-
y:
|
|
212
|
+
x: f,
|
|
213
|
+
y: p
|
|
214
214
|
} = Mt(a, d, c)), g = -1);
|
|
215
215
|
}
|
|
216
216
|
return {
|
|
217
|
-
x:
|
|
218
|
-
y:
|
|
217
|
+
x: f,
|
|
218
|
+
y: p,
|
|
219
219
|
placement: d,
|
|
220
220
|
strategy: o,
|
|
221
|
-
middlewareData:
|
|
221
|
+
middlewareData: m
|
|
222
222
|
};
|
|
223
223
|
};
|
|
224
|
-
async function
|
|
225
|
-
var
|
|
226
|
-
|
|
224
|
+
async function ot(e, t) {
|
|
225
|
+
var i;
|
|
226
|
+
t === void 0 && (t = {});
|
|
227
227
|
const {
|
|
228
|
-
x:
|
|
228
|
+
x: n,
|
|
229
229
|
y: o,
|
|
230
230
|
platform: r,
|
|
231
231
|
rects: s,
|
|
232
232
|
elements: l,
|
|
233
233
|
strategy: c
|
|
234
|
-
} =
|
|
234
|
+
} = e, {
|
|
235
235
|
boundary: a = "clippingAncestors",
|
|
236
|
-
rootBoundary:
|
|
237
|
-
elementContext:
|
|
236
|
+
rootBoundary: f = "viewport",
|
|
237
|
+
elementContext: p = "floating",
|
|
238
238
|
altBoundary: d = !1,
|
|
239
|
-
padding:
|
|
240
|
-
} =
|
|
241
|
-
element: (
|
|
239
|
+
padding: m = 0
|
|
240
|
+
} = Z(t, e), v = oe(m), h = l[d ? p === "floating" ? "reference" : "floating" : p], u = mt(await r.getClippingRect({
|
|
241
|
+
element: (i = await (r.isElement == null ? void 0 : r.isElement(h))) == null || i ? h : h.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(l.floating)),
|
|
242
242
|
boundary: a,
|
|
243
|
-
rootBoundary:
|
|
243
|
+
rootBoundary: f,
|
|
244
244
|
strategy: c
|
|
245
|
-
})), y =
|
|
246
|
-
x:
|
|
245
|
+
})), y = p === "floating" ? {
|
|
246
|
+
x: n,
|
|
247
247
|
y: o,
|
|
248
248
|
width: s.floating.width,
|
|
249
249
|
height: s.floating.height
|
|
250
|
-
} : s.reference, w = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating)),
|
|
250
|
+
} : s.reference, w = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating)), O = await (r.isElement == null ? void 0 : r.isElement(w)) ? await (r.getScale == null ? void 0 : r.getScale(w)) || {
|
|
251
251
|
x: 1,
|
|
252
252
|
y: 1
|
|
253
253
|
} : {
|
|
@@ -260,34 +260,34 @@ async function st(t, e) {
|
|
|
260
260
|
strategy: c
|
|
261
261
|
}) : y);
|
|
262
262
|
return {
|
|
263
|
-
top: (u.top - x.top +
|
|
264
|
-
bottom: (x.bottom - u.bottom +
|
|
265
|
-
left: (u.left - x.left +
|
|
266
|
-
right: (x.right - u.right +
|
|
263
|
+
top: (u.top - x.top + v.top) / O.y,
|
|
264
|
+
bottom: (x.bottom - u.bottom + v.bottom) / O.y,
|
|
265
|
+
left: (u.left - x.left + v.left) / O.x,
|
|
266
|
+
right: (x.right - u.right + v.right) / O.x
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
|
-
function
|
|
270
|
-
return (
|
|
269
|
+
function Te(e, t, i) {
|
|
270
|
+
return (e ? [...i.filter((o) => H(o) === e), ...i.filter((o) => H(o) !== e)] : i.filter((o) => $(o) === o)).filter((o) => e ? H(o) === e || (t ? pt(o) !== o : !1) : !0);
|
|
271
271
|
}
|
|
272
|
-
const
|
|
273
|
-
return
|
|
272
|
+
const ke = function(e) {
|
|
273
|
+
return e === void 0 && (e = {}), {
|
|
274
274
|
name: "autoPlacement",
|
|
275
|
-
options:
|
|
276
|
-
async fn(
|
|
277
|
-
var
|
|
275
|
+
options: e,
|
|
276
|
+
async fn(t) {
|
|
277
|
+
var i, n, o;
|
|
278
278
|
const {
|
|
279
279
|
rects: r,
|
|
280
280
|
middlewareData: s,
|
|
281
281
|
placement: l,
|
|
282
282
|
platform: c,
|
|
283
283
|
elements: a
|
|
284
|
-
} =
|
|
285
|
-
crossAxis:
|
|
286
|
-
alignment:
|
|
284
|
+
} = t, {
|
|
285
|
+
crossAxis: f = !1,
|
|
286
|
+
alignment: p,
|
|
287
287
|
allowedPlacements: d = Ft,
|
|
288
|
-
autoAlignment:
|
|
289
|
-
...
|
|
290
|
-
} =
|
|
288
|
+
autoAlignment: m = !0,
|
|
289
|
+
...v
|
|
290
|
+
} = Z(e, t), g = p !== void 0 || d === Ft ? Te(p || null, m, d) : d, h = await ot(t, v), u = ((i = s.autoPlacement) == null ? void 0 : i.index) || 0, y = g[u];
|
|
291
291
|
if (y == null)
|
|
292
292
|
return {};
|
|
293
293
|
const w = ee(y, r, await (c.isRTL == null ? void 0 : c.isRTL(a.floating)));
|
|
@@ -297,9 +297,9 @@ const De = function(t) {
|
|
|
297
297
|
placement: g[0]
|
|
298
298
|
}
|
|
299
299
|
};
|
|
300
|
-
const
|
|
300
|
+
const O = [h[$(y)], h[w[0]], h[w[1]]], x = [...((n = s.autoPlacement) == null ? void 0 : n.overflows) || [], {
|
|
301
301
|
placement: y,
|
|
302
|
-
overflows:
|
|
302
|
+
overflows: O
|
|
303
303
|
}], D = g[u + 1];
|
|
304
304
|
if (D)
|
|
305
305
|
return {
|
|
@@ -311,38 +311,38 @@ const De = function(t) {
|
|
|
311
311
|
placement: D
|
|
312
312
|
}
|
|
313
313
|
};
|
|
314
|
-
const
|
|
315
|
-
const
|
|
316
|
-
return [
|
|
314
|
+
const P = x.map((C) => {
|
|
315
|
+
const L = H(C.placement);
|
|
316
|
+
return [C.placement, L && f ? (
|
|
317
317
|
// Check along the mainAxis and main crossAxis side.
|
|
318
|
-
|
|
318
|
+
C.overflows.slice(0, 2).reduce((j, k) => j + k, 0)
|
|
319
319
|
) : (
|
|
320
320
|
// Check only the mainAxis.
|
|
321
|
-
|
|
322
|
-
),
|
|
323
|
-
}).sort((
|
|
321
|
+
C.overflows[0]
|
|
322
|
+
), C.overflows];
|
|
323
|
+
}).sort((C, L) => C[1] - L[1]), T = ((o = P.filter((C) => C[2].slice(
|
|
324
324
|
0,
|
|
325
325
|
// Aligned placements should not check their opposite crossAxis
|
|
326
326
|
// side.
|
|
327
|
-
|
|
328
|
-
).every((
|
|
329
|
-
return
|
|
327
|
+
H(C[0]) ? 2 : 3
|
|
328
|
+
).every((L) => L <= 0))[0]) == null ? void 0 : o[0]) || P[0][0];
|
|
329
|
+
return T !== l ? {
|
|
330
330
|
data: {
|
|
331
331
|
index: u + 1,
|
|
332
332
|
overflows: x
|
|
333
333
|
},
|
|
334
334
|
reset: {
|
|
335
|
-
placement:
|
|
335
|
+
placement: T
|
|
336
336
|
}
|
|
337
337
|
} : {};
|
|
338
338
|
}
|
|
339
339
|
};
|
|
340
|
-
},
|
|
341
|
-
return
|
|
340
|
+
}, $e = function(e) {
|
|
341
|
+
return e === void 0 && (e = {}), {
|
|
342
342
|
name: "flip",
|
|
343
|
-
options:
|
|
344
|
-
async fn(
|
|
345
|
-
var
|
|
343
|
+
options: e,
|
|
344
|
+
async fn(t) {
|
|
345
|
+
var i, n;
|
|
346
346
|
const {
|
|
347
347
|
placement: o,
|
|
348
348
|
middlewareData: r,
|
|
@@ -350,66 +350,66 @@ const De = function(t) {
|
|
|
350
350
|
initialPlacement: l,
|
|
351
351
|
platform: c,
|
|
352
352
|
elements: a
|
|
353
|
-
} =
|
|
354
|
-
mainAxis:
|
|
355
|
-
crossAxis:
|
|
353
|
+
} = t, {
|
|
354
|
+
mainAxis: f = !0,
|
|
355
|
+
crossAxis: p = !0,
|
|
356
356
|
fallbackPlacements: d,
|
|
357
|
-
fallbackStrategy:
|
|
358
|
-
fallbackAxisSideDirection:
|
|
357
|
+
fallbackStrategy: m = "bestFit",
|
|
358
|
+
fallbackAxisSideDirection: v = "none",
|
|
359
359
|
flipAlignment: g = !0,
|
|
360
360
|
...h
|
|
361
|
-
} =
|
|
362
|
-
if ((
|
|
361
|
+
} = Z(e, t);
|
|
362
|
+
if ((i = r.arrow) != null && i.alignmentOffset)
|
|
363
363
|
return {};
|
|
364
|
-
const u =
|
|
365
|
-
!d && D && x.push(..._e(l, g,
|
|
366
|
-
const
|
|
367
|
-
let
|
|
368
|
-
if (
|
|
369
|
-
const
|
|
370
|
-
|
|
364
|
+
const u = $(o), y = Q(l), w = $(l) === l, O = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), x = d || (w || !g ? [st(l)] : Se(l)), D = v !== "none";
|
|
365
|
+
!d && D && x.push(..._e(l, g, v, O));
|
|
366
|
+
const P = [l, ...x], S = await ot(t, h), T = [];
|
|
367
|
+
let C = ((n = r.flip) == null ? void 0 : n.overflows) || [];
|
|
368
|
+
if (f && T.push(S[u]), p) {
|
|
369
|
+
const I = ee(o, s, O);
|
|
370
|
+
T.push(S[I[0]], S[I[1]]);
|
|
371
371
|
}
|
|
372
|
-
if (
|
|
372
|
+
if (C = [...C, {
|
|
373
373
|
placement: o,
|
|
374
|
-
overflows:
|
|
375
|
-
}], !
|
|
376
|
-
var
|
|
377
|
-
const
|
|
378
|
-
if (
|
|
374
|
+
overflows: T
|
|
375
|
+
}], !T.every((I) => I <= 0)) {
|
|
376
|
+
var L, j;
|
|
377
|
+
const I = (((L = r.flip) == null ? void 0 : L.index) || 0) + 1, Y = P[I];
|
|
378
|
+
if (Y)
|
|
379
379
|
return {
|
|
380
380
|
data: {
|
|
381
|
-
index:
|
|
382
|
-
overflows:
|
|
381
|
+
index: I,
|
|
382
|
+
overflows: C
|
|
383
383
|
},
|
|
384
384
|
reset: {
|
|
385
|
-
placement:
|
|
385
|
+
placement: Y
|
|
386
386
|
}
|
|
387
387
|
};
|
|
388
|
-
let
|
|
389
|
-
if (!
|
|
390
|
-
switch (
|
|
388
|
+
let X = (j = C.filter((K) => K.overflows[0] <= 0).sort((K, N) => K.overflows[1] - N.overflows[1])[0]) == null ? void 0 : j.placement;
|
|
389
|
+
if (!X)
|
|
390
|
+
switch (m) {
|
|
391
391
|
case "bestFit": {
|
|
392
|
-
var
|
|
393
|
-
const
|
|
392
|
+
var k;
|
|
393
|
+
const K = (k = C.filter((N) => {
|
|
394
394
|
if (D) {
|
|
395
|
-
const
|
|
396
|
-
return
|
|
395
|
+
const B = Q(N.placement);
|
|
396
|
+
return B === y || // Create a bias to the `y` side axis due to horizontal
|
|
397
397
|
// reading directions favoring greater width.
|
|
398
|
-
|
|
398
|
+
B === "y";
|
|
399
399
|
}
|
|
400
400
|
return !0;
|
|
401
|
-
}).map((
|
|
402
|
-
|
|
401
|
+
}).map((N) => [N.placement, N.overflows.filter((B) => B > 0).reduce((B, gt) => B + gt, 0)]).sort((N, B) => N[1] - B[1])[0]) == null ? void 0 : k[0];
|
|
402
|
+
K && (X = K);
|
|
403
403
|
break;
|
|
404
404
|
}
|
|
405
405
|
case "initialPlacement":
|
|
406
|
-
|
|
406
|
+
X = l;
|
|
407
407
|
break;
|
|
408
408
|
}
|
|
409
|
-
if (o !==
|
|
409
|
+
if (o !== X)
|
|
410
410
|
return {
|
|
411
411
|
reset: {
|
|
412
|
-
placement:
|
|
412
|
+
placement: X
|
|
413
413
|
}
|
|
414
414
|
};
|
|
415
415
|
}
|
|
@@ -417,34 +417,34 @@ const De = function(t) {
|
|
|
417
417
|
}
|
|
418
418
|
};
|
|
419
419
|
};
|
|
420
|
-
function jt(
|
|
420
|
+
function jt(e, t) {
|
|
421
421
|
return {
|
|
422
|
-
top:
|
|
423
|
-
right:
|
|
424
|
-
bottom:
|
|
425
|
-
left:
|
|
422
|
+
top: e.top - t.height,
|
|
423
|
+
right: e.right - t.width,
|
|
424
|
+
bottom: e.bottom - t.height,
|
|
425
|
+
left: e.left - t.width
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
function It(
|
|
429
|
-
return te.some((
|
|
428
|
+
function It(e) {
|
|
429
|
+
return te.some((t) => e[t] >= 0);
|
|
430
430
|
}
|
|
431
|
-
const
|
|
432
|
-
return
|
|
431
|
+
const Be = function(e) {
|
|
432
|
+
return e === void 0 && (e = {}), {
|
|
433
433
|
name: "hide",
|
|
434
|
-
options:
|
|
435
|
-
async fn(
|
|
434
|
+
options: e,
|
|
435
|
+
async fn(t) {
|
|
436
436
|
const {
|
|
437
|
-
rects:
|
|
438
|
-
} =
|
|
439
|
-
strategy:
|
|
437
|
+
rects: i
|
|
438
|
+
} = t, {
|
|
439
|
+
strategy: n = "referenceHidden",
|
|
440
440
|
...o
|
|
441
|
-
} =
|
|
442
|
-
switch (
|
|
441
|
+
} = Z(e, t);
|
|
442
|
+
switch (n) {
|
|
443
443
|
case "referenceHidden": {
|
|
444
|
-
const r = await
|
|
444
|
+
const r = await ot(t, {
|
|
445
445
|
...o,
|
|
446
446
|
elementContext: "reference"
|
|
447
|
-
}), s = jt(r,
|
|
447
|
+
}), s = jt(r, i.reference);
|
|
448
448
|
return {
|
|
449
449
|
data: {
|
|
450
450
|
referenceHiddenOffsets: s,
|
|
@@ -453,10 +453,10 @@ const $e = function(t) {
|
|
|
453
453
|
};
|
|
454
454
|
}
|
|
455
455
|
case "escaped": {
|
|
456
|
-
const r = await
|
|
456
|
+
const r = await ot(t, {
|
|
457
457
|
...o,
|
|
458
458
|
altBoundary: !0
|
|
459
|
-
}), s = jt(r,
|
|
459
|
+
}), s = jt(r, i.floating);
|
|
460
460
|
return {
|
|
461
461
|
data: {
|
|
462
462
|
escapedOffsets: s,
|
|
@@ -470,46 +470,46 @@ const $e = function(t) {
|
|
|
470
470
|
}
|
|
471
471
|
};
|
|
472
472
|
};
|
|
473
|
-
async function He(
|
|
473
|
+
async function He(e, t) {
|
|
474
474
|
const {
|
|
475
|
-
placement:
|
|
476
|
-
platform:
|
|
475
|
+
placement: i,
|
|
476
|
+
platform: n,
|
|
477
477
|
elements: o
|
|
478
|
-
} =
|
|
478
|
+
} = e, r = await (n.isRTL == null ? void 0 : n.isRTL(o.floating)), s = $(i), l = H(i), c = Q(i) === "y", a = ["left", "top"].includes(s) ? -1 : 1, f = r && c ? -1 : 1, p = Z(t, e);
|
|
479
479
|
let {
|
|
480
480
|
mainAxis: d,
|
|
481
|
-
crossAxis:
|
|
482
|
-
alignmentAxis:
|
|
483
|
-
} = typeof
|
|
484
|
-
mainAxis:
|
|
481
|
+
crossAxis: m,
|
|
482
|
+
alignmentAxis: v
|
|
483
|
+
} = typeof p == "number" ? {
|
|
484
|
+
mainAxis: p,
|
|
485
485
|
crossAxis: 0,
|
|
486
486
|
alignmentAxis: null
|
|
487
487
|
} : {
|
|
488
|
-
mainAxis:
|
|
489
|
-
crossAxis:
|
|
490
|
-
alignmentAxis:
|
|
488
|
+
mainAxis: p.mainAxis || 0,
|
|
489
|
+
crossAxis: p.crossAxis || 0,
|
|
490
|
+
alignmentAxis: p.alignmentAxis
|
|
491
491
|
};
|
|
492
|
-
return l && typeof
|
|
493
|
-
x:
|
|
492
|
+
return l && typeof v == "number" && (m = l === "end" ? v * -1 : v), c ? {
|
|
493
|
+
x: m * f,
|
|
494
494
|
y: d * a
|
|
495
495
|
} : {
|
|
496
496
|
x: d * a,
|
|
497
|
-
y:
|
|
497
|
+
y: m * f
|
|
498
498
|
};
|
|
499
499
|
}
|
|
500
|
-
const Fe = function(
|
|
501
|
-
return
|
|
500
|
+
const Fe = function(e) {
|
|
501
|
+
return e === void 0 && (e = 0), {
|
|
502
502
|
name: "offset",
|
|
503
|
-
options:
|
|
504
|
-
async fn(
|
|
505
|
-
var
|
|
503
|
+
options: e,
|
|
504
|
+
async fn(t) {
|
|
505
|
+
var i, n;
|
|
506
506
|
const {
|
|
507
507
|
x: o,
|
|
508
508
|
y: r,
|
|
509
509
|
placement: s,
|
|
510
510
|
middlewareData: l
|
|
511
|
-
} =
|
|
512
|
-
return s === ((
|
|
511
|
+
} = t, c = await He(t, e);
|
|
512
|
+
return s === ((i = l.offset) == null ? void 0 : i.placement) && (n = l.arrow) != null && n.alignmentOffset ? {} : {
|
|
513
513
|
x: o + c.x,
|
|
514
514
|
y: r + c.y,
|
|
515
515
|
data: {
|
|
@@ -519,16 +519,16 @@ const Fe = function(t) {
|
|
|
519
519
|
};
|
|
520
520
|
}
|
|
521
521
|
};
|
|
522
|
-
}, Me = function(
|
|
523
|
-
return
|
|
522
|
+
}, Me = function(e) {
|
|
523
|
+
return e === void 0 && (e = {}), {
|
|
524
524
|
name: "shift",
|
|
525
|
-
options:
|
|
526
|
-
async fn(
|
|
525
|
+
options: e,
|
|
526
|
+
async fn(t) {
|
|
527
527
|
const {
|
|
528
|
-
x:
|
|
529
|
-
y:
|
|
528
|
+
x: i,
|
|
529
|
+
y: n,
|
|
530
530
|
placement: o
|
|
531
|
-
} =
|
|
531
|
+
} = t, {
|
|
532
532
|
mainAxis: r = !0,
|
|
533
533
|
crossAxis: s = !1,
|
|
534
534
|
limiter: l = {
|
|
@@ -544,271 +544,311 @@ const Fe = function(t) {
|
|
|
544
544
|
}
|
|
545
545
|
},
|
|
546
546
|
...c
|
|
547
|
-
} =
|
|
548
|
-
x:
|
|
549
|
-
y:
|
|
550
|
-
},
|
|
551
|
-
let
|
|
547
|
+
} = Z(e, t), a = {
|
|
548
|
+
x: i,
|
|
549
|
+
y: n
|
|
550
|
+
}, f = await ot(t, c), p = Q($(o)), d = Ct(p);
|
|
551
|
+
let m = a[d], v = a[p];
|
|
552
552
|
if (r) {
|
|
553
|
-
const h = d === "y" ? "top" : "left", u = d === "y" ? "bottom" : "right", y =
|
|
554
|
-
|
|
553
|
+
const h = d === "y" ? "top" : "left", u = d === "y" ? "bottom" : "right", y = m + f[h], w = m - f[u];
|
|
554
|
+
m = yt(y, m, w);
|
|
555
555
|
}
|
|
556
556
|
if (s) {
|
|
557
|
-
const h =
|
|
558
|
-
|
|
557
|
+
const h = p === "y" ? "top" : "left", u = p === "y" ? "bottom" : "right", y = v + f[h], w = v - f[u];
|
|
558
|
+
v = yt(y, v, w);
|
|
559
559
|
}
|
|
560
560
|
const g = l.fn({
|
|
561
|
-
...
|
|
562
|
-
[d]:
|
|
563
|
-
[
|
|
561
|
+
...t,
|
|
562
|
+
[d]: m,
|
|
563
|
+
[p]: v
|
|
564
564
|
});
|
|
565
565
|
return {
|
|
566
566
|
...g,
|
|
567
567
|
data: {
|
|
568
|
-
x: g.x -
|
|
569
|
-
y: g.y -
|
|
568
|
+
x: g.x - i,
|
|
569
|
+
y: g.y - n,
|
|
570
570
|
enabled: {
|
|
571
571
|
[d]: r,
|
|
572
|
-
[
|
|
572
|
+
[p]: s
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
};
|
|
576
576
|
}
|
|
577
577
|
};
|
|
578
|
+
}, je = function(e) {
|
|
579
|
+
return e === void 0 && (e = {}), {
|
|
580
|
+
name: "size",
|
|
581
|
+
options: e,
|
|
582
|
+
async fn(t) {
|
|
583
|
+
var i, n;
|
|
584
|
+
const {
|
|
585
|
+
placement: o,
|
|
586
|
+
rects: r,
|
|
587
|
+
platform: s,
|
|
588
|
+
elements: l
|
|
589
|
+
} = t, {
|
|
590
|
+
apply: c = () => {
|
|
591
|
+
},
|
|
592
|
+
...a
|
|
593
|
+
} = Z(e, t), f = await ot(t, a), p = $(o), d = H(o), m = Q(o) === "y", {
|
|
594
|
+
width: v,
|
|
595
|
+
height: g
|
|
596
|
+
} = r.floating;
|
|
597
|
+
let h, u;
|
|
598
|
+
p === "top" || p === "bottom" ? (h = p, u = d === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (u = p, h = d === "end" ? "top" : "bottom");
|
|
599
|
+
const y = g - f.top - f.bottom, w = v - f.left - f.right, O = q(g - f[h], y), x = q(v - f[u], w), D = !t.middlewareData.shift;
|
|
600
|
+
let P = O, S = x;
|
|
601
|
+
if ((i = t.middlewareData.shift) != null && i.enabled.x && (S = w), (n = t.middlewareData.shift) != null && n.enabled.y && (P = y), D && !d) {
|
|
602
|
+
const C = _(f.left, 0), L = _(f.right, 0), j = _(f.top, 0), k = _(f.bottom, 0);
|
|
603
|
+
m ? S = v - 2 * (C !== 0 || L !== 0 ? C + L : _(f.left, f.right)) : P = g - 2 * (j !== 0 || k !== 0 ? j + k : _(f.top, f.bottom));
|
|
604
|
+
}
|
|
605
|
+
await c({
|
|
606
|
+
...t,
|
|
607
|
+
availableWidth: S,
|
|
608
|
+
availableHeight: P
|
|
609
|
+
});
|
|
610
|
+
const T = await s.getDimensions(l.floating);
|
|
611
|
+
return v !== T.width || g !== T.height ? {
|
|
612
|
+
reset: {
|
|
613
|
+
rects: !0
|
|
614
|
+
}
|
|
615
|
+
} : {};
|
|
616
|
+
}
|
|
617
|
+
};
|
|
578
618
|
};
|
|
579
619
|
function dt() {
|
|
580
620
|
return typeof window < "u";
|
|
581
621
|
}
|
|
582
|
-
function nt(
|
|
583
|
-
return
|
|
622
|
+
function nt(e) {
|
|
623
|
+
return ie(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
584
624
|
}
|
|
585
|
-
function
|
|
586
|
-
var
|
|
587
|
-
return (
|
|
625
|
+
function z(e) {
|
|
626
|
+
var t;
|
|
627
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
588
628
|
}
|
|
589
|
-
function
|
|
590
|
-
var
|
|
591
|
-
return (
|
|
629
|
+
function U(e) {
|
|
630
|
+
var t;
|
|
631
|
+
return (t = (ie(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
592
632
|
}
|
|
593
|
-
function
|
|
594
|
-
return dt() ?
|
|
633
|
+
function ie(e) {
|
|
634
|
+
return dt() ? e instanceof Node || e instanceof z(e).Node : !1;
|
|
595
635
|
}
|
|
596
|
-
function
|
|
597
|
-
return dt() ?
|
|
636
|
+
function F(e) {
|
|
637
|
+
return dt() ? e instanceof Element || e instanceof z(e).Element : !1;
|
|
598
638
|
}
|
|
599
|
-
function
|
|
600
|
-
return dt() ?
|
|
639
|
+
function V(e) {
|
|
640
|
+
return dt() ? e instanceof HTMLElement || e instanceof z(e).HTMLElement : !1;
|
|
601
641
|
}
|
|
602
|
-
function Nt(
|
|
603
|
-
return !dt() || typeof ShadowRoot > "u" ? !1 :
|
|
642
|
+
function Nt(e) {
|
|
643
|
+
return !dt() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof z(e).ShadowRoot;
|
|
604
644
|
}
|
|
605
|
-
function lt(
|
|
645
|
+
function lt(e) {
|
|
606
646
|
const {
|
|
607
|
-
overflow:
|
|
608
|
-
overflowX:
|
|
609
|
-
overflowY:
|
|
647
|
+
overflow: t,
|
|
648
|
+
overflowX: i,
|
|
649
|
+
overflowY: n,
|
|
610
650
|
display: o
|
|
611
|
-
} =
|
|
612
|
-
return /auto|scroll|overlay|hidden|clip/.test(
|
|
651
|
+
} = M(e);
|
|
652
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + n + i) && !["inline", "contents"].includes(o);
|
|
613
653
|
}
|
|
614
|
-
function
|
|
615
|
-
return ["table", "td", "th"].includes(nt(
|
|
654
|
+
function Ie(e) {
|
|
655
|
+
return ["table", "td", "th"].includes(nt(e));
|
|
616
656
|
}
|
|
617
|
-
function ut(
|
|
618
|
-
return [":popover-open", ":modal"].some((
|
|
657
|
+
function ut(e) {
|
|
658
|
+
return [":popover-open", ":modal"].some((t) => {
|
|
619
659
|
try {
|
|
620
|
-
return
|
|
660
|
+
return e.matches(t);
|
|
621
661
|
} catch {
|
|
622
662
|
return !1;
|
|
623
663
|
}
|
|
624
664
|
});
|
|
625
665
|
}
|
|
626
|
-
function Et(
|
|
627
|
-
const
|
|
628
|
-
return ["transform", "translate", "scale", "rotate", "perspective"].some((
|
|
666
|
+
function Et(e) {
|
|
667
|
+
const t = Pt(), i = F(e) ? M(e) : e;
|
|
668
|
+
return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => i[n] ? i[n] !== "none" : !1) || (i.containerType ? i.containerType !== "normal" : !1) || !t && (i.backdropFilter ? i.backdropFilter !== "none" : !1) || !t && (i.filter ? i.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (i.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (i.contain || "").includes(n));
|
|
629
669
|
}
|
|
630
|
-
function
|
|
631
|
-
let
|
|
632
|
-
for (;
|
|
633
|
-
if (Et(
|
|
634
|
-
return
|
|
635
|
-
if (ut(
|
|
670
|
+
function Ne(e) {
|
|
671
|
+
let t = G(e);
|
|
672
|
+
for (; V(t) && !it(t); ) {
|
|
673
|
+
if (Et(t))
|
|
674
|
+
return t;
|
|
675
|
+
if (ut(t))
|
|
636
676
|
return null;
|
|
637
|
-
|
|
677
|
+
t = G(t);
|
|
638
678
|
}
|
|
639
679
|
return null;
|
|
640
680
|
}
|
|
641
681
|
function Pt() {
|
|
642
682
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
643
683
|
}
|
|
644
|
-
function
|
|
645
|
-
return ["html", "body", "#document"].includes(nt(
|
|
684
|
+
function it(e) {
|
|
685
|
+
return ["html", "body", "#document"].includes(nt(e));
|
|
646
686
|
}
|
|
647
|
-
function
|
|
648
|
-
return
|
|
687
|
+
function M(e) {
|
|
688
|
+
return z(e).getComputedStyle(e);
|
|
649
689
|
}
|
|
650
|
-
function ht(
|
|
651
|
-
return
|
|
652
|
-
scrollLeft:
|
|
653
|
-
scrollTop:
|
|
690
|
+
function ht(e) {
|
|
691
|
+
return F(e) ? {
|
|
692
|
+
scrollLeft: e.scrollLeft,
|
|
693
|
+
scrollTop: e.scrollTop
|
|
654
694
|
} : {
|
|
655
|
-
scrollLeft:
|
|
656
|
-
scrollTop:
|
|
695
|
+
scrollLeft: e.scrollX,
|
|
696
|
+
scrollTop: e.scrollY
|
|
657
697
|
};
|
|
658
698
|
}
|
|
659
|
-
function
|
|
660
|
-
if (nt(
|
|
661
|
-
return
|
|
662
|
-
const
|
|
699
|
+
function G(e) {
|
|
700
|
+
if (nt(e) === "html")
|
|
701
|
+
return e;
|
|
702
|
+
const t = (
|
|
663
703
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
Nt(
|
|
667
|
-
|
|
704
|
+
e.assignedSlot || // DOM Element detected.
|
|
705
|
+
e.parentNode || // ShadowRoot detected.
|
|
706
|
+
Nt(e) && e.host || // Fallback.
|
|
707
|
+
U(e)
|
|
668
708
|
);
|
|
669
|
-
return Nt(
|
|
709
|
+
return Nt(t) ? t.host : t;
|
|
670
710
|
}
|
|
671
|
-
function
|
|
672
|
-
const
|
|
673
|
-
return
|
|
711
|
+
function ne(e) {
|
|
712
|
+
const t = G(e);
|
|
713
|
+
return it(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : V(t) && lt(t) ? t : ne(t);
|
|
674
714
|
}
|
|
675
|
-
function rt(
|
|
676
|
-
var
|
|
677
|
-
|
|
678
|
-
const o =
|
|
715
|
+
function rt(e, t, i) {
|
|
716
|
+
var n;
|
|
717
|
+
t === void 0 && (t = []), i === void 0 && (i = !0);
|
|
718
|
+
const o = ne(e), r = o === ((n = e.ownerDocument) == null ? void 0 : n.body), s = z(o);
|
|
679
719
|
if (r) {
|
|
680
720
|
const l = wt(s);
|
|
681
|
-
return
|
|
721
|
+
return t.concat(s, s.visualViewport || [], lt(o) ? o : [], l && i ? rt(l) : []);
|
|
682
722
|
}
|
|
683
|
-
return
|
|
723
|
+
return t.concat(o, rt(o, [], i));
|
|
684
724
|
}
|
|
685
|
-
function wt(
|
|
686
|
-
return
|
|
725
|
+
function wt(e) {
|
|
726
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
687
727
|
}
|
|
688
|
-
function se(
|
|
689
|
-
const
|
|
690
|
-
let
|
|
691
|
-
const o =
|
|
692
|
-
return l && (
|
|
693
|
-
width:
|
|
694
|
-
height:
|
|
728
|
+
function se(e) {
|
|
729
|
+
const t = M(e);
|
|
730
|
+
let i = parseFloat(t.width) || 0, n = parseFloat(t.height) || 0;
|
|
731
|
+
const o = V(e), r = o ? e.offsetWidth : i, s = o ? e.offsetHeight : n, l = ft(i) !== r || ft(n) !== s;
|
|
732
|
+
return l && (i = r, n = s), {
|
|
733
|
+
width: i,
|
|
734
|
+
height: n,
|
|
695
735
|
$: l
|
|
696
736
|
};
|
|
697
737
|
}
|
|
698
|
-
function Rt(
|
|
699
|
-
return
|
|
738
|
+
function Rt(e) {
|
|
739
|
+
return F(e) ? e : e.contextElement;
|
|
700
740
|
}
|
|
701
|
-
function
|
|
702
|
-
const
|
|
703
|
-
if (!
|
|
704
|
-
return
|
|
705
|
-
const
|
|
706
|
-
width:
|
|
741
|
+
function et(e) {
|
|
742
|
+
const t = Rt(e);
|
|
743
|
+
if (!V(t))
|
|
744
|
+
return W(1);
|
|
745
|
+
const i = t.getBoundingClientRect(), {
|
|
746
|
+
width: n,
|
|
707
747
|
height: o,
|
|
708
748
|
$: r
|
|
709
|
-
} = se(
|
|
710
|
-
let s = (r ? ft(
|
|
749
|
+
} = se(t);
|
|
750
|
+
let s = (r ? ft(i.width) : i.width) / n, l = (r ? ft(i.height) : i.height) / o;
|
|
711
751
|
return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
712
752
|
x: s,
|
|
713
753
|
y: l
|
|
714
754
|
};
|
|
715
755
|
}
|
|
716
|
-
const
|
|
717
|
-
function re(
|
|
718
|
-
const
|
|
719
|
-
return !Pt() || !
|
|
720
|
-
x:
|
|
721
|
-
y:
|
|
756
|
+
const We = /* @__PURE__ */ W(0);
|
|
757
|
+
function re(e) {
|
|
758
|
+
const t = z(e);
|
|
759
|
+
return !Pt() || !t.visualViewport ? We : {
|
|
760
|
+
x: t.visualViewport.offsetLeft,
|
|
761
|
+
y: t.visualViewport.offsetTop
|
|
722
762
|
};
|
|
723
763
|
}
|
|
724
|
-
function
|
|
725
|
-
return
|
|
764
|
+
function Ve(e, t, i) {
|
|
765
|
+
return t === void 0 && (t = !1), !i || t && i !== z(e) ? !1 : t;
|
|
726
766
|
}
|
|
727
|
-
function
|
|
728
|
-
|
|
729
|
-
const o =
|
|
730
|
-
let s =
|
|
731
|
-
|
|
732
|
-
const l =
|
|
733
|
-
let c = (o.left + l.x) / s.x, a = (o.top + l.y) / s.y,
|
|
767
|
+
function tt(e, t, i, n) {
|
|
768
|
+
t === void 0 && (t = !1), i === void 0 && (i = !1);
|
|
769
|
+
const o = e.getBoundingClientRect(), r = Rt(e);
|
|
770
|
+
let s = W(1);
|
|
771
|
+
t && (n ? F(n) && (s = et(n)) : s = et(e));
|
|
772
|
+
const l = Ve(r, i, n) ? re(r) : W(0);
|
|
773
|
+
let c = (o.left + l.x) / s.x, a = (o.top + l.y) / s.y, f = o.width / s.x, p = o.height / s.y;
|
|
734
774
|
if (r) {
|
|
735
|
-
const d =
|
|
736
|
-
let
|
|
737
|
-
for (; g &&
|
|
738
|
-
const h =
|
|
739
|
-
c *= h.x, a *= h.y,
|
|
775
|
+
const d = z(r), m = n && F(n) ? z(n) : n;
|
|
776
|
+
let v = d, g = wt(v);
|
|
777
|
+
for (; g && n && m !== v; ) {
|
|
778
|
+
const h = et(g), u = g.getBoundingClientRect(), y = M(g), w = u.left + (g.clientLeft + parseFloat(y.paddingLeft)) * h.x, O = u.top + (g.clientTop + parseFloat(y.paddingTop)) * h.y;
|
|
779
|
+
c *= h.x, a *= h.y, f *= h.x, p *= h.y, c += w, a += O, v = z(g), g = wt(v);
|
|
740
780
|
}
|
|
741
781
|
}
|
|
742
782
|
return mt({
|
|
743
|
-
width:
|
|
744
|
-
height:
|
|
783
|
+
width: f,
|
|
784
|
+
height: p,
|
|
745
785
|
x: c,
|
|
746
786
|
y: a
|
|
747
787
|
});
|
|
748
788
|
}
|
|
749
|
-
function
|
|
750
|
-
const
|
|
751
|
-
return
|
|
789
|
+
function St(e, t) {
|
|
790
|
+
const i = ht(e).scrollLeft;
|
|
791
|
+
return t ? t.left + i : tt(U(e)).left + i;
|
|
752
792
|
}
|
|
753
|
-
function le(
|
|
754
|
-
|
|
755
|
-
const
|
|
793
|
+
function le(e, t, i) {
|
|
794
|
+
i === void 0 && (i = !1);
|
|
795
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - (i ? 0 : (
|
|
756
796
|
// RTL <body> scrollbar.
|
|
757
|
-
|
|
758
|
-
)), r =
|
|
797
|
+
St(e, n)
|
|
798
|
+
)), r = n.top + t.scrollTop;
|
|
759
799
|
return {
|
|
760
800
|
x: o,
|
|
761
801
|
y: r
|
|
762
802
|
};
|
|
763
803
|
}
|
|
764
|
-
function Ue(
|
|
804
|
+
function Ue(e) {
|
|
765
805
|
let {
|
|
766
|
-
elements:
|
|
767
|
-
rect:
|
|
768
|
-
offsetParent:
|
|
806
|
+
elements: t,
|
|
807
|
+
rect: i,
|
|
808
|
+
offsetParent: n,
|
|
769
809
|
strategy: o
|
|
770
|
-
} =
|
|
771
|
-
const r = o === "fixed", s =
|
|
772
|
-
if (
|
|
773
|
-
return
|
|
810
|
+
} = e;
|
|
811
|
+
const r = o === "fixed", s = U(n), l = t ? ut(t.floating) : !1;
|
|
812
|
+
if (n === s || l && r)
|
|
813
|
+
return i;
|
|
774
814
|
let c = {
|
|
775
815
|
scrollLeft: 0,
|
|
776
816
|
scrollTop: 0
|
|
777
|
-
}, a =
|
|
778
|
-
const
|
|
779
|
-
if ((
|
|
780
|
-
const
|
|
781
|
-
a =
|
|
817
|
+
}, a = W(1);
|
|
818
|
+
const f = W(0), p = V(n);
|
|
819
|
+
if ((p || !p && !r) && ((nt(n) !== "body" || lt(s)) && (c = ht(n)), V(n))) {
|
|
820
|
+
const m = tt(n);
|
|
821
|
+
a = et(n), f.x = m.x + n.clientLeft, f.y = m.y + n.clientTop;
|
|
782
822
|
}
|
|
783
|
-
const d = s && !
|
|
823
|
+
const d = s && !p && !r ? le(s, c, !0) : W(0);
|
|
784
824
|
return {
|
|
785
|
-
width:
|
|
786
|
-
height:
|
|
787
|
-
x:
|
|
788
|
-
y:
|
|
825
|
+
width: i.width * a.x,
|
|
826
|
+
height: i.height * a.y,
|
|
827
|
+
x: i.x * a.x - c.scrollLeft * a.x + f.x + d.x,
|
|
828
|
+
y: i.y * a.y - c.scrollTop * a.y + f.y + d.y
|
|
789
829
|
};
|
|
790
830
|
}
|
|
791
|
-
function
|
|
792
|
-
return Array.from(
|
|
831
|
+
function Ye(e) {
|
|
832
|
+
return Array.from(e.getClientRects());
|
|
793
833
|
}
|
|
794
|
-
function Ke(
|
|
795
|
-
const
|
|
796
|
-
let s = -
|
|
797
|
-
const l = -
|
|
798
|
-
return
|
|
834
|
+
function Ke(e) {
|
|
835
|
+
const t = U(e), i = ht(e), n = e.ownerDocument.body, o = _(t.scrollWidth, t.clientWidth, n.scrollWidth, n.clientWidth), r = _(t.scrollHeight, t.clientHeight, n.scrollHeight, n.clientHeight);
|
|
836
|
+
let s = -i.scrollLeft + St(e);
|
|
837
|
+
const l = -i.scrollTop;
|
|
838
|
+
return M(n).direction === "rtl" && (s += _(t.clientWidth, n.clientWidth) - o), {
|
|
799
839
|
width: o,
|
|
800
840
|
height: r,
|
|
801
841
|
x: s,
|
|
802
842
|
y: l
|
|
803
843
|
};
|
|
804
844
|
}
|
|
805
|
-
function Xe(
|
|
806
|
-
const
|
|
807
|
-
let r =
|
|
845
|
+
function Xe(e, t) {
|
|
846
|
+
const i = z(e), n = U(e), o = i.visualViewport;
|
|
847
|
+
let r = n.clientWidth, s = n.clientHeight, l = 0, c = 0;
|
|
808
848
|
if (o) {
|
|
809
849
|
r = o.width, s = o.height;
|
|
810
850
|
const a = Pt();
|
|
811
|
-
(!a || a &&
|
|
851
|
+
(!a || a && t === "fixed") && (l = o.offsetLeft, c = o.offsetTop);
|
|
812
852
|
}
|
|
813
853
|
return {
|
|
814
854
|
width: r,
|
|
@@ -817,8 +857,8 @@ function Xe(t, e) {
|
|
|
817
857
|
y: c
|
|
818
858
|
};
|
|
819
859
|
}
|
|
820
|
-
function
|
|
821
|
-
const
|
|
860
|
+
function qe(e, t) {
|
|
861
|
+
const i = tt(e, !0, t === "fixed"), n = i.top + e.clientTop, o = i.left + e.clientLeft, r = V(e) ? et(e) : W(1), s = e.clientWidth * r.x, l = e.clientHeight * r.y, c = o * r.x, a = n * r.y;
|
|
822
862
|
return {
|
|
823
863
|
width: s,
|
|
824
864
|
height: l,
|
|
@@ -826,53 +866,53 @@ function Ye(t, e) {
|
|
|
826
866
|
y: a
|
|
827
867
|
};
|
|
828
868
|
}
|
|
829
|
-
function Wt(
|
|
830
|
-
let
|
|
831
|
-
if (
|
|
832
|
-
|
|
833
|
-
else if (
|
|
834
|
-
|
|
835
|
-
else if (
|
|
836
|
-
|
|
869
|
+
function Wt(e, t, i) {
|
|
870
|
+
let n;
|
|
871
|
+
if (t === "viewport")
|
|
872
|
+
n = Xe(e, i);
|
|
873
|
+
else if (t === "document")
|
|
874
|
+
n = Ke(U(e));
|
|
875
|
+
else if (F(t))
|
|
876
|
+
n = qe(t, i);
|
|
837
877
|
else {
|
|
838
|
-
const o = re(
|
|
839
|
-
|
|
840
|
-
x:
|
|
841
|
-
y:
|
|
842
|
-
width:
|
|
843
|
-
height:
|
|
878
|
+
const o = re(e);
|
|
879
|
+
n = {
|
|
880
|
+
x: t.x - o.x,
|
|
881
|
+
y: t.y - o.y,
|
|
882
|
+
width: t.width,
|
|
883
|
+
height: t.height
|
|
844
884
|
};
|
|
845
885
|
}
|
|
846
|
-
return mt(
|
|
847
|
-
}
|
|
848
|
-
function ce(
|
|
849
|
-
const
|
|
850
|
-
return
|
|
851
|
-
}
|
|
852
|
-
function
|
|
853
|
-
const
|
|
854
|
-
if (
|
|
855
|
-
return
|
|
856
|
-
let
|
|
857
|
-
const r =
|
|
858
|
-
let s = r ?
|
|
859
|
-
for (;
|
|
860
|
-
const l =
|
|
861
|
-
!c && l.position === "fixed" && (o = null), (r ? !c && !o : !c && l.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || lt(s) && !c && ce(
|
|
886
|
+
return mt(n);
|
|
887
|
+
}
|
|
888
|
+
function ce(e, t) {
|
|
889
|
+
const i = G(e);
|
|
890
|
+
return i === t || !F(i) || it(i) ? !1 : M(i).position === "fixed" || ce(i, t);
|
|
891
|
+
}
|
|
892
|
+
function Ge(e, t) {
|
|
893
|
+
const i = t.get(e);
|
|
894
|
+
if (i)
|
|
895
|
+
return i;
|
|
896
|
+
let n = rt(e, [], !1).filter((l) => F(l) && nt(l) !== "body"), o = null;
|
|
897
|
+
const r = M(e).position === "fixed";
|
|
898
|
+
let s = r ? G(e) : e;
|
|
899
|
+
for (; F(s) && !it(s); ) {
|
|
900
|
+
const l = M(s), c = Et(s);
|
|
901
|
+
!c && l.position === "fixed" && (o = null), (r ? !c && !o : !c && l.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || lt(s) && !c && ce(e, s)) ? n = n.filter((f) => f !== s) : o = l, s = G(s);
|
|
862
902
|
}
|
|
863
|
-
return
|
|
903
|
+
return t.set(e, n), n;
|
|
864
904
|
}
|
|
865
|
-
function
|
|
905
|
+
function Ze(e) {
|
|
866
906
|
let {
|
|
867
|
-
element:
|
|
868
|
-
boundary:
|
|
869
|
-
rootBoundary:
|
|
907
|
+
element: t,
|
|
908
|
+
boundary: i,
|
|
909
|
+
rootBoundary: n,
|
|
870
910
|
strategy: o
|
|
871
|
-
} =
|
|
872
|
-
const s = [...
|
|
873
|
-
const
|
|
874
|
-
return a.top =
|
|
875
|
-
}, Wt(
|
|
911
|
+
} = e;
|
|
912
|
+
const s = [...i === "clippingAncestors" ? ut(t) ? [] : Ge(t, this._c) : [].concat(i), n], l = s[0], c = s.reduce((a, f) => {
|
|
913
|
+
const p = Wt(t, f, o);
|
|
914
|
+
return a.top = _(p.top, a.top), a.right = q(p.right, a.right), a.bottom = q(p.bottom, a.bottom), a.left = _(p.left, a.left), a;
|
|
915
|
+
}, Wt(t, l, o));
|
|
876
916
|
return {
|
|
877
917
|
width: c.right - c.left,
|
|
878
918
|
height: c.bottom - c.top,
|
|
@@ -880,256 +920,267 @@ function Ge(t) {
|
|
|
880
920
|
y: c.top
|
|
881
921
|
};
|
|
882
922
|
}
|
|
883
|
-
function
|
|
923
|
+
function Je(e) {
|
|
884
924
|
const {
|
|
885
|
-
width:
|
|
886
|
-
height:
|
|
887
|
-
} = se(
|
|
925
|
+
width: t,
|
|
926
|
+
height: i
|
|
927
|
+
} = se(e);
|
|
888
928
|
return {
|
|
889
|
-
width:
|
|
890
|
-
height:
|
|
929
|
+
width: t,
|
|
930
|
+
height: i
|
|
891
931
|
};
|
|
892
932
|
}
|
|
893
|
-
function
|
|
894
|
-
const
|
|
933
|
+
function Qe(e, t, i) {
|
|
934
|
+
const n = V(t), o = U(t), r = i === "fixed", s = tt(e, !0, r, t);
|
|
895
935
|
let l = {
|
|
896
936
|
scrollLeft: 0,
|
|
897
937
|
scrollTop: 0
|
|
898
938
|
};
|
|
899
|
-
const c =
|
|
900
|
-
if (
|
|
901
|
-
if ((nt(
|
|
902
|
-
const d =
|
|
903
|
-
c.x = d.x +
|
|
904
|
-
} else o && (c.x =
|
|
905
|
-
const a = o && !
|
|
939
|
+
const c = W(0);
|
|
940
|
+
if (n || !n && !r)
|
|
941
|
+
if ((nt(t) !== "body" || lt(o)) && (l = ht(t)), n) {
|
|
942
|
+
const d = tt(t, !0, r, t);
|
|
943
|
+
c.x = d.x + t.clientLeft, c.y = d.y + t.clientTop;
|
|
944
|
+
} else o && (c.x = St(o));
|
|
945
|
+
const a = o && !n && !r ? le(o, l) : W(0), f = s.left + l.scrollLeft - c.x - a.x, p = s.top + l.scrollTop - c.y - a.y;
|
|
906
946
|
return {
|
|
907
|
-
x:
|
|
908
|
-
y:
|
|
947
|
+
x: f,
|
|
948
|
+
y: p,
|
|
909
949
|
width: s.width,
|
|
910
950
|
height: s.height
|
|
911
951
|
};
|
|
912
952
|
}
|
|
913
|
-
function vt(
|
|
914
|
-
return
|
|
953
|
+
function vt(e) {
|
|
954
|
+
return M(e).position === "static";
|
|
915
955
|
}
|
|
916
|
-
function
|
|
917
|
-
if (!
|
|
956
|
+
function Vt(e, t) {
|
|
957
|
+
if (!V(e) || M(e).position === "fixed")
|
|
918
958
|
return null;
|
|
919
|
-
if (
|
|
920
|
-
return e
|
|
921
|
-
let
|
|
922
|
-
return
|
|
923
|
-
}
|
|
924
|
-
function ae(
|
|
925
|
-
const
|
|
926
|
-
if (ut(
|
|
927
|
-
return
|
|
928
|
-
if (!
|
|
929
|
-
let o =
|
|
930
|
-
for (; o && !
|
|
931
|
-
if (
|
|
959
|
+
if (t)
|
|
960
|
+
return t(e);
|
|
961
|
+
let i = e.offsetParent;
|
|
962
|
+
return U(e) === i && (i = i.ownerDocument.body), i;
|
|
963
|
+
}
|
|
964
|
+
function ae(e, t) {
|
|
965
|
+
const i = z(e);
|
|
966
|
+
if (ut(e))
|
|
967
|
+
return i;
|
|
968
|
+
if (!V(e)) {
|
|
969
|
+
let o = G(e);
|
|
970
|
+
for (; o && !it(o); ) {
|
|
971
|
+
if (F(o) && !vt(o))
|
|
932
972
|
return o;
|
|
933
|
-
o =
|
|
973
|
+
o = G(o);
|
|
934
974
|
}
|
|
935
|
-
return
|
|
975
|
+
return i;
|
|
936
976
|
}
|
|
937
|
-
let
|
|
938
|
-
for (;
|
|
939
|
-
|
|
940
|
-
return
|
|
977
|
+
let n = Vt(e, t);
|
|
978
|
+
for (; n && Ie(n) && vt(n); )
|
|
979
|
+
n = Vt(n, t);
|
|
980
|
+
return n && it(n) && vt(n) && !Et(n) ? i : n || Ne(e) || i;
|
|
941
981
|
}
|
|
942
|
-
const
|
|
943
|
-
const
|
|
982
|
+
const to = async function(e) {
|
|
983
|
+
const t = this.getOffsetParent || ae, i = this.getDimensions, n = await i(e.floating);
|
|
944
984
|
return {
|
|
945
|
-
reference:
|
|
985
|
+
reference: Qe(e.reference, await t(e.floating), e.strategy),
|
|
946
986
|
floating: {
|
|
947
987
|
x: 0,
|
|
948
988
|
y: 0,
|
|
949
|
-
width:
|
|
950
|
-
height:
|
|
989
|
+
width: n.width,
|
|
990
|
+
height: n.height
|
|
951
991
|
}
|
|
952
992
|
};
|
|
953
993
|
};
|
|
954
|
-
function
|
|
955
|
-
return
|
|
994
|
+
function eo(e) {
|
|
995
|
+
return M(e).direction === "rtl";
|
|
956
996
|
}
|
|
957
|
-
const
|
|
997
|
+
const oo = {
|
|
958
998
|
convertOffsetParentRelativeRectToViewportRelativeRect: Ue,
|
|
959
|
-
getDocumentElement:
|
|
960
|
-
getClippingRect:
|
|
999
|
+
getDocumentElement: U,
|
|
1000
|
+
getClippingRect: Ze,
|
|
961
1001
|
getOffsetParent: ae,
|
|
962
|
-
getElementRects:
|
|
963
|
-
getClientRects:
|
|
964
|
-
getDimensions:
|
|
965
|
-
getScale:
|
|
966
|
-
isElement:
|
|
967
|
-
isRTL:
|
|
1002
|
+
getElementRects: to,
|
|
1003
|
+
getClientRects: Ye,
|
|
1004
|
+
getDimensions: Je,
|
|
1005
|
+
getScale: et,
|
|
1006
|
+
isElement: F,
|
|
1007
|
+
isRTL: eo
|
|
968
1008
|
};
|
|
969
|
-
function fe(
|
|
970
|
-
return
|
|
1009
|
+
function fe(e, t) {
|
|
1010
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
971
1011
|
}
|
|
972
|
-
function
|
|
973
|
-
let
|
|
974
|
-
const o =
|
|
1012
|
+
function io(e, t) {
|
|
1013
|
+
let i = null, n;
|
|
1014
|
+
const o = U(e);
|
|
975
1015
|
function r() {
|
|
976
1016
|
var l;
|
|
977
|
-
clearTimeout(
|
|
1017
|
+
clearTimeout(n), (l = i) == null || l.disconnect(), i = null;
|
|
978
1018
|
}
|
|
979
1019
|
function s(l, c) {
|
|
980
1020
|
l === void 0 && (l = !1), c === void 0 && (c = 1), r();
|
|
981
|
-
const a =
|
|
982
|
-
left:
|
|
983
|
-
top:
|
|
1021
|
+
const a = e.getBoundingClientRect(), {
|
|
1022
|
+
left: f,
|
|
1023
|
+
top: p,
|
|
984
1024
|
width: d,
|
|
985
|
-
height:
|
|
1025
|
+
height: m
|
|
986
1026
|
} = a;
|
|
987
|
-
if (l ||
|
|
1027
|
+
if (l || t(), !d || !m)
|
|
988
1028
|
return;
|
|
989
|
-
const
|
|
990
|
-
rootMargin: -
|
|
991
|
-
threshold:
|
|
1029
|
+
const v = ct(p), g = ct(o.clientWidth - (f + d)), h = ct(o.clientHeight - (p + m)), u = ct(f), w = {
|
|
1030
|
+
rootMargin: -v + "px " + -g + "px " + -h + "px " + -u + "px",
|
|
1031
|
+
threshold: _(0, q(1, c)) || 1
|
|
992
1032
|
};
|
|
993
|
-
let
|
|
1033
|
+
let O = !0;
|
|
994
1034
|
function x(D) {
|
|
995
|
-
const
|
|
996
|
-
if (
|
|
997
|
-
if (!
|
|
1035
|
+
const P = D[0].intersectionRatio;
|
|
1036
|
+
if (P !== c) {
|
|
1037
|
+
if (!O)
|
|
998
1038
|
return s();
|
|
999
|
-
|
|
1039
|
+
P ? s(!1, P) : n = setTimeout(() => {
|
|
1000
1040
|
s(!1, 1e-7);
|
|
1001
1041
|
}, 1e3);
|
|
1002
1042
|
}
|
|
1003
|
-
|
|
1043
|
+
P === 1 && !fe(a, e.getBoundingClientRect()) && s(), O = !1;
|
|
1004
1044
|
}
|
|
1005
1045
|
try {
|
|
1006
|
-
|
|
1046
|
+
i = new IntersectionObserver(x, {
|
|
1007
1047
|
...w,
|
|
1008
1048
|
// Handle <iframe>s
|
|
1009
1049
|
root: o.ownerDocument
|
|
1010
1050
|
});
|
|
1011
1051
|
} catch {
|
|
1012
|
-
|
|
1052
|
+
i = new IntersectionObserver(x, w);
|
|
1013
1053
|
}
|
|
1014
|
-
|
|
1054
|
+
i.observe(e);
|
|
1015
1055
|
}
|
|
1016
1056
|
return s(!0), r;
|
|
1017
1057
|
}
|
|
1018
|
-
function no(t,
|
|
1019
|
-
|
|
1058
|
+
function no(e, t, i, n) {
|
|
1059
|
+
n === void 0 && (n = {});
|
|
1020
1060
|
const {
|
|
1021
1061
|
ancestorScroll: o = !0,
|
|
1022
1062
|
ancestorResize: r = !0,
|
|
1023
1063
|
elementResize: s = typeof ResizeObserver == "function",
|
|
1024
1064
|
layoutShift: l = typeof IntersectionObserver == "function",
|
|
1025
1065
|
animationFrame: c = !1
|
|
1026
|
-
} =
|
|
1027
|
-
|
|
1028
|
-
o && u.addEventListener("scroll",
|
|
1066
|
+
} = n, a = Rt(e), f = o || r ? [...a ? rt(a) : [], ...rt(t)] : [];
|
|
1067
|
+
f.forEach((u) => {
|
|
1068
|
+
o && u.addEventListener("scroll", i, {
|
|
1029
1069
|
passive: !0
|
|
1030
|
-
}), r && u.addEventListener("resize",
|
|
1070
|
+
}), r && u.addEventListener("resize", i);
|
|
1031
1071
|
});
|
|
1032
|
-
const
|
|
1033
|
-
let d = -1,
|
|
1034
|
-
s && (
|
|
1072
|
+
const p = a && l ? io(a, i) : null;
|
|
1073
|
+
let d = -1, m = null;
|
|
1074
|
+
s && (m = new ResizeObserver((u) => {
|
|
1035
1075
|
let [y] = u;
|
|
1036
|
-
y && y.target === a &&
|
|
1076
|
+
y && y.target === a && m && (m.unobserve(t), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
1037
1077
|
var w;
|
|
1038
|
-
(w =
|
|
1039
|
-
})),
|
|
1040
|
-
}), a && !c &&
|
|
1041
|
-
let
|
|
1078
|
+
(w = m) == null || w.observe(t);
|
|
1079
|
+
})), i();
|
|
1080
|
+
}), a && !c && m.observe(a), m.observe(t));
|
|
1081
|
+
let v, g = c ? tt(e) : null;
|
|
1042
1082
|
c && h();
|
|
1043
1083
|
function h() {
|
|
1044
|
-
const u =
|
|
1045
|
-
g && !fe(g, u) &&
|
|
1084
|
+
const u = tt(e);
|
|
1085
|
+
g && !fe(g, u) && i(), g = u, v = requestAnimationFrame(h);
|
|
1046
1086
|
}
|
|
1047
|
-
return
|
|
1087
|
+
return i(), () => {
|
|
1048
1088
|
var u;
|
|
1049
|
-
|
|
1050
|
-
o && y.removeEventListener("scroll",
|
|
1051
|
-
}),
|
|
1089
|
+
f.forEach((y) => {
|
|
1090
|
+
o && y.removeEventListener("scroll", i), r && y.removeEventListener("resize", i);
|
|
1091
|
+
}), p == null || p(), (u = m) == null || u.disconnect(), m = null, c && cancelAnimationFrame(v);
|
|
1052
1092
|
};
|
|
1053
1093
|
}
|
|
1054
|
-
const
|
|
1055
|
-
const
|
|
1056
|
-
platform:
|
|
1057
|
-
...
|
|
1094
|
+
const so = Fe, ro = ke, lo = Me, co = $e, ao = je, fo = Be, po = (e, t, i) => {
|
|
1095
|
+
const n = /* @__PURE__ */ new Map(), o = {
|
|
1096
|
+
platform: oo,
|
|
1097
|
+
...i
|
|
1058
1098
|
}, r = {
|
|
1059
1099
|
...o.platform,
|
|
1060
|
-
_c:
|
|
1100
|
+
_c: n
|
|
1061
1101
|
};
|
|
1062
|
-
return
|
|
1102
|
+
return De(e, t, {
|
|
1063
1103
|
...o,
|
|
1064
1104
|
platform: r
|
|
1065
1105
|
});
|
|
1066
|
-
},
|
|
1067
|
-
var
|
|
1106
|
+
}, mo = 16, uo = (e) => {
|
|
1107
|
+
var t;
|
|
1068
1108
|
return {
|
|
1069
|
-
visibility: (
|
|
1109
|
+
visibility: (t = e.hide) != null && t.referenceHidden ? "hidden" : "visible"
|
|
1070
1110
|
};
|
|
1071
|
-
},
|
|
1111
|
+
}, ho = (e) => ({
|
|
1072
1112
|
name: "arrowStyles",
|
|
1073
|
-
options:
|
|
1074
|
-
async fn(
|
|
1075
|
-
var
|
|
1076
|
-
const { x:
|
|
1113
|
+
options: e,
|
|
1114
|
+
async fn(t) {
|
|
1115
|
+
var Lt, _t;
|
|
1116
|
+
const { x: i, y: n, placement: o, rects: r, platform: s, elements: l, middlewareData: c } = t, { element: a, padding: f = 0 } = Z(e, t) || {};
|
|
1077
1117
|
if (a == null)
|
|
1078
1118
|
return {};
|
|
1079
|
-
const
|
|
1080
|
-
let
|
|
1081
|
-
(!
|
|
1082
|
-
const
|
|
1083
|
-
placement:
|
|
1119
|
+
const p = oe(f), d = { x: i, y: n }, m = At(o), v = Ct(m), g = Ot(m), h = await s.getDimensions(a), u = m === "y", y = u ? "top" : "left", w = u ? "bottom" : "right", O = u ? "clientHeight" : "clientWidth", x = r.reference[g] + r.reference[m] - d[m] - r.floating[g], D = d[m] - r.reference[m], P = await ((Lt = s.getOffsetParent) == null ? void 0 : Lt.call(s, a));
|
|
1120
|
+
let S = P ? P[O] : 0;
|
|
1121
|
+
(!S || !await ((_t = s.isElement) == null ? void 0 : _t.call(s, P))) && (S = l.floating[O] || r.floating[g]);
|
|
1122
|
+
const T = x / 2 - D / 2, C = S / 2 - h.width / 2 - 1, L = q(p[y], C), j = q(p[w], C), k = L, I = S - h.width - j, Y = S / 2 - h.width / 2 + T, X = yt(k, Y, I), K = !c.arrow && H(o) != null && Y !== X && r.reference[g] / 2 - (Y < k ? L : j) - h.width / 2 < 0, N = K ? Y < k ? Y - k : Y - I : 0, B = $(o), gt = ["top", "left"].includes(B) ? -1 : 1, de = h.height * gt, ue = vo({
|
|
1123
|
+
placement: B,
|
|
1084
1124
|
arrowHeight: h.height,
|
|
1085
1125
|
arrowWidth: h.width,
|
|
1086
1126
|
// pass arrow middleware
|
|
1087
|
-
[
|
|
1127
|
+
[m]: X
|
|
1088
1128
|
// for posterity, this is what the floating-ui arrow middleware returns
|
|
1089
1129
|
// centerOffset: center - offset - alignmentOffset,
|
|
1090
1130
|
// ...(shouldAddOffset && { alignmentOffset }),
|
|
1091
1131
|
});
|
|
1092
1132
|
return {
|
|
1093
|
-
[
|
|
1094
|
-
[
|
|
1133
|
+
[m]: d[m] + N,
|
|
1134
|
+
[v]: d[v] + de,
|
|
1095
1135
|
data: ue,
|
|
1096
|
-
reset:
|
|
1136
|
+
reset: K
|
|
1097
1137
|
};
|
|
1098
1138
|
}
|
|
1099
|
-
}), at = (t,
|
|
1100
|
-
if (
|
|
1101
|
-
const o =
|
|
1102
|
-
t
|
|
1139
|
+
}), at = (e, t, i, n) => {
|
|
1140
|
+
if (n) {
|
|
1141
|
+
const o = n === !0 ? i() : i(n);
|
|
1142
|
+
e[t](o);
|
|
1103
1143
|
}
|
|
1104
|
-
},
|
|
1105
|
-
baseConfig:
|
|
1106
|
-
middleware:
|
|
1107
|
-
offset:
|
|
1108
|
-
arrow:
|
|
1144
|
+
}, go = ({
|
|
1145
|
+
baseConfig: e,
|
|
1146
|
+
middleware: t,
|
|
1147
|
+
offset: i,
|
|
1148
|
+
arrow: n,
|
|
1109
1149
|
placement: o = "top"
|
|
1110
1150
|
}) => {
|
|
1111
|
-
const r = { ...
|
|
1151
|
+
const r = { ...e, placement: o };
|
|
1112
1152
|
let s = [];
|
|
1113
|
-
if (typeof
|
|
1114
|
-
s.push(
|
|
1115
|
-
let l =
|
|
1116
|
-
|
|
1153
|
+
if (typeof t.overrides != "object") {
|
|
1154
|
+
s.push(so(i));
|
|
1155
|
+
let l = t.flip ?? !0;
|
|
1156
|
+
if (t.autoPlacement && (l = !1), at(
|
|
1117
1157
|
s,
|
|
1118
1158
|
"unshift",
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
), at(s, "
|
|
1159
|
+
ro,
|
|
1160
|
+
t.autoPlacement
|
|
1161
|
+
), at(s, "unshift", co, l), t.size) {
|
|
1162
|
+
const c = t.size === !0 ? {
|
|
1163
|
+
padding: mo,
|
|
1164
|
+
apply({ availableHeight: a, elements: f }) {
|
|
1165
|
+
Object.assign(f.floating.style, {
|
|
1166
|
+
maxHeight: `${a}px`
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
} : t.size;
|
|
1170
|
+
s.push(ao(c));
|
|
1171
|
+
}
|
|
1172
|
+
at(s, "push", lo, t.shift ?? !0), at(s, "push", fo, t.hide ?? !0);
|
|
1122
1173
|
} else
|
|
1123
|
-
s.push(...
|
|
1124
|
-
return
|
|
1125
|
-
},
|
|
1126
|
-
placement:
|
|
1127
|
-
arrowHeight:
|
|
1128
|
-
arrowWidth:
|
|
1129
|
-
x:
|
|
1174
|
+
s.push(...t.overrides);
|
|
1175
|
+
return n.hide || s.push(ho(n.options)), typeof t.overrides == "function" && (s = t.overrides(s)), r.middleware = s, r;
|
|
1176
|
+
}, vo = ({
|
|
1177
|
+
placement: e,
|
|
1178
|
+
arrowHeight: t,
|
|
1179
|
+
arrowWidth: i,
|
|
1180
|
+
x: n,
|
|
1130
1181
|
y: o
|
|
1131
1182
|
}) => {
|
|
1132
|
-
const r =
|
|
1183
|
+
const r = $(e), s = i / 2 - t, l = {
|
|
1133
1184
|
/* since the default orientation is pointing down, we don't need to rotate the arrow
|
|
1134
1185
|
if the tooltip is on top of the reference element
|
|
1135
1186
|
*/
|
|
@@ -1157,7 +1208,7 @@ const io = Fe, so = De, ro = Me, lo = Be, co = $e, ao = (t, e, n) => {
|
|
|
1157
1208
|
*/
|
|
1158
1209
|
left: `rotate(-90deg) translateX(${-s}px)`,
|
|
1159
1210
|
right: `rotate(90deg) translateX(${s}px)`
|
|
1160
|
-
}[r], c = -
|
|
1211
|
+
}[r], c = -i / 2 - t, a = {
|
|
1161
1212
|
/*
|
|
1162
1213
|
* If the tooltip is at the top of the anchor, place the arrow at the bottom of
|
|
1163
1214
|
* the tooltip with bottom: 0. The bottom of the arrow will be flush with the bottom
|
|
@@ -1171,7 +1222,7 @@ const io = Fe, so = De, ro = Me, lo = Be, co = $e, ao = (t, e, n) => {
|
|
|
1171
1222
|
* --- (bottom of tooltip)
|
|
1172
1223
|
* v (arrow)
|
|
1173
1224
|
*/
|
|
1174
|
-
top: `${-
|
|
1225
|
+
top: `${-t}px`,
|
|
1175
1226
|
/*
|
|
1176
1227
|
* Place the arrow at the top of the tooltip with top: 0. The arrow will be rotated
|
|
1177
1228
|
* to point downwards by default. When it's then rotated by 180 deg with
|
|
@@ -1183,7 +1234,7 @@ const io = Fe, so = De, ro = Me, lo = Be, co = $e, ao = (t, e, n) => {
|
|
|
1183
1234
|
*
|
|
1184
1235
|
* In summary the arrow is shifted up by 2 * arrowHeight, or top: -2 * arrowHeight
|
|
1185
1236
|
*/
|
|
1186
|
-
bottom: `${-
|
|
1237
|
+
bottom: `${-t * 2}px`,
|
|
1187
1238
|
/*
|
|
1188
1239
|
* Place the arrow at the right of the tooltip with right: 0. When we rotate
|
|
1189
1240
|
* the arrow 90 degrees clockwise about the bottom center, there will now be
|
|
@@ -1202,16 +1253,16 @@ const io = Fe, so = De, ro = Me, lo = Be, co = $e, ao = (t, e, n) => {
|
|
|
1202
1253
|
left: `${c}px`,
|
|
1203
1254
|
// similarly for the right side
|
|
1204
1255
|
right: `${c}px`
|
|
1205
|
-
}[r],
|
|
1256
|
+
}[r], f = {
|
|
1206
1257
|
transform: l
|
|
1207
1258
|
};
|
|
1208
|
-
|
|
1209
|
-
const
|
|
1210
|
-
return
|
|
1211
|
-
},
|
|
1212
|
-
class
|
|
1213
|
-
constructor(
|
|
1214
|
-
this.eventMap = /* @__PURE__ */ new Map(), this.elements = /* @__PURE__ */ new Map(),
|
|
1259
|
+
f.left = n != null ? `${n}px` : "", f.top = o != null ? `${o}px` : "";
|
|
1260
|
+
const p = st(r);
|
|
1261
|
+
return f[p] = a, f;
|
|
1262
|
+
}, bo = ".bm-floatingui{z-index:999;position:absolute;inset:unset;top:0;left:0;width:max-content}.bm-floatingui[popover]{overflow:unset;border:unset}.bm-floatingui__arrow{position:absolute;transform-origin:bottom center}.bm-floatingui__overlay{background:var(--bm-comp-dialog-color-overlay);padding:var(--bm-comp-dialog-space-viewport-offset);display:flex;justify-content:center;align-items:center;z-index:1}.bm-floatingui__overlay--transparent{background:transparent}";
|
|
1263
|
+
class yo {
|
|
1264
|
+
constructor(t) {
|
|
1265
|
+
this.eventMap = /* @__PURE__ */ new Map(), this.elements = /* @__PURE__ */ new Map(), t.addController(this);
|
|
1215
1266
|
}
|
|
1216
1267
|
/**
|
|
1217
1268
|
* Registers an element to be managed by the controller. Adds previously
|
|
@@ -1224,10 +1275,10 @@ class go {
|
|
|
1224
1275
|
* @param assignListeners - a map of categories to booleans to dynamically add the
|
|
1225
1276
|
* category listeners to the element. Or pass in true to add them all.
|
|
1226
1277
|
*/
|
|
1227
|
-
registerElement(
|
|
1228
|
-
if (this.elements.has(
|
|
1229
|
-
const o = typeof
|
|
1230
|
-
this.assignEventListeners(
|
|
1278
|
+
registerElement(t, i, n = !1) {
|
|
1279
|
+
if (this.elements.has(t) && this.removeAllEventListeners(), this.elements.set(t, i), n) {
|
|
1280
|
+
const o = typeof n == "object" ? (r) => n[r] : void 0;
|
|
1281
|
+
this.assignEventListeners(t, o);
|
|
1231
1282
|
}
|
|
1232
1283
|
}
|
|
1233
1284
|
/**
|
|
@@ -1249,16 +1300,16 @@ class go {
|
|
|
1249
1300
|
* },
|
|
1250
1301
|
* ]);
|
|
1251
1302
|
*/
|
|
1252
|
-
registerEventListeners(
|
|
1253
|
-
this.eventMap.has(
|
|
1254
|
-
const o = this.eventMap.get(
|
|
1255
|
-
if (typeof
|
|
1256
|
-
o && o.set(
|
|
1303
|
+
registerEventListeners(t, i, n) {
|
|
1304
|
+
this.eventMap.has(t) || this.eventMap.set(t, /* @__PURE__ */ new Map());
|
|
1305
|
+
const o = this.eventMap.get(t);
|
|
1306
|
+
if (typeof n == "function")
|
|
1307
|
+
o && o.set(i, [n]);
|
|
1257
1308
|
else {
|
|
1258
|
-
const r =
|
|
1309
|
+
const r = n.filter(
|
|
1259
1310
|
(s) => !!s
|
|
1260
1311
|
);
|
|
1261
|
-
o && o.set(
|
|
1312
|
+
o && o.set(i, r);
|
|
1262
1313
|
}
|
|
1263
1314
|
}
|
|
1264
1315
|
/**
|
|
@@ -1268,15 +1319,15 @@ class go {
|
|
|
1268
1319
|
* @param mouseenter
|
|
1269
1320
|
* @param mouseleave
|
|
1270
1321
|
*/
|
|
1271
|
-
registerHoverListener(
|
|
1272
|
-
this.registerEventListeners("hover",
|
|
1322
|
+
registerHoverListener(t, i, n) {
|
|
1323
|
+
this.registerEventListeners("hover", t, [
|
|
1273
1324
|
{
|
|
1274
1325
|
event: "mouseenter",
|
|
1275
|
-
handler:
|
|
1326
|
+
handler: i
|
|
1276
1327
|
},
|
|
1277
|
-
|
|
1328
|
+
n && {
|
|
1278
1329
|
event: "mouseleave",
|
|
1279
|
-
handler:
|
|
1330
|
+
handler: n
|
|
1280
1331
|
}
|
|
1281
1332
|
]);
|
|
1282
1333
|
}
|
|
@@ -1286,9 +1337,9 @@ class go {
|
|
|
1286
1337
|
* @param elementId
|
|
1287
1338
|
* @param click
|
|
1288
1339
|
*/
|
|
1289
|
-
registerClickListener(
|
|
1290
|
-
this.registerEventListeners("click",
|
|
1291
|
-
{ event: "click", handler:
|
|
1340
|
+
registerClickListener(t, i) {
|
|
1341
|
+
this.registerEventListeners("click", t, [
|
|
1342
|
+
{ event: "click", handler: i }
|
|
1292
1343
|
]);
|
|
1293
1344
|
}
|
|
1294
1345
|
/**
|
|
@@ -1298,18 +1349,18 @@ class go {
|
|
|
1298
1349
|
* @param focus
|
|
1299
1350
|
* @param blur
|
|
1300
1351
|
*/
|
|
1301
|
-
registerFocusListener(
|
|
1302
|
-
this.registerEventListeners("focus",
|
|
1303
|
-
{ event: "focus", handler:
|
|
1304
|
-
|
|
1352
|
+
registerFocusListener(t, i, n) {
|
|
1353
|
+
this.registerEventListeners("focus", t, [
|
|
1354
|
+
{ event: "focus", handler: i },
|
|
1355
|
+
n && { event: "blur", handler: n }
|
|
1305
1356
|
]);
|
|
1306
1357
|
}
|
|
1307
1358
|
/**
|
|
1308
1359
|
* Removes all event listeners
|
|
1309
1360
|
*/
|
|
1310
1361
|
removeAllEventListeners() {
|
|
1311
|
-
this.eventMap.forEach((
|
|
1312
|
-
this.removeEventListeners(
|
|
1362
|
+
this.eventMap.forEach((t, i) => {
|
|
1363
|
+
this.removeEventListeners(i);
|
|
1313
1364
|
});
|
|
1314
1365
|
}
|
|
1315
1366
|
hostDisconnected() {
|
|
@@ -1320,16 +1371,16 @@ class go {
|
|
|
1320
1371
|
*
|
|
1321
1372
|
* @param category
|
|
1322
1373
|
*/
|
|
1323
|
-
addEventListeners(
|
|
1324
|
-
this.setEventListeners(
|
|
1374
|
+
addEventListeners(t) {
|
|
1375
|
+
this.setEventListeners(t, "addEventListener");
|
|
1325
1376
|
}
|
|
1326
1377
|
/**
|
|
1327
1378
|
* Removes event listeners for a specific category
|
|
1328
1379
|
*
|
|
1329
1380
|
* @param category
|
|
1330
1381
|
*/
|
|
1331
|
-
removeEventListeners(
|
|
1332
|
-
this.setEventListeners(
|
|
1382
|
+
removeEventListeners(t) {
|
|
1383
|
+
this.setEventListeners(t, "removeEventListener");
|
|
1333
1384
|
}
|
|
1334
1385
|
/**
|
|
1335
1386
|
* Assigns event listeners to an element based on the category
|
|
@@ -1338,15 +1389,15 @@ class go {
|
|
|
1338
1389
|
* @param categoryFilter - Optional filter to only assign event listeners for a specific category
|
|
1339
1390
|
* @private
|
|
1340
1391
|
*/
|
|
1341
|
-
assignEventListeners(
|
|
1342
|
-
const
|
|
1343
|
-
return
|
|
1344
|
-
(
|
|
1345
|
-
l ===
|
|
1346
|
-
|
|
1392
|
+
assignEventListeners(t, i) {
|
|
1393
|
+
const n = this.elements.get(t);
|
|
1394
|
+
return n ? (this.eventMap.forEach((o, r) => {
|
|
1395
|
+
(i === void 0 || i(r)) && o.forEach((s, l) => {
|
|
1396
|
+
l === t && s.forEach(({ event: c, handler: a }) => {
|
|
1397
|
+
n.addEventListener(c, a);
|
|
1347
1398
|
});
|
|
1348
1399
|
});
|
|
1349
|
-
}), !0) : (console.warn(`Element ${
|
|
1400
|
+
}), !0) : (console.warn(`Element ${t} not found`), !1);
|
|
1350
1401
|
}
|
|
1351
1402
|
/**
|
|
1352
1403
|
* Perform action with handler on all elements in category
|
|
@@ -1355,29 +1406,29 @@ class go {
|
|
|
1355
1406
|
* @param action
|
|
1356
1407
|
* @private
|
|
1357
1408
|
*/
|
|
1358
|
-
setEventListeners(
|
|
1359
|
-
var
|
|
1360
|
-
if (!this.eventMap.has(
|
|
1361
|
-
console.warn(`No event listeners registered for ${
|
|
1409
|
+
setEventListeners(t, i) {
|
|
1410
|
+
var n;
|
|
1411
|
+
if (!this.eventMap.has(t)) {
|
|
1412
|
+
console.warn(`No event listeners registered for ${t}`);
|
|
1362
1413
|
return;
|
|
1363
1414
|
}
|
|
1364
|
-
(
|
|
1415
|
+
(n = this.eventMap.get(t)) == null || n.forEach((o, r) => {
|
|
1365
1416
|
const s = this.elements.get(r);
|
|
1366
1417
|
if (!s) {
|
|
1367
1418
|
console.warn(
|
|
1368
|
-
`Cannot ${
|
|
1419
|
+
`Cannot ${i} to ${r} for event category ${t}`
|
|
1369
1420
|
);
|
|
1370
1421
|
return;
|
|
1371
1422
|
}
|
|
1372
1423
|
o.forEach(({ event: l, handler: c }) => {
|
|
1373
|
-
s[
|
|
1424
|
+
s[i](l, c);
|
|
1374
1425
|
});
|
|
1375
1426
|
});
|
|
1376
1427
|
}
|
|
1377
1428
|
}
|
|
1378
|
-
class
|
|
1379
|
-
constructor(
|
|
1380
|
-
|
|
1429
|
+
class Ut {
|
|
1430
|
+
constructor(t) {
|
|
1431
|
+
t.addController(this);
|
|
1381
1432
|
}
|
|
1382
1433
|
hostDisconnected() {
|
|
1383
1434
|
this.cancelSchedule();
|
|
@@ -1388,8 +1439,8 @@ class Vt {
|
|
|
1388
1439
|
* @param callback - The function to run.
|
|
1389
1440
|
* @param delay - The delay in milliseconds.
|
|
1390
1441
|
*/
|
|
1391
|
-
schedule(
|
|
1392
|
-
this.timer || (this.timer = setTimeout(
|
|
1442
|
+
schedule(t, i) {
|
|
1443
|
+
this.timer || (this.timer = setTimeout(t, i));
|
|
1393
1444
|
}
|
|
1394
1445
|
/**
|
|
1395
1446
|
* Cancel the scheduled function.
|
|
@@ -1398,15 +1449,15 @@ class Vt {
|
|
|
1398
1449
|
clearTimeout(this.timer), this.timer = void 0;
|
|
1399
1450
|
}
|
|
1400
1451
|
}
|
|
1401
|
-
var
|
|
1402
|
-
for (var o = void 0, r =
|
|
1403
|
-
(s =
|
|
1404
|
-
return o &&
|
|
1452
|
+
var wo = Object.defineProperty, Yt = (e, t, i, n) => {
|
|
1453
|
+
for (var o = void 0, r = e.length - 1, s; r >= 0; r--)
|
|
1454
|
+
(s = e[r]) && (o = s(t, i, o) || o);
|
|
1455
|
+
return o && wo(t, i, o), o;
|
|
1405
1456
|
};
|
|
1406
|
-
const
|
|
1407
|
-
class
|
|
1408
|
-
shouldToggle(
|
|
1409
|
-
|
|
1457
|
+
const xo = (e) => {
|
|
1458
|
+
class t extends e {
|
|
1459
|
+
shouldToggle(n, o) {
|
|
1460
|
+
n && this.fireChange(o);
|
|
1410
1461
|
const r = this._isOpen === o, s = this.open === !o;
|
|
1411
1462
|
return !(r || s);
|
|
1412
1463
|
}
|
|
@@ -1416,38 +1467,38 @@ const bo = (t) => {
|
|
|
1416
1467
|
*
|
|
1417
1468
|
* @param change - whether the floating content is open or closed
|
|
1418
1469
|
*/
|
|
1419
|
-
fireChange(
|
|
1470
|
+
fireChange(n) {
|
|
1420
1471
|
const o = `${ye}toggle`;
|
|
1421
1472
|
this.dispatchEvent(
|
|
1422
1473
|
new CustomEvent(o, {
|
|
1423
|
-
detail: { open:
|
|
1474
|
+
detail: { open: n },
|
|
1424
1475
|
bubbles: !0,
|
|
1425
1476
|
composed: !0
|
|
1426
1477
|
})
|
|
1427
1478
|
);
|
|
1428
1479
|
}
|
|
1429
1480
|
}
|
|
1430
|
-
return
|
|
1431
|
-
|
|
1432
|
-
],
|
|
1481
|
+
return Yt([
|
|
1482
|
+
b({ type: Boolean })
|
|
1483
|
+
], t.prototype, "open"), Yt([
|
|
1433
1484
|
ge()
|
|
1434
|
-
],
|
|
1485
|
+
], t.prototype, "_isOpen"), t;
|
|
1435
1486
|
};
|
|
1436
|
-
var
|
|
1437
|
-
for (var o = void 0, r =
|
|
1438
|
-
(s =
|
|
1439
|
-
return o &&
|
|
1487
|
+
var Co = Object.defineProperty, R = (e, t, i, n) => {
|
|
1488
|
+
for (var o = void 0, r = e.length - 1, s; r >= 0; r--)
|
|
1489
|
+
(s = e[r]) && (o = s(t, i, o) || o);
|
|
1490
|
+
return o && Co(t, i, o), o;
|
|
1440
1491
|
};
|
|
1441
1492
|
const {
|
|
1442
|
-
subElementClassPrefix:
|
|
1443
|
-
baseClassNamePrefix:
|
|
1444
|
-
} = Gt("floatingui"),
|
|
1445
|
-
content:
|
|
1446
|
-
arrow: `${
|
|
1447
|
-
},
|
|
1448
|
-
const
|
|
1493
|
+
subElementClassPrefix: Oo,
|
|
1494
|
+
baseClassNamePrefix: Ao
|
|
1495
|
+
} = Gt("floatingui"), Kt = {
|
|
1496
|
+
content: Ao,
|
|
1497
|
+
arrow: `${Oo}arrow`
|
|
1498
|
+
}, Eo = ve("popover"), Po = (e) => {
|
|
1499
|
+
const i = class i extends xo(e) {
|
|
1449
1500
|
constructor() {
|
|
1450
|
-
super(), this.hideArrow = !1, this.shift = !0, this.autoHiding = !0, this.defaultOpen = !1, this.showDelay = 0, this.hideDelay = 0, this.popoverAPI = !0, this.disableAutoAria = !1, this.autoDescribedById = Oe(), this.openOnClick = !1, this.openOnHover = !1, this.openOnFocus = !1, this.initialRender = !0, this.contentRef = zt(), this.edgePadding = 0, this.shouldReturnFocus = !1, this.eventPrefix = "bm-floatingui", this.arrowRef = zt(), this.shouldUsePopoverAPI = !1, this.anchor = null, this.eventController = new
|
|
1501
|
+
super(), this.hideArrow = !1, this.shift = !0, this.autoHiding = !0, this.defaultOpen = !1, this.showDelay = 0, this.hideDelay = 0, this.popoverAPI = !0, this.disableAutoAria = !1, this.autoDescribedById = Oe(), this.openOnClick = !1, this.openOnHover = !1, this.openOnFocus = !1, this.initialRender = !0, this.contentRef = zt(), this.edgePadding = 0, this.shouldReturnFocus = !1, this.eventPrefix = "bm-floatingui", this.arrowRef = zt(), this.shouldUsePopoverAPI = !1, this.anchor = null, this.eventController = new yo(this), this.autoUpdateCleanup = null, this.closeController = new Ut(this), this.openController = new Ut(this), this.openContent = this.openContent.bind(this), this.mouseEnterHandler = this.mouseEnterHandler.bind(this), this.mouseLeaveHandler = this.mouseLeaveHandler.bind(this), this.closeContent = this.closeContent.bind(this), this.toggleContent = this.toggleContent.bind(this), this.contentSlotHandler = this.contentSlotHandler.bind(this), this.environmentClickListener = this.environmentClickListener.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.eventController.registerClickListener("anchor", this.toggleContent), this.eventController.registerHoverListener(
|
|
1451
1502
|
"anchor",
|
|
1452
1503
|
this.mouseEnterHandler,
|
|
1453
1504
|
this.mouseLeaveHandler
|
|
@@ -1516,7 +1567,7 @@ const {
|
|
|
1516
1567
|
var s;
|
|
1517
1568
|
(s = this.autoUpdateCleanup) == null || s.call(this);
|
|
1518
1569
|
let o = {};
|
|
1519
|
-
o =
|
|
1570
|
+
o = go({
|
|
1520
1571
|
baseConfig: o,
|
|
1521
1572
|
middleware: {
|
|
1522
1573
|
autoPlacement: this.autoPlacement,
|
|
@@ -1538,14 +1589,14 @@ const {
|
|
|
1538
1589
|
});
|
|
1539
1590
|
const r = () => (
|
|
1540
1591
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1541
|
-
|
|
1592
|
+
po(this.anchor, this.contentRef.value, o).then(
|
|
1542
1593
|
(l) => {
|
|
1543
|
-
const { x: c, y: a, middlewareData:
|
|
1594
|
+
const { x: c, y: a, middlewareData: f } = l;
|
|
1544
1595
|
Object.assign(this.contentRef.value.style, {
|
|
1545
|
-
...
|
|
1596
|
+
...uo(f),
|
|
1546
1597
|
// translation more performant than top left
|
|
1547
1598
|
transform: `translate(${c}px, ${a}px)`
|
|
1548
|
-
}), this.arrowRef.value &&
|
|
1599
|
+
}), this.arrowRef.value && f.arrowStyles && Object.assign(this.arrowRef.value.style, f.arrowStyles);
|
|
1549
1600
|
}
|
|
1550
1601
|
)
|
|
1551
1602
|
);
|
|
@@ -1593,25 +1644,25 @@ const {
|
|
|
1593
1644
|
contentSlotHandler(o) {
|
|
1594
1645
|
if (this.disableAutoAria)
|
|
1595
1646
|
return;
|
|
1596
|
-
const { child: r } =
|
|
1647
|
+
const { child: r } = kt("bm-floatingui", "content", o);
|
|
1597
1648
|
r.setAttribute("id", this.autoDescribedById);
|
|
1598
1649
|
}
|
|
1599
1650
|
environmentClickListener(o) {
|
|
1600
1651
|
if (!this._isOpen || this.open)
|
|
1601
1652
|
return;
|
|
1602
|
-
const r =
|
|
1653
|
+
const r = Tt(o, this.anchor), s = Tt(o, this.contentRef.value);
|
|
1603
1654
|
r || s || this.closeContent(!0);
|
|
1604
1655
|
}
|
|
1605
1656
|
willUpdate(o) {
|
|
1606
|
-
super.willUpdate(o), o.has("popoverAPI") && (this.shouldUsePopoverAPI = this.popoverAPI &&
|
|
1657
|
+
super.willUpdate(o), o.has("popoverAPI") && (this.shouldUsePopoverAPI = this.popoverAPI && Eo);
|
|
1607
1658
|
}
|
|
1608
1659
|
updated(o) {
|
|
1609
|
-
if (super.updated(o), this.anchor && ["click", "hover", "focus"].forEach((
|
|
1610
|
-
const
|
|
1611
|
-
o.has(
|
|
1660
|
+
if (super.updated(o), this.anchor && ["click", "hover", "focus"].forEach((f) => {
|
|
1661
|
+
const p = `openOn${be(f)}`;
|
|
1662
|
+
o.has(p) && (this[p] ? this.eventController.addEventListeners(f) : this.eventController.removeEventListeners(f));
|
|
1612
1663
|
}), o.has("autoDescribedById") && !this.disableAutoAria && this.anchor)
|
|
1613
1664
|
if (this.autoDescribedById)
|
|
1614
|
-
|
|
1665
|
+
$t(this.anchor, "aria-describedby", this.autoDescribedById);
|
|
1615
1666
|
else {
|
|
1616
1667
|
const a = o.get("autoDescribedById");
|
|
1617
1668
|
if (!a)
|
|
@@ -1641,187 +1692,187 @@ const {
|
|
|
1641
1692
|
this.openController.cancelSchedule(), this.closeContent(!0);
|
|
1642
1693
|
}
|
|
1643
1694
|
anchorSlotHandler(o) {
|
|
1644
|
-
const { child: r } =
|
|
1695
|
+
const { child: r } = kt("bm-floatingui", "anchor", o);
|
|
1645
1696
|
this.anchor = r, this.eventController.registerElement("anchor", r, {
|
|
1646
1697
|
hover: this.openOnHover,
|
|
1647
1698
|
click: this.openOnClick,
|
|
1648
1699
|
focus: this.openOnFocus
|
|
1649
|
-
}), this.disableAutoAria ||
|
|
1700
|
+
}), this.disableAutoAria || $t(r, "aria-describedby", this.autoDescribedById), this.open ? this.openContent() : this.defaultOpen && this.initialRender && (this.openContent(), this.initialRender = !1);
|
|
1650
1701
|
}
|
|
1651
1702
|
handleKeydown(o) {
|
|
1652
1703
|
o.key === "Escape" && this.closeContent(!0);
|
|
1653
1704
|
}
|
|
1654
1705
|
};
|
|
1655
|
-
|
|
1656
|
-
xt(
|
|
1706
|
+
i.styles = [
|
|
1707
|
+
xt(bo),
|
|
1657
1708
|
he`
|
|
1658
1709
|
:host {
|
|
1659
1710
|
display: contents;
|
|
1660
1711
|
}
|
|
1661
1712
|
`
|
|
1662
1713
|
];
|
|
1663
|
-
let
|
|
1664
|
-
return
|
|
1665
|
-
|
|
1666
|
-
],
|
|
1667
|
-
|
|
1668
|
-
],
|
|
1669
|
-
|
|
1670
|
-
],
|
|
1671
|
-
|
|
1672
|
-
],
|
|
1673
|
-
|
|
1674
|
-
],
|
|
1675
|
-
|
|
1676
|
-
],
|
|
1677
|
-
|
|
1678
|
-
],
|
|
1679
|
-
|
|
1680
|
-
],
|
|
1681
|
-
|
|
1682
|
-
],
|
|
1683
|
-
|
|
1684
|
-
],
|
|
1685
|
-
|
|
1686
|
-
],
|
|
1687
|
-
|
|
1688
|
-
],
|
|
1689
|
-
|
|
1690
|
-
],
|
|
1691
|
-
|
|
1692
|
-
],
|
|
1693
|
-
|
|
1694
|
-
],
|
|
1695
|
-
|
|
1696
|
-
],
|
|
1697
|
-
|
|
1698
|
-
],
|
|
1714
|
+
let t = i;
|
|
1715
|
+
return R([
|
|
1716
|
+
b({ type: Boolean })
|
|
1717
|
+
], t.prototype, "hideArrow"), R([
|
|
1718
|
+
b({ type: String })
|
|
1719
|
+
], t.prototype, "placement"), R([
|
|
1720
|
+
b({ type: Object })
|
|
1721
|
+
], t.prototype, "autoPlacement"), R([
|
|
1722
|
+
b({ type: Object })
|
|
1723
|
+
], t.prototype, "flip"), R([
|
|
1724
|
+
b({ type: Object })
|
|
1725
|
+
], t.prototype, "shift"), R([
|
|
1726
|
+
b({ type: Object })
|
|
1727
|
+
], t.prototype, "autoHiding"), R([
|
|
1728
|
+
b({ type: Object })
|
|
1729
|
+
], t.prototype, "middleware"), R([
|
|
1730
|
+
b({ type: Boolean })
|
|
1731
|
+
], t.prototype, "defaultOpen"), R([
|
|
1732
|
+
b({ type: Number })
|
|
1733
|
+
], t.prototype, "showDelay"), R([
|
|
1734
|
+
b({ type: Number })
|
|
1735
|
+
], t.prototype, "hideDelay"), R([
|
|
1736
|
+
b({ type: Boolean, converter: Jt })
|
|
1737
|
+
], t.prototype, "popoverAPI"), R([
|
|
1738
|
+
b({ type: Boolean })
|
|
1739
|
+
], t.prototype, "disableAutoAria"), R([
|
|
1740
|
+
b({ type: String })
|
|
1741
|
+
], t.prototype, "autoDescribedById"), R([
|
|
1742
|
+
b()
|
|
1743
|
+
], t.prototype, "offset"), R([
|
|
1744
|
+
b({ type: Boolean })
|
|
1745
|
+
], t.prototype, "openOnClick"), R([
|
|
1746
|
+
b({ type: Boolean })
|
|
1747
|
+
], t.prototype, "openOnHover"), R([
|
|
1748
|
+
b({ type: Boolean })
|
|
1749
|
+
], t.prototype, "openOnFocus"), t;
|
|
1699
1750
|
};
|
|
1700
|
-
var
|
|
1701
|
-
for (var o =
|
|
1702
|
-
(s =
|
|
1703
|
-
return
|
|
1704
|
-
}, pe = (
|
|
1705
|
-
const { subElementClassPrefix: me, baseClassNamePrefix:
|
|
1706
|
-
let
|
|
1751
|
+
var Ro = Object.defineProperty, So = Object.getOwnPropertyDescriptor, Lo = Object.getPrototypeOf, _o = Reflect.get, E = (e, t, i, n) => {
|
|
1752
|
+
for (var o = n > 1 ? void 0 : n ? So(t, i) : t, r = e.length - 1, s; r >= 0; r--)
|
|
1753
|
+
(s = e[r]) && (o = (n ? s(t, i, o) : s(o)) || o);
|
|
1754
|
+
return n && o && Ro(t, i, o), o;
|
|
1755
|
+
}, pe = (e, t, i) => _o(Lo(e), i, t);
|
|
1756
|
+
const { subElementClassPrefix: me, baseClassNamePrefix: zo } = Gt("tooltip");
|
|
1757
|
+
let A = class extends Po(qt) {
|
|
1707
1758
|
constructor() {
|
|
1708
|
-
super(), this.disabled = !1, this.triggerSize = "md", this.eventPrefix = "tooltip", this.hideDelay = 200,
|
|
1759
|
+
super(), this.disabled = !1, this.triggerSize = "md", this.eventPrefix = "tooltip", this.hideDelay = 200, Bt(xe, this, "edgePadding"), Bt(Ce, this, "offset");
|
|
1709
1760
|
}
|
|
1710
|
-
willUpdate(
|
|
1711
|
-
super.willUpdate(
|
|
1712
|
-
const
|
|
1713
|
-
this.openOnHover =
|
|
1761
|
+
willUpdate(e) {
|
|
1762
|
+
super.willUpdate(e);
|
|
1763
|
+
const t = (i) => {
|
|
1764
|
+
this.openOnHover = i, this.openOnFocus = i;
|
|
1714
1765
|
};
|
|
1715
|
-
|
|
1766
|
+
e.has("disabled") && t(!this.disabled);
|
|
1716
1767
|
}
|
|
1717
1768
|
render() {
|
|
1718
|
-
return
|
|
1769
|
+
return Xt` <slot name="trigger" @slotchange=${this.anchorSlotHandler}></slot>
|
|
1719
1770
|
<div
|
|
1720
1771
|
role="tooltip"
|
|
1721
1772
|
@slotchange=${this.contentSlotHandler}
|
|
1722
1773
|
aria-hidden=${!this._isOpen}
|
|
1723
|
-
${
|
|
1774
|
+
${Dt(this.contentRef)}
|
|
1724
1775
|
class=${bt(
|
|
1725
1776
|
this.theme && we(this.theme),
|
|
1726
|
-
|
|
1727
|
-
|
|
1777
|
+
Kt.content,
|
|
1778
|
+
zo
|
|
1728
1779
|
)}
|
|
1729
1780
|
popover="manual"
|
|
1730
1781
|
style="display: ${this._isOpen ? "block" : "none"}"
|
|
1731
1782
|
>
|
|
1732
1783
|
<slot name="text"></slot>
|
|
1733
1784
|
<span
|
|
1734
|
-
class=${bt(
|
|
1735
|
-
${
|
|
1785
|
+
class=${bt(Kt.arrow, `${me}arrow`)}
|
|
1786
|
+
${Dt(this.arrowRef)}
|
|
1736
1787
|
>
|
|
1737
1788
|
</span>
|
|
1738
1789
|
</div>`;
|
|
1739
1790
|
}
|
|
1740
1791
|
};
|
|
1741
|
-
|
|
1792
|
+
A.styles = [
|
|
1742
1793
|
xt(Qt),
|
|
1743
|
-
pe(
|
|
1794
|
+
pe(A, A, "styles") ?? []
|
|
1744
1795
|
];
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
],
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
],
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
],
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
],
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
],
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
],
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
],
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
],
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
],
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
],
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
],
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
],
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
],
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
],
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
],
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
],
|
|
1793
|
-
|
|
1796
|
+
E([
|
|
1797
|
+
b({ type: String })
|
|
1798
|
+
], A.prototype, "theme", 2);
|
|
1799
|
+
E([
|
|
1800
|
+
b({ type: Boolean })
|
|
1801
|
+
], A.prototype, "open", 2);
|
|
1802
|
+
E([
|
|
1803
|
+
b({ type: Boolean })
|
|
1804
|
+
], A.prototype, "hideArrow", 2);
|
|
1805
|
+
E([
|
|
1806
|
+
b({ type: String })
|
|
1807
|
+
], A.prototype, "placement", 2);
|
|
1808
|
+
E([
|
|
1809
|
+
b({ type: Object })
|
|
1810
|
+
], A.prototype, "autoPlacement", 2);
|
|
1811
|
+
E([
|
|
1812
|
+
b({ type: Object })
|
|
1813
|
+
], A.prototype, "flip", 2);
|
|
1814
|
+
E([
|
|
1815
|
+
b({ type: Object })
|
|
1816
|
+
], A.prototype, "shift", 2);
|
|
1817
|
+
E([
|
|
1818
|
+
b({ type: Object })
|
|
1819
|
+
], A.prototype, "autoHiding", 2);
|
|
1820
|
+
E([
|
|
1821
|
+
b({ type: Object })
|
|
1822
|
+
], A.prototype, "middleware", 2);
|
|
1823
|
+
E([
|
|
1824
|
+
b({ type: Boolean })
|
|
1825
|
+
], A.prototype, "defaultOpen", 2);
|
|
1826
|
+
E([
|
|
1827
|
+
b({ type: Number })
|
|
1828
|
+
], A.prototype, "showDelay", 2);
|
|
1829
|
+
E([
|
|
1830
|
+
b({ type: Boolean, converter: Jt })
|
|
1831
|
+
], A.prototype, "popoverAPI", 2);
|
|
1832
|
+
E([
|
|
1833
|
+
b({ type: Boolean })
|
|
1834
|
+
], A.prototype, "disableAutoAria", 2);
|
|
1835
|
+
E([
|
|
1836
|
+
b({ type: String })
|
|
1837
|
+
], A.prototype, "autoDescribedById", 2);
|
|
1838
|
+
E([
|
|
1839
|
+
b({ type: Boolean })
|
|
1840
|
+
], A.prototype, "disabled", 2);
|
|
1841
|
+
E([
|
|
1842
|
+
b({ type: String })
|
|
1843
|
+
], A.prototype, "triggerSize", 2);
|
|
1844
|
+
A = E([
|
|
1794
1845
|
Zt("bm-tooltip")
|
|
1795
|
-
],
|
|
1796
|
-
let
|
|
1846
|
+
], A);
|
|
1847
|
+
let J = class extends qt {
|
|
1797
1848
|
constructor() {
|
|
1798
1849
|
super(...arguments), this.size = "md", this.disabled = !1;
|
|
1799
1850
|
}
|
|
1800
1851
|
render() {
|
|
1801
|
-
const
|
|
1802
|
-
|
|
1803
|
-
this.size !== "none" && `${
|
|
1804
|
-
this.disabled && `${
|
|
1852
|
+
const e = `${me}icon-trigger`, t = bt(
|
|
1853
|
+
e,
|
|
1854
|
+
this.size !== "none" && `${e}--${this.size}`,
|
|
1855
|
+
this.disabled && `${e}--disabled`
|
|
1805
1856
|
);
|
|
1806
|
-
return
|
|
1857
|
+
return Xt`<button class=${t} aria-label="tooltip trigger">
|
|
1807
1858
|
<slot></slot>
|
|
1808
1859
|
</button>`;
|
|
1809
1860
|
}
|
|
1810
1861
|
};
|
|
1811
|
-
|
|
1862
|
+
J.styles = [
|
|
1812
1863
|
xt(Qt),
|
|
1813
|
-
pe(
|
|
1864
|
+
pe(J, J, "styles") ?? []
|
|
1814
1865
|
];
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
],
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
],
|
|
1821
|
-
|
|
1866
|
+
E([
|
|
1867
|
+
b({ type: String })
|
|
1868
|
+
], J.prototype, "size", 2);
|
|
1869
|
+
E([
|
|
1870
|
+
b({ type: Boolean })
|
|
1871
|
+
], J.prototype, "disabled", 2);
|
|
1872
|
+
J = E([
|
|
1822
1873
|
Zt("bm-tooltip-icon-trigger")
|
|
1823
|
-
],
|
|
1874
|
+
], J);
|
|
1824
1875
|
export {
|
|
1825
|
-
|
|
1826
|
-
|
|
1876
|
+
A as BmTooltip,
|
|
1877
|
+
J as BmTooltipIconTrigger
|
|
1827
1878
|
};
|