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/wp-conte.../plugins/embedpre.../assets/pdf/build
File: script.js
window.addEventListener("pointerup", pointerUpCallback);
[9000] Fix | Delete
window.addEventListener("blur", pointerUpCallback);
[9001] Fix | Delete
}
[9002] Fix | Delete
moveInDOM() {
[9003] Fix | Delete
if (this.#moveInDOMTimeout) {
[9004] Fix | Delete
clearTimeout(this.#moveInDOMTimeout);
[9005] Fix | Delete
}
[9006] Fix | Delete
this.#moveInDOMTimeout = setTimeout(() => {
[9007] Fix | Delete
this.#moveInDOMTimeout = null;
[9008] Fix | Delete
this.parent?.moveEditorInDOM(this);
[9009] Fix | Delete
}, 0);
[9010] Fix | Delete
}
[9011] Fix | Delete
_setParentAndPosition(parent, x, y) {
[9012] Fix | Delete
parent.changeParent(this);
[9013] Fix | Delete
this.x = x;
[9014] Fix | Delete
this.y = y;
[9015] Fix | Delete
this.fixAndSetPosition();
[9016] Fix | Delete
}
[9017] Fix | Delete
getRect(tx, ty, rotation = this.rotation) {
[9018] Fix | Delete
const scale = this.parentScale;
[9019] Fix | Delete
const [pageWidth, pageHeight] = this.pageDimensions;
[9020] Fix | Delete
const [pageX, pageY] = this.pageTranslation;
[9021] Fix | Delete
const shiftX = tx / scale;
[9022] Fix | Delete
const shiftY = ty / scale;
[9023] Fix | Delete
const x = this.x * pageWidth;
[9024] Fix | Delete
const y = this.y * pageHeight;
[9025] Fix | Delete
const width = this.width * pageWidth;
[9026] Fix | Delete
const height = this.height * pageHeight;
[9027] Fix | Delete
switch (rotation) {
[9028] Fix | Delete
case 0:
[9029] Fix | Delete
return [x + shiftX + pageX, pageHeight - y - shiftY - height + pageY, x + shiftX + width + pageX, pageHeight - y - shiftY + pageY];
[9030] Fix | Delete
case 90:
[9031] Fix | Delete
return [x + shiftY + pageX, pageHeight - y + shiftX + pageY, x + shiftY + height + pageX, pageHeight - y + shiftX + width + pageY];
[9032] Fix | Delete
case 180:
[9033] Fix | Delete
return [x - shiftX - width + pageX, pageHeight - y + shiftY + pageY, x - shiftX + pageX, pageHeight - y + shiftY + height + pageY];
[9034] Fix | Delete
case 270:
[9035] Fix | Delete
return [x - shiftY - height + pageX, pageHeight - y - shiftX - width + pageY, x - shiftY + pageX, pageHeight - y - shiftX + pageY];
[9036] Fix | Delete
default:
[9037] Fix | Delete
throw new Error("Invalid rotation");
[9038] Fix | Delete
}
[9039] Fix | Delete
}
[9040] Fix | Delete
getRectInCurrentCoords(rect, pageHeight) {
[9041] Fix | Delete
const [x1, y1, x2, y2] = rect;
[9042] Fix | Delete
const width = x2 - x1;
[9043] Fix | Delete
const height = y2 - y1;
[9044] Fix | Delete
switch (this.rotation) {
[9045] Fix | Delete
case 0:
[9046] Fix | Delete
return [x1, pageHeight - y2, width, height];
[9047] Fix | Delete
case 90:
[9048] Fix | Delete
return [x1, pageHeight - y1, height, width];
[9049] Fix | Delete
case 180:
[9050] Fix | Delete
return [x2, pageHeight - y1, width, height];
[9051] Fix | Delete
case 270:
[9052] Fix | Delete
return [x2, pageHeight - y2, height, width];
[9053] Fix | Delete
default:
[9054] Fix | Delete
throw new Error("Invalid rotation");
[9055] Fix | Delete
}
[9056] Fix | Delete
}
[9057] Fix | Delete
onceAdded() {}
[9058] Fix | Delete
isEmpty() {
[9059] Fix | Delete
return false;
[9060] Fix | Delete
}
[9061] Fix | Delete
enableEditMode() {
[9062] Fix | Delete
this.#isInEditMode = true;
[9063] Fix | Delete
}
[9064] Fix | Delete
disableEditMode() {
[9065] Fix | Delete
this.#isInEditMode = false;
[9066] Fix | Delete
}
[9067] Fix | Delete
isInEditMode() {
[9068] Fix | Delete
return this.#isInEditMode;
[9069] Fix | Delete
}
[9070] Fix | Delete
shouldGetKeyboardEvents() {
[9071] Fix | Delete
return this.#isResizerEnabledForKeyboard;
[9072] Fix | Delete
}
[9073] Fix | Delete
needsToBeRebuilt() {
[9074] Fix | Delete
return this.div && !this.isAttachedToDOM;
[9075] Fix | Delete
}
[9076] Fix | Delete
rebuild() {
[9077] Fix | Delete
this.div?.addEventListener("focusin", this.#boundFocusin);
[9078] Fix | Delete
this.div?.addEventListener("focusout", this.#boundFocusout);
[9079] Fix | Delete
}
[9080] Fix | Delete
rotate(_angle) {}
[9081] Fix | Delete
serialize(isForCopying = false, context = null) {
[9082] Fix | Delete
unreachable("An editor must be serializable");
[9083] Fix | Delete
}
[9084] Fix | Delete
static deserialize(data, parent, uiManager) {
[9085] Fix | Delete
const editor = new this.prototype.constructor({
[9086] Fix | Delete
parent,
[9087] Fix | Delete
id: parent.getNextId(),
[9088] Fix | Delete
uiManager
[9089] Fix | Delete
});
[9090] Fix | Delete
editor.rotation = data.rotation;
[9091] Fix | Delete
const [pageWidth, pageHeight] = editor.pageDimensions;
[9092] Fix | Delete
const [x, y, width, height] = editor.getRectInCurrentCoords(data.rect, pageHeight);
[9093] Fix | Delete
editor.x = x / pageWidth;
[9094] Fix | Delete
editor.y = y / pageHeight;
[9095] Fix | Delete
editor.width = width / pageWidth;
[9096] Fix | Delete
editor.height = height / pageHeight;
[9097] Fix | Delete
return editor;
[9098] Fix | Delete
}
[9099] Fix | Delete
get hasBeenModified() {
[9100] Fix | Delete
return !!this.annotationElementId && (this.deleted || this.serialize() !== null);
[9101] Fix | Delete
}
[9102] Fix | Delete
remove() {
[9103] Fix | Delete
this.div.removeEventListener("focusin", this.#boundFocusin);
[9104] Fix | Delete
this.div.removeEventListener("focusout", this.#boundFocusout);
[9105] Fix | Delete
if (!this.isEmpty()) {
[9106] Fix | Delete
this.commit();
[9107] Fix | Delete
}
[9108] Fix | Delete
if (this.parent) {
[9109] Fix | Delete
this.parent.remove(this);
[9110] Fix | Delete
} else {
[9111] Fix | Delete
this._uiManager.removeEditor(this);
[9112] Fix | Delete
}
[9113] Fix | Delete
if (this.#moveInDOMTimeout) {
[9114] Fix | Delete
clearTimeout(this.#moveInDOMTimeout);
[9115] Fix | Delete
this.#moveInDOMTimeout = null;
[9116] Fix | Delete
}
[9117] Fix | Delete
this.#stopResizing();
[9118] Fix | Delete
this.removeEditToolbar();
[9119] Fix | Delete
if (this.#telemetryTimeouts) {
[9120] Fix | Delete
for (const timeout of this.#telemetryTimeouts.values()) {
[9121] Fix | Delete
clearTimeout(timeout);
[9122] Fix | Delete
}
[9123] Fix | Delete
this.#telemetryTimeouts = null;
[9124] Fix | Delete
}
[9125] Fix | Delete
this.parent = null;
[9126] Fix | Delete
}
[9127] Fix | Delete
get isResizable() {
[9128] Fix | Delete
return false;
[9129] Fix | Delete
}
[9130] Fix | Delete
makeResizable() {
[9131] Fix | Delete
if (this.isResizable) {
[9132] Fix | Delete
this.#createResizers();
[9133] Fix | Delete
this.#resizersDiv.classList.remove("hidden");
[9134] Fix | Delete
bindEvents(this, this.div, ["keydown"]);
[9135] Fix | Delete
}
[9136] Fix | Delete
}
[9137] Fix | Delete
get toolbarPosition() {
[9138] Fix | Delete
return null;
[9139] Fix | Delete
}
[9140] Fix | Delete
keydown(event) {
[9141] Fix | Delete
if (!this.isResizable || event.target !== this.div || event.key !== "Enter") {
[9142] Fix | Delete
return;
[9143] Fix | Delete
}
[9144] Fix | Delete
this._uiManager.setSelected(this);
[9145] Fix | Delete
this.#savedDimensions = {
[9146] Fix | Delete
savedX: this.x,
[9147] Fix | Delete
savedY: this.y,
[9148] Fix | Delete
savedWidth: this.width,
[9149] Fix | Delete
savedHeight: this.height
[9150] Fix | Delete
};
[9151] Fix | Delete
const children = this.#resizersDiv.children;
[9152] Fix | Delete
if (!this.#allResizerDivs) {
[9153] Fix | Delete
this.#allResizerDivs = Array.from(children);
[9154] Fix | Delete
const boundResizerKeydown = this.#resizerKeydown.bind(this);
[9155] Fix | Delete
const boundResizerBlur = this.#resizerBlur.bind(this);
[9156] Fix | Delete
for (const div of this.#allResizerDivs) {
[9157] Fix | Delete
const name = div.getAttribute("data-resizer-name");
[9158] Fix | Delete
div.setAttribute("role", "spinbutton");
[9159] Fix | Delete
div.addEventListener("keydown", boundResizerKeydown);
[9160] Fix | Delete
div.addEventListener("blur", boundResizerBlur);
[9161] Fix | Delete
div.addEventListener("focus", this.#resizerFocus.bind(this, name));
[9162] Fix | Delete
AnnotationEditor._l10nPromise.get(`pdfjs-editor-resizer-label-${name}`).then(msg => div.setAttribute("aria-label", msg));
[9163] Fix | Delete
}
[9164] Fix | Delete
}
[9165] Fix | Delete
const first = this.#allResizerDivs[0];
[9166] Fix | Delete
let firstPosition = 0;
[9167] Fix | Delete
for (const div of children) {
[9168] Fix | Delete
if (div === first) {
[9169] Fix | Delete
break;
[9170] Fix | Delete
}
[9171] Fix | Delete
firstPosition++;
[9172] Fix | Delete
}
[9173] Fix | Delete
const nextFirstPosition = (360 - this.rotation + this.parentRotation) % 360 / 90 * (this.#allResizerDivs.length / 4);
[9174] Fix | Delete
if (nextFirstPosition !== firstPosition) {
[9175] Fix | Delete
if (nextFirstPosition < firstPosition) {
[9176] Fix | Delete
for (let i = 0; i < firstPosition - nextFirstPosition; i++) {
[9177] Fix | Delete
this.#resizersDiv.append(this.#resizersDiv.firstChild);
[9178] Fix | Delete
}
[9179] Fix | Delete
} else if (nextFirstPosition > firstPosition) {
[9180] Fix | Delete
for (let i = 0; i < nextFirstPosition - firstPosition; i++) {
[9181] Fix | Delete
this.#resizersDiv.firstChild.before(this.#resizersDiv.lastChild);
[9182] Fix | Delete
}
[9183] Fix | Delete
}
[9184] Fix | Delete
let i = 0;
[9185] Fix | Delete
for (const child of children) {
[9186] Fix | Delete
const div = this.#allResizerDivs[i++];
[9187] Fix | Delete
const name = div.getAttribute("data-resizer-name");
[9188] Fix | Delete
AnnotationEditor._l10nPromise.get(`pdfjs-editor-resizer-label-${name}`).then(msg => child.setAttribute("aria-label", msg));
[9189] Fix | Delete
}
[9190] Fix | Delete
}
[9191] Fix | Delete
this.#setResizerTabIndex(0);
[9192] Fix | Delete
this.#isResizerEnabledForKeyboard = true;
[9193] Fix | Delete
this.#resizersDiv.firstChild.focus({
[9194] Fix | Delete
focusVisible: true
[9195] Fix | Delete
});
[9196] Fix | Delete
event.preventDefault();
[9197] Fix | Delete
event.stopImmediatePropagation();
[9198] Fix | Delete
}
[9199] Fix | Delete
#resizerKeydown(event) {
[9200] Fix | Delete
AnnotationEditor._resizerKeyboardManager.exec(this, event);
[9201] Fix | Delete
}
[9202] Fix | Delete
#resizerBlur(event) {
[9203] Fix | Delete
if (this.#isResizerEnabledForKeyboard && event.relatedTarget?.parentNode !== this.#resizersDiv) {
[9204] Fix | Delete
this.#stopResizing();
[9205] Fix | Delete
}
[9206] Fix | Delete
}
[9207] Fix | Delete
#resizerFocus(name) {
[9208] Fix | Delete
this.#focusedResizerName = this.#isResizerEnabledForKeyboard ? name : "";
[9209] Fix | Delete
}
[9210] Fix | Delete
#setResizerTabIndex(value) {
[9211] Fix | Delete
if (!this.#allResizerDivs) {
[9212] Fix | Delete
return;
[9213] Fix | Delete
}
[9214] Fix | Delete
for (const div of this.#allResizerDivs) {
[9215] Fix | Delete
div.tabIndex = value;
[9216] Fix | Delete
}
[9217] Fix | Delete
}
[9218] Fix | Delete
_resizeWithKeyboard(x, y) {
[9219] Fix | Delete
if (!this.#isResizerEnabledForKeyboard) {
[9220] Fix | Delete
return;
[9221] Fix | Delete
}
[9222] Fix | Delete
this.#resizerPointermove(this.#focusedResizerName, {
[9223] Fix | Delete
movementX: x,
[9224] Fix | Delete
movementY: y
[9225] Fix | Delete
});
[9226] Fix | Delete
}
[9227] Fix | Delete
#stopResizing() {
[9228] Fix | Delete
this.#isResizerEnabledForKeyboard = false;
[9229] Fix | Delete
this.#setResizerTabIndex(-1);
[9230] Fix | Delete
if (this.#savedDimensions) {
[9231] Fix | Delete
const {
[9232] Fix | Delete
savedX,
[9233] Fix | Delete
savedY,
[9234] Fix | Delete
savedWidth,
[9235] Fix | Delete
savedHeight
[9236] Fix | Delete
} = this.#savedDimensions;
[9237] Fix | Delete
this.#addResizeToUndoStack(savedX, savedY, savedWidth, savedHeight);
[9238] Fix | Delete
this.#savedDimensions = null;
[9239] Fix | Delete
}
[9240] Fix | Delete
}
[9241] Fix | Delete
_stopResizingWithKeyboard() {
[9242] Fix | Delete
this.#stopResizing();
[9243] Fix | Delete
this.div.focus();
[9244] Fix | Delete
}
[9245] Fix | Delete
select() {
[9246] Fix | Delete
this.makeResizable();
[9247] Fix | Delete
this.div?.classList.add("selectedEditor");
[9248] Fix | Delete
if (!this.#editToolbar) {
[9249] Fix | Delete
this.addEditToolbar().then(() => {
[9250] Fix | Delete
if (this.div?.classList.contains("selectedEditor")) {
[9251] Fix | Delete
this.#editToolbar?.show();
[9252] Fix | Delete
}
[9253] Fix | Delete
});
[9254] Fix | Delete
return;
[9255] Fix | Delete
}
[9256] Fix | Delete
this.#editToolbar?.show();
[9257] Fix | Delete
}
[9258] Fix | Delete
unselect() {
[9259] Fix | Delete
this.#resizersDiv?.classList.add("hidden");
[9260] Fix | Delete
this.div?.classList.remove("selectedEditor");
[9261] Fix | Delete
if (this.div?.contains(document.activeElement)) {
[9262] Fix | Delete
this._uiManager.currentLayer.div.focus({
[9263] Fix | Delete
preventScroll: true
[9264] Fix | Delete
});
[9265] Fix | Delete
}
[9266] Fix | Delete
this.#editToolbar?.hide();
[9267] Fix | Delete
}
[9268] Fix | Delete
updateParams(type, value) {}
[9269] Fix | Delete
disableEditing() {}
[9270] Fix | Delete
enableEditing() {}
[9271] Fix | Delete
enterInEditMode() {}
[9272] Fix | Delete
getImageForAltText() {
[9273] Fix | Delete
return null;
[9274] Fix | Delete
}
[9275] Fix | Delete
get contentDiv() {
[9276] Fix | Delete
return this.div;
[9277] Fix | Delete
}
[9278] Fix | Delete
get isEditing() {
[9279] Fix | Delete
return this.#isEditing;
[9280] Fix | Delete
}
[9281] Fix | Delete
set isEditing(value) {
[9282] Fix | Delete
this.#isEditing = value;
[9283] Fix | Delete
if (!this.parent) {
[9284] Fix | Delete
return;
[9285] Fix | Delete
}
[9286] Fix | Delete
if (value) {
[9287] Fix | Delete
this.parent.setSelected(this);
[9288] Fix | Delete
this.parent.setActiveEditor(this);
[9289] Fix | Delete
} else {
[9290] Fix | Delete
this.parent.setActiveEditor(null);
[9291] Fix | Delete
}
[9292] Fix | Delete
}
[9293] Fix | Delete
setAspectRatio(width, height) {
[9294] Fix | Delete
this.#keepAspectRatio = true;
[9295] Fix | Delete
const aspectRatio = width / height;
[9296] Fix | Delete
const {
[9297] Fix | Delete
style
[9298] Fix | Delete
} = this.div;
[9299] Fix | Delete
style.aspectRatio = aspectRatio;
[9300] Fix | Delete
style.height = "auto";
[9301] Fix | Delete
}
[9302] Fix | Delete
static get MIN_SIZE() {
[9303] Fix | Delete
return 16;
[9304] Fix | Delete
}
[9305] Fix | Delete
static canCreateNewEmptyEditor() {
[9306] Fix | Delete
return true;
[9307] Fix | Delete
}
[9308] Fix | Delete
get telemetryInitialData() {
[9309] Fix | Delete
return {
[9310] Fix | Delete
action: "added"
[9311] Fix | Delete
};
[9312] Fix | Delete
}
[9313] Fix | Delete
get telemetryFinalData() {
[9314] Fix | Delete
return null;
[9315] Fix | Delete
}
[9316] Fix | Delete
_reportTelemetry(data, mustWait = false) {
[9317] Fix | Delete
if (mustWait) {
[9318] Fix | Delete
this.#telemetryTimeouts ||= new Map();
[9319] Fix | Delete
const {
[9320] Fix | Delete
action
[9321] Fix | Delete
} = data;
[9322] Fix | Delete
let timeout = this.#telemetryTimeouts.get(action);
[9323] Fix | Delete
if (timeout) {
[9324] Fix | Delete
clearTimeout(timeout);
[9325] Fix | Delete
}
[9326] Fix | Delete
timeout = setTimeout(() => {
[9327] Fix | Delete
this._reportTelemetry(data);
[9328] Fix | Delete
this.#telemetryTimeouts.delete(action);
[9329] Fix | Delete
if (this.#telemetryTimeouts.size === 0) {
[9330] Fix | Delete
this.#telemetryTimeouts = null;
[9331] Fix | Delete
}
[9332] Fix | Delete
}, AnnotationEditor._telemetryTimeout);
[9333] Fix | Delete
this.#telemetryTimeouts.set(action, timeout);
[9334] Fix | Delete
return;
[9335] Fix | Delete
}
[9336] Fix | Delete
data.type ||= this.editorType;
[9337] Fix | Delete
this._uiManager._eventBus.dispatch("reporttelemetry", {
[9338] Fix | Delete
source: this,
[9339] Fix | Delete
details: {
[9340] Fix | Delete
type: "editing",
[9341] Fix | Delete
data
[9342] Fix | Delete
}
[9343] Fix | Delete
});
[9344] Fix | Delete
}
[9345] Fix | Delete
show(visible = this._isVisible) {
[9346] Fix | Delete
this.div.classList.toggle("hidden", !visible);
[9347] Fix | Delete
this._isVisible = visible;
[9348] Fix | Delete
}
[9349] Fix | Delete
enable() {
[9350] Fix | Delete
if (this.div) {
[9351] Fix | Delete
this.div.tabIndex = 0;
[9352] Fix | Delete
}
[9353] Fix | Delete
this.#disabled = false;
[9354] Fix | Delete
}
[9355] Fix | Delete
disable() {
[9356] Fix | Delete
if (this.div) {
[9357] Fix | Delete
this.div.tabIndex = -1;
[9358] Fix | Delete
}
[9359] Fix | Delete
this.#disabled = true;
[9360] Fix | Delete
}
[9361] Fix | Delete
renderAnnotationElement(annotation) {
[9362] Fix | Delete
let content = annotation.container.querySelector(".annotationContent");
[9363] Fix | Delete
if (!content) {
[9364] Fix | Delete
content = document.createElement("div");
[9365] Fix | Delete
content.classList.add("annotationContent", this.editorType);
[9366] Fix | Delete
annotation.container.prepend(content);
[9367] Fix | Delete
} else if (content.nodeName === "CANVAS") {
[9368] Fix | Delete
const canvas = content;
[9369] Fix | Delete
content = document.createElement("div");
[9370] Fix | Delete
content.classList.add("annotationContent", this.editorType);
[9371] Fix | Delete
canvas.before(content);
[9372] Fix | Delete
}
[9373] Fix | Delete
return content;
[9374] Fix | Delete
}
[9375] Fix | Delete
resetAnnotationElement(annotation) {
[9376] Fix | Delete
const {
[9377] Fix | Delete
firstChild
[9378] Fix | Delete
} = annotation.container;
[9379] Fix | Delete
if (firstChild.nodeName === "DIV" && firstChild.classList.contains("annotationContent")) {
[9380] Fix | Delete
firstChild.remove();
[9381] Fix | Delete
}
[9382] Fix | Delete
}
[9383] Fix | Delete
}
[9384] Fix | Delete
class FakeEditor extends AnnotationEditor {
[9385] Fix | Delete
constructor(params) {
[9386] Fix | Delete
super(params);
[9387] Fix | Delete
this.annotationElementId = params.annotationElementId;
[9388] Fix | Delete
this.deleted = true;
[9389] Fix | Delete
}
[9390] Fix | Delete
serialize() {
[9391] Fix | Delete
return {
[9392] Fix | Delete
id: this.annotationElementId,
[9393] Fix | Delete
deleted: true,
[9394] Fix | Delete
pageIndex: this.pageIndex
[9395] Fix | Delete
};
[9396] Fix | Delete
}
[9397] Fix | Delete
}
[9398] Fix | Delete
[9399] Fix | Delete
;// CONCATENATED MODULE: ./src/shared/murmurhash3.js
[9400] Fix | Delete
[9401] Fix | Delete
[9402] Fix | Delete
[9403] Fix | Delete
[9404] Fix | Delete
[9405] Fix | Delete
[9406] Fix | Delete
const SEED = 0xc3d2e1f0;
[9407] Fix | Delete
const MASK_HIGH = 0xffff0000;
[9408] Fix | Delete
const MASK_LOW = 0xffff;
[9409] Fix | Delete
class MurmurHash3_64 {
[9410] Fix | Delete
constructor(seed) {
[9411] Fix | Delete
this.h1 = seed ? seed & 0xffffffff : SEED;
[9412] Fix | Delete
this.h2 = seed ? seed & 0xffffffff : SEED;
[9413] Fix | Delete
}
[9414] Fix | Delete
update(input) {
[9415] Fix | Delete
let data, length;
[9416] Fix | Delete
if (typeof input === "string") {
[9417] Fix | Delete
data = new Uint8Array(input.length * 2);
[9418] Fix | Delete
length = 0;
[9419] Fix | Delete
for (let i = 0, ii = input.length; i < ii; i++) {
[9420] Fix | Delete
const code = input.charCodeAt(i);
[9421] Fix | Delete
if (code <= 0xff) {
[9422] Fix | Delete
data[length++] = code;
[9423] Fix | Delete
} else {
[9424] Fix | Delete
data[length++] = code >>> 8;
[9425] Fix | Delete
data[length++] = code & 0xff;
[9426] Fix | Delete
}
[9427] Fix | Delete
}
[9428] Fix | Delete
} else if (ArrayBuffer.isView(input)) {
[9429] Fix | Delete
data = input.slice();
[9430] Fix | Delete
length = data.byteLength;
[9431] Fix | Delete
} else {
[9432] Fix | Delete
throw new Error("Invalid data format, must be a string or TypedArray.");
[9433] Fix | Delete
}
[9434] Fix | Delete
const blockCounts = length >> 2;
[9435] Fix | Delete
const tailLength = length - blockCounts * 4;
[9436] Fix | Delete
const dataUint32 = new Uint32Array(data.buffer, 0, blockCounts);
[9437] Fix | Delete
let k1 = 0,
[9438] Fix | Delete
k2 = 0;
[9439] Fix | Delete
let h1 = this.h1,
[9440] Fix | Delete
h2 = this.h2;
[9441] Fix | Delete
const C1 = 0xcc9e2d51,
[9442] Fix | Delete
C2 = 0x1b873593;
[9443] Fix | Delete
const C1_LOW = C1 & MASK_LOW,
[9444] Fix | Delete
C2_LOW = C2 & MASK_LOW;
[9445] Fix | Delete
for (let i = 0; i < blockCounts; i++) {
[9446] Fix | Delete
if (i & 1) {
[9447] Fix | Delete
k1 = dataUint32[i];
[9448] Fix | Delete
k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW;
[9449] Fix | Delete
k1 = k1 << 15 | k1 >>> 17;
[9450] Fix | Delete
k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW;
[9451] Fix | Delete
h1 ^= k1;
[9452] Fix | Delete
h1 = h1 << 13 | h1 >>> 19;
[9453] Fix | Delete
h1 = h1 * 5 + 0xe6546b64;
[9454] Fix | Delete
} else {
[9455] Fix | Delete
k2 = dataUint32[i];
[9456] Fix | Delete
k2 = k2 * C1 & MASK_HIGH | k2 * C1_LOW & MASK_LOW;
[9457] Fix | Delete
k2 = k2 << 15 | k2 >>> 17;
[9458] Fix | Delete
k2 = k2 * C2 & MASK_HIGH | k2 * C2_LOW & MASK_LOW;
[9459] Fix | Delete
h2 ^= k2;
[9460] Fix | Delete
h2 = h2 << 13 | h2 >>> 19;
[9461] Fix | Delete
h2 = h2 * 5 + 0xe6546b64;
[9462] Fix | Delete
}
[9463] Fix | Delete
}
[9464] Fix | Delete
k1 = 0;
[9465] Fix | Delete
switch (tailLength) {
[9466] Fix | Delete
case 3:
[9467] Fix | Delete
k1 ^= data[blockCounts * 4 + 2] << 16;
[9468] Fix | Delete
case 2:
[9469] Fix | Delete
k1 ^= data[blockCounts * 4 + 1] << 8;
[9470] Fix | Delete
case 1:
[9471] Fix | Delete
k1 ^= data[blockCounts * 4];
[9472] Fix | Delete
k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW;
[9473] Fix | Delete
k1 = k1 << 15 | k1 >>> 17;
[9474] Fix | Delete
k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW;
[9475] Fix | Delete
if (blockCounts & 1) {
[9476] Fix | Delete
h1 ^= k1;
[9477] Fix | Delete
} else {
[9478] Fix | Delete
h2 ^= k1;
[9479] Fix | Delete
}
[9480] Fix | Delete
}
[9481] Fix | Delete
this.h1 = h1;
[9482] Fix | Delete
this.h2 = h2;
[9483] Fix | Delete
}
[9484] Fix | Delete
hexdigest() {
[9485] Fix | Delete
let h1 = this.h1,
[9486] Fix | Delete
h2 = this.h2;
[9487] Fix | Delete
h1 ^= h2 >>> 1;
[9488] Fix | Delete
h1 = h1 * 0xed558ccd & MASK_HIGH | h1 * 0x8ccd & MASK_LOW;
[9489] Fix | Delete
h2 = h2 * 0xff51afd7 & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xafd7ed55 & MASK_HIGH) >>> 16;
[9490] Fix | Delete
h1 ^= h2 >>> 1;
[9491] Fix | Delete
h1 = h1 * 0x1a85ec53 & MASK_HIGH | h1 * 0xec53 & MASK_LOW;
[9492] Fix | Delete
h2 = h2 * 0xc4ceb9fe & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xb9fe1a85 & MASK_HIGH) >>> 16;
[9493] Fix | Delete
h1 ^= h2 >>> 1;
[9494] Fix | Delete
return (h1 >>> 0).toString(16).padStart(8, "0") + (h2 >>> 0).toString(16).padStart(8, "0");
[9495] Fix | Delete
}
[9496] Fix | Delete
}
[9497] Fix | Delete
[9498] Fix | Delete
;// CONCATENATED MODULE: ./src/display/annotation_storage.js
[9499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function