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/build
File: pdf.worker.js
ch = this.nextChar();
[14000] Fix | Delete
continue;
[14001] Fix | Delete
} else {
[14002] Fix | Delete
if (isFirstHex) {
[14003] Fix | Delete
firstDigit = toHexDigit(ch);
[14004] Fix | Delete
if (firstDigit === -1) {
[14005] Fix | Delete
this._hexStringWarn(ch);
[14006] Fix | Delete
ch = this.nextChar();
[14007] Fix | Delete
continue;
[14008] Fix | Delete
}
[14009] Fix | Delete
} else {
[14010] Fix | Delete
secondDigit = toHexDigit(ch);
[14011] Fix | Delete
if (secondDigit === -1) {
[14012] Fix | Delete
this._hexStringWarn(ch);
[14013] Fix | Delete
ch = this.nextChar();
[14014] Fix | Delete
continue;
[14015] Fix | Delete
}
[14016] Fix | Delete
strBuf.push(String.fromCharCode(firstDigit << 4 | secondDigit));
[14017] Fix | Delete
}
[14018] Fix | Delete
isFirstHex = !isFirstHex;
[14019] Fix | Delete
ch = this.nextChar();
[14020] Fix | Delete
}
[14021] Fix | Delete
}
[14022] Fix | Delete
return strBuf.join("");
[14023] Fix | Delete
}
[14024] Fix | Delete
getObj() {
[14025] Fix | Delete
let comment = false;
[14026] Fix | Delete
let ch = this.currentChar;
[14027] Fix | Delete
while (true) {
[14028] Fix | Delete
if (ch < 0) {
[14029] Fix | Delete
return EOF;
[14030] Fix | Delete
}
[14031] Fix | Delete
if (comment) {
[14032] Fix | Delete
if (ch === 0x0a || ch === 0x0d) {
[14033] Fix | Delete
comment = false;
[14034] Fix | Delete
}
[14035] Fix | Delete
} else if (ch === 0x25) {
[14036] Fix | Delete
comment = true;
[14037] Fix | Delete
} else if (specialChars[ch] !== 1) {
[14038] Fix | Delete
break;
[14039] Fix | Delete
}
[14040] Fix | Delete
ch = this.nextChar();
[14041] Fix | Delete
}
[14042] Fix | Delete
switch (ch | 0) {
[14043] Fix | Delete
case 0x30:
[14044] Fix | Delete
case 0x31:
[14045] Fix | Delete
case 0x32:
[14046] Fix | Delete
case 0x33:
[14047] Fix | Delete
case 0x34:
[14048] Fix | Delete
case 0x35:
[14049] Fix | Delete
case 0x36:
[14050] Fix | Delete
case 0x37:
[14051] Fix | Delete
case 0x38:
[14052] Fix | Delete
case 0x39:
[14053] Fix | Delete
case 0x2b:
[14054] Fix | Delete
case 0x2d:
[14055] Fix | Delete
case 0x2e:
[14056] Fix | Delete
return this.getNumber();
[14057] Fix | Delete
case 0x28:
[14058] Fix | Delete
return this.getString();
[14059] Fix | Delete
case 0x2f:
[14060] Fix | Delete
return this.getName();
[14061] Fix | Delete
case 0x5b:
[14062] Fix | Delete
this.nextChar();
[14063] Fix | Delete
return Cmd.get("[");
[14064] Fix | Delete
case 0x5d:
[14065] Fix | Delete
this.nextChar();
[14066] Fix | Delete
return Cmd.get("]");
[14067] Fix | Delete
case 0x3c:
[14068] Fix | Delete
ch = this.nextChar();
[14069] Fix | Delete
if (ch === 0x3c) {
[14070] Fix | Delete
this.nextChar();
[14071] Fix | Delete
return Cmd.get("<<");
[14072] Fix | Delete
}
[14073] Fix | Delete
return this.getHexString();
[14074] Fix | Delete
case 0x3e:
[14075] Fix | Delete
ch = this.nextChar();
[14076] Fix | Delete
if (ch === 0x3e) {
[14077] Fix | Delete
this.nextChar();
[14078] Fix | Delete
return Cmd.get(">>");
[14079] Fix | Delete
}
[14080] Fix | Delete
return Cmd.get(">");
[14081] Fix | Delete
case 0x7b:
[14082] Fix | Delete
this.nextChar();
[14083] Fix | Delete
return Cmd.get("{");
[14084] Fix | Delete
case 0x7d:
[14085] Fix | Delete
this.nextChar();
[14086] Fix | Delete
return Cmd.get("}");
[14087] Fix | Delete
case 0x29:
[14088] Fix | Delete
this.nextChar();
[14089] Fix | Delete
throw new FormatError(`Illegal character: ${ch}`);
[14090] Fix | Delete
}
[14091] Fix | Delete
let str = String.fromCharCode(ch);
[14092] Fix | Delete
if (ch < 0x20 || ch > 0x7f) {
[14093] Fix | Delete
const nextCh = this.peekChar();
[14094] Fix | Delete
if (nextCh >= 0x20 && nextCh <= 0x7f) {
[14095] Fix | Delete
this.nextChar();
[14096] Fix | Delete
return Cmd.get(str);
[14097] Fix | Delete
}
[14098] Fix | Delete
}
[14099] Fix | Delete
const knownCommands = this.knownCommands;
[14100] Fix | Delete
let knownCommandFound = knownCommands?.[str] !== undefined;
[14101] Fix | Delete
while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) {
[14102] Fix | Delete
const possibleCommand = str + String.fromCharCode(ch);
[14103] Fix | Delete
if (knownCommandFound && knownCommands[possibleCommand] === undefined) {
[14104] Fix | Delete
break;
[14105] Fix | Delete
}
[14106] Fix | Delete
if (str.length === 128) {
[14107] Fix | Delete
throw new FormatError(`Command token too long: ${str.length}`);
[14108] Fix | Delete
}
[14109] Fix | Delete
str = possibleCommand;
[14110] Fix | Delete
knownCommandFound = knownCommands?.[str] !== undefined;
[14111] Fix | Delete
}
[14112] Fix | Delete
if (str === "true") {
[14113] Fix | Delete
return true;
[14114] Fix | Delete
}
[14115] Fix | Delete
if (str === "false") {
[14116] Fix | Delete
return false;
[14117] Fix | Delete
}
[14118] Fix | Delete
if (str === "null") {
[14119] Fix | Delete
return null;
[14120] Fix | Delete
}
[14121] Fix | Delete
if (str === "BI") {
[14122] Fix | Delete
this.beginInlineImagePos = this.stream.pos;
[14123] Fix | Delete
}
[14124] Fix | Delete
return Cmd.get(str);
[14125] Fix | Delete
}
[14126] Fix | Delete
skipToNextLine() {
[14127] Fix | Delete
let ch = this.currentChar;
[14128] Fix | Delete
while (ch >= 0) {
[14129] Fix | Delete
if (ch === 0x0d) {
[14130] Fix | Delete
ch = this.nextChar();
[14131] Fix | Delete
if (ch === 0x0a) {
[14132] Fix | Delete
this.nextChar();
[14133] Fix | Delete
}
[14134] Fix | Delete
break;
[14135] Fix | Delete
} else if (ch === 0x0a) {
[14136] Fix | Delete
this.nextChar();
[14137] Fix | Delete
break;
[14138] Fix | Delete
}
[14139] Fix | Delete
ch = this.nextChar();
[14140] Fix | Delete
}
[14141] Fix | Delete
}
[14142] Fix | Delete
}
[14143] Fix | Delete
class Linearization {
[14144] Fix | Delete
static create(stream) {
[14145] Fix | Delete
function getInt(linDict, name, allowZeroValue = false) {
[14146] Fix | Delete
const obj = linDict.get(name);
[14147] Fix | Delete
if (Number.isInteger(obj) && (allowZeroValue ? obj >= 0 : obj > 0)) {
[14148] Fix | Delete
return obj;
[14149] Fix | Delete
}
[14150] Fix | Delete
throw new Error(`The "${name}" parameter in the linearization ` + "dictionary is invalid.");
[14151] Fix | Delete
}
[14152] Fix | Delete
function getHints(linDict) {
[14153] Fix | Delete
const hints = linDict.get("H");
[14154] Fix | Delete
let hintsLength;
[14155] Fix | Delete
if (Array.isArray(hints) && ((hintsLength = hints.length) === 2 || hintsLength === 4)) {
[14156] Fix | Delete
for (let index = 0; index < hintsLength; index++) {
[14157] Fix | Delete
const hint = hints[index];
[14158] Fix | Delete
if (!(Number.isInteger(hint) && hint > 0)) {
[14159] Fix | Delete
throw new Error(`Hint (${index}) in the linearization dictionary is invalid.`);
[14160] Fix | Delete
}
[14161] Fix | Delete
}
[14162] Fix | Delete
return hints;
[14163] Fix | Delete
}
[14164] Fix | Delete
throw new Error("Hint array in the linearization dictionary is invalid.");
[14165] Fix | Delete
}
[14166] Fix | Delete
const parser = new Parser({
[14167] Fix | Delete
lexer: new Lexer(stream),
[14168] Fix | Delete
xref: null
[14169] Fix | Delete
});
[14170] Fix | Delete
const obj1 = parser.getObj();
[14171] Fix | Delete
const obj2 = parser.getObj();
[14172] Fix | Delete
const obj3 = parser.getObj();
[14173] Fix | Delete
const linDict = parser.getObj();
[14174] Fix | Delete
let obj, length;
[14175] Fix | Delete
if (!(Number.isInteger(obj1) && Number.isInteger(obj2) && isCmd(obj3, "obj") && linDict instanceof Dict && typeof (obj = linDict.get("Linearized")) === "number" && obj > 0)) {
[14176] Fix | Delete
return null;
[14177] Fix | Delete
} else if ((length = getInt(linDict, "L")) !== stream.length) {
[14178] Fix | Delete
throw new Error('The "L" parameter in the linearization dictionary ' + "does not equal the stream length.");
[14179] Fix | Delete
}
[14180] Fix | Delete
return {
[14181] Fix | Delete
length,
[14182] Fix | Delete
hints: getHints(linDict),
[14183] Fix | Delete
objectNumberFirst: getInt(linDict, "O"),
[14184] Fix | Delete
endFirst: getInt(linDict, "E"),
[14185] Fix | Delete
numPages: getInt(linDict, "N"),
[14186] Fix | Delete
mainXRefEntriesOffset: getInt(linDict, "T"),
[14187] Fix | Delete
pageFirst: linDict.has("P") ? getInt(linDict, "P", true) : 0
[14188] Fix | Delete
};
[14189] Fix | Delete
}
[14190] Fix | Delete
}
[14191] Fix | Delete
[14192] Fix | Delete
;// CONCATENATED MODULE: ./src/core/cmap.js
[14193] Fix | Delete
[14194] Fix | Delete
[14195] Fix | Delete
[14196] Fix | Delete
[14197] Fix | Delete
[14198] Fix | Delete
[14199] Fix | Delete
[14200] Fix | Delete
[14201] Fix | Delete
[14202] Fix | Delete
[14203] Fix | Delete
const BUILT_IN_CMAPS = ["Adobe-GB1-UCS2", "Adobe-CNS1-UCS2", "Adobe-Japan1-UCS2", "Adobe-Korea1-UCS2", "78-EUC-H", "78-EUC-V", "78-H", "78-RKSJ-H", "78-RKSJ-V", "78-V", "78ms-RKSJ-H", "78ms-RKSJ-V", "83pv-RKSJ-H", "90ms-RKSJ-H", "90ms-RKSJ-V", "90msp-RKSJ-H", "90msp-RKSJ-V", "90pv-RKSJ-H", "90pv-RKSJ-V", "Add-H", "Add-RKSJ-H", "Add-RKSJ-V", "Add-V", "Adobe-CNS1-0", "Adobe-CNS1-1", "Adobe-CNS1-2", "Adobe-CNS1-3", "Adobe-CNS1-4", "Adobe-CNS1-5", "Adobe-CNS1-6", "Adobe-GB1-0", "Adobe-GB1-1", "Adobe-GB1-2", "Adobe-GB1-3", "Adobe-GB1-4", "Adobe-GB1-5", "Adobe-Japan1-0", "Adobe-Japan1-1", "Adobe-Japan1-2", "Adobe-Japan1-3", "Adobe-Japan1-4", "Adobe-Japan1-5", "Adobe-Japan1-6", "Adobe-Korea1-0", "Adobe-Korea1-1", "Adobe-Korea1-2", "B5-H", "B5-V", "B5pc-H", "B5pc-V", "CNS-EUC-H", "CNS-EUC-V", "CNS1-H", "CNS1-V", "CNS2-H", "CNS2-V", "ETHK-B5-H", "ETHK-B5-V", "ETen-B5-H", "ETen-B5-V", "ETenms-B5-H", "ETenms-B5-V", "EUC-H", "EUC-V", "Ext-H", "Ext-RKSJ-H", "Ext-RKSJ-V", "Ext-V", "GB-EUC-H", "GB-EUC-V", "GB-H", "GB-V", "GBK-EUC-H", "GBK-EUC-V", "GBK2K-H", "GBK2K-V", "GBKp-EUC-H", "GBKp-EUC-V", "GBT-EUC-H", "GBT-EUC-V", "GBT-H", "GBT-V", "GBTpc-EUC-H", "GBTpc-EUC-V", "GBpc-EUC-H", "GBpc-EUC-V", "H", "HKdla-B5-H", "HKdla-B5-V", "HKdlb-B5-H", "HKdlb-B5-V", "HKgccs-B5-H", "HKgccs-B5-V", "HKm314-B5-H", "HKm314-B5-V", "HKm471-B5-H", "HKm471-B5-V", "HKscs-B5-H", "HKscs-B5-V", "Hankaku", "Hiragana", "KSC-EUC-H", "KSC-EUC-V", "KSC-H", "KSC-Johab-H", "KSC-Johab-V", "KSC-V", "KSCms-UHC-H", "KSCms-UHC-HW-H", "KSCms-UHC-HW-V", "KSCms-UHC-V", "KSCpc-EUC-H", "KSCpc-EUC-V", "Katakana", "NWP-H", "NWP-V", "RKSJ-H", "RKSJ-V", "Roman", "UniCNS-UCS2-H", "UniCNS-UCS2-V", "UniCNS-UTF16-H", "UniCNS-UTF16-V", "UniCNS-UTF32-H", "UniCNS-UTF32-V", "UniCNS-UTF8-H", "UniCNS-UTF8-V", "UniGB-UCS2-H", "UniGB-UCS2-V", "UniGB-UTF16-H", "UniGB-UTF16-V", "UniGB-UTF32-H", "UniGB-UTF32-V", "UniGB-UTF8-H", "UniGB-UTF8-V", "UniJIS-UCS2-H", "UniJIS-UCS2-HW-H", "UniJIS-UCS2-HW-V", "UniJIS-UCS2-V", "UniJIS-UTF16-H", "UniJIS-UTF16-V", "UniJIS-UTF32-H", "UniJIS-UTF32-V", "UniJIS-UTF8-H", "UniJIS-UTF8-V", "UniJIS2004-UTF16-H", "UniJIS2004-UTF16-V", "UniJIS2004-UTF32-H", "UniJIS2004-UTF32-V", "UniJIS2004-UTF8-H", "UniJIS2004-UTF8-V", "UniJISPro-UCS2-HW-V", "UniJISPro-UCS2-V", "UniJISPro-UTF8-V", "UniJISX0213-UTF32-H", "UniJISX0213-UTF32-V", "UniJISX02132004-UTF32-H", "UniJISX02132004-UTF32-V", "UniKS-UCS2-H", "UniKS-UCS2-V", "UniKS-UTF16-H", "UniKS-UTF16-V", "UniKS-UTF32-H", "UniKS-UTF32-V", "UniKS-UTF8-H", "UniKS-UTF8-V", "V", "WP-Symbol"];
[14204] Fix | Delete
const MAX_MAP_RANGE = 2 ** 24 - 1;
[14205] Fix | Delete
class CMap {
[14206] Fix | Delete
constructor(builtInCMap = false) {
[14207] Fix | Delete
this.codespaceRanges = [[], [], [], []];
[14208] Fix | Delete
this.numCodespaceRanges = 0;
[14209] Fix | Delete
this._map = [];
[14210] Fix | Delete
this.name = "";
[14211] Fix | Delete
this.vertical = false;
[14212] Fix | Delete
this.useCMap = null;
[14213] Fix | Delete
this.builtInCMap = builtInCMap;
[14214] Fix | Delete
}
[14215] Fix | Delete
addCodespaceRange(n, low, high) {
[14216] Fix | Delete
this.codespaceRanges[n - 1].push(low, high);
[14217] Fix | Delete
this.numCodespaceRanges++;
[14218] Fix | Delete
}
[14219] Fix | Delete
mapCidRange(low, high, dstLow) {
[14220] Fix | Delete
if (high - low > MAX_MAP_RANGE) {
[14221] Fix | Delete
throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");
[14222] Fix | Delete
}
[14223] Fix | Delete
while (low <= high) {
[14224] Fix | Delete
this._map[low++] = dstLow++;
[14225] Fix | Delete
}
[14226] Fix | Delete
}
[14227] Fix | Delete
mapBfRange(low, high, dstLow) {
[14228] Fix | Delete
if (high - low > MAX_MAP_RANGE) {
[14229] Fix | Delete
throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");
[14230] Fix | Delete
}
[14231] Fix | Delete
const lastByte = dstLow.length - 1;
[14232] Fix | Delete
while (low <= high) {
[14233] Fix | Delete
this._map[low++] = dstLow;
[14234] Fix | Delete
const nextCharCode = dstLow.charCodeAt(lastByte) + 1;
[14235] Fix | Delete
if (nextCharCode > 0xff) {
[14236] Fix | Delete
dstLow = dstLow.substring(0, lastByte - 1) + String.fromCharCode(dstLow.charCodeAt(lastByte - 1) + 1) + "\x00";
[14237] Fix | Delete
continue;
[14238] Fix | Delete
}
[14239] Fix | Delete
dstLow = dstLow.substring(0, lastByte) + String.fromCharCode(nextCharCode);
[14240] Fix | Delete
}
[14241] Fix | Delete
}
[14242] Fix | Delete
mapBfRangeToArray(low, high, array) {
[14243] Fix | Delete
if (high - low > MAX_MAP_RANGE) {
[14244] Fix | Delete
throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.");
[14245] Fix | Delete
}
[14246] Fix | Delete
const ii = array.length;
[14247] Fix | Delete
let i = 0;
[14248] Fix | Delete
while (low <= high && i < ii) {
[14249] Fix | Delete
this._map[low] = array[i++];
[14250] Fix | Delete
++low;
[14251] Fix | Delete
}
[14252] Fix | Delete
}
[14253] Fix | Delete
mapOne(src, dst) {
[14254] Fix | Delete
this._map[src] = dst;
[14255] Fix | Delete
}
[14256] Fix | Delete
lookup(code) {
[14257] Fix | Delete
return this._map[code];
[14258] Fix | Delete
}
[14259] Fix | Delete
contains(code) {
[14260] Fix | Delete
return this._map[code] !== undefined;
[14261] Fix | Delete
}
[14262] Fix | Delete
forEach(callback) {
[14263] Fix | Delete
const map = this._map;
[14264] Fix | Delete
const length = map.length;
[14265] Fix | Delete
if (length <= 0x10000) {
[14266] Fix | Delete
for (let i = 0; i < length; i++) {
[14267] Fix | Delete
if (map[i] !== undefined) {
[14268] Fix | Delete
callback(i, map[i]);
[14269] Fix | Delete
}
[14270] Fix | Delete
}
[14271] Fix | Delete
} else {
[14272] Fix | Delete
for (const i in map) {
[14273] Fix | Delete
callback(i, map[i]);
[14274] Fix | Delete
}
[14275] Fix | Delete
}
[14276] Fix | Delete
}
[14277] Fix | Delete
charCodeOf(value) {
[14278] Fix | Delete
const map = this._map;
[14279] Fix | Delete
if (map.length <= 0x10000) {
[14280] Fix | Delete
return map.indexOf(value);
[14281] Fix | Delete
}
[14282] Fix | Delete
for (const charCode in map) {
[14283] Fix | Delete
if (map[charCode] === value) {
[14284] Fix | Delete
return charCode | 0;
[14285] Fix | Delete
}
[14286] Fix | Delete
}
[14287] Fix | Delete
return -1;
[14288] Fix | Delete
}
[14289] Fix | Delete
getMap() {
[14290] Fix | Delete
return this._map;
[14291] Fix | Delete
}
[14292] Fix | Delete
readCharCode(str, offset, out) {
[14293] Fix | Delete
let c = 0;
[14294] Fix | Delete
const codespaceRanges = this.codespaceRanges;
[14295] Fix | Delete
for (let n = 0, nn = codespaceRanges.length; n < nn; n++) {
[14296] Fix | Delete
c = (c << 8 | str.charCodeAt(offset + n)) >>> 0;
[14297] Fix | Delete
const codespaceRange = codespaceRanges[n];
[14298] Fix | Delete
for (let k = 0, kk = codespaceRange.length; k < kk;) {
[14299] Fix | Delete
const low = codespaceRange[k++];
[14300] Fix | Delete
const high = codespaceRange[k++];
[14301] Fix | Delete
if (c >= low && c <= high) {
[14302] Fix | Delete
out.charcode = c;
[14303] Fix | Delete
out.length = n + 1;
[14304] Fix | Delete
return;
[14305] Fix | Delete
}
[14306] Fix | Delete
}
[14307] Fix | Delete
}
[14308] Fix | Delete
out.charcode = 0;
[14309] Fix | Delete
out.length = 1;
[14310] Fix | Delete
}
[14311] Fix | Delete
getCharCodeLength(charCode) {
[14312] Fix | Delete
const codespaceRanges = this.codespaceRanges;
[14313] Fix | Delete
for (let n = 0, nn = codespaceRanges.length; n < nn; n++) {
[14314] Fix | Delete
const codespaceRange = codespaceRanges[n];
[14315] Fix | Delete
for (let k = 0, kk = codespaceRange.length; k < kk;) {
[14316] Fix | Delete
const low = codespaceRange[k++];
[14317] Fix | Delete
const high = codespaceRange[k++];
[14318] Fix | Delete
if (charCode >= low && charCode <= high) {
[14319] Fix | Delete
return n + 1;
[14320] Fix | Delete
}
[14321] Fix | Delete
}
[14322] Fix | Delete
}
[14323] Fix | Delete
return 1;
[14324] Fix | Delete
}
[14325] Fix | Delete
get length() {
[14326] Fix | Delete
return this._map.length;
[14327] Fix | Delete
}
[14328] Fix | Delete
get isIdentityCMap() {
[14329] Fix | Delete
if (!(this.name === "Identity-H" || this.name === "Identity-V")) {
[14330] Fix | Delete
return false;
[14331] Fix | Delete
}
[14332] Fix | Delete
if (this._map.length !== 0x10000) {
[14333] Fix | Delete
return false;
[14334] Fix | Delete
}
[14335] Fix | Delete
for (let i = 0; i < 0x10000; i++) {
[14336] Fix | Delete
if (this._map[i] !== i) {
[14337] Fix | Delete
return false;
[14338] Fix | Delete
}
[14339] Fix | Delete
}
[14340] Fix | Delete
return true;
[14341] Fix | Delete
}
[14342] Fix | Delete
}
[14343] Fix | Delete
class IdentityCMap extends CMap {
[14344] Fix | Delete
constructor(vertical, n) {
[14345] Fix | Delete
super();
[14346] Fix | Delete
this.vertical = vertical;
[14347] Fix | Delete
this.addCodespaceRange(n, 0, 0xffff);
[14348] Fix | Delete
}
[14349] Fix | Delete
mapCidRange(low, high, dstLow) {
[14350] Fix | Delete
unreachable("should not call mapCidRange");
[14351] Fix | Delete
}
[14352] Fix | Delete
mapBfRange(low, high, dstLow) {
[14353] Fix | Delete
unreachable("should not call mapBfRange");
[14354] Fix | Delete
}
[14355] Fix | Delete
mapBfRangeToArray(low, high, array) {
[14356] Fix | Delete
unreachable("should not call mapBfRangeToArray");
[14357] Fix | Delete
}
[14358] Fix | Delete
mapOne(src, dst) {
[14359] Fix | Delete
unreachable("should not call mapCidOne");
[14360] Fix | Delete
}
[14361] Fix | Delete
lookup(code) {
[14362] Fix | Delete
return Number.isInteger(code) && code <= 0xffff ? code : undefined;
[14363] Fix | Delete
}
[14364] Fix | Delete
contains(code) {
[14365] Fix | Delete
return Number.isInteger(code) && code <= 0xffff;
[14366] Fix | Delete
}
[14367] Fix | Delete
forEach(callback) {
[14368] Fix | Delete
for (let i = 0; i <= 0xffff; i++) {
[14369] Fix | Delete
callback(i, i);
[14370] Fix | Delete
}
[14371] Fix | Delete
}
[14372] Fix | Delete
charCodeOf(value) {
[14373] Fix | Delete
return Number.isInteger(value) && value <= 0xffff ? value : -1;
[14374] Fix | Delete
}
[14375] Fix | Delete
getMap() {
[14376] Fix | Delete
const map = new Array(0x10000);
[14377] Fix | Delete
for (let i = 0; i <= 0xffff; i++) {
[14378] Fix | Delete
map[i] = i;
[14379] Fix | Delete
}
[14380] Fix | Delete
return map;
[14381] Fix | Delete
}
[14382] Fix | Delete
get length() {
[14383] Fix | Delete
return 0x10000;
[14384] Fix | Delete
}
[14385] Fix | Delete
get isIdentityCMap() {
[14386] Fix | Delete
unreachable("should not access .isIdentityCMap");
[14387] Fix | Delete
}
[14388] Fix | Delete
}
[14389] Fix | Delete
function strToInt(str) {
[14390] Fix | Delete
let a = 0;
[14391] Fix | Delete
for (let i = 0; i < str.length; i++) {
[14392] Fix | Delete
a = a << 8 | str.charCodeAt(i);
[14393] Fix | Delete
}
[14394] Fix | Delete
return a >>> 0;
[14395] Fix | Delete
}
[14396] Fix | Delete
function expectString(obj) {
[14397] Fix | Delete
if (typeof obj !== "string") {
[14398] Fix | Delete
throw new FormatError("Malformed CMap: expected string.");
[14399] Fix | Delete
}
[14400] Fix | Delete
}
[14401] Fix | Delete
function expectInt(obj) {
[14402] Fix | Delete
if (!Number.isInteger(obj)) {
[14403] Fix | Delete
throw new FormatError("Malformed CMap: expected int.");
[14404] Fix | Delete
}
[14405] Fix | Delete
}
[14406] Fix | Delete
function parseBfChar(cMap, lexer) {
[14407] Fix | Delete
while (true) {
[14408] Fix | Delete
let obj = lexer.getObj();
[14409] Fix | Delete
if (obj === EOF) {
[14410] Fix | Delete
break;
[14411] Fix | Delete
}
[14412] Fix | Delete
if (isCmd(obj, "endbfchar")) {
[14413] Fix | Delete
return;
[14414] Fix | Delete
}
[14415] Fix | Delete
expectString(obj);
[14416] Fix | Delete
const src = strToInt(obj);
[14417] Fix | Delete
obj = lexer.getObj();
[14418] Fix | Delete
expectString(obj);
[14419] Fix | Delete
const dst = obj;
[14420] Fix | Delete
cMap.mapOne(src, dst);
[14421] Fix | Delete
}
[14422] Fix | Delete
}
[14423] Fix | Delete
function parseBfRange(cMap, lexer) {
[14424] Fix | Delete
while (true) {
[14425] Fix | Delete
let obj = lexer.getObj();
[14426] Fix | Delete
if (obj === EOF) {
[14427] Fix | Delete
break;
[14428] Fix | Delete
}
[14429] Fix | Delete
if (isCmd(obj, "endbfrange")) {
[14430] Fix | Delete
return;
[14431] Fix | Delete
}
[14432] Fix | Delete
expectString(obj);
[14433] Fix | Delete
const low = strToInt(obj);
[14434] Fix | Delete
obj = lexer.getObj();
[14435] Fix | Delete
expectString(obj);
[14436] Fix | Delete
const high = strToInt(obj);
[14437] Fix | Delete
obj = lexer.getObj();
[14438] Fix | Delete
if (Number.isInteger(obj) || typeof obj === "string") {
[14439] Fix | Delete
const dstLow = Number.isInteger(obj) ? String.fromCharCode(obj) : obj;
[14440] Fix | Delete
cMap.mapBfRange(low, high, dstLow);
[14441] Fix | Delete
} else if (isCmd(obj, "[")) {
[14442] Fix | Delete
obj = lexer.getObj();
[14443] Fix | Delete
const array = [];
[14444] Fix | Delete
while (!isCmd(obj, "]") && obj !== EOF) {
[14445] Fix | Delete
array.push(obj);
[14446] Fix | Delete
obj = lexer.getObj();
[14447] Fix | Delete
}
[14448] Fix | Delete
cMap.mapBfRangeToArray(low, high, array);
[14449] Fix | Delete
} else {
[14450] Fix | Delete
break;
[14451] Fix | Delete
}
[14452] Fix | Delete
}
[14453] Fix | Delete
throw new FormatError("Invalid bf range.");
[14454] Fix | Delete
}
[14455] Fix | Delete
function parseCidChar(cMap, lexer) {
[14456] Fix | Delete
while (true) {
[14457] Fix | Delete
let obj = lexer.getObj();
[14458] Fix | Delete
if (obj === EOF) {
[14459] Fix | Delete
break;
[14460] Fix | Delete
}
[14461] Fix | Delete
if (isCmd(obj, "endcidchar")) {
[14462] Fix | Delete
return;
[14463] Fix | Delete
}
[14464] Fix | Delete
expectString(obj);
[14465] Fix | Delete
const src = strToInt(obj);
[14466] Fix | Delete
obj = lexer.getObj();
[14467] Fix | Delete
expectInt(obj);
[14468] Fix | Delete
const dst = obj;
[14469] Fix | Delete
cMap.mapOne(src, dst);
[14470] Fix | Delete
}
[14471] Fix | Delete
}
[14472] Fix | Delete
function parseCidRange(cMap, lexer) {
[14473] Fix | Delete
while (true) {
[14474] Fix | Delete
let obj = lexer.getObj();
[14475] Fix | Delete
if (obj === EOF) {
[14476] Fix | Delete
break;
[14477] Fix | Delete
}
[14478] Fix | Delete
if (isCmd(obj, "endcidrange")) {
[14479] Fix | Delete
return;
[14480] Fix | Delete
}
[14481] Fix | Delete
expectString(obj);
[14482] Fix | Delete
const low = strToInt(obj);
[14483] Fix | Delete
obj = lexer.getObj();
[14484] Fix | Delete
expectString(obj);
[14485] Fix | Delete
const high = strToInt(obj);
[14486] Fix | Delete
obj = lexer.getObj();
[14487] Fix | Delete
expectInt(obj);
[14488] Fix | Delete
const dstLow = obj;
[14489] Fix | Delete
cMap.mapCidRange(low, high, dstLow);
[14490] Fix | Delete
}
[14491] Fix | Delete
}
[14492] Fix | Delete
function parseCodespaceRange(cMap, lexer) {
[14493] Fix | Delete
while (true) {
[14494] Fix | Delete
let obj = lexer.getObj();
[14495] Fix | Delete
if (obj === EOF) {
[14496] Fix | Delete
break;
[14497] Fix | Delete
}
[14498] Fix | Delete
if (isCmd(obj, "endcodespacerange")) {
[14499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function