@react-pdf-kit/viewer 2.6.0-beta.0 → 2.6.0-beta.2
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.
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { jsx as w, jsxs as
|
|
2
|
-
import { createElement as
|
|
3
|
-
import { RPPage as
|
|
4
|
-
import { useVirtualReactWindow as
|
|
5
|
-
import { useVirtualScrollContext as
|
|
6
|
-
import { a as
|
|
7
|
-
import { useDocumentContext as
|
|
8
|
-
import { useViewModeContext as
|
|
9
|
-
import { useScrollModeContext as
|
|
10
|
-
import { SelectionMode as
|
|
11
|
-
import { useFullScreenContext as
|
|
12
|
-
import { c as
|
|
13
|
-
import { DualPage as
|
|
14
|
-
import { DualPageWithCover as
|
|
15
|
-
import { SinglePage as
|
|
16
|
-
import { useMousePressed as
|
|
17
|
-
import { useSelectionModeContext as
|
|
18
|
-
import { useGrabScroll as
|
|
19
|
-
import { usePinch as
|
|
20
|
-
import { useInitialStateContext as
|
|
21
|
-
import { useLayoutContainer as
|
|
22
|
-
import { useDebounce as
|
|
23
|
-
import { useLoaderContext as
|
|
24
|
-
import
|
|
1
|
+
import { jsx as w, jsxs as Ie, Fragment as dt } from "react/jsx-runtime";
|
|
2
|
+
import { createElement as pe, PureComponent as ut, Component as ft, memo as mt, useRef as K, useState as pt, useMemo as Te, useCallback as se, useEffect as Y } from "react";
|
|
3
|
+
import { RPPage as Re } from "./page/RPPage.js";
|
|
4
|
+
import { useVirtualReactWindow as ht } from "../utils/hooks/useVirtualReactWindow.js";
|
|
5
|
+
import { useVirtualScrollContext as gt } from "../contexts/VirtualScrollContext.js";
|
|
6
|
+
import { a as vt, u as _t } from "../PaginationContext-87f832f2.js";
|
|
7
|
+
import { useDocumentContext as wt } from "../contexts/RPDocumentContext.js";
|
|
8
|
+
import { useViewModeContext as Ct } from "../contexts/ViewModeContext.js";
|
|
9
|
+
import { useScrollModeContext as St } from "../contexts/ScrollModeContext.js";
|
|
10
|
+
import { SelectionMode as It, ViewMode as xe, ErrorType as fe, ScrollMode as ye } from "../utils/types.js";
|
|
11
|
+
import { useFullScreenContext as Tt } from "../contexts/FullScreenContext.js";
|
|
12
|
+
import { c as me } from "../clsx-0c6e471a.js";
|
|
13
|
+
import { DualPage as Rt } from "./page/DualPage.js";
|
|
14
|
+
import { DualPageWithCover as xt } from "./page/DualPageWithCover.js";
|
|
15
|
+
import { SinglePage as yt } from "./page/SinglePage.js";
|
|
16
|
+
import { useMousePressed as bt } from "../utils/hooks/useMousePressed.js";
|
|
17
|
+
import { useSelectionModeContext as zt } from "../contexts/SelectionModeContext.js";
|
|
18
|
+
import { useGrabScroll as Lt } from "../utils/hooks/useGrabScroll.js";
|
|
19
|
+
import { usePinch as Mt } from "../utils/hooks/usePinch.js";
|
|
20
|
+
import { useInitialStateContext as Et } from "../contexts/InitialStateContext.js";
|
|
21
|
+
import { useLayoutContainer as Ot } from "../contexts/LayoutContainerContext.js";
|
|
22
|
+
import { useDebounce as Pt } from "../utils/hooks/useDebounce.js";
|
|
23
|
+
import { useLoaderContext as Nt } from "../contexts/LoaderContext.js";
|
|
24
|
+
import At from "./ui/PasswordModal.js";
|
|
25
25
|
import { usePresentPage as Wt } from "../utils/hooks/usePresentPage.js";
|
|
26
|
-
import { getPageFromPosition as
|
|
27
|
-
import { useDocumentPasswordContext as
|
|
28
|
-
import { LayoutContainer as
|
|
29
|
-
import { LayoutWrapper as
|
|
30
|
-
import { useEventCallbackContext as
|
|
31
|
-
import { useCopyText as
|
|
32
|
-
import { useTextSelection as
|
|
33
|
-
import { OutputScale as
|
|
34
|
-
import { approximateFraction as
|
|
26
|
+
import { getPageFromPosition as Ft } from "../utils/calculatePage.js";
|
|
27
|
+
import { useDocumentPasswordContext as Dt } from "../contexts/DocumentPasswordContext.js";
|
|
28
|
+
import { LayoutContainer as Ht } from "./layout/LayoutContainer.js";
|
|
29
|
+
import { LayoutWrapper as kt } from "./layout/LayoutWrapper.js";
|
|
30
|
+
import { useEventCallbackContext as Ut } from "../contexts/EventCallbackContext.js";
|
|
31
|
+
import { useCopyText as Vt } from "../utils/hooks/useCopyText.js";
|
|
32
|
+
import { useTextSelection as qt } from "../utils/hooks/useTextSelection.js";
|
|
33
|
+
import { OutputScale as Gt } from "pdfjs-dist";
|
|
34
|
+
import { approximateFraction as Fe } 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-92fa19f7.js";
|
|
|
90
90
|
import "../contexts/ThemeContext.js";
|
|
91
91
|
import "../contexts/DarkModeContext.js";
|
|
92
92
|
import "../utils/hooks/useDarkMode.js";
|
|
93
|
-
const
|
|
93
|
+
const W = {
|
|
94
94
|
"rp-pages": "_rp-pages_fn8tz_1",
|
|
95
95
|
"rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_fn8tz_6",
|
|
96
96
|
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_fn8tz_11",
|
|
@@ -115,7 +115,7 @@ function Ee() {
|
|
|
115
115
|
return n;
|
|
116
116
|
}, Ee.apply(null, arguments);
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function De(n) {
|
|
119
119
|
if (n === void 0)
|
|
120
120
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
121
121
|
return n;
|
|
@@ -125,25 +125,25 @@ function Oe(n, e) {
|
|
|
125
125
|
return t.__proto__ = r, t;
|
|
126
126
|
}, Oe(n, e);
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function $t(n, e) {
|
|
129
129
|
n.prototype = Object.create(e.prototype), n.prototype.constructor = n, Oe(n, e);
|
|
130
130
|
}
|
|
131
|
-
var
|
|
131
|
+
var He = Number.isNaN || function(e) {
|
|
132
132
|
return typeof e == "number" && e !== e;
|
|
133
133
|
};
|
|
134
|
-
function $t(n, e) {
|
|
135
|
-
return !!(n === e || De(n) && De(e));
|
|
136
|
-
}
|
|
137
134
|
function jt(n, e) {
|
|
135
|
+
return !!(n === e || He(n) && He(e));
|
|
136
|
+
}
|
|
137
|
+
function Bt(n, e) {
|
|
138
138
|
if (n.length !== e.length)
|
|
139
139
|
return !1;
|
|
140
140
|
for (var t = 0; t < n.length; t++)
|
|
141
|
-
if (
|
|
141
|
+
if (!jt(n[t], e[t]))
|
|
142
142
|
return !1;
|
|
143
143
|
return !0;
|
|
144
144
|
}
|
|
145
145
|
function be(n, e) {
|
|
146
|
-
e === void 0 && (e =
|
|
146
|
+
e === void 0 && (e = Bt);
|
|
147
147
|
var t, r = [], s, l = !1;
|
|
148
148
|
function a() {
|
|
149
149
|
for (var c = [], u = 0; u < arguments.length; u++)
|
|
@@ -152,7 +152,7 @@ function be(n, e) {
|
|
|
152
152
|
}
|
|
153
153
|
return a;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function ke(n, e) {
|
|
156
156
|
if (n == null)
|
|
157
157
|
return {};
|
|
158
158
|
var t = {};
|
|
@@ -164,18 +164,18 @@ function He(n, e) {
|
|
|
164
164
|
}
|
|
165
165
|
return t;
|
|
166
166
|
}
|
|
167
|
-
var
|
|
167
|
+
var Kt = typeof performance == "object" && typeof performance.now == "function", Ue = Kt ? function() {
|
|
168
168
|
return performance.now();
|
|
169
169
|
} : function() {
|
|
170
170
|
return Date.now();
|
|
171
171
|
};
|
|
172
|
-
function
|
|
172
|
+
function Ve(n) {
|
|
173
173
|
cancelAnimationFrame(n.id);
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
var t =
|
|
175
|
+
function Zt(n, e) {
|
|
176
|
+
var t = Ue();
|
|
177
177
|
function r() {
|
|
178
|
-
|
|
178
|
+
Ue() - t >= e ? n.call(null) : s.id = requestAnimationFrame(r);
|
|
179
179
|
}
|
|
180
180
|
var s = {
|
|
181
181
|
id: requestAnimationFrame(r)
|
|
@@ -183,53 +183,53 @@ function Kt(n, e) {
|
|
|
183
183
|
return s;
|
|
184
184
|
}
|
|
185
185
|
var ze = -1;
|
|
186
|
-
function
|
|
186
|
+
function Jt(n) {
|
|
187
187
|
if (n === void 0 && (n = !1), ze === -1 || n) {
|
|
188
188
|
var e = document.createElement("div"), t = e.style;
|
|
189
189
|
t.width = "50px", t.height = "50px", t.overflow = "scroll", document.body.appendChild(e), ze = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
190
190
|
}
|
|
191
191
|
return ze;
|
|
192
192
|
}
|
|
193
|
-
var
|
|
194
|
-
function
|
|
195
|
-
if (n === void 0 && (n = !1),
|
|
193
|
+
var re = null;
|
|
194
|
+
function qe(n) {
|
|
195
|
+
if (n === void 0 && (n = !1), re === null || n) {
|
|
196
196
|
var e = document.createElement("div"), t = e.style;
|
|
197
197
|
t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
|
|
198
198
|
var r = document.createElement("div"), s = r.style;
|
|
199
|
-
return s.width = "100px", s.height = "100px", e.appendChild(r), document.body.appendChild(e), e.scrollLeft > 0 ?
|
|
199
|
+
return s.width = "100px", s.height = "100px", e.appendChild(r), document.body.appendChild(e), e.scrollLeft > 0 ? re = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? re = "negative" : re = "positive-ascending"), document.body.removeChild(e), re;
|
|
200
200
|
}
|
|
201
|
-
return
|
|
201
|
+
return re;
|
|
202
202
|
}
|
|
203
|
-
var
|
|
203
|
+
var Qt = 150, Xt = function(e) {
|
|
204
204
|
var t = e.columnIndex;
|
|
205
205
|
e.data;
|
|
206
206
|
var r = e.rowIndex;
|
|
207
207
|
return r + ":" + t;
|
|
208
|
-
},
|
|
209
|
-
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (
|
|
210
|
-
function
|
|
211
|
-
var e, t = n.getColumnOffset, r = n.getColumnStartIndexForOffset, s = n.getColumnStopIndexForStartIndex, l = n.getColumnWidth, a = n.getEstimatedTotalHeight, c = n.getEstimatedTotalWidth, u = n.getOffsetForColumnAndAlignment,
|
|
208
|
+
}, he = null, ge = null, ve = null;
|
|
209
|
+
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (he = /* @__PURE__ */ new WeakSet(), ge = /* @__PURE__ */ new WeakSet(), ve = /* @__PURE__ */ new WeakSet());
|
|
210
|
+
function Yt(n) {
|
|
211
|
+
var e, t = n.getColumnOffset, r = n.getColumnStartIndexForOffset, s = n.getColumnStopIndexForStartIndex, l = n.getColumnWidth, a = n.getEstimatedTotalHeight, c = n.getEstimatedTotalWidth, u = n.getOffsetForColumnAndAlignment, v = n.getOffsetForRowAndAlignment, h = n.getRowHeight, I = n.getRowOffset, i = n.getRowStartIndexForOffset, L = n.getRowStopIndexForStartIndex, T = n.initInstanceProps, R = n.shouldResetStyleCacheOnItemSizeChange, F = n.validateProps;
|
|
212
212
|
return e = /* @__PURE__ */ function(M) {
|
|
213
|
-
|
|
214
|
-
function
|
|
213
|
+
$t(z, M);
|
|
214
|
+
function z(N) {
|
|
215
215
|
var o;
|
|
216
|
-
return o = M.call(this, N) || this, o._instanceProps = T(o.props,
|
|
217
|
-
instance:
|
|
216
|
+
return o = M.call(this, N) || this, o._instanceProps = T(o.props, De(o)), o._resetIsScrollingTimeoutId = null, o._outerRef = void 0, o.state = {
|
|
217
|
+
instance: De(o),
|
|
218
218
|
isScrolling: !1,
|
|
219
219
|
horizontalScrollDirection: "forward",
|
|
220
220
|
scrollLeft: typeof o.props.initialScrollLeft == "number" ? o.props.initialScrollLeft : 0,
|
|
221
221
|
scrollTop: typeof o.props.initialScrollTop == "number" ? o.props.initialScrollTop : 0,
|
|
222
222
|
scrollUpdateWasRequested: !1,
|
|
223
223
|
verticalScrollDirection: "forward"
|
|
224
|
-
}, o._callOnItemsRendered = void 0, o._callOnItemsRendered = be(function(f, d, m, C, p,
|
|
224
|
+
}, o._callOnItemsRendered = void 0, o._callOnItemsRendered = be(function(f, d, m, C, p, x, S, P) {
|
|
225
225
|
return o.props.onItemsRendered({
|
|
226
226
|
overscanColumnStartIndex: f,
|
|
227
227
|
overscanColumnStopIndex: d,
|
|
228
228
|
overscanRowStartIndex: m,
|
|
229
229
|
overscanRowStopIndex: C,
|
|
230
230
|
visibleColumnStartIndex: p,
|
|
231
|
-
visibleColumnStopIndex:
|
|
232
|
-
visibleRowStartIndex:
|
|
231
|
+
visibleColumnStopIndex: x,
|
|
232
|
+
visibleRowStartIndex: S,
|
|
233
233
|
visibleRowStopIndex: P
|
|
234
234
|
});
|
|
235
235
|
}), o._callOnScroll = void 0, o._callOnScroll = be(function(f, d, m, C, p) {
|
|
@@ -241,46 +241,46 @@ function Xt(n) {
|
|
|
241
241
|
scrollUpdateWasRequested: p
|
|
242
242
|
});
|
|
243
243
|
}), o._getItemStyle = void 0, o._getItemStyle = function(f, d) {
|
|
244
|
-
var m = o.props, C = m.columnWidth, p = m.direction,
|
|
245
|
-
if (
|
|
246
|
-
|
|
244
|
+
var m = o.props, C = m.columnWidth, p = m.direction, x = m.rowHeight, S = o._getItemStyleCache(R && C, R && p, R && x), P = f + ":" + d, E;
|
|
245
|
+
if (S.hasOwnProperty(P))
|
|
246
|
+
E = S[P];
|
|
247
247
|
else {
|
|
248
|
-
var
|
|
249
|
-
|
|
248
|
+
var y = t(o.props, d, o._instanceProps), b = p === "rtl";
|
|
249
|
+
S[P] = E = {
|
|
250
250
|
position: "absolute",
|
|
251
|
-
left:
|
|
252
|
-
right:
|
|
251
|
+
left: b ? void 0 : y,
|
|
252
|
+
right: b ? y : void 0,
|
|
253
253
|
top: I(o.props, f, o._instanceProps),
|
|
254
254
|
height: h(o.props, f, o._instanceProps),
|
|
255
255
|
width: l(o.props, d, o._instanceProps)
|
|
256
256
|
};
|
|
257
257
|
}
|
|
258
|
-
return
|
|
258
|
+
return E;
|
|
259
259
|
}, o._getItemStyleCache = void 0, o._getItemStyleCache = be(function(f, d, m) {
|
|
260
260
|
return {};
|
|
261
261
|
}), o._onScroll = function(f) {
|
|
262
|
-
var d = f.currentTarget, m = d.clientHeight, C = d.clientWidth, p = d.scrollLeft,
|
|
263
|
-
o.setState(function(
|
|
264
|
-
if (
|
|
262
|
+
var d = f.currentTarget, m = d.clientHeight, C = d.clientWidth, p = d.scrollLeft, x = d.scrollTop, S = d.scrollHeight, P = d.scrollWidth;
|
|
263
|
+
o.setState(function(E) {
|
|
264
|
+
if (E.scrollLeft === p && E.scrollTop === x)
|
|
265
265
|
return null;
|
|
266
|
-
var
|
|
267
|
-
if (
|
|
268
|
-
switch (
|
|
266
|
+
var y = o.props.direction, b = p;
|
|
267
|
+
if (y === "rtl")
|
|
268
|
+
switch (qe()) {
|
|
269
269
|
case "negative":
|
|
270
|
-
|
|
270
|
+
b = -p;
|
|
271
271
|
break;
|
|
272
272
|
case "positive-descending":
|
|
273
|
-
|
|
273
|
+
b = P - C - p;
|
|
274
274
|
break;
|
|
275
275
|
}
|
|
276
|
-
|
|
277
|
-
var
|
|
276
|
+
b = Math.max(0, Math.min(b, P - C));
|
|
277
|
+
var A = Math.max(0, Math.min(x, S - m));
|
|
278
278
|
return {
|
|
279
279
|
isScrolling: !0,
|
|
280
|
-
horizontalScrollDirection:
|
|
281
|
-
scrollLeft:
|
|
282
|
-
scrollTop:
|
|
283
|
-
verticalScrollDirection:
|
|
280
|
+
horizontalScrollDirection: E.scrollLeft < p ? "forward" : "backward",
|
|
281
|
+
scrollLeft: b,
|
|
282
|
+
scrollTop: A,
|
|
283
|
+
verticalScrollDirection: E.scrollTop < x ? "forward" : "backward",
|
|
284
284
|
scrollUpdateWasRequested: !1
|
|
285
285
|
};
|
|
286
286
|
}, o._resetIsScrollingDebounced);
|
|
@@ -288,7 +288,7 @@ function Xt(n) {
|
|
|
288
288
|
var d = o.props.outerRef;
|
|
289
289
|
o._outerRef = f, typeof d == "function" ? d(f) : d != null && typeof d == "object" && d.hasOwnProperty("current") && (d.current = f);
|
|
290
290
|
}, o._resetIsScrollingDebounced = function() {
|
|
291
|
-
o._resetIsScrollingTimeoutId !== null &&
|
|
291
|
+
o._resetIsScrollingTimeoutId !== null && Ve(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId = Zt(o._resetIsScrolling, Qt);
|
|
292
292
|
}, o._resetIsScrolling = function() {
|
|
293
293
|
o._resetIsScrollingTimeoutId = null, o.setState({
|
|
294
294
|
isScrolling: !1
|
|
@@ -297,11 +297,11 @@ function Xt(n) {
|
|
|
297
297
|
});
|
|
298
298
|
}, o;
|
|
299
299
|
}
|
|
300
|
-
|
|
301
|
-
return
|
|
300
|
+
z.getDerivedStateFromProps = function(o, f) {
|
|
301
|
+
return er(o, f), F(o), null;
|
|
302
302
|
};
|
|
303
|
-
var
|
|
304
|
-
return
|
|
303
|
+
var O = z.prototype;
|
|
304
|
+
return O.scrollTo = function(o) {
|
|
305
305
|
var f = o.scrollLeft, d = o.scrollTop;
|
|
306
306
|
f !== void 0 && (f = Math.max(0, f)), d !== void 0 && (d = Math.max(0, d)), this.setState(function(m) {
|
|
307
307
|
return f === void 0 && (f = m.scrollLeft), d === void 0 && (d = m.scrollTop), m.scrollLeft === f && m.scrollTop === d ? null : {
|
|
@@ -312,27 +312,27 @@ function Xt(n) {
|
|
|
312
312
|
verticalScrollDirection: m.scrollTop < d ? "forward" : "backward"
|
|
313
313
|
};
|
|
314
314
|
}, this._resetIsScrollingDebounced);
|
|
315
|
-
},
|
|
316
|
-
var f = o.align, d = f === void 0 ? "auto" : f, m = o.columnIndex, C = o.rowIndex, p = this.props,
|
|
317
|
-
m !== void 0 && (m = Math.max(0, Math.min(m,
|
|
318
|
-
var U = a(this.props, this._instanceProps),
|
|
315
|
+
}, O.scrollToItem = function(o) {
|
|
316
|
+
var f = o.align, d = f === void 0 ? "auto" : f, m = o.columnIndex, C = o.rowIndex, p = this.props, x = p.columnCount, S = p.height, P = p.rowCount, E = p.width, y = this.state, b = y.scrollLeft, A = y.scrollTop, H = Jt();
|
|
317
|
+
m !== void 0 && (m = Math.max(0, Math.min(m, x - 1))), C !== void 0 && (C = Math.max(0, Math.min(C, P - 1)));
|
|
318
|
+
var U = a(this.props, this._instanceProps), V = c(this.props, this._instanceProps), k = V > E ? H : 0, $ = U > S ? H : 0;
|
|
319
319
|
this.scrollTo({
|
|
320
|
-
scrollLeft: m !== void 0 ? u(this.props, m, d,
|
|
321
|
-
scrollTop: C !== void 0 ?
|
|
320
|
+
scrollLeft: m !== void 0 ? u(this.props, m, d, b, this._instanceProps, $) : b,
|
|
321
|
+
scrollTop: C !== void 0 ? v(this.props, C, d, A, this._instanceProps, k) : A
|
|
322
322
|
});
|
|
323
|
-
},
|
|
323
|
+
}, O.componentDidMount = function() {
|
|
324
324
|
var o = this.props, f = o.initialScrollLeft, d = o.initialScrollTop;
|
|
325
325
|
if (this._outerRef != null) {
|
|
326
326
|
var m = this._outerRef;
|
|
327
327
|
typeof f == "number" && (m.scrollLeft = f), typeof d == "number" && (m.scrollTop = d);
|
|
328
328
|
}
|
|
329
329
|
this._callPropsCallbacks();
|
|
330
|
-
},
|
|
330
|
+
}, O.componentDidUpdate = function() {
|
|
331
331
|
var o = this.props.direction, f = this.state, d = f.scrollLeft, m = f.scrollTop, C = f.scrollUpdateWasRequested;
|
|
332
332
|
if (C && this._outerRef != null) {
|
|
333
333
|
var p = this._outerRef;
|
|
334
334
|
if (o === "rtl")
|
|
335
|
-
switch (
|
|
335
|
+
switch (qe()) {
|
|
336
336
|
case "negative":
|
|
337
337
|
p.scrollLeft = -d;
|
|
338
338
|
break;
|
|
@@ -340,8 +340,8 @@ function Xt(n) {
|
|
|
340
340
|
p.scrollLeft = d;
|
|
341
341
|
break;
|
|
342
342
|
default:
|
|
343
|
-
var
|
|
344
|
-
p.scrollLeft =
|
|
343
|
+
var x = p.clientWidth, S = p.scrollWidth;
|
|
344
|
+
p.scrollLeft = S - x - d;
|
|
345
345
|
break;
|
|
346
346
|
}
|
|
347
347
|
else
|
|
@@ -349,81 +349,81 @@ function Xt(n) {
|
|
|
349
349
|
p.scrollTop = Math.max(0, m);
|
|
350
350
|
}
|
|
351
351
|
this._callPropsCallbacks();
|
|
352
|
-
},
|
|
353
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
354
|
-
},
|
|
355
|
-
var o = this.props, f = o.children, d = o.className, m = o.columnCount, C = o.direction, p = o.height,
|
|
352
|
+
}, O.componentWillUnmount = function() {
|
|
353
|
+
this._resetIsScrollingTimeoutId !== null && Ve(this._resetIsScrollingTimeoutId);
|
|
354
|
+
}, O.render = function() {
|
|
355
|
+
var o = this.props, f = o.children, d = o.className, m = o.columnCount, C = o.direction, p = o.height, x = o.innerRef, S = o.innerElementType, P = o.innerTagName, E = o.itemData, y = o.itemKey, b = y === void 0 ? Xt : y, A = o.outerElementType, H = o.outerTagName, U = o.rowCount, V = o.style, k = o.useIsScrolling, $ = o.width, D = this.state.isScrolling, q = this._getHorizontalRangeToRender(), oe = q[0], ae = q[1], ne = this._getVerticalRangeToRender(), le = ne[0], Q = ne[1], ce = [];
|
|
356
356
|
if (m > 0 && U)
|
|
357
|
-
for (var
|
|
358
|
-
for (var
|
|
359
|
-
|
|
360
|
-
columnIndex:
|
|
361
|
-
data:
|
|
362
|
-
isScrolling:
|
|
363
|
-
key:
|
|
364
|
-
columnIndex:
|
|
365
|
-
data:
|
|
366
|
-
rowIndex:
|
|
357
|
+
for (var j = le; j <= Q; j++)
|
|
358
|
+
for (var B = oe; B <= ae; B++)
|
|
359
|
+
ce.push(pe(f, {
|
|
360
|
+
columnIndex: B,
|
|
361
|
+
data: E,
|
|
362
|
+
isScrolling: k ? D : void 0,
|
|
363
|
+
key: b({
|
|
364
|
+
columnIndex: B,
|
|
365
|
+
data: E,
|
|
366
|
+
rowIndex: j
|
|
367
367
|
}),
|
|
368
|
-
rowIndex:
|
|
369
|
-
style: this._getItemStyle(
|
|
368
|
+
rowIndex: j,
|
|
369
|
+
style: this._getItemStyle(j, B)
|
|
370
370
|
}));
|
|
371
|
-
var
|
|
372
|
-
return
|
|
371
|
+
var te = a(this.props, this._instanceProps), de = c(this.props, this._instanceProps);
|
|
372
|
+
return pe(A || H || "div", {
|
|
373
373
|
className: d,
|
|
374
374
|
onScroll: this._onScroll,
|
|
375
375
|
ref: this._outerRefSetter,
|
|
376
376
|
style: Ee({
|
|
377
377
|
position: "relative",
|
|
378
378
|
height: p,
|
|
379
|
-
width:
|
|
379
|
+
width: $,
|
|
380
380
|
overflow: "auto",
|
|
381
381
|
WebkitOverflowScrolling: "touch",
|
|
382
382
|
willChange: "transform",
|
|
383
383
|
direction: C
|
|
384
|
-
},
|
|
385
|
-
},
|
|
386
|
-
children:
|
|
387
|
-
ref:
|
|
384
|
+
}, V)
|
|
385
|
+
}, pe(S || P || "div", {
|
|
386
|
+
children: ce,
|
|
387
|
+
ref: x,
|
|
388
388
|
style: {
|
|
389
|
-
height:
|
|
390
|
-
pointerEvents:
|
|
391
|
-
width:
|
|
389
|
+
height: te,
|
|
390
|
+
pointerEvents: D ? "none" : void 0,
|
|
391
|
+
width: de
|
|
392
392
|
}
|
|
393
393
|
}));
|
|
394
|
-
},
|
|
394
|
+
}, O._callPropsCallbacks = function() {
|
|
395
395
|
var o = this.props, f = o.columnCount, d = o.onItemsRendered, m = o.onScroll, C = o.rowCount;
|
|
396
396
|
if (typeof d == "function" && f > 0 && C > 0) {
|
|
397
|
-
var p = this._getHorizontalRangeToRender(),
|
|
398
|
-
this._callOnItemsRendered(
|
|
397
|
+
var p = this._getHorizontalRangeToRender(), x = p[0], S = p[1], P = p[2], E = p[3], y = this._getVerticalRangeToRender(), b = y[0], A = y[1], H = y[2], U = y[3];
|
|
398
|
+
this._callOnItemsRendered(x, S, b, A, P, E, H, U);
|
|
399
399
|
}
|
|
400
400
|
if (typeof m == "function") {
|
|
401
|
-
var
|
|
402
|
-
this._callOnScroll(D,
|
|
401
|
+
var V = this.state, k = V.horizontalScrollDirection, $ = V.scrollLeft, D = V.scrollTop, q = V.scrollUpdateWasRequested, oe = V.verticalScrollDirection;
|
|
402
|
+
this._callOnScroll($, D, k, oe, q);
|
|
403
403
|
}
|
|
404
|
-
},
|
|
405
|
-
var o = this.props, f = o.columnCount, d = o.overscanColumnCount, m = o.overscanColumnsCount, C = o.overscanCount, p = o.rowCount,
|
|
404
|
+
}, O._getHorizontalRangeToRender = function() {
|
|
405
|
+
var o = this.props, f = o.columnCount, d = o.overscanColumnCount, m = o.overscanColumnsCount, C = o.overscanCount, p = o.rowCount, x = this.state, S = x.horizontalScrollDirection, P = x.isScrolling, E = x.scrollLeft, y = d || m || C || 1;
|
|
406
406
|
if (f === 0 || p === 0)
|
|
407
407
|
return [0, 0, 0, 0];
|
|
408
|
-
var
|
|
409
|
-
return [Math.max(0,
|
|
410
|
-
},
|
|
411
|
-
var o = this.props, f = o.columnCount, d = o.overscanCount, m = o.overscanRowCount, C = o.overscanRowsCount, p = o.rowCount,
|
|
408
|
+
var b = r(this.props, E, this._instanceProps), A = s(this.props, b, E, this._instanceProps), H = !P || S === "backward" ? Math.max(1, y) : 1, U = !P || S === "forward" ? Math.max(1, y) : 1;
|
|
409
|
+
return [Math.max(0, b - H), Math.max(0, Math.min(f - 1, A + U)), b, A];
|
|
410
|
+
}, O._getVerticalRangeToRender = function() {
|
|
411
|
+
var o = this.props, f = o.columnCount, d = o.overscanCount, m = o.overscanRowCount, C = o.overscanRowsCount, p = o.rowCount, x = this.state, S = x.isScrolling, P = x.verticalScrollDirection, E = x.scrollTop, y = m || C || d || 1;
|
|
412
412
|
if (f === 0 || p === 0)
|
|
413
413
|
return [0, 0, 0, 0];
|
|
414
|
-
var
|
|
415
|
-
return [Math.max(0,
|
|
416
|
-
},
|
|
417
|
-
}(
|
|
414
|
+
var b = i(this.props, E, this._instanceProps), A = L(this.props, b, E, this._instanceProps), H = !S || P === "backward" ? Math.max(1, y) : 1, U = !S || P === "forward" ? Math.max(1, y) : 1;
|
|
415
|
+
return [Math.max(0, b - H), Math.max(0, Math.min(p - 1, A + U)), b, A];
|
|
416
|
+
}, z;
|
|
417
|
+
}(ut), e.defaultProps = {
|
|
418
418
|
direction: "ltr",
|
|
419
419
|
itemData: void 0,
|
|
420
420
|
useIsScrolling: !1
|
|
421
421
|
}, e;
|
|
422
422
|
}
|
|
423
|
-
var
|
|
424
|
-
var r = e.children, s = e.direction, l = e.height, a = e.innerTagName, c = e.outerTagName, u = e.overscanColumnsCount,
|
|
423
|
+
var er = function(e, t) {
|
|
424
|
+
var r = e.children, s = e.direction, l = e.height, a = e.innerTagName, c = e.outerTagName, u = e.overscanColumnsCount, v = e.overscanCount, h = e.overscanRowsCount, I = e.width, i = t.instance;
|
|
425
425
|
if (process.env.NODE_ENV !== "production") {
|
|
426
|
-
if (typeof
|
|
426
|
+
if (typeof v == "number" && he && !he.has(i) && (he.add(i), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof u == "number" || typeof h == "number") && ge && !ge.has(i) && (ge.add(i), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (a != null || c != null) && ve && !ve.has(i) && (ve.add(i), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
|
|
427
427
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
|
|
428
428
|
switch (s) {
|
|
429
429
|
case "ltr":
|
|
@@ -437,29 +437,29 @@ var Yt = function(e, t) {
|
|
|
437
437
|
if (typeof l != "number")
|
|
438
438
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (l === null ? "null" : typeof l) + '" was specified.'));
|
|
439
439
|
}
|
|
440
|
-
},
|
|
440
|
+
}, Ge = 50, Qe = function(e, t) {
|
|
441
441
|
var r = e.rowCount, s = t.rowMetadataMap, l = t.estimatedRowHeight, a = t.lastMeasuredRowIndex, c = 0;
|
|
442
442
|
if (a >= r && (a = r - 1), a >= 0) {
|
|
443
443
|
var u = s[a];
|
|
444
444
|
c = u.offset + u.size;
|
|
445
445
|
}
|
|
446
|
-
var
|
|
446
|
+
var v = r - a - 1, h = v * l;
|
|
447
447
|
return c + h;
|
|
448
|
-
},
|
|
448
|
+
}, Xe = function(e, t) {
|
|
449
449
|
var r = e.columnCount, s = t.columnMetadataMap, l = t.estimatedColumnWidth, a = t.lastMeasuredColumnIndex, c = 0;
|
|
450
450
|
if (a >= r && (a = r - 1), a >= 0) {
|
|
451
451
|
var u = s[a];
|
|
452
452
|
c = u.offset + u.size;
|
|
453
453
|
}
|
|
454
|
-
var
|
|
454
|
+
var v = r - a - 1, h = v * l;
|
|
455
455
|
return c + h;
|
|
456
|
-
},
|
|
456
|
+
}, J = function(e, t, r, s) {
|
|
457
457
|
var l, a, c;
|
|
458
458
|
if (e === "column" ? (l = s.columnMetadataMap, a = t.columnWidth, c = s.lastMeasuredColumnIndex) : (l = s.rowMetadataMap, a = t.rowHeight, c = s.lastMeasuredRowIndex), r > c) {
|
|
459
459
|
var u = 0;
|
|
460
460
|
if (c >= 0) {
|
|
461
|
-
var
|
|
462
|
-
u =
|
|
461
|
+
var v = l[c];
|
|
462
|
+
u = v.offset + v.size;
|
|
463
463
|
}
|
|
464
464
|
for (var h = c + 1; h <= r; h++) {
|
|
465
465
|
var I = a(h);
|
|
@@ -471,25 +471,25 @@ var Yt = function(e, t) {
|
|
|
471
471
|
e === "column" ? s.lastMeasuredColumnIndex = r : s.lastMeasuredRowIndex = r;
|
|
472
472
|
}
|
|
473
473
|
return l[r];
|
|
474
|
-
},
|
|
474
|
+
}, $e = function(e, t, r, s) {
|
|
475
475
|
var l, a;
|
|
476
476
|
e === "column" ? (l = r.columnMetadataMap, a = r.lastMeasuredColumnIndex) : (l = r.rowMetadataMap, a = r.lastMeasuredRowIndex);
|
|
477
477
|
var c = a > 0 ? l[a].offset : 0;
|
|
478
|
-
return c >= s ?
|
|
479
|
-
},
|
|
478
|
+
return c >= s ? Ye(e, t, r, a, 0, s) : tr(e, t, r, Math.max(0, a), s);
|
|
479
|
+
}, Ye = function(e, t, r, s, l, a) {
|
|
480
480
|
for (; l <= s; ) {
|
|
481
|
-
var c = l + Math.floor((s - l) / 2), u =
|
|
481
|
+
var c = l + Math.floor((s - l) / 2), u = J(e, t, c, r).offset;
|
|
482
482
|
if (u === a)
|
|
483
483
|
return c;
|
|
484
484
|
u < a ? l = c + 1 : u > a && (s = c - 1);
|
|
485
485
|
}
|
|
486
486
|
return l > 0 ? l - 1 : 0;
|
|
487
|
-
},
|
|
488
|
-
for (var a = e === "column" ? t.columnCount : t.rowCount, c = 1; s < a &&
|
|
487
|
+
}, tr = function(e, t, r, s, l) {
|
|
488
|
+
for (var a = e === "column" ? t.columnCount : t.rowCount, c = 1; s < a && J(e, t, s, r).offset < l; )
|
|
489
489
|
s += c, c *= 2;
|
|
490
|
-
return
|
|
491
|
-
},
|
|
492
|
-
var u = e === "column" ? t.width : t.height,
|
|
490
|
+
return Ye(e, t, r, Math.min(s, a - 1), Math.floor(s / 2), l);
|
|
491
|
+
}, je = function(e, t, r, s, l, a, c) {
|
|
492
|
+
var u = e === "column" ? t.width : t.height, v = J(e, t, r, a), h = e === "column" ? Xe(t, a) : Qe(t, a), I = Math.max(0, Math.min(h - u, v.offset)), i = Math.max(0, v.offset - u + c + v.size);
|
|
493
493
|
switch (s === "smart" && (l >= i - u && l <= I + u ? s = "auto" : s = "center"), s) {
|
|
494
494
|
case "start":
|
|
495
495
|
return I;
|
|
@@ -501,48 +501,48 @@ var Yt = function(e, t) {
|
|
|
501
501
|
default:
|
|
502
502
|
return l >= i && l <= I ? l : i > I || l < i ? i : I;
|
|
503
503
|
}
|
|
504
|
-
},
|
|
504
|
+
}, rr = /* @__PURE__ */ Yt({
|
|
505
505
|
getColumnOffset: function(e, t, r) {
|
|
506
|
-
return
|
|
506
|
+
return J("column", e, t, r).offset;
|
|
507
507
|
},
|
|
508
508
|
getColumnStartIndexForOffset: function(e, t, r) {
|
|
509
|
-
return
|
|
509
|
+
return $e("column", e, r, t);
|
|
510
510
|
},
|
|
511
511
|
getColumnStopIndexForStartIndex: function(e, t, r, s) {
|
|
512
|
-
for (var l = e.columnCount, a = e.width, c =
|
|
513
|
-
h++,
|
|
512
|
+
for (var l = e.columnCount, a = e.width, c = J("column", e, t, s), u = r + a, v = c.offset + c.size, h = t; h < l - 1 && v < u; )
|
|
513
|
+
h++, v += J("column", e, h, s).size;
|
|
514
514
|
return h;
|
|
515
515
|
},
|
|
516
516
|
getColumnWidth: function(e, t, r) {
|
|
517
517
|
return r.columnMetadataMap[t].size;
|
|
518
518
|
},
|
|
519
|
-
getEstimatedTotalHeight:
|
|
520
|
-
getEstimatedTotalWidth:
|
|
519
|
+
getEstimatedTotalHeight: Qe,
|
|
520
|
+
getEstimatedTotalWidth: Xe,
|
|
521
521
|
getOffsetForColumnAndAlignment: function(e, t, r, s, l, a) {
|
|
522
|
-
return
|
|
522
|
+
return je("column", e, t, r, s, l, a);
|
|
523
523
|
},
|
|
524
524
|
getOffsetForRowAndAlignment: function(e, t, r, s, l, a) {
|
|
525
|
-
return
|
|
525
|
+
return je("row", e, t, r, s, l, a);
|
|
526
526
|
},
|
|
527
527
|
getRowOffset: function(e, t, r) {
|
|
528
|
-
return
|
|
528
|
+
return J("row", e, t, r).offset;
|
|
529
529
|
},
|
|
530
530
|
getRowHeight: function(e, t, r) {
|
|
531
531
|
return r.rowMetadataMap[t].size;
|
|
532
532
|
},
|
|
533
533
|
getRowStartIndexForOffset: function(e, t, r) {
|
|
534
|
-
return
|
|
534
|
+
return $e("row", e, r, t);
|
|
535
535
|
},
|
|
536
536
|
getRowStopIndexForStartIndex: function(e, t, r, s) {
|
|
537
|
-
for (var l = e.rowCount, a = e.height, c =
|
|
538
|
-
h++,
|
|
537
|
+
for (var l = e.rowCount, a = e.height, c = J("row", e, t, s), u = r + a, v = c.offset + c.size, h = t; h < l - 1 && v < u; )
|
|
538
|
+
h++, v += J("row", e, h, s).size;
|
|
539
539
|
return h;
|
|
540
540
|
},
|
|
541
541
|
initInstanceProps: function(e, t) {
|
|
542
542
|
var r = e, s = r.estimatedColumnWidth, l = r.estimatedRowHeight, a = {
|
|
543
543
|
columnMetadataMap: {},
|
|
544
|
-
estimatedColumnWidth: s ||
|
|
545
|
-
estimatedRowHeight: l ||
|
|
544
|
+
estimatedColumnWidth: s || Ge,
|
|
545
|
+
estimatedRowHeight: l || Ge,
|
|
546
546
|
lastMeasuredColumnIndex: -1,
|
|
547
547
|
lastMeasuredRowIndex: -1,
|
|
548
548
|
rowMetadataMap: {}
|
|
@@ -558,8 +558,8 @@ var Yt = function(e, t) {
|
|
|
558
558
|
shouldForceUpdate: u
|
|
559
559
|
});
|
|
560
560
|
}, t.resetAfterIndices = function(c) {
|
|
561
|
-
var u = c.columnIndex,
|
|
562
|
-
typeof u == "number" && (a.lastMeasuredColumnIndex = Math.min(a.lastMeasuredColumnIndex, u - 1)), typeof
|
|
561
|
+
var u = c.columnIndex, v = c.rowIndex, h = c.shouldForceUpdate, I = h === void 0 ? !0 : h;
|
|
562
|
+
typeof u == "number" && (a.lastMeasuredColumnIndex = Math.min(a.lastMeasuredColumnIndex, u - 1)), typeof v == "number" && (a.lastMeasuredRowIndex = Math.min(a.lastMeasuredRowIndex, v - 1)), t._getItemStyleCache(-1), I && t.forceUpdate();
|
|
563
563
|
}, a;
|
|
564
564
|
},
|
|
565
565
|
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
@@ -574,7 +574,7 @@ var Yt = function(e, t) {
|
|
|
574
574
|
}
|
|
575
575
|
});
|
|
576
576
|
process.env.NODE_ENV;
|
|
577
|
-
function
|
|
577
|
+
function Be(n, e) {
|
|
578
578
|
for (var t in n)
|
|
579
579
|
if (!(t in e))
|
|
580
580
|
return !0;
|
|
@@ -583,63 +583,63 @@ function je(n, e) {
|
|
|
583
583
|
return !0;
|
|
584
584
|
return !1;
|
|
585
585
|
}
|
|
586
|
-
var
|
|
587
|
-
function
|
|
588
|
-
var t = n.style, r =
|
|
589
|
-
return !
|
|
586
|
+
var or = ["style"], nr = ["style"];
|
|
587
|
+
function ir(n, e) {
|
|
588
|
+
var t = n.style, r = ke(n, or), s = e.style, l = ke(e, nr);
|
|
589
|
+
return !Be(t, s) && !Be(r, l);
|
|
590
590
|
}
|
|
591
|
-
let
|
|
592
|
-
typeof window < "u" ?
|
|
591
|
+
let G;
|
|
592
|
+
typeof window < "u" ? G = window : typeof self < "u" ? G = self : G = global;
|
|
593
593
|
let Pe = null, Ne = null;
|
|
594
|
-
const
|
|
595
|
-
Me == null ||
|
|
596
|
-
return
|
|
594
|
+
const Ke = 20, Le = G.clearTimeout, Ze = G.setTimeout, Me = G.cancelAnimationFrame || G.mozCancelAnimationFrame || G.webkitCancelAnimationFrame, Je = G.requestAnimationFrame || G.mozRequestAnimationFrame || G.webkitRequestAnimationFrame;
|
|
595
|
+
Me == null || Je == null ? (Pe = Le, Ne = function(e) {
|
|
596
|
+
return Ze(e, Ke);
|
|
597
597
|
}) : (Pe = function([e, t]) {
|
|
598
598
|
Me(e), Le(t);
|
|
599
599
|
}, Ne = function(e) {
|
|
600
|
-
const t =
|
|
600
|
+
const t = Je(function() {
|
|
601
601
|
Le(r), e();
|
|
602
|
-
}), r =
|
|
602
|
+
}), r = Ze(function() {
|
|
603
603
|
Me(t), e();
|
|
604
|
-
},
|
|
604
|
+
}, Ke);
|
|
605
605
|
return [t, r];
|
|
606
606
|
});
|
|
607
|
-
function
|
|
607
|
+
function sr(n) {
|
|
608
608
|
let e, t, r, s, l, a, c;
|
|
609
609
|
const u = typeof document < "u" && document.attachEvent;
|
|
610
610
|
if (!u) {
|
|
611
611
|
a = function(M) {
|
|
612
|
-
const
|
|
613
|
-
N.scrollLeft = N.scrollWidth, N.scrollTop = N.scrollHeight, o.style.width =
|
|
612
|
+
const z = M.__resizeTriggers__, O = z.firstElementChild, N = z.lastElementChild, o = O.firstElementChild;
|
|
613
|
+
N.scrollLeft = N.scrollWidth, N.scrollTop = N.scrollHeight, o.style.width = O.offsetWidth + 1 + "px", o.style.height = O.offsetHeight + 1 + "px", O.scrollLeft = O.scrollWidth, O.scrollTop = O.scrollHeight;
|
|
614
614
|
}, l = function(M) {
|
|
615
615
|
return M.offsetWidth !== M.__resizeLast__.width || M.offsetHeight !== M.__resizeLast__.height;
|
|
616
616
|
}, c = function(M) {
|
|
617
617
|
if (M.target.className && typeof M.target.className.indexOf == "function" && M.target.className.indexOf("contract-trigger") < 0 && M.target.className.indexOf("expand-trigger") < 0)
|
|
618
618
|
return;
|
|
619
|
-
const
|
|
619
|
+
const z = this;
|
|
620
620
|
a(this), this.__resizeRAF__ && Pe(this.__resizeRAF__), this.__resizeRAF__ = Ne(function() {
|
|
621
|
-
l(
|
|
622
|
-
o.call(
|
|
621
|
+
l(z) && (z.__resizeLast__.width = z.offsetWidth, z.__resizeLast__.height = z.offsetHeight, z.__resizeListeners__.forEach(function(o) {
|
|
622
|
+
o.call(z, M);
|
|
623
623
|
}));
|
|
624
624
|
});
|
|
625
625
|
};
|
|
626
626
|
let i = !1, L = "";
|
|
627
627
|
r = "animationstart";
|
|
628
628
|
const T = "Webkit Moz O ms".split(" ");
|
|
629
|
-
let R = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),
|
|
629
|
+
let R = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), F = "";
|
|
630
630
|
{
|
|
631
631
|
const M = document.createElement("fakeelement");
|
|
632
632
|
if (M.style.animationName !== void 0 && (i = !0), i === !1) {
|
|
633
|
-
for (let
|
|
634
|
-
if (M.style[T[
|
|
635
|
-
|
|
633
|
+
for (let z = 0; z < T.length; z++)
|
|
634
|
+
if (M.style[T[z] + "AnimationName"] !== void 0) {
|
|
635
|
+
F = T[z], L = "-" + F.toLowerCase() + "-", r = R[z], i = !0;
|
|
636
636
|
break;
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
640
|
t = "resizeanim", e = "@" + L + "keyframes " + t + " { from { opacity: 0; } to { opacity: 0; } } ", s = L + "animation: 1ms " + t + "; ";
|
|
641
641
|
}
|
|
642
|
-
const
|
|
642
|
+
const v = function(i) {
|
|
643
643
|
if (!i.getElementById("detectElementResize")) {
|
|
644
644
|
const L = (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%; }', T = i.head || i.getElementsByTagName("head")[0], R = i.createElement("style");
|
|
645
645
|
R.id = "detectElementResize", R.type = "text/css", n != null && R.setAttribute("nonce", n), R.styleSheet ? R.styleSheet.cssText = L : R.appendChild(i.createTextNode(L)), T.appendChild(R);
|
|
@@ -651,13 +651,13 @@ function ir(n) {
|
|
|
651
651
|
i.attachEvent("onresize", L);
|
|
652
652
|
else {
|
|
653
653
|
if (!i.__resizeTriggers__) {
|
|
654
|
-
const T = i.ownerDocument, R =
|
|
655
|
-
R && R.position === "static" && (i.style.position = "relative"),
|
|
656
|
-
const
|
|
657
|
-
|
|
654
|
+
const T = i.ownerDocument, R = G.getComputedStyle(i);
|
|
655
|
+
R && R.position === "static" && (i.style.position = "relative"), v(T), i.__resizeLast__ = {}, i.__resizeListeners__ = [], (i.__resizeTriggers__ = T.createElement("div")).className = "resize-triggers";
|
|
656
|
+
const F = T.createElement("div");
|
|
657
|
+
F.className = "expand-trigger", F.appendChild(T.createElement("div"));
|
|
658
658
|
const M = T.createElement("div");
|
|
659
|
-
M.className = "contract-trigger", i.__resizeTriggers__.appendChild(
|
|
660
|
-
|
|
659
|
+
M.className = "contract-trigger", i.__resizeTriggers__.appendChild(F), i.__resizeTriggers__.appendChild(M), i.appendChild(i.__resizeTriggers__), a(i), i.addEventListener("scroll", c, !0), r && (i.__resizeTriggers__.__animationListener__ = function(O) {
|
|
660
|
+
O.animationName === t && a(i);
|
|
661
661
|
}, i.__resizeTriggers__.addEventListener(r, i.__resizeTriggers__.__animationListener__));
|
|
662
662
|
}
|
|
663
663
|
i.__resizeListeners__.push(L);
|
|
@@ -676,7 +676,7 @@ function ir(n) {
|
|
|
676
676
|
}
|
|
677
677
|
};
|
|
678
678
|
}
|
|
679
|
-
class
|
|
679
|
+
class ar extends ft {
|
|
680
680
|
constructor(...e) {
|
|
681
681
|
super(...e), this.state = {
|
|
682
682
|
height: this.props.defaultHeight || 0,
|
|
@@ -689,7 +689,7 @@ class sr extends ut {
|
|
|
689
689
|
onResize: s
|
|
690
690
|
} = this.props;
|
|
691
691
|
if (this._parentNode) {
|
|
692
|
-
const l = window.getComputedStyle(this._parentNode) || {}, a = parseFloat(l.paddingLeft || "0"), c = parseFloat(l.paddingRight || "0"), u = parseFloat(l.paddingTop || "0"),
|
|
692
|
+
const l = window.getComputedStyle(this._parentNode) || {}, a = parseFloat(l.paddingLeft || "0"), c = parseFloat(l.paddingRight || "0"), u = parseFloat(l.paddingTop || "0"), v = parseFloat(l.paddingBottom || "0"), h = this._parentNode.getBoundingClientRect(), I = h.height - u - v, i = h.width - a - c;
|
|
693
693
|
if (!t && this.state.height !== I || !r && this.state.width !== i) {
|
|
694
694
|
this.setState({
|
|
695
695
|
height: I,
|
|
@@ -724,7 +724,7 @@ class sr extends ut {
|
|
|
724
724
|
const r = t.ownerDocument.defaultView.ResizeObserver;
|
|
725
725
|
r != null ? (this._resizeObserver = new r(() => {
|
|
726
726
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
727
|
-
}), this._resizeObserver.observe(t)) : (this._detectElementResize =
|
|
727
|
+
}), this._resizeObserver.observe(t)) : (this._detectElementResize = sr(e), this._detectElementResize.addResizeListener(t, this._onResize)), this._onResize();
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
730
|
componentWillUnmount() {
|
|
@@ -740,7 +740,7 @@ class sr extends ut {
|
|
|
740
740
|
doNotBailOutOnEmptyChildren: a = !1,
|
|
741
741
|
nonce: c,
|
|
742
742
|
onResize: u,
|
|
743
|
-
style:
|
|
743
|
+
style: v = {},
|
|
744
744
|
tagName: h = "div",
|
|
745
745
|
...I
|
|
746
746
|
} = this.props, {
|
|
@@ -749,19 +749,19 @@ class sr extends ut {
|
|
|
749
749
|
} = this.state, T = {
|
|
750
750
|
overflow: "visible"
|
|
751
751
|
}, R = {};
|
|
752
|
-
let
|
|
753
|
-
return s || (i === 0 && (
|
|
752
|
+
let F = !1;
|
|
753
|
+
return s || (i === 0 && (F = !0), T.height = 0, R.height = i, R.scaledHeight = i), l || (L === 0 && (F = !0), T.width = 0, R.width = L, R.scaledWidth = L), a && (F = !1), pe(h, {
|
|
754
754
|
ref: this._setRef,
|
|
755
755
|
style: {
|
|
756
756
|
...T,
|
|
757
|
-
...
|
|
757
|
+
...v
|
|
758
758
|
},
|
|
759
759
|
...I
|
|
760
|
-
}, !
|
|
760
|
+
}, !F && e(R));
|
|
761
761
|
}
|
|
762
762
|
}
|
|
763
|
-
const
|
|
764
|
-
const s =
|
|
763
|
+
const lr = mt(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
|
|
764
|
+
const s = Ft(
|
|
765
765
|
e,
|
|
766
766
|
n,
|
|
767
767
|
t.columnCount,
|
|
@@ -772,7 +772,7 @@ const ar = ft(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
|
|
|
772
772
|
if (t.isDualPageWithCover) {
|
|
773
773
|
const a = s === t.totalPages && t.totalPages % 2 === 0;
|
|
774
774
|
if (e === 0 && s === 1 || a && n === 0) {
|
|
775
|
-
const u = t.columnWidths.reduce((
|
|
775
|
+
const u = t.columnWidths.reduce((v, h) => v + h, 0);
|
|
776
776
|
return /* @__PURE__ */ w(
|
|
777
777
|
"div",
|
|
778
778
|
{
|
|
@@ -783,7 +783,7 @@ const ar = ft(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
|
|
|
783
783
|
justifyContent: "center",
|
|
784
784
|
alignItems: "flex-start"
|
|
785
785
|
},
|
|
786
|
-
children: /* @__PURE__ */ w(
|
|
786
|
+
children: /* @__PURE__ */ w(Re, { style: { position: "relative" }, pageNumber: s }, s)
|
|
787
787
|
}
|
|
788
788
|
);
|
|
789
789
|
}
|
|
@@ -797,187 +797,197 @@ const ar = ft(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
|
|
|
797
797
|
justifyContent: n === 0 ? "flex-end" : "flex-start",
|
|
798
798
|
alignItems: "flex-start"
|
|
799
799
|
},
|
|
800
|
-
children: /* @__PURE__ */ w(
|
|
800
|
+
children: /* @__PURE__ */ w(Re, { style: { position: "relative" }, pageNumber: s }, s)
|
|
801
801
|
}
|
|
802
|
-
) : /* @__PURE__ */ w(
|
|
803
|
-
},
|
|
804
|
-
const n = K(new
|
|
805
|
-
|
|
802
|
+
) : /* @__PURE__ */ w(Re, { style: r, pageNumber: s }, s);
|
|
803
|
+
}, ir), Zo = () => {
|
|
804
|
+
const n = K(new Gt()), { initialPage: e = 1, initialScrollMode: t } = Et(), { pagesRef: r, setPagesRef: s, setContentRef: l } = Ot(), { scrollToPage: a } = vt();
|
|
805
|
+
Vt(r);
|
|
806
806
|
const {
|
|
807
807
|
virtualScrollRef: c,
|
|
808
808
|
getVirtualScrollRef: u,
|
|
809
|
-
getPageScrollElementRef:
|
|
809
|
+
getPageScrollElementRef: v,
|
|
810
810
|
getVirtualScrollableElementRef: h,
|
|
811
811
|
setTotalInnerDimensions: I,
|
|
812
812
|
virtualScrollableElementRef: i,
|
|
813
813
|
totalInnerDimensions: L,
|
|
814
814
|
pageScrollElementRef: T
|
|
815
|
-
} =
|
|
815
|
+
} = gt(), R = K(e > 1), [F, M] = pt(e > 1), { nextPage: z, prevPage: O, setFocusedPage: N, focusedPage: o, totalPages: f } = _t(), { scrollMode: d } = St(), { viewMode: m } = Ct(), C = K(null), p = K(null), { loading: x, error: S } = wt(), { passwordRequired: P } = Dt(), { LoaderImageComponent: E } = Nt(), y = K(
|
|
816
816
|
L
|
|
817
|
-
),
|
|
817
|
+
), b = K({
|
|
818
818
|
viewMode: m,
|
|
819
819
|
scrollMode: d
|
|
820
|
-
}),
|
|
821
|
-
pageDimension:
|
|
822
|
-
rowCount:
|
|
823
|
-
rowHeight:
|
|
820
|
+
}), A = K(!1), H = K(), { isFullScreen: U } = Tt(), {
|
|
821
|
+
pageDimension: V,
|
|
822
|
+
rowCount: k,
|
|
823
|
+
rowHeight: $,
|
|
824
824
|
columnCount: D,
|
|
825
|
-
columnWidth:
|
|
826
|
-
estimatedColumnWidth:
|
|
827
|
-
estimatedRowHeight:
|
|
828
|
-
totalDimension:
|
|
829
|
-
} =
|
|
830
|
-
|
|
831
|
-
const
|
|
832
|
-
Wt(D,
|
|
833
|
-
const
|
|
825
|
+
columnWidth: q,
|
|
826
|
+
estimatedColumnWidth: oe,
|
|
827
|
+
estimatedRowHeight: ae,
|
|
828
|
+
totalDimension: ne
|
|
829
|
+
} = ht(), le = Pt(L, 100), { onScroll: Q, onTextSelect: ce } = Ut();
|
|
830
|
+
qt({ onTextSelect: ce, pagesRef: r });
|
|
831
|
+
const j = K();
|
|
832
|
+
Wt(D, k, i, m);
|
|
833
|
+
const B = K({
|
|
834
834
|
scrollTop: 0,
|
|
835
835
|
scrollLeft: 0
|
|
836
836
|
});
|
|
837
|
-
|
|
838
|
-
const { isPressed:
|
|
839
|
-
isPressed:
|
|
840
|
-
}), ie =
|
|
841
|
-
const _ = Array.from({ length: D }, (
|
|
837
|
+
Mt(r);
|
|
838
|
+
const { isPressed: te } = bt(), { selectionMode: de } = zt(), { initializeGrabScroll: Ae, resetGrabState: et } = Lt({
|
|
839
|
+
isPressed: te
|
|
840
|
+
}), ie = Te(() => de === It.HAND, [de]), tt = Te(() => {
|
|
841
|
+
const _ = Array.from({ length: D }, (g, Z) => q(Z));
|
|
842
842
|
return {
|
|
843
843
|
columnCount: D,
|
|
844
|
-
isDualPageWithCover: m ===
|
|
844
|
+
isDualPageWithCover: m === xe.DUAL_PAGE_WITH_COVER,
|
|
845
845
|
columnWidths: _,
|
|
846
846
|
totalPages: f
|
|
847
847
|
};
|
|
848
|
-
}, [D, m,
|
|
848
|
+
}, [D, m, q, f]), _e = se(
|
|
849
849
|
(_) => {
|
|
850
|
-
const
|
|
851
|
-
!
|
|
850
|
+
const g = document.activeElement !== r;
|
|
851
|
+
!U && g || (["ArrowUp", "ArrowLeft"].includes(_.key) ? (_.preventDefault(), O()) : ["ArrowDown", "ArrowRight"].includes(_.key) && (_.preventDefault(), z()));
|
|
852
852
|
},
|
|
853
|
-
[
|
|
853
|
+
[z, O, U, d]
|
|
854
854
|
);
|
|
855
|
-
|
|
856
|
-
window.removeEventListener("keydown",
|
|
857
|
-
}), [
|
|
855
|
+
Y(() => (window.addEventListener("keydown", _e), () => {
|
|
856
|
+
window.removeEventListener("keydown", _e);
|
|
857
|
+
}), [_e]), Y(() => {
|
|
858
858
|
if (C.current && (C.current.style.position = "relative"), !!c)
|
|
859
|
-
for (let _ = 0; _ <
|
|
860
|
-
for (let
|
|
859
|
+
for (let _ = 0; _ < k; _++)
|
|
860
|
+
for (let g = 0; g < D; g++)
|
|
861
861
|
c.resetAfterIndices({
|
|
862
|
-
columnIndex:
|
|
862
|
+
columnIndex: g,
|
|
863
863
|
rowIndex: _,
|
|
864
864
|
shouldForceUpdate: !0
|
|
865
865
|
});
|
|
866
|
-
}, [
|
|
867
|
-
const
|
|
868
|
-
(_,
|
|
866
|
+
}, [k, D, V, c]);
|
|
867
|
+
const rt = se(
|
|
868
|
+
(_, g) => {
|
|
869
869
|
if (!i)
|
|
870
870
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
871
|
-
const
|
|
872
|
-
return
|
|
871
|
+
const Z = B.current.scrollTop > g, X = B.current.scrollLeft > _;
|
|
872
|
+
return Z || X ? B.current : {
|
|
873
873
|
scrollTop: i.scrollTop,
|
|
874
874
|
scrollLeft: i.scrollLeft
|
|
875
875
|
};
|
|
876
876
|
},
|
|
877
877
|
[i]
|
|
878
878
|
), We = se(
|
|
879
|
-
(_,
|
|
880
|
-
if (
|
|
881
|
-
|
|
879
|
+
(_, g) => {
|
|
880
|
+
if (b.current.viewMode !== m || b.current.scrollMode !== d) {
|
|
881
|
+
j.current && clearTimeout(j.current), A.current = !0, a(o, "auto"), j.current = setTimeout(() => {
|
|
882
882
|
requestAnimationFrame(() => {
|
|
883
|
-
|
|
883
|
+
b.current = { viewMode: m, scrollMode: d };
|
|
884
884
|
});
|
|
885
885
|
}, 100);
|
|
886
886
|
return;
|
|
887
887
|
}
|
|
888
|
-
const X = _.scrollTop,
|
|
889
|
-
if (!
|
|
888
|
+
const X = _.scrollTop, ue = _.scrollLeft;
|
|
889
|
+
if (!g.height || !g.width)
|
|
890
890
|
return;
|
|
891
|
-
|
|
892
|
-
const { height:
|
|
893
|
-
if (
|
|
891
|
+
A.current = !0;
|
|
892
|
+
const { height: ee, width: we } = g, { height: Ce, width: Se } = y.current;
|
|
893
|
+
if (Ce === ee && Se === we)
|
|
894
894
|
return;
|
|
895
895
|
if (R.current && e > 1) {
|
|
896
|
-
|
|
897
|
-
height:
|
|
898
|
-
width:
|
|
896
|
+
y.current = {
|
|
897
|
+
height: g.height,
|
|
898
|
+
width: g.width
|
|
899
899
|
};
|
|
900
900
|
return;
|
|
901
901
|
}
|
|
902
|
-
if (!
|
|
903
|
-
|
|
904
|
-
height:
|
|
905
|
-
width:
|
|
902
|
+
if (!Ce || !Se) {
|
|
903
|
+
y.current = {
|
|
904
|
+
height: g.height,
|
|
905
|
+
width: g.width
|
|
906
906
|
};
|
|
907
907
|
return;
|
|
908
908
|
}
|
|
909
|
-
if (X === 0 &&
|
|
910
|
-
|
|
911
|
-
height:
|
|
912
|
-
width:
|
|
909
|
+
if (X === 0 && ue === 0) {
|
|
910
|
+
y.current = {
|
|
911
|
+
height: g.height,
|
|
912
|
+
width: g.width
|
|
913
913
|
};
|
|
914
914
|
return;
|
|
915
915
|
}
|
|
916
|
-
const
|
|
917
|
-
|
|
916
|
+
const st = X / Ce * ee, at = ue / Se * we, lt = Math.round(Math.min(st, ee)) || 0, ct = Math.round(Math.min(at, we)) || 0;
|
|
917
|
+
H.current = setTimeout(() => {
|
|
918
918
|
requestAnimationFrame(() => {
|
|
919
919
|
i == null || i.scrollTo({
|
|
920
|
-
top:
|
|
921
|
-
left:
|
|
920
|
+
top: lt,
|
|
921
|
+
left: ct,
|
|
922
922
|
behavior: "auto"
|
|
923
923
|
});
|
|
924
924
|
});
|
|
925
|
-
}, 0),
|
|
926
|
-
height:
|
|
927
|
-
width:
|
|
925
|
+
}, 0), y.current = {
|
|
926
|
+
height: g.height,
|
|
927
|
+
width: g.width
|
|
928
928
|
};
|
|
929
929
|
},
|
|
930
930
|
[i, m, d, a, e]
|
|
931
931
|
);
|
|
932
|
-
|
|
933
|
-
clearTimeout(
|
|
934
|
-
const _ = Array.from({ length:
|
|
935
|
-
(X,
|
|
932
|
+
Y(() => {
|
|
933
|
+
clearTimeout(H.current);
|
|
934
|
+
const _ = Array.from({ length: k }).reduce(
|
|
935
|
+
(X, ue, ee) => X + $(ee),
|
|
936
936
|
0
|
|
937
|
-
),
|
|
938
|
-
(X,
|
|
937
|
+
), g = Array.from({ length: D }).reduce(
|
|
938
|
+
(X, ue, ee) => X + q(ee),
|
|
939
939
|
0
|
|
940
|
-
),
|
|
941
|
-
|
|
940
|
+
), Z = rt(g, _);
|
|
941
|
+
B.current = Z, We(Z, { height: _, width: g }), I({
|
|
942
942
|
height: _,
|
|
943
|
-
width:
|
|
943
|
+
width: g
|
|
944
944
|
});
|
|
945
|
-
}, [
|
|
946
|
-
const
|
|
945
|
+
}, [V, k, D, We]);
|
|
946
|
+
const ot = se(
|
|
947
947
|
(_) => {
|
|
948
|
-
|
|
948
|
+
B.current = {
|
|
949
949
|
scrollTop: _.scrollTop,
|
|
950
950
|
scrollLeft: _.scrollLeft
|
|
951
951
|
};
|
|
952
952
|
},
|
|
953
953
|
[i]
|
|
954
954
|
);
|
|
955
|
-
|
|
956
|
-
if (
|
|
957
|
-
return T && T.addEventListener("scroll",
|
|
958
|
-
T == null || T.removeEventListener("scroll",
|
|
955
|
+
Y(() => {
|
|
956
|
+
if (Q)
|
|
957
|
+
return T && T.addEventListener("scroll", Q), i && i.addEventListener("scroll", Q), () => {
|
|
958
|
+
T == null || T.removeEventListener("scroll", Q), i == null || i.removeEventListener("scroll", Q);
|
|
959
959
|
};
|
|
960
|
-
}, [i, T,
|
|
961
|
-
|
|
960
|
+
}, [i, T, Q]), Y(() => () => {
|
|
961
|
+
j.current && clearTimeout(j.current);
|
|
962
962
|
}, []);
|
|
963
|
-
const
|
|
964
|
-
[
|
|
965
|
-
[
|
|
966
|
-
}), [ie,
|
|
963
|
+
const nt = Te(() => me(W["rp-pages-container"], {
|
|
964
|
+
[W["rp-cursor-grab"]]: ie && !te,
|
|
965
|
+
[W["rp-cursor-grabbing"]]: ie && te
|
|
966
|
+
}), [ie, te]), it = se(
|
|
967
967
|
(_) => {
|
|
968
968
|
if (ie && _) {
|
|
969
|
-
const
|
|
970
|
-
|
|
969
|
+
const g = me(W["rp-pages"]), Z = document.querySelector(`.${g}`);
|
|
970
|
+
Ae(Z);
|
|
971
971
|
}
|
|
972
972
|
},
|
|
973
|
-
[ie,
|
|
973
|
+
[ie, Ae, W]
|
|
974
974
|
);
|
|
975
|
-
return
|
|
976
|
-
|
|
977
|
-
}, [
|
|
978
|
-
if (
|
|
975
|
+
return Y(() => {
|
|
976
|
+
x && et();
|
|
977
|
+
}, [x]), Y(() => {
|
|
978
|
+
if (S !== fe.INVALID_OR_CORRUPTED_PDF)
|
|
979
979
|
return;
|
|
980
|
-
|
|
980
|
+
const _ = requestAnimationFrame(() => {
|
|
981
|
+
var g;
|
|
982
|
+
(g = p.current) == null || g.focus();
|
|
983
|
+
});
|
|
984
|
+
return () => {
|
|
985
|
+
cancelAnimationFrame(_);
|
|
986
|
+
};
|
|
987
|
+
}, [S]), Y(() => {
|
|
988
|
+
if (le.height === 0 || !R.current)
|
|
989
|
+
return;
|
|
990
|
+
if (t === ye.PAGE_SCROLLING) {
|
|
981
991
|
e !== o && T && N(e), R.current = !1, M(!1);
|
|
982
992
|
return;
|
|
983
993
|
}
|
|
@@ -987,69 +997,81 @@ const ar = ft(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
|
|
|
987
997
|
t,
|
|
988
998
|
T,
|
|
989
999
|
N,
|
|
990
|
-
|
|
1000
|
+
le,
|
|
991
1001
|
i
|
|
992
|
-
]), /* @__PURE__ */
|
|
993
|
-
/* @__PURE__ */ w(
|
|
994
|
-
|
|
1002
|
+
]), /* @__PURE__ */ Ie(dt, { children: [
|
|
1003
|
+
/* @__PURE__ */ w(kt, { ref: l, children: /* @__PURE__ */ w(
|
|
1004
|
+
Ht,
|
|
995
1005
|
{
|
|
996
1006
|
ref: s,
|
|
997
1007
|
tabIndex: -1,
|
|
998
|
-
className:
|
|
1008
|
+
className: nt,
|
|
999
1009
|
style: {
|
|
1000
|
-
"--scale-round-x": `${
|
|
1001
|
-
"--scale-round-y": `${
|
|
1010
|
+
"--scale-round-x": `${Fe(n.current.sx)[1]}px`,
|
|
1011
|
+
"--scale-round-y": `${Fe(n.current.sy)[1]}px`
|
|
1002
1012
|
},
|
|
1003
|
-
children: /* @__PURE__ */ w(
|
|
1013
|
+
children: /* @__PURE__ */ w(ar, { style: { minHeight: "50px" }, children: ({ width: _, height: g }) => /* @__PURE__ */ w(
|
|
1004
1014
|
"div",
|
|
1005
1015
|
{
|
|
1006
1016
|
"data-rp": "pages",
|
|
1007
|
-
ref:
|
|
1017
|
+
ref: it,
|
|
1008
1018
|
style: {
|
|
1009
1019
|
width: _,
|
|
1010
|
-
height:
|
|
1011
|
-
...
|
|
1020
|
+
height: g,
|
|
1021
|
+
...F && { visibility: "hidden" }
|
|
1012
1022
|
},
|
|
1013
|
-
children: d ===
|
|
1023
|
+
children: d === ye.PAGE_SCROLLING ? S === fe.INVALID_OR_CORRUPTED_PDF ? /* @__PURE__ */ w(
|
|
1024
|
+
"div",
|
|
1025
|
+
{
|
|
1026
|
+
ref: p,
|
|
1027
|
+
className: W["rp-load-error"],
|
|
1028
|
+
style: { width: _, height: g },
|
|
1029
|
+
tabIndex: -1,
|
|
1030
|
+
role: "alert",
|
|
1031
|
+
"aria-live": "assertive",
|
|
1032
|
+
"aria-atomic": "true",
|
|
1033
|
+
children: /* @__PURE__ */ w("div", { className: W["rp-load-error-message"], children: "Invalid or corrupted PDF file." })
|
|
1034
|
+
}
|
|
1035
|
+
) : /* @__PURE__ */ w(
|
|
1014
1036
|
"div",
|
|
1015
1037
|
{
|
|
1016
|
-
ref:
|
|
1017
|
-
style: { width: _, height:
|
|
1018
|
-
className:
|
|
1019
|
-
children: m ===
|
|
1038
|
+
ref: v,
|
|
1039
|
+
style: { width: _, height: g },
|
|
1040
|
+
className: me(W["rp-pages"], W["rp-page-scrolling-wrapper"]),
|
|
1041
|
+
children: m === xe.DUAL_PAGE ? /* @__PURE__ */ w(Rt, { widths: q, heights: $ }) : m === xe.DUAL_PAGE_WITH_COVER ? /* @__PURE__ */ w(xt, { widths: q, heights: $ }) : /* @__PURE__ */ w(yt, { widths: q, heights: $ })
|
|
1020
1042
|
}
|
|
1021
|
-
) :
|
|
1022
|
-
|
|
1043
|
+
) : ae ? /* @__PURE__ */ w(
|
|
1044
|
+
rr,
|
|
1023
1045
|
{
|
|
1024
1046
|
ref: u,
|
|
1025
|
-
itemData:
|
|
1047
|
+
itemData: tt,
|
|
1026
1048
|
outerRef: h,
|
|
1027
1049
|
innerRef: C,
|
|
1028
|
-
onScroll:
|
|
1050
|
+
onScroll: ot,
|
|
1029
1051
|
columnCount: D,
|
|
1030
|
-
columnWidth:
|
|
1031
|
-
rowHeight:
|
|
1032
|
-
height:
|
|
1052
|
+
columnWidth: q,
|
|
1053
|
+
rowHeight: $,
|
|
1054
|
+
height: g,
|
|
1033
1055
|
width: _,
|
|
1034
|
-
estimatedColumnWidth:
|
|
1035
|
-
estimatedRowHeight:
|
|
1036
|
-
rowCount:
|
|
1037
|
-
className:
|
|
1038
|
-
|
|
1039
|
-
d ===
|
|
1056
|
+
estimatedColumnWidth: oe,
|
|
1057
|
+
estimatedRowHeight: ae,
|
|
1058
|
+
rowCount: k,
|
|
1059
|
+
className: me(
|
|
1060
|
+
W["rp-pages"],
|
|
1061
|
+
d === ye.HORIZONTAL_SCROLLING ? W["rp-pages-horizontal-scroll"] : ""
|
|
1040
1062
|
),
|
|
1041
1063
|
style: {
|
|
1042
|
-
"--rp-pages-height": `${
|
|
1043
|
-
"--rp-pages-width": `${
|
|
1044
|
-
"--rp-row-count": `${
|
|
1064
|
+
"--rp-pages-height": `${ne.height}px`,
|
|
1065
|
+
"--rp-pages-width": `${ne.width}px`,
|
|
1066
|
+
"--rp-row-count": `${k}`,
|
|
1045
1067
|
"--rp-column-count": `${D}`
|
|
1046
1068
|
},
|
|
1047
|
-
children:
|
|
1069
|
+
children: lr
|
|
1048
1070
|
}
|
|
1049
|
-
) : !
|
|
1071
|
+
) : !x && !S ? /* @__PURE__ */ w(
|
|
1050
1072
|
"div",
|
|
1051
1073
|
{
|
|
1052
|
-
className:
|
|
1074
|
+
className: W["rp-loader"],
|
|
1053
1075
|
style: {
|
|
1054
1076
|
display: "flex",
|
|
1055
1077
|
justifyContent: "center",
|
|
@@ -1057,11 +1079,11 @@ const ar = ft(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
|
|
|
1057
1079
|
height: "100%",
|
|
1058
1080
|
width: "100%"
|
|
1059
1081
|
},
|
|
1060
|
-
children:
|
|
1082
|
+
children: E && /* @__PURE__ */ w(E, {})
|
|
1061
1083
|
}
|
|
1062
|
-
) : S ===
|
|
1084
|
+
) : S === fe.NOT_SUPPORTED ? /* @__PURE__ */ w("div", { className: W["rp-not-supported"], children: /* @__PURE__ */ Ie("div", { className: W["rp-not-supported-content"], children: [
|
|
1063
1085
|
"React PDF Kit is unable to render on this browser. Please use the supported browsers from the list below:",
|
|
1064
|
-
/* @__PURE__ */ w("div", { children: /* @__PURE__ */
|
|
1086
|
+
/* @__PURE__ */ w("div", { children: /* @__PURE__ */ Ie("ul", { className: W["rp-not-supported-list"], children: [
|
|
1065
1087
|
/* @__PURE__ */ w("li", { children: "Chrome 126+" }),
|
|
1066
1088
|
/* @__PURE__ */ w("li", { children: "Edge 126+" }),
|
|
1067
1089
|
/* @__PURE__ */ w("li", { children: "Firefox 126+" }),
|
|
@@ -1069,14 +1091,25 @@ const ar = ft(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
|
|
|
1069
1091
|
/* @__PURE__ */ w("li", { children: "Safari iOS 18.4+" }),
|
|
1070
1092
|
/* @__PURE__ */ w("li", { children: "Chrome Android 126+" })
|
|
1071
1093
|
] }) })
|
|
1072
|
-
] }) }) : S ===
|
|
1094
|
+
] }) }) : S === fe.INVALID_OR_CORRUPTED_PDF ? /* @__PURE__ */ w(
|
|
1095
|
+
"div",
|
|
1096
|
+
{
|
|
1097
|
+
ref: p,
|
|
1098
|
+
className: W["rp-load-error"],
|
|
1099
|
+
tabIndex: -1,
|
|
1100
|
+
role: "alert",
|
|
1101
|
+
"aria-live": "assertive",
|
|
1102
|
+
"aria-atomic": "true",
|
|
1103
|
+
children: /* @__PURE__ */ w("div", { className: W["rp-load-error-message"], children: "Invalid or corrupted PDF file." })
|
|
1104
|
+
}
|
|
1105
|
+
) : null
|
|
1073
1106
|
}
|
|
1074
1107
|
) })
|
|
1075
1108
|
}
|
|
1076
1109
|
) }),
|
|
1077
|
-
|
|
1110
|
+
P && /* @__PURE__ */ w(At, {})
|
|
1078
1111
|
] });
|
|
1079
1112
|
};
|
|
1080
1113
|
export {
|
|
1081
|
-
|
|
1114
|
+
Zo as RPPages
|
|
1082
1115
|
};
|