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