@file-viewer/renderer-pdf 3.3.3 → 3.3.4
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/THIRD_PARTY_NOTICES.md +21 -0
- package/dist/pdf.js +76 -40
- package/dist/pdfAnnotationStyles.d.ts +1 -0
- package/dist/pdfAnnotationStyles.js +387 -0
- package/dist/pdfStyles.d.ts +1 -1
- package/dist/pdfStyles.js +2 -1
- package/dist/vendor/pdfjs/legacy/build/pdf.mjs +12 -1
- package/dist/vendor/pdfjs/provenance.json +6 -6
- package/package.json +6 -3
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
## PDF.js viewer CSS
|
|
4
|
+
|
|
5
|
+
The viewer and annotation-layer CSS derives from pdfjs-dist 5.4.624,
|
|
6
|
+
web/pdf_viewer.css. The original upstream declaration is retained below.
|
|
7
|
+
It attributes the upstream CSS, not File Viewer's original integration work.
|
|
8
|
+
|
|
9
|
+
Copyright 2014 Mozilla Foundation
|
|
10
|
+
|
|
11
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
|
+
you may not use this file except in compliance with the License.
|
|
13
|
+
You may obtain a copy of the License at
|
|
14
|
+
|
|
15
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
|
|
17
|
+
Unless required by applicable law or agreed to in writing, software
|
|
18
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
19
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20
|
+
See the License for the specific language governing permissions and
|
|
21
|
+
limitations under the License.
|
package/dist/pdf.js
CHANGED
|
@@ -2,7 +2,7 @@ import { installPdfHandTool } from './pdfHandTool.js';
|
|
|
2
2
|
import { scrollPdfPageWithinContainer } from './pdfPageScroll.js';
|
|
3
3
|
import { getDocument, GlobalWorkerOptions, PDFWorker as PdfJsWorker, PixelsPerInch, version as pdfJsVersion, } from './vendor/pdfjs/legacy/build/pdf.mjs';
|
|
4
4
|
import { EventBus, GenericL10n, PDFFindController, PDFLinkService, PDFViewer, } from './vendor/pdfjs/legacy/web/pdf_viewer.mjs';
|
|
5
|
-
import { registerFileViewerSearchProvider, registerFileViewerZoomProvider, unregisterFileViewerSearchProvider, unregisterFileViewerZoomProvider, registerFileViewerViewStateProvider, unregisterFileViewerViewStateProvider, createFileViewerZoomChangeEmitter, createFileViewerViewStateChange, createFileViewerViewStateChangeEmitter, createFileViewerTranslator, observeFileViewerColorScheme, buildPrintPageStyle, formatCssPixels, DEFAULT_PDF_RANGE_CHUNK_SIZE, resolveFileViewerLocale, resolveFileViewerFitScale, } from '@file-viewer/core';
|
|
5
|
+
import { registerFileViewerSearchProvider, registerFileViewerZoomProvider, unregisterFileViewerSearchProvider, unregisterFileViewerZoomProvider, registerFileViewerViewStateProvider, unregisterFileViewerViewStateProvider, createFileViewerZoomChangeEmitter, createFileViewerViewStateChange, createFileViewerViewStateChangeEmitter, createFileViewerTranslator, normalizeFileViewerErrorMessage, observeFileViewerColorScheme, buildPrintPageStyle, formatCssPixels, DEFAULT_PDF_RANGE_CHUNK_SIZE, resolveFileViewerLocale, resolveFileViewerFitScale, } from '@file-viewer/core';
|
|
6
6
|
import { DEFAULT_FILE_VIEWER_PDF_WORKER_PATH, resolveFileViewerPdfAssetUrls, resolveFileViewerRuntimeAssetBaseUrl, } from '@file-viewer/core/assets';
|
|
7
7
|
import { pdfViewerStyle } from './pdfStyles.js';
|
|
8
8
|
import { collectMalformedIdentityFontNames, createPdfCjkFontFallbackManager, detectMalformedIdentityCjkFontFamilies, } from './pdfFontFallback.js';
|
|
@@ -268,10 +268,10 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
268
268
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
269
269
|
const documentRef = target.ownerDocument || document;
|
|
270
270
|
const targetWindow = documentRef.defaultView || (typeof window !== 'undefined' ? window : null);
|
|
271
|
-
const t = createFileViewerTranslator(context === null || context === void 0 ? void 0 : context.options);
|
|
272
|
-
|
|
271
|
+
const t = createFileViewerTranslator((context === null || context === void 0 ? void 0 : context.i18n) || (context === null || context === void 0 ? void 0 : context.options));
|
|
272
|
+
let activeL10n;
|
|
273
273
|
if (!targetWindow) {
|
|
274
|
-
throw
|
|
274
|
+
throw t.error('pdf.error.browserWindow');
|
|
275
275
|
}
|
|
276
276
|
const options = (_a = context === null || context === void 0 ? void 0 : context.options) === null || _a === void 0 ? void 0 : _a.pdf;
|
|
277
277
|
const pdfRuntimeAssetBaseUrl = resolveFileViewerRuntimeAssetBaseUrl(documentRef);
|
|
@@ -295,7 +295,7 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
295
295
|
: !isCompactViewport();
|
|
296
296
|
let navMode = 'pages';
|
|
297
297
|
let loadStatus = 'loading';
|
|
298
|
-
let errorMessage = '';
|
|
298
|
+
let errorMessage = () => '';
|
|
299
299
|
let currentPage = 1;
|
|
300
300
|
let pageCount = 0;
|
|
301
301
|
let currentScale = 1;
|
|
@@ -366,29 +366,29 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
366
366
|
root.dataset.pdfReadingTheme = ((_a = options === null || options === void 0 ? void 0 : options.darkMode) !== null && _a !== void 0 ? _a : theme === 'dark') ? 'dark' : 'light';
|
|
367
367
|
});
|
|
368
368
|
const toolbar = createElement(documentRef, 'div', 'pdf-toolbar');
|
|
369
|
-
const navToggleButton = createButton(documentRef, 'pdf-icon-button', t('pdf.toolbar.toggleNavigation'));
|
|
369
|
+
const navToggleButton = t.attr(t.attr(createButton(documentRef, 'pdf-icon-button', t('pdf.toolbar.toggleNavigation')), 'title', 'pdf.toolbar.toggleNavigation'), 'aria-label', 'pdf.toolbar.toggleNavigation');
|
|
370
370
|
navToggleButton.setAttribute('aria-pressed', String(navVisible));
|
|
371
371
|
navToggleButton.append(createElement(documentRef, 'span', 'pdf-panel-icon'));
|
|
372
372
|
const pageGroup = createElement(documentRef, 'div', 'pdf-toolbar-group');
|
|
373
|
-
const previousPageButton = createButton(documentRef, 'pdf-icon-button', t('pdf.toolbar.previousPage'), '‹');
|
|
373
|
+
const previousPageButton = t.attr(t.attr(createButton(documentRef, 'pdf-icon-button', t('pdf.toolbar.previousPage'), '‹'), 'title', 'pdf.toolbar.previousPage'), 'aria-label', 'pdf.toolbar.previousPage');
|
|
374
374
|
const pageMeter = createElement(documentRef, 'span', 'pdf-page-meter');
|
|
375
375
|
const pageMeterCurrent = createElement(documentRef, 'strong', undefined, '1');
|
|
376
376
|
const pageMeterTotal = createElement(documentRef, 'span', undefined, '/ -');
|
|
377
377
|
pageMeter.append(pageMeterCurrent, pageMeterTotal);
|
|
378
|
-
const nextPageButton = createButton(documentRef, 'pdf-icon-button', t('pdf.toolbar.nextPage'), '›');
|
|
378
|
+
const nextPageButton = t.attr(t.attr(createButton(documentRef, 'pdf-icon-button', t('pdf.toolbar.nextPage'), '›'), 'title', 'pdf.toolbar.nextPage'), 'aria-label', 'pdf.toolbar.nextPage');
|
|
379
379
|
pageGroup.append(previousPageButton, pageMeter, nextPageButton);
|
|
380
380
|
const zoomGroup = createElement(documentRef, 'div', 'pdf-toolbar-group pdf-toolbar-group--zoom');
|
|
381
|
-
const zoomOutButton = createButton(documentRef, 'pdf-icon-button', t('pdf.toolbar.zoomOut'), '−');
|
|
381
|
+
const zoomOutButton = t.attr(t.attr(createButton(documentRef, 'pdf-icon-button', t('pdf.toolbar.zoomOut'), '−'), 'title', 'pdf.toolbar.zoomOut'), 'aria-label', 'pdf.toolbar.zoomOut');
|
|
382
382
|
const scaleButton = createElement(documentRef, 'button', 'pdf-scale-button', '100%');
|
|
383
383
|
scaleButton.type = 'button';
|
|
384
|
-
scaleButton
|
|
385
|
-
|
|
386
|
-
const zoomInButton = createButton(documentRef, 'pdf-icon-button', t('pdf.toolbar.zoomIn'), '+');
|
|
384
|
+
t.attr(scaleButton, 'title', 'pdf.toolbar.fitWidth');
|
|
385
|
+
t.attr(scaleButton, 'aria-label', 'pdf.toolbar.fitWidth');
|
|
386
|
+
const zoomInButton = t.attr(t.attr(createButton(documentRef, 'pdf-icon-button', t('pdf.toolbar.zoomIn'), '+'), 'title', 'pdf.toolbar.zoomIn'), 'aria-label', 'pdf.toolbar.zoomIn');
|
|
387
387
|
zoomGroup.append(zoomOutButton, scaleButton, zoomInButton);
|
|
388
388
|
const rotateGroup = createElement(documentRef, 'div', 'pdf-toolbar-group pdf-toolbar-group--rotate');
|
|
389
|
-
const rotateLeftButton = createButton(documentRef, 'pdf-icon-button', t('pdf.toolbar.rotateLeft'), '↺');
|
|
389
|
+
const rotateLeftButton = t.attr(t.attr(createButton(documentRef, 'pdf-icon-button', t('pdf.toolbar.rotateLeft'), '↺'), 'title', 'pdf.toolbar.rotateLeft'), 'aria-label', 'pdf.toolbar.rotateLeft');
|
|
390
390
|
const rotationMeter = createElement(documentRef, 'span', 'pdf-rotation-meter', `${currentRotation}°`);
|
|
391
|
-
const rotateRightButton = createButton(documentRef, 'pdf-icon-button', t('pdf.toolbar.rotateRight'), '↻');
|
|
391
|
+
const rotateRightButton = t.attr(t.attr(createButton(documentRef, 'pdf-icon-button', t('pdf.toolbar.rotateRight'), '↻'), 'title', 'pdf.toolbar.rotateRight'), 'aria-label', 'pdf.toolbar.rotateRight');
|
|
392
392
|
rotateGroup.append(rotateLeftButton, rotationMeter, rotateRightButton);
|
|
393
393
|
if (navigationEnabled) {
|
|
394
394
|
toolbar.append(navToggleButton);
|
|
@@ -400,16 +400,16 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
400
400
|
const content = createElement(documentRef, 'div', 'pdf-content');
|
|
401
401
|
const navPane = createElement(documentRef, 'aside', 'pdf-nav-pane');
|
|
402
402
|
const navHead = createElement(documentRef, 'div', 'pdf-nav-head');
|
|
403
|
-
const navTitle = createElement(documentRef, 'span', undefined,
|
|
404
|
-
const navCount = createElement(documentRef, 'strong', undefined,
|
|
403
|
+
const navTitle = t.text(createElement(documentRef, 'span', undefined), 'pdf.nav.pagesTitle');
|
|
404
|
+
const navCount = t.text(createElement(documentRef, 'strong', undefined), 'pdf.nav.pageCount', { count: 0 });
|
|
405
405
|
navHead.append(navTitle, navCount);
|
|
406
406
|
const navTabs = createElement(documentRef, 'div', 'pdf-nav-tabs');
|
|
407
407
|
navTabs.setAttribute('role', 'tablist');
|
|
408
|
-
|
|
409
|
-
const pagesTab = createButton(documentRef, '', t('pdf.nav.pagesTab'));
|
|
410
|
-
const outlineTab = createButton(documentRef, '', t('pdf.nav.outlineTab'));
|
|
411
|
-
pagesTab
|
|
412
|
-
outlineTab
|
|
408
|
+
t.attr(navTabs, 'aria-label', 'pdf.nav.typeLabel');
|
|
409
|
+
const pagesTab = t.attr(t.attr(createButton(documentRef, '', t('pdf.nav.pagesTab')), 'title', 'pdf.nav.pagesTab'), 'aria-label', 'pdf.nav.pagesTab');
|
|
410
|
+
const outlineTab = t.attr(t.attr(createButton(documentRef, '', t('pdf.nav.outlineTab')), 'title', 'pdf.nav.outlineTab'), 'aria-label', 'pdf.nav.outlineTab');
|
|
411
|
+
t.text(pagesTab, 'pdf.nav.pagesTab');
|
|
412
|
+
t.text(outlineTab, 'pdf.nav.outlineTab');
|
|
413
413
|
pagesTab.setAttribute('role', 'tab');
|
|
414
414
|
outlineTab.setAttribute('role', 'tab');
|
|
415
415
|
navTabs.append(pagesTab, outlineTab);
|
|
@@ -419,7 +419,7 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
419
419
|
const container = createElement(documentRef, 'div', 'pdf-wrapper');
|
|
420
420
|
container.dataset.viewerScrollContainer = 'true';
|
|
421
421
|
const pdfViewerRoot = createElement(documentRef, 'div', 'pdfViewer');
|
|
422
|
-
const stateNode = createElement(documentRef, 'div', 'pdf-state',
|
|
422
|
+
const stateNode = t.text(createElement(documentRef, 'div', 'pdf-state'), 'pdf.state.loading');
|
|
423
423
|
container.append(pdfViewerRoot, stateNode);
|
|
424
424
|
viewport.append(container);
|
|
425
425
|
content.append(navPane, viewport);
|
|
@@ -465,6 +465,7 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
465
465
|
else if (navList.classList.contains('pdf-outline-list')) {
|
|
466
466
|
navScrollTopByMode.outline = navList.scrollTop;
|
|
467
467
|
}
|
|
468
|
+
t.release(navList);
|
|
468
469
|
navList.replaceChildren();
|
|
469
470
|
navList.className = navMode === 'pages' ? 'pdf-page-list' : 'pdf-outline-list';
|
|
470
471
|
const restoreNavScrollTop = () => {
|
|
@@ -485,7 +486,7 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
485
486
|
else {
|
|
486
487
|
thumb.textContent = String(page);
|
|
487
488
|
}
|
|
488
|
-
button.append(thumb, createElement(documentRef, 'span', 'pdf-page-label',
|
|
489
|
+
button.append(thumb, t.text(createElement(documentRef, 'span', 'pdf-page-label'), 'pdf.nav.pageLabel', { page }));
|
|
489
490
|
button.addEventListener('click', () => goToPage(page, 'page-click', 'user'));
|
|
490
491
|
navList.append(button);
|
|
491
492
|
}
|
|
@@ -510,7 +511,7 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
510
511
|
navList.append(button);
|
|
511
512
|
});
|
|
512
513
|
if (!entries.length) {
|
|
513
|
-
navList.append(createElement(documentRef, 'div', 'pdf-outline-empty',
|
|
514
|
+
navList.append(t.text(createElement(documentRef, 'div', 'pdf-outline-empty'), 'pdf.nav.outlineEmpty'));
|
|
514
515
|
}
|
|
515
516
|
restoreNavScrollTop();
|
|
516
517
|
};
|
|
@@ -523,7 +524,7 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
523
524
|
}
|
|
524
525
|
const image = documentRef.createElement('img');
|
|
525
526
|
image.src = imageUrl;
|
|
526
|
-
image
|
|
527
|
+
t.attr(image, 'alt', 'pdf.thumbnail.alt', { page: pageNumber });
|
|
527
528
|
image.loading = 'lazy';
|
|
528
529
|
thumb.replaceChildren(image);
|
|
529
530
|
return true;
|
|
@@ -631,7 +632,7 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
631
632
|
await new Promise(resolve => targetWindow.setTimeout(resolve, 16));
|
|
632
633
|
}
|
|
633
634
|
if (loadStatus === 'error') {
|
|
634
|
-
throw new Error(errorMessage || t('pdf.error.loadFailed'));
|
|
635
|
+
throw new Error(errorMessage() || t('pdf.error.loadFailed'));
|
|
635
636
|
}
|
|
636
637
|
},
|
|
637
638
|
capture: renderFirstPageThumbnail,
|
|
@@ -679,10 +680,12 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
679
680
|
outlineTab.classList.toggle('active', navMode === 'outline');
|
|
680
681
|
pagesTab.setAttribute('aria-selected', navMode === 'pages' ? 'true' : 'false');
|
|
681
682
|
outlineTab.setAttribute('aria-selected', navMode === 'outline' ? 'true' : 'false');
|
|
682
|
-
navTitle.textContent = navMode === 'pages' ? t('pdf.nav.pagesTitle') : t('pdf.nav.outlineTitle');
|
|
683
|
-
navCount
|
|
684
|
-
|
|
685
|
-
|
|
683
|
+
t.bind(navTitle, localizedNode => { localizedNode.textContent = navMode === 'pages' ? t('pdf.nav.pagesTitle') : t('pdf.nav.outlineTitle'); }, 'textContent');
|
|
684
|
+
t.bind(navCount, localizedNode => {
|
|
685
|
+
localizedNode.textContent = navMode === 'pages'
|
|
686
|
+
? t('pdf.nav.pageCount', { count: pageCount })
|
|
687
|
+
: t('pdf.nav.itemCount', { count: outlineCount() });
|
|
688
|
+
}, 'textContent');
|
|
686
689
|
pageMeterCurrent.textContent = String(currentPage);
|
|
687
690
|
pageMeterTotal.textContent = `/ ${pageCount || '-'}`;
|
|
688
691
|
scaleButton.textContent = scaleText();
|
|
@@ -693,7 +696,7 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
693
696
|
zoomInButton.disabled = !canZoomIn();
|
|
694
697
|
stateNode.hidden = loadStatus === 'ready';
|
|
695
698
|
stateNode.classList.toggle('pdf-state--error', loadStatus === 'error');
|
|
696
|
-
stateNode.textContent = loadStatus === 'error' ? errorMessage : t('pdf.state.loading');
|
|
699
|
+
t.bind(stateNode, localizedNode => { localizedNode.textContent = loadStatus === 'error' ? errorMessage() : t('pdf.state.loading'); }, 'textContent');
|
|
697
700
|
renderNavList();
|
|
698
701
|
};
|
|
699
702
|
const writeLegacyCompatiblePageDimensions = () => {
|
|
@@ -1549,7 +1552,7 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
1549
1552
|
var _a, _b;
|
|
1550
1553
|
const pdfDocument = pdfContext.document;
|
|
1551
1554
|
if (!pdfDocument) {
|
|
1552
|
-
throw
|
|
1555
|
+
throw t.error('pdf.error.notLoaded');
|
|
1553
1556
|
}
|
|
1554
1557
|
const page = await pdfDocument.getPage(Math.min(Math.max(pageNumber, 1), pdfDocument.numPages));
|
|
1555
1558
|
const viewport = page.getViewport({
|
|
@@ -1568,7 +1571,7 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
1568
1571
|
const count = ((_a = pdfContext.document) === null || _a === void 0 ? void 0 : _a.numPages) || 1;
|
|
1569
1572
|
for (let number = 1; number <= count; number += 1) {
|
|
1570
1573
|
if (destroyed)
|
|
1571
|
-
throw
|
|
1574
|
+
throw t.error('pdf.error.unloaded');
|
|
1572
1575
|
sizes.push(await getPdfPrintPageSize(number));
|
|
1573
1576
|
}
|
|
1574
1577
|
const size = sizes[0];
|
|
@@ -1583,12 +1586,12 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
1583
1586
|
var _a, _b;
|
|
1584
1587
|
const pdfDocument = pdfContext.document;
|
|
1585
1588
|
if (!pdfDocument) {
|
|
1586
|
-
throw
|
|
1589
|
+
throw t.error('pdf.error.notLoaded');
|
|
1587
1590
|
}
|
|
1588
1591
|
const pagesHtml = [];
|
|
1589
1592
|
for (let pageNumber = 1; pageNumber <= pdfDocument.numPages; pageNumber += 1) {
|
|
1590
1593
|
if (destroyed) {
|
|
1591
|
-
throw
|
|
1594
|
+
throw t.error('pdf.error.unloaded');
|
|
1592
1595
|
}
|
|
1593
1596
|
const page = await pdfDocument.getPage(pageNumber);
|
|
1594
1597
|
await ensurePdfPageCjkFontFallback(pageNumber, page);
|
|
@@ -1606,7 +1609,7 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
1606
1609
|
const canvas = documentRef.createElement('canvas');
|
|
1607
1610
|
const canvasContext = canvas.getContext('2d');
|
|
1608
1611
|
if (!canvasContext) {
|
|
1609
|
-
throw
|
|
1612
|
+
throw t.error('pdf.error.canvasUnavailable');
|
|
1610
1613
|
}
|
|
1611
1614
|
canvas.width = Math.ceil(renderViewport.width);
|
|
1612
1615
|
canvas.height = Math.ceil(renderViewport.height);
|
|
@@ -1634,7 +1637,7 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
1634
1637
|
pdfCjkFontFallbackPageLoads.clear();
|
|
1635
1638
|
pdfCjkFontFallbackRenderHandledPages.clear();
|
|
1636
1639
|
loadStatus = 'loading';
|
|
1637
|
-
errorMessage = '';
|
|
1640
|
+
errorMessage = () => '';
|
|
1638
1641
|
pdfContext.document = null;
|
|
1639
1642
|
outlineItems = [];
|
|
1640
1643
|
pdfThumbnails.clear();
|
|
@@ -1654,12 +1657,37 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
1654
1657
|
linkService: pdfLinkService,
|
|
1655
1658
|
updateMatchesCountOnProgress: true,
|
|
1656
1659
|
});
|
|
1660
|
+
void (activeL10n === null || activeL10n === void 0 ? void 0 : activeL10n.destroy());
|
|
1661
|
+
const fallbackL10n = new GenericL10n('');
|
|
1662
|
+
activeL10n = fallbackL10n;
|
|
1663
|
+
const bindPageRegions = (element) => {
|
|
1664
|
+
const selector = '[data-l10n-id="pdfjs-page-landmark"]';
|
|
1665
|
+
const pages = [...(element.matches(selector) ? [element] : []), ...element.querySelectorAll(selector)];
|
|
1666
|
+
for (const page of pages) {
|
|
1667
|
+
const number = Number(page.getAttribute('data-page-number'));
|
|
1668
|
+
if (!Number.isInteger(number) || number < 1)
|
|
1669
|
+
continue;
|
|
1670
|
+
page.removeAttribute('data-l10n-id');
|
|
1671
|
+
page.removeAttribute('data-l10n-args');
|
|
1672
|
+
t.attr(page, 'aria-label', 'pdf.nav.pageLabel', { page: number });
|
|
1673
|
+
}
|
|
1674
|
+
};
|
|
1675
|
+
const l10n = {
|
|
1676
|
+
getLanguage: () => resolveFileViewerLocale(context === null || context === void 0 ? void 0 : context.options),
|
|
1677
|
+
getDirection: () => 'ltr',
|
|
1678
|
+
get: fallbackL10n.get.bind(fallbackL10n),
|
|
1679
|
+
translate: async (element) => { bindPageRegions(element); await fallbackL10n.translate(element); },
|
|
1680
|
+
translateOnce: async (element) => { bindPageRegions(element); await fallbackL10n.translateOnce(element); },
|
|
1681
|
+
pause: () => fallbackL10n.pause(),
|
|
1682
|
+
resume: () => fallbackL10n.resume(),
|
|
1683
|
+
destroy: () => fallbackL10n.destroy(),
|
|
1684
|
+
};
|
|
1657
1685
|
const pdfViewer = new PDFViewer({
|
|
1658
1686
|
container,
|
|
1659
1687
|
eventBus,
|
|
1660
1688
|
linkService: pdfLinkService,
|
|
1661
1689
|
findController: pdfFindController,
|
|
1662
|
-
l10n
|
|
1690
|
+
l10n,
|
|
1663
1691
|
enableAutoLinking: false,
|
|
1664
1692
|
});
|
|
1665
1693
|
pdfContext.viewer = pdfViewer;
|
|
@@ -1671,6 +1699,7 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
1671
1699
|
eventBus.on('updatefindcontrolstate', handlePdfFindControlState);
|
|
1672
1700
|
eventBus.on('pagesinit', () => {
|
|
1673
1701
|
var _a;
|
|
1702
|
+
void l10n.translate(container);
|
|
1674
1703
|
applyRotation(currentRotation, 'rotation-change', 'viewer', false);
|
|
1675
1704
|
loadStatus = 'ready';
|
|
1676
1705
|
scheduleLegacyPageDimensionPatch();
|
|
@@ -1730,6 +1759,10 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
1730
1759
|
}
|
|
1731
1760
|
});
|
|
1732
1761
|
eventBus.on('pagerendered', ({ pageNumber }) => {
|
|
1762
|
+
var _a;
|
|
1763
|
+
const page = (_a = pdfViewer.getPageView(pageNumber - 1)) === null || _a === void 0 ? void 0 : _a.div;
|
|
1764
|
+
if (page)
|
|
1765
|
+
bindPageRegions(page);
|
|
1733
1766
|
scheduleLegacyPageDimensionPatch();
|
|
1734
1767
|
if (pdfBoundingBoxController.hasBoxes()) {
|
|
1735
1768
|
void pdfBoundingBoxController.render({ pageNumber, source: 'viewer' });
|
|
@@ -1759,7 +1792,7 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
1759
1792
|
});
|
|
1760
1793
|
});
|
|
1761
1794
|
if (!(context === null || context === void 0 ? void 0 : context.streamUrl) && !buffer.byteLength) {
|
|
1762
|
-
throw
|
|
1795
|
+
throw t.error('pdf.error.missingSource');
|
|
1763
1796
|
}
|
|
1764
1797
|
const pdfAssets = resolveFileViewerPdfAssetUrls(options, pdfRuntimeAssetBaseUrl);
|
|
1765
1798
|
if (cjkFontFallbackEnabled) {
|
|
@@ -1937,7 +1970,7 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
1937
1970
|
return;
|
|
1938
1971
|
}
|
|
1939
1972
|
loadStatus = 'error';
|
|
1940
|
-
errorMessage = error
|
|
1973
|
+
errorMessage = () => normalizeFileViewerErrorMessage(error, context === null || context === void 0 ? void 0 : context.options) || t('pdf.error.loadFailed');
|
|
1941
1974
|
syncUi();
|
|
1942
1975
|
}
|
|
1943
1976
|
};
|
|
@@ -2015,6 +2048,7 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
2015
2048
|
unmount() {
|
|
2016
2049
|
var _a, _b, _c, _d;
|
|
2017
2050
|
destroyed = true;
|
|
2051
|
+
t.release(root);
|
|
2018
2052
|
disposeReadingTheme();
|
|
2019
2053
|
disposeHandTool();
|
|
2020
2054
|
loadVersion += 1;
|
|
@@ -2035,6 +2069,8 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
2035
2069
|
unregisterFileViewerZoomProvider(root);
|
|
2036
2070
|
unregisterFileViewerViewStateProvider(root);
|
|
2037
2071
|
pdfBoundingBoxController.destroy();
|
|
2072
|
+
void (activeL10n === null || activeL10n === void 0 ? void 0 : activeL10n.destroy());
|
|
2073
|
+
activeL10n = undefined;
|
|
2038
2074
|
outlineItems = [];
|
|
2039
2075
|
(_a = context === null || context === void 0 ? void 0 : context.registerExportAdapter) === null || _a === void 0 ? void 0 : _a.call(context, null);
|
|
2040
2076
|
(_b = context === null || context === void 0 ? void 0 : context.registerThumbnailAdapter) === null || _b === void 0 ? void 0 : _b.call(context, null);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pdfAnnotationLayerStyle: string;
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
export const pdfAnnotationLayerStyle = String.raw `.annotationLayer{
|
|
2
|
+
--csstools-color-scheme--light:initial;
|
|
3
|
+
color-scheme:only light;
|
|
4
|
+
|
|
5
|
+
--annotation-unfocused-field-background:url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>");
|
|
6
|
+
--input-focus-border-color:Highlight;
|
|
7
|
+
--input-focus-outline:1px solid Canvas;
|
|
8
|
+
--input-unfocused-border-color:transparent;
|
|
9
|
+
--input-disabled-border-color:transparent;
|
|
10
|
+
--input-hover-border-color:black;
|
|
11
|
+
--link-outline:none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@media screen and (forced-colors: active){
|
|
15
|
+
|
|
16
|
+
.annotationLayer{
|
|
17
|
+
--input-focus-border-color:CanvasText;
|
|
18
|
+
--input-unfocused-border-color:ActiveText;
|
|
19
|
+
--input-disabled-border-color:GrayText;
|
|
20
|
+
--input-hover-border-color:Highlight;
|
|
21
|
+
--link-outline:1.5px solid LinkText;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.annotationLayer .textWidgetAnnotation :is(input,textarea):required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required{
|
|
25
|
+
outline:1.5px solid selectedItem;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.annotationLayer .linkAnnotation{
|
|
29
|
+
outline:var(--link-outline);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:is(.annotationLayer .linkAnnotation):hover{
|
|
33
|
+
-webkit-backdrop-filter:var(--hcm-highlight-filter);
|
|
34
|
+
backdrop-filter:var(--hcm-highlight-filter);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:is(.annotationLayer .linkAnnotation) > a:hover{
|
|
38
|
+
opacity:0 !important;
|
|
39
|
+
background:none !important;
|
|
40
|
+
box-shadow:none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.annotationLayer .popupAnnotation .popup{
|
|
44
|
+
outline:calc(1.5px * var(--total-scale-factor)) solid CanvasText !important;
|
|
45
|
+
background-color:ButtonFace !important;
|
|
46
|
+
color:ButtonText !important;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.annotationLayer .highlightArea:hover::after{
|
|
50
|
+
position:absolute;
|
|
51
|
+
top:0;
|
|
52
|
+
left:0;
|
|
53
|
+
width:100%;
|
|
54
|
+
height:100%;
|
|
55
|
+
-webkit-backdrop-filter:var(--hcm-highlight-filter);
|
|
56
|
+
backdrop-filter:var(--hcm-highlight-filter);
|
|
57
|
+
content:"";
|
|
58
|
+
pointer-events:none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.annotationLayer .popupAnnotation.focused .popup{
|
|
62
|
+
outline:calc(3px * var(--total-scale-factor)) solid Highlight !important;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.annotationLayer{
|
|
67
|
+
|
|
68
|
+
position:absolute;
|
|
69
|
+
top:0;
|
|
70
|
+
left:0;
|
|
71
|
+
pointer-events:none;
|
|
72
|
+
transform-origin:0 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.annotationLayer[data-main-rotation="90"] .norotate{
|
|
76
|
+
transform:rotate(270deg) translateX(-100%);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.annotationLayer[data-main-rotation="180"] .norotate{
|
|
80
|
+
transform:rotate(180deg) translate(-100%, -100%);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.annotationLayer[data-main-rotation="270"] .norotate{
|
|
84
|
+
transform:rotate(90deg) translateY(-100%);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.annotationLayer.disabled section,.annotationLayer.disabled .popup{
|
|
88
|
+
pointer-events:none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.annotationLayer .annotationContent{
|
|
92
|
+
position:absolute;
|
|
93
|
+
width:100%;
|
|
94
|
+
height:100%;
|
|
95
|
+
pointer-events:none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.freetext:is(.annotationLayer .annotationContent){
|
|
99
|
+
background:transparent;
|
|
100
|
+
border:none;
|
|
101
|
+
inset:0;
|
|
102
|
+
overflow:visible;
|
|
103
|
+
white-space:nowrap;
|
|
104
|
+
font:10px sans-serif;
|
|
105
|
+
line-height:1.35;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.annotationLayer section{
|
|
109
|
+
position:absolute;
|
|
110
|
+
text-align:initial;
|
|
111
|
+
pointer-events:auto;
|
|
112
|
+
box-sizing:border-box;
|
|
113
|
+
transform-origin:0 0;
|
|
114
|
+
-webkit-user-select:none;
|
|
115
|
+
-moz-user-select:none;
|
|
116
|
+
user-select:none;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
:is(.annotationLayer section):has(div.annotationContent) canvas.annotationContent{
|
|
120
|
+
display:none;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:is(.annotationLayer section) .overlaidText{
|
|
124
|
+
position:absolute;
|
|
125
|
+
top:0;
|
|
126
|
+
left:0;
|
|
127
|
+
width:0;
|
|
128
|
+
height:0;
|
|
129
|
+
display:inline-block;
|
|
130
|
+
overflow:hidden;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.textLayer.selecting ~ .annotationLayer section{
|
|
134
|
+
pointer-events:none;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton) > a{
|
|
138
|
+
position:absolute;
|
|
139
|
+
font-size:1em;
|
|
140
|
+
top:0;
|
|
141
|
+
left:0;
|
|
142
|
+
width:100%;
|
|
143
|
+
height:100%;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton):not(.hasBorder) > a:hover{
|
|
147
|
+
opacity:0.2;
|
|
148
|
+
background-color:rgb(255 255 0);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.annotationLayer .linkAnnotation.hasBorder:hover{
|
|
152
|
+
background-color:rgb(255 255 0 / 0.2);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.annotationLayer .hasBorder{
|
|
156
|
+
background-size:100% 100%;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.annotationLayer .textAnnotation img{
|
|
160
|
+
position:absolute;
|
|
161
|
+
cursor:pointer;
|
|
162
|
+
width:100%;
|
|
163
|
+
height:100%;
|
|
164
|
+
top:0;
|
|
165
|
+
left:0;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.annotationLayer .textWidgetAnnotation :is(input,textarea),.annotationLayer .choiceWidgetAnnotation select,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{
|
|
169
|
+
background-image:var(--annotation-unfocused-field-background);
|
|
170
|
+
border:2px solid var(--input-unfocused-border-color);
|
|
171
|
+
box-sizing:border-box;
|
|
172
|
+
font:calc(9px * var(--total-scale-factor)) sans-serif;
|
|
173
|
+
height:100%;
|
|
174
|
+
margin:0;
|
|
175
|
+
vertical-align:top;
|
|
176
|
+
width:100%;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.annotationLayer .textWidgetAnnotation :is(input,textarea):required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required{
|
|
180
|
+
outline:1.5px solid red;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.annotationLayer .choiceWidgetAnnotation select option{
|
|
184
|
+
padding:0;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.annotationLayer .buttonWidgetAnnotation.radioButton input{
|
|
188
|
+
border-radius:50%;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.annotationLayer .textWidgetAnnotation textarea{
|
|
192
|
+
resize:none;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.annotationLayer .textWidgetAnnotation [disabled]:is(input,textarea),.annotationLayer .choiceWidgetAnnotation select[disabled],.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input[disabled]{
|
|
196
|
+
background:none;
|
|
197
|
+
border:2px solid var(--input-disabled-border-color);
|
|
198
|
+
cursor:not-allowed;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.annotationLayer .textWidgetAnnotation :is(input,textarea):hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:hover{
|
|
202
|
+
border:2px solid var(--input-hover-border-color);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.annotationLayer .textWidgetAnnotation :is(input,textarea):hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation.checkBox input:hover{
|
|
206
|
+
border-radius:2px;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.annotationLayer .textWidgetAnnotation :is(input,textarea):focus,.annotationLayer .choiceWidgetAnnotation select:focus{
|
|
210
|
+
background:none;
|
|
211
|
+
border:2px solid var(--input-focus-border-color);
|
|
212
|
+
border-radius:2px;
|
|
213
|
+
outline:var(--input-focus-outline);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) :focus{
|
|
217
|
+
background-image:none;
|
|
218
|
+
background-color:transparent;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.annotationLayer .buttonWidgetAnnotation.checkBox :focus{
|
|
222
|
+
border:2px solid var(--input-focus-border-color);
|
|
223
|
+
border-radius:2px;
|
|
224
|
+
outline:var(--input-focus-outline);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.annotationLayer .buttonWidgetAnnotation.radioButton :focus{
|
|
228
|
+
border:2px solid var(--input-focus-border-color);
|
|
229
|
+
outline:var(--input-focus-outline);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after,.annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before{
|
|
233
|
+
background-color:CanvasText;
|
|
234
|
+
content:"";
|
|
235
|
+
display:block;
|
|
236
|
+
position:absolute;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after{
|
|
240
|
+
height:80%;
|
|
241
|
+
left:45%;
|
|
242
|
+
width:1px;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before{
|
|
246
|
+
transform:rotate(45deg);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after{
|
|
250
|
+
transform:rotate(-45deg);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before{
|
|
254
|
+
border-radius:50%;
|
|
255
|
+
height:50%;
|
|
256
|
+
left:25%;
|
|
257
|
+
top:25%;
|
|
258
|
+
width:50%;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.annotationLayer .textWidgetAnnotation input.comb{
|
|
262
|
+
font-family:monospace;
|
|
263
|
+
padding-left:2px;
|
|
264
|
+
padding-right:0;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.annotationLayer .textWidgetAnnotation input.comb:focus{
|
|
268
|
+
width:103%;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{
|
|
272
|
+
-webkit-appearance:none;
|
|
273
|
+
-moz-appearance:none;
|
|
274
|
+
appearance:none;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.annotationLayer .fileAttachmentAnnotation .popupTriggerArea{
|
|
278
|
+
height:100%;
|
|
279
|
+
width:100%;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.annotationLayer .popupAnnotation{
|
|
283
|
+
position:absolute;
|
|
284
|
+
font-size:calc(9px * var(--total-scale-factor));
|
|
285
|
+
pointer-events:none;
|
|
286
|
+
width:-moz-max-content;
|
|
287
|
+
width:max-content;
|
|
288
|
+
max-width:45%;
|
|
289
|
+
height:auto;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.annotationLayer .popup{
|
|
293
|
+
background-color:rgb(255 255 153);
|
|
294
|
+
color:black;
|
|
295
|
+
box-shadow:0 calc(2px * var(--total-scale-factor)) calc(5px * var(--total-scale-factor)) rgb(136 136 136);
|
|
296
|
+
border-radius:calc(2px * var(--total-scale-factor));
|
|
297
|
+
outline:1.5px solid rgb(255 255 74);
|
|
298
|
+
padding:calc(6px * var(--total-scale-factor));
|
|
299
|
+
cursor:pointer;
|
|
300
|
+
font:message-box;
|
|
301
|
+
white-space:normal;
|
|
302
|
+
word-wrap:break-word;
|
|
303
|
+
pointer-events:auto;
|
|
304
|
+
-webkit-user-select:text;
|
|
305
|
+
-moz-user-select:text;
|
|
306
|
+
user-select:text;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.annotationLayer .popupAnnotation.focused .popup{
|
|
310
|
+
outline-width:3px;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.annotationLayer .popup *{
|
|
314
|
+
font-size:calc(9px * var(--total-scale-factor));
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.annotationLayer .popup > .header{
|
|
318
|
+
display:inline-block;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.annotationLayer .popup > .header > .title{
|
|
322
|
+
display:inline;
|
|
323
|
+
font-weight:bold;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.annotationLayer .popup > .header .popupDate{
|
|
327
|
+
display:inline-block;
|
|
328
|
+
margin-left:calc(5px * var(--total-scale-factor));
|
|
329
|
+
width:-moz-fit-content;
|
|
330
|
+
width:fit-content;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.annotationLayer .popupContent{
|
|
334
|
+
border-top:1px solid rgb(51 51 51);
|
|
335
|
+
margin-top:calc(2px * var(--total-scale-factor));
|
|
336
|
+
padding-top:calc(2px * var(--total-scale-factor));
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.annotationLayer .richText > *{
|
|
340
|
+
white-space:pre-wrap;
|
|
341
|
+
font-size:calc(9px * var(--total-scale-factor));
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.annotationLayer .popupTriggerArea{
|
|
345
|
+
cursor:pointer;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
:is(.annotationLayer .popupTriggerArea):hover{
|
|
349
|
+
-webkit-backdrop-filter:var(--hcm-highlight-filter);
|
|
350
|
+
backdrop-filter:var(--hcm-highlight-filter);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.annotationLayer section svg{
|
|
354
|
+
position:absolute;
|
|
355
|
+
width:100%;
|
|
356
|
+
height:100%;
|
|
357
|
+
top:0;
|
|
358
|
+
left:0;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.annotationLayer .annotationTextContent{
|
|
362
|
+
position:absolute;
|
|
363
|
+
width:100%;
|
|
364
|
+
height:100%;
|
|
365
|
+
opacity:0;
|
|
366
|
+
color:transparent;
|
|
367
|
+
-webkit-user-select:none;
|
|
368
|
+
-moz-user-select:none;
|
|
369
|
+
user-select:none;
|
|
370
|
+
pointer-events:none;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
:is(.annotationLayer .annotationTextContent) span{
|
|
374
|
+
width:100%;
|
|
375
|
+
display:inline-block;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.annotationLayer svg.quadrilateralsContainer{
|
|
379
|
+
contain:strict;
|
|
380
|
+
width:0;
|
|
381
|
+
height:0;
|
|
382
|
+
position:absolute;
|
|
383
|
+
top:0;
|
|
384
|
+
left:0;
|
|
385
|
+
z-index:-1;
|
|
386
|
+
}
|
|
387
|
+
`;
|
package/dist/pdfStyles.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pdfViewerStyle = "/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.textLayer {\n color-scheme: only light;\n position: absolute;\n text-align: initial;\n inset: 0;\n overflow: clip;\n opacity: 1;\n line-height: 1;\n letter-spacing: normal;\n word-spacing: normal;\n -webkit-text-size-adjust: none;\n -moz-text-size-adjust: none;\n text-size-adjust: none;\n forced-color-adjust: none;\n transform-origin: 0 0;\n caret-color: CanvasText;\n z-index: 0;\n --min-font-size: 1;\n --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size));\n --min-font-size-inv: calc(1 / var(--min-font-size));\n}\n\n.textLayer.highlighting {\n touch-action: none;\n}\n\n.textLayer :is(span, br) {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n transform-origin: 0% 0%;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.textLayer > :not(.markedContent),\n.textLayer .markedContent span:not(.markedContent) {\n z-index: 1;\n --font-height: 0;\n font-size: calc(var(--text-scale-factor) * var(--font-height));\n --scale-x: 1;\n --rotate: 0deg;\n transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));\n}\n\n.textLayer .markedContent {\n display: contents;\n}\n\n.textLayer .markedContent.highlight {\n background: transparent;\n backdrop-filter: none;\n margin: 0;\n padding: 0;\n}\n\n.textLayer span[role='img'] {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n cursor: default;\n}\n\n.textLayer .highlight {\n --highlight-bg-color: rgb(180 0 170 / 0.25);\n --highlight-selected-bg-color: rgb(0 100 0 / 0.25);\n --highlight-backdrop-filter: none;\n --highlight-selected-backdrop-filter: none;\n margin: -1px;\n padding: 1px;\n background-color: var(--highlight-bg-color);\n backdrop-filter: var(--highlight-backdrop-filter);\n border-radius: 4px;\n}\n\n.textLayer .highlight.appended {\n position: initial;\n}\n\n.textLayer .highlight.begin {\n border-radius: 4px 0 0 4px;\n}\n\n.textLayer .highlight.end {\n border-radius: 0 4px 4px 0;\n}\n\n.textLayer .highlight.middle {\n border-radius: 0;\n}\n\n.textLayer .highlight.selected {\n background-color: var(--highlight-selected-bg-color);\n backdrop-filter: var(--highlight-selected-backdrop-filter);\n scroll-margin-top: 50px;\n}\n\n.textLayer ::-moz-selection {\n background: rgba(0, 0, 255, 0.25);\n background: color-mix(in srgb, AccentColor, transparent 75%);\n}\n\n.textLayer ::selection {\n background: rgba(0, 0, 255, 0.25);\n background: color-mix(in srgb, AccentColor, transparent 75%);\n}\n\n.textLayer br::-moz-selection {\n background: transparent;\n}\n\n.textLayer br::selection {\n background: transparent;\n}\n\n.textLayer .endOfContent {\n display: block;\n position: absolute;\n inset: 100% 0 0;\n z-index: 0;\n cursor: default;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.textLayer.selecting .endOfContent {\n top: 0;\n}\n\n.textLayerImages {\n position: absolute;\n inset: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.textLayerImages canvas {\n position: absolute;\n transform-origin: 0% 0%;\n}\n\n@media screen and (forced-colors: active) {\n .textLayer .highlight {\n --highlight-bg-color: transparent;\n --highlight-selected-bg-color: transparent;\n --highlight-backdrop-filter: var(--hcm-highlight-filter);\n --highlight-selected-backdrop-filter: var(--hcm-highlight-selected-filter);\n }\n}\n\n\n:root {\n --annotation-unfocused-field-background: url(\"data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>\");\n}\n\n@media (forced-colors: active) {\n .annotationLayer .textWidgetAnnotation input:required,\n .annotationLayer .textWidgetAnnotation textarea:required,\n .annotationLayer .choiceWidgetAnnotation select:required,\n .annotationLayer .buttonWidgetAnnotation.checkBox input:required,\n .annotationLayer .buttonWidgetAnnotation.radioButton input:required {\n outline: 1.5px solid selectedItem;\n }\n}\n\n.annotationLayer {\n position: absolute;\n top: 0;\n left: 0;\n pointer-events: none;\n transform-origin: 0 0;\n}\n\n.annotationLayer section {\n position: absolute;\n text-align: initial;\n pointer-events: auto;\n box-sizing: border-box;\n transform-origin: 0 0;\n}\n\n.annotationLayer .linkAnnotation > a,\n.annotationLayer .buttonWidgetAnnotation.pushButton > a {\n position: absolute;\n font-size: 1em;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.annotationLayer .buttonWidgetAnnotation.pushButton > canvas {\n width: 100%;\n height: 100%;\n}\n\n.annotationLayer .linkAnnotation > a:hover,\n.annotationLayer .buttonWidgetAnnotation.pushButton > a:hover {\n opacity: 0.2;\n background: rgba(255, 255, 0, 1);\n box-shadow: 0 2px 10px rgba(255, 255, 0, 1);\n}\n\n.annotationLayer .textAnnotation img {\n position: absolute;\n cursor: pointer;\n width: 100%;\n height: 100%;\n}\n\n.annotationLayer .textWidgetAnnotation input,\n.annotationLayer .textWidgetAnnotation textarea,\n.annotationLayer .choiceWidgetAnnotation select,\n.annotationLayer .buttonWidgetAnnotation.checkBox input,\n.annotationLayer .buttonWidgetAnnotation.radioButton input {\n background-image: var(--annotation-unfocused-field-background);\n border: 1px solid transparent;\n box-sizing: border-box;\n font: calc(9px * var(--scale-factor)) sans-serif;\n height: 100%;\n margin: 0;\n vertical-align: top;\n width: 100%;\n}\n\n.annotationLayer .textWidgetAnnotation input:required,\n.annotationLayer .textWidgetAnnotation textarea:required,\n.annotationLayer .choiceWidgetAnnotation select:required,\n.annotationLayer .buttonWidgetAnnotation.checkBox input:required,\n.annotationLayer .buttonWidgetAnnotation.radioButton input:required {\n outline: 1.5px solid red;\n}\n\n.annotationLayer .choiceWidgetAnnotation select option {\n padding: 0;\n}\n\n.annotationLayer .buttonWidgetAnnotation.radioButton input {\n border-radius: 50%;\n}\n\n.annotationLayer .textWidgetAnnotation textarea {\n resize: none;\n}\n\n.annotationLayer .textWidgetAnnotation input[disabled],\n.annotationLayer .textWidgetAnnotation textarea[disabled],\n.annotationLayer .choiceWidgetAnnotation select[disabled],\n.annotationLayer .buttonWidgetAnnotation.checkBox input[disabled],\n.annotationLayer .buttonWidgetAnnotation.radioButton input[disabled] {\n background: none;\n border: 1px solid transparent;\n cursor: not-allowed;\n}\n\n.annotationLayer .textWidgetAnnotation input:hover,\n.annotationLayer .textWidgetAnnotation textarea:hover,\n.annotationLayer .choiceWidgetAnnotation select:hover,\n.annotationLayer .buttonWidgetAnnotation.checkBox input:hover,\n.annotationLayer .buttonWidgetAnnotation.radioButton input:hover {\n border: 1px solid rgba(0, 0, 0, 1);\n}\n\n.annotationLayer .textWidgetAnnotation input:focus,\n.annotationLayer .textWidgetAnnotation textarea:focus,\n.annotationLayer .choiceWidgetAnnotation select:focus {\n background: none;\n border: 1px solid transparent;\n}\n\n.annotationLayer .textWidgetAnnotation input :focus,\n.annotationLayer .textWidgetAnnotation textarea :focus,\n.annotationLayer .choiceWidgetAnnotation select :focus,\n.annotationLayer .buttonWidgetAnnotation.checkBox :focus,\n.annotationLayer .buttonWidgetAnnotation.radioButton :focus {\n background-image: none;\n background-color: transparent;\n outline: auto;\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,\n.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {\n background-color: CanvasText;\n content: \"\";\n display: block;\n position: absolute;\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {\n height: 80%;\n left: 45%;\n width: 1px;\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before {\n transform: rotate(45deg);\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {\n transform: rotate(-45deg);\n}\n\n.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {\n border-radius: 50%;\n height: 50%;\n left: 30%;\n top: 20%;\n width: 50%;\n}\n\n.annotationLayer .textWidgetAnnotation input.comb {\n font-family: monospace;\n padding-left: 2px;\n padding-right: 0;\n}\n\n.annotationLayer .textWidgetAnnotation input.comb:focus {\n /*\n * Letter spacing is placed on the right side of each character. Hence, the\n * letter spacing of the last character may be placed outside the visible\n * area, causing horizontal scrolling. We avoid this by extending the width\n * when the element has focus and revert this when it loses focus.\n */\n width: 103%;\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input,\n.annotationLayer .buttonWidgetAnnotation.radioButton input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n\n.annotationLayer .popupTriggerArea {\n height: 100%;\n width: 100%;\n}\n\n.annotationLayer .popupWrapper {\n position: absolute;\n font-size: calc(9px * var(--scale-factor));\n width: 100%;\n min-width: calc(180px * var(--scale-factor));\n pointer-events: none;\n}\n\n.annotationLayer .popup {\n position: absolute;\n z-index: 200;\n max-width: calc(180px * var(--scale-factor));\n background-color: rgba(255, 255, 153, 1);\n box-shadow: 0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor))\n rgba(136, 136, 136, 1);\n border-radius: calc(2px * var(--scale-factor));\n padding: calc(6px * var(--scale-factor));\n margin-left: calc(5px * var(--scale-factor));\n cursor: pointer;\n font: message-box;\n white-space: normal;\n word-wrap: break-word;\n pointer-events: auto;\n}\n\n.annotationLayer .popup > * {\n font-size: calc(9px * var(--scale-factor));\n}\n\n.annotationLayer .popup h1 {\n display: inline-block;\n}\n\n.annotationLayer .popupDate {\n display: inline-block;\n margin-left: calc(5px * var(--scale-factor));\n}\n\n.annotationLayer .popupContent {\n border-top: 1px solid rgba(51, 51, 51, 1);\n margin-top: calc(2px * var(--scale-factor));\n padding-top: calc(2px * var(--scale-factor));\n}\n\n.annotationLayer .richText > * {\n white-space: pre-wrap;\n font-size: calc(9px * var(--scale-factor));\n}\n\n.annotationLayer .highlightAnnotation,\n.annotationLayer .underlineAnnotation,\n.annotationLayer .squigglyAnnotation,\n.annotationLayer .strikeoutAnnotation,\n.annotationLayer .freeTextAnnotation,\n.annotationLayer .lineAnnotation svg line,\n.annotationLayer .squareAnnotation svg rect,\n.annotationLayer .circleAnnotation svg ellipse,\n.annotationLayer .polylineAnnotation svg polyline,\n.annotationLayer .polygonAnnotation svg polygon,\n.annotationLayer .caretAnnotation,\n.annotationLayer .inkAnnotation svg polyline,\n.annotationLayer .stampAnnotation,\n.annotationLayer .fileAttachmentAnnotation {\n cursor: pointer;\n}\n\n.annotationLayer section svg {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n\n\n:root {\n --xfa-unfocused-field-background: url(\"data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>\");\n}\n\n@media (forced-colors: active) {\n .xfaLayer *:required {\n outline: 1.5px solid selectedItem;\n }\n}\n\n.xfaLayer .highlight {\n margin: -1px;\n padding: 1px;\n background-color: rgba(239, 203, 237, 1);\n border-radius: 4px;\n}\n\n.xfaLayer .highlight.appended {\n position: initial;\n}\n\n.xfaLayer .highlight.begin {\n border-radius: 4px 0 0 4px;\n}\n\n.xfaLayer .highlight.end {\n border-radius: 0 4px 4px 0;\n}\n\n.xfaLayer .highlight.middle {\n border-radius: 0;\n}\n\n.xfaLayer .highlight.selected {\n background-color: rgba(203, 223, 203, 1);\n}\n\n.xfaLayer ::-moz-selection {\n background: rgba(0, 0, 255, 1);\n}\n\n.xfaLayer ::selection {\n background: rgba(0, 0, 255, 1);\n}\n\n.xfaPage {\n overflow: hidden;\n position: relative;\n}\n\n.xfaContentarea {\n position: absolute;\n}\n\n.xfaPrintOnly {\n display: none;\n}\n\n.xfaLayer {\n position: absolute;\n text-align: initial;\n top: 0;\n left: 0;\n transform-origin: 0 0;\n line-height: 1.2;\n}\n\n.xfaLayer * {\n color: inherit;\n font: inherit;\n font-style: inherit;\n font-weight: inherit;\n font-kerning: inherit;\n letter-spacing: -0.01px;\n text-align: inherit;\n text-decoration: inherit;\n box-sizing: border-box;\n background-color: transparent;\n padding: 0;\n margin: 0;\n pointer-events: auto;\n line-height: inherit;\n}\n\n.xfaLayer *:required {\n outline: 1.5px solid red;\n}\n\n.xfaLayer div {\n pointer-events: none;\n}\n\n.xfaLayer svg {\n pointer-events: none;\n}\n\n.xfaLayer svg * {\n pointer-events: none;\n}\n\n.xfaLayer a {\n color: blue;\n}\n\n.xfaRich li {\n margin-left: 3em;\n}\n\n.xfaFont {\n color: black;\n font-weight: normal;\n font-kerning: none;\n font-size: 10px;\n font-style: normal;\n letter-spacing: 0;\n text-decoration: none;\n vertical-align: 0;\n}\n\n.xfaCaption {\n overflow: hidden;\n flex: 0 0 auto;\n}\n\n.xfaCaptionForCheckButton {\n overflow: hidden;\n flex: 1 1 auto;\n}\n\n.xfaLabel {\n height: 100%;\n width: 100%;\n}\n\n.xfaLeft {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.xfaRight {\n display: flex;\n flex-direction: row-reverse;\n align-items: center;\n}\n\n.xfaLeft > .xfaCaption,\n.xfaLeft > .xfaCaptionForCheckButton,\n.xfaRight > .xfaCaption,\n.xfaRight > .xfaCaptionForCheckButton {\n max-height: 100%;\n}\n\n.xfaTop {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n}\n\n.xfaBottom {\n display: flex;\n flex-direction: column-reverse;\n align-items: flex-start;\n}\n\n.xfaTop > .xfaCaption,\n.xfaTop > .xfaCaptionForCheckButton,\n.xfaBottom > .xfaCaption,\n.xfaBottom > .xfaCaptionForCheckButton {\n width: 100%;\n}\n\n.xfaBorder {\n background-color: transparent;\n position: absolute;\n pointer-events: none;\n}\n\n.xfaWrapped {\n width: 100%;\n height: 100%;\n}\n\n.xfaTextfield:focus,\n.xfaSelect:focus {\n background-image: none;\n background-color: transparent;\n outline: auto;\n outline-offset: -1px;\n}\n\n.xfaCheckbox:focus,\n.xfaRadio:focus {\n outline: auto;\n}\n\n.xfaTextfield,\n.xfaSelect {\n height: 100%;\n width: 100%;\n flex: 1 1 auto;\n border: none;\n resize: none;\n background-image: var(--xfa-unfocused-field-background);\n}\n\n.xfaTop > .xfaTextfield,\n.xfaTop > .xfaSelect,\n.xfaBottom > .xfaTextfield,\n.xfaBottom > .xfaSelect {\n flex: 0 1 auto;\n}\n\n.xfaButton {\n cursor: pointer;\n width: 100%;\n height: 100%;\n border: none;\n text-align: center;\n}\n\n.xfaLink {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.xfaCheckbox,\n.xfaRadio {\n width: 100%;\n height: 100%;\n flex: 0 0 auto;\n border: none;\n}\n\n.xfaRich {\n white-space: pre-wrap;\n width: 100%;\n height: 100%;\n}\n\n.xfaImage {\n -o-object-position: left top;\n object-position: left top;\n -o-object-fit: contain;\n object-fit: contain;\n width: 100%;\n height: 100%;\n}\n\n.xfaLrTb,\n.xfaRlTb,\n.xfaTb {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n\n.xfaLr {\n display: flex;\n flex-direction: row;\n align-items: stretch;\n}\n\n.xfaRl {\n display: flex;\n flex-direction: row-reverse;\n align-items: stretch;\n}\n\n.xfaTb > div {\n justify-content: left;\n}\n\n.xfaPosition {\n position: relative;\n}\n\n.xfaArea {\n position: relative;\n}\n\n.xfaValignMiddle {\n display: flex;\n align-items: center;\n}\n\n.xfaTable {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n\n.xfaTable .xfaRow {\n display: flex;\n flex-direction: row;\n align-items: stretch;\n}\n\n.xfaTable .xfaRlRow {\n display: flex;\n flex-direction: row-reverse;\n align-items: stretch;\n flex: 1;\n}\n\n.xfaTable .xfaRlRow > div {\n flex: 1;\n}\n\n.xfaNonInteractive input,\n.xfaNonInteractive textarea,\n.xfaDisabled input,\n.xfaDisabled textarea,\n.xfaReadOnly input,\n.xfaReadOnly textarea {\n background: initial;\n}\n\n@media print {\n .xfaTextfield,\n .xfaSelect {\n background: transparent;\n }\n\n .xfaSelect {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n text-indent: 1px;\n text-overflow: \"\";\n }\n}\n\n\n:root {\n --focus-outline: solid 2px red;\n --hover-outline: dashed 2px blue;\n --freetext-line-height: 1.35;\n --freetext-padding: 2px;\n}\n\n@media (forced-colors: active) {\n :root {\n --focus-outline: solid 3px ButtonText;\n --hover-outline: dashed 3px ButtonText;\n }\n}\n\n[data-editor-rotation=\"90\"] {\n transform: rotate(90deg);\n}\n[data-editor-rotation=\"180\"] {\n transform: rotate(180deg);\n}\n[data-editor-rotation=\"270\"] {\n transform: rotate(270deg);\n}\n\n.annotationEditorLayer {\n background: transparent;\n position: absolute;\n top: 0;\n left: 0;\n font-size: calc(100px * var(--scale-factor));\n transform-origin: 0 0;\n}\n\n.annotationEditorLayer .selectedEditor {\n outline: var(--focus-outline);\n resize: none;\n}\n\n.annotationEditorLayer .freeTextEditor {\n position: absolute;\n background: transparent;\n border-radius: 3px;\n padding: calc(var(--freetext-padding) * var(--scale-factor));\n resize: none;\n width: auto;\n height: auto;\n z-index: 1;\n transform-origin: 0 0;\n touch-action: none;\n}\n\n.annotationEditorLayer .freeTextEditor .internal {\n background: transparent;\n border: none;\n top: 0;\n left: 0;\n overflow: visible;\n white-space: nowrap;\n resize: none;\n font: 10px sans-serif;\n line-height: var(--freetext-line-height);\n}\n\n.annotationEditorLayer .freeTextEditor .overlay {\n position: absolute;\n display: none;\n background: transparent;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.annotationEditorLayer .freeTextEditor .overlay.enabled {\n display: block;\n}\n\n.annotationEditorLayer .freeTextEditor .internal:empty::before {\n content: attr(default-content);\n color: gray;\n}\n\n.annotationEditorLayer .freeTextEditor .internal:focus {\n outline: none;\n}\n\n.annotationEditorLayer .inkEditor.disabled {\n resize: none;\n}\n\n.annotationEditorLayer .inkEditor.disabled.selectedEditor {\n resize: horizontal;\n}\n\n.annotationEditorLayer .freeTextEditor:hover:not(.selectedEditor),\n.annotationEditorLayer .inkEditor:hover:not(.selectedEditor) {\n outline: var(--hover-outline);\n}\n\n.annotationEditorLayer .inkEditor {\n position: absolute;\n background: transparent;\n border-radius: 3px;\n overflow: auto;\n width: 100%;\n height: 100%;\n z-index: 1;\n transform-origin: 0 0;\n cursor: auto;\n}\n\n.annotationEditorLayer .inkEditor.editing {\n resize: none;\n cursor: var(--editorInk-editing-cursor), pointer;\n}\n\n.annotationEditorLayer .inkEditor .inkEditorCanvas {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n touch-action: none;\n}\n\n:root {\n --viewer-container-height: 0;\n --pdfViewer-padding-bottom: 0;\n --page-margin: 1px auto -8px;\n --page-border: 9px solid transparent;\n --page-border-image: url(images/shadow.png) 9 9 repeat;\n --spreadHorizontalWrapped-margin-LR: -3.5px;\n --scale-factor: 1;\n}\n\n@media screen and (forced-colors: active) {\n :root {\n --pdfViewer-padding-bottom: 9px;\n --page-margin: 8px auto -1px;\n --page-border: 1px solid CanvasText;\n --page-border-image: none;\n --spreadHorizontalWrapped-margin-LR: 3.5px;\n }\n}\n\n.pdfViewer,\n.pdfViewer *,\n.pdfViewer *::before,\n.pdfViewer *::after {\n box-sizing: content-box;\n}\n\n[data-main-rotation=\"90\"] {\n transform: rotate(90deg) translateY(-100%);\n}\n[data-main-rotation=\"180\"] {\n transform: rotate(180deg) translate(-100%, -100%);\n}\n[data-main-rotation=\"270\"] {\n transform: rotate(270deg) translateX(-100%);\n}\n\n.pdfViewer {\n padding-bottom: var(--pdfViewer-padding-bottom);\n}\n\n.pdfViewer .canvasWrapper {\n overflow: hidden;\n width: 100%;\n height: 100%;\n}\n\n.pdfViewer .page {\n --user-unit: 1;\n --total-scale-factor: calc(var(--scale-factor) * var(--user-unit));\n --scale-round-x: 1px;\n --scale-round-y: 1px;\n direction: ltr;\n width: 816px;\n height: 1056px;\n margin: var(--page-margin);\n position: relative;\n overflow: visible;\n border: var(--page-border);\n -o-border-image: var(--page-border-image);\n border-image: var(--page-border-image);\n background-clip: content-box;\n background-color: rgba(255, 255, 255, 1);\n}\n\n.pdfViewer .dummyPage {\n position: relative;\n width: 0;\n height: var(--viewer-container-height);\n}\n\n.pdfViewer.removePageBorders .page {\n margin: 0 auto 10px;\n border: none;\n}\n\n.pdfViewer.singlePageView {\n display: inline-block;\n}\n\n.pdfViewer.singlePageView .page {\n margin: 0;\n border: none;\n}\n\n.pdfViewer.scrollHorizontal,\n.pdfViewer.scrollWrapped,\n.spread {\n margin-left: 3.5px;\n margin-right: 3.5px;\n text-align: center;\n}\n\n.pdfViewer.scrollHorizontal,\n.spread {\n white-space: nowrap;\n}\n\n.pdfViewer.removePageBorders,\n.pdfViewer.scrollHorizontal .spread,\n.pdfViewer.scrollWrapped .spread {\n margin-left: 0;\n margin-right: 0;\n}\n\n.spread .page,\n.spread .dummyPage,\n.pdfViewer.scrollHorizontal .page,\n.pdfViewer.scrollWrapped .page,\n.pdfViewer.scrollHorizontal .spread,\n.pdfViewer.scrollWrapped .spread {\n display: inline-block;\n vertical-align: middle;\n}\n\n.spread .page,\n.pdfViewer.scrollHorizontal .page,\n.pdfViewer.scrollWrapped .page {\n margin-left: var(--spreadHorizontalWrapped-margin-LR);\n margin-right: var(--spreadHorizontalWrapped-margin-LR);\n}\n\n.pdfViewer.removePageBorders .spread .page,\n.pdfViewer.removePageBorders.scrollHorizontal .page,\n.pdfViewer.removePageBorders.scrollWrapped .page {\n margin-left: 5px;\n margin-right: 5px;\n}\n\n.pdfViewer .page canvas {\n position: absolute;\n top: 0;\n left: 0;\n margin: 0;\n display: block;\n width: 100%;\n height: 100%;\n contain: content;\n}\n\n.pdfViewer .page canvas[hidden] {\n display: none;\n}\n\n.pdfViewer .page .loadingIcon {\n position: absolute;\n display: block;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background: url(\"./images/loading-icon.gif\") center no-repeat;\n}\n.pdfViewer .page .loadingIcon.notVisible {\n background: none;\n}\n\n.pdfViewer.enablePermissions .textLayer span {\n -webkit-user-select: none !important;\n -moz-user-select: none !important;\n user-select: none !important;\n cursor: not-allowed;\n}\n\n.pdfPresentationMode .pdfViewer {\n padding-bottom: 0;\n}\n\n.pdfPresentationMode .spread {\n margin: 0;\n}\n\n.pdfPresentationMode .pdfViewer .page {\n margin: 0 auto;\n border: 2px solid transparent;\n}\n\n\n.pdf-shell {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 0;\n color: #1f2937;\n background: #edf2f7;\n}\n\n.pdf-toolbar {\n z-index: 2;\n display: flex;\n align-items: center;\n gap: 10px;\n min-height: 48px;\n padding: 6px 12px;\n border-bottom: 1px solid #d7dee8;\n background: #ffffff;\n box-shadow: 0 1px 4px rgb(15 23 42 / 8%);\n}\n\n.pdf-toolbar-group {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 36px;\n padding: 0 6px;\n border: 1px solid #dde5ef;\n border-radius: 8px;\n background: #f8fafc;\n}\n\n.pdf-toolbar-group--zoom {\n margin-left: auto;\n}\n\n.pdf-toolbar-group--rotate {\n flex-shrink: 0;\n}\n\n.pdf-icon-button,\n.pdf-scale-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 30px;\n border: 1px solid transparent;\n border-radius: 6px;\n color: #334155;\n background: transparent;\n font: inherit;\n line-height: 1;\n cursor: pointer;\n transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;\n}\n\n.pdf-icon-button {\n width: 30px;\n font-size: 18px;\n}\n\n.pdf-scale-button {\n width: 64px;\n font-size: 13px;\n font-weight: 600;\n}\n\n.pdf-icon-button:hover:not(:disabled),\n.pdf-scale-button:hover {\n border-color: #b9c8d8;\n color: #1769d8;\n background: #edf5ff;\n}\n\n.pdf-icon-button:disabled {\n color: #a8b3c0;\n cursor: not-allowed;\n}\n\n.pdf-icon-button--active {\n border-color: #9ac2ff;\n color: #1769d8;\n background: #e7f1ff;\n}\n\n.pdf-panel-icon {\n position: relative;\n display: block;\n width: 16px;\n height: 14px;\n border: 2px solid currentColor;\n border-radius: 3px;\n}\n\n.pdf-panel-icon::before {\n position: absolute;\n top: -2px;\n bottom: -2px;\n left: 4px;\n width: 2px;\n background: currentColor;\n content: '';\n}\n\n.pdf-page-meter {\n display: inline-flex;\n align-items: baseline;\n justify-content: center;\n min-width: 72px;\n gap: 3px;\n font-size: 13px;\n color: #64748b;\n white-space: nowrap;\n}\n\n.pdf-page-meter strong {\n color: #1e293b;\n font-size: 14px;\n}\n\n.pdf-rotation-meter {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 42px;\n color: #64748b;\n font-size: 13px;\n font-weight: 700;\n white-space: nowrap;\n}\n\n.pdf-content {\n position: relative;\n display: grid;\n grid-template-columns: clamp(148px, 22%, 220px) minmax(0, 1fr);\n flex: 1;\n min-height: 0;\n}\n\n.pdf-shell--nav-hidden .pdf-content {\n grid-template-columns: minmax(0, 1fr);\n}\n\n.pdf-nav-pane {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n overflow: hidden;\n border-right: 1px solid #d7dee8;\n background: #f8fafc;\n}\n\n.pdf-nav-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 44px;\n padding: 0 12px;\n border-bottom: 1px solid #e3e9f1;\n color: #475569;\n font-size: 13px;\n}\n\n.pdf-nav-head strong {\n color: #1e293b;\n font-size: 12px;\n}\n\n.pdf-nav-tabs {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 4px;\n padding: 8px;\n border-bottom: 1px solid #e3e9f1;\n background: #f8fafc;\n}\n\n.pdf-nav-tabs button {\n min-width: 0;\n height: 30px;\n border: 1px solid transparent;\n border-radius: 6px;\n color: #64748b;\n background: transparent;\n font: inherit;\n font-size: 12px;\n font-weight: 700;\n cursor: pointer;\n}\n\n.pdf-nav-tabs button:hover,\n.pdf-nav-tabs button.active {\n border-color: #b9d4f6;\n color: #1769d8;\n background: #edf5ff;\n}\n\n.pdf-page-list {\n flex: 1;\n min-height: 0;\n display: grid;\n align-content: start;\n gap: 8px;\n padding: 10px;\n overflow-y: auto;\n}\n\n.pdf-page-button {\n display: grid;\n grid-template-columns: 42px minmax(0, 1fr);\n align-items: center;\n gap: 10px;\n width: 100%;\n min-height: 54px;\n padding: 6px 8px;\n border: 1px solid #dce4ee;\n border-radius: 8px;\n color: #334155;\n background: #ffffff;\n cursor: pointer;\n text-align: left;\n transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;\n}\n\n.pdf-page-button:hover {\n border-color: #a9c5ea;\n background: #f3f8ff;\n}\n\n.pdf-page-button--active {\n border-color: #408fff;\n background: #eaf3ff;\n box-shadow: inset 3px 0 0 #408fff;\n}\n\n.pdf-page-thumb {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 42px;\n border: 1px solid #d6e1ee;\n border-radius: 4px;\n color: #1769d8;\n background: linear-gradient(180deg, #ffffff 0%, #edf5ff 100%);\n font-size: 12px;\n font-weight: 700;\n}\n\n.pdf-page-label {\n min-width: 0;\n overflow: hidden;\n font-size: 13px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.pdf-outline-list {\n flex: 1;\n min-height: 0;\n display: grid;\n align-content: start;\n gap: 4px;\n padding: 8px;\n overflow-y: auto;\n}\n\n.pdf-outline-button {\n --outline-depth: 0;\n display: grid;\n grid-template-columns: 16px minmax(0, 1fr);\n align-items: center;\n gap: 6px;\n width: 100%;\n min-height: 32px;\n padding: 5px 7px 5px calc(7px + var(--outline-depth) * 14px);\n border: 1px solid transparent;\n border-radius: 6px;\n color: #334155;\n background: transparent;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.pdf-outline-button:hover {\n border-color: #c7d7eb;\n background: #ffffff;\n}\n\n.pdf-outline-toggle {\n position: relative;\n width: 14px;\n height: 14px;\n border-radius: 4px;\n color: #64748b;\n}\n\n.pdf-outline-toggle::before {\n position: absolute;\n top: 3px;\n left: 4px;\n width: 6px;\n height: 6px;\n border-right: 2px solid currentColor;\n border-bottom: 2px solid currentColor;\n content: '';\n transform: rotate(-45deg);\n transition: transform 0.16s ease;\n}\n\n.pdf-outline-toggle--open::before {\n transform: rotate(45deg);\n}\n\n.pdf-outline-toggle--empty::before {\n display: none;\n}\n\n.pdf-outline-title {\n min-width: 0;\n overflow: hidden;\n font-size: 12px;\n line-height: 1.35;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.pdf-outline-empty {\n margin: 24px 8px;\n padding: 14px 10px;\n border: 1px dashed #cbd5e1;\n border-radius: 8px;\n color: #64748b;\n background: #ffffff;\n font-size: 12px;\n text-align: center;\n}\n\n.pdfViewer {\n margin: 0 auto;\n padding: 18px 14px 28px;\n}\n\n.pdf-viewport {\n position: relative;\n width: 100%;\n height: 100%;\n min-width: 0;\n min-height: 0;\n}\n\n.pdf-wrapper {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n overflow: auto;\n background: #e8edf4;\n}\n\n.pdf-state {\n position: absolute;\n top: 50%;\n left: 50%;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 168px;\n min-height: 42px;\n padding: 0 16px;\n border: 1px solid #d7dee8;\n border-radius: 8px;\n color: #475569;\n background: #ffffff;\n box-shadow: 0 10px 30px rgb(15 23 42 / 12%);\n transform: translate(-50%, -50%);\n}\n\n.pdf-state--error {\n max-width: min(460px, calc(100% - 32px));\n color: #b42318;\n text-align: center;\n}\n\n@media (max-width: 720px) {\n .pdf-toolbar {\n flex-wrap: wrap;\n min-height: 88px;\n align-content: center;\n }\n\n .pdf-toolbar-group--zoom {\n margin-left: 0;\n }\n\n .pdf-content,\n .pdf-shell--nav-hidden .pdf-content {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .pdf-nav-pane {\n position: absolute;\n z-index: 3;\n top: 0;\n bottom: 0;\n left: 0;\n width: min(78vw, 240px);\n box-shadow: 10px 0 24px rgb(15 23 42 / 14%);\n }\n}\n";
|
|
1
|
+
export declare const pdfViewerStyle: string;
|
package/dist/pdfStyles.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export const pdfViewerStyle = "/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.textLayer {\n color-scheme: only light;\n position: absolute;\n text-align: initial;\n inset: 0;\n overflow: clip;\n opacity: 1;\n line-height: 1;\n letter-spacing: normal;\n word-spacing: normal;\n -webkit-text-size-adjust: none;\n -moz-text-size-adjust: none;\n text-size-adjust: none;\n forced-color-adjust: none;\n transform-origin: 0 0;\n caret-color: CanvasText;\n z-index: 0;\n --min-font-size: 1;\n --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size));\n --min-font-size-inv: calc(1 / var(--min-font-size));\n}\n\n.textLayer.highlighting {\n touch-action: none;\n}\n\n.textLayer :is(span, br) {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n transform-origin: 0% 0%;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.textLayer > :not(.markedContent),\n.textLayer .markedContent span:not(.markedContent) {\n z-index: 1;\n --font-height: 0;\n font-size: calc(var(--text-scale-factor) * var(--font-height));\n --scale-x: 1;\n --rotate: 0deg;\n transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));\n}\n\n.textLayer .markedContent {\n display: contents;\n}\n\n.textLayer .markedContent.highlight {\n background: transparent;\n backdrop-filter: none;\n margin: 0;\n padding: 0;\n}\n\n.textLayer span[role='img'] {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n cursor: default;\n}\n\n.textLayer .highlight {\n --highlight-bg-color: rgb(180 0 170 / 0.25);\n --highlight-selected-bg-color: rgb(0 100 0 / 0.25);\n --highlight-backdrop-filter: none;\n --highlight-selected-backdrop-filter: none;\n margin: -1px;\n padding: 1px;\n background-color: var(--highlight-bg-color);\n backdrop-filter: var(--highlight-backdrop-filter);\n border-radius: 4px;\n}\n\n.textLayer .highlight.appended {\n position: initial;\n}\n\n.textLayer .highlight.begin {\n border-radius: 4px 0 0 4px;\n}\n\n.textLayer .highlight.end {\n border-radius: 0 4px 4px 0;\n}\n\n.textLayer .highlight.middle {\n border-radius: 0;\n}\n\n.textLayer .highlight.selected {\n background-color: var(--highlight-selected-bg-color);\n backdrop-filter: var(--highlight-selected-backdrop-filter);\n scroll-margin-top: 50px;\n}\n\n.textLayer ::-moz-selection {\n background: rgba(0, 0, 255, 0.25);\n background: color-mix(in srgb, AccentColor, transparent 75%);\n}\n\n.textLayer ::selection {\n background: rgba(0, 0, 255, 0.25);\n background: color-mix(in srgb, AccentColor, transparent 75%);\n}\n\n.textLayer br::-moz-selection {\n background: transparent;\n}\n\n.textLayer br::selection {\n background: transparent;\n}\n\n.textLayer .endOfContent {\n display: block;\n position: absolute;\n inset: 100% 0 0;\n z-index: 0;\n cursor: default;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.textLayer.selecting .endOfContent {\n top: 0;\n}\n\n.textLayerImages {\n position: absolute;\n inset: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.textLayerImages canvas {\n position: absolute;\n transform-origin: 0% 0%;\n}\n\n@media screen and (forced-colors: active) {\n .textLayer .highlight {\n --highlight-bg-color: transparent;\n --highlight-selected-bg-color: transparent;\n --highlight-backdrop-filter: var(--hcm-highlight-filter);\n --highlight-selected-backdrop-filter: var(--hcm-highlight-selected-filter);\n }\n}\n\n\n:root {\n --annotation-unfocused-field-background: url(\"data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>\");\n}\n\n@media (forced-colors: active) {\n .annotationLayer .textWidgetAnnotation input:required,\n .annotationLayer .textWidgetAnnotation textarea:required,\n .annotationLayer .choiceWidgetAnnotation select:required,\n .annotationLayer .buttonWidgetAnnotation.checkBox input:required,\n .annotationLayer .buttonWidgetAnnotation.radioButton input:required {\n outline: 1.5px solid selectedItem;\n }\n}\n\n.annotationLayer {\n position: absolute;\n top: 0;\n left: 0;\n pointer-events: none;\n transform-origin: 0 0;\n}\n\n.annotationLayer section {\n position: absolute;\n text-align: initial;\n pointer-events: auto;\n box-sizing: border-box;\n transform-origin: 0 0;\n}\n\n.annotationLayer .linkAnnotation > a,\n.annotationLayer .buttonWidgetAnnotation.pushButton > a {\n position: absolute;\n font-size: 1em;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.annotationLayer .buttonWidgetAnnotation.pushButton > canvas {\n width: 100%;\n height: 100%;\n}\n\n.annotationLayer .linkAnnotation > a:hover,\n.annotationLayer .buttonWidgetAnnotation.pushButton > a:hover {\n opacity: 0.2;\n background: rgba(255, 255, 0, 1);\n box-shadow: 0 2px 10px rgba(255, 255, 0, 1);\n}\n\n.annotationLayer .textAnnotation img {\n position: absolute;\n cursor: pointer;\n width: 100%;\n height: 100%;\n}\n\n.annotationLayer .textWidgetAnnotation input,\n.annotationLayer .textWidgetAnnotation textarea,\n.annotationLayer .choiceWidgetAnnotation select,\n.annotationLayer .buttonWidgetAnnotation.checkBox input,\n.annotationLayer .buttonWidgetAnnotation.radioButton input {\n background-image: var(--annotation-unfocused-field-background);\n border: 1px solid transparent;\n box-sizing: border-box;\n font: calc(9px * var(--scale-factor)) sans-serif;\n height: 100%;\n margin: 0;\n vertical-align: top;\n width: 100%;\n}\n\n.annotationLayer .textWidgetAnnotation input:required,\n.annotationLayer .textWidgetAnnotation textarea:required,\n.annotationLayer .choiceWidgetAnnotation select:required,\n.annotationLayer .buttonWidgetAnnotation.checkBox input:required,\n.annotationLayer .buttonWidgetAnnotation.radioButton input:required {\n outline: 1.5px solid red;\n}\n\n.annotationLayer .choiceWidgetAnnotation select option {\n padding: 0;\n}\n\n.annotationLayer .buttonWidgetAnnotation.radioButton input {\n border-radius: 50%;\n}\n\n.annotationLayer .textWidgetAnnotation textarea {\n resize: none;\n}\n\n.annotationLayer .textWidgetAnnotation input[disabled],\n.annotationLayer .textWidgetAnnotation textarea[disabled],\n.annotationLayer .choiceWidgetAnnotation select[disabled],\n.annotationLayer .buttonWidgetAnnotation.checkBox input[disabled],\n.annotationLayer .buttonWidgetAnnotation.radioButton input[disabled] {\n background: none;\n border: 1px solid transparent;\n cursor: not-allowed;\n}\n\n.annotationLayer .textWidgetAnnotation input:hover,\n.annotationLayer .textWidgetAnnotation textarea:hover,\n.annotationLayer .choiceWidgetAnnotation select:hover,\n.annotationLayer .buttonWidgetAnnotation.checkBox input:hover,\n.annotationLayer .buttonWidgetAnnotation.radioButton input:hover {\n border: 1px solid rgba(0, 0, 0, 1);\n}\n\n.annotationLayer .textWidgetAnnotation input:focus,\n.annotationLayer .textWidgetAnnotation textarea:focus,\n.annotationLayer .choiceWidgetAnnotation select:focus {\n background: none;\n border: 1px solid transparent;\n}\n\n.annotationLayer .textWidgetAnnotation input :focus,\n.annotationLayer .textWidgetAnnotation textarea :focus,\n.annotationLayer .choiceWidgetAnnotation select :focus,\n.annotationLayer .buttonWidgetAnnotation.checkBox :focus,\n.annotationLayer .buttonWidgetAnnotation.radioButton :focus {\n background-image: none;\n background-color: transparent;\n outline: auto;\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,\n.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {\n background-color: CanvasText;\n content: \"\";\n display: block;\n position: absolute;\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {\n height: 80%;\n left: 45%;\n width: 1px;\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before {\n transform: rotate(45deg);\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {\n transform: rotate(-45deg);\n}\n\n.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {\n border-radius: 50%;\n height: 50%;\n left: 30%;\n top: 20%;\n width: 50%;\n}\n\n.annotationLayer .textWidgetAnnotation input.comb {\n font-family: monospace;\n padding-left: 2px;\n padding-right: 0;\n}\n\n.annotationLayer .textWidgetAnnotation input.comb:focus {\n /*\n * Letter spacing is placed on the right side of each character. Hence, the\n * letter spacing of the last character may be placed outside the visible\n * area, causing horizontal scrolling. We avoid this by extending the width\n * when the element has focus and revert this when it loses focus.\n */\n width: 103%;\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input,\n.annotationLayer .buttonWidgetAnnotation.radioButton input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n\n.annotationLayer .popupTriggerArea {\n height: 100%;\n width: 100%;\n}\n\n.annotationLayer .popupWrapper {\n position: absolute;\n font-size: calc(9px * var(--scale-factor));\n width: 100%;\n min-width: calc(180px * var(--scale-factor));\n pointer-events: none;\n}\n\n.annotationLayer .popup {\n position: absolute;\n z-index: 200;\n max-width: calc(180px * var(--scale-factor));\n background-color: rgba(255, 255, 153, 1);\n box-shadow: 0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor))\n rgba(136, 136, 136, 1);\n border-radius: calc(2px * var(--scale-factor));\n padding: calc(6px * var(--scale-factor));\n margin-left: calc(5px * var(--scale-factor));\n cursor: pointer;\n font: message-box;\n white-space: normal;\n word-wrap: break-word;\n pointer-events: auto;\n}\n\n.annotationLayer .popup > * {\n font-size: calc(9px * var(--scale-factor));\n}\n\n.annotationLayer .popup h1 {\n display: inline-block;\n}\n\n.annotationLayer .popupDate {\n display: inline-block;\n margin-left: calc(5px * var(--scale-factor));\n}\n\n.annotationLayer .popupContent {\n border-top: 1px solid rgba(51, 51, 51, 1);\n margin-top: calc(2px * var(--scale-factor));\n padding-top: calc(2px * var(--scale-factor));\n}\n\n.annotationLayer .richText > * {\n white-space: pre-wrap;\n font-size: calc(9px * var(--scale-factor));\n}\n\n.annotationLayer .highlightAnnotation,\n.annotationLayer .underlineAnnotation,\n.annotationLayer .squigglyAnnotation,\n.annotationLayer .strikeoutAnnotation,\n.annotationLayer .freeTextAnnotation,\n.annotationLayer .lineAnnotation svg line,\n.annotationLayer .squareAnnotation svg rect,\n.annotationLayer .circleAnnotation svg ellipse,\n.annotationLayer .polylineAnnotation svg polyline,\n.annotationLayer .polygonAnnotation svg polygon,\n.annotationLayer .caretAnnotation,\n.annotationLayer .inkAnnotation svg polyline,\n.annotationLayer .stampAnnotation,\n.annotationLayer .fileAttachmentAnnotation {\n cursor: pointer;\n}\n\n.annotationLayer section svg {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n\n\n:root {\n --xfa-unfocused-field-background: url(\"data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>\");\n}\n\n@media (forced-colors: active) {\n .xfaLayer *:required {\n outline: 1.5px solid selectedItem;\n }\n}\n\n.xfaLayer .highlight {\n margin: -1px;\n padding: 1px;\n background-color: rgba(239, 203, 237, 1);\n border-radius: 4px;\n}\n\n.xfaLayer .highlight.appended {\n position: initial;\n}\n\n.xfaLayer .highlight.begin {\n border-radius: 4px 0 0 4px;\n}\n\n.xfaLayer .highlight.end {\n border-radius: 0 4px 4px 0;\n}\n\n.xfaLayer .highlight.middle {\n border-radius: 0;\n}\n\n.xfaLayer .highlight.selected {\n background-color: rgba(203, 223, 203, 1);\n}\n\n.xfaLayer ::-moz-selection {\n background: rgba(0, 0, 255, 1);\n}\n\n.xfaLayer ::selection {\n background: rgba(0, 0, 255, 1);\n}\n\n.xfaPage {\n overflow: hidden;\n position: relative;\n}\n\n.xfaContentarea {\n position: absolute;\n}\n\n.xfaPrintOnly {\n display: none;\n}\n\n.xfaLayer {\n position: absolute;\n text-align: initial;\n top: 0;\n left: 0;\n transform-origin: 0 0;\n line-height: 1.2;\n}\n\n.xfaLayer * {\n color: inherit;\n font: inherit;\n font-style: inherit;\n font-weight: inherit;\n font-kerning: inherit;\n letter-spacing: -0.01px;\n text-align: inherit;\n text-decoration: inherit;\n box-sizing: border-box;\n background-color: transparent;\n padding: 0;\n margin: 0;\n pointer-events: auto;\n line-height: inherit;\n}\n\n.xfaLayer *:required {\n outline: 1.5px solid red;\n}\n\n.xfaLayer div {\n pointer-events: none;\n}\n\n.xfaLayer svg {\n pointer-events: none;\n}\n\n.xfaLayer svg * {\n pointer-events: none;\n}\n\n.xfaLayer a {\n color: blue;\n}\n\n.xfaRich li {\n margin-left: 3em;\n}\n\n.xfaFont {\n color: black;\n font-weight: normal;\n font-kerning: none;\n font-size: 10px;\n font-style: normal;\n letter-spacing: 0;\n text-decoration: none;\n vertical-align: 0;\n}\n\n.xfaCaption {\n overflow: hidden;\n flex: 0 0 auto;\n}\n\n.xfaCaptionForCheckButton {\n overflow: hidden;\n flex: 1 1 auto;\n}\n\n.xfaLabel {\n height: 100%;\n width: 100%;\n}\n\n.xfaLeft {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.xfaRight {\n display: flex;\n flex-direction: row-reverse;\n align-items: center;\n}\n\n.xfaLeft > .xfaCaption,\n.xfaLeft > .xfaCaptionForCheckButton,\n.xfaRight > .xfaCaption,\n.xfaRight > .xfaCaptionForCheckButton {\n max-height: 100%;\n}\n\n.xfaTop {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n}\n\n.xfaBottom {\n display: flex;\n flex-direction: column-reverse;\n align-items: flex-start;\n}\n\n.xfaTop > .xfaCaption,\n.xfaTop > .xfaCaptionForCheckButton,\n.xfaBottom > .xfaCaption,\n.xfaBottom > .xfaCaptionForCheckButton {\n width: 100%;\n}\n\n.xfaBorder {\n background-color: transparent;\n position: absolute;\n pointer-events: none;\n}\n\n.xfaWrapped {\n width: 100%;\n height: 100%;\n}\n\n.xfaTextfield:focus,\n.xfaSelect:focus {\n background-image: none;\n background-color: transparent;\n outline: auto;\n outline-offset: -1px;\n}\n\n.xfaCheckbox:focus,\n.xfaRadio:focus {\n outline: auto;\n}\n\n.xfaTextfield,\n.xfaSelect {\n height: 100%;\n width: 100%;\n flex: 1 1 auto;\n border: none;\n resize: none;\n background-image: var(--xfa-unfocused-field-background);\n}\n\n.xfaTop > .xfaTextfield,\n.xfaTop > .xfaSelect,\n.xfaBottom > .xfaTextfield,\n.xfaBottom > .xfaSelect {\n flex: 0 1 auto;\n}\n\n.xfaButton {\n cursor: pointer;\n width: 100%;\n height: 100%;\n border: none;\n text-align: center;\n}\n\n.xfaLink {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.xfaCheckbox,\n.xfaRadio {\n width: 100%;\n height: 100%;\n flex: 0 0 auto;\n border: none;\n}\n\n.xfaRich {\n white-space: pre-wrap;\n width: 100%;\n height: 100%;\n}\n\n.xfaImage {\n -o-object-position: left top;\n object-position: left top;\n -o-object-fit: contain;\n object-fit: contain;\n width: 100%;\n height: 100%;\n}\n\n.xfaLrTb,\n.xfaRlTb,\n.xfaTb {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n\n.xfaLr {\n display: flex;\n flex-direction: row;\n align-items: stretch;\n}\n\n.xfaRl {\n display: flex;\n flex-direction: row-reverse;\n align-items: stretch;\n}\n\n.xfaTb > div {\n justify-content: left;\n}\n\n.xfaPosition {\n position: relative;\n}\n\n.xfaArea {\n position: relative;\n}\n\n.xfaValignMiddle {\n display: flex;\n align-items: center;\n}\n\n.xfaTable {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n\n.xfaTable .xfaRow {\n display: flex;\n flex-direction: row;\n align-items: stretch;\n}\n\n.xfaTable .xfaRlRow {\n display: flex;\n flex-direction: row-reverse;\n align-items: stretch;\n flex: 1;\n}\n\n.xfaTable .xfaRlRow > div {\n flex: 1;\n}\n\n.xfaNonInteractive input,\n.xfaNonInteractive textarea,\n.xfaDisabled input,\n.xfaDisabled textarea,\n.xfaReadOnly input,\n.xfaReadOnly textarea {\n background: initial;\n}\n\n@media print {\n .xfaTextfield,\n .xfaSelect {\n background: transparent;\n }\n\n .xfaSelect {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n text-indent: 1px;\n text-overflow: \"\";\n }\n}\n\n\n:root {\n --focus-outline: solid 2px red;\n --hover-outline: dashed 2px blue;\n --freetext-line-height: 1.35;\n --freetext-padding: 2px;\n}\n\n@media (forced-colors: active) {\n :root {\n --focus-outline: solid 3px ButtonText;\n --hover-outline: dashed 3px ButtonText;\n }\n}\n\n[data-editor-rotation=\"90\"] {\n transform: rotate(90deg);\n}\n[data-editor-rotation=\"180\"] {\n transform: rotate(180deg);\n}\n[data-editor-rotation=\"270\"] {\n transform: rotate(270deg);\n}\n\n.annotationEditorLayer {\n background: transparent;\n position: absolute;\n top: 0;\n left: 0;\n font-size: calc(100px * var(--scale-factor));\n transform-origin: 0 0;\n}\n\n.annotationEditorLayer .selectedEditor {\n outline: var(--focus-outline);\n resize: none;\n}\n\n.annotationEditorLayer .freeTextEditor {\n position: absolute;\n background: transparent;\n border-radius: 3px;\n padding: calc(var(--freetext-padding) * var(--scale-factor));\n resize: none;\n width: auto;\n height: auto;\n z-index: 1;\n transform-origin: 0 0;\n touch-action: none;\n}\n\n.annotationEditorLayer .freeTextEditor .internal {\n background: transparent;\n border: none;\n top: 0;\n left: 0;\n overflow: visible;\n white-space: nowrap;\n resize: none;\n font: 10px sans-serif;\n line-height: var(--freetext-line-height);\n}\n\n.annotationEditorLayer .freeTextEditor .overlay {\n position: absolute;\n display: none;\n background: transparent;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.annotationEditorLayer .freeTextEditor .overlay.enabled {\n display: block;\n}\n\n.annotationEditorLayer .freeTextEditor .internal:empty::before {\n content: attr(default-content);\n color: gray;\n}\n\n.annotationEditorLayer .freeTextEditor .internal:focus {\n outline: none;\n}\n\n.annotationEditorLayer .inkEditor.disabled {\n resize: none;\n}\n\n.annotationEditorLayer .inkEditor.disabled.selectedEditor {\n resize: horizontal;\n}\n\n.annotationEditorLayer .freeTextEditor:hover:not(.selectedEditor),\n.annotationEditorLayer .inkEditor:hover:not(.selectedEditor) {\n outline: var(--hover-outline);\n}\n\n.annotationEditorLayer .inkEditor {\n position: absolute;\n background: transparent;\n border-radius: 3px;\n overflow: auto;\n width: 100%;\n height: 100%;\n z-index: 1;\n transform-origin: 0 0;\n cursor: auto;\n}\n\n.annotationEditorLayer .inkEditor.editing {\n resize: none;\n cursor: var(--editorInk-editing-cursor), pointer;\n}\n\n.annotationEditorLayer .inkEditor .inkEditorCanvas {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n touch-action: none;\n}\n\n:root {\n --viewer-container-height: 0;\n --pdfViewer-padding-bottom: 0;\n --page-margin: 1px auto -8px;\n --page-border: 9px solid transparent;\n --page-border-image: url(images/shadow.png) 9 9 repeat;\n --spreadHorizontalWrapped-margin-LR: -3.5px;\n --scale-factor: 1;\n}\n\n@media screen and (forced-colors: active) {\n :root {\n --pdfViewer-padding-bottom: 9px;\n --page-margin: 8px auto -1px;\n --page-border: 1px solid CanvasText;\n --page-border-image: none;\n --spreadHorizontalWrapped-margin-LR: 3.5px;\n }\n}\n\n.pdfViewer,\n.pdfViewer *,\n.pdfViewer *::before,\n.pdfViewer *::after {\n box-sizing: content-box;\n}\n\n[data-main-rotation=\"90\"] {\n transform: rotate(90deg) translateY(-100%);\n}\n[data-main-rotation=\"180\"] {\n transform: rotate(180deg) translate(-100%, -100%);\n}\n[data-main-rotation=\"270\"] {\n transform: rotate(270deg) translateX(-100%);\n}\n\n.pdfViewer {\n padding-bottom: var(--pdfViewer-padding-bottom);\n}\n\n.pdfViewer .canvasWrapper {\n overflow: hidden;\n width: 100%;\n height: 100%;\n}\n\n.pdfViewer .page {\n --user-unit: 1;\n --total-scale-factor: calc(var(--scale-factor) * var(--user-unit));\n --scale-round-x: 1px;\n --scale-round-y: 1px;\n direction: ltr;\n width: 816px;\n height: 1056px;\n margin: var(--page-margin);\n position: relative;\n overflow: visible;\n border: var(--page-border);\n -o-border-image: var(--page-border-image);\n border-image: var(--page-border-image);\n background-clip: content-box;\n background-color: rgba(255, 255, 255, 1);\n}\n\n.pdfViewer .dummyPage {\n position: relative;\n width: 0;\n height: var(--viewer-container-height);\n}\n\n.pdfViewer.removePageBorders .page {\n margin: 0 auto 10px;\n border: none;\n}\n\n.pdfViewer.singlePageView {\n display: inline-block;\n}\n\n.pdfViewer.singlePageView .page {\n margin: 0;\n border: none;\n}\n\n.pdfViewer.scrollHorizontal,\n.pdfViewer.scrollWrapped,\n.spread {\n margin-left: 3.5px;\n margin-right: 3.5px;\n text-align: center;\n}\n\n.pdfViewer.scrollHorizontal,\n.spread {\n white-space: nowrap;\n}\n\n.pdfViewer.removePageBorders,\n.pdfViewer.scrollHorizontal .spread,\n.pdfViewer.scrollWrapped .spread {\n margin-left: 0;\n margin-right: 0;\n}\n\n.spread .page,\n.spread .dummyPage,\n.pdfViewer.scrollHorizontal .page,\n.pdfViewer.scrollWrapped .page,\n.pdfViewer.scrollHorizontal .spread,\n.pdfViewer.scrollWrapped .spread {\n display: inline-block;\n vertical-align: middle;\n}\n\n.spread .page,\n.pdfViewer.scrollHorizontal .page,\n.pdfViewer.scrollWrapped .page {\n margin-left: var(--spreadHorizontalWrapped-margin-LR);\n margin-right: var(--spreadHorizontalWrapped-margin-LR);\n}\n\n.pdfViewer.removePageBorders .spread .page,\n.pdfViewer.removePageBorders.scrollHorizontal .page,\n.pdfViewer.removePageBorders.scrollWrapped .page {\n margin-left: 5px;\n margin-right: 5px;\n}\n\n.pdfViewer .page canvas {\n position: absolute;\n top: 0;\n left: 0;\n margin: 0;\n display: block;\n width: 100%;\n height: 100%;\n contain: content;\n}\n\n.pdfViewer .page canvas[hidden] {\n display: none;\n}\n\n.pdfViewer .page .loadingIcon {\n position: absolute;\n display: block;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background: url(\"./images/loading-icon.gif\") center no-repeat;\n}\n.pdfViewer .page .loadingIcon.notVisible {\n background: none;\n}\n\n.pdfViewer.enablePermissions .textLayer span {\n -webkit-user-select: none !important;\n -moz-user-select: none !important;\n user-select: none !important;\n cursor: not-allowed;\n}\n\n.pdfPresentationMode .pdfViewer {\n padding-bottom: 0;\n}\n\n.pdfPresentationMode .spread {\n margin: 0;\n}\n\n.pdfPresentationMode .pdfViewer .page {\n margin: 0 auto;\n border: 2px solid transparent;\n}\n\n\n.pdf-shell {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 0;\n color: #1f2937;\n background: #edf2f7;\n}\n\n.pdf-toolbar {\n z-index: 2;\n display: flex;\n align-items: center;\n gap: 10px;\n min-height: 48px;\n padding: 6px 12px;\n border-bottom: 1px solid #d7dee8;\n background: #ffffff;\n box-shadow: 0 1px 4px rgb(15 23 42 / 8%);\n}\n\n.pdf-toolbar-group {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 36px;\n padding: 0 6px;\n border: 1px solid #dde5ef;\n border-radius: 8px;\n background: #f8fafc;\n}\n\n.pdf-toolbar-group--zoom {\n margin-left: auto;\n}\n\n.pdf-toolbar-group--rotate {\n flex-shrink: 0;\n}\n\n.pdf-icon-button,\n.pdf-scale-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 30px;\n border: 1px solid transparent;\n border-radius: 6px;\n color: #334155;\n background: transparent;\n font: inherit;\n line-height: 1;\n cursor: pointer;\n transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;\n}\n\n.pdf-icon-button {\n width: 30px;\n font-size: 18px;\n}\n\n.pdf-scale-button {\n width: 64px;\n font-size: 13px;\n font-weight: 600;\n}\n\n.pdf-icon-button:hover:not(:disabled),\n.pdf-scale-button:hover {\n border-color: #b9c8d8;\n color: #1769d8;\n background: #edf5ff;\n}\n\n.pdf-icon-button:disabled {\n color: #a8b3c0;\n cursor: not-allowed;\n}\n\n.pdf-icon-button--active {\n border-color: #9ac2ff;\n color: #1769d8;\n background: #e7f1ff;\n}\n\n.pdf-panel-icon {\n position: relative;\n display: block;\n width: 16px;\n height: 14px;\n border: 2px solid currentColor;\n border-radius: 3px;\n}\n\n.pdf-panel-icon::before {\n position: absolute;\n top: -2px;\n bottom: -2px;\n left: 4px;\n width: 2px;\n background: currentColor;\n content: '';\n}\n\n.pdf-page-meter {\n display: inline-flex;\n align-items: baseline;\n justify-content: center;\n min-width: 72px;\n gap: 3px;\n font-size: 13px;\n color: #64748b;\n white-space: nowrap;\n}\n\n.pdf-page-meter strong {\n color: #1e293b;\n font-size: 14px;\n}\n\n.pdf-rotation-meter {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 42px;\n color: #64748b;\n font-size: 13px;\n font-weight: 700;\n white-space: nowrap;\n}\n\n.pdf-content {\n position: relative;\n display: grid;\n grid-template-columns: clamp(148px, 22%, 220px) minmax(0, 1fr);\n flex: 1;\n min-height: 0;\n}\n\n.pdf-shell--nav-hidden .pdf-content {\n grid-template-columns: minmax(0, 1fr);\n}\n\n.pdf-nav-pane {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n overflow: hidden;\n border-right: 1px solid #d7dee8;\n background: #f8fafc;\n}\n\n.pdf-nav-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 44px;\n padding: 0 12px;\n border-bottom: 1px solid #e3e9f1;\n color: #475569;\n font-size: 13px;\n}\n\n.pdf-nav-head strong {\n color: #1e293b;\n font-size: 12px;\n}\n\n.pdf-nav-tabs {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 4px;\n padding: 8px;\n border-bottom: 1px solid #e3e9f1;\n background: #f8fafc;\n}\n\n.pdf-nav-tabs button {\n min-width: 0;\n height: 30px;\n border: 1px solid transparent;\n border-radius: 6px;\n color: #64748b;\n background: transparent;\n font: inherit;\n font-size: 12px;\n font-weight: 700;\n cursor: pointer;\n}\n\n.pdf-nav-tabs button:hover,\n.pdf-nav-tabs button.active {\n border-color: #b9d4f6;\n color: #1769d8;\n background: #edf5ff;\n}\n\n.pdf-page-list {\n flex: 1;\n min-height: 0;\n display: grid;\n align-content: start;\n gap: 8px;\n padding: 10px;\n overflow-y: auto;\n}\n\n.pdf-page-button {\n display: grid;\n grid-template-columns: 42px minmax(0, 1fr);\n align-items: center;\n gap: 10px;\n width: 100%;\n min-height: 54px;\n padding: 6px 8px;\n border: 1px solid #dce4ee;\n border-radius: 8px;\n color: #334155;\n background: #ffffff;\n cursor: pointer;\n text-align: left;\n transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;\n}\n\n.pdf-page-button:hover {\n border-color: #a9c5ea;\n background: #f3f8ff;\n}\n\n.pdf-page-button--active {\n border-color: #408fff;\n background: #eaf3ff;\n box-shadow: inset 3px 0 0 #408fff;\n}\n\n.pdf-page-thumb {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 42px;\n border: 1px solid #d6e1ee;\n border-radius: 4px;\n color: #1769d8;\n background: linear-gradient(180deg, #ffffff 0%, #edf5ff 100%);\n font-size: 12px;\n font-weight: 700;\n}\n\n.pdf-page-label {\n min-width: 0;\n overflow: hidden;\n font-size: 13px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.pdf-outline-list {\n flex: 1;\n min-height: 0;\n display: grid;\n align-content: start;\n gap: 4px;\n padding: 8px;\n overflow-y: auto;\n}\n\n.pdf-outline-button {\n --outline-depth: 0;\n display: grid;\n grid-template-columns: 16px minmax(0, 1fr);\n align-items: center;\n gap: 6px;\n width: 100%;\n min-height: 32px;\n padding: 5px 7px 5px calc(7px + var(--outline-depth) * 14px);\n border: 1px solid transparent;\n border-radius: 6px;\n color: #334155;\n background: transparent;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.pdf-outline-button:hover {\n border-color: #c7d7eb;\n background: #ffffff;\n}\n\n.pdf-outline-toggle {\n position: relative;\n width: 14px;\n height: 14px;\n border-radius: 4px;\n color: #64748b;\n}\n\n.pdf-outline-toggle::before {\n position: absolute;\n top: 3px;\n left: 4px;\n width: 6px;\n height: 6px;\n border-right: 2px solid currentColor;\n border-bottom: 2px solid currentColor;\n content: '';\n transform: rotate(-45deg);\n transition: transform 0.16s ease;\n}\n\n.pdf-outline-toggle--open::before {\n transform: rotate(45deg);\n}\n\n.pdf-outline-toggle--empty::before {\n display: none;\n}\n\n.pdf-outline-title {\n min-width: 0;\n overflow: hidden;\n font-size: 12px;\n line-height: 1.35;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.pdf-outline-empty {\n margin: 24px 8px;\n padding: 14px 10px;\n border: 1px dashed #cbd5e1;\n border-radius: 8px;\n color: #64748b;\n background: #ffffff;\n font-size: 12px;\n text-align: center;\n}\n\n.pdfViewer {\n margin: 0 auto;\n padding: 18px 14px 28px;\n}\n\n.pdf-viewport {\n position: relative;\n width: 100%;\n height: 100%;\n min-width: 0;\n min-height: 0;\n}\n\n.pdf-wrapper {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n overflow: auto;\n background: #e8edf4;\n}\n\n.pdf-state {\n position: absolute;\n top: 50%;\n left: 50%;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 168px;\n min-height: 42px;\n padding: 0 16px;\n border: 1px solid #d7dee8;\n border-radius: 8px;\n color: #475569;\n background: #ffffff;\n box-shadow: 0 10px 30px rgb(15 23 42 / 12%);\n transform: translate(-50%, -50%);\n}\n\n.pdf-state--error {\n max-width: min(460px, calc(100% - 32px));\n color: #b42318;\n text-align: center;\n}\n\n@media (max-width: 720px) {\n .pdf-toolbar {\n flex-wrap: wrap;\n min-height: 88px;\n align-content: center;\n }\n\n .pdf-toolbar-group--zoom {\n margin-left: 0;\n }\n\n .pdf-content,\n .pdf-shell--nav-hidden .pdf-content {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .pdf-nav-pane {\n position: absolute;\n z-index: 3;\n top: 0;\n bottom: 0;\n left: 0;\n width: min(78vw, 240px);\n box-shadow: 10px 0 24px rgb(15 23 42 / 14%);\n }\n}\n";
|
|
1
|
+
import { pdfAnnotationLayerStyle } from './pdfAnnotationStyles.js';
|
|
2
|
+
export const pdfViewerStyle = "/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.textLayer {\n color-scheme: only light;\n position: absolute;\n text-align: initial;\n inset: 0;\n overflow: clip;\n opacity: 1;\n line-height: 1;\n letter-spacing: normal;\n word-spacing: normal;\n -webkit-text-size-adjust: none;\n -moz-text-size-adjust: none;\n text-size-adjust: none;\n forced-color-adjust: none;\n transform-origin: 0 0;\n caret-color: CanvasText;\n z-index: 0;\n --min-font-size: 1;\n --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size));\n --min-font-size-inv: calc(1 / var(--min-font-size));\n}\n\n.textLayer.highlighting {\n touch-action: none;\n}\n\n.textLayer :is(span, br) {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n transform-origin: 0% 0%;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.textLayer > :not(.markedContent),\n.textLayer .markedContent span:not(.markedContent) {\n z-index: 1;\n --font-height: 0;\n font-size: calc(var(--text-scale-factor) * var(--font-height));\n --scale-x: 1;\n --rotate: 0deg;\n transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));\n}\n\n.textLayer .markedContent {\n display: contents;\n}\n\n.textLayer .markedContent.highlight {\n background: transparent;\n backdrop-filter: none;\n margin: 0;\n padding: 0;\n}\n\n.textLayer span[role='img'] {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n cursor: default;\n}\n\n.textLayer .highlight {\n --highlight-bg-color: rgb(180 0 170 / 0.25);\n --highlight-selected-bg-color: rgb(0 100 0 / 0.25);\n --highlight-backdrop-filter: none;\n --highlight-selected-backdrop-filter: none;\n margin: -1px;\n padding: 1px;\n background-color: var(--highlight-bg-color);\n backdrop-filter: var(--highlight-backdrop-filter);\n border-radius: 4px;\n}\n\n.textLayer .highlight.appended {\n position: initial;\n}\n\n.textLayer .highlight.begin {\n border-radius: 4px 0 0 4px;\n}\n\n.textLayer .highlight.end {\n border-radius: 0 4px 4px 0;\n}\n\n.textLayer .highlight.middle {\n border-radius: 0;\n}\n\n.textLayer .highlight.selected {\n background-color: var(--highlight-selected-bg-color);\n backdrop-filter: var(--highlight-selected-backdrop-filter);\n scroll-margin-top: 50px;\n}\n\n.textLayer ::-moz-selection {\n background: rgba(0, 0, 255, 0.25);\n background: color-mix(in srgb, AccentColor, transparent 75%);\n}\n\n.textLayer ::selection {\n background: rgba(0, 0, 255, 0.25);\n background: color-mix(in srgb, AccentColor, transparent 75%);\n}\n\n.textLayer br::-moz-selection {\n background: transparent;\n}\n\n.textLayer br::selection {\n background: transparent;\n}\n\n.textLayer .endOfContent {\n display: block;\n position: absolute;\n inset: 100% 0 0;\n z-index: 0;\n cursor: default;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.textLayer.selecting .endOfContent {\n top: 0;\n}\n\n.textLayerImages {\n position: absolute;\n inset: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.textLayerImages canvas {\n position: absolute;\n transform-origin: 0% 0%;\n}\n\n@media screen and (forced-colors: active) {\n .textLayer .highlight {\n --highlight-bg-color: transparent;\n --highlight-selected-bg-color: transparent;\n --highlight-backdrop-filter: var(--hcm-highlight-filter);\n --highlight-selected-backdrop-filter: var(--hcm-highlight-selected-filter);\n }\n}\n\n\n" + pdfAnnotationLayerStyle + ":root {\n --xfa-unfocused-field-background: url(\"data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>\");\n}\n\n@media (forced-colors: active) {\n .xfaLayer *:required {\n outline: 1.5px solid selectedItem;\n }\n}\n\n.xfaLayer .highlight {\n margin: -1px;\n padding: 1px;\n background-color: rgba(239, 203, 237, 1);\n border-radius: 4px;\n}\n\n.xfaLayer .highlight.appended {\n position: initial;\n}\n\n.xfaLayer .highlight.begin {\n border-radius: 4px 0 0 4px;\n}\n\n.xfaLayer .highlight.end {\n border-radius: 0 4px 4px 0;\n}\n\n.xfaLayer .highlight.middle {\n border-radius: 0;\n}\n\n.xfaLayer .highlight.selected {\n background-color: rgba(203, 223, 203, 1);\n}\n\n.xfaLayer ::-moz-selection {\n background: rgba(0, 0, 255, 1);\n}\n\n.xfaLayer ::selection {\n background: rgba(0, 0, 255, 1);\n}\n\n.xfaPage {\n overflow: hidden;\n position: relative;\n}\n\n.xfaContentarea {\n position: absolute;\n}\n\n.xfaPrintOnly {\n display: none;\n}\n\n.xfaLayer {\n position: absolute;\n text-align: initial;\n top: 0;\n left: 0;\n transform-origin: 0 0;\n line-height: 1.2;\n}\n\n.xfaLayer * {\n color: inherit;\n font: inherit;\n font-style: inherit;\n font-weight: inherit;\n font-kerning: inherit;\n letter-spacing: -0.01px;\n text-align: inherit;\n text-decoration: inherit;\n box-sizing: border-box;\n background-color: transparent;\n padding: 0;\n margin: 0;\n pointer-events: auto;\n line-height: inherit;\n}\n\n.xfaLayer *:required {\n outline: 1.5px solid red;\n}\n\n.xfaLayer div {\n pointer-events: none;\n}\n\n.xfaLayer svg {\n pointer-events: none;\n}\n\n.xfaLayer svg * {\n pointer-events: none;\n}\n\n.xfaLayer a {\n color: blue;\n}\n\n.xfaRich li {\n margin-left: 3em;\n}\n\n.xfaFont {\n color: black;\n font-weight: normal;\n font-kerning: none;\n font-size: 10px;\n font-style: normal;\n letter-spacing: 0;\n text-decoration: none;\n vertical-align: 0;\n}\n\n.xfaCaption {\n overflow: hidden;\n flex: 0 0 auto;\n}\n\n.xfaCaptionForCheckButton {\n overflow: hidden;\n flex: 1 1 auto;\n}\n\n.xfaLabel {\n height: 100%;\n width: 100%;\n}\n\n.xfaLeft {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.xfaRight {\n display: flex;\n flex-direction: row-reverse;\n align-items: center;\n}\n\n.xfaLeft > .xfaCaption,\n.xfaLeft > .xfaCaptionForCheckButton,\n.xfaRight > .xfaCaption,\n.xfaRight > .xfaCaptionForCheckButton {\n max-height: 100%;\n}\n\n.xfaTop {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n}\n\n.xfaBottom {\n display: flex;\n flex-direction: column-reverse;\n align-items: flex-start;\n}\n\n.xfaTop > .xfaCaption,\n.xfaTop > .xfaCaptionForCheckButton,\n.xfaBottom > .xfaCaption,\n.xfaBottom > .xfaCaptionForCheckButton {\n width: 100%;\n}\n\n.xfaBorder {\n background-color: transparent;\n position: absolute;\n pointer-events: none;\n}\n\n.xfaWrapped {\n width: 100%;\n height: 100%;\n}\n\n.xfaTextfield:focus,\n.xfaSelect:focus {\n background-image: none;\n background-color: transparent;\n outline: auto;\n outline-offset: -1px;\n}\n\n.xfaCheckbox:focus,\n.xfaRadio:focus {\n outline: auto;\n}\n\n.xfaTextfield,\n.xfaSelect {\n height: 100%;\n width: 100%;\n flex: 1 1 auto;\n border: none;\n resize: none;\n background-image: var(--xfa-unfocused-field-background);\n}\n\n.xfaTop > .xfaTextfield,\n.xfaTop > .xfaSelect,\n.xfaBottom > .xfaTextfield,\n.xfaBottom > .xfaSelect {\n flex: 0 1 auto;\n}\n\n.xfaButton {\n cursor: pointer;\n width: 100%;\n height: 100%;\n border: none;\n text-align: center;\n}\n\n.xfaLink {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.xfaCheckbox,\n.xfaRadio {\n width: 100%;\n height: 100%;\n flex: 0 0 auto;\n border: none;\n}\n\n.xfaRich {\n white-space: pre-wrap;\n width: 100%;\n height: 100%;\n}\n\n.xfaImage {\n -o-object-position: left top;\n object-position: left top;\n -o-object-fit: contain;\n object-fit: contain;\n width: 100%;\n height: 100%;\n}\n\n.xfaLrTb,\n.xfaRlTb,\n.xfaTb {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n\n.xfaLr {\n display: flex;\n flex-direction: row;\n align-items: stretch;\n}\n\n.xfaRl {\n display: flex;\n flex-direction: row-reverse;\n align-items: stretch;\n}\n\n.xfaTb > div {\n justify-content: left;\n}\n\n.xfaPosition {\n position: relative;\n}\n\n.xfaArea {\n position: relative;\n}\n\n.xfaValignMiddle {\n display: flex;\n align-items: center;\n}\n\n.xfaTable {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n\n.xfaTable .xfaRow {\n display: flex;\n flex-direction: row;\n align-items: stretch;\n}\n\n.xfaTable .xfaRlRow {\n display: flex;\n flex-direction: row-reverse;\n align-items: stretch;\n flex: 1;\n}\n\n.xfaTable .xfaRlRow > div {\n flex: 1;\n}\n\n.xfaNonInteractive input,\n.xfaNonInteractive textarea,\n.xfaDisabled input,\n.xfaDisabled textarea,\n.xfaReadOnly input,\n.xfaReadOnly textarea {\n background: initial;\n}\n\n@media print {\n .xfaTextfield,\n .xfaSelect {\n background: transparent;\n }\n\n .xfaSelect {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n text-indent: 1px;\n text-overflow: \"\";\n }\n}\n\n\n:root {\n --focus-outline: solid 2px red;\n --hover-outline: dashed 2px blue;\n --freetext-line-height: 1.35;\n --freetext-padding: 2px;\n}\n\n@media (forced-colors: active) {\n :root {\n --focus-outline: solid 3px ButtonText;\n --hover-outline: dashed 3px ButtonText;\n }\n}\n\n[data-editor-rotation=\"90\"] {\n transform: rotate(90deg);\n}\n[data-editor-rotation=\"180\"] {\n transform: rotate(180deg);\n}\n[data-editor-rotation=\"270\"] {\n transform: rotate(270deg);\n}\n\n.annotationEditorLayer {\n background: transparent;\n position: absolute;\n top: 0;\n left: 0;\n font-size: calc(100px * var(--scale-factor));\n transform-origin: 0 0;\n}\n\n.annotationEditorLayer .selectedEditor {\n outline: var(--focus-outline);\n resize: none;\n}\n\n.annotationEditorLayer .freeTextEditor {\n position: absolute;\n background: transparent;\n border-radius: 3px;\n padding: calc(var(--freetext-padding) * var(--scale-factor));\n resize: none;\n width: auto;\n height: auto;\n z-index: 1;\n transform-origin: 0 0;\n touch-action: none;\n}\n\n.annotationEditorLayer .freeTextEditor .internal {\n background: transparent;\n border: none;\n top: 0;\n left: 0;\n overflow: visible;\n white-space: nowrap;\n resize: none;\n font: 10px sans-serif;\n line-height: var(--freetext-line-height);\n}\n\n.annotationEditorLayer .freeTextEditor .overlay {\n position: absolute;\n display: none;\n background: transparent;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.annotationEditorLayer .freeTextEditor .overlay.enabled {\n display: block;\n}\n\n.annotationEditorLayer .freeTextEditor .internal:empty::before {\n content: attr(default-content);\n color: gray;\n}\n\n.annotationEditorLayer .freeTextEditor .internal:focus {\n outline: none;\n}\n\n.annotationEditorLayer .inkEditor.disabled {\n resize: none;\n}\n\n.annotationEditorLayer .inkEditor.disabled.selectedEditor {\n resize: horizontal;\n}\n\n.annotationEditorLayer .freeTextEditor:hover:not(.selectedEditor),\n.annotationEditorLayer .inkEditor:hover:not(.selectedEditor) {\n outline: var(--hover-outline);\n}\n\n.annotationEditorLayer .inkEditor {\n position: absolute;\n background: transparent;\n border-radius: 3px;\n overflow: auto;\n width: 100%;\n height: 100%;\n z-index: 1;\n transform-origin: 0 0;\n cursor: auto;\n}\n\n.annotationEditorLayer .inkEditor.editing {\n resize: none;\n cursor: var(--editorInk-editing-cursor), pointer;\n}\n\n.annotationEditorLayer .inkEditor .inkEditorCanvas {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n touch-action: none;\n}\n\n:root {\n --viewer-container-height: 0;\n --pdfViewer-padding-bottom: 0;\n --page-margin: 1px auto -8px;\n --page-border: 9px solid transparent;\n --page-border-image: url(images/shadow.png) 9 9 repeat;\n --spreadHorizontalWrapped-margin-LR: -3.5px;\n --scale-factor: 1;\n}\n\n@media screen and (forced-colors: active) {\n :root {\n --pdfViewer-padding-bottom: 9px;\n --page-margin: 8px auto -1px;\n --page-border: 1px solid CanvasText;\n --page-border-image: none;\n --spreadHorizontalWrapped-margin-LR: 3.5px;\n }\n}\n\n.pdfViewer,\n.pdfViewer *,\n.pdfViewer *::before,\n.pdfViewer *::after {\n box-sizing: content-box;\n}\n\n[data-main-rotation=\"90\"] {\n transform: rotate(90deg) translateY(-100%);\n}\n[data-main-rotation=\"180\"] {\n transform: rotate(180deg) translate(-100%, -100%);\n}\n[data-main-rotation=\"270\"] {\n transform: rotate(270deg) translateX(-100%);\n}\n\n.pdfViewer {\n padding-bottom: var(--pdfViewer-padding-bottom);\n}\n\n.pdfViewer .canvasWrapper {\n overflow: hidden;\n width: 100%;\n height: 100%;\n}\n\n.pdfViewer .page {\n --user-unit: 1;\n --total-scale-factor: calc(var(--scale-factor) * var(--user-unit));\n --scale-round-x: 1px;\n --scale-round-y: 1px;\n direction: ltr;\n width: 816px;\n height: 1056px;\n margin: var(--page-margin);\n position: relative;\n overflow: visible;\n border: var(--page-border);\n -o-border-image: var(--page-border-image);\n border-image: var(--page-border-image);\n background-clip: content-box;\n background-color: rgba(255, 255, 255, 1);\n}\n\n.pdfViewer .dummyPage {\n position: relative;\n width: 0;\n height: var(--viewer-container-height);\n}\n\n.pdfViewer.removePageBorders .page {\n margin: 0 auto 10px;\n border: none;\n}\n\n.pdfViewer.singlePageView {\n display: inline-block;\n}\n\n.pdfViewer.singlePageView .page {\n margin: 0;\n border: none;\n}\n\n.pdfViewer.scrollHorizontal,\n.pdfViewer.scrollWrapped,\n.spread {\n margin-left: 3.5px;\n margin-right: 3.5px;\n text-align: center;\n}\n\n.pdfViewer.scrollHorizontal,\n.spread {\n white-space: nowrap;\n}\n\n.pdfViewer.removePageBorders,\n.pdfViewer.scrollHorizontal .spread,\n.pdfViewer.scrollWrapped .spread {\n margin-left: 0;\n margin-right: 0;\n}\n\n.spread .page,\n.spread .dummyPage,\n.pdfViewer.scrollHorizontal .page,\n.pdfViewer.scrollWrapped .page,\n.pdfViewer.scrollHorizontal .spread,\n.pdfViewer.scrollWrapped .spread {\n display: inline-block;\n vertical-align: middle;\n}\n\n.spread .page,\n.pdfViewer.scrollHorizontal .page,\n.pdfViewer.scrollWrapped .page {\n margin-left: var(--spreadHorizontalWrapped-margin-LR);\n margin-right: var(--spreadHorizontalWrapped-margin-LR);\n}\n\n.pdfViewer.removePageBorders .spread .page,\n.pdfViewer.removePageBorders.scrollHorizontal .page,\n.pdfViewer.removePageBorders.scrollWrapped .page {\n margin-left: 5px;\n margin-right: 5px;\n}\n\n.pdfViewer .page canvas {\n position: absolute;\n top: 0;\n left: 0;\n margin: 0;\n display: block;\n width: 100%;\n height: 100%;\n contain: content;\n}\n\n.pdfViewer .page canvas[hidden] {\n display: none;\n}\n\n.pdfViewer .page .loadingIcon {\n position: absolute;\n display: block;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background: url(\"./images/loading-icon.gif\") center no-repeat;\n}\n.pdfViewer .page .loadingIcon.notVisible {\n background: none;\n}\n\n.pdfViewer.enablePermissions .textLayer span {\n -webkit-user-select: none !important;\n -moz-user-select: none !important;\n user-select: none !important;\n cursor: not-allowed;\n}\n\n.pdfPresentationMode .pdfViewer {\n padding-bottom: 0;\n}\n\n.pdfPresentationMode .spread {\n margin: 0;\n}\n\n.pdfPresentationMode .pdfViewer .page {\n margin: 0 auto;\n border: 2px solid transparent;\n}\n\n\n.pdf-shell {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 0;\n color: #1f2937;\n background: #edf2f7;\n}\n\n.pdf-toolbar {\n z-index: 2;\n display: flex;\n align-items: center;\n gap: 10px;\n min-height: 48px;\n padding: 6px 12px;\n border-bottom: 1px solid #d7dee8;\n background: #ffffff;\n box-shadow: 0 1px 4px rgb(15 23 42 / 8%);\n}\n\n.pdf-toolbar-group {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 36px;\n padding: 0 6px;\n border: 1px solid #dde5ef;\n border-radius: 8px;\n background: #f8fafc;\n}\n\n.pdf-toolbar-group--zoom {\n margin-left: auto;\n}\n\n.pdf-toolbar-group--rotate {\n flex-shrink: 0;\n}\n\n.pdf-icon-button,\n.pdf-scale-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 30px;\n border: 1px solid transparent;\n border-radius: 6px;\n color: #334155;\n background: transparent;\n font: inherit;\n line-height: 1;\n cursor: pointer;\n transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;\n}\n\n.pdf-icon-button {\n width: 30px;\n font-size: 18px;\n}\n\n.pdf-scale-button {\n width: 64px;\n font-size: 13px;\n font-weight: 600;\n}\n\n.pdf-icon-button:hover:not(:disabled),\n.pdf-scale-button:hover {\n border-color: #b9c8d8;\n color: #1769d8;\n background: #edf5ff;\n}\n\n.pdf-icon-button:disabled {\n color: #a8b3c0;\n cursor: not-allowed;\n}\n\n.pdf-icon-button--active {\n border-color: #9ac2ff;\n color: #1769d8;\n background: #e7f1ff;\n}\n\n.pdf-panel-icon {\n position: relative;\n display: block;\n width: 16px;\n height: 14px;\n border: 2px solid currentColor;\n border-radius: 3px;\n}\n\n.pdf-panel-icon::before {\n position: absolute;\n top: -2px;\n bottom: -2px;\n left: 4px;\n width: 2px;\n background: currentColor;\n content: '';\n}\n\n.pdf-page-meter {\n display: inline-flex;\n align-items: baseline;\n justify-content: center;\n min-width: 72px;\n gap: 3px;\n font-size: 13px;\n color: #64748b;\n white-space: nowrap;\n}\n\n.pdf-page-meter strong {\n color: #1e293b;\n font-size: 14px;\n}\n\n.pdf-rotation-meter {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 42px;\n color: #64748b;\n font-size: 13px;\n font-weight: 700;\n white-space: nowrap;\n}\n\n.pdf-content {\n position: relative;\n display: grid;\n grid-template-columns: clamp(148px, 22%, 220px) minmax(0, 1fr);\n flex: 1;\n min-height: 0;\n}\n\n.pdf-shell--nav-hidden .pdf-content {\n grid-template-columns: minmax(0, 1fr);\n}\n\n.pdf-nav-pane {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n overflow: hidden;\n border-right: 1px solid #d7dee8;\n background: #f8fafc;\n}\n\n.pdf-nav-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 44px;\n padding: 0 12px;\n border-bottom: 1px solid #e3e9f1;\n color: #475569;\n font-size: 13px;\n}\n\n.pdf-nav-head strong {\n color: #1e293b;\n font-size: 12px;\n}\n\n.pdf-nav-tabs {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 4px;\n padding: 8px;\n border-bottom: 1px solid #e3e9f1;\n background: #f8fafc;\n}\n\n.pdf-nav-tabs button {\n min-width: 0;\n height: 30px;\n border: 1px solid transparent;\n border-radius: 6px;\n color: #64748b;\n background: transparent;\n font: inherit;\n font-size: 12px;\n font-weight: 700;\n cursor: pointer;\n}\n\n.pdf-nav-tabs button:hover,\n.pdf-nav-tabs button.active {\n border-color: #b9d4f6;\n color: #1769d8;\n background: #edf5ff;\n}\n\n.pdf-page-list {\n flex: 1;\n min-height: 0;\n display: grid;\n align-content: start;\n gap: 8px;\n padding: 10px;\n overflow-y: auto;\n}\n\n.pdf-page-button {\n display: grid;\n grid-template-columns: 42px minmax(0, 1fr);\n align-items: center;\n gap: 10px;\n width: 100%;\n min-height: 54px;\n padding: 6px 8px;\n border: 1px solid #dce4ee;\n border-radius: 8px;\n color: #334155;\n background: #ffffff;\n cursor: pointer;\n text-align: left;\n transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;\n}\n\n.pdf-page-button:hover {\n border-color: #a9c5ea;\n background: #f3f8ff;\n}\n\n.pdf-page-button--active {\n border-color: #408fff;\n background: #eaf3ff;\n box-shadow: inset 3px 0 0 #408fff;\n}\n\n.pdf-page-thumb {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 42px;\n border: 1px solid #d6e1ee;\n border-radius: 4px;\n color: #1769d8;\n background: linear-gradient(180deg, #ffffff 0%, #edf5ff 100%);\n font-size: 12px;\n font-weight: 700;\n}\n\n.pdf-page-label {\n min-width: 0;\n overflow: hidden;\n font-size: 13px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.pdf-outline-list {\n flex: 1;\n min-height: 0;\n display: grid;\n align-content: start;\n gap: 4px;\n padding: 8px;\n overflow-y: auto;\n}\n\n.pdf-outline-button {\n --outline-depth: 0;\n display: grid;\n grid-template-columns: 16px minmax(0, 1fr);\n align-items: center;\n gap: 6px;\n width: 100%;\n min-height: 32px;\n padding: 5px 7px 5px calc(7px + var(--outline-depth) * 14px);\n border: 1px solid transparent;\n border-radius: 6px;\n color: #334155;\n background: transparent;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.pdf-outline-button:hover {\n border-color: #c7d7eb;\n background: #ffffff;\n}\n\n.pdf-outline-toggle {\n position: relative;\n width: 14px;\n height: 14px;\n border-radius: 4px;\n color: #64748b;\n}\n\n.pdf-outline-toggle::before {\n position: absolute;\n top: 3px;\n left: 4px;\n width: 6px;\n height: 6px;\n border-right: 2px solid currentColor;\n border-bottom: 2px solid currentColor;\n content: '';\n transform: rotate(-45deg);\n transition: transform 0.16s ease;\n}\n\n.pdf-outline-toggle--open::before {\n transform: rotate(45deg);\n}\n\n.pdf-outline-toggle--empty::before {\n display: none;\n}\n\n.pdf-outline-title {\n min-width: 0;\n overflow: hidden;\n font-size: 12px;\n line-height: 1.35;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.pdf-outline-empty {\n margin: 24px 8px;\n padding: 14px 10px;\n border: 1px dashed #cbd5e1;\n border-radius: 8px;\n color: #64748b;\n background: #ffffff;\n font-size: 12px;\n text-align: center;\n}\n\n.pdfViewer {\n margin: 0 auto;\n padding: 18px 14px 28px;\n}\n\n.pdf-viewport {\n position: relative;\n width: 100%;\n height: 100%;\n min-width: 0;\n min-height: 0;\n}\n\n.pdf-wrapper {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n overflow: auto;\n background: #e8edf4;\n}\n\n.pdf-state {\n position: absolute;\n top: 50%;\n left: 50%;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 168px;\n min-height: 42px;\n padding: 0 16px;\n border: 1px solid #d7dee8;\n border-radius: 8px;\n color: #475569;\n background: #ffffff;\n box-shadow: 0 10px 30px rgb(15 23 42 / 12%);\n transform: translate(-50%, -50%);\n}\n\n.pdf-state--error {\n max-width: min(460px, calc(100% - 32px));\n color: #b42318;\n text-align: center;\n}\n\n@media (max-width: 720px) {\n .pdf-toolbar {\n flex-wrap: wrap;\n min-height: 88px;\n align-content: center;\n }\n\n .pdf-toolbar-group--zoom {\n margin-left: 0;\n }\n\n .pdf-content,\n .pdf-shell--nav-hidden .pdf-content {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .pdf-nav-pane {\n position: absolute;\n z-index: 3;\n top: 0;\n bottom: 0;\n left: 0;\n width: min(78vw, 240px);\n box-shadow: 10px 0 24px rgb(15 23 42 / 14%);\n }\n}\n";
|
|
@@ -17997,7 +17997,14 @@ class CanvasGraphics {
|
|
|
17997
17997
|
scaledX += (width - measuredWidth) / 2000 * fontSize / fontSizeScale;
|
|
17998
17998
|
}
|
|
17999
17999
|
}
|
|
18000
|
-
|
|
18000
|
+
// File Viewer modification: an unmapped control in a missing-font
|
|
18001
|
+
// fallback has no drawable glyph. Suppress only paint, not its PDF advance
|
|
18002
|
+
// or Unicode. Explicit mappings, embedded fonts and Type3 stay untouched.
|
|
18003
|
+
const isUnmappedControl = font.missingFile && !glyph.isInFont &&
|
|
18004
|
+
character.length === 1 && character === glyph.unicode &&
|
|
18005
|
+
character.charCodeAt(0) === glyph.originalCharCode &&
|
|
18006
|
+
/[\x00-\x1f\x7f-\x9f]/.test(character);
|
|
18007
|
+
if (this.contentVisible && !isUnmappedControl && (glyph.isInFont || font.missingFile)) {
|
|
18001
18008
|
if (simpleFillText && !accent) {
|
|
18002
18009
|
ctx.fillText(character, scaledX, scaledY);
|
|
18003
18010
|
this.dependencyTracker?.recordCharacterBBox(opIdx, ctx, measure ? {
|
|
@@ -20563,6 +20570,10 @@ class TextLayer {
|
|
|
20563
20570
|
if (!ctx) {
|
|
20564
20571
|
const canvas = document.createElement("canvas");
|
|
20565
20572
|
canvas.className = "hiddenCanvasElement";
|
|
20573
|
+
// File Viewer modification: this shared measurement canvas is appended
|
|
20574
|
+
// outside the viewer (including Shadow DOM). Keep the upstream viewer CSS
|
|
20575
|
+
// on its own node so hiding survives individual viewer lifecycles.
|
|
20576
|
+
canvas.style.cssText = "position:absolute;top:0;left:0;width:0;height:0;display:none";
|
|
20566
20577
|
canvas.lang = lang;
|
|
20567
20578
|
document.body.append(canvas);
|
|
20568
20579
|
ctx = canvas.getContext("2d", {
|
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
"sourcePatches": [
|
|
9
9
|
{
|
|
10
10
|
"path": "patches/pdfjs-dist@5.4.624.patch",
|
|
11
|
-
"sha256": "
|
|
12
|
-
"size":
|
|
11
|
+
"sha256": "90248728afb50e02adb01803390e1284a702fb0534be66b89b0340943e9dc779",
|
|
12
|
+
"size": 5725
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"runtimeFiles": [
|
|
16
16
|
{
|
|
17
17
|
"path": "legacy/build/pdf.mjs",
|
|
18
|
-
"sourceSize":
|
|
19
|
-
"sourceSha256": "
|
|
18
|
+
"sourceSize": 977654,
|
|
19
|
+
"sourceSha256": "f43d3041112dd03a9bb81078b8f16fb9ab449274c95b077802dffe7f5783a9d7",
|
|
20
20
|
"runtimeBindingReplacements": 843,
|
|
21
|
-
"size":
|
|
22
|
-
"sha256": "
|
|
21
|
+
"size": 982838,
|
|
22
|
+
"sha256": "a6c417f6efd0ce5cb4e37fd4e66a6f23b637b2af8b6249c26e272f6fde3eac50"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"path": "legacy/build/pdf.worker.mjs",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@file-viewer/renderer-pdf",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Standalone PDF renderer plugin for File Viewer powered by PDF.js.",
|
|
@@ -58,6 +58,8 @@
|
|
|
58
58
|
"dist/optionalCapabilities.js",
|
|
59
59
|
"dist/pdf.d.ts",
|
|
60
60
|
"dist/pdf.js",
|
|
61
|
+
"dist/pdfAnnotationStyles.d.ts",
|
|
62
|
+
"dist/pdfAnnotationStyles.js",
|
|
61
63
|
"dist/pdfBbox.d.ts",
|
|
62
64
|
"dist/pdfBbox.js",
|
|
63
65
|
"dist/pdfBboxController.d.ts",
|
|
@@ -293,10 +295,11 @@
|
|
|
293
295
|
"LICENSE",
|
|
294
296
|
"README.en.md",
|
|
295
297
|
"README.md",
|
|
296
|
-
"README.zh-CN.md"
|
|
298
|
+
"README.zh-CN.md",
|
|
299
|
+
"THIRD_PARTY_NOTICES.md"
|
|
297
300
|
],
|
|
298
301
|
"dependencies": {
|
|
299
|
-
"@file-viewer/core": "3.3.
|
|
302
|
+
"@file-viewer/core": "3.3.4",
|
|
300
303
|
"@fontsource-variable/noto-sans-sc": "5.3.1"
|
|
301
304
|
},
|
|
302
305
|
"peerDependencies": {
|