@pdf-viewer/react 1.3.0-rc.2 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{RPDefaultLayout-19259aa7.js → RPDefaultLayout-6fe6be3d.js} +327 -319
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MenuItem.js +1 -1
- package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +2 -2
- package/dist/components/layout/toolbar/OtherTool.js +2 -2
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/RotateTool.js +1 -1
- package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +2 -2
- package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +2 -2
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- 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/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/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/package.json +1 -1
- package/dist/Popover-aaa4344e.js +0 -1445
- 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
|
@@ -1,91 +1,89 @@
|
|
|
1
1
|
import { jsx as i, jsxs as A, Fragment as Fe } from "react/jsx-runtime";
|
|
2
2
|
import * as U from "react";
|
|
3
|
-
import { useRef as W, useEffect as z, useCallback as L, useState as M, createContext as Ze, useContext as je, useMemo as k, forwardRef as Be, useImperativeHandle as
|
|
3
|
+
import { useRef as W, useEffect as z, useCallback as L, useState as M, createContext as Ze, useContext as je, useMemo as k, forwardRef as Be, useImperativeHandle as en, createElement as Me, PureComponent as Xn, Component as Jn, memo as Yn } from "react";
|
|
4
4
|
import { ChevronUpIcon as ke } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as ee } from "./components/ui/Button.js";
|
|
6
|
-
import { UIInput as
|
|
6
|
+
import { UIInput as tn } from "./components/ui/Input.js";
|
|
7
7
|
import { useScrollModeContext as Ee } from "./contexts/ScrollModeContext.js";
|
|
8
8
|
import { useDocumentContext as Q } from "./contexts/RPDocumentContext.js";
|
|
9
9
|
import "./contexts/DarkModeContext.js";
|
|
10
|
-
import { ViewMode as Ve, ScrollMode as X, AnnotationSubType as
|
|
10
|
+
import { ViewMode as Ve, ScrollMode as X, AnnotationSubType as Lt, SelectionMode as Qn, ZoomLevel as nt } from "./utils/types.js";
|
|
11
11
|
import { useRotationContext as Ke } from "./contexts/RotationContext.js";
|
|
12
|
-
import { useLayerContext as
|
|
12
|
+
import { useLayerContext as er } from "./contexts/LayerContext.js";
|
|
13
13
|
import { useZoomContext as Xe } from "./contexts/ZoomContext.js";
|
|
14
14
|
import { useViewModeContext as Je } from "./contexts/ViewModeContext.js";
|
|
15
15
|
import { useVirtualScrollContext as Ye } from "./contexts/VirtualScrollContext.js";
|
|
16
|
-
import { useVirtualGridContext as
|
|
16
|
+
import { useVirtualGridContext as nn } from "./contexts/VirtualGridContext.js";
|
|
17
17
|
import { useScrollStateContext as Qe } from "./contexts/ScrollStateContext.js";
|
|
18
|
-
import { useSelectionModeContext as
|
|
19
|
-
import { useInitialStateContext as
|
|
20
|
-
import { useFullScreenContext as
|
|
18
|
+
import { useSelectionModeContext as tr } from "./contexts/SelectionModeContext.js";
|
|
19
|
+
import { useInitialStateContext as nr } from "./contexts/InitialStateContext.js";
|
|
20
|
+
import { useFullScreenContext as rr } from "./contexts/FullScreenContext.js";
|
|
21
21
|
import "./contexts/FileInputContext.js";
|
|
22
22
|
import "./contexts/DropFileZoneContext.js";
|
|
23
23
|
import { renderPage as ht } from "./utils/renderPage.js";
|
|
24
|
-
import { highlightMatches as
|
|
25
|
-
import * as
|
|
26
|
-
import { PixelsPerInch as
|
|
24
|
+
import { highlightMatches as rn, findMatches as or, resetDivs as ir } from "./utils/highlight.js";
|
|
25
|
+
import * as on from "pdfjs-dist";
|
|
26
|
+
import { PixelsPerInch as ar, AnnotationMode as sr, RenderingCancelledException as cr, AnnotationLayer as lr } from "pdfjs-dist";
|
|
27
27
|
import { useLayoutContainer as Se } from "./contexts/LayoutContainerContext.js";
|
|
28
|
-
import { useDimensionPagesContext as
|
|
28
|
+
import { useDimensionPagesContext as wt } from "./contexts/DimensionPagesContext.js";
|
|
29
29
|
import { useLocalizationContext as pe } from "./contexts/LocalizationContext.js";
|
|
30
|
-
import { useLoaderContext as
|
|
30
|
+
import { useLoaderContext as an } from "./contexts/LoaderContext.js";
|
|
31
31
|
import "./components/RPConfig.js";
|
|
32
|
-
import { ThumbnailIcon as
|
|
32
|
+
import { ThumbnailIcon as ur } from "./components/icons/Thumbnail.js";
|
|
33
33
|
import { c as oe } from "./clsx-0c6e471a.js";
|
|
34
|
-
import { LoaderIcon as
|
|
35
|
-
import { useInfiniteScroll as
|
|
36
|
-
import { RPSplitter as
|
|
37
|
-
import { useToolbarComponentContext as ve, ToolbarComponentProvider as
|
|
38
|
-
import { useIconContext as he, IconProvider as
|
|
34
|
+
import { LoaderIcon as bt } from "./components/icons/LoaderIcon.js";
|
|
35
|
+
import { useInfiniteScroll as dr } from "./utils/hooks/useInfiniteScroll.js";
|
|
36
|
+
import { RPSplitter as pr } from "./components/layout/sidebar/RPSplitter.js";
|
|
37
|
+
import { useToolbarComponentContext as ve, ToolbarComponentProvider as hr } from "./contexts/ToolbarComponentContext.js";
|
|
38
|
+
import { useIconContext as he, IconProvider as mr } from "./contexts/IconContext.js";
|
|
39
39
|
import q from "./components/ui/RPTooltip.js";
|
|
40
|
-
import { c as Ce, C as
|
|
41
|
-
import { WrapperLayout as
|
|
42
|
-
import { RPDropFileZone as
|
|
43
|
-
import { useViewportContext as Ie, ViewportProvider as
|
|
40
|
+
import { c as Ce, C as fr } from "./Container-8fea0875.js";
|
|
41
|
+
import { WrapperLayout as gr } from "./components/layout/WrapperLayout.js";
|
|
42
|
+
import { RPDropFileZone as vr } from "./components/RPDropFileZone.js";
|
|
43
|
+
import { useViewportContext as Ie, ViewportProvider as _r } from "./contexts/ViewportContext.js";
|
|
44
44
|
import "./contexts/ThemeContext.js";
|
|
45
|
-
import { SimpleLinkService as
|
|
46
|
-
import { annotationsEvents as
|
|
47
|
-
import { useWatermark as
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import { usePinch as Lr } from "./utils/hooks/usePinch.js";
|
|
45
|
+
import { SimpleLinkService as wr } from "./utils/link_service.js";
|
|
46
|
+
import { annotationsEvents as br, annotationEventsHandler as Cr, handleClick as Nt, handleAnnotationWidget as Tr, handleAnnotationLink as Pr, bindLayerEvents as Sr, unbindLayerEvents as Et } from "./utils/annotations.js";
|
|
47
|
+
import { useWatermark as Ir } from "./utils/hooks/useWatermark.js";
|
|
48
|
+
import { useMousePressed as yr } from "./utils/hooks/useMousePressed.js";
|
|
49
|
+
import { useGrabScroll as xr } from "./utils/hooks/useGrabScroll.js";
|
|
50
|
+
import { usePinch as Rr } from "./utils/hooks/usePinch.js";
|
|
52
51
|
import { useDebounce as mt } from "./utils/hooks/useDebounce.js";
|
|
53
|
-
import { getThumbnailViewport as
|
|
54
|
-
import { smoothScrollTo as
|
|
55
|
-
import { appConsole as
|
|
56
|
-
import { FileUploadTool as
|
|
57
|
-
import { DarkModeTool as
|
|
58
|
-
import { ThreeDotIcon as
|
|
59
|
-
import { UIDropDown as
|
|
60
|
-
import { u as
|
|
61
|
-
import {
|
|
62
|
-
import { a as
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import { MenuSeparator as Tt } from "./components/layout/toolbar/MenuSeparator.js";
|
|
73
|
-
import { FileDownloadDefaultIcon as Kr } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
52
|
+
import { getThumbnailViewport as Ot } from "./utils/getThumbnailViewport.js";
|
|
53
|
+
import { smoothScrollTo as Dt } from "./utils/smoothScrollTo.js";
|
|
54
|
+
import { appConsole as Lr } from "./utils/appConsole.js";
|
|
55
|
+
import { FileUploadTool as sn } from "./components/layout/toolbar/FileUploadTool.js";
|
|
56
|
+
import { DarkModeTool as Nr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
57
|
+
import { ThreeDotIcon as Er } from "./components/icons/ThreeDotIcon.js";
|
|
58
|
+
import { UIDropDown as cn } from "./components/ui/DropDown.js";
|
|
59
|
+
import { c as Or, u as Ct, P as We, b as Ae, d as Tt, i as Dr, k as zr, a as Ar } from "./index-48ca3f30.js";
|
|
60
|
+
import { D as Fr, d as rt } from "./floating-ui.react-dom-88a86594.js";
|
|
61
|
+
import { a as kr, h as Wr, u as Mr, F as Hr, b as $r, G as Ue } from "./index-4ba3ab9a.js";
|
|
62
|
+
import { CloseIcon as ln } from "./components/icons/CloseIcon.js";
|
|
63
|
+
import { dateFormatter as zt } from "./utils/dateFormatter.js";
|
|
64
|
+
import { PropertyItem as Gr } from "./components/layout/toolbar/PropertyItem.js";
|
|
65
|
+
import { useOtherToolContext as Vr, OtherToolProvider as Ur } from "./contexts/OtherToolContext.js";
|
|
66
|
+
import { DocumentProperties as qr } from "./components/layout/toolbar/DocumentProperties.js";
|
|
67
|
+
import { RotateTool as Zr } from "./components/layout/toolbar/RotateTool.js";
|
|
68
|
+
import { ScrollModeTool as jr } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
69
|
+
import { MenuSeparator as Pt } from "./components/layout/toolbar/MenuSeparator.js";
|
|
70
|
+
import { FileDownloadDefaultIcon as Br } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
74
71
|
import { MenuItem as we } from "./components/layout/toolbar/MenuItem.js";
|
|
75
|
-
import { PrintDefaultTool as
|
|
76
|
-
import { FullScreenTool as
|
|
77
|
-
import { GoToDownIcon as
|
|
78
|
-
import { SelectionModeTool as
|
|
79
|
-
import { ZoomInIcon as
|
|
80
|
-
import { ZoomOutIcon as
|
|
81
|
-
import { PAGE_PADDING as
|
|
82
|
-
import { getZoomLevel as
|
|
83
|
-
import { SearchIcon as
|
|
84
|
-
import { UICheckbox as
|
|
85
|
-
import { ClearIcon as
|
|
86
|
-
import { InfoIcon as
|
|
87
|
-
import
|
|
88
|
-
|
|
72
|
+
import { PrintDefaultTool as Kr } from "./components/icons/PrintDefaultIcon.js";
|
|
73
|
+
import { FullScreenTool as un } from "./components/layout/toolbar/FullScreenTool.js";
|
|
74
|
+
import { GoToDownIcon as dn } from "./components/icons/GoToDownIcon.js";
|
|
75
|
+
import { SelectionModeTool as Xr } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
76
|
+
import { ZoomInIcon as Jr } from "./components/icons/ZoomInIcon.js";
|
|
77
|
+
import { ZoomOutIcon as Yr } from "./components/icons/ZoomOutIcon.js";
|
|
78
|
+
import { PAGE_PADDING as At } from "./utils/constants.js";
|
|
79
|
+
import { getZoomLevel as Qr } from "./utils/getZoomLevel.js";
|
|
80
|
+
import { SearchIcon as eo } from "./components/icons/SearchIcon.js";
|
|
81
|
+
import { UICheckbox as Ft } from "./components/ui/Checkbox.js";
|
|
82
|
+
import { ClearIcon as to } from "./components/icons/ClearIcon.js";
|
|
83
|
+
import { InfoIcon as kt } from "./components/icons/InfoIcon.js";
|
|
84
|
+
import { UIPopOver as no } from "./components/ui/Popover.js";
|
|
85
|
+
import './assets/RPDefaultLayout.css';const pn = () => {
|
|
86
|
+
const { viewMode: t } = Je(), { scrollMode: e } = Ee(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = Ye(), { setFocusedPage: a } = se(), s = W(), { columnCount: c } = nn(), { widths: l, heights: u } = wt(), h = W(e), f = W(t), p = W(c);
|
|
89
87
|
z(() => {
|
|
90
88
|
n != null && n.scrollToItem && (s.current = n);
|
|
91
89
|
}, [n]), z(() => {
|
|
@@ -108,7 +106,7 @@ import './assets/RPDefaultLayout.css';const dn = () => {
|
|
|
108
106
|
}), g();
|
|
109
107
|
});
|
|
110
108
|
},
|
|
111
|
-
[r, l,
|
|
109
|
+
[r, l, Dt]
|
|
112
110
|
);
|
|
113
111
|
return z(() => {
|
|
114
112
|
h.current = e, f.current = t;
|
|
@@ -161,13 +159,13 @@ import './assets/RPDefaultLayout.css';const dn = () => {
|
|
|
161
159
|
c,
|
|
162
160
|
v,
|
|
163
161
|
a,
|
|
164
|
-
|
|
162
|
+
Dt,
|
|
165
163
|
u,
|
|
166
164
|
l
|
|
167
165
|
]
|
|
168
166
|
) };
|
|
169
167
|
}, ro = (t = 1) => {
|
|
170
|
-
const [e, n] = M(t), [o, r] = M(0), { scrollToPage: a } =
|
|
168
|
+
const [e, n] = M(t), [o, r] = M(0), { scrollToPage: a } = pn(), s = W(1), { isScrolling: c } = Qe(), { viewMode: l } = Je(), { scrollMode: u } = Ee(), h = mt(e, 100), f = L(
|
|
171
169
|
(w) => {
|
|
172
170
|
if (!/^[0-9]*$/g.test(w.toString()) || !w)
|
|
173
171
|
return { success: !1, currentPage: s.current };
|
|
@@ -199,7 +197,7 @@ import './assets/RPDefaultLayout.css';const dn = () => {
|
|
|
199
197
|
prevPage: _,
|
|
200
198
|
goToPage: v
|
|
201
199
|
};
|
|
202
|
-
},
|
|
200
|
+
}, hn = Ze({
|
|
203
201
|
focusedPage: 0,
|
|
204
202
|
setFocusedPage: (t) => {
|
|
205
203
|
},
|
|
@@ -212,14 +210,14 @@ import './assets/RPDefaultLayout.css';const dn = () => {
|
|
|
212
210
|
nextPage: () => {
|
|
213
211
|
}
|
|
214
212
|
}), se = () => {
|
|
215
|
-
const t = je(
|
|
216
|
-
return typeof (t == null ? void 0 : t.focusedPage) > "u" &&
|
|
217
|
-
},
|
|
213
|
+
const t = je(hn);
|
|
214
|
+
return typeof (t == null ? void 0 : t.focusedPage) > "u" && Lr.error("Please use this hooks inside children component of RPProvider"), t;
|
|
215
|
+
}, rs = ({ children: t }) => {
|
|
218
216
|
const { pdf: e } = Q(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: s, nextPage: c, prevPage: l } = ro();
|
|
219
217
|
return z(() => {
|
|
220
218
|
e != null && e.numPages && a(e.numPages);
|
|
221
219
|
}, [e, a]), /* @__PURE__ */ i(
|
|
222
|
-
|
|
220
|
+
hn.Provider,
|
|
223
221
|
{
|
|
224
222
|
value: {
|
|
225
223
|
focusedPage: n,
|
|
@@ -268,7 +266,7 @@ const oo = () => {
|
|
|
268
266
|
p();
|
|
269
267
|
return;
|
|
270
268
|
}
|
|
271
|
-
const x = C /
|
|
269
|
+
const x = C / ar.PDF;
|
|
272
270
|
P.width = Math.floor(T.width * x), P.height = Math.floor(T.height * x);
|
|
273
271
|
const D = P.getContext("2d");
|
|
274
272
|
D.save(), D.fillStyle = "rgb(255, 255, 255)", D.fillRect(0, 0, P.width, P.height), D.restore();
|
|
@@ -285,14 +283,14 @@ const oo = () => {
|
|
|
285
283
|
transform: [x, 0, 0, x, 0, 0],
|
|
286
284
|
viewport: R.getViewport({ scale: 1, rotation: T.rotation }),
|
|
287
285
|
intent: "print",
|
|
288
|
-
annotationMode:
|
|
286
|
+
annotationMode: sr.ENABLE_STORAGE,
|
|
289
287
|
optionalContentConfigPromise: S,
|
|
290
288
|
printAnnotationStorage: F
|
|
291
289
|
};
|
|
292
290
|
try {
|
|
293
291
|
return R.render(N).promise;
|
|
294
292
|
} catch (y) {
|
|
295
|
-
throw y instanceof
|
|
293
|
+
throw y instanceof cr || console.error(y), y;
|
|
296
294
|
}
|
|
297
295
|
}, b = L(() => {
|
|
298
296
|
const P = window.print;
|
|
@@ -394,7 +392,7 @@ const oo = () => {
|
|
|
394
392
|
isError: s,
|
|
395
393
|
error: l
|
|
396
394
|
};
|
|
397
|
-
},
|
|
395
|
+
}, mn = Ze({
|
|
398
396
|
print: () => {
|
|
399
397
|
},
|
|
400
398
|
cancel: () => {
|
|
@@ -411,7 +409,7 @@ const oo = () => {
|
|
|
411
409
|
console.error("Error in setOnError callback:", e);
|
|
412
410
|
}
|
|
413
411
|
}
|
|
414
|
-
}),
|
|
412
|
+
}), os = ({ children: t }) => {
|
|
415
413
|
const [e, n] = M(null), [o, r] = M(null), { print: a, cancel: s, progress: c, isComplete: l, isError: u, error: h } = oo(), f = L((w) => {
|
|
416
414
|
w && typeof w == "function" && r(() => w);
|
|
417
415
|
}, []), p = (w) => {
|
|
@@ -441,9 +439,9 @@ const oo = () => {
|
|
|
441
439
|
setOnError: p,
|
|
442
440
|
progress: c
|
|
443
441
|
};
|
|
444
|
-
return /* @__PURE__ */ i(
|
|
442
|
+
return /* @__PURE__ */ i(mn.Provider, { value: b, children: t });
|
|
445
443
|
}, et = () => {
|
|
446
|
-
const t = je(
|
|
444
|
+
const t = je(mn);
|
|
447
445
|
if (!t)
|
|
448
446
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
449
447
|
return t;
|
|
@@ -453,7 +451,7 @@ const oo = () => {
|
|
|
453
451
|
if (!n.size)
|
|
454
452
|
return;
|
|
455
453
|
const l = Array.from(n.values()).slice(0, c).map((f) => {
|
|
456
|
-
const { thumbnailViewport: p, scale: v } =
|
|
454
|
+
const { thumbnailViewport: p, scale: v } = Ot(f.page, o);
|
|
457
455
|
return {
|
|
458
456
|
scale: v,
|
|
459
457
|
page: f.page,
|
|
@@ -508,7 +506,7 @@ const oo = () => {
|
|
|
508
506
|
}));
|
|
509
507
|
const u = document.createElement("canvas");
|
|
510
508
|
ht(l.page, u, { scale: l.thumbnailScale, rotate: o }).promise.then(() => {
|
|
511
|
-
const h = u.toDataURL(), { thumbnailViewport: f, scale: p } =
|
|
509
|
+
const h = u.toDataURL(), { thumbnailViewport: f, scale: p } = Ot(l.page, o);
|
|
512
510
|
return {
|
|
513
511
|
scale: p,
|
|
514
512
|
thumbnailSrc: h,
|
|
@@ -523,7 +521,7 @@ const oo = () => {
|
|
|
523
521
|
[n, o]
|
|
524
522
|
);
|
|
525
523
|
return { thumbnailPages: t, addPage: s, addToPage: a, thumbnailLength: r };
|
|
526
|
-
},
|
|
524
|
+
}, fn = Ze({
|
|
527
525
|
thumbnailPages: {},
|
|
528
526
|
addPage: (t) => {
|
|
529
527
|
},
|
|
@@ -533,20 +531,20 @@ const oo = () => {
|
|
|
533
531
|
setActive: (t) => {
|
|
534
532
|
},
|
|
535
533
|
active: !1
|
|
536
|
-
}),
|
|
534
|
+
}), gn = () => je(fn), is = ({
|
|
537
535
|
children: t,
|
|
538
536
|
initialThumbnailsVisible: e
|
|
539
537
|
}) => {
|
|
540
538
|
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = io(), [s, c] = M(e);
|
|
541
539
|
return /* @__PURE__ */ i(
|
|
542
|
-
|
|
540
|
+
fn.Provider,
|
|
543
541
|
{
|
|
544
542
|
value: { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a, active: s, setActive: c },
|
|
545
543
|
children: t
|
|
546
544
|
}
|
|
547
545
|
);
|
|
548
546
|
}, ao = (t = {}, e = "") => {
|
|
549
|
-
const [n, o] = M(e), [r, a] = M(!1), { pdf: s, pages: c } = Q(), l =
|
|
547
|
+
const [n, o] = M(e), [r, a] = M(!1), { pdf: s, pages: c } = Q(), l = wt(), u = W(!n), { currentZoom: h } = Xe(), [f, p] = M([]), { setFocusedPage: v } = se(), [_, b] = M(0), { pageScrollElementRef: w, virtualScrollableElementRef: g } = Ye(), { scrollMode: m } = Ee(), { pagesRef: P } = Se(), [I, d] = M(null), T = W({}), C = k(() => _ === 0 ? null : f[_ - 1], [_, f]), S = k(() => f.length, [f]);
|
|
550
548
|
z(() => {
|
|
551
549
|
if (!C || !c)
|
|
552
550
|
return;
|
|
@@ -560,12 +558,12 @@ const oo = () => {
|
|
|
560
558
|
if (!F)
|
|
561
559
|
return;
|
|
562
560
|
const Z = T.current[C.page], J = F.page.getViewport({ scale: 1 });
|
|
563
|
-
H = new
|
|
561
|
+
H = new on.TextLayer({
|
|
564
562
|
viewport: J,
|
|
565
563
|
textContentSource: Z,
|
|
566
564
|
container: document.createElement("div")
|
|
567
565
|
}), H.render().then(() => {
|
|
568
|
-
const j = H.textDivs[C.start.idx], [B] =
|
|
566
|
+
const j = H.textDivs[C.start.idx], [B] = rn([C], Z, H.textDivs), te = l.widths[C.page - 1], le = l.heights[C.page - 1], K = document.createElement("div"), ne = document.createElement("div");
|
|
569
567
|
j.style.position = "absolute", j.style.color = "transparent", ne.style.position = "absolute", ne.style.top = "0", ne.style.setProperty("--scale-factor", `${h}`), K.style.position = "relative", K.style.width = `${te}px`, K.style.height = `${le}px`, K.style.zIndex = "-1", K.appendChild(j), ne.appendChild(K), P.prepend(ne);
|
|
570
568
|
const ue = B.element.getBoundingClientRect(), ye = ne.getBoundingClientRect(), me = ue.top - ye.top, be = ue.left - ye.left, fe = E + me - N + ue.height / 2, ae = G + be - y + ue.width / 2, Oe = {
|
|
571
569
|
left: Math.max(ae, 0),
|
|
@@ -609,7 +607,7 @@ const oo = () => {
|
|
|
609
607
|
u.current = !1, a(!0), p([]), b(0), D(s).then((R) => {
|
|
610
608
|
T.current = R;
|
|
611
609
|
const N = Object.keys(R).reduce((y, E) => {
|
|
612
|
-
const G =
|
|
610
|
+
const G = or(
|
|
613
611
|
[n],
|
|
614
612
|
R[E],
|
|
615
613
|
Number(E) - 1,
|
|
@@ -634,7 +632,7 @@ const oo = () => {
|
|
|
634
632
|
currentMatchElement: I,
|
|
635
633
|
setCurrentMatchElement: d
|
|
636
634
|
};
|
|
637
|
-
},
|
|
635
|
+
}, vn = Ze({
|
|
638
636
|
search: "",
|
|
639
637
|
setSearch: (t) => {
|
|
640
638
|
},
|
|
@@ -652,7 +650,7 @@ const oo = () => {
|
|
|
652
650
|
currentMatchElement: null,
|
|
653
651
|
setCurrentMatchElement: (t) => {
|
|
654
652
|
}
|
|
655
|
-
}),
|
|
653
|
+
}), as = ({
|
|
656
654
|
children: t,
|
|
657
655
|
initialSearch: e
|
|
658
656
|
}) => {
|
|
@@ -670,7 +668,7 @@ const oo = () => {
|
|
|
670
668
|
setCurrentMatchElement: _
|
|
671
669
|
} = ao(n, e);
|
|
672
670
|
return /* @__PURE__ */ i(
|
|
673
|
-
|
|
671
|
+
vn.Provider,
|
|
674
672
|
{
|
|
675
673
|
value: {
|
|
676
674
|
searchOptions: n,
|
|
@@ -690,7 +688,7 @@ const oo = () => {
|
|
|
690
688
|
children: t
|
|
691
689
|
}
|
|
692
690
|
);
|
|
693
|
-
},
|
|
691
|
+
}, _n = () => je(vn), de = {
|
|
694
692
|
"rp-pages": "_rp-pages_1776r_1",
|
|
695
693
|
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_1776r_7",
|
|
696
694
|
"rp-pages-container": "_rp-pages-container_1776r_11",
|
|
@@ -729,15 +727,15 @@ const oo = () => {
|
|
|
729
727
|
"rp-text-layer": "_rp-text-layer_kwwfn_1",
|
|
730
728
|
"rp-text-layer-text": "_rp-text-layer-text_kwwfn_9"
|
|
731
729
|
}, co = (t) => {
|
|
732
|
-
const { pageNumber: e } = t, { pages: n } = Q(), o = W(null), { matches: r, currentMatch: a, setCurrentMatchElement: s } =
|
|
730
|
+
const { pageNumber: e } = t, { pages: n } = Q(), o = W(null), { matches: r, currentMatch: a, setCurrentMatchElement: s } = _n(), [c, l] = M(
|
|
733
731
|
[]
|
|
734
732
|
), u = W(), h = W(), f = W(), p = k(() => r.filter((_) => _.pageIndex === e - 1), [r, e]), v = L(
|
|
735
733
|
(_, b, w = !1) => {
|
|
736
|
-
if (w &&
|
|
734
|
+
if (w && ir(_, b), !p.length) {
|
|
737
735
|
f.current = void 0, l([]);
|
|
738
736
|
return;
|
|
739
737
|
}
|
|
740
|
-
const g =
|
|
738
|
+
const g = rn(p, _, b);
|
|
741
739
|
l(g);
|
|
742
740
|
},
|
|
743
741
|
[p]
|
|
@@ -758,7 +756,7 @@ const oo = () => {
|
|
|
758
756
|
if (!(!_ || !o.current))
|
|
759
757
|
return u.current && u.current.cancel(), _.page.getTextContent().then((b) => {
|
|
760
758
|
const w = _.page.getViewport({ scale: 1 });
|
|
761
|
-
return u.current = new
|
|
759
|
+
return u.current = new on.TextLayer({
|
|
762
760
|
viewport: w,
|
|
763
761
|
textContentSource: b,
|
|
764
762
|
container: o.current
|
|
@@ -795,7 +793,7 @@ const oo = () => {
|
|
|
795
793
|
};
|
|
796
794
|
let uo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
797
795
|
const po = (t) => {
|
|
798
|
-
const { pageNumber: e } = t, n = W(null), { pages: o, pdf: r } = Q(), a = W(), [s, c] = M(), { setFocusedPage: l, goToPage: u } = se(), { scrollMode: h } = Ee(), { print: f } = et(), { download: p } =
|
|
796
|
+
const { pageNumber: e } = t, n = W(null), { pages: o, pdf: r } = Q(), a = W(), [s, c] = M(), { setFocusedPage: l, goToPage: u } = se(), { scrollMode: h } = Ee(), { print: f } = et(), { download: p } = Fn(), v = k(() => o.get(e), [o, e]), _ = k(() => v == null ? void 0 : v.page.getViewport(), [v]);
|
|
799
797
|
z(() => {
|
|
800
798
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
801
799
|
}, [r]), z(() => {
|
|
@@ -805,10 +803,10 @@ const po = (t) => {
|
|
|
805
803
|
}, [v]);
|
|
806
804
|
const b = L(
|
|
807
805
|
(w) => {
|
|
808
|
-
!s || !r || (
|
|
806
|
+
!s || !r || (br(w), Cr(w, r, s).then((g) => {
|
|
809
807
|
var m, P;
|
|
810
808
|
((m = g == null ? void 0 : g.data) == null ? void 0 : m.action) === "Print" ? f() : ((P = g == null ? void 0 : g.data) == null ? void 0 : P.action) === "SaveAs" && p();
|
|
811
|
-
}), h === X.PAGE_SCROLLING ?
|
|
809
|
+
}), h === X.PAGE_SCROLLING ? Nt(w, s, r, (g) => l(g.pageIndex + 1)) : Nt(w, s, r, (g) => u(g.pageIndex + 1)));
|
|
812
810
|
},
|
|
813
811
|
[r, s, u, l, h, f, p]
|
|
814
812
|
);
|
|
@@ -826,17 +824,17 @@ const po = (t) => {
|
|
|
826
824
|
for (const I of s) {
|
|
827
825
|
const { annotationType: d } = I;
|
|
828
826
|
switch (d) {
|
|
829
|
-
case
|
|
830
|
-
|
|
827
|
+
case Lt.Link:
|
|
828
|
+
Pr(I);
|
|
831
829
|
break;
|
|
832
|
-
case
|
|
833
|
-
|
|
830
|
+
case Lt.Widget:
|
|
831
|
+
Tr(I, w, g);
|
|
834
832
|
break;
|
|
835
833
|
}
|
|
836
834
|
}
|
|
837
835
|
const m = new AbortController();
|
|
838
836
|
return (async () => {
|
|
839
|
-
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new
|
|
837
|
+
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new lr({
|
|
840
838
|
div: n.current,
|
|
841
839
|
accessibilityManager: void 0,
|
|
842
840
|
annotationCanvasMap: void 0,
|
|
@@ -844,7 +842,7 @@ const po = (t) => {
|
|
|
844
842
|
structTreeLayer: null,
|
|
845
843
|
page: v.page,
|
|
846
844
|
viewport: w.clone({ dontFlip: !0 })
|
|
847
|
-
}), n.current &&
|
|
845
|
+
}), n.current && Et(n.current, b);
|
|
848
846
|
const I = await (r == null ? void 0 : r.hasJSActions()), d = await (r == null ? void 0 : r.getFieldObjects());
|
|
849
847
|
if (m.signal.aborted)
|
|
850
848
|
throw "abort";
|
|
@@ -858,17 +856,17 @@ const po = (t) => {
|
|
|
858
856
|
page: v.page,
|
|
859
857
|
imageResourcesPath: uo,
|
|
860
858
|
renderForms: !0,
|
|
861
|
-
linkService: new
|
|
859
|
+
linkService: new wr(),
|
|
862
860
|
downloadManager: null,
|
|
863
861
|
enableScripting: !1
|
|
864
862
|
});
|
|
865
863
|
})().then(() => {
|
|
866
|
-
n.current &&
|
|
864
|
+
n.current && Sr(n.current, b);
|
|
867
865
|
}).catch((I) => {
|
|
868
866
|
if (I !== "abort")
|
|
869
867
|
throw I;
|
|
870
868
|
}), () => {
|
|
871
|
-
m.abort("clear"), n.current &&
|
|
869
|
+
m.abort("clear"), n.current && Et(n.current, b);
|
|
872
870
|
};
|
|
873
871
|
}, [r, s, b]), /* @__PURE__ */ i(
|
|
874
872
|
"div",
|
|
@@ -879,12 +877,12 @@ const po = (t) => {
|
|
|
879
877
|
ref: n
|
|
880
878
|
}
|
|
881
879
|
);
|
|
882
|
-
}, ho = Array.from({ length: 21 }, (t, e) => Number((e * 0.05).toFixed(2))),
|
|
883
|
-
const { pageNumber: n, style: o, onIntersectRatioChange: r, ...a } = t, { pages: s } = Q(), { rotate: c } = Ke(), { textLayer: l } =
|
|
880
|
+
}, ho = Array.from({ length: 21 }, (t, e) => Number((e * 0.05).toFixed(2))), St = Be((t, e) => {
|
|
881
|
+
const { pageNumber: n, style: o, onIntersectRatioChange: r, ...a } = t, { pages: s } = Q(), { rotate: c } = Ke(), { textLayer: l } = er(), { currentZoom: u } = Xe(), h = W(s.get(n)), [f, p] = M(!1), v = W(null), [_, b] = M({
|
|
884
882
|
width: 0,
|
|
885
883
|
height: 0
|
|
886
884
|
});
|
|
887
|
-
|
|
885
|
+
en(e, () => v.current), z(() => {
|
|
888
886
|
if (s && (h.current = s.get(n), h.current)) {
|
|
889
887
|
const P = h.current.page.getViewport({ scale: u, rotation: c });
|
|
890
888
|
b(P);
|
|
@@ -939,7 +937,7 @@ const po = (t) => {
|
|
|
939
937
|
className: ot["rp-page"],
|
|
940
938
|
children: [
|
|
941
939
|
/* @__PURE__ */ i(so, { onLoading: g, onLoaded: m, pageNumber: n }),
|
|
942
|
-
f && /* @__PURE__ */ i("div", { className: ot["rp-loader-wrapper"], children: /* @__PURE__ */ i(
|
|
940
|
+
f && /* @__PURE__ */ i("div", { className: ot["rp-loader-wrapper"], children: /* @__PURE__ */ i(bt, {}) }),
|
|
943
941
|
l && /* @__PURE__ */ i(co, { pageNumber: n }),
|
|
944
942
|
/* @__PURE__ */ i(po, { pageNumber: n })
|
|
945
943
|
]
|
|
@@ -948,24 +946,34 @@ const po = (t) => {
|
|
|
948
946
|
}
|
|
949
947
|
);
|
|
950
948
|
});
|
|
951
|
-
function
|
|
949
|
+
function ft() {
|
|
950
|
+
return ft = Object.assign ? Object.assign.bind() : function(t) {
|
|
951
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
952
|
+
var n = arguments[e];
|
|
953
|
+
for (var o in n)
|
|
954
|
+
({}).hasOwnProperty.call(n, o) && (t[o] = n[o]);
|
|
955
|
+
}
|
|
956
|
+
return t;
|
|
957
|
+
}, ft.apply(null, arguments);
|
|
958
|
+
}
|
|
959
|
+
function Wt(t) {
|
|
952
960
|
if (t === void 0)
|
|
953
961
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
954
962
|
return t;
|
|
955
963
|
}
|
|
956
|
-
function
|
|
957
|
-
return
|
|
964
|
+
function gt(t, e) {
|
|
965
|
+
return gt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, o) {
|
|
958
966
|
return n.__proto__ = o, n;
|
|
959
|
-
},
|
|
967
|
+
}, gt(t, e);
|
|
960
968
|
}
|
|
961
969
|
function mo(t, e) {
|
|
962
|
-
t.prototype = Object.create(e.prototype), t.prototype.constructor = t,
|
|
970
|
+
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, gt(t, e);
|
|
963
971
|
}
|
|
964
|
-
var
|
|
972
|
+
var Mt = Number.isNaN || function(e) {
|
|
965
973
|
return typeof e == "number" && e !== e;
|
|
966
974
|
};
|
|
967
975
|
function fo(t, e) {
|
|
968
|
-
return !!(t === e ||
|
|
976
|
+
return !!(t === e || Mt(t) && Mt(e));
|
|
969
977
|
}
|
|
970
978
|
function go(t, e) {
|
|
971
979
|
if (t.length !== e.length)
|
|
@@ -985,7 +993,7 @@ function at(t, e) {
|
|
|
985
993
|
}
|
|
986
994
|
return s;
|
|
987
995
|
}
|
|
988
|
-
function
|
|
996
|
+
function Ht(t, e) {
|
|
989
997
|
if (t == null)
|
|
990
998
|
return {};
|
|
991
999
|
var n = {};
|
|
@@ -997,18 +1005,18 @@ function Mt(t, e) {
|
|
|
997
1005
|
}
|
|
998
1006
|
return n;
|
|
999
1007
|
}
|
|
1000
|
-
var vo = typeof performance == "object" && typeof performance.now == "function",
|
|
1008
|
+
var vo = typeof performance == "object" && typeof performance.now == "function", $t = vo ? function() {
|
|
1001
1009
|
return performance.now();
|
|
1002
1010
|
} : function() {
|
|
1003
1011
|
return Date.now();
|
|
1004
1012
|
};
|
|
1005
|
-
function
|
|
1013
|
+
function Gt(t) {
|
|
1006
1014
|
cancelAnimationFrame(t.id);
|
|
1007
1015
|
}
|
|
1008
1016
|
function _o(t, e) {
|
|
1009
|
-
var n =
|
|
1017
|
+
var n = $t();
|
|
1010
1018
|
function o() {
|
|
1011
|
-
|
|
1019
|
+
$t() - n >= e ? t.call(null) : r.id = requestAnimationFrame(o);
|
|
1012
1020
|
}
|
|
1013
1021
|
var r = {
|
|
1014
1022
|
id: requestAnimationFrame(o)
|
|
@@ -1024,7 +1032,7 @@ function wo(t) {
|
|
|
1024
1032
|
return st;
|
|
1025
1033
|
}
|
|
1026
1034
|
var Re = null;
|
|
1027
|
-
function
|
|
1035
|
+
function Vt(t) {
|
|
1028
1036
|
if (t === void 0 && (t = !1), Re === null || t) {
|
|
1029
1037
|
var e = document.createElement("div"), n = e.style;
|
|
1030
1038
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
@@ -1046,8 +1054,8 @@ function To(t) {
|
|
|
1046
1054
|
mo(m, g);
|
|
1047
1055
|
function m(I) {
|
|
1048
1056
|
var d;
|
|
1049
|
-
return d = g.call(this, I) || this, d._instanceProps = _(d.props,
|
|
1050
|
-
instance:
|
|
1057
|
+
return d = g.call(this, I) || this, d._instanceProps = _(d.props, Wt(d)), d._resetIsScrollingTimeoutId = null, d._outerRef = void 0, d.state = {
|
|
1058
|
+
instance: Wt(d),
|
|
1051
1059
|
isScrolling: !1,
|
|
1052
1060
|
horizontalScrollDirection: "forward",
|
|
1053
1061
|
scrollLeft: typeof d.props.initialScrollLeft == "number" ? d.props.initialScrollLeft : 0,
|
|
@@ -1098,7 +1106,7 @@ function To(t) {
|
|
|
1098
1106
|
return null;
|
|
1099
1107
|
var y = d.props.direction, E = x;
|
|
1100
1108
|
if (y === "rtl")
|
|
1101
|
-
switch (
|
|
1109
|
+
switch (Vt()) {
|
|
1102
1110
|
case "negative":
|
|
1103
1111
|
E = -x;
|
|
1104
1112
|
break;
|
|
@@ -1121,7 +1129,7 @@ function To(t) {
|
|
|
1121
1129
|
var C = d.props.outerRef;
|
|
1122
1130
|
d._outerRef = T, typeof C == "function" ? C(T) : C != null && typeof C == "object" && C.hasOwnProperty("current") && (C.current = T);
|
|
1123
1131
|
}, d._resetIsScrollingDebounced = function() {
|
|
1124
|
-
d._resetIsScrollingTimeoutId !== null &&
|
|
1132
|
+
d._resetIsScrollingTimeoutId !== null && Gt(d._resetIsScrollingTimeoutId), d._resetIsScrollingTimeoutId = _o(d._resetIsScrolling, bo);
|
|
1125
1133
|
}, d._resetIsScrolling = function() {
|
|
1126
1134
|
d._resetIsScrollingTimeoutId = null, d.setState({
|
|
1127
1135
|
isScrolling: !1
|
|
@@ -1165,7 +1173,7 @@ function To(t) {
|
|
|
1165
1173
|
if (O && this._outerRef != null) {
|
|
1166
1174
|
var x = this._outerRef;
|
|
1167
1175
|
if (d === "rtl")
|
|
1168
|
-
switch (
|
|
1176
|
+
switch (Vt()) {
|
|
1169
1177
|
case "negative":
|
|
1170
1178
|
x.scrollLeft = -C;
|
|
1171
1179
|
break;
|
|
@@ -1183,7 +1191,7 @@ function To(t) {
|
|
|
1183
1191
|
}
|
|
1184
1192
|
this._callPropsCallbacks();
|
|
1185
1193
|
}, P.componentWillUnmount = function() {
|
|
1186
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
1194
|
+
this._resetIsScrollingTimeoutId !== null && Gt(this._resetIsScrollingTimeoutId);
|
|
1187
1195
|
}, P.render = function() {
|
|
1188
1196
|
var d = this.props, T = d.children, C = d.className, S = d.columnCount, O = d.direction, x = d.height, D = d.innerRef, R = d.innerElementType, F = d.innerTagName, N = d.itemData, y = d.itemKey, E = y === void 0 ? Co : y, G = d.outerElementType, H = d.outerTagName, Z = d.rowCount, J = d.style, j = d.useIsScrolling, B = d.width, te = this.state.isScrolling, le = this._getHorizontalRangeToRender(), K = le[0], ne = le[1], ue = this._getVerticalRangeToRender(), ye = ue[0], me = ue[1], be = [];
|
|
1189
1197
|
if (S > 0 && Z)
|
|
@@ -1206,7 +1214,7 @@ function To(t) {
|
|
|
1206
1214
|
className: C,
|
|
1207
1215
|
onScroll: this._onScroll,
|
|
1208
1216
|
ref: this._outerRefSetter,
|
|
1209
|
-
style:
|
|
1217
|
+
style: ft({
|
|
1210
1218
|
position: "relative",
|
|
1211
1219
|
height: x,
|
|
1212
1220
|
width: B,
|
|
@@ -1247,7 +1255,7 @@ function To(t) {
|
|
|
1247
1255
|
var E = p(this.props, N, this._instanceProps), G = v(this.props, E, N, this._instanceProps), H = !R || F === "backward" ? Math.max(1, y) : 1, Z = !R || F === "forward" ? Math.max(1, y) : 1;
|
|
1248
1256
|
return [Math.max(0, E - H), Math.max(0, Math.min(x - 1, G + Z)), E, G];
|
|
1249
1257
|
}, m;
|
|
1250
|
-
}(
|
|
1258
|
+
}(Xn), e.defaultProps = {
|
|
1251
1259
|
direction: "ltr",
|
|
1252
1260
|
itemData: void 0,
|
|
1253
1261
|
useIsScrolling: !1
|
|
@@ -1270,7 +1278,7 @@ var Po = function(e, n) {
|
|
|
1270
1278
|
if (typeof a != "number")
|
|
1271
1279
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
|
|
1272
1280
|
}
|
|
1273
|
-
},
|
|
1281
|
+
}, Ut = 50, wn = function(e, n) {
|
|
1274
1282
|
var o = e.rowCount, r = n.rowMetadataMap, a = n.estimatedRowHeight, s = n.lastMeasuredRowIndex, c = 0;
|
|
1275
1283
|
if (s >= o && (s = o - 1), s >= 0) {
|
|
1276
1284
|
var l = r[s];
|
|
@@ -1278,7 +1286,7 @@ var Po = function(e, n) {
|
|
|
1278
1286
|
}
|
|
1279
1287
|
var u = o - s - 1, h = u * a;
|
|
1280
1288
|
return c + h;
|
|
1281
|
-
},
|
|
1289
|
+
}, bn = function(e, n) {
|
|
1282
1290
|
var o = e.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, s = n.lastMeasuredColumnIndex, c = 0;
|
|
1283
1291
|
if (s >= o && (s = o - 1), s >= 0) {
|
|
1284
1292
|
var l = r[s];
|
|
@@ -1304,12 +1312,12 @@ var Po = function(e, n) {
|
|
|
1304
1312
|
e === "column" ? r.lastMeasuredColumnIndex = o : r.lastMeasuredRowIndex = o;
|
|
1305
1313
|
}
|
|
1306
1314
|
return a[o];
|
|
1307
|
-
},
|
|
1315
|
+
}, qt = function(e, n, o, r) {
|
|
1308
1316
|
var a, s;
|
|
1309
1317
|
e === "column" ? (a = o.columnMetadataMap, s = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, s = o.lastMeasuredRowIndex);
|
|
1310
1318
|
var c = s > 0 ? a[s].offset : 0;
|
|
1311
|
-
return c >= r ?
|
|
1312
|
-
},
|
|
1319
|
+
return c >= r ? Cn(e, n, o, s, 0, r) : So(e, n, o, Math.max(0, s), r);
|
|
1320
|
+
}, Cn = function(e, n, o, r, a, s) {
|
|
1313
1321
|
for (; a <= r; ) {
|
|
1314
1322
|
var c = a + Math.floor((r - a) / 2), l = ge(e, n, c, o).offset;
|
|
1315
1323
|
if (l === s)
|
|
@@ -1320,9 +1328,9 @@ var Po = function(e, n) {
|
|
|
1320
1328
|
}, So = function(e, n, o, r, a) {
|
|
1321
1329
|
for (var s = e === "column" ? n.columnCount : n.rowCount, c = 1; r < s && ge(e, n, r, o).offset < a; )
|
|
1322
1330
|
r += c, c *= 2;
|
|
1323
|
-
return
|
|
1324
|
-
},
|
|
1325
|
-
var l = e === "column" ? n.width : n.height, u = ge(e, n, o, s), h = e === "column" ?
|
|
1331
|
+
return Cn(e, n, o, Math.min(r, s - 1), Math.floor(r / 2), a);
|
|
1332
|
+
}, Zt = function(e, n, o, r, a, s, c) {
|
|
1333
|
+
var l = e === "column" ? n.width : n.height, u = ge(e, n, o, s), h = e === "column" ? bn(n, s) : wn(n, s), f = Math.max(0, Math.min(h - l, u.offset)), p = Math.max(0, u.offset - l + c + u.size);
|
|
1326
1334
|
switch (r === "smart" && (a >= p - l && a <= f + l ? r = "auto" : r = "center"), r) {
|
|
1327
1335
|
case "start":
|
|
1328
1336
|
return f;
|
|
@@ -1339,7 +1347,7 @@ var Po = function(e, n) {
|
|
|
1339
1347
|
return ge("column", e, n, o).offset;
|
|
1340
1348
|
},
|
|
1341
1349
|
getColumnStartIndexForOffset: function(e, n, o) {
|
|
1342
|
-
return
|
|
1350
|
+
return qt("column", e, o, n);
|
|
1343
1351
|
},
|
|
1344
1352
|
getColumnStopIndexForStartIndex: function(e, n, o, r) {
|
|
1345
1353
|
for (var a = e.columnCount, s = e.width, c = ge("column", e, n, r), l = o + s, u = c.offset + c.size, h = n; h < a - 1 && u < l; )
|
|
@@ -1349,13 +1357,13 @@ var Po = function(e, n) {
|
|
|
1349
1357
|
getColumnWidth: function(e, n, o) {
|
|
1350
1358
|
return o.columnMetadataMap[n].size;
|
|
1351
1359
|
},
|
|
1352
|
-
getEstimatedTotalHeight:
|
|
1353
|
-
getEstimatedTotalWidth:
|
|
1360
|
+
getEstimatedTotalHeight: wn,
|
|
1361
|
+
getEstimatedTotalWidth: bn,
|
|
1354
1362
|
getOffsetForColumnAndAlignment: function(e, n, o, r, a, s) {
|
|
1355
|
-
return
|
|
1363
|
+
return Zt("column", e, n, o, r, a, s);
|
|
1356
1364
|
},
|
|
1357
1365
|
getOffsetForRowAndAlignment: function(e, n, o, r, a, s) {
|
|
1358
|
-
return
|
|
1366
|
+
return Zt("row", e, n, o, r, a, s);
|
|
1359
1367
|
},
|
|
1360
1368
|
getRowOffset: function(e, n, o) {
|
|
1361
1369
|
return ge("row", e, n, o).offset;
|
|
@@ -1364,7 +1372,7 @@ var Po = function(e, n) {
|
|
|
1364
1372
|
return o.rowMetadataMap[n].size;
|
|
1365
1373
|
},
|
|
1366
1374
|
getRowStartIndexForOffset: function(e, n, o) {
|
|
1367
|
-
return
|
|
1375
|
+
return qt("row", e, o, n);
|
|
1368
1376
|
},
|
|
1369
1377
|
getRowStopIndexForStartIndex: function(e, n, o, r) {
|
|
1370
1378
|
for (var a = e.rowCount, s = e.height, c = ge("row", e, n, r), l = o + s, u = c.offset + c.size, h = n; h < a - 1 && u < l; )
|
|
@@ -1374,8 +1382,8 @@ var Po = function(e, n) {
|
|
|
1374
1382
|
initInstanceProps: function(e, n) {
|
|
1375
1383
|
var o = e, r = o.estimatedColumnWidth, a = o.estimatedRowHeight, s = {
|
|
1376
1384
|
columnMetadataMap: {},
|
|
1377
|
-
estimatedColumnWidth: r ||
|
|
1378
|
-
estimatedRowHeight: a ||
|
|
1385
|
+
estimatedColumnWidth: r || Ut,
|
|
1386
|
+
estimatedRowHeight: a || Ut,
|
|
1379
1387
|
lastMeasuredColumnIndex: -1,
|
|
1380
1388
|
lastMeasuredRowIndex: -1,
|
|
1381
1389
|
rowMetadataMap: {}
|
|
@@ -1407,7 +1415,7 @@ var Po = function(e, n) {
|
|
|
1407
1415
|
}
|
|
1408
1416
|
});
|
|
1409
1417
|
process.env.NODE_ENV;
|
|
1410
|
-
function
|
|
1418
|
+
function jt(t, e) {
|
|
1411
1419
|
for (var n in t)
|
|
1412
1420
|
if (!(n in e))
|
|
1413
1421
|
return !0;
|
|
@@ -1418,11 +1426,11 @@ function Zt(t, e) {
|
|
|
1418
1426
|
}
|
|
1419
1427
|
var yo = ["style"], xo = ["style"];
|
|
1420
1428
|
function Ro(t, e) {
|
|
1421
|
-
var n = t.style, o =
|
|
1422
|
-
return !
|
|
1429
|
+
var n = t.style, o = Ht(t, yo), r = e.style, a = Ht(e, xo);
|
|
1430
|
+
return !jt(n, r) && !jt(o, a);
|
|
1423
1431
|
}
|
|
1424
1432
|
const Lo = () => {
|
|
1425
|
-
const { viewMode: t } = Je(), { scrollMode: e } = Ee(), { setColumnCount: n } =
|
|
1433
|
+
const { viewMode: t } = Je(), { scrollMode: e } = Ee(), { setColumnCount: n } = nn(), { virtualScrollableElementRef: o } = Ye(), r = wt(), a = L(
|
|
1426
1434
|
(v) => r.widths[v] || 0,
|
|
1427
1435
|
[r.widths]
|
|
1428
1436
|
), s = L(
|
|
@@ -1445,18 +1453,18 @@ const Lo = () => {
|
|
|
1445
1453
|
};
|
|
1446
1454
|
let ie;
|
|
1447
1455
|
typeof window < "u" ? ie = window : typeof self < "u" ? ie = self : ie = global;
|
|
1448
|
-
let
|
|
1449
|
-
const
|
|
1450
|
-
lt == null ||
|
|
1451
|
-
return
|
|
1452
|
-
}) : (
|
|
1456
|
+
let vt = null, _t = null;
|
|
1457
|
+
const Bt = 20, ct = ie.clearTimeout, Kt = ie.setTimeout, lt = ie.cancelAnimationFrame || ie.mozCancelAnimationFrame || ie.webkitCancelAnimationFrame, Xt = ie.requestAnimationFrame || ie.mozRequestAnimationFrame || ie.webkitRequestAnimationFrame;
|
|
1458
|
+
lt == null || Xt == null ? (vt = ct, _t = function(e) {
|
|
1459
|
+
return Kt(e, Bt);
|
|
1460
|
+
}) : (vt = function([e, n]) {
|
|
1453
1461
|
lt(e), ct(n);
|
|
1454
|
-
},
|
|
1455
|
-
const n =
|
|
1462
|
+
}, _t = function(e) {
|
|
1463
|
+
const n = Xt(function() {
|
|
1456
1464
|
ct(o), e();
|
|
1457
|
-
}), o =
|
|
1465
|
+
}), o = Kt(function() {
|
|
1458
1466
|
lt(n), e();
|
|
1459
|
-
},
|
|
1467
|
+
}, Bt);
|
|
1460
1468
|
return [n, o];
|
|
1461
1469
|
});
|
|
1462
1470
|
function No(t) {
|
|
@@ -1472,7 +1480,7 @@ function No(t) {
|
|
|
1472
1480
|
if (g.target.className && typeof g.target.className.indexOf == "function" && g.target.className.indexOf("contract-trigger") < 0 && g.target.className.indexOf("expand-trigger") < 0)
|
|
1473
1481
|
return;
|
|
1474
1482
|
const m = this;
|
|
1475
|
-
s(this), this.__resizeRAF__ &&
|
|
1483
|
+
s(this), this.__resizeRAF__ && vt(this.__resizeRAF__), this.__resizeRAF__ = _t(function() {
|
|
1476
1484
|
a(m) && (m.__resizeLast__.width = m.offsetWidth, m.__resizeLast__.height = m.offsetHeight, m.__resizeListeners__.forEach(function(d) {
|
|
1477
1485
|
d.call(m, g);
|
|
1478
1486
|
}));
|
|
@@ -1531,7 +1539,7 @@ function No(t) {
|
|
|
1531
1539
|
}
|
|
1532
1540
|
};
|
|
1533
1541
|
}
|
|
1534
|
-
class Eo extends
|
|
1542
|
+
class Eo extends Jn {
|
|
1535
1543
|
constructor(...e) {
|
|
1536
1544
|
super(...e), this.state = {
|
|
1537
1545
|
height: this.props.defaultHeight || 0,
|
|
@@ -1637,7 +1645,7 @@ const Oo = ({ widths: t, heights: e }) => {
|
|
|
1637
1645
|
r.current = !1;
|
|
1638
1646
|
}, [n]);
|
|
1639
1647
|
const c = k(() => s.reduce((l, u) => l + Number(u.width || 0), 0), [s]);
|
|
1640
|
-
return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: a.map((l, u) => /* @__PURE__ */ i(
|
|
1648
|
+
return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: a.map((l, u) => /* @__PURE__ */ i(St, { onIntersectRatioChange: () => {
|
|
1641
1649
|
}, style: s[u], pageNumber: l }, l)) });
|
|
1642
1650
|
}, Do = ({ widths: t, heights: e }) => {
|
|
1643
1651
|
const { focusedPage: n } = se(), { isScrolling: o } = Qe(), r = k(() => ({
|
|
@@ -1657,7 +1665,7 @@ const Oo = ({ widths: t, heights: e }) => {
|
|
|
1657
1665
|
position: "relative"
|
|
1658
1666
|
},
|
|
1659
1667
|
children: /* @__PURE__ */ i(
|
|
1660
|
-
|
|
1668
|
+
St,
|
|
1661
1669
|
{
|
|
1662
1670
|
style: r,
|
|
1663
1671
|
onIntersectRatioChange: () => {
|
|
@@ -1668,10 +1676,10 @@ const Oo = ({ widths: t, heights: e }) => {
|
|
|
1668
1676
|
)
|
|
1669
1677
|
}
|
|
1670
1678
|
);
|
|
1671
|
-
}, zo =
|
|
1679
|
+
}, zo = Yn(({ columnIndex: t, rowIndex: e, data: n, style: o }) => {
|
|
1672
1680
|
const r = t + 1 + e * n.columnCount;
|
|
1673
1681
|
return /* @__PURE__ */ i(
|
|
1674
|
-
|
|
1682
|
+
St,
|
|
1675
1683
|
{
|
|
1676
1684
|
style: o,
|
|
1677
1685
|
onIntersectRatioChange: n.handleIntersectRatioChange,
|
|
@@ -1679,10 +1687,10 @@ const Oo = ({ widths: t, heights: e }) => {
|
|
|
1679
1687
|
},
|
|
1680
1688
|
r
|
|
1681
1689
|
);
|
|
1682
|
-
}, Ro),
|
|
1683
|
-
const { initialPage: t = 1, initialScrollMode: e } =
|
|
1684
|
-
|
|
1685
|
-
const { scrollToPage: r } =
|
|
1690
|
+
}, Ro), ss = () => {
|
|
1691
|
+
const { initialPage: t = 1, initialScrollMode: e } = nr(), { pagesRef: n, setPagesRef: o } = Se();
|
|
1692
|
+
Ir(n);
|
|
1693
|
+
const { scrollToPage: r } = pn(), {
|
|
1686
1694
|
virtualScrollRef: a,
|
|
1687
1695
|
getVirtualScrollRef: s,
|
|
1688
1696
|
getPageScrollElementRef: c,
|
|
@@ -1690,12 +1698,12 @@ const Oo = ({ widths: t, heights: e }) => {
|
|
|
1690
1698
|
setTotalInnerDimensions: u,
|
|
1691
1699
|
totalInnerDimensions: h,
|
|
1692
1700
|
pageScrollElementRef: f
|
|
1693
|
-
} = Ye(), p = W(!0), { nextPage: v, prevPage: _, setFocusedPage: b, focusedPage: w } = se(), { scrollMode: g } = Ee(), { viewMode: m } = Je(), P = W(null), { loading: I } = Q(), { LoaderImageComponent: d } =
|
|
1701
|
+
} = Ye(), p = W(!0), { nextPage: v, prevPage: _, setFocusedPage: b, focusedPage: w } = se(), { scrollMode: g } = Ee(), { viewMode: m } = Je(), P = W(null), { loading: I } = Q(), { LoaderImageComponent: d } = an(), T = W(
|
|
1694
1702
|
h
|
|
1695
1703
|
), C = W({
|
|
1696
1704
|
viewMode: m,
|
|
1697
1705
|
scrollMode: g
|
|
1698
|
-
}), S = W(!1), O = W(), { isFullScreen: x } =
|
|
1706
|
+
}), S = W(!1), O = W(), { isFullScreen: x } = rr(), {
|
|
1699
1707
|
pageDimension: D,
|
|
1700
1708
|
rowCount: R,
|
|
1701
1709
|
rowHeight: F,
|
|
@@ -1707,10 +1715,10 @@ const Oo = ({ widths: t, heights: e }) => {
|
|
|
1707
1715
|
scrollTop: 0,
|
|
1708
1716
|
scrollLeft: 0
|
|
1709
1717
|
});
|
|
1710
|
-
|
|
1711
|
-
const { isPressed: K } =
|
|
1718
|
+
Rr(n);
|
|
1719
|
+
const { isPressed: K } = yr(), { selectionMode: ne } = tr(), { initializeGrabScroll: ue, resetGrabState: ye } = xr({
|
|
1712
1720
|
isPressed: K
|
|
1713
|
-
}), me = k(() => ne ===
|
|
1721
|
+
}), me = k(() => ne === Qn.HAND, [ne]), be = L(($, V) => {
|
|
1714
1722
|
J((Y) => V > -1 ? { ...Y, [$]: Math.round(V * 100) } : (delete Y[$], Y));
|
|
1715
1723
|
}, []), fe = k(() => ({
|
|
1716
1724
|
columnCount: N,
|
|
@@ -1766,10 +1774,10 @@ const Oo = ({ widths: t, heights: e }) => {
|
|
|
1766
1774
|
const V = le.current.scrollTop, Y = le.current.scrollLeft;
|
|
1767
1775
|
if (H.height && H.width) {
|
|
1768
1776
|
S.current = !0;
|
|
1769
|
-
const { height: _e, width: xe } = H, { height:
|
|
1777
|
+
const { height: _e, width: xe } = H, { height: Un, width: qn } = T.current, Zn = V / Un * _e, jn = Y / qn * xe, Bn = Math.min(Zn, _e) || 0, Kn = Math.min(jn, xe) || 0;
|
|
1770
1778
|
a == null || a.scrollTo({
|
|
1771
|
-
scrollTop:
|
|
1772
|
-
scrollLeft:
|
|
1779
|
+
scrollTop: Bn,
|
|
1780
|
+
scrollLeft: Kn
|
|
1773
1781
|
}), T.current = {
|
|
1774
1782
|
height: H.height,
|
|
1775
1783
|
width: H.width
|
|
@@ -1791,7 +1799,7 @@ const Oo = ({ widths: t, heights: e }) => {
|
|
|
1791
1799
|
const tt = k(() => oe(de["rp-pages-container"], {
|
|
1792
1800
|
[de["rp-cursor-grab"]]: me && !K,
|
|
1793
1801
|
[de["rp-cursor-grabbing"]]: me && K
|
|
1794
|
-
}), [me, K]),
|
|
1802
|
+
}), [me, K]), Vn = L(
|
|
1795
1803
|
($) => {
|
|
1796
1804
|
if (me && $) {
|
|
1797
1805
|
const V = oe(de["rp-pages"]), Y = document.querySelector(`.${V}`);
|
|
@@ -1834,7 +1842,7 @@ const Oo = ({ widths: t, heights: e }) => {
|
|
|
1834
1842
|
f,
|
|
1835
1843
|
b,
|
|
1836
1844
|
H
|
|
1837
|
-
]), /* @__PURE__ */ i("div", { ref: o, tabIndex: -1, className: tt, children: /* @__PURE__ */ i(Eo, { style: { minHeight: "50px" }, children: ({ width: $, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref:
|
|
1845
|
+
]), /* @__PURE__ */ i("div", { ref: o, tabIndex: -1, className: tt, children: /* @__PURE__ */ i(Eo, { style: { minHeight: "50px" }, children: ({ width: $, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Vn, style: { width: $, height: V }, children: g === X.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
1838
1846
|
"div",
|
|
1839
1847
|
{
|
|
1840
1848
|
ref: c,
|
|
@@ -1934,7 +1942,7 @@ const Oo = ({ widths: t, heights: e }) => {
|
|
|
1934
1942
|
}
|
|
1935
1943
|
) }),
|
|
1936
1944
|
/* @__PURE__ */ i(q, { content: h == null ? void 0 : h.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
1937
|
-
|
|
1945
|
+
tn,
|
|
1938
1946
|
{
|
|
1939
1947
|
onKeyDown: _,
|
|
1940
1948
|
onBlur: v,
|
|
@@ -1958,7 +1966,7 @@ const Oo = ({ widths: t, heights: e }) => {
|
|
|
1958
1966
|
) })
|
|
1959
1967
|
] }) : null;
|
|
1960
1968
|
};
|
|
1961
|
-
var
|
|
1969
|
+
var It = "Dialog", [Tn, cs] = Or(It), [Wo, ce] = Tn(It), Pn = (t) => {
|
|
1962
1970
|
const {
|
|
1963
1971
|
__scopeDialog: e,
|
|
1964
1972
|
children: n,
|
|
@@ -1966,7 +1974,7 @@ var St = "Dialog", [Cn, us] = zr(St), [Wo, ce] = Cn(St), Tn = (t) => {
|
|
|
1966
1974
|
defaultOpen: r,
|
|
1967
1975
|
onOpenChange: a,
|
|
1968
1976
|
modal: s = !0
|
|
1969
|
-
} = t, c = U.useRef(null), l = U.useRef(null), [u = !1, h] =
|
|
1977
|
+
} = t, c = U.useRef(null), l = U.useRef(null), [u = !1, h] = Ar({
|
|
1970
1978
|
prop: o,
|
|
1971
1979
|
defaultProp: r,
|
|
1972
1980
|
onChange: a
|
|
@@ -1988,10 +1996,10 @@ var St = "Dialog", [Cn, us] = zr(St), [Wo, ce] = Cn(St), Tn = (t) => {
|
|
|
1988
1996
|
}
|
|
1989
1997
|
);
|
|
1990
1998
|
};
|
|
1991
|
-
|
|
1992
|
-
var
|
|
1999
|
+
Pn.displayName = It;
|
|
2000
|
+
var Sn = "DialogTrigger", Mo = U.forwardRef(
|
|
1993
2001
|
(t, e) => {
|
|
1994
|
-
const { __scopeDialog: n, ...o } = t, r = ce(
|
|
2002
|
+
const { __scopeDialog: n, ...o } = t, r = ce(Sn, n), a = Ct(e, r.triggerRef);
|
|
1995
2003
|
return /* @__PURE__ */ i(
|
|
1996
2004
|
We.button,
|
|
1997
2005
|
{
|
|
@@ -1999,7 +2007,7 @@ var Pn = "DialogTrigger", Mo = U.forwardRef(
|
|
|
1999
2007
|
"aria-haspopup": "dialog",
|
|
2000
2008
|
"aria-expanded": r.open,
|
|
2001
2009
|
"aria-controls": r.contentId,
|
|
2002
|
-
"data-state":
|
|
2010
|
+
"data-state": Rt(r.open),
|
|
2003
2011
|
...o,
|
|
2004
2012
|
ref: a,
|
|
2005
2013
|
onClick: Ae(t.onClick, r.onOpenToggle)
|
|
@@ -2007,21 +2015,21 @@ var Pn = "DialogTrigger", Mo = U.forwardRef(
|
|
|
2007
2015
|
);
|
|
2008
2016
|
}
|
|
2009
2017
|
);
|
|
2010
|
-
Mo.displayName =
|
|
2011
|
-
var
|
|
2018
|
+
Mo.displayName = Sn;
|
|
2019
|
+
var yt = "DialogPortal", [Ho, In] = Tn(yt, {
|
|
2012
2020
|
forceMount: void 0
|
|
2013
|
-
}),
|
|
2014
|
-
const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = ce(
|
|
2015
|
-
return /* @__PURE__ */ i(Ho, { scope: e, forceMount: n, children: U.Children.map(o, (s) => /* @__PURE__ */ i(
|
|
2021
|
+
}), yn = (t) => {
|
|
2022
|
+
const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = ce(yt, e);
|
|
2023
|
+
return /* @__PURE__ */ i(Ho, { scope: e, forceMount: n, children: U.Children.map(o, (s) => /* @__PURE__ */ i(Tt, { present: n || a.open, children: /* @__PURE__ */ i($r, { asChild: !0, container: r, children: s }) })) });
|
|
2016
2024
|
};
|
|
2017
|
-
|
|
2018
|
-
var qe = "DialogOverlay",
|
|
2025
|
+
yn.displayName = yt;
|
|
2026
|
+
var qe = "DialogOverlay", xn = U.forwardRef(
|
|
2019
2027
|
(t, e) => {
|
|
2020
|
-
const n =
|
|
2021
|
-
return a.modal ? /* @__PURE__ */ i(
|
|
2028
|
+
const n = In(qe, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = ce(qe, t.__scopeDialog);
|
|
2029
|
+
return a.modal ? /* @__PURE__ */ i(Tt, { present: o || a.open, children: /* @__PURE__ */ i($o, { ...r, ref: e }) }) : null;
|
|
2022
2030
|
}
|
|
2023
2031
|
);
|
|
2024
|
-
|
|
2032
|
+
xn.displayName = qe;
|
|
2025
2033
|
var $o = U.forwardRef(
|
|
2026
2034
|
(t, e) => {
|
|
2027
2035
|
const { __scopeDialog: n, ...o } = t, r = ce(qe, n);
|
|
@@ -2031,7 +2039,7 @@ var $o = U.forwardRef(
|
|
|
2031
2039
|
/* @__PURE__ */ i(kr, { as: Dr, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
|
|
2032
2040
|
We.div,
|
|
2033
2041
|
{
|
|
2034
|
-
"data-state":
|
|
2042
|
+
"data-state": Rt(r.open),
|
|
2035
2043
|
...o,
|
|
2036
2044
|
ref: e,
|
|
2037
2045
|
style: { pointerEvents: "auto", ...o.style }
|
|
@@ -2039,22 +2047,22 @@ var $o = U.forwardRef(
|
|
|
2039
2047
|
) })
|
|
2040
2048
|
);
|
|
2041
2049
|
}
|
|
2042
|
-
), Pe = "DialogContent",
|
|
2050
|
+
), Pe = "DialogContent", Rn = U.forwardRef(
|
|
2043
2051
|
(t, e) => {
|
|
2044
|
-
const n =
|
|
2045
|
-
return /* @__PURE__ */ i(
|
|
2052
|
+
const n = In(Pe, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = ce(Pe, t.__scopeDialog);
|
|
2053
|
+
return /* @__PURE__ */ i(Tt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(Go, { ...r, ref: e }) : /* @__PURE__ */ i(Vo, { ...r, ref: e }) });
|
|
2046
2054
|
}
|
|
2047
2055
|
);
|
|
2048
|
-
|
|
2056
|
+
Rn.displayName = Pe;
|
|
2049
2057
|
var Go = U.forwardRef(
|
|
2050
2058
|
(t, e) => {
|
|
2051
|
-
const n = ce(Pe, t.__scopeDialog), o = U.useRef(null), r =
|
|
2059
|
+
const n = ce(Pe, t.__scopeDialog), o = U.useRef(null), r = Ct(e, n.contentRef, o);
|
|
2052
2060
|
return U.useEffect(() => {
|
|
2053
2061
|
const a = o.current;
|
|
2054
2062
|
if (a)
|
|
2055
|
-
return
|
|
2063
|
+
return Wr(a);
|
|
2056
2064
|
}, []), /* @__PURE__ */ i(
|
|
2057
|
-
|
|
2065
|
+
Ln,
|
|
2058
2066
|
{
|
|
2059
2067
|
...t,
|
|
2060
2068
|
ref: r,
|
|
@@ -2079,7 +2087,7 @@ var Go = U.forwardRef(
|
|
|
2079
2087
|
(t, e) => {
|
|
2080
2088
|
const n = ce(Pe, t.__scopeDialog), o = U.useRef(!1), r = U.useRef(!1);
|
|
2081
2089
|
return /* @__PURE__ */ i(
|
|
2082
|
-
|
|
2090
|
+
Ln,
|
|
2083
2091
|
{
|
|
2084
2092
|
...t,
|
|
2085
2093
|
ref: e,
|
|
@@ -2098,12 +2106,12 @@ var Go = U.forwardRef(
|
|
|
2098
2106
|
}
|
|
2099
2107
|
);
|
|
2100
2108
|
}
|
|
2101
|
-
),
|
|
2109
|
+
), Ln = U.forwardRef(
|
|
2102
2110
|
(t, e) => {
|
|
2103
|
-
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...s } = t, c = ce(Pe, n), l = U.useRef(null), u =
|
|
2104
|
-
return
|
|
2111
|
+
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...s } = t, c = ce(Pe, n), l = U.useRef(null), u = Ct(e, l);
|
|
2112
|
+
return Mr(), /* @__PURE__ */ A(Fe, { children: [
|
|
2105
2113
|
/* @__PURE__ */ i(
|
|
2106
|
-
|
|
2114
|
+
Hr,
|
|
2107
2115
|
{
|
|
2108
2116
|
asChild: !0,
|
|
2109
2117
|
loop: !0,
|
|
@@ -2111,13 +2119,13 @@ var Go = U.forwardRef(
|
|
|
2111
2119
|
onMountAutoFocus: r,
|
|
2112
2120
|
onUnmountAutoFocus: a,
|
|
2113
2121
|
children: /* @__PURE__ */ i(
|
|
2114
|
-
|
|
2122
|
+
Fr,
|
|
2115
2123
|
{
|
|
2116
2124
|
role: "dialog",
|
|
2117
2125
|
id: c.contentId,
|
|
2118
2126
|
"aria-describedby": c.descriptionId,
|
|
2119
2127
|
"aria-labelledby": c.titleId,
|
|
2120
|
-
"data-state":
|
|
2128
|
+
"data-state": Rt(c.open),
|
|
2121
2129
|
...s,
|
|
2122
2130
|
ref: u,
|
|
2123
2131
|
onDismiss: () => c.onOpenChange(!1)
|
|
@@ -2131,23 +2139,23 @@ var Go = U.forwardRef(
|
|
|
2131
2139
|
] })
|
|
2132
2140
|
] });
|
|
2133
2141
|
}
|
|
2134
|
-
),
|
|
2142
|
+
), xt = "DialogTitle", Nn = U.forwardRef(
|
|
2135
2143
|
(t, e) => {
|
|
2136
|
-
const { __scopeDialog: n, ...o } = t, r = ce(
|
|
2144
|
+
const { __scopeDialog: n, ...o } = t, r = ce(xt, n);
|
|
2137
2145
|
return /* @__PURE__ */ i(We.h2, { id: r.titleId, ...o, ref: e });
|
|
2138
2146
|
}
|
|
2139
2147
|
);
|
|
2140
|
-
|
|
2141
|
-
var
|
|
2148
|
+
Nn.displayName = xt;
|
|
2149
|
+
var En = "DialogDescription", Uo = U.forwardRef(
|
|
2142
2150
|
(t, e) => {
|
|
2143
|
-
const { __scopeDialog: n, ...o } = t, r = ce(
|
|
2151
|
+
const { __scopeDialog: n, ...o } = t, r = ce(En, n);
|
|
2144
2152
|
return /* @__PURE__ */ i(We.p, { id: r.descriptionId, ...o, ref: e });
|
|
2145
2153
|
}
|
|
2146
2154
|
);
|
|
2147
|
-
Uo.displayName =
|
|
2148
|
-
var
|
|
2155
|
+
Uo.displayName = En;
|
|
2156
|
+
var On = "DialogClose", Dn = U.forwardRef(
|
|
2149
2157
|
(t, e) => {
|
|
2150
|
-
const { __scopeDialog: n, ...o } = t, r = ce(
|
|
2158
|
+
const { __scopeDialog: n, ...o } = t, r = ce(On, n);
|
|
2151
2159
|
return /* @__PURE__ */ i(
|
|
2152
2160
|
We.button,
|
|
2153
2161
|
{
|
|
@@ -2159,16 +2167,16 @@ var En = "DialogClose", On = U.forwardRef(
|
|
|
2159
2167
|
);
|
|
2160
2168
|
}
|
|
2161
2169
|
);
|
|
2162
|
-
|
|
2163
|
-
function
|
|
2170
|
+
Dn.displayName = On;
|
|
2171
|
+
function Rt(t) {
|
|
2164
2172
|
return t ? "open" : "closed";
|
|
2165
2173
|
}
|
|
2166
|
-
var
|
|
2174
|
+
var zn = "DialogTitleWarning", [ls, An] = zr(zn, {
|
|
2167
2175
|
contentName: Pe,
|
|
2168
|
-
titleName:
|
|
2176
|
+
titleName: xt,
|
|
2169
2177
|
docsSlug: "dialog"
|
|
2170
2178
|
}), qo = ({ titleId: t }) => {
|
|
2171
|
-
const e = zn
|
|
2179
|
+
const e = An(zn), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
2172
2180
|
|
|
2173
2181
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2174
2182
|
|
|
@@ -2177,13 +2185,13 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
2177
2185
|
t && (document.getElementById(t) || console.error(n));
|
|
2178
2186
|
}, [n, t]), null;
|
|
2179
2187
|
}, Zo = "DialogDescriptionWarning", jo = ({ contentRef: t, descriptionId: e }) => {
|
|
2180
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
2188
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${An(Zo).contentName}}.`;
|
|
2181
2189
|
return U.useEffect(() => {
|
|
2182
2190
|
var a;
|
|
2183
2191
|
const r = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2184
2192
|
e && r && (document.getElementById(e) || console.warn(o));
|
|
2185
2193
|
}, [o, t, e]), null;
|
|
2186
|
-
}, Bo =
|
|
2194
|
+
}, Bo = Pn, Ko = yn, Xo = xn, Jo = Rn, Yo = Nn, Qo = Dn;
|
|
2187
2195
|
const Te = {
|
|
2188
2196
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2189
2197
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2193,7 +2201,7 @@ const Te = {
|
|
|
2193
2201
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2194
2202
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2195
2203
|
}, ei = () => {
|
|
2196
|
-
const { pdfProperties: t } = Q(), { container: e } = Se(), { activeDocumentProperties: n, setActiveDocumentProperties: o } =
|
|
2204
|
+
const { pdfProperties: t } = Q(), { container: e } = Se(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = Vr(), { localeMessages: r } = pe(), a = k(() => {
|
|
2197
2205
|
if (!t)
|
|
2198
2206
|
return [];
|
|
2199
2207
|
const {
|
|
@@ -2221,11 +2229,11 @@ const Te = {
|
|
|
2221
2229
|
{ label: r == null ? void 0 : r.propertiesCreatorLabel, value: p },
|
|
2222
2230
|
{
|
|
2223
2231
|
label: r == null ? void 0 : r.propertiesCreateOnLabel,
|
|
2224
|
-
value: f ?
|
|
2232
|
+
value: f ? zt(f) : ""
|
|
2225
2233
|
},
|
|
2226
2234
|
{
|
|
2227
2235
|
label: r == null ? void 0 : r.propertiesModifiedOnLabel,
|
|
2228
|
-
value: _ ?
|
|
2236
|
+
value: _ ? zt(_) : ""
|
|
2229
2237
|
},
|
|
2230
2238
|
{ separate: !0 },
|
|
2231
2239
|
{ label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: b },
|
|
@@ -2237,8 +2245,8 @@ const Te = {
|
|
|
2237
2245
|
/* @__PURE__ */ i(Xo, { className: Te["rp-dialog-overlay"] }),
|
|
2238
2246
|
/* @__PURE__ */ A(Jo, { className: Te["rp-document-dialog"], children: [
|
|
2239
2247
|
/* @__PURE__ */ i(Yo, { className: Te["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
|
|
2240
|
-
/* @__PURE__ */ i("div", { className: Te["rp-document-properties"], children: a.map((s, c) => /* @__PURE__ */ i("div", { children: s.separate ? /* @__PURE__ */ i("div", { className: Te["rp-properties-divider"] }) : /* @__PURE__ */ i(
|
|
2241
|
-
/* @__PURE__ */ i(Qo, { asChild: !0, className: Te["rp-dialog-close"], children: /* @__PURE__ */ i(
|
|
2248
|
+
/* @__PURE__ */ i("div", { className: Te["rp-document-properties"], children: a.map((s, c) => /* @__PURE__ */ i("div", { children: s.separate ? /* @__PURE__ */ i("div", { className: Te["rp-properties-divider"] }) : /* @__PURE__ */ i(Gr, { label: s.label, value: s.value }) }, c)) }),
|
|
2249
|
+
/* @__PURE__ */ i(Qo, { asChild: !0, className: Te["rp-dialog-close"], children: /* @__PURE__ */ i(ln, {}) })
|
|
2242
2250
|
] })
|
|
2243
2251
|
] }) }) });
|
|
2244
2252
|
}, ti = {
|
|
@@ -2246,7 +2254,7 @@ const Te = {
|
|
|
2246
2254
|
}, ni = (t) => URL.createObjectURL(t), ri = async (t) => {
|
|
2247
2255
|
const n = await (await fetch(t)).blob();
|
|
2248
2256
|
return ni(n);
|
|
2249
|
-
},
|
|
2257
|
+
}, Fn = () => {
|
|
2250
2258
|
const { filename: t, pdfSrc: e } = Q();
|
|
2251
2259
|
return { download: L(async () => {
|
|
2252
2260
|
if (!t || !e)
|
|
@@ -2254,22 +2262,22 @@ const Te = {
|
|
|
2254
2262
|
const o = document.createElement("a");
|
|
2255
2263
|
o.href = await ri(e), o.download = t, document.body.appendChild(o), o.click(), document.body.removeChild(o);
|
|
2256
2264
|
}, [t, e]) };
|
|
2257
|
-
},
|
|
2265
|
+
}, kn = () => {
|
|
2258
2266
|
const { downloadIcon: t } = he();
|
|
2259
|
-
return t || /* @__PURE__ */ i(
|
|
2260
|
-
},
|
|
2261
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2267
|
+
return t || /* @__PURE__ */ i(Br, {});
|
|
2268
|
+
}, Wn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(q, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), oi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Wn, { localeMessages: e, children: /* @__PURE__ */ i(ee, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(kn, {}) }) }), ii = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(we, { onClick: t, children: /* @__PURE__ */ A(Wn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2269
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(kn, {}) }),
|
|
2262
2270
|
e == null ? void 0 : e.downloadFileLabel
|
|
2263
|
-
] }) }),
|
|
2264
|
-
const { download: t } =
|
|
2271
|
+
] }) }), Mn = () => {
|
|
2272
|
+
const { download: t } = Fn(), { downloadTool: e = !0 } = ve(), { isSmallScreen: n } = Ie(), { localeMessages: o } = pe();
|
|
2265
2273
|
return e ? n ? /* @__PURE__ */ i(ii, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(oi, { download: t, localeMessages: o }) : null : null;
|
|
2266
|
-
},
|
|
2274
|
+
}, Hn = () => {
|
|
2267
2275
|
const { printIcon: t } = he();
|
|
2268
|
-
return t || /* @__PURE__ */ i(
|
|
2269
|
-
},
|
|
2270
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2276
|
+
return t || /* @__PURE__ */ i(Kr, {});
|
|
2277
|
+
}, $n = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(q, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), ai = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i($n, { localeMessages: e, children: /* @__PURE__ */ i(ee, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(Hn, {}) }) }), si = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(we, { onClick: t, children: /* @__PURE__ */ A($n, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2278
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Hn, {}) }),
|
|
2271
2279
|
e == null ? void 0 : e.printLabel
|
|
2272
|
-
] }) }),
|
|
2280
|
+
] }) }), Gn = () => {
|
|
2273
2281
|
const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = et(), { printTool: s = !0 } = ve(), { isSmallScreen: c } = Ie(), { localeMessages: l } = pe();
|
|
2274
2282
|
return s ? c ? /* @__PURE__ */ i(si, { print: t, localeMessages: l }) : typeof s == "function" ? /* @__PURE__ */ i(
|
|
2275
2283
|
s,
|
|
@@ -2286,26 +2294,26 @@ const Te = {
|
|
|
2286
2294
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2287
2295
|
}, li = () => {
|
|
2288
2296
|
const { goToFirstPageIcon: t } = he();
|
|
2289
|
-
return t || /* @__PURE__ */ i(
|
|
2297
|
+
return t || /* @__PURE__ */ i(dn, { className: ci["rp-go-to-Top"] });
|
|
2290
2298
|
}, ui = () => {
|
|
2291
2299
|
const { goToLastPageIcon: t } = he();
|
|
2292
|
-
return t || /* @__PURE__ */ i(
|
|
2293
|
-
},
|
|
2300
|
+
return t || /* @__PURE__ */ i(dn, {});
|
|
2301
|
+
}, Jt = { width: "100%" }, di = () => {
|
|
2294
2302
|
const { goToPage: t, totalPages: e, focusedPage: n } = se(), { jumpNavigationTool: o = !0 } = ve(), { localeMessages: r } = pe(), a = k(() => n === 1, [n]), s = k(() => n === e, [n, e]), c = L(() => {
|
|
2295
2303
|
t(1);
|
|
2296
2304
|
}, [t]), l = L(() => {
|
|
2297
2305
|
t(e);
|
|
2298
2306
|
}, [t, e]);
|
|
2299
2307
|
return o ? /* @__PURE__ */ A(Ue, { children: [
|
|
2300
|
-
/* @__PURE__ */ i(we, { onClick: c, children: /* @__PURE__ */ i(q, { content: r == null ? void 0 : r.firstPageTooltip, style:
|
|
2308
|
+
/* @__PURE__ */ i(we, { onClick: c, children: /* @__PURE__ */ i(q, { content: r == null ? void 0 : r.firstPageTooltip, style: Jt, children: /* @__PURE__ */ A("div", { className: "rp-menu-item", "aria-disabled": a, children: [
|
|
2301
2309
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(li, {}) }),
|
|
2302
2310
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
|
|
2303
2311
|
] }) }) }),
|
|
2304
|
-
/* @__PURE__ */ i(we, { onClick: l, children: /* @__PURE__ */ i(q, { content: r == null ? void 0 : r.lastPageTooltip, style:
|
|
2312
|
+
/* @__PURE__ */ i(we, { onClick: l, children: /* @__PURE__ */ i(q, { content: r == null ? void 0 : r.lastPageTooltip, style: Jt, children: /* @__PURE__ */ A("div", { className: "rp-menu-item", "aria-disabled": s, children: [
|
|
2305
2313
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(ui, {}) }),
|
|
2306
2314
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
|
|
2307
2315
|
] }) }) }),
|
|
2308
|
-
/* @__PURE__ */ i(
|
|
2316
|
+
/* @__PURE__ */ i(Pt, {})
|
|
2309
2317
|
] }) : null;
|
|
2310
2318
|
}, pi = () => {
|
|
2311
2319
|
const { container: t } = Se(), { isSmallScreen: e } = Ie(), {
|
|
@@ -2332,25 +2340,25 @@ const Te = {
|
|
|
2332
2340
|
c,
|
|
2333
2341
|
l,
|
|
2334
2342
|
e
|
|
2335
|
-
]) ? /* @__PURE__ */ A(
|
|
2343
|
+
]) ? /* @__PURE__ */ A(Ur, { children: [
|
|
2336
2344
|
/* @__PURE__ */ i(
|
|
2337
|
-
|
|
2345
|
+
cn,
|
|
2338
2346
|
{
|
|
2339
2347
|
container: t,
|
|
2340
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(q, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(ee, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(
|
|
2348
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(q, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(ee, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(Er, {}) }) }) }),
|
|
2341
2349
|
children: /* @__PURE__ */ A("div", { className: ti["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2342
2350
|
e && /* @__PURE__ */ A(Ue, { children: [
|
|
2343
|
-
/* @__PURE__ */ i(
|
|
2344
|
-
/* @__PURE__ */ i(
|
|
2345
|
-
/* @__PURE__ */ i(
|
|
2346
|
-
/* @__PURE__ */ i(
|
|
2347
|
-
/* @__PURE__ */ i(
|
|
2351
|
+
/* @__PURE__ */ i(sn, {}),
|
|
2352
|
+
/* @__PURE__ */ i(Mn, {}),
|
|
2353
|
+
/* @__PURE__ */ i(Gn, {}),
|
|
2354
|
+
/* @__PURE__ */ i(un, {}),
|
|
2355
|
+
/* @__PURE__ */ i(Pt, {})
|
|
2348
2356
|
] }),
|
|
2349
2357
|
/* @__PURE__ */ i(di, {}),
|
|
2358
|
+
/* @__PURE__ */ i(Zr, {}),
|
|
2359
|
+
/* @__PURE__ */ i(Xr, {}),
|
|
2350
2360
|
/* @__PURE__ */ i(jr, {}),
|
|
2351
|
-
/* @__PURE__ */ i(
|
|
2352
|
-
/* @__PURE__ */ i(Br, {}),
|
|
2353
|
-
/* @__PURE__ */ i(Zr, {})
|
|
2361
|
+
/* @__PURE__ */ i(qr, {})
|
|
2354
2362
|
] })
|
|
2355
2363
|
}
|
|
2356
2364
|
),
|
|
@@ -2359,12 +2367,12 @@ const Te = {
|
|
|
2359
2367
|
}, hi = () => {
|
|
2360
2368
|
const { isSmallScreen: t } = Ie();
|
|
2361
2369
|
return /* @__PURE__ */ A(Fe, { children: [
|
|
2362
|
-
/* @__PURE__ */ i(
|
|
2370
|
+
/* @__PURE__ */ i(Nr, {}),
|
|
2363
2371
|
!t && /* @__PURE__ */ A(Fe, { children: [
|
|
2364
|
-
/* @__PURE__ */ i(
|
|
2365
|
-
/* @__PURE__ */ i(
|
|
2366
|
-
/* @__PURE__ */ i(
|
|
2367
|
-
/* @__PURE__ */ i(
|
|
2372
|
+
/* @__PURE__ */ i(sn, {}),
|
|
2373
|
+
/* @__PURE__ */ i(Mn, {}),
|
|
2374
|
+
/* @__PURE__ */ i(Gn, {}),
|
|
2375
|
+
/* @__PURE__ */ i(un, {})
|
|
2368
2376
|
] }),
|
|
2369
2377
|
/* @__PURE__ */ i(pi, {})
|
|
2370
2378
|
] });
|
|
@@ -2376,10 +2384,10 @@ const Te = {
|
|
|
2376
2384
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
|
|
2377
2385
|
}, mi = 25, dt = 1e3, fi = [50, 75, 100, 125, 150, 200, 300, 400], gi = () => {
|
|
2378
2386
|
const { zoomInIcon: t } = he();
|
|
2379
|
-
return t || /* @__PURE__ */ i(
|
|
2387
|
+
return t || /* @__PURE__ */ i(Jr, {});
|
|
2380
2388
|
}, vi = () => {
|
|
2381
2389
|
const { zoomOutIcon: t } = he();
|
|
2382
|
-
return t || /* @__PURE__ */ i(
|
|
2390
|
+
return t || /* @__PURE__ */ i(Yr, {});
|
|
2383
2391
|
}, _i = () => {
|
|
2384
2392
|
const { zoomLevel: t, setZoomLevel: e } = Xe(), { container: n, contentRef: o } = Se(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = se(), { rotate: s } = Ke(), { pages: c } = Q(), { isSmallScreen: l } = Ie(), { localeMessages: u } = pe(), h = L(() => {
|
|
2385
2393
|
e((g) => {
|
|
@@ -2396,7 +2404,7 @@ const Te = {
|
|
|
2396
2404
|
return (g = c.get(a)) == null ? void 0 : g.page.getViewport({ scale: 1, rotation: s });
|
|
2397
2405
|
}, [c, a, s]), b = L(
|
|
2398
2406
|
(g) => {
|
|
2399
|
-
const m = ((_ == null ? void 0 : _.width) || 0) + 2 *
|
|
2407
|
+
const m = ((_ == null ? void 0 : _.width) || 0) + 2 * At, P = ((_ == null ? void 0 : _.height) || 0) + 2 * At, I = (o == null ? void 0 : o.clientWidth) || 0, d = (o == null ? void 0 : o.clientHeight) || 0, T = Qr(g, I, d, m, P);
|
|
2400
2408
|
e(T);
|
|
2401
2409
|
},
|
|
2402
2410
|
[e, _]
|
|
@@ -2417,7 +2425,7 @@ const Te = {
|
|
|
2417
2425
|
}
|
|
2418
2426
|
) }),
|
|
2419
2427
|
!l && /* @__PURE__ */ i(
|
|
2420
|
-
|
|
2428
|
+
cn,
|
|
2421
2429
|
{
|
|
2422
2430
|
container: n,
|
|
2423
2431
|
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(q, { content: u == null ? void 0 : u.zoomSelectTooltip, children: /* @__PURE__ */ A(
|
|
@@ -2440,7 +2448,7 @@ const Te = {
|
|
|
2440
2448
|
/* @__PURE__ */ i(we, { onClick: () => w(nt.PAGE_FIT), children: u == null ? void 0 : u.zoomPageFit }),
|
|
2441
2449
|
/* @__PURE__ */ i(we, { onClick: () => w(nt.PAGE_WIDTH), children: u == null ? void 0 : u.zoomPageWidth })
|
|
2442
2450
|
] }),
|
|
2443
|
-
/* @__PURE__ */ i(
|
|
2451
|
+
/* @__PURE__ */ i(Pt, {}),
|
|
2444
2452
|
/* @__PURE__ */ i(Ue, { children: fi.map((g) => /* @__PURE__ */ A(we, { onClick: () => w(g), children: [
|
|
2445
2453
|
g,
|
|
2446
2454
|
" %"
|
|
@@ -2468,9 +2476,9 @@ const Te = {
|
|
|
2468
2476
|
"rp-search-tool-input-clear": "_rp-search-tool-input-clear_jvchu_43",
|
|
2469
2477
|
"rp-search-input": "_rp-search-input_jvchu_57",
|
|
2470
2478
|
"rp-search-icon-info": "_rp-search-icon-info_jvchu_62"
|
|
2471
|
-
},
|
|
2479
|
+
}, Yt = () => {
|
|
2472
2480
|
const { searchIcon: t } = he();
|
|
2473
|
-
return t || /* @__PURE__ */ i(
|
|
2481
|
+
return t || /* @__PURE__ */ i(eo, {});
|
|
2474
2482
|
}, wi = () => {
|
|
2475
2483
|
const { container: t } = Se(), [e, n] = M(!1), { pdf: o } = Q(), [r, a] = M(null), {
|
|
2476
2484
|
searchOptions: s,
|
|
@@ -2482,7 +2490,7 @@ const Te = {
|
|
|
2482
2490
|
nextMatch: p,
|
|
2483
2491
|
prevMatch: v,
|
|
2484
2492
|
search: _
|
|
2485
|
-
} =
|
|
2493
|
+
} = _n(), { searchTool: b = !0 } = ve(), [w, g] = M(_), { localeMessages: m } = pe(), P = L(() => {
|
|
2486
2494
|
n(!0);
|
|
2487
2495
|
}, []), I = L(() => {
|
|
2488
2496
|
u(""), g(""), n(!1);
|
|
@@ -2523,34 +2531,34 @@ const Te = {
|
|
|
2523
2531
|
return z(() => {
|
|
2524
2532
|
I();
|
|
2525
2533
|
}, [o, I]), b ? /* @__PURE__ */ i(Fe, { children: /* @__PURE__ */ i(
|
|
2526
|
-
|
|
2534
|
+
no,
|
|
2527
2535
|
{
|
|
2528
2536
|
open: e,
|
|
2529
2537
|
container: t,
|
|
2530
|
-
triggerComponent: /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(ee, { onClick: P, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(
|
|
2538
|
+
triggerComponent: /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(ee, { onClick: P, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(Yt, {}) }) }),
|
|
2531
2539
|
children: /* @__PURE__ */ A("div", { className: re["rp-search-tool-content"], children: [
|
|
2532
2540
|
/* @__PURE__ */ A("div", { className: re["rp-search-tool-input-wrapper"], children: [
|
|
2533
2541
|
/* @__PURE__ */ A("div", { className: re["rp-search-tool-input"], children: [
|
|
2534
2542
|
/* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchInputTooltip, children: /* @__PURE__ */ i(
|
|
2535
|
-
|
|
2543
|
+
tn,
|
|
2536
2544
|
{
|
|
2537
2545
|
value: w,
|
|
2538
2546
|
onKeyDown: C,
|
|
2539
2547
|
onChange: S,
|
|
2540
|
-
icon: /* @__PURE__ */ i(
|
|
2548
|
+
icon: /* @__PURE__ */ i(Yt, {}),
|
|
2541
2549
|
placeholder: m == null ? void 0 : m.searchInputPlaceholder,
|
|
2542
2550
|
className: re["rp-search-input"],
|
|
2543
2551
|
ref: a,
|
|
2544
|
-
children: !!w && /* @__PURE__ */ i("span", { className: re["rp-search-tool-input-clear"], onClick: O, children: /* @__PURE__ */ i(
|
|
2552
|
+
children: !!w && /* @__PURE__ */ i("span", { className: re["rp-search-tool-input-clear"], onClick: O, children: /* @__PURE__ */ i(to, {}) })
|
|
2545
2553
|
}
|
|
2546
2554
|
) }),
|
|
2547
|
-
l ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(
|
|
2555
|
+
l ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(bt, {}) }) : /* @__PURE__ */ i("span", { children: x })
|
|
2548
2556
|
] }),
|
|
2549
2557
|
/* @__PURE__ */ A("div", { className: re["rp-search-tool-input-checkboxes"], children: [
|
|
2550
|
-
/* @__PURE__ */ i(
|
|
2551
|
-
/* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: re["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(
|
|
2552
|
-
/* @__PURE__ */ i(
|
|
2553
|
-
/* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: re["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(
|
|
2558
|
+
/* @__PURE__ */ i(Ft, { name: "matchCase", value: R, onChange: F, children: m == null ? void 0 : m.searchMatchCaseLabel }),
|
|
2559
|
+
/* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: re["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(kt, {}) }) }),
|
|
2560
|
+
/* @__PURE__ */ i(Ft, { name: "wholeWord", value: D, onChange: N, children: m == null ? void 0 : m.searchWholeWordsLabel }),
|
|
2561
|
+
/* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: re["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(kt, {}) }) })
|
|
2554
2562
|
] })
|
|
2555
2563
|
] }),
|
|
2556
2564
|
/* @__PURE__ */ A("div", { className: re["rp-search-tool-controls"], children: [
|
|
@@ -2574,7 +2582,7 @@ const Te = {
|
|
|
2574
2582
|
{
|
|
2575
2583
|
onKeyDown: d,
|
|
2576
2584
|
"aria-label": m == null ? void 0 : m.searchCloseButtonTooltip,
|
|
2577
|
-
children: /* @__PURE__ */ i(
|
|
2585
|
+
children: /* @__PURE__ */ i(ln, { onClick: I, className: re["rp-search-tool-input-icon"] })
|
|
2578
2586
|
}
|
|
2579
2587
|
) })
|
|
2580
2588
|
] })
|
|
@@ -2659,29 +2667,29 @@ const Te = {
|
|
|
2659
2667
|
width: `${c.width}px`,
|
|
2660
2668
|
height: `${c.height}px`
|
|
2661
2669
|
},
|
|
2662
|
-
children: /* @__PURE__ */ i(
|
|
2670
|
+
children: /* @__PURE__ */ i(bt, {})
|
|
2663
2671
|
}
|
|
2664
2672
|
) }),
|
|
2665
2673
|
/* @__PURE__ */ i("div", { className: ze["rp-thumbnail-text"], children: n })
|
|
2666
2674
|
]
|
|
2667
2675
|
}
|
|
2668
2676
|
);
|
|
2669
|
-
},
|
|
2677
|
+
}, Qt = {
|
|
2670
2678
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
2671
2679
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
2672
2680
|
}, Si = 16, Ii = (t, e) => {
|
|
2673
2681
|
const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
2674
2682
|
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Si);
|
|
2675
2683
|
}, yi = Be((t, e) => {
|
|
2676
|
-
const { show: n } = t, { focusedPage: o, totalPages: r } = se(), { thumbnailPages: a, addPage: s, thumbnailLength: c, addToPage: l } =
|
|
2677
|
-
|
|
2684
|
+
const { show: n } = t, { focusedPage: o, totalPages: r } = se(), { thumbnailPages: a, addPage: s, thumbnailLength: c, addToPage: l } = gn(), u = W(null), h = W(1);
|
|
2685
|
+
en(e, () => u.current);
|
|
2678
2686
|
const f = k(() => Object.values(a), [a]), p = L(() => {
|
|
2679
2687
|
const v = c + 1;
|
|
2680
2688
|
v <= r && s(v);
|
|
2681
2689
|
}, [s, r, c]);
|
|
2682
2690
|
return z(() => {
|
|
2683
2691
|
o > c ? l(o) : n && h.current !== o && (Ii(u.current, o), h.current = o);
|
|
2684
|
-
}, [o, c, l, n, f]),
|
|
2692
|
+
}, [o, c, l, n, f]), dr(u.current, p), /* @__PURE__ */ i("div", { ref: u, className: Qt["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: Qt["rp-thumbnails"], children: n ? f.map((v, _) => {
|
|
2685
2693
|
var b, w;
|
|
2686
2694
|
return /* @__PURE__ */ i(
|
|
2687
2695
|
Pi,
|
|
@@ -2697,9 +2705,9 @@ const Te = {
|
|
|
2697
2705
|
}) : null }) });
|
|
2698
2706
|
}), xi = () => {
|
|
2699
2707
|
const { thumbnailIcon: t } = he();
|
|
2700
|
-
return t || /* @__PURE__ */ i(
|
|
2708
|
+
return t || /* @__PURE__ */ i(ur, {});
|
|
2701
2709
|
}, Ri = () => {
|
|
2702
|
-
const { active: t, setActive: e } =
|
|
2710
|
+
const { active: t, setActive: e } = gn(), [n, o] = M(200), r = W(null), { thumbnailTool: a } = ve(), { localeMessages: s } = pe(), c = L(() => {
|
|
2703
2711
|
e((u) => !u);
|
|
2704
2712
|
}, []), l = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: c, active: t }) : a ? /* @__PURE__ */ i(q, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
2705
2713
|
ee,
|
|
@@ -2720,24 +2728,24 @@ const Te = {
|
|
|
2720
2728
|
/* @__PURE__ */ i("div", { className: pt["rp-sidebar-content"], children: l }),
|
|
2721
2729
|
/* @__PURE__ */ A("div", { "data-rp": "thumbnailSidebar", hidden: !t, className: pt["rp-thumbnails-wrapper"], children: [
|
|
2722
2730
|
/* @__PURE__ */ i(yi, { show: t, ref: r }),
|
|
2723
|
-
/* @__PURE__ */ i(
|
|
2731
|
+
/* @__PURE__ */ i(pr, { onWidthChange: o, thumbnailRef: r })
|
|
2724
2732
|
] })
|
|
2725
2733
|
]
|
|
2726
2734
|
}
|
|
2727
2735
|
);
|
|
2728
|
-
},
|
|
2729
|
-
const { children: n, slots: o, icons: r, style: a, className: s, mobileWidth: c, onLoaded: l, cleanupOnLoaded: u } = t, [h, f] = M(null), { setContainer: p, setContentRef: v } = Se(), { loading: _ } = Q(), { LoaderImageComponent: b } =
|
|
2736
|
+
}, us = Be((t, e) => {
|
|
2737
|
+
const { children: n, slots: o, icons: r, style: a, className: s, mobileWidth: c, onLoaded: l, cleanupOnLoaded: u } = t, [h, f] = M(null), { setContainer: p, setContentRef: v } = Se(), { loading: _ } = Q(), { LoaderImageComponent: b } = an();
|
|
2730
2738
|
return z(() => (l && l(), () => {
|
|
2731
2739
|
u && u();
|
|
2732
|
-
}), [l, u]), /* @__PURE__ */ i("div", { ref: e, className: oe(Ce["rp-theme-variables"], Ce["rp-container"]), children: /* @__PURE__ */ i(
|
|
2733
|
-
|
|
2740
|
+
}), [l, u]), /* @__PURE__ */ i("div", { ref: e, className: oe(Ce["rp-theme-variables"], Ce["rp-container"]), children: /* @__PURE__ */ i(_r, { mobileWidth: c, children: /* @__PURE__ */ i(hr, { slots: o, children: /* @__PURE__ */ i(mr, { icons: r, children: /* @__PURE__ */ A(
|
|
2741
|
+
fr,
|
|
2734
2742
|
{
|
|
2735
2743
|
getContainerRef: p,
|
|
2736
2744
|
toolbarRef: h,
|
|
2737
2745
|
style: a,
|
|
2738
2746
|
className: s,
|
|
2739
2747
|
children: [
|
|
2740
|
-
/* @__PURE__ */ A(
|
|
2748
|
+
/* @__PURE__ */ A(gr, { children: [
|
|
2741
2749
|
/* @__PURE__ */ A("div", { className: Ce["rp-layout"], children: [
|
|
2742
2750
|
/* @__PURE__ */ i(Ti, { ref: f }),
|
|
2743
2751
|
/* @__PURE__ */ A("div", { className: Ce["rp-content"], children: [
|
|
@@ -2745,7 +2753,7 @@ const Te = {
|
|
|
2745
2753
|
/* @__PURE__ */ i("div", { ref: v, className: Ce["rp-pages"], children: n })
|
|
2746
2754
|
] })
|
|
2747
2755
|
] }),
|
|
2748
|
-
/* @__PURE__ */ i(
|
|
2756
|
+
/* @__PURE__ */ i(vr, {})
|
|
2749
2757
|
] }),
|
|
2750
2758
|
_ ? /* @__PURE__ */ i(
|
|
2751
2759
|
"div",
|
|
@@ -2785,39 +2793,39 @@ export {
|
|
|
2785
2793
|
so as C,
|
|
2786
2794
|
Oo as D,
|
|
2787
2795
|
yi as E,
|
|
2788
|
-
|
|
2796
|
+
Mn as F,
|
|
2789
2797
|
Ri as G,
|
|
2790
2798
|
Ci as L,
|
|
2791
2799
|
di as M,
|
|
2792
2800
|
pi as O,
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2801
|
+
rs as P,
|
|
2802
|
+
ss as R,
|
|
2803
|
+
as as S,
|
|
2804
|
+
is as T,
|
|
2797
2805
|
_i as Z,
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2806
|
+
os as a,
|
|
2807
|
+
us as b,
|
|
2808
|
+
Fn as c,
|
|
2801
2809
|
et as d,
|
|
2802
|
-
|
|
2803
|
-
|
|
2810
|
+
_n as e,
|
|
2811
|
+
pn as f,
|
|
2804
2812
|
ro as g,
|
|
2805
|
-
|
|
2813
|
+
hn as h,
|
|
2806
2814
|
oo as i,
|
|
2807
|
-
|
|
2815
|
+
mn as j,
|
|
2808
2816
|
io as k,
|
|
2809
|
-
|
|
2810
|
-
|
|
2817
|
+
fn as l,
|
|
2818
|
+
gn as m,
|
|
2811
2819
|
ao as n,
|
|
2812
|
-
|
|
2820
|
+
vn as o,
|
|
2813
2821
|
co as p,
|
|
2814
|
-
|
|
2822
|
+
St as q,
|
|
2815
2823
|
Lo as r,
|
|
2816
2824
|
Do as s,
|
|
2817
2825
|
ko as t,
|
|
2818
2826
|
se as u,
|
|
2819
2827
|
ei as v,
|
|
2820
|
-
|
|
2828
|
+
Gn as w,
|
|
2821
2829
|
hi as x,
|
|
2822
2830
|
wi as y,
|
|
2823
2831
|
Ti as z
|