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