@cfx-dev/ui-components 4.3.1 → 4.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Combination-CSgOhzm-.js → Combination-BGYCZNoJ.js} +375 -367
- package/dist/Rail-CHFAf3wJ.js +81 -0
- package/dist/Table.module-DffST69u.js +17 -0
- package/dist/assets/css/Accordion.css +1 -1
- package/dist/assets/css/Box.css +1 -1
- package/dist/assets/css/Button.css +1 -1
- package/dist/assets/css/DataTable.css +1 -1
- package/dist/assets/css/DropdownSelect.css +1 -1
- package/dist/assets/css/Flex.css +1 -1
- package/dist/assets/css/Flyout.css +1 -1
- package/dist/assets/css/Indicator.css +1 -1
- package/dist/assets/css/InfoPanel.css +1 -1
- package/dist/assets/css/Input.css +1 -1
- package/dist/assets/css/InputDropzone.css +1 -1
- package/dist/assets/css/Island.css +1 -1
- package/dist/assets/css/Link.css +1 -1
- package/dist/assets/css/Modal.css +1 -1
- package/dist/assets/css/Overlay.css +1 -1
- package/dist/assets/css/Pad.css +1 -1
- package/dist/assets/css/Popover.css +1 -1
- package/dist/assets/css/Radio.css +1 -1
- package/dist/assets/css/Rail.css +1 -1
- package/dist/assets/css/RichInput.css +1 -1
- package/dist/assets/css/Select.css +1 -1
- package/dist/assets/css/Separator.css +1 -1
- package/dist/assets/css/Switch.css +1 -1
- package/dist/assets/css/Table.css +1 -1
- package/dist/assets/css/Tabular.css +1 -1
- package/dist/assets/css/Text.css +1 -1
- package/dist/assets/css/Textarea.css +1 -1
- package/dist/assets/css/Title.css +1 -1
- package/dist/assets/css/ToggleGroup.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/assets/general/themes.css +1 -1
- package/dist/components/Accordion/Accordion.js +5 -5
- package/dist/components/Accordion/AccordionShowcase.js +1 -1
- package/dist/components/Avatar/AvatarShowcase.js +1 -1
- package/dist/components/Badge/BadgeShowcase.js +1 -1
- package/dist/components/Box/Box.d.ts +6 -0
- package/dist/components/Box/Box.js +23 -0
- package/dist/components/Box/index.d.ts +3 -0
- package/dist/components/Box/index.js +6 -0
- package/dist/components/BurgerMenu/BurgerMenu.js +7 -7
- package/dist/components/BurgerMenu/BurgerMenuButton.js +2 -2
- package/dist/components/BurgerMenu/BurgerMenuShowcase.js +1 -1
- package/dist/components/Button/ButtonShowcase.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +252 -157
- package/dist/components/DataTable/DataTable.js +2 -2
- package/dist/components/DataTable/DataTableShowcase.js +2 -2
- package/dist/components/DropdownSelect/DropdownSelect.js +13 -13
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +1 -1
- package/dist/components/Flex/Flex.d.ts +7 -0
- package/dist/components/Flex/Flex.js +23 -0
- package/dist/components/Flex/index.d.ts +6 -0
- package/dist/components/{Layout/Flex → Flex}/index.js +2 -2
- package/dist/components/Flyout/Flyout.js +6 -6
- package/dist/components/InfoPanel/InfoPanel.js +3 -3
- package/dist/components/InfoPanel/InfoPanelShowcase.js +1 -1
- package/dist/components/Input/Input.js +87 -87
- package/dist/components/Input/InputShowcase.js +1 -1
- package/dist/components/Input/RichInput.js +42 -42
- package/dist/components/Island/Island.js +27 -27
- package/dist/components/Layout/Pad/Pad.js +20 -20
- package/dist/components/Link/LinkShowcase.js +1 -1
- package/dist/components/Logos/LogosShowcase.js +1 -1
- package/dist/components/Modal/ModalShowcase.js +4 -4
- package/dist/components/OnScreenSensor.js +13 -13
- package/dist/components/Popover/Popover.js +5 -5
- package/dist/components/Popover/PopoverShowcase.js +1 -1
- package/dist/components/{Layout → RSC}/Box/Box.d.ts +3 -2
- package/dist/components/RSC/Box/Box.js +101 -0
- package/dist/components/RSC/Box/index.d.ts +2 -0
- package/dist/components/RSC/Box/index.js +7 -0
- package/dist/components/{Layout → RSC}/Flex/Flex.d.ts +4 -2
- package/dist/components/RSC/Flex/Flex.js +119 -0
- package/dist/components/{Layout → RSC}/Flex/index.d.ts +1 -1
- package/dist/components/RSC/Flex/index.js +15 -0
- package/dist/components/Scrollable/Rail.js +9 -0
- package/dist/components/Scrollable/Scrollable.js +88 -0
- package/dist/components/{Layout/Scrollable → Scrollable}/ScrollableShowcase.js +3 -3
- package/dist/components/{Layout/Scrollable → Scrollable}/VirtualScrollable.js +3 -3
- package/dist/components/{Layout/Scrollable → Scrollable}/index.js +1 -1
- package/dist/components/Select/Select.js +3 -3
- package/dist/components/Select/SelectShowcase.js +1 -1
- package/dist/components/Separator/Separator.js +3 -3
- package/dist/components/Shroud/Shroud.js +7 -7
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +5 -5
- package/dist/components/Skeleton/SkeletonShowcase.js +1 -1
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/SliderShowcase.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/TableBody.js +1 -1
- package/dist/components/Table/TableCell.d.ts +1 -1
- package/dist/components/Table/TableCell.js +13 -12
- package/dist/components/Table/TableCellCheckbox.js +1 -1
- package/dist/components/Table/TableHeader.js +1 -1
- package/dist/components/Table/TableIconButton.js +1 -1
- package/dist/components/Table/TableRoot.js +1 -1
- package/dist/components/Table/TableRow.js +1 -1
- package/dist/components/Tabular/TabularShowcase.js +1 -1
- package/dist/components/Text/TextShowcase.js +2 -2
- package/dist/components/Textarea/Textarea.js +32 -34
- package/dist/components/Title/Title.js +62 -62
- package/dist/components/Title/TitleShowcase.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +7 -7
- package/dist/components/ToggleGroup/ToggleGroupShowcase.js +1 -1
- package/dist/index-ByKwkZKY.js +239 -0
- package/dist/{index-HDl8nGsm.js → index-CriGVLlo.js} +1 -1
- package/dist/{index-DZEAOJqB.js → index-DlJ4qUbZ.js} +1 -1
- package/dist/main.d.ts +6 -6
- package/dist/main.js +94 -93
- package/dist/rsc.d.ts +4 -0
- package/dist/rsc.js +16 -0
- package/dist/styles-scss/_colors.scss +41 -32
- package/dist/styles-scss/_typography.scss +5 -5
- package/dist/styles-scss/_ui.scss +36 -20
- package/dist/styles-scss/global.scss +24 -13
- package/dist/styles-scss/themes/theme_cfx.scss +3 -5
- package/dist/styles-scss/themes/theme_fivem.scss +5 -7
- package/dist/styles-scss/themes/theme_redm.scss +4 -6
- package/dist/styles-scss/themes/theme_wireframe.scss +5 -7
- package/dist/styles-scss/themes.scss +4 -4
- package/dist/styles-scss/tokens.scss +2 -56
- package/dist/utils/hooks/useGlobalKeyboardEvent.js +3 -3
- package/dist/utils/hooks/useWindowResize.js +5 -5
- package/dist/utils/string.d.ts +1 -0
- package/dist/utils/string.js +23 -19
- package/package.json +10 -5
- package/dist/Rail-DcVowhML.js +0 -81
- package/dist/Table.module-DHI1mXN2.js +0 -17
- package/dist/components/Layout/Box/Box.js +0 -72
- package/dist/components/Layout/Box/index.d.ts +0 -2
- package/dist/components/Layout/Box/index.js +0 -5
- package/dist/components/Layout/Flex/Flex.js +0 -84
- package/dist/components/Layout/Scrollable/Rail.js +0 -9
- package/dist/components/Layout/Scrollable/Scrollable.js +0 -91
- package/dist/index-BHuChyf5.js +0 -238
- /package/dist/components/{Layout/Flex → Flex}/FlexShowcase.d.ts +0 -0
- /package/dist/components/{Layout/Flex → Flex}/FlexShowcase.js +0 -0
- /package/dist/components/{Layout → RSC}/Box/Box.types.d.ts +0 -0
- /package/dist/components/{Layout → RSC}/Box/Box.types.js +0 -0
- /package/dist/components/{Layout → RSC}/Flex/Flex.types.d.ts +0 -0
- /package/dist/components/{Layout → RSC}/Flex/Flex.types.js +0 -0
- /package/dist/components/{Layout → RSC}/Flex/FlexRestricter.d.ts +0 -0
- /package/dist/components/{Layout → RSC}/Flex/FlexRestricter.js +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/Rail.d.ts +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/Scrollable.d.ts +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/ScrollableShowcase.d.ts +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/VirtualScrollable.d.ts +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/index.d.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as m from "react";
|
|
2
2
|
import { useLayoutEffect as vn, useEffect as gn } from "react";
|
|
3
|
-
import { u as
|
|
4
|
-
import { jsx as
|
|
3
|
+
import { u as me, P as ae, e as ke, g as yn, a as Ve, c as wn, f as xn } from "./index-ByKwkZKY.js";
|
|
4
|
+
import { jsx as H } from "react/jsx-runtime";
|
|
5
5
|
import { r as bn } from "./index-Cl_RnsqN.js";
|
|
6
6
|
import { c as Lt, _ as Q, d as En } from "./tslib.es6-CtHwNPxX.js";
|
|
7
7
|
import { c as Cn, u as An } from "./medium-Bq5NvyU7.js";
|
|
@@ -12,35 +12,35 @@ var Tt = function(e) {
|
|
|
12
12
|
var r = t.read();
|
|
13
13
|
if (!r)
|
|
14
14
|
throw new Error("Sidecar medium not found");
|
|
15
|
-
return
|
|
15
|
+
return m.createElement(r, Q({}, n));
|
|
16
16
|
};
|
|
17
17
|
Tt.isSideCarExport = !0;
|
|
18
18
|
function Sn(e, t) {
|
|
19
19
|
return e.useMedium(t), Tt;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const t =
|
|
23
|
-
return
|
|
21
|
+
function se(e) {
|
|
22
|
+
const t = m.useRef(e);
|
|
23
|
+
return m.useEffect(() => {
|
|
24
24
|
t.current = e;
|
|
25
|
-
}),
|
|
25
|
+
}), m.useMemo(() => (...n) => {
|
|
26
26
|
var r;
|
|
27
27
|
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
28
28
|
}, []);
|
|
29
29
|
}
|
|
30
30
|
function Rn(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
31
|
-
const n =
|
|
32
|
-
|
|
31
|
+
const n = se(e);
|
|
32
|
+
m.useEffect(() => {
|
|
33
33
|
const r = (o) => {
|
|
34
34
|
o.key === "Escape" && n(o);
|
|
35
35
|
};
|
|
36
36
|
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
37
37
|
}, [n, t]);
|
|
38
38
|
}
|
|
39
|
-
var Pn = "DismissableLayer", ze = "dismissableLayer.update", On = "dismissableLayer.pointerDownOutside", Ln = "dismissableLayer.focusOutside", ut, Dt =
|
|
39
|
+
var Pn = "DismissableLayer", ze = "dismissableLayer.update", On = "dismissableLayer.pointerDownOutside", Ln = "dismissableLayer.focusOutside", ut, Dt = m.createContext({
|
|
40
40
|
layers: /* @__PURE__ */ new Set(),
|
|
41
41
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
42
42
|
branches: /* @__PURE__ */ new Set()
|
|
43
|
-
}), Tn =
|
|
43
|
+
}), Tn = m.forwardRef(
|
|
44
44
|
(e, t) => {
|
|
45
45
|
const {
|
|
46
46
|
disableOutsidePointerEvents: n = !1,
|
|
@@ -50,27 +50,27 @@ var Pn = "DismissableLayer", ze = "dismissableLayer.update", On = "dismissableLa
|
|
|
50
50
|
onInteractOutside: c,
|
|
51
51
|
onDismiss: s,
|
|
52
52
|
...d
|
|
53
|
-
} = e, l =
|
|
54
|
-
const R = C.target,
|
|
55
|
-
!w ||
|
|
56
|
-
},
|
|
53
|
+
} = e, l = m.useContext(Dt), [f, u] = m.useState(null), p = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, h] = m.useState({}), y = me(t, (C) => u(C)), a = Array.from(l.layers), [v] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), g = a.indexOf(v), b = f ? a.indexOf(f) : -1, x = l.layersWithOutsidePointerEventsDisabled.size > 0, w = b >= g, E = kn((C) => {
|
|
54
|
+
const R = C.target, O = [...l.branches].some((P) => P.contains(R));
|
|
55
|
+
!w || O || (o == null || o(C), c == null || c(C), C.defaultPrevented || s == null || s());
|
|
56
|
+
}, p), A = Fn((C) => {
|
|
57
57
|
const R = C.target;
|
|
58
58
|
[...l.branches].some((P) => P.contains(R)) || (i == null || i(C), c == null || c(C), C.defaultPrevented || s == null || s());
|
|
59
|
-
},
|
|
59
|
+
}, p);
|
|
60
60
|
return Rn((C) => {
|
|
61
61
|
b === l.layers.size - 1 && (r == null || r(C), !C.defaultPrevented && s && (C.preventDefault(), s()));
|
|
62
|
-
},
|
|
62
|
+
}, p), m.useEffect(() => {
|
|
63
63
|
if (f)
|
|
64
|
-
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (ut =
|
|
65
|
-
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (
|
|
64
|
+
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (ut = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(f)), l.layers.add(f), ft(), () => {
|
|
65
|
+
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (p.body.style.pointerEvents = ut);
|
|
66
66
|
};
|
|
67
|
-
}, [f,
|
|
67
|
+
}, [f, p, n, l]), m.useEffect(() => () => {
|
|
68
68
|
f && (l.layers.delete(f), l.layersWithOutsidePointerEventsDisabled.delete(f), ft());
|
|
69
|
-
}, [f, l]),
|
|
69
|
+
}, [f, l]), m.useEffect(() => {
|
|
70
70
|
const C = () => h({});
|
|
71
71
|
return document.addEventListener(ze, C), () => document.removeEventListener(ze, C);
|
|
72
|
-
}, []), /* @__PURE__ */
|
|
73
|
-
|
|
72
|
+
}, []), /* @__PURE__ */ H(
|
|
73
|
+
ae.div,
|
|
74
74
|
{
|
|
75
75
|
...d,
|
|
76
76
|
ref: y,
|
|
@@ -78,9 +78,9 @@ var Pn = "DismissableLayer", ze = "dismissableLayer.update", On = "dismissableLa
|
|
|
78
78
|
pointerEvents: x ? w ? "auto" : "none" : void 0,
|
|
79
79
|
...e.style
|
|
80
80
|
},
|
|
81
|
-
onFocusCapture:
|
|
82
|
-
onBlurCapture:
|
|
83
|
-
onPointerDownCapture:
|
|
81
|
+
onFocusCapture: ke(e.onFocusCapture, A.onFocusCapture),
|
|
82
|
+
onBlurCapture: ke(e.onBlurCapture, A.onBlurCapture),
|
|
83
|
+
onPointerDownCapture: ke(
|
|
84
84
|
e.onPointerDownCapture,
|
|
85
85
|
E.onPointerDownCapture
|
|
86
86
|
)
|
|
@@ -89,25 +89,25 @@ var Pn = "DismissableLayer", ze = "dismissableLayer.update", On = "dismissableLa
|
|
|
89
89
|
}
|
|
90
90
|
);
|
|
91
91
|
Tn.displayName = Pn;
|
|
92
|
-
var Dn = "DismissableLayerBranch",
|
|
93
|
-
const n =
|
|
94
|
-
return
|
|
92
|
+
var Dn = "DismissableLayerBranch", Mn = m.forwardRef((e, t) => {
|
|
93
|
+
const n = m.useContext(Dt), r = m.useRef(null), o = me(t, r);
|
|
94
|
+
return m.useEffect(() => {
|
|
95
95
|
const i = r.current;
|
|
96
96
|
if (i)
|
|
97
97
|
return n.branches.add(i), () => {
|
|
98
98
|
n.branches.delete(i);
|
|
99
99
|
};
|
|
100
|
-
}, [n.branches]), /* @__PURE__ */
|
|
100
|
+
}, [n.branches]), /* @__PURE__ */ H(ae.div, { ...e, ref: o });
|
|
101
101
|
});
|
|
102
|
-
|
|
103
|
-
function
|
|
104
|
-
const n =
|
|
102
|
+
Mn.displayName = Dn;
|
|
103
|
+
function kn(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
104
|
+
const n = se(e), r = m.useRef(!1), o = m.useRef(() => {
|
|
105
105
|
});
|
|
106
|
-
return
|
|
106
|
+
return m.useEffect(() => {
|
|
107
107
|
const i = (s) => {
|
|
108
108
|
if (s.target && !r.current) {
|
|
109
109
|
let d = function() {
|
|
110
|
-
|
|
110
|
+
Mt(
|
|
111
111
|
On,
|
|
112
112
|
n,
|
|
113
113
|
l,
|
|
@@ -131,10 +131,10 @@ function Mn(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
133
|
function Fn(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
134
|
-
const n =
|
|
135
|
-
return
|
|
134
|
+
const n = se(e), r = m.useRef(!1);
|
|
135
|
+
return m.useEffect(() => {
|
|
136
136
|
const o = (i) => {
|
|
137
|
-
i.target && !r.current &&
|
|
137
|
+
i.target && !r.current && Mt(Ln, n, { originalEvent: i }, {
|
|
138
138
|
discrete: !1
|
|
139
139
|
});
|
|
140
140
|
};
|
|
@@ -148,13 +148,13 @@ function ft() {
|
|
|
148
148
|
const e = new CustomEvent(ze);
|
|
149
149
|
document.dispatchEvent(e);
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function Mt(e, t, n, { discrete: r }) {
|
|
152
152
|
const o = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
153
153
|
t && o.addEventListener(e, t, { once: !0 }), r ? yn(o, i) : o.dispatchEvent(i);
|
|
154
154
|
}
|
|
155
155
|
var Fe = 0;
|
|
156
156
|
function No() {
|
|
157
|
-
|
|
157
|
+
m.useEffect(() => {
|
|
158
158
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
159
159
|
return document.body.insertAdjacentElement("afterbegin", e[0] ?? dt()), document.body.insertAdjacentElement("beforeend", e[1] ?? dt()), Fe++, () => {
|
|
160
160
|
Fe === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Fe--;
|
|
@@ -165,14 +165,14 @@ function dt() {
|
|
|
165
165
|
const e = document.createElement("span");
|
|
166
166
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
167
167
|
}
|
|
168
|
-
var Ne = "focusScope.autoFocusOnMount", We = "focusScope.autoFocusOnUnmount", ht = { bubbles: !1, cancelable: !0 }, Nn = "FocusScope", Wn =
|
|
168
|
+
var Ne = "focusScope.autoFocusOnMount", We = "focusScope.autoFocusOnUnmount", ht = { bubbles: !1, cancelable: !0 }, Nn = "FocusScope", Wn = m.forwardRef((e, t) => {
|
|
169
169
|
const {
|
|
170
170
|
loop: n = !1,
|
|
171
171
|
trapped: r = !1,
|
|
172
172
|
onMountAutoFocus: o,
|
|
173
173
|
onUnmountAutoFocus: i,
|
|
174
174
|
...c
|
|
175
|
-
} = e, [s, d] =
|
|
175
|
+
} = e, [s, d] = m.useState(null), l = se(o), f = se(i), u = m.useRef(null), p = me(t, (a) => d(a)), h = m.useRef({
|
|
176
176
|
paused: !1,
|
|
177
177
|
pause() {
|
|
178
178
|
this.paused = !0;
|
|
@@ -181,20 +181,20 @@ var Ne = "focusScope.autoFocusOnMount", We = "focusScope.autoFocusOnUnmount", ht
|
|
|
181
181
|
this.paused = !1;
|
|
182
182
|
}
|
|
183
183
|
}).current;
|
|
184
|
-
|
|
184
|
+
m.useEffect(() => {
|
|
185
185
|
if (r) {
|
|
186
186
|
let a = function(x) {
|
|
187
187
|
if (h.paused || !s) return;
|
|
188
188
|
const w = x.target;
|
|
189
|
-
s.contains(w) ? u.current = w :
|
|
189
|
+
s.contains(w) ? u.current = w : q(u.current, { select: !0 });
|
|
190
190
|
}, v = function(x) {
|
|
191
191
|
if (h.paused || !s) return;
|
|
192
192
|
const w = x.relatedTarget;
|
|
193
|
-
w !== null && (s.contains(w) ||
|
|
193
|
+
w !== null && (s.contains(w) || q(u.current, { select: !0 }));
|
|
194
194
|
}, g = function(x) {
|
|
195
195
|
if (document.activeElement === document.body)
|
|
196
196
|
for (const E of x)
|
|
197
|
-
E.removedNodes.length > 0 &&
|
|
197
|
+
E.removedNodes.length > 0 && q(s);
|
|
198
198
|
};
|
|
199
199
|
document.addEventListener("focusin", a), document.addEventListener("focusout", v);
|
|
200
200
|
const b = new MutationObserver(g);
|
|
@@ -202,46 +202,46 @@ var Ne = "focusScope.autoFocusOnMount", We = "focusScope.autoFocusOnUnmount", ht
|
|
|
202
202
|
document.removeEventListener("focusin", a), document.removeEventListener("focusout", v), b.disconnect();
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
}, [r, s, h.paused]),
|
|
205
|
+
}, [r, s, h.paused]), m.useEffect(() => {
|
|
206
206
|
if (s) {
|
|
207
207
|
pt.add(h);
|
|
208
208
|
const a = document.activeElement;
|
|
209
209
|
if (!s.contains(a)) {
|
|
210
210
|
const g = new CustomEvent(Ne, ht);
|
|
211
|
-
s.addEventListener(Ne, l), s.dispatchEvent(g), g.defaultPrevented || (Bn(Vn(
|
|
211
|
+
s.addEventListener(Ne, l), s.dispatchEvent(g), g.defaultPrevented || (Bn(Vn(kt(s)), { select: !0 }), document.activeElement === a && q(s));
|
|
212
212
|
}
|
|
213
213
|
return () => {
|
|
214
214
|
s.removeEventListener(Ne, l), setTimeout(() => {
|
|
215
215
|
const g = new CustomEvent(We, ht);
|
|
216
|
-
s.addEventListener(We, f), s.dispatchEvent(g), g.defaultPrevented ||
|
|
216
|
+
s.addEventListener(We, f), s.dispatchEvent(g), g.defaultPrevented || q(a ?? document.body, { select: !0 }), s.removeEventListener(We, f), pt.remove(h);
|
|
217
217
|
}, 0);
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
220
|
}, [s, l, f, h]);
|
|
221
|
-
const y =
|
|
221
|
+
const y = m.useCallback(
|
|
222
222
|
(a) => {
|
|
223
223
|
if (!n && !r || h.paused) return;
|
|
224
224
|
const v = a.key === "Tab" && !a.altKey && !a.ctrlKey && !a.metaKey, g = document.activeElement;
|
|
225
225
|
if (v && g) {
|
|
226
226
|
const b = a.currentTarget, [x, w] = In(b);
|
|
227
|
-
x && w ? !a.shiftKey && g === w ? (a.preventDefault(), n &&
|
|
227
|
+
x && w ? !a.shiftKey && g === w ? (a.preventDefault(), n && q(x, { select: !0 })) : a.shiftKey && g === x && (a.preventDefault(), n && q(w, { select: !0 })) : g === b && a.preventDefault();
|
|
228
228
|
}
|
|
229
229
|
},
|
|
230
230
|
[n, r, h.paused]
|
|
231
231
|
);
|
|
232
|
-
return /* @__PURE__ */
|
|
232
|
+
return /* @__PURE__ */ H(ae.div, { tabIndex: -1, ...c, ref: p, onKeyDown: y });
|
|
233
233
|
});
|
|
234
234
|
Wn.displayName = Nn;
|
|
235
235
|
function Bn(e, { select: t = !1 } = {}) {
|
|
236
236
|
const n = document.activeElement;
|
|
237
237
|
for (const r of e)
|
|
238
|
-
if (
|
|
238
|
+
if (q(r, { select: t }), document.activeElement !== n) return;
|
|
239
239
|
}
|
|
240
240
|
function In(e) {
|
|
241
|
-
const t =
|
|
241
|
+
const t = kt(e), n = mt(t, e), r = mt(t.reverse(), e);
|
|
242
242
|
return [n, r];
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function kt(e) {
|
|
245
245
|
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
246
246
|
acceptNode: (r) => {
|
|
247
247
|
const o = r.tagName === "INPUT" && r.type === "hidden";
|
|
@@ -267,7 +267,7 @@ function _n(e, { upTo: t }) {
|
|
|
267
267
|
function Hn(e) {
|
|
268
268
|
return e instanceof HTMLInputElement && "select" in e;
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function q(e, { select: t = !1 } = {}) {
|
|
271
271
|
if (e && e.focus) {
|
|
272
272
|
const n = document.activeElement;
|
|
273
273
|
e.focus({ preventScroll: !0 }), e !== n && Hn(e) && t && e.select();
|
|
@@ -294,15 +294,15 @@ function vt(e, t) {
|
|
|
294
294
|
function Vn(e) {
|
|
295
295
|
return e.filter((t) => t.tagName !== "A");
|
|
296
296
|
}
|
|
297
|
-
var zn =
|
|
297
|
+
var zn = m[" useId ".trim().toString()] || (() => {
|
|
298
298
|
}), Yn = 0;
|
|
299
299
|
function Wo(e) {
|
|
300
|
-
const [t, n] =
|
|
300
|
+
const [t, n] = m.useState(zn());
|
|
301
301
|
return Ve(() => {
|
|
302
302
|
n((r) => r ?? String(Yn++));
|
|
303
303
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
304
304
|
}
|
|
305
|
-
const Un = ["top", "right", "bottom", "left"],
|
|
305
|
+
const Un = ["top", "right", "bottom", "left"], Z = Math.min, I = Math.max, Se = Math.round, ge = Math.floor, z = (e) => ({
|
|
306
306
|
x: e,
|
|
307
307
|
y: e
|
|
308
308
|
}), Xn = {
|
|
@@ -315,15 +315,15 @@ const Un = ["top", "right", "bottom", "left"], q = Math.min, W = Math.max, Se =
|
|
|
315
315
|
end: "start"
|
|
316
316
|
};
|
|
317
317
|
function Ye(e, t, n) {
|
|
318
|
-
return
|
|
318
|
+
return I(e, Z(t, n));
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function j(e, t) {
|
|
321
321
|
return typeof e == "function" ? e(t) : e;
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function K(e) {
|
|
324
324
|
return e.split("-")[0];
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function le(e) {
|
|
327
327
|
return e.split("-")[1];
|
|
328
328
|
}
|
|
329
329
|
function Ke(e) {
|
|
@@ -332,15 +332,15 @@ function Ke(e) {
|
|
|
332
332
|
function qe(e) {
|
|
333
333
|
return e === "y" ? "height" : "width";
|
|
334
334
|
}
|
|
335
|
-
function
|
|
336
|
-
return ["top", "bottom"].includes(
|
|
335
|
+
function X(e) {
|
|
336
|
+
return ["top", "bottom"].includes(K(e)) ? "y" : "x";
|
|
337
337
|
}
|
|
338
338
|
function Ze(e) {
|
|
339
|
-
return Ke(
|
|
339
|
+
return Ke(X(e));
|
|
340
340
|
}
|
|
341
341
|
function Kn(e, t, n) {
|
|
342
342
|
n === void 0 && (n = !1);
|
|
343
|
-
const r =
|
|
343
|
+
const r = le(e), o = Ze(e), i = qe(o);
|
|
344
344
|
let c = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
345
345
|
return t.reference[i] > t.floating[i] && (c = Re(c)), [c, Re(c)];
|
|
346
346
|
}
|
|
@@ -365,8 +365,8 @@ function Zn(e, t, n) {
|
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
function Gn(e, t, n, r) {
|
|
368
|
-
const o =
|
|
369
|
-
let i = Zn(
|
|
368
|
+
const o = le(e);
|
|
369
|
+
let i = Zn(K(e), n === "start", r);
|
|
370
370
|
return o && (i = i.map((c) => c + "-" + o), t && (i = i.concat(i.map(Ue)))), i;
|
|
371
371
|
}
|
|
372
372
|
function Re(e) {
|
|
@@ -412,7 +412,7 @@ function gt(e, t, n) {
|
|
|
412
412
|
reference: r,
|
|
413
413
|
floating: o
|
|
414
414
|
} = e;
|
|
415
|
-
const i =
|
|
415
|
+
const i = X(t), c = Ze(t), s = qe(c), d = K(t), l = i === "y", f = r.x + r.width / 2 - o.width / 2, u = r.y + r.height / 2 - o.height / 2, p = r[s] / 2 - o[s] / 2;
|
|
416
416
|
let h;
|
|
417
417
|
switch (d) {
|
|
418
418
|
case "top":
|
|
@@ -445,12 +445,12 @@ function gt(e, t, n) {
|
|
|
445
445
|
y: r.y
|
|
446
446
|
};
|
|
447
447
|
}
|
|
448
|
-
switch (
|
|
448
|
+
switch (le(t)) {
|
|
449
449
|
case "start":
|
|
450
|
-
h[c] -=
|
|
450
|
+
h[c] -= p * (n && l ? -1 : 1);
|
|
451
451
|
break;
|
|
452
452
|
case "end":
|
|
453
|
-
h[c] +=
|
|
453
|
+
h[c] += p * (n && l ? -1 : 1);
|
|
454
454
|
break;
|
|
455
455
|
}
|
|
456
456
|
return h;
|
|
@@ -469,7 +469,7 @@ const Jn = async (e, t, n) => {
|
|
|
469
469
|
}), {
|
|
470
470
|
x: f,
|
|
471
471
|
y: u
|
|
472
|
-
} = gt(l, r, d),
|
|
472
|
+
} = gt(l, r, d), p = r, h = {}, y = 0;
|
|
473
473
|
for (let a = 0; a < s.length; a++) {
|
|
474
474
|
const {
|
|
475
475
|
name: v,
|
|
@@ -483,7 +483,7 @@ const Jn = async (e, t, n) => {
|
|
|
483
483
|
x: f,
|
|
484
484
|
y: u,
|
|
485
485
|
initialPlacement: r,
|
|
486
|
-
placement:
|
|
486
|
+
placement: p,
|
|
487
487
|
strategy: o,
|
|
488
488
|
middlewareData: h,
|
|
489
489
|
rects: l,
|
|
@@ -499,24 +499,24 @@ const Jn = async (e, t, n) => {
|
|
|
499
499
|
...h[v],
|
|
500
500
|
...w
|
|
501
501
|
}
|
|
502
|
-
}, E && y <= 50 && (y++, typeof E == "object" && (E.placement && (
|
|
502
|
+
}, E && y <= 50 && (y++, typeof E == "object" && (E.placement && (p = E.placement), E.rects && (l = E.rects === !0 ? await c.getElementRects({
|
|
503
503
|
reference: e,
|
|
504
504
|
floating: t,
|
|
505
505
|
strategy: o
|
|
506
506
|
}) : E.rects), {
|
|
507
507
|
x: f,
|
|
508
508
|
y: u
|
|
509
|
-
} = gt(l,
|
|
509
|
+
} = gt(l, p, d)), a = -1);
|
|
510
510
|
}
|
|
511
511
|
return {
|
|
512
512
|
x: f,
|
|
513
513
|
y: u,
|
|
514
|
-
placement:
|
|
514
|
+
placement: p,
|
|
515
515
|
strategy: o,
|
|
516
516
|
middlewareData: h
|
|
517
517
|
};
|
|
518
518
|
};
|
|
519
|
-
async function
|
|
519
|
+
async function de(e, t) {
|
|
520
520
|
var n;
|
|
521
521
|
t === void 0 && (t = {});
|
|
522
522
|
const {
|
|
@@ -530,9 +530,9 @@ async function fe(e, t) {
|
|
|
530
530
|
boundary: l = "clippingAncestors",
|
|
531
531
|
rootBoundary: f = "viewport",
|
|
532
532
|
elementContext: u = "floating",
|
|
533
|
-
altBoundary:
|
|
533
|
+
altBoundary: p = !1,
|
|
534
534
|
padding: h = 0
|
|
535
|
-
} =
|
|
535
|
+
} = j(t, e), y = Ft(h), v = s[p ? u === "floating" ? "reference" : "floating" : u], g = Pe(await i.getClippingRect({
|
|
536
536
|
element: (n = await (i.isElement == null ? void 0 : i.isElement(v))) == null || n ? v : v.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(s.floating)),
|
|
537
537
|
boundary: l,
|
|
538
538
|
rootBoundary: f,
|
|
@@ -576,26 +576,26 @@ const er = (e) => ({
|
|
|
576
576
|
} = t, {
|
|
577
577
|
element: l,
|
|
578
578
|
padding: f = 0
|
|
579
|
-
} =
|
|
579
|
+
} = j(e, t) || {};
|
|
580
580
|
if (l == null)
|
|
581
581
|
return {};
|
|
582
|
-
const u = Ft(f),
|
|
582
|
+
const u = Ft(f), p = {
|
|
583
583
|
x: n,
|
|
584
584
|
y: r
|
|
585
|
-
}, h = Ze(o), y = qe(h), a = await c.getDimensions(l), v = h === "y", g = v ? "top" : "left", b = v ? "bottom" : "right", x = v ? "clientHeight" : "clientWidth", w = i.reference[y] + i.reference[h] -
|
|
585
|
+
}, h = Ze(o), y = qe(h), a = await c.getDimensions(l), v = h === "y", g = v ? "top" : "left", b = v ? "bottom" : "right", x = v ? "clientHeight" : "clientWidth", w = i.reference[y] + i.reference[h] - p[h] - i.floating[y], E = p[h] - i.reference[h], A = await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(l));
|
|
586
586
|
let C = A ? A[x] : 0;
|
|
587
587
|
(!C || !await (c.isElement == null ? void 0 : c.isElement(A))) && (C = s.floating[x] || i.floating[y]);
|
|
588
|
-
const R = w / 2 - E / 2,
|
|
588
|
+
const R = w / 2 - E / 2, O = C / 2 - a[y] / 2 - 1, P = Z(u[g], O), W = Z(u[b], O), B = P, L = C - a[y] - W, N = C / 2 - a[y] / 2 + R, D = Ye(B, N, L), M = !d.arrow && le(o) != null && N !== D && i.reference[y] / 2 - (N < B ? P : W) - a[y] / 2 < 0, k = M ? N < B ? N - B : N - L : 0;
|
|
589
589
|
return {
|
|
590
|
-
[h]:
|
|
590
|
+
[h]: p[h] + k,
|
|
591
591
|
data: {
|
|
592
|
-
[h]:
|
|
593
|
-
centerOffset:
|
|
594
|
-
...
|
|
592
|
+
[h]: D,
|
|
593
|
+
centerOffset: N - D - k,
|
|
594
|
+
...M && {
|
|
595
595
|
alignmentOffset: k
|
|
596
596
|
}
|
|
597
597
|
},
|
|
598
|
-
reset:
|
|
598
|
+
reset: M
|
|
599
599
|
};
|
|
600
600
|
}
|
|
601
601
|
}), tr = function(e) {
|
|
@@ -614,63 +614,67 @@ const er = (e) => ({
|
|
|
614
614
|
} = t, {
|
|
615
615
|
mainAxis: f = !0,
|
|
616
616
|
crossAxis: u = !0,
|
|
617
|
-
fallbackPlacements:
|
|
617
|
+
fallbackPlacements: p,
|
|
618
618
|
fallbackStrategy: h = "bestFit",
|
|
619
619
|
fallbackAxisSideDirection: y = "none",
|
|
620
620
|
flipAlignment: a = !0,
|
|
621
621
|
...v
|
|
622
|
-
} =
|
|
622
|
+
} = j(e, t);
|
|
623
623
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
624
624
|
return {};
|
|
625
|
-
const g =
|
|
626
|
-
!
|
|
627
|
-
const C = [s, ...E], R = await
|
|
625
|
+
const g = K(o), b = X(s), x = K(s) === s, w = await (d.isRTL == null ? void 0 : d.isRTL(l.floating)), E = p || (x || !a ? [Re(s)] : qn(s)), A = y !== "none";
|
|
626
|
+
!p && A && E.push(...Gn(s, a, y, w));
|
|
627
|
+
const C = [s, ...E], R = await de(t, v), O = [];
|
|
628
628
|
let P = ((r = i.flip) == null ? void 0 : r.overflows) || [];
|
|
629
|
-
if (f &&
|
|
630
|
-
const
|
|
631
|
-
|
|
629
|
+
if (f && O.push(R[g]), u) {
|
|
630
|
+
const D = Kn(o, c, w);
|
|
631
|
+
O.push(R[D[0]], R[D[1]]);
|
|
632
632
|
}
|
|
633
633
|
if (P = [...P, {
|
|
634
634
|
placement: o,
|
|
635
|
-
overflows:
|
|
636
|
-
}], !
|
|
637
|
-
var
|
|
638
|
-
const
|
|
639
|
-
if (
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
635
|
+
overflows: O
|
|
636
|
+
}], !O.every((D) => D <= 0)) {
|
|
637
|
+
var W, B;
|
|
638
|
+
const D = (((W = i.flip) == null ? void 0 : W.index) || 0) + 1, M = C[D];
|
|
639
|
+
if (M) {
|
|
640
|
+
var L;
|
|
641
|
+
const S = u === "alignment" ? b !== X(M) : !1, T = ((L = P[0]) == null ? void 0 : L.overflows[0]) > 0;
|
|
642
|
+
if (!S || T)
|
|
643
|
+
return {
|
|
644
|
+
data: {
|
|
645
|
+
index: D,
|
|
646
|
+
overflows: P
|
|
647
|
+
},
|
|
648
|
+
reset: {
|
|
649
|
+
placement: M
|
|
650
|
+
}
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
let k = (B = P.filter((S) => S.overflows[0] <= 0).sort((S, T) => S.overflows[1] - T.overflows[1])[0]) == null ? void 0 : B.placement;
|
|
654
|
+
if (!k)
|
|
651
655
|
switch (h) {
|
|
652
656
|
case "bestFit": {
|
|
653
|
-
var
|
|
654
|
-
const
|
|
657
|
+
var N;
|
|
658
|
+
const S = (N = P.filter((T) => {
|
|
655
659
|
if (A) {
|
|
656
|
-
const
|
|
657
|
-
return
|
|
660
|
+
const F = X(T.placement);
|
|
661
|
+
return F === b || // Create a bias to the `y` side axis due to horizontal
|
|
658
662
|
// reading directions favoring greater width.
|
|
659
|
-
|
|
663
|
+
F === "y";
|
|
660
664
|
}
|
|
661
665
|
return !0;
|
|
662
|
-
}).map((
|
|
663
|
-
|
|
666
|
+
}).map((T) => [T.placement, T.overflows.filter((F) => F > 0).reduce((F, ee) => F + ee, 0)]).sort((T, F) => T[1] - F[1])[0]) == null ? void 0 : N[0];
|
|
667
|
+
S && (k = S);
|
|
664
668
|
break;
|
|
665
669
|
}
|
|
666
670
|
case "initialPlacement":
|
|
667
|
-
|
|
671
|
+
k = s;
|
|
668
672
|
break;
|
|
669
673
|
}
|
|
670
|
-
if (o !==
|
|
674
|
+
if (o !== k)
|
|
671
675
|
return {
|
|
672
676
|
reset: {
|
|
673
|
-
placement:
|
|
677
|
+
placement: k
|
|
674
678
|
}
|
|
675
679
|
};
|
|
676
680
|
}
|
|
@@ -699,10 +703,10 @@ const nr = function(e) {
|
|
|
699
703
|
} = t, {
|
|
700
704
|
strategy: r = "referenceHidden",
|
|
701
705
|
...o
|
|
702
|
-
} =
|
|
706
|
+
} = j(e, t);
|
|
703
707
|
switch (r) {
|
|
704
708
|
case "referenceHidden": {
|
|
705
|
-
const i = await
|
|
709
|
+
const i = await de(t, {
|
|
706
710
|
...o,
|
|
707
711
|
elementContext: "reference"
|
|
708
712
|
}), c = yt(i, n.reference);
|
|
@@ -714,7 +718,7 @@ const nr = function(e) {
|
|
|
714
718
|
};
|
|
715
719
|
}
|
|
716
720
|
case "escaped": {
|
|
717
|
-
const i = await
|
|
721
|
+
const i = await de(t, {
|
|
718
722
|
...o,
|
|
719
723
|
altBoundary: !0
|
|
720
724
|
}), c = yt(i, n.floating);
|
|
@@ -736,9 +740,9 @@ async function rr(e, t) {
|
|
|
736
740
|
placement: n,
|
|
737
741
|
platform: r,
|
|
738
742
|
elements: o
|
|
739
|
-
} = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), c =
|
|
743
|
+
} = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), c = K(n), s = le(n), d = X(n) === "y", l = ["left", "top"].includes(c) ? -1 : 1, f = i && d ? -1 : 1, u = j(t, e);
|
|
740
744
|
let {
|
|
741
|
-
mainAxis:
|
|
745
|
+
mainAxis: p,
|
|
742
746
|
crossAxis: h,
|
|
743
747
|
alignmentAxis: y
|
|
744
748
|
} = typeof u == "number" ? {
|
|
@@ -752,9 +756,9 @@ async function rr(e, t) {
|
|
|
752
756
|
};
|
|
753
757
|
return s && typeof y == "number" && (h = s === "end" ? y * -1 : y), d ? {
|
|
754
758
|
x: h * f,
|
|
755
|
-
y:
|
|
759
|
+
y: p * l
|
|
756
760
|
} : {
|
|
757
|
-
x:
|
|
761
|
+
x: p * l,
|
|
758
762
|
y: h * f
|
|
759
763
|
};
|
|
760
764
|
}
|
|
@@ -805,13 +809,13 @@ const or = function(e) {
|
|
|
805
809
|
}
|
|
806
810
|
},
|
|
807
811
|
...d
|
|
808
|
-
} =
|
|
812
|
+
} = j(e, t), l = {
|
|
809
813
|
x: n,
|
|
810
814
|
y: r
|
|
811
|
-
}, f = await
|
|
812
|
-
let h = l[
|
|
815
|
+
}, f = await de(t, d), u = X(K(o)), p = Ke(u);
|
|
816
|
+
let h = l[p], y = l[u];
|
|
813
817
|
if (i) {
|
|
814
|
-
const v =
|
|
818
|
+
const v = p === "y" ? "top" : "left", g = p === "y" ? "bottom" : "right", b = h + f[v], x = h - f[g];
|
|
815
819
|
h = Ye(b, h, x);
|
|
816
820
|
}
|
|
817
821
|
if (c) {
|
|
@@ -820,7 +824,7 @@ const or = function(e) {
|
|
|
820
824
|
}
|
|
821
825
|
const a = s.fn({
|
|
822
826
|
...t,
|
|
823
|
-
[
|
|
827
|
+
[p]: h,
|
|
824
828
|
[u]: y
|
|
825
829
|
});
|
|
826
830
|
return {
|
|
@@ -829,7 +833,7 @@ const or = function(e) {
|
|
|
829
833
|
x: a.x - n,
|
|
830
834
|
y: a.y - r,
|
|
831
835
|
enabled: {
|
|
832
|
-
[
|
|
836
|
+
[p]: i,
|
|
833
837
|
[u]: c
|
|
834
838
|
}
|
|
835
839
|
}
|
|
@@ -850,12 +854,12 @@ const or = function(e) {
|
|
|
850
854
|
offset: s = 0,
|
|
851
855
|
mainAxis: d = !0,
|
|
852
856
|
crossAxis: l = !0
|
|
853
|
-
} =
|
|
857
|
+
} = j(e, t), f = {
|
|
854
858
|
x: n,
|
|
855
859
|
y: r
|
|
856
|
-
}, u =
|
|
857
|
-
let h = f[
|
|
858
|
-
const a =
|
|
860
|
+
}, u = X(o), p = Ke(u);
|
|
861
|
+
let h = f[p], y = f[u];
|
|
862
|
+
const a = j(s, t), v = typeof a == "number" ? {
|
|
859
863
|
mainAxis: a,
|
|
860
864
|
crossAxis: 0
|
|
861
865
|
} : {
|
|
@@ -864,16 +868,16 @@ const or = function(e) {
|
|
|
864
868
|
...a
|
|
865
869
|
};
|
|
866
870
|
if (d) {
|
|
867
|
-
const x =
|
|
871
|
+
const x = p === "y" ? "height" : "width", w = i.reference[p] - i.floating[x] + v.mainAxis, E = i.reference[p] + i.reference[x] - v.mainAxis;
|
|
868
872
|
h < w ? h = w : h > E && (h = E);
|
|
869
873
|
}
|
|
870
874
|
if (l) {
|
|
871
875
|
var g, b;
|
|
872
|
-
const x =
|
|
876
|
+
const x = p === "y" ? "width" : "height", w = ["top", "left"].includes(K(o)), E = i.reference[u] - i.floating[x] + (w && ((g = c.offset) == null ? void 0 : g[u]) || 0) + (w ? 0 : v.crossAxis), A = i.reference[u] + i.reference[x] + (w ? 0 : ((b = c.offset) == null ? void 0 : b[u]) || 0) - (w ? v.crossAxis : 0);
|
|
873
877
|
y < E ? y = E : y > A && (y = A);
|
|
874
878
|
}
|
|
875
879
|
return {
|
|
876
|
-
[
|
|
880
|
+
[p]: h,
|
|
877
881
|
[u]: y
|
|
878
882
|
};
|
|
879
883
|
}
|
|
@@ -893,25 +897,25 @@ const or = function(e) {
|
|
|
893
897
|
apply: d = () => {
|
|
894
898
|
},
|
|
895
899
|
...l
|
|
896
|
-
} =
|
|
900
|
+
} = j(e, t), f = await de(t, l), u = K(o), p = le(o), h = X(o) === "y", {
|
|
897
901
|
width: y,
|
|
898
902
|
height: a
|
|
899
903
|
} = i.floating;
|
|
900
904
|
let v, g;
|
|
901
|
-
u === "top" || u === "bottom" ? (v = u, g =
|
|
902
|
-
const b = a - f.top - f.bottom, x = y - f.left - f.right, w =
|
|
905
|
+
u === "top" || u === "bottom" ? (v = u, g = p === (await (c.isRTL == null ? void 0 : c.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (g = u, v = p === "end" ? "top" : "bottom");
|
|
906
|
+
const b = a - f.top - f.bottom, x = y - f.left - f.right, w = Z(a - f[v], b), E = Z(y - f[g], x), A = !t.middlewareData.shift;
|
|
903
907
|
let C = w, R = E;
|
|
904
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (R = x), (r = t.middlewareData.shift) != null && r.enabled.y && (C = b), A && !
|
|
905
|
-
const P =
|
|
906
|
-
h ? R = y - 2 * (P !== 0 ||
|
|
908
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (R = x), (r = t.middlewareData.shift) != null && r.enabled.y && (C = b), A && !p) {
|
|
909
|
+
const P = I(f.left, 0), W = I(f.right, 0), B = I(f.top, 0), L = I(f.bottom, 0);
|
|
910
|
+
h ? R = y - 2 * (P !== 0 || W !== 0 ? P + W : I(f.left, f.right)) : C = a - 2 * (B !== 0 || L !== 0 ? B + L : I(f.top, f.bottom));
|
|
907
911
|
}
|
|
908
912
|
await d({
|
|
909
913
|
...t,
|
|
910
914
|
availableWidth: R,
|
|
911
915
|
availableHeight: C
|
|
912
916
|
});
|
|
913
|
-
const
|
|
914
|
-
return y !==
|
|
917
|
+
const O = await c.getDimensions(s.floating);
|
|
918
|
+
return y !== O.width || a !== O.height ? {
|
|
915
919
|
reset: {
|
|
916
920
|
rects: !0
|
|
917
921
|
}
|
|
@@ -922,10 +926,10 @@ const or = function(e) {
|
|
|
922
926
|
function Le() {
|
|
923
927
|
return typeof window < "u";
|
|
924
928
|
}
|
|
925
|
-
function
|
|
929
|
+
function ue(e) {
|
|
926
930
|
return Nt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
927
931
|
}
|
|
928
|
-
function
|
|
932
|
+
function _(e) {
|
|
929
933
|
var t;
|
|
930
934
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
931
935
|
}
|
|
@@ -934,28 +938,28 @@ function U(e) {
|
|
|
934
938
|
return (t = (Nt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
935
939
|
}
|
|
936
940
|
function Nt(e) {
|
|
937
|
-
return Le() ? e instanceof Node || e instanceof
|
|
941
|
+
return Le() ? e instanceof Node || e instanceof _(e).Node : !1;
|
|
938
942
|
}
|
|
939
|
-
function
|
|
940
|
-
return Le() ? e instanceof Element || e instanceof
|
|
943
|
+
function $(e) {
|
|
944
|
+
return Le() ? e instanceof Element || e instanceof _(e).Element : !1;
|
|
941
945
|
}
|
|
942
946
|
function Y(e) {
|
|
943
|
-
return Le() ? e instanceof HTMLElement || e instanceof
|
|
947
|
+
return Le() ? e instanceof HTMLElement || e instanceof _(e).HTMLElement : !1;
|
|
944
948
|
}
|
|
945
949
|
function xt(e) {
|
|
946
|
-
return !Le() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
950
|
+
return !Le() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof _(e).ShadowRoot;
|
|
947
951
|
}
|
|
948
|
-
function
|
|
952
|
+
function pe(e) {
|
|
949
953
|
const {
|
|
950
954
|
overflow: t,
|
|
951
955
|
overflowX: n,
|
|
952
956
|
overflowY: r,
|
|
953
957
|
display: o
|
|
954
|
-
} =
|
|
958
|
+
} = V(e);
|
|
955
959
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
|
|
956
960
|
}
|
|
957
961
|
function ar(e) {
|
|
958
|
-
return ["table", "td", "th"].includes(
|
|
962
|
+
return ["table", "td", "th"].includes(ue(e));
|
|
959
963
|
}
|
|
960
964
|
function Te(e) {
|
|
961
965
|
return [":popover-open", ":modal"].some((t) => {
|
|
@@ -967,12 +971,12 @@ function Te(e) {
|
|
|
967
971
|
});
|
|
968
972
|
}
|
|
969
973
|
function Ge(e) {
|
|
970
|
-
const t = Qe(), n =
|
|
974
|
+
const t = Qe(), n = $(e) ? V(e) : e;
|
|
971
975
|
return ["transform", "translate", "scale", "rotate", "perspective"].some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
|
|
972
976
|
}
|
|
973
977
|
function lr(e) {
|
|
974
978
|
let t = G(e);
|
|
975
|
-
for (; Y(t) && !
|
|
979
|
+
for (; Y(t) && !ce(t); ) {
|
|
976
980
|
if (Ge(t))
|
|
977
981
|
return t;
|
|
978
982
|
if (Te(t))
|
|
@@ -984,14 +988,14 @@ function lr(e) {
|
|
|
984
988
|
function Qe() {
|
|
985
989
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
986
990
|
}
|
|
987
|
-
function
|
|
988
|
-
return ["html", "body", "#document"].includes(
|
|
991
|
+
function ce(e) {
|
|
992
|
+
return ["html", "body", "#document"].includes(ue(e));
|
|
989
993
|
}
|
|
990
|
-
function
|
|
991
|
-
return
|
|
994
|
+
function V(e) {
|
|
995
|
+
return _(e).getComputedStyle(e);
|
|
992
996
|
}
|
|
993
997
|
function De(e) {
|
|
994
|
-
return
|
|
998
|
+
return $(e) ? {
|
|
995
999
|
scrollLeft: e.scrollLeft,
|
|
996
1000
|
scrollTop: e.scrollTop
|
|
997
1001
|
} : {
|
|
@@ -1000,7 +1004,7 @@ function De(e) {
|
|
|
1000
1004
|
};
|
|
1001
1005
|
}
|
|
1002
1006
|
function G(e) {
|
|
1003
|
-
if (
|
|
1007
|
+
if (ue(e) === "html")
|
|
1004
1008
|
return e;
|
|
1005
1009
|
const t = (
|
|
1006
1010
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
@@ -1013,23 +1017,23 @@ function G(e) {
|
|
|
1013
1017
|
}
|
|
1014
1018
|
function Wt(e) {
|
|
1015
1019
|
const t = G(e);
|
|
1016
|
-
return
|
|
1020
|
+
return ce(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Y(t) && pe(t) ? t : Wt(t);
|
|
1017
1021
|
}
|
|
1018
|
-
function
|
|
1022
|
+
function he(e, t, n) {
|
|
1019
1023
|
var r;
|
|
1020
1024
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1021
|
-
const o = Wt(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), c =
|
|
1025
|
+
const o = Wt(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), c = _(o);
|
|
1022
1026
|
if (i) {
|
|
1023
1027
|
const s = Xe(c);
|
|
1024
|
-
return t.concat(c, c.visualViewport || [],
|
|
1028
|
+
return t.concat(c, c.visualViewport || [], pe(o) ? o : [], s && n ? he(s) : []);
|
|
1025
1029
|
}
|
|
1026
|
-
return t.concat(o,
|
|
1030
|
+
return t.concat(o, he(o, [], n));
|
|
1027
1031
|
}
|
|
1028
1032
|
function Xe(e) {
|
|
1029
1033
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1030
1034
|
}
|
|
1031
1035
|
function Bt(e) {
|
|
1032
|
-
const t =
|
|
1036
|
+
const t = V(e);
|
|
1033
1037
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
1034
1038
|
const o = Y(e), i = o ? e.offsetWidth : n, c = o ? e.offsetHeight : r, s = Se(n) !== i || Se(r) !== c;
|
|
1035
1039
|
return s && (n = i, r = c), {
|
|
@@ -1039,9 +1043,9 @@ function Bt(e) {
|
|
|
1039
1043
|
};
|
|
1040
1044
|
}
|
|
1041
1045
|
function Je(e) {
|
|
1042
|
-
return
|
|
1046
|
+
return $(e) ? e : e.contextElement;
|
|
1043
1047
|
}
|
|
1044
|
-
function
|
|
1048
|
+
function oe(e) {
|
|
1045
1049
|
const t = Je(e);
|
|
1046
1050
|
if (!Y(t))
|
|
1047
1051
|
return z(1);
|
|
@@ -1058,28 +1062,28 @@ function re(e) {
|
|
|
1058
1062
|
}
|
|
1059
1063
|
const ur = /* @__PURE__ */ z(0);
|
|
1060
1064
|
function It(e) {
|
|
1061
|
-
const t =
|
|
1065
|
+
const t = _(e);
|
|
1062
1066
|
return !Qe() || !t.visualViewport ? ur : {
|
|
1063
1067
|
x: t.visualViewport.offsetLeft,
|
|
1064
1068
|
y: t.visualViewport.offsetTop
|
|
1065
1069
|
};
|
|
1066
1070
|
}
|
|
1067
1071
|
function fr(e, t, n) {
|
|
1068
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
1072
|
+
return t === void 0 && (t = !1), !n || t && n !== _(e) ? !1 : t;
|
|
1069
1073
|
}
|
|
1070
1074
|
function J(e, t, n, r) {
|
|
1071
1075
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1072
1076
|
const o = e.getBoundingClientRect(), i = Je(e);
|
|
1073
1077
|
let c = z(1);
|
|
1074
|
-
t && (r ?
|
|
1078
|
+
t && (r ? $(r) && (c = oe(r)) : c = oe(e));
|
|
1075
1079
|
const s = fr(i, n, r) ? It(i) : z(0);
|
|
1076
1080
|
let d = (o.left + s.x) / c.x, l = (o.top + s.y) / c.y, f = o.width / c.x, u = o.height / c.y;
|
|
1077
1081
|
if (i) {
|
|
1078
|
-
const
|
|
1079
|
-
let y =
|
|
1082
|
+
const p = _(i), h = r && $(r) ? _(r) : r;
|
|
1083
|
+
let y = p, a = Xe(y);
|
|
1080
1084
|
for (; a && r && h !== y; ) {
|
|
1081
|
-
const v =
|
|
1082
|
-
d *= v.x, l *= v.y, f *= v.x, u *= v.y, d += x, l += w, y =
|
|
1085
|
+
const v = oe(a), g = a.getBoundingClientRect(), b = V(a), x = g.left + (a.clientLeft + parseFloat(b.paddingLeft)) * v.x, w = g.top + (a.clientTop + parseFloat(b.paddingTop)) * v.y;
|
|
1086
|
+
d *= v.x, l *= v.y, f *= v.x, u *= v.y, d += x, l += w, y = _(a), a = Xe(y);
|
|
1083
1087
|
}
|
|
1084
1088
|
}
|
|
1085
1089
|
return Pe({
|
|
@@ -1119,26 +1123,26 @@ function dr(e) {
|
|
|
1119
1123
|
scrollTop: 0
|
|
1120
1124
|
}, l = z(1);
|
|
1121
1125
|
const f = z(0), u = Y(r);
|
|
1122
|
-
if ((u || !u && !i) && ((
|
|
1126
|
+
if ((u || !u && !i) && ((ue(r) !== "body" || pe(c)) && (d = De(r)), Y(r))) {
|
|
1123
1127
|
const h = J(r);
|
|
1124
|
-
l =
|
|
1128
|
+
l = oe(r), f.x = h.x + r.clientLeft, f.y = h.y + r.clientTop;
|
|
1125
1129
|
}
|
|
1126
|
-
const
|
|
1130
|
+
const p = c && !u && !i ? _t(c, d, !0) : z(0);
|
|
1127
1131
|
return {
|
|
1128
1132
|
width: n.width * l.x,
|
|
1129
1133
|
height: n.height * l.y,
|
|
1130
|
-
x: n.x * l.x - d.scrollLeft * l.x + f.x +
|
|
1131
|
-
y: n.y * l.y - d.scrollTop * l.y + f.y +
|
|
1134
|
+
x: n.x * l.x - d.scrollLeft * l.x + f.x + p.x,
|
|
1135
|
+
y: n.y * l.y - d.scrollTop * l.y + f.y + p.y
|
|
1132
1136
|
};
|
|
1133
1137
|
}
|
|
1134
1138
|
function hr(e) {
|
|
1135
1139
|
return Array.from(e.getClientRects());
|
|
1136
1140
|
}
|
|
1137
1141
|
function mr(e) {
|
|
1138
|
-
const t = U(e), n = De(e), r = e.ownerDocument.body, o =
|
|
1142
|
+
const t = U(e), n = De(e), r = e.ownerDocument.body, o = I(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = I(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
1139
1143
|
let c = -n.scrollLeft + et(e);
|
|
1140
1144
|
const s = -n.scrollTop;
|
|
1141
|
-
return
|
|
1145
|
+
return V(r).direction === "rtl" && (c += I(t.clientWidth, r.clientWidth) - o), {
|
|
1142
1146
|
width: o,
|
|
1143
1147
|
height: i,
|
|
1144
1148
|
x: c,
|
|
@@ -1146,7 +1150,7 @@ function mr(e) {
|
|
|
1146
1150
|
};
|
|
1147
1151
|
}
|
|
1148
1152
|
function pr(e, t) {
|
|
1149
|
-
const n =
|
|
1153
|
+
const n = _(e), r = U(e), o = n.visualViewport;
|
|
1150
1154
|
let i = r.clientWidth, c = r.clientHeight, s = 0, d = 0;
|
|
1151
1155
|
if (o) {
|
|
1152
1156
|
i = o.width, c = o.height;
|
|
@@ -1161,7 +1165,7 @@ function pr(e, t) {
|
|
|
1161
1165
|
};
|
|
1162
1166
|
}
|
|
1163
1167
|
function vr(e, t) {
|
|
1164
|
-
const n = J(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = Y(e) ?
|
|
1168
|
+
const n = J(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = Y(e) ? oe(e) : z(1), c = e.clientWidth * i.x, s = e.clientHeight * i.y, d = o * i.x, l = r * i.y;
|
|
1165
1169
|
return {
|
|
1166
1170
|
width: c,
|
|
1167
1171
|
height: s,
|
|
@@ -1175,7 +1179,7 @@ function bt(e, t, n) {
|
|
|
1175
1179
|
r = pr(e, n);
|
|
1176
1180
|
else if (t === "document")
|
|
1177
1181
|
r = mr(U(e));
|
|
1178
|
-
else if (
|
|
1182
|
+
else if ($(t))
|
|
1179
1183
|
r = vr(t, n);
|
|
1180
1184
|
else {
|
|
1181
1185
|
const o = It(e);
|
|
@@ -1190,18 +1194,18 @@ function bt(e, t, n) {
|
|
|
1190
1194
|
}
|
|
1191
1195
|
function Ht(e, t) {
|
|
1192
1196
|
const n = G(e);
|
|
1193
|
-
return n === t ||
|
|
1197
|
+
return n === t || !$(n) || ce(n) ? !1 : V(n).position === "fixed" || Ht(n, t);
|
|
1194
1198
|
}
|
|
1195
1199
|
function gr(e, t) {
|
|
1196
1200
|
const n = t.get(e);
|
|
1197
1201
|
if (n)
|
|
1198
1202
|
return n;
|
|
1199
|
-
let r =
|
|
1200
|
-
const i =
|
|
1203
|
+
let r = he(e, [], !1).filter((s) => $(s) && ue(s) !== "body"), o = null;
|
|
1204
|
+
const i = V(e).position === "fixed";
|
|
1201
1205
|
let c = i ? G(e) : e;
|
|
1202
|
-
for (;
|
|
1203
|
-
const s =
|
|
1204
|
-
!d && s.position === "fixed" && (o = null), (i ? !d && !o : !d && s.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) ||
|
|
1206
|
+
for (; $(c) && !ce(c); ) {
|
|
1207
|
+
const s = V(c), d = Ge(c);
|
|
1208
|
+
!d && s.position === "fixed" && (o = null), (i ? !d && !o : !d && s.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || pe(c) && !d && Ht(e, c)) ? r = r.filter((f) => f !== c) : o = s, c = G(c);
|
|
1205
1209
|
}
|
|
1206
1210
|
return t.set(e, r), r;
|
|
1207
1211
|
}
|
|
@@ -1214,7 +1218,7 @@ function yr(e) {
|
|
|
1214
1218
|
} = e;
|
|
1215
1219
|
const c = [...n === "clippingAncestors" ? Te(t) ? [] : gr(t, this._c) : [].concat(n), r], s = c[0], d = c.reduce((l, f) => {
|
|
1216
1220
|
const u = bt(t, f, o);
|
|
1217
|
-
return l.top =
|
|
1221
|
+
return l.top = I(u.top, l.top), l.right = Z(u.right, l.right), l.bottom = Z(u.bottom, l.bottom), l.left = I(u.left, l.left), l;
|
|
1218
1222
|
}, bt(t, s, o));
|
|
1219
1223
|
return {
|
|
1220
1224
|
width: d.right - d.left,
|
|
@@ -1240,24 +1244,28 @@ function xr(e, t, n) {
|
|
|
1240
1244
|
scrollTop: 0
|
|
1241
1245
|
};
|
|
1242
1246
|
const d = z(0);
|
|
1247
|
+
function l() {
|
|
1248
|
+
d.x = et(o);
|
|
1249
|
+
}
|
|
1243
1250
|
if (r || !r && !i)
|
|
1244
|
-
if ((
|
|
1245
|
-
const
|
|
1246
|
-
d.x =
|
|
1247
|
-
} else o && (
|
|
1248
|
-
|
|
1251
|
+
if ((ue(t) !== "body" || pe(o)) && (s = De(t)), r) {
|
|
1252
|
+
const h = J(t, !0, i, t);
|
|
1253
|
+
d.x = h.x + t.clientLeft, d.y = h.y + t.clientTop;
|
|
1254
|
+
} else o && l();
|
|
1255
|
+
i && !r && o && l();
|
|
1256
|
+
const f = o && !r && !i ? _t(o, s) : z(0), u = c.left + s.scrollLeft - d.x - f.x, p = c.top + s.scrollTop - d.y - f.y;
|
|
1249
1257
|
return {
|
|
1250
|
-
x:
|
|
1251
|
-
y:
|
|
1258
|
+
x: u,
|
|
1259
|
+
y: p,
|
|
1252
1260
|
width: c.width,
|
|
1253
1261
|
height: c.height
|
|
1254
1262
|
};
|
|
1255
1263
|
}
|
|
1256
1264
|
function Be(e) {
|
|
1257
|
-
return
|
|
1265
|
+
return V(e).position === "static";
|
|
1258
1266
|
}
|
|
1259
1267
|
function Et(e, t) {
|
|
1260
|
-
if (!Y(e) ||
|
|
1268
|
+
if (!Y(e) || V(e).position === "fixed")
|
|
1261
1269
|
return null;
|
|
1262
1270
|
if (t)
|
|
1263
1271
|
return t(e);
|
|
@@ -1265,13 +1273,13 @@ function Et(e, t) {
|
|
|
1265
1273
|
return U(e) === n && (n = n.ownerDocument.body), n;
|
|
1266
1274
|
}
|
|
1267
1275
|
function $t(e, t) {
|
|
1268
|
-
const n =
|
|
1276
|
+
const n = _(e);
|
|
1269
1277
|
if (Te(e))
|
|
1270
1278
|
return n;
|
|
1271
1279
|
if (!Y(e)) {
|
|
1272
1280
|
let o = G(e);
|
|
1273
|
-
for (; o && !
|
|
1274
|
-
if (
|
|
1281
|
+
for (; o && !ce(o); ) {
|
|
1282
|
+
if ($(o) && !Be(o))
|
|
1275
1283
|
return o;
|
|
1276
1284
|
o = G(o);
|
|
1277
1285
|
}
|
|
@@ -1280,7 +1288,7 @@ function $t(e, t) {
|
|
|
1280
1288
|
let r = Et(e, t);
|
|
1281
1289
|
for (; r && ar(r) && Be(r); )
|
|
1282
1290
|
r = Et(r, t);
|
|
1283
|
-
return r &&
|
|
1291
|
+
return r && ce(r) && Be(r) && !Ge(r) ? n : r || lr(e) || n;
|
|
1284
1292
|
}
|
|
1285
1293
|
const br = async function(e) {
|
|
1286
1294
|
const t = this.getOffsetParent || $t, n = this.getDimensions, r = await n(e.floating);
|
|
@@ -1295,7 +1303,7 @@ const br = async function(e) {
|
|
|
1295
1303
|
};
|
|
1296
1304
|
};
|
|
1297
1305
|
function Er(e) {
|
|
1298
|
-
return
|
|
1306
|
+
return V(e).direction === "rtl";
|
|
1299
1307
|
}
|
|
1300
1308
|
const Cr = {
|
|
1301
1309
|
convertOffsetParentRelativeRectToViewportRelativeRect: dr,
|
|
@@ -1305,8 +1313,8 @@ const Cr = {
|
|
|
1305
1313
|
getElementRects: br,
|
|
1306
1314
|
getClientRects: hr,
|
|
1307
1315
|
getDimensions: wr,
|
|
1308
|
-
getScale:
|
|
1309
|
-
isElement:
|
|
1316
|
+
getScale: oe,
|
|
1317
|
+
isElement: $,
|
|
1310
1318
|
isRTL: Er
|
|
1311
1319
|
};
|
|
1312
1320
|
function Vt(e, t) {
|
|
@@ -1324,14 +1332,14 @@ function Ar(e, t) {
|
|
|
1324
1332
|
const l = e.getBoundingClientRect(), {
|
|
1325
1333
|
left: f,
|
|
1326
1334
|
top: u,
|
|
1327
|
-
width:
|
|
1335
|
+
width: p,
|
|
1328
1336
|
height: h
|
|
1329
1337
|
} = l;
|
|
1330
|
-
if (s || t(), !
|
|
1338
|
+
if (s || t(), !p || !h)
|
|
1331
1339
|
return;
|
|
1332
|
-
const y = ge(u), a = ge(o.clientWidth - (f +
|
|
1340
|
+
const y = ge(u), a = ge(o.clientWidth - (f + p)), v = ge(o.clientHeight - (u + h)), g = ge(f), x = {
|
|
1333
1341
|
rootMargin: -y + "px " + -a + "px " + -v + "px " + -g + "px",
|
|
1334
|
-
threshold:
|
|
1342
|
+
threshold: I(0, Z(1, d)) || 1
|
|
1335
1343
|
};
|
|
1336
1344
|
let w = !0;
|
|
1337
1345
|
function E(A) {
|
|
@@ -1366,17 +1374,17 @@ function Sr(e, t, n, r) {
|
|
|
1366
1374
|
elementResize: c = typeof ResizeObserver == "function",
|
|
1367
1375
|
layoutShift: s = typeof IntersectionObserver == "function",
|
|
1368
1376
|
animationFrame: d = !1
|
|
1369
|
-
} = r, l = Je(e), f = o || i ? [...l ?
|
|
1377
|
+
} = r, l = Je(e), f = o || i ? [...l ? he(l) : [], ...he(t)] : [];
|
|
1370
1378
|
f.forEach((g) => {
|
|
1371
1379
|
o && g.addEventListener("scroll", n, {
|
|
1372
1380
|
passive: !0
|
|
1373
1381
|
}), i && g.addEventListener("resize", n);
|
|
1374
1382
|
});
|
|
1375
1383
|
const u = l && s ? Ar(l, n) : null;
|
|
1376
|
-
let
|
|
1384
|
+
let p = -1, h = null;
|
|
1377
1385
|
c && (h = new ResizeObserver((g) => {
|
|
1378
1386
|
let [b] = g;
|
|
1379
|
-
b && b.target === l && h && (h.unobserve(t), cancelAnimationFrame(
|
|
1387
|
+
b && b.target === l && h && (h.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1380
1388
|
var x;
|
|
1381
1389
|
(x = h) == null || x.observe(t);
|
|
1382
1390
|
})), n();
|
|
@@ -1394,7 +1402,7 @@ function Sr(e, t, n, r) {
|
|
|
1394
1402
|
}), u == null || u(), (g = h) == null || g.disconnect(), h = null, d && cancelAnimationFrame(y);
|
|
1395
1403
|
};
|
|
1396
1404
|
}
|
|
1397
|
-
const Rr = or, Pr = ir, Or = tr, Lr = cr, Tr = nr, Ct = er, Dr = sr,
|
|
1405
|
+
const Rr = or, Pr = ir, Or = tr, Lr = cr, Tr = nr, Ct = er, Dr = sr, Mr = (e, t, n) => {
|
|
1398
1406
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
1399
1407
|
platform: Cr,
|
|
1400
1408
|
...n
|
|
@@ -1446,12 +1454,12 @@ function At(e, t) {
|
|
|
1446
1454
|
return Math.round(t * n) / n;
|
|
1447
1455
|
}
|
|
1448
1456
|
function Ie(e) {
|
|
1449
|
-
const t =
|
|
1457
|
+
const t = m.useRef(e);
|
|
1450
1458
|
return Ee(() => {
|
|
1451
1459
|
t.current = e;
|
|
1452
1460
|
}), t;
|
|
1453
1461
|
}
|
|
1454
|
-
function
|
|
1462
|
+
function kr(e) {
|
|
1455
1463
|
e === void 0 && (e = {});
|
|
1456
1464
|
const {
|
|
1457
1465
|
placement: t = "bottom",
|
|
@@ -1465,93 +1473,93 @@ function Mr(e) {
|
|
|
1465
1473
|
transform: s = !0,
|
|
1466
1474
|
whileElementsMounted: d,
|
|
1467
1475
|
open: l
|
|
1468
|
-
} = e, [f, u] =
|
|
1476
|
+
} = e, [f, u] = m.useState({
|
|
1469
1477
|
x: 0,
|
|
1470
1478
|
y: 0,
|
|
1471
1479
|
strategy: n,
|
|
1472
1480
|
placement: t,
|
|
1473
1481
|
middlewareData: {},
|
|
1474
1482
|
isPositioned: !1
|
|
1475
|
-
}), [
|
|
1476
|
-
Oe(
|
|
1477
|
-
const [y, a] =
|
|
1483
|
+
}), [p, h] = m.useState(r);
|
|
1484
|
+
Oe(p, r) || h(r);
|
|
1485
|
+
const [y, a] = m.useState(null), [v, g] = m.useState(null), b = m.useCallback((S) => {
|
|
1478
1486
|
S !== A.current && (A.current = S, a(S));
|
|
1479
|
-
}, []), x =
|
|
1487
|
+
}, []), x = m.useCallback((S) => {
|
|
1480
1488
|
S !== C.current && (C.current = S, g(S));
|
|
1481
|
-
}, []), w = i || y, E = c || v, A =
|
|
1489
|
+
}, []), w = i || y, E = c || v, A = m.useRef(null), C = m.useRef(null), R = m.useRef(f), O = d != null, P = Ie(d), W = Ie(o), B = Ie(l), L = m.useCallback(() => {
|
|
1482
1490
|
if (!A.current || !C.current)
|
|
1483
1491
|
return;
|
|
1484
1492
|
const S = {
|
|
1485
1493
|
placement: t,
|
|
1486
1494
|
strategy: n,
|
|
1487
|
-
middleware:
|
|
1495
|
+
middleware: p
|
|
1488
1496
|
};
|
|
1489
|
-
|
|
1490
|
-
const
|
|
1491
|
-
...
|
|
1497
|
+
W.current && (S.platform = W.current), Mr(A.current, C.current, S).then((T) => {
|
|
1498
|
+
const F = {
|
|
1499
|
+
...T,
|
|
1492
1500
|
// The floating element's position may be recomputed while it's closed
|
|
1493
1501
|
// but still mounted (such as when transitioning out). To ensure
|
|
1494
1502
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1495
1503
|
// setting it to `true` when `open === false` (must be specified).
|
|
1496
|
-
isPositioned:
|
|
1504
|
+
isPositioned: B.current !== !1
|
|
1497
1505
|
};
|
|
1498
|
-
|
|
1499
|
-
u(
|
|
1506
|
+
N.current && !Oe(R.current, F) && (R.current = F, bn.flushSync(() => {
|
|
1507
|
+
u(F);
|
|
1500
1508
|
}));
|
|
1501
1509
|
});
|
|
1502
|
-
}, [
|
|
1510
|
+
}, [p, t, n, W, B]);
|
|
1503
1511
|
Ee(() => {
|
|
1504
1512
|
l === !1 && R.current.isPositioned && (R.current.isPositioned = !1, u((S) => ({
|
|
1505
1513
|
...S,
|
|
1506
1514
|
isPositioned: !1
|
|
1507
1515
|
})));
|
|
1508
1516
|
}, [l]);
|
|
1509
|
-
const
|
|
1510
|
-
Ee(() => (
|
|
1511
|
-
|
|
1517
|
+
const N = m.useRef(!1);
|
|
1518
|
+
Ee(() => (N.current = !0, () => {
|
|
1519
|
+
N.current = !1;
|
|
1512
1520
|
}), []), Ee(() => {
|
|
1513
1521
|
if (w && (A.current = w), E && (C.current = E), w && E) {
|
|
1514
1522
|
if (P.current)
|
|
1515
|
-
return P.current(w, E,
|
|
1516
|
-
|
|
1523
|
+
return P.current(w, E, L);
|
|
1524
|
+
L();
|
|
1517
1525
|
}
|
|
1518
|
-
}, [w, E,
|
|
1519
|
-
const
|
|
1526
|
+
}, [w, E, L, P, O]);
|
|
1527
|
+
const D = m.useMemo(() => ({
|
|
1520
1528
|
reference: A,
|
|
1521
1529
|
floating: C,
|
|
1522
1530
|
setReference: b,
|
|
1523
1531
|
setFloating: x
|
|
1524
|
-
}), [b, x]),
|
|
1532
|
+
}), [b, x]), M = m.useMemo(() => ({
|
|
1525
1533
|
reference: w,
|
|
1526
1534
|
floating: E
|
|
1527
|
-
}), [w, E]), k =
|
|
1535
|
+
}), [w, E]), k = m.useMemo(() => {
|
|
1528
1536
|
const S = {
|
|
1529
1537
|
position: n,
|
|
1530
1538
|
left: 0,
|
|
1531
1539
|
top: 0
|
|
1532
1540
|
};
|
|
1533
|
-
if (!
|
|
1541
|
+
if (!M.floating)
|
|
1534
1542
|
return S;
|
|
1535
|
-
const
|
|
1543
|
+
const T = At(M.floating, f.x), F = At(M.floating, f.y);
|
|
1536
1544
|
return s ? {
|
|
1537
1545
|
...S,
|
|
1538
|
-
transform: "translate(" +
|
|
1539
|
-
...zt(
|
|
1546
|
+
transform: "translate(" + T + "px, " + F + "px)",
|
|
1547
|
+
...zt(M.floating) >= 1.5 && {
|
|
1540
1548
|
willChange: "transform"
|
|
1541
1549
|
}
|
|
1542
1550
|
} : {
|
|
1543
1551
|
position: n,
|
|
1544
|
-
left:
|
|
1545
|
-
top:
|
|
1552
|
+
left: T,
|
|
1553
|
+
top: F
|
|
1546
1554
|
};
|
|
1547
|
-
}, [n, s,
|
|
1548
|
-
return
|
|
1555
|
+
}, [n, s, M.floating, f.x, f.y]);
|
|
1556
|
+
return m.useMemo(() => ({
|
|
1549
1557
|
...f,
|
|
1550
|
-
update:
|
|
1551
|
-
refs:
|
|
1552
|
-
elements:
|
|
1558
|
+
update: L,
|
|
1559
|
+
refs: D,
|
|
1560
|
+
elements: M,
|
|
1553
1561
|
floatingStyles: k
|
|
1554
|
-
}), [f,
|
|
1562
|
+
}), [f, L, D, M, k]);
|
|
1555
1563
|
}
|
|
1556
1564
|
const Fr = (e) => {
|
|
1557
1565
|
function t(n) {
|
|
@@ -1596,10 +1604,10 @@ const Fr = (e) => {
|
|
|
1596
1604
|
...Fr(e),
|
|
1597
1605
|
options: [e, t]
|
|
1598
1606
|
});
|
|
1599
|
-
var Vr = "Arrow", Yt =
|
|
1607
|
+
var Vr = "Arrow", Yt = m.forwardRef((e, t) => {
|
|
1600
1608
|
const { children: n, width: r = 10, height: o = 5, ...i } = e;
|
|
1601
|
-
return /* @__PURE__ */
|
|
1602
|
-
|
|
1609
|
+
return /* @__PURE__ */ H(
|
|
1610
|
+
ae.svg,
|
|
1603
1611
|
{
|
|
1604
1612
|
...i,
|
|
1605
1613
|
ref: t,
|
|
@@ -1607,26 +1615,26 @@ var Vr = "Arrow", Yt = p.forwardRef((e, t) => {
|
|
|
1607
1615
|
height: o,
|
|
1608
1616
|
viewBox: "0 0 30 10",
|
|
1609
1617
|
preserveAspectRatio: "none",
|
|
1610
|
-
children: e.asChild ? n : /* @__PURE__ */
|
|
1618
|
+
children: e.asChild ? n : /* @__PURE__ */ H("polygon", { points: "0,0 30,0 15,10" })
|
|
1611
1619
|
}
|
|
1612
1620
|
);
|
|
1613
1621
|
});
|
|
1614
1622
|
Yt.displayName = Vr;
|
|
1615
1623
|
var zr = Yt, tt = "Popper", [Ut, Bo] = wn(tt), [Yr, Xt] = Ut(tt), jt = (e) => {
|
|
1616
|
-
const { __scopePopper: t, children: n } = e, [r, o] =
|
|
1617
|
-
return /* @__PURE__ */
|
|
1624
|
+
const { __scopePopper: t, children: n } = e, [r, o] = m.useState(null);
|
|
1625
|
+
return /* @__PURE__ */ H(Yr, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
1618
1626
|
};
|
|
1619
1627
|
jt.displayName = tt;
|
|
1620
|
-
var Kt = "PopperAnchor", qt =
|
|
1628
|
+
var Kt = "PopperAnchor", qt = m.forwardRef(
|
|
1621
1629
|
(e, t) => {
|
|
1622
|
-
const { __scopePopper: n, virtualRef: r, ...o } = e, i = Xt(Kt, n), c =
|
|
1623
|
-
return
|
|
1630
|
+
const { __scopePopper: n, virtualRef: r, ...o } = e, i = Xt(Kt, n), c = m.useRef(null), s = me(t, c);
|
|
1631
|
+
return m.useEffect(() => {
|
|
1624
1632
|
i.onAnchorChange((r == null ? void 0 : r.current) || c.current);
|
|
1625
|
-
}), r ? null : /* @__PURE__ */
|
|
1633
|
+
}), r ? null : /* @__PURE__ */ H(ae.div, { ...o, ref: s });
|
|
1626
1634
|
}
|
|
1627
1635
|
);
|
|
1628
1636
|
qt.displayName = Kt;
|
|
1629
|
-
var nt = "PopperContent", [Ur, Xr] = Ut(nt), Zt =
|
|
1637
|
+
var nt = "PopperContent", [Ur, Xr] = Ut(nt), Zt = m.forwardRef(
|
|
1630
1638
|
(e, t) => {
|
|
1631
1639
|
var rt, ot, it, st, ct, at;
|
|
1632
1640
|
const {
|
|
@@ -1640,20 +1648,20 @@ var nt = "PopperContent", [Ur, Xr] = Ut(nt), Zt = p.forwardRef(
|
|
|
1640
1648
|
collisionBoundary: l = [],
|
|
1641
1649
|
collisionPadding: f = 0,
|
|
1642
1650
|
sticky: u = "partial",
|
|
1643
|
-
hideWhenDetached:
|
|
1651
|
+
hideWhenDetached: p = !1,
|
|
1644
1652
|
updatePositionStrategy: h = "optimized",
|
|
1645
1653
|
onPlaced: y,
|
|
1646
1654
|
...a
|
|
1647
|
-
} = e, v = Xt(nt, n), [g, b] =
|
|
1655
|
+
} = e, v = Xt(nt, n), [g, b] = m.useState(null), x = me(t, (fe) => b(fe)), [w, E] = m.useState(null), A = xn(w), C = (A == null ? void 0 : A.width) ?? 0, R = (A == null ? void 0 : A.height) ?? 0, O = r + (i !== "center" ? "-" + i : ""), P = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, W = Array.isArray(l) ? l : [l], B = W.length > 0, L = {
|
|
1648
1656
|
padding: P,
|
|
1649
|
-
boundary:
|
|
1657
|
+
boundary: W.filter(Kr),
|
|
1650
1658
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
1651
|
-
altBoundary:
|
|
1652
|
-
}, { refs:
|
|
1659
|
+
altBoundary: B
|
|
1660
|
+
}, { refs: N, floatingStyles: D, placement: M, isPositioned: k, middlewareData: S } = kr({
|
|
1653
1661
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
1654
1662
|
strategy: "fixed",
|
|
1655
|
-
placement:
|
|
1656
|
-
whileElementsMounted: (...
|
|
1663
|
+
placement: O,
|
|
1664
|
+
whileElementsMounted: (...fe) => Sr(...fe, {
|
|
1657
1665
|
animationFrame: h === "always"
|
|
1658
1666
|
}),
|
|
1659
1667
|
elements: {
|
|
@@ -1665,35 +1673,35 @@ var nt = "PopperContent", [Ur, Xr] = Ut(nt), Zt = p.forwardRef(
|
|
|
1665
1673
|
mainAxis: !0,
|
|
1666
1674
|
crossAxis: !1,
|
|
1667
1675
|
limiter: u === "partial" ? Br() : void 0,
|
|
1668
|
-
...
|
|
1676
|
+
...L
|
|
1669
1677
|
}),
|
|
1670
|
-
d && Ir({ ...
|
|
1678
|
+
d && Ir({ ...L }),
|
|
1671
1679
|
_r({
|
|
1672
|
-
...
|
|
1673
|
-
apply: ({ elements:
|
|
1674
|
-
const { width: mn, height: pn } = lt.reference, ve =
|
|
1680
|
+
...L,
|
|
1681
|
+
apply: ({ elements: fe, rects: lt, availableWidth: dn, availableHeight: hn }) => {
|
|
1682
|
+
const { width: mn, height: pn } = lt.reference, ve = fe.floating.style;
|
|
1675
1683
|
ve.setProperty("--radix-popper-available-width", `${dn}px`), ve.setProperty("--radix-popper-available-height", `${hn}px`), ve.setProperty("--radix-popper-anchor-width", `${mn}px`), ve.setProperty("--radix-popper-anchor-height", `${pn}px`);
|
|
1676
1684
|
}
|
|
1677
1685
|
}),
|
|
1678
1686
|
w && $r({ element: w, padding: s }),
|
|
1679
1687
|
qr({ arrowWidth: C, arrowHeight: R }),
|
|
1680
|
-
|
|
1688
|
+
p && Hr({ strategy: "referenceHidden", ...L })
|
|
1681
1689
|
]
|
|
1682
|
-
}), [
|
|
1690
|
+
}), [T, F] = Jt(M), ee = se(y);
|
|
1683
1691
|
Ve(() => {
|
|
1684
|
-
k && (
|
|
1685
|
-
}, [k,
|
|
1686
|
-
const cn = (rt = S.arrow) == null ? void 0 : rt.x, an = (ot = S.arrow) == null ? void 0 : ot.y, ln = ((it = S.arrow) == null ? void 0 : it.centerOffset) !== 0, [un, fn] =
|
|
1692
|
+
k && (ee == null || ee());
|
|
1693
|
+
}, [k, ee]);
|
|
1694
|
+
const cn = (rt = S.arrow) == null ? void 0 : rt.x, an = (ot = S.arrow) == null ? void 0 : ot.y, ln = ((it = S.arrow) == null ? void 0 : it.centerOffset) !== 0, [un, fn] = m.useState();
|
|
1687
1695
|
return Ve(() => {
|
|
1688
1696
|
g && fn(window.getComputedStyle(g).zIndex);
|
|
1689
|
-
}, [g]), /* @__PURE__ */
|
|
1697
|
+
}, [g]), /* @__PURE__ */ H(
|
|
1690
1698
|
"div",
|
|
1691
1699
|
{
|
|
1692
|
-
ref:
|
|
1700
|
+
ref: N.setFloating,
|
|
1693
1701
|
"data-radix-popper-content-wrapper": "",
|
|
1694
1702
|
style: {
|
|
1695
|
-
...
|
|
1696
|
-
transform: k ?
|
|
1703
|
+
...D,
|
|
1704
|
+
transform: k ? D.transform : "translate(0, -200%)",
|
|
1697
1705
|
// keep off the page when measuring
|
|
1698
1706
|
minWidth: "max-content",
|
|
1699
1707
|
zIndex: un,
|
|
@@ -1710,20 +1718,20 @@ var nt = "PopperContent", [Ur, Xr] = Ut(nt), Zt = p.forwardRef(
|
|
|
1710
1718
|
}
|
|
1711
1719
|
},
|
|
1712
1720
|
dir: e.dir,
|
|
1713
|
-
children: /* @__PURE__ */
|
|
1721
|
+
children: /* @__PURE__ */ H(
|
|
1714
1722
|
Ur,
|
|
1715
1723
|
{
|
|
1716
1724
|
scope: n,
|
|
1717
|
-
placedSide:
|
|
1725
|
+
placedSide: T,
|
|
1718
1726
|
onArrowChange: E,
|
|
1719
1727
|
arrowX: cn,
|
|
1720
1728
|
arrowY: an,
|
|
1721
1729
|
shouldHideArrow: ln,
|
|
1722
|
-
children: /* @__PURE__ */
|
|
1723
|
-
|
|
1730
|
+
children: /* @__PURE__ */ H(
|
|
1731
|
+
ae.div,
|
|
1724
1732
|
{
|
|
1725
|
-
"data-side":
|
|
1726
|
-
"data-align":
|
|
1733
|
+
"data-side": T,
|
|
1734
|
+
"data-align": F,
|
|
1727
1735
|
...a,
|
|
1728
1736
|
ref: x,
|
|
1729
1737
|
style: {
|
|
@@ -1746,13 +1754,13 @@ var Gt = "PopperArrow", jr = {
|
|
|
1746
1754
|
right: "left",
|
|
1747
1755
|
bottom: "top",
|
|
1748
1756
|
left: "right"
|
|
1749
|
-
}, Qt =
|
|
1757
|
+
}, Qt = m.forwardRef(function(t, n) {
|
|
1750
1758
|
const { __scopePopper: r, ...o } = t, i = Xr(Gt, r), c = jr[i.placedSide];
|
|
1751
1759
|
return (
|
|
1752
1760
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
1753
1761
|
// doesn't report size as we'd expect on SVG elements.
|
|
1754
1762
|
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
1755
|
-
/* @__PURE__ */
|
|
1763
|
+
/* @__PURE__ */ H(
|
|
1756
1764
|
"span",
|
|
1757
1765
|
{
|
|
1758
1766
|
ref: i.onArrowChange,
|
|
@@ -1775,7 +1783,7 @@ var Gt = "PopperArrow", jr = {
|
|
|
1775
1783
|
}[i.placedSide],
|
|
1776
1784
|
visibility: i.shouldHideArrow ? "hidden" : void 0
|
|
1777
1785
|
},
|
|
1778
|
-
children: /* @__PURE__ */
|
|
1786
|
+
children: /* @__PURE__ */ H(
|
|
1779
1787
|
zr,
|
|
1780
1788
|
{
|
|
1781
1789
|
...o,
|
|
@@ -1800,9 +1808,9 @@ var qr = (e) => ({
|
|
|
1800
1808
|
options: e,
|
|
1801
1809
|
fn(t) {
|
|
1802
1810
|
var v, g, b;
|
|
1803
|
-
const { placement: n, rects: r, middlewareData: o } = t, c = ((v = o.arrow) == null ? void 0 : v.centerOffset) !== 0, s = c ? 0 : e.arrowWidth, d = c ? 0 : e.arrowHeight, [l, f] = Jt(n), u = { start: "0%", center: "50%", end: "100%" }[f],
|
|
1811
|
+
const { placement: n, rects: r, middlewareData: o } = t, c = ((v = o.arrow) == null ? void 0 : v.centerOffset) !== 0, s = c ? 0 : e.arrowWidth, d = c ? 0 : e.arrowHeight, [l, f] = Jt(n), u = { start: "0%", center: "50%", end: "100%" }[f], p = (((g = o.arrow) == null ? void 0 : g.x) ?? 0) + s / 2, h = (((b = o.arrow) == null ? void 0 : b.y) ?? 0) + d / 2;
|
|
1804
1812
|
let y = "", a = "";
|
|
1805
|
-
return l === "bottom" ? (y = c ? u : `${
|
|
1813
|
+
return l === "bottom" ? (y = c ? u : `${p}px`, a = `${-d}px`) : l === "top" ? (y = c ? u : `${p}px`, a = `${r.floating.height + d}px`) : l === "right" ? (y = `${-d}px`, a = c ? u : `${h}px`) : l === "left" && (y = `${r.floating.width + d}px`, a = c ? u : `${h}px`), { data: { x: y, y: a } };
|
|
1806
1814
|
}
|
|
1807
1815
|
});
|
|
1808
1816
|
function Jt(e) {
|
|
@@ -1814,7 +1822,7 @@ var Io = jt, _o = qt, Ho = Zt, $o = Qt, Zr = function(e) {
|
|
|
1814
1822
|
return null;
|
|
1815
1823
|
var t = Array.isArray(e) ? e[0] : e;
|
|
1816
1824
|
return t.ownerDocument.body;
|
|
1817
|
-
},
|
|
1825
|
+
}, te = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), we = {}, _e = 0, en = function(e) {
|
|
1818
1826
|
return e && (e.host || en(e.parentNode));
|
|
1819
1827
|
}, Gr = function(e, t) {
|
|
1820
1828
|
return t.map(function(n) {
|
|
@@ -1833,23 +1841,23 @@ var Io = jt, _o = qt, Ho = Zt, $o = Qt, Zr = function(e) {
|
|
|
1833
1841
|
};
|
|
1834
1842
|
o.forEach(l);
|
|
1835
1843
|
var f = function(u) {
|
|
1836
|
-
!u || d.has(u) || Array.prototype.forEach.call(u.children, function(
|
|
1837
|
-
if (s.has(
|
|
1838
|
-
f(
|
|
1844
|
+
!u || d.has(u) || Array.prototype.forEach.call(u.children, function(p) {
|
|
1845
|
+
if (s.has(p))
|
|
1846
|
+
f(p);
|
|
1839
1847
|
else
|
|
1840
1848
|
try {
|
|
1841
|
-
var h =
|
|
1842
|
-
|
|
1849
|
+
var h = p.getAttribute(r), y = h !== null && h !== "false", a = (te.get(p) || 0) + 1, v = (i.get(p) || 0) + 1;
|
|
1850
|
+
te.set(p, a), i.set(p, v), c.push(p), a === 1 && y && ye.set(p, !0), v === 1 && p.setAttribute(n, "true"), y || p.setAttribute(r, "true");
|
|
1843
1851
|
} catch (g) {
|
|
1844
|
-
console.error("aria-hidden: cannot operate on ",
|
|
1852
|
+
console.error("aria-hidden: cannot operate on ", p, g);
|
|
1845
1853
|
}
|
|
1846
1854
|
});
|
|
1847
1855
|
};
|
|
1848
1856
|
return f(t), s.clear(), _e++, function() {
|
|
1849
1857
|
c.forEach(function(u) {
|
|
1850
|
-
var
|
|
1851
|
-
|
|
1852
|
-
}), _e--, _e || (
|
|
1858
|
+
var p = te.get(u) - 1, h = i.get(u) - 1;
|
|
1859
|
+
te.set(u, p), i.set(u, h), p || (ye.has(u) || u.removeAttribute(r), ye.delete(u)), h || u.removeAttribute(n);
|
|
1860
|
+
}), _e--, _e || (te = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), we = {});
|
|
1853
1861
|
};
|
|
1854
1862
|
}, Vo = function(e, t, n) {
|
|
1855
1863
|
n === void 0 && (n = "data-aria-hidden");
|
|
@@ -1858,25 +1866,25 @@ var Io = jt, _o = qt, Ho = Zt, $o = Qt, Zr = function(e) {
|
|
|
1858
1866
|
return null;
|
|
1859
1867
|
};
|
|
1860
1868
|
}, Ce = "right-scroll-bar-position", Ae = "width-before-scroll-bar", Jr = "with-scroll-bars-hidden", eo = "--removed-body-scroll-bar-size", tn = Cn(), He = function() {
|
|
1861
|
-
},
|
|
1862
|
-
var n =
|
|
1869
|
+
}, Me = m.forwardRef(function(e, t) {
|
|
1870
|
+
var n = m.useRef(null), r = m.useState({
|
|
1863
1871
|
onScrollCapture: He,
|
|
1864
1872
|
onWheelCapture: He,
|
|
1865
1873
|
onTouchMoveCapture: He
|
|
1866
|
-
}), o = r[0], i = r[1], c = e.forwardProps, s = e.children, d = e.className, l = e.removeScrollBar, f = e.enabled, u = e.shards,
|
|
1867
|
-
return
|
|
1868
|
-
|
|
1874
|
+
}), o = r[0], i = r[1], c = e.forwardProps, s = e.children, d = e.className, l = e.removeScrollBar, f = e.enabled, u = e.shards, p = e.sideCar, h = e.noIsolation, y = e.inert, a = e.allowPinchZoom, v = e.as, g = v === void 0 ? "div" : v, b = e.gapMode, x = Lt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), w = p, E = An([n, t]), A = Q(Q({}, x), o);
|
|
1875
|
+
return m.createElement(
|
|
1876
|
+
m.Fragment,
|
|
1869
1877
|
null,
|
|
1870
|
-
f &&
|
|
1871
|
-
c ?
|
|
1878
|
+
f && m.createElement(w, { sideCar: tn, removeScrollBar: l, shards: u, noIsolation: h, inert: y, setCallbacks: i, allowPinchZoom: !!a, lockRef: n, gapMode: b }),
|
|
1879
|
+
c ? m.cloneElement(m.Children.only(s), Q(Q({}, A), { ref: E })) : m.createElement(g, Q({}, A, { className: d, ref: E }), s)
|
|
1872
1880
|
);
|
|
1873
1881
|
});
|
|
1874
|
-
|
|
1882
|
+
Me.defaultProps = {
|
|
1875
1883
|
enabled: !0,
|
|
1876
1884
|
removeScrollBar: !0,
|
|
1877
1885
|
inert: !1
|
|
1878
1886
|
};
|
|
1879
|
-
|
|
1887
|
+
Me.classNames = {
|
|
1880
1888
|
fullWidth: Ae,
|
|
1881
1889
|
zeroRight: Ce
|
|
1882
1890
|
};
|
|
@@ -1912,7 +1920,7 @@ var io = function() {
|
|
|
1912
1920
|
}, so = function() {
|
|
1913
1921
|
var e = io();
|
|
1914
1922
|
return function(t, n) {
|
|
1915
|
-
|
|
1923
|
+
m.useEffect(function() {
|
|
1916
1924
|
return e.add(t), function() {
|
|
1917
1925
|
e.remove();
|
|
1918
1926
|
};
|
|
@@ -1944,14 +1952,14 @@ var io = function() {
|
|
|
1944
1952
|
right: t[2],
|
|
1945
1953
|
gap: Math.max(0, r - n + t[2] - t[0])
|
|
1946
1954
|
};
|
|
1947
|
-
}, uo = nn(),
|
|
1955
|
+
}, uo = nn(), ie = "data-scroll-locked", fo = function(e, t, n, r) {
|
|
1948
1956
|
var o = e.left, i = e.top, c = e.right, s = e.gap;
|
|
1949
1957
|
return n === void 0 && (n = "margin"), `
|
|
1950
1958
|
.`.concat(Jr, ` {
|
|
1951
1959
|
overflow: hidden `).concat(r, `;
|
|
1952
1960
|
padding-right: `).concat(s, "px ").concat(r, `;
|
|
1953
1961
|
}
|
|
1954
|
-
body[`).concat(
|
|
1962
|
+
body[`).concat(ie, `] {
|
|
1955
1963
|
overflow: hidden `).concat(r, `;
|
|
1956
1964
|
overscroll-behavior: contain;
|
|
1957
1965
|
`).concat([
|
|
@@ -1984,27 +1992,27 @@ var io = function() {
|
|
|
1984
1992
|
margin-right: 0 `).concat(r, `;
|
|
1985
1993
|
}
|
|
1986
1994
|
|
|
1987
|
-
body[`).concat(
|
|
1995
|
+
body[`).concat(ie, `] {
|
|
1988
1996
|
`).concat(eo, ": ").concat(s, `px;
|
|
1989
1997
|
}
|
|
1990
1998
|
`);
|
|
1991
1999
|
}, St = function() {
|
|
1992
|
-
var e = parseInt(document.body.getAttribute(
|
|
2000
|
+
var e = parseInt(document.body.getAttribute(ie) || "0", 10);
|
|
1993
2001
|
return isFinite(e) ? e : 0;
|
|
1994
2002
|
}, ho = function() {
|
|
1995
|
-
|
|
1996
|
-
return document.body.setAttribute(
|
|
2003
|
+
m.useEffect(function() {
|
|
2004
|
+
return document.body.setAttribute(ie, (St() + 1).toString()), function() {
|
|
1997
2005
|
var e = St() - 1;
|
|
1998
|
-
e <= 0 ? document.body.removeAttribute(
|
|
2006
|
+
e <= 0 ? document.body.removeAttribute(ie) : document.body.setAttribute(ie, e.toString());
|
|
1999
2007
|
};
|
|
2000
2008
|
}, []);
|
|
2001
2009
|
}, mo = function(e) {
|
|
2002
2010
|
var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
|
|
2003
2011
|
ho();
|
|
2004
|
-
var i =
|
|
2012
|
+
var i = m.useMemo(function() {
|
|
2005
2013
|
return lo(o);
|
|
2006
2014
|
}, [o]);
|
|
2007
|
-
return
|
|
2015
|
+
return m.createElement(uo, { styles: fo(i, !t, o, n ? "" : "!important") });
|
|
2008
2016
|
}, je = !1;
|
|
2009
2017
|
if (typeof window < "u")
|
|
2010
2018
|
try {
|
|
@@ -2017,7 +2025,7 @@ if (typeof window < "u")
|
|
|
2017
2025
|
} catch {
|
|
2018
2026
|
je = !1;
|
|
2019
2027
|
}
|
|
2020
|
-
var
|
|
2028
|
+
var ne = je ? { passive: !1 } : !1, po = function(e) {
|
|
2021
2029
|
return e.tagName === "TEXTAREA";
|
|
2022
2030
|
}, rn = function(e, t) {
|
|
2023
2031
|
if (!(e instanceof Element))
|
|
@@ -2066,16 +2074,16 @@ var te = je ? { passive: !1 } : !1, po = function(e) {
|
|
|
2066
2074
|
}, xo = function(e, t) {
|
|
2067
2075
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
2068
2076
|
}, bo = function(e, t, n, r, o) {
|
|
2069
|
-
var i = xo(e, window.getComputedStyle(t).direction), c = i * r, s = n.target, d = t.contains(s), l = !1, f = c > 0, u = 0,
|
|
2077
|
+
var i = xo(e, window.getComputedStyle(t).direction), c = i * r, s = n.target, d = t.contains(s), l = !1, f = c > 0, u = 0, p = 0;
|
|
2070
2078
|
do {
|
|
2071
2079
|
var h = sn(e, s), y = h[0], a = h[1], v = h[2], g = a - v - i * y;
|
|
2072
|
-
(y || g) && on(e, s) && (u += g,
|
|
2080
|
+
(y || g) && on(e, s) && (u += g, p += y), s instanceof ShadowRoot ? s = s.host : s = s.parentNode;
|
|
2073
2081
|
} while (
|
|
2074
2082
|
// portaled content
|
|
2075
2083
|
!d && s !== document.body || // self content
|
|
2076
2084
|
d && (t.contains(s) || t === s)
|
|
2077
2085
|
);
|
|
2078
|
-
return (f && Math.abs(u) < 1 || !f && Math.abs(
|
|
2086
|
+
return (f && Math.abs(u) < 1 || !f && Math.abs(p) < 1) && (l = !0), l;
|
|
2079
2087
|
}, be = function(e) {
|
|
2080
2088
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
2081
2089
|
}, Pt = function(e) {
|
|
@@ -2089,12 +2097,12 @@ var te = je ? { passive: !1 } : !1, po = function(e) {
|
|
|
2089
2097
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
2090
2098
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
2091
2099
|
`);
|
|
2092
|
-
}, Ao = 0,
|
|
2100
|
+
}, Ao = 0, re = [];
|
|
2093
2101
|
function So(e) {
|
|
2094
|
-
var t =
|
|
2095
|
-
|
|
2102
|
+
var t = m.useRef([]), n = m.useRef([0, 0]), r = m.useRef(), o = m.useState(Ao++)[0], i = m.useState(nn)[0], c = m.useRef(e);
|
|
2103
|
+
m.useEffect(function() {
|
|
2096
2104
|
c.current = e;
|
|
2097
|
-
}, [e]),
|
|
2105
|
+
}, [e]), m.useEffect(function() {
|
|
2098
2106
|
if (e.inert) {
|
|
2099
2107
|
document.body.classList.add("block-interactivity-".concat(o));
|
|
2100
2108
|
var a = En([e.lockRef.current], (e.shards || []).map(Ot), !0).filter(Boolean);
|
|
@@ -2107,7 +2115,7 @@ function So(e) {
|
|
|
2107
2115
|
};
|
|
2108
2116
|
}
|
|
2109
2117
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
2110
|
-
var s =
|
|
2118
|
+
var s = m.useCallback(function(a, v) {
|
|
2111
2119
|
if ("touches" in a && a.touches.length === 2 || a.type === "wheel" && a.ctrlKey)
|
|
2112
2120
|
return !c.current.allowPinchZoom;
|
|
2113
2121
|
var g = be(a), b = n.current, x = "deltaX" in a ? a.deltaX : b[0] - g[0], w = "deltaY" in a ? a.deltaY : b[1] - g[1], E, A = a.target, C = Math.abs(x) > Math.abs(w) ? "h" : "v";
|
|
@@ -2120,11 +2128,11 @@ function So(e) {
|
|
|
2120
2128
|
return !1;
|
|
2121
2129
|
if (!r.current && "changedTouches" in a && (x || w) && (r.current = E), !E)
|
|
2122
2130
|
return !0;
|
|
2123
|
-
var
|
|
2124
|
-
return bo(
|
|
2125
|
-
}, []), d =
|
|
2131
|
+
var O = r.current || E;
|
|
2132
|
+
return bo(O, v, a, O === "h" ? x : w);
|
|
2133
|
+
}, []), d = m.useCallback(function(a) {
|
|
2126
2134
|
var v = a;
|
|
2127
|
-
if (!(!
|
|
2135
|
+
if (!(!re.length || re[re.length - 1] !== i)) {
|
|
2128
2136
|
var g = "deltaY" in v ? Pt(v) : be(v), b = t.current.filter(function(E) {
|
|
2129
2137
|
return E.name === v.type && (E.target === v.target || v.target === E.shadowParent) && Eo(E.delta, g);
|
|
2130
2138
|
})[0];
|
|
@@ -2139,37 +2147,37 @@ function So(e) {
|
|
|
2139
2147
|
w && v.cancelable && v.preventDefault();
|
|
2140
2148
|
}
|
|
2141
2149
|
}
|
|
2142
|
-
}, []), l =
|
|
2150
|
+
}, []), l = m.useCallback(function(a, v, g, b) {
|
|
2143
2151
|
var x = { name: a, delta: v, target: g, should: b, shadowParent: Ro(g) };
|
|
2144
2152
|
t.current.push(x), setTimeout(function() {
|
|
2145
2153
|
t.current = t.current.filter(function(w) {
|
|
2146
2154
|
return w !== x;
|
|
2147
2155
|
});
|
|
2148
2156
|
}, 1);
|
|
2149
|
-
}, []), f =
|
|
2157
|
+
}, []), f = m.useCallback(function(a) {
|
|
2150
2158
|
n.current = be(a), r.current = void 0;
|
|
2151
|
-
}, []), u =
|
|
2159
|
+
}, []), u = m.useCallback(function(a) {
|
|
2152
2160
|
l(a.type, Pt(a), a.target, s(a, e.lockRef.current));
|
|
2153
|
-
}, []),
|
|
2161
|
+
}, []), p = m.useCallback(function(a) {
|
|
2154
2162
|
l(a.type, be(a), a.target, s(a, e.lockRef.current));
|
|
2155
2163
|
}, []);
|
|
2156
|
-
|
|
2157
|
-
return
|
|
2164
|
+
m.useEffect(function() {
|
|
2165
|
+
return re.push(i), e.setCallbacks({
|
|
2158
2166
|
onScrollCapture: u,
|
|
2159
2167
|
onWheelCapture: u,
|
|
2160
|
-
onTouchMoveCapture:
|
|
2161
|
-
}), document.addEventListener("wheel", d,
|
|
2162
|
-
|
|
2168
|
+
onTouchMoveCapture: p
|
|
2169
|
+
}), document.addEventListener("wheel", d, ne), document.addEventListener("touchmove", d, ne), document.addEventListener("touchstart", f, ne), function() {
|
|
2170
|
+
re = re.filter(function(a) {
|
|
2163
2171
|
return a !== i;
|
|
2164
|
-
}), document.removeEventListener("wheel", d,
|
|
2172
|
+
}), document.removeEventListener("wheel", d, ne), document.removeEventListener("touchmove", d, ne), document.removeEventListener("touchstart", f, ne);
|
|
2165
2173
|
};
|
|
2166
2174
|
}, []);
|
|
2167
2175
|
var h = e.removeScrollBar, y = e.inert;
|
|
2168
|
-
return
|
|
2169
|
-
|
|
2176
|
+
return m.createElement(
|
|
2177
|
+
m.Fragment,
|
|
2170
2178
|
null,
|
|
2171
|
-
y ?
|
|
2172
|
-
h ?
|
|
2179
|
+
y ? m.createElement(i, { styles: Co(o) }) : null,
|
|
2180
|
+
h ? m.createElement(mo, { gapMode: e.gapMode }) : null
|
|
2173
2181
|
);
|
|
2174
2182
|
}
|
|
2175
2183
|
function Ro(e) {
|
|
@@ -2178,17 +2186,17 @@ function Ro(e) {
|
|
|
2178
2186
|
return t;
|
|
2179
2187
|
}
|
|
2180
2188
|
const Po = Sn(tn, So);
|
|
2181
|
-
var Oo =
|
|
2182
|
-
return
|
|
2189
|
+
var Oo = m.forwardRef(function(e, t) {
|
|
2190
|
+
return m.createElement(Me, Q({}, e, { ref: t, sideCar: Po }));
|
|
2183
2191
|
});
|
|
2184
|
-
Oo.classNames =
|
|
2192
|
+
Oo.classNames = Me.classNames;
|
|
2185
2193
|
export {
|
|
2186
2194
|
_o as A,
|
|
2187
2195
|
Ho as C,
|
|
2188
2196
|
Tn as D,
|
|
2189
2197
|
Wn as F,
|
|
2190
2198
|
Io as R,
|
|
2191
|
-
|
|
2199
|
+
se as a,
|
|
2192
2200
|
No as b,
|
|
2193
2201
|
Bo as c,
|
|
2194
2202
|
Oo as d,
|