@pdf-viewer/react 0.0.0-experimental.6 → 0.0.0-experimental.7
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/{LayoutWrapper-6224491f.js → LayoutWrapper-e310e12f.js} +10 -2
- package/dist/{SearchCloseButton-08d57275.js → SearchCloseButton-52d8ac31.js} +16 -8
- package/dist/ToolbarLayout.module-d74981d1.js +4270 -0
- package/dist/assets/style.css +1 -1
- package/dist/assets/style.js +11 -11
- package/dist/classof-56f81803.js +76 -0
- package/dist/components/RPConfig.js +32 -1483
- package/dist/components/RPController.js +136 -89
- package/dist/components/RPDropFileZone.js +43 -20
- package/dist/components/RPPages.js +26 -16
- package/dist/components/RPProvider.js +71 -40
- package/dist/components/RPTheme.js +17 -10
- package/dist/components/icons/CheckIcon.js +12 -18
- package/dist/components/icons/ChevronDownIcon.js +15 -19
- package/dist/components/icons/ChevronUpIcon.js +12 -18
- package/dist/components/icons/ClearIcon.js +24 -21
- package/dist/components/icons/ClockwiseIcon.js +12 -18
- package/dist/components/icons/CloseIcon.js +12 -18
- package/dist/components/icons/DarkPdfIcon.js +5 -8
- package/dist/components/icons/DualPageIcon.js +14 -20
- package/dist/components/icons/FileDownloadDefaultIcon.js +16 -19
- package/dist/components/icons/FileUploadDefaultIcon.js +16 -19
- package/dist/components/icons/FullScreenIcon.js +12 -18
- package/dist/components/icons/GoToDownIcon.js +12 -18
- package/dist/components/icons/HandModeDefaultIcon.js +12 -18
- package/dist/components/icons/HorizontalScrollingIcon.js +14 -20
- package/dist/components/icons/InfoIcon.js +12 -18
- package/dist/components/icons/LightPdfIcon.js +5 -8
- package/dist/components/icons/LoaderIcon.js +9 -9
- package/dist/components/icons/MoonIcon.js +12 -18
- package/dist/components/icons/PageScrollingIcon.js +14 -20
- package/dist/components/icons/PrintDefaultIcon.js +16 -19
- package/dist/components/icons/SearchIcon.js +12 -18
- package/dist/components/icons/SinglePageIcon.js +14 -20
- package/dist/components/icons/SunIcon.js +24 -21
- package/dist/components/icons/TextSelectionDefaultIcon.js +16 -19
- package/dist/components/icons/ThreeDotIcon.js +12 -18
- package/dist/components/icons/Thumbnail.js +30 -50
- package/dist/components/icons/VerticalScrollingIcon.js +14 -20
- package/dist/components/icons/WrappedScrollingIcon.js +14 -20
- package/dist/components/icons/ZoomInIcon.js +12 -18
- package/dist/components/icons/ZoomOutIcon.js +12 -18
- package/dist/components/layout/Container.js +14 -12
- package/dist/components/layout/LayoutContainer.js +25 -15
- package/dist/components/layout/LayoutWrapper.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +22 -12
- package/dist/components/layout/RPLayout.js +96 -76
- package/dist/components/layout/WrapperLayout.js +32 -7
- package/dist/components/layout/sidebar/RPSidebar.js +22 -12
- package/dist/components/layout/sidebar/RPSplitter.js +23 -22
- package/dist/components/layout/sidebar/Thumbnail.js +26 -16
- package/dist/components/layout/sidebar/Thumbnails.js +22 -12
- package/dist/components/layout/toolbar/DarkModeTool.js +42 -6
- package/dist/components/layout/toolbar/DocumentDialog.js +26 -16
- package/dist/components/layout/toolbar/DocumentProperties.js +43 -15
- package/dist/components/layout/toolbar/FileDownloadTool.js +22 -12
- package/dist/components/layout/toolbar/FileUploadTool.js +80 -11
- package/dist/components/layout/toolbar/FullScreenTool.js +73 -35
- package/dist/components/layout/toolbar/MenuItem.js +28 -10
- package/dist/components/layout/toolbar/MenuSeparator.js +16 -5
- package/dist/components/layout/toolbar/MostPageTool.js +25 -15
- package/dist/components/layout/toolbar/OtherTool.js +22 -12
- package/dist/components/layout/toolbar/Paginate.js +22 -12
- package/dist/components/layout/toolbar/PrintTool.js +22 -12
- package/dist/components/layout/toolbar/PropertyItem.js +13 -4
- package/dist/components/layout/toolbar/RPMenuItem.js +30 -16
- package/dist/components/layout/toolbar/RPMoreOptions.js +113 -118
- package/dist/components/layout/toolbar/RPToolbar.js +22 -12
- package/dist/components/layout/toolbar/RPToolbarEnd.js +22 -12
- package/dist/components/layout/toolbar/RotateTool.js +69 -26
- package/dist/components/layout/toolbar/ScrollModeTool.js +83 -33
- package/dist/components/layout/toolbar/SearchCloseButton.js +3 -3
- package/dist/components/layout/toolbar/SearchResultNavigator.js +22 -12
- package/dist/components/layout/toolbar/SearchTool.js +25 -15
- package/dist/components/layout/toolbar/SelectionModeTool.js +63 -21
- package/dist/components/layout/toolbar/ThumbnailTool.js +50 -15
- package/dist/components/layout/toolbar/ToolbarCustom.js +91 -56
- package/dist/components/layout/toolbar/ToolbarDefault.js +92 -58
- package/dist/components/layout/toolbar/ToolbarLayout.js +33 -15
- package/dist/components/layout/toolbar/ViewModeTool.js +74 -28
- package/dist/components/layout/toolbar/ZoomTool.js +22 -12
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +41 -22
- package/dist/components/layout/toolbar/tools/DualPageTool.js +177 -0
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +46 -15
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +36 -6
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +25 -9
- package/dist/components/layout/toolbar/tools/InputPageTool.js +43 -31
- package/dist/components/layout/toolbar/tools/NextPageTool.js +55 -27
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +42 -23
- package/dist/components/layout/toolbar/tools/PrintTool.js +46 -15
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +31 -6
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +31 -11
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +43 -0
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +177 -0
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +19 -5
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +42 -23
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +31 -14
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +26 -16
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +84 -60
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +31 -14
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +70 -28
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +42 -17
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +36 -11
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +44 -18
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +47 -21
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +38 -11
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +78 -28
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +44 -18
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +57 -20
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +70 -29
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +58 -22
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +63 -23
- package/dist/components/page/AnnotationLayer.js +26 -16
- package/dist/components/page/CanvasLayer.js +26 -16
- package/dist/components/page/CustomElement.js +38 -8
- package/dist/components/page/DualPage.js +22 -12
- package/dist/components/page/RPPage.js +26 -16
- package/dist/components/page/SinglePage.js +22 -12
- package/dist/components/page/TextHighlightLayer.js +35 -25
- package/dist/components/page/TextLayer.js +32 -22
- package/dist/components/ui/Button.js +13 -11
- package/dist/components/ui/Checkbox.js +23 -15
- package/dist/components/ui/DropDown.js +40 -18
- package/dist/components/ui/Input.js +18 -14
- package/dist/components/ui/LoadingIndicator.js +22 -12
- package/dist/components/ui/PasswordModal.js +33 -24
- package/dist/components/ui/RPTooltip.js +29 -11
- package/dist/contexts/ConfigContext.js +8 -2
- package/dist/contexts/DarkModeContext.js +11 -2
- package/dist/contexts/DimensionPagesContext.js +89 -28
- package/dist/contexts/DocumentPasswordContext.js +4 -1
- package/dist/contexts/DownloadContext.js +9 -9
- package/dist/contexts/DropFileZoneContext.js +45 -34
- package/dist/contexts/ElementPageContext.js +111 -80
- package/dist/contexts/EventCallbackContext.js +8 -11
- package/dist/contexts/FileInputContext.js +39 -22
- package/dist/contexts/FullScreenContext.js +18 -3
- package/dist/contexts/GlobalCurrentPage.js +15 -3
- package/dist/contexts/HighlightContext.js +32 -7
- package/dist/contexts/IconContext.js +4 -1
- package/dist/contexts/IconToolContext.js +12 -2
- package/dist/contexts/InitialStateContext.js +4 -1
- package/dist/contexts/LayerContext.js +11 -1
- package/dist/contexts/LicenseContext.js +17 -8
- package/dist/contexts/LoaderContext.js +10 -10
- package/dist/contexts/LocalizationContext.js +6 -9
- package/dist/contexts/OtherToolContext.js +7 -2
- package/dist/contexts/PageViewportContext.js +6 -1
- package/dist/contexts/PagesRotateContext.js +45 -13
- package/dist/contexts/PaginationContext.js +24 -14
- package/dist/contexts/PrintContext.js +24 -14
- package/dist/contexts/RPDocumentContext.js +54 -29
- package/dist/contexts/RenderQueueProvider.js +24 -14
- package/dist/contexts/RenderedPagesCache.js +23 -8
- package/dist/contexts/RotationContext.js +33 -16
- package/dist/contexts/ScrollModeContext.js +13 -3
- package/dist/contexts/SearchContext.js +24 -14
- package/dist/contexts/SelectionModeContext.js +7 -1
- package/dist/contexts/SmoothScrollContext.js +12 -3
- package/dist/contexts/ThumbnailsContext.js +24 -14
- package/dist/contexts/ToolComponentContext.js +10 -2
- package/dist/contexts/ToolbarComponentContext.js +8 -2
- package/dist/contexts/ViewModeContext.js +15 -3
- package/dist/contexts/ViewportContext.js +7 -2
- package/dist/contexts/VirtualGridContext.js +10 -2
- package/dist/contexts/VirtualScrollContext.js +18 -19
- package/dist/contexts/ZoomContext.js +196 -84
- package/dist/es.iterator.constructor-05468e3d.js +126 -0
- package/dist/es.iterator.filter-1ddb1471.js +37 -0
- package/dist/es.iterator.for-each-ed4cb4aa.js +34 -0
- package/dist/es.iterator.map-635f6e20.js +157 -0
- package/dist/es.iterator.reduce-969434f1.js +31 -0
- package/dist/esnext.json.parse-3bf99e2e.js +152 -0
- package/dist/esnext.map.delete-all-fa83df07.js +401 -0
- package/dist/function-uncurry-this-accessor-efc140e6.js +17 -0
- package/dist/{index-808ea7bf.js → index-1d695410.js} +1 -1
- package/dist/{index-c9a2990a.js → index-7ca3764b.js} +3 -3
- package/dist/index-922e8d58.js +2545 -0
- package/dist/is-pure-db2321f6.js +886 -0
- package/dist/iterate-1672c441.js +110 -0
- package/dist/iterator-helper-without-closing-on-early-error-a6637535.js +69 -0
- package/dist/main.js +134 -118
- package/dist/types/components/icons/DualPageIcon.d.ts +1 -1
- package/dist/types/components/icons/SinglePageIcon.d.ts +1 -1
- package/dist/types/components/layout/toolbar/tools/DualPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/SelectionModeSwitcherTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/SinglePageTool.d.ts +3 -0
- package/dist/types/contexts/RenderQueueProvider.d.ts +2 -2
- package/dist/types/main.d.ts +4 -4
- package/dist/types/utils/getElementPositionInPage.d.ts +2 -2
- package/dist/types/utils/hooks/useCopyText.d.ts +1 -0
- package/dist/types/utils/hooks/usePrint.d.ts +3 -2
- package/dist/types/utils/hooks/useSearch.d.ts +1 -2
- package/dist/types/utils/link_service.d.ts +0 -8
- package/dist/types/utils/renderPage.d.ts +2 -2
- package/dist/types/utils/types.d.ts +27 -4
- package/dist/utils/Queue.js +60 -18
- package/dist/utils/annotations.js +109 -75
- package/dist/utils/calculatePage.js +23 -11
- package/dist/utils/convertPdfDate.js +1 -3
- package/dist/utils/elementPagePosition.js +8 -1
- package/dist/utils/getElementPositionInPage.js +16 -44
- package/dist/utils/getScrollDistance.js +5 -2
- package/dist/utils/getThumbnailViewport.js +10 -2
- package/dist/utils/getWordPositionInPage.js +5 -5
- package/dist/utils/getZoomLevel.js +1 -4
- package/dist/utils/highlight.js +232 -160
- package/dist/utils/hooks/useCopyText.js +37 -0
- package/dist/utils/hooks/useDarkModeProps.js +4 -1
- package/dist/utils/hooks/useElementSize.js +25 -10
- package/dist/utils/hooks/useFileDownload.js +26 -16
- package/dist/utils/hooks/useFullScreen.js +6 -1
- package/dist/utils/hooks/useGrabScroll.js +17 -16
- package/dist/utils/hooks/useHighlight.js +25 -22
- package/dist/utils/hooks/useInfiniteScroll.js +8 -8
- package/dist/utils/hooks/useLicense.js +1174 -55
- package/dist/utils/hooks/useLoadPdf.js +94 -52
- package/dist/utils/hooks/useLoadWorker.js +8 -8
- package/dist/utils/hooks/useMousePressed.js +8 -2
- package/dist/utils/hooks/usePageRotateContext.js +33 -18
- package/dist/utils/hooks/usePaginate.js +26 -16
- package/dist/utils/hooks/usePinch.js +49 -39
- package/dist/utils/hooks/usePresentPage.js +35 -25
- package/dist/utils/hooks/usePrint.js +26 -16
- package/dist/utils/hooks/useRequestAnimationFrame.js +9 -9
- package/dist/utils/hooks/useRotate.js +17 -4
- package/dist/utils/hooks/useScrollToPage.js +26 -16
- package/dist/utils/hooks/useSearch.js +26 -16
- package/dist/utils/hooks/useThumbnail.js +26 -16
- package/dist/utils/hooks/useVirtualReactWindow.js +26 -16
- package/dist/utils/hooks/useWatermark.js +55 -42
- package/dist/utils/injectPrintCSS.js +1 -1
- package/dist/utils/link_service.js +20 -36
- package/dist/utils/renderPage.js +20 -11
- package/dist/utils/smoothScrollTo.js +4 -1
- package/dist/utils/withRef.js +4 -1
- package/dist/web.url-search-params.delete-c65de04d.js +51 -0
- package/package.json +9 -7
- package/dist/ToolbarLayout.module-37619c4b.js +0 -3548
- package/dist/index-a48ec088.js +0 -1672
- package/dist/types/utils/approximateFragtion.d.ts +0 -9
- package/dist/utils/approximateFragtion.js +0 -22
|
@@ -0,0 +1,2545 @@
|
|
|
1
|
+
import * as c from "react";
|
|
2
|
+
import H, { useState as ho } from "react";
|
|
3
|
+
import { h as go, P as L, c as Ae, u as U, j as vr, e as Zt, a as M, b as Te, k as Qt, g as So } from "./index-7ca3764b.js";
|
|
4
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
5
|
+
import { b as se, u as pr, c as Jt, A as _o, D as wo, C as Eo, a as yo, R as bo } from "./index-1d695410.js";
|
|
6
|
+
import Mo from "react-dom";
|
|
7
|
+
import { s as Pe, c as W, a as en, d as Ro, t as rn, b as C, J as Co, k as Io, o as xo, l as Oo, H as Do, e as Ao } from "./is-pure-db2321f6.js";
|
|
8
|
+
import "./es.iterator.constructor-05468e3d.js";
|
|
9
|
+
import "./es.iterator.filter-1ddb1471.js";
|
|
10
|
+
import "./es.iterator.for-each-ed4cb4aa.js";
|
|
11
|
+
import "./es.iterator.map-635f6e20.js";
|
|
12
|
+
import { r as To } from "./function-uncurry-this-accessor-efc140e6.js";
|
|
13
|
+
import { b as Po, r as ko } from "./classof-56f81803.js";
|
|
14
|
+
import { b as No, r as tn } from "./iterator-helper-without-closing-on-early-error-a6637535.js";
|
|
15
|
+
import { b as Fo, a as de } from "./iterate-1672c441.js";
|
|
16
|
+
var Ar = {}, Tr = {}, Ue, Pr;
|
|
17
|
+
function ve() {
|
|
18
|
+
if (Pr)
|
|
19
|
+
return Ue;
|
|
20
|
+
Pr = 1;
|
|
21
|
+
var e = To(), r = T;
|
|
22
|
+
return Ue = e(r.proto, "size", "get") || function(t) {
|
|
23
|
+
return t.size;
|
|
24
|
+
}, Ue;
|
|
25
|
+
}
|
|
26
|
+
var nn = require("../internals/function-uncurry-this"), qo = require("../internals/iterate-simple"), on = require("../internals/set-helpers"), Lo = on.Set, an = on.proto, $o = nn(an.forEach), un = nn(an.keys), Go = un(new Lo()).next;
|
|
27
|
+
module.exports = function(e, r, t) {
|
|
28
|
+
return t ? qo({
|
|
29
|
+
iterator: un(e),
|
|
30
|
+
next: Go
|
|
31
|
+
}, r) : $o(e, r);
|
|
32
|
+
};
|
|
33
|
+
const Ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
34
|
+
__proto__: null
|
|
35
|
+
}, Symbol.toStringTag, { value: "Module" })), N = /* @__PURE__ */ Pe(Ko);
|
|
36
|
+
var We, kr;
|
|
37
|
+
function V() {
|
|
38
|
+
if (kr)
|
|
39
|
+
return We;
|
|
40
|
+
kr = 1;
|
|
41
|
+
var e = en(), r = Ro(), t = W(), n = Po(), o = No(), a = "Invalid size", u = RangeError, i = TypeError, f = Math.max, d = function(l, s) {
|
|
42
|
+
this.set = l, this.size = f(s, 0), this.has = e(l.has), this.keys = e(l.keys);
|
|
43
|
+
};
|
|
44
|
+
return d.prototype = {
|
|
45
|
+
getIterator: function() {
|
|
46
|
+
return o(r(t(this.keys, this.set)));
|
|
47
|
+
},
|
|
48
|
+
includes: function(l) {
|
|
49
|
+
return t(this.has, this.set, l);
|
|
50
|
+
}
|
|
51
|
+
}, We = function(l) {
|
|
52
|
+
r(l);
|
|
53
|
+
var s = +l.size;
|
|
54
|
+
if (s !== s)
|
|
55
|
+
throw new i(a);
|
|
56
|
+
var v = n(s);
|
|
57
|
+
if (v < 0)
|
|
58
|
+
throw new u(a);
|
|
59
|
+
return new d(l, v);
|
|
60
|
+
}, We;
|
|
61
|
+
}
|
|
62
|
+
var je, Nr;
|
|
63
|
+
function cn() {
|
|
64
|
+
if (Nr)
|
|
65
|
+
return je;
|
|
66
|
+
Nr = 1;
|
|
67
|
+
var e = D(), r = ve(), t = N, n = V();
|
|
68
|
+
return je = function(a) {
|
|
69
|
+
var u = e(this), i = n(a);
|
|
70
|
+
return r(u) > i.size ? !1 : t(u, function(f) {
|
|
71
|
+
if (!i.includes(f))
|
|
72
|
+
return !1;
|
|
73
|
+
}, !0) !== !1;
|
|
74
|
+
}, je;
|
|
75
|
+
}
|
|
76
|
+
var Be, Fr;
|
|
77
|
+
function pe() {
|
|
78
|
+
if (Fr)
|
|
79
|
+
return Be;
|
|
80
|
+
Fr = 1;
|
|
81
|
+
var e = rn(), r = function(n) {
|
|
82
|
+
return {
|
|
83
|
+
size: n,
|
|
84
|
+
has: function() {
|
|
85
|
+
return !1;
|
|
86
|
+
},
|
|
87
|
+
keys: function() {
|
|
88
|
+
return {
|
|
89
|
+
next: function() {
|
|
90
|
+
return {
|
|
91
|
+
done: !0
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
}, t = function(n) {
|
|
98
|
+
return {
|
|
99
|
+
size: n,
|
|
100
|
+
has: function() {
|
|
101
|
+
return !0;
|
|
102
|
+
},
|
|
103
|
+
keys: function() {
|
|
104
|
+
throw new Error("e");
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
return Be = function(n, o) {
|
|
109
|
+
var a = e("Set");
|
|
110
|
+
try {
|
|
111
|
+
new a()[n](r(0));
|
|
112
|
+
try {
|
|
113
|
+
return new a()[n](r(-1)), !1;
|
|
114
|
+
} catch {
|
|
115
|
+
if (!o)
|
|
116
|
+
return !0;
|
|
117
|
+
try {
|
|
118
|
+
return new a()[n](t(-1 / 0)), !1;
|
|
119
|
+
} catch {
|
|
120
|
+
var u = new a();
|
|
121
|
+
return u.add(1), u.add(2), o(u[n](t(1 / 0)));
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
} catch {
|
|
125
|
+
return !1;
|
|
126
|
+
}
|
|
127
|
+
}, Be;
|
|
128
|
+
}
|
|
129
|
+
var qr;
|
|
130
|
+
function Uo() {
|
|
131
|
+
if (qr)
|
|
132
|
+
return Tr;
|
|
133
|
+
qr = 1;
|
|
134
|
+
var e = C(), r = cn(), t = pe(), n = !t("isSubsetOf", function(o) {
|
|
135
|
+
return o;
|
|
136
|
+
});
|
|
137
|
+
return e({
|
|
138
|
+
target: "Set",
|
|
139
|
+
proto: !0,
|
|
140
|
+
real: !0,
|
|
141
|
+
forced: n
|
|
142
|
+
}, {
|
|
143
|
+
isSubsetOf: r
|
|
144
|
+
}), Tr;
|
|
145
|
+
}
|
|
146
|
+
Uo();
|
|
147
|
+
var Lr = {}, ze, $r;
|
|
148
|
+
function oe() {
|
|
149
|
+
if ($r)
|
|
150
|
+
return ze;
|
|
151
|
+
$r = 1;
|
|
152
|
+
var e = W();
|
|
153
|
+
return ze = function(r, t, n) {
|
|
154
|
+
for (var o = n ? r : r.iterator, a = r.next, u, i; !(u = e(a, o)).done; )
|
|
155
|
+
if (i = t(u.value), i !== void 0)
|
|
156
|
+
return i;
|
|
157
|
+
}, ze;
|
|
158
|
+
}
|
|
159
|
+
var He, Gr;
|
|
160
|
+
function sn() {
|
|
161
|
+
if (Gr)
|
|
162
|
+
return He;
|
|
163
|
+
Gr = 1;
|
|
164
|
+
var e = D(), r = T.has, t = ve(), n = V(), o = oe(), a = tn();
|
|
165
|
+
return He = function(i) {
|
|
166
|
+
var f = e(this), d = n(i);
|
|
167
|
+
if (t(f) < d.size)
|
|
168
|
+
return !1;
|
|
169
|
+
var l = d.getIterator();
|
|
170
|
+
return o(l, function(s) {
|
|
171
|
+
if (!r(f, s))
|
|
172
|
+
return a(l, "normal", !1);
|
|
173
|
+
}) !== !1;
|
|
174
|
+
}, He;
|
|
175
|
+
}
|
|
176
|
+
var Kr;
|
|
177
|
+
function Wo() {
|
|
178
|
+
if (Kr)
|
|
179
|
+
return Lr;
|
|
180
|
+
Kr = 1;
|
|
181
|
+
var e = C(), r = sn(), t = pe(), n = !t("isSupersetOf", function(o) {
|
|
182
|
+
return !o;
|
|
183
|
+
});
|
|
184
|
+
return e({
|
|
185
|
+
target: "Set",
|
|
186
|
+
proto: !0,
|
|
187
|
+
real: !0,
|
|
188
|
+
forced: n
|
|
189
|
+
}, {
|
|
190
|
+
isSupersetOf: r
|
|
191
|
+
}), Lr;
|
|
192
|
+
}
|
|
193
|
+
Wo();
|
|
194
|
+
var Ur = {}, Ve, Wr;
|
|
195
|
+
function Sr() {
|
|
196
|
+
if (Wr)
|
|
197
|
+
return Ve;
|
|
198
|
+
Wr = 1;
|
|
199
|
+
var e = T, r = N, t = e.Set, n = e.add;
|
|
200
|
+
return Ve = function(o) {
|
|
201
|
+
var a = new t();
|
|
202
|
+
return r(o, function(u) {
|
|
203
|
+
n(a, u);
|
|
204
|
+
}), a;
|
|
205
|
+
}, Ve;
|
|
206
|
+
}
|
|
207
|
+
var Ye, jr;
|
|
208
|
+
function ln() {
|
|
209
|
+
if (jr)
|
|
210
|
+
return Ye;
|
|
211
|
+
jr = 1;
|
|
212
|
+
var e = D(), r = T, t = Sr(), n = V(), o = oe(), a = r.add, u = r.has, i = r.remove;
|
|
213
|
+
return Ye = function(d) {
|
|
214
|
+
var l = e(this), s = n(d).getIterator(), v = t(l);
|
|
215
|
+
return o(s, function(g) {
|
|
216
|
+
u(l, g) ? i(v, g) : a(v, g);
|
|
217
|
+
}), v;
|
|
218
|
+
}, Ye;
|
|
219
|
+
}
|
|
220
|
+
var Br = {}, Xe, zr;
|
|
221
|
+
function fn() {
|
|
222
|
+
if (zr)
|
|
223
|
+
return Xe;
|
|
224
|
+
zr = 1;
|
|
225
|
+
var e = D(), r = T.add, t = Sr(), n = V(), o = oe();
|
|
226
|
+
return Xe = function(u) {
|
|
227
|
+
var i = e(this), f = n(u).getIterator(), d = t(i);
|
|
228
|
+
return o(f, function(l) {
|
|
229
|
+
r(d, l);
|
|
230
|
+
}), d;
|
|
231
|
+
}, Xe;
|
|
232
|
+
}
|
|
233
|
+
var Hr;
|
|
234
|
+
function jo() {
|
|
235
|
+
if (Hr)
|
|
236
|
+
return Br;
|
|
237
|
+
Hr = 1;
|
|
238
|
+
var e = C(), r = fn(), t = vn, n = pe(), o = !n("union") || !t("union");
|
|
239
|
+
return e({
|
|
240
|
+
target: "Set",
|
|
241
|
+
proto: !0,
|
|
242
|
+
real: !0,
|
|
243
|
+
forced: o
|
|
244
|
+
}, {
|
|
245
|
+
union: r
|
|
246
|
+
}), Br;
|
|
247
|
+
}
|
|
248
|
+
jo();
|
|
249
|
+
var Vr = {}, Yr;
|
|
250
|
+
function Bo() {
|
|
251
|
+
if (Yr)
|
|
252
|
+
return Vr;
|
|
253
|
+
Yr = 1;
|
|
254
|
+
var e = C(), r = D(), t = T.add;
|
|
255
|
+
return e({
|
|
256
|
+
target: "Set",
|
|
257
|
+
proto: !0,
|
|
258
|
+
real: !0,
|
|
259
|
+
forced: !0
|
|
260
|
+
}, {
|
|
261
|
+
addAll: function() {
|
|
262
|
+
for (var o = r(this), a = 0, u = arguments.length; a < u; a++)
|
|
263
|
+
t(o, arguments[a]);
|
|
264
|
+
return o;
|
|
265
|
+
}
|
|
266
|
+
}), Vr;
|
|
267
|
+
}
|
|
268
|
+
Bo();
|
|
269
|
+
var Xr = {}, Zr;
|
|
270
|
+
function zo() {
|
|
271
|
+
if (Zr)
|
|
272
|
+
return Xr;
|
|
273
|
+
Zr = 1;
|
|
274
|
+
var e = C(), r = D(), t = T.remove;
|
|
275
|
+
return e({
|
|
276
|
+
target: "Set",
|
|
277
|
+
proto: !0,
|
|
278
|
+
real: !0,
|
|
279
|
+
forced: !0
|
|
280
|
+
}, {
|
|
281
|
+
deleteAll: function() {
|
|
282
|
+
for (var o = r(this), a = !0, u, i = 0, f = arguments.length; i < f; i++)
|
|
283
|
+
u = t(o, arguments[i]), a = a && u;
|
|
284
|
+
return !!a;
|
|
285
|
+
}
|
|
286
|
+
}), Xr;
|
|
287
|
+
}
|
|
288
|
+
zo();
|
|
289
|
+
var Qr = {}, Ze, Jr;
|
|
290
|
+
function Ho() {
|
|
291
|
+
if (Jr)
|
|
292
|
+
return Ze;
|
|
293
|
+
Jr = 1;
|
|
294
|
+
var e = ko(), r = Co(), t = xo(), n = Io(), o = Fo(), a = n("iterator"), u = Object;
|
|
295
|
+
return Ze = function(i) {
|
|
296
|
+
if (t(i))
|
|
297
|
+
return !1;
|
|
298
|
+
var f = u(i);
|
|
299
|
+
return f[a] !== void 0 || "@@iterator" in f || r(o, e(f));
|
|
300
|
+
}, Ze;
|
|
301
|
+
}
|
|
302
|
+
var Qe, et;
|
|
303
|
+
function Y() {
|
|
304
|
+
if (et)
|
|
305
|
+
return Qe;
|
|
306
|
+
et = 1;
|
|
307
|
+
var e = rn(), r = Oo(), t = Ho(), n = Do(), o = e("Set"), a = function(u) {
|
|
308
|
+
return n(u) && typeof u.size == "number" && r(u.has) && r(u.keys);
|
|
309
|
+
};
|
|
310
|
+
return Qe = function(u) {
|
|
311
|
+
return a(u) ? u : t(u) ? new o(u) : u;
|
|
312
|
+
}, Qe;
|
|
313
|
+
}
|
|
314
|
+
var Je, rt;
|
|
315
|
+
function Vo() {
|
|
316
|
+
if (rt)
|
|
317
|
+
return Je;
|
|
318
|
+
rt = 1;
|
|
319
|
+
var e = D(), r = T, t = Sr(), n = ve(), o = V(), a = N, u = oe(), i = r.has, f = r.remove;
|
|
320
|
+
return Je = function(l) {
|
|
321
|
+
var s = e(this), v = o(l), g = t(s);
|
|
322
|
+
return n(s) <= v.size ? a(s, function(S) {
|
|
323
|
+
v.includes(S) && f(g, S);
|
|
324
|
+
}) : u(v.getIterator(), function(S) {
|
|
325
|
+
i(g, S) && f(g, S);
|
|
326
|
+
}), g;
|
|
327
|
+
}, Je;
|
|
328
|
+
}
|
|
329
|
+
var tt;
|
|
330
|
+
function Yo() {
|
|
331
|
+
if (tt)
|
|
332
|
+
return Qr;
|
|
333
|
+
tt = 1;
|
|
334
|
+
var e = C(), r = W(), t = Y(), n = Vo();
|
|
335
|
+
return e({
|
|
336
|
+
target: "Set",
|
|
337
|
+
proto: !0,
|
|
338
|
+
real: !0,
|
|
339
|
+
forced: !0
|
|
340
|
+
}, {
|
|
341
|
+
difference: function(a) {
|
|
342
|
+
return r(n, this, t(a));
|
|
343
|
+
}
|
|
344
|
+
}), Qr;
|
|
345
|
+
}
|
|
346
|
+
Yo();
|
|
347
|
+
var nt = {}, ot;
|
|
348
|
+
function Xo() {
|
|
349
|
+
if (ot)
|
|
350
|
+
return nt;
|
|
351
|
+
ot = 1;
|
|
352
|
+
var e = C(), r = de(), t = D(), n = N;
|
|
353
|
+
return e({
|
|
354
|
+
target: "Set",
|
|
355
|
+
proto: !0,
|
|
356
|
+
real: !0,
|
|
357
|
+
forced: !0
|
|
358
|
+
}, {
|
|
359
|
+
every: function(a) {
|
|
360
|
+
var u = t(this), i = r(a, arguments.length > 1 ? arguments[1] : void 0);
|
|
361
|
+
return n(u, function(f) {
|
|
362
|
+
if (!i(f, f, u))
|
|
363
|
+
return !1;
|
|
364
|
+
}, !0) !== !1;
|
|
365
|
+
}
|
|
366
|
+
}), nt;
|
|
367
|
+
}
|
|
368
|
+
Xo();
|
|
369
|
+
var at = {}, it;
|
|
370
|
+
function Zo() {
|
|
371
|
+
if (it)
|
|
372
|
+
return at;
|
|
373
|
+
it = 1;
|
|
374
|
+
var e = C(), r = de(), t = D(), n = T, o = N, a = n.Set, u = n.add;
|
|
375
|
+
return e({
|
|
376
|
+
target: "Set",
|
|
377
|
+
proto: !0,
|
|
378
|
+
real: !0,
|
|
379
|
+
forced: !0
|
|
380
|
+
}, {
|
|
381
|
+
filter: function(f) {
|
|
382
|
+
var d = t(this), l = r(f, arguments.length > 1 ? arguments[1] : void 0), s = new a();
|
|
383
|
+
return o(d, function(v) {
|
|
384
|
+
l(v, v, d) && u(s, v);
|
|
385
|
+
}), s;
|
|
386
|
+
}
|
|
387
|
+
}), at;
|
|
388
|
+
}
|
|
389
|
+
Zo();
|
|
390
|
+
var ut = {}, ct;
|
|
391
|
+
function Qo() {
|
|
392
|
+
if (ct)
|
|
393
|
+
return ut;
|
|
394
|
+
ct = 1;
|
|
395
|
+
var e = C(), r = de(), t = D(), n = N;
|
|
396
|
+
return e({
|
|
397
|
+
target: "Set",
|
|
398
|
+
proto: !0,
|
|
399
|
+
real: !0,
|
|
400
|
+
forced: !0
|
|
401
|
+
}, {
|
|
402
|
+
find: function(a) {
|
|
403
|
+
var u = t(this), i = r(a, arguments.length > 1 ? arguments[1] : void 0), f = n(u, function(d) {
|
|
404
|
+
if (i(d, d, u))
|
|
405
|
+
return {
|
|
406
|
+
value: d
|
|
407
|
+
};
|
|
408
|
+
}, !0);
|
|
409
|
+
return f && f.value;
|
|
410
|
+
}
|
|
411
|
+
}), ut;
|
|
412
|
+
}
|
|
413
|
+
Qo();
|
|
414
|
+
var st = {}, er, lt;
|
|
415
|
+
function Jo() {
|
|
416
|
+
if (lt)
|
|
417
|
+
return er;
|
|
418
|
+
lt = 1;
|
|
419
|
+
var e = D(), r = T, t = ve(), n = V(), o = N, a = oe(), u = r.Set, i = r.add, f = r.has;
|
|
420
|
+
return er = function(l) {
|
|
421
|
+
var s = e(this), v = n(l), g = new u();
|
|
422
|
+
return t(s) > v.size ? a(v.getIterator(), function(S) {
|
|
423
|
+
f(s, S) && i(g, S);
|
|
424
|
+
}) : o(s, function(S) {
|
|
425
|
+
v.includes(S) && i(g, S);
|
|
426
|
+
}), g;
|
|
427
|
+
}, er;
|
|
428
|
+
}
|
|
429
|
+
var ft;
|
|
430
|
+
function ea() {
|
|
431
|
+
if (ft)
|
|
432
|
+
return st;
|
|
433
|
+
ft = 1;
|
|
434
|
+
var e = C(), r = W(), t = Y(), n = Jo();
|
|
435
|
+
return e({
|
|
436
|
+
target: "Set",
|
|
437
|
+
proto: !0,
|
|
438
|
+
real: !0,
|
|
439
|
+
forced: !0
|
|
440
|
+
}, {
|
|
441
|
+
intersection: function(a) {
|
|
442
|
+
return r(n, this, t(a));
|
|
443
|
+
}
|
|
444
|
+
}), st;
|
|
445
|
+
}
|
|
446
|
+
ea();
|
|
447
|
+
var dt = {}, vt;
|
|
448
|
+
function ra() {
|
|
449
|
+
if (vt)
|
|
450
|
+
return dt;
|
|
451
|
+
vt = 1;
|
|
452
|
+
var e = C(), r = W(), t = Y(), n = pn();
|
|
453
|
+
return e({
|
|
454
|
+
target: "Set",
|
|
455
|
+
proto: !0,
|
|
456
|
+
real: !0,
|
|
457
|
+
forced: !0
|
|
458
|
+
}, {
|
|
459
|
+
isDisjointFrom: function(a) {
|
|
460
|
+
return r(n, this, t(a));
|
|
461
|
+
}
|
|
462
|
+
}), dt;
|
|
463
|
+
}
|
|
464
|
+
ra();
|
|
465
|
+
var pt = {}, mt;
|
|
466
|
+
function ta() {
|
|
467
|
+
if (mt)
|
|
468
|
+
return pt;
|
|
469
|
+
mt = 1;
|
|
470
|
+
var e = C(), r = W(), t = Y(), n = cn();
|
|
471
|
+
return e({
|
|
472
|
+
target: "Set",
|
|
473
|
+
proto: !0,
|
|
474
|
+
real: !0,
|
|
475
|
+
forced: !0
|
|
476
|
+
}, {
|
|
477
|
+
isSubsetOf: function(a) {
|
|
478
|
+
return r(n, this, t(a));
|
|
479
|
+
}
|
|
480
|
+
}), pt;
|
|
481
|
+
}
|
|
482
|
+
ta();
|
|
483
|
+
var ht = {}, gt;
|
|
484
|
+
function na() {
|
|
485
|
+
if (gt)
|
|
486
|
+
return ht;
|
|
487
|
+
gt = 1;
|
|
488
|
+
var e = C(), r = W(), t = Y(), n = sn();
|
|
489
|
+
return e({
|
|
490
|
+
target: "Set",
|
|
491
|
+
proto: !0,
|
|
492
|
+
real: !0,
|
|
493
|
+
forced: !0
|
|
494
|
+
}, {
|
|
495
|
+
isSupersetOf: function(a) {
|
|
496
|
+
return r(n, this, t(a));
|
|
497
|
+
}
|
|
498
|
+
}), ht;
|
|
499
|
+
}
|
|
500
|
+
na();
|
|
501
|
+
var oa = require("../internals/export"), dn = require("../internals/function-uncurry-this"), aa = require("../internals/a-set"), ia = require("../internals/set-iterate"), ua = require("../internals/to-string"), ca = dn([].join), sa = dn([].push);
|
|
502
|
+
oa({
|
|
503
|
+
target: "Set",
|
|
504
|
+
proto: !0,
|
|
505
|
+
real: !0,
|
|
506
|
+
forced: !0
|
|
507
|
+
}, {
|
|
508
|
+
join: function(r) {
|
|
509
|
+
var t = aa(this), n = r === void 0 ? "," : ua(r), o = [];
|
|
510
|
+
return ia(t, function(a) {
|
|
511
|
+
sa(o, a);
|
|
512
|
+
}), ca(o, n);
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
var St = {}, _t;
|
|
516
|
+
function la() {
|
|
517
|
+
if (_t)
|
|
518
|
+
return St;
|
|
519
|
+
_t = 1;
|
|
520
|
+
var e = C(), r = de(), t = D(), n = T, o = N, a = n.Set, u = n.add;
|
|
521
|
+
return e({
|
|
522
|
+
target: "Set",
|
|
523
|
+
proto: !0,
|
|
524
|
+
real: !0,
|
|
525
|
+
forced: !0
|
|
526
|
+
}, {
|
|
527
|
+
map: function(f) {
|
|
528
|
+
var d = t(this), l = r(f, arguments.length > 1 ? arguments[1] : void 0), s = new a();
|
|
529
|
+
return o(d, function(v) {
|
|
530
|
+
u(s, l(v, v, d));
|
|
531
|
+
}), s;
|
|
532
|
+
}
|
|
533
|
+
}), St;
|
|
534
|
+
}
|
|
535
|
+
la();
|
|
536
|
+
var wt = {}, Et;
|
|
537
|
+
function fa() {
|
|
538
|
+
if (Et)
|
|
539
|
+
return wt;
|
|
540
|
+
Et = 1;
|
|
541
|
+
var e = C(), r = en(), t = D(), n = N, o = TypeError;
|
|
542
|
+
return e({
|
|
543
|
+
target: "Set",
|
|
544
|
+
proto: !0,
|
|
545
|
+
real: !0,
|
|
546
|
+
forced: !0
|
|
547
|
+
}, {
|
|
548
|
+
reduce: function(u) {
|
|
549
|
+
var i = t(this), f = arguments.length < 2, d = f ? void 0 : arguments[1];
|
|
550
|
+
if (r(u), n(i, function(l) {
|
|
551
|
+
f ? (f = !1, d = l) : d = u(d, l, l, i);
|
|
552
|
+
}), f)
|
|
553
|
+
throw new o("Reduce of empty set with no initial value");
|
|
554
|
+
return d;
|
|
555
|
+
}
|
|
556
|
+
}), wt;
|
|
557
|
+
}
|
|
558
|
+
fa();
|
|
559
|
+
var yt = {}, bt;
|
|
560
|
+
function da() {
|
|
561
|
+
if (bt)
|
|
562
|
+
return yt;
|
|
563
|
+
bt = 1;
|
|
564
|
+
var e = C(), r = de(), t = D(), n = N;
|
|
565
|
+
return e({
|
|
566
|
+
target: "Set",
|
|
567
|
+
proto: !0,
|
|
568
|
+
real: !0,
|
|
569
|
+
forced: !0
|
|
570
|
+
}, {
|
|
571
|
+
some: function(a) {
|
|
572
|
+
var u = t(this), i = r(a, arguments.length > 1 ? arguments[1] : void 0);
|
|
573
|
+
return n(u, function(f) {
|
|
574
|
+
if (i(f, f, u))
|
|
575
|
+
return !0;
|
|
576
|
+
}, !0) === !0;
|
|
577
|
+
}
|
|
578
|
+
}), yt;
|
|
579
|
+
}
|
|
580
|
+
da();
|
|
581
|
+
var Mt = {}, Rt;
|
|
582
|
+
function va() {
|
|
583
|
+
if (Rt)
|
|
584
|
+
return Mt;
|
|
585
|
+
Rt = 1;
|
|
586
|
+
var e = C(), r = W(), t = Y(), n = ln();
|
|
587
|
+
return e({
|
|
588
|
+
target: "Set",
|
|
589
|
+
proto: !0,
|
|
590
|
+
real: !0,
|
|
591
|
+
forced: !0
|
|
592
|
+
}, {
|
|
593
|
+
symmetricDifference: function(a) {
|
|
594
|
+
return r(n, this, t(a));
|
|
595
|
+
}
|
|
596
|
+
}), Mt;
|
|
597
|
+
}
|
|
598
|
+
va();
|
|
599
|
+
var Ct = {}, It;
|
|
600
|
+
function pa() {
|
|
601
|
+
if (It)
|
|
602
|
+
return Ct;
|
|
603
|
+
It = 1;
|
|
604
|
+
var e = C(), r = W(), t = Y(), n = fn();
|
|
605
|
+
return e({
|
|
606
|
+
target: "Set",
|
|
607
|
+
proto: !0,
|
|
608
|
+
real: !0,
|
|
609
|
+
forced: !0
|
|
610
|
+
}, {
|
|
611
|
+
union: function(a) {
|
|
612
|
+
return r(n, this, t(a));
|
|
613
|
+
}
|
|
614
|
+
}), Ct;
|
|
615
|
+
}
|
|
616
|
+
pa();
|
|
617
|
+
module.exports = function(e) {
|
|
618
|
+
try {
|
|
619
|
+
var r = /* @__PURE__ */ new Set(), t = {
|
|
620
|
+
size: 0,
|
|
621
|
+
has: function() {
|
|
622
|
+
return !0;
|
|
623
|
+
},
|
|
624
|
+
keys: function() {
|
|
625
|
+
return Object.defineProperty({}, "next", {
|
|
626
|
+
get: function() {
|
|
627
|
+
return r.clear(), r.add(4), function() {
|
|
628
|
+
return {
|
|
629
|
+
done: !0
|
|
630
|
+
};
|
|
631
|
+
};
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
}, n = r[e](t);
|
|
636
|
+
return n.size === 1 && n.values().next().value === 4;
|
|
637
|
+
} catch {
|
|
638
|
+
return !1;
|
|
639
|
+
}
|
|
640
|
+
};
|
|
641
|
+
const ma = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
642
|
+
__proto__: null
|
|
643
|
+
}, Symbol.toStringTag, { value: "Module" })), vn = /* @__PURE__ */ Pe(ma);
|
|
644
|
+
var xt;
|
|
645
|
+
function ha() {
|
|
646
|
+
if (xt)
|
|
647
|
+
return Ur;
|
|
648
|
+
xt = 1;
|
|
649
|
+
var e = C(), r = ln(), t = vn, n = pe(), o = !n("symmetricDifference") || !t("symmetricDifference");
|
|
650
|
+
return e({
|
|
651
|
+
target: "Set",
|
|
652
|
+
proto: !0,
|
|
653
|
+
real: !0,
|
|
654
|
+
forced: o
|
|
655
|
+
}, {
|
|
656
|
+
symmetricDifference: r
|
|
657
|
+
}), Ur;
|
|
658
|
+
}
|
|
659
|
+
ha();
|
|
660
|
+
var rr = require("../internals/function-uncurry-this"), we = Set.prototype;
|
|
661
|
+
module.exports = {
|
|
662
|
+
// eslint-disable-next-line es/no-set -- safe
|
|
663
|
+
Set,
|
|
664
|
+
add: rr(we.add),
|
|
665
|
+
has: rr(we.has),
|
|
666
|
+
remove: rr(we.delete),
|
|
667
|
+
proto: we
|
|
668
|
+
};
|
|
669
|
+
const ga = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
670
|
+
__proto__: null
|
|
671
|
+
}, Symbol.toStringTag, { value: "Module" })), T = /* @__PURE__ */ Pe(ga);
|
|
672
|
+
var tr, Ot;
|
|
673
|
+
function D() {
|
|
674
|
+
if (Ot)
|
|
675
|
+
return tr;
|
|
676
|
+
Ot = 1;
|
|
677
|
+
var e = T.has;
|
|
678
|
+
return tr = function(r) {
|
|
679
|
+
return e(r), r;
|
|
680
|
+
}, tr;
|
|
681
|
+
}
|
|
682
|
+
var nr, Dt;
|
|
683
|
+
function pn() {
|
|
684
|
+
if (Dt)
|
|
685
|
+
return nr;
|
|
686
|
+
Dt = 1;
|
|
687
|
+
var e = D(), r = T.has, t = ve(), n = V(), o = N, a = oe(), u = tn();
|
|
688
|
+
return nr = function(f) {
|
|
689
|
+
var d = e(this), l = n(f);
|
|
690
|
+
if (t(d) <= l.size)
|
|
691
|
+
return o(d, function(v) {
|
|
692
|
+
if (l.includes(v))
|
|
693
|
+
return !1;
|
|
694
|
+
}, !0) !== !1;
|
|
695
|
+
var s = l.getIterator();
|
|
696
|
+
return a(s, function(v) {
|
|
697
|
+
if (r(d, v))
|
|
698
|
+
return u(s, "normal", !1);
|
|
699
|
+
}) !== !1;
|
|
700
|
+
}, nr;
|
|
701
|
+
}
|
|
702
|
+
var At;
|
|
703
|
+
function Sa() {
|
|
704
|
+
if (At)
|
|
705
|
+
return Ar;
|
|
706
|
+
At = 1;
|
|
707
|
+
var e = C(), r = pn(), t = pe(), n = !t("isDisjointFrom", function(o) {
|
|
708
|
+
return !o;
|
|
709
|
+
});
|
|
710
|
+
return e({
|
|
711
|
+
target: "Set",
|
|
712
|
+
proto: !0,
|
|
713
|
+
real: !0,
|
|
714
|
+
forced: n
|
|
715
|
+
}, {
|
|
716
|
+
isDisjointFrom: r
|
|
717
|
+
}), Ar;
|
|
718
|
+
}
|
|
719
|
+
Sa();
|
|
720
|
+
var _a = require("../internals/export"), wa = require("../internals/fails"), Ea = require("../internals/set-intersection"), ya = require("../internals/set-method-accept-set-like"), ba = !ya("intersection", function(e) {
|
|
721
|
+
return e.size === 2 && e.has(1) && e.has(2);
|
|
722
|
+
}) || wa(function() {
|
|
723
|
+
return String(Array.from((/* @__PURE__ */ new Set([1, 2, 3])).intersection(/* @__PURE__ */ new Set([3, 2])))) !== "3,2";
|
|
724
|
+
});
|
|
725
|
+
_a({
|
|
726
|
+
target: "Set",
|
|
727
|
+
proto: !0,
|
|
728
|
+
real: !0,
|
|
729
|
+
forced: ba
|
|
730
|
+
}, {
|
|
731
|
+
intersection: Ea
|
|
732
|
+
});
|
|
733
|
+
var Ma = require("../internals/export"), Ra = require("../internals/set-difference"), Ca = require("../internals/fails"), Ia = require("../internals/set-method-accept-set-like"), xa = !Ia("difference", function(e) {
|
|
734
|
+
return e.size === 0;
|
|
735
|
+
}), Oa = xa || Ca(function() {
|
|
736
|
+
var e = {
|
|
737
|
+
size: 1,
|
|
738
|
+
has: function() {
|
|
739
|
+
return !0;
|
|
740
|
+
},
|
|
741
|
+
keys: function() {
|
|
742
|
+
var t = 0;
|
|
743
|
+
return {
|
|
744
|
+
next: function() {
|
|
745
|
+
var n = t++ > 1;
|
|
746
|
+
return r.has(1) && r.clear(), {
|
|
747
|
+
done: n,
|
|
748
|
+
value: 2
|
|
749
|
+
};
|
|
750
|
+
}
|
|
751
|
+
};
|
|
752
|
+
}
|
|
753
|
+
}, r = /* @__PURE__ */ new Set([1, 2, 3, 4]);
|
|
754
|
+
return r.difference(e).size !== 3;
|
|
755
|
+
});
|
|
756
|
+
Ma({
|
|
757
|
+
target: "Set",
|
|
758
|
+
proto: !0,
|
|
759
|
+
real: !0,
|
|
760
|
+
forced: Oa
|
|
761
|
+
}, {
|
|
762
|
+
difference: Ra
|
|
763
|
+
});
|
|
764
|
+
var Da = "Portal", mn = c.forwardRef((e, r) => {
|
|
765
|
+
var i;
|
|
766
|
+
const { container: t, ...n } = e, [o, a] = c.useState(!1);
|
|
767
|
+
go(() => a(!0), []);
|
|
768
|
+
const u = t || o && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
|
|
769
|
+
return u ? Mo.createPortal(/* @__PURE__ */ m(L.div, { ...n, ref: r }), u) : null;
|
|
770
|
+
});
|
|
771
|
+
mn.displayName = Da;
|
|
772
|
+
function hn(e) {
|
|
773
|
+
const r = e + "CollectionProvider", [t, n] = Ae(r), [o, a] = t(
|
|
774
|
+
r,
|
|
775
|
+
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
776
|
+
), u = (p) => {
|
|
777
|
+
const { scope: h, children: _ } = p, b = H.useRef(null), w = H.useRef(/* @__PURE__ */ new Map()).current;
|
|
778
|
+
return /* @__PURE__ */ m(o, { scope: h, itemMap: w, collectionRef: b, children: _ });
|
|
779
|
+
};
|
|
780
|
+
u.displayName = r;
|
|
781
|
+
const i = e + "CollectionSlot", f = vr(i), d = H.forwardRef(
|
|
782
|
+
(p, h) => {
|
|
783
|
+
const { scope: _, children: b } = p, w = a(i, _), E = U(h, w.collectionRef);
|
|
784
|
+
return /* @__PURE__ */ m(f, { ref: E, children: b });
|
|
785
|
+
}
|
|
786
|
+
);
|
|
787
|
+
d.displayName = i;
|
|
788
|
+
const l = e + "CollectionItemSlot", s = "data-radix-collection-item", v = vr(l), g = H.forwardRef(
|
|
789
|
+
(p, h) => {
|
|
790
|
+
const { scope: _, children: b, ...w } = p, E = H.useRef(null), R = U(h, E), O = a(l, _);
|
|
791
|
+
return H.useEffect(() => (O.itemMap.set(E, { ref: E, ...w }), () => void O.itemMap.delete(E))), /* @__PURE__ */ m(v, { [s]: "", ref: R, children: b });
|
|
792
|
+
}
|
|
793
|
+
);
|
|
794
|
+
g.displayName = l;
|
|
795
|
+
function S(p) {
|
|
796
|
+
const h = a(e + "CollectionConsumer", p);
|
|
797
|
+
return H.useCallback(() => {
|
|
798
|
+
const b = h.collectionRef.current;
|
|
799
|
+
if (!b)
|
|
800
|
+
return [];
|
|
801
|
+
const w = Array.from(b.querySelectorAll(`[${s}]`));
|
|
802
|
+
return Array.from(h.itemMap.values()).sort(
|
|
803
|
+
(O, x) => w.indexOf(O.ref.current) - w.indexOf(x.ref.current)
|
|
804
|
+
);
|
|
805
|
+
}, [h.collectionRef, h.itemMap]);
|
|
806
|
+
}
|
|
807
|
+
return [
|
|
808
|
+
{ Provider: u, Slot: d, ItemSlot: g },
|
|
809
|
+
S,
|
|
810
|
+
n
|
|
811
|
+
];
|
|
812
|
+
}
|
|
813
|
+
var Aa = c.createContext(void 0);
|
|
814
|
+
function gn(e) {
|
|
815
|
+
const r = c.useContext(Aa);
|
|
816
|
+
return e || r || "ltr";
|
|
817
|
+
}
|
|
818
|
+
var or = 0;
|
|
819
|
+
function Ta() {
|
|
820
|
+
c.useEffect(() => {
|
|
821
|
+
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
822
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Tt()), document.body.insertAdjacentElement("beforeend", e[1] ?? Tt()), or++, () => {
|
|
823
|
+
or === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((r) => r.remove()), or--;
|
|
824
|
+
};
|
|
825
|
+
}, []);
|
|
826
|
+
}
|
|
827
|
+
function Tt() {
|
|
828
|
+
const e = document.createElement("span");
|
|
829
|
+
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
830
|
+
}
|
|
831
|
+
var ar = "focusScope.autoFocusOnMount", ir = "focusScope.autoFocusOnUnmount", Pt = { bubbles: !1, cancelable: !0 }, Pa = "FocusScope", Sn = c.forwardRef((e, r) => {
|
|
832
|
+
const {
|
|
833
|
+
loop: t = !1,
|
|
834
|
+
trapped: n = !1,
|
|
835
|
+
onMountAutoFocus: o,
|
|
836
|
+
onUnmountAutoFocus: a,
|
|
837
|
+
...u
|
|
838
|
+
} = e, [i, f] = c.useState(null), d = se(o), l = se(a), s = c.useRef(null), v = U(r, (p) => f(p)), g = c.useRef({
|
|
839
|
+
paused: !1,
|
|
840
|
+
pause() {
|
|
841
|
+
this.paused = !0;
|
|
842
|
+
},
|
|
843
|
+
resume() {
|
|
844
|
+
this.paused = !1;
|
|
845
|
+
}
|
|
846
|
+
}).current;
|
|
847
|
+
c.useEffect(() => {
|
|
848
|
+
if (n) {
|
|
849
|
+
let p = function(w) {
|
|
850
|
+
if (g.paused || !i)
|
|
851
|
+
return;
|
|
852
|
+
const E = w.target;
|
|
853
|
+
i.contains(E) ? s.current = E : B(s.current, { select: !0 });
|
|
854
|
+
}, h = function(w) {
|
|
855
|
+
if (g.paused || !i)
|
|
856
|
+
return;
|
|
857
|
+
const E = w.relatedTarget;
|
|
858
|
+
E !== null && (i.contains(E) || B(s.current, { select: !0 }));
|
|
859
|
+
}, _ = function(w) {
|
|
860
|
+
if (document.activeElement === document.body)
|
|
861
|
+
for (const R of w)
|
|
862
|
+
R.removedNodes.length > 0 && B(i);
|
|
863
|
+
};
|
|
864
|
+
document.addEventListener("focusin", p), document.addEventListener("focusout", h);
|
|
865
|
+
const b = new MutationObserver(_);
|
|
866
|
+
return i && b.observe(i, { childList: !0, subtree: !0 }), () => {
|
|
867
|
+
document.removeEventListener("focusin", p), document.removeEventListener("focusout", h), b.disconnect();
|
|
868
|
+
};
|
|
869
|
+
}
|
|
870
|
+
}, [n, i, g.paused]), c.useEffect(() => {
|
|
871
|
+
if (i) {
|
|
872
|
+
Nt.add(g);
|
|
873
|
+
const p = document.activeElement;
|
|
874
|
+
if (!i.contains(p)) {
|
|
875
|
+
const _ = new CustomEvent(ar, Pt);
|
|
876
|
+
i.addEventListener(ar, d), i.dispatchEvent(_), _.defaultPrevented || (ka($a(_n(i)), { select: !0 }), document.activeElement === p && B(i));
|
|
877
|
+
}
|
|
878
|
+
return () => {
|
|
879
|
+
i.removeEventListener(ar, d), setTimeout(() => {
|
|
880
|
+
const _ = new CustomEvent(ir, Pt);
|
|
881
|
+
i.addEventListener(ir, l), i.dispatchEvent(_), _.defaultPrevented || B(p ?? document.body, { select: !0 }), i.removeEventListener(ir, l), Nt.remove(g);
|
|
882
|
+
}, 0);
|
|
883
|
+
};
|
|
884
|
+
}
|
|
885
|
+
}, [i, d, l, g]);
|
|
886
|
+
const S = c.useCallback(
|
|
887
|
+
(p) => {
|
|
888
|
+
if (!t && !n || g.paused)
|
|
889
|
+
return;
|
|
890
|
+
const h = p.key === "Tab" && !p.altKey && !p.ctrlKey && !p.metaKey, _ = document.activeElement;
|
|
891
|
+
if (h && _) {
|
|
892
|
+
const b = p.currentTarget, [w, E] = Na(b);
|
|
893
|
+
w && E ? !p.shiftKey && _ === E ? (p.preventDefault(), t && B(w, { select: !0 })) : p.shiftKey && _ === w && (p.preventDefault(), t && B(E, { select: !0 })) : _ === b && p.preventDefault();
|
|
894
|
+
}
|
|
895
|
+
},
|
|
896
|
+
[t, n, g.paused]
|
|
897
|
+
);
|
|
898
|
+
return /* @__PURE__ */ m(L.div, { tabIndex: -1, ...u, ref: v, onKeyDown: S });
|
|
899
|
+
});
|
|
900
|
+
Sn.displayName = Pa;
|
|
901
|
+
function ka(e, { select: r = !1 } = {}) {
|
|
902
|
+
const t = document.activeElement;
|
|
903
|
+
for (const n of e)
|
|
904
|
+
if (B(n, { select: r }), document.activeElement !== t)
|
|
905
|
+
return;
|
|
906
|
+
}
|
|
907
|
+
function Na(e) {
|
|
908
|
+
const r = _n(e), t = kt(r, e), n = kt(r.reverse(), e);
|
|
909
|
+
return [t, n];
|
|
910
|
+
}
|
|
911
|
+
function _n(e) {
|
|
912
|
+
const r = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
913
|
+
acceptNode: (n) => {
|
|
914
|
+
const o = n.tagName === "INPUT" && n.type === "hidden";
|
|
915
|
+
return n.disabled || n.hidden || o ? NodeFilter.FILTER_SKIP : n.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
916
|
+
}
|
|
917
|
+
});
|
|
918
|
+
for (; t.nextNode(); )
|
|
919
|
+
r.push(t.currentNode);
|
|
920
|
+
return r;
|
|
921
|
+
}
|
|
922
|
+
function kt(e, r) {
|
|
923
|
+
for (const t of e)
|
|
924
|
+
if (!Fa(t, { upTo: r }))
|
|
925
|
+
return t;
|
|
926
|
+
}
|
|
927
|
+
function Fa(e, { upTo: r }) {
|
|
928
|
+
if (getComputedStyle(e).visibility === "hidden")
|
|
929
|
+
return !0;
|
|
930
|
+
for (; e; ) {
|
|
931
|
+
if (r !== void 0 && e === r)
|
|
932
|
+
return !1;
|
|
933
|
+
if (getComputedStyle(e).display === "none")
|
|
934
|
+
return !0;
|
|
935
|
+
e = e.parentElement;
|
|
936
|
+
}
|
|
937
|
+
return !1;
|
|
938
|
+
}
|
|
939
|
+
function qa(e) {
|
|
940
|
+
return e instanceof HTMLInputElement && "select" in e;
|
|
941
|
+
}
|
|
942
|
+
function B(e, { select: r = !1 } = {}) {
|
|
943
|
+
if (e && e.focus) {
|
|
944
|
+
const t = document.activeElement;
|
|
945
|
+
e.focus({ preventScroll: !0 }), e !== t && qa(e) && r && e.select();
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
var Nt = La();
|
|
949
|
+
function La() {
|
|
950
|
+
let e = [];
|
|
951
|
+
return {
|
|
952
|
+
add(r) {
|
|
953
|
+
const t = e[0];
|
|
954
|
+
r !== t && (t == null || t.pause()), e = Ft(e, r), e.unshift(r);
|
|
955
|
+
},
|
|
956
|
+
remove(r) {
|
|
957
|
+
var t;
|
|
958
|
+
e = Ft(e, r), (t = e[0]) == null || t.resume();
|
|
959
|
+
}
|
|
960
|
+
};
|
|
961
|
+
}
|
|
962
|
+
function Ft(e, r) {
|
|
963
|
+
const t = [...e], n = t.indexOf(r);
|
|
964
|
+
return n !== -1 && t.splice(n, 1), t;
|
|
965
|
+
}
|
|
966
|
+
function $a(e) {
|
|
967
|
+
return e.filter((r) => r.tagName !== "A");
|
|
968
|
+
}
|
|
969
|
+
var ur = "rovingFocusGroup.onEntryFocus", Ga = { bubbles: !1, cancelable: !0 }, me = "RovingFocusGroup", [mr, wn, Ka] = hn(me), [Ua, En] = Ae(
|
|
970
|
+
me,
|
|
971
|
+
[Ka]
|
|
972
|
+
), [Wa, ja] = Ua(me), yn = c.forwardRef(
|
|
973
|
+
(e, r) => /* @__PURE__ */ m(mr.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ m(mr.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ m(Ba, { ...e, ref: r }) }) })
|
|
974
|
+
);
|
|
975
|
+
yn.displayName = me;
|
|
976
|
+
var Ba = c.forwardRef((e, r) => {
|
|
977
|
+
const {
|
|
978
|
+
__scopeRovingFocusGroup: t,
|
|
979
|
+
orientation: n,
|
|
980
|
+
loop: o = !1,
|
|
981
|
+
dir: a,
|
|
982
|
+
currentTabStopId: u,
|
|
983
|
+
defaultCurrentTabStopId: i,
|
|
984
|
+
onCurrentTabStopIdChange: f,
|
|
985
|
+
onEntryFocus: d,
|
|
986
|
+
preventScrollOnEntryFocus: l = !1,
|
|
987
|
+
...s
|
|
988
|
+
} = e, v = c.useRef(null), g = U(r, v), S = gn(a), [p, h] = Zt({
|
|
989
|
+
prop: u,
|
|
990
|
+
defaultProp: i ?? null,
|
|
991
|
+
onChange: f,
|
|
992
|
+
caller: me
|
|
993
|
+
}), [_, b] = c.useState(!1), w = se(d), E = wn(t), R = c.useRef(!1), [O, x] = c.useState(0);
|
|
994
|
+
return c.useEffect(() => {
|
|
995
|
+
const I = v.current;
|
|
996
|
+
if (I)
|
|
997
|
+
return I.addEventListener(ur, w), () => I.removeEventListener(ur, w);
|
|
998
|
+
}, [w]), /* @__PURE__ */ m(
|
|
999
|
+
Wa,
|
|
1000
|
+
{
|
|
1001
|
+
scope: t,
|
|
1002
|
+
orientation: n,
|
|
1003
|
+
dir: S,
|
|
1004
|
+
loop: o,
|
|
1005
|
+
currentTabStopId: p,
|
|
1006
|
+
onItemFocus: c.useCallback(
|
|
1007
|
+
(I) => h(I),
|
|
1008
|
+
[h]
|
|
1009
|
+
),
|
|
1010
|
+
onItemShiftTab: c.useCallback(() => b(!0), []),
|
|
1011
|
+
onFocusableItemAdd: c.useCallback(
|
|
1012
|
+
() => x((I) => I + 1),
|
|
1013
|
+
[]
|
|
1014
|
+
),
|
|
1015
|
+
onFocusableItemRemove: c.useCallback(
|
|
1016
|
+
() => x((I) => I - 1),
|
|
1017
|
+
[]
|
|
1018
|
+
),
|
|
1019
|
+
children: /* @__PURE__ */ m(
|
|
1020
|
+
L.div,
|
|
1021
|
+
{
|
|
1022
|
+
tabIndex: _ || O === 0 ? -1 : 0,
|
|
1023
|
+
"data-orientation": n,
|
|
1024
|
+
...s,
|
|
1025
|
+
ref: g,
|
|
1026
|
+
style: { outline: "none", ...e.style },
|
|
1027
|
+
onMouseDown: M(e.onMouseDown, () => {
|
|
1028
|
+
R.current = !0;
|
|
1029
|
+
}),
|
|
1030
|
+
onFocus: M(e.onFocus, (I) => {
|
|
1031
|
+
const $ = !R.current;
|
|
1032
|
+
if (I.target === I.currentTarget && $ && !_) {
|
|
1033
|
+
const z = new CustomEvent(ur, Ga);
|
|
1034
|
+
if (I.currentTarget.dispatchEvent(z), !z.defaultPrevented) {
|
|
1035
|
+
const ae = E().filter((G) => G.focusable), ie = ae.find((G) => G.active), Se = ae.find((G) => G.id === p), $e = [ie, Se, ...ae].filter(
|
|
1036
|
+
Boolean
|
|
1037
|
+
).map((G) => G.ref.current);
|
|
1038
|
+
Rn($e, l);
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
R.current = !1;
|
|
1042
|
+
}),
|
|
1043
|
+
onBlur: M(e.onBlur, () => b(!1))
|
|
1044
|
+
}
|
|
1045
|
+
)
|
|
1046
|
+
}
|
|
1047
|
+
);
|
|
1048
|
+
}), bn = "RovingFocusGroupItem", Mn = c.forwardRef(
|
|
1049
|
+
(e, r) => {
|
|
1050
|
+
const {
|
|
1051
|
+
__scopeRovingFocusGroup: t,
|
|
1052
|
+
focusable: n = !0,
|
|
1053
|
+
active: o = !1,
|
|
1054
|
+
tabStopId: a,
|
|
1055
|
+
children: u,
|
|
1056
|
+
...i
|
|
1057
|
+
} = e, f = pr(), d = a || f, l = ja(bn, t), s = l.currentTabStopId === d, v = wn(t), { onFocusableItemAdd: g, onFocusableItemRemove: S, currentTabStopId: p } = l;
|
|
1058
|
+
return c.useEffect(() => {
|
|
1059
|
+
if (n)
|
|
1060
|
+
return g(), () => S();
|
|
1061
|
+
}, [n, g, S]), /* @__PURE__ */ m(
|
|
1062
|
+
mr.ItemSlot,
|
|
1063
|
+
{
|
|
1064
|
+
scope: t,
|
|
1065
|
+
id: d,
|
|
1066
|
+
focusable: n,
|
|
1067
|
+
active: o,
|
|
1068
|
+
children: /* @__PURE__ */ m(
|
|
1069
|
+
L.span,
|
|
1070
|
+
{
|
|
1071
|
+
tabIndex: s ? 0 : -1,
|
|
1072
|
+
"data-orientation": l.orientation,
|
|
1073
|
+
...i,
|
|
1074
|
+
ref: r,
|
|
1075
|
+
onMouseDown: M(e.onMouseDown, (h) => {
|
|
1076
|
+
n ? l.onItemFocus(d) : h.preventDefault();
|
|
1077
|
+
}),
|
|
1078
|
+
onFocus: M(e.onFocus, () => l.onItemFocus(d)),
|
|
1079
|
+
onKeyDown: M(e.onKeyDown, (h) => {
|
|
1080
|
+
if (h.key === "Tab" && h.shiftKey) {
|
|
1081
|
+
l.onItemShiftTab();
|
|
1082
|
+
return;
|
|
1083
|
+
}
|
|
1084
|
+
if (h.target !== h.currentTarget)
|
|
1085
|
+
return;
|
|
1086
|
+
const _ = Va(h, l.orientation, l.dir);
|
|
1087
|
+
if (_ !== void 0) {
|
|
1088
|
+
if (h.metaKey || h.ctrlKey || h.altKey || h.shiftKey)
|
|
1089
|
+
return;
|
|
1090
|
+
h.preventDefault();
|
|
1091
|
+
let w = v().filter((E) => E.focusable).map((E) => E.ref.current);
|
|
1092
|
+
if (_ === "last")
|
|
1093
|
+
w.reverse();
|
|
1094
|
+
else if (_ === "prev" || _ === "next") {
|
|
1095
|
+
_ === "prev" && w.reverse();
|
|
1096
|
+
const E = w.indexOf(h.currentTarget);
|
|
1097
|
+
w = l.loop ? Ya(w, E + 1) : w.slice(E + 1);
|
|
1098
|
+
}
|
|
1099
|
+
setTimeout(() => Rn(w));
|
|
1100
|
+
}
|
|
1101
|
+
}),
|
|
1102
|
+
children: typeof u == "function" ? u({ isCurrentTabStop: s, hasTabStop: p != null }) : u
|
|
1103
|
+
}
|
|
1104
|
+
)
|
|
1105
|
+
}
|
|
1106
|
+
);
|
|
1107
|
+
}
|
|
1108
|
+
);
|
|
1109
|
+
Mn.displayName = bn;
|
|
1110
|
+
var za = {
|
|
1111
|
+
ArrowLeft: "prev",
|
|
1112
|
+
ArrowUp: "prev",
|
|
1113
|
+
ArrowRight: "next",
|
|
1114
|
+
ArrowDown: "next",
|
|
1115
|
+
PageUp: "first",
|
|
1116
|
+
Home: "first",
|
|
1117
|
+
PageDown: "last",
|
|
1118
|
+
End: "last"
|
|
1119
|
+
};
|
|
1120
|
+
function Ha(e, r) {
|
|
1121
|
+
return r !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
1122
|
+
}
|
|
1123
|
+
function Va(e, r, t) {
|
|
1124
|
+
const n = Ha(e.key, t);
|
|
1125
|
+
if (!(r === "vertical" && ["ArrowLeft", "ArrowRight"].includes(n)) && !(r === "horizontal" && ["ArrowUp", "ArrowDown"].includes(n)))
|
|
1126
|
+
return za[n];
|
|
1127
|
+
}
|
|
1128
|
+
function Rn(e, r = !1) {
|
|
1129
|
+
const t = document.activeElement;
|
|
1130
|
+
for (const n of e)
|
|
1131
|
+
if (n === t || (n.focus({ preventScroll: r }), document.activeElement !== t))
|
|
1132
|
+
return;
|
|
1133
|
+
}
|
|
1134
|
+
function Ya(e, r) {
|
|
1135
|
+
return e.map((t, n) => e[(r + n) % e.length]);
|
|
1136
|
+
}
|
|
1137
|
+
var Xa = yn, Za = Mn, qt = {}, Lt = {}, $t;
|
|
1138
|
+
function Qa() {
|
|
1139
|
+
if ($t)
|
|
1140
|
+
return Lt;
|
|
1141
|
+
$t = 1;
|
|
1142
|
+
var e = C(), r = wr(), t = ke, n = t.get, o = t.has, a = t.set;
|
|
1143
|
+
return e({
|
|
1144
|
+
target: "WeakMap",
|
|
1145
|
+
proto: !0,
|
|
1146
|
+
real: !0,
|
|
1147
|
+
forced: !0
|
|
1148
|
+
}, {
|
|
1149
|
+
emplace: function(i, f) {
|
|
1150
|
+
var d = r(this), l, s;
|
|
1151
|
+
return o(d, i) ? (l = n(d, i), "update" in f && (l = f.update(l, i, d), a(d, i, l)), l) : (s = f.insert(i, d), a(d, i, s), s);
|
|
1152
|
+
}
|
|
1153
|
+
}), Lt;
|
|
1154
|
+
}
|
|
1155
|
+
Qa();
|
|
1156
|
+
var Gt = {}, Kt;
|
|
1157
|
+
function Ja() {
|
|
1158
|
+
if (Kt)
|
|
1159
|
+
return Gt;
|
|
1160
|
+
Kt = 1;
|
|
1161
|
+
var e = C(), r = wr(), t = ke, n = Ao(), o = t.get, a = t.has, u = t.set;
|
|
1162
|
+
return e({
|
|
1163
|
+
target: "WeakMap",
|
|
1164
|
+
proto: !0,
|
|
1165
|
+
real: !0,
|
|
1166
|
+
forced: n
|
|
1167
|
+
}, {
|
|
1168
|
+
getOrInsert: function(f, d) {
|
|
1169
|
+
return a(r(this), f) ? o(this, f) : (u(this, f, d), d);
|
|
1170
|
+
}
|
|
1171
|
+
}), Gt;
|
|
1172
|
+
}
|
|
1173
|
+
Ja();
|
|
1174
|
+
var ei = require("../internals/export"), ri = require("../internals/a-callable"), ti = require("../internals/a-weak-map"), ni = require("../internals/a-weak-key"), _r = require("../internals/weak-map-helpers"), oi = require("../internals/is-pure"), ai = _r.get, ii = _r.has, ui = _r.set, ci = oi || !function() {
|
|
1175
|
+
try {
|
|
1176
|
+
WeakMap.prototype.getOrInsertComputed && (/* @__PURE__ */ new WeakMap()).getOrInsertComputed(1, function() {
|
|
1177
|
+
throw 1;
|
|
1178
|
+
});
|
|
1179
|
+
} catch (e) {
|
|
1180
|
+
return e instanceof TypeError;
|
|
1181
|
+
}
|
|
1182
|
+
}();
|
|
1183
|
+
ei({
|
|
1184
|
+
target: "WeakMap",
|
|
1185
|
+
proto: !0,
|
|
1186
|
+
real: !0,
|
|
1187
|
+
forced: ci
|
|
1188
|
+
}, {
|
|
1189
|
+
getOrInsertComputed: function(r, t) {
|
|
1190
|
+
if (ti(this), ni(r), ri(t), ii(this, r))
|
|
1191
|
+
return ai(this, r);
|
|
1192
|
+
var n = t(r);
|
|
1193
|
+
return ui(this, r, n), n;
|
|
1194
|
+
}
|
|
1195
|
+
});
|
|
1196
|
+
var Ee = require("../internals/function-uncurry-this"), ye = WeakMap.prototype;
|
|
1197
|
+
module.exports = {
|
|
1198
|
+
// eslint-disable-next-line es/no-weak-map -- safe
|
|
1199
|
+
WeakMap,
|
|
1200
|
+
set: Ee(ye.set),
|
|
1201
|
+
get: Ee(ye.get),
|
|
1202
|
+
has: Ee(ye.has),
|
|
1203
|
+
remove: Ee(ye.delete)
|
|
1204
|
+
};
|
|
1205
|
+
const si = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1206
|
+
__proto__: null
|
|
1207
|
+
}, Symbol.toStringTag, { value: "Module" })), ke = /* @__PURE__ */ Pe(si);
|
|
1208
|
+
var cr, Ut;
|
|
1209
|
+
function wr() {
|
|
1210
|
+
if (Ut)
|
|
1211
|
+
return cr;
|
|
1212
|
+
Ut = 1;
|
|
1213
|
+
var e = ke.has;
|
|
1214
|
+
return cr = function(r) {
|
|
1215
|
+
return e(r), r;
|
|
1216
|
+
}, cr;
|
|
1217
|
+
}
|
|
1218
|
+
var Wt;
|
|
1219
|
+
function li() {
|
|
1220
|
+
if (Wt)
|
|
1221
|
+
return qt;
|
|
1222
|
+
Wt = 1;
|
|
1223
|
+
var e = C(), r = wr(), t = ke.remove;
|
|
1224
|
+
return e({
|
|
1225
|
+
target: "WeakMap",
|
|
1226
|
+
proto: !0,
|
|
1227
|
+
real: !0,
|
|
1228
|
+
forced: !0
|
|
1229
|
+
}, {
|
|
1230
|
+
deleteAll: function() {
|
|
1231
|
+
for (var o = r(this), a = !0, u, i = 0, f = arguments.length; i < f; i++)
|
|
1232
|
+
u = t(o, arguments[i]), a = a && u;
|
|
1233
|
+
return !!a;
|
|
1234
|
+
}
|
|
1235
|
+
}), qt;
|
|
1236
|
+
}
|
|
1237
|
+
li();
|
|
1238
|
+
var fi = function(e) {
|
|
1239
|
+
if (typeof document > "u")
|
|
1240
|
+
return null;
|
|
1241
|
+
var r = Array.isArray(e) ? e[0] : e;
|
|
1242
|
+
return r.ownerDocument.body;
|
|
1243
|
+
}, ee = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap(), Me = {}, sr = 0, Cn = function(e) {
|
|
1244
|
+
return e && (e.host || Cn(e.parentNode));
|
|
1245
|
+
}, di = function(e, r) {
|
|
1246
|
+
return r.map(function(t) {
|
|
1247
|
+
if (e.contains(t))
|
|
1248
|
+
return t;
|
|
1249
|
+
var n = Cn(t);
|
|
1250
|
+
return n && e.contains(n) ? n : (console.error("aria-hidden", t, "in not contained inside", e, ". Doing nothing"), null);
|
|
1251
|
+
}).filter(function(t) {
|
|
1252
|
+
return !!t;
|
|
1253
|
+
});
|
|
1254
|
+
}, vi = function(e, r, t, n) {
|
|
1255
|
+
var o = di(r, Array.isArray(e) ? e : [e]);
|
|
1256
|
+
Me[t] || (Me[t] = /* @__PURE__ */ new WeakMap());
|
|
1257
|
+
var a = Me[t], u = [], i = /* @__PURE__ */ new Set(), f = new Set(o), d = function(s) {
|
|
1258
|
+
!s || i.has(s) || (i.add(s), d(s.parentNode));
|
|
1259
|
+
};
|
|
1260
|
+
o.forEach(d);
|
|
1261
|
+
var l = function(s) {
|
|
1262
|
+
!s || f.has(s) || Array.prototype.forEach.call(s.children, function(v) {
|
|
1263
|
+
if (i.has(v))
|
|
1264
|
+
l(v);
|
|
1265
|
+
else
|
|
1266
|
+
try {
|
|
1267
|
+
var g = v.getAttribute(n), S = g !== null && g !== "false", p = (ee.get(v) || 0) + 1, h = (a.get(v) || 0) + 1;
|
|
1268
|
+
ee.set(v, p), a.set(v, h), u.push(v), p === 1 && S && be.set(v, !0), h === 1 && v.setAttribute(t, "true"), S || v.setAttribute(n, "true");
|
|
1269
|
+
} catch (_) {
|
|
1270
|
+
console.error("aria-hidden: cannot operate on ", v, _);
|
|
1271
|
+
}
|
|
1272
|
+
});
|
|
1273
|
+
};
|
|
1274
|
+
return l(r), i.clear(), sr++, function() {
|
|
1275
|
+
u.forEach(function(s) {
|
|
1276
|
+
var v = ee.get(s) - 1, g = a.get(s) - 1;
|
|
1277
|
+
ee.set(s, v), a.set(s, g), v || (be.has(s) || s.removeAttribute(n), be.delete(s)), g || s.removeAttribute(t);
|
|
1278
|
+
}), sr--, sr || (ee = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap(), Me = {});
|
|
1279
|
+
};
|
|
1280
|
+
}, pi = function(e, r, t) {
|
|
1281
|
+
t === void 0 && (t = "data-aria-hidden");
|
|
1282
|
+
var n = Array.from(Array.isArray(e) ? e : [e]), o = r || fi(e);
|
|
1283
|
+
return o ? (n.push.apply(n, Array.from(o.querySelectorAll("[aria-live], script"))), vi(n, o, t, "aria-hidden")) : function() {
|
|
1284
|
+
return null;
|
|
1285
|
+
};
|
|
1286
|
+
}, q = function() {
|
|
1287
|
+
return q = Object.assign || function(r) {
|
|
1288
|
+
for (var t, n = 1, o = arguments.length; n < o; n++) {
|
|
1289
|
+
t = arguments[n];
|
|
1290
|
+
for (var a in t)
|
|
1291
|
+
Object.prototype.hasOwnProperty.call(t, a) && (r[a] = t[a]);
|
|
1292
|
+
}
|
|
1293
|
+
return r;
|
|
1294
|
+
}, q.apply(this, arguments);
|
|
1295
|
+
};
|
|
1296
|
+
function In(e, r) {
|
|
1297
|
+
var t = {};
|
|
1298
|
+
for (var n in e)
|
|
1299
|
+
Object.prototype.hasOwnProperty.call(e, n) && r.indexOf(n) < 0 && (t[n] = e[n]);
|
|
1300
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
1301
|
+
for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
|
|
1302
|
+
r.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (t[n[o]] = e[n[o]]);
|
|
1303
|
+
return t;
|
|
1304
|
+
}
|
|
1305
|
+
function mi(e, r, t) {
|
|
1306
|
+
if (t || arguments.length === 2)
|
|
1307
|
+
for (var n = 0, o = r.length, a; n < o; n++)
|
|
1308
|
+
(a || !(n in r)) && (a || (a = Array.prototype.slice.call(r, 0, n)), a[n] = r[n]);
|
|
1309
|
+
return e.concat(a || Array.prototype.slice.call(r));
|
|
1310
|
+
}
|
|
1311
|
+
var Ie = "right-scroll-bar-position", xe = "width-before-scroll-bar", hi = "with-scroll-bars-hidden", gi = "--removed-body-scroll-bar-size";
|
|
1312
|
+
function lr(e, r) {
|
|
1313
|
+
return typeof e == "function" ? e(r) : e && (e.current = r), e;
|
|
1314
|
+
}
|
|
1315
|
+
function Si(e, r) {
|
|
1316
|
+
var t = ho(function() {
|
|
1317
|
+
return {
|
|
1318
|
+
// value
|
|
1319
|
+
value: e,
|
|
1320
|
+
// last callback
|
|
1321
|
+
callback: r,
|
|
1322
|
+
// "memoized" public interface
|
|
1323
|
+
facade: {
|
|
1324
|
+
get current() {
|
|
1325
|
+
return t.value;
|
|
1326
|
+
},
|
|
1327
|
+
set current(n) {
|
|
1328
|
+
var o = t.value;
|
|
1329
|
+
o !== n && (t.value = n, t.callback(n, o));
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
};
|
|
1333
|
+
})[0];
|
|
1334
|
+
return t.callback = r, t.facade;
|
|
1335
|
+
}
|
|
1336
|
+
var _i = typeof window < "u" ? c.useLayoutEffect : c.useEffect, jt = /* @__PURE__ */ new WeakMap();
|
|
1337
|
+
function wi(e, r) {
|
|
1338
|
+
var t = Si(r || null, function(n) {
|
|
1339
|
+
return e.forEach(function(o) {
|
|
1340
|
+
return lr(o, n);
|
|
1341
|
+
});
|
|
1342
|
+
});
|
|
1343
|
+
return _i(function() {
|
|
1344
|
+
var n = jt.get(t);
|
|
1345
|
+
if (n) {
|
|
1346
|
+
var o = new Set(n), a = new Set(e), u = t.current;
|
|
1347
|
+
o.forEach(function(i) {
|
|
1348
|
+
a.has(i) || lr(i, null);
|
|
1349
|
+
}), a.forEach(function(i) {
|
|
1350
|
+
o.has(i) || lr(i, u);
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1353
|
+
jt.set(t, e);
|
|
1354
|
+
}, [e]), t;
|
|
1355
|
+
}
|
|
1356
|
+
function Ei(e) {
|
|
1357
|
+
return e;
|
|
1358
|
+
}
|
|
1359
|
+
function yi(e, r) {
|
|
1360
|
+
r === void 0 && (r = Ei);
|
|
1361
|
+
var t = [], n = !1, o = {
|
|
1362
|
+
read: function() {
|
|
1363
|
+
if (n)
|
|
1364
|
+
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
1365
|
+
return t.length ? t[t.length - 1] : e;
|
|
1366
|
+
},
|
|
1367
|
+
useMedium: function(a) {
|
|
1368
|
+
var u = r(a, n);
|
|
1369
|
+
return t.push(u), function() {
|
|
1370
|
+
t = t.filter(function(i) {
|
|
1371
|
+
return i !== u;
|
|
1372
|
+
});
|
|
1373
|
+
};
|
|
1374
|
+
},
|
|
1375
|
+
assignSyncMedium: function(a) {
|
|
1376
|
+
for (n = !0; t.length; ) {
|
|
1377
|
+
var u = t;
|
|
1378
|
+
t = [], u.forEach(a);
|
|
1379
|
+
}
|
|
1380
|
+
t = {
|
|
1381
|
+
push: function(i) {
|
|
1382
|
+
return a(i);
|
|
1383
|
+
},
|
|
1384
|
+
filter: function() {
|
|
1385
|
+
return t;
|
|
1386
|
+
}
|
|
1387
|
+
};
|
|
1388
|
+
},
|
|
1389
|
+
assignMedium: function(a) {
|
|
1390
|
+
n = !0;
|
|
1391
|
+
var u = [];
|
|
1392
|
+
if (t.length) {
|
|
1393
|
+
var i = t;
|
|
1394
|
+
t = [], i.forEach(a), u = t;
|
|
1395
|
+
}
|
|
1396
|
+
var f = function() {
|
|
1397
|
+
var l = u;
|
|
1398
|
+
u = [], l.forEach(a);
|
|
1399
|
+
}, d = function() {
|
|
1400
|
+
return Promise.resolve().then(f);
|
|
1401
|
+
};
|
|
1402
|
+
d(), t = {
|
|
1403
|
+
push: function(l) {
|
|
1404
|
+
u.push(l), d();
|
|
1405
|
+
},
|
|
1406
|
+
filter: function(l) {
|
|
1407
|
+
return u = u.filter(l), t;
|
|
1408
|
+
}
|
|
1409
|
+
};
|
|
1410
|
+
}
|
|
1411
|
+
};
|
|
1412
|
+
return o;
|
|
1413
|
+
}
|
|
1414
|
+
function bi(e) {
|
|
1415
|
+
e === void 0 && (e = {});
|
|
1416
|
+
var r = yi(null);
|
|
1417
|
+
return r.options = q({
|
|
1418
|
+
async: !0,
|
|
1419
|
+
ssr: !1
|
|
1420
|
+
}, e), r;
|
|
1421
|
+
}
|
|
1422
|
+
var xn = function(e) {
|
|
1423
|
+
var r = e.sideCar, t = In(e, ["sideCar"]);
|
|
1424
|
+
if (!r)
|
|
1425
|
+
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
1426
|
+
var n = r.read();
|
|
1427
|
+
if (!n)
|
|
1428
|
+
throw new Error("Sidecar medium not found");
|
|
1429
|
+
return c.createElement(n, q({}, t));
|
|
1430
|
+
};
|
|
1431
|
+
xn.isSideCarExport = !0;
|
|
1432
|
+
function Mi(e, r) {
|
|
1433
|
+
return e.useMedium(r), xn;
|
|
1434
|
+
}
|
|
1435
|
+
var On = bi(), fr = function() {
|
|
1436
|
+
}, Ne = c.forwardRef(function(e, r) {
|
|
1437
|
+
var t = c.useRef(null), n = c.useState({
|
|
1438
|
+
onScrollCapture: fr,
|
|
1439
|
+
onWheelCapture: fr,
|
|
1440
|
+
onTouchMoveCapture: fr
|
|
1441
|
+
}), o = n[0], a = n[1], u = e.forwardProps, i = e.children, f = e.className, d = e.removeScrollBar, l = e.enabled, s = e.shards, v = e.sideCar, g = e.noRelative, S = e.noIsolation, p = e.inert, h = e.allowPinchZoom, _ = e.as, b = _ === void 0 ? "div" : _, w = e.gapMode, E = In(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), R = v, O = wi([t, r]), x = q(q({}, E), o);
|
|
1442
|
+
return c.createElement(c.Fragment, null, l && c.createElement(R, {
|
|
1443
|
+
sideCar: On,
|
|
1444
|
+
removeScrollBar: d,
|
|
1445
|
+
shards: s,
|
|
1446
|
+
noRelative: g,
|
|
1447
|
+
noIsolation: S,
|
|
1448
|
+
inert: p,
|
|
1449
|
+
setCallbacks: a,
|
|
1450
|
+
allowPinchZoom: !!h,
|
|
1451
|
+
lockRef: t,
|
|
1452
|
+
gapMode: w
|
|
1453
|
+
}), u ? c.cloneElement(c.Children.only(i), q(q({}, x), {
|
|
1454
|
+
ref: O
|
|
1455
|
+
})) : c.createElement(b, q({}, x, {
|
|
1456
|
+
className: f,
|
|
1457
|
+
ref: O
|
|
1458
|
+
}), i));
|
|
1459
|
+
});
|
|
1460
|
+
Ne.defaultProps = {
|
|
1461
|
+
enabled: !0,
|
|
1462
|
+
removeScrollBar: !0,
|
|
1463
|
+
inert: !1
|
|
1464
|
+
};
|
|
1465
|
+
Ne.classNames = {
|
|
1466
|
+
fullWidth: xe,
|
|
1467
|
+
zeroRight: Ie
|
|
1468
|
+
};
|
|
1469
|
+
var Bt, Ri = function() {
|
|
1470
|
+
if (Bt)
|
|
1471
|
+
return Bt;
|
|
1472
|
+
if (typeof __webpack_nonce__ < "u")
|
|
1473
|
+
return __webpack_nonce__;
|
|
1474
|
+
};
|
|
1475
|
+
function Ci() {
|
|
1476
|
+
if (!document)
|
|
1477
|
+
return null;
|
|
1478
|
+
var e = document.createElement("style");
|
|
1479
|
+
e.type = "text/css";
|
|
1480
|
+
var r = Ri();
|
|
1481
|
+
return r && e.setAttribute("nonce", r), e;
|
|
1482
|
+
}
|
|
1483
|
+
function Ii(e, r) {
|
|
1484
|
+
e.styleSheet ? e.styleSheet.cssText = r : e.appendChild(document.createTextNode(r));
|
|
1485
|
+
}
|
|
1486
|
+
function xi(e) {
|
|
1487
|
+
var r = document.head || document.getElementsByTagName("head")[0];
|
|
1488
|
+
r.appendChild(e);
|
|
1489
|
+
}
|
|
1490
|
+
var Oi = function() {
|
|
1491
|
+
var e = 0, r = null;
|
|
1492
|
+
return {
|
|
1493
|
+
add: function(t) {
|
|
1494
|
+
e == 0 && (r = Ci()) && (Ii(r, t), xi(r)), e++;
|
|
1495
|
+
},
|
|
1496
|
+
remove: function() {
|
|
1497
|
+
e--, !e && r && (r.parentNode && r.parentNode.removeChild(r), r = null);
|
|
1498
|
+
}
|
|
1499
|
+
};
|
|
1500
|
+
}, Di = function() {
|
|
1501
|
+
var e = Oi();
|
|
1502
|
+
return function(r, t) {
|
|
1503
|
+
c.useEffect(function() {
|
|
1504
|
+
return e.add(r), function() {
|
|
1505
|
+
e.remove();
|
|
1506
|
+
};
|
|
1507
|
+
}, [r && t]);
|
|
1508
|
+
};
|
|
1509
|
+
}, Dn = function() {
|
|
1510
|
+
var e = Di(), r = function(t) {
|
|
1511
|
+
var n = t.styles, o = t.dynamic;
|
|
1512
|
+
return e(n, o), null;
|
|
1513
|
+
};
|
|
1514
|
+
return r;
|
|
1515
|
+
}, Ai = {
|
|
1516
|
+
left: 0,
|
|
1517
|
+
top: 0,
|
|
1518
|
+
right: 0,
|
|
1519
|
+
gap: 0
|
|
1520
|
+
}, dr = function(e) {
|
|
1521
|
+
return parseInt(e || "", 10) || 0;
|
|
1522
|
+
}, Ti = function(e) {
|
|
1523
|
+
var r = window.getComputedStyle(document.body), t = r[e === "padding" ? "paddingLeft" : "marginLeft"], n = r[e === "padding" ? "paddingTop" : "marginTop"], o = r[e === "padding" ? "paddingRight" : "marginRight"];
|
|
1524
|
+
return [dr(t), dr(n), dr(o)];
|
|
1525
|
+
}, Pi = function(e) {
|
|
1526
|
+
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
1527
|
+
return Ai;
|
|
1528
|
+
var r = Ti(e), t = document.documentElement.clientWidth, n = window.innerWidth;
|
|
1529
|
+
return {
|
|
1530
|
+
left: r[0],
|
|
1531
|
+
top: r[1],
|
|
1532
|
+
right: r[2],
|
|
1533
|
+
gap: Math.max(0, n - t + r[2] - r[0])
|
|
1534
|
+
};
|
|
1535
|
+
}, ki = Dn(), ne = "data-scroll-locked", Ni = function(e, r, t, n) {
|
|
1536
|
+
var o = e.left, a = e.top, u = e.right, i = e.gap;
|
|
1537
|
+
return t === void 0 && (t = "margin"), `
|
|
1538
|
+
.`.concat(hi, ` {
|
|
1539
|
+
overflow: hidden `).concat(n, `;
|
|
1540
|
+
padding-right: `).concat(i, "px ").concat(n, `;
|
|
1541
|
+
}
|
|
1542
|
+
body[`).concat(ne, `] {
|
|
1543
|
+
overflow: hidden `).concat(n, `;
|
|
1544
|
+
overscroll-behavior: contain;
|
|
1545
|
+
`).concat([r && "position: relative ".concat(n, ";"), t === "margin" && `
|
|
1546
|
+
padding-left: `.concat(o, `px;
|
|
1547
|
+
padding-top: `).concat(a, `px;
|
|
1548
|
+
padding-right: `).concat(u, `px;
|
|
1549
|
+
margin-left:0;
|
|
1550
|
+
margin-top:0;
|
|
1551
|
+
margin-right: `).concat(i, "px ").concat(n, `;
|
|
1552
|
+
`), t === "padding" && "padding-right: ".concat(i, "px ").concat(n, ";")].filter(Boolean).join(""), `
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
.`).concat(Ie, ` {
|
|
1556
|
+
right: `).concat(i, "px ").concat(n, `;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
.`).concat(xe, ` {
|
|
1560
|
+
margin-right: `).concat(i, "px ").concat(n, `;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
.`).concat(Ie, " .").concat(Ie, ` {
|
|
1564
|
+
right: 0 `).concat(n, `;
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
.`).concat(xe, " .").concat(xe, ` {
|
|
1568
|
+
margin-right: 0 `).concat(n, `;
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
body[`).concat(ne, `] {
|
|
1572
|
+
`).concat(gi, ": ").concat(i, `px;
|
|
1573
|
+
}
|
|
1574
|
+
`);
|
|
1575
|
+
}, zt = function() {
|
|
1576
|
+
var e = parseInt(document.body.getAttribute(ne) || "0", 10);
|
|
1577
|
+
return isFinite(e) ? e : 0;
|
|
1578
|
+
}, Fi = function() {
|
|
1579
|
+
c.useEffect(function() {
|
|
1580
|
+
return document.body.setAttribute(ne, (zt() + 1).toString()), function() {
|
|
1581
|
+
var e = zt() - 1;
|
|
1582
|
+
e <= 0 ? document.body.removeAttribute(ne) : document.body.setAttribute(ne, e.toString());
|
|
1583
|
+
};
|
|
1584
|
+
}, []);
|
|
1585
|
+
}, qi = function(e) {
|
|
1586
|
+
var r = e.noRelative, t = e.noImportant, n = e.gapMode, o = n === void 0 ? "margin" : n;
|
|
1587
|
+
Fi();
|
|
1588
|
+
var a = c.useMemo(function() {
|
|
1589
|
+
return Pi(o);
|
|
1590
|
+
}, [o]);
|
|
1591
|
+
return c.createElement(ki, {
|
|
1592
|
+
styles: Ni(a, !r, o, t ? "" : "!important")
|
|
1593
|
+
});
|
|
1594
|
+
}, hr = !1;
|
|
1595
|
+
if (typeof window < "u")
|
|
1596
|
+
try {
|
|
1597
|
+
var Re = Object.defineProperty({}, "passive", {
|
|
1598
|
+
get: function() {
|
|
1599
|
+
return hr = !0, !0;
|
|
1600
|
+
}
|
|
1601
|
+
});
|
|
1602
|
+
window.addEventListener("test", Re, Re), window.removeEventListener("test", Re, Re);
|
|
1603
|
+
} catch {
|
|
1604
|
+
hr = !1;
|
|
1605
|
+
}
|
|
1606
|
+
var re = hr ? {
|
|
1607
|
+
passive: !1
|
|
1608
|
+
} : !1, Li = function(e) {
|
|
1609
|
+
return e.tagName === "TEXTAREA";
|
|
1610
|
+
}, An = function(e, r) {
|
|
1611
|
+
if (!(e instanceof Element))
|
|
1612
|
+
return !1;
|
|
1613
|
+
var t = window.getComputedStyle(e);
|
|
1614
|
+
return (
|
|
1615
|
+
// not-not-scrollable
|
|
1616
|
+
t[r] !== "hidden" && // contains scroll inside self
|
|
1617
|
+
!(t.overflowY === t.overflowX && !Li(e) && t[r] === "visible")
|
|
1618
|
+
);
|
|
1619
|
+
}, $i = function(e) {
|
|
1620
|
+
return An(e, "overflowY");
|
|
1621
|
+
}, Gi = function(e) {
|
|
1622
|
+
return An(e, "overflowX");
|
|
1623
|
+
}, Ht = function(e, r) {
|
|
1624
|
+
var t = r.ownerDocument, n = r;
|
|
1625
|
+
do {
|
|
1626
|
+
typeof ShadowRoot < "u" && n instanceof ShadowRoot && (n = n.host);
|
|
1627
|
+
var o = Tn(e, n);
|
|
1628
|
+
if (o) {
|
|
1629
|
+
var a = Pn(e, n), u = a[1], i = a[2];
|
|
1630
|
+
if (u > i)
|
|
1631
|
+
return !0;
|
|
1632
|
+
}
|
|
1633
|
+
n = n.parentNode;
|
|
1634
|
+
} while (n && n !== t.body);
|
|
1635
|
+
return !1;
|
|
1636
|
+
}, Ki = function(e) {
|
|
1637
|
+
var r = e.scrollTop, t = e.scrollHeight, n = e.clientHeight;
|
|
1638
|
+
return [r, t, n];
|
|
1639
|
+
}, Ui = function(e) {
|
|
1640
|
+
var r = e.scrollLeft, t = e.scrollWidth, n = e.clientWidth;
|
|
1641
|
+
return [r, t, n];
|
|
1642
|
+
}, Tn = function(e, r) {
|
|
1643
|
+
return e === "v" ? $i(r) : Gi(r);
|
|
1644
|
+
}, Pn = function(e, r) {
|
|
1645
|
+
return e === "v" ? Ki(r) : Ui(r);
|
|
1646
|
+
}, Wi = function(e, r) {
|
|
1647
|
+
return e === "h" && r === "rtl" ? -1 : 1;
|
|
1648
|
+
}, ji = function(e, r, t, n, o) {
|
|
1649
|
+
var a = Wi(e, window.getComputedStyle(r).direction), u = a * n, i = t.target, f = r.contains(i), d = !1, l = u > 0, s = 0, v = 0;
|
|
1650
|
+
do {
|
|
1651
|
+
if (!i)
|
|
1652
|
+
break;
|
|
1653
|
+
var g = Pn(e, i), S = g[0], p = g[1], h = g[2], _ = p - h - a * S;
|
|
1654
|
+
(S || _) && Tn(e, i) && (s += _, v += S);
|
|
1655
|
+
var b = i.parentNode;
|
|
1656
|
+
i = b && b.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? b.host : b;
|
|
1657
|
+
} while (
|
|
1658
|
+
// portaled content
|
|
1659
|
+
!f && i !== document.body || // self content
|
|
1660
|
+
f && (r.contains(i) || r === i)
|
|
1661
|
+
);
|
|
1662
|
+
return (l && (o && Math.abs(s) < 1 || !o && u > s) || !l && (o && Math.abs(v) < 1 || !o && -u > v)) && (d = !0), d;
|
|
1663
|
+
}, Ce = function(e) {
|
|
1664
|
+
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
1665
|
+
}, Vt = function(e) {
|
|
1666
|
+
return [e.deltaX, e.deltaY];
|
|
1667
|
+
}, Yt = function(e) {
|
|
1668
|
+
return e && "current" in e ? e.current : e;
|
|
1669
|
+
}, Bi = function(e, r) {
|
|
1670
|
+
return e[0] === r[0] && e[1] === r[1];
|
|
1671
|
+
}, zi = function(e) {
|
|
1672
|
+
return `
|
|
1673
|
+
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
1674
|
+
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
1675
|
+
`);
|
|
1676
|
+
}, Hi = 0, te = [];
|
|
1677
|
+
function Vi(e) {
|
|
1678
|
+
var r = c.useRef([]), t = c.useRef([0, 0]), n = c.useRef(), o = c.useState(Hi++)[0], a = c.useState(Dn)[0], u = c.useRef(e);
|
|
1679
|
+
c.useEffect(function() {
|
|
1680
|
+
u.current = e;
|
|
1681
|
+
}, [e]), c.useEffect(function() {
|
|
1682
|
+
if (e.inert) {
|
|
1683
|
+
document.body.classList.add("block-interactivity-".concat(o));
|
|
1684
|
+
var p = mi([e.lockRef.current], (e.shards || []).map(Yt), !0).filter(Boolean);
|
|
1685
|
+
return p.forEach(function(h) {
|
|
1686
|
+
return h.classList.add("allow-interactivity-".concat(o));
|
|
1687
|
+
}), function() {
|
|
1688
|
+
document.body.classList.remove("block-interactivity-".concat(o)), p.forEach(function(h) {
|
|
1689
|
+
return h.classList.remove("allow-interactivity-".concat(o));
|
|
1690
|
+
});
|
|
1691
|
+
};
|
|
1692
|
+
}
|
|
1693
|
+
}, [e.inert, e.lockRef.current, e.shards]);
|
|
1694
|
+
var i = c.useCallback(function(p, h) {
|
|
1695
|
+
if ("touches" in p && p.touches.length === 2 || p.type === "wheel" && p.ctrlKey)
|
|
1696
|
+
return !u.current.allowPinchZoom;
|
|
1697
|
+
var _ = Ce(p), b = t.current, w = "deltaX" in p ? p.deltaX : b[0] - _[0], E = "deltaY" in p ? p.deltaY : b[1] - _[1], R, O = p.target, x = Math.abs(w) > Math.abs(E) ? "h" : "v";
|
|
1698
|
+
if ("touches" in p && x === "h" && O.type === "range")
|
|
1699
|
+
return !1;
|
|
1700
|
+
var I = Ht(x, O);
|
|
1701
|
+
if (!I)
|
|
1702
|
+
return !0;
|
|
1703
|
+
if (I ? R = x : (R = x === "v" ? "h" : "v", I = Ht(x, O)), !I)
|
|
1704
|
+
return !1;
|
|
1705
|
+
if (!n.current && "changedTouches" in p && (w || E) && (n.current = R), !R)
|
|
1706
|
+
return !0;
|
|
1707
|
+
var $ = n.current || R;
|
|
1708
|
+
return ji($, h, p, $ === "h" ? w : E, !0);
|
|
1709
|
+
}, []), f = c.useCallback(function(p) {
|
|
1710
|
+
var h = p;
|
|
1711
|
+
if (!(!te.length || te[te.length - 1] !== a)) {
|
|
1712
|
+
var _ = "deltaY" in h ? Vt(h) : Ce(h), b = r.current.filter(function(R) {
|
|
1713
|
+
return R.name === h.type && (R.target === h.target || h.target === R.shadowParent) && Bi(R.delta, _);
|
|
1714
|
+
})[0];
|
|
1715
|
+
if (b && b.should) {
|
|
1716
|
+
h.cancelable && h.preventDefault();
|
|
1717
|
+
return;
|
|
1718
|
+
}
|
|
1719
|
+
if (!b) {
|
|
1720
|
+
var w = (u.current.shards || []).map(Yt).filter(Boolean).filter(function(R) {
|
|
1721
|
+
return R.contains(h.target);
|
|
1722
|
+
}), E = w.length > 0 ? i(h, w[0]) : !u.current.noIsolation;
|
|
1723
|
+
E && h.cancelable && h.preventDefault();
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
}, []), d = c.useCallback(function(p, h, _, b) {
|
|
1727
|
+
var w = {
|
|
1728
|
+
name: p,
|
|
1729
|
+
delta: h,
|
|
1730
|
+
target: _,
|
|
1731
|
+
should: b,
|
|
1732
|
+
shadowParent: Yi(_)
|
|
1733
|
+
};
|
|
1734
|
+
r.current.push(w), setTimeout(function() {
|
|
1735
|
+
r.current = r.current.filter(function(E) {
|
|
1736
|
+
return E !== w;
|
|
1737
|
+
});
|
|
1738
|
+
}, 1);
|
|
1739
|
+
}, []), l = c.useCallback(function(p) {
|
|
1740
|
+
t.current = Ce(p), n.current = void 0;
|
|
1741
|
+
}, []), s = c.useCallback(function(p) {
|
|
1742
|
+
d(p.type, Vt(p), p.target, i(p, e.lockRef.current));
|
|
1743
|
+
}, []), v = c.useCallback(function(p) {
|
|
1744
|
+
d(p.type, Ce(p), p.target, i(p, e.lockRef.current));
|
|
1745
|
+
}, []);
|
|
1746
|
+
c.useEffect(function() {
|
|
1747
|
+
return te.push(a), e.setCallbacks({
|
|
1748
|
+
onScrollCapture: s,
|
|
1749
|
+
onWheelCapture: s,
|
|
1750
|
+
onTouchMoveCapture: v
|
|
1751
|
+
}), document.addEventListener("wheel", f, re), document.addEventListener("touchmove", f, re), document.addEventListener("touchstart", l, re), function() {
|
|
1752
|
+
te = te.filter(function(p) {
|
|
1753
|
+
return p !== a;
|
|
1754
|
+
}), document.removeEventListener("wheel", f, re), document.removeEventListener("touchmove", f, re), document.removeEventListener("touchstart", l, re);
|
|
1755
|
+
};
|
|
1756
|
+
}, []);
|
|
1757
|
+
var g = e.removeScrollBar, S = e.inert;
|
|
1758
|
+
return c.createElement(c.Fragment, null, S ? c.createElement(a, {
|
|
1759
|
+
styles: zi(o)
|
|
1760
|
+
}) : null, g ? c.createElement(qi, {
|
|
1761
|
+
noRelative: e.noRelative,
|
|
1762
|
+
gapMode: e.gapMode
|
|
1763
|
+
}) : null);
|
|
1764
|
+
}
|
|
1765
|
+
function Yi(e) {
|
|
1766
|
+
for (var r = null; e !== null; )
|
|
1767
|
+
e instanceof ShadowRoot && (r = e.host, e = e.host), e = e.parentNode;
|
|
1768
|
+
return r;
|
|
1769
|
+
}
|
|
1770
|
+
const Xi = Mi(On, Vi);
|
|
1771
|
+
var kn = c.forwardRef(function(e, r) {
|
|
1772
|
+
return c.createElement(Ne, q({}, e, {
|
|
1773
|
+
ref: r,
|
|
1774
|
+
sideCar: Xi
|
|
1775
|
+
}));
|
|
1776
|
+
});
|
|
1777
|
+
kn.classNames = Ne.classNames;
|
|
1778
|
+
const Zi = kn;
|
|
1779
|
+
var gr = ["Enter", " "], Qi = ["ArrowDown", "PageUp", "Home"], Nn = ["ArrowUp", "PageDown", "End"], Ji = [...Qi, ...Nn], eu = {
|
|
1780
|
+
ltr: [...gr, "ArrowRight"],
|
|
1781
|
+
rtl: [...gr, "ArrowLeft"]
|
|
1782
|
+
}, ru = {
|
|
1783
|
+
ltr: ["ArrowLeft"],
|
|
1784
|
+
rtl: ["ArrowRight"]
|
|
1785
|
+
}, he = "Menu", [le, tu, nu] = hn(he), [X, Fn] = Ae(he, [
|
|
1786
|
+
nu,
|
|
1787
|
+
Jt,
|
|
1788
|
+
En
|
|
1789
|
+
]), Fe = Jt(), qn = En(), [ou, Z] = X(he), [au, ge] = X(he), Ln = (e) => {
|
|
1790
|
+
const { __scopeMenu: r, open: t = !1, children: n, dir: o, onOpenChange: a, modal: u = !0 } = e, i = Fe(r), [f, d] = c.useState(null), l = c.useRef(!1), s = se(a), v = gn(o);
|
|
1791
|
+
return c.useEffect(() => {
|
|
1792
|
+
const g = () => {
|
|
1793
|
+
l.current = !0, document.addEventListener("pointerdown", S, { capture: !0, once: !0 }), document.addEventListener("pointermove", S, { capture: !0, once: !0 });
|
|
1794
|
+
}, S = () => l.current = !1;
|
|
1795
|
+
return document.addEventListener("keydown", g, { capture: !0 }), () => {
|
|
1796
|
+
document.removeEventListener("keydown", g, { capture: !0 }), document.removeEventListener("pointerdown", S, { capture: !0 }), document.removeEventListener("pointermove", S, { capture: !0 });
|
|
1797
|
+
};
|
|
1798
|
+
}, []), /* @__PURE__ */ m(bo, { ...i, children: /* @__PURE__ */ m(
|
|
1799
|
+
ou,
|
|
1800
|
+
{
|
|
1801
|
+
scope: r,
|
|
1802
|
+
open: t,
|
|
1803
|
+
onOpenChange: s,
|
|
1804
|
+
content: f,
|
|
1805
|
+
onContentChange: d,
|
|
1806
|
+
children: /* @__PURE__ */ m(
|
|
1807
|
+
au,
|
|
1808
|
+
{
|
|
1809
|
+
scope: r,
|
|
1810
|
+
onClose: c.useCallback(() => s(!1), [s]),
|
|
1811
|
+
isUsingKeyboardRef: l,
|
|
1812
|
+
dir: v,
|
|
1813
|
+
modal: u,
|
|
1814
|
+
children: n
|
|
1815
|
+
}
|
|
1816
|
+
)
|
|
1817
|
+
}
|
|
1818
|
+
) });
|
|
1819
|
+
};
|
|
1820
|
+
Ln.displayName = he;
|
|
1821
|
+
var iu = "MenuAnchor", Er = c.forwardRef(
|
|
1822
|
+
(e, r) => {
|
|
1823
|
+
const { __scopeMenu: t, ...n } = e, o = Fe(t);
|
|
1824
|
+
return /* @__PURE__ */ m(_o, { ...o, ...n, ref: r });
|
|
1825
|
+
}
|
|
1826
|
+
);
|
|
1827
|
+
Er.displayName = iu;
|
|
1828
|
+
var yr = "MenuPortal", [uu, $n] = X(yr, {
|
|
1829
|
+
forceMount: void 0
|
|
1830
|
+
}), Gn = (e) => {
|
|
1831
|
+
const { __scopeMenu: r, forceMount: t, children: n, container: o } = e, a = Z(yr, r);
|
|
1832
|
+
return /* @__PURE__ */ m(uu, { scope: r, forceMount: t, children: /* @__PURE__ */ m(Te, { present: t || a.open, children: /* @__PURE__ */ m(mn, { asChild: !0, container: o, children: n }) }) });
|
|
1833
|
+
};
|
|
1834
|
+
Gn.displayName = yr;
|
|
1835
|
+
var k = "MenuContent", [cu, br] = X(k), Kn = c.forwardRef(
|
|
1836
|
+
(e, r) => {
|
|
1837
|
+
const t = $n(k, e.__scopeMenu), { forceMount: n = t.forceMount, ...o } = e, a = Z(k, e.__scopeMenu), u = ge(k, e.__scopeMenu);
|
|
1838
|
+
return /* @__PURE__ */ m(le.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ m(Te, { present: n || a.open, children: /* @__PURE__ */ m(le.Slot, { scope: e.__scopeMenu, children: u.modal ? /* @__PURE__ */ m(su, { ...o, ref: r }) : /* @__PURE__ */ m(lu, { ...o, ref: r }) }) }) });
|
|
1839
|
+
}
|
|
1840
|
+
), su = c.forwardRef(
|
|
1841
|
+
(e, r) => {
|
|
1842
|
+
const t = Z(k, e.__scopeMenu), n = c.useRef(null), o = U(r, n);
|
|
1843
|
+
return c.useEffect(() => {
|
|
1844
|
+
const a = n.current;
|
|
1845
|
+
if (a)
|
|
1846
|
+
return pi(a);
|
|
1847
|
+
}, []), /* @__PURE__ */ m(
|
|
1848
|
+
Mr,
|
|
1849
|
+
{
|
|
1850
|
+
...e,
|
|
1851
|
+
ref: o,
|
|
1852
|
+
trapFocus: t.open,
|
|
1853
|
+
disableOutsidePointerEvents: t.open,
|
|
1854
|
+
disableOutsideScroll: !0,
|
|
1855
|
+
onFocusOutside: M(
|
|
1856
|
+
e.onFocusOutside,
|
|
1857
|
+
(a) => a.preventDefault(),
|
|
1858
|
+
{ checkForDefaultPrevented: !1 }
|
|
1859
|
+
),
|
|
1860
|
+
onDismiss: () => t.onOpenChange(!1)
|
|
1861
|
+
}
|
|
1862
|
+
);
|
|
1863
|
+
}
|
|
1864
|
+
), lu = c.forwardRef((e, r) => {
|
|
1865
|
+
const t = Z(k, e.__scopeMenu);
|
|
1866
|
+
return /* @__PURE__ */ m(
|
|
1867
|
+
Mr,
|
|
1868
|
+
{
|
|
1869
|
+
...e,
|
|
1870
|
+
ref: r,
|
|
1871
|
+
trapFocus: !1,
|
|
1872
|
+
disableOutsidePointerEvents: !1,
|
|
1873
|
+
disableOutsideScroll: !1,
|
|
1874
|
+
onDismiss: () => t.onOpenChange(!1)
|
|
1875
|
+
}
|
|
1876
|
+
);
|
|
1877
|
+
}), fu = vr("MenuContent.ScrollLock"), Mr = c.forwardRef(
|
|
1878
|
+
(e, r) => {
|
|
1879
|
+
const {
|
|
1880
|
+
__scopeMenu: t,
|
|
1881
|
+
loop: n = !1,
|
|
1882
|
+
trapFocus: o,
|
|
1883
|
+
onOpenAutoFocus: a,
|
|
1884
|
+
onCloseAutoFocus: u,
|
|
1885
|
+
disableOutsidePointerEvents: i,
|
|
1886
|
+
onEntryFocus: f,
|
|
1887
|
+
onEscapeKeyDown: d,
|
|
1888
|
+
onPointerDownOutside: l,
|
|
1889
|
+
onFocusOutside: s,
|
|
1890
|
+
onInteractOutside: v,
|
|
1891
|
+
onDismiss: g,
|
|
1892
|
+
disableOutsideScroll: S,
|
|
1893
|
+
...p
|
|
1894
|
+
} = e, h = Z(k, t), _ = ge(k, t), b = Fe(t), w = qn(t), E = tu(t), [R, O] = c.useState(null), x = c.useRef(null), I = U(r, x, h.onContentChange), $ = c.useRef(0), z = c.useRef(""), ae = c.useRef(0), ie = c.useRef(null), Se = c.useRef("right"), _e = c.useRef(0), $e = S ? Zi : c.Fragment, G = S ? { as: fu, allowPinchZoom: !0 } : void 0, mo = (y) => {
|
|
1895
|
+
var J, Or;
|
|
1896
|
+
const P = z.current + y, F = E().filter((K) => !K.disabled), j = document.activeElement, Ge = (J = F.find((K) => K.ref.current === j)) == null ? void 0 : J.textValue, Ke = F.map((K) => K.textValue), xr = bu(Ke, P, Ge), ue = (Or = F.find((K) => K.textValue === xr)) == null ? void 0 : Or.ref.current;
|
|
1897
|
+
(function K(Dr) {
|
|
1898
|
+
z.current = Dr, window.clearTimeout($.current), Dr !== "" && ($.current = window.setTimeout(() => K(""), 1e3));
|
|
1899
|
+
})(P), ue && setTimeout(() => ue.focus());
|
|
1900
|
+
};
|
|
1901
|
+
c.useEffect(() => () => window.clearTimeout($.current), []), Ta();
|
|
1902
|
+
const Q = c.useCallback((y) => {
|
|
1903
|
+
var F, j;
|
|
1904
|
+
return Se.current === ((F = ie.current) == null ? void 0 : F.side) && Ru(y, (j = ie.current) == null ? void 0 : j.area);
|
|
1905
|
+
}, []);
|
|
1906
|
+
return /* @__PURE__ */ m(
|
|
1907
|
+
cu,
|
|
1908
|
+
{
|
|
1909
|
+
scope: t,
|
|
1910
|
+
searchRef: z,
|
|
1911
|
+
onItemEnter: c.useCallback(
|
|
1912
|
+
(y) => {
|
|
1913
|
+
Q(y) && y.preventDefault();
|
|
1914
|
+
},
|
|
1915
|
+
[Q]
|
|
1916
|
+
),
|
|
1917
|
+
onItemLeave: c.useCallback(
|
|
1918
|
+
(y) => {
|
|
1919
|
+
var P;
|
|
1920
|
+
Q(y) || ((P = x.current) == null || P.focus(), O(null));
|
|
1921
|
+
},
|
|
1922
|
+
[Q]
|
|
1923
|
+
),
|
|
1924
|
+
onTriggerLeave: c.useCallback(
|
|
1925
|
+
(y) => {
|
|
1926
|
+
Q(y) && y.preventDefault();
|
|
1927
|
+
},
|
|
1928
|
+
[Q]
|
|
1929
|
+
),
|
|
1930
|
+
pointerGraceTimerRef: ae,
|
|
1931
|
+
onPointerGraceIntentChange: c.useCallback((y) => {
|
|
1932
|
+
ie.current = y;
|
|
1933
|
+
}, []),
|
|
1934
|
+
children: /* @__PURE__ */ m($e, { ...G, children: /* @__PURE__ */ m(
|
|
1935
|
+
Sn,
|
|
1936
|
+
{
|
|
1937
|
+
asChild: !0,
|
|
1938
|
+
trapped: o,
|
|
1939
|
+
onMountAutoFocus: M(a, (y) => {
|
|
1940
|
+
var P;
|
|
1941
|
+
y.preventDefault(), (P = x.current) == null || P.focus({ preventScroll: !0 });
|
|
1942
|
+
}),
|
|
1943
|
+
onUnmountAutoFocus: u,
|
|
1944
|
+
children: /* @__PURE__ */ m(
|
|
1945
|
+
wo,
|
|
1946
|
+
{
|
|
1947
|
+
asChild: !0,
|
|
1948
|
+
disableOutsidePointerEvents: i,
|
|
1949
|
+
onEscapeKeyDown: d,
|
|
1950
|
+
onPointerDownOutside: l,
|
|
1951
|
+
onFocusOutside: s,
|
|
1952
|
+
onInteractOutside: v,
|
|
1953
|
+
onDismiss: g,
|
|
1954
|
+
children: /* @__PURE__ */ m(
|
|
1955
|
+
Xa,
|
|
1956
|
+
{
|
|
1957
|
+
asChild: !0,
|
|
1958
|
+
...w,
|
|
1959
|
+
dir: _.dir,
|
|
1960
|
+
orientation: "vertical",
|
|
1961
|
+
loop: n,
|
|
1962
|
+
currentTabStopId: R,
|
|
1963
|
+
onCurrentTabStopIdChange: O,
|
|
1964
|
+
onEntryFocus: M(f, (y) => {
|
|
1965
|
+
_.isUsingKeyboardRef.current || y.preventDefault();
|
|
1966
|
+
}),
|
|
1967
|
+
preventScrollOnEntryFocus: !0,
|
|
1968
|
+
children: /* @__PURE__ */ m(
|
|
1969
|
+
Eo,
|
|
1970
|
+
{
|
|
1971
|
+
role: "menu",
|
|
1972
|
+
"aria-orientation": "vertical",
|
|
1973
|
+
"data-state": no(h.open),
|
|
1974
|
+
"data-radix-menu-content": "",
|
|
1975
|
+
dir: _.dir,
|
|
1976
|
+
...b,
|
|
1977
|
+
...p,
|
|
1978
|
+
ref: I,
|
|
1979
|
+
style: { outline: "none", ...p.style },
|
|
1980
|
+
onKeyDown: M(p.onKeyDown, (y) => {
|
|
1981
|
+
const F = y.target.closest("[data-radix-menu-content]") === y.currentTarget, j = y.ctrlKey || y.altKey || y.metaKey, Ge = y.key.length === 1;
|
|
1982
|
+
F && (y.key === "Tab" && y.preventDefault(), !j && Ge && mo(y.key));
|
|
1983
|
+
const Ke = x.current;
|
|
1984
|
+
if (y.target !== Ke || !Ji.includes(y.key))
|
|
1985
|
+
return;
|
|
1986
|
+
y.preventDefault();
|
|
1987
|
+
const ue = E().filter((J) => !J.disabled).map((J) => J.ref.current);
|
|
1988
|
+
Nn.includes(y.key) && ue.reverse(), Eu(ue);
|
|
1989
|
+
}),
|
|
1990
|
+
onBlur: M(e.onBlur, (y) => {
|
|
1991
|
+
y.currentTarget.contains(y.target) || (window.clearTimeout($.current), z.current = "");
|
|
1992
|
+
}),
|
|
1993
|
+
onPointerMove: M(
|
|
1994
|
+
e.onPointerMove,
|
|
1995
|
+
fe((y) => {
|
|
1996
|
+
const P = y.target, F = _e.current !== y.clientX;
|
|
1997
|
+
if (y.currentTarget.contains(P) && F) {
|
|
1998
|
+
const j = y.clientX > _e.current ? "right" : "left";
|
|
1999
|
+
Se.current = j, _e.current = y.clientX;
|
|
2000
|
+
}
|
|
2001
|
+
})
|
|
2002
|
+
)
|
|
2003
|
+
}
|
|
2004
|
+
)
|
|
2005
|
+
}
|
|
2006
|
+
)
|
|
2007
|
+
}
|
|
2008
|
+
)
|
|
2009
|
+
}
|
|
2010
|
+
) })
|
|
2011
|
+
}
|
|
2012
|
+
);
|
|
2013
|
+
}
|
|
2014
|
+
);
|
|
2015
|
+
Kn.displayName = k;
|
|
2016
|
+
var du = "MenuGroup", Rr = c.forwardRef(
|
|
2017
|
+
(e, r) => {
|
|
2018
|
+
const { __scopeMenu: t, ...n } = e;
|
|
2019
|
+
return /* @__PURE__ */ m(L.div, { role: "group", ...n, ref: r });
|
|
2020
|
+
}
|
|
2021
|
+
);
|
|
2022
|
+
Rr.displayName = du;
|
|
2023
|
+
var vu = "MenuLabel", Un = c.forwardRef(
|
|
2024
|
+
(e, r) => {
|
|
2025
|
+
const { __scopeMenu: t, ...n } = e;
|
|
2026
|
+
return /* @__PURE__ */ m(L.div, { ...n, ref: r });
|
|
2027
|
+
}
|
|
2028
|
+
);
|
|
2029
|
+
Un.displayName = vu;
|
|
2030
|
+
var Oe = "MenuItem", Xt = "menu.itemSelect", qe = c.forwardRef(
|
|
2031
|
+
(e, r) => {
|
|
2032
|
+
const { disabled: t = !1, onSelect: n, ...o } = e, a = c.useRef(null), u = ge(Oe, e.__scopeMenu), i = br(Oe, e.__scopeMenu), f = U(r, a), d = c.useRef(!1), l = () => {
|
|
2033
|
+
const s = a.current;
|
|
2034
|
+
if (!t && s) {
|
|
2035
|
+
const v = new CustomEvent(Xt, { bubbles: !0, cancelable: !0 });
|
|
2036
|
+
s.addEventListener(Xt, (g) => n == null ? void 0 : n(g), { once: !0 }), So(s, v), v.defaultPrevented ? d.current = !1 : u.onClose();
|
|
2037
|
+
}
|
|
2038
|
+
};
|
|
2039
|
+
return /* @__PURE__ */ m(
|
|
2040
|
+
Wn,
|
|
2041
|
+
{
|
|
2042
|
+
...o,
|
|
2043
|
+
ref: f,
|
|
2044
|
+
disabled: t,
|
|
2045
|
+
onClick: M(e.onClick, l),
|
|
2046
|
+
onPointerDown: (s) => {
|
|
2047
|
+
var v;
|
|
2048
|
+
(v = e.onPointerDown) == null || v.call(e, s), d.current = !0;
|
|
2049
|
+
},
|
|
2050
|
+
onPointerUp: M(e.onPointerUp, (s) => {
|
|
2051
|
+
var v;
|
|
2052
|
+
d.current || (v = s.currentTarget) == null || v.click();
|
|
2053
|
+
}),
|
|
2054
|
+
onKeyDown: M(e.onKeyDown, (s) => {
|
|
2055
|
+
const v = i.searchRef.current !== "";
|
|
2056
|
+
t || v && s.key === " " || gr.includes(s.key) && (s.currentTarget.click(), s.preventDefault());
|
|
2057
|
+
})
|
|
2058
|
+
}
|
|
2059
|
+
);
|
|
2060
|
+
}
|
|
2061
|
+
);
|
|
2062
|
+
qe.displayName = Oe;
|
|
2063
|
+
var Wn = c.forwardRef(
|
|
2064
|
+
(e, r) => {
|
|
2065
|
+
const { __scopeMenu: t, disabled: n = !1, textValue: o, ...a } = e, u = br(Oe, t), i = qn(t), f = c.useRef(null), d = U(r, f), [l, s] = c.useState(!1), [v, g] = c.useState("");
|
|
2066
|
+
return c.useEffect(() => {
|
|
2067
|
+
const S = f.current;
|
|
2068
|
+
S && g((S.textContent ?? "").trim());
|
|
2069
|
+
}, [a.children]), /* @__PURE__ */ m(
|
|
2070
|
+
le.ItemSlot,
|
|
2071
|
+
{
|
|
2072
|
+
scope: t,
|
|
2073
|
+
disabled: n,
|
|
2074
|
+
textValue: o ?? v,
|
|
2075
|
+
children: /* @__PURE__ */ m(Za, { asChild: !0, ...i, focusable: !n, children: /* @__PURE__ */ m(
|
|
2076
|
+
L.div,
|
|
2077
|
+
{
|
|
2078
|
+
role: "menuitem",
|
|
2079
|
+
"data-highlighted": l ? "" : void 0,
|
|
2080
|
+
"aria-disabled": n || void 0,
|
|
2081
|
+
"data-disabled": n ? "" : void 0,
|
|
2082
|
+
...a,
|
|
2083
|
+
ref: d,
|
|
2084
|
+
onPointerMove: M(
|
|
2085
|
+
e.onPointerMove,
|
|
2086
|
+
fe((S) => {
|
|
2087
|
+
n ? u.onItemLeave(S) : (u.onItemEnter(S), S.defaultPrevented || S.currentTarget.focus({ preventScroll: !0 }));
|
|
2088
|
+
})
|
|
2089
|
+
),
|
|
2090
|
+
onPointerLeave: M(
|
|
2091
|
+
e.onPointerLeave,
|
|
2092
|
+
fe((S) => u.onItemLeave(S))
|
|
2093
|
+
),
|
|
2094
|
+
onFocus: M(e.onFocus, () => s(!0)),
|
|
2095
|
+
onBlur: M(e.onBlur, () => s(!1))
|
|
2096
|
+
}
|
|
2097
|
+
) })
|
|
2098
|
+
}
|
|
2099
|
+
);
|
|
2100
|
+
}
|
|
2101
|
+
), pu = "MenuCheckboxItem", jn = c.forwardRef(
|
|
2102
|
+
(e, r) => {
|
|
2103
|
+
const { checked: t = !1, onCheckedChange: n, ...o } = e;
|
|
2104
|
+
return /* @__PURE__ */ m(Yn, { scope: e.__scopeMenu, checked: t, children: /* @__PURE__ */ m(
|
|
2105
|
+
qe,
|
|
2106
|
+
{
|
|
2107
|
+
role: "menuitemcheckbox",
|
|
2108
|
+
"aria-checked": De(t) ? "mixed" : t,
|
|
2109
|
+
...o,
|
|
2110
|
+
ref: r,
|
|
2111
|
+
"data-state": Ir(t),
|
|
2112
|
+
onSelect: M(
|
|
2113
|
+
o.onSelect,
|
|
2114
|
+
() => n == null ? void 0 : n(De(t) ? !0 : !t),
|
|
2115
|
+
{ checkForDefaultPrevented: !1 }
|
|
2116
|
+
)
|
|
2117
|
+
}
|
|
2118
|
+
) });
|
|
2119
|
+
}
|
|
2120
|
+
);
|
|
2121
|
+
jn.displayName = pu;
|
|
2122
|
+
var Bn = "MenuRadioGroup", [mu, hu] = X(
|
|
2123
|
+
Bn,
|
|
2124
|
+
{ value: void 0, onValueChange: () => {
|
|
2125
|
+
} }
|
|
2126
|
+
), zn = c.forwardRef(
|
|
2127
|
+
(e, r) => {
|
|
2128
|
+
const { value: t, onValueChange: n, ...o } = e, a = se(n);
|
|
2129
|
+
return /* @__PURE__ */ m(mu, { scope: e.__scopeMenu, value: t, onValueChange: a, children: /* @__PURE__ */ m(Rr, { ...o, ref: r }) });
|
|
2130
|
+
}
|
|
2131
|
+
);
|
|
2132
|
+
zn.displayName = Bn;
|
|
2133
|
+
var Hn = "MenuRadioItem", Vn = c.forwardRef(
|
|
2134
|
+
(e, r) => {
|
|
2135
|
+
const { value: t, ...n } = e, o = hu(Hn, e.__scopeMenu), a = t === o.value;
|
|
2136
|
+
return /* @__PURE__ */ m(Yn, { scope: e.__scopeMenu, checked: a, children: /* @__PURE__ */ m(
|
|
2137
|
+
qe,
|
|
2138
|
+
{
|
|
2139
|
+
role: "menuitemradio",
|
|
2140
|
+
"aria-checked": a,
|
|
2141
|
+
...n,
|
|
2142
|
+
ref: r,
|
|
2143
|
+
"data-state": Ir(a),
|
|
2144
|
+
onSelect: M(
|
|
2145
|
+
n.onSelect,
|
|
2146
|
+
() => {
|
|
2147
|
+
var u;
|
|
2148
|
+
return (u = o.onValueChange) == null ? void 0 : u.call(o, t);
|
|
2149
|
+
},
|
|
2150
|
+
{ checkForDefaultPrevented: !1 }
|
|
2151
|
+
)
|
|
2152
|
+
}
|
|
2153
|
+
) });
|
|
2154
|
+
}
|
|
2155
|
+
);
|
|
2156
|
+
Vn.displayName = Hn;
|
|
2157
|
+
var Cr = "MenuItemIndicator", [Yn, gu] = X(
|
|
2158
|
+
Cr,
|
|
2159
|
+
{ checked: !1 }
|
|
2160
|
+
), Xn = c.forwardRef(
|
|
2161
|
+
(e, r) => {
|
|
2162
|
+
const { __scopeMenu: t, forceMount: n, ...o } = e, a = gu(Cr, t);
|
|
2163
|
+
return /* @__PURE__ */ m(
|
|
2164
|
+
Te,
|
|
2165
|
+
{
|
|
2166
|
+
present: n || De(a.checked) || a.checked === !0,
|
|
2167
|
+
children: /* @__PURE__ */ m(
|
|
2168
|
+
L.span,
|
|
2169
|
+
{
|
|
2170
|
+
...o,
|
|
2171
|
+
ref: r,
|
|
2172
|
+
"data-state": Ir(a.checked)
|
|
2173
|
+
}
|
|
2174
|
+
)
|
|
2175
|
+
}
|
|
2176
|
+
);
|
|
2177
|
+
}
|
|
2178
|
+
);
|
|
2179
|
+
Xn.displayName = Cr;
|
|
2180
|
+
var Su = "MenuSeparator", Zn = c.forwardRef(
|
|
2181
|
+
(e, r) => {
|
|
2182
|
+
const { __scopeMenu: t, ...n } = e;
|
|
2183
|
+
return /* @__PURE__ */ m(
|
|
2184
|
+
L.div,
|
|
2185
|
+
{
|
|
2186
|
+
role: "separator",
|
|
2187
|
+
"aria-orientation": "horizontal",
|
|
2188
|
+
...n,
|
|
2189
|
+
ref: r
|
|
2190
|
+
}
|
|
2191
|
+
);
|
|
2192
|
+
}
|
|
2193
|
+
);
|
|
2194
|
+
Zn.displayName = Su;
|
|
2195
|
+
var _u = "MenuArrow", Qn = c.forwardRef(
|
|
2196
|
+
(e, r) => {
|
|
2197
|
+
const { __scopeMenu: t, ...n } = e, o = Fe(t);
|
|
2198
|
+
return /* @__PURE__ */ m(yo, { ...o, ...n, ref: r });
|
|
2199
|
+
}
|
|
2200
|
+
);
|
|
2201
|
+
Qn.displayName = _u;
|
|
2202
|
+
var wu = "MenuSub", [bc, Jn] = X(wu), ce = "MenuSubTrigger", eo = c.forwardRef(
|
|
2203
|
+
(e, r) => {
|
|
2204
|
+
const t = Z(ce, e.__scopeMenu), n = ge(ce, e.__scopeMenu), o = Jn(ce, e.__scopeMenu), a = br(ce, e.__scopeMenu), u = c.useRef(null), { pointerGraceTimerRef: i, onPointerGraceIntentChange: f } = a, d = { __scopeMenu: e.__scopeMenu }, l = c.useCallback(() => {
|
|
2205
|
+
u.current && window.clearTimeout(u.current), u.current = null;
|
|
2206
|
+
}, []);
|
|
2207
|
+
return c.useEffect(() => l, [l]), c.useEffect(() => {
|
|
2208
|
+
const s = i.current;
|
|
2209
|
+
return () => {
|
|
2210
|
+
window.clearTimeout(s), f(null);
|
|
2211
|
+
};
|
|
2212
|
+
}, [i, f]), /* @__PURE__ */ m(Er, { asChild: !0, ...d, children: /* @__PURE__ */ m(
|
|
2213
|
+
Wn,
|
|
2214
|
+
{
|
|
2215
|
+
id: o.triggerId,
|
|
2216
|
+
"aria-haspopup": "menu",
|
|
2217
|
+
"aria-expanded": t.open,
|
|
2218
|
+
"aria-controls": o.contentId,
|
|
2219
|
+
"data-state": no(t.open),
|
|
2220
|
+
...e,
|
|
2221
|
+
ref: Qt(r, o.onTriggerChange),
|
|
2222
|
+
onClick: (s) => {
|
|
2223
|
+
var v;
|
|
2224
|
+
(v = e.onClick) == null || v.call(e, s), !(e.disabled || s.defaultPrevented) && (s.currentTarget.focus(), t.open || t.onOpenChange(!0));
|
|
2225
|
+
},
|
|
2226
|
+
onPointerMove: M(
|
|
2227
|
+
e.onPointerMove,
|
|
2228
|
+
fe((s) => {
|
|
2229
|
+
a.onItemEnter(s), !s.defaultPrevented && !e.disabled && !t.open && !u.current && (a.onPointerGraceIntentChange(null), u.current = window.setTimeout(() => {
|
|
2230
|
+
t.onOpenChange(!0), l();
|
|
2231
|
+
}, 100));
|
|
2232
|
+
})
|
|
2233
|
+
),
|
|
2234
|
+
onPointerLeave: M(
|
|
2235
|
+
e.onPointerLeave,
|
|
2236
|
+
fe((s) => {
|
|
2237
|
+
var g, S;
|
|
2238
|
+
l();
|
|
2239
|
+
const v = (g = t.content) == null ? void 0 : g.getBoundingClientRect();
|
|
2240
|
+
if (v) {
|
|
2241
|
+
const p = (S = t.content) == null ? void 0 : S.dataset.side, h = p === "right", _ = h ? -5 : 5, b = v[h ? "left" : "right"], w = v[h ? "right" : "left"];
|
|
2242
|
+
a.onPointerGraceIntentChange({
|
|
2243
|
+
area: [
|
|
2244
|
+
// Apply a bleed on clientX to ensure that our exit point is
|
|
2245
|
+
// consistently within polygon bounds
|
|
2246
|
+
{ x: s.clientX + _, y: s.clientY },
|
|
2247
|
+
{ x: b, y: v.top },
|
|
2248
|
+
{ x: w, y: v.top },
|
|
2249
|
+
{ x: w, y: v.bottom },
|
|
2250
|
+
{ x: b, y: v.bottom }
|
|
2251
|
+
],
|
|
2252
|
+
side: p
|
|
2253
|
+
}), window.clearTimeout(i.current), i.current = window.setTimeout(
|
|
2254
|
+
() => a.onPointerGraceIntentChange(null),
|
|
2255
|
+
300
|
|
2256
|
+
);
|
|
2257
|
+
} else {
|
|
2258
|
+
if (a.onTriggerLeave(s), s.defaultPrevented)
|
|
2259
|
+
return;
|
|
2260
|
+
a.onPointerGraceIntentChange(null);
|
|
2261
|
+
}
|
|
2262
|
+
})
|
|
2263
|
+
),
|
|
2264
|
+
onKeyDown: M(e.onKeyDown, (s) => {
|
|
2265
|
+
var g;
|
|
2266
|
+
const v = a.searchRef.current !== "";
|
|
2267
|
+
e.disabled || v && s.key === " " || eu[n.dir].includes(s.key) && (t.onOpenChange(!0), (g = t.content) == null || g.focus(), s.preventDefault());
|
|
2268
|
+
})
|
|
2269
|
+
}
|
|
2270
|
+
) });
|
|
2271
|
+
}
|
|
2272
|
+
);
|
|
2273
|
+
eo.displayName = ce;
|
|
2274
|
+
var ro = "MenuSubContent", to = c.forwardRef(
|
|
2275
|
+
(e, r) => {
|
|
2276
|
+
const t = $n(k, e.__scopeMenu), { forceMount: n = t.forceMount, ...o } = e, a = Z(k, e.__scopeMenu), u = ge(k, e.__scopeMenu), i = Jn(ro, e.__scopeMenu), f = c.useRef(null), d = U(r, f);
|
|
2277
|
+
return /* @__PURE__ */ m(le.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ m(Te, { present: n || a.open, children: /* @__PURE__ */ m(le.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ m(
|
|
2278
|
+
Mr,
|
|
2279
|
+
{
|
|
2280
|
+
id: i.contentId,
|
|
2281
|
+
"aria-labelledby": i.triggerId,
|
|
2282
|
+
...o,
|
|
2283
|
+
ref: d,
|
|
2284
|
+
align: "start",
|
|
2285
|
+
side: u.dir === "rtl" ? "left" : "right",
|
|
2286
|
+
disableOutsidePointerEvents: !1,
|
|
2287
|
+
disableOutsideScroll: !1,
|
|
2288
|
+
trapFocus: !1,
|
|
2289
|
+
onOpenAutoFocus: (l) => {
|
|
2290
|
+
var s;
|
|
2291
|
+
u.isUsingKeyboardRef.current && ((s = f.current) == null || s.focus()), l.preventDefault();
|
|
2292
|
+
},
|
|
2293
|
+
onCloseAutoFocus: (l) => l.preventDefault(),
|
|
2294
|
+
onFocusOutside: M(e.onFocusOutside, (l) => {
|
|
2295
|
+
l.target !== i.trigger && a.onOpenChange(!1);
|
|
2296
|
+
}),
|
|
2297
|
+
onEscapeKeyDown: M(e.onEscapeKeyDown, (l) => {
|
|
2298
|
+
u.onClose(), l.preventDefault();
|
|
2299
|
+
}),
|
|
2300
|
+
onKeyDown: M(e.onKeyDown, (l) => {
|
|
2301
|
+
var g;
|
|
2302
|
+
const s = l.currentTarget.contains(l.target), v = ru[u.dir].includes(l.key);
|
|
2303
|
+
s && v && (a.onOpenChange(!1), (g = i.trigger) == null || g.focus(), l.preventDefault());
|
|
2304
|
+
})
|
|
2305
|
+
}
|
|
2306
|
+
) }) }) });
|
|
2307
|
+
}
|
|
2308
|
+
);
|
|
2309
|
+
to.displayName = ro;
|
|
2310
|
+
function no(e) {
|
|
2311
|
+
return e ? "open" : "closed";
|
|
2312
|
+
}
|
|
2313
|
+
function De(e) {
|
|
2314
|
+
return e === "indeterminate";
|
|
2315
|
+
}
|
|
2316
|
+
function Ir(e) {
|
|
2317
|
+
return De(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
2318
|
+
}
|
|
2319
|
+
function Eu(e) {
|
|
2320
|
+
const r = document.activeElement;
|
|
2321
|
+
for (const t of e)
|
|
2322
|
+
if (t === r || (t.focus(), document.activeElement !== r))
|
|
2323
|
+
return;
|
|
2324
|
+
}
|
|
2325
|
+
function yu(e, r) {
|
|
2326
|
+
return e.map((t, n) => e[(r + n) % e.length]);
|
|
2327
|
+
}
|
|
2328
|
+
function bu(e, r, t) {
|
|
2329
|
+
const o = r.length > 1 && Array.from(r).every((d) => d === r[0]) ? r[0] : r, a = t ? e.indexOf(t) : -1;
|
|
2330
|
+
let u = yu(e, Math.max(a, 0));
|
|
2331
|
+
o.length === 1 && (u = u.filter((d) => d !== t));
|
|
2332
|
+
const f = u.find(
|
|
2333
|
+
(d) => d.toLowerCase().startsWith(o.toLowerCase())
|
|
2334
|
+
);
|
|
2335
|
+
return f !== t ? f : void 0;
|
|
2336
|
+
}
|
|
2337
|
+
function Mu(e, r) {
|
|
2338
|
+
const { x: t, y: n } = e;
|
|
2339
|
+
let o = !1;
|
|
2340
|
+
for (let a = 0, u = r.length - 1; a < r.length; u = a++) {
|
|
2341
|
+
const i = r[a], f = r[u], d = i.x, l = i.y, s = f.x, v = f.y;
|
|
2342
|
+
l > n != v > n && t < (s - d) * (n - l) / (v - l) + d && (o = !o);
|
|
2343
|
+
}
|
|
2344
|
+
return o;
|
|
2345
|
+
}
|
|
2346
|
+
function Ru(e, r) {
|
|
2347
|
+
if (!r)
|
|
2348
|
+
return !1;
|
|
2349
|
+
const t = { x: e.clientX, y: e.clientY };
|
|
2350
|
+
return Mu(t, r);
|
|
2351
|
+
}
|
|
2352
|
+
function fe(e) {
|
|
2353
|
+
return (r) => r.pointerType === "mouse" ? e(r) : void 0;
|
|
2354
|
+
}
|
|
2355
|
+
var Cu = Ln, Iu = Er, xu = Gn, Ou = Kn, Du = Rr, Au = Un, Tu = qe, Pu = jn, ku = zn, Nu = Vn, Fu = Xn, qu = Zn, Lu = Qn, $u = eo, Gu = to, Le = "DropdownMenu", [Ku, Mc] = Ae(
|
|
2356
|
+
Le,
|
|
2357
|
+
[Fn]
|
|
2358
|
+
), A = Fn(), [Uu, oo] = Ku(Le), ao = (e) => {
|
|
2359
|
+
const {
|
|
2360
|
+
__scopeDropdownMenu: r,
|
|
2361
|
+
children: t,
|
|
2362
|
+
dir: n,
|
|
2363
|
+
open: o,
|
|
2364
|
+
defaultOpen: a,
|
|
2365
|
+
onOpenChange: u,
|
|
2366
|
+
modal: i = !0
|
|
2367
|
+
} = e, f = A(r), d = c.useRef(null), [l, s] = Zt({
|
|
2368
|
+
prop: o,
|
|
2369
|
+
defaultProp: a ?? !1,
|
|
2370
|
+
onChange: u,
|
|
2371
|
+
caller: Le
|
|
2372
|
+
});
|
|
2373
|
+
return /* @__PURE__ */ m(
|
|
2374
|
+
Uu,
|
|
2375
|
+
{
|
|
2376
|
+
scope: r,
|
|
2377
|
+
triggerId: pr(),
|
|
2378
|
+
triggerRef: d,
|
|
2379
|
+
contentId: pr(),
|
|
2380
|
+
open: l,
|
|
2381
|
+
onOpenChange: s,
|
|
2382
|
+
onOpenToggle: c.useCallback(() => s((v) => !v), [s]),
|
|
2383
|
+
modal: i,
|
|
2384
|
+
children: /* @__PURE__ */ m(Cu, { ...f, open: l, onOpenChange: s, dir: n, modal: i, children: t })
|
|
2385
|
+
}
|
|
2386
|
+
);
|
|
2387
|
+
};
|
|
2388
|
+
ao.displayName = Le;
|
|
2389
|
+
var io = "DropdownMenuTrigger", uo = c.forwardRef(
|
|
2390
|
+
(e, r) => {
|
|
2391
|
+
const { __scopeDropdownMenu: t, disabled: n = !1, ...o } = e, a = oo(io, t), u = A(t);
|
|
2392
|
+
return /* @__PURE__ */ m(Iu, { asChild: !0, ...u, children: /* @__PURE__ */ m(
|
|
2393
|
+
L.button,
|
|
2394
|
+
{
|
|
2395
|
+
type: "button",
|
|
2396
|
+
id: a.triggerId,
|
|
2397
|
+
"aria-haspopup": "menu",
|
|
2398
|
+
"aria-expanded": a.open,
|
|
2399
|
+
"aria-controls": a.open ? a.contentId : void 0,
|
|
2400
|
+
"data-state": a.open ? "open" : "closed",
|
|
2401
|
+
"data-disabled": n ? "" : void 0,
|
|
2402
|
+
disabled: n,
|
|
2403
|
+
...o,
|
|
2404
|
+
ref: Qt(r, a.triggerRef),
|
|
2405
|
+
onPointerDown: M(e.onPointerDown, (i) => {
|
|
2406
|
+
!n && i.button === 0 && i.ctrlKey === !1 && (a.onOpenToggle(), a.open || i.preventDefault());
|
|
2407
|
+
}),
|
|
2408
|
+
onKeyDown: M(e.onKeyDown, (i) => {
|
|
2409
|
+
n || (["Enter", " "].includes(i.key) && a.onOpenToggle(), i.key === "ArrowDown" && a.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(i.key) && i.preventDefault());
|
|
2410
|
+
})
|
|
2411
|
+
}
|
|
2412
|
+
) });
|
|
2413
|
+
}
|
|
2414
|
+
);
|
|
2415
|
+
uo.displayName = io;
|
|
2416
|
+
var Wu = "DropdownMenuPortal", co = (e) => {
|
|
2417
|
+
const { __scopeDropdownMenu: r, ...t } = e, n = A(r);
|
|
2418
|
+
return /* @__PURE__ */ m(xu, { ...n, ...t });
|
|
2419
|
+
};
|
|
2420
|
+
co.displayName = Wu;
|
|
2421
|
+
var so = "DropdownMenuContent", lo = c.forwardRef(
|
|
2422
|
+
(e, r) => {
|
|
2423
|
+
const { __scopeDropdownMenu: t, ...n } = e, o = oo(so, t), a = A(t), u = c.useRef(!1);
|
|
2424
|
+
return /* @__PURE__ */ m(
|
|
2425
|
+
Ou,
|
|
2426
|
+
{
|
|
2427
|
+
id: o.contentId,
|
|
2428
|
+
"aria-labelledby": o.triggerId,
|
|
2429
|
+
...a,
|
|
2430
|
+
...n,
|
|
2431
|
+
ref: r,
|
|
2432
|
+
onCloseAutoFocus: M(e.onCloseAutoFocus, (i) => {
|
|
2433
|
+
var f;
|
|
2434
|
+
u.current || (f = o.triggerRef.current) == null || f.focus(), u.current = !1, i.preventDefault();
|
|
2435
|
+
}),
|
|
2436
|
+
onInteractOutside: M(e.onInteractOutside, (i) => {
|
|
2437
|
+
const f = i.detail.originalEvent, d = f.button === 0 && f.ctrlKey === !0, l = f.button === 2 || d;
|
|
2438
|
+
(!o.modal || l) && (u.current = !0);
|
|
2439
|
+
}),
|
|
2440
|
+
style: {
|
|
2441
|
+
...e.style,
|
|
2442
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
2443
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
2444
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
2445
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
2446
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
2447
|
+
}
|
|
2448
|
+
}
|
|
2449
|
+
);
|
|
2450
|
+
}
|
|
2451
|
+
);
|
|
2452
|
+
lo.displayName = so;
|
|
2453
|
+
var ju = "DropdownMenuGroup", fo = c.forwardRef(
|
|
2454
|
+
(e, r) => {
|
|
2455
|
+
const { __scopeDropdownMenu: t, ...n } = e, o = A(t);
|
|
2456
|
+
return /* @__PURE__ */ m(Du, { ...o, ...n, ref: r });
|
|
2457
|
+
}
|
|
2458
|
+
);
|
|
2459
|
+
fo.displayName = ju;
|
|
2460
|
+
var Bu = "DropdownMenuLabel", zu = c.forwardRef(
|
|
2461
|
+
(e, r) => {
|
|
2462
|
+
const { __scopeDropdownMenu: t, ...n } = e, o = A(t);
|
|
2463
|
+
return /* @__PURE__ */ m(Au, { ...o, ...n, ref: r });
|
|
2464
|
+
}
|
|
2465
|
+
);
|
|
2466
|
+
zu.displayName = Bu;
|
|
2467
|
+
var Hu = "DropdownMenuItem", vo = c.forwardRef(
|
|
2468
|
+
(e, r) => {
|
|
2469
|
+
const { __scopeDropdownMenu: t, ...n } = e, o = A(t);
|
|
2470
|
+
return /* @__PURE__ */ m(Tu, { ...o, ...n, ref: r });
|
|
2471
|
+
}
|
|
2472
|
+
);
|
|
2473
|
+
vo.displayName = Hu;
|
|
2474
|
+
var Vu = "DropdownMenuCheckboxItem", Yu = c.forwardRef((e, r) => {
|
|
2475
|
+
const { __scopeDropdownMenu: t, ...n } = e, o = A(t);
|
|
2476
|
+
return /* @__PURE__ */ m(Pu, { ...o, ...n, ref: r });
|
|
2477
|
+
});
|
|
2478
|
+
Yu.displayName = Vu;
|
|
2479
|
+
var Xu = "DropdownMenuRadioGroup", Zu = c.forwardRef((e, r) => {
|
|
2480
|
+
const { __scopeDropdownMenu: t, ...n } = e, o = A(t);
|
|
2481
|
+
return /* @__PURE__ */ m(ku, { ...o, ...n, ref: r });
|
|
2482
|
+
});
|
|
2483
|
+
Zu.displayName = Xu;
|
|
2484
|
+
var Qu = "DropdownMenuRadioItem", Ju = c.forwardRef((e, r) => {
|
|
2485
|
+
const { __scopeDropdownMenu: t, ...n } = e, o = A(t);
|
|
2486
|
+
return /* @__PURE__ */ m(Nu, { ...o, ...n, ref: r });
|
|
2487
|
+
});
|
|
2488
|
+
Ju.displayName = Qu;
|
|
2489
|
+
var ec = "DropdownMenuItemIndicator", rc = c.forwardRef((e, r) => {
|
|
2490
|
+
const { __scopeDropdownMenu: t, ...n } = e, o = A(t);
|
|
2491
|
+
return /* @__PURE__ */ m(Fu, { ...o, ...n, ref: r });
|
|
2492
|
+
});
|
|
2493
|
+
rc.displayName = ec;
|
|
2494
|
+
var tc = "DropdownMenuSeparator", po = c.forwardRef((e, r) => {
|
|
2495
|
+
const { __scopeDropdownMenu: t, ...n } = e, o = A(t);
|
|
2496
|
+
return /* @__PURE__ */ m(qu, { ...o, ...n, ref: r });
|
|
2497
|
+
});
|
|
2498
|
+
po.displayName = tc;
|
|
2499
|
+
var nc = "DropdownMenuArrow", oc = c.forwardRef(
|
|
2500
|
+
(e, r) => {
|
|
2501
|
+
const { __scopeDropdownMenu: t, ...n } = e, o = A(t);
|
|
2502
|
+
return /* @__PURE__ */ m(Lu, { ...o, ...n, ref: r });
|
|
2503
|
+
}
|
|
2504
|
+
);
|
|
2505
|
+
oc.displayName = nc;
|
|
2506
|
+
var ac = "DropdownMenuSubTrigger", ic = c.forwardRef((e, r) => {
|
|
2507
|
+
const { __scopeDropdownMenu: t, ...n } = e, o = A(t);
|
|
2508
|
+
return /* @__PURE__ */ m($u, { ...o, ...n, ref: r });
|
|
2509
|
+
});
|
|
2510
|
+
ic.displayName = ac;
|
|
2511
|
+
var uc = "DropdownMenuSubContent", cc = c.forwardRef((e, r) => {
|
|
2512
|
+
const { __scopeDropdownMenu: t, ...n } = e, o = A(t);
|
|
2513
|
+
return /* @__PURE__ */ m(
|
|
2514
|
+
Gu,
|
|
2515
|
+
{
|
|
2516
|
+
...o,
|
|
2517
|
+
...n,
|
|
2518
|
+
ref: r,
|
|
2519
|
+
style: {
|
|
2520
|
+
...e.style,
|
|
2521
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
2522
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
2523
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
2524
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
2525
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
2526
|
+
}
|
|
2527
|
+
}
|
|
2528
|
+
);
|
|
2529
|
+
});
|
|
2530
|
+
cc.displayName = uc;
|
|
2531
|
+
var Rc = ao, Cc = uo, Ic = co, xc = lo, Oc = fo, Dc = vo, Ac = po;
|
|
2532
|
+
export {
|
|
2533
|
+
xc as C,
|
|
2534
|
+
Sn as F,
|
|
2535
|
+
Oc as G,
|
|
2536
|
+
Dc as I,
|
|
2537
|
+
Ic as P,
|
|
2538
|
+
Rc as R,
|
|
2539
|
+
Ac as S,
|
|
2540
|
+
Cc as T,
|
|
2541
|
+
Zi as a,
|
|
2542
|
+
mn as b,
|
|
2543
|
+
pi as h,
|
|
2544
|
+
Ta as u
|
|
2545
|
+
};
|