@react-pdf-kit/viewer 2.8.0-beta.9 → 2.9.0-beta.0
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.
- package/README.md +10 -0
- package/dist/{Button-BNlmxWrV.js → Button-DBu3SaMk.js} +1 -1
- package/dist/{Checkbox-Brta-YKG.js → Checkbox-CSIEUyO8.js} +4 -4
- package/dist/{Combination-DqNkTtir.js → Combination-11kyhTGt.js} +15 -15
- package/dist/{Container-BxNZX82X.js → Container-BuamPhw4.js} +1 -1
- package/dist/{DocumentDialog-C9G7lVTh.js → DocumentDialog-cRr9sSSH.js} +4 -4
- package/dist/{DropDown-DikL-krI.js → DropDown-CM6xEwZC.js} +2 -2
- package/dist/{Input-DjSWOjCI.js → Input-Dpo1Xfxe.js} +1 -1
- package/dist/{LoaderIcon-D9YjinGf.js → LoaderIcon-B3ddfd0D.js} +1 -1
- package/dist/{LoadingIndicator-B_Jsf8No.js → LoadingIndicator-0E8WHnSN.js} +1 -1
- package/dist/{MenuItem-D-GflAAo.js → MenuItem-lItnKNd5.js} +2 -2
- package/dist/{MenuSeparator-D1H5l8Ej.js → MenuSeparator-CaFxd8b5.js} +1 -1
- package/dist/{PasswordModal-S0leMhEd.js → PasswordModal-CxHFn0pB.js} +1 -1
- package/dist/{RPDropFileZone-D1C3ouep.js → RPDropFileZone-Bq1bzWmO.js} +1 -1
- package/dist/RPPages-cyO0Tn21.js +690 -0
- package/dist/{RPTooltip-COLVx-C_.js → RPTooltip-QWwWh4HW.js} +4 -4
- package/dist/{Thumbnail-C6zkvwcs.js → Thumbnail-BXMk0OWF.js} +2 -2
- package/dist/{Thumbnails-DKG6I7pb.js → Thumbnails-BIuN8LZ8.js} +1 -1
- package/dist/{clsx-B7LyVm5O.js → clsx-DSGuh5YW.js} +1 -1
- package/dist/components/RPConfig.js +5 -4
- package/dist/components/RPDropFileZone.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/icons/LoaderIcon.js +1 -1
- package/dist/components/layout/Container.js +1 -1
- package/dist/components/layout/LayoutContainer.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +2 -2
- package/dist/components/layout/RPLayout.js +2 -2
- package/dist/components/layout/sidebar/RPSidebar.js +3 -3
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DarkModeTool.js +2 -2
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/DocumentProperties.js +3 -3
- package/dist/components/layout/toolbar/FileDownloadTool.js +3 -3
- package/dist/components/layout/toolbar/FileUploadTool.js +3 -3
- package/dist/components/layout/toolbar/FullScreenTool.js +3 -3
- package/dist/components/layout/toolbar/MenuItem.js +1 -1
- package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +4 -4
- package/dist/components/layout/toolbar/OtherTool.js +6 -6
- package/dist/components/layout/toolbar/Paginate.js +3 -3
- package/dist/components/layout/toolbar/PrintTool.js +3 -3
- package/dist/components/layout/toolbar/RPMenuItem.js +3 -3
- package/dist/components/layout/toolbar/RPMoreOptions.js +6 -6
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RotateTool.js +4 -4
- package/dist/components/layout/toolbar/ScrollModeTool.js +3 -3
- package/dist/components/layout/toolbar/SearchCloseButton.js +2 -2
- package/dist/components/layout/toolbar/SearchResultNavigator.js +2 -2
- package/dist/components/layout/toolbar/SearchTool.js +6 -6
- package/dist/components/layout/toolbar/SelectionModeTool.js +4 -4
- package/dist/components/layout/toolbar/ThumbnailTool.js +2 -2
- package/dist/components/layout/toolbar/ToolbarCustom.js +2 -2
- package/dist/components/layout/toolbar/ToolbarDefault.js +2 -2
- package/dist/components/layout/toolbar/ViewModeTool.js +4 -4
- package/dist/components/layout/toolbar/ZoomTool.js +7 -7
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +3 -3
- package/dist/components/layout/toolbar/tools/DualPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +1 -1
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/FirstPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +2 -2
- package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +2 -2
- package/dist/components/layout/toolbar/tools/InputPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/LastPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/NextPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/PageScrollingTool.js +2 -2
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/PrintTool.js +2 -2
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +2 -2
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +2 -2
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +2 -2
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +2 -2
- package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +6 -6
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +4 -4
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +4 -4
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +4 -4
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +4 -4
- package/dist/components/ui/Button.js +1 -1
- package/dist/components/ui/Checkbox.js +1 -1
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/Input.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/PasswordModal.js +1 -1
- package/dist/components/ui/RPTooltip.js +1 -1
- package/dist/contexts/ConfigContext.js +2 -1
- package/dist/contexts/LoaderContext.js +1 -1
- package/dist/{dist-7FA4Do6I.js → dist-B2hwhF6G.js} +7 -7
- package/dist/{dist-BRVqFn7R.js → dist-BfuBBQ14.js} +6 -6
- package/dist/{dist-C3WNMuW2.js → dist-CNbFpoT1.js} +2 -2
- package/dist/{dist-bK-AHWLF.js → dist-CgoP608h.js} +7 -7
- package/dist/{dist-CKteKPPA.js → dist-VbpVNBs6.js} +7 -7
- package/dist/icons.js +1 -1
- package/dist/{main-7sMXtgRg.js → main-DCzVrq0G.js} +2 -2
- package/dist/main.js +4 -4
- package/dist/types/utils/types.d.ts +1 -0
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/useLoadPdf.js +38 -36
- package/package.json +1 -1
- package/dist/RPPages-BQw330_L.js +0 -655
|
@@ -8,7 +8,7 @@ function i(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
|
-
//#region node_modules
|
|
11
|
+
//#region node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
12
12
|
function a(e, t) {
|
|
13
13
|
if (typeof e == "function") return e(t);
|
|
14
14
|
e != null && (e.current = t);
|
|
@@ -31,7 +31,7 @@ function s(...t) {
|
|
|
31
31
|
return e.useCallback(o(...t), t);
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
|
-
//#region node_modules
|
|
34
|
+
//#region node_modules/@radix-ui/react-context/dist/index.mjs
|
|
35
35
|
function c(t, r) {
|
|
36
36
|
let i = e.createContext(r), a = (t) => {
|
|
37
37
|
let { children: r, ...a } = t, o = e.useMemo(() => a, Object.values(a));
|
|
@@ -104,7 +104,7 @@ function u(...t) {
|
|
|
104
104
|
return r.scopeName = n.scopeName, r;
|
|
105
105
|
}
|
|
106
106
|
//#endregion
|
|
107
|
-
//#region node_modules
|
|
107
|
+
//#region node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
108
108
|
/* @__NO_SIDE_EFFECTS__ */
|
|
109
109
|
function d(t) {
|
|
110
110
|
let r = /* @__PURE__ */ f(t), i = e.forwardRef((t, i) => {
|
|
@@ -168,7 +168,7 @@ function _(e) {
|
|
|
168
168
|
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
169
169
|
}
|
|
170
170
|
//#endregion
|
|
171
|
-
//#region node_modules
|
|
171
|
+
//#region node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
172
172
|
var v = [
|
|
173
173
|
"a",
|
|
174
174
|
"button",
|
|
@@ -204,10 +204,10 @@ function y(e, t) {
|
|
|
204
204
|
e && r.flushSync(() => e.dispatchEvent(t));
|
|
205
205
|
}
|
|
206
206
|
//#endregion
|
|
207
|
-
//#region node_modules
|
|
207
|
+
//#region node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
208
208
|
var b = globalThis?.document ? e.useLayoutEffect : () => {};
|
|
209
209
|
//#endregion
|
|
210
|
-
//#region node_modules
|
|
210
|
+
//#region node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
211
211
|
function x(t, n) {
|
|
212
212
|
return e.useReducer((e, t) => n[e][t] ?? e, t);
|
|
213
213
|
}
|
|
@@ -269,7 +269,7 @@ function T(e) {
|
|
|
269
269
|
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
270
270
|
}
|
|
271
271
|
//#endregion
|
|
272
|
-
//#region node_modules
|
|
272
|
+
//#region node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
273
273
|
var E = e.useInsertionEffect || b;
|
|
274
274
|
function D({ prop: t, defaultProp: n, onChange: r = () => {}, caller: i }) {
|
|
275
275
|
let [a, o, s] = O({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as e, d as t, f as n, i as r, l as i, n as a, o, t as s, u as c } from "./dist-
|
|
2
|
-
import { i as l, n as u, r as d, t as f } from "./dist-
|
|
3
|
-
import { a as p, i as m, n as h, r as g, t as _ } from "./dist-
|
|
4
|
-
import { i as v, n as y, r as b, t as x } from "./Combination-
|
|
1
|
+
import { a as e, d as t, f as n, i as r, l as i, n as a, o, t as s, u as c } from "./dist-CgoP608h.js";
|
|
2
|
+
import { i as l, n as u, r as d, t as f } from "./dist-BfuBBQ14.js";
|
|
3
|
+
import { a as p, i as m, n as h, r as g, t as _ } from "./dist-B2hwhF6G.js";
|
|
4
|
+
import { i as v, n as y, r as b, t as x } from "./Combination-11kyhTGt.js";
|
|
5
5
|
import * as S from "react";
|
|
6
6
|
import C from "react";
|
|
7
7
|
import { jsx as w } from "react/jsx-runtime";
|
|
8
|
-
//#region node_modules
|
|
8
|
+
//#region node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
9
9
|
function T(e) {
|
|
10
10
|
let n = e + "CollectionProvider", [r, a] = i(n), [s, c] = r(n, {
|
|
11
11
|
collectionRef: { current: null },
|
|
@@ -60,14 +60,14 @@ function T(e) {
|
|
|
60
60
|
];
|
|
61
61
|
}
|
|
62
62
|
//#endregion
|
|
63
|
-
//#region node_modules
|
|
63
|
+
//#region node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
64
64
|
var E = S.createContext(void 0);
|
|
65
65
|
function D(e) {
|
|
66
66
|
let t = S.useContext(E);
|
|
67
67
|
return e || t || "ltr";
|
|
68
68
|
}
|
|
69
69
|
//#endregion
|
|
70
|
-
//#region node_modules
|
|
70
|
+
//#region node_modules/@radix-ui/react-roving-focus/dist/index.mjs
|
|
71
71
|
var O = "rovingFocusGroup.onEntryFocus", ee = {
|
|
72
72
|
bubbles: !1,
|
|
73
73
|
cancelable: !0
|
package/dist/icons.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./LoaderIcon-
|
|
1
|
+
import { t as e } from "./LoaderIcon-B3ddfd0D.js";
|
|
2
2
|
import { ChevronUpIcon as t } from "./components/icons/ChevronUpIcon.js";
|
|
3
3
|
import { FileUploadDefaultIcon as n } from "./components/icons/FileUploadDefaultIcon.js";
|
|
4
4
|
import { MoonIcon as r } from "./components/icons/MoonIcon.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useViewModeContext as e } from "./contexts/ViewModeContext.js";
|
|
2
2
|
import { r as t } from "./PaginationContext-DIzsZhFd.js";
|
|
3
3
|
import { useLocalizationContext as n } from "./contexts/LocalizationContext.js";
|
|
4
|
-
import { t as r } from "./Button-
|
|
5
|
-
import { t as i } from "./RPTooltip-
|
|
4
|
+
import { t as r } from "./Button-DBu3SaMk.js";
|
|
5
|
+
import { t as i } from "./RPTooltip-QWwWh4HW.js";
|
|
6
6
|
import { DualPageWithCoverIcon as a } from "./components/icons/DualPageWithCoverIcon.js";
|
|
7
7
|
import { GoToDownIcon as o } from "./components/icons/GoToDownIcon.js";
|
|
8
8
|
import { t as s } from "./MostPageTool.module-BRVv-sGz.js";
|
package/dist/main.js
CHANGED
|
@@ -16,12 +16,12 @@ import { useHighlightContext as y } from "./contexts/HighlightContext.js";
|
|
|
16
16
|
import { useElementPageContext as b } from "./contexts/ElementPageContext.js";
|
|
17
17
|
import { useElementThumbnailContext as x } from "./contexts/ElementThumbnailContext.js";
|
|
18
18
|
import { RPProvider as S } from "./components/RPProvider.js";
|
|
19
|
-
import { t as C } from "./RPPages-
|
|
19
|
+
import { t as C } from "./RPPages-cyO0Tn21.js";
|
|
20
20
|
import { useFileDownload as w } from "./utils/hooks/useFileDownload.js";
|
|
21
21
|
import { RPTheme as T } from "./components/RPTheme.js";
|
|
22
22
|
import { RPConfig as E } from "./components/RPConfig.js";
|
|
23
|
-
import { t as D } from "./Button-
|
|
24
|
-
import { t as O } from "./RPTooltip-
|
|
23
|
+
import { t as D } from "./Button-DBu3SaMk.js";
|
|
24
|
+
import { t as O } from "./RPTooltip-QWwWh4HW.js";
|
|
25
25
|
import { SearchTool as k } from "./components/layout/toolbar/SearchTool.js";
|
|
26
26
|
import { RPDefaultLayout as A } from "./components/layout/RPDefaultLayout.js";
|
|
27
27
|
import { RPVerticalBar as j } from "./components/layout/toolbar/tools/defaults/RPVerticalBar.js";
|
|
@@ -46,7 +46,7 @@ import { RotateCounterclockwiseTool as Y } from "./components/layout/toolbar/too
|
|
|
46
46
|
import { SelectionModeSwitcherTool as X } from "./components/layout/toolbar/tools/SelectionModeSwitcherTool.js";
|
|
47
47
|
import { SinglePageTool as Z } from "./components/layout/toolbar/tools/SinglePageTool.js";
|
|
48
48
|
import { DualPageTool as Q } from "./components/layout/toolbar/tools/DualPageTool.js";
|
|
49
|
-
import { n as $, r as ee, t as te } from "./main-
|
|
49
|
+
import { n as $, r as ee, t as te } from "./main-DCzVrq0G.js";
|
|
50
50
|
import { PageScrollingTool as ne } from "./components/layout/toolbar/tools/PageScrollingTool.js";
|
|
51
51
|
import { VerticalScrollingTool as re } from "./components/layout/toolbar/tools/VerticalScrollingTool.js";
|
|
52
52
|
import { HorizontalScrollingTool as ie } from "./components/layout/toolbar/tools/HorizontalScrollingTool.js";
|
|
@@ -3,7 +3,7 @@ import { LicenseType as t } from "../types.js";
|
|
|
3
3
|
import { appConsole as n } from "../appConsole.js";
|
|
4
4
|
import { useCallback as r, useEffect as i, useState as a } from "react";
|
|
5
5
|
//#region lib/utils/hooks/useLicense.ts
|
|
6
|
-
var o = /* @__PURE__ */ new Date("2026-08-
|
|
6
|
+
var o = /* @__PURE__ */ new Date("2026-08-10T06:12:32.238Z"), s = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvIokvErJ0Fctu0jduSAx\ngr+5Har/VSuZLlOunS28hnlqqA+OF1apHL7RYkjBosS15yvviYdLrVWYHpHnoY4b\nHLQ9I6YX6FMB9T/VbB4xLdVdKvfi8r49aTScl5EKuSpgpPgz2VSJTfvVGcRuth/Y\nBm7PPGYdL2l2gvKDxchmmsHFPukGki9L4JOUeIVX0GXAxabENckaEH/iC1NZhX+W\nvXnpHeHuIIKlZ16LSivXNgo6BH2Z3GFdg4G3cAaXr6qNP8fsacYNqv2SpTW1viFD\nvzcGRabN25gpJAp9/syeScefWH3OiJY1lmw88oTiJbjIoiq6AkPhfn3G9mF54nvR\nkwIDAQAB\n-----END PUBLIC KEY-----", c = "Please visit https://app.react-pdf-kit.dev to generate a new license key.", l = {
|
|
7
7
|
invalidLicense: `You are currently using without a valid license. ${c}`,
|
|
8
8
|
mismatchedDomain: `Your license key is not valid for the current domain / IP. ${c}`,
|
|
9
9
|
expired: `Your license key has expired. ${c}`,
|
|
@@ -24,40 +24,41 @@ function _(e) {
|
|
|
24
24
|
return t.cause = e, t;
|
|
25
25
|
}
|
|
26
26
|
var v = (a, o, c = {}) => {
|
|
27
|
-
let [p, v] = d(), { workerUrlAdded: y, wasmUrl: b } = n(), [
|
|
27
|
+
let [p, v] = d(), { workerUrlAdded: y, wasmUrl: b, standardFontDataUrl: x } = n(), [S, C] = d(/* @__PURE__ */ new Map()), w = u(), [T, E] = d(0), [D, O] = d(!1), [k, A] = d(), { password: j, passwordError: M, setPasswordError: N, passwordRequired: P, setPasswordRequired: F } = i(), { onLoadError: I, onLoaded: L, onLoadProgress: R, disableAutoFetch: z, disableStream: B, rangeChunkSize: V, withCredentials: H, httpHeaders: U } = c;
|
|
28
28
|
return l(() => {
|
|
29
|
-
|
|
30
|
-
}, [
|
|
29
|
+
R && R(T);
|
|
30
|
+
}, [T, R]), l(() => {
|
|
31
31
|
if (!y || !a) return;
|
|
32
|
-
|
|
33
|
-
let t =
|
|
32
|
+
E(0), A(void 0), w.current = Date.now();
|
|
33
|
+
let t = w.current, n = {
|
|
34
34
|
url: a,
|
|
35
35
|
cMapPacked: o?.isCompressed ?? !0,
|
|
36
36
|
...o?.url && { cMapUrl: o.url },
|
|
37
|
-
...
|
|
38
|
-
...
|
|
39
|
-
...
|
|
40
|
-
...
|
|
41
|
-
...
|
|
42
|
-
...
|
|
37
|
+
...j && { password: j },
|
|
38
|
+
...z !== void 0 && { disableAutoFetch: z },
|
|
39
|
+
...B !== void 0 && { disableStream: B },
|
|
40
|
+
...V !== void 0 && { rangeChunkSize: V },
|
|
41
|
+
...H !== void 0 && { withCredentials: H },
|
|
42
|
+
...U !== void 0 && { httpHeaders: U },
|
|
43
43
|
...b && { wasmUrl: b },
|
|
44
|
+
...x && { standardFontDataUrl: x },
|
|
44
45
|
verbosity: f.VerbosityLevel.ERRORS
|
|
45
46
|
};
|
|
46
47
|
try {
|
|
47
48
|
let i = f.getDocument(n);
|
|
48
49
|
i.onProgress = (e) => {
|
|
49
|
-
if (t ===
|
|
50
|
+
if (t === w.current) {
|
|
50
51
|
let { loaded: t, total: n } = e;
|
|
51
|
-
|
|
52
|
+
E(n ? Math.min(100, Math.round(t / n * 100)) : 0);
|
|
52
53
|
}
|
|
53
|
-
},
|
|
54
|
-
let a = i.promise.then(async (n) => !b && m(await n.getData()) ? (t ===
|
|
54
|
+
}, O(!0), v(void 0);
|
|
55
|
+
let a = i.promise.then(async (n) => !b && m(await n.getData()) ? (t === w.current && (v(void 0), A(e.WASM_URL_REQUIRED)), r.error(s), I?.(g()), n) : (t === w.current && (v(n), E(100)), L && L(n), F(!1), N(""), n)).catch((t) => {
|
|
55
56
|
if (t instanceof Error && t.name === "PasswordException") {
|
|
56
57
|
let e = t.code;
|
|
57
|
-
|
|
58
|
-
} else t instanceof Error && t.name === "InvalidPDFException" &&
|
|
58
|
+
F(!0), e === f.PasswordResponses.INCORRECT_PASSWORD ? N("Incorrect password") : N(void 0);
|
|
59
|
+
} else t instanceof Error && t.name === "InvalidPDFException" && j ? (F(!0), N("Incorrect password")) : t instanceof Error && t.name === "InvalidPDFException" ? (A(e.INVALID_OR_CORRUPTED_PDF), I?.(h(t))) : I && I(t);
|
|
59
60
|
}).finally(() => {
|
|
60
|
-
|
|
61
|
+
O(!1);
|
|
61
62
|
});
|
|
62
63
|
return () => {
|
|
63
64
|
a.finally(() => {
|
|
@@ -65,20 +66,21 @@ var v = (a, o, c = {}) => {
|
|
|
65
66
|
});
|
|
66
67
|
};
|
|
67
68
|
} catch (t) {
|
|
68
|
-
|
|
69
|
+
A(e.NOT_SUPPORTED), I?.(_(t));
|
|
69
70
|
}
|
|
70
71
|
}, [
|
|
71
72
|
a,
|
|
72
73
|
y,
|
|
73
74
|
b,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
I
|
|
75
|
+
x,
|
|
76
|
+
j,
|
|
77
|
+
I,
|
|
78
|
+
L
|
|
77
79
|
]), l(() => {
|
|
78
|
-
if (
|
|
80
|
+
if (P) return;
|
|
79
81
|
let n = /* @__PURE__ */ new Map();
|
|
80
|
-
if (!p ||
|
|
81
|
-
|
|
82
|
+
if (!p || D) {
|
|
83
|
+
C(n);
|
|
82
84
|
return;
|
|
83
85
|
}
|
|
84
86
|
let r = p.numPages, i = [];
|
|
@@ -97,23 +99,23 @@ var v = (a, o, c = {}) => {
|
|
|
97
99
|
thumbnailScale: i,
|
|
98
100
|
defaultRotation: a.rotation
|
|
99
101
|
});
|
|
100
|
-
}),
|
|
102
|
+
}), C(n);
|
|
101
103
|
}).catch((t) => {
|
|
102
|
-
v(void 0),
|
|
104
|
+
v(void 0), A(e.INVALID_OR_CORRUPTED_PDF), I?.(h(t));
|
|
103
105
|
});
|
|
104
106
|
}, [
|
|
105
107
|
p,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
D,
|
|
109
|
+
P,
|
|
110
|
+
I
|
|
109
111
|
]), {
|
|
110
112
|
pdf: p,
|
|
111
|
-
pages:
|
|
112
|
-
loading:
|
|
113
|
-
error:
|
|
114
|
-
loadingProgress:
|
|
115
|
-
passwordRequired:
|
|
116
|
-
passwordError:
|
|
113
|
+
pages: S,
|
|
114
|
+
loading: D,
|
|
115
|
+
error: k,
|
|
116
|
+
loadingProgress: T,
|
|
117
|
+
passwordRequired: P,
|
|
118
|
+
passwordError: M
|
|
117
119
|
};
|
|
118
120
|
};
|
|
119
121
|
//#endregion
|