@pdf-viewer/react 1.6.0 → 1.7.0-beta.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-6173dbb0.js → RPDefaultLayout-8c323c9f.js} +200 -198
- package/dist/components/RPController.js +52 -51
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/layout/LayoutContainer.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +1 -1
- package/dist/components/layout/toolbar/OtherTool.js +3 -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/SearchResultNavigator.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +1 -1
- package/dist/components/layout/toolbar/ViewModeTool.js +19 -18
- package/dist/components/layout/toolbar/ZoomTool.js +1 -1
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/contexts/ToolbarComponentContext.js +2 -2
- package/dist/contexts/ViewModeContext.js +17 -16
- package/dist/main.js +1 -1
- package/dist/types/components/layout/toolbar/ViewModeTool.d.ts +1 -1
- package/dist/types/utils/types.d.ts +3 -2
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePresentPage.js +1 -1
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/package.json +1 -1
|
@@ -75,22 +75,23 @@ import { PropertyItem as so } from "./components/layout/toolbar/PropertyItem.js"
|
|
|
75
75
|
import { useOtherToolContext as co, OtherToolProvider as lo } from "./contexts/OtherToolContext.js";
|
|
76
76
|
import { DocumentProperties as uo } from "./components/layout/toolbar/DocumentProperties.js";
|
|
77
77
|
import { RotateTool as po } from "./components/layout/toolbar/RotateTool.js";
|
|
78
|
-
import {
|
|
78
|
+
import { ViewModeTool as ho } from "./components/layout/toolbar/ViewModeTool.js";
|
|
79
|
+
import { ScrollModeTool as mo } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
79
80
|
import { MenuSeparator as yt } from "./components/layout/toolbar/MenuSeparator.js";
|
|
80
|
-
import { FileDownloadDefaultIcon as
|
|
81
|
+
import { FileDownloadDefaultIcon as fo } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
81
82
|
import { MenuItem as be } from "./components/layout/toolbar/MenuItem.js";
|
|
82
|
-
import { PrintDefaultTool as
|
|
83
|
+
import { PrintDefaultTool as go } from "./components/icons/PrintDefaultIcon.js";
|
|
83
84
|
import { FullScreenTool as fn } from "./components/layout/toolbar/FullScreenTool.js";
|
|
84
85
|
import { GoToDownIcon as gn } from "./components/icons/GoToDownIcon.js";
|
|
85
|
-
import { SelectionModeTool as
|
|
86
|
-
import { ZoomInIcon as
|
|
87
|
-
import { ZoomOutIcon as
|
|
86
|
+
import { SelectionModeTool as vo } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
87
|
+
import { ZoomInIcon as wo } from "./components/icons/ZoomInIcon.js";
|
|
88
|
+
import { ZoomOutIcon as _o } from "./components/icons/ZoomOutIcon.js";
|
|
88
89
|
import { PAGE_PADDING as Mt } from "./utils/constants.js";
|
|
89
|
-
import { getZoomLevel as
|
|
90
|
-
import { SearchIcon as
|
|
90
|
+
import { getZoomLevel as bo } from "./utils/getZoomLevel.js";
|
|
91
|
+
import { SearchIcon as Co } from "./components/icons/SearchIcon.js";
|
|
91
92
|
import { c as Y, S as Ht } from "./SearchCloseButton-ddb9877e.js";
|
|
92
93
|
import { UICheckbox as $t } from "./components/ui/Checkbox.js";
|
|
93
|
-
import { ClearIcon as
|
|
94
|
+
import { ClearIcon as To } from "./components/icons/ClearIcon.js";
|
|
94
95
|
import { InfoIcon as Gt } from "./components/icons/InfoIcon.js";
|
|
95
96
|
import './assets/RPDefaultLayout.css';const vn = () => {
|
|
96
97
|
const { viewMode: e } = ze(), { scrollMode: t } = De(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), l = H(), { columnCount: s } = dn(), { widths: u, heights: p } = qe(), m = H(t), v = H(e), h = H(s), { targetScrollPage: _ } = un();
|
|
@@ -185,7 +186,7 @@ import './assets/RPDefaultLayout.css';const vn = () => {
|
|
|
185
186
|
u
|
|
186
187
|
]
|
|
187
188
|
) };
|
|
188
|
-
},
|
|
189
|
+
}, Po = (e = 1) => {
|
|
189
190
|
const [t, n] = $(e), [o, r] = $(0), { scrollToPage: a } = vn(), l = H(1), { viewMode: s } = ze(), { scrollMode: u } = De(), { widths: p } = qe(), { pagesRef: m } = ge(), v = Tt(t, 100), h = N(
|
|
190
191
|
(d) => {
|
|
191
192
|
if (!/^[0-9]*$/g.test(d.toString()) || !d)
|
|
@@ -236,8 +237,8 @@ import './assets/RPDefaultLayout.css';const vn = () => {
|
|
|
236
237
|
}), ie = () => {
|
|
237
238
|
const e = Je(wn);
|
|
238
239
|
return typeof (e == null ? void 0 : e.focusedPage) > "u" && Zr.error("Please use this hooks inside children component of RPProvider"), e;
|
|
239
|
-
},
|
|
240
|
-
const { pdf: t } = J(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: l, nextPage: s, prevPage: u } =
|
|
240
|
+
}, Ms = ({ children: e }) => {
|
|
241
|
+
const { pdf: t } = J(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: l, nextPage: s, prevPage: u } = Po();
|
|
241
242
|
return k(() => {
|
|
242
243
|
t != null && t.numPages && (a(t.numPages), r(1));
|
|
243
244
|
}, [t, a, r]), /* @__PURE__ */ i(
|
|
@@ -256,7 +257,7 @@ import './assets/RPDefaultLayout.css';const vn = () => {
|
|
|
256
257
|
}
|
|
257
258
|
);
|
|
258
259
|
};
|
|
259
|
-
const
|
|
260
|
+
const So = () => {
|
|
260
261
|
const { pdf: e, pages: t } = J(), [n, o] = $({
|
|
261
262
|
loadedPages: 0,
|
|
262
263
|
totalPages: 0,
|
|
@@ -433,8 +434,8 @@ const Po = () => {
|
|
|
433
434
|
console.error("Error in setOnError callback:", t);
|
|
434
435
|
}
|
|
435
436
|
}
|
|
436
|
-
}),
|
|
437
|
-
const [t, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: s, isComplete: u, isError: p, error: m } =
|
|
437
|
+
}), Hs = ({ children: e }) => {
|
|
438
|
+
const [t, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: s, isComplete: u, isError: p, error: m } = So(), v = N((C) => {
|
|
438
439
|
C && typeof C == "function" && r(() => C);
|
|
439
440
|
}, []), h = (C) => {
|
|
440
441
|
m && C(m);
|
|
@@ -469,7 +470,7 @@ const Po = () => {
|
|
|
469
470
|
if (!e)
|
|
470
471
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
471
472
|
return e;
|
|
472
|
-
},
|
|
473
|
+
}, yo = () => {
|
|
473
474
|
const [e, t] = $({}), { pages: n } = J(), { rotate: o } = Ge(), r = W(() => Object.keys(e).length, [e]), a = N(
|
|
474
475
|
(s) => {
|
|
475
476
|
if (!n.size || s > n.size)
|
|
@@ -556,11 +557,11 @@ const Po = () => {
|
|
|
556
557
|
setActive: (e) => {
|
|
557
558
|
},
|
|
558
559
|
active: !1
|
|
559
|
-
}), Cn = () => Je(bn),
|
|
560
|
+
}), Cn = () => Je(bn), $s = ({
|
|
560
561
|
children: e,
|
|
561
562
|
initialThumbnailsVisible: t
|
|
562
563
|
}) => {
|
|
563
|
-
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } =
|
|
564
|
+
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = yo(), [l, s] = $(t);
|
|
564
565
|
return /* @__PURE__ */ i(
|
|
565
566
|
bn.Provider,
|
|
566
567
|
{
|
|
@@ -568,7 +569,7 @@ const Po = () => {
|
|
|
568
569
|
children: e
|
|
569
570
|
}
|
|
570
571
|
);
|
|
571
|
-
},
|
|
572
|
+
}, xo = (e = {}, t = "") => {
|
|
572
573
|
const [n, o] = $(t), [r, a] = $(!1), { pdf: l, pages: s } = J(), { widths: u, heights: p } = qe(), m = H(!n), { currentZoom: v } = Qe(), [h, _] = $([]), { setFocusedPage: T } = ie(), { columnCount: S } = ze(), { rotate: C } = Ge(), [y, d] = $(0), { pageScrollElementRef: f, virtualScrollableElementRef: g } = et(), { scrollMode: c } = De(), { pagesRef: b } = ge(), [w, P] = $(null), E = H({}), x = W(() => y === 0 ? null : h[y - 1], [y, h]), R = W(() => h.length, [h]);
|
|
573
574
|
k(() => {
|
|
574
575
|
if (!x || !s)
|
|
@@ -682,7 +683,7 @@ const Po = () => {
|
|
|
682
683
|
currentMatchElement: null,
|
|
683
684
|
setCurrentMatchElement: (e) => {
|
|
684
685
|
}
|
|
685
|
-
}),
|
|
686
|
+
}), Gs = ({
|
|
686
687
|
children: e,
|
|
687
688
|
initialSearch: t
|
|
688
689
|
}) => {
|
|
@@ -698,7 +699,7 @@ const Po = () => {
|
|
|
698
699
|
prevMatch: h,
|
|
699
700
|
currentMatchElement: _,
|
|
700
701
|
setCurrentMatchElement: T
|
|
701
|
-
} =
|
|
702
|
+
} = xo(n, t);
|
|
702
703
|
return /* @__PURE__ */ i(
|
|
703
704
|
Tn.Provider,
|
|
704
705
|
{
|
|
@@ -733,7 +734,7 @@ const Po = () => {
|
|
|
733
734
|
"rp-page-wrapper": "_rp-page-wrapper_h7a2q_1",
|
|
734
735
|
"rp-page": "_rp-page_h7a2q_1",
|
|
735
736
|
"rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
|
|
736
|
-
},
|
|
737
|
+
}, Io = (e) => {
|
|
737
738
|
const { pageNumber: t, onLoaded: n, onLoading: o } = e, r = H(null), { pages: a } = J(), { rotate: l } = Ge(), s = H(), { currentZoom: u } = Qe();
|
|
738
739
|
return k(() => {
|
|
739
740
|
if (!a || u === 0)
|
|
@@ -759,12 +760,12 @@ const Po = () => {
|
|
|
759
760
|
(m = s.current) == null || m.cancel();
|
|
760
761
|
};
|
|
761
762
|
}, [a, t, l, u, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${t}-canvas`, ref: r });
|
|
762
|
-
},
|
|
763
|
+
}, Ro = "_selecting_1x8te_9", Lo = "_endOfContent_1x8te_24", he = {
|
|
763
764
|
"rp-text-layer": "_rp-text-layer_1x8te_1",
|
|
764
|
-
selecting:
|
|
765
|
-
endOfContent:
|
|
765
|
+
selecting: Ro,
|
|
766
|
+
endOfContent: Lo,
|
|
766
767
|
"rp-text-layer-text": "_rp-text-layer-text_1x8te_38"
|
|
767
|
-
},
|
|
768
|
+
}, Eo = (e) => {
|
|
768
769
|
const { pageNumber: t } = e, { pages: n } = J(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: l } = xt(), [s, u] = $(
|
|
769
770
|
[]
|
|
770
771
|
), p = H(), m = H(), v = H(), h = W(() => r.filter((f) => f.pageIndex === t - 1), [r, t]), _ = N(
|
|
@@ -913,11 +914,11 @@ const Po = () => {
|
|
|
913
914
|
onMouseUp: d
|
|
914
915
|
}
|
|
915
916
|
);
|
|
916
|
-
},
|
|
917
|
+
}, No = {
|
|
917
918
|
"rp-annotation-layer": "_rp-annotation-layer_o0ksd_1"
|
|
918
919
|
};
|
|
919
|
-
let
|
|
920
|
-
const
|
|
920
|
+
let Oo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
921
|
+
const Do = (e) => {
|
|
921
922
|
const { pageNumber: t } = e, n = H(null), { pages: o, pdf: r } = J(), a = H(), [l, s] = $(), { setFocusedPage: u, goToPage: p } = ie(), { scrollMode: m } = De(), { print: v } = tt(), { download: h } = Hn(), _ = W(() => o.get(t), [o, t]), T = W(() => _ == null ? void 0 : _.page.getViewport(), [_]);
|
|
922
923
|
k(() => {
|
|
923
924
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
@@ -980,7 +981,7 @@ const Oo = (e) => {
|
|
|
980
981
|
div: n.current,
|
|
981
982
|
viewport: C.clone({ dontFlip: !0 }),
|
|
982
983
|
page: _.page,
|
|
983
|
-
imageResourcesPath:
|
|
984
|
+
imageResourcesPath: Oo,
|
|
984
985
|
renderForms: !0,
|
|
985
986
|
linkService: new Lr(),
|
|
986
987
|
downloadManager: null,
|
|
@@ -999,13 +1000,13 @@ const Oo = (e) => {
|
|
|
999
1000
|
{
|
|
1000
1001
|
"data-rp": `page-${t}-annotationLayer`,
|
|
1001
1002
|
style: { width: `${T == null ? void 0 : T.width}px`, height: `${T == null ? void 0 : T.height}px` },
|
|
1002
|
-
className:
|
|
1003
|
+
className: No["rp-annotation-layer"],
|
|
1003
1004
|
ref: n
|
|
1004
1005
|
}
|
|
1005
1006
|
);
|
|
1006
|
-
},
|
|
1007
|
+
}, zo = {
|
|
1007
1008
|
"rp-text-highlight": "_rp-text-highlight_jdkf8_1"
|
|
1008
|
-
},
|
|
1009
|
+
}, Ao = ({ pageNumber: e, viewport: t }) => {
|
|
1009
1010
|
const [n, o] = $(), { pages: r } = J(), { highlightKeywords: a } = pr(), l = !0, s = H(null), [u, p] = $(null), [m, v] = $([]);
|
|
1010
1011
|
k(() => {
|
|
1011
1012
|
s.current && p(s.current.parentElement);
|
|
@@ -1163,7 +1164,7 @@ const Oo = (e) => {
|
|
|
1163
1164
|
}, [l, a, e, n, t]), /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i("div", { ref: s, "data-rp": `page-${e}-textHighlightLayer`, children: m.map((d, f) => /* @__PURE__ */ i(
|
|
1164
1165
|
"div",
|
|
1165
1166
|
{
|
|
1166
|
-
className:
|
|
1167
|
+
className: zo["rp-text-highlight"],
|
|
1167
1168
|
style: {
|
|
1168
1169
|
top: `${d.top}%`,
|
|
1169
1170
|
left: `${d.left}%`,
|
|
@@ -1223,11 +1224,11 @@ const Oo = (e) => {
|
|
|
1223
1224
|
},
|
|
1224
1225
|
className: lt["rp-page"],
|
|
1225
1226
|
children: [
|
|
1226
|
-
/* @__PURE__ */ i(
|
|
1227
|
+
/* @__PURE__ */ i(Io, { onLoading: C, onLoaded: y, pageNumber: n }),
|
|
1227
1228
|
m && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Ct, {}) }),
|
|
1228
|
-
s && /* @__PURE__ */ i(
|
|
1229
|
-
/* @__PURE__ */ i(
|
|
1230
|
-
/* @__PURE__ */ i(
|
|
1229
|
+
s && /* @__PURE__ */ i(Eo, { pageNumber: n }),
|
|
1230
|
+
/* @__PURE__ */ i(Ao, { pageNumber: n, viewport: _ }),
|
|
1231
|
+
/* @__PURE__ */ i(Do, { pageNumber: n })
|
|
1231
1232
|
]
|
|
1232
1233
|
}
|
|
1233
1234
|
)
|
|
@@ -1244,25 +1245,25 @@ function wt(e, t) {
|
|
|
1244
1245
|
return n.__proto__ = o, n;
|
|
1245
1246
|
}, wt(e, t);
|
|
1246
1247
|
}
|
|
1247
|
-
function
|
|
1248
|
+
function Fo(e, t) {
|
|
1248
1249
|
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, wt(e, t);
|
|
1249
1250
|
}
|
|
1250
1251
|
var Vt = Number.isNaN || function(t) {
|
|
1251
1252
|
return typeof t == "number" && t !== t;
|
|
1252
1253
|
};
|
|
1253
|
-
function
|
|
1254
|
+
function ko(e, t) {
|
|
1254
1255
|
return !!(e === t || Vt(e) && Vt(t));
|
|
1255
1256
|
}
|
|
1256
|
-
function
|
|
1257
|
+
function Wo(e, t) {
|
|
1257
1258
|
if (e.length !== t.length)
|
|
1258
1259
|
return !1;
|
|
1259
1260
|
for (var n = 0; n < e.length; n++)
|
|
1260
|
-
if (!
|
|
1261
|
+
if (!ko(e[n], t[n]))
|
|
1261
1262
|
return !1;
|
|
1262
1263
|
return !0;
|
|
1263
1264
|
}
|
|
1264
1265
|
function dt(e, t) {
|
|
1265
|
-
t === void 0 && (t =
|
|
1266
|
+
t === void 0 && (t = Wo);
|
|
1266
1267
|
var n, o = [], r, a = !1;
|
|
1267
1268
|
function l() {
|
|
1268
1269
|
for (var s = [], u = 0; u < arguments.length; u++)
|
|
@@ -1283,7 +1284,7 @@ function Ut(e, t) {
|
|
|
1283
1284
|
}
|
|
1284
1285
|
return n;
|
|
1285
1286
|
}
|
|
1286
|
-
var
|
|
1287
|
+
var Mo = typeof performance == "object" && typeof performance.now == "function", Bt = Mo ? function() {
|
|
1287
1288
|
return performance.now();
|
|
1288
1289
|
} : function() {
|
|
1289
1290
|
return Date.now();
|
|
@@ -1291,7 +1292,7 @@ var Wo = typeof performance == "object" && typeof performance.now == "function",
|
|
|
1291
1292
|
function Zt(e) {
|
|
1292
1293
|
cancelAnimationFrame(e.id);
|
|
1293
1294
|
}
|
|
1294
|
-
function
|
|
1295
|
+
function Ho(e, t) {
|
|
1295
1296
|
var n = Bt();
|
|
1296
1297
|
function o() {
|
|
1297
1298
|
Bt() - n >= t ? e.call(null) : r.id = requestAnimationFrame(o);
|
|
@@ -1302,7 +1303,7 @@ function Mo(e, t) {
|
|
|
1302
1303
|
return r;
|
|
1303
1304
|
}
|
|
1304
1305
|
var ut = -1;
|
|
1305
|
-
function
|
|
1306
|
+
function $o(e) {
|
|
1306
1307
|
if (e === void 0 && (e = !1), ut === -1 || e) {
|
|
1307
1308
|
var t = document.createElement("div"), n = t.style;
|
|
1308
1309
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), ut = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
|
|
@@ -1319,17 +1320,17 @@ function jt(e) {
|
|
|
1319
1320
|
}
|
|
1320
1321
|
return Le;
|
|
1321
1322
|
}
|
|
1322
|
-
var
|
|
1323
|
+
var Go = 150, qo = function(t) {
|
|
1323
1324
|
var n = t.columnIndex;
|
|
1324
1325
|
t.data;
|
|
1325
1326
|
var o = t.rowIndex;
|
|
1326
1327
|
return o + ":" + n;
|
|
1327
1328
|
}, Be = null, Ze = null, je = null;
|
|
1328
1329
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Be = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet(), je = /* @__PURE__ */ new WeakSet());
|
|
1329
|
-
function
|
|
1330
|
+
function Vo(e) {
|
|
1330
1331
|
var t, n = e.getColumnOffset, o = e.getColumnStartIndexForOffset, r = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, l = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, u = e.getOffsetForColumnAndAlignment, p = e.getOffsetForRowAndAlignment, m = e.getRowHeight, v = e.getRowOffset, h = e.getRowStartIndexForOffset, _ = e.getRowStopIndexForStartIndex, T = e.initInstanceProps, S = e.shouldResetStyleCacheOnItemSizeChange, C = e.validateProps;
|
|
1331
1332
|
return t = /* @__PURE__ */ function(y) {
|
|
1332
|
-
|
|
1333
|
+
Fo(d, y);
|
|
1333
1334
|
function d(g) {
|
|
1334
1335
|
var c;
|
|
1335
1336
|
return c = y.call(this, g) || this, c._instanceProps = T(c.props, qt(c)), c._resetIsScrollingTimeoutId = null, c._outerRef = void 0, c.state = {
|
|
@@ -1407,7 +1408,7 @@ function qo(e) {
|
|
|
1407
1408
|
var w = c.props.outerRef;
|
|
1408
1409
|
c._outerRef = b, typeof w == "function" ? w(b) : w != null && typeof w == "object" && w.hasOwnProperty("current") && (w.current = b);
|
|
1409
1410
|
}, c._resetIsScrollingDebounced = function() {
|
|
1410
|
-
c._resetIsScrollingTimeoutId !== null && Zt(c._resetIsScrollingTimeoutId), c._resetIsScrollingTimeoutId =
|
|
1411
|
+
c._resetIsScrollingTimeoutId !== null && Zt(c._resetIsScrollingTimeoutId), c._resetIsScrollingTimeoutId = Ho(c._resetIsScrolling, Go);
|
|
1411
1412
|
}, c._resetIsScrolling = function() {
|
|
1412
1413
|
c._resetIsScrollingTimeoutId = null, c.setState({
|
|
1413
1414
|
isScrolling: !1
|
|
@@ -1417,7 +1418,7 @@ function qo(e) {
|
|
|
1417
1418
|
}, c;
|
|
1418
1419
|
}
|
|
1419
1420
|
d.getDerivedStateFromProps = function(c, b) {
|
|
1420
|
-
return
|
|
1421
|
+
return Uo(c, b), C(c), null;
|
|
1421
1422
|
};
|
|
1422
1423
|
var f = d.prototype;
|
|
1423
1424
|
return f.scrollTo = function(c) {
|
|
@@ -1432,7 +1433,7 @@ function qo(e) {
|
|
|
1432
1433
|
};
|
|
1433
1434
|
}, this._resetIsScrollingDebounced);
|
|
1434
1435
|
}, f.scrollToItem = function(c) {
|
|
1435
|
-
var b = c.align, w = b === void 0 ? "auto" : b, P = c.columnIndex, E = c.rowIndex, x = this.props, R = x.columnCount, D = x.height, z = x.rowCount, A = x.width, L = this.state, I = L.scrollLeft, O = L.scrollTop, M =
|
|
1436
|
+
var b = c.align, w = b === void 0 ? "auto" : b, P = c.columnIndex, E = c.rowIndex, x = this.props, R = x.columnCount, D = x.height, z = x.rowCount, A = x.width, L = this.state, I = L.scrollLeft, O = L.scrollTop, M = $o();
|
|
1436
1437
|
P !== void 0 && (P = Math.max(0, Math.min(P, R - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, z - 1)));
|
|
1437
1438
|
var G = l(this.props, this._instanceProps), Z = s(this.props, this._instanceProps), j = Z > A ? M : 0, U = G > D ? M : 0;
|
|
1438
1439
|
this.scrollTo({
|
|
@@ -1471,7 +1472,7 @@ function qo(e) {
|
|
|
1471
1472
|
}, f.componentWillUnmount = function() {
|
|
1472
1473
|
this._resetIsScrollingTimeoutId !== null && Zt(this._resetIsScrollingTimeoutId);
|
|
1473
1474
|
}, f.render = function() {
|
|
1474
|
-
var c = this.props, b = c.children, w = c.className, P = c.columnCount, E = c.direction, x = c.height, R = c.innerRef, D = c.innerElementType, z = c.innerTagName, A = c.itemData, L = c.itemKey, I = L === void 0 ?
|
|
1475
|
+
var c = this.props, b = c.children, w = c.className, P = c.columnCount, E = c.direction, x = c.height, R = c.innerRef, D = c.innerElementType, z = c.innerTagName, A = c.itemData, L = c.itemKey, I = L === void 0 ? qo : L, O = c.outerElementType, M = c.outerTagName, G = c.rowCount, Z = c.style, j = c.useIsScrolling, U = c.width, Q = this.state.isScrolling, X = this._getHorizontalRangeToRender(), le = X[0], ae = X[1], de = this._getVerticalRangeToRender(), te = de[0], Ae = de[1], Re = [];
|
|
1475
1476
|
if (P > 0 && G)
|
|
1476
1477
|
for (var Te = te; Te <= Ae; Te++)
|
|
1477
1478
|
for (var we = le; we <= ae; we++)
|
|
@@ -1539,7 +1540,7 @@ function qo(e) {
|
|
|
1539
1540
|
useIsScrolling: !1
|
|
1540
1541
|
}, t;
|
|
1541
1542
|
}
|
|
1542
|
-
var
|
|
1543
|
+
var Uo = function(t, n) {
|
|
1543
1544
|
var o = t.children, r = t.direction, a = t.height, l = t.innerTagName, s = t.outerTagName, u = t.overscanColumnsCount, p = t.overscanCount, m = t.overscanRowsCount, v = t.width, h = n.instance;
|
|
1544
1545
|
if (process.env.NODE_ENV !== "production") {
|
|
1545
1546
|
if (typeof p == "number" && Be && !Be.has(h) && (Be.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof u == "number" || typeof m == "number") && Ze && !Ze.has(h) && (Ze.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (l != null || s != null) && je && !je.has(h) && (je.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
|
|
@@ -1594,7 +1595,7 @@ var Vo = function(t, n) {
|
|
|
1594
1595
|
var a, l;
|
|
1595
1596
|
t === "column" ? (a = o.columnMetadataMap, l = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, l = o.lastMeasuredRowIndex);
|
|
1596
1597
|
var s = l > 0 ? a[l].offset : 0;
|
|
1597
|
-
return s >= r ? yn(t, n, o, l, 0, r) :
|
|
1598
|
+
return s >= r ? yn(t, n, o, l, 0, r) : Bo(t, n, o, Math.max(0, l), r);
|
|
1598
1599
|
}, yn = function(t, n, o, r, a, l) {
|
|
1599
1600
|
for (; a <= r; ) {
|
|
1600
1601
|
var s = a + Math.floor((r - a) / 2), u = me(t, n, s, o).offset;
|
|
@@ -1603,7 +1604,7 @@ var Vo = function(t, n) {
|
|
|
1603
1604
|
u < l ? a = s + 1 : u > l && (r = s - 1);
|
|
1604
1605
|
}
|
|
1605
1606
|
return a > 0 ? a - 1 : 0;
|
|
1606
|
-
},
|
|
1607
|
+
}, Bo = function(t, n, o, r, a) {
|
|
1607
1608
|
for (var l = t === "column" ? n.columnCount : n.rowCount, s = 1; r < l && me(t, n, r, o).offset < a; )
|
|
1608
1609
|
r += s, s *= 2;
|
|
1609
1610
|
return yn(t, n, o, Math.min(r, l - 1), Math.floor(r / 2), a);
|
|
@@ -1620,7 +1621,7 @@ var Vo = function(t, n) {
|
|
|
1620
1621
|
default:
|
|
1621
1622
|
return a >= h && a <= v ? a : h > v || a < h ? h : v;
|
|
1622
1623
|
}
|
|
1623
|
-
},
|
|
1624
|
+
}, Zo = /* @__PURE__ */ Vo({
|
|
1624
1625
|
getColumnOffset: function(t, n, o) {
|
|
1625
1626
|
return me("column", t, n, o).offset;
|
|
1626
1627
|
},
|
|
@@ -1702,12 +1703,12 @@ function Jt(e, t) {
|
|
|
1702
1703
|
return !0;
|
|
1703
1704
|
return !1;
|
|
1704
1705
|
}
|
|
1705
|
-
var
|
|
1706
|
-
function
|
|
1707
|
-
var n = e.style, o = Ut(e,
|
|
1706
|
+
var jo = ["style"], Ko = ["style"];
|
|
1707
|
+
function Xo(e, t) {
|
|
1708
|
+
var n = e.style, o = Ut(e, jo), r = t.style, a = Ut(t, Ko);
|
|
1708
1709
|
return !Jt(n, r) && !Jt(o, a);
|
|
1709
1710
|
}
|
|
1710
|
-
const
|
|
1711
|
+
const Yo = () => {
|
|
1711
1712
|
const { viewMode: e } = ze(), { scrollMode: t } = De(), { setColumnCount: n } = dn(), { virtualScrollableElementRef: o } = et(), r = qe(), a = N(
|
|
1712
1713
|
(_) => r.widths[_] || 0,
|
|
1713
1714
|
[r.widths]
|
|
@@ -1745,7 +1746,7 @@ ht == null || tn == null ? (_t = pt, bt = function(t) {
|
|
|
1745
1746
|
}, Qt);
|
|
1746
1747
|
return [n, o];
|
|
1747
1748
|
});
|
|
1748
|
-
function
|
|
1749
|
+
function Jo(e) {
|
|
1749
1750
|
let t, n, o, r, a, l, s;
|
|
1750
1751
|
const u = typeof document < "u" && document.attachEvent;
|
|
1751
1752
|
if (!u) {
|
|
@@ -1817,7 +1818,7 @@ function Yo(e) {
|
|
|
1817
1818
|
}
|
|
1818
1819
|
};
|
|
1819
1820
|
}
|
|
1820
|
-
class
|
|
1821
|
+
class Qo extends Qn {
|
|
1821
1822
|
constructor(...t) {
|
|
1822
1823
|
super(...t), this.state = {
|
|
1823
1824
|
height: this.props.defaultHeight || 0,
|
|
@@ -1858,7 +1859,7 @@ class Jo extends Qn {
|
|
|
1858
1859
|
const o = n.ownerDocument.defaultView.ResizeObserver;
|
|
1859
1860
|
o != null ? (this._resizeObserver = new o(() => {
|
|
1860
1861
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1861
|
-
}), this._resizeObserver.observe(n)) : (this._detectElementResize =
|
|
1862
|
+
}), this._resizeObserver.observe(n)) : (this._detectElementResize = Jo(t), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1862
1863
|
}
|
|
1863
1864
|
}
|
|
1864
1865
|
componentWillUnmount() {
|
|
@@ -1896,7 +1897,7 @@ class Jo extends Qn {
|
|
|
1896
1897
|
}, !d && t(y));
|
|
1897
1898
|
}
|
|
1898
1899
|
}
|
|
1899
|
-
const
|
|
1900
|
+
const ei = ({ widths: e, heights: t }) => {
|
|
1900
1901
|
const { focusedPage: n, totalPages: o } = ie(), r = W(() => {
|
|
1901
1902
|
const s = [], u = Math.ceil(n / 2) * 2 - 1;
|
|
1902
1903
|
if (s.push(u), u + 1 < o) {
|
|
@@ -1920,7 +1921,7 @@ const Qo = ({ widths: e, heights: t }) => {
|
|
|
1920
1921
|
}
|
|
1921
1922
|
], [e, t, r]), l = W(() => a.reduce((s, u) => s + Number(u.width || 0), 0), [a]);
|
|
1922
1923
|
return /* @__PURE__ */ i("div", { style: { width: l, position: "relative" }, children: r.map((s, u) => /* @__PURE__ */ i(It, { style: a[u], pageNumber: s }, s)) });
|
|
1923
|
-
},
|
|
1924
|
+
}, ti = ({ widths: e, heights: t }) => {
|
|
1924
1925
|
const { focusedPage: n } = ie(), o = W(() => ({
|
|
1925
1926
|
position: "absolute",
|
|
1926
1927
|
width: e(n - 1),
|
|
@@ -1936,7 +1937,7 @@ const Qo = ({ widths: e, heights: t }) => {
|
|
|
1936
1937
|
children: /* @__PURE__ */ i(It, { style: o, pageNumber: n }, n)
|
|
1937
1938
|
}
|
|
1938
1939
|
);
|
|
1939
|
-
},
|
|
1940
|
+
}, ni = (e, t, n) => {
|
|
1940
1941
|
const o = H(), { contentRef: r } = ge(), { heights: a, widths: l } = qe(), { setFocusedPage: s } = ie(), [u, p] = $([]), { targetScrollPage: m } = un(), v = Tt(u, 0, 500), h = W(() => a.map((T, S) => {
|
|
1941
1942
|
const C = l[S], y = Vr(S + 1, e), d = C * y.columnIndex, f = T * y.rowIndex, g = d + C, c = f + T;
|
|
1942
1943
|
return {
|
|
@@ -1987,10 +1988,10 @@ const Qo = ({ widths: e, heights: t }) => {
|
|
|
1987
1988
|
n == null || n.removeEventListener("scroll", _);
|
|
1988
1989
|
};
|
|
1989
1990
|
}, [n, _]);
|
|
1990
|
-
},
|
|
1991
|
+
}, ri = er(({ columnIndex: e, rowIndex: t, data: n, style: o }) => {
|
|
1991
1992
|
const r = Ur(t, e, n.columnCount);
|
|
1992
1993
|
return /* @__PURE__ */ i(It, { style: o, pageNumber: r }, r);
|
|
1993
|
-
},
|
|
1994
|
+
}, Xo), qs = () => {
|
|
1994
1995
|
const { initialPage: e = 1, initialScrollMode: t, instanceId: n } = ar(), { pagesRef: o, setPagesRef: r } = ge(), { scrollToPage: a } = vn(), {
|
|
1995
1996
|
virtualScrollRef: l,
|
|
1996
1997
|
getVirtualScrollRef: s,
|
|
@@ -2013,8 +2014,8 @@ const Qo = ({ widths: e, heights: t }) => {
|
|
|
2013
2014
|
columnWidth: M,
|
|
2014
2015
|
estimatedColumnWidth: G,
|
|
2015
2016
|
estimatedRowHeight: Z
|
|
2016
|
-
} =
|
|
2017
|
-
|
|
2017
|
+
} = Yo(), j = Tt(h, 100), U = H();
|
|
2018
|
+
ni(O, L, v);
|
|
2018
2019
|
const Q = H({
|
|
2019
2020
|
scrollTop: 0,
|
|
2020
2021
|
scrollLeft: 0
|
|
@@ -2141,16 +2142,16 @@ const Qo = ({ widths: e, heights: t }) => {
|
|
|
2141
2142
|
y,
|
|
2142
2143
|
j
|
|
2143
2144
|
]), /* @__PURE__ */ F(fe, { children: [
|
|
2144
|
-
/* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: rt, children: /* @__PURE__ */ i(
|
|
2145
|
+
/* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: rt, children: /* @__PURE__ */ i(Qo, { style: { minHeight: "50px" }, children: ({ width: q, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Zn, style: { width: q, height: V }, children: f === ee.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
2145
2146
|
"div",
|
|
2146
2147
|
{
|
|
2147
2148
|
ref: u,
|
|
2148
2149
|
style: { width: q, height: V },
|
|
2149
2150
|
className: ne(ue["rp-pages"], ue["rp-page-scrolling-wrapper"]),
|
|
2150
|
-
children: g === He.DUAL_PAGE ? /* @__PURE__ */ i(
|
|
2151
|
+
children: g === He.DUAL_PAGE ? /* @__PURE__ */ i(ei, { widths: M, heights: I }) : /* @__PURE__ */ i(ti, { widths: M, heights: I })
|
|
2151
2152
|
}
|
|
2152
2153
|
) : G ? /* @__PURE__ */ i(
|
|
2153
|
-
|
|
2154
|
+
Zo,
|
|
2154
2155
|
{
|
|
2155
2156
|
ref: s,
|
|
2156
2157
|
itemData: Ae,
|
|
@@ -2169,7 +2170,7 @@ const Qo = ({ widths: e, heights: t }) => {
|
|
|
2169
2170
|
ue["rp-pages"],
|
|
2170
2171
|
f === ee.HORIZONTAL_SCROLLING ? ue["rp-pages-horizontal-scroll"] : ""
|
|
2171
2172
|
),
|
|
2172
|
-
children:
|
|
2173
|
+
children: ri
|
|
2173
2174
|
}
|
|
2174
2175
|
) : b ? null : /* @__PURE__ */ i(
|
|
2175
2176
|
"div",
|
|
@@ -2197,13 +2198,13 @@ const Qo = ({ widths: e, heights: t }) => {
|
|
|
2197
2198
|
"rp-paginate": "_rp-paginate_1y9vo_1",
|
|
2198
2199
|
"rp-page-input": "_rp-page-input_1y9vo_6",
|
|
2199
2200
|
"rp-total-page": "_rp-total-page_1y9vo_11"
|
|
2200
|
-
},
|
|
2201
|
+
}, oi = () => {
|
|
2201
2202
|
const { prevIcon: e } = pe();
|
|
2202
2203
|
return e || /* @__PURE__ */ i(Me, {});
|
|
2203
|
-
},
|
|
2204
|
+
}, ii = () => {
|
|
2204
2205
|
const { nextIcon: e } = pe();
|
|
2205
2206
|
return e || /* @__PURE__ */ i(Me, { style: { transform: "rotate(180deg" } });
|
|
2206
|
-
},
|
|
2207
|
+
}, ai = () => {
|
|
2207
2208
|
const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [l, s] = $(e.toString()), { pageNavigationTool: u = !0 } = ve(), { isSmallScreen: p } = Ce(), { localeMessages: m } = se();
|
|
2208
2209
|
k(() => {
|
|
2209
2210
|
s(e.toString());
|
|
@@ -2239,7 +2240,7 @@ const Qo = ({ widths: e, heights: t }) => {
|
|
|
2239
2240
|
onClick: r,
|
|
2240
2241
|
"aria-label": m == null ? void 0 : m.previousPageTooltip,
|
|
2241
2242
|
"aria-disabled": e === 1,
|
|
2242
|
-
children: /* @__PURE__ */ i(
|
|
2243
|
+
children: /* @__PURE__ */ i(oi, {})
|
|
2243
2244
|
}
|
|
2244
2245
|
) }),
|
|
2245
2246
|
/* @__PURE__ */ i(K, { content: m == null ? void 0 : m.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
@@ -2262,12 +2263,12 @@ const Qo = ({ widths: e, heights: t }) => {
|
|
|
2262
2263
|
onClick: o,
|
|
2263
2264
|
"aria-label": m == null ? void 0 : m.nextPageTooltip,
|
|
2264
2265
|
"aria-disabled": e === t,
|
|
2265
|
-
children: /* @__PURE__ */ i(
|
|
2266
|
+
children: /* @__PURE__ */ i(ii, {})
|
|
2266
2267
|
}
|
|
2267
2268
|
) })
|
|
2268
2269
|
] }) : null;
|
|
2269
2270
|
};
|
|
2270
|
-
var Rt = "Dialog", [xn,
|
|
2271
|
+
var Rt = "Dialog", [xn, Vs] = Xr(Rt), [si, ce] = xn(Rt), In = (e) => {
|
|
2271
2272
|
const {
|
|
2272
2273
|
__scopeDialog: t,
|
|
2273
2274
|
children: n,
|
|
@@ -2281,7 +2282,7 @@ var Rt = "Dialog", [xn, Gs] = Xr(Rt), [ai, ce] = xn(Rt), In = (e) => {
|
|
|
2281
2282
|
onChange: a
|
|
2282
2283
|
});
|
|
2283
2284
|
return /* @__PURE__ */ i(
|
|
2284
|
-
|
|
2285
|
+
si,
|
|
2285
2286
|
{
|
|
2286
2287
|
scope: t,
|
|
2287
2288
|
triggerRef: s,
|
|
@@ -2298,7 +2299,7 @@ var Rt = "Dialog", [xn, Gs] = Xr(Rt), [ai, ce] = xn(Rt), In = (e) => {
|
|
|
2298
2299
|
);
|
|
2299
2300
|
};
|
|
2300
2301
|
In.displayName = Rt;
|
|
2301
|
-
var Rn = "DialogTrigger",
|
|
2302
|
+
var Rn = "DialogTrigger", ci = B.forwardRef(
|
|
2302
2303
|
(e, t) => {
|
|
2303
2304
|
const { __scopeDialog: n, ...o } = e, r = ce(Rn, n), a = Pt(t, r.triggerRef);
|
|
2304
2305
|
return /* @__PURE__ */ i(
|
|
@@ -2316,22 +2317,22 @@ var Rn = "DialogTrigger", si = B.forwardRef(
|
|
|
2316
2317
|
);
|
|
2317
2318
|
}
|
|
2318
2319
|
);
|
|
2319
|
-
|
|
2320
|
-
var Lt = "DialogPortal", [
|
|
2320
|
+
ci.displayName = Rn;
|
|
2321
|
+
var Lt = "DialogPortal", [li, Ln] = xn(Lt, {
|
|
2321
2322
|
forceMount: void 0
|
|
2322
2323
|
}), En = (e) => {
|
|
2323
2324
|
const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, a = ce(Lt, t);
|
|
2324
|
-
return /* @__PURE__ */ i(
|
|
2325
|
+
return /* @__PURE__ */ i(li, { scope: t, forceMount: n, children: B.Children.map(o, (l) => /* @__PURE__ */ i(St, { present: n || a.open, children: /* @__PURE__ */ i(oo, { asChild: !0, container: r, children: l }) })) });
|
|
2325
2326
|
};
|
|
2326
2327
|
En.displayName = Lt;
|
|
2327
2328
|
var Xe = "DialogOverlay", Nn = B.forwardRef(
|
|
2328
2329
|
(e, t) => {
|
|
2329
2330
|
const n = Ln(Xe, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = ce(Xe, e.__scopeDialog);
|
|
2330
|
-
return a.modal ? /* @__PURE__ */ i(St, { present: o || a.open, children: /* @__PURE__ */ i(
|
|
2331
|
+
return a.modal ? /* @__PURE__ */ i(St, { present: o || a.open, children: /* @__PURE__ */ i(di, { ...r, ref: t }) }) : null;
|
|
2331
2332
|
}
|
|
2332
2333
|
);
|
|
2333
2334
|
Nn.displayName = Xe;
|
|
2334
|
-
var
|
|
2335
|
+
var di = B.forwardRef(
|
|
2335
2336
|
(e, t) => {
|
|
2336
2337
|
const { __scopeDialog: n, ...o } = e, r = ce(Xe, n);
|
|
2337
2338
|
return (
|
|
@@ -2351,11 +2352,11 @@ var li = B.forwardRef(
|
|
|
2351
2352
|
), Ie = "DialogContent", On = B.forwardRef(
|
|
2352
2353
|
(e, t) => {
|
|
2353
2354
|
const n = Ln(Ie, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = ce(Ie, e.__scopeDialog);
|
|
2354
|
-
return /* @__PURE__ */ i(St, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(
|
|
2355
|
+
return /* @__PURE__ */ i(St, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(ui, { ...r, ref: t }) : /* @__PURE__ */ i(pi, { ...r, ref: t }) });
|
|
2355
2356
|
}
|
|
2356
2357
|
);
|
|
2357
2358
|
On.displayName = Ie;
|
|
2358
|
-
var
|
|
2359
|
+
var ui = B.forwardRef(
|
|
2359
2360
|
(e, t) => {
|
|
2360
2361
|
const n = ce(Ie, e.__scopeDialog), o = B.useRef(null), r = Pt(t, n.contentRef, o);
|
|
2361
2362
|
return B.useEffect(() => {
|
|
@@ -2384,7 +2385,7 @@ var di = B.forwardRef(
|
|
|
2384
2385
|
}
|
|
2385
2386
|
);
|
|
2386
2387
|
}
|
|
2387
|
-
),
|
|
2388
|
+
), pi = B.forwardRef(
|
|
2388
2389
|
(e, t) => {
|
|
2389
2390
|
const n = ce(Ie, e.__scopeDialog), o = B.useRef(!1), r = B.useRef(!1);
|
|
2390
2391
|
return /* @__PURE__ */ i(
|
|
@@ -2435,8 +2436,8 @@ var di = B.forwardRef(
|
|
|
2435
2436
|
}
|
|
2436
2437
|
),
|
|
2437
2438
|
/* @__PURE__ */ F(fe, { children: [
|
|
2438
|
-
/* @__PURE__ */ i(
|
|
2439
|
-
/* @__PURE__ */ i(
|
|
2439
|
+
/* @__PURE__ */ i(mi, { titleId: s.titleId }),
|
|
2440
|
+
/* @__PURE__ */ i(gi, { contentRef: u, descriptionId: s.descriptionId })
|
|
2440
2441
|
] })
|
|
2441
2442
|
] });
|
|
2442
2443
|
}
|
|
@@ -2447,13 +2448,13 @@ var di = B.forwardRef(
|
|
|
2447
2448
|
}
|
|
2448
2449
|
);
|
|
2449
2450
|
zn.displayName = Et;
|
|
2450
|
-
var An = "DialogDescription",
|
|
2451
|
+
var An = "DialogDescription", hi = B.forwardRef(
|
|
2451
2452
|
(e, t) => {
|
|
2452
2453
|
const { __scopeDialog: n, ...o } = e, r = ce(An, n);
|
|
2453
2454
|
return /* @__PURE__ */ i(Ve.p, { id: r.descriptionId, ...o, ref: t });
|
|
2454
2455
|
}
|
|
2455
2456
|
);
|
|
2456
|
-
|
|
2457
|
+
hi.displayName = An;
|
|
2457
2458
|
var Fn = "DialogClose", kn = B.forwardRef(
|
|
2458
2459
|
(e, t) => {
|
|
2459
2460
|
const { __scopeDialog: n, ...o } = e, r = ce(Fn, n);
|
|
@@ -2472,11 +2473,11 @@ kn.displayName = Fn;
|
|
|
2472
2473
|
function Nt(e) {
|
|
2473
2474
|
return e ? "open" : "closed";
|
|
2474
2475
|
}
|
|
2475
|
-
var Wn = "DialogTitleWarning", [
|
|
2476
|
+
var Wn = "DialogTitleWarning", [Us, Mn] = Jr(Wn, {
|
|
2476
2477
|
contentName: Ie,
|
|
2477
2478
|
titleName: Et,
|
|
2478
2479
|
docsSlug: "dialog"
|
|
2479
|
-
}),
|
|
2480
|
+
}), mi = ({ titleId: e }) => {
|
|
2480
2481
|
const t = Mn(Wn), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2481
2482
|
|
|
2482
2483
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
@@ -2485,14 +2486,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2485
2486
|
return B.useEffect(() => {
|
|
2486
2487
|
e && (document.getElementById(e) || console.error(n));
|
|
2487
2488
|
}, [n, e]), null;
|
|
2488
|
-
},
|
|
2489
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Mn(
|
|
2489
|
+
}, fi = "DialogDescriptionWarning", gi = ({ contentRef: e, descriptionId: t }) => {
|
|
2490
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Mn(fi).contentName}}.`;
|
|
2490
2491
|
return B.useEffect(() => {
|
|
2491
2492
|
var a;
|
|
2492
2493
|
const r = (a = e.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2493
2494
|
t && r && (document.getElementById(t) || console.warn(o));
|
|
2494
2495
|
}, [o, e, t]), null;
|
|
2495
|
-
},
|
|
2496
|
+
}, vi = In, wi = En, _i = Nn, bi = On, Ci = zn, Ti = kn;
|
|
2496
2497
|
const xe = {
|
|
2497
2498
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2498
2499
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2501,7 +2502,7 @@ const xe = {
|
|
|
2501
2502
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2502
2503
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2503
2504
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2504
|
-
},
|
|
2505
|
+
}, Pi = () => {
|
|
2505
2506
|
const { pdfProperties: e } = J(), { container: t } = ge(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = co(), { localeMessages: r } = se(), a = W(() => {
|
|
2506
2507
|
if (!e)
|
|
2507
2508
|
return [];
|
|
@@ -2542,19 +2543,19 @@ const xe = {
|
|
|
2542
2543
|
{ label: r == null ? void 0 : r.propertiesPageCountLabel, value: y }
|
|
2543
2544
|
];
|
|
2544
2545
|
}, [e, r]);
|
|
2545
|
-
return /* @__PURE__ */ i(
|
|
2546
|
-
/* @__PURE__ */ i(
|
|
2547
|
-
/* @__PURE__ */ F(
|
|
2548
|
-
/* @__PURE__ */ i(
|
|
2546
|
+
return /* @__PURE__ */ i(vi, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(wi, { container: t, children: /* @__PURE__ */ F("div", { className: xe["rp-dialog-wrapper"], children: [
|
|
2547
|
+
/* @__PURE__ */ i(_i, { className: xe["rp-dialog-overlay"] }),
|
|
2548
|
+
/* @__PURE__ */ F(bi, { className: xe["rp-document-dialog"], children: [
|
|
2549
|
+
/* @__PURE__ */ i(Ci, { className: xe["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
|
|
2549
2550
|
/* @__PURE__ */ i("div", { className: xe["rp-document-properties"], children: a.map((l, s) => /* @__PURE__ */ i("div", { children: l.separate ? /* @__PURE__ */ i("div", { className: xe["rp-properties-divider"] }) : /* @__PURE__ */ i(so, { label: l.label, value: l.value }) }, s)) }),
|
|
2550
|
-
/* @__PURE__ */ i(
|
|
2551
|
+
/* @__PURE__ */ i(Ti, { asChild: !0, className: xe["rp-dialog-close"], children: /* @__PURE__ */ i(ao, {}) })
|
|
2551
2552
|
] })
|
|
2552
2553
|
] }) }) });
|
|
2553
|
-
},
|
|
2554
|
+
}, Si = {
|
|
2554
2555
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2555
|
-
}, nn = ".pdf",
|
|
2556
|
+
}, nn = ".pdf", yi = (e) => URL.createObjectURL(e), xi = async (e) => {
|
|
2556
2557
|
const n = await (await fetch(e)).blob();
|
|
2557
|
-
return
|
|
2558
|
+
return yi(n);
|
|
2558
2559
|
}, Hn = () => {
|
|
2559
2560
|
const { filename: e, pdfSrc: t } = J(), { downloadFilename: n } = hr(), o = (a) => {
|
|
2560
2561
|
const l = n || a;
|
|
@@ -2564,26 +2565,26 @@ const xe = {
|
|
|
2564
2565
|
if (!e || !t)
|
|
2565
2566
|
throw new Error("There is no PDF source to download");
|
|
2566
2567
|
const a = document.createElement("a");
|
|
2567
|
-
a.href = await
|
|
2568
|
+
a.href = await xi(t), a.download = o(e), document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
2568
2569
|
}, [e, t]) };
|
|
2569
2570
|
}, $n = () => {
|
|
2570
2571
|
const { downloadIcon: e } = pe();
|
|
2571
|
-
return e || /* @__PURE__ */ i(
|
|
2572
|
-
}, Gn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(K, { className: t, content: n == null ? void 0 : n.downloadFileTooltip, children: e }),
|
|
2572
|
+
return e || /* @__PURE__ */ i(fo, {});
|
|
2573
|
+
}, Gn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(K, { className: t, content: n == null ? void 0 : n.downloadFileTooltip, children: e }), Ii = ({ download: e, localeMessages: t }) => /* @__PURE__ */ i(Gn, { localeMessages: t, children: /* @__PURE__ */ i(re, { onClick: e, "aria-label": t == null ? void 0 : t.downloadFileTooltip, children: /* @__PURE__ */ i($n, {}) }) }), Ri = ({ download: e, localeMessages: t }) => /* @__PURE__ */ i(be, { onClick: e, children: /* @__PURE__ */ F(Gn, { className: "rp-menu-item", localeMessages: t, children: [
|
|
2573
2574
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i($n, {}) }),
|
|
2574
2575
|
t == null ? void 0 : t.downloadFileLabel
|
|
2575
2576
|
] }) }), qn = () => {
|
|
2576
2577
|
const { download: e } = Hn(), { downloadTool: t = !0 } = ve(), { isSmallScreen: n } = Ce(), { localeMessages: o } = se();
|
|
2577
|
-
return t ? n ? /* @__PURE__ */ i(
|
|
2578
|
+
return t ? n ? /* @__PURE__ */ i(Ri, { download: e, localeMessages: o }) : typeof t == "function" ? /* @__PURE__ */ i(t, { download: e }) : t ? /* @__PURE__ */ i(Ii, { download: e, localeMessages: o }) : null : null;
|
|
2578
2579
|
}, Vn = () => {
|
|
2579
2580
|
const { printIcon: e } = pe();
|
|
2580
|
-
return e || /* @__PURE__ */ i(
|
|
2581
|
-
}, Un = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(K, { className: t, content: n == null ? void 0 : n.printTooltip, children: e }),
|
|
2581
|
+
return e || /* @__PURE__ */ i(go, {});
|
|
2582
|
+
}, Un = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(K, { className: t, content: n == null ? void 0 : n.printTooltip, children: e }), Li = ({ print: e, localeMessages: t }) => /* @__PURE__ */ i(Un, { localeMessages: t, children: /* @__PURE__ */ i(re, { onClick: e, "aria-label": t == null ? void 0 : t.printTooltip, children: /* @__PURE__ */ i(Vn, {}) }) }), Ei = ({ print: e, localeMessages: t }) => /* @__PURE__ */ i(be, { onClick: e, children: /* @__PURE__ */ F(Un, { className: "rp-menu-item", localeMessages: t, children: [
|
|
2582
2583
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Vn, {}) }),
|
|
2583
2584
|
t == null ? void 0 : t.printLabel
|
|
2584
2585
|
] }) }), Bn = () => {
|
|
2585
2586
|
const { print: e, cancel: t, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = tt(), { printTool: l = !0 } = ve(), { isSmallScreen: s } = Ce(), { localeMessages: u } = se();
|
|
2586
|
-
return l ? s ? /* @__PURE__ */ i(
|
|
2587
|
+
return l ? s ? /* @__PURE__ */ i(Ei, { print: e, localeMessages: u }) : typeof l == "function" ? /* @__PURE__ */ i(
|
|
2587
2588
|
l,
|
|
2588
2589
|
{
|
|
2589
2590
|
print: e,
|
|
@@ -2593,16 +2594,16 @@ const xe = {
|
|
|
2593
2594
|
setOnComplete: o,
|
|
2594
2595
|
progress: a
|
|
2595
2596
|
}
|
|
2596
|
-
) : l ? /* @__PURE__ */ i(
|
|
2597
|
-
},
|
|
2597
|
+
) : l ? /* @__PURE__ */ i(Li, { print: e, localeMessages: u }) : null : null;
|
|
2598
|
+
}, Ni = {
|
|
2598
2599
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2599
|
-
}, Ni = () => {
|
|
2600
|
-
const { goToFirstPageIcon: e } = pe();
|
|
2601
|
-
return e || /* @__PURE__ */ i(gn, { className: Ei["rp-go-to-Top"] });
|
|
2602
2600
|
}, Oi = () => {
|
|
2601
|
+
const { goToFirstPageIcon: e } = pe();
|
|
2602
|
+
return e || /* @__PURE__ */ i(gn, { className: Ni["rp-go-to-Top"] });
|
|
2603
|
+
}, Di = () => {
|
|
2603
2604
|
const { goToLastPageIcon: e } = pe();
|
|
2604
2605
|
return e || /* @__PURE__ */ i(gn, {});
|
|
2605
|
-
}, rn = { width: "100%" },
|
|
2606
|
+
}, rn = { width: "100%" }, zi = () => {
|
|
2606
2607
|
const { goToPage: e, totalPages: t, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } = ve(), { localeMessages: r } = se(), a = W(() => n === 1, [n]), l = W(() => n === t, [n, t]), s = N(() => {
|
|
2607
2608
|
e(1);
|
|
2608
2609
|
}, [e]), u = N(() => {
|
|
@@ -2610,16 +2611,16 @@ const xe = {
|
|
|
2610
2611
|
}, [e, t]);
|
|
2611
2612
|
return o ? /* @__PURE__ */ F(Ke, { children: [
|
|
2612
2613
|
/* @__PURE__ */ i(be, { onClick: s, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.firstPageTooltip, style: rn, children: /* @__PURE__ */ F("div", { className: "rp-menu-item", "aria-disabled": a, children: [
|
|
2613
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2614
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Oi, {}) }),
|
|
2614
2615
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
|
|
2615
2616
|
] }) }) }),
|
|
2616
2617
|
/* @__PURE__ */ i(be, { onClick: u, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.lastPageTooltip, style: rn, children: /* @__PURE__ */ F("div", { className: "rp-menu-item", "aria-disabled": l, children: [
|
|
2617
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2618
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Di, {}) }),
|
|
2618
2619
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
|
|
2619
2620
|
] }) }) }),
|
|
2620
2621
|
/* @__PURE__ */ i(yt, {})
|
|
2621
2622
|
] }) : null;
|
|
2622
|
-
},
|
|
2623
|
+
}, Ai = () => {
|
|
2623
2624
|
const { container: e } = ge(), { isSmallScreen: t } = Ce(), {
|
|
2624
2625
|
openFileTool: n,
|
|
2625
2626
|
downloadTool: o,
|
|
@@ -2650,7 +2651,7 @@ const xe = {
|
|
|
2650
2651
|
{
|
|
2651
2652
|
container: e,
|
|
2652
2653
|
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: v == null ? void 0 : v.moreOptionTooltip, children: /* @__PURE__ */ i(re, { "aria-label": v == null ? void 0 : v.moreOptionTooltip, children: /* @__PURE__ */ i(Kr, {}) }) }) }),
|
|
2653
|
-
children: /* @__PURE__ */ F("div", { className:
|
|
2654
|
+
children: /* @__PURE__ */ F("div", { className: Si["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2654
2655
|
t && /* @__PURE__ */ F(Ke, { children: [
|
|
2655
2656
|
/* @__PURE__ */ i(hn, {}),
|
|
2656
2657
|
/* @__PURE__ */ i(qn, {}),
|
|
@@ -2658,17 +2659,18 @@ const xe = {
|
|
|
2658
2659
|
/* @__PURE__ */ i(fn, {}),
|
|
2659
2660
|
/* @__PURE__ */ i(yt, {})
|
|
2660
2661
|
] }),
|
|
2661
|
-
/* @__PURE__ */ i(
|
|
2662
|
+
/* @__PURE__ */ i(zi, {}),
|
|
2662
2663
|
/* @__PURE__ */ i(po, {}),
|
|
2663
|
-
/* @__PURE__ */ i(
|
|
2664
|
+
/* @__PURE__ */ i(vo, {}),
|
|
2664
2665
|
/* @__PURE__ */ i(ho, {}),
|
|
2666
|
+
/* @__PURE__ */ i(mo, {}),
|
|
2665
2667
|
/* @__PURE__ */ i(uo, {})
|
|
2666
2668
|
] })
|
|
2667
2669
|
}
|
|
2668
2670
|
),
|
|
2669
|
-
/* @__PURE__ */ i(
|
|
2671
|
+
/* @__PURE__ */ i(Pi, {})
|
|
2670
2672
|
] }) : null;
|
|
2671
|
-
},
|
|
2673
|
+
}, Fi = () => {
|
|
2672
2674
|
const { isSmallScreen: e } = Ce();
|
|
2673
2675
|
return /* @__PURE__ */ F(fe, { children: [
|
|
2674
2676
|
/* @__PURE__ */ i(jr, {}),
|
|
@@ -2678,7 +2680,7 @@ const xe = {
|
|
|
2678
2680
|
/* @__PURE__ */ i(Bn, {}),
|
|
2679
2681
|
/* @__PURE__ */ i(fn, {})
|
|
2680
2682
|
] }),
|
|
2681
|
-
/* @__PURE__ */ i(
|
|
2683
|
+
/* @__PURE__ */ i(Ai, {})
|
|
2682
2684
|
] });
|
|
2683
2685
|
}, Ee = {
|
|
2684
2686
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
|
|
@@ -2686,13 +2688,13 @@ const xe = {
|
|
|
2686
2688
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
|
|
2687
2689
|
"rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
|
|
2688
2690
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
|
|
2689
|
-
},
|
|
2691
|
+
}, ki = 25, ft = 1e3, Wi = [50, 75, 100, 125, 150, 200, 300, 400], Mi = () => {
|
|
2690
2692
|
const { zoomInIcon: e } = pe();
|
|
2691
|
-
return e || /* @__PURE__ */ i(vo, {});
|
|
2692
|
-
}, Mi = () => {
|
|
2693
|
-
const { zoomOutIcon: e } = pe();
|
|
2694
2693
|
return e || /* @__PURE__ */ i(wo, {});
|
|
2695
2694
|
}, Hi = () => {
|
|
2695
|
+
const { zoomOutIcon: e } = pe();
|
|
2696
|
+
return e || /* @__PURE__ */ i(_o, {});
|
|
2697
|
+
}, $i = () => {
|
|
2696
2698
|
const { zoomLevel: e, setZoomLevel: t } = Qe(), { container: n, contentRef: o } = ge(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = ie(), { rotate: l } = Ge(), { pages: s } = J(), { isSmallScreen: u } = Ce(), { localeMessages: p } = se(), { viewMode: m } = ze(), v = N(() => {
|
|
2697
2699
|
t((d) => {
|
|
2698
2700
|
const f = Math.floor(d / 25) * 25;
|
|
@@ -2703,12 +2705,12 @@ const xe = {
|
|
|
2703
2705
|
const f = Math.ceil(d / 25) * 25;
|
|
2704
2706
|
return Math.min(f - 25, ft);
|
|
2705
2707
|
});
|
|
2706
|
-
}, [t]), _ = W(() => e ===
|
|
2708
|
+
}, [t]), _ = W(() => e === ki, [e]), T = W(() => e === ft, [e]), S = W(() => {
|
|
2707
2709
|
var d;
|
|
2708
2710
|
return (d = s.get(a)) == null ? void 0 : d.page.getViewport({ scale: 1, rotation: l });
|
|
2709
2711
|
}, [s, a, l]), C = N(
|
|
2710
2712
|
(d) => {
|
|
2711
|
-
const f = ((S == null ? void 0 : S.width) || 0) + 2 * Mt, g = ((S == null ? void 0 : S.height) || 0) + 2 * Mt, c = (o == null ? void 0 : o.clientWidth) || 0, b = (o == null ? void 0 : o.clientHeight) || 0, w =
|
|
2713
|
+
const f = ((S == null ? void 0 : S.width) || 0) + 2 * Mt, g = ((S == null ? void 0 : S.height) || 0) + 2 * Mt, c = (o == null ? void 0 : o.clientWidth) || 0, b = (o == null ? void 0 : o.clientHeight) || 0, w = bo(
|
|
2712
2714
|
d,
|
|
2713
2715
|
c,
|
|
2714
2716
|
b,
|
|
@@ -2732,7 +2734,7 @@ const xe = {
|
|
|
2732
2734
|
disabled: _,
|
|
2733
2735
|
onClick: h,
|
|
2734
2736
|
"aria-label": p == null ? void 0 : p.zoomOutTooltip,
|
|
2735
|
-
children: /* @__PURE__ */ i(
|
|
2737
|
+
children: /* @__PURE__ */ i(Hi, {})
|
|
2736
2738
|
}
|
|
2737
2739
|
) }),
|
|
2738
2740
|
!u && /* @__PURE__ */ i(
|
|
@@ -2760,7 +2762,7 @@ const xe = {
|
|
|
2760
2762
|
/* @__PURE__ */ i(be, { onClick: () => y(at.PAGE_WIDTH), children: p == null ? void 0 : p.zoomPageWidth })
|
|
2761
2763
|
] }),
|
|
2762
2764
|
/* @__PURE__ */ i(yt, {}),
|
|
2763
|
-
/* @__PURE__ */ i(Ke, { children:
|
|
2765
|
+
/* @__PURE__ */ i(Ke, { children: Wi.map((d) => /* @__PURE__ */ F(be, { onClick: () => y(d), children: [
|
|
2764
2766
|
d,
|
|
2765
2767
|
" %"
|
|
2766
2768
|
] }, d)) })
|
|
@@ -2773,7 +2775,7 @@ const xe = {
|
|
|
2773
2775
|
disabled: T,
|
|
2774
2776
|
onClick: v,
|
|
2775
2777
|
"aria-label": p == null ? void 0 : p.zoomInTooltip,
|
|
2776
|
-
children: /* @__PURE__ */ i(
|
|
2778
|
+
children: /* @__PURE__ */ i(Mi, {})
|
|
2777
2779
|
}
|
|
2778
2780
|
) })
|
|
2779
2781
|
] }) : null;
|
|
@@ -2802,8 +2804,8 @@ const xe = {
|
|
|
2802
2804
|
] });
|
|
2803
2805
|
}, an = () => {
|
|
2804
2806
|
const { searchIcon: e } = pe();
|
|
2805
|
-
return e || /* @__PURE__ */ i(
|
|
2806
|
-
},
|
|
2807
|
+
return e || /* @__PURE__ */ i(Co, {});
|
|
2808
|
+
}, Gi = () => {
|
|
2807
2809
|
const { container: e } = ge(), [t, n] = $(!1), { pdf: o } = J(), [r, a] = $(null), {
|
|
2808
2810
|
searchOptions: l,
|
|
2809
2811
|
setSearchOptions: s,
|
|
@@ -2873,7 +2875,7 @@ const xe = {
|
|
|
2873
2875
|
placeholder: d == null ? void 0 : d.searchInputPlaceholder,
|
|
2874
2876
|
className: Y["rp-search-input"],
|
|
2875
2877
|
ref: a,
|
|
2876
|
-
children: !!C && /* @__PURE__ */ i("span", { className: Y["rp-search-tool-input-clear"], onClick: x, children: /* @__PURE__ */ i(
|
|
2878
|
+
children: !!C && /* @__PURE__ */ i("span", { className: Y["rp-search-tool-input-clear"], onClick: x, children: /* @__PURE__ */ i(To, {}) })
|
|
2877
2879
|
}
|
|
2878
2880
|
) }),
|
|
2879
2881
|
u ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Ct, { className: Y["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: R }),
|
|
@@ -2894,15 +2896,15 @@ const xe = {
|
|
|
2894
2896
|
] })
|
|
2895
2897
|
}
|
|
2896
2898
|
) }) : null;
|
|
2897
|
-
},
|
|
2899
|
+
}, qi = "_loading_vpexk_1", Ne = {
|
|
2898
2900
|
"rp-loading-overlay": "_rp-loading-overlay_vpexk_1",
|
|
2899
2901
|
"rp-loading-modal": "_rp-loading-modal_vpexk_14",
|
|
2900
2902
|
"rp-loading-title": "_rp-loading-title_vpexk_27",
|
|
2901
2903
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_vpexk_35",
|
|
2902
2904
|
"rp-loading-progress": "_rp-loading-progress_vpexk_35",
|
|
2903
2905
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_vpexk_55",
|
|
2904
|
-
loading:
|
|
2905
|
-
},
|
|
2906
|
+
loading: qi
|
|
2907
|
+
}, Vi = ({ percentage: e }) => {
|
|
2906
2908
|
const { cancel: t } = tt(), { localeMessages: n } = se();
|
|
2907
2909
|
return e < 1 ? null : /* @__PURE__ */ i("div", { className: ne(Ne["rp-loading-overlay"]), children: /* @__PURE__ */ F("div", { className: ne(Ne["rp-loading-modal"]), children: [
|
|
2908
2910
|
/* @__PURE__ */ F("div", { className: ne(Ne["rp-loading-title"]), children: [
|
|
@@ -2918,18 +2920,18 @@ const xe = {
|
|
|
2918
2920
|
) }),
|
|
2919
2921
|
/* @__PURE__ */ i("button", { className: ne(Ne["rp-loading-cancel-button"]), onClick: t, children: n == null ? void 0 : n.printCancelLabel })
|
|
2920
2922
|
] }) });
|
|
2921
|
-
},
|
|
2923
|
+
}, Ui = $e((e, t) => {
|
|
2922
2924
|
const { showPrintProgress: n } = ve(), { progress: o } = tt(), { isSmallScreen: r } = Ce(), { percentage: a } = o || {}, l = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2923
2925
|
return /* @__PURE__ */ F("div", { children: [
|
|
2924
2926
|
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: t, className: Fe["rp-toolbar-content"], children: /* @__PURE__ */ F("div", { className: Fe["rp-toolbar-wrapper"], style: l(), children: [
|
|
2925
2927
|
/* @__PURE__ */ F("div", { "data-rp": "topBarLeft", className: Fe["rp-toolbar-start"], children: [
|
|
2926
|
-
/* @__PURE__ */ i(
|
|
2927
|
-
/* @__PURE__ */ i(
|
|
2928
|
+
/* @__PURE__ */ i(Gi, {}),
|
|
2929
|
+
/* @__PURE__ */ i(ai, {})
|
|
2928
2930
|
] }),
|
|
2929
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Fe["rp-toolbar-middle"], children: /* @__PURE__ */ i(
|
|
2930
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Fe["rp-toolbar-end"], children: /* @__PURE__ */ i(
|
|
2931
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Fe["rp-toolbar-middle"], children: /* @__PURE__ */ i($i, {}) }),
|
|
2932
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Fe["rp-toolbar-end"], children: /* @__PURE__ */ i(Fi, {}) })
|
|
2931
2933
|
] }) }),
|
|
2932
|
-
n && a ? /* @__PURE__ */ i(
|
|
2934
|
+
n && a ? /* @__PURE__ */ i(Vi, { percentage: a }) : null
|
|
2933
2935
|
] });
|
|
2934
2936
|
}), gt = {
|
|
2935
2937
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
|
|
@@ -2942,7 +2944,7 @@ const xe = {
|
|
|
2942
2944
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
2943
2945
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
2944
2946
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
2945
|
-
},
|
|
2947
|
+
}, Bi = (e) => {
|
|
2946
2948
|
const { thumbnailSrc: t, pageNumber: n, isFocused: o, viewport: r } = e, { goToPage: a } = ie(), l = W(() => o ? ke["rp-thumbnail-active"] : "", [o]), s = W(() => ({
|
|
2947
2949
|
width: Math.round(r.width),
|
|
2948
2950
|
height: Math.round(r.height)
|
|
@@ -2982,10 +2984,10 @@ const xe = {
|
|
|
2982
2984
|
}, sn = {
|
|
2983
2985
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
2984
2986
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
2985
|
-
},
|
|
2987
|
+
}, Zi = 16, ji = (e, t) => {
|
|
2986
2988
|
const n = e == null ? void 0 : e.querySelector(`#page-${t}`);
|
|
2987
|
-
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) -
|
|
2988
|
-
},
|
|
2989
|
+
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - Zi);
|
|
2990
|
+
}, Ki = $e((e, t) => {
|
|
2989
2991
|
const { show: n } = e, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: l, thumbnailLength: s, addToPage: u } = Cn(), p = H(null), m = H(1);
|
|
2990
2992
|
cn(t, () => p.current);
|
|
2991
2993
|
const v = W(() => Object.values(a), [a]), h = N(() => {
|
|
@@ -2993,11 +2995,11 @@ const xe = {
|
|
|
2993
2995
|
_ <= r && l(_);
|
|
2994
2996
|
}, [l, r, s]);
|
|
2995
2997
|
return k(() => {
|
|
2996
|
-
o > s ? u(o) : n && m.current !== o && (
|
|
2998
|
+
o > s ? u(o) : n && m.current !== o && (ji(p.current, o), m.current = o);
|
|
2997
2999
|
}, [o, s, u, n, v]), fr(p.current, h), /* @__PURE__ */ i("div", { ref: p, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? v.map((_, T) => {
|
|
2998
3000
|
var S, C;
|
|
2999
3001
|
return /* @__PURE__ */ i(
|
|
3000
|
-
|
|
3002
|
+
Bi,
|
|
3001
3003
|
{
|
|
3002
3004
|
isFocused: o === ((S = _.page) == null ? void 0 : S.pageNumber),
|
|
3003
3005
|
pageNumber: (C = _.page) == null ? void 0 : C.pageNumber,
|
|
@@ -3008,10 +3010,10 @@ const xe = {
|
|
|
3008
3010
|
T
|
|
3009
3011
|
);
|
|
3010
3012
|
}) : null }) });
|
|
3011
|
-
}),
|
|
3013
|
+
}), Xi = () => {
|
|
3012
3014
|
const { thumbnailIcon: e } = pe();
|
|
3013
3015
|
return e || /* @__PURE__ */ i(mr, {});
|
|
3014
|
-
},
|
|
3016
|
+
}, Yi = () => {
|
|
3015
3017
|
const { active: e, setActive: t } = Cn(), [n, o] = $(200), r = H(null), { thumbnailTool: a, sidebarEnable: l } = ve(), { localeMessages: s } = se(), u = N(() => {
|
|
3016
3018
|
t((m) => !m);
|
|
3017
3019
|
}, []), p = W(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: u, active: e }) : a ? /* @__PURE__ */ i(K, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
@@ -3020,7 +3022,7 @@ const xe = {
|
|
|
3020
3022
|
onClick: u,
|
|
3021
3023
|
active: e,
|
|
3022
3024
|
"aria-label": s == null ? void 0 : s.thumbnailTooltip,
|
|
3023
|
-
children: /* @__PURE__ */ i(
|
|
3025
|
+
children: /* @__PURE__ */ i(Xi, {})
|
|
3024
3026
|
}
|
|
3025
3027
|
) }) : null, [a, e, u, s]);
|
|
3026
3028
|
return /* @__PURE__ */ i(fe, { children: l && /* @__PURE__ */ F(
|
|
@@ -3038,7 +3040,7 @@ const xe = {
|
|
|
3038
3040
|
hidden: !e,
|
|
3039
3041
|
className: gt["rp-thumbnails-wrapper"],
|
|
3040
3042
|
children: [
|
|
3041
|
-
/* @__PURE__ */ i(
|
|
3043
|
+
/* @__PURE__ */ i(Ki, { show: e, ref: r }),
|
|
3042
3044
|
/* @__PURE__ */ i(gr, { onWidthChange: o, thumbnailRef: r })
|
|
3043
3045
|
]
|
|
3044
3046
|
}
|
|
@@ -3054,7 +3056,7 @@ const xe = {
|
|
|
3054
3056
|
"rp-loader": "_rp-loader_gz5nb_52",
|
|
3055
3057
|
"rp-theme-variables": "_rp-theme-variables_gz5nb_56",
|
|
3056
3058
|
"rp-dark-mode": "_rp-dark-mode_gz5nb_161"
|
|
3057
|
-
},
|
|
3059
|
+
}, Ji = $e(
|
|
3058
3060
|
(e, t) => {
|
|
3059
3061
|
const { children: n, toolbarRef: o, style: r, className: a } = e, { customVariables: l, customDarkVariables: s } = Pr(), { darkMode: u } = rr();
|
|
3060
3062
|
return /* @__PURE__ */ i(
|
|
@@ -3077,7 +3079,7 @@ const xe = {
|
|
|
3077
3079
|
}
|
|
3078
3080
|
);
|
|
3079
3081
|
}
|
|
3080
|
-
),
|
|
3082
|
+
), Bs = $e((e, t) => {
|
|
3081
3083
|
const {
|
|
3082
3084
|
children: n,
|
|
3083
3085
|
slots: o,
|
|
@@ -3091,12 +3093,12 @@ const xe = {
|
|
|
3091
3093
|
} = e, [v, h] = $(null), { setContainer: _, setContentRef: T } = ge(), { loading: S } = J(), { LoaderImageComponent: C } = pn();
|
|
3092
3094
|
return k(() => (u && u(), () => {
|
|
3093
3095
|
p && p();
|
|
3094
|
-
}), [u, p]), /* @__PURE__ */ i(
|
|
3096
|
+
}), [u, p]), /* @__PURE__ */ i(Ji, { toolbarRef: v, ref: t, children: /* @__PURE__ */ i(Tr, { mobileWidth: s, onLayoutWidthChange: m, children: /* @__PURE__ */ i(vr, { slots: o, children: /* @__PURE__ */ i(wr, { icons: r, children: /* @__PURE__ */ F(_r, { getContainerRef: _, style: a, className: l, children: [
|
|
3095
3097
|
/* @__PURE__ */ F(br, { children: [
|
|
3096
3098
|
/* @__PURE__ */ F("div", { className: _e["rp-layout"], children: [
|
|
3097
|
-
/* @__PURE__ */ i(
|
|
3099
|
+
/* @__PURE__ */ i(Ui, { ref: h }),
|
|
3098
3100
|
/* @__PURE__ */ F("div", { className: _e["rp-content"], children: [
|
|
3099
|
-
/* @__PURE__ */ i("div", { className: _e["rp-sidebar"], children: /* @__PURE__ */ i(
|
|
3101
|
+
/* @__PURE__ */ i("div", { className: _e["rp-sidebar"], children: /* @__PURE__ */ i(Yi, {}) }),
|
|
3100
3102
|
/* @__PURE__ */ i("div", { ref: T, className: _e["rp-pages"], children: n })
|
|
3101
3103
|
] })
|
|
3102
3104
|
] }),
|
|
@@ -3133,49 +3135,49 @@ const xe = {
|
|
|
3133
3135
|
] }) }) }) }) });
|
|
3134
3136
|
});
|
|
3135
3137
|
export {
|
|
3136
|
-
|
|
3138
|
+
Do as A,
|
|
3137
3139
|
on as B,
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3140
|
+
Io as C,
|
|
3141
|
+
ei as D,
|
|
3142
|
+
Gi as E,
|
|
3141
3143
|
qn as F,
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3144
|
+
Ui as G,
|
|
3145
|
+
Bi as H,
|
|
3146
|
+
Ki as I,
|
|
3147
|
+
Yi as J,
|
|
3148
|
+
Ji as K,
|
|
3149
|
+
Vi as L,
|
|
3150
|
+
zi as M,
|
|
3151
|
+
Ai as O,
|
|
3152
|
+
Ms as P,
|
|
3153
|
+
qs as R,
|
|
3154
|
+
Gs as S,
|
|
3155
|
+
$s as T,
|
|
3156
|
+
$i as Z,
|
|
3157
|
+
Hs as a,
|
|
3158
|
+
Bs as b,
|
|
3157
3159
|
Hn as c,
|
|
3158
3160
|
tt as d,
|
|
3159
3161
|
xt as e,
|
|
3160
3162
|
vn as f,
|
|
3161
|
-
|
|
3163
|
+
Po as g,
|
|
3162
3164
|
wn as h,
|
|
3163
|
-
|
|
3165
|
+
So as i,
|
|
3164
3166
|
_n as j,
|
|
3165
|
-
|
|
3167
|
+
yo as k,
|
|
3166
3168
|
bn as l,
|
|
3167
3169
|
Cn as m,
|
|
3168
|
-
|
|
3170
|
+
xo as n,
|
|
3169
3171
|
Tn as o,
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
+
Eo as p,
|
|
3173
|
+
Ao as q,
|
|
3172
3174
|
It as r,
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
+
Yo as s,
|
|
3176
|
+
ti as t,
|
|
3175
3177
|
ie as u,
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3178
|
+
ni as v,
|
|
3179
|
+
ai as w,
|
|
3180
|
+
Pi as x,
|
|
3179
3181
|
Bn as y,
|
|
3180
|
-
|
|
3182
|
+
Fi as z
|
|
3181
3183
|
};
|