@ntlab/ntjs-assets 2.0.55 → 2.0.56
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/assets/js/pdfjs/build/pdf.mjs +12449 -12312
- package/assets/js/pdfjs/build/pdf.mjs.map +1 -1
- package/assets/js/pdfjs/build/pdf.sandbox.mjs +3 -3
- package/assets/js/pdfjs/build/pdf.sandbox.mjs.map +1 -1
- package/assets/js/pdfjs/build/pdf.worker.mjs +447 -209
- package/assets/js/pdfjs/build/pdf.worker.mjs.map +1 -1
- package/assets/js/pdfjs/web/locale/br/viewer.ftl +28 -0
- package/assets/js/pdfjs/web/locale/en-US/viewer.ftl +13 -3
- package/assets/js/pdfjs/web/locale/es-ES/viewer.ftl +49 -0
- package/assets/js/pdfjs/web/locale/es-MX/viewer.ftl +74 -0
- package/assets/js/pdfjs/web/locale/eu/viewer.ftl +64 -0
- package/assets/js/pdfjs/web/locale/tg/viewer.ftl +3 -0
- package/assets/js/pdfjs/web/locale/th/viewer.ftl +14 -0
- package/assets/js/pdfjs/web/viewer.css +3 -2
- package/assets/js/pdfjs/web/viewer.mjs +125 -187
- package/assets/js/pdfjs/web/viewer.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1282,7 +1282,6 @@ const {
|
|
|
1282
1282
|
AnnotationLayer,
|
|
1283
1283
|
AnnotationMode,
|
|
1284
1284
|
build,
|
|
1285
|
-
CMapCompressionType,
|
|
1286
1285
|
ColorPicker,
|
|
1287
1286
|
createValidAbsoluteUrl,
|
|
1288
1287
|
DOMSVGFactory,
|
|
@@ -2869,7 +2868,7 @@ class DOMLocalization extends Localization {
|
|
|
2869
2868
|
;// ./web/l10n.js
|
|
2870
2869
|
class L10n {
|
|
2871
2870
|
#dir;
|
|
2872
|
-
#elements
|
|
2871
|
+
#elements;
|
|
2873
2872
|
#lang;
|
|
2874
2873
|
#l10n;
|
|
2875
2874
|
constructor({
|
|
@@ -2904,7 +2903,7 @@ class L10n {
|
|
|
2904
2903
|
return messages[0]?.value || fallback;
|
|
2905
2904
|
}
|
|
2906
2905
|
async translate(element) {
|
|
2907
|
-
this.#elements.add(element);
|
|
2906
|
+
(this.#elements ||= new Set()).add(element);
|
|
2908
2907
|
try {
|
|
2909
2908
|
this.#l10n.connectRoot(element);
|
|
2910
2909
|
await this.#l10n.translateRoots();
|
|
@@ -2918,10 +2917,13 @@ class L10n {
|
|
|
2918
2917
|
}
|
|
2919
2918
|
}
|
|
2920
2919
|
async destroy() {
|
|
2921
|
-
|
|
2922
|
-
this.#
|
|
2920
|
+
if (this.#elements) {
|
|
2921
|
+
for (const element of this.#elements) {
|
|
2922
|
+
this.#l10n.disconnectRoot(element);
|
|
2923
|
+
}
|
|
2924
|
+
this.#elements.clear();
|
|
2925
|
+
this.#elements = null;
|
|
2923
2926
|
}
|
|
2924
|
-
this.#elements.clear();
|
|
2925
2927
|
this.#l10n.pauseObserving();
|
|
2926
2928
|
}
|
|
2927
2929
|
pause() {
|
|
@@ -3030,7 +3032,7 @@ class genericl10n_GenericL10n extends L10n {
|
|
|
3030
3032
|
yield this.#createBundleFallback(lang);
|
|
3031
3033
|
}
|
|
3032
3034
|
static async #createBundleFallback(lang) {
|
|
3033
|
-
const text = "pdfjs-previous-button =\n .title = Previous Page\npdfjs-previous-button-label = Previous\npdfjs-next-button =\n .title = Next Page\npdfjs-next-button-label = Next\npdfjs-page-input =\n .title = Page\npdfjs-of-pages = of { $pagesCount }\npdfjs-page-of-pages = ({ $pageNumber } of { $pagesCount })\npdfjs-zoom-out-button =\n .title = Zoom Out\npdfjs-zoom-out-button-label = Zoom Out\npdfjs-zoom-in-button =\n .title = Zoom In\npdfjs-zoom-in-button-label = Zoom In\npdfjs-zoom-select =\n .title = Zoom\npdfjs-presentation-mode-button =\n .title = Switch to Presentation Mode\npdfjs-presentation-mode-button-label = Presentation Mode\npdfjs-open-file-button =\n .title = Open File\npdfjs-open-file-button-label = Open\npdfjs-print-button =\n .title = Print\npdfjs-print-button-label = Print\npdfjs-save-button =\n .title = Save\npdfjs-save-button-label = Save\npdfjs-download-button =\n .title = Download\npdfjs-download-button-label = Download\npdfjs-bookmark-button =\n .title = Current Page (View URL from Current Page)\npdfjs-bookmark-button-label = Current Page\npdfjs-tools-button =\n .title = Tools\npdfjs-tools-button-label = Tools\npdfjs-first-page-button =\n .title = Go to First Page\npdfjs-first-page-button-label = Go to First Page\npdfjs-last-page-button =\n .title = Go to Last Page\npdfjs-last-page-button-label = Go to Last Page\npdfjs-page-rotate-cw-button =\n .title = Rotate Clockwise\npdfjs-page-rotate-cw-button-label = Rotate Clockwise\npdfjs-page-rotate-ccw-button =\n .title = Rotate Counterclockwise\npdfjs-page-rotate-ccw-button-label = Rotate Counterclockwise\npdfjs-cursor-text-select-tool-button =\n .title = Enable Text Selection Tool\npdfjs-cursor-text-select-tool-button-label = Text Selection Tool\npdfjs-cursor-hand-tool-button =\n .title = Enable Hand Tool\npdfjs-cursor-hand-tool-button-label = Hand Tool\npdfjs-scroll-page-button =\n .title = Use Page Scrolling\npdfjs-scroll-page-button-label = Page Scrolling\npdfjs-scroll-vertical-button =\n .title = Use Vertical Scrolling\npdfjs-scroll-vertical-button-label = Vertical Scrolling\npdfjs-scroll-horizontal-button =\n .title = Use Horizontal Scrolling\npdfjs-scroll-horizontal-button-label = Horizontal Scrolling\npdfjs-scroll-wrapped-button =\n .title = Use Wrapped Scrolling\npdfjs-scroll-wrapped-button-label = Wrapped Scrolling\npdfjs-spread-none-button =\n .title = Do not join page spreads\npdfjs-spread-none-button-label = No Spreads\npdfjs-spread-odd-button =\n .title = Join page spreads starting with odd-numbered pages\npdfjs-spread-odd-button-label = Odd Spreads\npdfjs-spread-even-button =\n .title = Join page spreads starting with even-numbered pages\npdfjs-spread-even-button-label = Even Spreads\npdfjs-document-properties-button =\n .title = Document Properties\u2026\npdfjs-document-properties-button-label = Document Properties\u2026\npdfjs-document-properties-file-name = File name:\npdfjs-document-properties-file-size = File size:\npdfjs-document-properties-size-kb = { NUMBER($kb, maximumSignificantDigits: 3) } KB ({ $b } bytes)\npdfjs-document-properties-size-mb = { NUMBER($mb, maximumSignificantDigits: 3) } MB ({ $b } bytes)\npdfjs-document-properties-title = Title:\npdfjs-document-properties-author = Author:\npdfjs-document-properties-subject = Subject:\npdfjs-document-properties-keywords = Keywords:\npdfjs-document-properties-creation-date = Creation Date:\npdfjs-document-properties-modification-date = Modification Date:\npdfjs-document-properties-date-time-string = { DATETIME($dateObj, dateStyle: \"short\", timeStyle: \"medium\") }\npdfjs-document-properties-creator = Creator:\npdfjs-document-properties-producer = PDF Producer:\npdfjs-document-properties-version = PDF Version:\npdfjs-document-properties-page-count = Page Count:\npdfjs-document-properties-page-size = Page Size:\npdfjs-document-properties-page-size-unit-inches = in\npdfjs-document-properties-page-size-unit-millimeters = mm\npdfjs-document-properties-page-size-orientation-portrait = portrait\npdfjs-document-properties-page-size-orientation-landscape = landscape\npdfjs-document-properties-page-size-name-a-three = A3\npdfjs-document-properties-page-size-name-a-four = A4\npdfjs-document-properties-page-size-name-letter = Letter\npdfjs-document-properties-page-size-name-legal = Legal\npdfjs-document-properties-page-size-dimension-string = { $width } \xD7 { $height } { $unit } ({ $orientation })\npdfjs-document-properties-page-size-dimension-name-string = { $width } \xD7 { $height } { $unit } ({ $name }, { $orientation })\npdfjs-document-properties-linearized = Fast Web View:\npdfjs-document-properties-linearized-yes = Yes\npdfjs-document-properties-linearized-no = No\npdfjs-document-properties-close-button = Close\npdfjs-print-progress-message = Preparing document for printing\u2026\npdfjs-print-progress-percent = { $progress }%\npdfjs-print-progress-close-button = Cancel\npdfjs-printing-not-supported = Warning: Printing is not fully supported by this browser.\npdfjs-printing-not-ready = Warning: The PDF is not fully loaded for printing.\npdfjs-toggle-sidebar-button =\n .title = Toggle Sidebar\npdfjs-toggle-sidebar-notification-button =\n .title = Toggle Sidebar (document contains outline/attachments/layers)\npdfjs-toggle-sidebar-button-label = Toggle Sidebar\npdfjs-document-outline-button =\n .title = Show Document Outline (double-click to expand/collapse all items)\npdfjs-document-outline-button-label = Document Outline\npdfjs-attachments-button =\n .title = Show Attachments\npdfjs-attachments-button-label = Attachments\npdfjs-layers-button =\n .title = Show Layers (double-click to reset all layers to the default state)\npdfjs-layers-button-label = Layers\npdfjs-thumbs-button =\n .title = Show Thumbnails\npdfjs-thumbs-button-label = Thumbnails\npdfjs-current-outline-item-button =\n .title = Find Current Outline Item\npdfjs-current-outline-item-button-label = Current Outline Item\npdfjs-findbar-button =\n .title = Find in Document\npdfjs-findbar-button-label = Find\npdfjs-additional-layers = Additional Layers\npdfjs-thumb-page-title =\n .title = Page { $page }\npdfjs-thumb-page-canvas =\n .aria-label = Thumbnail of Page { $page }\npdfjs-find-input =\n .title = Find\n .placeholder = Find in document\u2026\npdfjs-find-previous-button =\n .title = Find the previous occurrence of the phrase\npdfjs-find-previous-button-label = Previous\npdfjs-find-next-button =\n .title = Find the next occurrence of the phrase\npdfjs-find-next-button-label = Next\npdfjs-find-highlight-checkbox = Highlight All\npdfjs-find-match-case-checkbox-label = Match Case\npdfjs-find-match-diacritics-checkbox-label = Match Diacritics\npdfjs-find-entire-word-checkbox-label = Whole Words\npdfjs-find-reached-top = Reached top of document, continued from bottom\npdfjs-find-reached-bottom = Reached end of document, continued from top\npdfjs-find-match-count =\n { $total ->\n [one] { $current } of { $total } match\n *[other] { $current } of { $total } matches\n }\npdfjs-find-match-count-limit =\n { $limit ->\n [one] More than { $limit } match\n *[other] More than { $limit } matches\n }\npdfjs-find-not-found = Phrase not found\npdfjs-page-scale-width = Page Width\npdfjs-page-scale-fit = Page Fit\npdfjs-page-scale-auto = Automatic Zoom\npdfjs-page-scale-actual = Actual Size\npdfjs-page-scale-percent = { $scale }%\npdfjs-page-landmark =\n .aria-label = Page { $page }\npdfjs-loading-error = An error occurred while loading the PDF.\npdfjs-invalid-file-error = Invalid or corrupted PDF file.\npdfjs-missing-file-error = Missing PDF file.\npdfjs-unexpected-response-error = Unexpected server response.\npdfjs-rendering-error = An error occurred while rendering the page.\npdfjs-annotation-date-time-string = { DATETIME($dateObj, dateStyle: \"short\", timeStyle: \"medium\") }\npdfjs-text-annotation-type =\n .alt = [{ $type } Annotation]\npdfjs-password-label = Enter the password to open this PDF file.\npdfjs-password-invalid = Invalid password. Please try again.\npdfjs-password-ok-button = OK\npdfjs-password-cancel-button = Cancel\npdfjs-web-fonts-disabled = Web fonts are disabled: unable to use embedded PDF fonts.\npdfjs-editor-free-text-button =\n .title = Text\npdfjs-editor-free-text-button-label = Text\npdfjs-editor-ink-button =\n .title = Draw\npdfjs-editor-ink-button-label = Draw\npdfjs-editor-stamp-button =\n .title = Add or edit images\npdfjs-editor-stamp-button-label = Add or edit images\npdfjs-editor-highlight-button =\n .title = Highlight\npdfjs-editor-highlight-button-label = Highlight\npdfjs-highlight-floating-button1 =\n .title = Highlight\n .aria-label = Highlight\npdfjs-highlight-floating-button-label = Highlight\npdfjs-editor-remove-ink-button =\n .title = Remove drawing\npdfjs-editor-remove-freetext-button =\n .title = Remove text\npdfjs-editor-remove-stamp-button =\n .title = Remove image\npdfjs-editor-remove-highlight-button =\n .title = Remove highlight\npdfjs-editor-free-text-color-input = Color\npdfjs-editor-free-text-size-input = Size\npdfjs-editor-ink-color-input = Color\npdfjs-editor-ink-thickness-input = Thickness\npdfjs-editor-ink-opacity-input = Opacity\npdfjs-editor-stamp-add-image-button =\n .title = Add image\npdfjs-editor-stamp-add-image-button-label = Add image\npdfjs-editor-free-highlight-thickness-input = Thickness\npdfjs-editor-free-highlight-thickness-title =\n .title = Change thickness when highlighting items other than text\npdfjs-free-text =\n .aria-label = Text Editor\npdfjs-free-text-default-content = Start typing\u2026\npdfjs-ink =\n .aria-label = Draw Editor\npdfjs-ink-canvas =\n .aria-label = User-created image\npdfjs-editor-alt-text-button-label = Alt text\npdfjs-editor-alt-text-edit-button-label = Edit alt text\npdfjs-editor-alt-text-dialog-label = Choose an option\npdfjs-editor-alt-text-dialog-description = Alt text (alternative text) helps when people can\u2019t see the image or when it doesn\u2019t load.\npdfjs-editor-alt-text-add-description-label = Add a description\npdfjs-editor-alt-text-add-description-description = Aim for 1-2 sentences that describe the subject, setting, or actions.\npdfjs-editor-alt-text-mark-decorative-label = Mark as decorative\npdfjs-editor-alt-text-mark-decorative-description = This is used for ornamental images, like borders or watermarks.\npdfjs-editor-alt-text-cancel-button = Cancel\npdfjs-editor-alt-text-save-button = Save\npdfjs-editor-alt-text-decorative-tooltip = Marked as decorative\npdfjs-editor-alt-text-textarea =\n .placeholder = For example, \u201CA young man sits down at a table to eat a meal\u201D\npdfjs-editor-resizer-top-left =\n .aria-label = Top left corner \u2014 resize\npdfjs-editor-resizer-top-middle =\n .aria-label = Top middle \u2014 resize\npdfjs-editor-resizer-top-right =\n .aria-label = Top right corner \u2014 resize\npdfjs-editor-resizer-middle-right =\n .aria-label = Middle right \u2014 resize\npdfjs-editor-resizer-bottom-right =\n .aria-label = Bottom right corner \u2014 resize\npdfjs-editor-resizer-bottom-middle =\n .aria-label = Bottom middle \u2014 resize\npdfjs-editor-resizer-bottom-left =\n .aria-label = Bottom left corner \u2014 resize\npdfjs-editor-resizer-middle-left =\n .aria-label = Middle left \u2014 resize\npdfjs-editor-highlight-colorpicker-label = Highlight color\npdfjs-editor-colorpicker-button =\n .title = Change color\npdfjs-editor-colorpicker-dropdown =\n .aria-label = Color choices\npdfjs-editor-colorpicker-yellow =\n .title = Yellow\npdfjs-editor-colorpicker-green =\n .title = Green\npdfjs-editor-colorpicker-blue =\n .title = Blue\npdfjs-editor-colorpicker-pink =\n .title = Pink\npdfjs-editor-colorpicker-red =\n .title = Red\npdfjs-editor-highlight-show-all-button-label = Show all\npdfjs-editor-highlight-show-all-button =\n .title = Show all\npdfjs-editor-new-alt-text-dialog-edit-label = Edit alt text (image description)\npdfjs-editor-new-alt-text-dialog-add-label = Add alt text (image description)\npdfjs-editor-new-alt-text-textarea =\n .placeholder = Write your description here\u2026\npdfjs-editor-new-alt-text-description = Short description for people who can\u2019t see the image or when the image doesn\u2019t load.\npdfjs-editor-new-alt-text-disclaimer1 = This alt text was created automatically and may be inaccurate.\npdfjs-editor-new-alt-text-disclaimer-learn-more-url = Learn more\npdfjs-editor-new-alt-text-create-automatically-button-label = Create alt text automatically\npdfjs-editor-new-alt-text-not-now-button = Not now\npdfjs-editor-new-alt-text-error-title = Couldn\u2019t create alt text automatically\npdfjs-editor-new-alt-text-error-description = Please write your own alt text or try again later.\npdfjs-editor-new-alt-text-error-close-button = Close\npdfjs-editor-new-alt-text-ai-model-downloading-progress = Downloading alt text AI model ({ $downloadedSize } of { $totalSize } MB)\n .aria-valuetext = Downloading alt text AI model ({ $downloadedSize } of { $totalSize } MB)\npdfjs-editor-new-alt-text-added-button-label = Alt text added\npdfjs-editor-new-alt-text-missing-button-label = Missing alt text\npdfjs-editor-new-alt-text-to-review-button-label = Review alt text\npdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer = Created automatically: { $generatedAltText }\npdfjs-image-alt-text-settings-button =\n .title = Image alt text settings\npdfjs-image-alt-text-settings-button-label = Image alt text settings\npdfjs-editor-alt-text-settings-dialog-label = Image alt text settings\npdfjs-editor-alt-text-settings-automatic-title = Automatic alt text\npdfjs-editor-alt-text-settings-create-model-button-label = Create alt text automatically\npdfjs-editor-alt-text-settings-create-model-description = Suggests descriptions to help people who can\u2019t see the image or when the image doesn\u2019t load.\npdfjs-editor-alt-text-settings-download-model-label = Alt text AI model ({ $totalSize } MB)\npdfjs-editor-alt-text-settings-ai-model-description = Runs locally on your device so your data stays private. Required for automatic alt text.\npdfjs-editor-alt-text-settings-delete-model-button = Delete\npdfjs-editor-alt-text-settings-download-model-button = Download\npdfjs-editor-alt-text-settings-downloading-model-button = Downloading\u2026\npdfjs-editor-alt-text-settings-editor-title = Alt text editor\npdfjs-editor-alt-text-settings-show-dialog-button-label = Show alt text editor right away when adding an image\npdfjs-editor-alt-text-settings-show-dialog-description = Helps you make sure all your images have alt text.\npdfjs-editor-alt-text-settings-close-button = Close";
|
|
3035
|
+
const text = "pdfjs-previous-button =\n .title = Previous Page\npdfjs-previous-button-label = Previous\npdfjs-next-button =\n .title = Next Page\npdfjs-next-button-label = Next\npdfjs-page-input =\n .title = Page\npdfjs-of-pages = of { $pagesCount }\npdfjs-page-of-pages = ({ $pageNumber } of { $pagesCount })\npdfjs-zoom-out-button =\n .title = Zoom Out\npdfjs-zoom-out-button-label = Zoom Out\npdfjs-zoom-in-button =\n .title = Zoom In\npdfjs-zoom-in-button-label = Zoom In\npdfjs-zoom-select =\n .title = Zoom\npdfjs-presentation-mode-button =\n .title = Switch to Presentation Mode\npdfjs-presentation-mode-button-label = Presentation Mode\npdfjs-open-file-button =\n .title = Open File\npdfjs-open-file-button-label = Open\npdfjs-print-button =\n .title = Print\npdfjs-print-button-label = Print\npdfjs-save-button =\n .title = Save\npdfjs-save-button-label = Save\npdfjs-download-button =\n .title = Download\npdfjs-download-button-label = Download\npdfjs-bookmark-button =\n .title = Current Page (View URL from Current Page)\npdfjs-bookmark-button-label = Current Page\npdfjs-tools-button =\n .title = Tools\npdfjs-tools-button-label = Tools\npdfjs-first-page-button =\n .title = Go to First Page\npdfjs-first-page-button-label = Go to First Page\npdfjs-last-page-button =\n .title = Go to Last Page\npdfjs-last-page-button-label = Go to Last Page\npdfjs-page-rotate-cw-button =\n .title = Rotate Clockwise\npdfjs-page-rotate-cw-button-label = Rotate Clockwise\npdfjs-page-rotate-ccw-button =\n .title = Rotate Counterclockwise\npdfjs-page-rotate-ccw-button-label = Rotate Counterclockwise\npdfjs-cursor-text-select-tool-button =\n .title = Enable Text Selection Tool\npdfjs-cursor-text-select-tool-button-label = Text Selection Tool\npdfjs-cursor-hand-tool-button =\n .title = Enable Hand Tool\npdfjs-cursor-hand-tool-button-label = Hand Tool\npdfjs-scroll-page-button =\n .title = Use Page Scrolling\npdfjs-scroll-page-button-label = Page Scrolling\npdfjs-scroll-vertical-button =\n .title = Use Vertical Scrolling\npdfjs-scroll-vertical-button-label = Vertical Scrolling\npdfjs-scroll-horizontal-button =\n .title = Use Horizontal Scrolling\npdfjs-scroll-horizontal-button-label = Horizontal Scrolling\npdfjs-scroll-wrapped-button =\n .title = Use Wrapped Scrolling\npdfjs-scroll-wrapped-button-label = Wrapped Scrolling\npdfjs-spread-none-button =\n .title = Do not join page spreads\npdfjs-spread-none-button-label = No Spreads\npdfjs-spread-odd-button =\n .title = Join page spreads starting with odd-numbered pages\npdfjs-spread-odd-button-label = Odd Spreads\npdfjs-spread-even-button =\n .title = Join page spreads starting with even-numbered pages\npdfjs-spread-even-button-label = Even Spreads\npdfjs-document-properties-button =\n .title = Document Properties\u2026\npdfjs-document-properties-button-label = Document Properties\u2026\npdfjs-document-properties-file-name = File name:\npdfjs-document-properties-file-size = File size:\npdfjs-document-properties-size-kb = { NUMBER($kb, maximumSignificantDigits: 3) } KB ({ $b } bytes)\npdfjs-document-properties-size-mb = { NUMBER($mb, maximumSignificantDigits: 3) } MB ({ $b } bytes)\npdfjs-document-properties-title = Title:\npdfjs-document-properties-author = Author:\npdfjs-document-properties-subject = Subject:\npdfjs-document-properties-keywords = Keywords:\npdfjs-document-properties-creation-date = Creation Date:\npdfjs-document-properties-modification-date = Modification Date:\npdfjs-document-properties-date-time-string = { DATETIME($dateObj, dateStyle: \"short\", timeStyle: \"medium\") }\npdfjs-document-properties-creator = Creator:\npdfjs-document-properties-producer = PDF Producer:\npdfjs-document-properties-version = PDF Version:\npdfjs-document-properties-page-count = Page Count:\npdfjs-document-properties-page-size = Page Size:\npdfjs-document-properties-page-size-unit-inches = in\npdfjs-document-properties-page-size-unit-millimeters = mm\npdfjs-document-properties-page-size-orientation-portrait = portrait\npdfjs-document-properties-page-size-orientation-landscape = landscape\npdfjs-document-properties-page-size-name-a-three = A3\npdfjs-document-properties-page-size-name-a-four = A4\npdfjs-document-properties-page-size-name-letter = Letter\npdfjs-document-properties-page-size-name-legal = Legal\npdfjs-document-properties-page-size-dimension-string = { $width } \xD7 { $height } { $unit } ({ $orientation })\npdfjs-document-properties-page-size-dimension-name-string = { $width } \xD7 { $height } { $unit } ({ $name }, { $orientation })\npdfjs-document-properties-linearized = Fast Web View:\npdfjs-document-properties-linearized-yes = Yes\npdfjs-document-properties-linearized-no = No\npdfjs-document-properties-close-button = Close\npdfjs-print-progress-message = Preparing document for printing\u2026\npdfjs-print-progress-percent = { $progress }%\npdfjs-print-progress-close-button = Cancel\npdfjs-printing-not-supported = Warning: Printing is not fully supported by this browser.\npdfjs-printing-not-ready = Warning: The PDF is not fully loaded for printing.\npdfjs-toggle-sidebar-button =\n .title = Toggle Sidebar\npdfjs-toggle-sidebar-notification-button =\n .title = Toggle Sidebar (document contains outline/attachments/layers)\npdfjs-toggle-sidebar-button-label = Toggle Sidebar\npdfjs-document-outline-button =\n .title = Show Document Outline (double-click to expand/collapse all items)\npdfjs-document-outline-button-label = Document Outline\npdfjs-attachments-button =\n .title = Show Attachments\npdfjs-attachments-button-label = Attachments\npdfjs-layers-button =\n .title = Show Layers (double-click to reset all layers to the default state)\npdfjs-layers-button-label = Layers\npdfjs-thumbs-button =\n .title = Show Thumbnails\npdfjs-thumbs-button-label = Thumbnails\npdfjs-current-outline-item-button =\n .title = Find Current Outline Item\npdfjs-current-outline-item-button-label = Current Outline Item\npdfjs-findbar-button =\n .title = Find in Document\npdfjs-findbar-button-label = Find\npdfjs-additional-layers = Additional Layers\npdfjs-thumb-page-title =\n .title = Page { $page }\npdfjs-thumb-page-canvas =\n .aria-label = Thumbnail of Page { $page }\npdfjs-find-input =\n .title = Find\n .placeholder = Find in document\u2026\npdfjs-find-previous-button =\n .title = Find the previous occurrence of the phrase\npdfjs-find-previous-button-label = Previous\npdfjs-find-next-button =\n .title = Find the next occurrence of the phrase\npdfjs-find-next-button-label = Next\npdfjs-find-highlight-checkbox = Highlight All\npdfjs-find-match-case-checkbox-label = Match Case\npdfjs-find-match-diacritics-checkbox-label = Match Diacritics\npdfjs-find-entire-word-checkbox-label = Whole Words\npdfjs-find-reached-top = Reached top of document, continued from bottom\npdfjs-find-reached-bottom = Reached end of document, continued from top\npdfjs-find-match-count =\n { $total ->\n [one] { $current } of { $total } match\n *[other] { $current } of { $total } matches\n }\npdfjs-find-match-count-limit =\n { $limit ->\n [one] More than { $limit } match\n *[other] More than { $limit } matches\n }\npdfjs-find-not-found = Phrase not found\npdfjs-page-scale-width = Page Width\npdfjs-page-scale-fit = Page Fit\npdfjs-page-scale-auto = Automatic Zoom\npdfjs-page-scale-actual = Actual Size\npdfjs-page-scale-percent = { $scale }%\npdfjs-page-landmark =\n .aria-label = Page { $page }\npdfjs-loading-error = An error occurred while loading the PDF.\npdfjs-invalid-file-error = Invalid or corrupted PDF file.\npdfjs-missing-file-error = Missing PDF file.\npdfjs-unexpected-response-error = Unexpected server response.\npdfjs-rendering-error = An error occurred while rendering the page.\npdfjs-annotation-date-time-string = { DATETIME($dateObj, dateStyle: \"short\", timeStyle: \"medium\") }\npdfjs-text-annotation-type =\n .alt = [{ $type } Annotation]\npdfjs-password-label = Enter the password to open this PDF file.\npdfjs-password-invalid = Invalid password. Please try again.\npdfjs-password-ok-button = OK\npdfjs-password-cancel-button = Cancel\npdfjs-web-fonts-disabled = Web fonts are disabled: unable to use embedded PDF fonts.\npdfjs-editor-free-text-button =\n .title = Text\npdfjs-editor-free-text-button-label = Text\npdfjs-editor-ink-button =\n .title = Draw\npdfjs-editor-ink-button-label = Draw\npdfjs-editor-stamp-button =\n .title = Add or edit images\npdfjs-editor-stamp-button-label = Add or edit images\npdfjs-editor-highlight-button =\n .title = Highlight\npdfjs-editor-highlight-button-label = Highlight\npdfjs-highlight-floating-button1 =\n .title = Highlight\n .aria-label = Highlight\npdfjs-highlight-floating-button-label = Highlight\npdfjs-editor-remove-ink-button =\n .title = Remove drawing\npdfjs-editor-remove-freetext-button =\n .title = Remove text\npdfjs-editor-remove-stamp-button =\n .title = Remove image\npdfjs-editor-remove-highlight-button =\n .title = Remove highlight\npdfjs-editor-free-text-color-input = Color\npdfjs-editor-free-text-size-input = Size\npdfjs-editor-ink-color-input = Color\npdfjs-editor-ink-thickness-input = Thickness\npdfjs-editor-ink-opacity-input = Opacity\npdfjs-editor-stamp-add-image-button =\n .title = Add image\npdfjs-editor-stamp-add-image-button-label = Add image\npdfjs-editor-free-highlight-thickness-input = Thickness\npdfjs-editor-free-highlight-thickness-title =\n .title = Change thickness when highlighting items other than text\npdfjs-free-text2 =\n .aria-label = Text Editor\n .default-content = Start typing\u2026\npdfjs-ink =\n .aria-label = Draw Editor\npdfjs-ink-canvas =\n .aria-label = User-created image\npdfjs-editor-alt-text-button =\n .aria-label = Alt text\npdfjs-editor-alt-text-button-label = Alt text\npdfjs-editor-alt-text-edit-button =\n .aria-label = Edit alt text\npdfjs-editor-alt-text-dialog-label = Choose an option\npdfjs-editor-alt-text-dialog-description = Alt text (alternative text) helps when people can\u2019t see the image or when it doesn\u2019t load.\npdfjs-editor-alt-text-add-description-label = Add a description\npdfjs-editor-alt-text-add-description-description = Aim for 1-2 sentences that describe the subject, setting, or actions.\npdfjs-editor-alt-text-mark-decorative-label = Mark as decorative\npdfjs-editor-alt-text-mark-decorative-description = This is used for ornamental images, like borders or watermarks.\npdfjs-editor-alt-text-cancel-button = Cancel\npdfjs-editor-alt-text-save-button = Save\npdfjs-editor-alt-text-decorative-tooltip = Marked as decorative\npdfjs-editor-alt-text-textarea =\n .placeholder = For example, \u201CA young man sits down at a table to eat a meal\u201D\npdfjs-editor-resizer-top-left =\n .aria-label = Top left corner \u2014 resize\npdfjs-editor-resizer-top-middle =\n .aria-label = Top middle \u2014 resize\npdfjs-editor-resizer-top-right =\n .aria-label = Top right corner \u2014 resize\npdfjs-editor-resizer-middle-right =\n .aria-label = Middle right \u2014 resize\npdfjs-editor-resizer-bottom-right =\n .aria-label = Bottom right corner \u2014 resize\npdfjs-editor-resizer-bottom-middle =\n .aria-label = Bottom middle \u2014 resize\npdfjs-editor-resizer-bottom-left =\n .aria-label = Bottom left corner \u2014 resize\npdfjs-editor-resizer-middle-left =\n .aria-label = Middle left \u2014 resize\npdfjs-editor-highlight-colorpicker-label = Highlight color\npdfjs-editor-colorpicker-button =\n .title = Change color\npdfjs-editor-colorpicker-dropdown =\n .aria-label = Color choices\npdfjs-editor-colorpicker-yellow =\n .title = Yellow\npdfjs-editor-colorpicker-green =\n .title = Green\npdfjs-editor-colorpicker-blue =\n .title = Blue\npdfjs-editor-colorpicker-pink =\n .title = Pink\npdfjs-editor-colorpicker-red =\n .title = Red\npdfjs-editor-highlight-show-all-button-label = Show all\npdfjs-editor-highlight-show-all-button =\n .title = Show all\npdfjs-editor-new-alt-text-dialog-edit-label = Edit alt text (image description)\npdfjs-editor-new-alt-text-dialog-add-label = Add alt text (image description)\npdfjs-editor-new-alt-text-textarea =\n .placeholder = Write your description here\u2026\npdfjs-editor-new-alt-text-description = Short description for people who can\u2019t see the image or when the image doesn\u2019t load.\npdfjs-editor-new-alt-text-disclaimer1 = This alt text was created automatically and may be inaccurate.\npdfjs-editor-new-alt-text-disclaimer-learn-more-url = Learn more\npdfjs-editor-new-alt-text-create-automatically-button-label = Create alt text automatically\npdfjs-editor-new-alt-text-not-now-button = Not now\npdfjs-editor-new-alt-text-error-title = Couldn\u2019t create alt text automatically\npdfjs-editor-new-alt-text-error-description = Please write your own alt text or try again later.\npdfjs-editor-new-alt-text-error-close-button = Close\npdfjs-editor-new-alt-text-ai-model-downloading-progress = Downloading alt text AI model ({ $downloadedSize } of { $totalSize } MB)\n .aria-valuetext = Downloading alt text AI model ({ $downloadedSize } of { $totalSize } MB)\npdfjs-editor-new-alt-text-added-button =\n .aria-label = Alt text added\npdfjs-editor-new-alt-text-added-button-label = Alt text added\npdfjs-editor-new-alt-text-missing-button =\n .aria-label = Missing alt text\npdfjs-editor-new-alt-text-missing-button-label = Missing alt text\npdfjs-editor-new-alt-text-to-review-button =\n .aria-label = Review alt text\npdfjs-editor-new-alt-text-to-review-button-label = Review alt text\npdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer = Created automatically: { $generatedAltText }\npdfjs-image-alt-text-settings-button =\n .title = Image alt text settings\npdfjs-image-alt-text-settings-button-label = Image alt text settings\npdfjs-editor-alt-text-settings-dialog-label = Image alt text settings\npdfjs-editor-alt-text-settings-automatic-title = Automatic alt text\npdfjs-editor-alt-text-settings-create-model-button-label = Create alt text automatically\npdfjs-editor-alt-text-settings-create-model-description = Suggests descriptions to help people who can\u2019t see the image or when the image doesn\u2019t load.\npdfjs-editor-alt-text-settings-download-model-label = Alt text AI model ({ $totalSize } MB)\npdfjs-editor-alt-text-settings-ai-model-description = Runs locally on your device so your data stays private. Required for automatic alt text.\npdfjs-editor-alt-text-settings-delete-model-button = Delete\npdfjs-editor-alt-text-settings-download-model-button = Download\npdfjs-editor-alt-text-settings-downloading-model-button = Downloading\u2026\npdfjs-editor-alt-text-settings-editor-title = Alt text editor\npdfjs-editor-alt-text-settings-show-dialog-button-label = Show alt text editor right away when adding an image\npdfjs-editor-alt-text-settings-show-dialog-description = Helps you make sure all your images have alt text.\npdfjs-editor-alt-text-settings-close-button = Close";
|
|
3034
3036
|
return createBundle(lang, text);
|
|
3035
3037
|
}
|
|
3036
3038
|
}
|
|
@@ -3749,9 +3751,7 @@ class ImageAltTextSettings {
|
|
|
3749
3751
|
;// ./web/alt_text_manager.js
|
|
3750
3752
|
|
|
3751
3753
|
class AltTextManager {
|
|
3752
|
-
#
|
|
3753
|
-
#boundSetPosition = this.#setPosition.bind(this);
|
|
3754
|
-
#boundOnClick = this.#onClick.bind(this);
|
|
3754
|
+
#clickAC = null;
|
|
3755
3755
|
#currentEditor = null;
|
|
3756
3756
|
#cancelButton;
|
|
3757
3757
|
#dialog;
|
|
@@ -3764,6 +3764,7 @@ class AltTextManager {
|
|
|
3764
3764
|
#textarea;
|
|
3765
3765
|
#uiManager;
|
|
3766
3766
|
#previousAltText = null;
|
|
3767
|
+
#resizeAC = null;
|
|
3767
3768
|
#svgElement = null;
|
|
3768
3769
|
#rectElement = null;
|
|
3769
3770
|
#container;
|
|
@@ -3785,6 +3786,7 @@ class AltTextManager {
|
|
|
3785
3786
|
this.#overlayManager = overlayManager;
|
|
3786
3787
|
this.#eventBus = eventBus;
|
|
3787
3788
|
this.#container = container;
|
|
3789
|
+
const onUpdateUIState = this.#updateUIState.bind(this);
|
|
3788
3790
|
dialog.addEventListener("close", this.#close.bind(this));
|
|
3789
3791
|
dialog.addEventListener("contextmenu", event => {
|
|
3790
3792
|
if (event.target !== this.#textarea) {
|
|
@@ -3793,13 +3795,10 @@ class AltTextManager {
|
|
|
3793
3795
|
});
|
|
3794
3796
|
cancelButton.addEventListener("click", this.#finish.bind(this));
|
|
3795
3797
|
saveButton.addEventListener("click", this.#save.bind(this));
|
|
3796
|
-
optionDescription.addEventListener("change",
|
|
3797
|
-
optionDecorative.addEventListener("change",
|
|
3798
|
+
optionDescription.addEventListener("change", onUpdateUIState);
|
|
3799
|
+
optionDecorative.addEventListener("change", onUpdateUIState);
|
|
3798
3800
|
this.#overlayManager.register(dialog);
|
|
3799
3801
|
}
|
|
3800
|
-
get _elements() {
|
|
3801
|
-
return shadow(this, "_elements", [this.#optionDescription, this.#optionDecorative, this.#textarea, this.#saveButton, this.#cancelButton]);
|
|
3802
|
-
}
|
|
3803
3802
|
#createSVGElement() {
|
|
3804
3803
|
if (this.#svgElement) {
|
|
3805
3804
|
return;
|
|
@@ -3832,8 +3831,13 @@ class AltTextManager {
|
|
|
3832
3831
|
}
|
|
3833
3832
|
this.#createSVGElement();
|
|
3834
3833
|
this.#hasUsedPointer = false;
|
|
3835
|
-
|
|
3836
|
-
|
|
3834
|
+
this.#clickAC = new AbortController();
|
|
3835
|
+
const clickOpts = {
|
|
3836
|
+
signal: this.#clickAC.signal
|
|
3837
|
+
},
|
|
3838
|
+
onClick = this.#onClick.bind(this);
|
|
3839
|
+
for (const element of [this.#optionDescription, this.#optionDecorative, this.#textarea, this.#saveButton, this.#cancelButton]) {
|
|
3840
|
+
element.addEventListener("click", onClick, clickOpts);
|
|
3837
3841
|
}
|
|
3838
3842
|
const {
|
|
3839
3843
|
altText,
|
|
@@ -3851,7 +3855,10 @@ class AltTextManager {
|
|
|
3851
3855
|
this.#currentEditor = editor;
|
|
3852
3856
|
this.#uiManager = uiManager;
|
|
3853
3857
|
this.#uiManager.removeEditListeners();
|
|
3854
|
-
this.#
|
|
3858
|
+
this.#resizeAC = new AbortController();
|
|
3859
|
+
this.#eventBus._on("resize", this.#setPosition.bind(this), {
|
|
3860
|
+
signal: this.#resizeAC.signal
|
|
3861
|
+
});
|
|
3855
3862
|
try {
|
|
3856
3863
|
await this.#overlayManager.open(this.#dialog);
|
|
3857
3864
|
this.#setPosition();
|
|
@@ -3949,7 +3956,8 @@ class AltTextManager {
|
|
|
3949
3956
|
this.#telemetryData = null;
|
|
3950
3957
|
this.#removeOnClickListeners();
|
|
3951
3958
|
this.#uiManager?.addEditListeners();
|
|
3952
|
-
this.#
|
|
3959
|
+
this.#resizeAC?.abort();
|
|
3960
|
+
this.#resizeAC = null;
|
|
3953
3961
|
this.#currentEditor.altTextFinish();
|
|
3954
3962
|
this.#currentEditor = null;
|
|
3955
3963
|
this.#uiManager = null;
|
|
@@ -3981,9 +3989,8 @@ class AltTextManager {
|
|
|
3981
3989
|
this.#removeOnClickListeners();
|
|
3982
3990
|
}
|
|
3983
3991
|
#removeOnClickListeners() {
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
}
|
|
3992
|
+
this.#clickAC?.abort();
|
|
3993
|
+
this.#clickAC = null;
|
|
3987
3994
|
}
|
|
3988
3995
|
destroy() {
|
|
3989
3996
|
this.#uiManager = null;
|
|
@@ -4686,37 +4693,37 @@ class PDFAttachmentViewer extends BaseTreeViewer {
|
|
|
4686
4693
|
;// ./web/grab_to_pan.js
|
|
4687
4694
|
const CSS_CLASS_GRAB = "grab-to-pan-grab";
|
|
4688
4695
|
class GrabToPan {
|
|
4696
|
+
#activateAC = null;
|
|
4697
|
+
#mouseDownAC = null;
|
|
4698
|
+
#scrollAC = null;
|
|
4689
4699
|
constructor({
|
|
4690
4700
|
element
|
|
4691
4701
|
}) {
|
|
4692
4702
|
this.element = element;
|
|
4693
4703
|
this.document = element.ownerDocument;
|
|
4694
|
-
this.activate = this.activate.bind(this);
|
|
4695
|
-
this.deactivate = this.deactivate.bind(this);
|
|
4696
|
-
this.toggle = this.toggle.bind(this);
|
|
4697
|
-
this._onMouseDown = this.#onMouseDown.bind(this);
|
|
4698
|
-
this._onMouseMove = this.#onMouseMove.bind(this);
|
|
4699
|
-
this._endPan = this.#endPan.bind(this);
|
|
4700
4704
|
const overlay = this.overlay = document.createElement("div");
|
|
4701
4705
|
overlay.className = "grab-to-pan-grabbing";
|
|
4702
4706
|
}
|
|
4703
4707
|
activate() {
|
|
4704
|
-
if (!this
|
|
4705
|
-
this
|
|
4706
|
-
this.element.addEventListener("mousedown", this.
|
|
4708
|
+
if (!this.#activateAC) {
|
|
4709
|
+
this.#activateAC = new AbortController();
|
|
4710
|
+
this.element.addEventListener("mousedown", this.#onMouseDown.bind(this), {
|
|
4711
|
+
capture: true,
|
|
4712
|
+
signal: this.#activateAC.signal
|
|
4713
|
+
});
|
|
4707
4714
|
this.element.classList.add(CSS_CLASS_GRAB);
|
|
4708
4715
|
}
|
|
4709
4716
|
}
|
|
4710
4717
|
deactivate() {
|
|
4711
|
-
if (this
|
|
4712
|
-
this.
|
|
4713
|
-
this
|
|
4714
|
-
this
|
|
4718
|
+
if (this.#activateAC) {
|
|
4719
|
+
this.#activateAC.abort();
|
|
4720
|
+
this.#activateAC = null;
|
|
4721
|
+
this.#endPan();
|
|
4715
4722
|
this.element.classList.remove(CSS_CLASS_GRAB);
|
|
4716
4723
|
}
|
|
4717
4724
|
}
|
|
4718
4725
|
toggle() {
|
|
4719
|
-
if (this
|
|
4726
|
+
if (this.#activateAC) {
|
|
4720
4727
|
this.deactivate();
|
|
4721
4728
|
} else {
|
|
4722
4729
|
this.activate();
|
|
@@ -4740,9 +4747,19 @@ class GrabToPan {
|
|
|
4740
4747
|
this.scrollTopStart = this.element.scrollTop;
|
|
4741
4748
|
this.clientXStart = event.clientX;
|
|
4742
4749
|
this.clientYStart = event.clientY;
|
|
4743
|
-
this
|
|
4744
|
-
this.
|
|
4745
|
-
|
|
4750
|
+
this.#mouseDownAC = new AbortController();
|
|
4751
|
+
const boundEndPan = this.#endPan.bind(this),
|
|
4752
|
+
mouseOpts = {
|
|
4753
|
+
capture: true,
|
|
4754
|
+
signal: this.#mouseDownAC.signal
|
|
4755
|
+
};
|
|
4756
|
+
this.document.addEventListener("mousemove", this.#onMouseMove.bind(this), mouseOpts);
|
|
4757
|
+
this.document.addEventListener("mouseup", boundEndPan, mouseOpts);
|
|
4758
|
+
this.#scrollAC = new AbortController();
|
|
4759
|
+
this.element.addEventListener("scroll", boundEndPan, {
|
|
4760
|
+
capture: true,
|
|
4761
|
+
signal: this.#scrollAC.signal
|
|
4762
|
+
});
|
|
4746
4763
|
event.preventDefault();
|
|
4747
4764
|
event.stopPropagation();
|
|
4748
4765
|
const focusedElement = document.activeElement;
|
|
@@ -4751,9 +4768,10 @@ class GrabToPan {
|
|
|
4751
4768
|
}
|
|
4752
4769
|
}
|
|
4753
4770
|
#onMouseMove(event) {
|
|
4754
|
-
this
|
|
4771
|
+
this.#scrollAC?.abort();
|
|
4772
|
+
this.#scrollAC = null;
|
|
4755
4773
|
if (!(event.buttons & 1)) {
|
|
4756
|
-
this
|
|
4774
|
+
this.#endPan();
|
|
4757
4775
|
return;
|
|
4758
4776
|
}
|
|
4759
4777
|
const xDiff = event.clientX - this.clientXStart;
|
|
@@ -4768,9 +4786,10 @@ class GrabToPan {
|
|
|
4768
4786
|
}
|
|
4769
4787
|
}
|
|
4770
4788
|
#endPan() {
|
|
4771
|
-
this
|
|
4772
|
-
this
|
|
4773
|
-
this
|
|
4789
|
+
this.#mouseDownAC?.abort();
|
|
4790
|
+
this.#mouseDownAC = null;
|
|
4791
|
+
this.#scrollAC?.abort();
|
|
4792
|
+
this.#scrollAC = null;
|
|
4774
4793
|
this.overlay.remove();
|
|
4775
4794
|
}
|
|
4776
4795
|
}
|
|
@@ -9245,8 +9264,11 @@ class StructTreeLayerBuilder {
|
|
|
9245
9264
|
return promise;
|
|
9246
9265
|
}
|
|
9247
9266
|
async getAriaAttributes(annotationId) {
|
|
9248
|
-
|
|
9249
|
-
|
|
9267
|
+
try {
|
|
9268
|
+
await this.render();
|
|
9269
|
+
return this.#elementAttributes.get(annotationId);
|
|
9270
|
+
} catch {}
|
|
9271
|
+
return null;
|
|
9250
9272
|
}
|
|
9251
9273
|
hide() {
|
|
9252
9274
|
if (this.#treeDom && !this.#treeDom.hidden) {
|
|
@@ -9917,7 +9939,7 @@ class TextLayerBuilder {
|
|
|
9917
9939
|
if (anchor.nodeType === Node.TEXT_NODE) {
|
|
9918
9940
|
anchor = anchor.parentNode;
|
|
9919
9941
|
}
|
|
9920
|
-
const parentTextLayer = anchor.parentElement
|
|
9942
|
+
const parentTextLayer = anchor.parentElement?.closest(".textLayer");
|
|
9921
9943
|
const endDiv = this.#textLayers.get(parentTextLayer);
|
|
9922
9944
|
if (endDiv) {
|
|
9923
9945
|
endDiv.style.width = parentTextLayer.style.width;
|
|
@@ -10839,7 +10861,7 @@ class PDFViewer {
|
|
|
10839
10861
|
#scaleTimeoutId = null;
|
|
10840
10862
|
#textLayerMode = TextLayerMode.ENABLE;
|
|
10841
10863
|
constructor(options) {
|
|
10842
|
-
const viewerVersion = "4.
|
|
10864
|
+
const viewerVersion = "4.8.69";
|
|
10843
10865
|
if (version !== viewerVersion) {
|
|
10844
10866
|
throw new Error(`The API version "${version}" does not match the Viewer version "${viewerVersion}".`);
|
|
10845
10867
|
}
|
|
@@ -11110,17 +11132,17 @@ class PDFViewer {
|
|
|
11110
11132
|
if (document.visibilityState === "hidden" || !this.container.offsetParent || this._getVisiblePages().views.length === 0) {
|
|
11111
11133
|
return;
|
|
11112
11134
|
}
|
|
11113
|
-
const hiddenCapability = Promise.withResolvers()
|
|
11114
|
-
|
|
11135
|
+
const hiddenCapability = Promise.withResolvers(),
|
|
11136
|
+
ac = new AbortController();
|
|
11137
|
+
document.addEventListener("visibilitychange", () => {
|
|
11115
11138
|
if (document.visibilityState === "hidden") {
|
|
11116
11139
|
hiddenCapability.resolve();
|
|
11117
11140
|
}
|
|
11118
|
-
}
|
|
11119
|
-
|
|
11120
|
-
signal
|
|
11141
|
+
}, {
|
|
11142
|
+
signal: typeof AbortSignal.any === "function" ? AbortSignal.any([signal, ac.signal]) : signal
|
|
11121
11143
|
});
|
|
11122
11144
|
await Promise.race([this._onePageRenderedCapability.promise, hiddenCapability.promise]);
|
|
11123
|
-
|
|
11145
|
+
ac.abort();
|
|
11124
11146
|
}
|
|
11125
11147
|
async getAllText() {
|
|
11126
11148
|
const texts = [];
|
|
@@ -14198,140 +14220,58 @@ const PDFViewerApplication = {
|
|
|
14198
14220
|
if (this._eventBusAbortController) {
|
|
14199
14221
|
return;
|
|
14200
14222
|
}
|
|
14201
|
-
this._eventBusAbortController = new AbortController();
|
|
14223
|
+
const ac = this._eventBusAbortController = new AbortController();
|
|
14224
|
+
const opts = {
|
|
14225
|
+
signal: ac.signal
|
|
14226
|
+
};
|
|
14202
14227
|
const {
|
|
14203
14228
|
eventBus,
|
|
14204
14229
|
externalServices,
|
|
14205
14230
|
pdfDocumentProperties,
|
|
14206
14231
|
pdfViewer,
|
|
14207
|
-
preferences
|
|
14208
|
-
_eventBusAbortController: {
|
|
14209
|
-
signal
|
|
14210
|
-
}
|
|
14232
|
+
preferences
|
|
14211
14233
|
} = this;
|
|
14212
|
-
eventBus._on("resize", onResize.bind(this),
|
|
14213
|
-
|
|
14214
|
-
|
|
14215
|
-
eventBus._on("
|
|
14216
|
-
|
|
14217
|
-
|
|
14218
|
-
eventBus._on("
|
|
14219
|
-
|
|
14220
|
-
|
|
14221
|
-
eventBus._on("
|
|
14222
|
-
|
|
14223
|
-
|
|
14224
|
-
eventBus._on("
|
|
14225
|
-
|
|
14226
|
-
|
|
14227
|
-
eventBus._on("
|
|
14228
|
-
|
|
14229
|
-
|
|
14230
|
-
eventBus._on("
|
|
14231
|
-
|
|
14232
|
-
|
|
14233
|
-
eventBus._on("
|
|
14234
|
-
|
|
14235
|
-
|
|
14236
|
-
eventBus._on("
|
|
14237
|
-
|
|
14238
|
-
|
|
14239
|
-
eventBus._on("
|
|
14240
|
-
|
|
14241
|
-
|
|
14242
|
-
eventBus._on("
|
|
14243
|
-
|
|
14244
|
-
|
|
14245
|
-
eventBus._on("
|
|
14246
|
-
|
|
14247
|
-
|
|
14248
|
-
eventBus._on("
|
|
14249
|
-
|
|
14250
|
-
|
|
14251
|
-
eventBus._on("
|
|
14252
|
-
|
|
14253
|
-
});
|
|
14254
|
-
eventBus._on("presentationmode", this.requestPresentationMode.bind(this), {
|
|
14255
|
-
signal
|
|
14256
|
-
});
|
|
14257
|
-
eventBus._on("switchannotationeditormode", evt => pdfViewer.annotationEditorMode = evt, {
|
|
14258
|
-
signal
|
|
14259
|
-
});
|
|
14260
|
-
eventBus._on("print", this.triggerPrinting.bind(this), {
|
|
14261
|
-
signal
|
|
14262
|
-
});
|
|
14263
|
-
eventBus._on("download", this.downloadOrSave.bind(this), {
|
|
14264
|
-
signal
|
|
14265
|
-
});
|
|
14266
|
-
eventBus._on("firstpage", () => this.page = 1, {
|
|
14267
|
-
signal
|
|
14268
|
-
});
|
|
14269
|
-
eventBus._on("lastpage", () => this.page = this.pagesCount, {
|
|
14270
|
-
signal
|
|
14271
|
-
});
|
|
14272
|
-
eventBus._on("nextpage", () => pdfViewer.nextPage(), {
|
|
14273
|
-
signal
|
|
14274
|
-
});
|
|
14275
|
-
eventBus._on("previouspage", () => pdfViewer.previousPage(), {
|
|
14276
|
-
signal
|
|
14277
|
-
});
|
|
14278
|
-
eventBus._on("zoomin", this.zoomIn.bind(this), {
|
|
14279
|
-
signal
|
|
14280
|
-
});
|
|
14281
|
-
eventBus._on("zoomout", this.zoomOut.bind(this), {
|
|
14282
|
-
signal
|
|
14283
|
-
});
|
|
14284
|
-
eventBus._on("zoomreset", this.zoomReset.bind(this), {
|
|
14285
|
-
signal
|
|
14286
|
-
});
|
|
14287
|
-
eventBus._on("pagenumberchanged", onPageNumberChanged.bind(this), {
|
|
14288
|
-
signal
|
|
14289
|
-
});
|
|
14290
|
-
eventBus._on("scalechanged", evt => pdfViewer.currentScaleValue = evt.value, {
|
|
14291
|
-
signal
|
|
14292
|
-
});
|
|
14293
|
-
eventBus._on("rotatecw", this.rotatePages.bind(this, 90), {
|
|
14294
|
-
signal
|
|
14295
|
-
});
|
|
14296
|
-
eventBus._on("rotateccw", this.rotatePages.bind(this, -90), {
|
|
14297
|
-
signal
|
|
14298
|
-
});
|
|
14299
|
-
eventBus._on("optionalcontentconfig", evt => pdfViewer.optionalContentConfigPromise = evt.promise, {
|
|
14300
|
-
signal
|
|
14301
|
-
});
|
|
14302
|
-
eventBus._on("switchscrollmode", evt => pdfViewer.scrollMode = evt.mode, {
|
|
14303
|
-
signal
|
|
14304
|
-
});
|
|
14305
|
-
eventBus._on("scrollmodechanged", onViewerModesChanged.bind(this, "scrollMode"), {
|
|
14306
|
-
signal
|
|
14307
|
-
});
|
|
14308
|
-
eventBus._on("switchspreadmode", evt => pdfViewer.spreadMode = evt.mode, {
|
|
14309
|
-
signal
|
|
14310
|
-
});
|
|
14311
|
-
eventBus._on("spreadmodechanged", onViewerModesChanged.bind(this, "spreadMode"), {
|
|
14312
|
-
signal
|
|
14313
|
-
});
|
|
14314
|
-
eventBus._on("imagealttextsettings", onImageAltTextSettings.bind(this), {
|
|
14315
|
-
signal
|
|
14316
|
-
});
|
|
14317
|
-
eventBus._on("documentproperties", () => pdfDocumentProperties?.open(), {
|
|
14318
|
-
signal
|
|
14319
|
-
});
|
|
14320
|
-
eventBus._on("findfromurlhash", onFindFromUrlHash.bind(this), {
|
|
14321
|
-
signal
|
|
14322
|
-
});
|
|
14323
|
-
eventBus._on("updatefindmatchescount", onUpdateFindMatchesCount.bind(this), {
|
|
14324
|
-
signal
|
|
14325
|
-
});
|
|
14326
|
-
eventBus._on("updatefindcontrolstate", onUpdateFindControlState.bind(this), {
|
|
14327
|
-
signal
|
|
14328
|
-
});
|
|
14329
|
-
eventBus._on("fileinputchange", onFileInputChange.bind(this), {
|
|
14330
|
-
signal
|
|
14331
|
-
});
|
|
14332
|
-
eventBus._on("openfile", onOpenFile.bind(this), {
|
|
14333
|
-
signal
|
|
14334
|
-
});
|
|
14234
|
+
eventBus._on("resize", onResize.bind(this), opts);
|
|
14235
|
+
eventBus._on("hashchange", onHashchange.bind(this), opts);
|
|
14236
|
+
eventBus._on("beforeprint", this.beforePrint.bind(this), opts);
|
|
14237
|
+
eventBus._on("afterprint", this.afterPrint.bind(this), opts);
|
|
14238
|
+
eventBus._on("pagerender", onPageRender.bind(this), opts);
|
|
14239
|
+
eventBus._on("pagerendered", onPageRendered.bind(this), opts);
|
|
14240
|
+
eventBus._on("updateviewarea", onUpdateViewarea.bind(this), opts);
|
|
14241
|
+
eventBus._on("pagechanging", onPageChanging.bind(this), opts);
|
|
14242
|
+
eventBus._on("scalechanging", onScaleChanging.bind(this), opts);
|
|
14243
|
+
eventBus._on("rotationchanging", onRotationChanging.bind(this), opts);
|
|
14244
|
+
eventBus._on("sidebarviewchanged", onSidebarViewChanged.bind(this), opts);
|
|
14245
|
+
eventBus._on("pagemode", onPageMode.bind(this), opts);
|
|
14246
|
+
eventBus._on("namedaction", onNamedAction.bind(this), opts);
|
|
14247
|
+
eventBus._on("presentationmodechanged", evt => pdfViewer.presentationModeState = evt.state, opts);
|
|
14248
|
+
eventBus._on("presentationmode", this.requestPresentationMode.bind(this), opts);
|
|
14249
|
+
eventBus._on("switchannotationeditormode", evt => pdfViewer.annotationEditorMode = evt, opts);
|
|
14250
|
+
eventBus._on("print", this.triggerPrinting.bind(this), opts);
|
|
14251
|
+
eventBus._on("download", this.downloadOrSave.bind(this), opts);
|
|
14252
|
+
eventBus._on("firstpage", () => this.page = 1, opts);
|
|
14253
|
+
eventBus._on("lastpage", () => this.page = this.pagesCount, opts);
|
|
14254
|
+
eventBus._on("nextpage", () => pdfViewer.nextPage(), opts);
|
|
14255
|
+
eventBus._on("previouspage", () => pdfViewer.previousPage(), opts);
|
|
14256
|
+
eventBus._on("zoomin", this.zoomIn.bind(this), opts);
|
|
14257
|
+
eventBus._on("zoomout", this.zoomOut.bind(this), opts);
|
|
14258
|
+
eventBus._on("zoomreset", this.zoomReset.bind(this), opts);
|
|
14259
|
+
eventBus._on("pagenumberchanged", onPageNumberChanged.bind(this), opts);
|
|
14260
|
+
eventBus._on("scalechanged", evt => pdfViewer.currentScaleValue = evt.value, opts);
|
|
14261
|
+
eventBus._on("rotatecw", this.rotatePages.bind(this, 90), opts);
|
|
14262
|
+
eventBus._on("rotateccw", this.rotatePages.bind(this, -90), opts);
|
|
14263
|
+
eventBus._on("optionalcontentconfig", evt => pdfViewer.optionalContentConfigPromise = evt.promise, opts);
|
|
14264
|
+
eventBus._on("switchscrollmode", evt => pdfViewer.scrollMode = evt.mode, opts);
|
|
14265
|
+
eventBus._on("scrollmodechanged", onViewerModesChanged.bind(this, "scrollMode"), opts);
|
|
14266
|
+
eventBus._on("switchspreadmode", evt => pdfViewer.spreadMode = evt.mode, opts);
|
|
14267
|
+
eventBus._on("spreadmodechanged", onViewerModesChanged.bind(this, "spreadMode"), opts);
|
|
14268
|
+
eventBus._on("imagealttextsettings", onImageAltTextSettings.bind(this), opts);
|
|
14269
|
+
eventBus._on("documentproperties", () => pdfDocumentProperties?.open(), opts);
|
|
14270
|
+
eventBus._on("findfromurlhash", onFindFromUrlHash.bind(this), opts);
|
|
14271
|
+
eventBus._on("updatefindmatchescount", onUpdateFindMatchesCount.bind(this), opts);
|
|
14272
|
+
eventBus._on("updatefindcontrolstate", onUpdateFindControlState.bind(this), opts);
|
|
14273
|
+
eventBus._on("fileinputchange", onFileInputChange.bind(this), opts);
|
|
14274
|
+
eventBus._on("openfile", onOpenFile.bind(this), opts);
|
|
14335
14275
|
},
|
|
14336
14276
|
bindWindowEvents() {
|
|
14337
14277
|
if (this._windowAbortController) {
|
|
@@ -14442,9 +14382,7 @@ const PDFViewerApplication = {
|
|
|
14442
14382
|
if (this._lastScrollTop === mainContainer.scrollTop && this._lastScrollLeft === mainContainer.scrollLeft) {
|
|
14443
14383
|
return;
|
|
14444
14384
|
}
|
|
14445
|
-
mainContainer.removeEventListener("scroll", scroll
|
|
14446
|
-
passive: true
|
|
14447
|
-
});
|
|
14385
|
+
mainContainer.removeEventListener("scroll", scroll);
|
|
14448
14386
|
this._isScrolling = true;
|
|
14449
14387
|
mainContainer.addEventListener("scrollend", scrollend, {
|
|
14450
14388
|
signal
|
|
@@ -15189,8 +15127,8 @@ function beforeUnload(evt) {
|
|
|
15189
15127
|
|
|
15190
15128
|
|
|
15191
15129
|
|
|
15192
|
-
const pdfjsVersion = "4.
|
|
15193
|
-
const pdfjsBuild = "
|
|
15130
|
+
const pdfjsVersion = "4.8.69";
|
|
15131
|
+
const pdfjsBuild = "3634dab10";
|
|
15194
15132
|
const AppConstants = {
|
|
15195
15133
|
LinkTarget: LinkTarget,
|
|
15196
15134
|
RenderingStates: RenderingStates,
|