@react-pdf-kit/viewer 2.0.1-rc.6 → 2.1.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 (94) hide show
  1. package/README.md +49 -84
  2. package/dist/{Combination-17ab8af1.js → Combination-136ff99c.js} +2 -2
  3. package/dist/assets/style.css +1 -1
  4. package/dist/assets/style.js +4 -4
  5. package/dist/components/RPController.js +73 -74
  6. package/dist/components/RPPages.js +544 -545
  7. package/dist/components/layout/RPDefaultLayout.js +6 -6
  8. package/dist/components/layout/RPLayout.js +6 -6
  9. package/dist/components/layout/sidebar/RPSidebar.js +4 -4
  10. package/dist/components/layout/toolbar/DarkModeTool.js +4 -4
  11. package/dist/components/layout/toolbar/DocumentDialog.js +3 -3
  12. package/dist/components/layout/toolbar/DocumentProperties.js +6 -6
  13. package/dist/components/layout/toolbar/FileDownloadTool.js +6 -6
  14. package/dist/components/layout/toolbar/FileUploadTool.js +6 -6
  15. package/dist/components/layout/toolbar/FullScreenTool.js +6 -6
  16. package/dist/components/layout/toolbar/MenuItem.js +6 -6
  17. package/dist/components/layout/toolbar/MenuSeparator.js +6 -6
  18. package/dist/components/layout/toolbar/MostPageTool.js +6 -6
  19. package/dist/components/layout/toolbar/OtherTool.js +6 -6
  20. package/dist/components/layout/toolbar/Paginate.js +4 -4
  21. package/dist/components/layout/toolbar/PrintTool.js +6 -6
  22. package/dist/components/layout/toolbar/RPMenuItem.js +6 -6
  23. package/dist/components/layout/toolbar/RPMoreOptions.js +6 -6
  24. package/dist/components/layout/toolbar/RPToolbar.js +6 -6
  25. package/dist/components/layout/toolbar/RPToolbarEnd.js +6 -6
  26. package/dist/components/layout/toolbar/RotateTool.js +6 -6
  27. package/dist/components/layout/toolbar/ScrollModeTool.js +6 -6
  28. package/dist/components/layout/toolbar/SearchCloseButton.js +4 -4
  29. package/dist/components/layout/toolbar/SearchResultNavigator.js +21 -29
  30. package/dist/components/layout/toolbar/SearchTool.js +102 -99
  31. package/dist/components/layout/toolbar/SelectionModeTool.js +6 -6
  32. package/dist/components/layout/toolbar/ThumbnailTool.js +4 -4
  33. package/dist/components/layout/toolbar/ToolbarDefault.js +6 -6
  34. package/dist/components/layout/toolbar/ToolbarLayout.js +6 -6
  35. package/dist/components/layout/toolbar/ViewModeTool.js +6 -6
  36. package/dist/components/layout/toolbar/ZoomTool.js +6 -6
  37. package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +5 -5
  38. package/dist/components/layout/toolbar/tools/DualPageTool.js +4 -4
  39. package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +6 -6
  40. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +4 -4
  41. package/dist/components/layout/toolbar/tools/FileUploadTool.js +4 -4
  42. package/dist/components/layout/toolbar/tools/FirstPageTool.js +6 -6
  43. package/dist/components/layout/toolbar/tools/FullScreenTool.js +4 -4
  44. package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +4 -4
  45. package/dist/components/layout/toolbar/tools/InputPageTool.js +4 -4
  46. package/dist/components/layout/toolbar/tools/LastPageTool.js +6 -6
  47. package/dist/components/layout/toolbar/tools/NextPageTool.js +4 -4
  48. package/dist/components/layout/toolbar/tools/PageScrollingTool.js +4 -4
  49. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +4 -4
  50. package/dist/components/layout/toolbar/tools/PrintTool.js +4 -4
  51. package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +4 -4
  52. package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +4 -4
  53. package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +4 -4
  54. package/dist/components/layout/toolbar/tools/SinglePageTool.js +4 -4
  55. package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +4 -4
  56. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +4 -4
  57. package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +4 -4
  58. package/dist/components/layout/toolbar/tools/ZoomInTool.js +4 -4
  59. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +6 -6
  60. package/dist/components/layout/toolbar/tools/ZoomOutTool.js +4 -4
  61. package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +6 -6
  62. package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +4 -4
  63. package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +6 -6
  64. package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +6 -6
  65. package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +6 -6
  66. package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +6 -6
  67. package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +6 -6
  68. package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +6 -6
  69. package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +6 -6
  70. package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +6 -6
  71. package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +6 -6
  72. package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +6 -6
  73. package/dist/components/ui/Checkbox.js +2 -2
  74. package/dist/components/ui/DropDown.js +6 -6
  75. package/dist/components/ui/Input.js +10 -10
  76. package/dist/components/ui/RPTooltip.js +411 -197
  77. package/dist/contexts/InitialStateContext.js +6 -8
  78. package/dist/floating-ui.react-dom-5ec29bd6.js +1327 -0
  79. package/dist/index-61f59539.js +1198 -0
  80. package/dist/{index-ada501c4.js → index-655864a7.js} +1 -1
  81. package/dist/{index-113053cf.js → index-c0faa594.js} +2 -2
  82. package/dist/{index-23911b43.js → index-e3ee9457.js} +6 -6
  83. package/dist/main.js +6 -6
  84. package/dist/types/utils/hooks/useWatermark.d.ts +1 -1
  85. package/dist/types/utils/types.d.ts +1 -1
  86. package/dist/utils/highlight.js +36 -36
  87. package/dist/utils/hooks/useHighlight.js +40 -78
  88. package/dist/utils/hooks/useLicense.js +1 -1
  89. package/dist/utils/hooks/usePrint.js +78 -71
  90. package/dist/utils/hooks/useWatermark.js +43 -61
  91. package/dist/utils/injectPrintCSS.js +9 -9
  92. package/package.json +1 -1
  93. package/dist/index-11f3cd64.js +0 -983
  94. package/dist/index-d0f0aa9a.js +0 -1542
@@ -1,37 +1,37 @@
1
- import { jsx as y, jsxs as we, Fragment as at } from "react/jsx-runtime";
2
- import { createElement as ue, PureComponent as lt, Component as ct, memo as ut, useRef as B, useMemo as Ce, useCallback as se, useEffect as te } from "react";
3
- import { RPPage as Se } from "./page/RPPage.js";
4
- import { useVirtualReactWindow as dt } from "../utils/hooks/useVirtualReactWindow.js";
5
- import { useVirtualScrollContext as ft } from "../contexts/VirtualScrollContext.js";
6
- import { a as mt, u as pt } from "../PaginationContext-9217cab4.js";
7
- import { useDocumentContext as ht } from "../contexts/RPDocumentContext.js";
8
- import { useViewModeContext as gt } from "../contexts/ViewModeContext.js";
9
- import { useScrollModeContext as vt } from "../contexts/ScrollModeContext.js";
10
- import { SelectionMode as _t, ViewMode as Ie, ScrollMode as Te, ErrorType as wt } from "../utils/types.js";
11
- import { useFullScreenContext as Ct } from "../contexts/FullScreenContext.js";
1
+ import { jsx as x, jsxs as _e, Fragment as st } from "react/jsx-runtime";
2
+ import { createElement as ue, PureComponent as at, Component as lt, memo as ct, useRef as G, useMemo as we, useCallback as ae, useEffect as ne } from "react";
3
+ import { RPPage as Ce } from "./page/RPPage.js";
4
+ import { useVirtualReactWindow as ut } from "../utils/hooks/useVirtualReactWindow.js";
5
+ import { useVirtualScrollContext as dt } from "../contexts/VirtualScrollContext.js";
6
+ import { a as ft, u as mt } from "../PaginationContext-9217cab4.js";
7
+ import { useDocumentContext as pt } from "../contexts/RPDocumentContext.js";
8
+ import { useViewModeContext as ht } from "../contexts/ViewModeContext.js";
9
+ import { useScrollModeContext as gt } from "../contexts/ScrollModeContext.js";
10
+ import { SelectionMode as vt, ViewMode as Se, ScrollMode as Ie, ErrorType as _t } from "../utils/types.js";
11
+ import { useFullScreenContext as wt } from "../contexts/FullScreenContext.js";
12
12
  import { c as ce } from "../clsx-0c6e471a.js";
13
- import { DualPage as St } from "./page/DualPage.js";
14
- import { DualPageWithCover as It } from "./page/DualPageWithCover.js";
15
- import { SinglePage as Tt } from "./page/SinglePage.js";
16
- import { useMousePressed as Rt } from "../utils/hooks/useMousePressed.js";
17
- import { useSelectionModeContext as xt } from "../contexts/SelectionModeContext.js";
18
- import { useGrabScroll as yt } from "../utils/hooks/useGrabScroll.js";
19
- import { usePinch as bt } from "../utils/hooks/usePinch.js";
20
- import { useInitialStateContext as zt } from "../contexts/InitialStateContext.js";
21
- import { useLayoutContainer as Lt } from "../contexts/LayoutContainerContext.js";
22
- import { useDebounce as Mt } from "../utils/hooks/useDebounce.js";
23
- import { useLoaderContext as Et } from "../contexts/LoaderContext.js";
24
- import Ot from "./ui/PasswordModal.js";
25
- import { usePresentPage as Wt } from "../utils/hooks/usePresentPage.js";
26
- import { getPageFromPosition as At } from "../utils/calculatePage.js";
27
- import { useDocumentPasswordContext as Nt } from "../contexts/DocumentPasswordContext.js";
28
- import { LayoutContainer as Pt } from "./layout/LayoutContainer.js";
29
- import { LayoutWrapper as Ft } from "./layout/LayoutWrapper.js";
30
- import { useEventCallbackContext as Dt } from "../contexts/EventCallbackContext.js";
31
- import { useCopyText as Ht } from "../utils/hooks/useCopyText.js";
32
- import { useTextSelection as kt } from "../utils/hooks/useTextSelection.js";
33
- import { OutputScale as Ut } from "pdfjs-dist";
34
- import { approximateFraction as Ne } from "../utils/approximateFragtion.js";
13
+ import { DualPage as Ct } from "./page/DualPage.js";
14
+ import { DualPageWithCover as St } from "./page/DualPageWithCover.js";
15
+ import { SinglePage as It } from "./page/SinglePage.js";
16
+ import { useMousePressed as Tt } from "../utils/hooks/useMousePressed.js";
17
+ import { useSelectionModeContext as Rt } from "../contexts/SelectionModeContext.js";
18
+ import { useGrabScroll as xt } from "../utils/hooks/useGrabScroll.js";
19
+ import { usePinch as yt } from "../utils/hooks/usePinch.js";
20
+ import { useInitialStateContext as bt } from "../contexts/InitialStateContext.js";
21
+ import { useLayoutContainer as zt } from "../contexts/LayoutContainerContext.js";
22
+ import { useDebounce as Lt } from "../utils/hooks/useDebounce.js";
23
+ import { useLoaderContext as Mt } from "../contexts/LoaderContext.js";
24
+ import Et from "./ui/PasswordModal.js";
25
+ import { usePresentPage as Ot } from "../utils/hooks/usePresentPage.js";
26
+ import { getPageFromPosition as Wt } from "../utils/calculatePage.js";
27
+ import { useDocumentPasswordContext as At } from "../contexts/DocumentPasswordContext.js";
28
+ import { LayoutContainer as Nt } from "./layout/LayoutContainer.js";
29
+ import { LayoutWrapper as Pt } from "./layout/LayoutWrapper.js";
30
+ import { useEventCallbackContext as Ft } from "../contexts/EventCallbackContext.js";
31
+ import { useCopyText as Dt } from "../utils/hooks/useCopyText.js";
32
+ import { useTextSelection as Ht } from "../utils/hooks/useTextSelection.js";
33
+ import { OutputScale as kt } from "pdfjs-dist";
34
+ import { approximateFraction as Ae } from "../utils/approximateFragtion.js";
35
35
  import "./page/CanvasLayer.js";
