@react-pdf-kit/viewer 0.0.0-experimental.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 +204 -0
- package/dist/Combination-54a77a7a.js +701 -0
- package/dist/MostPageTool.module-13578ad6.js +6 -0
- package/dist/OtherTool.module-a4be5f1f.js +6 -0
- package/dist/Paginate.module-4eef00aa.js +8 -0
- package/dist/PaginationContext-9217cab4.js +201 -0
- package/dist/RPLayout.module-b4b23e29.js +14 -0
- package/dist/RPSplitter-f6acf13b.js +71 -0
- package/dist/RPToolbar.module-27d7fe77.js +10 -0
- package/dist/RotateTool.module-67946714.js +6 -0
- package/dist/SearchTool.module-99f60dc7.js +16 -0
- package/dist/ToolbarLayout.module-6e339802.js +12 -0
- package/dist/ZoomTool.module-7082af8c.js +12 -0
- package/dist/assets/style.css +1 -0
- package/dist/assets/style.js +77 -0
- package/dist/clsx-0c6e471a.js +22 -0
- package/dist/components/RPConfig.js +17 -0
- package/dist/components/RPController.js +136 -0
- package/dist/components/RPDropFileZone.js +53 -0
- package/dist/components/RPPages.js +1049 -0
- package/dist/components/RPProvider.js +126 -0
- package/dist/components/RPTheme.js +22 -0
- package/dist/components/icons/CheckIcon.js +22 -0
- package/dist/components/icons/ChevronDownIcon.js +23 -0
- package/dist/components/icons/ChevronUpIcon.js +22 -0
- package/dist/components/icons/ClearIcon.js +25 -0
- package/dist/components/icons/ClockwiseIcon.js +22 -0
- package/dist/components/icons/CloseIcon.js +22 -0
- package/dist/components/icons/DarkPdfIcon.js +15 -0
- package/dist/components/icons/DualPageIcon.js +22 -0
- package/dist/components/icons/DualPageWithCoverIcon.js +22 -0
- package/dist/components/icons/FileDownloadDefaultIcon.js +23 -0
- package/dist/components/icons/FileUploadDefaultIcon.js +23 -0
- package/dist/components/icons/FullScreenIcon.js +22 -0
- package/dist/components/icons/GoToDownIcon.js +22 -0
- package/dist/components/icons/HandModeDefaultIcon.js +22 -0
- package/dist/components/icons/HorizontalScrollingIcon.js +24 -0
- package/dist/components/icons/InfoIcon.js +22 -0
- package/dist/components/icons/LightPdfIcon.js +15 -0
- package/dist/components/icons/LoaderIcon.js +17 -0
- package/dist/components/icons/MoonIcon.js +22 -0
- package/dist/components/icons/PageScrollingIcon.js +24 -0
- package/dist/components/icons/PrintDefaultIcon.js +23 -0
- package/dist/components/icons/SearchIcon.js +22 -0
- package/dist/components/icons/SinglePageIcon.js +22 -0
- package/dist/components/icons/SunIcon.js +25 -0
- package/dist/components/icons/TextSelectionDefaultIcon.js +23 -0
- package/dist/components/icons/ThreeDotIcon.js +22 -0
- package/dist/components/icons/Thumbnail.js +54 -0
- package/dist/components/icons/VerticalScrollingIcon.js +24 -0
- package/dist/components/icons/WrappedScrollingIcon.js +24 -0
- package/dist/components/icons/ZoomInIcon.js +22 -0
- package/dist/components/icons/ZoomOutIcon.js +22 -0
- package/dist/components/layout/Container.js +21 -0
- package/dist/components/layout/LayoutContainer.js +35 -0
- package/dist/components/layout/LayoutWrapper.js +11 -0
- package/dist/components/layout/RPDefaultLayout.js +238 -0
- package/dist/components/layout/RPLayout.js +213 -0
- package/dist/components/layout/SkipLink.js +29 -0
- package/dist/components/layout/WrapperLayout.js +26 -0
- package/dist/components/layout/sidebar/RPSidebar.js +107 -0
- package/dist/components/layout/sidebar/RPSplitter.js +8 -0
- package/dist/components/layout/sidebar/Thumbnail.js +145 -0
- package/dist/components/layout/sidebar/Thumbnails.js +77 -0
- package/dist/components/layout/toolbar/DarkModeTool.js +38 -0
- package/dist/components/layout/toolbar/DocumentDialog.js +314 -0
- package/dist/components/layout/toolbar/DocumentProperties.js +40 -0
- package/dist/components/layout/toolbar/FileDownloadTool.js +50 -0
- package/dist/components/layout/toolbar/FileUploadTool.js +49 -0
- package/dist/components/layout/toolbar/FullScreenTool.js +74 -0
- package/dist/components/layout/toolbar/MenuItem.js +19 -0
- package/dist/components/layout/toolbar/MenuSeparator.js +15 -0
- package/dist/components/layout/toolbar/MostPageTool.js +81 -0
- package/dist/components/layout/toolbar/OtherTool.js +199 -0
- package/dist/components/layout/toolbar/Paginate.js +145 -0
- package/dist/components/layout/toolbar/PrintTool.js +72 -0
- package/dist/components/layout/toolbar/PropertyItem.js +12 -0
- package/dist/components/layout/toolbar/RPMenuItem.js +33 -0
- package/dist/components/layout/toolbar/RPMoreOptions.js +220 -0
- package/dist/components/layout/toolbar/RPToolbar.js +151 -0
- package/dist/components/layout/toolbar/RPToolbarEnd.js +121 -0
- package/dist/components/layout/toolbar/RotateTool.js +60 -0
- package/dist/components/layout/toolbar/ScrollModeTool.js +68 -0
- package/dist/components/layout/toolbar/SearchCloseButton.js +32 -0
- package/dist/components/layout/toolbar/SearchResultNavigator.js +109 -0
- package/dist/components/layout/toolbar/SearchTool.js +264 -0
- package/dist/components/layout/toolbar/SelectionModeTool.js +52 -0
- package/dist/components/layout/toolbar/ThumbnailTool.js +39 -0
- package/dist/components/layout/toolbar/ToolbarCustom.js +108 -0
- package/dist/components/layout/toolbar/ToolbarDefault.js +192 -0
- package/dist/components/layout/toolbar/ToolbarLayout.js +154 -0
- package/dist/components/layout/toolbar/ViewModeTool.js +63 -0
- package/dist/components/layout/toolbar/ZoomTool.js +150 -0
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +54 -0
- package/dist/components/layout/toolbar/tools/DualPageTool.js +26 -0
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +204 -0
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +35 -0
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +34 -0
- package/dist/components/layout/toolbar/tools/FirstPageTool.js +199 -0
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +34 -0
- package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/InputPageTool.js +92 -0
- package/dist/components/layout/toolbar/tools/LastPageTool.js +199 -0
- package/dist/components/layout/toolbar/tools/NextPageTool.js +62 -0
- package/dist/components/layout/toolbar/tools/PageScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +62 -0
- package/dist/components/layout/toolbar/tools/PrintTool.js +35 -0
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +47 -0
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +48 -0
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +39 -0
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +26 -0
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +36 -0
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +46 -0
- package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +58 -0
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +27 -0
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +133 -0
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +58 -0
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +148 -0
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +42 -0
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +29 -0
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +52 -0
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +51 -0
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +43 -0
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +87 -0
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +52 -0
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +64 -0
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +73 -0
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +58 -0
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +67 -0
- package/dist/components/page/AnnotationLayer.js +145 -0
- package/dist/components/page/CanvasLayer.js +88 -0
- package/dist/components/page/CustomElement.js +53 -0
- package/dist/components/page/DualPage.js +100 -0
- package/dist/components/page/DualPageWithCover.js +132 -0
- package/dist/components/page/RPPage.js +144 -0
- package/dist/components/page/SinglePage.js +90 -0
- package/dist/components/page/TextHighlightLayer.js +198 -0
- package/dist/components/page/TextLayer.js +203 -0
- package/dist/components/page/searchHighlight.js +37 -0
- package/dist/components/ui/Button.js +25 -0
- package/dist/components/ui/Checkbox.js +273 -0
- package/dist/components/ui/DropDown.js +36 -0
- package/dist/components/ui/Input.js +28 -0
- package/dist/components/ui/LoadingIndicator.js +47 -0
- package/dist/components/ui/PasswordModal.js +75 -0
- package/dist/components/ui/RPTooltip.js +571 -0
- package/dist/contexts/ConfigContext.js +13 -0
- package/dist/contexts/DarkModeContext.js +28 -0
- package/dist/contexts/DimensionPagesContext.js +89 -0
- package/dist/contexts/DocumentPasswordContext.js +40 -0
- package/dist/contexts/DownloadContext.js +21 -0
- package/dist/contexts/DropFileZoneContext.js +62 -0
- package/dist/contexts/ElementPageContext.js +139 -0
- package/dist/contexts/EventCallbackContext.js +34 -0
- package/dist/contexts/FileInputContext.js +49 -0
- package/dist/contexts/FullScreenContext.js +25 -0
- package/dist/contexts/GlobalCurrentPage.js +19 -0
- package/dist/contexts/HighlightContext.js +31 -0
- package/dist/contexts/IconContext.js +11 -0
- package/dist/contexts/IconToolContext.js +13 -0
- package/dist/contexts/InitialStateContext.js +13 -0
- package/dist/contexts/LayerContext.js +8 -0
- package/dist/contexts/LayoutContainerContext.js +16 -0
- package/dist/contexts/LicenseContext.js +16 -0
- package/dist/contexts/LoaderContext.js +27 -0
- package/dist/contexts/LocalizationContext.js +34 -0
- package/dist/contexts/OtherToolContext.js +18 -0
- package/dist/contexts/PageViewportContext.js +8 -0
- package/dist/contexts/PagesRotateContext.js +43 -0
- package/dist/contexts/PaginationContext.js +39 -0
- package/dist/contexts/PrintContext.js +78 -0
- package/dist/contexts/RPDocumentContext.js +69 -0
- package/dist/contexts/RenderQueueProvider.js +72 -0
- package/dist/contexts/RenderedPagesCache.js +14 -0
- package/dist/contexts/RotationContext.js +38 -0
- package/dist/contexts/ScrollModeContext.js +22 -0
- package/dist/contexts/SearchContext.js +96 -0
- package/dist/contexts/SelectionModeContext.js +24 -0
- package/dist/contexts/SmoothScaleContext.js +67 -0
- package/dist/contexts/SmoothScrollContext.js +12 -0
- package/dist/contexts/ThemeContext.js +7 -0
- package/dist/contexts/ThumbnailsContext.js +43 -0
- package/dist/contexts/ToolComponentContext.js +52 -0
- package/dist/contexts/ToolbarComponentContext.js +48 -0
- package/dist/contexts/ViewModeContext.js +33 -0
- package/dist/contexts/ViewportContext.js +85 -0
- package/dist/contexts/VirtualGridContext.js +15 -0
- package/dist/contexts/VirtualScrollContext.js +53 -0
- package/dist/contexts/ZoomContext.js +107 -0
- package/dist/de_DE-a553b162.js +489 -0
- package/dist/floating-ui.react-dom-5ec29bd6.js +1327 -0
- package/dist/index-4baea9b5.js +1198 -0
- package/dist/index-655864a7.js +27 -0
- package/dist/index-c0faa594.js +309 -0
- package/dist/index-e3ee9457.js +150 -0
- package/dist/libInjectCss.js +9 -0
- package/dist/main.js +289 -0
- package/dist/types/assets/style.d.ts +1 -0
- package/dist/types/components/RPConfig.d.ts +3 -0
- package/dist/types/components/RPController.d.ts +3 -0
- package/dist/types/components/RPDropFileZone.d.ts +2 -0
- package/dist/types/components/RPPages.d.ts +2 -0
- package/dist/types/components/RPProvider.d.ts +3 -0
- package/dist/types/components/RPTheme.d.ts +3 -0
- package/dist/types/components/icons/CheckIcon.d.ts +2 -0
- package/dist/types/components/icons/ChevronDownIcon.d.ts +2 -0
- package/dist/types/components/icons/ChevronUpIcon.d.ts +2 -0
- package/dist/types/components/icons/ClearIcon.d.ts +2 -0
- package/dist/types/components/icons/ClockwiseIcon.d.ts +2 -0
- package/dist/types/components/icons/CloseIcon.d.ts +2 -0
- package/dist/types/components/icons/DarkPdfIcon.d.ts +2 -0
- package/dist/types/components/icons/DualPageIcon.d.ts +2 -0
- package/dist/types/components/icons/DualPageWithCoverIcon.d.ts +2 -0
- package/dist/types/components/icons/FileDownloadDefaultIcon.d.ts +2 -0
- package/dist/types/components/icons/FileUploadDefaultIcon.d.ts +2 -0
- package/dist/types/components/icons/FullScreenIcon.d.ts +2 -0
- package/dist/types/components/icons/GoToDownIcon.d.ts +2 -0
- package/dist/types/components/icons/HandModeDefaultIcon.d.ts +2 -0
- package/dist/types/components/icons/HorizontalScrollingIcon.d.ts +2 -0
- package/dist/types/components/icons/InfoIcon.d.ts +2 -0
- package/dist/types/components/icons/LightPdfIcon.d.ts +2 -0
- package/dist/types/components/icons/LoaderIcon.d.ts +2 -0
- package/dist/types/components/icons/MoonIcon.d.ts +2 -0
- package/dist/types/components/icons/PageScrollingIcon.d.ts +2 -0
- package/dist/types/components/icons/PrintDefaultIcon.d.ts +2 -0
- package/dist/types/components/icons/SearchIcon.d.ts +2 -0
- package/dist/types/components/icons/SinglePageIcon.d.ts +2 -0
- package/dist/types/components/icons/SunIcon.d.ts +2 -0
- package/dist/types/components/icons/TextSelectionDefaultIcon.d.ts +2 -0
- package/dist/types/components/icons/ThreeDotIcon.d.ts +2 -0
- package/dist/types/components/icons/Thumbnail.d.ts +2 -0
- package/dist/types/components/icons/VerticalScrollingIcon.d.ts +2 -0
- package/dist/types/components/icons/WrappedScrollingIcon.d.ts +2 -0
- package/dist/types/components/icons/ZoomInIcon.d.ts +2 -0
- package/dist/types/components/icons/ZoomOutIcon.d.ts +2 -0
- package/dist/types/components/layout/Container.d.ts +8 -0
- package/dist/types/components/layout/LayoutContainer.d.ts +10 -0
- package/dist/types/components/layout/LayoutWrapper.d.ts +8 -0
- package/dist/types/components/layout/RPDefaultLayout.d.ts +2 -0
- package/dist/types/components/layout/RPLayout.d.ts +3 -0
- package/dist/types/components/layout/SkipLink.d.ts +7 -0
- package/dist/types/components/layout/WrapperLayout.d.ts +2 -0
- package/dist/types/components/layout/sidebar/RPSidebar.d.ts +1 -0
- package/dist/types/components/layout/sidebar/RPSplitter.d.ts +9 -0
- package/dist/types/components/layout/sidebar/Thumbnail.d.ts +11 -0
- package/dist/types/components/layout/sidebar/Thumbnails.d.ts +6 -0
- package/dist/types/components/layout/toolbar/DarkModeTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/DocumentDialog.d.ts +2 -0
- package/dist/types/components/layout/toolbar/DocumentProperties.d.ts +1 -0
- package/dist/types/components/layout/toolbar/FileDownloadTool.d.ts +2 -0
- package/dist/types/components/layout/toolbar/FileUploadTool.d.ts +2 -0
- package/dist/types/components/layout/toolbar/FullScreenTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/MenuItem.d.ts +6 -0
- package/dist/types/components/layout/toolbar/MenuSeparator.d.ts +1 -0
- package/dist/types/components/layout/toolbar/MostPageTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/OtherTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/Paginate.d.ts +1 -0
- package/dist/types/components/layout/toolbar/PrintTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/PropertyItem.d.ts +7 -0
- package/dist/types/components/layout/toolbar/RPMenuItem.d.ts +11 -0
- package/dist/types/components/layout/toolbar/RPMoreOptions.d.ts +3 -0
- package/dist/types/components/layout/toolbar/RPToolbar.d.ts +1 -0
- package/dist/types/components/layout/toolbar/RPToolbarEnd.d.ts +1 -0
- package/dist/types/components/layout/toolbar/RotateTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/ScrollModeTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/SearchCloseButton.d.ts +7 -0
- package/dist/types/components/layout/toolbar/SearchResultNavigator.d.ts +1 -0
- package/dist/types/components/layout/toolbar/SearchTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/SelectionModeTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/ThumbnailTool.d.ts +2 -0
- package/dist/types/components/layout/toolbar/ToolbarCustom.d.ts +3 -0
- package/dist/types/components/layout/toolbar/ToolbarDefault.d.ts +4 -0
- package/dist/types/components/layout/toolbar/ToolbarLayout.d.ts +3 -0
- package/dist/types/components/layout/toolbar/ViewModeTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/ZoomTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/tools/DocumentPropertiesTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/DualPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/DualPageWithCoverTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/FileDownloadTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/FileUploadTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/FirstPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/FullScreenTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/HorizontalScrollingTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/InputPageTool.d.ts +2 -0
- package/dist/types/components/layout/toolbar/tools/LastPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/NextPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/PageScrollingTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/PreviousPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/PrintTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/RotateClockwiseTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/RotateCounterclockwiseTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/SelectionModeSwitcherTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/SinglePageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/ThemeSwitcherTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/ThumbnailTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/VerticalScrollingTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/ZoomInTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/ZoomLevelDisplay.d.ts +7 -0
- package/dist/types/components/layout/toolbar/tools/ZoomLevelTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/ZoomOutTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/defaults/RPHorizontalBar.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/defaults/RPVerticalBar.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/DocumentProperties.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/FileDownloadTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/FileUploadTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/FullScreenTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/MostPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/PrintTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/RotateTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/ScrollModeTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/SelectionModeTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/ViewModeTool.d.ts +3 -0
- package/dist/types/components/page/AnnotationLayer.d.ts +6 -0
- package/dist/types/components/page/CanvasLayer.d.ts +8 -0
- package/dist/types/components/page/CustomElement.d.ts +6 -0
- package/dist/types/components/page/DualPage.d.ts +5 -0
- package/dist/types/components/page/DualPageWithCover.d.ts +5 -0
- package/dist/types/components/page/RPPage.d.ts +5 -0
- package/dist/types/components/page/SinglePage.d.ts +5 -0
- package/dist/types/components/page/TextHighlightLayer.d.ts +10 -0
- package/dist/types/components/page/TextLayer.d.ts +6 -0
- package/dist/types/components/page/searchHighlight.d.ts +5 -0
- package/dist/types/components/ui/Button.d.ts +6 -0
- package/dist/types/components/ui/Checkbox.d.ts +10 -0
- package/dist/types/components/ui/DropDown.d.ts +10 -0
- package/dist/types/components/ui/Input.d.ts +6 -0
- package/dist/types/components/ui/LoadingIndicator.d.ts +6 -0
- package/dist/types/components/ui/PasswordModal.d.ts +3 -0
- package/dist/types/components/ui/RPTooltip.d.ts +9 -0
- package/dist/types/contexts/ConfigContext.d.ts +5 -0
- package/dist/types/contexts/DarkModeContext.d.ts +5 -0
- package/dist/types/contexts/DimensionPagesContext.d.ts +4 -0
- package/dist/types/contexts/DocumentPasswordContext.d.ts +14 -0
- package/dist/types/contexts/DownloadContext.d.ts +11 -0
- package/dist/types/contexts/DropFileZoneContext.d.ts +5 -0
- package/dist/types/contexts/ElementPageContext.d.ts +6 -0
- package/dist/types/contexts/EventCallbackContext.d.ts +5 -0
- package/dist/types/contexts/FileInputContext.d.ts +7 -0
- package/dist/types/contexts/FullScreenContext.d.ts +7 -0
- package/dist/types/contexts/GlobalCurrentPage.d.ts +11 -0
- package/dist/types/contexts/HighlightContext.d.ts +8 -0
- package/dist/types/contexts/IconContext.d.ts +7 -0
- package/dist/types/contexts/IconToolContext.d.ts +9 -0
- package/dist/types/contexts/InitialStateContext.d.ts +5 -0
- package/dist/types/contexts/LayerContext.d.ts +5 -0
- package/dist/types/contexts/LayoutContainerContext.d.ts +12 -0
- package/dist/types/contexts/LicenseContext.d.ts +7 -0
- package/dist/types/contexts/LoaderContext.d.ts +12 -0
- package/dist/types/contexts/LocalizationContext.d.ts +5 -0
- package/dist/types/contexts/OtherToolContext.d.ts +9 -0
- package/dist/types/contexts/PageViewportContext.d.ts +4 -0
- package/dist/types/contexts/PagesRotateContext.d.ts +15 -0
- package/dist/types/contexts/PaginationContext.d.ts +5 -0
- package/dist/types/contexts/PrintContext.d.ts +7 -0
- package/dist/types/contexts/RPDocumentContext.d.ts +12 -0
- package/dist/types/contexts/RenderQueueProvider.d.ts +17 -0
- package/dist/types/contexts/RenderedPagesCache.d.ts +10 -0
- package/dist/types/contexts/RotationContext.d.ts +5 -0
- package/dist/types/contexts/ScrollModeContext.d.ts +5 -0
- package/dist/types/contexts/SearchContext.d.ts +7 -0
- package/dist/types/contexts/SelectionModeContext.d.ts +5 -0
- package/dist/types/contexts/SmoothScaleContext.d.ts +16 -0
- package/dist/types/contexts/SmoothScrollContext.d.ts +8 -0
- package/dist/types/contexts/ThemeContext.d.ts +4 -0
- package/dist/types/contexts/ThumbnailsContext.d.ts +7 -0
- package/dist/types/contexts/ToolComponentContext.d.ts +12 -0
- package/dist/types/contexts/ToolbarComponentContext.d.ts +9 -0
- package/dist/types/contexts/ViewModeContext.d.ts +5 -0
- package/dist/types/contexts/ViewportContext.d.ts +28 -0
- package/dist/types/contexts/VirtualGridContext.d.ts +9 -0
- package/dist/types/contexts/VirtualScrollContext.d.ts +30 -0
- package/dist/types/contexts/ZoomContext.d.ts +5 -0
- package/dist/types/libInjectCss.d.ts +1 -0
- package/dist/types/locales/de_DE.json.d.ts +83 -0
- package/dist/types/locales/en_US.json.d.ts +83 -0
- package/dist/types/locales/it_IT.json.d.ts +83 -0
- package/dist/types/locales/pt_PT.json.d.ts +83 -0
- package/dist/types/locales/th_TH.json.d.ts +83 -0
- package/dist/types/locales/zh_CN.json.d.ts +83 -0
- package/dist/types/main.d.ts +51 -0
- package/dist/types/utils/Queue.d.ts +18 -0
- package/dist/types/utils/annotations.d.ts +18 -0
- package/dist/types/utils/appConsole.d.ts +24 -0
- package/dist/types/utils/approximateFragtion.d.ts +9 -0
- package/dist/types/utils/calculatePage.d.ts +12 -0
- package/dist/types/utils/charators.d.ts +12 -0
- package/dist/types/utils/const.d.ts +3 -0
- package/dist/types/utils/constants.d.ts +5 -0
- package/dist/types/utils/convertPdfDate.d.ts +1 -0
- package/dist/types/utils/dateFormatter.d.ts +1 -0
- package/dist/types/utils/elementPagePosition.d.ts +17 -0
- package/dist/types/utils/formatFileSize.d.ts +1 -0
- package/dist/types/utils/getElementPositionInPage.d.ts +5 -0
- package/dist/types/utils/getScrollDistance.d.ts +1 -0
- package/dist/types/utils/getThumbnailViewport.d.ts +5 -0
- package/dist/types/utils/getWordPositionInPage.d.ts +8 -0
- package/dist/types/utils/getZoomLevel.d.ts +2 -0
- package/dist/types/utils/highlight.d.ts +14 -0
- package/dist/types/utils/hooks/useAccumulateFactor.d.ts +9 -0
- package/dist/types/utils/hooks/useCopyText.d.ts +1 -0
- package/dist/types/utils/hooks/useDarkMode.d.ts +2 -0
- package/dist/types/utils/hooks/useDarkModeProps.d.ts +2 -0
- package/dist/types/utils/hooks/useDebounce.d.ts +1 -0
- package/dist/types/utils/hooks/useElementSize.d.ts +8 -0
- package/dist/types/utils/hooks/useFileDownload.d.ts +3 -0
- package/dist/types/utils/hooks/useFlickerSelectText.d.ts +1 -0
- package/dist/types/utils/hooks/useFullScreen.d.ts +6 -0
- package/dist/types/utils/hooks/useGrabScroll.d.ts +11 -0
- package/dist/types/utils/hooks/useHighlight.d.ts +10 -0
- package/dist/types/utils/hooks/useInfiniteScroll.d.ts +6 -0
- package/dist/types/utils/hooks/useLicense.d.ts +2 -0
- package/dist/types/utils/hooks/useLoadPdf.d.ts +11 -0
- package/dist/types/utils/hooks/useLoadWorker.d.ts +3 -0
- package/dist/types/utils/hooks/useLocalization.d.ts +10 -0
- package/dist/types/utils/hooks/useMousePressed.d.ts +7 -0
- package/dist/types/utils/hooks/usePageRotateContext.d.ts +3 -0
- package/dist/types/utils/hooks/usePaginate.d.ts +2 -0
- package/dist/types/utils/hooks/usePdfProperties.d.ts +9 -0
- package/dist/types/utils/hooks/usePinch.d.ts +1 -0
- package/dist/types/utils/hooks/usePresentPage.d.ts +2 -0
- package/dist/types/utils/hooks/usePrint.d.ts +12 -0
- package/dist/types/utils/hooks/useRequestAnimationFrame.d.ts +5 -0
- package/dist/types/utils/hooks/useResizeObserver.d.ts +6 -0
- package/dist/types/utils/hooks/useRotate.d.ts +4 -0
- package/dist/types/utils/hooks/useScrollToPage.d.ts +3 -0
- package/dist/types/utils/hooks/useSearch.d.ts +13 -0
- package/dist/types/utils/hooks/useTextSelection.d.ts +7 -0
- package/dist/types/utils/hooks/useThumbnail.d.ts +7 -0
- package/dist/types/utils/hooks/useVirtualReactWindow.d.ts +17 -0
- package/dist/types/utils/hooks/useWatermark.d.ts +1 -0
- package/dist/types/utils/injectPrintCSS.d.ts +1 -0
- package/dist/types/utils/link_service.d.ts +81 -0
- package/dist/types/utils/renderPage.d.ts +3 -0
- package/dist/types/utils/sanitizeExternalUrl.d.ts +1 -0
- package/dist/types/utils/smoothScrollTo.d.ts +2 -0
- package/dist/types/utils/types.d.ts +920 -0
- package/dist/types/utils/withRef.d.ts +5 -0
- package/dist/types/utils/zoom.d.ts +2 -0
- package/dist/utils/Queue.js +47 -0
- package/dist/utils/annotations.js +277 -0
- package/dist/utils/appConsole.js +42 -0
- package/dist/utils/approximateFragtion.js +22 -0
- package/dist/utils/calculatePage.js +21 -0
- package/dist/utils/charators.js +48 -0
- package/dist/utils/const.js +9 -0
- package/dist/utils/constants.js +8 -0
- package/dist/utils/convertPdfDate.js +25 -0
- package/dist/utils/dateFormatter.js +7 -0
- package/dist/utils/elementPagePosition.js +11 -0
- package/dist/utils/formatFileSize.js +9 -0
- package/dist/utils/getElementPositionInPage.js +84 -0
- package/dist/utils/getScrollDistance.js +4 -0
- package/dist/utils/getThumbnailViewport.js +7 -0
- package/dist/utils/getWordPositionInPage.js +25 -0
- package/dist/utils/getZoomLevel.js +24 -0
- package/dist/utils/highlight.js +221 -0
- package/dist/utils/hooks/useAccumulateFactor.js +17 -0
- package/dist/utils/hooks/useCopyText.js +36 -0
- package/dist/utils/hooks/useDarkMode.js +11 -0
- package/dist/utils/hooks/useDarkModeProps.js +12 -0
- package/dist/utils/hooks/useDebounce.js +19 -0
- package/dist/utils/hooks/useElementSize.js +21 -0
- package/dist/utils/hooks/useFileDownload.js +33 -0
- package/dist/utils/hooks/useFlickerSelectText.js +25 -0
- package/dist/utils/hooks/useFullScreen.js +29 -0
- package/dist/utils/hooks/useGrabScroll.js +52 -0
- package/dist/utils/hooks/useHighlight.js +55 -0
- package/dist/utils/hooks/useInfiniteScroll.js +19 -0
- package/dist/utils/hooks/useLicense.js +110 -0
- package/dist/utils/hooks/useLoadPdf.js +85 -0
- package/dist/utils/hooks/useLoadWorker.js +16 -0
- package/dist/utils/hooks/useLocalization.js +26 -0
- package/dist/utils/hooks/useMousePressed.js +20 -0
- package/dist/utils/hooks/usePageRotateContext.js +42 -0
- package/dist/utils/hooks/usePaginate.js +37 -0
- package/dist/utils/hooks/usePdfProperties.js +37 -0
- package/dist/utils/hooks/usePinch.js +147 -0
- package/dist/utils/hooks/usePresentPage.js +90 -0
- package/dist/utils/hooks/usePrint.js +185 -0
- package/dist/utils/hooks/useRequestAnimationFrame.js +17 -0
- package/dist/utils/hooks/useResizeObserver.js +22 -0
- package/dist/utils/hooks/useRotate.js +27 -0
- package/dist/utils/hooks/useScrollToPage.js +37 -0
- package/dist/utils/hooks/useSearch.js +162 -0
- package/dist/utils/hooks/useTextSelection.js +76 -0
- package/dist/utils/hooks/useThumbnail.js +59 -0
- package/dist/utils/hooks/useVirtualReactWindow.js +96 -0
- package/dist/utils/hooks/useWatermark.js +94 -0
- package/dist/utils/injectPrintCSS.js +22 -0
- package/dist/utils/link_service.js +138 -0
- package/dist/utils/renderPage.js +20 -0
- package/dist/utils/sanitizeExternalUrl.js +16 -0
- package/dist/utils/smoothScrollTo.js +6 -0
- package/dist/utils/types.js +22 -0
- package/dist/utils/withRef.js +8 -0
- package/dist/utils/zoom.js +6 -0
- package/package.json +88 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, PropsWithoutRef, Ref, ReactElement } from 'react';
|
|
2
|
+
type WithRefRender<R extends HTMLElement, P> = (props: PropsWithoutRef<P>, ref: Ref<R>) => ReactElement | null;
|
|
3
|
+
type WithRefComponent<R extends HTMLElement, P> = ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<R>>;
|
|
4
|
+
export declare const withRef: <R extends HTMLElement, P = object>(render: WithRefRender<R, P>) => WithRefComponent<R, P>;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var _ = (s, e, t) => e in s ? m(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var n = (s, e, t) => (_(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
class d {
|
|
5
|
+
constructor(e) {
|
|
6
|
+
n(this, "_items", []);
|
|
7
|
+
n(this, "_triggerEnqueue");
|
|
8
|
+
this._triggerEnqueue = e;
|
|
9
|
+
}
|
|
10
|
+
// Add item to queue with priority (lower number = higher priority)
|
|
11
|
+
enqueue(e, t, i = 0) {
|
|
12
|
+
const r = { id: e, data: t, priority: i }, u = this._items.findIndex((h) => h.priority > i);
|
|
13
|
+
u === -1 ? this._items.push(r) : this._items.splice(u, 0, r), this._triggerEnqueue(t);
|
|
14
|
+
}
|
|
15
|
+
// Remove and return highest priority item
|
|
16
|
+
dequeue() {
|
|
17
|
+
return this._items.shift();
|
|
18
|
+
}
|
|
19
|
+
// Remove item by id
|
|
20
|
+
removeQueue(e) {
|
|
21
|
+
const t = this._items.findIndex((i) => i.id === e);
|
|
22
|
+
return t !== -1 ? (this._items.splice(t, 1), !0) : !1;
|
|
23
|
+
}
|
|
24
|
+
// Change priority of item by id
|
|
25
|
+
changePagePriority(e, t) {
|
|
26
|
+
const i = this._items.find((r) => new RegExp(e).test(r.id));
|
|
27
|
+
return i ? (this.removeQueue(i.id), this.enqueue(i.id, i.data, t), !0) : !1;
|
|
28
|
+
}
|
|
29
|
+
peekAll() {
|
|
30
|
+
return this._items;
|
|
31
|
+
}
|
|
32
|
+
// Check if queue is empty
|
|
33
|
+
isEmpty() {
|
|
34
|
+
return this._items.length === 0;
|
|
35
|
+
}
|
|
36
|
+
// Get current size of queue
|
|
37
|
+
size() {
|
|
38
|
+
return this._items.length;
|
|
39
|
+
}
|
|
40
|
+
// Clear all items
|
|
41
|
+
clear() {
|
|
42
|
+
this._items = [];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
d as Queue
|
|
47
|
+
};
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { sanitizeExternalUrl as x } from "./sanitizeExternalUrl.js";
|
|
2
|
+
import { AnnotationType as l } from "./types.js";
|
|
3
|
+
import { dateFormatter as T } from "./dateFormatter.js";
|
|
4
|
+
import "../de_DE-a553b162.js";
|
|
5
|
+
const p = ["click", "dblclick", "input", "change", "mouseover"], b = /* @__PURE__ */ new Map(), h = (e, s) => `${e.loadingTask.docId}___${s.num}R${s.gen === 0 ? "" : s.gen}`;
|
|
6
|
+
function y(e, s) {
|
|
7
|
+
const t = h(e, s);
|
|
8
|
+
return b.has(t) ? b.get(t) ?? null : null;
|
|
9
|
+
}
|
|
10
|
+
const O = (e, s, t) => {
|
|
11
|
+
b.set(h(e, s), t);
|
|
12
|
+
}, g = (e, s) => {
|
|
13
|
+
switch (s[1].name) {
|
|
14
|
+
case "XYZ":
|
|
15
|
+
return {
|
|
16
|
+
bottomOffset: (t, n) => s[3] === null ? n : s[3],
|
|
17
|
+
leftOffset: (t, n) => s[2] === null ? 0 : s[2],
|
|
18
|
+
pageIndex: e,
|
|
19
|
+
scaleTo: s[4]
|
|
20
|
+
};
|
|
21
|
+
case "Fit":
|
|
22
|
+
case "FitB":
|
|
23
|
+
return {
|
|
24
|
+
bottomOffset: 0,
|
|
25
|
+
leftOffset: 0,
|
|
26
|
+
pageIndex: e,
|
|
27
|
+
scaleTo: 1
|
|
28
|
+
};
|
|
29
|
+
case "FitH":
|
|
30
|
+
case "FitBH":
|
|
31
|
+
return {
|
|
32
|
+
bottomOffset: s[2],
|
|
33
|
+
leftOffset: 0,
|
|
34
|
+
pageIndex: e,
|
|
35
|
+
scaleTo: 1
|
|
36
|
+
};
|
|
37
|
+
default:
|
|
38
|
+
return {
|
|
39
|
+
bottomOffset: 0,
|
|
40
|
+
leftOffset: 0,
|
|
41
|
+
pageIndex: e,
|
|
42
|
+
scaleTo: 1
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}, E = (e) => {
|
|
46
|
+
e && (() => {
|
|
47
|
+
const t = e == null ? void 0 : e.querySelectorAll(
|
|
48
|
+
'[data-l10n-id="pdfjs-annotation-date-time-string"]'
|
|
49
|
+
);
|
|
50
|
+
t == null || t.forEach((n) => {
|
|
51
|
+
const { date: o, time: a, dateObj: i } = JSON.parse(n.dataset.l10nArgs ?? "{}");
|
|
52
|
+
o && a ? n.textContent = `${o}, ${a}` : i && (n.textContent = T(i));
|
|
53
|
+
});
|
|
54
|
+
})();
|
|
55
|
+
};
|
|
56
|
+
async function N(e, s) {
|
|
57
|
+
let t;
|
|
58
|
+
if (typeof s == "string" ? t = await e.getDestination(s) : t = s, t && typeof t[0] == "object" && t[0] !== null) {
|
|
59
|
+
const n = t[0], o = y(e, n);
|
|
60
|
+
if (o === null) {
|
|
61
|
+
const a = await e.getPageIndex(n);
|
|
62
|
+
return O(e, n, a), await N(e, t);
|
|
63
|
+
} else
|
|
64
|
+
return g(o, t);
|
|
65
|
+
} else
|
|
66
|
+
return g(t[0], t);
|
|
67
|
+
}
|
|
68
|
+
function L(e, s) {
|
|
69
|
+
for (const t of p)
|
|
70
|
+
e.addEventListener(t, s);
|
|
71
|
+
}
|
|
72
|
+
function C(e, s) {
|
|
73
|
+
for (const t of p)
|
|
74
|
+
e.removeEventListener(t, s);
|
|
75
|
+
}
|
|
76
|
+
function R(e) {
|
|
77
|
+
const { id: s, url: t, unsafeUrl: n } = e;
|
|
78
|
+
new MutationObserver((a, i) => {
|
|
79
|
+
const c = document.querySelector(`[data-annotation-id="${s}"]`);
|
|
80
|
+
if (c) {
|
|
81
|
+
const r = c.querySelector("a"), A = x((t || n) ?? "", "");
|
|
82
|
+
r && (r == null || r.setAttribute("target", "_blank"), r == null || r.setAttribute("href", A), r == null || r.setAttribute("rel", "noopener noreferrer")), i.disconnect();
|
|
83
|
+
}
|
|
84
|
+
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
85
|
+
}
|
|
86
|
+
function F(e, s, t) {
|
|
87
|
+
const { rotation: n, scale: o } = s, a = n % 180 === 0;
|
|
88
|
+
if (e.fieldType === "Btn" && e.pushButton) {
|
|
89
|
+
const i = e.rect[2] - e.rect[0], c = e.rect[3] - e.rect[1], r = document.createElement("canvas");
|
|
90
|
+
r.setAttribute("width", ((a ? i : c) * o).toString()), r.setAttribute("height", ((a ? c : i) * o).toString()), t.set(e.id, r);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function S(e) {
|
|
94
|
+
e.querySelectorAll("[tabindex]").forEach((t) => {
|
|
95
|
+
const n = t.getAttribute("tabindex");
|
|
96
|
+
n && parseInt(n, 10) > 0 && (t.tagName === "A" || t.tagName === "BUTTON" || t.getAttribute("role") === "button" || t.getAttribute("role") === "link" || t.classList.contains("linkAnnotation") ? t.setAttribute("tabindex", "0") : t.removeAttribute("tabindex"));
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function U(e) {
|
|
100
|
+
e.querySelectorAll("a").forEach((t) => {
|
|
101
|
+
const n = t.textContent && t.textContent.trim().length > 0, o = t.getAttribute("aria-label");
|
|
102
|
+
if (!n && !o) {
|
|
103
|
+
const a = t.getAttribute("href") || "";
|
|
104
|
+
let i;
|
|
105
|
+
if (!a || a.startsWith("#") || a.startsWith("javascript:"))
|
|
106
|
+
i = "Link to page in document";
|
|
107
|
+
else
|
|
108
|
+
try {
|
|
109
|
+
i = `External link to ${new URL(a, window.location.href).hostname.replace("www.", "")}`;
|
|
110
|
+
} catch {
|
|
111
|
+
i = "External link";
|
|
112
|
+
}
|
|
113
|
+
t.setAttribute("aria-label", i);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function d(e, s, t) {
|
|
118
|
+
const n = [];
|
|
119
|
+
if (t)
|
|
120
|
+
for (const o of t)
|
|
121
|
+
o[e] === s && n.push(o);
|
|
122
|
+
return n;
|
|
123
|
+
}
|
|
124
|
+
function u(e, s) {
|
|
125
|
+
return { type: e, data: s };
|
|
126
|
+
}
|
|
127
|
+
async function I(e, s) {
|
|
128
|
+
if (e.dest)
|
|
129
|
+
if (typeof e.dest == "string") {
|
|
130
|
+
const t = await N(s, e.dest);
|
|
131
|
+
return u(l.INTERNAL_LINK, {
|
|
132
|
+
referencedPage: t.pageIndex,
|
|
133
|
+
offset: null
|
|
134
|
+
});
|
|
135
|
+
} else {
|
|
136
|
+
const t = await s.getPageIndex(e.dest[0]);
|
|
137
|
+
return u(l.INTERNAL_LINK, {
|
|
138
|
+
referencedPage: t,
|
|
139
|
+
offset: {
|
|
140
|
+
left: e.dest[2],
|
|
141
|
+
bottom: e.dest[3]
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
else if (e.url || e.unsafeUrl)
|
|
146
|
+
return u(l.LINK, {
|
|
147
|
+
url: e.url ?? e.unsafeUrl,
|
|
148
|
+
unsafeUrl: e.unsafeUrl
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function m(e) {
|
|
152
|
+
for (const s of e.getElementsByTagName("span")) {
|
|
153
|
+
let t = s.textContent;
|
|
154
|
+
const n = JSON.parse(s.dataset.l10nArgs ?? "{}");
|
|
155
|
+
if (t)
|
|
156
|
+
for (const o in n)
|
|
157
|
+
t = t.replace(`{{${o}}}`, n[o]);
|
|
158
|
+
s.textContent = t;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
function v(e) {
|
|
162
|
+
return u(l.FILE_ATTACHMENT, e.file);
|
|
163
|
+
}
|
|
164
|
+
function f(e, s) {
|
|
165
|
+
switch (e.type) {
|
|
166
|
+
case "textarea":
|
|
167
|
+
case "text":
|
|
168
|
+
return u(l.FORM_TEXT, {
|
|
169
|
+
fieldName: e.name,
|
|
170
|
+
value: e.value
|
|
171
|
+
});
|
|
172
|
+
case "select-one":
|
|
173
|
+
case "select-multiple":
|
|
174
|
+
const t = [];
|
|
175
|
+
for (const o of e.options)
|
|
176
|
+
t.push({
|
|
177
|
+
value: o.value,
|
|
178
|
+
label: o.label
|
|
179
|
+
});
|
|
180
|
+
const n = [];
|
|
181
|
+
for (const o of e.selectedOptions)
|
|
182
|
+
n.push({
|
|
183
|
+
value: o.value,
|
|
184
|
+
label: o.label
|
|
185
|
+
});
|
|
186
|
+
return u(l.FORM_SELECT, {
|
|
187
|
+
fieldName: e.name,
|
|
188
|
+
value: n,
|
|
189
|
+
options: t
|
|
190
|
+
});
|
|
191
|
+
case "checkbox":
|
|
192
|
+
return u(l.FORM_CHECKBOX, {
|
|
193
|
+
fieldName: e.name,
|
|
194
|
+
checked: e.checked
|
|
195
|
+
});
|
|
196
|
+
case "radio":
|
|
197
|
+
return u(l.FORM_RADIO, {
|
|
198
|
+
fieldName: e.name,
|
|
199
|
+
...s
|
|
200
|
+
});
|
|
201
|
+
case "button":
|
|
202
|
+
return u(l.FORM_BUTTON, {
|
|
203
|
+
fieldName: e.name,
|
|
204
|
+
...s
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
async function W(e, s, t) {
|
|
209
|
+
var o;
|
|
210
|
+
let n = e.target.parentNode;
|
|
211
|
+
if (n.tagName === "DIV" && (n = n.firstChild), typeof n.className != "object")
|
|
212
|
+
if (n.className === "linkAnnotation" && e.type === "click") {
|
|
213
|
+
const a = (o = n.dataset) == null ? void 0 : o.annotationId;
|
|
214
|
+
if (a) {
|
|
215
|
+
const i = d("id", a, t);
|
|
216
|
+
if (i.length)
|
|
217
|
+
return await I(i[0], s);
|
|
218
|
+
}
|
|
219
|
+
} else if (
|
|
220
|
+
/* annotation.className.includes('popupAnnotation') || */
|
|
221
|
+
n.className.includes("textAnnotation")
|
|
222
|
+
)
|
|
223
|
+
m(n);
|
|
224
|
+
else if (n.className.includes("fileAttachmentAnnotation")) {
|
|
225
|
+
m(n);
|
|
226
|
+
const a = n.dataset.annotationId;
|
|
227
|
+
if (a && e.type === "dblclick")
|
|
228
|
+
return v(d("id", a, t)[0]);
|
|
229
|
+
} else if (n.className.includes("textWidgetAnnotation") && e.type === "input") {
|
|
230
|
+
let a = n.getElementsByTagName("input")[0];
|
|
231
|
+
return a || (a = n.getElementsByTagName("textarea")[0]), f(a);
|
|
232
|
+
} else {
|
|
233
|
+
if (n.className.includes("choiceWidgetAnnotation") && e.type === "input")
|
|
234
|
+
return f(n.getElementsByTagName("select")[0]);
|
|
235
|
+
if (n.className.includes("buttonWidgetAnnotation checkBox") && e.type === "change")
|
|
236
|
+
return f(n.getElementsByTagName("input")[0]);
|
|
237
|
+
if (n.className.includes("buttonWidgetAnnotation radioButton") && e.type === "change") {
|
|
238
|
+
const a = n.dataset.annotationId;
|
|
239
|
+
if (a) {
|
|
240
|
+
const i = d("id", a, t)[0], c = [];
|
|
241
|
+
for (const r of d(
|
|
242
|
+
"fieldName",
|
|
243
|
+
i.fieldName,
|
|
244
|
+
t
|
|
245
|
+
))
|
|
246
|
+
r.buttonValue && c.push(r.buttonValue);
|
|
247
|
+
return f(n.getElementsByTagName("input")[0], {
|
|
248
|
+
value: i.buttonValue,
|
|
249
|
+
defaultValue: i.fieldValue,
|
|
250
|
+
options: c
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
} else if (n.className.includes("buttonWidgetAnnotation pushButton") && e.type === "click") {
|
|
254
|
+
const a = n.dataset.annotationId;
|
|
255
|
+
if (a) {
|
|
256
|
+
const i = d("id", a, t)[0], { action: c } = i;
|
|
257
|
+
return c && ["Print", "SaveAs"].includes(c) ? { type: l.BUTTON, data: i } : i.resetForm ? f(
|
|
258
|
+
{ name: i.fieldName, type: "button" },
|
|
259
|
+
{ actions: i.actions, reset: !0 }
|
|
260
|
+
) : f(
|
|
261
|
+
{ name: i.fieldName, type: "button" },
|
|
262
|
+
{ actions: i.actions, reset: !1 }
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
export {
|
|
269
|
+
W as annotationEventsHandler,
|
|
270
|
+
L as bindLayerEvents,
|
|
271
|
+
U as enhanceLinkAccessibility,
|
|
272
|
+
S as fixTabIndexAccessibility,
|
|
273
|
+
R as handleAnnotationLink,
|
|
274
|
+
F as handleAnnotationWidget,
|
|
275
|
+
E as insertDateText,
|
|
276
|
+
C as unbindLayerEvents
|
|
277
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var s = Object.defineProperty;
|
|
2
|
+
var i = (e, n, c) => n in e ? s(e, n, { enumerable: !0, configurable: !0, writable: !0, value: c }) : e[n] = c;
|
|
3
|
+
var o = (e, n, c) => (i(e, typeof n != "symbol" ? n + "" : n, c), c);
|
|
4
|
+
const t = class t {
|
|
5
|
+
constructor() {
|
|
6
|
+
o(this, "isProduction");
|
|
7
|
+
this.isProduction = !0;
|
|
8
|
+
}
|
|
9
|
+
static getInstance() {
|
|
10
|
+
return t.instance || (t.instance = new t()), t.instance;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Debug level logging - stripped in production
|
|
14
|
+
*/
|
|
15
|
+
debug(...n) {
|
|
16
|
+
this.isProduction || console.debug("[React PDF Debug]:", ...n);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Info level logging - kept in production
|
|
20
|
+
*/
|
|
21
|
+
info(...n) {
|
|
22
|
+
console.info("[React PDF Info]:", ...n);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Warning level logging - kept in production
|
|
26
|
+
*/
|
|
27
|
+
warn(...n) {
|
|
28
|
+
console.warn("[React PDF Warning]:", ...n);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Error level logging - kept in production
|
|
32
|
+
*/
|
|
33
|
+
error(...n) {
|
|
34
|
+
console.error("[React PDF Error]:", ...n);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
o(t, "instance");
|
|
38
|
+
let r = t;
|
|
39
|
+
const u = r.getInstance();
|
|
40
|
+
export {
|
|
41
|
+
u as appConsole
|
|
42
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function u(t) {
|
|
2
|
+
if (Math.floor(t) === t)
|
|
3
|
+
return [t, 1];
|
|
4
|
+
const e = 1 / t, s = 8;
|
|
5
|
+
if (e > s)
|
|
6
|
+
return [1, s];
|
|
7
|
+
if (Math.floor(e) === e)
|
|
8
|
+
return [1, e];
|
|
9
|
+
const r = t > 1 ? e : t;
|
|
10
|
+
let i = 0, n = 1, o = 1, l = 1;
|
|
11
|
+
for (; ; ) {
|
|
12
|
+
const c = i + o, f = n + l;
|
|
13
|
+
if (f > s)
|
|
14
|
+
break;
|
|
15
|
+
r <= c / f ? (o = c, l = f) : (i = c, n = f);
|
|
16
|
+
}
|
|
17
|
+
let a;
|
|
18
|
+
return r - i / n < o / l - r ? a = r === t ? [i, n] : [n, i] : a = r === t ? [o, l] : [l, o], a;
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
u as approximateFraction
|
|
22
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const d = (o, e, s, t = !1) => t ? o === 0 ? e === 0 ? 1 : -1 : 1 + (o - 1) * s + e + 1 : o * s + e + 1, g = (o, e, s = !1) => {
|
|
2
|
+
if (s) {
|
|
3
|
+
if (o === 1)
|
|
4
|
+
return { rowIndex: 0, columnIndex: 0 };
|
|
5
|
+
const n = o - 1 - 1, f = Math.floor(n / e) + 1, i = n % e;
|
|
6
|
+
return { rowIndex: f, columnIndex: i };
|
|
7
|
+
}
|
|
8
|
+
const t = o - 1, r = Math.floor(t / e), c = (t - r * e) % e;
|
|
9
|
+
return { rowIndex: r, columnIndex: c };
|
|
10
|
+
}, x = (o, e, s = !1) => {
|
|
11
|
+
const t = [], r = [];
|
|
12
|
+
return o.heights.forEach((c, a) => {
|
|
13
|
+
const n = g(a + 1, e, s), f = o.widths[a];
|
|
14
|
+
t[n.rowIndex] = Math.max(t[n.rowIndex] || 0, c), r[n.columnIndex] = Math.max(r[n.columnIndex] || 0, f);
|
|
15
|
+
}), { rowsHeight: t, columnsWidth: r };
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
x as getGridDimension,
|
|
19
|
+
d as getPageFromPosition,
|
|
20
|
+
g as getPositionFromPage
|
|
21
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
function i(n) {
|
|
2
|
+
return n < 11904;
|
|
3
|
+
}
|
|
4
|
+
function t(n) {
|
|
5
|
+
return (n & 65408) === 0;
|
|
6
|
+
}
|
|
7
|
+
function u(n) {
|
|
8
|
+
return n >= /* a = */
|
|
9
|
+
97 && n <= /* z = */
|
|
10
|
+
122 || n >= /* A = */
|
|
11
|
+
65 && n <= /* Z = */
|
|
12
|
+
90;
|
|
13
|
+
}
|
|
14
|
+
function r(n) {
|
|
15
|
+
return n >= /* 0 = */
|
|
16
|
+
48 && n <= /* 9 = */
|
|
17
|
+
57;
|
|
18
|
+
}
|
|
19
|
+
function f(n) {
|
|
20
|
+
return n === /* SPACE = */
|
|
21
|
+
32 || n === /* TAB = */
|
|
22
|
+
9 || n === /* CR = */
|
|
23
|
+
13 || n === /* LF = */
|
|
24
|
+
10;
|
|
25
|
+
}
|
|
26
|
+
function s(n) {
|
|
27
|
+
return n >= 13312 && n <= 40959 || n >= 63744 && n <= 64255;
|
|
28
|
+
}
|
|
29
|
+
function e(n) {
|
|
30
|
+
return n >= 12448 && n <= 12543;
|
|
31
|
+
}
|
|
32
|
+
function l(n) {
|
|
33
|
+
return n >= 12352 && n <= 12447;
|
|
34
|
+
}
|
|
35
|
+
function p(n) {
|
|
36
|
+
return n >= 65376 && n <= 65439;
|
|
37
|
+
}
|
|
38
|
+
function A(n) {
|
|
39
|
+
return (n & 65408) === 3584;
|
|
40
|
+
}
|
|
41
|
+
function g(n) {
|
|
42
|
+
return i(n) ? t(n) ? f(n) ? 0 : u(n) || r(n) || n === /* UNDERSCORE = */
|
|
43
|
+
95 ? 1 : 2 : A(n) ? 7 : n === /* NBSP = */
|
|
44
|
+
160 ? 0 : 1 : s(n) ? 3 : e(n) ? 4 : l(n) ? 5 : p(n) ? 6 : 1;
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
g as getCharacterType
|
|
48
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const p = new RegExp(
|
|
2
|
+
"^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"
|
|
3
|
+
), t = (s, e, o, c) => {
|
|
4
|
+
const n = parseInt(s, 10);
|
|
5
|
+
return n >= e && n <= o ? n : c;
|
|
6
|
+
}, f = (s) => {
|
|
7
|
+
const e = p.exec(s);
|
|
8
|
+
if (!e)
|
|
9
|
+
return null;
|
|
10
|
+
const o = parseInt(e[1], 10), c = t(e[2], 1, 12, 1) - 1, n = t(e[3], 1, 31, 1);
|
|
11
|
+
let r = t(e[4], 0, 23, 0), a = t(e[5], 0, 59, 0);
|
|
12
|
+
const i = t(e[6], 0, 59, 0), l = e[7] || "Z", d = t(e[8], 0, 23, 0), u = t(e[9], 0, 59, 0);
|
|
13
|
+
switch (l) {
|
|
14
|
+
case "-":
|
|
15
|
+
r += d, a += u;
|
|
16
|
+
break;
|
|
17
|
+
case "+":
|
|
18
|
+
r -= d, a -= u;
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
return new Date(Date.UTC(o, c, n, r, a, i));
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
f as convertPDFDate
|
|
25
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const o = ({ width: a, height: c, top: t, left: r, bottom: e, right: l }) => ({
|
|
2
|
+
left: `calc(${r} * var(--scale-factor))`,
|
|
3
|
+
top: `calc(${t} * var(--scale-factor))`,
|
|
4
|
+
width: `calc(${a} * var(--scale-factor))`,
|
|
5
|
+
height: `calc(${c} * var(--scale-factor))`,
|
|
6
|
+
bottom: `calc(${e} * var(--scale-factor))`,
|
|
7
|
+
right: `calc(${l} * var(--scale-factor))`
|
|
8
|
+
});
|
|
9
|
+
export {
|
|
10
|
+
o as elementPagePosition
|
|
11
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
function i(t, e) {
|
|
2
|
+
if (t == 0)
|
|
3
|
+
return "0 Bytes";
|
|
4
|
+
var o = 1e3, r = e || 2, a = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], B = Math.floor(Math.log(t) / Math.log(o));
|
|
5
|
+
return parseFloat((t / Math.pow(o, B)).toFixed(r)) + " " + a[B];
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
i as formatFileSize
|
|
9
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
function g(e, o) {
|
|
2
|
+
!e || typeof e != "object" || Object.entries(e).forEach(([d, i]) => {
|
|
3
|
+
if (i == null)
|
|
4
|
+
return;
|
|
5
|
+
const s = d.replace(/([A-Z])/g, "-$1").toLowerCase(), n = [
|
|
6
|
+
"width",
|
|
7
|
+
"height",
|
|
8
|
+
"top",
|
|
9
|
+
"right",
|
|
10
|
+
"bottom",
|
|
11
|
+
"left",
|
|
12
|
+
"margin",
|
|
13
|
+
"margin-top",
|
|
14
|
+
"margin-right",
|
|
15
|
+
"margin-bottom",
|
|
16
|
+
"margin-left",
|
|
17
|
+
"padding",
|
|
18
|
+
"padding-top",
|
|
19
|
+
"padding-right",
|
|
20
|
+
"padding-bottom",
|
|
21
|
+
"padding-left",
|
|
22
|
+
"border-width",
|
|
23
|
+
"border-top-width",
|
|
24
|
+
"border-right-width",
|
|
25
|
+
"border-bottom-width",
|
|
26
|
+
"border-left-width",
|
|
27
|
+
"font-size",
|
|
28
|
+
"line-height",
|
|
29
|
+
"letter-spacing",
|
|
30
|
+
"word-spacing",
|
|
31
|
+
"min-width",
|
|
32
|
+
"min-height",
|
|
33
|
+
"max-width",
|
|
34
|
+
"max-height",
|
|
35
|
+
"flex-basis",
|
|
36
|
+
"grid-gap",
|
|
37
|
+
"grid-row-gap",
|
|
38
|
+
"grid-column-gap"
|
|
39
|
+
];
|
|
40
|
+
let t;
|
|
41
|
+
typeof i == "number" && i !== 0 ? t = n.includes(s) ? `${i}px` : String(i) : t = String(i), o.style.setProperty(s, t);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
const f = (e, o, d, i, s) => {
|
|
45
|
+
let n = "center";
|
|
46
|
+
switch (i) {
|
|
47
|
+
case 90:
|
|
48
|
+
n = `${e.width / 2}px ${e.width / 2}px`;
|
|
49
|
+
break;
|
|
50
|
+
case -90:
|
|
51
|
+
case 270:
|
|
52
|
+
n = `${e.height / 2}px ${e.height / 2}px`;
|
|
53
|
+
break;
|
|
54
|
+
default:
|
|
55
|
+
n = "center";
|
|
56
|
+
}
|
|
57
|
+
const t = document.createElement("div");
|
|
58
|
+
t.id = "parent-element", t.style.width = `${e.width}px`, t.style.height = `${e.height}px`, t.style.setProperty("--scale-factor", s.toString()), t.style.setProperty("--rotation", i.toString()), t.style.setProperty("--transform-origin", n), t.style.left = "-99999px", t.style.visibility = "hidden", t.style.position = "absolute";
|
|
59
|
+
const l = document.createElement("div");
|
|
60
|
+
l.style.position = "relative", l.style.width = "100%", l.style.height = "100%", t.appendChild(l);
|
|
61
|
+
let r;
|
|
62
|
+
if (d instanceof HTMLElement)
|
|
63
|
+
r = d.cloneNode(!0), l.appendChild(r);
|
|
64
|
+
else {
|
|
65
|
+
const p = d.props;
|
|
66
|
+
r = document.createElement("div"), p.style && g(p.style, r), p.className && (r.className = p.className), l.appendChild(r);
|
|
67
|
+
}
|
|
68
|
+
o.appendChild(t);
|
|
69
|
+
const c = t.getBoundingClientRect(), h = r.getBoundingClientRect();
|
|
70
|
+
o.removeChild(t);
|
|
71
|
+
const a = {
|
|
72
|
+
top: o.clientHeight / 2,
|
|
73
|
+
left: o.clientWidth / 2
|
|
74
|
+
};
|
|
75
|
+
return {
|
|
76
|
+
left: h.left - c.left - a.left,
|
|
77
|
+
top: h.top - c.top - a.top,
|
|
78
|
+
width: h.width,
|
|
79
|
+
height: h.height
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
export {
|
|
83
|
+
f as getElementPagePosition
|
|
84
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const a = (i, h, l, o, n) => {
|
|
2
|
+
const c = l.height * o, s = l.width * o, y = l.bottom * o, m = l.left * o, d = {
|
|
3
|
+
width: n % 180 === 90 ? i.height : i.width,
|
|
4
|
+
height: n % 180 === 90 ? i.width : i.height
|
|
5
|
+
}, r = {
|
|
6
|
+
width: n % 180 === 90 ? c : s,
|
|
7
|
+
height: n % 180 === 90 ? s : c
|
|
8
|
+
}, t = document.createElement("div");
|
|
9
|
+
t.style.width = `${d.width}px`, t.style.height = `${d.height}px`, t.style.position = "absolute", t.style.transform = `rotate(${n}deg)`, t.style.transformOrigin = "center center", t.style.visibility = "hidden", t.style.left = "-99999px";
|
|
10
|
+
const e = document.createElement("div");
|
|
11
|
+
e.style.position = "absolute", e.style.width = `${s}px`, e.style.height = `${c}px`, e.style.position = "absolute", e.style.bottom = `${y}px`, e.style.left = `${m}px`, t.appendChild(e), h.appendChild(t);
|
|
12
|
+
const g = t.getBoundingClientRect(), p = e.getBoundingClientRect();
|
|
13
|
+
h.removeChild(t);
|
|
14
|
+
const u = {
|
|
15
|
+
top: h.clientHeight / 2,
|
|
16
|
+
left: h.clientWidth / 2
|
|
17
|
+
};
|
|
18
|
+
return {
|
|
19
|
+
leftInPage: p.left - g.left - u.left + r.width / 2,
|
|
20
|
+
topInPage: p.top - g.top - u.top + r.height / 2
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
a as getWordPositionInPage
|
|
25
|
+
};
|