tgui-core 1.8.4 → 2.0.1
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/common/constants.d.ts +4 -0
- package/dist/common/constants.js +17 -0
- package/dist/common/hotkeys.js +48 -48
- package/dist/common/ui.d.ts +6 -0
- package/dist/common/ui.js +63 -59
- package/dist/components/AnimatedNumber.d.ts +1 -1
- package/dist/components/Button.d.ts +3 -3
- package/dist/components/Button.js +21 -22
- package/dist/components/Chart.d.ts +3 -15
- package/dist/components/Chart.js +68 -86
- package/dist/components/ColorBox.js +3 -3
- package/dist/components/Dialog.d.ts +16 -0
- package/dist/components/Dialog.js +5 -5
- package/dist/components/DmIcon.d.ts +1 -1
- package/dist/components/DraggableControl.d.ts +56 -0
- package/dist/components/DraggableControl.js +126 -176
- package/dist/components/Dropdown.d.ts +8 -6
- package/dist/components/Dropdown.js +137 -129
- package/dist/components/FitText.d.ts +1 -1
- package/dist/components/Floating.d.ts +75 -0
- package/dist/components/Floating.js +2235 -0
- package/dist/components/ImageButton.d.ts +2 -3
- package/dist/components/ImageButton.js +88 -98
- package/dist/components/InfinitePlane.d.ts +35 -32
- package/dist/components/InfinitePlane.js +123 -133
- package/dist/components/Knob.d.ts +22 -6
- package/dist/components/Knob.js +45 -46
- package/dist/components/MenuBar.js +81 -97
- package/dist/components/Modal.js +12 -12
- package/dist/components/NumberInput.d.ts +1 -1
- package/dist/components/Popper.d.ts +5 -1
- package/dist/components/Popper.js +1026 -121
- package/dist/components/ProgressBar.js +3 -3
- package/dist/components/RoundGauge.js +30 -30
- package/dist/components/Section.js +7 -7
- package/dist/components/Slider.d.ts +22 -6
- package/dist/components/Slider.js +55 -56
- package/dist/components/Stack.js +3 -3
- package/dist/components/Table.js +7 -7
- package/dist/components/Tabs.js +7 -7
- package/dist/components/TextArea.d.ts +17 -0
- package/dist/components/TextArea.js +35 -33
- package/dist/components/Tooltip.d.ts +3 -34
- package/dist/components/Tooltip.js +14 -77
- package/dist/components/TrackOutsideClicks.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +64 -62
- package/package.json +26 -27
- package/styles/base.scss +13 -11
- package/styles/colors.scss +63 -67
- package/styles/components/BlockQuote.scss +5 -8
- package/styles/components/Button.scss +123 -99
- package/styles/components/Dialog.scss +23 -30
- package/styles/components/Dimmer.scss +3 -8
- package/styles/components/Divider.scss +6 -7
- package/styles/components/Dropdown.scss +103 -51
- package/styles/components/Flex.scss +0 -1
- package/styles/components/Floating.scss +60 -0
- package/styles/components/ImageButton.scss +136 -192
- package/styles/components/Input.scss +24 -26
- package/styles/components/Knob.scss +37 -41
- package/styles/components/LabeledList.scss +8 -6
- package/styles/components/MenuBar.scss +17 -21
- package/styles/components/Modal.scss +8 -7
- package/styles/components/NoticeBox.scss +22 -26
- package/styles/components/NumberInput.scss +30 -28
- package/styles/components/ProgressBar.scss +27 -19
- package/styles/components/RoundGauge.scss +46 -26
- package/styles/components/Section.scss +17 -32
- package/styles/components/Slider.scss +18 -15
- package/styles/components/Stack.scss +8 -48
- package/styles/components/Table.scss +2 -2
- package/styles/components/Tabs.scss +92 -66
- package/styles/components/TextArea.scss +32 -36
- package/styles/components/Tooltip.scss +10 -13
- package/styles/functions.scss +1 -62
- package/styles/main.scss +6 -1
- package/styles/reset.scss +7 -11
- package/styles/vars-colors.scss +108 -0
- package/styles/vars-components.scss +162 -0
- package/styles/vars-values.scss +110 -0
- package/dist/popper-CiqSDJTE.js +0 -906
|
@@ -1,85 +1,990 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { useState as
|
|
4
|
-
import * as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return n[o] = u, n;
|
|
1
|
+
import { jsxs as wt, Fragment as bt, jsx as Ne } from "react/jsx-runtime";
|
|
2
|
+
import * as G from "react";
|
|
3
|
+
import { useState as Ue, useRef as ze, useEffect as Ot } from "react";
|
|
4
|
+
import * as xt from "react-dom";
|
|
5
|
+
var Xe = function(t) {
|
|
6
|
+
return t.reduce(function(r, n) {
|
|
7
|
+
var a = n[0], o = n[1];
|
|
8
|
+
return r[a] = o, r;
|
|
10
9
|
}, {});
|
|
11
|
-
},
|
|
10
|
+
}, Ye = typeof window < "u" && window.document && window.document.createElement ? G.useLayoutEffect : G.useEffect, D = "top", L = "bottom", T = "right", B = "left", je = "auto", ue = [D, L, T, B], Q = "start", se = "end", Et = "clippingParents", at = "viewport", ae = "popper", At = "reference", Ge = /* @__PURE__ */ ue.reduce(function(e, t) {
|
|
11
|
+
return e.concat([t + "-" + Q, t + "-" + se]);
|
|
12
|
+
}, []), ot = /* @__PURE__ */ [].concat(ue, [je]).reduce(function(e, t) {
|
|
13
|
+
return e.concat([t, t + "-" + Q, t + "-" + se]);
|
|
14
|
+
}, []), Pt = "beforeRead", Rt = "read", jt = "afterRead", St = "beforeMain", Dt = "main", Bt = "afterMain", Ct = "beforeWrite", $t = "write", Mt = "afterWrite", Lt = [Pt, Rt, jt, St, Dt, Bt, Ct, $t, Mt];
|
|
15
|
+
function H(e) {
|
|
16
|
+
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
17
|
+
}
|
|
18
|
+
function $(e) {
|
|
19
|
+
if (e == null)
|
|
20
|
+
return window;
|
|
21
|
+
if (e.toString() !== "[object Window]") {
|
|
22
|
+
var t = e.ownerDocument;
|
|
23
|
+
return t && t.defaultView || window;
|
|
24
|
+
}
|
|
25
|
+
return e;
|
|
26
|
+
}
|
|
27
|
+
function J(e) {
|
|
28
|
+
var t = $(e).Element;
|
|
29
|
+
return e instanceof t || e instanceof Element;
|
|
30
|
+
}
|
|
31
|
+
function M(e) {
|
|
32
|
+
var t = $(e).HTMLElement;
|
|
33
|
+
return e instanceof t || e instanceof HTMLElement;
|
|
34
|
+
}
|
|
35
|
+
function Se(e) {
|
|
36
|
+
if (typeof ShadowRoot > "u")
|
|
37
|
+
return !1;
|
|
38
|
+
var t = $(e).ShadowRoot;
|
|
39
|
+
return e instanceof t || e instanceof ShadowRoot;
|
|
40
|
+
}
|
|
41
|
+
function Tt(e) {
|
|
42
|
+
var t = e.state;
|
|
43
|
+
Object.keys(t.elements).forEach(function(r) {
|
|
44
|
+
var n = t.styles[r] || {}, a = t.attributes[r] || {}, o = t.elements[r];
|
|
45
|
+
!M(o) || !H(o) || (Object.assign(o.style, n), Object.keys(a).forEach(function(s) {
|
|
46
|
+
var f = a[s];
|
|
47
|
+
f === !1 ? o.removeAttribute(s) : o.setAttribute(s, f === !0 ? "" : f);
|
|
48
|
+
}));
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function kt(e) {
|
|
52
|
+
var t = e.state, r = {
|
|
53
|
+
popper: {
|
|
54
|
+
position: t.options.strategy,
|
|
55
|
+
left: "0",
|
|
56
|
+
top: "0",
|
|
57
|
+
margin: "0"
|
|
58
|
+
},
|
|
59
|
+
arrow: {
|
|
60
|
+
position: "absolute"
|
|
61
|
+
},
|
|
62
|
+
reference: {}
|
|
63
|
+
};
|
|
64
|
+
return Object.assign(t.elements.popper.style, r.popper), t.styles = r, t.elements.arrow && Object.assign(t.elements.arrow.style, r.arrow), function() {
|
|
65
|
+
Object.keys(t.elements).forEach(function(n) {
|
|
66
|
+
var a = t.elements[n], o = t.attributes[n] || {}, s = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : r[n]), f = s.reduce(function(i, c) {
|
|
67
|
+
return i[c] = "", i;
|
|
68
|
+
}, {});
|
|
69
|
+
!M(a) || !H(a) || (Object.assign(a.style, f), Object.keys(o).forEach(function(i) {
|
|
70
|
+
a.removeAttribute(i);
|
|
71
|
+
}));
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
const Wt = {
|
|
76
|
+
name: "applyStyles",
|
|
77
|
+
enabled: !0,
|
|
78
|
+
phase: "write",
|
|
79
|
+
fn: Tt,
|
|
80
|
+
effect: kt,
|
|
81
|
+
requires: ["computeStyles"]
|
|
82
|
+
};
|
|
83
|
+
function F(e) {
|
|
84
|
+
return e.split("-")[0];
|
|
85
|
+
}
|
|
86
|
+
var Z = Math.max, ge = Math.min, _ = Math.round;
|
|
87
|
+
function Pe() {
|
|
88
|
+
var e = navigator.userAgentData;
|
|
89
|
+
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
90
|
+
return t.brand + "/" + t.version;
|
|
91
|
+
}).join(" ") : navigator.userAgent;
|
|
92
|
+
}
|
|
93
|
+
function it() {
|
|
94
|
+
return !/^((?!chrome|android).)*safari/i.test(Pe());
|
|
95
|
+
}
|
|
96
|
+
function ee(e, t, r) {
|
|
97
|
+
t === void 0 && (t = !1), r === void 0 && (r = !1);
|
|
98
|
+
var n = e.getBoundingClientRect(), a = 1, o = 1;
|
|
99
|
+
t && M(e) && (a = e.offsetWidth > 0 && _(n.width) / e.offsetWidth || 1, o = e.offsetHeight > 0 && _(n.height) / e.offsetHeight || 1);
|
|
100
|
+
var s = J(e) ? $(e) : window, f = s.visualViewport, i = !it() && r, c = (n.left + (i && f ? f.offsetLeft : 0)) / a, u = (n.top + (i && f ? f.offsetTop : 0)) / o, l = n.width / a, m = n.height / o;
|
|
101
|
+
return {
|
|
102
|
+
width: l,
|
|
103
|
+
height: m,
|
|
104
|
+
top: u,
|
|
105
|
+
right: c + l,
|
|
106
|
+
bottom: u + m,
|
|
107
|
+
left: c,
|
|
108
|
+
x: c,
|
|
109
|
+
y: u
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function De(e) {
|
|
113
|
+
var t = ee(e), r = e.offsetWidth, n = e.offsetHeight;
|
|
114
|
+
return Math.abs(t.width - r) <= 1 && (r = t.width), Math.abs(t.height - n) <= 1 && (n = t.height), {
|
|
115
|
+
x: e.offsetLeft,
|
|
116
|
+
y: e.offsetTop,
|
|
117
|
+
width: r,
|
|
118
|
+
height: n
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
function st(e, t) {
|
|
122
|
+
var r = t.getRootNode && t.getRootNode();
|
|
123
|
+
if (e.contains(t))
|
|
124
|
+
return !0;
|
|
125
|
+
if (r && Se(r)) {
|
|
126
|
+
var n = t;
|
|
127
|
+
do {
|
|
128
|
+
if (n && e.isSameNode(n))
|
|
129
|
+
return !0;
|
|
130
|
+
n = n.parentNode || n.host;
|
|
131
|
+
} while (n);
|
|
132
|
+
}
|
|
133
|
+
return !1;
|
|
134
|
+
}
|
|
135
|
+
function V(e) {
|
|
136
|
+
return $(e).getComputedStyle(e);
|
|
137
|
+
}
|
|
138
|
+
function Ft(e) {
|
|
139
|
+
return ["table", "td", "th"].indexOf(H(e)) >= 0;
|
|
140
|
+
}
|
|
12
141
|
function I(e) {
|
|
13
|
-
return
|
|
142
|
+
return ((J(e) ? e.ownerDocument : (
|
|
143
|
+
// $FlowFixMe[prop-missing]
|
|
144
|
+
e.document
|
|
145
|
+
)) || window.document).documentElement;
|
|
14
146
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
147
|
+
function we(e) {
|
|
148
|
+
return H(e) === "html" ? e : (
|
|
149
|
+
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
150
|
+
// $FlowFixMe[incompatible-return]
|
|
151
|
+
// $FlowFixMe[prop-missing]
|
|
152
|
+
e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
153
|
+
e.parentNode || // DOM Element detected
|
|
154
|
+
(Se(e) ? e.host : null) || // ShadowRoot detected
|
|
155
|
+
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
156
|
+
I(e)
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
function Ze(e) {
|
|
160
|
+
return !M(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
161
|
+
V(e).position === "fixed" ? null : e.offsetParent;
|
|
162
|
+
}
|
|
163
|
+
function Ht(e) {
|
|
164
|
+
var t = /firefox/i.test(Pe()), r = /Trident/i.test(Pe());
|
|
165
|
+
if (r && M(e)) {
|
|
166
|
+
var n = V(e);
|
|
167
|
+
if (n.position === "fixed")
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
var a = we(e);
|
|
171
|
+
for (Se(a) && (a = a.host); M(a) && ["html", "body"].indexOf(H(a)) < 0; ) {
|
|
172
|
+
var o = V(a);
|
|
173
|
+
if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || t && o.willChange === "filter" || t && o.filter && o.filter !== "none")
|
|
174
|
+
return a;
|
|
175
|
+
a = a.parentNode;
|
|
176
|
+
}
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
function ce(e) {
|
|
180
|
+
for (var t = $(e), r = Ze(e); r && Ft(r) && V(r).position === "static"; )
|
|
181
|
+
r = Ze(r);
|
|
182
|
+
return r && (H(r) === "html" || H(r) === "body" && V(r).position === "static") ? t : r || Ht(e) || t;
|
|
183
|
+
}
|
|
184
|
+
function Be(e) {
|
|
185
|
+
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
186
|
+
}
|
|
187
|
+
function oe(e, t, r) {
|
|
188
|
+
return Z(e, ge(t, r));
|
|
189
|
+
}
|
|
190
|
+
function Vt(e, t, r) {
|
|
191
|
+
var n = oe(e, t, r);
|
|
192
|
+
return n > r ? r : n;
|
|
193
|
+
}
|
|
194
|
+
function ft() {
|
|
195
|
+
return {
|
|
196
|
+
top: 0,
|
|
197
|
+
right: 0,
|
|
198
|
+
bottom: 0,
|
|
199
|
+
left: 0
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
function ut(e) {
|
|
203
|
+
return Object.assign({}, ft(), e);
|
|
204
|
+
}
|
|
205
|
+
function ct(e, t) {
|
|
206
|
+
return t.reduce(function(r, n) {
|
|
207
|
+
return r[n] = e, r;
|
|
208
|
+
}, {});
|
|
209
|
+
}
|
|
210
|
+
var qt = function(t, r) {
|
|
211
|
+
return t = typeof t == "function" ? t(Object.assign({}, r.rects, {
|
|
212
|
+
placement: r.placement
|
|
213
|
+
})) : t, ut(typeof t != "number" ? t : ct(t, ue));
|
|
214
|
+
};
|
|
215
|
+
function It(e) {
|
|
216
|
+
var t, r = e.state, n = e.name, a = e.options, o = r.elements.arrow, s = r.modifiersData.popperOffsets, f = F(r.placement), i = Be(f), c = [B, T].indexOf(f) >= 0, u = c ? "height" : "width";
|
|
217
|
+
if (!(!o || !s)) {
|
|
218
|
+
var l = qt(a.padding, r), m = De(o), p = i === "y" ? D : B, y = i === "y" ? L : T, v = r.rects.reference[u] + r.rects.reference[i] - s[i] - r.rects.popper[u], d = s[i] - r.rects.reference[i], g = ce(o), x = g ? i === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, E = v / 2 - d / 2, h = l[p], w = x - m[u] - l[y], b = x / 2 - m[u] / 2 + E, O = oe(h, b, w), R = i;
|
|
219
|
+
r.modifiersData[n] = (t = {}, t[R] = O, t.centerOffset = O - b, t);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
function Nt(e) {
|
|
223
|
+
var t = e.state, r = e.options, n = r.element, a = n === void 0 ? "[data-popper-arrow]" : n;
|
|
224
|
+
a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || st(t.elements.popper, a) && (t.elements.arrow = a));
|
|
225
|
+
}
|
|
226
|
+
const Ut = {
|
|
227
|
+
name: "arrow",
|
|
228
|
+
enabled: !0,
|
|
229
|
+
phase: "main",
|
|
230
|
+
fn: It,
|
|
231
|
+
effect: Nt,
|
|
232
|
+
requires: ["popperOffsets"],
|
|
233
|
+
requiresIfExists: ["preventOverflow"]
|
|
234
|
+
};
|
|
235
|
+
function te(e) {
|
|
236
|
+
return e.split("-")[1];
|
|
237
|
+
}
|
|
238
|
+
var zt = {
|
|
239
|
+
top: "auto",
|
|
240
|
+
right: "auto",
|
|
241
|
+
bottom: "auto",
|
|
242
|
+
left: "auto"
|
|
243
|
+
};
|
|
244
|
+
function Xt(e, t) {
|
|
245
|
+
var r = e.x, n = e.y, a = t.devicePixelRatio || 1;
|
|
246
|
+
return {
|
|
247
|
+
x: _(r * a) / a || 0,
|
|
248
|
+
y: _(n * a) / a || 0
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
function Je(e) {
|
|
252
|
+
var t, r = e.popper, n = e.popperRect, a = e.placement, o = e.variation, s = e.offsets, f = e.position, i = e.gpuAcceleration, c = e.adaptive, u = e.roundOffsets, l = e.isFixed, m = s.x, p = m === void 0 ? 0 : m, y = s.y, v = y === void 0 ? 0 : y, d = typeof u == "function" ? u({
|
|
253
|
+
x: p,
|
|
254
|
+
y: v
|
|
255
|
+
}) : {
|
|
256
|
+
x: p,
|
|
257
|
+
y: v
|
|
258
|
+
};
|
|
259
|
+
p = d.x, v = d.y;
|
|
260
|
+
var g = s.hasOwnProperty("x"), x = s.hasOwnProperty("y"), E = B, h = D, w = window;
|
|
261
|
+
if (c) {
|
|
262
|
+
var b = ce(r), O = "clientHeight", R = "clientWidth";
|
|
263
|
+
if (b === $(r) && (b = I(r), V(b).position !== "static" && f === "absolute" && (O = "scrollHeight", R = "scrollWidth")), b = b, a === D || (a === B || a === T) && o === se) {
|
|
264
|
+
h = L;
|
|
265
|
+
var P = l && b === w && w.visualViewport ? w.visualViewport.height : (
|
|
266
|
+
// $FlowFixMe[prop-missing]
|
|
267
|
+
b[O]
|
|
268
|
+
);
|
|
269
|
+
v -= P - n.height, v *= i ? 1 : -1;
|
|
26
270
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return !0;
|
|
271
|
+
if (a === B || (a === D || a === L) && o === se) {
|
|
272
|
+
E = T;
|
|
273
|
+
var A = l && b === w && w.visualViewport ? w.visualViewport.width : (
|
|
274
|
+
// $FlowFixMe[prop-missing]
|
|
275
|
+
b[R]
|
|
276
|
+
);
|
|
277
|
+
p -= A - n.width, p *= i ? 1 : -1;
|
|
35
278
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
279
|
+
}
|
|
280
|
+
var j = Object.assign({
|
|
281
|
+
position: f
|
|
282
|
+
}, c && zt), k = u === !0 ? Xt({
|
|
283
|
+
x: p,
|
|
284
|
+
y: v
|
|
285
|
+
}, $(r)) : {
|
|
286
|
+
x: p,
|
|
287
|
+
y: v
|
|
288
|
+
};
|
|
289
|
+
if (p = k.x, v = k.y, i) {
|
|
290
|
+
var S;
|
|
291
|
+
return Object.assign({}, j, (S = {}, S[h] = x ? "0" : "", S[E] = g ? "0" : "", S.transform = (w.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + v + "px)" : "translate3d(" + p + "px, " + v + "px, 0)", S));
|
|
292
|
+
}
|
|
293
|
+
return Object.assign({}, j, (t = {}, t[h] = x ? v + "px" : "", t[E] = g ? p + "px" : "", t.transform = "", t));
|
|
294
|
+
}
|
|
295
|
+
function Yt(e) {
|
|
296
|
+
var t = e.state, r = e.options, n = r.gpuAcceleration, a = n === void 0 ? !0 : n, o = r.adaptive, s = o === void 0 ? !0 : o, f = r.roundOffsets, i = f === void 0 ? !0 : f, c = {
|
|
297
|
+
placement: F(t.placement),
|
|
298
|
+
variation: te(t.placement),
|
|
299
|
+
popper: t.elements.popper,
|
|
300
|
+
popperRect: t.rects.popper,
|
|
301
|
+
gpuAcceleration: a,
|
|
302
|
+
isFixed: t.options.strategy === "fixed"
|
|
303
|
+
};
|
|
304
|
+
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Je(Object.assign({}, c, {
|
|
305
|
+
offsets: t.modifiersData.popperOffsets,
|
|
306
|
+
position: t.options.strategy,
|
|
307
|
+
adaptive: s,
|
|
308
|
+
roundOffsets: i
|
|
309
|
+
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Je(Object.assign({}, c, {
|
|
310
|
+
offsets: t.modifiersData.arrow,
|
|
311
|
+
position: "absolute",
|
|
312
|
+
adaptive: !1,
|
|
313
|
+
roundOffsets: i
|
|
314
|
+
})))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
315
|
+
"data-popper-placement": t.placement
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
const Gt = {
|
|
319
|
+
name: "computeStyles",
|
|
320
|
+
enabled: !0,
|
|
321
|
+
phase: "beforeWrite",
|
|
322
|
+
fn: Yt,
|
|
323
|
+
data: {}
|
|
324
|
+
};
|
|
325
|
+
var he = {
|
|
326
|
+
passive: !0
|
|
327
|
+
};
|
|
328
|
+
function Zt(e) {
|
|
329
|
+
var t = e.state, r = e.instance, n = e.options, a = n.scroll, o = a === void 0 ? !0 : a, s = n.resize, f = s === void 0 ? !0 : s, i = $(t.elements.popper), c = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
330
|
+
return o && c.forEach(function(u) {
|
|
331
|
+
u.addEventListener("scroll", r.update, he);
|
|
332
|
+
}), f && i.addEventListener("resize", r.update, he), function() {
|
|
333
|
+
o && c.forEach(function(u) {
|
|
334
|
+
u.removeEventListener("scroll", r.update, he);
|
|
335
|
+
}), f && i.removeEventListener("resize", r.update, he);
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
const Jt = {
|
|
339
|
+
name: "eventListeners",
|
|
340
|
+
enabled: !0,
|
|
341
|
+
phase: "write",
|
|
342
|
+
fn: function() {
|
|
343
|
+
},
|
|
344
|
+
effect: Zt,
|
|
345
|
+
data: {}
|
|
346
|
+
};
|
|
347
|
+
var Kt = {
|
|
348
|
+
left: "right",
|
|
349
|
+
right: "left",
|
|
350
|
+
bottom: "top",
|
|
351
|
+
top: "bottom"
|
|
352
|
+
};
|
|
353
|
+
function ye(e) {
|
|
354
|
+
return e.replace(/left|right|bottom|top/g, function(t) {
|
|
355
|
+
return Kt[t];
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
var Qt = {
|
|
359
|
+
start: "end",
|
|
360
|
+
end: "start"
|
|
361
|
+
};
|
|
362
|
+
function Ke(e) {
|
|
363
|
+
return e.replace(/start|end/g, function(t) {
|
|
364
|
+
return Qt[t];
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
function Ce(e) {
|
|
368
|
+
var t = $(e), r = t.pageXOffset, n = t.pageYOffset;
|
|
369
|
+
return {
|
|
370
|
+
scrollLeft: r,
|
|
371
|
+
scrollTop: n
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
function $e(e) {
|
|
375
|
+
return ee(I(e)).left + Ce(e).scrollLeft;
|
|
376
|
+
}
|
|
377
|
+
function _t(e, t) {
|
|
378
|
+
var r = $(e), n = I(e), a = r.visualViewport, o = n.clientWidth, s = n.clientHeight, f = 0, i = 0;
|
|
379
|
+
if (a) {
|
|
380
|
+
o = a.width, s = a.height;
|
|
381
|
+
var c = it();
|
|
382
|
+
(c || !c && t === "fixed") && (f = a.offsetLeft, i = a.offsetTop);
|
|
383
|
+
}
|
|
384
|
+
return {
|
|
385
|
+
width: o,
|
|
386
|
+
height: s,
|
|
387
|
+
x: f + $e(e),
|
|
388
|
+
y: i
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
function er(e) {
|
|
392
|
+
var t, r = I(e), n = Ce(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, o = Z(r.scrollWidth, r.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), s = Z(r.scrollHeight, r.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), f = -n.scrollLeft + $e(e), i = -n.scrollTop;
|
|
393
|
+
return V(a || r).direction === "rtl" && (f += Z(r.clientWidth, a ? a.clientWidth : 0) - o), {
|
|
394
|
+
width: o,
|
|
395
|
+
height: s,
|
|
396
|
+
x: f,
|
|
397
|
+
y: i
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
function Me(e) {
|
|
401
|
+
var t = V(e), r = t.overflow, n = t.overflowX, a = t.overflowY;
|
|
402
|
+
return /auto|scroll|overlay|hidden/.test(r + a + n);
|
|
403
|
+
}
|
|
404
|
+
function pt(e) {
|
|
405
|
+
return ["html", "body", "#document"].indexOf(H(e)) >= 0 ? e.ownerDocument.body : M(e) && Me(e) ? e : pt(we(e));
|
|
406
|
+
}
|
|
407
|
+
function ie(e, t) {
|
|
408
|
+
var r;
|
|
409
|
+
t === void 0 && (t = []);
|
|
410
|
+
var n = pt(e), a = n === ((r = e.ownerDocument) == null ? void 0 : r.body), o = $(n), s = a ? [o].concat(o.visualViewport || [], Me(n) ? n : []) : n, f = t.concat(s);
|
|
411
|
+
return a ? f : (
|
|
412
|
+
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
413
|
+
f.concat(ie(we(s)))
|
|
414
|
+
);
|
|
415
|
+
}
|
|
416
|
+
function Re(e) {
|
|
417
|
+
return Object.assign({}, e, {
|
|
418
|
+
left: e.x,
|
|
419
|
+
top: e.y,
|
|
420
|
+
right: e.x + e.width,
|
|
421
|
+
bottom: e.y + e.height
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
function tr(e, t) {
|
|
425
|
+
var r = ee(e, !1, t === "fixed");
|
|
426
|
+
return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r;
|
|
427
|
+
}
|
|
428
|
+
function Qe(e, t, r) {
|
|
429
|
+
return t === at ? Re(_t(e, r)) : J(t) ? tr(t, r) : Re(er(I(e)));
|
|
430
|
+
}
|
|
431
|
+
function rr(e) {
|
|
432
|
+
var t = ie(we(e)), r = ["absolute", "fixed"].indexOf(V(e).position) >= 0, n = r && M(e) ? ce(e) : e;
|
|
433
|
+
return J(n) ? t.filter(function(a) {
|
|
434
|
+
return J(a) && st(a, n) && H(a) !== "body";
|
|
435
|
+
}) : [];
|
|
436
|
+
}
|
|
437
|
+
function nr(e, t, r, n) {
|
|
438
|
+
var a = t === "clippingParents" ? rr(e) : [].concat(t), o = [].concat(a, [r]), s = o[0], f = o.reduce(function(i, c) {
|
|
439
|
+
var u = Qe(e, c, n);
|
|
440
|
+
return i.top = Z(u.top, i.top), i.right = ge(u.right, i.right), i.bottom = ge(u.bottom, i.bottom), i.left = Z(u.left, i.left), i;
|
|
441
|
+
}, Qe(e, s, n));
|
|
442
|
+
return f.width = f.right - f.left, f.height = f.bottom - f.top, f.x = f.left, f.y = f.top, f;
|
|
443
|
+
}
|
|
444
|
+
function lt(e) {
|
|
445
|
+
var t = e.reference, r = e.element, n = e.placement, a = n ? F(n) : null, o = n ? te(n) : null, s = t.x + t.width / 2 - r.width / 2, f = t.y + t.height / 2 - r.height / 2, i;
|
|
446
|
+
switch (a) {
|
|
447
|
+
case D:
|
|
448
|
+
i = {
|
|
449
|
+
x: s,
|
|
450
|
+
y: t.y - r.height
|
|
451
|
+
};
|
|
452
|
+
break;
|
|
453
|
+
case L:
|
|
454
|
+
i = {
|
|
455
|
+
x: s,
|
|
456
|
+
y: t.y + t.height
|
|
457
|
+
};
|
|
458
|
+
break;
|
|
459
|
+
case T:
|
|
460
|
+
i = {
|
|
461
|
+
x: t.x + t.width,
|
|
462
|
+
y: f
|
|
463
|
+
};
|
|
464
|
+
break;
|
|
465
|
+
case B:
|
|
466
|
+
i = {
|
|
467
|
+
x: t.x - r.width,
|
|
468
|
+
y: f
|
|
469
|
+
};
|
|
470
|
+
break;
|
|
471
|
+
default:
|
|
472
|
+
i = {
|
|
473
|
+
x: t.x,
|
|
474
|
+
y: t.y
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
var c = a ? Be(a) : null;
|
|
478
|
+
if (c != null) {
|
|
479
|
+
var u = c === "y" ? "height" : "width";
|
|
480
|
+
switch (o) {
|
|
481
|
+
case Q:
|
|
482
|
+
i[c] = i[c] - (t[u] / 2 - r[u] / 2);
|
|
483
|
+
break;
|
|
484
|
+
case se:
|
|
485
|
+
i[c] = i[c] + (t[u] / 2 - r[u] / 2);
|
|
486
|
+
break;
|
|
41
487
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
488
|
+
}
|
|
489
|
+
return i;
|
|
490
|
+
}
|
|
491
|
+
function fe(e, t) {
|
|
492
|
+
t === void 0 && (t = {});
|
|
493
|
+
var r = t, n = r.placement, a = n === void 0 ? e.placement : n, o = r.strategy, s = o === void 0 ? e.strategy : o, f = r.boundary, i = f === void 0 ? Et : f, c = r.rootBoundary, u = c === void 0 ? at : c, l = r.elementContext, m = l === void 0 ? ae : l, p = r.altBoundary, y = p === void 0 ? !1 : p, v = r.padding, d = v === void 0 ? 0 : v, g = ut(typeof d != "number" ? d : ct(d, ue)), x = m === ae ? At : ae, E = e.rects.popper, h = e.elements[y ? x : m], w = nr(J(h) ? h : h.contextElement || I(e.elements.popper), i, u, s), b = ee(e.elements.reference), O = lt({
|
|
494
|
+
reference: b,
|
|
495
|
+
element: E,
|
|
496
|
+
placement: a
|
|
497
|
+
}), R = Re(Object.assign({}, E, O)), P = m === ae ? R : b, A = {
|
|
498
|
+
top: w.top - P.top + g.top,
|
|
499
|
+
bottom: P.bottom - w.bottom + g.bottom,
|
|
500
|
+
left: w.left - P.left + g.left,
|
|
501
|
+
right: P.right - w.right + g.right
|
|
502
|
+
}, j = e.modifiersData.offset;
|
|
503
|
+
if (m === ae && j) {
|
|
504
|
+
var k = j[a];
|
|
505
|
+
Object.keys(A).forEach(function(S) {
|
|
506
|
+
var N = [T, L].indexOf(S) >= 0 ? 1 : -1, U = [D, L].indexOf(S) >= 0 ? "y" : "x";
|
|
507
|
+
A[S] += k[U] * N;
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
return A;
|
|
511
|
+
}
|
|
512
|
+
function ar(e, t) {
|
|
513
|
+
t === void 0 && (t = {});
|
|
514
|
+
var r = t, n = r.placement, a = r.boundary, o = r.rootBoundary, s = r.padding, f = r.flipVariations, i = r.allowedAutoPlacements, c = i === void 0 ? ot : i, u = te(n), l = u ? f ? Ge : Ge.filter(function(y) {
|
|
515
|
+
return te(y) === u;
|
|
516
|
+
}) : ue, m = l.filter(function(y) {
|
|
517
|
+
return c.indexOf(y) >= 0;
|
|
518
|
+
});
|
|
519
|
+
m.length === 0 && (m = l);
|
|
520
|
+
var p = m.reduce(function(y, v) {
|
|
521
|
+
return y[v] = fe(e, {
|
|
522
|
+
placement: v,
|
|
523
|
+
boundary: a,
|
|
524
|
+
rootBoundary: o,
|
|
525
|
+
padding: s
|
|
526
|
+
})[F(v)], y;
|
|
527
|
+
}, {});
|
|
528
|
+
return Object.keys(p).sort(function(y, v) {
|
|
529
|
+
return p[y] - p[v];
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
function or(e) {
|
|
533
|
+
if (F(e) === je)
|
|
534
|
+
return [];
|
|
535
|
+
var t = ye(e);
|
|
536
|
+
return [Ke(e), t, Ke(t)];
|
|
537
|
+
}
|
|
538
|
+
function ir(e) {
|
|
539
|
+
var t = e.state, r = e.options, n = e.name;
|
|
540
|
+
if (!t.modifiersData[n]._skip) {
|
|
541
|
+
for (var a = r.mainAxis, o = a === void 0 ? !0 : a, s = r.altAxis, f = s === void 0 ? !0 : s, i = r.fallbackPlacements, c = r.padding, u = r.boundary, l = r.rootBoundary, m = r.altBoundary, p = r.flipVariations, y = p === void 0 ? !0 : p, v = r.allowedAutoPlacements, d = t.options.placement, g = F(d), x = g === d, E = i || (x || !y ? [ye(d)] : or(d)), h = [d].concat(E).reduce(function(K, q) {
|
|
542
|
+
return K.concat(F(q) === je ? ar(t, {
|
|
543
|
+
placement: q,
|
|
544
|
+
boundary: u,
|
|
545
|
+
rootBoundary: l,
|
|
546
|
+
padding: c,
|
|
547
|
+
flipVariations: y,
|
|
548
|
+
allowedAutoPlacements: v
|
|
549
|
+
}) : q);
|
|
550
|
+
}, []), w = t.rects.reference, b = t.rects.popper, O = /* @__PURE__ */ new Map(), R = !0, P = h[0], A = 0; A < h.length; A++) {
|
|
551
|
+
var j = h[A], k = F(j), S = te(j) === Q, N = [D, L].indexOf(k) >= 0, U = N ? "width" : "height", C = fe(t, {
|
|
552
|
+
placement: j,
|
|
553
|
+
boundary: u,
|
|
554
|
+
rootBoundary: l,
|
|
555
|
+
altBoundary: m,
|
|
556
|
+
padding: c
|
|
557
|
+
}), W = N ? S ? T : B : S ? L : D;
|
|
558
|
+
w[U] > b[U] && (W = ye(W));
|
|
559
|
+
var pe = ye(W), z = [];
|
|
560
|
+
if (o && z.push(C[k] <= 0), f && z.push(C[W] <= 0, C[pe] <= 0), z.every(function(K) {
|
|
561
|
+
return K;
|
|
562
|
+
})) {
|
|
563
|
+
P = j, R = !1;
|
|
564
|
+
break;
|
|
565
|
+
}
|
|
566
|
+
O.set(j, z);
|
|
47
567
|
}
|
|
48
|
-
if (
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
568
|
+
if (R)
|
|
569
|
+
for (var le = y ? 3 : 1, be = function(q) {
|
|
570
|
+
var ne = h.find(function(de) {
|
|
571
|
+
var X = O.get(de);
|
|
572
|
+
if (X)
|
|
573
|
+
return X.slice(0, q).every(function(Oe) {
|
|
574
|
+
return Oe;
|
|
575
|
+
});
|
|
576
|
+
});
|
|
577
|
+
if (ne)
|
|
578
|
+
return P = ne, "break";
|
|
579
|
+
}, re = le; re > 0; re--) {
|
|
580
|
+
var ve = be(re);
|
|
581
|
+
if (ve === "break") break;
|
|
582
|
+
}
|
|
583
|
+
t.placement !== P && (t.modifiersData[n]._skip = !0, t.placement = P, t.reset = !0);
|
|
59
584
|
}
|
|
60
|
-
return e !== e && r !== r;
|
|
61
585
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
586
|
+
const sr = {
|
|
587
|
+
name: "flip",
|
|
588
|
+
enabled: !0,
|
|
589
|
+
phase: "main",
|
|
590
|
+
fn: ir,
|
|
591
|
+
requiresIfExists: ["offset"],
|
|
592
|
+
data: {
|
|
593
|
+
_skip: !1
|
|
69
594
|
}
|
|
70
595
|
};
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
596
|
+
function _e(e, t, r) {
|
|
597
|
+
return r === void 0 && (r = {
|
|
598
|
+
x: 0,
|
|
599
|
+
y: 0
|
|
600
|
+
}), {
|
|
601
|
+
top: e.top - t.height - r.y,
|
|
602
|
+
right: e.right - t.width + r.x,
|
|
603
|
+
bottom: e.bottom - t.height + r.y,
|
|
604
|
+
left: e.left - t.width - r.x
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
function et(e) {
|
|
608
|
+
return [D, T, L, B].some(function(t) {
|
|
609
|
+
return e[t] >= 0;
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
function fr(e) {
|
|
613
|
+
var t = e.state, r = e.name, n = t.rects.reference, a = t.rects.popper, o = t.modifiersData.preventOverflow, s = fe(t, {
|
|
614
|
+
elementContext: "reference"
|
|
615
|
+
}), f = fe(t, {
|
|
616
|
+
altBoundary: !0
|
|
617
|
+
}), i = _e(s, n), c = _e(f, a, o), u = et(i), l = et(c);
|
|
618
|
+
t.modifiersData[r] = {
|
|
619
|
+
referenceClippingOffsets: i,
|
|
620
|
+
popperEscapeOffsets: c,
|
|
621
|
+
isReferenceHidden: u,
|
|
622
|
+
hasPopperEscaped: l
|
|
623
|
+
}, t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
624
|
+
"data-popper-reference-hidden": u,
|
|
625
|
+
"data-popper-escaped": l
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
const ur = {
|
|
629
|
+
name: "hide",
|
|
630
|
+
enabled: !0,
|
|
631
|
+
phase: "main",
|
|
632
|
+
requiresIfExists: ["preventOverflow"],
|
|
633
|
+
fn: fr
|
|
634
|
+
};
|
|
635
|
+
function cr(e, t, r) {
|
|
636
|
+
var n = F(e), a = [B, D].indexOf(n) >= 0 ? -1 : 1, o = typeof r == "function" ? r(Object.assign({}, t, {
|
|
637
|
+
placement: e
|
|
638
|
+
})) : r, s = o[0], f = o[1];
|
|
639
|
+
return s = s || 0, f = (f || 0) * a, [B, T].indexOf(n) >= 0 ? {
|
|
640
|
+
x: f,
|
|
641
|
+
y: s
|
|
642
|
+
} : {
|
|
643
|
+
x: s,
|
|
644
|
+
y: f
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
function pr(e) {
|
|
648
|
+
var t = e.state, r = e.options, n = e.name, a = r.offset, o = a === void 0 ? [0, 0] : a, s = ot.reduce(function(u, l) {
|
|
649
|
+
return u[l] = cr(l, t.rects, o), u;
|
|
650
|
+
}, {}), f = s[t.placement], i = f.x, c = f.y;
|
|
651
|
+
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += i, t.modifiersData.popperOffsets.y += c), t.modifiersData[n] = s;
|
|
652
|
+
}
|
|
653
|
+
const lr = {
|
|
654
|
+
name: "offset",
|
|
655
|
+
enabled: !0,
|
|
656
|
+
phase: "main",
|
|
657
|
+
requires: ["popperOffsets"],
|
|
658
|
+
fn: pr
|
|
659
|
+
};
|
|
660
|
+
function vr(e) {
|
|
661
|
+
var t = e.state, r = e.name;
|
|
662
|
+
t.modifiersData[r] = lt({
|
|
663
|
+
reference: t.rects.reference,
|
|
664
|
+
element: t.rects.popper,
|
|
665
|
+
placement: t.placement
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
const dr = {
|
|
669
|
+
name: "popperOffsets",
|
|
670
|
+
enabled: !0,
|
|
671
|
+
phase: "read",
|
|
672
|
+
fn: vr,
|
|
673
|
+
data: {}
|
|
674
|
+
};
|
|
675
|
+
function mr(e) {
|
|
676
|
+
return e === "x" ? "y" : "x";
|
|
677
|
+
}
|
|
678
|
+
function hr(e) {
|
|
679
|
+
var t = e.state, r = e.options, n = e.name, a = r.mainAxis, o = a === void 0 ? !0 : a, s = r.altAxis, f = s === void 0 ? !1 : s, i = r.boundary, c = r.rootBoundary, u = r.altBoundary, l = r.padding, m = r.tether, p = m === void 0 ? !0 : m, y = r.tetherOffset, v = y === void 0 ? 0 : y, d = fe(t, {
|
|
680
|
+
boundary: i,
|
|
681
|
+
rootBoundary: c,
|
|
682
|
+
padding: l,
|
|
683
|
+
altBoundary: u
|
|
684
|
+
}), g = F(t.placement), x = te(t.placement), E = !x, h = Be(g), w = mr(h), b = t.modifiersData.popperOffsets, O = t.rects.reference, R = t.rects.popper, P = typeof v == "function" ? v(Object.assign({}, t.rects, {
|
|
685
|
+
placement: t.placement
|
|
686
|
+
})) : v, A = typeof P == "number" ? {
|
|
687
|
+
mainAxis: P,
|
|
688
|
+
altAxis: P
|
|
689
|
+
} : Object.assign({
|
|
690
|
+
mainAxis: 0,
|
|
691
|
+
altAxis: 0
|
|
692
|
+
}, P), j = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, k = {
|
|
693
|
+
x: 0,
|
|
694
|
+
y: 0
|
|
695
|
+
};
|
|
696
|
+
if (b) {
|
|
697
|
+
if (o) {
|
|
698
|
+
var S, N = h === "y" ? D : B, U = h === "y" ? L : T, C = h === "y" ? "height" : "width", W = b[h], pe = W + d[N], z = W - d[U], le = p ? -R[C] / 2 : 0, be = x === Q ? O[C] : R[C], re = x === Q ? -R[C] : -O[C], ve = t.elements.arrow, K = p && ve ? De(ve) : {
|
|
699
|
+
width: 0,
|
|
700
|
+
height: 0
|
|
701
|
+
}, q = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ft(), ne = q[N], de = q[U], X = oe(0, O[C], K[C]), Oe = E ? O[C] / 2 - le - X - ne - A.mainAxis : be - X - ne - A.mainAxis, vt = E ? -O[C] / 2 + le + X + de + A.mainAxis : re + X + de + A.mainAxis, xe = t.elements.arrow && ce(t.elements.arrow), dt = xe ? h === "y" ? xe.clientTop || 0 : xe.clientLeft || 0 : 0, Le = (S = j == null ? void 0 : j[h]) != null ? S : 0, mt = W + Oe - Le - dt, ht = W + vt - Le, Te = oe(p ? ge(pe, mt) : pe, W, p ? Z(z, ht) : z);
|
|
702
|
+
b[h] = Te, k[h] = Te - W;
|
|
703
|
+
}
|
|
704
|
+
if (f) {
|
|
705
|
+
var ke, yt = h === "x" ? D : B, gt = h === "x" ? L : T, Y = b[w], me = w === "y" ? "height" : "width", We = Y + d[yt], Fe = Y - d[gt], Ee = [D, B].indexOf(g) !== -1, He = (ke = j == null ? void 0 : j[w]) != null ? ke : 0, Ve = Ee ? We : Y - O[me] - R[me] - He + A.altAxis, qe = Ee ? Y + O[me] + R[me] - He - A.altAxis : Fe, Ie = p && Ee ? Vt(Ve, Y, qe) : oe(p ? Ve : We, Y, p ? qe : Fe);
|
|
706
|
+
b[w] = Ie, k[w] = Ie - Y;
|
|
707
|
+
}
|
|
708
|
+
t.modifiersData[n] = k;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
const yr = {
|
|
712
|
+
name: "preventOverflow",
|
|
713
|
+
enabled: !0,
|
|
714
|
+
phase: "main",
|
|
715
|
+
fn: hr,
|
|
716
|
+
requiresIfExists: ["offset"]
|
|
717
|
+
};
|
|
718
|
+
function gr(e) {
|
|
719
|
+
return {
|
|
720
|
+
scrollLeft: e.scrollLeft,
|
|
721
|
+
scrollTop: e.scrollTop
|
|
722
|
+
};
|
|
723
|
+
}
|
|
724
|
+
function wr(e) {
|
|
725
|
+
return e === $(e) || !M(e) ? Ce(e) : gr(e);
|
|
726
|
+
}
|
|
727
|
+
function br(e) {
|
|
728
|
+
var t = e.getBoundingClientRect(), r = _(t.width) / e.offsetWidth || 1, n = _(t.height) / e.offsetHeight || 1;
|
|
729
|
+
return r !== 1 || n !== 1;
|
|
730
|
+
}
|
|
731
|
+
function Or(e, t, r) {
|
|
732
|
+
r === void 0 && (r = !1);
|
|
733
|
+
var n = M(t), a = M(t) && br(t), o = I(t), s = ee(e, a, r), f = {
|
|
734
|
+
scrollLeft: 0,
|
|
735
|
+
scrollTop: 0
|
|
736
|
+
}, i = {
|
|
737
|
+
x: 0,
|
|
738
|
+
y: 0
|
|
739
|
+
};
|
|
740
|
+
return (n || !n && !r) && ((H(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
741
|
+
Me(o)) && (f = wr(t)), M(t) ? (i = ee(t, !0), i.x += t.clientLeft, i.y += t.clientTop) : o && (i.x = $e(o))), {
|
|
742
|
+
x: s.left + f.scrollLeft - i.x,
|
|
743
|
+
y: s.top + f.scrollTop - i.y,
|
|
744
|
+
width: s.width,
|
|
745
|
+
height: s.height
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
function xr(e) {
|
|
749
|
+
var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = [];
|
|
750
|
+
e.forEach(function(o) {
|
|
751
|
+
t.set(o.name, o);
|
|
752
|
+
});
|
|
753
|
+
function a(o) {
|
|
754
|
+
r.add(o.name);
|
|
755
|
+
var s = [].concat(o.requires || [], o.requiresIfExists || []);
|
|
756
|
+
s.forEach(function(f) {
|
|
757
|
+
if (!r.has(f)) {
|
|
758
|
+
var i = t.get(f);
|
|
759
|
+
i && a(i);
|
|
760
|
+
}
|
|
761
|
+
}), n.push(o);
|
|
762
|
+
}
|
|
763
|
+
return e.forEach(function(o) {
|
|
764
|
+
r.has(o.name) || a(o);
|
|
765
|
+
}), n;
|
|
766
|
+
}
|
|
767
|
+
function Er(e) {
|
|
768
|
+
var t = xr(e);
|
|
769
|
+
return Lt.reduce(function(r, n) {
|
|
770
|
+
return r.concat(t.filter(function(a) {
|
|
771
|
+
return a.phase === n;
|
|
772
|
+
}));
|
|
773
|
+
}, []);
|
|
774
|
+
}
|
|
775
|
+
function Ar(e) {
|
|
776
|
+
var t;
|
|
777
|
+
return function() {
|
|
778
|
+
return t || (t = new Promise(function(r) {
|
|
779
|
+
Promise.resolve().then(function() {
|
|
780
|
+
t = void 0, r(e());
|
|
781
|
+
});
|
|
782
|
+
})), t;
|
|
783
|
+
};
|
|
784
|
+
}
|
|
785
|
+
function Pr(e) {
|
|
786
|
+
var t = e.reduce(function(r, n) {
|
|
787
|
+
var a = r[n.name];
|
|
788
|
+
return r[n.name] = a ? Object.assign({}, a, n, {
|
|
789
|
+
options: Object.assign({}, a.options, n.options),
|
|
790
|
+
data: Object.assign({}, a.data, n.data)
|
|
791
|
+
}) : n, r;
|
|
792
|
+
}, {});
|
|
793
|
+
return Object.keys(t).map(function(r) {
|
|
794
|
+
return t[r];
|
|
795
|
+
});
|
|
796
|
+
}
|
|
797
|
+
var tt = {
|
|
798
|
+
placement: "bottom",
|
|
799
|
+
modifiers: [],
|
|
800
|
+
strategy: "absolute"
|
|
801
|
+
};
|
|
802
|
+
function rt() {
|
|
803
|
+
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
|
|
804
|
+
t[r] = arguments[r];
|
|
805
|
+
return !t.some(function(n) {
|
|
806
|
+
return !(n && typeof n.getBoundingClientRect == "function");
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
function Rr(e) {
|
|
810
|
+
e === void 0 && (e = {});
|
|
811
|
+
var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, a = t.defaultOptions, o = a === void 0 ? tt : a;
|
|
812
|
+
return function(f, i, c) {
|
|
813
|
+
c === void 0 && (c = o);
|
|
814
|
+
var u = {
|
|
815
|
+
placement: "bottom",
|
|
816
|
+
orderedModifiers: [],
|
|
817
|
+
options: Object.assign({}, tt, o),
|
|
818
|
+
modifiersData: {},
|
|
819
|
+
elements: {
|
|
820
|
+
reference: f,
|
|
821
|
+
popper: i
|
|
822
|
+
},
|
|
823
|
+
attributes: {},
|
|
824
|
+
styles: {}
|
|
825
|
+
}, l = [], m = !1, p = {
|
|
826
|
+
state: u,
|
|
827
|
+
setOptions: function(g) {
|
|
828
|
+
var x = typeof g == "function" ? g(u.options) : g;
|
|
829
|
+
v(), u.options = Object.assign({}, o, u.options, x), u.scrollParents = {
|
|
830
|
+
reference: J(f) ? ie(f) : f.contextElement ? ie(f.contextElement) : [],
|
|
831
|
+
popper: ie(i)
|
|
832
|
+
};
|
|
833
|
+
var E = Er(Pr([].concat(n, u.options.modifiers)));
|
|
834
|
+
return u.orderedModifiers = E.filter(function(h) {
|
|
835
|
+
return h.enabled;
|
|
836
|
+
}), y(), p.update();
|
|
837
|
+
},
|
|
838
|
+
// Sync update – it will always be executed, even if not necessary. This
|
|
839
|
+
// is useful for low frequency updates where sync behavior simplifies the
|
|
840
|
+
// logic.
|
|
841
|
+
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
842
|
+
// prefer the async Popper#update method
|
|
843
|
+
forceUpdate: function() {
|
|
844
|
+
if (!m) {
|
|
845
|
+
var g = u.elements, x = g.reference, E = g.popper;
|
|
846
|
+
if (rt(x, E)) {
|
|
847
|
+
u.rects = {
|
|
848
|
+
reference: Or(x, ce(E), u.options.strategy === "fixed"),
|
|
849
|
+
popper: De(E)
|
|
850
|
+
}, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(A) {
|
|
851
|
+
return u.modifiersData[A.name] = Object.assign({}, A.data);
|
|
852
|
+
});
|
|
853
|
+
for (var h = 0; h < u.orderedModifiers.length; h++) {
|
|
854
|
+
if (u.reset === !0) {
|
|
855
|
+
u.reset = !1, h = -1;
|
|
856
|
+
continue;
|
|
857
|
+
}
|
|
858
|
+
var w = u.orderedModifiers[h], b = w.fn, O = w.options, R = O === void 0 ? {} : O, P = w.name;
|
|
859
|
+
typeof b == "function" && (u = b({
|
|
860
|
+
state: u,
|
|
861
|
+
options: R,
|
|
862
|
+
name: P,
|
|
863
|
+
instance: p
|
|
864
|
+
}) || u);
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
// Async and optimistically optimized update – it will not be executed if
|
|
870
|
+
// not necessary (debounced to run at most once-per-tick)
|
|
871
|
+
update: Ar(function() {
|
|
872
|
+
return new Promise(function(d) {
|
|
873
|
+
p.forceUpdate(), d(u);
|
|
874
|
+
});
|
|
875
|
+
}),
|
|
876
|
+
destroy: function() {
|
|
877
|
+
v(), m = !0;
|
|
878
|
+
}
|
|
879
|
+
};
|
|
880
|
+
if (!rt(f, i))
|
|
881
|
+
return p;
|
|
882
|
+
p.setOptions(c).then(function(d) {
|
|
883
|
+
!m && c.onFirstUpdate && c.onFirstUpdate(d);
|
|
884
|
+
});
|
|
885
|
+
function y() {
|
|
886
|
+
u.orderedModifiers.forEach(function(d) {
|
|
887
|
+
var g = d.name, x = d.options, E = x === void 0 ? {} : x, h = d.effect;
|
|
888
|
+
if (typeof h == "function") {
|
|
889
|
+
var w = h({
|
|
890
|
+
state: u,
|
|
891
|
+
name: g,
|
|
892
|
+
instance: p,
|
|
893
|
+
options: E
|
|
894
|
+
}), b = function() {
|
|
895
|
+
};
|
|
896
|
+
l.push(w || b);
|
|
897
|
+
}
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
function v() {
|
|
901
|
+
l.forEach(function(d) {
|
|
902
|
+
return d();
|
|
903
|
+
}), l = [];
|
|
904
|
+
}
|
|
905
|
+
return p;
|
|
906
|
+
};
|
|
907
|
+
}
|
|
908
|
+
var jr = [Jt, dr, Gt, Wt, lr, sr, yr, Ut, ur], Sr = /* @__PURE__ */ Rr({
|
|
909
|
+
defaultModifiers: jr
|
|
910
|
+
});
|
|
911
|
+
function Dr(e) {
|
|
912
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
913
|
+
}
|
|
914
|
+
var Ae, nt;
|
|
915
|
+
function Br() {
|
|
916
|
+
if (nt) return Ae;
|
|
917
|
+
nt = 1;
|
|
918
|
+
var e = typeof Element < "u", t = typeof Map == "function", r = typeof Set == "function", n = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
|
|
919
|
+
function a(o, s) {
|
|
920
|
+
if (o === s) return !0;
|
|
921
|
+
if (o && s && typeof o == "object" && typeof s == "object") {
|
|
922
|
+
if (o.constructor !== s.constructor) return !1;
|
|
923
|
+
var f, i, c;
|
|
924
|
+
if (Array.isArray(o)) {
|
|
925
|
+
if (f = o.length, f != s.length) return !1;
|
|
926
|
+
for (i = f; i-- !== 0; )
|
|
927
|
+
if (!a(o[i], s[i])) return !1;
|
|
928
|
+
return !0;
|
|
929
|
+
}
|
|
930
|
+
var u;
|
|
931
|
+
if (t && o instanceof Map && s instanceof Map) {
|
|
932
|
+
if (o.size !== s.size) return !1;
|
|
933
|
+
for (u = o.entries(); !(i = u.next()).done; )
|
|
934
|
+
if (!s.has(i.value[0])) return !1;
|
|
935
|
+
for (u = o.entries(); !(i = u.next()).done; )
|
|
936
|
+
if (!a(i.value[1], s.get(i.value[0]))) return !1;
|
|
937
|
+
return !0;
|
|
938
|
+
}
|
|
939
|
+
if (r && o instanceof Set && s instanceof Set) {
|
|
940
|
+
if (o.size !== s.size) return !1;
|
|
941
|
+
for (u = o.entries(); !(i = u.next()).done; )
|
|
942
|
+
if (!s.has(i.value[0])) return !1;
|
|
943
|
+
return !0;
|
|
944
|
+
}
|
|
945
|
+
if (n && ArrayBuffer.isView(o) && ArrayBuffer.isView(s)) {
|
|
946
|
+
if (f = o.length, f != s.length) return !1;
|
|
947
|
+
for (i = f; i-- !== 0; )
|
|
948
|
+
if (o[i] !== s[i]) return !1;
|
|
949
|
+
return !0;
|
|
950
|
+
}
|
|
951
|
+
if (o.constructor === RegExp) return o.source === s.source && o.flags === s.flags;
|
|
952
|
+
if (o.valueOf !== Object.prototype.valueOf && typeof o.valueOf == "function" && typeof s.valueOf == "function") return o.valueOf() === s.valueOf();
|
|
953
|
+
if (o.toString !== Object.prototype.toString && typeof o.toString == "function" && typeof s.toString == "function") return o.toString() === s.toString();
|
|
954
|
+
if (c = Object.keys(o), f = c.length, f !== Object.keys(s).length) return !1;
|
|
955
|
+
for (i = f; i-- !== 0; )
|
|
956
|
+
if (!Object.prototype.hasOwnProperty.call(s, c[i])) return !1;
|
|
957
|
+
if (e && o instanceof Element) return !1;
|
|
958
|
+
for (i = f; i-- !== 0; )
|
|
959
|
+
if (!((c[i] === "_owner" || c[i] === "__v" || c[i] === "__o") && o.$$typeof) && !a(o[c[i]], s[c[i]]))
|
|
960
|
+
return !1;
|
|
961
|
+
return !0;
|
|
962
|
+
}
|
|
963
|
+
return o !== o && s !== s;
|
|
964
|
+
}
|
|
965
|
+
return Ae = function(s, f) {
|
|
966
|
+
try {
|
|
967
|
+
return a(s, f);
|
|
968
|
+
} catch (i) {
|
|
969
|
+
if ((i.message || "").match(/stack|recursion/i))
|
|
970
|
+
return console.warn("react-fast-compare cannot handle circular refs"), !1;
|
|
971
|
+
throw i;
|
|
972
|
+
}
|
|
973
|
+
}, Ae;
|
|
974
|
+
}
|
|
975
|
+
var Cr = Br();
|
|
976
|
+
const $r = /* @__PURE__ */ Dr(Cr);
|
|
977
|
+
var Mr = [], Lr = function(t, r, n) {
|
|
978
|
+
n === void 0 && (n = {});
|
|
979
|
+
var a = G.useRef(null), o = {
|
|
980
|
+
onFirstUpdate: n.onFirstUpdate,
|
|
981
|
+
placement: n.placement || "bottom",
|
|
982
|
+
strategy: n.strategy || "absolute",
|
|
983
|
+
modifiers: n.modifiers || Mr
|
|
984
|
+
}, s = G.useState({
|
|
80
985
|
styles: {
|
|
81
986
|
popper: {
|
|
82
|
-
position:
|
|
987
|
+
position: o.strategy,
|
|
83
988
|
left: "0",
|
|
84
989
|
top: "0"
|
|
85
990
|
},
|
|
@@ -88,90 +993,90 @@ var D = [], $ = function(r, n, t) {
|
|
|
88
993
|
}
|
|
89
994
|
},
|
|
90
995
|
attributes: {}
|
|
91
|
-
}),
|
|
996
|
+
}), f = s[0], i = s[1], c = G.useMemo(function() {
|
|
92
997
|
return {
|
|
93
998
|
name: "updateState",
|
|
94
999
|
enabled: !0,
|
|
95
1000
|
phase: "write",
|
|
96
|
-
fn: function(
|
|
97
|
-
var
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
styles:
|
|
101
|
-
return [
|
|
1001
|
+
fn: function(p) {
|
|
1002
|
+
var y = p.state, v = Object.keys(y.elements);
|
|
1003
|
+
xt.flushSync(function() {
|
|
1004
|
+
i({
|
|
1005
|
+
styles: Xe(v.map(function(d) {
|
|
1006
|
+
return [d, y.styles[d] || {}];
|
|
102
1007
|
})),
|
|
103
|
-
attributes:
|
|
104
|
-
return [
|
|
1008
|
+
attributes: Xe(v.map(function(d) {
|
|
1009
|
+
return [d, y.attributes[d]];
|
|
105
1010
|
}))
|
|
106
1011
|
});
|
|
107
1012
|
});
|
|
108
1013
|
},
|
|
109
1014
|
requires: ["computeStyles"]
|
|
110
1015
|
};
|
|
111
|
-
}, []),
|
|
112
|
-
var
|
|
113
|
-
onFirstUpdate:
|
|
114
|
-
placement:
|
|
115
|
-
strategy:
|
|
116
|
-
modifiers: [].concat(
|
|
1016
|
+
}, []), u = G.useMemo(function() {
|
|
1017
|
+
var m = {
|
|
1018
|
+
onFirstUpdate: o.onFirstUpdate,
|
|
1019
|
+
placement: o.placement,
|
|
1020
|
+
strategy: o.strategy,
|
|
1021
|
+
modifiers: [].concat(o.modifiers, [c, {
|
|
117
1022
|
name: "applyStyles",
|
|
118
1023
|
enabled: !1
|
|
119
1024
|
}])
|
|
120
1025
|
};
|
|
121
|
-
return
|
|
122
|
-
}, [
|
|
123
|
-
return
|
|
124
|
-
|
|
125
|
-
}, [
|
|
126
|
-
if (!(
|
|
127
|
-
var
|
|
128
|
-
return
|
|
129
|
-
|
|
1026
|
+
return $r(a.current, m) ? a.current || m : (a.current = m, m);
|
|
1027
|
+
}, [o.onFirstUpdate, o.placement, o.strategy, o.modifiers, c]), l = G.useRef();
|
|
1028
|
+
return Ye(function() {
|
|
1029
|
+
l.current && l.current.setOptions(u);
|
|
1030
|
+
}, [u]), Ye(function() {
|
|
1031
|
+
if (!(t == null || r == null)) {
|
|
1032
|
+
var m = n.createPopper || Sr, p = m(t, r, u);
|
|
1033
|
+
return l.current = p, function() {
|
|
1034
|
+
p.destroy(), l.current = null;
|
|
130
1035
|
};
|
|
131
1036
|
}
|
|
132
|
-
}, [r, n
|
|
133
|
-
state:
|
|
134
|
-
styles:
|
|
135
|
-
attributes:
|
|
136
|
-
update:
|
|
137
|
-
forceUpdate:
|
|
1037
|
+
}, [t, r, n.createPopper]), {
|
|
1038
|
+
state: l.current ? l.current.state : null,
|
|
1039
|
+
styles: f.styles,
|
|
1040
|
+
attributes: f.attributes,
|
|
1041
|
+
update: l.current ? l.current.update : null,
|
|
1042
|
+
forceUpdate: l.current ? l.current.forceUpdate : null
|
|
138
1043
|
};
|
|
139
1044
|
};
|
|
140
|
-
function
|
|
141
|
-
const { children:
|
|
1045
|
+
function Wr(e) {
|
|
1046
|
+
const { children: t, content: r, isOpen: n, onClickOutside: a, placement: o } = e, [s, f] = Ue(null), [i, c] = Ue(
|
|
142
1047
|
null
|
|
143
|
-
),
|
|
144
|
-
placement:
|
|
1048
|
+
), u = ze(null), l = ze(null), { styles: m, attributes: p } = Lr(s, i, {
|
|
1049
|
+
placement: o
|
|
145
1050
|
});
|
|
146
|
-
function
|
|
147
|
-
var
|
|
148
|
-
!((
|
|
149
|
-
}
|
|
150
|
-
return
|
|
151
|
-
document.removeEventListener("mousedown",
|
|
152
|
-
}), [
|
|
153
|
-
/* @__PURE__ */
|
|
1051
|
+
function y(v) {
|
|
1052
|
+
var d, g;
|
|
1053
|
+
!((d = u.current) != null && d.contains(v.target)) && !((g = l.current) != null && g.contains(v.target)) && (a == null || a());
|
|
1054
|
+
}
|
|
1055
|
+
return Ot(() => (n ? document.addEventListener("mousedown", y) : document.removeEventListener("mousedown", y), () => {
|
|
1056
|
+
document.removeEventListener("mousedown", y);
|
|
1057
|
+
}), [n]), /* @__PURE__ */ wt(bt, { children: [
|
|
1058
|
+
/* @__PURE__ */ Ne(
|
|
154
1059
|
"div",
|
|
155
1060
|
{
|
|
156
|
-
ref: (
|
|
157
|
-
|
|
1061
|
+
ref: (v) => {
|
|
1062
|
+
f(v), l.current = v;
|
|
158
1063
|
},
|
|
159
|
-
children:
|
|
1064
|
+
children: t
|
|
160
1065
|
}
|
|
161
1066
|
),
|
|
162
|
-
|
|
1067
|
+
n && /* @__PURE__ */ Ne(
|
|
163
1068
|
"div",
|
|
164
1069
|
{
|
|
165
|
-
ref: (
|
|
166
|
-
v
|
|
1070
|
+
ref: (v) => {
|
|
1071
|
+
c(v), u.current = v;
|
|
167
1072
|
},
|
|
168
|
-
style: { ...
|
|
169
|
-
...
|
|
170
|
-
children:
|
|
1073
|
+
style: { ...m.popper, zIndex: e.baseZIndex ?? 5 },
|
|
1074
|
+
...p.popper,
|
|
1075
|
+
children: r
|
|
171
1076
|
}
|
|
172
1077
|
)
|
|
173
1078
|
] });
|
|
174
1079
|
}
|
|
175
1080
|
export {
|
|
176
|
-
|
|
1081
|
+
Wr as Popper
|
|
177
1082
|
};
|