@purpurds/tooltip 7.6.1 → 7.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.rush/temp/chunked-rush-logs/tooltip.test_unit.chunks.jsonl +4 -4
- package/.rush/temp/ci_build/@purpurds/tooltip/{e53969c1b0b0038edeecbaae9709b0cec2724cfe.untar.log → 56e2c4a58123de97ef646ba6b7c93c03d2203269.untar.log} +2 -2
- package/.rush/temp/operation/ci_build/all.log +4 -4
- package/.rush/temp/operation/ci_build/log-chunks.jsonl +4 -4
- package/.rush/temp/operation/ci_build/state.json +1 -1
- package/.rush/temp/operation/test_unit/all.log +4 -4
- package/.rush/temp/operation/test_unit/log-chunks.jsonl +4 -4
- package/.rush/temp/operation/test_unit/state.json +1 -1
- package/.rush/temp/shrinkwrap-deps.json +1 -1
- package/dist/LICENSE.txt +4 -4
- package/dist/tooltip.cjs.js +6 -6
- package/dist/tooltip.cjs.js.map +1 -1
- package/dist/tooltip.d.ts +26 -4
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/tooltip.es.js +691 -713
- package/dist/tooltip.es.js.map +1 -1
- package/package.json +7 -6
- package/src/tooltip.stories.tsx +1 -1
- package/src/tooltip.tsx +17 -22
package/dist/tooltip.es.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { jsxs as be, jsx as x, Fragment as Sn } from "react/jsx-runtime";
|
|
2
|
+
import * as u from "react";
|
|
3
|
+
import { forwardRef as Tt, useLayoutEffect as Nn, useEffect as Dn, useState as Ln, Children as Mn } from "react";
|
|
4
|
+
import * as St from "react-dom";
|
|
5
|
+
import $n from "react-dom";
|
|
6
|
+
const kn = {
|
|
7
7
|
LG: "lg"
|
|
8
8
|
};
|
|
9
|
-
function
|
|
9
|
+
function Fn(e) {
|
|
10
10
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
11
11
|
}
|
|
12
|
-
var
|
|
12
|
+
var st = { exports: {} };
|
|
13
13
|
/*!
|
|
14
14
|
Copyright (c) 2018 Jed Watson.
|
|
15
15
|
Licensed under the MIT License (MIT), see
|
|
16
16
|
http://jedwatson.github.io/classnames
|
|
17
17
|
*/
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
return
|
|
18
|
+
var at;
|
|
19
|
+
function In() {
|
|
20
|
+
return at || (at = 1, function(e) {
|
|
21
21
|
(function() {
|
|
22
22
|
var t = {}.hasOwnProperty;
|
|
23
23
|
function n() {
|
|
24
24
|
for (var r = "", s = 0; s < arguments.length; s++) {
|
|
25
25
|
var a = arguments[s];
|
|
26
|
-
a && (r = i(r, o(a)));
|
|
26
|
+
a && (r = i(r, o.call(this, a)));
|
|
27
27
|
}
|
|
28
28
|
return r;
|
|
29
29
|
}
|
|
30
30
|
function o(r) {
|
|
31
31
|
if (typeof r == "string" || typeof r == "number")
|
|
32
|
-
return r;
|
|
32
|
+
return this && this[r] || r;
|
|
33
33
|
if (typeof r != "object")
|
|
34
34
|
return "";
|
|
35
35
|
if (Array.isArray(r))
|
|
36
|
-
return n.apply(
|
|
36
|
+
return n.apply(this, r);
|
|
37
37
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
38
38
|
return r.toString();
|
|
39
39
|
var s = "";
|
|
40
40
|
for (var a in r)
|
|
41
|
-
t.call(r, a) && r[a] && (s = i(s, a));
|
|
41
|
+
t.call(r, a) && r[a] && (s = i(s, this && this[a] || a));
|
|
42
42
|
return s;
|
|
43
43
|
}
|
|
44
44
|
function i(r, s) {
|
|
@@ -46,61 +46,52 @@ function Wn() {
|
|
|
46
46
|
}
|
|
47
47
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
48
48
|
})();
|
|
49
|
-
}(
|
|
49
|
+
}(st)), st.exports;
|
|
50
50
|
}
|
|
51
|
-
var
|
|
52
|
-
const
|
|
51
|
+
var Bn = In();
|
|
52
|
+
const Wn = /* @__PURE__ */ Fn(Bn), Hn = "_rotate_12t9p_1", jn = "_dash_12t9p_1", qn = {
|
|
53
53
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
54
|
-
rotate:
|
|
54
|
+
rotate: Hn,
|
|
55
55
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
56
56
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
57
57
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
58
58
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
59
59
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
60
60
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
61
|
-
dash:
|
|
61
|
+
dash: jn,
|
|
62
62
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
63
63
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
64
|
-
},
|
|
64
|
+
}, ct = Wn.bind(qn), ue = "purpur-spinner", zn = {
|
|
65
65
|
SM: "sm"
|
|
66
66
|
}, Vn = ({
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"div",
|
|
67
|
+
disabled: e = !1,
|
|
68
|
+
negative: t = !1,
|
|
69
|
+
size: n = zn.SM,
|
|
70
|
+
...o
|
|
71
|
+
}) => /* @__PURE__ */ x("div", { className: ct(ue, `${ue}--${n}`), ...o, children: /* @__PURE__ */ x("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ x(
|
|
72
|
+
"circle",
|
|
74
73
|
{
|
|
75
|
-
className:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
[ue[`${fe}__circle--disabled`]]: t,
|
|
83
|
-
[ue[`${fe}__circle--negative`]]: n
|
|
84
|
-
}),
|
|
85
|
-
cx: "25",
|
|
86
|
-
cy: "25",
|
|
87
|
-
r: "20"
|
|
88
|
-
}
|
|
89
|
-
) })
|
|
74
|
+
className: ct(`${ue}__circle`, {
|
|
75
|
+
[`${ue}__circle--disabled`]: e,
|
|
76
|
+
[`${ue}__circle--negative`]: t
|
|
77
|
+
}),
|
|
78
|
+
cx: "25",
|
|
79
|
+
cy: "25",
|
|
80
|
+
r: "20"
|
|
90
81
|
}
|
|
91
|
-
);
|
|
82
|
+
) }) });
|
|
92
83
|
function Un(e) {
|
|
93
84
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
94
85
|
}
|
|
95
|
-
var
|
|
86
|
+
var lt = { exports: {} };
|
|
96
87
|
/*!
|
|
97
88
|
Copyright (c) 2018 Jed Watson.
|
|
98
89
|
Licensed under the MIT License (MIT), see
|
|
99
90
|
http://jedwatson.github.io/classnames
|
|
100
91
|
*/
|
|
101
|
-
var
|
|
92
|
+
var ut;
|
|
102
93
|
function Yn() {
|
|
103
|
-
return
|
|
94
|
+
return ut || (ut = 1, function(e) {
|
|
104
95
|
(function() {
|
|
105
96
|
var t = {}.hasOwnProperty;
|
|
106
97
|
function n() {
|
|
@@ -129,7 +120,7 @@ function Yn() {
|
|
|
129
120
|
}
|
|
130
121
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
131
122
|
})();
|
|
132
|
-
}(
|
|
123
|
+
}(lt)), lt.exports;
|
|
133
124
|
}
|
|
134
125
|
var Gn = Yn();
|
|
135
126
|
const Xn = /* @__PURE__ */ Un(Gn), Zn = {
|
|
@@ -156,70 +147,77 @@ const Xn = /* @__PURE__ */ Un(Gn), Zn = {
|
|
|
156
147
|
"purpur-button--text": "_purpur-button--text_w455q_181"
|
|
157
148
|
}, Kn = {
|
|
158
149
|
TERTIARY_PURPLE: "tertiary-purple"
|
|
159
|
-
}, Jn = Xn.bind(Zn), J = "purpur-button",
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
},
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
150
|
+
}, Jn = Xn.bind(Zn), J = "purpur-button", Nt = Tt(
|
|
151
|
+
({
|
|
152
|
+
children: e,
|
|
153
|
+
className: t,
|
|
154
|
+
disabled: n = !1,
|
|
155
|
+
fullWidth: o = !1,
|
|
156
|
+
iconOnly: i,
|
|
157
|
+
loading: r = !1,
|
|
158
|
+
negative: s = !1,
|
|
159
|
+
onClick: a,
|
|
160
|
+
size: c = "md",
|
|
161
|
+
variant: l,
|
|
162
|
+
type: f = "button",
|
|
163
|
+
...d
|
|
164
|
+
}, h) => {
|
|
165
|
+
if (i && l === "destructive")
|
|
166
|
+
return null;
|
|
167
|
+
const p = Jn(
|
|
168
|
+
[
|
|
169
|
+
J,
|
|
170
|
+
`${J}--${s ? `${l}-negative` : l}`,
|
|
171
|
+
`${J}--${c}`
|
|
172
|
+
],
|
|
173
|
+
{
|
|
174
|
+
[`${J}--icon-only`]: i,
|
|
175
|
+
[`${J}--negative`]: s,
|
|
176
|
+
[`${J}--full-width`]: o,
|
|
177
|
+
[`${J}--disabled`]: n || r
|
|
178
|
+
},
|
|
179
|
+
t
|
|
180
|
+
), m = (v) => {
|
|
181
|
+
n || r ? v.preventDefault() : a && a(v);
|
|
182
|
+
}, g = !!d["aria-disabled"] || n || r;
|
|
183
|
+
return /* @__PURE__ */ be(
|
|
184
|
+
"button",
|
|
185
|
+
{
|
|
186
|
+
className: p,
|
|
187
|
+
type: f,
|
|
188
|
+
ref: h,
|
|
189
|
+
"aria-disabled": g,
|
|
190
|
+
onClick: m,
|
|
191
|
+
...d,
|
|
192
|
+
children: [
|
|
193
|
+
r && /* @__PURE__ */ x(
|
|
194
|
+
Vn,
|
|
195
|
+
{
|
|
196
|
+
size: c === kn.LG ? "xs" : "xxs",
|
|
197
|
+
negative: s,
|
|
198
|
+
disabled: g
|
|
199
|
+
}
|
|
200
|
+
),
|
|
201
|
+
" ",
|
|
202
|
+
e
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
);
|
|
208
|
+
Nt.displayName = "Button";
|
|
209
|
+
function Qn(e) {
|
|
212
210
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
213
211
|
}
|
|
214
|
-
var
|
|
212
|
+
var ft = { exports: {} };
|
|
215
213
|
/*!
|
|
216
214
|
Copyright (c) 2018 Jed Watson.
|
|
217
215
|
Licensed under the MIT License (MIT), see
|
|
218
216
|
http://jedwatson.github.io/classnames
|
|
219
217
|
*/
|
|
220
|
-
var
|
|
221
|
-
function
|
|
222
|
-
return
|
|
218
|
+
var pt;
|
|
219
|
+
function er() {
|
|
220
|
+
return pt || (pt = 1, function(e) {
|
|
223
221
|
(function() {
|
|
224
222
|
var t = {}.hasOwnProperty;
|
|
225
223
|
function n() {
|
|
@@ -248,10 +246,10 @@ function tr() {
|
|
|
248
246
|
}
|
|
249
247
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
250
248
|
})();
|
|
251
|
-
}(
|
|
249
|
+
}(ft)), ft.exports;
|
|
252
250
|
}
|
|
253
|
-
var
|
|
254
|
-
const
|
|
251
|
+
var tr = er();
|
|
252
|
+
const nr = /* @__PURE__ */ Qn(tr), rr = {
|
|
255
253
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
256
254
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
257
255
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -259,77 +257,62 @@ const rr = /* @__PURE__ */ er(nr), or = {
|
|
|
259
257
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
260
258
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
261
259
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
262
|
-
},
|
|
260
|
+
}, or = nr.bind(rr), dt = "purpur-icon", ir = "md", sr = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), ar = ({ content: e = "", title: t } = {}) => {
|
|
263
261
|
const n = [
|
|
264
262
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
265
263
|
{ name: "fill", value: "currentColor" },
|
|
266
264
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
267
265
|
t ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
268
266
|
], o = t ? `<title>${t}</title>` : "";
|
|
269
|
-
return `<svg ${
|
|
270
|
-
},
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
...r
|
|
277
|
-
}) => {
|
|
278
|
-
const s = cr({
|
|
279
|
-
content: lr(t.svg),
|
|
280
|
-
title: n
|
|
281
|
-
}), a = ir(o, mt, `${mt}--${i}`);
|
|
282
|
-
return /* @__PURE__ */ x(
|
|
283
|
-
"span",
|
|
284
|
-
{
|
|
285
|
-
className: a,
|
|
286
|
-
"data-testid": e,
|
|
287
|
-
dangerouslySetInnerHTML: { __html: s },
|
|
288
|
-
...r
|
|
289
|
-
}
|
|
290
|
-
);
|
|
267
|
+
return `<svg ${sr(n)}>${o}${e}</svg>`;
|
|
268
|
+
}, cr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Dt = ({ svg: e, allyTitle: t, className: n, size: o = ir, ...i }) => {
|
|
269
|
+
const r = ar({
|
|
270
|
+
content: cr(e.svg),
|
|
271
|
+
title: t
|
|
272
|
+
}), s = or(n, dt, `${dt}--${o}`);
|
|
273
|
+
return /* @__PURE__ */ x("span", { className: s, dangerouslySetInnerHTML: { __html: r }, ...i });
|
|
291
274
|
};
|
|
292
|
-
|
|
293
|
-
const
|
|
275
|
+
Dt.displayName = "Icon";
|
|
276
|
+
const lr = {
|
|
294
277
|
name: "info",
|
|
295
278
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M11 8.18c0 .537.469.979 1.007.979.524 0 .993-.442.993-.98s-.469-.979-.993-.979c-.538 0-1.007.441-1.007.98Zm.152 1.958v6.897h1.696v-6.897h-1.696Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',
|
|
296
279
|
keywords: ["info"],
|
|
297
280
|
category: "status"
|
|
298
|
-
},
|
|
299
|
-
|
|
300
|
-
function
|
|
281
|
+
}, Lt = (e) => /* @__PURE__ */ x(Dt, { ...e, svg: lr });
|
|
282
|
+
Lt.displayName = "IconInfo";
|
|
283
|
+
function ur(e) {
|
|
301
284
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
302
285
|
}
|
|
303
|
-
var
|
|
286
|
+
var ht = { exports: {} };
|
|
304
287
|
/*!
|
|
305
288
|
Copyright (c) 2018 Jed Watson.
|
|
306
289
|
Licensed under the MIT License (MIT), see
|
|
307
290
|
http://jedwatson.github.io/classnames
|
|
308
291
|
*/
|
|
309
|
-
var
|
|
310
|
-
function
|
|
311
|
-
return
|
|
292
|
+
var mt;
|
|
293
|
+
function fr() {
|
|
294
|
+
return mt || (mt = 1, function(e) {
|
|
312
295
|
(function() {
|
|
313
296
|
var t = {}.hasOwnProperty;
|
|
314
297
|
function n() {
|
|
315
298
|
for (var r = "", s = 0; s < arguments.length; s++) {
|
|
316
299
|
var a = arguments[s];
|
|
317
|
-
a && (r = i(r, o(a)));
|
|
300
|
+
a && (r = i(r, o.call(this, a)));
|
|
318
301
|
}
|
|
319
302
|
return r;
|
|
320
303
|
}
|
|
321
304
|
function o(r) {
|
|
322
305
|
if (typeof r == "string" || typeof r == "number")
|
|
323
|
-
return r;
|
|
306
|
+
return this && this[r] || r;
|
|
324
307
|
if (typeof r != "object")
|
|
325
308
|
return "";
|
|
326
309
|
if (Array.isArray(r))
|
|
327
|
-
return n.apply(
|
|
310
|
+
return n.apply(this, r);
|
|
328
311
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
329
312
|
return r.toString();
|
|
330
313
|
var s = "";
|
|
331
314
|
for (var a in r)
|
|
332
|
-
t.call(r, a) && r[a] && (s = i(s, a));
|
|
315
|
+
t.call(r, a) && r[a] && (s = i(s, this && this[a] || a));
|
|
333
316
|
return s;
|
|
334
317
|
}
|
|
335
318
|
function i(r, s) {
|
|
@@ -337,10 +320,10 @@ function pr() {
|
|
|
337
320
|
}
|
|
338
321
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
339
322
|
})();
|
|
340
|
-
}(
|
|
323
|
+
}(ht)), ht.exports;
|
|
341
324
|
}
|
|
342
|
-
var
|
|
343
|
-
const
|
|
325
|
+
var pr = fr();
|
|
326
|
+
const dr = /* @__PURE__ */ ur(pr), hr = {
|
|
344
327
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
345
328
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
346
329
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
@@ -355,95 +338,89 @@ const hr = /* @__PURE__ */ fr(dr), pe = {
|
|
|
355
338
|
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
356
339
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
357
340
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
358
|
-
},
|
|
341
|
+
}, mr = dr.bind(hr), Mt = {
|
|
359
342
|
PARAGRAPH100: "paragraph-100"
|
|
360
|
-
},
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
...a
|
|
343
|
+
}, fe = "purpur-paragraph", $t = ({
|
|
344
|
+
children: e,
|
|
345
|
+
className: t,
|
|
346
|
+
disabled: n,
|
|
347
|
+
enableHyphenation: o = !1,
|
|
348
|
+
negative: i = !1,
|
|
349
|
+
variant: r = Mt.PARAGRAPH100,
|
|
350
|
+
...s
|
|
369
351
|
}) => {
|
|
370
|
-
const
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
[pe[`${de}--disabled`]]: o,
|
|
377
|
-
[pe[`${de}--negative`]]: r
|
|
378
|
-
}
|
|
379
|
-
]);
|
|
380
|
-
return /* @__PURE__ */ x("p", { ...a, className: c, "data-testid": e, children: t });
|
|
352
|
+
const a = mr(t, fe, `${fe}--${r}`, {
|
|
353
|
+
[`${fe}--hyphens`]: o,
|
|
354
|
+
[`${fe}--disabled`]: n,
|
|
355
|
+
[`${fe}--negative`]: i
|
|
356
|
+
});
|
|
357
|
+
return /* @__PURE__ */ x("p", { ...s, className: a, children: e });
|
|
381
358
|
};
|
|
382
|
-
|
|
383
|
-
const
|
|
384
|
-
function
|
|
359
|
+
$t.displayName = "Paragraph";
|
|
360
|
+
const gr = "400ms";
|
|
361
|
+
function z(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
385
362
|
return function(i) {
|
|
386
363
|
if (e == null || e(i), n === !1 || !i.defaultPrevented)
|
|
387
364
|
return t == null ? void 0 : t(i);
|
|
388
365
|
};
|
|
389
366
|
}
|
|
390
|
-
function
|
|
367
|
+
function gt(e, t) {
|
|
391
368
|
if (typeof e == "function")
|
|
392
369
|
return e(t);
|
|
393
370
|
e != null && (e.current = t);
|
|
394
371
|
}
|
|
395
|
-
function
|
|
372
|
+
function kt(...e) {
|
|
396
373
|
return (t) => {
|
|
397
374
|
let n = !1;
|
|
398
375
|
const o = e.map((i) => {
|
|
399
|
-
const r =
|
|
376
|
+
const r = gt(i, t);
|
|
400
377
|
return !n && typeof r == "function" && (n = !0), r;
|
|
401
378
|
});
|
|
402
379
|
if (n)
|
|
403
380
|
return () => {
|
|
404
381
|
for (let i = 0; i < o.length; i++) {
|
|
405
382
|
const r = o[i];
|
|
406
|
-
typeof r == "function" ? r() :
|
|
383
|
+
typeof r == "function" ? r() : gt(e[i], null);
|
|
407
384
|
}
|
|
408
385
|
};
|
|
409
386
|
};
|
|
410
387
|
}
|
|
411
388
|
function te(...e) {
|
|
412
|
-
return
|
|
389
|
+
return u.useCallback(kt(...e), e);
|
|
413
390
|
}
|
|
414
|
-
function
|
|
391
|
+
function Ft(e, t = []) {
|
|
415
392
|
let n = [];
|
|
416
393
|
function o(r, s) {
|
|
417
|
-
const a =
|
|
394
|
+
const a = u.createContext(s), c = n.length;
|
|
418
395
|
n = [...n, s];
|
|
419
396
|
const l = (d) => {
|
|
420
397
|
var y;
|
|
421
|
-
const { scope: h, children: p, ...m } = d, g = ((y = h == null ? void 0 : h[e]) == null ? void 0 : y[c]) || a, v =
|
|
398
|
+
const { scope: h, children: p, ...m } = d, g = ((y = h == null ? void 0 : h[e]) == null ? void 0 : y[c]) || a, v = u.useMemo(() => m, Object.values(m));
|
|
422
399
|
return /* @__PURE__ */ x(g.Provider, { value: v, children: p });
|
|
423
400
|
};
|
|
424
401
|
l.displayName = r + "Provider";
|
|
425
|
-
function
|
|
402
|
+
function f(d, h) {
|
|
426
403
|
var g;
|
|
427
|
-
const p = ((g = h == null ? void 0 : h[e]) == null ? void 0 : g[c]) || a, m =
|
|
404
|
+
const p = ((g = h == null ? void 0 : h[e]) == null ? void 0 : g[c]) || a, m = u.useContext(p);
|
|
428
405
|
if (m) return m;
|
|
429
406
|
if (s !== void 0) return s;
|
|
430
407
|
throw new Error(`\`${d}\` must be used within \`${r}\``);
|
|
431
408
|
}
|
|
432
|
-
return [l,
|
|
409
|
+
return [l, f];
|
|
433
410
|
}
|
|
434
411
|
const i = () => {
|
|
435
|
-
const r = n.map((s) =>
|
|
412
|
+
const r = n.map((s) => u.createContext(s));
|
|
436
413
|
return function(a) {
|
|
437
414
|
const c = (a == null ? void 0 : a[e]) || r;
|
|
438
|
-
return
|
|
415
|
+
return u.useMemo(
|
|
439
416
|
() => ({ [`__scope${e}`]: { ...a, [e]: c } }),
|
|
440
417
|
[a, c]
|
|
441
418
|
);
|
|
442
419
|
};
|
|
443
420
|
};
|
|
444
|
-
return i.scopeName = e, [o,
|
|
421
|
+
return i.scopeName = e, [o, vr(i, ...t)];
|
|
445
422
|
}
|
|
446
|
-
function
|
|
423
|
+
function vr(...e) {
|
|
447
424
|
const t = e[0];
|
|
448
425
|
if (e.length === 1) return t;
|
|
449
426
|
const n = () => {
|
|
@@ -456,34 +433,34 @@ function gr(...e) {
|
|
|
456
433
|
const d = c(r)[`__scope${l}`];
|
|
457
434
|
return { ...a, ...d };
|
|
458
435
|
}, {});
|
|
459
|
-
return
|
|
436
|
+
return u.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
|
|
460
437
|
};
|
|
461
438
|
};
|
|
462
439
|
return n.scopeName = t.scopeName, n;
|
|
463
440
|
}
|
|
464
|
-
var
|
|
465
|
-
const { children: n, ...o } = e, i =
|
|
441
|
+
var It = u.forwardRef((e, t) => {
|
|
442
|
+
const { children: n, ...o } = e, i = u.Children.toArray(n), r = i.find(yr);
|
|
466
443
|
if (r) {
|
|
467
|
-
const s = r.props.children, a = i.map((c) => c === r ?
|
|
468
|
-
return /* @__PURE__ */ x(
|
|
444
|
+
const s = r.props.children, a = i.map((c) => c === r ? u.Children.count(s) > 1 ? u.Children.only(null) : u.isValidElement(s) ? s.props.children : null : c);
|
|
445
|
+
return /* @__PURE__ */ x($e, { ...o, ref: t, children: u.isValidElement(s) ? u.cloneElement(s, void 0, a) : null });
|
|
469
446
|
}
|
|
470
|
-
return /* @__PURE__ */ x(
|
|
447
|
+
return /* @__PURE__ */ x($e, { ...o, ref: t, children: n });
|
|
471
448
|
});
|
|
472
|
-
|
|
473
|
-
var
|
|
449
|
+
It.displayName = "Slot";
|
|
450
|
+
var $e = u.forwardRef((e, t) => {
|
|
474
451
|
const { children: n, ...o } = e;
|
|
475
|
-
if (
|
|
476
|
-
const i =
|
|
477
|
-
return n.type !==
|
|
452
|
+
if (u.isValidElement(n)) {
|
|
453
|
+
const i = xr(n), r = wr(o, n.props);
|
|
454
|
+
return n.type !== u.Fragment && (r.ref = t ? kt(t, i) : i), u.cloneElement(n, r);
|
|
478
455
|
}
|
|
479
|
-
return
|
|
456
|
+
return u.Children.count(n) > 1 ? u.Children.only(null) : null;
|
|
480
457
|
});
|
|
481
|
-
|
|
482
|
-
var
|
|
483
|
-
function
|
|
484
|
-
return
|
|
458
|
+
$e.displayName = "SlotClone";
|
|
459
|
+
var Bt = ({ children: e }) => /* @__PURE__ */ x(Sn, { children: e });
|
|
460
|
+
function yr(e) {
|
|
461
|
+
return u.isValidElement(e) && e.type === Bt;
|
|
485
462
|
}
|
|
486
|
-
function
|
|
463
|
+
function wr(e, t) {
|
|
487
464
|
const n = { ...t };
|
|
488
465
|
for (const o in t) {
|
|
489
466
|
const i = e[o], r = t[o];
|
|
@@ -493,12 +470,12 @@ function yr(e, t) {
|
|
|
493
470
|
}
|
|
494
471
|
return { ...e, ...n };
|
|
495
472
|
}
|
|
496
|
-
function
|
|
473
|
+
function xr(e) {
|
|
497
474
|
var o, i;
|
|
498
475
|
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
499
476
|
return n ? e.ref : (t = (i = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : i.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
500
477
|
}
|
|
501
|
-
var
|
|
478
|
+
var br = [
|
|
502
479
|
"a",
|
|
503
480
|
"button",
|
|
504
481
|
"div",
|
|
@@ -515,39 +492,39 @@ var xr = [
|
|
|
515
492
|
"span",
|
|
516
493
|
"svg",
|
|
517
494
|
"ul"
|
|
518
|
-
], K =
|
|
519
|
-
const n =
|
|
520
|
-
const { asChild: r, ...s } = o, a = r ?
|
|
495
|
+
], K = br.reduce((e, t) => {
|
|
496
|
+
const n = u.forwardRef((o, i) => {
|
|
497
|
+
const { asChild: r, ...s } = o, a = r ? It : t;
|
|
521
498
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ x(a, { ...s, ref: i });
|
|
522
499
|
});
|
|
523
500
|
return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
|
|
524
501
|
}, {});
|
|
525
|
-
function
|
|
526
|
-
e &&
|
|
502
|
+
function _r(e, t) {
|
|
503
|
+
e && St.flushSync(() => e.dispatchEvent(t));
|
|
527
504
|
}
|
|
528
505
|
function se(e) {
|
|
529
|
-
const t =
|
|
530
|
-
return
|
|
506
|
+
const t = u.useRef(e);
|
|
507
|
+
return u.useEffect(() => {
|
|
531
508
|
t.current = e;
|
|
532
|
-
}),
|
|
509
|
+
}), u.useMemo(() => (...n) => {
|
|
533
510
|
var o;
|
|
534
511
|
return (o = t.current) == null ? void 0 : o.call(t, ...n);
|
|
535
512
|
}, []);
|
|
536
513
|
}
|
|
537
|
-
function
|
|
514
|
+
function Ar(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
538
515
|
const n = se(e);
|
|
539
|
-
|
|
516
|
+
u.useEffect(() => {
|
|
540
517
|
const o = (i) => {
|
|
541
518
|
i.key === "Escape" && n(i);
|
|
542
519
|
};
|
|
543
520
|
return t.addEventListener("keydown", o, { capture: !0 }), () => t.removeEventListener("keydown", o, { capture: !0 });
|
|
544
521
|
}, [n, t]);
|
|
545
522
|
}
|
|
546
|
-
var
|
|
523
|
+
var Pr = "DismissableLayer", ke = "dismissableLayer.update", Cr = "dismissableLayer.pointerDownOutside", Er = "dismissableLayer.focusOutside", vt, Wt = u.createContext({
|
|
547
524
|
layers: /* @__PURE__ */ new Set(),
|
|
548
525
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
549
526
|
branches: /* @__PURE__ */ new Set()
|
|
550
|
-
}),
|
|
527
|
+
}), Ht = u.forwardRef(
|
|
551
528
|
(e, t) => {
|
|
552
529
|
const {
|
|
553
530
|
disableOutsidePointerEvents: n = !1,
|
|
@@ -557,25 +534,25 @@ var Ar = "DismissableLayer", Ie = "dismissableLayer.update", Pr = "dismissableLa
|
|
|
557
534
|
onInteractOutside: s,
|
|
558
535
|
onDismiss: a,
|
|
559
536
|
...c
|
|
560
|
-
} = e, l =
|
|
537
|
+
} = e, l = u.useContext(Wt), [f, d] = u.useState(null), h = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, p] = u.useState({}), m = te(t, (P) => d(P)), g = Array.from(l.layers), [v] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), y = g.indexOf(v), w = f ? g.indexOf(f) : -1, A = l.layersWithOutsidePointerEventsDisabled.size > 0, b = w >= y, _ = Tr((P) => {
|
|
561
538
|
const O = P.target, D = [...l.branches].some((R) => R.contains(O));
|
|
562
539
|
!b || D || (i == null || i(P), s == null || s(P), P.defaultPrevented || a == null || a());
|
|
563
|
-
}, h), C =
|
|
540
|
+
}, h), C = Sr((P) => {
|
|
564
541
|
const O = P.target;
|
|
565
542
|
[...l.branches].some((R) => R.contains(O)) || (r == null || r(P), s == null || s(P), P.defaultPrevented || a == null || a());
|
|
566
543
|
}, h);
|
|
567
|
-
return
|
|
544
|
+
return Ar((P) => {
|
|
568
545
|
w === l.layers.size - 1 && (o == null || o(P), !P.defaultPrevented && a && (P.preventDefault(), a()));
|
|
569
|
-
}, h),
|
|
570
|
-
if (
|
|
571
|
-
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
572
|
-
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents =
|
|
546
|
+
}, h), u.useEffect(() => {
|
|
547
|
+
if (f)
|
|
548
|
+
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (vt = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(f)), l.layers.add(f), yt(), () => {
|
|
549
|
+
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = vt);
|
|
573
550
|
};
|
|
574
|
-
}, [
|
|
575
|
-
|
|
576
|
-
}, [
|
|
551
|
+
}, [f, h, n, l]), u.useEffect(() => () => {
|
|
552
|
+
f && (l.layers.delete(f), l.layersWithOutsidePointerEventsDisabled.delete(f), yt());
|
|
553
|
+
}, [f, l]), u.useEffect(() => {
|
|
577
554
|
const P = () => p({});
|
|
578
|
-
return document.addEventListener(
|
|
555
|
+
return document.addEventListener(ke, P), () => document.removeEventListener(ke, P);
|
|
579
556
|
}, []), /* @__PURE__ */ x(
|
|
580
557
|
K.div,
|
|
581
558
|
{
|
|
@@ -585,9 +562,9 @@ var Ar = "DismissableLayer", Ie = "dismissableLayer.update", Pr = "dismissableLa
|
|
|
585
562
|
pointerEvents: A ? b ? "auto" : "none" : void 0,
|
|
586
563
|
...e.style
|
|
587
564
|
},
|
|
588
|
-
onFocusCapture:
|
|
589
|
-
onBlurCapture:
|
|
590
|
-
onPointerDownCapture:
|
|
565
|
+
onFocusCapture: z(e.onFocusCapture, C.onFocusCapture),
|
|
566
|
+
onBlurCapture: z(e.onBlurCapture, C.onBlurCapture),
|
|
567
|
+
onPointerDownCapture: z(
|
|
591
568
|
e.onPointerDownCapture,
|
|
592
569
|
_.onPointerDownCapture
|
|
593
570
|
)
|
|
@@ -595,10 +572,10 @@ var Ar = "DismissableLayer", Ie = "dismissableLayer.update", Pr = "dismissableLa
|
|
|
595
572
|
);
|
|
596
573
|
}
|
|
597
574
|
);
|
|
598
|
-
|
|
599
|
-
var
|
|
600
|
-
const n =
|
|
601
|
-
return
|
|
575
|
+
Ht.displayName = Pr;
|
|
576
|
+
var Or = "DismissableLayerBranch", Rr = u.forwardRef((e, t) => {
|
|
577
|
+
const n = u.useContext(Wt), o = u.useRef(null), i = te(t, o);
|
|
578
|
+
return u.useEffect(() => {
|
|
602
579
|
const r = o.current;
|
|
603
580
|
if (r)
|
|
604
581
|
return n.branches.add(r), () => {
|
|
@@ -606,16 +583,16 @@ var Er = "DismissableLayerBranch", Or = f.forwardRef((e, t) => {
|
|
|
606
583
|
};
|
|
607
584
|
}, [n.branches]), /* @__PURE__ */ x(K.div, { ...e, ref: i });
|
|
608
585
|
});
|
|
609
|
-
|
|
610
|
-
function
|
|
611
|
-
const n = se(e), o =
|
|
586
|
+
Rr.displayName = Or;
|
|
587
|
+
function Tr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
588
|
+
const n = se(e), o = u.useRef(!1), i = u.useRef(() => {
|
|
612
589
|
});
|
|
613
|
-
return
|
|
590
|
+
return u.useEffect(() => {
|
|
614
591
|
const r = (a) => {
|
|
615
592
|
if (a.target && !o.current) {
|
|
616
593
|
let c = function() {
|
|
617
|
-
|
|
618
|
-
|
|
594
|
+
jt(
|
|
595
|
+
Cr,
|
|
619
596
|
n,
|
|
620
597
|
l,
|
|
621
598
|
{ discrete: !0 }
|
|
@@ -637,11 +614,11 @@ function Rr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
637
614
|
onPointerDownCapture: () => o.current = !0
|
|
638
615
|
};
|
|
639
616
|
}
|
|
640
|
-
function
|
|
641
|
-
const n = se(e), o =
|
|
642
|
-
return
|
|
617
|
+
function Sr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
618
|
+
const n = se(e), o = u.useRef(!1);
|
|
619
|
+
return u.useEffect(() => {
|
|
643
620
|
const i = (r) => {
|
|
644
|
-
r.target && !o.current &&
|
|
621
|
+
r.target && !o.current && jt(Er, n, { originalEvent: r }, {
|
|
645
622
|
discrete: !1
|
|
646
623
|
});
|
|
647
624
|
};
|
|
@@ -651,36 +628,36 @@ function Tr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
651
628
|
onBlurCapture: () => o.current = !1
|
|
652
629
|
};
|
|
653
630
|
}
|
|
654
|
-
function
|
|
655
|
-
const e = new CustomEvent(
|
|
631
|
+
function yt() {
|
|
632
|
+
const e = new CustomEvent(ke);
|
|
656
633
|
document.dispatchEvent(e);
|
|
657
634
|
}
|
|
658
|
-
function
|
|
635
|
+
function jt(e, t, n, { discrete: o }) {
|
|
659
636
|
const i = n.originalEvent.target, r = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
660
|
-
t && i.addEventListener(e, t, { once: !0 }), o ?
|
|
637
|
+
t && i.addEventListener(e, t, { once: !0 }), o ? _r(i, r) : i.dispatchEvent(r);
|
|
661
638
|
}
|
|
662
|
-
var Q = globalThis != null && globalThis.document ?
|
|
663
|
-
},
|
|
664
|
-
}),
|
|
665
|
-
function
|
|
666
|
-
const [t, n] =
|
|
639
|
+
var Q = globalThis != null && globalThis.document ? u.useLayoutEffect : () => {
|
|
640
|
+
}, Nr = u.useId || (() => {
|
|
641
|
+
}), Dr = 0;
|
|
642
|
+
function Lr(e) {
|
|
643
|
+
const [t, n] = u.useState(Nr());
|
|
667
644
|
return Q(() => {
|
|
668
|
-
n((o) => o ?? String(
|
|
645
|
+
n((o) => o ?? String(Dr++));
|
|
669
646
|
}, [e]), t ? `radix-${t}` : "";
|
|
670
647
|
}
|
|
671
|
-
const
|
|
648
|
+
const Mr = ["top", "right", "bottom", "left"], j = Math.min, I = Math.max, _e = Math.round, ye = Math.floor, G = (e) => ({
|
|
672
649
|
x: e,
|
|
673
650
|
y: e
|
|
674
|
-
}),
|
|
651
|
+
}), $r = {
|
|
675
652
|
left: "right",
|
|
676
653
|
right: "left",
|
|
677
654
|
bottom: "top",
|
|
678
655
|
top: "bottom"
|
|
679
|
-
},
|
|
656
|
+
}, kr = {
|
|
680
657
|
start: "end",
|
|
681
658
|
end: "start"
|
|
682
659
|
};
|
|
683
|
-
function
|
|
660
|
+
function Fe(e, t, n) {
|
|
684
661
|
return I(e, j(t, n));
|
|
685
662
|
}
|
|
686
663
|
function V(e, t) {
|
|
@@ -692,32 +669,32 @@ function U(e) {
|
|
|
692
669
|
function ae(e) {
|
|
693
670
|
return e.split("-")[1];
|
|
694
671
|
}
|
|
695
|
-
function
|
|
672
|
+
function je(e) {
|
|
696
673
|
return e === "x" ? "y" : "x";
|
|
697
674
|
}
|
|
698
|
-
function
|
|
675
|
+
function qe(e) {
|
|
699
676
|
return e === "y" ? "height" : "width";
|
|
700
677
|
}
|
|
701
678
|
function X(e) {
|
|
702
679
|
return ["top", "bottom"].includes(U(e)) ? "y" : "x";
|
|
703
680
|
}
|
|
704
|
-
function
|
|
705
|
-
return
|
|
681
|
+
function ze(e) {
|
|
682
|
+
return je(X(e));
|
|
706
683
|
}
|
|
707
|
-
function
|
|
684
|
+
function Fr(e, t, n) {
|
|
708
685
|
n === void 0 && (n = !1);
|
|
709
|
-
const o = ae(e), i =
|
|
686
|
+
const o = ae(e), i = ze(e), r = qe(i);
|
|
710
687
|
let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
711
|
-
return t.reference[r] > t.floating[r] && (s =
|
|
688
|
+
return t.reference[r] > t.floating[r] && (s = Ae(s)), [s, Ae(s)];
|
|
712
689
|
}
|
|
713
|
-
function
|
|
714
|
-
const t =
|
|
715
|
-
return [
|
|
690
|
+
function Ir(e) {
|
|
691
|
+
const t = Ae(e);
|
|
692
|
+
return [Ie(e), t, Ie(t)];
|
|
716
693
|
}
|
|
717
|
-
function
|
|
718
|
-
return e.replace(/start|end/g, (t) =>
|
|
694
|
+
function Ie(e) {
|
|
695
|
+
return e.replace(/start|end/g, (t) => kr[t]);
|
|
719
696
|
}
|
|
720
|
-
function
|
|
697
|
+
function Br(e, t, n) {
|
|
721
698
|
const o = ["left", "right"], i = ["right", "left"], r = ["top", "bottom"], s = ["bottom", "top"];
|
|
722
699
|
switch (e) {
|
|
723
700
|
case "top":
|
|
@@ -730,15 +707,15 @@ function Ir(e, t, n) {
|
|
|
730
707
|
return [];
|
|
731
708
|
}
|
|
732
709
|
}
|
|
733
|
-
function
|
|
710
|
+
function Wr(e, t, n, o) {
|
|
734
711
|
const i = ae(e);
|
|
735
|
-
let r =
|
|
736
|
-
return i && (r = r.map((s) => s + "-" + i), t && (r = r.concat(r.map(
|
|
712
|
+
let r = Br(U(e), n === "start", o);
|
|
713
|
+
return i && (r = r.map((s) => s + "-" + i), t && (r = r.concat(r.map(Ie)))), r;
|
|
737
714
|
}
|
|
738
|
-
function
|
|
739
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
715
|
+
function Ae(e) {
|
|
716
|
+
return e.replace(/left|right|bottom|top/g, (t) => $r[t]);
|
|
740
717
|
}
|
|
741
|
-
function
|
|
718
|
+
function Hr(e) {
|
|
742
719
|
return {
|
|
743
720
|
top: 0,
|
|
744
721
|
right: 0,
|
|
@@ -747,15 +724,15 @@ function Wr(e) {
|
|
|
747
724
|
...e
|
|
748
725
|
};
|
|
749
726
|
}
|
|
750
|
-
function
|
|
751
|
-
return typeof e != "number" ?
|
|
727
|
+
function qt(e) {
|
|
728
|
+
return typeof e != "number" ? Hr(e) : {
|
|
752
729
|
top: e,
|
|
753
730
|
right: e,
|
|
754
731
|
bottom: e,
|
|
755
732
|
left: e
|
|
756
733
|
};
|
|
757
734
|
}
|
|
758
|
-
function
|
|
735
|
+
function Pe(e) {
|
|
759
736
|
const {
|
|
760
737
|
x: t,
|
|
761
738
|
y: n,
|
|
@@ -773,23 +750,23 @@ function Ee(e) {
|
|
|
773
750
|
y: n
|
|
774
751
|
};
|
|
775
752
|
}
|
|
776
|
-
function
|
|
753
|
+
function wt(e, t, n) {
|
|
777
754
|
let {
|
|
778
755
|
reference: o,
|
|
779
756
|
floating: i
|
|
780
757
|
} = e;
|
|
781
|
-
const r = X(t), s =
|
|
758
|
+
const r = X(t), s = ze(t), a = qe(s), c = U(t), l = r === "y", f = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, h = o[a] / 2 - i[a] / 2;
|
|
782
759
|
let p;
|
|
783
760
|
switch (c) {
|
|
784
761
|
case "top":
|
|
785
762
|
p = {
|
|
786
|
-
x:
|
|
763
|
+
x: f,
|
|
787
764
|
y: o.y - i.height
|
|
788
765
|
};
|
|
789
766
|
break;
|
|
790
767
|
case "bottom":
|
|
791
768
|
p = {
|
|
792
|
-
x:
|
|
769
|
+
x: f,
|
|
793
770
|
y: o.y + o.height
|
|
794
771
|
};
|
|
795
772
|
break;
|
|
@@ -821,7 +798,7 @@ function bt(e, t, n) {
|
|
|
821
798
|
}
|
|
822
799
|
return p;
|
|
823
800
|
}
|
|
824
|
-
const
|
|
801
|
+
const jr = async (e, t, n) => {
|
|
825
802
|
const {
|
|
826
803
|
placement: o = "bottom",
|
|
827
804
|
strategy: i = "absolute",
|
|
@@ -833,9 +810,9 @@ const Hr = async (e, t, n) => {
|
|
|
833
810
|
floating: t,
|
|
834
811
|
strategy: i
|
|
835
812
|
}), {
|
|
836
|
-
x:
|
|
813
|
+
x: f,
|
|
837
814
|
y: d
|
|
838
|
-
} =
|
|
815
|
+
} = wt(l, o, c), h = o, p = {}, m = 0;
|
|
839
816
|
for (let g = 0; g < a.length; g++) {
|
|
840
817
|
const {
|
|
841
818
|
name: v,
|
|
@@ -846,7 +823,7 @@ const Hr = async (e, t, n) => {
|
|
|
846
823
|
data: b,
|
|
847
824
|
reset: _
|
|
848
825
|
} = await y({
|
|
849
|
-
x:
|
|
826
|
+
x: f,
|
|
850
827
|
y: d,
|
|
851
828
|
initialPlacement: o,
|
|
852
829
|
placement: h,
|
|
@@ -859,7 +836,7 @@ const Hr = async (e, t, n) => {
|
|
|
859
836
|
floating: t
|
|
860
837
|
}
|
|
861
838
|
});
|
|
862
|
-
|
|
839
|
+
f = w ?? f, d = A ?? d, p = {
|
|
863
840
|
...p,
|
|
864
841
|
[v]: {
|
|
865
842
|
...p[v],
|
|
@@ -870,19 +847,19 @@ const Hr = async (e, t, n) => {
|
|
|
870
847
|
floating: t,
|
|
871
848
|
strategy: i
|
|
872
849
|
}) : _.rects), {
|
|
873
|
-
x:
|
|
850
|
+
x: f,
|
|
874
851
|
y: d
|
|
875
|
-
} =
|
|
852
|
+
} = wt(l, h, c)), g = -1);
|
|
876
853
|
}
|
|
877
854
|
return {
|
|
878
|
-
x:
|
|
855
|
+
x: f,
|
|
879
856
|
y: d,
|
|
880
857
|
placement: h,
|
|
881
858
|
strategy: i,
|
|
882
859
|
middlewareData: p
|
|
883
860
|
};
|
|
884
861
|
};
|
|
885
|
-
async function
|
|
862
|
+
async function pe(e, t) {
|
|
886
863
|
var n;
|
|
887
864
|
t === void 0 && (t = {});
|
|
888
865
|
const {
|
|
@@ -894,14 +871,14 @@ async function he(e, t) {
|
|
|
894
871
|
strategy: c
|
|
895
872
|
} = e, {
|
|
896
873
|
boundary: l = "clippingAncestors",
|
|
897
|
-
rootBoundary:
|
|
874
|
+
rootBoundary: f = "viewport",
|
|
898
875
|
elementContext: d = "floating",
|
|
899
876
|
altBoundary: h = !1,
|
|
900
877
|
padding: p = 0
|
|
901
|
-
} = V(t, e), m =
|
|
878
|
+
} = V(t, e), m = qt(p), v = a[h ? d === "floating" ? "reference" : "floating" : d], y = Pe(await r.getClippingRect({
|
|
902
879
|
element: (n = await (r.isElement == null ? void 0 : r.isElement(v))) == null || n ? v : v.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
|
|
903
880
|
boundary: l,
|
|
904
|
-
rootBoundary:
|
|
881
|
+
rootBoundary: f,
|
|
905
882
|
strategy: c
|
|
906
883
|
})), w = d === "floating" ? {
|
|
907
884
|
x: o,
|
|
@@ -914,7 +891,7 @@ async function he(e, t) {
|
|
|
914
891
|
} : {
|
|
915
892
|
x: 1,
|
|
916
893
|
y: 1
|
|
917
|
-
}, _ =
|
|
894
|
+
}, _ = Pe(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
918
895
|
elements: a,
|
|
919
896
|
rect: w,
|
|
920
897
|
offsetParent: A,
|
|
@@ -927,7 +904,7 @@ async function he(e, t) {
|
|
|
927
904
|
right: (_.right - y.right + m.right) / b.x
|
|
928
905
|
};
|
|
929
906
|
}
|
|
930
|
-
const
|
|
907
|
+
const qr = (e) => ({
|
|
931
908
|
name: "arrow",
|
|
932
909
|
options: e,
|
|
933
910
|
async fn(t) {
|
|
@@ -941,17 +918,17 @@ const jr = (e) => ({
|
|
|
941
918
|
middlewareData: c
|
|
942
919
|
} = t, {
|
|
943
920
|
element: l,
|
|
944
|
-
padding:
|
|
921
|
+
padding: f = 0
|
|
945
922
|
} = V(e, t) || {};
|
|
946
923
|
if (l == null)
|
|
947
924
|
return {};
|
|
948
|
-
const d =
|
|
925
|
+
const d = qt(f), h = {
|
|
949
926
|
x: n,
|
|
950
927
|
y: o
|
|
951
|
-
}, p =
|
|
928
|
+
}, p = ze(i), m = qe(p), g = await s.getDimensions(l), v = p === "y", y = v ? "top" : "left", w = v ? "bottom" : "right", A = v ? "clientHeight" : "clientWidth", b = r.reference[m] + r.reference[p] - h[p] - r.floating[m], _ = h[p] - r.reference[p], C = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
|
|
952
929
|
let P = C ? C[A] : 0;
|
|
953
930
|
(!P || !await (s.isElement == null ? void 0 : s.isElement(C))) && (P = a.floating[A] || r.floating[m]);
|
|
954
|
-
const O = b / 2 - _ / 2, D = P / 2 - g[m] / 2 - 1, R = j(d[y], D), M = j(d[w], D), $ = R, k = P - g[m] - M, T = P / 2 - g[m] / 2 + O, L =
|
|
931
|
+
const O = b / 2 - _ / 2, D = P / 2 - g[m] / 2 - 1, R = j(d[y], D), M = j(d[w], D), $ = R, k = P - g[m] - M, T = P / 2 - g[m] / 2 + O, L = Fe($, T, k), F = !c.arrow && ae(i) != null && T !== L && r.reference[m] / 2 - (T < $ ? R : M) - g[m] / 2 < 0, E = F ? T < $ ? T - $ : T - k : 0;
|
|
955
932
|
return {
|
|
956
933
|
[p]: h[p] + E,
|
|
957
934
|
data: {
|
|
@@ -978,7 +955,7 @@ const jr = (e) => ({
|
|
|
978
955
|
platform: c,
|
|
979
956
|
elements: l
|
|
980
957
|
} = t, {
|
|
981
|
-
mainAxis:
|
|
958
|
+
mainAxis: f = !0,
|
|
982
959
|
crossAxis: d = !0,
|
|
983
960
|
fallbackPlacements: h,
|
|
984
961
|
fallbackStrategy: p = "bestFit",
|
|
@@ -988,12 +965,12 @@ const jr = (e) => ({
|
|
|
988
965
|
} = V(e, t);
|
|
989
966
|
if ((n = r.arrow) != null && n.alignmentOffset)
|
|
990
967
|
return {};
|
|
991
|
-
const y = U(i), w = X(a), A = U(a) === a, b = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), _ = h || (A || !g ? [
|
|
992
|
-
!h && C && _.push(...
|
|
993
|
-
const P = [a, ..._], O = await
|
|
968
|
+
const y = U(i), w = X(a), A = U(a) === a, b = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), _ = h || (A || !g ? [Ae(a)] : Ir(a)), C = m !== "none";
|
|
969
|
+
!h && C && _.push(...Wr(a, g, m, b));
|
|
970
|
+
const P = [a, ..._], O = await pe(t, v), D = [];
|
|
994
971
|
let R = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
995
|
-
if (
|
|
996
|
-
const T =
|
|
972
|
+
if (f && D.push(O[y]), d) {
|
|
973
|
+
const T = Fr(i, s, b);
|
|
997
974
|
D.push(O[T[0]], O[T[1]]);
|
|
998
975
|
}
|
|
999
976
|
if (R = [...R, {
|
|
@@ -1025,7 +1002,7 @@ const jr = (e) => ({
|
|
|
1025
1002
|
N === "y";
|
|
1026
1003
|
}
|
|
1027
1004
|
return !0;
|
|
1028
|
-
}).map((S) => [S.placement, S.overflows.filter((N) => N > 0).reduce((N,
|
|
1005
|
+
}).map((S) => [S.placement, S.overflows.filter((N) => N > 0).reduce((N, Ne) => N + Ne, 0)]).sort((S, N) => S[1] - N[1])[0]) == null ? void 0 : k[0];
|
|
1029
1006
|
E && (F = E);
|
|
1030
1007
|
break;
|
|
1031
1008
|
}
|
|
@@ -1044,7 +1021,7 @@ const jr = (e) => ({
|
|
|
1044
1021
|
}
|
|
1045
1022
|
};
|
|
1046
1023
|
};
|
|
1047
|
-
function
|
|
1024
|
+
function xt(e, t) {
|
|
1048
1025
|
return {
|
|
1049
1026
|
top: e.top - t.height,
|
|
1050
1027
|
right: e.right - t.width,
|
|
@@ -1052,10 +1029,10 @@ function _t(e, t) {
|
|
|
1052
1029
|
left: e.left - t.width
|
|
1053
1030
|
};
|
|
1054
1031
|
}
|
|
1055
|
-
function
|
|
1056
|
-
return
|
|
1032
|
+
function bt(e) {
|
|
1033
|
+
return Mr.some((t) => e[t] >= 0);
|
|
1057
1034
|
}
|
|
1058
|
-
const
|
|
1035
|
+
const Vr = function(e) {
|
|
1059
1036
|
return e === void 0 && (e = {}), {
|
|
1060
1037
|
name: "hide",
|
|
1061
1038
|
options: e,
|
|
@@ -1068,26 +1045,26 @@ const qr = function(e) {
|
|
|
1068
1045
|
} = V(e, t);
|
|
1069
1046
|
switch (o) {
|
|
1070
1047
|
case "referenceHidden": {
|
|
1071
|
-
const r = await
|
|
1048
|
+
const r = await pe(t, {
|
|
1072
1049
|
...i,
|
|
1073
1050
|
elementContext: "reference"
|
|
1074
|
-
}), s =
|
|
1051
|
+
}), s = xt(r, n.reference);
|
|
1075
1052
|
return {
|
|
1076
1053
|
data: {
|
|
1077
1054
|
referenceHiddenOffsets: s,
|
|
1078
|
-
referenceHidden:
|
|
1055
|
+
referenceHidden: bt(s)
|
|
1079
1056
|
}
|
|
1080
1057
|
};
|
|
1081
1058
|
}
|
|
1082
1059
|
case "escaped": {
|
|
1083
|
-
const r = await
|
|
1060
|
+
const r = await pe(t, {
|
|
1084
1061
|
...i,
|
|
1085
1062
|
altBoundary: !0
|
|
1086
|
-
}), s =
|
|
1063
|
+
}), s = xt(r, n.floating);
|
|
1087
1064
|
return {
|
|
1088
1065
|
data: {
|
|
1089
1066
|
escapedOffsets: s,
|
|
1090
|
-
escaped:
|
|
1067
|
+
escaped: bt(s)
|
|
1091
1068
|
}
|
|
1092
1069
|
};
|
|
1093
1070
|
}
|
|
@@ -1097,12 +1074,12 @@ const qr = function(e) {
|
|
|
1097
1074
|
}
|
|
1098
1075
|
};
|
|
1099
1076
|
};
|
|
1100
|
-
async function
|
|
1077
|
+
async function Ur(e, t) {
|
|
1101
1078
|
const {
|
|
1102
1079
|
placement: n,
|
|
1103
1080
|
platform: o,
|
|
1104
1081
|
elements: i
|
|
1105
|
-
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = U(n), a = ae(n), c = X(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1,
|
|
1082
|
+
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = U(n), a = ae(n), c = X(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, f = r && c ? -1 : 1, d = V(t, e);
|
|
1106
1083
|
let {
|
|
1107
1084
|
mainAxis: h,
|
|
1108
1085
|
crossAxis: p,
|
|
@@ -1118,14 +1095,14 @@ async function Vr(e, t) {
|
|
|
1118
1095
|
...d
|
|
1119
1096
|
};
|
|
1120
1097
|
return a && typeof m == "number" && (p = a === "end" ? m * -1 : m), c ? {
|
|
1121
|
-
x: p *
|
|
1098
|
+
x: p * f,
|
|
1122
1099
|
y: h * l
|
|
1123
1100
|
} : {
|
|
1124
1101
|
x: h * l,
|
|
1125
|
-
y: p *
|
|
1102
|
+
y: p * f
|
|
1126
1103
|
};
|
|
1127
1104
|
}
|
|
1128
|
-
const
|
|
1105
|
+
const Yr = function(e) {
|
|
1129
1106
|
return e === void 0 && (e = 0), {
|
|
1130
1107
|
name: "offset",
|
|
1131
1108
|
options: e,
|
|
@@ -1136,7 +1113,7 @@ const Ur = function(e) {
|
|
|
1136
1113
|
y: r,
|
|
1137
1114
|
placement: s,
|
|
1138
1115
|
middlewareData: a
|
|
1139
|
-
} = t, c = await
|
|
1116
|
+
} = t, c = await Ur(t, e);
|
|
1140
1117
|
return s === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
|
|
1141
1118
|
x: i + c.x,
|
|
1142
1119
|
y: r + c.y,
|
|
@@ -1147,7 +1124,7 @@ const Ur = function(e) {
|
|
|
1147
1124
|
};
|
|
1148
1125
|
}
|
|
1149
1126
|
};
|
|
1150
|
-
},
|
|
1127
|
+
}, Gr = function(e) {
|
|
1151
1128
|
return e === void 0 && (e = {}), {
|
|
1152
1129
|
name: "shift",
|
|
1153
1130
|
options: e,
|
|
@@ -1175,15 +1152,15 @@ const Ur = function(e) {
|
|
|
1175
1152
|
} = V(e, t), l = {
|
|
1176
1153
|
x: n,
|
|
1177
1154
|
y: o
|
|
1178
|
-
},
|
|
1155
|
+
}, f = await pe(t, c), d = X(U(i)), h = je(d);
|
|
1179
1156
|
let p = l[h], m = l[d];
|
|
1180
1157
|
if (r) {
|
|
1181
|
-
const v = h === "y" ? "top" : "left", y = h === "y" ? "bottom" : "right", w = p +
|
|
1182
|
-
p =
|
|
1158
|
+
const v = h === "y" ? "top" : "left", y = h === "y" ? "bottom" : "right", w = p + f[v], A = p - f[y];
|
|
1159
|
+
p = Fe(w, p, A);
|
|
1183
1160
|
}
|
|
1184
1161
|
if (s) {
|
|
1185
|
-
const v = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", w = m +
|
|
1186
|
-
m =
|
|
1162
|
+
const v = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", w = m + f[v], A = m - f[y];
|
|
1163
|
+
m = Fe(w, m, A);
|
|
1187
1164
|
}
|
|
1188
1165
|
const g = a.fn({
|
|
1189
1166
|
...t,
|
|
@@ -1199,7 +1176,7 @@ const Ur = function(e) {
|
|
|
1199
1176
|
};
|
|
1200
1177
|
}
|
|
1201
1178
|
};
|
|
1202
|
-
},
|
|
1179
|
+
}, Xr = function(e) {
|
|
1203
1180
|
return e === void 0 && (e = {}), {
|
|
1204
1181
|
options: e,
|
|
1205
1182
|
fn(t) {
|
|
@@ -1213,11 +1190,11 @@ const Ur = function(e) {
|
|
|
1213
1190
|
offset: a = 0,
|
|
1214
1191
|
mainAxis: c = !0,
|
|
1215
1192
|
crossAxis: l = !0
|
|
1216
|
-
} = V(e, t),
|
|
1193
|
+
} = V(e, t), f = {
|
|
1217
1194
|
x: n,
|
|
1218
1195
|
y: o
|
|
1219
|
-
}, d = X(i), h =
|
|
1220
|
-
let p =
|
|
1196
|
+
}, d = X(i), h = je(d);
|
|
1197
|
+
let p = f[h], m = f[d];
|
|
1221
1198
|
const g = V(a, t), v = typeof g == "number" ? {
|
|
1222
1199
|
mainAxis: g,
|
|
1223
1200
|
crossAxis: 0
|
|
@@ -1241,7 +1218,7 @@ const Ur = function(e) {
|
|
|
1241
1218
|
};
|
|
1242
1219
|
}
|
|
1243
1220
|
};
|
|
1244
|
-
},
|
|
1221
|
+
}, Zr = function(e) {
|
|
1245
1222
|
return e === void 0 && (e = {}), {
|
|
1246
1223
|
name: "size",
|
|
1247
1224
|
options: e,
|
|
@@ -1255,15 +1232,15 @@ const Ur = function(e) {
|
|
|
1255
1232
|
apply: s = () => {
|
|
1256
1233
|
},
|
|
1257
1234
|
...a
|
|
1258
|
-
} = V(e, t), c = await
|
|
1235
|
+
} = V(e, t), c = await pe(t, a), l = U(n), f = ae(n), d = X(n) === "y", {
|
|
1259
1236
|
width: h,
|
|
1260
1237
|
height: p
|
|
1261
1238
|
} = o.floating;
|
|
1262
1239
|
let m, g;
|
|
1263
|
-
l === "top" || l === "bottom" ? (m = l, g =
|
|
1240
|
+
l === "top" || l === "bottom" ? (m = l, g = f === (await (i.isRTL == null ? void 0 : i.isRTL(r.floating)) ? "start" : "end") ? "left" : "right") : (g = l, m = f === "end" ? "top" : "bottom");
|
|
1264
1241
|
const v = p - c.top - c.bottom, y = h - c.left - c.right, w = j(p - c[m], v), A = j(h - c[g], y), b = !t.middlewareData.shift;
|
|
1265
1242
|
let _ = w, C = A;
|
|
1266
|
-
if (d ? C =
|
|
1243
|
+
if (d ? C = f || b ? j(A, y) : y : _ = f || b ? j(w, v) : v, b && !f) {
|
|
1267
1244
|
const O = I(c.left, 0), D = I(c.right, 0), R = I(c.top, 0), M = I(c.bottom, 0);
|
|
1268
1245
|
d ? C = h - 2 * (O !== 0 || D !== 0 ? O + D : I(c.left, c.right)) : _ = p - 2 * (R !== 0 || M !== 0 ? R + M : I(c.top, c.bottom));
|
|
1269
1246
|
}
|
|
@@ -1282,7 +1259,7 @@ const Ur = function(e) {
|
|
|
1282
1259
|
};
|
|
1283
1260
|
};
|
|
1284
1261
|
function ce(e) {
|
|
1285
|
-
return
|
|
1262
|
+
return zt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1286
1263
|
}
|
|
1287
1264
|
function B(e) {
|
|
1288
1265
|
var t;
|
|
@@ -1290,21 +1267,21 @@ function B(e) {
|
|
|
1290
1267
|
}
|
|
1291
1268
|
function Y(e) {
|
|
1292
1269
|
var t;
|
|
1293
|
-
return (t = (
|
|
1270
|
+
return (t = (zt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1294
1271
|
}
|
|
1295
|
-
function
|
|
1272
|
+
function zt(e) {
|
|
1296
1273
|
return e instanceof Node || e instanceof B(e).Node;
|
|
1297
1274
|
}
|
|
1298
1275
|
function W(e) {
|
|
1299
1276
|
return e instanceof Element || e instanceof B(e).Element;
|
|
1300
1277
|
}
|
|
1301
|
-
function
|
|
1278
|
+
function q(e) {
|
|
1302
1279
|
return e instanceof HTMLElement || e instanceof B(e).HTMLElement;
|
|
1303
1280
|
}
|
|
1304
|
-
function
|
|
1281
|
+
function _t(e) {
|
|
1305
1282
|
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof B(e).ShadowRoot;
|
|
1306
1283
|
}
|
|
1307
|
-
function
|
|
1284
|
+
function he(e) {
|
|
1308
1285
|
const {
|
|
1309
1286
|
overflow: t,
|
|
1310
1287
|
overflowX: n,
|
|
@@ -1313,10 +1290,10 @@ function ge(e) {
|
|
|
1313
1290
|
} = H(e);
|
|
1314
1291
|
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !["inline", "contents"].includes(i);
|
|
1315
1292
|
}
|
|
1316
|
-
function
|
|
1293
|
+
function Kr(e) {
|
|
1317
1294
|
return ["table", "td", "th"].includes(ce(e));
|
|
1318
1295
|
}
|
|
1319
|
-
function
|
|
1296
|
+
function Ee(e) {
|
|
1320
1297
|
return [":popover-open", ":modal"].some((t) => {
|
|
1321
1298
|
try {
|
|
1322
1299
|
return e.matches(t);
|
|
@@ -1325,22 +1302,22 @@ function Re(e) {
|
|
|
1325
1302
|
}
|
|
1326
1303
|
});
|
|
1327
1304
|
}
|
|
1328
|
-
function
|
|
1329
|
-
const t =
|
|
1305
|
+
function Ve(e) {
|
|
1306
|
+
const t = Ue(), n = W(e) ? H(e) : e;
|
|
1330
1307
|
return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
|
|
1331
1308
|
}
|
|
1332
|
-
function
|
|
1309
|
+
function Jr(e) {
|
|
1333
1310
|
let t = Z(e);
|
|
1334
|
-
for (;
|
|
1335
|
-
if (
|
|
1311
|
+
for (; q(t) && !oe(t); ) {
|
|
1312
|
+
if (Ve(t))
|
|
1336
1313
|
return t;
|
|
1337
|
-
if (
|
|
1314
|
+
if (Ee(t))
|
|
1338
1315
|
return null;
|
|
1339
1316
|
t = Z(t);
|
|
1340
1317
|
}
|
|
1341
1318
|
return null;
|
|
1342
1319
|
}
|
|
1343
|
-
function
|
|
1320
|
+
function Ue() {
|
|
1344
1321
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1345
1322
|
}
|
|
1346
1323
|
function oe(e) {
|
|
@@ -1349,7 +1326,7 @@ function oe(e) {
|
|
|
1349
1326
|
function H(e) {
|
|
1350
1327
|
return B(e).getComputedStyle(e);
|
|
1351
1328
|
}
|
|
1352
|
-
function
|
|
1329
|
+
function Oe(e) {
|
|
1353
1330
|
return W(e) ? {
|
|
1354
1331
|
scrollLeft: e.scrollLeft,
|
|
1355
1332
|
scrollTop: e.scrollTop
|
|
@@ -1365,124 +1342,124 @@ function Z(e) {
|
|
|
1365
1342
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1366
1343
|
e.assignedSlot || // DOM Element detected.
|
|
1367
1344
|
e.parentNode || // ShadowRoot detected.
|
|
1368
|
-
|
|
1345
|
+
_t(e) && e.host || // Fallback.
|
|
1369
1346
|
Y(e)
|
|
1370
1347
|
);
|
|
1371
|
-
return
|
|
1348
|
+
return _t(t) ? t.host : t;
|
|
1372
1349
|
}
|
|
1373
|
-
function
|
|
1350
|
+
function Vt(e) {
|
|
1374
1351
|
const t = Z(e);
|
|
1375
|
-
return oe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body :
|
|
1352
|
+
return oe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : q(t) && he(t) ? t : Vt(t);
|
|
1376
1353
|
}
|
|
1377
|
-
function
|
|
1354
|
+
function de(e, t, n) {
|
|
1378
1355
|
var o;
|
|
1379
1356
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1380
|
-
const i =
|
|
1357
|
+
const i = Vt(e), r = i === ((o = e.ownerDocument) == null ? void 0 : o.body), s = B(i);
|
|
1381
1358
|
if (r) {
|
|
1382
|
-
const a =
|
|
1383
|
-
return t.concat(s, s.visualViewport || [],
|
|
1359
|
+
const a = Be(s);
|
|
1360
|
+
return t.concat(s, s.visualViewport || [], he(i) ? i : [], a && n ? de(a) : []);
|
|
1384
1361
|
}
|
|
1385
|
-
return t.concat(i,
|
|
1362
|
+
return t.concat(i, de(i, [], n));
|
|
1386
1363
|
}
|
|
1387
|
-
function
|
|
1364
|
+
function Be(e) {
|
|
1388
1365
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1389
1366
|
}
|
|
1390
|
-
function
|
|
1367
|
+
function Ut(e) {
|
|
1391
1368
|
const t = H(e);
|
|
1392
1369
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
1393
|
-
const i =
|
|
1370
|
+
const i = q(e), r = i ? e.offsetWidth : n, s = i ? e.offsetHeight : o, a = _e(n) !== r || _e(o) !== s;
|
|
1394
1371
|
return a && (n = r, o = s), {
|
|
1395
1372
|
width: n,
|
|
1396
1373
|
height: o,
|
|
1397
1374
|
$: a
|
|
1398
1375
|
};
|
|
1399
1376
|
}
|
|
1400
|
-
function
|
|
1377
|
+
function Ye(e) {
|
|
1401
1378
|
return W(e) ? e : e.contextElement;
|
|
1402
1379
|
}
|
|
1403
1380
|
function re(e) {
|
|
1404
|
-
const t =
|
|
1405
|
-
if (!
|
|
1381
|
+
const t = Ye(e);
|
|
1382
|
+
if (!q(t))
|
|
1406
1383
|
return G(1);
|
|
1407
1384
|
const n = t.getBoundingClientRect(), {
|
|
1408
1385
|
width: o,
|
|
1409
1386
|
height: i,
|
|
1410
1387
|
$: r
|
|
1411
|
-
} =
|
|
1412
|
-
let s = (r ?
|
|
1388
|
+
} = Ut(t);
|
|
1389
|
+
let s = (r ? _e(n.width) : n.width) / o, a = (r ? _e(n.height) : n.height) / i;
|
|
1413
1390
|
return (!s || !Number.isFinite(s)) && (s = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
1414
1391
|
x: s,
|
|
1415
1392
|
y: a
|
|
1416
1393
|
};
|
|
1417
1394
|
}
|
|
1418
|
-
const
|
|
1419
|
-
function
|
|
1395
|
+
const Qr = /* @__PURE__ */ G(0);
|
|
1396
|
+
function Yt(e) {
|
|
1420
1397
|
const t = B(e);
|
|
1421
|
-
return !
|
|
1398
|
+
return !Ue() || !t.visualViewport ? Qr : {
|
|
1422
1399
|
x: t.visualViewport.offsetLeft,
|
|
1423
1400
|
y: t.visualViewport.offsetTop
|
|
1424
1401
|
};
|
|
1425
1402
|
}
|
|
1426
|
-
function
|
|
1403
|
+
function eo(e, t, n) {
|
|
1427
1404
|
return t === void 0 && (t = !1), !n || t && n !== B(e) ? !1 : t;
|
|
1428
1405
|
}
|
|
1429
1406
|
function ee(e, t, n, o) {
|
|
1430
1407
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1431
|
-
const i = e.getBoundingClientRect(), r =
|
|
1408
|
+
const i = e.getBoundingClientRect(), r = Ye(e);
|
|
1432
1409
|
let s = G(1);
|
|
1433
1410
|
t && (o ? W(o) && (s = re(o)) : s = re(e));
|
|
1434
|
-
const a =
|
|
1435
|
-
let c = (i.left + a.x) / s.x, l = (i.top + a.y) / s.y,
|
|
1411
|
+
const a = eo(r, n, o) ? Yt(r) : G(0);
|
|
1412
|
+
let c = (i.left + a.x) / s.x, l = (i.top + a.y) / s.y, f = i.width / s.x, d = i.height / s.y;
|
|
1436
1413
|
if (r) {
|
|
1437
1414
|
const h = B(r), p = o && W(o) ? B(o) : o;
|
|
1438
|
-
let m = h, g =
|
|
1415
|
+
let m = h, g = Be(m);
|
|
1439
1416
|
for (; g && o && p !== m; ) {
|
|
1440
1417
|
const v = re(g), y = g.getBoundingClientRect(), w = H(g), A = y.left + (g.clientLeft + parseFloat(w.paddingLeft)) * v.x, b = y.top + (g.clientTop + parseFloat(w.paddingTop)) * v.y;
|
|
1441
|
-
c *= v.x, l *= v.y,
|
|
1418
|
+
c *= v.x, l *= v.y, f *= v.x, d *= v.y, c += A, l += b, m = B(g), g = Be(m);
|
|
1442
1419
|
}
|
|
1443
1420
|
}
|
|
1444
|
-
return
|
|
1445
|
-
width:
|
|
1421
|
+
return Pe({
|
|
1422
|
+
width: f,
|
|
1446
1423
|
height: d,
|
|
1447
1424
|
x: c,
|
|
1448
1425
|
y: l
|
|
1449
1426
|
});
|
|
1450
1427
|
}
|
|
1451
|
-
function
|
|
1428
|
+
function to(e) {
|
|
1452
1429
|
let {
|
|
1453
1430
|
elements: t,
|
|
1454
1431
|
rect: n,
|
|
1455
1432
|
offsetParent: o,
|
|
1456
1433
|
strategy: i
|
|
1457
1434
|
} = e;
|
|
1458
|
-
const r = i === "fixed", s = Y(o), a = t ?
|
|
1435
|
+
const r = i === "fixed", s = Y(o), a = t ? Ee(t.floating) : !1;
|
|
1459
1436
|
if (o === s || a && r)
|
|
1460
1437
|
return n;
|
|
1461
1438
|
let c = {
|
|
1462
1439
|
scrollLeft: 0,
|
|
1463
1440
|
scrollTop: 0
|
|
1464
1441
|
}, l = G(1);
|
|
1465
|
-
const
|
|
1466
|
-
if ((d || !d && !r) && ((ce(o) !== "body" ||
|
|
1442
|
+
const f = G(0), d = q(o);
|
|
1443
|
+
if ((d || !d && !r) && ((ce(o) !== "body" || he(s)) && (c = Oe(o)), q(o))) {
|
|
1467
1444
|
const h = ee(o);
|
|
1468
|
-
l = re(o),
|
|
1445
|
+
l = re(o), f.x = h.x + o.clientLeft, f.y = h.y + o.clientTop;
|
|
1469
1446
|
}
|
|
1470
1447
|
return {
|
|
1471
1448
|
width: n.width * l.x,
|
|
1472
1449
|
height: n.height * l.y,
|
|
1473
|
-
x: n.x * l.x - c.scrollLeft * l.x +
|
|
1474
|
-
y: n.y * l.y - c.scrollTop * l.y +
|
|
1450
|
+
x: n.x * l.x - c.scrollLeft * l.x + f.x,
|
|
1451
|
+
y: n.y * l.y - c.scrollTop * l.y + f.y
|
|
1475
1452
|
};
|
|
1476
1453
|
}
|
|
1477
|
-
function
|
|
1454
|
+
function no(e) {
|
|
1478
1455
|
return Array.from(e.getClientRects());
|
|
1479
1456
|
}
|
|
1480
|
-
function
|
|
1481
|
-
return ee(Y(e)).left +
|
|
1457
|
+
function Gt(e) {
|
|
1458
|
+
return ee(Y(e)).left + Oe(e).scrollLeft;
|
|
1482
1459
|
}
|
|
1483
|
-
function
|
|
1484
|
-
const t = Y(e), n =
|
|
1485
|
-
let s = -n.scrollLeft +
|
|
1460
|
+
function ro(e) {
|
|
1461
|
+
const t = Y(e), n = Oe(e), o = e.ownerDocument.body, i = I(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = I(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
1462
|
+
let s = -n.scrollLeft + Gt(e);
|
|
1486
1463
|
const a = -n.scrollTop;
|
|
1487
1464
|
return H(o).direction === "rtl" && (s += I(t.clientWidth, o.clientWidth) - i), {
|
|
1488
1465
|
width: i,
|
|
@@ -1491,12 +1468,12 @@ function no(e) {
|
|
|
1491
1468
|
y: a
|
|
1492
1469
|
};
|
|
1493
1470
|
}
|
|
1494
|
-
function
|
|
1471
|
+
function oo(e, t) {
|
|
1495
1472
|
const n = B(e), o = Y(e), i = n.visualViewport;
|
|
1496
1473
|
let r = o.clientWidth, s = o.clientHeight, a = 0, c = 0;
|
|
1497
1474
|
if (i) {
|
|
1498
1475
|
r = i.width, s = i.height;
|
|
1499
|
-
const l =
|
|
1476
|
+
const l = Ue();
|
|
1500
1477
|
(!l || l && t === "fixed") && (a = i.offsetLeft, c = i.offsetTop);
|
|
1501
1478
|
}
|
|
1502
1479
|
return {
|
|
@@ -1506,8 +1483,8 @@ function ro(e, t) {
|
|
|
1506
1483
|
y: c
|
|
1507
1484
|
};
|
|
1508
1485
|
}
|
|
1509
|
-
function
|
|
1510
|
-
const n = ee(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, r =
|
|
1486
|
+
function io(e, t) {
|
|
1487
|
+
const n = ee(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, r = q(e) ? re(e) : G(1), s = e.clientWidth * r.x, a = e.clientHeight * r.y, c = i * r.x, l = o * r.y;
|
|
1511
1488
|
return {
|
|
1512
1489
|
width: s,
|
|
1513
1490
|
height: a,
|
|
@@ -1515,52 +1492,52 @@ function oo(e, t) {
|
|
|
1515
1492
|
y: l
|
|
1516
1493
|
};
|
|
1517
1494
|
}
|
|
1518
|
-
function
|
|
1495
|
+
function At(e, t, n) {
|
|
1519
1496
|
let o;
|
|
1520
1497
|
if (t === "viewport")
|
|
1521
|
-
o =
|
|
1498
|
+
o = oo(e, n);
|
|
1522
1499
|
else if (t === "document")
|
|
1523
|
-
o =
|
|
1500
|
+
o = ro(Y(e));
|
|
1524
1501
|
else if (W(t))
|
|
1525
|
-
o =
|
|
1502
|
+
o = io(t, n);
|
|
1526
1503
|
else {
|
|
1527
|
-
const i =
|
|
1504
|
+
const i = Yt(e);
|
|
1528
1505
|
o = {
|
|
1529
1506
|
...t,
|
|
1530
1507
|
x: t.x - i.x,
|
|
1531
1508
|
y: t.y - i.y
|
|
1532
1509
|
};
|
|
1533
1510
|
}
|
|
1534
|
-
return
|
|
1511
|
+
return Pe(o);
|
|
1535
1512
|
}
|
|
1536
|
-
function
|
|
1513
|
+
function Xt(e, t) {
|
|
1537
1514
|
const n = Z(e);
|
|
1538
|
-
return n === t || !W(n) || oe(n) ? !1 : H(n).position === "fixed" ||
|
|
1515
|
+
return n === t || !W(n) || oe(n) ? !1 : H(n).position === "fixed" || Xt(n, t);
|
|
1539
1516
|
}
|
|
1540
|
-
function
|
|
1517
|
+
function so(e, t) {
|
|
1541
1518
|
const n = t.get(e);
|
|
1542
1519
|
if (n)
|
|
1543
1520
|
return n;
|
|
1544
|
-
let o =
|
|
1521
|
+
let o = de(e, [], !1).filter((a) => W(a) && ce(a) !== "body"), i = null;
|
|
1545
1522
|
const r = H(e).position === "fixed";
|
|
1546
1523
|
let s = r ? Z(e) : e;
|
|
1547
1524
|
for (; W(s) && !oe(s); ) {
|
|
1548
|
-
const a = H(s), c =
|
|
1549
|
-
!c && a.position === "fixed" && (i = null), (r ? !c && !i : !c && a.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) ||
|
|
1525
|
+
const a = H(s), c = Ve(s);
|
|
1526
|
+
!c && a.position === "fixed" && (i = null), (r ? !c && !i : !c && a.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || he(s) && !c && Xt(e, s)) ? o = o.filter((f) => f !== s) : i = a, s = Z(s);
|
|
1550
1527
|
}
|
|
1551
1528
|
return t.set(e, o), o;
|
|
1552
1529
|
}
|
|
1553
|
-
function
|
|
1530
|
+
function ao(e) {
|
|
1554
1531
|
let {
|
|
1555
1532
|
element: t,
|
|
1556
1533
|
boundary: n,
|
|
1557
1534
|
rootBoundary: o,
|
|
1558
1535
|
strategy: i
|
|
1559
1536
|
} = e;
|
|
1560
|
-
const s = [...n === "clippingAncestors" ?
|
|
1561
|
-
const d =
|
|
1537
|
+
const s = [...n === "clippingAncestors" ? Ee(t) ? [] : so(t, this._c) : [].concat(n), o], a = s[0], c = s.reduce((l, f) => {
|
|
1538
|
+
const d = At(t, f, i);
|
|
1562
1539
|
return l.top = I(d.top, l.top), l.right = j(d.right, l.right), l.bottom = j(d.bottom, l.bottom), l.left = I(d.left, l.left), l;
|
|
1563
|
-
},
|
|
1540
|
+
}, At(t, a, i));
|
|
1564
1541
|
return {
|
|
1565
1542
|
width: c.right - c.left,
|
|
1566
1543
|
height: c.bottom - c.top,
|
|
@@ -1568,64 +1545,64 @@ function so(e) {
|
|
|
1568
1545
|
y: c.top
|
|
1569
1546
|
};
|
|
1570
1547
|
}
|
|
1571
|
-
function
|
|
1548
|
+
function co(e) {
|
|
1572
1549
|
const {
|
|
1573
1550
|
width: t,
|
|
1574
1551
|
height: n
|
|
1575
|
-
} =
|
|
1552
|
+
} = Ut(e);
|
|
1576
1553
|
return {
|
|
1577
1554
|
width: t,
|
|
1578
1555
|
height: n
|
|
1579
1556
|
};
|
|
1580
1557
|
}
|
|
1581
|
-
function
|
|
1582
|
-
const o =
|
|
1558
|
+
function lo(e, t, n) {
|
|
1559
|
+
const o = q(t), i = Y(t), r = n === "fixed", s = ee(e, !0, r, t);
|
|
1583
1560
|
let a = {
|
|
1584
1561
|
scrollLeft: 0,
|
|
1585
1562
|
scrollTop: 0
|
|
1586
1563
|
};
|
|
1587
1564
|
const c = G(0);
|
|
1588
1565
|
if (o || !o && !r)
|
|
1589
|
-
if ((ce(t) !== "body" ||
|
|
1566
|
+
if ((ce(t) !== "body" || he(i)) && (a = Oe(t)), o) {
|
|
1590
1567
|
const d = ee(t, !0, r, t);
|
|
1591
1568
|
c.x = d.x + t.clientLeft, c.y = d.y + t.clientTop;
|
|
1592
|
-
} else i && (c.x =
|
|
1593
|
-
const l = s.left + a.scrollLeft - c.x,
|
|
1569
|
+
} else i && (c.x = Gt(i));
|
|
1570
|
+
const l = s.left + a.scrollLeft - c.x, f = s.top + a.scrollTop - c.y;
|
|
1594
1571
|
return {
|
|
1595
1572
|
x: l,
|
|
1596
|
-
y:
|
|
1573
|
+
y: f,
|
|
1597
1574
|
width: s.width,
|
|
1598
1575
|
height: s.height
|
|
1599
1576
|
};
|
|
1600
1577
|
}
|
|
1601
|
-
function
|
|
1578
|
+
function De(e) {
|
|
1602
1579
|
return H(e).position === "static";
|
|
1603
1580
|
}
|
|
1604
|
-
function
|
|
1605
|
-
return !
|
|
1581
|
+
function Pt(e, t) {
|
|
1582
|
+
return !q(e) || H(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
|
|
1606
1583
|
}
|
|
1607
|
-
function
|
|
1584
|
+
function Zt(e, t) {
|
|
1608
1585
|
const n = B(e);
|
|
1609
|
-
if (
|
|
1586
|
+
if (Ee(e))
|
|
1610
1587
|
return n;
|
|
1611
|
-
if (!
|
|
1588
|
+
if (!q(e)) {
|
|
1612
1589
|
let i = Z(e);
|
|
1613
1590
|
for (; i && !oe(i); ) {
|
|
1614
|
-
if (W(i) && !
|
|
1591
|
+
if (W(i) && !De(i))
|
|
1615
1592
|
return i;
|
|
1616
1593
|
i = Z(i);
|
|
1617
1594
|
}
|
|
1618
1595
|
return n;
|
|
1619
1596
|
}
|
|
1620
|
-
let o =
|
|
1621
|
-
for (; o &&
|
|
1622
|
-
o =
|
|
1623
|
-
return o && oe(o) &&
|
|
1597
|
+
let o = Pt(e, t);
|
|
1598
|
+
for (; o && Kr(o) && De(o); )
|
|
1599
|
+
o = Pt(o, t);
|
|
1600
|
+
return o && oe(o) && De(o) && !Ve(o) ? n : o || Jr(e) || n;
|
|
1624
1601
|
}
|
|
1625
|
-
const
|
|
1626
|
-
const t = this.getOffsetParent ||
|
|
1602
|
+
const uo = async function(e) {
|
|
1603
|
+
const t = this.getOffsetParent || Zt, n = this.getDimensions, o = await n(e.floating);
|
|
1627
1604
|
return {
|
|
1628
|
-
reference:
|
|
1605
|
+
reference: lo(e.reference, await t(e.floating), e.strategy),
|
|
1629
1606
|
floating: {
|
|
1630
1607
|
x: 0,
|
|
1631
1608
|
y: 0,
|
|
@@ -1634,22 +1611,22 @@ const lo = async function(e) {
|
|
|
1634
1611
|
}
|
|
1635
1612
|
};
|
|
1636
1613
|
};
|
|
1637
|
-
function
|
|
1614
|
+
function fo(e) {
|
|
1638
1615
|
return H(e).direction === "rtl";
|
|
1639
1616
|
}
|
|
1640
|
-
const
|
|
1641
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1617
|
+
const po = {
|
|
1618
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: to,
|
|
1642
1619
|
getDocumentElement: Y,
|
|
1643
|
-
getClippingRect:
|
|
1644
|
-
getOffsetParent:
|
|
1645
|
-
getElementRects:
|
|
1646
|
-
getClientRects:
|
|
1647
|
-
getDimensions:
|
|
1620
|
+
getClippingRect: ao,
|
|
1621
|
+
getOffsetParent: Zt,
|
|
1622
|
+
getElementRects: uo,
|
|
1623
|
+
getClientRects: no,
|
|
1624
|
+
getDimensions: co,
|
|
1648
1625
|
getScale: re,
|
|
1649
1626
|
isElement: W,
|
|
1650
|
-
isRTL:
|
|
1627
|
+
isRTL: fo
|
|
1651
1628
|
};
|
|
1652
|
-
function
|
|
1629
|
+
function ho(e, t) {
|
|
1653
1630
|
let n = null, o;
|
|
1654
1631
|
const i = Y(e);
|
|
1655
1632
|
function r() {
|
|
@@ -1660,13 +1637,13 @@ function po(e, t) {
|
|
|
1660
1637
|
a === void 0 && (a = !1), c === void 0 && (c = 1), r();
|
|
1661
1638
|
const {
|
|
1662
1639
|
left: l,
|
|
1663
|
-
top:
|
|
1640
|
+
top: f,
|
|
1664
1641
|
width: d,
|
|
1665
1642
|
height: h
|
|
1666
1643
|
} = e.getBoundingClientRect();
|
|
1667
1644
|
if (a || t(), !d || !h)
|
|
1668
1645
|
return;
|
|
1669
|
-
const p =
|
|
1646
|
+
const p = ye(f), m = ye(i.clientWidth - (l + d)), g = ye(i.clientHeight - (f + h)), v = ye(l), w = {
|
|
1670
1647
|
rootMargin: -p + "px " + -m + "px " + -g + "px " + -v + "px",
|
|
1671
1648
|
threshold: I(0, j(1, c)) || 1
|
|
1672
1649
|
};
|
|
@@ -1695,7 +1672,7 @@ function po(e, t) {
|
|
|
1695
1672
|
}
|
|
1696
1673
|
return s(!0), r;
|
|
1697
1674
|
}
|
|
1698
|
-
function
|
|
1675
|
+
function mo(e, t, n, o) {
|
|
1699
1676
|
o === void 0 && (o = {});
|
|
1700
1677
|
const {
|
|
1701
1678
|
ancestorScroll: i = !0,
|
|
@@ -1703,13 +1680,13 @@ function ho(e, t, n, o) {
|
|
|
1703
1680
|
elementResize: s = typeof ResizeObserver == "function",
|
|
1704
1681
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
1705
1682
|
animationFrame: c = !1
|
|
1706
|
-
} = o, l =
|
|
1707
|
-
|
|
1683
|
+
} = o, l = Ye(e), f = i || r ? [...l ? de(l) : [], ...de(t)] : [];
|
|
1684
|
+
f.forEach((y) => {
|
|
1708
1685
|
i && y.addEventListener("scroll", n, {
|
|
1709
1686
|
passive: !0
|
|
1710
1687
|
}), r && y.addEventListener("resize", n);
|
|
1711
1688
|
});
|
|
1712
|
-
const d = l && a ?
|
|
1689
|
+
const d = l && a ? ho(l, n) : null;
|
|
1713
1690
|
let h = -1, p = null;
|
|
1714
1691
|
s && (p = new ResizeObserver((y) => {
|
|
1715
1692
|
let [w] = y;
|
|
@@ -1726,26 +1703,26 @@ function ho(e, t, n, o) {
|
|
|
1726
1703
|
}
|
|
1727
1704
|
return n(), () => {
|
|
1728
1705
|
var y;
|
|
1729
|
-
|
|
1706
|
+
f.forEach((w) => {
|
|
1730
1707
|
i && w.removeEventListener("scroll", n), r && w.removeEventListener("resize", n);
|
|
1731
1708
|
}), d == null || d(), (y = p) == null || y.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
1732
1709
|
};
|
|
1733
1710
|
}
|
|
1734
|
-
const
|
|
1711
|
+
const go = Yr, vo = Gr, yo = zr, wo = Zr, xo = Vr, Ct = qr, bo = Xr, _o = (e, t, n) => {
|
|
1735
1712
|
const o = /* @__PURE__ */ new Map(), i = {
|
|
1736
|
-
platform:
|
|
1713
|
+
platform: po,
|
|
1737
1714
|
...n
|
|
1738
1715
|
}, r = {
|
|
1739
1716
|
...i.platform,
|
|
1740
1717
|
_c: o
|
|
1741
1718
|
};
|
|
1742
|
-
return
|
|
1719
|
+
return jr(e, t, {
|
|
1743
1720
|
...i,
|
|
1744
1721
|
platform: r
|
|
1745
1722
|
});
|
|
1746
1723
|
};
|
|
1747
|
-
var
|
|
1748
|
-
function
|
|
1724
|
+
var xe = typeof document < "u" ? Nn : Dn;
|
|
1725
|
+
function Ce(e, t) {
|
|
1749
1726
|
if (e === t)
|
|
1750
1727
|
return !0;
|
|
1751
1728
|
if (typeof e != typeof t)
|
|
@@ -1757,7 +1734,7 @@ function Oe(e, t) {
|
|
|
1757
1734
|
if (Array.isArray(e)) {
|
|
1758
1735
|
if (n = e.length, n !== t.length) return !1;
|
|
1759
1736
|
for (o = n; o-- !== 0; )
|
|
1760
|
-
if (!
|
|
1737
|
+
if (!Ce(e[o], t[o]))
|
|
1761
1738
|
return !1;
|
|
1762
1739
|
return !0;
|
|
1763
1740
|
}
|
|
@@ -1768,27 +1745,27 @@ function Oe(e, t) {
|
|
|
1768
1745
|
return !1;
|
|
1769
1746
|
for (o = n; o-- !== 0; ) {
|
|
1770
1747
|
const r = i[o];
|
|
1771
|
-
if (!(r === "_owner" && e.$$typeof) && !
|
|
1748
|
+
if (!(r === "_owner" && e.$$typeof) && !Ce(e[r], t[r]))
|
|
1772
1749
|
return !1;
|
|
1773
1750
|
}
|
|
1774
1751
|
return !0;
|
|
1775
1752
|
}
|
|
1776
1753
|
return e !== e && t !== t;
|
|
1777
1754
|
}
|
|
1778
|
-
function
|
|
1755
|
+
function Kt(e) {
|
|
1779
1756
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1780
1757
|
}
|
|
1781
|
-
function
|
|
1782
|
-
const n =
|
|
1758
|
+
function Et(e, t) {
|
|
1759
|
+
const n = Kt(e);
|
|
1783
1760
|
return Math.round(t * n) / n;
|
|
1784
1761
|
}
|
|
1785
|
-
function
|
|
1786
|
-
const t =
|
|
1787
|
-
return
|
|
1762
|
+
function Ot(e) {
|
|
1763
|
+
const t = u.useRef(e);
|
|
1764
|
+
return xe(() => {
|
|
1788
1765
|
t.current = e;
|
|
1789
1766
|
}), t;
|
|
1790
1767
|
}
|
|
1791
|
-
function
|
|
1768
|
+
function Ao(e) {
|
|
1792
1769
|
e === void 0 && (e = {});
|
|
1793
1770
|
const {
|
|
1794
1771
|
placement: t = "bottom",
|
|
@@ -1802,20 +1779,20 @@ function _o(e) {
|
|
|
1802
1779
|
transform: a = !0,
|
|
1803
1780
|
whileElementsMounted: c,
|
|
1804
1781
|
open: l
|
|
1805
|
-
} = e, [
|
|
1782
|
+
} = e, [f, d] = u.useState({
|
|
1806
1783
|
x: 0,
|
|
1807
1784
|
y: 0,
|
|
1808
1785
|
strategy: n,
|
|
1809
1786
|
placement: t,
|
|
1810
1787
|
middlewareData: {},
|
|
1811
1788
|
isPositioned: !1
|
|
1812
|
-
}), [h, p] =
|
|
1813
|
-
|
|
1814
|
-
const [m, g] =
|
|
1789
|
+
}), [h, p] = u.useState(o);
|
|
1790
|
+
Ce(h, o) || p(o);
|
|
1791
|
+
const [m, g] = u.useState(null), [v, y] = u.useState(null), w = u.useCallback((E) => {
|
|
1815
1792
|
E !== C.current && (C.current = E, g(E));
|
|
1816
|
-
}, []), A =
|
|
1793
|
+
}, []), A = u.useCallback((E) => {
|
|
1817
1794
|
E !== P.current && (P.current = E, y(E));
|
|
1818
|
-
}, []), b = r || m, _ = s || v, C =
|
|
1795
|
+
}, []), b = r || m, _ = s || v, C = u.useRef(null), P = u.useRef(null), O = u.useRef(f), D = c != null, R = Ot(c), M = Ot(i), $ = u.useCallback(() => {
|
|
1819
1796
|
if (!C.current || !P.current)
|
|
1820
1797
|
return;
|
|
1821
1798
|
const E = {
|
|
@@ -1823,41 +1800,41 @@ function _o(e) {
|
|
|
1823
1800
|
strategy: n,
|
|
1824
1801
|
middleware: h
|
|
1825
1802
|
};
|
|
1826
|
-
M.current && (E.platform = M.current),
|
|
1803
|
+
M.current && (E.platform = M.current), _o(C.current, P.current, E).then((S) => {
|
|
1827
1804
|
const N = {
|
|
1828
1805
|
...S,
|
|
1829
1806
|
isPositioned: !0
|
|
1830
1807
|
};
|
|
1831
|
-
k.current && !
|
|
1808
|
+
k.current && !Ce(O.current, N) && (O.current = N, St.flushSync(() => {
|
|
1832
1809
|
d(N);
|
|
1833
1810
|
}));
|
|
1834
1811
|
});
|
|
1835
1812
|
}, [h, t, n, M]);
|
|
1836
|
-
|
|
1813
|
+
xe(() => {
|
|
1837
1814
|
l === !1 && O.current.isPositioned && (O.current.isPositioned = !1, d((E) => ({
|
|
1838
1815
|
...E,
|
|
1839
1816
|
isPositioned: !1
|
|
1840
1817
|
})));
|
|
1841
1818
|
}, [l]);
|
|
1842
|
-
const k =
|
|
1843
|
-
|
|
1819
|
+
const k = u.useRef(!1);
|
|
1820
|
+
xe(() => (k.current = !0, () => {
|
|
1844
1821
|
k.current = !1;
|
|
1845
|
-
}), []),
|
|
1822
|
+
}), []), xe(() => {
|
|
1846
1823
|
if (b && (C.current = b), _ && (P.current = _), b && _) {
|
|
1847
1824
|
if (R.current)
|
|
1848
1825
|
return R.current(b, _, $);
|
|
1849
1826
|
$();
|
|
1850
1827
|
}
|
|
1851
1828
|
}, [b, _, $, R, D]);
|
|
1852
|
-
const T =
|
|
1829
|
+
const T = u.useMemo(() => ({
|
|
1853
1830
|
reference: C,
|
|
1854
1831
|
floating: P,
|
|
1855
1832
|
setReference: w,
|
|
1856
1833
|
setFloating: A
|
|
1857
|
-
}), [w, A]), L =
|
|
1834
|
+
}), [w, A]), L = u.useMemo(() => ({
|
|
1858
1835
|
reference: b,
|
|
1859
1836
|
floating: _
|
|
1860
|
-
}), [b, _]), F =
|
|
1837
|
+
}), [b, _]), F = u.useMemo(() => {
|
|
1861
1838
|
const E = {
|
|
1862
1839
|
position: n,
|
|
1863
1840
|
left: 0,
|
|
@@ -1865,11 +1842,11 @@ function _o(e) {
|
|
|
1865
1842
|
};
|
|
1866
1843
|
if (!L.floating)
|
|
1867
1844
|
return E;
|
|
1868
|
-
const S =
|
|
1845
|
+
const S = Et(L.floating, f.x), N = Et(L.floating, f.y);
|
|
1869
1846
|
return a ? {
|
|
1870
1847
|
...E,
|
|
1871
1848
|
transform: "translate(" + S + "px, " + N + "px)",
|
|
1872
|
-
...
|
|
1849
|
+
...Kt(L.floating) >= 1.5 && {
|
|
1873
1850
|
willChange: "transform"
|
|
1874
1851
|
}
|
|
1875
1852
|
} : {
|
|
@@ -1877,16 +1854,16 @@ function _o(e) {
|
|
|
1877
1854
|
left: S,
|
|
1878
1855
|
top: N
|
|
1879
1856
|
};
|
|
1880
|
-
}, [n, a, L.floating,
|
|
1881
|
-
return
|
|
1882
|
-
...
|
|
1857
|
+
}, [n, a, L.floating, f.x, f.y]);
|
|
1858
|
+
return u.useMemo(() => ({
|
|
1859
|
+
...f,
|
|
1883
1860
|
update: $,
|
|
1884
1861
|
refs: T,
|
|
1885
1862
|
elements: L,
|
|
1886
1863
|
floatingStyles: F
|
|
1887
|
-
}), [
|
|
1864
|
+
}), [f, $, T, L, F]);
|
|
1888
1865
|
}
|
|
1889
|
-
const
|
|
1866
|
+
const Po = (e) => {
|
|
1890
1867
|
function t(n) {
|
|
1891
1868
|
return {}.hasOwnProperty.call(n, "current");
|
|
1892
1869
|
}
|
|
@@ -1898,26 +1875,23 @@ const Ao = (e) => {
|
|
|
1898
1875
|
element: o,
|
|
1899
1876
|
padding: i
|
|
1900
1877
|
} = typeof e == "function" ? e(n) : e;
|
|
1901
|
-
return o && t(o) ? o.current != null ?
|
|
1878
|
+
return o && t(o) ? o.current != null ? Ct({
|
|
1902
1879
|
element: o.current,
|
|
1903
1880
|
padding: i
|
|
1904
|
-
}).fn(n) : {} : o ?
|
|
1881
|
+
}).fn(n) : {} : o ? Ct({
|
|
1905
1882
|
element: o,
|
|
1906
1883
|
padding: i
|
|
1907
1884
|
}).fn(n) : {};
|
|
1908
1885
|
}
|
|
1909
1886
|
};
|
|
1910
|
-
},
|
|
1911
|
-
...mo(e),
|
|
1912
|
-
options: [e, t]
|
|
1913
|
-
}), Co = (e, t) => ({
|
|
1887
|
+
}, Co = (e, t) => ({
|
|
1914
1888
|
...go(e),
|
|
1915
1889
|
options: [e, t]
|
|
1916
1890
|
}), Eo = (e, t) => ({
|
|
1917
|
-
...
|
|
1891
|
+
...vo(e),
|
|
1918
1892
|
options: [e, t]
|
|
1919
1893
|
}), Oo = (e, t) => ({
|
|
1920
|
-
...
|
|
1894
|
+
...bo(e),
|
|
1921
1895
|
options: [e, t]
|
|
1922
1896
|
}), Ro = (e, t) => ({
|
|
1923
1897
|
...yo(e),
|
|
@@ -1926,10 +1900,13 @@ const Ao = (e) => {
|
|
|
1926
1900
|
...wo(e),
|
|
1927
1901
|
options: [e, t]
|
|
1928
1902
|
}), So = (e, t) => ({
|
|
1929
|
-
...
|
|
1903
|
+
...xo(e),
|
|
1904
|
+
options: [e, t]
|
|
1905
|
+
}), No = (e, t) => ({
|
|
1906
|
+
...Po(e),
|
|
1930
1907
|
options: [e, t]
|
|
1931
1908
|
});
|
|
1932
|
-
var
|
|
1909
|
+
var Do = "Arrow", Jt = u.forwardRef((e, t) => {
|
|
1933
1910
|
const { children: n, width: o = 10, height: i = 5, ...r } = e;
|
|
1934
1911
|
return /* @__PURE__ */ x(
|
|
1935
1912
|
K.svg,
|
|
@@ -1944,10 +1921,10 @@ var No = "Arrow", en = f.forwardRef((e, t) => {
|
|
|
1944
1921
|
}
|
|
1945
1922
|
);
|
|
1946
1923
|
});
|
|
1947
|
-
|
|
1948
|
-
var
|
|
1949
|
-
function
|
|
1950
|
-
const [t, n] =
|
|
1924
|
+
Jt.displayName = Do;
|
|
1925
|
+
var Lo = Jt;
|
|
1926
|
+
function Mo(e) {
|
|
1927
|
+
const [t, n] = u.useState(void 0);
|
|
1951
1928
|
return Q(() => {
|
|
1952
1929
|
if (e) {
|
|
1953
1930
|
n({ width: e.offsetWidth, height: e.offsetHeight });
|
|
@@ -1968,23 +1945,23 @@ function Lo(e) {
|
|
|
1968
1945
|
n(void 0);
|
|
1969
1946
|
}, [e]), t;
|
|
1970
1947
|
}
|
|
1971
|
-
var
|
|
1972
|
-
const { __scopePopper: t, children: n } = e, [o, i] =
|
|
1973
|
-
return /* @__PURE__ */ x(
|
|
1948
|
+
var Ge = "Popper", [Qt, en] = Ft(Ge), [$o, tn] = Qt(Ge), nn = (e) => {
|
|
1949
|
+
const { __scopePopper: t, children: n } = e, [o, i] = u.useState(null);
|
|
1950
|
+
return /* @__PURE__ */ x($o, { scope: t, anchor: o, onAnchorChange: i, children: n });
|
|
1974
1951
|
};
|
|
1975
|
-
|
|
1976
|
-
var
|
|
1952
|
+
nn.displayName = Ge;
|
|
1953
|
+
var rn = "PopperAnchor", on = u.forwardRef(
|
|
1977
1954
|
(e, t) => {
|
|
1978
|
-
const { __scopePopper: n, virtualRef: o, ...i } = e, r = rn
|
|
1979
|
-
return
|
|
1955
|
+
const { __scopePopper: n, virtualRef: o, ...i } = e, r = tn(rn, n), s = u.useRef(null), a = te(t, s);
|
|
1956
|
+
return u.useEffect(() => {
|
|
1980
1957
|
r.onAnchorChange((o == null ? void 0 : o.current) || s.current);
|
|
1981
1958
|
}), o ? null : /* @__PURE__ */ x(K.div, { ...i, ref: a });
|
|
1982
1959
|
}
|
|
1983
1960
|
);
|
|
1984
|
-
|
|
1985
|
-
var
|
|
1961
|
+
on.displayName = rn;
|
|
1962
|
+
var Xe = "PopperContent", [ko, Fo] = Qt(Xe), sn = u.forwardRef(
|
|
1986
1963
|
(e, t) => {
|
|
1987
|
-
var tt, nt, rt, ot
|
|
1964
|
+
var Qe, et, tt, nt, rt, ot;
|
|
1988
1965
|
const {
|
|
1989
1966
|
__scopePopper: n,
|
|
1990
1967
|
side: o = "bottom",
|
|
@@ -1994,54 +1971,54 @@ var Ke = "PopperContent", [$o, ko] = tn(Ke), cn = f.forwardRef(
|
|
|
1994
1971
|
arrowPadding: a = 0,
|
|
1995
1972
|
avoidCollisions: c = !0,
|
|
1996
1973
|
collisionBoundary: l = [],
|
|
1997
|
-
collisionPadding:
|
|
1974
|
+
collisionPadding: f = 0,
|
|
1998
1975
|
sticky: d = "partial",
|
|
1999
1976
|
hideWhenDetached: h = !1,
|
|
2000
1977
|
updatePositionStrategy: p = "optimized",
|
|
2001
1978
|
onPlaced: m,
|
|
2002
1979
|
...g
|
|
2003
|
-
} = e, v =
|
|
1980
|
+
} = e, v = tn(Xe, n), [y, w] = u.useState(null), A = te(t, (le) => w(le)), [b, _] = u.useState(null), C = Mo(b), P = (C == null ? void 0 : C.width) ?? 0, O = (C == null ? void 0 : C.height) ?? 0, D = o + (r !== "center" ? "-" + r : ""), R = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, M = Array.isArray(l) ? l : [l], $ = M.length > 0, k = {
|
|
2004
1981
|
padding: R,
|
|
2005
|
-
boundary: M.filter(
|
|
1982
|
+
boundary: M.filter(Bo),
|
|
2006
1983
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
2007
1984
|
altBoundary: $
|
|
2008
|
-
}, { refs: T, floatingStyles: L, placement: F, isPositioned: E, middlewareData: S } =
|
|
1985
|
+
}, { refs: T, floatingStyles: L, placement: F, isPositioned: E, middlewareData: S } = Ao({
|
|
2009
1986
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
2010
1987
|
strategy: "fixed",
|
|
2011
1988
|
placement: D,
|
|
2012
|
-
whileElementsMounted: (...le) =>
|
|
1989
|
+
whileElementsMounted: (...le) => mo(...le, {
|
|
2013
1990
|
animationFrame: p === "always"
|
|
2014
1991
|
}),
|
|
2015
1992
|
elements: {
|
|
2016
1993
|
reference: v.anchor
|
|
2017
1994
|
},
|
|
2018
1995
|
middleware: [
|
|
2019
|
-
|
|
2020
|
-
c &&
|
|
1996
|
+
Co({ mainAxis: i + O, alignmentAxis: s }),
|
|
1997
|
+
c && Eo({
|
|
2021
1998
|
mainAxis: !0,
|
|
2022
1999
|
crossAxis: !1,
|
|
2023
|
-
limiter: d === "partial" ?
|
|
2000
|
+
limiter: d === "partial" ? Oo() : void 0,
|
|
2024
2001
|
...k
|
|
2025
2002
|
}),
|
|
2026
|
-
c &&
|
|
2027
|
-
|
|
2003
|
+
c && Ro({ ...k }),
|
|
2004
|
+
To({
|
|
2028
2005
|
...k,
|
|
2029
|
-
apply: ({ elements: le, rects:
|
|
2030
|
-
const { width:
|
|
2031
|
-
|
|
2006
|
+
apply: ({ elements: le, rects: it, availableWidth: En, availableHeight: On }) => {
|
|
2007
|
+
const { width: Rn, height: Tn } = it.reference, ve = le.floating.style;
|
|
2008
|
+
ve.setProperty("--radix-popper-available-width", `${En}px`), ve.setProperty("--radix-popper-available-height", `${On}px`), ve.setProperty("--radix-popper-anchor-width", `${Rn}px`), ve.setProperty("--radix-popper-anchor-height", `${Tn}px`);
|
|
2032
2009
|
}
|
|
2033
2010
|
}),
|
|
2034
|
-
b &&
|
|
2035
|
-
|
|
2036
|
-
h &&
|
|
2011
|
+
b && No({ element: b, padding: a }),
|
|
2012
|
+
Wo({ arrowWidth: P, arrowHeight: O }),
|
|
2013
|
+
h && So({ strategy: "referenceHidden", ...k })
|
|
2037
2014
|
]
|
|
2038
|
-
}), [N,
|
|
2015
|
+
}), [N, Ne] = ln(F), ge = se(m);
|
|
2039
2016
|
Q(() => {
|
|
2040
|
-
E && (
|
|
2041
|
-
}, [E,
|
|
2042
|
-
const
|
|
2017
|
+
E && (ge == null || ge());
|
|
2018
|
+
}, [E, ge]);
|
|
2019
|
+
const bn = (Qe = S.arrow) == null ? void 0 : Qe.x, _n = (et = S.arrow) == null ? void 0 : et.y, An = ((tt = S.arrow) == null ? void 0 : tt.centerOffset) !== 0, [Pn, Cn] = u.useState();
|
|
2043
2020
|
return Q(() => {
|
|
2044
|
-
y &&
|
|
2021
|
+
y && Cn(window.getComputedStyle(y).zIndex);
|
|
2045
2022
|
}, [y]), /* @__PURE__ */ x(
|
|
2046
2023
|
"div",
|
|
2047
2024
|
{
|
|
@@ -2052,34 +2029,34 @@ var Ke = "PopperContent", [$o, ko] = tn(Ke), cn = f.forwardRef(
|
|
|
2052
2029
|
transform: E ? L.transform : "translate(0, -200%)",
|
|
2053
2030
|
// keep off the page when measuring
|
|
2054
2031
|
minWidth: "max-content",
|
|
2055
|
-
zIndex:
|
|
2032
|
+
zIndex: Pn,
|
|
2056
2033
|
"--radix-popper-transform-origin": [
|
|
2057
|
-
(
|
|
2058
|
-
(
|
|
2034
|
+
(nt = S.transformOrigin) == null ? void 0 : nt.x,
|
|
2035
|
+
(rt = S.transformOrigin) == null ? void 0 : rt.y
|
|
2059
2036
|
].join(" "),
|
|
2060
2037
|
// hide the content if using the hide middleware and should be hidden
|
|
2061
2038
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
2062
2039
|
// as if the PopperContent isn't there at all
|
|
2063
|
-
...((
|
|
2040
|
+
...((ot = S.hide) == null ? void 0 : ot.referenceHidden) && {
|
|
2064
2041
|
visibility: "hidden",
|
|
2065
2042
|
pointerEvents: "none"
|
|
2066
2043
|
}
|
|
2067
2044
|
},
|
|
2068
2045
|
dir: e.dir,
|
|
2069
2046
|
children: /* @__PURE__ */ x(
|
|
2070
|
-
|
|
2047
|
+
ko,
|
|
2071
2048
|
{
|
|
2072
2049
|
scope: n,
|
|
2073
2050
|
placedSide: N,
|
|
2074
2051
|
onArrowChange: _,
|
|
2075
|
-
arrowX:
|
|
2076
|
-
arrowY:
|
|
2077
|
-
shouldHideArrow:
|
|
2052
|
+
arrowX: bn,
|
|
2053
|
+
arrowY: _n,
|
|
2054
|
+
shouldHideArrow: An,
|
|
2078
2055
|
children: /* @__PURE__ */ x(
|
|
2079
2056
|
K.div,
|
|
2080
2057
|
{
|
|
2081
2058
|
"data-side": N,
|
|
2082
|
-
"data-align":
|
|
2059
|
+
"data-align": Ne,
|
|
2083
2060
|
...g,
|
|
2084
2061
|
ref: A,
|
|
2085
2062
|
style: {
|
|
@@ -2096,14 +2073,14 @@ var Ke = "PopperContent", [$o, ko] = tn(Ke), cn = f.forwardRef(
|
|
|
2096
2073
|
);
|
|
2097
2074
|
}
|
|
2098
2075
|
);
|
|
2099
|
-
|
|
2100
|
-
var
|
|
2076
|
+
sn.displayName = Xe;
|
|
2077
|
+
var an = "PopperArrow", Io = {
|
|
2101
2078
|
top: "bottom",
|
|
2102
2079
|
right: "left",
|
|
2103
2080
|
bottom: "top",
|
|
2104
2081
|
left: "right"
|
|
2105
|
-
},
|
|
2106
|
-
const { __scopePopper: o, ...i } = t, r =
|
|
2082
|
+
}, cn = u.forwardRef(function(t, n) {
|
|
2083
|
+
const { __scopePopper: o, ...i } = t, r = Fo(an, o), s = Io[r.placedSide];
|
|
2107
2084
|
return (
|
|
2108
2085
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
2109
2086
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -2132,7 +2109,7 @@ var ln = "PopperArrow", Fo = {
|
|
|
2132
2109
|
visibility: r.shouldHideArrow ? "hidden" : void 0
|
|
2133
2110
|
},
|
|
2134
2111
|
children: /* @__PURE__ */ x(
|
|
2135
|
-
|
|
2112
|
+
Lo,
|
|
2136
2113
|
{
|
|
2137
2114
|
...i,
|
|
2138
2115
|
ref: n,
|
|
@@ -2147,42 +2124,42 @@ var ln = "PopperArrow", Fo = {
|
|
|
2147
2124
|
)
|
|
2148
2125
|
);
|
|
2149
2126
|
});
|
|
2150
|
-
|
|
2151
|
-
function
|
|
2127
|
+
cn.displayName = an;
|
|
2128
|
+
function Bo(e) {
|
|
2152
2129
|
return e !== null;
|
|
2153
2130
|
}
|
|
2154
|
-
var
|
|
2131
|
+
var Wo = (e) => ({
|
|
2155
2132
|
name: "transformOrigin",
|
|
2156
2133
|
options: e,
|
|
2157
2134
|
fn(t) {
|
|
2158
2135
|
var v, y, w;
|
|
2159
|
-
const { placement: n, rects: o, middlewareData: i } = t, s = ((v = i.arrow) == null ? void 0 : v.centerOffset) !== 0, a = s ? 0 : e.arrowWidth, c = s ? 0 : e.arrowHeight, [l,
|
|
2136
|
+
const { placement: n, rects: o, middlewareData: i } = t, s = ((v = i.arrow) == null ? void 0 : v.centerOffset) !== 0, a = s ? 0 : e.arrowWidth, c = s ? 0 : e.arrowHeight, [l, f] = ln(n), d = { start: "0%", center: "50%", end: "100%" }[f], h = (((y = i.arrow) == null ? void 0 : y.x) ?? 0) + a / 2, p = (((w = i.arrow) == null ? void 0 : w.y) ?? 0) + c / 2;
|
|
2160
2137
|
let m = "", g = "";
|
|
2161
2138
|
return l === "bottom" ? (m = s ? d : `${h}px`, g = `${-c}px`) : l === "top" ? (m = s ? d : `${h}px`, g = `${o.floating.height + c}px`) : l === "right" ? (m = `${-c}px`, g = s ? d : `${p}px`) : l === "left" && (m = `${o.floating.width + c}px`, g = s ? d : `${p}px`), { data: { x: m, y: g } };
|
|
2162
2139
|
}
|
|
2163
2140
|
});
|
|
2164
|
-
function
|
|
2141
|
+
function ln(e) {
|
|
2165
2142
|
const [t, n = "center"] = e.split("-");
|
|
2166
2143
|
return [t, n];
|
|
2167
2144
|
}
|
|
2168
|
-
var
|
|
2145
|
+
var Ho = nn, jo = on, qo = sn, zo = cn, Vo = "Portal", un = u.forwardRef((e, t) => {
|
|
2169
2146
|
var a;
|
|
2170
|
-
const { container: n, ...o } = e, [i, r] =
|
|
2147
|
+
const { container: n, ...o } = e, [i, r] = u.useState(!1);
|
|
2171
2148
|
Q(() => r(!0), []);
|
|
2172
2149
|
const s = n || i && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
|
|
2173
|
-
return s ?
|
|
2150
|
+
return s ? $n.createPortal(/* @__PURE__ */ x(K.div, { ...o, ref: t }), s) : null;
|
|
2174
2151
|
});
|
|
2175
|
-
|
|
2176
|
-
function
|
|
2177
|
-
return
|
|
2152
|
+
un.displayName = Vo;
|
|
2153
|
+
function Uo(e, t) {
|
|
2154
|
+
return u.useReducer((n, o) => t[n][o] ?? n, e);
|
|
2178
2155
|
}
|
|
2179
|
-
var
|
|
2180
|
-
const { present: t, children: n } = e, o =
|
|
2181
|
-
return typeof n == "function" || o.isPresent ?
|
|
2156
|
+
var Ze = (e) => {
|
|
2157
|
+
const { present: t, children: n } = e, o = Yo(t), i = typeof n == "function" ? n({ present: o.isPresent }) : u.Children.only(n), r = te(o.ref, Go(i));
|
|
2158
|
+
return typeof n == "function" || o.isPresent ? u.cloneElement(i, { ref: r }) : null;
|
|
2182
2159
|
};
|
|
2183
|
-
|
|
2184
|
-
function
|
|
2185
|
-
const [t, n] =
|
|
2160
|
+
Ze.displayName = "Presence";
|
|
2161
|
+
function Yo(e) {
|
|
2162
|
+
const [t, n] = u.useState(), o = u.useRef({}), i = u.useRef(e), r = u.useRef("none"), s = e ? "mounted" : "unmounted", [a, c] = Uo(s, {
|
|
2186
2163
|
mounted: {
|
|
2187
2164
|
UNMOUNT: "unmounted",
|
|
2188
2165
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -2195,56 +2172,56 @@ function Uo(e) {
|
|
|
2195
2172
|
MOUNT: "mounted"
|
|
2196
2173
|
}
|
|
2197
2174
|
});
|
|
2198
|
-
return
|
|
2199
|
-
const l =
|
|
2175
|
+
return u.useEffect(() => {
|
|
2176
|
+
const l = we(o.current);
|
|
2200
2177
|
r.current = a === "mounted" ? l : "none";
|
|
2201
2178
|
}, [a]), Q(() => {
|
|
2202
|
-
const l = o.current,
|
|
2203
|
-
if (
|
|
2204
|
-
const h = r.current, p =
|
|
2205
|
-
e ? c("MOUNT") : p === "none" || (l == null ? void 0 : l.display) === "none" ? c("UNMOUNT") : c(
|
|
2179
|
+
const l = o.current, f = i.current;
|
|
2180
|
+
if (f !== e) {
|
|
2181
|
+
const h = r.current, p = we(l);
|
|
2182
|
+
e ? c("MOUNT") : p === "none" || (l == null ? void 0 : l.display) === "none" ? c("UNMOUNT") : c(f && h !== p ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
|
|
2206
2183
|
}
|
|
2207
2184
|
}, [e, c]), Q(() => {
|
|
2208
2185
|
if (t) {
|
|
2209
2186
|
let l;
|
|
2210
|
-
const
|
|
2211
|
-
const g =
|
|
2187
|
+
const f = t.ownerDocument.defaultView ?? window, d = (p) => {
|
|
2188
|
+
const g = we(o.current).includes(p.animationName);
|
|
2212
2189
|
if (p.target === t && g && (c("ANIMATION_END"), !i.current)) {
|
|
2213
2190
|
const v = t.style.animationFillMode;
|
|
2214
|
-
t.style.animationFillMode = "forwards", l =
|
|
2191
|
+
t.style.animationFillMode = "forwards", l = f.setTimeout(() => {
|
|
2215
2192
|
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = v);
|
|
2216
2193
|
});
|
|
2217
2194
|
}
|
|
2218
2195
|
}, h = (p) => {
|
|
2219
|
-
p.target === t && (r.current =
|
|
2196
|
+
p.target === t && (r.current = we(o.current));
|
|
2220
2197
|
};
|
|
2221
2198
|
return t.addEventListener("animationstart", h), t.addEventListener("animationcancel", d), t.addEventListener("animationend", d), () => {
|
|
2222
|
-
|
|
2199
|
+
f.clearTimeout(l), t.removeEventListener("animationstart", h), t.removeEventListener("animationcancel", d), t.removeEventListener("animationend", d);
|
|
2223
2200
|
};
|
|
2224
2201
|
} else
|
|
2225
2202
|
c("ANIMATION_END");
|
|
2226
2203
|
}, [t, c]), {
|
|
2227
2204
|
isPresent: ["mounted", "unmountSuspended"].includes(a),
|
|
2228
|
-
ref:
|
|
2205
|
+
ref: u.useCallback((l) => {
|
|
2229
2206
|
l && (o.current = getComputedStyle(l)), n(l);
|
|
2230
2207
|
}, [])
|
|
2231
2208
|
};
|
|
2232
2209
|
}
|
|
2233
|
-
function
|
|
2210
|
+
function we(e) {
|
|
2234
2211
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
2235
2212
|
}
|
|
2236
|
-
function
|
|
2213
|
+
function Go(e) {
|
|
2237
2214
|
var o, i;
|
|
2238
2215
|
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
2239
2216
|
return n ? e.ref : (t = (i = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : i.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
2240
2217
|
}
|
|
2241
|
-
function
|
|
2218
|
+
function Xo({
|
|
2242
2219
|
prop: e,
|
|
2243
2220
|
defaultProp: t,
|
|
2244
2221
|
onChange: n = () => {
|
|
2245
2222
|
}
|
|
2246
2223
|
}) {
|
|
2247
|
-
const [o, i] =
|
|
2224
|
+
const [o, i] = Zo({ defaultProp: t, onChange: n }), r = e !== void 0, s = r ? e : o, a = se(n), c = u.useCallback(
|
|
2248
2225
|
(l) => {
|
|
2249
2226
|
if (r) {
|
|
2250
2227
|
const d = typeof l == "function" ? l(e) : l;
|
|
@@ -2256,16 +2233,16 @@ function Go({
|
|
|
2256
2233
|
);
|
|
2257
2234
|
return [s, c];
|
|
2258
2235
|
}
|
|
2259
|
-
function
|
|
2236
|
+
function Zo({
|
|
2260
2237
|
defaultProp: e,
|
|
2261
2238
|
onChange: t
|
|
2262
2239
|
}) {
|
|
2263
|
-
const n =
|
|
2264
|
-
return
|
|
2240
|
+
const n = u.useState(e), [o] = n, i = u.useRef(o), r = se(t);
|
|
2241
|
+
return u.useEffect(() => {
|
|
2265
2242
|
i.current !== o && (r(o), i.current = o);
|
|
2266
2243
|
}, [o, i, r]), n;
|
|
2267
2244
|
}
|
|
2268
|
-
var
|
|
2245
|
+
var Ko = "VisuallyHidden", fn = u.forwardRef(
|
|
2269
2246
|
(e, t) => /* @__PURE__ */ x(
|
|
2270
2247
|
K.span,
|
|
2271
2248
|
{
|
|
@@ -2288,46 +2265,46 @@ var Zo = "VisuallyHidden", dn = f.forwardRef(
|
|
|
2288
2265
|
}
|
|
2289
2266
|
)
|
|
2290
2267
|
);
|
|
2291
|
-
|
|
2292
|
-
var
|
|
2293
|
-
|
|
2294
|
-
]),
|
|
2268
|
+
fn.displayName = Ko;
|
|
2269
|
+
var Jo = fn, [Re, Mi] = Ft("Tooltip", [
|
|
2270
|
+
en
|
|
2271
|
+
]), Te = en(), pn = "TooltipProvider", Qo = 700, We = "tooltip.open", [ei, Ke] = Re(pn), dn = (e) => {
|
|
2295
2272
|
const {
|
|
2296
2273
|
__scopeTooltip: t,
|
|
2297
|
-
delayDuration: n =
|
|
2274
|
+
delayDuration: n = Qo,
|
|
2298
2275
|
skipDelayDuration: o = 300,
|
|
2299
2276
|
disableHoverableContent: i = !1,
|
|
2300
2277
|
children: r
|
|
2301
|
-
} = e, [s, a] =
|
|
2302
|
-
return
|
|
2303
|
-
const
|
|
2304
|
-
return () => window.clearTimeout(
|
|
2278
|
+
} = e, [s, a] = u.useState(!0), c = u.useRef(!1), l = u.useRef(0);
|
|
2279
|
+
return u.useEffect(() => {
|
|
2280
|
+
const f = l.current;
|
|
2281
|
+
return () => window.clearTimeout(f);
|
|
2305
2282
|
}, []), /* @__PURE__ */ x(
|
|
2306
|
-
|
|
2283
|
+
ei,
|
|
2307
2284
|
{
|
|
2308
2285
|
scope: t,
|
|
2309
2286
|
isOpenDelayed: s,
|
|
2310
2287
|
delayDuration: n,
|
|
2311
|
-
onOpen:
|
|
2288
|
+
onOpen: u.useCallback(() => {
|
|
2312
2289
|
window.clearTimeout(l.current), a(!1);
|
|
2313
2290
|
}, []),
|
|
2314
|
-
onClose:
|
|
2291
|
+
onClose: u.useCallback(() => {
|
|
2315
2292
|
window.clearTimeout(l.current), l.current = window.setTimeout(
|
|
2316
2293
|
() => a(!0),
|
|
2317
2294
|
o
|
|
2318
2295
|
);
|
|
2319
2296
|
}, [o]),
|
|
2320
2297
|
isPointerInTransitRef: c,
|
|
2321
|
-
onPointerInTransitChange:
|
|
2322
|
-
c.current =
|
|
2298
|
+
onPointerInTransitChange: u.useCallback((f) => {
|
|
2299
|
+
c.current = f;
|
|
2323
2300
|
}, []),
|
|
2324
2301
|
disableHoverableContent: i,
|
|
2325
2302
|
children: r
|
|
2326
2303
|
}
|
|
2327
2304
|
);
|
|
2328
2305
|
};
|
|
2329
|
-
|
|
2330
|
-
var
|
|
2306
|
+
dn.displayName = pn;
|
|
2307
|
+
var Se = "Tooltip", [ti, me] = Re(Se), hn = (e) => {
|
|
2331
2308
|
const {
|
|
2332
2309
|
__scopeTooltip: t,
|
|
2333
2310
|
children: n,
|
|
@@ -2336,36 +2313,36 @@ var De = "Tooltip", [ei, ve] = Se(De), gn = (e) => {
|
|
|
2336
2313
|
onOpenChange: r,
|
|
2337
2314
|
disableHoverableContent: s,
|
|
2338
2315
|
delayDuration: a
|
|
2339
|
-
} = e, c =
|
|
2316
|
+
} = e, c = Ke(Se, e.__scopeTooltip), l = Te(t), [f, d] = u.useState(null), h = Lr(), p = u.useRef(0), m = s ?? c.disableHoverableContent, g = a ?? c.delayDuration, v = u.useRef(!1), [y = !1, w] = Xo({
|
|
2340
2317
|
prop: o,
|
|
2341
2318
|
defaultProp: i,
|
|
2342
2319
|
onChange: (P) => {
|
|
2343
|
-
P ? (c.onOpen(), document.dispatchEvent(new CustomEvent(
|
|
2320
|
+
P ? (c.onOpen(), document.dispatchEvent(new CustomEvent(We))) : c.onClose(), r == null || r(P);
|
|
2344
2321
|
}
|
|
2345
|
-
}), A =
|
|
2322
|
+
}), A = u.useMemo(() => y ? v.current ? "delayed-open" : "instant-open" : "closed", [y]), b = u.useCallback(() => {
|
|
2346
2323
|
window.clearTimeout(p.current), p.current = 0, v.current = !1, w(!0);
|
|
2347
|
-
}, [w]), _ =
|
|
2324
|
+
}, [w]), _ = u.useCallback(() => {
|
|
2348
2325
|
window.clearTimeout(p.current), p.current = 0, w(!1);
|
|
2349
|
-
}, [w]), C =
|
|
2326
|
+
}, [w]), C = u.useCallback(() => {
|
|
2350
2327
|
window.clearTimeout(p.current), p.current = window.setTimeout(() => {
|
|
2351
2328
|
v.current = !0, w(!0), p.current = 0;
|
|
2352
2329
|
}, g);
|
|
2353
2330
|
}, [g, w]);
|
|
2354
|
-
return
|
|
2331
|
+
return u.useEffect(() => () => {
|
|
2355
2332
|
p.current && (window.clearTimeout(p.current), p.current = 0);
|
|
2356
|
-
}, []), /* @__PURE__ */ x(
|
|
2357
|
-
|
|
2333
|
+
}, []), /* @__PURE__ */ x(Ho, { ...l, children: /* @__PURE__ */ x(
|
|
2334
|
+
ti,
|
|
2358
2335
|
{
|
|
2359
2336
|
scope: t,
|
|
2360
2337
|
contentId: h,
|
|
2361
2338
|
open: y,
|
|
2362
2339
|
stateAttribute: A,
|
|
2363
|
-
trigger:
|
|
2340
|
+
trigger: f,
|
|
2364
2341
|
onTriggerChange: d,
|
|
2365
|
-
onTriggerEnter:
|
|
2342
|
+
onTriggerEnter: u.useCallback(() => {
|
|
2366
2343
|
c.isOpenDelayed ? C() : b();
|
|
2367
2344
|
}, [c.isOpenDelayed, C, b]),
|
|
2368
|
-
onTriggerLeave:
|
|
2345
|
+
onTriggerLeave: u.useCallback(() => {
|
|
2369
2346
|
m ? _() : (window.clearTimeout(p.current), p.current = 0);
|
|
2370
2347
|
}, [_, m]),
|
|
2371
2348
|
onOpen: b,
|
|
@@ -2375,75 +2352,75 @@ var De = "Tooltip", [ei, ve] = Se(De), gn = (e) => {
|
|
|
2375
2352
|
}
|
|
2376
2353
|
) });
|
|
2377
2354
|
};
|
|
2378
|
-
|
|
2379
|
-
var
|
|
2355
|
+
hn.displayName = Se;
|
|
2356
|
+
var He = "TooltipTrigger", mn = u.forwardRef(
|
|
2380
2357
|
(e, t) => {
|
|
2381
|
-
const { __scopeTooltip: n, ...o } = e, i =
|
|
2382
|
-
return
|
|
2358
|
+
const { __scopeTooltip: n, ...o } = e, i = me(He, n), r = Ke(He, n), s = Te(n), a = u.useRef(null), c = te(t, a, i.onTriggerChange), l = u.useRef(!1), f = u.useRef(!1), d = u.useCallback(() => l.current = !1, []);
|
|
2359
|
+
return u.useEffect(() => () => document.removeEventListener("pointerup", d), [d]), /* @__PURE__ */ x(jo, { asChild: !0, ...s, children: /* @__PURE__ */ x(
|
|
2383
2360
|
K.button,
|
|
2384
2361
|
{
|
|
2385
2362
|
"aria-describedby": i.open ? i.contentId : void 0,
|
|
2386
2363
|
"data-state": i.stateAttribute,
|
|
2387
2364
|
...o,
|
|
2388
2365
|
ref: c,
|
|
2389
|
-
onPointerMove:
|
|
2390
|
-
h.pointerType !== "touch" && !
|
|
2366
|
+
onPointerMove: z(e.onPointerMove, (h) => {
|
|
2367
|
+
h.pointerType !== "touch" && !f.current && !r.isPointerInTransitRef.current && (i.onTriggerEnter(), f.current = !0);
|
|
2391
2368
|
}),
|
|
2392
|
-
onPointerLeave:
|
|
2393
|
-
i.onTriggerLeave(),
|
|
2369
|
+
onPointerLeave: z(e.onPointerLeave, () => {
|
|
2370
|
+
i.onTriggerLeave(), f.current = !1;
|
|
2394
2371
|
}),
|
|
2395
|
-
onPointerDown:
|
|
2372
|
+
onPointerDown: z(e.onPointerDown, () => {
|
|
2396
2373
|
l.current = !0, document.addEventListener("pointerup", d, { once: !0 });
|
|
2397
2374
|
}),
|
|
2398
|
-
onFocus:
|
|
2375
|
+
onFocus: z(e.onFocus, () => {
|
|
2399
2376
|
l.current || i.onOpen();
|
|
2400
2377
|
}),
|
|
2401
|
-
onBlur:
|
|
2402
|
-
onClick:
|
|
2378
|
+
onBlur: z(e.onBlur, i.onClose),
|
|
2379
|
+
onClick: z(e.onClick, i.onClose)
|
|
2403
2380
|
}
|
|
2404
2381
|
) });
|
|
2405
2382
|
}
|
|
2406
2383
|
);
|
|
2407
|
-
|
|
2408
|
-
var
|
|
2384
|
+
mn.displayName = He;
|
|
2385
|
+
var Je = "TooltipPortal", [ni, ri] = Re(Je, {
|
|
2409
2386
|
forceMount: void 0
|
|
2410
|
-
}),
|
|
2411
|
-
const { __scopeTooltip: t, forceMount: n, children: o, container: i } = e, r =
|
|
2412
|
-
return /* @__PURE__ */ x(
|
|
2387
|
+
}), gn = (e) => {
|
|
2388
|
+
const { __scopeTooltip: t, forceMount: n, children: o, container: i } = e, r = me(Je, t);
|
|
2389
|
+
return /* @__PURE__ */ x(ni, { scope: t, forceMount: n, children: /* @__PURE__ */ x(Ze, { present: n || r.open, children: /* @__PURE__ */ x(un, { asChild: !0, container: i, children: o }) }) });
|
|
2413
2390
|
};
|
|
2414
|
-
|
|
2415
|
-
var ie = "TooltipContent",
|
|
2391
|
+
gn.displayName = Je;
|
|
2392
|
+
var ie = "TooltipContent", vn = u.forwardRef(
|
|
2416
2393
|
(e, t) => {
|
|
2417
|
-
const n =
|
|
2418
|
-
return /* @__PURE__ */ x(
|
|
2394
|
+
const n = ri(ie, e.__scopeTooltip), { forceMount: o = n.forceMount, side: i = "top", ...r } = e, s = me(ie, e.__scopeTooltip);
|
|
2395
|
+
return /* @__PURE__ */ x(Ze, { present: o || s.open, children: s.disableHoverableContent ? /* @__PURE__ */ x(yn, { side: i, ...r, ref: t }) : /* @__PURE__ */ x(oi, { side: i, ...r, ref: t }) });
|
|
2419
2396
|
}
|
|
2420
|
-
),
|
|
2421
|
-
const n =
|
|
2397
|
+
), oi = u.forwardRef((e, t) => {
|
|
2398
|
+
const n = me(ie, e.__scopeTooltip), o = Ke(ie, e.__scopeTooltip), i = u.useRef(null), r = te(t, i), [s, a] = u.useState(null), { trigger: c, onClose: l } = n, f = i.current, { onPointerInTransitChange: d } = o, h = u.useCallback(() => {
|
|
2422
2399
|
a(null), d(!1);
|
|
2423
|
-
}, [d]), p =
|
|
2400
|
+
}, [d]), p = u.useCallback(
|
|
2424
2401
|
(m, g) => {
|
|
2425
|
-
const v = m.currentTarget, y = { x: m.clientX, y: m.clientY }, w =
|
|
2402
|
+
const v = m.currentTarget, y = { x: m.clientX, y: m.clientY }, w = ai(y, v.getBoundingClientRect()), A = ci(y, w), b = li(g.getBoundingClientRect()), _ = fi([...A, ...b]);
|
|
2426
2403
|
a(_), d(!0);
|
|
2427
2404
|
},
|
|
2428
2405
|
[d]
|
|
2429
2406
|
);
|
|
2430
|
-
return
|
|
2431
|
-
if (c &&
|
|
2432
|
-
const m = (v) => p(v,
|
|
2433
|
-
return c.addEventListener("pointerleave", m),
|
|
2434
|
-
c.removeEventListener("pointerleave", m),
|
|
2407
|
+
return u.useEffect(() => () => h(), [h]), u.useEffect(() => {
|
|
2408
|
+
if (c && f) {
|
|
2409
|
+
const m = (v) => p(v, f), g = (v) => p(v, c);
|
|
2410
|
+
return c.addEventListener("pointerleave", m), f.addEventListener("pointerleave", g), () => {
|
|
2411
|
+
c.removeEventListener("pointerleave", m), f.removeEventListener("pointerleave", g);
|
|
2435
2412
|
};
|
|
2436
2413
|
}
|
|
2437
|
-
}, [c,
|
|
2414
|
+
}, [c, f, p, h]), u.useEffect(() => {
|
|
2438
2415
|
if (s) {
|
|
2439
2416
|
const m = (g) => {
|
|
2440
|
-
const v = g.target, y = { x: g.clientX, y: g.clientY }, w = (c == null ? void 0 : c.contains(v)) || (
|
|
2417
|
+
const v = g.target, y = { x: g.clientX, y: g.clientY }, w = (c == null ? void 0 : c.contains(v)) || (f == null ? void 0 : f.contains(v)), A = !ui(y, s);
|
|
2441
2418
|
w ? h() : A && (h(), l());
|
|
2442
2419
|
};
|
|
2443
2420
|
return document.addEventListener("pointermove", m), () => document.removeEventListener("pointermove", m);
|
|
2444
2421
|
}
|
|
2445
|
-
}, [c,
|
|
2446
|
-
}), [
|
|
2422
|
+
}, [c, f, s, l, h]), /* @__PURE__ */ x(yn, { ...e, ref: r });
|
|
2423
|
+
}), [ii, si] = Re(Se, { isInside: !1 }), yn = u.forwardRef(
|
|
2447
2424
|
(e, t) => {
|
|
2448
2425
|
const {
|
|
2449
2426
|
__scopeTooltip: n,
|
|
@@ -2452,26 +2429,26 @@ var ie = "TooltipContent", wn = f.forwardRef(
|
|
|
2452
2429
|
onEscapeKeyDown: r,
|
|
2453
2430
|
onPointerDownOutside: s,
|
|
2454
2431
|
...a
|
|
2455
|
-
} = e, c =
|
|
2456
|
-
return
|
|
2432
|
+
} = e, c = me(ie, n), l = Te(n), { onClose: f } = c;
|
|
2433
|
+
return u.useEffect(() => (document.addEventListener(We, f), () => document.removeEventListener(We, f)), [f]), u.useEffect(() => {
|
|
2457
2434
|
if (c.trigger) {
|
|
2458
2435
|
const d = (h) => {
|
|
2459
2436
|
const p = h.target;
|
|
2460
|
-
p != null && p.contains(c.trigger) &&
|
|
2437
|
+
p != null && p.contains(c.trigger) && f();
|
|
2461
2438
|
};
|
|
2462
2439
|
return window.addEventListener("scroll", d, { capture: !0 }), () => window.removeEventListener("scroll", d, { capture: !0 });
|
|
2463
2440
|
}
|
|
2464
|
-
}, [c.trigger,
|
|
2465
|
-
|
|
2441
|
+
}, [c.trigger, f]), /* @__PURE__ */ x(
|
|
2442
|
+
Ht,
|
|
2466
2443
|
{
|
|
2467
2444
|
asChild: !0,
|
|
2468
2445
|
disableOutsidePointerEvents: !1,
|
|
2469
2446
|
onEscapeKeyDown: r,
|
|
2470
2447
|
onPointerDownOutside: s,
|
|
2471
2448
|
onFocusOutside: (d) => d.preventDefault(),
|
|
2472
|
-
onDismiss:
|
|
2473
|
-
children: /* @__PURE__ */
|
|
2474
|
-
|
|
2449
|
+
onDismiss: f,
|
|
2450
|
+
children: /* @__PURE__ */ be(
|
|
2451
|
+
qo,
|
|
2475
2452
|
{
|
|
2476
2453
|
"data-state": c.stateAttribute,
|
|
2477
2454
|
...l,
|
|
@@ -2486,8 +2463,8 @@ var ie = "TooltipContent", wn = f.forwardRef(
|
|
|
2486
2463
|
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
2487
2464
|
},
|
|
2488
2465
|
children: [
|
|
2489
|
-
/* @__PURE__ */ x(
|
|
2490
|
-
/* @__PURE__ */ x(
|
|
2466
|
+
/* @__PURE__ */ x(Bt, { children: o }),
|
|
2467
|
+
/* @__PURE__ */ x(ii, { scope: n, isInside: !0, children: /* @__PURE__ */ x(Jo, { id: c.contentId, role: "tooltip", children: i || o }) })
|
|
2491
2468
|
]
|
|
2492
2469
|
}
|
|
2493
2470
|
)
|
|
@@ -2495,18 +2472,18 @@ var ie = "TooltipContent", wn = f.forwardRef(
|
|
|
2495
2472
|
);
|
|
2496
2473
|
}
|
|
2497
2474
|
);
|
|
2498
|
-
|
|
2499
|
-
var
|
|
2475
|
+
vn.displayName = ie;
|
|
2476
|
+
var wn = "TooltipArrow", xn = u.forwardRef(
|
|
2500
2477
|
(e, t) => {
|
|
2501
|
-
const { __scopeTooltip: n, ...o } = e, i =
|
|
2502
|
-
return
|
|
2503
|
-
|
|
2478
|
+
const { __scopeTooltip: n, ...o } = e, i = Te(n);
|
|
2479
|
+
return si(
|
|
2480
|
+
wn,
|
|
2504
2481
|
n
|
|
2505
2482
|
).isInside ? null : /* @__PURE__ */ x(zo, { ...i, ...o, ref: t });
|
|
2506
2483
|
}
|
|
2507
2484
|
);
|
|
2508
|
-
|
|
2509
|
-
function
|
|
2485
|
+
xn.displayName = wn;
|
|
2486
|
+
function ai(e, t) {
|
|
2510
2487
|
const n = Math.abs(t.top - e.y), o = Math.abs(t.bottom - e.y), i = Math.abs(t.right - e.x), r = Math.abs(t.left - e.x);
|
|
2511
2488
|
switch (Math.min(n, o, i, r)) {
|
|
2512
2489
|
case r:
|
|
@@ -2521,7 +2498,7 @@ function si(e, t) {
|
|
|
2521
2498
|
throw new Error("unreachable");
|
|
2522
2499
|
}
|
|
2523
2500
|
}
|
|
2524
|
-
function
|
|
2501
|
+
function ci(e, t, n = 5) {
|
|
2525
2502
|
const o = [];
|
|
2526
2503
|
switch (t) {
|
|
2527
2504
|
case "top":
|
|
@@ -2551,7 +2528,7 @@ function ai(e, t, n = 5) {
|
|
|
2551
2528
|
}
|
|
2552
2529
|
return o;
|
|
2553
2530
|
}
|
|
2554
|
-
function
|
|
2531
|
+
function li(e) {
|
|
2555
2532
|
const { top: t, right: n, bottom: o, left: i } = e;
|
|
2556
2533
|
return [
|
|
2557
2534
|
{ x: i, y: t },
|
|
@@ -2560,20 +2537,20 @@ function ci(e) {
|
|
|
2560
2537
|
{ x: i, y: o }
|
|
2561
2538
|
];
|
|
2562
2539
|
}
|
|
2563
|
-
function
|
|
2540
|
+
function ui(e, t) {
|
|
2564
2541
|
const { x: n, y: o } = e;
|
|
2565
2542
|
let i = !1;
|
|
2566
2543
|
for (let r = 0, s = t.length - 1; r < t.length; s = r++) {
|
|
2567
|
-
const a = t[r].x, c = t[r].y, l = t[s].x,
|
|
2568
|
-
c > o !=
|
|
2544
|
+
const a = t[r].x, c = t[r].y, l = t[s].x, f = t[s].y;
|
|
2545
|
+
c > o != f > o && n < (l - a) * (o - c) / (f - c) + a && (i = !i);
|
|
2569
2546
|
}
|
|
2570
2547
|
return i;
|
|
2571
2548
|
}
|
|
2572
|
-
function
|
|
2549
|
+
function fi(e) {
|
|
2573
2550
|
const t = e.slice();
|
|
2574
|
-
return t.sort((n, o) => n.x < o.x ? -1 : n.x > o.x ? 1 : n.y < o.y ? -1 : n.y > o.y ? 1 : 0),
|
|
2551
|
+
return t.sort((n, o) => n.x < o.x ? -1 : n.x > o.x ? 1 : n.y < o.y ? -1 : n.y > o.y ? 1 : 0), pi(t);
|
|
2575
2552
|
}
|
|
2576
|
-
function
|
|
2553
|
+
function pi(e) {
|
|
2577
2554
|
if (e.length <= 1) return e.slice();
|
|
2578
2555
|
const t = [];
|
|
2579
2556
|
for (let o = 0; o < e.length; o++) {
|
|
@@ -2598,19 +2575,19 @@ function fi(e) {
|
|
|
2598
2575
|
}
|
|
2599
2576
|
return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
|
|
2600
2577
|
}
|
|
2601
|
-
var
|
|
2602
|
-
function
|
|
2578
|
+
var di = dn, hi = hn, mi = mn, gi = gn, vi = vn, yi = xn;
|
|
2579
|
+
function wi(e) {
|
|
2603
2580
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
2604
2581
|
}
|
|
2605
|
-
var
|
|
2582
|
+
var Le = { exports: {} };
|
|
2606
2583
|
/*!
|
|
2607
2584
|
Copyright (c) 2018 Jed Watson.
|
|
2608
2585
|
Licensed under the MIT License (MIT), see
|
|
2609
2586
|
http://jedwatson.github.io/classnames
|
|
2610
2587
|
*/
|
|
2611
|
-
var
|
|
2612
|
-
function
|
|
2613
|
-
return
|
|
2588
|
+
var Rt;
|
|
2589
|
+
function xi() {
|
|
2590
|
+
return Rt || (Rt = 1, function(e) {
|
|
2614
2591
|
(function() {
|
|
2615
2592
|
var t = {}.hasOwnProperty;
|
|
2616
2593
|
function n() {
|
|
@@ -2639,30 +2616,30 @@ function wi() {
|
|
|
2639
2616
|
}
|
|
2640
2617
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
2641
2618
|
})();
|
|
2642
|
-
}(
|
|
2619
|
+
}(Le)), Le.exports;
|
|
2643
2620
|
}
|
|
2644
|
-
var
|
|
2645
|
-
const
|
|
2621
|
+
var bi = xi();
|
|
2622
|
+
const _i = /* @__PURE__ */ wi(bi), Ai = "_slideDownAndFade_fkagk_1", Pi = "_slideLeftAndFade_fkagk_1", Ci = "_slideUpAndFade_fkagk_1", Ei = "_slideRightAndFade_fkagk_1", Oi = {
|
|
2646
2623
|
"purpur-tooltip": "_purpur-tooltip_fkagk_1",
|
|
2647
2624
|
"purpur-tooltip__content": "_purpur-tooltip__content_fkagk_4",
|
|
2648
2625
|
"purpur-tooltip__content--primary": "_purpur-tooltip__content--primary_fkagk_14",
|
|
2649
2626
|
"purpur-tooltip__content--primary-negative": "_purpur-tooltip__content--primary-negative_fkagk_17",
|
|
2650
|
-
slideDownAndFade:
|
|
2651
|
-
slideLeftAndFade:
|
|
2652
|
-
slideUpAndFade:
|
|
2653
|
-
slideRightAndFade:
|
|
2627
|
+
slideDownAndFade: Ai,
|
|
2628
|
+
slideLeftAndFade: Pi,
|
|
2629
|
+
slideUpAndFade: Ci,
|
|
2630
|
+
slideRightAndFade: Ei,
|
|
2654
2631
|
"purpur-tooltip__arrow--primary": "_purpur-tooltip__arrow--primary_fkagk_32",
|
|
2655
2632
|
"purpur-tooltip__arrow--primary-negative": "_purpur-tooltip__arrow--primary-negative_fkagk_35"
|
|
2656
|
-
},
|
|
2633
|
+
}, Me = _i.bind(Oi), Ri = {
|
|
2657
2634
|
TOP: "top",
|
|
2658
2635
|
BOTTOM: "bottom",
|
|
2659
2636
|
LEFT: "left",
|
|
2660
2637
|
RIGHT: "right"
|
|
2661
|
-
},
|
|
2638
|
+
}, Ti = {
|
|
2662
2639
|
START: "start",
|
|
2663
2640
|
CENTER: "center",
|
|
2664
2641
|
END: "end"
|
|
2665
|
-
}, ne = "purpur-tooltip",
|
|
2642
|
+
}, ne = "purpur-tooltip", Si = Tt(
|
|
2666
2643
|
({
|
|
2667
2644
|
["data-testid"]: e,
|
|
2668
2645
|
buttonSize: t = "md",
|
|
@@ -2670,69 +2647,70 @@ const bi = /* @__PURE__ */ yi(xi), _i = "_slideDownAndFade_fkagk_1", Ai = "_slid
|
|
|
2670
2647
|
className: o,
|
|
2671
2648
|
contentClassName: i,
|
|
2672
2649
|
negative: r = !1,
|
|
2673
|
-
position: s =
|
|
2674
|
-
align: a =
|
|
2650
|
+
position: s = Ri.TOP,
|
|
2651
|
+
align: a = Ti.CENTER,
|
|
2675
2652
|
triggerAriaLabel: c,
|
|
2676
2653
|
triggerElement: l,
|
|
2677
|
-
...
|
|
2654
|
+
...f
|
|
2678
2655
|
}, d) => {
|
|
2679
|
-
const [h, p] =
|
|
2656
|
+
const [h, p] = Ln(!1), m = Me(
|
|
2680
2657
|
o,
|
|
2681
2658
|
ne,
|
|
2682
2659
|
`${ne}--primary${r ? "-negative" : ""}`
|
|
2683
|
-
|
|
2684
|
-
|
|
2660
|
+
), g = /* @__PURE__ */ x(
|
|
2661
|
+
Nt,
|
|
2685
2662
|
{
|
|
2686
2663
|
ref: d,
|
|
2687
2664
|
"aria-label": c,
|
|
2665
|
+
"aria-expanded": h,
|
|
2688
2666
|
variant: Kn.TERTIARY_PURPLE,
|
|
2689
2667
|
negative: r,
|
|
2690
2668
|
iconOnly: !0,
|
|
2691
2669
|
"data-testid": `${e}-trigger-button`,
|
|
2692
2670
|
size: t,
|
|
2693
|
-
children: /* @__PURE__ */ x(
|
|
2671
|
+
children: /* @__PURE__ */ x(Lt, { size: "md" })
|
|
2694
2672
|
}
|
|
2695
2673
|
);
|
|
2696
|
-
return /* @__PURE__ */ x("div", { "data-testid": e, className: m, children: /* @__PURE__ */ x(
|
|
2674
|
+
return /* @__PURE__ */ x("div", { "data-testid": e, className: m, children: /* @__PURE__ */ x(di, { delayDuration: parseInt(gr), children: /* @__PURE__ */ be(hi, { open: h, onOpenChange: p, ...f, children: [
|
|
2697
2675
|
/* @__PURE__ */ x(
|
|
2698
|
-
|
|
2676
|
+
mi,
|
|
2699
2677
|
{
|
|
2700
2678
|
asChild: !0,
|
|
2701
2679
|
onClick: (v) => {
|
|
2702
2680
|
v.preventDefault(), p(!0);
|
|
2703
2681
|
},
|
|
2704
|
-
children:
|
|
2682
|
+
children: Mn.count(l) === 0 ? g : l
|
|
2705
2683
|
}
|
|
2706
2684
|
),
|
|
2707
|
-
/* @__PURE__ */ x(
|
|
2708
|
-
|
|
2685
|
+
/* @__PURE__ */ x(gi, { children: /* @__PURE__ */ be(
|
|
2686
|
+
vi,
|
|
2709
2687
|
{
|
|
2710
2688
|
side: s,
|
|
2711
2689
|
align: a,
|
|
2712
|
-
className:
|
|
2690
|
+
className: Me(
|
|
2713
2691
|
i,
|
|
2714
2692
|
`${ne}__content`,
|
|
2715
2693
|
`${ne}__content--primary${r ? "-negative" : ""}`
|
|
2716
|
-
|
|
2694
|
+
),
|
|
2717
2695
|
sideOffset: -5,
|
|
2718
2696
|
"data-testid": `${e}-content`,
|
|
2719
2697
|
children: [
|
|
2720
2698
|
typeof n == "string" ? /* @__PURE__ */ x(
|
|
2721
|
-
|
|
2699
|
+
$t,
|
|
2722
2700
|
{
|
|
2723
|
-
variant:
|
|
2701
|
+
variant: Mt.PARAGRAPH100,
|
|
2724
2702
|
negative: !r,
|
|
2725
2703
|
"data-testid": `${e}-paragraph`,
|
|
2726
2704
|
children: n
|
|
2727
2705
|
}
|
|
2728
2706
|
) : n,
|
|
2729
2707
|
/* @__PURE__ */ x(
|
|
2730
|
-
|
|
2708
|
+
yi,
|
|
2731
2709
|
{
|
|
2732
|
-
className:
|
|
2710
|
+
className: Me(
|
|
2733
2711
|
`${ne}__arrow`,
|
|
2734
2712
|
`${ne}__arrow--primary${r ? "-negative" : ""}`
|
|
2735
|
-
|
|
2713
|
+
)
|
|
2736
2714
|
}
|
|
2737
2715
|
)
|
|
2738
2716
|
]
|
|
@@ -2741,10 +2719,10 @@ const bi = /* @__PURE__ */ yi(xi), _i = "_slideDownAndFade_fkagk_1", Ai = "_slid
|
|
|
2741
2719
|
] }) }) });
|
|
2742
2720
|
}
|
|
2743
2721
|
);
|
|
2744
|
-
|
|
2722
|
+
Si.displayName = "Tooltip";
|
|
2745
2723
|
export {
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2724
|
+
Ti as TOOLTIP_ALIGN,
|
|
2725
|
+
Ri as TOOLTIP_POSITION,
|
|
2726
|
+
Si as Tooltip
|
|
2749
2727
|
};
|
|
2750
2728
|
//# sourceMappingURL=tooltip.es.js.map
|