@fluidattacks/design 3.1.12 → 3.1.13
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/components/@core/index.js +2 -2
- package/dist/components/accordion/accordion-content/index.js +18 -5
- package/dist/components/accordion/index.js +71 -14
- package/dist/components/alert/index.js +108 -57
- package/dist/components/button/index.js +64 -13
- package/dist/components/card/card-header/index.js +78 -9
- package/dist/components/card/card-with-image/index.js +88 -13
- package/dist/components/card/card-with-input/index.js +72 -23
- package/dist/components/card/card-with-selector/index.js +63 -8
- package/dist/components/card/card-with-switch/index.js +46 -8
- package/dist/components/carousel/index.js +54 -28
- package/dist/components/checkbox/index.js +66 -32
- package/dist/components/cloud-image/index.js +2 -2
- package/dist/components/code-snippet/index.js +64 -19
- package/dist/components/code-snippet/location-code/index.js +146 -100
- package/dist/components/colors/index.js +220 -5
- package/dist/components/confirm-dialog/index.js +41 -18
- package/dist/components/container/index.js +39 -15
- package/dist/components/content-card/category-tag/index.js +37 -8
- package/dist/components/content-card/event-date/index.js +53 -10
- package/dist/components/content-card/index.js +118 -13
- package/dist/components/content-card-carousel/index.js +87 -7
- package/dist/components/content-card-carousel/scroll-buttons/index.js +1 -1
- package/dist/components/divider/index.js +22 -7
- package/dist/components/empty-state/empty-button/index.js +4 -4
- package/dist/components/empty-state/index.js +52 -15
- package/dist/components/file-preview/index.js +28 -12
- package/dist/components/form/index.js +46 -9
- package/dist/components/grid-container/index.js +31 -11
- package/dist/components/group-selector/index.js +126 -17
- package/dist/components/group-selector/option-container/index.js +1 -1
- package/dist/components/icon/index.js +78 -18
- package/dist/components/icon-button/index.js +63 -14
- package/dist/components/indicator-card/index.js +70 -11
- package/dist/components/info-sidebar/index.js +107 -7
- package/dist/components/inputs/fields/combobox/index.js +141 -21
- package/dist/components/inputs/fields/combobox/option/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/cell/index.js +22 -11
- package/dist/components/inputs/fields/date/calendar/grid/index.js +21 -10
- package/dist/components/inputs/fields/date/calendar/header/index.js +35 -13
- package/dist/components/inputs/fields/date/calendar/index.js +26 -11
- package/dist/components/inputs/fields/date/index.js +65 -15
- package/dist/components/inputs/fields/date-range/calendar/index.js +29 -10
- package/dist/components/inputs/fields/date-range/index.js +98 -18
- package/dist/components/inputs/fields/date-time/calendar/index.js +44 -15
- package/dist/components/inputs/fields/date-time/index.js +65 -14
- package/dist/components/inputs/fields/editable/index.js +22 -10
- package/dist/components/inputs/fields/input/index.js +74 -10
- package/dist/components/inputs/fields/input-file/index.js +114 -21
- package/dist/components/inputs/fields/input-tags/index.js +60 -11
- package/dist/components/inputs/fields/number/index.js +54 -7
- package/dist/components/inputs/fields/number-range/index.js +46 -8
- package/dist/components/inputs/fields/phone/index.js +446 -286
- package/dist/components/inputs/fields/text-area/index.js +78 -10
- package/dist/components/inputs/label/index.js +34 -8
- package/dist/components/inputs/outline-container/index.js +98 -12
- package/dist/components/inputs/utils/action-button/index.js +28 -7
- package/dist/components/inputs/utils/calendar-button/index.js +34 -10
- package/dist/components/inputs/utils/date-selector/index.js +60 -6
- package/dist/components/inputs/utils/date-time-field/index.js +129 -28
- package/dist/components/inputs/utils/dialog/index.js +10 -7
- package/dist/components/inputs/utils/number-field/index.js +81 -8
- package/dist/components/inputs/utils/popover/index.js +41 -10
- package/dist/components/interactive-card/icon/index.js +1 -1
- package/dist/components/interactive-card/index.js +110 -7
- package/dist/components/language-selector/index.js +34 -10
- package/dist/components/language-selector/item-list/index.js +1 -1
- package/dist/components/link/index.js +71 -17
- package/dist/components/list-item/index.js +64 -13
- package/dist/components/little-flag/index.js +26 -9
- package/dist/components/loading/index.js +48 -21
- package/dist/components/logo/index.js +10 -4
- package/dist/components/logo-carousel/index.js +40 -5
- package/dist/components/lottie/index.js +12 -7
- package/dist/components/menu/index.js +53 -9
- package/dist/components/message-banner/index.js +79 -13
- package/dist/components/modal/index.js +59 -13
- package/dist/components/modal/modal-confirm/index.js +48 -7
- package/dist/components/modal/modal-footer/index.js +22 -13
- package/dist/components/modal/modal-header/index.js +45 -19
- package/dist/components/notification/index.js +65 -20
- package/dist/components/notification-sign/index.js +27 -10
- package/dist/components/number-input/index.js +58 -21
- package/dist/components/oauth-selector/index.js +97 -23
- package/dist/components/oauth-selector/option-container/index.js +68 -7
- package/dist/components/plan-card/index.js +99 -28
- package/dist/components/plan-card/recommended-tag/index.js +23 -2
- package/dist/components/pop-up/description/index.js +47 -9
- package/dist/components/pop-up/index.js +146 -17
- package/dist/components/premium-feature/index.js +56 -16
- package/dist/components/priority-score/index.js +24 -9
- package/dist/components/progress/index.js +30 -17
- package/dist/components/progress-bar/index.js +99 -41
- package/dist/components/radio-button/index.js +64 -27
- package/dist/components/scroll-button/index.js +33 -15
- package/dist/components/search/index.js +77 -35
- package/dist/components/search-bar/index.js +211 -24
- package/dist/components/search-bar/item-searching/index.js +1 -1
- package/dist/components/severity-badge/index.js +66 -6
- package/dist/components/severity-overview/badge/index.js +62 -11
- package/dist/components/severity-overview/index.js +15 -5
- package/dist/components/show-on-hover/index.js +16 -10
- package/dist/components/slide-out-menu/index.js +2611 -1164
- package/dist/components/slide-out-menu/menu-item/index.js +58 -6
- package/dist/components/slider/index.js +79 -48
- package/dist/components/slider/thumb/index.js +13 -6
- package/dist/components/step-lapse/index.js +81 -23
- package/dist/components/table-button/index.js +65 -24
- package/dist/components/tabs/fixed-tabs/index.js +24 -4
- package/dist/components/tabs/index.js +54 -11
- package/dist/components/tabs/tab/index.js +37 -6
- package/dist/components/tag/index.js +95 -27
- package/dist/components/timeline/card/index.js +1 -1
- package/dist/components/timeline/index.js +15 -5
- package/dist/components/toggle/index.js +65 -25
- package/dist/components/toggle-buttons/index.js +51 -22
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tour/index.js +3897 -1829
- package/dist/components/typography/heading/index.js +43 -5
- package/dist/components/typography/span/index.js +38 -6
- package/dist/components/typography/text/index.js +44 -6
- package/dist/components/web-form/index.js +28 -19
- package/dist/hooks/index.js +5 -5
- package/dist/index-BMHVi812.mjs +234 -0
- package/dist/index-BzAniA2J.mjs +135 -0
- package/dist/index-C6LbClYh.mjs +146 -0
- package/dist/index-CAIe8hBv.mjs +130 -0
- package/dist/index-CUQBAqt_.mjs +75 -0
- package/dist/index-CWlrSlUk.mjs +68 -0
- package/dist/index-Ckmu1TfV.mjs +86 -0
- package/dist/index-DwznImvK.mjs +1678 -0
- package/dist/index-maWH3JYC.mjs +3561 -0
- package/dist/index.js +11 -11
- package/dist/styles-B2N0JLw1.mjs +114 -0
- package/dist/styles-B64DVBIF.mjs +115 -0
- package/dist/{styles-lSVV9kjn.mjs → styles-BXFVwnWT.mjs} +28 -28
- package/dist/styles-BZQOqe8p.mjs +141 -0
- package/dist/styles-Bdque9TT.mjs +65 -0
- package/dist/{styles-CI-I6joH.mjs → styles-BlHspTrz.mjs} +18 -18
- package/dist/{styles-Cx93EcVo.mjs → styles-CROOwXEH.mjs} +5 -5
- package/dist/styles-CplEd2kw.mjs +228 -0
- package/dist/styles-D1eTIklB.mjs +110 -0
- package/dist/styles-ePGii_9g.mjs +74 -0
- package/dist/use-carousel-CgAF78h3.mjs +23 -0
- package/dist/use-click-outside-BUll8Ag-.mjs +18 -0
- package/dist/use-cloudinary-image-BCxwj15o.mjs +1176 -0
- package/dist/use-modal-CtgexKnf.mjs +14 -0
- package/dist/use-search-Dj47QDw9.mjs +15 -0
- package/dist/utils-V0EumEPM.mjs +6 -0
- package/package.json +1 -3
- package/dist/index-38JqtnAI.mjs +0 -122
- package/dist/index-B5yoGFs6.mjs +0 -54
- package/dist/index-BLbKylyw.mjs +0 -209
- package/dist/index-Bu448Tz2.mjs +0 -106
- package/dist/index-BwFnfaRh.mjs +0 -2310
- package/dist/index-Co_k0WFk.mjs +0 -75
- package/dist/index-Cu7uUMlx.mjs +0 -82
- package/dist/index-D-lcuEHY.mjs +0 -1018
- package/dist/index-DrfjITyT.mjs +0 -61
- package/dist/styles-7_q7nHce.mjs +0 -110
- package/dist/styles-BA0WIQL-.mjs +0 -74
- package/dist/styles-C3cZmKVJ.mjs +0 -131
- package/dist/styles-D85YYIjM.mjs +0 -131
- package/dist/styles-EIbGRPlk.mjs +0 -106
- package/dist/styles-Q1VXuWI7.mjs +0 -65
- package/dist/styles-fH2c4cfc.mjs +0 -77
- package/dist/use-carousel-CvRxi2FI.mjs +0 -17
- package/dist/use-click-outside-BtZLIoU1.mjs +0 -18
- package/dist/use-cloudinary-image-fG7ODNgr.mjs +0 -611
- package/dist/use-modal-CkrZ-_-M.mjs +0 -14
- package/dist/use-search-DpLNvt7Q.mjs +0 -12
- package/dist/utils-CQvBF-wY.mjs +0 -4
package/dist/index-D-lcuEHY.mjs
DELETED
|
@@ -1,1018 +0,0 @@
|
|
|
1
|
-
import { jsx as at, jsxs as Jt } from "react/jsx-runtime";
|
|
2
|
-
import * as F from "react";
|
|
3
|
-
import Oe, { useLayoutEffect as vn, useEffect as B, createContext as Nn, useState as X, useRef as ce, useContext as Pn, useCallback as jt, useImperativeHandle as jn, forwardRef as Bn, StrictMode as In } from "react";
|
|
4
|
-
import * as Mn from "react-dom";
|
|
5
|
-
import { createPortal as zn } from "react-dom";
|
|
6
|
-
import { isEmpty as Lt } from "lodash";
|
|
7
|
-
import { g as Hn } from "./_commonjsHelpers-C6fGbg64.mjs";
|
|
8
|
-
import { styled as gn, useTheme as Wn } from "styled-components";
|
|
9
|
-
import { B as qn } from "./styles-C3cZmKVJ.mjs";
|
|
10
|
-
import { Icon as Vn } from "./components/icon/index.js";
|
|
11
|
-
import "./components/typography/heading/index.js";
|
|
12
|
-
import "./components/typography/span/index.js";
|
|
13
|
-
import { Text as Qt } from "./components/typography/text/index.js";
|
|
14
|
-
const Ke = Math.min, Le = Math.max, xt = Math.round, gt = Math.floor, me = (e) => ({ x: e, y: e }), Kn = { left: "right", right: "left", bottom: "top", top: "bottom" }, Xn = { start: "end", end: "start" };
|
|
15
|
-
function Bt(e, t, o) {
|
|
16
|
-
return Le(e, Ke(t, o));
|
|
17
|
-
}
|
|
18
|
-
function pt(e, t) {
|
|
19
|
-
return typeof e == "function" ? e(t) : e;
|
|
20
|
-
}
|
|
21
|
-
function Ce(e) {
|
|
22
|
-
return e.split("-")[0];
|
|
23
|
-
}
|
|
24
|
-
function ut(e) {
|
|
25
|
-
return e.split("-")[1];
|
|
26
|
-
}
|
|
27
|
-
function wn(e) {
|
|
28
|
-
return e === "x" ? "y" : "x";
|
|
29
|
-
}
|
|
30
|
-
function qt(e) {
|
|
31
|
-
return e === "y" ? "height" : "width";
|
|
32
|
-
}
|
|
33
|
-
function Xe(e) {
|
|
34
|
-
return ["top", "bottom"].includes(Ce(e)) ? "y" : "x";
|
|
35
|
-
}
|
|
36
|
-
function Vt(e) {
|
|
37
|
-
return wn(Xe(e));
|
|
38
|
-
}
|
|
39
|
-
function Ct(e) {
|
|
40
|
-
return e.replace(/start|end/g, (t) => Xn[t]);
|
|
41
|
-
}
|
|
42
|
-
function wt(e) {
|
|
43
|
-
return e.replace(/left|right|bottom|top/g, (t) => Kn[t]);
|
|
44
|
-
}
|
|
45
|
-
function bn(e) {
|
|
46
|
-
return typeof e != "number" ? function(t) {
|
|
47
|
-
return { top: 0, right: 0, bottom: 0, left: 0, ...t };
|
|
48
|
-
}(e) : { top: e, right: e, bottom: e, left: e };
|
|
49
|
-
}
|
|
50
|
-
function _t(e) {
|
|
51
|
-
const { x: t, y: o, width: n, height: r } = e;
|
|
52
|
-
return { width: n, height: r, top: o, left: t, right: t + n, bottom: o + r, x: t, y: o };
|
|
53
|
-
}
|
|
54
|
-
function en(e, t, o) {
|
|
55
|
-
let { reference: n, floating: r } = e;
|
|
56
|
-
const l = Xe(t), s = Vt(t), i = qt(s), c = Ce(t), a = l === "y", f = n.x + n.width / 2 - r.width / 2, y = n.y + n.height / 2 - r.height / 2, h = n[i] / 2 - r[i] / 2;
|
|
57
|
-
let p;
|
|
58
|
-
switch (c) {
|
|
59
|
-
case "top":
|
|
60
|
-
p = { x: f, y: n.y - r.height };
|
|
61
|
-
break;
|
|
62
|
-
case "bottom":
|
|
63
|
-
p = { x: f, y: n.y + n.height };
|
|
64
|
-
break;
|
|
65
|
-
case "right":
|
|
66
|
-
p = { x: n.x + n.width, y };
|
|
67
|
-
break;
|
|
68
|
-
case "left":
|
|
69
|
-
p = { x: n.x - r.width, y };
|
|
70
|
-
break;
|
|
71
|
-
default:
|
|
72
|
-
p = { x: n.x, y: n.y };
|
|
73
|
-
}
|
|
74
|
-
switch (ut(t)) {
|
|
75
|
-
case "start":
|
|
76
|
-
p[s] -= h * (o && a ? -1 : 1);
|
|
77
|
-
break;
|
|
78
|
-
case "end":
|
|
79
|
-
p[s] += h * (o && a ? -1 : 1);
|
|
80
|
-
}
|
|
81
|
-
return p;
|
|
82
|
-
}
|
|
83
|
-
async function xn(e, t) {
|
|
84
|
-
var o;
|
|
85
|
-
t === void 0 && (t = {});
|
|
86
|
-
const { x: n, y: r, platform: l, rects: s, elements: i, strategy: c } = e, { boundary: a = "clippingAncestors", rootBoundary: f = "viewport", elementContext: y = "floating", altBoundary: h = !1, padding: p = 0 } = pt(t, e), u = bn(p), v = i[h ? y === "floating" ? "reference" : "floating" : y], m = _t(await l.getClippingRect({ element: (o = await (l.isElement == null ? void 0 : l.isElement(v))) == null || o ? v : v.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(i.floating)), boundary: a, rootBoundary: f, strategy: c })), g = y === "floating" ? { x: n, y: r, width: s.floating.width, height: s.floating.height } : s.reference, A = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(i.floating)), b = await (l.isElement == null ? void 0 : l.isElement(A)) && await (l.getScale == null ? void 0 : l.getScale(A)) || { x: 1, y: 1 }, S = _t(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({ elements: i, rect: g, offsetParent: A, strategy: c }) : g);
|
|
87
|
-
return { top: (m.top - S.top + u.top) / b.y, bottom: (S.bottom - m.bottom + u.bottom) / b.y, left: (m.left - S.left + u.left) / b.x, right: (S.right - m.right + u.right) / b.x };
|
|
88
|
-
}
|
|
89
|
-
function At() {
|
|
90
|
-
return typeof window < "u";
|
|
91
|
-
}
|
|
92
|
-
function Ye(e) {
|
|
93
|
-
return _n(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
94
|
-
}
|
|
95
|
-
function oe(e) {
|
|
96
|
-
var t;
|
|
97
|
-
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
98
|
-
}
|
|
99
|
-
function ye(e) {
|
|
100
|
-
var t;
|
|
101
|
-
return (t = (_n(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
102
|
-
}
|
|
103
|
-
function _n(e) {
|
|
104
|
-
return !!At() && (e instanceof Node || e instanceof oe(e).Node);
|
|
105
|
-
}
|
|
106
|
-
function ue(e) {
|
|
107
|
-
return !!At() && (e instanceof Element || e instanceof oe(e).Element);
|
|
108
|
-
}
|
|
109
|
-
function he(e) {
|
|
110
|
-
return !!At() && (e instanceof HTMLElement || e instanceof oe(e).HTMLElement);
|
|
111
|
-
}
|
|
112
|
-
function tn(e) {
|
|
113
|
-
return !(!At() || typeof ShadowRoot > "u") && (e instanceof ShadowRoot || e instanceof oe(e).ShadowRoot);
|
|
114
|
-
}
|
|
115
|
-
function dt(e) {
|
|
116
|
-
const { overflow: t, overflowX: o, overflowY: n, display: r } = de(e);
|
|
117
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + n + o) && !["inline", "contents"].includes(r);
|
|
118
|
-
}
|
|
119
|
-
function Yn(e) {
|
|
120
|
-
return ["table", "td", "th"].includes(Ye(e));
|
|
121
|
-
}
|
|
122
|
-
function St(e) {
|
|
123
|
-
return [":popover-open", ":modal"].some((t) => {
|
|
124
|
-
try {
|
|
125
|
-
return e.matches(t);
|
|
126
|
-
} catch {
|
|
127
|
-
return !1;
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
function It(e) {
|
|
132
|
-
const t = Kt(), o = ue(e) ? de(e) : e;
|
|
133
|
-
return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => !!o[n] && o[n] !== "none") || !!o.containerType && o.containerType !== "normal" || !t && !!o.backdropFilter && o.backdropFilter !== "none" || !t && !!o.filter && o.filter !== "none" || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (o.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (o.contain || "").includes(n));
|
|
134
|
-
}
|
|
135
|
-
function Kt() {
|
|
136
|
-
return !(typeof CSS > "u" || !CSS.supports) && CSS.supports("-webkit-backdrop-filter", "none");
|
|
137
|
-
}
|
|
138
|
-
function qe(e) {
|
|
139
|
-
return ["html", "body", "#document"].includes(Ye(e));
|
|
140
|
-
}
|
|
141
|
-
function de(e) {
|
|
142
|
-
return oe(e).getComputedStyle(e);
|
|
143
|
-
}
|
|
144
|
-
function Tt(e) {
|
|
145
|
-
return ue(e) ? { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop } : { scrollLeft: e.scrollX, scrollTop: e.scrollY };
|
|
146
|
-
}
|
|
147
|
-
function _e(e) {
|
|
148
|
-
if (Ye(e) === "html") return e;
|
|
149
|
-
const t = e.assignedSlot || e.parentNode || tn(e) && e.host || ye(e);
|
|
150
|
-
return tn(t) ? t.host : t;
|
|
151
|
-
}
|
|
152
|
-
function Sn(e) {
|
|
153
|
-
const t = _e(e);
|
|
154
|
-
return qe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : he(t) && dt(t) ? t : Sn(t);
|
|
155
|
-
}
|
|
156
|
-
function ft(e, t, o) {
|
|
157
|
-
var n;
|
|
158
|
-
t === void 0 && (t = []), o === void 0 && (o = !0);
|
|
159
|
-
const r = Sn(e), l = r === ((n = e.ownerDocument) == null ? void 0 : n.body), s = oe(r);
|
|
160
|
-
if (l) {
|
|
161
|
-
const i = Mt(s);
|
|
162
|
-
return t.concat(s, s.visualViewport || [], dt(r) ? r : [], i && o ? ft(i) : []);
|
|
163
|
-
}
|
|
164
|
-
return t.concat(r, ft(r, [], o));
|
|
165
|
-
}
|
|
166
|
-
function Mt(e) {
|
|
167
|
-
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
168
|
-
}
|
|
169
|
-
function En(e) {
|
|
170
|
-
const t = de(e);
|
|
171
|
-
let o = parseFloat(t.width) || 0, n = parseFloat(t.height) || 0;
|
|
172
|
-
const r = he(e), l = r ? e.offsetWidth : o, s = r ? e.offsetHeight : n, i = xt(o) !== l || xt(n) !== s;
|
|
173
|
-
return i && (o = l, n = s), { width: o, height: n, $: i };
|
|
174
|
-
}
|
|
175
|
-
function Xt(e) {
|
|
176
|
-
return ue(e) ? e : e.contextElement;
|
|
177
|
-
}
|
|
178
|
-
function Ve(e) {
|
|
179
|
-
const t = Xt(e);
|
|
180
|
-
if (!he(t)) return me(1);
|
|
181
|
-
const o = t.getBoundingClientRect(), { width: n, height: r, $: l } = En(t);
|
|
182
|
-
let s = (l ? xt(o.width) : o.width) / n, i = (l ? xt(o.height) : o.height) / r;
|
|
183
|
-
return s && Number.isFinite(s) || (s = 1), i && Number.isFinite(i) || (i = 1), { x: s, y: i };
|
|
184
|
-
}
|
|
185
|
-
const Zn = me(0);
|
|
186
|
-
function An(e) {
|
|
187
|
-
const t = oe(e);
|
|
188
|
-
return Kt() && t.visualViewport ? { x: t.visualViewport.offsetLeft, y: t.visualViewport.offsetTop } : Zn;
|
|
189
|
-
}
|
|
190
|
-
function De(e, t, o, n) {
|
|
191
|
-
t === void 0 && (t = !1), o === void 0 && (o = !1);
|
|
192
|
-
const r = e.getBoundingClientRect(), l = Xt(e);
|
|
193
|
-
let s = me(1);
|
|
194
|
-
t && (n ? ue(n) && (s = Ve(n)) : s = Ve(e));
|
|
195
|
-
const i = function(h, p, u) {
|
|
196
|
-
return p === void 0 && (p = !1), !(!u || p && u !== oe(h)) && p;
|
|
197
|
-
}(l, o, n) ? An(l) : me(0);
|
|
198
|
-
let c = (r.left + i.x) / s.x, a = (r.top + i.y) / s.y, f = r.width / s.x, y = r.height / s.y;
|
|
199
|
-
if (l) {
|
|
200
|
-
const h = oe(l), p = n && ue(n) ? oe(n) : n;
|
|
201
|
-
let u = h, v = Mt(u);
|
|
202
|
-
for (; v && n && p !== u; ) {
|
|
203
|
-
const m = Ve(v), g = v.getBoundingClientRect(), A = de(v), b = g.left + (v.clientLeft + parseFloat(A.paddingLeft)) * m.x, S = g.top + (v.clientTop + parseFloat(A.paddingTop)) * m.y;
|
|
204
|
-
c *= m.x, a *= m.y, f *= m.x, y *= m.y, c += b, a += S, u = oe(v), v = Mt(u);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
return _t({ width: f, height: y, x: c, y: a });
|
|
208
|
-
}
|
|
209
|
-
function Yt(e, t) {
|
|
210
|
-
const o = Tt(e).scrollLeft;
|
|
211
|
-
return t ? t.left + o : De(ye(e)).left + o;
|
|
212
|
-
}
|
|
213
|
-
function Tn(e, t, o) {
|
|
214
|
-
o === void 0 && (o = !1);
|
|
215
|
-
const n = e.getBoundingClientRect();
|
|
216
|
-
return { x: n.left + t.scrollLeft - (o ? 0 : Yt(e, n)), y: n.top + t.scrollTop };
|
|
217
|
-
}
|
|
218
|
-
function nn(e, t, o) {
|
|
219
|
-
let n;
|
|
220
|
-
if (t === "viewport") n = function(r, l) {
|
|
221
|
-
const s = oe(r), i = ye(r), c = s.visualViewport;
|
|
222
|
-
let a = i.clientWidth, f = i.clientHeight, y = 0, h = 0;
|
|
223
|
-
if (c) {
|
|
224
|
-
a = c.width, f = c.height;
|
|
225
|
-
const p = Kt();
|
|
226
|
-
(!p || p && l === "fixed") && (y = c.offsetLeft, h = c.offsetTop);
|
|
227
|
-
}
|
|
228
|
-
return { width: a, height: f, x: y, y: h };
|
|
229
|
-
}(e, o);
|
|
230
|
-
else if (t === "document") n = function(r) {
|
|
231
|
-
const l = ye(r), s = Tt(r), i = r.ownerDocument.body, c = Le(l.scrollWidth, l.clientWidth, i.scrollWidth, i.clientWidth), a = Le(l.scrollHeight, l.clientHeight, i.scrollHeight, i.clientHeight);
|
|
232
|
-
let f = -s.scrollLeft + Yt(r);
|
|
233
|
-
const y = -s.scrollTop;
|
|
234
|
-
return de(i).direction === "rtl" && (f += Le(l.clientWidth, i.clientWidth) - c), { width: c, height: a, x: f, y };
|
|
235
|
-
}(ye(e));
|
|
236
|
-
else if (ue(t)) n = function(r, l) {
|
|
237
|
-
const s = De(r, !0, l === "fixed"), i = s.top + r.clientTop, c = s.left + r.clientLeft, a = he(r) ? Ve(r) : me(1);
|
|
238
|
-
return { width: r.clientWidth * a.x, height: r.clientHeight * a.y, x: c * a.x, y: i * a.y };
|
|
239
|
-
}(t, o);
|
|
240
|
-
else {
|
|
241
|
-
const r = An(e);
|
|
242
|
-
n = { x: t.x - r.x, y: t.y - r.y, width: t.width, height: t.height };
|
|
243
|
-
}
|
|
244
|
-
return _t(n);
|
|
245
|
-
}
|
|
246
|
-
function Rn(e, t) {
|
|
247
|
-
const o = _e(e);
|
|
248
|
-
return !(o === t || !ue(o) || qe(o)) && (de(o).position === "fixed" || Rn(o, t));
|
|
249
|
-
}
|
|
250
|
-
function Gn(e, t, o) {
|
|
251
|
-
const n = he(t), r = ye(t), l = o === "fixed", s = De(e, !0, l, t);
|
|
252
|
-
let i = { scrollLeft: 0, scrollTop: 0 };
|
|
253
|
-
const c = me(0);
|
|
254
|
-
if (n || !n && !l) if ((Ye(t) !== "body" || dt(r)) && (i = Tt(t)), n) {
|
|
255
|
-
const f = De(t, !0, l, t);
|
|
256
|
-
c.x = f.x + t.clientLeft, c.y = f.y + t.clientTop;
|
|
257
|
-
} else r && (c.x = Yt(r));
|
|
258
|
-
const a = !r || n || l ? me(0) : Tn(r, i);
|
|
259
|
-
return { x: s.left + i.scrollLeft - c.x - a.x, y: s.top + i.scrollTop - c.y - a.y, width: s.width, height: s.height };
|
|
260
|
-
}
|
|
261
|
-
function Dt(e) {
|
|
262
|
-
return de(e).position === "static";
|
|
263
|
-
}
|
|
264
|
-
function on(e, t) {
|
|
265
|
-
if (!he(e) || de(e).position === "fixed") return null;
|
|
266
|
-
if (t) return t(e);
|
|
267
|
-
let o = e.offsetParent;
|
|
268
|
-
return ye(e) === o && (o = o.ownerDocument.body), o;
|
|
269
|
-
}
|
|
270
|
-
function rn(e, t) {
|
|
271
|
-
const o = oe(e);
|
|
272
|
-
if (St(e)) return o;
|
|
273
|
-
if (!he(e)) {
|
|
274
|
-
let r = _e(e);
|
|
275
|
-
for (; r && !qe(r); ) {
|
|
276
|
-
if (ue(r) && !Dt(r)) return r;
|
|
277
|
-
r = _e(r);
|
|
278
|
-
}
|
|
279
|
-
return o;
|
|
280
|
-
}
|
|
281
|
-
let n = on(e, t);
|
|
282
|
-
for (; n && Yn(n) && Dt(n); ) n = on(n, t);
|
|
283
|
-
return n && qe(n) && Dt(n) && !It(n) ? o : n || function(r) {
|
|
284
|
-
let l = _e(r);
|
|
285
|
-
for (; he(l) && !qe(l); ) {
|
|
286
|
-
if (It(l)) return l;
|
|
287
|
-
if (St(l)) return null;
|
|
288
|
-
l = _e(l);
|
|
289
|
-
}
|
|
290
|
-
return null;
|
|
291
|
-
}(e) || o;
|
|
292
|
-
}
|
|
293
|
-
const Un = { convertOffsetParentRelativeRectToViewportRelativeRect: function(e) {
|
|
294
|
-
let { elements: t, rect: o, offsetParent: n, strategy: r } = e;
|
|
295
|
-
const l = r === "fixed", s = ye(n), i = !!t && St(t.floating);
|
|
296
|
-
if (n === s || i && l) return o;
|
|
297
|
-
let c = { scrollLeft: 0, scrollTop: 0 }, a = me(1);
|
|
298
|
-
const f = me(0), y = he(n);
|
|
299
|
-
if ((y || !y && !l) && ((Ye(n) !== "body" || dt(s)) && (c = Tt(n)), he(n))) {
|
|
300
|
-
const p = De(n);
|
|
301
|
-
a = Ve(n), f.x = p.x + n.clientLeft, f.y = p.y + n.clientTop;
|
|
302
|
-
}
|
|
303
|
-
const h = !s || y || l ? me(0) : Tn(s, c, !0);
|
|
304
|
-
return { width: o.width * a.x, height: o.height * a.y, x: o.x * a.x - c.scrollLeft * a.x + f.x + h.x, y: o.y * a.y - c.scrollTop * a.y + f.y + h.y };
|
|
305
|
-
}, getDocumentElement: ye, getClippingRect: function(e) {
|
|
306
|
-
let { element: t, boundary: o, rootBoundary: n, strategy: r } = e;
|
|
307
|
-
const l = [...o === "clippingAncestors" ? St(t) ? [] : function(c, a) {
|
|
308
|
-
const f = a.get(c);
|
|
309
|
-
if (f) return f;
|
|
310
|
-
let y = ft(c, [], !1).filter((v) => ue(v) && Ye(v) !== "body"), h = null;
|
|
311
|
-
const p = de(c).position === "fixed";
|
|
312
|
-
let u = p ? _e(c) : c;
|
|
313
|
-
for (; ue(u) && !qe(u); ) {
|
|
314
|
-
const v = de(u), m = It(u);
|
|
315
|
-
m || v.position !== "fixed" || (h = null), (p ? !m && !h : !m && v.position === "static" && h && ["absolute", "fixed"].includes(h.position) || dt(u) && !m && Rn(c, u)) ? y = y.filter((g) => g !== u) : h = v, u = _e(u);
|
|
316
|
-
}
|
|
317
|
-
return a.set(c, y), y;
|
|
318
|
-
}(t, this._c) : [].concat(o), n], s = l[0], i = l.reduce((c, a) => {
|
|
319
|
-
const f = nn(t, a, r);
|
|
320
|
-
return c.top = Le(f.top, c.top), c.right = Ke(f.right, c.right), c.bottom = Ke(f.bottom, c.bottom), c.left = Le(f.left, c.left), c;
|
|
321
|
-
}, nn(t, s, r));
|
|
322
|
-
return { width: i.right - i.left, height: i.bottom - i.top, x: i.left, y: i.top };
|
|
323
|
-
}, getOffsetParent: rn, getElementRects: async function(e) {
|
|
324
|
-
const t = this.getOffsetParent || rn, o = this.getDimensions, n = await o(e.floating);
|
|
325
|
-
return { reference: Gn(e.reference, await t(e.floating), e.strategy), floating: { x: 0, y: 0, width: n.width, height: n.height } };
|
|
326
|
-
}, getClientRects: function(e) {
|
|
327
|
-
return Array.from(e.getClientRects());
|
|
328
|
-
}, getDimensions: function(e) {
|
|
329
|
-
const { width: t, height: o } = En(e);
|
|
330
|
-
return { width: t, height: o };
|
|
331
|
-
}, getScale: Ve, isElement: ue, isRTL: function(e) {
|
|
332
|
-
return de(e).direction === "rtl";
|
|
333
|
-
} };
|
|
334
|
-
function ln(e, t) {
|
|
335
|
-
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
336
|
-
}
|
|
337
|
-
function Fn(e, t, o, n) {
|
|
338
|
-
n === void 0 && (n = {});
|
|
339
|
-
const { ancestorScroll: r = !0, ancestorResize: l = !0, elementResize: s = typeof ResizeObserver == "function", layoutShift: i = typeof IntersectionObserver == "function", animationFrame: c = !1 } = n, a = Xt(e), f = r || l ? [...a ? ft(a) : [], ...ft(t)] : [];
|
|
340
|
-
f.forEach((m) => {
|
|
341
|
-
r && m.addEventListener("scroll", o, { passive: !0 }), l && m.addEventListener("resize", o);
|
|
342
|
-
});
|
|
343
|
-
const y = a && i ? function(m, g) {
|
|
344
|
-
let A, b = null;
|
|
345
|
-
const S = ye(m);
|
|
346
|
-
function L() {
|
|
347
|
-
var k;
|
|
348
|
-
clearTimeout(A), (k = b) == null || k.disconnect(), b = null;
|
|
349
|
-
}
|
|
350
|
-
return function k(T, I) {
|
|
351
|
-
T === void 0 && (T = !1), I === void 0 && (I = 1), L();
|
|
352
|
-
const q = m.getBoundingClientRect(), { left: V, top: M, width: G, height: Y } = q;
|
|
353
|
-
if (T || g(), !G || !Y) return;
|
|
354
|
-
const R = { rootMargin: -gt(M) + "px " + -gt(S.clientWidth - (V + G)) + "px " + -gt(S.clientHeight - (M + Y)) + "px " + -gt(V) + "px", threshold: Le(0, Ke(1, I)) || 1 };
|
|
355
|
-
let P = !0;
|
|
356
|
-
function C(D) {
|
|
357
|
-
const _ = D[0].intersectionRatio;
|
|
358
|
-
if (_ !== I) {
|
|
359
|
-
if (!P) return k();
|
|
360
|
-
_ ? k(!1, _) : A = setTimeout(() => {
|
|
361
|
-
k(!1, 1e-7);
|
|
362
|
-
}, 1e3);
|
|
363
|
-
}
|
|
364
|
-
_ !== 1 || ln(q, m.getBoundingClientRect()) || k(), P = !1;
|
|
365
|
-
}
|
|
366
|
-
try {
|
|
367
|
-
b = new IntersectionObserver(C, { ...R, root: S.ownerDocument });
|
|
368
|
-
} catch {
|
|
369
|
-
b = new IntersectionObserver(C, R);
|
|
370
|
-
}
|
|
371
|
-
b.observe(m);
|
|
372
|
-
}(!0), L;
|
|
373
|
-
}(a, o) : null;
|
|
374
|
-
let h, p = -1, u = null;
|
|
375
|
-
s && (u = new ResizeObserver((m) => {
|
|
376
|
-
let [g] = m;
|
|
377
|
-
g && g.target === a && u && (u.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
378
|
-
var A;
|
|
379
|
-
(A = u) == null || A.observe(t);
|
|
380
|
-
})), o();
|
|
381
|
-
}), a && !c && u.observe(a), u.observe(t));
|
|
382
|
-
let v = c ? De(e) : null;
|
|
383
|
-
return c && function m() {
|
|
384
|
-
const g = De(e);
|
|
385
|
-
v && !ln(v, g) && o(), v = g, h = requestAnimationFrame(m);
|
|
386
|
-
}(), o(), () => {
|
|
387
|
-
var m;
|
|
388
|
-
f.forEach((g) => {
|
|
389
|
-
r && g.removeEventListener("scroll", o), l && g.removeEventListener("resize", o);
|
|
390
|
-
}), y == null || y(), (m = u) == null || m.disconnect(), u = null, c && cancelAnimationFrame(h);
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
|
-
const kn = function(e) {
|
|
394
|
-
return e === void 0 && (e = 0), { name: "offset", options: e, async fn(t) {
|
|
395
|
-
var o, n;
|
|
396
|
-
const { x: r, y: l, placement: s, middlewareData: i } = t, c = await async function(a, f) {
|
|
397
|
-
const { placement: y, platform: h, elements: p } = a, u = await (h.isRTL == null ? void 0 : h.isRTL(p.floating)), v = Ce(y), m = ut(y), g = Xe(y) === "y", A = ["left", "top"].includes(v) ? -1 : 1, b = u && g ? -1 : 1, S = pt(f, a);
|
|
398
|
-
let { mainAxis: L, crossAxis: k, alignmentAxis: T } = typeof S == "number" ? { mainAxis: S, crossAxis: 0, alignmentAxis: null } : { mainAxis: S.mainAxis || 0, crossAxis: S.crossAxis || 0, alignmentAxis: S.alignmentAxis };
|
|
399
|
-
return m && typeof T == "number" && (k = m === "end" ? -1 * T : T), g ? { x: k * b, y: L * A } : { x: L * A, y: k * b };
|
|
400
|
-
}(t, e);
|
|
401
|
-
return s === ((o = i.offset) == null ? void 0 : o.placement) && (n = i.arrow) != null && n.alignmentOffset ? {} : { x: r + c.x, y: l + c.y, data: { ...c, placement: s } };
|
|
402
|
-
} };
|
|
403
|
-
}, Jn = function(e) {
|
|
404
|
-
return e === void 0 && (e = {}), { name: "shift", options: e, async fn(t) {
|
|
405
|
-
const { x: o, y: n, placement: r } = t, { mainAxis: l = !0, crossAxis: s = !1, limiter: i = { fn: (m) => {
|
|
406
|
-
let { x: g, y: A } = m;
|
|
407
|
-
return { x: g, y: A };
|
|
408
|
-
} }, ...c } = pt(e, t), a = { x: o, y: n }, f = await xn(t, c), y = Xe(Ce(r)), h = wn(y);
|
|
409
|
-
let p = a[h], u = a[y];
|
|
410
|
-
if (l) {
|
|
411
|
-
const m = h === "y" ? "bottom" : "right";
|
|
412
|
-
p = Bt(p + f[h === "y" ? "top" : "left"], p, p - f[m]);
|
|
413
|
-
}
|
|
414
|
-
if (s) {
|
|
415
|
-
const m = y === "y" ? "bottom" : "right";
|
|
416
|
-
u = Bt(u + f[y === "y" ? "top" : "left"], u, u - f[m]);
|
|
417
|
-
}
|
|
418
|
-
const v = i.fn({ ...t, [h]: p, [y]: u });
|
|
419
|
-
return { ...v, data: { x: v.x - o, y: v.y - n, enabled: { [h]: l, [y]: s } } };
|
|
420
|
-
} };
|
|
421
|
-
}, On = function(e) {
|
|
422
|
-
return e === void 0 && (e = {}), { name: "flip", options: e, async fn(t) {
|
|
423
|
-
var o, n;
|
|
424
|
-
const { placement: r, middlewareData: l, rects: s, initialPlacement: i, platform: c, elements: a } = t, { mainAxis: f = !0, crossAxis: y = !0, fallbackPlacements: h, fallbackStrategy: p = "bestFit", fallbackAxisSideDirection: u = "none", flipAlignment: v = !0, ...m } = pt(e, t);
|
|
425
|
-
if ((o = l.arrow) != null && o.alignmentOffset) return {};
|
|
426
|
-
const g = Ce(r), A = Xe(i), b = Ce(i) === i, S = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), L = h || (b || !v ? [wt(i)] : function(R) {
|
|
427
|
-
const P = wt(R);
|
|
428
|
-
return [Ct(R), P, Ct(P)];
|
|
429
|
-
}(i)), k = u !== "none";
|
|
430
|
-
!h && k && L.push(...function(R, P, C, D) {
|
|
431
|
-
const _ = ut(R);
|
|
432
|
-
let $ = function(H, N, ge) {
|
|
433
|
-
const Se = ["left", "right"], Ee = ["right", "left"], $e = ["top", "bottom"], Ze = ["bottom", "top"];
|
|
434
|
-
switch (H) {
|
|
435
|
-
case "top":
|
|
436
|
-
case "bottom":
|
|
437
|
-
return ge ? N ? Ee : Se : N ? Se : Ee;
|
|
438
|
-
case "left":
|
|
439
|
-
case "right":
|
|
440
|
-
return N ? $e : Ze;
|
|
441
|
-
default:
|
|
442
|
-
return [];
|
|
443
|
-
}
|
|
444
|
-
}(Ce(R), C === "start", D);
|
|
445
|
-
return _ && ($ = $.map((H) => H + "-" + _), P && ($ = $.concat($.map(Ct)))), $;
|
|
446
|
-
}(i, v, u, S));
|
|
447
|
-
const T = [i, ...L], I = await xn(t, m), q = [];
|
|
448
|
-
let V = ((n = l.flip) == null ? void 0 : n.overflows) || [];
|
|
449
|
-
if (f && q.push(I[g]), y) {
|
|
450
|
-
const R = function(P, C, D) {
|
|
451
|
-
D === void 0 && (D = !1);
|
|
452
|
-
const _ = ut(P), $ = Vt(P), H = qt($);
|
|
453
|
-
let N = $ === "x" ? _ === (D ? "end" : "start") ? "right" : "left" : _ === "start" ? "bottom" : "top";
|
|
454
|
-
return C.reference[H] > C.floating[H] && (N = wt(N)), [N, wt(N)];
|
|
455
|
-
}(r, s, S);
|
|
456
|
-
q.push(I[R[0]], I[R[1]]);
|
|
457
|
-
}
|
|
458
|
-
if (V = [...V, { placement: r, overflows: q }], !q.every((R) => R <= 0)) {
|
|
459
|
-
var M, G;
|
|
460
|
-
const R = (((M = l.flip) == null ? void 0 : M.index) || 0) + 1, P = T[R];
|
|
461
|
-
if (P) return { data: { index: R, overflows: V }, reset: { placement: P } };
|
|
462
|
-
let C = (G = V.filter((D) => D.overflows[0] <= 0).sort((D, _) => D.overflows[1] - _.overflows[1])[0]) == null ? void 0 : G.placement;
|
|
463
|
-
if (!C) switch (p) {
|
|
464
|
-
case "bestFit": {
|
|
465
|
-
var Y;
|
|
466
|
-
const D = (Y = V.filter((_) => {
|
|
467
|
-
if (k) {
|
|
468
|
-
const $ = Xe(_.placement);
|
|
469
|
-
return $ === A || $ === "y";
|
|
470
|
-
}
|
|
471
|
-
return !0;
|
|
472
|
-
}).map((_) => [_.placement, _.overflows.filter(($) => $ > 0).reduce(($, H) => $ + H, 0)]).sort((_, $) => _[1] - $[1])[0]) == null ? void 0 : Y[0];
|
|
473
|
-
D && (C = D);
|
|
474
|
-
break;
|
|
475
|
-
}
|
|
476
|
-
case "initialPlacement":
|
|
477
|
-
C = i;
|
|
478
|
-
}
|
|
479
|
-
if (r !== C) return { reset: { placement: C } };
|
|
480
|
-
}
|
|
481
|
-
return {};
|
|
482
|
-
} };
|
|
483
|
-
}, Qn = (e) => ({ name: "arrow", options: e, async fn(t) {
|
|
484
|
-
const { x: o, y: n, placement: r, rects: l, platform: s, elements: i, middlewareData: c } = t, { element: a, padding: f = 0 } = pt(e, t) || {};
|
|
485
|
-
if (a == null) return {};
|
|
486
|
-
const y = bn(f), h = { x: o, y: n }, p = Vt(r), u = qt(p), v = await s.getDimensions(a), m = p === "y", g = m ? "top" : "left", A = m ? "bottom" : "right", b = m ? "clientHeight" : "clientWidth", S = l.reference[u] + l.reference[p] - h[p] - l.floating[u], L = h[p] - l.reference[p], k = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a));
|
|
487
|
-
let T = k ? k[b] : 0;
|
|
488
|
-
T && await (s.isElement == null ? void 0 : s.isElement(k)) || (T = i.floating[b] || l.floating[u]);
|
|
489
|
-
const I = S / 2 - L / 2, q = T / 2 - v[u] / 2 - 1, V = Ke(y[g], q), M = Ke(y[A], q), G = V, Y = T - v[u] - M, R = T / 2 - v[u] / 2 + I, P = Bt(G, R, Y), C = !c.arrow && ut(r) != null && R !== P && l.reference[u] / 2 - (R < G ? V : M) - v[u] / 2 < 0, D = C ? R < G ? R - G : R - Y : 0;
|
|
490
|
-
return { [p]: h[p] + D, data: { [p]: P, centerOffset: R - P - D, ...C && { alignmentOffset: D } }, reset: C };
|
|
491
|
-
} }), zt = (e, t, o) => {
|
|
492
|
-
const n = /* @__PURE__ */ new Map(), r = { platform: Un, ...o }, l = { ...r.platform, _c: n };
|
|
493
|
-
return (async (s, i, c) => {
|
|
494
|
-
const { placement: a = "bottom", strategy: f = "absolute", middleware: y = [], platform: h } = c, p = y.filter(Boolean), u = await (h.isRTL == null ? void 0 : h.isRTL(i));
|
|
495
|
-
let v = await h.getElementRects({ reference: s, floating: i, strategy: f }), { x: m, y: g } = en(v, a, u), A = a, b = {}, S = 0;
|
|
496
|
-
for (let L = 0; L < p.length; L++) {
|
|
497
|
-
const { name: k, fn: T } = p[L], { x: I, y: q, data: V, reset: M } = await T({ x: m, y: g, initialPlacement: a, placement: A, strategy: f, middlewareData: b, rects: v, platform: h, elements: { reference: s, floating: i } });
|
|
498
|
-
m = I ?? m, g = q ?? g, b = { ...b, [k]: { ...b[k], ...V } }, M && S <= 50 && (S++, typeof M == "object" && (M.placement && (A = M.placement), M.rects && (v = M.rects === !0 ? await h.getElementRects({ reference: s, floating: i, strategy: f }) : M.rects), { x: m, y: g } = en(v, A, u)), L = -1);
|
|
499
|
-
}
|
|
500
|
-
return { x: m, y: g, placement: A, strategy: f, middlewareData: b };
|
|
501
|
-
})(e, t, { ...r, platform: l });
|
|
502
|
-
};
|
|
503
|
-
var bt = typeof document < "u" ? vn : B;
|
|
504
|
-
function Et(e, t) {
|
|
505
|
-
if (e === t) return !0;
|
|
506
|
-
if (typeof e != typeof t) return !1;
|
|
507
|
-
if (typeof e == "function" && e.toString() === t.toString()) return !0;
|
|
508
|
-
let o, n, r;
|
|
509
|
-
if (e && t && typeof e == "object") {
|
|
510
|
-
if (Array.isArray(e)) {
|
|
511
|
-
if (o = e.length, o !== t.length) return !1;
|
|
512
|
-
for (n = o; n-- != 0; ) if (!Et(e[n], t[n])) return !1;
|
|
513
|
-
return !0;
|
|
514
|
-
}
|
|
515
|
-
if (r = Object.keys(e), o = r.length, o !== Object.keys(t).length) return !1;
|
|
516
|
-
for (n = o; n-- != 0; ) if (!{}.hasOwnProperty.call(t, r[n])) return !1;
|
|
517
|
-
for (n = o; n-- != 0; ) {
|
|
518
|
-
const l = r[n];
|
|
519
|
-
if ((l !== "_owner" || !e.$$typeof) && !Et(e[l], t[l])) return !1;
|
|
520
|
-
}
|
|
521
|
-
return !0;
|
|
522
|
-
}
|
|
523
|
-
return e != e && t != t;
|
|
524
|
-
}
|
|
525
|
-
function Ln(e) {
|
|
526
|
-
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
527
|
-
}
|
|
528
|
-
function cn(e, t) {
|
|
529
|
-
const o = Ln(e);
|
|
530
|
-
return Math.round(t * o) / o;
|
|
531
|
-
}
|
|
532
|
-
function $t(e) {
|
|
533
|
-
const t = F.useRef(e);
|
|
534
|
-
return bt(() => {
|
|
535
|
-
t.current = e;
|
|
536
|
-
}), t;
|
|
537
|
-
}
|
|
538
|
-
function _o(e) {
|
|
539
|
-
e === void 0 && (e = {});
|
|
540
|
-
const { placement: t = "bottom", strategy: o = "absolute", middleware: n = [], platform: r, elements: { reference: l, floating: s } = {}, transform: i = !0, whileElementsMounted: c, open: a } = e, [f, y] = F.useState({ x: 0, y: 0, strategy: o, placement: t, middlewareData: {}, isPositioned: !1 }), [h, p] = F.useState(n);
|
|
541
|
-
Et(h, n) || p(n);
|
|
542
|
-
const [u, v] = F.useState(null), [m, g] = F.useState(null), A = F.useCallback((_) => {
|
|
543
|
-
_ !== k.current && (k.current = _, v(_));
|
|
544
|
-
}, []), b = F.useCallback((_) => {
|
|
545
|
-
_ !== T.current && (T.current = _, g(_));
|
|
546
|
-
}, []), S = l || u, L = s || m, k = F.useRef(null), T = F.useRef(null), I = F.useRef(f), q = c != null, V = $t(c), M = $t(r), G = $t(a), Y = F.useCallback(() => {
|
|
547
|
-
if (!k.current || !T.current) return;
|
|
548
|
-
const _ = { placement: t, strategy: o, middleware: h };
|
|
549
|
-
M.current && (_.platform = M.current), zt(k.current, T.current, _).then(($) => {
|
|
550
|
-
const H = { ...$, isPositioned: G.current !== !1 };
|
|
551
|
-
R.current && !Et(I.current, H) && (I.current = H, Mn.flushSync(() => {
|
|
552
|
-
y(H);
|
|
553
|
-
}));
|
|
554
|
-
});
|
|
555
|
-
}, [h, t, o, M, G]);
|
|
556
|
-
bt(() => {
|
|
557
|
-
a === !1 && I.current.isPositioned && (I.current.isPositioned = !1, y((_) => ({ ..._, isPositioned: !1 })));
|
|
558
|
-
}, [a]);
|
|
559
|
-
const R = F.useRef(!1);
|
|
560
|
-
bt(() => (R.current = !0, () => {
|
|
561
|
-
R.current = !1;
|
|
562
|
-
}), []), bt(() => {
|
|
563
|
-
if (S && (k.current = S), L && (T.current = L), S && L) {
|
|
564
|
-
if (V.current) return V.current(S, L, Y);
|
|
565
|
-
Y();
|
|
566
|
-
}
|
|
567
|
-
}, [S, L, Y, V, q]);
|
|
568
|
-
const P = F.useMemo(() => ({ reference: k, floating: T, setReference: A, setFloating: b }), [A, b]), C = F.useMemo(() => ({ reference: S, floating: L }), [S, L]), D = F.useMemo(() => {
|
|
569
|
-
const _ = { position: o, left: 0, top: 0 };
|
|
570
|
-
if (!C.floating) return _;
|
|
571
|
-
const $ = cn(C.floating, f.x), H = cn(C.floating, f.y);
|
|
572
|
-
return i ? { ..._, transform: "translate(" + $ + "px, " + H + "px)", ...Ln(C.floating) >= 1.5 && { willChange: "transform" } } : { position: o, left: $, top: H };
|
|
573
|
-
}, [o, i, C.floating, f.x, f.y]);
|
|
574
|
-
return F.useMemo(() => ({ ...f, update: Y, refs: P, elements: C, floatingStyles: D }), [f, Y, P, C, D]);
|
|
575
|
-
}
|
|
576
|
-
const eo = (e, t) => ({ ...kn(e), options: [e, t] });
|
|
577
|
-
var sn, Nt, an = { exports: {} };
|
|
578
|
-
/*!
|
|
579
|
-
Copyright (c) 2018 Jed Watson.
|
|
580
|
-
Licensed under the MIT License (MIT), see
|
|
581
|
-
http://jedwatson.github.io/classnames
|
|
582
|
-
*/
|
|
583
|
-
const Ht = Hn((sn || (sn = 1, Nt = an, function() {
|
|
584
|
-
var e = {}.hasOwnProperty;
|
|
585
|
-
function t() {
|
|
586
|
-
for (var r = "", l = 0; l < arguments.length; l++) {
|
|
587
|
-
var s = arguments[l];
|
|
588
|
-
s && (r = n(r, o(s)));
|
|
589
|
-
}
|
|
590
|
-
return r;
|
|
591
|
-
}
|
|
592
|
-
function o(r) {
|
|
593
|
-
if (typeof r == "string" || typeof r == "number") return r;
|
|
594
|
-
if (typeof r != "object") return "";
|
|
595
|
-
if (Array.isArray(r)) return t.apply(null, r);
|
|
596
|
-
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]")) return r.toString();
|
|
597
|
-
var l = "";
|
|
598
|
-
for (var s in r) e.call(r, s) && r[s] && (l = n(l, s));
|
|
599
|
-
return l;
|
|
600
|
-
}
|
|
601
|
-
function n(r, l) {
|
|
602
|
-
return l ? r ? r + " " + l : r + l : r;
|
|
603
|
-
}
|
|
604
|
-
Nt.exports ? (t.default = t, Nt.exports = t) : window.classNames = t;
|
|
605
|
-
}()), an.exports)), un = { core: !1, base: !1 };
|
|
606
|
-
/*
|
|
607
|
-
* React Tooltip
|
|
608
|
-
* {@link https://github.com/ReactTooltip/react-tooltip}
|
|
609
|
-
* @copyright ReactTooltip Team
|
|
610
|
-
* @license MIT
|
|
611
|
-
*/
|
|
612
|
-
function dn({ css: e, id: t = "react-tooltip-base-styles", type: o = "base", ref: n }) {
|
|
613
|
-
var r, l;
|
|
614
|
-
if (!e || typeof document > "u" || un[o] || o === "core" && typeof process < "u" && (!((r = process == null ? void 0 : process.env) === null || r === void 0) && r.REACT_TOOLTIP_DISABLE_CORE_STYLES) || o !== "base" && typeof process < "u" && (!((l = process == null ? void 0 : process.env) === null || l === void 0) && l.REACT_TOOLTIP_DISABLE_BASE_STYLES)) return;
|
|
615
|
-
o === "core" && (t = "react-tooltip-core-styles"), n || (n = {});
|
|
616
|
-
const { insertAt: s } = n;
|
|
617
|
-
if (document.getElementById(t)) return;
|
|
618
|
-
const i = document.head || document.getElementsByTagName("head")[0], c = document.createElement("style");
|
|
619
|
-
c.id = t, c.type = "text/css", s === "top" && i.firstChild ? i.insertBefore(c, i.firstChild) : i.appendChild(c), c.styleSheet ? c.styleSheet.cssText = e : c.appendChild(document.createTextNode(e)), un[o] = !0;
|
|
620
|
-
}
|
|
621
|
-
const fn = async ({ elementReference: e = null, tooltipReference: t = null, tooltipArrowReference: o = null, place: n = "top", offset: r = 10, strategy: l = "absolute", middlewares: s = [kn(Number(r)), On({ fallbackAxisSideDirection: "start" }), Jn({ padding: 5 })], border: i }) => {
|
|
622
|
-
if (!e) return { tooltipStyles: {}, tooltipArrowStyles: {}, place: n };
|
|
623
|
-
if (t === null) return { tooltipStyles: {}, tooltipArrowStyles: {}, place: n };
|
|
624
|
-
const c = s;
|
|
625
|
-
return o ? (c.push(Qn({ element: o, padding: 5 })), zt(e, t, { placement: n, strategy: l, middleware: c }).then(({ x: a, y: f, placement: y, middlewareData: h }) => {
|
|
626
|
-
var p, u;
|
|
627
|
-
const v = { left: `${a}px`, top: `${f}px`, border: i }, { x: m, y: g } = (p = h.arrow) !== null && p !== void 0 ? p : { x: 0, y: 0 }, A = (u = { top: "bottom", right: "left", bottom: "top", left: "right" }[y.split("-")[0]]) !== null && u !== void 0 ? u : "bottom", b = i && { borderBottom: i, borderRight: i };
|
|
628
|
-
let S = 0;
|
|
629
|
-
if (i) {
|
|
630
|
-
const L = `${i}`.match(/(\d+)px/);
|
|
631
|
-
S = L != null && L[1] ? Number(L[1]) : 1;
|
|
632
|
-
}
|
|
633
|
-
return { tooltipStyles: v, tooltipArrowStyles: { left: m != null ? `${m}px` : "", top: g != null ? `${g}px` : "", right: "", bottom: "", ...b, [A]: `-${4 + S}px` }, place: y };
|
|
634
|
-
})) : zt(e, t, { placement: "bottom", strategy: l, middleware: c }).then(({ x: a, y: f, placement: y }) => ({ tooltipStyles: { left: `${a}px`, top: `${f}px` }, tooltipArrowStyles: {}, place: y }));
|
|
635
|
-
}, pn = (e, t) => !("CSS" in window && "supports" in window.CSS) || window.CSS.supports(e, t), mn = (e, t, o) => {
|
|
636
|
-
let n = null;
|
|
637
|
-
const r = function(...l) {
|
|
638
|
-
!n && (e.apply(this, l), n = setTimeout(() => {
|
|
639
|
-
n = null;
|
|
640
|
-
}, t));
|
|
641
|
-
};
|
|
642
|
-
return r.cancel = () => {
|
|
643
|
-
n && (clearTimeout(n), n = null);
|
|
644
|
-
}, r;
|
|
645
|
-
}, yn = (e) => e !== null && !Array.isArray(e) && typeof e == "object", Wt = (e, t) => {
|
|
646
|
-
if (e === t) return !0;
|
|
647
|
-
if (Array.isArray(e) && Array.isArray(t)) return e.length === t.length && e.every((r, l) => Wt(r, t[l]));
|
|
648
|
-
if (Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
649
|
-
if (!yn(e) || !yn(t)) return e === t;
|
|
650
|
-
const o = Object.keys(e), n = Object.keys(t);
|
|
651
|
-
return o.length === n.length && o.every((r) => Wt(e[r], t[r]));
|
|
652
|
-
}, to = (e) => {
|
|
653
|
-
if (!(e instanceof HTMLElement || e instanceof SVGElement)) return !1;
|
|
654
|
-
const t = getComputedStyle(e);
|
|
655
|
-
return ["overflow", "overflow-x", "overflow-y"].some((o) => {
|
|
656
|
-
const n = t.getPropertyValue(o);
|
|
657
|
-
return n === "auto" || n === "scroll";
|
|
658
|
-
});
|
|
659
|
-
}, hn = (e) => {
|
|
660
|
-
if (!e) return null;
|
|
661
|
-
let t = e.parentElement;
|
|
662
|
-
for (; t; ) {
|
|
663
|
-
if (to(t)) return t;
|
|
664
|
-
t = t.parentElement;
|
|
665
|
-
}
|
|
666
|
-
return document.scrollingElement || document.documentElement;
|
|
667
|
-
}, no = typeof window < "u" ? vn : B, ie = (e) => {
|
|
668
|
-
e.current && (clearTimeout(e.current), e.current = null);
|
|
669
|
-
}, oo = { anchorRefs: /* @__PURE__ */ new Set(), activeAnchor: { current: null }, attach: () => {
|
|
670
|
-
}, detach: () => {
|
|
671
|
-
}, setActiveAnchor: () => {
|
|
672
|
-
} }, ro = Nn({ getTooltipData: () => oo });
|
|
673
|
-
function Cn(e = "DEFAULT_TOOLTIP_ID") {
|
|
674
|
-
return Pn(ro).getTooltipData(e);
|
|
675
|
-
}
|
|
676
|
-
var We = { tooltip: "core-styles-module_tooltip__3vRRp", fixed: "core-styles-module_fixed__pcSol", arrow: "core-styles-module_arrow__cvMwQ", noArrow: "core-styles-module_noArrow__xock6", clickable: "core-styles-module_clickable__ZuTTB", show: "core-styles-module_show__Nt9eE", closing: "core-styles-module_closing__sGnxF" }, Pt = { tooltip: "styles-module_tooltip__mnnfp", arrow: "styles-module_arrow__K0L3T", dark: "styles-module_dark__xNqje", light: "styles-module_light__Z6W-X", success: "styles-module_success__A2AKt", warning: "styles-module_warning__SCK0X", error: "styles-module_error__JvumD", info: "styles-module_info__BWdHW" };
|
|
677
|
-
const lo = ({ forwardRef: e, id: t, className: o, classNameArrow: n, variant: r = "dark", anchorId: l, anchorSelect: s, place: i = "top", offset: c = 10, events: a = ["hover"], openOnClick: f = !1, positionStrategy: y = "absolute", middlewares: h, wrapper: p, delayShow: u = 0, delayHide: v = 0, float: m = !1, hidden: g = !1, noArrow: A = !1, clickable: b = !1, closeOnEsc: S = !1, closeOnScroll: L = !1, closeOnResize: k = !1, openEvents: T, closeEvents: I, globalCloseEvents: q, imperativeModeOnly: V, style: M, position: G, afterShow: Y, afterHide: R, disableTooltip: P, content: C, contentWrapperRef: D, isOpen: _, defaultIsOpen: $ = !1, setIsOpen: H, activeAnchor: N, setActiveAnchor: ge, border: Se, opacity: Ee, arrowColor: $e, role: Ze = "tooltip" }) => {
|
|
678
|
-
var Ge;
|
|
679
|
-
const J = ce(null), Ne = ce(null), se = ce(null), we = ce(null), Ue = ce(null), [be, Rt] = X({ tooltipStyles: {}, tooltipArrowStyles: {}, place: i }), [te, mt] = X(!1), [Ae, Te] = X(!1), [W, Fe] = X(null), Je = ce(!1), Qe = ce(null), { anchorRefs: et, setActiveAnchor: yt } = Cn(t), Pe = ce(!1), [xe, tt] = X([]), Re = ce(!1), je = f || a.includes("click"), nt = je || (T == null ? void 0 : T.click) || (T == null ? void 0 : T.dblclick) || (T == null ? void 0 : T.mousedown), Be = T ? { ...T } : { mouseover: !0, focus: !0, mouseenter: !1, click: !1, dblclick: !1, mousedown: !1 };
|
|
680
|
-
!T && je && Object.assign(Be, { mouseenter: !1, focus: !1, mouseover: !1, click: !0 });
|
|
681
|
-
const ot = I ? { ...I } : { mouseout: !0, blur: !0, mouseleave: !1, click: !1, dblclick: !1, mouseup: !1 };
|
|
682
|
-
!I && je && Object.assign(ot, { mouseleave: !1, blur: !1, mouseout: !1 });
|
|
683
|
-
const ae = q ? { ...q } : { escape: S || !1, scroll: L || !1, resize: k || !1, clickOutsideAnchor: nt || !1 };
|
|
684
|
-
V && (Object.assign(Be, { mouseenter: !1, focus: !1, click: !1, dblclick: !1, mousedown: !1 }), Object.assign(ot, { mouseleave: !1, blur: !1, click: !1, dblclick: !1, mouseup: !1 }), Object.assign(ae, { escape: !1, scroll: !1, resize: !1, clickOutsideAnchor: !1 })), no(() => (Re.current = !0, () => {
|
|
685
|
-
Re.current = !1;
|
|
686
|
-
}), []);
|
|
687
|
-
const K = (d) => {
|
|
688
|
-
Re.current && (d && Te(!0), setTimeout(() => {
|
|
689
|
-
Re.current && (H == null || H(d), _ === void 0 && mt(d));
|
|
690
|
-
}, 10));
|
|
691
|
-
};
|
|
692
|
-
B(() => {
|
|
693
|
-
if (_ === void 0) return () => null;
|
|
694
|
-
_ && Te(!0);
|
|
695
|
-
const d = setTimeout(() => {
|
|
696
|
-
mt(_);
|
|
697
|
-
}, 10);
|
|
698
|
-
return () => {
|
|
699
|
-
clearTimeout(d);
|
|
700
|
-
};
|
|
701
|
-
}, [_]), B(() => {
|
|
702
|
-
if (te !== Je.current) if (ie(Ue), Je.current = te, te) Y == null || Y();
|
|
703
|
-
else {
|
|
704
|
-
const d = (() => {
|
|
705
|
-
const x = getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);
|
|
706
|
-
if (!x) return 0;
|
|
707
|
-
const [, E, Z] = x;
|
|
708
|
-
return Number(E) * (Z === "ms" ? 1 : 1e3);
|
|
709
|
-
})();
|
|
710
|
-
Ue.current = setTimeout(() => {
|
|
711
|
-
Te(!1), Fe(null), R == null || R();
|
|
712
|
-
}, d + 25);
|
|
713
|
-
}
|
|
714
|
-
}, [te]);
|
|
715
|
-
const ht = (d) => {
|
|
716
|
-
Rt((x) => Wt(x, d) ? x : d);
|
|
717
|
-
}, rt = (d = u) => {
|
|
718
|
-
ie(se), Ae ? K(!0) : se.current = setTimeout(() => {
|
|
719
|
-
K(!0);
|
|
720
|
-
}, d);
|
|
721
|
-
}, Ie = (d = v) => {
|
|
722
|
-
ie(we), we.current = setTimeout(() => {
|
|
723
|
-
Pe.current || K(!1);
|
|
724
|
-
}, d);
|
|
725
|
-
}, lt = (d) => {
|
|
726
|
-
var x;
|
|
727
|
-
if (!d) return;
|
|
728
|
-
const E = (x = d.currentTarget) !== null && x !== void 0 ? x : d.target;
|
|
729
|
-
if (!(E != null && E.isConnected)) return ge(null), void yt({ current: null });
|
|
730
|
-
u ? rt() : K(!0), ge(E), yt({ current: E }), ie(we);
|
|
731
|
-
}, Me = () => {
|
|
732
|
-
b ? Ie(v || 100) : v ? Ie() : K(!1), ie(se);
|
|
733
|
-
}, ze = ({ x: d, y: x }) => {
|
|
734
|
-
var E;
|
|
735
|
-
const Z = { getBoundingClientRect: () => ({ x: d, y: x, width: 0, height: 0, top: x, left: d, right: d, bottom: x }) };
|
|
736
|
-
fn({ place: (E = W == null ? void 0 : W.place) !== null && E !== void 0 ? E : i, offset: c, elementReference: Z, tooltipReference: J.current, tooltipArrowReference: Ne.current, strategy: y, middlewares: h, border: Se }).then((ee) => {
|
|
737
|
-
ht(ee);
|
|
738
|
-
});
|
|
739
|
-
}, He = (d) => {
|
|
740
|
-
if (!d) return;
|
|
741
|
-
const x = d, E = { x: x.clientX, y: x.clientY };
|
|
742
|
-
ze(E), Qe.current = E;
|
|
743
|
-
}, it = (d) => {
|
|
744
|
-
var x;
|
|
745
|
-
if (!te) return;
|
|
746
|
-
const E = d.target;
|
|
747
|
-
E.isConnected && (!((x = J.current) === null || x === void 0) && x.contains(E) || [document.querySelector(`[id='${l}']`), ...xe].some((Z) => Z == null ? void 0 : Z.contains(E)) || (K(!1), ie(se)));
|
|
748
|
-
}, vt = mn(lt, 50), U = mn(Me, 50), re = (d) => {
|
|
749
|
-
U.cancel(), vt(d);
|
|
750
|
-
}, w = () => {
|
|
751
|
-
vt.cancel(), U();
|
|
752
|
-
}, O = jt(() => {
|
|
753
|
-
var d, x;
|
|
754
|
-
const E = (d = W == null ? void 0 : W.position) !== null && d !== void 0 ? d : G;
|
|
755
|
-
E ? ze(E) : m ? Qe.current && ze(Qe.current) : N != null && N.isConnected && fn({ place: (x = W == null ? void 0 : W.place) !== null && x !== void 0 ? x : i, offset: c, elementReference: N, tooltipReference: J.current, tooltipArrowReference: Ne.current, strategy: y, middlewares: h, border: Se }).then((Z) => {
|
|
756
|
-
Re.current && ht(Z);
|
|
757
|
-
});
|
|
758
|
-
}, [te, N, C, M, i, W == null ? void 0 : W.place, c, y, G, W == null ? void 0 : W.position, m]);
|
|
759
|
-
B(() => {
|
|
760
|
-
var d, x;
|
|
761
|
-
const E = new Set(et);
|
|
762
|
-
xe.forEach((j) => {
|
|
763
|
-
P != null && P(j) || E.add({ current: j });
|
|
764
|
-
});
|
|
765
|
-
const Z = document.querySelector(`[id='${l}']`);
|
|
766
|
-
Z && !(P != null && P(Z)) && E.add({ current: Z });
|
|
767
|
-
const ee = () => {
|
|
768
|
-
K(!1);
|
|
769
|
-
}, fe = hn(N), pe = hn(J.current);
|
|
770
|
-
ae.scroll && (window.addEventListener("scroll", ee), fe == null || fe.addEventListener("scroll", ee), pe == null || pe.addEventListener("scroll", ee));
|
|
771
|
-
let Q = null;
|
|
772
|
-
ae.resize ? window.addEventListener("resize", ee) : N && J.current && (Q = Fn(N, J.current, O, { ancestorResize: !0, elementResize: !0, layoutShift: !0 }));
|
|
773
|
-
const le = (j) => {
|
|
774
|
-
j.key === "Escape" && K(!1);
|
|
775
|
-
};
|
|
776
|
-
ae.escape && window.addEventListener("keydown", le), ae.clickOutsideAnchor && window.addEventListener("click", it);
|
|
777
|
-
const z = [], ct = (j) => {
|
|
778
|
-
te && (j == null ? void 0 : j.target) === N || lt(j);
|
|
779
|
-
}, Dn = (j) => {
|
|
780
|
-
te && (j == null ? void 0 : j.target) === N && Me();
|
|
781
|
-
}, Zt = ["mouseover", "mouseout", "mouseenter", "mouseleave", "focus", "blur"], Gt = ["click", "dblclick", "mousedown", "mouseup"];
|
|
782
|
-
Object.entries(Be).forEach(([j, ve]) => {
|
|
783
|
-
ve && (Zt.includes(j) ? z.push({ event: j, listener: re }) : Gt.includes(j) && z.push({ event: j, listener: ct }));
|
|
784
|
-
}), Object.entries(ot).forEach(([j, ve]) => {
|
|
785
|
-
ve && (Zt.includes(j) ? z.push({ event: j, listener: w }) : Gt.includes(j) && z.push({ event: j, listener: Dn }));
|
|
786
|
-
}), m && z.push({ event: "pointermove", listener: He });
|
|
787
|
-
const Ut = () => {
|
|
788
|
-
Pe.current = !0;
|
|
789
|
-
}, Ft = () => {
|
|
790
|
-
Pe.current = !1, Me();
|
|
791
|
-
};
|
|
792
|
-
return b && !nt && ((d = J.current) === null || d === void 0 || d.addEventListener("mouseenter", Ut), (x = J.current) === null || x === void 0 || x.addEventListener("mouseleave", Ft)), z.forEach(({ event: j, listener: ve }) => {
|
|
793
|
-
E.forEach((kt) => {
|
|
794
|
-
var st;
|
|
795
|
-
(st = kt.current) === null || st === void 0 || st.addEventListener(j, ve);
|
|
796
|
-
});
|
|
797
|
-
}), () => {
|
|
798
|
-
var j, ve;
|
|
799
|
-
ae.scroll && (window.removeEventListener("scroll", ee), fe == null || fe.removeEventListener("scroll", ee), pe == null || pe.removeEventListener("scroll", ee)), ae.resize ? window.removeEventListener("resize", ee) : Q == null || Q(), ae.clickOutsideAnchor && window.removeEventListener("click", it), ae.escape && window.removeEventListener("keydown", le), b && !nt && ((j = J.current) === null || j === void 0 || j.removeEventListener("mouseenter", Ut), (ve = J.current) === null || ve === void 0 || ve.removeEventListener("mouseleave", Ft)), z.forEach(({ event: kt, listener: st }) => {
|
|
800
|
-
E.forEach(($n) => {
|
|
801
|
-
var Ot;
|
|
802
|
-
(Ot = $n.current) === null || Ot === void 0 || Ot.removeEventListener(kt, st);
|
|
803
|
-
});
|
|
804
|
-
});
|
|
805
|
-
};
|
|
806
|
-
}, [N, O, Ae, et, xe, T, I, q, je, u, v]), B(() => {
|
|
807
|
-
var d, x;
|
|
808
|
-
let E = (x = (d = W == null ? void 0 : W.anchorSelect) !== null && d !== void 0 ? d : s) !== null && x !== void 0 ? x : "";
|
|
809
|
-
!E && t && (E = `[data-tooltip-id='${t.replace(/'/g, "\\'")}']`);
|
|
810
|
-
const Z = new MutationObserver((ee) => {
|
|
811
|
-
const fe = [], pe = [];
|
|
812
|
-
ee.forEach((Q) => {
|
|
813
|
-
if (Q.type === "attributes" && Q.attributeName === "data-tooltip-id" && (Q.target.getAttribute("data-tooltip-id") === t ? fe.push(Q.target) : Q.oldValue === t && pe.push(Q.target)), Q.type === "childList") {
|
|
814
|
-
if (N) {
|
|
815
|
-
const le = [...Q.removedNodes].filter((z) => z.nodeType === 1);
|
|
816
|
-
if (E) try {
|
|
817
|
-
pe.push(...le.filter((z) => z.matches(E))), pe.push(...le.flatMap((z) => [...z.querySelectorAll(E)]));
|
|
818
|
-
} catch {
|
|
819
|
-
}
|
|
820
|
-
le.some((z) => {
|
|
821
|
-
var ct;
|
|
822
|
-
return !!(!((ct = z == null ? void 0 : z.contains) === null || ct === void 0) && ct.call(z, N)) && (Te(!1), K(!1), ge(null), ie(se), ie(we), !0);
|
|
823
|
-
});
|
|
824
|
-
}
|
|
825
|
-
if (E) try {
|
|
826
|
-
const le = [...Q.addedNodes].filter((z) => z.nodeType === 1);
|
|
827
|
-
fe.push(...le.filter((z) => z.matches(E))), fe.push(...le.flatMap((z) => [...z.querySelectorAll(E)]));
|
|
828
|
-
} catch {
|
|
829
|
-
}
|
|
830
|
-
}
|
|
831
|
-
}), (fe.length || pe.length) && tt((Q) => [...Q.filter((le) => !pe.includes(le)), ...fe]);
|
|
832
|
-
});
|
|
833
|
-
return Z.observe(document.body, { childList: !0, subtree: !0, attributes: !0, attributeFilter: ["data-tooltip-id"], attributeOldValue: !0 }), () => {
|
|
834
|
-
Z.disconnect();
|
|
835
|
-
};
|
|
836
|
-
}, [t, s, W == null ? void 0 : W.anchorSelect, N]), B(() => {
|
|
837
|
-
O();
|
|
838
|
-
}, [O]), B(() => {
|
|
839
|
-
if (!(D != null && D.current)) return () => null;
|
|
840
|
-
const d = new ResizeObserver(() => {
|
|
841
|
-
setTimeout(() => O());
|
|
842
|
-
});
|
|
843
|
-
return d.observe(D.current), () => {
|
|
844
|
-
d.disconnect();
|
|
845
|
-
};
|
|
846
|
-
}, [C, D == null ? void 0 : D.current]), B(() => {
|
|
847
|
-
var d;
|
|
848
|
-
const x = document.querySelector(`[id='${l}']`), E = [...xe, x];
|
|
849
|
-
N && E.includes(N) || ge((d = xe[0]) !== null && d !== void 0 ? d : x);
|
|
850
|
-
}, [l, xe, N]), B(() => ($ && K(!0), () => {
|
|
851
|
-
ie(se), ie(we);
|
|
852
|
-
}), []), B(() => {
|
|
853
|
-
var d;
|
|
854
|
-
let x = (d = W == null ? void 0 : W.anchorSelect) !== null && d !== void 0 ? d : s;
|
|
855
|
-
if (!x && t && (x = `[data-tooltip-id='${t.replace(/'/g, "\\'")}']`), x) try {
|
|
856
|
-
const E = Array.from(document.querySelectorAll(x));
|
|
857
|
-
tt(E);
|
|
858
|
-
} catch {
|
|
859
|
-
tt([]);
|
|
860
|
-
}
|
|
861
|
-
}, [t, s, W == null ? void 0 : W.anchorSelect]), B(() => {
|
|
862
|
-
se.current && (ie(se), rt(u));
|
|
863
|
-
}, [u]);
|
|
864
|
-
const ne = (Ge = W == null ? void 0 : W.content) !== null && Ge !== void 0 ? Ge : C, ke = te && Object.keys(be.tooltipStyles).length > 0;
|
|
865
|
-
return jn(e, () => ({ open: (d) => {
|
|
866
|
-
if (d != null && d.anchorSelect) try {
|
|
867
|
-
document.querySelector(d.anchorSelect);
|
|
868
|
-
} catch {
|
|
869
|
-
return void console.warn(`[react-tooltip] "${d.anchorSelect}" is not a valid CSS selector`);
|
|
870
|
-
}
|
|
871
|
-
Fe(d ?? null), d != null && d.delay ? rt(d.delay) : K(!0);
|
|
872
|
-
}, close: (d) => {
|
|
873
|
-
d != null && d.delay ? Ie(d.delay) : K(!1);
|
|
874
|
-
}, activeAnchor: N, place: be.place, isOpen: !!(Ae && !g && ne && ke) })), Ae && !g && ne ? Oe.createElement(p, { id: t, role: Ze, className: Ht("react-tooltip", We.tooltip, Pt.tooltip, Pt[r], o, `react-tooltip__place-${be.place}`, We[ke ? "show" : "closing"], ke ? "react-tooltip__show" : "react-tooltip__closing", y === "fixed" && We.fixed, b && We.clickable), onTransitionEnd: (d) => {
|
|
875
|
-
ie(Ue), te || d.propertyName !== "opacity" || (Te(!1), Fe(null), R == null || R());
|
|
876
|
-
}, style: { ...M, ...be.tooltipStyles, opacity: Ee !== void 0 && ke ? Ee : void 0 }, ref: J }, ne, Oe.createElement(p, { className: Ht("react-tooltip-arrow", We.arrow, Pt.arrow, n, A && We.noArrow), style: { ...be.tooltipArrowStyles, background: $e ? `linear-gradient(to right bottom, transparent 50%, ${$e} 50%)` : void 0 }, ref: Ne })) : null;
|
|
877
|
-
}, io = ({ content: e }) => Oe.createElement("span", { dangerouslySetInnerHTML: { __html: e } }), co = Oe.forwardRef(({ id: e, anchorId: t, anchorSelect: o, content: n, html: r, render: l, className: s, classNameArrow: i, variant: c = "dark", place: a = "top", offset: f = 10, wrapper: y = "div", children: h = null, events: p = ["hover"], openOnClick: u = !1, positionStrategy: v = "absolute", middlewares: m, delayShow: g = 0, delayHide: A = 0, float: b = !1, hidden: S = !1, noArrow: L = !1, clickable: k = !1, closeOnEsc: T = !1, closeOnScroll: I = !1, closeOnResize: q = !1, openEvents: V, closeEvents: M, globalCloseEvents: G, imperativeModeOnly: Y = !1, style: R, position: P, isOpen: C, defaultIsOpen: D = !1, disableStyleInjection: _ = !1, border: $, opacity: H, arrowColor: N, setIsOpen: ge, afterShow: Se, afterHide: Ee, disableTooltip: $e, role: Ze = "tooltip" }, Ge) => {
|
|
878
|
-
const [J, Ne] = X(n), [se, we] = X(r), [Ue, be] = X(a), [Rt, te] = X(c), [mt, Ae] = X(f), [Te, W] = X(g), [Fe, Je] = X(A), [Qe, et] = X(b), [yt, Pe] = X(S), [xe, tt] = X(y), [Re, je] = X(p), [nt, Be] = X(v), [ot, ae] = X(null), [K, ht] = X(null), rt = ce(_), { anchorRefs: Ie, activeAnchor: lt } = Cn(e), Me = (U) => U == null ? void 0 : U.getAttributeNames().reduce((re, w) => {
|
|
879
|
-
var O;
|
|
880
|
-
return w.startsWith("data-tooltip-") && (re[w.replace(/^data-tooltip-/, "")] = (O = U == null ? void 0 : U.getAttribute(w)) !== null && O !== void 0 ? O : null), re;
|
|
881
|
-
}, {}), ze = (U) => {
|
|
882
|
-
const re = { place: (w) => {
|
|
883
|
-
var O;
|
|
884
|
-
be((O = w) !== null && O !== void 0 ? O : a);
|
|
885
|
-
}, content: (w) => {
|
|
886
|
-
Ne(w ?? n);
|
|
887
|
-
}, html: (w) => {
|
|
888
|
-
we(w ?? r);
|
|
889
|
-
}, variant: (w) => {
|
|
890
|
-
var O;
|
|
891
|
-
te((O = w) !== null && O !== void 0 ? O : c);
|
|
892
|
-
}, offset: (w) => {
|
|
893
|
-
Ae(w === null ? f : Number(w));
|
|
894
|
-
}, wrapper: (w) => {
|
|
895
|
-
var O;
|
|
896
|
-
tt((O = w) !== null && O !== void 0 ? O : y);
|
|
897
|
-
}, events: (w) => {
|
|
898
|
-
const O = w == null ? void 0 : w.split(" ");
|
|
899
|
-
je(O ?? p);
|
|
900
|
-
}, "position-strategy": (w) => {
|
|
901
|
-
var O;
|
|
902
|
-
Be((O = w) !== null && O !== void 0 ? O : v);
|
|
903
|
-
}, "delay-show": (w) => {
|
|
904
|
-
W(w === null ? g : Number(w));
|
|
905
|
-
}, "delay-hide": (w) => {
|
|
906
|
-
Je(w === null ? A : Number(w));
|
|
907
|
-
}, float: (w) => {
|
|
908
|
-
et(w === null ? b : w === "true");
|
|
909
|
-
}, hidden: (w) => {
|
|
910
|
-
Pe(w === null ? S : w === "true");
|
|
911
|
-
}, "class-name": (w) => {
|
|
912
|
-
ae(w);
|
|
913
|
-
} };
|
|
914
|
-
Object.values(re).forEach((w) => w(null)), Object.entries(U).forEach(([w, O]) => {
|
|
915
|
-
var ne;
|
|
916
|
-
(ne = re[w]) === null || ne === void 0 || ne.call(re, O);
|
|
917
|
-
});
|
|
918
|
-
};
|
|
919
|
-
B(() => {
|
|
920
|
-
Ne(n);
|
|
921
|
-
}, [n]), B(() => {
|
|
922
|
-
we(r);
|
|
923
|
-
}, [r]), B(() => {
|
|
924
|
-
be(a);
|
|
925
|
-
}, [a]), B(() => {
|
|
926
|
-
te(c);
|
|
927
|
-
}, [c]), B(() => {
|
|
928
|
-
Ae(f);
|
|
929
|
-
}, [f]), B(() => {
|
|
930
|
-
W(g);
|
|
931
|
-
}, [g]), B(() => {
|
|
932
|
-
Je(A);
|
|
933
|
-
}, [A]), B(() => {
|
|
934
|
-
et(b);
|
|
935
|
-
}, [b]), B(() => {
|
|
936
|
-
Pe(S);
|
|
937
|
-
}, [S]), B(() => {
|
|
938
|
-
Be(v);
|
|
939
|
-
}, [v]), B(() => {
|
|
940
|
-
rt.current !== _ && console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.");
|
|
941
|
-
}, [_]), B(() => {
|
|
942
|
-
typeof window < "u" && window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles", { detail: { disableCore: _ === "core", disableBase: _ } }));
|
|
943
|
-
}, []), B(() => {
|
|
944
|
-
var U;
|
|
945
|
-
const re = new Set(Ie);
|
|
946
|
-
let w = o;
|
|
947
|
-
if (!w && e && (w = `[data-tooltip-id='${e.replace(/'/g, "\\'")}']`), w) try {
|
|
948
|
-
document.querySelectorAll(w).forEach((x) => {
|
|
949
|
-
re.add({ current: x });
|
|
950
|
-
});
|
|
951
|
-
} catch {
|
|
952
|
-
console.warn(`[react-tooltip] "${w}" is not a valid CSS selector`);
|
|
953
|
-
}
|
|
954
|
-
const O = document.querySelector(`[id='${t}']`);
|
|
955
|
-
if (O && re.add({ current: O }), !re.size) return () => null;
|
|
956
|
-
const ne = (U = K ?? O) !== null && U !== void 0 ? U : lt.current, ke = new MutationObserver((x) => {
|
|
957
|
-
x.forEach((E) => {
|
|
958
|
-
var Z;
|
|
959
|
-
if (!ne || E.type !== "attributes" || !(!((Z = E.attributeName) === null || Z === void 0) && Z.startsWith("data-tooltip-"))) return;
|
|
960
|
-
const ee = Me(ne);
|
|
961
|
-
ze(ee);
|
|
962
|
-
});
|
|
963
|
-
}), d = { attributes: !0, childList: !1, subtree: !1 };
|
|
964
|
-
if (ne) {
|
|
965
|
-
const x = Me(ne);
|
|
966
|
-
ze(x), ke.observe(ne, d);
|
|
967
|
-
}
|
|
968
|
-
return () => {
|
|
969
|
-
ke.disconnect();
|
|
970
|
-
};
|
|
971
|
-
}, [Ie, lt, K, t, o]), B(() => {
|
|
972
|
-
R != null && R.border && console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."), $ && !pn("border", `${$}`) && console.warn(`[react-tooltip] "${$}" is not a valid \`border\`.`), R != null && R.opacity && console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."), H && !pn("opacity", `${H}`) && console.warn(`[react-tooltip] "${H}" is not a valid \`opacity\`.`);
|
|
973
|
-
}, []);
|
|
974
|
-
let He = h;
|
|
975
|
-
const it = ce(null);
|
|
976
|
-
if (l) {
|
|
977
|
-
const U = l({ content: (K == null ? void 0 : K.getAttribute("data-tooltip-content")) || J || null, activeAnchor: K });
|
|
978
|
-
He = U ? Oe.createElement("div", { ref: it, className: "react-tooltip-content-wrapper" }, U) : null;
|
|
979
|
-
} else J && (He = J);
|
|
980
|
-
se && (He = Oe.createElement(io, { content: se }));
|
|
981
|
-
const vt = { forwardRef: Ge, id: e, anchorId: t, anchorSelect: o, className: Ht(s, ot), classNameArrow: i, content: He, contentWrapperRef: it, place: Ue, variant: Rt, offset: mt, wrapper: xe, events: Re, openOnClick: u, positionStrategy: nt, middlewares: m, delayShow: Te, delayHide: Fe, float: Qe, hidden: yt, noArrow: L, clickable: k, closeOnEsc: T, closeOnScroll: I, closeOnResize: q, openEvents: V, closeEvents: M, globalCloseEvents: G, imperativeModeOnly: Y, style: R, position: P, isOpen: C, defaultIsOpen: D, border: $, opacity: H, arrowColor: N, setIsOpen: ge, afterShow: Se, afterHide: Ee, disableTooltip: $e, activeAnchor: K, setActiveAnchor: (U) => ht(U), role: Ze };
|
|
982
|
-
return Oe.createElement(lo, { ...vt });
|
|
983
|
-
});
|
|
984
|
-
typeof window < "u" && window.addEventListener("react-tooltip-inject-styles", (e) => {
|
|
985
|
-
e.detail.disableCore || dn({ css: ":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}", type: "core" }), e.detail.disableBase || dn({ css: `
|
|
986
|
-
.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`, type: "base" });
|
|
987
|
-
});
|
|
988
|
-
const so = gn(qn)``, ao = gn.div`
|
|
989
|
-
${({ theme: e, $maxWidth: t = "320px" }) => `
|
|
990
|
-
> :is(.react-tooltip, .react-tooltip__show, .react-tooltip__closing) {
|
|
991
|
-
background-color: ${e.palette.gray[700]};
|
|
992
|
-
border-radius: 8px;
|
|
993
|
-
color: ${e.palette.white};
|
|
994
|
-
font-size: ${e.typography.text.xs};
|
|
995
|
-
max-width: ${t};
|
|
996
|
-
padding: ${e.spacing[0.75]};
|
|
997
|
-
z-index: 999999;
|
|
998
|
-
--rt-opacity: 1;
|
|
999
|
-
}
|
|
1000
|
-
`}
|
|
1001
|
-
`, So = Bn(function({ children: e, disabled: t = !1, display: o = "inline-block", effect: n = "solid", icon: r, iconColor: l, iconSize: s, id: i, maxWidth: c, nodeTip: a, place: f = "bottom", tip: y = "", title: h = "", hide: p = y === "" && h === "" && a === void 0, ...u }, v) {
|
|
1002
|
-
const m = Wn(), [g, A] = X(!1), b = ce(null), S = jt(() => {
|
|
1003
|
-
b.current !== null && clearTimeout(b.current), b.current = setTimeout(() => {
|
|
1004
|
-
A(!0);
|
|
1005
|
-
}, 100);
|
|
1006
|
-
}, []), L = jt(() => {
|
|
1007
|
-
b.current !== null && clearTimeout(b.current), b.current = setTimeout(() => {
|
|
1008
|
-
A(!1);
|
|
1009
|
-
}, 100);
|
|
1010
|
-
}, []);
|
|
1011
|
-
return t ? at(In, { children: e }) : Jt(so, { "data-tooltip-id": i, display: o, onMouseLeave: L, onMouseMove: S, ref: v, role: "tooltip", ...u, children: [r ? at(Vn, { clickable: !0, disabled: t, icon: r, iconColor: l, iconSize: s ?? "xxs", iconType: g ? "fa-solid" : "fa-light" }) : e, zn(at(ao, { $maxWidth: c, children: Jt(co, { delayShow: 500, float: n === "float" || void 0, globalCloseEvents: { resize: !0 }, hidden: p || !g, id: i, middlewares: [(k = { fallbackAxisSideDirection: "start" }, { ...On(k), options: [k, T] }), eo({ mainAxis: 10 })], noArrow: n === "float", place: f, children: [Lt(h) ? void 0 : at(Qt, { color: m.palette.white, fontWeight: "bold", lineSpacing: 1.5, size: "xs", textAlign: "start", wordWrap: "break-word", children: h }), Lt(y) ? void 0 : at(Qt, { color: m.palette.gray[100], lineSpacing: 1.5, size: "xs", textAlign: "start", wordWrap: "break-word", children: y }), Lt(a) ? void 0 : a] }) }), document.getElementById("root") ?? document.body)] });
|
|
1012
|
-
var k, T;
|
|
1013
|
-
});
|
|
1014
|
-
export {
|
|
1015
|
-
So as T,
|
|
1016
|
-
Fn as a,
|
|
1017
|
-
_o as u
|
|
1018
|
-
};
|