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