@adamosuiteservices/ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/accordion-rounded.cjs +6 -0
- package/dist/accordion-rounded.js +85 -0
- package/dist/accordion.cjs +1 -0
- package/dist/accordion.js +65 -0
- package/dist/alert.cjs +1 -0
- package/dist/alert.js +69 -0
- package/dist/avatar.cjs +17 -0
- package/dist/avatar.js +248 -0
- package/dist/badge.cjs +1 -0
- package/dist/badge.js +54 -0
- package/dist/button-BFK0LYE1.js +58 -0
- package/dist/button-BnuVhhWO.cjs +1 -0
- package/dist/button-group.cjs +1 -0
- package/dist/button-group.js +76 -0
- package/dist/button.cjs +1 -0
- package/dist/button.js +5 -0
- package/dist/calendar.cjs +1 -0
- package/dist/calendar.js +2852 -0
- package/dist/card.cjs +1 -0
- package/dist/card.js +112 -0
- package/dist/check-CLxNVljQ.cjs +6 -0
- package/dist/check-Ci0GjV-B.js +11 -0
- package/dist/checkbox-BlfeC4MI.js +271 -0
- package/dist/checkbox-uByYIkZe.cjs +1 -0
- package/dist/checkbox.cjs +1 -0
- package/dist/checkbox.js +4 -0
- package/dist/chevron-down-BqEHzml5.cjs +6 -0
- package/dist/chevron-down-CpVS2Z7w.js +11 -0
- package/dist/chevron-left-B8QsBNvc.cjs +6 -0
- package/dist/chevron-left-Eal-WYLp.js +11 -0
- package/dist/chevron-right-BpzggHsr.cjs +6 -0
- package/dist/chevron-right-Cnc2tB4-.js +11 -0
- package/dist/circle-CX7JIirj.cjs +6 -0
- package/dist/circle-DYv-7Qb9.js +11 -0
- package/dist/collapsible.cjs +1 -0
- package/dist/collapsible.js +34 -0
- package/dist/colors.css +1 -0
- package/dist/combobox.cjs +6 -0
- package/dist/combobox.js +515 -0
- package/dist/components/layout/sidebar/index.d.ts +1 -0
- package/dist/components/layout/sidebar/sidebar.d.ts +17 -0
- package/dist/components/layout/sidebar/sidebar.stories.d.ts +6 -0
- package/dist/components/layout/toaster/index.d.ts +2 -0
- package/dist/components/layout/toaster/toaster.d.ts +26 -0
- package/dist/components/layout/toaster/toaster.stories.d.ts +15 -0
- package/dist/components/layout/toaster/use-toast.d.ts +1 -0
- package/dist/components/ui/accordion/accordion.d.ts +7 -0
- package/dist/components/ui/accordion/accordion.stories.d.ts +17 -0
- package/dist/components/ui/accordion/index.d.ts +1 -0
- package/dist/components/ui/accordion-rounded/accordion-rounded.d.ts +11 -0
- package/dist/components/ui/accordion-rounded/accordion-rounded.stories.d.ts +21 -0
- package/dist/components/ui/accordion-rounded/index.d.ts +1 -0
- package/dist/components/ui/alert/alert.d.ts +9 -0
- package/dist/components/ui/alert/alert.stories.d.ts +24 -0
- package/dist/components/ui/alert/index.d.ts +1 -0
- package/dist/components/ui/avatar/avatar.d.ts +6 -0
- package/dist/components/ui/avatar/avatar.stories.d.ts +14 -0
- package/dist/components/ui/avatar/index.d.ts +1 -0
- package/dist/components/ui/badge/badge.d.ts +10 -0
- package/dist/components/ui/badge/badge.stories.d.ts +41 -0
- package/dist/components/ui/badge/index.d.ts +1 -0
- package/dist/components/ui/button/button.d.ts +10 -0
- package/dist/components/ui/button/button.stories.d.ts +38 -0
- package/dist/components/ui/button/index.d.ts +1 -0
- package/dist/components/ui/button-group/button-group.d.ts +11 -0
- package/dist/components/ui/button-group/button-group.stories.d.ts +19 -0
- package/dist/components/ui/button-group/index.d.ts +1 -0
- package/dist/components/ui/calendar/calendar.d.ts +8 -0
- package/dist/components/ui/calendar/calendar.stories.d.ts +27 -0
- package/dist/components/ui/calendar/index.d.ts +1 -0
- package/dist/components/ui/card/card.d.ts +13 -0
- package/dist/components/ui/card/card.stories.d.ts +18 -0
- package/dist/components/ui/card/index.d.ts +1 -0
- package/dist/components/ui/checkbox/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox/checkbox.stories.d.ts +15 -0
- package/dist/components/ui/checkbox/index.d.ts +1 -0
- package/dist/components/ui/collapsible/collapsible.d.ts +5 -0
- package/dist/components/ui/collapsible/collapsible.stories.d.ts +12 -0
- package/dist/components/ui/collapsible/index.d.ts +1 -0
- package/dist/components/ui/combobox/combobox.d.ts +35 -0
- package/dist/components/ui/combobox/combobox.stories.d.ts +27 -0
- package/dist/components/ui/combobox/index.d.ts +1 -0
- package/dist/components/ui/command/command.d.ts +18 -0
- package/dist/components/ui/command/index.d.ts +1 -0
- package/dist/components/ui/context-menu/context-menu.d.ts +25 -0
- package/dist/components/ui/context-menu/context-menu.stories.d.ts +10 -0
- package/dist/components/ui/context-menu/index.d.ts +1 -0
- package/dist/components/ui/dialog/dialog.d.ts +17 -0
- package/dist/components/ui/dialog/dialog.stories.d.ts +13 -0
- package/dist/components/ui/dialog/index.d.ts +1 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +25 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.stories.d.ts +14 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +1 -0
- package/dist/components/ui/field/field.d.ts +24 -0
- package/dist/components/ui/field/field.stories.d.ts +18 -0
- package/dist/components/ui/field/index.d.ts +1 -0
- package/dist/components/ui/hover-card/hover-card.d.ts +6 -0
- package/dist/components/ui/hover-card/hover-card.stories.d.ts +25 -0
- package/dist/components/ui/hover-card/index.d.ts +1 -0
- package/dist/components/ui/input/index.d.ts +1 -0
- package/dist/components/ui/input/input.d.ts +3 -0
- package/dist/components/ui/input/input.stories.d.ts +23 -0
- package/dist/components/ui/input-group/Input-group.stories.d.ts +28 -0
- package/dist/components/ui/input-group/index.d.ts +1 -0
- package/dist/components/ui/input-group/input-group.d.ts +16 -0
- package/dist/components/ui/kbd/index.d.ts +1 -0
- package/dist/components/ui/kbd/kbd.d.ts +3 -0
- package/dist/components/ui/kbd/kbd.stories.d.ts +26 -0
- package/dist/components/ui/label/index.d.ts +1 -0
- package/dist/components/ui/label/label.d.ts +4 -0
- package/dist/components/ui/label/label.stories.d.ts +24 -0
- package/dist/components/ui/pagination/index.d.ts +1 -0
- package/dist/components/ui/pagination/pagination.d.ts +13 -0
- package/dist/components/ui/pagination/pagination.stories.d.ts +28 -0
- package/dist/components/ui/popover/index.d.ts +1 -0
- package/dist/components/ui/popover/popover.d.ts +7 -0
- package/dist/components/ui/popover/popover.stories.d.ts +26 -0
- package/dist/components/ui/progress/index.d.ts +1 -0
- package/dist/components/ui/progress/progress.d.ts +9 -0
- package/dist/components/ui/progress/progress.stories.d.ts +29 -0
- package/dist/components/ui/radio-group/index.d.ts +1 -0
- package/dist/components/ui/radio-group/radio-group.d.ts +5 -0
- package/dist/components/ui/radio-group/radio-group.stories.d.ts +18 -0
- package/dist/components/ui/select/index.d.ts +1 -0
- package/dist/components/ui/select/select.d.ts +15 -0
- package/dist/components/ui/select/select.stories.d.ts +19 -0
- package/dist/components/ui/separator/index.d.ts +1 -0
- package/dist/components/ui/separator/separator.d.ts +4 -0
- package/dist/components/ui/separator/separator.stories.d.ts +18 -0
- package/dist/components/ui/sheet/index.d.ts +1 -0
- package/dist/components/ui/sheet/sheet.d.ts +14 -0
- package/dist/components/ui/sheet/sheet.stories.d.ts +17 -0
- package/dist/components/ui/skeleton/index.d.ts +1 -0
- package/dist/components/ui/skeleton/skeleton.d.ts +2 -0
- package/dist/components/ui/skeleton/skeleton.stories.d.ts +22 -0
- package/dist/components/ui/slider/index.d.ts +1 -0
- package/dist/components/ui/slider/slider.d.ts +7 -0
- package/dist/components/ui/slider/slider.stories.d.ts +21 -0
- package/dist/components/ui/spinner/index.d.ts +1 -0
- package/dist/components/ui/spinner/spinner.d.ts +2 -0
- package/dist/components/ui/spinner/spinner.stories.d.ts +20 -0
- package/dist/components/ui/switch/index.d.ts +1 -0
- package/dist/components/ui/switch/switch.d.ts +4 -0
- package/dist/components/ui/switch/switch.stories.d.ts +17 -0
- package/dist/components/ui/table/index.d.ts +1 -0
- package/dist/components/ui/table/table.d.ts +10 -0
- package/dist/components/ui/table/table.stories.d.ts +11 -0
- package/dist/components/ui/tabs/index.d.ts +1 -0
- package/dist/components/ui/tabs/tabs.d.ts +7 -0
- package/dist/components/ui/tabs/tabs.stories.d.ts +16 -0
- package/dist/components/ui/tabs-underline/index.d.ts +1 -0
- package/dist/components/ui/tabs-underline/tabs-underline.d.ts +7 -0
- package/dist/components/ui/tabs-underline/tabs-underline.stories.d.ts +16 -0
- package/dist/components/ui/textarea/index.d.ts +1 -0
- package/dist/components/ui/textarea/textarea.d.ts +3 -0
- package/dist/components/ui/textarea/textarea.stories.d.ts +21 -0
- package/dist/components/ui/toggle/index.d.ts +1 -0
- package/dist/components/ui/toggle/toggle.d.ts +9 -0
- package/dist/components/ui/toggle/toggle.stories.d.ts +21 -0
- package/dist/components/ui/tooltip/index.d.ts +1 -0
- package/dist/components/ui/tooltip/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip/tooltip.stories.d.ts +19 -0
- package/dist/components/ui/typography/index.d.ts +1 -0
- package/dist/components/ui/typography/typography.d.ts +8 -0
- package/dist/components/ui/typography/typography.stories.d.ts +33 -0
- package/dist/context-menu.cjs +1 -0
- package/dist/context-menu.js +427 -0
- package/dist/createLucideIcon-B_8CJpcQ.js +94 -0
- package/dist/createLucideIcon-CAtnV-yz.cjs +21 -0
- package/dist/custom-layered-styles.css +1 -0
- package/dist/dialog.cjs +1 -0
- package/dist/dialog.js +139 -0
- package/dist/dropdown-menu.cjs +1 -0
- package/dist/dropdown-menu.js +423 -0
- package/dist/field.cjs +1 -0
- package/dist/field.js +221 -0
- package/dist/fonts.css +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-portal-container.d.ts +31 -0
- package/dist/hover-card.cjs +1 -0
- package/dist/hover-card.js +210 -0
- package/dist/index-0ioNhtNM.js +10 -0
- package/dist/index-6oTEokEx.js +82 -0
- package/dist/index-B-NyefE0.js +243 -0
- package/dist/index-B-ZRqW0J.js +118 -0
- package/dist/index-B-cHTKrs.js +158 -0
- package/dist/index-BGQepRFJ.js +27 -0
- package/dist/index-BGiGvaq8.cjs +1 -0
- package/dist/index-BKbK2GzY.cjs +1 -0
- package/dist/index-BMitW9UR.cjs +1 -0
- package/dist/index-BRLtxFFr.cjs +1 -0
- package/dist/index-BWaO7kQK.cjs +1 -0
- package/dist/index-BZPx6jYI.js +8 -0
- package/dist/index-BpvjJ_T6.cjs +5 -0
- package/dist/index-C0UREtMP.js +59 -0
- package/dist/index-C329e3yQ.js +134 -0
- package/dist/index-C5wjudc-.js +36 -0
- package/dist/index-C8ni3LLa.cjs +1 -0
- package/dist/index-CAOY367Y.js +1540 -0
- package/dist/index-CCKe-Mpx.js +6 -0
- package/dist/index-CQhYMnjT.js +34 -0
- package/dist/index-Ce3QBKyj.cjs +1 -0
- package/dist/index-CezwiPd_.js +615 -0
- package/dist/index-Cv867SGx.js +13 -0
- package/dist/index-CwUFT-GQ.js +228 -0
- package/dist/index-CzY-WZXL.cjs +1 -0
- package/dist/index-D02K8KOB.js +54 -0
- package/dist/index-D3S7dBDI.cjs +1 -0
- package/dist/index-D3wSWKST.cjs +1 -0
- package/dist/index-D7hQvndv.cjs +1 -0
- package/dist/index-DQvx1rG_.cjs +1 -0
- package/dist/index-DXQ-7kNJ.cjs +41 -0
- package/dist/index-DYxWvftI.cjs +1 -0
- package/dist/index-DnS_sBBe.cjs +1 -0
- package/dist/index-DulPG3F9.js +179 -0
- package/dist/index-EUea2gfp.js +70 -0
- package/dist/index-FxyLF8MY.js +68 -0
- package/dist/index-IKJMQref.cjs +1 -0
- package/dist/index-MQ0c3ZX_.cjs +1 -0
- package/dist/index-P1sVIHE3.js +32 -0
- package/dist/index-VIUqZjyP.cjs +1 -0
- package/dist/index-WIv2ndLu.cjs +1 -0
- package/dist/index-bSPhqlcX.cjs +1 -0
- package/dist/index-cwZN7ZY3.cjs +1 -0
- package/dist/index-gO_QEiaK.cjs +1 -0
- package/dist/index-iAvn1gzj.cjs +1 -0
- package/dist/index-o0sNTcKe.js +674 -0
- package/dist/index-rKs9bXHr.js +6 -0
- package/dist/index-yR-v1A4G.js +15 -0
- package/dist/input-3MDa_DYk.cjs +1 -0
- package/dist/input-Cl7xmQYQ.js +22 -0
- package/dist/input-group.cjs +1 -0
- package/dist/input-group.js +152 -0
- package/dist/input.cjs +1 -0
- package/dist/input.js +4 -0
- package/dist/jsx-runtime-BB_1_6y_.cjs +22 -0
- package/dist/jsx-runtime-BzflLqGi.js +282 -0
- package/dist/kbd.cjs +1 -0
- package/dist/kbd.js +31 -0
- package/dist/label-MxqN87DQ.cjs +1 -0
- package/dist/label-hg_jN6Y8.js +35 -0
- package/dist/label.cjs +1 -0
- package/dist/label.js +4 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/minus-C0pHPx21.cjs +6 -0
- package/dist/minus-DE-onYs2.js +11 -0
- package/dist/pagination.cjs +6 -0
- package/dist/pagination.js +134 -0
- package/dist/popover-BBXe2myL.cjs +1 -0
- package/dist/popover-DNiRNCdn.js +263 -0
- package/dist/popover.cjs +1 -0
- package/dist/popover.js +7 -0
- package/dist/progress.cjs +6 -0
- package/dist/progress.js +137 -0
- package/dist/radio-group.cjs +1 -0
- package/dist/radio-group.js +271 -0
- package/dist/radius.css +1 -0
- package/dist/select.cjs +6 -0
- package/dist/select.js +987 -0
- package/dist/separator-C9kqOQR-.js +44 -0
- package/dist/separator-Dbx-SVIs.cjs +1 -0
- package/dist/separator.cjs +1 -0
- package/dist/separator.js +4 -0
- package/dist/sheet-0jRbqkzj.cjs +1 -0
- package/dist/sheet-RAbg4M5A.js +128 -0
- package/dist/sheet.cjs +1 -0
- package/dist/sheet.js +11 -0
- package/dist/sidebar.cjs +6 -0
- package/dist/sidebar.js +139 -0
- package/dist/skeleton.cjs +1 -0
- package/dist/skeleton.js +15 -0
- package/dist/slider.cjs +1 -0
- package/dist/slider.js +486 -0
- package/dist/space.css +1 -0
- package/dist/spinner.cjs +6 -0
- package/dist/spinner.js +24 -0
- package/dist/styles.css +1 -0
- package/dist/switch.cjs +1 -0
- package/dist/switch.js +154 -0
- package/dist/table.cjs +1 -0
- package/dist/table.js +115 -0
- package/dist/tabs-underline.cjs +1 -0
- package/dist/tabs-underline.js +68 -0
- package/dist/tabs.cjs +1 -0
- package/dist/tabs.js +68 -0
- package/dist/tailwind-animations.css +1 -0
- package/dist/tailwind-colors.css +1 -0
- package/dist/tailwind-fonts.css +1 -0
- package/dist/tailwind-radius.css +1 -0
- package/dist/tailwind-spacing.css +1 -0
- package/dist/tailwind-theme.css +1 -0
- package/dist/textarea-D76719tg.js +19 -0
- package/dist/textarea-UdELO_Jn.cjs +1 -0
- package/dist/textarea.cjs +1 -0
- package/dist/textarea.js +4 -0
- package/dist/themes.css +1 -0
- package/dist/toaster.cjs +1 -0
- package/dist/toaster.js +87 -0
- package/dist/toggle.cjs +1 -0
- package/dist/toggle.js +69 -0
- package/dist/tooltip.cjs +1 -0
- package/dist/tooltip.js +375 -0
- package/dist/types/theme.type.d.ts +2 -0
- package/dist/typography.cjs +1 -0
- package/dist/typography.js +34 -0
- package/dist/use-portal-container.cjs +1 -0
- package/dist/use-portal-container.js +21 -0
- package/dist/utils-CRiPKpXj.js +2743 -0
- package/dist/utils-DoxiiusW.cjs +1 -0
- package/dist/x-CBKgg4YL.cjs +6 -0
- package/dist/x-Dl66o_vF.js +14 -0
- package/package.json +275 -0
|
@@ -0,0 +1,1540 @@
|
|
|
1
|
+
import * as R from "react";
|
|
2
|
+
import { useLayoutEffect as Ae } from "react";
|
|
3
|
+
import * as Re from "react-dom";
|
|
4
|
+
import { P as At } from "./index-C5wjudc-.js";
|
|
5
|
+
import { j as Y } from "./jsx-runtime-BzflLqGi.js";
|
|
6
|
+
import { u as Xt } from "./index-6oTEokEx.js";
|
|
7
|
+
import { c as Ce } from "./index-FxyLF8MY.js";
|
|
8
|
+
import { u as Pe } from "./index-0ioNhtNM.js";
|
|
9
|
+
import { u as $t } from "./index-CCKe-Mpx.js";
|
|
10
|
+
import { u as Oe } from "./index-BGQepRFJ.js";
|
|
11
|
+
const Se = ["top", "right", "bottom", "left"], Z = Math.min, W = Math.max, at = Math.round, ct = Math.floor, z = (t) => ({
|
|
12
|
+
x: t,
|
|
13
|
+
y: t
|
|
14
|
+
}), Ee = {
|
|
15
|
+
left: "right",
|
|
16
|
+
right: "left",
|
|
17
|
+
bottom: "top",
|
|
18
|
+
top: "bottom"
|
|
19
|
+
}, Le = {
|
|
20
|
+
start: "end",
|
|
21
|
+
end: "start"
|
|
22
|
+
};
|
|
23
|
+
function yt(t, e, n) {
|
|
24
|
+
return W(t, Z(e, n));
|
|
25
|
+
}
|
|
26
|
+
function q(t, e) {
|
|
27
|
+
return typeof t == "function" ? t(e) : t;
|
|
28
|
+
}
|
|
29
|
+
function U(t) {
|
|
30
|
+
return t.split("-")[0];
|
|
31
|
+
}
|
|
32
|
+
function tt(t) {
|
|
33
|
+
return t.split("-")[1];
|
|
34
|
+
}
|
|
35
|
+
function Rt(t) {
|
|
36
|
+
return t === "x" ? "y" : "x";
|
|
37
|
+
}
|
|
38
|
+
function Ct(t) {
|
|
39
|
+
return t === "y" ? "height" : "width";
|
|
40
|
+
}
|
|
41
|
+
const De = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
42
|
+
function j(t) {
|
|
43
|
+
return De.has(U(t)) ? "y" : "x";
|
|
44
|
+
}
|
|
45
|
+
function Pt(t) {
|
|
46
|
+
return Rt(j(t));
|
|
47
|
+
}
|
|
48
|
+
function Me(t, e, n) {
|
|
49
|
+
n === void 0 && (n = !1);
|
|
50
|
+
const o = tt(t), r = Pt(t), i = Ct(r);
|
|
51
|
+
let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
52
|
+
return e.reference[i] > e.floating[i] && (s = ft(s)), [s, ft(s)];
|
|
53
|
+
}
|
|
54
|
+
function Te(t) {
|
|
55
|
+
const e = ft(t);
|
|
56
|
+
return [vt(t), e, vt(e)];
|
|
57
|
+
}
|
|
58
|
+
function vt(t) {
|
|
59
|
+
return t.replace(/start|end/g, (e) => Le[e]);
|
|
60
|
+
}
|
|
61
|
+
const kt = ["left", "right"], Ft = ["right", "left"], $e = ["top", "bottom"], ke = ["bottom", "top"];
|
|
62
|
+
function Fe(t, e, n) {
|
|
63
|
+
switch (t) {
|
|
64
|
+
case "top":
|
|
65
|
+
case "bottom":
|
|
66
|
+
return n ? e ? Ft : kt : e ? kt : Ft;
|
|
67
|
+
case "left":
|
|
68
|
+
case "right":
|
|
69
|
+
return e ? $e : ke;
|
|
70
|
+
default:
|
|
71
|
+
return [];
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function Ne(t, e, n, o) {
|
|
75
|
+
const r = tt(t);
|
|
76
|
+
let i = Fe(U(t), n === "start", o);
|
|
77
|
+
return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(vt)))), i;
|
|
78
|
+
}
|
|
79
|
+
function ft(t) {
|
|
80
|
+
return t.replace(/left|right|bottom|top/g, (e) => Ee[e]);
|
|
81
|
+
}
|
|
82
|
+
function We(t) {
|
|
83
|
+
return {
|
|
84
|
+
top: 0,
|
|
85
|
+
right: 0,
|
|
86
|
+
bottom: 0,
|
|
87
|
+
left: 0,
|
|
88
|
+
...t
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function Yt(t) {
|
|
92
|
+
return typeof t != "number" ? We(t) : {
|
|
93
|
+
top: t,
|
|
94
|
+
right: t,
|
|
95
|
+
bottom: t,
|
|
96
|
+
left: t
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function ut(t) {
|
|
100
|
+
const {
|
|
101
|
+
x: e,
|
|
102
|
+
y: n,
|
|
103
|
+
width: o,
|
|
104
|
+
height: r
|
|
105
|
+
} = t;
|
|
106
|
+
return {
|
|
107
|
+
width: o,
|
|
108
|
+
height: r,
|
|
109
|
+
top: n,
|
|
110
|
+
left: e,
|
|
111
|
+
right: e + o,
|
|
112
|
+
bottom: n + r,
|
|
113
|
+
x: e,
|
|
114
|
+
y: n
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
function Nt(t, e, n) {
|
|
118
|
+
let {
|
|
119
|
+
reference: o,
|
|
120
|
+
floating: r
|
|
121
|
+
} = t;
|
|
122
|
+
const i = j(e), s = Pt(e), c = Ct(s), l = U(e), a = i === "y", f = o.x + o.width / 2 - r.width / 2, u = o.y + o.height / 2 - r.height / 2, p = o[c] / 2 - r[c] / 2;
|
|
123
|
+
let d;
|
|
124
|
+
switch (l) {
|
|
125
|
+
case "top":
|
|
126
|
+
d = {
|
|
127
|
+
x: f,
|
|
128
|
+
y: o.y - r.height
|
|
129
|
+
};
|
|
130
|
+
break;
|
|
131
|
+
case "bottom":
|
|
132
|
+
d = {
|
|
133
|
+
x: f,
|
|
134
|
+
y: o.y + o.height
|
|
135
|
+
};
|
|
136
|
+
break;
|
|
137
|
+
case "right":
|
|
138
|
+
d = {
|
|
139
|
+
x: o.x + o.width,
|
|
140
|
+
y: u
|
|
141
|
+
};
|
|
142
|
+
break;
|
|
143
|
+
case "left":
|
|
144
|
+
d = {
|
|
145
|
+
x: o.x - r.width,
|
|
146
|
+
y: u
|
|
147
|
+
};
|
|
148
|
+
break;
|
|
149
|
+
default:
|
|
150
|
+
d = {
|
|
151
|
+
x: o.x,
|
|
152
|
+
y: o.y
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
switch (tt(e)) {
|
|
156
|
+
case "start":
|
|
157
|
+
d[s] -= p * (n && a ? -1 : 1);
|
|
158
|
+
break;
|
|
159
|
+
case "end":
|
|
160
|
+
d[s] += p * (n && a ? -1 : 1);
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
return d;
|
|
164
|
+
}
|
|
165
|
+
const He = async (t, e, n) => {
|
|
166
|
+
const {
|
|
167
|
+
placement: o = "bottom",
|
|
168
|
+
strategy: r = "absolute",
|
|
169
|
+
middleware: i = [],
|
|
170
|
+
platform: s
|
|
171
|
+
} = n, c = i.filter(Boolean), l = await (s.isRTL == null ? void 0 : s.isRTL(e));
|
|
172
|
+
let a = await s.getElementRects({
|
|
173
|
+
reference: t,
|
|
174
|
+
floating: e,
|
|
175
|
+
strategy: r
|
|
176
|
+
}), {
|
|
177
|
+
x: f,
|
|
178
|
+
y: u
|
|
179
|
+
} = Nt(a, o, l), p = o, d = {}, m = 0;
|
|
180
|
+
for (let h = 0; h < c.length; h++) {
|
|
181
|
+
const {
|
|
182
|
+
name: w,
|
|
183
|
+
fn: g
|
|
184
|
+
} = c[h], {
|
|
185
|
+
x,
|
|
186
|
+
y: b,
|
|
187
|
+
data: y,
|
|
188
|
+
reset: v
|
|
189
|
+
} = await g({
|
|
190
|
+
x: f,
|
|
191
|
+
y: u,
|
|
192
|
+
initialPlacement: o,
|
|
193
|
+
placement: p,
|
|
194
|
+
strategy: r,
|
|
195
|
+
middlewareData: d,
|
|
196
|
+
rects: a,
|
|
197
|
+
platform: s,
|
|
198
|
+
elements: {
|
|
199
|
+
reference: t,
|
|
200
|
+
floating: e
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
f = x ?? f, u = b ?? u, d = {
|
|
204
|
+
...d,
|
|
205
|
+
[w]: {
|
|
206
|
+
...d[w],
|
|
207
|
+
...y
|
|
208
|
+
}
|
|
209
|
+
}, v && m <= 50 && (m++, typeof v == "object" && (v.placement && (p = v.placement), v.rects && (a = v.rects === !0 ? await s.getElementRects({
|
|
210
|
+
reference: t,
|
|
211
|
+
floating: e,
|
|
212
|
+
strategy: r
|
|
213
|
+
}) : v.rects), {
|
|
214
|
+
x: f,
|
|
215
|
+
y: u
|
|
216
|
+
} = Nt(a, p, l)), h = -1);
|
|
217
|
+
}
|
|
218
|
+
return {
|
|
219
|
+
x: f,
|
|
220
|
+
y: u,
|
|
221
|
+
placement: p,
|
|
222
|
+
strategy: r,
|
|
223
|
+
middlewareData: d
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
async function ot(t, e) {
|
|
227
|
+
var n;
|
|
228
|
+
e === void 0 && (e = {});
|
|
229
|
+
const {
|
|
230
|
+
x: o,
|
|
231
|
+
y: r,
|
|
232
|
+
platform: i,
|
|
233
|
+
rects: s,
|
|
234
|
+
elements: c,
|
|
235
|
+
strategy: l
|
|
236
|
+
} = t, {
|
|
237
|
+
boundary: a = "clippingAncestors",
|
|
238
|
+
rootBoundary: f = "viewport",
|
|
239
|
+
elementContext: u = "floating",
|
|
240
|
+
altBoundary: p = !1,
|
|
241
|
+
padding: d = 0
|
|
242
|
+
} = q(e, t), m = Yt(d), w = c[p ? u === "floating" ? "reference" : "floating" : u], g = ut(await i.getClippingRect({
|
|
243
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(w))) == null || n ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
244
|
+
boundary: a,
|
|
245
|
+
rootBoundary: f,
|
|
246
|
+
strategy: l
|
|
247
|
+
})), x = u === "floating" ? {
|
|
248
|
+
x: o,
|
|
249
|
+
y: r,
|
|
250
|
+
width: s.floating.width,
|
|
251
|
+
height: s.floating.height
|
|
252
|
+
} : s.reference, b = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), y = await (i.isElement == null ? void 0 : i.isElement(b)) ? await (i.getScale == null ? void 0 : i.getScale(b)) || {
|
|
253
|
+
x: 1,
|
|
254
|
+
y: 1
|
|
255
|
+
} : {
|
|
256
|
+
x: 1,
|
|
257
|
+
y: 1
|
|
258
|
+
}, v = ut(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
259
|
+
elements: c,
|
|
260
|
+
rect: x,
|
|
261
|
+
offsetParent: b,
|
|
262
|
+
strategy: l
|
|
263
|
+
}) : x);
|
|
264
|
+
return {
|
|
265
|
+
top: (g.top - v.top + m.top) / y.y,
|
|
266
|
+
bottom: (v.bottom - g.bottom + m.bottom) / y.y,
|
|
267
|
+
left: (g.left - v.left + m.left) / y.x,
|
|
268
|
+
right: (v.right - g.right + m.right) / y.x
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
const _e = (t) => ({
|
|
272
|
+
name: "arrow",
|
|
273
|
+
options: t,
|
|
274
|
+
async fn(e) {
|
|
275
|
+
const {
|
|
276
|
+
x: n,
|
|
277
|
+
y: o,
|
|
278
|
+
placement: r,
|
|
279
|
+
rects: i,
|
|
280
|
+
platform: s,
|
|
281
|
+
elements: c,
|
|
282
|
+
middlewareData: l
|
|
283
|
+
} = e, {
|
|
284
|
+
element: a,
|
|
285
|
+
padding: f = 0
|
|
286
|
+
} = q(t, e) || {};
|
|
287
|
+
if (a == null)
|
|
288
|
+
return {};
|
|
289
|
+
const u = Yt(f), p = {
|
|
290
|
+
x: n,
|
|
291
|
+
y: o
|
|
292
|
+
}, d = Pt(r), m = Ct(d), h = await s.getDimensions(a), w = d === "y", g = w ? "top" : "left", x = w ? "bottom" : "right", b = w ? "clientHeight" : "clientWidth", y = i.reference[m] + i.reference[d] - p[d] - i.floating[m], v = p[d] - i.reference[d], P = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a));
|
|
293
|
+
let C = P ? P[b] : 0;
|
|
294
|
+
(!C || !await (s.isElement == null ? void 0 : s.isElement(P))) && (C = c.floating[b] || i.floating[m]);
|
|
295
|
+
const M = y / 2 - v / 2, F = C / 2 - h[m] / 2 - 1, D = Z(u[g], F), $ = Z(u[x], F), k = D, S = C - h[m] - $, O = C / 2 - h[m] / 2 + M, N = yt(k, O, S), E = !l.arrow && tt(r) != null && O !== N && i.reference[m] / 2 - (O < k ? D : $) - h[m] / 2 < 0, L = E ? O < k ? O - k : O - S : 0;
|
|
296
|
+
return {
|
|
297
|
+
[d]: p[d] + L,
|
|
298
|
+
data: {
|
|
299
|
+
[d]: N,
|
|
300
|
+
centerOffset: O - N - L,
|
|
301
|
+
...E && {
|
|
302
|
+
alignmentOffset: L
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
reset: E
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
}), Be = function(t) {
|
|
309
|
+
return t === void 0 && (t = {}), {
|
|
310
|
+
name: "flip",
|
|
311
|
+
options: t,
|
|
312
|
+
async fn(e) {
|
|
313
|
+
var n, o;
|
|
314
|
+
const {
|
|
315
|
+
placement: r,
|
|
316
|
+
middlewareData: i,
|
|
317
|
+
rects: s,
|
|
318
|
+
initialPlacement: c,
|
|
319
|
+
platform: l,
|
|
320
|
+
elements: a
|
|
321
|
+
} = e, {
|
|
322
|
+
mainAxis: f = !0,
|
|
323
|
+
crossAxis: u = !0,
|
|
324
|
+
fallbackPlacements: p,
|
|
325
|
+
fallbackStrategy: d = "bestFit",
|
|
326
|
+
fallbackAxisSideDirection: m = "none",
|
|
327
|
+
flipAlignment: h = !0,
|
|
328
|
+
...w
|
|
329
|
+
} = q(t, e);
|
|
330
|
+
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
331
|
+
return {};
|
|
332
|
+
const g = U(r), x = j(c), b = U(c) === c, y = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), v = p || (b || !h ? [ft(c)] : Te(c)), P = m !== "none";
|
|
333
|
+
!p && P && v.push(...Ne(c, h, m, y));
|
|
334
|
+
const C = [c, ...v], M = await ot(e, w), F = [];
|
|
335
|
+
let D = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
336
|
+
if (f && F.push(M[g]), u) {
|
|
337
|
+
const O = Me(r, s, y);
|
|
338
|
+
F.push(M[O[0]], M[O[1]]);
|
|
339
|
+
}
|
|
340
|
+
if (D = [...D, {
|
|
341
|
+
placement: r,
|
|
342
|
+
overflows: F
|
|
343
|
+
}], !F.every((O) => O <= 0)) {
|
|
344
|
+
var $, k;
|
|
345
|
+
const O = ((($ = i.flip) == null ? void 0 : $.index) || 0) + 1, N = C[O];
|
|
346
|
+
if (N && (!(u === "alignment" ? x !== j(N) : !1) || // We leave the current main axis only if every placement on that axis
|
|
347
|
+
// overflows the main axis.
|
|
348
|
+
D.every((A) => j(A.placement) === x ? A.overflows[0] > 0 : !0)))
|
|
349
|
+
return {
|
|
350
|
+
data: {
|
|
351
|
+
index: O,
|
|
352
|
+
overflows: D
|
|
353
|
+
},
|
|
354
|
+
reset: {
|
|
355
|
+
placement: N
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
let E = (k = D.filter((L) => L.overflows[0] <= 0).sort((L, A) => L.overflows[1] - A.overflows[1])[0]) == null ? void 0 : k.placement;
|
|
359
|
+
if (!E)
|
|
360
|
+
switch (d) {
|
|
361
|
+
case "bestFit": {
|
|
362
|
+
var S;
|
|
363
|
+
const L = (S = D.filter((A) => {
|
|
364
|
+
if (P) {
|
|
365
|
+
const T = j(A.placement);
|
|
366
|
+
return T === x || // Create a bias to the `y` side axis due to horizontal
|
|
367
|
+
// reading directions favoring greater width.
|
|
368
|
+
T === "y";
|
|
369
|
+
}
|
|
370
|
+
return !0;
|
|
371
|
+
}).map((A) => [A.placement, A.overflows.filter((T) => T > 0).reduce((T, V) => T + V, 0)]).sort((A, T) => A[1] - T[1])[0]) == null ? void 0 : S[0];
|
|
372
|
+
L && (E = L);
|
|
373
|
+
break;
|
|
374
|
+
}
|
|
375
|
+
case "initialPlacement":
|
|
376
|
+
E = c;
|
|
377
|
+
break;
|
|
378
|
+
}
|
|
379
|
+
if (r !== E)
|
|
380
|
+
return {
|
|
381
|
+
reset: {
|
|
382
|
+
placement: E
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
return {};
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
function Wt(t, e) {
|
|
391
|
+
return {
|
|
392
|
+
top: t.top - e.height,
|
|
393
|
+
right: t.right - e.width,
|
|
394
|
+
bottom: t.bottom - e.height,
|
|
395
|
+
left: t.left - e.width
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
function Ht(t) {
|
|
399
|
+
return Se.some((e) => t[e] >= 0);
|
|
400
|
+
}
|
|
401
|
+
const Ve = function(t) {
|
|
402
|
+
return t === void 0 && (t = {}), {
|
|
403
|
+
name: "hide",
|
|
404
|
+
options: t,
|
|
405
|
+
async fn(e) {
|
|
406
|
+
const {
|
|
407
|
+
rects: n
|
|
408
|
+
} = e, {
|
|
409
|
+
strategy: o = "referenceHidden",
|
|
410
|
+
...r
|
|
411
|
+
} = q(t, e);
|
|
412
|
+
switch (o) {
|
|
413
|
+
case "referenceHidden": {
|
|
414
|
+
const i = await ot(e, {
|
|
415
|
+
...r,
|
|
416
|
+
elementContext: "reference"
|
|
417
|
+
}), s = Wt(i, n.reference);
|
|
418
|
+
return {
|
|
419
|
+
data: {
|
|
420
|
+
referenceHiddenOffsets: s,
|
|
421
|
+
referenceHidden: Ht(s)
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
case "escaped": {
|
|
426
|
+
const i = await ot(e, {
|
|
427
|
+
...r,
|
|
428
|
+
altBoundary: !0
|
|
429
|
+
}), s = Wt(i, n.floating);
|
|
430
|
+
return {
|
|
431
|
+
data: {
|
|
432
|
+
escapedOffsets: s,
|
|
433
|
+
escaped: Ht(s)
|
|
434
|
+
}
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
default:
|
|
438
|
+
return {};
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
};
|
|
442
|
+
}, qt = /* @__PURE__ */ new Set(["left", "top"]);
|
|
443
|
+
async function je(t, e) {
|
|
444
|
+
const {
|
|
445
|
+
placement: n,
|
|
446
|
+
platform: o,
|
|
447
|
+
elements: r
|
|
448
|
+
} = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = U(n), c = tt(n), l = j(n) === "y", a = qt.has(s) ? -1 : 1, f = i && l ? -1 : 1, u = q(e, t);
|
|
449
|
+
let {
|
|
450
|
+
mainAxis: p,
|
|
451
|
+
crossAxis: d,
|
|
452
|
+
alignmentAxis: m
|
|
453
|
+
} = typeof u == "number" ? {
|
|
454
|
+
mainAxis: u,
|
|
455
|
+
crossAxis: 0,
|
|
456
|
+
alignmentAxis: null
|
|
457
|
+
} : {
|
|
458
|
+
mainAxis: u.mainAxis || 0,
|
|
459
|
+
crossAxis: u.crossAxis || 0,
|
|
460
|
+
alignmentAxis: u.alignmentAxis
|
|
461
|
+
};
|
|
462
|
+
return c && typeof m == "number" && (d = c === "end" ? m * -1 : m), l ? {
|
|
463
|
+
x: d * f,
|
|
464
|
+
y: p * a
|
|
465
|
+
} : {
|
|
466
|
+
x: p * a,
|
|
467
|
+
y: d * f
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
const ze = function(t) {
|
|
471
|
+
return t === void 0 && (t = 0), {
|
|
472
|
+
name: "offset",
|
|
473
|
+
options: t,
|
|
474
|
+
async fn(e) {
|
|
475
|
+
var n, o;
|
|
476
|
+
const {
|
|
477
|
+
x: r,
|
|
478
|
+
y: i,
|
|
479
|
+
placement: s,
|
|
480
|
+
middlewareData: c
|
|
481
|
+
} = e, l = await je(e, t);
|
|
482
|
+
return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
|
|
483
|
+
x: r + l.x,
|
|
484
|
+
y: i + l.y,
|
|
485
|
+
data: {
|
|
486
|
+
...l,
|
|
487
|
+
placement: s
|
|
488
|
+
}
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
};
|
|
492
|
+
}, Ie = function(t) {
|
|
493
|
+
return t === void 0 && (t = {}), {
|
|
494
|
+
name: "shift",
|
|
495
|
+
options: t,
|
|
496
|
+
async fn(e) {
|
|
497
|
+
const {
|
|
498
|
+
x: n,
|
|
499
|
+
y: o,
|
|
500
|
+
placement: r
|
|
501
|
+
} = e, {
|
|
502
|
+
mainAxis: i = !0,
|
|
503
|
+
crossAxis: s = !1,
|
|
504
|
+
limiter: c = {
|
|
505
|
+
fn: (w) => {
|
|
506
|
+
let {
|
|
507
|
+
x: g,
|
|
508
|
+
y: x
|
|
509
|
+
} = w;
|
|
510
|
+
return {
|
|
511
|
+
x: g,
|
|
512
|
+
y: x
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
...l
|
|
517
|
+
} = q(t, e), a = {
|
|
518
|
+
x: n,
|
|
519
|
+
y: o
|
|
520
|
+
}, f = await ot(e, l), u = j(U(r)), p = Rt(u);
|
|
521
|
+
let d = a[p], m = a[u];
|
|
522
|
+
if (i) {
|
|
523
|
+
const w = p === "y" ? "top" : "left", g = p === "y" ? "bottom" : "right", x = d + f[w], b = d - f[g];
|
|
524
|
+
d = yt(x, d, b);
|
|
525
|
+
}
|
|
526
|
+
if (s) {
|
|
527
|
+
const w = u === "y" ? "top" : "left", g = u === "y" ? "bottom" : "right", x = m + f[w], b = m - f[g];
|
|
528
|
+
m = yt(x, m, b);
|
|
529
|
+
}
|
|
530
|
+
const h = c.fn({
|
|
531
|
+
...e,
|
|
532
|
+
[p]: d,
|
|
533
|
+
[u]: m
|
|
534
|
+
});
|
|
535
|
+
return {
|
|
536
|
+
...h,
|
|
537
|
+
data: {
|
|
538
|
+
x: h.x - n,
|
|
539
|
+
y: h.y - o,
|
|
540
|
+
enabled: {
|
|
541
|
+
[p]: i,
|
|
542
|
+
[u]: s
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
}, Xe = function(t) {
|
|
549
|
+
return t === void 0 && (t = {}), {
|
|
550
|
+
options: t,
|
|
551
|
+
fn(e) {
|
|
552
|
+
const {
|
|
553
|
+
x: n,
|
|
554
|
+
y: o,
|
|
555
|
+
placement: r,
|
|
556
|
+
rects: i,
|
|
557
|
+
middlewareData: s
|
|
558
|
+
} = e, {
|
|
559
|
+
offset: c = 0,
|
|
560
|
+
mainAxis: l = !0,
|
|
561
|
+
crossAxis: a = !0
|
|
562
|
+
} = q(t, e), f = {
|
|
563
|
+
x: n,
|
|
564
|
+
y: o
|
|
565
|
+
}, u = j(r), p = Rt(u);
|
|
566
|
+
let d = f[p], m = f[u];
|
|
567
|
+
const h = q(c, e), w = typeof h == "number" ? {
|
|
568
|
+
mainAxis: h,
|
|
569
|
+
crossAxis: 0
|
|
570
|
+
} : {
|
|
571
|
+
mainAxis: 0,
|
|
572
|
+
crossAxis: 0,
|
|
573
|
+
...h
|
|
574
|
+
};
|
|
575
|
+
if (l) {
|
|
576
|
+
const b = p === "y" ? "height" : "width", y = i.reference[p] - i.floating[b] + w.mainAxis, v = i.reference[p] + i.reference[b] - w.mainAxis;
|
|
577
|
+
d < y ? d = y : d > v && (d = v);
|
|
578
|
+
}
|
|
579
|
+
if (a) {
|
|
580
|
+
var g, x;
|
|
581
|
+
const b = p === "y" ? "width" : "height", y = qt.has(U(r)), v = i.reference[u] - i.floating[b] + (y && ((g = s.offset) == null ? void 0 : g[u]) || 0) + (y ? 0 : w.crossAxis), P = i.reference[u] + i.reference[b] + (y ? 0 : ((x = s.offset) == null ? void 0 : x[u]) || 0) - (y ? w.crossAxis : 0);
|
|
582
|
+
m < v ? m = v : m > P && (m = P);
|
|
583
|
+
}
|
|
584
|
+
return {
|
|
585
|
+
[p]: d,
|
|
586
|
+
[u]: m
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
};
|
|
590
|
+
}, Ye = function(t) {
|
|
591
|
+
return t === void 0 && (t = {}), {
|
|
592
|
+
name: "size",
|
|
593
|
+
options: t,
|
|
594
|
+
async fn(e) {
|
|
595
|
+
var n, o;
|
|
596
|
+
const {
|
|
597
|
+
placement: r,
|
|
598
|
+
rects: i,
|
|
599
|
+
platform: s,
|
|
600
|
+
elements: c
|
|
601
|
+
} = e, {
|
|
602
|
+
apply: l = () => {
|
|
603
|
+
},
|
|
604
|
+
...a
|
|
605
|
+
} = q(t, e), f = await ot(e, a), u = U(r), p = tt(r), d = j(r) === "y", {
|
|
606
|
+
width: m,
|
|
607
|
+
height: h
|
|
608
|
+
} = i.floating;
|
|
609
|
+
let w, g;
|
|
610
|
+
u === "top" || u === "bottom" ? (w = u, g = p === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (g = u, w = p === "end" ? "top" : "bottom");
|
|
611
|
+
const x = h - f.top - f.bottom, b = m - f.left - f.right, y = Z(h - f[w], x), v = Z(m - f[g], b), P = !e.middlewareData.shift;
|
|
612
|
+
let C = y, M = v;
|
|
613
|
+
if ((n = e.middlewareData.shift) != null && n.enabled.x && (M = b), (o = e.middlewareData.shift) != null && o.enabled.y && (C = x), P && !p) {
|
|
614
|
+
const D = W(f.left, 0), $ = W(f.right, 0), k = W(f.top, 0), S = W(f.bottom, 0);
|
|
615
|
+
d ? M = m - 2 * (D !== 0 || $ !== 0 ? D + $ : W(f.left, f.right)) : C = h - 2 * (k !== 0 || S !== 0 ? k + S : W(f.top, f.bottom));
|
|
616
|
+
}
|
|
617
|
+
await l({
|
|
618
|
+
...e,
|
|
619
|
+
availableWidth: M,
|
|
620
|
+
availableHeight: C
|
|
621
|
+
});
|
|
622
|
+
const F = await s.getDimensions(c.floating);
|
|
623
|
+
return m !== F.width || h !== F.height ? {
|
|
624
|
+
reset: {
|
|
625
|
+
rects: !0
|
|
626
|
+
}
|
|
627
|
+
} : {};
|
|
628
|
+
}
|
|
629
|
+
};
|
|
630
|
+
};
|
|
631
|
+
function mt() {
|
|
632
|
+
return typeof window < "u";
|
|
633
|
+
}
|
|
634
|
+
function et(t) {
|
|
635
|
+
return Ut(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
636
|
+
}
|
|
637
|
+
function H(t) {
|
|
638
|
+
var e;
|
|
639
|
+
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
640
|
+
}
|
|
641
|
+
function X(t) {
|
|
642
|
+
var e;
|
|
643
|
+
return (e = (Ut(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
644
|
+
}
|
|
645
|
+
function Ut(t) {
|
|
646
|
+
return mt() ? t instanceof Node || t instanceof H(t).Node : !1;
|
|
647
|
+
}
|
|
648
|
+
function _(t) {
|
|
649
|
+
return mt() ? t instanceof Element || t instanceof H(t).Element : !1;
|
|
650
|
+
}
|
|
651
|
+
function I(t) {
|
|
652
|
+
return mt() ? t instanceof HTMLElement || t instanceof H(t).HTMLElement : !1;
|
|
653
|
+
}
|
|
654
|
+
function _t(t) {
|
|
655
|
+
return !mt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof H(t).ShadowRoot;
|
|
656
|
+
}
|
|
657
|
+
const qe = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
658
|
+
function it(t) {
|
|
659
|
+
const {
|
|
660
|
+
overflow: e,
|
|
661
|
+
overflowX: n,
|
|
662
|
+
overflowY: o,
|
|
663
|
+
display: r
|
|
664
|
+
} = B(t);
|
|
665
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !qe.has(r);
|
|
666
|
+
}
|
|
667
|
+
const Ue = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
668
|
+
function Ze(t) {
|
|
669
|
+
return Ue.has(et(t));
|
|
670
|
+
}
|
|
671
|
+
const Ke = [":popover-open", ":modal"];
|
|
672
|
+
function pt(t) {
|
|
673
|
+
return Ke.some((e) => {
|
|
674
|
+
try {
|
|
675
|
+
return t.matches(e);
|
|
676
|
+
} catch {
|
|
677
|
+
return !1;
|
|
678
|
+
}
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
const Ge = ["transform", "translate", "scale", "rotate", "perspective"], Je = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Qe = ["paint", "layout", "strict", "content"];
|
|
682
|
+
function Ot(t) {
|
|
683
|
+
const e = St(), n = _(t) ? B(t) : t;
|
|
684
|
+
return Ge.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || Je.some((o) => (n.willChange || "").includes(o)) || Qe.some((o) => (n.contain || "").includes(o));
|
|
685
|
+
}
|
|
686
|
+
function tn(t) {
|
|
687
|
+
let e = K(t);
|
|
688
|
+
for (; I(e) && !Q(e); ) {
|
|
689
|
+
if (Ot(e))
|
|
690
|
+
return e;
|
|
691
|
+
if (pt(e))
|
|
692
|
+
return null;
|
|
693
|
+
e = K(e);
|
|
694
|
+
}
|
|
695
|
+
return null;
|
|
696
|
+
}
|
|
697
|
+
function St() {
|
|
698
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
699
|
+
}
|
|
700
|
+
const en = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
701
|
+
function Q(t) {
|
|
702
|
+
return en.has(et(t));
|
|
703
|
+
}
|
|
704
|
+
function B(t) {
|
|
705
|
+
return H(t).getComputedStyle(t);
|
|
706
|
+
}
|
|
707
|
+
function ht(t) {
|
|
708
|
+
return _(t) ? {
|
|
709
|
+
scrollLeft: t.scrollLeft,
|
|
710
|
+
scrollTop: t.scrollTop
|
|
711
|
+
} : {
|
|
712
|
+
scrollLeft: t.scrollX,
|
|
713
|
+
scrollTop: t.scrollY
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
function K(t) {
|
|
717
|
+
if (et(t) === "html")
|
|
718
|
+
return t;
|
|
719
|
+
const e = (
|
|
720
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
721
|
+
t.assignedSlot || // DOM Element detected.
|
|
722
|
+
t.parentNode || // ShadowRoot detected.
|
|
723
|
+
_t(t) && t.host || // Fallback.
|
|
724
|
+
X(t)
|
|
725
|
+
);
|
|
726
|
+
return _t(e) ? e.host : e;
|
|
727
|
+
}
|
|
728
|
+
function Zt(t) {
|
|
729
|
+
const e = K(t);
|
|
730
|
+
return Q(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : I(e) && it(e) ? e : Zt(e);
|
|
731
|
+
}
|
|
732
|
+
function rt(t, e, n) {
|
|
733
|
+
var o;
|
|
734
|
+
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
735
|
+
const r = Zt(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = H(r);
|
|
736
|
+
if (i) {
|
|
737
|
+
const c = bt(s);
|
|
738
|
+
return e.concat(s, s.visualViewport || [], it(r) ? r : [], c && n ? rt(c) : []);
|
|
739
|
+
}
|
|
740
|
+
return e.concat(r, rt(r, [], n));
|
|
741
|
+
}
|
|
742
|
+
function bt(t) {
|
|
743
|
+
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
744
|
+
}
|
|
745
|
+
function Kt(t) {
|
|
746
|
+
const e = B(t);
|
|
747
|
+
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
748
|
+
const r = I(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = at(n) !== i || at(o) !== s;
|
|
749
|
+
return c && (n = i, o = s), {
|
|
750
|
+
width: n,
|
|
751
|
+
height: o,
|
|
752
|
+
$: c
|
|
753
|
+
};
|
|
754
|
+
}
|
|
755
|
+
function Et(t) {
|
|
756
|
+
return _(t) ? t : t.contextElement;
|
|
757
|
+
}
|
|
758
|
+
function J(t) {
|
|
759
|
+
const e = Et(t);
|
|
760
|
+
if (!I(e))
|
|
761
|
+
return z(1);
|
|
762
|
+
const n = e.getBoundingClientRect(), {
|
|
763
|
+
width: o,
|
|
764
|
+
height: r,
|
|
765
|
+
$: i
|
|
766
|
+
} = Kt(e);
|
|
767
|
+
let s = (i ? at(n.width) : n.width) / o, c = (i ? at(n.height) : n.height) / r;
|
|
768
|
+
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
769
|
+
x: s,
|
|
770
|
+
y: c
|
|
771
|
+
};
|
|
772
|
+
}
|
|
773
|
+
const nn = /* @__PURE__ */ z(0);
|
|
774
|
+
function Gt(t) {
|
|
775
|
+
const e = H(t);
|
|
776
|
+
return !St() || !e.visualViewport ? nn : {
|
|
777
|
+
x: e.visualViewport.offsetLeft,
|
|
778
|
+
y: e.visualViewport.offsetTop
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
function on(t, e, n) {
|
|
782
|
+
return e === void 0 && (e = !1), !n || e && n !== H(t) ? !1 : e;
|
|
783
|
+
}
|
|
784
|
+
function G(t, e, n, o) {
|
|
785
|
+
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
786
|
+
const r = t.getBoundingClientRect(), i = Et(t);
|
|
787
|
+
let s = z(1);
|
|
788
|
+
e && (o ? _(o) && (s = J(o)) : s = J(t));
|
|
789
|
+
const c = on(i, n, o) ? Gt(i) : z(0);
|
|
790
|
+
let l = (r.left + c.x) / s.x, a = (r.top + c.y) / s.y, f = r.width / s.x, u = r.height / s.y;
|
|
791
|
+
if (i) {
|
|
792
|
+
const p = H(i), d = o && _(o) ? H(o) : o;
|
|
793
|
+
let m = p, h = bt(m);
|
|
794
|
+
for (; h && o && d !== m; ) {
|
|
795
|
+
const w = J(h), g = h.getBoundingClientRect(), x = B(h), b = g.left + (h.clientLeft + parseFloat(x.paddingLeft)) * w.x, y = g.top + (h.clientTop + parseFloat(x.paddingTop)) * w.y;
|
|
796
|
+
l *= w.x, a *= w.y, f *= w.x, u *= w.y, l += b, a += y, m = H(h), h = bt(m);
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
return ut({
|
|
800
|
+
width: f,
|
|
801
|
+
height: u,
|
|
802
|
+
x: l,
|
|
803
|
+
y: a
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
function gt(t, e) {
|
|
807
|
+
const n = ht(t).scrollLeft;
|
|
808
|
+
return e ? e.left + n : G(X(t)).left + n;
|
|
809
|
+
}
|
|
810
|
+
function Jt(t, e) {
|
|
811
|
+
const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - gt(t, n), r = n.top + e.scrollTop;
|
|
812
|
+
return {
|
|
813
|
+
x: o,
|
|
814
|
+
y: r
|
|
815
|
+
};
|
|
816
|
+
}
|
|
817
|
+
function rn(t) {
|
|
818
|
+
let {
|
|
819
|
+
elements: e,
|
|
820
|
+
rect: n,
|
|
821
|
+
offsetParent: o,
|
|
822
|
+
strategy: r
|
|
823
|
+
} = t;
|
|
824
|
+
const i = r === "fixed", s = X(o), c = e ? pt(e.floating) : !1;
|
|
825
|
+
if (o === s || c && i)
|
|
826
|
+
return n;
|
|
827
|
+
let l = {
|
|
828
|
+
scrollLeft: 0,
|
|
829
|
+
scrollTop: 0
|
|
830
|
+
}, a = z(1);
|
|
831
|
+
const f = z(0), u = I(o);
|
|
832
|
+
if ((u || !u && !i) && ((et(o) !== "body" || it(s)) && (l = ht(o)), I(o))) {
|
|
833
|
+
const d = G(o);
|
|
834
|
+
a = J(o), f.x = d.x + o.clientLeft, f.y = d.y + o.clientTop;
|
|
835
|
+
}
|
|
836
|
+
const p = s && !u && !i ? Jt(s, l) : z(0);
|
|
837
|
+
return {
|
|
838
|
+
width: n.width * a.x,
|
|
839
|
+
height: n.height * a.y,
|
|
840
|
+
x: n.x * a.x - l.scrollLeft * a.x + f.x + p.x,
|
|
841
|
+
y: n.y * a.y - l.scrollTop * a.y + f.y + p.y
|
|
842
|
+
};
|
|
843
|
+
}
|
|
844
|
+
function sn(t) {
|
|
845
|
+
return Array.from(t.getClientRects());
|
|
846
|
+
}
|
|
847
|
+
function cn(t) {
|
|
848
|
+
const e = X(t), n = ht(t), o = t.ownerDocument.body, r = W(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = W(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
849
|
+
let s = -n.scrollLeft + gt(t);
|
|
850
|
+
const c = -n.scrollTop;
|
|
851
|
+
return B(o).direction === "rtl" && (s += W(e.clientWidth, o.clientWidth) - r), {
|
|
852
|
+
width: r,
|
|
853
|
+
height: i,
|
|
854
|
+
x: s,
|
|
855
|
+
y: c
|
|
856
|
+
};
|
|
857
|
+
}
|
|
858
|
+
const Bt = 25;
|
|
859
|
+
function ln(t, e) {
|
|
860
|
+
const n = H(t), o = X(t), r = n.visualViewport;
|
|
861
|
+
let i = o.clientWidth, s = o.clientHeight, c = 0, l = 0;
|
|
862
|
+
if (r) {
|
|
863
|
+
i = r.width, s = r.height;
|
|
864
|
+
const f = St();
|
|
865
|
+
(!f || f && e === "fixed") && (c = r.offsetLeft, l = r.offsetTop);
|
|
866
|
+
}
|
|
867
|
+
const a = gt(o);
|
|
868
|
+
if (a <= 0) {
|
|
869
|
+
const f = o.ownerDocument, u = f.body, p = getComputedStyle(u), d = f.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, m = Math.abs(o.clientWidth - u.clientWidth - d);
|
|
870
|
+
m <= Bt && (i -= m);
|
|
871
|
+
} else a <= Bt && (i += a);
|
|
872
|
+
return {
|
|
873
|
+
width: i,
|
|
874
|
+
height: s,
|
|
875
|
+
x: c,
|
|
876
|
+
y: l
|
|
877
|
+
};
|
|
878
|
+
}
|
|
879
|
+
const an = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
880
|
+
function fn(t, e) {
|
|
881
|
+
const n = G(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = I(t) ? J(t) : z(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, l = r * i.x, a = o * i.y;
|
|
882
|
+
return {
|
|
883
|
+
width: s,
|
|
884
|
+
height: c,
|
|
885
|
+
x: l,
|
|
886
|
+
y: a
|
|
887
|
+
};
|
|
888
|
+
}
|
|
889
|
+
function Vt(t, e, n) {
|
|
890
|
+
let o;
|
|
891
|
+
if (e === "viewport")
|
|
892
|
+
o = ln(t, n);
|
|
893
|
+
else if (e === "document")
|
|
894
|
+
o = cn(X(t));
|
|
895
|
+
else if (_(e))
|
|
896
|
+
o = fn(e, n);
|
|
897
|
+
else {
|
|
898
|
+
const r = Gt(t);
|
|
899
|
+
o = {
|
|
900
|
+
x: e.x - r.x,
|
|
901
|
+
y: e.y - r.y,
|
|
902
|
+
width: e.width,
|
|
903
|
+
height: e.height
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
return ut(o);
|
|
907
|
+
}
|
|
908
|
+
function Qt(t, e) {
|
|
909
|
+
const n = K(t);
|
|
910
|
+
return n === e || !_(n) || Q(n) ? !1 : B(n).position === "fixed" || Qt(n, e);
|
|
911
|
+
}
|
|
912
|
+
function un(t, e) {
|
|
913
|
+
const n = e.get(t);
|
|
914
|
+
if (n)
|
|
915
|
+
return n;
|
|
916
|
+
let o = rt(t, [], !1).filter((c) => _(c) && et(c) !== "body"), r = null;
|
|
917
|
+
const i = B(t).position === "fixed";
|
|
918
|
+
let s = i ? K(t) : t;
|
|
919
|
+
for (; _(s) && !Q(s); ) {
|
|
920
|
+
const c = B(s), l = Ot(s);
|
|
921
|
+
!l && c.position === "fixed" && (r = null), (i ? !l && !r : !l && c.position === "static" && !!r && an.has(r.position) || it(s) && !l && Qt(t, s)) ? o = o.filter((f) => f !== s) : r = c, s = K(s);
|
|
922
|
+
}
|
|
923
|
+
return e.set(t, o), o;
|
|
924
|
+
}
|
|
925
|
+
function dn(t) {
|
|
926
|
+
let {
|
|
927
|
+
element: e,
|
|
928
|
+
boundary: n,
|
|
929
|
+
rootBoundary: o,
|
|
930
|
+
strategy: r
|
|
931
|
+
} = t;
|
|
932
|
+
const s = [...n === "clippingAncestors" ? pt(e) ? [] : un(e, this._c) : [].concat(n), o], c = s[0], l = s.reduce((a, f) => {
|
|
933
|
+
const u = Vt(e, f, r);
|
|
934
|
+
return a.top = W(u.top, a.top), a.right = Z(u.right, a.right), a.bottom = Z(u.bottom, a.bottom), a.left = W(u.left, a.left), a;
|
|
935
|
+
}, Vt(e, c, r));
|
|
936
|
+
return {
|
|
937
|
+
width: l.right - l.left,
|
|
938
|
+
height: l.bottom - l.top,
|
|
939
|
+
x: l.left,
|
|
940
|
+
y: l.top
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
function mn(t) {
|
|
944
|
+
const {
|
|
945
|
+
width: e,
|
|
946
|
+
height: n
|
|
947
|
+
} = Kt(t);
|
|
948
|
+
return {
|
|
949
|
+
width: e,
|
|
950
|
+
height: n
|
|
951
|
+
};
|
|
952
|
+
}
|
|
953
|
+
function pn(t, e, n) {
|
|
954
|
+
const o = I(e), r = X(e), i = n === "fixed", s = G(t, !0, i, e);
|
|
955
|
+
let c = {
|
|
956
|
+
scrollLeft: 0,
|
|
957
|
+
scrollTop: 0
|
|
958
|
+
};
|
|
959
|
+
const l = z(0);
|
|
960
|
+
function a() {
|
|
961
|
+
l.x = gt(r);
|
|
962
|
+
}
|
|
963
|
+
if (o || !o && !i)
|
|
964
|
+
if ((et(e) !== "body" || it(r)) && (c = ht(e)), o) {
|
|
965
|
+
const d = G(e, !0, i, e);
|
|
966
|
+
l.x = d.x + e.clientLeft, l.y = d.y + e.clientTop;
|
|
967
|
+
} else r && a();
|
|
968
|
+
i && !o && r && a();
|
|
969
|
+
const f = r && !o && !i ? Jt(r, c) : z(0), u = s.left + c.scrollLeft - l.x - f.x, p = s.top + c.scrollTop - l.y - f.y;
|
|
970
|
+
return {
|
|
971
|
+
x: u,
|
|
972
|
+
y: p,
|
|
973
|
+
width: s.width,
|
|
974
|
+
height: s.height
|
|
975
|
+
};
|
|
976
|
+
}
|
|
977
|
+
function wt(t) {
|
|
978
|
+
return B(t).position === "static";
|
|
979
|
+
}
|
|
980
|
+
function jt(t, e) {
|
|
981
|
+
if (!I(t) || B(t).position === "fixed")
|
|
982
|
+
return null;
|
|
983
|
+
if (e)
|
|
984
|
+
return e(t);
|
|
985
|
+
let n = t.offsetParent;
|
|
986
|
+
return X(t) === n && (n = n.ownerDocument.body), n;
|
|
987
|
+
}
|
|
988
|
+
function te(t, e) {
|
|
989
|
+
const n = H(t);
|
|
990
|
+
if (pt(t))
|
|
991
|
+
return n;
|
|
992
|
+
if (!I(t)) {
|
|
993
|
+
let r = K(t);
|
|
994
|
+
for (; r && !Q(r); ) {
|
|
995
|
+
if (_(r) && !wt(r))
|
|
996
|
+
return r;
|
|
997
|
+
r = K(r);
|
|
998
|
+
}
|
|
999
|
+
return n;
|
|
1000
|
+
}
|
|
1001
|
+
let o = jt(t, e);
|
|
1002
|
+
for (; o && Ze(o) && wt(o); )
|
|
1003
|
+
o = jt(o, e);
|
|
1004
|
+
return o && Q(o) && wt(o) && !Ot(o) ? n : o || tn(t) || n;
|
|
1005
|
+
}
|
|
1006
|
+
const hn = async function(t) {
|
|
1007
|
+
const e = this.getOffsetParent || te, n = this.getDimensions, o = await n(t.floating);
|
|
1008
|
+
return {
|
|
1009
|
+
reference: pn(t.reference, await e(t.floating), t.strategy),
|
|
1010
|
+
floating: {
|
|
1011
|
+
x: 0,
|
|
1012
|
+
y: 0,
|
|
1013
|
+
width: o.width,
|
|
1014
|
+
height: o.height
|
|
1015
|
+
}
|
|
1016
|
+
};
|
|
1017
|
+
};
|
|
1018
|
+
function gn(t) {
|
|
1019
|
+
return B(t).direction === "rtl";
|
|
1020
|
+
}
|
|
1021
|
+
const wn = {
|
|
1022
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: rn,
|
|
1023
|
+
getDocumentElement: X,
|
|
1024
|
+
getClippingRect: dn,
|
|
1025
|
+
getOffsetParent: te,
|
|
1026
|
+
getElementRects: hn,
|
|
1027
|
+
getClientRects: sn,
|
|
1028
|
+
getDimensions: mn,
|
|
1029
|
+
getScale: J,
|
|
1030
|
+
isElement: _,
|
|
1031
|
+
isRTL: gn
|
|
1032
|
+
};
|
|
1033
|
+
function ee(t, e) {
|
|
1034
|
+
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1035
|
+
}
|
|
1036
|
+
function xn(t, e) {
|
|
1037
|
+
let n = null, o;
|
|
1038
|
+
const r = X(t);
|
|
1039
|
+
function i() {
|
|
1040
|
+
var c;
|
|
1041
|
+
clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
|
|
1042
|
+
}
|
|
1043
|
+
function s(c, l) {
|
|
1044
|
+
c === void 0 && (c = !1), l === void 0 && (l = 1), i();
|
|
1045
|
+
const a = t.getBoundingClientRect(), {
|
|
1046
|
+
left: f,
|
|
1047
|
+
top: u,
|
|
1048
|
+
width: p,
|
|
1049
|
+
height: d
|
|
1050
|
+
} = a;
|
|
1051
|
+
if (c || e(), !p || !d)
|
|
1052
|
+
return;
|
|
1053
|
+
const m = ct(u), h = ct(r.clientWidth - (f + p)), w = ct(r.clientHeight - (u + d)), g = ct(f), b = {
|
|
1054
|
+
rootMargin: -m + "px " + -h + "px " + -w + "px " + -g + "px",
|
|
1055
|
+
threshold: W(0, Z(1, l)) || 1
|
|
1056
|
+
};
|
|
1057
|
+
let y = !0;
|
|
1058
|
+
function v(P) {
|
|
1059
|
+
const C = P[0].intersectionRatio;
|
|
1060
|
+
if (C !== l) {
|
|
1061
|
+
if (!y)
|
|
1062
|
+
return s();
|
|
1063
|
+
C ? s(!1, C) : o = setTimeout(() => {
|
|
1064
|
+
s(!1, 1e-7);
|
|
1065
|
+
}, 1e3);
|
|
1066
|
+
}
|
|
1067
|
+
C === 1 && !ee(a, t.getBoundingClientRect()) && s(), y = !1;
|
|
1068
|
+
}
|
|
1069
|
+
try {
|
|
1070
|
+
n = new IntersectionObserver(v, {
|
|
1071
|
+
...b,
|
|
1072
|
+
// Handle <iframe>s
|
|
1073
|
+
root: r.ownerDocument
|
|
1074
|
+
});
|
|
1075
|
+
} catch {
|
|
1076
|
+
n = new IntersectionObserver(v, b);
|
|
1077
|
+
}
|
|
1078
|
+
n.observe(t);
|
|
1079
|
+
}
|
|
1080
|
+
return s(!0), i;
|
|
1081
|
+
}
|
|
1082
|
+
function yn(t, e, n, o) {
|
|
1083
|
+
o === void 0 && (o = {});
|
|
1084
|
+
const {
|
|
1085
|
+
ancestorScroll: r = !0,
|
|
1086
|
+
ancestorResize: i = !0,
|
|
1087
|
+
elementResize: s = typeof ResizeObserver == "function",
|
|
1088
|
+
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1089
|
+
animationFrame: l = !1
|
|
1090
|
+
} = o, a = Et(t), f = r || i ? [...a ? rt(a) : [], ...rt(e)] : [];
|
|
1091
|
+
f.forEach((g) => {
|
|
1092
|
+
r && g.addEventListener("scroll", n, {
|
|
1093
|
+
passive: !0
|
|
1094
|
+
}), i && g.addEventListener("resize", n);
|
|
1095
|
+
});
|
|
1096
|
+
const u = a && c ? xn(a, n) : null;
|
|
1097
|
+
let p = -1, d = null;
|
|
1098
|
+
s && (d = new ResizeObserver((g) => {
|
|
1099
|
+
let [x] = g;
|
|
1100
|
+
x && x.target === a && d && (d.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1101
|
+
var b;
|
|
1102
|
+
(b = d) == null || b.observe(e);
|
|
1103
|
+
})), n();
|
|
1104
|
+
}), a && !l && d.observe(a), d.observe(e));
|
|
1105
|
+
let m, h = l ? G(t) : null;
|
|
1106
|
+
l && w();
|
|
1107
|
+
function w() {
|
|
1108
|
+
const g = G(t);
|
|
1109
|
+
h && !ee(h, g) && n(), h = g, m = requestAnimationFrame(w);
|
|
1110
|
+
}
|
|
1111
|
+
return n(), () => {
|
|
1112
|
+
var g;
|
|
1113
|
+
f.forEach((x) => {
|
|
1114
|
+
r && x.removeEventListener("scroll", n), i && x.removeEventListener("resize", n);
|
|
1115
|
+
}), u?.(), (g = d) == null || g.disconnect(), d = null, l && cancelAnimationFrame(m);
|
|
1116
|
+
};
|
|
1117
|
+
}
|
|
1118
|
+
const vn = ze, bn = Ie, An = Be, Rn = Ye, Cn = Ve, zt = _e, Pn = Xe, On = (t, e, n) => {
|
|
1119
|
+
const o = /* @__PURE__ */ new Map(), r = {
|
|
1120
|
+
platform: wn,
|
|
1121
|
+
...n
|
|
1122
|
+
}, i = {
|
|
1123
|
+
...r.platform,
|
|
1124
|
+
_c: o
|
|
1125
|
+
};
|
|
1126
|
+
return He(t, e, {
|
|
1127
|
+
...r,
|
|
1128
|
+
platform: i
|
|
1129
|
+
});
|
|
1130
|
+
};
|
|
1131
|
+
var Sn = typeof document < "u", En = function() {
|
|
1132
|
+
}, lt = Sn ? Ae : En;
|
|
1133
|
+
function dt(t, e) {
|
|
1134
|
+
if (t === e)
|
|
1135
|
+
return !0;
|
|
1136
|
+
if (typeof t != typeof e)
|
|
1137
|
+
return !1;
|
|
1138
|
+
if (typeof t == "function" && t.toString() === e.toString())
|
|
1139
|
+
return !0;
|
|
1140
|
+
let n, o, r;
|
|
1141
|
+
if (t && e && typeof t == "object") {
|
|
1142
|
+
if (Array.isArray(t)) {
|
|
1143
|
+
if (n = t.length, n !== e.length) return !1;
|
|
1144
|
+
for (o = n; o-- !== 0; )
|
|
1145
|
+
if (!dt(t[o], e[o]))
|
|
1146
|
+
return !1;
|
|
1147
|
+
return !0;
|
|
1148
|
+
}
|
|
1149
|
+
if (r = Object.keys(t), n = r.length, n !== Object.keys(e).length)
|
|
1150
|
+
return !1;
|
|
1151
|
+
for (o = n; o-- !== 0; )
|
|
1152
|
+
if (!{}.hasOwnProperty.call(e, r[o]))
|
|
1153
|
+
return !1;
|
|
1154
|
+
for (o = n; o-- !== 0; ) {
|
|
1155
|
+
const i = r[o];
|
|
1156
|
+
if (!(i === "_owner" && t.$$typeof) && !dt(t[i], e[i]))
|
|
1157
|
+
return !1;
|
|
1158
|
+
}
|
|
1159
|
+
return !0;
|
|
1160
|
+
}
|
|
1161
|
+
return t !== t && e !== e;
|
|
1162
|
+
}
|
|
1163
|
+
function ne(t) {
|
|
1164
|
+
return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1165
|
+
}
|
|
1166
|
+
function It(t, e) {
|
|
1167
|
+
const n = ne(t);
|
|
1168
|
+
return Math.round(e * n) / n;
|
|
1169
|
+
}
|
|
1170
|
+
function xt(t) {
|
|
1171
|
+
const e = R.useRef(t);
|
|
1172
|
+
return lt(() => {
|
|
1173
|
+
e.current = t;
|
|
1174
|
+
}), e;
|
|
1175
|
+
}
|
|
1176
|
+
function Ln(t) {
|
|
1177
|
+
t === void 0 && (t = {});
|
|
1178
|
+
const {
|
|
1179
|
+
placement: e = "bottom",
|
|
1180
|
+
strategy: n = "absolute",
|
|
1181
|
+
middleware: o = [],
|
|
1182
|
+
platform: r,
|
|
1183
|
+
elements: {
|
|
1184
|
+
reference: i,
|
|
1185
|
+
floating: s
|
|
1186
|
+
} = {},
|
|
1187
|
+
transform: c = !0,
|
|
1188
|
+
whileElementsMounted: l,
|
|
1189
|
+
open: a
|
|
1190
|
+
} = t, [f, u] = R.useState({
|
|
1191
|
+
x: 0,
|
|
1192
|
+
y: 0,
|
|
1193
|
+
strategy: n,
|
|
1194
|
+
placement: e,
|
|
1195
|
+
middlewareData: {},
|
|
1196
|
+
isPositioned: !1
|
|
1197
|
+
}), [p, d] = R.useState(o);
|
|
1198
|
+
dt(p, o) || d(o);
|
|
1199
|
+
const [m, h] = R.useState(null), [w, g] = R.useState(null), x = R.useCallback((A) => {
|
|
1200
|
+
A !== P.current && (P.current = A, h(A));
|
|
1201
|
+
}, []), b = R.useCallback((A) => {
|
|
1202
|
+
A !== C.current && (C.current = A, g(A));
|
|
1203
|
+
}, []), y = i || m, v = s || w, P = R.useRef(null), C = R.useRef(null), M = R.useRef(f), F = l != null, D = xt(l), $ = xt(r), k = xt(a), S = R.useCallback(() => {
|
|
1204
|
+
if (!P.current || !C.current)
|
|
1205
|
+
return;
|
|
1206
|
+
const A = {
|
|
1207
|
+
placement: e,
|
|
1208
|
+
strategy: n,
|
|
1209
|
+
middleware: p
|
|
1210
|
+
};
|
|
1211
|
+
$.current && (A.platform = $.current), On(P.current, C.current, A).then((T) => {
|
|
1212
|
+
const V = {
|
|
1213
|
+
...T,
|
|
1214
|
+
// The floating element's position may be recomputed while it's closed
|
|
1215
|
+
// but still mounted (such as when transitioning out). To ensure
|
|
1216
|
+
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1217
|
+
// setting it to `true` when `open === false` (must be specified).
|
|
1218
|
+
isPositioned: k.current !== !1
|
|
1219
|
+
};
|
|
1220
|
+
O.current && !dt(M.current, V) && (M.current = V, Re.flushSync(() => {
|
|
1221
|
+
u(V);
|
|
1222
|
+
}));
|
|
1223
|
+
});
|
|
1224
|
+
}, [p, e, n, $, k]);
|
|
1225
|
+
lt(() => {
|
|
1226
|
+
a === !1 && M.current.isPositioned && (M.current.isPositioned = !1, u((A) => ({
|
|
1227
|
+
...A,
|
|
1228
|
+
isPositioned: !1
|
|
1229
|
+
})));
|
|
1230
|
+
}, [a]);
|
|
1231
|
+
const O = R.useRef(!1);
|
|
1232
|
+
lt(() => (O.current = !0, () => {
|
|
1233
|
+
O.current = !1;
|
|
1234
|
+
}), []), lt(() => {
|
|
1235
|
+
if (y && (P.current = y), v && (C.current = v), y && v) {
|
|
1236
|
+
if (D.current)
|
|
1237
|
+
return D.current(y, v, S);
|
|
1238
|
+
S();
|
|
1239
|
+
}
|
|
1240
|
+
}, [y, v, S, D, F]);
|
|
1241
|
+
const N = R.useMemo(() => ({
|
|
1242
|
+
reference: P,
|
|
1243
|
+
floating: C,
|
|
1244
|
+
setReference: x,
|
|
1245
|
+
setFloating: b
|
|
1246
|
+
}), [x, b]), E = R.useMemo(() => ({
|
|
1247
|
+
reference: y,
|
|
1248
|
+
floating: v
|
|
1249
|
+
}), [y, v]), L = R.useMemo(() => {
|
|
1250
|
+
const A = {
|
|
1251
|
+
position: n,
|
|
1252
|
+
left: 0,
|
|
1253
|
+
top: 0
|
|
1254
|
+
};
|
|
1255
|
+
if (!E.floating)
|
|
1256
|
+
return A;
|
|
1257
|
+
const T = It(E.floating, f.x), V = It(E.floating, f.y);
|
|
1258
|
+
return c ? {
|
|
1259
|
+
...A,
|
|
1260
|
+
transform: "translate(" + T + "px, " + V + "px)",
|
|
1261
|
+
...ne(E.floating) >= 1.5 && {
|
|
1262
|
+
willChange: "transform"
|
|
1263
|
+
}
|
|
1264
|
+
} : {
|
|
1265
|
+
position: n,
|
|
1266
|
+
left: T,
|
|
1267
|
+
top: V
|
|
1268
|
+
};
|
|
1269
|
+
}, [n, c, E.floating, f.x, f.y]);
|
|
1270
|
+
return R.useMemo(() => ({
|
|
1271
|
+
...f,
|
|
1272
|
+
update: S,
|
|
1273
|
+
refs: N,
|
|
1274
|
+
elements: E,
|
|
1275
|
+
floatingStyles: L
|
|
1276
|
+
}), [f, S, N, E, L]);
|
|
1277
|
+
}
|
|
1278
|
+
const Dn = (t) => {
|
|
1279
|
+
function e(n) {
|
|
1280
|
+
return {}.hasOwnProperty.call(n, "current");
|
|
1281
|
+
}
|
|
1282
|
+
return {
|
|
1283
|
+
name: "arrow",
|
|
1284
|
+
options: t,
|
|
1285
|
+
fn(n) {
|
|
1286
|
+
const {
|
|
1287
|
+
element: o,
|
|
1288
|
+
padding: r
|
|
1289
|
+
} = typeof t == "function" ? t(n) : t;
|
|
1290
|
+
return o && e(o) ? o.current != null ? zt({
|
|
1291
|
+
element: o.current,
|
|
1292
|
+
padding: r
|
|
1293
|
+
}).fn(n) : {} : o ? zt({
|
|
1294
|
+
element: o,
|
|
1295
|
+
padding: r
|
|
1296
|
+
}).fn(n) : {};
|
|
1297
|
+
}
|
|
1298
|
+
};
|
|
1299
|
+
}, Mn = (t, e) => ({
|
|
1300
|
+
...vn(t),
|
|
1301
|
+
options: [t, e]
|
|
1302
|
+
}), Tn = (t, e) => ({
|
|
1303
|
+
...bn(t),
|
|
1304
|
+
options: [t, e]
|
|
1305
|
+
}), $n = (t, e) => ({
|
|
1306
|
+
...Pn(t),
|
|
1307
|
+
options: [t, e]
|
|
1308
|
+
}), kn = (t, e) => ({
|
|
1309
|
+
...An(t),
|
|
1310
|
+
options: [t, e]
|
|
1311
|
+
}), Fn = (t, e) => ({
|
|
1312
|
+
...Rn(t),
|
|
1313
|
+
options: [t, e]
|
|
1314
|
+
}), Nn = (t, e) => ({
|
|
1315
|
+
...Cn(t),
|
|
1316
|
+
options: [t, e]
|
|
1317
|
+
}), Wn = (t, e) => ({
|
|
1318
|
+
...Dn(t),
|
|
1319
|
+
options: [t, e]
|
|
1320
|
+
});
|
|
1321
|
+
var Hn = "Arrow", oe = R.forwardRef((t, e) => {
|
|
1322
|
+
const { children: n, width: o = 10, height: r = 5, ...i } = t;
|
|
1323
|
+
return /* @__PURE__ */ Y.jsx(
|
|
1324
|
+
At.svg,
|
|
1325
|
+
{
|
|
1326
|
+
...i,
|
|
1327
|
+
ref: e,
|
|
1328
|
+
width: o,
|
|
1329
|
+
height: r,
|
|
1330
|
+
viewBox: "0 0 30 10",
|
|
1331
|
+
preserveAspectRatio: "none",
|
|
1332
|
+
children: t.asChild ? n : /* @__PURE__ */ Y.jsx("polygon", { points: "0,0 30,0 15,10" })
|
|
1333
|
+
}
|
|
1334
|
+
);
|
|
1335
|
+
});
|
|
1336
|
+
oe.displayName = Hn;
|
|
1337
|
+
var _n = oe, Lt = "Popper", [re, to] = Ce(Lt), [Bn, ie] = re(Lt), se = (t) => {
|
|
1338
|
+
const { __scopePopper: e, children: n } = t, [o, r] = R.useState(null);
|
|
1339
|
+
return /* @__PURE__ */ Y.jsx(Bn, { scope: e, anchor: o, onAnchorChange: r, children: n });
|
|
1340
|
+
};
|
|
1341
|
+
se.displayName = Lt;
|
|
1342
|
+
var ce = "PopperAnchor", le = R.forwardRef(
|
|
1343
|
+
(t, e) => {
|
|
1344
|
+
const { __scopePopper: n, virtualRef: o, ...r } = t, i = ie(ce, n), s = R.useRef(null), c = Xt(e, s), l = R.useRef(null);
|
|
1345
|
+
return R.useEffect(() => {
|
|
1346
|
+
const a = l.current;
|
|
1347
|
+
l.current = o?.current || s.current, a !== l.current && i.onAnchorChange(l.current);
|
|
1348
|
+
}), o ? null : /* @__PURE__ */ Y.jsx(At.div, { ...r, ref: c });
|
|
1349
|
+
}
|
|
1350
|
+
);
|
|
1351
|
+
le.displayName = ce;
|
|
1352
|
+
var Dt = "PopperContent", [Vn, jn] = re(Dt), ae = R.forwardRef(
|
|
1353
|
+
(t, e) => {
|
|
1354
|
+
const {
|
|
1355
|
+
__scopePopper: n,
|
|
1356
|
+
side: o = "bottom",
|
|
1357
|
+
sideOffset: r = 0,
|
|
1358
|
+
align: i = "center",
|
|
1359
|
+
alignOffset: s = 0,
|
|
1360
|
+
arrowPadding: c = 0,
|
|
1361
|
+
avoidCollisions: l = !0,
|
|
1362
|
+
collisionBoundary: a = [],
|
|
1363
|
+
collisionPadding: f = 0,
|
|
1364
|
+
sticky: u = "partial",
|
|
1365
|
+
hideWhenDetached: p = !1,
|
|
1366
|
+
updatePositionStrategy: d = "optimized",
|
|
1367
|
+
onPlaced: m,
|
|
1368
|
+
...h
|
|
1369
|
+
} = t, w = ie(Dt, n), [g, x] = R.useState(null), b = Xt(e, (nt) => x(nt)), [y, v] = R.useState(null), P = Oe(y), C = P?.width ?? 0, M = P?.height ?? 0, F = o + (i !== "center" ? "-" + i : ""), D = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, $ = Array.isArray(a) ? a : [a], k = $.length > 0, S = {
|
|
1370
|
+
padding: D,
|
|
1371
|
+
boundary: $.filter(In),
|
|
1372
|
+
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
1373
|
+
altBoundary: k
|
|
1374
|
+
}, { refs: O, floatingStyles: N, placement: E, isPositioned: L, middlewareData: A } = Ln({
|
|
1375
|
+
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
1376
|
+
strategy: "fixed",
|
|
1377
|
+
placement: F,
|
|
1378
|
+
whileElementsMounted: (...nt) => yn(...nt, {
|
|
1379
|
+
animationFrame: d === "always"
|
|
1380
|
+
}),
|
|
1381
|
+
elements: {
|
|
1382
|
+
reference: w.anchor
|
|
1383
|
+
},
|
|
1384
|
+
middleware: [
|
|
1385
|
+
Mn({ mainAxis: r + M, alignmentAxis: s }),
|
|
1386
|
+
l && Tn({
|
|
1387
|
+
mainAxis: !0,
|
|
1388
|
+
crossAxis: !1,
|
|
1389
|
+
limiter: u === "partial" ? $n() : void 0,
|
|
1390
|
+
...S
|
|
1391
|
+
}),
|
|
1392
|
+
l && kn({ ...S }),
|
|
1393
|
+
Fn({
|
|
1394
|
+
...S,
|
|
1395
|
+
apply: ({ elements: nt, rects: Tt, availableWidth: xe, availableHeight: ye }) => {
|
|
1396
|
+
const { width: ve, height: be } = Tt.reference, st = nt.floating.style;
|
|
1397
|
+
st.setProperty("--radix-popper-available-width", `${xe}px`), st.setProperty("--radix-popper-available-height", `${ye}px`), st.setProperty("--radix-popper-anchor-width", `${ve}px`), st.setProperty("--radix-popper-anchor-height", `${be}px`);
|
|
1398
|
+
}
|
|
1399
|
+
}),
|
|
1400
|
+
y && Wn({ element: y, padding: c }),
|
|
1401
|
+
Xn({ arrowWidth: C, arrowHeight: M }),
|
|
1402
|
+
p && Nn({ strategy: "referenceHidden", ...S })
|
|
1403
|
+
]
|
|
1404
|
+
}), [T, V] = de(E), Mt = Pe(m);
|
|
1405
|
+
$t(() => {
|
|
1406
|
+
L && Mt?.();
|
|
1407
|
+
}, [L, Mt]);
|
|
1408
|
+
const me = A.arrow?.x, pe = A.arrow?.y, he = A.arrow?.centerOffset !== 0, [ge, we] = R.useState();
|
|
1409
|
+
return $t(() => {
|
|
1410
|
+
g && we(window.getComputedStyle(g).zIndex);
|
|
1411
|
+
}, [g]), /* @__PURE__ */ Y.jsx(
|
|
1412
|
+
"div",
|
|
1413
|
+
{
|
|
1414
|
+
ref: O.setFloating,
|
|
1415
|
+
"data-radix-popper-content-wrapper": "",
|
|
1416
|
+
style: {
|
|
1417
|
+
...N,
|
|
1418
|
+
transform: L ? N.transform : "translate(0, -200%)",
|
|
1419
|
+
// keep off the page when measuring
|
|
1420
|
+
minWidth: "max-content",
|
|
1421
|
+
zIndex: ge,
|
|
1422
|
+
"--radix-popper-transform-origin": [
|
|
1423
|
+
A.transformOrigin?.x,
|
|
1424
|
+
A.transformOrigin?.y
|
|
1425
|
+
].join(" "),
|
|
1426
|
+
// hide the content if using the hide middleware and should be hidden
|
|
1427
|
+
// set visibility to hidden and disable pointer events so the UI behaves
|
|
1428
|
+
// as if the PopperContent isn't there at all
|
|
1429
|
+
...A.hide?.referenceHidden && {
|
|
1430
|
+
visibility: "hidden",
|
|
1431
|
+
pointerEvents: "none"
|
|
1432
|
+
}
|
|
1433
|
+
},
|
|
1434
|
+
dir: t.dir,
|
|
1435
|
+
children: /* @__PURE__ */ Y.jsx(
|
|
1436
|
+
Vn,
|
|
1437
|
+
{
|
|
1438
|
+
scope: n,
|
|
1439
|
+
placedSide: T,
|
|
1440
|
+
onArrowChange: v,
|
|
1441
|
+
arrowX: me,
|
|
1442
|
+
arrowY: pe,
|
|
1443
|
+
shouldHideArrow: he,
|
|
1444
|
+
children: /* @__PURE__ */ Y.jsx(
|
|
1445
|
+
At.div,
|
|
1446
|
+
{
|
|
1447
|
+
"data-side": T,
|
|
1448
|
+
"data-align": V,
|
|
1449
|
+
...h,
|
|
1450
|
+
ref: b,
|
|
1451
|
+
style: {
|
|
1452
|
+
...h.style,
|
|
1453
|
+
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
1454
|
+
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
1455
|
+
animation: L ? void 0 : "none"
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
)
|
|
1459
|
+
}
|
|
1460
|
+
)
|
|
1461
|
+
}
|
|
1462
|
+
);
|
|
1463
|
+
}
|
|
1464
|
+
);
|
|
1465
|
+
ae.displayName = Dt;
|
|
1466
|
+
var fe = "PopperArrow", zn = {
|
|
1467
|
+
top: "bottom",
|
|
1468
|
+
right: "left",
|
|
1469
|
+
bottom: "top",
|
|
1470
|
+
left: "right"
|
|
1471
|
+
}, ue = R.forwardRef(function(e, n) {
|
|
1472
|
+
const { __scopePopper: o, ...r } = e, i = jn(fe, o), s = zn[i.placedSide];
|
|
1473
|
+
return (
|
|
1474
|
+
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
1475
|
+
// doesn't report size as we'd expect on SVG elements.
|
|
1476
|
+
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
1477
|
+
/* @__PURE__ */ Y.jsx(
|
|
1478
|
+
"span",
|
|
1479
|
+
{
|
|
1480
|
+
ref: i.onArrowChange,
|
|
1481
|
+
style: {
|
|
1482
|
+
position: "absolute",
|
|
1483
|
+
left: i.arrowX,
|
|
1484
|
+
top: i.arrowY,
|
|
1485
|
+
[s]: 0,
|
|
1486
|
+
transformOrigin: {
|
|
1487
|
+
top: "",
|
|
1488
|
+
right: "0 0",
|
|
1489
|
+
bottom: "center 0",
|
|
1490
|
+
left: "100% 0"
|
|
1491
|
+
}[i.placedSide],
|
|
1492
|
+
transform: {
|
|
1493
|
+
top: "translateY(100%)",
|
|
1494
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
1495
|
+
bottom: "rotate(180deg)",
|
|
1496
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
1497
|
+
}[i.placedSide],
|
|
1498
|
+
visibility: i.shouldHideArrow ? "hidden" : void 0
|
|
1499
|
+
},
|
|
1500
|
+
children: /* @__PURE__ */ Y.jsx(
|
|
1501
|
+
_n,
|
|
1502
|
+
{
|
|
1503
|
+
...r,
|
|
1504
|
+
ref: n,
|
|
1505
|
+
style: {
|
|
1506
|
+
...r.style,
|
|
1507
|
+
// ensures the element can be measured correctly (mostly for if SVG)
|
|
1508
|
+
display: "block"
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
)
|
|
1512
|
+
}
|
|
1513
|
+
)
|
|
1514
|
+
);
|
|
1515
|
+
});
|
|
1516
|
+
ue.displayName = fe;
|
|
1517
|
+
function In(t) {
|
|
1518
|
+
return t !== null;
|
|
1519
|
+
}
|
|
1520
|
+
var Xn = (t) => ({
|
|
1521
|
+
name: "transformOrigin",
|
|
1522
|
+
options: t,
|
|
1523
|
+
fn(e) {
|
|
1524
|
+
const { placement: n, rects: o, middlewareData: r } = e, s = r.arrow?.centerOffset !== 0, c = s ? 0 : t.arrowWidth, l = s ? 0 : t.arrowHeight, [a, f] = de(n), u = { start: "0%", center: "50%", end: "100%" }[f], p = (r.arrow?.x ?? 0) + c / 2, d = (r.arrow?.y ?? 0) + l / 2;
|
|
1525
|
+
let m = "", h = "";
|
|
1526
|
+
return a === "bottom" ? (m = s ? u : `${p}px`, h = `${-l}px`) : a === "top" ? (m = s ? u : `${p}px`, h = `${o.floating.height + l}px`) : a === "right" ? (m = `${-l}px`, h = s ? u : `${d}px`) : a === "left" && (m = `${o.floating.width + l}px`, h = s ? u : `${d}px`), { data: { x: m, y: h } };
|
|
1527
|
+
}
|
|
1528
|
+
});
|
|
1529
|
+
function de(t) {
|
|
1530
|
+
const [e, n = "center"] = t.split("-");
|
|
1531
|
+
return [e, n];
|
|
1532
|
+
}
|
|
1533
|
+
var eo = se, no = le, oo = ae, ro = ue;
|
|
1534
|
+
export {
|
|
1535
|
+
no as A,
|
|
1536
|
+
oo as C,
|
|
1537
|
+
eo as R,
|
|
1538
|
+
ro as a,
|
|
1539
|
+
to as c
|
|
1540
|
+
};
|