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