@pdf-viewer/react 1.5.0-rc.1 → 1.5.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{RPDefaultLayout-b003c6b4.js → RPDefaultLayout-7144c2b0.js} +971 -970
- package/dist/components/RPController.js +61 -59
- package/dist/components/RPPages.js +2 -2
- package/dist/components/RPProvider.js +17 -16
- package/dist/components/layout/LayoutContainer.js +2 -2
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +2 -2
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MenuItem.js +1 -1
- package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +4 -4
- package/dist/components/layout/toolbar/OtherTool.js +2 -2
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/RotateTool.js +1 -1
- package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +2 -2
- package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +3 -3
- package/dist/components/page/AnnotationLayer.js +2 -2
- package/dist/components/page/CanvasLayer.js +2 -2
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +2 -2
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +2 -2
- package/dist/components/page/TextLayer.js +2 -2
- package/dist/components/ui/Checkbox.js +14 -13
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/RPTooltip.js +689 -331
- package/dist/contexts/InitialStateContext.js +8 -6
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/index-2e540713.js +23 -0
- package/dist/index-353ec0a6.js +172 -0
- package/dist/index-5ff5dbd0.js +1675 -0
- package/dist/index-71898eb9.js +139 -0
- package/dist/main.js +1 -1
- package/dist/types/utils/hooks/useWatermark.d.ts +1 -1
- package/dist/types/utils/types.d.ts +3 -1
- package/dist/utils/hooks/useFileDownload.js +3 -3
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +2 -2
- package/dist/utils/hooks/usePresentPage.js +2 -2
- package/dist/utils/hooks/usePrint.js +2 -2
- package/dist/utils/hooks/useScrollToPage.js +2 -2
- package/dist/utils/hooks/useSearch.js +2 -2
- package/dist/utils/hooks/useThumbnail.js +2 -2
- package/dist/utils/hooks/useVirtualReactWindow.js +2 -2
- package/dist/utils/hooks/useWatermark.js +40 -40
- package/package.json +1 -1
- package/dist/index-1cb41342.js +0 -307
- package/dist/index-7279fb4e.js +0 -1557
- package/dist/index-aa2d3884.js +0 -140
|
@@ -1,113 +1,114 @@
|
|
|
1
|
-
import { jsx as i, Fragment as
|
|
1
|
+
import { jsx as i, Fragment as Se, jsxs as D } from "react/jsx-runtime";
|
|
2
2
|
import * as U from "react";
|
|
3
|
-
import { useRef as M, useEffect as A, useCallback as L, useState as
|
|
3
|
+
import { useRef as M, useEffect as A, useCallback as L, useState as H, createContext as Ke, useContext as Xe, useMemo as F, forwardRef as We, useImperativeHandle as ln, createElement as Ve, PureComponent as rr, Component as or, memo as ir } from "react";
|
|
4
4
|
import { ChevronUpIcon as Me } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as Q } from "./components/ui/Button.js";
|
|
6
6
|
import { UIInput as dn } from "./components/ui/Input.js";
|
|
7
|
-
import { useScrollModeContext as
|
|
7
|
+
import { useScrollModeContext as De } from "./contexts/ScrollModeContext.js";
|
|
8
8
|
import { useDocumentContext as K } from "./contexts/RPDocumentContext.js";
|
|
9
|
-
import { useDarkModeContext as
|
|
10
|
-
import { ViewMode as Ze, ScrollMode as ee, AnnotationSubType as kt, SelectionMode as
|
|
9
|
+
import { useDarkModeContext as ar } from "./contexts/DarkModeContext.js";
|
|
10
|
+
import { ViewMode as Ze, ScrollMode as ee, AnnotationSubType as kt, SelectionMode as sr, ZoomLevel as it } from "./utils/types.js";
|
|
11
11
|
import { useRotationContext as Ye } from "./contexts/RotationContext.js";
|
|
12
|
-
import { useLayerContext as
|
|
12
|
+
import { useLayerContext as cr } from "./contexts/LayerContext.js";
|
|
13
13
|
import { useZoomContext as Je } from "./contexts/ZoomContext.js";
|
|
14
14
|
import { useViewModeContext as Qe } from "./contexts/ViewModeContext.js";
|
|
15
15
|
import { useVirtualScrollContext as et } from "./contexts/VirtualScrollContext.js";
|
|
16
16
|
import { useVirtualGridContext as un } from "./contexts/VirtualGridContext.js";
|
|
17
|
-
import { useSelectionModeContext as
|
|
18
|
-
import { useInitialStateContext as
|
|
19
|
-
import { useFullScreenContext as
|
|
17
|
+
import { useSelectionModeContext as lr } from "./contexts/SelectionModeContext.js";
|
|
18
|
+
import { useInitialStateContext as dr } from "./contexts/InitialStateContext.js";
|
|
19
|
+
import { useFullScreenContext as ur } from "./contexts/FullScreenContext.js";
|
|
20
20
|
import "./contexts/FileInputContext.js";
|
|
21
21
|
import "./contexts/DropFileZoneContext.js";
|
|
22
22
|
import { renderPage as wt } from "./utils/renderPage.js";
|
|
23
|
-
import { highlightMatches as pn, findMatches as
|
|
23
|
+
import { highlightMatches as pn, findMatches as pr, resetDivs as hn, highlightMultipleColorMatches as hr } from "./utils/highlight.js";
|
|
24
24
|
import * as Pt from "pdfjs-dist";
|
|
25
|
-
import { PixelsPerInch as
|
|
26
|
-
import { useLayoutContainer as
|
|
25
|
+
import { PixelsPerInch as mr, AnnotationMode as fr, RenderingCancelledException as gr, AnnotationLayer as vr } from "pdfjs-dist";
|
|
26
|
+
import { useLayoutContainer as Ce } from "./contexts/LayoutContainerContext.js";
|
|
27
27
|
import { useDimensionPagesContext as tt } from "./contexts/DimensionPagesContext.js";
|
|
28
28
|
import { useLocalizationContext as ue } from "./contexts/LocalizationContext.js";
|
|
29
|
-
import { useHighlightContext as
|
|
30
|
-
import
|
|
29
|
+
import { useHighlightContext as _r } from "./contexts/HighlightContext.js";
|
|
30
|
+
import "./contexts/LicenseContext.js";
|
|
31
|
+
import { useDownloadContext as wr } from "./contexts/DownloadContext.js";
|
|
31
32
|
import { useSmoothScrollContext as St } from "./contexts/SmoothScrollContext.js";
|
|
32
33
|
import { useLoaderContext as mn } from "./contexts/LoaderContext.js";
|
|
33
|
-
import "./contexts/LicenseContext.js";
|
|
34
34
|
import "./components/RPConfig.js";
|
|
35
|
-
import { ThumbnailIcon as
|
|
36
|
-
import { c as
|
|
35
|
+
import { ThumbnailIcon as br } from "./components/icons/Thumbnail.js";
|
|
36
|
+
import { c as oe } from "./clsx-0c6e471a.js";
|
|
37
37
|
import { LoaderIcon as xt } from "./components/icons/LoaderIcon.js";
|
|
38
|
-
import { useInfiniteScroll as
|
|
39
|
-
import { RPSplitter as
|
|
40
|
-
import { useToolbarComponentContext as _e, ToolbarComponentProvider as
|
|
41
|
-
import { useIconContext as pe, IconProvider as
|
|
42
|
-
import
|
|
43
|
-
import { Container as
|
|
44
|
-
import { WrapperLayout as
|
|
45
|
-
import { RPDropFileZone as
|
|
46
|
-
import { useViewportContext as
|
|
47
|
-
import { useThemeContext as
|
|
48
|
-
import { SimpleLinkService as
|
|
49
|
-
import { annotationsEvents as
|
|
50
|
-
import { _ as
|
|
51
|
-
import { useMousePressed as
|
|
52
|
-
import { useGrabScroll as
|
|
53
|
-
import { usePinch as
|
|
38
|
+
import { useInfiniteScroll as Cr } from "./utils/hooks/useInfiniteScroll.js";
|
|
39
|
+
import { RPSplitter as Tr } from "./components/layout/sidebar/RPSplitter.js";
|
|
40
|
+
import { useToolbarComponentContext as _e, ToolbarComponentProvider as Pr } from "./contexts/ToolbarComponentContext.js";
|
|
41
|
+
import { useIconContext as pe, IconProvider as Sr } from "./contexts/IconContext.js";
|
|
42
|
+
import Z from "./components/ui/RPTooltip.js";
|
|
43
|
+
import { Container as xr } from "./components/layout/Container.js";
|
|
44
|
+
import { WrapperLayout as yr } from "./components/layout/WrapperLayout.js";
|
|
45
|
+
import { RPDropFileZone as Ir } from "./components/RPDropFileZone.js";
|
|
46
|
+
import { useViewportContext as ye, ViewportProvider as Lr } from "./contexts/ViewportContext.js";
|
|
47
|
+
import { useThemeContext as Rr } from "./contexts/ThemeContext.js";
|
|
48
|
+
import { SimpleLinkService as Nr } from "./utils/link_service.js";
|
|
49
|
+
import { annotationsEvents as Er, annotationEventsHandler as Or, handleClick as Mt, handleAnnotationWidget as Dr, handleAnnotationLink as zr, bindLayerEvents as Ar, unbindLayerEvents as Wt } from "./utils/annotations.js";
|
|
50
|
+
import { _ as Fr, U as kr } from "./Popover-b7402893.js";
|
|
51
|
+
import { useMousePressed as Mr } from "./utils/hooks/useMousePressed.js";
|
|
52
|
+
import { useGrabScroll as Wr } from "./utils/hooks/useGrabScroll.js";
|
|
53
|
+
import { usePinch as Hr } from "./utils/hooks/usePinch.js";
|
|
54
54
|
import { useDebounce as yt } from "./utils/hooks/useDebounce.js";
|
|
55
|
-
import { getPositionFromPage as
|
|
55
|
+
import { getPositionFromPage as $r, getPageFromPosition as Vr } from "./utils/calculatePage.js";
|
|
56
56
|
import { getThumbnailViewport as Ht } from "./utils/getThumbnailViewport.js";
|
|
57
57
|
import { smoothScrollTo as at } from "./utils/smoothScrollTo.js";
|
|
58
|
-
import { appConsole as
|
|
58
|
+
import { appConsole as Gr } from "./utils/appConsole.js";
|
|
59
59
|
import { FileUploadTool as fn } from "./components/layout/toolbar/FileUploadTool.js";
|
|
60
|
-
import { DarkModeTool as
|
|
61
|
-
import { ThreeDotIcon as
|
|
60
|
+
import { DarkModeTool as Ur } from "./components/layout/toolbar/DarkModeTool.js";
|
|
61
|
+
import { ThreeDotIcon as qr } from "./components/icons/ThreeDotIcon.js";
|
|
62
62
|
import { UIDropDown as gn } from "./components/ui/DropDown.js";
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import { a as
|
|
66
|
-
import {
|
|
63
|
+
import { u as It, P as He, c as ke, a as Lt, S as Zr } from "./index-353ec0a6.js";
|
|
64
|
+
import { c as Br, e as jr, b as Kr } from "./index-71898eb9.js";
|
|
65
|
+
import { a as st } from "./index-2e540713.js";
|
|
66
|
+
import { a as Xr, u as Yr, F as Jr, D as Qr, b as eo, G as Be } from "./index-5ff5dbd0.js";
|
|
67
|
+
import { h as to } from "./component-1da194e8.js";
|
|
67
68
|
import { CloseIcon as vn } from "./components/icons/CloseIcon.js";
|
|
68
69
|
import { dateFormatter as $t } from "./utils/dateFormatter.js";
|
|
69
|
-
import { PropertyItem as
|
|
70
|
-
import { useOtherToolContext as
|
|
71
|
-
import { DocumentProperties as
|
|
72
|
-
import { RotateTool as
|
|
73
|
-
import { ScrollModeTool as
|
|
70
|
+
import { PropertyItem as no } from "./components/layout/toolbar/PropertyItem.js";
|
|
71
|
+
import { useOtherToolContext as ro, OtherToolProvider as oo } from "./contexts/OtherToolContext.js";
|
|
72
|
+
import { DocumentProperties as io } from "./components/layout/toolbar/DocumentProperties.js";
|
|
73
|
+
import { RotateTool as ao } from "./components/layout/toolbar/RotateTool.js";
|
|
74
|
+
import { ScrollModeTool as so } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
74
75
|
import { MenuSeparator as Rt } from "./components/layout/toolbar/MenuSeparator.js";
|
|
75
|
-
import { FileDownloadDefaultIcon as
|
|
76
|
-
import { MenuItem as
|
|
77
|
-
import { PrintDefaultTool as
|
|
76
|
+
import { FileDownloadDefaultIcon as co } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
77
|
+
import { MenuItem as be } from "./components/layout/toolbar/MenuItem.js";
|
|
78
|
+
import { PrintDefaultTool as lo } from "./components/icons/PrintDefaultIcon.js";
|
|
78
79
|
import { FullScreenTool as _n } from "./components/layout/toolbar/FullScreenTool.js";
|
|
79
80
|
import { GoToDownIcon as wn } from "./components/icons/GoToDownIcon.js";
|
|
80
|
-
import { SelectionModeTool as
|
|
81
|
-
import { ZoomInIcon as
|
|
82
|
-
import { ZoomOutIcon as
|
|
81
|
+
import { SelectionModeTool as uo } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
82
|
+
import { ZoomInIcon as po } from "./components/icons/ZoomInIcon.js";
|
|
83
|
+
import { ZoomOutIcon as ho } from "./components/icons/ZoomOutIcon.js";
|
|
83
84
|
import { PAGE_PADDING as Vt } from "./utils/constants.js";
|
|
84
|
-
import { getZoomLevel as
|
|
85
|
-
import { SearchIcon as
|
|
85
|
+
import { getZoomLevel as mo } from "./utils/getZoomLevel.js";
|
|
86
|
+
import { SearchIcon as fo } from "./components/icons/SearchIcon.js";
|
|
86
87
|
import { UICheckbox as Gt } from "./components/ui/Checkbox.js";
|
|
87
|
-
import { ClearIcon as
|
|
88
|
+
import { ClearIcon as go } from "./components/icons/ClearIcon.js";
|
|
88
89
|
import { InfoIcon as Ut } from "./components/icons/InfoIcon.js";
|
|
89
90
|
import './assets/RPDefaultLayout.css';const $e = (e, t) => e.reduce((n, o, r) => r < t ? n + o : n, 0), ct = (e, t) => {
|
|
90
91
|
const n = Math.round(e.left) === Math.round(t.left) && Math.round(e.top) === Math.round(t.top), o = Math.round(e.left) >= Math.round(t.left) && Math.round(e.top) >= Math.round(t.top);
|
|
91
92
|
return n || o;
|
|
92
93
|
}, bn = () => {
|
|
93
|
-
const { viewMode: e } = Qe(), { scrollMode: t } =
|
|
94
|
+
const { viewMode: e } = Qe(), { scrollMode: t } = De(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ae(), c = M(), { columnCount: s } = un(), { widths: l, heights: d } = tt(), h = M(t), m = M(e), p = M(s), { targetScrollPosition: g, smoothScrolling: w } = St();
|
|
94
95
|
A(() => {
|
|
95
96
|
n != null && n.scrollToItem && (c.current = n);
|
|
96
97
|
}, [n]), A(() => {
|
|
97
|
-
|
|
98
|
+
h.current = t, m.current = e;
|
|
98
99
|
}, [t, e]);
|
|
99
100
|
const b = L(
|
|
100
|
-
(_,
|
|
101
|
+
(_, f) => {
|
|
101
102
|
if (!r)
|
|
102
103
|
return;
|
|
103
104
|
const P = Math.ceil(_ / 2) * 2 - 1;
|
|
104
105
|
if (_ === P + 1) {
|
|
105
|
-
const
|
|
106
|
+
const u = {
|
|
106
107
|
left: l[P],
|
|
107
108
|
top: 0
|
|
108
109
|
};
|
|
109
|
-
return g.current =
|
|
110
|
-
(T) => at(r,
|
|
110
|
+
return g.current = u, new Promise(
|
|
111
|
+
(T) => at(r, u, T)
|
|
111
112
|
);
|
|
112
113
|
}
|
|
113
114
|
const S = {
|
|
@@ -116,34 +117,34 @@ import './assets/RPDefaultLayout.css';const $e = (e, t) => e.reduce((n, o, r) =>
|
|
|
116
117
|
};
|
|
117
118
|
return g.current = S, r == null ? void 0 : r.scrollTo({
|
|
118
119
|
...S,
|
|
119
|
-
behavior:
|
|
120
|
+
behavior: f
|
|
120
121
|
});
|
|
121
122
|
},
|
|
122
123
|
[r, l, at]
|
|
123
124
|
);
|
|
124
125
|
return A(() => {
|
|
125
|
-
|
|
126
|
+
h.current = t, m.current = e;
|
|
126
127
|
}, [t, e]), A(() => {
|
|
127
|
-
|
|
128
|
+
p.current = s;
|
|
128
129
|
}, [s]), { scrollToPage: L(
|
|
129
|
-
(_,
|
|
130
|
+
(_, f = "smooth") => {
|
|
130
131
|
const P = _ - 1;
|
|
131
|
-
let S = P,
|
|
132
|
-
if (
|
|
133
|
-
b(_,
|
|
132
|
+
let S = P, u = 0;
|
|
133
|
+
if (m.current === Ze.DUAL_PAGE && h.current === ee.PAGE_SCROLLING) {
|
|
134
|
+
b(_, f);
|
|
134
135
|
return;
|
|
135
136
|
}
|
|
136
|
-
if (
|
|
137
|
+
if (h.current === ee.PAGE_SCROLLING) {
|
|
137
138
|
a(_);
|
|
138
139
|
return;
|
|
139
140
|
}
|
|
140
141
|
if (!c.current || !o)
|
|
141
142
|
return;
|
|
142
143
|
const T = o;
|
|
143
|
-
if (w.current = !0,
|
|
144
|
-
|
|
144
|
+
if (w.current = !0, h.current === ee.HORIZONTAL_SCROLLING) {
|
|
145
|
+
u = P;
|
|
145
146
|
const N = {
|
|
146
|
-
left: $e(l,
|
|
147
|
+
left: $e(l, u),
|
|
147
148
|
top: 0
|
|
148
149
|
};
|
|
149
150
|
return ct(N, {
|
|
@@ -151,33 +152,33 @@ import './assets/RPDefaultLayout.css';const $e = (e, t) => e.reduce((n, o, r) =>
|
|
|
151
152
|
top: T.scrollTop
|
|
152
153
|
}) && (w.current = !1), g.current = N, T.scrollTo({
|
|
153
154
|
...N,
|
|
154
|
-
behavior:
|
|
155
|
+
behavior: f
|
|
155
156
|
});
|
|
156
157
|
}
|
|
157
|
-
if (
|
|
158
|
-
|
|
158
|
+
if (m.current === Ze.DUAL_PAGE) {
|
|
159
|
+
u = P % 2, S = Math.floor(P / 2);
|
|
159
160
|
const N = {
|
|
160
|
-
left: $e(l,
|
|
161
|
-
top: $e(
|
|
161
|
+
left: $e(l, u),
|
|
162
|
+
top: $e(d, S)
|
|
162
163
|
};
|
|
163
164
|
return ct(N, {
|
|
164
165
|
left: T.scrollLeft,
|
|
165
166
|
top: T.scrollTop
|
|
166
167
|
}) && (w.current = !1), g.current = N, T.scrollTo({
|
|
167
168
|
...N,
|
|
168
|
-
behavior:
|
|
169
|
+
behavior: f
|
|
169
170
|
});
|
|
170
171
|
}
|
|
171
172
|
const C = {
|
|
172
173
|
left: 0,
|
|
173
|
-
top: $e(
|
|
174
|
+
top: $e(d, S)
|
|
174
175
|
};
|
|
175
176
|
return g.current = C, ct(C, {
|
|
176
177
|
left: T.scrollLeft,
|
|
177
178
|
top: T.scrollTop
|
|
178
179
|
}) && (w.current = !1), T.scrollTo({
|
|
179
180
|
...C,
|
|
180
|
-
behavior:
|
|
181
|
+
behavior: f
|
|
181
182
|
});
|
|
182
183
|
},
|
|
183
184
|
[
|
|
@@ -186,12 +187,12 @@ import './assets/RPDefaultLayout.css';const $e = (e, t) => e.reduce((n, o, r) =>
|
|
|
186
187
|
b,
|
|
187
188
|
a,
|
|
188
189
|
at,
|
|
189
|
-
|
|
190
|
+
d,
|
|
190
191
|
l
|
|
191
192
|
]
|
|
192
193
|
) };
|
|
193
|
-
},
|
|
194
|
-
const [t, n] =
|
|
194
|
+
}, vo = (e = 1) => {
|
|
195
|
+
const [t, n] = H(e), [o, r] = H(0), { scrollToPage: a } = bn(), c = M(1), { viewMode: s } = Qe(), { scrollMode: l } = De(), d = yt(t, 100), h = L(
|
|
195
196
|
(b) => {
|
|
196
197
|
if (!/^[0-9]*$/g.test(b.toString()) || !b)
|
|
197
198
|
return { success: !1, currentPage: c.current };
|
|
@@ -199,27 +200,27 @@ import './assets/RPDefaultLayout.css';const $e = (e, t) => e.reduce((n, o, r) =>
|
|
|
199
200
|
return _ < 0 || _ > o ? { success: !1, currentPage: c.current } : (n(_), c.current = _, { success: !0, currentPage: +b });
|
|
200
201
|
},
|
|
201
202
|
[o]
|
|
202
|
-
),
|
|
203
|
+
), m = L(h, [h]), p = L(
|
|
203
204
|
(b) => {
|
|
204
|
-
const v =
|
|
205
|
+
const v = h(b);
|
|
205
206
|
return v.success && a(v.currentPage), v;
|
|
206
207
|
},
|
|
207
|
-
[
|
|
208
|
+
[h, a]
|
|
208
209
|
), g = L(() => {
|
|
209
210
|
let b = t - 1;
|
|
210
|
-
|
|
211
|
-
}, [
|
|
211
|
+
p(b);
|
|
212
|
+
}, [p, t, s, l]), w = L(() => {
|
|
212
213
|
let b = t + 1;
|
|
213
|
-
|
|
214
|
-
}, [
|
|
214
|
+
p(b);
|
|
215
|
+
}, [p, t, s, l]);
|
|
215
216
|
return {
|
|
216
|
-
focusedPage:
|
|
217
|
+
focusedPage: d,
|
|
217
218
|
totalPages: o,
|
|
218
|
-
setFocusedPage:
|
|
219
|
+
setFocusedPage: m,
|
|
219
220
|
setTotalPages: r,
|
|
220
221
|
nextPage: w,
|
|
221
222
|
prevPage: g,
|
|
222
|
-
goToPage:
|
|
223
|
+
goToPage: p
|
|
223
224
|
};
|
|
224
225
|
}, Cn = Ke({
|
|
225
226
|
focusedPage: 0,
|
|
@@ -233,11 +234,11 @@ import './assets/RPDefaultLayout.css';const $e = (e, t) => e.reduce((n, o, r) =>
|
|
|
233
234
|
},
|
|
234
235
|
nextPage: () => {
|
|
235
236
|
}
|
|
236
|
-
}),
|
|
237
|
+
}), ae = () => {
|
|
237
238
|
const e = Xe(Cn);
|
|
238
|
-
return typeof (e == null ? void 0 : e.focusedPage) > "u" &&
|
|
239
|
-
},
|
|
240
|
-
const { pdf: t } = K(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: c, nextPage: s, prevPage: l } =
|
|
239
|
+
return typeof (e == null ? void 0 : e.focusedPage) > "u" && Gr.error("Please use this hooks inside children component of RPProvider"), e;
|
|
240
|
+
}, Ss = ({ children: e }) => {
|
|
241
|
+
const { pdf: t } = K(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: c, nextPage: s, prevPage: l } = vo();
|
|
241
242
|
return A(() => {
|
|
242
243
|
t != null && t.numPages && (a(t.numPages), r(1));
|
|
243
244
|
}, [t, a, r]), /* @__PURE__ */ i(
|
|
@@ -256,160 +257,160 @@ import './assets/RPDefaultLayout.css';const $e = (e, t) => e.reduce((n, o, r) =>
|
|
|
256
257
|
}
|
|
257
258
|
);
|
|
258
259
|
};
|
|
259
|
-
const
|
|
260
|
-
const { pdf: e, pages: t } = K(), [n, o] =
|
|
260
|
+
const _o = () => {
|
|
261
|
+
const { pdf: e, pages: t } = K(), [n, o] = H({
|
|
261
262
|
loadedPages: 0,
|
|
262
263
|
totalPages: 0,
|
|
263
264
|
percentage: 0
|
|
264
|
-
}), [r, a] =
|
|
265
|
+
}), [r, a] = H(!1), [c, s] = H(!1), [l, d] = H(null), h = M(!1);
|
|
265
266
|
A(() => {
|
|
266
|
-
|
|
267
|
-
}, [
|
|
268
|
-
const
|
|
267
|
+
h.current;
|
|
268
|
+
}, [h]);
|
|
269
|
+
const m = L(() => {
|
|
269
270
|
document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
|
|
270
271
|
const P = document.querySelector(".rp-print-zone");
|
|
271
272
|
P && P.remove();
|
|
272
|
-
}, []),
|
|
273
|
-
|
|
273
|
+
}, []), p = L(() => {
|
|
274
|
+
h.current = !1, a(!1), s(!1), d(null), o({
|
|
274
275
|
loadedPages: 0,
|
|
275
276
|
totalPages: 0,
|
|
276
277
|
percentage: 0
|
|
277
278
|
});
|
|
278
279
|
}, []), g = () => {
|
|
279
|
-
|
|
280
|
+
h.current = !0;
|
|
280
281
|
}, w = async ({
|
|
281
282
|
scratchCanvas: P,
|
|
282
283
|
pdfDocument: S,
|
|
283
|
-
pageNumber:
|
|
284
|
+
pageNumber: u,
|
|
284
285
|
viewerPdfPage: T,
|
|
285
286
|
printResolution: C,
|
|
286
287
|
optionalContentConfigPromise: x,
|
|
287
288
|
printAnnotationStoragePromise: N
|
|
288
289
|
}) => {
|
|
289
|
-
if (
|
|
290
|
-
|
|
290
|
+
if (h.current) {
|
|
291
|
+
p();
|
|
291
292
|
return;
|
|
292
293
|
}
|
|
293
|
-
const
|
|
294
|
-
P.width = Math.floor(T.width *
|
|
294
|
+
const y = C / mr.PDF;
|
|
295
|
+
P.width = Math.floor(T.width * y), P.height = Math.floor(T.height * y);
|
|
295
296
|
const O = P.getContext("2d");
|
|
296
297
|
O.save(), O.fillStyle = "rgb(255, 255, 255)", O.fillRect(0, 0, P.width, P.height), O.restore();
|
|
297
298
|
const [R, k] = await Promise.all([
|
|
298
|
-
S.getPage(
|
|
299
|
+
S.getPage(u),
|
|
299
300
|
N
|
|
300
301
|
]);
|
|
301
|
-
if (
|
|
302
|
-
|
|
302
|
+
if (h.current) {
|
|
303
|
+
p();
|
|
303
304
|
return;
|
|
304
305
|
}
|
|
305
306
|
const z = {
|
|
306
307
|
canvasContext: O,
|
|
307
|
-
transform: [
|
|
308
|
+
transform: [y, 0, 0, y, 0, 0],
|
|
308
309
|
viewport: R.getViewport({ scale: 1, rotation: T.rotation }),
|
|
309
310
|
intent: "print",
|
|
310
|
-
annotationMode:
|
|
311
|
+
annotationMode: fr.ENABLE_STORAGE,
|
|
311
312
|
optionalContentConfigPromise: x,
|
|
312
313
|
printAnnotationStorage: k
|
|
313
314
|
};
|
|
314
315
|
try {
|
|
315
316
|
return R.render(z).promise;
|
|
316
|
-
} catch (
|
|
317
|
-
throw
|
|
317
|
+
} catch (I) {
|
|
318
|
+
throw I instanceof gr || console.error(I), I;
|
|
318
319
|
}
|
|
319
320
|
}, b = L(() => {
|
|
320
321
|
const P = window.print;
|
|
321
322
|
return new Promise((S) => {
|
|
322
|
-
const
|
|
323
|
+
const u = (x) => {
|
|
323
324
|
setTimeout(() => {
|
|
324
325
|
P.call(window), setTimeout(() => x(), 20);
|
|
325
326
|
}, 0);
|
|
326
327
|
};
|
|
327
328
|
if (document.querySelector(".rp-print-zone")) {
|
|
328
|
-
|
|
329
|
+
u(S);
|
|
329
330
|
return;
|
|
330
331
|
}
|
|
331
332
|
const C = new MutationObserver(() => {
|
|
332
|
-
document.querySelector(".rp-print-zone") && (
|
|
333
|
+
document.querySelector(".rp-print-zone") && (u(S), C.disconnect());
|
|
333
334
|
});
|
|
334
335
|
C.observe(document.body, { childList: !0, subtree: !0 });
|
|
335
336
|
});
|
|
336
337
|
}, []), v = async (P) => {
|
|
337
|
-
const S = document.createElement("img"),
|
|
338
|
-
return
|
|
338
|
+
const S = document.createElement("img"), u = document.createElement("div");
|
|
339
|
+
return u.classList.add("rp-print-page"), await new Promise((T, C) => {
|
|
339
340
|
P.toBlob((x) => {
|
|
340
341
|
x ? (S.src = URL.createObjectURL(x), S.onload = () => {
|
|
341
342
|
URL.revokeObjectURL(S.src), T();
|
|
342
343
|
}, S.onerror = C) : C(new Error("Failed to create blob"));
|
|
343
344
|
});
|
|
344
345
|
}).catch(() => {
|
|
345
|
-
}),
|
|
346
|
+
}), u.appendChild(S), u;
|
|
346
347
|
}, _ = (P, S) => {
|
|
347
|
-
const
|
|
348
|
-
|
|
348
|
+
const u = document.createElement("div");
|
|
349
|
+
u.classList.add("rp-print-zone");
|
|
349
350
|
const T = document.createElement("style"), C = S.get(1);
|
|
350
351
|
if (C) {
|
|
351
352
|
const { width: x, height: N } = C == null ? void 0 : C.page.getViewport({ scale: 1 });
|
|
352
353
|
T.innerHTML = `@page { size: ${x}px ${N}px }`;
|
|
353
354
|
}
|
|
354
|
-
return
|
|
355
|
-
},
|
|
355
|
+
return u.appendChild(T), u.append(...P), u;
|
|
356
|
+
}, f = L(async () => {
|
|
356
357
|
if (!e)
|
|
357
358
|
return;
|
|
358
|
-
|
|
359
|
+
p();
|
|
359
360
|
const P = document.createElement("canvas"), S = [];
|
|
360
361
|
try {
|
|
361
362
|
e.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
|
|
362
363
|
const T = e.getOptionalContentConfig({ intent: "print" }), C = Promise.resolve(
|
|
363
364
|
e.annotationStorage.print ?? void 0
|
|
364
365
|
), x = t.size;
|
|
365
|
-
for (const [
|
|
366
|
-
if (
|
|
367
|
-
|
|
366
|
+
for (const [y, O] of t) {
|
|
367
|
+
if (h.current) {
|
|
368
|
+
p();
|
|
368
369
|
return;
|
|
369
370
|
}
|
|
370
371
|
const R = O.page.getViewport({ scale: 1 });
|
|
371
372
|
if (await w({
|
|
372
373
|
scratchCanvas: P,
|
|
373
374
|
pdfDocument: e,
|
|
374
|
-
pageNumber:
|
|
375
|
+
pageNumber: y,
|
|
375
376
|
viewerPdfPage: R,
|
|
376
377
|
printResolution: 150,
|
|
377
378
|
optionalContentConfigPromise: T,
|
|
378
379
|
printAnnotationStoragePromise: C
|
|
379
|
-
}),
|
|
380
|
-
|
|
380
|
+
}), h.current) {
|
|
381
|
+
p();
|
|
381
382
|
return;
|
|
382
383
|
}
|
|
383
384
|
const k = await v(P);
|
|
384
385
|
S.push(k);
|
|
385
386
|
const z = parseFloat((S.length / x * 100).toFixed(2));
|
|
386
387
|
o({
|
|
387
|
-
loadedPages:
|
|
388
|
+
loadedPages: y,
|
|
388
389
|
totalPages: x,
|
|
389
390
|
percentage: z
|
|
390
391
|
});
|
|
391
392
|
}
|
|
392
|
-
if (
|
|
393
|
-
|
|
393
|
+
if (h.current) {
|
|
394
|
+
p();
|
|
394
395
|
return;
|
|
395
396
|
}
|
|
396
397
|
const N = _(S, t);
|
|
397
398
|
document.body.appendChild(N), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await b();
|
|
398
|
-
} catch (
|
|
399
|
-
s(!0),
|
|
399
|
+
} catch (u) {
|
|
400
|
+
s(!0), u instanceof Error && d(u);
|
|
400
401
|
} finally {
|
|
401
402
|
P.height = 0, P.width = 0;
|
|
402
403
|
}
|
|
403
|
-
}, [e, t,
|
|
404
|
+
}, [e, t, h]);
|
|
404
405
|
return A(() => {
|
|
405
406
|
const P = () => {
|
|
406
|
-
|
|
407
|
+
p(), m();
|
|
407
408
|
};
|
|
408
409
|
return window.addEventListener("afterprint", P, !0), () => {
|
|
409
410
|
window.removeEventListener("afterprint", P, !0);
|
|
410
411
|
};
|
|
411
|
-
}, [
|
|
412
|
-
print:
|
|
412
|
+
}, [m, p]), {
|
|
413
|
+
print: f,
|
|
413
414
|
cancel: g,
|
|
414
415
|
progress: n,
|
|
415
416
|
isComplete: r,
|
|
@@ -433,11 +434,11 @@ const vo = () => {
|
|
|
433
434
|
console.error("Error in setOnError callback:", t);
|
|
434
435
|
}
|
|
435
436
|
}
|
|
436
|
-
}),
|
|
437
|
-
const [t, n] =
|
|
437
|
+
}), xs = ({ children: e }) => {
|
|
438
|
+
const [t, n] = H(null), [o, r] = H(null), { print: a, cancel: c, progress: s, isComplete: l, isError: d, error: h } = _o(), m = L((v) => {
|
|
438
439
|
v && typeof v == "function" && r(() => v);
|
|
439
|
-
}, []),
|
|
440
|
-
|
|
440
|
+
}, []), p = (v) => {
|
|
441
|
+
h && v(h);
|
|
441
442
|
}, g = L(
|
|
442
443
|
(v) => {
|
|
443
444
|
n(() => v);
|
|
@@ -447,10 +448,10 @@ const vo = () => {
|
|
|
447
448
|
A(() => {
|
|
448
449
|
l && o && w();
|
|
449
450
|
}, [l, o]), A(() => {
|
|
450
|
-
|
|
451
|
+
d && p((v) => {
|
|
451
452
|
console.error(v);
|
|
452
453
|
});
|
|
453
|
-
}, [
|
|
454
|
+
}, [d]), A(() => {
|
|
454
455
|
s && t && t(s);
|
|
455
456
|
}, [s, t]);
|
|
456
457
|
const w = () => {
|
|
@@ -459,8 +460,8 @@ const vo = () => {
|
|
|
459
460
|
print: a,
|
|
460
461
|
cancel: c,
|
|
461
462
|
setOnProgress: g,
|
|
462
|
-
setOnComplete:
|
|
463
|
-
setOnError:
|
|
463
|
+
setOnComplete: m,
|
|
464
|
+
setOnError: p,
|
|
464
465
|
progress: s
|
|
465
466
|
};
|
|
466
467
|
return /* @__PURE__ */ i(Tn.Provider, { value: b, children: e });
|
|
@@ -469,42 +470,42 @@ const vo = () => {
|
|
|
469
470
|
if (!e)
|
|
470
471
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
471
472
|
return e;
|
|
472
|
-
},
|
|
473
|
-
const [e, t] =
|
|
473
|
+
}, wo = () => {
|
|
474
|
+
const [e, t] = H({}), { pages: n } = K(), { rotate: o } = Ye(), r = F(() => Object.keys(e).length, [e]), a = L(
|
|
474
475
|
(s) => {
|
|
475
476
|
if (!n.size || s > n.size)
|
|
476
477
|
return;
|
|
477
|
-
const l = Array.from(n.values()).slice(0, s).map((
|
|
478
|
-
const { thumbnailViewport:
|
|
478
|
+
const l = Array.from(n.values()).slice(0, s).map((m) => {
|
|
479
|
+
const { thumbnailViewport: p, scale: g } = Ht(m.page, o);
|
|
479
480
|
return {
|
|
480
481
|
scale: g,
|
|
481
|
-
page:
|
|
482
|
+
page: m.page,
|
|
482
483
|
loading: !0,
|
|
483
|
-
viewport:
|
|
484
|
+
viewport: p
|
|
484
485
|
};
|
|
485
|
-
}),
|
|
486
|
-
t(
|
|
487
|
-
const
|
|
488
|
-
for (const
|
|
489
|
-
const
|
|
490
|
-
scale:
|
|
486
|
+
}), d = l.reduce((m, p) => (m[p.page.pageNumber] = p, m), {});
|
|
487
|
+
t(d);
|
|
488
|
+
const h = [];
|
|
489
|
+
for (const m of l) {
|
|
490
|
+
const p = document.createElement("canvas"), g = wt(m.page, p, {
|
|
491
|
+
scale: m.scale,
|
|
491
492
|
rotate: o
|
|
492
493
|
}).promise.then(() => {
|
|
493
|
-
const w =
|
|
494
|
+
const w = p.toDataURL();
|
|
494
495
|
return {
|
|
495
|
-
...
|
|
496
|
+
...m,
|
|
496
497
|
thumbnailSrc: w,
|
|
497
498
|
loading: !1
|
|
498
499
|
};
|
|
499
500
|
});
|
|
500
|
-
|
|
501
|
+
h.push(g);
|
|
501
502
|
}
|
|
502
|
-
Promise.all(
|
|
503
|
-
const
|
|
503
|
+
Promise.all(h).then((m) => {
|
|
504
|
+
const p = m.reduce(
|
|
504
505
|
(g, w) => (g[w.page.pageNumber] = w, g),
|
|
505
506
|
{}
|
|
506
507
|
);
|
|
507
|
-
t((g) => ({ ...g, ...
|
|
508
|
+
t((g) => ({ ...g, ...p }));
|
|
508
509
|
}).catch(() => {
|
|
509
510
|
});
|
|
510
511
|
},
|
|
@@ -520,8 +521,8 @@ const vo = () => {
|
|
|
520
521
|
const l = n.get(s);
|
|
521
522
|
if (!l)
|
|
522
523
|
return;
|
|
523
|
-
t((
|
|
524
|
-
...
|
|
524
|
+
t((h) => ({
|
|
525
|
+
...h,
|
|
525
526
|
[s]: {
|
|
526
527
|
loading: !0,
|
|
527
528
|
page: l.page,
|
|
@@ -529,18 +530,18 @@ const vo = () => {
|
|
|
529
530
|
scale: l.thumbnailScale
|
|
530
531
|
}
|
|
531
532
|
}));
|
|
532
|
-
const
|
|
533
|
-
wt(l.page,
|
|
534
|
-
const
|
|
533
|
+
const d = document.createElement("canvas");
|
|
534
|
+
wt(l.page, d, { scale: l.thumbnailScale, rotate: o }).promise.then(() => {
|
|
535
|
+
const h = d.toDataURL(), { thumbnailViewport: m, scale: p } = Ht(l.page, o);
|
|
535
536
|
return {
|
|
536
|
-
scale:
|
|
537
|
-
thumbnailSrc:
|
|
537
|
+
scale: p,
|
|
538
|
+
thumbnailSrc: h,
|
|
538
539
|
page: l.page,
|
|
539
540
|
loading: !1,
|
|
540
|
-
viewport:
|
|
541
|
+
viewport: m
|
|
541
542
|
};
|
|
542
|
-
}).then((
|
|
543
|
-
t((
|
|
543
|
+
}).then((h) => {
|
|
544
|
+
t((m) => ({ ...m, [s]: h }));
|
|
544
545
|
});
|
|
545
546
|
},
|
|
546
547
|
[n, o]
|
|
@@ -556,11 +557,11 @@ const vo = () => {
|
|
|
556
557
|
setActive: (e) => {
|
|
557
558
|
},
|
|
558
559
|
active: !1
|
|
559
|
-
}), Sn = () => Xe(Pn),
|
|
560
|
+
}), Sn = () => Xe(Pn), ys = ({
|
|
560
561
|
children: e,
|
|
561
562
|
initialThumbnailsVisible: t
|
|
562
563
|
}) => {
|
|
563
|
-
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } =
|
|
564
|
+
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = wo(), [c, s] = H(t);
|
|
564
565
|
return /* @__PURE__ */ i(
|
|
565
566
|
Pn.Provider,
|
|
566
567
|
{
|
|
@@ -568,34 +569,34 @@ const vo = () => {
|
|
|
568
569
|
children: e
|
|
569
570
|
}
|
|
570
571
|
);
|
|
571
|
-
},
|
|
572
|
-
const [n, o] =
|
|
572
|
+
}, bo = (e = {}, t = "") => {
|
|
573
|
+
const [n, o] = H(t), [r, a] = H(!1), { pdf: c, pages: s } = K(), l = tt(), d = M(!n), { currentZoom: h } = Je(), [m, p] = H([]), { setFocusedPage: g } = ae(), [w, b] = H(0), { pageScrollElementRef: v, virtualScrollableElementRef: _ } = et(), { scrollMode: f } = De(), { pagesRef: P } = Ce(), [S, u] = H(null), T = M({}), C = F(() => w === 0 ? null : m[w - 1], [w, m]), x = F(() => m.length, [m]);
|
|
573
574
|
A(() => {
|
|
574
575
|
if (!C || !s)
|
|
575
576
|
return;
|
|
576
577
|
const R = _ || v;
|
|
577
578
|
if (!R || !P)
|
|
578
579
|
return;
|
|
579
|
-
const k = s.get(C.page), z = P.clientHeight / 2,
|
|
580
|
-
let E = 0,
|
|
581
|
-
|
|
582
|
-
let
|
|
580
|
+
const k = s.get(C.page), z = P.clientHeight / 2, I = P.clientWidth / 2;
|
|
581
|
+
let E = 0, $ = 0;
|
|
582
|
+
f === ee.PAGE_SCROLLING && g(C.page), f === ee.VERTICAL_SCROLLING && (E = l.heights.slice(0, C.page - 1).reduce((B, Y) => B + Y, 0)), f === ee.HORIZONTAL_SCROLLING && ($ = l.widths.slice(0, C.page - 1).reduce((B, Y) => B + Y, 0));
|
|
583
|
+
let V;
|
|
583
584
|
if (!k)
|
|
584
585
|
return;
|
|
585
|
-
const
|
|
586
|
-
|
|
586
|
+
const q = T.current[C.page], X = k.page.getViewport({ scale: 1 });
|
|
587
|
+
V = new Pt.TextLayer({
|
|
587
588
|
viewport: X,
|
|
588
|
-
textContentSource:
|
|
589
|
+
textContentSource: q,
|
|
589
590
|
container: document.createElement("div")
|
|
590
|
-
}),
|
|
591
|
-
const
|
|
592
|
-
|
|
593
|
-
const
|
|
594
|
-
left: Math.max(
|
|
595
|
-
top: Math.max(
|
|
591
|
+
}), V.render().then(() => {
|
|
592
|
+
const B = V.textDivs[C.start.idx], [Y] = pn([C], q, V.textDivs), te = l.widths[C.page - 1], ne = l.heights[C.page - 1], j = document.createElement("div"), re = document.createElement("div");
|
|
593
|
+
B.style.position = "absolute", B.style.color = "transparent", re.style.position = "absolute", re.style.top = "0", re.style.setProperty("--scale-factor", `${h}`), j.style.position = "relative", j.style.width = `${te}px`, j.style.height = `${ne}px`, j.style.zIndex = "-1", j.appendChild(B), re.appendChild(j), P.prepend(re);
|
|
594
|
+
const le = Y.element.getBoundingClientRect(), Ie = re.getBoundingClientRect(), he = le.top - Ie.top, Le = le.left - Ie.left, se = E + he - z + le.height / 2, me = $ + Le - I + le.width / 2, Re = {
|
|
595
|
+
left: Math.max(me, 0),
|
|
596
|
+
top: Math.max(se, 0)
|
|
596
597
|
};
|
|
597
|
-
P.removeChild(
|
|
598
|
-
...
|
|
598
|
+
P.removeChild(re), R.scrollTo({
|
|
599
|
+
...Re
|
|
599
600
|
});
|
|
600
601
|
});
|
|
601
602
|
}, [
|
|
@@ -603,59 +604,59 @@ const vo = () => {
|
|
|
603
604
|
g,
|
|
604
605
|
l,
|
|
605
606
|
C,
|
|
606
|
-
|
|
607
|
+
f,
|
|
607
608
|
_,
|
|
608
609
|
v,
|
|
609
610
|
P
|
|
610
611
|
]);
|
|
611
612
|
const N = L(() => {
|
|
612
613
|
b((R) => x ? R + 1 > x ? 1 : R + 1 : 0);
|
|
613
|
-
}, [x]),
|
|
614
|
+
}, [x]), y = L(() => {
|
|
614
615
|
b((R) => x ? R - 1 <= 0 ? x : R - 1 : 0);
|
|
615
616
|
}, [x]), O = L(async (R) => {
|
|
616
617
|
if (!R)
|
|
617
618
|
return {};
|
|
618
619
|
const k = R.numPages, z = {};
|
|
619
|
-
for (let
|
|
620
|
-
if (
|
|
620
|
+
for (let I = 1; I <= k; I++) {
|
|
621
|
+
if (d.current)
|
|
621
622
|
throw "close pop over";
|
|
622
|
-
const E = await R.getPage(
|
|
623
|
-
z[
|
|
623
|
+
const E = await R.getPage(I);
|
|
624
|
+
z[I.toString()] = await E.getTextContent();
|
|
624
625
|
}
|
|
625
626
|
return z;
|
|
626
627
|
}, []);
|
|
627
628
|
return A(() => {
|
|
628
629
|
if (!n) {
|
|
629
|
-
|
|
630
|
+
d.current = !0, p([]), b(0);
|
|
630
631
|
return;
|
|
631
632
|
}
|
|
632
|
-
|
|
633
|
+
d.current = !1, a(!0), p([]), b(0), O(c).then((R) => {
|
|
633
634
|
T.current = R;
|
|
634
|
-
const z = Object.keys(R).reduce((
|
|
635
|
-
const
|
|
635
|
+
const z = Object.keys(R).reduce((I, E) => {
|
|
636
|
+
const $ = pr(
|
|
636
637
|
[n],
|
|
637
638
|
R[E],
|
|
638
639
|
Number(E) - 1,
|
|
639
640
|
e
|
|
640
|
-
).map((
|
|
641
|
-
return [...
|
|
641
|
+
).map((V, q) => ({ ...V, page: Number(E), pageMatchIdx: q }));
|
|
642
|
+
return [...I, ...$];
|
|
642
643
|
}, []);
|
|
643
|
-
|
|
644
|
+
p(z), b(z.length ? 1 : 0);
|
|
644
645
|
}).catch(() => {
|
|
645
|
-
|
|
646
|
+
p([]), b(0);
|
|
646
647
|
}).finally(() => a(!1));
|
|
647
648
|
}, [n, O, c, e]), {
|
|
648
649
|
search: n,
|
|
649
650
|
setSearch: o,
|
|
650
651
|
loading: r,
|
|
651
|
-
matches:
|
|
652
|
+
matches: m,
|
|
652
653
|
totalMatches: x,
|
|
653
654
|
currentMatchPosition: w,
|
|
654
655
|
currentMatch: C,
|
|
655
656
|
nextMatch: N,
|
|
656
|
-
prevMatch:
|
|
657
|
+
prevMatch: y,
|
|
657
658
|
currentMatchElement: S,
|
|
658
|
-
setCurrentMatchElement:
|
|
659
|
+
setCurrentMatchElement: u
|
|
659
660
|
};
|
|
660
661
|
}, xn = Ke({
|
|
661
662
|
search: "",
|
|
@@ -675,23 +676,23 @@ const vo = () => {
|
|
|
675
676
|
currentMatchElement: null,
|
|
676
677
|
setCurrentMatchElement: (e) => {
|
|
677
678
|
}
|
|
678
|
-
}),
|
|
679
|
+
}), Is = ({
|
|
679
680
|
children: e,
|
|
680
681
|
initialSearch: t
|
|
681
682
|
}) => {
|
|
682
|
-
const [n, o] =
|
|
683
|
+
const [n, o] = H({}), {
|
|
683
684
|
loading: r,
|
|
684
685
|
setSearch: a,
|
|
685
686
|
totalMatches: c,
|
|
686
687
|
currentMatchPosition: s,
|
|
687
688
|
currentMatch: l,
|
|
688
|
-
search:
|
|
689
|
-
matches:
|
|
690
|
-
nextMatch:
|
|
691
|
-
prevMatch:
|
|
689
|
+
search: d,
|
|
690
|
+
matches: h,
|
|
691
|
+
nextMatch: m,
|
|
692
|
+
prevMatch: p,
|
|
692
693
|
currentMatchElement: g,
|
|
693
694
|
setCurrentMatchElement: w
|
|
694
|
-
} =
|
|
695
|
+
} = bo(n, t);
|
|
695
696
|
return /* @__PURE__ */ i(
|
|
696
697
|
xn.Provider,
|
|
697
698
|
{
|
|
@@ -703,10 +704,10 @@ const vo = () => {
|
|
|
703
704
|
totalMatches: c,
|
|
704
705
|
currentMatchPosition: s,
|
|
705
706
|
currentMatch: l,
|
|
706
|
-
nextMatch:
|
|
707
|
-
prevMatch:
|
|
708
|
-
search:
|
|
709
|
-
matches:
|
|
707
|
+
nextMatch: m,
|
|
708
|
+
prevMatch: p,
|
|
709
|
+
search: d,
|
|
710
|
+
matches: h,
|
|
710
711
|
currentMatchElement: g,
|
|
711
712
|
setCurrentMatchElement: w
|
|
712
713
|
},
|
|
@@ -726,91 +727,91 @@ const vo = () => {
|
|
|
726
727
|
"rp-page-wrapper": "_rp-page-wrapper_h7a2q_1",
|
|
727
728
|
"rp-page": "_rp-page_h7a2q_1",
|
|
728
729
|
"rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
|
|
729
|
-
},
|
|
730
|
+
}, Co = (e) => {
|
|
730
731
|
const { pageNumber: t, onLoaded: n, onLoading: o } = e, r = M(null), { pages: a } = K(), { rotate: c } = Ye(), s = M(), { currentZoom: l } = Je();
|
|
731
732
|
return A(() => {
|
|
732
733
|
if (!a || l === 0)
|
|
733
734
|
return;
|
|
734
|
-
const
|
|
735
|
-
if (r.current &&
|
|
736
|
-
const
|
|
737
|
-
|
|
738
|
-
const
|
|
739
|
-
|
|
735
|
+
const d = a.get(t);
|
|
736
|
+
if (r.current && d) {
|
|
737
|
+
const h = r.current;
|
|
738
|
+
h.hidden = !0;
|
|
739
|
+
const m = s.current;
|
|
740
|
+
m && m.cancel(), o && o(), s.current = wt(d.page, h, {
|
|
740
741
|
scale: l,
|
|
741
742
|
rotate: c,
|
|
742
743
|
renderForms: !0
|
|
743
744
|
}), s.current.promise.then(() => {
|
|
744
|
-
|
|
745
|
+
h.hidden = !1;
|
|
745
746
|
}).catch(() => {
|
|
746
747
|
}).finally(() => {
|
|
747
748
|
n && n();
|
|
748
749
|
});
|
|
749
750
|
}
|
|
750
751
|
return () => {
|
|
751
|
-
var
|
|
752
|
-
(
|
|
752
|
+
var h;
|
|
753
|
+
(h = s.current) == null || h.cancel();
|
|
753
754
|
};
|
|
754
755
|
}, [a, t, c, l, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${t}-canvas`, ref: r });
|
|
755
756
|
}, dt = {
|
|
756
757
|
"rp-text-layer": "_rp-text-layer_kwwfn_1",
|
|
757
758
|
"rp-text-layer-text": "_rp-text-layer-text_kwwfn_9"
|
|
758
|
-
},
|
|
759
|
-
const { pageNumber: t } = e, { pages: n } = K(), o = M(null), { matches: r, currentMatch: a, setCurrentMatchElement: c } = yn(), [s, l] =
|
|
759
|
+
}, To = (e) => {
|
|
760
|
+
const { pageNumber: t } = e, { pages: n } = K(), o = M(null), { matches: r, currentMatch: a, setCurrentMatchElement: c } = yn(), [s, l] = H(
|
|
760
761
|
[]
|
|
761
|
-
),
|
|
762
|
+
), d = M(), h = M(), m = M(), p = F(() => r.filter((w) => w.pageIndex === t - 1), [r, t]), g = L(
|
|
762
763
|
(w, b, v = !1) => {
|
|
763
|
-
if (v && hn(w, b), !
|
|
764
|
-
|
|
764
|
+
if (v && hn(w, b), !p.length) {
|
|
765
|
+
m.current = void 0, l([]);
|
|
765
766
|
return;
|
|
766
767
|
}
|
|
767
|
-
const _ = pn(
|
|
768
|
+
const _ = pn(p, w, b);
|
|
768
769
|
l(_);
|
|
769
770
|
},
|
|
770
|
-
[
|
|
771
|
+
[p]
|
|
771
772
|
);
|
|
772
773
|
return A(() => {
|
|
773
774
|
var v;
|
|
774
|
-
if ((v =
|
|
775
|
+
if ((v = m.current) == null || v.classList.remove("selected"), !s.length || !a || a.pageIndex !== t - 1)
|
|
775
776
|
return;
|
|
776
|
-
const w =
|
|
777
|
+
const w = p.findIndex(
|
|
777
778
|
(_) => JSON.stringify(_) === JSON.stringify(a)
|
|
778
779
|
);
|
|
779
780
|
if (w === -1)
|
|
780
781
|
return;
|
|
781
782
|
const b = s.find((_) => _.index === w);
|
|
782
|
-
b && (
|
|
783
|
-
}, [a, s,
|
|
783
|
+
b && (m.current = b.element, c(b.element), b.element.classList.add("selected"));
|
|
784
|
+
}, [a, s, p]), A(() => {
|
|
784
785
|
const w = n.get(t);
|
|
785
786
|
if (!w || !o.current)
|
|
786
787
|
return;
|
|
787
788
|
const b = o.current;
|
|
788
|
-
return
|
|
789
|
+
return d.current && d.current.cancel(), w.page.getTextContent().then((v) => {
|
|
789
790
|
const _ = w.page.getViewport({ scale: 1 });
|
|
790
|
-
return
|
|
791
|
+
return d.current = new Pt.TextLayer({
|
|
791
792
|
viewport: _,
|
|
792
793
|
textContentSource: v,
|
|
793
794
|
container: b
|
|
794
|
-
}),
|
|
795
|
+
}), h.current = v, b && (b.innerText = ""), d.current.render();
|
|
795
796
|
}).then(() => {
|
|
796
|
-
var
|
|
797
|
+
var f;
|
|
797
798
|
[].slice.call(b.children).forEach((P) => {
|
|
798
799
|
P.classList.add(dt["rp-text-layer-text"]);
|
|
799
800
|
});
|
|
800
|
-
const _ = (
|
|
801
|
-
_ &&
|
|
801
|
+
const _ = (f = d.current) == null ? void 0 : f.textDivs;
|
|
802
|
+
_ && h.current && g(h.current, _);
|
|
802
803
|
}).catch(() => {
|
|
803
804
|
}), () => {
|
|
804
805
|
var v;
|
|
805
|
-
(v =
|
|
806
|
+
(v = d.current) == null || v.cancel();
|
|
806
807
|
};
|
|
807
808
|
}, [n, t]), A(() => {
|
|
808
809
|
var v;
|
|
809
810
|
[].slice.call(o.current.children).forEach((_) => {
|
|
810
811
|
_.classList.add(dt["rp-text-layer-text"]);
|
|
811
812
|
});
|
|
812
|
-
const b = (v =
|
|
813
|
-
b &&
|
|
813
|
+
const b = (v = d.current) == null ? void 0 : v.textDivs;
|
|
814
|
+
b && h.current && g(h.current, b, !0);
|
|
814
815
|
}, [g]), /* @__PURE__ */ i(
|
|
815
816
|
"div",
|
|
816
817
|
{
|
|
@@ -819,12 +820,12 @@ const vo = () => {
|
|
|
819
820
|
ref: o
|
|
820
821
|
}
|
|
821
822
|
);
|
|
822
|
-
},
|
|
823
|
+
}, Po = {
|
|
823
824
|
"rp-annotation-layer": "_rp-annotation-layer_o0ksd_1"
|
|
824
825
|
};
|
|
825
|
-
let
|
|
826
|
-
const
|
|
827
|
-
const { pageNumber: t } = e, n = M(null), { pages: o, pdf: r } = K(), a = M(), [c, s] =
|
|
826
|
+
let So = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
827
|
+
const xo = (e) => {
|
|
828
|
+
const { pageNumber: t } = e, n = M(null), { pages: o, pdf: r } = K(), a = M(), [c, s] = H(), { setFocusedPage: l, goToPage: d } = ae(), { scrollMode: h } = De(), { print: m } = nt(), { download: p } = Un(), g = F(() => o.get(t), [o, t]), w = F(() => g == null ? void 0 : g.page.getViewport(), [g]);
|
|
828
829
|
A(() => {
|
|
829
830
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
830
831
|
}, [r]), A(() => {
|
|
@@ -834,12 +835,12 @@ const So = (e) => {
|
|
|
834
835
|
}, [g]);
|
|
835
836
|
const b = L(
|
|
836
837
|
(v) => {
|
|
837
|
-
!c || !r || (
|
|
838
|
-
var
|
|
839
|
-
((
|
|
840
|
-
}),
|
|
838
|
+
!c || !r || (Er(v), Or(v, r, c).then((_) => {
|
|
839
|
+
var f, P;
|
|
840
|
+
((f = _ == null ? void 0 : _.data) == null ? void 0 : f.action) === "Print" ? m() : ((P = _ == null ? void 0 : _.data) == null ? void 0 : P.action) === "SaveAs" && p();
|
|
841
|
+
}), h === ee.PAGE_SCROLLING ? Mt(v, c, r, (_) => l(_.pageIndex + 1)) : Mt(v, c, r, (_) => d(_.pageIndex + 1)));
|
|
841
842
|
},
|
|
842
|
-
[r, c,
|
|
843
|
+
[r, c, d, l, h, m, p]
|
|
843
844
|
);
|
|
844
845
|
return A(() => {
|
|
845
846
|
if (!g || !c)
|
|
@@ -853,20 +854,20 @@ const So = (e) => {
|
|
|
853
854
|
}
|
|
854
855
|
const _ = /* @__PURE__ */ new Map([]);
|
|
855
856
|
for (const S of c) {
|
|
856
|
-
const { annotationType:
|
|
857
|
-
switch (
|
|
857
|
+
const { annotationType: u } = S;
|
|
858
|
+
switch (u) {
|
|
858
859
|
case kt.Link:
|
|
859
|
-
|
|
860
|
+
zr(S);
|
|
860
861
|
break;
|
|
861
862
|
case kt.Widget:
|
|
862
|
-
|
|
863
|
+
Dr(S, v, _);
|
|
863
864
|
break;
|
|
864
865
|
}
|
|
865
866
|
}
|
|
866
|
-
const
|
|
867
|
+
const f = new AbortController();
|
|
867
868
|
return (async () => {
|
|
868
869
|
var T;
|
|
869
|
-
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new
|
|
870
|
+
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new vr({
|
|
870
871
|
div: n.current,
|
|
871
872
|
accessibilityManager: void 0,
|
|
872
873
|
annotationCanvasMap: void 0,
|
|
@@ -875,47 +876,47 @@ const So = (e) => {
|
|
|
875
876
|
page: g.page,
|
|
876
877
|
viewport: v.clone({ dontFlip: !0 })
|
|
877
878
|
}), n.current && Wt(n.current, b);
|
|
878
|
-
const S = await (r == null ? void 0 : r.hasJSActions()),
|
|
879
|
-
if (
|
|
879
|
+
const S = await (r == null ? void 0 : r.hasJSActions()), u = await (r == null ? void 0 : r.getFieldObjects());
|
|
880
|
+
if (f.signal.aborted)
|
|
880
881
|
throw "abort";
|
|
881
882
|
return (T = a.current) == null ? void 0 : T.render({
|
|
882
883
|
annotations: c,
|
|
883
884
|
annotationStorage: r == null ? void 0 : r.annotationStorage,
|
|
884
885
|
hasJSActions: S,
|
|
885
|
-
fieldObjects:
|
|
886
|
+
fieldObjects: u,
|
|
886
887
|
div: n.current,
|
|
887
888
|
viewport: v.clone({ dontFlip: !0 }),
|
|
888
889
|
page: g.page,
|
|
889
|
-
imageResourcesPath:
|
|
890
|
+
imageResourcesPath: So,
|
|
890
891
|
renderForms: !0,
|
|
891
|
-
linkService: new
|
|
892
|
+
linkService: new Nr(),
|
|
892
893
|
downloadManager: null,
|
|
893
894
|
enableScripting: !1
|
|
894
895
|
});
|
|
895
896
|
})().then(() => {
|
|
896
|
-
n.current &&
|
|
897
|
+
n.current && Ar(n.current, b);
|
|
897
898
|
}).catch((S) => {
|
|
898
899
|
if (S !== "abort")
|
|
899
900
|
throw S;
|
|
900
901
|
}), () => {
|
|
901
|
-
|
|
902
|
+
f.abort("clear"), n.current && Wt(n.current, b);
|
|
902
903
|
};
|
|
903
904
|
}, [r, c, b]), /* @__PURE__ */ i(
|
|
904
905
|
"div",
|
|
905
906
|
{
|
|
906
907
|
"data-rp": `page-${t}-annotationLayer`,
|
|
907
908
|
style: { width: `${w == null ? void 0 : w.width}px`, height: `${w == null ? void 0 : w.height}px` },
|
|
908
|
-
className:
|
|
909
|
+
className: Po["rp-annotation-layer"],
|
|
909
910
|
ref: n
|
|
910
911
|
}
|
|
911
912
|
);
|
|
912
913
|
}, ut = {
|
|
913
914
|
"rp-text-highlight-layer": "_rp-text-highlight-layer_1470i_1",
|
|
914
915
|
"rp-text-highlight-layer-text": "_rp-text-highlight-layer-text_1470i_9"
|
|
915
|
-
},
|
|
916
|
-
const t = M(null), n = M(), o = M(), { pages: r } = K(), { highlightMatches: a } =
|
|
917
|
-
(l,
|
|
918
|
-
|
|
916
|
+
}, yo = ({ pageNumber: e }) => {
|
|
917
|
+
const t = M(null), n = M(), o = M(), { pages: r } = K(), { highlightMatches: a } = _r(), c = F(() => a.filter((d) => d.pageIndex === e - 1), [a]), s = L(
|
|
918
|
+
(l, d, h = !1) => {
|
|
919
|
+
h && hn(l, d), hr(c, l, d);
|
|
919
920
|
},
|
|
920
921
|
[c, r, e]
|
|
921
922
|
);
|
|
@@ -923,34 +924,34 @@ const So = (e) => {
|
|
|
923
924
|
const l = r.get(e);
|
|
924
925
|
if (!l || !t.current)
|
|
925
926
|
return;
|
|
926
|
-
const
|
|
927
|
-
return n.current && n.current.cancel(), l.page.getTextContent().then((
|
|
928
|
-
const
|
|
927
|
+
const d = t.current;
|
|
928
|
+
return n.current && n.current.cancel(), l.page.getTextContent().then((h) => {
|
|
929
|
+
const m = l.page.getViewport({ scale: 1 });
|
|
929
930
|
return n.current = new Pt.TextLayer({
|
|
930
|
-
viewport:
|
|
931
|
-
textContentSource:
|
|
932
|
-
container:
|
|
933
|
-
}), o.current =
|
|
931
|
+
viewport: m,
|
|
932
|
+
textContentSource: h,
|
|
933
|
+
container: d
|
|
934
|
+
}), o.current = h, d && (d.innerText = ""), n.current.render();
|
|
934
935
|
}).then(() => {
|
|
935
|
-
var
|
|
936
|
-
[].slice.call(
|
|
936
|
+
var p;
|
|
937
|
+
[].slice.call(d.children).forEach((g) => {
|
|
937
938
|
g.classList.add(ut["rp-text-highlight-layer-text"]);
|
|
938
939
|
});
|
|
939
|
-
const
|
|
940
|
-
|
|
940
|
+
const m = (p = n.current) == null ? void 0 : p.textDivs;
|
|
941
|
+
m && o.current && s(o.current, m);
|
|
941
942
|
}).catch(() => {
|
|
942
943
|
}), () => {
|
|
943
|
-
var
|
|
944
|
-
(
|
|
944
|
+
var h;
|
|
945
|
+
(h = n.current) == null || h.cancel();
|
|
945
946
|
};
|
|
946
947
|
}, [r, e]), A(() => {
|
|
947
|
-
var
|
|
948
|
-
[].slice.call(t.current.children).forEach((
|
|
949
|
-
|
|
948
|
+
var h;
|
|
949
|
+
[].slice.call(t.current.children).forEach((m) => {
|
|
950
|
+
m.classList.add(ut["rp-text-highlight-layer-text"]);
|
|
950
951
|
});
|
|
951
|
-
const
|
|
952
|
-
|
|
953
|
-
}, [s]), /* @__PURE__ */ i(
|
|
952
|
+
const d = (h = n.current) == null ? void 0 : h.textDivs;
|
|
953
|
+
d && o.current && s(o.current, d, !0);
|
|
954
|
+
}, [s]), /* @__PURE__ */ i(Se, { children: /* @__PURE__ */ i(
|
|
954
955
|
"div",
|
|
955
956
|
{
|
|
956
957
|
"data-rp": `page-${e}-textHighlightLayer`,
|
|
@@ -959,14 +960,14 @@ const So = (e) => {
|
|
|
959
960
|
}
|
|
960
961
|
) });
|
|
961
962
|
}, Nt = We((e, t) => {
|
|
962
|
-
const { pageNumber: n, style: o, ...r } = e, { pages: a } = K(), { rotate: c } = Ye(), { textLayer: s } =
|
|
963
|
+
const { pageNumber: n, style: o, ...r } = e, { pages: a } = K(), { rotate: c } = Ye(), { textLayer: s } = cr(), { currentZoom: l } = Je(), d = M(a.get(n)), [h, m] = H(!1), p = M(null), [g, w] = H({
|
|
963
964
|
width: 0,
|
|
964
965
|
height: 0
|
|
965
966
|
});
|
|
966
|
-
ln(t, () =>
|
|
967
|
-
if (a && (
|
|
968
|
-
const
|
|
969
|
-
w(
|
|
967
|
+
ln(t, () => p.current), A(() => {
|
|
968
|
+
if (a && (d.current = a.get(n), d.current)) {
|
|
969
|
+
const f = d.current.page.getViewport({ scale: l, rotation: c });
|
|
970
|
+
w(f);
|
|
970
971
|
}
|
|
971
972
|
}, [a, n, c, l]);
|
|
972
973
|
const b = F(() => {
|
|
@@ -980,14 +981,14 @@ const So = (e) => {
|
|
|
980
981
|
return "center";
|
|
981
982
|
}
|
|
982
983
|
}, [c, g]), v = L(() => {
|
|
983
|
-
|
|
984
|
+
m(!0);
|
|
984
985
|
}, []), _ = L(() => {
|
|
985
|
-
|
|
986
|
+
m(!1);
|
|
986
987
|
}, []);
|
|
987
988
|
return /* @__PURE__ */ i(
|
|
988
989
|
"div",
|
|
989
990
|
{
|
|
990
|
-
ref:
|
|
991
|
+
ref: p,
|
|
991
992
|
id: `page-${n}`,
|
|
992
993
|
"data-rp": `page-${n}`,
|
|
993
994
|
...r,
|
|
@@ -1007,11 +1008,11 @@ const So = (e) => {
|
|
|
1007
1008
|
},
|
|
1008
1009
|
className: lt["rp-page"],
|
|
1009
1010
|
children: [
|
|
1010
|
-
/* @__PURE__ */ i(
|
|
1011
|
-
|
|
1012
|
-
s && /* @__PURE__ */ i(
|
|
1013
|
-
/* @__PURE__ */ i(
|
|
1014
|
-
/* @__PURE__ */ i(
|
|
1011
|
+
/* @__PURE__ */ i(Co, { onLoading: v, onLoaded: _, pageNumber: n }),
|
|
1012
|
+
h && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(xt, {}) }),
|
|
1013
|
+
s && /* @__PURE__ */ i(To, { pageNumber: n }),
|
|
1014
|
+
/* @__PURE__ */ i(yo, { pageNumber: n }),
|
|
1015
|
+
/* @__PURE__ */ i(xo, { pageNumber: n })
|
|
1015
1016
|
]
|
|
1016
1017
|
}
|
|
1017
1018
|
)
|
|
@@ -1028,25 +1029,25 @@ function bt(e, t) {
|
|
|
1028
1029
|
return n.__proto__ = o, n;
|
|
1029
1030
|
}, bt(e, t);
|
|
1030
1031
|
}
|
|
1031
|
-
function
|
|
1032
|
+
function Io(e, t) {
|
|
1032
1033
|
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, bt(e, t);
|
|
1033
1034
|
}
|
|
1034
1035
|
var Zt = Number.isNaN || function(t) {
|
|
1035
1036
|
return typeof t == "number" && t !== t;
|
|
1036
1037
|
};
|
|
1037
|
-
function
|
|
1038
|
+
function Lo(e, t) {
|
|
1038
1039
|
return !!(e === t || Zt(e) && Zt(t));
|
|
1039
1040
|
}
|
|
1040
|
-
function
|
|
1041
|
+
function Ro(e, t) {
|
|
1041
1042
|
if (e.length !== t.length)
|
|
1042
1043
|
return !1;
|
|
1043
1044
|
for (var n = 0; n < e.length; n++)
|
|
1044
|
-
if (!
|
|
1045
|
+
if (!Lo(e[n], t[n]))
|
|
1045
1046
|
return !1;
|
|
1046
1047
|
return !0;
|
|
1047
1048
|
}
|
|
1048
1049
|
function pt(e, t) {
|
|
1049
|
-
t === void 0 && (t =
|
|
1050
|
+
t === void 0 && (t = Ro);
|
|
1050
1051
|
var n, o = [], r, a = !1;
|
|
1051
1052
|
function c() {
|
|
1052
1053
|
for (var s = [], l = 0; l < arguments.length; l++)
|
|
@@ -1067,7 +1068,7 @@ function Bt(e, t) {
|
|
|
1067
1068
|
}
|
|
1068
1069
|
return n;
|
|
1069
1070
|
}
|
|
1070
|
-
var
|
|
1071
|
+
var No = typeof performance == "object" && typeof performance.now == "function", jt = No ? function() {
|
|
1071
1072
|
return performance.now();
|
|
1072
1073
|
} : function() {
|
|
1073
1074
|
return Date.now();
|
|
@@ -1075,7 +1076,7 @@ var Ro = typeof performance == "object" && typeof performance.now == "function",
|
|
|
1075
1076
|
function Kt(e) {
|
|
1076
1077
|
cancelAnimationFrame(e.id);
|
|
1077
1078
|
}
|
|
1078
|
-
function
|
|
1079
|
+
function Eo(e, t) {
|
|
1079
1080
|
var n = jt();
|
|
1080
1081
|
function o() {
|
|
1081
1082
|
jt() - n >= t ? e.call(null) : r.id = requestAnimationFrame(o);
|
|
@@ -1086,126 +1087,126 @@ function No(e, t) {
|
|
|
1086
1087
|
return r;
|
|
1087
1088
|
}
|
|
1088
1089
|
var ht = -1;
|
|
1089
|
-
function
|
|
1090
|
+
function Oo(e) {
|
|
1090
1091
|
if (e === void 0 && (e = !1), ht === -1 || e) {
|
|
1091
1092
|
var t = document.createElement("div"), n = t.style;
|
|
1092
1093
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), ht = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
|
|
1093
1094
|
}
|
|
1094
1095
|
return ht;
|
|
1095
1096
|
}
|
|
1096
|
-
var
|
|
1097
|
+
var Ne = null;
|
|
1097
1098
|
function Xt(e) {
|
|
1098
|
-
if (e === void 0 && (e = !1),
|
|
1099
|
+
if (e === void 0 && (e = !1), Ne === null || e) {
|
|
1099
1100
|
var t = document.createElement("div"), n = t.style;
|
|
1100
1101
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
1101
1102
|
var o = document.createElement("div"), r = o.style;
|
|
1102
|
-
return r.width = "100px", r.height = "100px", t.appendChild(o), document.body.appendChild(t), t.scrollLeft > 0 ?
|
|
1103
|
+
return r.width = "100px", r.height = "100px", t.appendChild(o), document.body.appendChild(t), t.scrollLeft > 0 ? Ne = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? Ne = "negative" : Ne = "positive-ascending"), document.body.removeChild(t), Ne;
|
|
1103
1104
|
}
|
|
1104
|
-
return
|
|
1105
|
+
return Ne;
|
|
1105
1106
|
}
|
|
1106
|
-
var
|
|
1107
|
+
var Do = 150, zo = function(t) {
|
|
1107
1108
|
var n = t.columnIndex;
|
|
1108
1109
|
t.data;
|
|
1109
1110
|
var o = t.rowIndex;
|
|
1110
1111
|
return o + ":" + n;
|
|
1111
1112
|
}, Ge = null, Ue = null, qe = null;
|
|
1112
1113
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Ge = /* @__PURE__ */ new WeakSet(), Ue = /* @__PURE__ */ new WeakSet(), qe = /* @__PURE__ */ new WeakSet());
|
|
1113
|
-
function
|
|
1114
|
-
var t, n = e.getColumnOffset, o = e.getColumnStartIndexForOffset, r = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, c = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, l = e.getOffsetForColumnAndAlignment,
|
|
1114
|
+
function Ao(e) {
|
|
1115
|
+
var t, n = e.getColumnOffset, o = e.getColumnStartIndexForOffset, r = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, c = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, l = e.getOffsetForColumnAndAlignment, d = e.getOffsetForRowAndAlignment, h = e.getRowHeight, m = e.getRowOffset, p = e.getRowStartIndexForOffset, g = e.getRowStopIndexForStartIndex, w = e.initInstanceProps, b = e.shouldResetStyleCacheOnItemSizeChange, v = e.validateProps;
|
|
1115
1116
|
return t = /* @__PURE__ */ function(_) {
|
|
1116
|
-
|
|
1117
|
-
function
|
|
1118
|
-
var
|
|
1119
|
-
return
|
|
1120
|
-
instance: qt(
|
|
1117
|
+
Io(f, _);
|
|
1118
|
+
function f(S) {
|
|
1119
|
+
var u;
|
|
1120
|
+
return u = _.call(this, S) || this, u._instanceProps = w(u.props, qt(u)), u._resetIsScrollingTimeoutId = null, u._outerRef = void 0, u.state = {
|
|
1121
|
+
instance: qt(u),
|
|
1121
1122
|
isScrolling: !1,
|
|
1122
1123
|
horizontalScrollDirection: "forward",
|
|
1123
|
-
scrollLeft: typeof
|
|
1124
|
-
scrollTop: typeof
|
|
1124
|
+
scrollLeft: typeof u.props.initialScrollLeft == "number" ? u.props.initialScrollLeft : 0,
|
|
1125
|
+
scrollTop: typeof u.props.initialScrollTop == "number" ? u.props.initialScrollTop : 0,
|
|
1125
1126
|
scrollUpdateWasRequested: !1,
|
|
1126
1127
|
verticalScrollDirection: "forward"
|
|
1127
|
-
},
|
|
1128
|
-
return
|
|
1128
|
+
}, u._callOnItemsRendered = void 0, u._callOnItemsRendered = pt(function(T, C, x, N, y, O, R, k) {
|
|
1129
|
+
return u.props.onItemsRendered({
|
|
1129
1130
|
overscanColumnStartIndex: T,
|
|
1130
1131
|
overscanColumnStopIndex: C,
|
|
1131
1132
|
overscanRowStartIndex: x,
|
|
1132
1133
|
overscanRowStopIndex: N,
|
|
1133
|
-
visibleColumnStartIndex:
|
|
1134
|
+
visibleColumnStartIndex: y,
|
|
1134
1135
|
visibleColumnStopIndex: O,
|
|
1135
1136
|
visibleRowStartIndex: R,
|
|
1136
1137
|
visibleRowStopIndex: k
|
|
1137
1138
|
});
|
|
1138
|
-
}),
|
|
1139
|
-
return
|
|
1139
|
+
}), u._callOnScroll = void 0, u._callOnScroll = pt(function(T, C, x, N, y) {
|
|
1140
|
+
return u.props.onScroll({
|
|
1140
1141
|
horizontalScrollDirection: x,
|
|
1141
1142
|
scrollLeft: T,
|
|
1142
1143
|
scrollTop: C,
|
|
1143
1144
|
verticalScrollDirection: N,
|
|
1144
|
-
scrollUpdateWasRequested:
|
|
1145
|
+
scrollUpdateWasRequested: y
|
|
1145
1146
|
});
|
|
1146
|
-
}),
|
|
1147
|
-
var x =
|
|
1147
|
+
}), u._getItemStyle = void 0, u._getItemStyle = function(T, C) {
|
|
1148
|
+
var x = u.props, N = x.columnWidth, y = x.direction, O = x.rowHeight, R = u._getItemStyleCache(b && N, b && y, b && O), k = T + ":" + C, z;
|
|
1148
1149
|
if (R.hasOwnProperty(k))
|
|
1149
1150
|
z = R[k];
|
|
1150
1151
|
else {
|
|
1151
|
-
var
|
|
1152
|
+
var I = n(u.props, C, u._instanceProps), E = y === "rtl";
|
|
1152
1153
|
R[k] = z = {
|
|
1153
1154
|
position: "absolute",
|
|
1154
|
-
left: E ? void 0 :
|
|
1155
|
-
right: E ?
|
|
1156
|
-
top:
|
|
1157
|
-
height:
|
|
1158
|
-
width: a(
|
|
1155
|
+
left: E ? void 0 : I,
|
|
1156
|
+
right: E ? I : void 0,
|
|
1157
|
+
top: m(u.props, T, u._instanceProps),
|
|
1158
|
+
height: h(u.props, T, u._instanceProps),
|
|
1159
|
+
width: a(u.props, C, u._instanceProps)
|
|
1159
1160
|
};
|
|
1160
1161
|
}
|
|
1161
1162
|
return z;
|
|
1162
|
-
},
|
|
1163
|
+
}, u._getItemStyleCache = void 0, u._getItemStyleCache = pt(function(T, C, x) {
|
|
1163
1164
|
return {};
|
|
1164
|
-
}),
|
|
1165
|
-
var C = T.currentTarget, x = C.clientHeight, N = C.clientWidth,
|
|
1166
|
-
|
|
1167
|
-
if (z.scrollLeft ===
|
|
1165
|
+
}), u._onScroll = function(T) {
|
|
1166
|
+
var C = T.currentTarget, x = C.clientHeight, N = C.clientWidth, y = C.scrollLeft, O = C.scrollTop, R = C.scrollHeight, k = C.scrollWidth;
|
|
1167
|
+
u.setState(function(z) {
|
|
1168
|
+
if (z.scrollLeft === y && z.scrollTop === O)
|
|
1168
1169
|
return null;
|
|
1169
|
-
var
|
|
1170
|
-
if (
|
|
1170
|
+
var I = u.props.direction, E = y;
|
|
1171
|
+
if (I === "rtl")
|
|
1171
1172
|
switch (Xt()) {
|
|
1172
1173
|
case "negative":
|
|
1173
|
-
E = -
|
|
1174
|
+
E = -y;
|
|
1174
1175
|
break;
|
|
1175
1176
|
case "positive-descending":
|
|
1176
|
-
E = k - N -
|
|
1177
|
+
E = k - N - y;
|
|
1177
1178
|
break;
|
|
1178
1179
|
}
|
|
1179
1180
|
E = Math.max(0, Math.min(E, k - N));
|
|
1180
|
-
var
|
|
1181
|
+
var $ = Math.max(0, Math.min(O, R - x));
|
|
1181
1182
|
return {
|
|
1182
1183
|
isScrolling: !0,
|
|
1183
|
-
horizontalScrollDirection: z.scrollLeft <
|
|
1184
|
+
horizontalScrollDirection: z.scrollLeft < y ? "forward" : "backward",
|
|
1184
1185
|
scrollLeft: E,
|
|
1185
|
-
scrollTop:
|
|
1186
|
+
scrollTop: $,
|
|
1186
1187
|
verticalScrollDirection: z.scrollTop < O ? "forward" : "backward",
|
|
1187
1188
|
scrollUpdateWasRequested: !1
|
|
1188
1189
|
};
|
|
1189
|
-
},
|
|
1190
|
-
},
|
|
1191
|
-
var C =
|
|
1192
|
-
|
|
1193
|
-
},
|
|
1194
|
-
|
|
1195
|
-
},
|
|
1196
|
-
|
|
1190
|
+
}, u._resetIsScrollingDebounced);
|
|
1191
|
+
}, u._outerRefSetter = function(T) {
|
|
1192
|
+
var C = u.props.outerRef;
|
|
1193
|
+
u._outerRef = T, typeof C == "function" ? C(T) : C != null && typeof C == "object" && C.hasOwnProperty("current") && (C.current = T);
|
|
1194
|
+
}, u._resetIsScrollingDebounced = function() {
|
|
1195
|
+
u._resetIsScrollingTimeoutId !== null && Kt(u._resetIsScrollingTimeoutId), u._resetIsScrollingTimeoutId = Eo(u._resetIsScrolling, Do);
|
|
1196
|
+
}, u._resetIsScrolling = function() {
|
|
1197
|
+
u._resetIsScrollingTimeoutId = null, u.setState({
|
|
1197
1198
|
isScrolling: !1
|
|
1198
1199
|
}, function() {
|
|
1199
|
-
|
|
1200
|
+
u._getItemStyleCache(-1);
|
|
1200
1201
|
});
|
|
1201
|
-
},
|
|
1202
|
+
}, u;
|
|
1202
1203
|
}
|
|
1203
|
-
|
|
1204
|
-
return
|
|
1204
|
+
f.getDerivedStateFromProps = function(u, T) {
|
|
1205
|
+
return Fo(u, T), v(u), null;
|
|
1205
1206
|
};
|
|
1206
|
-
var P =
|
|
1207
|
-
return P.scrollTo = function(
|
|
1208
|
-
var T =
|
|
1207
|
+
var P = f.prototype;
|
|
1208
|
+
return P.scrollTo = function(u) {
|
|
1209
|
+
var T = u.scrollLeft, C = u.scrollTop;
|
|
1209
1210
|
T !== void 0 && (T = Math.max(0, T)), C !== void 0 && (C = Math.max(0, C)), this.setState(function(x) {
|
|
1210
1211
|
return T === void 0 && (T = x.scrollLeft), C === void 0 && (C = x.scrollTop), x.scrollLeft === T && x.scrollTop === C ? null : {
|
|
1211
1212
|
horizontalScrollDirection: x.scrollLeft < T ? "forward" : "backward",
|
|
@@ -1215,118 +1216,118 @@ function zo(e) {
|
|
|
1215
1216
|
verticalScrollDirection: x.scrollTop < C ? "forward" : "backward"
|
|
1216
1217
|
};
|
|
1217
1218
|
}, this._resetIsScrollingDebounced);
|
|
1218
|
-
}, P.scrollToItem = function(
|
|
1219
|
-
var T =
|
|
1219
|
+
}, P.scrollToItem = function(u) {
|
|
1220
|
+
var T = u.align, C = T === void 0 ? "auto" : T, x = u.columnIndex, N = u.rowIndex, y = this.props, O = y.columnCount, R = y.height, k = y.rowCount, z = y.width, I = this.state, E = I.scrollLeft, $ = I.scrollTop, V = Oo();
|
|
1220
1221
|
x !== void 0 && (x = Math.max(0, Math.min(x, O - 1))), N !== void 0 && (N = Math.max(0, Math.min(N, k - 1)));
|
|
1221
|
-
var
|
|
1222
|
+
var q = c(this.props, this._instanceProps), X = s(this.props, this._instanceProps), B = X > z ? V : 0, Y = q > R ? V : 0;
|
|
1222
1223
|
this.scrollTo({
|
|
1223
|
-
scrollLeft: x !== void 0 ? l(this.props, x, C, E, this._instanceProps,
|
|
1224
|
-
scrollTop: N !== void 0 ?
|
|
1224
|
+
scrollLeft: x !== void 0 ? l(this.props, x, C, E, this._instanceProps, Y) : E,
|
|
1225
|
+
scrollTop: N !== void 0 ? d(this.props, N, C, $, this._instanceProps, B) : $
|
|
1225
1226
|
});
|
|
1226
1227
|
}, P.componentDidMount = function() {
|
|
1227
|
-
var
|
|
1228
|
+
var u = this.props, T = u.initialScrollLeft, C = u.initialScrollTop;
|
|
1228
1229
|
if (this._outerRef != null) {
|
|
1229
1230
|
var x = this._outerRef;
|
|
1230
1231
|
typeof T == "number" && (x.scrollLeft = T), typeof C == "number" && (x.scrollTop = C);
|
|
1231
1232
|
}
|
|
1232
1233
|
this._callPropsCallbacks();
|
|
1233
1234
|
}, P.componentDidUpdate = function() {
|
|
1234
|
-
var
|
|
1235
|
+
var u = this.props.direction, T = this.state, C = T.scrollLeft, x = T.scrollTop, N = T.scrollUpdateWasRequested;
|
|
1235
1236
|
if (N && this._outerRef != null) {
|
|
1236
|
-
var
|
|
1237
|
-
if (
|
|
1237
|
+
var y = this._outerRef;
|
|
1238
|
+
if (u === "rtl")
|
|
1238
1239
|
switch (Xt()) {
|
|
1239
1240
|
case "negative":
|
|
1240
|
-
|
|
1241
|
+
y.scrollLeft = -C;
|
|
1241
1242
|
break;
|
|
1242
1243
|
case "positive-ascending":
|
|
1243
|
-
|
|
1244
|
+
y.scrollLeft = C;
|
|
1244
1245
|
break;
|
|
1245
1246
|
default:
|
|
1246
|
-
var O =
|
|
1247
|
-
|
|
1247
|
+
var O = y.clientWidth, R = y.scrollWidth;
|
|
1248
|
+
y.scrollLeft = R - O - C;
|
|
1248
1249
|
break;
|
|
1249
1250
|
}
|
|
1250
1251
|
else
|
|
1251
|
-
|
|
1252
|
-
|
|
1252
|
+
y.scrollLeft = Math.max(0, C);
|
|
1253
|
+
y.scrollTop = Math.max(0, x);
|
|
1253
1254
|
}
|
|
1254
1255
|
this._callPropsCallbacks();
|
|
1255
1256
|
}, P.componentWillUnmount = function() {
|
|
1256
1257
|
this._resetIsScrollingTimeoutId !== null && Kt(this._resetIsScrollingTimeoutId);
|
|
1257
1258
|
}, P.render = function() {
|
|
1258
|
-
var
|
|
1259
|
-
if (x > 0 &&
|
|
1260
|
-
for (var
|
|
1261
|
-
for (var
|
|
1262
|
-
|
|
1263
|
-
columnIndex:
|
|
1259
|
+
var u = this.props, T = u.children, C = u.className, x = u.columnCount, N = u.direction, y = u.height, O = u.innerRef, R = u.innerElementType, k = u.innerTagName, z = u.itemData, I = u.itemKey, E = I === void 0 ? zo : I, $ = u.outerElementType, V = u.outerTagName, q = u.rowCount, X = u.style, B = u.useIsScrolling, Y = u.width, te = this.state.isScrolling, ne = this._getHorizontalRangeToRender(), j = ne[0], re = ne[1], le = this._getVerticalRangeToRender(), Ie = le[0], he = le[1], Le = [];
|
|
1260
|
+
if (x > 0 && q)
|
|
1261
|
+
for (var se = Ie; se <= he; se++)
|
|
1262
|
+
for (var me = j; me <= re; me++)
|
|
1263
|
+
Le.push(Ve(T, {
|
|
1264
|
+
columnIndex: me,
|
|
1264
1265
|
data: z,
|
|
1265
|
-
isScrolling:
|
|
1266
|
+
isScrolling: B ? te : void 0,
|
|
1266
1267
|
key: E({
|
|
1267
|
-
columnIndex:
|
|
1268
|
+
columnIndex: me,
|
|
1268
1269
|
data: z,
|
|
1269
|
-
rowIndex:
|
|
1270
|
+
rowIndex: se
|
|
1270
1271
|
}),
|
|
1271
|
-
rowIndex:
|
|
1272
|
-
style: this._getItemStyle(
|
|
1272
|
+
rowIndex: se,
|
|
1273
|
+
style: this._getItemStyle(se, me)
|
|
1273
1274
|
}));
|
|
1274
|
-
var
|
|
1275
|
-
return Ve(
|
|
1275
|
+
var Re = c(this.props, this._instanceProps), rt = s(this.props, this._instanceProps);
|
|
1276
|
+
return Ve($ || V || "div", {
|
|
1276
1277
|
className: C,
|
|
1277
1278
|
onScroll: this._onScroll,
|
|
1278
1279
|
ref: this._outerRefSetter,
|
|
1279
|
-
style:
|
|
1280
|
+
style: Fr({
|
|
1280
1281
|
position: "relative",
|
|
1281
|
-
height:
|
|
1282
|
-
width:
|
|
1282
|
+
height: y,
|
|
1283
|
+
width: Y,
|
|
1283
1284
|
overflow: "auto",
|
|
1284
1285
|
WebkitOverflowScrolling: "touch",
|
|
1285
1286
|
willChange: "transform",
|
|
1286
1287
|
direction: N
|
|
1287
1288
|
}, X)
|
|
1288
1289
|
}, Ve(R || k || "div", {
|
|
1289
|
-
children:
|
|
1290
|
+
children: Le,
|
|
1290
1291
|
ref: O,
|
|
1291
1292
|
style: {
|
|
1292
|
-
height:
|
|
1293
|
+
height: Re,
|
|
1293
1294
|
pointerEvents: te ? "none" : void 0,
|
|
1294
1295
|
width: rt
|
|
1295
1296
|
}
|
|
1296
1297
|
}));
|
|
1297
1298
|
}, P._callPropsCallbacks = function() {
|
|
1298
|
-
var
|
|
1299
|
+
var u = this.props, T = u.columnCount, C = u.onItemsRendered, x = u.onScroll, N = u.rowCount;
|
|
1299
1300
|
if (typeof C == "function" && T > 0 && N > 0) {
|
|
1300
|
-
var
|
|
1301
|
-
this._callOnItemsRendered(O, R, E,
|
|
1301
|
+
var y = this._getHorizontalRangeToRender(), O = y[0], R = y[1], k = y[2], z = y[3], I = this._getVerticalRangeToRender(), E = I[0], $ = I[1], V = I[2], q = I[3];
|
|
1302
|
+
this._callOnItemsRendered(O, R, E, $, k, z, V, q);
|
|
1302
1303
|
}
|
|
1303
1304
|
if (typeof x == "function") {
|
|
1304
|
-
var X = this.state,
|
|
1305
|
-
this._callOnScroll(
|
|
1305
|
+
var X = this.state, B = X.horizontalScrollDirection, Y = X.scrollLeft, te = X.scrollTop, ne = X.scrollUpdateWasRequested, j = X.verticalScrollDirection;
|
|
1306
|
+
this._callOnScroll(Y, te, B, j, ne);
|
|
1306
1307
|
}
|
|
1307
1308
|
}, P._getHorizontalRangeToRender = function() {
|
|
1308
|
-
var
|
|
1309
|
-
if (T === 0 ||
|
|
1309
|
+
var u = this.props, T = u.columnCount, C = u.overscanColumnCount, x = u.overscanColumnsCount, N = u.overscanCount, y = u.rowCount, O = this.state, R = O.horizontalScrollDirection, k = O.isScrolling, z = O.scrollLeft, I = C || x || N || 1;
|
|
1310
|
+
if (T === 0 || y === 0)
|
|
1310
1311
|
return [0, 0, 0, 0];
|
|
1311
|
-
var E = o(this.props, z, this._instanceProps),
|
|
1312
|
-
return [Math.max(0, E -
|
|
1312
|
+
var E = o(this.props, z, this._instanceProps), $ = r(this.props, E, z, this._instanceProps), V = !k || R === "backward" ? Math.max(1, I) : 1, q = !k || R === "forward" ? Math.max(1, I) : 1;
|
|
1313
|
+
return [Math.max(0, E - V), Math.max(0, Math.min(T - 1, $ + q)), E, $];
|
|
1313
1314
|
}, P._getVerticalRangeToRender = function() {
|
|
1314
|
-
var
|
|
1315
|
-
if (T === 0 ||
|
|
1315
|
+
var u = this.props, T = u.columnCount, C = u.overscanCount, x = u.overscanRowCount, N = u.overscanRowsCount, y = u.rowCount, O = this.state, R = O.isScrolling, k = O.verticalScrollDirection, z = O.scrollTop, I = x || N || C || 1;
|
|
1316
|
+
if (T === 0 || y === 0)
|
|
1316
1317
|
return [0, 0, 0, 0];
|
|
1317
|
-
var E =
|
|
1318
|
-
return [Math.max(0, E -
|
|
1319
|
-
},
|
|
1320
|
-
}(
|
|
1318
|
+
var E = p(this.props, z, this._instanceProps), $ = g(this.props, E, z, this._instanceProps), V = !R || k === "backward" ? Math.max(1, I) : 1, q = !R || k === "forward" ? Math.max(1, I) : 1;
|
|
1319
|
+
return [Math.max(0, E - V), Math.max(0, Math.min(y - 1, $ + q)), E, $];
|
|
1320
|
+
}, f;
|
|
1321
|
+
}(rr), t.defaultProps = {
|
|
1321
1322
|
direction: "ltr",
|
|
1322
1323
|
itemData: void 0,
|
|
1323
1324
|
useIsScrolling: !1
|
|
1324
1325
|
}, t;
|
|
1325
1326
|
}
|
|
1326
|
-
var
|
|
1327
|
-
var o = t.children, r = t.direction, a = t.height, c = t.innerTagName, s = t.outerTagName, l = t.overscanColumnsCount,
|
|
1327
|
+
var Fo = function(t, n) {
|
|
1328
|
+
var o = t.children, r = t.direction, a = t.height, c = t.innerTagName, s = t.outerTagName, l = t.overscanColumnsCount, d = t.overscanCount, h = t.overscanRowsCount, m = t.width, p = n.instance;
|
|
1328
1329
|
if (process.env.NODE_ENV !== "production") {
|
|
1329
|
-
if (typeof
|
|
1330
|
+
if (typeof d == "number" && Ge && !Ge.has(p) && (Ge.add(p), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof l == "number" || typeof h == "number") && Ue && !Ue.has(p) && (Ue.add(p), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || s != null) && qe && !qe.has(p) && (qe.add(p), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
|
|
1330
1331
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1331
1332
|
switch (r) {
|
|
1332
1333
|
case "ltr":
|
|
@@ -1335,8 +1336,8 @@ var Ao = function(t, n) {
|
|
|
1335
1336
|
default:
|
|
1336
1337
|
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + r + '" was specified.'));
|
|
1337
1338
|
}
|
|
1338
|
-
if (typeof
|
|
1339
|
-
throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (
|
|
1339
|
+
if (typeof m != "number")
|
|
1340
|
+
throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (m === null ? "null" : typeof m) + '" was specified.'));
|
|
1340
1341
|
if (typeof a != "number")
|
|
1341
1342
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
|
|
1342
1343
|
}
|
|
@@ -1346,30 +1347,30 @@ var Ao = function(t, n) {
|
|
|
1346
1347
|
var l = r[c];
|
|
1347
1348
|
s = l.offset + l.size;
|
|
1348
1349
|
}
|
|
1349
|
-
var
|
|
1350
|
-
return s +
|
|
1350
|
+
var d = o - c - 1, h = d * a;
|
|
1351
|
+
return s + h;
|
|
1351
1352
|
}, Ln = function(t, n) {
|
|
1352
1353
|
var o = t.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, c = n.lastMeasuredColumnIndex, s = 0;
|
|
1353
1354
|
if (c >= o && (c = o - 1), c >= 0) {
|
|
1354
1355
|
var l = r[c];
|
|
1355
1356
|
s = l.offset + l.size;
|
|
1356
1357
|
}
|
|
1357
|
-
var
|
|
1358
|
-
return s +
|
|
1358
|
+
var d = o - c - 1, h = d * a;
|
|
1359
|
+
return s + h;
|
|
1359
1360
|
}, ve = function(t, n, o, r) {
|
|
1360
1361
|
var a, c, s;
|
|
1361
1362
|
if (t === "column" ? (a = r.columnMetadataMap, c = n.columnWidth, s = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, c = n.rowHeight, s = r.lastMeasuredRowIndex), o > s) {
|
|
1362
1363
|
var l = 0;
|
|
1363
1364
|
if (s >= 0) {
|
|
1364
|
-
var
|
|
1365
|
-
l =
|
|
1365
|
+
var d = a[s];
|
|
1366
|
+
l = d.offset + d.size;
|
|
1366
1367
|
}
|
|
1367
|
-
for (var
|
|
1368
|
-
var
|
|
1369
|
-
a[
|
|
1368
|
+
for (var h = s + 1; h <= o; h++) {
|
|
1369
|
+
var m = c(h);
|
|
1370
|
+
a[h] = {
|
|
1370
1371
|
offset: l,
|
|
1371
|
-
size:
|
|
1372
|
-
}, l +=
|
|
1372
|
+
size: m
|
|
1373
|
+
}, l += m;
|
|
1373
1374
|
}
|
|
1374
1375
|
t === "column" ? r.lastMeasuredColumnIndex = o : r.lastMeasuredRowIndex = o;
|
|
1375
1376
|
}
|
|
@@ -1378,7 +1379,7 @@ var Ao = function(t, n) {
|
|
|
1378
1379
|
var a, c;
|
|
1379
1380
|
t === "column" ? (a = o.columnMetadataMap, c = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, c = o.lastMeasuredRowIndex);
|
|
1380
1381
|
var s = c > 0 ? a[c].offset : 0;
|
|
1381
|
-
return s >= r ? Rn(t, n, o, c, 0, r) :
|
|
1382
|
+
return s >= r ? Rn(t, n, o, c, 0, r) : ko(t, n, o, Math.max(0, c), r);
|
|
1382
1383
|
}, Rn = function(t, n, o, r, a, c) {
|
|
1383
1384
|
for (; a <= r; ) {
|
|
1384
1385
|
var s = a + Math.floor((r - a) / 2), l = ve(t, n, s, o).offset;
|
|
@@ -1387,24 +1388,24 @@ var Ao = function(t, n) {
|
|
|
1387
1388
|
l < c ? a = s + 1 : l > c && (r = s - 1);
|
|
1388
1389
|
}
|
|
1389
1390
|
return a > 0 ? a - 1 : 0;
|
|
1390
|
-
},
|
|
1391
|
+
}, ko = function(t, n, o, r, a) {
|
|
1391
1392
|
for (var c = t === "column" ? n.columnCount : n.rowCount, s = 1; r < c && ve(t, n, r, o).offset < a; )
|
|
1392
1393
|
r += s, s *= 2;
|
|
1393
1394
|
return Rn(t, n, o, Math.min(r, c - 1), Math.floor(r / 2), a);
|
|
1394
1395
|
}, Qt = function(t, n, o, r, a, c, s) {
|
|
1395
|
-
var l = t === "column" ? n.width : n.height,
|
|
1396
|
-
switch (r === "smart" && (a >=
|
|
1396
|
+
var l = t === "column" ? n.width : n.height, d = ve(t, n, o, c), h = t === "column" ? Ln(n, c) : In(n, c), m = Math.max(0, Math.min(h - l, d.offset)), p = Math.max(0, d.offset - l + s + d.size);
|
|
1397
|
+
switch (r === "smart" && (a >= p - l && a <= m + l ? r = "auto" : r = "center"), r) {
|
|
1397
1398
|
case "start":
|
|
1398
|
-
return
|
|
1399
|
+
return m;
|
|
1399
1400
|
case "end":
|
|
1400
|
-
return
|
|
1401
|
+
return p;
|
|
1401
1402
|
case "center":
|
|
1402
|
-
return Math.round(
|
|
1403
|
+
return Math.round(p + (m - p) / 2);
|
|
1403
1404
|
case "auto":
|
|
1404
1405
|
default:
|
|
1405
|
-
return a >=
|
|
1406
|
+
return a >= p && a <= m ? a : p > m || a < p ? p : m;
|
|
1406
1407
|
}
|
|
1407
|
-
},
|
|
1408
|
+
}, Mo = /* @__PURE__ */ Ao({
|
|
1408
1409
|
getColumnOffset: function(t, n, o) {
|
|
1409
1410
|
return ve("column", t, n, o).offset;
|
|
1410
1411
|
},
|
|
@@ -1412,9 +1413,9 @@ var Ao = function(t, n) {
|
|
|
1412
1413
|
return Jt("column", t, o, n);
|
|
1413
1414
|
},
|
|
1414
1415
|
getColumnStopIndexForStartIndex: function(t, n, o, r) {
|
|
1415
|
-
for (var a = t.columnCount, c = t.width, s = ve("column", t, n, r), l = o + c,
|
|
1416
|
-
|
|
1417
|
-
return
|
|
1416
|
+
for (var a = t.columnCount, c = t.width, s = ve("column", t, n, r), l = o + c, d = s.offset + s.size, h = n; h < a - 1 && d < l; )
|
|
1417
|
+
h++, d += ve("column", t, h, r).size;
|
|
1418
|
+
return h;
|
|
1418
1419
|
},
|
|
1419
1420
|
getColumnWidth: function(t, n, o) {
|
|
1420
1421
|
return o.columnMetadataMap[n].size;
|
|
@@ -1437,9 +1438,9 @@ var Ao = function(t, n) {
|
|
|
1437
1438
|
return Jt("row", t, o, n);
|
|
1438
1439
|
},
|
|
1439
1440
|
getRowStopIndexForStartIndex: function(t, n, o, r) {
|
|
1440
|
-
for (var a = t.rowCount, c = t.height, s = ve("row", t, n, r), l = o + c,
|
|
1441
|
-
|
|
1442
|
-
return
|
|
1441
|
+
for (var a = t.rowCount, c = t.height, s = ve("row", t, n, r), l = o + c, d = s.offset + s.size, h = n; h < a - 1 && d < l; )
|
|
1442
|
+
h++, d += ve("row", t, h, r).size;
|
|
1443
|
+
return h;
|
|
1443
1444
|
},
|
|
1444
1445
|
initInstanceProps: function(t, n) {
|
|
1445
1446
|
var o = t, r = o.estimatedColumnWidth, a = o.estimatedRowHeight, c = {
|
|
@@ -1461,8 +1462,8 @@ var Ao = function(t, n) {
|
|
|
1461
1462
|
shouldForceUpdate: l
|
|
1462
1463
|
});
|
|
1463
1464
|
}, n.resetAfterIndices = function(s) {
|
|
1464
|
-
var l = s.columnIndex,
|
|
1465
|
-
typeof l == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, l - 1)), typeof
|
|
1465
|
+
var l = s.columnIndex, d = s.rowIndex, h = s.shouldForceUpdate, m = h === void 0 ? !0 : h;
|
|
1466
|
+
typeof l == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, l - 1)), typeof d == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, d - 1)), n._getItemStyleCache(-1), m && n.forceUpdate();
|
|
1466
1467
|
}, c;
|
|
1467
1468
|
},
|
|
1468
1469
|
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
@@ -1486,37 +1487,37 @@ function en(e, t) {
|
|
|
1486
1487
|
return !0;
|
|
1487
1488
|
return !1;
|
|
1488
1489
|
}
|
|
1489
|
-
var
|
|
1490
|
-
function
|
|
1491
|
-
var n = e.style, o = Bt(e,
|
|
1490
|
+
var Wo = ["style"], Ho = ["style"];
|
|
1491
|
+
function $o(e, t) {
|
|
1492
|
+
var n = e.style, o = Bt(e, Wo), r = t.style, a = Bt(t, Ho);
|
|
1492
1493
|
return !en(n, r) && !en(o, a);
|
|
1493
1494
|
}
|
|
1494
|
-
const
|
|
1495
|
-
const { viewMode: e } = Qe(), { scrollMode: t } =
|
|
1495
|
+
const Vo = () => {
|
|
1496
|
+
const { viewMode: e } = Qe(), { scrollMode: t } = De(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = tt(), a = L(
|
|
1496
1497
|
(g) => r.widths[g] || 0,
|
|
1497
1498
|
[r.widths]
|
|
1498
1499
|
), c = L(
|
|
1499
1500
|
(g) => r.heights[g] || 0,
|
|
1500
1501
|
[r.heights]
|
|
1501
|
-
), s = F(() => r.heights.length, [r.heights]), l = F(() => Math.max(...r.widths), [r.widths]),
|
|
1502
|
+
), s = F(() => r.heights.length, [r.heights]), l = F(() => Math.max(...r.widths), [r.widths]), d = F(() => t === ee.HORIZONTAL_SCROLLING ? s : e === Ze.DUAL_PAGE ? 2 : 1, [e, t, t, s, o, l]);
|
|
1502
1503
|
A(() => {
|
|
1503
|
-
n(
|
|
1504
|
-
}, [
|
|
1505
|
-
const
|
|
1504
|
+
n(d);
|
|
1505
|
+
}, [d, n]);
|
|
1506
|
+
const h = F(() => t === ee.HORIZONTAL_SCROLLING || t === ee.PAGE_SCROLLING ? 1 : Math.round(s / d), [d, s, t]), m = F(() => r.heights.reduce((g, w) => g + w, 0) / r.heights.length || 0, [r]), p = F(() => r.widths.reduce((g, w) => g + w, 0) / r.heights.length || 0, [r]);
|
|
1506
1507
|
return {
|
|
1507
|
-
rowCount:
|
|
1508
|
+
rowCount: h,
|
|
1508
1509
|
rowHeight: c,
|
|
1509
|
-
columnCount:
|
|
1510
|
+
columnCount: d,
|
|
1510
1511
|
columnWidth: a,
|
|
1511
1512
|
pageDimension: r,
|
|
1512
|
-
estimatedRowHeight:
|
|
1513
|
-
estimatedColumnWidth:
|
|
1513
|
+
estimatedRowHeight: m,
|
|
1514
|
+
estimatedColumnWidth: p
|
|
1514
1515
|
};
|
|
1515
1516
|
};
|
|
1516
|
-
let
|
|
1517
|
-
typeof window < "u" ?
|
|
1517
|
+
let ie;
|
|
1518
|
+
typeof window < "u" ? ie = window : typeof self < "u" ? ie = self : ie = global;
|
|
1518
1519
|
let Ct = null, Tt = null;
|
|
1519
|
-
const tn = 20, mt =
|
|
1520
|
+
const tn = 20, mt = ie.clearTimeout, nn = ie.setTimeout, ft = ie.cancelAnimationFrame || ie.mozCancelAnimationFrame || ie.webkitCancelAnimationFrame, rn = ie.requestAnimationFrame || ie.mozRequestAnimationFrame || ie.webkitRequestAnimationFrame;
|
|
1520
1521
|
ft == null || rn == null ? (Ct = mt, Tt = function(t) {
|
|
1521
1522
|
return nn(t, tn);
|
|
1522
1523
|
}) : (Ct = function([t, n]) {
|
|
@@ -1529,79 +1530,79 @@ ft == null || rn == null ? (Ct = mt, Tt = function(t) {
|
|
|
1529
1530
|
}, tn);
|
|
1530
1531
|
return [n, o];
|
|
1531
1532
|
});
|
|
1532
|
-
function
|
|
1533
|
+
function Go(e) {
|
|
1533
1534
|
let t, n, o, r, a, c, s;
|
|
1534
1535
|
const l = typeof document < "u" && document.attachEvent;
|
|
1535
1536
|
if (!l) {
|
|
1536
1537
|
c = function(_) {
|
|
1537
|
-
const
|
|
1538
|
-
S.scrollLeft = S.scrollWidth, S.scrollTop = S.scrollHeight,
|
|
1538
|
+
const f = _.__resizeTriggers__, P = f.firstElementChild, S = f.lastElementChild, u = P.firstElementChild;
|
|
1539
|
+
S.scrollLeft = S.scrollWidth, S.scrollTop = S.scrollHeight, u.style.width = P.offsetWidth + 1 + "px", u.style.height = P.offsetHeight + 1 + "px", P.scrollLeft = P.scrollWidth, P.scrollTop = P.scrollHeight;
|
|
1539
1540
|
}, a = function(_) {
|
|
1540
1541
|
return _.offsetWidth !== _.__resizeLast__.width || _.offsetHeight !== _.__resizeLast__.height;
|
|
1541
1542
|
}, s = function(_) {
|
|
1542
1543
|
if (_.target.className && typeof _.target.className.indexOf == "function" && _.target.className.indexOf("contract-trigger") < 0 && _.target.className.indexOf("expand-trigger") < 0)
|
|
1543
1544
|
return;
|
|
1544
|
-
const
|
|
1545
|
+
const f = this;
|
|
1545
1546
|
c(this), this.__resizeRAF__ && Ct(this.__resizeRAF__), this.__resizeRAF__ = Tt(function() {
|
|
1546
|
-
a(
|
|
1547
|
-
|
|
1547
|
+
a(f) && (f.__resizeLast__.width = f.offsetWidth, f.__resizeLast__.height = f.offsetHeight, f.__resizeListeners__.forEach(function(u) {
|
|
1548
|
+
u.call(f, _);
|
|
1548
1549
|
}));
|
|
1549
1550
|
});
|
|
1550
1551
|
};
|
|
1551
|
-
let
|
|
1552
|
+
let p = !1, g = "";
|
|
1552
1553
|
o = "animationstart";
|
|
1553
1554
|
const w = "Webkit Moz O ms".split(" ");
|
|
1554
1555
|
let b = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), v = "";
|
|
1555
1556
|
{
|
|
1556
1557
|
const _ = document.createElement("fakeelement");
|
|
1557
|
-
if (_.style.animationName !== void 0 && (
|
|
1558
|
-
for (let
|
|
1559
|
-
if (_.style[w[
|
|
1560
|
-
v = w[
|
|
1558
|
+
if (_.style.animationName !== void 0 && (p = !0), p === !1) {
|
|
1559
|
+
for (let f = 0; f < w.length; f++)
|
|
1560
|
+
if (_.style[w[f] + "AnimationName"] !== void 0) {
|
|
1561
|
+
v = w[f], g = "-" + v.toLowerCase() + "-", o = b[f], p = !0;
|
|
1561
1562
|
break;
|
|
1562
1563
|
}
|
|
1563
1564
|
}
|
|
1564
1565
|
}
|
|
1565
1566
|
n = "resizeanim", t = "@" + g + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = g + "animation: 1ms " + n + "; ";
|
|
1566
1567
|
}
|
|
1567
|
-
const
|
|
1568
|
-
if (!
|
|
1569
|
-
const g = (t || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', w =
|
|
1570
|
-
b.id = "detectElementResize", b.type = "text/css", e != null && b.setAttribute("nonce", e), b.styleSheet ? b.styleSheet.cssText = g : b.appendChild(
|
|
1568
|
+
const d = function(p) {
|
|
1569
|
+
if (!p.getElementById("detectElementResize")) {
|
|
1570
|
+
const g = (t || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', w = p.head || p.getElementsByTagName("head")[0], b = p.createElement("style");
|
|
1571
|
+
b.id = "detectElementResize", b.type = "text/css", e != null && b.setAttribute("nonce", e), b.styleSheet ? b.styleSheet.cssText = g : b.appendChild(p.createTextNode(g)), w.appendChild(b);
|
|
1571
1572
|
}
|
|
1572
1573
|
};
|
|
1573
1574
|
return {
|
|
1574
|
-
addResizeListener: function(
|
|
1575
|
+
addResizeListener: function(p, g) {
|
|
1575
1576
|
if (l)
|
|
1576
|
-
|
|
1577
|
+
p.attachEvent("onresize", g);
|
|
1577
1578
|
else {
|
|
1578
|
-
if (!
|
|
1579
|
-
const w =
|
|
1580
|
-
b && b.position === "static" && (
|
|
1579
|
+
if (!p.__resizeTriggers__) {
|
|
1580
|
+
const w = p.ownerDocument, b = ie.getComputedStyle(p);
|
|
1581
|
+
b && b.position === "static" && (p.style.position = "relative"), d(w), p.__resizeLast__ = {}, p.__resizeListeners__ = [], (p.__resizeTriggers__ = w.createElement("div")).className = "resize-triggers";
|
|
1581
1582
|
const v = w.createElement("div");
|
|
1582
1583
|
v.className = "expand-trigger", v.appendChild(w.createElement("div"));
|
|
1583
1584
|
const _ = w.createElement("div");
|
|
1584
|
-
_.className = "contract-trigger",
|
|
1585
|
-
P.animationName === n && c(
|
|
1586
|
-
},
|
|
1585
|
+
_.className = "contract-trigger", p.__resizeTriggers__.appendChild(v), p.__resizeTriggers__.appendChild(_), p.appendChild(p.__resizeTriggers__), c(p), p.addEventListener("scroll", s, !0), o && (p.__resizeTriggers__.__animationListener__ = function(P) {
|
|
1586
|
+
P.animationName === n && c(p);
|
|
1587
|
+
}, p.__resizeTriggers__.addEventListener(o, p.__resizeTriggers__.__animationListener__));
|
|
1587
1588
|
}
|
|
1588
|
-
|
|
1589
|
+
p.__resizeListeners__.push(g);
|
|
1589
1590
|
}
|
|
1590
1591
|
},
|
|
1591
|
-
removeResizeListener: function(
|
|
1592
|
+
removeResizeListener: function(p, g) {
|
|
1592
1593
|
if (l)
|
|
1593
|
-
|
|
1594
|
-
else if (
|
|
1595
|
-
|
|
1594
|
+
p.detachEvent("onresize", g);
|
|
1595
|
+
else if (p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(g), 1), !p.__resizeListeners__.length) {
|
|
1596
|
+
p.removeEventListener("scroll", s, !0), p.__resizeTriggers__.__animationListener__ && (p.__resizeTriggers__.removeEventListener(o, p.__resizeTriggers__.__animationListener__), p.__resizeTriggers__.__animationListener__ = null);
|
|
1596
1597
|
try {
|
|
1597
|
-
|
|
1598
|
+
p.__resizeTriggers__ = !p.removeChild(p.__resizeTriggers__);
|
|
1598
1599
|
} catch {
|
|
1599
1600
|
}
|
|
1600
1601
|
}
|
|
1601
1602
|
}
|
|
1602
1603
|
};
|
|
1603
1604
|
}
|
|
1604
|
-
class
|
|
1605
|
+
class Uo extends or {
|
|
1605
1606
|
constructor(...t) {
|
|
1606
1607
|
super(...t), this.state = {
|
|
1607
1608
|
height: this.props.defaultHeight || 0,
|
|
@@ -1616,16 +1617,16 @@ class Go extends rr {
|
|
|
1616
1617
|
onResize: r
|
|
1617
1618
|
} = this.props;
|
|
1618
1619
|
if (this._parentNode) {
|
|
1619
|
-
const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), s = parseFloat(a.paddingRight || "0"), l = parseFloat(a.paddingTop || "0"),
|
|
1620
|
-
(!n && (this.state.height !== g || this.state.scaledHeight !==
|
|
1620
|
+
const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), s = parseFloat(a.paddingRight || "0"), l = parseFloat(a.paddingTop || "0"), d = parseFloat(a.paddingBottom || "0"), h = this._parentNode.getBoundingClientRect(), m = h.height - l - d, p = h.width - c - s, g = this._parentNode.offsetHeight - l - d, w = this._parentNode.offsetWidth - c - s;
|
|
1621
|
+
(!n && (this.state.height !== g || this.state.scaledHeight !== m) || !o && (this.state.width !== w || this.state.scaledWidth !== p)) && (this.setState({
|
|
1621
1622
|
height: g,
|
|
1622
1623
|
width: w,
|
|
1623
|
-
scaledHeight:
|
|
1624
|
-
scaledWidth:
|
|
1624
|
+
scaledHeight: m,
|
|
1625
|
+
scaledWidth: p
|
|
1625
1626
|
}), typeof r == "function" && r({
|
|
1626
1627
|
height: g,
|
|
1627
|
-
scaledHeight:
|
|
1628
|
-
scaledWidth:
|
|
1628
|
+
scaledHeight: m,
|
|
1629
|
+
scaledWidth: p,
|
|
1629
1630
|
width: w
|
|
1630
1631
|
}));
|
|
1631
1632
|
}
|
|
@@ -1642,7 +1643,7 @@ class Go extends rr {
|
|
|
1642
1643
|
const o = n.ownerDocument.defaultView.ResizeObserver;
|
|
1643
1644
|
o != null ? (this._resizeObserver = new o(() => {
|
|
1644
1645
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1645
|
-
}), this._resizeObserver.observe(n)) : (this._detectElementResize =
|
|
1646
|
+
}), this._resizeObserver.observe(n)) : (this._detectElementResize = Go(t), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1646
1647
|
}
|
|
1647
1648
|
}
|
|
1648
1649
|
componentWillUnmount() {
|
|
@@ -1658,34 +1659,34 @@ class Go extends rr {
|
|
|
1658
1659
|
doNotBailOutOnEmptyChildren: c = !1,
|
|
1659
1660
|
nonce: s,
|
|
1660
1661
|
onResize: l,
|
|
1661
|
-
style:
|
|
1662
|
-
tagName:
|
|
1663
|
-
...
|
|
1662
|
+
style: d = {},
|
|
1663
|
+
tagName: h = "div",
|
|
1664
|
+
...m
|
|
1664
1665
|
} = this.props, {
|
|
1665
|
-
height:
|
|
1666
|
+
height: p,
|
|
1666
1667
|
scaledHeight: g,
|
|
1667
1668
|
scaledWidth: w,
|
|
1668
1669
|
width: b
|
|
1669
1670
|
} = this.state, v = {
|
|
1670
1671
|
overflow: "visible"
|
|
1671
1672
|
}, _ = {};
|
|
1672
|
-
let
|
|
1673
|
-
return r || (
|
|
1673
|
+
let f = !1;
|
|
1674
|
+
return r || (p === 0 && (f = !0), v.height = 0, _.height = p, _.scaledHeight = g), a || (b === 0 && (f = !0), v.width = 0, _.width = b, _.scaledWidth = w), c && (f = !1), Ve(h, {
|
|
1674
1675
|
ref: this._setRef,
|
|
1675
1676
|
style: {
|
|
1676
1677
|
...v,
|
|
1677
|
-
...
|
|
1678
|
+
...d
|
|
1678
1679
|
},
|
|
1679
|
-
...
|
|
1680
|
-
}, !
|
|
1680
|
+
...m
|
|
1681
|
+
}, !f && t(_));
|
|
1681
1682
|
}
|
|
1682
1683
|
}
|
|
1683
|
-
const
|
|
1684
|
-
const { focusedPage: n, totalPages: o } =
|
|
1684
|
+
const qo = ({ widths: e, heights: t }) => {
|
|
1685
|
+
const { focusedPage: n, totalPages: o } = ae(), r = F(() => {
|
|
1685
1686
|
const s = [], l = Math.ceil(n / 2) * 2 - 1;
|
|
1686
1687
|
if (s.push(l), l + 1 < o) {
|
|
1687
|
-
const
|
|
1688
|
-
s.push(
|
|
1688
|
+
const d = l + 1;
|
|
1689
|
+
s.push(d);
|
|
1689
1690
|
}
|
|
1690
1691
|
return s;
|
|
1691
1692
|
}, [n, o]), a = F(() => [
|
|
@@ -1704,8 +1705,8 @@ const Uo = ({ widths: e, heights: t }) => {
|
|
|
1704
1705
|
}
|
|
1705
1706
|
], [e, t, r]), c = F(() => a.reduce((s, l) => s + Number(l.width || 0), 0), [a]);
|
|
1706
1707
|
return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: r.map((s, l) => /* @__PURE__ */ i(Nt, { style: a[l], pageNumber: s }, s)) });
|
|
1707
|
-
},
|
|
1708
|
-
const { focusedPage: n } =
|
|
1708
|
+
}, Zo = ({ widths: e, heights: t }) => {
|
|
1709
|
+
const { focusedPage: n } = ae(), o = F(() => ({
|
|
1709
1710
|
position: "absolute",
|
|
1710
1711
|
width: e(n - 1),
|
|
1711
1712
|
height: t(n - 1)
|
|
@@ -1720,23 +1721,23 @@ const Uo = ({ widths: e, heights: t }) => {
|
|
|
1720
1721
|
children: /* @__PURE__ */ i(Nt, { style: o, pageNumber: n }, n)
|
|
1721
1722
|
}
|
|
1722
1723
|
);
|
|
1723
|
-
},
|
|
1724
|
-
const o = M(), { contentRef: r } =
|
|
1725
|
-
const v = c[b], _ =
|
|
1724
|
+
}, Bo = (e, t, n) => {
|
|
1725
|
+
const o = M(), { contentRef: r } = Ce(), { heights: a, widths: c } = tt(), { setFocusedPage: s } = ae(), [l, d] = H([]), { smoothScrolling: h } = St(), m = yt(l, 0, 500), p = F(() => a.map((w, b) => {
|
|
1726
|
+
const v = c[b], _ = $r(b + 1, e), f = v * _.columnIndex, P = w * _.rowIndex, S = f + v, u = P + w;
|
|
1726
1727
|
return {
|
|
1727
1728
|
pageNumber: b + 1,
|
|
1728
1729
|
..._,
|
|
1729
1730
|
width: v,
|
|
1730
1731
|
height: w,
|
|
1731
|
-
startX:
|
|
1732
|
+
startX: f,
|
|
1732
1733
|
startY: P,
|
|
1733
1734
|
endX: S,
|
|
1734
|
-
endY:
|
|
1735
|
+
endY: u
|
|
1735
1736
|
};
|
|
1736
1737
|
}), [a, c, e, t]);
|
|
1737
1738
|
A(() => {
|
|
1738
|
-
|
|
1739
|
-
}, [
|
|
1739
|
+
m.length > 0 && !h.current && s(m[0].pageNumber);
|
|
1740
|
+
}, [m, s]);
|
|
1740
1741
|
const g = L(
|
|
1741
1742
|
(w) => {
|
|
1742
1743
|
o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
|
|
@@ -1745,20 +1746,20 @@ const Uo = ({ widths: e, heights: t }) => {
|
|
|
1745
1746
|
startLeft: b.scrollLeft,
|
|
1746
1747
|
endTop: b.scrollTop + b.clientHeight,
|
|
1747
1748
|
endLeft: b.scrollLeft + b.clientWidth
|
|
1748
|
-
}, _ =
|
|
1749
|
-
const P =
|
|
1749
|
+
}, _ = p.filter((f) => {
|
|
1750
|
+
const P = f.endX >= v.startLeft && f.endY >= v.startTop, S = f.startX <= v.endLeft && f.startY <= v.endTop;
|
|
1750
1751
|
return P && S;
|
|
1751
|
-
}).map((
|
|
1752
|
-
const P = v.startLeft >
|
|
1752
|
+
}).map((f) => {
|
|
1753
|
+
const P = v.startLeft > f.startX ? v.startLeft : f.startX, S = v.startTop > f.startY ? v.startTop : f.startY, u = v.endLeft < f.endX ? v.endLeft : f.endX, T = v.endTop < f.endY ? v.endTop : f.endY, C = u - P, x = T - S, y = +(C * x / (f.width * f.height) * 100).toFixed(2);
|
|
1753
1754
|
return {
|
|
1754
|
-
pageNumber:
|
|
1755
|
-
ratio:
|
|
1755
|
+
pageNumber: f.pageNumber,
|
|
1756
|
+
ratio: y
|
|
1756
1757
|
};
|
|
1757
|
-
}).sort((
|
|
1758
|
-
|
|
1758
|
+
}).sort((f, P) => P.ratio - f.ratio);
|
|
1759
|
+
d(_);
|
|
1759
1760
|
});
|
|
1760
1761
|
},
|
|
1761
|
-
[r,
|
|
1762
|
+
[r, p]
|
|
1762
1763
|
);
|
|
1763
1764
|
A(() => {
|
|
1764
1765
|
if (n)
|
|
@@ -1766,192 +1767,192 @@ const Uo = ({ widths: e, heights: t }) => {
|
|
|
1766
1767
|
n == null || n.removeEventListener("scroll", g);
|
|
1767
1768
|
};
|
|
1768
1769
|
}, [n, g]);
|
|
1769
|
-
},
|
|
1770
|
-
const r =
|
|
1770
|
+
}, jo = ir(({ columnIndex: e, rowIndex: t, data: n, style: o }) => {
|
|
1771
|
+
const r = Vr(t, e, n.columnCount);
|
|
1771
1772
|
return /* @__PURE__ */ i(Nt, { style: o, pageNumber: r }, r);
|
|
1772
|
-
},
|
|
1773
|
-
const { initialPage: e = 1, initialScrollMode: t } =
|
|
1774
|
-
virtualScrollRef:
|
|
1775
|
-
getVirtualScrollRef:
|
|
1776
|
-
getPageScrollElementRef:
|
|
1777
|
-
getVirtualScrollableElementRef:
|
|
1778
|
-
setTotalInnerDimensions:
|
|
1779
|
-
virtualScrollableElementRef:
|
|
1780
|
-
totalInnerDimensions:
|
|
1781
|
-
pageScrollElementRef:
|
|
1782
|
-
} = et(),
|
|
1783
|
-
|
|
1784
|
-
),
|
|
1785
|
-
viewMode:
|
|
1786
|
-
scrollMode:
|
|
1787
|
-
}),
|
|
1788
|
-
pageDimension:
|
|
1789
|
-
rowCount:
|
|
1790
|
-
rowHeight:
|
|
1791
|
-
columnCount:
|
|
1792
|
-
columnWidth:
|
|
1793
|
-
estimatedColumnWidth:
|
|
1794
|
-
estimatedRowHeight:
|
|
1795
|
-
} =
|
|
1796
|
-
|
|
1797
|
-
const
|
|
1773
|
+
}, $o), Ls = () => {
|
|
1774
|
+
const { initialPage: e = 1, initialScrollMode: t, instanceId: n } = dr(), { pagesRef: o, setPagesRef: r } = Ce(), { scrollToPage: a } = bn(), {
|
|
1775
|
+
virtualScrollRef: c,
|
|
1776
|
+
getVirtualScrollRef: s,
|
|
1777
|
+
getPageScrollElementRef: l,
|
|
1778
|
+
getVirtualScrollableElementRef: d,
|
|
1779
|
+
setTotalInnerDimensions: h,
|
|
1780
|
+
virtualScrollableElementRef: m,
|
|
1781
|
+
totalInnerDimensions: p,
|
|
1782
|
+
pageScrollElementRef: g
|
|
1783
|
+
} = et(), w = M(!0), { nextPage: b, prevPage: v, setFocusedPage: _, focusedPage: f } = ae(), { scrollMode: P } = De(), { viewMode: S } = Qe(), u = M(null), { loading: T } = K(), { LoaderImageComponent: C } = mn(), { smoothScrolling: x, targetScrollPosition: N } = St(), y = M(
|
|
1784
|
+
p
|
|
1785
|
+
), O = M({
|
|
1786
|
+
viewMode: S,
|
|
1787
|
+
scrollMode: P
|
|
1788
|
+
}), R = M(!1), k = M(), { isFullScreen: z } = ur(), {
|
|
1789
|
+
pageDimension: I,
|
|
1790
|
+
rowCount: E,
|
|
1791
|
+
rowHeight: $,
|
|
1792
|
+
columnCount: V,
|
|
1793
|
+
columnWidth: q,
|
|
1794
|
+
estimatedColumnWidth: X,
|
|
1795
|
+
estimatedRowHeight: B
|
|
1796
|
+
} = Vo(), Y = yt(p, 100), te = M();
|
|
1797
|
+
Bo(V, E, m);
|
|
1798
|
+
const ne = M({
|
|
1798
1799
|
scrollTop: 0,
|
|
1799
1800
|
scrollLeft: 0
|
|
1800
1801
|
});
|
|
1801
|
-
|
|
1802
|
-
const { isPressed:
|
|
1803
|
-
isPressed:
|
|
1804
|
-
}),
|
|
1805
|
-
columnCount:
|
|
1806
|
-
}), [
|
|
1807
|
-
(
|
|
1808
|
-
const
|
|
1809
|
-
!
|
|
1802
|
+
Hr(o);
|
|
1803
|
+
const { isPressed: j } = Mr(), { selectionMode: re } = lr(), { initializeGrabScroll: le, resetGrabState: Ie } = Wr({
|
|
1804
|
+
isPressed: j
|
|
1805
|
+
}), he = F(() => re === sr.HAND, [re]), Le = F(() => ({
|
|
1806
|
+
columnCount: V
|
|
1807
|
+
}), [V]), se = L(
|
|
1808
|
+
(W) => {
|
|
1809
|
+
const G = document.activeElement !== o;
|
|
1810
|
+
!z && G || (["ArrowUp", "ArrowLeft"].includes(W.key) ? (W.preventDefault(), v()) : ["ArrowDown", "ArrowRight"].includes(W.key) && (W.preventDefault(), b()));
|
|
1810
1811
|
},
|
|
1811
|
-
[
|
|
1812
|
+
[b, v, z, P]
|
|
1812
1813
|
);
|
|
1813
|
-
A(() => (window.addEventListener("keydown",
|
|
1814
|
-
window.removeEventListener("keydown",
|
|
1815
|
-
}), [
|
|
1816
|
-
if (
|
|
1817
|
-
for (let
|
|
1818
|
-
for (let
|
|
1819
|
-
|
|
1820
|
-
columnIndex:
|
|
1821
|
-
rowIndex:
|
|
1814
|
+
A(() => (window.addEventListener("keydown", se), () => {
|
|
1815
|
+
window.removeEventListener("keydown", se);
|
|
1816
|
+
}), [se]), A(() => {
|
|
1817
|
+
if (u.current && (u.current.style.position = "relative"), !!c)
|
|
1818
|
+
for (let W = 0; W < E; W++)
|
|
1819
|
+
for (let G = 0; G < V; G++)
|
|
1820
|
+
c.resetAfterIndices({
|
|
1821
|
+
columnIndex: G,
|
|
1822
|
+
rowIndex: W,
|
|
1822
1823
|
shouldForceUpdate: !0
|
|
1823
1824
|
});
|
|
1824
|
-
}, [
|
|
1825
|
+
}, [E, V, I, c]);
|
|
1825
1826
|
const me = L(
|
|
1826
|
-
(
|
|
1827
|
-
if (!
|
|
1827
|
+
(W, G) => {
|
|
1828
|
+
if (!m)
|
|
1828
1829
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
1829
|
-
const fe =
|
|
1830
|
-
return fe || ge ?
|
|
1831
|
-
scrollTop:
|
|
1832
|
-
scrollLeft:
|
|
1830
|
+
const fe = ne.current.scrollTop > G, ge = ne.current.scrollLeft > W;
|
|
1831
|
+
return fe || ge ? ne.current : {
|
|
1832
|
+
scrollTop: m.scrollTop,
|
|
1833
|
+
scrollLeft: m.scrollLeft
|
|
1833
1834
|
};
|
|
1834
1835
|
},
|
|
1835
|
-
[
|
|
1836
|
-
),
|
|
1837
|
-
(
|
|
1838
|
-
if (
|
|
1839
|
-
|
|
1836
|
+
[m]
|
|
1837
|
+
), Re = L(
|
|
1838
|
+
(W, G) => {
|
|
1839
|
+
if (O.current.viewMode !== S || O.current.scrollMode !== P) {
|
|
1840
|
+
te.current && clearTimeout(te.current), R.current = !0, a(f, "auto"), te.current = setTimeout(() => {
|
|
1840
1841
|
requestAnimationFrame(() => {
|
|
1841
|
-
|
|
1842
|
+
O.current = { viewMode: S, scrollMode: P };
|
|
1842
1843
|
});
|
|
1843
1844
|
}, 100);
|
|
1844
1845
|
return;
|
|
1845
1846
|
}
|
|
1846
|
-
const ge =
|
|
1847
|
-
if (!
|
|
1847
|
+
const ge = W.scrollTop, ze = W.scrollLeft;
|
|
1848
|
+
if (!G.height || !G.width)
|
|
1848
1849
|
return;
|
|
1849
|
-
|
|
1850
|
-
const { height:
|
|
1851
|
-
if (At ===
|
|
1850
|
+
R.current = !0;
|
|
1851
|
+
const { height: Te, width: ot } = G, { height: At, width: Ft } = y.current;
|
|
1852
|
+
if (At === Te && Ft === ot)
|
|
1852
1853
|
return;
|
|
1853
|
-
const
|
|
1854
|
-
|
|
1854
|
+
const Qn = ge / At * Te, er = ze / Ft * ot, tr = Math.round(Math.min(Qn, Te)) || 0, nr = Math.round(Math.min(er, ot)) || 0;
|
|
1855
|
+
k.current = setTimeout(() => {
|
|
1855
1856
|
requestAnimationFrame(() => {
|
|
1856
|
-
|
|
1857
|
-
scrollTop:
|
|
1858
|
-
scrollLeft:
|
|
1857
|
+
c == null || c.scrollTo({
|
|
1858
|
+
scrollTop: tr,
|
|
1859
|
+
scrollLeft: nr
|
|
1859
1860
|
});
|
|
1860
1861
|
});
|
|
1861
|
-
}, 0),
|
|
1862
|
-
height:
|
|
1863
|
-
width:
|
|
1862
|
+
}, 0), y.current = {
|
|
1863
|
+
height: G.height,
|
|
1864
|
+
width: G.width
|
|
1864
1865
|
};
|
|
1865
1866
|
},
|
|
1866
|
-
[
|
|
1867
|
+
[c, S, P, a]
|
|
1867
1868
|
);
|
|
1868
1869
|
A(() => {
|
|
1869
|
-
clearTimeout(
|
|
1870
|
-
const
|
|
1871
|
-
(ge, ze,
|
|
1870
|
+
clearTimeout(k.current);
|
|
1871
|
+
const W = Array.from({ length: E }).reduce(
|
|
1872
|
+
(ge, ze, Te) => ge + $(Te),
|
|
1872
1873
|
0
|
|
1873
|
-
),
|
|
1874
|
-
(ge, ze,
|
|
1874
|
+
), G = Array.from({ length: V }).reduce(
|
|
1875
|
+
(ge, ze, Te) => ge + q(Te),
|
|
1875
1876
|
0
|
|
1876
|
-
), fe = me(
|
|
1877
|
-
|
|
1878
|
-
height:
|
|
1879
|
-
width:
|
|
1877
|
+
), fe = me(G, W);
|
|
1878
|
+
ne.current = fe, Re(fe, { height: W, width: G }), h({
|
|
1879
|
+
height: W,
|
|
1880
|
+
width: G
|
|
1880
1881
|
});
|
|
1881
|
-
}, [
|
|
1882
|
-
const
|
|
1883
|
-
(
|
|
1884
|
-
|
|
1885
|
-
scrollTop:
|
|
1886
|
-
scrollLeft:
|
|
1882
|
+
}, [I, E, V, Re]);
|
|
1883
|
+
const rt = L(
|
|
1884
|
+
(W) => {
|
|
1885
|
+
ne.current = {
|
|
1886
|
+
scrollTop: W.scrollTop,
|
|
1887
|
+
scrollLeft: W.scrollLeft
|
|
1887
1888
|
};
|
|
1888
|
-
const
|
|
1889
|
-
(ge || ze) && (
|
|
1889
|
+
const G = ((m == null ? void 0 : m.scrollHeight) || 0) - ((m == null ? void 0 : m.clientHeight) || 0), fe = ((m == null ? void 0 : m.scrollWidth) || 0) - ((m == null ? void 0 : m.clientWidth) || 0), ge = Math.round(N.current.left) === Math.round(W.scrollLeft) && Math.round(N.current.top) === Math.round(W.scrollTop), ze = Math.round(G) === Math.round(W.scrollTop) && Math.round(fe) === Math.round(W.scrollLeft);
|
|
1890
|
+
(ge || ze) && (x.current = !1);
|
|
1890
1891
|
},
|
|
1891
|
-
[
|
|
1892
|
+
[m]
|
|
1892
1893
|
);
|
|
1893
1894
|
A(() => () => {
|
|
1894
|
-
|
|
1895
|
+
te.current && clearTimeout(te.current);
|
|
1895
1896
|
}, []);
|
|
1896
|
-
const
|
|
1897
|
-
[de["rp-cursor-grab"]]:
|
|
1898
|
-
[de["rp-cursor-grabbing"]]:
|
|
1899
|
-
}), [
|
|
1900
|
-
(
|
|
1901
|
-
if (
|
|
1902
|
-
const
|
|
1903
|
-
|
|
1897
|
+
const Yn = F(() => oe(de["rp-pages-container"], {
|
|
1898
|
+
[de["rp-cursor-grab"]]: he && !j,
|
|
1899
|
+
[de["rp-cursor-grabbing"]]: he && j
|
|
1900
|
+
}), [he, j]), Jn = L(
|
|
1901
|
+
(W) => {
|
|
1902
|
+
if (he && W) {
|
|
1903
|
+
const G = oe(de["rp-pages"]), fe = document.querySelector(`.${G}`);
|
|
1904
|
+
le(fe);
|
|
1904
1905
|
}
|
|
1905
1906
|
},
|
|
1906
|
-
[
|
|
1907
|
+
[he, le, de]
|
|
1907
1908
|
);
|
|
1908
1909
|
return A(() => {
|
|
1909
|
-
|
|
1910
|
-
}, [
|
|
1911
|
-
if (!(
|
|
1910
|
+
T && Ie();
|
|
1911
|
+
}, [T]), A(() => {
|
|
1912
|
+
if (!(Y.height === 0 || !w.current)) {
|
|
1912
1913
|
if (t === ee.PAGE_SCROLLING) {
|
|
1913
|
-
e !==
|
|
1914
|
+
e !== f && g && _(e), w.current = !1;
|
|
1914
1915
|
return;
|
|
1915
1916
|
}
|
|
1916
|
-
|
|
1917
|
+
a(e, "auto"), _(e), w.current = !1;
|
|
1917
1918
|
}
|
|
1918
1919
|
}, [
|
|
1919
|
-
|
|
1920
|
+
a,
|
|
1920
1921
|
t,
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
]), /* @__PURE__ */ i("div", { ref:
|
|
1922
|
+
g,
|
|
1923
|
+
_,
|
|
1924
|
+
Y
|
|
1925
|
+
]), /* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: Yn, children: /* @__PURE__ */ i(Uo, { style: { minHeight: "50px" }, children: ({ width: W, height: G }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Jn, style: { width: W, height: G }, children: P === ee.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
1925
1926
|
"div",
|
|
1926
1927
|
{
|
|
1927
|
-
ref:
|
|
1928
|
-
style: { width:
|
|
1929
|
-
className:
|
|
1930
|
-
children:
|
|
1928
|
+
ref: l,
|
|
1929
|
+
style: { width: W, height: G },
|
|
1930
|
+
className: oe(de["rp-pages"], de["rp-page-scrolling-wrapper"]),
|
|
1931
|
+
children: S === Ze.DUAL_PAGE ? /* @__PURE__ */ i(qo, { widths: q, heights: $ }) : /* @__PURE__ */ i(Zo, { widths: q, heights: $ })
|
|
1931
1932
|
}
|
|
1932
|
-
) :
|
|
1933
|
-
|
|
1933
|
+
) : X ? /* @__PURE__ */ i(
|
|
1934
|
+
Mo,
|
|
1934
1935
|
{
|
|
1935
|
-
ref:
|
|
1936
|
-
itemData:
|
|
1937
|
-
outerRef:
|
|
1938
|
-
innerRef:
|
|
1939
|
-
onScroll:
|
|
1940
|
-
columnCount:
|
|
1941
|
-
columnWidth:
|
|
1942
|
-
rowHeight:
|
|
1943
|
-
height:
|
|
1944
|
-
width:
|
|
1945
|
-
estimatedColumnWidth:
|
|
1946
|
-
estimatedRowHeight:
|
|
1947
|
-
rowCount:
|
|
1948
|
-
className:
|
|
1936
|
+
ref: s,
|
|
1937
|
+
itemData: Le,
|
|
1938
|
+
outerRef: d,
|
|
1939
|
+
innerRef: u,
|
|
1940
|
+
onScroll: rt,
|
|
1941
|
+
columnCount: V,
|
|
1942
|
+
columnWidth: q,
|
|
1943
|
+
rowHeight: $,
|
|
1944
|
+
height: G,
|
|
1945
|
+
width: W,
|
|
1946
|
+
estimatedColumnWidth: X,
|
|
1947
|
+
estimatedRowHeight: B,
|
|
1948
|
+
rowCount: E,
|
|
1949
|
+
className: oe(
|
|
1949
1950
|
de["rp-pages"],
|
|
1950
|
-
|
|
1951
|
+
P === ee.HORIZONTAL_SCROLLING ? de["rp-pages-horizontal-scroll"] : ""
|
|
1951
1952
|
),
|
|
1952
|
-
children:
|
|
1953
|
+
children: jo
|
|
1953
1954
|
}
|
|
1954
|
-
) :
|
|
1955
|
+
) : T ? null : /* @__PURE__ */ i(
|
|
1955
1956
|
"div",
|
|
1956
1957
|
{
|
|
1957
1958
|
className: de["rp-loader"],
|
|
@@ -1962,7 +1963,7 @@ const Uo = ({ widths: e, heights: t }) => {
|
|
|
1962
1963
|
height: "100%",
|
|
1963
1964
|
width: "100%"
|
|
1964
1965
|
},
|
|
1965
|
-
children:
|
|
1966
|
+
children: C && /* @__PURE__ */ i(C, {})
|
|
1966
1967
|
}
|
|
1967
1968
|
) }) }) });
|
|
1968
1969
|
}, Ae = {
|
|
@@ -1975,30 +1976,30 @@ const Uo = ({ widths: e, heights: t }) => {
|
|
|
1975
1976
|
"rp-paginate": "_rp-paginate_1y9vo_1",
|
|
1976
1977
|
"rp-page-input": "_rp-page-input_1y9vo_6",
|
|
1977
1978
|
"rp-total-page": "_rp-total-page_1y9vo_11"
|
|
1978
|
-
},
|
|
1979
|
+
}, Ko = () => {
|
|
1979
1980
|
const { prevIcon: e } = pe();
|
|
1980
1981
|
return e || /* @__PURE__ */ i(Me, {});
|
|
1981
|
-
},
|
|
1982
|
+
}, Xo = () => {
|
|
1982
1983
|
const { nextIcon: e } = pe();
|
|
1983
1984
|
return e || /* @__PURE__ */ i(Me, { style: { transform: "rotate(180deg" } });
|
|
1984
|
-
},
|
|
1985
|
-
const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } =
|
|
1985
|
+
}, Yo = () => {
|
|
1986
|
+
const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ae(), [c, s] = H(e.toString()), { pageNavigationTool: l = !0 } = _e(), { isSmallScreen: d } = ye(), { localeMessages: h } = ue();
|
|
1986
1987
|
A(() => {
|
|
1987
1988
|
s(e.toString());
|
|
1988
1989
|
}, [e]);
|
|
1989
|
-
const
|
|
1990
|
+
const m = L((b) => {
|
|
1990
1991
|
const v = b.target.value;
|
|
1991
1992
|
s(v);
|
|
1992
|
-
}, []),
|
|
1993
|
+
}, []), p = L(async () => {
|
|
1993
1994
|
const b = a(c);
|
|
1994
1995
|
b.success || s(b.currentPage.toString());
|
|
1995
1996
|
}, [a, c, t]), g = L(() => {
|
|
1996
1997
|
s(e.toString());
|
|
1997
1998
|
}, [e]), w = L(
|
|
1998
1999
|
(b) => {
|
|
1999
|
-
b.key === "Enter" &&
|
|
2000
|
+
b.key === "Enter" && p();
|
|
2000
2001
|
},
|
|
2001
|
-
[
|
|
2002
|
+
[p]
|
|
2002
2003
|
);
|
|
2003
2004
|
return typeof l != "boolean" ? /* @__PURE__ */ i(
|
|
2004
2005
|
l,
|
|
@@ -2011,21 +2012,21 @@ const Uo = ({ widths: e, heights: t }) => {
|
|
|
2011
2012
|
changePage: n
|
|
2012
2013
|
}
|
|
2013
2014
|
) : l ? /* @__PURE__ */ D("div", { className: gt["rp-paginate"], children: [
|
|
2014
|
-
!
|
|
2015
|
+
!d && /* @__PURE__ */ i(Z, { content: h == null ? void 0 : h.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2015
2016
|
Q,
|
|
2016
2017
|
{
|
|
2017
2018
|
onClick: r,
|
|
2018
|
-
"aria-label":
|
|
2019
|
+
"aria-label": h == null ? void 0 : h.previousPageTooltip,
|
|
2019
2020
|
"aria-disabled": e === 1,
|
|
2020
|
-
children: /* @__PURE__ */ i(
|
|
2021
|
+
children: /* @__PURE__ */ i(Ko, {})
|
|
2021
2022
|
}
|
|
2022
2023
|
) }),
|
|
2023
|
-
/* @__PURE__ */ i(
|
|
2024
|
+
/* @__PURE__ */ i(Z, { content: h == null ? void 0 : h.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
2024
2025
|
dn,
|
|
2025
2026
|
{
|
|
2026
2027
|
onKeyDown: w,
|
|
2027
2028
|
onBlur: g,
|
|
2028
|
-
onChange:
|
|
2029
|
+
onChange: m,
|
|
2029
2030
|
value: c,
|
|
2030
2031
|
className: gt["rp-page-input"]
|
|
2031
2032
|
}
|
|
@@ -2034,18 +2035,18 @@ const Uo = ({ widths: e, heights: t }) => {
|
|
|
2034
2035
|
"/",
|
|
2035
2036
|
t
|
|
2036
2037
|
] }),
|
|
2037
|
-
!
|
|
2038
|
+
!d && /* @__PURE__ */ i(Z, { content: h == null ? void 0 : h.nextPageTooltip, children: /* @__PURE__ */ i(
|
|
2038
2039
|
Q,
|
|
2039
2040
|
{
|
|
2040
2041
|
onClick: o,
|
|
2041
|
-
"aria-label":
|
|
2042
|
+
"aria-label": h == null ? void 0 : h.nextPageTooltip,
|
|
2042
2043
|
"aria-disabled": e === t,
|
|
2043
|
-
children: /* @__PURE__ */ i(
|
|
2044
|
+
children: /* @__PURE__ */ i(Xo, {})
|
|
2044
2045
|
}
|
|
2045
2046
|
) })
|
|
2046
2047
|
] }) : null;
|
|
2047
2048
|
};
|
|
2048
|
-
var Et = "Dialog", [Nn,
|
|
2049
|
+
var Et = "Dialog", [Nn, Rs] = Br(Et), [Jo, ce] = Nn(Et), En = (e) => {
|
|
2049
2050
|
const {
|
|
2050
2051
|
__scopeDialog: t,
|
|
2051
2052
|
children: n,
|
|
@@ -2053,13 +2054,13 @@ var Et = "Dialog", [Nn, Is] = qr(Et), [Yo, se] = Nn(Et), En = (e) => {
|
|
|
2053
2054
|
defaultOpen: r,
|
|
2054
2055
|
onOpenChange: a,
|
|
2055
2056
|
modal: c = !0
|
|
2056
|
-
} = e, s = U.useRef(null), l = U.useRef(null), [
|
|
2057
|
+
} = e, s = U.useRef(null), l = U.useRef(null), [d = !1, h] = Kr({
|
|
2057
2058
|
prop: o,
|
|
2058
2059
|
defaultProp: r,
|
|
2059
2060
|
onChange: a
|
|
2060
2061
|
});
|
|
2061
2062
|
return /* @__PURE__ */ i(
|
|
2062
|
-
|
|
2063
|
+
Jo,
|
|
2063
2064
|
{
|
|
2064
2065
|
scope: t,
|
|
2065
2066
|
triggerRef: s,
|
|
@@ -2067,18 +2068,18 @@ var Et = "Dialog", [Nn, Is] = qr(Et), [Yo, se] = Nn(Et), En = (e) => {
|
|
|
2067
2068
|
contentId: st(),
|
|
2068
2069
|
titleId: st(),
|
|
2069
2070
|
descriptionId: st(),
|
|
2070
|
-
open:
|
|
2071
|
-
onOpenChange:
|
|
2072
|
-
onOpenToggle: U.useCallback(() =>
|
|
2071
|
+
open: d,
|
|
2072
|
+
onOpenChange: h,
|
|
2073
|
+
onOpenToggle: U.useCallback(() => h((m) => !m), [h]),
|
|
2073
2074
|
modal: c,
|
|
2074
2075
|
children: n
|
|
2075
2076
|
}
|
|
2076
2077
|
);
|
|
2077
2078
|
};
|
|
2078
2079
|
En.displayName = Et;
|
|
2079
|
-
var On = "DialogTrigger",
|
|
2080
|
+
var On = "DialogTrigger", Qo = U.forwardRef(
|
|
2080
2081
|
(e, t) => {
|
|
2081
|
-
const { __scopeDialog: n, ...o } = e, r =
|
|
2082
|
+
const { __scopeDialog: n, ...o } = e, r = ce(On, n), a = It(t, r.triggerRef);
|
|
2082
2083
|
return /* @__PURE__ */ i(
|
|
2083
2084
|
He.button,
|
|
2084
2085
|
{
|
|
@@ -2094,24 +2095,24 @@ var On = "DialogTrigger", Jo = U.forwardRef(
|
|
|
2094
2095
|
);
|
|
2095
2096
|
}
|
|
2096
2097
|
);
|
|
2097
|
-
|
|
2098
|
-
var Ot = "DialogPortal", [
|
|
2098
|
+
Qo.displayName = On;
|
|
2099
|
+
var Ot = "DialogPortal", [ei, Dn] = Nn(Ot, {
|
|
2099
2100
|
forceMount: void 0
|
|
2100
2101
|
}), zn = (e) => {
|
|
2101
|
-
const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, a =
|
|
2102
|
-
return /* @__PURE__ */ i(
|
|
2102
|
+
const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, a = ce(Ot, t);
|
|
2103
|
+
return /* @__PURE__ */ i(ei, { scope: t, forceMount: n, children: U.Children.map(o, (c) => /* @__PURE__ */ i(Lt, { present: n || a.open, children: /* @__PURE__ */ i(eo, { asChild: !0, container: r, children: c }) })) });
|
|
2103
2104
|
};
|
|
2104
2105
|
zn.displayName = Ot;
|
|
2105
2106
|
var je = "DialogOverlay", An = U.forwardRef(
|
|
2106
2107
|
(e, t) => {
|
|
2107
|
-
const n = Dn(je, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a =
|
|
2108
|
-
return a.modal ? /* @__PURE__ */ i(Lt, { present: o || a.open, children: /* @__PURE__ */ i(
|
|
2108
|
+
const n = Dn(je, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = ce(je, e.__scopeDialog);
|
|
2109
|
+
return a.modal ? /* @__PURE__ */ i(Lt, { present: o || a.open, children: /* @__PURE__ */ i(ti, { ...r, ref: t }) }) : null;
|
|
2109
2110
|
}
|
|
2110
2111
|
);
|
|
2111
2112
|
An.displayName = je;
|
|
2112
|
-
var
|
|
2113
|
+
var ti = U.forwardRef(
|
|
2113
2114
|
(e, t) => {
|
|
2114
|
-
const { __scopeDialog: n, ...o } = e, r =
|
|
2115
|
+
const { __scopeDialog: n, ...o } = e, r = ce(je, n);
|
|
2115
2116
|
return (
|
|
2116
2117
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2117
2118
|
// ie. when `Overlay` and `Content` are siblings
|
|
@@ -2126,20 +2127,20 @@ var ei = U.forwardRef(
|
|
|
2126
2127
|
) })
|
|
2127
2128
|
);
|
|
2128
2129
|
}
|
|
2129
|
-
),
|
|
2130
|
+
), xe = "DialogContent", Fn = U.forwardRef(
|
|
2130
2131
|
(e, t) => {
|
|
2131
|
-
const n = Dn(
|
|
2132
|
-
return /* @__PURE__ */ i(Lt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(
|
|
2132
|
+
const n = Dn(xe, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = ce(xe, e.__scopeDialog);
|
|
2133
|
+
return /* @__PURE__ */ i(Lt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(ni, { ...r, ref: t }) : /* @__PURE__ */ i(ri, { ...r, ref: t }) });
|
|
2133
2134
|
}
|
|
2134
2135
|
);
|
|
2135
|
-
Fn.displayName =
|
|
2136
|
-
var
|
|
2136
|
+
Fn.displayName = xe;
|
|
2137
|
+
var ni = U.forwardRef(
|
|
2137
2138
|
(e, t) => {
|
|
2138
|
-
const n =
|
|
2139
|
+
const n = ce(xe, e.__scopeDialog), o = U.useRef(null), r = It(t, n.contentRef, o);
|
|
2139
2140
|
return U.useEffect(() => {
|
|
2140
2141
|
const a = o.current;
|
|
2141
2142
|
if (a)
|
|
2142
|
-
return
|
|
2143
|
+
return to(a);
|
|
2143
2144
|
}, []), /* @__PURE__ */ i(
|
|
2144
2145
|
kn,
|
|
2145
2146
|
{
|
|
@@ -2162,9 +2163,9 @@ var ti = U.forwardRef(
|
|
|
2162
2163
|
}
|
|
2163
2164
|
);
|
|
2164
2165
|
}
|
|
2165
|
-
),
|
|
2166
|
+
), ri = U.forwardRef(
|
|
2166
2167
|
(e, t) => {
|
|
2167
|
-
const n =
|
|
2168
|
+
const n = ce(xe, e.__scopeDialog), o = U.useRef(!1), r = U.useRef(!1);
|
|
2168
2169
|
return /* @__PURE__ */ i(
|
|
2169
2170
|
kn,
|
|
2170
2171
|
{
|
|
@@ -2177,18 +2178,18 @@ var ti = U.forwardRef(
|
|
|
2177
2178
|
(c = e.onCloseAutoFocus) == null || c.call(e, a), a.defaultPrevented || (o.current || (s = n.triggerRef.current) == null || s.focus(), a.preventDefault()), o.current = !1, r.current = !1;
|
|
2178
2179
|
},
|
|
2179
2180
|
onInteractOutside: (a) => {
|
|
2180
|
-
var l,
|
|
2181
|
+
var l, d;
|
|
2181
2182
|
(l = e.onInteractOutside) == null || l.call(e, a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (r.current = !0));
|
|
2182
2183
|
const c = a.target;
|
|
2183
|
-
((
|
|
2184
|
+
((d = n.triggerRef.current) == null ? void 0 : d.contains(c)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
|
|
2184
2185
|
}
|
|
2185
2186
|
}
|
|
2186
2187
|
);
|
|
2187
2188
|
}
|
|
2188
2189
|
), kn = U.forwardRef(
|
|
2189
2190
|
(e, t) => {
|
|
2190
|
-
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...c } = e, s =
|
|
2191
|
-
return Yr(), /* @__PURE__ */ D(
|
|
2191
|
+
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...c } = e, s = ce(xe, n), l = U.useRef(null), d = It(t, l);
|
|
2192
|
+
return Yr(), /* @__PURE__ */ D(Se, { children: [
|
|
2192
2193
|
/* @__PURE__ */ i(
|
|
2193
2194
|
Jr,
|
|
2194
2195
|
{
|
|
@@ -2198,7 +2199,7 @@ var ti = U.forwardRef(
|
|
|
2198
2199
|
onMountAutoFocus: r,
|
|
2199
2200
|
onUnmountAutoFocus: a,
|
|
2200
2201
|
children: /* @__PURE__ */ i(
|
|
2201
|
-
|
|
2202
|
+
Qr,
|
|
2202
2203
|
{
|
|
2203
2204
|
role: "dialog",
|
|
2204
2205
|
id: s.contentId,
|
|
@@ -2206,35 +2207,35 @@ var ti = U.forwardRef(
|
|
|
2206
2207
|
"aria-labelledby": s.titleId,
|
|
2207
2208
|
"data-state": zt(s.open),
|
|
2208
2209
|
...c,
|
|
2209
|
-
ref:
|
|
2210
|
+
ref: d,
|
|
2210
2211
|
onDismiss: () => s.onOpenChange(!1)
|
|
2211
2212
|
}
|
|
2212
2213
|
)
|
|
2213
2214
|
}
|
|
2214
2215
|
),
|
|
2215
|
-
/* @__PURE__ */ D(
|
|
2216
|
-
/* @__PURE__ */ i(
|
|
2217
|
-
/* @__PURE__ */ i(
|
|
2216
|
+
/* @__PURE__ */ D(Se, { children: [
|
|
2217
|
+
/* @__PURE__ */ i(ii, { titleId: s.titleId }),
|
|
2218
|
+
/* @__PURE__ */ i(si, { contentRef: l, descriptionId: s.descriptionId })
|
|
2218
2219
|
] })
|
|
2219
2220
|
] });
|
|
2220
2221
|
}
|
|
2221
2222
|
), Dt = "DialogTitle", Mn = U.forwardRef(
|
|
2222
2223
|
(e, t) => {
|
|
2223
|
-
const { __scopeDialog: n, ...o } = e, r =
|
|
2224
|
+
const { __scopeDialog: n, ...o } = e, r = ce(Dt, n);
|
|
2224
2225
|
return /* @__PURE__ */ i(He.h2, { id: r.titleId, ...o, ref: t });
|
|
2225
2226
|
}
|
|
2226
2227
|
);
|
|
2227
2228
|
Mn.displayName = Dt;
|
|
2228
|
-
var Wn = "DialogDescription",
|
|
2229
|
+
var Wn = "DialogDescription", oi = U.forwardRef(
|
|
2229
2230
|
(e, t) => {
|
|
2230
|
-
const { __scopeDialog: n, ...o } = e, r =
|
|
2231
|
+
const { __scopeDialog: n, ...o } = e, r = ce(Wn, n);
|
|
2231
2232
|
return /* @__PURE__ */ i(He.p, { id: r.descriptionId, ...o, ref: t });
|
|
2232
2233
|
}
|
|
2233
2234
|
);
|
|
2234
|
-
|
|
2235
|
+
oi.displayName = Wn;
|
|
2235
2236
|
var Hn = "DialogClose", $n = U.forwardRef(
|
|
2236
2237
|
(e, t) => {
|
|
2237
|
-
const { __scopeDialog: n, ...o } = e, r =
|
|
2238
|
+
const { __scopeDialog: n, ...o } = e, r = ce(Hn, n);
|
|
2238
2239
|
return /* @__PURE__ */ i(
|
|
2239
2240
|
He.button,
|
|
2240
2241
|
{
|
|
@@ -2250,11 +2251,11 @@ $n.displayName = Hn;
|
|
|
2250
2251
|
function zt(e) {
|
|
2251
2252
|
return e ? "open" : "closed";
|
|
2252
2253
|
}
|
|
2253
|
-
var Vn = "DialogTitleWarning", [
|
|
2254
|
-
contentName:
|
|
2254
|
+
var Vn = "DialogTitleWarning", [Ns, Gn] = jr(Vn, {
|
|
2255
|
+
contentName: xe,
|
|
2255
2256
|
titleName: Dt,
|
|
2256
2257
|
docsSlug: "dialog"
|
|
2257
|
-
}),
|
|
2258
|
+
}), ii = ({ titleId: e }) => {
|
|
2258
2259
|
const t = Gn(Vn), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2259
2260
|
|
|
2260
2261
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
@@ -2263,15 +2264,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2263
2264
|
return U.useEffect(() => {
|
|
2264
2265
|
e && (document.getElementById(e) || console.error(n));
|
|
2265
2266
|
}, [n, e]), null;
|
|
2266
|
-
},
|
|
2267
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Gn(
|
|
2267
|
+
}, ai = "DialogDescriptionWarning", si = ({ contentRef: e, descriptionId: t }) => {
|
|
2268
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Gn(ai).contentName}}.`;
|
|
2268
2269
|
return U.useEffect(() => {
|
|
2269
2270
|
var a;
|
|
2270
2271
|
const r = (a = e.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2271
2272
|
t && r && (document.getElementById(t) || console.warn(o));
|
|
2272
2273
|
}, [o, e, t]), null;
|
|
2273
|
-
},
|
|
2274
|
-
const
|
|
2274
|
+
}, ci = En, li = zn, di = An, ui = Fn, pi = Mn, hi = $n;
|
|
2275
|
+
const Pe = {
|
|
2275
2276
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2276
2277
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
2277
2278
|
"rp-document-dialog": "_rp-document-dialog_slqo7_13",
|
|
@@ -2279,18 +2280,18 @@ const Se = {
|
|
|
2279
2280
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2280
2281
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2281
2282
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2282
|
-
},
|
|
2283
|
-
const { pdfProperties: e } = K(), { container: t } =
|
|
2283
|
+
}, mi = () => {
|
|
2284
|
+
const { pdfProperties: e } = K(), { container: t } = Ce(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = ro(), { localeMessages: r } = ue(), a = F(() => {
|
|
2284
2285
|
if (!e)
|
|
2285
2286
|
return [];
|
|
2286
2287
|
const {
|
|
2287
2288
|
fileSize: c,
|
|
2288
2289
|
filename: s,
|
|
2289
2290
|
title: l,
|
|
2290
|
-
author:
|
|
2291
|
-
subject:
|
|
2292
|
-
createdOn:
|
|
2293
|
-
creator:
|
|
2291
|
+
author: d,
|
|
2292
|
+
subject: h,
|
|
2293
|
+
createdOn: m,
|
|
2294
|
+
creator: p,
|
|
2294
2295
|
keywords: g,
|
|
2295
2296
|
modifiedOn: w,
|
|
2296
2297
|
pdfProducer: b,
|
|
@@ -2302,13 +2303,13 @@ const Se = {
|
|
|
2302
2303
|
{ label: r == null ? void 0 : r.propertiesFileSizeLabel, value: c },
|
|
2303
2304
|
{ separate: !0 },
|
|
2304
2305
|
{ label: r == null ? void 0 : r.propertiesTitleLabel, value: l },
|
|
2305
|
-
{ label: r == null ? void 0 : r.propertiesAuthorLabel, value:
|
|
2306
|
-
{ label: r == null ? void 0 : r.propertiesSubjectLabel, value:
|
|
2306
|
+
{ label: r == null ? void 0 : r.propertiesAuthorLabel, value: d },
|
|
2307
|
+
{ label: r == null ? void 0 : r.propertiesSubjectLabel, value: h },
|
|
2307
2308
|
{ label: r == null ? void 0 : r.propertiesKeywordLabel, value: g },
|
|
2308
|
-
{ label: r == null ? void 0 : r.propertiesCreatorLabel, value:
|
|
2309
|
+
{ label: r == null ? void 0 : r.propertiesCreatorLabel, value: p },
|
|
2309
2310
|
{
|
|
2310
2311
|
label: r == null ? void 0 : r.propertiesCreateOnLabel,
|
|
2311
|
-
value:
|
|
2312
|
+
value: m ? $t(m) : ""
|
|
2312
2313
|
},
|
|
2313
2314
|
{
|
|
2314
2315
|
label: r == null ? void 0 : r.propertiesModifiedOnLabel,
|
|
@@ -2320,21 +2321,21 @@ const Se = {
|
|
|
2320
2321
|
{ label: r == null ? void 0 : r.propertiesPageCountLabel, value: _ }
|
|
2321
2322
|
];
|
|
2322
2323
|
}, [e, r]);
|
|
2323
|
-
return /* @__PURE__ */ i(
|
|
2324
|
-
/* @__PURE__ */ i(
|
|
2325
|
-
/* @__PURE__ */ D(
|
|
2326
|
-
/* @__PURE__ */ i(
|
|
2327
|
-
/* @__PURE__ */ i("div", { className:
|
|
2328
|
-
/* @__PURE__ */ i(
|
|
2324
|
+
return /* @__PURE__ */ i(ci, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(li, { container: t, children: /* @__PURE__ */ D("div", { className: Pe["rp-dialog-wrapper"], children: [
|
|
2325
|
+
/* @__PURE__ */ i(di, { className: Pe["rp-dialog-overlay"] }),
|
|
2326
|
+
/* @__PURE__ */ D(ui, { className: Pe["rp-document-dialog"], children: [
|
|
2327
|
+
/* @__PURE__ */ i(pi, { className: Pe["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
|
|
2328
|
+
/* @__PURE__ */ i("div", { className: Pe["rp-document-properties"], children: a.map((c, s) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: Pe["rp-properties-divider"] }) : /* @__PURE__ */ i(no, { label: c.label, value: c.value }) }, s)) }),
|
|
2329
|
+
/* @__PURE__ */ i(hi, { asChild: !0, className: Pe["rp-dialog-close"], children: /* @__PURE__ */ i(vn, {}) })
|
|
2329
2330
|
] })
|
|
2330
2331
|
] }) }) });
|
|
2331
|
-
},
|
|
2332
|
+
}, fi = {
|
|
2332
2333
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2333
|
-
}, on = ".pdf",
|
|
2334
|
+
}, on = ".pdf", gi = (e) => URL.createObjectURL(e), vi = async (e) => {
|
|
2334
2335
|
const n = await (await fetch(e)).blob();
|
|
2335
|
-
return
|
|
2336
|
+
return gi(n);
|
|
2336
2337
|
}, Un = () => {
|
|
2337
|
-
const { filename: e, pdfSrc: t } = K(), { downloadFilename: n } =
|
|
2338
|
+
const { filename: e, pdfSrc: t } = K(), { downloadFilename: n } = wr(), o = (a) => {
|
|
2338
2339
|
const c = n || a;
|
|
2339
2340
|
return c.endsWith(on) ? c : `${c}${on}`;
|
|
2340
2341
|
};
|
|
@@ -2342,26 +2343,26 @@ const Se = {
|
|
|
2342
2343
|
if (!e || !t)
|
|
2343
2344
|
throw new Error("There is no PDF source to download");
|
|
2344
2345
|
const a = document.createElement("a");
|
|
2345
|
-
a.href = await
|
|
2346
|
+
a.href = await vi(t), a.download = o(e), document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
2346
2347
|
}, [e, t]) };
|
|
2347
2348
|
}, qn = () => {
|
|
2348
2349
|
const { downloadIcon: e } = pe();
|
|
2349
|
-
return e || /* @__PURE__ */ i(
|
|
2350
|
-
}, Zn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(
|
|
2350
|
+
return e || /* @__PURE__ */ i(co, {});
|
|
2351
|
+
}, Zn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: t, content: n == null ? void 0 : n.downloadFileTooltip, children: e }), _i = ({ download: e, localeMessages: t }) => /* @__PURE__ */ i(Zn, { localeMessages: t, children: /* @__PURE__ */ i(Q, { onClick: e, "aria-label": t == null ? void 0 : t.downloadFileTooltip, children: /* @__PURE__ */ i(qn, {}) }) }), wi = ({ download: e, localeMessages: t }) => /* @__PURE__ */ i(be, { onClick: e, children: /* @__PURE__ */ D(Zn, { className: "rp-menu-item", localeMessages: t, children: [
|
|
2351
2352
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(qn, {}) }),
|
|
2352
2353
|
t == null ? void 0 : t.downloadFileLabel
|
|
2353
2354
|
] }) }), Bn = () => {
|
|
2354
|
-
const { download: e } = Un(), { downloadTool: t = !0 } = _e(), { isSmallScreen: n } =
|
|
2355
|
-
return t ? n ? /* @__PURE__ */ i(
|
|
2355
|
+
const { download: e } = Un(), { downloadTool: t = !0 } = _e(), { isSmallScreen: n } = ye(), { localeMessages: o } = ue();
|
|
2356
|
+
return t ? n ? /* @__PURE__ */ i(wi, { download: e, localeMessages: o }) : typeof t == "function" ? /* @__PURE__ */ i(t, { download: e }) : t ? /* @__PURE__ */ i(_i, { download: e, localeMessages: o }) : null : null;
|
|
2356
2357
|
}, jn = () => {
|
|
2357
2358
|
const { printIcon: e } = pe();
|
|
2358
|
-
return e || /* @__PURE__ */ i(
|
|
2359
|
-
}, Kn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(
|
|
2359
|
+
return e || /* @__PURE__ */ i(lo, {});
|
|
2360
|
+
}, Kn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: t, content: n == null ? void 0 : n.printTooltip, children: e }), bi = ({ print: e, localeMessages: t }) => /* @__PURE__ */ i(Kn, { localeMessages: t, children: /* @__PURE__ */ i(Q, { onClick: e, "aria-label": t == null ? void 0 : t.printTooltip, children: /* @__PURE__ */ i(jn, {}) }) }), Ci = ({ print: e, localeMessages: t }) => /* @__PURE__ */ i(be, { onClick: e, children: /* @__PURE__ */ D(Kn, { className: "rp-menu-item", localeMessages: t, children: [
|
|
2360
2361
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(jn, {}) }),
|
|
2361
2362
|
t == null ? void 0 : t.printLabel
|
|
2362
2363
|
] }) }), Xn = () => {
|
|
2363
|
-
const { print: e, cancel: t, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = nt(), { printTool: c = !0 } = _e(), { isSmallScreen: s } =
|
|
2364
|
-
return c ? s ? /* @__PURE__ */ i(
|
|
2364
|
+
const { print: e, cancel: t, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = nt(), { printTool: c = !0 } = _e(), { isSmallScreen: s } = ye(), { localeMessages: l } = ue();
|
|
2365
|
+
return c ? s ? /* @__PURE__ */ i(Ci, { print: e, localeMessages: l }) : typeof c == "function" ? /* @__PURE__ */ i(
|
|
2365
2366
|
c,
|
|
2366
2367
|
{
|
|
2367
2368
|
print: e,
|
|
@@ -2371,34 +2372,34 @@ const Se = {
|
|
|
2371
2372
|
setOnComplete: o,
|
|
2372
2373
|
progress: a
|
|
2373
2374
|
}
|
|
2374
|
-
) : c ? /* @__PURE__ */ i(
|
|
2375
|
-
},
|
|
2375
|
+
) : c ? /* @__PURE__ */ i(bi, { print: e, localeMessages: l }) : null : null;
|
|
2376
|
+
}, Ti = {
|
|
2376
2377
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2377
|
-
}, Ti = () => {
|
|
2378
|
-
const { goToFirstPageIcon: e } = pe();
|
|
2379
|
-
return e || /* @__PURE__ */ i(wn, { className: Ci["rp-go-to-Top"] });
|
|
2380
2378
|
}, Pi = () => {
|
|
2379
|
+
const { goToFirstPageIcon: e } = pe();
|
|
2380
|
+
return e || /* @__PURE__ */ i(wn, { className: Ti["rp-go-to-Top"] });
|
|
2381
|
+
}, Si = () => {
|
|
2381
2382
|
const { goToLastPageIcon: e } = pe();
|
|
2382
2383
|
return e || /* @__PURE__ */ i(wn, {});
|
|
2383
|
-
}, an = { width: "100%" },
|
|
2384
|
-
const { goToPage: e, totalPages: t, focusedPage: n } =
|
|
2384
|
+
}, an = { width: "100%" }, xi = () => {
|
|
2385
|
+
const { goToPage: e, totalPages: t, focusedPage: n } = ae(), { jumpNavigationTool: o = !0 } = _e(), { localeMessages: r } = ue(), a = F(() => n === 1, [n]), c = F(() => n === t, [n, t]), s = L(() => {
|
|
2385
2386
|
e(1);
|
|
2386
2387
|
}, [e]), l = L(() => {
|
|
2387
2388
|
e(t);
|
|
2388
2389
|
}, [e, t]);
|
|
2389
2390
|
return o ? /* @__PURE__ */ D(Be, { children: [
|
|
2390
|
-
/* @__PURE__ */ i(
|
|
2391
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2391
|
+
/* @__PURE__ */ i(be, { onClick: s, children: /* @__PURE__ */ i(Z, { content: r == null ? void 0 : r.firstPageTooltip, style: an, children: /* @__PURE__ */ D("div", { className: "rp-menu-item", "aria-disabled": a, children: [
|
|
2392
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Pi, {}) }),
|
|
2392
2393
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
|
|
2393
2394
|
] }) }) }),
|
|
2394
|
-
/* @__PURE__ */ i(
|
|
2395
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2395
|
+
/* @__PURE__ */ i(be, { onClick: l, children: /* @__PURE__ */ i(Z, { content: r == null ? void 0 : r.lastPageTooltip, style: an, children: /* @__PURE__ */ D("div", { className: "rp-menu-item", "aria-disabled": c, children: [
|
|
2396
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Si, {}) }),
|
|
2396
2397
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
|
|
2397
2398
|
] }) }) }),
|
|
2398
2399
|
/* @__PURE__ */ i(Rt, {})
|
|
2399
2400
|
] }) : null;
|
|
2400
|
-
},
|
|
2401
|
-
const { container: e } =
|
|
2401
|
+
}, yi = () => {
|
|
2402
|
+
const { container: e } = Ce(), { isSmallScreen: t } = ye(), {
|
|
2402
2403
|
openFileTool: n,
|
|
2403
2404
|
downloadTool: o,
|
|
2404
2405
|
documentProperties: r,
|
|
@@ -2406,13 +2407,13 @@ const Se = {
|
|
|
2406
2407
|
rotateTool: c,
|
|
2407
2408
|
selectionModeTool: s,
|
|
2408
2409
|
jumpNavigationTool: l,
|
|
2409
|
-
printTool:
|
|
2410
|
-
fullscreenTool:
|
|
2411
|
-
} = _e(), { localeMessages:
|
|
2410
|
+
printTool: d,
|
|
2411
|
+
fullscreenTool: h
|
|
2412
|
+
} = _e(), { localeMessages: m } = ue();
|
|
2412
2413
|
return F(() => {
|
|
2413
2414
|
const g = l || c || s || a || r;
|
|
2414
2415
|
let w = !1;
|
|
2415
|
-
return t && (w = !(!n && !o && !
|
|
2416
|
+
return t && (w = !(!n && !o && !d && !h)), g || w;
|
|
2416
2417
|
}, [
|
|
2417
2418
|
n,
|
|
2418
2419
|
o,
|
|
@@ -2422,13 +2423,13 @@ const Se = {
|
|
|
2422
2423
|
s,
|
|
2423
2424
|
l,
|
|
2424
2425
|
t
|
|
2425
|
-
]) ? /* @__PURE__ */ D(
|
|
2426
|
+
]) ? /* @__PURE__ */ D(oo, { children: [
|
|
2426
2427
|
/* @__PURE__ */ i(
|
|
2427
2428
|
gn,
|
|
2428
2429
|
{
|
|
2429
2430
|
container: e,
|
|
2430
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(
|
|
2431
|
-
children: /* @__PURE__ */ D("div", { className:
|
|
2431
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.moreOptionTooltip, children: /* @__PURE__ */ i(Q, { "aria-label": m == null ? void 0 : m.moreOptionTooltip, children: /* @__PURE__ */ i(qr, {}) }) }) }),
|
|
2432
|
+
children: /* @__PURE__ */ D("div", { className: fi["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2432
2433
|
t && /* @__PURE__ */ D(Be, { children: [
|
|
2433
2434
|
/* @__PURE__ */ i(fn, {}),
|
|
2434
2435
|
/* @__PURE__ */ i(Bn, {}),
|
|
@@ -2436,57 +2437,57 @@ const Se = {
|
|
|
2436
2437
|
/* @__PURE__ */ i(_n, {}),
|
|
2437
2438
|
/* @__PURE__ */ i(Rt, {})
|
|
2438
2439
|
] }),
|
|
2439
|
-
/* @__PURE__ */ i(
|
|
2440
|
-
/* @__PURE__ */ i(io, {}),
|
|
2441
|
-
/* @__PURE__ */ i(lo, {}),
|
|
2440
|
+
/* @__PURE__ */ i(xi, {}),
|
|
2442
2441
|
/* @__PURE__ */ i(ao, {}),
|
|
2443
|
-
/* @__PURE__ */ i(
|
|
2442
|
+
/* @__PURE__ */ i(uo, {}),
|
|
2443
|
+
/* @__PURE__ */ i(so, {}),
|
|
2444
|
+
/* @__PURE__ */ i(io, {})
|
|
2444
2445
|
] })
|
|
2445
2446
|
}
|
|
2446
2447
|
),
|
|
2447
|
-
/* @__PURE__ */ i(
|
|
2448
|
+
/* @__PURE__ */ i(mi, {})
|
|
2448
2449
|
] }) : null;
|
|
2449
|
-
},
|
|
2450
|
-
const { isSmallScreen: e } =
|
|
2451
|
-
return /* @__PURE__ */ D(
|
|
2452
|
-
/* @__PURE__ */ i(
|
|
2453
|
-
!e && /* @__PURE__ */ D(
|
|
2450
|
+
}, Ii = () => {
|
|
2451
|
+
const { isSmallScreen: e } = ye();
|
|
2452
|
+
return /* @__PURE__ */ D(Se, { children: [
|
|
2453
|
+
/* @__PURE__ */ i(Ur, {}),
|
|
2454
|
+
!e && /* @__PURE__ */ D(Se, { children: [
|
|
2454
2455
|
/* @__PURE__ */ i(fn, {}),
|
|
2455
2456
|
/* @__PURE__ */ i(Bn, {}),
|
|
2456
2457
|
/* @__PURE__ */ i(Xn, {}),
|
|
2457
2458
|
/* @__PURE__ */ i(_n, {})
|
|
2458
2459
|
] }),
|
|
2459
|
-
/* @__PURE__ */ i(
|
|
2460
|
+
/* @__PURE__ */ i(yi, {})
|
|
2460
2461
|
] });
|
|
2461
|
-
},
|
|
2462
|
+
}, Ee = {
|
|
2462
2463
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
|
|
2463
2464
|
"rp-current-zoom-wrapper": "_rp-current-zoom-wrapper_cocqs_6",
|
|
2464
2465
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
|
|
2465
2466
|
"rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
|
|
2466
2467
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
|
|
2467
|
-
},
|
|
2468
|
+
}, Li = 25, vt = 1e3, Ri = [50, 75, 100, 125, 150, 200, 300, 400], Ni = () => {
|
|
2468
2469
|
const { zoomInIcon: e } = pe();
|
|
2469
|
-
return e || /* @__PURE__ */ i(uo, {});
|
|
2470
|
-
}, Ni = () => {
|
|
2471
|
-
const { zoomOutIcon: e } = pe();
|
|
2472
2470
|
return e || /* @__PURE__ */ i(po, {});
|
|
2473
2471
|
}, Ei = () => {
|
|
2474
|
-
const {
|
|
2472
|
+
const { zoomOutIcon: e } = pe();
|
|
2473
|
+
return e || /* @__PURE__ */ i(ho, {});
|
|
2474
|
+
}, Oi = () => {
|
|
2475
|
+
const { zoomLevel: e, setZoomLevel: t } = Je(), { container: n, contentRef: o } = Ce(), { zoomTool: r = !0 } = _e(), { focusedPage: a } = ae(), { rotate: c } = Ye(), { pages: s } = K(), { isSmallScreen: l } = ye(), { localeMessages: d } = ue(), h = L(() => {
|
|
2475
2476
|
t((_) => {
|
|
2476
|
-
const
|
|
2477
|
-
return Math.min(
|
|
2477
|
+
const f = Math.floor(_ / 25) * 25;
|
|
2478
|
+
return Math.min(f + 25, vt);
|
|
2478
2479
|
});
|
|
2479
|
-
}, [t]),
|
|
2480
|
+
}, [t]), m = L(() => {
|
|
2480
2481
|
t((_) => {
|
|
2481
|
-
const
|
|
2482
|
-
return Math.min(
|
|
2482
|
+
const f = Math.ceil(_ / 25) * 25;
|
|
2483
|
+
return Math.min(f - 25, vt);
|
|
2483
2484
|
});
|
|
2484
|
-
}, [t]),
|
|
2485
|
+
}, [t]), p = F(() => e === Li, [e]), g = F(() => e === vt, [e]), w = F(() => {
|
|
2485
2486
|
var _;
|
|
2486
2487
|
return (_ = s.get(a)) == null ? void 0 : _.page.getViewport({ scale: 1, rotation: c });
|
|
2487
2488
|
}, [s, a, c]), b = L(
|
|
2488
2489
|
(_) => {
|
|
2489
|
-
const
|
|
2490
|
+
const f = ((w == null ? void 0 : w.width) || 0) + 2 * Vt, P = ((w == null ? void 0 : w.height) || 0) + 2 * Vt, S = (o == null ? void 0 : o.clientWidth) || 0, u = (o == null ? void 0 : o.clientHeight) || 0, T = mo(_, S, u, f, P);
|
|
2490
2491
|
t(T);
|
|
2491
2492
|
},
|
|
2492
2493
|
[t, w]
|
|
@@ -2496,55 +2497,55 @@ const Se = {
|
|
|
2496
2497
|
},
|
|
2497
2498
|
[t, b]
|
|
2498
2499
|
);
|
|
2499
|
-
return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: e, setZoomLevel: t }) : r ? /* @__PURE__ */ D("div", { className:
|
|
2500
|
-
/* @__PURE__ */ i(
|
|
2500
|
+
return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: e, setZoomLevel: t }) : r ? /* @__PURE__ */ D("div", { className: Ee["rp-zoom-wrapper"], children: [
|
|
2501
|
+
/* @__PURE__ */ i(Z, { content: d == null ? void 0 : d.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
2501
2502
|
Q,
|
|
2502
2503
|
{
|
|
2503
|
-
disabled:
|
|
2504
|
-
onClick:
|
|
2505
|
-
"aria-label":
|
|
2506
|
-
children: /* @__PURE__ */ i(
|
|
2504
|
+
disabled: p,
|
|
2505
|
+
onClick: m,
|
|
2506
|
+
"aria-label": d == null ? void 0 : d.zoomOutTooltip,
|
|
2507
|
+
children: /* @__PURE__ */ i(Ei, {})
|
|
2507
2508
|
}
|
|
2508
2509
|
) }),
|
|
2509
2510
|
!l && /* @__PURE__ */ i(
|
|
2510
2511
|
gn,
|
|
2511
2512
|
{
|
|
2512
2513
|
container: n,
|
|
2513
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(
|
|
2514
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(Z, { content: d == null ? void 0 : d.zoomSelectTooltip, children: /* @__PURE__ */ D(
|
|
2514
2515
|
Q,
|
|
2515
2516
|
{
|
|
2516
|
-
className:
|
|
2517
|
-
"aria-label":
|
|
2517
|
+
className: Ee["rp-current-zoom-wrapper"],
|
|
2518
|
+
"aria-label": d == null ? void 0 : d.zoomSelectTooltip,
|
|
2518
2519
|
children: [
|
|
2519
|
-
/* @__PURE__ */ i("span", { className:
|
|
2520
|
-
/* @__PURE__ */ i("span", { className:
|
|
2521
|
-
/* @__PURE__ */ i(Me, { className:
|
|
2520
|
+
/* @__PURE__ */ i("span", { className: Ee["rp-current-zoom-text"], children: e }),
|
|
2521
|
+
/* @__PURE__ */ i("span", { className: Ee["rp-current-zoom-text"], children: "%" }),
|
|
2522
|
+
/* @__PURE__ */ i(Me, { className: Ee["rp-current-zoom-icon"] })
|
|
2522
2523
|
]
|
|
2523
2524
|
}
|
|
2524
2525
|
) }) }),
|
|
2525
2526
|
style: { minWidth: "200px" },
|
|
2526
2527
|
align: "center",
|
|
2527
|
-
children: /* @__PURE__ */ D("div", { className:
|
|
2528
|
+
children: /* @__PURE__ */ D("div", { className: Ee["rp-zoom-dropdown-content"], children: [
|
|
2528
2529
|
/* @__PURE__ */ D(Be, { children: [
|
|
2529
|
-
/* @__PURE__ */ i(
|
|
2530
|
-
/* @__PURE__ */ i(
|
|
2531
|
-
/* @__PURE__ */ i(
|
|
2530
|
+
/* @__PURE__ */ i(be, { onClick: () => v(it.ACTUAL), children: d == null ? void 0 : d.zoomActualSize }),
|
|
2531
|
+
/* @__PURE__ */ i(be, { onClick: () => v(it.PAGE_FIT), children: d == null ? void 0 : d.zoomPageFit }),
|
|
2532
|
+
/* @__PURE__ */ i(be, { onClick: () => v(it.PAGE_WIDTH), children: d == null ? void 0 : d.zoomPageWidth })
|
|
2532
2533
|
] }),
|
|
2533
2534
|
/* @__PURE__ */ i(Rt, {}),
|
|
2534
|
-
/* @__PURE__ */ i(Be, { children:
|
|
2535
|
+
/* @__PURE__ */ i(Be, { children: Ri.map((_) => /* @__PURE__ */ D(be, { onClick: () => v(_), children: [
|
|
2535
2536
|
_,
|
|
2536
2537
|
" %"
|
|
2537
2538
|
] }, _)) })
|
|
2538
2539
|
] })
|
|
2539
2540
|
}
|
|
2540
2541
|
),
|
|
2541
|
-
/* @__PURE__ */ i(
|
|
2542
|
+
/* @__PURE__ */ i(Z, { content: d == null ? void 0 : d.zoomInTooltip, children: /* @__PURE__ */ i(
|
|
2542
2543
|
Q,
|
|
2543
2544
|
{
|
|
2544
2545
|
disabled: g,
|
|
2545
|
-
onClick:
|
|
2546
|
-
"aria-label":
|
|
2547
|
-
children: /* @__PURE__ */ i(
|
|
2546
|
+
onClick: h,
|
|
2547
|
+
"aria-label": d == null ? void 0 : d.zoomInTooltip,
|
|
2548
|
+
children: /* @__PURE__ */ i(Ni, {})
|
|
2548
2549
|
}
|
|
2549
2550
|
) })
|
|
2550
2551
|
] }) : null;
|
|
@@ -2561,110 +2562,110 @@ const Se = {
|
|
|
2561
2562
|
"rp-search-loader-icon": "_rp-search-loader-icon_lnthn_74"
|
|
2562
2563
|
}, sn = () => {
|
|
2563
2564
|
const { searchIcon: e } = pe();
|
|
2564
|
-
return e || /* @__PURE__ */ i(
|
|
2565
|
-
},
|
|
2566
|
-
const { container: e } =
|
|
2565
|
+
return e || /* @__PURE__ */ i(fo, {});
|
|
2566
|
+
}, Di = () => {
|
|
2567
|
+
const { container: e } = Ce(), [t, n] = H(!1), { pdf: o } = K(), [r, a] = H(null), {
|
|
2567
2568
|
searchOptions: c,
|
|
2568
2569
|
setSearchOptions: s,
|
|
2569
2570
|
loading: l,
|
|
2570
|
-
setSearch:
|
|
2571
|
-
totalMatches:
|
|
2572
|
-
currentMatchPosition:
|
|
2573
|
-
nextMatch:
|
|
2571
|
+
setSearch: d,
|
|
2572
|
+
totalMatches: h,
|
|
2573
|
+
currentMatchPosition: m,
|
|
2574
|
+
nextMatch: p,
|
|
2574
2575
|
prevMatch: g,
|
|
2575
2576
|
search: w
|
|
2576
|
-
} = yn(), { searchTool: b = !0 } = _e(), [v, _] =
|
|
2577
|
+
} = yn(), { searchTool: b = !0 } = _e(), [v, _] = H(w), { localeMessages: f } = ue(), P = L(() => {
|
|
2577
2578
|
n(!0);
|
|
2578
2579
|
}, []), S = L(() => {
|
|
2579
|
-
|
|
2580
|
-
}, [
|
|
2581
|
-
const E =
|
|
2582
|
-
(E ||
|
|
2580
|
+
d(""), _(""), n(!1);
|
|
2581
|
+
}, [d]), u = (I) => {
|
|
2582
|
+
const E = I.key === "Enter", $ = I.key === " ";
|
|
2583
|
+
(E || $) && S();
|
|
2583
2584
|
}, T = L(
|
|
2584
|
-
(
|
|
2585
|
-
|
|
2585
|
+
(I) => {
|
|
2586
|
+
I.key === "Escape" && t && S();
|
|
2586
2587
|
},
|
|
2587
2588
|
[t]
|
|
2588
2589
|
), C = L(
|
|
2589
|
-
(
|
|
2590
|
-
|
|
2590
|
+
(I) => {
|
|
2591
|
+
I.shiftKey && I.key === "Enter" ? g() : I.key === "Enter" && w !== v ? d(v) : I.key === "Enter" && p();
|
|
2591
2592
|
},
|
|
2592
|
-
[v, g,
|
|
2593
|
+
[v, g, p, d, w]
|
|
2593
2594
|
);
|
|
2594
2595
|
A(() => (window.addEventListener("keydown", T), () => {
|
|
2595
2596
|
window.removeEventListener("keydown", T);
|
|
2596
2597
|
}), [T]), A(() => {
|
|
2597
2598
|
r && r.focus();
|
|
2598
2599
|
}, [r]);
|
|
2599
|
-
const x = L((
|
|
2600
|
-
_(
|
|
2600
|
+
const x = L((I) => {
|
|
2601
|
+
_(I.target.value);
|
|
2601
2602
|
}, []), N = L(() => {
|
|
2602
|
-
_(""),
|
|
2603
|
-
}, [
|
|
2604
|
-
(
|
|
2605
|
-
s((E) => ({ ...E, matchCase:
|
|
2603
|
+
_(""), d("");
|
|
2604
|
+
}, [d]), y = F(() => `${m} / ${h}`, [m, h]), { wholeWords: O, matchCase: R } = F(() => c, [c]), k = L(
|
|
2605
|
+
(I) => {
|
|
2606
|
+
s((E) => ({ ...E, matchCase: I }));
|
|
2606
2607
|
},
|
|
2607
2608
|
[s]
|
|
2608
2609
|
), z = L(
|
|
2609
|
-
(
|
|
2610
|
-
s((E) => ({ ...E, wholeWords:
|
|
2610
|
+
(I) => {
|
|
2611
|
+
s((E) => ({ ...E, wholeWords: I }));
|
|
2611
2612
|
},
|
|
2612
2613
|
[s]
|
|
2613
2614
|
);
|
|
2614
2615
|
return A(() => {
|
|
2615
2616
|
S();
|
|
2616
|
-
}, [o, S]), b ? /* @__PURE__ */ i(
|
|
2617
|
-
|
|
2617
|
+
}, [o, S]), b ? /* @__PURE__ */ i(Se, { children: /* @__PURE__ */ i(
|
|
2618
|
+
kr,
|
|
2618
2619
|
{
|
|
2619
2620
|
open: t,
|
|
2620
2621
|
container: e,
|
|
2621
|
-
triggerComponent: /* @__PURE__ */ i(
|
|
2622
|
+
triggerComponent: /* @__PURE__ */ i(Z, { content: f == null ? void 0 : f.searchButtonTooltip, children: /* @__PURE__ */ i(Q, { onClick: P, "aria-label": f == null ? void 0 : f.searchButtonTooltip, children: /* @__PURE__ */ i(sn, {}) }) }),
|
|
2622
2623
|
children: /* @__PURE__ */ D("div", { className: J["rp-search-tool-content"], children: [
|
|
2623
2624
|
/* @__PURE__ */ D("div", { className: J["rp-search-tool-input-wrapper"], children: [
|
|
2624
2625
|
/* @__PURE__ */ D("div", { className: J["rp-search-tool-input"], children: [
|
|
2625
|
-
/* @__PURE__ */ i(
|
|
2626
|
+
/* @__PURE__ */ i(Z, { content: f == null ? void 0 : f.searchInputTooltip, children: /* @__PURE__ */ i(
|
|
2626
2627
|
dn,
|
|
2627
2628
|
{
|
|
2628
2629
|
value: v,
|
|
2629
2630
|
onKeyDown: C,
|
|
2630
2631
|
onChange: x,
|
|
2631
2632
|
icon: /* @__PURE__ */ i(sn, {}),
|
|
2632
|
-
placeholder:
|
|
2633
|
+
placeholder: f == null ? void 0 : f.searchInputPlaceholder,
|
|
2633
2634
|
className: J["rp-search-input"],
|
|
2634
2635
|
ref: a,
|
|
2635
|
-
children: !!v && /* @__PURE__ */ i("span", { className: J["rp-search-tool-input-clear"], onClick: N, children: /* @__PURE__ */ i(
|
|
2636
|
+
children: !!v && /* @__PURE__ */ i("span", { className: J["rp-search-tool-input-clear"], onClick: N, children: /* @__PURE__ */ i(go, {}) })
|
|
2636
2637
|
}
|
|
2637
2638
|
) }),
|
|
2638
|
-
l ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(xt, { className: J["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children:
|
|
2639
|
+
l ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(xt, { className: J["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: y })
|
|
2639
2640
|
] }),
|
|
2640
2641
|
/* @__PURE__ */ D("div", { className: J["rp-search-tool-input-checkboxes"], children: [
|
|
2641
|
-
/* @__PURE__ */ i(Gt, { name: "matchCase", value: R, onChange: k, children:
|
|
2642
|
-
/* @__PURE__ */ i(
|
|
2643
|
-
/* @__PURE__ */ i(Gt, { name: "wholeWord", value: O, onChange: z, children:
|
|
2644
|
-
/* @__PURE__ */ i(
|
|
2642
|
+
/* @__PURE__ */ i(Gt, { name: "matchCase", value: R, onChange: k, children: f == null ? void 0 : f.searchMatchCaseLabel }),
|
|
2643
|
+
/* @__PURE__ */ i(Z, { content: f == null ? void 0 : f.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: J["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Ut, {}) }) }),
|
|
2644
|
+
/* @__PURE__ */ i(Gt, { name: "wholeWord", value: O, onChange: z, children: f == null ? void 0 : f.searchWholeWordsLabel }),
|
|
2645
|
+
/* @__PURE__ */ i(Z, { content: f == null ? void 0 : f.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: J["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Ut, {}) }) })
|
|
2645
2646
|
] })
|
|
2646
2647
|
] }),
|
|
2647
2648
|
/* @__PURE__ */ D("div", { className: J["rp-search-tool-controls"], children: [
|
|
2648
|
-
/* @__PURE__ */ i(
|
|
2649
|
+
/* @__PURE__ */ i(Z, { content: f == null ? void 0 : f.searchPrevTooltip, children: /* @__PURE__ */ i(Q, { onClick: g, "aria-label": f == null ? void 0 : f.searchPrevTooltip, children: /* @__PURE__ */ i(
|
|
2649
2650
|
Me,
|
|
2650
2651
|
{
|
|
2651
2652
|
className: J["rp-search-tool-input-icon"],
|
|
2652
|
-
"aria-disabled": !
|
|
2653
|
+
"aria-disabled": !h
|
|
2653
2654
|
}
|
|
2654
2655
|
) }) }),
|
|
2655
|
-
/* @__PURE__ */ i(
|
|
2656
|
+
/* @__PURE__ */ i(Z, { content: f == null ? void 0 : f.searchNextTooltip, children: /* @__PURE__ */ i(Q, { onClick: p, "aria-label": f == null ? void 0 : f.searchNextTooltip, children: /* @__PURE__ */ i(
|
|
2656
2657
|
Me,
|
|
2657
2658
|
{
|
|
2658
2659
|
style: { transform: "rotate(180deg" },
|
|
2659
2660
|
className: J["rp-search-tool-input-icon"],
|
|
2660
|
-
"aria-disabled": !
|
|
2661
|
+
"aria-disabled": !h
|
|
2661
2662
|
}
|
|
2662
2663
|
) }) }),
|
|
2663
|
-
/* @__PURE__ */ i(
|
|
2664
|
+
/* @__PURE__ */ i(Z, { content: f == null ? void 0 : f.searchCloseButtonTooltip, children: /* @__PURE__ */ i(
|
|
2664
2665
|
Q,
|
|
2665
2666
|
{
|
|
2666
|
-
onKeyDown:
|
|
2667
|
-
"aria-label":
|
|
2667
|
+
onKeyDown: u,
|
|
2668
|
+
"aria-label": f == null ? void 0 : f.searchCloseButtonTooltip,
|
|
2668
2669
|
children: /* @__PURE__ */ i(vn, { onClick: S, className: J["rp-search-tool-input-icon"] })
|
|
2669
2670
|
}
|
|
2670
2671
|
) })
|
|
@@ -2672,42 +2673,42 @@ const Se = {
|
|
|
2672
2673
|
] })
|
|
2673
2674
|
}
|
|
2674
2675
|
) }) : null;
|
|
2675
|
-
},
|
|
2676
|
+
}, zi = "_loading_vpexk_1", Oe = {
|
|
2676
2677
|
"rp-loading-overlay": "_rp-loading-overlay_vpexk_1",
|
|
2677
2678
|
"rp-loading-modal": "_rp-loading-modal_vpexk_14",
|
|
2678
2679
|
"rp-loading-title": "_rp-loading-title_vpexk_27",
|
|
2679
2680
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_vpexk_35",
|
|
2680
2681
|
"rp-loading-progress": "_rp-loading-progress_vpexk_35",
|
|
2681
2682
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_vpexk_55",
|
|
2682
|
-
loading:
|
|
2683
|
-
},
|
|
2683
|
+
loading: zi
|
|
2684
|
+
}, Ai = ({ percentage: e }) => {
|
|
2684
2685
|
const { cancel: t } = nt(), { localeMessages: n } = ue();
|
|
2685
|
-
return e < 1 ? null : /* @__PURE__ */ i("div", { className:
|
|
2686
|
-
/* @__PURE__ */ D("div", { className:
|
|
2686
|
+
return e < 1 ? null : /* @__PURE__ */ i("div", { className: oe(Oe["rp-loading-overlay"]), children: /* @__PURE__ */ D("div", { className: oe(Oe["rp-loading-modal"]), children: [
|
|
2687
|
+
/* @__PURE__ */ D("div", { className: oe(Oe["rp-loading-title"]), children: [
|
|
2687
2688
|
n == null ? void 0 : n.printLoadingMessage,
|
|
2688
2689
|
"..."
|
|
2689
2690
|
] }),
|
|
2690
|
-
/* @__PURE__ */ i("div", { className:
|
|
2691
|
+
/* @__PURE__ */ i("div", { className: oe(Oe["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
|
|
2691
2692
|
"div",
|
|
2692
2693
|
{
|
|
2693
|
-
className:
|
|
2694
|
+
className: oe(Oe["rp-loading-progress"]),
|
|
2694
2695
|
style: { width: `${e}%` }
|
|
2695
2696
|
}
|
|
2696
2697
|
) }),
|
|
2697
|
-
/* @__PURE__ */ i("button", { className:
|
|
2698
|
+
/* @__PURE__ */ i("button", { className: oe(Oe["rp-loading-cancel-button"]), onClick: t, children: n == null ? void 0 : n.printCancelLabel })
|
|
2698
2699
|
] }) });
|
|
2699
|
-
},
|
|
2700
|
-
const { showPrintProgress: n } = _e(), { progress: o } = nt(), { isSmallScreen: r } =
|
|
2700
|
+
}, Fi = We((e, t) => {
|
|
2701
|
+
const { showPrintProgress: n } = _e(), { progress: o } = nt(), { isSmallScreen: r } = ye(), { percentage: a } = o || {}, c = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2701
2702
|
return /* @__PURE__ */ D("div", { children: [
|
|
2702
2703
|
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: t, className: Ae["rp-toolbar-content"], children: /* @__PURE__ */ D("div", { className: Ae["rp-toolbar-wrapper"], style: c(), children: [
|
|
2703
2704
|
/* @__PURE__ */ D("div", { "data-rp": "topBarLeft", className: Ae["rp-toolbar-start"], children: [
|
|
2704
|
-
/* @__PURE__ */ i(
|
|
2705
|
-
/* @__PURE__ */ i(
|
|
2705
|
+
/* @__PURE__ */ i(Di, {}),
|
|
2706
|
+
/* @__PURE__ */ i(Yo, {})
|
|
2706
2707
|
] }),
|
|
2707
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Ae["rp-toolbar-middle"], children: /* @__PURE__ */ i(
|
|
2708
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Ae["rp-toolbar-end"], children: /* @__PURE__ */ i(
|
|
2708
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Ae["rp-toolbar-middle"], children: /* @__PURE__ */ i(Oi, {}) }),
|
|
2709
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Ae["rp-toolbar-end"], children: /* @__PURE__ */ i(Ii, {}) })
|
|
2709
2710
|
] }) }),
|
|
2710
|
-
n && a ? /* @__PURE__ */ i(
|
|
2711
|
+
n && a ? /* @__PURE__ */ i(Ai, { percentage: a }) : null
|
|
2711
2712
|
] });
|
|
2712
2713
|
}), _t = {
|
|
2713
2714
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
|
|
@@ -2720,8 +2721,8 @@ const Se = {
|
|
|
2720
2721
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
2721
2722
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
2722
2723
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
2723
|
-
},
|
|
2724
|
-
const { thumbnailSrc: t, pageNumber: n, isFocused: o, viewport: r } = e, { goToPage: a } =
|
|
2724
|
+
}, ki = (e) => {
|
|
2725
|
+
const { thumbnailSrc: t, pageNumber: n, isFocused: o, viewport: r } = e, { goToPage: a } = ae(), c = F(() => o ? Fe["rp-thumbnail-active"] : "", [o]), s = F(() => ({
|
|
2725
2726
|
width: Math.round(r.width),
|
|
2726
2727
|
height: Math.round(r.height)
|
|
2727
2728
|
}), [r]), l = L(() => {
|
|
@@ -2734,7 +2735,7 @@ const Se = {
|
|
|
2734
2735
|
id: `page-${n}`,
|
|
2735
2736
|
className: Fe["rp-thumbnail-wrapper"],
|
|
2736
2737
|
children: [
|
|
2737
|
-
/* @__PURE__ */ i("div", { className:
|
|
2738
|
+
/* @__PURE__ */ i("div", { className: oe(c, Fe["rp-thumbnail"]), children: t ? /* @__PURE__ */ i(
|
|
2738
2739
|
"img",
|
|
2739
2740
|
{
|
|
2740
2741
|
src: t,
|
|
@@ -2760,22 +2761,22 @@ const Se = {
|
|
|
2760
2761
|
}, cn = {
|
|
2761
2762
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
2762
2763
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
2763
|
-
},
|
|
2764
|
+
}, Mi = 16, Wi = (e, t) => {
|
|
2764
2765
|
const n = e == null ? void 0 : e.querySelector(`#page-${t}`);
|
|
2765
|
-
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) -
|
|
2766
|
-
},
|
|
2767
|
-
const { show: n } = e, { focusedPage: o, totalPages: r } =
|
|
2768
|
-
ln(t, () =>
|
|
2769
|
-
const
|
|
2766
|
+
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - Mi);
|
|
2767
|
+
}, Hi = We((e, t) => {
|
|
2768
|
+
const { show: n } = e, { focusedPage: o, totalPages: r } = ae(), { thumbnailPages: a, addPage: c, thumbnailLength: s, addToPage: l } = Sn(), d = M(null), h = M(1);
|
|
2769
|
+
ln(t, () => d.current);
|
|
2770
|
+
const m = F(() => Object.values(a), [a]), p = L(() => {
|
|
2770
2771
|
const g = s + 1;
|
|
2771
2772
|
g <= r && c(g);
|
|
2772
2773
|
}, [c, r, s]);
|
|
2773
2774
|
return A(() => {
|
|
2774
|
-
o > s ? l(o) : n &&
|
|
2775
|
-
}, [o, s, l, n,
|
|
2775
|
+
o > s ? l(o) : n && h.current !== o && (Wi(d.current, o), h.current = o);
|
|
2776
|
+
}, [o, s, l, n, m]), Cr(d.current, p), /* @__PURE__ */ i("div", { ref: d, className: cn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: cn["rp-thumbnails"], children: n ? m.map((g, w) => {
|
|
2776
2777
|
var b, v;
|
|
2777
2778
|
return /* @__PURE__ */ i(
|
|
2778
|
-
|
|
2779
|
+
ki,
|
|
2779
2780
|
{
|
|
2780
2781
|
isFocused: o === ((b = g.page) == null ? void 0 : b.pageNumber),
|
|
2781
2782
|
pageNumber: (v = g.page) == null ? void 0 : v.pageNumber,
|
|
@@ -2786,29 +2787,29 @@ const Se = {
|
|
|
2786
2787
|
w
|
|
2787
2788
|
);
|
|
2788
2789
|
}) : null }) });
|
|
2789
|
-
}),
|
|
2790
|
+
}), $i = () => {
|
|
2790
2791
|
const { thumbnailIcon: e } = pe();
|
|
2791
|
-
return e || /* @__PURE__ */ i(
|
|
2792
|
-
},
|
|
2793
|
-
const { active: e, setActive: t } = Sn(), [n, o] =
|
|
2794
|
-
t((
|
|
2795
|
-
}, []),
|
|
2792
|
+
return e || /* @__PURE__ */ i(br, {});
|
|
2793
|
+
}, Vi = () => {
|
|
2794
|
+
const { active: e, setActive: t } = Sn(), [n, o] = H(200), r = M(null), { thumbnailTool: a, sidebarEnable: c } = _e(), { localeMessages: s } = ue(), l = L(() => {
|
|
2795
|
+
t((h) => !h);
|
|
2796
|
+
}, []), d = F(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: l, active: e }) : a ? /* @__PURE__ */ i(Z, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
2796
2797
|
Q,
|
|
2797
2798
|
{
|
|
2798
2799
|
onClick: l,
|
|
2799
2800
|
active: e,
|
|
2800
2801
|
"aria-label": s == null ? void 0 : s.thumbnailTooltip,
|
|
2801
|
-
children: /* @__PURE__ */ i(
|
|
2802
|
+
children: /* @__PURE__ */ i($i, {})
|
|
2802
2803
|
}
|
|
2803
2804
|
) }) : null, [a, e, l, s]);
|
|
2804
|
-
return /* @__PURE__ */ i(
|
|
2805
|
+
return /* @__PURE__ */ i(Se, { children: c && /* @__PURE__ */ D(
|
|
2805
2806
|
"div",
|
|
2806
2807
|
{
|
|
2807
2808
|
style: { "--rp-thumbnail-width": `${n}px` },
|
|
2808
2809
|
className: _t["rp-sidebar-content-wrapper"],
|
|
2809
2810
|
"data-rp": "sidebar",
|
|
2810
2811
|
children: [
|
|
2811
|
-
/* @__PURE__ */ i("div", { className: _t["rp-sidebar-content"], children:
|
|
2812
|
+
/* @__PURE__ */ i("div", { className: _t["rp-sidebar-content"], children: d }),
|
|
2812
2813
|
/* @__PURE__ */ D(
|
|
2813
2814
|
"div",
|
|
2814
2815
|
{
|
|
@@ -2816,15 +2817,15 @@ const Se = {
|
|
|
2816
2817
|
hidden: !e,
|
|
2817
2818
|
className: _t["rp-thumbnails-wrapper"],
|
|
2818
2819
|
children: [
|
|
2819
|
-
/* @__PURE__ */ i(
|
|
2820
|
-
/* @__PURE__ */ i(
|
|
2820
|
+
/* @__PURE__ */ i(Hi, { show: e, ref: r }),
|
|
2821
|
+
/* @__PURE__ */ i(Tr, { onWidthChange: o, thumbnailRef: r })
|
|
2821
2822
|
]
|
|
2822
2823
|
}
|
|
2823
2824
|
)
|
|
2824
2825
|
]
|
|
2825
2826
|
}
|
|
2826
2827
|
) });
|
|
2827
|
-
},
|
|
2828
|
+
}, we = {
|
|
2828
2829
|
"rp-layout": "_rp-layout_12d1x_1",
|
|
2829
2830
|
"rp-content": "_rp-content_12d1x_5",
|
|
2830
2831
|
"rp-pages": "_rp-pages_12d1x_11",
|
|
@@ -2832,17 +2833,17 @@ const Se = {
|
|
|
2832
2833
|
"rp-loader": "_rp-loader_12d1x_52",
|
|
2833
2834
|
"rp-theme-variables": "_rp-theme-variables_12d1x_56",
|
|
2834
2835
|
"rp-dark-mode": "_rp-dark-mode_12d1x_147"
|
|
2835
|
-
},
|
|
2836
|
+
}, Gi = We(
|
|
2836
2837
|
(e, t) => {
|
|
2837
|
-
const { children: n, toolbarRef: o, style: r, className: a } = e, { customVariables: c, customDarkVariables: s } =
|
|
2838
|
+
const { children: n, toolbarRef: o, style: r, className: a } = e, { customVariables: c, customDarkVariables: s } = Rr(), { darkMode: l } = ar();
|
|
2838
2839
|
return /* @__PURE__ */ i(
|
|
2839
2840
|
"div",
|
|
2840
2841
|
{
|
|
2841
2842
|
ref: t,
|
|
2842
|
-
className:
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
l ?
|
|
2843
|
+
className: oe(
|
|
2844
|
+
we["rp-theme-variables"],
|
|
2845
|
+
we["rp-container"],
|
|
2846
|
+
l ? we["rp-dark-mode"] : "",
|
|
2846
2847
|
a
|
|
2847
2848
|
),
|
|
2848
2849
|
style: {
|
|
@@ -2855,7 +2856,7 @@ const Se = {
|
|
|
2855
2856
|
}
|
|
2856
2857
|
);
|
|
2857
2858
|
}
|
|
2858
|
-
),
|
|
2859
|
+
), Es = We((e, t) => {
|
|
2859
2860
|
const {
|
|
2860
2861
|
children: n,
|
|
2861
2862
|
slots: o,
|
|
@@ -2864,26 +2865,26 @@ const Se = {
|
|
|
2864
2865
|
className: c,
|
|
2865
2866
|
mobileWidth: s,
|
|
2866
2867
|
onLoaded: l,
|
|
2867
|
-
cleanupOnLoaded:
|
|
2868
|
-
onLayoutWidthChange:
|
|
2869
|
-
} = e, [
|
|
2868
|
+
cleanupOnLoaded: d,
|
|
2869
|
+
onLayoutWidthChange: h
|
|
2870
|
+
} = e, [m, p] = H(null), { setContainer: g, setContentRef: w } = Ce(), { loading: b } = K(), { LoaderImageComponent: v } = mn();
|
|
2870
2871
|
return A(() => (l && l(), () => {
|
|
2871
|
-
|
|
2872
|
-
}), [l,
|
|
2873
|
-
/* @__PURE__ */ D(
|
|
2874
|
-
/* @__PURE__ */ D("div", { className:
|
|
2875
|
-
/* @__PURE__ */ i(
|
|
2876
|
-
/* @__PURE__ */ D("div", { className:
|
|
2877
|
-
/* @__PURE__ */ i("div", { className:
|
|
2878
|
-
/* @__PURE__ */ i("div", { ref: w, className:
|
|
2872
|
+
d && d();
|
|
2873
|
+
}), [l, d]), /* @__PURE__ */ i(Gi, { toolbarRef: m, ref: t, children: /* @__PURE__ */ i(Lr, { mobileWidth: s, onLayoutWidthChange: h, children: /* @__PURE__ */ i(Pr, { slots: o, children: /* @__PURE__ */ i(Sr, { icons: r, children: /* @__PURE__ */ D(xr, { getContainerRef: g, style: a, className: c, children: [
|
|
2874
|
+
/* @__PURE__ */ D(yr, { children: [
|
|
2875
|
+
/* @__PURE__ */ D("div", { className: we["rp-layout"], children: [
|
|
2876
|
+
/* @__PURE__ */ i(Fi, { ref: p }),
|
|
2877
|
+
/* @__PURE__ */ D("div", { className: we["rp-content"], children: [
|
|
2878
|
+
/* @__PURE__ */ i("div", { className: we["rp-sidebar"], children: /* @__PURE__ */ i(Vi, {}) }),
|
|
2879
|
+
/* @__PURE__ */ i("div", { ref: w, className: we["rp-pages"], children: n })
|
|
2879
2880
|
] })
|
|
2880
2881
|
] }),
|
|
2881
|
-
/* @__PURE__ */ i(
|
|
2882
|
+
/* @__PURE__ */ i(Ir, {})
|
|
2882
2883
|
] }),
|
|
2883
2884
|
b ? /* @__PURE__ */ i(
|
|
2884
2885
|
"div",
|
|
2885
2886
|
{
|
|
2886
|
-
className:
|
|
2887
|
+
className: we["rp-loader"],
|
|
2887
2888
|
style: {
|
|
2888
2889
|
position: "absolute",
|
|
2889
2890
|
top: 0,
|
|
@@ -2911,48 +2912,48 @@ const Se = {
|
|
|
2911
2912
|
] }) }) }) }) });
|
|
2912
2913
|
});
|
|
2913
2914
|
export {
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2915
|
+
xo as A,
|
|
2916
|
+
Di as B,
|
|
2917
|
+
Co as C,
|
|
2918
|
+
qo as D,
|
|
2919
|
+
Fi as E,
|
|
2919
2920
|
Bn as F,
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2921
|
+
ki as G,
|
|
2922
|
+
Hi as H,
|
|
2923
|
+
Vi as I,
|
|
2924
|
+
Gi as J,
|
|
2925
|
+
Ai as L,
|
|
2926
|
+
xi as M,
|
|
2927
|
+
yi as O,
|
|
2928
|
+
Ss as P,
|
|
2929
|
+
Ls as R,
|
|
2930
|
+
Is as S,
|
|
2931
|
+
ys as T,
|
|
2932
|
+
Oi as Z,
|
|
2933
|
+
xs as a,
|
|
2934
|
+
Es as b,
|
|
2934
2935
|
Un as c,
|
|
2935
2936
|
nt as d,
|
|
2936
2937
|
yn as e,
|
|
2937
2938
|
bn as f,
|
|
2938
|
-
|
|
2939
|
+
vo as g,
|
|
2939
2940
|
Cn as h,
|
|
2940
|
-
|
|
2941
|
+
_o as i,
|
|
2941
2942
|
Tn as j,
|
|
2942
|
-
|
|
2943
|
+
wo as k,
|
|
2943
2944
|
Pn as l,
|
|
2944
2945
|
Sn as m,
|
|
2945
|
-
|
|
2946
|
+
bo as n,
|
|
2946
2947
|
xn as o,
|
|
2947
|
-
|
|
2948
|
-
|
|
2948
|
+
To as p,
|
|
2949
|
+
yo as q,
|
|
2949
2950
|
Nt as r,
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2951
|
+
Vo as s,
|
|
2952
|
+
Zo as t,
|
|
2953
|
+
ae as u,
|
|
2954
|
+
Bo as v,
|
|
2955
|
+
Yo as w,
|
|
2956
|
+
mi as x,
|
|
2956
2957
|
Xn as y,
|
|
2957
|
-
|
|
2958
|
+
Ii as z
|
|
2958
2959
|
};
|