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