@pdf-viewer/react 1.14.0 → 1.15.0-beta.1

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