@pdf-viewer/react 1.9.1-rc.1 → 1.9.1-rc.10

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