@pdf-viewer/react 1.4.0-beta.7 → 1.4.0-beta.8

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