36
36
  import "../contexts/ZoomContext.js";
37
37
  import "../utils/appConsole.js";
@@ -90,7 +90,7 @@ import "../RPLayout.module-b4b23e29.js";
90
90
  import "../contexts/ThemeContext.js";
91
91
  import "../contexts/DarkModeContext.js";
92
92
  import "../utils/hooks/useDarkMode.js";
93
- const V = {
93
+ const U = {
94
94
  "rp-pages": "_rp-pages_u7m2r_1",
95
95
  "rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_u7m2r_6",
96
96
  "rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_u7m2r_11",
@@ -102,54 +102,54 @@ const V = {
102
102
  "rp-not-supported": "_rp-not-supported_u7m2r_86",
103
103
  "rp-not-supported-content": "_rp-not-supported-content_u7m2r_102"
104
104
  };
105
- function ze() {
106
- return ze = Object.assign ? Object.assign.bind() : function(n) {
105
+ function be() {
106
+ return be = Object.assign ? Object.assign.bind() : function(n) {
107
107
  for (var e = 1; e < arguments.length; e++) {
108
108
  var t = arguments[e];
109
109
  for (var r in t)
110
110
  ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
111
111
  }
112
112
  return n;
113
- }, ze.apply(null, arguments);
113
+ }, be.apply(null, arguments);
114
114
  }
115
- function Pe(n) {
115
+ function Ne(n) {
116
116
  if (n === void 0)
117
117
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
118
118
  return n;
119
119
  }
120
- function Le(n, e) {
121
- return Le = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
120
+ function ze(n, e) {
121
+ return ze = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
122
122
  return t.__proto__ = r, t;
123
- }, Le(n, e);
123
+ }, ze(n, e);
124
124
  }
125
- function Vt(n, e) {
126
- n.prototype = Object.create(e.prototype), n.prototype.constructor = n, Le(n, e);
125
+ function Ut(n, e) {
126
+ n.prototype = Object.create(e.prototype), n.prototype.constructor = n, ze(n, e);
127
127
  }
128
- var Fe = Number.isNaN || function(e) {
128
+ var Pe = Number.isNaN || function(e) {
129
129
  return typeof e == "number" && e !== e;
130
130
  };
131
- function qt(n, e) {
132
- return !!(n === e || Fe(n) && Fe(e));
131
+ function Vt(n, e) {
132
+ return !!(n === e || Pe(n) && Pe(e));
133
133
  }
134
- function Gt(n, e) {
134
+ function qt(n, e) {
135
135
  if (n.length !== e.length)
136
136
  return !1;
137
137
  for (var t = 0; t < n.length; t++)
138
- if (!qt(n[t], e[t]))
138
+ if (!Vt(n[t], e[t]))
139
139
  return !1;
140
140
  return !0;
141
141
  }
142
- function Re(n, e) {
143
- e === void 0 && (e = Gt);
144
- var t, r = [], i, l = !1;
142
+ function Te(n, e) {
143
+ e === void 0 && (e = qt);
144
+ var t, r = [], s, l = !1;
145
145
  function a() {
146
- for (var c = [], d = 0; d < arguments.length; d++)
147
- c[d] = arguments[d];
148
- return l && t === this && e(c, r) || (i = n.apply(this, c), l = !0, t = this, r = c), i;
146
+ for (var c = [], f = 0; f < arguments.length; f++)
147
+ c[f] = arguments[f];
148
+ return l && t === this && e(c, r) || (s = n.apply(this, c), l = !0, t = this, r = c), s;
149
149
  }
150
150
  return a;
151
151
  }
152
- function De(n, e) {
152
+ function Fe(n, e) {
153
153
  if (n == null)
154
154
  return {};
155
155
  var t = {};
@@ -161,131 +161,131 @@ function De(n, e) {
161
161
  }
162
162
  return t;
163
163
  }
164
- var $t = typeof performance == "object" && typeof performance.now == "function", He = $t ? function() {
164
+ var Gt = typeof performance == "object" && typeof performance.now == "function", De = Gt ? function() {
165
165
  return performance.now();
166
166
  } : function() {
167
167
  return Date.now();
168
168
  };
169
- function ke(n) {
169
+ function He(n) {
170
170
  cancelAnimationFrame(n.id);
171
171
  }
172
- function jt(n, e) {
173
- var t = He();
172
+ function $t(n, e) {
173
+ var t = De();
174
174
  function r() {
175
- He() - t >= e ? n.call(null) : i.id = requestAnimationFrame(r);
175
+ De() - t >= e ? n.call(null) : s.id = requestAnimationFrame(r);
176
176
  }
177
- var i = {
177
+ var s = {
178
178
  id: requestAnimationFrame(r)
179
179
  };
180
- return i;
180
+ return s;
181
181
  }
182
- var xe = -1;
183
- function Bt(n) {
184
- if (n === void 0 && (n = !1), xe === -1 || n) {
182
+ var Re = -1;
183
+ function jt(n) {
184
+ if (n === void 0 && (n = !1), Re === -1 || n) {
185
185
  var e = document.createElement("div"), t = e.style;
186
- t.width = "50px", t.height = "50px", t.overflow = "scroll", document.body.appendChild(e), xe = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
186
+ t.width = "50px", t.height = "50px", t.overflow = "scroll", document.body.appendChild(e), Re = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
187
187
  }
188
- return xe;
188
+ return Re;
189
189
  }
190
- var ne = null;
191
- function Ue(n) {
192
- if (n === void 0 && (n = !1), ne === null || n) {
190
+ var se = null;
191
+ function ke(n) {
192
+ if (n === void 0 && (n = !1), se === null || n) {
193
193
  var e = document.createElement("div"), t = e.style;
194
194
  t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
195
- var r = document.createElement("div"), i = r.style;
196
- return i.width = "100px", i.height = "100px", e.appendChild(r), document.body.appendChild(e), e.scrollLeft > 0 ? ne = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? ne = "negative" : ne = "positive-ascending"), document.body.removeChild(e), ne;
195
+ var r = document.createElement("div"), s = r.style;
196
+ return s.width = "100px", s.height = "100px", e.appendChild(r), document.body.appendChild(e), e.scrollLeft > 0 ? se = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? se = "negative" : se = "positive-ascending"), document.body.removeChild(e), se;
197
197
  }
198
- return ne;
198
+ return se;
199
199
  }
200
- var Kt = 150, Zt = function(e) {
200
+ var Bt = 150, Kt = function(e) {
201
201
  var t = e.columnIndex;
202
202
  e.data;
203
203
  var r = e.rowIndex;
204
204
  return r + ":" + t;
205
205
  }, de = null, fe = null, me = null;
206
206
  process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (de = /* @__PURE__ */ new WeakSet(), fe = /* @__PURE__ */ new WeakSet(), me = /* @__PURE__ */ new WeakSet());
207
- function Jt(n) {
208
- var e, t = n.getColumnOffset, r = n.getColumnStartIndexForOffset, i = n.getColumnStopIndexForStartIndex, l = n.getColumnWidth, a = n.getEstimatedTotalHeight, c = n.getEstimatedTotalWidth, d = n.getOffsetForColumnAndAlignment, v = n.getOffsetForRowAndAlignment, g = n.getRowHeight, S = n.getRowOffset, s = n.getRowStartIndexForOffset, h = n.getRowStopIndexForStartIndex, W = n.initInstanceProps, _ = n.shouldResetStyleCacheOnItemSizeChange, N = n.validateProps;
207
+ function Zt(n) {
208
+ var e, t = n.getColumnOffset, r = n.getColumnStartIndexForOffset, s = n.getColumnStopIndexForStartIndex, l = n.getColumnWidth, a = n.getEstimatedTotalHeight, c = n.getEstimatedTotalWidth, f = n.getOffsetForColumnAndAlignment, g = n.getOffsetForRowAndAlignment, h = n.getRowHeight, _ = n.getRowOffset, i = n.getRowStartIndexForOffset, y = n.getRowStopIndexForStartIndex, w = n.initInstanceProps, S = n.shouldResetStyleCacheOnItemSizeChange, D = n.validateProps;
209
209
  return e = /* @__PURE__ */ function(b) {
210
- Vt(T, b);
211
- function T(A) {
210
+ Ut(I, b);
211
+ function I(A) {
212
212
  var o;
213
- return o = b.call(this, A) || this, o._instanceProps = W(o.props, Pe(o)), o._resetIsScrollingTimeoutId = null, o._outerRef = void 0, o.state = {
214
- instance: Pe(o),
213
+ return o = b.call(this, A) || this, o._instanceProps = w(o.props, Ne(o)), o._resetIsScrollingTimeoutId = null, o._outerRef = void 0, o.state = {
214
+ instance: Ne(o),
215
215
  isScrolling: !1,
216
216
  horizontalScrollDirection: "forward",
217
217
  scrollLeft: typeof o.props.initialScrollLeft == "number" ? o.props.initialScrollLeft : 0,
218
218
  scrollTop: typeof o.props.initialScrollTop == "number" ? o.props.initialScrollTop : 0,
219
219
  scrollUpdateWasRequested: !1,
220
220
  verticalScrollDirection: "forward"
221
- }, o._callOnItemsRendered = void 0, o._callOnItemsRendered = Re(function(f, u, m, w, p, R, L, O) {
221
+ }, o._callOnItemsRendered = void 0, o._callOnItemsRendered = Te(function(u, d, m, C, p, T, z, L) {
222
222
  return o.props.onItemsRendered({
223
- overscanColumnStartIndex: f,
224
- overscanColumnStopIndex: u,
223
+ overscanColumnStartIndex: u,
224
+ overscanColumnStopIndex: d,
225
225
  overscanRowStartIndex: m,
226
- overscanRowStopIndex: w,
226
+ overscanRowStopIndex: C,
227
227
  visibleColumnStartIndex: p,
228
- visibleColumnStopIndex: R,
229
- visibleRowStartIndex: L,
230
- visibleRowStopIndex: O
228
+ visibleColumnStopIndex: T,
229
+ visibleRowStartIndex: z,
230
+ visibleRowStopIndex: L
231
231
  });
232
- }), o._callOnScroll = void 0, o._callOnScroll = Re(function(f, u, m, w, p) {
232
+ }), o._callOnScroll = void 0, o._callOnScroll = Te(function(u, d, m, C, p) {
233
233
  return o.props.onScroll({
234
234
  horizontalScrollDirection: m,
235
- scrollLeft: f,
236
- scrollTop: u,
237
- verticalScrollDirection: w,
235
+ scrollLeft: u,
236
+ scrollTop: d,
237
+ verticalScrollDirection: C,
238
238
  scrollUpdateWasRequested: p
239
239
  });
240
- }), o._getItemStyle = void 0, o._getItemStyle = function(f, u) {
241
- var m = o.props, w = m.columnWidth, p = m.direction, R = m.rowHeight, L = o._getItemStyleCache(_ && w, _ && p, _ && R), O = f + ":" + u, x;
242
- if (L.hasOwnProperty(O))
243
- x = L[O];
240
+ }), o._getItemStyle = void 0, o._getItemStyle = function(u, d) {
241
+ var m = o.props, C = m.columnWidth, p = m.direction, T = m.rowHeight, z = o._getItemStyleCache(S && C, S && p, S && T), L = u + ":" + d, M;
242
+ if (z.hasOwnProperty(L))
243
+ M = z[L];
244
244
  else {
245
- var M = t(o.props, u, o._instanceProps), I = p === "rtl";
246
- L[O] = x = {
245
+ var E = t(o.props, d, o._instanceProps), R = p === "rtl";
246
+ z[L] = M = {
247
247
  position: "absolute",
248
- left: I ? void 0 : M,
249
- right: I ? M : void 0,
250
- top: S(o.props, f, o._instanceProps),
251
- height: g(o.props, f, o._instanceProps),
252
- width: l(o.props, u, o._instanceProps)
248
+ left: R ? void 0 : E,
249
+ right: R ? E : void 0,
250
+ top: _(o.props, u, o._instanceProps),
251
+ height: h(o.props, u, o._instanceProps),
252
+ width: l(o.props, d, o._instanceProps)
253
253
  };
254
254
  }
255
- return x;
256
- }, o._getItemStyleCache = void 0, o._getItemStyleCache = Re(function(f, u, m) {
255
+ return M;
256
+ }, o._getItemStyleCache = void 0, o._getItemStyleCache = Te(function(u, d, m) {
257
257
  return {};
258
- }), o._onScroll = function(f) {
259
- var u = f.currentTarget, m = u.clientHeight, w = u.clientWidth, p = u.scrollLeft, R = u.scrollTop, L = u.scrollHeight, O = u.scrollWidth;
260
- o.setState(function(x) {
261
- if (x.scrollLeft === p && x.scrollTop === R)
258
+ }), o._onScroll = function(u) {
259
+ var d = u.currentTarget, m = d.clientHeight, C = d.clientWidth, p = d.scrollLeft, T = d.scrollTop, z = d.scrollHeight, L = d.scrollWidth;
260
+ o.setState(function(M) {
261
+ if (M.scrollLeft === p && M.scrollTop === T)
262
262
  return null;
263
- var M = o.props.direction, I = p;
264
- if (M === "rtl")
265
- switch (Ue()) {
263
+ var E = o.props.direction, R = p;
264
+ if (E === "rtl")
265
+ switch (ke()) {
266
266
  case "negative":
267
- I = -p;
267
+ R = -p;
268
268
  break;
269
269
  case "positive-descending":
270
- I = O - w - p;
270
+ R = L - C - p;
271
271
  break;
272
272
  }
273
- I = Math.max(0, Math.min(I, O - w));
274
- var P = Math.max(0, Math.min(R, L - m));
273
+ R = Math.max(0, Math.min(R, L - C));
274
+ var F = Math.max(0, Math.min(T, z - m));
275
275
  return {
276
276
  isScrolling: !0,
277
- horizontalScrollDirection: x.scrollLeft < p ? "forward" : "backward",
278
- scrollLeft: I,
279
- scrollTop: P,
280
- verticalScrollDirection: x.scrollTop < R ? "forward" : "backward",
277
+ horizontalScrollDirection: M.scrollLeft < p ? "forward" : "backward",
278
+ scrollLeft: R,
279
+ scrollTop: F,
280
+ verticalScrollDirection: M.scrollTop < T ? "forward" : "backward",
281
281
  scrollUpdateWasRequested: !1
282
282
  };
283
283
  }, o._resetIsScrollingDebounced);
284
- }, o._outerRefSetter = function(f) {
285
- var u = o.props.outerRef;
286
- o._outerRef = f, typeof u == "function" ? u(f) : u != null && typeof u == "object" && u.hasOwnProperty("current") && (u.current = f);
284
+ }, o._outerRefSetter = function(u) {
285
+ var d = o.props.outerRef;
286
+ o._outerRef = u, typeof d == "function" ? d(u) : d != null && typeof d == "object" && d.hasOwnProperty("current") && (d.current = u);
287
287
  }, o._resetIsScrollingDebounced = function() {
288
- o._resetIsScrollingTimeoutId !== null && ke(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId = jt(o._resetIsScrolling, Kt);
288
+ o._resetIsScrollingTimeoutId !== null && He(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId = $t(o._resetIsScrolling, Bt);
289
289
  }, o._resetIsScrolling = function() {
290
290
  o._resetIsScrollingTimeoutId = null, o.setState({
291
291
  isScrolling: !1
@@ -294,269 +294,269 @@ function Jt(n) {
294
294
  });
295
295
  }, o;
296
296
  }
297
- T.getDerivedStateFromProps = function(o, f) {
298
- return Qt(o, f), N(o), null;
297
+ I.getDerivedStateFromProps = function(o, u) {
298
+ return Jt(o, u), D(o), null;
299
299
  };
300
- var z = T.prototype;
301
- return z.scrollTo = function(o) {
302
- var f = o.scrollLeft, u = o.scrollTop;
303
- f !== void 0 && (f = Math.max(0, f)), u !== void 0 && (u = Math.max(0, u)), this.setState(function(m) {
304
- return f === void 0 && (f = m.scrollLeft), u === void 0 && (u = m.scrollTop), m.scrollLeft === f && m.scrollTop === u ? null : {
305
- horizontalScrollDirection: m.scrollLeft < f ? "forward" : "backward",
306
- scrollLeft: f,
307
- scrollTop: u,
300
+ var W = I.prototype;
301
+ return W.scrollTo = function(o) {
302
+ var u = o.scrollLeft, d = o.scrollTop;
303
+ u !== void 0 && (u = Math.max(0, u)), d !== void 0 && (d = Math.max(0, d)), this.setState(function(m) {
304
+ return u === void 0 && (u = m.scrollLeft), d === void 0 && (d = m.scrollTop), m.scrollLeft === u && m.scrollTop === d ? null : {
305
+ horizontalScrollDirection: m.scrollLeft < u ? "forward" : "backward",
306
+ scrollLeft: u,
307
+ scrollTop: d,
308
308
  scrollUpdateWasRequested: !0,
309
- verticalScrollDirection: m.scrollTop < u ? "forward" : "backward"
309
+ verticalScrollDirection: m.scrollTop < d ? "forward" : "backward"
310
310
  };
311
311
  }, this._resetIsScrollingDebounced);
312
- }, z.scrollToItem = function(o) {
313
- var f = o.align, u = f === void 0 ? "auto" : f, m = o.columnIndex, w = o.rowIndex, p = this.props, R = p.columnCount, L = p.height, O = p.rowCount, x = p.width, M = this.state, I = M.scrollLeft, P = M.scrollTop, k = Bt();
314
- m !== void 0 && (m = Math.max(0, Math.min(m, R - 1))), w !== void 0 && (w = Math.max(0, Math.min(w, O - 1)));
315
- var F = a(this.props, this._instanceProps), H = c(this.props, this._instanceProps), D = H > x ? k : 0, U = F > L ? k : 0;
312
+ }, W.scrollToItem = function(o) {
313
+ var u = o.align, d = u === void 0 ? "auto" : u, m = o.columnIndex, C = o.rowIndex, p = this.props, T = p.columnCount, z = p.height, L = p.rowCount, M = p.width, E = this.state, R = E.scrollLeft, F = E.scrollTop, P = jt();
314
+ m !== void 0 && (m = Math.max(0, Math.min(m, T - 1))), C !== void 0 && (C = Math.max(0, Math.min(C, L - 1)));
315
+ var H = a(this.props, this._instanceProps), N = c(this.props, this._instanceProps), k = N > M ? P : 0, Z = H > z ? P : 0;
316
316
  this.scrollTo({
317
- scrollLeft: m !== void 0 ? d(this.props, m, u, I, this._instanceProps, U) : I,
318
- scrollTop: w !== void 0 ? v(this.props, w, u, P, this._instanceProps, D) : P
317
+ scrollLeft: m !== void 0 ? f(this.props, m, d, R, this._instanceProps, Z) : R,
318
+ scrollTop: C !== void 0 ? g(this.props, C, d, F, this._instanceProps, k) : F
319
319
  });
320
- }, z.componentDidMount = function() {
321
- var o = this.props, f = o.initialScrollLeft, u = o.initialScrollTop;
320
+ }, W.componentDidMount = function() {
321
+ var o = this.props, u = o.initialScrollLeft, d = o.initialScrollTop;
322
322
  if (this._outerRef != null) {
323
323
  var m = this._outerRef;
324
- typeof f == "number" && (m.scrollLeft = f), typeof u == "number" && (m.scrollTop = u);
324
+ typeof u == "number" && (m.scrollLeft = u), typeof d == "number" && (m.scrollTop = d);
325
325
  }
326
326
  this._callPropsCallbacks();
327
- }, z.componentDidUpdate = function() {
328
- var o = this.props.direction, f = this.state, u = f.scrollLeft, m = f.scrollTop, w = f.scrollUpdateWasRequested;
329
- if (w && this._outerRef != null) {
327
+ }, W.componentDidUpdate = function() {
328
+ var o = this.props.direction, u = this.state, d = u.scrollLeft, m = u.scrollTop, C = u.scrollUpdateWasRequested;
329
+ if (C && this._outerRef != null) {
330
330
  var p = this._outerRef;
331
331
  if (o === "rtl")
332
- switch (Ue()) {
332
+ switch (ke()) {
333
333
  case "negative":
334
- p.scrollLeft = -u;
334
+ p.scrollLeft = -d;
335
335
  break;
336
336
  case "positive-ascending":
337
- p.scrollLeft = u;
337
+ p.scrollLeft = d;
338
338
  break;
339
339
  default:
340
- var R = p.clientWidth, L = p.scrollWidth;
341
- p.scrollLeft = L - R - u;
340
+ var T = p.clientWidth, z = p.scrollWidth;
341
+ p.scrollLeft = z - T - d;
342
342
  break;
343
343
  }
344
344
  else
345
- p.scrollLeft = Math.max(0, u);
345
+ p.scrollLeft = Math.max(0, d);
346
346
  p.scrollTop = Math.max(0, m);
347
347
  }
348
348
  this._callPropsCallbacks();
349
- }, z.componentWillUnmount = function() {
350
- this._resetIsScrollingTimeoutId !== null && ke(this._resetIsScrollingTimeoutId);
351
- }, z.render = function() {
352
- var o = this.props, f = o.children, u = o.className, m = o.columnCount, w = o.direction, p = o.height, R = o.innerRef, L = o.innerElementType, O = o.innerTagName, x = o.itemData, M = o.itemKey, I = M === void 0 ? Zt : M, P = o.outerElementType, k = o.outerTagName, F = o.rowCount, H = o.style, D = o.useIsScrolling, U = o.width, re = this.state.isScrolling, Q = this._getHorizontalRangeToRender(), oe = Q[0], ae = Q[1], $ = this._getVerticalRangeToRender(), pe = $[0], X = $[1], Z = [];
353
- if (m > 0 && F)
354
- for (var G = pe; G <= X; G++)
355
- for (var J = oe; J <= ae; J++)
356
- Z.push(ue(f, {
357
- columnIndex: J,
358
- data: x,
359
- isScrolling: D ? re : void 0,
360
- key: I({
361
- columnIndex: J,
362
- data: x,
363
- rowIndex: G
349
+ }, W.componentWillUnmount = function() {
350
+ this._resetIsScrollingTimeoutId !== null && He(this._resetIsScrollingTimeoutId);
351
+ }, W.render = function() {
352
+ var o = this.props, u = o.children, d = o.className, m = o.columnCount, C = o.direction, p = o.height, T = o.innerRef, z = o.innerElementType, L = o.innerTagName, M = o.itemData, E = o.itemKey, R = E === void 0 ? Kt : E, F = o.outerElementType, P = o.outerTagName, H = o.rowCount, N = o.style, k = o.useIsScrolling, Z = o.width, J = this.state.isScrolling, Q = this._getHorizontalRangeToRender(), ie = Q[0], j = Q[1], le = this._getVerticalRangeToRender(), X = le[0], Y = le[1], ee = [];
353
+ if (m > 0 && H)
354
+ for (var B = X; B <= Y; B++)
355
+ for (var K = ie; K <= j; K++)
356
+ ee.push(ue(u, {
357
+ columnIndex: K,
358
+ data: M,
359
+ isScrolling: k ? J : void 0,
360
+ key: R({
361
+ columnIndex: K,
362
+ data: M,
363
+ rowIndex: B
364
364
  }),
365
- rowIndex: G,
366
- style: this._getItemStyle(G, J)
365
+ rowIndex: B,
366
+ style: this._getItemStyle(B, K)
367
367
  }));
368
- var le = a(this.props, this._instanceProps), he = c(this.props, this._instanceProps);
369
- return ue(P || k || "div", {
370
- className: u,
368
+ var pe = a(this.props, this._instanceProps), te = c(this.props, this._instanceProps);
369
+ return ue(F || P || "div", {
370
+ className: d,
371
371
  onScroll: this._onScroll,
372
372
  ref: this._outerRefSetter,
373
- style: ze({
373
+ style: be({
374
374
  position: "relative",
375
375
  height: p,
376
- width: U,
376
+ width: Z,
377
377
  overflow: "auto",
378
378
  WebkitOverflowScrolling: "touch",
379
379
  willChange: "transform",
380
- direction: w
381
- }, H)
382
- }, ue(L || O || "div", {
383
- children: Z,
384
- ref: R,
380
+ direction: C
381
+ }, N)
382
+ }, ue(z || L || "div", {
383
+ children: ee,
384
+ ref: T,
385
385
  style: {
386
- height: le,
387
- pointerEvents: re ? "none" : void 0,
388
- width: he
386
+ height: pe,
387
+ pointerEvents: J ? "none" : void 0,
388
+ width: te
389
389
  }
390
390
  }));
391
- }, z._callPropsCallbacks = function() {
392
- var o = this.props, f = o.columnCount, u = o.onItemsRendered, m = o.onScroll, w = o.rowCount;
393
- if (typeof u == "function" && f > 0 && w > 0) {
394
- var p = this._getHorizontalRangeToRender(), R = p[0], L = p[1], O = p[2], x = p[3], M = this._getVerticalRangeToRender(), I = M[0], P = M[1], k = M[2], F = M[3];
395
- this._callOnItemsRendered(R, L, I, P, O, x, k, F);
391
+ }, W._callPropsCallbacks = function() {
392
+ var o = this.props, u = o.columnCount, d = o.onItemsRendered, m = o.onScroll, C = o.rowCount;
393
+ if (typeof d == "function" && u > 0 && C > 0) {
394
+ var p = this._getHorizontalRangeToRender(), T = p[0], z = p[1], L = p[2], M = p[3], E = this._getVerticalRangeToRender(), R = E[0], F = E[1], P = E[2], H = E[3];
395
+ this._callOnItemsRendered(T, z, R, F, L, M, P, H);
396
396
  }
397
397
  if (typeof m == "function") {
398
- var H = this.state, D = H.horizontalScrollDirection, U = H.scrollLeft, re = H.scrollTop, Q = H.scrollUpdateWasRequested, oe = H.verticalScrollDirection;
399
- this._callOnScroll(U, re, D, oe, Q);
398
+ var N = this.state, k = N.horizontalScrollDirection, Z = N.scrollLeft, J = N.scrollTop, Q = N.scrollUpdateWasRequested, ie = N.verticalScrollDirection;
399
+ this._callOnScroll(Z, J, k, ie, Q);
400
400
  }
401
- }, z._getHorizontalRangeToRender = function() {
402
- var o = this.props, f = o.columnCount, u = o.overscanColumnCount, m = o.overscanColumnsCount, w = o.overscanCount, p = o.rowCount, R = this.state, L = R.horizontalScrollDirection, O = R.isScrolling, x = R.scrollLeft, M = u || m || w || 1;
403
- if (f === 0 || p === 0)
401
+ }, W._getHorizontalRangeToRender = function() {
402
+ var o = this.props, u = o.columnCount, d = o.overscanColumnCount, m = o.overscanColumnsCount, C = o.overscanCount, p = o.rowCount, T = this.state, z = T.horizontalScrollDirection, L = T.isScrolling, M = T.scrollLeft, E = d || m || C || 1;
403
+ if (u === 0 || p === 0)
404
404
  return [0, 0, 0, 0];
405
- var I = r(this.props, x, this._instanceProps), P = i(this.props, I, x, this._instanceProps), k = !O || L === "backward" ? Math.max(1, M) : 1, F = !O || L === "forward" ? Math.max(1, M) : 1;
406
- return [Math.max(0, I - k), Math.max(0, Math.min(f - 1, P + F)), I, P];
407
- }, z._getVerticalRangeToRender = function() {
408
- var o = this.props, f = o.columnCount, u = o.overscanCount, m = o.overscanRowCount, w = o.overscanRowsCount, p = o.rowCount, R = this.state, L = R.isScrolling, O = R.verticalScrollDirection, x = R.scrollTop, M = m || w || u || 1;
409
- if (f === 0 || p === 0)
405
+ var R = r(this.props, M, this._instanceProps), F = s(this.props, R, M, this._instanceProps), P = !L || z === "backward" ? Math.max(1, E) : 1, H = !L || z === "forward" ? Math.max(1, E) : 1;
406
+ return [Math.max(0, R - P), Math.max(0, Math.min(u - 1, F + H)), R, F];
407
+ }, W._getVerticalRangeToRender = function() {
408
+ var o = this.props, u = o.columnCount, d = o.overscanCount, m = o.overscanRowCount, C = o.overscanRowsCount, p = o.rowCount, T = this.state, z = T.isScrolling, L = T.verticalScrollDirection, M = T.scrollTop, E = m || C || d || 1;
409
+ if (u === 0 || p === 0)
410
410
  return [0, 0, 0, 0];
411
- var I = s(this.props, x, this._instanceProps), P = h(this.props, I, x, this._instanceProps), k = !L || O === "backward" ? Math.max(1, M) : 1, F = !L || O === "forward" ? Math.max(1, M) : 1;
412
- return [Math.max(0, I - k), Math.max(0, Math.min(p - 1, P + F)), I, P];
413
- }, T;
414
- }(lt), e.defaultProps = {
411
+ var R = i(this.props, M, this._instanceProps), F = y(this.props, R, M, this._instanceProps), P = !z || L === "backward" ? Math.max(1, E) : 1, H = !z || L === "forward" ? Math.max(1, E) : 1;
412
+ return [Math.max(0, R - P), Math.max(0, Math.min(p - 1, F + H)), R, F];
413
+ }, I;
414
+ }(at), e.defaultProps = {
415
415
  direction: "ltr",
416
416
  itemData: void 0,
417
417
  useIsScrolling: !1
418
418
  }, e;
419
419
  }
420
- var Qt = function(e, t) {
421
- var r = e.children, i = e.direction, l = e.height, a = e.innerTagName, c = e.outerTagName, d = e.overscanColumnsCount, v = e.overscanCount, g = e.overscanRowsCount, S = e.width, s = t.instance;
420
+ var Jt = function(e, t) {
421
+ var r = e.children, s = e.direction, l = e.height, a = e.innerTagName, c = e.outerTagName, f = e.overscanColumnsCount, g = e.overscanCount, h = e.overscanRowsCount, _ = e.width, i = t.instance;
422
422
  if (process.env.NODE_ENV !== "production") {
423
- if (typeof v == "number" && de && !de.has(s) && (de.add(s), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof g == "number") && fe && !fe.has(s) && (fe.add(s), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (a != null || c != null) && me && !me.has(s) && (me.add(s), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
423
+ if (typeof g == "number" && de && !de.has(i) && (de.add(i), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof f == "number" || typeof h == "number") && fe && !fe.has(i) && (fe.add(i), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (a != null || c != null) && me && !me.has(i) && (me.add(i), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
424
424
  throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
425
- switch (i) {
425
+ switch (s) {
426
426
  case "ltr":
427
427
  case "rtl":
428
428
  break;
429
429
  default:
430
- throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + i + '" was specified.'));
430
+ throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + s + '" was specified.'));
431
431
  }
432
- if (typeof S != "number")
433
- throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (S === null ? "null" : typeof S) + '" was specified.'));
432
+ if (typeof _ != "number")
433
+ throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (_ === null ? "null" : typeof _) + '" was specified.'));
434
434
  if (typeof l != "number")
435
435
  throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (l === null ? "null" : typeof l) + '" was specified.'));
436
436
  }
437
- }, Ve = 50, Ze = function(e, t) {
438
- var r = e.rowCount, i = t.rowMetadataMap, l = t.estimatedRowHeight, a = t.lastMeasuredRowIndex, c = 0;
437
+ }, Ue = 50, Ke = function(e, t) {
438
+ var r = e.rowCount, s = t.rowMetadataMap, l = t.estimatedRowHeight, a = t.lastMeasuredRowIndex, c = 0;
439
439
  if (a >= r && (a = r - 1), a >= 0) {
440
- var d = i[a];
441
- c = d.offset + d.size;
440
+ var f = s[a];
441
+ c = f.offset + f.size;
442
442
  }
443
- var v = r - a - 1, g = v * l;
444
- return c + g;
445
- }, Je = function(e, t) {
446
- var r = e.columnCount, i = t.columnMetadataMap, l = t.estimatedColumnWidth, a = t.lastMeasuredColumnIndex, c = 0;
443
+ var g = r - a - 1, h = g * l;
444
+ return c + h;
445
+ }, Ze = function(e, t) {
446
+ var r = e.columnCount, s = t.columnMetadataMap, l = t.estimatedColumnWidth, a = t.lastMeasuredColumnIndex, c = 0;
447
447
  if (a >= r && (a = r - 1), a >= 0) {
448
- var d = i[a];
449
- c = d.offset + d.size;
448
+ var f = s[a];
449
+ c = f.offset + f.size;
450
450
  }
451
- var v = r - a - 1, g = v * l;
452
- return c + g;
453
- }, K = function(e, t, r, i) {
451
+ var g = r - a - 1, h = g * l;
452
+ return c + h;
453
+ }, $ = function(e, t, r, s) {
454
454
  var l, a, c;
455
- if (e === "column" ? (l = i.columnMetadataMap, a = t.columnWidth, c = i.lastMeasuredColumnIndex) : (l = i.rowMetadataMap, a = t.rowHeight, c = i.lastMeasuredRowIndex), r > c) {
456
- var d = 0;
455
+ if (e === "column" ? (l = s.columnMetadataMap, a = t.columnWidth, c = s.lastMeasuredColumnIndex) : (l = s.rowMetadataMap, a = t.rowHeight, c = s.lastMeasuredRowIndex), r > c) {
456
+ var f = 0;
457
457
  if (c >= 0) {
458
- var v = l[c];
459
- d = v.offset + v.size;
458
+ var g = l[c];
459
+ f = g.offset + g.size;
460
460
  }
461
- for (var g = c + 1; g <= r; g++) {
462
- var S = a(g);
463
- l[g] = {
464
- offset: d,
465
- size: S
466
- }, d += S;
461
+ for (var h = c + 1; h <= r; h++) {
462
+ var _ = a(h);
463
+ l[h] = {
464
+ offset: f,
465
+ size: _
466
+ }, f += _;
467
467
  }
468
- e === "column" ? i.lastMeasuredColumnIndex = r : i.lastMeasuredRowIndex = r;
468
+ e === "column" ? s.lastMeasuredColumnIndex = r : s.lastMeasuredRowIndex = r;
469
469
  }
470
470
  return l[r];
471
- }, qe = function(e, t, r, i) {
471
+ }, Ve = function(e, t, r, s) {
472
472
  var l, a;
473
473
  e === "column" ? (l = r.columnMetadataMap, a = r.lastMeasuredColumnIndex) : (l = r.rowMetadataMap, a = r.lastMeasuredRowIndex);
474
474
  var c = a > 0 ? l[a].offset : 0;
475
- return c >= i ? Qe(e, t, r, a, 0, i) : Xt(e, t, r, Math.max(0, a), i);
476
- }, Qe = function(e, t, r, i, l, a) {
477
- for (; l <= i; ) {
478
- var c = l + Math.floor((i - l) / 2), d = K(e, t, c, r).offset;
479
- if (d === a)
475
+ return c >= s ? Je(e, t, r, a, 0, s) : Qt(e, t, r, Math.max(0, a), s);
476
+ }, Je = function(e, t, r, s, l, a) {
477
+ for (; l <= s; ) {
478
+ var c = l + Math.floor((s - l) / 2), f = $(e, t, c, r).offset;
479
+ if (f === a)
480
480
  return c;
481
- d < a ? l = c + 1 : d > a && (i = c - 1);
481
+ f < a ? l = c + 1 : f > a && (s = c - 1);
482
482
  }
483
483
  return l > 0 ? l - 1 : 0;
484
- }, Xt = function(e, t, r, i, l) {
485
- for (var a = e === "column" ? t.columnCount : t.rowCount, c = 1; i < a && K(e, t, i, r).offset < l; )
486
- i += c, c *= 2;
487
- return Qe(e, t, r, Math.min(i, a - 1), Math.floor(i / 2), l);
488
- }, Ge = function(e, t, r, i, l, a, c) {
489
- var d = e === "column" ? t.width : t.height, v = K(e, t, r, a), g = e === "column" ? Je(t, a) : Ze(t, a), S = Math.max(0, Math.min(g - d, v.offset)), s = Math.max(0, v.offset - d + c + v.size);
490
- switch (i === "smart" && (l >= s - d && l <= S + d ? i = "auto" : i = "center"), i) {
484
+ }, Qt = function(e, t, r, s, l) {
485
+ for (var a = e === "column" ? t.columnCount : t.rowCount, c = 1; s < a && $(e, t, s, r).offset < l; )
486
+ s += c, c *= 2;
487
+ return Je(e, t, r, Math.min(s, a - 1), Math.floor(s / 2), l);
488
+ }, qe = function(e, t, r, s, l, a, c) {
489
+ var f = e === "column" ? t.width : t.height, g = $(e, t, r, a), h = e === "column" ? Ze(t, a) : Ke(t, a), _ = Math.max(0, Math.min(h - f, g.offset)), i = Math.max(0, g.offset - f + c + g.size);
490
+ switch (s === "smart" && (l >= i - f && l <= _ + f ? s = "auto" : s = "center"), s) {
491
491
  case "start":
492
- return S;
492
+ return _;
493
493
  case "end":
494
- return s;
494
+ return i;
495
495
  case "center":
496
- return Math.round(s + (S - s) / 2);
496
+ return Math.round(i + (_ - i) / 2);
497
497
  case "auto":
498
498
  default:
499
- return l >= s && l <= S ? l : s > S || l < s ? s : S;
499
+ return l >= i && l <= _ ? l : i > _ || l < i ? i : _;
500
500
  }
501
- }, Yt = /* @__PURE__ */ Jt({
501
+ }, Xt = /* @__PURE__ */ Zt({
502
502
  getColumnOffset: function(e, t, r) {
503
- return K("column", e, t, r).offset;
503
+ return $("column", e, t, r).offset;
504
504
  },
505
505
  getColumnStartIndexForOffset: function(e, t, r) {
506
- return qe("column", e, r, t);
506
+ return Ve("column", e, r, t);
507
507
  },
508
- getColumnStopIndexForStartIndex: function(e, t, r, i) {
509
- for (var l = e.columnCount, a = e.width, c = K("column", e, t, i), d = r + a, v = c.offset + c.size, g = t; g < l - 1 && v < d; )
510
- g++, v += K("column", e, g, i).size;
511
- return g;
508
+ getColumnStopIndexForStartIndex: function(e, t, r, s) {
509
+ for (var l = e.columnCount, a = e.width, c = $("column", e, t, s), f = r + a, g = c.offset + c.size, h = t; h < l - 1 && g < f; )
510
+ h++, g += $("column", e, h, s).size;
511
+ return h;
512
512
  },
513
513
  getColumnWidth: function(e, t, r) {
514
514
  return r.columnMetadataMap[t].size;
515
515
  },
516
- getEstimatedTotalHeight: Ze,
517
- getEstimatedTotalWidth: Je,
518
- getOffsetForColumnAndAlignment: function(e, t, r, i, l, a) {
519
- return Ge("column", e, t, r, i, l, a);
516
+ getEstimatedTotalHeight: Ke,
517
+ getEstimatedTotalWidth: Ze,
518
+ getOffsetForColumnAndAlignment: function(e, t, r, s, l, a) {
519
+ return qe("column", e, t, r, s, l, a);
520
520
  },
521
- getOffsetForRowAndAlignment: function(e, t, r, i, l, a) {
522
- return Ge("row", e, t, r, i, l, a);
521
+ getOffsetForRowAndAlignment: function(e, t, r, s, l, a) {
522
+ return qe("row", e, t, r, s, l, a);
523
523
  },
524
524
  getRowOffset: function(e, t, r) {
525
- return K("row", e, t, r).offset;
525
+ return $("row", e, t, r).offset;
526
526
  },
527
527
  getRowHeight: function(e, t, r) {
528
528
  return r.rowMetadataMap[t].size;
529
529
  },
530
530
  getRowStartIndexForOffset: function(e, t, r) {
531
- return qe("row", e, r, t);
531
+ return Ve("row", e, r, t);
532
532
  },
533
- getRowStopIndexForStartIndex: function(e, t, r, i) {
534
- for (var l = e.rowCount, a = e.height, c = K("row", e, t, i), d = r + a, v = c.offset + c.size, g = t; g < l - 1 && v < d; )
535
- g++, v += K("row", e, g, i).size;
536
- return g;
533
+ getRowStopIndexForStartIndex: function(e, t, r, s) {
534
+ for (var l = e.rowCount, a = e.height, c = $("row", e, t, s), f = r + a, g = c.offset + c.size, h = t; h < l - 1 && g < f; )
535
+ h++, g += $("row", e, h, s).size;
536
+ return h;
537
537
  },
538
538
  initInstanceProps: function(e, t) {
539
- var r = e, i = r.estimatedColumnWidth, l = r.estimatedRowHeight, a = {
539
+ var r = e, s = r.estimatedColumnWidth, l = r.estimatedRowHeight, a = {
540
540
  columnMetadataMap: {},
541
- estimatedColumnWidth: i || Ve,
542
- estimatedRowHeight: l || Ve,
541
+ estimatedColumnWidth: s || Ue,
542
+ estimatedRowHeight: l || Ue,
543
543
  lastMeasuredColumnIndex: -1,
544
544
  lastMeasuredRowIndex: -1,
545
545
  rowMetadataMap: {}
546
546
  };
547
- return t.resetAfterColumnIndex = function(c, d) {
548
- d === void 0 && (d = !0), t.resetAfterIndices({
547
+ return t.resetAfterColumnIndex = function(c, f) {
548
+ f === void 0 && (f = !0), t.resetAfterIndices({
549
549
  columnIndex: c,
550
- shouldForceUpdate: d
550
+ shouldForceUpdate: f
551
551
  });
552
- }, t.resetAfterRowIndex = function(c, d) {
553
- d === void 0 && (d = !0), t.resetAfterIndices({
552
+ }, t.resetAfterRowIndex = function(c, f) {
553
+ f === void 0 && (f = !0), t.resetAfterIndices({
554
554
  rowIndex: c,
555
- shouldForceUpdate: d
555
+ shouldForceUpdate: f
556
556
  });
557
557
  }, t.resetAfterIndices = function(c) {
558
- var d = c.columnIndex, v = c.rowIndex, g = c.shouldForceUpdate, S = g === void 0 ? !0 : g;
559
- typeof d == "number" && (a.lastMeasuredColumnIndex = Math.min(a.lastMeasuredColumnIndex, d - 1)), typeof v == "number" && (a.lastMeasuredRowIndex = Math.min(a.lastMeasuredRowIndex, v - 1)), t._getItemStyleCache(-1), S && t.forceUpdate();
558
+ var f = c.columnIndex, g = c.rowIndex, h = c.shouldForceUpdate, _ = h === void 0 ? !0 : h;
559
+ typeof f == "number" && (a.lastMeasuredColumnIndex = Math.min(a.lastMeasuredColumnIndex, f - 1)), typeof g == "number" && (a.lastMeasuredRowIndex = Math.min(a.lastMeasuredRowIndex, g - 1)), t._getItemStyleCache(-1), _ && t.forceUpdate();
560
560
  }, a;
561
561
  },
562
562
  shouldResetStyleCacheOnItemSizeChange: !1,
@@ -571,7 +571,7 @@ var Qt = function(e, t) {
571
571
  }
572
572
  });
573
573
  process.env.NODE_ENV;
574
- function $e(n, e) {
574
+ function Ge(n, e) {
575
575
  for (var t in n)
576
576
  if (!(t in e))
577
577
  return !0;
@@ -580,100 +580,100 @@ function $e(n, e) {
580
580
  return !0;
581
581
  return !1;
582
582
  }
583
- var er = ["style"], tr = ["style"];
584
- function rr(n, e) {
585
- var t = n.style, r = De(n, er), i = e.style, l = De(e, tr);
586
- return !$e(t, i) && !$e(r, l);
583
+ var Yt = ["style"], er = ["style"];
584
+ function tr(n, e) {
585
+ var t = n.style, r = Fe(n, Yt), s = e.style, l = Fe(e, er);
586
+ return !Ge(t, s) && !Ge(r, l);
587
587
  }
588
- let q;
589
- typeof window < "u" ? q = window : typeof self < "u" ? q = self : q = global;
590
- let Me = null, Ee = null;
591
- const je = 20, ye = q.clearTimeout, Be = q.setTimeout, be = q.cancelAnimationFrame || q.mozCancelAnimationFrame || q.webkitCancelAnimationFrame, Ke = q.requestAnimationFrame || q.mozRequestAnimationFrame || q.webkitRequestAnimationFrame;
592
- be == null || Ke == null ? (Me = ye, Ee = function(e) {
593
- return Be(e, je);
594
- }) : (Me = function([e, t]) {
595
- be(e), ye(t);
596
- }, Ee = function(e) {
597
- const t = Ke(function() {
598
- ye(r), e();
599
- }), r = Be(function() {
600
- be(t), e();
601
- }, je);
588
+ let V;
589
+ typeof window < "u" ? V = window : typeof self < "u" ? V = self : V = global;
590
+ let Le = null, Me = null;
591
+ const $e = 20, xe = V.clearTimeout, je = V.setTimeout, ye = V.cancelAnimationFrame || V.mozCancelAnimationFrame || V.webkitCancelAnimationFrame, Be = V.requestAnimationFrame || V.mozRequestAnimationFrame || V.webkitRequestAnimationFrame;
592
+ ye == null || Be == null ? (Le = xe, Me = function(e) {
593
+ return je(e, $e);
594
+ }) : (Le = function([e, t]) {
595
+ ye(e), xe(t);
596
+ }, Me = function(e) {
597
+ const t = Be(function() {
598
+ xe(r), e();
599
+ }), r = je(function() {
600
+ ye(t), e();
601
+ }, $e);
602
602
  return [t, r];
603
603
  });
604
- function or(n) {
605
- let e, t, r, i, l, a, c;
606
- const d = typeof document < "u" && document.attachEvent;
607
- if (!d) {
604
+ function rr(n) {
605
+ let e, t, r, s, l, a, c;
606
+ const f = typeof document < "u" && document.attachEvent;
607
+ if (!f) {
608
608
  a = function(b) {
609
- const T = b.__resizeTriggers__, z = T.firstElementChild, A = T.lastElementChild, o = z.firstElementChild;
610
- A.scrollLeft = A.scrollWidth, A.scrollTop = A.scrollHeight, o.style.width = z.offsetWidth + 1 + "px", o.style.height = z.offsetHeight + 1 + "px", z.scrollLeft = z.scrollWidth, z.scrollTop = z.scrollHeight;
609
+ const I = b.__resizeTriggers__, W = I.firstElementChild, A = I.lastElementChild, o = W.firstElementChild;
610
+ A.scrollLeft = A.scrollWidth, A.scrollTop = A.scrollHeight, o.style.width = W.offsetWidth + 1 + "px", o.style.height = W.offsetHeight + 1 + "px", W.scrollLeft = W.scrollWidth, W.scrollTop = W.scrollHeight;
611
611
  }, l = function(b) {
612
612
  return b.offsetWidth !== b.__resizeLast__.width || b.offsetHeight !== b.__resizeLast__.height;
613
613
  }, c = function(b) {
614
614
  if (b.target.className && typeof b.target.className.indexOf == "function" && b.target.className.indexOf("contract-trigger") < 0 && b.target.className.indexOf("expand-trigger") < 0)
615
615
  return;
616
- const T = this;
617
- a(this), this.__resizeRAF__ && Me(this.__resizeRAF__), this.__resizeRAF__ = Ee(function() {
618
- l(T) && (T.__resizeLast__.width = T.offsetWidth, T.__resizeLast__.height = T.offsetHeight, T.__resizeListeners__.forEach(function(o) {
619
- o.call(T, b);
616
+ const I = this;
617
+ a(this), this.__resizeRAF__ && Le(this.__resizeRAF__), this.__resizeRAF__ = Me(function() {
618
+ l(I) && (I.__resizeLast__.width = I.offsetWidth, I.__resizeLast__.height = I.offsetHeight, I.__resizeListeners__.forEach(function(o) {
619
+ o.call(I, b);
620
620
  }));
621
621
  });
622
622
  };
623
- let s = !1, h = "";
623
+ let i = !1, y = "";
624
624
  r = "animationstart";
625
- const W = "Webkit Moz O ms".split(" ");
626
- let _ = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), N = "";
625
+ const w = "Webkit Moz O ms".split(" ");
626
+ let S = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), D = "";
627
627
  {
628
628
  const b = document.createElement("fakeelement");
629
- if (b.style.animationName !== void 0 && (s = !0), s === !1) {
630
- for (let T = 0; T < W.length; T++)
631
- if (b.style[W[T] + "AnimationName"] !== void 0) {
632
- N = W[T], h = "-" + N.toLowerCase() + "-", r = _[T], s = !0;
629
+ if (b.style.animationName !== void 0 && (i = !0), i === !1) {
630
+ for (let I = 0; I < w.length; I++)
631
+ if (b.style[w[I] + "AnimationName"] !== void 0) {
632
+ D = w[I], y = "-" + D.toLowerCase() + "-", r = S[I], i = !0;
633
633
  break;
634
634
  }
635
635
  }
636
636
  }
637
- t = "resizeanim", e = "@" + h + "keyframes " + t + " { from { opacity: 0; } to { opacity: 0; } } ", i = h + "animation: 1ms " + t + "; ";
637
+ t = "resizeanim", e = "@" + y + "keyframes " + t + " { from { opacity: 0; } to { opacity: 0; } } ", s = y + "animation: 1ms " + t + "; ";
638
638
  }
639
- const v = function(s) {
640
- if (!s.getElementById("detectElementResize")) {
641
- const h = (e || "") + ".resize-triggers { " + (i || "") + '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%; }', W = s.head || s.getElementsByTagName("head")[0], _ = s.createElement("style");
642
- _.id = "detectElementResize", _.type = "text/css", n != null && _.setAttribute("nonce", n), _.styleSheet ? _.styleSheet.cssText = h : _.appendChild(s.createTextNode(h)), W.appendChild(_);
639
+ const g = function(i) {
640
+ if (!i.getElementById("detectElementResize")) {
641
+ const y = (e || "") + ".resize-triggers { " + (s || "") + '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%; }', w = i.head || i.getElementsByTagName("head")[0], S = i.createElement("style");
642
+ S.id = "detectElementResize", S.type = "text/css", n != null && S.setAttribute("nonce", n), S.styleSheet ? S.styleSheet.cssText = y : S.appendChild(i.createTextNode(y)), w.appendChild(S);
643
643
  }
644
644
  };
645
645
  return {
646
- addResizeListener: function(s, h) {
647
- if (d)
648
- s.attachEvent("onresize", h);
646
+ addResizeListener: function(i, y) {
647
+ if (f)
648
+ i.attachEvent("onresize", y);
649
649
  else {
650
- if (!s.__resizeTriggers__) {
651
- const W = s.ownerDocument, _ = q.getComputedStyle(s);
652
- _ && _.position === "static" && (s.style.position = "relative"), v(W), s.__resizeLast__ = {}, s.__resizeListeners__ = [], (s.__resizeTriggers__ = W.createElement("div")).className = "resize-triggers";
653
- const N = W.createElement("div");
654
- N.className = "expand-trigger", N.appendChild(W.createElement("div"));
655
- const b = W.createElement("div");
656
- b.className = "contract-trigger", s.__resizeTriggers__.appendChild(N), s.__resizeTriggers__.appendChild(b), s.appendChild(s.__resizeTriggers__), a(s), s.addEventListener("scroll", c, !0), r && (s.__resizeTriggers__.__animationListener__ = function(z) {
657
- z.animationName === t && a(s);
658
- }, s.__resizeTriggers__.addEventListener(r, s.__resizeTriggers__.__animationListener__));
650
+ if (!i.__resizeTriggers__) {
651
+ const w = i.ownerDocument, S = V.getComputedStyle(i);
652
+ S && S.position === "static" && (i.style.position = "relative"), g(w), i.__resizeLast__ = {}, i.__resizeListeners__ = [], (i.__resizeTriggers__ = w.createElement("div")).className = "resize-triggers";
653
+ const D = w.createElement("div");
654
+ D.className = "expand-trigger", D.appendChild(w.createElement("div"));
655
+ const b = w.createElement("div");
656
+ b.className = "contract-trigger", i.__resizeTriggers__.appendChild(D), i.__resizeTriggers__.appendChild(b), i.appendChild(i.__resizeTriggers__), a(i), i.addEventListener("scroll", c, !0), r && (i.__resizeTriggers__.__animationListener__ = function(W) {
657
+ W.animationName === t && a(i);
658
+ }, i.__resizeTriggers__.addEventListener(r, i.__resizeTriggers__.__animationListener__));
659
659
  }
660
- s.__resizeListeners__.push(h);
660
+ i.__resizeListeners__.push(y);
661
661
  }
662
662
  },
663
- removeResizeListener: function(s, h) {
664
- if (d)
665
- s.detachEvent("onresize", h);
666
- else if (s.__resizeListeners__.splice(s.__resizeListeners__.indexOf(h), 1), !s.__resizeListeners__.length) {
667
- s.removeEventListener("scroll", c, !0), s.__resizeTriggers__.__animationListener__ && (s.__resizeTriggers__.removeEventListener(r, s.__resizeTriggers__.__animationListener__), s.__resizeTriggers__.__animationListener__ = null);
663
+ removeResizeListener: function(i, y) {
664
+ if (f)
665
+ i.detachEvent("onresize", y);
666
+ else if (i.__resizeListeners__.splice(i.__resizeListeners__.indexOf(y), 1), !i.__resizeListeners__.length) {
667
+ i.removeEventListener("scroll", c, !0), i.__resizeTriggers__.__animationListener__ && (i.__resizeTriggers__.removeEventListener(r, i.__resizeTriggers__.__animationListener__), i.__resizeTriggers__.__animationListener__ = null);
668
668
  try {
669
- s.__resizeTriggers__ = !s.removeChild(s.__resizeTriggers__);
669
+ i.__resizeTriggers__ = !i.removeChild(i.__resizeTriggers__);
670
670
  } catch {
671
671
  }
672
672
  }
673
673
  }
674
674
  };
675
675
  }
676
- class nr extends ct {
676
+ class or extends lt {
677
677
  constructor(...e) {
678
678
  super(...e), this.state = {
679
679
  height: this.props.defaultHeight || 0,
@@ -683,27 +683,27 @@ class nr extends ct {
683
683
  const {
684
684
  disableHeight: t,
685
685
  disableWidth: r,
686
- onResize: i
686
+ onResize: s
687
687
  } = this.props;
688
688
  if (this._parentNode) {
689
- const l = window.getComputedStyle(this._parentNode) || {}, a = parseFloat(l.paddingLeft || "0"), c = parseFloat(l.paddingRight || "0"), d = parseFloat(l.paddingTop || "0"), v = parseFloat(l.paddingBottom || "0"), g = this._parentNode.getBoundingClientRect(), S = g.height - d - v, s = g.width - a - c;
690
- if (!t && this.state.height !== S || !r && this.state.width !== s) {
689
+ const l = window.getComputedStyle(this._parentNode) || {}, a = parseFloat(l.paddingLeft || "0"), c = parseFloat(l.paddingRight || "0"), f = parseFloat(l.paddingTop || "0"), g = parseFloat(l.paddingBottom || "0"), h = this._parentNode.getBoundingClientRect(), _ = h.height - f - g, i = h.width - a - c;
690
+ if (!t && this.state.height !== _ || !r && this.state.width !== i) {
691
691
  this.setState({
692
- height: S,
693
- width: s
692
+ height: _,
693
+ width: i
694
694
  });
695
- const h = () => {
695
+ const y = () => {
696
696
  this._didLogDeprecationWarning || (this._didLogDeprecationWarning = !0, console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"));
697
697
  };
698
- typeof i == "function" && i({
699
- height: S,
700
- width: s,
698
+ typeof s == "function" && s({
699
+ height: _,
700
+ width: i,
701
701
  // TODO Remove these params in the next major release
702
702
  get scaledHeight() {
703
- return h(), S;
703
+ return y(), _;
704
704
  },
705
705
  get scaledWidth() {
706
- return h(), s;
706
+ return y(), i;
707
707
  }
708
708
  });
709
709
  }
@@ -721,7 +721,7 @@ class nr extends ct {
721
721
  const r = t.ownerDocument.defaultView.ResizeObserver;
722
722
  r != null ? (this._resizeObserver = new r(() => {
723
723
  this._timeoutId = setTimeout(this._onResize, 0);
724
- }), this._resizeObserver.observe(t)) : (this._detectElementResize = or(e), this._detectElementResize.addResizeListener(t, this._onResize)), this._onResize();
724
+ }), this._resizeObserver.observe(t)) : (this._detectElementResize = rr(e), this._detectElementResize.addResizeListener(t, this._onResize)), this._onResize();
725
725
  }
726
726
  }
727
727
  componentWillUnmount() {
@@ -732,60 +732,60 @@ class nr extends ct {
732
732
  children: e,
733
733
  defaultHeight: t,
734
734
  defaultWidth: r,
735
- disableHeight: i = !1,
735
+ disableHeight: s = !1,
736
736
  disableWidth: l = !1,
737
737
  doNotBailOutOnEmptyChildren: a = !1,
738
738
  nonce: c,
739
- onResize: d,
740
- style: v = {},
741
- tagName: g = "div",
742
- ...S
739
+ onResize: f,
740
+ style: g = {},
741
+ tagName: h = "div",
742
+ ..._
743
743
  } = this.props, {
744
- height: s,
745
- width: h
746
- } = this.state, W = {
744
+ height: i,
745
+ width: y
746
+ } = this.state, w = {
747
747
  overflow: "visible"
748
- }, _ = {};
749
- let N = !1;
750
- return i || (s === 0 && (N = !0), W.height = 0, _.height = s, _.scaledHeight = s), l || (h === 0 && (N = !0), W.width = 0, _.width = h, _.scaledWidth = h), a && (N = !1), ue(g, {
748
+ }, S = {};
749
+ let D = !1;
750
+ return s || (i === 0 && (D = !0), w.height = 0, S.height = i, S.scaledHeight = i), l || (y === 0 && (D = !0), w.width = 0, S.width = y, S.scaledWidth = y), a && (D = !1), ue(h, {
751
751
  ref: this._setRef,
752
752
  style: {
753
- ...W,
754
- ...v
753
+ ...w,
754
+ ...g
755
755
  },
756
- ...S
757
- }, !N && e(_));
756
+ ..._
757
+ }, !D && e(S));
758
758
  }
759
759
  }
760
- const ir = ut(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
761
- const i = At(
760
+ const nr = ct(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
761
+ const s = Wt(
762
762
  e,
763
763
  n,
764
764
  t.columnCount,
765
765
  t.isDualPageWithCover
766
766
  );
767
- if (i <= 0)
767
+ if (s <= 0)
768
768
  return null;
769
769
  if (t.isDualPageWithCover) {
770
- const a = i === t.totalPages && t.totalPages % 2 === 0;
771
- if (e === 0 && i === 1 || a && n === 0) {
772
- const d = t.columnWidths.reduce((v, g) => v + g, 0);
773
- return /* @__PURE__ */ y(
770
+ const a = s === t.totalPages && t.totalPages % 2 === 0;
771
+ if (e === 0 && s === 1 || a && n === 0) {
772
+ const f = t.columnWidths.reduce((g, h) => g + h, 0);
773
+ return /* @__PURE__ */ x(
774
774
  "div",
775
775
  {
776
776
  style: {
777
777
  ...r,
778
- width: d,
778
+ width: f,
779
779
  display: "flex",
780
780
  justifyContent: "center",
781
781
  alignItems: "flex-start"
782
782
  },
783
- children: /* @__PURE__ */ y(Se, { style: { position: "relative" }, pageNumber: i }, i)
783
+ children: /* @__PURE__ */ x(Ce, { style: { position: "relative" }, pageNumber: s }, s)
784
784
  }
785
785
  );
786
786
  }
787
787
  }
788
- return t.columnCount === 2 ? /* @__PURE__ */ y(
788
+ return t.columnCount === 2 ? /* @__PURE__ */ x(
789
789
  "div",
790
790
  {
791
791
  style: {
@@ -794,228 +794,227 @@ const ir = ut(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
794
794
  justifyContent: n === 0 ? "flex-end" : "flex-start",
795
795
  alignItems: "flex-start"
796
796
  },
797
- children: /* @__PURE__ */ y(Se, { style: { position: "relative" }, pageNumber: i }, i)
797
+ children: /* @__PURE__ */ x(Ce, { style: { position: "relative" }, pageNumber: s }, s)
798
798
  }
799
- ) : /* @__PURE__ */ y(Se, { style: r, pageNumber: i }, i);
800
- }, rr), jo = () => {
801
- const n = B(new Ut()), { initialPage: e = 1, initialScrollMode: t, instanceId: r } = zt(), { pagesRef: i, setPagesRef: l, setContentRef: a } = Lt(), { scrollToPage: c } = mt();
802
- Ht(i);
799
+ ) : /* @__PURE__ */ x(Ce, { style: r, pageNumber: s }, s);
800
+ }, tr), $o = () => {
801
+ const n = G(new kt()), { initialPage: e = 1, initialScrollMode: t } = bt(), { pagesRef: r, setPagesRef: s, setContentRef: l } = zt(), { scrollToPage: a } = ft();
802
+ Dt(r);
803
803
  const {
804
- virtualScrollRef: d,
805
- getVirtualScrollRef: v,
804
+ virtualScrollRef: c,
805
+ getVirtualScrollRef: f,
806
806
  getPageScrollElementRef: g,
807
- getVirtualScrollableElementRef: S,
808
- setTotalInnerDimensions: s,
809
- virtualScrollableElementRef: h,
810
- totalInnerDimensions: W,
811
- pageScrollElementRef: _
812
- } = ft(), N = B(!0), { nextPage: b, prevPage: T, setFocusedPage: z, focusedPage: A, totalPages: o } = pt(), { scrollMode: f } = vt(), { viewMode: u } = gt(), m = B(null), { loading: w, error: p } = ht(), { passwordRequired: R } = Nt(), { LoaderImageComponent: L } = Et(), O = B(
813
- W
814
- ), x = B({
807
+ getVirtualScrollableElementRef: h,
808
+ setTotalInnerDimensions: _,
809
+ virtualScrollableElementRef: i,
810
+ totalInnerDimensions: y,
811
+ pageScrollElementRef: w
812
+ } = dt(), S = G(!0), { nextPage: D, prevPage: b, setFocusedPage: I, focusedPage: W, totalPages: A } = mt(), { scrollMode: o } = gt(), { viewMode: u } = ht(), d = G(null), { loading: m, error: C } = pt(), { passwordRequired: p } = At(), { LoaderImageComponent: T } = Mt(), z = G(
813
+ y
814
+ ), L = G({
815
815
  viewMode: u,
816
- scrollMode: f
817
- }), M = B(!1), I = B(), { isFullScreen: P } = Ct(), {
818
- pageDimension: k,
819
- rowCount: F,
816
+ scrollMode: o
817
+ }), M = G(!1), E = G(), { isFullScreen: R } = wt(), {
818
+ pageDimension: F,
819
+ rowCount: P,
820
820
  rowHeight: H,
821
- columnCount: D,
822
- columnWidth: U,
823
- estimatedColumnWidth: re,
824
- estimatedRowHeight: Q,
825
- totalDimension: oe
826
- } = dt(), ae = Mt(W, 100), { onScroll: $, onTextSelect: pe } = Dt();
827
- kt({ onTextSelect: pe, pagesRef: i });
828
- const X = B();
829
- Wt(D, F, h, u);
830
- const Z = B({
821
+ columnCount: N,
822
+ columnWidth: k,
823
+ estimatedColumnWidth: Z,
824
+ estimatedRowHeight: J,
825
+ totalDimension: Q
826
+ } = ut(), ie = Lt(y, 100), { onScroll: j, onTextSelect: le } = Ft();
827
+ Ht({ onTextSelect: le, pagesRef: r });
828
+ const X = G();
829
+ Ot(N, P, i, u);
830
+ const Y = G({
831
831
  scrollTop: 0,
832
832
  scrollLeft: 0
833
833
  });
834
- bt(i);
835
- const { isPressed: G } = Rt(), { selectionMode: J } = xt(), { initializeGrabScroll: le, resetGrabState: he } = yt({
836
- isPressed: G
837
- }), ie = Ce(() => J === _t.HAND, [J]), Xe = Ce(() => {
838
- const C = Array.from({ length: D }, (E, j) => U(j));
834
+ yt(r);
835
+ const { isPressed: ee } = Tt(), { selectionMode: B } = Rt(), { initializeGrabScroll: K, resetGrabState: pe } = xt({
836
+ isPressed: ee
837
+ }), te = we(() => B === vt.HAND, [B]), Qe = we(() => {
838
+ const v = Array.from({ length: N }, (O, q) => k(q));
839
839
  return {
840
- columnCount: D,
841
- isDualPageWithCover: u === Ie.DUAL_PAGE_WITH_COVER,
842
- columnWidths: C,
843
- totalPages: o
840
+ columnCount: N,
841
+ isDualPageWithCover: u === Se.DUAL_PAGE_WITH_COVER,
842
+ columnWidths: v,
843
+ totalPages: A
844
844
  };
845
- }, [D, u, U, o]), ge = se(
846
- (C) => {
847
- const E = document.activeElement !== i;
848
- !P && E || (["ArrowUp", "ArrowLeft"].includes(C.key) ? (C.preventDefault(), T()) : ["ArrowDown", "ArrowRight"].includes(C.key) && (C.preventDefault(), b()));
845
+ }, [N, u, k, A]), he = ae(
846
+ (v) => {
847
+ const O = document.activeElement !== r;
848
+ !R && O || (["ArrowUp", "ArrowLeft"].includes(v.key) ? (v.preventDefault(), b()) : ["ArrowDown", "ArrowRight"].includes(v.key) && (v.preventDefault(), D()));
849
849
  },
850
- [b, T, P, f]
850
+ [D, b, R, o]
851
851
  );
852
- te(() => (window.addEventListener("keydown", ge), () => {
853
- window.removeEventListener("keydown", ge);
854
- }), [ge]), te(() => {
855
- if (m.current && (m.current.style.position = "relative"), !!d)
856
- for (let C = 0; C < F; C++)
857
- for (let E = 0; E < D; E++)
858
- d.resetAfterIndices({
859
- columnIndex: E,
860
- rowIndex: C,
852
+ ne(() => (window.addEventListener("keydown", he), () => {
853
+ window.removeEventListener("keydown", he);
854
+ }), [he]), ne(() => {
855
+ if (d.current && (d.current.style.position = "relative"), !!c)
856
+ for (let v = 0; v < P; v++)
857
+ for (let O = 0; O < N; O++)
858
+ c.resetAfterIndices({
859
+ columnIndex: O,
860
+ rowIndex: v,
861
861
  shouldForceUpdate: !0
862
862
  });
863
- }, [F, D, k, d]);
864
- const Ye = se(
865
- (C, E) => {
866
- if (!h)
863
+ }, [P, N, F, c]);
864
+ const Xe = ae(
865
+ (v, O) => {
866
+ if (!i)
867
867
  return { scrollTop: 0, scrollLeft: 0 };
868
- const j = Z.current.scrollTop > E, Y = Z.current.scrollLeft > C;
869
- return j || Y ? Z.current : {
870
- scrollTop: h.scrollTop,
871
- scrollLeft: h.scrollLeft
868
+ const q = Y.current.scrollTop > O, re = Y.current.scrollLeft > v;
869
+ return q || re ? Y.current : {
870
+ scrollTop: i.scrollTop,
871
+ scrollLeft: i.scrollLeft
872
872
  };
873
873
  },
874
- [h]
875
- ), Oe = se(
876
- (C, E) => {
877
- if (x.current.viewMode !== u || x.current.scrollMode !== f) {
878
- X.current && clearTimeout(X.current), M.current = !0, c(A, "auto"), X.current = setTimeout(() => {
874
+ [i]
875
+ ), Ee = ae(
876
+ (v, O) => {
877
+ if (L.current.viewMode !== u || L.current.scrollMode !== o) {
878
+ X.current && clearTimeout(X.current), M.current = !0, a(W, "auto"), X.current = setTimeout(() => {
879
879
  requestAnimationFrame(() => {
880
- x.current = { viewMode: u, scrollMode: f };
880
+ L.current = { viewMode: u, scrollMode: o };
881
881
  });
882
882
  }, 100);
883
883
  return;
884
884
  }
885
- const Y = C.scrollTop, ve = C.scrollLeft;
886
- if (!E.height || !E.width)
885
+ const re = v.scrollTop, ge = v.scrollLeft;
886
+ if (!O.height || !O.width)
887
887
  return;
888
888
  M.current = !0;
889
- const { height: ee, width: _e } = E, { height: We, width: Ae } = O.current;
890
- if (We === ee && Ae === _e)
889
+ const { height: oe, width: ve } = O, { height: Oe, width: We } = z.current;
890
+ if (Oe === oe && We === ve)
891
891
  return;
892
- const ot = Y / We * ee, nt = ve / Ae * _e, it = Math.round(Math.min(ot, ee)) || 0, st = Math.round(Math.min(nt, _e)) || 0;
893
- I.current = setTimeout(() => {
892
+ const rt = re / Oe * oe, ot = ge / We * ve, nt = Math.round(Math.min(rt, oe)) || 0, it = Math.round(Math.min(ot, ve)) || 0;
893
+ E.current = setTimeout(() => {
894
894
  requestAnimationFrame(() => {
895
- h == null || h.scrollTo({
896
- top: it,
897
- left: st,
895
+ i == null || i.scrollTo({
896
+ top: nt,
897
+ left: it,
898
898
  behavior: "auto"
899
899
  });
900
900
  });
901
- }, 0), O.current = {
902
- height: E.height,
903
- width: E.width
901
+ }, 0), z.current = {
902
+ height: O.height,
903
+ width: O.width
904
904
  };
905
905
  },
906
- [h, u, f, c]
906
+ [i, u, o, a]
907
907
  );
908
- te(() => {
909
- clearTimeout(I.current);
910
- const C = Array.from({ length: F }).reduce(
911
- (Y, ve, ee) => Y + H(ee),
908
+ ne(() => {
909
+ clearTimeout(E.current);
910
+ const v = Array.from({ length: P }).reduce(
911
+ (re, ge, oe) => re + H(oe),
912
912
  0
913
- ), E = Array.from({ length: D }).reduce(
914
- (Y, ve, ee) => Y + U(ee),
913
+ ), O = Array.from({ length: N }).reduce(
914
+ (re, ge, oe) => re + k(oe),
915
915
  0
916
- ), j = Ye(E, C);
917
- Z.current = j, Oe(j, { height: C, width: E }), s({
918
- height: C,
919
- width: E
916
+ ), q = Xe(O, v);
917
+ Y.current = q, Ee(q, { height: v, width: O }), _({
918
+ height: v,
919
+ width: O
920
920
  });
921
- }, [k, F, D, Oe]);
922
- const et = se(
923
- (C) => {
924
- Z.current = {
925
- scrollTop: C.scrollTop,
926
- scrollLeft: C.scrollLeft
921
+ }, [F, P, N, Ee]);
922
+ const Ye = ae(
923
+ (v) => {
924
+ Y.current = {
925
+ scrollTop: v.scrollTop,
926
+ scrollLeft: v.scrollLeft
927
927
  };
928
928
  },
929
- [h]
929
+ [i]
930
930
  );
931
- te(() => {
932
- if ($)
933
- return _ && _.addEventListener("scroll", $), h && h.addEventListener("scroll", $), () => {
934
- _ == null || _.removeEventListener("scroll", $), h == null || h.removeEventListener("scroll", $);
931
+ ne(() => {
932
+ if (j)
933
+ return w && w.addEventListener("scroll", j), i && i.addEventListener("scroll", j), () => {
934
+ w == null || w.removeEventListener("scroll", j), i == null || i.removeEventListener("scroll", j);
935
935
  };
936
- }, [h, _, $]), te(() => () => {
936
+ }, [i, w, j]), ne(() => () => {
937
937
  X.current && clearTimeout(X.current);
938
938
  }, []);
939
- const tt = Ce(() => ce(V["rp-pages-container"], {
940
- [V["rp-cursor-grab"]]: ie && !G,
941
- [V["rp-cursor-grabbing"]]: ie && G
942
- }), [ie, G]), rt = se(
943
- (C) => {
944
- if (ie && C) {
945
- const E = ce(V["rp-pages"]), j = document.querySelector(`.${E}`);
946
- le(j);
939
+ const et = we(() => ce(U["rp-pages-container"], {
940
+ [U["rp-cursor-grab"]]: te && !ee,
941
+ [U["rp-cursor-grabbing"]]: te && ee
942
+ }), [te, ee]), tt = ae(
943
+ (v) => {
944
+ if (te && v) {
945
+ const O = ce(U["rp-pages"]), q = document.querySelector(`.${O}`);
946
+ K(q);
947
947
  }
948
948
  },
949
- [ie, le, V]
949
+ [te, K, U]
950
950
  );
951
- return te(() => {
952
- w && he();
953
- }, [w]), te(() => {
954
- if (!(ae.height === 0 || !N.current)) {
955
- if (t === Te.PAGE_SCROLLING) {
956
- e !== A && _ && z(e), N.current = !1;
951
+ return ne(() => {
952
+ m && pe();
953
+ }, [m]), ne(() => {
954
+ if (!(ie.height === 0 || !S.current)) {
955
+ if (t === Ie.PAGE_SCROLLING) {
956
+ e !== W && w && I(e), S.current = !1;
957
957
  return;
958
958
  }
959
- c(e, "auto"), z(e), N.current = !1;
959
+ a(e, "auto"), I(e), S.current = !1;
960
960
  }
961
961
  }, [
962
- c,
962
+ a,
963
963
  t,
964
- _,
965
- z,
966
- ae
967
- ]), /* @__PURE__ */ we(at, { children: [
968
- /* @__PURE__ */ y(Ft, { ref: a, children: /* @__PURE__ */ y(
969
- Pt,
964
+ w,
965
+ I,
966
+ ie
967
+ ]), /* @__PURE__ */ _e(st, { children: [
968
+ /* @__PURE__ */ x(Pt, { ref: l, children: /* @__PURE__ */ x(
969
+ Nt,
970
970
  {
971
- id: r,
972
- ref: l,
971
+ ref: s,
973
972
  tabIndex: -1,
974
- className: tt,
973
+ className: et,
975
974
  style: {
976
- "--scale-round-x": `${Ne(n.current.sx)[1]}px`,
977
- "--scale-round-y": `${Ne(n.current.sy)[1]}px`
975
+ "--scale-round-x": `${Ae(n.current.sx)[1]}px`,
976
+ "--scale-round-y": `${Ae(n.current.sy)[1]}px`
978
977
  },
979
- children: /* @__PURE__ */ y(nr, { style: { minHeight: "50px" }, children: ({ width: C, height: E }) => /* @__PURE__ */ y("div", { "data-rp": "pages", ref: rt, style: { width: C, height: E }, children: f === Te.PAGE_SCROLLING ? /* @__PURE__ */ y(
978
+ children: /* @__PURE__ */ x(or, { style: { minHeight: "50px" }, children: ({ width: v, height: O }) => /* @__PURE__ */ x("div", { "data-rp": "pages", ref: tt, style: { width: v, height: O }, children: o === Ie.PAGE_SCROLLING ? /* @__PURE__ */ x(
980
979
  "div",
981
980
  {
982
981
  ref: g,
983
- style: { width: C, height: E },
984
- className: ce(V["rp-pages"], V["rp-page-scrolling-wrapper"]),
985
- children: u === Ie.DUAL_PAGE ? /* @__PURE__ */ y(St, { widths: U, heights: H }) : u === Ie.DUAL_PAGE_WITH_COVER ? /* @__PURE__ */ y(It, { widths: U, heights: H }) : /* @__PURE__ */ y(Tt, { widths: U, heights: H })
982
+ style: { width: v, height: O },
983
+ className: ce(U["rp-pages"], U["rp-page-scrolling-wrapper"]),
984
+ children: u === Se.DUAL_PAGE ? /* @__PURE__ */ x(Ct, { widths: k, heights: H }) : u === Se.DUAL_PAGE_WITH_COVER ? /* @__PURE__ */ x(St, { widths: k, heights: H }) : /* @__PURE__ */ x(It, { widths: k, heights: H })
986
985
  }
987
- ) : Q ? /* @__PURE__ */ y(
988
- Yt,
986
+ ) : J ? /* @__PURE__ */ x(
987
+ Xt,
989
988
  {
990
- ref: v,
991
- itemData: Xe,
992
- outerRef: S,
993
- innerRef: m,
994
- onScroll: et,
995
- columnCount: D,
996
- columnWidth: U,
989
+ ref: f,
990
+ itemData: Qe,
991
+ outerRef: h,
992
+ innerRef: d,
993
+ onScroll: Ye,
994
+ columnCount: N,
995
+ columnWidth: k,
997
996
  rowHeight: H,
998
- height: E,
999
- width: C,
1000
- estimatedColumnWidth: re,
1001
- estimatedRowHeight: Q,
1002
- rowCount: F,
997
+ height: O,
998
+ width: v,
999
+ estimatedColumnWidth: Z,
1000
+ estimatedRowHeight: J,
1001
+ rowCount: P,
1003
1002
  className: ce(
1004
- V["rp-pages"],
1005
- f === Te.HORIZONTAL_SCROLLING ? V["rp-pages-horizontal-scroll"] : ""
1003
+ U["rp-pages"],
1004
+ o === Ie.HORIZONTAL_SCROLLING ? U["rp-pages-horizontal-scroll"] : ""
1006
1005
  ),
1007
1006
  style: {
1008
- "--rp-pages-height": `${oe.height}px`,
1009
- "--rp-pages-width": `${oe.width}px`,
1010
- "--rp-row-count": `${F}`,
1011
- "--rp-column-count": `${D}`
1007
+ "--rp-pages-height": `${Q.height}px`,
1008
+ "--rp-pages-width": `${Q.width}px`,
1009
+ "--rp-row-count": `${P}`,
1010
+ "--rp-column-count": `${N}`
1012
1011
  },
1013
- children: ir
1012
+ children: nr
1014
1013
  }
1015
- ) : !w && !p ? /* @__PURE__ */ y(
1014
+ ) : !m && !C ? /* @__PURE__ */ x(
1016
1015
  "div",
1017
1016
  {
1018
- className: V["rp-loader"],
1017
+ className: U["rp-loader"],
1019
1018
  style: {
1020
1019
  display: "flex",
1021
1020
  justifyContent: "center",
@@ -1023,24 +1022,24 @@ const ir = ut(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
1023
1022
  height: "100%",
1024
1023
  width: "100%"
1025
1024
  },
1026
- children: L && /* @__PURE__ */ y(L, {})
1025
+ children: T && /* @__PURE__ */ x(T, {})
1027
1026
  }
1028
- ) : p === wt.NOT_SUPPORTED ? /* @__PURE__ */ y("div", { className: V["rp-not-supported"], children: /* @__PURE__ */ we("div", { className: V["rp-not-supported-content"], children: [
1027
+ ) : C === _t.NOT_SUPPORTED ? /* @__PURE__ */ x("div", { className: U["rp-not-supported"], children: /* @__PURE__ */ _e("div", { className: U["rp-not-supported-content"], children: [
1029
1028
  "React PDF is unable to render on this browser. Please use the supported browsers from the list below:",
1030
- /* @__PURE__ */ y("div", { children: /* @__PURE__ */ we("ul", { children: [
1031
- /* @__PURE__ */ y("li", { children: "Chrome 126+" }),
1032
- /* @__PURE__ */ y("li", { children: "Edge 126+" }),
1033
- /* @__PURE__ */ y("li", { children: "Firefox 126+" }),
1034
- /* @__PURE__ */ y("li", { children: "Safari 18.4+" }),
1035
- /* @__PURE__ */ y("li", { children: "Safari iOS 18.4+" }),
1036
- /* @__PURE__ */ y("li", { children: "Chrome Android 126+" })
1029
+ /* @__PURE__ */ x("div", { children: /* @__PURE__ */ _e("ul", { children: [
1030
+ /* @__PURE__ */ x("li", { children: "Chrome 126+" }),
1031
+ /* @__PURE__ */ x("li", { children: "Edge 126+" }),
1032
+ /* @__PURE__ */ x("li", { children: "Firefox 126+" }),
1033
+ /* @__PURE__ */ x("li", { children: "Safari 18.4+" }),
1034
+ /* @__PURE__ */ x("li", { children: "Safari iOS 18.4+" }),
1035
+ /* @__PURE__ */ x("li", { children: "Chrome Android 126+" })
1037
1036
  ] }) })
1038
1037
  ] }) }) : null }) })
1039
1038
  }
1040
1039
  ) }),
1041
- R && /* @__PURE__ */ y(Ot, {})
1040
+ p && /* @__PURE__ */ x(Et, {})
1042
1041
  ] });
1043
1042
  };
1044
1043
  export {
1045
- jo as RPPages
1044
+ $o as RPPages
1046
1045
  };