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: pdf.worker.js
const ccittEOL = -2;
[8000] Fix | Delete
const ccittEOF = -1;
[8001] Fix | Delete
const twoDimPass = 0;
[8002] Fix | Delete
const twoDimHoriz = 1;
[8003] Fix | Delete
const twoDimVert0 = 2;
[8004] Fix | Delete
const twoDimVertR1 = 3;
[8005] Fix | Delete
const twoDimVertL1 = 4;
[8006] Fix | Delete
const twoDimVertR2 = 5;
[8007] Fix | Delete
const twoDimVertL2 = 6;
[8008] Fix | Delete
const twoDimVertR3 = 7;
[8009] Fix | Delete
const twoDimVertL3 = 8;
[8010] Fix | Delete
const twoDimTable = [[-1, -1], [-1, -1], [7, twoDimVertL3], [7, twoDimVertR3], [6, twoDimVertL2], [6, twoDimVertL2], [6, twoDimVertR2], [6, twoDimVertR2], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0]];
[8011] Fix | Delete
const whiteTable1 = [[-1, -1], [12, ccittEOL], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [11, 1792], [11, 1792], [12, 1984], [12, 2048], [12, 2112], [12, 2176], [12, 2240], [12, 2304], [11, 1856], [11, 1856], [11, 1920], [11, 1920], [12, 2368], [12, 2432], [12, 2496], [12, 2560]];
[8012] Fix | Delete
const whiteTable2 = [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [8, 29], [8, 29], [8, 30], [8, 30], [8, 45], [8, 45], [8, 46], [8, 46], [7, 22], [7, 22], [7, 22], [7, 22], [7, 23], [7, 23], [7, 23], [7, 23], [8, 47], [8, 47], [8, 48], [8, 48], [6, 13], [6, 13], [6, 13], [6, 13], [6, 13], [6, 13], [6, 13], [6, 13], [7, 20], [7, 20], [7, 20], [7, 20], [8, 33], [8, 33], [8, 34], [8, 34], [8, 35], [8, 35], [8, 36], [8, 36], [8, 37], [8, 37], [8, 38], [8, 38], [7, 19], [7, 19], [7, 19], [7, 19], [8, 31], [8, 31], [8, 32], [8, 32], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [6, 12], [6, 12], [6, 12], [6, 12], [6, 12], [6, 12], [6, 12], [6, 12], [8, 53], [8, 53], [8, 54], [8, 54], [7, 26], [7, 26], [7, 26], [7, 26], [8, 39], [8, 39], [8, 40], [8, 40], [8, 41], [8, 41], [8, 42], [8, 42], [8, 43], [8, 43], [8, 44], [8, 44], [7, 21], [7, 21], [7, 21], [7, 21], [7, 28], [7, 28], [7, 28], [7, 28], [8, 61], [8, 61], [8, 62], [8, 62], [8, 63], [8, 63], [8, 0], [8, 0], [8, 320], [8, 320], [8, 384], [8, 384], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [7, 27], [7, 27], [7, 27], [7, 27], [8, 59], [8, 59], [8, 60], [8, 60], [9, 1472], [9, 1536], [9, 1600], [9, 1728], [7, 18], [7, 18], [7, 18], [7, 18], [7, 24], [7, 24], [7, 24], [7, 24], [8, 49], [8, 49], [8, 50], [8, 50], [8, 51], [8, 51], [8, 52], [8, 52], [7, 25], [7, 25], [7, 25], [7, 25], [8, 55], [8, 55], [8, 56], [8, 56], [8, 57], [8, 57], [8, 58], [8, 58], [6, 192], [6, 192], [6, 192], [6, 192], [6, 192], [6, 192], [6, 192], [6, 192], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [8, 448], [8, 448], [8, 512], [8, 512], [9, 704], [9, 768], [8, 640], [8, 640], [8, 576], [8, 576], [9, 832], [9, 896], [9, 960], [9, 1024], [9, 1088], [9, 1152], [9, 1216], [9, 1280], [9, 1344], [9, 1408], [7, 256], [7, 256], [7, 256], [7, 256], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [6, 16], [6, 16], [6, 16], [6, 16], [6, 16], [6, 16], [6, 16], [6, 16], [6, 17], [6, 17], [6, 17], [6, 17], [6, 17], [6, 17], [6, 17], [6, 17], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [6, 14], [6, 14], [6, 14], [6, 14], [6, 14], [6, 14], [6, 14], [6, 14], [6, 15], [6, 15], [6, 15], [6, 15], [6, 15], [6, 15], [6, 15], [6, 15], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7]];
[8013] Fix | Delete
const blackTable1 = [[-1, -1], [-1, -1], [12, ccittEOL], [12, ccittEOL], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [11, 1792], [11, 1792], [11, 1792], [11, 1792], [12, 1984], [12, 1984], [12, 2048], [12, 2048], [12, 2112], [12, 2112], [12, 2176], [12, 2176], [12, 2240], [12, 2240], [12, 2304], [12, 2304], [11, 1856], [11, 1856], [11, 1856], [11, 1856], [11, 1920], [11, 1920], [11, 1920], [11, 1920], [12, 2368], [12, 2368], [12, 2432], [12, 2432], [12, 2496], [12, 2496], [12, 2560], [12, 2560], [10, 18], [10, 18], [10, 18], [10, 18], [10, 18], [10, 18], [10, 18], [10, 18], [12, 52], [12, 52], [13, 640], [13, 704], [13, 768], [13, 832], [12, 55], [12, 55], [12, 56], [12, 56], [13, 1280], [13, 1344], [13, 1408], [13, 1472], [12, 59], [12, 59], [12, 60], [12, 60], [13, 1536], [13, 1600], [11, 24], [11, 24], [11, 24], [11, 24], [11, 25], [11, 25], [11, 25], [11, 25], [13, 1664], [13, 1728], [12, 320], [12, 320], [12, 384], [12, 384], [12, 448], [12, 448], [13, 512], [13, 576], [12, 53], [12, 53], [12, 54], [12, 54], [13, 896], [13, 960], [13, 1024], [13, 1088], [13, 1152], [13, 1216], [10, 64], [10, 64], [10, 64], [10, 64], [10, 64], [10, 64], [10, 64], [10, 64]];
[8014] Fix | Delete
const blackTable2 = [[8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [11, 23], [11, 23], [12, 50], [12, 51], [12, 44], [12, 45], [12, 46], [12, 47], [12, 57], [12, 58], [12, 61], [12, 256], [10, 16], [10, 16], [10, 16], [10, 16], [10, 17], [10, 17], [10, 17], [10, 17], [12, 48], [12, 49], [12, 62], [12, 63], [12, 30], [12, 31], [12, 32], [12, 33], [12, 40], [12, 41], [11, 22], [11, 22], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [9, 15], [9, 15], [9, 15], [9, 15], [9, 15], [9, 15], [9, 15], [9, 15], [12, 128], [12, 192], [12, 26], [12, 27], [12, 28], [12, 29], [11, 19], [11, 19], [11, 20], [11, 20], [12, 34], [12, 35], [12, 36], [12, 37], [12, 38], [12, 39], [11, 21], [11, 21], [12, 42], [12, 43], [10, 0], [10, 0], [10, 0], [10, 0], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12]];
[8015] Fix | Delete
const blackTable3 = [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [6, 9], [6, 8], [5, 7], [5, 7], [4, 6], [4, 6], [4, 6], [4, 6], [4, 5], [4, 5], [4, 5], [4, 5], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 4], [3, 4], [3, 4], [3, 4], [3, 4], [3, 4], [3, 4], [3, 4], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2]];
[8016] Fix | Delete
class CCITTFaxDecoder {
[8017] Fix | Delete
constructor(source, options = {}) {
[8018] Fix | Delete
if (!source || typeof source.next !== "function") {
[8019] Fix | Delete
throw new Error('CCITTFaxDecoder - invalid "source" parameter.');
[8020] Fix | Delete
}
[8021] Fix | Delete
this.source = source;
[8022] Fix | Delete
this.eof = false;
[8023] Fix | Delete
this.encoding = options.K || 0;
[8024] Fix | Delete
this.eoline = options.EndOfLine || false;
[8025] Fix | Delete
this.byteAlign = options.EncodedByteAlign || false;
[8026] Fix | Delete
this.columns = options.Columns || 1728;
[8027] Fix | Delete
this.rows = options.Rows || 0;
[8028] Fix | Delete
this.eoblock = options.EndOfBlock ?? true;
[8029] Fix | Delete
this.black = options.BlackIs1 || false;
[8030] Fix | Delete
this.codingLine = new Uint32Array(this.columns + 1);
[8031] Fix | Delete
this.refLine = new Uint32Array(this.columns + 2);
[8032] Fix | Delete
this.codingLine[0] = this.columns;
[8033] Fix | Delete
this.codingPos = 0;
[8034] Fix | Delete
this.row = 0;
[8035] Fix | Delete
this.nextLine2D = this.encoding < 0;
[8036] Fix | Delete
this.inputBits = 0;
[8037] Fix | Delete
this.inputBuf = 0;
[8038] Fix | Delete
this.outputBits = 0;
[8039] Fix | Delete
this.rowsDone = false;
[8040] Fix | Delete
let code1;
[8041] Fix | Delete
while ((code1 = this._lookBits(12)) === 0) {
[8042] Fix | Delete
this._eatBits(1);
[8043] Fix | Delete
}
[8044] Fix | Delete
if (code1 === 1) {
[8045] Fix | Delete
this._eatBits(12);
[8046] Fix | Delete
}
[8047] Fix | Delete
if (this.encoding > 0) {
[8048] Fix | Delete
this.nextLine2D = !this._lookBits(1);
[8049] Fix | Delete
this._eatBits(1);
[8050] Fix | Delete
}
[8051] Fix | Delete
}
[8052] Fix | Delete
readNextChar() {
[8053] Fix | Delete
if (this.eof) {
[8054] Fix | Delete
return -1;
[8055] Fix | Delete
}
[8056] Fix | Delete
const refLine = this.refLine;
[8057] Fix | Delete
const codingLine = this.codingLine;
[8058] Fix | Delete
const columns = this.columns;
[8059] Fix | Delete
let refPos, blackPixels, bits, i;
[8060] Fix | Delete
if (this.outputBits === 0) {
[8061] Fix | Delete
if (this.rowsDone) {
[8062] Fix | Delete
this.eof = true;
[8063] Fix | Delete
}
[8064] Fix | Delete
if (this.eof) {
[8065] Fix | Delete
return -1;
[8066] Fix | Delete
}
[8067] Fix | Delete
this.err = false;
[8068] Fix | Delete
let code1, code2, code3;
[8069] Fix | Delete
if (this.nextLine2D) {
[8070] Fix | Delete
for (i = 0; codingLine[i] < columns; ++i) {
[8071] Fix | Delete
refLine[i] = codingLine[i];
[8072] Fix | Delete
}
[8073] Fix | Delete
refLine[i++] = columns;
[8074] Fix | Delete
refLine[i] = columns;
[8075] Fix | Delete
codingLine[0] = 0;
[8076] Fix | Delete
this.codingPos = 0;
[8077] Fix | Delete
refPos = 0;
[8078] Fix | Delete
blackPixels = 0;
[8079] Fix | Delete
while (codingLine[this.codingPos] < columns) {
[8080] Fix | Delete
code1 = this._getTwoDimCode();
[8081] Fix | Delete
switch (code1) {
[8082] Fix | Delete
case twoDimPass:
[8083] Fix | Delete
this._addPixels(refLine[refPos + 1], blackPixels);
[8084] Fix | Delete
if (refLine[refPos + 1] < columns) {
[8085] Fix | Delete
refPos += 2;
[8086] Fix | Delete
}
[8087] Fix | Delete
break;
[8088] Fix | Delete
case twoDimHoriz:
[8089] Fix | Delete
code1 = code2 = 0;
[8090] Fix | Delete
if (blackPixels) {
[8091] Fix | Delete
do {
[8092] Fix | Delete
code1 += code3 = this._getBlackCode();
[8093] Fix | Delete
} while (code3 >= 64);
[8094] Fix | Delete
do {
[8095] Fix | Delete
code2 += code3 = this._getWhiteCode();
[8096] Fix | Delete
} while (code3 >= 64);
[8097] Fix | Delete
} else {
[8098] Fix | Delete
do {
[8099] Fix | Delete
code1 += code3 = this._getWhiteCode();
[8100] Fix | Delete
} while (code3 >= 64);
[8101] Fix | Delete
do {
[8102] Fix | Delete
code2 += code3 = this._getBlackCode();
[8103] Fix | Delete
} while (code3 >= 64);
[8104] Fix | Delete
}
[8105] Fix | Delete
this._addPixels(codingLine[this.codingPos] + code1, blackPixels);
[8106] Fix | Delete
if (codingLine[this.codingPos] < columns) {
[8107] Fix | Delete
this._addPixels(codingLine[this.codingPos] + code2, blackPixels ^ 1);
[8108] Fix | Delete
}
[8109] Fix | Delete
while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) {
[8110] Fix | Delete
refPos += 2;
[8111] Fix | Delete
}
[8112] Fix | Delete
break;
[8113] Fix | Delete
case twoDimVertR3:
[8114] Fix | Delete
this._addPixels(refLine[refPos] + 3, blackPixels);
[8115] Fix | Delete
blackPixels ^= 1;
[8116] Fix | Delete
if (codingLine[this.codingPos] < columns) {
[8117] Fix | Delete
++refPos;
[8118] Fix | Delete
while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) {
[8119] Fix | Delete
refPos += 2;
[8120] Fix | Delete
}
[8121] Fix | Delete
}
[8122] Fix | Delete
break;
[8123] Fix | Delete
case twoDimVertR2:
[8124] Fix | Delete
this._addPixels(refLine[refPos] + 2, blackPixels);
[8125] Fix | Delete
blackPixels ^= 1;
[8126] Fix | Delete
if (codingLine[this.codingPos] < columns) {
[8127] Fix | Delete
++refPos;
[8128] Fix | Delete
while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) {
[8129] Fix | Delete
refPos += 2;
[8130] Fix | Delete
}
[8131] Fix | Delete
}
[8132] Fix | Delete
break;
[8133] Fix | Delete
case twoDimVertR1:
[8134] Fix | Delete
this._addPixels(refLine[refPos] + 1, blackPixels);
[8135] Fix | Delete
blackPixels ^= 1;
[8136] Fix | Delete
if (codingLine[this.codingPos] < columns) {
[8137] Fix | Delete
++refPos;
[8138] Fix | Delete
while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) {
[8139] Fix | Delete
refPos += 2;
[8140] Fix | Delete
}
[8141] Fix | Delete
}
[8142] Fix | Delete
break;
[8143] Fix | Delete
case twoDimVert0:
[8144] Fix | Delete
this._addPixels(refLine[refPos], blackPixels);
[8145] Fix | Delete
blackPixels ^= 1;
[8146] Fix | Delete
if (codingLine[this.codingPos] < columns) {
[8147] Fix | Delete
++refPos;
[8148] Fix | Delete
while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) {
[8149] Fix | Delete
refPos += 2;
[8150] Fix | Delete
}
[8151] Fix | Delete
}
[8152] Fix | Delete
break;
[8153] Fix | Delete
case twoDimVertL3:
[8154] Fix | Delete
this._addPixelsNeg(refLine[refPos] - 3, blackPixels);
[8155] Fix | Delete
blackPixels ^= 1;
[8156] Fix | Delete
if (codingLine[this.codingPos] < columns) {
[8157] Fix | Delete
if (refPos > 0) {
[8158] Fix | Delete
--refPos;
[8159] Fix | Delete
} else {
[8160] Fix | Delete
++refPos;
[8161] Fix | Delete
}
[8162] Fix | Delete
while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) {
[8163] Fix | Delete
refPos += 2;
[8164] Fix | Delete
}
[8165] Fix | Delete
}
[8166] Fix | Delete
break;
[8167] Fix | Delete
case twoDimVertL2:
[8168] Fix | Delete
this._addPixelsNeg(refLine[refPos] - 2, blackPixels);
[8169] Fix | Delete
blackPixels ^= 1;
[8170] Fix | Delete
if (codingLine[this.codingPos] < columns) {
[8171] Fix | Delete
if (refPos > 0) {
[8172] Fix | Delete
--refPos;
[8173] Fix | Delete
} else {
[8174] Fix | Delete
++refPos;
[8175] Fix | Delete
}
[8176] Fix | Delete
while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) {
[8177] Fix | Delete
refPos += 2;
[8178] Fix | Delete
}
[8179] Fix | Delete
}
[8180] Fix | Delete
break;
[8181] Fix | Delete
case twoDimVertL1:
[8182] Fix | Delete
this._addPixelsNeg(refLine[refPos] - 1, blackPixels);
[8183] Fix | Delete
blackPixels ^= 1;
[8184] Fix | Delete
if (codingLine[this.codingPos] < columns) {
[8185] Fix | Delete
if (refPos > 0) {
[8186] Fix | Delete
--refPos;
[8187] Fix | Delete
} else {
[8188] Fix | Delete
++refPos;
[8189] Fix | Delete
}
[8190] Fix | Delete
while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) {
[8191] Fix | Delete
refPos += 2;
[8192] Fix | Delete
}
[8193] Fix | Delete
}
[8194] Fix | Delete
break;
[8195] Fix | Delete
case ccittEOF:
[8196] Fix | Delete
this._addPixels(columns, 0);
[8197] Fix | Delete
this.eof = true;
[8198] Fix | Delete
break;
[8199] Fix | Delete
default:
[8200] Fix | Delete
info("bad 2d code");
[8201] Fix | Delete
this._addPixels(columns, 0);
[8202] Fix | Delete
this.err = true;
[8203] Fix | Delete
}
[8204] Fix | Delete
}
[8205] Fix | Delete
} else {
[8206] Fix | Delete
codingLine[0] = 0;
[8207] Fix | Delete
this.codingPos = 0;
[8208] Fix | Delete
blackPixels = 0;
[8209] Fix | Delete
while (codingLine[this.codingPos] < columns) {
[8210] Fix | Delete
code1 = 0;
[8211] Fix | Delete
if (blackPixels) {
[8212] Fix | Delete
do {
[8213] Fix | Delete
code1 += code3 = this._getBlackCode();
[8214] Fix | Delete
} while (code3 >= 64);
[8215] Fix | Delete
} else {
[8216] Fix | Delete
do {
[8217] Fix | Delete
code1 += code3 = this._getWhiteCode();
[8218] Fix | Delete
} while (code3 >= 64);
[8219] Fix | Delete
}
[8220] Fix | Delete
this._addPixels(codingLine[this.codingPos] + code1, blackPixels);
[8221] Fix | Delete
blackPixels ^= 1;
[8222] Fix | Delete
}
[8223] Fix | Delete
}
[8224] Fix | Delete
let gotEOL = false;
[8225] Fix | Delete
if (this.byteAlign) {
[8226] Fix | Delete
this.inputBits &= ~7;
[8227] Fix | Delete
}
[8228] Fix | Delete
if (!this.eoblock && this.row === this.rows - 1) {
[8229] Fix | Delete
this.rowsDone = true;
[8230] Fix | Delete
} else {
[8231] Fix | Delete
code1 = this._lookBits(12);
[8232] Fix | Delete
if (this.eoline) {
[8233] Fix | Delete
while (code1 !== ccittEOF && code1 !== 1) {
[8234] Fix | Delete
this._eatBits(1);
[8235] Fix | Delete
code1 = this._lookBits(12);
[8236] Fix | Delete
}
[8237] Fix | Delete
} else {
[8238] Fix | Delete
while (code1 === 0) {
[8239] Fix | Delete
this._eatBits(1);
[8240] Fix | Delete
code1 = this._lookBits(12);
[8241] Fix | Delete
}
[8242] Fix | Delete
}
[8243] Fix | Delete
if (code1 === 1) {
[8244] Fix | Delete
this._eatBits(12);
[8245] Fix | Delete
gotEOL = true;
[8246] Fix | Delete
} else if (code1 === ccittEOF) {
[8247] Fix | Delete
this.eof = true;
[8248] Fix | Delete
}
[8249] Fix | Delete
}
[8250] Fix | Delete
if (!this.eof && this.encoding > 0 && !this.rowsDone) {
[8251] Fix | Delete
this.nextLine2D = !this._lookBits(1);
[8252] Fix | Delete
this._eatBits(1);
[8253] Fix | Delete
}
[8254] Fix | Delete
if (this.eoblock && gotEOL && this.byteAlign) {
[8255] Fix | Delete
code1 = this._lookBits(12);
[8256] Fix | Delete
if (code1 === 1) {
[8257] Fix | Delete
this._eatBits(12);
[8258] Fix | Delete
if (this.encoding > 0) {
[8259] Fix | Delete
this._lookBits(1);
[8260] Fix | Delete
this._eatBits(1);
[8261] Fix | Delete
}
[8262] Fix | Delete
if (this.encoding >= 0) {
[8263] Fix | Delete
for (i = 0; i < 4; ++i) {
[8264] Fix | Delete
code1 = this._lookBits(12);
[8265] Fix | Delete
if (code1 !== 1) {
[8266] Fix | Delete
info("bad rtc code: " + code1);
[8267] Fix | Delete
}
[8268] Fix | Delete
this._eatBits(12);
[8269] Fix | Delete
if (this.encoding > 0) {
[8270] Fix | Delete
this._lookBits(1);
[8271] Fix | Delete
this._eatBits(1);
[8272] Fix | Delete
}
[8273] Fix | Delete
}
[8274] Fix | Delete
}
[8275] Fix | Delete
this.eof = true;
[8276] Fix | Delete
}
[8277] Fix | Delete
} else if (this.err && this.eoline) {
[8278] Fix | Delete
while (true) {
[8279] Fix | Delete
code1 = this._lookBits(13);
[8280] Fix | Delete
if (code1 === ccittEOF) {
[8281] Fix | Delete
this.eof = true;
[8282] Fix | Delete
return -1;
[8283] Fix | Delete
}
[8284] Fix | Delete
if (code1 >> 1 === 1) {
[8285] Fix | Delete
break;
[8286] Fix | Delete
}
[8287] Fix | Delete
this._eatBits(1);
[8288] Fix | Delete
}
[8289] Fix | Delete
this._eatBits(12);
[8290] Fix | Delete
if (this.encoding > 0) {
[8291] Fix | Delete
this._eatBits(1);
[8292] Fix | Delete
this.nextLine2D = !(code1 & 1);
[8293] Fix | Delete
}
[8294] Fix | Delete
}
[8295] Fix | Delete
this.outputBits = codingLine[0] > 0 ? codingLine[this.codingPos = 0] : codingLine[this.codingPos = 1];
[8296] Fix | Delete
this.row++;
[8297] Fix | Delete
}
[8298] Fix | Delete
let c;
[8299] Fix | Delete
if (this.outputBits >= 8) {
[8300] Fix | Delete
c = this.codingPos & 1 ? 0 : 0xff;
[8301] Fix | Delete
this.outputBits -= 8;
[8302] Fix | Delete
if (this.outputBits === 0 && codingLine[this.codingPos] < columns) {
[8303] Fix | Delete
this.codingPos++;
[8304] Fix | Delete
this.outputBits = codingLine[this.codingPos] - codingLine[this.codingPos - 1];
[8305] Fix | Delete
}
[8306] Fix | Delete
} else {
[8307] Fix | Delete
bits = 8;
[8308] Fix | Delete
c = 0;
[8309] Fix | Delete
do {
[8310] Fix | Delete
if (typeof this.outputBits !== "number") {
[8311] Fix | Delete
throw new FormatError('Invalid /CCITTFaxDecode data, "outputBits" must be a number.');
[8312] Fix | Delete
}
[8313] Fix | Delete
if (this.outputBits > bits) {
[8314] Fix | Delete
c <<= bits;
[8315] Fix | Delete
if (!(this.codingPos & 1)) {
[8316] Fix | Delete
c |= 0xff >> 8 - bits;
[8317] Fix | Delete
}
[8318] Fix | Delete
this.outputBits -= bits;
[8319] Fix | Delete
bits = 0;
[8320] Fix | Delete
} else {
[8321] Fix | Delete
c <<= this.outputBits;
[8322] Fix | Delete
if (!(this.codingPos & 1)) {
[8323] Fix | Delete
c |= 0xff >> 8 - this.outputBits;
[8324] Fix | Delete
}
[8325] Fix | Delete
bits -= this.outputBits;
[8326] Fix | Delete
this.outputBits = 0;
[8327] Fix | Delete
if (codingLine[this.codingPos] < columns) {
[8328] Fix | Delete
this.codingPos++;
[8329] Fix | Delete
this.outputBits = codingLine[this.codingPos] - codingLine[this.codingPos - 1];
[8330] Fix | Delete
} else if (bits > 0) {
[8331] Fix | Delete
c <<= bits;
[8332] Fix | Delete
bits = 0;
[8333] Fix | Delete
}
[8334] Fix | Delete
}
[8335] Fix | Delete
} while (bits);
[8336] Fix | Delete
}
[8337] Fix | Delete
if (this.black) {
[8338] Fix | Delete
c ^= 0xff;
[8339] Fix | Delete
}
[8340] Fix | Delete
return c;
[8341] Fix | Delete
}
[8342] Fix | Delete
_addPixels(a1, blackPixels) {
[8343] Fix | Delete
const codingLine = this.codingLine;
[8344] Fix | Delete
let codingPos = this.codingPos;
[8345] Fix | Delete
if (a1 > codingLine[codingPos]) {
[8346] Fix | Delete
if (a1 > this.columns) {
[8347] Fix | Delete
info("row is wrong length");
[8348] Fix | Delete
this.err = true;
[8349] Fix | Delete
a1 = this.columns;
[8350] Fix | Delete
}
[8351] Fix | Delete
if (codingPos & 1 ^ blackPixels) {
[8352] Fix | Delete
++codingPos;
[8353] Fix | Delete
}
[8354] Fix | Delete
codingLine[codingPos] = a1;
[8355] Fix | Delete
}
[8356] Fix | Delete
this.codingPos = codingPos;
[8357] Fix | Delete
}
[8358] Fix | Delete
_addPixelsNeg(a1, blackPixels) {
[8359] Fix | Delete
const codingLine = this.codingLine;
[8360] Fix | Delete
let codingPos = this.codingPos;
[8361] Fix | Delete
if (a1 > codingLine[codingPos]) {
[8362] Fix | Delete
if (a1 > this.columns) {
[8363] Fix | Delete
info("row is wrong length");
[8364] Fix | Delete
this.err = true;
[8365] Fix | Delete
a1 = this.columns;
[8366] Fix | Delete
}
[8367] Fix | Delete
if (codingPos & 1 ^ blackPixels) {
[8368] Fix | Delete
++codingPos;
[8369] Fix | Delete
}
[8370] Fix | Delete
codingLine[codingPos] = a1;
[8371] Fix | Delete
} else if (a1 < codingLine[codingPos]) {
[8372] Fix | Delete
if (a1 < 0) {
[8373] Fix | Delete
info("invalid code");
[8374] Fix | Delete
this.err = true;
[8375] Fix | Delete
a1 = 0;
[8376] Fix | Delete
}
[8377] Fix | Delete
while (codingPos > 0 && a1 < codingLine[codingPos - 1]) {
[8378] Fix | Delete
--codingPos;
[8379] Fix | Delete
}
[8380] Fix | Delete
codingLine[codingPos] = a1;
[8381] Fix | Delete
}
[8382] Fix | Delete
this.codingPos = codingPos;
[8383] Fix | Delete
}
[8384] Fix | Delete
_findTableCode(start, end, table, limit) {
[8385] Fix | Delete
const limitValue = limit || 0;
[8386] Fix | Delete
for (let i = start; i <= end; ++i) {
[8387] Fix | Delete
let code = this._lookBits(i);
[8388] Fix | Delete
if (code === ccittEOF) {
[8389] Fix | Delete
return [true, 1, false];
[8390] Fix | Delete
}
[8391] Fix | Delete
if (i < end) {
[8392] Fix | Delete
code <<= end - i;
[8393] Fix | Delete
}
[8394] Fix | Delete
if (!limitValue || code >= limitValue) {
[8395] Fix | Delete
const p = table[code - limitValue];
[8396] Fix | Delete
if (p[0] === i) {
[8397] Fix | Delete
this._eatBits(i);
[8398] Fix | Delete
return [true, p[1], true];
[8399] Fix | Delete
}
[8400] Fix | Delete
}
[8401] Fix | Delete
}
[8402] Fix | Delete
return [false, 0, false];
[8403] Fix | Delete
}
[8404] Fix | Delete
_getTwoDimCode() {
[8405] Fix | Delete
let code = 0;
[8406] Fix | Delete
let p;
[8407] Fix | Delete
if (this.eoblock) {
[8408] Fix | Delete
code = this._lookBits(7);
[8409] Fix | Delete
p = twoDimTable[code];
[8410] Fix | Delete
if (p?.[0] > 0) {
[8411] Fix | Delete
this._eatBits(p[0]);
[8412] Fix | Delete
return p[1];
[8413] Fix | Delete
}
[8414] Fix | Delete
} else {
[8415] Fix | Delete
const result = this._findTableCode(1, 7, twoDimTable);
[8416] Fix | Delete
if (result[0] && result[2]) {
[8417] Fix | Delete
return result[1];
[8418] Fix | Delete
}
[8419] Fix | Delete
}
[8420] Fix | Delete
info("Bad two dim code");
[8421] Fix | Delete
return ccittEOF;
[8422] Fix | Delete
}
[8423] Fix | Delete
_getWhiteCode() {
[8424] Fix | Delete
let code = 0;
[8425] Fix | Delete
let p;
[8426] Fix | Delete
if (this.eoblock) {
[8427] Fix | Delete
code = this._lookBits(12);
[8428] Fix | Delete
if (code === ccittEOF) {
[8429] Fix | Delete
return 1;
[8430] Fix | Delete
}
[8431] Fix | Delete
p = code >> 5 === 0 ? whiteTable1[code] : whiteTable2[code >> 3];
[8432] Fix | Delete
if (p[0] > 0) {
[8433] Fix | Delete
this._eatBits(p[0]);
[8434] Fix | Delete
return p[1];
[8435] Fix | Delete
}
[8436] Fix | Delete
} else {
[8437] Fix | Delete
let result = this._findTableCode(1, 9, whiteTable2);
[8438] Fix | Delete
if (result[0]) {
[8439] Fix | Delete
return result[1];
[8440] Fix | Delete
}
[8441] Fix | Delete
result = this._findTableCode(11, 12, whiteTable1);
[8442] Fix | Delete
if (result[0]) {
[8443] Fix | Delete
return result[1];
[8444] Fix | Delete
}
[8445] Fix | Delete
}
[8446] Fix | Delete
info("bad white code");
[8447] Fix | Delete
this._eatBits(1);
[8448] Fix | Delete
return 1;
[8449] Fix | Delete
}
[8450] Fix | Delete
_getBlackCode() {
[8451] Fix | Delete
let code, p;
[8452] Fix | Delete
if (this.eoblock) {
[8453] Fix | Delete
code = this._lookBits(13);
[8454] Fix | Delete
if (code === ccittEOF) {
[8455] Fix | Delete
return 1;
[8456] Fix | Delete
}
[8457] Fix | Delete
if (code >> 7 === 0) {
[8458] Fix | Delete
p = blackTable1[code];
[8459] Fix | Delete
} else if (code >> 9 === 0 && code >> 7 !== 0) {
[8460] Fix | Delete
p = blackTable2[(code >> 1) - 64];
[8461] Fix | Delete
} else {
[8462] Fix | Delete
p = blackTable3[code >> 7];
[8463] Fix | Delete
}
[8464] Fix | Delete
if (p[0] > 0) {
[8465] Fix | Delete
this._eatBits(p[0]);
[8466] Fix | Delete
return p[1];
[8467] Fix | Delete
}
[8468] Fix | Delete
} else {
[8469] Fix | Delete
let result = this._findTableCode(2, 6, blackTable3);
[8470] Fix | Delete
if (result[0]) {
[8471] Fix | Delete
return result[1];
[8472] Fix | Delete
}
[8473] Fix | Delete
result = this._findTableCode(7, 12, blackTable2, 64);
[8474] Fix | Delete
if (result[0]) {
[8475] Fix | Delete
return result[1];
[8476] Fix | Delete
}
[8477] Fix | Delete
result = this._findTableCode(10, 13, blackTable1);
[8478] Fix | Delete
if (result[0]) {
[8479] Fix | Delete
return result[1];
[8480] Fix | Delete
}
[8481] Fix | Delete
}
[8482] Fix | Delete
info("bad black code");
[8483] Fix | Delete
this._eatBits(1);
[8484] Fix | Delete
return 1;
[8485] Fix | Delete
}
[8486] Fix | Delete
_lookBits(n) {
[8487] Fix | Delete
let c;
[8488] Fix | Delete
while (this.inputBits < n) {
[8489] Fix | Delete
if ((c = this.source.next()) === -1) {
[8490] Fix | Delete
if (this.inputBits === 0) {
[8491] Fix | Delete
return ccittEOF;
[8492] Fix | Delete
}
[8493] Fix | Delete
return this.inputBuf << n - this.inputBits & 0xffff >> 16 - n;
[8494] Fix | Delete
}
[8495] Fix | Delete
this.inputBuf = this.inputBuf << 8 | c;
[8496] Fix | Delete
this.inputBits += 8;
[8497] Fix | Delete
}
[8498] Fix | Delete
return this.inputBuf >> this.inputBits - n & 0xffff >> 16 - n;
[8499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function