@pdf-viewer/react 0.7.0-beta.1 → 0.8.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{RPDefaultLayout-97effa3a.js → RPDefaultLayout-6a828c29.js} +224 -220
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +3 -2
- package/dist/components/RPProvider.js +5 -3
- 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/FileUploadTool.js +6 -6
- 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 +1 -1
- 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 +1 -1
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/RPTooltip.js +532 -1793
- package/dist/contexts/FileInputContext.js +5 -5
- 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-e6d5fe8f.js +1327 -0
- package/dist/index-316854c1.js +2299 -0
- package/dist/{index-743c36f0.js → index-71898eb9.js} +30 -30
- package/dist/main.js +15 -11
- package/dist/types/contexts/FileInputContext.d.ts +1 -1
- package/dist/types/main.d.ts +2 -0
- package/dist/types/utils/hooks/usePinch.d.ts +1 -0
- package/dist/types/utils/types.d.ts +1 -1
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +23 -15
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePinch.js +28 -0
- 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/index-3459164c.js +0 -3609
|
@@ -46,34 +46,36 @@ import { sanitizeExternalUrl as ir } from "./utils/sanitizeExternalUrl.js";
|
|
|
46
46
|
import { useWatermark as cr } from "./utils/hooks/useWatermark.js";
|
|
47
47
|
import { useMousePressed as lr } from "./utils/hooks/useMousePressed.js";
|
|
48
48
|
import { useGrabScroll as ur } from "./utils/hooks/useGrabScroll.js";
|
|
49
|
+
import { usePinch as dr } from "./utils/hooks/usePinch.js";
|
|
49
50
|
import { getThumbnailViewport as yt } from "./utils/getThumbnailViewport.js";
|
|
50
|
-
import { useDebounce as
|
|
51
|
-
import { appConsole as
|
|
51
|
+
import { useDebounce as pr } from "./utils/hooks/useDebounce.js";
|
|
52
|
+
import { appConsole as hr } from "./utils/appConsole.js";
|
|
52
53
|
import { FileUploadTool as Yt } from "./components/layout/toolbar/FileUploadTool.js";
|
|
53
|
-
import { DarkModeTool as
|
|
54
|
-
import { ThreeDotIcon as
|
|
54
|
+
import { DarkModeTool as mr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
55
|
+
import { ThreeDotIcon as fr } from "./components/icons/ThreeDotIcon.js";
|
|
55
56
|
import { UIDropDown as ft } from "./components/ui/DropDown.js";
|
|
56
|
-
import { u as gt, a as Le, c as Re, b as vt, d as
|
|
57
|
-
import { c as
|
|
57
|
+
import { u as gt, a as Le, c as Re, b as vt, d as gr, e as vr, h as _r, f as wr, F as br, D as Cr, g as Pr, G as ke } from "./index-316854c1.js";
|
|
58
|
+
import { c as Tr, e as Sr, b as yr } from "./index-71898eb9.js";
|
|
59
|
+
import { e as Ke } from "./floating-ui.react-dom-e6d5fe8f.js";
|
|
58
60
|
import { CloseIcon as Qt } from "./components/icons/CloseIcon.js";
|
|
59
|
-
import { PropertyItem as
|
|
60
|
-
import { useOtherToolContext as
|
|
61
|
-
import { DocumentProperties as
|
|
62
|
-
import { RotateTool as
|
|
63
|
-
import { ScrollModeTool as
|
|
61
|
+
import { PropertyItem as Ir } from "./components/layout/toolbar/PropertyItem.js";
|
|
62
|
+
import { useOtherToolContext as xr, OtherToolProvider as Rr } from "./contexts/OtherToolContext.js";
|
|
63
|
+
import { DocumentProperties as Mr } from "./components/layout/toolbar/DocumentProperties.js";
|
|
64
|
+
import { RotateTool as Nr } from "./components/layout/toolbar/RotateTool.js";
|
|
65
|
+
import { ScrollModeTool as Lr } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
64
66
|
import { MenuSeparator as _t } from "./components/layout/toolbar/MenuSeparator.js";
|
|
65
|
-
import { FileDownloadDefaultIcon as
|
|
67
|
+
import { FileDownloadDefaultIcon as Er } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
66
68
|
import { MenuItem as he } from "./components/layout/toolbar/MenuItem.js";
|
|
67
|
-
import { PrintDefaultTool as
|
|
69
|
+
import { PrintDefaultTool as Or } from "./components/icons/PrintDefaultIcon.js";
|
|
68
70
|
import { FullScreenTool as en } from "./components/layout/toolbar/FullScreenTool.js";
|
|
69
71
|
import { GoToDownIcon as tn } from "./components/icons/GoToDownIcon.js";
|
|
70
|
-
import { SelectionModeTool as
|
|
71
|
-
import { ZoomInIcon as
|
|
72
|
-
import { ZoomOutIcon as
|
|
72
|
+
import { SelectionModeTool as Dr } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
73
|
+
import { ZoomInIcon as Ar } from "./components/icons/ZoomInIcon.js";
|
|
74
|
+
import { ZoomOutIcon as zr } from "./components/icons/ZoomOutIcon.js";
|
|
73
75
|
import { PAGE_PADDING as It } from "./utils/constants.js";
|
|
74
|
-
import { SearchIcon as
|
|
76
|
+
import { SearchIcon as Fr } from "./components/icons/SearchIcon.js";
|
|
75
77
|
import { UICheckbox as xt } from "./components/ui/Checkbox.js";
|
|
76
|
-
import { ClearIcon as
|
|
78
|
+
import { ClearIcon as kr } from "./components/icons/ClearIcon.js";
|
|
77
79
|
import './assets/RPDefaultLayout.css';const nn = () => {
|
|
78
80
|
const { viewMode: e } = qe(), { scrollMode: t } = Te(), { virtualScrollRef: n, pageScrollElementRef: r } = Ze(), { setFocusedPage: o } = oe(), a = $(), { columnCount: c } = Bt(), i = ht(), l = $(t), p = $(e);
|
|
79
81
|
F(() => {
|
|
@@ -106,8 +108,8 @@ import './assets/RPDefaultLayout.css';const nn = () => {
|
|
|
106
108
|
},
|
|
107
109
|
[c, h, o]
|
|
108
110
|
) };
|
|
109
|
-
},
|
|
110
|
-
const [t, n] = W(e), [r, o] = W(0), { scrollToPage: a } = nn(), c = $(1), { isScrolling: i } = Kt(), { viewMode: l } = qe(), { scrollMode: p } = Te(), h =
|
|
111
|
+
}, Wr = (e = 1) => {
|
|
112
|
+
const [t, n] = W(e), [r, o] = W(0), { scrollToPage: a } = nn(), c = $(1), { isScrolling: i } = Kt(), { viewMode: l } = qe(), { scrollMode: p } = Te(), h = pr(t, 100), f = M(
|
|
111
113
|
(v) => {
|
|
112
114
|
if (!/^[0-9]*$/g.test(v.toString()) || !v)
|
|
113
115
|
return { success: !1, currentPage: c.current };
|
|
@@ -151,9 +153,9 @@ import './assets/RPDefaultLayout.css';const nn = () => {
|
|
|
151
153
|
}
|
|
152
154
|
}), oe = () => {
|
|
153
155
|
const e = $e(rn);
|
|
154
|
-
return typeof (e == null ? void 0 : e.focusedPage) > "u" &&
|
|
155
|
-
},
|
|
156
|
-
const { initialPage: t = 1 } = Un(), { pdf: n } = ne(), { focusedPage: r, totalPages: o, setFocusedPage: a, setTotalPages: c, goToPage: i, nextPage: l, prevPage: p } =
|
|
156
|
+
return typeof (e == null ? void 0 : e.focusedPage) > "u" && hr.error("Please use this hooks inside children component of RPController or RPLayout"), e;
|
|
157
|
+
}, Fs = ({ children: e }) => {
|
|
158
|
+
const { initialPage: t = 1 } = Un(), { pdf: n } = ne(), { focusedPage: r, totalPages: o, setFocusedPage: a, setTotalPages: c, goToPage: i, nextPage: l, prevPage: p } = Wr(t);
|
|
157
159
|
return F(() => {
|
|
158
160
|
n != null && n.numPages && c(n.numPages);
|
|
159
161
|
}, [n, c, o, t]), F(() => {
|
|
@@ -176,7 +178,7 @@ import './assets/RPDefaultLayout.css';const nn = () => {
|
|
|
176
178
|
}
|
|
177
179
|
);
|
|
178
180
|
};
|
|
179
|
-
const
|
|
181
|
+
const Hr = () => {
|
|
180
182
|
const { pdf: e, pages: t } = ne(), [n, r] = W({
|
|
181
183
|
loadedPages: 0,
|
|
182
184
|
totalPages: 0,
|
|
@@ -353,8 +355,8 @@ const Wr = () => {
|
|
|
353
355
|
console.error("Error in setOnError callback:", t);
|
|
354
356
|
}
|
|
355
357
|
}
|
|
356
|
-
}),
|
|
357
|
-
const [t, n] = W(null), [r, o] = W(null), { print: a, cancel: c, progress: i, isComplete: l, isError: p, error: h } =
|
|
358
|
+
}), ks = ({ children: e }) => {
|
|
359
|
+
const [t, n] = W(null), [r, o] = W(null), { print: a, cancel: c, progress: i, isComplete: l, isError: p, error: h } = Hr(), f = M((v) => {
|
|
358
360
|
v && typeof v == "function" && o(() => v);
|
|
359
361
|
}, []), u = (v) => {
|
|
360
362
|
h && v(h);
|
|
@@ -389,7 +391,7 @@ const Wr = () => {
|
|
|
389
391
|
if (!e)
|
|
390
392
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
391
393
|
return e;
|
|
392
|
-
},
|
|
394
|
+
}, $r = () => {
|
|
393
395
|
const [e, t] = W({}), { pages: n } = ne(), { rotate: r } = Ve(), o = A(() => Object.keys(e).length, [e]), a = M(
|
|
394
396
|
(i) => {
|
|
395
397
|
if (!n.size)
|
|
@@ -477,11 +479,11 @@ const Wr = () => {
|
|
|
477
479
|
setActive: (e) => {
|
|
478
480
|
},
|
|
479
481
|
active: !1
|
|
480
|
-
}), sn = () => $e(an),
|
|
482
|
+
}), sn = () => $e(an), Ws = ({
|
|
481
483
|
children: e,
|
|
482
484
|
initialThumbnailsVisible: t
|
|
483
485
|
}) => {
|
|
484
|
-
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: a } =
|
|
486
|
+
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: a } = $r(), [c, i] = W(t);
|
|
485
487
|
return /* @__PURE__ */ s(
|
|
486
488
|
an.Provider,
|
|
487
489
|
{
|
|
@@ -489,7 +491,7 @@ const Wr = () => {
|
|
|
489
491
|
children: e
|
|
490
492
|
}
|
|
491
493
|
);
|
|
492
|
-
},
|
|
494
|
+
}, Gr = (e = {}, t = "") => {
|
|
493
495
|
const [n, r] = W(t), [o, a] = W(!1), { pdf: c, pages: i } = ne(), l = ht(), p = $(!n), { currentZoom: h } = Ue(), [f, u] = W([]), { setFocusedPage: m } = oe(), [g, _] = W(0), { pageScrollElementRef: v, virtualScrollableElementRef: C } = Ze(), { scrollMode: S } = Te(), [P, R] = W(null), d = $({}), b = A(() => g === 0 ? null : f[g - 1], [g, f]), w = A(() => f.length, [f]);
|
|
494
496
|
F(() => {
|
|
495
497
|
if (!b || !i)
|
|
@@ -595,7 +597,7 @@ const Wr = () => {
|
|
|
595
597
|
currentMatchElement: null,
|
|
596
598
|
setCurrentMatchElement: (e) => {
|
|
597
599
|
}
|
|
598
|
-
}),
|
|
600
|
+
}), Hs = ({
|
|
599
601
|
children: e,
|
|
600
602
|
initialSearch: t
|
|
601
603
|
}) => {
|
|
@@ -611,7 +613,7 @@ const Wr = () => {
|
|
|
611
613
|
prevMatch: u,
|
|
612
614
|
currentMatchElement: m,
|
|
613
615
|
setCurrentMatchElement: g
|
|
614
|
-
} =
|
|
616
|
+
} = Gr(n, t);
|
|
615
617
|
return /* @__PURE__ */ s(
|
|
616
618
|
cn.Provider,
|
|
617
619
|
{
|
|
@@ -645,7 +647,7 @@ const Wr = () => {
|
|
|
645
647
|
"rp-page-wrapper": "_rp-page-wrapper_h7a2q_1",
|
|
646
648
|
"rp-page": "_rp-page_h7a2q_1",
|
|
647
649
|
"rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
|
|
648
|
-
},
|
|
650
|
+
}, Vr = (e) => {
|
|
649
651
|
const { pageNumber: t, onLoaded: n, onLoading: r } = e, o = $(null), { pages: a } = ne(), { rotate: c } = Ve(), i = $(), { currentZoom: l } = Ue();
|
|
650
652
|
return F(() => {
|
|
651
653
|
if (!a || l === 0)
|
|
@@ -666,7 +668,7 @@ const Wr = () => {
|
|
|
666
668
|
}, Je = {
|
|
667
669
|
"rp-text-layer": "_rp-text-layer_1mgyz_1",
|
|
668
670
|
"rp-text-layer-text": "_rp-text-layer-text_1mgyz_9"
|
|
669
|
-
},
|
|
671
|
+
}, Ur = (e) => {
|
|
670
672
|
const { pageNumber: t } = e, { pages: n } = ne(), r = $(null), { matches: o, currentMatch: a, setCurrentMatchElement: c } = ln(), [i, l] = W(
|
|
671
673
|
[]
|
|
672
674
|
), p = $(), h = $(), f = $(), u = A(() => o.filter((g) => g.pageIndex === t - 1), [o, t]), m = M(
|
|
@@ -728,16 +730,16 @@ const Wr = () => {
|
|
|
728
730
|
ref: r
|
|
729
731
|
}
|
|
730
732
|
);
|
|
731
|
-
},
|
|
733
|
+
}, qr = {
|
|
732
734
|
"rp-annotation-layer": "_rp-annotation-layer_o0ksd_1"
|
|
733
735
|
}, un = ["click", "dblclick", "mouseover", "input", "change"];
|
|
734
|
-
let
|
|
736
|
+
let Zr = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
735
737
|
const ct = /* @__PURE__ */ new Map(), dn = (e, t) => `${e.loadingTask.docId}___${t.num}R${t.gen === 0 ? "" : t.gen}`;
|
|
736
|
-
function
|
|
738
|
+
function jr(e, t) {
|
|
737
739
|
const n = dn(e, t);
|
|
738
740
|
return ct.has(n) ? ct.get(n) ?? null : null;
|
|
739
741
|
}
|
|
740
|
-
const
|
|
742
|
+
const Br = (e, t, n) => {
|
|
741
743
|
ct.set(dn(e, t), n);
|
|
742
744
|
}, Rt = (e, t) => {
|
|
743
745
|
switch (t[1].name) {
|
|
@@ -776,16 +778,16 @@ const jr = (e, t, n) => {
|
|
|
776
778
|
async function pn(e, t) {
|
|
777
779
|
let n;
|
|
778
780
|
if (typeof t == "string" ? n = await e.getDestination(t) : n = t, n && typeof n[0] == "object" && n[0] !== null) {
|
|
779
|
-
const r = n[0], o =
|
|
781
|
+
const r = n[0], o = jr(e, r);
|
|
780
782
|
if (o === null) {
|
|
781
783
|
const a = await e.getPageIndex(r);
|
|
782
|
-
return
|
|
784
|
+
return Br(e, r, a), await pn(e, n);
|
|
783
785
|
} else
|
|
784
786
|
return Rt(o, n);
|
|
785
787
|
} else
|
|
786
788
|
return Rt(n[0], n);
|
|
787
789
|
}
|
|
788
|
-
function
|
|
790
|
+
function Kr(e) {
|
|
789
791
|
const { id: t, url: n, unsafeUrl: r } = e;
|
|
790
792
|
new MutationObserver((a, c) => {
|
|
791
793
|
const i = document.querySelector(`[data-annotation-id="${t}"]`);
|
|
@@ -795,7 +797,7 @@ function Br(e) {
|
|
|
795
797
|
}
|
|
796
798
|
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
797
799
|
}
|
|
798
|
-
const
|
|
800
|
+
const Xr = (e) => {
|
|
799
801
|
const n = e.target.parentNode;
|
|
800
802
|
if (!n)
|
|
801
803
|
return;
|
|
@@ -833,7 +835,7 @@ const Kr = (e) => {
|
|
|
833
835
|
r(l);
|
|
834
836
|
});
|
|
835
837
|
};
|
|
836
|
-
function
|
|
838
|
+
function Jr(e, t) {
|
|
837
839
|
for (const n of un)
|
|
838
840
|
e.addEventListener(n, t);
|
|
839
841
|
}
|
|
@@ -841,7 +843,7 @@ function Nt(e, t) {
|
|
|
841
843
|
for (const n of un)
|
|
842
844
|
e.removeEventListener(n, t);
|
|
843
845
|
}
|
|
844
|
-
const
|
|
846
|
+
const Yr = (e) => {
|
|
845
847
|
const { pageNumber: t } = e, n = $(null), { pages: r, pdf: o } = ne(), a = $(), [c, i] = W(), { setFocusedPage: l, goToPage: p } = oe(), { scrollMode: h } = Te(), f = A(() => r.get(t), [r, t]), u = A(() => f == null ? void 0 : f.page.getViewport(), [f]);
|
|
846
848
|
F(() => {
|
|
847
849
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
@@ -854,7 +856,7 @@ const Jr = (e) => {
|
|
|
854
856
|
}, [f]);
|
|
855
857
|
const g = M(
|
|
856
858
|
(_) => {
|
|
857
|
-
|
|
859
|
+
Xr(_), !(!c || !o) && (h === J.PAGE_SCROLLING ? Mt(_, c, o, (v) => l(v.pageIndex + 1)) : Mt(_, c, o, (v) => p(v.pageIndex + 1)));
|
|
858
860
|
},
|
|
859
861
|
[o, c, p, l, h]
|
|
860
862
|
);
|
|
@@ -872,7 +874,7 @@ const Jr = (e) => {
|
|
|
872
874
|
const { annotationType: S } = C;
|
|
873
875
|
switch (S) {
|
|
874
876
|
case at.Link:
|
|
875
|
-
|
|
877
|
+
Kr(C);
|
|
876
878
|
break;
|
|
877
879
|
case at.Widget:
|
|
878
880
|
break;
|
|
@@ -897,14 +899,14 @@ const Jr = (e) => {
|
|
|
897
899
|
div: n.current,
|
|
898
900
|
viewport: _.clone({ dontFlip: !0 }),
|
|
899
901
|
page: f.page,
|
|
900
|
-
imageResourcesPath:
|
|
902
|
+
imageResourcesPath: Zr,
|
|
901
903
|
renderForms: !1,
|
|
902
904
|
linkService: new sr(),
|
|
903
905
|
downloadManager: null,
|
|
904
906
|
enableScripting: !1
|
|
905
907
|
});
|
|
906
908
|
})().then(() => {
|
|
907
|
-
n.current &&
|
|
909
|
+
n.current && Jr(n.current, g);
|
|
908
910
|
}), () => {
|
|
909
911
|
n.current && Nt(n.current, g);
|
|
910
912
|
};
|
|
@@ -913,11 +915,11 @@ const Jr = (e) => {
|
|
|
913
915
|
{
|
|
914
916
|
"data-rp": `page-${t}-annotationLayer`,
|
|
915
917
|
style: { width: `${u == null ? void 0 : u.width}px`, height: `${u == null ? void 0 : u.height}px` },
|
|
916
|
-
className:
|
|
918
|
+
className: qr["rp-annotation-layer"],
|
|
917
919
|
ref: n
|
|
918
920
|
}
|
|
919
921
|
);
|
|
920
|
-
},
|
|
922
|
+
}, Qr = Array.from({ length: 21 }, (e, t) => Number((t * 0.05).toFixed(2))), bt = Ge((e, t) => {
|
|
921
923
|
const { pageNumber: n, style: r, onIntersectRatioChange: o, ...a } = e, { pages: c } = ne(), { rotate: i } = Ve(), { textLayer: l } = Gn(), { currentZoom: p } = Ue(), h = $(c.get(n)), [f, u] = W(!1), m = $(null), [g, _] = W({
|
|
922
924
|
width: 0,
|
|
923
925
|
height: 0
|
|
@@ -948,7 +950,7 @@ const Jr = (e) => {
|
|
|
948
950
|
(R) => {
|
|
949
951
|
o && o(n, R[0].intersectionRatio);
|
|
950
952
|
},
|
|
951
|
-
{ threshold:
|
|
953
|
+
{ threshold: Qr }
|
|
952
954
|
);
|
|
953
955
|
return m.current && P.observe(m.current), () => {
|
|
954
956
|
P.disconnect(), o && o(n, -1);
|
|
@@ -976,10 +978,10 @@ const Jr = (e) => {
|
|
|
976
978
|
},
|
|
977
979
|
className: Xe["rp-page"],
|
|
978
980
|
children: [
|
|
979
|
-
/* @__PURE__ */ s(
|
|
981
|
+
/* @__PURE__ */ s(Vr, { onLoading: C, onLoaded: S, pageNumber: n }),
|
|
980
982
|
f && /* @__PURE__ */ s("div", { className: Xe["rp-loader-wrapper"], children: /* @__PURE__ */ s(mt, {}) }),
|
|
981
|
-
l && /* @__PURE__ */ s(
|
|
982
|
-
/* @__PURE__ */ s(
|
|
983
|
+
l && /* @__PURE__ */ s(Ur, { pageNumber: n }),
|
|
984
|
+
/* @__PURE__ */ s(Yr, { pageNumber: n })
|
|
983
985
|
]
|
|
984
986
|
}
|
|
985
987
|
)
|
|
@@ -1006,25 +1008,25 @@ function ut(e, t) {
|
|
|
1006
1008
|
return n.__proto__ = r, n;
|
|
1007
1009
|
}, ut(e, t);
|
|
1008
1010
|
}
|
|
1009
|
-
function
|
|
1011
|
+
function eo(e, t) {
|
|
1010
1012
|
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ut(e, t);
|
|
1011
1013
|
}
|
|
1012
1014
|
var Et = Number.isNaN || function(t) {
|
|
1013
1015
|
return typeof t == "number" && t !== t;
|
|
1014
1016
|
};
|
|
1015
|
-
function
|
|
1017
|
+
function to(e, t) {
|
|
1016
1018
|
return !!(e === t || Et(e) && Et(t));
|
|
1017
1019
|
}
|
|
1018
|
-
function
|
|
1020
|
+
function no(e, t) {
|
|
1019
1021
|
if (e.length !== t.length)
|
|
1020
1022
|
return !1;
|
|
1021
1023
|
for (var n = 0; n < e.length; n++)
|
|
1022
|
-
if (!
|
|
1024
|
+
if (!to(e[n], t[n]))
|
|
1023
1025
|
return !1;
|
|
1024
1026
|
return !0;
|
|
1025
1027
|
}
|
|
1026
1028
|
function Ye(e, t) {
|
|
1027
|
-
t === void 0 && (t =
|
|
1029
|
+
t === void 0 && (t = no);
|
|
1028
1030
|
var n, r = [], o, a = !1;
|
|
1029
1031
|
function c() {
|
|
1030
1032
|
for (var i = [], l = 0; l < arguments.length; l++)
|
|
@@ -1045,7 +1047,7 @@ function Ot(e, t) {
|
|
|
1045
1047
|
}
|
|
1046
1048
|
return n;
|
|
1047
1049
|
}
|
|
1048
|
-
var
|
|
1050
|
+
var ro = typeof performance == "object" && typeof performance.now == "function", Dt = ro ? function() {
|
|
1049
1051
|
return performance.now();
|
|
1050
1052
|
} : function() {
|
|
1051
1053
|
return Date.now();
|
|
@@ -1053,7 +1055,7 @@ var no = typeof performance == "object" && typeof performance.now == "function",
|
|
|
1053
1055
|
function At(e) {
|
|
1054
1056
|
cancelAnimationFrame(e.id);
|
|
1055
1057
|
}
|
|
1056
|
-
function
|
|
1058
|
+
function oo(e, t) {
|
|
1057
1059
|
var n = Dt();
|
|
1058
1060
|
function r() {
|
|
1059
1061
|
Dt() - n >= t ? e.call(null) : o.id = requestAnimationFrame(r);
|
|
@@ -1064,7 +1066,7 @@ function ro(e, t) {
|
|
|
1064
1066
|
return o;
|
|
1065
1067
|
}
|
|
1066
1068
|
var Qe = -1;
|
|
1067
|
-
function
|
|
1069
|
+
function ao(e) {
|
|
1068
1070
|
if (e === void 0 && (e = !1), Qe === -1 || e) {
|
|
1069
1071
|
var t = document.createElement("div"), n = t.style;
|
|
1070
1072
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), Qe = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
|
|
@@ -1081,17 +1083,17 @@ function zt(e) {
|
|
|
1081
1083
|
}
|
|
1082
1084
|
return Ce;
|
|
1083
1085
|
}
|
|
1084
|
-
var
|
|
1086
|
+
var so = 150, io = function(t) {
|
|
1085
1087
|
var n = t.columnIndex;
|
|
1086
1088
|
t.data;
|
|
1087
1089
|
var r = t.rowIndex;
|
|
1088
1090
|
return r + ":" + n;
|
|
1089
1091
|
}, Oe = null, De = null, Ae = null;
|
|
1090
1092
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Oe = /* @__PURE__ */ new WeakSet(), De = /* @__PURE__ */ new WeakSet(), Ae = /* @__PURE__ */ new WeakSet());
|
|
1091
|
-
function
|
|
1093
|
+
function co(e) {
|
|
1092
1094
|
var t, n = e.getColumnOffset, r = e.getColumnStartIndexForOffset, o = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, c = e.getEstimatedTotalHeight, i = e.getEstimatedTotalWidth, l = e.getOffsetForColumnAndAlignment, p = e.getOffsetForRowAndAlignment, h = e.getRowHeight, f = e.getRowOffset, u = e.getRowStartIndexForOffset, m = e.getRowStopIndexForStartIndex, g = e.initInstanceProps, _ = e.shouldResetStyleCacheOnItemSizeChange, v = e.validateProps;
|
|
1093
1095
|
return t = /* @__PURE__ */ function(C) {
|
|
1094
|
-
|
|
1096
|
+
eo(S, C);
|
|
1095
1097
|
function S(R) {
|
|
1096
1098
|
var d;
|
|
1097
1099
|
return d = C.call(this, R) || this, d._instanceProps = g(d.props, Lt(d)), d._resetIsScrollingTimeoutId = null, d._outerRef = void 0, d.state = {
|
|
@@ -1169,7 +1171,7 @@ function io(e) {
|
|
|
1169
1171
|
var w = d.props.outerRef;
|
|
1170
1172
|
d._outerRef = b, typeof w == "function" ? w(b) : w != null && typeof w == "object" && w.hasOwnProperty("current") && (w.current = b);
|
|
1171
1173
|
}, d._resetIsScrollingDebounced = function() {
|
|
1172
|
-
d._resetIsScrollingTimeoutId !== null && At(d._resetIsScrollingTimeoutId), d._resetIsScrollingTimeoutId =
|
|
1174
|
+
d._resetIsScrollingTimeoutId !== null && At(d._resetIsScrollingTimeoutId), d._resetIsScrollingTimeoutId = oo(d._resetIsScrolling, so);
|
|
1173
1175
|
}, d._resetIsScrolling = function() {
|
|
1174
1176
|
d._resetIsScrollingTimeoutId = null, d.setState({
|
|
1175
1177
|
isScrolling: !1
|
|
@@ -1179,7 +1181,7 @@ function io(e) {
|
|
|
1179
1181
|
}, d;
|
|
1180
1182
|
}
|
|
1181
1183
|
S.getDerivedStateFromProps = function(d, b) {
|
|
1182
|
-
return
|
|
1184
|
+
return lo(d, b), v(d), null;
|
|
1183
1185
|
};
|
|
1184
1186
|
var P = S.prototype;
|
|
1185
1187
|
return P.scrollTo = function(d) {
|
|
@@ -1194,7 +1196,7 @@ function io(e) {
|
|
|
1194
1196
|
};
|
|
1195
1197
|
}, this._resetIsScrollingDebounced);
|
|
1196
1198
|
}, P.scrollToItem = function(d) {
|
|
1197
|
-
var b = d.align, w = b === void 0 ? "auto" : b, T = d.columnIndex, D = d.rowIndex, I = this.props, y = I.columnCount, E = I.height, x = I.rowCount, N = I.width, L = this.state, k = L.scrollLeft, G = L.scrollTop, q =
|
|
1199
|
+
var b = d.align, w = b === void 0 ? "auto" : b, T = d.columnIndex, D = d.rowIndex, I = this.props, y = I.columnCount, E = I.height, x = I.rowCount, N = I.width, L = this.state, k = L.scrollLeft, G = L.scrollTop, q = ao();
|
|
1198
1200
|
T !== void 0 && (T = Math.max(0, Math.min(T, y - 1))), D !== void 0 && (D = Math.max(0, Math.min(D, x - 1)));
|
|
1199
1201
|
var Z = c(this.props, this._instanceProps), U = i(this.props, this._instanceProps), B = U > N ? q : 0, re = Z > E ? q : 0;
|
|
1200
1202
|
this.scrollTo({
|
|
@@ -1233,7 +1235,7 @@ function io(e) {
|
|
|
1233
1235
|
}, P.componentWillUnmount = function() {
|
|
1234
1236
|
this._resetIsScrollingTimeoutId !== null && At(this._resetIsScrollingTimeoutId);
|
|
1235
1237
|
}, P.render = function() {
|
|
1236
|
-
var d = this.props, b = d.children, w = d.className, T = d.columnCount, D = d.direction, I = d.height, y = d.innerRef, E = d.innerElementType, x = d.innerTagName, N = d.itemData, L = d.itemKey, k = L === void 0 ?
|
|
1238
|
+
var d = this.props, b = d.children, w = d.className, T = d.columnCount, D = d.direction, I = d.height, y = d.innerRef, E = d.innerElementType, x = d.innerTagName, N = d.itemData, L = d.itemKey, k = L === void 0 ? io : L, G = d.outerElementType, q = d.outerTagName, Z = d.rowCount, U = d.style, B = d.useIsScrolling, re = d.width, pe = this.state.isScrolling, K = this._getHorizontalRangeToRender(), Y = K[0], z = K[1], H = this._getVerticalRangeToRender(), j = H[0], se = H[1], Se = [];
|
|
1237
1239
|
if (T > 0 && Z)
|
|
1238
1240
|
for (var me = j; me <= se; me++)
|
|
1239
1241
|
for (var fe = Y; fe <= z; fe++)
|
|
@@ -1301,7 +1303,7 @@ function io(e) {
|
|
|
1301
1303
|
useIsScrolling: !1
|
|
1302
1304
|
}, t;
|
|
1303
1305
|
}
|
|
1304
|
-
var
|
|
1306
|
+
var lo = function(t, n) {
|
|
1305
1307
|
var r = t.children, o = t.direction, a = t.height, c = t.innerTagName, i = t.outerTagName, l = t.overscanColumnsCount, p = t.overscanCount, h = t.overscanRowsCount, f = t.width, u = n.instance;
|
|
1306
1308
|
if (process.env.NODE_ENV !== "production") {
|
|
1307
1309
|
if (typeof p == "number" && Oe && !Oe.has(u) && (Oe.add(u), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof l == "number" || typeof h == "number") && De && !De.has(u) && (De.add(u), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || i != null) && Ae && !Ae.has(u) && (Ae.add(u), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
|
|
@@ -1356,7 +1358,7 @@ var co = function(t, n) {
|
|
|
1356
1358
|
var a, c;
|
|
1357
1359
|
t === "column" ? (a = r.columnMetadataMap, c = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, c = r.lastMeasuredRowIndex);
|
|
1358
1360
|
var i = c > 0 ? a[c].offset : 0;
|
|
1359
|
-
return i >= o ? fn(t, n, r, c, 0, o) :
|
|
1361
|
+
return i >= o ? fn(t, n, r, c, 0, o) : uo(t, n, r, Math.max(0, c), o);
|
|
1360
1362
|
}, fn = function(t, n, r, o, a, c) {
|
|
1361
1363
|
for (; a <= o; ) {
|
|
1362
1364
|
var i = a + Math.floor((o - a) / 2), l = ue(t, n, i, r).offset;
|
|
@@ -1365,7 +1367,7 @@ var co = function(t, n) {
|
|
|
1365
1367
|
l < c ? a = i + 1 : l > c && (o = i - 1);
|
|
1366
1368
|
}
|
|
1367
1369
|
return a > 0 ? a - 1 : 0;
|
|
1368
|
-
},
|
|
1370
|
+
}, uo = function(t, n, r, o, a) {
|
|
1369
1371
|
for (var c = t === "column" ? n.columnCount : n.rowCount, i = 1; o < c && ue(t, n, o, r).offset < a; )
|
|
1370
1372
|
o += i, i *= 2;
|
|
1371
1373
|
return fn(t, n, r, Math.min(o, c - 1), Math.floor(o / 2), a);
|
|
@@ -1382,7 +1384,7 @@ var co = function(t, n) {
|
|
|
1382
1384
|
default:
|
|
1383
1385
|
return a >= u && a <= f ? a : u > f || a < u ? u : f;
|
|
1384
1386
|
}
|
|
1385
|
-
},
|
|
1387
|
+
}, po = /* @__PURE__ */ co({
|
|
1386
1388
|
getColumnOffset: function(t, n, r) {
|
|
1387
1389
|
return ue("column", t, n, r).offset;
|
|
1388
1390
|
},
|
|
@@ -1464,12 +1466,12 @@ function Ht(e, t) {
|
|
|
1464
1466
|
return !0;
|
|
1465
1467
|
return !1;
|
|
1466
1468
|
}
|
|
1467
|
-
var
|
|
1468
|
-
function
|
|
1469
|
-
var n = e.style, r = Ot(e,
|
|
1469
|
+
var ho = ["style"], mo = ["style"];
|
|
1470
|
+
function fo(e, t) {
|
|
1471
|
+
var n = e.style, r = Ot(e, ho), o = t.style, a = Ot(t, mo);
|
|
1470
1472
|
return !Ht(n, o) && !Ht(r, a);
|
|
1471
1473
|
}
|
|
1472
|
-
const
|
|
1474
|
+
const go = () => {
|
|
1473
1475
|
const { viewMode: e } = qe(), { scrollMode: t } = Te(), { setColumnCount: n } = Bt(), { virtualScrollableElementRef: r } = Ze(), o = ht(), a = M(
|
|
1474
1476
|
(m) => o.widths[m] || 0,
|
|
1475
1477
|
[o]
|
|
@@ -1507,7 +1509,7 @@ tt == null || Vt == null ? (dt = et, pt = function(t) {
|
|
|
1507
1509
|
}, $t);
|
|
1508
1510
|
return [n, r];
|
|
1509
1511
|
});
|
|
1510
|
-
function
|
|
1512
|
+
function vo(e) {
|
|
1511
1513
|
let t, n, r, o, a, c, i;
|
|
1512
1514
|
const l = typeof document < "u" && document.attachEvent;
|
|
1513
1515
|
if (!l) {
|
|
@@ -1579,7 +1581,7 @@ function go(e) {
|
|
|
1579
1581
|
}
|
|
1580
1582
|
};
|
|
1581
1583
|
}
|
|
1582
|
-
class
|
|
1584
|
+
class _o extends Wn {
|
|
1583
1585
|
constructor(...t) {
|
|
1584
1586
|
super(...t), this.state = {
|
|
1585
1587
|
height: this.props.defaultHeight || 0,
|
|
@@ -1620,7 +1622,7 @@ class vo extends Wn {
|
|
|
1620
1622
|
const r = n.ownerDocument.defaultView.ResizeObserver;
|
|
1621
1623
|
r != null ? (this._resizeObserver = new r(() => {
|
|
1622
1624
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1623
|
-
}), this._resizeObserver.observe(n)) : (this._detectElementResize =
|
|
1625
|
+
}), this._resizeObserver.observe(n)) : (this._detectElementResize = vo(t), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1624
1626
|
}
|
|
1625
1627
|
}
|
|
1626
1628
|
componentWillUnmount() {
|
|
@@ -1658,7 +1660,7 @@ class vo extends Wn {
|
|
|
1658
1660
|
}, !S && t(C));
|
|
1659
1661
|
}
|
|
1660
1662
|
}
|
|
1661
|
-
const
|
|
1663
|
+
const wo = ({ widths: e, heights: t }) => {
|
|
1662
1664
|
const { focusedPage: n, totalPages: r } = oe(), o = A(() => {
|
|
1663
1665
|
const i = [], l = Math.ceil(n / 2) * 2 - 1;
|
|
1664
1666
|
if (i.push(l), l + 1 < r) {
|
|
@@ -1682,7 +1684,7 @@ const _o = ({ widths: e, heights: t }) => {
|
|
|
1682
1684
|
}
|
|
1683
1685
|
], [e, t, o]), c = A(() => a.reduce((i, l) => i + Number(l.width || 0), 0), [a]);
|
|
1684
1686
|
return /* @__PURE__ */ s("div", { style: { width: c, position: "relative" }, children: o.map((i, l) => /* @__PURE__ */ s(bt, { style: a[l], pageNumber: i }, i)) });
|
|
1685
|
-
},
|
|
1687
|
+
}, bo = ({ widths: e, heights: t }) => {
|
|
1686
1688
|
const { focusedPage: n } = oe(), r = A(() => ({
|
|
1687
1689
|
position: "absolute",
|
|
1688
1690
|
width: e(n - 1),
|
|
@@ -1698,7 +1700,7 @@ const _o = ({ widths: e, heights: t }) => {
|
|
|
1698
1700
|
children: /* @__PURE__ */ s(bt, { style: r, pageNumber: n }, n)
|
|
1699
1701
|
}
|
|
1700
1702
|
);
|
|
1701
|
-
},
|
|
1703
|
+
}, Co = Hn(({ columnIndex: e, rowIndex: t, data: n, style: r }) => {
|
|
1702
1704
|
const o = A(() => e + 1 + t * n.columnCount, [e, t, n]);
|
|
1703
1705
|
return /* @__PURE__ */ s(
|
|
1704
1706
|
bt,
|
|
@@ -1709,7 +1711,7 @@ const _o = ({ widths: e, heights: t }) => {
|
|
|
1709
1711
|
},
|
|
1710
1712
|
o
|
|
1711
1713
|
);
|
|
1712
|
-
},
|
|
1714
|
+
}, fo), $s = () => {
|
|
1713
1715
|
const { getContainer: e, container: t } = cr(), { scrollToPage: n } = nn(), {
|
|
1714
1716
|
virtualScrollRef: r,
|
|
1715
1717
|
getVirtualScrollRef: o,
|
|
@@ -1731,10 +1733,12 @@ const _o = ({ widths: e, heights: t }) => {
|
|
|
1731
1733
|
columnWidth: w,
|
|
1732
1734
|
estimatedColumnWidth: T,
|
|
1733
1735
|
estimatedRowHeight: D
|
|
1734
|
-
} =
|
|
1736
|
+
} = go(), [I, y] = W({}), { isScrolling: E } = Kt(), x = $(), N = $({
|
|
1735
1737
|
scrollTop: 0,
|
|
1736
1738
|
scrollLeft: 0
|
|
1737
|
-
})
|
|
1739
|
+
});
|
|
1740
|
+
dr(t);
|
|
1741
|
+
const { isPressed: L } = lr(), { selectionMode: k } = Vn(), { initializeGrabScroll: G, scrollBehavior: q } = ur({
|
|
1738
1742
|
isPressed: L
|
|
1739
1743
|
}), Z = A(() => k === $n.HAND, [k]), U = M((z, H) => {
|
|
1740
1744
|
y((j) => ({ ...j, [z]: Math.round(H * 100) }));
|
|
@@ -1821,16 +1825,16 @@ const _o = ({ widths: e, heights: t }) => {
|
|
|
1821
1825
|
},
|
|
1822
1826
|
[Z, G, le]
|
|
1823
1827
|
);
|
|
1824
|
-
return /* @__PURE__ */ s("div", { ref: e, tabIndex: -1, className: K, children: /* @__PURE__ */ s(
|
|
1828
|
+
return /* @__PURE__ */ s("div", { ref: e, tabIndex: -1, className: K, children: /* @__PURE__ */ s(_o, { children: ({ width: z, height: H }) => /* @__PURE__ */ s("div", { "data-rp": "pages", ref: Y, style: { width: z, height: H, scrollBehavior: q }, children: m === J.PAGE_SCROLLING ? /* @__PURE__ */ s(
|
|
1825
1829
|
"div",
|
|
1826
1830
|
{
|
|
1827
1831
|
ref: a,
|
|
1828
1832
|
style: { width: z, height: H },
|
|
1829
1833
|
className: Q(le["rp-pages"], le["rp-page-scrolling-wrapper"]),
|
|
1830
|
-
children: g === Fe.DUAL_PAGE ? /* @__PURE__ */ s(
|
|
1834
|
+
children: g === Fe.DUAL_PAGE ? /* @__PURE__ */ s(wo, { widths: w, heights: d }) : /* @__PURE__ */ s(bo, { widths: w, heights: d })
|
|
1831
1835
|
}
|
|
1832
1836
|
) : T ? /* @__PURE__ */ s(
|
|
1833
|
-
|
|
1837
|
+
po,
|
|
1834
1838
|
{
|
|
1835
1839
|
ref: o,
|
|
1836
1840
|
itemData: B,
|
|
@@ -1850,7 +1854,7 @@ const _o = ({ widths: e, heights: t }) => {
|
|
|
1850
1854
|
m === J.HORIZONTAL_SCROLLING ? le["rp-pages-horizontal-scroll"] : ""
|
|
1851
1855
|
),
|
|
1852
1856
|
style: { scrollBehavior: q },
|
|
1853
|
-
children:
|
|
1857
|
+
children: Co
|
|
1854
1858
|
}
|
|
1855
1859
|
) : null }) }) });
|
|
1856
1860
|
}, ye = {
|
|
@@ -1863,13 +1867,13 @@ const _o = ({ widths: e, heights: t }) => {
|
|
|
1863
1867
|
"rp-paginate": "_rp-paginate_1vu6o_1",
|
|
1864
1868
|
"rp-page-input": "_rp-page-input_1vu6o_6",
|
|
1865
1869
|
"rp-total-page": "_rp-total-page_1vu6o_12"
|
|
1866
|
-
},
|
|
1870
|
+
}, Po = () => {
|
|
1867
1871
|
const { prevIcon: e } = ce();
|
|
1868
1872
|
return e || /* @__PURE__ */ s(Me, {});
|
|
1869
|
-
},
|
|
1873
|
+
}, To = () => {
|
|
1870
1874
|
const { nextIcon: e } = ce();
|
|
1871
1875
|
return e || /* @__PURE__ */ s(Me, { style: { transform: "rotate(180deg" } });
|
|
1872
|
-
},
|
|
1876
|
+
}, So = () => {
|
|
1873
1877
|
const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: a } = oe(), [c, i] = W(e.toString()), { pageNavigationTool: l = !0 } = de(), { isSmallScreen: p } = _e();
|
|
1874
1878
|
F(() => {
|
|
1875
1879
|
i(e.toString());
|
|
@@ -1899,7 +1903,7 @@ const _o = ({ widths: e, heights: t }) => {
|
|
|
1899
1903
|
changePage: n
|
|
1900
1904
|
}
|
|
1901
1905
|
) : l ? /* @__PURE__ */ O("div", { className: nt["rp-paginate"], children: [
|
|
1902
|
-
!p && /* @__PURE__ */ s(ee, { content: "Previous page", children: /* @__PURE__ */ s(X, { onClick: o, disabled: e === 1, children: /* @__PURE__ */ s(
|
|
1906
|
+
!p && /* @__PURE__ */ s(ee, { content: "Previous page", children: /* @__PURE__ */ s(X, { onClick: o, disabled: e === 1, children: /* @__PURE__ */ s(Po, {}) }) }),
|
|
1903
1907
|
/* @__PURE__ */ s(
|
|
1904
1908
|
jt,
|
|
1905
1909
|
{
|
|
@@ -1914,10 +1918,10 @@ const _o = ({ widths: e, heights: t }) => {
|
|
|
1914
1918
|
"/",
|
|
1915
1919
|
t
|
|
1916
1920
|
] }),
|
|
1917
|
-
!p && /* @__PURE__ */ s(ee, { content: "Next page", children: /* @__PURE__ */ s(X, { onClick: r, disabled: e === t, children: /* @__PURE__ */ s(
|
|
1921
|
+
!p && /* @__PURE__ */ s(ee, { content: "Next page", children: /* @__PURE__ */ s(X, { onClick: r, disabled: e === t, children: /* @__PURE__ */ s(To, {}) }) })
|
|
1918
1922
|
] }) : null;
|
|
1919
1923
|
};
|
|
1920
|
-
var Ct = "Dialog", [gn,
|
|
1924
|
+
var Ct = "Dialog", [gn, Gs] = Tr(Ct), [yo, ae] = gn(Ct), vn = (e) => {
|
|
1921
1925
|
const {
|
|
1922
1926
|
__scopeDialog: t,
|
|
1923
1927
|
children: n,
|
|
@@ -1925,13 +1929,13 @@ var Ct = "Dialog", [gn, Ws] = Pr(Ct), [So, ae] = gn(Ct), vn = (e) => {
|
|
|
1925
1929
|
defaultOpen: o,
|
|
1926
1930
|
onOpenChange: a,
|
|
1927
1931
|
modal: c = !0
|
|
1928
|
-
} = e, i = V.useRef(null), l = V.useRef(null), [p = !1, h] =
|
|
1932
|
+
} = e, i = V.useRef(null), l = V.useRef(null), [p = !1, h] = yr({
|
|
1929
1933
|
prop: r,
|
|
1930
1934
|
defaultProp: o,
|
|
1931
1935
|
onChange: a
|
|
1932
1936
|
});
|
|
1933
1937
|
return /* @__PURE__ */ s(
|
|
1934
|
-
|
|
1938
|
+
yo,
|
|
1935
1939
|
{
|
|
1936
1940
|
scope: t,
|
|
1937
1941
|
triggerRef: i,
|
|
@@ -1948,7 +1952,7 @@ var Ct = "Dialog", [gn, Ws] = Pr(Ct), [So, ae] = gn(Ct), vn = (e) => {
|
|
|
1948
1952
|
);
|
|
1949
1953
|
};
|
|
1950
1954
|
vn.displayName = Ct;
|
|
1951
|
-
var _n = "DialogTrigger",
|
|
1955
|
+
var _n = "DialogTrigger", Io = V.forwardRef(
|
|
1952
1956
|
(e, t) => {
|
|
1953
1957
|
const { __scopeDialog: n, ...r } = e, o = ae(_n, n), a = gt(t, o.triggerRef);
|
|
1954
1958
|
return /* @__PURE__ */ s(
|
|
@@ -1966,28 +1970,28 @@ var _n = "DialogTrigger", yo = V.forwardRef(
|
|
|
1966
1970
|
);
|
|
1967
1971
|
}
|
|
1968
1972
|
);
|
|
1969
|
-
|
|
1970
|
-
var Pt = "DialogPortal", [
|
|
1973
|
+
Io.displayName = _n;
|
|
1974
|
+
var Pt = "DialogPortal", [xo, wn] = gn(Pt, {
|
|
1971
1975
|
forceMount: void 0
|
|
1972
1976
|
}), bn = (e) => {
|
|
1973
1977
|
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, a = ae(Pt, t);
|
|
1974
|
-
return /* @__PURE__ */ s(
|
|
1978
|
+
return /* @__PURE__ */ s(xo, { scope: t, forceMount: n, children: V.Children.map(r, (c) => /* @__PURE__ */ s(vt, { present: n || a.open, children: /* @__PURE__ */ s(Pr, { asChild: !0, container: o, children: c }) })) });
|
|
1975
1979
|
};
|
|
1976
1980
|
bn.displayName = Pt;
|
|
1977
1981
|
var We = "DialogOverlay", Cn = V.forwardRef(
|
|
1978
1982
|
(e, t) => {
|
|
1979
1983
|
const n = wn(We, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = ae(We, e.__scopeDialog);
|
|
1980
|
-
return a.modal ? /* @__PURE__ */ s(vt, { present: r || a.open, children: /* @__PURE__ */ s(
|
|
1984
|
+
return a.modal ? /* @__PURE__ */ s(vt, { present: r || a.open, children: /* @__PURE__ */ s(Ro, { ...o, ref: t }) }) : null;
|
|
1981
1985
|
}
|
|
1982
1986
|
);
|
|
1983
1987
|
Cn.displayName = We;
|
|
1984
|
-
var
|
|
1988
|
+
var Ro = V.forwardRef(
|
|
1985
1989
|
(e, t) => {
|
|
1986
1990
|
const { __scopeDialog: n, ...r } = e, o = ae(We, n);
|
|
1987
1991
|
return (
|
|
1988
1992
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1989
1993
|
// ie. when `Overlay` and `Content` are siblings
|
|
1990
|
-
/* @__PURE__ */ s(
|
|
1994
|
+
/* @__PURE__ */ s(gr, { as: vr, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ s(
|
|
1991
1995
|
Le.div,
|
|
1992
1996
|
{
|
|
1993
1997
|
"data-state": St(o.open),
|
|
@@ -2001,17 +2005,17 @@ var xo = V.forwardRef(
|
|
|
2001
2005
|
), ve = "DialogContent", Pn = V.forwardRef(
|
|
2002
2006
|
(e, t) => {
|
|
2003
2007
|
const n = wn(ve, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = ae(ve, e.__scopeDialog);
|
|
2004
|
-
return /* @__PURE__ */ s(vt, { present: r || a.open, children: a.modal ? /* @__PURE__ */ s(
|
|
2008
|
+
return /* @__PURE__ */ s(vt, { present: r || a.open, children: a.modal ? /* @__PURE__ */ s(Mo, { ...o, ref: t }) : /* @__PURE__ */ s(No, { ...o, ref: t }) });
|
|
2005
2009
|
}
|
|
2006
2010
|
);
|
|
2007
2011
|
Pn.displayName = ve;
|
|
2008
|
-
var
|
|
2012
|
+
var Mo = V.forwardRef(
|
|
2009
2013
|
(e, t) => {
|
|
2010
2014
|
const n = ae(ve, e.__scopeDialog), r = V.useRef(null), o = gt(t, n.contentRef, r);
|
|
2011
2015
|
return V.useEffect(() => {
|
|
2012
2016
|
const a = r.current;
|
|
2013
2017
|
if (a)
|
|
2014
|
-
return
|
|
2018
|
+
return _r(a);
|
|
2015
2019
|
}, []), /* @__PURE__ */ s(
|
|
2016
2020
|
Tn,
|
|
2017
2021
|
{
|
|
@@ -2034,7 +2038,7 @@ var Ro = V.forwardRef(
|
|
|
2034
2038
|
}
|
|
2035
2039
|
);
|
|
2036
2040
|
}
|
|
2037
|
-
),
|
|
2041
|
+
), No = V.forwardRef(
|
|
2038
2042
|
(e, t) => {
|
|
2039
2043
|
const n = ae(ve, e.__scopeDialog), r = V.useRef(!1), o = V.useRef(!1);
|
|
2040
2044
|
return /* @__PURE__ */ s(
|
|
@@ -2060,9 +2064,9 @@ var Ro = V.forwardRef(
|
|
|
2060
2064
|
), Tn = V.forwardRef(
|
|
2061
2065
|
(e, t) => {
|
|
2062
2066
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...c } = e, i = ae(ve, n), l = V.useRef(null), p = gt(t, l);
|
|
2063
|
-
return
|
|
2067
|
+
return wr(), /* @__PURE__ */ O(ze, { children: [
|
|
2064
2068
|
/* @__PURE__ */ s(
|
|
2065
|
-
|
|
2069
|
+
br,
|
|
2066
2070
|
{
|
|
2067
2071
|
asChild: !0,
|
|
2068
2072
|
loop: !0,
|
|
@@ -2070,7 +2074,7 @@ var Ro = V.forwardRef(
|
|
|
2070
2074
|
onMountAutoFocus: o,
|
|
2071
2075
|
onUnmountAutoFocus: a,
|
|
2072
2076
|
children: /* @__PURE__ */ s(
|
|
2073
|
-
|
|
2077
|
+
Cr,
|
|
2074
2078
|
{
|
|
2075
2079
|
role: "dialog",
|
|
2076
2080
|
id: i.contentId,
|
|
@@ -2085,8 +2089,8 @@ var Ro = V.forwardRef(
|
|
|
2085
2089
|
}
|
|
2086
2090
|
),
|
|
2087
2091
|
/* @__PURE__ */ O(ze, { children: [
|
|
2088
|
-
/* @__PURE__ */ s(
|
|
2089
|
-
/* @__PURE__ */ s(
|
|
2092
|
+
/* @__PURE__ */ s(Eo, { titleId: i.titleId }),
|
|
2093
|
+
/* @__PURE__ */ s(Do, { contentRef: l, descriptionId: i.descriptionId })
|
|
2090
2094
|
] })
|
|
2091
2095
|
] });
|
|
2092
2096
|
}
|
|
@@ -2097,13 +2101,13 @@ var Ro = V.forwardRef(
|
|
|
2097
2101
|
}
|
|
2098
2102
|
);
|
|
2099
2103
|
Sn.displayName = Tt;
|
|
2100
|
-
var yn = "DialogDescription",
|
|
2104
|
+
var yn = "DialogDescription", Lo = V.forwardRef(
|
|
2101
2105
|
(e, t) => {
|
|
2102
2106
|
const { __scopeDialog: n, ...r } = e, o = ae(yn, n);
|
|
2103
2107
|
return /* @__PURE__ */ s(Le.p, { id: o.descriptionId, ...r, ref: t });
|
|
2104
2108
|
}
|
|
2105
2109
|
);
|
|
2106
|
-
|
|
2110
|
+
Lo.displayName = yn;
|
|
2107
2111
|
var In = "DialogClose", xn = V.forwardRef(
|
|
2108
2112
|
(e, t) => {
|
|
2109
2113
|
const { __scopeDialog: n, ...r } = e, o = ae(In, n);
|
|
@@ -2122,11 +2126,11 @@ xn.displayName = In;
|
|
|
2122
2126
|
function St(e) {
|
|
2123
2127
|
return e ? "open" : "closed";
|
|
2124
2128
|
}
|
|
2125
|
-
var Rn = "DialogTitleWarning", [
|
|
2129
|
+
var Rn = "DialogTitleWarning", [Vs, Mn] = Sr(Rn, {
|
|
2126
2130
|
contentName: ve,
|
|
2127
2131
|
titleName: Tt,
|
|
2128
2132
|
docsSlug: "dialog"
|
|
2129
|
-
}),
|
|
2133
|
+
}), Eo = ({ titleId: e }) => {
|
|
2130
2134
|
const t = Mn(Rn), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2131
2135
|
|
|
2132
2136
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
@@ -2135,14 +2139,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2135
2139
|
return V.useEffect(() => {
|
|
2136
2140
|
e && (document.getElementById(e) || console.error(n));
|
|
2137
2141
|
}, [n, e]), null;
|
|
2138
|
-
},
|
|
2139
|
-
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Mn(
|
|
2142
|
+
}, Oo = "DialogDescriptionWarning", Do = ({ contentRef: e, descriptionId: t }) => {
|
|
2143
|
+
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Mn(Oo).contentName}}.`;
|
|
2140
2144
|
return V.useEffect(() => {
|
|
2141
2145
|
var a;
|
|
2142
2146
|
const o = (a = e.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2143
2147
|
t && o && (document.getElementById(t) || console.warn(r));
|
|
2144
2148
|
}, [r, e, t]), null;
|
|
2145
|
-
},
|
|
2149
|
+
}, Ao = vn, zo = bn, Fo = Cn, ko = Pn, Wo = Sn, Ho = xn;
|
|
2146
2150
|
const ge = {
|
|
2147
2151
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2148
2152
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2151,8 +2155,8 @@ const ge = {
|
|
|
2151
2155
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2152
2156
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2153
2157
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2154
|
-
},
|
|
2155
|
-
const { pdfProperties: e } = ne(), { container: t } = Ne(), { activeDocumentProperties: n, setActiveDocumentProperties: r } =
|
|
2158
|
+
}, $o = () => {
|
|
2159
|
+
const { pdfProperties: e } = ne(), { container: t } = Ne(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = xr(), o = A(() => {
|
|
2156
2160
|
if (!e)
|
|
2157
2161
|
return [];
|
|
2158
2162
|
const {
|
|
@@ -2192,17 +2196,17 @@ const ge = {
|
|
|
2192
2196
|
{ label: "Page count", value: v }
|
|
2193
2197
|
];
|
|
2194
2198
|
}, [e]);
|
|
2195
|
-
return /* @__PURE__ */ s(
|
|
2196
|
-
/* @__PURE__ */ s(
|
|
2197
|
-
/* @__PURE__ */ O(
|
|
2198
|
-
/* @__PURE__ */ s(
|
|
2199
|
-
/* @__PURE__ */ s("div", { className: ge["rp-document-properties"], children: o.map((a, c) => /* @__PURE__ */ s("div", { children: a.separate ? /* @__PURE__ */ s("div", { className: ge["rp-properties-divider"] }) : /* @__PURE__ */ s(
|
|
2200
|
-
/* @__PURE__ */ s(
|
|
2199
|
+
return /* @__PURE__ */ s(Ao, { open: n, onOpenChange: r, children: /* @__PURE__ */ s(zo, { container: t, children: /* @__PURE__ */ O("div", { className: ge["rp-dialog-wrapper"], children: [
|
|
2200
|
+
/* @__PURE__ */ s(Fo, { className: ge["rp-dialog-overlay"] }),
|
|
2201
|
+
/* @__PURE__ */ O(ko, { className: ge["rp-document-dialog"], children: [
|
|
2202
|
+
/* @__PURE__ */ s(Wo, { className: ge["rp-dialog-title"], children: "Document Properties" }),
|
|
2203
|
+
/* @__PURE__ */ s("div", { className: ge["rp-document-properties"], children: o.map((a, c) => /* @__PURE__ */ s("div", { children: a.separate ? /* @__PURE__ */ s("div", { className: ge["rp-properties-divider"] }) : /* @__PURE__ */ s(Ir, { label: a.label, value: a.value }) }, c)) }),
|
|
2204
|
+
/* @__PURE__ */ s(Ho, { asChild: !0, className: ge["rp-dialog-close"], children: /* @__PURE__ */ s(Qt, {}) })
|
|
2201
2205
|
] })
|
|
2202
2206
|
] }) }) });
|
|
2203
|
-
},
|
|
2207
|
+
}, Go = {
|
|
2204
2208
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2205
|
-
},
|
|
2209
|
+
}, Vo = () => {
|
|
2206
2210
|
const { filename: e, pdfSrc: t } = ne();
|
|
2207
2211
|
return { download: () => {
|
|
2208
2212
|
if (!e)
|
|
@@ -2212,22 +2216,22 @@ const ge = {
|
|
|
2212
2216
|
} };
|
|
2213
2217
|
}, Nn = () => {
|
|
2214
2218
|
const { downloadIcon: e } = ce();
|
|
2215
|
-
return e || /* @__PURE__ */ s(
|
|
2216
|
-
}, Ln = ({ children: e, className: t }) => /* @__PURE__ */ s(ee, { className: t, content: "Download file", children: e }),
|
|
2219
|
+
return e || /* @__PURE__ */ s(Er, {});
|
|
2220
|
+
}, Ln = ({ children: e, className: t }) => /* @__PURE__ */ s(ee, { className: t, content: "Download file", children: e }), Uo = ({ download: e }) => /* @__PURE__ */ s(Ln, { children: /* @__PURE__ */ s(X, { onClick: e, children: /* @__PURE__ */ s(Nn, {}) }) }), qo = ({ download: e }) => /* @__PURE__ */ s(he, { onClick: e, children: /* @__PURE__ */ O(Ln, { className: "rp-menu-item", children: [
|
|
2217
2221
|
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Nn, {}) }),
|
|
2218
2222
|
"Download file"
|
|
2219
2223
|
] }) }), En = () => {
|
|
2220
|
-
const { download: e } =
|
|
2221
|
-
return t ? n ? /* @__PURE__ */ s(
|
|
2224
|
+
const { download: e } = Vo(), { downloadTool: t = !0 } = de(), { isSmallScreen: n } = _e();
|
|
2225
|
+
return t ? n ? /* @__PURE__ */ s(qo, { download: e }) : typeof t == "function" ? /* @__PURE__ */ s(t, { download: e }) : t ? /* @__PURE__ */ s(Uo, { download: e }) : null : null;
|
|
2222
2226
|
}, On = () => {
|
|
2223
2227
|
const { printIcon: e } = ce();
|
|
2224
|
-
return e || /* @__PURE__ */ s(
|
|
2225
|
-
}, Dn = ({ children: e, className: t }) => /* @__PURE__ */ s(ee, { className: t, content: "Print", children: e }),
|
|
2228
|
+
return e || /* @__PURE__ */ s(Or, {});
|
|
2229
|
+
}, Dn = ({ children: e, className: t }) => /* @__PURE__ */ s(ee, { className: t, content: "Print", children: e }), Zo = ({ print: e }) => /* @__PURE__ */ s(Dn, { children: /* @__PURE__ */ s(X, { onClick: e, children: /* @__PURE__ */ s(On, {}) }) }), jo = ({ print: e }) => /* @__PURE__ */ s(he, { onClick: e, children: /* @__PURE__ */ O(Dn, { className: "rp-menu-item", children: [
|
|
2226
2230
|
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(On, {}) }),
|
|
2227
2231
|
"Print"
|
|
2228
2232
|
] }) }), An = () => {
|
|
2229
2233
|
const { print: e, cancel: t, setOnProgress: n, setOnComplete: r, setOnError: o, progress: a } = wt(), { printTool: c = !0 } = de(), { isSmallScreen: i } = _e();
|
|
2230
|
-
return c ? i ? /* @__PURE__ */ s(
|
|
2234
|
+
return c ? i ? /* @__PURE__ */ s(jo, { print: e }) : typeof c == "function" ? /* @__PURE__ */ s(
|
|
2231
2235
|
c,
|
|
2232
2236
|
{
|
|
2233
2237
|
print: e,
|
|
@@ -2237,16 +2241,16 @@ const ge = {
|
|
|
2237
2241
|
setOnComplete: r,
|
|
2238
2242
|
progress: a
|
|
2239
2243
|
}
|
|
2240
|
-
) : c ? /* @__PURE__ */ s(
|
|
2241
|
-
},
|
|
2244
|
+
) : c ? /* @__PURE__ */ s(Zo, { print: e }) : null : null;
|
|
2245
|
+
}, Bo = {
|
|
2242
2246
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2243
|
-
}, Bo = () => {
|
|
2244
|
-
const { goToFirstPageIcon: e } = ce();
|
|
2245
|
-
return e || /* @__PURE__ */ s(tn, { className: jo["rp-go-to-Top"] });
|
|
2246
2247
|
}, Ko = () => {
|
|
2248
|
+
const { goToFirstPageIcon: e } = ce();
|
|
2249
|
+
return e || /* @__PURE__ */ s(tn, { className: Bo["rp-go-to-Top"] });
|
|
2250
|
+
}, Xo = () => {
|
|
2247
2251
|
const { goToLastPageIcon: e } = ce();
|
|
2248
2252
|
return e || /* @__PURE__ */ s(tn, {});
|
|
2249
|
-
},
|
|
2253
|
+
}, Jo = () => {
|
|
2250
2254
|
const { goToPage: e, totalPages: t, focusedPage: n } = oe(), { jumpNavigationTool: r = !0 } = de(), o = A(() => n === 1, [n]), a = A(() => n === t, [n, t]), c = M(() => {
|
|
2251
2255
|
e(1);
|
|
2252
2256
|
}, [e]), i = M(() => {
|
|
@@ -2254,16 +2258,16 @@ const ge = {
|
|
|
2254
2258
|
}, [e, t]);
|
|
2255
2259
|
return r ? /* @__PURE__ */ O(ke, { children: [
|
|
2256
2260
|
/* @__PURE__ */ s(he, { disabled: o, onClick: c, children: /* @__PURE__ */ O(ee, { className: "rp-menu-item", content: "Go to first page", children: [
|
|
2257
|
-
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(
|
|
2261
|
+
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Ko, {}) }),
|
|
2258
2262
|
"First page"
|
|
2259
2263
|
] }) }),
|
|
2260
2264
|
/* @__PURE__ */ s(he, { disabled: a, onClick: i, children: /* @__PURE__ */ O(ee, { className: "rp-menu-item", content: "Go to last page", children: [
|
|
2261
|
-
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(
|
|
2265
|
+
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Xo, {}) }),
|
|
2262
2266
|
"Last page"
|
|
2263
2267
|
] }) }),
|
|
2264
2268
|
/* @__PURE__ */ s(_t, {})
|
|
2265
2269
|
] }) : null;
|
|
2266
|
-
},
|
|
2270
|
+
}, Yo = () => {
|
|
2267
2271
|
const { container: e } = Ne(), { isSmallScreen: t } = _e(), {
|
|
2268
2272
|
openFileTool: n,
|
|
2269
2273
|
downloadTool: r,
|
|
@@ -2288,13 +2292,13 @@ const ge = {
|
|
|
2288
2292
|
i,
|
|
2289
2293
|
l,
|
|
2290
2294
|
t
|
|
2291
|
-
]) ? /* @__PURE__ */ O(
|
|
2295
|
+
]) ? /* @__PURE__ */ O(Rr, { children: [
|
|
2292
2296
|
/* @__PURE__ */ s(
|
|
2293
2297
|
ft,
|
|
2294
2298
|
{
|
|
2295
2299
|
container: e,
|
|
2296
|
-
triggerComponent: /* @__PURE__ */ s("div", { role: "button", children: /* @__PURE__ */ s(ee, { content: "More options", children: /* @__PURE__ */ s(X, { children: /* @__PURE__ */ s(
|
|
2297
|
-
children: /* @__PURE__ */ O("div", { className:
|
|
2300
|
+
triggerComponent: /* @__PURE__ */ s("div", { role: "button", children: /* @__PURE__ */ s(ee, { content: "More options", children: /* @__PURE__ */ s(X, { children: /* @__PURE__ */ s(fr, {}) }) }) }),
|
|
2301
|
+
children: /* @__PURE__ */ O("div", { className: Go["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2298
2302
|
t && /* @__PURE__ */ O(ke, { children: [
|
|
2299
2303
|
/* @__PURE__ */ s(Yt, {}),
|
|
2300
2304
|
/* @__PURE__ */ s(En, {}),
|
|
@@ -2302,27 +2306,27 @@ const ge = {
|
|
|
2302
2306
|
/* @__PURE__ */ s(en, {}),
|
|
2303
2307
|
/* @__PURE__ */ s(_t, {})
|
|
2304
2308
|
] }),
|
|
2305
|
-
/* @__PURE__ */ s(
|
|
2306
|
-
/* @__PURE__ */ s(Mr, {}),
|
|
2307
|
-
/* @__PURE__ */ s(Or, {}),
|
|
2309
|
+
/* @__PURE__ */ s(Jo, {}),
|
|
2308
2310
|
/* @__PURE__ */ s(Nr, {}),
|
|
2309
|
-
/* @__PURE__ */ s(
|
|
2311
|
+
/* @__PURE__ */ s(Dr, {}),
|
|
2312
|
+
/* @__PURE__ */ s(Lr, {}),
|
|
2313
|
+
/* @__PURE__ */ s(Mr, {})
|
|
2310
2314
|
] })
|
|
2311
2315
|
}
|
|
2312
2316
|
),
|
|
2313
|
-
/* @__PURE__ */ s(
|
|
2317
|
+
/* @__PURE__ */ s($o, {})
|
|
2314
2318
|
] }) : null;
|
|
2315
|
-
},
|
|
2319
|
+
}, Qo = () => {
|
|
2316
2320
|
const { isSmallScreen: e } = _e();
|
|
2317
2321
|
return /* @__PURE__ */ O(ze, { children: [
|
|
2318
|
-
/* @__PURE__ */ s(
|
|
2322
|
+
/* @__PURE__ */ s(mr, {}),
|
|
2319
2323
|
!e && /* @__PURE__ */ O(ze, { children: [
|
|
2320
2324
|
/* @__PURE__ */ s(Yt, {}),
|
|
2321
2325
|
/* @__PURE__ */ s(En, {}),
|
|
2322
2326
|
/* @__PURE__ */ s(An, {}),
|
|
2323
2327
|
/* @__PURE__ */ s(en, {})
|
|
2324
2328
|
] }),
|
|
2325
|
-
/* @__PURE__ */ s(
|
|
2329
|
+
/* @__PURE__ */ s(Yo, {})
|
|
2326
2330
|
] });
|
|
2327
2331
|
}, Ie = {
|
|
2328
2332
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_163s9_1",
|
|
@@ -2330,13 +2334,13 @@ const ge = {
|
|
|
2330
2334
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_163s9_11",
|
|
2331
2335
|
"rp-current-zoom": "_rp-current-zoom_163s9_6",
|
|
2332
2336
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_163s9_20"
|
|
2333
|
-
},
|
|
2337
|
+
}, ea = 25, rt = 1e3, ta = [50, 75, 100, 125, 150, 200, 300, 400], na = () => {
|
|
2334
2338
|
const { zoomInIcon: e } = ce();
|
|
2335
|
-
return e || /* @__PURE__ */ s(Dr, {});
|
|
2336
|
-
}, na = () => {
|
|
2337
|
-
const { zoomOutIcon: e } = ce();
|
|
2338
2339
|
return e || /* @__PURE__ */ s(Ar, {});
|
|
2339
2340
|
}, ra = () => {
|
|
2341
|
+
const { zoomOutIcon: e } = ce();
|
|
2342
|
+
return e || /* @__PURE__ */ s(zr, {});
|
|
2343
|
+
}, oa = () => {
|
|
2340
2344
|
const { zoomLevel: e, setZoomLevel: t } = Ue(), { container: n, contentRef: r } = Ne(), { zoomTool: o = !0 } = de(), { focusedPage: a } = oe(), { rotate: c } = Ve(), { pages: i } = ne(), { isSmallScreen: l } = _e(), p = M(() => {
|
|
2341
2345
|
t((v) => {
|
|
2342
2346
|
const C = Math.floor(v / 25) * 25;
|
|
@@ -2347,7 +2351,7 @@ const ge = {
|
|
|
2347
2351
|
const C = Math.ceil(v / 25) * 25;
|
|
2348
2352
|
return Math.min(C - 25, rt);
|
|
2349
2353
|
});
|
|
2350
|
-
}, [t]), f = A(() => e ===
|
|
2354
|
+
}, [t]), f = A(() => e === ea, [e]), u = A(() => e === rt, [e]), m = A(() => {
|
|
2351
2355
|
var v;
|
|
2352
2356
|
return (v = i.get(a)) == null ? void 0 : v.page.getViewport({ scale: 1, rotation: c });
|
|
2353
2357
|
}, [i, a, c]), g = M(
|
|
@@ -2377,7 +2381,7 @@ const ge = {
|
|
|
2377
2381
|
[t, g]
|
|
2378
2382
|
);
|
|
2379
2383
|
return typeof o != "boolean" ? /* @__PURE__ */ s(o, { zoomLevel: e, setZoomLevel: t }) : o ? /* @__PURE__ */ O("div", { className: Ie["rp-zoom-wrapper"], children: [
|
|
2380
|
-
/* @__PURE__ */ s(ee, { content: "Zoom out", children: /* @__PURE__ */ s(X, { disabled: f, onClick: h, children: /* @__PURE__ */ s(
|
|
2384
|
+
/* @__PURE__ */ s(ee, { content: "Zoom out", children: /* @__PURE__ */ s(X, { disabled: f, onClick: h, children: /* @__PURE__ */ s(ra, {}) }) }),
|
|
2381
2385
|
!l && /* @__PURE__ */ s(
|
|
2382
2386
|
ft,
|
|
2383
2387
|
{
|
|
@@ -2398,14 +2402,14 @@ const ge = {
|
|
|
2398
2402
|
/* @__PURE__ */ s(he, { onClick: () => _(we.PAGE_WIDTH), children: "Page width" })
|
|
2399
2403
|
] }),
|
|
2400
2404
|
/* @__PURE__ */ s(_t, {}),
|
|
2401
|
-
/* @__PURE__ */ s(ke, { children:
|
|
2405
|
+
/* @__PURE__ */ s(ke, { children: ta.map((v) => /* @__PURE__ */ O(he, { onClick: () => _(v), children: [
|
|
2402
2406
|
v,
|
|
2403
2407
|
" %"
|
|
2404
2408
|
] }, v)) })
|
|
2405
2409
|
] })
|
|
2406
2410
|
}
|
|
2407
2411
|
),
|
|
2408
|
-
/* @__PURE__ */ s(ee, { content: "Zoom in", children: /* @__PURE__ */ s(X, { disabled: u, onClick: p, children: /* @__PURE__ */ s(
|
|
2412
|
+
/* @__PURE__ */ s(ee, { content: "Zoom in", children: /* @__PURE__ */ s(X, { disabled: u, onClick: p, children: /* @__PURE__ */ s(na, {}) }) })
|
|
2409
2413
|
] }) : null;
|
|
2410
2414
|
}, ie = {
|
|
2411
2415
|
"rp-search-tool-content": "_rp-search-tool-content_1vxow_1",
|
|
@@ -2418,8 +2422,8 @@ const ge = {
|
|
|
2418
2422
|
"rp-search-input": "_rp-search-input_1vxow_49"
|
|
2419
2423
|
}, Ut = () => {
|
|
2420
2424
|
const { searchIcon: e } = ce();
|
|
2421
|
-
return e || /* @__PURE__ */ s(
|
|
2422
|
-
},
|
|
2425
|
+
return e || /* @__PURE__ */ s(Fr, {});
|
|
2426
|
+
}, aa = () => {
|
|
2423
2427
|
const { container: e } = Ne(), [t, n] = W(!1), { pdf: r } = ne(), [o, a] = W(null), {
|
|
2424
2428
|
searchOptions: c,
|
|
2425
2429
|
setSearchOptions: i,
|
|
@@ -2487,7 +2491,7 @@ const ge = {
|
|
|
2487
2491
|
placeholder: "Enter to Search",
|
|
2488
2492
|
className: ie["rp-search-input"],
|
|
2489
2493
|
ref: a,
|
|
2490
|
-
children: !!v && /* @__PURE__ */ s("span", { className: ie["rp-search-tool-input-clear"], onClick: w, children: /* @__PURE__ */ s(
|
|
2494
|
+
children: !!v && /* @__PURE__ */ s("span", { className: ie["rp-search-tool-input-clear"], onClick: w, children: /* @__PURE__ */ s(kr, {}) })
|
|
2491
2495
|
}
|
|
2492
2496
|
),
|
|
2493
2497
|
l ? /* @__PURE__ */ s("span", { children: /* @__PURE__ */ s(mt, {}) }) : /* @__PURE__ */ s("span", { children: T })
|
|
@@ -2511,15 +2515,15 @@ const ge = {
|
|
|
2511
2515
|
] })
|
|
2512
2516
|
}
|
|
2513
2517
|
) : null;
|
|
2514
|
-
},
|
|
2518
|
+
}, sa = "_loading_1snj5_1", Pe = {
|
|
2515
2519
|
"rp-loading-overlay": "_rp-loading-overlay_1snj5_1",
|
|
2516
2520
|
"rp-loading-modal": "_rp-loading-modal_1snj5_14",
|
|
2517
2521
|
"rp-loading-title": "_rp-loading-title_1snj5_27",
|
|
2518
2522
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_1snj5_35",
|
|
2519
2523
|
"rp-loading-progress": "_rp-loading-progress_1snj5_35",
|
|
2520
2524
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_1snj5_52",
|
|
2521
|
-
loading:
|
|
2522
|
-
},
|
|
2525
|
+
loading: sa
|
|
2526
|
+
}, ia = ({ percentage: e }) => {
|
|
2523
2527
|
const { cancel: t } = wt();
|
|
2524
2528
|
return e < 1 ? null : /* @__PURE__ */ s("div", { className: Q(Pe["rp-loading-overlay"]), children: /* @__PURE__ */ O("div", { className: Q(Pe["rp-loading-modal"]), children: [
|
|
2525
2529
|
/* @__PURE__ */ s("div", { className: Q(Pe["rp-loading-title"]), children: "Preparing document..." }),
|
|
@@ -2532,18 +2536,18 @@ const ge = {
|
|
|
2532
2536
|
) }),
|
|
2533
2537
|
/* @__PURE__ */ s("button", { className: Q(Pe["rp-loading-cancel-button"]), onClick: t, children: "Cancel" })
|
|
2534
2538
|
] }) });
|
|
2535
|
-
},
|
|
2539
|
+
}, ca = Ge((e, t) => {
|
|
2536
2540
|
const { showPrintProgress: n } = de(), { progress: r } = wt(), { isSmallScreen: o } = _e(), { percentage: a } = r || {}, c = () => o ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2537
2541
|
return /* @__PURE__ */ O("div", { children: [
|
|
2538
2542
|
/* @__PURE__ */ s("div", { "data-rp": "topBar", ref: t, className: ye["rp-toolbar-content"], children: /* @__PURE__ */ O("div", { className: ye["rp-toolbar-wrapper"], style: c(), children: [
|
|
2539
2543
|
/* @__PURE__ */ O("div", { "data-rp": "topBarLeft", className: ye["rp-toolbar-start"], children: [
|
|
2540
|
-
/* @__PURE__ */ s(
|
|
2541
|
-
/* @__PURE__ */ s(
|
|
2544
|
+
/* @__PURE__ */ s(aa, {}),
|
|
2545
|
+
/* @__PURE__ */ s(So, {})
|
|
2542
2546
|
] }),
|
|
2543
|
-
/* @__PURE__ */ s("div", { "data-rp": "topBarCenter", className: ye["rp-toolbar-middle"], children: /* @__PURE__ */ s(
|
|
2544
|
-
/* @__PURE__ */ s("div", { "data-rp": "topBarRight", className: ye["rp-toolbar-end"], children: /* @__PURE__ */ s(
|
|
2547
|
+
/* @__PURE__ */ s("div", { "data-rp": "topBarCenter", className: ye["rp-toolbar-middle"], children: /* @__PURE__ */ s(oa, {}) }),
|
|
2548
|
+
/* @__PURE__ */ s("div", { "data-rp": "topBarRight", className: ye["rp-toolbar-end"], children: /* @__PURE__ */ s(Qo, {}) })
|
|
2545
2549
|
] }) }),
|
|
2546
|
-
n && a ? /* @__PURE__ */ s(
|
|
2550
|
+
n && a ? /* @__PURE__ */ s(ia, { percentage: a }) : null
|
|
2547
2551
|
] });
|
|
2548
2552
|
}), ot = {
|
|
2549
2553
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_4wlw3_1",
|
|
@@ -2556,7 +2560,7 @@ const ge = {
|
|
|
2556
2560
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
2557
2561
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
2558
2562
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
2559
|
-
},
|
|
2563
|
+
}, la = (e) => {
|
|
2560
2564
|
const { thumbnailSrc: t, pageNumber: n, isFocused: r, viewport: o } = e, { goToPage: a } = oe(), c = A(() => r ? xe["rp-thumbnail-active"] : "", [r]), i = A(() => ({
|
|
2561
2565
|
width: Math.round(o.width),
|
|
2562
2566
|
height: Math.round(o.height)
|
|
@@ -2596,10 +2600,10 @@ const ge = {
|
|
|
2596
2600
|
}, qt = {
|
|
2597
2601
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
2598
2602
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
2599
|
-
},
|
|
2603
|
+
}, ua = 16, da = (e, t) => {
|
|
2600
2604
|
const n = e == null ? void 0 : e.querySelector(`#page-${t}`);
|
|
2601
|
-
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) -
|
|
2602
|
-
},
|
|
2605
|
+
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - ua);
|
|
2606
|
+
}, pa = Ge((e, t) => {
|
|
2603
2607
|
const { show: n } = e, { focusedPage: r, totalPages: o } = oe(), { thumbnailPages: a, addPage: c, thumbnailLength: i, addToPage: l } = sn(), p = $(null), h = $(1);
|
|
2604
2608
|
Zt(t, () => p.current);
|
|
2605
2609
|
const f = A(() => Object.values(a), [a]), u = M(() => {
|
|
@@ -2607,11 +2611,11 @@ const ge = {
|
|
|
2607
2611
|
m <= o && c(m);
|
|
2608
2612
|
}, [c, o, i]);
|
|
2609
2613
|
return F(() => {
|
|
2610
|
-
r > i ? l(r) : n && h.current !== r && (
|
|
2614
|
+
r > i ? l(r) : n && h.current !== r && (da(p.current, r), h.current = r);
|
|
2611
2615
|
}, [r, i, l, n, f]), Qn(p.current, u), /* @__PURE__ */ s("div", { ref: p, className: qt["rp-thumbnails-container"], children: /* @__PURE__ */ s("div", { className: qt["rp-thumbnails"], children: n ? f.map((m, g) => {
|
|
2612
2616
|
var _, v;
|
|
2613
2617
|
return /* @__PURE__ */ s(
|
|
2614
|
-
|
|
2618
|
+
la,
|
|
2615
2619
|
{
|
|
2616
2620
|
isFocused: r === ((_ = m.page) == null ? void 0 : _.pageNumber),
|
|
2617
2621
|
pageNumber: (v = m.page) == null ? void 0 : v.pageNumber,
|
|
@@ -2622,13 +2626,13 @@ const ge = {
|
|
|
2622
2626
|
g
|
|
2623
2627
|
);
|
|
2624
2628
|
}) : null }) });
|
|
2625
|
-
}),
|
|
2629
|
+
}), ha = () => {
|
|
2626
2630
|
const { thumbnailIcon: e } = ce();
|
|
2627
2631
|
return e || /* @__PURE__ */ s(Yn, {});
|
|
2628
|
-
},
|
|
2632
|
+
}, ma = () => {
|
|
2629
2633
|
const { active: e, setActive: t } = sn(), [n, r] = W(200), o = $(null), { thumbnailTool: a } = de(), c = M(() => {
|
|
2630
2634
|
t((l) => !l);
|
|
2631
|
-
}, []), i = A(() => typeof a != "boolean" && a ? /* @__PURE__ */ s(a, { onClick: c, active: e }) : a ? /* @__PURE__ */ s(ee, { content: "Thumbnail", children: /* @__PURE__ */ s(X, { onClick: c, active: e, children: /* @__PURE__ */ s(
|
|
2635
|
+
}, []), i = A(() => typeof a != "boolean" && a ? /* @__PURE__ */ s(a, { onClick: c, active: e }) : a ? /* @__PURE__ */ s(ee, { content: "Thumbnail", children: /* @__PURE__ */ s(X, { onClick: c, active: e, children: /* @__PURE__ */ s(ha, {}) }) }) : null, [a, e, c]);
|
|
2632
2636
|
return /* @__PURE__ */ O(
|
|
2633
2637
|
"div",
|
|
2634
2638
|
{
|
|
@@ -2638,13 +2642,13 @@ const ge = {
|
|
|
2638
2642
|
children: [
|
|
2639
2643
|
/* @__PURE__ */ s("div", { className: ot["rp-sidebar-content"], children: i }),
|
|
2640
2644
|
/* @__PURE__ */ O("div", { "data-rp": "thumbnailSidebar", hidden: !e, className: ot["rp-thumbnails-wrapper"], children: [
|
|
2641
|
-
/* @__PURE__ */ s(
|
|
2645
|
+
/* @__PURE__ */ s(pa, { show: e, ref: o }),
|
|
2642
2646
|
/* @__PURE__ */ s(er, { onWidthChange: r, thumbnailRef: o })
|
|
2643
2647
|
] })
|
|
2644
2648
|
]
|
|
2645
2649
|
}
|
|
2646
2650
|
);
|
|
2647
|
-
},
|
|
2651
|
+
}, Us = Ge((e, t) => {
|
|
2648
2652
|
const { children: n, slots: r, icons: o, style: a, className: c, onLoaded: i, cleanupOnLoaded: l } = e, [p, h] = W(null), { setContainer: f, setContentRef: u } = Ne();
|
|
2649
2653
|
return F(() => (i && i(), () => {
|
|
2650
2654
|
l && l();
|
|
@@ -2657,9 +2661,9 @@ const ge = {
|
|
|
2657
2661
|
className: c,
|
|
2658
2662
|
children: /* @__PURE__ */ O(or, { children: [
|
|
2659
2663
|
/* @__PURE__ */ O("div", { className: be["rp-layout"], children: [
|
|
2660
|
-
/* @__PURE__ */ s(
|
|
2664
|
+
/* @__PURE__ */ s(ca, { ref: h }),
|
|
2661
2665
|
/* @__PURE__ */ O("div", { className: be["rp-content"], children: [
|
|
2662
|
-
/* @__PURE__ */ s("div", { className: be["rp-sidebar"], children: /* @__PURE__ */ s(
|
|
2666
|
+
/* @__PURE__ */ s("div", { className: be["rp-sidebar"], children: /* @__PURE__ */ s(ma, {}) }),
|
|
2663
2667
|
/* @__PURE__ */ s("div", { ref: u, className: be["rp-pages"], children: n })
|
|
2664
2668
|
] })
|
|
2665
2669
|
] }),
|
|
@@ -2669,45 +2673,45 @@ const ge = {
|
|
|
2669
2673
|
) }) }) });
|
|
2670
2674
|
});
|
|
2671
2675
|
export {
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2676
|
+
Yr as A,
|
|
2677
|
+
la as B,
|
|
2678
|
+
Vr as C,
|
|
2679
|
+
wo as D,
|
|
2680
|
+
pa as E,
|
|
2677
2681
|
En as F,
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2682
|
+
ma as G,
|
|
2683
|
+
ia as L,
|
|
2684
|
+
Jo as M,
|
|
2685
|
+
Yo as O,
|
|
2686
|
+
Fs as P,
|
|
2687
|
+
$s as R,
|
|
2688
|
+
Hs as S,
|
|
2689
|
+
Ws as T,
|
|
2690
|
+
oa as Z,
|
|
2691
|
+
ks as a,
|
|
2692
|
+
Us as b,
|
|
2693
|
+
Vo as c,
|
|
2690
2694
|
wt as d,
|
|
2691
2695
|
ln as e,
|
|
2692
2696
|
nn as f,
|
|
2693
|
-
|
|
2697
|
+
Wr as g,
|
|
2694
2698
|
rn as h,
|
|
2695
|
-
|
|
2699
|
+
Hr as i,
|
|
2696
2700
|
on as j,
|
|
2697
|
-
|
|
2701
|
+
$r as k,
|
|
2698
2702
|
an as l,
|
|
2699
2703
|
sn as m,
|
|
2700
|
-
|
|
2704
|
+
Gr as n,
|
|
2701
2705
|
cn as o,
|
|
2702
|
-
|
|
2706
|
+
Ur as p,
|
|
2703
2707
|
bt as q,
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2708
|
+
go as r,
|
|
2709
|
+
bo as s,
|
|
2710
|
+
So as t,
|
|
2707
2711
|
oe as u,
|
|
2708
|
-
|
|
2712
|
+
$o as v,
|
|
2709
2713
|
An as w,
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2714
|
+
Qo as x,
|
|
2715
|
+
aa as y,
|
|
2716
|
+
ca as z
|
|
2713
2717
|
};
|