Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/embedpre.../assets/pdf/web
File: viewer.js
signal
[10500] Fix | Delete
});
[10501] Fix | Delete
window.addEventListener("wheel", this.#mouseWheel.bind(this), {
[10502] Fix | Delete
passive: false,
[10503] Fix | Delete
signal
[10504] Fix | Delete
});
[10505] Fix | Delete
window.addEventListener("keydown", this.#resetMouseScrollState.bind(this), {
[10506] Fix | Delete
signal
[10507] Fix | Delete
});
[10508] Fix | Delete
window.addEventListener("contextmenu", this.#contextMenu.bind(this), {
[10509] Fix | Delete
signal
[10510] Fix | Delete
});
[10511] Fix | Delete
window.addEventListener("touchstart", touchSwipeBind, {
[10512] Fix | Delete
signal
[10513] Fix | Delete
});
[10514] Fix | Delete
window.addEventListener("touchmove", touchSwipeBind, {
[10515] Fix | Delete
signal
[10516] Fix | Delete
});
[10517] Fix | Delete
window.addEventListener("touchend", touchSwipeBind, {
[10518] Fix | Delete
signal
[10519] Fix | Delete
});
[10520] Fix | Delete
}
[10521] Fix | Delete
#removeWindowListeners() {
[10522] Fix | Delete
this.#windowAbortController?.abort();
[10523] Fix | Delete
this.#windowAbortController = null;
[10524] Fix | Delete
}
[10525] Fix | Delete
#addFullscreenChangeListeners() {
[10526] Fix | Delete
if (this.#fullscreenChangeAbortController) {
[10527] Fix | Delete
return;
[10528] Fix | Delete
}
[10529] Fix | Delete
this.#fullscreenChangeAbortController = new AbortController();
[10530] Fix | Delete
window.addEventListener("fullscreenchange", () => {
[10531] Fix | Delete
if (document.fullscreenElement) {
[10532] Fix | Delete
this.#enter();
[10533] Fix | Delete
} else {
[10534] Fix | Delete
this.#exit();
[10535] Fix | Delete
}
[10536] Fix | Delete
}, {
[10537] Fix | Delete
signal: this.#fullscreenChangeAbortController.signal
[10538] Fix | Delete
});
[10539] Fix | Delete
}
[10540] Fix | Delete
#removeFullscreenChangeListeners() {
[10541] Fix | Delete
this.#fullscreenChangeAbortController?.abort();
[10542] Fix | Delete
this.#fullscreenChangeAbortController = null;
[10543] Fix | Delete
}
[10544] Fix | Delete
}
[10545] Fix | Delete
[10546] Fix | Delete
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.every.js
[10547] Fix | Delete
var esnext_iterator_every = __webpack_require__(3215);
[10548] Fix | Delete
;// CONCATENATED MODULE: ./web/xfa_layer_builder.js
[10549] Fix | Delete
[10550] Fix | Delete
class XfaLayerBuilder {
[10551] Fix | Delete
constructor({
[10552] Fix | Delete
pdfPage,
[10553] Fix | Delete
annotationStorage = null,
[10554] Fix | Delete
linkService,
[10555] Fix | Delete
xfaHtml = null
[10556] Fix | Delete
}) {
[10557] Fix | Delete
this.pdfPage = pdfPage;
[10558] Fix | Delete
this.annotationStorage = annotationStorage;
[10559] Fix | Delete
this.linkService = linkService;
[10560] Fix | Delete
this.xfaHtml = xfaHtml;
[10561] Fix | Delete
this.div = null;
[10562] Fix | Delete
this._cancelled = false;
[10563] Fix | Delete
}
[10564] Fix | Delete
async render(viewport, intent = "display") {
[10565] Fix | Delete
if (intent === "print") {
[10566] Fix | Delete
const parameters = {
[10567] Fix | Delete
viewport: viewport.clone({
[10568] Fix | Delete
dontFlip: true
[10569] Fix | Delete
}),
[10570] Fix | Delete
div: this.div,
[10571] Fix | Delete
xfaHtml: this.xfaHtml,
[10572] Fix | Delete
annotationStorage: this.annotationStorage,
[10573] Fix | Delete
linkService: this.linkService,
[10574] Fix | Delete
intent
[10575] Fix | Delete
};
[10576] Fix | Delete
this.div = document.createElement("div");
[10577] Fix | Delete
parameters.div = this.div;
[10578] Fix | Delete
return XfaLayer.render(parameters);
[10579] Fix | Delete
}
[10580] Fix | Delete
const xfaHtml = await this.pdfPage.getXfa();
[10581] Fix | Delete
if (this._cancelled || !xfaHtml) {
[10582] Fix | Delete
return {
[10583] Fix | Delete
textDivs: []
[10584] Fix | Delete
};
[10585] Fix | Delete
}
[10586] Fix | Delete
const parameters = {
[10587] Fix | Delete
viewport: viewport.clone({
[10588] Fix | Delete
dontFlip: true
[10589] Fix | Delete
}),
[10590] Fix | Delete
div: this.div,
[10591] Fix | Delete
xfaHtml,
[10592] Fix | Delete
annotationStorage: this.annotationStorage,
[10593] Fix | Delete
linkService: this.linkService,
[10594] Fix | Delete
intent
[10595] Fix | Delete
};
[10596] Fix | Delete
if (this.div) {
[10597] Fix | Delete
return XfaLayer.update(parameters);
[10598] Fix | Delete
}
[10599] Fix | Delete
this.div = document.createElement("div");
[10600] Fix | Delete
parameters.div = this.div;
[10601] Fix | Delete
return XfaLayer.render(parameters);
[10602] Fix | Delete
}
[10603] Fix | Delete
cancel() {
[10604] Fix | Delete
this._cancelled = true;
[10605] Fix | Delete
}
[10606] Fix | Delete
hide() {
[10607] Fix | Delete
if (!this.div) {
[10608] Fix | Delete
return;
[10609] Fix | Delete
}
[10610] Fix | Delete
this.div.hidden = true;
[10611] Fix | Delete
}
[10612] Fix | Delete
}
[10613] Fix | Delete
[10614] Fix | Delete
;// CONCATENATED MODULE: ./web/print_utils.js
[10615] Fix | Delete
[10616] Fix | Delete
[10617] Fix | Delete
[10618] Fix | Delete
function getXfaHtmlForPrinting(printContainer, pdfDocument) {
[10619] Fix | Delete
const xfaHtml = pdfDocument.allXfaHtml;
[10620] Fix | Delete
const linkService = new SimpleLinkService();
[10621] Fix | Delete
const scale = Math.round(PixelsPerInch.PDF_TO_CSS_UNITS * 100) / 100;
[10622] Fix | Delete
for (const xfaPage of xfaHtml.children) {
[10623] Fix | Delete
const page = document.createElement("div");
[10624] Fix | Delete
page.className = "xfaPrintedPage";
[10625] Fix | Delete
printContainer.append(page);
[10626] Fix | Delete
const builder = new XfaLayerBuilder({
[10627] Fix | Delete
pdfPage: null,
[10628] Fix | Delete
annotationStorage: pdfDocument.annotationStorage,
[10629] Fix | Delete
linkService,
[10630] Fix | Delete
xfaHtml: xfaPage
[10631] Fix | Delete
});
[10632] Fix | Delete
const viewport = getXfaPageViewport(xfaPage, {
[10633] Fix | Delete
scale
[10634] Fix | Delete
});
[10635] Fix | Delete
builder.render(viewport, "print");
[10636] Fix | Delete
page.append(builder.div);
[10637] Fix | Delete
}
[10638] Fix | Delete
}
[10639] Fix | Delete
[10640] Fix | Delete
;// CONCATENATED MODULE: ./web/pdf_print_service.js
[10641] Fix | Delete
[10642] Fix | Delete
[10643] Fix | Delete
[10644] Fix | Delete
[10645] Fix | Delete
[10646] Fix | Delete
[10647] Fix | Delete
[10648] Fix | Delete
let activeService = null;
[10649] Fix | Delete
let dialog = null;
[10650] Fix | Delete
let overlayManager = null;
[10651] Fix | Delete
let viewerApp = {
[10652] Fix | Delete
initialized: false
[10653] Fix | Delete
};
[10654] Fix | Delete
function renderPage(activeServiceOnEntry, pdfDocument, pageNumber, size, printResolution, optionalContentConfigPromise, printAnnotationStoragePromise) {
[10655] Fix | Delete
const scratchCanvas = activeService.scratchCanvas;
[10656] Fix | Delete
const PRINT_UNITS = printResolution / PixelsPerInch.PDF;
[10657] Fix | Delete
scratchCanvas.width = Math.floor(size.width * PRINT_UNITS);
[10658] Fix | Delete
scratchCanvas.height = Math.floor(size.height * PRINT_UNITS);
[10659] Fix | Delete
const ctx = scratchCanvas.getContext("2d");
[10660] Fix | Delete
ctx.save();
[10661] Fix | Delete
ctx.fillStyle = "rgb(255, 255, 255)";
[10662] Fix | Delete
ctx.fillRect(0, 0, scratchCanvas.width, scratchCanvas.height);
[10663] Fix | Delete
ctx.restore();
[10664] Fix | Delete
return Promise.all([pdfDocument.getPage(pageNumber), printAnnotationStoragePromise]).then(function ([pdfPage, printAnnotationStorage]) {
[10665] Fix | Delete
const renderContext = {
[10666] Fix | Delete
canvasContext: ctx,
[10667] Fix | Delete
transform: [PRINT_UNITS, 0, 0, PRINT_UNITS, 0, 0],
[10668] Fix | Delete
viewport: pdfPage.getViewport({
[10669] Fix | Delete
scale: 1,
[10670] Fix | Delete
rotation: size.rotation
[10671] Fix | Delete
}),
[10672] Fix | Delete
intent: "print",
[10673] Fix | Delete
annotationMode: AnnotationMode.ENABLE_STORAGE,
[10674] Fix | Delete
optionalContentConfigPromise,
[10675] Fix | Delete
printAnnotationStorage
[10676] Fix | Delete
};
[10677] Fix | Delete
const renderTask = pdfPage.render(renderContext);
[10678] Fix | Delete
return renderTask.promise.catch(reason => {
[10679] Fix | Delete
if (!(reason instanceof RenderingCancelledException)) {
[10680] Fix | Delete
console.error(reason);
[10681] Fix | Delete
}
[10682] Fix | Delete
throw reason;
[10683] Fix | Delete
});
[10684] Fix | Delete
});
[10685] Fix | Delete
}
[10686] Fix | Delete
class PDFPrintService {
[10687] Fix | Delete
constructor({
[10688] Fix | Delete
pdfDocument,
[10689] Fix | Delete
pagesOverview,
[10690] Fix | Delete
printContainer,
[10691] Fix | Delete
printResolution,
[10692] Fix | Delete
printAnnotationStoragePromise = null
[10693] Fix | Delete
}) {
[10694] Fix | Delete
this.pdfDocument = pdfDocument;
[10695] Fix | Delete
this.pagesOverview = pagesOverview;
[10696] Fix | Delete
this.printContainer = printContainer;
[10697] Fix | Delete
this._printResolution = printResolution || 150;
[10698] Fix | Delete
this._optionalContentConfigPromise = pdfDocument.getOptionalContentConfig({
[10699] Fix | Delete
intent: "print"
[10700] Fix | Delete
});
[10701] Fix | Delete
this._printAnnotationStoragePromise = printAnnotationStoragePromise || Promise.resolve();
[10702] Fix | Delete
this.currentPage = -1;
[10703] Fix | Delete
this.scratchCanvas = document.createElement("canvas");
[10704] Fix | Delete
}
[10705] Fix | Delete
layout() {
[10706] Fix | Delete
this.throwIfInactive();
[10707] Fix | Delete
const body = document.querySelector("body");
[10708] Fix | Delete
body.setAttribute("data-pdfjsprinting", true);
[10709] Fix | Delete
const {
[10710] Fix | Delete
width,
[10711] Fix | Delete
height
[10712] Fix | Delete
} = this.pagesOverview[0];
[10713] Fix | Delete
const hasEqualPageSizes = this.pagesOverview.every(size => size.width === width && size.height === height);
[10714] Fix | Delete
if (!hasEqualPageSizes) {
[10715] Fix | Delete
console.warn("Not all pages have the same size. The printed result may be incorrect!");
[10716] Fix | Delete
}
[10717] Fix | Delete
this.pageStyleSheet = document.createElement("style");
[10718] Fix | Delete
this.pageStyleSheet.textContent = `@page { size: ${width}pt ${height}pt;}`;
[10719] Fix | Delete
body.append(this.pageStyleSheet);
[10720] Fix | Delete
}
[10721] Fix | Delete
destroy() {
[10722] Fix | Delete
if (activeService !== this) {
[10723] Fix | Delete
return;
[10724] Fix | Delete
}
[10725] Fix | Delete
this.printContainer.textContent = "";
[10726] Fix | Delete
const body = document.querySelector("body");
[10727] Fix | Delete
body.removeAttribute("data-pdfjsprinting");
[10728] Fix | Delete
if (this.pageStyleSheet) {
[10729] Fix | Delete
this.pageStyleSheet.remove();
[10730] Fix | Delete
this.pageStyleSheet = null;
[10731] Fix | Delete
}
[10732] Fix | Delete
this.scratchCanvas.width = this.scratchCanvas.height = 0;
[10733] Fix | Delete
this.scratchCanvas = null;
[10734] Fix | Delete
activeService = null;
[10735] Fix | Delete
ensureOverlay().then(function () {
[10736] Fix | Delete
if (overlayManager.active === dialog) {
[10737] Fix | Delete
overlayManager.close(dialog);
[10738] Fix | Delete
}
[10739] Fix | Delete
});
[10740] Fix | Delete
}
[10741] Fix | Delete
renderPages() {
[10742] Fix | Delete
if (this.pdfDocument.isPureXfa) {
[10743] Fix | Delete
getXfaHtmlForPrinting(this.printContainer, this.pdfDocument);
[10744] Fix | Delete
return Promise.resolve();
[10745] Fix | Delete
}
[10746] Fix | Delete
const pageCount = this.pagesOverview.length;
[10747] Fix | Delete
const renderNextPage = (resolve, reject) => {
[10748] Fix | Delete
this.throwIfInactive();
[10749] Fix | Delete
if (++this.currentPage >= pageCount) {
[10750] Fix | Delete
renderProgress(pageCount, pageCount);
[10751] Fix | Delete
resolve();
[10752] Fix | Delete
return;
[10753] Fix | Delete
}
[10754] Fix | Delete
const index = this.currentPage;
[10755] Fix | Delete
renderProgress(index, pageCount);
[10756] Fix | Delete
renderPage(this, this.pdfDocument, index + 1, this.pagesOverview[index], this._printResolution, this._optionalContentConfigPromise, this._printAnnotationStoragePromise).then(this.useRenderedPage.bind(this)).then(function () {
[10757] Fix | Delete
renderNextPage(resolve, reject);
[10758] Fix | Delete
}, reject);
[10759] Fix | Delete
};
[10760] Fix | Delete
return new Promise(renderNextPage);
[10761] Fix | Delete
}
[10762] Fix | Delete
useRenderedPage() {
[10763] Fix | Delete
this.throwIfInactive();
[10764] Fix | Delete
const img = document.createElement("img");
[10765] Fix | Delete
const scratchCanvas = this.scratchCanvas;
[10766] Fix | Delete
if ("toBlob" in scratchCanvas) {
[10767] Fix | Delete
scratchCanvas.toBlob(function (blob) {
[10768] Fix | Delete
img.src = URL.createObjectURL(blob);
[10769] Fix | Delete
});
[10770] Fix | Delete
} else {
[10771] Fix | Delete
img.src = scratchCanvas.toDataURL();
[10772] Fix | Delete
}
[10773] Fix | Delete
const wrapper = document.createElement("div");
[10774] Fix | Delete
wrapper.className = "printedPage";
[10775] Fix | Delete
wrapper.append(img);
[10776] Fix | Delete
this.printContainer.append(wrapper);
[10777] Fix | Delete
return new Promise(function (resolve, reject) {
[10778] Fix | Delete
img.onload = resolve;
[10779] Fix | Delete
img.onerror = reject;
[10780] Fix | Delete
});
[10781] Fix | Delete
}
[10782] Fix | Delete
performPrint() {
[10783] Fix | Delete
[10784] Fix | Delete
if (location.hash) {
[10785] Fix | Delete
let hash = location.hash;
[10786] Fix | Delete
let hashParams = new URLSearchParams(hash.substring(1));
[10787] Fix | Delete
[10788] Fix | Delete
if(hashParams.get('key') !== null) {
[10789] Fix | Delete
hashParams = '#' + atob(hashParams.get('key'));
[10790] Fix | Delete
hashParams = new URLSearchParams(hashParams.substring(1));
[10791] Fix | Delete
}
[10792] Fix | Delete
const element = document.querySelector('#download');
[10793] Fix | Delete
if((hashParams.get('download') === 'false' || hashParams.get('download') === '') || element.offsetParent === null){
[10794] Fix | Delete
return false;
[10795] Fix | Delete
}
[10796] Fix | Delete
} // added by EP developer
[10797] Fix | Delete
[10798] Fix | Delete
this.throwIfInactive();
[10799] Fix | Delete
return new Promise(resolve => {
[10800] Fix | Delete
setTimeout(() => {
[10801] Fix | Delete
if (!this.active) {
[10802] Fix | Delete
resolve();
[10803] Fix | Delete
return;
[10804] Fix | Delete
}
[10805] Fix | Delete
print.call(window);
[10806] Fix | Delete
setTimeout(resolve, 20);
[10807] Fix | Delete
}, 0);
[10808] Fix | Delete
});
[10809] Fix | Delete
}
[10810] Fix | Delete
get active() {
[10811] Fix | Delete
return this === activeService;
[10812] Fix | Delete
}
[10813] Fix | Delete
throwIfInactive() {
[10814] Fix | Delete
if (!this.active) {
[10815] Fix | Delete
throw new Error("This print request was cancelled or completed.");
[10816] Fix | Delete
}
[10817] Fix | Delete
}
[10818] Fix | Delete
}
[10819] Fix | Delete
const print = window.print;
[10820] Fix | Delete
window.print = function () {
[10821] Fix | Delete
if (activeService) {
[10822] Fix | Delete
console.warn("Ignored window.print() because of a pending print job.");
[10823] Fix | Delete
return;
[10824] Fix | Delete
}
[10825] Fix | Delete
ensureOverlay().then(function () {
[10826] Fix | Delete
if (activeService) {
[10827] Fix | Delete
overlayManager.open(dialog);
[10828] Fix | Delete
}
[10829] Fix | Delete
});
[10830] Fix | Delete
try {
[10831] Fix | Delete
dispatchEvent("beforeprint");
[10832] Fix | Delete
} finally {
[10833] Fix | Delete
if (!activeService) {
[10834] Fix | Delete
console.error("Expected print service to be initialized.");
[10835] Fix | Delete
ensureOverlay().then(function () {
[10836] Fix | Delete
if (overlayManager.active === dialog) {
[10837] Fix | Delete
overlayManager.close(dialog);
[10838] Fix | Delete
}
[10839] Fix | Delete
});
[10840] Fix | Delete
return;
[10841] Fix | Delete
}
[10842] Fix | Delete
const activeServiceOnEntry = activeService;
[10843] Fix | Delete
activeService.renderPages().then(function () {
[10844] Fix | Delete
return activeServiceOnEntry.performPrint();
[10845] Fix | Delete
}).catch(function () {}).then(function () {
[10846] Fix | Delete
if (activeServiceOnEntry.active) {
[10847] Fix | Delete
abort();
[10848] Fix | Delete
}
[10849] Fix | Delete
});
[10850] Fix | Delete
}
[10851] Fix | Delete
};
[10852] Fix | Delete
function dispatchEvent(eventType) {
[10853] Fix | Delete
const event = new CustomEvent(eventType, {
[10854] Fix | Delete
bubbles: false,
[10855] Fix | Delete
cancelable: false,
[10856] Fix | Delete
detail: "custom"
[10857] Fix | Delete
});
[10858] Fix | Delete
window.dispatchEvent(event);
[10859] Fix | Delete
}
[10860] Fix | Delete
function abort() {
[10861] Fix | Delete
if (activeService) {
[10862] Fix | Delete
activeService.destroy();
[10863] Fix | Delete
dispatchEvent("afterprint");
[10864] Fix | Delete
}
[10865] Fix | Delete
}
[10866] Fix | Delete
function renderProgress(index, total) {
[10867] Fix | Delete
dialog ||= document.getElementById("printServiceDialog");
[10868] Fix | Delete
const progress = Math.round(100 * index / total);
[10869] Fix | Delete
const progressBar = dialog.querySelector("progress");
[10870] Fix | Delete
const progressPerc = dialog.querySelector(".relative-progress");
[10871] Fix | Delete
progressBar.value = progress;
[10872] Fix | Delete
progressPerc.setAttribute("data-l10n-args", JSON.stringify({
[10873] Fix | Delete
progress
[10874] Fix | Delete
}));
[10875] Fix | Delete
}
[10876] Fix | Delete
window.addEventListener("keydown", function (event) {
[10877] Fix | Delete
if (event.keyCode === 80 && (event.ctrlKey || event.metaKey) && !event.altKey && (!event.shiftKey || window.chrome || window.opera)) {
[10878] Fix | Delete
window.print();
[10879] Fix | Delete
event.preventDefault();
[10880] Fix | Delete
event.stopImmediatePropagation();
[10881] Fix | Delete
}
[10882] Fix | Delete
}, true);
[10883] Fix | Delete
if ("onbeforeprint" in window) {
[10884] Fix | Delete
const stopPropagationIfNeeded = function (event) {
[10885] Fix | Delete
if (event.detail !== "custom") {
[10886] Fix | Delete
event.stopImmediatePropagation();
[10887] Fix | Delete
}
[10888] Fix | Delete
};
[10889] Fix | Delete
window.addEventListener("beforeprint", stopPropagationIfNeeded);
[10890] Fix | Delete
window.addEventListener("afterprint", stopPropagationIfNeeded);
[10891] Fix | Delete
}
[10892] Fix | Delete
let overlayPromise;
[10893] Fix | Delete
function ensureOverlay() {
[10894] Fix | Delete
if (!overlayPromise) {
[10895] Fix | Delete
overlayManager = viewerApp.overlayManager;
[10896] Fix | Delete
if (!overlayManager) {
[10897] Fix | Delete
throw new Error("The overlay manager has not yet been initialized.");
[10898] Fix | Delete
}
[10899] Fix | Delete
dialog ||= document.getElementById("printServiceDialog");
[10900] Fix | Delete
overlayPromise = overlayManager.register(dialog, true);
[10901] Fix | Delete
document.getElementById("printCancel").onclick = abort;
[10902] Fix | Delete
dialog.addEventListener("close", abort);
[10903] Fix | Delete
}
[10904] Fix | Delete
return overlayPromise;
[10905] Fix | Delete
}
[10906] Fix | Delete
class PDFPrintServiceFactory {
[10907] Fix | Delete
static initGlobals(app) {
[10908] Fix | Delete
viewerApp = app;
[10909] Fix | Delete
}
[10910] Fix | Delete
static get supportsPrinting() {
[10911] Fix | Delete
return shadow(this, "supportsPrinting", true);
[10912] Fix | Delete
}
[10913] Fix | Delete
static createPrintService(params) {
[10914] Fix | Delete
if (activeService) {
[10915] Fix | Delete
throw new Error("The print service is created and active.");
[10916] Fix | Delete
}
[10917] Fix | Delete
return activeService = new PDFPrintService(params);
[10918] Fix | Delete
}
[10919] Fix | Delete
}
[10920] Fix | Delete
[10921] Fix | Delete
;// CONCATENATED MODULE: ./web/pdf_rendering_queue.js
[10922] Fix | Delete
[10923] Fix | Delete
[10924] Fix | Delete
const CLEANUP_TIMEOUT = 30000;
[10925] Fix | Delete
class PDFRenderingQueue {
[10926] Fix | Delete
constructor() {
[10927] Fix | Delete
this.pdfViewer = null;
[10928] Fix | Delete
this.pdfThumbnailViewer = null;
[10929] Fix | Delete
this.onIdle = null;
[10930] Fix | Delete
this.highestPriorityPage = null;
[10931] Fix | Delete
this.idleTimeout = null;
[10932] Fix | Delete
this.printing = false;
[10933] Fix | Delete
this.isThumbnailViewEnabled = false;
[10934] Fix | Delete
Object.defineProperty(this, "hasViewer", {
[10935] Fix | Delete
value: () => !!this.pdfViewer
[10936] Fix | Delete
});
[10937] Fix | Delete
}
[10938] Fix | Delete
setViewer(pdfViewer) {
[10939] Fix | Delete
this.pdfViewer = pdfViewer;
[10940] Fix | Delete
}
[10941] Fix | Delete
setThumbnailViewer(pdfThumbnailViewer) {
[10942] Fix | Delete
this.pdfThumbnailViewer = pdfThumbnailViewer;
[10943] Fix | Delete
}
[10944] Fix | Delete
isHighestPriority(view) {
[10945] Fix | Delete
return this.highestPriorityPage === view.renderingId;
[10946] Fix | Delete
}
[10947] Fix | Delete
renderHighestPriority(currentlyVisiblePages) {
[10948] Fix | Delete
if (this.idleTimeout) {
[10949] Fix | Delete
clearTimeout(this.idleTimeout);
[10950] Fix | Delete
this.idleTimeout = null;
[10951] Fix | Delete
}
[10952] Fix | Delete
if (this.pdfViewer.forceRendering(currentlyVisiblePages)) {
[10953] Fix | Delete
return;
[10954] Fix | Delete
}
[10955] Fix | Delete
if (this.isThumbnailViewEnabled && this.pdfThumbnailViewer?.forceRendering()) {
[10956] Fix | Delete
return;
[10957] Fix | Delete
}
[10958] Fix | Delete
if (this.printing) {
[10959] Fix | Delete
return;
[10960] Fix | Delete
}
[10961] Fix | Delete
if (this.onIdle) {
[10962] Fix | Delete
this.idleTimeout = setTimeout(this.onIdle.bind(this), CLEANUP_TIMEOUT);
[10963] Fix | Delete
}
[10964] Fix | Delete
}
[10965] Fix | Delete
getHighestPriority(visible, views, scrolledDown, preRenderExtra = false) {
[10966] Fix | Delete
const visibleViews = visible.views,
[10967] Fix | Delete
numVisible = visibleViews.length;
[10968] Fix | Delete
if (numVisible === 0) {
[10969] Fix | Delete
return null;
[10970] Fix | Delete
}
[10971] Fix | Delete
for (let i = 0; i < numVisible; i++) {
[10972] Fix | Delete
const view = visibleViews[i].view;
[10973] Fix | Delete
if (!this.isViewFinished(view)) {
[10974] Fix | Delete
return view;
[10975] Fix | Delete
}
[10976] Fix | Delete
}
[10977] Fix | Delete
const firstId = visible.first.id,
[10978] Fix | Delete
lastId = visible.last.id;
[10979] Fix | Delete
if (lastId - firstId + 1 > numVisible) {
[10980] Fix | Delete
const visibleIds = visible.ids;
[10981] Fix | Delete
for (let i = 1, ii = lastId - firstId; i < ii; i++) {
[10982] Fix | Delete
const holeId = scrolledDown ? firstId + i : lastId - i;
[10983] Fix | Delete
if (visibleIds.has(holeId)) {
[10984] Fix | Delete
continue;
[10985] Fix | Delete
}
[10986] Fix | Delete
const holeView = views[holeId - 1];
[10987] Fix | Delete
if (!this.isViewFinished(holeView)) {
[10988] Fix | Delete
return holeView;
[10989] Fix | Delete
}
[10990] Fix | Delete
}
[10991] Fix | Delete
}
[10992] Fix | Delete
let preRenderIndex = scrolledDown ? lastId : firstId - 2;
[10993] Fix | Delete
let preRenderView = views[preRenderIndex];
[10994] Fix | Delete
if (preRenderView && !this.isViewFinished(preRenderView)) {
[10995] Fix | Delete
return preRenderView;
[10996] Fix | Delete
}
[10997] Fix | Delete
if (preRenderExtra) {
[10998] Fix | Delete
preRenderIndex += scrolledDown ? 1 : -1;
[10999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function