@pdf-viewer/react 1.11.0-beta.0 → 1.11.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RotateTool.module-03987eba.js +6 -0
- package/dist/ToolbarLayout.module-9d258526.js +3394 -0
- package/dist/assets/ToolbarLayout.css +1 -1
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +2 -2
- package/dist/components/layout/LayoutContainer.js +2 -2
- package/dist/components/layout/RPDefaultLayout.js +2 -3
- package/dist/components/layout/RPLayout.js +2 -2
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +2 -2
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +2 -2
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MenuItem.js +1 -1
- package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +3 -3
- package/dist/components/layout/toolbar/OtherTool.js +2 -2
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +2 -2
- package/dist/components/layout/toolbar/RPMenuItem.js +23 -0
- package/dist/components/layout/toolbar/RPMoreOptions.js +147 -0
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/RotateTool.js +20 -21
- package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
- package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +3 -3
- package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/ToolbarCustom.js +2 -2
- package/dist/components/layout/toolbar/ToolbarDefault.js +6 -3
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +1 -1
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +28 -0
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/tools/InputPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/NextPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +17 -0
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +25 -0
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +1 -1
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +6 -3
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +16 -0
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +20 -0
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +69 -0
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +20 -0
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +78 -0
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +20 -0
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +26 -0
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +43 -0
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +30 -0
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +32 -0
- package/dist/components/page/AnnotationLayer.js +2 -2
- package/dist/components/page/CanvasLayer.js +2 -2
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +2 -2
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +2 -2
- package/dist/components/page/TextLayer.js +2 -2
- package/dist/components/ui/Checkbox.js +13 -14
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/RPTooltip.js +329 -687
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/RenderQueueProvider.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/floating-ui.react-dom-88a86594.js +1447 -0
- package/dist/index-48ca3f30.js +307 -0
- package/dist/index-4ba3ab9a.js +1877 -0
- package/dist/main.js +29 -23
- package/dist/types/components/layout/toolbar/RPMenuItem.d.ts +11 -0
- package/dist/types/components/layout/toolbar/RPMoreOptions.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/DocumentPropertiesTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/RotateClockwiseTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/RotateCounterclockwiseTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/DocumentProperties.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/FileDownloadTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/FileUploadTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/FullScreenTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/MostPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/PrintTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/RotateTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/ScrollModeTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/SelectionModeTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/ViewModeTool.d.ts +3 -0
- package/dist/types/contexts/SelectionModeContext.d.ts +2 -2
- package/dist/types/main.d.ts +4 -1
- package/dist/types/utils/calculatePage.d.ts +7 -0
- package/dist/types/utils/elementPagePosition.d.ts +17 -0
- package/dist/types/utils/getWordPositionInPage.d.ts +2 -2
- package/dist/types/utils/hooks/useVirtualReactWindow.d.ts +8 -0
- package/dist/types/utils/types.d.ts +85 -7
- package/dist/utils/calculatePage.js +12 -5
- package/dist/utils/elementPagePosition.js +11 -0
- package/dist/utils/getScrollDistance.js +2 -2
- package/dist/utils/getZoomLevel.js +7 -7
- package/dist/utils/hooks/useFileDownload.js +2 -2
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +2 -2
- package/dist/utils/hooks/usePresentPage.js +2 -2
- package/dist/utils/hooks/usePrint.js +2 -2
- package/dist/utils/hooks/useScrollToPage.js +4 -3
- package/dist/utils/hooks/useSearch.js +2 -2
- package/dist/utils/hooks/useThumbnail.js +2 -2
- package/dist/utils/hooks/useVirtualReactWindow.js +4 -3
- package/package.json +1 -1
- package/dist/ToolbarLayout.module-310f3470.js +0 -3368
- package/dist/floating-ui.react-dom-bbd2b1a7.js +0 -1330
- package/dist/index-54351a14.js +0 -1995
- package/dist/index-94df4e25.js +0 -139
- package/dist/index-e620205e.js +0 -172
|
@@ -1,354 +1,143 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
return
|
|
9
|
-
|
|
10
|
-
return t == null ? void 0 : t(r);
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
function de(e, t) {
|
|
14
|
-
if (typeof e == "function")
|
|
15
|
-
return e(t);
|
|
16
|
-
e != null && (e.current = t);
|
|
17
|
-
}
|
|
18
|
-
function ge(...e) {
|
|
19
|
-
return (t) => {
|
|
20
|
-
let n = !1;
|
|
21
|
-
const o = e.map((r) => {
|
|
22
|
-
const i = de(r, t);
|
|
23
|
-
return !n && typeof i == "function" && (n = !0), i;
|
|
24
|
-
});
|
|
25
|
-
if (n)
|
|
26
|
-
return () => {
|
|
27
|
-
for (let r = 0; r < o.length; r++) {
|
|
28
|
-
const i = o[r];
|
|
29
|
-
typeof i == "function" ? i() : de(e[r], null);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
function O(...e) {
|
|
35
|
-
return s.useCallback(ge(...e), e);
|
|
36
|
-
}
|
|
37
|
-
var we = s.forwardRef((e, t) => {
|
|
38
|
-
const { children: n, ...o } = e, r = s.Children.toArray(n), i = r.find(Ct);
|
|
39
|
-
if (i) {
|
|
40
|
-
const a = i.props.children, d = r.map((l) => l === i ? s.Children.count(a) > 1 ? s.Children.only(null) : s.isValidElement(a) ? a.props.children : null : l);
|
|
41
|
-
return /* @__PURE__ */ f(G, { ...o, ref: t, children: s.isValidElement(a) ? s.cloneElement(a, void 0, d) : null });
|
|
42
|
-
}
|
|
43
|
-
return /* @__PURE__ */ f(G, { ...o, ref: t, children: n });
|
|
44
|
-
});
|
|
45
|
-
we.displayName = "Slot";
|
|
46
|
-
var G = s.forwardRef((e, t) => {
|
|
47
|
-
const { children: n, ...o } = e;
|
|
48
|
-
if (s.isValidElement(n)) {
|
|
49
|
-
const r = Et(n), i = Pt(o, n.props);
|
|
50
|
-
return n.type !== s.Fragment && (i.ref = t ? ge(t, r) : r), s.cloneElement(n, i);
|
|
51
|
-
}
|
|
52
|
-
return s.Children.count(n) > 1 ? s.Children.only(null) : null;
|
|
53
|
-
});
|
|
54
|
-
G.displayName = "SlotClone";
|
|
55
|
-
var Ce = ({ children: e }) => /* @__PURE__ */ f(ve, { children: e });
|
|
56
|
-
function Ct(e) {
|
|
57
|
-
return s.isValidElement(e) && e.type === Ce;
|
|
58
|
-
}
|
|
59
|
-
function Pt(e, t) {
|
|
60
|
-
const n = { ...t };
|
|
61
|
-
for (const o in t) {
|
|
62
|
-
const r = e[o], i = t[o];
|
|
63
|
-
/^on[A-Z]/.test(o) ? r && i ? n[o] = (...d) => {
|
|
64
|
-
i(...d), r(...d);
|
|
65
|
-
} : r && (n[o] = r) : o === "style" ? n[o] = { ...r, ...i } : o === "className" && (n[o] = [r, i].filter(Boolean).join(" "));
|
|
66
|
-
}
|
|
67
|
-
return { ...e, ...n };
|
|
68
|
-
}
|
|
69
|
-
function Et(e) {
|
|
70
|
-
var o, r;
|
|
71
|
-
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
72
|
-
return n ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
73
|
-
}
|
|
74
|
-
var bt = [
|
|
75
|
-
"a",
|
|
76
|
-
"button",
|
|
77
|
-
"div",
|
|
78
|
-
"form",
|
|
79
|
-
"h2",
|
|
80
|
-
"h3",
|
|
81
|
-
"img",
|
|
82
|
-
"input",
|
|
83
|
-
"label",
|
|
84
|
-
"li",
|
|
85
|
-
"nav",
|
|
86
|
-
"ol",
|
|
87
|
-
"p",
|
|
88
|
-
"span",
|
|
89
|
-
"svg",
|
|
90
|
-
"ul"
|
|
91
|
-
], S = bt.reduce((e, t) => {
|
|
92
|
-
const n = s.forwardRef((o, r) => {
|
|
93
|
-
const { asChild: i, ...a } = o, d = i ? we : t;
|
|
94
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(d, { ...a, ref: r });
|
|
95
|
-
});
|
|
96
|
-
return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
|
|
97
|
-
}, {});
|
|
98
|
-
function xt(e, t) {
|
|
99
|
-
e && at.flushSync(() => e.dispatchEvent(t));
|
|
100
|
-
}
|
|
101
|
-
var Tt = "DismissableLayer", X = "dismissableLayer.update", At = "dismissableLayer.pointerDownOutside", Rt = "dismissableLayer.focusOutside", fe, Pe = s.createContext({
|
|
102
|
-
layers: /* @__PURE__ */ new Set(),
|
|
103
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
104
|
-
branches: /* @__PURE__ */ new Set()
|
|
105
|
-
}), Ee = s.forwardRef(
|
|
106
|
-
(e, t) => {
|
|
107
|
-
const {
|
|
108
|
-
disableOutsidePointerEvents: n = !1,
|
|
109
|
-
onEscapeKeyDown: o,
|
|
110
|
-
onPointerDownOutside: r,
|
|
111
|
-
onFocusOutside: i,
|
|
112
|
-
onInteractOutside: a,
|
|
113
|
-
onDismiss: d,
|
|
114
|
-
...l
|
|
115
|
-
} = e, c = s.useContext(Pe), [u, h] = s.useState(null), m = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, p] = s.useState({}), v = O(t, (g) => h(g)), y = Array.from(c.layers), [w] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), P = y.indexOf(w), C = u ? y.indexOf(u) : -1, x = c.layersWithOutsidePointerEventsDisabled.size > 0, E = C >= P, T = Dt((g) => {
|
|
116
|
-
const R = g.target, M = [...c.branches].some((_) => _.contains(R));
|
|
117
|
-
!E || M || (r == null || r(g), a == null || a(g), g.defaultPrevented || d == null || d());
|
|
118
|
-
}, m), b = St((g) => {
|
|
119
|
-
const R = g.target;
|
|
120
|
-
[...c.branches].some((_) => _.contains(R)) || (i == null || i(g), a == null || a(g), g.defaultPrevented || d == null || d());
|
|
121
|
-
}, m);
|
|
122
|
-
return lt((g) => {
|
|
123
|
-
C === c.layers.size - 1 && (o == null || o(g), !g.defaultPrevented && d && (g.preventDefault(), d()));
|
|
124
|
-
}, m), s.useEffect(() => {
|
|
125
|
-
if (u)
|
|
126
|
-
return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (fe = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(u)), c.layers.add(u), pe(), () => {
|
|
127
|
-
n && c.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = fe);
|
|
128
|
-
};
|
|
129
|
-
}, [u, m, n, c]), s.useEffect(() => () => {
|
|
130
|
-
u && (c.layers.delete(u), c.layersWithOutsidePointerEventsDisabled.delete(u), pe());
|
|
131
|
-
}, [u, c]), s.useEffect(() => {
|
|
132
|
-
const g = () => p({});
|
|
133
|
-
return document.addEventListener(X, g), () => document.removeEventListener(X, g);
|
|
134
|
-
}, []), /* @__PURE__ */ f(
|
|
135
|
-
S.div,
|
|
136
|
-
{
|
|
137
|
-
...l,
|
|
138
|
-
ref: v,
|
|
139
|
-
style: {
|
|
140
|
-
pointerEvents: x ? E ? "auto" : "none" : void 0,
|
|
141
|
-
...e.style
|
|
142
|
-
},
|
|
143
|
-
onFocusCapture: A(e.onFocusCapture, b.onFocusCapture),
|
|
144
|
-
onBlurCapture: A(e.onBlurCapture, b.onBlurCapture),
|
|
145
|
-
onPointerDownCapture: A(
|
|
146
|
-
e.onPointerDownCapture,
|
|
147
|
-
T.onPointerDownCapture
|
|
148
|
-
)
|
|
149
|
-
}
|
|
150
|
-
);
|
|
151
|
-
}
|
|
152
|
-
);
|
|
153
|
-
Ee.displayName = Tt;
|
|
154
|
-
var Ot = "DismissableLayerBranch", Nt = s.forwardRef((e, t) => {
|
|
155
|
-
const n = s.useContext(Pe), o = s.useRef(null), r = O(t, o);
|
|
156
|
-
return s.useEffect(() => {
|
|
157
|
-
const i = o.current;
|
|
158
|
-
if (i)
|
|
159
|
-
return n.branches.add(i), () => {
|
|
160
|
-
n.branches.delete(i);
|
|
161
|
-
};
|
|
162
|
-
}, [n.branches]), /* @__PURE__ */ f(S.div, { ...e, ref: r });
|
|
163
|
-
});
|
|
164
|
-
Nt.displayName = Ot;
|
|
165
|
-
function Dt(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
166
|
-
const n = K(e), o = s.useRef(!1), r = s.useRef(() => {
|
|
167
|
-
});
|
|
168
|
-
return s.useEffect(() => {
|
|
169
|
-
const i = (d) => {
|
|
170
|
-
if (d.target && !o.current) {
|
|
171
|
-
let l = function() {
|
|
172
|
-
be(
|
|
173
|
-
At,
|
|
174
|
-
n,
|
|
175
|
-
c,
|
|
176
|
-
{ discrete: !0 }
|
|
177
|
-
);
|
|
178
|
-
};
|
|
179
|
-
const c = { originalEvent: d };
|
|
180
|
-
d.pointerType === "touch" ? (t.removeEventListener("click", r.current), r.current = l, t.addEventListener("click", r.current, { once: !0 })) : l();
|
|
181
|
-
} else
|
|
182
|
-
t.removeEventListener("click", r.current);
|
|
183
|
-
o.current = !1;
|
|
184
|
-
}, a = window.setTimeout(() => {
|
|
185
|
-
t.addEventListener("pointerdown", i);
|
|
186
|
-
}, 0);
|
|
187
|
-
return () => {
|
|
188
|
-
window.clearTimeout(a), t.removeEventListener("pointerdown", i), t.removeEventListener("click", r.current);
|
|
189
|
-
};
|
|
190
|
-
}, [t, n]), {
|
|
191
|
-
// ensures we check React component tree (not just DOM tree)
|
|
192
|
-
onPointerDownCapture: () => o.current = !0
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
function St(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
196
|
-
const n = K(e), o = s.useRef(!1);
|
|
197
|
-
return s.useEffect(() => {
|
|
198
|
-
const r = (i) => {
|
|
199
|
-
i.target && !o.current && be(Rt, n, { originalEvent: i }, {
|
|
200
|
-
discrete: !1
|
|
201
|
-
});
|
|
202
|
-
};
|
|
203
|
-
return t.addEventListener("focusin", r), () => t.removeEventListener("focusin", r);
|
|
204
|
-
}, [t, n]), {
|
|
205
|
-
onFocusCapture: () => o.current = !0,
|
|
206
|
-
onBlurCapture: () => o.current = !1
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
function pe() {
|
|
210
|
-
const e = new CustomEvent(X);
|
|
211
|
-
document.dispatchEvent(e);
|
|
212
|
-
}
|
|
213
|
-
function be(e, t, n, { discrete: o }) {
|
|
214
|
-
const r = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
215
|
-
t && r.addEventListener(e, t, { once: !0 }), o ? xt(r, i) : r.dispatchEvent(i);
|
|
216
|
-
}
|
|
217
|
-
var _t = "Arrow", xe = s.forwardRef((e, t) => {
|
|
218
|
-
const { children: n, width: o = 10, height: r = 5, ...i } = e;
|
|
219
|
-
return /* @__PURE__ */ f(
|
|
220
|
-
S.svg,
|
|
1
|
+
import { jsx as d, jsxs as j } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { P as O, c as ae, u as k, e as We, f as Ye, g as oe, a as Be, b as E, d as Ge, S as Xe } from "../../index-48ca3f30.js";
|
|
4
|
+
import { u as Ve, a as Ue, o as qe, s as ze, f as Ze, b as Ke, c as Je, h as Qe, l as et, d as tt, D as rt } from "../../floating-ui.react-dom-88a86594.js";
|
|
5
|
+
import { withRef as ot } from "../../utils/withRef.js";
|
|
6
|
+
import '../../assets/RPTooltip.css';var nt = "Arrow", se = a.forwardRef((e, r) => {
|
|
7
|
+
const { children: t, width: o = 10, height: n = 5, ...s } = e;
|
|
8
|
+
return /* @__PURE__ */ d(
|
|
9
|
+
O.svg,
|
|
221
10
|
{
|
|
222
|
-
...
|
|
223
|
-
ref:
|
|
11
|
+
...s,
|
|
12
|
+
ref: r,
|
|
224
13
|
width: o,
|
|
225
|
-
height:
|
|
14
|
+
height: n,
|
|
226
15
|
viewBox: "0 0 30 10",
|
|
227
16
|
preserveAspectRatio: "none",
|
|
228
|
-
children: e.asChild ?
|
|
17
|
+
children: e.asChild ? t : /* @__PURE__ */ d("polygon", { points: "0,0 30,0 15,10" })
|
|
229
18
|
}
|
|
230
19
|
);
|
|
231
20
|
});
|
|
232
|
-
|
|
233
|
-
var
|
|
234
|
-
const { __scopePopper:
|
|
235
|
-
return /* @__PURE__ */
|
|
21
|
+
se.displayName = nt;
|
|
22
|
+
var at = se, B = "Popper", [ie, le] = ae(B), [st, ce] = ie(B), de = (e) => {
|
|
23
|
+
const { __scopePopper: r, children: t } = e, [o, n] = a.useState(null);
|
|
24
|
+
return /* @__PURE__ */ d(st, { scope: r, anchor: o, onAnchorChange: n, children: t });
|
|
236
25
|
};
|
|
237
|
-
|
|
238
|
-
var
|
|
239
|
-
(e,
|
|
240
|
-
const { __scopePopper:
|
|
241
|
-
return
|
|
242
|
-
|
|
243
|
-
}), o ? null : /* @__PURE__ */
|
|
26
|
+
de.displayName = B;
|
|
27
|
+
var pe = "PopperAnchor", ue = a.forwardRef(
|
|
28
|
+
(e, r) => {
|
|
29
|
+
const { __scopePopper: t, virtualRef: o, ...n } = e, s = ce(pe, t), i = a.useRef(null), h = k(r, i);
|
|
30
|
+
return a.useEffect(() => {
|
|
31
|
+
s.onAnchorChange((o == null ? void 0 : o.current) || i.current);
|
|
32
|
+
}), o ? null : /* @__PURE__ */ d(O.div, { ...n, ref: h });
|
|
244
33
|
}
|
|
245
34
|
);
|
|
246
|
-
|
|
247
|
-
var
|
|
248
|
-
(e,
|
|
249
|
-
var
|
|
35
|
+
ue.displayName = pe;
|
|
36
|
+
var G = "PopperContent", [it, lt] = ie(G), fe = a.forwardRef(
|
|
37
|
+
(e, r) => {
|
|
38
|
+
var Z, K, J, Q, ee, te;
|
|
250
39
|
const {
|
|
251
|
-
__scopePopper:
|
|
40
|
+
__scopePopper: t,
|
|
252
41
|
side: o = "bottom",
|
|
253
|
-
sideOffset:
|
|
254
|
-
align:
|
|
255
|
-
alignOffset:
|
|
256
|
-
arrowPadding:
|
|
42
|
+
sideOffset: n = 0,
|
|
43
|
+
align: s = "center",
|
|
44
|
+
alignOffset: i = 0,
|
|
45
|
+
arrowPadding: h = 0,
|
|
257
46
|
avoidCollisions: l = !0,
|
|
258
|
-
collisionBoundary:
|
|
259
|
-
collisionPadding:
|
|
260
|
-
sticky:
|
|
261
|
-
hideWhenDetached:
|
|
262
|
-
updatePositionStrategy:
|
|
47
|
+
collisionBoundary: p = [],
|
|
48
|
+
collisionPadding: c = 0,
|
|
49
|
+
sticky: f = "partial",
|
|
50
|
+
hideWhenDetached: y = !1,
|
|
51
|
+
updatePositionStrategy: u = "optimized",
|
|
263
52
|
onPlaced: v,
|
|
264
|
-
...
|
|
265
|
-
} = e,
|
|
266
|
-
padding:
|
|
267
|
-
boundary:
|
|
53
|
+
...g
|
|
54
|
+
} = e, m = ce(G, t), [w, x] = a.useState(null), T = k(r, (_) => x(_)), [C, b] = a.useState(null), P = We(C), N = (P == null ? void 0 : P.width) ?? 0, V = (P == null ? void 0 : P.height) ?? 0, Ee = o + (s !== "center" ? "-" + s : ""), Re = typeof c == "number" ? c : { top: 0, right: 0, bottom: 0, left: 0, ...c }, U = Array.isArray(p) ? p : [p], _e = U.length > 0, S = {
|
|
55
|
+
padding: Re,
|
|
56
|
+
boundary: U.filter(dt),
|
|
268
57
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
269
|
-
altBoundary:
|
|
270
|
-
}, { refs:
|
|
58
|
+
altBoundary: _e
|
|
59
|
+
}, { refs: Oe, floatingStyles: q, placement: Ne, isPositioned: D, middlewareData: A } = Ve({
|
|
271
60
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
272
61
|
strategy: "fixed",
|
|
273
|
-
placement:
|
|
274
|
-
whileElementsMounted: (...
|
|
275
|
-
animationFrame:
|
|
62
|
+
placement: Ee,
|
|
63
|
+
whileElementsMounted: (..._) => Ue(..._, {
|
|
64
|
+
animationFrame: u === "always"
|
|
276
65
|
}),
|
|
277
66
|
elements: {
|
|
278
|
-
reference:
|
|
67
|
+
reference: m.anchor
|
|
279
68
|
},
|
|
280
69
|
middleware: [
|
|
281
|
-
|
|
282
|
-
l &&
|
|
70
|
+
qe({ mainAxis: n + V, alignmentAxis: i }),
|
|
71
|
+
l && ze({
|
|
283
72
|
mainAxis: !0,
|
|
284
73
|
crossAxis: !1,
|
|
285
|
-
limiter:
|
|
286
|
-
...
|
|
74
|
+
limiter: f === "partial" ? et() : void 0,
|
|
75
|
+
...S
|
|
287
76
|
}),
|
|
288
|
-
l &&
|
|
289
|
-
|
|
290
|
-
...
|
|
291
|
-
apply: ({ elements:
|
|
292
|
-
const { width:
|
|
293
|
-
|
|
77
|
+
l && Ze({ ...S }),
|
|
78
|
+
Ke({
|
|
79
|
+
...S,
|
|
80
|
+
apply: ({ elements: _, rects: re, availableWidth: Me, availableHeight: $e }) => {
|
|
81
|
+
const { width: Fe, height: je } = re.reference, I = _.floating.style;
|
|
82
|
+
I.setProperty("--radix-popper-available-width", `${Me}px`), I.setProperty("--radix-popper-available-height", `${$e}px`), I.setProperty("--radix-popper-anchor-width", `${Fe}px`), I.setProperty("--radix-popper-anchor-height", `${je}px`);
|
|
294
83
|
}
|
|
295
84
|
}),
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
85
|
+
C && Je({ element: C, padding: h }),
|
|
86
|
+
pt({ arrowWidth: N, arrowHeight: V }),
|
|
87
|
+
y && Qe({ strategy: "referenceHidden", ...S })
|
|
299
88
|
]
|
|
300
|
-
}), [
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
}, [
|
|
304
|
-
const
|
|
305
|
-
return
|
|
306
|
-
|
|
307
|
-
}, [
|
|
89
|
+
}), [z, Se] = ge(Ne), H = Ye(v);
|
|
90
|
+
oe(() => {
|
|
91
|
+
D && (H == null || H());
|
|
92
|
+
}, [D, H]);
|
|
93
|
+
const De = (Z = A.arrow) == null ? void 0 : Z.x, He = (K = A.arrow) == null ? void 0 : K.y, Ie = ((J = A.arrow) == null ? void 0 : J.centerOffset) !== 0, [ke, Le] = a.useState();
|
|
94
|
+
return oe(() => {
|
|
95
|
+
w && Le(window.getComputedStyle(w).zIndex);
|
|
96
|
+
}, [w]), /* @__PURE__ */ d(
|
|
308
97
|
"div",
|
|
309
98
|
{
|
|
310
|
-
ref:
|
|
99
|
+
ref: Oe.setFloating,
|
|
311
100
|
"data-radix-popper-content-wrapper": "",
|
|
312
101
|
style: {
|
|
313
|
-
...
|
|
314
|
-
transform:
|
|
102
|
+
...q,
|
|
103
|
+
transform: D ? q.transform : "translate(0, -200%)",
|
|
315
104
|
// keep off the page when measuring
|
|
316
105
|
minWidth: "max-content",
|
|
317
|
-
zIndex:
|
|
106
|
+
zIndex: ke,
|
|
318
107
|
"--radix-popper-transform-origin": [
|
|
319
|
-
(
|
|
320
|
-
(
|
|
108
|
+
(Q = A.transformOrigin) == null ? void 0 : Q.x,
|
|
109
|
+
(ee = A.transformOrigin) == null ? void 0 : ee.y
|
|
321
110
|
].join(" "),
|
|
322
111
|
// hide the content if using the hide middleware and should be hidden
|
|
323
112
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
324
113
|
// as if the PopperContent isn't there at all
|
|
325
|
-
...((
|
|
114
|
+
...((te = A.hide) == null ? void 0 : te.referenceHidden) && {
|
|
326
115
|
visibility: "hidden",
|
|
327
116
|
pointerEvents: "none"
|
|
328
117
|
}
|
|
329
118
|
},
|
|
330
119
|
dir: e.dir,
|
|
331
|
-
children: /* @__PURE__ */
|
|
332
|
-
|
|
120
|
+
children: /* @__PURE__ */ d(
|
|
121
|
+
it,
|
|
333
122
|
{
|
|
334
|
-
scope:
|
|
335
|
-
placedSide:
|
|
336
|
-
onArrowChange:
|
|
337
|
-
arrowX:
|
|
338
|
-
arrowY:
|
|
339
|
-
shouldHideArrow:
|
|
340
|
-
children: /* @__PURE__ */
|
|
341
|
-
|
|
123
|
+
scope: t,
|
|
124
|
+
placedSide: z,
|
|
125
|
+
onArrowChange: b,
|
|
126
|
+
arrowX: De,
|
|
127
|
+
arrowY: He,
|
|
128
|
+
shouldHideArrow: Ie,
|
|
129
|
+
children: /* @__PURE__ */ d(
|
|
130
|
+
O.div,
|
|
342
131
|
{
|
|
343
|
-
"data-side":
|
|
344
|
-
"data-align":
|
|
345
|
-
...
|
|
346
|
-
ref:
|
|
132
|
+
"data-side": z,
|
|
133
|
+
"data-align": Se,
|
|
134
|
+
...g,
|
|
135
|
+
ref: T,
|
|
347
136
|
style: {
|
|
348
|
-
...
|
|
137
|
+
...g.style,
|
|
349
138
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
350
139
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
351
|
-
animation:
|
|
140
|
+
animation: D ? void 0 : "none"
|
|
352
141
|
}
|
|
353
142
|
}
|
|
354
143
|
)
|
|
@@ -358,48 +147,48 @@ var Q = "PopperContent", [It, Wt] = Te(Q), Se = s.forwardRef(
|
|
|
358
147
|
);
|
|
359
148
|
}
|
|
360
149
|
);
|
|
361
|
-
|
|
362
|
-
var
|
|
150
|
+
fe.displayName = G;
|
|
151
|
+
var he = "PopperArrow", ct = {
|
|
363
152
|
top: "bottom",
|
|
364
153
|
right: "left",
|
|
365
154
|
bottom: "top",
|
|
366
155
|
left: "right"
|
|
367
|
-
},
|
|
368
|
-
const { __scopePopper: o, ...
|
|
156
|
+
}, ve = a.forwardRef(function(r, t) {
|
|
157
|
+
const { __scopePopper: o, ...n } = r, s = lt(he, o), i = ct[s.placedSide];
|
|
369
158
|
return (
|
|
370
159
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
371
160
|
// doesn't report size as we'd expect on SVG elements.
|
|
372
161
|
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
373
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ d(
|
|
374
163
|
"span",
|
|
375
164
|
{
|
|
376
|
-
ref:
|
|
165
|
+
ref: s.onArrowChange,
|
|
377
166
|
style: {
|
|
378
167
|
position: "absolute",
|
|
379
|
-
left:
|
|
380
|
-
top:
|
|
381
|
-
[
|
|
168
|
+
left: s.arrowX,
|
|
169
|
+
top: s.arrowY,
|
|
170
|
+
[i]: 0,
|
|
382
171
|
transformOrigin: {
|
|
383
172
|
top: "",
|
|
384
173
|
right: "0 0",
|
|
385
174
|
bottom: "center 0",
|
|
386
175
|
left: "100% 0"
|
|
387
|
-
}[
|
|
176
|
+
}[s.placedSide],
|
|
388
177
|
transform: {
|
|
389
178
|
top: "translateY(100%)",
|
|
390
179
|
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
391
180
|
bottom: "rotate(180deg)",
|
|
392
181
|
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
393
|
-
}[
|
|
394
|
-
visibility:
|
|
182
|
+
}[s.placedSide],
|
|
183
|
+
visibility: s.shouldHideArrow ? "hidden" : void 0
|
|
395
184
|
},
|
|
396
|
-
children: /* @__PURE__ */
|
|
397
|
-
|
|
185
|
+
children: /* @__PURE__ */ d(
|
|
186
|
+
at,
|
|
398
187
|
{
|
|
399
|
-
...
|
|
400
|
-
ref:
|
|
188
|
+
...n,
|
|
189
|
+
ref: t,
|
|
401
190
|
style: {
|
|
402
|
-
...
|
|
191
|
+
...n.style,
|
|
403
192
|
// ensures the element can be measured correctly (mostly for if SVG)
|
|
404
193
|
display: "block"
|
|
405
194
|
}
|
|
@@ -409,177 +198,30 @@ var _e = "PopperArrow", kt = {
|
|
|
409
198
|
)
|
|
410
199
|
);
|
|
411
200
|
});
|
|
412
|
-
|
|
413
|
-
function
|
|
201
|
+
ve.displayName = he;
|
|
202
|
+
function dt(e) {
|
|
414
203
|
return e !== null;
|
|
415
204
|
}
|
|
416
|
-
var
|
|
205
|
+
var pt = (e) => ({
|
|
417
206
|
name: "transformOrigin",
|
|
418
207
|
options: e,
|
|
419
|
-
fn(
|
|
420
|
-
var
|
|
421
|
-
const { placement:
|
|
422
|
-
let v = "",
|
|
423
|
-
return
|
|
208
|
+
fn(r) {
|
|
209
|
+
var m, w, x;
|
|
210
|
+
const { placement: t, rects: o, middlewareData: n } = r, i = ((m = n.arrow) == null ? void 0 : m.centerOffset) !== 0, h = i ? 0 : e.arrowWidth, l = i ? 0 : e.arrowHeight, [p, c] = ge(t), f = { start: "0%", center: "50%", end: "100%" }[c], y = (((w = n.arrow) == null ? void 0 : w.x) ?? 0) + h / 2, u = (((x = n.arrow) == null ? void 0 : x.y) ?? 0) + l / 2;
|
|
211
|
+
let v = "", g = "";
|
|
212
|
+
return p === "bottom" ? (v = i ? f : `${y}px`, g = `${-l}px`) : p === "top" ? (v = i ? f : `${y}px`, g = `${o.floating.height + l}px`) : p === "right" ? (v = `${-l}px`, g = i ? f : `${u}px`) : p === "left" && (v = `${o.floating.width + l}px`, g = i ? f : `${u}px`), { data: { x: v, y: g } };
|
|
424
213
|
}
|
|
425
214
|
});
|
|
426
|
-
function
|
|
427
|
-
const [
|
|
428
|
-
return [
|
|
215
|
+
function ge(e) {
|
|
216
|
+
const [r, t = "center"] = e.split("-");
|
|
217
|
+
return [r, t];
|
|
429
218
|
}
|
|
430
|
-
var
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
}
|
|
434
|
-
var Ie = (e) => {
|
|
435
|
-
const { present: t, children: n } = e, o = Yt(t), r = typeof n == "function" ? n({ present: o.isPresent }) : s.Children.only(n), i = O(o.ref, Gt(r));
|
|
436
|
-
return typeof n == "function" || o.isPresent ? s.cloneElement(r, { ref: i }) : null;
|
|
437
|
-
};
|
|
438
|
-
Ie.displayName = "Presence";
|
|
439
|
-
function Yt(e) {
|
|
440
|
-
const [t, n] = s.useState(), o = s.useRef({}), r = s.useRef(e), i = s.useRef("none"), a = e ? "mounted" : "unmounted", [d, l] = jt(a, {
|
|
441
|
-
mounted: {
|
|
442
|
-
UNMOUNT: "unmounted",
|
|
443
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
444
|
-
},
|
|
445
|
-
unmountSuspended: {
|
|
446
|
-
MOUNT: "mounted",
|
|
447
|
-
ANIMATION_END: "unmounted"
|
|
448
|
-
},
|
|
449
|
-
unmounted: {
|
|
450
|
-
MOUNT: "mounted"
|
|
451
|
-
}
|
|
452
|
-
});
|
|
453
|
-
return s.useEffect(() => {
|
|
454
|
-
const c = F(o.current);
|
|
455
|
-
i.current = d === "mounted" ? c : "none";
|
|
456
|
-
}, [d]), H(() => {
|
|
457
|
-
const c = o.current, u = r.current;
|
|
458
|
-
if (u !== e) {
|
|
459
|
-
const m = i.current, p = F(c);
|
|
460
|
-
e ? l("MOUNT") : p === "none" || (c == null ? void 0 : c.display) === "none" ? l("UNMOUNT") : l(u && m !== p ? "ANIMATION_OUT" : "UNMOUNT"), r.current = e;
|
|
461
|
-
}
|
|
462
|
-
}, [e, l]), H(() => {
|
|
463
|
-
if (t) {
|
|
464
|
-
let c;
|
|
465
|
-
const u = t.ownerDocument.defaultView ?? window, h = (p) => {
|
|
466
|
-
const y = F(o.current).includes(p.animationName);
|
|
467
|
-
if (p.target === t && y && (l("ANIMATION_END"), !r.current)) {
|
|
468
|
-
const w = t.style.animationFillMode;
|
|
469
|
-
t.style.animationFillMode = "forwards", c = u.setTimeout(() => {
|
|
470
|
-
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = w);
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
}, m = (p) => {
|
|
474
|
-
p.target === t && (i.current = F(o.current));
|
|
475
|
-
};
|
|
476
|
-
return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", h), t.addEventListener("animationend", h), () => {
|
|
477
|
-
u.clearTimeout(c), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", h), t.removeEventListener("animationend", h);
|
|
478
|
-
};
|
|
479
|
-
} else
|
|
480
|
-
l("ANIMATION_END");
|
|
481
|
-
}, [t, l]), {
|
|
482
|
-
isPresent: ["mounted", "unmountSuspended"].includes(d),
|
|
483
|
-
ref: s.useCallback((c) => {
|
|
484
|
-
c && (o.current = getComputedStyle(c)), n(c);
|
|
485
|
-
}, [])
|
|
486
|
-
};
|
|
487
|
-
}
|
|
488
|
-
function F(e) {
|
|
489
|
-
return (e == null ? void 0 : e.animationName) || "none";
|
|
490
|
-
}
|
|
491
|
-
function Gt(e) {
|
|
492
|
-
var o, r;
|
|
493
|
-
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
494
|
-
return n ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
495
|
-
}
|
|
496
|
-
function he(e, t) {
|
|
497
|
-
if (typeof e == "function")
|
|
498
|
-
return e(t);
|
|
499
|
-
e != null && (e.current = t);
|
|
500
|
-
}
|
|
501
|
-
function Xt(...e) {
|
|
502
|
-
return (t) => {
|
|
503
|
-
let n = !1;
|
|
504
|
-
const o = e.map((r) => {
|
|
505
|
-
const i = he(r, t);
|
|
506
|
-
return !n && typeof i == "function" && (n = !0), i;
|
|
507
|
-
});
|
|
508
|
-
if (n)
|
|
509
|
-
return () => {
|
|
510
|
-
for (let r = 0; r < o.length; r++) {
|
|
511
|
-
const i = o[r];
|
|
512
|
-
typeof i == "function" ? i() : he(e[r], null);
|
|
513
|
-
}
|
|
514
|
-
};
|
|
515
|
-
};
|
|
516
|
-
}
|
|
517
|
-
var We = s.forwardRef((e, t) => {
|
|
518
|
-
const { children: n, ...o } = e, r = s.Children.toArray(n), i = r.find(Zt);
|
|
519
|
-
if (i) {
|
|
520
|
-
const a = i.props.children, d = r.map((l) => l === i ? s.Children.count(a) > 1 ? s.Children.only(null) : s.isValidElement(a) ? a.props.children : null : l);
|
|
521
|
-
return /* @__PURE__ */ f(z, { ...o, ref: t, children: s.isValidElement(a) ? s.cloneElement(a, void 0, d) : null });
|
|
522
|
-
}
|
|
523
|
-
return /* @__PURE__ */ f(z, { ...o, ref: t, children: n });
|
|
524
|
-
});
|
|
525
|
-
We.displayName = "Slot";
|
|
526
|
-
var z = s.forwardRef((e, t) => {
|
|
527
|
-
const { children: n, ...o } = e;
|
|
528
|
-
if (s.isValidElement(n)) {
|
|
529
|
-
const r = Kt(n), i = qt(o, n.props);
|
|
530
|
-
return n.type !== s.Fragment && (i.ref = t ? Xt(t, r) : r), s.cloneElement(n, i);
|
|
531
|
-
}
|
|
532
|
-
return s.Children.count(n) > 1 ? s.Children.only(null) : null;
|
|
533
|
-
});
|
|
534
|
-
z.displayName = "SlotClone";
|
|
535
|
-
var zt = ({ children: e }) => /* @__PURE__ */ f(ve, { children: e });
|
|
536
|
-
function Zt(e) {
|
|
537
|
-
return s.isValidElement(e) && e.type === zt;
|
|
538
|
-
}
|
|
539
|
-
function qt(e, t) {
|
|
540
|
-
const n = { ...t };
|
|
541
|
-
for (const o in t) {
|
|
542
|
-
const r = e[o], i = t[o];
|
|
543
|
-
/^on[A-Z]/.test(o) ? r && i ? n[o] = (...d) => {
|
|
544
|
-
i(...d), r(...d);
|
|
545
|
-
} : r && (n[o] = r) : o === "style" ? n[o] = { ...r, ...i } : o === "className" && (n[o] = [r, i].filter(Boolean).join(" "));
|
|
546
|
-
}
|
|
547
|
-
return { ...e, ...n };
|
|
548
|
-
}
|
|
549
|
-
function Kt(e) {
|
|
550
|
-
var o, r;
|
|
551
|
-
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
552
|
-
return n ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
553
|
-
}
|
|
554
|
-
var Jt = [
|
|
555
|
-
"a",
|
|
556
|
-
"button",
|
|
557
|
-
"div",
|
|
558
|
-
"form",
|
|
559
|
-
"h2",
|
|
560
|
-
"h3",
|
|
561
|
-
"img",
|
|
562
|
-
"input",
|
|
563
|
-
"label",
|
|
564
|
-
"li",
|
|
565
|
-
"nav",
|
|
566
|
-
"ol",
|
|
567
|
-
"p",
|
|
568
|
-
"span",
|
|
569
|
-
"svg",
|
|
570
|
-
"ul"
|
|
571
|
-
], Qt = Jt.reduce((e, t) => {
|
|
572
|
-
const n = s.forwardRef((o, r) => {
|
|
573
|
-
const { asChild: i, ...a } = o, d = i ? We : t;
|
|
574
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(d, { ...a, ref: r });
|
|
575
|
-
});
|
|
576
|
-
return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
|
|
577
|
-
}, {}), en = "VisuallyHidden", ke = s.forwardRef(
|
|
578
|
-
(e, t) => /* @__PURE__ */ f(
|
|
579
|
-
Qt.span,
|
|
219
|
+
var ut = de, ft = ue, ht = fe, vt = ve, gt = "VisuallyHidden", ye = a.forwardRef(
|
|
220
|
+
(e, r) => /* @__PURE__ */ d(
|
|
221
|
+
O.span,
|
|
580
222
|
{
|
|
581
223
|
...e,
|
|
582
|
-
ref:
|
|
224
|
+
ref: r,
|
|
583
225
|
style: {
|
|
584
226
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
585
227
|
position: "absolute",
|
|
@@ -597,192 +239,192 @@ var Jt = [
|
|
|
597
239
|
}
|
|
598
240
|
)
|
|
599
241
|
);
|
|
600
|
-
|
|
601
|
-
var
|
|
602
|
-
|
|
603
|
-
]),
|
|
242
|
+
ye.displayName = gt;
|
|
243
|
+
var yt = ye, [L, Ft] = ae("Tooltip", [
|
|
244
|
+
le
|
|
245
|
+
]), M = le(), me = "TooltipProvider", mt = 700, W = "tooltip.open", [wt, X] = L(me), we = (e) => {
|
|
604
246
|
const {
|
|
605
|
-
__scopeTooltip:
|
|
606
|
-
delayDuration:
|
|
247
|
+
__scopeTooltip: r,
|
|
248
|
+
delayDuration: t = mt,
|
|
607
249
|
skipDelayDuration: o = 300,
|
|
608
|
-
disableHoverableContent:
|
|
609
|
-
children:
|
|
610
|
-
} = e, [
|
|
611
|
-
return
|
|
612
|
-
const
|
|
613
|
-
return () => window.clearTimeout(
|
|
614
|
-
}, []), /* @__PURE__ */
|
|
615
|
-
|
|
250
|
+
disableHoverableContent: n = !1,
|
|
251
|
+
children: s
|
|
252
|
+
} = e, [i, h] = a.useState(!0), l = a.useRef(!1), p = a.useRef(0);
|
|
253
|
+
return a.useEffect(() => {
|
|
254
|
+
const c = p.current;
|
|
255
|
+
return () => window.clearTimeout(c);
|
|
256
|
+
}, []), /* @__PURE__ */ d(
|
|
257
|
+
wt,
|
|
616
258
|
{
|
|
617
|
-
scope:
|
|
618
|
-
isOpenDelayed:
|
|
619
|
-
delayDuration:
|
|
620
|
-
onOpen:
|
|
621
|
-
window.clearTimeout(
|
|
259
|
+
scope: r,
|
|
260
|
+
isOpenDelayed: i,
|
|
261
|
+
delayDuration: t,
|
|
262
|
+
onOpen: a.useCallback(() => {
|
|
263
|
+
window.clearTimeout(p.current), h(!1);
|
|
622
264
|
}, []),
|
|
623
|
-
onClose:
|
|
624
|
-
window.clearTimeout(
|
|
625
|
-
() =>
|
|
265
|
+
onClose: a.useCallback(() => {
|
|
266
|
+
window.clearTimeout(p.current), p.current = window.setTimeout(
|
|
267
|
+
() => h(!0),
|
|
626
268
|
o
|
|
627
269
|
);
|
|
628
270
|
}, [o]),
|
|
629
271
|
isPointerInTransitRef: l,
|
|
630
|
-
onPointerInTransitChange:
|
|
631
|
-
l.current =
|
|
272
|
+
onPointerInTransitChange: a.useCallback((c) => {
|
|
273
|
+
l.current = c;
|
|
632
274
|
}, []),
|
|
633
|
-
disableHoverableContent:
|
|
634
|
-
children:
|
|
275
|
+
disableHoverableContent: n,
|
|
276
|
+
children: s
|
|
635
277
|
}
|
|
636
278
|
);
|
|
637
279
|
};
|
|
638
|
-
|
|
639
|
-
var
|
|
280
|
+
we.displayName = me;
|
|
281
|
+
var $ = "Tooltip", [xt, F] = L($), xe = (e) => {
|
|
640
282
|
const {
|
|
641
|
-
__scopeTooltip:
|
|
642
|
-
children:
|
|
283
|
+
__scopeTooltip: r,
|
|
284
|
+
children: t,
|
|
643
285
|
open: o,
|
|
644
|
-
defaultOpen:
|
|
645
|
-
onOpenChange:
|
|
646
|
-
disableHoverableContent:
|
|
647
|
-
delayDuration:
|
|
648
|
-
} = e, l =
|
|
286
|
+
defaultOpen: n = !1,
|
|
287
|
+
onOpenChange: s,
|
|
288
|
+
disableHoverableContent: i,
|
|
289
|
+
delayDuration: h
|
|
290
|
+
} = e, l = X($, e.__scopeTooltip), p = M(r), [c, f] = a.useState(null), y = tt(), u = a.useRef(0), v = i ?? l.disableHoverableContent, g = h ?? l.delayDuration, m = a.useRef(!1), [w = !1, x] = Be({
|
|
649
291
|
prop: o,
|
|
650
|
-
defaultProp:
|
|
651
|
-
onChange: (
|
|
652
|
-
|
|
292
|
+
defaultProp: n,
|
|
293
|
+
onChange: (N) => {
|
|
294
|
+
N ? (l.onOpen(), document.dispatchEvent(new CustomEvent(W))) : l.onClose(), s == null || s(N);
|
|
653
295
|
}
|
|
654
|
-
}),
|
|
655
|
-
window.clearTimeout(
|
|
656
|
-
}, [
|
|
657
|
-
window.clearTimeout(
|
|
658
|
-
}, [
|
|
659
|
-
window.clearTimeout(
|
|
660
|
-
|
|
661
|
-
},
|
|
662
|
-
}, [
|
|
663
|
-
return
|
|
664
|
-
|
|
665
|
-
}, []), /* @__PURE__ */
|
|
666
|
-
|
|
296
|
+
}), T = a.useMemo(() => w ? m.current ? "delayed-open" : "instant-open" : "closed", [w]), C = a.useCallback(() => {
|
|
297
|
+
window.clearTimeout(u.current), u.current = 0, m.current = !1, x(!0);
|
|
298
|
+
}, [x]), b = a.useCallback(() => {
|
|
299
|
+
window.clearTimeout(u.current), u.current = 0, x(!1);
|
|
300
|
+
}, [x]), P = a.useCallback(() => {
|
|
301
|
+
window.clearTimeout(u.current), u.current = window.setTimeout(() => {
|
|
302
|
+
m.current = !0, x(!0), u.current = 0;
|
|
303
|
+
}, g);
|
|
304
|
+
}, [g, x]);
|
|
305
|
+
return a.useEffect(() => () => {
|
|
306
|
+
u.current && (window.clearTimeout(u.current), u.current = 0);
|
|
307
|
+
}, []), /* @__PURE__ */ d(ut, { ...p, children: /* @__PURE__ */ d(
|
|
308
|
+
xt,
|
|
667
309
|
{
|
|
668
|
-
scope:
|
|
669
|
-
contentId:
|
|
670
|
-
open:
|
|
671
|
-
stateAttribute:
|
|
672
|
-
trigger:
|
|
673
|
-
onTriggerChange:
|
|
674
|
-
onTriggerEnter:
|
|
675
|
-
l.isOpenDelayed ?
|
|
676
|
-
}, [l.isOpenDelayed,
|
|
677
|
-
onTriggerLeave:
|
|
678
|
-
v ?
|
|
679
|
-
}, [
|
|
680
|
-
onOpen:
|
|
681
|
-
onClose:
|
|
310
|
+
scope: r,
|
|
311
|
+
contentId: y,
|
|
312
|
+
open: w,
|
|
313
|
+
stateAttribute: T,
|
|
314
|
+
trigger: c,
|
|
315
|
+
onTriggerChange: f,
|
|
316
|
+
onTriggerEnter: a.useCallback(() => {
|
|
317
|
+
l.isOpenDelayed ? P() : C();
|
|
318
|
+
}, [l.isOpenDelayed, P, C]),
|
|
319
|
+
onTriggerLeave: a.useCallback(() => {
|
|
320
|
+
v ? b() : (window.clearTimeout(u.current), u.current = 0);
|
|
321
|
+
}, [b, v]),
|
|
322
|
+
onOpen: C,
|
|
323
|
+
onClose: b,
|
|
682
324
|
disableHoverableContent: v,
|
|
683
|
-
children:
|
|
325
|
+
children: t
|
|
684
326
|
}
|
|
685
327
|
) });
|
|
686
328
|
};
|
|
687
|
-
|
|
688
|
-
var
|
|
689
|
-
(e,
|
|
690
|
-
const { __scopeTooltip:
|
|
691
|
-
return
|
|
692
|
-
|
|
329
|
+
xe.displayName = $;
|
|
330
|
+
var Y = "TooltipTrigger", Ce = a.forwardRef(
|
|
331
|
+
(e, r) => {
|
|
332
|
+
const { __scopeTooltip: t, ...o } = e, n = F(Y, t), s = X(Y, t), i = M(t), h = a.useRef(null), l = k(r, h, n.onTriggerChange), p = a.useRef(!1), c = a.useRef(!1), f = a.useCallback(() => p.current = !1, []);
|
|
333
|
+
return a.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ d(ft, { asChild: !0, ...i, children: /* @__PURE__ */ d(
|
|
334
|
+
O.button,
|
|
693
335
|
{
|
|
694
|
-
"aria-describedby":
|
|
695
|
-
"data-state":
|
|
336
|
+
"aria-describedby": n.open ? n.contentId : void 0,
|
|
337
|
+
"data-state": n.stateAttribute,
|
|
696
338
|
...o,
|
|
697
339
|
ref: l,
|
|
698
|
-
onPointerMove:
|
|
699
|
-
|
|
340
|
+
onPointerMove: E(e.onPointerMove, (y) => {
|
|
341
|
+
y.pointerType !== "touch" && !c.current && !s.isPointerInTransitRef.current && (n.onTriggerEnter(), c.current = !0);
|
|
700
342
|
}),
|
|
701
|
-
onPointerLeave:
|
|
702
|
-
|
|
343
|
+
onPointerLeave: E(e.onPointerLeave, () => {
|
|
344
|
+
n.onTriggerLeave(), c.current = !1;
|
|
703
345
|
}),
|
|
704
|
-
onPointerDown:
|
|
705
|
-
|
|
346
|
+
onPointerDown: E(e.onPointerDown, () => {
|
|
347
|
+
p.current = !0, document.addEventListener("pointerup", f, { once: !0 });
|
|
706
348
|
}),
|
|
707
|
-
onFocus:
|
|
708
|
-
|
|
349
|
+
onFocus: E(e.onFocus, () => {
|
|
350
|
+
p.current || n.onOpen();
|
|
709
351
|
}),
|
|
710
|
-
onBlur:
|
|
711
|
-
onClick:
|
|
352
|
+
onBlur: E(e.onBlur, n.onClose),
|
|
353
|
+
onClick: E(e.onClick, n.onClose)
|
|
712
354
|
}
|
|
713
355
|
) });
|
|
714
356
|
}
|
|
715
357
|
);
|
|
716
|
-
|
|
717
|
-
var
|
|
358
|
+
Ce.displayName = Y;
|
|
359
|
+
var Ct = "TooltipPortal", [jt, Pt] = L(Ct, {
|
|
718
360
|
forceMount: void 0
|
|
719
|
-
}),
|
|
720
|
-
(e,
|
|
721
|
-
const
|
|
722
|
-
return /* @__PURE__ */
|
|
361
|
+
}), R = "TooltipContent", Pe = a.forwardRef(
|
|
362
|
+
(e, r) => {
|
|
363
|
+
const t = Pt(R, e.__scopeTooltip), { forceMount: o = t.forceMount, side: n = "top", ...s } = e, i = F(R, e.__scopeTooltip);
|
|
364
|
+
return /* @__PURE__ */ d(Ge, { present: o || i.open, children: i.disableHoverableContent ? /* @__PURE__ */ d(Te, { side: n, ...s, ref: r }) : /* @__PURE__ */ d(Tt, { side: n, ...s, ref: r }) });
|
|
723
365
|
}
|
|
724
|
-
),
|
|
725
|
-
const
|
|
726
|
-
|
|
727
|
-
}, [
|
|
728
|
-
(v,
|
|
729
|
-
const
|
|
730
|
-
|
|
366
|
+
), Tt = a.forwardRef((e, r) => {
|
|
367
|
+
const t = F(R, e.__scopeTooltip), o = X(R, e.__scopeTooltip), n = a.useRef(null), s = k(r, n), [i, h] = a.useState(null), { trigger: l, onClose: p } = t, c = n.current, { onPointerInTransitChange: f } = o, y = a.useCallback(() => {
|
|
368
|
+
h(null), f(!1);
|
|
369
|
+
}, [f]), u = a.useCallback(
|
|
370
|
+
(v, g) => {
|
|
371
|
+
const m = v.currentTarget, w = { x: v.clientX, y: v.clientY }, x = Et(w, m.getBoundingClientRect()), T = Rt(w, x), C = _t(g.getBoundingClientRect()), b = Nt([...T, ...C]);
|
|
372
|
+
h(b), f(!0);
|
|
731
373
|
},
|
|
732
|
-
[
|
|
374
|
+
[f]
|
|
733
375
|
);
|
|
734
|
-
return
|
|
735
|
-
if (l &&
|
|
736
|
-
const v = (
|
|
737
|
-
return l.addEventListener("pointerleave", v),
|
|
738
|
-
l.removeEventListener("pointerleave", v),
|
|
376
|
+
return a.useEffect(() => () => y(), [y]), a.useEffect(() => {
|
|
377
|
+
if (l && c) {
|
|
378
|
+
const v = (m) => u(m, c), g = (m) => u(m, l);
|
|
379
|
+
return l.addEventListener("pointerleave", v), c.addEventListener("pointerleave", g), () => {
|
|
380
|
+
l.removeEventListener("pointerleave", v), c.removeEventListener("pointerleave", g);
|
|
739
381
|
};
|
|
740
382
|
}
|
|
741
|
-
}, [l,
|
|
742
|
-
if (
|
|
743
|
-
const v = (
|
|
744
|
-
const
|
|
745
|
-
|
|
383
|
+
}, [l, c, u, y]), a.useEffect(() => {
|
|
384
|
+
if (i) {
|
|
385
|
+
const v = (g) => {
|
|
386
|
+
const m = g.target, w = { x: g.clientX, y: g.clientY }, x = (l == null ? void 0 : l.contains(m)) || (c == null ? void 0 : c.contains(m)), T = !Ot(w, i);
|
|
387
|
+
x ? y() : T && (y(), p());
|
|
746
388
|
};
|
|
747
389
|
return document.addEventListener("pointermove", v), () => document.removeEventListener("pointermove", v);
|
|
748
390
|
}
|
|
749
|
-
}, [l,
|
|
750
|
-
}), [
|
|
751
|
-
(e,
|
|
391
|
+
}, [l, c, i, p, y]), /* @__PURE__ */ d(Te, { ...e, ref: s });
|
|
392
|
+
}), [bt, At] = L($, { isInside: !1 }), Te = a.forwardRef(
|
|
393
|
+
(e, r) => {
|
|
752
394
|
const {
|
|
753
|
-
__scopeTooltip:
|
|
395
|
+
__scopeTooltip: t,
|
|
754
396
|
children: o,
|
|
755
|
-
"aria-label":
|
|
756
|
-
onEscapeKeyDown:
|
|
757
|
-
onPointerDownOutside:
|
|
758
|
-
...
|
|
759
|
-
} = e, l =
|
|
760
|
-
return
|
|
397
|
+
"aria-label": n,
|
|
398
|
+
onEscapeKeyDown: s,
|
|
399
|
+
onPointerDownOutside: i,
|
|
400
|
+
...h
|
|
401
|
+
} = e, l = F(R, t), p = M(t), { onClose: c } = l;
|
|
402
|
+
return a.useEffect(() => (document.addEventListener(W, c), () => document.removeEventListener(W, c)), [c]), a.useEffect(() => {
|
|
761
403
|
if (l.trigger) {
|
|
762
|
-
const
|
|
763
|
-
const
|
|
764
|
-
|
|
404
|
+
const f = (y) => {
|
|
405
|
+
const u = y.target;
|
|
406
|
+
u != null && u.contains(l.trigger) && c();
|
|
765
407
|
};
|
|
766
|
-
return window.addEventListener("scroll",
|
|
408
|
+
return window.addEventListener("scroll", f, { capture: !0 }), () => window.removeEventListener("scroll", f, { capture: !0 });
|
|
767
409
|
}
|
|
768
|
-
}, [l.trigger,
|
|
769
|
-
|
|
410
|
+
}, [l.trigger, c]), /* @__PURE__ */ d(
|
|
411
|
+
rt,
|
|
770
412
|
{
|
|
771
413
|
asChild: !0,
|
|
772
414
|
disableOutsidePointerEvents: !1,
|
|
773
|
-
onEscapeKeyDown:
|
|
774
|
-
onPointerDownOutside:
|
|
775
|
-
onFocusOutside: (
|
|
776
|
-
onDismiss:
|
|
777
|
-
children: /* @__PURE__ */
|
|
778
|
-
|
|
415
|
+
onEscapeKeyDown: s,
|
|
416
|
+
onPointerDownOutside: i,
|
|
417
|
+
onFocusOutside: (f) => f.preventDefault(),
|
|
418
|
+
onDismiss: c,
|
|
419
|
+
children: /* @__PURE__ */ j(
|
|
420
|
+
ht,
|
|
779
421
|
{
|
|
780
422
|
"data-state": l.stateAttribute,
|
|
781
|
-
...
|
|
782
|
-
...
|
|
783
|
-
ref:
|
|
423
|
+
...p,
|
|
424
|
+
...h,
|
|
425
|
+
ref: r,
|
|
784
426
|
style: {
|
|
785
|
-
...
|
|
427
|
+
...h.style,
|
|
786
428
|
"--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
787
429
|
"--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
|
|
788
430
|
"--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
|
|
@@ -790,8 +432,8 @@ var sn = "TooltipPortal", [Tn, an] = B(sn, {
|
|
|
790
432
|
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
791
433
|
},
|
|
792
434
|
children: [
|
|
793
|
-
/* @__PURE__ */
|
|
794
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ d(Xe, { children: o }),
|
|
436
|
+
/* @__PURE__ */ d(bt, { scope: t, isInside: !0, children: /* @__PURE__ */ d(yt, { id: l.contentId, role: "tooltip", children: n || o }) })
|
|
795
437
|
]
|
|
796
438
|
}
|
|
797
439
|
)
|
|
@@ -799,25 +441,25 @@ var sn = "TooltipPortal", [Tn, an] = B(sn, {
|
|
|
799
441
|
);
|
|
800
442
|
}
|
|
801
443
|
);
|
|
802
|
-
|
|
803
|
-
var
|
|
804
|
-
(e,
|
|
805
|
-
const { __scopeTooltip:
|
|
806
|
-
return
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
).isInside ? null : /* @__PURE__ */
|
|
444
|
+
Pe.displayName = R;
|
|
445
|
+
var be = "TooltipArrow", Ae = a.forwardRef(
|
|
446
|
+
(e, r) => {
|
|
447
|
+
const { __scopeTooltip: t, ...o } = e, n = M(t);
|
|
448
|
+
return At(
|
|
449
|
+
be,
|
|
450
|
+
t
|
|
451
|
+
).isInside ? null : /* @__PURE__ */ d(vt, { ...n, ...o, ref: r });
|
|
810
452
|
}
|
|
811
453
|
);
|
|
812
|
-
|
|
813
|
-
function
|
|
814
|
-
const
|
|
815
|
-
switch (Math.min(
|
|
816
|
-
case
|
|
454
|
+
Ae.displayName = be;
|
|
455
|
+
function Et(e, r) {
|
|
456
|
+
const t = Math.abs(r.top - e.y), o = Math.abs(r.bottom - e.y), n = Math.abs(r.right - e.x), s = Math.abs(r.left - e.x);
|
|
457
|
+
switch (Math.min(t, o, n, s)) {
|
|
458
|
+
case s:
|
|
817
459
|
return "left";
|
|
818
|
-
case r:
|
|
819
|
-
return "right";
|
|
820
460
|
case n:
|
|
461
|
+
return "right";
|
|
462
|
+
case t:
|
|
821
463
|
return "top";
|
|
822
464
|
case o:
|
|
823
465
|
return "bottom";
|
|
@@ -825,101 +467,101 @@ function dn(e, t) {
|
|
|
825
467
|
throw new Error("unreachable");
|
|
826
468
|
}
|
|
827
469
|
}
|
|
828
|
-
function
|
|
470
|
+
function Rt(e, r, t = 5) {
|
|
829
471
|
const o = [];
|
|
830
|
-
switch (
|
|
472
|
+
switch (r) {
|
|
831
473
|
case "top":
|
|
832
474
|
o.push(
|
|
833
|
-
{ x: e.x -
|
|
834
|
-
{ x: e.x +
|
|
475
|
+
{ x: e.x - t, y: e.y + t },
|
|
476
|
+
{ x: e.x + t, y: e.y + t }
|
|
835
477
|
);
|
|
836
478
|
break;
|
|
837
479
|
case "bottom":
|
|
838
480
|
o.push(
|
|
839
|
-
{ x: e.x -
|
|
840
|
-
{ x: e.x +
|
|
481
|
+
{ x: e.x - t, y: e.y - t },
|
|
482
|
+
{ x: e.x + t, y: e.y - t }
|
|
841
483
|
);
|
|
842
484
|
break;
|
|
843
485
|
case "left":
|
|
844
486
|
o.push(
|
|
845
|
-
{ x: e.x +
|
|
846
|
-
{ x: e.x +
|
|
487
|
+
{ x: e.x + t, y: e.y - t },
|
|
488
|
+
{ x: e.x + t, y: e.y + t }
|
|
847
489
|
);
|
|
848
490
|
break;
|
|
849
491
|
case "right":
|
|
850
492
|
o.push(
|
|
851
|
-
{ x: e.x -
|
|
852
|
-
{ x: e.x -
|
|
493
|
+
{ x: e.x - t, y: e.y - t },
|
|
494
|
+
{ x: e.x - t, y: e.y + t }
|
|
853
495
|
);
|
|
854
496
|
break;
|
|
855
497
|
}
|
|
856
498
|
return o;
|
|
857
499
|
}
|
|
858
|
-
function
|
|
859
|
-
const { top:
|
|
500
|
+
function _t(e) {
|
|
501
|
+
const { top: r, right: t, bottom: o, left: n } = e;
|
|
860
502
|
return [
|
|
861
|
-
{ x:
|
|
862
|
-
{ x:
|
|
863
|
-
{ x:
|
|
864
|
-
{ x:
|
|
503
|
+
{ x: n, y: r },
|
|
504
|
+
{ x: t, y: r },
|
|
505
|
+
{ x: t, y: o },
|
|
506
|
+
{ x: n, y: o }
|
|
865
507
|
];
|
|
866
508
|
}
|
|
867
|
-
function
|
|
868
|
-
const { x:
|
|
869
|
-
let
|
|
870
|
-
for (let
|
|
871
|
-
const
|
|
872
|
-
l > o !=
|
|
509
|
+
function Ot(e, r) {
|
|
510
|
+
const { x: t, y: o } = e;
|
|
511
|
+
let n = !1;
|
|
512
|
+
for (let s = 0, i = r.length - 1; s < r.length; i = s++) {
|
|
513
|
+
const h = r[s].x, l = r[s].y, p = r[i].x, c = r[i].y;
|
|
514
|
+
l > o != c > o && t < (p - h) * (o - l) / (c - l) + h && (n = !n);
|
|
873
515
|
}
|
|
874
|
-
return
|
|
516
|
+
return n;
|
|
875
517
|
}
|
|
876
|
-
function
|
|
877
|
-
const
|
|
878
|
-
return
|
|
518
|
+
function Nt(e) {
|
|
519
|
+
const r = e.slice();
|
|
520
|
+
return r.sort((t, o) => t.x < o.x ? -1 : t.x > o.x ? 1 : t.y < o.y ? -1 : t.y > o.y ? 1 : 0), St(r);
|
|
879
521
|
}
|
|
880
|
-
function
|
|
522
|
+
function St(e) {
|
|
881
523
|
if (e.length <= 1)
|
|
882
524
|
return e.slice();
|
|
883
|
-
const
|
|
525
|
+
const r = [];
|
|
884
526
|
for (let o = 0; o < e.length; o++) {
|
|
885
|
-
const
|
|
886
|
-
for (;
|
|
887
|
-
const
|
|
888
|
-
if ((
|
|
889
|
-
|
|
527
|
+
const n = e[o];
|
|
528
|
+
for (; r.length >= 2; ) {
|
|
529
|
+
const s = r[r.length - 1], i = r[r.length - 2];
|
|
530
|
+
if ((s.x - i.x) * (n.y - i.y) >= (s.y - i.y) * (n.x - i.x))
|
|
531
|
+
r.pop();
|
|
890
532
|
else
|
|
891
533
|
break;
|
|
892
534
|
}
|
|
893
|
-
|
|
535
|
+
r.push(n);
|
|
894
536
|
}
|
|
895
|
-
|
|
896
|
-
const
|
|
537
|
+
r.pop();
|
|
538
|
+
const t = [];
|
|
897
539
|
for (let o = e.length - 1; o >= 0; o--) {
|
|
898
|
-
const
|
|
899
|
-
for (;
|
|
900
|
-
const
|
|
901
|
-
if ((
|
|
902
|
-
|
|
540
|
+
const n = e[o];
|
|
541
|
+
for (; t.length >= 2; ) {
|
|
542
|
+
const s = t[t.length - 1], i = t[t.length - 2];
|
|
543
|
+
if ((s.x - i.x) * (n.y - i.y) >= (s.y - i.y) * (n.x - i.x))
|
|
544
|
+
t.pop();
|
|
903
545
|
else
|
|
904
546
|
break;
|
|
905
547
|
}
|
|
906
|
-
|
|
548
|
+
t.push(n);
|
|
907
549
|
}
|
|
908
|
-
return
|
|
550
|
+
return t.pop(), r.length === 1 && t.length === 1 && r[0].x === t[0].x && r[0].y === t[0].y ? r : r.concat(t);
|
|
909
551
|
}
|
|
910
|
-
const
|
|
911
|
-
tooltipContent:
|
|
912
|
-
tooltipArrow:
|
|
913
|
-
fadeIn:
|
|
914
|
-
},
|
|
915
|
-
({ children: e, content:
|
|
916
|
-
/* @__PURE__ */
|
|
917
|
-
/* @__PURE__ */
|
|
918
|
-
/* @__PURE__ */
|
|
919
|
-
/* @__PURE__ */
|
|
552
|
+
const Dt = "_tooltipContent_12gjy_1", Ht = "_tooltipArrow_12gjy_8", It = "_fadeIn_12gjy_1", ne = {
|
|
553
|
+
tooltipContent: Dt,
|
|
554
|
+
tooltipArrow: Ht,
|
|
555
|
+
fadeIn: It
|
|
556
|
+
}, Wt = ot(
|
|
557
|
+
({ children: e, content: r, className: t, style: o }, n) => /* @__PURE__ */ d(we, { children: /* @__PURE__ */ j(xe, { delayDuration: 1e3, children: [
|
|
558
|
+
/* @__PURE__ */ d(Ce, { asChild: !0, children: /* @__PURE__ */ d("div", { ref: n, className: t, style: o, children: e }) }),
|
|
559
|
+
/* @__PURE__ */ j(Pe, { className: ne.tooltipContent, sideOffset: 5, children: [
|
|
560
|
+
/* @__PURE__ */ d(Ae, { className: ne.tooltipArrow }),
|
|
561
|
+
/* @__PURE__ */ d("span", { children: r })
|
|
920
562
|
] })
|
|
921
563
|
] }) })
|
|
922
564
|
);
|
|
923
565
|
export {
|
|
924
|
-
|
|
566
|
+
Wt as default
|
|
925
567
|
};
|