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