@pdf-viewer/react 1.8.3 → 1.8.4-rc.1

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